diff -Nru postgis-1.5.3/CREDITS postgis-2.0.1/CREDITS --- postgis-1.5.3/CREDITS 2009-07-01 16:56:36.000000000 +0000 +++ postgis-2.0.1/CREDITS 2012-03-23 23:46:51.000000000 +0000 @@ -1,69 +1,4 @@ -CREDITS: 2009/07/01 - -The core team of PostGIS is: - - Mark Cave-Ayland - Paul Ramsey - Regina Obe - Kevin Neufeld - Olivier Courtin - Sandro Santilli - -All versions include substantial contributions from the -core team. - - -VERSION SPECIFIC CREDITS: - -PostGIS was originally developed by Refractions Research Inc, of Victora, -British Columbia, Canada (http://www.refractions.net), as a project -in using PostgreSQL as a geospatial data-store. Refractions continues to -provide hosting and infrastructure support to the project. - -The following is a partial list of contributors who have participated -in the project: - -See the postgis manual and the ChangeLog for more contributors. - -Version 1.2.1 of PostGIS includes patches from: - Eduin Carrillo for AsKML() and Transform() - short circuit. - -Version 1.1.0 of PostGIS includes patches from: - Obe, Regina with -k switch for pgsql2shp. - -Version 1.0.0 of PostGIS includes code from: - Mark Cave-Ayland with new positional - operators, join estimator and general testing and support. - Markus Schaber author of the jdbc2 interface - -Version 0.9 of PostGIS includes patches from: - Klaus Foerster on AsSVG() - Olivier Courtin on AsSVG() - Bruno Wolff III on the distance_sphere algorithm - -Version 0.8 of PostGIS includes patches from: - Carl Anderson on schemas - STRK on numerous bug fixes and enhancements - Ralph Mason on WKT parsing for LWGEOM - Mark Cave-Ayland with help on PgSQL 7.5 statistics - -Version 0.7 of PostGIS includes patches from: - Steffen Macke on numerous loader/dumper bugs. - Bernhard Reiter on some documentation issues and a loader limit. - Mark Cave-Ayland on truly_inside(). - STRK on shp2pgsql improvements - -Version 0.5 of PostGIS includes contributions from: - Geographic Data BC (David Skea and Mark Sondheim) with funding and - direction on adding calculations on a spheroid to PostGIS. - -Version 0.2 of PostGIS includes contributions from: - Norman Vine on CygWin compilation issues - -Version 0.1 of PostGIS included constributions from: - Dave Blasby - Core server objects and indexing (original contributions) - Paul Ramsey - Extensions to the PostgreSQL JDBC driver, doco, web. - Jeff Lounsbury - Shape file loader/dumper. - +For updated credits, see the PostGIS manual. +Offline: see doc/README +Online: http://www.postgis.org/documentation/manual-svn/postgis_introduction.html#credits diff -Nru postgis-1.5.3/ChangeLog postgis-2.0.1/ChangeLog --- postgis-1.5.3/ChangeLog 2011-06-25 16:24:37.000000000 +0000 +++ postgis-2.0.1/ChangeLog 2012-06-22 20:44:00.000000000 +0000 @@ -1,4182 +1,24017 @@ -2011-06-24 03:51 pramsey +2012-06-22 05:48 Regina Obe - * liblwgeom/liblwgeom.h, liblwgeom/lwcircstring.c, - regress/sql-mm-circularstring_expected, - regress/sql-mm-curvepoly_expected, - regress/sql-mm-multisurface_expected: Fix Circular BBOXes (#1056) + * [r9972] extras/tiger_geocoder/tiger_2010/create_geocode.sh: #1883 + fix census table generation using sh script -2011-06-23 23:11 chodgson +2012-06-21 22:22 Mark Cave-Ayland - * postgis/lwgeom_functions_analytic.c: further bug fix for#884 + * [r9970] loader/shp2pgsql-gui.c: Remove auto-resizing columns from + text fields in shp2pgsql-gui as they seem to be the cause of + #1881. -2011-06-20 17:01 pramsey +2012-06-21 20:17 Bborie Park - * liblwgeom/g_box.c: geography: ST_Intersects, ST_DWithin - gbox_overlaps: geometries have mismatched dimensionality (#1037) + * [r9967] raster/rt_pg/rt_pg.c, raster/test/regress/check_gdal.sql: + Changed the string "MISSING GDAL DATA" to "GDAL_DATA not found". -2011-06-16 17:18 pramsey +2012-06-21 20:17 Bborie Park - * ChangeLog, README.postgis, doc, doc/release_notes.xml: Notes for - 1.5.3 release + * [r9966] raster/rt_core/rt_api.c, raster/rt_core/rt_api.h, + raster/rt_pg/rt_pg.c, raster/test/core/testapi.c, + raster/test/regress/Makefile.in, + raster/test/regress/check_gdal.sql, + raster/test/regress/check_gdal_expected: Added method that + includes the string "MISSING GDAL DATA" in the output + of postgis_gdal_version() if GDAL is unable to access its data + files + +2012-06-21 11:02 Regina Obe + + * [r9964] loader/shp2pgsql-core.c: #1759: ST_Transform fix for + geography + +2012-06-20 03:02 Paul Ramsey + + * [r9959] liblwgeom/cunit/cu_measures.c, + liblwgeom/lwlinearreferencing.c: ST_LocateAlong chokes on some + value combinations (#1874) + +2012-06-19 20:48 Paul Ramsey + + * [r9956] NEWS: Update news per #1873 + +2012-06-19 20:46 Paul Ramsey + + * [r9954] liblwgeom/cunit/cu_ptarray.c, liblwgeom/ptarray.c: + ST_InterpolatePoint returns empty M value (#1873) + +2012-06-18 22:44 Bborie Park + + * [r9937] NEWS: Updated NEWS to reflect ticket #1870 regarding + raster's ST_Intersects + +2012-06-18 22:44 Bborie Park + + * [r9936] doc/reference_raster.xml, + raster/rt_pg/rtpostgis.sql.in.c: Behavior is consistent across + ST_Intersects(raster, ...) variants. + Synced docs of ST_Intersects to actual behavior. Ticket is #1870. + +2012-06-18 20:34 Bborie Park + + * [r9932] NEWS: Added note about bug fix in NEWS regarding ticket + #1875 + +2012-06-18 20:32 Bborie Park + + * [r9931] raster/rt_pg/rt_pg.c, + raster/test/regress/rt_asraster_expected, + raster/test/regress/rt_summarystats_expected: When no pixels are + counted for summary stats, all other elements of + stats output should be NULL. Ticket is #1875 + +2012-06-18 13:09 Regina Obe + + * [r9926] NEWS, doc/release_notes.xml: take out interruptibility + from 2.0.1 release notes - got pushed to 2.1.0 + +2012-06-18 02:32 Regina Obe + + * [r9923] NEWS, doc/release_notes.xml: amendments in preparation + for 2.0.1 + +2012-06-17 16:58 Bborie Park + + * [r9922] NEWS, raster/rt_core/rt_api.c, + raster/test/regress/rt_summarystats.sql, + raster/test/regress/rt_summarystats_expected: Fix division by + zero in ST_ApproxSummaryStats and the situation where + band is empty. Added regression tests for both situations. Ticket + is + +2012-06-16 17:47 Regina Obe + + * [r9921] doc/installation.xml: #1868 put link to user contributed + install guides (more nicely organized than the dev one) + +2012-06-15 21:58 Bborie Park + + * [r9914] raster/test/regress/rt_clip_expected: Fixed expected + output. Ticket is #1848 + +2012-06-15 15:29 Bborie Park + + * [r9912] raster/test/regress/rt_clip.sql: Additional sorting of + rt_clip regression test. Ticket is #1848 + +2012-06-15 15:16 Bborie Park + + * [r9911] raster/rt_pg/rt_pg.c: Make the sql in rtpg_getSR slightly + more flexible when handling + auth_name and auth_srid. + +2012-06-14 15:25 Sandro Santilli + + * [r9907] NEWS, topology/sql/populate.sql.in.c, + topology/test/regress/topogeo_addlinestring.sql, + topology/test/regress/topogeo_addlinestring_expected, + topology/test/regress/topogeo_addpoint.sql, + topology/test/regress/topogeo_addpoint_expected, + topology/test/regress/topogeo_addpolygon.sql, + topology/test/regress/topogeo_addpolygon_expected: Catch invalid + topology name passed to topogeo_add* (#1867) + +2012-06-13 18:27 Sandro Santilli + + * [r9905] NEWS, utils/postgis_restore.pl.in: Don't strip comment + lines in the middle of COPY commands (#1865) + + Patch by J Smith + +2012-06-12 17:28 Sandro Santilli + + * [r9903] NEWS, topology/topology.sql.in.c: Move sqldefine include + on top of the file (#1822) + +2012-06-12 13:04 Sandro Santilli + + * [r9900] NEWS, postgis/geography.sql.in.c, + postgis/postgis.sql.in.c: Only show readable relations in + metadata tables (#1813) + + Affects both geometry_columns and geography_columns. + No easy way to put this under automated regression testing. + +2012-06-12 12:29 Sandro Santilli + + * [r9898] topology/test/regress/st_changeedgegeom.sql, + topology/test/regress/st_changeedgegeom_expected: Add test for + #1774 + +2012-06-12 12:17 Sandro Santilli + + * [r9897] NEWS, topology/sql/sqlmm.sql.in.c: Clearer error on + setting an edge geometry to an invalid one (#1774) + +2012-06-12 10:46 Sandro Santilli + + * [r9895] NEWS, topology/test/regress/validatetopology.sql, + topology/test/regress/validatetopology_expected, + topology/topology.sql.in.c: Drop temporary table at end of + ValidateTopology (#1797) + +2012-06-12 08:29 Regina Obe + + * [r9890] regress/regress.sql: part fix for #1860 ST_SRID not + unique + +2012-06-12 07:56 Sandro Santilli + + * [r9888] NEWS, doc/Makefile.in: Install comments when available, + even withouth XSLTPROC (#1779) + +2012-06-11 18:29 Sandro Santilli + + * [r9886] GNUmakefile.in: Also _build_ comments when possible + (#1779) + +2012-06-11 18:25 Sandro Santilli + + * [r9885] GNUmakefile.in: Install comments, if possible, as part of + "make install" (#1779) + +2012-06-11 15:47 Bborie Park + + * [r9880] raster/rt_pg/rtpostgis_drop.sql.in.c: Added DROP + statements for st_intersection variants that are not present + in 2.0. Ticket is #1749 + +2012-06-11 11:48 Regina Obe + + * [r9876] doc/installation.xml: #1815 put a big warning about this + unexpected behavior when trying to explicitly backup tables that + are part of an extension + +2012-06-11 09:01 Sandro Santilli + + * [r9874] postgis/postgis_module.c: Revert "Optionally enable + GEOS-3.4 interruptibility (#1802)" + + This reverts r9850 + +2012-06-10 06:26 Regina Obe + + * [r9873] doc/extras_topology.xml, doc/installation.xml, + doc/reference_accessor.xml, doc/reference_management.xml, + doc/reference_processing.xml, doc/reference_raster.xml, + doc/using_raster_dataman.xml: #1859 commit doc corrections from + Kashif Rasul and other corrections + +2012-06-08 17:16 Regina Obe + + * [r9870] regress/loader/MultiToSinglePoint-w.select.expected, + regress/loader/MultiToSinglePoint.select.expected, + regress/loader/MultiToSinglePoint.select.sql, + regress/loader/NotReallyMultiPoint-w.select.expected, + regress/loader/NotReallyMultiPoint.select.expected, + regress/loader/NotReallyMultiPoint.select.sql: snaptogrid to get + rid of false failures on mingw-64 resulting from single digit + rounding differences + +2012-06-08 14:37 Regina Obe + + * [r9869] extensions/compute_srid_contiguous_ranges.sql, + extensions/postgis/sql_bits/mark_editable_objects.sql.in: #1834 + don't include in database backup spatial_ref_sys records we + package. + +2012-06-08 12:44 Mark Cave-Ayland + + * [r9866] loader/shp2pgsql-cli.c: Rename references to -r to -s in + shp2pgsql-cli.c and also move argument combination validation to + a separate phase. + + This is based upon a report from Lauri Kajan who was having + issues using -D and -s TO_SRID on Windows. + +2012-06-08 11:43 Sandro Santilli + + * [r9864] NEWS, topology/sql/sqlmm.sql.in.c, + topology/test/regress/st_addedgemodface.sql, + topology/test/regress/st_addedgemodface_expected, + topology/test/regress/st_addedgenewfaces.sql, + topology/test/regress/st_addedgenewfaces_expected: Fix failure to + detect endpoint mismatch in ST_AddEdge*Face* (#1857) + + Affects calls with start_node = end_node and matching start + point. + +2012-06-08 11:13 Sandro Santilli + + * [r9863] topology/sql/sqlmm.sql.in.c: Remove unused variables + +2012-06-07 15:58 Bborie Park + + * [r9859] raster/test/regress/rt_clip.sql, + raster/test/regress/rt_clip_expected, + raster/test/regress/rt_mapalgebraexpr.sql, + raster/test/regress/rt_mapalgebraexpr_expected: Tweaked rt_clip + queries to have the output ordered. Changed the round() + call to a ceil() call due to the question of rounding 27.5 (is it + 28 or + 27?). Ticket is 1848. + +2012-06-06 15:27 Paul Ramsey + + * [r9853] NEWS, spatial_ref_sys.sql: Wrong parameters for EPSG:3844 + in spatial_ref_sys (#1851) + +2012-06-06 10:53 Sandro Santilli + + * [r9850] postgis/postgis_module.c: Optionally enable GEOS-3.4 + interruptibility (#1802) + + Off by default. Allows easy testing by enabling it at + compile-time. + Tests welcome: see top of postgis/postgis_module.c for + instructions. + +2012-06-06 09:04 Sandro Santilli + + * [r9849] NEWS: NEWS indent style + +2012-05-31 05:48 Bborie Park + + * [r9839] raster/rt_core/rt_api.c, raster/rt_core/rt_api.h: + Explicit error message when dimensions requested exceeds the + maximum + permitted of a raster. + +2012-05-31 03:35 Regina Obe + + * [r9833] regress/regress_bdpoly.sql, + regress/regress_bdpoly_expected: #1812 buildarea regress fails on + mingw because polygons are different order. Use st_equals for + check instead + +2012-05-25 18:16 Bborie Park + + * [r9822] raster/rt_core/rt_api.c, raster/test/core/testapi.c: Code + cleanup related to rt_band_load_offline_data() + +2012-05-25 15:20 Sandro Santilli + + * [r9820] liblwgeom/lwgeom_geos.c: Handle exceptions from + GEOSUnionCascaded() in LWGEOM_GEOS_buildArea + +2012-05-23 22:51 Bborie Park + + * [r9815] raster/loader/raster2pgsql.c: Fixed GDALDriverH * to + GDALDriverH. + +2012-05-23 22:37 Bborie Park + + * [r9814] raster/loader/raster2pgsql.c: Use GDALIdentifyDriver() to + detect whether or not a raster is supported + by raster2pgsql. Thanks to rouault for the suggestion + +2012-05-23 17:26 Bborie Park + + * [r9808] NEWS, raster/loader/raster2pgsql.c: Correct when to + compute number of tiles. Ticket is #1840 + +2012-05-23 16:38 Bborie Park + + * [r9807] NEWS, raster/loader/raster2pgsql.c: Add support for + GeoTIFF subdatasets. Ticket is #1839 + +2012-05-23 07:01 Regina Obe + + * [r9806] doc/reference_raster.xml: add some missing band type to + text casts to prevent ambiguous function -- noted by alibo -- + http://irclogs.geoapt.com/postgis/%23postgis.2012-05-20.log + +2012-05-23 03:26 Regina Obe + + * [r9804] NEWS: add some missing entries + +2012-05-21 14:47 Sandro Santilli + + * [r9767] authors.svn: UTF8 author names + +2012-05-21 09:37 Paul Ramsey + + * [r9762] .: Branch 2.0 + +2012-05-21 09:36 Paul Ramsey + + * [r9761] Accept PostGIS 1.5 WKB type numbers in WKB parser (#1807) + +2012-05-21 08:05 Paul Ramsey + + * [r9760] Revert #1830 + +2012-05-20 09:27 Paul Ramsey + + * [r9759] loader dumper / gui About have version correct credits + (#1743) + +2012-05-20 09:17 Paul Ramsey + + * [r9758] the pgsql2shp tool should qualify its query against + pg_class to ensure it gets the correct table to dump (#1814) + + +2012-05-20 08:21 Paul Ramsey + + * [r9757] News update + +2012-05-20 08:20 Paul Ramsey + + * [r9756] pgsql2shp fix for "XInvalid endian flag value + encountered" on PostgreSQL 9.2 (#1830) + +2012-05-20 07:31 Paul Ramsey + + * [r9754] Update NEWS with some bug fixes + +2012-05-18 09:59 Sandro Santilli + + * [r9753] Fix uninitialized read in GeoJSON parser (#1829) + +2012-05-17 13:37 Sandro Santilli + + * [r9750] Last bugfix item... + +2012-05-17 13:36 Sandro Santilli + + * [r9749] Do not compare uninitialized memory (#1825) + + May fix prepared geometry cache sub-uses (misses) + +2012-05-17 12:27 Sandro Santilli + + * [r9748] Fix topology loader against PostgreSQL 9.2 (#1822) + +2012-05-17 12:10 Paul Ramsey + + * [r9747] configure enabling extension reads 9.1 even on 9.2 + (#1821) + +2012-05-17 11:59 Paul Ramsey + + * [r9746] Put back 900913 srid (#1805) + +2012-05-17 11:54 Paul Ramsey + + * [r9744] Error in empty short circuit (#1828) + +2012-05-17 11:47 Sandro Santilli + + * [r9743] Link lwgeom_normalize change to its ticket #1812 + +2012-05-17 11:45 Sandro Santilli + + * [r9742] Add lwgeom_normalize in LIBLWGEOM, use in cu_buildarea + tester + +2012-05-16 19:39 Sandro Santilli + + * [r9741] Use the proper function to release returns from GEOS. + +2012-05-16 19:39 Sandro Santilli + + * [r9740] Cleanly handle database creation error + +2012-05-16 18:50 Bborie Park + + * [r9739] Updated to note bug #1819 + +2012-05-16 18:47 Bborie Park + + * [r9738] Added ST_Raster2WorldCoord and ST_World2RasterCoord + functions to consume + RASTER_rasterToWorldCoord and RASTER_worldToRasterCoord + functions. + Refactored existing ST_Raster2WorldCoord(X|Y) and + ST_World2RasterCoord(X|Y) functions to call new functions + +2012-05-16 18:47 Bborie Park + + * [r9737] Addition of RASTER_rasterToWorldCoord and + RASTER_worldToRasterCoord + functions + +2012-05-16 15:16 Bborie Park + + * [r9736] Additional lower-casing of language for PostgreSQL 9.2 as + per r9735 + +2012-05-16 08:29 Regina Obe + + * [r9735] #1820 part fix 9.2 language is case sensitive if quoted + -- change 'C' and 'SQL' to 'c' and 'sql' + +2012-05-14 23:28 Bborie Park + + * [r9734] Addition of some commented code. Might be useful if an + option is added + to output the VRTs used in the process of loading rasters + +2012-05-14 23:28 Bborie Park + + * [r9733] Changed function parameter datatypes from uint16_t to int + to better + handle out-of-range values + +2012-05-10 07:24 Sandro Santilli + + * [r9732] Cleanup new BuildArea code, add profiling prints (#1806) + +2012-05-09 12:08 Sandro Santilli + + * [r9731] Significatively speedup BuildArea with complex input + (#1806) + + Affects ST_BuildArea, ST_MakeValid and ST_GetFaceGeometry. + + Replaces the iterated SymDifference used since 2005 with a more + scalable algorithm. The new algorithm removes from the + polygonized + result all polygons whose rings are known to be already + represented + by holes or shells of other polygons and finally runs a single + overlay operation (unary union). + + With the case attached to ticket #1806, ST_BuildArea completes + within 12 seconds using the new code while it takes 27 _minutes_ + with the old. Both versions return the same result (according to + ST_Equals). + +2012-05-09 12:08 Sandro Santilli + + * [r9730] Add unit test for lwgeom_buildarea (useful for #1806) + +2012-05-08 16:47 Sandro Santilli + + * [r9729] ST_BuildArea: arrange polygonized output reducing overlay + cost (#1806) + + By running SymDifference against items with less points first we + reduce the overall cost (output vertices tend to always grow). + +2012-05-08 16:47 Sandro Santilli + + * [r9728] Make ST_MakeValid tests immune by coordinates order + (using ST_Equals) + +2012-05-08 16:47 Sandro Santilli + + * [r9727] Cross reference ST_BuildArea with ST_MakePolygon + +2012-05-07 11:50 Regina Obe + + * [r9725] who is in charge of QA here? 1.5.4 completely missing + from trunk + +2012-05-07 07:08 Sandro Santilli + + * [r9723] postgis_raster_lib_version is also in rtpostgis.sql, not + topology.sql + +2012-05-07 06:58 Sandro Santilli + + * [r9722] postgis_raster_scripts_installed is in rtpostgis.sql, not + topology.sql + +2012-05-05 13:06 Paul Ramsey + + * [r9717] README Installation error (#1804) + +2012-05-04 15:12 Sandro Santilli + + * [r9716] Sort bugfixes by ticket number, add an item for #1802 + +2012-05-04 11:21 Sandro Santilli + + * [r9715] Turn custom allocators into an occasion for interruption + (#1802) + + This change allows interrupting any function at allocation time. + Doesn't allow interrupting loops not invoking custom allocators + (includes GEOS, so far). + +2012-05-04 08:06 Sandro Santilli + + * [r9712] Protect ST_Segmentize from max_length=0 (#1799) + +2012-05-04 02:54 Bborie Park + + * [r9710] Additional refactoring of rtpg_getSR(). + +2012-05-04 02:54 Bborie Park + + * [r9709] Additional fixups in rtpg_getSR() for better handling of + spatial_ref_sys. + Also inclusion of several regression tests to stress + rtpg_getSR(). + +2012-04-30 17:27 Paul Ramsey + + * [r9705] Restrict the coverage of the geography polar interesction + slightly. + +2012-04-30 00:35 Regina Obe + + * [r9698] update stats + +2012-04-30 00:22 Regina Obe + + * [r9697] drop_state_tables_generate_script state arg misnamed as + address instead of param_state + +2012-04-26 20:32 Sandro Santilli + + * [r9685] Add note about clang build fix (#1694) + +2012-04-26 20:26 Sandro Santilli + + * [r9684] Fix wrong ticket reference + +2012-04-26 20:10 Sandro Santilli + + * [r9683] Fix false edge-node crossing report in ValidateTopology + (#1625) + +2012-04-26 16:30 Sandro Santilli + + * [r9682] Give ST_Azimuth a chance with close but distinct points + (#1791) + +2012-04-25 22:36 Regina Obe + + * [r9679] meida /print wasn't working on all cheatsheets because + too specific. + +2012-04-25 20:04 Paul Ramsey + + * [r9678] AddGeometryColumns allow dims = 0 (#1573) + +2012-04-25 19:41 Sandro Santilli + + * [r9675] Fix toTopoGeom handling of duplicated primitives (#1790) + +2012-04-25 18:49 Paul Ramsey + + * [r9669] st_dwithin(geog, geog, 0) doesn't work (#1264) + +2012-04-25 17:54 Paul Ramsey + + * [r9666] Forward port test from #1170 + +2012-04-24 22:05 Regina Obe + + * [r9663] don't underline and color hyperlinks in print mode + +2012-04-24 20:02 Paul Ramsey + + * [r9662] run_test hangs on MSYS (#1788) + +2012-04-24 19:56 Paul Ramsey + + * [r9661] run_test hangs on MSYS (#1788) + +2012-04-24 19:12 Sandro Santilli + + * [r9660] Azimuth on the 9th hour of the clock is 3PI/2, not 3PI/4 + (thanks ij) + +2012-04-24 17:58 Paul Ramsey + + * [r9659] libjson configure test doesn't include support for DLL + (#1787) + +2012-04-24 15:37 Sandro Santilli + + * [r9657] Hush debugging in ST_DumpPoints + +2012-04-24 09:16 Sandro Santilli + + * [r9656] liblwgeom depends on postgis_config.h and + postgis_svn_revision.h (#1786) + +2012-04-24 09:16 Sandro Santilli + + * [r9655] Fix deps of postgis on postgis_svn_revision.h, pgcommon + and lwgeom + +2012-04-23 05:48 Regina Obe + + * [r9654] make igst index link tag friendly and provide example of + nd index. + +2012-04-20 16:13 Bborie Park + + * [r9653] Added note related to overviews not being aligned though + the source + rasters are aligned for specific overview factors. + +2012-04-20 14:50 Bborie Park + + * [r9652] Added ticket #1782 to NEWS. Updated contributors section. + +2012-04-20 03:28 Paul Ramsey + + * [r9651] Fix incorrect call to geom->type where geom->flags is + needed + +2012-04-20 03:23 Paul Ramsey + + * [r9650] st_isclosed() doesn't return false for unclosed POLYGONS + only LINESTRINGS (#1756) + +2012-04-19 15:24 Bborie Park + + * [r9649] Removed emptry string check that prevented use of + proj4text or srtext in + rtpg_getSR(). Ticket is #1782 + +2012-04-19 15:23 Bborie Park + + * [r9648] minor comments changed + +2012-04-18 19:21 Bborie Park + + * [r9647] Fix handling of tuples as described in #1782 + +2012-04-16 20:06 Bborie Park + + * [r9645] Replaced testing of two rasters' geotransform matrix with + alignment test + +2012-04-15 15:47 Mark Cave-Ayland + + * [r9644] Fix #1468: shp2pgsql-gui table column schema get shifted + + A couple of copy/paste errors meant that the update handler was + being invoked + a second time on the loader shapefile column name, rather than + just once on + the schema column. + +2012-04-15 15:46 Mark Cave-Ayland + + * [r9643] shp2pgsql-gui: don't allow the user to edit the schema + name in the listview. + + This brings the behaviour in line with that of the table name, + and since + these entries are generated from the table selector there should + be no + need to do this. + +2012-04-13 21:14 Sandro Santilli + + * [r9642] Regress-test ST_ChangeEdgeGeom with 2-vertext target + (#1775) + + This case was actually fixed by previous commit + (ST_SymDifference) + +2012-04-13 21:04 Sandro Santilli + + * [r9641] fix ST_SymDifference(empty, geom) to return geom (#1776) + +2012-04-13 14:32 Sandro Santilli + + * [r9640] Give more detail on topology editing function exception + +2012-04-12 14:09 Sandro Santilli + + * [r9639] Use an SQLPP command for pre-processing SQL files (#1694) + + The SQLPP command is figured at ./configure time. + It will use cpp(1) or gpp(1) if any is found in that order or + fallback to whatever CPP expands to (usually the compiler with + -E) + +2012-04-12 14:09 Sandro Santilli + + * [r9638] Use more compatible '#define' syntax + +2012-04-12 10:51 Sandro Santilli + + * [r9637] Do not assume ndims check statements are fully qualified + (#1708) + +2012-04-12 10:28 Sandro Santilli + + * [r9636] Automate test for toTopoGeom usage with custom + search_path (#1763) + +2012-04-12 10:28 Sandro Santilli + + * [r9635] Do not consider RESET outputs + +2012-04-12 10:06 Sandro Santilli + + * [r9634] Rephrase item for about topology functions and full + qualification + +2012-04-12 07:21 Sandro Santilli + + * [r9630] Fix NaN from ptarray_locate_point with zero-length lines + (#1772) + +2012-04-12 07:21 Sandro Santilli + + * [r9629] Fix comment doc about lwline_split_by_point_to + +2012-04-11 19:20 Sandro Santilli + + * [r9628] Add note about ST_RemEdgeModFace and ST_RemEdgeNewFace + fix (#1766) + +2012-04-11 19:17 Sandro Santilli + + * [r9627] Don't let ST_RemEdge* destroy TopoGeometry objects + (#1766) + +2012-04-11 12:37 Sandro Santilli + + * [r9626] Add note aboute #1714 bugfix + +2012-04-11 12:37 Sandro Santilli + + * [r9625] Cleanup lines after (bad) snapping (#1714) + +2012-04-10 17:26 Sandro Santilli + + * [r9624] Have ST_ModEdgeSplit and ST_NewEdgesSplit to use ST_Spit + (#1715) + +2012-04-10 15:51 Sandro Santilli + + * [r9623] Call config.status if liblwgeom.h.in newer than + liblwgeom.h (#1691) + +2012-04-10 10:20 Sandro Santilli + + * [r9622] Add bug fixes committed so far in the 2.0 branch + +2012-04-10 00:20 Regina Obe + + * [r9621] #1759 transform functionality doesn't work if you have + raster installed. + +2012-04-09 22:44 Bborie Park + + * [r9620] Added handling of subdatasets coming from NetCDF, HDF4 + and HDF5. + Associated ticket is #1761. + +2012-04-08 10:00 Sandro Santilli + + * [r9619] Fully qualify calls to topology functions (#1763) + +2012-04-07 02:05 Regina Obe + + * [r9618] #1757 -- change in behavior of ST_3Dlength_spheroid not + noted and changed name incorrectly stated. + +2012-04-06 12:38 Regina Obe + + * [r9617] hyperlink function names to section in online manual + +2012-04-05 18:35 Chris Hodgson + + * [r9616] updated version number in pom.xml + +2012-04-05 18:25 Paul Ramsey + + * [r9615] Geometry has Z dimension but column does not (#1755) + +2012-04-05 18:22 Paul Ramsey + + * [r9614] Send an "unknown" typmod into gserialized constructor + from ST_GeographyFromText (#1755) + +2012-04-05 09:11 Sandro Santilli + + * [r9613] Allow for 1.#INF to be threated as Inf (#1736) + +2012-04-05 09:11 Sandro Santilli + + * [r9612] Threat Infinite and 1.#INF the same (#1736) + +2012-04-05 08:56 Sandro Santilli + + * [r9611] Drop java/pljava dir (#1411) + +2012-04-05 08:54 Sandro Santilli + + * [r9610] Do not mention pljava, it's gone (#1411) + +2012-04-05 00:27 Bborie Park + + * [r9609] Fixed missing SVN revision tag in raster2pgsql's help + +2012-04-04 21:49 Sandro Santilli + + * [r9608] Add note about topology.Polygonize not doing edge linking + +2012-04-04 21:49 Sandro Santilli + + * [r9607] Tabs to spaces + +2012-04-03 19:26 Paul Ramsey + + * [r9606] Update release date for 2.0.0 (TODO more readable release + notes) + +2012-04-03 19:24 Paul Ramsey + + * [r9604] Set up for 2.0.1 + +2012-04-03 19:22 Paul Ramsey + + * [r9602] Prep for 2.0.0 + +2012-04-03 18:46 Bborie Park + + * [r9601] Fix error message + +2012-04-03 18:29 Sandro Santilli + + * [r9600] Use full URL to trac query + +2012-04-03 18:24 Paul Ramsey + + * [r9599] Add extensions + +2012-04-03 18:21 Paul Ramsey + + * [r9598] Convert text to UTF8 + +2012-04-03 18:10 Paul Ramsey + + * [r9597] Final answer? + +2012-04-03 17:46 Paul Ramsey + + * [r9596] rewrite breaking section + +2012-04-03 17:34 Paul Ramsey + + * [r9595] More minor edits + +2012-04-03 17:27 Sandro Santilli + + * [r9594] Add ST_Node item + +2012-04-03 17:25 Paul Ramsey + + * [r9593] Minor reorg of NEWS, more to come + +2012-04-03 12:05 Sandro Santilli + + * [r9592] Write CREATE TYPE as expected by postgis_proc_upgrade.pl + (#1746) + + The script expects CREATE TYPE to spawn multimultiple lines ... + +2012-04-03 12:05 Sandro Santilli + + * [r9591] Add note about input noding for ST_Polygonize and + ST_BuildArea + +2012-04-01 20:19 Paul Ramsey + + * [r9590] Update changelog on trunk + +2012-04-01 20:16 Paul Ramsey + + * [r9586] Version bumps for RC2 + +2012-03-31 16:26 Bborie Park + + * [r9585] Minor tweak to message regarding GEOS < 3.3 + +2012-03-30 22:40 Paul Ramsey + + * [r9584] Comment out noise in the GEOS 3.2 case. (#1740) + +2012-03-30 14:17 Mark Cave-Ayland + + * [r9583] Make sure that we clear any previously selected files + when (re)opening the import file selector in the shapefile GUI. + +2012-03-30 14:17 Mark Cave-Ayland + + * [r9582] Fix #1741: Build error --with-gui, gtk problem. + + Older versions of GTK (< 2.14.0) don't have + gtk_dialog_get_content_area(). Work + around this by providing a compatibility #define for these older + GTK versions. + +2012-03-30 08:36 Sandro Santilli + + * [r9581] Have BuildArea catch exception from GEOSSymDifference + (#1738) + +2012-03-29 21:52 Paul Ramsey + + * [r9578] wrong proj4text in spatial_ref_sys for SRID 31300 and + 31370 (#1389) + +2012-03-29 12:37 Sandro Santilli + + * [r9577] Fix crash on NULL item in ND index (#1734) + + Add regression testing for the case + +2012-03-28 23:12 Paul Ramsey + + * [r9575] make install doesn't install postgis_restore.pl (#1732) + +2012-03-28 22:59 Paul Ramsey + + * [r9572] Bump versions for 2.0.0rc1 release + +2012-03-28 14:02 Sandro Santilli + + * [r9570] Strip schemas from search_path as part of uninstall + procedures + +2012-03-28 12:40 Sandro Santilli + + * [r9569] Reduce extensions requirements (#1724) + + Build extensions even w/out topology, and even w/out xsltproc if + comments are already built. + +2012-03-28 11:36 Sandro Santilli + + * [r9568] Fix GetGopoGeomElementArray code (#1730) + + Includes regression testing for both GetGopoGeomElements + and GetGopoGeomElementArray + +2012-03-28 09:19 Sandro Santilli + + * [r9567] Add regression test for GiST index crash on empty (#1697) + + Also tests you can query all empty items from an index + +2012-03-28 08:22 Sandro Santilli + + * [r9563] Fix crash in n-dimensional GiST index on EMPTY geoms + (#1697) + + This is Paul's patch with the unrelated btree changes removed and + the memset removed too. + +2012-03-27 23:39 Regina Obe + + * [r9562] detail how to use create extension .. from unpackaged + +2012-03-27 23:17 Regina Obe + + * [r9561] #1727 this will make statements like CREATE EXTENSION + postgis FROM unpackaged; CREATE EXTENSION postgis_topology FROM + unpackaged; work. It's sadly static at the moment. + +2012-03-27 22:05 Bborie Park + + * [r9560] Added robustness checking that GDAL supports spatial + reference text from + spatial_ref_sys table + +2012-03-27 19:25 Bborie Park + + * [r9559] Merge branch 'master' into HEAD + +2012-03-27 18:14 Sandro Santilli + + * [r9558] Have uninstall scripts drop created schemas, regress test + it + +2012-03-27 17:30 Sandro Santilli + + * [r9557] Wrap most topology.sql into a transaction + + CREATE SCHEMA is left out because uninstall_topology isn't + getting + rid of it (to be fixed later) + +2012-03-27 17:06 Sandro Santilli + + * [r9556] Do not mess with search_path when installing comments + (#1723) + +2012-03-27 14:47 Sandro Santilli + + * [r9555] Update extensions/README (#1720) + + - reStructuredText Markup, 80 column text + - Rewrite several paragraphs + - Add requirements section + - Make it clear that --with-raster is required, and that postgis + also + includes the raster support + + Patch by Mike Toews + +2012-03-27 14:32 Sandro Santilli + + * [r9554] Accept POINT types in ST_MakeValid (#1719) + +2012-03-27 10:51 Sandro Santilli + + * [r9553] 80 cols wrap for pgsql2shp help screen (#1722) + + Patch by Mike Toews + +2012-03-27 09:56 Sandro Santilli + + * [r9552] Update doc/README (#1721) + + - reStructuredText Markup, 80 column text limit + - Structure the make targets using definition lists + - It turns out that graphviz is required for make doxygen + + Patch by Mike Toews + +2012-03-27 07:01 Sandro Santilli + + * [r9551] Drop pljava (#1411) + +2012-03-27 02:08 Regina Obe + + * [r9550] #1693, #1704 - twofer - change DROP AGGREGATE and DROP + VIEW to be DROP .. IF EXISTS + +2012-03-27 01:16 Regina Obe + + * [r9549] minor typo correction + +2012-03-26 16:23 Mark Cave-Ayland + + * [r9548] Rework code from r9204 (bug #900: shp2pgsql: a switch to + drop M from 4d imports) to fix bug #1710: shp2pgsql -t option is + not working properly. + + The original implementation set the has_z/has_m flags directly + based upon the -t parameter; however this lost the information + as to how many dimensions were specified. Resolve this by + specifying a new force_output configuration variable and setting + it to an enumerated constant, so that we can then implement a + simple switch() to set both the output dimension and output + flags correctly. + +2012-03-26 16:23 Mark Cave-Ayland + + * [r9547] Remove istypeM state variable from loader as it isn't + used anymore. + +2012-03-26 16:23 Mark Cave-Ayland + + * [r9546] Improve readability in the loader by fixing various + whitespace issues. + +2012-03-26 13:18 Regina Obe + + * [r9545] change example for totopogeom + +2012-03-26 13:17 Sandro Santilli + + * [r9544] Wrap within 80 cols + +2012-03-26 12:26 Regina Obe + + * [r9543] Add an example for toTopoGeom + +2012-03-23 23:46 Paul Ramsey + + * [r9542] Updates for 2.0 + +2012-03-23 23:00 Sandro Santilli + + * [r9541] Add topology validity checking (extra paranoia) + +2012-03-23 22:54 Sandro Santilli + + * [r9540] Do not abuse ST_Snap for tweaking edge endpoints (#1706) + +2012-03-23 22:23 Sandro Santilli + + * [r9539] Enhance edge splitting robustness (#1711) + +2012-03-23 21:07 Paul Ramsey + + * [r9538] Skip over geodetic check for empty geometries. + +2012-03-23 19:14 Paul Ramsey + + * [r9537] Allow build to work under DEBUG=5 + +2012-03-23 17:08 Sandro Santilli + + * [r9536] Add debugging lines to sqlmm edge splitting functions + +2012-03-23 15:11 Sandro Santilli + + * [r9535] Add missing ticket reference to it's regression test + +2012-03-23 13:16 Pierre Racine + + * [r9534] Made the red color for parameters a bit darker... + +2012-03-23 13:09 Regina Obe + + * [r9533] flesh out upgrade a bit. + +2012-03-23 07:54 Regina Obe + + * [r9532] make variables names red to stand out better + +2012-03-22 17:24 Paul Ramsey + + * [r9531] Update regression to handle new collection(empty) + possibilities + +2012-03-22 16:55 Paul Ramsey + + * [r9530] Parse error on WKT for multi with empty elements (#1703) + +2012-03-22 15:07 Sandro Santilli + + * [r9529] Add collapsed polygon case to ST_Simplify test (#1698) + +2012-03-22 15:07 Sandro Santilli + + * [r9528] Add a ptarray_simplify parameter to preserve min vertices + (#1698) + + A polygon ring collapsed to a segment is still better handled by + mapnik than the same ring collapsed to a single point. This + commit + retains at least 3 vertices for polygons. + +2012-03-22 15:06 Sandro Santilli + + * [r9527] Do not drop collapsed polygon shells (#1698) + +2012-03-22 13:33 Regina Obe + + * [r9526] missing para tag + +2012-03-22 13:29 Regina Obe + + * [r9525] explain geometry_columns is now a view and that spatial + tables can be created in 1 step. + +2012-03-22 13:02 Regina Obe + + * [r9524] more expounding on typmod vs. constraint based geometry + columns + +2012-03-21 21:36 Paul Ramsey + + * [r9523] Change @rm to rm for visibility + +2012-03-21 20:32 Paul Ramsey + + * [r9522] Make distclean should remove all the Makefile's generated + by ./configure + +2012-03-21 20:03 Paul Ramsey + + * [r9519] Bump versions for beta4 + +2012-03-21 18:22 Paul Ramsey + + * [r9518] Ignore some files + +2012-03-19 20:40 Paul Ramsey + + * [r9517] README.raster needs updating or removal (#1649) + +2012-03-19 12:07 Sandro Santilli + + * [r9516] ST_SnapToGrid: retain type on empty return (#1695) + +2012-03-16 19:13 Sandro Santilli + + * [r9515] Fix typo puffered -> buffered + +2012-03-16 19:11 Sandro Santilli + + * [r9514] Be quieter on polygon ring collapse (in ST_Simplify) + +2012-03-16 15:03 Regina Obe + + * [r9513] fix typo in example was adding band 1 twice + +2012-03-16 12:58 Regina Obe + + * [r9512] surreal clipping + +2012-03-16 12:47 Regina Obe + + * [r9511] slightly more efficient (and hmm my last timing was with + 2 buildings instead of 3) + +2012-03-16 12:40 Regina Obe + + * [r9510] minor adjustment to example + +2012-03-16 12:25 Regina Obe + + * [r9509] Provide summarizing summary stats example using + intersection of geometry. Pretty fast. + +2012-03-16 12:15 Sandro Santilli + + * [r9508] Rename legacy_compatibility_layer.sql to + legacy_minimal.sql + + As per + http://postgis.refractions.net/pipermail/postgis-devel/2012-March/019663.html + +2012-03-16 11:58 Sandro Santilli + + * [r9507] Do not take PROJ4 errno value as a sign of error (#1580, + #1690) + + Dejavu... + +2012-03-16 08:48 Regina Obe + + * [r9506] Add more descriptive notes detailing difference between + files + +2012-03-16 08:27 Regina Obe + + * [r9505] fix spelling typos + +2012-03-16 06:59 Regina Obe + + * [r9504] Put in a section for crowd sourcing campaigns + +2012-03-15 09:54 Sandro Santilli + + * [r9503] Bail out if user specified json dir isn't correct (#1688) + +2012-03-14 21:45 Regina Obe + + * [r9502] put note about slowness of raster st_union and promise it + will be better in later versions + +2012-03-14 21:35 Regina Obe + + * [r9501] change example to be more efficient (prior version was + taking 9-10 seconds this much improved one takes 3.5 seconds) + +2012-03-14 20:26 Bborie Park + + * [r9500] Updated to have C API tests use libtool + +2012-03-14 19:05 Bborie Park + + * [r9499] Use AC_SEARCH_LIBS instead of AC_CHECK_LIB for checking + GDAL libraries + +2012-03-14 16:35 Sandro Santilli + + * [r9498] Don't re-implement AC_PATH_PROG for gdal-config + +2012-03-14 16:02 Paul Ramsey + + * [r9495] Prepare for 2.0.0beta3 release + +2012-03-14 15:50 Sandro Santilli + + * [r9494] Encode dependency of raster _scripts_ to + postgis_svn_revision.h + +2012-03-14 15:46 Sandro Santilli + + * [r9493] Encode postgis_svn_revision.h dependency for raster lib + +2012-03-14 15:40 Sandro Santilli + + * [r9492] Make sure to rebuild topology.sql on + postgis_svn_revision.h change + +2012-03-14 15:32 Sandro Santilli + + * [r9491] Add a TOPOLOGY and a RASTER label in + postgis_full_version() output + + This is to know if they are available + +2012-03-14 13:13 Sandro Santilli + + * [r9490] Simplify ST_AsLatLonText code and possily fix #1657 + + The possible bug was a call to pg_do_encoding_conversion w/out + a defined string size argument. + +2012-03-14 12:15 Sandro Santilli + + * [r9489] Use existing text2cstring and cstring2text wheel + +2012-03-13 18:06 Bborie Park + + * [r9488] Explicitly set NULL character to snprintf outputs as + Windows does not do so automatically. Ticket is #1682. + +2012-03-13 17:08 Sandro Santilli + + * [r9487] Add simple tests to stringbuffer class (#1668) + + Hopefully these fail on windows so it's easier to test. + It may take a memory debugger to really see the failure. + +2012-03-13 17:08 Sandro Santilli + + * [r9486] Rename misc testsuite to "misc" + +2012-03-13 16:23 Paul Ramsey + + * [r9485] Roll back changes for autodetecting C99 vsnprintf (#1688) + +2012-03-13 16:13 Bborie Park + + * [r9484] Removed "hasnodata" column output of ST_BandMetaData as + per #1681. If a band does NOT have a NODATA value, the + "nodatavalue" column will be NULL. + +2012-03-13 09:18 Sandro Santilli + + * [r9483] Add upgrade instructions + +2012-03-13 09:17 Sandro Santilli + + * [r9482] Drop SRID constraint issue (not an issue anymore with + typmod) + +2012-03-13 09:17 Sandro Santilli + + * [r9481] Add note about toTopoGeom + +2012-03-13 08:33 Sandro Santilli + + * [r9480] Set Version to match Version.config (HOWTO_RELEASE file + mentions you need to edit it anyway) + +2012-03-13 08:30 Sandro Santilli + + * [r9479] Add note about topology/README + +2012-03-13 08:18 Sandro Santilli + + * [r9478] Update README.postgis (#1670) + + - Use consistent formatting in reStructuredText; see + formatted result with rst2pdf or rst2html, or if you don't + want to install docutils, you can copy/paste the text to + http://www.tele3.cz/jbar/rest/rest.html + - Wrap lines to 80 columns, trim trailing whitespace, replace + tabs + with space chars + - Fix typos, and use consistent case and punctuation + - Alphabetize the directory structure + - Add ./libpgcommon to directory structure, and attempt to + describe it + - Arrange style of REQUIREMENTS section a bit more consistent + across components: removing repetition, stating what is required + or optional, etc. + - When referencing PostGIS SQL functions, use the "ST_" prefix, + where applicable + - Mention that both Raster and Topology extensions are built by + default, add notes how build without them + + Patch by Mike Toews + +2012-03-12 21:27 Paul Ramsey + + * [r9477] Complete alternate implementation of vsnprintf, vasprintf + for non-C99 systems. (#1668) + +2012-03-12 17:45 Sandro Santilli + + * [r9476] Fix UTM zone reserved SRID interpretation (#1680) + +2012-03-10 14:33 Sandro Santilli + + * [r9475] Check docs as part of "make check" + + Adds "xmllint" to the requirements for running "make check" + +2012-03-10 14:28 Sandro Santilli + + * [r9474] Introduce use of . I think we should use it + more.. + +2012-03-10 14:28 Sandro Santilli + + * [r9473] typo + +2012-03-10 14:27 Sandro Santilli + + * [r9472] Drop commented out lines + +2012-03-10 14:08 Sandro Santilli + + * [r9471] Add credits to Salvatore + +2012-03-10 14:08 Sandro Santilli + + * [r9470] No allowed after in (xmllint) + -- add Vizzuality credit + +2012-03-10 14:08 Sandro Santilli + + * [r9469] goes before + +2012-03-10 14:08 Sandro Santilli <strk@keybit.net> + + * [r9468] <note> cannot be direct child of <abstract> (xmllint) + +2012-03-10 14:07 Sandro Santilli <strk@keybit.net> + + * [r9467] choice is a <paramdef> attribute, not <type>'s + +2012-03-10 14:07 Sandro Santilli <strk@keybit.net> + + * [r9466] <abstract> can't contain <note> (xmllint) + +2012-03-10 13:44 Sandro Santilli <strk@keybit.net> + + * [r9465] Use empty params as placeholders, add missing refsection + title (xmllint) + +2012-03-10 13:44 Sandro Santilli <strk@keybit.net> + + * [r9464] More <para> wrapping (xmllint) + +2012-03-10 13:44 Sandro Santilli <strk@keybit.net> + + * [r9463] wrap more <informalfigure> content in <para> (xmllint) + +2012-03-10 13:43 Sandro Santilli <strk@keybit.net> + + * [r9462] choice is a <paramdef> attribute, not <type>'s + +2012-03-10 13:43 Sandro Santilli <strk@keybit.net> + + * [r9461] wrap <informalfigure> content in <para> (xmllint) + +2012-03-10 13:43 Sandro Santilli <strk@keybit.net> + + * [r9460] wrap <listitem> content in <para> (xmllint) + +2012-03-10 13:43 Sandro Santilli <strk@keybit.net> + + * [r9459] choice belongs to <paramdef>, not <parameter> (xmllint) + +2012-03-10 13:43 Sandro Santilli <strk@keybit.net> + + * [r9458] <sect1info> goes before <title> + +2012-03-10 13:43 Sandro Santilli <strk@keybit.net> + + * [r9457] <informalfigure> goes in <para> (xmllint) + +2012-03-10 13:42 Sandro Santilli <strk@keybit.net> + + * [r9456] Use <para> as appropriate (xmllint) + +2012-03-10 13:42 Sandro Santilli <strk@keybit.net> + + * [r9455] <informalfigure> must be in <para> (xmllint) + +2012-03-10 13:42 Sandro Santilli <strk@keybit.net> + + * [r9454] Put semicolon where it belongs (xmllint) + +2012-03-10 13:42 Sandro Santilli <strk@keybit.net> + + * [r9453] Use <para> elements according to the DTD (xmllint) + +2012-03-10 13:42 Sandro Santilli <strk@keybit.net> + + * [r9452] <strong> to <emphasis> (xmllint) + +2012-03-10 13:00 Sandro Santilli <strk@keybit.net> + + * [r9451] <filename> is not a valid child of <listitem>, <para> is + (xmllint) + +2012-03-10 12:51 Sandro Santilli <strk@keybit.net> + + * [r9450] More linked -> linkend typos + +2012-03-10 12:10 Sandro Santilli <strk@keybit.net> + + * [r9449] Fix xref (thanks make check) + +2012-03-10 12:07 Sandro Santilli <strk@keybit.net> + + * [r9448] linked -> linkend (thanks make check) + +2012-03-10 11:38 Sandro Santilli <strk@keybit.net> + + * [r9447] Add credit to Avencia (#1671) + +2012-03-10 11:31 Sandro Santilli <strk@keybit.net> + + * [r9446] More credits + +2012-03-10 11:26 Sandro Santilli <strk@keybit.net> + + * [r9445] Add postgis topology signers to credits section (#1601) + + I also formatted the names to be one-per-line. Output won't care + but it's easier to sort alphabetically ... + +2012-03-10 10:34 Sandro Santilli <strk@keybit.net> + + * [r9444] Substitute CREDITS content with pointers to manual + (#1601) + +2012-03-10 10:27 Sandro Santilli <strk@keybit.net> + + * [r9443] Be quiet when postgis_svn_revision.h isn't needed (#1666) + +2012-03-10 00:40 Bborie Park <bkpark at ucdavis.edu> + + * [r9442] Cleanup for testing GDAL include files + +2012-03-10 00:30 Bborie Park <bkpark at ucdavis.edu> + + * [r9441] This should do it. Debugging Hudson is fun... like + entertaining a grumpy old man. + +2012-03-10 00:24 Bborie Park <bkpark at ucdavis.edu> + + * [r9440] Removed multiple AC_ARG_WITH calls for raster + +2012-03-10 00:19 Bborie Park <bkpark at ucdavis.edu> + + * [r9439] Another attempt to fix hudson... + +2012-03-10 00:05 Bborie Park <bkpark at ucdavis.edu> + + * [r9438] Comment cleanup as hudson isn't happy. + +2012-03-09 23:57 Bborie Park <bkpark at ucdavis.edu> + + * [r9437] Fixed GDAL configuration as hudson wasn't getting + GDALFPolygonize. This may be the cause for Windows not detecting + GDALFPolygonize either. + +2012-03-09 19:00 Bborie Park <bkpark at ucdavis.edu> + + * [r9436] Initialize variables that may cause compile-time warnings + in rt_api.c. Added additional NLS items to raster2pgsql. + +2012-03-09 17:46 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9435] Work around difference between behavior of MS snprintf + and C99 snprintf. (#1668) + +2012-03-09 14:59 Regina Obe <lr@pcorp.us> + + * [r9434] minor correction in title of example + +2012-03-09 14:20 Regina Obe <lr@pcorp.us> + + * [r9433] Fix mapalgebra2 syntax + +2012-03-08 10:58 Sandro Santilli <strk@keybit.net> + + * [r9432] Ignore all html files under doc/html/ (also chunked) + +2012-03-08 10:58 Sandro Santilli <strk@keybit.net> + + * [r9431] Give introduction chapter an id. + + This should give it a nice URL online so we can point to credits + from the CREDITS file (#1601) + +2012-03-08 10:36 Sandro Santilli <strk@keybit.net> + + * [r9430] Remove .svnignore files (#1665) + +2012-03-08 10:36 Sandro Santilli <strk@keybit.net> + + * [r9429] Drop .cvsignore files + +2012-03-07 20:51 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9427] Update trunk versions for next cycle + +2012-03-07 20:50 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9425] Update for beta2 release + +2012-03-07 20:47 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9424] Fix need to hack regress source path + +2012-03-07 20:38 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9423] Remove reliance on `pwd` for raster build and test. + +2012-03-07 19:31 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9422] Replace " with ' in mingw pwd call + +2012-03-07 19:27 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9421] MinGW configure for regression dir + +2012-03-07 17:40 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9420] ST_Summary output contains a spurious "+" sign (#1663) + +2012-03-07 11:39 Sandro Santilli <strk@keybit.net> + + * [r9419] Actually run GeoJSON input tests when libjson is + available + +2012-03-07 11:18 Sandro Santilli <strk@keybit.net> + + * [r9418] Report libjson availability from postgis_full_version + (#1660) + + This commit adds a postgis_libjson_version() although the library + doesn't give any version information. We just return NULL if not + using the library and "UNKNOWN" otherwise. + +2012-03-07 10:55 Sandro Santilli <strk@keybit.net> + + * [r9417] Add note about installing json-c library on apt-based + systems + +2012-03-07 09:16 Sandro Santilli <strk@keybit.net> + + * [r9416] Update REQUIREMENTS section, add JSON-C (#1660) + +2012-03-07 08:17 Sandro Santilli <strk@keybit.net> + + * [r9415] I didn't realize we had ST_AsLatLonText already :) + +2012-03-07 05:31 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9414] Crash in ST_Project on NULL input (#1658) + +2012-03-07 04:28 Bborie Park <bkpark at ucdavis.edu> + + * [r9413] Slightly more verbose error message for when + rt_raster_gdal_rasterize() is unable to have an OSR object + project a provided srs text. + +2012-03-06 21:16 Sandro Santilli <strk@keybit.net> + + * [r9412] Update TODO list dropping done items + +2012-03-06 18:55 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9411] Work around default rule for lexer generation. (#1644) + +2012-03-06 16:19 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9410] I'm not sure this "fix" was actually a fix so I'm + removing it. + +2012-03-06 16:16 Sandro Santilli <strk@keybit.net> + + * [r9409] Snap new lines over existing nodes (#1654) + + Also add Salvatore to the list of testing heroes :) + +2012-03-06 13:44 Sandro Santilli <strk@keybit.net> + + * [r9408] Don't let a single collapse hide _all_ edges (#1650) + +2012-03-06 13:21 Sandro Santilli <strk@keybit.net> + + * [r9407] Skip collapsed edges after snapping (#1650) + +2012-03-06 13:20 Sandro Santilli <strk@keybit.net> + + * [r9406] Uncomment new tests for #1641 + +2012-03-06 09:45 Sandro Santilli <strk@keybit.net> + + * [r9405] Have "make install" only install what "make" built + (#1652) + + Also updates the README to be in sync with Makefile.in + +2012-03-06 09:05 Sandro Santilli <strk@keybit.net> + + * [r9404] Fix toTopoGeom to actualy _use_ to given tolerance + (#1647) + +2012-03-05 23:09 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9403] Rename LOADER_OBJS to the more direct SHPLIB_OBJS + +2012-03-05 22:54 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9402] Defines are picked up from ../../postgis_config.h via + ../liblwgeom_internal.h + +2012-03-05 22:51 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9401] Add static link directive to libtool (#1644) allows build + on Debian Wheezy + +2012-03-05 16:45 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9400] Update kneufeld contact info + +2012-03-05 12:24 Sandro Santilli <strk@keybit.net> + + * [r9399] Add GetTopologySRID (#1182) + +2012-03-05 12:14 Sandro Santilli <strk@keybit.net> + + * [r9398] Optimize ST_AddIsoNode (#983) + +2012-03-05 11:33 Sandro Santilli <strk@keybit.net> + + * [r9397] Move topology reference entries from "processing" to + "constructors" + +2012-03-05 11:05 Sandro Santilli <strk@keybit.net> + + * [r9396] _ST_MinTolerance isn't IMMUTABLE, due to db lookup... + +2012-03-05 10:49 Sandro Santilli <strk@keybit.net> + + * [r9395] Handle 0 tolerance by using topology.precision or min + float one + + This handling fixes the #1641 case w/out passing an explicit + tolerance and makes a step toward #785. + +2012-03-05 08:28 Sandro Santilli <strk@keybit.net> + + * [r9394] Fix typos (FUNCION), drop duplicate entries + +2012-03-04 22:35 Regina Obe <lr@pcorp.us> + + * [r9393] put in libiconv path specification if it needs to be + done. For some reason my mingw64 can't find it unless its + explicitly set. + +2012-03-03 22:59 Regina Obe <lr@pcorp.us> + + * [r9392] Link postgis raster contributors to raster funding page. + +2012-03-03 22:56 Regina Obe <lr@pcorp.us> + + * [r9391] add in missing credits and link to Paul's credit + description blog pages. + +2012-03-02 23:35 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9390] Add an SRID to box3d to allow lossless casts. + +2012-03-02 20:53 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r9389] Finish fix for ticket #1635. Added operator function to + skip when restoring. + +2012-03-02 20:17 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r9388] Fix for ticket #1589. Removed misleading example. + +2012-03-02 20:14 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r9387] Fix for ticket #1589. Removed misleading example. + +2012-03-02 19:00 Bborie Park <bkpark at ucdavis.edu> + + * [r9386] Fixed problem with passing PROJ.4 text to GDAL which may + result in SRS WKT that is NOT what is desired. Now preferentially + use EPSG:SRID if available. Ticket is #1618. + +2012-03-02 15:02 Regina Obe <lr@pcorp.us> + + * [r9385] #1630 and drop type raster_columns. Good grief how many + hidden objects are there. + +2012-03-02 14:36 Regina Obe <lr@pcorp.us> + + * [r9384] #1630 Add missing permutations of st_clip that exist in + older versions so trimraster can be renamed to crop + +2012-03-02 14:11 Regina Obe <lr@pcorp.us> + + * [r9383] oops type in last commit. + +2012-03-02 14:05 Regina Obe <lr@pcorp.us> + + * [r9382] #1630 -- this has got to be a bug in the PostgreSQL + extensions model that I have to drop dependent types of views and + types from extension when drop view and type. Will confirm later. + +2012-03-02 13:15 Regina Obe <lr@pcorp.us> + + * [r9381] Add section about soft upgrade with extensions. + +2012-03-02 01:15 Bborie Park <bkpark at ucdavis.edu> + + * [r9380] Add handling of when clamped pixel values is equal to the + band's clamped NODATA value. Ticket is #1139. + +2012-03-01 22:25 David Zwarg <dzwarg@azavea.com> + + * [r9379] Added regression test for error case reported in #1638. + +2012-03-01 22:17 Bborie Park <bkpark at ucdavis.edu> + + * [r9378] Refactored how skewed rasters are computed as the extents + were not correct. Rewrote parts of rt_raster_gdal_warp and + rt_raster_gdal_rasterize. Related ticket is #1615. + +2012-03-01 21:05 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r9377] Fix for #1589 and #1633. + +2012-03-01 20:32 Sandro Santilli <strk@keybit.net> + + * [r9376] postgis_drop_before.sql.in.c => postgis_drop_before.sql + +2012-03-01 19:46 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9375] Make --prefix note a warning rather than a failure. + (#1628) + +2012-03-01 19:09 Sandro Santilli <strk@keybit.net> + + * [r9374] Add an internal topology._st_mintolerance funtion + + This function computes the minimum tolerance for a given + geometry. + It works by computing the smallest floating point difference that + could be expressed on any vertex of the geometry. + + Currently it's only used to workaround the ST_DWithin/ST_Within + inconsistency (#1625) but could probably be used everytime 0 is + passed as a tolerance, possibly fixing #1641 as well. + +2012-03-01 16:47 Bborie Park <bkpark at ucdavis.edu> + + * [r9373] Update regression tests for 1-raster ST_MapAlgebraExpr + due to commit r9371 + +2012-03-01 16:47 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r9372] Fix for ticket #1635. Added explicit ~ and && operators + on raster and geometry. + +2012-03-01 15:59 Bborie Park <bkpark at ucdavis.edu> + + * [r9371] Forced casting of output from 1-raster ST_MapAlgebraExpr. + Ticket is #1639. + +2012-03-01 15:51 Sandro Santilli <strk@keybit.net> + + * [r9370] MathML DTDs are also needed for the HTML + +2012-03-01 15:51 Sandro Santilli <strk@keybit.net> + + * [r9369] added MathML 3 DTD to requirements in doc + +2012-03-01 15:14 Sandro Santilli <strk@keybit.net> + + * [r9368] Add a test for #1641 using a tolerance (1e-16 is good + enough) + +2012-03-01 15:07 Sandro Santilli <strk@keybit.net> + + * [r9367] Add test for #1641 (disabled as it would fail) + +2012-03-01 15:07 Sandro Santilli <strk@keybit.net> + + * [r9366] Cleanup the face table as well (you just can't drop the + universe) + +2012-03-01 12:50 Sandro Santilli <strk@keybit.net> + + * [r9365] Add more items in the skip list (#1640) + +2012-03-01 12:25 Sandro Santilli <strk@keybit.net> + + * [r9364] Add tests for ptarray_insert_point (see #1640) + +2012-03-01 12:25 Sandro Santilli <strk@keybit.net> + + * [r9363] Check args passed to ptarray_set_point4d + +2012-03-01 11:58 Sandro Santilli <strk@keybit.net> + + * [r9362] Drop reference to postgis_uses_stats (#1632) + +2012-03-01 09:16 Sandro Santilli <strk@keybit.net> + + * [r9361] Properly exit the loop parsing spatial_ref_sys population + (#1640) + +2012-03-01 08:54 Sandro Santilli <strk@keybit.net> + + * [r9360] Drop postgis_uses_stats (#1632) + +2012-03-01 08:26 Sandro Santilli <strk@keybit.net> + + * [r9359] Rename drop files to be hopefully clearer, add copyright + headers + +2012-03-01 08:26 Sandro Santilli <strk@keybit.net> + + * [r9358] Stop including drop calls from main postgis.sql file + + Upgrade file is still generated with the drop file included + +2012-02-29 18:58 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9357] make parse location error test a little more lenient + +2012-02-29 18:19 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9354] Update for post-Beta1 + +2012-02-29 18:18 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9353] Update for beta1 + +2012-02-29 15:59 Sandro Santilli <strk@keybit.net> + + * [r9352] Check first point after snapping an edge to a new point + (#1631) + +2012-02-29 14:20 Sandro Santilli <strk@keybit.net> + + * [r9351] Get the deprecated function right (fixes previous commit) + +2012-02-29 14:14 Sandro Santilli <strk@keybit.net> + + * [r9350] Drop removed st_clip function (#1630) + +2012-02-29 13:52 Sandro Santilli <strk@keybit.net> + + * [r9349] Do not install intermediary files (#1621) + +2012-02-29 13:35 Sandro Santilli <strk@keybit.net> + + * [r9348] Don't override postgis_svn_revision.h with a fake + revision (#1634) + +2012-02-29 10:55 Sandro Santilli <strk@keybit.net> + + * [r9347] Stop using postgis_uses_stats() from + postgis_full_version() (#1632) + +2012-02-29 10:48 Sandro Santilli <strk@keybit.net> + + * [r9346] Integrate upgrade tips in postgis_full_version reference + +2012-02-29 10:39 Sandro Santilli <strk@keybit.net> + + * [r9345] Mention rtpostgis_upgrade* and topology_upgrade* in + manual (#1611) + +2012-02-29 10:08 Sandro Santilli <strk@keybit.net> + + * [r9344] Have XSLTPROCFLAGS default to --nonet + + This way you can drop by redefining it as in: make XSLTPROCFLAGS= + +2012-02-29 09:51 Sandro Santilli <strk@keybit.net> + + * [r9343] Add support for a user-defined XSLTPROCFLAGS variable to + append + + Example: make -C doc html XSLTPROCFLAGS=--nonet + + Still defaults to allow net access, I couldn't find an option to + override --nonet with its contraty... + +2012-02-29 09:00 Regina Obe <lr@pcorp.us> + + * [r9342] #1630: Swap the order of dropping - you have to drop the + function first before the type + +2012-02-29 08:44 Regina Obe <lr@pcorp.us> + + * [r9341] #1630: drop wktgeomval type from extension, but still + can't drop because of function _st_dumpaswktpolygons + +2012-02-29 08:04 Regina Obe <lr@pcorp.us> + + * [r9340] #1619: Logic to mark spatial_ref_sys, topology, layers + tables as user editable so that the data in them gets backed up + during pg_dump + +2012-02-29 03:01 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r9339] + +2012-02-29 02:56 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r9338] Other minor fix. + +2012-02-29 02:51 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r9337] fix doc typo. + +2012-02-29 02:47 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r9336] Fix for ticket 1536. Added a nodataval[] parameter to + ST_Intersection and removed the otheruserfunc one. + + Changed the ST_Clip trimraster parameter name to crop and set it + to true by default. + + Updated the doc. + +2012-02-29 00:52 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9335] Fix for MinGW! + +2012-02-29 00:49 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9334] Fix for windoze! + +2012-02-28 18:50 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9333] Make our --prefix policy crystal clear + +2012-02-28 18:29 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9332] Fix regression due to new error message in GML generation + +2012-02-28 18:09 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9331] Make error message on GML2 calls for TIN more instructive + (#1591) + +2012-02-28 17:17 Sandro Santilli <strk@keybit.net> + + * [r9330] TopoGeo_addPoint: use a more functional tolerance when + snapping (#1613) + + All of this looks like magic but it isn't. + I actually wonder if ST_ModEdgeSplit and ST_ModEdgesSplit and + ST_Split + itself should do this internally, and if in doing so we wouldn't + need + to do it from higher levels. It doesn't indeed feel comfortable + to do + all this noise on such an high level. + + Anyway this commit adds a now-passing regression test for the + topology + building issue and that's A Good Thing. + +2012-02-28 17:17 Sandro Santilli <strk@keybit.net> + + * [r9329] Hush debugging lines unless requested + +2012-02-28 10:43 Sandro Santilli <strk@keybit.net> + + * [r9328] Ignore extension sql target dirs + +2012-02-28 10:28 Sandro Santilli <strk@keybit.net> + + * [r9327] Have configure look for mathml2.dtd, rework doc build + scripts (#1157) + +2012-02-28 10:17 Regina Obe <lr@pcorp.us> + + * [r9326] correct proto output type -- ST_Union of rasters always + returns a raster + +2012-02-28 06:13 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9325] Set eol-style to LF + +2012-02-27 22:08 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9324] Try again with line endings, this time using eol-style + instead of eol-type (#1605) + +2012-02-27 20:58 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9323] Set appropriate mime types and text file types on all + files. (#1605) + +2012-02-27 18:19 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9322] Load the "right" legacy.sql file (warning: hard coding + 00-regress-install into a sql file). + +2012-02-27 18:13 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9321] Quiet compile warning. + +2012-02-27 18:07 Sandro Santilli <strk@keybit.net> + + * [r9320] Use rounder numbers in tests (fixes a regression on 32bit + system) + +2012-02-27 17:48 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9319] Ignore LF/CRLF differences when differencing sql output + files in raster tests. + +2012-02-27 17:36 Sandro Santilli <strk@keybit.net> + + * [r9318] Add regression test for legacy.sql and + uninstall_legacy.sql (#915) + +2012-02-27 17:36 Sandro Santilli <strk@keybit.net> + + * [r9317] Properly cleanup spatial_ref_sys after loader tests + +2012-02-27 17:36 Sandro Santilli <strk@keybit.net> + + * [r9316] Properly cleanup spatial_ref_sys + +2012-02-27 16:55 Sandro Santilli <strk@keybit.net> + + * [r9315] Define the legacy 'within' as a proxy to ST_Within as the + C entry point was dropped + +2012-02-27 16:52 Sandro Santilli <strk@keybit.net> + + * [r9314] Generate uninstall_legacy.sql from legacy.sql (#949) + +2012-02-27 16:42 Bborie Park <bkpark at ucdavis.edu> + + * [r9313] Correct handling of 8BSI pixel types when converting a + raster to a GDAL MEM dataset. This should resolve the failures in + #1617. + +2012-02-27 16:26 Sandro Santilli <strk@keybit.net> + + * [r9312] Fix "make clean" to drop all generated files + +2012-02-27 16:06 Sandro Santilli <strk@keybit.net> + + * [r9311] Encode dependency of topology script on sqldefines (for + version) + +2012-02-27 15:55 Sandro Santilli <strk@keybit.net> + + * [r9310] Have postgis_full_version() check versions of all objects + (#1608) + +2012-02-27 15:39 Sandro Santilli <strk@keybit.net> + + * [r9309] Have postgis_raster_lib_version() include SVN revision + (#1608) + +2012-02-27 15:26 Sandro Santilli <strk@keybit.net> + + * [r9308] st_clip signature changed (#1620) + +2012-02-27 15:03 Sandro Santilli <strk@keybit.net> + + * [r9307] Add postgis_raster_scripts_installed() function (#1608) + +2012-02-27 15:02 Sandro Santilli <strk@keybit.net> + + * [r9306] Add postgis_topology_scripts_installed() function (#1608) + +2012-02-27 14:08 Regina Obe <lr@pcorp.us> + + * [r9305] update to March. Seems likely we'll miss the February + boat. Maybe shoot for March. + +2012-02-27 11:22 Sandro Santilli <strk@keybit.net> + + * [r9304] Set script version to master version + svn revision + (#1608) + + Affects postgis_scripts_released() and + posgis_scripts_installed(). + Needs some wider testing of upgrade scripts and then will attach + the same version to raster and topology. + +2012-02-26 18:31 Bborie Park <bkpark at ucdavis.edu> + + * [r9303] Additional test of rt_raster_to_gdal(). + +2012-02-25 20:35 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9302] Minor update to comments. + +2012-02-25 20:30 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9301] Simplify table/schema copying, hopefully fix windows. + +2012-02-25 19:46 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9300] Compress sed calls into one to make life better for MSYS + +2012-02-25 17:10 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9299] Correct fix for win32 crasher, it was proj returning a + null error string. + +2012-02-25 05:53 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9298] SPI_finish before dropping out on NULL proj4text + +2012-02-25 05:49 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9297] Match to new behavior on null proj4text + +2012-02-25 03:12 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9296] Remove Win32 crasher on NULL proj4 string + +2012-02-24 23:58 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9295] Quote out the svn and git commands for windoze + +2012-02-24 23:42 Bborie Park <bkpark at ucdavis.edu> + + * [r9294] Forgot to update regression tests for changes made in + r9293 + +2012-02-24 22:54 Bborie Park <bkpark at ucdavis.edu> + + * [r9293] Fixed conversion of pixel types between PostGIS raster + and GDAL. Essentially PostGIS raster 8BSI is now a GDT_Int16. + +2012-02-24 22:46 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r9292] Minor corrections. + +2012-02-24 22:41 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9291] Fix up the revision info in the usage lines + +2012-02-24 20:17 Sandro Santilli <strk@keybit.net> + + * [r9290] Make sure the created backend temp directory is world + writeable + +2012-02-24 19:24 Bborie Park <bkpark at ucdavis.edu> + + * [r9289] Additional fixups to not increase extent if an alignment + is to take place in rt_raster_gdal_rasterize(). + +2012-02-24 19:11 Sandro Santilli <strk@keybit.net> + + * [r9288] Be immune from topology sequence advancements + +2012-02-24 18:49 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9287] Make sure the regress tmp directory exists before trying + to write to it. + +2012-02-24 17:33 Bborie Park <bkpark at ucdavis.edu> + + * [r9286] Added additional conditions for + rt_raster_gdal_rasterize() determining when to expand the extent. + +2012-02-24 15:23 Sandro Santilli <strk@keybit.net> + + * [r9285] Do not report "face without edges" error for universal + face (#1612) + +2012-02-24 15:23 Sandro Santilli <strk@keybit.net> + + * [r9284] Rename the backend temp dir and drop with brute force + + Avoids errors when no test writes anything in there (so no dir) + +2012-02-24 10:21 Sandro Santilli <strk@keybit.net> + + * [r9283] Properly drop the temporary directory setup for backend + output + + This prevents errors when running "make check" against backends + owned by different users. + +2012-02-24 05:05 Bborie Park <bkpark at ucdavis.edu> + + * [r9282] Set all raster CASTs to be ASSIGNMENT not IMPLICIT. + Related ticket is #490. Knowing my luck, I'll be reverting this + due to some showstopper. + +2012-02-23 22:25 Bborie Park <bkpark at ucdavis.edu> + + * [r9281] Added correct handling of negative scale-x and positive + scale-y in rt_raster_gdal_warp(). + +2012-02-23 21:49 Bborie Park <bkpark at ucdavis.edu> + + * [r9280] Renamed rt_raster_dump_as_wktpolygons() to + rt_raster_gdal_polygonize(). Refactored + rt_raster_gdal_polygonize() to use LWPOLY objects instead of WKT + strings. Also added cleanup code to make invalid dumped + geometries valid. Associated tickets are #1586 and #637. + +2012-02-23 16:07 Sandro Santilli <strk@keybit.net> + + * [r9279] Don't deep clone POINTARRAY in GML input routine. + + Let's see if doing so exposes more memory errors (#1591). + Does run valgrind clean here. + +2012-02-23 15:42 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r9278] Rewrote most of ST_AsRaster. Grouped similar variants to + make everything a bit more readable. + +2012-02-23 13:28 Sandro Santilli <strk@keybit.net> + + * [r9277] Set the default regression temp dir to /tmp/pgis_reg + (#1607) + +2012-02-23 12:54 Sandro Santilli <strk@keybit.net> + + * [r9276] Have ST_GetFaceGeometry check face existance, + regress-test + +2012-02-23 11:24 Sandro Santilli <strk@keybit.net> + + * [r9275] Drop the UpdateGeometrySRID version with old param name + (#1606) + +2012-02-22 23:13 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9272] Correctly handle the new lexer/parser output files + +2012-02-22 23:06 Bborie Park <bkpark at ucdavis.edu> + + * [r9271] Rewrote chunks of rt_raster_gdal_warp() and + rt_raster_gdal_rasterize() to correctly generate skewed rasters. + Related ticket is #1395. This should also resolve #1586. + +2012-02-22 20:38 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9270] Set svn:eol-style native (#1598) + +2012-02-22 19:40 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9267] Update numbers for alpha6 + +2012-02-22 19:31 Regina Obe <lr@pcorp.us> + + * [r9266] put in LF instruction to prevent my windows from putting + in windows offensive line breaks + +2012-02-22 19:29 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9265] Change dos to unix lineends. (#1598) + +2012-02-22 19:20 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9264] Ignore makefile + +2012-02-22 19:18 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9263] Really remove the dos linefeeds this time (#1598) + +2012-02-22 19:08 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9262] Revert dos lineending commit that blew away those + files... + +2012-02-22 19:01 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9261] Use consistent UNIX line endings (#1598) fix up those + files that pass through the C preprocessor at least. + +2012-02-22 18:59 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9260] Switch to evaluating tests using psql with + verbosity=terse + +2012-02-22 17:19 Sandro Santilli <strk@keybit.net> + + * [r9258] Fix ST_Polygonize aggregate to retain Z (#1602) + +2012-02-22 15:52 Sandro Santilli <strk@keybit.net> + + * [r9257] Stay within 80 cols + +2012-02-22 15:33 Sandro Santilli <strk@keybit.net> + + * [r9256] Parametrize max user SRID in the SQL file too + +2012-02-22 12:49 Sandro Santilli <strk@keybit.net> + + * [r9253] Check SRID passed to UpdateGeometrySRID, patch by Mike + Toews (#1596) + + Adds regression testing + +2012-02-22 12:48 Sandro Santilli <strk@keybit.net> + + * [r9252] Forward port fix to #1595, although there's no way to + expose in 2.0 + +2012-02-22 03:09 Regina Obe <lr@pcorp.us> + + * [r9251] correct st_clip raster so eimage matches the code. the + behavior changed butthe code was wrong (showing old behavior). + Also put back the multiband case using new syntax which is + probably more common usaage. + +2012-02-21 15:51 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r9249] Added single quote around 8BUI since the XSL now escape + them. See #1588. + +2012-02-21 15:47 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r9248] Added one missign default value for the value parameter + of ST_AsRaster and added one missing variant. + +2012-02-21 14:32 Sandro Santilli <strk@keybit.net> + + * [r9247] Add a ptarray_transform function in liblwgeom API + +2012-02-21 13:54 Sandro Santilli <strk@keybit.net> + + * [r9246] Draft an lwgeom_from_gml function (#1591) + + Can't be moved all to liblwgeom due to use of spatial_ref_sys + +2012-02-21 11:07 Sandro Santilli <strk@keybit.net> + + * [r9245] Print SRID in decimal form, not hex (#1593) + +2012-02-21 10:57 Sandro Santilli <strk@keybit.net> + + * [r9244] Update documentation about shp2pgsql -s/-g flag (#1524) + +2012-02-21 09:43 Sandro Santilli <strk@keybit.net> + + * [r9243] Add an --extensions switch to run_test (#964) + + When passing that switch the install and uninstall of spatial db + happens using the EXTENSION model. It's currently not run as part + of "make check" because some tests fail due to use of ambiguos + calls when both core and raster modules are installed (there's no + way to separate them in the EXTENSION model). + +2012-02-21 09:07 Sandro Santilli <strk@keybit.net> + + * [r9242] Put prepare/upgrade/uninstall operations in their own + functions + +2012-02-20 20:09 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r9241] More work on ST_Resample and ST_Intersection + +2012-02-20 14:32 Sandro Santilli <strk@keybit.net> + + * [r9240] Ignore generated extensions and java files + +2012-02-20 13:28 Sandro Santilli <strk@keybit.net> + + * [r9239] Do not printf from potgis library. Possibly fixes #1570 + +2012-02-20 13:18 Sandro Santilli <strk@keybit.net> + + * [r9238] Ignore generated java/jdbc/Makefile + +2012-02-20 13:16 Sandro Santilli <strk@keybit.net> + + * [r9237] Escape single quotes in param list when generating raster + comments + + Closes ticket #1588 + +2012-02-20 12:52 Sandro Santilli <strk@keybit.net> + + * [r9236] Ant rules to excecute maven by Maria Arias de Reyna + (#1437) + + Also simplify java Makefile to be simple proxies of ant + +2012-02-20 10:52 Sandro Santilli <strk@keybit.net> + + * [r9235] Update face MBR on edge change (#1587) + +2012-02-20 10:19 Sandro Santilli <strk@keybit.net> + + * [r9234] Enhance documentation for ST_ChangeEdgeGeom + +2012-02-17 23:41 Regina Obe <lr@pcorp.us> + + * [r9233] Link to my office base article on how to display postgis + rasters in base reports. + +2012-02-17 22:23 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r9232] Rewrote the ST_Rescale documentation. + +2012-02-17 22:00 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9230] This works but it makes estimated extent case sensitive + both ways (no weaseling out and giving upper case versions of + lower case tables) (#1585) + +2012-02-17 20:52 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r9229] Ticket #1536. First revision of st_intersection(). + Removal of the extent parameter and first documentation. + +2012-02-17 18:29 Sandro Santilli <strk@keybit.net> + + * [r9228] Check edge disposition around endnodes (#1571) + + Includes a couple new testcases, for closed and non-closed edges + changing disposition around their end nodes. + +2012-02-17 18:28 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r9227] Many more small typo fixes... + +2012-02-17 15:11 Sandro Santilli <strk@keybit.net> + + * [r9226] Rework edge motion range construction (#1571) + + Includes a new testcase which was failing before this change + +2012-02-17 14:03 Sandro Santilli <strk@keybit.net> + + * [r9225] Add another test for ST_ChangeEdgeGeom + +2012-02-17 13:46 Sandro Santilli <strk@keybit.net> + + * [r9224] Handle some (not all) cases of non-isomorphic edge + changes (#1571) + + The problem is much harder than it looks ... + +2012-02-17 08:39 Sandro Santilli <strk@keybit.net> + + * [r9223] Add test numbers to ST_ChangeEdgeGeom regression cases + +2012-02-17 08:39 Sandro Santilli <strk@keybit.net> + + * [r9222] Ignore utils/postgis_restore.pl (now generated) + +2012-02-16 17:45 Sandro Santilli <strk@keybit.net> + + * [r9221] Update comment, hopefully clearer now + +2012-02-16 15:49 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r9220] Fixed a number of small problem. Capitalized x and y. + +2012-02-16 10:25 Sandro Santilli <strk@keybit.net> + + * [r9219] Add a topology.GetNodeEdges function + + This function is a fundamental topological primitive to do things + like SQL-based poligonization. + +2012-02-16 08:49 Sandro Santilli <strk@keybit.net> + + * [r9218] Ignore postgis_svn_revision.h + +2012-02-16 08:08 Sandro Santilli <strk@keybit.net> + + * [r9217] Set availability of ST_ChangeEdgeGeom + +2012-02-16 08:08 Sandro Santilli <strk@keybit.net> + + * [r9216] Fix cross reference + +2012-02-16 00:28 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9215] Remove now-obsolete TODO comment + +2012-02-16 00:25 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9214] Prepare for Proj4.8 with spheroid info handling + +2012-02-15 23:25 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9213] Add generated files to svn:ignore + +2012-02-15 22:45 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9211] jdbc: org.postgis.Point.equals() is not reflexive (#1313) + +2012-02-15 22:34 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9209] Fix XML typo + +2012-02-15 22:27 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9208] Negative distance argument to ST_Buffer not documented + (#1535) + +2012-02-15 21:56 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9205] shp2pgsql: a switch to drop M from 4d imports (#900) + +2012-02-15 21:37 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9204] shp2pgsql: a switch to drop M from 4d imports (#900) + +2012-02-15 21:23 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r9203] Updated the version returned by the + PostGIS_Raster_Lib_Version() example. + +2012-02-15 21:18 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r9202] Removed some garbage. + +2012-02-15 21:12 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9201] Remove fugitive EOL white space + +2012-02-15 20:58 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9200] Add minor version upgradeable + +2012-02-15 20:57 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9198] Push trunk version forward + +2012-02-15 20:55 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9196] Update meta for alpha5 + +2012-02-15 19:28 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r9195] Fix for #1576 & #1569. ST_Clip now works on multiband + rasters and accept an array of nodata values. + +2012-02-15 15:59 Sandro Santilli <strk@keybit.net> + + * [r9194] Do not take PROJ4 errno value as a sign of error (#1580) + +2012-02-15 11:00 Sandro Santilli <strk@keybit.net> + + * [r9193] dd support for fetching SVN revision from pure-git clones + (#1579) + +2012-02-14 22:21 Regina Obe <lr@pcorp.us> + + * [r9192] Example of how to use only psql to output a raster image. + +2012-02-14 17:57 Sandro Santilli <strk@keybit.net> + + * [r9191] Fix crash with empty polygons in P-I-P tests (#1578) + +2012-02-14 17:54 Regina Obe <lr@pcorp.us> + + * [r9190] #1494: documentation of new census tract loader and + get_tract functions. + +2012-02-14 17:53 Regina Obe <lr@pcorp.us> + + * [r9189] #1494: done with programming need to finish documenting + and regress test. + +2012-02-14 17:47 Bborie Park <bkpark at ucdavis.edu> + + * [r9188] Readded rt_clip regression test. + +2012-02-14 17:29 Bborie Park <bkpark at ucdavis.edu> + + * [r9187] Fixed handling of negative X-scale or positive Y-scale in + rt_raster_gdal_rasterize(). Ticket is #1574. + +2012-02-14 17:15 Sandro Santilli <strk@keybit.net> + + * [r9186] We don't use a profiler anymore + +2012-02-14 17:00 David Zwarg <dzwarg@azavea.com> + + * [r9185] Reverting changes that optimize ST_MapAlgebraExpr. + Re-advertise x and y parameters as int32. Reverts changes from + r9137, closes #1557. + +2012-02-14 13:31 Sandro Santilli <strk@keybit.net> + + * [r9184] Make one-point lines convertible to GEOS, see #1543 + +2012-02-13 22:46 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r9183] Temporarily remove st_clip regress... + +2012-02-13 22:02 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9182] Configured without raster still tries to make + raster/rt_pg/rtpostgis.sql (#1575) only try to build extensions + if we have both raster and topology as well as pgsql 9.1 + +2012-02-13 21:58 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r9181] Closing ticket #597. Added regression tests for ST_Clip. + More tests to come when fixing #1576. + +2012-02-13 21:25 Sandro Santilli <strk@keybit.net> + + * [r9180] Encode dependency of topology comments and cheatsheet + + Same should be done for raster and tiger... + +2012-02-13 20:44 Sandro Santilli <strk@keybit.net> + + * [r9179] Fix documentation of GetRingEdges + +2012-02-13 20:44 Sandro Santilli <strk@keybit.net> + + * [r9178] Install topology comments too, when regressing topology + +2012-02-13 20:44 Sandro Santilli <strk@keybit.net> + + * [r9177] Install topology_comments.sql as well + +2012-02-13 18:28 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r9176] Fix for ticket #1572. ST_PixelAsPolygons() return NULL + values when the requested band or no band exist. + +2012-02-13 18:06 Sandro Santilli <strk@keybit.net> + + * [r9175] Allow retaining all custom spatial_ref_sys entries, even + clashing + + Update manual accordingly (hard upgrade procedure) + +2012-02-13 17:47 Sandro Santilli <strk@keybit.net> + + * [r9174] Fix regexp renaming srid enforcement check + +2012-02-13 17:01 Sandro Santilli <strk@keybit.net> + + * [r9173] Add a note about handling of out-of-range SRIDs on hard + upgrade + +2012-02-13 16:29 Sandro Santilli <strk@keybit.net> + + * [r9172] Accept more feature type names from AddTopoGeometryColumn + (#1470) + + With this commit you can pass return of ST_GeometryType or + return GeometryType as input to the function. + +2012-02-13 16:11 Sandro Santilli <strk@keybit.net> + + * [r9171] More VOLATILE -> STRICT (#955). Let's call it completed. + +2012-02-13 16:04 Sandro Santilli <strk@keybit.net> + + * [r9170] Some VOLATILE functions turned to STABLE (#955) + + A noticeable exception is the Geometry(TopoGeometry) cast which + triggers a regression when made STABLE. + +2012-02-13 15:43 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r9169] Fix regression broken by the limit imposed to SRID < + 999999. Anyway the srid provided was not the right one. Changed + from 4269 to 26919. + +2012-02-13 15:12 Regina Obe <lr@pcorp.us> + + * [r9168] #1494 - ability to load census tract, block group, + tabblock - boy did I screw this one. Should be all fixed now and + tested (loading part), still need to write the function, but + that's the easy part + +2012-02-13 14:48 Sandro Santilli <strk@keybit.net> + + * [r9167] Move SRID max and user-max definitions to configure.ac + + This should help keeping postgis_restore.pl and core in sync + wrt SRID ranges. + +2012-02-13 14:17 Sandro Santilli <strk@keybit.net> + + * [r9166] Refine user feedback about SRID conversion and reserved + zones + +2012-02-13 11:25 Sandro Santilli <strk@keybit.net> + + * [r9165] Drop (SRF()).* constructs (#956) + +2012-02-13 10:58 Sandro Santilli <strk@keybit.net> + + * [r9164] Have regress install comments adn throw an error on + failure (#1532) + +2012-02-13 10:58 Sandro Santilli <strk@keybit.net> + + * [r9163] Have staged-install install comments when possible + (#1532) + +2012-02-13 10:16 Sandro Santilli <strk@keybit.net> + + * [r9162] Report svn revision + +2012-02-13 10:16 Sandro Santilli <strk@keybit.net> + + * [r9161] Encode postgis_svn_revision dependency + +2012-02-13 10:00 Sandro Santilli <strk@keybit.net> + + * [r9160] Cleanup postgis_svn_revision.h makefile rule (PHONY) + +2012-02-13 09:58 Sandro Santilli <strk@keybit.net> + + * [r9159] Do not override postgis_svn_revision.h if revision didn't + change + +2012-02-13 09:15 Sandro Santilli <strk@keybit.net> + + * [r9158] Add support for fetching SVN revision from local git-svn + repository + +2012-02-11 21:17 Sandro Santilli <strk@keybit.net> + + * [r9157] It's "svn", not "svnn". And a TODO item... + +2012-02-11 16:08 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9156] Fix regression in OSX (-0 vs 0) + +2012-02-11 05:14 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9155] Report SVN revision in PostGIS_Full_Version (#1518) + +2012-02-10 23:33 Bborie Park <bkpark at ucdavis.edu> + + * [r9154] Added checks of SRID to make sure that SRIDs are within + the permitted range. Ticket is #1568. + +2012-02-10 22:42 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r9153] ST_Clip returns all bands when no band is specified. + +2012-02-10 22:36 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r9152] Fix for ticket #1569. ST_Clip variants defaulting to band + 1 should default to NULL so that they return all bands. + +2012-02-10 20:21 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9151] Back out SVN generation stuff. + +2012-02-10 19:55 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9150] Try to fail better on SVN snatching... + +2012-02-10 19:49 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9149] Report SVN revision in PostGIS_Full_Version (#1518) + +2012-02-10 18:46 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r9148] ST_PixelAsPolygon() does not have a band parameter + anymore. + +2012-02-10 18:38 Regina Obe <lr@pcorp.us> + + * [r9147] #1494: move parent table creation to a function so logic + is in single place, add a new census_loader.sql script with + census specific load logic, revise create and update scripts to + load the new census logic and create tables if not present. Still + need to test and write a function to return census info given a + point before can mark this as done. + +2012-02-10 17:05 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r9146] Have perl to backup the file before editing. 'make check' + is failing on Windows 7 without that. + + See + http://postgis.refractions.net/pipermail/postgis-devel/2012-February/018482.html + +2012-02-10 16:53 Sandro Santilli <strk@keybit.net> + + * [r9145] Clamp SRID valuesu > SRID_MAXIMUM to fall in the reserved + range (#1505) + + The reserved range is SRID_USER_MAXIMUM+1 to SRID_MAXIMUM. + Core takes care of typmod clamping, postgis_restore.pl takes care + of clamping table definition and spatial_ref_sys entries. + +2012-02-10 16:53 Sandro Santilli <strk@keybit.net> + + * [r9144] Add SRID_USER_MXIMUM define + +2012-02-10 16:18 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9143] Fix syntax error in MS example + +2012-02-10 09:19 Sandro Santilli <strk@keybit.net> + + * [r9141] Drop the now-generated Makefile on distclean, and ignore + it + +2012-02-10 09:16 Sandro Santilli <strk@keybit.net> + + * [r9140] Fix builds --without-topology (#1565) + +2012-02-10 01:21 Regina Obe <lr@pcorp.us> + + * [r9139] #1564 fix typo in cat call preventing other files from + being concatenated + +2012-02-09 23:02 Regina Obe <lr@pcorp.us> + + * [r9138] #1563: remove raster_columns view from extension so it + can be dropped without complaint. + +2012-02-09 20:12 David Zwarg <dzwarg@azavea.com> + + * [r9137] Performance improvement by keeping x and y pixel + coordinates as floats. + +2012-02-09 19:19 Sandro Santilli <strk@keybit.net> + + * [r9136] Actually save Grand Unified Geom Cache rather than just + building it + + Fixes #547 + +2012-02-09 17:16 Sandro Santilli <strk@keybit.net> + + * [r9135] More postgis_config.h inclusion removal from headers + +2012-02-09 17:00 Sandro Santilli <strk@keybit.net> + + * [r9134] Drop postgis_config.h include from lwgeom_pg.h header. + + Generally, package config files should _not_ be included + by package headers. In this specific case the aim is overriding + POSTGIS_DEBUG_LEVEL in implementation files for the sake of + enabling debugging of a single file. + + Also part of this commit is addition of copyright header in + two files which were missing it (used git history to figure + assignments) + +2012-02-09 17:00 Sandro Santilli <strk@keybit.net> + + * [r9133] Fix header guard of pgsql_compat.h and drop the duplicate + +2012-02-09 10:49 Regina Obe <lr@pcorp.us> + + * [r9132] Hmm double added a file -- #1563 which was causing the + can't drop because postgis extension depends on it error + +2012-02-09 10:10 Sandro Santilli <strk@keybit.net> + + * [r9131] Forward distclean to extensions subdirs + +2012-02-09 02:34 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9130] Don't delete the comments. + +2012-02-09 01:54 Regina Obe <lr@pcorp.us> + + * [r9129] #1562 replace string with text + +2012-02-09 00:42 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9128] More verbose message, per DFuhriman + +2012-02-09 00:37 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9127] Invalid geography polygons: BOOM! Could not generate + outside point! (#1046) + +2012-02-09 00:27 David Zwarg <dzwarg@azavea.com> + + * [r9126] Fixed bug where PG_DETOAST_DATUM args were incorrect. + +2012-02-09 00:18 David Zwarg <dzwarg@azavea.com> + + * [r9125] Changed DATUM_SLICE to DATUM in setGeotransform. + +2012-02-08 23:59 David Zwarg <dzwarg@azavea.com> + + * [r9124] Added documentation for raster processing builtin + functions: st_min4ma, st_max4ma, st_mean4ma, st_sum4ma, + st_range4ma, st_distinct4ma, st_stddev4ma. + +2012-02-08 23:01 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9123] Change from scripts-based script versions to repository + based versions. Should also be more robust? ha ha ha. (#1282) + +2012-02-08 22:44 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9122] Make the scripts version get read again. + +2012-02-08 21:58 Bborie Park <bkpark at ucdavis.edu> + + * [r9121] Fix to correct building of testapi in MinGW. Ticket is + #1560. + +2012-02-08 21:31 David Zwarg <dzwarg@azavea.com> + + * [r9120] Do not allocate inside of 1 raster mapalgebra loop for + datum values and nulls. + +2012-02-08 21:29 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9119] ./configure still display the old raster version number + (#1599) + +2012-02-08 21:20 Bborie Park <bkpark at ucdavis.edu> + + * [r9118] Instead of dynamically allocating space for variables + "values" and "nulls" with each pixel, just initialize both to the + max possible # of elements. Done for 2-raster ST_MapAlgebraExpr + +2012-02-08 21:08 Bborie Park <bkpark at ucdavis.edu> + + * [r9117] Remove deleted function signature for ST_PixelAsPolygon. + Ticket is #1529 + +2012-02-08 21:08 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9116] test for termios.h in case we want to do password + prompting in the future + +2012-02-08 21:04 Bborie Park <bkpark at ucdavis.edu> + + * [r9115] Values for [rast1.x], [rast1.y], [rast2.x] and [rast2.y] + should be INT4 instead of FLOAT8. Ticket is #1557 + +2012-02-08 21:03 David Zwarg <dzwarg@azavea.com> + + * [r9114] Removed geotransform type. Fixed rounding, so Hudson will + be my friend in raster regression tests. + +2012-02-08 20:51 Sandro Santilli <strk@keybit.net> + + * [r9113] do not heap-allocate SPI arg types + +2012-02-08 20:33 Sandro Santilli <strk@keybit.net> + + * [r9112] ST_MapAlgebraExpr: advertise X and Y params as integers + (#1557) + + Also stop doing 3 string matches per pixel for no reason + +2012-02-08 19:44 David Zwarg <dzwarg@azavea.com> + + * [r9111] Added documentation for 1 and 2 raster map algebra user + callback function documentation for pixel position array + parameter to userfunc. #1525 + +2012-02-08 19:09 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9110] Handle French svn? + +2012-02-08 19:04 David Zwarg <dzwarg@azavea.com> + + * [r9109] Added geotransform methods and correction to basis + vectors during raster rotation. #1353 + +2012-02-08 18:51 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9108] Stop relying on private projects.h PROJ header (#1541) + +2012-02-08 17:39 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9107] Add missing target + +2012-02-08 17:36 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9105] Push forward version numbers + +2012-02-08 17:33 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9102] Commit in preparation for 2.0.0alpha4 + +2012-02-08 17:23 David Zwarg <dzwarg@azavea.com> + + * [r9101] Added ST_StdDev4ma raster neighborhood processing + function. #1318 + +2012-02-08 17:19 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9100] lwgeom_release (#699) move free if copy calls to end of + functions in any place where there is any chance that a problem + might occur + +2012-02-08 16:44 Bborie Park <bkpark at ucdavis.edu> + + * [r9099] Minor debug message tweak + +2012-02-08 16:11 Bborie Park <bkpark at ucdavis.edu> + + * [r9098] Added regression tests for raster2pgsql loader. Ticket is + #1388 + +2012-02-08 15:17 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r9097] Bugfixes related to #1552, and somehow to #665. Thanks to + Sandro for report and valgrind stuff ! + +2012-02-08 10:06 Sandro Santilli <strk@keybit.net> + + * [r9096] Document topology.GetRingEdges (#959) + +2012-02-08 09:36 Sandro Santilli <strk@keybit.net> + + * [r9095] Do not release serialized input until output is + deserialized + + See + http://postgis.refractions.net/pipermail/postgis-devel/2012-February/018336.html + +2012-02-08 06:42 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9094] configure_json.patch (#1539) from Evan Roualt + +2012-02-08 05:29 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r9093] restore (at least) tin_geom and psurface_geom unit tests + call. Related to #665 + +2012-02-08 05:23 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r9092] Fix BBOX handling in serialization. Still related to #665 + +2012-02-08 04:36 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r9091] Change BBOX double to float in serialization. Related to + #665 + +2012-02-08 00:43 David Zwarg <dzwarg@azavea.com> + + * [r9090] Added ST_Distinct4ma helper neighborhood processing + function. See #1318 + +2012-02-08 00:29 David Zwarg <dzwarg@azavea.com> + + * [r9089] Fixed typo in configure.ac + +2012-02-08 00:23 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9088] loader/Latin1 regression failure with database SQL_ASCII + encoding (#1465) from Greg Troxel + +2012-02-08 00:15 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9087] Remove another dying test + +2012-02-08 00:14 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9086] Remove failing test + +2012-02-08 00:14 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9085] Remove dependency on svnrevision.h + +2012-02-08 00:01 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9084] docs-install uses bare cp (#1528) from Greg Troxel + +2012-02-07 23:51 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9083] Ignore svnrevision.h + +2012-02-07 23:49 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9082] ST_MinimumBoundingCircle needs regression test (#1042) + +2012-02-07 23:42 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9081] Add a warning for lower numbers of GEOS + +2012-02-07 23:37 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r9080] Still several bugfixes related to #665 + +2012-02-07 23:27 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9079] Force generation of an svnrevision.h file when building + in a repo and the svn executable is available. + Ensure that when building a tarball with make_dist.sh the + revision is read from the tag in the remote svn repository. + This should cover both development and distribution cases. + +2012-02-07 22:17 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9078] Add dzwarg + +2012-02-07 22:05 Bborie Park <bkpark at ucdavis.edu> + + * [r9077] Clean up raster regression and move loader regression + directory. + +2012-02-07 21:30 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r9076] Still bugfixes. Related to #665 + +2012-02-07 21:14 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9075] Test non-empty new types in regress/wkb (#1477) + +2012-02-07 21:04 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r9074] Restore surface cunit tests + +2012-02-07 21:01 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r9073] Fix some bugfixes. Handle EMPTY use cases. Minor changes. + Related to #665 + +2012-02-07 19:42 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9072] lwgeom_release (#699), reviewed all usage of + lwgeom_release + and replaced with lwgeom_free where possible. Changed the + def'n of lwgeom_release so that it only frees the containing + objects, and not any sub-objects, for those few remaining + cases that required a gentler freeing of objects. + +2012-02-07 19:35 Bborie Park <bkpark at ucdavis.edu> + + * [r9071] Minor cleanup of parameter names of + ST_Intersection(raster, geometry) + +2012-02-07 19:25 David Zwarg <dzwarg@azavea.com> + + * [r9070] Added positional parameters to 1 raster version of + ST_MapAlgebraFct. Closes #1525 + +2012-02-07 18:40 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r9069] Added ST_TileAsGeom() returning only the extent of the + planned tiles as polygons + +2012-02-07 18:07 David Zwarg <dzwarg@azavea.com> + + * [r9068] Corrected clamped values in tests for ST_MapAlgebraExpr + and ST_MapAlgebraFct. + Implemented prepared statements in ST_MapAlgebraExpr. + +2012-02-07 17:23 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9067] Documentation URLs, visible whitespace, and minor + touchups (#1548) from mwtoews + +2012-02-07 17:07 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9066] Reorder the include flags, per Greg Troxel + +2012-02-07 15:47 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r9065] First plpgsql prototype for ST_Tile(rast raster, width + integer, height integer, padwithnodata boolean, nodatavalue + double precision) + +2012-02-07 13:12 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r9064] Fix a couple of compiler warnings in shp2pgsql-gui caused + by uninitialised variables. + +2012-02-07 10:14 Sandro Santilli <strk@keybit.net> + + * [r9063] Allow changing a closed edge (but w/out fixing linking, + see #892) + +2012-02-07 09:50 Sandro Santilli <strk@keybit.net> + + * [r9062] Re-add install-sh in the repository to support libtool < + 2.0 + +2012-02-07 07:22 Sandro Santilli <strk@keybit.net> + + * [r9061] Ignore install-sh + +2012-02-07 07:20 Sandro Santilli <strk@keybit.net> + + * [r9060] install-sh is generated by ./autogen.sh, needs not be in + repository + +2012-02-07 02:34 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r9059] temp desactivation of surface unit test + +2012-02-06 23:50 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9058] Whoops, slight error in the empty geometry handling + fixed. + +2012-02-06 23:30 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r9057] Temp remove su_surface till everything fixed on it... + +2012-02-06 23:25 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9056] Have ST_Union aggregate use UnaryUnion from GEOS-3.0.0 + (#922) + +2012-02-06 23:14 Bborie Park <bkpark at ucdavis.edu> + + * [r9055] Make sure new bands when added using ST_AddBand are + correctly clamping NODATA values. Ticket is #1546. + +2012-02-06 21:32 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9054] Remove dead prototype + +2012-02-06 21:15 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r9053] Fix a bug in tgeom_free, related to #665 + +2012-02-06 20:53 Bborie Park <bkpark at ucdavis.edu> + + * [r9052] Added support to pass pixel positions of both rasters to + user function in 2-raster ST_MapAlgebraFct. This provides similar + functionality to the keywords described in #1525. + +2012-02-06 20:07 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9051] Change searched location of proj files when no proj + variable (#1022) + +2012-02-06 19:45 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9050] Quiet rm + +2012-02-06 19:44 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9049] quiet echo + +2012-02-06 19:33 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9048] Dummy up a check target + +2012-02-06 19:32 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9047] Move regres forward again + +2012-02-06 19:30 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9046] Make exensions depend on comments, so also depend on + xsltproc + +2012-02-06 19:13 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9045] Duplicate named case-insensitive XML refentry ids / HTML + files (#1511) + +2012-02-06 19:01 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9044] PostGIS extensions should build/install automatically if + PostGIS is compiled against 9.1 (#1490) + +2012-02-06 18:44 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9043] Change how we calculate minor versions suitable for + extension upgrade. + +2012-02-06 18:36 David Zwarg <dzwarg@azavea.com> + + * [r9042] Checked connection to SPI manager in ST_MapAlgebraExpr + +2012-02-06 17:49 David Zwarg <dzwarg@azavea.com> + + * [r9041] Whitespace changes to _st_hillshade4ma + +2012-02-06 17:26 David Zwarg <dzwarg@azavea.com> + + * [r9040] Reordered linking order for core regression tests. Follow + up to + http://postgis.refractions.net/pipermail/postgis-devel/2011-December/016646.html + and r8399 + +2012-02-06 13:43 Sandro Santilli <strk@keybit.net> + + * [r9039] Tabs to spaces (2) + +2012-02-06 13:16 Sandro Santilli <strk@keybit.net> + + * [r9038] Don't let ValidateTopology choke on invalid edges (#1544) + +2012-02-06 03:20 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9037] Allow 'make check' to run all the way through on OSX (the + sed implementation must be slightly different, so let's see if + Perl is any more standard). Hopefully other platforms will be + happy. + +2012-02-06 02:15 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9036] Try out the pj_get_def() method of finding the spheroid + parameters, but: it doesn't work. + +2012-02-05 02:15 Regina Obe <lr@pcorp.us> + + * [r9035] put in an FAQ about the common function is not unique + error that I suspect a lot of people will be running into because + they don't cast their geometry inputs and that a lot of raster + functions have overloaded functions similar to the geometry ones. + +2012-02-05 00:30 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r9033] Change encoding reference URL to that used for libiconv + rather than PostgreSQL since that's what we are using to do the + encoding conversion (as per #1303). + +2012-02-05 00:30 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r9032] Fix for #1540: Fix segfault in shp2pgsql-gui when no port + is specified. Prevent dereferencing a NULL pointer if the string + is empty. + +2012-02-04 17:53 Sandro Santilli <strk@keybit.net> + + * [r9031] Implemented new keywords for 1-raster ST_MapAlgebraExpr + (#1525) + +2012-02-04 02:36 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r9030] Fix an issue in the shapefile GUI caused by saving the + original shapefile name before processing. + + This was a bug caused by having two separate passes during + export; we were saving the original + export shapefile name during the first loop, and so when we came + to free() the temporary name + at the end of export it would only free the shapefile name from + the last iteration, and do it + multiple times causing random crashes. + +2012-02-04 01:30 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9029] Geography should support SRIDs other than 4326 (#1538) + +2012-02-04 01:17 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r9028] Alter the shapefile GUI so that multiple shapefiles can + be selected in the import file chooser. + +2012-02-04 00:39 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r9027] Add GUI support for the shp2pgsql -S (simple geometries) + switch. This closes #660. + +2012-02-04 00:39 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r9026] Update shapefile GUI "About" text and window title to + reflect that it now handles export as well as import. + +2012-02-04 00:39 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r9025] Add shapefile dumper (table export) to the shp2pgsql GUI. + This closes ticket #1480. + +2012-02-04 00:02 Bborie Park <bkpark at ucdavis.edu> + + * [r9024] Explicitly set the output band's pixel type depending on + the band being returned (FIRST, SECOND, BOTH. OTHER is left NULL) + in ST_Intersection(raster, raster). Related ticket is #1537. + +2012-02-03 22:57 Bborie Park <bkpark at ucdavis.edu> + + * [r9023] Implemented keywords for 2-raster ST_MapAlgebraExpr as + described in #1525. Will do 2-raster ST_MapAlgebraFct next. + +2012-02-03 21:29 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9022] Separate the cache handling code from the transform + function + +2012-02-03 21:04 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r9021] Fix pgsql2shp crash when dumping a table without a geo + column. + +2012-02-03 21:04 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r9020] Fix construction of pgsql2shp's main retrieval query in + ShpDumperOpenTable(). + + This fixes a regression which caused pgsql2shp to generate an + incorrect SQL query + for tables without any geo columns. + +2012-02-03 21:03 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r9019] Move initialisation of pgsql2shp state endian flag to the + same location all the other initialisers. + +2012-02-03 21:03 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r9018] Fix missing #ifdef POSTGIS_GEOS_VERSION ... #endif + preventing liblwgeom from compiling on GEOS < 3.3.0. + +2012-02-03 18:09 Bborie Park <bkpark at ucdavis.edu> + + * [r9017] Fixed optimization bug in 1-raster ST_MapAlgebraExpr. + Ticket is #1515. + +2012-02-03 12:51 Regina Obe <lr@pcorp.us> + + * [r9016] #1530: fix typo in full upgrade -- was using the postgis + only script instead of the combined postgis + raster script. + Still need to test, will close out once tested. + +2012-02-03 03:58 Bborie Park <bkpark at ucdavis.edu> + + * [r9015] Reverted r9014. Hudson ain't happy with sed. + +2012-02-03 03:51 Bborie Park <bkpark at ucdavis.edu> + + * [r9014] Merge of patch provided in #1533. Thanks gdt. + +2012-02-02 19:25 Bborie Park <bkpark at ucdavis.edu> + + * [r9013] Message cleanup by removing unnecessary newlines. + +2012-02-02 18:47 Bborie Park <bkpark at ucdavis.edu> + + * [r9012] Refactored stderr messaging so that C API messages are + properly emitted. Based on suggestion in comment 4 of #1531. + +2012-02-02 17:38 Bborie Park <bkpark at ucdavis.edu> + + * [r9011] Additional error checking and formatting of error + messages + +2012-02-01 23:55 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9010] Add lwcollection_homogenize and ST_Homogenize (#375) + +2012-02-01 23:18 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9009] Add lwcollection_homogenize and ST_Homogenize (#375) + +2012-02-01 23:00 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9008] Support curves in lwgeom_homogenize (#1526) + +2012-02-01 22:06 Bborie Park <bkpark at ucdavis.edu> + + * [r9007] Added check of values being passed to atan2() in + _st_hillshade4ma() + +2012-02-01 21:27 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9006] Enhance ST_Rotate by adding offset origin parameters + (#1251) from mwtoews + +2012-02-01 21:17 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9005] ST_Azimuth, ST_Project regression tests (#1398) + +2012-02-01 17:39 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9004] Also remove .gitignore files from tarbal distro + +2012-02-01 17:35 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r9001] Push forward versions for weekly snap + +2012-02-01 17:28 Regina Obe <lr@pcorp.us> + + * [r9000] #1494: build parent structures to support census tract + reporting by geocoder. + +2012-02-01 15:28 Bborie Park <bkpark at ucdavis.edu> + + * [r8999] Additional cleanup of a few functions using + ST_PixelAsPolygon(raster, int, int, int). Also, made map algebra + expression case-sensitive in 2-raster ST_MapAlgebraExpr. Now, the + keywords must be RAST1 and RAST2. + +2012-02-01 14:58 Bborie Park <bkpark at ucdavis.edu> + + * [r8998] Refactored regression test for ST_PixelAsPolygon + +2012-02-01 14:32 Bborie Park <bkpark at ucdavis.edu> + + * [r8997] Deleted deprecated ST_PixelAsPolygon(raster, int, int, + int) variant. + +2012-02-01 11:51 Sandro Santilli <strk@keybit.net> + + * [r8996] Make test more readable + +2012-02-01 11:39 Sandro Santilli <strk@keybit.net> + + * [r8995] Keep initial value when an expression eveluates to null + (#1523) + +2012-02-01 10:15 Sandro Santilli <strk@keybit.net> + + * [r8994] Implement RAST.X and RAST.Y keyword substitution in + ST_MapAlgebraExpr + + Includes regression test and documentation update. See #1519. + +2012-02-01 09:20 Sandro Santilli <strk@keybit.net> + + * [r8993] Implement ST_PixelAsPolygon in C, provide a core API + entry for it + + The API entry point is expected to be useful for #1519 + +2012-02-01 05:30 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8992] Try again to fix #1292 + +2012-02-01 02:14 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8991] VACUUM cannot be executed from a function or + multi-command string (#1517) + +2012-02-01 00:41 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8990] Fix include to be pathless + +2012-01-31 23:36 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8987] Update spatial_ref_sys to latest GDAL generated version + (#1493) + +2012-01-31 22:33 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8986] ST_Line_Interpolate_Point doesn't interpolate M-values + (#639) + +2012-01-31 20:46 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8984] Remove some compile warnings. + +2012-01-31 18:56 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8982] Gah, someone else can do this... + +2012-01-31 18:24 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8981] Really, I do know how to write XML. + +2012-01-31 18:19 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8980] ST_SnapToGrid returns a value out of range (#1292) + +2012-01-31 18:12 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8979] Rename ST_BuildArea backend function + +2012-01-31 18:10 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8978] Fix missing tag + +2012-01-31 18:09 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8977] Drop Equals(geom,geom) - deprecated in 1.2.3 (#1486) + +2012-01-31 18:03 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8976] FAQ about licensing (#1262) + +2012-01-31 17:44 Bborie Park <bkpark at ucdavis.edu> + + * [r8975] Explicitly set spatial index name as PostgreSQL 8.4 + requires an index name. Associated ticket is #1513. Also fixed + string trim functions to prevent modification of passed string. + +2012-01-31 14:50 Bborie Park <bkpark at ucdavis.edu> + + * [r8974] Fixed evaluation of two floating point numbers in + RASTER_getRotation. Fixes one of the two regression failures + described in #1501. + +2012-01-31 14:46 Bborie Park <bkpark at ucdavis.edu> + + * [r8973] Added check of band # passed to ST_DumpAsPolygons. Fixes + #1514. + +2012-01-31 05:50 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8972] Pgsql2shp: Dumping: XWKB structure does not match + expected size! (#1479) + +2012-01-30 21:52 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8971] ST_Segmentize returns invalid LINESTRING for zero-length + input (#1304) + +2012-01-30 20:41 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8969] ST_LocateBetweenElevations should return NULL and not + fail if intersection is void (#1250) + +2012-01-30 20:17 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8968] ST_Within not using prepared geometries (#962) + +2012-01-30 02:47 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8967] (#393) shp2pgsql returns "fseek(-xxx) failed on DBF + file." for large (>2GB) DBF files + +2012-01-30 00:37 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8966] GML for empty geometries should be NULL (#1377) + +2012-01-29 23:30 Nicklas Avén <nicklas.aven@jordogskog.no> + + * [r8965] Increase robustness in distance-calculations when point + is on segment. + +2012-01-29 21:19 Sandro Santilli <strk@keybit.net> + + * [r8964] typo + +2012-01-29 19:57 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8963] Be more liberal in accepting "empty" tags in constructing + geometries from GML (#1059) + +2012-01-29 14:44 Sandro Santilli <strk@keybit.net> + + * [r8962] Give me psc status + +2012-01-28 23:11 Sandro Santilli <strk@keybit.net> + + * [r8961] Fix _ST_AddFaceSplit code against PostgreSQL 9.1 + +2012-01-28 22:08 Sandro Santilli <strk@keybit.net> + + * [r8960] Don't put constant geometries in CTE, which confuses + estimator + +2012-01-28 17:05 Sandro Santilli <strk@keybit.net> + + * [r8959] Simplify code in _ST_AddFaceSplit, reduce edges table + scans. + + Also set debugging off by default + +2012-01-28 16:20 Sandro Santilli <strk@keybit.net> + + * [r8958] Switch ST_AddEdgeNewFaces from ST_Polygonize to + _ST_AddSplitFace + + See ticket #1508 + +2012-01-28 13:45 Sandro Santilli <strk@keybit.net> + + * [r8957] Stop using ST_Polygonize from ST_AddEdgeModFace. + + This commit also estrapolates an internal _ST_AddSplitFace + function + for reuse by ST_AddEdgeModFaces + +2012-01-28 13:18 Sandro Santilli <strk@keybit.net> + + * [r8956] Rename topogeometry column check to be more readable + +2012-01-28 10:42 Sandro Santilli <strk@keybit.net> + + * [r8955] New test for closing multi-edge ring in a face + (ST_AddEdge*Face*) + +2012-01-28 07:44 Sandro Santilli <strk@keybit.net> + + * [r8954] Allow multiple topogeometry columns in one table (again) + + Dunno why this piece was missing from previous commit, sorry + +2012-01-28 07:37 Sandro Santilli <strk@keybit.net> + + * [r8953] Allow multiple TopoGeometry column in the same table + +2012-01-28 00:23 Regina Obe <lr@pcorp.us> + + * [r8952] add protos for ST_Quantile raster table coverage. Still + some more to add as well as examples of usage + +2012-01-27 23:31 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8951] Fix one remaining crasher for ST_AsGML('SRID=4326;POLYGON + EMPTY'); + +2012-01-27 22:24 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8950] #1504 (Segfault running ST_EstimatedExtent()) + +2012-01-27 21:05 Bborie Park <bkpark at ucdavis.edu> + + * [r8949] Fixed segfault caused by an empty quantile linked list + being used to get the quantile's value. Ticket is #1506. + +2012-01-27 20:55 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8948] Tighten up on-arc test a bit more. + +2012-01-27 20:14 Sandro Santilli <strk@keybit.net> + + * [r8947] Add "face has no rings" validity checking + +2012-01-27 18:57 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8946] Revert accidental inclusion of shape file size patch in + curve patch + +2012-01-27 18:54 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8945] #920 (ST_LineToCurve generating invalid CURVEPOLYGON) + +2012-01-27 14:22 Sandro Santilli <strk@keybit.net> + + * [r8944] More test for face splitting and inside holes + +2012-01-27 11:36 Sandro Santilli <strk@keybit.net> + + * [r8943] More test for update of isolated nodes in split-faces. + +2012-01-27 11:05 Sandro Santilli <strk@keybit.net> + + * [r8942] Rewrite test for ST_AddIsoNode (see #1503) + +2012-01-27 11:05 Sandro Santilli <strk@keybit.net> + + * [r8941] Simplify the code looking for face containment in + ST_AddIsoNode + + Fixes bug #1503 for me, altough I didn't handle to produce a + testcase for it. + +2012-01-27 08:18 Sandro Santilli <strk@keybit.net> + + * [r8940] Add test for update of isolated nodes in split-faces. + + Affects both ST_AddEdgeModFace and ST_AddEdgeNewFaces (both work) + +2012-01-26 20:25 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8939] Complete #737 + +2012-01-26 20:19 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8938] Detect asprintf, vasprintf, fseeko + +2012-01-26 18:09 Sandro Santilli <strk@keybit.net> + + * [r8937] Change expectations from tests involving ST_MakeLine + +2012-01-26 17:23 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8936] Clean up and exit when shp file missing + +2012-01-26 16:22 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8932] Fix contact per a message on postgis-users from Markus + Innerebner + +2012-01-26 13:00 Sandro Santilli <strk@keybit.net> + + * [r8931] Add support for linestrings in ST_MakeLine (#1500) + + Affects both the aggregate and the 2-parameters function. + Regression testing included. + Documentation was updated, but lacks examples. + +2012-01-26 12:59 Sandro Santilli <strk@keybit.net> + + * [r8930] Implement lwline_from_lwgeom_array (untested) + +2012-01-26 12:59 Sandro Santilli <strk@keybit.net> + + * [r8929] Don't let ptarray_append_ptarray change read-only + pointarrays + +2012-01-26 12:59 Sandro Santilli <strk@keybit.net> + + * [r8928] Test that mixed dimensionality is not allowed by + ptarray_append_ptarray + +2012-01-26 12:34 Sandro Santilli <strk@keybit.net> + + * [r8927] Add more test for FLAGS_GET_ and FLAGS_SET_ + +2012-01-26 09:16 Sandro Santilli <strk@keybit.net> + + * [r8926] Implement ptarray_append_ptarray, and change its + signature + + This is propedeutic to ticket #1500 + +2012-01-26 08:12 Sandro Santilli <strk@keybit.net> + + * [r8925] Tweak debug messages not to clutter output + +2012-01-25 17:40 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8924] Bump version string forward + +2012-01-25 17:38 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8921] Prep for alpha2 + +2012-01-24 22:23 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8920] SVG empty geometries gives invalid memory alloc (#1038) + +2012-01-24 21:57 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8919] Update shplib to the latest release (1.3.0b3) and stitch + in our special date and logical handling. (#393) + +2012-01-24 19:42 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8917] Double guard against geos versions of 3.4.dev form. + (#1488) + +2012-01-24 18:04 Sandro Santilli <strk@keybit.net> + + * [r8916] Stop WARNING from AddFace about + next_left_edge/next_right_edge + +2012-01-24 17:29 Sandro Santilli <strk@keybit.net> + + * [r8915] Optimize ST_AddEdge*Face* detection of face split + conditions (#1497) + +2012-01-24 17:29 Sandro Santilli <strk@keybit.net> + + * [r8914] Protect DEBUG lines in compile-time conditional + +2012-01-24 17:20 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8913] Test for #1150, null entry in spatial_ref_sys + +2012-01-24 14:03 Sandro Santilli <strk@keybit.net> + + * [r8912] Fix linking bugs with ST_NewEdgesSplit function (#1496) + + Includes test coverage for this other function. + +2012-01-24 11:15 Sandro Santilli <strk@keybit.net> + + * [r8911] Fix edge-linking in ST_ModEdgeSplit (#1496) + + Includes regression test. ST_NewEdgesSplit still needs testing. + +2012-01-24 00:09 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8910] Prevent people from inserting entries in spatial_ref_sys + with no proj4text (#1150) + +2012-01-23 23:27 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8908] Make topology enabled the default + +2012-01-23 23:20 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8907] Allow raster to actually turn on by default + +2012-01-23 22:20 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8906] Move raster/topology status to the bottom of the report + +2012-01-23 22:18 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8905] Report on raster status whether enabled or not + +2012-01-23 21:42 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8904] Push forward the trunk version to match release march + +2012-01-22 20:10 Sandro Santilli <strk@keybit.net> + + * [r8903] Fix ambiguos references (with postgresql 9.x) + +2012-01-22 19:25 Sandro Santilli <strk@keybit.net> + + * [r8902] AddTopoGeometryColumn: check child layer before + incrementing sequence + +2012-01-22 19:13 Sandro Santilli <strk@keybit.net> + + * [r8901] typo + +2012-01-22 15:43 Sandro Santilli <strk@keybit.net> + + * [r8900] TopoGeo_addLineString: fix node crossing, reduce edges + creations + +2012-01-22 12:10 Sandro Santilli <strk@keybit.net> + + * [r8899] Comment typo + +2012-01-21 01:31 Regina Obe <lr@pcorp.us> + + * [r8898] update build extensions to include the make comments if + building from source repo and also that it requires a separate + compile step (until #1490) + +2012-01-20 23:41 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8897] Fix typo + +2012-01-20 23:05 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8896] Make raster on by default and --without-raster the + configuration parameter to disable it. + +2012-01-20 18:14 Regina Obe <lr@pcorp.us> + + * [r8895] fix typo + +2012-01-20 18:14 Regina Obe <lr@pcorp.us> + + * [r8894] Add a plpython example for outputting raster images + +2012-01-20 14:47 Sandro Santilli <strk@keybit.net> + + * [r8893] Have TopoGeometry::Geometry always return a MULTI* + (#1462) + +2012-01-20 14:47 Sandro Santilli <strk@keybit.net> + + * [r8892] Don't let ST_Multi create collections of a single EMPTY + (#1489) + +2012-01-20 10:06 Regina Obe <lr@pcorp.us> + + * [r8891] #1487: add out_db argument to AddRasterConstraints and + DropRasterConstraints documentation so extensions can install + again + +2012-01-20 10:02 Sandro Santilli <strk@keybit.net> + + * [r8890] Test new types in regress/wkt (#1476) + +2012-01-20 09:11 Sandro Santilli <strk@keybit.net> + + * [r8889] Exclude raster_columns from geometry_columns (#1122) + + Add regress test, with a newborn "tickets" testcase for raster + +2012-01-20 08:46 Sandro Santilli <strk@keybit.net> + + * [r8888] Fix a missing return introduced with fix to #547 + +2012-01-20 08:12 Sandro Santilli <strk@keybit.net> + + * [r8886] Change ST_Equals to use the ~= operator (#1453) + + Doing so it will consistently return TRUE for EMPTY-EMPTY, while + previously _ST_Equals returned TRUE but ST_Equals returned FALSE. + + The commit also changes signature of the C function + from 'geomequals' to 'ST_Equals' and marks an SQL 'Equals' + signature as a candidate for dropping before 2.0.0 final + +2012-01-20 08:12 Sandro Santilli <strk@keybit.net> + + * [r8885] Revert "remove ~= from documentation -- we don't want + people using this operator" + + This reverts r8799 + +2012-01-20 07:10 Regina Obe <lr@pcorp.us> + + * [r8884] readme was outdated. + +2012-01-20 05:08 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8881] Update for alpha1? + +2012-01-20 00:11 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8880] Transforming from SRID 4267 to 4326 returns incorrect + result (#1301) + +2012-01-19 23:58 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8879] Stop configure if we don't find perl. (#1484) + +2012-01-19 17:39 Sandro Santilli <strk@keybit.net> + + * [r8878] In 9.1, it is datamoduledir driving module install dir, + not MODULEDIR + +2012-01-19 17:15 Sandro Santilli <strk@keybit.net> + + * [r8877] Have both RTREE and PREPARED_GEOM caches cohexist (#547) + + Fixes a memory leak and improves performances when both p-i-p + and other kind of overlays are requested during the same + statement. + +2012-01-19 17:03 Sandro Santilli <strk@keybit.net> + + * [r8876] Update expected raster intersection results after fix to + #852 + + I've carefully checked the cases and where indeed expecting wrong + results (the point is very close to the raster's convex hull + boundary + but slightly outside, ST_Distance reports 1.58882185807825e-14 + units) + +2012-01-19 09:48 Sandro Santilli <strk@keybit.net> + + * [r8874] Add test for cached version of point_in_ring (#852) + +2012-01-19 08:59 Sandro Santilli <strk@keybit.net> + + * [r8873] Drop use of tolerance in PIP (#852) + + Affects point_in_ring and point_in_ring_rtree. + Includes regress test but not hitting the cache. + +2012-01-19 08:16 Sandro Santilli <strk@keybit.net> + + * [r8872] Do not run the upgrade test if the normal test failed + +2012-01-19 08:16 Sandro Santilli <strk@keybit.net> + + * [r8871] Oops, forgot to cleanup after debugging (triggered + testsuite failure) + +2012-01-18 15:47 Sandro Santilli <strk@keybit.net> + + * [r8870] Rework st_estimated_extent to deal with analyzed empty + tables (#818) + + Still doesn't distinguish between empty and not analyzed recently + (might be improved in that reguard) + +2012-01-18 14:19 Sandro Santilli <strk@keybit.net> + + * [r8869] Drop &Z_support in ST_Summary, see #649 comment:2 + +2012-01-18 14:17 Sandro Santilli <strk@keybit.net> + + * [r8868] Add ST_Summary(geography), "G" flag (#1277), document + (#649) + +2012-01-18 13:46 Sandro Santilli <strk@keybit.net> + + * [r8867] Complete binary IO testing in presence of typmod (#850) + +2012-01-18 13:46 Sandro Santilli <strk@keybit.net> + + * [r8866] Do proper cleanups + +2012-01-18 13:46 Sandro Santilli <strk@keybit.net> + + * [r8865] Check typmod on binary geometry input (#850) + + Testcase will follow + +2012-01-18 10:17 Sandro Santilli <strk@keybit.net> + + * [r8864] Have geography typmod threat unkonwn srid an omitted srid + (#1482) + +2012-01-18 10:17 Sandro Santilli <strk@keybit.net> + + * [r8863] Add --expect switch to save obtained output as expected + + Will help generating testcases + +2012-01-18 10:17 Sandro Santilli <strk@keybit.net> + + * [r8862] Drop the support for multiple expected files (not needed + anymore) + + The support was also broken, btw... + +2012-01-18 08:19 Sandro Santilli <strk@keybit.net> + + * [r8861] Test roundtrip with a binary cursor for both geometry and + geography + + With this commit the binary.sql testcase doesn't test the actual + binary output anymore but rather uses canonical binary output to + copy objects to a temporary file, then uses canonical binary + input + to read the objects again into a new table and then compares the + original and the final tables. + + In order for this to work run_test was modified to pass a + :tmpfile + variable to testcases. Next stop: typmod for canonical binary + input. + + See ticket #850 for more info + +2012-01-17 20:01 Sandro Santilli <strk@keybit.net> + + * [r8860] Implement canonical input-output for geography (#850) + + Note: canonical output is tested, input isn't. + +2012-01-17 19:15 Sandro Santilli <strk@keybit.net> + + * [r8859] Test canonical binary output for geometry (#850) + + NOTE: big-endian machines are expected to fail this new test + please send your actual output for a fix + +2012-01-17 19:15 Sandro Santilli <strk@keybit.net> + + * [r8858] Support alternate expected files + + Useful to test WKB output on different byte-endian machines. + +2012-01-17 19:15 Sandro Santilli <strk@keybit.net> + + * [r8857] Support for binary output (#850) + +2012-01-17 18:04 Sandro Santilli <strk@keybit.net> + + * [r8856] Override geometrytype for geography (#1450). + + The testusite runs without problems so I didn't also add a + geometrytype(text) function [I want the implicit cast!] + +2012-01-17 17:52 Sandro Santilli <strk@keybit.net> + + * [r8855] Run the testsuite again after upgrading (#1326) + +2012-01-17 17:52 Sandro Santilli <strk@keybit.net> + + * [r8854] Reword loading of upgrade scripts + +2012-01-17 17:13 Sandro Santilli <strk@keybit.net> + + * [r8853] Enhance staged install to include raster, topology and + all scripts + + Add an --upgrade switch to regress/run_test in preparation of + regress testing upgrade scripts (#1326) + +2012-01-17 08:57 Sandro Santilli <strk@keybit.net> + + * [r8852] Do not drop legacy getSRID in postgis_drop (#1401) + + This commit reverts r8837 + +2012-01-16 22:26 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8851] Rename lwpoint_interpolate to point_interpolate + +2012-01-16 21:13 Sandro Santilli <strk@keybit.net> + + * [r8850] Snap output of test for #723 to a grid + + The test was failing due to coordinate drifts on 32bit + +2012-01-16 17:37 Sandro Santilli <strk@keybit.net> + + * [r8847] Fix 2.5d split (#745) + +2012-01-16 17:00 Sandro Santilli <strk@keybit.net> + + * [r8846] Keep UTM zone numbers in range, regress-test _ST_BestSRID + (#1234) + +2012-01-16 15:39 Sandro Santilli <strk@keybit.net> + + * [r8845] Add an ST_AsEWKT(text) to prefer geometry over geography + +2012-01-16 14:46 Sandro Santilli <strk@keybit.net> + + * [r8844] Add ST_EWKT for geography type (#675) + +2012-01-16 14:33 Sandro Santilli <strk@keybit.net> + + * [r8843] The official unknown SRID is 0, not -1 + +2012-01-16 14:21 Sandro Santilli <strk@keybit.net> + + * [r8842] Have 'make doc' build the single-page HTML + +2012-01-16 14:04 Sandro Santilli <strk@keybit.net> + + * [r8841] Allow building with gettext 0.14. Patch by Greg Troxel + <gdt@ir.bbn.com> + +2012-01-16 13:56 Sandro Santilli <strk@keybit.net> + + * [r8840] Detect PERL locally + +2012-01-16 13:10 Sandro Santilli <strk@keybit.net> + + * [r8839] Ignore generated extension files + +2012-01-16 12:33 Sandro Santilli <strk@keybit.net> + + * [r8838] Move lwgeom_summary to liblwgeom (#1446) + +2012-01-16 12:25 Sandro Santilli <strk@keybit.net> + + * [r8837] Drop getsrid (#1401) + +2012-01-16 12:10 Sandro Santilli <strk@keybit.net> + + * [r8836] Add test for insertion into typmod-ed table (#1414) + +2012-01-16 11:22 Sandro Santilli <strk@keybit.net> + + * [r8835] Fix WKB output for POINT EMPTY with SRID or higher dims + (#1478) + +2012-01-16 10:34 Sandro Santilli <strk@keybit.net> + + * [r8834] Add WKB round-trip test for TIN + +2012-01-16 10:31 Sandro Santilli <strk@keybit.net> + + * [r8833] Fix reading TRIANGLE EMPTY in WKB form (#1474) + +2012-01-16 10:31 Sandro Santilli <strk@keybit.net> + + * [r8832] Add POLYHEDRALSURFACE roundtrip WKB test + +2012-01-16 10:24 Sandro Santilli <strk@keybit.net> + + * [r8831] Implement lwgeom_same for MULTICURVE and MULTISURFACE + (#1475) + +2012-01-16 10:21 Sandro Santilli <strk@keybit.net> + + * [r8830] Implement lwgeom_same for CURVEPOLYGON types (#1475) + +2012-01-16 10:18 Sandro Santilli <strk@keybit.net> + + * [r8829] Implement lwgeom_same for COMPOUNDCURVE (#1475) + +2012-01-16 10:11 Sandro Santilli <strk@keybit.net> + + * [r8828] Implement lwgeom_same for circularstring (#1475) + +2012-01-16 09:11 Sandro Santilli <strk@keybit.net> + + * [r8827] A CURVEPOLY is also a collection. Fixes #1473. + +2012-01-16 09:11 Sandro Santilli <strk@keybit.net> + + * [r8826] Prevent lwcollection_construct from creating + non-collection types + +2012-01-16 08:25 Sandro Santilli <strk@keybit.net> + + * [r8825] Use a CTE for queries involving largs WKB input. + + Reduces parsing and execution time. + +2012-01-16 08:25 Sandro Santilli <strk@keybit.net> + + * [r8824] Comment out expensive DEBUG lines + +2012-01-16 08:24 Sandro Santilli <strk@keybit.net> + + * [r8823] Downgrade notice of face splitting to debug level + +2012-01-15 20:52 Sandro Santilli <strk@keybit.net> + + * [r8822] Wrap DEBUG output in ifdef POSTGIS_TOPOLOGY_DEBUG (#1469) + +2012-01-15 17:50 Sandro Santilli <strk@keybit.net> + + * [r8821] Make AddTopoGeometryColumn less sequence-number-eager, + regress-test + +2012-01-15 09:25 Regina Obe <lr@pcorp.us> + + * [r8820] put in spaces in ST_InterpolatePoint See Also references + +2012-01-15 09:23 Regina Obe <lr@pcorp.us> + + * [r8819] ditto for ST_LocateBetween - name change flag and minor + other corrections + +2012-01-15 09:10 Regina Obe <lr@pcorp.us> + + * [r8818] put a note ST_LocateAlong name changed (and is a new name + in 2.0 - old name is ST_Locate_Along_Measure) + +2012-01-15 03:59 Regina Obe <lr@pcorp.us> + + * [r8817] link to where to download pre-built cheat sheets + +2012-01-15 03:32 Regina Obe <lr@pcorp.us> + + * [r8816] revise docs about make installing extensions to note that + extensions are now installed by default if compiling against + 9.1+. Also provide an example query to run to verify extensions + are installed. THANKS pramsey -- now if we can only have a real + tagged release that would be SWEET. + +2012-01-15 03:18 Regina Obe <lr@pcorp.us> + + * [r8815] #1401 Goodbye getSRID() + +2012-01-14 13:10 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r8814] Display "Creating Index..." text within the progress + dialog rather than within the shp2pgsql-gui log window. + + This should make it more obvious to users that something is still + happening in the case that + they are building on a index on larger shapefiles which can often + take quite some time. + +2012-01-14 07:37 Regina Obe <lr@pcorp.us> + + * [r8813] change eol from native to LF to try to resolve #1466 + +2012-01-14 07:29 Regina Obe <lr@pcorp.us> + + * [r8812] document --with-gettext=no optionand case why you would + want to do this. Also minor modifications as to use GEOS 3.3.2 + and why you should + +2012-01-14 01:03 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8811] Add ST_InterpolatePoint, deprecate + ST_Locate_Between_Measures and ST_Locate_Along_Measure. Document + new functions. Alter regressions and docs to use AsText instead + of AsEWKT. + +2012-01-14 00:49 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r8810] Use normal autoconf convention of using #define to + determine whether or not GDALFPOLYGONIZE is present, rather than + always having it present and setting its value to either 0 or 1. + +2012-01-14 00:49 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r8809] Switch liblwgeom to use the POSTGIS_* defines already + generated by configure, rather than passing them in directly. + + Similar to my previous commit, however here the aim is that by + moving the logic outside of make then we can + potentially allow other generators (such as CMake) to detect and + use other compilers rather than embedding + specific -D flags into the command line. + +2012-01-14 00:49 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r8808] Switch NLS build to use the in-built ENABLE_NLS define + rather than USE_NLS. + + The key concept here is that we eliminate all logic from the + Makefile and put + it in the build system (e.g. configure). By having the logic at + this higher + layer, we make it much easier to transition to another build + system in future + such as CMake. + +2012-01-14 00:49 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r8807] Enable configure to accept the additional parameter + --with-gettext=no to disable NLS builds. + + This makes it possible to explicitly disable builds at configure + time if required for + platforms where this causes problems such as Windows (see bug + #748). + +2012-01-14 00:48 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r8806] Fix incorrect camel-casing for HAVE_JSON within + configure.ac. + +2012-01-14 00:48 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r8805] Fix up AC_DEFINE macros in configure.ac that don't have a + description. + + While autoheader emits a warning, it actually fails and does not + regenerate + postgis_config.h.in. Along with this fix, we commit an updated + version of + postgis_config.h created from a fresh invocation of autoheader + minus the + PACKAGE_* macros. + +2012-01-13 17:34 Sandro Santilli <strk@keybit.net> + + * [r8804] Add test for creating tables with circularstring typmod + (#1085) + +2012-01-13 17:33 Sandro Santilli <strk@keybit.net> + + * [r8803] First draft of a test for typmod (#1085) + + This version simply creates the tables and checks + geometry_columns. + Should be enhanced to test effectiveness of constraints. + +2012-01-13 16:28 Regina Obe <lr@pcorp.us> + + * [r8802] remove dangling reference to geometry_same + +2012-01-13 16:23 Sandro Santilli <strk@keybit.net> + + * [r8801] Virtualize ``make'' calls (#1464) + +2012-01-13 15:54 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r8800] Rename geometry column header in shp2pgsql-gui to "geo + column" to reduce its visible width based upon feedback from + Regina. + +2012-01-13 15:50 Regina Obe <lr@pcorp.us> + + * [r8799] remove ~= from documentation -- we don't want people + using this operator + +2012-01-13 13:31 Sandro Santilli <strk@keybit.net> + + * [r8798] Add all signature in the current repository + +2012-01-13 11:34 Sandro Santilli <strk@keybit.net> + + * [r8797] Add more signatures found in a more recent dump of mine + +2012-01-13 11:29 Sandro Santilli <strk@keybit.net> + + * [r8796] Make verbose output of postgis_restore.pl more useful for + maintainance + + It will now avoid to collapse all spaces to keep the door open + for + better parsing in the future and to be more human readable. + +2012-01-13 10:00 Sandro Santilli <strk@keybit.net> + + * [r8795] Make ~= operator GIST-indexable, following existing + documentation + + NOTE: it takes a dump/reload for this to be in effect. + +2012-01-12 21:43 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8794] Add in an offset option to ST_LocateBetween + +2012-01-12 19:55 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8793] Add support for MULTIPOINT and POINT to ST_LocateBetween + +2012-01-12 19:07 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8792] Flip ST_LocateBetween to use the same LRS code as + ST_LocateBetweenElevations + +2012-01-12 17:41 Sandro Santilli <strk@keybit.net> + + * [r8791] Add regress test for topology.AddFace robustness (see + #1383) + +2012-01-12 17:06 Sandro Santilli <strk@keybit.net> + + * [r8790] Fix lw_dist2d_pt_seg(B, AB), see #1459 + + Includes regress testing. Should also fix #1383 + +2012-01-12 11:21 Sandro Santilli <strk@keybit.net> + + * [r8789] Complete tests for higher coordinate dimensions (#1455) + +2012-01-12 11:21 Sandro Santilli <strk@keybit.net> + + * [r8788] Fix bug in dimension computer for collection WKT. + + The parser got confused by inner M letters. + This commit also improves speed early breaking the loop over WKT. + +2012-01-12 11:20 Sandro Santilli <strk@keybit.net> + + * [r8787] Add tests for higher coordinate dimensions (#1455) + + GEOMETRYCOLLECTION still fails + +2012-01-12 08:52 Sandro Santilli <strk@keybit.net> + + * [r8786] Test roundtrip of WKT. Higher dimensions still needed + (#1455) + +2012-01-12 08:52 Sandro Santilli <strk@keybit.net> + + * [r8785] Fix a bug in gserialized_read_gbox_p reading garbage in + EMPTY point + + Includes cunit test. Fixes #1458. + +2012-01-12 08:51 Sandro Santilli <strk@keybit.net> + + * [r8784] gbox_float_round: do not attempt to round M when not + present + +2012-01-12 08:51 Sandro Santilli <strk@keybit.net> + + * [r8783] Expose gbox_float_round to liblwgeom API + +2012-01-11 19:45 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8782] Change references to BOX2DFLOAT4 to just BOX2D and remove + the struct. Ding dong. + +2012-01-11 19:20 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8781] Tie astext(geography) and asbinary(geography) directly to + the lwgeom_ C functions, without a cast + +2012-01-11 18:53 Sandro Santilli <strk@keybit.net> + + * [r8780] Allow higher dimensions in GeomFromWKB (#1452) + + Includes regress test for WKB roundtrip + (failing as expected with point empty) + +2012-01-11 18:45 Sandro Santilli <strk@keybit.net> + + * [r8779] Fix bug in gbox_same -> lwgeom_same -> ST_OrderingEquals + (#1454) + + Adds regression test for lwgeom_same and ST_OrderingEquals + +2012-01-11 17:18 Sandro Santilli <strk@keybit.net> + + * [r8778] Fix EMPTY ~= EMPTY to return TRUE (#1453) + + This also fixes ST_OrderingEquals for empty geometries and + adds the concept of NULL boxes to represent EMPTY boxes. + + ST_Equals is still broken as it uses the overlap operator + instead. + +2012-01-11 17:18 Sandro Santilli <strk@keybit.net> + + * [r8777] Encode dependency of libpgcommon on postgis_config.h + +2012-01-11 17:18 Sandro Santilli <strk@keybit.net> + + * [r8776] Xref ST_AsBinary to its reverse ST_GeomFromWKB + +2012-01-11 15:57 Sandro Santilli <strk@keybit.net> + + * [r8775] Add paranoid test of another malformed WKB found in #168 + +2012-01-11 15:51 Sandro Santilli <strk@keybit.net> + + * [r8774] Drop ST_AsBinary(text) wrapper, removed in previous + commits + +2012-01-11 14:50 Sandro Santilli <strk@keybit.net> + + * [r8773] Add documentation about enhancements in ST_AsBinary + (#288) + +2012-01-11 14:46 Sandro Santilli <strk@keybit.net> + + * [r8772] Drop geography-specific C-side of AsBinary function. + Proxy to geometry. + + See #288 + +2012-01-11 12:30 Sandro Santilli <strk@keybit.net> + + * [r8771] Limit geometry_columns view definition within 80 columns. + + This is to avoid issues like #1449 + +2012-01-11 11:17 Sandro Santilli <strk@keybit.net> + + * [r8770] Add regress test for WKB (#1448) and enable the existing + one for WKT + +2012-01-11 11:17 Sandro Santilli <strk@keybit.net> + + * [r8769] Unlease higher dimensions in ST_AsBinary, using SQL/MM + (#288) + +2012-01-11 11:16 Sandro Santilli <strk@keybit.net> + + * [r8768] ST_AsText item is an enhancement, not a new feature + +2012-01-11 10:40 Sandro Santilli <strk@keybit.net> + + * [r8767] Add note aboute AsText support for higher dimension + +2012-01-11 10:34 Sandro Santilli <strk@keybit.net> + + * [r8766] Unleash SQL/MM WKT returned by ST_AsText (#287) + +2012-01-11 08:36 Sandro Santilli <strk@keybit.net> + + * [r8763] Use $(MAKE) to invoke whatever make was used by builder + +2012-01-11 08:26 Sandro Santilli <strk@keybit.net> + + * [r8760] Update HARD UPGRADE section, mention --with-topology + +2012-01-11 02:27 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8759] Try an older bash syntax for robe? + +2012-01-10 23:22 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8758] Add ST_LocateAlong support for multipoints too + (completeness) + +2012-01-10 23:14 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8757] Bind ST_LocateAlong() to the new LRS function that + supports offsets. + +2012-01-10 23:04 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8756] svn:ignore properties + +2012-01-10 23:04 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8755] Spacing, yes + +2012-01-10 22:20 Regina Obe <lr@pcorp.us> + + * [r8754] #1444 fix typo in command (should be command not comand) + +2012-01-10 21:51 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8753] Bring the extensions into the autoconf environment + +2012-01-10 19:36 Bborie Park <bkpark at ucdavis.edu> + + * [r8752] Fixed incorrect call to rt_raster_geopoint_to_cell in + rt_band_load_offline_data and added additional debug messages + +2012-01-10 18:45 Bborie Park <bkpark at ucdavis.edu> + + * [r8751] Fixed incorrect use of rt_band_destroy when loading + offline band data. ALso added rules to raster_columns and + raster_overviews to gracefully handle insert/update/delete. + +2012-01-10 18:18 Bborie Park <bkpark at ucdavis.edu> + + * [r8750] Fixed double free of memory when using out-of-database + bands + +2012-01-10 18:12 Sandro Santilli <strk@keybit.net> + + * [r8749] Add rules on geometry_columns view to tolerate + insert/update/delete + + Fixes OGR, see #1426. Raises no warning on operation (it should). + This commit includes changes in postgis_proc_upgrade.pl to retain + rules. + +2012-01-10 14:58 Sandro Santilli <strk@keybit.net> + + * [r8748] Reflect type of empty from ST_Dimension (#1441) + + No existing testcase fail, no new testcase is added. + This change doesn't invalidate any part of the reference manual. + Reference manual isn't updated. + + Signed-off-by: Charlie Brown + +2012-01-10 13:17 Sandro Santilli <strk@keybit.net> + + * [r8747] Use a standard lwcollection_allows_subtype function to + guard against bad input. + + Fixes #698 (and #1445 in a better way) + +2012-01-10 12:28 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r8746] If the database settings are incorrect when attempting an + import, display the connection settings + dialog. + + Also a minor bugfix: if the dialog is cancelled by closing the + window, ensure that any unset + fields are reset back to blank. + +2012-01-10 12:28 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r8745] Switch shp2pgsql-gui to COPY mode by default for + increased speed; the user doesn't really care + what form the output takes when it's being loaded into the + database directly rather than via + a file. + +2012-01-10 12:28 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r8744] Raise an error within shp2pgsql-gui if the user clicks + "Import" without having added any files to the list. + +2012-01-10 12:28 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r8743] Alter shp2pgsql-gui so that we use one connection per + file; this makes tracking error state + on the server considerably easier, since upon abort we just + disconnect from the server rather + than trying to figure out what state we are in and handle it + appropriately. + +2012-01-10 11:36 Sandro Santilli <strk@keybit.net> + + * [r8742] Check type of elements added to multi geometries. Fixes + #1445. + + Includes regress testing both at the liblwgeom and postgis + levels. + +2012-01-10 10:06 Sandro Santilli <strk@keybit.net> + + * [r8741] Add "M" type modifiers on elements of GEOMETRYCOLLECTION + + Reflects specs in doc/ZMgeoms.txt and satisfies the parser. + Closes ticket #724. + +2012-01-10 08:32 Sandro Santilli <strk@keybit.net> + + * [r8740] Other generated files + +2012-01-10 08:28 Sandro Santilli <strk@keybit.net> + + * [r8739] Ignore new generated files + +2012-01-10 08:26 Sandro Santilli <strk@keybit.net> + + * [r8738] Add images-clean rule and perform the cleanup on + maintainer-clean + +2012-01-10 07:25 Regina Obe <lr@pcorp.us> + + * [r8737] put in missing title tag + +2012-01-10 07:12 Regina Obe <lr@pcorp.us> + + * [r8736] put in missing end paragraph end tag + +2012-01-10 07:03 Regina Obe <lr@pcorp.us> + + * [r8735] fix typo + +2012-01-10 06:53 Regina Obe <lr@pcorp.us> + + * [r8734] #1442: Add sections on installing, upgrading and loading + data into tiger geocoder. Got at least 2 people who seem confused + about how to upgrade their tiger installs and assume it follows + the same steps as the rest of PostGIS. + +2012-01-09 22:43 Bborie Park <bkpark at ucdavis.edu> + + * [r8733] Added column "out_db" to raster_columns. "out_db" is of + type boolean[] with each element indicating if that band of same + index is out-of-database. Updated relevant AddRasterConstraints + and DropRasterConstraints functions. Related ticket is #1440. + +2012-01-09 20:17 Regina Obe <lr@pcorp.us> + + * [r8732] put in svn Author Date Id Revision keywords + +2012-01-09 20:08 Bborie Park <bkpark at ucdavis.edu> + + * [r8731] Make the data of externally-loaded band internally owned + so a call to rt_band_destroy() properly frees the memory. + +2012-01-09 19:48 Bborie Park <bkpark at ucdavis.edu> + + * [r8730] Add read-only support for band data located outside the + database in raster files. All "get" and analysis functions should + work for out of database bands. Related ticket is #1440. Also + added a test raster file for use by an out of db band and future + use for raster2pgsql loader regression tests. + +2012-01-09 19:05 Bborie Park <bkpark at ucdavis.edu> + + * [r8729] Removed garbage whitespace. + +2012-01-09 19:02 Bborie Park <bkpark at ucdavis.edu> + + * [r8728] Added conditional check to ST_Intersects(raster, int, + raster, int) to deal with STRICT being set on + _st_intersects(raster, int, raster, int). Fixes regression caused + in r8714. + +2012-01-09 18:50 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8727] Remove whitespace + +2012-01-09 18:27 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8726] Interim progress on LRS work. + +2012-01-09 18:01 Sandro Santilli <strk@keybit.net> + + * [r8725] Change lwgeom_is_empty to return spatial emptiness (#671) + +2012-01-09 17:55 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r8724] Allow manual resizing of the filename column within + shp2pgsql-gui if required, as per request from Regina. + +2012-01-09 17:27 Sandro Santilli <strk@keybit.net> + + * [r8723] Further cleanup of ST_CollectionExtract documentation + +2012-01-09 17:10 Sandro Santilli <strk@keybit.net> + + * [r8722] Document new ST_CollectionExtract behavior + +2012-01-09 17:01 Sandro Santilli <strk@keybit.net> + + * [r8721] Switch back ST_CollectionExtract to return EMPTY rather + than NULL on no matches (#835) + + This behavior seems closer to the one requested in original #457 + testcase, and is still consistent. Is also closer to + documentation. + +2012-01-09 17:01 Sandro Santilli <strk@keybit.net> + + * [r8720] Add lwgeom_construct_empty API call + +2012-01-09 17:01 Sandro Santilli <strk@keybit.net> + + * [r8719] Implement lwcompound_construct_empty + +2012-01-09 16:20 Sandro Santilli <strk@keybit.net> + + * [r8718] Alwas return NULL on type miss from ST_CollectionExtract + (#835) + +2012-01-09 16:20 Sandro Santilli <strk@keybit.net> + + * [r8717] Return typed empties from lwcollection_extract + +2012-01-09 15:27 Sandro Santilli <strk@keybit.net> + + * [r8716] Distribute comments in tarball. Stop distributing pdf or + html (#626) + +2012-01-09 15:03 Sandro Santilli <strk@keybit.net> + + * [r8715] Fix compiler warnings + +2012-01-09 15:01 Bborie Park <bkpark at ucdavis.edu> + + * [r8714] Make _ST_Intersects(raster, raster) STRICT as per + comments in #1412. + +2012-01-09 14:56 Regina Obe <lr@pcorp.us> + + * [r8713] #1392: Can't geocode intersecting highways or areas where + no zip available + +2012-01-09 13:36 Sandro Santilli <strk@keybit.net> + + * [r8712] Build the libtool wrapper script version of raster2pgsql + +2012-01-09 12:48 Regina Obe <lr@pcorp.us> + + * [r8711] Add Maria Arias de Reyna to credits + +2012-01-09 11:01 Sandro Santilli <strk@keybit.net> + + * [r8710] Update Java components to support SRID<=0 as unknown SRID + (#1221) + + This is first patch by Maria Arias de Reyna taking on + maintainance + of the Java components. It includes tweaks in README file and + a new maven based build system. It also includes some indenting + changes. + +2012-01-09 10:34 Sandro Santilli <strk@keybit.net> + + * [r8709] Fix memory leak in shapefile loader (#1436) + +2012-01-09 07:52 Regina Obe <lr@pcorp.us> + + * [r8707] fix typo in extension version + +2012-01-08 23:32 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r8706] Commit reworked version of shp2pgsql-gui to the + repository. + + As per my email to postgis-devel, this commit contains a major + reworking + of the inner core, with many bugfixes. The primary changes are: + + - Elimination of FILENODE, since we can just use pointers to + SHPLOADERCONFIG + + - Abstract the configuration structures from the GUI interface + + - Restrict entry to either drag/drop or file chooser + + - Instead of constantly destroying/creating new dialogs, create + them once and then just show/hide them (in particular this + enables the file chooser to open at its previous directory) + + - Add separate connection details and progress bar dialogs + + - Rework both internals and GUI in preparation for adding dumper + support + + Note that the dumper integration changes are being worked on + separately + and will be included in a later commit. + +2012-01-08 19:15 Regina Obe <lr@pcorp.us> + + * [r8705] Fix typo in manual and more description about schema. + Evidentially some people do try to read the manual and make sense + of it as demonstrated here: + http://gis.stackexchange.com/questions/18254/loading-a-raster-into-a-postgis-2-0-database-on-windows + +2012-01-08 16:28 Bborie Park <bkpark at ucdavis.edu> + + * [r8704] Code cleanup related to registering and deregistering + GDAL drivers + +2012-01-08 07:57 Regina Obe <lr@pcorp.us> + + * [r8703] lots of corrections, also add integer[] arg recognition + +2012-01-08 07:29 Regina Obe <lr@pcorp.us> + + * [r8702] more cleanup -- issue with raster / raster functions and + output convexhull instead of raster when result type is raster or + geometry + +2012-01-08 06:49 Regina Obe <lr@pcorp.us> + + * [r8701] revise to recognize array of raster arguments + +2012-01-08 06:26 Regina Obe <lr@pcorp.us> + + * [r8700] get rid of dropraster addrastercolumn and replace with + create table, apply constraints. Still a lot of cleanup to go + +2012-01-07 19:28 Regina Obe <lr@pcorp.us> + + * [r8699] #1435: fix function proto typo of TopoGeo_AddPoint in + docs + +2012-01-07 19:24 Regina Obe <lr@pcorp.us> + + * [r8698] fix typo in version number + +2012-01-07 19:04 Regina Obe <lr@pcorp.us> + + * [r8697] change alpha1 to a14. It appears we won't be releasing an + alpha1 this weekend bah. + +2012-01-07 19:02 Regina Obe <lr@pcorp.us> + + * [r8696] update instructions to reflect changes that need to be + made to extensions before tagged release. Hopefully we can + automate this part in the future -- but have no clue how. + +2012-01-07 15:24 Bborie Park <bkpark at ucdavis.edu> + + * [r8695] Have rt_raster_from_gdal_dataset attempt to determine the + SRID of the raster using OSR. + +2012-01-07 14:05 Bborie Park <bkpark at ucdavis.edu> + + * [r8694] Additional tweaks for the NODATA values constraint. + Continues changes made in r8691. + +2012-01-07 00:55 Regina Obe <lr@pcorp.us> + + * [r8693] bump version to alpha1 in preparation for alpha1 shuttle + launch + +2012-01-07 00:47 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8692] Move geojson test into geojson.sql file + +2012-01-07 00:42 Bborie Park <bkpark at ucdavis.edu> + + * [r8691] Fixed handling of NODATA value constraint as band with no + NODATA was being constrained with the value of zero. + +2012-01-07 00:29 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8690] ST_GeomFromGeoJSON - Malformed GeoJSON causes SIGSEGV in + postgres process (#1434) + +2012-01-06 21:39 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8689] Move offset curve generation into liblwgeom with other + geos functionality + +2012-01-06 17:35 Regina Obe <lr@pcorp.us> + + * [r8688] fix tag typo + +2012-01-06 16:29 Regina Obe <lr@pcorp.us> + + * [r8687] example of AddRasterConstraint that takes listing of + constraints to apply + +2012-01-06 15:35 Regina Obe <lr@pcorp.us> + + * [r8686] Accidentally took out ST_WKTToSQL during #1443. + ST_WKTToSQL is documented SQL/MM alias (extension didn't install + as a result since the documentation comment installation failed) + +2012-01-05 22:10 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8685] Add files to svn:ignore + +2012-01-05 21:18 Bborie Park <bkpark at ucdavis.edu> + + * [r8684] Added shortcut mechanism for copying data in + rt_raster_from_gdal_dataset() when the natural block width is the + raster width. Enhanced testing in testapi.c. + +2012-01-05 20:52 Bborie Park <bkpark at ucdavis.edu> + + * [r8683] Syntax cleanup as part of memory bugs audit. Related to + ticket #1432. This should be the last of it for now. + +2012-01-05 20:31 Regina Obe <lr@pcorp.us> + + * [r8682] #1433: Part 2 - merge what is left of sqlmm.sql.in.c into + postgis.sql.in.c + +2012-01-05 20:13 Bborie Park <bkpark at ucdavis.edu> + + * [r8681] Additional regression tests for ST_AsGDALRaster, + ST_GDALDrivers, ST_AsRaster, ST_Resample, ST_Metadata. Syntax + cleanup in rt_pg.c and testwkb.c + +2012-01-05 19:56 Regina Obe <lr@pcorp.us> + + * [r8680] #1433: part 1 -- get rid of SE functions + +2012-01-05 18:59 Bborie Park <bkpark at ucdavis.edu> + + * [r8679] Memory bug fixes and additional regression tests for + ST_SummaryStats, ST_Histogram, ST_ValueCount, ST_Reclass and + ST_Quantile. Ticket is #1432. + +2012-01-05 16:10 Sandro Santilli <strk@keybit.net> + + * [r8678] Switch memory context back before returning in + RASTER_bandmetadata + + Fixes second case in #1432 + +2012-01-05 08:15 Sandro Santilli <strk@keybit.net> + + * [r8677] It takes GEOS-3.3.2 for a sane topology (noding fixes in + there) + +2012-01-05 07:59 Regina Obe <lr@pcorp.us> + + * [r8676] #1430: create topology_drop_before and + topology_drop_after to allow changing names of input args and + allow changing functions to use default args + +2012-01-05 07:51 Regina Obe <lr@pcorp.us> + + * [r8675] svn tags + +2012-01-04 22:30 Sandro Santilli <strk@keybit.net> + + * [r8674] Fix deallocation of terminating NULL in + RASTER_asGDALRaster (#1432) + +2012-01-04 21:38 Sandro Santilli <strk@keybit.net> + + * [r8673] Work around a PostgreSQL 8.4+ bug with CREATE INTO + (#1431) + +2012-01-04 20:50 Sandro Santilli <strk@keybit.net> + + * [r8672] Document topology.toTopoGeometry (#1017) + +2012-01-04 18:33 Sandro Santilli <strk@keybit.net> + + * [r8671] Complete implementation and regress test for toTopoGeom + (#1017) + + You can start playing with this. Lacks documentation. + Expect troubles. Feel free to report them. + +2012-01-04 18:17 Sandro Santilli <strk@keybit.net> + + * [r8670] Implement TopoGeometry->Geometry converter for COLLECTION + types + +2012-01-04 17:58 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8669] Don't allow --with-topology when GEOS version < 3.3 + +2012-01-04 02:07 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8668] Try to make json-c detection slightly more automatic. + +2012-01-03 23:52 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8667] Change to GNU macro NAN. Still not feeling The + Confidence. + +2012-01-03 23:42 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8666] Make numerical stability fix actually be present + +2012-01-03 23:28 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8665] Hm, nan() function? + +2012-01-03 23:24 Sandro Santilli <strk@keybit.net> + + * [r8664] Document TopoGeo_AddPolygon + +2012-01-03 23:17 Sandro Santilli <strk@keybit.net> + + * [r8663] Implement and regress-test TopoGeo_addPolygon + +2012-01-03 22:07 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8662] Make ST_Azimuth(p1, p1) return NULL and make + ST_Project(p1, 0, NULL) return p1. + +2012-01-03 21:30 Sandro Santilli <strk@keybit.net> + + * [r8661] ST_Split was implemented - a lot more to remove from TODO + +2012-01-03 20:55 Sandro Santilli <strk@keybit.net> + + * [r8660] Change parameter names to use the "athing" convention. + See #1427 + +2012-01-03 20:48 Sandro Santilli <strk@keybit.net> + + * [r8659] Fix typo in exception message, change signature of + TopoGeo_addPolygon + +2012-01-03 20:31 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8658] Reorganize SQL definitions a bit: type creation at the + start, indexes and operators after, then other stuff. Probably + further ordering would be C-stuff before PL/PgSQL stuff. + +2012-01-03 20:24 Sandro Santilli <strk@keybit.net> + + * [r8657] Test invalid calls to topogeo_addpoint + +2012-01-03 20:04 Sandro Santilli <strk@keybit.net> + + * [r8656] Document TopoGeo_addLineString + +2012-01-03 19:21 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8655] Change units to radians and add some tests (#657 and + #1305) + +2012-01-03 18:41 Sandro Santilli <strk@keybit.net> + + * [r8654] Implement and regress-test TopoGeo_AddLineString + +2012-01-03 18:34 Bborie Park <bkpark at ucdavis.edu> + + * [r8653] Removed DROP VIEW statements as per suggestion by robe in + ticket #1422. + +2012-01-03 10:52 Sandro Santilli <strk@keybit.net> + + * [r8652] Document TopoGeo_addPoint + +2012-01-03 10:39 Sandro Santilli <strk@keybit.net> + + * [r8651] Add regression test for TopoGeo_AddPoint + +2012-01-03 10:10 Sandro Santilli <strk@keybit.net> + + * [r8650] Move TopoGeom_addXXX functions to populate.sql and refine + signatures + + Implement TopoGeom_addPoint (misses regression testing yet) + +2012-01-03 09:49 Sandro Santilli <strk@keybit.net> + + * [r8649] Don't consider the old self edge when checking integrity + + Fixes a bug introduced by previous commit. + +2012-01-03 09:44 Sandro Santilli <strk@keybit.net> + + * [r8648] Don't consider shared nodes as edge intersections. Fixes + #1428. + +2012-01-02 06:59 Bborie Park <bkpark at ucdavis.edu> + + * [r8647] Renamed legacy.sql.in.c to rtpostgis_legacy.sql.in.c to + not conflict with postgis' legacy.sql. Associated ticket is + #1422. + +2012-01-02 00:31 Regina Obe <lr@pcorp.us> + + * [r8646] #722 more regress fixes for GeomFromText + +2012-01-02 00:25 Regina Obe <lr@pcorp.us> + + * [r8645] #722: regress replace GeomFromText with ST_GeomFromText + +2012-01-01 23:42 Regina Obe <lr@pcorp.us> + + * [r8644] #722: Good bye GeomFromWKB, GeomFromText + +2012-01-01 21:04 Bborie Park <bkpark at ucdavis.edu> + + * [r8643] Added legacy.sql which adds renamed and removed columns + to raster_columns and raster_overviews. This will allow 3rd party + software that hasn't been updated to the current structures of + raster_columns and raster_overviews to still operate + successfully. + +2012-01-01 15:58 Regina Obe <lr@pcorp.us> + + * [r8642] #961: Change ST_GeoHash to use default args + +2012-01-01 15:41 Regina Obe <lr@pcorp.us> + + * [r8641] update to include ST_Azimuth for geography -- still need + example. Also provide example for using degrees + +2012-01-01 15:22 Regina Obe <lr@pcorp.us> + + * [r8640] #961: ST_AsGeoJSON change to use default args + +2012-01-01 14:39 Regina Obe <lr@pcorp.us> + + * [r8639] over dropped ST_AsKML protos + +2012-01-01 14:10 Regina Obe <lr@pcorp.us> + + * [r8638] changed name of prec to maxdecimaldigits for ST_AsX3D to + be consistent with other ST_As* functions, change ST_AsKML to use + default args + +2012-01-01 13:28 Regina Obe <lr@pcorp.us> + + * [r8637] fix incorrect arg name in ST_AsGML + +2012-01-01 13:24 Regina Obe <lr@pcorp.us> + + * [r8636] #722: Remove all functions with ST_ equivalents from core + postgis.sql. Good bye SetSRID + +2012-01-01 04:38 Regina Obe <lr@pcorp.us> + + * [r8635] #1423: ST_AsGML regress fixes -- bah revert last change + evidentally '' and NULL prefix do not mean the same thing. + +2012-01-01 03:41 Regina Obe <lr@pcorp.us> + + * [r8634] #1423 revision -- put back the strict but set default + prefix to '' AND NULLIF it in the function + +2012-01-01 03:28 Regina Obe <lr@pcorp.us> + + * [r8633] #1423 -- fix for geography ST_AsGML - take off strictness + if we allow null for prefix + +2012-01-01 03:27 Regina Obe <lr@pcorp.us> + + * [r8632] #1423: ST_AsGML fix - Can't have strict on funcs that + take default args where a default arg defaults to NULL. Really :) + +2012-01-01 02:57 Regina Obe <lr@pcorp.us> + + * [r8631] forgot a ST_AsGML drop version,geometry version + +2012-01-01 01:40 Bborie Park <bkpark at ucdavis.edu> + + * [r8630] Added support for attempting to identify the EPSG from a + raster's metadata if SRID is not provided with -s. If unable to + get geotransform matrix from raster, use generic default of (0, + 1, 0, 0, 0, -1). + + Associated ticket is #1421 + +2012-01-01 01:26 Regina Obe <lr@pcorp.us> + + * [r8629] #961: Change ST_AsGML to use default args + +2011-12-31 09:47 Sandro Santilli <strk@keybit.net> + + * [r8628] Document new optional arguments to AddNode + +2011-12-31 09:47 Sandro Santilli <strk@keybit.net> + + * [r8627] topology.AddNode: add 2 additional optional arguments to + allow splitting edges and computing containing_face + +2011-12-31 09:47 Sandro Santilli <strk@keybit.net> + + * [r8626] Add parameter names + +2011-12-31 09:47 Sandro Santilli <strk@keybit.net> + + * [r8625] Use DEBUG level for printing SQL being executed... + +2011-12-31 04:45 Regina Obe <lr@pcorp.us> + + * [r8624] bump up release numbers + +2011-12-31 04:36 Regina Obe <lr@pcorp.us> + + * [r8623] forgot altitude arg for hillshade + +2011-12-30 15:52 Regina Obe <lr@pcorp.us> + + * [r8622] quickly change the options name arg to agree with + ST_AsGML docs + +2011-12-30 15:43 Regina Obe <lr@pcorp.us> + + * [r8621] #1415 -- beginning support for options -- expose the + currently useless opts flag + +2011-12-30 13:23 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8620] Stub in ST_LocateAlong and ST_LocateBetween for + implementation before 2.0 + +2011-12-30 09:24 Regina Obe <lr@pcorp.us> + + * [r8619] put in default values for ST_AsSVG geography + +2011-12-30 09:06 Regina Obe <lr@pcorp.us> + + * [r8618] change ST_AsSVG(text) to explicilty list all args + otherwise upgrade script fails -- since old signature exists + causing ambiguous conflict during install. + +2011-12-30 08:48 Regina Obe <lr@pcorp.us> + + * [r8617] change ST_AsSVG to use default args and support named + args. Also correct misstatement in geography code as to the + ordering of args thought that ordering makes more logical sense + to me (it ain't the way it is) + +2011-12-29 21:00 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8616] Conditionally drop loader test tables (requires + PostgreSQL >= 8.2 to support IF EXISTS syntax) + +2011-12-29 20:32 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8615] Fix postgis_valid_typmod to use gserialized* as an input + instead of lwgeom* to get past in/out memory management issues + (#1413) + +2011-12-29 18:13 Sandro Santilli <strk@keybit.net> + + * [r8614] Retain type of TopoGeometry objects defined by NO element + (#1017) + + Includes regression tests for conversion of typed empty objects + from simple to topological model. + +2011-12-29 18:01 Sandro Santilli <strk@keybit.net> + + * [r8613] Consider TopoElements of type 0 as empty, allow + CreateTopoGeom calls w/out a TopoElementArray to construct + empties (#1017) + +2011-12-29 11:18 Sandro Santilli <strk@keybit.net> + + * [r8612] Test more TopoGeometry creation + +2011-12-29 10:52 Sandro Santilli <strk@keybit.net> + + * [r8611] CreateTopoGeom: tweak error message on out-of-range + TopoGeometry type + +2011-12-29 10:44 Sandro Santilli <strk@keybit.net> + + * [r8610] Complete parameter names + +2011-12-29 07:40 Sandro Santilli <strk@keybit.net> + + * [r8609] Typos and argument names + +2011-12-29 07:39 Sandro Santilli <strk@keybit.net> + + * [r8608] Honour verbosity for database initialization errors + +2011-12-29 07:04 Sandro Santilli <strk@keybit.net> + + * [r8607] Tabs to spaces, a few TODO items... + +2011-12-29 07:04 Sandro Santilli <strk@keybit.net> + + * [r8606] Put overridden (for topology) spatial predicates in their + own file + +2011-12-29 06:48 Sandro Santilli <strk@keybit.net> + + * [r8605] topology.toTopoGeom: add type compatibility checks + (#1017) + +2011-12-29 06:05 Sandro Santilli <strk@keybit.net> + + * [r8604] Add geometry parameter names to functions + +2011-12-28 16:51 Bborie Park <bkpark at ucdavis.edu> + + * [r8603] Removed STRICT from various ST_Intersects functions and + changed the costs of calling ST_Intersects to 1000. Related + ticket is #1410. + +2011-12-28 15:45 Bborie Park <bkpark at ucdavis.edu> + + * [r8602] Force initialization of output GDAL raster from + rt_raster_gdal_warp to band's NODATA value. Also, spelling + correction. + +2011-12-28 14:07 Regina Obe <lr@pcorp.us> + + * [r8601] I have difficulty with simple math + +2011-12-28 13:59 Regina Obe <lr@pcorp.us> + + * [r8600] more description of over view + +2011-12-28 11:01 Sandro Santilli <strk@keybit.net> + + * [r8599] Drop spurious white spaces. Should fix #1409. Thanks + Peter Clark. + +2011-12-28 02:19 Bborie Park <bkpark at ucdavis.edu> + + * [r8598] Correct output of INSERT statements for overviews in + raster2pgsql.c. Associated ticket is #1404. Aslo minor code + formatting and additional code checks in rtpostgis.sql.in.c + +2011-12-27 16:37 Regina Obe <lr@pcorp.us> + + * [r8597] oops missing tag -- removed other copy paste mistakes + +2011-12-27 16:33 Regina Obe <lr@pcorp.us> + + * [r8596] document ST_HillShade (still need to put in examples) + +2011-12-27 15:31 Regina Obe <lr@pcorp.us> + + * [r8595] norm is right - powers of 2 are better especially since + my file tiles are in powers of 2 so don't get scrap tiles + +2011-12-27 06:32 Regina Obe <lr@pcorp.us> + + * [r8594] link to npgsql download site. + +2011-12-27 06:27 Regina Obe <lr@pcorp.us> + + * [r8593] fix typo and provide link to java jdbc download site + +2011-12-27 06:04 Regina Obe <lr@pcorp.us> + + * [r8592] link to raster applications section that demonstrates how + to use these functions in an application + +2011-12-27 06:01 Regina Obe <lr@pcorp.us> + + * [r8591] replace java example with a simpler more useful one + +2011-12-27 05:29 Regina Obe <lr@pcorp.us> + + * [r8590] provide a java console app example + +2011-12-26 22:22 Regina Obe <lr@pcorp.us> + + * [r8589] more description + +2011-12-26 22:10 Regina Obe <lr@pcorp.us> + + * [r8588] c# example using ST_AsPNG + +2011-12-26 20:31 Regina Obe <lr@pcorp.us> + + * [r8587] more cleanup + +2011-12-26 20:24 Regina Obe <lr@pcorp.us> + + * [r8586] use docbook paragraph tags + +2011-12-26 20:21 Regina Obe <lr@pcorp.us> + + * [r8585] some other minor cleanup + +2011-12-26 20:20 Regina Obe <lr@pcorp.us> + + * [r8584] wrap php code in cdata tags + +2011-12-26 20:10 Regina Obe <lr@pcorp.us> + + * [r8583] Add php example using postgis raster + +2011-12-26 17:43 Regina Obe <lr@pcorp.us> + + * [r8582] correct comment + +2011-12-26 17:38 Regina Obe <lr@pcorp.us> + + * [r8581] minor formatting cleanup + +2011-12-26 17:37 Regina Obe <lr@pcorp.us> + + * [r8580] fix typo in image names + +2011-12-26 11:04 Regina Obe <lr@pcorp.us> + + * [r8579] example of resample + +2011-12-26 10:31 Regina Obe <lr@pcorp.us> + + * [r8578] fix typo in cast check expression. Should be checking for + box3d existence not box2d + +2011-12-26 09:32 Regina Obe <lr@pcorp.us> + + * [r8577] bump up version numbers + +2011-12-25 10:56 Sandro Santilli <strk@keybit.net> + + * [r8576] Stub toTopoGeom function and testcase (#1017) + +2011-12-25 10:56 Sandro Santilli <strk@keybit.net> + + * [r8575] Add missing dependencies of topology.sql (includes) + +2011-12-24 22:27 Regina Obe <lr@pcorp.us> + + * [r8574] another minor typo + +2011-12-24 22:10 Regina Obe <lr@pcorp.us> + + * [r8573] fix typo in column numbers + +2011-12-24 21:39 Regina Obe <lr@pcorp.us> + + * [r8572] minor formatting change + +2011-12-24 21:07 Regina Obe <lr@pcorp.us> + + * [r8571] fix formatting of ST_Transform example and add another + sub example demonstrating using different algorithm + +2011-12-24 20:18 Regina Obe <lr@pcorp.us> + + * [r8570] example for raster transform + +2011-12-24 18:40 Regina Obe <lr@pcorp.us> + + * [r8569] change docs to use unix style slashes which work + correctly on both Unix and windows. + +2011-12-24 16:42 Bborie Park <bkpark at ucdavis.edu> + + * [r8568] If generating overviews and -F is set, overview tables + will have "filename" column. + +2011-12-24 15:52 Bborie Park <bkpark at ucdavis.edu> + + * [r8567] Testing the wrong variable when checking if two rasters + is different. + +2011-12-24 11:41 Sandro Santilli <strk@keybit.net> + + * [r8566] Encode dependency of objects and scripts on configuration + +2011-12-24 11:22 Sandro Santilli <strk@keybit.net> + + * [r8565] Ignore generated uninstall_rtpostgis.sql + +2011-12-24 11:22 Sandro Santilli <strk@keybit.net> + + * [r8564] Drop created tables after run + +2011-12-24 11:22 Sandro Santilli <strk@keybit.net> + + * [r8563] Cleanup created tables after run + +2011-12-24 11:21 Sandro Santilli <strk@keybit.net> + + * [r8562] drop created table after run + +2011-12-24 11:21 Sandro Santilli <strk@keybit.net> + + * [r8561] Add support for dropping DOMAINs in create_undef.pl + (#1407) + +2011-12-24 11:21 Sandro Santilli <strk@keybit.net> + + * [r8560] Enable uninstall_topology.sql testing + +2011-12-24 11:21 Sandro Santilli <strk@keybit.net> + + * [r8559] Allow fully-qualified basetype name for aggregates + +2011-12-24 11:21 Sandro Santilli <strk@keybit.net> + + * [r8558] Drop tables in reverse order, reducing probability of + fkey troubles + +2011-12-24 10:42 Sandro Santilli <strk@keybit.net> + + * [r8557] run_test doesn't need USE_VERSION anymore + +2011-12-24 10:42 Sandro Santilli <strk@keybit.net> + + * [r8556] Generate uninstall_topology.sql + +2011-12-24 10:34 Sandro Santilli <strk@keybit.net> + + * [r8555] Stop using USE_VERSION, assume pgsql is always > 7.4. + + Hopefully fixes #819 + +2011-12-24 10:34 Sandro Santilli <strk@keybit.net> + + * [r8554] Add support for objects schema definition in + create_undef.pl + +2011-12-24 09:59 Sandro Santilli <strk@keybit.net> + + * [r8553] Drop created function after run + +2011-12-24 09:59 Sandro Santilli <strk@keybit.net> + + * [r8552] Ensure mapalgebra test functions are dropped + +2011-12-24 09:59 Sandro Santilli <strk@keybit.net> + + * [r8551] Don't load rt_utility_test data creator as test + +2011-12-24 09:58 Sandro Santilli <strk@keybit.net> + + * [r8550] Add rt_empty_raster dropper script + +2011-12-24 09:58 Sandro Santilli <strk@keybit.net> + + * [r8549] Add rt_properties_test dropper script + +2011-12-24 09:58 Sandro Santilli <strk@keybit.net> + + * [r8548] Move single-test data tables within the testfiles, + cleanup after run + +2011-12-24 09:58 Sandro Santilli <strk@keybit.net> + + * [r8547] Cleanup after run + +2011-12-24 09:58 Sandro Santilli <strk@keybit.net> + + * [r8546] Add a drop_rt_band_properties_test script for cleanup + purposes + +2011-12-24 09:58 Sandro Santilli <strk@keybit.net> + + * [r8545] cleanup data tables + +2011-12-24 09:58 Sandro Santilli <strk@keybit.net> + + * [r8544] Add a drop_rt_gist_test.sql file for cleanup purposes + (#301) + +2011-12-24 09:58 Sandro Santilli <strk@keybit.net> + + * [r8543] Cleanup created objects + +2011-12-24 09:57 Sandro Santilli <strk@keybit.net> + + * [r8542] Avoid function calls in DEFAULT specifications for + unknown SRID + + Matches what postgis.sql does as well. + Fixes generation of uninstall script for raster (#301) + +2011-12-24 09:57 Sandro Santilli <strk@keybit.net> + + * [r8541] Enhance DEFAULT specification stripper + +2011-12-24 09:57 Sandro Santilli <strk@keybit.net> + + * [r8540] Run uninstall test for raster, when enabled + +2011-12-24 09:56 Sandro Santilli <strk@keybit.net> + + * [r8539] Generate uninstall_rtpostgis.sql (#301) + +2011-12-24 02:51 Bborie Park <bkpark at ucdavis.edu> + + * [r8538] Additional work to remove DROP FUNCTION statements + depending upon prior DROP TYPE ... CASCADE statements that + generate ERRORs + +2011-12-24 01:14 Bborie Park <bkpark at ucdavis.edu> + + * [r8537] Instead of using spatial reference text in WKT format, + use PROJ.4 format when possible. This does mean that in + situations that require WKT format, rt_raster_gdal_sr must be + called to convert from one format to the other. + +2011-12-24 01:08 Bborie Park <bkpark at ucdavis.edu> + + * [r8536] Fix issue with RASTER_sameAlignment where the + deserializing of the raster is not being limited to just the + header. + +2011-12-23 17:33 Sandro Santilli <strk@keybit.net> + + * [r8535] support multiline function signatures at the parsing + stage too... + +2011-12-23 17:30 Sandro Santilli <strk@keybit.net> + + * [r8534] Add support for multiline function signatures + +2011-12-23 17:01 Bborie Park <bkpark at ucdavis.edu> + + * [r8533] Overview constraints should always be added regardless of + whether or not the user requests raster constraints. + +2011-12-23 16:49 Sandro Santilli <strk@keybit.net> + + * [r8532] Write header in the files generated by create_undef.pl + + Header includes license, creation timestamp and input filename + +2011-12-23 16:49 Sandro Santilli <strk@keybit.net> + + * [r8531] Simplify uninstall_postgis.sql rule, drop the manual + edited version + +2011-12-23 16:39 Bborie Park <bkpark at ucdavis.edu> + + * [r8530] Fixed erroneous addition of filename to overviews when + the flags -l -F -Y are combined. + +2011-12-23 16:22 Bborie Park <bkpark at ucdavis.edu> + + * [r8529] Fixed for better path handling + +2011-12-23 16:18 Regina Obe <lr@pcorp.us> + + * [r8528] put in sections for postgis extensions. Probably will + need some cleanup. + +2011-12-23 16:14 Sandro Santilli <strk@keybit.net> + + * [r8527] Ignore generated comment files + +2011-12-23 16:14 Sandro Santilli <strk@keybit.net> + + * [r8526] Ignore generated raster files + +2011-12-23 16:14 Sandro Santilli <strk@keybit.net> + + * [r8525] Let create_undef.pl generate uninstall_postgis.sql + +2011-12-23 16:14 Sandro Santilli <strk@keybit.net> + + * [r8524] Cleanup after loader test runs, fixing uninstall testing + +2011-12-23 16:14 Sandro Santilli <strk@keybit.net> + + * [r8523] Drop objects created by the tests + +2011-12-23 16:14 Sandro Santilli <strk@keybit.net> + + * [r8522] Fix create_undef.pl script to generate correct uninstall + script + +2011-12-23 16:04 Bborie Park <bkpark at ucdavis.edu> + + * [r8521] Added uninstall_script to facilitate generation of + uninstall_postgis.sql and uninstall_rtpostgis.sql. It could still + use additional validation and cleaning up of the output uninstall + sql files. + +2011-12-23 13:20 Regina Obe <lr@pcorp.us> + + * [r8520] minor code change to make example a bit shorter + +2011-12-23 13:06 Regina Obe <lr@pcorp.us> + + * [r8519] fix some erroneous statements about ST_Clip and provide + example demonstrating trimraster argument effect + +2011-12-23 08:53 Regina Obe <lr@pcorp.us> + + * [r8518] fix unbalanced tag + +2011-12-23 08:38 Regina Obe <lr@pcorp.us> + + * [r8517] some cosmetic cleanup + +2011-12-23 08:35 Regina Obe <lr@pcorp.us> + + * [r8516] example of st_clip with pictures + +2011-12-23 07:58 Regina Obe <lr@pcorp.us> + + * [r8515] start documenting ST_Clip + +2011-12-22 19:09 Regina Obe <lr@pcorp.us> + + * [r8514] fill in missing protos for droprasterconstraints / + addrasterconstraints + +2011-12-22 13:24 Regina Obe <lr@pcorp.us> + + * [r8513] make title a little shorter + +2011-12-22 13:23 Regina Obe <lr@pcorp.us> + + * [r8512] changing titles -- raster data man I'm eventually going + to throw in mapserver, .net, jdbc examples cause I'm too lazy to + create a separate chapter. The postgis app section is really + specific to postgis geometry since it doesn't talk about raster + or geography at all. + +2011-12-22 13:18 Regina Obe <lr@pcorp.us> + + * [r8511] minor error in statement + +2011-12-22 11:20 Sandro Santilli <strk@keybit.net> + + * [r8510] Drop operator families, not classes (#543) + +2011-12-22 11:20 Sandro Santilli <strk@keybit.net> + + * [r8509] Encode dependency of uninstall_postgis.sql on included + files + +2011-12-22 11:20 Sandro Santilli <strk@keybit.net> + + * [r8508] Add more uninstall objects found by uninstall test + (#1397) + +2011-12-22 11:19 Sandro Santilli <strk@keybit.net> + + * [r8507] Count objects in the _regress_ database, not elsewhere + (#1397) + +2011-12-22 10:21 Sandro Santilli <strk@keybit.net> + + * [r8506] Fix testing of uninstall script count [#1397] + + This commit also adds new utility functions and skips testing + uninstall when raster or topology are enabled. + +2011-12-22 10:21 Sandro Santilli <strk@keybit.net> + + * [r8505] Fix uninstall script [#1153] + +2011-12-22 10:21 Sandro Santilli <strk@keybit.net> + + * [r8504] Deprecate Polygonize and Collect aggregates [#1400] + +2011-12-22 10:21 Sandro Santilli <strk@keybit.net> + + * [r8503] Encode dependency of postgis.sql from included scripts + +2011-12-22 10:21 Sandro Santilli <strk@keybit.net> + + * [r8502] Encode dependency of postgis objects on postgis_config.h + + Fixes ./configure && make check after switching between different + PostgreSQL versions. + +2011-12-22 10:21 Sandro Santilli <strk@keybit.net> + + * [r8501] Add testing for uninstall_postgis.sql [#1397] + + The uninstall currently fails due to #1153 + +2011-12-22 08:23 Sandro Santilli <strk@keybit.net> + + * [r8500] Don't depend on bytea representation for unrelated tests. + + Fix testing against PostgreSQL 9.0+. + +2011-12-22 08:01 Sandro Santilli <strk@keybit.net> + + * [r8499] Replace INFINITY with MAXFLOAT. Should fix Solaris build + [#1396] + + I don't think it makes a difference as those functions are not + documented about the exceptional return, and no regression test + fails with the change. + +2011-12-22 05:48 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8498] Move SPI_finish to after elog calls. This seems to fix + the regression failure in 877, though why is not clear. Is + SPI_finish removing a memory context that palloc has allocated + things inside? This would explain the odd result (tbl and col + variables get emptied upon call to SPI_finish). + +2011-12-21 21:49 Regina Obe <lr@pcorp.us> + + * [r8497] change ST_Reclass example to use less verbose ST_AddBand + array syntax + +2011-12-21 19:07 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8496] ST_Azimuth on the spheroid (#1305) + +2011-12-21 18:42 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8495] Add ST_Project(geography, distance, azimuth) (#657) to + construct a new point given a heading and a distance. + +2011-12-21 17:16 Regina Obe <lr@pcorp.us> + + * [r8494] fix typo + +2011-12-21 17:15 Sandro Santilli <strk@keybit.net> + + * [r8493] Add missing options in the help string + +2011-12-21 17:09 Sandro Santilli <strk@keybit.net> + + * [r8492] Put staged postgis.sql with other staged intsall objects + +2011-12-21 16:17 Sandro Santilli <strk@keybit.net> + + * [r8491] Document the new -s from:to syntax of shp2pgsql [#994] + +2011-12-21 14:53 Sandro Santilli <strk@keybit.net> + + * [r8490] Add include for lwgeom_typmod_valid define + +2011-12-21 14:50 Sandro Santilli <strk@keybit.net> + + * [r8489] Add top-level and postgis/ dirs in include path for + building scripts + + Fixes an error finding sqldefines.h + +2011-12-21 14:37 Sandro Santilli <strk@keybit.net> + + * [r8488] Use own implementation of endian detection, should fix + #1172 + +2011-12-21 14:16 Sandro Santilli <strk@keybit.net> + + * [r8487] Fix repeated modifier + +2011-12-21 14:03 Sandro Santilli <strk@keybit.net> + + * [r8486] Put PostgreSQL module related code in a new + postgis_module.c file + + Beside the existing MODULE_MAGIC macro we now also have + _PG_init and _PG_fini which are called at module load and unload. + Such functions may be used to deal with GUC (and sample code for + that is stubbed already). See #1393. + +2011-12-21 13:59 Regina Obe <lr@pcorp.us> + + * [r8485] #1257 - drop mem_size + +2011-12-21 13:14 Regina Obe <lr@pcorp.us> + + * [r8484] #1345 write this off as an observed regression difference + and document the behavior for those like me who will be adversely + impacted and confused by application breakage. + +2011-12-21 13:03 Regina Obe <lr@pcorp.us> + + * [r8482] #1242 write this off as a documentation bug. I don't have + 1.5.1 anymore to confirm ST_Line_Locate_Point ever worked with + multilinestrings and doesn't work on my 1.5.3 install + +2011-12-20 19:35 Sandro Santilli <strk@keybit.net> + + * [r8481] Convert java components to SRID<=0 being unknown and 0 + being the official one [#1221] + + NOTE: this is untested, as "make" didn't know what to do and so + neither do I + +2011-12-20 18:51 Sandro Santilli <strk@keybit.net> + + * [r8480] Different types _can_ be equal, see #756 + +2011-12-20 16:56 Regina Obe <lr@pcorp.us> + + * [r8479] link to windows supplementary hard upgrade instructions + +2011-12-20 16:01 Sandro Santilli <strk@keybit.net> + + * [r8478] Add comments in current version, including topo and + raster [#1390] + +2011-12-20 15:43 Sandro Santilli <strk@keybit.net> + + * [r8477] Add comments from pgis-1.4 [#1390] + + Also handle pg_restore errors more cleanly + +2011-12-20 15:18 Sandro Santilli <strk@keybit.net> + + * [r8476] Add more objects from a 1.5 install, including comments + [#1390] + +2011-12-20 03:28 Bborie Park <bkpark at ucdavis.edu> + + * [r8475] Finished support for make target "uninstall". + +2011-12-20 02:58 Bborie Park <bkpark at ucdavis.edu> + + * [r8474] Correct handling of make target "distclean". Next is + "uninstall". + +2011-12-19 19:21 Sandro Santilli <strk@keybit.net> + + * [r8473] Update loader tests to use the new reprojection switch + [#994] + +2011-12-19 19:06 Sandro Santilli <strk@keybit.net> + + * [r8472] Drop -r switch, allow requesting reprojection with -s + [#994] + +2011-12-19 16:19 Sandro Santilli <strk@keybit.net> + + * [r8471] Make sure input is at least 3 characters long (#1146) + +2011-12-19 16:19 Sandro Santilli <strk@keybit.net> + + * [r8470] Report testing of pg-8.4.9/pgis-2.0.0SVN => + pg-9.1.2/pgis-2.0.0SVN + +2011-12-19 12:27 Sandro Santilli <strk@keybit.net> + + * [r8469] Document postgis_restore.pl based HARD UPGRADE procedure + + Reviews are welcome. + The new description replaces the old one so the brute force noisy + process + is now undocumented. If really needed it may come back in a + subsection. + +2011-12-19 09:07 Sandro Santilli <strk@keybit.net> + + * [r8468] Allow keeping rows in spatial_ref_sys at + postgis_restore.pl time + + After this commit the entries found in spatial_ref_sys at time + of restore are retained w/out triggering ERROR lines in logfile + or transaction aborts. Entries in dump with SRID not found in + existing spatial_ref_sys are inserted. + +2011-12-19 08:18 Sandro Santilli <strk@keybit.net> + + * [r8467] Fix SRIDs in topology.topology after restore. + +2011-12-19 06:33 Regina Obe <lr@pcorp.us> + + * [r8466] bump up numbers. logic to drop raster casts from + extension if they are present and script asks to drop. + +2011-12-19 05:00 Regina Obe <lr@pcorp.us> + + * [r8465] get rid of superfluous drop if exists + _drop_st_samealignment + +2011-12-19 04:56 Bborie Park <bkpark at ucdavis.edu> + + * [r8464] Fixed to suppress PL/pgSQL notices causing issues due to + line # output. Added order by to check_raster_overviews to ensure + consistent output. + +2011-12-19 04:48 Regina Obe <lr@pcorp.us> + + * [r8463] revise upgrade script to take into consideration change + in casts + +2011-12-19 04:12 Regina Obe <lr@pcorp.us> + + * [r8462] replace box2d with box3d in examples and remaining func + +2011-12-19 03:44 Regina Obe <lr@pcorp.us> + + * [r8461] Clarify topology topoelement example that it is an + example of WHAT NOT TO DO + +2011-12-19 03:37 Regina Obe <lr@pcorp.us> + + * [r8460] replace references to box2d with box3d + +2011-12-19 02:18 Regina Obe <lr@pcorp.us> + + * [r8459] get rid of remove ST_Intersection signatures and replace + with new ones. Add the raster outputting intersection signatures. + Still need to put in examples. + +2011-12-19 01:59 Regina Obe <lr@pcorp.us> + + * [r8458] update faq for raster to bring it more up to line with + new loading , QGIS support etc., remove box2d and replace with + box3d, minor rewording -- people who don't know GDAL don't know + what a GDAL raster is. Took that word out when describing -G + since it confuses rather than adding value. + +2011-12-19 01:53 Bborie Park <bkpark at ucdavis.edu> + + * [r8457] Refactored and cleaned up the regressions checks of + values in raster_columns and raster_overviews views. + +2011-12-18 23:02 Sandro Santilli <strk@keybit.net> + + * [r8456] Document darkblue test: pg-9.1b3/pgis-1.5 to + pg-9.1.1/pgis-2.0.0SVN + +2011-12-18 22:42 Sandro Santilli <strk@keybit.net> + + * [r8455] Do not expect things to happen in "userland" schema (what + is it?) + +2011-12-18 18:49 Regina Obe <lr@pcorp.us> + + * [r8454] put in missing tag + +2011-12-18 18:05 Regina Obe <lr@pcorp.us> + + * [r8453] add in some missing raster2pgsql switches and provide an + example of the -G list drivers option. + +2011-12-18 14:24 Sandro Santilli <strk@keybit.net> + + * [r8452] Update after typo fix for AddGeometryColumn error message + +2011-12-18 14:22 Sandro Santilli <strk@keybit.net> + + * [r8451] Fix st_extent on empty relation (#1385) + +2011-12-17 21:00 Sandro Santilli <strk@keybit.net> + + * [r8450] AddGeometryColumns => AddGeometryColumn + +2011-12-17 01:50 Regina Obe <lr@pcorp.us> + + * [r8449] fix typo + +2011-12-16 22:07 Bborie Park <bkpark at ucdavis.edu> + + * [r8448] Minor comment cleanup in rtpostgis.sql.in.c. Added + regression tests for AddRasterConstraints, + AddOverviewConstraints, DropRasterConstraints and + DropOverviewConstraints. + +2011-12-16 17:20 Sandro Santilli <strk@keybit.net> + + * [r8447] Do restore spatial_ref_sys from dump, temporarly + disabling srid check + + Assuming you don't source spatial_ref_sys.sql prior to run + postgis_restore.pl you would always end up with all your data + in the table and if no SRIDS are out of the valid range you'd + also have the constraint in place. + +2011-12-16 16:39 Sandro Santilli <strk@keybit.net> + + * [r8446] Add more signatures to skip on restore (raster) + +2011-12-16 15:16 Sandro Santilli <strk@keybit.net> + + * [r8445] Report full exception string on ST_Intersection failure + (see #1173) + +2011-12-16 14:59 Sandro Santilli <strk@keybit.net> + + * [r8444] Add test for #1344 (can't dump invalid geometries) + +2011-12-16 04:34 Regina Obe <lr@pcorp.us> + + * [r8442] fix more typos + +2011-12-16 04:27 Regina Obe <lr@pcorp.us> + + * [r8441] more typo fix + +2011-12-16 04:24 Regina Obe <lr@pcorp.us> + + * [r8440] fix more typos + +2011-12-16 04:21 Regina Obe <lr@pcorp.us> + + * [r8439] flesh out creating rasters section a bit. + +2011-12-16 01:41 Regina Obe <lr@pcorp.us> + + * [r8438] start best practices stuff and break up loading and + creating into two separate sections. + +2011-12-16 01:25 Regina Obe <lr@pcorp.us> + + * [r8437] cosmetic change to lists + +2011-12-16 01:11 Bborie Park <bkpark at ucdavis.edu> + + * [r8436] Addition of C-based ST_MinPossibleValue to replace the + existing ST_MinPossibleVal which uses hard-coded values. Updated + dependent functions and scripts/plpgsql to use new function. + Deleted scripts/plpgsql/st_minpossibleval.sql to stop people from + using it. Associated ticket is #1298. + +2011-12-16 00:09 Bborie Park <bkpark at ucdavis.edu> + + * [r8435] Just changes to the comments of ST_Intersection(geometry, + raster) + +2011-12-15 23:47 Bborie Park <bkpark at ucdavis.edu> + + * [r8434] Addition of two-raster ST_Intersection function set in + raster-space well as another set for raster,geometry + ST_Intersection in raster-space. Associated ticket is #1381 + +2011-12-15 23:43 Bborie Park <bkpark at ucdavis.edu> + + * [r8433] Renamed function parameters for ST_SameAlignment and + ST_Intersects so that the names follow the convention used for + similarly purposed parameters of other raster functions. + +2011-12-15 23:29 Sandro Santilli <strk@keybit.net> + + * [r8432] Allow calling geography_in with less than 3 args (see + #1320) + +2011-12-15 23:26 Sandro Santilli <strk@keybit.net> + + * [r8431] Check typmod on geometry input. Fixes before triggers + (#1320) + +2011-12-15 15:11 Sandro Santilli <strk@keybit.net> + + * [r8430] Fix documentation for the new option for GML box output + +2011-12-15 02:19 Regina Obe <lr@pcorp.us> + + * [r8429] more error fixes and change ordered lists to itemized + lists + +2011-12-15 02:17 Regina Obe <lr@pcorp.us> + + * [r8428] fix invalid link end + +2011-12-15 02:15 Regina Obe <lr@pcorp.us> + + * [r8427] get rid of extra tag + +2011-12-15 02:14 Regina Obe <lr@pcorp.us> + + * [r8426] correct regular_blocking definition, add descriptions for + raster_overview columns + +2011-12-15 01:56 Regina Obe <lr@pcorp.us> + + * [r8425] more reasons why we have raster overviews + +2011-12-15 01:54 Regina Obe <lr@pcorp.us> + + * [r8424] Start raster_overviews section + +2011-12-15 00:21 Bborie Park <bkpark at ucdavis.edu> + + * [r8423] Renamed st_bytea to bytea as per PostGIS convention. + Existing databases will not be affected if upgraded using the + upgrade scripts. Associated ticket is #1003 + +2011-12-15 00:16 Bborie Park <bkpark at ucdavis.edu> + + * [r8422] Commented out the dropping of box2d casts as the upgrade + scripts won't install the box3d casts. + +2011-12-14 23:51 Bborie Park <bkpark at ucdavis.edu> + + * [r8421] Renamed operator functions and made appropriate changes + to associated operators to be inline with usage for geometry and + geography. Associated ticket is #633. Existing users will not be + affected as the upgrade scripts do not drop or add new operators. + +2011-12-14 23:02 Bborie Park <bkpark at ucdavis.edu> + + * [r8420] Added DROP CAST and DROP FUNCTION for box2d. + +2011-12-14 22:57 Bborie Park <bkpark at ucdavis.edu> + + * [r8419] Dropped casts to box2d and replaced with casts to box3d. + Associated ticket is #1330. + +2011-12-14 22:23 Bborie Park <bkpark at ucdavis.edu> + + * [r8418] Added option -G to get listing of supported raster types + instead of calling ST_GDALDrivers in SQL. Had to tweak + rt_raster_gdal_drivers in rt_api.c to not limit drivers based + upon creation capabilities. Associated ticket is #1374. + Added ability to specify band indices with ranges for option -b. + Example: -b 1-5,7,9-15. Associated ticket is #1375. + Added warning messages when loader is processing more than one + raster and rasters may have different number of bands, pixel + types, hasnodata flags, NODATA values, geotransforms andtile + sizes. Associated ticket is #153. + +2011-12-14 22:14 Regina Obe <lr@pcorp.us> + + * [r8417] document raster_columns catalog view + +2011-12-14 18:33 Sandro Santilli <strk@keybit.net> + + * [r8416] Make dropping of log files fully controlled by switch + (#1376) + + This is because hudson wants to report the regress.log in any + case + +2011-12-14 18:25 Sandro Santilli <strk@keybit.net> + + * [r8415] Regress test all behaviors involving EMPTY geometries + + See http://trac.osgeo.org/postgis/wiki/DevWikiEmptyGeometry + Changes ST_NumPoints and ST_ExteriorRing to behave requested. + Keeps ST_InteriorRingN returning NULL, as per "n is out of range" + + Closes #692 + +2011-12-14 18:24 Sandro Santilli <strk@keybit.net> + + * [r8414] Crossref ST_InteriorRingN with ST_ExteriorRing + +2011-12-14 17:13 Sandro Santilli <strk@keybit.net> + + * [r8413] Drop temporary files if there are no failures (#1376) + +2011-12-14 16:02 Sandro Santilli <strk@keybit.net> + + * [r8412] Fix crash on ST_AsGML('POLYGON EMPTY') (#681) + + Also tweak GML of empty types to be smaller and include + regression testing both at the liblwgeom and sql level + +2011-12-14 15:07 Sandro Santilli <strk@keybit.net> + + * [r8411] Fix a typo from last commit, stub test for GML emptyness + +2011-12-14 14:46 Sandro Santilli <strk@keybit.net> + + * [r8410] Enable a test for an old bugfix (#683) + +2011-12-14 14:46 Sandro Santilli <strk@keybit.net> + + * [r8409] Move the EMPTY buffer test from tickets.sql to empty.sql + +2011-12-14 14:37 Sandro Santilli <strk@keybit.net> + + * [r8408] Return empty geoms snapped to a grid as immutated (#1089) + + Also introduces an "empty" regression test + +2011-12-14 14:25 Regina Obe <lr@pcorp.us> + + * [r8407] minor corrections / enhancements + +2011-12-14 13:31 Sandro Santilli <strk@keybit.net> + + * [r8406] Drop topology specific versioning + +2011-12-14 13:31 Sandro Santilli <strk@keybit.net> + + * [r8405] Add more skip signatures, from interim builds + +2011-12-14 11:22 Regina Obe <lr@pcorp.us> + + * [r8404] minor change to rtpostgis_drop so can more easily drop + from extension for extension install. Many changes to extensions + so can use native postgis upgarde and raster upgrade scripts. + bump up version numbers + +2011-12-14 10:44 Regina Obe <lr@pcorp.us> + + * [r8403] fix errors in documentation and comment scripts + preveningt comments install from installing cleanly + +2011-12-14 10:06 Regina Obe <lr@pcorp.us> + + * [r8402] Get rid of removed AddRasterTable,Column etc and replace + with newer AddRasterConstraints/DropRasterConstraints + +2011-12-14 07:59 Sandro Santilli <strk@keybit.net> + + * [r8401] Add -v switch to postgis_restore.pl, tweak usage and + debug output + +2011-12-14 02:54 Regina Obe <lr@pcorp.us> + + * [r8400] Add stub section describing the raster_columns and + raster_overview catalog views. Also fix typo. More coming. + +2011-12-14 02:31 Bborie Park <bkpark at ucdavis.edu> + + * [r8399] As per discussion in postgis-devel regarding Ubuntu + 11.10, tweaked the order in which -lm is passed to LDFLAGS + +2011-12-14 01:22 Bborie Park <bkpark at ucdavis.edu> + + * [r8398] Refactored for less memory usage by aggresively flushing + string buffers. + +2011-12-13 23:29 Sandro Santilli <strk@keybit.net> + + * [r8397] Disable triggers on the topology.layer table during + restore, to allow population in random order (#1371) + +2011-12-13 23:21 Bborie Park <bkpark at ucdavis.edu> + + * [r8396] As per discussion in ticket #1373, convert raster + constraints with floating point values (scalex, scaley, nodata + values) into numeric(16,10) for comparison due to precision + issues. + +2011-12-13 22:39 Regina Obe <lr@pcorp.us> + + * [r8395] Add -Y copy switch + +2011-12-13 21:58 Regina Obe <lr@pcorp.us> + + * [r8394] more examples -- put in a missing copy switch -- more + switches to add. + +2011-12-13 21:19 Bborie Park <bkpark at ucdavis.edu> + + * [r8393] Fixed handling of output ranges going from high to low + rather than the default of values going from low to high. Based + upon message on postgis-users: + http://postgis.refractions.net/pipermail/postgis-users/2011-December/031763.html + +2011-12-13 20:05 Bborie Park <bkpark at ucdavis.edu> + + * [r8392] Fixed incorrect entity using_raster_dataman. + +2011-12-13 19:15 Regina Obe <lr@pcorp.us> + + * [r8391] break raste loder into its own data management chapter -- + this chapter will expand in time. Get rid of how to use old + raster2pgsql.py and replace with instructions on using + raster2pgsql executable. + +2011-12-13 18:19 Bborie Park <bkpark at ucdavis.edu> + + * [r8390] Removal of now-unsupported AddRasterColumn, + DropRasterColumn and DropRasterTable. + +2011-12-13 18:16 Bborie Park <bkpark at ucdavis.edu> + + * [r8389] Added DROP AGGREGATE for new ST_Union signature. + Associated ticket is #1372. + +2011-12-13 17:24 Bborie Park <bkpark at ucdavis.edu> + + * [r8388] Removed PGXS and added explicit bin path variable. Works + now in 8.4, 9.0 and 9.1. Related ticket is #1370. + +2011-12-13 16:37 Sandro Santilli <strk@keybit.net> + + * [r8387] Drop the old postgis_restore.pl and substitute it with + the new one + +2011-12-13 16:33 Sandro Santilli <strk@keybit.net> + + * [r8386] Ignore more Makefiles + +2011-12-13 16:33 Sandro Santilli <strk@keybit.net> + + * [r8385] Strictness fixes, internal docs + +2011-12-13 15:04 Bborie Park <bkpark at ucdavis.edu> + + * [r8384] Revert change made in r8383. Install of loader doesn't + work correctly without PGXS. Still need to figure out why LDFLAGS + is getting eaten. + + Associated ticket is #1370. + +2011-12-13 14:14 Bborie Park <bkpark at ucdavis.edu> + + * [r8383] Removed PGXS as per ticket #1370. + +2011-12-13 12:00 Sandro Santilli <strk@keybit.net> + + * [r8382] Maintain the buffer-returns-areal invariant on empty + input (#322) + +2011-12-13 12:00 Sandro Santilli <strk@keybit.net> + + * [r8381] tabs to spaces + +2011-12-13 10:38 Sandro Santilli <strk@keybit.net> + + * [r8380] Always output create ore replace view in upgrade scripts + (#1097) + +2011-12-13 09:59 Sandro Santilli <strk@keybit.net> + + * [r8379] Allow function definitions to end with '$$ LANGUAGE' + (#1365) + +2011-12-13 09:59 Sandro Santilli <strk@keybit.net> + + * [r8378] Use warnings + +2011-12-13 09:58 Sandro Santilli <strk@keybit.net> + + * [r8377] Encode dependency of upgrade script from the tool + generating it + +2011-12-13 09:16 Sandro Santilli <strk@keybit.net> + + * [r8376] Add copyright headers, looking at SCM logs. Review + welcome. + +2011-12-13 05:23 Bborie Park <bkpark at ucdavis.edu> + + * [r8375] Text format cleanup in loader/raster2pgsql.c. Fixed + missing target in scripts/Makefile.in + +2011-12-13 05:11 Bborie Park <bkpark at ucdavis.edu> + + * [r8374] Added missing Makefile.in for raster/scripts + +2011-12-13 05:06 Bborie Park <bkpark at ucdavis.edu> + + * [r8373] Set svn:keywords for "$Id$" + +2011-12-13 05:03 Bborie Park <bkpark at ucdavis.edu> + + * [r8372] Added version information. + + Associated ticket is #1369. + +2011-12-13 03:00 Bborie Park <bkpark at ucdavis.edu> + + * [r8371] With commit of C-based raster2pgsql in r8369, removed + dependency checks on Python, NumPy and GDAL with Python bindings. + You will want to run autogen.sh with this commit. With this + commit, the python-based raster2pgsql.py is now retired and + unsupported. + +2011-12-13 01:58 Bborie Park <bkpark at ucdavis.edu> + + * [r8370] Additional check with warnings if PostgreSQL identifiers + exceed the standard maximum length of 63 characters (64 counting + NULL) + +2011-12-12 23:12 Bborie Park <bkpark at ucdavis.edu> + + * [r8369] Addition of C-based raster2pgsql in raster/loader. No + changes have been made to remove the existing python-based + raster2pgsql.py nor remove the python dependency in configure. + Users will need to run autogen.sh after this revision. + + Associated ticket is #1297. + +2011-12-12 22:42 Sandro Santilli <strk@keybit.net> + + * [r8368] Skip constraints on raster_columns and raster_overviews + +2011-12-12 22:38 Regina Obe <lr@pcorp.us> + + * [r8367] fix title + +2011-12-12 22:22 Sandro Santilli <strk@keybit.net> + + * [r8366] Rewrite spatial table constraints to add st_ prefix and + use 0 rather than -1 for unknown + +2011-12-12 21:45 Sandro Santilli <strk@keybit.net> + + * [r8365] Filter OPERATOR at the ASCII dump phase to have finer + control over which operators are really skipped (#1368) + +2011-12-12 20:32 Regina Obe <lr@pcorp.us> + + * [r8364] another example of ST_Union + +2011-12-12 20:23 Regina Obe <lr@pcorp.us> + + * [r8363] example of ST_Union + +2011-12-12 16:10 Sandro Santilli <strk@keybit.net> + + * [r8362] Drop lwgeom_gist and dependent items, including from + dumps (#1362) + +2011-12-12 15:45 Sandro Santilli <strk@keybit.net> + + * [r8361] Do not restore metadata tables which now became views + +2011-12-12 15:28 Sandro Santilli <strk@keybit.net> + + * [r8360] Cleanup item list: drop duplicates, add some missings + +2011-12-12 15:28 Sandro Santilli <strk@keybit.net> + + * [r8359] Remove duplicated entries, add some missing ones + +2011-12-12 12:17 Regina Obe <lr@pcorp.us> + + * [r8358] reduce ST_MakeEnvelope down to one function but make srid + default to 0 (would be nice if we defined an @SRID_UNKNOWN in the + sqldefine.h.in so I don't have to hard code this). Get rid of + other variant. changing to use default parameters doesn't seem to + require dropping the function so only had to drop one of them + +2011-12-12 12:09 Regina Obe <lr@pcorp.us> + + * [r8357] oops took out a tag by accident + +2011-12-12 12:03 Regina Obe <lr@pcorp.us> + + * [r8356] document the new ST_MakeEnvelope variant (pretend like + its used default paramters already), will fix the code later + +2011-12-12 02:20 Regina Obe <lr@pcorp.us> + + * [r8355] #1366 -- don't rely on state field being capitalized. + +2011-12-11 20:23 Regina Obe <lr@pcorp.us> + + * [r8354] forgot about max /min + +2011-12-11 20:21 Regina Obe <lr@pcorp.us> + + * [r8353] change generateor to display name for aggregates instead + of id. For raster ids are different from name + +2011-12-11 19:29 Regina Obe <lr@pcorp.us> + + * [r8352] preliminary documentation for raster version of ST_Union + aggregate function + +2011-12-11 15:45 Regina Obe <lr@pcorp.us> + + * [r8351] Revisions to ST_Union for raster: get rid of dependency + on rastexpr (and get rid of type), put in regress tests, get rid + of many ST_Union permutations and limit to st_union(rast), + st_union(rast,p_expression), st_union(rast,band_num), + st_union(rast,band_num,p_expression). Note for drop I'm not + dropping those other versions in case people have installed them + from scripts folder or are currently using them. just dropping + the ones I'm replacing. + +2011-12-11 02:42 Regina Obe <lr@pcorp.us> + + * [r8350] fix function name typo in geocode_intersection + +2011-12-10 18:08 Regina Obe <lr@pcorp.us> + + * [r8349] minor edit + +2011-12-10 18:03 Regina Obe <lr@pcorp.us> + + * [r8348] fix error in logic + +2011-12-10 16:56 Regina Obe <lr@pcorp.us> + + * [r8347] missed a spot + +2011-12-10 16:55 Regina Obe <lr@pcorp.us> + + * [r8346] describe the example a bit better for ST_AddBand + multi-band example + +2011-12-10 11:09 Regina Obe <lr@pcorp.us> + + * [r8345] #1361: fill in some more cases where hard/soft + +2011-12-10 11:04 Regina Obe <lr@pcorp.us> + + * [r8344] #1361: make it clearer that a hard upgrade is required of + everyone. + +2011-12-10 03:12 Regina Obe <lr@pcorp.us> + + * [r8343] ST_AddBand version that takes an array of rasters + +2011-12-10 01:20 Bborie Park <bkpark at ucdavis.edu> + + * [r8342] Fixed calls to the wrong memory allocation function in + rtpg_XXX utility functions. + +2011-12-10 01:01 Bborie Park <bkpark at ucdavis.edu> + + * [r8341] Code refactoring in rtpg_ utility functions for better + memory usage and syntax cleanup in rt_api.* + +2011-12-10 01:00 Bborie Park <bkpark at ucdavis.edu> + + * [r8340] Fixed missing $ in AddOverviewConstraint() which was + setting 7 as the overview factor instead of the value at $7. + +2011-12-09 18:59 Sandro Santilli <strk@keybit.net> + + * [r8339] Add all signatures found in a newly created PostGIS 2.0 + database + + See #1360 + +2011-12-09 17:17 Sandro Santilli <strk@keybit.net> + + * [r8338] Add box3d related objects to skip in the _restore scripts + (#1359) + +2011-12-09 16:27 Sandro Santilli <strk@keybit.net> + + * [r8337] Restrict disabled code to the one really hurting + + See ticket #665 for more informations. + The commit also renames the test suite to "surface". + +2011-12-09 15:33 Sandro Santilli <strk@keybit.net> + + * [r8336] gbox_float_round: don't roundup Z value if the box + doesn't have one + + Fixes #1309 + +2011-12-09 14:37 Sandro Santilli <strk@keybit.net> + + * [r8335] Add a public lwgeom_get_bbox function (#1324) + +2011-12-09 14:37 Sandro Santilli <strk@keybit.net> + + * [r8334] Don't let lwgeom_add_bbox syntetize a fake box for empty + geometries + + Empty geometries have no box. Period. + Update GML extent output for empty geometries to handle the + special + case by using empty tags. Regress test it. + +2011-12-09 13:50 Sandro Santilli <strk@keybit.net> + + * [r8333] Fix segfault in GML3 extent output (#1323) + + Add support for srsDimension in GML3 extent output. + Add unit level comprensive regression testing. + +2011-12-09 12:25 Sandro Santilli <strk@keybit.net> + + * [r8332] Allow calling ST_MakeEnvelope w/out a srid (#1339) + +2011-12-09 11:18 Sandro Santilli <strk@keybit.net> + + * [r8331] Add a gbox_overlaps_2d function, use when appropriate + (#1357) + +2011-12-08 22:16 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8328] Guard against NaN values in coordinates passing into GEOS + (#627) + +2011-12-08 21:57 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8327] Check that NaN coordinate values find their way into + bboxes, they do, NaN is bigger than Inf, apparently. + +2011-12-08 21:26 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8326] Test for bbox calculations when there's an infinite + coordinate. + +2011-12-08 20:05 Bborie Park <bkpark at ucdavis.edu> + + * [r8325] Return use of GDAL "natural" blocking removed in r8313 + and refactor pointer handling. + +2011-12-08 19:51 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8324] Remove box3d_extent hack + +2011-12-08 17:54 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8323] Make the ST_Equals test insensitive to minor box + differences. + +2011-12-08 14:44 Regina Obe <lr@pcorp.us> + + * [r8322] Add Jose and Even to credits + +2011-12-08 13:35 Sandro Santilli <strk@keybit.net> + + * [r8321] Add a note about ST_Estimated_Extent on empty or + non-analyzed tables (#877) + +2011-12-08 11:29 Sandro Santilli <strk@keybit.net> + + * [r8319] Have ST_Estimated_Extent return NULL when no stats are + found for a table. + + No stats means empty table or no run of analyze. Warn about that. + These Fixes bug #877. Includes regress test. + +2011-12-08 11:28 Sandro Santilli <strk@keybit.net> + + * [r8318] Hush VACUUM and ANALYZE backend feedback while running + tests + +2011-12-08 08:07 Sandro Santilli <strk@keybit.net> + + * [r8315] topology.AddToSearchPath: quote database identifier. + + Thanks to Jose Carlos Martinez Llario <jomarlla@cgf.upv.es> + +2011-12-07 20:46 Bborie Park <bkpark at ucdavis.edu> + + * [r8314] Added rt_raster_set_pixel_line for use when setting + values for sequential pixels. Should be faster than repeated + calls to rt_raster_set_pixel. + +2011-12-07 15:29 Bborie Park <bkpark at ucdavis.edu> + + * [r8313] Refactored the GDALRasterIO part of + rt_raster_from_gdal_dataset to use scanlines instead of "natural" + blocks, which dramatically simplifies the code and makes it + easier to maintain. + +2011-12-07 06:17 Regina Obe <lr@pcorp.us> + + * [r8312] alphabetize and update tester credits + +2011-12-07 03:41 Regina Obe <lr@pcorp.us> + + * [r8311] update license to provide detail about documentation + license and copyright of data etc. + +2011-12-07 01:15 Bborie Park <bkpark at ucdavis.edu> + + * [r8310] Fixed regression issue with rt_raster_from_gdal_dataset + by explicitly setting the valid block sizes passed into + GDALRasterIO. Probably related to the changes made in r8309 + +2011-12-06 16:48 Bborie Park <bkpark at ucdavis.edu> + + * [r8309] Removed attempt to duplicate entire band in + rt_raster_from_gdal_dataset + +2011-12-06 14:40 Regina Obe <lr@pcorp.us> + + * [r8308] put some obsolete notes in existing management functions. + Now that raster_columns is a view no longer need to use + management functions to drop or add raster columns or tables. + Will document the new addconstraints etc. taht replaces much of + these soon. + +2011-12-06 12:16 Sandro Santilli <strk@keybit.net> + + * [r8307] Add copyright header. Date and attribution looked up by + SCM history. + + Verified by my own memory (I wrote the initial vesion of that + file) + +2011-12-06 06:06 Bborie Park <bkpark at ucdavis.edu> + + * [r8306] Resolved a bunch of memory issues related to use of SPI + that have been bugging me for a while. Tested successfully in + Linux 32 and 64-bit and OSX 64-bit. + +2011-12-05 18:58 Bborie Park <bkpark at ucdavis.edu> + + * [r8305] As per discussions and ticket #1319, raster_columns and + raster_overviews are now constraint-based views. AddRasterColumn, + DropRasterColumn and DropRasterTable are now deprecated in favor + of AddRasterConstraints and DropRasterConstraints. Additional + constraints are now available for enforcing the consistency of + the rasters in a table. + +2011-12-05 18:36 Bborie Park <bkpark at ucdavis.edu> + + * [r8304] Removed division by bin-width for when bin-widths are + specified in ST_Histogram + +2011-12-05 02:06 Bborie Park <bkpark at ucdavis.edu> + + * [r8303] Correctly free raster memory when handling NULL rasters. + + Associated ticket is #1349 + +2011-12-03 08:29 Regina Obe <lr@pcorp.us> + + * [r8302] #1343: get rid of geomvalxy and change ST_PixelAsPolygons + to use default args and do without geomvalxy + +2011-12-03 07:24 Regina Obe <lr@pcorp.us> + + * [r8301] #1338 - document ST_PixelWidth/Height + +2011-12-03 06:54 Bborie Park <bkpark at ucdavis.edu> + + * [r8300] Removed VARIADIC from ST_BandMetadata. Associated ticket + is #1343. + +2011-12-02 17:44 Regina Obe <lr@pcorp.us> + + * [r8299] #1346: fix misuse of quote_literal causing topology, + topology, topology, topology + +2011-12-02 17:28 Sandro Santilli <strk@keybit.net> + + * [r8298] Encode dependency of topology.sql on ManageHelper.sql + +2011-12-02 15:43 Regina Obe <lr@pcorp.us> + + * [r8297] more revisions to cross streets logic -- don't rely on + start point working with multilinestrings. change tfid to be + unique index on faces. + +2011-12-02 15:22 Bborie Park <bkpark at ucdavis.edu> + + * [r8296] Added cleanup statements for bandmetatype type and change + function signature for st_bandmetadata. + +2011-12-02 15:13 Bborie Park <bkpark at ucdavis.edu> + + * [r8295] Removed the type bandmetadata as per #1343. + +2011-12-02 08:07 Regina Obe <lr@pcorp.us> + + * [r8294] move geocode_intersection.sql to user api section since + it is documented. + +2011-12-02 06:27 Regina Obe <lr@pcorp.us> + + * [r8293] try to make emphasis bold by putting in a role='bold' + +2011-12-01 20:41 Regina Obe <lr@pcorp.us> + + * [r8292] replace ~= with ST_OrderingEquals (now that we got rid of + recheck the older ~= no longer is a truish geometry equality + operator + +2011-12-01 20:37 Regina Obe <lr@pcorp.us> + + * [r8291] emphasize approximate in KNN operators to reduce the + chance of any misunderstandings + +2011-12-01 19:06 Regina Obe <lr@pcorp.us> + + * [r8290] make compatible with postgresql 8.4, more speed + improvements + +2011-12-01 17:52 Regina Obe <lr@pcorp.us> + + * [r8289] missed a spot about occasions where point distance is not + same as <-> + +2011-12-01 17:38 Regina Obe <lr@pcorp.us> + + * [r8288] try to clarify accuracy etc. of <#> and <-> + +2011-12-01 16:14 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r8287] Ticket 1342. Integrate ST_PixelAsPolygons into + rtpostgis.sql + +2011-12-01 16:07 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r8286] Return null when band number does not exist. + +2011-12-01 16:06 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r8285] Removed ST_MinPossibleVal defined in another script + +2011-12-01 16:05 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r8284] Added doc, more test and return null when band number + does not exist. + +2011-12-01 15:52 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r8283] Ticket 1342. Integrate ST_Clip script into rtpostgis.sql + +2011-12-01 15:15 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r8282] Ticket #1340. Integrate ST_Union into rtpostgis.sql + +2011-12-01 15:11 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r8281] Replaced AsBinary with ST_AsBinary in the test section + +2011-12-01 13:32 Regina Obe <lr@pcorp.us> + + * [r8280] #1337 clarify what sql is good for and get rid of some + other obsolete syntax (this really needs to be read with a + fine-tooth comb). The amount of obsolete info in this chapter is + mesmerizing + +2011-12-01 08:36 Regina Obe <lr@pcorp.us> + + * [r8276] #1333 geocode_intersections: would help to actually + include the function to. + +2011-12-01 08:28 Regina Obe <lr@pcorp.us> + + * [r8275] #1333 geocode intersections + +2011-12-01 04:29 David Zwarg <dzwarg@azavea.com> + + * [r8274] Added neighborhood hillshade on top of + ST_MapAlgebraFctNgb. Part of #1318 + +2011-12-01 02:23 Bborie Park <bkpark at ucdavis.edu> + + * [r8273] Tweaked ST_BandMetadata so that calling the function with + an empty array returns all metadata of all bands. Example: + ST_BandMetadata(rast, VARIADIC ARRAY[]::int[]) + +2011-12-01 01:11 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r8272] Copied from ST_MapAlgebra.sql + +2011-12-01 01:10 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r8271] Copied from ST_Union + +2011-12-01 01:09 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r8270] Some cleaning before inclusion in rtpostgis.sql + Removed ST_MultiBandMapAlgebra and ST_HasNoBand + +2011-12-01 01:07 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r8269] Return the last band when the provided band number does + not exist. + +2011-12-01 01:07 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r8268] Added some variants and tests + +2011-11-30 22:42 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r8267] plpgsql implementation for st_clip.sql(raster, geom) + +2011-11-30 22:41 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r8266] Added the id of the polygon in the example + +2011-11-30 22:34 David Zwarg <dzwarg@azavea.com> + + * [r8265] Added ST_Aspect map algebra neighborhood shortcut + function. #1318 + +2011-11-30 21:44 David Zwarg <dzwarg@azavea.com> + + * [r8264] Added ST_Slope map algebra neighborhood shortcut + function. + +2011-11-30 20:35 Bborie Park <bkpark at ucdavis.edu> + + * [r8263] Fixed ST_AsRaster to duplicate exactly the attributes of + a reference raster. + + Associated ticket is #1336. + +2011-11-30 19:26 David Zwarg <dzwarg@azavea.com> + + * [r8262] Added helper user functions for common MapAlgebra + operations: Min, Max, Mean, Range. #1318 + +2011-11-30 16:45 David Zwarg <dzwarg@azavea.com> + + * [r8261] Updated tests for 'dog-ate-my-homework' test. Expanded + comments and elaborated on complex conditionals in + ST_MapAlgebraFctNgb + +2011-11-30 14:51 David Zwarg <dzwarg@azavea.com> + + * [r8260] Added additional tests for ST_MapAlgebraFctNgb, changed + string compare on nodatamode to != + +2011-11-29 23:25 Bborie Park <bkpark at ucdavis.edu> + + * [r8259] In preparation of turning the table raster_columns into a + view, refactored ST_BandMetadata to have the bandnum parameter be + variadic. Fleshed out regression tests for ST_BandMetadata. + +2011-11-29 20:30 Sandro Santilli <strk@keybit.net> + + * [r8258] Ignore more generated files + +2011-11-29 20:22 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8257] ST_AddPoint returns incorrect result on Linux (#1335) + from roualt + +2011-11-29 16:57 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r8256] Replaced the summarystatsstate type with the summarystats + type to avoid defining a new type. + +2011-11-29 16:34 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r8255] Changed the note at the beginning of the file when the + function is now implemented in C. + +2011-11-29 16:20 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r8254] Some more useful functions + +2011-11-29 16:15 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r8253] Added some plpgsql functions + +2011-11-29 08:49 Regina Obe <lr@pcorp.us> + + * [r8252] Fix for #1310 + +2011-11-28 13:36 Regina Obe <lr@pcorp.us> + + * [r8251] Note: libxml2 dependency of ST_Geom*ML functions and ref + back to configuration section. Also put in missing + --with-xml2config flag in installion_configuration section + +2011-11-26 21:17 Regina Obe <lr@pcorp.us> + + * [r8250] put a firmer sorta date in the sand + +2011-11-26 21:16 Regina Obe <lr@pcorp.us> + + * [r8249] more credit cleanup -- add people I missed, fix some + minor typos + +2011-11-26 06:07 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8246] ST_AsSVG kills whole postgres server when fails (#1028) + +2011-11-26 05:25 Regina Obe <lr@pcorp.us> + + * [r8244] update credits to include hard-core testers + +2011-11-26 05:04 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8243] Revert per #1246 + +2011-11-25 11:54 Regina Obe <lr@pcorp.us> + + * [r8242] remove more obsolete protos in docs and up extension + alpha version numbers + +2011-11-25 11:49 Regina Obe <lr@pcorp.us> + + * [r8241] remove more protos that have been removed and replaced + with default args + +2011-11-24 21:13 Sandro Santilli <strk@keybit.net> + + * [r8239] Move the 'CREATE SCHEMA' query out of first column + anchorage (#1325) + + Makes the upgrade script generator less confused... + +2011-11-24 19:17 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8238] Fix operator mis-referencing nd function for 2d op. + +2011-11-24 16:01 Sandro Santilli <strk@keybit.net> + + * [r8237] Override GeometryType and ST_GeometryType for + TopoGeometry (#1289) + + Includes regression testing. + NOTE: we'll always advertise MULTI as a safest bet + +2011-11-24 16:01 Sandro Santilli <strk@keybit.net> + + * [r8236] Shake legacy testcase a bit to avoid to mix population + with queries + +2011-11-24 03:44 Regina Obe <lr@pcorp.us> + + * [r8235] provide examples for ST_GeomFromGeoJSON now that I can + compile it :) + +2011-11-24 03:23 Regina Obe <lr@pcorp.us> + + * [r8234] update to include links to wiki for extra compilation + help and pre-built binaries. + +2011-11-24 03:14 Regina Obe <lr@pcorp.us> + + * [r8233] Amend installation instructions to include json-dir + configure option + +2011-11-24 02:05 Regina Obe <lr@pcorp.us> + + * [r8232] minor updates to bios + +2011-11-24 01:58 Regina Obe <lr@pcorp.us> + + * [r8231] update news / credits for ST_GeomFromGeoJSON + +2011-11-23 17:28 Sandro Santilli <strk@keybit.net> + + * [r8229] Const-correct GML signatures + +2011-11-23 17:26 Regina Obe <lr@pcorp.us> + + * [r8228] change + to | to make strk happy + +2011-11-23 17:24 Regina Obe <lr@pcorp.us> + + * [r8227] update ST_AsGML with examples and include envelope bits + option + +2011-11-23 15:27 Regina Obe <lr@pcorp.us> + + * [r8226] fix typo in GML description noted by strk + +2011-11-23 02:17 Regina Obe <lr@pcorp.us> + + * [r8225] correct signatures of some functions changed to use more + default args + +2011-11-22 19:01 Bborie Park <bkpark at ucdavis.edu> + + * [r8224] Prefixed internal C utility functions with rtpg_. This + keeps the coding style inline with that for postgis. + +2011-11-22 18:10 Bborie Park <bkpark at ucdavis.edu> + + * [r8223] Corrected incorrect drop function statement. + +2011-11-22 17:58 Bborie Park <bkpark at ucdavis.edu> + + * [r8222] More SQL function cleanup with use of default parameter + values. + +2011-11-22 09:26 Regina Obe <lr@pcorp.us> + + * [r8221] up the alpha numbers + +2011-11-22 09:21 Regina Obe <lr@pcorp.us> + + * [r8220] missed a spot + +2011-11-22 09:05 Regina Obe <lr@pcorp.us> + + * [r8219] correct documentation to get rid of protos eradicated in + r8218 (so extensions installs) + +2011-11-22 01:06 Bborie Park <bkpark at ucdavis.edu> + + * [r8218] Additional function cleanup by making use of DEFAULT + parameter values + +2011-11-21 20:09 Bborie Park <bkpark at ucdavis.edu> + + * [r8217] Fixed expression parsing in RASTER_mapAlgebra2. + Evidently, the count parameter of replace() is an input/output + parameter. + + Associated ticket is #1317. + +2011-11-21 19:55 Bborie Park <bkpark at ucdavis.edu> + + * [r8216] Fixed behavior of one raster not having specified band + and being sampled. + + Associated ticket is #1316. + +2011-11-21 19:18 Bborie Park <bkpark at ucdavis.edu> + + * [r8215] Fixed extent bug for UNION in rt_raster_from_two_rasters + +2011-11-21 19:18 Regina Obe <lr@pcorp.us> + + * [r8214] description corrections to ST_MapAlgebraNgbFct based on + input from dzwarg + +2011-11-21 17:37 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r8213] Many fix following the C implementation of the two raster + version of ST_MapAlgebra. + +2011-11-21 16:32 Sandro Santilli <strk@keybit.net> + + * [r8212] Add a vertex-snap-tolerance parameter to + ptarray_substring + + This is aimed at improving robustness for ST_Split, which now + uses an hard-coded tolerance of 1e-14 (see #1311) + +2011-11-21 16:15 Regina Obe <lr@pcorp.us> + + * [r8211] revise explanation based on trying to read the code to + figure out what nodatamode in theory should be doing + +2011-11-21 16:03 Sandro Santilli <strk@keybit.net> + + * [r8210] Numerate tests for line_substring + +2011-11-21 15:59 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r8209] -Fix cut and paste error + +2011-11-21 15:37 Regina Obe <lr@pcorp.us> + + * [r8208] get rid of extra para tag + +2011-11-21 15:32 Regina Obe <lr@pcorp.us> + + * [r8207] ST_MapAlgebraFctNgb:add in the nodatamode to ST_ (forgot + it last time). I still have no clue what this parameter does -- + doesn't seem to do anything for me like get rid of the border. + Add in links to where to get example raster used. fix some typos + +2011-11-21 14:59 Sandro Santilli <strk@keybit.net> + + * [r8206] Add testcase for #1311 (lwgeom_split). + + Also fix existing testcase (wasn't really testing it). + +2011-11-21 14:59 Sandro Santilli <strk@keybit.net> + + * [r8205] Fix memory leak in lwgeom_split + +2011-11-21 12:10 Sandro Santilli <strk@keybit.net> + + * [r8204] Hush warning about missing prototype. + + This is really a commit intended to amend the previous for the + sake + of pointing to the correct bug being closed by it: #1273 (not + #1023 + which is more complex) + +2011-11-21 12:03 Sandro Santilli <strk@keybit.net> + + * [r8203] Have gserialized_get_gbox_p always return a + round-to-float box + + That is, even when computing the box from scratch. + This makes the box always float-oriented, + consistently between cached and computed boxes. + Closes (hopefully forever) bug #1023. + Includes testcase otherwise failing. + +2011-11-21 09:33 Sandro Santilli <strk@keybit.net> + + * [r8202] Add testcase for ticket #1302 (now passes) + +2011-11-21 08:33 Sandro Santilli <strk@keybit.net> + + * [r8201] Update expected error messages not to include the + "topology" namespace (now that it's part of the search_path). + +2011-11-21 08:23 Sandro Santilli <strk@keybit.net> + + * [r8200] Rename "LibGeom Suite" to simply "libgeom", for easy of + use + +2011-11-21 08:21 Sandro Santilli <strk@keybit.net> + + * [r8199] Surrender to evidence of the narrow ring tested being + clockwise + +2011-11-21 08:08 Sandro Santilli <strk@keybit.net> + + * [r8198] Improve robustness of ptarray_isccw (see #1302) + +2011-11-21 07:48 Regina Obe <lr@pcorp.us> + + * [r8197] Logic to add topology to database search path on install + or upgrade + +2011-11-21 04:02 Regina Obe <lr@pcorp.us> + + * [r8196] FIX upgrade script - complement to r8186 - drop all + mapalgebra functions before upgrade because for pg9.0+ CREATE OR + REPLACE FUNCTION fails if argument names have changed. Also + update docs to reflect new naming of userfunction to + onerasteruderfunc,tworasteruserfunc,onerasternguserfunc + +2011-11-20 21:37 Regina Obe <lr@pcorp.us> + + * [r8195] fix some ST_MapAlgebra userfunc arg names to agree with + code. Still ng ones to go and drop fix. + +2011-11-20 21:35 Sandro Santilli <strk@keybit.net> + + * [r8194] Add another test for ptarray_isccw, which incredibly + seems to disagree with the same check done when the same ring + occurs in a polygon + +2011-11-20 21:19 Sandro Santilli <strk@keybit.net> + + * [r8193] Do not memcpy to self in ptarray_reverse (see #1302) + +2011-11-20 21:19 Sandro Santilli <strk@keybit.net> + + * [r8192] Better indent for comparing obtained/expected + +2011-11-20 20:51 Sandro Santilli <strk@keybit.net> + + * [r8191] Fix 'clean' rule under loader to drop stuff under .libs + +2011-11-20 20:51 Sandro Santilli <strk@keybit.net> + + * [r8190] Add test for lwgeom_force_clockwise (see #1302) + +2011-11-19 17:28 Sandro Santilli <strk@keybit.net> + + * [r8189] Add test for ptarray_isccw (see #1302) + +2011-11-18 23:47 Bborie Park <bkpark at ucdavis.edu> + + * [r8188] Addition of function rt_util_gdal_datatype_to_pixtype to + complement rt_util_pixtype_to_gdal_datatype. + +2011-11-18 22:38 David Zwarg <dzwarg@azavea.com> + + * [r8187] Documented ST_Rotation and ST_SetRotation. + +2011-11-18 21:41 Bborie Park <bkpark at ucdavis.edu> + + * [r8186] Update parameter names for regprocedure data types + +2011-11-18 21:28 David Zwarg <dzwarg@azavea.com> + + * [r8185] Nodata mode defaults to 'ignore' if it is NULL. Added + tests for out of range neighborhoods. + +2011-11-18 20:56 David Zwarg <dzwarg@azavea.com> + + * [r8184] Non-functional change. Updated author email address for + dzwarg. + +2011-11-18 20:53 David Zwarg <dzwarg@azavea.com> + + * [r8183] Refactored ST_MapAlgebraFctNgb to cache userfunction + lookup, and accept NULL input and output values. + +2011-11-18 20:15 David Zwarg <dzwarg@azavea.com> + + * [r8182] Refactored ST_MapAlgebraFct to cache userfunction lookup, + and accept NULL input and output values. + +2011-11-18 18:30 Bborie Park <bkpark at ucdavis.edu> + + * [r8181] Added a flag --with-raster-dblwarning so as to provide + the software builder the option of enabling all the value + truncation/clamping/conversion warnings, which can be many. The + new default is to suppress those warnings. All appropriate + regression tests have been updated. + + Associated ticket is #1307 + +2011-11-18 15:53 David Zwarg <dzwarg@azavea.com> + + * [r8180] Enabled all tests on ST_MapAlgebraFctNgb. + +2011-11-18 14:53 David Zwarg <dzwarg@azavea.com> + + * [r8179] Fixed debug problem in #1308 + +2011-11-18 13:59 Regina Obe <lr@pcorp.us> + + * [r8178] fix minor typo + +2011-11-18 13:58 Regina Obe <lr@pcorp.us> + + * [r8177] document new ST_GeomFromGeoJSON function. Will provide + examples later once resolved my JSON-C compilation issues + +2011-11-18 13:24 Regina Obe <lr@pcorp.us> + + * [r8176] minor corrections + +2011-11-18 03:36 Regina Obe <lr@pcorp.us> + + * [r8175] increment alpha release number to allow upgrade with + extensions + +2011-11-18 03:08 Regina Obe <lr@pcorp.us> + + * [r8174] fix code comment + +2011-11-18 02:54 Regina Obe <lr@pcorp.us> + + * [r8173] forgot pixeltype in ngb arg list + +2011-11-18 02:48 Regina Obe <lr@pcorp.us> + + * [r8172] fix typo in linkends + +2011-11-18 02:32 Regina Obe <lr@pcorp.us> + + * [r8171] put in missing spaces + +2011-11-18 02:31 Regina Obe <lr@pcorp.us> + + * [r8170] ST_MapAlgebraFctNgb (and put in immuatable for other + st_mapalgebras) + +2011-11-18 01:15 Regina Obe <lr@pcorp.us> + + * [r8169] #1306: document rescale and provide examples, fix + st_resample args. (still 2 more to go in this ticket) + +2011-11-18 00:29 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8168] Move library link to appropriate place. + +2011-11-18 00:17 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8167] Add ST_GeomFromGeoJSON (#376) + +2011-11-18 00:17 Regina Obe <lr@pcorp.us> + + * [r8166] correct ST_Resample arguments to agree with + implementation. Still need to fill in descriptions of what all + params mean + +2011-11-17 22:48 Bborie Park <bkpark at ucdavis.edu> + + * [r8165] Fix the 8.4 error only described in #1296. + +2011-11-17 15:04 Bborie Park <bkpark at ucdavis.edu> + + * [r8164] Additional corrections and cleanup for ST_BandNoDataValue + +2011-11-17 14:57 Bborie Park <bkpark at ucdavis.edu> + + * [r8163] Fixed a bunch of other nodataval datatype issues. + +2011-11-17 14:49 Bborie Park <bkpark at ucdavis.edu> + + * [r8162] Fixed invalid handling of nodatavalue in + ST_BandMetaData(). Issue arises due to C backend using + Float8GetDatum while SQL frontend using real datatype. + +2011-11-17 04:25 Regina Obe <lr@pcorp.us> + + * [r8161] put in some spacing + +2011-11-17 01:44 Regina Obe <lr@pcorp.us> + + * [r8160] more event ideas + +2011-11-16 20:39 Regina Obe <lr@pcorp.us> + + * [r8159] put in missing svn:keywords fix formatting of cards so + easier to break on pages + +2011-11-16 17:38 Regina Obe <lr@pcorp.us> + + * [r8158] Post GIS day commemorative cards generator + +2011-11-16 03:41 Regina Obe <lr@pcorp.us> + + * [r8157] logic to create a an topology_upgrade_20_minor.sql + +2011-11-15 18:15 Bborie Park <bkpark at ucdavis.edu> + + * [r8156] Removed hardcoded SRID of 0 and replaced with + ST_SRID('Point(0 0)'::geometry) + +2011-11-15 00:48 Regina Obe <lr@pcorp.us> + + * [r8155] put in missing t in raster load examples + +2011-11-14 23:21 David Zwarg <dzwarg@azavea.com> + + * [r8154] Added single version of map algebra that operates on + neighborhoods. + +2011-11-14 21:40 Bborie Park <bkpark at ucdavis.edu> + + * [r8153] Added ability to specify raster width and height to + ST_Resample. + + Associated ticket is #1267 + +2011-11-14 08:15 Regina Obe <lr@pcorp.us> + + * [r8152] revise extension upgrade builder to use new remove + functions from extension before attemtpting to readd them. Cool I + can now upgrade my 2.0.0a3 to 2.0.0a.6 without any complaints. + +2011-11-14 07:36 Regina Obe <lr@pcorp.us> + + * [r8151] minor corrections to extension helper, create extension + uninstall, incorporate in topology extension upgrade script + +2011-11-14 05:44 Regina Obe <lr@pcorp.us> + + * [r8150] helper functions for creating upgrade extension script. + So far helper so I can sneakingly drop functions from an existing + extension so I can reinstall them if a create or replace will not + be sufficient.(so I avoid the dreaded error -- can't drop + function /aggregate because its part of an extension.) + +2011-11-13 03:45 Regina Obe <lr@pcorp.us> + + * [r8149] #1288: correct some obsolete advice about how to create + indexes and register a geometry column. + +2011-11-12 18:20 Sandro Santilli <strk@keybit.net> + + * [r8148] Do not consider nodes with the same bounding box as being + equal. + + Fixes bug #1284. Includes regression test. + +2011-11-12 15:12 Bborie Park <bkpark at ucdavis.edu> + + * [r8147] Added checks to make sure user-function is valid. Also + added check for volatility of user-function with notice if + function is volatile. + +2011-11-12 13:14 Regina Obe <lr@pcorp.us> + + * [r8146] Fix typo + +2011-11-12 05:28 Regina Obe <lr@pcorp.us> + + * [r8145] escape html entitities in program listing of + ST_MApAlgebrafct 2 band version + +2011-11-12 04:27 Regina Obe <lr@pcorp.us> + + * [r8144] add examples and fix arg list + +2011-11-12 00:01 Bborie Park <bkpark at ucdavis.edu> + + * [r8143] Removed third variant as it conflicts with the second + variant of 2-raster ST_MapAlgebraFct + + Related ticket is #1283 + +2011-11-11 23:07 Regina Obe <lr@pcorp.us> + + * [r8142] begin documentation of 2 band ST_MapAlgebraFct -- waiting + for dustymugs to fix signature before providing examples + +2011-11-11 20:34 Regina Obe <lr@pcorp.us> + + * [r8141] fix arg list in ST_MapAlgebraExpr single band version + (nodatavalexpr got relaplced with nodataval which is now double + precision instead of text) + +2011-11-11 19:31 David Zwarg <dzwarg@azavea.com> + + * [r8140] Added more test to plpgsql ST_MapAlgebraFctNgb prototype. + +2011-11-11 18:50 David Zwarg <dzwarg@azavea.com> + + * [r8139] Added pl/pgsql prototype of the neighborhood map algebra + function. + +2011-11-11 15:45 Bborie Park <bkpark at ucdavis.edu> + + * [r8138] Removed commented-out stubs for nonexistant + RASTER_mapAlgebra2Fct + +2011-11-11 15:41 Bborie Park <bkpark at ucdavis.edu> + + * [r8137] Add ST_MapAlgebraFct for 2 rasters. This is the sibling + of 2-raster ST_MapAlgebraExpr. Renamed RASTER_mapAlgebra2Expr to + RASTER_mapAlgebra2 as both 2-raster ST_MapAlgebraExpr and + ST_MapAlgebraFct call the same function. + + Associated ticket is #1281. + +2011-11-11 08:40 Regina Obe <lr@pcorp.us> + + * [r8136] put comment about expression + +2011-11-10 20:59 David Zwarg <dzwarg@azavea.com> + + * [r8135] Updated documentation for all variants of + ST_MapAlgebraFct. + +2011-11-10 11:10 Sandro Santilli <strk@keybit.net> + + * [r8134] Make sure to "round-to-float" boxes read from serialized, + no matter if there was or not a cache. Fixes #1273. Includes + regress testing. Note: would be worth to also test the 2-points + line case (I didn't in this specific commit, but the patch should + fix that as well). + +2011-11-10 00:18 Regina Obe <lr@pcorp.us> + + * [r8133] add missing references to other functions used + +2011-11-10 00:15 Regina Obe <lr@pcorp.us> + + * [r8132] Add example of overlaying single rasters on same canvas + +2011-11-10 00:02 Bborie Park <bkpark at ucdavis.edu> + + * [r8131] Signatures changed for ST_MapAlgebraExpr where + nodatavaluerepl (text) is now nodataval (double precision) + +2011-11-09 23:52 Bborie Park <bkpark at ucdavis.edu> + + * [r8130] Removed all remaining memory leaks from testapi.c + +2011-11-09 23:12 Bborie Park <bkpark at ucdavis.edu> + + * [r8129] Rolled back attempt to clean up memory handling. We'll + just live with this until testapi.c is replaced by cunit tests + for raster. + +2011-11-09 23:00 Bborie Park <bkpark at ucdavis.edu> + + * [r8128] Separated the output raster's extent calculation from + RASTER_mapAlgebra2Expr() in rt_pg.c to + rt_raster_from_two_rasters() in rt_api.c. Added test of + rt_raster_from_two_rasters() in testapi.c + +2011-11-09 17:15 Regina Obe <lr@pcorp.us> + + * [r8127] fix typos, provide description for nodatanodataval + (pierre / bborie /dzwarg -- please check my definitions to make + sure they are right) + +2011-11-09 15:35 Bborie Park <bkpark at ucdavis.edu> + + * [r8126] Fixed bug where an expression doesn't contain a + placeholder (either rast1 or rast2). + + Associated ticket is #1276. + +2011-11-09 05:02 Regina Obe <lr@pcorp.us> + + * [r8125] fix minor typos + +2011-11-09 03:52 Regina Obe <lr@pcorp.us> + + * [r8124] increment version + +2011-11-09 03:45 Regina Obe <lr@pcorp.us> + + * [r8123] break out what all the different arguments are in 2 map + algebra. + +2011-11-09 02:55 Regina Obe <lr@pcorp.us> + + * [r8122] fix some typos, revise example demonstrating difference + between intersection and union. include pictures. + +2011-11-09 01:05 Regina Obe <lr@pcorp.us> + + * [r8121] Add ST_BandMetaData to drop target. Upgrade can't install + the new version otherwise since the output parameter data types + changed. + +2011-11-08 23:18 Bborie Park <bkpark at ucdavis.edu> + + * [r8120] Fix floating point issues in rt_raster_geopoint_to_cell + in addition to other minor changes. + +2011-11-08 21:34 Bborie Park <bkpark at ucdavis.edu> + + * [r8119] Bug fix for evaluating remainder when remainder is + infinitely close to 1. Basically, the check wasn't added to a + block of code those similar blocks of code had the check. + +2011-11-08 20:32 Regina Obe <lr@pcorp.us> + + * [r8118] ST_MapAlgebraExpr - 2 band version - incorporate Pierre's + corrections / additions + +2011-11-08 18:41 Regina Obe <lr@pcorp.us> + + * [r8117] document ST_MapAlgebraExpr (2 raster band version). Need + to clean up the example also figure out how I managed to crash my + server with this. + +2011-11-08 17:47 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8116] Do the "are boxes different?" test in ST_Equals using a + tolerance instead of exact comparisons. + +2011-11-08 10:23 Sandro Santilli <strk@keybit.net> + + * [r8115] Re-fix robustness issue on 32bit system (seg is 0-based, + npoints is 1-based but segments is npoints-1) + +2011-11-08 08:55 Sandro Santilli <strk@keybit.net> + + * [r8114] Give unique names to linearref tests + +2011-11-08 08:55 Sandro Santilli <strk@keybit.net> + + * [r8113] Add test for bug #1270 + +2011-11-08 08:51 Sandro Santilli <strk@keybit.net> + + * [r8112] Fix st_line_locate_point check for "last point" (#1271) + +2011-11-08 05:27 Bborie Park <bkpark at ucdavis.edu> + + * [r8111] Renamed ST_MapAlgebra2Expr to ST_MapAlgebra after + concensus with Pierre and Regina. + +2011-11-08 00:00 Bborie Park <bkpark at ucdavis.edu> + + * [r8110] Replaced ST_MapAlgebraExpr's "nodatavalueexpr" parameter + with "nodataval" and datatype changed from text to double + precision. This makes this parameter the same as + "nodatanodataval" found in ST_MapAlgebra2Expr. + + Associated ticket is #866 + +2011-11-07 21:17 Bborie Park <bkpark at ucdavis.edu> + + * [r8109] Rephrased a sentence or two in ST_Resample. Might not be + the best. + +2011-11-07 21:07 Bborie Park <bkpark at ucdavis.edu> + + * [r8108] Addition of 2-raster map algebra function + ST_MapAlgebra2Expr. Next is ST_MapAlgebra2Fct. + + Ticket is #1268. + +2011-11-07 17:01 Sandro Santilli <strk@keybit.net> + + * [r8107] Enhance robustness of ptarray_locate_point, fixing bug + #1269. + + Includes regression testcase. + +2011-11-06 20:26 Bborie Park <bkpark at ucdavis.edu> + + * [r8106] Following the cleanup in r8104, additional cleanup to + remove POSTGIS_GDAL_VERSION + +2011-11-06 20:17 Sandro Santilli <strk@keybit.net> + + * [r8105] Double-check line splitting to avoid returning empty + components + + It happened on my 32bit system based on presence or absence of an + lwnotice call, probably a compiler bug... + +2011-11-06 19:39 Sandro Santilli <strk@keybit.net> + + * [r8104] Don't change SQL at compile time. The code is safe + enough. + +2011-11-06 19:30 Bborie Park <bkpark at ucdavis.edu> + + * [r8103] Renamed output parameter "hasnodatavalue" to "hasnodata" + in ST_BandMetadata(). This makes the parameter name consistent + with all other use of "hasnodata" and the docs for + ST_BandMetadata. + +2011-11-06 04:56 Bborie Park <bkpark at ucdavis.edu> + + * [r8102] Fixed the bug described in #1263. Also fixed additional + code that has the same problem. Additional syntax cleaning and + comments updated. Fixed the problem with "make check" running + test/core twice. + +2011-11-05 22:40 Bborie Park <bkpark at ucdavis.edu> + + * [r8101] Reverted r8100 due to regression failures. Instead, I + added an exception check to catch for when the client isn't able + to find postgis_gdal_version in the search path. + + Associated ticket is #1266 + +2011-11-05 14:28 Bborie Park <bkpark at ucdavis.edu> + + * [r8100] Moved postgis_gdal_version() from rtpostgis.sql.in.c to + postgis.sql.in.c. Added additional sed command to + postgis/Makefile.in to handle RASTER_MODULE_PATH so as to + continue using the underlyiing RASTER_gdal_version(). + + Associated ticket is #1266. + +2011-11-05 03:50 Regina Obe <lr@pcorp.us> + + * [r8099] Fix output of ST_Node -- evidentally we haven't yet + instituted the change to output MULTILINESTRINGZ etc in WKT in + ST_AsText nor ST_AsEWKT + +2011-11-04 22:06 Regina Obe <lr@pcorp.us> + + * [r8098] increment to 2.0.0a4 + +2011-11-04 22:05 Regina Obe <lr@pcorp.us> + + * [r8097] increment to 2.0.0a4 + +2011-11-04 21:43 Regina Obe <lr@pcorp.us> + + * [r8096] alphabatize reference_processing section. Change postgis + cheatsheet to output to 2 columns. Minor adjusts to tiger + cheatsheet + +2011-11-04 20:46 Regina Obe <lr@pcorp.us> + + * [r8095] #1206: put in example for ST_Node. Can't test yet since + my geos is recompiling. + +2011-11-04 18:48 Sandro Santilli <strk@keybit.net> + + * [r8094] Document ST_Node (#1206) + +2011-11-04 18:24 Sandro Santilli <strk@keybit.net> + + * [r8093] Add SQL-level tests for ST_Node (#1206) + +2011-11-04 18:17 Sandro Santilli <strk@keybit.net> + + * [r8092] Fix clean rule to get rid of .o files + +2011-11-04 14:25 Sandro Santilli <strk@keybit.net> + + * [r8091] Expose ST_Node at SQL level (#1206) + +2011-11-04 12:22 Regina Obe <lr@pcorp.us> + + * [r8090] ability to turn off example generation, and change to + turn off by default + +2011-11-04 08:15 Sandro Santilli <strk@keybit.net> + + * [r8089] Fix builds againts GEOS < 3.3 + +2011-11-04 06:45 Sandro Santilli <strk@keybit.net> + + * [r8088] Add an lwgeom_node function in liblwgeom (see #1206) + Includes testcase + +2011-11-04 00:57 Regina Obe <lr@pcorp.us> + + * [r8087] Add enhanced note for AddGeometryColumn + +2011-11-03 17:28 Sandro Santilli <strk@keybit.net> + + * [r8086] Add lwcollection_reserve internal function + +2011-11-03 17:09 Sandro Santilli <strk@keybit.net> + + * [r8085] Pass GEOS version to unit tests, skip test for SPLIT when + building against older geos. + +2011-11-03 16:20 Sandro Santilli <strk@keybit.net> + + * [r8084] Add an line-by-point internal split function taking an + output vector. + Regress test the new function. + +2011-11-02 16:53 Sandro Santilli <strk@keybit.net> + + * [r8083] Add test for ST_Summary + +2011-11-02 13:48 Regina Obe <lr@pcorp.us> + + * [r8082] change order of populate_geometry_columns drop all one + depends on oid one + +2011-11-02 13:47 Regina Obe <lr@pcorp.us> + + * [r8081] drop populate_geometry_columns(). This is needed because + got replaced by populate_geometry_columns(use_typmod=true). So if + both exist get function is not unique error + +2011-11-02 13:42 Regina Obe <lr@pcorp.us> + + * [r8080] #1256 drop memgeomunion so geomunion can be dropped + +2011-11-02 06:50 Regina Obe <lr@pcorp.us> + + * [r8079] more formatting experiments + +2011-11-02 04:28 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8078] Composite geometries end up with nested BBOX caches + (#1254) + +2011-11-01 18:17 Bborie Park <bkpark at ucdavis.edu> + + * [r8077] Based upon mailing list discussion, changed call to + ST_AsRaster in _st_intersects(raster, geometry) to _st_asraster. + +2011-11-01 17:59 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8076] Make st_summary at least return consistent results + (#1254) + +2011-11-01 17:11 Regina Obe <lr@pcorp.us> + + * [r8075] document ST_SameAlignment + +2011-11-01 04:41 Regina Obe <lr@pcorp.us> + + * [r8074] revise all to output arg list and conditionally show + examples and descriptions + +2011-11-01 03:06 Regina Obe <lr@pcorp.us> + + * [r8073] xsl to generate postgis cheatsheet, add make cheatsheet + to gnumake, better outptuting of functions with different protos. + +2011-10-31 22:26 Sandro Santilli <strk@keybit.net> + + * [r8069] ST_CreateTopoGeo: speedup merged lines splitting + [RT-SIGTA] + +2011-10-31 21:18 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8068] Increase accuracy of area calculation (#810) + +2011-10-31 20:59 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8067] Remove redundant prototype + +2011-10-31 20:55 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8066] Move gserialized_get_gbox_p to liblwgeom and + gserialized_read_gbox_p to liblwgeom_internal + +2011-10-31 20:23 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8065] Rename pglwgeom_box2d_p + +2011-10-31 20:02 Regina Obe <lr@pcorp.us> + + * [r8064] add raster cheat sheet generator -- and a make + cheatsheets command to generate all. + +2011-10-31 19:20 Regina Obe <lr@pcorp.us> + + * [r8063] get rid of word "Functions" in section headers + +2011-10-31 13:03 Sandro Santilli <strk@keybit.net> + + * [r8062] ST_CreateTopoGeo: do not drop input nodes of degree 2 + (#1258) [RT-SIGTA] + +2011-10-31 12:45 Sandro Santilli <strk@keybit.net> + + * [r8061] Fix generation of topology in presence of edges with same + bounding box (#1261). + + Includes regress test [RT-SIGTA] + +2011-10-31 12:22 Regina Obe <lr@pcorp.us> + + * [r8060] fix another erroneous statement - its ValidateTopology + not ST_ValidateTopology + +2011-10-31 11:58 Regina Obe <lr@pcorp.us> + + * [r8059] get rid of word feature in description of + AddTopGeometryColumn. Table can be any kind of table. + +2011-10-31 05:32 Regina Obe <lr@pcorp.us> + + * [r8058] more cleanup -- only print example sections if they have + examples + +2011-10-31 03:14 Regina Obe <lr@pcorp.us> + + * [r8057] build cheat sheet for tiger geocoder. This one looks + better laid out than topology one so have to revisit topology + +2011-10-31 02:11 Regina Obe <lr@pcorp.us> + + * [r8056] logic to flag new functions and allow tags in listings to + be displayed + +2011-10-30 23:10 Regina Obe <lr@pcorp.us> + + * [r8055] get rid of unused styles + +2011-10-30 21:47 Sandro Santilli <strk@keybit.net> + + * [r8054] AddEdgeModFace, AddEdgeNewFaces: simplify calls to + AddEdge [RT-SIGTA] + +2011-10-30 20:57 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8053] Remove some duplicate headers (much of this to be + done...) + +2011-10-30 20:45 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8052] Remove SERIALIZED_FORM + +2011-10-30 20:40 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8051] Remove pglwgeom_serialize + +2011-10-30 19:15 Sandro Santilli <strk@keybit.net> + + * [r8050] Add some hints about the visited table for topology.AsGML + +2011-10-30 18:49 Regina Obe <lr@pcorp.us> + + * [r8049] logic to build html cheatsheet -- some logic still needed + to extract the examples correctly. + +2011-10-30 15:36 Regina Obe <lr@pcorp.us> + + * [r8048] get rid of extra fluff words in section titles + +2011-10-29 20:54 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8047] Fix regression + +2011-10-29 20:35 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8046] Remove pglwgeom_ndims + +2011-10-29 20:07 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8045] Remove pglwgeom_size + +2011-10-29 20:04 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8044] Remove pglwgeom_get_zm + +2011-10-29 01:05 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8043] Fix odd formating in optimistic_overlap + +2011-10-29 01:01 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8042] Remove pglwgeom_is_empty + +2011-10-29 01:00 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8041] Remove pglwgeom_drop_bbox + +2011-10-29 00:58 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8040] Remove pglwgeom_has_bbox, pglwgeom_has_z, pglwgeom_has_m + +2011-10-29 00:58 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8039] Remove pglwgeom_has_bbox, pglwgeom_has_z, pglwgeom_has_m + +2011-10-29 00:50 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8038] Remove pglwgeom_get_type + +2011-10-28 22:06 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8037] remove pglwgeom_get_srid, pglwgeom_set_srid + +2011-10-28 21:57 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8036] Remove pglwgeom_deserialize + +2011-10-28 20:54 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8035] Commit remaining removals of BOX2DFLOAT4 and PG_LWGEOM + +2011-10-28 20:46 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8034] Remove BOX2DFLOAT4->GBOX and PG_LWGEOM->GSERIALIZED + #defines + +2011-10-28 18:21 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8033] Fix call to geometry_type_from_string to use right type. + +2011-10-28 18:09 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8032] Move clone support functions into internal + +2011-10-28 18:01 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8031] Replace min/max/abs macros with FP_* variants in + liblwgeom/ and with pgsql variants in postgis/ + +2011-10-28 17:52 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8030] Remove orphaned box3d and box2dfloat4 utility functions + +2011-10-28 17:44 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8029] Remove orphaned _compute_box3d functions + +2011-10-28 17:35 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8028] Remove box2df_from_gbox and gbox_from_box2df + +2011-10-28 17:01 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8027] Ensure calls to lwgeom->type use type of uint8_t + +2011-10-28 14:51 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8026] Remove old profiling code + +2011-10-27 23:02 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8025] Remove old 8-bit type utility functions. + +2011-10-27 22:48 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8024] Remove LWGEOM_Min* and LWGEOM_Max* + +2011-10-27 21:03 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8023] Remove serialized_form functions: + lwpoint_serialize_size + lwpoint_serialize + lwpoint_serialize_buf + lwline_serialize_size + lwline_serialize + lwline_serialize_buf + lwpoly_serialize_size + lwpoly_serialize + lwpoly_serialize_buf + lwtriangle_serialize_size + lwtriangle_serialize + lwtriangle_serialize_buf + lwcircstring_serialize_size + lwcircstring_serialize + lwcircstring_serialize_buf + lwcollection_serialize_size + lwcollection_serialize_buf + lwgeom_constructempty + lwgeom_constructempty_buf + lwgeom_empty_length + lwgeom_serialize_size + lwgeom_serialize + lwgeom_serialized_construct + lwgeom_getsrid + +2011-10-27 20:52 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8022] Remove printBYTES + +2011-10-27 20:51 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8021] Reorder header file a little. + +2011-10-27 20:14 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8020] Complete removal of LWGEOM_INSPECTED + +2011-10-27 20:07 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8019] Remove LWGEOM_INSPECTED + +2011-10-27 20:05 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8018] Remove old deserialze and inspected functions. + + serialized_lwgeom_size + lwgeom_size_subgeom + lwgeom_size_point + lwgeom_size_line + lwgeom_size_circstring + lwgeom_size_poly + lwgeom_size_triangle + lwgeom_deserialize + lwpoint_deserialize + lwline_deserialize + lwpoly_deserialize + lwtriangle_deserialize + lwcircstring_deserialize + lwmpoint_deserialize + lwmline_deserialize + lwmpoly_deserialize + lwcollection_deserialize + lwcompound_deserialize + lwcurvepoly_deserialize + lwmcurve_deserialize + lwmsurface_deserialize + lwpsurface_deserialize + lwtin_deserialize + printMULTI + lwgeom_inspect + lwgeom_getpoint_inspected + lwgeom_getpoint + lwgeom_getline_inspected + lwgeom_getline + lwgeom_getpoly + lwgeom_getpoly_inspected + lwgeom_gettriangle + lwgeom_gettriangle_inspected + lwgeom_getcircstring_inspected + lwgeom_getgeom_inspected + lwgeom_getsubgeometry + lwgeom_getsubgeometry_inspected + lwgeom_getsubtype + lwgeom_getsubtype_inspected + lwgeom_getnumgeometries + lwgeom_getnumgeometries_inspected + +2011-10-27 19:23 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8017] Remove compute_serialized_box3d + +2011-10-27 19:10 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8016] Remove duplicate and unused + is_worth_caching_serialized_bbox and is_worth_caching_lwgeom_bbox + +2011-10-27 18:44 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8015] Add ignores for new built files + +2011-10-27 14:35 Sandro Santilli <strk@keybit.net> + + * [r8013] Wrap lines within 80 columns + +2011-10-27 14:09 Bborie Park <bkpark at ucdavis.edu> + + * [r8012] Added rtpostgis_drop.sql, rtpostgis_drop.sql.in, + rtpostgis_upgrade.sql and rtpostgis_upgrade_20_minor.sql to + svn:ignore + +2011-10-27 14:08 Bborie Park <bkpark at ucdavis.edu> + + * [r8011] Refactored rt_band_get_min_value() to call new function + rt_pixtype_get_min_value(). Addition of function + rt_util_extent_type(). + +2011-10-26 23:47 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8010] Remove PG_LWGEOM_construct + +2011-10-26 23:21 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8009] Remove orphaned pglwgeom function + pglwgeom_compute_serialized_box3d + +2011-10-26 23:07 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8008] Remove non-gserialized portions of utility functions. + +2011-10-26 22:58 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8007] Remove more orphaned box2d support functions + +2011-10-26 22:36 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8006] Remove *_compute_box2d* functions that are now orphans. + +2011-10-25 21:19 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8005] Remove gserialized_on conditionals. Only type defines + remain to be cleared out. + +2011-10-25 21:05 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8004] Remove old box2dfloat4 in favor of gbox. + +2011-10-25 20:31 Sandro Santilli <strk@keybit.net> + + * [r8003] Add own copyright on the file. See + http://postgis.refractions.net/pipermail/postgis-devel/2004-March/thread.html + for historical mail exchanges about it :) + +2011-10-25 20:02 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r8002] Remove old serialized_form index selectivity code. + +2011-10-21 21:49 Sandro Santilli <strk@keybit.net> + + * [r8001] Explode the topology sections to keep primitive (sql/mm) + topology management more separate from higher (TopoGeometry) + management. + +2011-10-21 21:42 Bborie Park <bkpark at ucdavis.edu> + + * [r8000] Added rt_raster_set_geotransform_matrix() to provide + quick setting of a raster's geotransform based upon the matrix + +2011-10-21 19:10 Bborie Park <bkpark at ucdavis.edu> + + * [r7999] Corrected rt_raster_same_alignment() and + RASTER_sameAlignment() to behave as an end-user would expect it + to. So intead of errors when parameters don't match, return + false. + +2011-10-21 18:11 Bborie Park <bkpark at ucdavis.edu> + + * [r7998] Changed rt_raster_has_no_band to use 0-based band index + instead of 1-based. Removed function prototype + ST_HasNoData(raster) as the other prototype ST_HasNoData(raster, + nband) now uses the default value of 1 for nband. + +2011-10-21 14:53 Bborie Park <bkpark at ucdavis.edu> + + * [r7997] Changed those functions that is 1-based for band index to + 0-based in rt_core. This leaves only rt_raster_has_no_band, which + may have other issues as well. + + Associated ticket is #754 + +2011-10-21 12:01 Regina Obe <lr@pcorp.us> + + * [r7996] put in logic to st_setsrid to wgs84 before doing + st_distance_sphere in case Paul decides he doesn't want to fix + the regression issue noted in #1243 + +2011-10-20 22:24 Bborie Park <bkpark at ucdavis.edu> + + * [r7995] Renamed RASTER_samealignment() to RASTER_sameAlignment() + and corrected C++ style comments with C comments + +2011-10-20 22:07 Bborie Park <bkpark at ucdavis.edu> + + * [r7994] Removed use of PG_DETOAST_DATUM_COPY and PG_FREE_IF_COPY + as all rasters should be detoasted using PG_DETOAST_DATUM as it + doesn't create a copy, thus consuming more space. + +2011-10-20 13:31 David Zwarg <dzwarg@azavea.com> + + * [r7993] Replaced missing signatures of ST_MapAlgebraFct. + +2011-10-20 00:49 Regina Obe <lr@pcorp.us> + + * [r7992] move function args to single line so CREATe EXTENSION + topology FROM unpackaged script builds corectly + +2011-10-19 23:47 Regina Obe <lr@pcorp.us> + + * [r7991] add in missing ST_MapAlgebraFct protos + +2011-10-19 23:25 Regina Obe <lr@pcorp.us> + + * [r7990] evidentally missed one or get the wrong ST_MapAlgebraFct + proto in last commit + +2011-10-19 20:31 Regina Obe <lr@pcorp.us> + + * [r7989] Get rid of + st_mapalgebrafct(raster,text,regprocedure,text[]) proto since + there is no matching function - messing up my ability to test my + extensions + +2011-10-18 11:37 Regina Obe <lr@pcorp.us> + + * [r7988] #860 Get rid of some dup definitions in ST_MapAlgebraFct + and add some missing ones. + +2011-10-18 02:23 Regina Obe <lr@pcorp.us> + + * [r7987] Add postgis_before_drop for dropping functions that have + arument names renamed before reinstall. Just for upgrade script + since can't do CREATE OR REPLACE if arg names have changed + +2011-10-17 16:16 David Zwarg <dzwarg@azavea.com> + + * [r7986] Fixed documentation code listing typo for + ST_MapAlgebraFct, and added more information about userfunctions + and variadic text args. + +2011-10-17 13:45 Regina Obe <lr@pcorp.us> + + * [r7985] update bios + +2011-10-17 13:10 David Zwarg <dzwarg@azavea.com> + + * [r7984] Added ST_MapAlgebraFct to documentation, with same + examples as ST_MapAlgebraExpr + +2011-10-16 18:17 Regina Obe <lr@pcorp.us> + + * [r7983] upgrade from a1-a3 for topology, beginning of upgrade + extension for postgis -- still need to resolve issue of ALTER + EXTENSION not having a DROP IF EXISTS -- a bit annoying for aggs. + +2011-10-14 22:43 Regina Obe <lr@pcorp.us> + + * [r7982] Move XMin/Max etc out of miscellaneous into accessors -- + Per Pierre's suggestion. Seems more logical. + +2011-10-14 22:36 Regina Obe <lr@pcorp.us> + + * [r7981] Getr di of the word function in heard. Guess it is kind + of stupid + +2011-10-14 18:11 David Zwarg <dzwarg@azavea.com> + + * [r7980] Implemented raster map algebra with user + functions/callbacks. (#860) + +2011-10-13 17:54 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7979] Actually we use bash code, not sh code + +2011-10-13 12:28 Regina Obe <lr@pcorp.us> + + * [r7977] Add _ST_Resample -- evidentally arg names changed. also + got rid of arg names in _ST_AsRaster + +2011-10-13 11:56 Regina Obe <lr@pcorp.us> + + * [r7976] Some functions need to be dropped before upgrade minor if + they need to be recreated. This is required for functions where + argument names change but fundamental types do not. Will add this + to upgrade minor script build later. + +2011-10-12 14:36 Bborie Park <bkpark at ucdavis.edu> + + * [r7975] Bug fix for _ST_Intersects(geometry, raster) where the + buffering of the intersection could return NULL. This happens if + the buffer was passed zero for the buffer distance. + +2011-10-12 12:51 Regina Obe <lr@pcorp.us> + + * [r7974] move ST_AddBand to raster constructors section per ticket + #1240 and rename Raster Band Accessors and Constructors to just + Raster Band Accessors + +2011-10-12 11:26 Regina Obe <lr@pcorp.us> + + * [r7972] another minor correction + +2011-10-12 11:18 Regina Obe <lr@pcorp.us> + + * [r7971] #1241 apply doc_vacuum_analyze_and_I_None_typo.patch + +2011-10-11 14:37 Sandro Santilli <strk@keybit.net> + + * [r7970] Typename in type specifier doesn't need to be quoted. + +2011-10-11 10:33 Sandro Santilli <strk@keybit.net> + + * [r7969] Ignore more generated files + +2011-10-10 20:50 Sandro Santilli <strk@keybit.net> + + * [r7968] Restrict valid spatial_ref_sys SRID values between 1 and + 998999 (#1233) + + I guess it'll take some special handling for this change in the + upgrade scripts. I didn't do any with this commit. + +2011-10-10 20:38 Sandro Santilli <strk@keybit.net> + + * [r7967] Clamp SRID in typmod parser. Now we get NOTICE/clamp also + on create table. + +2011-10-10 20:26 Sandro Santilli <strk@keybit.net> + + * [r7966] Clamp SRID in AddGeometryColumn, update expected topology + test results to expect -1 being transformed to 0 (current + official UNKNOWN SRID value). + +2011-10-10 19:25 Sandro Santilli <strk@keybit.net> + + * [r7965] Do not use AddGeometryColumn, to avoid having to write an + explicit unknown SRID value. + +2011-10-10 17:50 Sandro Santilli <strk@keybit.net> + + * [r7964] Hush NOTICES in regress test currently not emitting any + (propedeutic for srid clamping in AddGeometryColumn, which is + invoked with SRID=-1 by this testcase) + +2011-10-10 07:38 Sandro Santilli <strk@keybit.net> + + * [r7963] Clamp SRID on serialization and deserialization. Raise an + error when clamp_srid receives a number > 999999 + +2011-10-10 07:35 Sandro Santilli <strk@keybit.net> + + * [r7962] Do not input an explicit value to mean unknown SRID (in + raster test) + +2011-10-10 07:20 Sandro Santilli <strk@keybit.net> + + * [r7961] Do not input an explicit value to mean unknown SRID + +2011-10-10 06:55 Sandro Santilli <strk@keybit.net> + + * [r7960] Use macros for hard-coded "magic" SRIDs used by _BestSRID + and ST_Transform, use 999xxx range for them. See ticket #1230. + +2011-10-07 00:29 Bborie Park <bkpark at ucdavis.edu> + + * [r7959] Added additional error checking and error messages to + ST_SameAlignment function + +2011-10-06 23:25 Bborie Park <bkpark at ucdavis.edu> + + * [r7958] minor cleanup and prettiness. + +2011-10-06 15:47 Bborie Park <bkpark at ucdavis.edu> + + * [r7957] Make use of clamp_srid function for SRID checks + +2011-10-06 14:08 Sandro Santilli <strk@keybit.net> + + * [r7956] Raise a NOTICE when a SRID <= 0 but != SRID_UNKNOWN is + converted + +2011-10-06 13:35 Sandro Santilli <strk@keybit.net> + + * [r7955] Clamp literal SRID values occurring in WKB and WKT. + +2011-10-06 13:35 Sandro Santilli <strk@keybit.net> + + * [r7954] Add clamp_srid internal function returning UNKNOWN for <= + 0 values. + +2011-10-06 07:18 Sandro Santilli <strk@keybit.net> + + * [r7953] Do not use an explicit SRID=-1 in EKWT. It's not needed. + +2011-10-06 06:57 Sandro Santilli <strk@keybit.net> + + * [r7952] Do not use an explicit SRID=-1 in EKWT. It's not needed. + +2011-10-05 23:03 Bborie Park <bkpark at ucdavis.edu> + + * [r7951] Implements ST_SameAlignment. + + Associated ticket is #589. + +2011-10-05 18:55 Bborie Park <bkpark at ucdavis.edu> + + * [r7950] Fixed --with-gdalconfig parameter as per ticket #1167. + +2011-10-05 18:49 Bborie Park <bkpark at ucdavis.edu> + + * [r7949] As per Bryce's comments in ticket #1174, reduce the + number of calculations when doing rt_raster_geopoint_to_cell by + using an inverse geotransform matrix. Unlike the patch attached + to the ticket, this commit does not change the structure of the + rt_raster struct. It may be worth changing the rt_raster struct + eventually, but will cost us the single memcpy when serializing + rt_raster. Also, changes for testing SRID as "unknown" if value + is lte SRID_UNKNOWN (presently 0). + + Associated ticket is #1174. + +2011-10-05 04:54 Bborie Park <bkpark at ucdavis.edu> + + * [r7948] Removed hackish use of POSTGIS_GDAL_VERSION in + postgis/sqldefines.h.in and postgis/postgis.sql.in.c. Added + conditional compilation of extent resizing based upon GDAL + version in rt_api.c + +2011-10-04 23:32 Bborie Park <bkpark at ucdavis.edu> + + * [r7947] Fixed bug where a call to postgis_full_version causes + error if postgis_gdal_version doesn't exist because raster + support is not included + +2011-10-04 23:13 Sandro Santilli <strk@keybit.net> + + * [r7946] don't try to call postgis_gdal_version() if not testing + raster (the signature is unavailable) + +2011-10-04 22:38 Bborie Park <bkpark at ucdavis.edu> + + * [r7945] Adds postgis_gdal_version() function as per ticket #1225. + +2011-10-04 20:51 Bborie Park <bkpark at ucdavis.edu> + + * [r7944] Changed adjustment of extent by half-pixel to full-pixel + for points and linestrings to ensure compatibility with GDAL 1.6, + 1.7 and 1.8. GDAL 1.9 (current trunk) appears to work fine with + half-pixel adjustments. + +2011-10-04 20:46 Regina Obe <lr@pcorp.us> + + * [r7943] add KNN GIST + credits to news release (was already in + docs) + +2011-10-04 20:43 Regina Obe <lr@pcorp.us> + + * [r7942] minor correction to <#> description + +2011-10-04 19:50 Bborie Park <bkpark at ucdavis.edu> + + * [r7941] For linestrings, use same logic for points where extent + is increased by half a pixel to catch geometries on the edges. + + Associated ticket is #1213 + +2011-10-04 17:08 Sandro Santilli <strk@keybit.net> + + * [r7940] Do not base availability of SQL ST_Hausdorff* signatures + on GEOS version + + Tested with GEOS from the 3.1 branch (yes, we still support it !) + +2011-10-04 16:45 Sandro Santilli <strk@keybit.net> + + * [r7939] Simple review of the topology README. Wasn't that + outdated :) + +2011-10-04 16:27 Sandro Santilli <strk@keybit.net> + + * [r7938] Do not base availability of SQL isValid* signatures on + GEOS version + + This is a work for the C level library. + +2011-10-04 14:33 Sandro Santilli <strk@keybit.net> + + * [r7937] Tweak expected test output to expect unknown srid to be + reported as 0 + + If this will change before release, git-revert is our friend + +2011-10-04 14:33 Sandro Santilli <strk@keybit.net> + + * [r7936] Make topology.CreateTopology unknown-srid-agnostic (uses + ST_Srid to tell) + + Hopefully this makes the topology code stable during the SRID + fights :) + +2011-10-03 15:29 Regina Obe <lr@pcorp.us> + + * [r7935] Guess Nicklas was right - should have looked at my + explain. Revised example to use geometry constants. Seems to be a + limitation in KNN that it needs constants. Same annoying behavior + with my trigram KNN that only constant phrases work, not even + constant phrases wrapped in alias work. + +2011-10-03 10:32 Sandro Santilli <strk@keybit.net> + + * [r7934] Drop more non-ascii dashes, update regress tests (#1226) + [RT-SIGTA] + + There's a still-failing regress test due to SRID 0 being + considered != 1 + +2011-10-03 10:26 Sandro Santilli <strk@keybit.net> + + * [r7933] Use ASCII dash, not UTF8 one. Fixes #1226. [RT-SIGTA] + +2011-10-02 23:38 Regina Obe <lr@pcorp.us> + + * [r7932] Add in st_valuecount evidentally changed output in 2.0 + series + +2011-10-02 14:12 Bborie Park <bkpark at ucdavis.edu> + + * [r7931] fixed _st_intersects(raster, geometry, integer) where + call to ST_Intersects was hardcoding the first band of raster + instead of using user-provided nband. + +2011-10-02 03:18 Regina Obe <lr@pcorp.us> + + * [r7930] preliminary logic to build an + rtpostgis_upgrade_20_minor.sql script. Still missing a drop + somewhere since my older db doesn't upgrade because complains + about out parameters changed in some function. + +2011-10-01 17:28 Bborie Park <bkpark at ucdavis.edu> + + * [r7929] Fixed installation path of rtpostgis.sql to + contrib/postgis-2.0. Added build of rtpostgis_drop.sql + + Associated ticket is #615 + +2011-10-01 16:47 Regina Obe <lr@pcorp.us> + + * [r7928] itemize more removed functions for upgrade purposes + +2011-10-01 03:46 Regina Obe <lr@pcorp.us> + + * [r7927] add very paertinatnet ST_3DDistance reference to + ST_3DDwithin + +2011-10-01 02:58 Regina Obe <lr@pcorp.us> + + * [r7926] get rid of obsolete proto, replace with new onesfor + ST_Intersects. Clarify distinctions between raster/goemtry and + geometry/raster operations + +2011-09-30 20:03 David Zwarg <dzwarg@azavea.com> + + * [r7925] Changed ST_MapAlgebra to ST_MapAlgebraExpr. Also moved + around the pixeltype parameter -- it is no longer optional. Also + updated docs that referred to ST_MapAlgebra. (#860) + +2011-09-30 18:34 David Zwarg <dzwarg@azavea.com> + + * [r7924] Renamed 'nodatavalueexpr' variable. (#866) + +2011-09-30 00:11 Bborie Park <bkpark at ucdavis.edu> + + * [r7923] Updated regression tests to correctly support change of + unknown SRID from -1 to 0. + +2011-09-29 19:43 Sandro Santilli <strk@keybit.net> + + * [r7922] Fix distclean rule to drop Makefile too + +2011-09-29 19:43 Sandro Santilli <strk@keybit.net> + + * [r7921] Define SHELL (used by LIBTOOL and INSTALL) hopefully + helps bug #1218 + +2011-09-29 18:53 Bborie Park <bkpark at ucdavis.edu> + + * [r7920] Uncommented include of lwgeom_pg.h in rt_pg.c. Fixed + setting SRID to -1 to SRID_UNKNOWN. + +2011-09-29 18:33 Bborie Park <bkpark at ucdavis.edu> + + * [r7919] Changed function ST_Intersects(raster, raster, int, int) + to ST_Intersects(raster, raster). Added additional comments to + rt_raster_geopoint_to_cell(). + + Associated ticket is #1212 + +2011-09-29 10:40 Sandro Santilli <strk@keybit.net> + + * [r7918] Do not incentivate use of SRID=-1 in mapserver examples. + +2011-09-29 10:34 Sandro Santilli <strk@keybit.net> + + * [r7917] Do not suggest using "SRID=<unknown>" prefix in EWKT + +2011-09-29 07:18 Regina Obe <lr@pcorp.us> + + * [r7916] start work building unpackaged + +2011-09-29 04:05 Regina Obe <lr@pcorp.us> + + * [r7915] add KNN gist and srid =0 breaking change. Add Vizzuality + to corporate sponsors + +2011-09-28 23:59 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7914] Remove gserialized.h define file (actual #define is now + temporarily in liblwgeom.h) + +2011-09-28 23:58 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7913] Remove GSERIALIZED_ON from .sql files. + +2011-09-28 23:38 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7912] Change "no SRID" SRID to 0 (#286) + +2011-09-28 21:56 Regina Obe <lr@pcorp.us> + + * [r7911] document box distance KNN operator + +2011-09-28 15:06 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7910] Make the <-> operator return linear not square units, to + match the <#> operator. + +2011-09-28 15:04 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7909] Add box-wise ORDER BY for KNN (#701) + +2011-09-28 10:13 Sandro Santilli <strk@keybit.net> + + * [r7908] Image generator also uses LWDEBUG macros... how popular ! + +2011-09-28 10:05 Sandro Santilli <strk@keybit.net> + + * [r7907] Move LWDEBUG macros in a new lwgeom_log.h header file + (see #1220) + + Update all implementation files accordingly. + Fix some misuses out of liblwgeom. + Add missing copyright notices in a few files. + +2011-09-27 23:29 Regina Obe <lr@pcorp.us> + + * [r7906] merge postgis and raster into a single extension called + "postgis", revise postgis_topology control to depend on this new + extension + +2011-09-27 23:28 Regina Obe <lr@pcorp.us> + + * [r7905] more drop of functions that changed signature + +2011-09-27 17:35 Regina Obe <lr@pcorp.us> + + * [r7904] clarify current implementation is centroid of box not the + geometry. + +2011-09-27 15:33 Sandro Santilli <strk@keybit.net> + + * [r7903] Drop duplicated geometry_out definition + +2011-09-27 05:09 Regina Obe <lr@pcorp.us> + + * [r7902] correct the description on semantics of knn operator + +2011-09-27 03:40 Bborie Park <bkpark at ucdavis.edu> + + * [r7901] Removed ST_Intersects(raster, int, raster, int) version + of two raster ST_Intersects. + + Associated ticket is #1212 + +2011-09-27 03:15 Regina Obe <lr@pcorp.us> + + * [r7900] wrap examples in cdata tags so don't break parser + +2011-09-27 02:58 Regina Obe <lr@pcorp.us> + + * [r7899] document new knn gist operator -- example mostly + plagiarized from Paul's postgis-devel example with addition of + care consideration of safe casting and SQL formatting. I know I'm + getting lazy in my old age. + +2011-09-27 02:22 Regina Obe <lr@pcorp.us> + + * [r7898] preliminary work on drop deprecated functions. Not tied + into anything yet. + +2011-09-27 02:09 Regina Obe <lr@pcorp.us> + + * [r7897] get rid of obslete protos for ST_Intersects and revise + description to describe new semantics of raster st_intersects + +2011-09-27 01:55 Regina Obe <lr@pcorp.us> + + * [r7896] put in svn keywords and forcce to LF + +2011-09-26 21:05 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7895] Wrap <-> distance ordering into a PgSQL 9.1+ block. + +2011-09-26 20:39 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7894] Add support for KNN-GiST ops. First cut only, much + testing required. (#701) + +2011-09-26 14:25 Sandro Santilli <strk@keybit.net> + + * [r7893] Don't use the same name for input parameter and returned + table description. + + Hopefully fixes ticket #1210 [RT-SIGTA] + +2011-09-26 06:29 Regina Obe <lr@pcorp.us> + + * [r7892] document ST_Intersects(rasta,rastb,nbanda,nbandb) -- left + out ST_Intersects(rasta,nbanda,rastb,nbandb) - that one offends + my senses. + +2011-09-25 20:37 Regina Obe <lr@pcorp.us> + + * [r7891] add missing geos flag to let it make check under mingw + +2011-09-25 14:48 Bborie Park <bkpark at ucdavis.edu> + + * [r7890] Removed unnecessary typedef for fmin and fmax on windows. + Possible fix to #1207. + +2011-09-24 19:05 Bborie Park <bkpark at ucdavis.edu> + + * [r7889] Tweaks to makefiles due to linker symbol errors in OSX. + Hopefully this can also resolve the issue with #1207. + +2011-09-23 22:00 Regina Obe <lr@pcorp.us> + + * [r7888] Add killer sed command to create a topology upgrade minor + script from topology.sql. Also change release version to 2.0.0a1 + since we haven't released yet. This will build a script to + upgrade our mislabeled 2.0.0 to 2.0.0a1 + +2011-09-23 19:58 Regina Obe <lr@pcorp.us> + + * [r7887] #1209: redundant constraint chk_statefp on loading edges. + +2011-09-23 19:21 Sandro Santilli <strk@keybit.net> + + * [r7886] Update topology functions status. We've completed the + SQL/MM set ! + +2011-09-23 19:21 Sandro Santilli <strk@keybit.net> + + * [r7885] Implement topology.ST_CreateTopoGeo (#1190) [RT-SIGTA] + + Includes regress testing and documentation update + +2011-09-22 15:07 Bborie Park <bkpark at ucdavis.edu> + + * [r7884] Further tweaks to rt_raster_gdal_rasterize to correctly + handle auto-computed extents of multipoints. Addition of + ST_Intersects for two rasters. Refactored the one raster and one + geometry version of ST_Intersects. + + Associated ticket is #1176 + +2011-09-22 14:06 Sandro Santilli <strk@keybit.net> + + * [r7883] Make face creation order predictable in + ST_AddEdgeNewFaces (#1205) + + Always create the face on the right first [RT-SIGTA] + +2011-09-22 09:14 Sandro Santilli <strk@keybit.net> + + * [r7882] Add notes and TODO items about the edge-adding functions + [RT-SIGTA] + + See ticket #1205 + +2011-09-22 07:22 Sandro Santilli <strk@keybit.net> + + * [r7881] Reduce noice produced by ST_AddEdgeModFace at NOTICE + level [RT-SIGTA] + +2011-09-21 10:34 Sandro Santilli <strk@keybit.net> + + * [r7880] Don't wrap prepared geom implementation in a conditional + macro + + These kind of full-disabling should be done at Makefile level... + +2011-09-21 09:50 Sandro Santilli <strk@keybit.net> + + * [r7879] Add header guards to geos headers, move GEOS_PREPARED + define to the implementation file, add missing copyright header. + +2011-09-21 07:32 Sandro Santilli <strk@keybit.net> + + * [r7878] Make RemEdgeModFace symmetric to AddEdgeModFace about + face retention + + Save the face on the right, so that running: + ST_RemEdgeModFace(name, ST_AddEdgeModFace(name, ...)) + ... will not modify the topology. + [RT-SIGTA] + +2011-09-21 03:29 Regina Obe <lr@pcorp.us> + + * [r7877] move args to same line as func so extensions unpackaged + adds them correctly will ahve to come up with a better way of + doing this. + +2011-09-21 03:28 Regina Obe <lr@pcorp.us> + + * [r7876] makr postgis_core as required. Admittedly this will go + away once we merge postgis_core and raster. Doing this gets rid + of issues with raster not being able to find geometry etc if + installed in separate schema from postgis_core + +2011-09-21 03:23 Regina Obe <lr@pcorp.us> + + * [r7875] more changes to properly utilize extenions model, 1 + remove create schema since extesnion creates it if not present, + in control file designate postgis_core is required so create adds + it to search path, more cleanup for unpackaged + +2011-09-21 02:14 Regina Obe <lr@pcorp.us> + + * [r7874] pick up table, type, trigger, and schemas in unlogged add + +2011-09-20 16:47 Regina Obe <lr@pcorp.us> + + * [r7873] get rid of linebreaks in function arg list so unpackaged + builder works, fix logical error in sed expression + +2011-09-20 15:49 Regina Obe <lr@pcorp.us> + + * [r7872] preliminary logic to build install from unpackaged file + +2011-09-20 15:21 Sandro Santilli <strk@keybit.net> + + * [r7871] Implement ST_RemEdgeModFace (#1189) [RT-SIGTA] + + Include regress testing and documentation. + +2011-09-19 21:28 Bborie Park <bkpark at ucdavis.edu> + + * [r7870] additional code cleanup of rt_raster_gdal_rasterize + +2011-09-19 16:53 Sandro Santilli <strk@keybit.net> + + * [r7869] Have ST_RemEdgeNewFace return NULL when no face is + created [RT-SIGTA] + + This is to match the ISO spec more closely. Docs and regress test + updated. + +2011-09-19 14:17 Sandro Santilli <strk@keybit.net> + + * [r7868] Fix ST_Estimated_Extent by correctly interpret histogram + box (#1200) + +2011-09-19 06:40 Sandro Santilli <strk@keybit.net> + + * [r7867] TopologySummary: do not count the universe face in the + face count + +2011-09-19 06:40 Sandro Santilli <strk@keybit.net> + + * [r7866] ST_InitTopoGeo: use named argument, drop trailing space + from return text + +2011-09-18 15:51 Regina Obe <lr@pcorp.us> + + * [r7865] #1202 -- also fixed issue with when typ mod application + fails (because of mixed geometries) to properly catch error and + raise warning instead of throw error. + +2011-09-18 15:04 Regina Obe <lr@pcorp.us> + + * [r7864] fix typo in warning + +2011-09-18 14:56 Regina Obe <lr@pcorp.us> + + * [r7863] #1201 don't error out when populate_geometry_columns is + called on an empty table, just provide warning and don't do + anything. Exclude raster_columns from populate_geometry_columns + inspection. + +2011-09-17 19:59 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7862] shp2pgsql gui wrong use of create spatial index (#1091) + +2011-09-17 07:58 Sandro Santilli <strk@keybit.net> + + * [r7861] Typo in testcase label + +2011-09-17 07:10 Sandro Santilli <strk@keybit.net> + + * [r7860] Typo + +2011-09-17 06:58 Sandro Santilli <strk@keybit.net> + + * [r7859] Minor inline documentation updates + +2011-09-17 06:46 Sandro Santilli <strk@keybit.net> + + * [r7858] Implement ST_RemEdgeNewFace (#1188) [RT-SIGTA] + + Includes regress testing and documentation. + +2011-09-16 13:32 Bborie Park <bkpark at ucdavis.edu> + + * [r7857] fixups and code cleanups for the rt_raster_gdal_rasterize + to better handle point and linestring geometries + +2011-09-15 20:43 Regina Obe <lr@pcorp.us> + + * [r7856] more cleanup and put in logic to also install in database + help descriptors + +2011-09-15 20:05 Regina Obe <lr@pcorp.us> + + * [r7855] fix invalid st_summarystats proto + +2011-09-15 18:35 Regina Obe <lr@pcorp.us> + + * [r7854] now topology installs can get rid of error note. + +2011-09-15 18:33 Regina Obe <lr@pcorp.us> + + * [r7853] postgis_topology extension now installing right. Had to + get rid of ALTER TABLE .. hasz and merge it into the CREATE TABLE + since that was the culprit causing extension install error + +2011-09-15 13:57 Regina Obe <lr@pcorp.us> + + * [r7852] more cleanup -- this time no more errors when installing + +2011-09-15 08:40 Regina Obe <lr@pcorp.us> + + * [r7851] Support for PostgreSQL 9.1 CREATE EXTENSION syntax + +2011-09-14 15:37 Regina Obe <lr@pcorp.us> + + * [r7850] change & to html equivalent entity + +2011-09-14 15:24 Regina Obe <lr@pcorp.us> + + * [r7849] provide real world examples of how to use CreateTopoGeom + +2011-09-14 14:55 Regina Obe <lr@pcorp.us> + + * [r7848] more fixes + +2011-09-14 14:51 Regina Obe <lr@pcorp.us> + + * [r7847] put in new timings. After speed fix loading is 3 times + faster + +2011-09-14 14:02 Regina Obe <lr@pcorp.us> + + * [r7846] fix typo and create another link reference + +2011-09-14 12:14 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r7845] Commented some queries so that the file can be executed + to load the functions. + +2011-09-14 07:02 Regina Obe <lr@pcorp.us> + + * [r7844] drop populate_geometry_columns version that just takes + oid. Has bene replaced with versoin that takes default arg + use_typmod + +2011-09-13 18:52 Sandro Santilli <strk@keybit.net> + + * [r7843] Re-enable accidentally disabled prepared geoms. Fixes bug + #1165. + +2011-09-13 18:47 Chris Hodgson <chodgson@refractions.net> + + * [r7842] Added some diagrams to the st_overlaps docmentation + +2011-09-13 03:51 Regina Obe <lr@pcorp.us> + + * [r7841] fix for #1158 can't compile 8.4 under mingw windows + +2011-09-12 16:02 Sandro Santilli <strk@keybit.net> + + * [r7840] Handle db initialization errors earlier + +2011-09-12 04:56 Regina Obe <lr@pcorp.us> + + * [r7839] make topoelementarray examples make more sense + +2011-09-12 04:44 Regina Obe <lr@pcorp.us> + + * [r7838] put in more description about what type id means + +2011-09-11 02:42 Regina Obe <lr@pcorp.us> + + * [r7837] Link several functions back to new Topology_Load_Tiger + since that demonstrates use of these functions + +2011-09-10 14:09 Regina Obe <lr@pcorp.us> + + * [r7836] minor wording changes and reference to configuration part + of documentation + +2011-09-10 13:52 Regina Obe <lr@pcorp.us> + + * [r7835] fix typo link to tiger topology loader + +2011-09-10 12:43 Sandro Santilli <strk@keybit.net> + + * [r7834] Fix "no ID for constraint linkedn: Create_Topology" error + +2011-09-10 11:49 Sandro Santilli <strk@keybit.net> + + * [r7833] Honour DESTDIR in documentation Makefile. Patch by Bryce + L Nordgren. + + See ticket #1184 + +2011-09-10 06:43 Regina Obe <lr@pcorp.us> + + * [r7832] Document tiger to postgis topology loader and revise + scripts to install the new function. also some additional minor + fixes + +2011-09-10 05:35 Regina Obe <lr@pcorp.us> + + * [r7831] save as UTF-8 + +2011-09-10 05:11 Regina Obe <lr@pcorp.us> + + * [r7830] Alas a load with no topology validation errors. Fix + remaining issues with missing loading of some edges of faces + +2011-09-10 02:49 Regina Obe <lr@pcorp.us> + + * [r7829] get rid of superfluous junk + +2011-09-09 14:47 Regina Obe <lr@pcorp.us> + + * [r7828] example of how to get actual edge geometries + +2011-09-09 14:06 Regina Obe <lr@pcorp.us> + + * [r7827] revise to snap points to topology precision, also set + edge left/right face to 0 if null (world face). ValidateTopology + now reports 25 errors instead of 484 errors (what it did before) + +2011-09-08 19:18 Regina Obe <lr@pcorp.us> + + * [r7826] revise to transform to spatial reference system of target + topology + +2011-09-08 16:47 Regina Obe <lr@pcorp.us> + + * [r7825] more changes to add missing edges + +2011-09-08 14:36 Regina Obe <lr@pcorp.us> + + * [r7824] more minor corrections + +2011-09-08 14:23 Regina Obe <lr@pcorp.us> + + * [r7823] #1181 TopologySummary is broken causing ambiquous + reference. Changed to have local variable be called + var_topology_id so doesn't conflict with table column topology_id + +2011-09-08 08:06 Regina Obe <lr@pcorp.us> + + * [r7822] logic to load in edges marking those with orphaned + next_left, next_right to -neg of itself + +2011-09-07 17:13 Regina Obe <lr@pcorp.us> + + * [r7821] more typo corrections + +2011-09-07 14:57 Regina Obe <lr@pcorp.us> + + * [r7820] more typos + +2011-09-07 14:55 Regina Obe <lr@pcorp.us> + + * [r7819] fix typo + +2011-09-07 14:54 Regina Obe <lr@pcorp.us> + + * [r7818] more work on tiger topology loader -- revised to use temp + table. + +2011-09-07 13:58 Bborie Park <bkpark at ucdavis.edu> + + * [r7817] Updated expected output due to change in message + +2011-09-06 21:01 Regina Obe <lr@pcorp.us> + + * [r7816] correct some mistatements about export functions + +2011-09-06 20:10 Bborie Park <bkpark at ucdavis.edu> + + * [r7815] Fixed ST_AsPNG to allow rasters with four bands as that + becomes a RGBA PNG image. + +2011-09-06 16:40 Regina Obe <lr@pcorp.us> + + * [r7814] fix typos + +2011-09-06 16:24 Regina Obe <lr@pcorp.us> + + * [r7813] more examples + +2011-09-06 08:07 Regina Obe <lr@pcorp.us> + + * [r7812] minor indentation fix + +2011-09-06 08:07 Regina Obe <lr@pcorp.us> + + * [r7811] document st_resample - still need to put in examples + +2011-09-06 07:25 Regina Obe <lr@pcorp.us> + + * [r7810] get rid of transparency -- transparency turning to black + in pdf format + +2011-09-06 06:56 Regina Obe <lr@pcorp.us> + + * [r7809] Add another example with pictures + +2011-09-06 02:11 Regina Obe <lr@pcorp.us> + + * [r7808] Move ST_AsRaster and ST_Band to raster contructor section + +2011-09-05 15:44 Regina Obe <lr@pcorp.us> + + * [r7806] revmoe history table out of docs for now + +2011-09-04 02:50 Regina Obe <lr@pcorp.us> + + * [r7804] fix typo + +2011-09-02 19:46 Regina Obe <lr@pcorp.us> + + * [r7803] Put in creative commons license stamp + +2011-09-02 01:54 Bborie Park <bkpark at ucdavis.edu> + + * [r7802] Added optimizations and shortcuts for + rt_band_get_quantiles_stream + +2011-09-01 14:58 Regina Obe <lr@pcorp.us> + + * [r7801] revise to return first part of street number e.g. 112-345 + -> 112 + +2011-09-01 12:35 Regina Obe <lr@pcorp.us> + + * [r7800] revise so works under 8.4 evidentially in 8.4 INTO USING + clauses are not interchangeable but they are in later versions + +2011-09-01 11:41 Regina Obe <lr@pcorp.us> + + * [r7799] fill in missing tag + +2011-09-01 09:00 Regina Obe <lr@pcorp.us> + + * [r7798] more finetuninng of street offset to consider + non-straight tlids + +2011-08-31 14:54 Regina Obe <lr@pcorp.us> + + * [r7797] #1052 update doco to reflect change in behavior. + +2011-08-31 14:53 Regina Obe <lr@pcorp.us> + + * [r7796] #1052 -- instead of placing geocoded point at center + line, offset it 10 meters to the correct odd/even (L / R + utilizing addr.side field). May later change this to allow the + user to specify the offset amount. + +2011-08-31 07:06 Sandro Santilli <strk@keybit.net> + + * [r7795] With libtool for loader/dumper there's no need to + stage-install them + + Fixes ticket #1177 [RT-SIGTA] + +2011-08-29 16:02 Regina Obe <lr@pcorp.us> + + * [r7794] fill in missing protos for ST_AsRaster + +2011-08-29 15:23 Sandro Santilli <strk@keybit.net> + + * [r7793] Dynamically link loader and dumper to liblwgeom + [RT-SIGTA] + + This reduces each of the 3 installed executable sizes by 547 Kb. + +2011-08-29 14:45 Sandro Santilli <strk@keybit.net> + + * [r7792] Use libtool to link liblwgeom unit tester (helps testing + the shared library) + +2011-08-27 17:16 Bborie Park <bkpark at ucdavis.edu> + + * [r7791] fixed improperly commented-out RAISE DEBUG statement for + AddRasterColumn function. + + Associated ticket is #1175. + +2011-08-26 14:47 Bborie Park <bkpark at ucdavis.edu> + + * [r7790] Added solaris define for UNIX using patch provided by + rroliver. + + Associated ticket is #1171. + +2011-08-26 00:04 Bborie Park <bkpark at ucdavis.edu> + + * [r7789] Tweaked memory allocation in RASTER_quantileCoverage. + +2011-08-25 23:23 Bborie Park <bkpark at ucdavis.edu> + + * [r7788] Fixed the function rt_band_get_summary_stats + rt_core/rt_api.c to correctly handle the situation where a band's + values are all nodata + +2011-08-25 18:39 Bborie Park <bkpark at ucdavis.edu> + + * [r7787] Removed "WITH OIDS" from raster table creation. + +2011-08-25 18:18 Bborie Park <bkpark at ucdavis.edu> + + * [r7786] Fix error of unknown symbol gidx_to_string when building + with the flags --with-raster --enable-debug using patch + gidx_to_string.patch provided by bnordgren. + + Associated ticket is #1161 + +2011-08-25 14:44 Bborie Park <bkpark at ucdavis.edu> + + * [r7785] Fixed the problem where having configure detect that GDAL + has the GDALFPolygonize function does not cause the code to use + GDALFPolygonize. This is due to the macro GDALFPOLYGONIZE not + being set anywhere. So, it is now being set in raster_config.h.in + and included in rt_core/rt_api.h. Had to update testapi.c as the + geometries generated differ depending on whether or not + GDALFPolygonize is used. + + Associated ticket is #650 + +2011-08-25 11:33 Regina Obe <lr@pcorp.us> + + * [r7784] provide better example and images to complement. Also + note that ST_AsRaster doesn't yet work with newer geometries + +2011-08-24 22:31 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7783] Added in gettext headers to allow compilation under osx + with iconv + +2011-08-24 19:20 Regina Obe <lr@pcorp.us> + + * [r7782] cleanup formatting a bit on ST_AsRaster example + +2011-08-24 17:40 Bborie Park <bkpark at ucdavis.edu> + + * [r7781] Added DESTDIR so that raster2pgsql.py is installed in the + user-specified path + +2011-08-24 16:08 Regina Obe <lr@pcorp.us> + + * [r7780] Provide some examples for using ST_AsRaster. This + function is way cool. + +2011-08-24 15:23 Bborie Park <bkpark at ucdavis.edu> + + * [r7779] Inclusion of missing ST_PixelWidth and ST_PixelHeight + functions and regression tests. + + Associated ticket is #928 + +2011-08-23 22:41 Bborie Park <bkpark at ucdavis.edu> + + * [r7778] Refactored ST_ValueCount and ST_ValuePercent to be a C + function rather than a plpgsql function. + +2011-08-22 21:24 Regina Obe <lr@pcorp.us> + + * [r7775] #997 put in correct codes for non-state us territories + +2011-08-21 03:34 Regina Obe <lr@pcorp.us> + + * [r7774] #1158 add proj flags to fix mingw test issue + +2011-08-20 21:17 Sandro Santilli <strk@keybit.net> + + * [r7773] Put PG_MODULE_MAGIC in raster and postgis source files + rather than in libpgcommon. Should fix the mingw build. See + ticket #1158. + +2011-08-20 21:08 Sandro Santilli <strk@keybit.net> + + * [r7772] Use PROJ cflags when building raster module (see #1158) + +2011-08-20 17:51 Bborie Park <bkpark at ucdavis.edu> + + * [r7771] More fixups for the quantile coverage function. Fixes + segfault that seems to only occur on OSX. + +2011-08-20 16:43 Sandro Santilli <strk@keybit.net> + + * [r7770] Drop duplicated typedef [RT-SIGTA] + +2011-08-20 15:55 Sandro Santilli <strk@keybit.net> + + * [r7769] Install liblwgeom.h under a sensible location... + [RT-SIGTA] + +2011-08-20 15:43 Sandro Santilli <strk@keybit.net> + + * [r7768] Move gserialized_gist to libpgcommon fixing a circular + dependency between libpgcommon and liblwgeom, put libpgcommon + _after_ liblwgeom in pg modules link lines, drop duplicated + lwgeom_init_allocators and PG_MODULE_MAGIC from raster module + (they are in libpgcommon already). Includes patch in #1161. + [RT-SIGTA] + +2011-08-20 00:54 Bborie Park <bkpark at ucdavis.edu> + + * [r7767] Corrected incorrect function usage + +2011-08-19 22:57 Bborie Park <bkpark at ucdavis.edu> + + * [r7766] Added forgotten explicit freeing of memory and some code + cleanup + +2011-08-19 19:08 Bborie Park <bkpark at ucdavis.edu> + + * [r7765] Adds coverage table version of ST_Quantile and + ST_ApproxQuantile. Function implemented using the algorithm + discussed in + + A One-Pass Space-Efficient Algorithm for Finding Quantiles (1995) + by Rakesh Agrawal, Arun Swami + in Proc. 7th Intl. Conf. Management of Data (COMAD-95) + http://www.almaden.ibm.com/cs/projects/iis/hdb/Publications/papers/comad95.pdf + + Also refactored the regression test for rt_histogram due to + unnecessary columns in output + +2011-08-19 14:04 Bborie Park <bkpark at ucdavis.edu> + + * [r7763] Commit of patch provided by David Zwarg in #482 adding + the functions ST_SetRotation, ST_Rotation, ST_PixelHeight and + ST_PixelWidth. + + Associated tickets are #482, #928, #929 and #936 + +2011-08-19 10:12 Sandro Santilli <strk@keybit.net> + + * [r7762] Include version in liblwgeom.h [RT-SIGTA] + + Closes ticket #1164 + +2011-08-19 09:34 Sandro Santilli <strk@keybit.net> + + * [r7761] Drop (u)int32 and uchar in favor of C99 standard int + types [RT-SIGTA] + + This commit drops PostgreSQL references in liblwgeom.h (C_H + define) + and hopefully reduces the noise generated by custom symbols. + +2011-08-19 09:30 Sandro Santilli <strk@keybit.net> + + * [r7760] Don't use problematic int types for no reason... + +2011-08-19 08:16 Sandro Santilli <strk@keybit.net> + + * [r7759] Install liblwgeom on 'make install' [RT-SIGTA] + + Uses liblwgeom.h as the API header for liblwgeom. + +2011-08-19 07:55 Sandro Santilli <strk@keybit.net> + + * [r7758] Move SQL-exposed functions out of libpgcommon (#1163). + +2011-08-16 13:19 Regina Obe <lr@pcorp.us> + + * [r7757] more clarification of behavior change in 2.0 of bbox + storage + +2011-08-16 12:51 Regina Obe <lr@pcorp.us> + + * [r7755] #1160: documentation clarification of behavior + +2011-08-16 09:47 Sandro Santilli <strk@keybit.net> + + * [r7754] Move NO_*_VALUE from liblwgeom.h to liblwgeom_internal.h + [RT-SIGTA] + +2011-08-16 09:25 Sandro Santilli <strk@keybit.net> + + * [r7753] Move DIST_MAX and DIST_MIN from liblwgeom.h to + liblwgeom_internal.h (weird values, btw) [RT-SIGTA] + +2011-08-16 09:15 Sandro Santilli <strk@keybit.net> + + * [r7752] Honour DISTDIR when installing liblwgeom. Drop the finish + call as it may require root privileges on some systems + [RT-SIGTA]. + +2011-08-15 22:43 Bborie Park <bkpark at ucdavis.edu> + + * [r7751] Removed unnecessary code from rt_band_get_summary_stats. + Fixed incorrect comment for rt_band_get_value_count. + +2011-08-15 11:36 Sandro Santilli <strk@keybit.net> + + * [r7749] Use proper PROJ4 flags when linking against liblwgeom. + See ticket #1158. [RT-SIGTA] + +2011-08-14 19:47 Sandro Santilli <strk@keybit.net> + + * [r7748] Fix for missing include directory on Mingw (#1158). + Thanks Bryce Nordgren. + +2011-08-14 12:39 Regina Obe <lr@pcorp.us> + + * [r7747] #1071: Logic to mark nodes that are contained in a face + +2011-08-14 12:32 Regina Obe <lr@pcorp.us> + + * [r7746] #1071 - start work on tiger PostGIS topology loader + +2011-08-13 18:10 Bborie Park <bkpark at ucdavis.edu> + + * [r7745] Consolidated various struct declarations from rt_api.c + into rt_api.h as these structs are duplicatively redeclared in + rt_pg.c and testapi.c + +2011-08-13 10:06 Sandro Santilli <strk@keybit.net> + + * [r7744] Second attempt at libtool usage. Seems better to me now. + PostGIS clients still all use the static version of the library. + Libraries are not installed by default. + [RT-SIGTA] + +2011-08-13 09:02 Sandro Santilli <strk@keybit.net> + + * [r7743] Drop unused code + +2011-08-13 02:01 Regina Obe <lr@pcorp.us> + + * [r7742] #1156 incorporate suggestions from forkandwait + +2011-08-12 19:18 Sandro Santilli <strk@keybit.net> + + * [r7741] Move lwproj_from_string from libpgcommon to liblwgeom + [RT-SIGTA] + +2011-08-12 17:57 Sandro Santilli <strk@keybit.net> + + * [r7740] liblwgeom/cunit also needs PROJ_CPPFLAGS + +2011-08-12 17:55 Sandro Santilli <strk@keybit.net> + + * [r7739] Rename make_project to lwproj_from_string, ready to be + moved to liblwgeom [RT-SIGTA] + +2011-08-12 17:42 Sandro Santilli <strk@keybit.net> + + * [r7738] Even generator.c will need proper proj cflags now.. + +2011-08-12 17:37 Sandro Santilli <strk@keybit.net> + + * [r7737] loader also includes liblwgeom.h, thus wants PROJ cpp + flags + +2011-08-12 17:33 Sandro Santilli <strk@keybit.net> + + * [r7736] Use PROJ4 C flags, see if this makes Hudson happy. + +2011-08-12 17:26 Sandro Santilli <strk@keybit.net> + + * [r7735] Copyright review on lwgeom_pg.{c,h} files + +2011-08-12 17:25 Sandro Santilli <strk@keybit.net> + + * [r7734] Make transformation and projection cache API available + (ticket #1053) + +2011-08-12 10:12 Sandro Santilli <strk@keybit.net> + + * [r7733] Drop unused macros CARTESIAN and GEODETIC from + liblwgeom.h + +2011-08-12 10:11 Sandro Santilli <strk@keybit.net> + + * [r7732] Snap and SharedPaths are both direct GEOS proxies, not + extra [RT-SIGTA] + +2011-08-12 09:11 Sandro Santilli <strk@keybit.net> + + * [r7731] Export lwgeom_sharedpaths to liblwgeom, and fix exception + message [RT-SIGTA] + +2011-08-11 21:01 Bborie Park <bkpark at ucdavis.edu> + + * [r7730] Rewrote the code for the coverage table versions of + ST_SummaryStats and ST_Histogram. So instead of plpgsql, it is + now in C within rt_pg/rt_pg.c + +2011-08-11 16:35 Regina Obe <lr@pcorp.us> + + * [r7729] change reverse_geocode back to using addr table and also + use cousub for location + +2011-08-11 08:04 Sandro Santilli <strk@keybit.net> + + * [r7728] Fix leftover PARSER_CHECK reference (thanks Hudson) + [RT-SIGTA] + +2011-08-11 08:04 Sandro Santilli <strk@keybit.net> + + * [r7727] Export lwgeom_split to liblwgeom, const-correct it + [RT-SIGTA] + +2011-08-11 07:52 Sandro Santilli <strk@keybit.net> + + * [r7726] Export lwgeom_snap to liblwgeom [RT-SIGTA] + +2011-08-11 07:51 Sandro Santilli <strk@keybit.net> + + * [r7725] Give PARSER_CHECK macros an LW_ prefix [RT-SIGTA] + +2011-08-11 07:50 Sandro Santilli <strk@keybit.net> + + * [r7724] Fix parser documentation [RT-SIGTA] + +2011-08-10 23:16 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7723] Match style of liblwgeom.h include guard + +2011-08-10 22:43 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7722] Little checks in clean_wkt_out_suite + +2011-08-10 22:28 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7721] Remove old WKB/WKT parsers and generators and switch all + internal references remaining (mostly in cunit) over to the new + implementations. + +2011-08-09 16:56 Sandro Santilli <strk@keybit.net> + + * [r7720] Export lwgeom_makevalid to liblwgeom [RT-SIGTA] + +2011-08-09 16:05 Sandro Santilli <strk@keybit.net> + + * [r7719] Add GEOS entry points in liblwgeom.h (public API) + [RT-SIGTA] + +2011-08-09 15:43 Sandro Santilli <strk@keybit.net> + + * [r7718] Add some documentation about parsing [RT-SIGTA] + +2011-08-09 15:43 Sandro Santilli <strk@keybit.net> + + * [r7717] Mark "chip" functions for deletion + +2011-08-09 15:12 Sandro Santilli <strk@keybit.net> + + * [r7716] Drop REPEATED_POINTS_* and SPLICE_* defines from + liblwgeom.h, move MAXFLOAT to liblwgeom_internal.h [RT-SIGTA] + +2011-08-09 14:54 Regina Obe <lr@pcorp.us> + + * [r7715] make eol for all rfcs be LF so our unix brethren can edit + them without fuss + +2011-08-09 14:19 Sandro Santilli <strk@keybit.net> + + * [r7714] Move floating points comparator macros from liblwgeom.h + to liblwgeom_internal.h (not prefixed symbols) [RT-SIGTA] + +2011-08-09 09:51 Sandro Santilli <strk@keybit.net> + + * [r7713] Don't include liblwgeom.h from headers if not needed, + document what is it needed for in implementation files [RT-SIGTA] + +2011-08-09 09:50 Sandro Santilli <strk@keybit.net> + + * [r7712] Clean up gui as well + +2011-08-09 08:28 Sandro Santilli <strk@keybit.net> + + * [r7711] Drop CHIP type and any reference to it [RT-SIGTA] + +2011-08-09 05:52 Regina Obe <lr@pcorp.us> + + * [r7710] strk's patch fix for #1155 + +2011-08-08 10:11 Sandro Santilli <strk@keybit.net> + + * [r7709] Encode more deps + +2011-08-08 09:56 Sandro Santilli <strk@keybit.net> + + * [r7708] Const-correct some GEOS functions in liblwgeom fixing + pending memory errors when overlaying empty and non-empty + geometries (not exploited by testing) [RT-SIGTA] + +2011-08-08 09:27 Sandro Santilli <strk@keybit.net> + + * [r7707] Move getMachineEndian() and error_if_srid_mismatch() from + liblwgeom.h to liblwgeom_internal.h + +2011-08-08 08:59 Sandro Santilli <strk@keybit.net> + + * [r7706] Put PG_LWGEOM stuff where it belongs (out of liblwgeom) + [RT-SIGTA] + +2011-08-06 18:42 Sandro Santilli <strk@keybit.net> + + * [r7705] Include postgis_config.h to find POSTGIS_VERSION and + stringbuffer.h when needed + +2011-08-06 18:17 Sandro Santilli <strk@keybit.net> + + * [r7704] Reduce number of includes from liblwgeom.h (closest + header to a public API). + Update other files accordingly. [RT-SIGTA] + +2011-08-06 18:03 Sandro Santilli <strk@keybit.net> + + * [r7703] Fix dependency referencing dropped rule [RT-SIGTA] + +2011-08-06 18:01 Sandro Santilli <strk@keybit.net> + + * [r7702] Add static library to {,un}install-liblwgeom rules + [RT-SIGTA] + +2011-08-06 17:48 Sandro Santilli <strk@keybit.net> + + * [r7701] Re-drop use of libtool (more troubles than help). + Stub a rule to build and install a shared liblwgeom. + [RT-SIGTA]. + +2011-08-06 16:18 Sandro Santilli <strk@keybit.net> + + * [r7700] Re-introduce numerical flags in building "NM" objs + [RT-SIGTA] + +2011-08-06 15:12 Sandro Santilli <strk@keybit.net> + + * [r7699] Use libtool to build liblwgeom. Still only static. + [RT-SIGTA] + +2011-08-06 09:47 Sandro Santilli <strk@keybit.net> + + * [r7698] Use GEOS compiler and linker flags for liblwgeom, add + lwgeom_geos_noop and cunit test for it (to confirm linking works, + and it does) [RT-SIGTA] + +2011-08-06 09:46 Sandro Santilli <strk@keybit.net> + + * [r7697] Add lwgeom_buildarea to liblwgeom [RT-SIGTA] + +2011-08-06 09:46 Sandro Santilli <strk@keybit.net> + + * [r7696] Add GEOS spatial operations to liblwgeom (ticket #1050) + [RT-SIGTA] + +2011-08-05 12:45 Regina Obe <lr@pcorp.us> + + * [r7695] Another minor check + +2011-08-04 15:03 Regina Obe <lr@pcorp.us> + + * [r7694] Update hard upgrade to include use of + legacy_compatibility_layer.sql + +2011-08-03 15:01 Regina Obe <lr@pcorp.us> + + * [r7693] Create new legacy compatibility layer script which will + install the absolute minimal to restore an old postgis database. + Also got rid of srid function and moved to legacy compatibility + layer. Still need to test with a restore. + +2011-08-03 12:14 Regina Obe <lr@pcorp.us> + + * [r7692] some typo cleanup + +2011-08-03 05:00 Regina Obe <lr@pcorp.us> + + * [r7691] Make more efficient the case when no state or city is + provided but zip is provided. + +2011-08-03 03:51 Regina Obe <lr@pcorp.us> + + * [r7690] document new drop_indexes_generate_script function + +2011-08-03 02:06 Regina Obe <lr@pcorp.us> + + * [r7689] Major rework to improve speed, selectivity, and + additional regress. Also added some indexes and removed some -- + should solve #1145, #1148, and #1131 (should be about 60% faster + for most cases and in some as much as 20 times faster). Better + performance if you set max results = 1. Some other minor cleanup. + documentation of new management helper functions coming next. + +2011-08-02 06:33 Regina Obe <lr@pcorp.us> + + * [r7688] Add link to Sandro's topology Paris 2011 slides in + summary of topology reference section + +2011-07-28 18:56 Sandro Santilli <strk@keybit.net> + + * [r7687] Use strcpy rather than strncpy, simpler and less + error-prone + +2011-07-28 18:43 Sandro Santilli <strk@keybit.net> + + * [r7686] Give strncpy enough space to write a terminating null. + Thanks gengor for the patch. + +2011-07-27 19:21 Regina Obe <lr@pcorp.us> + + * [r7684] minor updates to ST_MakeLine to clarify pre-9.0 and 9.0+ + approaches + +2011-07-27 11:55 Regina Obe <lr@pcorp.us> + + * [r7683] 1 more change + +2011-07-27 11:54 Regina Obe <lr@pcorp.us> + + * [r7682] fix typo + +2011-07-27 11:52 Regina Obe <lr@pcorp.us> + + * [r7681] example of using new PostgreSQL 9.0+ ORDER BY aggregate + feature for ST_MakeLine + +2011-07-26 15:39 Regina Obe <lr@pcorp.us> + + * [r7680] more examples for ST_Offsetcurve + +2011-07-26 14:30 Regina Obe <lr@pcorp.us> + + * [r7679] fix typo + +2011-07-26 14:29 Regina Obe <lr@pcorp.us> + + * [r7678] remove left and right notes until I have arrows. not + embarrass myself with my directional dyslexia. + +2011-07-26 05:37 Regina Obe <lr@pcorp.us> + + * [r7677] Start work documenting ST_AsRaster + +2011-07-25 15:53 Regina Obe <lr@pcorp.us> + + * [r7676] reduce spacing more + +2011-07-25 15:52 Bborie Park <bkpark at ucdavis.edu> + + * [r7675] Addition of ST_AsRaster function to provide the ability + to convert geometries into rasters. + + Associated ticket is #1141. + +2011-07-25 14:20 Regina Obe <lr@pcorp.us> + + * [r7674] another typo + +2011-07-25 14:10 Regina Obe <lr@pcorp.us> + + * [r7673] fix coloring to agree with color of other examples + +2011-07-25 14:08 Regina Obe <lr@pcorp.us> + + * [r7672] reduce width of table cells -- ST_OffsetCurve + +2011-07-25 14:04 Regina Obe <lr@pcorp.us> + + * [r7671] redo all examples so they fit in the 0 0 200 200 grid + +2011-07-25 13:44 Regina Obe <lr@pcorp.us> + + * [r7670] fix some typos and grid more to fix + +2011-07-25 12:18 Regina Obe <lr@pcorp.us> + + * [r7669] get rid of semicolons + +2011-07-25 12:13 Regina Obe <lr@pcorp.us> + + * [r7668] need more pictures :), visual examples for st_offsetcurve + +2011-07-24 08:15 Regina Obe <lr@pcorp.us> + + * [r7667] update ST_MapAlgebra to agree with implementation (got + rid of bosolete proto and example and replaced with new example + +2011-07-23 21:42 Sandro Santilli <strk@keybit.net> + + * [r7666] Be terse, we don't care about context. Closes ticket + #1142. + +2011-07-23 21:34 Sandro Santilli <strk@keybit.net> + + * [r7665] Set 'C' collation when creating regress database. See + #1140. + +2011-07-22 20:20 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r7664] Added a note saying that those function now have a C + implementation. Many TABs converted to spaces. + +2011-07-22 20:05 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r7663] -Fix for #645. + -Replaced min and max with LEAST and GREATEST + -Adaptation to ST_SetBandNodataValue() + +2011-07-22 19:38 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r7662] Fix for ticket #969. Removed conflicting function + variant. + +2011-07-22 19:31 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r7661] -Addaptation to new two rasters ST_MapAlgebra in which + nodatavalue expressions are text and now accept a + nodatanodatavalueexpr. + -Added RANGE as a predefined expression. + +2011-07-22 19:29 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r7660] Modified comment on further enhancements. + +2011-07-22 19:28 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r7659] -Fix for ticket #644. Removed all variants. + -Fixed the two rasters version. + -Added some tests. + -Added ST_MinPossibleVal(). + -Determine new nodata value AFTER determining the new pixeltype. + -Replaced ST_SetBandHasNodataValue with + ST_SetBandNodataValue(rast, NULL). + -Added implementation of two rasters overlay operations using the + two raster MapAlgebra. + +2011-07-21 17:31 Bborie Park <bkpark at ucdavis.edu> + + * [r7658] Cleaned the grid alignment code to remove unnecessary + cruft in rt_raster_gdal_warp + +2011-07-21 16:20 Bborie Park <bkpark at ucdavis.edu> + + * [r7657] Fixed floating point issue with the remainder returned + from the function modf in rt_api.c. Updated messages in rt_pg.c. + Corrected expected regression results in rt_resample_expected. + + Associated ticket is #1114 + +2011-07-20 19:53 Sandro Santilli <strk@keybit.net> + + * [r7656] Improve testsuite predictability (#1135) + +2011-07-19 22:20 Bborie Park <bkpark at ucdavis.edu> + + * [r7654] Bug fix of deallocating array using wrong index variable + +2011-07-18 23:39 Bborie Park <bkpark at ucdavis.edu> + + * [r7653] Fixed width and height values expected. + +2011-07-18 23:29 Bborie Park <bkpark at ucdavis.edu> + + * [r7652] - tweaked the rt_resample regression test to use SRIDs + under 1000000 + - changed the computation of width and height when aligning to a + grid + +2011-07-18 04:44 Regina Obe <lr@pcorp.us> + + * [r7651] Fix datatype of tlid on edges table. Other tables with + tlid are set to bigint. This one set to numeric(10). Still + revising my tables to determine what impact this has in utilizing + the existing indexes + +2011-07-17 17:39 Regina Obe <lr@pcorp.us> + + * [r7650] Limit edge and featnames search to just road / street + types + +2011-07-17 17:02 Regina Obe <lr@pcorp.us> + + * [r7649] more regress tests for reverse_geocode + +2011-07-17 16:46 Regina Obe <lr@pcorp.us> + + * [r7648] simplify logic by getting rid of addr join. Speed + improved slightly + +2011-07-17 16:11 Regina Obe <lr@pcorp.us> + + * [r7647] enhancements to support reverse geocoding of highway + locations. Also add reverse geocode regress tests + +2011-07-16 04:19 Regina Obe <lr@pcorp.us> + + * [r7646] #1125 have highway designations print in front of + streetname instead of after + +2011-07-15 21:07 Bborie Park <bkpark at ucdavis.edu> + + * [r7644] Minor comment updates to correct details + +2011-07-15 06:40 Regina Obe <lr@pcorp.us> + + * [r7641] revise ratings to minimize numberes steetss from matching + highly with interstate routes. Also glue on pretype abrv (which + are technically street types) to front of street name in + normalize output so that highways print correctly as e.g. State + Hwy 10 etc. + +2011-07-15 05:31 Regina Obe <lr@pcorp.us> + + * [r7640] Add in common abbreviation RT to map to Rte and test case + to regress to test + +2011-07-14 20:11 Bborie Park <bkpark at ucdavis.edu> + + * [r7639] Code refactored for RASTER_dumpWKTPolygons to use same + mechanisms for resultset generation (Datums instead of CStrings) + as RASTER_metadata and other functions. + + SQL functions refactored to use one call to ST_Metadata for + attributes rather than separate/multiple calls to ST_Skew*, + ST_Scale*, ST_UpperLeft*. + +2011-07-14 14:54 Bborie Park <bkpark at ucdavis.edu> + + * [r7638] Refactored functions returning sets to use Datums instead + of C strings, which were causing rounding issues particularly for + ST_Metadata. This refactoring affected RASTER_metadata, + RASTER_bandmetadata, RASTER_summarystats, RASTER_histogram, + RASTER_quantile, RASTER_valuecount and RASTER_gdaldrivers. + + Also refactored the ST_Raster2World* and ST_World2Raster* + functions to get the raster's metadata in one call using + ST_Metadata rather than individual calls for the georeference + components + +2011-07-14 11:47 Regina Obe <lr@pcorp.us> + + * [r7637] add make tiger_geocoder_comments.sql to build script + +2011-07-14 11:32 Regina Obe <lr@pcorp.us> + + * [r7636] Start work on PostgreSQL in db help for geocoder + +2011-07-14 11:13 Regina Obe <lr@pcorp.us> + + * [r7635] document the install_missing_indexes function that is + used as part of the upgrade process + +2011-07-14 07:45 Regina Obe <lr@pcorp.us> + + * [r7634] #1113 take into consideration street prequals like Old in + rating and filtering, also added btree varops on fullname + (trigrams and fulltext proved too slow will need to reinvestigate + those), also added helper function install_missing_indezes() + which gets run as part of upgrade script. will need to add to + documentation. Also added regress tests from snippets in #1113 + +2011-07-13 19:33 Bborie Park <bkpark at ucdavis.edu> + + * [r7633] Complete refactoring of code from ST_Transform to + ST_Resample. There are four new functions as of this revision: + ST_Resample, ST_Rescale, ST_Reskew and ST_SnapToGrid. + ST_Transform is still present but points to ST_Resample. + + Associated ticket #1114 + +2011-07-12 19:45 Regina Obe <lr@pcorp.us> + + * [r7632] Fix for #1112 service roads + +2011-07-12 13:03 Regina Obe <lr@pcorp.us> + + * [r7631] Partial fix for #1108 + +2011-07-12 04:14 Regina Obe <lr@pcorp.us> + + * [r7630] Fix regress failure with #1074 (wasn't correctly handling + all cases where street name is composed of a street type + +2011-07-11 17:03 Sandro Santilli <strk@keybit.net> + + * [r7629] Change ST_OffsetCurve parameters type from cstrin to + text. See ticket #1117. + +2011-07-11 12:17 Sandro Santilli <strk@keybit.net> + + * [r7628] Stricter ISO output from ST_GetEdgeFaces: start + enumerating ring edges from the edge with smaller id [RT-SIGTA] + +2011-07-09 20:32 Regina Obe <lr@pcorp.us> + + * [r7627] oops typo + +2011-07-09 20:25 Regina Obe <lr@pcorp.us> + + * [r7626] revert change + +2011-07-09 20:12 Regina Obe <lr@pcorp.us> + + * [r7625] fix type in county load + +2011-07-09 15:55 Sandro Santilli <strk@keybit.net> + + * [r7624] Clarify return code from topology.ST_ModEdgeHeal. Clean + up description of ST_NewEdgeHeal too. + +2011-07-09 01:23 Regina Obe <lr@pcorp.us> + + * [r7623] example of using geocode geometry filter + +2011-07-09 01:06 Regina Obe <lr@pcorp.us> + + * [r7622] Fix ST_Transform signature to match revised function + declarations + +2011-07-08 08:23 Regina Obe <lr@pcorp.us> + + * [r7621] upper case and replace (ZM and Z) in geometry_columns so + its more backwards compatible with old geometry_columns table + +2011-07-07 22:45 Regina Obe <lr@pcorp.us> + + * [r7620] #1070 optional geometry filter arg, documentation (well + start need example), and regress tests + +2011-07-07 22:23 Bborie Park <bkpark at ucdavis.edu> + + * [r7619] Final refactor of ST_Transform and underlying + RASTER_resample before overhaul for ST_Resample + +2011-07-07 21:58 Bborie Park <bkpark at ucdavis.edu> + + * [r7618] Refactored ST_Transform in preparation for additional + refactoring to accomodate ST_Resample + +2011-07-07 18:28 Bborie Park <bkpark at ucdavis.edu> + + * [r7617] Cleaned up the large number of floating point equality + tests with a function-like macro + +2011-07-07 12:41 Regina Obe <lr@pcorp.us> + + * [r7616] #1074, #1109 - Fix for compound named streets that have a + portion that is a street type + +2011-07-06 23:44 Regina Obe <lr@pcorp.us> + + * [r7615] more regress tests for #1109 + +2011-07-06 23:15 Bborie Park <bkpark at ucdavis.edu> + + * [r7614] Refactored how user-specified upperleft corner + coordinates are handled + +2011-07-06 23:00 Regina Obe <lr@pcorp.us> + + * [r7613] fix for #1109 when a street name is same as a defined + street type + +2011-07-06 15:02 Sandro Santilli <strk@keybit.net> + + * [r7612] Properly destroy lwgeom in lwgeom_to_x3d3 now that it's + safe (see #1102) + +2011-07-06 14:55 Sandro Santilli <strk@keybit.net> + + * [r7611] Properly release memory in lwmline_clip_to_ordinate_range + (see #1102) + +2011-07-06 14:45 Sandro Santilli <strk@keybit.net> + + * [r7610] Have lwcollection_extract clone (shallow) the extracted + components. Safely lwgeom_free the return from + lwcollection_extract in testcase. + +2011-07-06 14:29 Sandro Santilli <strk@keybit.net> + + * [r7609] Properly lwgeom_free cloned objects in lwgeom_homogenize + now that it is safe + +2011-07-06 14:29 Sandro Santilli <strk@keybit.net> + + * [r7608] Implement ptarray_clone (shallow) and update clone + documentation (doxygen), have lw*_clone clone the POINTARRAY but + not the serialized point list (using ptarray_clone), add unit + testing for lwgeom_clone. See ticket #1102. + +2011-07-06 10:48 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r7607] Fix compile warning in geography_measurement.c caused by + missing function prototype. + +2011-07-06 10:48 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r7606] Fix compile warning for lwgeom_init_allocators() in + loader/dumper by adding missing liblwgeom.h #include. + +2011-07-06 09:40 Sandro Santilli <strk@keybit.net> + + * [r7605] Rename ptarray_clone to ptarray_clone_deep, to be + conformant with lwgeom_clone_deep in that it copies the + serialized pointlist too + +2011-07-06 08:04 Sandro Santilli <strk@keybit.net> + + * [r7604] Compiler warning fix + +2011-07-06 07:42 Sandro Santilli <strk@keybit.net> + + * [r7603] Fix compiler warnings (#999) + +2011-07-06 07:42 Sandro Santilli <strk@keybit.net> + + * [r7602] Don't let temporary collection leak in lwgeom_to_x3d3 + (actually do, but sligthly less, till we fix lwgeom_clone). See + #1102. + +2011-07-06 07:42 Sandro Santilli <strk@keybit.net> + + * [r7601] const-correct lw*_is_closed + +2011-07-06 06:46 Sandro Santilli <strk@keybit.net> + + * [r7600] properly release reported error message string + +2011-07-06 06:46 Sandro Santilli <strk@keybit.net> + + * [r7599] properly release lwgeom objec in + test_lwprint_assert_error + +2011-07-06 06:46 Sandro Santilli <strk@keybit.net> + + * [r7598] properly release lwgeom objec in test_misc_area + +2011-07-06 05:18 Bborie Park <bkpark at ucdavis.edu> + + * [r7597] Changed expressions for pixel byte boundaries in assert + tests of rt_raster_serialize and rt_raster_deserialize in + rt_api.c. The changed expressions are based upon relative values + rather than the original absolute values. This should resolve the + problem defined in ticket #1061. It may also help with the + crashing in ticket #1066. + + Associated tickets are #1061 and possibly #1066. + +2011-07-06 02:17 Regina Obe <lr@pcorp.us> + + * [r7596] fix typo + +2011-07-06 01:02 Regina Obe <lr@pcorp.us> + + * [r7595] drop_state_tables_generate_script function and document + it. Also add blank paramdef to missing indexes so doesn't look + goofy in docs + +2011-07-06 00:40 Regina Obe <lr@pcorp.us> + + * [r7594] Get rid of use of array_accum and replace with array_agg + (which exists in PostgreSQL 9\8.4+). Now that we only support + 8.4+, we can just use array_agg. + +2011-07-05 22:02 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7593] Remove leak in mixed time ptarray case (#1102) + +2011-07-05 21:01 Sandro Santilli <strk@keybit.net> + + * [r7592] Plug some more easy leaks in testers + +2011-07-05 20:21 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7591] Stop up small but universal leak. (#1102) + +2011-07-05 18:55 Sandro Santilli <strk@keybit.net> + + * [r7590] Fix memory leak while computing box3d for nested + geometrycollection (revealed by test in cu_geodetic.c) + +2011-07-05 18:41 Sandro Santilli <strk@keybit.net> + + * [r7589] Properly release memory allocated by tester + +2011-07-05 17:49 Regina Obe <lr@pcorp.us> + + * [r7588] #1076 hanlde of post direction with highways -- 1940 + County Road C W, Roseville, MN 55113 , also trim excess space + left in street names + +2011-07-04 22:51 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7587] Remove memory leaks when a parse error kicks out in WKT + (#1102) + +2011-07-04 17:32 Regina Obe <lr@pcorp.us> + + * [r7586] #1076 more work toward Highway geocoding -- significant + rework of original patch. Still need to parse out the direction + information + +2011-07-04 15:50 Sandro Santilli <strk@keybit.net> + + * [r7585] Drop dangling reference to Probe_Geometry_Columns (see + #1083) + +2011-07-04 15:40 Sandro Santilli <strk@keybit.net> + + * [r7584] A couple more tests for btree against points: different + points, differently cached boxes + +2011-07-04 15:34 Sandro Santilli <strk@keybit.net> + + * [r7583] Have pglwgeom_getbox2d_p compute a bounding box when not + cached. Fixes #1023. + +2011-07-04 15:12 Sandro Santilli <strk@keybit.net> + + * [r7582] Document pglwgeom_getbox2d_p. See + http://trac.osgeo.org/postgis/ticket/1023 + +2011-07-04 14:50 Sandro Santilli <strk@keybit.net> + + * [r7581] More unit test memory leaks and compiler warnings fixed + +2011-07-04 14:14 Sandro Santilli <strk@keybit.net> + + * [r7580] Add test for btree equality of points (#1023) + +2011-07-04 13:56 Sandro Santilli <strk@keybit.net> + + * [r7579] Do not deep-free return from lwcollection_homogenize as + it doesn't copy POINTARRAY memory. See #1104. + +2011-07-04 12:29 Sandro Santilli <strk@keybit.net> + + * [r7578] Plug some memory leaks in the unit tests, to help finding + lower-level ones... + +2011-07-04 12:29 Sandro Santilli <strk@keybit.net> + + * [r7577] Document memory management of lwdoubles_to_latlon and + lwpoint_to_latlon + +2011-07-04 11:24 Sandro Santilli <strk@keybit.net> + + * [r7576] Fix support for MULTICURVEZM and make TIN spelling + conformant to other (MixedCase). Add cohomprensive regress test + for postgis_type_name(). Closes bug #1096 once again. + +2011-07-04 11:24 Sandro Santilli <strk@keybit.net> + + * [r7575] Add missing circular types to geomtype_struct_array, + fixing bug #1094 + +2011-07-04 11:24 Sandro Santilli <strk@keybit.net> + + * [r7574] Do not hard-code lenght of geomtype struct array (See + #1094) + +2011-07-04 10:10 Sandro Santilli <strk@keybit.net> + + * [r7573] AddGeometryColumn: when complaining about unknown + geometry type also report the used name and dimensions (see + related bug #1096) + +2011-07-04 10:02 Sandro Santilli <strk@keybit.net> + + * [r7572] Fix unused variable warning when building against GEOS >= + 3.3 + +2011-07-04 09:26 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r7571] Make all PostGIS object files depend upon liblwgeom, so + that if liblwgeom is + changed then it also triggers a (complete) rebuild of PostGIS. + + Note as documented in #447 this is an over-cautious approach + since it rebuilds + all of PostGIS if liblwgeom changes, but at least its a starting + point and + does actually solve the case whereby a user updates liblwgeom but + doesn't + force a rebuild of PostGIS. + +2011-07-04 09:09 Sandro Santilli <strk@keybit.net> + + * [r7570] typo + +2011-07-04 09:07 Sandro Santilli <strk@keybit.net> + + * [r7569] Update expected error messages since typmod introduction. + Closes ticket #1101. + +2011-07-04 09:00 Sandro Santilli <strk@keybit.net> + + * [r7568] Do not manually delete rows from geometry_columns (which + is now a view). Closes ticket #1099. + +2011-07-04 07:35 Regina Obe <lr@pcorp.us> + + * [r7567] Partial fix for #1076, county roads and highways, but + think I might have broken the SELECT (addy).*,* from + geocode('16725 Rockford Road, Plymouth, MN 55447') or my data is + bad + +2011-07-03 21:47 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r7566] Fix for #1088: Too many columns in select crashes + pgsql2shp. + + Instead of a fixed length query string, dynamically allocate the + memory based + upon the sum of the lengths of all of the column names. + +2011-07-03 16:51 Regina Obe <lr@pcorp.us> + + * [r7565] #1087 improve rating algorithm. also start to use + prepared statements where appropriate (don't put state in + prepared part since that would prevent constraint exclusion from + kicking in) + +2011-07-03 10:45 Regina Obe <lr@pcorp.us> + + * [r7564] Add more tests, minor cleanup + +2011-07-03 05:03 Regina Obe <lr@pcorp.us> + + * [r7563] Update credits and release notes to include change in + geometry_columns and management functions, add ST_OffSetCurve to + release_notes.xml, add Rafal Magda to people credits list + +2011-07-03 01:58 Regina Obe <lr@pcorp.us> + + * [r7562] more column width cleanup + +2011-07-03 01:52 Regina Obe <lr@pcorp.us> + + * [r7561] #1095 clarification of what is mean by geometry_columns + not supporting views built the old constraint way + +2011-07-03 01:50 Regina Obe <lr@pcorp.us> + + * [r7560] #1095 cleanup MIGRATION document + +2011-07-03 01:29 Regina Obe <lr@pcorp.us> + + * [r7559] #1096 same fix as for linestringZ, apply to geometryM, zm + and multilinestringZ + +2011-07-03 00:59 Regina Obe <lr@pcorp.us> + + * [r7558] #1098 fix UpdateGeometrySRID + +2011-07-02 18:19 Regina Obe <lr@pcorp.us> + + * [r7557] #1083, #1093: fix typo, delete probe_geometry_columns + which is now completely obsolte with gnew geometry-columns view + change + +2011-07-02 17:53 Regina Obe <lr@pcorp.us> + + * [r7556] missed a spot + +2011-07-02 17:52 Regina Obe <lr@pcorp.us> + + * [r7555] add missing para end tag + +2011-07-02 17:25 Regina Obe <lr@pcorp.us> + + * [r7554] start describing management functions how typmod changes + things --- Populate_geometry_columns, dropgeometrytable, + dropgeometrycolumn. More to go. + +2011-07-02 16:52 Regina Obe <lr@pcorp.us> + + * [r7553] #1096 can't create 2.5d linestrings + +2011-07-02 16:29 Regina Obe <lr@pcorp.us> + + * [r7552] revise template to give example of optional argument + +2011-07-02 13:43 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r7551] Update loader regression test suite to add a simple test + for shp2pgsql (much as we now do for pgsql2shp). + + Note that these tests aren't completely comprehensive and should + be expanded, with the long term aim + of moving the loader regression tests out of the main regression + harness and into CUnit instead. + +2011-07-02 12:34 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r7550] Fix up the loader unit tests so that if --with-gui is not + passed to configure, the non-GUI tests will continute to run + instead of failing compilation. + +2011-07-02 09:27 Regina Obe <lr@pcorp.us> + + * [r7549] revise wmsservers_new to use new typmod and not directly + delete and add to geometry_columns so passes regress + +2011-07-02 08:58 Regina Obe <lr@pcorp.us> + + * [r7548] #944, #1081, #1083, #1088, #1084: Convert + geometry_columns to a view, revise management functions to not + update/delete from geometry_columns and to support typmod. Will + use typmod behavior as default + fix typos in postgis_type_name and delete from geometry_column + calls in regress. + +2011-07-01 22:36 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r7547] Another attempt to fix #1080 on Windows - it seems that + simply opening and + closing a pgsql2shp state object is a good way to find all + uninitialised + variables. + +2011-07-01 21:37 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r7546] Revised fix for #1080 based upon backtrace provided by + Regina. + +2011-07-01 21:32 Regina Obe <lr@pcorp.us> + + * [r7545] #1082 get rid of delete from geometry_columns call. Also + cleanup argument list to make more modern + +2011-07-01 14:34 Regina Obe <lr@pcorp.us> + + * [r7544] Benchmark notes + +2011-07-01 13:45 Regina Obe <lr@pcorp.us> + + * [r7543] itemize more upgrade GOTCHAS + +2011-07-01 13:10 Regina Obe <lr@pcorp.us> + + * [r7542] convert to CREATE OR REPLACE postgis_constraint_srid + +2011-07-01 12:59 Regina Obe <lr@pcorp.us> + + * [r7541] put in associated ticket numbers change to unaligned + format for easier diffing, add in script to run test suite. Force + LF and put svn keywords + +2011-07-01 11:47 Sandro Santilli <strk@keybit.net> + + * [r7540] Add 2 more testcases for ST_OffsetCurve, one of which + returning a MULTILINESTRING + +2011-07-01 10:59 Sandro Santilli <strk@keybit.net> + + * [r7539] Use choice="opt" to encode default parameter for + ST_OffsetCurve + +2011-07-01 10:36 Sandro Santilli <strk@keybit.net> + + * [r7538] Well, let's run the ST_OffsetCurve regress test only + against GEOS-3.3. After all it's known to fail against 3.2 ... + (due to http://trac.osgeo.org/geos/ticket/455#comment:1) + +2011-07-01 10:14 Sandro Santilli <strk@keybit.net> + + * [r7537] Test LINESTRING EMPTY return from ST_OffsetCurve + +2011-07-01 10:10 Sandro Santilli <strk@keybit.net> + + * [r7536] Properly convert typed empties coming from GEOS. + +2011-07-01 10:10 Sandro Santilli <strk@keybit.net> + + * [r7535] Add ST_OffsetCurve news item + +2011-07-01 09:56 Sandro Santilli <strk@keybit.net> + + * [r7534] Add ST_OffsetCurve function supporting both GEOS-3.2 and + GEOS-3.3+. Uses distance parameter sign to derive left/right + side. Includes regress testing and documentation. Based on patch + by Rafal Magda. + +2011-07-01 09:33 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r7533] Fix #1080: cunit is crashing on test_ShpDumerDestroy(). + + Looks like the original code omitted to set the default config + values causing + the addition of a ShpDumperDestroy() call to fall over on some + platforms due + to uninitialised pointers. + +2011-07-01 06:17 Regina Obe <lr@pcorp.us> + + * [r7532] Force unix LF. Also get rid of unnecessary call to CREATE + INDEX .. we have a missing script for that. + +2011-07-01 02:22 Regina Obe <lr@pcorp.us> + + * [r7531] Fix for #1086 Issue with parsing out location. also added + to regression tests + +2011-07-01 00:02 Regina Obe <lr@pcorp.us> + + * [r7530] fix build -- had functions installed out of order of + dependency + +2011-06-30 19:18 Regina Obe <lr@pcorp.us> + + * [r7529] add pretty function to return pretty name and use in + postgis_constraint_type (seems 3 times as slow with conversion -- + will investigate later) -- before my 50 odd goemetry_columns + based on all constraint columns returns 75ms now takes 250-300 + ms. + +2011-06-30 17:16 Bborie Park <bkpark at ucdavis.edu> + + * [r7528] removed accidental commit of some debug testing + +2011-06-30 13:28 Bborie Park <bkpark at ucdavis.edu> + + * [r7527] fixed logic issues in ST_AsJPEG + +2011-06-29 23:14 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7526] Change parameter order in 900913 (magic!) + +2011-06-29 22:40 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r7524] Commit rework of #885 (pgsql2shp fields conversion from + predefined list). + + This patch required extra work to ensure that it was a better fit + for the + new loader/dumper structure including error reporting, better use + of C + coding style and altering various names/code locations as + appropriate. + +2011-06-29 22:40 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7523] GEOS no like POINT EMPTY (#1060) + +2011-06-29 21:10 Regina Obe <lr@pcorp.us> + + * [r7522] Itemize some issues with restoring data from old that + cause failures + +2011-06-29 19:14 Regina Obe <lr@pcorp.us> + + * [r7521] Add Hunter Systems Group to credits for funding Geocoder + enhancements + +2011-06-29 16:26 Regina Obe <lr@pcorp.us> + + * [r7520] #949 more legacy cleanup -- add G-M to uninstall, remove + accum + +2011-06-29 12:56 Regina Obe <lr@pcorp.us> + + * [r7519] fix typo in uninstall script + +2011-06-29 10:35 Regina Obe <lr@pcorp.us> + + * [r7518] #1069: Support for specifying max_results to return. + Regress already committed + +2011-06-29 05:06 Regina Obe <lr@pcorp.us> + + * [r7517] fix for #1073 handling mangled zipcodes and update + regress to include these + +2011-06-29 04:23 Regina Obe <lr@pcorp.us> + + * [r7516] #1077 preliminary regress tests and current outputs + (formatting needs cleanup and to be run by script but will deal + with that later). Already have a regress failure when compared + with docs. + +2011-06-28 19:36 Sandro Santilli <strk@keybit.net> + + * [r7515] Simplify layertrigger tests dropping unneeded operations. + The reduction was verified to still trigger bug #950 prior to the + fix for it. + +2011-06-28 19:36 Sandro Santilli <strk@keybit.net> + + * [r7514] Apply patch by Andrea Peri to fix topology layer trigger. + Includes regress test. Closes ticket #950. + +2011-06-28 14:26 Regina Obe <lr@pcorp.us> + + * [r7512] #1063 - add update website with released doc version to + HOWTO_RELEASE steps + +2011-06-28 12:32 Regina Obe <lr@pcorp.us> + + * [r7511] fix windows script -- had sh style commented alter schema + line instead of windows batch style commented alter schema + +2011-06-28 12:21 Regina Obe <lr@pcorp.us> + + * [r7510] put in missing homage to GDAL. Also updated the GDAL use + list http://trac.osgeo.org/gdal/wiki/SoftwareUsingGdal to include + PostGIS + +2011-06-28 03:55 Regina Obe <lr@pcorp.us> + + * [r7509] Partial fix for #1068 -- handling of misspelled numeric + streets such as 13nd or 22th and partial support for numeric + streets with fractions like 1/2 + +2011-06-28 02:50 Regina Obe <lr@pcorp.us> + + * [r7508] get rid of drop / recreate norm_addy. It's not necessary + yet since we haven't changed it. + +2011-06-28 01:27 Regina Obe <lr@pcorp.us> + + * [r7507] #1068 partial fix -- trimmed leading/trailing spaces in + normalize_address fields so now correctly handles things like + W.,N. etc. More fixes coming. + +2011-06-27 21:35 Bborie Park <bkpark at ucdavis.edu> + + * [r7506] - wrote function getSRTextSPI to create one code for + getting the srtext of a SRID from the spatial_ref_sys table. + - removed plpgsql function _ST_srtext with addition of + getSRTextSPI. + + The regression failure in ticket #1064 should be resolved as a + side-affect of the new function as the srtext returned through + SPI is copied to an interval variable. + +2011-06-27 19:31 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7505] Ignore GNUMakefile + +2011-06-27 19:24 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7504] Change CompoundString to CompoundCurve + +2011-06-27 19:02 Bborie Park <bkpark at ucdavis.edu> + + * [r7503] modified expected results for rt_pixelvalue. + + Associated ticket is #1055 + +2011-06-27 18:53 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7502] Add migration guide for upgraders + +2011-06-27 18:02 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7497] Fix type name for CompoundCurve + +2011-06-27 16:47 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r7496] Edit rt_band_get_pixel() so that the warning message + contains the out-of-bound coordinates being accessed. + +2011-06-27 14:35 Bborie Park <bkpark at ucdavis.edu> + + * [r7495] Cleanup of error messages. + +2011-06-27 01:53 Regina Obe <lr@pcorp.us> + + * [r7494] version garden test files so now named + raster_gardentest_20.sql, postgis_gardentest_20.sql. Add + reclassarg type example to raster garden objects + +2011-06-26 19:44 Regina Obe <lr@pcorp.us> + + * [r7493] revise to ignore OUT parameters. Also add 20 to postgis + garden output table name + +2011-06-26 18:18 Regina Obe <lr@pcorp.us> + + * [r7492] change ST_AsX3d from using methodsynopsis back to + funcsynopsis. This was an attempt before to stylize default args + which didn't work out. + +2011-06-26 17:31 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7491] ST_IsValidDetail and ST_IsValidReason POLYGON CRASH + (#712) + +2011-06-26 03:15 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7490] Make test for co-linearity a little more + double-barrelled. + +2011-06-26 02:29 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7489] Simplify circle stroking code (#1057) + +2011-06-25 23:35 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7488] Remove reference to algorithm.h from generator.c + +2011-06-25 22:36 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7487] Prototype segmentation code and move lwalgorith.h + prototypes into liblwgeom.h and liblwgeom_internal.h + +2011-06-25 21:42 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7486] Convert some BOX3D functions to GBOX + +2011-06-25 21:11 Regina Obe <lr@pcorp.us> + + * [r7485] correct column names of norm_addy object - they were + wrong + +2011-06-25 20:32 Regina Obe <lr@pcorp.us> + + * [r7484] update release notes + +2011-06-25 20:24 Regina Obe <lr@pcorp.us> + + * [r7483] #1062 apply typo patch from Kasif Rasul + +2011-06-25 19:20 Bborie Park <bkpark at ucdavis.edu> + + * [r7482] Modified ST_Transform to permit specification of + projected raster's scale. This is due to the scale change that + occurs when a raster is being reprojected. + +2011-06-25 18:15 Regina Obe <lr@pcorp.us> + + * [r7481] bounding box clarification && (that it's 2D) + +2011-06-25 18:14 Regina Obe <lr@pcorp.us> + + * [r7480] minor clarifications + +2011-06-25 08:13 Regina Obe <lr@pcorp.us> + + * [r7474] #1051 - fix rating logic (typo in direction weight) + causing - select (g.addy).*, astext(g.geomout), g.* from + geocode('150 2nd Ave S, Minneapolis, MN 55401') as g To return + north instead of south. Also change functions to use named args + +2011-06-24 23:18 Regina Obe <lr@pcorp.us> + + * [r7473] bah pdflatex doesn't like sect3. Just make it a sect2 + +2011-06-24 21:49 Regina Obe <lr@pcorp.us> + + * [r7472] Id on para didn't take -- lets try a sect3 + +2011-06-24 21:20 Bborie Park <bkpark at ucdavis.edu> + + * [r7471] Added sanitization of the algorithm parameter of + ST_Transform. Refactored the regression test for ST_Transform. + +2011-06-24 16:30 Regina Obe <lr@pcorp.us> + + * [r7470] put in ancho for changed section and link back from top + of What's new to breaking changes section + +2011-06-24 16:14 Regina Obe <lr@pcorp.us> + + * [r7469] revise 2.0 changed,enhanced, new to also capture + paragraphs embedded in sub tags such as warning, note. Was + missing some breaking changes ST_Length, ST_GeomFromText etc + because it wasn't catching warnings + +2011-06-24 14:25 Regina Obe <lr@pcorp.us> + + * [r7468] thought had changed to use default params -- guess not. + Also stamp in time author info as comment inside function + +2011-06-24 13:02 Regina Obe <lr@pcorp.us> + + * [r7467] Get rid of note about ST_Transform not working on all + platforms. No longer true + +2011-06-24 01:28 Regina Obe <lr@pcorp.us> + + * [r7463] revert unnecessary edit + +2011-06-24 01:20 Regina Obe <lr@pcorp.us> + + * [r7462] fix for #1051 -- postDirAbbrev doesn't parse + +2011-06-23 23:50 Chris Hodgson <chodgson@refractions.net> + + * [r7461] further bug fix for #884 + +2011-06-23 22:29 Regina Obe <lr@pcorp.us> + + * [r7459] note about ST_length geography breaking change -- in 1.5 + used to return perimeter of a polygon now returns 0 just like + geometry + +2011-06-23 21:15 Regina Obe <lr@pcorp.us> + + * [r7458] time autho stamp signatures + +2011-06-23 21:11 Regina Obe <lr@pcorp.us> + + * [r7457] fix typos + +2011-06-23 21:08 Regina Obe <lr@pcorp.us> + + * [r7456] put in author revision id placeholder and have as part of + code logic as well + +2011-06-23 20:46 Bborie Park <bkpark at ucdavis.edu> + + * [r7455] Removed rt_raster_transform from rt_api.c and any calls + to it since rt_raster_gdal_warp has same results for + reprojections. + +2011-06-23 20:29 Bborie Park <bkpark at ucdavis.edu> + + * [r7454] Addition of rt_raster_gdal_warp function in rt_api.c. + This was written based upon GDAL's gdalwarp utility to provide a + flexible means to reproject, change the scale of, adjust the skew + (deskew) of and shift the origin of a raster. RASTER_transform in + rt_pg.c has been adjusted to make use of rt_raster_gdal_warp + instead of rt_raster_transform. Regression te + sts confirm that resulting rasters from rt_raster_gdal_warp are + identical to that of rt_raster_transform. + + The abilities to change a raster's scale, skew and origin have + yet to be tested and have no user-accessible SQL functions as of + this revision. This will occur in future revisions. + + The function rt_raster_transform will be removed in a future + revision. + +2011-06-23 15:36 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7453] Re-base circular bbox regressions + +2011-06-23 13:57 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7452] PostGIS Box2D (and && operator) gives wrong result for + ST_CircularString type (#578) + +2011-06-23 13:53 Regina Obe <lr@pcorp.us> + + * [r7451] clean up credits a bit + +2011-06-23 11:07 Regina Obe <lr@pcorp.us> + + * [r7450] #944 support functions to comb out type,srid, dim from + constraint based geometries and integration into + geometry_columns_v so that non-typmods and typmods of the world + can coexist in harmony + +2011-06-23 11:01 Sandro Santilli <strk@keybit.net> + + * [r7449] Don't interpret types as flags in ST_Summary. Fixes bug + #1054 (needs automated testing) + +2011-06-22 23:13 Regina Obe <lr@pcorp.us> + + * [r7448] minor addition to GEOMETRYCOLLECTION(EMPTY) warning + +2011-06-22 23:10 Regina Obe <lr@pcorp.us> + + * [r7447] #924 - document breaking change + +2011-06-22 22:09 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7446] ST_ForceRHR POLYGON EMPTY crash (#710) + +2011-06-22 21:33 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7445] ST_GeoHash POLYGON Empty crash (#711) + +2011-06-22 06:55 Regina Obe <lr@pcorp.us> + + * [r7444] Fill in raster coverage protos for ST_Histogram (still + need examples for these), fix typo in another function, change + ST_SetBandNoDataValue as if it supports default args (the + documentation will be consistent with implementation onces #1049 + is done) + +2011-06-21 06:13 Regina Obe <lr@pcorp.us> + + * [r7443] get rid of extraneous proto + +2011-06-21 05:45 Regina Obe <lr@pcorp.us> + + * [r7442] more fine tuning of output of driver options + +2011-06-21 05:25 Regina Obe <lr@pcorp.us> + + * [r7441] Fix ST_GDalDrivers output to correctly output options as + table. I had thought it was evenly balanced (all options have + descriptions), but that is not the case so origianl example had + the name and descriptions mismatched + +2011-06-21 05:05 Bborie Park <bkpark at ucdavis.edu> + + * [r7440] Refactored code and removed the use of SET_VARSIZE for + RASTER_band to fix segfault. + + Associated ticket is #1044. + +2011-06-21 04:18 Regina Obe <lr@pcorp.us> + + * [r7439] change bigint to integer for ST_ValueCount record outputs + +2011-06-21 03:26 Regina Obe <lr@pcorp.us> + + * [r7438] document ST_AsJPEG and fill in missing protos for + ST_ValueCount + +2011-06-21 01:52 Regina Obe <lr@pcorp.us> + + * [r7437] Get rid of removed ST_SummaryStats proto and add new + ST_SummaryStats proto + +2011-06-20 21:15 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7436] ST_Dump with GSerialized POINT EMPTY and EWKT/AsText + mismatch (#746) + +2011-06-20 17:08 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7435] Increase size of generator.c static buffer. (#583) + +2011-06-20 16:58 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7433] geography: ST_Intersects, ST_DWithin gbox_overlaps: + geometries have mismatched dimensionality (#1037) + +2011-06-20 14:55 Bborie Park <bkpark at ucdavis.edu> + + * [r7432] Changed the regression tests for ST_Transform in + preparation for testing replacement ST_Transform function with + different underlying code. + +2011-06-20 11:37 Sandro Santilli <strk@keybit.net> + + * [r7431] Add missing SQL/MM functions in the status section (TODO) + +2011-06-20 09:29 Regina Obe <lr@pcorp.us> + + * [r7430] #1040 -- ST_MinimumBoundingCircle -- replace X(), Y() + deprecated calls with ST_X(), ST_Y(). Also changed to use default + args. We really need regression tests for this function. Will put + on separate task. + +2011-06-19 06:24 Regina Obe <lr@pcorp.us> + + * [r7429] more cleanup of hard upgrade instructions + +2011-06-19 05:52 Regina Obe <lr@pcorp.us> + + * [r7428] Amend hard upgrade instructions to remove stuff that is + obsolete and add in additional steps needed for PostGIS 2.0. Also + update creating new spatial database to include instructions for + installing raster and topology support + +2011-06-19 00:31 Regina Obe <lr@pcorp.us> + + * [r7427] add index check / generation for soundex, lower, geometry + gist, and least_hn + +2011-06-18 22:16 Regina Obe <lr@pcorp.us> + + * [r7426] Fix for #1025 -- Geocoder Failing with NORTH EAST is + street name + +2011-06-18 18:24 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7425] Error message change + +2011-06-18 07:35 Regina Obe <lr@pcorp.us> + + * [r7424] hmm lets try that again + +2011-06-18 07:34 Regina Obe <lr@pcorp.us> + + * [r7423] backout some code didn't mean to commit + +2011-06-18 07:29 Regina Obe <lr@pcorp.us> + + * [r7422] Found some indexes I missed -- added to tiger_loader, + also #1036 create missing_indexes generation script to back + install. Still need to put in logic for some more indexes, but + htis is a good start. Also documented new function + +2011-06-18 06:03 Regina Obe <lr@pcorp.us> + + * [r7421] fix error in last commit + +2011-06-18 05:33 Regina Obe <lr@pcorp.us> + + * [r7420] get rid of unnecessary auto casting + +2011-06-18 05:15 Regina Obe <lr@pcorp.us> + + * [r7419] #1035 gluing on .0 is making least check always return 0. + +2011-06-18 03:41 Regina Obe <lr@pcorp.us> + + * [r7418] Change ST_Length, ST_Perimeter for geography to use + default parameters, document ST_Perimeter(geography,use_spheroid) + +2011-06-17 22:36 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7417] Quiet regression failure for minor rounding difference. + +2011-06-17 22:18 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7416] Bounding box calculation for straight CircString fails + (#668) + +2011-06-17 21:26 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7415] Retrieving and storing Geography column data through JDBC + does not work (#350) + +2011-06-17 21:11 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7414] Define alias ST_Perimeter (for geography ST_Length) + (#526) + +2011-06-17 20:33 Regina Obe <lr@pcorp.us> + + * [r7413] #1032 fix typos + +2011-06-17 20:14 Regina Obe <lr@pcorp.us> + + * [r7412] change geography to geometry and limit view to only + output tables and views + +2011-06-17 20:06 Bborie Park <bkpark at ucdavis.edu> + + * [r7411] fixed parameter passing in ST_AsTiff + +2011-06-17 15:16 Bborie Park <bkpark at ucdavis.edu> + + * [r7410] Refactored ST_SummaryStats so that there is a non-user + _ST_SummaryStats that is the backend of all ST_SummaryStats and + ST_ApproxSummary stats functions. This eliminates the + "sample_percent" parameter from the one ST_SummaryStats function + that had it. + +2011-06-16 21:01 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7409] Partial typmod support for PostGIS geometry (#944) + +2011-06-16 20:29 Regina Obe <lr@pcorp.us> + + * [r7408] Some cleanup. change ST_AsGDALRaster example using + spatial ref to agree with new syntax of just passing in the srid. + +2011-06-16 02:16 Regina Obe <lr@pcorp.us> + + * [r7404] put in missing tag + +2011-06-16 02:08 Regina Obe <lr@pcorp.us> + + * [r7403] document &&& nd interacts bounding box operator + +2011-06-15 23:59 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7402] Fix up selectivity and operators a little + +2011-06-15 20:22 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7401] Add a couple more GBOX functions to map to B2DF4 + requirements + +2011-06-15 15:43 Bborie Park <bkpark at ucdavis.edu> + + * [r7400] Changed band pixel types to 64BF instead of 32BF so that + the warning messages for data getting converted are mitigated. + +2011-06-15 14:29 Bborie Park <bkpark at ucdavis.edu> + + * [r7399] Added value for nBandCount attribute of GDALWarpOptions + in rt_raster_transform function. + + This is based upon the discussion found at: + + http://lists.osgeo.org/pipermail/gdal-dev/2011-May/028730.html + + Related ticket is #1015 + +2011-06-15 12:44 Regina Obe <lr@pcorp.us> + + * [r7398] #722 - get rid of transform and remainder of SnapToGrid + deprecated family of functions. Add to #945 uninstall_legacy and + also legacy.sql.in.c files + +2011-06-15 01:25 Regina Obe <lr@pcorp.us> + + * [r7397] Change ST_MapAlgebra to use default args and amend the + documentation to reflect change. In so doing fix #969 - + inconsistent order of args, #967 raster regress failures on 9.0 + and 9.1 + +2011-06-14 19:32 Bborie Park <bkpark at ucdavis.edu> + + * [r7396] Changed SRID to something within the range permitted by + GSERIALIZED. As of this revision, all raster regression tests + pass successfully. + +2011-06-14 16:21 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7395] bug in BOX2DFLOAT4_in function due to GSERIALIZED_ON + change (#1020) + +2011-06-14 16:04 Bborie Park <bkpark at ucdavis.edu> + + * [r7394] With GSERIALIZED_ON enabled, adapted code that needs + preprocessor conditions. Basically instead of "geometry_gist_sel" + and "geometry_gist_joinsel", GSERIALIZED_ON uses "contsel" and + "contjoinsel" + +2011-06-14 08:20 Sandro Santilli <strk@keybit.net> + + * [r7393] Do not explicitly name GIST opclass (was renamed). Fixes + topology after the GSERIALIZED switch. + +2011-06-14 08:20 Sandro Santilli <strk@keybit.net> + + * [r7392] Fix libiconv linker flags + +2011-06-14 04:26 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7391] Apply bug in BOX2DFLOAT4_in function due to + GSERIALIZED_ON change (#1020) from dustymugs + +2011-06-13 21:47 Bborie Park <bkpark at ucdavis.edu> + + * [r7390] Fixed memory leak in RASTER_asGDALRaster of rt_pg.c and + left note in comments of rt_raster_to_gdal + +2011-06-13 21:31 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7389] Move from GSERIALIZED off by default to on by default. + Adjust minor regression changes as necessary. + +2011-06-13 20:20 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7388] Allow cunit tests to build and run in OS/X + +2011-06-13 19:51 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7387] Add svn:ignores for some new derived files. + +2011-06-13 12:30 Regina Obe <lr@pcorp.us> + + * [r7386] update 1.5.3 release notes + +2011-06-13 11:25 Regina Obe <lr@pcorp.us> + + * [r7384] #609 revise JDBC to use non-deprecated calling syntax + +2011-06-13 01:32 Regina Obe <lr@pcorp.us> + + * [r7382] surpress outputting sql if not in debug mode + +2011-06-13 01:31 Regina Obe <lr@pcorp.us> + + * [r7381] change to return as much address as possible even if no + fullname at least try to return city, state, zip + +2011-06-12 14:33 Regina Obe <lr@pcorp.us> + + * [r7380] fix typo in reverse_geocode name and get rid of other + prot since changed to use default args + +2011-06-12 06:34 Regina Obe <lr@pcorp.us> + + * [r7379] fix division by zero issue + +2011-06-12 04:55 Regina Obe <lr@pcorp.us> + + * [r7378] make debug statement conditional + +2011-06-12 04:52 Regina Obe <lr@pcorp.us> + + * [r7377] significantly improve speed of reverse geocode (when all + states loaded), but using CTEs and unparameterizing query + (parameterized often does not use inheritance), reverse_geocode + to use default parameters, put in table column comments to + describe some of what loader columns mean. + +2011-06-11 19:26 Bborie Park <bkpark at ucdavis.edu> + + * [r7376] Added function parameter "header_only" to + rt_raster_deserialize. This instructs the function to only + extract the raster header. + + All functions calls to rt_raster_deserialize in rt_pg.c and + testwkb.c have been modified to account for the "header_only" + parameter. In addition, functions that can use + PG_DETOAST_DATUM_SLICE have been modified to use it. + + Associated tickets are #867 and #985. + + Now to work on valgrinding rt_pg.c + +2011-06-11 19:06 Bborie Park <bkpark at ucdavis.edu> + + * [r7375] Removed the ST_SummaryStats wrappers: ST_Sum, ST_Mean, + ST_Stddev, ST_MinMax. Only ST_Count is preserved as it has a + shortcut for when "exclude_nodata_value" is FALSE. + + Refactored regression test for rt_transform due to removal of + some ST_SummaryStats wrappers and make the tests no longer about + being exact to specific values but more about being in the + appropriate contexts. + + Associated ticket is #1005 and to some degree, #985. + +2011-06-11 13:41 Regina Obe <lr@pcorp.us> + + * [r7374] Sort what's new 2.0 by name of section insted of id since + raster ids start with RT_ they are being sorted at the top above + everything else which is confusing + +2011-06-11 05:27 Regina Obe <lr@pcorp.us> + + * [r7373] Fix ST_BandMetaData, ST_AsGDalRaster (they take defaults + now so prots have ben removed) + +2011-06-11 04:59 Bborie Park <bkpark at ucdavis.edu> + + * [r7372] Refactored rt_raster_replace_band in rt_api.c to return + the replaced band. + Additional memory cleanups in testapi.c due to segfault and + leaks. + +2011-06-11 01:09 Regina Obe <lr@pcorp.us> + + * [r7371] Note about issues with raster ST_Transform + +2011-06-11 00:43 Regina Obe <lr@pcorp.us> + + * [r7370] document raster ST_Transform function. Will provide + examples later. + +2011-06-11 00:05 Bborie Park <bkpark at ucdavis.edu> + + * [r7369] Fixed bunch of memory leaks in rt_api.c and testapi.c. + Will need to valgrind the regression tests to clean up the leaks + in rt_pg.c + +2011-06-10 23:19 Regina Obe <lr@pcorp.us> + + * [r7368] get rid of ST_SRSText usage is gone and replaced with + just srid so parallel with geometry. Update all the function doco + -- they used to use srstext, but now they use srid. + +2011-06-10 23:01 Bborie Park <bkpark at ucdavis.edu> + + * [r7367] Refactored how GDAL warp options are freed. I believe I + was prematurely freeing the options. + + Associated ticket #1015 + +2011-06-10 19:49 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r7366] Getting pixel value at out of range coordinate should + only return a warning. Was broken at r7106. Added a check. + +2011-06-10 18:18 Bborie Park <bkpark at ucdavis.edu> + + * [r7365] Fixed error messages. + +2011-06-10 18:14 Bborie Park <bkpark at ucdavis.edu> + + * [r7364] Explicitly set GDALWarpOptions element padfSrcNoDataImag + as it seems some folks are having regression error. Based upon + the GDAL code, explicitly setting padfSrcNoDataImag and + padfDstNoDataImag should eliminate the error message that is + occurring. + + Associated tickets are #925 and #1015. + +2011-06-10 17:24 Regina Obe <lr@pcorp.us> + + * [r7363] #609 jdbc error in documentation + +2011-06-10 17:00 Regina Obe <lr@pcorp.us> + + * [r7361] #666 -- strange I don't recall this being an issue on + PostGIS 2.0, but seems to be also. Still need regress test for it + though. + +2011-06-10 16:16 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7359] Update NZ projections for grid transformation support + (#631) + +2011-06-10 15:19 Bborie Park <bkpark at ucdavis.edu> + + * [r7357] Rewrote ST_BandMetaData to use a C function instead of + sequential calls for the metadata of a raster's band in plpgsql. + Also added regression tests for ST_MetaData and ST_BandMetaData + due to C functions. + + Associated ticket #1012 + +2011-06-10 05:13 Regina Obe <lr@pcorp.us> + + * [r7356] more description on reclass expressions + +2011-06-10 01:52 Regina Obe <lr@pcorp.us> + + * [r7354] more examples for ST_Point and example converting to + geography + +2011-06-09 21:27 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7353] Minor change to work with gserialzed + +2011-06-09 21:15 Bborie Park <bkpark at ucdavis.edu> + + * [r7352] Rewrote ST_Metadata to make use of a C function instead + of sequential calls for the metadata of a raster in plpgsql. + + Associated ticket #1012 + +2011-06-09 21:12 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7351] Remove some compile warnings + +2011-06-09 21:12 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7350] Add some ignores + +2011-06-09 20:51 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7349] Bad handling of Inf values in GEOS (#1013) + +2011-06-09 20:32 Regina Obe <lr@pcorp.us> + + * [r7348] #448 add CUnit requirement for testing + +2011-06-09 18:55 Bborie Park <bkpark at ucdavis.edu> + + * [r7346] Replaced the parameter "srs" in ST_AsGDALRaster with + "srid" so as to match that of ST_Transform and other functions + that deals with spatial reference systems. In doing so, this + eliminates the user function ST_srtext and just has a hidden + _ST_srtext function for use by the underlying C functions. + Another nice benefit is that I was able to reduce the number of + user-facing functions. + + Associated ticket #1011 + +2011-06-09 16:01 Regina Obe <lr@pcorp.us> + + * [r7345] #1009 typo in index creation + +2011-06-08 22:47 Bborie Park <bkpark at ucdavis.edu> + + * [r7343] - added additional tests that shouldn't require datum + shift files for proj.4. + - refactored output that would be double precision to be rounded + +2011-06-08 21:10 Bborie Park <bkpark at ucdavis.edu> + + * [r7342] Rewrote how the standard/sample deviation is computed in + ST_SummaryStats for coverage tables. It now extends the existing + use of a single-pass standard deviation calculation to be able to + do the calculation for a coverage table. + + Associated ticket #985. + +2011-06-08 00:10 Bborie Park <bkpark at ucdavis.edu> + + * [r7341] forgot to comment out debug code for ST_Histogram thus + causing rt_histogram regression to fail + +2011-06-08 00:00 Bborie Park <bkpark at ucdavis.edu> + + * [r7340] fixed ST_SummaryStats for coverage tables where the sum + of all tiles was not being computed. + Associated ticket #1005 + + Also added shortcuts to ST_Count for when parameter + "exclude_nodata_value" is FALSE, just compute the count based + upon the raster's dimensions. Performance difference between the + normal route and the shortcut is negligible for small rasters but + noticable when run on large rasters and coverage tables + +2011-06-07 22:59 Bborie Park <bkpark at ucdavis.edu> + + * [r7339] Added support for coverage tables to ST_Histogram. This + entailed adding the ability to explicitly specify the min and max + values in the underlying C function rt_band_get_histogram. The + min and max parameters should ONLY be used by the established + coverage table handling ST_Histogram functions as the returned + percent element of the histogram type is changed from returning + the percentage to returning the sum of counts for that histogram. + + Associated ticket is #934. + +2011-06-07 18:21 Bborie Park <bkpark at ucdavis.edu> + + * [r7338] Add ST_Transform function that achieves the primary + purpose of reprojecting a raster to a new projection system. This + makes use of the GDAL Warp API function + GDALAutoCreateWarpedVRT(). In the future, the underlying C + function is expected to be refactored to support skewing and + pixel scaling at the same time the raster is reprojected. + + Really minor changes to rt_pg/rt_pg.c adding initilization values + to variables for eliminating compile warnings in Windows (thanks + Pierre). + + Fixed variable "status" in rt_raster_from_gdal_dataset() of + rt_core/rt_api.c + + Associated ticket is #925 + +2011-06-07 13:04 Regina Obe <lr@pcorp.us> + + * [r7336] Put legacy.sql in varname tag so prints out as courier + and stands out more. Some clarification on the geography/geometry + choice question + +2011-06-07 12:37 Regina Obe <lr@pcorp.us> + + * [r7335] more corrections of erroneous statements + +2011-06-07 12:16 Regina Obe <lr@pcorp.us> + + * [r7334] Fix minor formatting issues + +2011-06-07 07:45 Regina Obe <lr@pcorp.us> + + * [r7333] forgot output column in histogram type + +2011-06-07 07:41 Regina Obe <lr@pcorp.us> + + * [r7332] more correction in ST_Histogram explanation + +2011-06-07 07:26 Regina Obe <lr@pcorp.us> + + * [r7331] make description of programming match what is going on in + histogram example + +2011-06-07 07:24 Regina Obe <lr@pcorp.us> + + * [r7330] missing one proto for ST_Histogram + +2011-06-07 07:20 Regina Obe <lr@pcorp.us> + + * [r7329] add description ST_Histogram inputs + +2011-06-07 07:10 Regina Obe <lr@pcorp.us> + + * [r7328] document histogram type + +2011-06-07 07:02 Regina Obe <lr@pcorp.us> + + * [r7327] document ST_Histogram + +2011-06-05 21:49 Bborie Park <bkpark at ucdavis.edu> + + * [r7326] bug fix of r7325 where the wrong variable is used in the + "for" loop at line 5442 + +2011-06-05 20:52 Bborie Park <bkpark at ucdavis.edu> + + * [r7325] - added additional function parameters "bandNums" and + "count" to rt_raster_to_gdal_mem so that the GDAL dataset created + only contains those bands specified + - any calls to rt_raster_to_gdal_mem function was refactored for + the new function parameters + - refactored rt_raster_dump_as_wktpolygons to make use of + rt_raster_to_gdal_mem so as to reduce duplicate code and improve + cleanliness + +2011-06-05 07:55 Regina Obe <lr@pcorp.us> + + * [r7324] fix ambiguous column issue now that new zcta5 also has + statefp + +2011-06-05 07:35 Regina Obe <lr@pcorp.us> + + * [r7323] more speed optimizations + +2011-06-05 07:07 Regina Obe <lr@pcorp.us> + + * [r7322] revise function s so lookup zip utilizes constraint + exclusion + +2011-06-05 06:13 Regina Obe <lr@pcorp.us> + + * [r7321] #1004: census has finally released zcta5 for 2010. Get + rid of zcta500 table. replace with a more generic named zcta5. + Revise loader state script to load in zcta510 data and revise + functions to use new zcta5 table. + +2011-06-04 02:11 Regina Obe <lr@pcorp.us> + + * [r7320] Fix more erroneous statements about ST_Reclass + +2011-06-04 00:59 Regina Obe <lr@pcorp.us> + + * [r7319] get rid of TODO note on ST_REclass exmaple -- I already + did it. + +2011-06-04 00:58 Regina Obe <lr@pcorp.us> + + * [r7318] huh more mistakes in ST_Reclass + +2011-06-03 17:02 Bborie Park <bkpark at ucdavis.edu> + + * [r7317] Added rt_raster_from_gdal_dataset function to + rt_core/rt_api.c. This function provides the functionality needed + to convert a GDAL dataset into a PostGIS Raster object. + +2011-06-03 15:19 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r7316] Check for new GDALFPolygonize function. If it isn't + present, the old GDALPolygonize is called. Related ticket #650. + +2011-06-03 06:00 Regina Obe <lr@pcorp.us> + + * [r7315] add missing ST_ValueCount protos, get rid of ' around , + causing comment installation to fail. + +2011-06-02 22:51 Regina Obe <lr@pcorp.us> + + * [r7314] fix wording of reclassarg and summarystats + +2011-06-02 22:25 Regina Obe <lr@pcorp.us> + + * [r7313] Fix typo + +2011-06-02 21:54 Regina Obe <lr@pcorp.us> + + * [r7312] document ST_Band + +2011-06-02 21:27 Regina Obe <lr@pcorp.us> + + * [r7311] get rid of extra paragraph marks + +2011-06-02 21:13 Regina Obe <lr@pcorp.us> + + * [r7310] example how to use variadic version of ST_Reclass raster + function, finish off reclassarg type description, add + summarystats type + +2011-06-02 05:05 Regina Obe <lr@pcorp.us> + + * [r7309] Clarify GDAL version requirements for Mapserver to load + PostGIS raster + +2011-06-01 23:50 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r7308] Fixed ticket #650. You need to update your GDAL copy to a + release up to 22476 to make it work. + +2011-06-01 12:31 Sandro Santilli <strk@keybit.net> + + * [r7307] The box2d of an empty geometry is NULL, not a point. + Closes ticket #938 and regress-tests it. + +2011-06-01 11:55 Regina Obe <lr@pcorp.us> + + * [r7306] put a space after parameter name to try to prevent + getting shoved in with type in reclassarg type def + +2011-06-01 08:22 Regina Obe <lr@pcorp.us> + + * [r7305] st_recalss -- hmm screwed up on example. Had overlapping + ranges before. + +2011-06-01 08:17 Regina Obe <lr@pcorp.us> + + * [r7304] move raster types to raster section (there are way too + many now to try to lump into reference_type and do case + statements to exclude from postgis_comments). Revise + raster_comments to look for types in reference_raster. Add docu + for ST_Reclass and reclassarg type. Need at least one more + example to show how to use recalssargs. + +2011-05-31 22:54 Bborie Park <bkpark at ucdavis.edu> + + * [r7303] additional code refactoring in rt_raster_from_band + +2011-05-31 22:47 Bborie Park <bkpark at ucdavis.edu> + + * [r7302] code refactored and added copying of raster attributes to + new raster in rt_raster_from_band + +2011-05-31 01:50 Regina Obe <lr@pcorp.us> + + * [r7301] #960 get rid of obsolete ST_AsPNG protos to make + consistent with implementation + +2011-05-31 01:39 Regina Obe <lr@pcorp.us> + + * [r7300] #960 get rid of ST_AsGDALRaster proto and update + remaining to be consistent with new default args. + +2011-05-31 01:29 Regina Obe <lr@pcorp.us> + + * [r7299] #961- reduce number of functions - Get rid of + st_area(geography) and change st_area(geography, use_spheroid = + true) and also have named argument names so callable by named + args + +2011-05-31 01:09 Regina Obe <lr@pcorp.us> + + * [r7298] document missing proto for createtopology + +2011-05-31 00:54 Regina Obe <lr@pcorp.us> + + * [r7297] Document ST_SummaryStats raster function + +2011-05-30 20:18 Bborie Park <bkpark at ucdavis.edu> + + * [r7296] Added default values for function parameters of + ST_AsTIFF, ST_AsJPEG and ST_AsPNG. + + Associated ticket is #960 + +2011-05-30 15:48 Bborie Park <bkpark at ucdavis.edu> + + * [r7295] Added default parameter for ST_AsGDALRaster + + Associated ticket is #960 + +2011-05-30 14:53 Bborie Park <bkpark at ucdavis.edu> + + * [r7294] renamed all instances of "hasnodata" function argument to + "exclude_nodata_value" in SQL functions (and underlying code + where appropriate) ST_SummaryStats, ST_Count, ST_Sum, ST_Mean, + ST_StdDev, ST_MinMax, ST_Quantile, ST_Histogram, ST_ValueCount + and ST_ValuePercent + +2011-05-30 09:45 Regina Obe <lr@pcorp.us> + + * [r7293] get rid of bash line -- seems unnecessary and breaks if + multiple states. Forgot cd which was making secondary states fail + loading. + +2011-05-30 08:28 Regina Obe <lr@pcorp.us> + + * [r7292] + +2011-05-30 08:27 Regina Obe <lr@pcorp.us> + + * [r7291] more corrections and one more example for ST_ValueCount + +2011-05-30 07:39 Regina Obe <lr@pcorp.us> + + * [r7290] fix errors in notes + +2011-05-30 03:57 Regina Obe <lr@pcorp.us> + + * [r7289] fill in more missing protos for st_valuecount -- still + more to go + +2011-05-30 03:43 Regina Obe <lr@pcorp.us> + + * [r7288] put in missing protos for st_quantile. Revise comment + generator scripts to properly handle OUT parameters + +2011-05-30 02:52 Regina Obe <lr@pcorp.us> + + * [r7287] document ST_quantile -- still missing some protos (also + get rid of obsolete warnings) + +2011-05-30 01:56 Regina Obe <lr@pcorp.us> + + * [r7286] reference to st_valuecount in st_dumpaspixels + +2011-05-30 01:51 Regina Obe <lr@pcorp.us> + + * [r7285] Move Bborie's new cool stat functions into their own + section. Add documentation for st_valuecount -- more coming for + other raster functions. macro replace hasnodata with + exclude_nodata_value which hopefully will be clearer to everyone. + The raster codebase needs to be changed to agree with new names + (mostly for those utilizing named arguments in PostgreSQL 9.0+). + In enhnced section --put a note that hasnodata was renamed to + exclude_nodata_value. + +2011-05-30 00:30 Regina Obe <lr@pcorp.us> + + * [r7284] add remarked out line to set search path -- suggested by + Brian Hamlin. Also some other minor changes + +2011-05-28 23:32 Regina Obe <lr@pcorp.us> + + * [r7283] Get rid of deprecated call to centroid + +2011-05-28 15:07 Regina Obe <lr@pcorp.us> + + * [r7282] fix for #996 also had to revise least and greatest helper + functions to deal with to and froms that can't be converted to + integers. Also added missing indexes to base tables (helps the + planner with inherited tables though it never really uses those + indexes) + +2011-05-28 13:29 Regina Obe <lr@pcorp.us> + + * [r7281] fill in some missing licensing headers and svn tags + +2011-05-28 11:46 Sandro Santilli <strk@keybit.net> + + * [r7280] It's "spatialreference.org", not "spatialreferencing.org" + (srid=900913) + +2011-05-28 11:24 Regina Obe <lr@pcorp.us> + + * [r7279] revise readme wording so those unix users who aren't on + linux won't be quite as offended + +2011-05-28 11:18 Regina Obe <lr@pcorp.us> + + * [r7278] fix for #995 handling lower level fips. Also many fixes + for #908 sh tiger loader profile. Testing now and will close out + if confirmed its fixed. Also put in a note in the .sh and .bat + that for PostgreSQL 9.1+ have to install fuzzystrmatch with the + CREATE EXTENSION syntax + +2011-05-27 23:35 Bborie Park <bkpark at ucdavis.edu> + + * [r7277] - remove OUT parameters on those functions that only + return a single value. + - updated regression tests that made use of those functions + returning single values with OUT parameters + +2011-05-27 14:42 Bborie Park <bkpark at ucdavis.edu> + + * [r7276] Added default values for function arguments of ST_Reclass + +2011-05-27 14:01 Sandro Santilli <strk@keybit.net> + + * [r7275] ST_AddEdgeModFace is complete... + +2011-05-27 14:01 Sandro Santilli <strk@keybit.net> + + * [r7274] Document ST_AddEdgeModFace, tweak documentation of + ST_AddEdgeNewFaces [RT-SIGTA] + +2011-05-27 14:01 Sandro Santilli <strk@keybit.net> + + * [r7273] Implement topology.ST_AddEdgeModFace. Includes regress + test. [RT-SIGTA] + +2011-05-27 12:15 Regina Obe <lr@pcorp.us> + + * [r7272] fix indentation + +2011-05-27 10:18 Sandro Santilli <strk@keybit.net> + + * [r7271] Simplify face registration by the end of + ST_AddEdgeNewFaces [RT-SIGTA] + +2011-05-27 09:51 Sandro Santilli <strk@keybit.net> + + * [r7270] ST_AddEdgeNewFaces: another test splitting a face with + holes on both sides [RT-SIGTA]. + +2011-05-27 09:34 Sandro Santilli <strk@keybit.net> + + * [r7269] topology.ST_AddEdgeNewFaces: do not needlessly replace + face of holes found in a face splitted by the newly added edge. + Regress test it. [RT-SIGTA]. + +2011-05-27 08:34 Sandro Santilli <strk@keybit.net> + + * [r7268] Add an optional force_new parameter to + topology.ST_AddFace to force creation of a new face when one + already exists. Regress test and document. [RT-SIGTA] + +2011-05-27 08:34 Sandro Santilli <strk@keybit.net> + + * [r7267] fix cpp extra token warning + +2011-05-27 07:13 Regina Obe <lr@pcorp.us> + + * [r7266] change ST_ConcaveHull to use default parameters + +2011-05-27 06:46 Regina Obe <lr@pcorp.us> + + * [r7265] preliminary documentation for ST_Count + +2011-05-27 00:02 Bborie Park <bkpark at ucdavis.edu> + + * [r7264] - Added default values for function parameters of + ST_ValueCount and ST_ValuePercent. Removed duplicative functions + of the same. + - Tweaked the regression tests for ST_ValueCount and + ST_ValuePercent as one question for each function type was too + ambiguous. + +2011-05-26 23:32 Bborie Park <bkpark at ucdavis.edu> + + * [r7263] Added default parameter values for ST_Quantile functions + +2011-05-26 23:11 Bborie Park <bkpark at ucdavis.edu> + + * [r7262] Added default values for function parameters of + ST_Histogram and removed duplicative functions. + +2011-05-26 22:50 Bborie Park <bkpark at ucdavis.edu> + + * [r7261] Forgot to delete the commented out functions of + ST_SummaryStats and dependants from r7260 + +2011-05-26 22:40 Bborie Park <bkpark at ucdavis.edu> + + * [r7260] Added default values for function parameters of + ST_SummaryStats, ST_Count, ST_Sum, ST_Mean, ST_StdDev and + ST_MinMax. + +2011-05-26 21:35 Bborie Park <bkpark at ucdavis.edu> + + * [r7259] Added default parameter for ST_Band and reduced function + count by 1. + + Added additional regression tests for ST_Band. + +2011-05-26 21:23 Bborie Park <bkpark at ucdavis.edu> + + * [r7258] Changed to STABLE from IMMUTABLE for all functions that + operate on a coverage using the function parameters "rastertable" + and "rastercolumn" + +2011-05-26 20:09 Bborie Park <bkpark at ucdavis.edu> + + * [r7257] changed name "proportion" to "percent" for ST_Histogram + to stay consistent with ST_ValuePercent + +2011-05-26 20:04 Bborie Park <bkpark at ucdavis.edu> + + * [r7256] Addition of ST_ValuePercent, sibling of ST_ValueCount. + This function provides the ability to determine the percentage of + a raster's band that is of a user-specified value. + + Assocated ticket is #990 + + Also specified STRICT for functions with "searchvalue" (the + singular) argument. + +2011-05-26 15:43 Bborie Park <bkpark at ucdavis.edu> + + * [r7255] Changed the datatype for "count" from integer to bigint. + This should allow the "count" return value to handle large + numbers coming from the various coverage functions. + +2011-05-26 14:01 Regina Obe <lr@pcorp.us> + + * [r7254] #949 Add all E and F deprecated functions to + uninstall_legacy.sql.in.c and minor sorting and casing cleanup. + +2011-05-26 07:26 Sandro Santilli <strk@keybit.net> + + * [r7253] Error handling refinements in topology.ST_AddEdgeNewFaces + (#988) + + Check for given edge having two distinct vertices before getting + a new + edge id from sequence, and before testing it for crossing nodes + (or it'd + give a confusing error message). Refine error message about + no-segment + edges to not talk about nodes. [RT-SIGTA] + +2011-05-26 04:23 Bborie Park <bkpark at ucdavis.edu> + + * [r7252] Adds ST_ValueCount to count the number of times a + user-provided value or all values occurs in a raster's band. + + Associated ticket is #953 + +2011-05-25 23:38 Regina Obe <lr@pcorp.us> + + * [r7251] + +2011-05-25 23:37 Regina Obe <lr@pcorp.us> + + * [r7250] put header on table + +2011-05-25 21:09 Regina Obe <lr@pcorp.us> + + * [r7249] try group + +2011-05-25 18:42 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7248] #661 Type info of geography columns incomplete - pg_dump + output wrong + +2011-05-25 18:28 Bborie Park <bkpark at ucdavis.edu> + + * [r7246] Add ST_Count and ST_Sum functions that are fronts for the + count and sum values of ST_SummaryStats + + Associated tickets are #985 (ST_Count) and #986 (ST_Sum) + +2011-05-25 13:13 Regina Obe <lr@pcorp.us> + + * [r7245] + +2011-05-25 12:49 Regina Obe <lr@pcorp.us> + + * [r7244] + +2011-05-25 12:48 Regina Obe <lr@pcorp.us> + + * [r7243] + +2011-05-25 12:35 Regina Obe <lr@pcorp.us> + + * [r7242] + +2011-05-25 12:29 Regina Obe <lr@pcorp.us> + + * [r7241] revert + +2011-05-25 12:13 Regina Obe <lr@pcorp.us> + + * [r7240] define style for methodsynopsis + +2011-05-24 18:53 Regina Obe <lr@pcorp.us> + + * [r7239] missed a spot + +2011-05-24 18:50 Regina Obe <lr@pcorp.us> + + * [r7238] experiment with methodsynopsis evidentally seems to + support default parameters and conditional args, we need to move + from funcsynopsis (designed for C) to methodsynopsis. This is + what PHP uses -- + https://doc.php.net/php/dochowto/chapter-skeletons.php + +2011-05-24 15:21 Sandro Santilli <strk@keybit.net> + + * [r7237] Stop using astext legacy function in raster tests -- make + check finally succeeds with both raster and topology enabled + +2011-05-24 14:47 Sandro Santilli <strk@keybit.net> + + * [r7236] Allow dumping universal face edges with ST_GetFaceEdges. + Do it in the correct order. Fixes bug #984. [RT-SIGTA] + +2011-05-24 14:27 Bborie Park <bkpark at ucdavis.edu> + + * [r7235] - Added test testgdalraster.in which properly tests the + output of ST_AsGDALRaster. This test makes use of rtgdalraster.py + found in raster/scripts/python, which itself requires psycopg2. + - Refactored rt_asgdalraster.sql, rt_astiff.sql, rt_asjpeg.sql + and rt_aspng.sql to no longer attempt to validate the output of + the respective functions with an MD5 checksum but rather be a + test of the functions' behaviors. + +2011-05-24 13:49 Sandro Santilli <strk@keybit.net> + + * [r7234] ST_GetFaceGeometry: throw SQL/MM exception when asked for + the Universal Face geometry. Fixes bug #973 [RT-SIGTA] + +2011-05-24 13:47 Sandro Santilli <strk@keybit.net> + + * [r7233] topology.ValidateTopology: do not construct the geometry + of universal face, it's not used anyway. Closes bug #977. + [RT-SIGTA] + +2011-05-24 13:15 Sandro Santilli <strk@keybit.net> + + * [r7232] ST_AddEdgeNewFaces: don't get fooled by empty segments + when computing azimuts [RT-SIGTA] + +2011-05-24 12:14 Sandro Santilli <strk@keybit.net> + + * [r7231] Fix a bogus test for ST_AddEdgeNewFaces (was missing to + check informations about the newly added edge) -- [RT-SIGTA] + +2011-05-24 10:45 Sandro Santilli <strk@keybit.net> + + * [r7230] Add another (successful) test for ST_AddEdgeNewFaces when + creating a new face in the universal face by closing a ring + around an existing non-isolated edge [RT-SIGTA]. + +2011-05-24 09:22 Sandro Santilli <strk@keybit.net> + + * [r7229] Add TODO item and SQL/MM compatibility note in + ST_ChangeEdgeGeom + +2011-05-24 09:13 Sandro Santilli <strk@keybit.net> + + * [r7228] Test ST_ChangeEdgeGeom with edge crossing + +2011-05-24 08:45 Sandro Santilli <strk@keybit.net> + + * [r7227] ST_ChangeEdgeGeom: check existence of given edge, reduce + scans used to check start/end point and simplify the code, + regress test the fix. Fixes bug #979. + +2011-05-24 08:22 Sandro Santilli <strk@keybit.net> + + * [r7226] No functional change: tabs to 2 spaces. + +2011-05-24 08:13 Sandro Santilli <strk@keybit.net> + + * [r7225] Move tests for ST_ChangeEdgeGeom into a dedicated file. + Prepared for ticket #979. [RT-SIGTA]. + +2011-05-24 07:54 Sandro Santilli <strk@keybit.net> + + * [r7224] Test ST_GetFaceGeometry behavior when given face_id 0 + (Universal Face). See ticket #973. + +2011-05-24 07:04 Sandro Santilli <strk@keybit.net> + + * [r7223] ST_AddIsoEdge: tell that a node is isolated by only + looking at containing_face rather than recomputing it. Closes + ticket #978. [RT-SIGTA] + +2011-05-24 06:55 Sandro Santilli <strk@keybit.net> + + * [r7222] Do not let ST_AddIsoNode add non-isolated nodes. Allow + specifying 0 as the isolated node face and check it is correct. + If containing_face is given as null then compute it. Patch by + Andrea Peri. [RT-SIGTA] + +2011-05-24 06:44 Regina Obe <lr@pcorp.us> + + * [r7221] Fix for #981 - using astext legacy function in tests + +2011-05-24 06:43 Regina Obe <lr@pcorp.us> + + * [r7220] fix typos + +2011-05-24 05:48 Regina Obe <lr@pcorp.us> + + * [r7219] #722 remove Centroid and Dump, #949 more additons to + uninstall (Centroid, Dump, addbbox,dropbbox) + +2011-05-24 05:19 Regina Obe <lr@pcorp.us> + + * [r7218] fix link error + +2011-05-24 05:05 Regina Obe <lr@pcorp.us> + + * [r7217] #722 remove AsBinary and AsText, #949 more additons to + uninstall (AsText,Asbinary, other output functions) + +2011-05-24 03:03 Regina Obe <lr@pcorp.us> + + * [r7216] Document ST_ChangeEdgeGeom, revise function to confirm to + new plpgsql coding standard. Get rid of redundant && check since + its already encapsulated in ST_Intersects and ST_Within + +2011-05-23 13:30 Sandro Santilli <strk@keybit.net> + + * [r7215] update the list of what's implemented and what not + +2011-05-23 13:30 Sandro Santilli <strk@keybit.net> + + * [r7214] Style-only change: tab to spaces in ST_AddIsoEdge, + shorten name of test topology + +2011-05-23 13:13 Sandro Santilli <strk@keybit.net> + + * [r7213] Fix test for ST_AddIsoEdge verifying "geometry intersects + an edge" exception. Fix exception message raised when attempting + to insert a closed edge. Update regress test accoringly. + +2011-05-23 12:49 Sandro Santilli <strk@keybit.net> + + * [r7212] ST_AddIsoEdge: set containing_face of nodes connected by + the newly added edge to null as the nodes are not isolated + anymore. Regress test it. Closes ticket #976. + +2011-05-23 12:33 Sandro Santilli <strk@keybit.net> + + * [r7211] Put tests for ST_AddIsoEdge in their own file. Fix use of + ! rather than "not" for negating booleans in pl/pgsql. + +2011-05-23 11:30 Sandro Santilli <strk@keybit.net> + + * [r7210] Update load_topology.sql to properly set MBR field of + faces. + +2011-05-23 11:28 Sandro Santilli <strk@keybit.net> + + * [r7209] And fix expected test output from st_addedgenewfaces + (dunno how I could commit such a partial change...) + +2011-05-23 11:26 Sandro Santilli <strk@keybit.net> + + * [r7208] Oops, forgot to uncomment temporarely disabled lines + +2011-05-23 08:44 Sandro Santilli <strk@keybit.net> + + * [r7207] Test that topology.ST_AddEdgeNewFaces properly updates + isolated edges contained in a newly created face [RT-SIGTA] + +2011-05-22 16:06 Bborie Park <bkpark at ucdavis.edu> + + * [r7206] - fixed band count check in st_asjpeg and st_aspng + - fixed regression expected output for rt_aspng + +2011-05-22 06:33 Regina Obe <lr@pcorp.us> + + * [r7205] Start work on #949 uninstall_legacy.sql and also some + minor cleanup additions/sorting fo existing + +2011-05-20 20:18 Regina Obe <lr@pcorp.us> + + * [r7204] treating as executable didn't help - going to reinit my + db as utf-8 instead + +2011-05-20 13:48 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r7202] Commented line that caused memory crash because an + invalid free. Related ticket #958. + +2011-05-19 20:36 Sandro Santilli <strk@keybit.net> + + * [r7201] topology.AddEdge: make edge linking self-consistent (each + added edge will form a proper loop) + +2011-05-19 04:54 Regina Obe <lr@pcorp.us> + + * [r7200] fix typo + +2011-05-19 04:53 Regina Obe <lr@pcorp.us> + + * [r7199] support for 2D points, add multipoint 2d / 3d to cunit. + Add a mapping table to documentation to clarify how we map + PostGIS geometries to X3D equivalent. + +2011-05-19 04:04 Regina Obe <lr@pcorp.us> + + * [r7198] clean up some compiler warnings + +2011-05-18 23:33 Bborie Park <bkpark at ucdavis.edu> + + * [r7196] - taking a suggestion from strk in #958, all regression + tests for functions related to ST_SummaryStats has been rounded + to 3 decimal places + - added additional argument checks for pgraster to rt_pg.c + - changed floating point comparisons in rt_pg.c and rt_api.c + +2011-05-18 16:18 Sandro Santilli <strk@keybit.net> + + * [r7195] ST_AddEdgeNewFaces is now implemented.. + +2011-05-18 16:08 Sandro Santilli <strk@keybit.net> + + * [r7194] topology.ST_AddEdgeNewFaces implementation and regression + test [RT-SIGTA] + +2011-05-18 14:18 Bborie Park <bkpark at ucdavis.edu> + + * [r7193] ST_SummaryStats returns the sum as part of the summary + stats. + _ST_SummaryStats(rastertable, rastercolumn) function changed to + make use of the sum and compute a straight mean (sum / count) + rather than computing a weighted mean. + +2011-05-18 13:59 Sandro Santilli <strk@keybit.net> + + * [r7192] topology.AddFace(): properly update left/right face for + edges _contained_ in the newly registered face and + containing_face for isolated nodes in it, refine documentation + about it [RT-SIGTA] + +2011-05-18 13:32 Regina Obe <lr@pcorp.us> + + * [r7191] damn mathml you mock me! anyrate put in defaults as + Pierre asked for ST_ASTiff (hope www... fixes their damn mathml). + We really got to stop downloading that file. + +2011-05-18 12:55 Regina Obe <lr@pcorp.us> + + * [r7190] define ST_SRText and backref + +2011-05-18 12:41 Regina Obe <lr@pcorp.us> + + * [r7189] fix ST_ASTIFF incorrect types start putting in defaults + +2011-05-18 12:05 Regina Obe <lr@pcorp.us> + + * [r7188] let me try to put the opt somewhere else. + +2011-05-18 11:12 Regina Obe <lr@pcorp.us> + + * [r7187] more mistakes + +2011-05-18 11:08 Regina Obe <lr@pcorp.us> + + * [r7186] fix some incorrect statements + +2011-05-18 08:58 Sandro Santilli <strk@keybit.net> + + * [r7185] topology.GetRingEdges() implementation and test. This is + the first real user of next_left_edge/next_right_edge fields in + the edge table. [RT-SIGTA] + +2011-05-18 07:23 Sandro Santilli <strk@keybit.net> + + * [r7184] Add a short paragraph about the semantic of edge's + next_left_edge and next_right_edge fields. + +2011-05-18 07:15 Regina Obe <lr@pcorp.us> + + * [r7183] Fix ST_AsTiff function proto typos + +2011-05-18 05:43 Regina Obe <lr@pcorp.us> + + * [r7182] Document ST_AsTIFF and fix some missttatements about + ST_ASPNG. Also pretend like we are using default args already + +2011-05-18 05:08 Regina Obe <lr@pcorp.us> + + * [r7181] get rid of opt + +2011-05-18 04:43 Regina Obe <lr@pcorp.us> + + * [r7180] bah just use brackets for optional args -- docbook seems + to be ignoring the choice='opt' tag + +2011-05-18 04:13 Regina Obe <lr@pcorp.us> + + * [r7179] try to get optional argument to have brackets using + optional tag + +2011-05-18 00:00 Regina Obe <lr@pcorp.us> + + * [r7178] revise to put optional arguments in [] in the + description. Damn dtd keeps downloading + +2011-05-17 22:50 Regina Obe <lr@pcorp.us> + + * [r7177] Nothing like experimenting with myself. Change ST_AsX3D + to use default parameters and reduce down to one proto + +2011-05-17 19:35 Sandro Santilli <strk@keybit.net> + + * [r7176] Appropriately tag GML functions as STABLE, IMMUTABLE or + VOLATILE - see bug #955 + +2011-05-17 17:51 Regina Obe <lr@pcorp.us> + + * [r7175] more back ref + +2011-05-17 17:45 Regina Obe <lr@pcorp.us> + + * [r7174] fix typos add backrefere to ST_GDALDrivers + +2011-05-17 15:58 Sandro Santilli <strk@keybit.net> + + * [r7173] Strip 'SELECT' feedback from regression test outputs + +2011-05-17 15:27 Bborie Park <bkpark at ucdavis.edu> + + * [r7172] changed the dimensions of the raster generated for the + summary stats test from 10000 x 10000 to 100 x 100 + +2011-05-17 15:01 Bborie Park <bkpark at ucdavis.edu> + + * [r7171] Code cleanup of uncorrected statement from r7170 + Associated ticket is #954 + +2011-05-17 14:46 Bborie Park <bkpark at ucdavis.edu> + + * [r7170] refactored code that attempted to modify a function + parameter as PostgreSQL 8.4 sets all function parameters as + CONSTANT, unlike PostgreSQL 9.0 + +2011-05-17 14:42 Sandro Santilli <strk@keybit.net> + + * [r7169] Tag some functions as STABLE or even IMMUTABLE (from + volatile) - see bug #955 + +2011-05-17 14:04 Bborie Park <bkpark at ucdavis.edu> + + * [r7168] refactored usage of snprintf to use explicit string sizes + rather than what is a gcc specific implementation where the + return value of snprintf is the ideal size of the string + +2011-05-17 07:33 Sandro Santilli <strk@keybit.net> + + * [r7167] Fixed bug in sample topology load (face id sequence + value) [RT-SIGTA] + +2011-05-17 06:34 Regina Obe <lr@pcorp.us> + + * [r7166] revise to correctly comment functions with OUT parameters + +2011-05-17 05:37 Regina Obe <lr@pcorp.us> + + * [r7165] fix typo + +2011-05-17 03:02 Regina Obe <lr@pcorp.us> + + * [r7164] document ST_GDALDrivers and back reference to + ST_AsGDALRaster + +2011-05-17 02:06 Regina Obe <lr@pcorp.us> + + * [r7163] Document ST_AsGDALRaster + +2011-05-17 00:55 Regina Obe <lr@pcorp.us> + + * [r7162] forgot availability and GDAL dependency note on ST_AsPNG + +2011-05-17 00:40 Regina Obe <lr@pcorp.us> + + * [r7161] First draft of ST_ASPNG doco. Need some more examples and + perhaps even pictures. + +2011-05-16 22:01 Bborie Park <bkpark at ucdavis.edu> + + * [r7160] - fixed usage of function parameter "hasnodata" to follow + standardized interpretation + - added copyright notices for work done by Bborie Park funded + through the Regents of the University of California + +2011-05-16 19:56 Bborie Park <bkpark at ucdavis.edu> + + * [r7159] removed duplicative ST_Histogram function + +2011-05-16 19:54 Bborie Park <bkpark at ucdavis.edu> + + * [r7158] Add ST_AsPNG + + - added SQL functions for ST_AsPNG + - added regression tests + + Associated ticket is #342 + +2011-05-16 19:52 Bborie Park <bkpark at ucdavis.edu> + + * [r7157] Add ST_AsJPEG function + + - added SQL functions for ST_AsJPEG + - added regression tests + + Associated ticket is #340 + +2011-05-16 19:50 Bborie Park <bkpark at ucdavis.edu> + + * [r7156] Add ST_AsTIFF function + + - add SQL functions for ST_AsTIFF + - add regression tests + + Associated ticket is #341 + +2011-05-16 19:48 Bborie Park <bkpark at ucdavis.edu> + + * [r7155] Add ST_AsGDALRaster function and helper functions + ST_GDALDrivers and ST_srtext + - added rt_raster_to_gdal, rt_raster_gdal_drivers and + rt_raster_to_gdal_mem functions to rt_core/rt_api.c and rt_api.h + - added test cases to test/core/testapi.c + - added RASTER_asGDALRaster and RASTER_getGDALDrivers to + rt_pg/rt_pg.c + - added SQL functions + - added regression tests + + Associated ticket is #901 + +2011-05-16 19:43 Bborie Park <bkpark at ucdavis.edu> + + * [r7154] Added ST_Reclass function + + - added rt_band_reclass and rt_raster_replace_band to + rt_core/rt_api.c and rt_api.h + - added test case to test/core/testapi.c + - added RASTER_reclass to rt_pg/rt_pg.c + - added SQL functions for ST_Reclass + - added regression tests + + Associated ticket is #903 + +2011-05-16 19:39 Bborie Park <bkpark at ucdavis.edu> + + * [r7153] Added ST_Quantile functions + - added function rt_raster_get_quantiles to rt_core/rt_api.c and + rt_api.h + - added test case to test/core/testapi.c + - added function RASTER_quantile to rt_pg/rt_pg.c + - added SQL functions for ST_Quantile + - added regression tests + + Associated ticket is #935 + +2011-05-16 19:36 Bborie Park <bkpark at ucdavis.edu> + + * [r7152] Added ST_Histogram functions. + - added function rt_band_get_histogram to rt_core/rt_api.c and + rt_api.h + - added test case to test/core/testapi.c + - added function RASTER_histogram to rt_pg/rt_pg.c + - added SQL functions for ST_Histogram + - added regression tests + + Associated ticket is #934 + +2011-05-16 19:34 Bborie Park <bkpark at ucdavis.edu> + + * [r7151] Added ST_MinMax function + - added SQL functions for ST_MinMax + - added regression tests + + Associated ticket is #902 + +2011-05-16 19:32 Bborie Park <bkpark at ucdavis.edu> + + * [r7150] Added ST_StdDev function + - added SQL functions for ST_StdDev + - added regression tests + + Associated ticket is #932 + +2011-05-16 19:30 Bborie Park <bkpark at ucdavis.edu> + + * [r7149] Added ST_Mean function. + + - added SQL functions for ST_Mean to rt_pg/rtpostgis.sql.in.c + - added regression tests + + Associated ticket is #931 + +2011-05-16 19:17 Bborie Park <bkpark at ucdavis.edu> + + * [r7148] Addition of ST_SummaryStats function. + + - added function rt_band_get_summary_stats to rt_core/rt_api.c + and rt_api.h + - added test case to test/core/testapi.c + - added function RASTER_summaryStats to rt_pg/rt_pg.c + - added SQL functions for ST_SummaryStats to + rt_pg/rtpostgis.sql.in.c + - added regression tests in test/regress + + Associated ticket is #930. + +2011-05-16 19:11 Bborie Park <bkpark at ucdavis.edu> + + * [r7147] Addition of ST_Band functionality. + - added function rt_raster_from_band to rt_core/rt_api.c and + rt_api.h + - added test case to test/core/testapi.c + - added function RASTER_band to rt_pg/rt_pg.c + - added SQL functions for ST_Band to rt_pg/rtpostgis.sql.in.c + - added regression tests in test/regress + + Associated ticket is #339 and attached patch st_band.3.patch + +2011-05-16 11:01 Sandro Santilli <strk@keybit.net> + + * [r7146] Fix a bug in the example topology data (related to + next_left_edge) -- affected regress testing, also updated + [RT-SIGTA] + +2011-05-13 19:29 Regina Obe <lr@pcorp.us> + + * [r7145] forgot to add Bborie's organization + +2011-05-13 19:27 Regina Obe <lr@pcorp.us> + + * [r7144] Add Bborie Park to development team lists. Assume Paul, + you've given him SVN edit rights already. + +2011-05-13 08:46 Regina Obe <lr@pcorp.us> + + * [r7143] apply astyle + +2011-05-13 08:46 Regina Obe <lr@pcorp.us> + + * [r7142] apply astyle + +2011-05-13 01:04 Chris Hodgson <chodgson@refractions.net> + + * [r7141] additional bug fix for #844 + +2011-05-12 22:05 Chris Hodgson <chodgson@refractions.net> + + * [r7139] added regess test for #884 + +2011-05-12 18:51 Chris Hodgson <chodgson@refractions.net> + + * [r7137] merged fix from r7136 in 1.5 branch, fixes broken + point_in_multipolygon_rtree, for #884 + +2011-05-12 17:39 Regina Obe <lr@pcorp.us> + + * [r7135] fix for #940 -- can't compile PostGIS 2.0 against + PostgreSQL 9.1 beta 1 + +2011-05-12 16:14 Sandro Santilli <strk@keybit.net> + + * [r7134] topology.ST_AddEdgeNewFaces : tabs to spaces, named + arguments, code cleanups and improved checks, tests for invalid + calls [RT-SIGTA] + +2011-05-12 10:23 Sandro Santilli <strk@keybit.net> + + * [r7133] Don't miss to clean load_topology-4326.sql + +2011-05-12 07:28 Regina Obe <lr@pcorp.us> + + * [r7132] add about the tiger upgrade script + +2011-05-11 14:59 Regina Obe <lr@pcorp.us> + + * [r7131] more optimizations + +2011-05-11 13:50 Regina Obe <lr@pcorp.us> + + * [r7130] put in some missing indexes + +2011-05-11 13:32 Regina Obe <lr@pcorp.us> + + * [r7129] more performance enhancements + +2011-05-11 12:56 Regina Obe <lr@pcorp.us> + + * [r7128] turn off debug mode + +2011-05-11 12:55 Regina Obe <lr@pcorp.us> + + * [r7127] more usability and performance enhancements. Change + geocoder/reverse_geocode to use tiger.state_lookup instead of + each schema state table (to achieve this had to add statefp to + lookup table). Also put in upgrade scripts and notes on upgrading + in README. (current script will only upgrade an alpha tiger 2010 + (PostGIS 2.0.0 install) ). + +2011-05-11 11:32 Regina Obe <lr@pcorp.us> + + * [r7126] bah Hudson still not happy. Make some preemptive changes + +2011-05-11 11:08 Regina Obe <lr@pcorp.us> + + * [r7125] Frivolous edit to try to cure Hudson's hiccup + +2011-05-11 02:34 Regina Obe <lr@pcorp.us> + + * [r7124] minor change to Kevin's bio + +2011-05-11 02:11 Regina Obe <lr@pcorp.us> + + * [r7123] update PSC list and alphabetize it to get rid of any + unintended implications of hierarchy. Add new PSC members / + remove old and mark Paul as Chair. + +2011-05-10 04:54 Regina Obe <lr@pcorp.us> + + * [r7122] fix some comments + +2011-05-10 03:57 Regina Obe <lr@pcorp.us> + + * [r7121] put in a todo why I'm punting properly handling holes for + now + +2011-05-09 19:59 Regina Obe <lr@pcorp.us> + + * [r7120] more cleanup of normalize_address function + +2011-05-09 16:10 Regina Obe <lr@pcorp.us> + + * [r7119] put in missing constraints + +2011-05-09 15:16 Sandro Santilli <strk@keybit.net> + + * [r7118] Implement, document, and regress-test SQL/MM + ST_NewEdgeHeal [RT-SIGTA] + +2011-05-09 15:00 Regina Obe <lr@pcorp.us> + + * [r7117] major speed improvements to normalize_address + +2011-05-09 14:17 Sandro Santilli <strk@keybit.net> + + * [r7116] Check for "other connected edges" before TopoGeometry + definitions + +2011-05-09 14:07 Sandro Santilli <strk@keybit.net> + + * [r7115] Fix path to raster (regress) enabler script. Fixes ticket + #947. + +2011-05-08 19:34 Regina Obe <lr@pcorp.us> + + * [r7114] some explanation of theoretical vs. actual + +2011-05-08 17:20 Regina Obe <lr@pcorp.us> + + * [r7113] mark as immutable + +2011-05-08 17:18 Regina Obe <lr@pcorp.us> + + * [r7112] more cleanup. Get rid of more deprecated functions, put + in more stable,imuutable markers. Change some functions from + plpgsql to sql + +2011-05-08 16:36 Regina Obe <lr@pcorp.us> + + * [r7111] Put in costing and make most of the functions either + STABLE or IMMUTABLE. We were loosing a lot of cacheability of + that. Also put in instructions in README how to upgrade the + scripts. Will need to put this in the official docs too once + cleaned that up a bit. + +2011-05-07 16:33 Regina Obe <lr@pcorp.us> + + * [r7110] put in clock timestamps in debugging logic. We seem to be + loosing more time on this normalize than we should be. + +2011-05-06 21:39 Sandro Santilli <strk@keybit.net> + + * [r7109] ST_ModEdgeHeal: move check for TopoGeometry after check + for connected edges. Fixes bug #942 and regress-tests it + [RT-SIGTA] + +2011-05-06 21:21 Sandro Santilli <strk@keybit.net> + + * [r7108] topology.ST_ModEdgeHeal: Check for edge existance before + TopoGeometry definitions. Fixes bug #941 and regress-tests it. + +2011-05-06 14:29 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r7107] Trailing spaces removed from raster files. + +2011-05-06 12:06 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r7106] Changes in raster memory management: + - Only calling function memory context is used, except in SRF + functions, where + multi_call_memory_ctx is used. + - rt_context internals hidden. The memory management and error + reporting is + performed by rtalloc/rterror family functions. They simply call + rt_context + struct fields as requested. Same philosophy here than in + liblwgeom. + - Now rt_context memory is statically allocated. Before this, new + memory for + rt_context was allocated in every function call. And the memory + was allocated + outside the calling function (in fcinfo->flinfo->fn_mcxt postgres + memory + context). + +2011-05-06 06:46 Sandro Santilli <strk@keybit.net> + + * [r7105] Closer-to-iso exceptions from + ST_GetFaceEdges/ST_ModEdgeHeal [RT-SIGTA] + +2011-05-05 21:12 Sandro Santilli <strk@keybit.net> + + * [r7104] Drop commented out code + +2011-05-05 21:12 Sandro Santilli <strk@keybit.net> + + * [r7103] Do not attempt to read points from empty pointarrays + (thanks valgrind for finding this) + +2011-05-05 21:12 Sandro Santilli <strk@keybit.net> + + * [r7102] Allow dumping polygons with empty rings, fixing bug #937, + add unit testing for that case. + +2011-05-05 12:13 Regina Obe <lr@pcorp.us> + + * [r7101] amend + +2011-05-05 08:32 Sandro Santilli <strk@keybit.net> + + * [r7100] another generated file git-ignored + +2011-05-05 07:34 Sandro Santilli <strk@keybit.net> + + * [r7099] Ignore new generated files + +2011-05-05 07:30 Regina Obe <lr@pcorp.us> + + * [r7098] replace osgeo log with project one and one that is not + transparent so looks okay in pdf. Add PostGIS logo. Move logos to + cover page. + +2011-05-05 02:45 Regina Obe <lr@pcorp.us> + + * [r7097] get rid of literal wrapper + +2011-05-05 02:44 Regina Obe <lr@pcorp.us> + + * [r7096] amend faq and fix some typos + +2011-05-05 02:30 Regina Obe <lr@pcorp.us> + + * [r7095] Update Chris' bio now that he is taking on more of an + active role + +2011-05-05 02:26 Regina Obe <lr@pcorp.us> + + * [r7094] attempt at OSGeo branding our documentation + +2011-05-04 23:56 Chris Hodgson <chodgson@refractions.net> + + * [r7093] merged changes r7092 to fix null handling in st_collect + for #912, #630 in 1.5 branch into trunk + +2011-05-04 18:34 Sandro Santilli <strk@keybit.net> + + * [r7091] Add note about updating joined edges and relationships, + touch ST_ModEdgeSplit, ST_NewEdgeSplit, ST_ModEdgeHeal [RT-SIGTA] + +2011-05-04 18:20 Sandro Santilli <strk@keybit.net> + + * [r7090] Document ST_ModEdgeHeal [RT-SIGTA] + +2011-05-04 18:20 Sandro Santilli <strk@keybit.net> + + * [r7089] ST_ModEdgeHeal: update TopoGeom definitions, and test it + [RT-SIGTA] + +2011-05-04 18:20 Sandro Santilli <strk@keybit.net> + + * [r7088] Test that healing of two edges is forbidden if any + topogeom is defined by only one of them [RT-SIGTA] + +2011-05-04 18:20 Sandro Santilli <strk@keybit.net> + + * [r7087] Forbid healing edges if any feature is defined by only + one of the two [RT-SIGTA] + +2011-05-04 18:19 Sandro Santilli <strk@keybit.net> + + * [r7086] Complete primitive (SQL/MM) portion of ST_ModEdgeHeal, + regress test [RT-SIGTA] + +2011-05-04 18:19 Sandro Santilli <strk@keybit.net> + + * [r7085] Stub topology.ST_ModEdgeHeal [RT-SIGTA] + +2011-05-03 16:56 Sandro Santilli <strk@keybit.net> + + * [r7084] Add examples of ST_GetFaceEdges + +2011-05-03 13:35 Regina Obe <lr@pcorp.us> + + * [r7083] more work on handling 3d polygons with holes + +2011-05-03 13:32 Sandro Santilli <strk@keybit.net> + + * [r7082] extent() -> st_extent() + +2011-05-03 13:32 Sandro Santilli <strk@keybit.net> + + * [r7081] Implement ST_GetFaceEdges (sql/mm topology function) + [RT-SIGTA] + +2011-05-03 12:45 Regina Obe <lr@pcorp.us> + + * [r7080] Use strk's suggestion of quieting hudson reqress by + adding a \set VERBOSITY terse + +2011-05-03 08:20 Sandro Santilli <strk@keybit.net> + + * [r7079] Move type definition close to the function using it + (ST_GetFaceEdges) + +2011-05-01 02:46 Regina Obe <lr@pcorp.us> + + * [r7078] Fix handling of 3d polygons (still doesn't handle holes + right), update doc to show example and also caveats so far, add + polygon and polyhedralsurface example to c unit tests + +2011-04-30 22:26 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r7077] First implementation of #459. Still need unit tests and + docs + +2011-04-30 08:38 Regina Obe <lr@pcorp.us> + + * [r7075] put topology_comments generation back in the overall + comments make + +2011-04-30 08:29 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r7074] Fix #933. Update related unit test. Add a convenient way + to trace error in ST_GeomFromGML function + +2011-04-29 19:10 Regina Obe <lr@pcorp.us> + + * [r7073] fix some typos in tiger geocoder documentation and hmm if + Hudson is hiccuping (causing Olivier headaches), this might be + the water he needs. + +2011-04-29 18:39 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r7072] Add LinearRing unit test for ST_GeomFromGML. Related to + #905 + +2011-04-29 17:44 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r7071] Add an srid default value as second optional parameter + for ST_GeomFromGML. Related to #906. Remove a wrong srsName + definition. Update doc and unit test + +2011-04-28 21:05 Regina Obe <lr@pcorp.us> + + * [r7070] Fix for #927 + +2011-04-28 17:57 Regina Obe <lr@pcorp.us> + + * [r7069] fix typo + +2011-04-26 12:35 Regina Obe <lr@pcorp.us> + + * [r7065] #722 More deprecated functions: Get rid Extent deprecated + aggregate, find_extent, Combine_BBox,StartPoint, EndPoint + +2011-04-25 21:19 Regina Obe <lr@pcorp.us> + + * [r7064] missed a spot + +2011-04-25 21:18 Regina Obe <lr@pcorp.us> + + * [r7063] #923: document fix + +2011-04-25 20:43 Regina Obe <lr@pcorp.us> + + * [r7062] more link back to legacy_faq in release notes and what's + changed + +2011-04-25 20:32 Regina Obe <lr@pcorp.us> + + * [r7061] more update of credits + +2011-04-25 18:49 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r7060] Fix spelling of chodgson + +2011-04-23 08:19 Regina Obe <lr@pcorp.us> + + * [r7059] Add faq about how to get back removed legacy functions + +2011-04-23 08:03 Regina Obe <lr@pcorp.us> + + * [r7058] Add missing ST_MapAlgebra proto + +2011-04-22 11:36 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r7057] MapAlgebra expected test messages updated. + +2011-04-21 18:51 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r7056] Function necessary for ST_Histogram with a geometry + parameter + +2011-04-21 15:03 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r7055] -First version of ST_Histogram + +2011-04-20 09:23 Nicklas Avén <nicklas.aven@jordogskog.no> + + * [r7054] Fix bug #918 + +2011-04-20 08:36 Regina Obe <lr@pcorp.us> + + * [r7053] take out topology_comments build from make comments -- + seems to be making Hudson mad. Will put back in later. I think + this is flaw in docbook and its trying to download a buggy + docbook version since it succeeds for me when built separately + but not built in chain. Will try to put back later. + +2011-04-20 08:34 Regina Obe <lr@pcorp.us> + + * [r7052] attempt at itemizing our licensing terms and licenses in + use by various files and dependencies + +2011-04-20 08:06 Regina Obe <lr@pcorp.us> + + * [r7051] minor indent change + +2011-04-20 07:04 Regina Obe <lr@pcorp.us> + + * [r7050] Hudson is a demanding man. Try to make him happy again so + he builds the docs again. + +2011-04-19 16:58 Sandro Santilli <strk@keybit.net> + + * [r7049] Document topology.polygonize(<toponame>) + +2011-04-19 16:58 Sandro Santilli <strk@keybit.net> + + * [r7048] Regress test for topology.polygonize(<toponame>) + +2011-04-19 16:58 Sandro Santilli <strk@keybit.net> + + * [r7047] Add topology.polygonize(<toponame>) function, see ticket + #916 + +2011-04-19 16:51 Regina Obe <lr@pcorp.us> + + * [r7046] #914 separate chip legacy functions from rest of legacy + functions (regular legacy will be converted to legacy.sql, but + chip won't for now) + +2011-04-18 14:08 Regina Obe <lr@pcorp.us> + + * [r7045] fix for #913 replace geometry2box2d with + LWGEOM_to_BOX2DFLOAT4 in st_box2d function definition. + +2011-04-17 16:41 Regina Obe <lr@pcorp.us> + + * [r7044] variable for buffer styles + +2011-04-15 20:34 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r7042] Warn that this function was implemented in C + +2011-04-15 20:30 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r7041] -The minimum for float and double are -FLT_MAX & -DBL_MAX + -Stacked some CASE options + +2011-04-15 18:06 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r7040] -Fix for #651. Replace "scale" parameter for "pixelsize". + +2011-04-15 18:05 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r7039] -Fix for #651. Replace "scale" parameter for "pixelsize". + +2011-04-15 17:56 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r7038] Bug fixed: Loader tried to insert in + <schema>.raster_overviews instead of public.raster_overviews + +2011-04-15 11:21 Regina Obe <lr@pcorp.us> + + * [r7037] + +2011-04-15 11:19 Regina Obe <lr@pcorp.us> + + * [r7036] change to all line feed + +2011-04-15 11:15 Regina Obe <lr@pcorp.us> + + * [r7035] more patch corrections to support sh + +2011-04-15 11:03 Regina Obe <lr@pcorp.us> + + * [r7034] cleanup of breaks minor other changes + +2011-04-15 11:00 Regina Obe <lr@pcorp.us> + + * [r7033] replace with linux breaks, minor changes to paths + +2011-04-14 16:29 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r7032] palloc return value doesn't need to be checked, because + if out of memory, function ends with elog(ERROR). It never + returns NULL. + +2011-04-14 13:50 Sandro Santilli <strk@keybit.net> + + * [r7031] Drop the unused BUILD_RASTER configure variable, fix use + of the RASTER variable. Fixes bug #910. + +2011-04-14 11:07 Sandro Santilli <strk@keybit.net> + + * [r7030] Properly credit Stadt Uster, co-sponsor of buffer styles + in 1.5 + +2011-04-14 11:07 Sandro Santilli <strk@keybit.net> + + * [r7029] Implement SnapToGrid for CIRCULARSTRING and + COMPOUNDCURVE. Just enough to fix #183. + +2011-04-14 10:38 Sandro Santilli <strk@keybit.net> + + * [r7028] Do not error out if things are clean already + +2011-04-14 10:36 Sandro Santilli <strk@keybit.net> + + * [r7027] Properly clean in loader's cunit test dir + +2011-04-13 19:53 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r7026] Context freed. It's not necessary. + +2011-04-13 19:44 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r7025] Fixed bug from ticket #837. Some other improvements in + RASTER_mapAlgebra. Minor bug fixed in rt_raster_serialized_size. + +2011-04-13 11:21 Sandro Santilli <strk@keybit.net> + + * [r7024] Add test for ticket #834 + +2011-04-13 10:25 Mark Leslie <mark.leslie@lisasoft.com> + + * [r7023] Adding a dbf filter for file selection. + +2011-04-13 08:08 Sandro Santilli <strk@keybit.net> + + * [r7022] Have 'svnrebase' rule use an authors file rather than + command. Lets older git do it (old git on the machine currently + mirroring the codebase to github). + +2011-04-13 07:57 Sandro Santilli <strk@keybit.net> + + * [r7021] Add svnrebase rule, to facilitate use from git + +2011-04-13 07:41 Sandro Santilli <strk@keybit.net> + + * [r7020] Add script to be used with git-svn --authors-prog + +2011-04-12 12:34 Regina Obe <lr@pcorp.us> + + * [r7019] Quiet quiet Hudson + +2011-04-11 17:13 Regina Obe <lr@pcorp.us> + + * [r7018] credit change + +2011-04-11 16:17 Regina Obe <lr@pcorp.us> + + * [r7017] + +2011-04-11 16:14 Regina Obe <lr@pcorp.us> + + * [r7016] preliminary cunit tests for x3d output functions + +2011-04-11 09:54 Sandro Santilli <strk@keybit.net> + + * [r7015] Add support for a RUNTESTFLAGS variable so you can do + something like: 'make check RUNTESTFLAGS=-v' and get the problems + printed w/out having to look at logs. + +2011-04-11 09:53 Sandro Santilli <strk@keybit.net> + + * [r7014] Do not raise an exception from DropGeometryTable if a + non-existing table is given. Patch by Andrea Peri. Regress test + mine. Closes ticket #861. + +2011-04-09 14:27 Regina Obe <lr@pcorp.us> + + * [r7013] minor cleanup replace tabs with spaces in ST_LineToCurve + example + +2011-04-09 06:32 Regina Obe <lr@pcorp.us> + + * [r7012] fix url in ST_Azimuth. + +2011-04-08 17:02 Regina Obe <lr@pcorp.us> + + * [r7011] Azimuth example with angles of azimuth and my drawing + cheatsheet (st_azimuthmath.sql) in case have to do this again. + +2011-04-08 14:04 Regina Obe <lr@pcorp.us> + + * [r7010] Document TopologySummary + +2011-04-08 10:58 Sandro Santilli <strk@keybit.net> + + * [r7009] tabs to spaces + +2011-04-07 18:02 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r7008] Some memory freed. Related ticket #851. + +2011-04-06 14:30 Sandro Santilli <strk@keybit.net> + + * [r7007] Fix typo in gserialized_overlaps (contains->overlaps). + Fixes ticket #869. + +2011-04-05 22:26 Regina Obe <lr@pcorp.us> + + * [r7006] Get rid of some tests in _ST_ConcaveHull and only attempt + to make a polygon if the line is simple. ST_Covers is causing me + quite a bit of greif as a testing tool. don't recall so many topo + node this and that in GEOS 3.2 ST_Covers. Also add in some + regress tests for ST_ConcaveHull -- more to come. + +2011-04-04 16:25 Regina Obe <lr@pcorp.us> + + * [r7005] Fix typo in tiger manual and fix for #887 -- it was + really the issue of using , instead of space to separate state + and zip that was the main culprit + +2011-04-04 15:19 Regina Obe <lr@pcorp.us> + + * [r7004] add pgsql2shp -m switch to dumper help + +2011-04-04 13:10 Regina Obe <lr@pcorp.us> + + * [r7003] minor issue preventing legacy load: locate_along_measure + should use ST_ wrapper + +2011-04-04 12:11 Sandro Santilli <strk@keybit.net> + + * [r7002] topology.AddFace: prepare ring geometry and check + intersection with an interior edge point. Speeds up registration + of faces, particularly when composed by many edges. See ticket + #880. [RT-SIGTA] + +2011-04-04 07:05 Sandro Santilli <strk@keybit.net> + + * [r7001] Add -m reference in pgsql2shp manpage, by Loic Dachary. + See ticket #885. + +2011-04-04 03:10 Regina Obe <lr@pcorp.us> + + * [r7000] Add pgsql2shp allow predefined list to news and release. + Add Loic Dachary to credits. + +2011-04-04 02:35 Regina Obe <lr@pcorp.us> + + * [r6999] forgot one ST_AddBand proto + +2011-04-04 02:20 Regina Obe <lr@pcorp.us> + + * [r6998] Add missing ST_Band protos and remove non-existent one + +2011-04-04 01:25 Regina Obe <lr@pcorp.us> + + * [r6997] #898, #551: generate postgis_upgrade_20_minor.sql, + legacy.sql and stop generating obsolete 15_minor, 14, 13_14 + +2011-04-03 19:19 Sandro Santilli <strk@keybit.net> + + * [r6996] Ticket #855 by Loic Dachary: pgsql2shp fields conversion + from predefined list + +2011-04-02 12:27 Sandro Santilli <strk@keybit.net> + + * [r6995] Use a 2d geometry for face mbr, even for 2.5d topologies. + After all mbr is a rectangle (not cube) by definition (Minimum + Bounding Rectangle) so we don't want to mess with poliedron or + whatnot [see #103 for more infos about the can of worms..] + +2011-04-01 05:18 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6994] Raster testing added to core testing. Related ticket + #762. + +2011-03-31 10:26 Sandro Santilli <strk@keybit.net> + + * [r6993] topology.TopologSummary: survive presence of stale + records in topology.topology and missing tables from topology + schemas. + +2011-03-31 10:26 Sandro Santilli <strk@keybit.net> + + * [r6992] topology.TopologySummary: report 'has Z' flag on + topologies + +2011-03-31 09:35 Sandro Santilli <strk@keybit.net> + + * [r6991] Add support for creating topologies allowing 3d vertices + on edges and nodes. Includes regress testing [RT-SIGTA] + +2011-03-29 14:58 Regina Obe <lr@pcorp.us> + + * [r6990] try to save as utf-8 + +2011-03-29 14:10 Regina Obe <lr@pcorp.us> + + * [r6989] that didn't work. Try resaving as latin1 and then repull + down. + +2011-03-29 13:57 Regina Obe <lr@pcorp.us> + + * [r6988] mark this as an executable then maybe just mamber it + won't try to inherit the encoding of my OS + +2011-03-29 13:57 Sandro Santilli <strk@keybit.net> + + * [r6987] Add another test for topology.AddFace in presence of an + open edge whose endpoints both intersect a polygon ring which + does not cover it. + +2011-03-29 13:20 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6986] Modified expected result for create_rt_gist_test regress + test. It works + differently in PostgreSQL 8.4.7 and PostgreSQL 9.0.3. See ticket + #870. + +2011-03-29 11:10 Regina Obe <lr@pcorp.us> + + * [r6985] Add #817 Renaming old 3D functions to the convention + ST_3D to release notes + +2011-03-28 23:24 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6984] Modified expected values for some raster tests + +2011-03-28 23:10 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r6983] -Minimal value for float is -FLT_MAX, not FLT_MIN + +2011-03-28 22:56 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6982] liblwgeom/lex.yy.c version 6180 reverted + +2011-03-28 22:52 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6981] Missed check added again. + +2011-03-28 22:49 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6980] Some bugs related with ticket #870 solved. Added more + test for polygonize function. + +2011-03-28 22:10 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r6979] -Changed message not proper when just setting pixel value + +2011-03-28 20:31 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r6978] -Transformed many error into warning (or notice) + -Removed function name in message for warnings + -Added doc about rules when to return notice or error + -Removed commented out notices + -removed warning when passed raster is null. Just return null + -Get band number with PG_GETARG_INT32 instead of PG_GETARG_UINT16 + which was converting values < 0 to something > 0 + +2011-03-28 20:21 Regina Obe <lr@pcorp.us> + + * [r6977] attempt to quiet floating point erros in reprojection by + roudning the coordinates (worked on mingw and still works after + change). I assume -ws are when using -w switch? + +2011-03-28 18:46 Nicklas Avén <nicklas.aven@jordogskog.no> + + * [r6976] Putting renamed 3D-functions in legacy.sql.c and some + clarifying notes about the renaming + +2011-03-28 18:01 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6975] Raster polygonization optimized using a layer filter to + avoid NODATA values. Related ticket #870. + +2011-03-27 17:50 Nicklas Avén <nicklas.aven@jordogskog.no> + + * [r6974] Renaming of 3D functions, #817 + +2011-03-27 02:43 Regina Obe <lr@pcorp.us> + + * [r6973] more additions / corrections to release notes + +2011-03-26 23:44 Regina Obe <lr@pcorp.us> + + * [r6972] + +2011-03-26 23:42 Regina Obe <lr@pcorp.us> + + * [r6971] more typo corrections + +2011-03-26 18:04 Regina Obe <lr@pcorp.us> + + * [r6970] update docs to reflect changes in tiger loader + +2011-03-26 17:43 Regina Obe <lr@pcorp.us> + + * [r6969] cleanup change linux to sh. Get rid of some typos in the + sh script generator, move some more variables to the top for + easier setting. Fix some errors in loader_tables preventing some + soundex index from being created. Change reverse_geocoder.sql + (from utfy-8 (not sure how that happened) + +2011-03-25 09:11 Regina Obe <lr@pcorp.us> + + * [r6968] amend to include work on tiger geocoder + +2011-03-24 22:56 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r6967] -Fixxed a bug getting toindex band index + -Classified one function declaration + +2011-03-24 22:55 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r6966] -ST_AddBand should add the new band as the last band if + no band index is apecified + +2011-03-24 11:39 Regina Obe <lr@pcorp.us> + + * [r6965] Give special functions index a static name so it doesn't + get pushed down to another chapter every time we add a new + chapter + +2011-03-23 22:09 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r6964] -Return NULL if raster is NULL in RASTER_addband + -Warn if first raster is NULL in RASTER_copyband and return NULL + +2011-03-23 22:01 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r6963] -Reordered/classified function declaration + -Renamed index and nband to bandindex in many functions + -Better handling for NULL in RASTER_setBandNoDataValue following + ticket #883. Return original raster if can't set nodata value + +2011-03-23 21:50 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r6962] Removed extra spaces + +2011-03-23 20:51 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r6961] -Better handling of NULL for ST_SetValue. Return the + original raster when band, X or Y are NULL instead of an error or + NULL. See #883. + +2011-03-23 19:52 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r6960] -General review of ST_AddBand following ticket 871 + -Moved some warning in the core + -Renamed the parameters to make more explicit which one is "to" + and which one is "from" + -Fixed confusion in parameter order. + -Set many rtpostgis.sql.in.c functions to STRICT + -Removed check for null in RASTER_getPixelValue since st_value is + now strict. More might follow. + -Removed (or moved) some documentation from rt_api.c already + present in rt_api.h + +2011-03-23 18:15 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6959] Semicolon missed. + +2011-03-23 02:57 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6958] Server crash reported in ticket #837 partially solved. + SPI_finish causes server to crash. Commented in this commit, but + it's not a good solution, I think. + This guy had the same problem 10 years ago. No responses: + http://www.mail-archive.com/pgsql-general@postgresql.org/msg18558.html + +2011-03-22 20:31 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r6957] -ST_PixelAsPolygons also return the x & y coordinates of + the pixel + +2011-03-22 14:26 Regina Obe <lr@pcorp.us> + + * [r6956] some clarification of specs + +2011-03-22 13:54 Regina Obe <lr@pcorp.us> + + * [r6955] more cleanup + +2011-03-22 05:57 Regina Obe <lr@pcorp.us> + + * [r6954] minor rearrangement wording changes to Paul's bio + +2011-03-22 05:53 Regina Obe <lr@pcorp.us> + + * [r6953] Amend my bio so people know who to point fingers at when + Tiger Geocoder and X3D don't work right. + +2011-03-22 05:44 Regina Obe <lr@pcorp.us> + + * [r6952] Fix #879 (get rid of use of both deprecated + line_locate_point and line_substring... document function + +2011-03-21 16:33 Sandro Santilli <strk@keybit.net> + + * [r6951] Add test for ST_Polygonize with nested collection input + (see ticket #878) + +2011-03-21 11:04 Sandro Santilli <strk@keybit.net> + + * [r6950] Convert to $$ quoting (ticket #714) + +2011-03-21 10:28 Sandro Santilli <strk@keybit.net> + + * [r6949] Add an ST_RemIsoNode alias to ST_RemoveIsoNode (ticket + #798) + +2011-03-21 10:18 Sandro Santilli <strk@keybit.net> + + * [r6948] ST_ModEdgesSplit -> ST_ModEdgeSplit (ticket #794) + +2011-03-20 16:04 Regina Obe <lr@pcorp.us> + + * [r6947] + +2011-03-20 15:58 Regina Obe <lr@pcorp.us> + + * [r6946] more credit cleanup and rounding up of credits + +2011-03-20 15:44 Regina Obe <lr@pcorp.us> + + * [r6945] fix typo + +2011-03-20 14:01 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6944] Two ST_AddBands missing variants added. Related tickets + #858, #792. + +2011-03-20 08:55 Sandro Santilli <strk@keybit.net> + + * [r6943] Re-drop ST_SharedPath from topology.AddFace, this time + with stronger robustness, so not prone to error exposed by #874. + It was a pity to give up a 10% speed improvement... Thanks + supermoon for keeping me up. [RT-SIGTA] + +2011-03-19 23:35 Sandro Santilli <strk@keybit.net> + + * [r6942] Fix #874 by getting back to ST_SharedPaths use. Might try + to optimize again in the future, but correctness first! This + commit also adds regression testing for the case [RT-SIGTA] + +2011-03-19 02:49 Regina Obe <lr@pcorp.us> + + * [r6941] more company contribution amendments + +2011-03-19 02:31 Regina Obe <lr@pcorp.us> + + * [r6940] more updating to better reflect corporate sponsor + contributions + +2011-03-19 02:05 Regina Obe <lr@pcorp.us> + + * [r6939] More cleanup of release notes. Add a corporate + contributors section to kill 2 birds (give credit to companies + that have funded PostGIS and also so we have a catalog of + companies that can lay claim to parts of PostGIS as part of our + incubation due diligence). Guys if I'm missing companies in the + list which I most surely am, please add them. + +2011-03-18 21:13 Regina Obe <lr@pcorp.us> + + * [r6938] Fill in coordIndex for multipolygons + +2011-03-18 20:06 Regina Obe <lr@pcorp.us> + + * [r6937] + +2011-03-18 19:56 Regina Obe <lr@pcorp.us> + + * [r6936] force to LF eol type so doesn't barf in MingW + +2011-03-18 19:43 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6935] Jeff Adams: Changed variables we are storing getopt + result in from char to int, since int is the return type from the + getopt function. (#663) + +2011-03-18 19:33 Regina Obe <lr@pcorp.us> + + * [r6934] Update credits and release notes to include Jeff Adams + much appreciated contributions and other minor things + +2011-03-18 19:22 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6933] Jeff Adams: Removed not-really-necessary -m1 parameter + from grep call because it does not work on MingW. + +2011-03-18 19:13 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6932] Jeff Adams: Added regression test for LATIN1 encoding, + fixed failure to convert to UTF8. (#808) + +2011-03-18 19:03 Regina Obe <lr@pcorp.us> + + * [r6931] need to always output with LF breaks otherwise fails on + windows mingw as windows switches the breaks to CRLF + +2011-03-18 18:30 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6930] Jeff Adams: Added dumping tests for -G versions of loader + regress tests. + +2011-03-18 18:21 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6929] Jeff Adams: Now runs all the normal regression tests with + the -G option as well. (#358) + +2011-03-18 17:36 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6928] Jeff Adams: Adding a regression test for the loader that + uses a schema-qualified table name. + +2011-03-18 16:54 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6927] Jeff Adams: Per suggestion on #857, corrected output to + indicate table name is optional. + +2011-03-18 16:47 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6926] Whoops, back out the gserialized flag + +2011-03-18 16:24 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6925] Jeff Adams: Increasing precision due to tests failing in + automatic build. + +2011-03-18 16:16 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6924] Add the &&& operator and index binding for + 'gist_geometry_ops_nd'. Operator behavior in mixed-dimension + query situations still to be determined. + +2011-03-18 15:52 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6923] Fix build fail when DEBUG = 1. + +2011-03-18 15:40 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6922] Fixes the following shp2pgsql issues: + #229: A new "-r" command line parameter to specify a "from" SRID + for reprojecting (the existing -s is the "to"). + #779: -S now works for points, and -w is documented. + #864: MULTIPOINT shapefiles with single-vertex points now + correctly load with all MULTIPOINTs. + #865: no longer crashes when both -g and -G are used. + +2011-03-18 14:11 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r6921] -Standardized the way we write "nodata" from "NODATA" to + "nodata" + -My editor remove a lot of trailing space and convert tab to 4 + spaces. Please set your editor to do the same. + +2011-03-18 14:06 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r6920] -Fix for ticket 792: Clamp double to known values when + pixeltype is other than double in rt_band_set_nodata, + rt_band_set_pixel & rt_raster_generate_new_band + -Added function name to many error messages + -Standardized the way we write "nodata" from "NODATA" to "nodata" + -Moved some documentation to the header file + -My editor remove a lot of trailing space and convert tab to 4 + spaces. Please make your editor do the same. + -Removed declarations of many unused variable + +2011-03-17 19:30 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6919] Quiet some debug-level warnings. + +2011-03-17 19:27 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6918] Fix mis-named debugging global + +2011-03-17 13:44 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6917] Replace variable-length-key 2D index with + fixed-length-key for GSERIALIZED case. + +2011-03-17 00:08 Sandro Santilli <strk@keybit.net> + + * [r6916] Avoid using ST_SharedPath in topology.AddFace as well. + +2011-03-16 22:15 Regina Obe <lr@pcorp.us> + + * [r6915] Multilinestring working even for closed multilinestrings. + Still need to fix polygon and multipolygons. also added example + of closed multilinestring. + +2011-03-16 20:23 Regina Obe <lr@pcorp.us> + + * [r6914] sort of take care of multilinestrings -- doesn't work for + multilinestrings with closed linestrings so that's next up to + correct. + +2011-03-16 19:16 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6913] Jeff Adams: Updated man page for -X, -T, and -e + parameters (#110 and #67). + +2011-03-16 19:16 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6912] Jeff Adams: Only automatically run -D tests if no custom + parameters have been set. + +2011-03-16 18:48 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6911] Deleted empty rt_raster_map_algebra function from + rt_core. MapAlgebra + implemented at PostgreSQL level. + +2011-03-16 17:53 Regina Obe <lr@pcorp.us> + + * [r6910] replace & with & to fix build + +2011-03-16 17:16 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6909] Jeff Adams patch to add command line flag to not use a + transaction. (#110) + +2011-03-16 16:47 Regina Obe <lr@pcorp.us> + + * [r6908] #651 revise ST_MakeEmptyRaster so arg names and types are + consistent + +2011-03-16 14:06 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6907] Jeff Adams new testing of loader with cmd line options. + +2011-03-16 13:03 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6906] Jeff Adams patch to allow pre/post actions in regression + tests + +2011-03-16 13:02 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6905] Jeff Adams patch to support tablespaces (#67) + +2011-03-16 05:15 Regina Obe <lr@pcorp.us> + + * [r6904] Document ST_ASX3D function -- still a work in progress -- + will add more as I flesh out the rest. + +2011-03-16 04:48 Regina Obe <lr@pcorp.us> + + * [r6903] Alas a functioning polyhedralsurface export viewable in + freeWRL. Also add proto that just takes geometry as argument and + defaults to precision 15 + +2011-03-15 15:11 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6902] Added ST_IsEmpty documentation. Related ticket #591. + +2011-03-15 14:04 Regina Obe <lr@pcorp.us> + + * [r6901] Add regress tests for + populate_geometry_columns,DropGeometryTable + +2011-03-15 06:01 Regina Obe <lr@pcorp.us> + + * [r6900] Fix copy comment error + +2011-03-14 17:00 Regina Obe <lr@pcorp.us> + + * [r6899] Lots of fixes. TIN is about perfect, Point, multipoint + about perfect too, LINESTRING close. + +2011-03-12 10:42 Regina Obe <lr@pcorp.us> + + * [r6898] minor corrections + +2011-03-11 21:12 Regina Obe <lr@pcorp.us> + + * [r6897] preliminary work on x3d export. Still a lot to go. point, + multipoint, tin, linestring almost working. Still need to fiddle + with coordindex and spacing and get rid of junk copied from gml + not needed. + +2011-03-11 13:27 Regina Obe <lr@pcorp.us> + + * [r6896] minor change + +2011-03-11 12:37 Regina Obe <lr@pcorp.us> + + * [r6895] Add Availability: 2.0.0 for functions I know are new + after the raster postgis 2.0.0 merge + +2011-03-11 12:26 Regina Obe <lr@pcorp.us> + + * [r6894] document GetFaceByPoint and revise release_notes + +2011-03-10 21:18 Regina Obe <lr@pcorp.us> + + * [r6893] Add in Jorge's great windows instructions + +2011-03-10 18:53 Sandro Santilli <strk@keybit.net> + + * [r6892] Add a --raster flag to run_test + +2011-03-10 11:33 Sandro Santilli <strk@keybit.net> + + * [r6891] TopologySummary: Take an empty feature_column as a sign + of a "detached" topological layer (one having no deploy on + user-tables). + +2011-03-09 21:59 Sandro Santilli <strk@keybit.net> + + * [r6889] Ticket #849 by Andrea Peri: topology.GetFaceByPoint + implementation and test + +2011-03-09 19:18 Sandro Santilli <strk@keybit.net> + + * [r6888] Ticket #856: topology.CopyTopology(text,text) + implementation, test and documentation + +2011-03-09 16:30 Sandro Santilli <strk@keybit.net> + + * [r6887] Make createtopogeom test independent from the number of + topologies created before running it + +2011-03-09 10:19 Sandro Santilli <strk@keybit.net> + + * [r6886] Ticket #855: topology.TopologySummary(<name>) + +2011-03-09 10:14 Sandro Santilli <strk@keybit.net> + + * [r6885] Add note for ST_Relate with boundary node rule + +2011-03-08 15:26 Sandro Santilli <strk@keybit.net> + + * [r6884] Simplify AddEdge code by using BoundaryNodeRule 2 + (Endpoint) in ST_Relate call, thus saving a couple of calls to + ST_RelateMatch. See tickets #770 and #844. + +2011-03-08 10:43 Sandro Santilli <strk@keybit.net> + + * [r6883] Some (poor) documentation for + ST_Relate(g1,g2,boundaryNodeRule) + +2011-03-08 10:23 Sandro Santilli <strk@keybit.net> + + * [r6882] Ticket #844: add support for boundary node rule + specification in ST_Relate [RT-SIGTA] + +2011-03-08 08:16 Sandro Santilli <strk@keybit.net> + + * [r6881] Enable a very old relate test which for some reason was + never automatically run + +2011-03-07 11:05 Sandro Santilli <strk@keybit.net> + + * [r6880] Avoid using ST_SharedPath (expensive) + +2011-03-05 11:00 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6879] is_nan function defined for Python versions under 2.6 + +2011-03-05 09:12 Regina Obe <lr@pcorp.us> + + * [r6878] more marks of TIN + +2011-03-05 06:17 Regina Obe <lr@pcorp.us> + + * [r6877] Flag more functions as supporting TINS, provide some + examples + +2011-03-05 06:07 Regina Obe <lr@pcorp.us> + + * [r6876] more examples of TIN and polyhedral surfaces + +2011-03-05 05:51 Regina Obe <lr@pcorp.us> + + * [r6875] Fix ST_DumpPoints 3D examples so they don't flatten to 2D + +2011-03-01 14:47 Sandro Santilli <strk@keybit.net> + + * [r6874] More ignores + +2011-02-28 18:14 Sandro Santilli <strk@keybit.net> + + * [r6873] Use left_face/right_face when looking for face ring's + edges. I've seen some areal TopoGeometries dumped in 1:76 of the + time [RT-SIGTA] + +2011-02-28 10:53 Sandro Santilli <strk@keybit.net> + + * [r6872] Add test for invalid AddFace call (polygon not fully + defined by known edges) + +2011-02-28 10:40 Sandro Santilli <strk@keybit.net> + + * [r6871] Founded -> Found (in expected results..) + +2011-02-26 21:29 Regina Obe <lr@pcorp.us> + + * [r6870] #848 Fix eror message for GetNodeByPoint, GetNodeByEdge + +2011-02-26 04:22 Regina Obe <lr@pcorp.us> + + * [r6869] cealn up examples and data type mistake + +2011-02-26 03:32 Regina Obe <lr@pcorp.us> + + * [r6868] minor changes and attempt to fix matrix table (cutting + off now) + +2011-02-25 23:01 Regina Obe <lr@pcorp.us> + + * [r6867] doucmentation for #791 , #793 - GetNodeByPoint, + GetEdgeByPoint -- made some changes to Andrea Peri's wording and + change ot examples so they really fall in MA. Still need to + output results. + +2011-02-25 09:18 Sandro Santilli <strk@keybit.net> + + * [r6866] Update copyright notice + +2011-02-25 08:56 Sandro Santilli <strk@keybit.net> + + * [r6865] topology.GetEdgeByPoint: implementation and regress test, + by Andrea Peri. Ticket #791. Note that previous commit (for #793) + was GetNodeByPoint. My mistake, sorry. + +2011-02-25 08:45 Sandro Santilli <strk@keybit.net> + + * [r6864] topology.GetEdgeByPoint: implementation and regress test, + by Andrea Peri. Ticket #793 + +2011-02-24 21:44 Nicklas Avén <nicklas.aven@jordogskog.no> + + * [r6863] Copyright notes + +2011-02-24 17:39 Regina Obe <lr@pcorp.us> + + * [r6862] fix typo + +2011-02-24 17:23 Regina Obe <lr@pcorp.us> + + * [r6861] Put in a note about nominatim OSM geocoder that works + with international addresses and open street map data + +2011-02-24 17:16 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6860] Now is not possible to load rasters with different scale + in the same table. Related ticket #153 + +2011-02-24 15:45 Sandro Santilli <strk@keybit.net> + + * [r6859] Improve precision of point_in_ring_rtree too (bug #845). + +2011-02-24 15:17 Sandro Santilli <strk@keybit.net> + + * [r6857] Improve precision of point_in_ring. Fixes and + regress-tests bug #845. + +2011-02-24 07:54 Regina Obe <lr@pcorp.us> + + * [r6856] note psc members + +2011-02-24 07:52 Regina Obe <lr@pcorp.us> + + * [r6855] amend list of core contributors, add in their svn + usernames and core areas of responsibility + +2011-02-24 07:35 Regina Obe <lr@pcorp.us> + + * [r6854] Amend author list and credits (credits is still obsolete + -- tempted to just get rid of it since its redundant with news + and hard to maintain) + +2011-02-23 08:58 Regina Obe <lr@pcorp.us> + + * [r6853] amend enhancements line for ST_AsGML to note strk's + addition of option 4 -- use LineString instead of curve tag + +2011-02-22 14:52 Sandro Santilli <strk@keybit.net> + + * [r6852] Ticket #816: flag to select <LineString> over <Curve> for + GML3 line output [RT-SIGTA] + +2011-02-22 14:25 Sandro Santilli <strk@keybit.net> + + * [r6851] Test new LW_GML_SHORTLINE GML2 option [RT-SIGTA] + +2011-02-22 14:25 Sandro Santilli <strk@keybit.net> + + * [r6850] Add LW_GML_SHORTLINE flag to prefer <LineString> over + <Curve> tag for lines GML3 output [RT-SIGTA] + +2011-02-22 13:01 Sandro Santilli <strk@keybit.net> + + * [r6849] Use a single bitfield for GML output options [RT-SIGTA] + +2011-02-19 01:05 Mateusz Loskot <mateusz@loskot.net> + + * [r6848] Improved GDAL detection and reporting + +2011-02-19 00:42 Mateusz Loskot <mateusz@loskot.net> + + * [r6847] ./configure checks for GDAL Python bindings with built-in + NumPy array support (Ticket #838) + +2011-02-18 16:24 Sandro Santilli <strk@keybit.net> + + * [r6846] Performance improvements in topology.AddFace: consider + each ring separately when looking for composing edges; compute + orientation inside the loop body to avoid sorting and grouping + [RT-SIGTA] + +2011-02-18 14:58 Sandro Santilli <strk@keybit.net> + + * [r6845] Test passing polygons with holes to topology.AddFace + [RT-SIGTA] + +2011-02-17 19:19 Regina Obe <lr@pcorp.us> + + * [r6844] Amend ST_AsGML and ST_GeomFromGML to include the fact + they support TINS + +2011-02-17 13:13 Regina Obe <lr@pcorp.us> + + * [r6843] + +2011-02-17 13:08 Regina Obe <lr@pcorp.us> + + * [r6842] wrong statement + +2011-02-17 13:02 Regina Obe <lr@pcorp.us> + + * [r6841] indent a bit better + +2011-02-17 13:01 Regina Obe <lr@pcorp.us> + + * [r6840] Provide a more useful example of map algebra. + +2011-02-17 12:15 Regina Obe <lr@pcorp.us> + + * [r6839] fix typo and add reference to ST_Value + +2011-02-17 12:10 Regina Obe <lr@pcorp.us> + + * [r6838] fix typo in xsl hopefully will make raster list right -- + though must have syntax wrong anyway since topology and tiger get + listed. + +2011-02-17 06:07 Regina Obe <lr@pcorp.us> + + * [r6837] provide an example of map algebra + +2011-02-17 04:31 Regina Obe <lr@pcorp.us> + + * [r6836] #836 PostGIS raster in 2.0 is not being output in Trunk + Doxygen + +2011-02-17 04:23 Regina Obe <lr@pcorp.us> + + * [r6835] Document ST_MapAlgebra -- need better description and + examples forthcoming + +2011-02-16 19:15 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6834] Added documentation for the new version of ST_AddBand + function + +2011-02-16 19:12 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6833] Added a new variant for ST_AddBand, taking 2 rasters as + input. Needs doc. + +2011-02-16 18:19 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6832] - One raster core implementation of MapAlgebra (related + ticket #588, needs + documentation). + - RASTER_addBand code moved to core level. The new RASTER_addBand + function calls + the core one (rt_raster_generate_new_band). + - Added regression tests for MapAlgebra. + - Deleted lexer/parser at core level. Not used. + - Fixed small bug in documentation: ST_SetBandNoDataValue returns + a raster, not + an integer. + +2011-02-16 17:41 Sandro Santilli <strk@keybit.net> + + * [r6831] Add UnaryUnion item + +2011-02-16 11:15 Sandro Santilli <strk@keybit.net> + + * [r6830] Document ST_UnaryUnion + +2011-02-16 10:19 Sandro Santilli <strk@keybit.net> + + * [r6829] Stop on first error when creating the regress db + +2011-02-16 10:19 Sandro Santilli <strk@keybit.net> + + * [r6828] Expose versions of ST_IsValid and ST_IsValidReason + accepting "the ESRI flag" and implemented as wrappers to + ST_IsValidDetail. Only available when building against GEOS-3.3+. + Commit includes documentation and regress-testing. Closes ticket + #831 [RT-SIGTA] + +2011-02-16 09:12 Sandro Santilli <strk@keybit.net> + + * [r6827] Only run ST_isValidDetail if GEOS is >= 3.3 -- Reduce + tests for GEOS version grouping togheter tests depending on the + same version [RT-SIGTA] + +2011-02-16 08:54 Sandro Santilli <strk@keybit.net> + + * [r6826] Regression test for ST_isValidDetail (including "ESRI" + flag) [RT-SIGTA] + +2011-02-16 08:34 Sandro Santilli <strk@keybit.net> + + * [r6825] Document ST_isValidDetail(geom, flags) variant [RT-SIGTA] + +2011-02-15 17:36 Sandro Santilli <strk@keybit.net> + + * [r6824] Allow specifying validity checking flags in + ST_isValidDetail [RT-SIGTA] + +2011-02-15 13:49 Regina Obe <lr@pcorp.us> + + * [r6823] Make work on PostgreSQL 8.4 (was using some syntax only + allowed in 9.0+). Also account for the odd / even side of street + rule. And of course that demonstrated there is a bug somewhere + (most likely in the geocoder), but got to pull up some maps to + see which is right. One of these has the address orientations + flipped (odd /even not right). Of course I have to be right :). + Boy do I hate when you program the reverse of something and it + exposes a bug. Also fix some minor documentation. + +2011-02-15 08:26 Sandro Santilli <strk@keybit.net> + + * [r6822] topology: create an index on edge.left_face and + edge.right_face, speeding up construction of polygonal Geometry + from TopoGeometry by a factor of 10 (Closes #806) + +2011-02-15 07:19 Regina Obe <lr@pcorp.us> + + * [r6821] document reverse_geocode + +2011-02-15 06:36 Regina Obe <lr@pcorp.us> + + * [r6820] Change to transform the point if not in nad83 long lat + already + +2011-02-15 06:15 Regina Obe <lr@pcorp.us> + + * [r6819] reverse_geocode complete (with street range), now to + document and improve speed and test + +2011-02-15 00:26 Regina Obe <lr@pcorp.us> + + * [r6818] Journeying into street ranges now can tell which side of + the street we are on and spits that out when include_strnum_range + is true. Next (hopefully last) step will be to pinpoint address + number + +2011-02-14 18:22 Regina Obe <lr@pcorp.us> + + * [r6817] First draft of reverse geocde currently just gets the + street need to interpolate to get approximate number + +2011-02-14 17:26 Sandro Santilli <strk@keybit.net> + + * [r6816] ST_UnaryUnion and test + +2011-02-14 12:10 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6815] The array for NODATA values is not generated if NaN is + returned as nodata value + for bands. Related ticket #828. + +2011-02-14 11:57 Regina Obe <lr@pcorp.us> + + * [r6814] fix another mismatched tag + +2011-02-14 03:33 Regina Obe <lr@pcorp.us> + + * [r6813] put in missing / and not about implementation + +2011-02-14 03:10 Regina Obe <lr@pcorp.us> + + * [r6812] recommit + +2011-02-14 02:33 Regina Obe <lr@pcorp.us> + + * [r6811] amend mapserver instructions mode='2' is now required for + most rasters to display + +2011-02-13 03:51 Regina Obe <lr@pcorp.us> + + * [r6810] ST_AddEdgeNewFaces - On closer inspection -- a lot of + work is done in it, but not enough to make it functional. + +2011-02-13 03:45 Regina Obe <lr@pcorp.us> + + * [r6809] ST_AddEdgeNewFaces - still need to put in an example + +2011-02-12 18:22 Regina Obe <lr@pcorp.us> + + * [r6808] fix typo and add minor amendments + +2011-02-11 22:58 Regina Obe <lr@pcorp.us> + + * [r6807] + +2011-02-11 22:45 Regina Obe <lr@pcorp.us> + + * [r6806] add back in example + +2011-02-11 22:40 Regina Obe <lr@pcorp.us> + + * [r6805] more pieces + +2011-02-11 22:31 Regina Obe <lr@pcorp.us> + + * [r6804] add another piece + +2011-02-11 22:18 Regina Obe <lr@pcorp.us> + + * [r6803] Slowly put back new section -- last build worked. + +2011-02-11 22:06 Regina Obe <lr@pcorp.us> + + * [r6802] remove new section to see if that fixes build + +2011-02-11 21:15 Regina Obe <lr@pcorp.us> + + * [r6801] Get rid of <p> and replace with <para> + +2011-02-11 21:04 Regina Obe <lr@pcorp.us> + + * [r6800] Hudson is alive again but not happy. Hopefully this will + make him happier. + +2011-02-11 08:56 Regina Obe <lr@pcorp.us> + + * [r6799] Add new section on loading rasters. will eventually copy + some content from gdal site and wiki site and various examples of + loading rasters and creating from scratch. + +2011-02-10 11:59 Regina Obe <lr@pcorp.us> + + * [r6798] #824 more corrections from Kashif Rasul + +2011-02-10 06:56 Regina Obe <lr@pcorp.us> + + * [r6797] wow geocoder flies on decent hardware. + +2011-02-10 06:10 Regina Obe <lr@pcorp.us> + + * [r6796] documentaiton is in DocBook XML not SGML (well not + anymore anyway). + +2011-02-10 06:01 Regina Obe <lr@pcorp.us> + + * [r6795] Add tiger_geocoder to enhancements, add Kashif Rasul to + credits in appreciation of his many corrections to the + documentation, other minor credits corrections + +2011-02-10 05:33 Regina Obe <lr@pcorp.us> + + * [r6794] Add some calrification notes to normalize_address + function. Get rid of superfluous line break in linux script. + +2011-02-10 04:40 Regina Obe <lr@pcorp.us> + + * [r6793] Revise README to be clearer. Update the tiger_loader + linux script. + +2011-02-09 16:36 Sandro Santilli <strk@keybit.net> + + * [r6792] topology.AddFace: report an "uncovered point" on missing + edges [RT-SIGTA] + +2011-02-09 16:01 Regina Obe <lr@pcorp.us> + + * [r6791] change references of the_geom and the_geog to geom and + geog. "the" is so much wasteful typing + +2011-02-09 12:54 Regina Obe <lr@pcorp.us> + + * [r6790] #821: doc typos errata from Kashif Rasul + +2011-02-08 17:42 Sandro Santilli <strk@keybit.net> + + * [r6789] Do not call lwmessage_truncate if not needed (an prior to + checking the args passed to it) + +2011-02-07 22:05 Regina Obe <lr@pcorp.us> + + * [r6788] fix typo + +2011-02-07 17:51 Regina Obe <lr@pcorp.us> + + * [r6787] document history_table feature + +2011-02-07 17:03 Sandro Santilli <strk@keybit.net> + + * [r6786] Also set LANG (see ticket #819) [RT-SIGTA] + +2011-02-07 16:53 Sandro Santilli <strk@keybit.net> + + * [r6785] Tag VOLATILE functions explicitly [RT-SIGTA] + +2011-02-06 00:39 Regina Obe <lr@pcorp.us> + + * [r6784] oops + +2011-02-06 00:34 Regina Obe <lr@pcorp.us> + + * [r6782] Fix typo in ST_SetSRID and add examples + +2011-02-05 00:53 Regina Obe <lr@pcorp.us> + + * [r6781] Id for chapter 4 in wrong place -- move, add missing -S + switch in loader detail, fix some typos in tiger geocoder and add + reference to shp2pgsql section in manual + +2011-02-04 18:33 Regina Obe <lr@pcorp.us> + + * [r6780] + +2011-02-04 18:33 Regina Obe <lr@pcorp.us> + + * [r6779] fix some spelling and revise some wording + +2011-02-04 17:33 Regina Obe <lr@pcorp.us> + + * [r6778] add description of loader function. + +2011-02-04 17:26 Sandro Santilli <strk@keybit.net> + + * [r6777] Use quote_ident more... + +2011-02-04 17:19 Sandro Santilli <strk@keybit.net> + + * [r6776] Fix a bug in topology.CreateTopoGeom in presence of + MixCased topologies [RT-SIGTA] + +2011-02-04 16:31 Sandro Santilli <strk@keybit.net> + + * [r6775] Fix a bug in topology.add{Node,Edge,Face} breaking on + MixedCased topology names [RT-SIGTA] + +2011-02-01 13:55 Regina Obe <lr@pcorp.us> + + * [r6774] Best guess at what the Linux equivalent should look like + will have to test later once get my Linux box setup again + +2011-02-01 13:53 Sandro Santilli <strk@keybit.net> + + * [r6773] ST_Estimated_Extent: make exception message about lack of + stats clearer + +2011-02-01 10:24 Sandro Santilli <strk@keybit.net> + + * [r6772] AsGML(TopoGeometry): test xref to visited face + [RT-SIGTA]. + +2011-02-01 09:55 Sandro Santilli <strk@keybit.net> + + * [r6771] AsGML(TopoGeometry): add test for faces marking visit of + edges [RT-SIGTA] + +2011-02-01 09:43 Sandro Santilli <strk@keybit.net> + + * [r6770] AsGML(TopoGeometry) Add test for ouput of multi puntual + features [RT-SIGTA] + +2011-01-31 20:26 Sandro Santilli <strk@keybit.net> + + * [r6769] Document the new version of topology.AsGML() signature + (polluting for commandline friendliness!) + +2011-01-31 17:33 Sandro Santilli <strk@keybit.net> + + * [r6768] Use a <gml:Face> tag for each topological face, allowing + proper xrefs. Needs xref testing (requires overlapping + topological features) [RT-SIGTA] + +2011-01-31 15:04 Regina Obe <lr@pcorp.us> + + * [r6767] minor formatting change in doc. #722 remove more + deprecated functions: ConvexHull. + +2011-01-31 14:39 Regina Obe <lr@pcorp.us> + + * [r6766] fix typo + +2011-01-31 14:37 Regina Obe <lr@pcorp.us> + + * [r6765] document ST_HasNoBand, fix note on ST_Value so appears in + right place in what's new index + +2011-01-30 18:40 Regina Obe <lr@pcorp.us> + + * [r6764] out in missing protos for ST_Value and not that hasnodata + is a new option for ST_Value in 2.0 + +2011-01-30 01:29 Regina Obe <lr@pcorp.us> + + * [r6763] rename to agree with documentation and other tiger folder + +2011-01-28 21:31 Regina Obe <lr@pcorp.us> + + * [r6762] remark out Paul's cunit test that fails on windows so my + regress checks don't always halt and can complete. + +2011-01-28 18:04 Sandro Santilli <strk@keybit.net> + + * [r6761] syntetize purpose of AsGML(TopoGeometry) + +2011-01-28 17:15 Sandro Santilli <strk@keybit.net> + + * [r6760] Use named parameters + +2011-01-28 17:05 Sandro Santilli <strk@keybit.net> + + * [r6759] Add a "gmlversion" parameter to + topology.AsGML(TopoGeometry). Test and document. [RT-SIGTA]. + +2011-01-28 16:01 Regina Obe <lr@pcorp.us> + + * [r6758] + +2011-01-28 16:00 Regina Obe <lr@pcorp.us> + + * [r6757] corrections to data types in functions -- had them + backwards + +2011-01-28 15:19 Regina Obe <lr@pcorp.us> + + * [r6756] missed some spots + +2011-01-28 15:01 Regina Obe <lr@pcorp.us> + + * [r6755] some other minor doc corrections. Stamp files with svn + author, revision etc keywords + +2011-01-28 14:37 Regina Obe <lr@pcorp.us> + + * [r6754] fix some typos + +2011-01-28 13:09 Regina Obe <lr@pcorp.us> + + * [r6753] put back missing tag + +2011-01-28 13:03 Regina Obe <lr@pcorp.us> + + * [r6752] simplify example + +2011-01-28 12:27 Regina Obe <lr@pcorp.us> + + * [r6751] get rid of some redundancy + +2011-01-28 12:25 Regina Obe <lr@pcorp.us> + + * [r6750] minor clarifications + +2011-01-28 12:11 Regina Obe <lr@pcorp.us> + + * [r6748] After having to answer this yet again I am finally + reduced to adding the age old question: Why does pgAdmin show + that my geometries are blank. Also change the FAQ to a pretty + anchor so its easily referenceable and permanent. + +2011-01-28 08:55 Sandro Santilli <strk@keybit.net> + + * [r6747] Change face.mbr field from BOX2D to GEOMETRY, and + gist-index it, closes ticket #800 [RT-SIGTA]. + +2011-01-28 06:14 Regina Obe <lr@pcorp.us> + + * [r6746] document normalize_address and pprint_addy functions of + tiger geocoder + +2011-01-27 20:40 Sandro Santilli <strk@keybit.net> + + * [r6745] Document new parameter of AsGML(TopoGeometry) [RT-SIGTA]. + +2011-01-27 20:35 Sandro Santilli <strk@keybit.net> + + * [r6744] AsGML(TopoGeometry): allow specifying a prefix for + topology element identifiers, and test it. [RT-SIGTA] + +2011-01-27 18:21 Regina Obe <lr@pcorp.us> + + * [r6743] correction + +2011-01-27 18:17 Regina Obe <lr@pcorp.us> + + * [r6742] put in a batch geocoding example, more performance + enhancements and loading changes. + +2011-01-27 15:56 Regina Obe <lr@pcorp.us> + + * [r6741] start documenting tiger geocoder + +2011-01-27 09:43 Sandro Santilli <strk@keybit.net> + + * [r6740] AsGML(TopoGeometry): fix xref syntax error (#811) + [RT-SIGTA] + +2011-01-27 08:48 Sandro Santilli <strk@keybit.net> + + * [r6739] topology.AddEdge: when an intersection occurs, also + report intersection point [RT-SIGTA] + +2011-01-26 16:57 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6738] Added header for RASTER_setBandIsNoData.Related ticket + #593. + +2011-01-26 16:28 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6737] The documentation for ST_BandIsNoData was changed by + error. This commit fixes + it. Related ticket #593. + +2011-01-26 16:08 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6736] Added function ST_SetBandIsNoData with tests and doc. + Deleted isnodata checking + for loader. Related ticket #593. + +2011-01-26 15:16 Regina Obe <lr@pcorp.us> + + * [r6735] put in logic to fill zipcode_lookup_base, fix some other + errors + +2011-01-26 13:43 Sandro Santilli <strk@keybit.net> + + * [r6734] Try to keep NEWS format consistent (80 cols, same + indenting as previous). Still too much information for my taste, + but it's a step forward. + +2011-01-26 13:34 Sandro Santilli <strk@keybit.net> + + * [r6733] Document the new 'visitedTable' parameter to + topology.AsGML [RT-SIGTA]. + +2011-01-25 21:52 Sandro Santilli <strk@keybit.net> + + * [r6732] Complete visited bookkeeping for AsGML(TopoGeometry) and + automate test for it [RT-SIGTA] + +2011-01-25 18:08 Sandro Santilli <strk@keybit.net> + + * [r6731] I realized we're in 2011... + +2011-01-25 17:16 Regina Obe <lr@pcorp.us> + + * [r6730] update installation instructions to include + raster_comments.sql, topology_comments.sql + +2011-01-25 17:04 Sandro Santilli <strk@keybit.net> + + * [r6729] AsGML(TopoGeometry): Add support for visited table and + xlink:xref for Edges [RT-SIGTA] + +2011-01-25 16:46 Regina Obe <lr@pcorp.us> + + * [r6728] Put in missing make topology_comments.sql and also add to + the make comments routine + +2011-01-25 15:05 Sandro Santilli <strk@keybit.net> + + * [r6726] Test use of the options argument to topology.AsGML + [RT-SIGTA] + +2011-01-25 14:52 Sandro Santilli <strk@keybit.net> + + * [r6725] Allow specifying GML output precision and options to the + topology.AsGML(TopoGeometry) function [RT-SIGTA]. + +2011-01-25 09:39 Sandro Santilli <strk@keybit.net> + + * [r6724] Make topology.AddEdge consistent with AddNode and AddFace + in that it will return an existing identical Edge, if found. + +2011-01-25 06:38 Regina Obe <lr@pcorp.us> + + * [r6723] cleanup -- other legacy stuff is already in tiger2006 + +2011-01-25 06:36 Regina Obe <lr@pcorp.us> + + * [r6722] + +2011-01-25 06:31 Regina Obe <lr@pcorp.us> + + * [r6721] reshuffle in preparation for merging in tiger 2010 + support version + +2011-01-25 06:20 Regina Obe <lr@pcorp.us> + + * [r6720] Add ST_ConcaveHull to news item + +2011-01-24 20:56 Sandro Santilli <strk@keybit.net> + + * [r6719] Test multi-component lineal topogeometries [RT-SIGTA] + +2011-01-24 20:52 Sandro Santilli <strk@keybit.net> + + * [r6718] Output multi-edge lineal TopoGeometry GML with a + meaningful edge ordering [RT-SIGTA] + +2011-01-24 15:06 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6716] Documentation updated for ST_BandIsNodata function. Added + band nodata checking + in loader script. + +2011-01-24 14:38 Sandro Santilli <strk@keybit.net> + + * [r6715] Add test for TopoSurface GML output with multi-face + TopoGeometry objects [RT-SIGTA] + +2011-01-24 14:18 Sandro Santilli <strk@keybit.net> + + * [r6714] load_topology* are generated now + +2011-01-24 14:14 Sandro Santilli <strk@keybit.net> + + * [r6713] Test the noprefix and customprefix GML outputs against + all geoms taken in consideration for the default GML .. + +2011-01-24 14:03 Sandro Santilli <strk@keybit.net> + + * [r6712] Add test for single-component areal TopoGeometry GML + output [RT-SIGTA] + +2011-01-24 14:01 Sandro Santilli <strk@keybit.net> + + * [r6711] AsGML(TopoGeometry): Do not force right-hand-rule on each + polygon ring (isn't needed and doesn't make sense as it would get + the hole rings wrong anyway) [RT-SIGTA] + +2011-01-24 11:43 Sandro Santilli <strk@keybit.net> + + * [r6710] AsGML(TopoGeometry): for TopoSurface, make the + directedEdge sequence be ordered to go around each ring (ie: make + the order meaningful) [RT-SIGTA]. + +2011-01-24 11:11 Sandro Santilli <strk@keybit.net> + + * [r6709] AsGML(TopoGeometry) add test for TopoCurve output (only + single-element, till ordering of components is sorted out) + [RT-SIGTA]. + +2011-01-24 09:31 Sandro Santilli <strk@keybit.net> + + * [r6708] Test GML output of puntual TopoGeometry objects. Lineal + and Areal are still undergoing manual tests and debate about + importance of components sequence ordering [RT-SIGTA]. + +2011-01-23 20:25 Sandro Santilli <strk@keybit.net> + + * [r6702] topology.AsGML(TopoGeometry): Write end node of edges. + Fixes bug #807 [RT-SIGTA] + +2011-01-23 14:48 Regina Obe <lr@pcorp.us> + + * [r6701] Document AsGML and fill in some missing examples in other + functions + +2011-01-22 23:02 Sandro Santilli <strk@keybit.net> + + * [r6700] Port topology.Geometry to $$ syntax [RT-SIGTA] + +2011-01-22 22:38 Sandro Santilli <strk@keybit.net> + + * [r6699] update email address + +2011-01-22 19:26 Sandro Santilli <strk@keybit.net> + + * [r6698] topology.AsGML: Add the missing gml:directedEdge part + within the gml:Face tag, appropriately (?) computing orientation + of each "ring" edge [RT-SIGTA] (#803) + +2011-01-22 18:46 Sandro Santilli <strk@keybit.net> + + * [r6697] Add test for ST_AsGML with long srsName. Expects what at + first sight looked like a bug (#804). + +2011-01-22 18:08 Sandro Santilli <strk@keybit.net> + + * [r6696] There's no need to add geometry columns when creating + Topological layers, that's something only useful for caching + geometries, so move to cache_geometries.sql + +2011-01-22 18:08 Sandro Santilli <strk@keybit.net> + + * [r6695] Cleanup the topology regress dir Makefile. Have + load_topology.sql generated to allow for specifying different + SRIDs. + +2011-01-22 17:26 Sandro Santilli <strk@keybit.net> + + * [r6694] Rename internal functions so to have an underscore + prefix, document them as such. Drop wrappers for internal + functions (they are not meant to be called by users so don't need + to be friendly) [RT-SIGTA] + +2011-01-22 17:21 Sandro Santilli <strk@keybit.net> + + * [r6693] topology.AsGML(TopoGeometry): Add support for specifying + a namespace prefix. See ticket #801. [RT-SIGTA] + +2011-01-22 16:10 Sandro Santilli <strk@keybit.net> + + * [r6692] topology.AsGML: Use Long CRS for pointProperty and + curveProperty [RT-SIGTA] + +2011-01-22 15:24 Sandro Santilli <strk@keybit.net> + + * [r6691] Use GML3 for Edge curveProperty and Node pointProperty + (see #802) [RT-SIGTA]. + +2011-01-22 13:55 Sandro Santilli <strk@keybit.net> + + * [r6690] topology.AsGML(TopoGeometry): add a <gml:Face> tag (See + ticket #803) [RT-SIGTA] + +2011-01-22 13:27 Sandro Santilli <strk@keybit.net> + + * [r6689] Don't miss to include the gml routines in the main + topology.sql + +2011-01-22 08:37 Sandro Santilli <strk@keybit.net> + + * [r6688] fix spurious ending bracket in topo-GML output [RT-SIGTA] + +2011-01-21 22:10 Sandro Santilli <strk@keybit.net> + + * [r6687] First version of topological gml output routines (still + miss the visited map) [RT-SIGTA] + +2011-01-21 14:08 Sandro Santilli <strk@keybit.net> + + * [r6684] I've just realized TopoElement is also used for + TopoGeomId/LayerID, thus can't restrict the second element to a + max of 4 or using layers beyond the forth would be impossible. + Fix the domain and test accordingly. Update documentation to be + informative on the matter. + +2011-01-21 13:21 Sandro Santilli <strk@keybit.net> + + * [r6683] Fix TopoGeometry -> Geometry conversion for + hierarchically defined TopoGeometries in presence of multiple + topologies. Take the chance so simplify a query. WARNING: This + fix doesn't have an automated regression test. + +2011-01-21 07:15 Regina Obe <lr@pcorp.us> + + * [r6682] document ST_RemoveIsoNode minor changes to match function + signatures toponame -> atopology for ST_ functions + +2011-01-21 07:03 Regina Obe <lr@pcorp.us> + + * [r6681] Move ST_GetFaceGeomety, document the non-existence of + ST_GetFaceEdges (its just a stub) + +2011-01-20 23:29 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r6680] -Fix for ticket 606: ST_Value now return NULL for nodata + value and ST_SetValue accept NULL values (if there is a nodata + value in the band). + + ST_Value accept a boolean parameter which, when set to false, + have the function to return nodata values as their true value + instead of null. + +2011-01-20 17:07 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6678] Added isnodata flag at core level and st_bandisnodata at + postgresql level. + Related ticket #593. Fixed bug with debug functions at raster + core level. Still + need to change the loader and the doc. + +2011-01-19 21:42 Regina Obe <lr@pcorp.us> + + * [r6675] #795: ST_Intersects raster documentation is confusing + +2011-01-19 21:11 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r6674] -Clarify help messages. + +2011-01-19 20:52 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r6673] -Added a -a option to append tiles to an existing table. + -Fixed ticket 542. The table WAS dropped but not recreated. + +2011-01-19 16:46 Sandro Santilli <strk@keybit.net> + + * [r6672] Make the TopoElement domain stricter to forbid arrays + with more than 2 elements and also checking the element type + being in valid range [RT-SIGTA] + +2011-01-18 23:24 Regina Obe <lr@pcorp.us> + + * [r6671] Put in section abstact for each + +2011-01-18 17:19 Sandro Santilli <strk@keybit.net> + + * [r6670] Raise an exception if AddEdge is called on a topology + which already defines faces other than the universe face (see + #781) + +2011-01-18 14:53 Regina Obe <lr@pcorp.us> + + * [r6669] #722: remove more deprecated functions - + ST_MakeLineGArray, Polygonize_GArray,PointFromWKB (proto), + max_distance + +2011-01-18 13:52 Sandro Santilli <strk@keybit.net> + + * [r6668] ValidateTopology: have temporary table dropped on commit + (#783). Thanks Andrea Peri [RT-SIGTA] + +2011-01-18 12:50 Regina Obe <lr@pcorp.us> + + * [r6667] Link to Vincent Picavet's great Foss4G 2010 presentation + on Topology and Network Analysis. + +2011-01-18 12:28 Regina Obe <lr@pcorp.us> + + * [r6666] minor corrections + +2011-01-18 06:38 Regina Obe <lr@pcorp.us> + + * [r6665] Fix #786 ST_MoveIsoNode gives ST_Intersects is not + unique. Also change to use newer $$ quoting syntax. + +2011-01-18 06:10 Regina Obe <lr@pcorp.us> + + * [r6664] Fix typo + +2011-01-18 06:06 Regina Obe <lr@pcorp.us> + + * [r6663] ST_MoveIsoNode + +2011-01-18 05:17 Regina Obe <lr@pcorp.us> + + * [r6662] fix redundancy in description + +2011-01-18 04:45 Regina Obe <lr@pcorp.us> + + * [r6661] ST_NewEdgesSplit, add new processing section, fix some + links + +2011-01-17 23:07 Regina Obe <lr@pcorp.us> + + * [r6660] Add ST_AddIsoEdge (still need to put in examples), put in + more back links. Revise special index section to also consider + topology aggregates + +2011-01-17 22:35 Sandro Santilli <strk@keybit.net> + + * [r6659] topology.AddNode: fix detection of edge crossing (#780) + [RT-SIGTA] + +2011-01-17 21:32 Sandro Santilli <strk@keybit.net> + + * [r6658] ValidateTopology: Use a temporary table to create face + geometries only once. Huge speed boost for #772. + +2011-01-17 21:03 Sandro Santilli <strk@keybit.net> + + * [r6657] ValidateTopology: Put some water on fire by avoiding a + full cartesian product scan (#772). It's still too slow, but it + is a step forward. + +2011-01-17 19:58 Sandro Santilli <strk@keybit.net> + + * [r6656] ST_DWithin already includes a bounding box check + +2011-01-17 18:15 Regina Obe <lr@pcorp.us> + + * [r6655] Put in accent in Jorge's name + +2011-01-17 13:18 Regina Obe <lr@pcorp.us> + + * [r6654] forgot this in last commit + +2011-01-17 13:18 Regina Obe <lr@pcorp.us> + + * [r6653] fix typos in Mat's name + +2011-01-17 12:16 Regina Obe <lr@pcorp.us> + + * [r6652] document ST_InitTopoGeo, cleanup some of the sql-mm + labelings + +2011-01-17 10:39 Regina Obe <lr@pcorp.us> + + * [r6651] Document ST_AddIsoNode - still need to add examples. + Update ValidateTopology to reflect enhancements and bug fixes in + 2.0. + +2011-01-17 09:04 Sandro Santilli <strk@keybit.net> + + * [r6650] topology.ValidateTopology: rewrite the edge crossing + detection query. Fixes a false positive (#777) and unexpectedly a + bunch of false negative in the legacy_invalid testcase (now + properly checked visually). [RT-SIGTA]. + +2011-01-17 08:47 Sandro Santilli <strk@keybit.net> + + * [r6649] topology.AddEdge: correctly handle the case in which a + newly added closed edge touches an existing closed edge with an + endpoint over a non-endpoint [RT-SIGTA]. + +2011-01-17 08:47 Sandro Santilli <strk@keybit.net> + + * [r6648] topology.AddFace: raise another WARNING about + next_left/right_face element of topology edges not being set as + dictated by the model + +2011-01-17 03:26 Regina Obe <lr@pcorp.us> + + * [r6647] note magnitude of deprecation + +2011-01-16 21:42 Sandro Santilli <strk@keybit.net> + + * [r6646] ValidateTopology: don't compute full intersection matrix + to detect edge-node intersection. Use ST_DWithin instead. Use + ST_DWithin for coincident nodes detection as well, so to be more + consistent [RT-SIGTA] + +2011-01-16 21:29 Sandro Santilli <strk@keybit.net> + + * [r6645] ValidateTopology: && operator is not enough to tell if + two points are cohincident (it was at time of HWGEOM...) + [RT-SIGTA] + +2011-01-16 20:17 Regina Obe <lr@pcorp.us> + + * [r6644] release notes minor updates while still fresh in my mind. + +2011-01-16 17:19 Sandro Santilli <strk@keybit.net> + + * [r6643] ignore more generated files + +2011-01-16 12:08 Regina Obe <lr@pcorp.us> + + * [r6642] document ST_3DLongestLine and add missing + polyhedralsurface and 3D support flags for ST_3D family of + functions + +2011-01-16 11:22 Regina Obe <lr@pcorp.us> + + * [r6641] #776: replace dump with ST_Dump in ST_CreateTopogeo + +2011-01-16 10:36 Sandro Santilli <strk@keybit.net> + + * [r6640] Drop unused domain TopoGeomElementArray. See #775 + +2011-01-16 10:22 Regina Obe <lr@pcorp.us> + + * [r6639] minor corrections and start documenting ST_CreateTopoGeo + +2011-01-16 09:10 Regina Obe <lr@pcorp.us> + + * [r6638] #774: regress fails - Oops forgot to commit this file on + last commit + +2011-01-16 08:18 Regina Obe <lr@pcorp.us> + + * [r6637] #722: remove drecated functions BuildArea, MakePolygon + +2011-01-15 23:55 Sandro Santilli <strk@keybit.net> + + * [r6636] html/postgis.html doesn't really depend on images, and + encoding such dep has the only effect to _always_ rebuild the + documentation, which defeats the purpose of 'make'... + +2011-01-15 23:37 Sandro Santilli <strk@keybit.net> + + * [r6635] There's no 'html' rule, so there's no point in making it + PHONY... + +2011-01-15 23:37 Sandro Santilli <strk@keybit.net> + + * [r6634] Don't need to clean image_src in maintainer-clean as + that's already done by clean, which is a dependency of + maintainer-clean + +2011-01-15 23:14 Sandro Santilli <strk@keybit.net> + + * [r6633] topology.AddFace: group face boundary edge finding query + results to avoid considering the _same_ edge multiple times. Can + reduce execution time from _hours_ to _minutes_ [RT-SIGTA] + +2011-01-15 19:11 Regina Obe <lr@pcorp.us> + + * [r6632] ST_GetFaceGeometry and minor formatting + +2011-01-15 18:49 Regina Obe <lr@pcorp.us> + + * [r6631] fix some typos + +2011-01-15 14:59 Regina Obe <lr@pcorp.us> + + * [r6630] Put back AddNode -- accidentally replaced with an extra + AddEdge. + +2011-01-15 14:33 Regina Obe <lr@pcorp.us> + + * [r6629] AddFace, minor additions to other functions and note + about dependencies on GEOS 3.3 + +2011-01-15 07:14 Regina Obe <lr@pcorp.us> + + * [r6628] document addnode, fix typo + +2011-01-15 06:50 Regina Obe <lr@pcorp.us> + + * [r6627] Add examples for AddEdge, fix typo, add TIGER overview + link as an example of a topologically based database for people + not clear of its utility. + +2011-01-14 16:40 Sandro Santilli <strk@keybit.net> + + * [r6626] topology.AddEdge: handle case of endpoint intersection + between closed edges. Fixes #770. [RT-SIGTA] + +2011-01-14 00:01 Regina Obe <lr@pcorp.us> + + * [r6625] Get rid of ST_BandHasNoDataValue and + ST_SetBandHasNoDataValue. Amend ST_BandNoDataValue to reflect new + way of setting it to NULL if you want all pixel values + considered. + +2011-01-13 23:56 Regina Obe <lr@pcorp.us> + + * [r6624] Document AddEdge function will provide example later + +2011-01-13 23:44 Regina Obe <lr@pcorp.us> + + * [r6623] forgot to update the description too + +2011-01-13 23:40 Regina Obe <lr@pcorp.us> + + * [r6622] Amend ST_GeometryN to note singular geometry behavior + change + +2011-01-13 21:36 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6621] Functions ST_BandHasNodataValue and + ST_SetBandHasNodataValue deleted. Related ticket #602. + +2011-01-13 20:09 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6620] Minor bug solved in debug functions. + +2011-01-13 15:05 Regina Obe <lr@pcorp.us> + + * [r6619] fix typo + +2011-01-13 14:55 Regina Obe <lr@pcorp.us> + + * [r6618] Amend release notes to include new changes in 2.0 + +2011-01-13 13:36 Regina Obe <lr@pcorp.us> + + * [r6617] mark TopoElementArray_agg as new in 2.0.0, back reference + topoelementarray back to this function. + +2011-01-13 13:21 Sandro Santilli <strk@keybit.net> + + * [r6616] add ST_RelateMatch item + +2011-01-13 09:37 Regina Obe <lr@pcorp.us> + + * [r6615] fix another id typo + +2011-01-13 09:34 Regina Obe <lr@pcorp.us> + + * [r6614] fix link id + +2011-01-13 08:48 Regina Obe <lr@pcorp.us> + + * [r6613] topolelementarray_agg and revise xsl to comment agg (hack + fo r now will do better later) + +2011-01-13 08:27 Regina Obe <lr@pcorp.us> + + * [r6612] Another minor change to ST_3DShortestLine. Document + topoelementarraay and GetTopoGeomElementArray (which by the ways + seems to me a bit of a misnomer) + +2011-01-13 07:13 Regina Obe <lr@pcorp.us> + + * [r6611] Minor formatting changes of ST_3DShortestLine, get rid of + note abotu ST_3DMaxDistance only working for points and + linestrings now that it works for most everything. + +2011-01-12 22:37 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6610] Fixed bug #655. + +2011-01-12 22:03 Regina Obe <lr@pcorp.us> + + * [r6609] #768: get rid of replace ndims with st_ndims in + populate_geometry_columns + +2011-01-12 22:02 Mateusz Loskot <mateusz@loskot.net> + + * [r6608] [raster] Cleaned and updated copyright notice. + +2011-01-12 21:58 Nicklas Avén <nicklas.aven@jordogskog.no> + + * [r6607] Added ST_3DShortestLine in doc and some small editing. + ST_3DLongestLine is still missing. + Regina, please take a look if it looks ok. + +2011-01-12 21:17 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6606] Regression test expected result is now empty. Related + tickets: #759, #769. + +2011-01-12 19:10 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r6605] -Revert to original values for two test failing on Mat + machine. Those values are the good ones on Pierre`s Windows and + Jorge`s Linux. Something must have gone wrong on Mat`s one. + +2011-01-12 17:24 Regina Obe <lr@pcorp.us> + + * [r6604] update see also links + +2011-01-12 17:22 Regina Obe <lr@pcorp.us> + + * [r6603] Get rid of note in ST_3DDistance that states only works + for linestrings and points. Now works for all. Add an example of + polygon/multilinestring and update 3DClosestPoint example to be + the same for contrast compare + +2011-01-12 11:07 Regina Obe <lr@pcorp.us> + + * [r6602] get rid of note about 3d relatonship dist functions only + workng for points and linestrings. They work for polygons and + even polyhedralsurfaces though need to verify answers are right. + +2011-01-12 10:23 Regina Obe <lr@pcorp.us> + + * [r6601] update to reflect note about breaking change in naming of + PixelSize to Scale + +2011-01-12 08:14 Regina Obe <lr@pcorp.us> + + * [r6600] GetTopologyName, GetTopologyID accessors + +2011-01-12 07:52 Regina Obe <lr@pcorp.us> + + * [r6599] remove availaiblit 2.0 from existing functions since they + were available before (will reserve that for really new + functions). Add domains section and accessors section. Revise + topology_comments to be able to put in descriptors for domains + +2011-01-12 06:32 Regina Obe <lr@pcorp.us> + + * [r6598] ValidateTopology and validatetopology_returntype + +2011-01-12 05:01 Regina Obe <lr@pcorp.us> + + * [r6597] get rid of deprecated calls and checks to srid() and + setsrid() and ndims() in populate_geometry_columns, + UpdateGeometrySRID, probe_geometry_columns, find_srid + +2011-01-11 17:18 Regina Obe <lr@pcorp.us> + + * [r6596] make relatematch a conditional GEOS 3.3 test + +2011-01-11 15:53 Regina Obe <lr@pcorp.us> + + * [r6595] Add another type, add missing element, update make check + example in installation. Fix error introduced in regress that + prevented all tests from running. + +2011-01-11 15:20 Regina Obe <lr@pcorp.us> + + * [r6594] Give installation a pretty anchor name so can be + referenced easily from elsewhere. Update to include how to + compile with topology and raster support. Add a type section to + topology to define structure of topogeometry etc. Ammend + topology_comments to be able to extra type comments. + +2011-01-11 09:12 Regina Obe <lr@pcorp.us> + + * [r6593] #764: Topology error using ST_AddIsoNode (now that raster + has an ST_Intersects it is now more necessary to not rely on auto + casts) + +2011-01-11 03:38 Regina Obe <lr@pcorp.us> + + * [r6592] fix duplicate refentry id + +2011-01-11 03:22 Regina Obe <lr@pcorp.us> + + * [r6591] #763: documentation had wrong datatype for tg_type which + made the associated comment break + +2011-01-10 17:31 Regina Obe <lr@pcorp.us> + + * [r6590] #760: missed some + +2011-01-10 17:27 Regina Obe <lr@pcorp.us> + + * [r6589] #760: replace deprecated function names with new names so + all regress tests pass again. This should completely work now. + +2011-01-10 17:13 Regina Obe <lr@pcorp.us> + + * [r6588] Start replacing deprecated names with new names - still + more to do + +2011-01-10 16:36 Regina Obe <lr@pcorp.us> + + * [r6587] #722: Get rid of more deprecated functions - mem_size, + xmax, xmin,ymax, ymin,zmflag,zmax,zmin + +2011-01-10 14:21 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6586] Deleted gserialized check. It's safe to use + geometry_gist_sel. Related ticket #758. + +2011-01-09 18:38 Regina Obe <lr@pcorp.us> + + * [r6585] Get rid of now unuseful note in ST_Value. Update + short-description to reflect now works with geometry points + +2011-01-09 16:01 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6584] Replaced annoying warning message for a debug-only + message. Related ticket #759. + +2011-01-08 10:51 Nicklas Avén <nicklas.aven@jordogskog.no> + + * [r6583] fix typo from r6580, and some enhanced notes + +2011-01-07 15:12 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6582] Bug solved: RASTER_DEBUGf replaced by RASTER_DEBUGF. + Related ticket #757. + +2011-01-07 13:38 Regina Obe <lr@pcorp.us> + + * [r6581] remove wmsservers_old so its failure doesn't halt further + make check + +2011-01-07 13:08 Nicklas Avén <nicklas.aven@jordogskog.no> + + * [r6580] Fix for ticket #755 + +2011-01-07 10:48 Sandro Santilli <strk@keybit.net> + + * [r6579] Enlarge the diagram image, by Andrea Peri (#750) + +2011-01-07 09:55 Sandro Santilli <strk@keybit.net> + + * [r6578] Fix bug in topology.DropTopology getting confused in + presence of multiple topologies [RT-SIGTA] + +2011-01-07 09:54 Sandro Santilli <strk@keybit.net> + + * [r6577] Add TopoElementArray_agg function, to help with + TopoGeometry construction [RT-SIGTA] + +2011-01-05 23:35 Regina Obe <lr@pcorp.us> + + * [r6576] #722 : remove deprecated functions (part): contains, + intersection, line_interpolate_point, line_locate_point, + line_substring, locate_between_measures + +2011-01-05 22:25 Regina Obe <lr@pcorp.us> + + * [r6575] #722 remove deprecated functions (part): boundary, + GeomUnion, intersects, IsRing, IsSimple, + length2d_spheroid, locate_along_measure, relate,PointOnSurface, + SnapToGrid, symmetricdifference, touches + +2011-01-05 17:41 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6574] Replaced references to "pixsize" by "scale". Complete the + previous commit. + Related ticket #654 + +2011-01-05 17:38 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6573] Updated plpgsql scripts, replacing "PixelSize" with + "Scale". Related ticket #654 + +2011-01-05 17:01 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6572] Call to ctx->warn replaced by RASTER_DEBUGF, to avoid + annoying and unexpected messages in calls to st_bandmetadata. + +2011-01-05 14:56 Regina Obe <lr@pcorp.us> + + * [r6571] #722 (part): Down with really really dumb constructors :) + GeomCollFromText,LineFromText,LineFromWKB,LineStringFromText,LinestringFromWKB,LineMerge,MLineFromText + ,MLineFromWKB,MPointFromText,MPolyFromWKB,MultiLineFromWKB,MultiLineStringFromText,MultiPointFromWKB, + ST_Polygonize_GArray,PolyFromText,PolyFromWKB,PolygonFromWKB,PointFromText,PointFromWKB + +2011-01-05 13:47 Regina Obe <lr@pcorp.us> + + * [r6570] more cleanup of operator functions that are now removed + +2011-01-05 13:36 Regina Obe <lr@pcorp.us> + + * [r6569] remove related operator, chip no longer installed. I + still think we need to get rid of the DROP CASCADES in this file + +2011-01-05 13:34 Regina Obe <lr@pcorp.us> + + * [r6568] #302: okay I forgot some - remove old functions that are + ST_ redundant copies of operator ones + st_geometry_lt,st_geometry_le,st_geometry_le,st_geometry_gt,st_geometry_ge,st_geometry_eq,st_geometry_cmp, + postgis_gist_sel,postgis_gist_joinsel,st_postgis_gist_sel,st_postgis_gist_joinsel,st_geometry_overleft, + st_geometry_overabove,st_geometry_left,st_geometry_right,st_geometry_above, + st_geometry_below,st_geometry_contain + ,st_geometry_contained,st_geometry_overlap,st_geometry_same + +2011-01-05 05:57 Regina Obe <lr@pcorp.us> + + * [r6567] #302 completed I think: Drop ST_ duplicate variants of + functions underneath TYPE and OPERATOR definitions. + remove: st_geometry_analyze + +2011-01-04 17:44 Regina Obe <lr@pcorp.us> + + * [r6566] #302 (part done): Drop ST_ duplicate variants of + functions underneath TYPE and OPERATOR definitions. + st_box3d_in, st_box3d_out,st_spheroid_in, + st_spheroid_out,st_geometry_in, st_geometry_out, + st_geometry_recv,st_geometry_send + +2011-01-04 17:25 Regina Obe <lr@pcorp.us> + + * [r6565] #722 - remove more deprecated functions - crosses, + within,multipointfromtext,mpolyfromtext, + multipolygonfromtext + +2011-01-04 13:59 Regina Obe <lr@pcorp.us> + + * [r6564] remove deprecated functions: + bdpolyfromtext,bdmpolyfromtext,collect,disjoint,memcollect,memgeomunion, + unite_garray,st_unit_garray . + reshuffle legacy.sql.in.c so aggregates and dependencies are + together + +2011-01-04 13:35 Regina Obe <lr@pcorp.us> + + * [r6563] remove more deprecated: dimension,exteriorring, + geometryn,interiorringn, isempty,isclosed, + m,numinteriorring, numinteriorrings,pointn,x,y,z + +2011-01-04 13:07 Regina Obe <lr@pcorp.us> + + * [r6562] remove deprecated functions: + addpoint,ndims,numgeometries,numpoints,removepoint,setpoint + +2011-01-04 12:51 Regina Obe <lr@pcorp.us> + + * [r6561] remove more deprecated functions + +2011-01-03 19:26 Regina Obe <lr@pcorp.us> + + * [r6560] get rid of more deprecated functions + +2011-01-03 18:52 Regina Obe <lr@pcorp.us> + + * [r6559] remove more deprecated functions + +2011-01-03 18:24 Regina Obe <lr@pcorp.us> + + * [r6558] + +2011-01-03 16:35 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6557] Deleted old flex/bison analyzer for MapAlgebra. Newer + version on raster/rt_core. + +2011-01-03 16:17 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6556] Added regress test files for ST_IsEmpty and ST_HasNoBand + (they were missed in previous commit) + +2011-01-03 16:07 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6555] Added code for ST_IsEmpty and ST_HasNoBand functions. And + test code for the + first one. Related tickets #592, #593. + +2011-01-03 11:53 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6554] Changed information return by postgis_raster_build_date + and + postgis_raster_lib_version, to match the PostGIS build date and + version. Related + ticket #653 + +2011-01-03 10:55 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6553] Raster doc updated with the new names of several + functions (Box2D, Scale, etc). + Related ticket #654 + +2011-01-03 10:46 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6552] Renamed accessors and editors of 'PixelSize' to 'Scale', + including tests. + Related ticket #654. + +2011-01-02 22:21 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6551] Some modifications made on basic MapAlgebra lexer/parser. + Very basic version just now. + +2011-01-01 15:35 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6550] Temporarily include postgis/gserialized.h file in + raster/rt_pg/rtpostgis.sql.in.c to get access to GSERIALIZED_ON + and avoid error with gserialized enabled + +2010-12-31 08:12 Regina Obe <lr@pcorp.us> + + * [r6549] add gist index overlap tests + +2010-12-31 01:53 Regina Obe <lr@pcorp.us> + + * [r6548] update bios + +2010-12-30 23:28 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6547] Changed some functions names for operators. Related + tickets #742, #730 + +2010-12-30 23:17 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6546] gserialized enabled ST_Reverse LINESTRING EMPTY crash + (#743) + +2010-12-30 21:00 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6545] Convex hull serialization problem (#741) + +2010-12-30 18:31 Nicklas Avén <nicklas.aven@jordogskog.no> + + * [r6543] rounding precision difference in measures regress test + #703, #735, #607 + +2010-12-30 16:54 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6542] Guard against empty in isclosed (#740) + +2010-12-30 00:14 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6540] Add in gserialized-ready selectivity functions for 2d + default index. + +2010-12-29 18:51 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6538] ST_ExteriorRing POLYGON EMPTY crash (#708) + +2010-12-29 15:49 Nicklas Avén <nicklas.aven@jordogskog.no> + + * [r6537] typo in comment + +2010-12-29 15:38 Regina Obe <lr@pcorp.us> + + * [r6536] Get rid of a lot of deprecated functions. People will + hate me c'est la vie. + +2010-12-29 15:37 Regina Obe <lr@pcorp.us> + + * [r6535] get rid of more deprecated calls, but keep old deprecated + wmsservers and rename to wmsservers_old. Create a new version + wmsservers_new that doesn't use deprecated calls. the old will + fail once I pull the switch on old deprecated calls, but the new + should work. + +2010-12-29 15:17 Regina Obe <lr@pcorp.us> + + * [r6534] remove deprecated tests + +2010-12-29 14:50 Regina Obe <lr@pcorp.us> + + * [r6533] forgot these + +2010-12-29 14:48 Regina Obe <lr@pcorp.us> + + * [r6532] get rid of more deprecated + +2010-12-29 14:14 Regina Obe <lr@pcorp.us> + + * [r6531] Get rid of more deprecated calls + +2010-12-29 14:07 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6530] Update test to reflect that polygons are now supported. + +2010-12-29 09:58 Regina Obe <lr@pcorp.us> + + * [r6529] start new section + +2010-12-28 22:12 Nicklas Avén <nicklas.aven@jordogskog.no> + + * [r6528] 3D distance functions against polygons + +2010-12-28 21:58 Regina Obe <lr@pcorp.us> + + * [r6527] fix dangling RT_ST_Box2D references + +2010-12-28 18:24 Regina Obe <lr@pcorp.us> + + * [r6526] Get rid of deprecated calls + +2010-12-28 18:24 Regina Obe <lr@pcorp.us> + + * [r6525] get rid of deprecated calls + +2010-12-28 18:22 Regina Obe <lr@pcorp.us> + + * [r6524] start getting rid of deprecated calls + +2010-12-28 18:00 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6523] Fix regression failure in standard serialization mode. + (#735) + +2010-12-28 17:16 Sandro Santilli <strk@keybit.net> + + * [r6522] Default topology tolerance is 0, not -1 + +2010-12-28 15:47 Regina Obe <lr@pcorp.us> + + * [r6521] reenable ST_AddPoint + +2010-12-28 01:10 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6520] Over-determined dimensionality in building line from + lwptarray + +2010-12-28 00:54 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6519] Whoops, senses of many 2d operators were reversed. + +2010-12-28 00:42 Regina Obe <lr@pcorp.us> + + * [r6518] miscellaneous fixes and indentation + +2010-12-28 00:27 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6517] T_Distance_Spheroid is kinda broken (#677) + +2010-12-28 00:24 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6516] ST_Distance_Spheroid is kinda broken (#677) + +2010-12-27 22:41 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6515] ST_MakeLine aggregate function crashes with empty + geometries (#729) + +2010-12-27 11:56 Sandro Santilli <strk@keybit.net> + + * [r6514] PG_CONFIG seems to be needed for PGXS + +2010-12-27 11:10 Sandro Santilli <strk@keybit.net> + + * [r6513] Add ST_SharedPaths and ST_Snap items + +2010-12-27 11:05 Sandro Santilli <strk@keybit.net> + + * [r6512] Do not consider DEBUG and NOTICE mesages when running + sqlmm regression tests. Should fix #734. + +2010-12-27 03:38 Regina Obe <lr@pcorp.us> + + * [r6511] ST_Box2D -> Box2D + +2010-12-27 01:40 Regina Obe <lr@pcorp.us> + + * [r6510] get rid of more functions + +2010-12-26 19:27 Regina Obe <lr@pcorp.us> + + * [r6509] revise to include mention of topology support + +2010-12-26 19:11 Regina Obe <lr@pcorp.us> + + * [r6507] fix tag typo pointed out by strk + +2010-12-26 18:47 Regina Obe <lr@pcorp.us> + + * [r6506] put AddTopo.. example in programlisting tag, minior + indenting changes + +2010-12-26 13:24 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6505] ST_Box2D replaced by Box2D. Related ticket #730. + +2010-12-25 19:38 Regina Obe <lr@pcorp.us> + + * [r6504] DropTopogeometryColumn + +2010-12-25 19:02 Regina Obe <lr@pcorp.us> + + * [r6503] + +2010-12-25 18:58 Regina Obe <lr@pcorp.us> + + * [r6502] Example for addtopogeometrycolumn + +2010-12-24 22:08 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6501] Change default gserialized gist index to 2d and put all + the old operators back in place. + +2010-12-24 18:13 Regina Obe <lr@pcorp.us> + + * [r6500] fix data type mismatches that got flagged when generating + topology comments, put in a set_path clause for topology comments + generation + +2010-12-24 18:01 Regina Obe <lr@pcorp.us> + + * [r6499] Start work on topology database help and garden tester. + +2010-12-24 17:53 Regina Obe <lr@pcorp.us> + + * [r6498] AddTopoGeometryColumn + +2010-12-24 10:22 Sandro Santilli <strk@keybit.net> + + * [r6497] Update with some integrations provided by Andrea Peri + [RT-SIGTA] + +2010-12-24 01:38 Regina Obe <lr@pcorp.us> + + * [r6496] Fix for #732 - chip does not exist + +2010-12-23 22:49 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6495] Add more tickets tests up to #700 + +2010-12-23 22:06 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6494] Fix conversion to geometry (#730) + +2010-12-23 19:06 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6493] Add some tickets from the trac into regression + +2010-12-23 18:05 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6492] Move clone prototypes back into public... + +2010-12-23 18:03 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6491] ST_AddPoint is broken (#662) + +2010-12-23 17:41 Regina Obe <lr@pcorp.us> + + * [r6490] ability to exclude operators from testing + +2010-12-23 17:30 Sandro Santilli <strk@keybit.net> + + * [r6489] Other CREATEFUNCTION and _VOLATILE* gone (see #714) + +2010-12-23 17:21 Regina Obe <lr@pcorp.us> + + * [r6488] log more sql + +2010-12-23 17:04 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6487] ST_MakeBox2D crashes with LINESTRING (#728) + +2010-12-23 14:19 Sandro Santilli <strk@keybit.net> + + * [r6486] Stop relying on preprocessor for CREATEFUNCTION and + _VOLATILE (see #714) + +2010-12-23 13:31 Regina Obe <lr@pcorp.us> + + * [r6485] miss end para + +2010-12-23 12:49 Sandro Santilli <strk@keybit.net> + + * [r6484] Make ST_GetFaceGeometry use ST_BuildArea rather than + assuming first polygon coming out of Polygonize will be the + correct one. Fixes ticket #726. Enables automated testing for it. + +2010-12-23 12:28 Sandro Santilli <strk@keybit.net> + + * [r6483] Add test showing bug in st_getfacegeometry + +2010-12-23 07:57 Sandro Santilli <strk@keybit.net> + + * [r6482] more git ignores + +2010-12-22 22:40 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6481] Last regression fixes for postgis-on-gserialized + +2010-12-22 21:16 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6480] Change srid from uint32 to int32 and update gserialized + and TYPMOD handlers to deal with signed SRIDs + +2010-12-22 20:02 Regina Obe <lr@pcorp.us> + + * [r6479] miscellaneous + +2010-12-22 19:41 Regina Obe <lr@pcorp.us> + + * [r6478] Goodbye length + +2010-12-22 19:15 Regina Obe <lr@pcorp.us> + + * [r6477] Good bye simplify + +2010-12-22 19:04 Regina Obe <lr@pcorp.us> + + * [r6476] History #515: good bye chip (we can hold on to the + dependency functions thru postgis 2.0 and then maybe completely + rid in 2.1) + +2010-12-22 18:59 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6475] Basic flex/bison grammar to start working with raster + MapAlgebra + +2010-12-22 18:45 Sandro Santilli <strk@keybit.net> + + * [r6474] Support faces with all edges on the same side, and test + [RT-SIGTA] + +2010-12-22 18:42 Regina Obe <lr@pcorp.us> + + * [r6473] get rid of addbbox,dropbbox,hasbbox (and replace + occurrences in regress with newer postgis_addbbox etc) + +2010-12-22 18:24 Sandro Santilli <strk@keybit.net> + + * [r6472] Add rules to avoid the infinite loop took before + ./configure is run + +2010-12-22 17:27 Sandro Santilli <strk@keybit.net> + + * [r6471] Implement topology.AddFace and add test + +2010-12-22 17:08 Regina Obe <lr@pcorp.us> + + * [r6470] move all deprecated Affine functoins to legach.sql.in.c, + remove use in non-deprecated functions and in regress tests + +2010-12-22 06:17 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6469] Add legacy file for removed-but-not-forgotten old + function aliases + +2010-12-22 01:08 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6468] Continue working GSERIALIZED_ON into the code base. + Working on switching BOX2DFLOAT4 to a GBOX + +2010-12-21 23:56 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6467] Remove some ST_ variants of cast-support functions + (#302), and start legacy.sql.in.c (#722) + +2010-12-21 22:19 Regina Obe <lr@pcorp.us> + + * [r6466] fix typo + +2010-12-21 22:14 Regina Obe <lr@pcorp.us> + + * [r6464] point relation functions to DE-9IM section of docs for + more info + +2010-12-21 21:39 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6463] More clean-up and work on using gserialized. + +2010-12-21 18:01 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6462] Push the UNKNOWN forcing down into gserialized get/set + +2010-12-21 17:38 Regina Obe <lr@pcorp.us> + + * [r6461] Document ST_RelateMatch -- polish up later + +2010-12-21 17:36 Sandro Santilli <strk@keybit.net> + + * [r6460] Don't release memory associated with arguments. Fixes + #725. + +2010-12-21 10:32 Sandro Santilli <strk@keybit.net> + + * [r6459] Implement ST_RelateMatch, see ticket #717. [RT-SIGTA] + +2010-12-21 01:55 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6458] Some preliminary fixes to support SRID_UNKNOWN == 0 + +2010-12-20 23:34 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6457] Add regression test for #723 + +2010-12-20 22:01 Sandro Santilli <strk@keybit.net> + + * [r6456] Fix addEdge when both endpoints are shared with an + existing edge (and test) [RT-SIGTA] + +2010-12-20 19:41 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6455] Fix last regression break in casting + +2010-12-20 19:31 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6454] Arg, there's regression breaks in the last commit! + +2010-12-20 19:16 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6453] ST_Intersection for geography is really messed up (#723) + +2010-12-20 12:03 Regina Obe <lr@pcorp.us> + + * [r6452] fix typo + +2010-12-20 04:39 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6450] Remove a few more old constructions in favour of + forward-compatible approaches. + +2010-12-18 21:48 Regina Obe <lr@pcorp.us> + + * [r6448] fix spatial_class update + +2010-12-18 16:44 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6447] Add the operators to the index opclass too + +2010-12-18 16:42 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6446] Add some operators to indexes on gserialized + +2010-12-18 15:31 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6445] Add in test for #720 + +2010-12-18 15:27 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6444] ST_Transform is broken for all MULTI geometries (#720), + wonder how that got through... + +2010-12-18 05:06 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6443] Add gserialized.h. Later this can be the central place + for index/object utilities, for now it just holds the switch to + turn the gserialized code on and off while we develop + +2010-12-18 04:54 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6442] Remove oddity around gbox duplication + +2010-12-18 00:38 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6441] More syncro between geometry and geography. Stubbed index + binding. + +2010-12-17 22:16 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6440] Re-name GiST index functions generically for re-use in + geometry. + +2010-12-17 22:03 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6439] Review to prepare generic index bindings for geography, + then geometry + +2010-12-17 21:32 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6438] Harmonize some index support functions to be more generic + gserialized functions and less specific geography functions. + +2010-12-17 20:10 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6437] Re-orgs to push the geodetic/cartesian divide a little + further under the covers as part of the geometry/geography group + hug at the index bindings level. + +2010-12-17 18:34 Regina Obe <lr@pcorp.us> + + * [r6436] fix typo add DropTopology + +2010-12-17 17:56 Sandro Santilli <strk@keybit.net> + + * [r6435] Add regress testing for topology.AddEdge + +2010-12-17 17:44 Regina Obe <lr@pcorp.us> + + * [r6434] + +2010-12-17 17:24 Regina Obe <lr@pcorp.us> + + * [r6433] + +2010-12-17 17:19 Sandro Santilli <strk@keybit.net> + + * [r6432] Add a note about possible semantic change + +2010-12-17 17:16 Sandro Santilli <strk@keybit.net> + + * [r6431] New topology.AddEdge function [RT-SIGTA] + +2010-12-17 16:45 Regina Obe <lr@pcorp.us> + + * [r6430] fix typos + +2010-12-17 16:34 Regina Obe <lr@pcorp.us> + + * [r6429] Put in section in manual for topology and extras in + general. Change postgis.refractions.net to www.postgis.org + +2010-12-17 16:16 Sandro Santilli <strk@keybit.net> + + * [r6428] Use newer quoting paradigm ($$); use ST_Crosses when + willing to check crossing, not just intersection...; add proper + credits + +2010-12-17 15:51 Sandro Santilli <strk@keybit.net> + + * [r6427] Add an inspection in the final node table + +2010-12-17 15:27 Sandro Santilli <strk@keybit.net> + + * [r6426] Add test for topology.addNode + +2010-12-17 15:17 Sandro Santilli <strk@keybit.net> + + * [r6425] Avoid NOTICE messages while running topology tests, make + results immune of the number of topologies ever created in the + database (helps getting stable results when running the tests + manually using run_test directly) + +2010-12-17 14:00 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6424] Added very basic flex files for raster MapAlgebra + implementation. The file + 'ma_lexer_only' is for testing only the lexer, without the parser + +2010-12-17 07:52 Sandro Santilli <strk@keybit.net> + + * [r6423] split load_topology in 3 steps: load of topology, + creation of feature tables, query of feature tables. Adapt tests + accordingly. + +2010-12-16 18:02 Sandro Santilli <strk@keybit.net> + + * [r6422] Return number of failures as exit status + +2010-12-16 18:00 Sandro Santilli <strk@keybit.net> + + * [r6421] Have run_test exit code reflect presence of failures. + +2010-12-16 17:52 Sandro Santilli <strk@keybit.net> + + * [r6420] Remove duplicated check rule + +2010-12-16 17:46 Sandro Santilli <strk@keybit.net> + + * [r6419] This one shouldn't be in the repository.. anyway, since + it is... + +2010-12-16 17:30 Sandro Santilli <strk@keybit.net> + + * [r6418] Turn 'regress' dir into a first class subdir, fixes + ticket #715 + +2010-12-16 16:33 Sandro Santilli <strk@keybit.net> + + * [r6417] Comment-out obsoleted rules (didn't drop in case someone + will miss them) + +2010-12-16 16:28 Sandro Santilli <strk@keybit.net> + + * [r6416] Add 'distclean' to the SUBDIRS target + +2010-12-16 14:46 Sandro Santilli <strk@keybit.net> + + * [r6415] Add 'check' rule under the SUBDIR loop. You now get + topology checked if you configured --with-topology + +2010-12-16 14:35 Sandro Santilli <strk@keybit.net> + + * [r6414] Only run unit tests when building GUI (See + http://postgis.refractions.net/pipermail/postgis-devel/2010-December/011014.html) + +2010-12-16 14:17 Regina Obe <lr@pcorp.us> + + * [r6413] yeh can put ST_AsKML test back in now that trunk isn't + crashing on it. + +2010-12-16 13:16 Regina Obe <lr@pcorp.us> + + * [r6412] most have missed these + +2010-12-16 09:48 Sandro Santilli <strk@keybit.net> + + * [r6411] Add 'clean' to the set of targets handled with the + SUBDIRS loop + +2010-12-15 22:17 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6410] Add in GSERIALIZED options for many of the pglgweom_ + support functions. + +2010-12-15 21:31 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6409] Add in #defines to allow conditional switch-over to + GSERIALIZED + +2010-12-15 20:06 Sandro Santilli <strk@keybit.net> + + * [r6408] Fail on fix subdir build failure. Add missing uninstall + rule in liblwgeom + +2010-12-15 18:35 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6407] Remove silly pointer tests from LWGEOM_collect + +2010-12-15 18:29 Sandro Santilli <strk@keybit.net> + + * [r6406] Install topology.sql in the same directory as other + things postgis + +2010-12-15 18:28 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6405] LWGEOM_accum is orphaned code, bye bye! + +2010-12-15 18:03 Sandro Santilli <strk@keybit.net> + + * [r6404] Generate GNUMakefile, add a --with-topology switch to + configure, enabling descending under topology/ dir + +2010-12-15 17:51 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6403] Move geometrycollection back out of the supported types + for KML + +2010-12-15 17:46 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6402] KML crashes on EMPTY (#681) + +2010-12-15 17:14 Sandro Santilli <strk@keybit.net> + + * [r6401] Thanks for the great partecipation around GNUmakefile + improvements proposal. It's finally here :) + +2010-12-15 17:11 Sandro Santilli <strk@keybit.net> + + * [r6400] Add a check rule under topology/ [RT-SIGTA] + +2010-12-15 17:06 Sandro Santilli <strk@keybit.net> + + * [r6399] Make sure predicate sql file is generated before use + +2010-12-15 16:41 Sandro Santilli <strk@keybit.net> + + * [r6398] Add sqlmm automated test. Drop old rules [RT-SIGTA] + +2010-12-15 16:24 Sandro Santilli <strk@keybit.net> + + * [r6397] automatize topology validity checking [RT-SIGTA] + +2010-12-15 16:04 Sandro Santilli <strk@keybit.net> + + * [r6396] Start a proper 'make check' rule, using the testrunner in + top dir's regress dir + +2010-12-15 15:25 Regina Obe <lr@pcorp.us> + + * [r6395] okay just exclude POLYGON EMPTY and ST_AsKML -- too many + victims for POLYGON EMPTY including ST_LineMerge now. change + namespace to www.postgis.org + +2010-12-15 14:14 Sandro Santilli <strk@keybit.net> + + * [r6394] Allow run_test calls from foreign directories + +2010-12-15 14:09 Sandro Santilli <strk@keybit.net> + + * [r6393] Do not read ~/.psqlrc when creating database + +2010-12-15 14:04 Sandro Santilli <strk@keybit.net> + + * [r6392] Add a --topology switch to equip regression db with + topology support when requested + +2010-12-15 13:39 Sandro Santilli <strk@keybit.net> + + * [r6391] Add new populate.sql file to host topology population + routines. Properly encode dependencies. + +2010-12-15 13:23 Regina Obe <lr@pcorp.us> + + * [r6390] exclude more functions from tests that are sorta broken + +2010-12-15 11:01 Sandro Santilli <strk@keybit.net> + + * [r6389] Split sqlmm specific things into its own file + +2010-12-15 10:48 Sandro Santilli <strk@keybit.net> + + * [r6388] Work outside of transaction, to help upgrade/test cycles. + Fix leftover from previous commit. [RT-SIGTA] + +2010-12-15 10:44 Sandro Santilli <strk@keybit.net> + + * [r6387] Fix typo in TopoGeo_addLinestring description, add DEBUG + lines [RT-SIGTA] + +2010-12-15 10:08 Sandro Santilli <strk@keybit.net> + + * [r6386] Fix detection of non-existent schema in ST_CreateTopoGeo + +2010-12-15 00:57 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6385] Flip more memcpy calls away. + +2010-12-15 00:24 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6384] Remove some calls to memcpy in favor of API functions. + +2010-12-15 00:12 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6383] Strip out more instances of SERIALIZED_FORM + +2010-12-14 20:30 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6382] Return non-zero when tests fail + +2010-12-14 20:21 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6381] Fix regressions in the new KML emitter + +2010-12-14 16:00 Regina Obe <lr@pcorp.us> + + * [r6380] exclude from testing functions known to crash with + POLYGON EMPTY + +2010-12-14 05:53 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6376] Memory leak in geography_from_text (#624) + +2010-12-14 05:01 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6374] Minor usage changes. (#604) + +2010-12-14 00:56 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6371] Update (c) header + +2010-12-14 00:54 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6370] Convert KML output to use stringbuffer for a 50% code + shrinkage... + +2010-12-14 00:49 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6369] Remove multicurve warning + +2010-12-14 00:37 Regina Obe <lr@pcorp.us> + + * [r6368] fix some typos and add back curvepolygon example that was + crashing before with old ewkt parser + +2010-12-13 23:50 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6367] Second thoughts on stringbuffer changes + +2010-12-13 23:40 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6366] Potential minor speed-up functions for stringbuffering + +2010-12-13 23:34 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6365] Add extra multicurve test for WKT + +2010-12-13 21:42 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6364] Update parser to handling compound curves within + multicurves (#525) + +2010-12-13 21:31 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6363] ST_CollectionExtract returns non-requested type (#457) + +2010-12-13 20:40 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6360] Return value of snprintf not correctly checked (#556) + +2010-12-13 20:25 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6359] Improve stringbuffer_t performance (#439). This is + largely done already in past passes. Added one small memory fix. + +2010-12-13 20:09 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6358] Change default shp2pgsql column to "geom" (#352) + +2010-12-13 19:50 Regina Obe <lr@pcorp.us> + + * [r6357] + +2010-12-13 19:44 Regina Obe <lr@pcorp.us> + + * [r6356] + +2010-12-13 19:44 Regina Obe <lr@pcorp.us> + + * [r6355] + +2010-12-13 19:43 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6354] Fix ST_Segmentize on curved geometries -- CRASH (#706). + This is actually a reflection of inconsistency in the + lwgeom_clone() function (creates copy of everything except point + array) and the ptarray_clone() function (creates copy of + everything). The definitions of _clone, _copy, _release, and + _free need to be made consistent and documented. + +2010-12-13 19:42 Regina Obe <lr@pcorp.us> + + * [r6353] + +2010-12-13 19:34 Regina Obe <lr@pcorp.us> + + * [r6352] + +2010-12-13 19:32 Regina Obe <lr@pcorp.us> + + * [r6351] + +2010-12-13 19:25 Regina Obe <lr@pcorp.us> + + * [r6350] + +2010-12-13 19:25 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6349] Fix up failure in distance calculation (#705) and replace + some SRID -1 with SRID_UNKNOWN + +2010-12-13 19:19 Regina Obe <lr@pcorp.us> + + * [r6348] + +2010-12-13 16:38 Regina Obe <lr@pcorp.us> + + * [r6347] Okay changed this to LF since people seemed to like + changing this one a lot. We'll see if this fixes my frustrations + without causing any frustration for anyone else. + +2010-12-13 13:14 Regina Obe <lr@pcorp.us> + + * [r6346] remove collection of geometries into crasher group to + prevent testing until we revisit #700 + +2010-12-13 10:49 Sandro Santilli <strk@keybit.net> + + * [r6345] Add comments on the 'edge' topology primitives view + +2010-12-13 09:51 Sandro Santilli <strk@keybit.net> + + * [r6344] typo + +2010-12-12 22:42 Nicklas Avén <nicklas.aven@jordogskog.no> + + * [r6343] 3d distance functions for line-line cases + +2010-12-12 18:59 Nicklas Avén <nicklas.aven@jordogskog.no> + + * [r6342] Some cleaning up in measure functions in + lwgeom_functions_basic.c + +2010-12-12 00:12 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6341] Remove more SERIALIZED_FORM + +2010-12-11 00:28 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6340] ptarray_free now frees the serialized_ptlist, unless + FLAGS_GET_READONLY is set. + +2010-12-11 00:27 Sandro Santilli <strk@keybit.net> + + * [r6339] Do not force drop of pre-existing topology schema. Sounds + dangerous when start using it for real. + +2010-12-10 23:22 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6338] Switch to cstring2text for text returns. + +2010-12-10 23:15 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6337] Clean out more SERIALIZED_FORM calls + +2010-12-10 22:45 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6336] Clean out some more calls to SERIALIZED_FORM + +2010-12-10 20:22 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6335] Issues with TRIANGLE AND TIN EMPTY collections - hmm do + they exist? (#686) + +2010-12-10 19:44 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6334] Fix for TIN EMPTY per #686 + +2010-12-10 19:10 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6333] Fix cunit failures on Polyhedral surface (#697) + +2010-12-10 18:10 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6332] WKB and WKT closure checks are now in X/Y only (#693) + +2010-12-10 18:06 Sandro Santilli <strk@keybit.net> + + * [r6331] Revert GNUMakefile changes as per Mark request. I had + enough complains about build scripts this week... + +2010-12-10 18:00 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6330] Fix ST_Segmentize and Polyhedral Surface -- CRASH (#696) + +2010-12-10 17:57 Sandro Santilli <strk@keybit.net> + + * [r6329] Add 'uninstall' rule in the loop. Work around the docs + dep by using uninstall deps. Add an 'uninstall' rule to raster + subsystem + +2010-12-10 17:49 Sandro Santilli <strk@keybit.net> + + * [r6328] Be verbose during recursion. List liblwgeom in SUBDIRS, + stub install rules for liblwgeom and utils + +2010-12-10 17:29 Sandro Santilli <strk@keybit.net> + + * [r6327] more ignores + +2010-12-10 17:19 Sandro Santilli <strk@keybit.net> + + * [r6326] Start listing some subdirs to recurse into. Hopefully one + day this will become cleaner + +2010-12-10 17:19 Sandro Santilli <strk@keybit.net> + + * [r6325] add .svn to .gitignore (why is this in repo ? oh well.. + it is useful anyway) + +2010-12-10 15:45 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6324] Fix for crash in ST_RemovePoint (#695) + +2010-12-10 14:53 Mateusz Loskot <mateusz@loskot.net> + + * [r6323] Fixed problems with truncated decimal places of + float-point values in textual output. For large datasets, it was + leading to incorrectly calculated dimensions. Now, all floats are + formatted with 15 decimal places. + +2010-12-09 19:17 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6322] Wrap up GEOS predicates in EMPTY tests (#685) + +2010-12-09 18:52 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6321] Remove old function calls + +2010-12-09 18:51 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6320] Fix for centroid crash on emtpy (#684) + +2010-12-09 18:00 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6319] Fix crash in ST_MakeLine (#690) + +2010-12-09 16:10 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6318] Add config rpath + +2010-12-09 15:00 Regina Obe <lr@pcorp.us> + + * [r6317] formatting + +2010-12-08 23:58 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6316] Remove more appeals to pglwgeom->type + +2010-12-08 23:52 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6315] Remove more appeals to pglwgeom->type + +2010-12-08 23:40 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6314] Remove more appeals to pglwgeom->type + +2010-12-08 23:29 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6313] Remove another call to TYPE_HASBBOX + +2010-12-08 23:28 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6312] Remove call to TYPE_HASBBOX + +2010-12-08 23:27 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6311] Remove many cases of calls to SERIALIZED_FORM in favour + of direct pglwgeom deserialization + +2010-12-08 23:19 Regina Obe <lr@pcorp.us> + + * [r6310] need to keep GEOMETRYCOLLECTION EMPTY away from others + since GEOS throws geometry collection not support for it often so + hiding the crashing in some cases of typed empties. + +2010-12-08 22:31 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6309] Remove many instances of lwgeom_getType used on PG_LWGEOM + +2010-12-08 22:02 Regina Obe <lr@pcorp.us> + + * [r6308] Add more emptiness. We need to explore emptiness more + deeply :) + +2010-12-08 21:21 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6307] When asking for a serialized forms type, use + pglwgeom_get_type + +2010-12-08 20:54 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6306] Cut down reliance on TYPE_GETTYPE macro in favor of a + function we can repoint later in the serialization change process + +2010-12-08 20:35 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6305] Expunge some TYPE_GETTYPE + +2010-12-08 20:35 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6304] Start to work on PG_LWGEOM sanity before changeover + +2010-12-08 19:24 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6303] Rename has_arc to lwgeom_has_arc + +2010-12-08 19:23 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6302] Fix crash on BuildArea(empty) (#683) + +2010-12-08 18:20 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6301] Handle empty geometries in ST_Buffer(). If argument + empty, return empty. (#682) + +2010-12-08 18:06 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6300] Fix crash in GML output of POLYGON EMPTY (#681) + +2010-12-08 16:20 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6299] Fix AsBinary handling of > 2d features in geography + (#680) + +2010-12-08 16:04 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6298] Output higher dimensions in astext in geography (#680) + +2010-12-08 00:23 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6295] Minor rearrangement of memory handling. + +2010-12-08 00:02 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6294] Rename lwgeom_from_wkt to lwgeom_parse_wkt to note the + use of the parser object. + +2010-12-07 21:59 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6293] Start flipping over references to srid = -1 to srid = + SRID_UNKNOWN + +2010-12-07 21:55 Sandro Santilli <strk@keybit.net> + + * [r6292] Use unified diffs for expected/obtained (easier to read) + +2010-12-07 21:08 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6291] Replace the old WKB/WKT parser and emitters with the new + ones. + +2010-12-07 14:02 Regina Obe <lr@pcorp.us> + + * [r6290] change to 1 column (st_sharedpaths) + +2010-12-07 13:45 Regina Obe <lr@pcorp.us> + + * [r6289] reduce width some more + +2010-12-07 13:42 Regina Obe <lr@pcorp.us> + + * [r6288] change color to be clearer reduce width of text + +2010-12-07 12:51 Regina Obe <lr@pcorp.us> + + * [r6287] end tbody + +2010-12-07 12:45 Regina Obe <lr@pcorp.us> + + * [r6286] fix formatting + +2010-12-07 12:42 Regina Obe <lr@pcorp.us> + + * [r6285] diagram of shared paths + +2010-12-07 12:25 Regina Obe <lr@pcorp.us> + + * [r6284] formatting fixes + +2010-12-07 12:02 Regina Obe <lr@pcorp.us> + + * [r6283] more examples to demonstrate its not just limited to 1 + point snapping + +2010-12-07 08:30 Regina Obe <lr@pcorp.us> + + * [r6282] looks funny in one row, better put each in separate row + +2010-12-07 07:56 Regina Obe <lr@pcorp.us> + + * [r6281] example with diagram for ST_Snap + +2010-12-06 15:15 Regina Obe <lr@pcorp.us> + + * [r6280] minor comment corrections + +2010-12-06 15:15 Regina Obe <lr@pcorp.us> + + * [r6279] start logging sql queries to log table + +2010-12-06 15:07 Sandro Santilli <strk@keybit.net> + + * [r6278] Add a couple more cases provided by RT-SITA + +2010-12-06 14:52 Sandro Santilli <strk@keybit.net> + + * [r6277] Document ST_Snap, xref with SnapToGrid + +2010-12-06 14:21 Sandro Santilli <strk@keybit.net> + + * [r6276] Fix typo in ST_SharedPaths documentation, add some xrefs + +2010-12-03 21:38 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6275] Updates to the WKT parser to report errlocation in more + places. + +2010-12-03 16:53 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6274] Make use of ptarray api for manipulating + serialized_pointlist + +2010-12-03 15:53 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6273] Remove a couple warnings. + +2010-12-03 10:13 Sandro Santilli <strk@keybit.net> + + * [r6272] Add SNAP test reported on JTS mailing list + +2010-12-03 09:53 Sandro Santilli <strk@keybit.net> + + * [r6271] Fix release of wrong memory (same bug as #670, found here + for copy&paste) + +2010-12-03 09:22 Sandro Santilli <strk@keybit.net> + + * [r6270] FREE the right argument (fixes bug #670) + +2010-12-03 09:00 Sandro Santilli <strk@keybit.net> + + * [r6269] Add test for bug 670 + +2010-12-03 05:40 Regina Obe <lr@pcorp.us> + + * [r6268] document st_sharedpaths and alphabetize listings + +2010-12-02 20:38 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6267] Change i18n instructions to use shp2pgsql_LANG.po as + format for po file names. + +2010-12-02 20:35 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6266] Remove serialized_pointlist direct access from ./postgis + +2010-12-02 19:09 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6265] Move is_closed fully to liblwgeom and remove + LWGEOM_INSPECTED from IsClosed + +2010-12-02 18:52 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6264] Remove LWGEOM_INSPECTED from pointn, startpoint, + endpoint, and migrate functionality to liblwgeom. + +2010-12-02 18:12 Sandro Santilli <strk@keybit.net> + + * [r6263] ST_Snap and regress testing + +2010-12-02 18:01 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6262] Remove LWGEOM_INSPECTED from PointN + +2010-12-02 17:46 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6261] Remove LWGEOM_INSPECTED from NumInteriorRings + +2010-12-02 17:39 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6260] Remove unused function + +2010-12-02 17:38 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6259] Remove LWGEOM_INSPECTED from ndims + +2010-12-02 17:18 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6258] Remove INSPECTED from numpoints + +2010-12-02 16:25 Mateusz Loskot <mateusz@loskot.net> + + * [r6257] Updated SQL scripts location in the database building + makefile + +2010-12-02 16:13 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6256] Remove GET_GETTYPE from some functions. + +2010-12-02 16:06 Regina Obe <lr@pcorp.us> + + * [r6255] fix typo + +2010-12-02 15:55 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6253] Remove LWGEOM_INSPECTED from ST_Union + +2010-12-02 15:54 Regina Obe <lr@pcorp.us> + + * [r6252] remove ~= geography according to garden tests geography + doesn't have such an operator. Also put in version number arg + name to make GeoJSON easier to test + +2010-12-02 15:51 Regina Obe <lr@pcorp.us> + + * [r6251] all test sql statements should be logged to + postgis_garden_log and successful results output to + postgis_garden_log_output + +2010-12-02 15:37 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6250] Pass iconv header flags to cpp in all cases. + +2010-12-02 15:29 Mateusz Loskot <mateusz@loskot.net> + + * [r6249] Fixed invalid on-error return value from + rt_raster_add_band + +2010-12-02 15:28 Mateusz Loskot <mateusz@loskot.net> + + * [r6248] Updated the raster messages output by the configure + script. + +2010-12-02 14:40 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6247] Changed SRID by srid in LWPOLY structure call. Due to + change in r6204 + +2010-12-02 06:55 Regina Obe <lr@pcorp.us> + + * [r6246] start logging the sql to postgis_garden_log table and + store the output as xml in postgis_garden_log_output. Still more + to fix. This will hopefully make it easier for vegetable + gardeners to pick ripe vegetables. + +2010-12-02 03:43 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6245] Add i18n string wrapper for pgsql2shp utility too. + +2010-12-02 00:51 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6244] Now for sure. + +2010-12-02 00:50 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6243] Final one? + +2010-12-02 00:48 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6242] More NLS macros + +2010-12-02 00:47 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6241] Add another NLS macro + +2010-12-02 00:46 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6240] Add needed macro + +2010-12-02 00:44 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6239] First attempt at i18n for the loader/dumper. + +2010-12-01 20:28 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6238] Remove LWGEOM_INSPECTED from perimeter calculation + +2010-12-01 19:59 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6237] Remove LWGEOM_INSPECTED from transform functions + +2010-12-01 18:13 Sandro Santilli <strk@keybit.net> + + * [r6236] Add regression testing for ST_SharedPaths + +2010-12-01 18:11 Sandro Santilli <strk@keybit.net> + + * [r6235] Support typed multi* empties, just enough fro + ST_SharedEdge (see issue #673 for more) + +2010-12-01 16:23 Sandro Santilli <strk@keybit.net> + + * [r6234] Fix builds against libgeos < 3.3.0 + +2010-12-01 16:23 Sandro Santilli <strk@keybit.net> + + * [r6233] Retain SRID in output + +2010-12-01 16:15 Sandro Santilli <strk@keybit.net> + + * [r6232] Newer script (2009 rather than 2006). Hoping others' + won't have it updated (my ./autogen.sh runs always update it) + +2010-12-01 15:54 Sandro Santilli <strk@keybit.net> + + * [r6231] Build and register ST_SharedPaths + +2010-12-01 15:42 Sandro Santilli <strk@keybit.net> + + * [r6230] postgis/Makefile is generated from postgis/Makefile.in by + ./configure + +2010-12-01 15:12 Regina Obe <lr@pcorp.us> + + * [r6229] no fair -- I want a collection of empties too + +2010-12-01 15:07 Sandro Santilli <strk@keybit.net> + + * [r6228] typo + +2010-12-01 14:56 Sandro Santilli <strk@keybit.net> + + * [r6227] Test dumping an insanely _empty_ geometry + +2010-12-01 14:44 Sandro Santilli <strk@keybit.net> + + * [r6226] Test ST_Dump(EMPTY) + +2010-12-01 14:41 Sandro Santilli <strk@keybit.net> + + * [r6225] Add test for ST_Dump + +2010-12-01 13:57 Sandro Santilli <strk@keybit.net> + + * [r6224] some ignores + +2010-12-01 13:57 Sandro Santilli <strk@keybit.net> + + * [r6223] Execute bit + +2010-12-01 13:57 Sandro Santilli <strk@keybit.net> + + * [r6222] Build ST_SharedPaths function (currently returning a + geometrycollection) + +2010-12-01 01:02 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6221] Add stringbuffer_create_size() to allow different + starting sizes for the buffer + +2010-12-01 00:53 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6220] Move affine transforms into liblwgeom and expunge + LWGEOM_INSPECTED + +2010-12-01 00:00 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6219] Make spheroid distance respect z if it's there. + +2010-11-30 23:46 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6218] Remove old length_ellipse functions + +2010-11-30 23:44 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6217] Move spheroid length calculation to using same function + as geography + +2010-11-30 23:23 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6216] Include some extra memory freeing in the force_ndims + variants. + +2010-11-30 22:55 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6215] Move length calculations fully to liblwgeom and remove + LWGEOM_INSPECTED + +2010-11-30 21:54 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6214] Move area calculations fully to liblwgeom and remove + LWGEOM_INSPECTED + +2010-11-30 21:35 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6213] Remove LWGEOM_INSPECTED from AsGML and AsKML + +2010-11-30 20:11 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6212] Remove LWGEOM_INSPECTED from AsGeoJSON + +2010-11-30 19:02 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6211] Remove LWGEOM_INSPECTED from AsSVG + +2010-11-30 07:02 Regina Obe <lr@pcorp.us> + + * [r6210] more logging cleanup and add create index test for + geometry/geography. Change verison number arg in ST_GeoJSON so + can stuff the right value in testing + +2010-11-29 13:02 Regina Obe <lr@pcorp.us> + + * [r6209] more mistakes + +2010-11-29 12:55 Regina Obe <lr@pcorp.us> + + * [r6208] fix typo + +2010-11-26 16:55 Regina Obe <lr@pcorp.us> + + * [r6207] fix more mistakes in table logging. replace toxic curved + geometries with little more harmless. Get rid of false positive + relationships by forcing geometries to have bounding boxes that + intersect at least sometimes. + +2010-11-26 13:40 Regina Obe <lr@pcorp.us> + + * [r6206] put back curved geometries. Had taken them out in 1.4, + but guess never put them back because of distance issues. Also + some other minor cleanup + +2010-11-25 18:38 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r6205] Change POINTARRAY.dims to POINTARRAY.flags. Related to + #658 + +2010-11-25 17:34 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r6204] Change SRID to srid in LWGEOM struct (and also in CHIP + too). Rename some functions related to SRID from Camel notation + to lower case: errorIfSRIDMismatch, pglwgeom_getSRID, + pglwgeom_setSRID, LWGEOM_getSRID, LWGEOM_setSRID, hasSRID. + Related to #658 + +2010-11-24 23:44 Regina Obe <lr@pcorp.us> + + * [r6203] fix casing in dropRastertable + +2010-11-24 22:29 Regina Obe <lr@pcorp.us> + + * [r6202] fix table casing in Addrastercolumn + +2010-11-24 17:49 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6201] Fully free temporary ptarray + +2010-11-24 17:46 Regina Obe <lr@pcorp.us> + + * [r6200] reenable st_curvetoline and st_linetocurve functions. + Seem to work now. + +2010-11-24 15:41 Regina Obe <lr@pcorp.us> + + * [r6199] Exclude ST_MinimumBoundingCircle from testing. That uses + ST_AddPoint too. + +2010-11-24 13:34 Regina Obe <lr@pcorp.us> + + * [r6198] change polygon z and m building to not use ST_AddPoint + and remove ST_AddPoint from testing until it works again. Put + ST_Transform back. + +2010-11-24 01:09 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6197] Inherit gbox flags from lwgeom when calculating. This + makes sense. + +2010-11-24 01:06 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6196] Initialize static GBOX flags to zero to avoid nastiness. + +2010-11-24 00:39 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6195] Tighten up lwgeodetic a little + +2010-11-24 00:28 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6194] Ensure that flags are initialized cleanly in constructors + +2010-11-23 23:47 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6193] Update geography functions to use the in-build .flags + attribute on LWGEOM + +2010-11-23 20:22 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6192] Remove libgeom.h + +2010-11-23 15:49 Regina Obe <lr@pcorp.us> + + * [r6191] fix casing of pixel types + +2010-11-23 00:44 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6190] Make the ptarray_add_point behavior more explicit. + +2010-11-23 00:23 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6189] Remove dlfcn.h. Doesn't seem to make any difference under + OS/X. + +2010-11-23 00:16 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6188] Update force2d to preserve repeated points. + +2010-11-22 22:33 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6187] Add in actual cu_ptarray.c test file + +2010-11-22 22:23 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6186] Make ptarray_append_point handle higher dimensions more + consistently. + +2010-11-22 19:24 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6185] Make LWGEOM_expand use the ptarray API + +2010-11-22 15:43 Regina Obe <lr@pcorp.us> + + * [r6184] change to not use skewed rasters and insure when point is + used in falls in the raster to prevent unnecessary alarms + +2010-11-22 15:17 Regina Obe <lr@pcorp.us> + + * [r6183] fix more bugs in test + +2010-11-22 13:34 Regina Obe <lr@pcorp.us> + + * [r6182] fix some bugs in tests. More fixes to come + +2010-11-21 19:13 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r6181] Add triangle support for ST_Transform. Fix #600. Thanks + to Regina for report ! + +2010-11-21 19:02 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r6180] #658 part 1. Enhance LWGEOM struct (type, flags and GBOX) + and related functions call. + +2010-11-19 22:12 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6179] Revert GML change. Hm. + +2010-11-19 21:51 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6178] Change in gml regression to match what seems to be the + right answers. + +2010-11-18 18:37 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6177] Flip nrings function from serialized to lwgeom based. + +2010-11-18 18:13 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6176] Change over npoints to use an lwgeom based function + intead of serialized. + +2010-11-18 05:28 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6175] An argument for git. This massive commit includes the + renaming of function in the ptarray API, the removal of some + pointArray_* variants in favor of ptarray_* variants, and, + importantly, the adition of _append_point and _insert_point + options for pointarrays. Functions have been switched over to + using the API instead of managing the serialized_pointlist + themselves. This has necessitated the re-writing of some + functions. Simplify2d and Force2d have been re-written as lwgeom + functions instead of serialized form functions, and moved into + liblwgeom. There are still some major functions to move into + liblwgeom, including the point_in_polygon functions that support + the intersects shortcuts and the linear referencing fuctions in + lwgeom_functions_analytic. + +2010-11-16 17:25 Regina Obe <lr@pcorp.us> + + * [r6174] minor logging corrections + +2010-11-14 18:10 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6173] Added MapAlgebra prerequisites to raster core. + +2010-11-12 15:48 Regina Obe <lr@pcorp.us> + + * [r6172] Update 9.0 FAQ to include npgsql fixed driver for bytea + support + +2010-11-04 23:21 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6170] Change pointArray_construct() to + ptarray_construct_reference_data() + +2010-11-02 14:20 Regina Obe <lr@pcorp.us> + + * [r6168] add relevant references + +2010-11-02 06:20 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6167] Change over to lwgeom_is_collection where appropriate. + +2010-11-02 05:52 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6166] Remove unused function. Rename lwgeom_is_collection to + lwtype_is_collection. + +2010-11-01 21:03 Kevin Neufeld <kneufeld.ca@gmail.com> + + * [r6165] try an experiment to fix Docbook and MathML compatibility + issues. + upgrade Docbook to 4.5 + upgrade MathML to 2.0 + + One should be able to use mml namespaces now without specifying + in every block. + + "make check" should now pass without incident. + +2010-11-01 14:48 Regina Obe <lr@pcorp.us> + + * [r6164] logging for multi arg functions + +2010-11-01 14:07 Regina Obe <lr@pcorp.us> + + * [r6163] Get rid of WKT in credits and some minor spring cleaning + +2010-11-01 08:15 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6162] Fix liblwgeom.h reference in generator + +2010-11-01 08:11 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6161] Remove DYNPTARRAY and all users of it + +2010-11-01 01:28 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6160] Flip all the internal liblwgeom files over to use + liblwgeom_internal.h + +2010-11-01 01:16 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6159] Remove one use of DYNPTARRAY + +2010-10-31 03:19 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6158] Remove a pair of unused functions. + +2010-10-31 02:31 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6157] Clean out scruft from my G_ phase and start attempting to + separate _internal from external liblwgeom functions. + +2010-10-30 17:35 Sandro Santilli <strk@keybit.net> + + * [r6156] ISO C90 forbids mixed declarations and code + +2010-10-29 22:57 Regina Obe <lr@pcorp.us> + + * [r6155] put in references to geomval data type + +2010-10-29 22:20 Regina Obe <lr@pcorp.us> + + * [r6154] + +2010-10-29 21:57 Regina Obe <lr@pcorp.us> + + * [r6153] switch order back + +2010-10-29 21:33 Regina Obe <lr@pcorp.us> + + * [r6152] Include rasters in special function index and switch + ordering of chapters so special function index is at the end + again after raster + +2010-10-29 13:04 Regina Obe <lr@pcorp.us> + + * [r6151] test all functions -- first draft -- lots of false + negatives + +2010-10-29 12:21 Regina Obe <lr@pcorp.us> + + * [r6150] fix typo in logging + +2010-10-29 12:04 Regina Obe <lr@pcorp.us> + + * [r6149] update to test the raster operators + +2010-10-29 11:28 Regina Obe <lr@pcorp.us> + + * [r6148] ST_3DDFullyWithin + +2010-10-28 23:08 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r6147] --General enhancement to the script functions. Still a + lot of work to do... + +2010-10-28 13:47 Regina Obe <lr@pcorp.us> + + * [r6146] some cleanup and one more link + +2010-10-28 13:10 Regina Obe <lr@pcorp.us> + + * [r6145] get rid of tabs + +2010-10-28 12:45 Regina Obe <lr@pcorp.us> + + * [r6144] Try to clarify use of ST_MakeEmptyRaster to address #651 + +2010-10-27 18:01 Kevin Neufeld <kneufeld.ca@gmail.com> + + * [r6143] updated reference to appropriate image in the discussion + on geometry validity + +2010-10-27 17:27 Kevin Neufeld <kneufeld.ca@gmail.com> + + * [r6142] added an example for ST_IsValid that shows a valid + multipolygon that touches at a point. + +2010-10-27 17:09 Kevin Neufeld <kneufeld.ca@gmail.com> + + * [r6141] remove <remark> TODO tag in doc. + +2010-10-27 16:47 Regina Obe <lr@pcorp.us> + + * [r6140] Logic to test inserting rasters of all different types + +2010-10-27 14:38 Regina Obe <lr@pcorp.us> + + * [r6139] First working version of raster garden test -- currently + just does an addrastercolumn for all pixel types supported, drop + raster table and logs completion and timing to raster_garden_log + table + +2010-10-27 12:51 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6138] gdal2raster.py renamed to raster2pgsql.py. Related ticket + #612 + +2010-10-27 11:06 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6137] Added CC=@CC@ in raster/rt_core/Makefile.in. Related + ticket #550. + +2010-10-26 17:40 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6136] Fixes on PostGIS Raster debug system. The raster core + uses + default_info_handler() call. Other minor bugs fixed. Created + DEBUG file in + raster directory, similar to postgis/DEBUG file. Erased + references to old raster debug variables in configure.ac. Deleted + old readme file. + +2010-10-26 16:41 Regina Obe <lr@pcorp.us> + + * [r6135] start work on raster garden test generator + +2010-10-26 16:40 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6134] New debug system, similar to the PostGIS debug system, + with two sets of macros + that depend on the POSTGIS_DEBUG_LEVEL value. Related ticket + #638. + +2010-10-26 15:50 Regina Obe <lr@pcorp.us> + + * [r6133] fix id ref + +2010-10-26 15:42 Regina Obe <lr@pcorp.us> + + * [r6132] fix build issue -- need more fixing later + +2010-10-26 15:01 Regina Obe <lr@pcorp.us> + + * [r6131] fix typo + +2010-10-26 14:47 Regina Obe <lr@pcorp.us> + + * [r6130] add raster types in in reference_types section and also + put in special indexes section. Will eventually move special + indexes below raster since it will now cover it as well. + +2010-10-26 12:46 Regina Obe <lr@pcorp.us> + + * [r6129] try to get rid of utf stuff again + +2010-10-25 17:28 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6128] Use ptarray_isclosed to check closure + +2010-10-25 16:06 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6127] Added svn tag keywords to raster plpgsql scripts. Related + ticket #642. + +2010-10-25 14:46 Regina Obe <lr@pcorp.us> + + * [r6126] revert + +2010-10-25 14:33 Regina Obe <lr@pcorp.us> + + * [r6125] get rid of utf header entirely -- my xsltproc when run + with make-comments chokes on it. + +2010-10-25 05:01 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6124] Add some WKT tests on EMPTY + +2010-10-25 04:57 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6123] Add/improve comments, fix SRID handling for EWKT inputs. + +2010-10-25 04:34 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6122] More care handling mixed dimensional inputs and being + tolerant of wierd stuff + +2010-10-25 00:14 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6121] Add destructors for the _list elements of the grammar. + +2010-10-24 19:51 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6120] Remove parse/lex outputs from 'clean' target, add to + 'maintainer-clean' + +2010-10-24 19:30 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6119] Update lexer + +2010-10-24 19:30 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6118] Add generated parser/lexer files + +2010-10-24 19:29 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6117] Remove svn:ignores for lex/parser results + +2010-10-24 19:28 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6116] Remove header-file option + +2010-10-24 19:25 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6115] More tweaks to lexer to generate header + +2010-10-24 19:13 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6114] Change order of options + +2010-10-24 19:00 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6113] Turn off verbose grammar + +2010-10-24 19:00 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6112] Add in tests for more WKT types and fix bugs as they show + up. + +2010-10-24 16:08 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6111] Add quotes to bison/flex calls. + +2010-10-24 16:04 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6110] Match the error strings with the legacy ones in the old + WKT parser. + +2010-10-24 15:25 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6109] Rename WKT out suite. + +2010-10-23 23:53 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6108] Change sytax on calls to LEX to maybe make windoze and + others happier + +2010-10-23 23:50 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6107] Ignore generated Makefile + +2010-10-23 23:49 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6106] Change empty collection constructor to take a type + number, like the non-empty constructor (because we now believe in + typed empties). + +2010-10-23 23:48 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6105] Finish untested support for all types in WKT input. + +2010-10-23 14:41 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6104] Remove long form lex parameters + +2010-10-22 23:32 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6103] Add dimensional empties to the grammar + +2010-10-22 23:29 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6102] comment the fact we support ISO extended types in WKB + emitter + +2010-10-22 23:27 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6101] Add in the ISO extended types to the WKT parser and + emitter. + +2010-10-22 19:27 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6100] Apply mcayland patch to build parse/lex. Remember: make + clean before make. + +2010-10-22 16:29 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6099] Changed '--with-gdal' for '--with-gdalconfig'. Related + tickets #610 #616 + +2010-10-22 14:54 Regina Obe <lr@pcorp.us> + + * [r6098] fix typo + +2010-10-22 14:52 Regina Obe <lr@pcorp.us> + + * [r6097] document GDAL config setting. Showing with-gdal for now. + Jorge -- don't forget to change this in make to with-gdalconfig + to be consistent with other config namings. + +2010-10-22 14:43 Regina Obe <lr@pcorp.us> + + * [r6096] amend install instructions to reflect new simplied + installation of raster support + +2010-10-22 14:00 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6095] Raster build simplified. Only "./configure --with-raster + & make & make install" needed. Raster objetive names changed in + GNUMakefile. Raster library object generated with PostGIS version + numbers. + +2010-10-22 02:14 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6094] Add in more parser cases and test an EMPTY case. + +2010-10-21 22:22 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6093] Add support for point and multipoints to the WKT parser. + +2010-10-21 21:32 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6092] Ensure the parser prereqs are built (#636) + +2010-10-20 22:51 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6091] Current work on bison-based WKT-to-LWGEOM parser. + Implemented for LINESTRING, almost ready to extend to all types. + +2010-10-20 14:09 Regina Obe <lr@pcorp.us> + + * [r6090] correction in output type + +2010-10-20 13:41 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r6089] -Fix for ticket ticket 634. Typo in error message. + +2010-10-20 13:38 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r6088] -Fix for ticket 632. st_world2rastercoordx and + st_world2rastercoordy must return int instead of float8. + +2010-10-20 12:22 Regina Obe <lr@pcorp.us> + + * [r6087] finish off documenting current public raster functions. + Think that's all of them we have so far + +2010-10-19 13:02 Regina Obe <lr@pcorp.us> + + * [r6086] fill in missing portos and provide more description of + what additional protos do when args are left out or included + +2010-10-19 12:31 Regina Obe <lr@pcorp.us> + + * [r6085] missing protos for st_askml, st_asgml + +2010-10-18 15:59 Sandro Santilli <strk@keybit.net> + + * [r6084] Location argument to GEOSIsValidDetail is non-const + +2010-10-18 13:15 Sandro Santilli <strk@keybit.net> + + * [r6083] Snap ShortestLine to 1e-14 grid (fixes failure on + opensuse) + +2010-10-15 21:46 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r6082] -Fix for ticket 628. + +2010-10-15 14:32 Regina Obe <lr@pcorp.us> + + * [r6081] typo + +2010-10-15 14:29 Regina Obe <lr@pcorp.us> + + * [r6080] more logic errors + +2010-10-15 13:28 Regina Obe <lr@pcorp.us> + + * [r6079] fix error in logic in test, change xml header to match + other xml files + +2010-10-14 06:54 Regina Obe <lr@pcorp.us> + + * [r6078] fix non valid RT_Reference link + +2010-10-14 06:04 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r6077] Fix few errors inside DocBook documentation. Refer to + #471 + +2010-10-13 22:22 Regina Obe <lr@pcorp.us> + + * [r6076] address some dtd errors + +2010-10-13 17:12 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6075] Modified raster Makefiles to solve bugs of ticket #610 + (build error and + incorrect placement of rtpostgis.sql file) + +2010-10-13 15:41 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6074] Deleted references to 'WKT' in rtpostgis.sql and + faq_raster.xml + +2010-10-13 14:31 Regina Obe <lr@pcorp.us> + + * [r6072] Correct the spelling of Peucker + +2010-10-13 13:44 Regina Obe <lr@pcorp.us> + + * [r6071] correction to example + +2010-10-13 13:03 Regina Obe <lr@pcorp.us> + + * [r6070] amend the what is new in PostGIS 2.0 section + +2010-10-13 08:52 Regina Obe <lr@pcorp.us> + + * [r6069] Put reference to addband and setvalue in empty raster. If + a raster has no bands and values, do you see it :) + +2010-10-13 08:45 Regina Obe <lr@pcorp.us> + + * [r6068] fill in missing protos for ST_AddBand and an example of + creating a raster from scratch + +2010-10-13 08:12 Regina Obe <lr@pcorp.us> + + * [r6067] add raster_comments.sql to be copied to contrib directory + as well + +2010-10-12 18:38 Regina Obe <lr@pcorp.us> + + * [r6066] this is now auto built when make comments is run + +2010-10-12 18:37 Regina Obe <lr@pcorp.us> + + * [r6065] revise to also build raster_comments.sql when make + comments is run + +2010-10-11 00:45 Regina Obe <lr@pcorp.us> + + * [r6064] typo + +2010-10-11 00:45 Regina Obe <lr@pcorp.us> + + * [r6063] fix typo in faxq_raster. Document ST_AddBand + +2010-10-10 22:00 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6062] Remove warnings + +2010-10-10 11:16 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6061] Modified the prototype of dump core/server/sql functions, + adding "wkt" to their names, because their returning elements are + WKT geometries, not real PostGIS geometries. + +2010-10-10 00:08 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6060] Put the WKT new parser files into repo so others can see + them and I can work in synch with trunk. + +2010-10-09 04:03 Regina Obe <lr@pcorp.us> + + * [r6059] Put link to Jorge's PostGIS Raster and Oracle GeoRaster + series + +2010-10-08 18:08 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6058] Add param.h to headers, pick up ENDIAN macros? + +2010-10-08 16:45 Regina Obe <lr@pcorp.us> + + * [r6057] another fix + +2010-10-08 14:55 Pierre Racine <Pierre.Racine@sbf.ulaval.ca> + + * [r6056] -Modify ST_Intersects so that index is taken into account + by the planner + -Added a series of ST_Intersects with a boolean parameter to make + the desactivation of the nodata value working with indexes + +2010-10-08 13:15 Regina Obe <lr@pcorp.us> + + * [r6055] + +2010-10-08 13:14 Regina Obe <lr@pcorp.us> + + * [r6054] more corrections + +2010-10-08 13:00 Regina Obe <lr@pcorp.us> + + * [r6053] take out automatic build of raster_comments (until figure + out what's wrong), fix some logic in gardent test, take out + ST_Transform until it stops crashing. + +2010-10-08 11:39 Regina Obe <lr@pcorp.us> + + * [r6052] logic to build raster_comments postgresql help + instructions -- also replace postgis.refractions.net with + www.postgis.org + +2010-10-08 11:31 Regina Obe <lr@pcorp.us> + + * [r6051] rename to raster to be consistent with other files + +2010-10-07 15:55 Regina Obe <lr@pcorp.us> + + * [r6050] Put in vacuum analyze crash test + +2010-10-06 20:23 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6049] Add nested geometry collection test. + +2010-10-06 20:11 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6048] Add extra comments. + +2010-10-06 19:32 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6047] Add extra tests, remove printf noise from run. + +2010-10-06 19:17 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6046] Add in WKB reader and associated test framework to build. + +2010-10-06 17:51 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6045] Fix a write-out-of-bounds error. + +2010-10-06 15:20 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6044] Finish first draft of WKB reader. + +2010-10-06 00:35 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6043] Clean out compile warnings. + +2010-10-05 23:33 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6042] Add WKB writing support for TIN, Triangle and + PolyhedralSurface + +2010-10-05 23:32 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6041] Add WKB writing support for TIN, Triangle and + PolyhedralSurface + +2010-10-05 22:49 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6040] Macroify the WKB type numbers and add the extended types + for 3D objects. + +2010-10-03 19:57 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6039] Fix syntax error in ptarray_segmentize2d introduced in + last commit + +2010-10-03 19:43 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6038] Ensure maxpoints is filled in appropriately + +2010-10-03 18:15 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6037] Remove lwin_wkb from build until it's complete + +2010-10-03 18:14 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6036] Continue with new WKB parser. Change signature of RHR + "right hand rule" functions to "clockwise" to avoid + misinterpretations of orientation rules. + +2010-10-03 01:39 Regina Obe <lr@pcorp.us> + + * [r6034] typo + +2010-10-02 15:46 Regina Obe <lr@pcorp.us> + + * [r6032] update PostgreSQL 9.0 that upgrading the driver works as + well. + +2010-09-29 20:28 Nicklas Avén <nicklas.aven@jordogskog.no> + + * [r6030] removing run-time sized array + +2010-09-27 15:20 Regina Obe <lr@pcorp.us> + + * [r6028] copy Paul's changes to trunk + +2010-09-27 13:25 Regina Obe <lr@pcorp.us> + + * [r6024] missing gtk dependency note + +2010-09-27 13:11 Regina Obe <lr@pcorp.us> + + * [r6022] update install instructions to include install of raster + and dependency on GDAL + +2010-09-27 12:59 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6021] liblwgeom/lex.yy.c replaced with previous version + +2010-09-26 21:41 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6020] README files updated with the new raster extension + information. + +2010-09-26 21:21 Jorge Arévalo <jorge.arevalo at deimos-space.com> + + * [r6019] - Added raster extension to new 'raster' directory. + - Modified PostGIS 'configure.ac' script to add support for new + raster type (driven by '--with-raster' configure option. + - Added raster build options to 'GNUMakefile' script. + - PostGIS Python scripts moved to a 'python' subdirectory inside + 'raster/scripts' directory. + - References to "WKT" deleted from source code. + +2010-09-24 18:41 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6017] Forward port regression fixes for pgSQL 9.0 support + +2010-09-24 12:53 Regina Obe <lr@pcorp.us> + + * [r6015] move to enhanced from available + +2010-09-24 11:39 Regina Obe <lr@pcorp.us> + + * [r6014] change all these polyhedral surface/tin to enhanced from + available + +2010-09-24 11:00 Regina Obe <lr@pcorp.us> + + * [r6013] Note change in behavior of ST_NumGeometries and add back + changed section. + +2010-09-24 10:52 Regina Obe <lr@pcorp.us> + + * [r6012] get rid of changed for now + +2010-09-24 10:38 Regina Obe <lr@pcorp.us> + + * [r6011] mark all polyhedral preexisting functions as enhanced. + minor correction to comments + +2010-09-24 10:34 Regina Obe <lr@pcorp.us> + + * [r6010] we have too many new functions (those polyhedral things + that should really be marked as enhancements) and we are going to + have a lot of breaking changes. Revise what's new section to have + a really new, enhanced, and behavior changed section + +2010-09-23 07:40 Mark Leslie <mark.leslie@lisasoft.com> + + * [r6009] Reverting erroneous changes to pgui_read_connection. + +2010-09-22 23:45 Mark Leslie <mark.leslie@lisasoft.com> + + * [r6008] Reverting the default geometry column name change. Got + too excited... breathe deep... + +2010-09-22 22:30 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6007] Use 'the_geom' as geometry column when running regression + tests to match the old regression fragments. + +2010-09-22 22:24 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r6006] Remove compiler warnings in OS/X + +2010-09-22 17:30 Regina Obe <lr@pcorp.us> + + * [r6005] ST_3DIntersects + +2010-09-22 17:22 Regina Obe <lr@pcorp.us> + + * [r6004] fix some typos + +2010-09-22 17:15 Regina Obe <lr@pcorp.us> + + * [r6003] ST_3DClosestPoint -- if only our wkt diagrammer could + draw 3d geometries + +2010-09-22 05:34 Mark Leslie <mark.leslie@lisasoft.com> + + * [r6001] Forcing table names to lower case when initially added. + +2010-09-21 23:22 Mark Leslie <mark.leslie@lisasoft.com> + + * [r6000] Removing lingering references to the broken icon support. + +2010-09-21 23:12 Mark Leslie <mark.leslie@lisasoft.com> + + * [r5999] Changing the default geometry name from 'the_geom' to + 'geom' + +2010-09-21 23:11 Mark Leslie <mark.leslie@lisasoft.com> + + * [r5998] Changing the default geometry name from 'the_geom' to + 'geom' + +2010-09-21 03:36 Mark Leslie <mark.leslie@lisasoft.com> + + * [r5995] Clearing some compile warnings and fixing the issue where + the test connection button always reported success. + +2010-09-19 17:44 Regina Obe <lr@pcorp.us> + + * [r5992] ditto + +2010-09-19 16:56 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r5990] Fix #603: shp2pgsql: "-w" produces invalid WKT for MULTI* + objects. + +2010-09-19 12:48 Regina Obe <lr@pcorp.us> + + * [r5988] 1.5.2 release notes updated + +2010-09-19 12:22 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r5986] Fix the comments-uninstall target so it now works + correctly with the new PGXS code. + +2010-09-19 12:11 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r5984] Fix #572: Password whitespace for Shape File to PostGIS + Importer not supported. Fixed by adding a new function especially + designed for escaping arguments for PQconnectdb strings, and + plugging it into the GUI. + + Note this commit is different from the 1.5 branch version, since + the escaping function is moved into a new common library as I can + see it being required for the new pgsql2shp CLI in the not too + distant future. + +2010-09-18 23:54 Regina Obe <lr@pcorp.us> + + * [r5982] ditto + +2010-09-18 15:22 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r5975] Fix #527: Log window in shp2pgsql-gui should always + append text to bottom of window. + +2010-09-15 16:51 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5973] Add Triangle support for ST_NPoints. Thanks again to + Regina for this report. Related to #596 + +2010-09-15 16:09 Regina Obe <lr@pcorp.us> + + * [r5972] start documenting 3d measurement functions + +2010-09-15 16:01 Regina Obe <lr@pcorp.us> + + * [r5971] another spot missing + +2010-09-15 15:15 Regina Obe <lr@pcorp.us> + + * [r5970] forgot a spot + +2010-09-15 15:12 Regina Obe <lr@pcorp.us> + + * [r5969] rename wktraster to raster + +2010-09-13 19:18 Sandro Santilli <strk@keybit.net> + + * [r5966] Drop references to topology geometry tables in + DropTopology (see #586) + +2010-09-13 17:01 Sandro Santilli <strk@keybit.net> + + * [r5965] Add note about topology.sql expecting a postgis-enabled + db + +2010-09-13 16:59 Sandro Santilli <strk@keybit.net> + + * [r5964] PostgreSQL 9 support : don't use reserved 'table' keyword + (see #585) + +2010-09-13 13:45 Regina Obe <lr@pcorp.us> + + * [r5963] more cleanup + +2010-09-13 13:01 Regina Obe <lr@pcorp.us> + + * [r5962] minor changes + +2010-09-13 12:46 Regina Obe <lr@pcorp.us> + + * [r5961] give up on complex S example and change to simpler L + example + +2010-09-10 20:47 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5959] Add support file for shapefil update + +2010-09-10 20:47 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5958] Fix for #554, align internal shapelib with official + shapelib + +2010-09-10 19:07 Regina Obe <lr@pcorp.us> + + * [r5956] get rid of points in the lower concave hull as well, + minor text cleanup + +2010-09-10 18:47 Regina Obe <lr@pcorp.us> + + * [r5955] revert changes. Getting crud from other pictures in all + pictures that follow + +2010-09-10 16:33 Regina Obe <lr@pcorp.us> + + * [r5954] + +2010-09-10 15:34 Regina Obe <lr@pcorp.us> + + * [r5953] get rid of points too cluttered + +2010-09-10 15:25 Regina Obe <lr@pcorp.us> + + * [r5952] put back example -- some minor clean up + +2010-09-10 15:25 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5951] Bring forward fix from #513 + +2010-09-10 15:20 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5949] Apply patch from mwtoews. On postgresql_min_version + entity in doc. Related to #539 + +2010-09-10 15:14 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5948] Fix for #532, Temporary table geography columns appear in + other's sessions + +2010-09-10 14:53 Regina Obe <lr@pcorp.us> + + * [r5946] + +2010-09-10 14:47 Regina Obe <lr@pcorp.us> + + * [r5945] give up for now + +2010-09-10 14:44 Regina Obe <lr@pcorp.us> + + * [r5944] move holes to geometrycollection + +2010-09-10 14:35 Regina Obe <lr@pcorp.us> + + * [r5943] get rid of some holes + +2010-09-10 14:25 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5942] Fix wrong name in function definition + +2010-09-10 14:18 Regina Obe <lr@pcorp.us> + + * [r5941] + +2010-09-10 14:17 Regina Obe <lr@pcorp.us> + + * [r5940] + +2010-09-10 14:13 Regina Obe <lr@pcorp.us> + + * [r5939] alright just going to increase allocated line size + +2010-09-10 14:08 Regina Obe <lr@pcorp.us> + + * [r5938] + +2010-09-10 14:06 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5937] Fix TGEOM wrong size allocation. Tks to Paul for report + +2010-09-10 14:03 Regina Obe <lr@pcorp.us> + + * [r5936] break into several more multipoints -- parser has limit + (need to fix parser later) + +2010-09-10 13:59 Regina Obe <lr@pcorp.us> + + * [r5935] break multipoint + +2010-09-10 13:51 Regina Obe <lr@pcorp.us> + + * [r5934] + +2010-09-10 13:49 Regina Obe <lr@pcorp.us> + + * [r5933] + +2010-09-10 13:37 Regina Obe <lr@pcorp.us> + + * [r5932] + +2010-09-10 13:35 Regina Obe <lr@pcorp.us> + + * [r5931] + +2010-09-10 13:29 Regina Obe <lr@pcorp.us> + + * [r5930] concavehull can't reset input params in 8.3, fix document + example + +2010-09-10 13:15 Regina Obe <lr@pcorp.us> + + * [r5929] cleanup + +2010-09-10 13:00 Regina Obe <lr@pcorp.us> + + * [r5927] Faster and more robust and accurate concave hull with + Simon's S shape example test + +2010-09-10 12:58 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r5926] Fix #458: postgis_comments being installed in contrib + instead of version folder (this is a little bit of a hack since + we can't merge PGXS into the main Makefile directly, but it + works). + +2010-09-10 08:50 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r5923] Fix #581: LWGEOM_expand produces inconsistent results. + Change the bounding box calculation routines in ptarray.c so that + they perform the entire calculation in double precision then + convert the final result to BOX2DFLOAT4. This prevents rounding + errors being introduced into the bounding box when each input + result is converted to BOX2DFLOAT4 in turn. + +2010-09-07 21:59 Sandro Santilli <strk@keybit.net> + + * [r5922] concave hull is currently supported + +2010-09-07 21:34 Regina Obe <lr@pcorp.us> + + * [r5921] availability note for st_concavehull + +2010-09-07 09:45 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r5920] Fix incorrect status return code from projFileCreate. + +2010-09-07 09:30 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5919] minor changes on comment + +2010-09-06 21:52 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r5918] Fix ShpDumperCloseTable so that it now passes back any + errors that may occur during projFileCreate. + +2010-09-06 21:49 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r5917] Fix the mixed-type geometry column detection routines so + that they allow just MULTI/non-MULTI versions of the same basic + geometry type within a column. Per report from Denis Rykov. + +2010-09-06 21:07 Regina Obe <lr@pcorp.us> + + * [r5916] minor corrections + +2010-09-06 21:00 Regina Obe <lr@pcorp.us> + + * [r5915] fix typo + +2010-09-06 20:55 Regina Obe <lr@pcorp.us> + + * [r5914] slightly more robust concave hull and update with links + to our test real world cases. + +2010-09-06 12:53 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5913] Add TRIANGLE, TIN and PolyhedralSurface support to + Perimeter, and relevant cunit tests (cf #568). Add TRIANGLE Area + support (and so to TIN). + +2010-09-06 09:40 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5912] Add TRIANGLE support for GeometryN. Fix #574. Thanks to + Regina for report + +2010-09-06 08:16 Regina Obe <lr@pcorp.us> + + * [r5911] more cleanup of bios. Get rid of WKT and just called it + Raster since in PostGIS 2.0, we will eventually drop the WKT from + the name + +2010-09-05 17:01 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5910] Revert changes on PointN and Numpoints to remove TRIANGLE + support. Add ExteriorRing support to TRIANGLE. Changes DumpPoint + behaviour to reflect exteriorRing. Update unit tests + +2010-09-05 16:42 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5909] make astyle + +2010-09-05 15:25 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5908] Use TGEOM struct to compute POLYHEDRALSURFACE and TIN + dimension. Add relevant cunit tests. Few astyle improve + +2010-09-03 16:14 Regina Obe <lr@pcorp.us> + + * [r5906] add additional proto for creating holed polygons -- + example later + +2010-09-03 15:37 Regina Obe <lr@pcorp.us> + + * [r5905] + +2010-09-03 15:35 Regina Obe <lr@pcorp.us> + + * [r5904] + +2010-09-03 15:13 Regina Obe <lr@pcorp.us> + + * [r5903] + +2010-09-03 15:08 Regina Obe <lr@pcorp.us> + + * [r5902] typo + +2010-09-03 15:06 Regina Obe <lr@pcorp.us> + + * [r5901] ST_ConcaveHull mark as new, reduce precision of point + examples so passes thru wkt image generator + +2010-09-03 14:48 Regina Obe <lr@pcorp.us> + + * [r5900] Example of ST_ConcaveHull against point set + +2010-09-03 13:58 Regina Obe <lr@pcorp.us> + + * [r5899] + +2010-09-03 13:52 Regina Obe <lr@pcorp.us> + + * [r5898] try again + +2010-09-03 13:47 Regina Obe <lr@pcorp.us> + + * [r5897] snap points to grid + +2010-09-03 13:42 Regina Obe <lr@pcorp.us> + + * [r5896] take out last example for now + +2010-09-03 13:39 Regina Obe <lr@pcorp.us> + + * [r5895] Will assume my concave hull with the over 1100 points + polygon slaughtered the wkt processor + +2010-09-03 13:23 Regina Obe <lr@pcorp.us> + + * [r5894] First draft of ST_ConcaveHull -- more to come + +2010-09-03 12:31 Sandro Santilli <strk@keybit.net> + + * [r5893] Make edge-edge relations clearer. Thanks to Peter + Hopfgartner and to + Xfig developers for the wonderful experience of patching a + diagram ! :) + +2010-09-01 23:44 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r5892] Fix pgsql2shp so that it correctly returns an exit code + of 1 (fail) in the case where either a user query returns no + rows, or the specified table is empty. + +2010-09-01 23:23 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r5891] Revert r5888 - the real bug is that the error message + handling in place should already catch this condition but + doesn't. + +2010-09-01 20:14 Nicklas Avén <nicklas.aven@jordogskog.no> + + * [r5890] Fixed some build warnings I had missed + +2010-09-01 19:55 Nicklas Avén <nicklas.aven@jordogskog.no> + + * [r5889] 3D Distance functions, only point-point and point line. + #576 + +2010-09-01 17:40 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r5888] Alter the pgsql2shp CLI program so that it returns a new + exit code of 2 to indicate "success, but 0 records processed". + This could happen if a user-defined query doesn't return any + results, or the source table happens to be empty. By setting a + separate exit code, we allow scripts to determine whether or not + the output shapefile contains any (useful) data. + +2010-09-01 12:50 Regina Obe <lr@pcorp.us> + + * [r5887] missed a spot + +2010-09-01 12:48 Regina Obe <lr@pcorp.us> + + * [r5886] update with 1.5.2, 1.5.1 changes and also TIN/Polyhedral + for 2.0.0 + +2010-09-01 05:56 Regina Obe <lr@pcorp.us> + + * [r5883] update credits + +2010-09-01 05:51 Regina Obe <lr@pcorp.us> + + * [r5881] update release notes to include 1.5.2 (uppcoming) and + 1.5.1 and corrections to 1.5.0 + +2010-08-31 19:14 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5878] Fix wrong pointer allocation size, with 64 bits errors. + Tks to Mateusz for report. Improve cu_unit report. Improve and + fix some messages from LWDEBUG + +2010-08-31 18:01 Nicklas Avén <nicklas.aven@jordogskog.no> + + * [r5877] remove strict on st_equals as discussed in #536 + +2010-08-30 09:06 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5875] Astyle on new files + +2010-08-30 06:49 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5874] Add Topology structure for connected surfaces + (PolyhedralSurface, Tin) and LWGEOM to TGEOM transformations + routines. Add related cunit tests. Merge cu_tin and + cu_polyhedralsurface into a single cu_surface unit test. + +2010-08-30 06:47 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5873] Improve comments + +2010-08-30 06:45 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5872] add Triangle support in lwgeom_getnumgeometries + +2010-08-28 09:21 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r5871] Fix uninitialised gidfound variable which would sometimes + cause pgsql2shp to fail if a gid column was not present on a + database table. + +2010-08-28 09:16 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r5870] Set svn:keywords property so that the version number is + updated correctly on checkout. + +2010-08-24 12:42 Regina Obe <lr@pcorp.us> + + * [r5867] more visually appealing example + +2010-08-24 11:37 Regina Obe <lr@pcorp.us> + + * [r5866] another st_split example + +2010-08-23 14:12 Sandro Santilli <strk@keybit.net> + + * [r5863] Add 3 more postgis objects to skip from dumps + +2010-08-23 13:08 Regina Obe <lr@pcorp.us> + + * [r5862] fix pixel types list to agree with Mat's changes to + raster rfc + +2010-08-21 21:20 Regina Obe <lr@pcorp.us> + + * [r5860] Fix dead link -- Jorge changed his link for Oracle raster + / wkt raster compare + +2010-08-20 22:38 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5856] Add unfinished WKB input parser for later. + +2010-08-20 16:40 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5855] Synch up to 1.5 version + +2010-08-20 13:14 Regina Obe <lr@pcorp.us> + + * [r5854] some fluff from the example I copied from didn't mean to + put in. + +2010-08-20 12:50 Regina Obe <lr@pcorp.us> + + * [r5853] Example for ST_Split + +2010-08-19 19:50 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5852] Slight improvement for #573 + +2010-08-19 12:28 Regina Obe <lr@pcorp.us> + + * [r5850] more tin and ps. Note about change in st_asbinary in 9.0 + +2010-08-18 18:48 Regina Obe <lr@pcorp.us> + + * [r5849] mark more TIN compatible functions. revise template + slightly + +2010-08-18 14:22 Regina Obe <lr@pcorp.us> + + * [r5848] Flag more TIN support + +2010-08-18 11:19 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5847] Add lwtype_name to report more user friendly error + message. Cf #570 + +2010-08-18 08:02 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5846] Put TYPE_GETTYPE before his possible debug use... + +2010-08-18 08:01 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5845] Fix for #573, where has_arc check with unsupported + TRIANGLE/TIN/POLYHEDRALSURFACE produce crash with POSTGIS2GEOS + function. Thanks to Regina for bug report ! + +2010-08-17 20:10 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5843] Return the, er, return value. + +2010-08-17 18:24 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5842] Add TRIANGLE support to ST_Affine function. Thanks to + Regina for detailled bug report. Cf #571 + +2010-08-17 15:21 Regina Obe <lr@pcorp.us> + + * [r5839] revise slightly for true collection for polysurface. + +2010-08-17 07:48 Regina Obe <lr@pcorp.us> + + * [r5838] Add examples of EWKB/EWKT for TIN, TRIANGLE, and + MULTICURVE + +2010-08-17 07:24 Regina Obe <lr@pcorp.us> + + * [r5837] mark ST_Dump as TIN supporting, update peoples bios. Add + Maxime van Noppen (aka yabo) to contributors list (ST_DumpPoints + and ST_Collect support) + +2010-08-16 15:09 Regina Obe <lr@pcorp.us> + + * [r5836] Add matrix column for TIN/Triangles. Add TINA dn + triangles to garden tests + +2010-08-16 14:19 Regina Obe <lr@pcorp.us> + + * [r5835] Mark ST_Dumpoints as supporting Polyhedral, triangles, + and TINS. Example of these. Revise add a marker in template and + postgis.xml for Triangles and TINS. + +2010-08-16 07:59 Mark Leslie <mark.leslie@lisasoft.com> + + * [r5834] Changing the ID keyword to Id, so it will actually get + picked up. + +2010-08-16 07:58 Mark Leslie <mark.leslie@lisasoft.com> + + * [r5833] Setting svn:keywords so the headers make sense. + +2010-08-16 07:49 Mark Leslie <mark.leslie@lisasoft.com> + + * [r5832] Adding copywrite header to the structure files. + +2010-08-16 07:49 Mark Leslie <mark.leslie@lisasoft.com> + + * [r5831] Removing a Makefile that shouldn't have been committed. + +2010-08-15 18:54 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5830] Add St_NumPoints and ST_PointN support for Triangle. Add + ST_DumpPoints support for Triangle, Tin and Polyhedral Surface, + and related unit tests. Tks to yabo for patch. Related to #564 + +2010-08-15 18:51 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5829] Add forgotten Triangle support in lwgeom_inspect + +2010-08-15 14:20 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r5828] Commit initial version of reworked pgsql2shp architecture + that defines a common API within pgsql2shp-core that can be + called from both the existing CLI and in the future a GUI + interface. + + This commit also includes a very comprehensive reworking of the + old pgsql2shp code designed to make things better commented and + maintainable in the long term, so please use on as many PostGIS + tables as possible during testing. + + This work was primarily sponsored by OpenGeo (http://opengeo.org) + - thanks guys! + +2010-08-15 13:57 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5827] Add Tin and Triangle support for ST_GeomFromGML. Add + related unit tests + +2010-08-15 13:56 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5826] Fix error in lwgeom_recursive2d for Triangle type + +2010-08-15 08:30 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5825] Astyle session on whole trunk + +2010-08-14 10:57 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r5824] Fix a memory leak in all of the MULTI* deserialize + routines - once the relevant information had been copied from the + LWGEOM_INSPECTED structure, the inspected structure itself was + not being freed. + +2010-08-13 17:30 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5822] Few lwtype_name add + +2010-08-13 17:29 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5821] Add Triangle and TIN new geometry type. Add Cunit tests + on parse stage, related to #561. Add ST_AsGML support TIN and + Triangle for GML 3. Slightly cast change in PolyhedralSurface + LWGEOM struct Remove PolyhedralSurface support from forceRHR + function as orientation is meaningfull in PS. Move is_closed + functions from PostGIS to LWGEOM dir and related cunit test case + on line and curves. + +2010-08-13 15:26 Regina Obe <lr@pcorp.us> + + * [r5820] ST_AsGML polyhedral support + +2010-08-13 15:15 Regina Obe <lr@pcorp.us> + + * [r5819] st_isclosed polyhedral surface + +2010-08-12 15:40 Regina Obe <lr@pcorp.us> + + * [r5818] more. Change polyhedralsurface example to valid srid so + don't get false errors + +2010-08-12 14:58 Regina Obe <lr@pcorp.us> + + * [r5817] Affine family polyhedral + +2010-08-12 14:52 Regina Obe <lr@pcorp.us> + + * [r5816] Polyhedral findings based on monkey testing -- more to + come + +2010-08-12 12:39 Regina Obe <lr@pcorp.us> + + * [r5815] missing SELECT + +2010-08-11 19:20 Regina Obe <lr@pcorp.us> + + * [r5814] more logging + +2010-08-11 18:41 Regina Obe <lr@pcorp.us> + + * [r5813] start logging start and stop times to logging table + postgis_garden_log. Still needs some fine tuning + +2010-08-11 13:42 Regina Obe <lr@pcorp.us> + + * [r5812] ST_GeomFromGML example for Polyhedral surface + +2010-08-11 12:15 Regina Obe <lr@pcorp.us> + + * [r5810] I think Mark committed this file by accident + +2010-08-11 09:50 Mark Leslie <mark.leslie@lisasoft.com> + + * [r5809] Pushing the shp2pgsql-gui changes (multi-file, + validation, drag-n-drop) pulled from stable branch into trunk. + +2010-08-11 09:24 Nicklas Avén <nicklas.aven@jordogskog.no> + + * [r5807] pushing *uchar use out of measures.c as part of #308 + +2010-08-10 19:43 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5805] Add in fix for #562, forward ported from 1.5 branch + (point-in-poly failure for large large geography polygons) + +2010-08-10 16:19 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5803] Add POLYHEDRALSURFACE support to ST_AsGML for GML 3 + output + +2010-08-09 18:56 Regina Obe <lr@pcorp.us> + + * [r5799] Flag st_dimension supports polyhedral and no longer + throws exception for empty geoms + +2010-08-09 15:40 Regina Obe <lr@pcorp.us> + + * [r5798] ST_GeometryN polyhedral support + +2010-08-09 14:22 Regina Obe <lr@pcorp.us> + + * [r5797] mark some more functions support polyhedral surface + +2010-08-09 13:53 Regina Obe <lr@pcorp.us> + + * [r5796] appendments about Polyhedral surface support + +2010-08-08 22:20 Sandro Santilli <strk@keybit.net> + + * [r5795] Drop spurious empty line + +2010-08-08 22:20 Sandro Santilli <strk@keybit.net> + + * [r5794] 'pushd' is not guaranteed to be provided by all shells + (Ubuntu 8.10 has /bin/sh point to dash(1) which doesn't provide + it) + +2010-08-08 20:41 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5793] Add function aliases for ST_NumPatches and ST_PatchN + (both SFS 1.2 and SQL/MM). Add PolyhedralSurface for ST_IsClosed + (surface vs volume). Update ST_Dimension support to be + consistent. Add unit tests. + +2010-08-08 20:36 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5792] Improve printLWPSURFACE to also print each rings if any + +2010-08-06 21:31 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5791] lwtype_name session. cf #453 + +2010-08-06 20:30 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5790] Typo in error message + +2010-08-06 20:08 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5789] Add PolyhedralSurface support to ST_GeomFromGML. Add + related unit tests. related to #430 + +2010-08-06 20:07 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5788] Add PolyhedralSurface support to force_* functions + +2010-08-06 16:17 Regina Obe <lr@pcorp.us> + + * [r5784] flag more ps functions + +2010-08-06 15:50 Regina Obe <lr@pcorp.us> + + * [r5783] typo in entity + +2010-08-06 15:42 Regina Obe <lr@pcorp.us> + + * [r5782] typos + +2010-08-06 13:43 Regina Obe <lr@pcorp.us> + + * [r5781] + +2010-08-06 13:42 Regina Obe <lr@pcorp.us> + + * [r5780] st_area polyhedral support + +2010-08-06 13:24 Regina Obe <lr@pcorp.us> + + * [r5779] flagged wrong function - swap + +2010-08-06 13:22 Regina Obe <lr@pcorp.us> + + * [r5778] flagged 1 too many functions as polyhedral supporting + +2010-08-06 13:03 Regina Obe <lr@pcorp.us> + + * [r5777] forgot to increment column count + +2010-08-06 13:00 Regina Obe <lr@pcorp.us> + + * [r5776] itemize some constructors supporting polyhedral surfaces + +2010-08-06 12:50 Regina Obe <lr@pcorp.us> + + * [r5775] update template to include polyhedral, add a special + section listing just polyhedral support functions + +2010-08-06 12:42 Regina Obe <lr@pcorp.us> + + * [r5774] Add polyhedral column and abbreviate the others so can + easily fit new column. We should eventually have raster in there + too. + +2010-08-06 12:22 Regina Obe <lr@pcorp.us> + + * [r5773] Add polyhedral surface to code names and add ST_Dump as + supporting polyhedral surfaces + +2010-08-05 19:43 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5772] Add POLYHEDRALSURFACE support to AddGeometryColumn, + GetType, ST_Dimension, ST_NumGeometries. Related to #555 + +2010-08-05 15:58 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5771] Change label 'face' to 'patch' in POLYHEDRALSURFACE. + Related to #427 + +2010-08-04 20:02 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5770] Add geography support for POLYHEDRALSURFACE. Related to + #427 + +2010-08-04 19:04 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5769] Update some comments to add year to each ISO specs + reference. Some beautify on code. Not a single change on code + itself. + +2010-08-03 17:55 Regina Obe <lr@pcorp.us> + + * [r5768] fix typo + +2010-08-03 14:19 Regina Obe <lr@pcorp.us> + + * [r5766] minor corrections and addition about bytea output + behavior in 9.0 + +2010-08-02 16:02 Regina Obe <lr@pcorp.us> + + * [r5765] Add polyhedralsurface to ewkt example forms + +2010-08-02 15:59 Regina Obe <lr@pcorp.us> + + * [r5764] Add polyhedral surface to garden geometry set + +2010-08-01 21:11 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5760] Add 2D and 3DM support to POLYHEDRALSURFACE. Allow + interior rings for patches. Don't check anymore minimum patch + number. Related to #427 + +2010-07-29 13:44 Nicklas Avén <nicklas.aven@jordogskog.no> + + * [r5758] ugly style fix + +2010-07-29 13:36 Nicklas Avén <nicklas.aven@jordogskog.no> + + * [r5757] param.h is needed for ENDIAN definitions in mingw + +2010-07-28 04:30 Regina Obe <lr@pcorp.us> + + * [r5755] amend docs to talk about standard_conforming_strings and + change in 9.0 + +2010-07-27 18:22 Regina Obe <lr@pcorp.us> + + * [r5754] ST_SetValue + +2010-07-25 21:20 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5753] Add really basic POLYHEDRALSURFACE support. Parse, + Unparse, Serialization and cunit unit tests. related to #427 + +2010-07-24 10:55 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5752] Remove Integer deprecaded types (POINTTYPEI, LINETYPEI, + POLYGONTYPEI) and lwgi related stuff. As a consequence EWKB of + CURVEPOLYTYPE, MULTICURVETYPE and MULTISURFACETYPE is + changed/impacted (geometry type bits). Now we have 3 new free + geometry type available. Preliminary work to #427 + +2010-07-23 14:55 Regina Obe <lr@pcorp.us> + + * [r5749] Polish up Raster FAQ a bit more + +2010-07-23 14:16 Regina Obe <lr@pcorp.us> + + * [r5747] document raster2coord family of functions + +2010-07-22 12:26 Regina Obe <lr@pcorp.us> + + * [r5746] Add Jorge's discussion on Oracle GeoRaster to FAQ + +2010-07-22 10:50 Regina Obe <lr@pcorp.us> + + * [r5745] Update to include link to MacOSX binaries. Also put in + the reason for rtpostgis not loading (our fault but...) + +2010-07-09 16:59 Regina Obe <lr@pcorp.us> + + * [r5736] ST_PixelAsPolygon + +2010-07-09 14:55 Regina Obe <lr@pcorp.us> + + * [r5735] additional note link to ST_BandPixelType in case people + don't know what the codes mean + +2010-07-09 14:53 Regina Obe <lr@pcorp.us> + + * [r5734] ST_RasterBandMetaData + +2010-07-07 21:52 Sandro Santilli <strk@keybit.net> + + * [r5732] Add 7.3+ CAST (wasn't needed up to 7.2, against which + this topology implementation was coded) + +2010-07-07 14:23 Regina Obe <lr@pcorp.us> + + * [r5731] get rid of obsolete note. Have to simplify example too + since its not needed anymore -- oh well - will do later + +2010-07-07 14:20 Regina Obe <lr@pcorp.us> + + * [r5729] typo missing end tag + +2010-07-07 14:18 Regina Obe <lr@pcorp.us> + + * [r5728] new protos for st_value (the point geometry versions -- + yeh) plus examples + +2010-07-07 13:59 Regina Obe <lr@pcorp.us> + + * [r5727] st_metadata + +2010-07-07 13:50 Regina Obe <lr@pcorp.us> + + * [r5726] other missing protos of existing defined + +2010-07-07 13:44 Regina Obe <lr@pcorp.us> + + * [r5725] missed spot + +2010-07-07 13:43 Regina Obe <lr@pcorp.us> + + * [r5724] ad missing proto for bandnodatavalue + +2010-07-06 08:28 Sandro Santilli <strk@keybit.net> + + * [r5723] Document ST_isCollection (see #549) + +2010-07-06 08:28 Sandro Santilli <strk@keybit.net> + + * [r5722] Remove spurious element (was hiding behind a fill) + +2010-07-04 16:34 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5721] Add in micro commit to see if email hook is running + +2010-07-01 13:20 Sandro Santilli <strk@keybit.net> + + * [r5718] Add ST_isCollection (see ticket #549) + +2010-06-30 16:14 Sandro Santilli <strk@keybit.net> + + * [r5717] Do not source psqlrc when doing tests + +2010-06-30 16:10 Sandro Santilli <strk@keybit.net> + + * [r5716] More explicit cast from geometry to text (for + quote_ident's sake) and an handling of unexistent topology. Tests + run again with psql 8.3.9 + +2010-06-30 15:52 Sandro Santilli <strk@keybit.net> + + * [r5715] Define the cross-pgsql macros that used to be in + sqldefines.h (now lost) + use st_union rather than geomunion (now + lost) + +2010-06-30 15:51 Sandro Santilli <strk@keybit.net> + + * [r5714] Fix loading of postgis.sql + +2010-06-25 10:05 Sandro Santilli <strk@keybit.net> + + * [r5708] More exception handling to avoid leaks and give more info + when it happens + +2010-06-25 09:30 Sandro Santilli <strk@keybit.net> + + * [r5707] Properly handle GEOS exceptions on cascaded union code + (failing since introduction of postponed exception for cleaning + geoms) + +2010-06-25 07:46 Regina Obe <lr@pcorp.us> + + * [r5705] #536 get rid of strict on ST_Intersects, ST_CoveredBy and + ST_Covers because spatial index doesn't work with strict on (and + text,text ST_DWithin) + +2010-06-25 07:41 Sandro Santilli <strk@keybit.net> + + * [r5703] Test splitting 3d line by 2d blade + +2010-06-24 13:26 Regina Obe <lr@pcorp.us> + + * [r5702] minor corrections + +2010-06-24 13:22 Regina Obe <lr@pcorp.us> + + * [r5701] Add another FAQ + +2010-06-24 12:02 Regina Obe <lr@pcorp.us> + + * [r5700] fix some data type typos + +2010-06-23 17:56 Regina Obe <lr@pcorp.us> + + * [r5699] typo in data type + +2010-06-23 16:53 Regina Obe <lr@pcorp.us> + + * [r5698] ST_Intersection and minor changes for setof to + distinquish from array types + +2010-06-23 16:27 Regina Obe <lr@pcorp.us> + + * [r5697] fix typo + +2010-06-23 14:36 Regina Obe <lr@pcorp.us> + + * [r5696] Document ST_Intersects + +2010-06-23 14:18 Regina Obe <lr@pcorp.us> + + * [r5695] document ST_Polygon + +2010-06-23 13:51 Regina Obe <lr@pcorp.us> + + * [r5694] Add some faqs from the wkt raster wiki. A lot I left out + for now because they are too wordy. + +2010-06-03 19:10 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5678] Remove crash when dbf file is missing / unloadable + +2010-06-01 19:59 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5666] Fix sense of the dbf/date test. + +2010-06-01 19:58 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5665] Accept "0" as a null value for Date types. + +2010-05-27 14:03 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5649] Remember to close the iconv handle + +2010-05-27 14:02 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5648] Make use of iconvctl conditional on it existing + +2010-05-27 13:40 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5647] Remove unused variable + +2010-05-27 13:19 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5646] Fix utf8 to return *something* when it can, so that + something can be reported in + the error string. + +2010-05-26 17:26 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5643] Change default back to UTF8 and improve error message on + failure. + +2010-05-26 16:26 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5642] Read configuration info from environment, if it's there. + +2010-05-26 16:02 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5639] Only update the progress bar once every N records, where + N is determined by the number of records in the file. + +2010-05-25 18:44 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5638] Back off from Win32 encoding to more generic ISO8859-1 + +2010-05-22 15:41 Sandro Santilli <strk@keybit.net> + + * [r5634] Add note about the truncated multibyte enhancement (as + the issue came out on IRC for another dataset) + +2010-05-20 04:20 Regina Obe <lr@pcorp.us> + + * [r5632] minor formatting on ST_Covers + +2010-05-19 15:22 Regina Obe <lr@pcorp.us> + + * [r5629] link to ST_MakePointM from ST_MakePoint + +2010-05-19 15:17 Regina Obe <lr@pcorp.us> + + * [r5628] geography example for st_covers + +2010-05-18 17:43 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5625] Remove crash for case when all geographies are on the + outer edges of the histobox, causing all to be classified as + "deviants" by the stdev code line (#474) + +2010-05-17 23:38 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5623] Rename vasbappend to stringbuffer_aprintf + +2010-05-17 23:33 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5622] Allow GUI to create partial connection strings. + +2010-05-13 08:39 Sandro Santilli <strk@keybit.net> + + * [r5618] Fix memory error in ST_Split (short allocation) + +2010-05-04 21:21 Sandro Santilli <strk@keybit.net> + + * [r5615] Add ST_MakeValid item + +2010-05-04 21:19 Sandro Santilli <strk@keybit.net> + + * [r5614] Oops, was using GEOS types instead of LWGEOM ones.. + +2010-05-04 17:18 Regina Obe <lr@pcorp.us> + + * [r5612] fix formatting + +2010-05-04 17:17 Regina Obe <lr@pcorp.us> + + * [r5611] Provide at least one example of ST_GeogFromText + +2010-05-04 15:36 Regina Obe <lr@pcorp.us> + + * [r5610] fix some faqs I got wrong, break out some long faqs. Add + Tamas nightly build to list for latest and greatest windows GDAL + binaries + +2010-05-04 03:50 Regina Obe <lr@pcorp.us> + + * [r5609] Break out raster band editor functions into separate + section + +2010-05-03 20:01 Regina Obe <lr@pcorp.us> + + * [r5607] link ref + +2010-05-03 19:59 Regina Obe <lr@pcorp.us> + + * [r5606] requested changes from #514 + +2010-05-03 16:35 Sandro Santilli <strk@keybit.net> + + * [r5604] ST_MakeValid: Early fail if an unsupported type is given + +2010-05-03 16:24 Sandro Santilli <strk@keybit.net> + + * [r5603] Document ST_MakeValid + +2010-05-03 16:02 Sandro Santilli <strk@keybit.net> + + * [r5602] Add a 'staged-install' rule, helpful when you want to run + a single test after changing the core lib ... + +2010-05-03 15:59 Sandro Santilli <strk@keybit.net> + + * [r5601] ST_MakeValid: don't choke on MULTILINESTRING containing + invalid LINESTRING elements + +2010-05-03 12:11 Sandro Santilli <strk@keybit.net> + + * [r5600] Merge SRID-retainment tests with some of the other tests + +2010-05-03 11:31 Sandro Santilli <strk@keybit.net> + + * [r5599] Do not drop polygon boundaries collapsed to points + +2010-05-03 03:26 Regina Obe <lr@pcorp.us> + + * [r5598] Link to helper function built using ST_Value + +2010-05-03 03:11 Regina Obe <lr@pcorp.us> + + * [r5597] Get rid of still under development for ST_DumpAsPolygons. + Seems to be working fairly well now. + +2010-04-30 19:17 Regina Obe <lr@pcorp.us> + + * [r5595] move bandnodatavalue to raster band section + +2010-04-30 18:34 Regina Obe <lr@pcorp.us> + + * [r5594] slight correction + +2010-04-30 18:34 Regina Obe <lr@pcorp.us> + + * [r5593] document build date and lib version maintenance functions + +2010-04-30 18:25 Regina Obe <lr@pcorp.us> + + * [r5592] document more functions -- start breaking out raster band + functions from raster functions + +2010-04-30 16:17 Regina Obe <lr@pcorp.us> + + * [r5591] example for ST_DumpAsPolygons + +2010-04-27 15:26 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5575] Add new option to ST_AsGML: ability to remove + srsDimension attribute in GML 3. cf #508 + +2010-04-27 13:58 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5572] Fix wrong OGC URN in GeoJson and GML output. Cf #507 + +2010-04-20 04:18 Regina Obe <lr@pcorp.us> + + * [r5568] Add another example to st_value demonstrating sampling + and fix other example + +2010-04-19 03:07 Regina Obe <lr@pcorp.us> + + * [r5567] document ST_SetBandHasNoDataValue + +2010-04-18 12:13 Sandro Santilli <strk@keybit.net> + + * [r5566] Escape fields named xmin (xmax was already escaped). See + issue #504. + +2010-04-17 21:25 Sandro Santilli <strk@keybit.net> + + * [r5565] Fix documentation for ST_Split (so postgis_comments.sql + is correct) + +2010-04-17 11:06 Sandro Santilli <strk@keybit.net> + + * [r5564] Plug a couple of memory leaks + +2010-04-17 08:26 Sandro Santilli <strk@keybit.net> + + * [r5563] Fix crash on invalid polygon rings conversion to geos + +2010-04-17 01:53 Regina Obe <lr@pcorp.us> + + * [r5562] fix typos and add more links + +2010-04-17 00:57 Regina Obe <lr@pcorp.us> + + * [r5561] ST_SkewX, ST_SkewY, ST_SetSkew + +2010-04-17 00:13 Regina Obe <lr@pcorp.us> + + * [r5560] typo in return description of ST_MakeEmptyRaster + +2010-04-14 17:42 Regina Obe <lr@pcorp.us> + + * [r5551] fix typos + +2010-04-14 14:56 Regina Obe <lr@pcorp.us> + + * [r5550] more gdal_translate examples + +2010-04-14 14:48 Regina Obe <lr@pcorp.us> + + * [r5549] another example of gdal_translate + +2010-04-14 14:09 Regina Obe <lr@pcorp.us> + + * [r5547] Example of AddRasterColumn + +2010-04-14 13:16 Regina Obe <lr@pcorp.us> + + * [r5546] Fix typo + +2010-04-14 12:52 Regina Obe <lr@pcorp.us> + + * [r5545] Provide yet more common use case examples of ST_Value + +2010-04-14 11:48 Regina Obe <lr@pcorp.us> + + * [r5544] try to get rid of really long lines + +2010-04-14 11:40 Regina Obe <lr@pcorp.us> + + * [r5543] Document how to define a raster layer in Mapserver + +2010-04-13 06:08 Regina Obe <lr@pcorp.us> + + * [r5540] Give faq an id for easier pretty bookmarking + +2010-04-13 04:38 Regina Obe <lr@pcorp.us> + + * [r5539] + +2010-04-13 04:37 Regina Obe <lr@pcorp.us> + + * [r5538] forgot paragraph mark + +2010-04-13 04:35 Regina Obe <lr@pcorp.us> + + * [r5537] more elaboration of the important Can I export my raster + data FAQ + +2010-04-12 21:11 Regina Obe <lr@pcorp.us> + + * [r5536] typo fix + +2010-04-12 20:58 Regina Obe <lr@pcorp.us> + + * [r5535] Add quickie faq about exporting raster data from PostGIS + +2010-04-12 08:48 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5532] Add optional namespace to ST_AsKML function. related in a + way to #460 + +2010-04-12 04:44 Regina Obe <lr@pcorp.us> + + * [r5531] minor additions + +2010-04-11 23:21 Regina Obe <lr@pcorp.us> + + * [r5530] start documenting ST_DumpAsPolygons. Will provide + examples once get it to stop crashing on me. + +2010-04-11 23:03 Regina Obe <lr@pcorp.us> + + * [r5529] fix tag typo + +2010-04-11 22:52 Regina Obe <lr@pcorp.us> + + * [r5528] mistated something. Correct constraint description of + addrastercolumn + +2010-04-11 22:45 Regina Obe <lr@pcorp.us> + + * [r5527] Add management functions section + +2010-04-10 15:32 Regina Obe <lr@pcorp.us> + + * [r5526] minor change + +2010-04-10 03:39 Regina Obe <lr@pcorp.us> + + * [r5525] title change + +2010-04-10 02:48 Regina Obe <lr@pcorp.us> + + * [r5524] start itemizing operators + +2010-04-10 01:42 Regina Obe <lr@pcorp.us> + + * [r5523] document st_setgeoreference + +2010-04-09 16:24 Regina Obe <lr@pcorp.us> + + * [r5517] Add ST_SetUpperLeft + +2010-04-07 21:45 Regina Obe <lr@pcorp.us> + + * [r5514] + +2010-04-07 19:22 Regina Obe <lr@pcorp.us> + + * [r5513] fix reference typo + +2010-04-07 17:25 Regina Obe <lr@pcorp.us> + + * [r5512] forgot to add faq_wktraster item + +2010-04-07 16:54 Regina Obe <lr@pcorp.us> + + * [r5511] First draft of wktraster faq + +2010-04-07 14:35 Regina Obe <lr@pcorp.us> + + * [r5510] conver to 1 column 2 row table + +2010-04-07 14:15 Regina Obe <lr@pcorp.us> + + * [r5509] typo + +2010-04-07 14:06 Regina Obe <lr@pcorp.us> + + * [r5508] correct typo + +2010-04-07 14:05 Regina Obe <lr@pcorp.us> + + * [r5507] Put link to spec for a diagrammatic view. + +2010-04-07 13:59 Regina Obe <lr@pcorp.us> + + * [r5506] first draft of ST_ConvexHull -- still need to put in + pictures + +2010-04-06 23:37 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5505] Add support for command-q shutdown in Mac GTK build + +2010-04-06 18:33 Sandro Santilli <strk@keybit.net> + + * [r5503] WARN and continue on incomplete multibyte sequence + +2010-04-05 21:38 Regina Obe <lr@pcorp.us> + + * [r5497] slight correction + +2010-04-05 21:32 Regina Obe <lr@pcorp.us> + + * [r5496] itemize band pixel types and fix some formatting issues + +2010-04-05 15:17 Regina Obe <lr@pcorp.us> + + * [r5495] more blurb in description + +2010-04-05 15:16 Regina Obe <lr@pcorp.us> + + * [r5494] xsl to build postgresql help for wktraster + +2010-04-05 14:12 Regina Obe <lr@pcorp.us> + + * [r5493] Start adding editors, give an additional better example + of ST_Value + +2010-04-05 07:28 Regina Obe <lr@pcorp.us> + + * [r5492] upper left x and y + +2010-04-05 05:59 Regina Obe <lr@pcorp.us> + + * [r5491] example for st_value + +2010-04-05 05:55 Regina Obe <lr@pcorp.us> + + * [r5490] typo in constructor section + +2010-04-05 05:52 Regina Obe <lr@pcorp.us> + + * [r5489] st_box2d, st_envelope (note regular Postgis changed + st_box2d to just box2d old st_box2d is deprecated) + +2010-04-05 05:25 Regina Obe <lr@pcorp.us> + + * [r5488] more typos fixed, add constructor section + +2010-04-05 04:59 Regina Obe <lr@pcorp.us> + + * [r5487] Fix typo + +2010-04-05 04:30 Regina Obe <lr@pcorp.us> + + * [r5486] more functions documented + +2010-04-05 02:28 Regina Obe <lr@pcorp.us> + + * [r5485] more accessors + +2010-04-05 01:32 Regina Obe <lr@pcorp.us> + + * [r5484] more changes + +2010-04-05 01:05 Regina Obe <lr@pcorp.us> + + * [r5483] First start at integrating wktraster documentation -- + hopefully didn't break anything doing this. + +2010-03-31 15:34 Sandro Santilli <strk@keybit.net> + + * [r5473] Do not hard-code default encoding (since it's a macro) + +2010-03-31 14:50 Sandro Santilli <strk@keybit.net> + + * [r5472] Dump more informations about failing decoding + +2010-03-30 12:32 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5471] Add geography support to ST_AsGML with prefix namespace + option. Update doc and unit tests. cf #460 + +2010-03-30 12:29 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5470] Remove old reference file + +2010-03-29 20:03 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5469] Fix syntax error. + +2010-03-29 20:02 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5468] Reorganize avprintf a litle. + +2010-03-29 19:57 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5467] Propogate vsnprintf errors up verbatim + +2010-03-28 08:33 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5466] Fix a lot of DocBook errors. Use DocBook + MathML DTD. + Fix xsl/postgis_aggs_mm.xml.xsl to produce valid Docbook. Now + make check output in docs is clean. cf #471 + +2010-03-27 17:50 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5465] add make check rule in doc/Makefile. Use xmllint to check + postgis.xml documentation against docbook dtd. + +2010-03-25 05:11 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5463] Make the default size more reasonable again. + +2010-03-25 05:09 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5462] Add comments on error return values. + +2010-03-25 05:06 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5461] Improved stringbuffer again. Always write directly into + the buffer, no more memcpy'ing. Change return values for printing + calls to int, so that print errors can be detected and handled by + the layers above, if desired. + +2010-03-24 17:54 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5460] Restore original license terms. + +2010-03-23 19:35 Sandro Santilli <strk@keybit.net> + + * [r5459] Expose custom prefix arg for ST_asGML to SQL, add tests + and dox + +2010-03-23 00:25 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5454] Fix for array aggregation error (#469) + +2010-03-22 21:13 Sandro Santilli <strk@keybit.net> + + * [r5452] Add support in liblwgeom for specifying a custom (or no) + namespace/prefix for GML output + +2010-03-22 19:38 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5450] Convert all extern opt* variables to pgis_opt* variables + to avoid clashes with system variables. (ug!) + +2010-03-17 08:27 Sandro Santilli <strk@keybit.net> -2011-06-13 12:26 robe + * [r5448] Add test for GEOMETRYCOLLECTION and ST_Split - * NEWS, doc/release_notes.xml: Update 1.5.3 release notes +2010-03-17 07:42 Sandro Santilli <strk@keybit.net> -2011-06-13 11:24 robe + * [r5447] Add ST_Split - * doc/using_postgis_app.xml: #609 corrected to use non-deprecate - JDBC calling syntax. +2010-03-17 07:40 Sandro Santilli <strk@keybit.net> -2011-06-10 17:21 robe + * [r5446] Don't choke on clean when there's nothing to clean - * doc/using_postgis_app.xml: #609 documentation correction on use - of JDBC +2010-03-17 07:32 Sandro Santilli <strk@keybit.net> -2011-06-10 16:55 robe + * [r5445] Fix 'clean' rule to descend in cunit - * postgis/postgis.sql.in.c: #666 mark ST_DumpPoints sql function as - STRICT so doesn't error out with null input. +2010-03-16 22:18 Sandro Santilli <strk@keybit.net> -2011-06-10 16:15 pramsey + * [r5444] Add support for MULTI* in ST_Split - * spatial_ref_sys.sql: Update NZ projections for grid - transformation support (#631) +2010-03-16 13:14 Sandro Santilli <strk@keybit.net> -2011-06-10 01:54 robe + * [r5440] Document ST_Split - * doc/reference_constructor.xml: more examples for ST_Point and - example converting to geography +2010-03-16 03:13 Paul Ramsey <pramsey@cleverelephant.ca> -2011-06-09 20:31 robe + * [r5439] Some function renaming: lwgeom_typename => lwtype_name. + The internal float/up/down functions get slightly better names. + Make collection types re-sizable: added maxgeoms to all + collections, and created lwcollection_add_lwgeom() function. + Remove all *_add functions. Revized homogenize function to use + the new _add_lwgeom and variants. - * doc/installation.xml: #448 add CUnit to optional items +2010-03-15 18:03 Sandro Santilli <strk@keybit.net> -2011-06-09 13:59 pramsey + * [r5438] Rename ST_SplitGeometry to ST_Split (better now than + never) - * postgis/lwgeom_geos.c: Add guard code to avoid Inf-caused loops - or crashes. (#987) +2010-03-15 18:00 Sandro Santilli <strk@keybit.net> -2011-06-07 13:07 robe + * [r5437] Implement split-poly-by-line - * doc/faq.xml: more clarification on choice between - geometry/geography +2010-03-13 12:55 Sandro Santilli <strk@keybit.net> -2011-05-25 18:42 pramsey + * [r5436] Reword exception message, make algorithm more robust not + relying on constructive functions to detect relation between + inputs - * postgis/geography_inout.c: #661 Type info of geography columns - incomplete - pg_dump output wrong +2010-03-13 11:23 Sandro Santilli <strk@keybit.net> -2011-05-19 02:32 pramsey + * [r5435] Fix printf call - * NEWS, postgis/lwgeom_accum.c: Support for PostgreSQL 9.1 (#940) +2010-03-13 11:16 Sandro Santilli <strk@keybit.net> -2011-05-13 01:01 chodgson + * [r5434] Split-line-by-line: handle overlap cases by raising an + exception - * postgis/lwgeom_rtree.c: additional bug fix for #844 +2010-03-13 10:59 Sandro Santilli <strk@keybit.net> -2011-05-12 21:46 chodgson + * [r5433] Implement split-line-by-line - * regress/tickets.sql, regress/tickets_expected: added regess test - for #884 +2010-03-13 09:22 Sandro Santilli <strk@keybit.net> -2011-05-12 18:39 chodgson + * [r5432] Be polite - * postgis/lwgeom_functions_analytic.c, - postgis/lwgeom_functions_analytic.h, postgis/lwgeom_geos.c, - postgis/lwgeom_rtree.c, postgis/lwgeom_rtree.h: Fixed incorret - logic in point_in_multipolygon_rtree, for #884. +2010-03-12 18:39 Sandro Santilli <strk@keybit.net> -2011-05-04 22:13 chodgson + * [r5430] Fix memory errors in presence of NULL (0-verticed) + geometries and insert (default) policy. - * postgis/lwgeom_functions_basic.c, regress/tickets.sql, - regress/tickets_expected: committed patch from ticket #912 which - also fixes #630 (duplicate) +2010-03-12 15:46 Sandro Santilli <strk@keybit.net> -2011-04-30 08:38 colivier + * [r5429] ptarray_substring *does* already implement interpolation - * postgis/lwgeom_in_gml.c, regress/in_gml.sql, - regress/in_gml_expected: ST_GeomFromGML: Fix #933 for 1.5 branch. - Remove a wrong srsName definition. Update related unit tests +2010-03-12 15:25 Sandro Santilli <strk@keybit.net> -2011-04-27 10:18 nicklas + * [r5428] Drop extraneous task (if it referred to loader we do have + a switch for index creation now) - * postgis/postgis.sql.in.c: fix for #918 +2010-03-12 15:15 Sandro Santilli <strk@keybit.net> -2011-04-17 16:35 robe + * [r5427] Fix ST_DumpPoints not to relay on NULL return from + ST_NumGeometries to tell multi and singles apart - * doc/xsl/postgis_gardentest.sql.xsl: variable for buffer - parameters +2010-03-12 15:14 Sandro Santilli <strk@keybit.net> -2011-02-24 15:38 strk + * [r5426] Trigger reconstruction of regress' postgis.sql when + original one changes - * NEWS, postgis/lwgeom_functions_analytic.c, regress/tickets.sql, - regress/tickets_expected: Back-port fix for #845. Fixes both - point_in_ring (regress-tested) and point_in_ring_rtree (deduced - as bogus having the exact same code pattern but not - regress-tested) +2010-03-12 14:03 Sandro Santilli <strk@keybit.net> -2011-02-06 00:36 robe + * [r5424] Add item about GeometryN/NumGeometries - * doc/reference_editor.xml: Same corrections to ST_SetSRID as made - for trunk +2010-03-12 13:50 Sandro Santilli <strk@keybit.net> -2011-01-28 12:13 robe + * [r5423] Add support for simple geometries in ST_GeometryN and + ST_NumGeometries - * doc/faq.xml: backport r6748 +2010-03-12 13:29 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> -2010-12-30 18:43 nicklas + * [r5422] Fix the PGXS override code for detecting older versions + of PostgreSQL - the existing (incomplete) check was still + checking for a minimum version of 8.5, rather + than the new version number of 9.0. - * regress/measures.sql, regress/measures_expected: rounding away - difference between platforms in measures regress test +2010-03-12 00:21 Regina Obe <lr@pcorp.us> -2010-12-30 14:11 robe + * [r5419] put in note about improvement to ST_Line_SubString #410 - * doc/xsl/postgis_gardentest.sql.xsl: a lot of functions - (particular geos ST_LineMerge etc) still crash with Polygon Empty - in PostGIS 2.0. Exclude Polygon Empty for now so can regress - test. +2010-03-11 20:50 Sandro Santilli <strk@keybit.net> + + * [r5416] More comments cleanup + +2010-03-11 20:48 Sandro Santilli <strk@keybit.net> -2010-12-29 22:21 robe + * [r5415] remove wrong comment - * doc/xsl/postgis_gardentest.sql.xsl: postgis 2.0 can't handled - nested empty geometry collections with all functions yet -- so - exclude +2010-03-11 20:34 Sandro Santilli <strk@keybit.net> -2010-12-26 19:13 robe + * [r5414] Set interface specs in stone within the implementation + file, add a testcase to show what's "left" and what's "right" in + the split-line-by-point - * doc/using_postgis_dataman.xml: tag typo +2010-03-11 20:28 Sandro Santilli <strk@keybit.net> -2010-12-21 22:19 robe + * [r5413] *always* return a collection from ST_SplitGeometry - * doc/reference_measure.xml, doc/using_postgis_dataman.xml: point - relation functions to DE-9IM section of docs for more info +2010-03-11 20:19 Sandro Santilli <strk@keybit.net> -2010-12-20 12:02 robe + * [r5412] Have ST_SplitGeometry return a collection of at most 2 + elements (original part, cut-away part) so it's easier to handle + by callers - * doc/xsl/postgis_gardentest.sql.xsl: fix spatial_class update +2010-03-11 17:53 Sandro Santilli <strk@keybit.net> -2010-12-18 21:50 robe + * [r5411] Add SRID retainment testcase for removerepeatedpoint + (paranoia) - * doc/using_postgis_dataman.xml, - doc/xsl/postgis_gardentest.sql.xsl: fix spatial_class update - statement. Give Geometry Columns section pretty anchor, fix typo +2010-03-11 17:51 Sandro Santilli <strk@keybit.net> -2010-12-14 13:17 robe + * [r5410] Add SRID retainment testcases - * regress/loader/Arc-wkb.expected, regress/loader/Arc-wkt.expected, - regress/loader/ArcM-wkb.expected, - regress/loader/ArcM-wkt.expected, - regress/loader/ArcZ-wkb.expected, - regress/loader/ArcZ-wkt.expected, - regress/loader/MultiPoint-wkb.expected, - regress/loader/MultiPoint-wkt.expected, - regress/loader/MultiPointM-wkb.expected, - regress/loader/MultiPointM-wkt.expected, - regress/loader/MultiPointZ-wkb.expected, - regress/loader/MultiPointZ-wkt.expected, - regress/loader/Point-wkb.expected, - regress/loader/Point-wkt.expected, - regress/loader/PointM-wkb.expected, - regress/loader/PointM-wkt.expected, - regress/loader/PointZ-wkb.expected, - regress/loader/PointZ-wkt.expected, - regress/loader/Polygon-wkb.expected, - regress/loader/Polygon-wkt.expected, - regress/loader/PolygonM-wkb.expected, - regress/loader/PolygonM-wkt.expected, - regress/loader/PolygonZ-wkb.expected, - regress/loader/PolygonZ-wkt.expected: ditto +2010-03-11 17:21 Sandro Santilli <strk@keybit.net> -2010-12-14 13:14 robe + * [r5409] Don't 'clean' the SRID... - * regress/affine_expected, regress/ctors_expected, - regress/dumppoints_expected, regress/geojson_expected, - regress/gml_expected, regress/hausdorff_expected, - regress/in_gml_expected, regress/in_kml_expected, - regress/kml_expected, regress/long_xact_expected, - regress/lwgeom_regress_expected, regress/measures_expected, - regress/regress_bdpoly_expected, - regress/regress_buffer_params_expected, regress/regress_expected, - regress/regress_index_expected, - regress/regress_index_nulls_expected, - regress/regress_lrs_expected, regress/regress_ogc_cover_expected, - regress/regress_ogc_expected, regress/regress_ogc_prep_expected, - regress/regress_proj_expected, regress/removepoint_expected, - regress/setpoint_expected, regress/simplify_expected, - regress/snaptogrid_expected, - regress/sql-mm-circularstring_expected, - regress/sql-mm-compoundcurve_expected, - regress/sql-mm-curvepoly_expected, - regress/sql-mm-general_expected, - regress/sql-mm-multicurve_expected, - regress/sql-mm-multisurface_expected, - regress/sql-mm-serialize_expected, regress/svg_expected, - regress/tickets_expected, regress/wkt_expected, - regress/wmsservers_expected: switch to end-of-line LF so regress - tests will work under mingw with dos2unix voodoo. Postgres by - default outputs with LF even on windows VC build. +2010-03-11 14:34 Paul Ramsey <pramsey@cleverelephant.ca> -2010-12-14 06:02 pramsey + * [r5401] Grammar fix. - * postgis/geography_inout.c: Oops, don't overwrite end of buffer. +2010-03-10 15:38 Paul Ramsey <pramsey@cleverelephant.ca> -2010-12-14 05:53 pramsey + * [r5398] Fix to allow compile on 9.0alpha - * postgis/geography_inout.c: Memory leak in geography_from_text - (#624) +2010-03-10 15:33 Sandro Santilli <strk@keybit.net> -2010-12-14 04:57 pramsey + * [r5396] Initial work on ST_SplitGeometry. Split line by point + implemented. - * loader/shp2pgsql-cli.c: Update usage slightly (#604) +2010-03-10 15:29 Sandro Santilli <strk@keybit.net> -2010-12-14 01:04 mleslie + * [r5395] Since we do a full scan of pointarray from + ptarray_locate_point, take the chance to also return min distance - * liblwgeom/lwcircstring.c, regress/sql-mm-circularstring.sql, - regress/sql-mm-circularstring_expected: Fix for ticket #668 - - Adding bbox generating code to the short-cut case of a - straight-line curve. +2010-03-10 14:32 Sandro Santilli <strk@keybit.net> -2010-12-13 21:30 pramsey + * [r5394] Document closest_point_on_segment in header file - * postgis/lwgeom_functions_basic.c, regress/tickets.sql, - regress/tickets_expected: ST_CollectionExtract returns - non-requested type (#457) +2010-03-10 14:20 Sandro Santilli <strk@keybit.net> -2010-12-13 20:42 pramsey + * [r5393] Document ptarray_locate_point in header file - * loader/shp2pgsql-core.c: Return value of snprintf not correctly - checked (#556) +2010-03-10 10:07 Sandro Santilli <strk@keybit.net> -2010-12-08 13:12 robe + * [r5392] Export geos error logger - * doc/reference_output.xml: change name of geojson version argument - so tests can input the right number and not generate false alarms +2010-03-09 00:37 Paul Ramsey <pramsey@cleverelephant.ca> -2010-12-08 02:38 robe + * [r5389] Fix syntax error in spatial_ref_sys hard upgrade + directions (#373) - * doc/xsl/postgis_gardentest.sql.xsl: backport logging feature from - 2.0 in preparation for intensive regression testing +2010-03-09 00:31 Paul Ramsey <pramsey@cleverelephant.ca> -2010-12-02 16:03 robe + * [r5387] Include 'geography_columns' defn when upgrading from <= + 1.4 (#414) - * doc/reference_operator.xml: ditto +2010-03-09 00:22 Paul Ramsey <pramsey@cleverelephant.ca> -2010-11-12 15:46 robe + * [r5386] Quiet notices in the .sql install files (#415) - * doc/faq.xml: Update 9.0 FAQ to include npgsql fixed driver for - bytea support +2010-03-08 23:28 Paul Ramsey <pramsey@cleverelephant.ca> -2010-11-02 14:22 robe + * [r5384] Update the bbox when you alter the underlying geometry + (#410) ST_SetPoint, ST_Ad + dPoint, ST_RemovePoint. + +2010-03-08 16:37 Kevin Neufeld <kneufeld.ca@gmail.com> + + * [r5380] updated broken link to utmzone PostGIS plpgsql helper + function. + bug #461 - * doc/reference_processing.xml: relevant links to ST_Difference and - ST_SymDifference -- people think intersection when looking for - these +2010-03-05 23:31 Paul Ramsey <pramsey@cleverelephant.ca> -2010-10-13 14:34 robe + * [r5377] Note minimum required versions. - * doc/reference_processing.xml: correct spelling of Peucker +2010-03-05 21:49 Sandro Santilli <strk@keybit.net> -2010-10-03 01:40 robe + * [r5376] Fix typo - * doc/faq.xml: typo +2010-03-05 02:35 Paul Ramsey <pramsey@cleverelephant.ca> -2010-10-02 15:47 robe + * [r5375] A few more WKB unit tests. - * doc/faq.xml: update FAQ about what to do when can't render - PostgreSQL 9.0 postgis geometries +2010-03-04 09:40 Olivier Courtin <olivier.courtin@camptocamp.com> -2010-09-29 20:43 nicklas + * [r5374] Add ST_PointN xref in ST_SetPoint entry, from Bruno + Friedmann report - * liblwgeom/measures.c: removing run-time sized array +2010-03-03 06:10 Paul Ramsey <pramsey@cleverelephant.ca> -2010-09-27 15:21 pramsey + * [r5372] Set keywords. - * NEWS, Version.config: Bump branch versions up +2010-03-03 06:10 Paul Ramsey <pramsey@cleverelephant.ca> -2010-09-27 15:16 pramsey + * [r5371] Set keywords and some copyright headers. - * NEWS, README.postgis: Set the release date +2010-03-03 06:06 Paul Ramsey <pramsey@cleverelephant.ca> -2010-09-27 13:24 robe + * [r5370] Add some tests of the old versus new WKB output. - * doc/installation.xml, doc/release_notes.xml: put in libxml, gtk - missing dependencies for compile, update links, put in release - date assume WE WILL RELEASE TODAY. +2010-03-03 06:06 Paul Ramsey <pramsey@cleverelephant.ca> -2010-09-25 18:05 pramsey + * [r5369] Move spheroid test to the correct place. - * NEWS: Accents corrected (in latin1, hm) +2010-03-03 05:40 Paul Ramsey <pramsey@cleverelephant.ca> -2010-09-24 18:35 pramsey + * [r5368] Remove doxygen flags from static functions. - * regress/tickets.sql, regress/tickets_expected, - regress/wmsservers.sql, regress/wmsservers_expected: Fix - regressions that appeared in 9.0 by removing the CREATE table AS - SELECT form from tests and replacing with CREATE-then-INSERT - method +2010-03-03 05:38 Paul Ramsey <pramsey@cleverelephant.ca> -2010-09-22 12:57 robe + * [r5367] Add some documentation to the public functions. - * doc/installation.xml, doc/postgis.xml: amend documents to reflect - postgis_comments.sql don't get installed unless if make of - postgis comments is done. +2010-03-03 01:15 Paul Ramsey <pramsey@cleverelephant.ca> -2010-09-19 17:41 robe + * [r5366] Add in tests and fixes for WKB emitter. - * NEWS, doc/release_notes.xml: one more fix from Mark C. Hopefully - we will have a release before he makes any more changes :) +2010-03-02 23:18 Paul Ramsey <pramsey@cleverelephant.ca> -2010-09-19 16:54 mcayland + * [r5365] Add first cut to lwgeom_to_wkb function. - * loader/shp2pgsql-core.c: Fix #603: shp2pgsql: "-w" produces - invalid WKT for MULTI* objects. +2010-03-02 23:16 Paul Ramsey <pramsey@cleverelephant.ca> -2010-09-19 12:46 robe + * [r5364] Add a couple functions (length, copy) to stringbuffer, + and add comments. - * NEWS, doc/release_notes.xml: More additions per Mark C. +2010-03-02 21:32 Sandro Santilli <strk@keybit.net> -2010-09-19 12:21 mcayland + * [r5363] ST_MakeValid : turn collapsed lines into points + [RT-SIGTA] - * doc/Makefile.in: Fix the comments-uninstall target so it now - works correctly with the new PGXS code. +2010-02-28 23:11 Sandro Santilli <strk@keybit.net> -2010-09-19 11:27 mcayland + * [r5360] Node lineal geometries resulting invalid. Re-enable + automated testcase for st_MakeValid [RT-SIGTA] - * loader/shp2pgsql-core.c, loader/shp2pgsql-core.h, - loader/shp2pgsql-gui.c: Fix #572: Password whitespace for Shape - File to PostGIS Importer not supported. Fixed by adding a new - function especially designed for escaping arguments for - PQconnectdb strings, and plugging it into the GUI. +2010-02-28 22:48 Sandro Santilli <strk@keybit.net> -2010-09-18 23:51 robe + * [r5359] Don't use a collection when there's no area - * NEWS, doc/release_notes.xml: Add some missing closed items while - patiently waiting for Mark and Kevin to give their blessings :) +2010-02-28 22:24 Sandro Santilli <strk@keybit.net> -2010-09-18 19:38 pramsey + * [r5358] Fix build with debugging on, fix bug when run against + invalid linestrings - * doc/release_notes.xml: Prep for 1.5.2 +2010-02-28 21:31 Sandro Santilli <strk@keybit.net> -2010-09-18 19:34 pramsey + * [r5357] Add paranoid check to make super-sure no input vertices + are dropped by ST_MakeValid [RT-SIGTA] - * NEWS: Update for 1.5.2 +2010-02-28 20:36 Sandro Santilli <strk@keybit.net> -2010-09-18 19:22 pramsey + * [r5356] Put GEOS-only functionality of ST_MakeValid in its own + function - * ChangeLog: Update changelog for 1.5.2 +2010-02-28 19:24 Sandro Santilli <strk@keybit.net> -2010-09-18 18:51 pramsey + * [r5355] Fix documentation to match current behaviour - * loader/shp2pgsql-gui.c: Add DBF *.dbf filter to file chooser.. - (#513) +2010-02-28 19:09 Sandro Santilli <strk@keybit.net> -2010-09-18 18:01 pramsey + * [r5354] Simplify code - * postgis/geography.sql.in.c: Actually commit the change into 1.5 - branch (#532) +2010-02-28 19:04 Sandro Santilli <strk@keybit.net> -2010-09-18 15:13 mcayland + * [r5353] Avoid a call to the GEOS CAPI when unnecessary (works + around a bug in GEOS aborting in some cases of EMPTY polygons - * loader/shp2pgsql-gui.c: Fix #527: Log window in shp2pgsql-gui - should always append text to bottom of window. +2010-02-28 17:20 Sandro Santilli <strk@keybit.net> -2010-09-10 20:44 pramsey + * [r5352] Move ST_CleanGeometry core code into specialized 'lwgeom' + function - * loader/Makefile.in, loader/dbfopen.c, loader/safileio.c, - loader/shapefil.h, loader/shpopen.c: Fix for #554, align internal - shapelib with official shapelib +2010-02-28 17:11 Sandro Santilli <strk@keybit.net> -2010-09-10 15:23 pramsey + * [r5351] cleanups - * loader/shp2pgsql-gui.c: Fix #513, Can't upload dbf only with gui - (without unchecking index?) +2010-02-28 14:05 Sandro Santilli <strk@keybit.net> -2010-09-10 15:11 pramsey + * [r5350] Put areal part first in collection, and collapsed edges + second - * postgis/geography.sql.in.c: Fix for #532, Temporary table - geography columns appear in other's sessions +2010-02-26 15:05 Olivier Courtin <olivier.courtin@camptocamp.com> -2010-09-10 13:01 mcayland + * [r5349] Add new 'make garden' rule to launch full Garden test + regression tests - * configure.ac, doc/Makefile.comments.in, doc/Makefile.in: Fix - #458: postgis_comments being installed in contrib instead of - version folder (this is a little bit of a hack since we can't - merge PGXS into the main Makefile directly, but it works). +2010-02-26 02:50 Paul Ramsey <pramsey@cleverelephant.ca> -2010-09-10 08:50 mcayland + * [r5348] Instructions on adding new tests to cunit, from Jeff + Adams. - * liblwgeom/ptarray.c: Fix #581: LWGEOM_expand produces - inconsistent results. Change the bounding box calculation - routines in ptarray.c so that they perform th - e entire calculation in double precision then convert the final - result to BOX2DFLOAT4. This prevents rounding errors being - introduced in - to the bounding box when each input result is converted to - BOX2DFLOAT4 in turn. +2010-02-26 00:16 Olivier Courtin <olivier.courtin@camptocamp.com> -2010-09-01 08:20 strk + * [r5347] Add few more lwgeom_typename, and update regress test if + needed. Restore initial lwnotice behaviour in + remove_repeated_points on unknown types (instead of lwerror). - * NEWS: Restrict lines within 80 columns +2010-02-25 17:54 Olivier Courtin <olivier.courtin@camptocamp.com> -2010-09-01 05:57 robe + * [r5346] Fix add forgotten return in flip_coordinates (cf #452). + Add lwgeom_typename in several functions to avoid cryptic error + message (#452 again). - * doc/introduction.xml: update credits +2010-02-25 15:13 Paul Ramsey <pramsey@cleverelephant.ca> -2010-09-01 05:52 robe + * [r5345] Fix potential corner case in sphere area calculation + (#451) - * doc/release_notes.xml: update release notes to include 1.5.2 - changes (not yet released) +2010-02-25 14:30 Regina Obe <lr@pcorp.us> -2010-09-01 05:42 robe + * [r5343] Put new functions in alphabetical order. - * doc/release_notes.xml: forgot ST_DumpPoints in release and credit - to Maxime +2010-02-25 14:23 Regina Obe <lr@pcorp.us> -2010-09-01 05:37 robe + * [r5342] Put in What is new in 2.0 section to trap new 2.0 + enhancements - * NEWS: update NEWS to reflect all non-trivial changes in PostGIS - 1.5.2 +2010-02-25 14:11 Olivier Courtin <olivier.courtin@camptocamp.com> -2010-08-31 18:00 nicklas + * [r5341] Add libxml2 requirement para. Fix #344. Thanks to Mateus + for report. - * postgis/postgis.sql.in.c: remove strict on st_equals as discussed - in #536 +2010-02-25 13:41 Paul Ramsey <pramsey@cleverelephant.ca> -2010-08-19 19:48 pramsey + * [r5339] Fix for st_area(geography) over the dateline (#450) - * liblwgeom/lwgeodetic.c: Slight improvement to #573 +2010-02-25 13:38 Olivier Courtin <olivier.courtin@camptocamp.com> -2010-08-17 20:11 pramsey + * [r5338] rename ptarray_reverse_axis to ptarray_flip_coordinates. + Add lwgeom_flip_coordinates and ST_FlipCoordinates (#354). Add + relevant cunit tests and basic documentation. - * liblwgeom/lwgeodetic.c: Return the return value (not a constant) +2010-02-25 13:30 Sandro Santilli <strk@keybit.net> -2010-08-17 16:18 pramsey + * [r5337] Drop unused code, avoid putting empty geometry in a + collection.. [RT-SIGTA] - * spatial_ref_sys.sql: Add datum conversion for projection +2010-02-25 13:15 Sandro Santilli <strk@keybit.net> -2010-08-11 09:49 mleslie + * [r5336] Recursively try to build area with portions of the + original boundary not on the boundary of newly constructed area + and symdifference the new area (if any) with the final polygon + being built. This behaviour gives more chance to get a pure areal + (not mixed) output still not missing vertices. - * configure.ac, loader/Makefile.in, loader/cunit, loader/image, - loader/shp2pgsql-gui.c, loader/structure.c, loader/structure.h: - Backing out the shp2pgsql-gui changes. +2010-02-24 14:40 Paul Ramsey <pramsey@cleverelephant.ca> -2010-08-10 23:54 pramsey + * [r5335] Change dimensionality indicators to have spaces between + type indicators for WKT_ISO output form. - * loader/shp2pgsql-gui.c: Fix start-up segfaults for shp2pgsql-gui - in OS/X (#563) +2010-02-24 13:50 Paul Ramsey <pramsey@cleverelephant.ca> -2010-08-10 19:35 pramsey + * [r5334] Add support from SRID= block on EWKT - * liblwgeom/cunit/cu_geodetic.c, - liblwgeom/cunit/cu_geodetic_data.h, liblwgeom/lwgeodetic.c: Fix - for #562, fix an error in the pole checking routines to allow - multiple poles to be found as contained in a polygon. The pole - checking code is certainly over-aggressive, but that is "OK"ish - for now. +2010-02-23 22:18 Paul Ramsey <pramsey@cleverelephant.ca> -2010-08-06 19:02 pramsey + * [r5333] Remove last compile warnings. - * loader/dbfopen.c, loader/shapefil.h: Apply temporary patch for - large DBF files. (#393) +2010-02-23 22:16 Paul Ramsey <pramsey@cleverelephant.ca> -2010-08-06 19:01 pramsey + * [r5332] Making test methods static to avoid compiler warnings. + For Jeff Adams. - * loader/shp2pgsql-core.c: Whoops, not actually avoiding bad - characters, have to do that... +2010-02-23 22:14 Paul Ramsey <pramsey@cleverelephant.ca> -2010-08-06 18:26 pramsey + * [r5331] Making test methods static to avoid compiler warnings. - * loader/shp2pgsql-core.c: For 2010 benchmarking, allow loader to - swallow invalid utf8 characters (compile-time switch only at this - point). +2010-02-23 22:11 Paul Ramsey <pramsey@cleverelephant.ca> -2010-08-03 14:21 robe + * [r5330] Make test functions static. - * doc/faq.xml, doc/reference_measure.xml: correction about - st_distance_spheroid and faq about 9.0 new bytea output behavior +2010-02-23 22:07 Paul Ramsey <pramsey@cleverelephant.ca> -2010-07-19 05:11 mleslie + * [r5329] Made unit tests easier to add. New suites now just need + to be added to two lines in cu_tester.c, no changes to header + files necessary, new tests need one line in the appropriate .c + file. From Jeff Adams. - * loader/shp2pgsql-gui.c: Adding a default to the validation case - statement to ensure we are initialising our parameters. +2010-02-23 21:41 Paul Ramsey <pramsey@cleverelephant.ca> -2010-07-19 05:07 mleslie + * [r5327] Remove unused va_copy. - * loader/shp2pgsql-gui.c, loader/structure.c: Fixed a couple of - memory issues. +2010-02-23 21:41 Paul Ramsey <pramsey@cleverelephant.ca> -2010-07-19 00:44 mleslie + * [r5326] Woops again, got work and start size values reversed. - * configure.ac, loader/Makefile.in, loader/cunit, - loader/cunit/Makefile.in, loader/cunit/cu_list.c, - loader/cunit/cu_list.h, loader/cunit/cu_tester.c, - loader/cunit/cu_tester.h, loader/image, loader/image/error.png, - loader/image/good.png, loader/image/icon_source.svg, - loader/image/warn.png, loader/shp2pgsql-gui.c, - loader/structure.c, loader/structure.h: Migrating the - shp2pgsql-gui and related changes from spike to the 1.5 branch. +2010-02-23 21:30 Paul Ramsey <pramsey@cleverelephant.ca> -2010-07-02 01:43 pramsey + * [r5325] Oops, commit stringbuffer.h with sensible values for + internal sizes. - * postgis/geography_inout.c: Fix error messages to handle - SRID_DEFAULT macro properly +2010-02-23 21:29 Paul Ramsey <pramsey@cleverelephant.ca> -2010-06-25 07:48 robe + * [r5324] Improve performance and cut back stringbuffer_t to the + minimum. - * postgis/geography.sql.in.c: #536 missed a spot text,text variant - of ST_DWithin +2010-02-23 19:51 Paul Ramsey <pramsey@cleverelephant.ca> -2010-06-25 07:43 robe + * [r5323] Allow cu_tester to accept parameters to run individual + tests or suites, from Jeff Adams. - * postgis/geography.sql.in.c: #536 get rid of strict on - ST_Intersects, ST_CoveredBy and ST_Covers because spatial index - doesn't work with strict on +2010-02-23 19:42 Sandro Santilli <strk@keybit.net> -2010-06-03 19:08 pramsey + * [r5322] Don't let ST_RemoveRepeatedPoint collapse LINESTRINGs + (not sure why, but someone doesn't want them in the db) - * loader/shp2pgsql-core.c: Remove crash case in early shutdown due - to missing shapefile +2010-02-23 18:29 Olivier Courtin <olivier.courtin@camptocamp.com> -2010-06-01 20:00 pramsey + * [r5319] Move ptarray reverse axis function from + postgis/lwgeom_in_gml to liblwgeom/ptarray - * loader/dbfopen.c: Accept "0" as a null DBF date value. +2010-02-23 18:18 Paul Ramsey <pramsey@cleverelephant.ca> -2010-05-27 14:04 pramsey + * [r5318] More WKT tests. - * configure.ac, loader/shp2pgsql-core.c: Make use of iconvctl - conditional on it existing +2010-02-23 17:55 Paul Ramsey <pramsey@cleverelephant.ca> -2010-05-27 13:19 pramsey + * [r5317] More WKT unit tests - * loader/shp2pgsql-core.c, loader/shp2pgsql-core.h: Fix utf8 to - return *something* when it can, so that something can be reported - inthe error string. +2010-02-23 15:55 Olivier Courtin <olivier.courtin@camptocamp.com> -2010-05-26 17:27 pramsey + * [r5316] In fact Nested GeometryCollection are never been + supported in SVG and GeoJSON. Update the cunit tests cases - * loader/shp2pgsql-core.c, loader/shp2pgsql-core.h: Change default - back to UTF8 and improve error message on failure. +2010-02-23 15:21 Olivier Courtin <olivier.courtin@camptocamp.com> -2010-05-26 16:25 pramsey + * [r5315] Check astyle version prior to do anything. 'blessed' + version is 1.23. Related to #433 and postgis-devel discussions - * loader/shp2pgsql-gui.c: Read configuration info from environment, - if it's there. +2010-02-23 14:52 Olivier Courtin <olivier.courtin@camptocamp.com> -2010-05-26 16:02 pramsey + * [r5314] Fix 443. Move all regress export functions test files in + a single one. add geography output regression tests + (SVG/KML/GML/GeoJSON) - * loader/shp2pgsql-gui.c: Only update the progress bar once every N - records, where N is determined by the - number of records in the file. +2010-02-22 22:43 Paul Ramsey <pramsey@cleverelephant.ca> -2010-05-25 18:43 pramsey + * [r5312] Add more unit tests for WKT - * loader/shp2pgsql-core.h: Back off from win32 encoding to generic - ISO 8859-1 +2010-02-22 22:04 Olivier Courtin <olivier.courtin@camptocamp.com> -2010-05-20 04:19 robe + * [r5311] Fix #441. And introduce a change in behaviour: if + geometryCollection and bbox, not sub geoms bbox are provided + anymore - * doc/reference_measure.xml: minor formatting on ST_Covers +2010-02-22 20:58 Sandro Santilli <strk@keybit.net> -2010-05-19 15:24 robe + * [r5307] Let ST_CleanGeometry down to C [RT-SIGTA] - * doc/reference_constructor.xml: link to ST_MakePointM from - ST_MakePoint +2010-02-22 20:45 Sandro Santilli <strk@keybit.net> -2010-05-19 15:12 robe + * [r5306] Derive an lwgeom_make_valid from ST_MakeValid [RT-SIGTA] - * doc/reference_measure.xml: Put in a geography example for - st_covers +2010-02-22 20:42 Paul Ramsey <pramsey@cleverelephant.ca> -2010-05-18 17:41 pramsey + * [r5305] ST_AsLatLonText(geometry, format) from Jeff Adams - * postgis/geography_estimate.c: Remove crash for case when all - geographies are on the outer edges of the histobox, causing all - to be classified as "deviants" by the stdev code line (#474) +2010-02-22 20:29 Sandro Santilli <strk@keybit.net> -2010-05-17 23:20 pramsey + * [r5304] Follow style guidelines for function naming - * loader/shp2pgsql-core.c, loader/shp2pgsql-core.h, - loader/shp2pgsql-gui.c, loader/stringbuffer.c: Allow connection - strings with missing parameters. Fixes a problem when 'password=' - is sent through. +2010-02-22 19:53 Paul Ramsey <pramsey@cleverelephant.ca> -2010-05-04 17:19 robe + * [r5302] First cut of new WKT output functions, need more unit + tests. - * doc/reference_constructor.xml: Provide example of ST_GeogFromText +2010-02-22 19:52 Olivier Courtin <olivier.courtin@camptocamp.com> -2010-04-27 13:59 colivier + * [r5301] Fix missing math.h include in lwout_svg (#438). Put back + lwgeom_export.h as we need header for getSRSbySRID. - * doc/reference_output.xml, postgis/lwgeom_export.c, - regress/geojson_expected, regress/gml_expected: Fix wrong OGC URN - in GeoJson and GML output. Cf #507 +2010-02-22 19:37 Sandro Santilli <strk@keybit.net> -2010-04-23 14:56 pramsey + * [r5299] Oops (#434) - * loader/shp2pgsql-gui.c: Declare menu_item_quit for MacOSX cmd-Q - shortcut code. +2010-02-22 19:35 Sandro Santilli <strk@keybit.net> -2010-04-06 23:36 pramsey + * [r5298] Fix warnings when building with GEOS < 3.3.0 (ticket #434 - * configure.ac, loader/Makefile.in, loader/shp2pgsql-gui.c, - macros/gtk-2.0.m4: Add support for command-q shutdown in Mac GTK - build +2010-02-22 19:31 Sandro Santilli <strk@keybit.net> -2010-03-23 00:23 pramsey + * [r5297] Fix missing prototypes warnings - * postgis/lwgeom_accum.c: Fix for array aggregation error (#469) +2010-02-22 19:31 Olivier Courtin <olivier.courtin@camptocamp.com> -2010-03-22 19:38 pramsey + * [r5296] Id tag - * loader/getopt.c, loader/getopt.h, loader/pgsql2shp.c, - loader/shp2pgsql-cli.c, loader/shp2pgsql-gui.c: Convert all - extern opt* variables to pgis_opt* variables to avoid clashes - with system variables. +2010-02-22 19:16 Olivier Courtin <olivier.courtin@camptocamp.com> -2010-03-12 18:55 strk + * [r5294] merge all export functions in a same file. remove useless + old ones. rename SVG one to LWGEOM_asSVG for consistancy. - * NEWS, loader/shp2pgsql-core.c: Back-port shp2pgsql fix in NULL - geometries handling +2010-02-22 18:49 Olivier Courtin <olivier.courtin@camptocamp.com> -2010-03-12 13:26 mcayland + * [r5291] Fix comment stuff in cunit - * configure.ac: Fix the PGXS override code for detecting older - versions of PostgreSQL - the existing (incomplete) check was - still checking for a minimum version of 8.5, rather - than the new version number of 9.0. +2010-02-22 18:43 Olivier Courtin <olivier.courtin@camptocamp.com> -2010-03-12 00:22 robe + * [r5289] move ST_AsSVG from postgis to lwgeom dir. write cun it + tests. related to #377 - * doc/reference_lrs.xml: note about ST_Line_SubString supporting - multilinestrings +2010-02-22 15:37 Olivier Courtin <olivier.courtin@camptocamp.com> -2010-03-11 15:04 pramsey + * [r5285] bbox only bother about external ring. add the related + cunit test - * NEWS, Version.config: Update version numbers and news file for - further development +2010-02-22 15:30 Paul Ramsey <pramsey@cleverelephant.ca> -2010-03-11 14:34 pramsey + * [r5284] Move stringbuffer from ./loader to ./liblwgeom for use in + string emitter functions. - * ChangeLog, HOWTO_RELEASE, README.postgis, doc/release_notes.xml: - 1.5.1 release prep +2010-02-22 14:03 Olivier Courtin <olivier.courtin@camptocamp.com> -2010-03-11 14:19 pramsey + * [r5283] Move ST_AsGeoJson from postgis to liblwgeom dir. Use as + most as cunit test as possible. Related to #377. - * NEWS: Update for 1.5.1 release. +2010-02-21 22:34 Sandro Santilli <strk@keybit.net> -2010-03-10 15:38 pramsey + * [r5282] Cleanup the GeometryClean function now that vertex + checking is done better in ST_MakeValid - * postgis/lwgeom_accum.c: Fix to allow compile on 9.0alpha +2010-02-21 22:10 Sandro Santilli <strk@keybit.net> -2010-03-09 00:37 pramsey + * [r5281] Force multi-type in output if input was multi [RT-SIGTA] - * doc/installation.xml: Fix syntax error in spatial_ref_sys hard - upgrade directions (#373) +2010-02-21 21:53 Olivier Courtin <olivier.courtin@camptocamp.com> -2010-03-09 00:31 pramsey + * [r5280] Add missing MultiPoint test. Fix wrong LWGEOM type on + cu_gml tests. - * utils/postgis_proc_upgrade.pl: Include 'geography_columns' defn - when upgrading from <= 1.4 (#414) +2010-02-21 21:34 Olivier Courtin <olivier.courtin@camptocamp.com> -2010-03-09 00:22 pramsey + * [r5279] add explicit void return type - * postgis/postgis.sql.in.c: Quiet notices in the .sql install files - (#415) +2010-02-21 21:11 Sandro Santilli <strk@keybit.net> -2010-03-08 23:28 pramsey + * [r5278] Disable 'clean' test (still deciding on what's the + expected output); keep only cut-lines that have vertices not + shared with boundary of final area; move 'clean' code in separate + file [RT-SIGTA]. - * liblwgeom/lwline.c: Update the bbox when you alter the underlying - geometry (#410) ST_SetPoint, ST_Ad - dPoint, ST_RemovePoint. +2010-02-21 20:32 Olivier Courtin <olivier.courtin@camptocamp.com> -2010-03-08 17:03 kneufeld + * [r5277] Move ST_AsKML from postgis to liblwgeom dir. Use as most + cunit test as possible. Few related corrections on GML similar + implementation. cf #377 - * doc/using_postgis_dataman.xml: updated broken link to utmzone - PostGIS plpgsql helper function. - bug #461 +2010-02-21 18:23 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5276] Add forgotten lwout_gml.c file (#377) + +2010-02-21 18:18 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5275] Move ST_AsGML from postgis dir to liblwgeom. Rewrite most + units test with cunit. cf #377 + +2010-02-21 12:36 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5274] make astyle session + +2010-02-21 12:22 Sandro Santilli <strk@keybit.net> + + * [r5273] ST_RemoveRepeatedPoints [RT-SIGTA] + +2010-02-21 12:21 Sandro Santilli <strk@keybit.net> + + * [r5272] style... + +2010-02-21 12:21 Sandro Santilli <strk@keybit.net> + + * [r5271] Make stylish + +2010-02-20 19:47 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5270] use the rights homogenize cunit suite handlers + +2010-02-20 19:09 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5269] Fix computed string length in Polygon with several rings + for ST_AsGML with GML3. Related to #421 + +2010-02-20 18:26 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5266] Use lwgeom_homogenize in in_kml stuff. Related to #375 + +2010-02-20 18:25 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5265] Add lwgeom_homogenize function. Related to #375. Add + cunit related tests + +2010-02-20 16:47 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5264] Add Cunit - lwerror use case handle - #420 + +2010-02-18 21:02 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5261] Add multilinestring support to st_line_substring (#419) + +2010-02-17 21:02 Sandro Santilli <strk@keybit.net> + + * [r5258] Allow retaining badly collapsed rings (single-point) as + points in ST_MakeValid. Add testcase for it [RT-SIGTA] + +2010-02-16 23:27 Kevin Neufeld <kneufeld.ca@gmail.com> + + * [r5257] removed sfs_compliant note for ST_Transform + +2010-02-16 09:38 Sandro Santilli <strk@keybit.net> + + * [r5256] Return NULL rather than throwing when a COLLECTION is + given to ST_Boundary [RT-SIGTA] + +2010-02-16 09:29 Sandro Santilli <strk@keybit.net> + + * [r5255] Fix build with --enable-debug=3 [RT-SIGTA] + +2010-02-16 09:08 Sandro Santilli <strk@keybit.net> + + * [r5254] Add origin field for the clean dataset table, so we can + add PG-specific ones w/out caring about visualizing them:) + +2010-02-16 09:06 Sandro Santilli <strk@keybit.net> + + * [r5253] Add a test for input being invalid (a test of the test) + +2010-02-16 09:03 Sandro Santilli <strk@keybit.net> + + * [r5252] Separate areal-specific cleanups in + LWGEOM_GEOS_makeValidPolygon [RT-SIGTA] + +2010-02-16 08:28 Sandro Santilli <strk@keybit.net> + + * [r5251] Empty geometries are cleanest [RT-SIGTA] + +2010-02-16 08:22 Sandro Santilli <strk@keybit.net> + + * [r5250] Drop the optional arg to ST_MakeClean, document what it + does, improve the ST_CleanGeometry stub. [RT-SIGTA] + +2010-02-16 08:07 Sandro Santilli <strk@keybit.net> + + * [r5249] Drop the optional parameter to ST_MakeValid, we always + want to collect collapses (users can always filter later) + [RT-SIGTA]. + +2010-02-16 08:03 Sandro Santilli <strk@keybit.net> + + * [r5248] Document ST_Dimension handling of empty geometries + +2010-02-16 07:54 Sandro Santilli <strk@keybit.net> + + * [r5247] Do not throw exception on empty ST_Dimension(empty) + [RT-SIGTA] + +2010-02-15 22:41 Sandro Santilli <strk@keybit.net> -2010-03-05 23:32 pramsey + * [r5246] Further cleanups in ST_MakeClean [RT-SIGTA] - * README.postgis: Add minimum version numbers for deps. +2010-02-15 22:31 Sandro Santilli <strk@keybit.net> -2010-03-04 09:40 colivier + * [r5245] Fix unsupported message - * doc/reference_editor.xml: Add ST_PointN xref in ST_SetPoint - entry, from Bruno Friedmann report +2010-02-15 21:17 Sandro Santilli <strk@keybit.net> -2010-02-25 15:13 pramsey + * [r5244] Plug more leaks - * liblwgeom/cunit/cu_geodetic.c, liblwgeom/lwgeodetic.c: Fix - potential corner case in sphere area calculation (#451) +2010-02-15 20:40 Sandro Santilli <strk@keybit.net> -2010-02-25 13:44 pramsey + * [r5243] Plug memory leak on GEOS geom construction failure + [RT-SIGTA] - * liblwgeom/cunit/cu_geodetic.c, liblwgeom/lwgeodetic.c, - liblwgeom/lwspheroid.c: Fix to st_area(geography) when used over - dateline (#450) +2010-02-15 20:21 Sandro Santilli <strk@keybit.net> -2010-02-23 14:50 colivier + * [r5242] Rework the regress test to make it easier for curious + people to keep the test dataset for inspection with some GUI + (give it a try, it's a nice one). - * postgis/geography_inout.c: Fix #443 +2010-02-14 23:35 Sandro Santilli <strk@keybit.net> -2010-02-22 22:03 colivier + * [r5241] Clarify the case of linestring invalidity dropping + confugins reference to linearrings - * postgis/lwgeom_geojson.c, regress/geojson_expected: Fix #441. And - introduce a change in behaviour: if geometryCollection and bbox, - not sub geoms bbox are provided anymore +2010-02-14 22:59 Sandro Santilli <strk@keybit.net> -2010-02-20 19:09 colivier + * [r5240] Implement ST_MakeValid(geom_in, collect_collapses) and + stub ST_CleanGeometry. Add regression test for ST_MakeValid and + polygons [RT-SIGTA] - * postgis/lwgeom_gml.c: Fix computed string length in Polygon with - several rings for ST_AsGML with GML3. Related to #421 +2010-02-14 16:54 Sandro Santilli <strk@keybit.net> -2010-02-18 21:01 pramsey + * [r5239] Cleanups. Hope to reuse some structs for a C-version of + ST_DumpPoints - * postgis/lwgeom_functions_analytic.c: Add multilinestring support - to st_line_substring (#419) +2010-02-14 16:33 Sandro Santilli <strk@keybit.net> -2010-02-08 22:37 strk + * [r5238] Try to make st_DumpPoints reference somewhat clearer + [RT-SIGTA] - * NEWS: tweak the sponsor name +2010-02-14 13:46 Sandro Santilli <strk@keybit.net> -2010-02-08 20:01 strk + * [r5237] ptarray_remove_repeated_points [RT-SIGTA] - * NEWS: Add bugfix item +2010-02-13 15:29 Sandro Santilli <strk@keybit.net> -2010-02-08 19:19 strk + * [r5236] Add another validity test [RT-SIGTA] - * postgis/lwgeom_inout.c, postgis/lwgeom_ogc.c, - regress/tickets_expected: Backport fix for #411 and #168 (can't - check invalidity reason with this version) +2010-02-13 14:35 Sandro Santilli <strk@keybit.net> -2010-02-06 10:49 colivier + * [r5235] Handle NULL returns from POSTGIS2GEOS and LWGEOM2GEOS now + that we allow that [RT-SIGTA]. + Add a 'commit' rule (give it a try) - * postgis/lwgeom_svg.c, regress/svg.sql, regress/svg_expected: Fix - non NULL terminated string in ST_AsSVG with GEOMETRYCOLLECTION - EMPTY, cf #409 reported by sdikiy. Add related unit test +2010-02-12 23:04 Sandro Santilli <strk@keybit.net> -2010-02-04 17:30 pramsey + * [r5234] Revert GEOS error handlers to be lwnotice to avoid + aborting full transactions (like it was in 1.5) - * NEWS, README.postgis, Version.config: Update version numbers on - 1.5 branch. +2010-02-11 23:12 Sandro Santilli <strk@keybit.net> -2010-02-04 17:28 pramsey + * [r5231] Fix typo - * .: Branch 1.5 stable +2010-02-11 21:01 Sandro Santilli <strk@keybit.net> -2010-02-04 17:21 pramsey + * [r5230] Get style - * Update release dates and changelog for 1.5.0 +2010-02-11 18:56 Sandro Santilli <strk@keybit.net> -2010-02-03 22:42 pramsey + * [r5229] Separate GEOS part of 'buildarea' function from POSTGIS + part of it (might eventually be moved down to GEOS) [RT-SIGTA] - * Initialize config->createindex value to 0 +2010-02-10 22:23 Sandro Santilli <strk@keybit.net> -2010-02-03 21:42 pramsey + * [r5228] xref - * Fix handling of "missing table argument" case to use file name - properly. +2010-02-10 20:54 Sandro Santilli <strk@keybit.net> -2010-02-02 23:47 pramsey + * [r5227] Enhance documentation of ptarray_addPoint [RT-SIGTA] - * Add --no-psqlrc to run_test (#405) +2010-02-09 22:36 Sandro Santilli <strk@keybit.net> -2010-02-02 22:44 pramsey + * [r5226] Don't refuse to output invalid geometries trough a + cursor, being consistent with other output routines (dumper ends + up using these) -- [RT-SIGTA] - * Tiny re-format +2010-02-09 17:59 Sandro Santilli <strk@keybit.net> -2010-02-02 17:44 pramsey + * [r5225] Oops, it seems I broke the build (sorry) - * Extra information per Greg Troxel +2010-02-09 06:52 Sandro Santilli <strk@keybit.net> -2010-02-02 16:13 pramsey + * [r5224] Fix documention - * Update usage string to show correct default encoding. +2010-02-08 22:36 Sandro Santilli <strk@keybit.net> -2010-02-02 04:14 pramsey + * [r5221] tweak the sponsor name - * astyle recent change +2010-02-08 21:39 Sandro Santilli <strk@keybit.net> -2010-02-02 02:41 pramsey + * [r5220] Initialie GEOS using lwerror for errors so that + exceptions are really handled (or testcases in #411 crash on many + GEOS functions) - * Fix segfault on cases where not enough arguments are provided. - (#402) +2010-02-08 20:05 Sandro Santilli <strk@keybit.net> -2010-02-02 00:15 pramsey + * [r5219] Add credits to new feature item - * Fix mis-handling of the commandline operations modes (#401) +2010-02-08 18:54 Sandro Santilli <strk@keybit.net> -2010-02-01 18:24 pramsey + * [r5214] Don't refuse to unparse malformed geometries. Fixes #411. + Didn't seem to expose the crash in #168, the testcase for it was + expanded to extract invalidity reason. - * Silence 'no-eol' compiler warning. +2010-02-06 13:57 Sandro Santilli <strk@keybit.net> -2010-02-01 17:35 pramsey + * [r5213] Simplify hooks on GEOS error reporter function from + isvalid* functions - * 1.5 astyle pass +2010-02-06 13:48 Sandro Santilli <strk@keybit.net> -2010-01-29 21:24 pramsey + * [r5212] Add another test for #407 - * Keep floats out of registers for spheroid calculation. Fixes odd - bug in OS/X gcc 4.1. Could probably be narrowed to only use flag - on affected platform. (#395) +2010-02-06 10:49 Olivier Courtin <olivier.courtin@camptocamp.com> -2010-01-29 18:22 robe + * [r5211] Fix non NULL terminated string in ST_AsSVG with + GEOMETRYCOLLECTION EMPTY, cf #409 reported by sdikiy. Add related + unit test - * fix example +2010-02-05 20:58 Sandro Santilli <strk@keybit.net> -2010-01-29 18:00 pramsey + * [r5208] Add ST_isValidDetail item - * Extra debugging information in spheroid area calculation. +2010-02-05 20:55 Sandro Santilli <strk@keybit.net> -2010-01-28 17:42 pramsey + * [r5207] Register a buffer-logger as error-reporter from + ST_isValidReason and ST_isValidDetail so to catch exceptions + thrown by GEOS at postgis->geos conversion for the sake of + reporting actual error. Fixes ticket #408. Completed with + testcase. - * Make area unit tests actually test against known good values +2010-02-05 17:58 Sandro Santilli <strk@keybit.net> -2010-01-28 15:51 colivier + * [r5206] A space after return type looks better (and seems to be + the policy) for funcdef tags - * revert r5175 commit about points results on #304. Related to #395 +2010-02-05 17:57 Sandro Santilli <strk@keybit.net> -2010-01-28 15:28 colivier + * [r5205] Document ST_IsValidDetail - * In regress/tickets* Add missing srid 32702 and 32602. Add results - from #304 tests. Related to #395 +2010-02-05 17:26 Sandro Santilli <strk@keybit.net> -2010-01-28 15:09 strk + * [r5204] Add ST_isValidDetail(geom) returns valid_detail (new + type!) - * Fix 'maintainer-clean' rule +2010-02-04 20:30 Sandro Santilli <strk@keybit.net> -2010-01-28 14:23 mcayland + * [r5203] Astyle run (a-ha, got you!) - * Fix astyle.sh script so that if astyle cannot be found then it - immediately aborts with an error. Per report from Nicklas. +2010-02-04 17:43 Paul Ramsey <pramsey@cleverelephant.ca> -2010-01-28 12:19 mcayland + * [r5202] Push version numbers on trunk forward to next release. - * Add "make astyle" target to clean up source tree formatting as - per the style guidelines. +2010-02-04 17:21 Paul Ramsey <pramsey@cleverelephant.ca> -2010-01-26 21:10 pramsey + * [r5197] Update release dates and changelog for 1.5.0 - * Make GEOS test insist on >= 3.1.1 +2010-02-03 22:42 Paul Ramsey <pramsey@cleverelephant.ca> -2010-01-26 20:20 pramsey + * [r5195] Initialize config->createindex value to 0 - * Remove warning from lwline +2010-02-03 21:42 Paul Ramsey <pramsey@cleverelephant.ca> -2010-01-26 19:08 pramsey + * [r5194] Fix handling of "missing table argument" case to use file + name properly. - * Add example for ST_AddMeasure on multilinestring +2010-02-02 23:47 Paul Ramsey <pramsey@cleverelephant.ca> -2010-01-26 18:56 pramsey + * [r5193] Add --no-psqlrc to run_test (#405) - * Make ST_AddMeasure handle multilinestrings as well as +2010-02-02 22:44 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5190] Tiny re-format + +2010-02-02 17:44 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5189] Extra information per Greg Troxel + +2010-02-02 16:13 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5188] Update usage string to show correct default encoding. + +2010-02-02 04:14 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5187] astyle recent change + +2010-02-02 02:41 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5186] Fix segfault on cases where not enough arguments are + provided. (#402) + +2010-02-02 00:15 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5185] Fix mis-handling of the commandline operations modes + (#401) + +2010-02-01 18:24 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5184] Silence 'no-eol' compiler warning. + +2010-02-01 17:35 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5181] 1.5 astyle pass + +2010-01-29 21:24 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5180] Keep floats out of registers for spheroid calculation. + Fixes odd bug in OS/X gcc 4.1. Could probably be narrowed to only + use flag on affected platform. (#395) + +2010-01-29 18:22 Regina Obe <lr@pcorp.us> + + * [r5179] fix example + +2010-01-29 18:00 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5178] Extra debugging information in spheroid area calculation. + +2010-01-28 17:42 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5177] Make area unit tests actually test against known good + values + +2010-01-28 15:51 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5176] revert r5175 commit about points results on #304. Related + to #395 + +2010-01-28 15:28 Olivier Courtin <olivier.courtin@camptocamp.com> + + * [r5175] In regress/tickets* Add missing srid 32702 and 32602. Add + results from #304 tests. Related to #395 + +2010-01-28 15:09 Sandro Santilli <strk@keybit.net> + + * [r5174] Fix 'maintainer-clean' rule + +2010-01-28 14:23 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r5173] Fix astyle.sh script so that if astyle cannot be found + then it immediately aborts with an error. Per report from + Nicklas. + +2010-01-28 12:19 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r5172] Add "make astyle" target to clean up source tree + formatting as per the style guidelines. + +2010-01-26 21:10 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5171] Make GEOS test insist on >= 3.1.1 + +2010-01-26 20:20 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5170] Remove warning from lwline + +2010-01-26 19:08 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5169] Add example for ST_AddMeasure on multilinestring + +2010-01-26 18:56 Paul Ramsey <pramsey@cleverelephant.ca> + + * [r5168] Make ST_AddMeasure handle multilinestrings as well as linestrings. -2010-01-26 17:24 pramsey +2010-01-26 17:24 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove unneeded See Also section. + * [r5167] Remove unneeded See Also section. -2010-01-26 17:09 pramsey +2010-01-26 17:09 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove ST_StartMeasure ST_EndMeasure + * [r5166] Remove ST_StartMeasure ST_EndMeasure -2010-01-26 01:13 pramsey +2010-01-26 01:13 Paul Ramsey <pramsey@cleverelephant.ca> - * Ignore postgis_comments.sql + * [r5165] Ignore postgis_comments.sql -2010-01-25 21:08 pramsey +2010-01-25 21:08 Paul Ramsey <pramsey@cleverelephant.ca> - * Replace soft tabs with hard. + * [r5164] Replace soft tabs with hard. -2010-01-25 21:06 pramsey +2010-01-25 21:06 Paul Ramsey <pramsey@cleverelephant.ca> - * Add uninstall recipe for AddMeasure (#390) + * [r5163] Add uninstall recipe for AddMeasure (#390) -2010-01-25 21:03 pramsey +2010-01-25 21:03 Paul Ramsey <pramsey@cleverelephant.ca> - * Add ST_AddMeasure and associated documentations (#390) + * [r5162] Add ST_AddMeasure and associated documentations (#390) -2010-01-24 09:10 nicklas +2010-01-24 09:10 Nicklas Avén <nicklas.aven@jordogskog.no> - * + * [r5161] -2010-01-23 23:31 nicklas +2010-01-23 23:31 Nicklas Avén <nicklas.aven@jordogskog.no> - * Tiny Typo + * [r5160] Tiny Typo -2010-01-23 23:29 nicklas +2010-01-23 23:29 Nicklas Avén <nicklas.aven@jordogskog.no> - * remove ST_Maxdistance from TODO and note that C-version is still - TODO for ST_DumpPoints + * [r5159] remove ST_Maxdistance from TODO and note that C-version + is still TODO for ST_DumpPoints -2010-01-22 06:05 pramsey +2010-01-22 06:05 Paul Ramsey <pramsey@cleverelephant.ca> - * Add note on removing milestone from trac + * [r5156] Add note on removing milestone from trac -2010-01-21 16:44 pramsey +2010-01-21 16:44 Paul Ramsey <pramsey@cleverelephant.ca> - * Updates for 1.5.0rc1 + * [r5150] Updates for 1.5.0rc1 -2010-01-21 13:08 nicklas +2010-01-21 13:08 Nicklas Avén <nicklas.aven@jordogskog.no> - * add missing comment + * [r5149] add missing comment -2010-01-21 07:19 nicklas +2010-01-21 07:19 Nicklas Avén <nicklas.aven@jordogskog.no> - * Fix for make check on MingW #389 + * [r5148] Fix for make check on MingW #389 -2010-01-21 00:06 pramsey +2010-01-21 00:06 Paul Ramsey <pramsey@cleverelephant.ca> - * Updated XML release notes (#374) + * [r5147] Updated XML release notes (#374) -2010-01-20 20:17 pramsey +2010-01-20 20:17 Paul Ramsey <pramsey@cleverelephant.ca> - * Make proper #! calls to perl in perl scripts + * [r5145] Make proper #! calls to perl in perl scripts -2010-01-20 18:55 robe +2010-01-20 18:55 Regina Obe <lr@pcorp.us> - * Add Jorge Arevalo to list since he's contributing a lot of work - to WKT Raster + * [r5143] Add Jorge Arevalo to list since he's contributing a lot + of work to WKT Raster -2010-01-19 12:40 robe +2010-01-19 12:40 Regina Obe <lr@pcorp.us> - * Add George, Guillaume, and Vincent to contributors list + * [r5140] Add George, Guillaume, and Vincent to contributors list -2010-01-19 12:37 robe +2010-01-19 12:37 Regina Obe <lr@pcorp.us> - * Bump Nicklas up since he's added a lot to this release and now - has commit access + * [r5139] Bump Nicklas up since he's added a lot to this release + and now has commit access -2010-01-18 19:40 pramsey +2010-01-18 19:40 Paul Ramsey <pramsey@cleverelephant.ca> - * Add towgs84 line into proj4text for srid = 28992 (#387) + * [r5137] Add towgs84 line into proj4text for srid = 28992 (#387) -2010-01-16 04:26 robe +2010-01-16 04:26 Regina Obe <lr@pcorp.us> - * Add Guillaume's PostgreSQL 8.5 contribution + * [r5136] Add Guillaume's PostgreSQL 8.5 contribution -2010-01-15 19:48 pramsey +2010-01-15 19:48 Paul Ramsey <pramsey@cleverelephant.ca> - * 80col wrap NEWS + * [r5135] 80col wrap NEWS -2010-01-15 18:49 robe +2010-01-15 18:49 Regina Obe <lr@pcorp.us> - * add note about GEOS 3.2 + * [r5134] add note about GEOS 3.2 -2010-01-15 18:41 pramsey +2010-01-15 18:41 Paul Ramsey <pramsey@cleverelephant.ca> - * Short circuit on distance tests: only do full spheroidal + * [r5133] Short circuit on distance tests: only do full spheroidal calculation where the distance is near or greater than the tolerance. This will make large st_dwithin() radius searches much faster since points that are well within the radius will not have their full geodetic calculation run, only those that are close to the radius boundary. -2010-01-15 18:06 pramsey +2010-01-15 18:06 Paul Ramsey <pramsey@cleverelephant.ca> - * Prepare for 1.5.0b2 + * [r5130] Prepare for 1.5.0b2 -2010-01-15 17:54 pramsey +2010-01-15 17:54 Paul Ramsey <pramsey@cleverelephant.ca> - * Make GEOS 3.1 the mandatory minimum (#385) + * [r5129] Make GEOS 3.1 the mandatory minimum (#385) -2010-01-15 17:47 pramsey +2010-01-15 17:47 Paul Ramsey <pramsey@cleverelephant.ca> - * Ignore all PNG files. + * [r5128] Ignore all PNG files. -2010-01-15 08:13 colivier +2010-01-15 08:13 Olivier Courtin <olivier.courtin@camptocamp.com> - * Round decimal part in #58 ticket unit test. As the previous - result was not cross platform compliant + * [r5127] Round decimal part in #58 ticket unit test. As the + previous result was not cross platform compliant -2010-01-14 14:45 colivier +2010-01-14 14:45 Olivier Courtin <olivier.courtin@camptocamp.com> - * Fix undefined vars in LWDEBUGF (#383) + * [r5124] Fix undefined vars in LWDEBUGF (#383) -2010-01-14 08:34 colivier +2010-01-14 08:34 Olivier Courtin <olivier.courtin@camptocamp.com> - * Update TODO. remove ST_GeomFromKML entry + * [r5123] Update TODO. remove ST_GeomFromKML entry -2010-01-12 10:33 mcayland +2010-01-12 10:33 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Add missing MODULE_big section for #311 which was preventing the - main PostGIS library from being installed on older versions of - PostgreSQL. + * [r5121] Add missing MODULE_big section for #311 which was + preventing the main PostGIS library from being installed on older + versions of PostgreSQL. -2010-01-12 08:23 robe +2010-01-12 08:23 Regina Obe <lr@pcorp.us> - * slight typo correction + * [r5120] slight typo correction -2010-01-12 08:18 robe +2010-01-12 08:18 Regina Obe <lr@pcorp.us> - * Add ST_DFullyWithin and add analysis as descriptor to functions + * [r5119] Add ST_DFullyWithin and add analysis as descriptor to + functions -2010-01-12 04:28 pramsey +2010-01-12 04:28 Paul Ramsey <pramsey@cleverelephant.ca> - * Change ST_Equals to use && instead of ~= (#378) + * [r5118] Change ST_Equals to use && instead of ~= (#378) -2010-01-12 04:24 pramsey +2010-01-12 04:24 Paul Ramsey <pramsey@cleverelephant.ca> - * Shorten trac URL. + * [r5117] Shorten trac URL. -2010-01-12 01:01 pramsey +2010-01-12 01:01 Paul Ramsey <pramsey@cleverelephant.ca> - * Add comment about postgis_comments.sql handling in 'clean' target - of docs + * [r5116] Add comment about postgis_comments.sql handling in + 'clean' target of docs -2010-01-12 01:00 pramsey +2010-01-12 01:00 Paul Ramsey <pramsey@cleverelephant.ca> - * Don't remove postgis_comments.sql when doing a 'make clean' in - doc, that way they can survive into the tarball build for final - release. + * [r5115] Don't remove postgis_comments.sql when doing a 'make + clean' in doc, that way they can survive into the tarball build + for final release. -2010-01-12 00:25 pramsey +2010-01-12 00:25 Paul Ramsey <pramsey@cleverelephant.ca> - * Performance tweak to distance calculations with tolerance. If - distance is much less than tolerance, don't bother with geodetic - calculation. If distance is close to or greater than tolerance, - do the geodetic calculation. Should make st_dwithin faster, - avoiding geodetic calculations for points that are clearly within - tolerance. + * [r5114] Performance tweak to distance calculations with + tolerance. If distance is much less than tolerance, don't bother + with geodetic calculation. If distance is close to or greater + than tolerance, do the geodetic calculation. Should make + st_dwithin faster, avoiding geodetic calculations for points that + are clearly within tolerance. -2010-01-11 17:31 kneufeld +2010-01-11 17:31 Kevin Neufeld <kneufeld.ca@gmail.com> - * added missing liblwgeom target needed to build the documentation - images + * [r5113] added missing liblwgeom target needed to build the + documentation images -2010-01-09 03:05 robe +2010-01-09 03:05 Regina Obe <lr@pcorp.us> - * fix typo + * [r5112] fix typo -2010-01-09 03:05 robe +2010-01-09 03:05 Regina Obe <lr@pcorp.us> - * Fill in missing spots in News + * [r5111] Fill in missing spots in News -2010-01-09 00:10 pramsey +2010-01-09 00:10 Paul Ramsey <pramsey@cleverelephant.ca> - * Use macro define to determine default geometry column name in gui + * [r5110] Use macro define to determine default geometry column + name in gui -2010-01-08 23:39 pramsey +2010-01-08 23:39 Paul Ramsey <pramsey@cleverelephant.ca> - * Update the NEW file + * [r5107] Update the NEW file -2010-01-08 23:16 pramsey +2010-01-08 23:16 Paul Ramsey <pramsey@cleverelephant.ca> - * Added in one removed function (st_max_distance, replaced by - st_maxdistance) to the drop script (#330) + * [r5106] Added in one removed function (st_max_distance, replaced + by st_maxdistance) to the drop script (#330) -2010-01-08 22:48 pramsey +2010-01-08 22:48 Paul Ramsey <pramsey@cleverelephant.ca> - * Override pgxs defaults for install, from mcayland (#311) + * [r5105] Override pgxs defaults for install, from mcayland (#311) -2010-01-07 16:04 mcayland +2010-01-07 16:04 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Apply a modified version of Guillaume Lelarge's patch to allow - compilation under current PostgreSQL 8.5 CVS. + * [r5104] Apply a modified version of Guillaume Lelarge's patch to + allow compilation under current PostgreSQL 8.5 CVS. -2010-01-04 23:25 pramsey +2010-01-04 23:25 Paul Ramsey <pramsey@cleverelephant.ca> - * Initailize config value from simple_geometries + * [r5101] Initailize config value from simple_geometries -2010-01-04 19:52 pramsey +2010-01-04 19:52 Paul Ramsey <pramsey@cleverelephant.ca> - * Bracked and reformat comparison to be more explicit + * [r5100] Bracked and reformat comparison to be more explicit -2010-01-04 17:55 pramsey +2010-01-04 17:55 Paul Ramsey <pramsey@cleverelephant.ca> - * Fixed up de-serialization routines to avoid *geoms = malloc(0) - cases which were causing free to fail later on down the line - (#370) + * [r5099] Fixed up de-serialization routines to avoid *geoms = + malloc(0) cases which were causing free to fail later on down the + line (#370) -2010-01-04 05:47 pramsey +2010-01-04 05:47 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove the ifdef/endif blocks for HAVE_ICONV (#367) + * [r5098] Remove the ifdef/endif blocks for HAVE_ICONV (#367) -2010-01-04 05:42 pramsey +2010-01-04 05:42 Paul Ramsey <pramsey@cleverelephant.ca> - * Make configure error out when iconv is unavailable. (#367) + * [r5097] Make configure error out when iconv is unavailable. + (#367) -2010-01-04 05:21 pramsey +2010-01-04 05:21 Paul Ramsey <pramsey@cleverelephant.ca> - * Minor change to about dialog build. + * [r5096] Minor change to about dialog build. -2010-01-04 04:52 pramsey +2010-01-04 04:52 Paul Ramsey <pramsey@cleverelephant.ca> - * Re-fix connection password hiding (#356) + * [r5095] Re-fix connection password hiding (#356) -2010-01-04 00:34 pramsey +2010-01-04 00:34 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix the RCSID to actually substitute + * [r5094] Fix the RCSID to actually substitute -2010-01-04 00:32 pramsey +2010-01-04 00:32 Paul Ramsey <pramsey@cleverelephant.ca> - * Add an About dialogue that contains the revision string + * [r5093] Add an About dialogue that contains the revision string (hopefully) -2010-01-04 00:31 pramsey +2010-01-04 00:31 Paul Ramsey <pramsey@cleverelephant.ca> - * Make lwcollection_extract slightly more empty-intelligent + * [r5092] Make lwcollection_extract slightly more empty-intelligent -2010-01-03 23:05 pramsey +2010-01-03 23:05 Paul Ramsey <pramsey@cleverelephant.ca> - * Separate the options config persistence from the main persistence - routine to allow the "geocolumn" magic to work more reliably - (#369) + * [r5091] Separate the options config persistence from the main + persistence routine to allow the "geocolumn" magic to work more + reliably (#369) -2010-01-02 08:17 pramsey +2010-01-02 08:17 Paul Ramsey <pramsey@cleverelephant.ca> - * Add initialization to fix one Win32 segfault. + * [r5090] Add initialization to fix one Win32 segfault. -2010-01-02 07:01 pramsey +2010-01-02 07:01 Paul Ramsey <pramsey@cleverelephant.ca> - * Add getopt.o into the modules used by shp2pgsql-gui.exe + * [r5089] Add getopt.o into the modules used by shp2pgsql-gui.exe -2010-01-02 06:57 pramsey +2010-01-02 06:57 Paul Ramsey <pramsey@cleverelephant.ca> - * Flip back to pgis_getopt + * [r5088] Flip back to pgis_getopt -2010-01-01 20:28 pramsey +2010-01-01 20:28 Paul Ramsey <pramsey@cleverelephant.ca> - * Change log entry to reflect actual iconv target encoding (UTF-8, - not UTF8) + * [r5087] Change log entry to reflect actual iconv target encoding + (UTF-8, not UTF8) -2010-01-01 19:44 robe +2010-01-01 19:44 Regina Obe <lr@pcorp.us> - * amend upgrade instructions to include description + * [r5086] amend upgrade instructions to include description postgis_upgrade*.sql -2010-01-01 19:30 robe +2010-01-01 19:30 Regina Obe <lr@pcorp.us> - * put in ?, -n and -N missing from loader list + * [r5085] put in ?, -n and -N missing from loader list -2009-12-31 12:41 robe +2009-12-31 12:41 Regina Obe <lr@pcorp.us> - * minor change + * [r5084] minor change -2009-12-31 11:56 robe +2009-12-31 11:56 Regina Obe <lr@pcorp.us> - * amend shp2pgsql section to mention gui loader and also -G + * [r5083] amend shp2pgsql section to mention gui loader and also -G geography switch -2009-12-30 15:31 robe +2009-12-30 15:31 Regina Obe <lr@pcorp.us> - * change wording in what is new titles to reflect they show both - new and changed/enhanced functions + * [r5082] change wording in what is new titles to reflect they show + both new and changed/enhanced functions -2009-12-30 15:12 robe +2009-12-30 15:12 Regina Obe <lr@pcorp.us> - * Fix ST_Extent/ST_Expand docs to reflect change in behavior of - outputting double precision coords instead of float4. Still need - to fix up examples. + * [r5081] Fix ST_Extent/ST_Expand docs to reflect change in + behavior of outputting double precision coords instead of float4. + Still need to fix up examples. -2009-12-30 14:52 mcayland +2009-12-30 14:52 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix ST_Envelope() and ST_Expand() so that they use double + * [r5080] Fix ST_Envelope() and ST_Expand() so that they use double precision arithmetic rather than single precision arithmetic for their calculations. The internal BOX2DFLOAT4s should *never* be used for calculation purposes. -2009-12-30 13:08 robe +2009-12-30 13:08 Regina Obe <lr@pcorp.us> - * ST_Box back to Box link ref + * [r5079] ST_Box back to Box link ref -2009-12-30 12:53 robe +2009-12-30 12:53 Regina Obe <lr@pcorp.us> - * oops revert change I guess ST_Box .. is the one that's + * [r5077] oops revert change I guess ST_Box .. is the one that's deprecated. How confusing :) PRobably should remove from docs at some point. -2009-12-30 12:48 robe +2009-12-30 12:48 Regina Obe <lr@pcorp.us> - * amend faqs and change Box2D,Box3D to ST_Box... + * [r5076] amend faqs and change Box2D,Box3D to ST_Box... -2009-12-30 09:15 robe +2009-12-30 09:15 Regina Obe <lr@pcorp.us> - * correct example + * [r5074] correct example -2009-12-30 07:20 robe +2009-12-30 07:20 Regina Obe <lr@pcorp.us> - * more clarity on the float4/float8 for ST_Envelope + * [r5073] more clarity on the float4/float8 for ST_Envelope -2009-12-30 06:53 robe +2009-12-30 06:53 Regina Obe <lr@pcorp.us> - * #531 ST_Envelope has wrong return type changed from boolean to - geometry + * [r5071] #531 ST_Envelope has wrong return type changed from + boolean to geometry -2009-12-30 06:45 robe +2009-12-30 06:45 Regina Obe <lr@pcorp.us> - * slight wording change + * [r5069] slight wording change -2009-12-30 06:44 robe +2009-12-30 06:44 Regina Obe <lr@pcorp.us> - * fill in mising geography = operator + * [r5068] fill in mising geography = operator -2009-12-30 06:38 robe +2009-12-30 06:38 Regina Obe <lr@pcorp.us> - * fix typo + * [r5067] fix typo -2009-12-30 06:12 robe +2009-12-30 06:12 Regina Obe <lr@pcorp.us> - * #365 document ST_GeogFromWKB and ST_GeogFromText + * [r5066] #365 document ST_GeogFromWKB and ST_GeogFromText -2009-12-30 01:25 pramsey +2009-12-30 01:25 Paul Ramsey <pramsey@cleverelephant.ca> - * Rename ST_GeographyFromBinary to ST_GeogFromWKB. Add + * [r5065] Rename ST_GeographyFromBinary to ST_GeogFromWKB. Add ST_GeogFromText to ape the ISO geometry spec more closely. (#360) -2009-12-30 01:20 pramsey +2009-12-30 01:20 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove the NULL policy line from the GUI options (#363) + * [r5064] Remove the NULL policy line from the GUI options (#363) -2009-12-30 01:12 pramsey +2009-12-30 01:12 Paul Ramsey <pramsey@cleverelephant.ca> - * Make a few things more explicit in the handling of encoding. + * [r5063] Make a few things more explicit in the handling of + encoding. -2009-12-29 20:23 pramsey +2009-12-29 20:23 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove a couple compiler warnings following last change. + * [r5062] Remove a couple compiler warnings following last change. -2009-12-29 20:16 pramsey +2009-12-29 20:16 Paul Ramsey <pramsey@cleverelephant.ca> - * Change options dialogue into actual GTK dialog and move to - creating/destroying it on each appearance. (#363) + * [r5061] Change options dialogue into actual GTK dialog and move + to creating/destroying it on each appearance. (#363) -2009-12-29 19:23 pramsey +2009-12-29 19:23 Paul Ramsey <pramsey@cleverelephant.ca> - * Try and get around the expanding window problem + * [r5060] Try and get around the expanding window problem -2009-12-29 08:52 mcayland +2009-12-29 08:52 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Add a filter name to the shapefile file selector; this is just a - cosmetic fix. + * [r5059] Add a filter name to the shapefile file selector; this is + just a cosmetic fix. -2009-12-29 08:35 mcayland +2009-12-29 08:35 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Restrict SQL to only 255 characters when displaying erroneus SQL - in the log window. This prevents GTK from crashing when really - long lines are added to the log window. + * [r5058] Restrict SQL to only 255 characters when displaying + erroneus SQL in the log window. This prevents GTK from crashing + when really long lines are added to the log window. -2009-12-28 18:48 pramsey +2009-12-28 18:48 Paul Ramsey <pramsey@cleverelephant.ca> - * Include GUI as conditional install target + * [r5057] Include GUI as conditional install target -2009-12-28 13:32 mcayland +2009-12-28 13:32 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Add some more missing defaults to the shapefile loader + * [r5056] Add some more missing defaults to the shapefile loader configuration. -2009-12-27 17:16 mcayland +2009-12-27 17:16 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix shp2pgsql-gui not picking up the correct default settings, - which was causing some shapefiles to abort in the GUI but when - using the CLI. + * [r5055] Fix shp2pgsql-gui not picking up the correct default + settings, which was causing some shapefiles to abort in the GUI + but when using the CLI. -2009-12-25 04:41 pramsey +2009-12-25 04:41 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix up another password leaking into the log (#356) + * [r5054] Fix up another password leaking into the log (#356) -2009-12-24 00:57 pramsey +2009-12-24 00:57 Paul Ramsey <pramsey@cleverelephant.ca> - * Handle case where there is no password to sanitize + * [r5053] Handle case where there is no password to sanitize -2009-12-23 19:49 pramsey +2009-12-23 19:49 Paul Ramsey <pramsey@cleverelephant.ca> - * Sanitize the connection string displayed in the GUI log (#356) + * [r5052] Sanitize the connection string displayed in the GUI log + (#356) -2009-12-23 19:34 pramsey +2009-12-23 19:34 Paul Ramsey <pramsey@cleverelephant.ca> - * Add support for dumping geography tables. (#251) + * [r5051] Add support for dumping geography tables. (#251) -2009-12-23 15:48 colivier +2009-12-23 15:48 Olivier Courtin <olivier.courtin@camptocamp.com> - * Add http://www.epsg.org/6.11.2/4326 srsName pattern support - (related to CITE WFS 1.1 GetFeature-tc17.2. Add related unit - tests + * [r5050] Add http://www.epsg.org/6.11.2/4326 srsName pattern + support (related to CITE WFS 1.1 GetFeature-tc17.2. Add related + unit tests -2009-12-23 05:01 pramsey +2009-12-23 05:01 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove hack PGAdmin GUI target (#355) + * [r5049] Remove hack PGAdmin GUI target (#355) -2009-12-22 20:50 pramsey +2009-12-22 20:50 Paul Ramsey <pramsey@cleverelephant.ca> - * Add message to GUI when creating spatial index. + * [r5047] Add message to GUI when creating spatial index. -2009-12-22 19:38 pramsey +2009-12-22 19:38 Paul Ramsey <pramsey@cleverelephant.ca> - * Add shp2pgsql-pgadmin build target for exe without special win32 - options. + * [r5046] Add shp2pgsql-pgadmin build target for exe without + special win32 options. -2009-12-22 12:38 mcayland +2009-12-22 12:38 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix bug in geography support when creating indexes. + * [r5045] Fix bug in geography support when creating indexes. -2009-12-22 12:28 mcayland +2009-12-22 12:28 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * More improvements to the shapefile loader: + * [r5044] More improvements to the shapefile loader: - Fix COPY support for shapefiles containing more than 1 record - Fix cancellation on mid-import - Remove progress logging on import, and replace with flashly progress bar -2009-12-22 00:35 pramsey +2009-12-22 00:35 Paul Ramsey <pramsey@cleverelephant.ca> - * Handle index building when loading geography + * [r5043] Handle index building when loading geography -2009-12-22 00:27 pramsey +2009-12-22 00:27 Paul Ramsey <pramsey@cleverelephant.ca> - * Add support for GEOGRAPHY type to loader GUI. (#251) + * [r5042] Add support for GEOGRAPHY type to loader GUI. (#251) -2009-12-21 23:22 pramsey +2009-12-21 23:22 Paul Ramsey <pramsey@cleverelephant.ca> - * Add support for geography type to command-line loader (#251) + * [r5040] Add support for geography type to command-line loader + (#251) -2009-12-20 17:42 pramsey +2009-12-20 17:42 Paul Ramsey <pramsey@cleverelephant.ca> - * CFLAGS=-pedantic pass over the codebase and warnings reduced + * [r5039] CFLAGS=-pedantic pass over the codebase and warnings + reduced -2009-12-20 17:23 pramsey +2009-12-20 17:23 Paul Ramsey <pramsey@cleverelephant.ca> - * Disable unused static function. + * [r5038] Disable unused static function. -2009-12-20 04:42 pramsey +2009-12-20 04:42 Paul Ramsey <pramsey@cleverelephant.ca> - * Minor changes to header inclusions. + * [r5037] Minor changes to header inclusions. -2009-12-20 04:31 pramsey +2009-12-20 04:31 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix bracket issue in commandline opt handline + * [r5036] Fix bracket issue in commandline opt handline -2009-12-19 03:56 pramsey +2009-12-19 03:56 Paul Ramsey <pramsey@cleverelephant.ca> - * Radically simpler getopt implementation from AT&T UNIX. + * [r5035] Radically simpler getopt implementation from AT&T UNIX. -2009-12-18 20:51 pramsey +2009-12-18 20:51 Paul Ramsey <pramsey@cleverelephant.ca> - * Add some logging during the load so we can see what's going on. + * [r5034] Add some logging during the load so we can see what's + going on. -2009-12-18 19:28 colivier +2009-12-18 19:28 Olivier Courtin <olivier.courtin@camptocamp.com> - * remove the #273 test, as it already the same than point_1 + * [r5033] remove the #273 test, as it already the same than point_1 -2009-12-18 19:08 colivier +2009-12-18 19:08 Olivier Courtin <olivier.courtin@camptocamp.com> - * Libxml become mandatory. Cf #344. Modify configure step, remove - all HAVE_LIBXML2 from code, sql and unit tests. Update + * [r5032] Libxml become mandatory. Cf #344. Modify configure step, + remove all HAVE_LIBXML2 from code, sql and unit tests. Update documentation -2009-12-18 18:38 pramsey +2009-12-18 18:38 Paul Ramsey <pramsey@cleverelephant.ca> - * Moved size of int8 down to 19 chars (#326) + * [r5031] Moved size of int8 down to 19 chars (#326) -2009-12-18 18:26 robe +2009-12-18 18:26 Regina Obe <lr@pcorp.us> - * fix some typos, cosmetic changes, throw some more geography - around + * [r5030] fix some typos, cosmetic changes, throw some more + geography around -2009-12-18 17:43 robe +2009-12-18 17:43 Regina Obe <lr@pcorp.us> - * Find a home for Paul's examples and Advanced FAQ and back + * [r5029] Find a home for Paul's examples and Advanced FAQ and back reference from main FAQ section -2009-12-18 17:16 robe +2009-12-18 17:16 Regina Obe <lr@pcorp.us> - * We all new this day would come when we'd have to devote a whole - section to this new kid called "geography". Think we still need - to shuffle things around as the next section seems like a + * [r5028] We all new this day would come when we'd have to devote a + whole section to this new kid called "geography". Think we still + need to shuffle things around as the next section seems like a disconnect from the geography section -2009-12-18 07:46 mleslie +2009-12-18 07:46 Mark Leslie <mark.leslie@lisasoft.com> - * Reverting the change of r5007, removal of the getopt hack, to get - windows builds working again. + * [r5025] Reverting the change of r5007, removal of the getopt + hack, to get windows builds working again. -2009-12-18 06:39 pramsey +2009-12-18 06:39 Paul Ramsey <pramsey@cleverelephant.ca> - * Add in icon and resource information for Win32 GUI + * [r5024] Add in icon and resource information for Win32 GUI -2009-12-18 05:55 pramsey +2009-12-18 05:55 Paul Ramsey <pramsey@cleverelephant.ca> - * Make GUI open w/o console under Win32 + * [r5023] Make GUI open w/o console under Win32 -2009-12-17 12:54 mcayland +2009-12-17 12:54 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Implement proper cleanup if an import fails, and also disable the - "Import" button during the import to ensure that multiple import - threads can't be launched. + * [r5020] Implement proper cleanup if an import fails, and also + disable the "Import" button during the import to ensure that + multiple import threads can't be launched. -2009-12-17 11:16 mcayland +2009-12-17 11:16 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Add GUI option to allow the use of COPY rather than INSERT to - load geometries into the database. Currently the default is still - to use INSERT. + * [r5019] Add GUI option to allow the use of COPY rather than + INSERT to load geometries into the database. Currently the + default is still to use INSERT. -2009-12-17 11:11 mcayland +2009-12-17 11:11 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix memory scope error (resulting in segfault) accidentally - introduced by the command line changes. + * [r5018] Fix memory scope error (resulting in segfault) + accidentally introduced by the command line changes. -2009-12-16 17:13 pramsey +2009-12-16 17:13 Paul Ramsey <pramsey@cleverelephant.ca> - * Temporarily de-regress the loader while talking to -devel + * [r5013] Temporarily de-regress the loader while talking to -devel -2009-12-16 17:00 pramsey +2009-12-16 17:00 Paul Ramsey <pramsey@cleverelephant.ca> - * Quiet solaris warnings + * [r5012] Quiet solaris warnings -2009-12-16 16:49 pramsey +2009-12-16 16:49 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove warning on Solaris + * [r5011] Remove warning on Solaris -2009-12-16 00:43 pramsey +2009-12-16 00:43 Paul Ramsey <pramsey@cleverelephant.ca> - * Add initial values. + * [r5010] Add initial values. -2009-12-15 23:55 pramsey +2009-12-15 23:55 Paul Ramsey <pramsey@cleverelephant.ca> - * Change MAX_DBF_FIELD_SIZE to 254 (#326) + * [r5009] Change MAX_DBF_FIELD_SIZE to 254 (#326) -2009-12-15 23:44 pramsey +2009-12-15 23:44 Paul Ramsey <pramsey@cleverelephant.ca> - * Add in support for command-line options for connection info to - GUI (#338) + * [r5008] Add in support for command-line options for connection + info to GUI (#338) -2009-12-15 21:45 pramsey +2009-12-15 21:45 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove custom getopt files and move back to system getopt. Will - take some testing, but will be worth it to be rid of this - unmaintainable hack. + * [r5007] Remove custom getopt files and move back to system + getopt. Will take some testing, but will be worth it to be rid of + this unmaintainable hack. -2009-12-15 20:56 pramsey +2009-12-15 20:56 Paul Ramsey <pramsey@cleverelephant.ca> - * Make null date field blank rather than 00000000 (#321) + * [r5006] Make null date field blank rather than 00000000 (#321) -2009-12-15 20:08 pramsey +2009-12-15 20:08 Paul Ramsey <pramsey@cleverelephant.ca> - * Make 4326 the default SRID for "unknown" cases, both in column - creation and in geography object creation. (#347) + * [r5005] Make 4326 the default SRID for "unknown" cases, both in + column creation and in geography object creation. (#347) -2009-12-15 18:44 pramsey +2009-12-15 18:44 Paul Ramsey <pramsey@cleverelephant.ca> - * Add --with-libiconv argument to configure, to allow third-party - iconv libraries to be used instead of system iconv, if so - desired. Necessary to work around an OS/X Snow Leopard issue - (iconv_open only available as a 32 bit call!) + * [r5004] Add --with-libiconv argument to configure, to allow + third-party iconv libraries to be used instead of system iconv, + if so desired. Necessary to work around an OS/X Snow Leopard + issue (iconv_open only available as a 32 bit call!) -2009-12-15 18:42 pramsey +2009-12-15 18:42 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix buffer overrun case. + * [r5003] Fix buffer overrun case. -2009-12-15 15:10 pramsey +2009-12-15 15:10 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove syntax error (fumbling fingers?) in the usage line (#345) + * [r5002] Remove syntax error (fumbling fingers?) in the usage line + (#345) -2009-12-15 15:08 pramsey +2009-12-15 15:08 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove test that enforces only OGC-standard WKT for + * [r5001] Remove test that enforces only OGC-standard WKT for GeomFromText(). We'll accept any string we can parse, just like geometry_in(). (#332) -2009-12-14 18:04 pramsey +2009-12-14 18:04 Paul Ramsey <pramsey@cleverelephant.ca> - * Flip argument order for -cli exe build and add CFLAGS back into - linking line + * [r5000] Flip argument order for -cli exe build and add CFLAGS + back into linking line -2009-12-14 11:26 mcayland +2009-12-14 11:26 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Remove the original shp2pgsql.c file which is no longer required - with the new architecture. + * [r4999] Remove the original shp2pgsql.c file which is no longer + required with the new architecture. -2009-12-14 01:38 mcayland +2009-12-14 01:38 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix incorrect logic when outputting escaped strings; COPY does - not require the attribute to be surrounded by apostrophes. + * [r4998] Fix incorrect logic when outputting escaped strings; COPY + does not require the attribute to be surrounded by apostrophes. -2009-12-14 01:23 mcayland +2009-12-14 01:23 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix missing COPY terminator from shp2pgsql command line + * [r4997] Fix missing COPY terminator from shp2pgsql command line component. -2009-12-13 20:31 mcayland +2009-12-13 20:31 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Commit initial version of reworked shp2pgsql architecture that - defines a common API within shp2pgsql-core that can be called - from both the CLI and GUI interfaces. + * [r4996] Commit initial version of reworked shp2pgsql architecture + that defines a common API within shp2pgsql-core that can be + called from both the CLI and GUI interfaces. There are still some minor TODOs left, however the basic concept appears to work well and I've also spent time running tests under valgrind to ensure that we don't leak memory on larger shapefiles. -2009-12-09 17:33 kneufeld +2009-12-09 17:33 Kevin Neufeld <kneufeld.ca@gmail.com> - * added identifier to shp2pgsql usage section + * [r4995] added identifier to shp2pgsql usage section -2009-12-09 17:12 kneufeld +2009-12-09 17:12 Kevin Neufeld <kneufeld.ca@gmail.com> - * updated "Using the Loader" to demonstrate the use of the + * [r4994] updated "Using the Loader" to demonstrate the use of the available options -2009-12-09 05:08 robe +2009-12-09 05:08 Regina Obe <lr@pcorp.us> - * Correct the output type of ST_Extent and flag this as a change in - behavior in PostGIS 1.4 + * [r4992] Correct the output type of ST_Extent and flag this as a + change in behavior in PostGIS 1.4 -2009-12-07 15:56 pramsey +2009-12-07 15:56 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix mistakes in geography faq item. + * [r4991] Fix mistakes in geography faq item. -2009-12-04 15:39 robe +2009-12-04 15:39 Regina Obe <lr@pcorp.us> - * get rid of begin; commit in geography.sql.in.c. Now that it is - part of postgis.sql.inc.c, no need for it. + * [r4989] get rid of begin; commit in geography.sql.in.c. Now that + it is part of postgis.sql.inc.c, no need for it. -2009-12-04 12:32 robe +2009-12-04 12:32 Regina Obe <lr@pcorp.us> - * change to use refname instead of refid for link in what's new -- - so operators show the operator symbol instead of underlying - function name + * [r4988] change to use refname instead of refid for link in what's + new -- so operators show the operator symbol instead of + underlying function name -2009-12-03 20:42 kneufeld +2009-12-03 20:42 Kevin Neufeld <kneufeld.ca@gmail.com> - * removed VACUUM + * [r4987] removed VACUUM made into a single transaction block -2009-12-03 18:51 kneufeld +2009-12-03 18:51 Kevin Neufeld <kneufeld.ca@gmail.com> - * removed url that is probably the cause in breaking docbook + * [r4986] removed url that is probably the cause in breaking + docbook -2009-12-03 18:43 kneufeld +2009-12-03 18:43 Kevin Neufeld <kneufeld.ca@gmail.com> - * a couple typos in the DE-9IM explanation + * [r4985] a couple typos in the DE-9IM explanation added further reading references. -2009-12-03 16:23 kneufeld +2009-12-03 16:23 Kevin Neufeld <kneufeld.ca@gmail.com> - * fixed a typo and added a few cross links + * [r4984] fixed a typo and added a few cross links -2009-12-03 14:23 robe +2009-12-03 14:23 Regina Obe <lr@pcorp.us> - * Replace unicode codes with images. IE 6 and 7 not happy. PDF not - happy with unicode happy face symbol -- Regina not happy :( + * [r4983] Replace unicode codes with images. IE 6 and 7 not happy. + PDF not happy with unicode happy face symbol -- Regina not happy + :( -2009-12-03 08:58 robe +2009-12-03 08:58 Regina Obe <lr@pcorp.us> - * fill in missing curve support flags for outputs + * [r4982] fill in missing curve support flags for outputs -2009-12-03 06:14 kneufeld +2009-12-03 06:14 Kevin Neufeld <kneufeld.ca@gmail.com> - * added a few reference cross links + * [r4981] added a few reference cross links -2009-12-02 23:41 kneufeld +2009-12-02 23:41 Kevin Neufeld <kneufeld.ca@gmail.com> - * removed borders around the tables in the geometry compliancy - section + * [r4980] removed borders around the tables in the geometry + compliancy section -2009-12-02 23:25 kneufeld +2009-12-02 23:25 Kevin Neufeld <kneufeld.ca@gmail.com> - * added some thoughts on DE-9IM + * [r4979] added some thoughts on DE-9IM -2009-12-02 23:23 kneufeld +2009-12-02 23:23 Kevin Neufeld <kneufeld.ca@gmail.com> - * added target to resize certain images + * [r4978] added target to resize certain images -2009-12-02 22:05 robe +2009-12-02 22:05 Regina Obe <lr@pcorp.us> - * Flag more as working with curves. I think all do except same - operator but need to verify. + * [r4977] Flag more as working with curves. I think all do except + same operator but need to verify. -2009-12-02 21:48 robe +2009-12-02 21:48 Regina Obe <lr@pcorp.us> - * Looks fine in all my IE8 browsers perhaps its just IE7 that's - behind the times. Use cutesy unicode dingbats for now -- alos put - in item list legend. + * [r4976] Looks fine in all my IE8 browsers perhaps its just IE7 + that's behind the times. Use cutesy unicode dingbats for now -- + alos put in item list legend. -2009-12-02 21:02 kneufeld +2009-12-02 21:02 Kevin Neufeld <kneufeld.ca@gmail.com> - * added de9im images + * [r4975] added de9im images -2009-12-02 15:20 robe +2009-12-02 15:20 Regina Obe <lr@pcorp.us> - * Now that pdf table layout is fixed with informal table -- put - back operators in matrix + * [r4974] Now that pdf table layout is fixed with informal table -- + put back operators in matrix -2009-12-02 14:47 robe +2009-12-02 14:47 Regina Obe <lr@pcorp.us> - * Do I dear try an informal table again :) + * [r4973] Do I dear try an informal table again :) -2009-12-02 14:03 robe +2009-12-02 14:03 Regina Obe <lr@pcorp.us> - * Try Mateusz idea of a unicode checkmark + * [r4972] Try Mateusz idea of a unicode checkmark -2009-12-01 22:54 robe +2009-12-01 22:54 Regina Obe <lr@pcorp.us> - * hmm spelled geometry wrong + * [r4971] hmm spelled geometry wrong -2009-12-01 22:40 robe +2009-12-01 22:40 Regina Obe <lr@pcorp.us> - * get rid of padding on tables + * [r4970] get rid of padding on tables -2009-12-01 22:30 robe +2009-12-01 22:30 Regina Obe <lr@pcorp.us> - * try again + * [r4969] try again -2009-12-01 21:47 robe +2009-12-01 21:47 Regina Obe <lr@pcorp.us> - * back to formal table + * [r4968] back to formal table -2009-12-01 20:08 robe +2009-12-01 20:08 Regina Obe <lr@pcorp.us> - * + * [r4967] -2009-12-01 20:00 robe +2009-12-01 20:00 Regina Obe <lr@pcorp.us> - * try again + * [r4966] try again -2009-12-01 19:53 robe +2009-12-01 19:53 Regina Obe <lr@pcorp.us> - * + * [r4965] -2009-12-01 19:34 robe +2009-12-01 19:34 Regina Obe <lr@pcorp.us> - * fix build + * [r4964] fix build -2009-12-01 19:19 robe +2009-12-01 19:19 Regina Obe <lr@pcorp.us> - * seeif pdf looks better with an informaltable + * [r4963] seeif pdf looks better with an informaltable -2009-12-01 18:30 robe +2009-12-01 18:30 Regina Obe <lr@pcorp.us> - * title change + * [r4962] title change -2009-12-01 18:29 robe +2009-12-01 18:29 Regina Obe <lr@pcorp.us> - * typo + * [r4961] typo -2009-12-01 18:07 robe +2009-12-01 18:07 Regina Obe <lr@pcorp.us> - * Add sql mm compliance column get rid of cell-padding + * [r4960] Add sql mm compliance column get rid of cell-padding -2009-12-01 17:17 robe +2009-12-01 17:17 Regina Obe <lr@pcorp.us> - * shorten matrix list to exclude operators and exception so pdf is - not quite so ugly. Try to fit on one page. + * [r4959] shorten matrix list to exclude operators and exception so + pdf is not quite so ugly. Try to fit on one page. -2009-12-01 17:06 robe +2009-12-01 17:06 Regina Obe <lr@pcorp.us> - * fix filter for 2.5D/curved support. More tweaking of style + * [r4958] fix filter for 2.5D/curved support. More tweaking of + style -2009-12-01 16:42 robe +2009-12-01 16:42 Regina Obe <lr@pcorp.us> - * get rid of border=0 altogether exclude management,types, and - transaction from matrix + * [r4957] get rid of border=0 altogether exclude management,types, + and transaction from matrix -2009-12-01 16:15 robe +2009-12-01 16:15 Regina Obe <lr@pcorp.us> - * border not taking + * [r4956] border not taking -2009-12-01 15:09 robe +2009-12-01 15:09 Regina Obe <lr@pcorp.us> - * I want table borders + * [r4955] I want table borders -2009-12-01 14:42 robe +2009-12-01 14:42 Regina Obe <lr@pcorp.us> - * oops had left over junk -- get rid of junk + * [r4954] oops had left over junk -- get rid of junk -2009-12-01 14:28 robe +2009-12-01 14:28 Regina Obe <lr@pcorp.us> - * try to get rid of section abstract -- see if pdflatex accepts - super duper matrix + * [r4953] try to get rid of section abstract -- see if pdflatex + accepts super duper matrix -2009-12-01 14:15 robe +2009-12-01 14:15 Regina Obe <lr@pcorp.us> - * First attempt at super-duper type functionality compare matrix + * [r4952] First attempt at super-duper type functionality compare + matrix -2009-11-30 22:08 pramsey +2009-11-30 22:08 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix up boundary condition in node interaction test. + * [r4949] Fix up boundary condition in node interaction test. -2009-11-30 20:52 pramsey +2009-11-30 20:52 Paul Ramsey <pramsey@cleverelephant.ca> - * Add an internal geometry tree for use in a native prepared - geometry scheme for fast intersection tests. + * [r4948] Add an internal geometry tree for use in a native + prepared geometry scheme for fast intersection tests. -2009-11-30 20:50 pramsey +2009-11-30 20:50 Paul Ramsey <pramsey@cleverelephant.ca> - * Add svn:keywords to everyone + * [r4947] Add svn:keywords to everyone -2009-11-30 20:49 pramsey +2009-11-30 20:49 Paul Ramsey <pramsey@cleverelephant.ca> - * Add NL to end of expected file. + * [r4946] Add NL to end of expected file. -2009-11-30 20:44 pramsey +2009-11-30 20:44 Paul Ramsey <pramsey@cleverelephant.ca> - * Move the fromGML test into the in_gml.sql file, so that it will - be properly excluded when libxml2 is not available. + * [r4945] Move the fromGML test into the in_gml.sql file, so that + it will be properly excluded when libxml2 is not available. -2009-11-30 20:39 pramsey +2009-11-30 20:39 Paul Ramsey <pramsey@cleverelephant.ca> - * Move have_libxml2 define to the other library have_ defines. + * [r4944] Move have_libxml2 define to the other library have_ + defines. -2009-11-30 20:37 pramsey +2009-11-30 20:37 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix warnings from cpp during sql file build as reported by - kneufeld + * [r4943] Fix warnings from cpp during sql file build as reported + by kneufeld -2009-11-30 19:56 pramsey +2009-11-30 19:56 Paul Ramsey <pramsey@cleverelephant.ca> - * Updated SQL files for uninstallation to match current state. + * [r4942] Updated SQL files for uninstallation to match current + state. -2009-11-30 19:12 pramsey +2009-11-30 19:12 Paul Ramsey <pramsey@cleverelephant.ca> - * Update the upgrade process description to match new scripts. + * [r4941] Update the upgrade process description to match new + scripts. -2009-11-30 17:27 pramsey +2009-11-30 17:27 Paul Ramsey <pramsey@cleverelephant.ca> - * Rename ST_PointOutside to _ST_PointOutside (#325) + * [r4938] Rename ST_PointOutside to _ST_PointOutside (#325) -2009-11-30 16:40 kneufeld +2009-11-30 16:40 Kevin Neufeld <kneufeld.ca@gmail.com> - * renamed ST_DumpPoints to _ST_DumpPoints + * [r4937] renamed ST_DumpPoints to _ST_DumpPoints -2009-11-30 14:30 robe +2009-11-30 14:30 Regina Obe <lr@pcorp.us> - * revise template to use new entities + * [r4936] revise template to use new entities -2009-11-30 14:24 robe +2009-11-30 14:24 Regina Obe <lr@pcorp.us> - * availability note not specified right for ST_DumpPoints + * [r4935] availability note not specified right for ST_DumpPoints -2009-11-30 09:16 robe +2009-11-30 09:16 Regina Obe <lr@pcorp.us> - * fill in missing proto for st_polygonize + * [r4934] fill in missing proto for st_polygonize -2009-11-29 09:07 robe +2009-11-29 09:07 Regina Obe <lr@pcorp.us> - * Yeh ST_GeomFromKML/GML not crashing anymore on Windows (when - libxml statically compiled in) -- can put back the tests + * [r4932] Yeh ST_GeomFromKML/GML not crashing anymore on Windows + (when libxml statically compiled in) -- can put back the tests -2009-11-28 22:36 robe +2009-11-28 22:36 Regina Obe <lr@pcorp.us> - * Add missing ST_CoveredBy proto for geography + * [r4927] Add missing ST_CoveredBy proto for geography -2009-11-28 07:13 robe +2009-11-28 07:13 Regina Obe <lr@pcorp.us> - * try to force paragraph at top using sectinfo abstract. Make note - about deprecation more threatening. + * [r4926] try to force paragraph at top using sectinfo abstract. + Make note about deprecation more threatening. -2009-11-28 06:50 robe +2009-11-28 06:50 Regina Obe <lr@pcorp.us> - * slight amendment to description of casts + * [r4925] slight amendment to description of casts -2009-11-28 06:40 robe +2009-11-28 06:40 Regina Obe <lr@pcorp.us> - * fill out casting behavior, also list box type functions and links - to it and from it + * [r4924] fill out casting behavior, also list box type functions + and links to it and from it -2009-11-27 23:38 pramsey +2009-11-27 23:38 Paul Ramsey <pramsey@cleverelephant.ca> - * Add install directory as an ignore. + * [r4923] Add install directory as an ignore. -2009-11-27 20:58 robe +2009-11-27 20:58 Regina Obe <lr@pcorp.us> - * link to new geometry_dump sections, also alphabetize dump + * [r4922] link to new geometry_dump sections, also alphabetize dump functions -2009-11-27 20:39 robe +2009-11-27 20:39 Regina Obe <lr@pcorp.us> - * thanks Kevin -- this should work now + * [r4921] thanks Kevin -- this should work now -2009-11-27 20:31 robe +2009-11-27 20:31 Regina Obe <lr@pcorp.us> - * take out link and see if hudson is happy + * [r4920] take out link and see if hudson is happy -2009-11-27 20:01 robe +2009-11-27 20:01 Regina Obe <lr@pcorp.us> - * try again - maybe typo + * [r4919] try again - maybe typo -2009-11-27 19:46 robe +2009-11-27 19:46 Regina Obe <lr@pcorp.us> - * Add geometry_dump and special index to list all functions that - take as input or output geometry_dump objects + * [r4918] Add geometry_dump and special index to list all functions + that take as input or output geometry_dump objects -2009-11-27 19:21 pramsey +2009-11-27 19:21 Paul Ramsey <pramsey@cleverelephant.ca> - * A few more Mapserver usage updates. + * [r4917] A few more Mapserver usage updates. -2009-11-27 19:17 pramsey +2009-11-27 19:17 Paul Ramsey <pramsey@cleverelephant.ca> - * Update the using mapserver section a little + * [r4916] Update the using mapserver section a little -2009-11-27 17:50 pramsey +2009-11-27 17:50 Paul Ramsey <pramsey@cleverelephant.ca> - * Add newlines at file ends to silence warnings + * [r4913] Add newlines at file ends to silence warnings -2009-11-27 17:06 kneufeld +2009-11-27 17:06 Kevin Neufeld <kneufeld.ca@gmail.com> - * Fixed a few typos and missing references + * [r4912] Fixed a few typos and missing references -2009-11-27 16:28 robe +2009-11-27 16:28 Regina Obe <lr@pcorp.us> - * okay another try. bad scaling + * [r4911] okay another try. bad scaling -2009-11-27 16:01 robe +2009-11-27 16:01 Regina Obe <lr@pcorp.us> - * make all colors different for clarity + * [r4910] make all colors different for clarity -2009-11-27 15:37 robe +2009-11-27 15:37 Regina Obe <lr@pcorp.us> - * forgot images + * [r4909] forgot images -2009-11-27 15:36 robe +2009-11-27 15:36 Regina Obe <lr@pcorp.us> - * remove dupe ST_DFullyWithin, put in availability note for + * [r4908] remove dupe ST_DFullyWithin, put in availability note for ST_DFullyWithin, add ST_ClosestPoint documentation and images, fix ST_LongestLine diag 3(forgot about the 200x200 rule) -2009-11-26 18:50 robe +2009-11-26 18:50 Regina Obe <lr@pcorp.us> - * another st_longestline example + * [r4907] another st_longestline example -2009-11-26 17:56 mcayland +2009-11-26 17:56 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Commit slightly altered regression tests for the above. + * [r4906] Commit slightly altered regression tests for the above. -2009-11-26 17:55 mcayland +2009-11-26 17:55 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix #316: IsValid? called on invalid 3d object leads to crash. - Because of the way the parser works, not all tuples can hold a - valid parse position; hence when trying to display the error - message, the parser would crash. The solution I went for here was - to alter pop() so that "counting tuples" always hold a valid - parse position, and then re-write the various check functions to - ensure that they only display parse errors with details from the - next "counting tuple" higher up in the stack. + * [r4905] Fix #316: IsValid? called on invalid 3d object leads to + crash. Because of the way the parser works, not all tuples can + hold a valid parse position; hence when trying to display the + error message, the parser would crash. The solution I went for + here was to alter pop() so that "counting tuples" always hold a + valid parse position, and then re-write the various check + functions to ensure that they only display parse errors with + details from the next "counting tuple" higher up in the stack. -2009-11-26 16:52 robe +2009-11-26 16:52 Regina Obe <lr@pcorp.us> - * change shortestline/longestline point/line example + * [r4903] change shortestline/longestline point/line example -2009-11-25 23:37 robe +2009-11-25 23:37 Regina Obe <lr@pcorp.us> - * another typo + * [r4901] another typo -2009-11-25 23:36 robe +2009-11-25 23:36 Regina Obe <lr@pcorp.us> - * fix typo in coordinates + * [r4900] fix typo in coordinates -2009-11-25 23:07 robe +2009-11-25 23:07 Regina Obe <lr@pcorp.us> - * make diagrams more interesting + * [r4899] make diagrams more interesting -2009-11-25 22:48 robe +2009-11-25 22:48 Regina Obe <lr@pcorp.us> - * Put in figures for ST_LongestLine. revise figure for shortest - line make geometries the same for easy compare + * [r4898] Put in figures for ST_LongestLine. revise figure for + shortest line make geometries the same for easy compare -2009-11-25 22:15 robe +2009-11-25 22:15 Regina Obe <lr@pcorp.us> - * cosmetic changes + * [r4897] cosmetic changes -2009-11-25 22:12 robe +2009-11-25 22:12 Regina Obe <lr@pcorp.us> - * Put in images for ST_ShortestLine + * [r4896] Put in images for ST_ShortestLine -2009-11-25 21:49 robe +2009-11-25 21:49 Regina Obe <lr@pcorp.us> - * put in missing availability notes + * [r4895] put in missing availability notes -2009-11-25 19:15 pramsey +2009-11-25 19:15 Paul Ramsey <pramsey@cleverelephant.ca> - * Merge Nicklas Aven's distance spike into trunk. (#63, #231) + * [r4894] Merge Nicklas Aven's distance spike into trunk. (#63, + #231) -2009-11-24 22:10 kneufeld +2009-11-24 22:10 Kevin Neufeld <kneufeld.ca@gmail.com> - * added refentry section for ST_DumpPoints() + * [r4892] added refentry section for ST_DumpPoints() -2009-11-24 21:46 kneufeld +2009-11-24 21:46 Kevin Neufeld <kneufeld.ca@gmail.com> - * added an ST_DumpPoints image to the collection. + * [r4891] added an ST_DumpPoints image to the collection. -2009-11-24 17:28 colivier +2009-11-24 17:28 Olivier Courtin <olivier.courtin@camptocamp.com> - * explicit NULL test on xa->name. Related to #273 + * [r4890] explicit NULL test on xa->name. Related to #273 -2009-11-24 10:28 colivier +2009-11-24 10:28 Olivier Courtin <olivier.courtin@camptocamp.com> - * add also availability note to GmlToSQL() + * [r4889] add also availability note to GmlToSQL() -2009-11-24 10:20 colivier +2009-11-24 10:20 Olivier Courtin <olivier.courtin@camptocamp.com> - * add availability information for postgis_libxml_version() + * [r4888] add availability information for postgis_libxml_version() -2009-11-23 18:07 robe +2009-11-23 18:07 Regina Obe <lr@pcorp.us> - * #300 - minor casing changes to reference. Incorporate logic to - comment types. Types need more description and casting behavior - detail. + * [r4887] #300 - minor casing changes to reference. Incorporate + logic to comment types. Types need more description and casting + behavior detail. -2009-11-23 14:27 robe +2009-11-23 14:27 Regina Obe <lr@pcorp.us> - * New postgresql type section per #300. Still need to modify - postgis_comments.sql.xsl accordingly + * [r4886] New postgresql type section per #300. Still need to + modify postgis_comments.sql.xsl accordingly -2009-11-23 14:26 colivier +2009-11-23 14:26 Olivier Courtin <olivier.courtin@camptocamp.com> - * Add libxml2 version information in postgis_full_version. Add - libxml2 support information in postgis_version. Add new + * [r4885] Add libxml2 version information in postgis_full_version. + Add libxml2 support information in postgis_version. Add new postgis_libxml_version function. Add doc entry for this new function. -2009-11-22 04:56 pramsey +2009-11-22 04:56 Paul Ramsey <pramsey@cleverelephant.ca> - * Move utility functions only used in cunit tests to the cunit - code. + * [r4880] Move utility functions only used in cunit tests to the + cunit code. -2009-11-22 04:28 pramsey +2009-11-22 04:28 Paul Ramsey <pramsey@cleverelephant.ca> - * Replace pow(,2.0) with POW2 macro. + * [r4879] Replace pow(,2.0) with POW2 macro. -2009-11-21 06:08 pramsey +2009-11-21 06:08 Paul Ramsey <pramsey@cleverelephant.ca> - * Move from pass-by-value to pass-by-const-pointer. What can I say, - I have no control over myself. + * [r4877] Move from pass-by-value to pass-by-const-pointer. What + can I say, I have no control over myself. -2009-11-21 03:44 robe +2009-11-21 03:44 Regina Obe <lr@pcorp.us> - * update st_buffer, st_intersection details for geography to - reflect what we are actually doing in bestsrid calc + * [r4876] update st_buffer, st_intersection details for geography + to reflect what we are actually doing in bestsrid calc -2009-11-21 03:31 robe +2009-11-21 03:31 Regina Obe <lr@pcorp.us> - * grammar correction + * [r4875] grammar correction -2009-11-20 20:12 pramsey +2009-11-20 20:12 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix an error hidden in a debug line. + * [r4873] Fix an error hidden in a debug line. -2009-11-20 18:36 pramsey +2009-11-20 18:36 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix graxing case and improve co-linear handling with help from - Nicklas Aven (#314) + * [r4872] Fix graxing case and improve co-linear handling with help + from Nicklas Aven (#314) -2009-11-20 18:05 kneufeld +2009-11-20 18:05 Kevin Neufeld <kneufeld.ca@gmail.com> - * added missing dependency of postgis_aggs_mm for the comments + * [r4871] added missing dependency of postgis_aggs_mm for the + comments -2009-11-20 14:02 mcayland +2009-11-20 14:02 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Apply Kris Jurka's pgsql2shp patches, as detail in the + * [r4870] Apply Kris Jurka's pgsql2shp patches, as detail in the postgis-devel archives on 12th Nov. Thanks Kris! -2009-11-20 13:53 mcayland +2009-11-20 13:53 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Finish working on Dave Fuhry's memory-leak patch, and also fix - several other leaks found by running shp2pgsql through valgrind. + * [r4868] Finish working on Dave Fuhry's memory-leak patch, and + also fix several other leaks found by running shp2pgsql through + valgrind. -2009-11-19 22:35 colivier +2009-11-19 22:35 Olivier Courtin <olivier.courtin@camptocamp.com> - * Switch to reference splitted files. Add references entities. Use - postgis.xml rather than reference.xml in doc/xsl/* files. Add - template rule in doc/xsl/* to only use + * [r4866] Switch to reference splitted files. Add references + entities. Use postgis.xml rather than reference.xml in doc/xsl/* + files. Add template rule in doc/xsl/* to only use /book/chapter[@id='reference']. -2009-11-19 20:23 pramsey +2009-11-19 20:23 Paul Ramsey <pramsey@cleverelephant.ca> - * Handle the case where the stabline and a polygon edge are + * [r4865] Handle the case where the stabline and a polygon edge are co-linear in point-in-polygon test. -2009-11-19 15:39 mcayland +2009-11-19 15:39 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Alter regression test harness so that shp2pgsql/pgsql2shp can be - tested without being installed. + * [r4862] Alter regression test harness so that shp2pgsql/pgsql2shp + can be tested without being installed. -2009-11-19 00:54 pramsey +2009-11-19 00:54 Paul Ramsey <pramsey@cleverelephant.ca> - * Attempt to clarify MULTIPOLYGON behavior in + * [r4857] Attempt to clarify MULTIPOLYGON behavior in ST_SimplifyPreserveTopology (#240) -2009-11-18 19:54 pramsey +2009-11-18 19:54 Paul Ramsey <pramsey@cleverelephant.ca> - * Add another example (#218) + * [r4855] Add another example (#218) -2009-11-18 19:53 pramsey +2009-11-18 19:53 Paul Ramsey <pramsey@cleverelephant.ca> - * Put constants reference in the example, so people see it (nobody - reads documentation) (#218) + * [r4854] Put constants reference in the example, so people see it + (nobody reads documentation) (#218) -2009-11-18 17:28 kneufeld +2009-11-18 17:28 Kevin Neufeld <kneufeld.ca@gmail.com> - * Ok, well that didn't work. Reverting changes. + * [r4853] Ok, well that didn't work. Reverting changes. -2009-11-18 17:19 kneufeld +2009-11-18 17:19 Kevin Neufeld <kneufeld.ca@gmail.com> - * simplified postgis-out.xml target. The sed replacement should - only happen on the postgis.xml file as the DocBook variable - &last_release_version is used throughout the documentation + * [r4852] simplified postgis-out.xml target. The sed replacement + should only happen on the postgis.xml file as the DocBook + variable &last_release_version is used throughout the + documentation -2009-11-17 23:27 pramsey +2009-11-17 23:27 Paul Ramsey <pramsey@cleverelephant.ca> - * Add in the history table convenience functions, a README and some - manual examples for pedagogy. + * [r4851] Add in the history table convenience functions, a README + and some manual examples for pedagogy. -2009-11-17 22:29 pramsey +2009-11-17 22:29 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix a double-free in the unit test for collection extract. + * [r4850] Fix a double-free in the unit test for collection + extract. -2009-11-17 20:14 pramsey +2009-11-17 20:14 Paul Ramsey <pramsey@cleverelephant.ca> - * Add availability line. + * [r4849] Add availability line. -2009-11-17 20:05 pramsey +2009-11-17 20:05 Paul Ramsey <pramsey@cleverelephant.ca> - * Add more explanation of type numbers. + * [r4848] Add more explanation of type numbers. -2009-11-17 20:03 pramsey +2009-11-17 20:03 Paul Ramsey <pramsey@cleverelephant.ca> - * Implement ST_CollectionExtract() to pull specific homogeneous - collections out of heterogeneous collections. Regressions and - documentation included. (#218) + * [r4847] Implement ST_CollectionExtract() to pull specific + homogeneous collections out of heterogeneous collections. + Regressions and documentation included. (#218) -2009-11-17 17:23 pramsey +2009-11-17 17:23 Paul Ramsey <pramsey@cleverelephant.ca> - * Trim the binary versions of geometries to try and remove + * [r4846] Trim the binary versions of geometries to try and remove regressions from other platforms. -2009-11-17 14:00 mcayland +2009-11-17 14:00 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Properly fix #219 by creating a separate "mini install" of - PostGIS into the PGXS regression directory that can be used for - regression. This is because different architectures have + * [r4845] Properly fix #219 by creating a separate "mini install" + of PostGIS into the PGXS regression directory that can be used + for regression. This is because different architectures have different naming conventions, and so Paul's original hack isn't guaranteed to work. By using PGXS to perform the install, we eliminate the problem of having to know the final architecture library name. -2009-11-17 04:28 pramsey +2009-11-17 04:28 Paul Ramsey <pramsey@cleverelephant.ca> - * Add tests from #210 to the tickets.sql + * [r4844] Add tests from #210 to the tickets.sql -2009-11-17 04:25 pramsey +2009-11-17 04:25 Paul Ramsey <pramsey@cleverelephant.ca> - * Add tickets.sql and expected tests derived from old trac entries - (#214) + * [r4843] Add tickets.sql and expected tests derived from old trac + entries (#214) -2009-11-16 23:30 pramsey +2009-11-16 23:30 Paul Ramsey <pramsey@cleverelephant.ca> - * Add identifying lines to SQL so that error lines are easier to - find. + * [r4842] Add identifying lines to SQL so that error lines are + easier to find. -2009-11-16 23:22 pramsey +2009-11-16 23:22 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove trailing space from libname + * [r4841] Remove trailing space from libname -2009-11-16 22:01 pramsey +2009-11-16 22:01 Paul Ramsey <pramsey@cleverelephant.ca> - * Add in hack to match the library .so substition name to the one - produced by a particular PgSQL version. (#219) + * [r4840] Add in hack to match the library .so substition name to + the one produced by a particular PgSQL version. (#219) -2009-11-16 21:13 pramsey +2009-11-16 21:13 Paul Ramsey <pramsey@cleverelephant.ca> - * Add in tests for MapServer/Geoserver-style SQL calls. (#224) + * [r4839] Add in tests for MapServer/Geoserver-style SQL calls. + (#224) -2009-11-16 20:25 pramsey +2009-11-16 20:25 Paul Ramsey <pramsey@cleverelephant.ca> - * Make scripts version independent of library micro-version. + * [r4838] Make scripts version independent of library + micro-version. -2009-11-16 19:52 pramsey +2009-11-16 19:52 Paul Ramsey <pramsey@cleverelephant.ca> - * Make POSTGIS_SCRIPTS_VERSION reflect the maximum SVN version of - the SQL input files. (#242) + * [r4837] Make POSTGIS_SCRIPTS_VERSION reflect the maximum SVN + version of the SQL input files. (#242) -2009-11-16 19:47 kneufeld +2009-11-16 19:47 Kevin Neufeld <kneufeld.ca@gmail.com> - * Ticket #76. + * [r4836] Ticket #76. - added a modified version of a plpgsql implementation for ST_DumpPoints() proposed by Maxime van Noppen. - added regression tests -2009-11-16 19:10 pramsey +2009-11-16 19:10 Paul Ramsey <pramsey@cleverelephant.ca> - * Make an unknown geography SRID translate to a 4326 geometry SRID - during a cast (#298) + * [r4835] Make an unknown geography SRID translate to a 4326 + geometry SRID during a cast (#298) -2009-11-16 19:06 robe +2009-11-16 19:06 Regina Obe <lr@pcorp.us> - * forgot availability note + * [r4834] forgot availability note -2009-11-16 19:04 robe +2009-11-16 19:04 Regina Obe <lr@pcorp.us> - * fix typos in ST_MakeEnvelope (at least he tries :) ) + * [r4833] fix typos in ST_MakeEnvelope (at least he tries :) ) -2009-11-16 18:46 pramsey +2009-11-16 18:46 Paul Ramsey <pramsey@cleverelephant.ca> - * Add doco and regression tests for ST_MakeEnvelope() (#199) + * [r4832] Add doco and regression tests for ST_MakeEnvelope() + (#199) -2009-11-16 18:28 pramsey +2009-11-16 18:28 Paul Ramsey <pramsey@cleverelephant.ca> - * Add ST_MakeEnvelope() constructor, terse function for making bbox - polygons. (#199) + * [r4831] Add ST_MakeEnvelope() constructor, terse function for + making bbox polygons. (#199) -2009-11-16 13:50 robe +2009-11-16 13:50 Regina Obe <lr@pcorp.us> - * revise to deal with boolean arguments + * [r4830] revise to deal with boolean arguments -2009-11-16 12:57 robe +2009-11-16 12:57 Regina Obe <lr@pcorp.us> - * Update geography transform description to reflect new cowboy - transform hack strategy :). Need to update functions as well once - Olivier has stopped kicking dust. + * [r4829] Update geography transform description to reflect new + cowboy transform hack strategy :). Need to update functions as + well once Olivier has stopped kicking dust. -2009-11-16 05:55 robe +2009-11-16 05:55 Regina Obe <lr@pcorp.us> - * More encouragement to use GEOS 3.2 :) + * [r4827] More encouragement to use GEOS 3.2 :) -2009-11-16 05:53 robe +2009-11-16 05:53 Regina Obe <lr@pcorp.us> - * get rid of reference to loading geography.sql (now integrated in - postgis.sql) + * [r4826] get rid of reference to loading geography.sql (now + integrated in postgis.sql) -2009-11-16 00:28 colivier +2009-11-16 00:28 Olivier Courtin <olivier.courtin@camptocamp.com> - * revert Makefile.in reference.xml and postgis.xml to r4816. Need - to fix NewFunction reference to go further :( + * [r4824] revert Makefile.in reference.xml and postgis.xml to + r4816. Need to fix NewFunction reference to go further :( -2009-11-16 00:27 pramsey +2009-11-16 00:27 Paul Ramsey <pramsey@cleverelephant.ca> - * Cowboy triumphs. (#304) + * [r4823] Cowboy triumphs. (#304) -2009-11-15 23:13 pramsey +2009-11-15 23:13 Paul Ramsey <pramsey@cleverelephant.ca> - * Actually use Antarctic stereographic for antarctic points. (#304) + * [r4822] Actually use Antarctic stereographic for antarctic + points. (#304) -2009-11-15 22:17 colivier +2009-11-15 22:17 Olivier Courtin <olivier.courtin@camptocamp.com> - * Add final semicolon. Remove useless copy related to reference.xml + * [r4821] Add final semicolon. Remove useless copy related to + reference.xml -2009-11-15 22:03 colivier +2009-11-15 22:03 Olivier Courtin <olivier.courtin@camptocamp.com> - * Add forgotten .xml (in pdf rule) + * [r4820] Add forgotten .xml (in pdf rule) -2009-11-15 21:55 colivier +2009-11-15 21:55 Olivier Courtin <olivier.courtin@camptocamp.com> - * Add forgotten .xml in postgis-out rule + * [r4819] Add forgotten .xml in postgis-out rule -2009-11-15 21:23 colivier +2009-11-15 21:23 Olivier Courtin <olivier.courtin@camptocamp.com> - * Update Makefile rules, related to reference.xml split (r4817) + * [r4818] Update Makefile rules, related to reference.xml split + (r4817) -2009-11-15 20:39 colivier +2009-11-15 20:39 Olivier Courtin <olivier.courtin@camptocamp.com> - * Split reference.xml on several sub files (upon sect1). Use entity - to avoid redundant compliant/support text (SFS, SQL/MM, Z/M - dimensions, Curve support) + * [r4817] Split reference.xml on several sub files (upon sect1). + Use entity to avoid redundant compliant/support text (SFS, + SQL/MM, Z/M dimensions, Curve support) -2009-11-15 19:52 pramsey +2009-11-15 19:52 Paul Ramsey <pramsey@cleverelephant.ca> - * Handle odd ArcMap scinotation for large ints. (#38) + * [r4816] Handle odd ArcMap scinotation for large ints. (#38) -2009-11-15 19:32 pramsey +2009-11-15 19:32 Paul Ramsey <pramsey@cleverelephant.ca> - * Add locale handling by setting to 'C' (#303) + * [r4815] Add locale handling by setting to 'C' (#303) -2009-11-15 19:23 pramsey +2009-11-15 19:23 Paul Ramsey <pramsey@cleverelephant.ca> - * Make the _cmp and _eq methods use the same equality conditions so - that + * [r4814] Make the _cmp and _eq methods use the same equality + conditions so that indexed and unindexed answers will be the same. (#292) -2009-11-14 21:14 pramsey +2009-11-14 21:14 Paul Ramsey <pramsey@cleverelephant.ca> - * Move the polar stereographic line a little further north in - bestsrid. (#304) + * [r4812] Move the polar stereographic line a little further north + in bestsrid. (#304) -2009-11-14 03:49 robe +2009-11-14 03:49 Regina Obe <lr@pcorp.us> - * missing ST_DWithin geography spheroid proto + * [r4810] missing ST_DWithin geography spheroid proto -2009-11-14 00:40 pramsey +2009-11-14 00:40 Paul Ramsey <pramsey@cleverelephant.ca> - * Add testing and drop deprecated functions (#202) + * [r4806] Add testing and drop deprecated functions (#202) -2009-11-13 22:13 pramsey +2009-11-13 22:13 Paul Ramsey <pramsey@cleverelephant.ca> - * Build out version specific upgrade scripts. + * [r4804] Build out version specific upgrade scripts. -2009-11-13 20:04 pramsey +2009-11-13 20:04 Paul Ramsey <pramsey@cleverelephant.ca> - * First baby steps towards version-specific loader + * [r4803] First baby steps towards version-specific loader -2009-11-13 15:28 robe +2009-11-13 15:28 Regina Obe <lr@pcorp.us> - * libxml preferable + * [r4802] libxml preferable -2009-11-13 15:27 robe +2009-11-13 15:27 Regina Obe <lr@pcorp.us> - * fix Paul's bad spelling, add KML in output list, link to what's - new in PostGIS 1.5 section, GEOS 3.2 preferred + * [r4801] fix Paul's bad spelling, add KML in output list, link to + what's new in PostGIS 1.5 section, GEOS 3.2 preferred -2009-11-13 03:35 robe +2009-11-13 03:35 Regina Obe <lr@pcorp.us> - * fix formatting in ST_LineCrossingDirection (replace tabs with - spaces)-- show new corrected output after #272 - should be + * [r4795] fix formatting in ST_LineCrossingDirection (replace tabs + with spaces)-- show new corrected output after #272 - should be negatively symmetric fix -2009-11-12 19:00 pramsey +2009-11-12 19:00 Paul Ramsey <pramsey@cleverelephant.ca> - * Walk back function deletions of ST_ functions under types and - operators, these can't be dropped during an in-place upgrade, + * [r4794] Walk back function deletions of ST_ functions under types + and operators, these can't be dropped during an in-place upgrade, *sigh*. (#195) -2009-11-12 04:09 pramsey +2009-11-12 04:09 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove old version ifdefs for versions < PgSQL 8.3 (#290) + * [r4793] Remove old version ifdefs for versions < PgSQL 8.3 (#290) -2009-11-11 19:57 pramsey +2009-11-11 19:57 Paul Ramsey <pramsey@cleverelephant.ca> - * Update behavior of lwgeom_same to match "orderingequals" + * [r4789] Update behavior of lwgeom_same to match "orderingequals" semantics (#289) -2009-11-11 19:35 pramsey +2009-11-11 19:35 Paul Ramsey <pramsey@cleverelephant.ca> - * Slightly loosen equality tolerance check for point in cone... - does this fix cunit regressions? + * [r4788] Slightly loosen equality tolerance check for point in + cone... does this fix cunit regressions? -2009-11-11 19:02 pramsey +2009-11-11 19:02 Paul Ramsey <pramsey@cleverelephant.ca> - * Simplify code and improve consistency of linecrossing results - (#272) + * [r4786] Simplify code and improve consistency of linecrossing + results (#272) -2009-11-11 00:00 pramsey +2009-11-11 00:00 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove GisT headers from file and set keywords. + * [r4784] Remove GisT headers from file and set keywords. -2009-11-10 23:58 pramsey +2009-11-10 23:58 Paul Ramsey <pramsey@cleverelephant.ca> - * Make the = operator do a pure equality test + * [r4783] Make the = operator do a pure equality test -2009-11-10 20:39 pramsey +2009-11-10 20:39 Paul Ramsey <pramsey@cleverelephant.ca> - * Stub implementation of ordering operators (#292) + * [r4779] Stub implementation of ordering operators (#292) -2009-11-10 19:30 pramsey +2009-11-10 19:30 Paul Ramsey <pramsey@cleverelephant.ca> - * Apply handling for EMPTY geometries to all geography functions - per the DevWikiEmptyGeometry page. + * [r4778] Apply handling for EMPTY geometries to all geography + functions per the DevWikiEmptyGeometry page. -2009-11-10 18:34 robe +2009-11-10 18:34 Regina Obe <lr@pcorp.us> - * put logic to recognize boolean and KML text args. Exclude + * [r4777] put logic to recognize boolean and KML text args. Exclude ST_GeomFromKML and ST_GeomFromGML from testing until crashing problem under mingw is resolved. -2009-11-10 12:45 robe +2009-11-10 12:45 Regina Obe <lr@pcorp.us> - * put availability note first in what's new for 1.5. Some of the - functions aren't new but support geography or have behavior - change. Easier if that note comes first. Will change for prior - what's new later if this looks okay. + * [r4774] put availability note first in what's new for 1.5. Some + of the functions aren't new but support geography or have + behavior change. Easier if that note comes first. Will change for + prior what's new later if this looks okay. -2009-11-10 12:18 robe +2009-11-10 12:18 Regina Obe <lr@pcorp.us> - * using (T) to denote Paul's transform hacks and noting what that - (T) means. Will eventually use to generate super duper function - compare matrix :) + * [r4773] using (T) to denote Paul's transform hacks and noting + what that (T) means. Will eventually use to generate super duper + function compare matrix :) -2009-11-10 12:13 robe +2009-11-10 12:13 Regina Obe <lr@pcorp.us> - * Put in ST_Intersection proto for geography + * [r4772] Put in ST_Intersection proto for geography -2009-11-10 12:08 robe +2009-11-10 12:08 Regina Obe <lr@pcorp.us> - * add ST_Intersects proto for geography + * [r4771] add ST_Intersects proto for geography -2009-11-10 11:57 robe +2009-11-10 11:57 Regina Obe <lr@pcorp.us> - * Add ST_GeomFromKML, add some grammar corrections to + * [r4770] Add ST_GeomFromKML, add some grammar corrections to ST_GeomFromGML -2009-11-08 19:05 colivier +2009-11-08 19:05 Olivier Courtin <olivier.courtin@camptocamp.com> - * Initial version of ST_GeomFromKML function and related units - tests + * [r4769] Initial version of ST_GeomFromKML function and related + units tests -2009-11-08 19:02 colivier +2009-11-08 19:02 Olivier Courtin <olivier.courtin@camptocamp.com> - * remove an unused var. minor comment change + * [r4768] remove an unused var. minor comment change -2009-11-08 06:42 colivier +2009-11-08 06:42 Olivier Courtin <olivier.courtin@camptocamp.com> - * Complete ST_GeomFromGML documentation. Add ST_GMLToSQL + * [r4767] Complete ST_GeomFromGML documentation. Add ST_GMLToSQL documentation entry. (Please tks to read back as my english grammar is far to be perfect) -2009-11-07 16:49 pramsey +2009-11-07 16:49 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove TODO items that have actually been done. + * [r4766] Remove TODO items that have actually been done. -2009-11-07 16:17 pramsey +2009-11-07 16:17 Paul Ramsey <pramsey@cleverelephant.ca> - * Make the configure-time test for PgSQL version check for 8.3+ - (#290) + * [r4765] Make the configure-time test for PgSQL version check for + 8.3+ (#290) -2009-11-07 01:47 pramsey +2009-11-07 01:47 Paul Ramsey <pramsey@cleverelephant.ca> - * Drop database when function loads fail in regression tests. (#77) + * [r4764] Drop database when function loads fail in regression + tests. (#77) -2009-11-07 01:31 pramsey +2009-11-07 01:31 Paul Ramsey <pramsey@cleverelephant.ca> - * Make ~= be a bounding box only operator and upgrade ST_Equals() - and ST_OrderingEquals() to match the new behavior. Update - regression tests to match new behavior. (#282) See also #289 for - an odd quirk discovered while updating regression tests. + * [r4763] Make ~= be a bounding box only operator and upgrade + ST_Equals() and ST_OrderingEquals() to match the new behavior. + Update regression tests to match new behavior. (#282) See also + #289 for an odd quirk discovered while updating regression tests. -2009-11-07 00:33 pramsey +2009-11-07 00:33 Paul Ramsey <pramsey@cleverelephant.ca> - * Add text wrappers to functions we commonly expect people to call - with text arguments but expect implicit casting to geometry. - (#252) + * [r4762] Add text wrappers to functions we commonly expect people + to call with text arguments but expect implicit casting to + geometry. (#252) -2009-11-07 00:12 pramsey +2009-11-07 00:12 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix for point-on-vertex case of st_covers (#271) + * [r4761] Fix for point-on-vertex case of st_covers (#271) -2009-11-06 22:55 pramsey +2009-11-06 22:55 Paul Ramsey <pramsey@cleverelephant.ca> - * Utility to read svn revision numbers from SQL scripts. + * [r4760] Utility to read svn revision numbers from SQL scripts. -2009-11-06 22:49 colivier +2009-11-06 22:49 Olivier Courtin <olivier.courtin@camptocamp.com> - * finalize Xlink support (GML SF-2 fully compliant). Fix typo on - PointProperty/Point. Few comments and style corrections. Update - unit tests. + * [r4759] finalize Xlink support (GML SF-2 fully compliant). Fix + typo on PointProperty/Point. Few comments and style corrections. + Update unit tests. -2009-11-06 21:45 pramsey +2009-11-06 21:45 Paul Ramsey <pramsey@cleverelephant.ca> - * Make geography.sql part of the standard postgis.sql build. + * [r4758] Make geography.sql part of the standard postgis.sql + build. -2009-11-06 20:46 pramsey +2009-11-06 20:46 Paul Ramsey <pramsey@cleverelephant.ca> - * Add costs to CPU intensive C functions and update doco to ensure - 8.3 is the referenced minimum PgSQL version. (#230) + * [r4757] Add costs to CPU intensive C functions and update doco to + ensure 8.3 is the referenced minimum PgSQL version. (#230) -2009-11-06 17:30 pramsey +2009-11-06 17:30 Paul Ramsey <pramsey@cleverelephant.ca> - * Update documentation for those functions affected by RFC3. They - are all internal functions that are going to disappear in 2.0, - might be better to simply remove them, but for now... + * [r4755] Update documentation for those functions affected by + RFC3. They are all internal functions that are going to disappear + in 2.0, might be better to simply remove them, but for now... -2009-11-05 20:20 pramsey +2009-11-05 20:20 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix for #157, ST_GeometryType output doesn't correctly identify - curved geometries + * [r4752] Fix for #157, ST_GeometryType output doesn't correctly + identify curved geometries -2009-11-05 19:29 pramsey +2009-11-05 19:29 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix for new LRS regression (#283) + * [r4751] Fix for new LRS regression (#283) -2009-11-05 19:04 pramsey +2009-11-05 19:04 Paul Ramsey <pramsey@cleverelephant.ca> - * Implement RFC3 (#195) + * [r4750] Implement RFC3 (#195) -2009-11-05 04:55 pramsey +2009-11-05 04:55 Paul Ramsey <pramsey@cleverelephant.ca> - * Some initializations and a null pointer avoidance test (#273) + * [r4749] Some initializations and a null pointer avoidance test + (#273) -2009-11-05 00:58 pramsey +2009-11-05 00:58 Paul Ramsey <pramsey@cleverelephant.ca> - * Add ST_Intersection() and ST_Intersects() for geography. + * [r4748] Add ST_Intersection() and ST_Intersects() for geography. -2009-11-05 00:43 pramsey +2009-11-05 00:43 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove createdb_opt lines from psql and createlang calls. (#228) + * [r4746] Remove createdb_opt lines from psql and createlang calls. + (#228) -2009-11-05 00:37 pramsey +2009-11-05 00:37 Paul Ramsey <pramsey@cleverelephant.ca> - * Make non-M attempts to run LRS functions error out instead of - return NULL (#113) + * [r4745] Make non-M attempts to run LRS functions error out + instead of return NULL (#113) -2009-11-04 23:51 pramsey +2009-11-04 23:51 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix for #273? Some unitialized variables may have been causing - problems. Initializing them fixed this problem for me. + * [r4744] Fix for #273? Some unitialized variables may have been + causing problems. Initializing them fixed this problem for me. -2009-11-04 23:03 pramsey +2009-11-04 23:03 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix hausdorf crasher (#279) + * [r4743] Fix hausdorf crasher (#279) -2009-11-04 21:19 colivier +2009-11-04 21:19 Olivier Courtin <olivier.courtin@camptocamp.com> - * revert wrong commit (r4741) on wktparse.lex file + * [r4742] revert wrong commit (r4741) on wktparse.lex file -2009-11-04 21:10 colivier +2009-11-04 21:10 Olivier Courtin <olivier.courtin@camptocamp.com> - * Allow a double to not have digit after dot (related to #175). - Update unit test case + * [r4741] Allow a double to not have digit after dot (related to + #175). Update unit test case -2009-11-04 20:35 pramsey +2009-11-04 20:35 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix for #175, numbers with a terminal decimal won't parse. + * [r4739] Fix for #175, numbers with a terminal decimal won't + parse. -2009-11-04 18:59 robe +2009-11-04 18:59 Regina Obe <lr@pcorp.us> - * amend ST_Length to include use_spheroid proto and amend examples - to state new default behavior + * [r4737] amend ST_Length to include use_spheroid proto and amend + examples to state new default behavior -2009-11-04 18:47 pramsey +2009-11-04 18:47 Paul Ramsey <pramsey@cleverelephant.ca> - * Allow ~= operator to recheck, per #253. + * [r4736] Allow ~= operator to recheck, per #253. -2009-11-04 11:57 robe +2009-11-04 11:57 Regina Obe <lr@pcorp.us> - * type correction in ST_BuildArea output. Add additional proto to - ST_Area and correct the example to show the new spheroid + * [r4735] type correction in ST_BuildArea output. Add additional + proto to ST_Area and correct the example to show the new spheroid measurement default -2009-11-04 09:53 colivier +2009-11-04 09:53 Olivier Courtin <olivier.courtin@camptocamp.com> - * Give priority to gml namespace attribute if any. Apply a fix on - ring incrementation (Surface/interior) + * [r4734] Give priority to gml namespace attribute if any. Apply a + fix on ring incrementation (Surface/interior) -2009-11-04 03:27 pramsey +2009-11-04 03:27 Paul Ramsey <pramsey@cleverelephant.ca> - * Change ST_Area(geog) to defaul to spheroid calculation. + * [r4733] Change ST_Area(geog) to defaul to spheroid calculation. -2009-11-04 00:13 pramsey +2009-11-04 00:13 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove unit test failure cases in 32-bit architectures. Now have - to test correctness + * [r4732] Remove unit test failure cases in 32-bit architectures. + Now have to test correctness of algorithms on test data in 64-bit environment. -2009-11-03 22:26 colivier +2009-11-03 22:26 Olivier Courtin <olivier.courtin@camptocamp.com> - * Initial support of Xlink. Add related units tests. Few cleaning + * [r4731] Initial support of Xlink. Add related units tests. Few + cleaning -2009-11-03 22:24 colivier +2009-11-03 22:24 Olivier Courtin <olivier.courtin@camptocamp.com> - * Add xpath headers support for libxml2 + * [r4730] Add xpath headers support for libxml2 -2009-11-03 21:24 pramsey +2009-11-03 21:24 Paul Ramsey <pramsey@cleverelephant.ca> - * File headers and property setting. + * [r4729] File headers and property setting. -2009-11-03 21:16 pramsey +2009-11-03 21:16 Paul Ramsey <pramsey@cleverelephant.ca> - * Add in handlers to avoid sheroid area cases we currently cannot - handle. + * [r4728] Add in handlers to avoid sheroid area cases we currently + cannot handle. -2009-11-03 21:13 pramsey +2009-11-03 21:13 Paul Ramsey <pramsey@cleverelephant.ca> - * Slight change in ST_Area wording. + * [r4727] Slight change in ST_Area wording. -2009-11-03 15:32 robe +2009-11-03 15:32 Regina Obe <lr@pcorp.us> - * amend distance proto and example -- now we default to spheroid + * [r4726] amend distance proto and example -- now we default to + spheroid -2009-11-03 13:36 colivier +2009-11-03 13:36 Olivier Courtin <olivier.courtin@camptocamp.com> - * Add namespace support. Add pointProperty and pointRep support. - Fix pos and posList spaces inside coordinates issue. Comments - update. Update unit tests + * [r4725] Add namespace support. Add pointProperty and pointRep + support. Fix pos and posList spaces inside coordinates issue. + Comments update. Update unit tests -2009-11-03 10:03 robe +2009-11-03 10:03 Regina Obe <lr@pcorp.us> - * get rid of extra para tag + * [r4724] get rid of extra para tag -2009-11-03 09:47 robe +2009-11-03 09:47 Regina Obe <lr@pcorp.us> - * more typo fixing + * [r4723] more typo fixing -2009-11-03 09:33 robe +2009-11-03 09:33 Regina Obe <lr@pcorp.us> - * fix typo + * [r4722] fix typo -2009-11-03 05:19 robe +2009-11-03 05:19 Regina Obe <lr@pcorp.us> - * Document ST_Buffer for geography and caveats + * [r4721] Document ST_Buffer for geography and caveats -2009-11-03 02:58 pramsey +2009-11-03 02:58 Paul Ramsey <pramsey@cleverelephant.ca> - * Re-enable other geodetic unit tests and remove Java code block. + * [r4720] Re-enable other geodetic unit tests and remove Java code + block. -2009-11-03 00:36 pramsey +2009-11-03 00:36 Paul Ramsey <pramsey@cleverelephant.ca> - * First cut of ST_Area(geography) on spheroid. Currently not - default, use ST_Area(geog, true) to enable it. Beware of + * [r4719] First cut of ST_Area(geography) on spheroid. Currently + not default, use ST_Area(geog, true) to enable it. Beware of limitations over poles and eequator. -2009-11-02 12:05 robe +2009-11-02 12:05 Regina Obe <lr@pcorp.us> - * minor corrections to ST_distance_sphere/spheroid descriptions + * [r4717] minor corrections to ST_distance_sphere/spheroid + descriptions -2009-11-01 22:31 robe +2009-11-01 22:31 Regina Obe <lr@pcorp.us> - * amend doc for st_distance_sphere, st_distance_spheroid to reflect - expanded support. + * [r4716] amend doc for st_distance_sphere, st_distance_spheroid to + reflect expanded support. -2009-10-31 05:05 pramsey +2009-10-31 05:05 Paul Ramsey <pramsey@cleverelephant.ca> - * Make distance_spher(oid) functions a little more type safe. + * [r4713] Make distance_spher(oid) functions a little more type + safe. -2009-10-31 04:53 pramsey +2009-10-31 04:53 Paul Ramsey <pramsey@cleverelephant.ca> - * Update distance_sphere and distance_spheroid to back onto new - geodetic handlers and support generic geometry. + * [r4712] Update distance_sphere and distance_spheroid to back onto + new geodetic handlers and support generic geometry. -2009-10-31 00:10 pramsey +2009-10-31 00:10 Paul Ramsey <pramsey@cleverelephant.ca> - * Tighten up geometry->geography case (#265) + * [r4711] Tighten up geometry->geography case (#265) -2009-10-31 00:01 pramsey +2009-10-31 00:01 Paul Ramsey <pramsey@cleverelephant.ca> - * Add ST_Length() implementation on spheroid and rationalize the - sphere/spheroid implementations into + * [r4710] Add ST_Length() implementation on spheroid and + rationalize the sphere/spheroid implementations into a smaller shared set of functions. -2009-10-30 20:45 pramsey +2009-10-30 20:45 Paul Ramsey <pramsey@cleverelephant.ca> - * Add in spheroid calculations for ST_Distance and ST_DWithin. + * [r4709] Add in spheroid calculations for ST_Distance and + ST_DWithin. -2009-10-30 19:00 robe +2009-10-30 19:00 Regina Obe <lr@pcorp.us> - * Add link to new compatibility matrix + * [r4708] Add link to new compatibility matrix -2009-10-29 20:31 colivier +2009-10-29 20:31 Olivier Courtin <olivier.courtin@camptocamp.com> - * Change dimension to srsDimension (GML 3.1.1) + * [r4705] Change dimension to srsDimension (GML 3.1.1) -2009-10-29 20:21 colivier +2009-10-29 20:21 Olivier Courtin <olivier.courtin@camptocamp.com> - * Change attribute dimension into srsDimension (GML 3.1.1), cf #276 + * [r4704] Change attribute dimension into srsDimension (GML 3.1.1), + cf #276 -2009-10-29 19:53 pramsey +2009-10-29 19:53 Paul Ramsey <pramsey@cleverelephant.ca> - * Minor changes for numerical stability. Remove logging. + * [r4702] Minor changes for numerical stability. Remove logging. -2009-10-29 19:41 pramsey +2009-10-29 19:41 Paul Ramsey <pramsey@cleverelephant.ca> - * Increase precision of minor axis constant. + * [r4701] Increase precision of minor axis constant. -2009-10-29 19:24 pramsey +2009-10-29 19:24 Paul Ramsey <pramsey@cleverelephant.ca> - * Spheroid distance calculation between points added. + * [r4700] Spheroid distance calculation between points added. -2009-10-29 18:42 colivier +2009-10-29 18:42 Olivier Courtin <olivier.courtin@camptocamp.com> - * Add mixed GML srs support. Add ability to deal with lat/lon issue - in GML 3. Fix GML collection units tests. Update units tests + * [r4699] Add mixed GML srs support. Add ability to deal with + lat/lon issue in GML 3. Fix GML collection units tests. Update + units tests -2009-10-29 18:40 colivier +2009-10-29 18:40 Olivier Courtin <olivier.courtin@camptocamp.com> - * Expose transform_point, make_project and GetProj4StringSPI. - Creation of lwgem_transform.h + * [r4698] Expose transform_point, make_project and + GetProj4StringSPI. Creation of lwgem_transform.h -2009-10-29 14:21 colivier +2009-10-29 14:21 Olivier Courtin <olivier.courtin@camptocamp.com> - * Update unit test result, related to error message change (r4662 - in lwgeom_transform.c) + * [r4697] Update unit test result, related to error message change + (r4662 in lwgeom_transform.c) -2009-10-29 14:08 colivier +2009-10-29 14:08 Olivier Courtin <olivier.courtin@camptocamp.com> - * Add attribute dimension in gml:pos and gml:posList. Fix + * [r4696] Add attribute dimension in gml:pos and gml:posList. Fix geometrycollection invalid GML output. Update units test. Cf #276 -2009-10-28 23:05 pramsey +2009-10-28 23:05 Paul Ramsey <pramsey@cleverelephant.ca> - * Note why the penalty function was changed. + * [r4694] Note why the penalty function was changed. -2009-10-28 23:02 pramsey +2009-10-28 23:02 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove overly clever penalty calculation and improve index - structure a lot! + * [r4693] Remove overly clever penalty calculation and improve + index structure a lot! -2009-10-28 18:38 pramsey +2009-10-28 18:38 Paul Ramsey <pramsey@cleverelephant.ca> - * Fill in actual error condition + * [r4692] Fill in actual error condition -2009-10-28 18:20 pramsey +2009-10-28 18:20 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix error in picksplit routine, perhaps will fix balance problem. + * [r4691] Fix error in picksplit routine, perhaps will fix balance + problem. -2009-10-28 12:13 robe +2009-10-28 12:13 Regina Obe <lr@pcorp.us> - * slight attribution update + * [r4690] slight attribution update -2009-10-28 11:56 robe +2009-10-28 11:56 Regina Obe <lr@pcorp.us> - * minor update to release notes (copying content from branch 1.3 - not in trunk) + * [r4689] minor update to release notes (copying content from + branch 1.3 not in trunk) -2009-10-28 11:47 robe +2009-10-28 11:47 Regina Obe <lr@pcorp.us> - * switch pretty tag back to credits -- already linked in + * [r4687] switch pretty tag back to credits -- already linked in reference.xml -2009-10-28 11:40 robe +2009-10-28 11:40 Regina Obe <lr@pcorp.us> - * update credits to include breakout of PSC and bump up people with - commit access and currently committing work + * [r4686] update credits to include breakout of PSC and bump up + people with commit access and currently committing work -2009-10-28 11:05 robe +2009-10-28 11:05 Regina Obe <lr@pcorp.us> - * copy release notes text from branch 1.4 which is strangely more - up to date. + * [r4684] copy release notes text from branch 1.4 which is + strangely more up to date. -2009-10-28 10:58 robe +2009-10-28 10:58 Regina Obe <lr@pcorp.us> - * correct links to postgis bug tracker and subversion repository. - Also amend the release_notes section to reflect newer version - changes + * [r4683] correct links to postgis bug tracker and subversion + repository. Also amend the release_notes section to reflect newer + version changes -2009-10-27 21:39 colivier +2009-10-27 21:39 Olivier Courtin <olivier.courtin@camptocamp.com> - * Fix huge number overflow in export functions, cf #277 + * [r4682] Fix huge number overflow in export functions, cf #277 -2009-10-24 16:37 colivier +2009-10-24 16:37 Olivier Courtin <olivier.courtin@camptocamp.com> - * Add multi data coordinates support. Add unit test case data_1 + * [r4680] Add multi data coordinates support. Add unit test case + data_1 -2009-10-24 16:35 colivier +2009-10-24 16:35 Olivier Courtin <olivier.courtin@camptocamp.com> - * Add ptarray_merge function + * [r4679] Add ptarray_merge function -2009-10-23 23:16 pramsey +2009-10-23 23:16 Paul Ramsey <pramsey@cleverelephant.ca> - * Update personal information. + * [r4677] Update personal information. -2009-10-23 16:01 robe +2009-10-23 16:01 Regina Obe <lr@pcorp.us> - * typo in example + * [r4676] typo in example -2009-10-23 15:51 robe +2009-10-23 15:51 Regina Obe <lr@pcorp.us> - * put in availability note for ST_GeomFromGML, link back from - ST_AsGML, note about libxml2 required + * [r4675] put in availability note for ST_GeomFromGML, link back + from ST_AsGML, note about libxml2 required -2009-10-23 13:26 robe +2009-10-23 13:26 Regina Obe <lr@pcorp.us> - * Preliminary documentation for ST_GeomFromGML and logic to support - gml input parameters + * [r4672] Preliminary documentation for ST_GeomFromGML and logic to + support gml input parameters -2009-10-22 14:08 colivier +2009-10-22 14:08 Olivier Courtin <olivier.courtin@camptocamp.com> - * Use ptarray_isclosed3d to check if 3D rings are closed also on Z. - Update units tests cases + * [r4671] Use ptarray_isclosed3d to check if 3D rings are closed + also on Z. Update units tests cases -2009-10-22 14:06 colivier +2009-10-22 14:06 Olivier Courtin <olivier.courtin@camptocamp.com> - * Add ptarray_isclosed3d function + * [r4670] Add ptarray_isclosed3d function -2009-10-20 15:30 robe +2009-10-20 15:30 Regina Obe <lr@pcorp.us> - * fix typo in libxml deactivated notice + * [r4669] fix typo in libxml deactivated notice -2009-10-20 13:07 colivier +2009-10-20 13:07 Olivier Courtin <olivier.courtin@camptocamp.com> - * Add HAVE_LIBXML2 + * [r4668] Add HAVE_LIBXML2 -2009-10-20 12:54 colivier +2009-10-20 12:54 Olivier Courtin <olivier.courtin@camptocamp.com> - * Add initial version of GeomFromGML function, and units tests - cases. + * [r4667] Add initial version of GeomFromGML function, and units + tests cases. -2009-10-20 12:51 colivier +2009-10-20 12:51 Olivier Courtin <olivier.courtin@camptocamp.com> - * Add libxml2 support (needed by GeomFromGML) + * [r4666] Add libxml2 support (needed by GeomFromGML) -2009-10-19 12:53 robe +2009-10-19 12:53 Regina Obe <lr@pcorp.us> - * update to include ST_Length for geography + * [r4665] update to include ST_Length for geography -2009-10-19 05:05 pramsey +2009-10-19 05:05 Paul Ramsey <pramsey@cleverelephant.ca> - * Add _ST_BestSRID(Geography) utility function to support + * [r4664] Add _ST_BestSRID(Geography) utility function to support ST_Buffer(geography, radius) hack that casts back and forth to geometry. -2009-10-18 21:15 pramsey +2009-10-18 21:15 Paul Ramsey <pramsey@cleverelephant.ca> - * Add in support for magic srid numbers that will always be + * [r4663] Add in support for magic srid numbers that will always be available for UTM WGS84 and polar stereography. Will be used in wrappers that allow geometry functions to be applied to geography. -2009-10-18 04:19 pramsey +2009-10-18 04:19 Paul Ramsey <pramsey@cleverelephant.ca> - * ST_Length(geography) per #266 + * [r4662] ST_Length(geography) per #266 -2009-10-16 23:30 pramsey +2009-10-16 23:30 Paul Ramsey <pramsey@cleverelephant.ca> - * Muck with index logging code. + * [r4661] Muck with index logging code. -2009-10-16 16:33 mcayland +2009-10-16 16:33 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix the geography <column> && <column> selectivity code. Now the - answers between geometry and geography are reasonably similar :) + * [r4660] Fix the geography <column> && <column> selectivity code. + Now the answers between geometry and geography are reasonably + similar :) -2009-10-16 16:31 mcayland +2009-10-16 16:31 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Commit a first-hack attempt at a script to test the geography - join estimation code. + * [r4659] Commit a first-hack attempt at a script to test the + geography join estimation code. -2009-10-16 16:23 mcayland +2009-10-16 16:23 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Change "Mixed Geometry Types" message into a warning rather than - an error in the existing join estimation test script. + * [r4658] Change "Mixed Geometry Types" message into a warning + rather than an error in the existing join estimation test script. -2009-10-16 13:33 robe +2009-10-16 13:33 Regina Obe <lr@pcorp.us> - * revise to test && against table and also put in some floating - points to make tests more interesting + * [r4657] revise to test && against table and also put in some + floating points to make tests more interesting -2009-10-16 13:01 robe +2009-10-16 13:01 Regina Obe <lr@pcorp.us> - * #269 get rid of geography -> geometry implicit to make it an - explicit cast + * [r4656] #269 get rid of geography -> geometry implicit to make it + an explicit cast -2009-10-16 09:37 strk +2009-10-16 09:37 Sandro Santilli <strk@keybit.net> - * Tell what the default is for -N in help output and README file + * [r4655] Tell what the default is for -N in help output and README + file -2009-10-15 17:50 mcayland +2009-10-15 17:50 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Update the TYPMOD_SET_* macros in the same way as for the + * [r4654] Update the TYPMOD_SET_* macros in the same way as for the FLAGS_SET_* macros earlier, so that they actually change the variable they reference. -2009-10-15 17:45 mcayland +2009-10-15 17:45 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Add (slightly hacked) version of geography selectivity test - script to the repo. + * [r4653] Add (slightly hacked) version of geography selectivity + test script to the repo. -2009-10-15 17:44 mcayland +2009-10-15 17:44 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix test_estimation.pl script so it doesn't require oids - no-one - uses these in the 21st century... + * [r4652] Fix test_estimation.pl script so it doesn't require oids + - no-one uses these in the 21st century... -2009-10-15 15:35 mcayland +2009-10-15 15:35 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Alter the FLAGS_SET_* macros so that they actually update the - specified flag variable, rather than just returning the new value - of the flag variable. + * [r4651] Alter the FLAGS_SET_* macros so that they actually update + the specified flag variable, rather than just returning the new + value of the flag variable. -2009-10-15 14:48 mcayland +2009-10-15 14:48 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix for column intersection geography queries sometimes returning - "lwgeom_get_gbox_geodetic: non-geodetic gbox provided" during - execution - a missing initialisation bug. + * [r4650] Fix for column intersection geography queries sometimes + returning "lwgeom_get_gbox_geodetic: non-geodetic gbox provided" + during execution - a missing initialisation bug. -2009-10-14 16:57 mcayland +2009-10-14 16:57 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Re-enable ANALYZE hook, now that it doesn't crash upon loading - Paul's test dataset anymore. + * [r4649] Re-enable ANALYZE hook, now that it doesn't crash upon + loading Paul's test dataset anymore. -2009-10-14 16:22 mcayland +2009-10-14 16:22 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Don't use the default (integer) version of abs() during floating - point calculations... + * [r4648] Don't use the default (integer) version of abs() during + floating point calculations... -2009-10-13 19:50 pramsey +2009-10-13 19:50 Paul Ramsey <pramsey@cleverelephant.ca> - * Much better fix for NaN area problem. + * [r4647] Much better fix for NaN area problem. -2009-10-13 19:39 pramsey +2009-10-13 19:39 Paul Ramsey <pramsey@cleverelephant.ca> - * HAck fix for NaN areas. + * [r4646] HAck fix for NaN areas. -2009-10-11 02:03 pramsey +2009-10-11 02:03 Paul Ramsey <pramsey@cleverelephant.ca> - * Don't copy bboxes from lwgeom to gserialized when working with - geodetics. (#263) + * [r4640] Don't copy bboxes from lwgeom to gserialized when working + with geodetics. (#263) -2009-10-10 16:59 robe +2009-10-10 16:59 Regina Obe <lr@pcorp.us> - * update to include ST_Covers geography + * [r4639] update to include ST_Covers geography -2009-10-10 15:43 robe +2009-10-10 15:43 Regina Obe <lr@pcorp.us> - * update ST_Area with geography examples + * [r4638] update ST_Area with geography examples -2009-10-10 03:18 pramsey +2009-10-10 03:18 Paul Ramsey <pramsey@cleverelephant.ca> - * Add geometry(geography) case per #257 + * [r4637] Add geometry(geography) case per #257 -2009-10-10 00:08 pramsey +2009-10-10 00:08 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix ST_Area(geography) calculation to be more... correct. + * [r4636] Fix ST_Area(geography) calculation to be more... correct. -2009-10-09 19:23 pramsey +2009-10-09 19:23 Paul Ramsey <pramsey@cleverelephant.ca> - * Add implementation for ST_Covers(geography, geography) in + * [r4635] Add implementation for ST_Covers(geography, geography) in point-in-polygon case. -2009-10-09 18:07 pramsey +2009-10-09 18:07 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix incorrect use of flags macros + * [r4634] Fix incorrect use of flags macros -2009-10-09 16:51 pramsey +2009-10-09 16:51 Paul Ramsey <pramsey@cleverelephant.ca> - * One more fix for #260. + * [r4633] One more fix for #260. -2009-10-09 16:07 pramsey +2009-10-09 16:07 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix for #261 (spurious dimension difference errors) + * [r4632] Fix for #261 (spurious dimension difference errors) -2009-10-09 10:39 robe +2009-10-09 10:39 Regina Obe <lr@pcorp.us> - * Put in proto for ST_Area(geography). Still need to put in example - but my ST_Area is non-existent will double-check why. + * [r4631] Put in proto for ST_Area(geography). Still need to put in + example but my ST_Area is non-existent will double-check why. -2009-10-09 04:16 pramsey +2009-10-09 04:16 Paul Ramsey <pramsey@cleverelephant.ca> - * Add ST_PointOutside() function for testing purposes. + * [r4630] Add ST_PointOutside() function for testing purposes. -2009-10-08 19:40 pramsey +2009-10-08 19:40 Paul Ramsey <pramsey@cleverelephant.ca> - * Make geographic point initialization slightly more efficient - (avoid doing it twice for each vertex) + * [r4629] Make geographic point initialization slightly more + efficient (avoid doing it twice for each vertex) -2009-10-08 18:59 pramsey +2009-10-08 18:59 Paul Ramsey <pramsey@cleverelephant.ca> - * Make error messages slightly less opaque + * [r4628] Make error messages slightly less opaque -2009-10-08 18:41 pramsey +2009-10-08 18:41 Paul Ramsey <pramsey@cleverelephant.ca> - * Comment out analyze argument in geometry type creation -- it is - causing a crash for me when loading my test data tables. + * [r4627] Comment out analyze argument in geometry type creation -- + it is causing a crash for me when loading my test data tables. -2009-10-08 17:10 pramsey +2009-10-08 17:10 Paul Ramsey <pramsey@cleverelephant.ca> - * Change radius figure to common average. + * [r4626] Change radius figure to common average. -2009-10-08 17:04 pramsey +2009-10-08 17:04 Paul Ramsey <pramsey@cleverelephant.ca> - * Reformat SQL lines with tabs + * [r4625] Reformat SQL lines with tabs -2009-10-08 11:43 robe +2009-10-08 11:43 Regina Obe <lr@pcorp.us> - * revise readme to include link to instructions for garden test + * [r4624] revise readme to include link to instructions for garden + test -2009-10-08 11:40 robe +2009-10-08 11:40 Regina Obe <lr@pcorp.us> - * Revise to have function list past in as arg to xsltproc + * [r4623] Revise to have function list past in as arg to xsltproc -2009-10-08 10:29 mcayland +2009-10-08 10:29 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Commit first attempt at working geography index selectivity - the - conversion should be there, however it needs some kind of test - harness to verify some of the results. + * [r4622] Commit first attempt at working geography index + selectivity - the conversion should be there, however it needs + some kind of test harness to verify some of the results. -2009-10-08 05:35 pramsey +2009-10-08 05:35 Paul Ramsey <pramsey@cleverelephant.ca> - * ST_Area(geography) implementation and SQL bindings. + * [r4621] ST_Area(geography) implementation and SQL bindings. -2009-10-07 14:26 pramsey +2009-10-07 14:26 Paul Ramsey <pramsey@cleverelephant.ca> - * Make the calculation of gboxes a little simpler in the db level - code. + * [r4620] Make the calculation of gboxes a little simpler in the db + level code. -2009-10-07 12:16 mcayland +2009-10-07 12:16 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix #179: ST_MakeLine and ST_MakeLine_Garry crash server with - null arrays again. There was another non-NULL safe array iterator - within LWGEOM_makeline_garray. + * [r4618] Fix #179: ST_MakeLine and ST_MakeLine_Garry crash server + with null arrays again. There was another non-NULL safe array + iterator within LWGEOM_makeline_garray. -2009-10-07 11:52 robe +2009-10-07 11:52 Regina Obe <lr@pcorp.us> - * Add table with multiple nulls to garden of geometries. + * [r4617] Add table with multiple nulls to garden of geometries. Evidentally -- there are some NULL bugs that escape trapping with just a single null geometry in the table. -2009-10-07 04:38 robe +2009-10-07 04:38 Regina Obe <lr@pcorp.us> - * flip order of ST_Relate protos as Martin observes it doesn't - match our description + * [r4615] flip order of ST_Relate protos as Martin observes it + doesn't match our description -2009-10-07 03:38 pramsey +2009-10-07 03:38 Paul Ramsey <pramsey@cleverelephant.ca> - * Put prototypes into place + * [r4614] Put prototypes into place -2009-10-07 03:37 pramsey +2009-10-07 03:37 Paul Ramsey <pramsey@cleverelephant.ca> - * Change from pass by reference to pass by value + * [r4613] Change from pass by reference to pass by value -2009-10-07 03:35 pramsey +2009-10-07 03:35 Paul Ramsey <pramsey@cleverelephant.ca> - * Short circuit the edge intersection test when the gboxes are - disjoint + * [r4612] Short circuit the edge intersection test when the gboxes + are disjoint -2009-10-06 16:16 mcayland +2009-10-06 16:16 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * First attempt at porting the estimate_selectivity() function to - handle 3 dimensions. Note this is mostly untested at the moment, - as this is only the function that cuts the relevant section out - of the histogram. We still need to plug this into the PostgreSQL - infrastructure. + * [r4611] First attempt at porting the estimate_selectivity() + function to handle 3 dimensions. Note this is mostly untested at + the moment, as this is only the function that cuts the relevant + section out of the histogram. We still need to plug this into the + PostgreSQL infrastructure. -2009-10-06 13:51 mcayland +2009-10-06 13:51 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix #258: ST_HausdorffDistance crashes server. Another geometry - free typo (same as #241) in both st_hausdorffdistance() and - st_hausdorffdistancedensify(). + * [r4610] Fix #258: ST_HausdorffDistance crashes server. Another + geometry free typo (same as #241) in both st_hausdorffdistance() + and st_hausdorffdistancedensify(). -2009-10-06 13:43 mcayland +2009-10-06 13:43 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix #241: ST_LineCrossingDirection Server Crash (Segfault) caused - by a typo freeing the wrong parameter. + * [r4608] Fix #241: ST_LineCrossingDirection Server Crash + (Segfault) caused by a typo freeing the wrong parameter. -2009-10-06 12:02 robe +2009-10-06 12:02 Regina Obe <lr@pcorp.us> - * Put NULL safety tests back in now that Mark has fixed aggregate - collection bug + * [r4607] Put NULL safety tests back in now that Mark has fixed + aggregate collection bug -2009-10-06 11:15 robe +2009-10-06 11:15 Regina Obe <lr@pcorp.us> - * Turn of Paul's accidental commit of fanboy mac enabled random - test + * [r4606] Turn of Paul's accidental commit of fanboy mac enabled + random test -2009-10-06 10:49 mcayland +2009-10-06 10:49 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix compilation bug when debug is enabled. + * [r4605] Fix compilation bug when debug is enabled. -2009-10-06 10:15 mcayland +2009-10-06 10:15 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix another non-NULL safe array iteration within + * [r4604] Fix another non-NULL safe array iteration within LWGEOM_collect_garray, as discovered by Regina's torture tests. -2009-10-06 08:52 mcayland +2009-10-06 08:52 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Move CFLAGS after the PGXS include directive, so that the + * [r4602] Move CFLAGS after the PGXS include directive, so that the autotools configuration doesn't getting overwritten by the PGXS version. Required when passing custom compiler f lags into PostGIS as reported by William Kyngesburye. -2009-10-06 04:59 pramsey +2009-10-06 04:59 Paul Ramsey <pramsey@cleverelephant.ca> - * Make db implementation consistent with liblwgeom + * [r4600] Make db implementation consistent with liblwgeom -2009-10-06 04:50 pramsey +2009-10-06 04:50 Paul Ramsey <pramsey@cleverelephant.ca> - * Change signatures for lwgeom distance sphere + * [r4599] Change signatures for lwgeom distance sphere -2009-10-06 04:19 pramsey +2009-10-06 04:19 Paul Ramsey <pramsey@cleverelephant.ca> - * New point-outside routine, and allow distances against empty - geometries. + * [r4598] New point-outside routine, and allow distances against + empty geometries. -2009-10-05 21:15 kneufeld +2009-10-05 21:15 Kevin Neufeld <kneufeld.ca@gmail.com> - * updated ST_IsValid's reference to the OGC specs. + * [r4597] updated ST_IsValid's reference to the OGC specs. -2009-10-05 19:43 pramsey +2009-10-05 19:43 Paul Ramsey <pramsey@cleverelephant.ca> - * More test cases in there (but turned off, because they fail :( + * [r4596] More test cases in there (but turned off, because they + fail :( -2009-10-05 19:38 pramsey +2009-10-05 19:38 Paul Ramsey <pramsey@cleverelephant.ca> - * Add untested new p-i-p approach for more testing later. + * [r4595] Add untested new p-i-p approach for more testing later. -2009-10-05 16:17 mcayland +2009-10-05 16:17 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Commit first attempt at a multi-D statistics histogram builder. - Note that while geodetic data is inherently 3D, the builder also - contains code to handle lower dimension cartesian coordinates, - which should make porting to ggeometry easier at a later date. At - the moment there are no selectivity routines which actually use - the histograms for real queries, however a reasonably convincing - histogram is created in pg_statistic and all regression tests - pass here. + * [r4594] Commit first attempt at a multi-D statistics histogram + builder. Note that while geodetic data is inherently 3D, the + builder also contains code to handle lower dimension cartesian + coordinates, which should make porting to ggeometry easier at a + later date. At the moment there are no selectivity routines which + actually use the histograms for real queries, however a + reasonably convincing histogram is created in pg_statistic and + all regression tests pass here. -2009-10-05 14:37 pramsey +2009-10-05 14:37 Paul Ramsey <pramsey@cleverelephant.ca> - * Increase precision. + * [r4593] Increase precision. -2009-10-05 14:37 pramsey +2009-10-05 14:37 Paul Ramsey <pramsey@cleverelephant.ca> - * Add another printing block + * [r4592] Add another printing block -2009-10-05 12:52 robe +2009-10-05 12:52 Regina Obe <lr@pcorp.us> - * more errors in my logic + * [r4591] more errors in my logic -2009-10-05 11:45 robe +2009-10-05 11:45 Regina Obe <lr@pcorp.us> - * more corrections + * [r4590] more corrections -2009-10-05 05:05 pramsey +2009-10-05 05:05 Paul Ramsey <pramsey@cleverelephant.ca> - * Added new point-on-edge routine still no joy on bad test case. + * [r4589] Added new point-on-edge routine still no joy on bad test + case. -2009-10-04 22:26 pramsey +2009-10-04 22:26 Paul Ramsey <pramsey@cleverelephant.ca> - * Add another test case that needs resolution + * [r4588] Add another test case that needs resolution -2009-10-04 01:41 pramsey +2009-10-04 01:41 Paul Ramsey <pramsey@cleverelephant.ca> - * Add SQL bindings for selectivity functions. + * [r4587] Add SQL bindings for selectivity functions. -2009-10-04 00:52 pramsey +2009-10-04 00:52 Paul Ramsey <pramsey@cleverelephant.ca> - * revert to previous version + * [r4586] revert to previous version -2009-10-04 00:51 pramsey +2009-10-04 00:51 Paul Ramsey <pramsey@cleverelephant.ca> - * Some fixes to the ST_DWithin code. + * [r4585] Some fixes to the ST_DWithin code. -2009-10-02 20:07 robe +2009-10-02 20:07 Regina Obe <lr@pcorp.us> - * more changes to better test geography + * [r4584] more changes to better test geography -2009-10-02 19:24 robe +2009-10-02 19:24 Regina Obe <lr@pcorp.us> - * cosmetic change to tolerance args for ST_DWithin + * [r4583] cosmetic change to tolerance args for ST_DWithin -2009-10-02 19:21 robe +2009-10-02 19:21 Regina Obe <lr@pcorp.us> - * put create table examples in program listing tag + * [r4582] put create table examples in program listing tag -2009-10-02 19:08 robe +2009-10-02 19:08 Regina Obe <lr@pcorp.us> - * add geography proto for ST_DWithin, also fill in some + * [r4581] add geography proto for ST_DWithin, also fill in some availability marks forgotten. -2009-10-02 18:44 robe +2009-10-02 18:44 Regina Obe <lr@pcorp.us> - * Add geography example for ST_Distance, more geometry examples and - amend to reflect its in meters + * [r4580] Add geography example for ST_Distance, more geometry + examples and amend to reflect its in meters -2009-10-02 18:28 pramsey +2009-10-02 18:28 Paul Ramsey <pramsey@cleverelephant.ca> - * Largely untested implementation of ST_DWithin(geography, + * [r4579] Largely untested implementation of ST_DWithin(geography, geography). We're in business baby! -2009-10-02 14:13 strk +2009-10-02 14:13 Sandro Santilli <strk@keybit.net> - * typo in help message + * [r4578] typo in help message -2009-10-02 01:38 pramsey +2009-10-02 01:38 Paul Ramsey <pramsey@cleverelephant.ca> - * Make the units of st_distance(geography, geography) meters + * [r4577] Make the units of st_distance(geography, geography) + meters -2009-10-01 23:54 pramsey +2009-10-01 23:54 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix boner error + * [r4576] Fix boner error -2009-10-01 21:18 robe +2009-10-01 21:18 Regina Obe <lr@pcorp.us> - * typos + * [r4575] typos -2009-10-01 20:37 robe +2009-10-01 20:37 Regina Obe <lr@pcorp.us> - * put in ST_Distance proto for geography so can test it. + * [r4574] put in ST_Distance proto for geography so can test it. -2009-10-01 19:50 pramsey +2009-10-01 19:50 Paul Ramsey <pramsey@cleverelephant.ca> - * ST_Distance(geography, geography) roughed in. Small detail, - currently returns answers in radians. :) + * [r4573] ST_Distance(geography, geography) roughed in. Small + detail, currently returns answers in radians. :) -2009-10-01 18:45 pramsey +2009-10-01 18:45 Paul Ramsey <pramsey@cleverelephant.ca> - * Add polygon/point distance and tests. + * [r4572] Add polygon/point distance and tests. -2009-10-01 14:52 pramsey +2009-10-01 14:52 Paul Ramsey <pramsey@cleverelephant.ca> - * Wow, error that only showed up in MinGW, but totally an error. I - wonder why my test passed this... clean memory I guess. + * [r4571] Wow, error that only showed up in MinGW, but totally an + error. I wonder why my test passed this... clean memory I guess. -2009-10-01 05:53 pramsey +2009-10-01 05:53 Paul Ramsey <pramsey@cleverelephant.ca> - * lwgeom sphere distance function and tests for point/linestring + * [r4570] lwgeom sphere distance function and tests for + point/linestring -2009-09-30 23:59 pramsey +2009-09-30 23:59 Paul Ramsey <pramsey@cleverelephant.ca> - * Roughing in lwgeom distance machinery now. + * [r4569] Roughing in lwgeom distance machinery now. -2009-09-30 23:03 pramsey +2009-09-30 23:03 Paul Ramsey <pramsey@cleverelephant.ca> - * Add edge-edge distance tests. + * [r4568] Add edge-edge distance tests. -2009-09-30 21:45 pramsey +2009-09-30 21:45 Paul Ramsey <pramsey@cleverelephant.ca> - * Add return value for point of closest approach on arc/edge - distance. + * [r4567] Add return value for point of closest approach on + arc/edge distance. -2009-09-30 21:21 pramsey +2009-09-30 21:21 Paul Ramsey <pramsey@cleverelephant.ca> - * Add edge-to-point distance calculation and tests + * [r4566] Add edge-to-point distance calculation and tests -2009-09-30 19:34 pramsey +2009-09-30 19:34 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove CPU intensive test and add some lat/lon utility functions + * [r4565] Remove CPU intensive test and add some lat/lon utility + functions -2009-09-30 19:02 pramsey +2009-09-30 19:02 Paul Ramsey <pramsey@cleverelephant.ca> - * Make point-in-edge test even looser (fp tolerance factor) + * [r4564] Make point-in-edge test even looser (fp tolerance factor) -2009-09-30 18:57 pramsey +2009-09-30 18:57 Paul Ramsey <pramsey@cleverelephant.ca> - * Move defines around a bit. + * [r4563] Move defines around a bit. -2009-09-30 18:54 pramsey +2009-09-30 18:54 Paul Ramsey <pramsey@cleverelephant.ca> - * Add some debugging blocks for later + * [r4562] Add some debugging blocks for later -2009-09-30 18:28 pramsey +2009-09-30 18:28 Paul Ramsey <pramsey@cleverelephant.ca> - * Add in special case test for parallel / equal edges. + * [r4561] Add in special case test for parallel / equal edges. -2009-09-30 17:12 pramsey +2009-09-30 17:12 Paul Ramsey <pramsey@cleverelephant.ca> - * Whoops, make sure we test all our test cases. + * [r4560] Whoops, make sure we test all our test cases. -2009-09-30 17:09 pramsey +2009-09-30 17:09 Paul Ramsey <pramsey@cleverelephant.ca> - * Make random brute force test a compile-time option. + * [r4559] Make random brute force test a compile-time option. -2009-09-30 17:05 pramsey +2009-09-30 17:05 Paul Ramsey <pramsey@cleverelephant.ca> - * Add more test cases for geocentric bbox calculation and make 'in - cone' test inclusive of end points. + * [r4558] Add more test cases for geocentric bbox calculation and + make 'in cone' test inclusive of end points. -2009-09-30 15:50 robe +2009-09-30 15:50 Regina Obe <lr@pcorp.us> - * more fixes to make geography friendly + * [r4557] more fixes to make geography friendly -2009-09-30 14:10 strk +2009-09-30 14:10 Sandro Santilli <strk@keybit.net> - * Can't put backslash-commands in 'echo' parameter in a standard - way + * [r4556] Can't put backslash-commands in 'echo' parameter in a + standard way (would take -e in some cases) so replace \t with some spaces -2009-09-30 08:39 strk +2009-09-30 08:39 Sandro Santilli <strk@keybit.net> - * add missing newline at end of error message (utf8/iconv) + * [r4555] add missing newline at end of error message (utf8/iconv) -2009-09-30 00:17 pramsey +2009-09-30 00:17 Paul Ramsey <pramsey@cleverelephant.ca> - * Re-enable all geodetic tests. + * [r4554] Re-enable all geodetic tests. -2009-09-30 00:11 pramsey +2009-09-30 00:11 Paul Ramsey <pramsey@cleverelephant.ca> - * Add some extra comments + * [r4553] Add some extra comments -2009-09-29 20:44 pramsey +2009-09-29 20:44 Paul Ramsey <pramsey@cleverelephant.ca> - * astyle the work thus far + * [r4552] astyle the work thus far -2009-09-29 20:41 pramsey +2009-09-29 20:41 Paul Ramsey <pramsey@cleverelephant.ca> - * Flip the clairaut calculations to return both top and bottom in - one go. + * [r4551] Flip the clairaut calculations to return both top and + bottom in one go. -2009-09-29 19:53 pramsey +2009-09-29 19:53 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove old GBOX test answers (some were wrong!) in favor of - actual slow calculations + * [r4550] Remove old GBOX test answers (some were wrong!) in favor + of actual slow calculations -2009-09-29 19:50 pramsey +2009-09-29 19:50 Paul Ramsey <pramsey@cleverelephant.ca> - * Add randomized box maker/checker... still some small errors? + * [r4549] Add randomized box maker/checker... still some small + errors? -2009-09-29 19:02 pramsey +2009-09-29 19:02 Paul Ramsey <pramsey@cleverelephant.ca> - * Make polygon pole check a little more general. + * [r4548] Make polygon pole check a little more general. -2009-09-29 18:48 pramsey +2009-09-29 18:48 Paul Ramsey <pramsey@cleverelephant.ca> - * All bbox test cases now pass. Suck on that! + * [r4547] All bbox test cases now pass. Suck on that! -2009-09-29 15:55 robe +2009-09-29 15:55 Regina Obe <lr@pcorp.us> - * remove null geometry from testing until we fix aggregate null - crashing bug. Also fix multipolygonz and m not returning those - geometry types. + * [r4546] remove null geometry from testing until we fix aggregate + null crashing bug. Also fix multipolygonz and m not returning + those geometry types. -2009-09-29 14:40 pramsey +2009-09-29 14:40 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove un-used function from testing. + * [r4544] Remove un-used function from testing. -2009-09-29 14:39 pramsey +2009-09-29 14:39 Paul Ramsey <pramsey@cleverelephant.ca> - * Work on making "on edge" test more reliable. + * [r4543] Work on making "on edge" test more reliable. -2009-09-29 13:31 strk +2009-09-29 13:31 Sandro Santilli <strk@keybit.net> - * Ensure lwcollection_segmentize2d always return a NEW geometry. - Fixes ticket #254. Add regression test for that bug. + * [r4542] Ensure lwcollection_segmentize2d always return a NEW + geometry. Fixes ticket #254. Add regression test for that bug. -2009-09-29 12:42 robe +2009-09-29 12:42 Regina Obe <lr@pcorp.us> - * Add missing protos for geography for ST_AsKML, ST_AsGeoJSON, - ST_AsSVG, ST_AsGML. Revise xml parser special index generator to - not dupe when multiple protos with geography + * [r4541] Add missing protos for geography for ST_AsKML, + ST_AsGeoJSON, ST_AsSVG, ST_AsGML. Revise xml parser special index + generator to not dupe when multiple protos with geography -2009-09-29 12:23 robe +2009-09-29 12:23 Regina Obe <lr@pcorp.us> - * Put in overload text for ST_AsText and ST_AsBinary to prevent the - function .. is not unique when passing in text (unknown) rep of a - geometry. Still need to do this for ST_AsKML etc. that Olivier - just put in. + * [r4540] Put in overload text for ST_AsText and ST_AsBinary to + prevent the function .. is not unique when passing in text + (unknown) rep of a geometry. Still need to do this for ST_AsKML + etc. that Olivier just put in. -2009-09-29 07:45 colivier +2009-09-29 07:45 Olivier Courtin <olivier.courtin@camptocamp.com> - * Update documentation related to geography typmod export functions - (r4535, r4536) + * [r4539] Update documentation related to geography typmod export + functions (r4535, r4536) -2009-09-29 06:34 robe +2009-09-29 06:34 Regina Obe <lr@pcorp.us> - * Add a new special index section to collect functions that take as - input or output geography data type. Also give pretty anchor to - PostGIS Geography section + * [r4538] Add a new special index section to collect functions that + take as input or output geography data type. Also give pretty + anchor to PostGIS Geography section -2009-09-28 22:45 pramsey +2009-09-28 22:45 Paul Ramsey <pramsey@cleverelephant.ca> - * Test re-org and first cut at edge intersection. + * [r4537] Test re-org and first cut at edge intersection. -2009-09-28 18:31 colivier +2009-09-28 18:31 Olivier Courtin <olivier.courtin@camptocamp.com> - * A forgot prototype in ST_AsGeoJson export function + * [r4536] A forgot prototype in ST_AsGeoJson export function -2009-09-28 18:16 colivier +2009-09-28 18:16 Olivier Courtin <olivier.courtin@camptocamp.com> - * Add geography typmod support for export functions (ST_AsGML, - ST_AsGeoJson, ST_KML, St_AsSVG). Create lwgeom_export.c and - lwgeom_export.h to factorize common export functions routines. + * [r4535] Add geography typmod support for export functions + (ST_AsGML, ST_AsGeoJson, ST_KML, St_AsSVG). Create + lwgeom_export.c and lwgeom_export.h to factorize common export + functions routines. -2009-09-25 13:32 robe +2009-09-25 13:32 Regina Obe <lr@pcorp.us> - * remove regex.h include per Nicklas observation its still in - there. + * [r4533] remove regex.h include per Nicklas observation its still + in there. -2009-09-23 18:15 pramsey +2009-09-23 18:15 Paul Ramsey <pramsey@cleverelephant.ca> - * Add SQL def'n for geography_analyze function. + * [r4532] Add SQL def'n for geography_analyze function. -2009-09-23 16:11 robe +2009-09-23 16:11 Regina Obe <lr@pcorp.us> - * another typo + * [r4531] another typo -2009-09-22 21:56 robe +2009-09-22 21:56 Regina Obe <lr@pcorp.us> - * missing spots for geography.sql and postgis_comments.sql + * [r4530] missing spots for geography.sql and postgis_comments.sql -2009-09-22 21:53 robe +2009-09-22 21:53 Regina Obe <lr@pcorp.us> - * correct typo + * [r4529] correct typo -2009-09-22 21:14 robe +2009-09-22 21:14 Regina Obe <lr@pcorp.us> - * start putting in geography functions + * [r4528] start putting in geography functions -2009-09-22 13:38 mcayland +2009-09-22 13:38 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Commit fix to LW_ABS() macro as discovered by Nicklas Aven. + * [r4527] Commit fix to LW_ABS() macro as discovered by Nicklas + Aven. -2009-09-22 13:09 mcayland +2009-09-22 13:09 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Add the basic machinery to call a function when running VACUUM - ANALYZE on a geography column - the more interesting parts are - yet to come ;) + * [r4526] Add the basic machinery to call a function when running + VACUUM ANALYZE on a geography column - the more interesting parts + are yet to come ;) -2009-09-22 12:27 robe +2009-09-22 12:27 Regina Obe <lr@pcorp.us> - * get rid of things like invalid coords for 4326 space tripping up - geography testing. + * [r4525] get rid of things like invalid coords for 4326 space + tripping up geography testing. -2009-09-22 11:53 mcayland +2009-09-22 11:53 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Oops - forgot to bump the array indices on the last commit :( + * [r4524] Oops - forgot to bump the array indices on the last + commit :( -2009-09-22 11:27 robe +2009-09-22 11:27 Regina Obe <lr@pcorp.us> - * Update installation to include geography.sql (yikes we still had - install lwpostgis.sql -- no wonder people are so confused). Also - upped required to 8.3 + * [r4523] Update installation to include geography.sql (yikes we + still had install lwpostgis.sql -- no wonder people are so + confused). Also upped required to 8.3 -2009-09-22 11:23 robe +2009-09-22 11:23 Regina Obe <lr@pcorp.us> - * cut in Paul's geography.txt into the official docs. Didn't notice - it before :(. We might need a whole new chapter for this to do it - justice but will deal with formatting later. + * [r4522] cut in Paul's geography.txt into the official docs. + Didn't notice it before :(. We might need a whole new chapter for + this to do it justice but will deal with formatting later. -2009-09-22 11:23 mcayland +2009-09-22 11:23 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Add missing geometry(m)(z) type missing from previous commit. + * [r4521] Add missing geometry(m)(z) type missing from previous + commit. -2009-09-22 11:13 mcayland +2009-09-22 11:13 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Remove dependency on regex library by implementing the same - functionality using standard C functions. Passes regression tests - for me. + * [r4520] Remove dependency on regex library by implementing the + same functionality using standard C functions. Passes regression + tests for me. -2009-09-22 00:06 pramsey +2009-09-22 00:06 Paul Ramsey <pramsey@cleverelephant.ca> - * Change signatures to use fewer pointers. + * [r4519] Change signatures to use fewer pointers. -2009-09-21 10:57 mcayland +2009-09-21 10:57 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Update LWDEBUG(F)/POSTGIS_DEBUG(F) macro debug levels to follow - the standard in postgis/DEBUG. + * [r4518] Update LWDEBUG(F)/POSTGIS_DEBUG(F) macro debug levels to + follow the standard in postgis/DEBUG. -2009-09-21 10:50 mcayland +2009-09-21 10:50 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Change macros to use capitalised names, as per standard C + * [r4517] Change macros to use capitalised names, as per standard C convention. This means it is possible at a glance to determine what is a macro and what is a function. -2009-09-20 08:15 robe +2009-09-20 08:15 Regina Obe <lr@pcorp.us> - * fix typos and redundant things + * [r4516] fix typos and redundant things -2009-09-20 08:10 robe +2009-09-20 08:10 Regina Obe <lr@pcorp.us> - * flag some operators that support geography, put in logic to test - for geography marked functions + * [r4515] flag some operators that support geography, put in logic + to test for geography marked functions -2009-09-20 07:50 robe +2009-09-20 07:50 Regina Obe <lr@pcorp.us> - * + * [r4514] -2009-09-20 07:45 robe +2009-09-20 07:45 Regina Obe <lr@pcorp.us> - * Make slot for geography data type and start filling in details + * [r4513] Make slot for geography data type and start filling in + details -2009-09-18 14:53 pramsey +2009-09-18 14:53 Paul Ramsey <pramsey@cleverelephant.ca> - * Clean up tests so they pass quietly. (#249) + * [r4512] Clean up tests so they pass quietly. (#249) -2009-09-18 14:10 robe +2009-09-18 14:10 Regina Obe <lr@pcorp.us> - * #250: Fix to get mingw to compile using conditional -lregex + * [r4511] #250: Fix to get mingw to compile using conditional + -lregex Had to change configure.ac too so -lregex is not put in if its built-in. -2009-09-17 15:44 robe +2009-09-17 15:44 Regina Obe <lr@pcorp.us> - * Revise garden test to include testing for creating geography - types. Still needs a bit more work. Also discovered more crashers - to put in bug list (not all related to geography) + * [r4510] Revise garden test to include testing for creating + geography types. Still needs a bit more work. Also discovered + more crashers to put in bug list (not all related to geography) -2009-09-17 05:57 pramsey +2009-09-17 05:57 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix serialization problem with lwgeoms that have bboxes. + * [r4509] Fix serialization problem with lwgeoms that have bboxes. -2009-09-17 05:33 pramsey +2009-09-17 05:33 Paul Ramsey <pramsey@cleverelephant.ca> - * Clean up gbox serialization a little + * [r4508] Clean up gbox serialization a little -2009-09-17 02:33 pramsey +2009-09-17 02:33 Paul Ramsey <pramsey@cleverelephant.ca> - * Add lwgeom_is_empty() test + * [r4507] Add lwgeom_is_empty() test -2009-09-17 00:01 pramsey +2009-09-17 00:01 Paul Ramsey <pramsey@cleverelephant.ca> - * Work on tracking down bug in casting geometry->geography + * [r4506] Work on tracking down bug in casting geometry->geography -2009-09-16 22:43 pramsey +2009-09-16 22:43 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix some test cases crossing the date line + * [r4505] Fix some test cases crossing the date line -2009-09-16 21:09 pramsey +2009-09-16 21:09 Paul Ramsey <pramsey@cleverelephant.ca> - * Add gbox string constructor for testing purposes + * [r4504] Add gbox string constructor for testing purposes -2009-09-16 20:19 pramsey +2009-09-16 20:19 Paul Ramsey <pramsey@cleverelephant.ca> - * More tests pass + * [r4503] More tests pass -2009-09-16 18:54 pramsey +2009-09-16 18:54 Paul Ramsey <pramsey@cleverelephant.ca> - * Change back to less intensive cartesian clairaut + * [r4502] Change back to less intensive cartesian clairaut -2009-09-16 18:50 pramsey +2009-09-16 18:50 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix errors in calculating geocentric bounds. Early test cases now - pass! + * [r4501] Fix errors in calculating geocentric bounds. Early test + cases now pass! -2009-09-15 21:21 pramsey +2009-09-15 21:21 Paul Ramsey <pramsey@cleverelephant.ca> - * Hook geocentric calculation into gbox routines, start testing + * [r4500] Hook geocentric calculation into gbox routines, start + testing -2009-09-15 19:50 pramsey +2009-09-15 19:50 Paul Ramsey <pramsey@cleverelephant.ca> - * Geocentric bounding box roughed in and compiles. + * [r4499] Geocentric bounding box roughed in and compiles. -2009-09-14 20:30 pramsey +2009-09-14 20:30 Paul Ramsey <pramsey@cleverelephant.ca> - * Start the geodetic machinery. Add an internal API header for - eventual API rationalisation + * [r4498] Start the geodetic machinery. Add an internal API header + for eventual API rationalisation -2009-09-14 18:33 pramsey +2009-09-14 18:33 Paul Ramsey <pramsey@cleverelephant.ca> - * Crib index penalty tweak from pgsphere. + * [r4497] Crib index penalty tweak from pgsphere. -2009-09-14 18:15 pramsey +2009-09-14 18:15 Paul Ramsey <pramsey@cleverelephant.ca> - * Add FP_EQUALS and bracket arguments for a little extra safety + * [r4496] Add FP_EQUALS and bracket arguments for a little extra + safety -2009-09-14 17:01 kneufeld +2009-09-14 17:01 Kevin Neufeld <kneufeld.ca@gmail.com> - * fix for POPULATE_GEOMETRY_COLUMNS - remove hard-coded "public" - schema references. + * [r4495] fix for POPULATE_GEOMETRY_COLUMNS - remove hard-coded + "public" schema references. -2009-09-14 10:54 mcayland +2009-09-14 10:54 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Merge Paul's geodetic (geography) branch into trunk, as per - discussions on postgis-devel. Most of the merge was automatic + * [r4494] Merge Paul's geodetic (geography) branch into trunk, as + per discussions on postgis-devel. Most of the merge was automatic (albeit quite slow), with a few manual touch-ups where the merge algorithm couldn't handle this automatically. "make check" runs and passes, so I hope I haven't managed to break too much ;) -2009-09-12 04:01 robe +2009-09-12 04:01 Regina Obe <lr@pcorp.us> - * formatting cleanup + * [r4493] formatting cleanup -2009-09-12 03:43 robe +2009-09-12 03:43 Regina Obe <lr@pcorp.us> - * Add more line crossings. change tab to 4 spaces + * [r4492] Add more line crossings. change tab to 4 spaces -2009-09-12 03:12 robe +2009-09-12 03:12 Regina Obe <lr@pcorp.us> - * define new styles mediumline and use those + * [r4491] define new styles mediumline and use those -2009-09-11 21:24 robe +2009-09-11 21:24 Regina Obe <lr@pcorp.us> - * add new st_linecrossing graphic, experiment with new style, put - in informal table + * [r4484] add new st_linecrossing graphic, experiment with new + style, put in informal table -2009-09-11 12:40 robe +2009-09-11 12:40 Regina Obe <lr@pcorp.us> - * incomplete finish later + * [r4480] incomplete finish later -2009-09-11 12:26 robe +2009-09-11 12:26 Regina Obe <lr@pcorp.us> - * make arrow and start separate to see if it shows better + * [r4479] make arrow and start separate to see if it shows better -2009-09-11 06:04 robe +2009-09-11 06:04 Regina Obe <lr@pcorp.us> - * revise example so scales well on 200 x 200 grid + * [r4478] revise example so scales well on 200 x 200 grid -2009-09-11 03:19 kneufeld +2009-09-11 03:19 Kevin Neufeld <kneufeld.ca@gmail.com> - * added a few comments to aid in image generation. + * [r4477] added a few comments to aid in image generation. -2009-09-10 06:34 robe +2009-09-10 06:34 Regina Obe <lr@pcorp.us> - * round digits + * [r4475] round digits -2009-09-10 06:19 robe +2009-09-10 06:19 Regina Obe <lr@pcorp.us> - * + * [r4474] -2009-09-10 05:56 robe +2009-09-10 05:56 Regina Obe <lr@pcorp.us> - * try geometry collection instead + * [r4473] try geometry collection instead -2009-09-10 05:54 robe +2009-09-10 05:54 Regina Obe <lr@pcorp.us> - * + * [r4472] -2009-09-10 05:39 robe +2009-09-10 05:39 Regina Obe <lr@pcorp.us> - * typo in makefile + * [r4471] typo in makefile -2009-09-10 05:27 robe +2009-09-10 05:27 Regina Obe <lr@pcorp.us> - * first attempt at figure for st_linecrossingdirection. Also query - correction. + * [r4470] first attempt at figure for st_linecrossingdirection. + Also query correction. -2009-09-10 04:10 robe +2009-09-10 04:10 Regina Obe <lr@pcorp.us> - * figure for st_line_substring + * [r4468] figure for st_line_substring -2009-09-10 04:03 robe +2009-09-10 04:03 Regina Obe <lr@pcorp.us> - * figure of st_line_interpolate_point + * [r4467] figure of st_line_interpolate_point -2009-09-08 06:09 robe +2009-09-08 06:09 Regina Obe <lr@pcorp.us> - * better fit example + * [r4451] better fit example -2009-09-08 05:28 robe +2009-09-08 05:28 Regina Obe <lr@pcorp.us> - * typos + * [r4450] typos -2009-09-08 05:24 robe +2009-09-08 05:24 Regina Obe <lr@pcorp.us> - * forgot wkt + * [r4449] forgot wkt -2009-09-08 05:24 robe +2009-09-08 05:24 Regina Obe <lr@pcorp.us> - * figure for minimum bounding circle + * [r4448] figure for minimum bounding circle -2009-09-05 17:31 robe +2009-09-05 17:31 Regina Obe <lr@pcorp.us> - * Some wording changes and addition of figure for st_difference + * [r4446] Some wording changes and addition of figure for + st_difference -2009-09-05 17:11 robe +2009-09-05 17:11 Regina Obe <lr@pcorp.us> - * formatting change + * [r4445] formatting change -2009-09-05 16:55 robe +2009-09-05 16:55 Regina Obe <lr@pcorp.us> - * add figures for st_symdifference and slight update on + * [r4444] add figures for st_symdifference and slight update on st_convexhull -2009-09-04 18:43 kneufeld +2009-09-04 18:43 Kevin Neufeld <kneufeld.ca@gmail.com> - * added images as a requirement to the chunked-html target + * [r4443] added images as a requirement to the chunked-html target -2009-09-04 18:24 kneufeld +2009-09-04 18:24 Kevin Neufeld <kneufeld.ca@gmail.com> - * made the 'images' a requirement for pdf generation + * [r4442] made the 'images' a requirement for pdf generation changed the background of the generated images to white instead of being transparent. -2009-09-01 18:57 robe +2009-09-01 18:57 Regina Obe <lr@pcorp.us> - * minor formatting + * [r4440] minor formatting -2009-09-01 18:34 robe +2009-09-01 18:34 Regina Obe <lr@pcorp.us> - * better convex hull example + * [r4439] better convex hull example -2009-08-28 19:10 robe +2009-08-28 19:10 Regina Obe <lr@pcorp.us> - * + * [r4438] -2009-08-28 18:58 robe +2009-08-28 18:58 Regina Obe <lr@pcorp.us> - * better visual convex hull + * [r4437] better visual convex hull -2009-08-28 18:38 robe +2009-08-28 18:38 Regina Obe <lr@pcorp.us> - * Put in image of ST_ConvexHull + * [r4436] Put in image of ST_ConvexHull -2009-08-28 17:41 robe +2009-08-28 17:41 Regina Obe <lr@pcorp.us> - * put in alpha order + * [r4434] put in alpha order -2009-08-28 17:32 robe +2009-08-28 17:32 Regina Obe <lr@pcorp.us> - * get rid of extra space + * [r4433] get rid of extra space -2009-08-28 17:23 robe +2009-08-28 17:23 Regina Obe <lr@pcorp.us> - * Make gaping hole more gaping, make code table 1 column instead of - 2 + * [r4432] Make gaping hole more gaping, make code table 1 column + instead of 2 -2009-08-28 16:44 robe +2009-08-28 16:44 Regina Obe <lr@pcorp.us> - * improve on st_buildarea code formatting + * [r4430] improve on st_buildarea code formatting -2009-08-28 15:37 kneufeld +2009-08-28 15:37 Kevin Neufeld <kneufeld.ca@gmail.com> - * Changing MULTIPOLYGON into several POLYGONs so the image + * [r4429] Changing MULTIPOLYGON into several POLYGONs so the image generating WKT parser doesn't fail. -2009-08-28 15:16 kneufeld +2009-08-28 15:16 Kevin Neufeld <kneufeld.ca@gmail.com> - * added a small How To section, referencing the wiki on how to - generate images used in the documentation. + * [r4428] added a small How To section, referencing the wiki on how + to generate images used in the documentation. -2009-08-28 12:03 robe +2009-08-28 12:03 Regina Obe <lr@pcorp.us> - * Add pictures for ST_BuildArea examples + * [r4427] Add pictures for ST_BuildArea examples -2009-08-28 11:34 robe +2009-08-28 11:34 Regina Obe <lr@pcorp.us> - * Commit jlivni documentation addition and update with minor - comment for PostgreSQL 8.4 users and notice about obsolete + * [r4425] Commit jlivni documentation addition and update with + minor comment for PostgreSQL 8.4 users and notice about obsolete settings. Also put in hyperlinks back to the current interactive version of PostgreSQL manual for each part. -2009-08-23 02:20 robe +2009-08-23 02:20 Regina Obe <lr@pcorp.us> - * change lwpostgis to postgis and example to show 1.5.0SVN + * [r4423] change lwpostgis to postgis and example to show 1.5.0SVN -2009-08-17 13:22 pramsey +2009-08-17 13:22 Paul Ramsey <pramsey@cleverelephant.ca> - * Initialize counter to ensure later test works (#239) + * [r4421] Initialize counter to ensure later test works (#239) -2009-08-17 13:19 pramsey +2009-08-17 13:19 Paul Ramsey <pramsey@cleverelephant.ca> - * Add comment and clearer information to fix for #239 + * [r4419] Add comment and clearer information to fix for #239 -2009-08-17 11:37 robe +2009-08-17 11:37 Regina Obe <lr@pcorp.us> - * revert order of availability. Revise xsl to pick up + * [r4417] revert order of availability. Revise xsl to pick up availabilities embedded in note tag -2009-08-17 11:29 robe +2009-08-17 11:29 Regina Obe <lr@pcorp.us> - * debugging why not showing in new section + * [r4416] debugging why not showing in new section -2009-08-17 02:59 pramsey +2009-08-17 02:59 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix for handling of empty geometrycollection in asssvg (#239) + * [r4415] Fix for handling of empty geometrycollection in asssvg + (#239) -2009-08-16 15:03 robe +2009-08-16 15:03 Regina Obe <lr@pcorp.us> - * update svg availability note + * [r4413] update svg availability note -2009-08-16 14:49 robe +2009-08-16 14:49 Regina Obe <lr@pcorp.us> - * Correct ST_AsSVG command to reflect introduction of L command + * [r4410] Correct ST_AsSVG command to reflect introduction of L + command -2009-08-16 05:34 robe +2009-08-16 05:34 Regina Obe <lr@pcorp.us> - * add null and empty geometry collection to garden variety geometry - list + * [r4409] add null and empty geometry collection to garden variety + geometry list -2009-08-16 05:29 robe +2009-08-16 05:29 Regina Obe <lr@pcorp.us> - * cast null to geometry + * [r4408] cast null to geometry -2009-08-16 05:09 robe +2009-08-16 05:09 Regina Obe <lr@pcorp.us> - * Version of garden test to allow selecting a subset of functions - to test. + * [r4407] Version of garden test to allow selecting a subset of + functions to test. -2009-08-16 04:41 robe +2009-08-16 04:41 Regina Obe <lr@pcorp.us> - * update ST_buffer (include buffer style in refpuprose so shows in - postgresql function descrip), + * [r4406] update ST_buffer (include buffer style in refpuprose so + shows in postgresql function descrip), update refpurpose of hausdorf and include useful links for more details -2009-08-13 00:37 mleslie +2009-08-13 00:37 Mark Leslie <mark.leslie@lisasoft.com> - * Removing accidental commit from r4366. + * [r4397] Removing accidental commit from r4366. -2009-08-11 16:38 strk +2009-08-11 16:38 Sandro Santilli <strk@keybit.net> - * Add ChangeLog.svn rule, and auxiliary authors file + * [r4383] Add ChangeLog.svn rule, and auxiliary authors file -2009-08-07 03:38 mleslie +2009-08-07 03:38 Mark Leslie <mark.leslie@lisasoft.com> - * Fix for ticket #234 + * [r4366] Fix for ticket #234 -2009-08-05 18:09 pramsey +2009-08-05 18:09 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove printfs from code. + * [r4350] Remove printfs from code. -2009-08-01 18:33 robe +2009-08-01 18:33 Regina Obe <lr@pcorp.us> - * update ST_Line_Locate ... with example of closest point. Asked - way too many times on postgis news groups + * [r4341] update ST_Line_Locate ... with example of closest point. + Asked way too many times on postgis news groups -2009-07-30 16:03 mcayland +2009-07-30 16:03 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Remove quotes from PATH in regression Makefile, as it seems that - the last MingW hack doesn't need this any more. + * [r4338] Remove quotes from PATH in regression Makefile, as it + seems that the last MingW hack doesn't need this any more. -2009-07-18 20:01 mcayland +2009-07-18 20:01 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix for Windows combining stdout/stderr when executing the - $(shell) command. + * [r4322] Fix for Windows combining stdout/stderr when executing + the $(shell) command. -2009-07-18 19:01 mcayland +2009-07-18 19:01 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Apply fix to allow regression tests to run on MingW by fixing - PATH and removing trailing CR/LFs on some outputs. + * [r4321] Apply fix to allow regression tests to run on MingW by + fixing PATH and removing trailing CR/LFs on some outputs. -2009-07-18 18:45 mcayland +2009-07-18 18:45 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix regression regex listings so that the newer "LINE n:" lines - and lines containing just a position indicator (^) introduced in - PostgreSQL 8.4 are removed from the regression output. + * [r4319] Fix regression regex listings so that the newer "LINE n:" + lines and lines containing just a position indicator (^) + introduced in PostgreSQL 8.4 are removed from the regression + output. -2009-07-16 21:32 mcayland +2009-07-16 21:32 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Move SERIALIZED_FORM to lwgeom_pg.h from liblwgeom.h since it - references a PostgreSQL-only structure. Per report from Nicklas - Aven. + * [r4310] Move SERIALIZED_FORM to lwgeom_pg.h from liblwgeom.h + since it references a PostgreSQL-only structure. Per report from + Nicklas Aven. -2009-07-16 21:26 mcayland +2009-07-16 21:26 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Commit patch for missing lw_asprintf() from #222. + * [r4308] Commit patch for missing lw_asprintf() from #222. -2009-07-13 17:27 pramsey +2009-07-13 17:27 Paul Ramsey <pramsey@cleverelephant.ca> - * MinGW fix for loader (#222), Mark Cave-Ayland + * [r4293] MinGW fix for loader (#222), Mark Cave-Ayland -2009-07-13 16:57 pramsey +2009-07-13 16:57 Paul Ramsey <pramsey@cleverelephant.ca> - * ignore copied version of postgis.sql + * [r4292] ignore copied version of postgis.sql -2009-07-13 16:57 pramsey +2009-07-13 16:57 Paul Ramsey <pramsey@cleverelephant.ca> - * ignore generated images + * [r4291] ignore generated images -2009-07-08 22:43 robe +2009-07-08 22:43 Regina Obe <lr@pcorp.us> - * Put in availability and GEOS for Hausdorff distance + * [r4287] Put in availability and GEOS for Hausdorff distance -2009-07-08 22:39 pramsey +2009-07-08 22:39 Paul Ramsey <pramsey@cleverelephant.ca> - * match header format + * [r4286] match header format -2009-07-08 16:27 strk +2009-07-08 16:27 Sandro Santilli <strk@keybit.net> - * Update instructions for testing (and moved that step *before* - install - finally!) + * [r4285] Update instructions for testing (and moved that step + *before* install - finally!) -2009-07-08 16:03 strk +2009-07-08 16:03 Sandro Santilli <strk@keybit.net> - * Pre-install check rule by Paul cleaned up to allow top-level run - and correct dependencies. See issue #219. + * [r4284] Pre-install check rule by Paul cleaned up to allow + top-level run and correct dependencies. See issue #219. -2009-07-08 15:28 pramsey +2009-07-08 15:28 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove images from clean target + * [r4283] Remove images from clean target -2009-07-08 15:16 pramsey +2009-07-08 15:16 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove CUnit dependency + * [r4280] Remove CUnit dependency -2009-07-08 15:15 pramsey +2009-07-08 15:15 Paul Ramsey <pramsey@cleverelephant.ca> - * clean doc images as part of clean + * [r4279] clean doc images as part of clean -2009-07-08 15:09 pramsey +2009-07-08 15:09 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix itglish. + * [r4278] Fix itglish. -2009-07-08 04:59 mcayland +2009-07-08 04:59 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix #112: ST_CurveToLine sometimes crashes server. While the - circle segmentiser detected colinear circle points, it didn't + * [r4272] Fix #112: ST_CurveToLine sometimes crashes server. While + the circle segmentiser detected colinear circle points, it didn't check for the NULL pointer returned in this case. Since we are converting to a line, the current behaviour is to simply append the circle points as s tandard line points. -2009-07-08 04:48 mcayland +2009-07-08 04:48 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix #183: ST_LineToCurve gives getPoint4d_p offset error. This - was due to the lookahead in the curve segmentising code going off - the end of the point array. + * [r4270] Fix #183: ST_LineToCurve gives getPoint4d_p offset error. + This was due to the lookahead in the curve segmentising code + going off the end of the point array. -2009-07-08 00:20 pramsey +2009-07-08 00:20 Paul Ramsey <pramsey@cleverelephant.ca> - * Change error message to be more relevant + * [r4268] Change error message to be more relevant -2009-07-07 15:44 strk +2009-07-07 15:44 Sandro Santilli <strk@keybit.net> - * It's "synonym", not "synonim"... + * [r4267] It's "synonym", not "synonim"... -2009-07-07 15:03 strk +2009-07-07 15:03 Sandro Santilli <strk@keybit.net> - * For buffer parameters: accept 'butt' as a synonim for 'flat', - 'miter' for 'mitre' and 'miter_limit' for 'mitre_limit'. + * [r4266] For buffer parameters: accept 'butt' as a synonim for + 'flat', 'miter' for 'mitre' and 'miter_limit' for 'mitre_limit'. -2009-07-07 13:18 strk +2009-07-07 13:18 Sandro Santilli <strk@keybit.net> - * Fix join style images to match calls + * [r4265] Fix join style images to match calls -2009-07-07 10:33 mcayland +2009-07-07 10:33 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix compile problems on non-GNU systems by using va_copy as an - alias onto the real version. Per report from Stefano Bonnin. + * [r4264] Fix compile problems on non-GNU systems by using va_copy + as an alias onto the real version. Per report from Stefano + Bonnin. -2009-07-06 16:07 strk +2009-07-06 16:07 Sandro Santilli <strk@keybit.net> - * Don't use strtok_r, to help with MingW builds. + * [r4262] Don't use strtok_r, to help with MingW builds. -2009-07-06 07:37 robe +2009-07-06 07:37 Regina Obe <lr@pcorp.us> - * forgot to save last change + * [r4261] forgot to save last change -2009-07-06 07:37 robe +2009-07-06 07:37 Regina Obe <lr@pcorp.us> - * slight correction + * [r4260] slight correction -2009-07-06 07:33 robe +2009-07-06 07:33 Regina Obe <lr@pcorp.us> - * Update style on commenting required to be picked up by doxygen + * [r4259] Update style on commenting required to be picked up by + doxygen -2009-07-05 21:41 mcayland +2009-07-05 21:41 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Alter loader Makefile to include PGXS so that we can extract - DESTDIR to use for the location for shp2pgsql/pgsql2shp. Per - report from Devrim GÜNDÜZ. + * [r4258] Alter loader Makefile to include PGXS so that we can + extract DESTDIR to use for the location for shp2pgsql/pgsql2shp. + Per report from Devrim GÜNDÜZ. -2009-07-03 07:21 robe +2009-07-03 07:21 Regina Obe <lr@pcorp.us> - * update st_pointn to note it supports circular strings and curves + * [r4255] update st_pointn to note it supports circular strings and + curves -2009-07-03 04:57 kneufeld +2009-07-03 04:57 Kevin Neufeld <kneufeld.ca@gmail.com> - * removed the images used in the documentation since these are now - generated automatically using ImageMagick. + * [r4254] removed the images used in the documentation since these + are now generated automatically using ImageMagick. -2009-07-03 04:56 kneufeld +2009-07-03 04:56 Kevin Neufeld <kneufeld.ca@gmail.com> - * updated the doc's README file + * [r4253] updated the doc's README file made "images" a target to "all" so the images get automatically generated when calling make with no parameters. -2009-07-02 16:57 pramsey +2009-07-02 16:57 Paul Ramsey <pramsey@cleverelephant.ca> - * Add SQL/MM item + * [r4252] Add SQL/MM item -2009-07-02 16:31 pramsey +2009-07-02 16:31 Paul Ramsey <pramsey@cleverelephant.ca> - * Build doc images as part of distribution build. + * [r4250] Build doc images as part of distribution build. -2009-07-02 16:29 pramsey +2009-07-02 16:29 Paul Ramsey <pramsey@cleverelephant.ca> - * add generator to ignore + * [r4249] add generator to ignore -2009-07-02 16:00 pramsey +2009-07-02 16:00 Paul Ramsey <pramsey@cleverelephant.ca> - * more notes on requirements + * [r4248] more notes on requirements -2009-07-02 08:31 mleslie +2009-07-02 08:31 Mark Leslie <mark.leslie@lisasoft.com> - * Making the changes from r4244 and r4245 onto trunk, addressing - ticket 212. + * [r4246] Making the changes from r4244 and r4245 onto trunk, + addressing ticket 212. -2009-07-01 16:56 pramsey +2009-07-01 16:56 Paul Ramsey <pramsey@cleverelephant.ca> - * Bring this up to date. + * [r4243] Bring this up to date. -2009-07-01 15:42 pramsey +2009-07-01 15:42 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix bad memory access in aggregates on nulls (#210), Mark + * [r4238] Fix bad memory access in aggregates on nulls (#210), Mark Cave-Ayland. -2009-07-01 12:30 robe +2009-07-01 12:30 Regina Obe <lr@pcorp.us> - * arg should be text not string for st_buffer + * [r4236] arg should be text not string for st_buffer -2009-07-01 11:53 robe +2009-07-01 11:53 Regina Obe <lr@pcorp.us> - * amend documentation on curved support to include new compound - curve in curve polygon support. + * [r4234] amend documentation on curved support to include new + compound curve in curve polygon support. -2009-06-30 07:46 mleslie +2009-06-30 07:46 Mark Leslie <mark.leslie@lisasoft.com> - * Enabling the compound curve parsing for segmentisation; reported - in ticket 213 + * [r4232] Enabling the compound curve parsing for segmentisation; + reported in ticket 213 -2009-06-30 07:35 mleslie +2009-06-30 07:35 Mark Leslie <mark.leslie@lisasoft.com> - * First swing at ticket 212. + * [r4231] First swing at ticket 212. -2009-06-26 13:43 robe +2009-06-26 13:43 Regina Obe <lr@pcorp.us> - * slight correction some functions are not new but enhanced + * [r4227] slight correction some functions are not new but enhanced -2009-06-26 13:33 robe +2009-06-26 13:33 Regina Obe <lr@pcorp.us> - * change ST_Buffer argname from params to buffer_style_params so - torture test can eventually properly exercise it and not feed it - garbage params + * [r4225] change ST_Buffer argname from params to + buffer_style_params so torture test can eventually properly + exercise it and not feed it garbage params -2009-06-26 13:30 robe +2009-06-26 13:30 Regina Obe <lr@pcorp.us> - * update ST_Buffer so appears in new in PostGIS 1.5 section + * [r4224] update ST_Buffer so appears in new in PostGIS 1.5 section -2009-06-26 13:22 robe +2009-06-26 13:22 Regina Obe <lr@pcorp.us> - * try to fix hudson build error + * [r4223] try to fix hudson build error -2009-06-26 12:43 robe +2009-06-26 12:43 Regina Obe <lr@pcorp.us> - * Update special index to include a what is new in 1.5 section + * [r4222] Update special index to include a what is new in 1.5 + section -2009-06-26 09:35 mcayland +2009-06-26 09:35 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Unbreak the PostGIS universe for people who aren't using GEOS SVN - (will be 3.2). + * [r4218] Unbreak the PostGIS universe for people who aren't using + GEOS SVN (will be 3.2). -2009-06-25 12:01 strk +2009-06-25 12:01 Sandro Santilli <strk@keybit.net> - * Put queries right below the diagram showing them + * [r4217] Put queries right below the diagram showing them -2009-06-25 12:00 strk +2009-06-25 12:00 Sandro Santilli <strk@keybit.net> - * Make quad_segs images style consistent with others; add original - point + * [r4216] Make quad_segs images style consistent with others; add + original point -2009-06-25 11:19 strk +2009-06-25 11:19 Sandro Santilli <strk@keybit.net> - * Add more styled buffer example images and update reference manual - to include them + * [r4215] Add more styled buffer example images and update + reference manual to include them -2009-06-25 10:57 strk +2009-06-25 10:57 Sandro Santilli <strk@keybit.net> - * Use thin link style for source linestring + * [r4214] Use thin link style for source linestring -2009-06-25 08:16 strk +2009-06-25 08:16 Sandro Santilli <strk@keybit.net> - * Add examples of different encdap styles + * [r4213] Add examples of different encdap styles -2009-06-25 07:34 strk +2009-06-25 07:34 Sandro Santilli <strk@keybit.net> - * Add item for parametrized buffers + * [r4212] Add item for parametrized buffers -2009-06-25 03:32 robe +2009-06-25 03:32 Regina Obe <lr@pcorp.us> - * More cleanup of code comments so function descriptions are picked - up by doxygen + * [r4211] More cleanup of code comments so function descriptions + are picked up by doxygen -2009-06-25 03:03 robe +2009-06-25 03:03 Regina Obe <lr@pcorp.us> - * fix commenting style so function descriptions are picked up by - doxygen + * [r4210] fix commenting style so function descriptions are picked + up by doxygen -2009-06-24 22:09 pramsey +2009-06-24 22:09 Paul Ramsey <pramsey@cleverelephant.ca> - * Add news item for #206 + * [r4209] Add news item for #206 -2009-06-24 22:08 pramsey +2009-06-24 22:08 Paul Ramsey <pramsey@cleverelephant.ca> - * Add support for hausdorff distance calculations. Requires GEOS - 3.2+. (#209) From Vincent Picavet. + * [r4208] Add support for hausdorff distance calculations. Requires + GEOS 3.2+. (#209) From Vincent Picavet. If you are working off of GEOS trunk, svn up, compile and install! -2009-06-24 17:10 strk +2009-06-24 17:10 Sandro Santilli <strk@keybit.net> - * Add uninstall lines for new buffer signatures + * [r4207] Add uninstall lines for new buffer signatures -2009-06-24 13:32 strk +2009-06-24 13:32 Sandro Santilli <strk@keybit.net> - * Add tests for parametrized buffer + * [r4206] Add tests for parametrized buffer -2009-06-24 13:04 strk +2009-06-24 13:04 Sandro Santilli <strk@keybit.net> - * Document third ST_Buffer signature (the one taking parameters as - string). + * [r4205] Document third ST_Buffer signature (the one taking + parameters as string). -2009-06-24 11:18 mcayland +2009-06-24 11:18 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Remove validation from shapefile to WKT/WKB conversion to retain - same behaviour as 1.3. Final resolution for #198. + * [r4203] Remove validation from shapefile to WKT/WKB conversion to + retain same behaviour as 1.3. Final resolution for #198. -2009-06-24 10:44 mcayland +2009-06-24 10:44 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix accidental typo; module name hardcoded in the .sql.in.c file - rather than being set to MODULE_PATHNAME. Fixes #208. + * [r4200] Fix accidental typo; module name hardcoded in the + .sql.in.c file rather than being set to MODULE_PATHNAME. Fixes + #208. -2009-06-24 10:34 strk +2009-06-24 10:34 Sandro Santilli <strk@keybit.net> - * Use $$ quoting. See ticket #207. + * [r4199] Use $$ quoting. See ticket #207. -2009-06-23 22:40 strk +2009-06-23 22:40 Sandro Santilli <strk@keybit.net> - * Add _ST_Buffer(geom, distance, params); refactor other versions - to all proxy to the new one. + * [r4198] Add _ST_Buffer(geom, distance, params); refactor other + versions to all proxy to the new one. -2009-06-23 20:57 pramsey +2009-06-23 20:57 Paul Ramsey <pramsey@cleverelephant.ca> - * Bump up to 1.5 in trunk + * [r4195] Bump up to 1.5 in trunk -2009-06-23 16:46 strk +2009-06-23 16:46 Sandro Santilli <strk@keybit.net> - * Fix dangerous use of message string as printf-like format. + * [r4193] Fix dangerous use of message string as printf-like + format. -2009-06-23 16:38 strk +2009-06-23 16:38 Sandro Santilli <strk@keybit.net> - * Yet another buffer auto-cast test. With a different quadSegs this - time to be really sure the argument is being used. + * [r4192] Yet another buffer auto-cast test. With a different + quadSegs this time to be really sure the argument is being used. -2009-06-23 16:36 strk +2009-06-23 16:36 Sandro Santilli <strk@keybit.net> - * Add test for third argument to buffer() being a string (based on - auto-cast) + * [r4191] Add test for third argument to buffer() being a string + (based on auto-cast) -2009-06-22 03:12 robe +2009-06-22 03:12 Regina Obe <lr@pcorp.us> - * Put in minimal GEOS requirement for ST_Covers and ST_CoveredBy. - Its not necessary for 1.4 really but oh well. + * [r4190] Put in minimal GEOS requirement for ST_Covers and + ST_CoveredBy. Its not necessary for 1.4 really but oh well. -2009-06-20 22:13 strk +2009-06-20 22:13 Sandro Santilli <strk@keybit.net> - * Gracefully handle typed empty GEOS geometries. + * [r4189] Gracefully handle typed empty GEOS geometries. -2009-06-20 21:26 strk +2009-06-20 21:26 Sandro Santilli <strk@keybit.net> - * Add tests for area() called against empty geometries + * [r4188] Add tests for area() called against empty geometries -2009-06-20 21:25 strk +2009-06-20 21:25 Sandro Santilli <strk@keybit.net> - * Handle empty polygon rings + * [r4187] Handle empty polygon rings -2009-06-19 17:12 robe +2009-06-19 17:12 Regina Obe <lr@pcorp.us> - * get rid of ref_geom so doesn't break agg checks + * [r4185] get rid of ref_geom so doesn't break agg checks -2009-06-19 15:13 robe +2009-06-19 15:13 Regina Obe <lr@pcorp.us> - * test not handling aggregates right + * [r4184] test not handling aggregates right -2009-06-19 14:18 robe +2009-06-19 14:18 Regina Obe <lr@pcorp.us> - * typo in docs -- + * [r4183] typo in docs -- -2009-06-19 12:20 robe +2009-06-19 12:20 Regina Obe <lr@pcorp.us> - * fix type and add --with-gui description for building loader gui + * [r4182] fix type and add --with-gui description for building + loader gui -2009-06-16 15:53 robe +2009-06-16 15:53 Regina Obe <lr@pcorp.us> - * Forgot ST_MinimumBoundingCircle and credit Bruce Rindahl + * [r4175] Forgot ST_MinimumBoundingCircle and credit Bruce Rindahl -2009-06-15 17:48 pramsey +2009-06-15 17:48 Paul Ramsey <pramsey@cleverelephant.ca> - * More updates + * [r4173] More updates -2009-06-15 17:42 pramsey +2009-06-15 17:42 Paul Ramsey <pramsey@cleverelephant.ca> - * Update doc instructions. + * [r4172] Update doc instructions. -2009-06-12 15:30 robe +2009-06-12 15:30 Regina Obe <lr@pcorp.us> - * replace _VOLATILE_STRICT with VOLATILE STRICT + * [r4170] replace _VOLATILE_STRICT with VOLATILE STRICT -2009-06-12 15:14 robe +2009-06-12 15:14 Regina Obe <lr@pcorp.us> - * Change _VOLATILE to VOLATILE + * [r4169] Change _VOLATILE to VOLATILE -2009-06-11 16:44 pramsey +2009-06-11 16:44 Paul Ramsey <pramsey@cleverelephant.ca> - * astyle --style=ansi --indent=tab (#133) + * [r4168] astyle --style=ansi --indent=tab (#133) -2009-06-11 16:31 pramsey +2009-06-11 16:31 Paul Ramsey <pramsey@cleverelephant.ca> - * remove file that should never have been added + * [r4167] remove file that should never have been added -2009-06-11 15:52 pramsey +2009-06-11 15:52 Paul Ramsey <pramsey@cleverelephant.ca> - * Clean up old compatibility code. (#196) + * [r4166] Clean up old compatibility code. (#196) -2009-06-11 13:28 mcayland +2009-06-11 13:28 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Further fix for #156, and also #167 it seems. Looks like I forgot - to apply the fix to the WKB routines aswell. + * [r4165] Further fix for #156, and also #167 it seems. Looks like + I forgot to apply the fix to the WKB routines aswell. -2009-06-10 14:51 robe +2009-06-10 14:51 Regina Obe <lr@pcorp.us> - * correct example + * [r4164] correct example -2009-06-10 01:26 robe +2009-06-10 01:26 Regina Obe <lr@pcorp.us> - * Add David Techer, new doco enhancements, new + * [r4162] Add David Techer, new doco enhancements, new populate_geometry_columns -2009-06-10 01:18 robe +2009-06-10 01:18 Regina Obe <lr@pcorp.us> - * Add Jean David Techer to list of contributors + * [r4161] Add Jean David Techer to list of contributors -2009-06-09 23:54 pramsey +2009-06-09 23:54 Paul Ramsey <pramsey@cleverelephant.ca> - * Update the hard upgrade script to handle 1.4 transition. (#144) + * [r4160] Update the hard upgrade script to handle 1.4 transition. + (#144) -2009-06-09 23:27 pramsey +2009-06-09 23:27 Paul Ramsey <pramsey@cleverelephant.ca> - * Closes (#134) + * [r4159] Closes (#134) -2009-06-09 22:51 pramsey +2009-06-09 22:51 Paul Ramsey <pramsey@cleverelephant.ca> - * More work on 1.4 upgrade script. + * [r4158] More work on 1.4 upgrade script. -2009-06-09 22:14 pramsey +2009-06-09 22:14 Paul Ramsey <pramsey@cleverelephant.ca> - * More fixes to upgrade process. + * [r4157] More fixes to upgrade process. -2009-06-08 23:21 pramsey +2009-06-08 23:21 Paul Ramsey <pramsey@cleverelephant.ca> - * Work on upgrade script. + * [r4156] Work on upgrade script. -2009-06-08 22:33 pramsey +2009-06-08 22:33 Paul Ramsey <pramsey@cleverelephant.ca> - * Turn "CREATE OR REPLACE FUNCTION" into "CREATEFUNCTION" for - preprocessing magic. + * [r4155] Turn "CREATE OR REPLACE FUNCTION" into "CREATEFUNCTION" + for preprocessing magic. -2009-06-08 22:30 pramsey +2009-06-08 22:30 Paul Ramsey <pramsey@cleverelephant.ca> - * remove syntax error + * [r4154] remove syntax error -2009-06-08 19:40 pramsey +2009-06-08 19:40 Paul Ramsey <pramsey@cleverelephant.ca> - * Updated to EPSG 7.1 version (#191) + * [r4153] Updated to EPSG 7.1 version (#191) -2009-06-08 17:35 robe +2009-06-08 17:35 Regina Obe <lr@pcorp.us> - * #190: populate_geometry_columns gives nonstandard use of \' in a - string literal in 8.4 + * [r4152] #190: populate_geometry_columns gives nonstandard use of + \' in a string literal in 8.4 -2009-06-06 14:09 mcayland +2009-06-06 14:09 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Add a new uninstall_postgis.sql file to the repository that will - enable the complete removal of PostGIS from a database. + * [r4147] Add a new uninstall_postgis.sql file to the repository + that will enable the complete removal of PostGIS from a database. -2009-06-04 15:29 robe +2009-06-04 15:29 Regina Obe <lr@pcorp.us> - * updated to make 8.2 minimum for Linux as well (its too confusing - to have minimum 8.2 for windows and not for Linux as well) + * [r4136] updated to make 8.2 minimum for Linux as well (its too + confusing to have minimum 8.2 for windows and not for Linux as + well) -2009-06-04 15:20 robe +2009-06-04 15:20 Regina Obe <lr@pcorp.us> - * change ReadME and installation to change minimum version from 8.1 - to 8.2 (not many people are running 8.1 and besides Paul already - put in a DROP AGG IF EXISTS in upgrade script -- so binds us to - 8.2+ already. Besides I don't think we should be supporting more - than 2 versions behind of latest PostgreSQL release in our trunk. - Too much maintenance. Correct ReadME bug tracker link + * [r4135] change ReadME and installation to change minimum version + from 8.1 to 8.2 (not many people are running 8.1 and besides Paul + already put in a DROP AGG IF EXISTS in upgrade script -- so binds + us to 8.2+ already. Besides I don't think we should be supporting + more than 2 versions behind of latest PostgreSQL release in our + trunk. Too much maintenance. Correct ReadME bug tracker link -2009-06-04 14:17 pramsey +2009-06-04 14:17 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix for #192. + * [r4134] Fix for #192. -2009-06-03 23:56 pramsey +2009-06-03 23:56 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix for issue #189, includes implicit requirement for 8.2+ in - DROP AGGREGATE + * [r4132] Fix for issue #189, includes implicit requirement for + 8.2+ in DROP AGGREGATE -2009-06-03 23:07 pramsey +2009-06-03 23:07 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix for issue #186 + * [r4131] Fix for issue #186 -2009-06-03 22:46 pramsey +2009-06-03 22:46 Paul Ramsey <pramsey@cleverelephant.ca> - * remove warnings from autoconf process + * [r4130] remove warnings from autoconf process -2009-05-29 18:10 kneufeld +2009-05-29 18:10 Kevin Neufeld <kneufeld.ca@gmail.com> - * small typo in Populate_Geometry_Columns doc + * [r4113] small typo in Populate_Geometry_Columns doc -2009-05-27 17:14 kneufeld +2009-05-27 17:14 Kevin Neufeld <kneufeld.ca@gmail.com> - * performed an overhaul of the installation guide ... hopefully - it's easier to follow. + * [r4111] performed an overhaul of the installation guide ... + hopefully it's easier to follow. -2009-05-26 18:35 kneufeld +2009-05-26 18:35 Kevin Neufeld <kneufeld.ca@gmail.com> - * updated the comments-install make target + * [r4110] updated the comments-install make target -2009-05-26 18:28 kneufeld +2009-05-26 18:28 Kevin Neufeld <kneufeld.ca@gmail.com> - * added version numbers to the requirements section in the + * [r4109] added version numbers to the requirements section in the installation doc. -2009-05-26 18:27 kneufeld +2009-05-26 18:27 Kevin Neufeld <kneufeld.ca@gmail.com> - * added dblatex and convert to the status lines at the end of - configure + * [r4108] added dblatex and convert to the status lines at the end + of configure -2009-05-26 18:10 kneufeld +2009-05-26 18:10 Kevin Neufeld <kneufeld.ca@gmail.com> - * added postgis_aggs_mm.xml to the 'make clean' target + * [r4107] added postgis_aggs_mm.xml to the 'make clean' target -2009-05-26 18:00 kneufeld +2009-05-26 18:00 Kevin Neufeld <kneufeld.ca@gmail.com> - * added postgis_comments.sql as a target to the main makefile + * [r4106] added postgis_comments.sql as a target to the main + makefile Since we don't want to add xsltproc as a dependency, this will remain separate for now: @@ -4185,700 +24020,707 @@ (the file should be removed by 'make uninstall') -2009-05-26 17:24 robe +2009-05-26 17:24 Regina Obe <lr@pcorp.us> - * make example fit the diagram in text + * [r4105] make example fit the diagram in text -2009-05-26 17:08 robe +2009-05-26 17:08 Regina Obe <lr@pcorp.us> - * Make lame circle more lame + * [r4104] Make lame circle more lame -2009-05-26 16:47 robe +2009-05-26 16:47 Regina Obe <lr@pcorp.us> - * put in images for buffer, fix within example image and example - query + * [r4103] put in images for buffer, fix within example image and + example query -2009-05-26 16:26 robe +2009-05-26 16:26 Regina Obe <lr@pcorp.us> - * for consistency make example be same as what is used to generate - the image. + * [r4102] for consistency make example be same as what is used to + generate the image. -2009-05-26 16:24 robe +2009-05-26 16:24 Regina Obe <lr@pcorp.us> - * bad image try again + * [r4101] bad image try again -2009-05-26 15:05 robe +2009-05-26 15:05 Regina Obe <lr@pcorp.us> - * Add st_within example to makefile and translate example so in - viewable region. + * [r4100] Add st_within example to makefile and translate example + so in viewable region. -2009-05-25 20:26 kneufeld +2009-05-25 20:26 Kevin Neufeld <kneufeld.ca@gmail.com> - * added a status line to the main makefile that indicates if - PostGIS was built successfully. + * [r4099] added a status line to the main makefile that indicates + if PostGIS was built successfully. -2009-05-24 07:52 robe +2009-05-24 07:52 Regina Obe <lr@pcorp.us> - * update to include behavior for 3D and also note this seems to go - beyond what the spec defines. + * [r4098] update to include behavior for 3D and also note this + seems to go beyond what the spec defines. -2009-05-22 23:22 kneufeld +2009-05-22 23:22 Kevin Neufeld <kneufeld.ca@gmail.com> - * use a docbook variable instead + * [r4097] use a docbook variable instead -2009-05-22 23:19 kneufeld +2009-05-22 23:19 Kevin Neufeld <kneufeld.ca@gmail.com> - * didn't need the c preprocessor after all + * [r4096] didn't need the c preprocessor after all -2009-05-22 22:14 kneufeld +2009-05-22 22:14 Kevin Neufeld <kneufeld.ca@gmail.com> - * Added a Short Version section. + * [r4095] Added a Short Version section. Updated requirements. -2009-05-22 22:07 kneufeld +2009-05-22 22:07 Kevin Neufeld <kneufeld.ca@gmail.com> - * formatted installation.xml in preparation for editing + * [r4094] formatted installation.xml in preparation for editing -2009-05-22 21:32 kneufeld +2009-05-22 21:32 Kevin Neufeld <kneufeld.ca@gmail.com> - * added the xmlformatter conf file for pretty printing the + * [r4093] added the xmlformatter conf file for pretty printing the documentation's xml files This will allow us to separate code changes from style changes in the docs. -2009-05-20 11:16 robe +2009-05-20 11:16 Regina Obe <lr@pcorp.us> - * Testing out Kevin's auto image generator hopefully I didn't break - it. + * [r4092] Testing out Kevin's auto image generator hopefully I + didn't break it. -2009-05-20 10:54 robe +2009-05-20 10:54 Regina Obe <lr@pcorp.us> - * Correct ST_GeometryN example -- sign was wrong. Also embellish by - showing a multicurve and flag as working for multicurves + * [r4091] Correct ST_GeometryN example -- sign was wrong. Also + embellish by showing a multicurve and flag as working for + multicurves -2009-05-19 20:49 kneufeld +2009-05-19 20:49 Kevin Neufeld <kneufeld.ca@gmail.com> - * added image examples to ST_Contains + * [r4089] added image examples to ST_Contains -2009-05-19 03:44 robe +2009-05-19 03:44 Regina Obe <lr@pcorp.us> - * Example exploding a compoundcurve, also reference to ST_GeometryN - since they serve similar purposes + * [r4085] Example exploding a compoundcurve, also reference to + ST_GeometryN since they serve similar purposes -2009-05-14 23:42 kneufeld +2009-05-14 23:42 Kevin Neufeld <kneufeld.ca@gmail.com> - * added styles to the generated documentation images + * [r4081] added styles to the generated documentation images added ImageMagick as a dependency -2009-05-09 12:53 mcayland +2009-05-09 12:53 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix #178: ST_XMax() and ST_YMax() return incorrect values. This - was caused by the fact that the min/max routines did not check - whether the result for each axis was actually the min or max, but - instead simply returned the structure value. Hence if an inverted - coordinate system were being used, the wrong value would be - returned. + * [r4079] Fix #178: ST_XMax() and ST_YMax() return incorrect + values. This was caused by the fact that the min/max routines did + not check whether the result for each axis was actually the min + or max, but instead simply returned the structure value. Hence if + an inverted coordinate system were being used, the wrong value + would be returned. -2009-05-09 12:34 mcayland +2009-05-09 12:34 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Remove a double-free bug caused if the unparser finds an invalid - geometry (fixes #168) + * [r4078] Remove a double-free bug caused if the unparser finds an + invalid geometry (fixes #168) -2009-05-09 11:46 mcayland +2009-05-09 11:46 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Correct erroneus formatting which was causing two comments to be - nested and hence generating a compiler warning. + * [r4077] Correct erroneus formatting which was causing two + comments to be nested and hence generating a compiler warning. -2009-05-06 23:32 kneufeld +2009-05-06 23:32 Kevin Neufeld <kneufeld.ca@gmail.com> - * removed horrible dos carriage returns + * [r4076] removed horrible dos carriage returns - convert to unix -2009-05-06 23:20 kneufeld +2009-05-06 23:20 Kevin Neufeld <kneufeld.ca@gmail.com> - * Added code that will automatically generate the spatial images - used in the documentation from WKT input. + * [r4075] Added code that will automatically generate the spatial + images used in the documentation from WKT input. -2009-05-06 18:11 robe +2009-05-06 18:11 Regina Obe <lr@pcorp.us> - * typo + * [r4073] typo -2009-05-06 18:04 robe +2009-05-06 18:04 Regina Obe <lr@pcorp.us> - * update with 1.3.6 items + * [r4072] update with 1.3.6 items -2009-05-05 19:40 pramsey +2009-05-05 19:40 Paul Ramsey <pramsey@cleverelephant.ca> - * Add 900913 to allow web mappers a smoother ride. + * [r4070] Add 900913 to allow web mappers a smoother ride. -2009-05-05 04:44 robe +2009-05-05 04:44 Regina Obe <lr@pcorp.us> - * doxygen friendly comments + * [r4069] doxygen friendly comments -2009-05-05 04:29 robe +2009-05-05 04:29 Regina Obe <lr@pcorp.us> - * doxygen friendly comments + * [r4068] doxygen friendly comments -2009-05-04 18:00 robe +2009-05-04 18:00 Regina Obe <lr@pcorp.us> - * more doxygen comment cleanup + * [r4064] more doxygen comment cleanup -2009-05-03 04:36 robe +2009-05-03 04:36 Regina Obe <lr@pcorp.us> - * slight mod + * [r4062] slight mod -2009-05-03 04:32 robe +2009-05-03 04:32 Regina Obe <lr@pcorp.us> - * make doco descriptions doxygen/javadoc friendly + * [r4061] make doco descriptions doxygen/javadoc friendly -2009-05-03 03:58 robe +2009-05-03 03:58 Regina Obe <lr@pcorp.us> - * make function doc doxygen friendly + * [r4060] make function doc doxygen friendly -2009-05-03 03:50 robe +2009-05-03 03:50 Regina Obe <lr@pcorp.us> - * make function descriptor doxygen friendly + * [r4059] make function descriptor doxygen friendly -2009-05-03 03:33 robe +2009-05-03 03:33 Regina Obe <lr@pcorp.us> - * enable alphabetical index + * [r4058] enable alphabetical index -2009-05-03 03:16 robe +2009-05-03 03:16 Regina Obe <lr@pcorp.us> - * change commenting style to javadoc style + * [r4057] change commenting style to javadoc style -2009-05-03 03:03 robe +2009-05-03 03:03 Regina Obe <lr@pcorp.us> - * enable javadoc autobrief + * [r4056] enable javadoc autobrief -2009-05-02 09:40 robe +2009-05-02 09:40 Regina Obe <lr@pcorp.us> - * make function descriptions doxygen friendly + * [r4054] make function descriptions doxygen friendly -2009-05-02 07:13 robe +2009-05-02 07:13 Regina Obe <lr@pcorp.us> - * make function descriptions doxygen friendly + * [r4053] make function descriptions doxygen friendly -2009-05-02 06:27 robe +2009-05-02 06:27 Regina Obe <lr@pcorp.us> - * Experimenting with Doxygen hyperlinking tags + * [r4052] Experimenting with Doxygen hyperlinking tags -2009-05-01 22:47 robe +2009-05-01 22:47 Regina Obe <lr@pcorp.us> - * More experimentation with doxygen commenting styles + * [r4051] More experimentation with doxygen commenting styles -2009-05-01 04:26 robe +2009-05-01 04:26 Regina Obe <lr@pcorp.us> - * More auto doc friendlying + * [r4049] More auto doc friendlying -2009-05-01 04:24 robe +2009-05-01 04:24 Regina Obe <lr@pcorp.us> - * typo + * [r4048] typo -2009-05-01 04:24 robe +2009-05-01 04:24 Regina Obe <lr@pcorp.us> - * experiment with making our inline comments more doxygen friendly + * [r4047] experiment with making our inline comments more doxygen + friendly -2009-04-30 22:26 kneufeld +2009-04-30 22:26 Kevin Neufeld <kneufeld.ca@gmail.com> - * updated several Doxygen parameters + * [r4045] updated several Doxygen parameters -2009-04-30 21:38 kneufeld +2009-04-30 21:38 Kevin Neufeld <kneufeld.ca@gmail.com> - * removed full path names from config file + * [r4044] removed full path names from config file -2009-04-30 20:19 kneufeld +2009-04-30 20:19 Kevin Neufeld <kneufeld.ca@gmail.com> - * add make target to build Doxygen + * [r4043] add make target to build Doxygen -2009-04-30 19:41 kneufeld +2009-04-30 19:41 Kevin Neufeld <kneufeld.ca@gmail.com> - * added a Doxygen configuration file + * [r4042] added a Doxygen configuration file -2009-04-29 19:22 kneufeld +2009-04-29 19:22 Kevin Neufeld <kneufeld.ca@gmail.com> - * dropping a table that's not there causes an ERROR in the logs + * [r4040] dropping a table that's not there causes an ERROR in the + logs - 8.1 does not support DROP TABLE IF EXISTS, so first test if the table is there, then drop it. -2009-04-28 19:13 colivier +2009-04-28 19:13 Olivier Courtin <olivier.courtin@camptocamp.com> - * Add a new option for ST_AsGML related to axis order, and lat lon - inversion in GML 3.1.1, cf #161. Add unit test on this new option - bit field. Update documentation. Fix also wrong option value in - ST_AsGML for CRS, and outdated example output (still for + * [r4039] Add a new option for ST_AsGML related to axis order, and + lat lon inversion in GML 3.1.1, cf #161. Add unit test on this + new option bit field. Update documentation. Fix also wrong option + value in ST_AsGML for CRS, and outdated example output (still for ST_AsGML). -2009-04-28 17:04 kneufeld +2009-04-28 17:04 Kevin Neufeld <kneufeld.ca@gmail.com> - * - removed a few compile errors from the javadoc build + * [r4038] - removed a few compile errors from the javadoc build - renamed jar so it follows the name-version convention -2009-04-27 22:07 robe +2009-04-27 22:07 Regina Obe <lr@pcorp.us> - * change error about unknown spatial ref to a warning. + * [r4034] change error about unknown spatial ref to a warning. -2009-04-27 19:46 kneufeld +2009-04-27 19:46 Kevin Neufeld <kneufeld.ca@gmail.com> - * test commit + * [r4030] test commit -2009-04-27 19:24 kneufeld +2009-04-27 19:24 Kevin Neufeld <kneufeld.ca@gmail.com> - * test commit + * [r4029] test commit -2009-04-27 19:07 kneufeld +2009-04-27 19:07 Kevin Neufeld <kneufeld.ca@gmail.com> - * Test commit to test autobuild + * [r4026] Test commit to test autobuild -2009-04-27 16:09 robe +2009-04-27 16:09 Regina Obe <lr@pcorp.us> - * revise to better guarantee a deteriministic sort so can diff - compare between 1.3.5, 1.3.6, 1.4 (still needs work). Also + * [r4025] revise to better guarantee a deteriministic sort so can + diff compare between 1.3.5, 1.3.6, 1.4 (still needs work). Also exclude curved tests and functions not supported in 1.3.5 since it curve crashes 1.3.5 thus making it not comparable. -2009-04-26 05:37 kneufeld +2009-04-26 05:37 Kevin Neufeld <kneufeld.ca@gmail.com> - * small typo fix + * [r4023] small typo fix -2009-04-24 19:13 pramsey +2009-04-24 19:13 Paul Ramsey <pramsey@cleverelephant.ca> - * add feature mangling task + * [r4020] add feature mangling task -2009-04-23 14:36 robe +2009-04-23 14:36 Regina Obe <lr@pcorp.us> - * exclude curved geometries from 1.3.5 testing + * [r4019] exclude curved geometries from 1.3.5 testing -2009-04-23 12:12 robe +2009-04-23 12:12 Regina Obe <lr@pcorp.us> - * Add ST_BdMPolyFromText to list not to test against 1.3.5 (crashes - 1.3.5 with curves though fine in 1.3.6) + * [r4018] Add ST_BdMPolyFromText to list not to test against 1.3.5 + (crashes 1.3.5 with curves though fine in 1.3.6) -2009-04-22 18:33 robe +2009-04-22 18:33 Regina Obe <lr@pcorp.us> - * revise to include a version variable and get rid of limit (think - its causing different tests to be run non-consistently depending - on ordering of postgresql so hard to compare outputs) + * [r4017] revise to include a version variable and get rid of limit + (think its causing different tests to be run non-consistently + depending on ordering of postgresql so hard to compare outputs) -2009-04-21 17:45 pramsey +2009-04-21 17:45 Paul Ramsey <pramsey@cleverelephant.ca> - * More info about XSL in final configure output + * [r4012] More info about XSL in final configure output -2009-04-17 13:59 robe +2009-04-17 13:59 Regina Obe <lr@pcorp.us> - * add ST_MinimumBoundingCircle to 1.3 exclude + * [r4010] add ST_MinimumBoundingCircle to 1.3 exclude -2009-04-16 07:31 robe +2009-04-16 07:31 Regina Obe <lr@pcorp.us> - * Update installation to have link to Windows Compilation guide - Nicklas put together. + * [r4006] Update installation to have link to Windows Compilation + guide Nicklas put together. -2009-04-16 05:54 robe +2009-04-16 05:54 Regina Obe <lr@pcorp.us> - * ADd more curved geometry support functions to list and give - curved geometry special index a pretty anchor. + * [r4005] ADd more curved geometry support functions to list and + give curved geometry special index a pretty anchor. -2009-04-15 17:18 pramsey +2009-04-15 17:18 Paul Ramsey <pramsey@cleverelephant.ca> - * wee reformatting + * [r4004] wee reformatting -2009-04-15 17:15 pramsey +2009-04-15 17:15 Paul Ramsey <pramsey@cleverelephant.ca> - * remove tabs + * [r4003] remove tabs -2009-04-15 17:09 pramsey +2009-04-15 17:09 Paul Ramsey <pramsey@cleverelephant.ca> - * add link to trac for 1.4 + * [r4002] add link to trac for 1.4 -2009-04-15 01:22 robe +2009-04-15 01:22 Regina Obe <lr@pcorp.us> - * add link to st_relate + * [r4001] add link to st_relate -2009-04-15 01:11 robe +2009-04-15 01:11 Regina Obe <lr@pcorp.us> - * amend ST_ContainsProperly to summarize its speed advantages + * [r4000] amend ST_ContainsProperly to summarize its speed + advantages -2009-04-14 14:25 mcayland +2009-04-14 14:25 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Try and fix shp2pgsql-core for bug #124. Need to change sprintf() - to pgis_exec() within the loader. + * [r3999] Try and fix shp2pgsql-core for bug #124. Need to change + sprintf() to pgis_exec() within the loader. -2009-04-14 06:47 robe +2009-04-14 06:47 Regina Obe <lr@pcorp.us> - * add containsproperly + * [r3998] add containsproperly -2009-04-14 06:42 robe +2009-04-14 06:42 Regina Obe <lr@pcorp.us> - * I think the year is 2009 and we are in april now + * [r3997] I think the year is 2009 and we are in april now -2009-04-12 12:18 mcayland +2009-04-12 12:18 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Same as r3994 but for the second copy of shp2pgsql. + * [r3995] Same as r3994 but for the second copy of shp2pgsql. -2009-04-12 11:16 mcayland +2009-04-12 11:16 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix #104 'shp2pgsql is using deprecated PostgreSQL escape + * [r3994] Fix #104 'shp2pgsql is using deprecated PostgreSQL escape syntax'. Remember that not everyone's installation has "standard_conforming_strings" enabled by default. -2009-04-12 10:56 mcayland +2009-04-12 10:56 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix bug #148 'envelope() doesn't support new box3d_extent type'. - Looks like we do need to add casts for box3d_extent to all of - box2dfloaat, box3d and geometry after all. + * [r3993] Fix bug #148 'envelope() doesn't support new box3d_extent + type'. Looks like we do need to add casts for box3d_extent to all + of box2dfloaat, box3d and geometry after all. -2009-04-12 05:25 robe +2009-04-12 05:25 Regina Obe <lr@pcorp.us> - * missed some + * [r3992] missed some -2009-04-12 05:14 robe +2009-04-12 05:14 Regina Obe <lr@pcorp.us> - * Add ST_ContainsProperly to exclude for 1.3 testing. + * [r3991] Add ST_ContainsProperly to exclude for 1.3 testing. -2009-04-12 04:10 robe +2009-04-12 04:10 Regina Obe <lr@pcorp.us> - * Add new function ST_ContainsProperly and provide examples. Also - update ST_Contains to better explain the subtleties of the - definition and example to demonstrate the difference between - contains and containsproperly + * [r3990] Add new function ST_ContainsProperly and provide + examples. Also update ST_Contains to better explain the + subtleties of the definition and example to demonstrate the + difference between contains and containsproperly -2009-04-10 08:27 mcayland +2009-04-10 08:27 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Make good on my promise from bug #123 to remove the E'...' - escaping from shp2pgsql and revert to standard SQL escaping. Also - rename protect_quote_string() and make_good_string() to - escape_insert_string() and escape_copy_string() respectively so - the names reflect what they actually do. + * [r3989] Make good on my promise from bug #123 to remove the + E'...' escaping from shp2pgsql and revert to standard SQL + escaping. Also rename protect_quote_string() and + make_good_string() to escape_insert_string() and + escape_copy_string() respectively so the names reflect what they + actually do. -2009-04-06 17:31 pramsey +2009-04-06 17:31 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix mis-spelling in Eduin Carrillo's name + * [r3980] Fix mis-spelling in Eduin Carrillo's name -2009-04-05 18:06 pramsey +2009-04-05 18:06 Paul Ramsey <pramsey@cleverelephant.ca> - * keywords + * [r3969] keywords -2009-04-05 18:05 robe +2009-04-05 18:05 Regina Obe <lr@pcorp.us> - * Add Nicklas Avén to contributors list + * [r3968] Add Nicklas Avén to contributors list -2009-04-05 16:48 pramsey +2009-04-05 16:48 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix for collection vs collection distance behavior. Per Nicklas - Avén. GBT #146 + * [r3967] Fix for collection vs collection distance behavior. Per + Nicklas Avén. GBT #146 -2009-03-29 08:12 mcayland +2009-03-29 08:12 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix for previous commit; move the locations of the CASTs so that - they are after the definitions. Thanks Olivier! + * [r3939] Fix for previous commit; move the locations of the CASTs + so that they are after the definitions. Thanks Olivier! -2009-03-29 00:34 mcayland +2009-03-29 00:34 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Add additional casts for box3d_extent to box3d/box2d so that - other PostGIS functions can use the output of ST_Extent. Per + * [r3938] Add additional casts for box3d_extent to box3d/box2d so + that other PostGIS functions can use the output of ST_Extent. Per report from Olivier Courtin related to GBT#93. -2009-03-24 19:05 colivier +2009-03-24 19:05 Olivier Courtin <olivier.courtin@camptocamp.com> - * suppress compilation warning on non initialized variable + * [r3936] suppress compilation warning on non initialized variable -2009-03-23 22:45 pramsey +2009-03-23 22:45 Paul Ramsey <pramsey@cleverelephant.ca> - * Ignore autotools artefacts. + * [r3935] Ignore autotools artefacts. -2009-03-23 22:44 pramsey +2009-03-23 22:44 Paul Ramsey <pramsey@cleverelephant.ca> - * Once more unto the breach! autotools w/ mloskot autogen.sh from - GBT#142 + * [r3934] Once more unto the breach! autotools w/ mloskot + autogen.sh from GBT#142 -2009-03-23 17:18 pramsey +2009-03-23 17:18 Paul Ramsey <pramsey@cleverelephant.ca> - * Back to the future. + * [r3933] Back to the future. -2009-03-22 07:50 robe +2009-03-22 07:50 Regina Obe <lr@pcorp.us> - * expansion of example and description + * [r3932] expansion of example and description -2009-03-22 07:46 robe +2009-03-22 07:46 Regina Obe <lr@pcorp.us> - * Create new exception section and move over the Has,Drop, Add BBOX - family per MCA request. + * [r3931] Create new exception section and move over the Has,Drop, + Add BBOX family per MCA request. -2009-03-22 07:08 pramsey +2009-03-22 07:08 Paul Ramsey <pramsey@cleverelephant.ca> - * Can't get enough punishment: write out results of configure. + * [r3929] Can't get enough punishment: write out results of + configure. -2009-03-22 06:43 pramsey +2009-03-22 06:43 Paul Ramsey <pramsey@cleverelephant.ca> - * Back for more punishment: if we can checkin config.sub and - config.guess, we can check in ltmain.sh. Autotools, I despise + * [r3928] Back for more punishment: if we can checkin config.sub + and config.guess, we can check in ltmain.sh. Autotools, I despise thee. -2009-03-22 06:30 pramsey +2009-03-22 06:30 Paul Ramsey <pramsey@cleverelephant.ca> - * OK, didn't like that. libtoolize alters config.guess and + * [r3927] OK, didn't like that. libtoolize alters config.guess and config.sub, but removing them breaks build. Run libtoolize by hand and add the resultants to svn? -2009-03-22 06:28 pramsey +2009-03-22 06:28 Paul Ramsey <pramsey@cleverelephant.ca> - * config.guess back? + * [r3926] config.guess back? -2009-03-22 03:34 pramsey +2009-03-22 03:34 Paul Ramsey <pramsey@cleverelephant.ca> - * config.sub back in? + * [r3925] config.sub back in? -2009-03-22 03:23 pramsey +2009-03-22 03:23 Paul Ramsey <pramsey@cleverelephant.ca> - * Break build per mloskot. Remember to run ./autogen.sh and + * [r3924] Break build per mloskot. Remember to run ./autogen.sh and hopefully you have libtoolize! -2009-03-22 02:26 robe +2009-03-22 02:26 Regina Obe <lr@pcorp.us> - * typo + * [r3923] typo -2009-03-22 02:23 robe +2009-03-22 02:23 Regina Obe <lr@pcorp.us> - * not dealing correctly with arguments that are geometry arrays - where there is only one geometry in the arglist + * [r3922] not dealing correctly with arguments that are geometry + arrays where there is only one geometry in the arglist -2009-03-21 19:14 colivier +2009-03-21 19:14 Olivier Courtin <olivier.courtin@camptocamp.com> - * Fix static buffer size to add precision spaces. Cf #119 + * [r3921] Fix static buffer size to add precision spaces. Cf #119 -2009-03-20 18:43 pramsey +2009-03-20 18:43 Paul Ramsey <pramsey@cleverelephant.ca> - * Update release notes more + * [r3916] Update release notes more -2009-03-20 16:48 kneufeld +2009-03-20 16:48 Kevin Neufeld <kneufeld.ca@gmail.com> - * updated the operator notes in reference.xml to reflect the fact - that they do indeed use indexes. + * [r3915] updated the operator notes in reference.xml to reflect + the fact that they do indeed use indexes. -2009-03-20 14:55 robe +2009-03-20 14:55 Regina Obe <lr@pcorp.us> - * Add ST_MakeLine array proto. Provide example use. Flag that - ST_MAkeLine was enhanced in 1.4 + * [r3912] Add ST_MakeLine array proto. Provide example use. Flag + that ST_MAkeLine was enhanced in 1.4 -2009-03-20 14:40 robe +2009-03-20 14:40 Regina Obe <lr@pcorp.us> - * Fill in missing ST_Collect(geomarray) proto. Provide examples for - using ST_Union(geomarray), ST_Collect(geomarray) + * [r3911] Fill in missing ST_Collect(geomarray) proto. Provide + examples for using ST_Union(geomarray), ST_Collect(geomarray) -2009-03-20 13:39 colivier +2009-03-20 13:39 Olivier Courtin <olivier.courtin@camptocamp.com> - * Fix GML multi size computation. Cf issue #141 + * [r3910] Fix GML multi size computation. Cf issue #141 -2009-03-20 05:43 kneufeld +2009-03-20 05:43 Kevin Neufeld <kneufeld.ca@gmail.com> - * a small typo patch from mloskot, renaming a few "geometry_column" - to "geometry_columns" + * [r3906] a small typo patch from mloskot, renaming a few + "geometry_column" to "geometry_columns" -2009-03-20 05:32 kneufeld +2009-03-20 05:32 Kevin Neufeld <kneufeld.ca@gmail.com> - * renamed reference.xml to reference_old.xml + * [r3905] renamed reference.xml to reference_old.xml renamed reference_new.xml to reference.xml updated configure.ac, doc/Makefile.in, and doc/postgis.xml accordingly. -2009-03-19 17:58 pramsey +2009-03-19 17:58 Paul Ramsey <pramsey@cleverelephant.ca> - * Revert, now I get a warning in OS/X. Solaris will have to suck it - up. + * [r3903] Revert, now I get a warning in OS/X. Solaris will have to + suck it up. -2009-03-19 17:50 pramsey +2009-03-19 17:50 Paul Ramsey <pramsey@cleverelephant.ca> - * Make autogen.sh a little more tolerant of missing / re-named - autotools. + * [r3901] Make autogen.sh a little more tolerant of missing / + re-named autotools. -2009-03-19 17:28 kneufeld +2009-03-19 17:28 Kevin Neufeld <kneufeld.ca@gmail.com> - * updated ST_Relate docs - changed 3rd parameter to be more clear + * [r3900] updated ST_Relate docs - changed 3rd parameter to be more + clear -2009-03-19 17:03 pramsey +2009-03-19 17:03 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove warning in Solaris. + * [r3899] Remove warning in Solaris. -2009-03-19 16:58 pramsey +2009-03-19 16:58 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove warning in Solaris. + * [r3898] Remove warning in Solaris. -2009-03-19 16:52 pramsey +2009-03-19 16:52 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove one last 'const' warning. + * [r3897] Remove one last 'const' warning. -2009-03-19 13:27 colivier +2009-03-19 13:27 Olivier Courtin <olivier.courtin@camptocamp.com> - * Few minor improve/change on memory size to allocate + * [r3895] Few minor improve/change on memory size to allocate -2009-03-19 11:52 mcayland +2009-03-19 11:52 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * More lwgeom_geos.c fixes to remove compilation warnings, but this - time for compiling with GEOS >= 3.1. + * [r3894] More lwgeom_geos.c fixes to remove compilation warnings, + but this time for compiling with GEOS >= 3.1. -2009-03-19 06:05 pramsey +2009-03-19 06:05 Paul Ramsey <pramsey@cleverelephant.ca> - * Oops, we don't use the literal output of autoheader. + * [r3893] Oops, we don't use the literal output of autoheader. -2009-03-19 05:55 pramsey +2009-03-19 05:55 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove prepared geometry compilation warning. + * [r3892] Remove prepared geometry compilation warning. -2009-03-19 05:54 pramsey +2009-03-19 05:54 Paul Ramsey <pramsey@cleverelephant.ca> - * Add ieeefp.h for Solaris. + * [r3891] Add ieeefp.h for Solaris. -2009-03-19 05:53 pramsey +2009-03-19 05:53 Paul Ramsey <pramsey@cleverelephant.ca> - * Add testing for ieeefp.h to autoconf + * [r3890] Add testing for ieeefp.h to autoconf -2009-03-19 00:48 pramsey +2009-03-19 00:48 Paul Ramsey <pramsey@cleverelephant.ca> - * Final fix to remove cpp requirement + * [r3889] Final fix to remove cpp requirement -2009-03-19 00:38 pramsey +2009-03-19 00:38 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove preproc step for sql-mm curve regression. + * [r3888] Remove preproc step for sql-mm curve regression. -2009-03-19 00:37 pramsey +2009-03-19 00:37 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove USE_JTS and cpp preproc from sql-mm regression + * [r3887] Remove USE_JTS and cpp preproc from sql-mm regression -2009-03-18 23:42 pramsey +2009-03-18 23:42 Paul Ramsey <pramsey@cleverelephant.ca> - * Add lidar item + * [r3886] Add lidar item -2009-03-16 23:06 mcayland +2009-03-16 23:06 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * More cleanup work based upon Mateusz's MSVC patches; remove - references to unistd.h and sys/param.h since they are no longer - required for determining endian-ness. + * [r3877] More cleanup work based upon Mateusz's MSVC patches; + remove references to unistd.h and sys/param.h since they are no + longer required for determining endian-ness. -2009-03-13 13:11 robe +2009-03-13 13:11 Regina Obe <lr@pcorp.us> - * switch order + * [r3868] switch order -2009-03-13 13:09 robe +2009-03-13 13:09 Regina Obe <lr@pcorp.us> - * get rid of sT_PolyFromWKB reference. Will readd those stupid ones - left in reference.xml later + * [r3867] get rid of sT_PolyFromWKB reference. Will readd those + stupid ones left in reference.xml later -2009-03-13 13:08 robe +2009-03-13 13:08 Regina Obe <lr@pcorp.us> - * more spots + * [r3866] more spots -2009-03-13 13:05 robe +2009-03-13 13:05 Regina Obe <lr@pcorp.us> - * missed a spot + * [r3865] missed a spot -2009-03-13 12:53 robe +2009-03-13 12:53 Regina Obe <lr@pcorp.us> - * remove using_postgis and reference and add using_postgis_dataman, - using_postgis_app + * [r3864] remove using_postgis and reference and add + using_postgis_dataman, using_postgis_app -2009-03-13 12:11 robe +2009-03-13 12:11 Regina Obe <lr@pcorp.us> - * Break using_postgis into 2 sections, remover reference.xml from - doc make + * [r3863] Break using_postgis into 2 sections, remover + reference.xml from doc make -2009-03-12 23:20 robe +2009-03-12 23:20 Regina Obe <lr@pcorp.us> - * #HISTORY #GBT 121: update tiger_geocoder to run in PostgreSQL 8.3 - - apply patch from cdwinslow + * [r3860] #HISTORY #GBT 121: update tiger_geocoder to run in + PostgreSQL 8.3 - apply patch from cdwinslow -2009-03-11 05:31 kneufeld +2009-03-11 05:31 Kevin Neufeld <kneufeld.ca@gmail.com> - * updated SQL/MM specs in ST_PointFromWKB + * [r3854] updated SQL/MM specs in ST_PointFromWKB -2009-03-11 05:13 kneufeld +2009-03-11 05:13 Kevin Neufeld <kneufeld.ca@gmail.com> - * moved over ST_LineFromWKB + * [r3853] moved over ST_LineFromWKB -2009-03-11 05:11 kneufeld +2009-03-11 05:11 Kevin Neufeld <kneufeld.ca@gmail.com> - * added missing linkend + * [r3852] added missing linkend -2009-03-11 05:09 kneufeld +2009-03-11 05:09 Kevin Neufeld <kneufeld.ca@gmail.com> - * updated doc descriptions and linkends. + * [r3851] updated doc descriptions and linkends. -2009-03-11 04:56 kneufeld +2009-03-11 04:56 Kevin Neufeld <kneufeld.ca@gmail.com> - * moved over ST_PointFromWKB + * [r3850] moved over ST_PointFromWKB -2009-03-11 04:35 kneufeld +2009-03-11 04:35 Kevin Neufeld <kneufeld.ca@gmail.com> - * moved over ST_GeomFromWKB + * [r3849] moved over ST_GeomFromWKB -2009-03-10 21:29 mcayland +2009-03-10 21:29 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * More MSVC fixes from Mateusz related to ISO C++ vs. C99 variable - initialisation. + * [r3848] More MSVC fixes from Mateusz related to ISO C++ vs. C99 + variable initialisation. -2009-03-10 21:05 colivier +2009-03-10 21:05 Olivier Courtin <olivier.courtin@camptocamp.com> - * updated SVG unit to reduce to max 2 decimal digits + * [r3847] updated SVG unit to reduce to max 2 decimal digits -2009-03-10 21:03 pramsey +2009-03-10 21:03 Paul Ramsey <pramsey@cleverelephant.ca> - * MSVC line + * [r3846] MSVC line -2009-03-10 20:49 colivier +2009-03-10 20:49 Olivier Courtin <olivier.courtin@camptocamp.com> - * Add SVG unit test file + * [r3845] Add SVG unit test file -2009-03-10 20:42 pramsey +2009-03-10 20:42 Paul Ramsey <pramsey@cleverelephant.ca> - * Add 1.3.5 release notes into trunk docs + * [r3844] Add 1.3.5 release notes into trunk docs -2009-03-10 20:37 pramsey +2009-03-10 20:37 Paul Ramsey <pramsey@cleverelephant.ca> - * First cut of 1.4 release notes. + * [r3843] First cut of 1.4 release notes. -2009-03-10 20:25 mcayland +2009-03-10 20:25 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix for GBT#132: Make check should run CUnit. This is to aid - developers as we move the majority of the testing framework over - to CUnit. + * [r3842] Fix for GBT#132: Make check should run CUnit. This is to + aid developers as we move the majority of the testing framework + over to CUnit. -2009-03-10 20:15 mcayland +2009-03-10 20:15 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Commit Mateusz's patch to move the postgres.h #include to the top - of the file in order to aid the MSVC build. + * [r3841] Commit Mateusz's patch to move the postgres.h #include to + the top of the file in order to aid the MSVC build. -2009-03-10 20:15 colivier +2009-03-10 20:15 Olivier Courtin <olivier.courtin@camptocamp.com> - * update GML unit test according to AsGML option related to CRS - output option + * [r3840] update GML unit test according to AsGML option related to + CRS output option -2009-03-10 19:37 mcayland +2009-03-10 19:37 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Remove compiler warning from commit r3821. + * [r3839] Remove compiler warning from commit r3821. -2009-03-10 19:30 colivier +2009-03-10 19:30 Olivier Courtin <olivier.courtin@camptocamp.com> - * Update unit test upon previous GeoJson CRS change + * [r3838] Update unit test upon previous GeoJson CRS change -2009-03-10 19:29 mcayland +2009-03-10 19:29 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Update PostGIS trunk so that the minimum required version of GEOS - is 3.0.0. This allows us to finally remove all remaining + * [r3837] Update PostGIS trunk so that the minimum required version + of GEOS is 3.0.0. This allows us to finally remove all remaining compilation warnings since we can adjust the casts to make correct use of the GEOS 3.0.0 header types. -2009-03-10 18:20 colivier +2009-03-10 18:20 Olivier Courtin <olivier.courtin@camptocamp.com> - * Fix GeoJson CRS output format (1.0 spec). Add OGC long CRS format - (Cf RFC 5165) as an option. On AsGeoJson it change option order - from 1.3.X between Bbox and CRS. On AsGML a new option parameter - is added + * [r3835] Fix GeoJson CRS output format (1.0 spec). Add OGC long + CRS format (Cf RFC 5165) as an option. On AsGeoJson it change + option order from 1.3.X between Bbox and CRS. On AsGML a new + option parameter is added -2009-03-10 17:24 mcayland +2009-03-10 17:24 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Some documentation updates; change the instructions for + * [r3833] Some documentation updates; change the instructions for decompressing the tarballs for PROJ and GEOS so that they work for our Solaris friends (as per the instructions for the main PostGIS tarball). Also move version entities for GEOS and PROJ @@ -4887,633 +24729,643 @@ location for the change to be reflected throughout the installation documentation. -2009-03-10 16:26 mcayland +2009-03-10 16:26 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Augment comment related to Paul's fix for GBT#130 as I'm bound to - forget why we decided to do this at a later date... + * [r3831] Augment comment related to Paul's fix for GBT#130 as I'm + bound to forget why we decided to do this at a later date... -2009-03-10 16:24 colivier +2009-03-10 16:24 Olivier Courtin <olivier.courtin@camptocamp.com> - * Add circstring release and LWGEOM conversion entry + * [r3830] Add circstring release and LWGEOM conversion entry -2009-03-10 16:18 mcayland +2009-03-10 16:18 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Remove some GCC-isms from the unparser related to setting array - sizes at run-time rather than compile time. Per report from + * [r3828] Remove some GCC-isms from the unparser related to setting + array sizes at run-time rather than compile time. Per report from Mateusz Loskot. -2009-03-10 15:54 mcayland +2009-03-10 15:54 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix GBT#126: Don't include private PROJ.4 header projects.h. It - appears that from its inception, PostGIS has inadvertently used - the PROJ.4 internal projects.h header file rather than the - correct proj_api.h header file. This patch flips over to the new - header file and changes everything over to use the new external - structures/APIS. + * [r3827] Fix GBT#126: Don't include private PROJ.4 header + projects.h. It appears that from its inception, PostGIS has + inadvertently used the PROJ.4 internal projects.h header file + rather than the correct proj_api.h header file. This patch flips + over to the new header file and changes everything over to use + the new external structures/APIS. -2009-03-10 15:12 pramsey +2009-03-10 15:12 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix for GBT #130, remove bdpoly regression failure. + * [r3826] Fix for GBT #130, remove bdpoly regression failure. -2009-03-10 15:06 mcayland +2009-03-10 15:06 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix for GBT#89: transform() grid-shift 2nd chance logic + * [r3825] Fix for GBT#89: transform() grid-shift 2nd chance logic defective. Remove the 2nd chance logic completely and allow the user to configure the behaviour using the standard PROJ.4 +nadgrids parameter. I've added a section to the ST_Transform() section of the manual which gives an example of how you can do this. -2009-03-10 14:59 colivier +2009-03-10 14:59 Olivier Courtin <olivier.courtin@camptocamp.com> - * Add SVG L Command in absolute path according to BNF SVG Path. Add - some forgotten geometry release. + * [r3824] Add SVG L Command in absolute path according to BNF SVG + Path. Add some forgotten geometry release. -2009-03-10 00:29 mleslie +2009-03-10 00:29 Mark Leslie <mark.leslie@lisasoft.com> - * Moving parser changes from spike/mleslie/parser to allow the - proper nesting of compound curves within curve polygons and the - validation of compound curve continuity. This also resolves + * [r3821] Moving parser changes from spike/mleslie/parser to allow + the proper nesting of compound curves within curve polygons and + the validation of compound curve continuity. This also resolves GBT#124. -2009-03-09 22:01 pramsey +2009-03-09 22:01 Paul Ramsey <pramsey@cleverelephant.ca> - * Don't segmentize geometry if input doesn't pass hasarc + * [r3820] Don't segmentize geometry if input doesn't pass hasarc -2009-03-09 21:15 robe +2009-03-09 21:15 Regina Obe <lr@pcorp.us> - * Put ST_CurveToLine back in script. Seems to not crash anymore - with Paul's changes to GBT: 112 + * [r3819] Put ST_CurveToLine back in script. Seems to not crash + anymore with Paul's changes to GBT: 112 -2009-03-09 18:40 pramsey +2009-03-09 18:40 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix for GBT#96. + * [r3817] Fix for GBT#96. -2009-03-09 17:19 mcayland +2009-03-09 17:19 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix the OSGB 27700 SRID definition in spatial_ref_sys.sql since - it is missing a datum parameter. We can't backpatch this since it - is only available in newer versions of PROJ, and we don't have - any PROJ version detection capability in 1.3 branch. + * [r3816] Fix the OSGB 27700 SRID definition in spatial_ref_sys.sql + since it is missing a datum parameter. We can't backpatch this + since it is only available in newer versions of PROJ, and we + don't have any PROJ version detection capability in 1.3 branch. -2009-03-09 16:20 mcayland +2009-03-09 16:20 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Remove compile warnings from lwgeom_dump.c related to the removal - of TupleDescGetSlot (we don't need to set the deprecated fields - in FuncCallContext if we are using BuildTupleFromCStrings). + * [r3815] Remove compile warnings from lwgeom_dump.c related to the + removal of TupleDescGetSlot (we don't need to set the deprecated + fields in FuncCallContext if we are using + BuildTupleFromCStrings). -2009-03-09 15:34 pramsey +2009-03-09 15:34 Paul Ramsey <pramsey@cleverelephant.ca> - * More camel-case changes. + * [r3814] More camel-case changes. -2009-03-09 14:51 colivier +2009-03-09 14:51 Olivier Courtin <olivier.courtin@camptocamp.com> - * Refactored the whole assvg export function in the same way than - asgeojson. Fix #119 issue on big geometrycollection geometry. - Keep the same SVG output than before + * [r3813] Refactored the whole assvg export function in the same + way than asgeojson. Fix #119 issue on big geometrycollection + geometry. Keep the same SVG output than before -2009-03-09 14:36 pramsey +2009-03-09 14:36 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove some camelCase function signatures from liblwgeom + * [r3812] Remove some camelCase function signatures from liblwgeom -2009-03-08 22:33 mcayland +2009-03-08 22:33 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix for GBT#93: ST_Extent() and ST_Estimated_Extent() return - BOX2DFLOAT4s. This is currently done using a horrible hack for - backwards compatibility which introduces a new type just for + * [r3811] Fix for GBT#93: ST_Extent() and ST_Estimated_Extent() + return BOX2DFLOAT4s. This is currently done using a horrible hack + for backwards compatibility which introduces a new type just for ST_Extent(). See GBT email to postgis-devel and code comments for more detail. -2009-03-08 21:41 pramsey +2009-03-08 21:41 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix goof in box2d computation. + * [r3809] Fix goof in box2d computation. -2009-03-08 21:15 pramsey +2009-03-08 21:15 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix for GBT#112 + * [r3807] Fix for GBT#112 -2009-03-08 17:00 mcayland +2009-03-08 17:00 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Add some explanation comments to lwgeom_accum.c explaining why we - need to implement our own set of geometry aggregate functions. + * [r3806] Add some explanation comments to lwgeom_accum.c + explaining why we need to implement our own set of geometry + aggregate functions. -2009-03-08 16:36 mcayland +2009-03-08 16:36 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Alter the in-built casts between the internal PostgreSQL BOX type - and the PostGIS geometry/BOX3D types so that they do not go - through an intermediate BOX2DFLOAT4 first. This prevents the + * [r3805] Alter the in-built casts between the internal PostgreSQL + BOX type and the PostGIS geometry/BOX3D types so that they do not + go through an intermediate BOX2DFLOAT4 first. This prevents the float4 rounding errors appearing in the numbers when invoking the casts. -2009-03-08 15:37 pramsey +2009-03-08 15:37 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix for GBT #116, EMPTY hex polygon no longer causes crash. + * [r3803] Fix for GBT #116, EMPTY hex polygon no longer causes + crash. -2009-03-08 14:36 mcayland +2009-03-08 14:36 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix GBT#122: ST_SnapToGrid gives 13 when fed circular string. - Alter the error message so that it correctly displays the type - rather than just it's internal number. + * [r3802] Fix GBT#122: ST_SnapToGrid gives 13 when fed circular + string. Alter the error message so that it correctly displays the + type rather than just it's internal number. -2009-03-06 14:15 robe +2009-03-06 14:15 Regina Obe <lr@pcorp.us> - * missing svn tags and copyright info + * [r3799] missing svn tags and copyright info -2009-03-03 18:01 robe +2009-03-03 18:01 Regina Obe <lr@pcorp.us> - * Flag ST_GeoHash as curved support friendly, put in pretty anchors - for special function sections + * [r3790] Flag ST_GeoHash as curved support friendly, put in pretty + anchors for special function sections -2009-03-03 18:00 pramsey +2009-03-03 18:00 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix tests to match current geohash signatures (lon/lat) and - precisions (odd and even) + * [r3789] Fix tests to match current geohash signatures (lon/lat) + and precisions (odd and even) -2009-02-27 18:09 robe +2009-02-27 18:09 Regina Obe <lr@pcorp.us> - * Get rid of additional calls to TupleDescGetSlot(tupdesc) in dump - and dumprings and replace deprecated use of TupleDescGetSlot with - 8.1+ preferred BlessTupleDesc + * [r3781] Get rid of additional calls to TupleDescGetSlot(tupdesc) + in dump and dumprings and replace deprecated use of + TupleDescGetSlot with 8.1+ preferred BlessTupleDesc -2009-02-23 15:19 strk +2009-02-23 15:19 Sandro Santilli <strk@keybit.net> - * Fix parse_hex to support lower-case A-F too (issue 120) + * [r3762] Fix parse_hex to support lower-case A-F too (issue 120) -2009-02-23 13:47 robe +2009-02-23 13:47 Regina Obe <lr@pcorp.us> - * change to move postgis_comments.sql to root + * [r3760] change to move postgis_comments.sql to root -2009-02-19 21:12 pramsey +2009-02-19 21:12 Paul Ramsey <pramsey@cleverelephant.ca> - * Add variable decls to trunk :) + * [r3750] Add variable decls to trunk :) -2009-02-19 20:59 pramsey +2009-02-19 20:59 Paul Ramsey <pramsey@cleverelephant.ca> - * Add EOF marker, per GBT#105 + * [r3749] Add EOF marker, per GBT#105 -2009-02-19 09:42 mcayland +2009-02-19 09:42 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Update trunk so that it will compile against PostgreSQL 8.4. - Based upon Talha Rizwan's original patch, with a small tweak from - me. + * [r3741] Update trunk so that it will compile against PostgreSQL + 8.4. Based upon Talha Rizwan's original patch, with a small tweak + from me. -2009-02-17 18:26 robe +2009-02-17 18:26 Regina Obe <lr@pcorp.us> - * change to use tab separator instead + * [r3734] change to use tab separator instead -2009-02-17 03:56 robe +2009-02-17 03:56 Regina Obe <lr@pcorp.us> - * fix typo + * [r3730] fix typo -2009-02-17 03:02 robe +2009-02-17 03:02 Regina Obe <lr@pcorp.us> - * + * [r3729] -2009-02-17 02:59 robe +2009-02-17 02:59 Regina Obe <lr@pcorp.us> - * Make new - 1 section with 2 subsections. Change ST_AsGeoJSON - availability tag to be consistent with others + * [r3728] Make new - 1 section with 2 subsections. Change + ST_AsGeoJSON availability tag to be consistent with others -2009-02-17 02:55 robe +2009-02-17 02:55 Regina Obe <lr@pcorp.us> - * Section new functions in 1.3 + * [r3727] Section new functions in 1.3 -2009-02-16 22:18 robe +2009-02-16 22:18 Regina Obe <lr@pcorp.us> - * Try again to get postgis_comments.sql to generate + * [r3721] Try again to get postgis_comments.sql to generate -2009-02-13 19:56 robe +2009-02-13 19:56 Regina Obe <lr@pcorp.us> - * amend st_union description to include new proto and performance - enhancements. Add space before availability in xsl parser what is - new section + * [r3705] amend st_union description to include new proto and + performance enhancements. Add space before availability in xsl + parser what is new section -2009-02-13 19:23 robe +2009-02-13 19:23 Regina Obe <lr@pcorp.us> - * Add special section listing new functions in this release. Get - rid of note tag around ST_GeoHash availability so consistent with - other availability text + * [r3704] Add special section listing new functions in this + release. Get rid of note tag around ST_GeoHash availability so + consistent with other availability text -2009-02-13 06:58 robe +2009-02-13 06:58 Regina Obe <lr@pcorp.us> - * + * [r3702] -2009-02-12 18:32 robe +2009-02-12 18:32 Regina Obe <lr@pcorp.us> - * more work on comments generation + * [r3694] more work on comments generation -2009-02-12 17:39 robe +2009-02-12 17:39 Regina Obe <lr@pcorp.us> - * Put in logic to output postgis_comments.sql + * [r3690] Put in logic to output postgis_comments.sql -2009-02-11 21:48 pramsey +2009-02-11 21:48 Paul Ramsey <pramsey@cleverelephant.ca> - * Bind ST_GeoHash into SQL. + * [r3688] Bind ST_GeoHash into SQL. -2009-02-11 18:28 pramsey +2009-02-11 18:28 Paul Ramsey <pramsey@cleverelephant.ca> - * Change references from ./lwgeom to ./postgis + * [r3687] Change references from ./lwgeom to ./postgis -2009-02-11 18:22 pramsey +2009-02-11 18:22 Paul Ramsey <pramsey@cleverelephant.ca> - * Change the name of the main source directory. This is going to - break the build for a little while until I fix all the + * [r3686] Change the name of the main source directory. This is + going to break the build for a little while until I fix all the references, but I want to do it atomically to ensure version history is preserved. -2009-02-11 02:11 pramsey +2009-02-11 02:11 Paul Ramsey <pramsey@cleverelephant.ca> - * GeoHash implementation first cut. + * [r3685] GeoHash implementation first cut. -2009-02-10 21:20 pramsey +2009-02-10 21:20 Paul Ramsey <pramsey@cleverelephant.ca> - * Solve iconv-on-Solaris (and hopefully many other platforms with - system iconv in libc) problem in autoconf. + * [r3683] Solve iconv-on-Solaris (and hopefully many other + platforms with system iconv in libc) problem in autoconf. -2009-02-10 20:10 pramsey +2009-02-10 20:10 Paul Ramsey <pramsey@cleverelephant.ca> - * Demote new loader code from default build for now. + * [r3682] Demote new loader code from default build for now. -2009-02-10 20:06 pramsey +2009-02-10 20:06 Paul Ramsey <pramsey@cleverelephant.ca> - * New restore script, much simpler, takes -Fc dump and writes back - ASCII on stdout + * [r3681] New restore script, much simpler, takes -Fc dump and + writes back ASCII on stdout -2009-02-10 08:00 colivier +2009-02-10 08:00 Olivier Courtin <olivier.courtin@camptocamp.com> - * KML output: use decimal places rather than significant digit, - trim trailing zeros, update documentation, update unit test + * [r3677] KML output: use decimal places rather than significant + digit, trim trailing zeros, update documentation, update unit + test -2009-02-10 07:54 colivier +2009-02-10 07:54 Olivier Courtin <olivier.courtin@camptocamp.com> - * GeoJson output: trim trailing zero, add forgotten free on + * [r3676] GeoJson output: trim trailing zero, add forgotten free on subgemotry inspect. GML output: precision no more as a global one, decimal places rather than significant digits, trim trailing zero, add unit test, doc update with output example -2009-02-09 23:51 pramsey +2009-02-09 23:51 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix case sensitive in AGGREGATE reading. + * [r3675] Fix case sensitive in AGGREGATE reading. -2009-02-05 20:01 kneufeld +2009-02-05 20:01 Kevin Neufeld <kneufeld.ca@gmail.com> - * Updated ST_DumpRings description and example. + * [r3647] Updated ST_DumpRings description and example. -2009-02-04 18:13 kneufeld +2009-02-04 18:13 Kevin Neufeld <kneufeld.ca@gmail.com> - * Added example to ST_PointN + * [r3641] Added example to ST_PointN -2009-02-04 13:54 robe +2009-02-04 13:54 Regina Obe <lr@pcorp.us> - * minor changes. Take ST_CurveToLine out so tests can complete - until we fix. + * [r3640] minor changes. Take ST_CurveToLine out so tests can + complete until we fix. -2009-02-04 00:28 pramsey +2009-02-04 00:28 Paul Ramsey <pramsey@cleverelephant.ca> - * Propset Author Id Keyword Revision on all files. + * [r3639] Propset Author Id Keyword Revision on all files. -2009-02-04 00:23 pramsey +2009-02-04 00:23 Paul Ramsey <pramsey@cleverelephant.ca> - * Formating + * [r3638] Formating -2009-02-03 20:51 pramsey +2009-02-03 20:51 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix boundary conditions with from==to hitting first/list vertex. + * [r3637] Fix boundary conditions with from==to hitting first/list + vertex. -2009-02-03 19:09 mcayland +2009-02-03 19:09 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix GBT#109: Some operators not supported for Circular. In this - case I haven't added the comparison code as I am not 100% sure on - the semantics, but the error message should be much clearer to - users now. + * [r3636] Fix GBT#109: Some operators not supported for Circular. + In this case I haven't added the comparison code as I am not 100% + sure on the semantics, but the error message should be much + clearer to users now. -2009-02-03 17:49 robe +2009-02-03 17:49 Regina Obe <lr@pcorp.us> - * Add corrections from Bruce Rindahl + * [r3635] Add corrections from Bruce Rindahl -2009-02-03 17:30 robe +2009-02-03 17:30 Regina Obe <lr@pcorp.us> - * forgot some spaces + * [r3634] forgot some spaces -2009-02-03 16:10 robe +2009-02-03 16:10 Regina Obe <lr@pcorp.us> - * forgot availability info + * [r3633] forgot availability info -2009-02-03 15:23 robe +2009-02-03 15:23 Regina Obe <lr@pcorp.us> - * update st_convexhull definition -- wasn't very clear + * [r3632] update st_convexhull definition -- wasn't very clear -2009-02-03 15:20 robe +2009-02-03 15:20 Regina Obe <lr@pcorp.us> - * Document ST_MinimumBoundingCircle + * [r3631] Document ST_MinimumBoundingCircle -2009-02-03 14:52 robe +2009-02-03 14:52 Regina Obe <lr@pcorp.us> - * #HISTORY: ST_MinimumBoundingCircle -- also change to support - geometries with LINESTRING,POINT convex hulls + * [r3630] #HISTORY: ST_MinimumBoundingCircle -- also change to + support geometries with LINESTRING,POINT convex hulls -2009-02-03 14:21 robe +2009-02-03 14:21 Regina Obe <lr@pcorp.us> - * First draft of ST_MinimumBoundingCircle contributed by Bruce - Rindahl. Changed to use named params and renamed function from - mbc to ST_MinimumBoundingCircle. + * [r3629] First draft of ST_MinimumBoundingCircle contributed by + Bruce Rindahl. Changed to use named params and renamed function + from mbc to ST_MinimumBoundingCircle. -2009-02-03 13:23 robe +2009-02-03 13:23 Regina Obe <lr@pcorp.us> - * put back linetocurve curvetoline tests now that issue 86 and 108 - should have fixed + * [r3628] put back linetocurve curvetoline tests now that issue 86 + and 108 should have fixed -2009-02-03 07:20 pramsey +2009-02-03 07:20 Paul Ramsey <pramsey@cleverelephant.ca> - * Use "extended string" format for escaping \ and ' in insert - statements. + * [r3623] Use "extended string" format for escaping \ and ' in + insert statements. -2009-02-03 04:36 mleslie +2009-02-03 04:36 Mark Leslie <mark.leslie@lisasoft.com> - * Adding an rfc for changing the validation approach when parsing - WKT. + * [r3622] Adding an rfc for changing the validation approach when + parsing WKT. -2009-02-03 01:59 pramsey +2009-02-03 01:59 Paul Ramsey <pramsey@cleverelephant.ca> - * astyle this file + * [r3621] astyle this file -2009-02-03 01:04 pramsey +2009-02-03 01:04 Paul Ramsey <pramsey@cleverelephant.ca> - * Comment datum slice pull. + * [r3620] Comment datum slice pull. -2009-02-02 22:21 pramsey +2009-02-02 22:21 Paul Ramsey <pramsey@cleverelephant.ca> - * formatting + * [r3619] formatting -2009-02-02 18:26 robe +2009-02-02 18:26 Regina Obe <lr@pcorp.us> - * Typo in docs confusing gardentester. Also change ST_Collect use - to ST_Union so we are testing with valid polygons (reduces union - intersection error messages) + * [r3617] Typo in docs confusing gardentester. Also change + ST_Collect use to ST_Union so we are testing with valid polygons + (reduces union intersection error messages) -2009-02-02 06:01 mleslie +2009-02-02 06:01 Mark Leslie <mark.leslie@lisasoft.com> - * Fix for Issue 108 and regress test. + * [r3605] Fix for Issue 108 and regress test. -2009-02-02 04:19 robe +2009-02-02 04:19 Regina Obe <lr@pcorp.us> - * Document ST_LocateBetweenElevations + * [r3604] Document ST_LocateBetweenElevations -2009-02-01 06:48 robe +2009-02-01 06:48 Regina Obe <lr@pcorp.us> - * Get rid of warnings -- no longer relevant for + * [r3603] Get rid of warnings -- no longer relevant for ST_LineCrossingDirection -2009-01-30 17:16 robe +2009-01-30 17:16 Regina Obe <lr@pcorp.us> - * revise to correctly fill in timestamp/date args + * [r3599] revise to correctly fill in timestamp/date args -2009-01-30 14:03 robe +2009-01-30 14:03 Regina Obe <lr@pcorp.us> - * put in logic to test operators + * [r3594] put in logic to test operators -2009-01-30 13:44 robe +2009-01-30 13:44 Regina Obe <lr@pcorp.us> - * Operator check in wrong segment of xpath + * [r3593] Operator check in wrong segment of xpath -2009-01-28 23:42 pramsey +2009-01-28 23:42 Paul Ramsey <pramsey@cleverelephant.ca> - * Change error message. + * [r3578] Change error message. -2009-01-28 23:34 pramsey +2009-01-28 23:34 Paul Ramsey <pramsey@cleverelephant.ca> - * Handle null return from cascadedunion. + * [r3576] Handle null return from cascadedunion. -2009-01-28 01:02 pramsey +2009-01-28 01:02 Paul Ramsey <pramsey@cleverelephant.ca> - * wrapping + * [r3572] wrapping -2009-01-27 05:30 robe +2009-01-27 05:30 Regina Obe <lr@pcorp.us> - * missing meta properties + * [r3570] missing meta properties -2009-01-25 15:52 robe +2009-01-25 15:52 Regina Obe <lr@pcorp.us> - * Document ST_Extent3D now that Paul has proclaimed it a public - function + * [r3569] Document ST_Extent3D now that Paul has proclaimed it a + public function -2009-01-24 20:49 pramsey +2009-01-24 20:49 Paul Ramsey <pramsey@cleverelephant.ca> - * Small changes in createrelplace syntax, comments, function rename - recommendation. + * [r3568] Small changes in createrelplace syntax, comments, + function rename recommendation. -2009-01-23 22:05 kneufeld +2009-01-23 22:05 Kevin Neufeld <kneufeld.ca@gmail.com> - * small wording fix for DropGeometryColumn + * [r3567] small wording fix for DropGeometryColumn -2009-01-23 20:06 pramsey +2009-01-23 20:06 Paul Ramsey <pramsey@cleverelephant.ca> - * Add function naming rfc + * [r3566] Add function naming rfc -2009-01-22 23:58 pramsey +2009-01-22 23:58 Paul Ramsey <pramsey@cleverelephant.ca> - * Flip all aggregate functions over to the new aggregation system. - Remove catalog hacks in favour of wrapper type. Make the fast - implementations the default and _old implementations the legacy. + * [r3565] Flip all aggregate functions over to the new aggregation + system. Remove catalog hacks in favour of wrapper type. Make the + fast implementations the default and _old implementations the + legacy. -2009-01-22 19:25 robe +2009-01-22 19:25 Regina Obe <lr@pcorp.us> - * Filter out Operators section from xsl transforms + * [r3564] Filter out Operators section from xsl transforms -2009-01-22 19:25 kneufeld +2009-01-22 19:25 Kevin Neufeld <kneufeld.ca@gmail.com> - * moved over the remaining operands from reference.xml to + * [r3563] moved over the remaining operands from reference.xml to reference_new.xml in the documentation -2009-01-22 19:15 robe +2009-01-22 19:15 Regina Obe <lr@pcorp.us> - * Give operators section a pretty anchor and id so easy to bookmark - and I can exclude from xsl scripts + * [r3562] Give operators section a pretty anchor and id so easy to + bookmark and I can exclude from xsl scripts -2009-01-22 18:19 robe +2009-01-22 18:19 Regina Obe <lr@pcorp.us> - * Fix DBFReadDeleted logic -- should return 1 if record is deleted - and 0 if it is not deleted + * [r3561] Fix DBFReadDeleted logic -- should return 1 if record is + deleted and 0 if it is not deleted -2009-01-22 18:02 kneufeld +2009-01-22 18:02 Kevin Neufeld <kneufeld.ca@gmail.com> - * moved over |>> from reference.xml to reference_new.xml in the - documentation + * [r3558] moved over |>> from reference.xml to reference_new.xml in + the documentation -2009-01-22 17:46 kneufeld +2009-01-22 17:46 Kevin Neufeld <kneufeld.ca@gmail.com> - * moved over <<, <<|, and >> from reference.xml to + * [r3557] moved over <<, <<|, and >> from reference.xml to reference_new.xml in the documentation -2009-01-22 05:56 pramsey +2009-01-22 05:56 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove protection from ST_GeometryArray() aggregate. + * [r3556] Remove protection from ST_GeometryArray() aggregate. -2009-01-22 05:37 pramsey +2009-01-22 05:37 Paul Ramsey <pramsey@cleverelephant.ca> - * More ignore fixes + * [r3555] More ignore fixes -2009-01-22 05:35 pramsey +2009-01-22 05:35 Paul Ramsey <pramsey@cleverelephant.ca> - * Ignore postgis.sql.* + * [r3554] Ignore postgis.sql.* -2009-01-22 05:32 pramsey +2009-01-22 05:32 Paul Ramsey <pramsey@cleverelephant.ca> - * Alter pg_proc update to work with older PgSQLs too. + * [r3553] Alter pg_proc update to work with older PgSQLs too. -2009-01-22 01:39 pramsey +2009-01-22 01:39 Paul Ramsey <pramsey@cleverelephant.ca> - * First stab at a back-port of the array_agg from 8.4. Our's isn't - generic, and it's got it's own name, so it won't collide, ... - needs testing on PgSQL < 8.3 still. + * [r3552] First stab at a back-port of the array_agg from 8.4. + Our's isn't generic, and it's got it's own name, so it won't + collide, ... needs testing on PgSQL < 8.3 still. -2009-01-22 01:16 kneufeld +2009-01-22 01:16 Kevin Neufeld <kneufeld.ca@gmail.com> - * moved over |&> from reference.xml to reference_new.xml in the - documentation + * [r3551] moved over |&> from reference.xml to reference_new.xml in + the documentation -2009-01-22 00:44 kneufeld +2009-01-22 00:44 Kevin Neufeld <kneufeld.ca@gmail.com> - * moved over &>| from reference.xml to reference_new.xml in the - documentation + * [r3550] moved over &>| from reference.xml to reference_new.xml in + the documentation -2009-01-22 00:16 kneufeld +2009-01-22 00:16 Kevin Neufeld <kneufeld.ca@gmail.com> - * moved over &> from reference.xml to reference_new.xml in the - documentation + * [r3549] moved over &> from reference.xml to reference_new.xml in + the documentation -2009-01-21 23:26 kneufeld +2009-01-21 23:26 Kevin Neufeld <kneufeld.ca@gmail.com> - * moved over &&, &<, and = from reference.xml to reference_new.xml - in the documentation + * [r3548] moved over &&, &<, and = from reference.xml to + reference_new.xml in the documentation -2009-01-21 23:19 pramsey +2009-01-21 23:19 Paul Ramsey <pramsey@cleverelephant.ca> - * Add support for fast unions, with cascaded union. Currently for - testing, in the ST_Union_Fast() agggregate. Requires GEOS SVN - r2252 or higher. + * [r3547] Add support for fast unions, with cascaded union. + Currently for testing, in the ST_Union_Fast() agggregate. + Requires GEOS SVN r2252 or higher. -2009-01-21 21:55 pramsey +2009-01-21 21:55 Paul Ramsey <pramsey@cleverelephant.ca> - * Add rfc document. First one: alignment ideas. + * [r3546] Add rfc document. First one: alignment ideas. -2009-01-21 21:50 pramsey +2009-01-21 21:50 Paul Ramsey <pramsey@cleverelephant.ca> - * Headers split in 8.4? + * [r3545] Headers split in 8.4? -2009-01-20 18:43 pramsey +2009-01-20 18:43 Paul Ramsey <pramsey@cleverelephant.ca> - * Put translation_stage into descriptive MACRO names + * [r3544] Put translation_stage into descriptive MACRO names -2009-01-20 18:28 pramsey +2009-01-20 18:28 Paul Ramsey <pramsey@cleverelephant.ca> - * Add GTK macro. + * [r3543] Add GTK macro. -2009-01-20 17:48 pramsey +2009-01-20 17:48 Paul Ramsey <pramsey@cleverelephant.ca> - * Replace hand-built pkg-config routine w/ m4 from gtk source. + * [r3542] Replace hand-built pkg-config routine w/ m4 from gtk + source. -2009-01-20 07:36 pramsey +2009-01-20 07:36 Paul Ramsey <pramsey@cleverelephant.ca> - * Compile your work much? + * [r3541] Compile your work much? -2009-01-20 07:13 pramsey +2009-01-20 07:13 Paul Ramsey <pramsey@cleverelephant.ca> - * Protect the filename setting a little bit more in case it's NULL. + * [r3540] Protect the filename setting a little bit more in case + it's NULL. -2009-01-20 00:50 kneufeld +2009-01-20 00:50 Kevin Neufeld <kneufeld.ca@gmail.com> - * Fixed accidental broken build in docs from Rev3536. + * [r3539] Fixed accidental broken build in docs from Rev3536. -2009-01-19 21:33 pramsey +2009-01-19 21:33 Paul Ramsey <pramsey@cleverelephant.ca> - * First revision of the GUI. Configure using --with-gui to enable - full GUI build. New core/cli will build by default. Old utilities - remain in place for now. + * [r3538] First revision of the GUI. Configure using --with-gui to + enable full GUI build. New core/cli will build by default. Old + utilities remain in place for now. -2009-01-16 17:58 robe +2009-01-16 17:58 Regina Obe <lr@pcorp.us> - * move ST_GeomCollFromText + * [r3537] move ST_GeomCollFromText -2009-01-16 17:41 robe +2009-01-16 17:41 Regina Obe <lr@pcorp.us> - * Move st_mpolyfromtext + * [r3536] Move st_mpolyfromtext -2009-01-15 21:11 robe +2009-01-15 21:11 Regina Obe <lr@pcorp.us> - * Left some garbage in + * [r3535] Left some garbage in -2009-01-15 18:35 mcayland +2009-01-15 18:35 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Part 1 of GBT#94: Rename folders/files to be more consistent. - Embed the MAJOR.MINOR version in the PostgreSQL shared library - name (to allow different databases to contain different PostGIS - versions) and also rename lwpostgis.sql to postgis.sql. Update - documentation in various files to reflect the new names at the - same time. + * [r3534] Part 1 of GBT#94: Rename folders/files to be more + consistent. Embed the MAJOR.MINOR version in the PostgreSQL + shared library name (to allow different databases to contain + different PostGIS versions) and also rename lwpostgis.sql to + postgis.sql. Update documentation in various files to reflect the + new names at the same time. -2009-01-15 18:24 robe +2009-01-15 18:24 Regina Obe <lr@pcorp.us> - * Move ST_MLineFromText + * [r3533] Move ST_MLineFromText -2009-01-15 18:17 robe +2009-01-15 18:17 Regina Obe <lr@pcorp.us> - * more stuff + * [r3532] more stuff -2009-01-15 18:16 robe +2009-01-15 18:16 Regina Obe <lr@pcorp.us> - * forgot some stuff + * [r3531] forgot some stuff -2009-01-15 18:14 robe +2009-01-15 18:14 Regina Obe <lr@pcorp.us> - * Move over MPointFromText + * [r3530] Move over MPointFromText -2009-01-15 15:10 mcayland +2009-01-15 15:10 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix the output of "SELECT postgis_full_version()" on trunk by - ensuring that USE_STATS is present, and correctly generating the - POSTGIS_SCRIPTS_VERSION variable so that installations of trunk - don't keep thinking that they need a scripts upgrade. + * [r3529] Fix the output of "SELECT postgis_full_version()" on + trunk by ensuring that USE_STATS is present, and correctly + generating the POSTGIS_SCRIPTS_VERSION variable so that + installations of trunk don't keep thinking that they need a + scripts upgrade. -2009-01-14 17:46 pramsey +2009-01-14 17:46 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove missing prototype warning from build. + * [r3527] Remove missing prototype warning from build. -2009-01-13 15:12 robe +2009-01-13 15:12 Regina Obe <lr@pcorp.us> - * Error in logic in gardentest not correctly flagging WKT functions - as taking geometry variant + * [r3526] Error in logic in gardentest not correctly flagging WKT + functions as taking geometry variant -2009-01-13 15:11 mcayland +2009-01-13 15:11 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix regression tests to account for changes made in r3522 (rename - 'Curve' to 'CircularString') + * [r3525] Fix regression tests to account for changes made in r3522 + (rename 'Curve' to 'CircularString') -2009-01-13 14:04 robe +2009-01-13 14:04 Regina Obe <lr@pcorp.us> - * Move over ST_PolygonFromText + * [r3524] Move over ST_PolygonFromText -2009-01-13 13:12 mcayland +2009-01-13 13:12 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix compile warnings for the cunit tests (unused variables). + * [r3523] Fix compile warnings for the cunit tests (unused + variables). -2009-01-13 13:00 mcayland +2009-01-13 13:00 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Update lwgeom_gettypename() by renaming Curve to CircularString. - Now lots of error messages scattered throughout liblwgeom should - start to make sense... + * [r3522] Update lwgeom_gettypename() by renaming Curve to + CircularString. Now lots of error messages scattered throughout + liblwgeom should start to make sense... -2009-01-13 12:59 mcayland +2009-01-13 12:59 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Rearrange liblwgeom.h as per Paul's comment on GBT#97: Rename - LWCURVE to LWCIRCSTRING. Also rename lwfree_circstring() to - lwcircstring_free() so that it matches the others (I guess this - was missed in the first pass). + * [r3521] Rearrange liblwgeom.h as per Paul's comment on GBT#97: + Rename LWCURVE to LWCIRCSTRING. Also rename lwfree_circstring() + to lwcircstring_free() so that it matches the others (I guess + this was missed in the first pass). -2009-01-13 12:27 mcayland +2009-01-13 12:27 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Commit for GBT#97: Rename LWCURVE to LWCIRCSTRING (also know as - restoring balance to the universe). + * [r3520] Commit for GBT#97: Rename LWCURVE to LWCIRCSTRING (also + know as restoring balance to the universe). Having gone through and re-read sections of the CIRCULARSTRING code, it is amazing how much easier the code is to read without @@ -5523,140 +25375,143 @@ torture script. Please let me know if I accidentally broke anything :) -2009-01-12 19:29 pramsey +2009-01-12 19:29 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove double-free problem from loader in presence of new + * [r3519] Remove double-free problem from loader in presence of new deep-freeing lwfree calls. -2009-01-12 14:38 robe +2009-01-12 14:38 Regina Obe <lr@pcorp.us> - * typos + * [r3518] typos -2009-01-12 14:24 robe +2009-01-12 14:24 Regina Obe <lr@pcorp.us> - * Correct. ST_LinestringFromText does not exist though was + * [r3517] Correct. ST_LinestringFromText does not exist though was documented before. -2009-01-12 13:54 robe +2009-01-12 13:54 Regina Obe <lr@pcorp.us> - * Move over ST_Line functions and point out how pointless they are. - Also correct incorrect statement that they throw errors when - given non-line - they just return null. + * [r3516] Move over ST_Line functions and point out how pointless + they are. Also correct incorrect statement that they throw errors + when given non-line - they just return null. -2009-01-12 12:23 mcayland +2009-01-12 12:23 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Remove erroneus merge from r3502 (HAVE_CUNIT_H just isn't defined - anymore...) + * [r3515] Remove erroneus merge from r3502 (HAVE_CUNIT_H just isn't + defined anymore...) -2009-01-11 07:10 pramsey +2009-01-11 07:10 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove RECHECK per GBT#18. + * [r3514] Remove RECHECK per GBT#18. -2009-01-09 23:04 robe +2009-01-09 23:04 Regina Obe <lr@pcorp.us> - * Fix typo + * [r3513] Fix typo -2009-01-09 22:52 robe +2009-01-09 22:52 Regina Obe <lr@pcorp.us> - * Move over rest of miscellaneous -- NOTE st_find_srid does not - exist - was never renamed from find_srid. Not sure its worth + * [r3512] Move over rest of miscellaneous -- NOTE st_find_srid does + not exist - was never renamed from find_srid. Not sure its worth fixing since its rarely used anyway. -2009-01-09 19:17 pramsey +2009-01-09 19:17 Paul Ramsey <pramsey@cleverelephant.ca> - * Rename lwfree_inspected to lwinspected_release, per it's "shallow - free" behavior. + * [r3511] Rename lwfree_inspected to lwinspected_release, per it's + "shallow free" behavior. -2009-01-09 17:41 pramsey +2009-01-09 17:41 Paul Ramsey <pramsey@cleverelephant.ca> - * Rename lwfree_* to *_free. + * [r3510] Rename lwfree_* to *_free. -2009-01-09 14:15 robe +2009-01-09 14:15 Regina Obe <lr@pcorp.us> - * Missed some ST_ spots. + * [r3509] Missed some ST_ spots. -2009-01-09 13:49 robe +2009-01-09 13:49 Regina Obe <lr@pcorp.us> - * Missed a spot. + * [r3508] Missed a spot. -2009-01-09 13:48 robe +2009-01-09 13:48 Regina Obe <lr@pcorp.us> - * Using - fix some connectiontype omissions in Mapserver section, - add in processing defer comment, fix some missing ST_ + * [r3507] Using - fix some connectiontype omissions in Mapserver + section, add in processing defer comment, fix some missing ST_ -2009-01-09 13:32 robe +2009-01-09 13:32 Regina Obe <lr@pcorp.us> - * Add circular string note + * [r3506] Add circular string note -2009-01-09 13:29 robe +2009-01-09 13:29 Regina Obe <lr@pcorp.us> - * Move over ST_NRings + * [r3505] Move over ST_NRings -2009-01-09 13:17 robe +2009-01-09 13:17 Regina Obe <lr@pcorp.us> - * Move over ST_Zmflag + * [r3504] Move over ST_Zmflag -2009-01-08 17:22 pramsey +2009-01-08 17:22 Paul Ramsey <pramsey@cleverelephant.ca> - * Forgot to save this file. Also changes to lwfree_* *_release. + * [r3503] Forgot to save this file. Also changes to lwfree_* + *_release. -2009-01-08 17:04 pramsey +2009-01-08 17:04 Paul Ramsey <pramsey@cleverelephant.ca> - * Alter lwfree_* to deep-free memory. Add variants of *_release to - support shallow-free. Go through lwgeom/ and replace any lwfree_* - instances with *_release where appropriate. (Surprisingly few.) + * [r3502] Alter lwfree_* to deep-free memory. Add variants of + *_release to support shallow-free. Go through lwgeom/ and replace + any lwfree_* instances with *_release where appropriate. + (Surprisingly few.) -2009-01-08 16:06 robe +2009-01-08 16:06 Regina Obe <lr@pcorp.us> - * documentatioin out of synch with reality since garden test - failing. Change spelling ST_CrossingDirection to new name + * [r3501] documentatioin out of synch with reality since garden + test failing. Change spelling ST_CrossingDirection to new name ST_LineCrossingDirection -2009-01-08 15:50 robe +2009-01-08 15:50 Regina Obe <lr@pcorp.us> - * put in valid name space (giving error with my xsltproc otherwise) + * [r3500] put in valid name space (giving error with my xsltproc + otherwise) -2009-01-07 19:40 robe +2009-01-07 19:40 Regina Obe <lr@pcorp.us> - * Finish off adding multi garden geometries + * [r3499] Finish off adding multi garden geometries -2009-01-07 18:25 kneufeld +2009-01-07 18:25 Kevin Neufeld <kneufeld.ca@gmail.com> - * updated documention on addgeometrycolumn, clarifying the errors - thrown. + * [r3498] updated documention on addgeometrycolumn, clarifying the + errors thrown. -2009-01-07 12:11 mcayland +2009-01-07 12:11 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Bump some LWDEBUG(F) from level 1 up to levels 3-4 (level 1 is - reserved) + * [r3496] Bump some LWDEBUG(F) from level 1 up to levels 3-4 (level + 1 is reserved) -2009-01-07 01:16 pramsey +2009-01-07 01:16 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove memory leak in standard loader. + * [r3495] Remove memory leak in standard loader. -2009-01-05 20:54 mcayland +2009-01-05 20:54 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Allow CPPFLAGS/LDFLAGS parameters from the command line to be - passed into the CUnit Makefile, since CUnit is the only + * [r3494] Allow CPPFLAGS/LDFLAGS parameters from the command line + to be passed into the CUnit Makefile, since CUnit is the only dependency that cannot determine its own flags using a --with-X parameter. This allows CUnit to be installed in a non-standard location if required. -2009-01-05 14:44 robe +2009-01-05 14:44 Regina Obe <lr@pcorp.us> - * Put circular back in mix. Doesn't crash now that MCA changed - distance to throw error. + * [r3493] Put circular back in mix. Doesn't crash now that MCA + changed distance to throw error. -2009-01-05 00:08 mcayland +2009-01-05 00:08 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Rework the CUnit detection infrastructure as you can't locate - include files based on an absolute path. This is because autoconf - and the compiler have differing ideas of the current paths (this - totally breaks the Win32 build since you have the extra mapping - between UNIX-type MingW paths and Windows-type paths). Hopefully - this should not affect existing users at all - if so, please post - a report on -devel. I'll try running this on MingW at a later - date. + * [r3492] Rework the CUnit detection infrastructure as you can't + locate include files based on an absolute path. This is because + autoconf and the compiler have differing ideas of the current + paths (this totally breaks the Win32 build since you have the + extra mapping between UNIX-type MingW paths and Windows-type + paths). Hopefully this should not affect existing users at all - + if so, please post a report on -devel. I'll try running this on + MingW at a later date. I've also enforced "make check" to run the unit tests, rather than "make test". This is a fallout from the early days when strk @@ -5664,1020 +25519,1036 @@ accident which appears to have stuck :( . -2009-01-04 20:39 mcayland +2009-01-04 20:39 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix comment in lwgeom_from_ewkt() and also add a quick error - check to lwgeom_from_ewkt() and lwgeom_from_ewkb() - otherwise - upon parse failure we could pass a half-baked geometry back to - the caller which would not be good :( + * [r3491] Fix comment in lwgeom_from_ewkt() and also add a quick + error check to lwgeom_from_ewkt() and lwgeom_from_ewkb() - + otherwise upon parse failure we could pass a half-baked geometry + back to the caller which would not be good :( -2009-01-04 20:11 mcayland +2009-01-04 20:11 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Update the cunit tests to use the proper parser flag + * [r3490] Update the cunit tests to use the proper parser flag PARSER_CHECK_NONE rather than the hard-coded zero. -2009-01-04 19:54 mcayland +2009-01-04 19:54 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Add -lm to the cu_tester link line - we must always add this to - the link line for anything that links agains liblwgeom.a (at - least on my Linux system here) + * [r3489] Add -lm to the cu_tester link line - we must always add + this to the link line for anything that links agains liblwgeom.a + (at least on my Linux system here) -2009-01-04 19:24 mcayland +2009-01-04 19:24 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Commit quick fix for GBT#85: ST_Distance crashes on Circular - String. Rather than devise and implement a set of distance - functions for CIRCULARSTRINGs, I've simply added code to detect - the condition and throw an "Unsupported geometry type" error, - similar to as already exists within the codebase. + * [r3487] Commit quick fix for GBT#85: ST_Distance crashes on + Circular String. Rather than devise and implement a set of + distance functions for CIRCULARSTRINGs, I've simply added code to + detect the condition and throw an "Unsupported geometry type" + error, similar to as already exists within the codebase. -2009-01-02 13:25 robe +2009-01-02 13:25 Regina Obe <lr@pcorp.us> - * minor update + * [r3486] minor update -2009-01-02 13:23 robe +2009-01-02 13:23 Regina Obe <lr@pcorp.us> - * Add ST_DumpPoints. Not sure how simple it is. + * [r3485] Add ST_DumpPoints. Not sure how simple it is. -2009-01-01 21:36 robe +2009-01-01 21:36 Regina Obe <lr@pcorp.us> - * Put time stamp placeholder on (I think) + * [r3484] Put time stamp placeholder on (I think) -2009-01-01 21:26 robe +2009-01-01 21:26 Regina Obe <lr@pcorp.us> - * Fix typo + * [r3483] Fix typo -2009-01-01 00:31 pramsey +2009-01-01 00:31 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix based on test case from MAC. + * [r3482] Fix based on test case from MAC. -2008-12-27 22:58 pramsey +2008-12-27 22:58 Paul Ramsey <pramsey@cleverelephant.ca> - * Add support for multilinestring to st_locatebetweenelevations + * [r3481] Add support for multilinestring to + st_locatebetweenelevations -2008-12-27 08:08 pramsey +2008-12-27 08:08 Paul Ramsey <pramsey@cleverelephant.ca> - * Add heat map case. + * [r3480] Add heat map case. -2008-12-24 20:15 pramsey +2008-12-24 20:15 Paul Ramsey <pramsey@cleverelephant.ca> - * Add mline version of clipper. + * [r3479] Add mline version of clipper. -2008-12-24 17:37 pramsey +2008-12-24 17:37 Paul Ramsey <pramsey@cleverelephant.ca> - * Add lwfree_geom to generically deep-free lwgeometries. + * [r3478] Add lwfree_geom to generically deep-free lwgeometries. -2008-12-24 17:09 pramsey +2008-12-24 17:09 Paul Ramsey <pramsey@cleverelephant.ca> - * Add lwgeom_from_ewkt and change larger cunit tests to create - candidate geometries from text instead of by hand. + * [r3477] Add lwgeom_from_ewkt and change larger cunit tests to + create candidate geometries from text instead of by hand. -2008-12-24 00:32 mcayland +2008-12-24 00:32 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Try and commit a pre-generated output from flex that works for - the build-bot. + * [r3476] Try and commit a pre-generated output from flex that + works for the build-bot. -2008-12-23 22:11 pramsey +2008-12-23 22:11 Paul Ramsey <pramsey@cleverelephant.ca> - * Revert accidental commit of lex.yy.c + * [r3475] Revert accidental commit of lex.yy.c -2008-12-23 20:20 pramsey +2008-12-23 20:20 Paul Ramsey <pramsey@cleverelephant.ca> - * Rename new functions to ST_LineCrossingDirection and + * [r3474] Rename new functions to ST_LineCrossingDirection and ST_LocateBetweenElevations for more explicitness and closer correspondance to SQL/MM, respectively. Add a new geometry counter for collections. -2008-12-23 13:24 robe +2008-12-23 13:24 Regina Obe <lr@pcorp.us> - * Break out multi as separate geometry types and start putting in. - Remove unary/aggregate geom since now exactly the same as section - that takes only 1 geometry. + * [r3473] Break out multi as separate geometry types and start + putting in. Remove unary/aggregate geom since now exactly the + same as section that takes only 1 geometry. -2008-12-22 23:37 pramsey +2008-12-22 23:37 Paul Ramsey <pramsey@cleverelephant.ca> - * Add CUnit to main 'make test' build and check for existance of - CUnit.h as part of ./configure + * [r3472] Add CUnit to main 'make test' build and check for + existance of CUnit.h as part of ./configure -2008-12-22 21:49 mcayland +2008-12-22 21:49 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix typo in the backticks when extracting linker/include flags - from pg_config. Resolving this allows SVN trunk to compile on - MingW! :) + * [r3471] Fix typo in the backticks when extracting linker/include + flags from pg_config. Resolving this allows SVN trunk to compile + on MingW! :) -2008-12-22 17:49 robe +2008-12-22 17:49 Regina Obe <lr@pcorp.us> - * More typos + * [r3470] More typos -2008-12-22 17:48 robe +2008-12-22 17:48 Regina Obe <lr@pcorp.us> - * More typos + * [r3469] More typos -2008-12-22 17:47 robe +2008-12-22 17:47 Regina Obe <lr@pcorp.us> - * typo + * [r3468] typo -2008-12-22 16:54 robe +2008-12-22 16:54 Regina Obe <lr@pcorp.us> - * Missed a constant + * [r3467] Missed a constant -2008-12-22 16:53 robe +2008-12-22 16:53 Regina Obe <lr@pcorp.us> - * First draft of ST_CrossingDirection -- needs more work + * [r3466] First draft of ST_CrossingDirection -- needs more work -2008-12-22 15:22 robe +2008-12-22 15:22 Regina Obe <lr@pcorp.us> - * More conditional corrections. Also take circular back out of test - since still crashes under 1.4 with ST_Distance. + * [r3465] More conditional corrections. Also take circular back out + of test since still crashes under 1.4 with ST_Distance. -2008-12-22 14:14 robe +2008-12-22 14:14 Regina Obe <lr@pcorp.us> - * Revision - change to not test geoms against other geoms if - function only takes one geom, better commenting of output. Put + * [r3464] Revision - change to not test geoms against other geoms + if function only takes one geom, better commenting of output. Put back circularstring -- crashes on 1.3 still on ST_Distance in some cases. Haven't tested against trunk -2008-12-22 12:15 mcayland +2008-12-22 12:15 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Remove the few C++-style comments that have crept into the - codebase, and add a note to the STYLE document stating that + * [r3462] Remove the few C++-style comments that have crept into + the codebase, and add a note to the STYLE document stating that C-style comments should be used. -2008-12-22 11:51 mcayland +2008-12-22 11:51 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Remove the WKB_CONVERSION hack which was invented to try and make - the JTS connector more reliable. Since all the other JTS code has - gone, this can now go too. See + * [r3461] Remove the WKB_CONVERSION hack which was invented to try + and make the JTS connector more reliable. Since all the other JTS + code has gone, this can now go too. See http://postgis.refractions.net/pipermail/postgis-devel/2008-August/003495.html for a little discussion. -2008-12-22 11:38 mcayland +2008-12-22 11:38 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Errr.... unsigned *what* exactly??! If you'd have asked me - yesterday if I thought this would compile, I would have said + * [r3460] Errr.... unsigned *what* exactly??! If you'd have asked + me yesterday if I thought this would compile, I would have said no... -2008-12-22 11:11 mcayland +2008-12-22 11:11 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Some code tidy-ups: remove Windows CR/LFs from the file, change - the free()s into lwfree()s, and fix a spelling mistake. + * [r3459] Some code tidy-ups: remove Windows CR/LFs from the file, + change the free()s into lwfree()s, and fix a spelling mistake. -2008-12-22 09:30 robe +2008-12-22 09:30 Regina Obe <lr@pcorp.us> - * revert part of last change + * [r3458] revert part of last change -2008-12-22 08:39 robe +2008-12-22 08:39 Regina Obe <lr@pcorp.us> - * correction to last edit + * [r3457] correction to last edit -2008-12-21 06:37 pramsey +2008-12-21 06:37 Paul Ramsey <pramsey@cleverelephant.ca> - * Add ST_LineClipZ(geometry, from, to) SQL and C functions. + * [r3456] Add ST_LineClipZ(geometry, from, to) SQL and C functions. -2008-12-19 19:21 pramsey +2008-12-19 19:21 Paul Ramsey <pramsey@cleverelephant.ca> - * Complete c-level line clipping routines, and unit tests. + * [r3455] Complete c-level line clipping routines, and unit tests. -2008-12-19 19:20 pramsey +2008-12-19 19:20 Paul Ramsey <pramsey@cleverelephant.ca> - * Add in lwfree_* deep memory clean-up routines for multi-objects. + * [r3454] Add in lwfree_* deep memory clean-up routines for + multi-objects. -2008-12-19 18:51 kneufeld +2008-12-19 18:51 Kevin Neufeld <kneufeld.ca@gmail.com> - * Upgraded section in using_postgis.xml that talks about OGC - Simplicity / Validity. + * [r3453] Upgraded section in using_postgis.xml that talks about + OGC Simplicity / Validity. -2008-12-19 16:57 pramsey +2008-12-19 16:57 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove camelCase example from style guideline against camelCase - (! :) + * [r3452] Remove camelCase example from style guideline against + camelCase (! :) -2008-12-19 14:59 mcayland +2008-12-19 14:59 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Remove the PostGIS LWGEOM type constants from pgsql2shp - they - are no longer needed here as they are included as part of + * [r3451] Remove the PostGIS LWGEOM type constants from pgsql2shp - + they are no longer needed here as they are included as part of liblwgeom.h. -2008-12-18 20:42 pramsey +2008-12-18 20:42 Paul Ramsey <pramsey@cleverelephant.ca> - * Complete the pfree_ to lwfree_ renaming. + * [r3450] Complete the pfree_ to lwfree_ renaming. -2008-12-18 20:36 pramsey +2008-12-18 20:36 Paul Ramsey <pramsey@cleverelephant.ca> - * Move curve back down below curve struct. Hm. + * [r3449] Move curve back down below curve struct. Hm. -2008-12-18 20:35 pramsey +2008-12-18 20:35 Paul Ramsey <pramsey@cleverelephant.ca> - * Complete the pfree_* to lwfree_* renaming. + * [r3448] Complete the pfree_* to lwfree_* renaming. -2008-12-18 20:30 pramsey +2008-12-18 20:30 Paul Ramsey <pramsey@cleverelephant.ca> - * Rename pfree_* memory management function lwfree_* + * [r3447] Rename pfree_* memory management function lwfree_* -2008-12-18 20:22 pramsey +2008-12-18 20:22 Paul Ramsey <pramsey@cleverelephant.ca> - * Partial work commit for safety + * [r3446] Partial work commit for safety -2008-12-18 17:07 pramsey +2008-12-18 17:07 Paul Ramsey <pramsey@cleverelephant.ca> - * Ignore generated Makefile + * [r3445] Ignore generated Makefile -2008-12-18 15:58 robe +2008-12-18 15:58 Regina Obe <lr@pcorp.us> - * Revise to cross every geometry with every other to better test - the functions that take 2 geometries. This increases the + * [r3444] Revise to cross every geometry with every other to better + test the functions that take 2 geometries. This increases the generated script to about 18 MB. Still need to trim off some of these tests (since it does the same for singular geom functions) -2008-12-18 15:38 robe +2008-12-18 15:38 Regina Obe <lr@pcorp.us> - * Get rid of redundant variable declares + * [r3443] Get rid of redundant variable declares -2008-12-18 15:32 robe +2008-12-18 15:32 Regina Obe <lr@pcorp.us> - * Get rid of 2 geom relation section. Its redundant now that the - last condition section has been improved. + * [r3442] Get rid of 2 geom relation section. Its redundant now + that the last condition section has been improved. -2008-12-18 15:25 robe +2008-12-18 15:25 Regina Obe <lr@pcorp.us> - * Numerous enhancements to make torture script generator smarter - - e.g. don't use geometry select when function takes not + * [r3441] Numerous enhancements to make torture script generator + smarter - e.g. don't use geometry select when function takes not geometries, don't put monkey in when you see pattern matrix use a real intersectionmatrix, concept of version -2008-12-18 00:54 pramsey +2008-12-18 00:54 Paul Ramsey <pramsey@cleverelephant.ca> - * Partial work saved back for later. + * [r3440] Partial work saved back for later. -2008-12-17 20:47 pramsey +2008-12-17 20:47 Paul Ramsey <pramsey@cleverelephant.ca> - * Partial work into SVN where I can get at it elsewhere. + * [r3439] Partial work into SVN where I can get at it elsewhere. -2008-12-17 20:22 pramsey +2008-12-17 20:22 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove LFs from regression files per MCA. + * [r3438] Remove LFs from regression files per MCA. -2008-12-17 19:37 mcayland +2008-12-17 19:37 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * #HISTORY: Really fix what was broken in r3431/3432. See the notes - there for the full detail. + * [r3436] #HISTORY: Really fix what was broken in r3431/3432. See + the notes there for the full detail. -2008-12-17 18:20 pramsey +2008-12-17 18:20 Paul Ramsey <pramsey@cleverelephant.ca> - * Re-locate cunit, add a STYLE guideline draft and some TODO notes. + * [r3435] Re-locate cunit, add a STYLE guideline draft and some + TODO notes. -2008-12-17 16:03 mcayland +2008-12-17 16:03 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Undo r3431/3432: this isn't ready for the primetime yet as it - breaks a couple of the regression tests. + * [r3433] Undo r3431/3432: this isn't ready for the primetime yet + as it breaks a couple of the regression tests. -2008-12-17 15:01 mcayland +2008-12-17 15:01 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix for one of Regina's torture failures as posted to the -devel - list here: + * [r3431] Fix for one of Regina's torture failures as posted to the + -devel list here: http://postgis.refractions.net/pipermail/postgis-devel/2008-December/004362.html. A CurvePolygon has a "standard header" and so must be passed through a function that understands the optional existence of SRIDs/BBOXes etc. in the header. -2008-12-17 05:36 pramsey +2008-12-17 05:36 Paul Ramsey <pramsey@cleverelephant.ca> - * harmonize unit tests with new function names + * [r3430] harmonize unit tests with new function names -2008-12-17 05:32 pramsey +2008-12-17 05:32 Paul Ramsey <pramsey@cleverelephant.ca> - * harmonize function names so things... compile + * [r3429] harmonize function names so things... compile -2008-12-17 05:28 pramsey +2008-12-17 05:28 Paul Ramsey <pramsey@cleverelephant.ca> - * Revisison per MCA and (c) headers. + * [r3428] Revisison per MCA and (c) headers. -2008-12-17 00:22 pramsey +2008-12-17 00:22 Paul Ramsey <pramsey@cleverelephant.ca> - * Add some co-linearity tests. + * [r3427] Add some co-linearity tests. -2008-12-17 00:19 pramsey +2008-12-17 00:19 Paul Ramsey <pramsey@cleverelephant.ca> - * Basic co-linearity support. Remove touching cases from + * [r3426] Basic co-linearity support. Remove touching cases from crossingdirection. -2008-12-16 23:43 pramsey +2008-12-16 23:43 Paul Ramsey <pramsey@cleverelephant.ca> - * Add ST_CrossingDirection(line, line) bindings into SQL. + * [r3425] Add ST_CrossingDirection(line, line) bindings into SQL. -2008-12-16 22:29 pramsey +2008-12-16 22:29 Paul Ramsey <pramsey@cleverelephant.ca> - * First cut of line crossing function, and associated cunit tests. + * [r3424] First cut of line crossing function, and associated cunit + tests. -2008-12-16 21:21 kneufeld +2008-12-16 21:21 Kevin Neufeld <kneufeld.ca@gmail.com> - * fixed bug in probe_geometry_columns where an srid of -1 is not - properly detected. (last time :)) + * [r3423] fixed bug in probe_geometry_columns where an srid of -1 + is not properly detected. (last time :)) -2008-12-16 21:11 kneufeld +2008-12-16 21:11 Kevin Neufeld <kneufeld.ca@gmail.com> - * fixed bug in probe_geometry_columns where an srid of -1 is not - properly detected. + * [r3422] fixed bug in probe_geometry_columns where an srid of -1 + is not properly detected. -2008-12-16 21:07 kneufeld +2008-12-16 21:07 Kevin Neufeld <kneufeld.ca@gmail.com> - * fixed bug in probe_geometry_columns where an srid of -1 is not - properly detected. + * [r3421] fixed bug in probe_geometry_columns where an srid of -1 + is not properly detected. -2008-12-16 16:22 robe +2008-12-16 16:22 Regina Obe <lr@pcorp.us> - * More changes - can't remember + * [r3420] More changes - can't remember -2008-12-16 13:01 robe +2008-12-16 13:01 Regina Obe <lr@pcorp.us> - * Add cross reference to ST_IsValidReason on ST_IsValid and + * [r3419] Add cross reference to ST_IsValidReason on ST_IsValid and ST_Summary -2008-12-16 12:40 robe +2008-12-16 12:40 Regina Obe <lr@pcorp.us> - * Fix formatting of ForceRHR args -- messing up torture test - generator + * [r3417] Fix formatting of ForceRHR args -- messing up torture + test generator -2008-12-15 14:50 robe +2008-12-15 14:50 Regina Obe <lr@pcorp.us> - * missing the st_geomfromtext among others because of bad + * [r3411] missing the st_geomfromtext among others because of bad conditions - switched to xsl:choose to simplify logic. -2008-12-15 13:36 robe +2008-12-15 13:36 Regina Obe <lr@pcorp.us> - * minor comment addition + * [r3410] minor comment addition -2008-12-15 12:56 robe +2008-12-15 12:56 Regina Obe <lr@pcorp.us> - * add more data types. Remove curve tests again -- too many + * [r3409] add more data types. Remove curve tests again -- too many crashers -2008-12-15 12:36 robe +2008-12-15 12:36 Regina Obe <lr@pcorp.us> - * Typo in data type param + * [r3408] Typo in data type param -2008-12-15 10:30 mcayland +2008-12-15 10:30 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * #HISTORY: Fix for GBT#83: "ST_Multi on curved polygon gives - ERROR: Unknown geometry type: 0". On reflection, ST_Multi() can - only operate on standard POINT, LINESTRING and POLYGON types as - the only MULTI geomtypes are MULTIPOINT, MULTILINESTRING and + * [r3406] #HISTORY: Fix for GBT#83: "ST_Multi on curved polygon + gives ERROR: Unknown geometry type: 0". On reflection, ST_Multi() + can only operate on standard POINT, LINESTRING and POLYGON types + as the only MULTI geomtypes are MULTIPOINT, MULTILINESTRING and MULTIPOLYGON. This was caused by the introduction of the curve crashing fixes in 1.3.4. -2008-12-15 05:33 robe +2008-12-15 05:33 Regina Obe <lr@pcorp.us> - * more cleanup + * [r3405] more cleanup -2008-12-15 05:03 robe +2008-12-15 05:03 Regina Obe <lr@pcorp.us> - * Think I got most of the functions with additional args, left out - circular since it crashes. We can fix in 1.4 + * [r3404] Think I got most of the functions with additional args, + left out circular since it crashes. We can fix in 1.4 -2008-12-15 04:12 robe +2008-12-15 04:12 Regina Obe <lr@pcorp.us> - * replace param logic + * [r3403] replace param logic -2008-12-15 02:38 robe +2008-12-15 02:38 Regina Obe <lr@pcorp.us> - * #GBT 84: Fix typo in boundary error + * [r3401] #GBT 84: Fix typo in boundary error -2008-12-14 15:14 robe +2008-12-14 15:14 Regina Obe <lr@pcorp.us> - * Add circular string and curved polygon to garden set. Also start - work on dealing with functions that take floats and integers as - additional params + * [r3400] Add circular string and curved polygon to garden set. + Also start work on dealing with functions that take floats and + integers as additional params -2008-12-14 07:24 robe +2008-12-14 07:24 Regina Obe <lr@pcorp.us> - * Exclude st_curvetoline from test for now. Crashes on geometry - collection test. + * [r3399] Exclude st_curvetoline from test for now. Crashes on + geometry collection test. -2008-12-14 03:19 robe +2008-12-14 03:19 Regina Obe <lr@pcorp.us> - * Add GEOMETRYCOLLECTION to garden mix. This crashes my 1.3.5SVN - build after running generated script - investigating + * [r3398] Add GEOMETRYCOLLECTION to garden mix. This crashes my + 1.3.5SVN build after running generated script - investigating -2008-12-14 03:10 robe +2008-12-14 03:10 Regina Obe <lr@pcorp.us> - * Add logic to test for unary functions that take box2d/3d and add - 3d geometries to garden set. + * [r3397] Add logic to test for unary functions that take box2d/3d + and add 3d geometries to garden set. -2008-12-14 01:50 robe +2008-12-14 01:50 Regina Obe <lr@pcorp.us> - * Add create table, add geom, drop column, drop table to batch of - tortures + * [r3396] Add create table, add geom, drop column, drop table to + batch of tortures -2008-12-13 19:48 pramsey +2008-12-13 19:48 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove isvalidreason, it's done. + * [r3395] Remove isvalidreason, it's done. -2008-12-13 19:47 pramsey +2008-12-13 19:47 Paul Ramsey <pramsey@cleverelephant.ca> - * Add typmod idea + * [r3394] Add typmod idea -2008-12-12 17:07 robe +2008-12-12 17:07 Regina Obe <lr@pcorp.us> - * Fix condition statement that prevented some 2 geom functions from - being picked up + * [r3393] Fix condition statement that prevented some 2 geom + functions from being picked up -2008-12-12 16:55 robe +2008-12-12 16:55 Regina Obe <lr@pcorp.us> - * Added POLYGONM gset to test. Also got rid of monkey crashing - LineMerge. May add back later by removing the NOT (j=i) + * [r3392] Added POLYGONM gset to test. Also got rid of monkey + crashing LineMerge. May add back later by removing the NOT (j=i) conditions. -2008-12-12 16:49 robe +2008-12-12 16:49 Regina Obe <lr@pcorp.us> - * Note that ST_MakePolygon can be used to make measured polys and - 3d polys + * [r3391] Note that ST_MakePolygon can be used to make measured + polys and 3d polys -2008-12-12 16:26 robe +2008-12-12 16:26 Regina Obe <lr@pcorp.us> - * use strcmp for compare instead of comparing first element in - projcreate + * [r3390] use strcmp for compare instead of comparing first element + in projcreate -2008-12-12 14:20 robe +2008-12-12 14:20 Regina Obe <lr@pcorp.us> - * get rid of accidentally copied comment + * [r3389] get rid of accidentally copied comment -2008-12-12 14:11 robe +2008-12-12 14:11 Regina Obe <lr@pcorp.us> - * Add relationship/ functions that act on 2 geometries tests to the - mix + * [r3388] Add relationship/ functions that act on 2 geometries + tests to the mix -2008-12-12 13:40 robe +2008-12-12 13:40 Regina Obe <lr@pcorp.us> - * Add POINTM and LINESTRINGM to garden family + * [r3387] Add POINTM and LINESTRINGM to garden family -2008-12-12 13:17 robe +2008-12-12 13:17 Regina Obe <lr@pcorp.us> - * Remove Postgis_JTS_Version from docs. No longer in 1.4 code base. + * [r3386] Remove Postgis_JTS_Version from docs. No longer in 1.4 + code base. -2008-12-12 13:05 robe +2008-12-12 13:05 Regina Obe <lr@pcorp.us> - * Revise to use an xml collection instead of repetitive loops. Also - put in select start and end so when the server crashes you know - where it broke. + * [r3385] Revise to use an xml collection instead of repetitive + loops. Also put in select start and end so when the server + crashes you know where it broke. -2008-12-12 11:07 mcayland +2008-12-12 11:07 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Looks like I accidentally removed some code from LWGEOM_accum - that was required to set the Oid of the array being used to store - the aggregate results. As reported by Regina. + * [r3384] Looks like I accidentally removed some code from + LWGEOM_accum that was required to set the Oid of the array being + used to store the aggregate results. As reported by Regina. -2008-12-11 19:38 robe +2008-12-11 19:38 Regina Obe <lr@pcorp.us> - * Fix typo in geometry test + * [r3381] Fix typo in geometry test -2008-12-11 18:57 robe +2008-12-11 18:57 Regina Obe <lr@pcorp.us> - * put in the svn:keywords thingy and also update postgis_gardentest - to generate garden test for all unary postgis functions and - aggregates + * [r3380] put in the svn:keywords thingy and also update + postgis_gardentest to generate garden test for all unary postgis + functions and aggregates -2008-12-11 17:18 kneufeld +2008-12-11 17:18 Kevin Neufeld <kneufeld.ca@gmail.com> - * added a HINT to the ERROR message in errorIfGeometryCollection - indicating the geometry that is in error. + * [r3379] added a HINT to the ERROR message in + errorIfGeometryCollection indicating the geometry that is in + error. -2008-12-11 16:56 robe +2008-12-11 16:56 Regina Obe <lr@pcorp.us> - * First draft of garden test sql generator. This version just - searches the docs and outputs tests for functions that take no - arguments. Need to formulate a list of geometries to generate + * [r3378] First draft of garden test sql generator. This version + just searches the docs and outputs tests for functions that take + no arguments. Need to formulate a list of geometries to generate code for unary and so forth. -2008-12-11 15:56 robe +2008-12-11 15:56 Regina Obe <lr@pcorp.us> - * Incorporated Mark's suggestion to use PQescapeStringConn instead - of building a custom function. Also fixed typo. Note using free() - instead of PQfree since couldn't find a PQfree. I looked at the - 8.3.5 postgresql source code base, and that's what they seem to - use when releasing buffer space. + * [r3377] Incorporated Mark's suggestion to use PQescapeStringConn + instead of building a custom function. Also fixed typo. Note + using free() instead of PQfree since couldn't find a PQfree. I + looked at the 8.3.5 postgresql source code base, and that's what + they seem to use when releasing buffer space. -2008-12-11 14:55 mcayland +2008-12-11 14:55 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Increase the amount of allocated memory by 3 bytes, so that if - maxlength < 3 and we return just "..." then we still have enough - space to store the string without clobbering memory. + * [r3376] Increase the amount of allocated memory by 3 bytes, so + that if maxlength < 3 and we return just "..." then we still have + enough space to store the string without clobbering memory. -2008-12-11 13:46 mcayland +2008-12-11 13:46 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix up a couple of errors in the new lwmessage_truncate() + * [r3375] Fix up a couple of errors in the new lwmessage_truncate() function found by Kevin - correct an off-by-one error in the code, and include a missing startpos offset in the end truncation code. Also ensure that if maxlength gets too small then we return "..." rather than crashing. -2008-12-10 12:36 mcayland +2008-12-10 12:36 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Resolve local merge conflict from previous commit. + * [r3374] Resolve local merge conflict from previous commit. -2008-12-10 12:32 mcayland +2008-12-10 12:32 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Add new lwmessage_truncate() function to liblwgeom that will - truncate a string to a maximum number of characters, adding a - "..." to indicate where the string has been trimmed. Truncation + * [r3373] Add new lwmessage_truncate() function to liblwgeom that + will truncate a string to a maximum number of characters, adding + a "..." to indicate where the string has been trimmed. Truncation can be specified to occur from either the start or end of the string as required. Also update the parser error handler to use the new function. -2008-12-09 23:29 mleslie +2008-12-09 23:29 Mark Leslie <mark.leslie@lisasoft.com> - * Porting the floating point comparison operator upgrade from the - 1.3 branch. + * [r3372] Porting the floating point comparison operator upgrade + from the 1.3 branch. -2008-12-07 02:52 robe +2008-12-07 02:52 Regina Obe <lr@pcorp.us> - * correct mm reference of ST_PointFromText and remove from old MM - section + * [r3370] correct mm reference of ST_PointFromText and remove from + old MM section -2008-12-07 02:47 robe +2008-12-07 02:47 Regina Obe <lr@pcorp.us> - * Minor additions + * [r3369] Minor additions -2008-12-07 02:42 robe +2008-12-07 02:42 Regina Obe <lr@pcorp.us> - * fix some typos + * [r3368] fix some typos -2008-12-07 02:29 robe +2008-12-07 02:29 Regina Obe <lr@pcorp.us> - * Move over (x,y,z) min/max family and add cross reference to those - from ST_X, ST_Y, ST_Z + * [r3367] Move over (x,y,z) min/max family and add cross reference + to those from ST_X, ST_Y, ST_Z -2008-12-07 00:40 robe +2008-12-07 00:40 Regina Obe <lr@pcorp.us> - * Move over ST_Box2D and ST_Box3D and flag ST_Accum as working with - circular strings + * [r3366] Move over ST_Box2D and ST_Box3D and flag ST_Accum as + working with circular strings -2008-12-05 19:39 robe +2008-12-05 19:39 Regina Obe <lr@pcorp.us> - * revise example + * [r3365] revise example -2008-12-05 19:31 robe +2008-12-05 19:31 Regina Obe <lr@pcorp.us> - * Clarify use of ST_Relation and include Martin's example of - interior intersects + * [r3364] Clarify use of ST_Relation and include Martin's example + of interior intersects -2008-12-05 13:46 robe +2008-12-05 13:46 Regina Obe <lr@pcorp.us> - * #HISTORY: #GBT:34 - .prj creation by pgsql2shp + * [r3363] #HISTORY: #GBT:34 - .prj creation by pgsql2shp -2008-12-05 12:33 robe +2008-12-05 12:33 Regina Obe <lr@pcorp.us> - * #GBT 80: ST_Multi seg faults when given MULTILINESTRING + * [r3362] #GBT 80: ST_Multi seg faults when given MULTILINESTRING -2008-12-04 17:01 robe +2008-12-04 17:01 Regina Obe <lr@pcorp.us> - * Move over rest of Long Transactions + * [r3360] Move over rest of Long Transactions -2008-12-03 17:12 mcayland +2008-12-03 17:12 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix GBT#79: shp2pgsql does not honor -s (also known as Mark - accidentally missed the sr_id from the geometry constructors) + * [r3359] Fix GBT#79: shp2pgsql does not honor -s (also known as + Mark accidentally missed the sr_id from the geometry + constructors) -2008-12-03 16:02 mcayland +2008-12-03 16:02 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Lightbulb moment: the fix for GBT#21: locate_along_measure: wrong - values, invalid data required extra work as floating point errors - could still be introduced by the removal of the memcpy(). In fact - it was the clipping logic that was wrong, so this patch re-adds - the memcpy() in the correct place(s) and corrects the clipping - flags to remove this floating point error. With thanks to Stephen - Davies. + * [r3357] Lightbulb moment: the fix for GBT#21: + locate_along_measure: wrong values, invalid data required extra + work as floating point errors could still be introduced by the + removal of the memcpy(). In fact it was the clipping logic that + was wrong, so this patch re-adds the memcpy() in the correct + place(s) and corrects the clipping flags to remove this floating + point error. With thanks to Stephen Davies. -2008-12-02 20:04 robe +2008-12-02 20:04 Regina Obe <lr@pcorp.us> - * Remove some junk and fix some typos, rephrase descriptions + * [r3356] Remove some junk and fix some typos, rephrase + descriptions -2008-12-02 20:00 robe +2008-12-02 20:00 Regina Obe <lr@pcorp.us> - * Move over LockRow + * [r3355] Move over LockRow -2008-12-02 19:43 robe +2008-12-02 19:43 Regina Obe <lr@pcorp.us> - * Move over CheckAuth + * [r3354] Move over CheckAuth -2008-12-01 23:34 robe +2008-12-01 23:34 Regina Obe <lr@pcorp.us> - * typo + * [r3353] typo -2008-12-01 22:19 robe +2008-12-01 22:19 Regina Obe <lr@pcorp.us> - * remove extra def + * [r3352] remove extra def -2008-12-01 22:06 robe +2008-12-01 22:06 Regina Obe <lr@pcorp.us> - * Move over Enable/Disable LongTransactions + * [r3351] Move over Enable/Disable LongTransactions -2008-12-01 12:41 robe +2008-12-01 12:41 Regina Obe <lr@pcorp.us> - * Damn casing - wrong fix + * [r3350] Damn casing - wrong fix -2008-12-01 12:38 robe +2008-12-01 12:38 Regina Obe <lr@pcorp.us> - * typo ? + * [r3349] typo ? -2008-12-01 12:13 robe +2008-12-01 12:13 Regina Obe <lr@pcorp.us> - * typo? + * [r3348] typo? -2008-12-01 06:32 robe +2008-12-01 06:32 Regina Obe <lr@pcorp.us> - * Move over ST_HasBBox + * [r3347] Move over ST_HasBBox -2008-12-01 06:26 robe +2008-12-01 06:26 Regina Obe <lr@pcorp.us> - * Move over ST_AddBBox, ST_DropBBox - the last of the Geometry - Editors + * [r3346] Move over ST_AddBBox, ST_DropBBox - the last of the + Geometry Editors -2008-11-28 16:38 pramsey +2008-11-28 16:38 Paul Ramsey <pramsey@cleverelephant.ca> - * wrap isvalidreason in test for GEOS >= 3.1 + * [r3345] wrap isvalidreason in test for GEOS >= 3.1 -2008-11-27 19:04 robe +2008-11-27 19:04 Regina Obe <lr@pcorp.us> - * correction + * [r3344] correction -2008-11-27 18:53 robe +2008-11-27 18:53 Regina Obe <lr@pcorp.us> - * ST_IsValidReason typo and add an example of a valid geometry + * [r3343] ST_IsValidReason typo and add an example of a valid + geometry -2008-11-27 18:31 robe +2008-11-27 18:31 Regina Obe <lr@pcorp.us> - * Document new ST_IsValidReason function. I suppose this may be the - last time I can successfully create invalid geometries before - Mark ruins all the fun. + * [r3342] Document new ST_IsValidReason function. I suppose this + may be the last time I can successfully create invalid geometries + before Mark ruins all the fun. -2008-11-26 19:04 pramsey +2008-11-26 19:04 Paul Ramsey <pramsey@cleverelephant.ca> - * ST_IsValidReason(geometry) returns text reason for validity - failure. + * [r3341] ST_IsValidReason(geometry) returns text reason for + validity failure. Requires GEOS >= 3.1. GBT#51 -2008-11-26 13:40 mcayland +2008-11-26 13:40 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Apply patch from strk to prevent unneccesary invocation of 'ar' - when building liblwgeom. + * [r3340] Apply patch from strk to prevent unneccesary invocation + of 'ar' when building liblwgeom. -2008-11-26 12:11 robe +2008-11-26 12:11 Regina Obe <lr@pcorp.us> - * Correct install docs to agree with README. Not sure if this is - necessary since this is partially for already installed postgis. - Are we going to have an lwgeom folder in contrib? + * [r3339] Correct install docs to agree with README. Not sure if + this is necessary since this is partially for already installed + postgis. Are we going to have an lwgeom folder in contrib? -2008-11-26 11:49 mcayland +2008-11-26 11:49 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Create liblwgeom as a phony dependency, so that any changes to - liblwgeom cause a re-build of liblwgeom.a during "make". Patch - provided by strk. + * [r3338] Create liblwgeom as a phony dependency, so that any + changes to liblwgeom cause a re-build of liblwgeom.a during + "make". Patch provided by strk. -2008-11-26 11:43 mcayland +2008-11-26 11:43 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix some minor errors in the README documentation as indicated by - strk. + * [r3337] Fix some minor errors in the README documentation as + indicated by strk. -2008-11-25 21:46 pramsey +2008-11-25 21:46 Paul Ramsey <pramsey@cleverelephant.ca> - * Bring forward release notes from 1.3.4 + * [r3336] Bring forward release notes from 1.3.4 -2008-11-25 10:42 mcayland +2008-11-25 10:42 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Quick fix for GBT#72: ST_Estimated_Extent sometimes returns null - if table exists but not in current schema. + * [r3335] Quick fix for GBT#72: ST_Estimated_Extent sometimes + returns null if table exists but not in current schema. -2008-11-24 13:18 robe +2008-11-24 13:18 Regina Obe <lr@pcorp.us> - * Fix indentation for estimated_extent example. Document + * [r3326] Fix indentation for estimated_extent example. Document ST_Force_Collection broken when given Circular strings for versions prior to 1.3.4 -2008-11-24 11:04 mcayland +2008-11-24 11:04 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix for GBT#73: ST_Force_Collection crashes with CIRCULARSTRING. - This is basically the same fix for GBT#66: ST_Dump kills backend - when fed CIRCULAR STRING except that it occurs in a different - place. + * [r3325] Fix for GBT#73: ST_Force_Collection crashes with + CIRCULARSTRING. This is basically the same fix for GBT#66: + ST_Dump kills backend when fed CIRCULAR STRING except that it + occurs in a different place. -2008-11-24 11:01 mcayland +2008-11-24 11:01 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Move lwgeom_contains_subgeoms() into liblwgeom core as it seems - it is now required outside of lwgeom_dump.c. + * [r3324] Move lwgeom_contains_subgeoms() into liblwgeom core as it + seems it is now required outside of lwgeom_dump.c. -2008-11-23 19:18 robe +2008-11-23 19:18 Regina Obe <lr@pcorp.us> - * Move over the rest of the ST_Force* family + * [r3320] Move over the rest of the ST_Force* family -2008-11-23 07:22 robe +2008-11-23 07:22 Regina Obe <lr@pcorp.us> - * Move over ST_Estimated_Extent + * [r3319] Move over ST_Estimated_Extent -2008-11-23 06:54 robe +2008-11-23 06:54 Regina Obe <lr@pcorp.us> - * minor changes + * [r3318] minor changes -2008-11-23 06:50 robe +2008-11-23 06:50 Regina Obe <lr@pcorp.us> - * Move over ST_GeomFromWKB + * [r3317] Move over ST_GeomFromWKB -2008-11-21 14:41 robe +2008-11-21 14:41 Regina Obe <lr@pcorp.us> - * typo + * [r3316] typo -2008-11-21 14:30 robe +2008-11-21 14:30 Regina Obe <lr@pcorp.us> - * Fix indentation of examples + * [r3315] Fix indentation of examples -2008-11-21 14:28 robe +2008-11-21 14:28 Regina Obe <lr@pcorp.us> - * GBT #71: Update section 4.2 of docs to describe manual adding to - geometry columns - revision. Add pretty anchor, reference pretty - anchor in AddGeometryColumn reference section. Rearrange order. + * [r3314] GBT #71: Update section 4.2 of docs to describe manual + adding to geometry columns - revision. Add pretty anchor, + reference pretty anchor in AddGeometryColumn reference section. + Rearrange order. -2008-11-21 14:15 robe +2008-11-21 14:15 Regina Obe <lr@pcorp.us> - * GBT #71: Update section 4.2 of docs to describe manual adding to - geometry columns. + * [r3313] GBT #71: Update section 4.2 of docs to describe manual + adding to geometry columns. Decided to just add a new section after -2008-11-21 08:32 robe +2008-11-21 08:32 Regina Obe <lr@pcorp.us> - * + * [r3311] -2008-11-21 08:31 robe +2008-11-21 08:31 Regina Obe <lr@pcorp.us> - * Move over ST_CoordDim + * [r3310] Move over ST_CoordDim -2008-11-20 22:03 mcayland +2008-11-20 22:03 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Located more profile calls using grep and converted them over to - use the new macros. Hopefully I've caught all of them now... + * [r3309] Located more profile calls using grep and converted them + over to use the new macros. Hopefully I've caught all of them + now... -2008-11-20 18:45 mcayland +2008-11-20 18:45 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Found some new locations containing profiling code outside of the - GEOS functions, so swap them over to using the new macros. + * [r3308] Found some new locations containing profiling code + outside of the GEOS functions, so swap them over to using the new + macros. -2008-11-20 15:00 mcayland +2008-11-20 15:00 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Switch GEOS profiling over to use conditional macros, much in the - same way as LWDEBUG(F) has been implemented. This improves code - readability by not having constant #if...#endif sections - throughout the code. I've also changed the variable that + * [r3307] Switch GEOS profiling over to use conditional macros, + much in the same way as LWDEBUG(F) has been implemented. This + improves code readability by not having constant #if...#endif + sections throughout the code. I've also changed the variable that indicates whether profiling has been enabled to POSTGIS_PROFILE, and integrated it into the autoconf configuration. Hence profiling can be enabled by running configure with the --enable-profile option, or setting POSTGIS_PROFILE in postgis_config.h to 1 and re-compiling. -2008-11-20 13:32 robe +2008-11-20 13:32 Regina Obe <lr@pcorp.us> - * typo + * [r3305] typo -2008-11-20 12:55 robe +2008-11-20 12:55 Regina Obe <lr@pcorp.us> - * Add note on ST_Transform and ST_AsKML that they require Proj - support + * [r3304] Add note on ST_Transform and ST_AsKML that they require + Proj support -2008-11-19 13:40 robe +2008-11-19 13:40 Regina Obe <lr@pcorp.us> - * update doc on install to reference geos 3.0.3 + * [r3301] update doc on install to reference geos 3.0.3 -2008-11-17 17:30 robe +2008-11-17 17:30 Regina Obe <lr@pcorp.us> - * amend ST_Mem_Size + * [r3300] amend ST_Mem_Size -2008-11-17 01:00 robe +2008-11-17 01:00 Regina Obe <lr@pcorp.us> - * typos + * [r3299] typos -2008-11-17 00:52 robe +2008-11-17 00:52 Regina Obe <lr@pcorp.us> - * st_mem_size + * [r3298] st_mem_size -2008-11-17 00:05 robe +2008-11-17 00:05 Regina Obe <lr@pcorp.us> - * Document missing ST_AsGML func proto + * [r3296] Document missing ST_AsGML func proto -2008-11-16 15:54 robe +2008-11-16 15:54 Regina Obe <lr@pcorp.us> - * typo + * [r3294] typo -2008-11-15 20:33 robe +2008-11-15 20:33 Regina Obe <lr@pcorp.us> - * Move over ST_Polygon and ST_WKBToSQL, move ST_MakePolygon from - Geometry Processing to Geometry Constructors section + * [r3293] Move over ST_Polygon and ST_WKBToSQL, move ST_MakePolygon + from Geometry Processing to Geometry Constructors section -2008-11-14 23:46 robe +2008-11-14 23:46 Regina Obe <lr@pcorp.us> - * Move over rest of non-MM compliant Geometry Constructor functions + * [r3291] Move over rest of non-MM compliant Geometry Constructor + functions -2008-11-12 17:42 pramsey +2008-11-12 17:42 Paul Ramsey <pramsey@cleverelephant.ca> - * Update with latest BS + * [r3290] Update with latest BS -2008-11-10 16:35 pramsey +2008-11-10 16:35 Paul Ramsey <pramsey@cleverelephant.ca> - * astyle --style=ansi --indent=tab=8 + * [r3284] astyle --style=ansi --indent=tab=8 -2008-11-10 15:48 pramsey +2008-11-10 15:48 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix error in prepgeomcache type + * [r3283] Fix error in prepgeomcache type -2008-11-08 14:43 robe +2008-11-08 14:43 Regina Obe <lr@pcorp.us> - * Document affine functions now work with curves. Though I don't - have a tool to verify correctness, so my assumption - it returns - something that sounds sort of right. + * [r3282] Document affine functions now work with curves. Though I + don't have a tool to verify correctness, so my assumption - it + returns something that sounds sort of right. -2008-11-08 14:17 robe +2008-11-08 14:17 Regina Obe <lr@pcorp.us> - * document more functions that work with circular strings + * [r3281] document more functions that work with circular strings -2008-11-08 06:46 robe +2008-11-08 06:46 Regina Obe <lr@pcorp.us> - * document support for curves of functions Mark C just fixed with - disclaimer only works in 1.3.4+ + * [r3280] document support for curves of functions Mark C just + fixed with disclaimer only works in 1.3.4+ -2008-11-07 17:07 pramsey +2008-11-07 17:07 Paul Ramsey <pramsey@cleverelephant.ca> - * Prepared geometry mixed-types bug fix ported forward from 1.3. + * [r3279] Prepared geometry mixed-types bug fix ported forward from + 1.3. -2008-11-07 14:23 mcayland +2008-11-07 14:23 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * After a quick sanity grep, I noticed that ST_Transform() was also - susceptible to crashing on curve types in the same way as the - previous two fixes. Hence I'm committing a fix now before Regina - finds it and logs another bug report :) + * [r3278] After a quick sanity grep, I noticed that ST_Transform() + was also susceptible to crashing on curve types in the same way + as the previous two fixes. Hence I'm committing a fix now before + Regina finds it and logs another bug report :) -2008-11-07 14:21 mcayland +2008-11-07 14:21 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix GBT#69: ST_Translate crashes when fed circular string. - lwgeom_affine_recursive() needs to know about the new + * [r3277] Fix GBT#69: ST_Translate crashes when fed circular + string. lwgeom_affine_recursive() needs to know about the new lwgeom_getcurve_inspected() function. -2008-11-07 14:18 mcayland +2008-11-07 14:18 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix GBT#70: ST_NPoints Crashes with Curves. lwgeom_npoints() - needs to know about the new lwgeom_getcurve_inspected() function. + * [r3276] Fix GBT#70: ST_NPoints Crashes with Curves. + lwgeom_npoints() needs to know about the new + lwgeom_getcurve_inspected() function. -2008-11-07 14:05 mcayland +2008-11-07 14:05 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Add missing lwgeom_getcurve_inspected() function which is + * [r3275] Add missing lwgeom_getcurve_inspected() function which is required for some of the latest GBT fixes. -2008-11-07 07:44 robe +2008-11-07 07:44 Regina Obe <lr@pcorp.us> - * Yeh ST_Dump now works with curves + * [r3267] Yeh ST_Dump now works with curves -2008-11-06 17:16 mcayland +2008-11-06 17:16 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Add missing function prototype from r3263. + * [r3265] Add missing function prototype from r3263. -2008-11-06 17:05 mcayland +2008-11-06 17:05 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix for GBT#66: ST_Dump kills backend when fed CIRCULAR STRING. - With thanks to Regina Obe. + * [r3263] Fix for GBT#66: ST_Dump kills backend when fed CIRCULAR + STRING. With thanks to Regina Obe. -2008-11-06 16:12 mcayland +2008-11-06 16:12 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * The GEOS 2.2 series "geos_c.h" is missing header guards, so - including the header multiple times as is done in lwgeom_geos.h - and lwgeom_geos_prepared.h causes compilation to fail with - multiple definition errors. This patch fixes this problem - allowing GEOS 2.2 to work with PostGIS once again, although of - course it can easily be removed when it is decided that GEOS 2.2 - support is no longer required. + * [r3262] The GEOS 2.2 series "geos_c.h" is missing header guards, + so including the header multiple times as is done in + lwgeom_geos.h and lwgeom_geos_prepared.h causes compilation to + fail with multiple definition errors. This patch fixes this + problem allowing GEOS 2.2 to work with PostGIS once again, + although of course it can easily be removed when it is decided + that GEOS 2.2 support is no longer required. -2008-11-06 15:15 mcayland +2008-11-06 15:15 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Change configure to check for the existence of the PGXS Makefile, - even if pg_config can be found. This is become distributions such - as Debian install pg_config as part of libpq-dev but this package - doesn't contain the required Makefile. Per bug report from strk. + * [r3261] Change configure to check for the existence of the PGXS + Makefile, even if pg_config can be found. This is become + distributions such as Debian install pg_config as part of + libpq-dev but this package doesn't contain the required Makefile. + Per bug report from strk. -2008-11-05 13:03 robe +2008-11-05 13:03 Regina Obe <lr@pcorp.us> - * amend ST_Longitude bug comment + * [r3258] amend ST_Longitude bug comment -2008-11-05 11:29 mcayland +2008-11-05 11:29 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix ST_AsGML() not recognising GEOMETRYCOLLECTION as a valid - geometry type from my GBT#65 fix :( + * [r3257] Fix ST_AsGML() not recognising GEOMETRYCOLLECTION as a + valid geometry type from my GBT#65 fix :( -2008-11-05 11:25 mcayland +2008-11-05 11:25 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix regression tests reporting incorrect failures due to a change - of output caused by r3243. + * [r3255] Fix regression tests reporting incorrect failures due to + a change of output caused by r3243. -2008-11-05 11:06 mcayland +2008-11-05 11:06 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix for GBT#68 - ST_Shift_Longitude doesn't work with MULTIPOINT. - Looks like this was just a simple mistake in the code. I've also - improved the error message to return the proper type name instead - of just a number. + * [r3253] Fix for GBT#68 - ST_Shift_Longitude doesn't work with + MULTIPOINT. Looks like this was just a simple mistake in the + code. I've also improved the error message to return the proper + type name instead of just a number. -2008-11-05 01:56 robe +2008-11-05 01:56 Regina Obe <lr@pcorp.us> - * add ST_Collect as having some support for circular + * [r3251] add ST_Collect as having some support for circular -2008-11-04 20:26 robe +2008-11-04 20:26 Regina Obe <lr@pcorp.us> - * typo in proto + * [r3249] typo in proto -2008-11-04 20:05 robe +2008-11-04 20:05 Regina Obe <lr@pcorp.us> - * Add missing proto for ST_CurveToLine + * [r3247] Add missing proto for ST_CurveToLine -2008-11-04 14:15 robe +2008-11-04 14:15 Regina Obe <lr@pcorp.us> - * Add ST_HasArc, pull some useful comments from source code to add - to ST_CurveToLine + * [r3245] Add ST_HasArc, pull some useful comments from source code + to add to ST_CurveToLine -2008-11-04 14:09 mcayland +2008-11-04 14:09 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix lwgeom_typename() not returning a valid string for any of the - newer geometry types. + * [r3243] Fix lwgeom_typename() not returning a valid string for + any of the newer geometry types. -2008-11-04 13:58 mcayland +2008-11-04 13:58 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix for GBT#65: ST_AsGML kills the backend when fed a CIRCULAR - STRING. The default code attempts to inspect any unknown geometry - which fails on CIRCULARSTRING. A longer term fix may be to fix - CIRCULARSTRING so that it can be inspected, however the fix here - is to throw an ERROR for unknown types just as the other As_*() - functions do. + * [r3241] Fix for GBT#65: ST_AsGML kills the backend when fed a + CIRCULAR STRING. The default code attempts to inspect any unknown + geometry which fails on CIRCULARSTRING. A longer term fix may be + to fix CIRCULARSTRING so that it can be inspected, however the + fix here is to throw an ERROR for unknown types just as the other + As_*() functions do. -2008-11-04 13:43 robe +2008-11-04 13:43 Regina Obe <lr@pcorp.us> - * Change all ST_AsKML to use new ST_Transform + * [r3240] Change all ST_AsKML to use new ST_Transform -2008-11-04 13:14 robe +2008-11-04 13:14 Regina Obe <lr@pcorp.us> - * More flagging of functions that work with 3d + * [r3238] More flagging of functions that work with 3d -2008-11-04 12:31 robe +2008-11-04 12:31 Regina Obe <lr@pcorp.us> - * fill in all protos for kml, flag more functions as supporting 3d - and circular/curve + * [r3237] fill in all protos for kml, flag more functions as + supporting 3d and circular/curve -2008-11-04 10:00 mcayland +2008-11-04 10:00 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Change ST_GeomFromText() to GeomFromText() for older hwgeom (-w) - support - looks like I was a little bit to eager in my earlier - conversion to use the new ST_ calling convention. + * [r3236] Change ST_GeomFromText() to GeomFromText() for older + hwgeom (-w) support - looks like I was a little bit to eager in + my earlier conversion to use the new ST_ calling convention. -2008-11-04 09:57 mcayland +2008-11-04 09:57 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Alter loader Makefile to add liblwgeom.a dependency, so people - who just want to build the shapefile loaders can do "make" within - the loader subdirectory and liblwgeom.a will automagically get - build first. + * [r3235] Alter loader Makefile to add liblwgeom.a dependency, so + people who just want to build the shapefile loaders can do "make" + within the loader subdirectory and liblwgeom.a will automagically + get build first. -2008-11-04 02:48 robe +2008-11-04 02:48 Regina Obe <lr@pcorp.us> - * fix typo + * [r3234] fix typo -2008-11-04 02:19 robe +2008-11-04 02:19 Regina Obe <lr@pcorp.us> - * document circular support of more functions + * [r3233] document circular support of more functions -2008-11-04 02:07 robe +2008-11-04 02:07 Regina Obe <lr@pcorp.us> - * Get rid of MM compliancy note for ST_LineToCurve, can only find - ST_CurveToLine in MM docs + * [r3232] Get rid of MM compliancy note for ST_LineToCurve, can + only find ST_CurveToLine in MM docs -2008-11-04 01:56 robe +2008-11-04 01:56 Regina Obe <lr@pcorp.us> - * correct comment + * [r3231] correct comment -2008-11-04 01:55 robe +2008-11-04 01:55 Regina Obe <lr@pcorp.us> - * Add new section to document circular string support + * [r3230] Add new section to document circular string support -2008-11-04 01:47 robe +2008-11-04 01:47 Regina Obe <lr@pcorp.us> - * Document ST_LineToCurve and ST_CurveToLine, update template to - include note about Circular String support in prep for new index - section + * [r3228] Document ST_LineToCurve and ST_CurveToLine, update + template to include note about Circular String support in prep + for new index section -2008-11-03 17:00 kneufeld +2008-11-03 17:00 Kevin Neufeld <kneufeld.ca@gmail.com> - * updated url in comments to the documentation on the implemented - point-in-polygon algorithm to + * [r3226] updated url in comments to the documentation on the + implemented point-in-polygon algorithm to http://softsurfer.com/Archive/algorithm_0103/algorithm_0103.htm#Winding%20Number. Old link was dead. -2008-11-03 16:23 mcayland +2008-11-03 16:23 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Add missing ICONV_LDFLAGS variable to the loader Makefile. Thanks - to Olivier Courtin for noticing. + * [r3225] Add missing ICONV_LDFLAGS variable to the loader + Makefile. Thanks to Olivier Courtin for noticing. -2008-11-03 16:17 mcayland +2008-11-03 16:17 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Switch pgsql2shp over to using liblwgeom. + * [r3224] Switch pgsql2shp over to using liblwgeom. There are few commits that can be as satisfying as one which involves the removal of ~1200 lines of code. By using the @@ -6698,32 +26569,34 @@ Note that while there may be a difference in behaviour in some corner cases, all regression tests pass here. -2008-10-31 10:41 mcayland +2008-10-31 10:41 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Add missing serialized_lwgeom_from_hexwkb() function to liblwgeom - which is required for adding liblwgeom support to pgsql2shp. + * [r3223] Add missing serialized_lwgeom_from_hexwkb() function to + liblwgeom which is required for adding liblwgeom support to + pgsql2shp. -2008-10-31 10:04 mcayland +2008-10-31 10:04 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Some more shp2pgsql clearups; remove some dead commented code and - switch over to use the LWDEBUG(F) debugging framework. + * [r3222] Some more shp2pgsql clearups; remove some dead commented + code and switch over to use the LWDEBUG(F) debugging framework. -2008-10-30 23:13 mcayland +2008-10-30 23:13 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix regression test differences between different platforms in - the AsGeoJSON regression code. There were two issues: firstly, - the original regression tests included precision information > 15 - significant figures, and secondly the GeoJSON code was exposing - BOX2DFLOAT4 information to the client instead of calculating the - true bounding box. With thanks to Olivier Courtin. + * [r3221] Fix regression test differences between different + platforms in the AsGeoJSON regression code. There were two + issues: firstly, the original regression tests included precision + information > 15 significant figures, and secondly the GeoJSON + code was exposing BOX2DFLOAT4 information to the client instead + of calculating the true bounding box. With thanks to Olivier + Courtin. -2008-10-30 22:48 robe +2008-10-30 22:48 Regina Obe <lr@pcorp.us> - * Move over ST_DumpRings + * [r3218] Move over ST_DumpRings -2008-10-30 17:10 mcayland +2008-10-30 17:10 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Switch shp2pgsql over to use liblwgeom instead of its own + * [r3217] Switch shp2pgsql over to use liblwgeom instead of its own internal parser. Some notes from looking at the code: i) I've abstracted the I/O formatting functions into a new @@ -6753,1593 +26626,1627 @@ the maths library and liblwgeom.a, so some manual intervention on the automated build may be required ;) -2008-10-29 18:32 robe +2008-10-29 18:32 Regina Obe <lr@pcorp.us> - * Make more pretty section names, move over ST_Accum and provide - example. + * [r3215] Make more pretty section names, move over ST_Accum and + provide example. -2008-10-29 18:05 robe +2008-10-29 18:05 Regina Obe <lr@pcorp.us> - * Pretty anchors for all new sections + * [r3214] Pretty anchors for all new sections -2008-10-29 17:59 robe +2008-10-29 17:59 Regina Obe <lr@pcorp.us> - * Incorrect function arg in ST_Union + * [r3212] Incorrect function arg in ST_Union -2008-10-29 17:36 robe +2008-10-29 17:36 Regina Obe <lr@pcorp.us> - * Okay maybe hmm 4th or 5th time is the charm + * [r3210] Okay maybe hmm 4th or 5th time is the charm -2008-10-29 17:34 robe +2008-10-29 17:34 Regina Obe <lr@pcorp.us> - * Again + * [r3209] Again -2008-10-29 17:34 robe +2008-10-29 17:34 Regina Obe <lr@pcorp.us> - * Lets try again + * [r3208] Lets try again -2008-10-29 17:29 robe +2008-10-29 17:29 Regina Obe <lr@pcorp.us> - * function name typo + * [r3207] function name typo -2008-10-29 17:27 robe +2008-10-29 17:27 Regina Obe <lr@pcorp.us> - * Move over rest of Linear Referencing functions and provide - examples. Experiment with giving pretty anchor to section. + * [r3206] Move over rest of Linear Referencing functions and + provide examples. Experiment with giving pretty anchor to + section. -2008-10-29 13:58 robe +2008-10-29 13:58 Regina Obe <lr@pcorp.us> - * Add Availability note for Populate_Geometry_Columns + * [r3205] Add Availability note for Populate_Geometry_Columns -2008-10-29 13:52 robe +2008-10-29 13:52 Regina Obe <lr@pcorp.us> - * Fix line_interpolate_point link + * [r3204] Fix line_interpolate_point link -2008-10-29 13:13 robe +2008-10-29 13:13 Regina Obe <lr@pcorp.us> - * Move over ST_Line_Substring + * [r3202] Move over ST_Line_Substring -2008-10-29 12:37 robe +2008-10-29 12:37 Regina Obe <lr@pcorp.us> - * Move over ST_Line_Interpolate_Point + * [r3200] Move over ST_Line_Interpolate_Point -2008-10-27 16:13 kneufeld +2008-10-27 16:13 Kevin Neufeld <kneufeld.ca@gmail.com> - * changed linkend to match case in ST_Length2d to ST_Length2D + * [r3199] changed linkend to match case in ST_Length2d to + ST_Length2D -2008-10-27 16:05 kneufeld +2008-10-27 16:05 Kevin Neufeld <kneufeld.ca@gmail.com> - * attempt to fix broken linkend by replacing it with an xref in - reference_new.xml + * [r3198] attempt to fix broken linkend by replacing it with an + xref in reference_new.xml -2008-10-27 15:53 robe +2008-10-27 15:53 Regina Obe <lr@pcorp.us> - * Move over sql mm compliance for ST_Disjoint and get rid of - annoying carriage return in template.xml + * [r3197] Move over sql mm compliance for ST_Disjoint and get rid + of annoying carriage return in template.xml -2008-10-27 15:49 kneufeld +2008-10-27 15:49 Kevin Neufeld <kneufeld.ca@gmail.com> - * added availability to Populate_Geometry_Columns + * [r3196] added availability to Populate_Geometry_Columns -2008-10-27 15:48 kneufeld +2008-10-27 15:48 Kevin Neufeld <kneufeld.ca@gmail.com> - * fixed typo in broken link to ST_Distance_Spheroid + * [r3195] fixed typo in broken link to ST_Distance_Spheroid -2008-10-27 15:33 kneufeld +2008-10-27 15:33 Kevin Neufeld <kneufeld.ca@gmail.com> - * fixed typo in ST_Length3d_Spheriod xref to ST_Length_Spheroid + * [r3194] fixed typo in ST_Length3d_Spheriod xref to + ST_Length_Spheroid -2008-10-27 15:29 kneufeld +2008-10-27 15:29 Kevin Neufeld <kneufeld.ca@gmail.com> - * fixed typo in missing constraint linkend: ST_InteriorRings to - ST_NumInteriorRings + * [r3193] fixed typo in missing constraint linkend: + ST_InteriorRings to ST_NumInteriorRings -2008-10-27 15:26 kneufeld +2008-10-27 15:26 Kevin Neufeld <kneufeld.ca@gmail.com> - * typo in xref link + * [r3192] typo in xref link -2008-10-27 15:25 kneufeld +2008-10-27 15:25 Kevin Neufeld <kneufeld.ca@gmail.com> - * added id for missing constraint linkend: PostGIS_Scripts_Released + * [r3191] added id for missing constraint linkend: + PostGIS_Scripts_Released -2008-10-27 15:21 kneufeld +2008-10-27 15:21 Kevin Neufeld <kneufeld.ca@gmail.com> - * added id for missing constraint linkend: line_substring + * [r3190] added id for missing constraint linkend: line_substring -2008-10-27 15:15 kneufeld +2008-10-27 15:15 Kevin Neufeld <kneufeld.ca@gmail.com> - * added id for constraint linkend: length2d + * [r3189] added id for constraint linkend: length2d -2008-10-27 06:49 kneufeld +2008-10-27 06:49 Kevin Neufeld <kneufeld.ca@gmail.com> - * fixed bug in lwpostgis.sql.in.c in POPULATE_GEOMETRY_COLUMNS when - detecting SRIDs of -1. + * [r3188] fixed bug in lwpostgis.sql.in.c in + POPULATE_GEOMETRY_COLUMNS when detecting SRIDs of -1. -2008-10-27 06:29 kneufeld +2008-10-27 06:29 Kevin Neufeld <kneufeld.ca@gmail.com> - * updated description for Populate_Geometry_Columns + * [r3187] updated description for Populate_Geometry_Columns -2008-10-27 06:13 kneufeld +2008-10-27 06:13 Kevin Neufeld <kneufeld.ca@gmail.com> - * added plpgsql function Probe_Geometry_Columns to + * [r3186] added plpgsql function Probe_Geometry_Columns to lwpostgis.sql.in.c and added documentation in reference_new.xml -2008-10-26 22:26 robe +2008-10-26 22:26 Regina Obe <lr@pcorp.us> - * Fix typo + * [r3185] Fix typo -2008-10-26 22:18 robe +2008-10-26 22:18 Regina Obe <lr@pcorp.us> - * Move over ST_Length* functions. Correct documentation - e.g. - missing ST_Length2D_Spheroid and ST_Length3d_Spheroid and + * [r3183] Move over ST_Length* functions. Correct documentation - + e.g. missing ST_Length2D_Spheroid and ST_Length3d_Spheroid and ST_Length_Spheroid are synonyms. Seems to disagree with how we define ST_Length. -2008-10-26 21:24 robe +2008-10-26 21:24 Regina Obe <lr@pcorp.us> - * Move over ST_Distance_Spher* functions + * [r3181] Move over ST_Distance_Spher* functions -2008-10-26 19:49 robe +2008-10-26 19:49 Regina Obe <lr@pcorp.us> - * Put in availability info for rotate functions + * [r3179] Put in availability info for rotate functions -2008-10-26 19:43 robe +2008-10-26 19:43 Regina Obe <lr@pcorp.us> - * Move over rest of Affine family. Correct some typos. Put + * [r3178] Move over rest of Affine family. Correct some typos. Put ST_ForceRHR in right location. -2008-10-26 18:14 robe +2008-10-26 18:14 Regina Obe <lr@pcorp.us> - * Move over ST_Affine + * [r3177] Move over ST_Affine -2008-10-25 17:29 robe +2008-10-25 17:29 Regina Obe <lr@pcorp.us> - * Add = operator the most confusing and accidentally used operator - of all + * [r3175] Add = operator the most confusing and accidentally used + operator of all -2008-10-25 16:30 robe +2008-10-25 16:30 Regina Obe <lr@pcorp.us> - * Commit provide another example of ST_SetPoint and flag as + * [r3174] Commit provide another example of ST_SetPoint and flag as supporting 3d -2008-10-24 15:01 robe +2008-10-24 15:01 Regina Obe <lr@pcorp.us> - * typo + * [r3170] typo -2008-10-24 14:53 robe +2008-10-24 14:53 Regina Obe <lr@pcorp.us> - * Move over ST_SnapToGrid + * [r3168] Move over ST_SnapToGrid -2008-10-23 00:28 robe +2008-10-23 00:28 Regina Obe <lr@pcorp.us> - * typo + * [r3166] typo -2008-10-22 18:55 robe +2008-10-22 18:55 Regina Obe <lr@pcorp.us> - * Move over ST_Relate the last of the Geometry Relationship + * [r3164] Move over ST_Relate the last of the Geometry Relationship Function and destroy the section in old reference. -2008-10-21 06:41 robe +2008-10-21 06:41 Regina Obe <lr@pcorp.us> - * Move over perimeter and max distance + * [r3161] Move over perimeter and max distance -2008-10-21 04:54 kneufeld +2008-10-21 04:54 Kevin Neufeld <kneufeld.ca@gmail.com> - * moved ST_ForceRHR into the correct category + * [r3159] moved ST_ForceRHR into the correct category -2008-10-21 04:41 kneufeld +2008-10-21 04:41 Kevin Neufeld <kneufeld.ca@gmail.com> - * moved over ST_ForceRHR + * [r3158] moved over ST_ForceRHR -2008-10-20 17:36 robe +2008-10-20 17:36 Regina Obe <lr@pcorp.us> - * typo in st_cover something. Hate non-symmetric relationships + * [r3157] typo in st_cover something. Hate non-symmetric + relationships -2008-10-20 17:29 robe +2008-10-20 17:29 Regina Obe <lr@pcorp.us> - * Revert change to ST_MemUnion - it really is that. Most have had a - faulty restore when it was named ST_MemGeomUnion + * [r3155] Revert change to ST_MemUnion - it really is that. Most + have had a faulty restore when it was named ST_MemGeomUnion -2008-10-20 17:25 robe +2008-10-20 17:25 Regina Obe <lr@pcorp.us> - * Move over ST_Covers and ST_CoveredBy and provide examples, update - ST_Contains example to show distinction between ST_Covers, - ST_Contains etc. + * [r3154] Move over ST_Covers and ST_CoveredBy and provide + examples, update ST_Contains example to show distinction between + ST_Covers, ST_Contains etc. -2008-10-20 14:49 robe +2008-10-20 14:49 Regina Obe <lr@pcorp.us> - * correct links in README and note about running make check before - make install. How the hell do you do that? + * [r3152] correct links in README and note about running make check + before make install. How the hell do you do that? -2008-10-19 23:40 robe +2008-10-19 23:40 Regina Obe <lr@pcorp.us> - * Provide example for GeometryType. fix typo + * [r3146] Provide example for GeometryType. fix typo -2008-10-19 23:31 robe +2008-10-19 23:31 Regina Obe <lr@pcorp.us> - * typo in ST_Y definition. Also added common use-case example of - ST_Centroid used with ST_X, ST_Y + * [r3144] typo in ST_Y definition. Also added common use-case + example of ST_Centroid used with ST_X, ST_Y -2008-10-19 14:52 mcayland +2008-10-19 14:52 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * After several discussions at PGDay, it seems that the only - use-case for the PGXS PROGRAM clause is for programs that wish to - link with the backend libraries. Hence create a new Makefile for - the loader directory which uses the new autoconf infrastructure, - based upon library and dependency lists from the original 1.3 - branch. + * [r3143] After several discussions at PGDay, it seems that the + only use-case for the PGXS PROGRAM clause is for programs that + wish to link with the backend libraries. Hence create a new + Makefile for the loader directory which uses the new autoconf + infrastructure, based upon library and dependency lists from the + original 1.3 branch. -2008-10-19 14:40 robe +2008-10-19 14:40 Regina Obe <lr@pcorp.us> - * Move over remainder of Geometry Accessors to new section. Fix - ST_MemUnion (really ST_MemGeomUnion), correct mistake in + * [r3141] Move over remainder of Geometry Accessors to new section. + Fix ST_MemUnion (really ST_MemGeomUnion), correct mistake in ST_SymDifference -2008-10-18 08:33 mcayland +2008-10-18 08:33 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Remove postgis_jts_version() function call from regression tests - as the function no longer exists (prevents warning being - displayed at the start of the test run) + * [r3140] Remove postgis_jts_version() function call from + regression tests as the function no longer exists (prevents + warning being displayed at the start of the test run) -2008-10-17 18:51 robe +2008-10-17 18:51 Regina Obe <lr@pcorp.us> - * Move over the *N family + * [r3138] Move over the *N family -2008-10-17 17:58 robe +2008-10-17 17:58 Regina Obe <lr@pcorp.us> - * Move over ST_length2d, ST_length3d + * [r3136] Move over ST_length2d, ST_length3d -2008-10-17 03:39 robe +2008-10-17 03:39 Regina Obe <lr@pcorp.us> - * Move over ST_MemUnion the last of the geometry processing + * [r3134] Move over ST_MemUnion the last of the geometry processing functions and destroy the geometry processing functions old section -2008-10-17 03:05 robe +2008-10-17 03:05 Regina Obe <lr@pcorp.us> - * forgot to delete some stuff + * [r3133] forgot to delete some stuff -2008-10-17 03:04 robe +2008-10-17 03:04 Regina Obe <lr@pcorp.us> - * move over ST_Shift_Longitude, ST_Difference, ST_SymDifference + * [r3131] move over ST_Shift_Longitude, ST_Difference, + ST_SymDifference -2008-10-16 22:13 kneufeld +2008-10-16 22:13 Kevin Neufeld <kneufeld.ca@gmail.com> - * reverting accidental commit to template.xml + * [r3130] reverting accidental commit to template.xml -2008-10-16 18:35 robe +2008-10-16 18:35 Regina Obe <lr@pcorp.us> - * Move over ST_NumGeometries + * [r3128] Move over ST_NumGeometries -2008-10-16 18:17 robe +2008-10-16 18:17 Regina Obe <lr@pcorp.us> - * Move over ST_ExteriorRing, ST_NumInteriorRings, + * [r3126] Move over ST_ExteriorRing, ST_NumInteriorRings, ST_NumInteriorRing -2008-10-16 18:12 kneufeld +2008-10-16 18:12 Kevin Neufeld <kneufeld.ca@gmail.com> - * added dblatex as a dependency for building PDF's + * [r3125] added dblatex as a dependency for building PDF's added a pdf target to doc/Makefile.in -2008-10-16 08:33 mcayland +2008-10-16 08:33 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Update to previous parser patch: if the error location is 0 (i.e. - we haven't even matched a valid OGC WKT type) then display a more - appropriate message. Per minor gripe from Paul. + * [r3124] Update to previous parser patch: if the error location is + 0 (i.e. we haven't even matched a valid OGC WKT type) then + display a more appropriate message. Per minor gripe from Paul. -2008-10-16 07:22 robe +2008-10-16 07:22 Regina Obe <lr@pcorp.us> - * update st_azimuth - it should be called vector instead of line - since order of points reverses the angle + * [r3123] update st_azimuth - it should be called vector instead of + line since order of points reverses the angle -2008-10-16 07:17 robe +2008-10-16 07:17 Regina Obe <lr@pcorp.us> - * Move over ST_Azimuth and provide example + * [r3120] Move over ST_Azimuth and provide example -2008-10-16 06:35 robe +2008-10-16 06:35 Regina Obe <lr@pcorp.us> - * Move over ST_Boundary to new section, copy comment about SQL-MM - srid to xsl header + * [r3118] Move over ST_Boundary to new section, copy comment about + SQL-MM srid to xsl header -2008-10-15 21:44 mcayland +2008-10-15 21:44 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix pointer problem in the new HINT code caused by strncpy() not - padding with zeros unless the specified length is *longer* than - the source string. + * [r3117] Fix pointer problem in the new HINT code caused by + strncpy() not padding with zeros unless the specified length is + *longer* than the source string. -2008-10-15 18:36 pramsey +2008-10-15 18:36 Paul Ramsey <pramsey@cleverelephant.ca> - * last one! + * [r3116] last one! -2008-10-15 18:26 pramsey +2008-10-15 18:26 Paul Ramsey <pramsey@cleverelephant.ca> - * expunge remaining stringBuffer references + * [r3115] expunge remaining stringBuffer references -2008-10-15 17:59 pramsey +2008-10-15 17:59 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove stringBuffer.* from build/repository. + * [r3114] Remove stringBuffer.* from build/repository. -2008-10-15 15:03 mcayland +2008-10-15 15:03 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Update the LWGEOM parser to provide error HINTs when being called - from PostgreSQL, and update regression tests accordingly. + * [r3113] Update the LWGEOM parser to provide error HINTs when + being called from PostgreSQL, and update regression tests + accordingly. -2008-10-15 13:43 robe +2008-10-15 13:43 Regina Obe <lr@pcorp.us> - * fix spacing of st_linemerge, st_segmentize examples. + * [r3112] fix spacing of st_linemerge, st_segmentize examples. -2008-10-15 13:39 robe +2008-10-15 13:39 Regina Obe <lr@pcorp.us> - * Move over ST_Segmentize and ST_LineMerge + * [r3110] Move over ST_Segmentize and ST_LineMerge -2008-10-14 23:08 kneufeld +2008-10-14 23:08 Kevin Neufeld <kneufeld.ca@gmail.com> - * moved cleanup of the pdf to the maintainer-clean target + * [r3109] moved cleanup of the pdf to the maintainer-clean target -2008-10-14 20:11 pramsey +2008-10-14 20:11 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove sliced test code and return to original state. + * [r3107] Remove sliced test code and return to original state. -2008-10-14 19:51 mcayland +2008-10-14 19:51 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Nearly finish work on the new parser API. The key part of this - patch is to alter the behaviour of the parser so that instead of - generating errors directly, it returns an error code, error - location and an error message. Hence the caller is now in charge - of the behaviour when parsing invalid geometries, and so can - ignore errors or proceed onto the next geometry if required. The - regression test change is due to a change in an error message, - since the error is now returned from the unparser before it even - gets to GEOS. + * [r3106] Nearly finish work on the new parser API. The key part of + this patch is to alter the behaviour of the parser so that + instead of generating errors directly, it returns an error code, + error location and an error message. Hence the caller is now in + charge of the behaviour when parsing invalid geometries, and so + can ignore errors or proceed onto the next geometry if required. + The regression test change is due to a change in an error + message, since the error is now returned from the unparser before + it even gets to GEOS. -2008-10-14 19:39 robe +2008-10-14 19:39 Regina Obe <lr@pcorp.us> - * Provide examples for ST_Simplify and ST_SimplifyPreserveTopology + * [r3105] Provide examples for ST_Simplify and + ST_SimplifyPreserveTopology -2008-10-14 18:16 robe +2008-10-14 18:16 Regina Obe <lr@pcorp.us> - * Move over st_simplify and st_simplifypreservetopology. Still need - to put in examples. + * [r3103] Move over st_simplify and st_simplifypreservetopology. + Still need to put in examples. -2008-10-14 17:42 pramsey +2008-10-14 17:42 Paul Ramsey <pramsey@cleverelephant.ca> - * astyle style=ansi indent=tab=8 + * [r3101] astyle style=ansi indent=tab=8 -2008-10-14 11:40 robe +2008-10-14 11:40 Regina Obe <lr@pcorp.us> - * completely move over rest of management functions to new section. - Add probe_geometry_columns - never been documented, but useful. - Get rid of update_geometry_stats - just returns a dumb message - that its obsolete. + * [r3099] completely move over rest of management functions to new + section. Add probe_geometry_columns - never been documented, but + useful. Get rid of update_geometry_stats - just returns a dumb + message that its obsolete. -2008-10-14 03:56 robe +2008-10-14 03:56 Regina Obe <lr@pcorp.us> - * Add missing function proto for dropgeometrytable + * [r3098] Add missing function proto for dropgeometrytable -2008-10-13 13:16 mcayland +2008-10-13 13:16 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Rename parser_check_flags to current_parser_check_flags and - unparser_check_flags to current_unparser_check_flags to clarify - that these status variables only reflect the checks enabled for - the current parse. + * [r3095] Rename parser_check_flags to current_parser_check_flags + and unparser_check_flags to current_unparser_check_flags to + clarify that these status variables only reflect the checks + enabled for the current parse. -2008-10-13 13:03 mcayland +2008-10-13 13:03 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Move the liblwgeom unparser example over to the dynptarray API - which is the proper way to alter point arrays in memory. + * [r3094] Move the liblwgeom unparser example over to the + dynptarray API which is the proper way to alter point arrays in + memory. -2008-10-13 11:36 mcayland +2008-10-13 11:36 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix up some more warnings in SVN trunk; note that there are still - 2 remaining PreparedGeometry warnings, but these will require - patching GEOS. + * [r3093] Fix up some more warnings in SVN trunk; note that there + are still 2 remaining PreparedGeometry warnings, but these will + require patching GEOS. -2008-10-12 17:47 pramsey +2008-10-12 17:47 Paul Ramsey <pramsey@cleverelephant.ca> - * Performance boost: only detoast the front of the tuple first and + * [r3091] Performance boost: only detoast the front of the tuple + first and extract the bbox from that. -2008-10-10 16:34 pramsey +2008-10-10 16:34 Paul Ramsey <pramsey@cleverelephant.ca> - * Pull prep_cache reference safely inside PREPARED_GEOM #ifdef + * [r3089] Pull prep_cache reference safely inside PREPARED_GEOM + #ifdef -2008-10-10 05:24 pramsey +2008-10-10 05:24 Paul Ramsey <pramsey@cleverelephant.ca> - * Set keywords propery. + * [r3088] Set keywords propery. -2008-10-10 05:17 pramsey +2008-10-10 05:17 Paul Ramsey <pramsey@cleverelephant.ca> - * Clean-up and comment. + * [r3087] Clean-up and comment. -2008-10-10 04:41 pramsey +2008-10-10 04:41 Paul Ramsey <pramsey@cleverelephant.ca> - * Rename lwgeom_geos_c.c to lwgeom_geos.c + * [r3086] Rename lwgeom_geos_c.c to lwgeom_geos.c -2008-10-10 04:39 pramsey +2008-10-10 04:39 Paul Ramsey <pramsey@cleverelephant.ca> - * Prepared geometries getting closer to readiness. Integrated into - standard functions, regression tests added. + * [r3085] Prepared geometries getting closer to readiness. + Integrated into standard functions, regression tests added. -2008-10-10 01:35 mleslie +2008-10-10 01:35 Mark Leslie <mark.leslie@lisasoft.com> - * Updating the regression test README file with details about the c - preprocessing step and the formatting of the _expected file - results. + * [r3084] Updating the regression test README file with details + about the c preprocessing step and the formatting of the + _expected file results. -2008-10-08 18:57 robe +2008-10-08 18:57 Regina Obe <lr@pcorp.us> - * SQL my MM + * [r3083] SQL my MM -2008-10-08 18:51 robe +2008-10-08 18:51 Regina Obe <lr@pcorp.us> - * update st_translate include support for 3d flag + * [r3082] update st_translate include support for 3d flag -2008-10-08 18:27 pramsey +2008-10-08 18:27 Paul Ramsey <pramsey@cleverelephant.ca> - * Move to memcmp keys, leave prepared functions tied to old keyed - signatures for now. + * [r3081] Move to memcmp keys, leave prepared functions tied to old + keyed signatures for now. -2008-10-08 10:14 mleslie +2008-10-08 10:14 Mark Leslie <mark.leslie@lisasoft.com> - * Rebuilt the box3d generation for circular strings to account for - a special large-arc case. Fix for issue 58, includes regression - test for the case. + * [r3080] Rebuilt the box3d generation for circular strings to + account for a special large-arc case. Fix for issue 58, includes + regression test for the case. -2008-10-08 05:48 kneufeld +2008-10-08 05:48 Kevin Neufeld <kneufeld.ca@gmail.com> - * fixed several broken or redirected external URLs. + * [r3077] fixed several broken or redirected external URLs. -2008-10-08 05:45 kneufeld +2008-10-08 05:45 Kevin Neufeld <kneufeld.ca@gmail.com> - * fixed several broken or redirected external URLs. + * [r3076] fixed several broken or redirected external URLs. -2008-10-08 04:25 pramsey +2008-10-08 04:25 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix minor logic error in intersects() bbox shortcut. + * [r3075] Fix minor logic error in intersects() bbox shortcut. -2008-10-07 23:51 pramsey +2008-10-07 23:51 Paul Ramsey <pramsey@cleverelephant.ca> - * Re-work prepared geom cache to use memcmp instead of keys, step - 1. + * [r3074] Re-work prepared geom cache to use memcmp instead of + keys, step 1. -2008-10-07 20:38 pramsey +2008-10-07 20:38 Paul Ramsey <pramsey@cleverelephant.ca> - * Move DEBUG statement next to a req'd variable. + * [r3073] Move DEBUG statement next to a req'd variable. -2008-10-07 18:09 robe +2008-10-07 18:09 Regina Obe <lr@pcorp.us> - * correct mistake + * [r3072] correct mistake -2008-10-07 17:39 robe +2008-10-07 17:39 Regina Obe <lr@pcorp.us> - * Move over ST_ConvexHull + * [r3071] Move over ST_ConvexHull -2008-10-06 19:51 pramsey +2008-10-06 19:51 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix slight error in box shortcut logic in prepared intersects. + * [r3070] Fix slight error in box shortcut logic in prepared + intersects. -2008-10-05 22:12 pramsey +2008-10-05 22:12 Paul Ramsey <pramsey@cleverelephant.ca> - * Convert from LWDEBUG to POSTGIS_DEBUG + * [r3068] Convert from LWDEBUG to POSTGIS_DEBUG -2008-10-05 17:33 mcayland +2008-10-05 17:33 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix stupid mistake in the liblwgeom parser... + * [r3067] Fix stupid mistake in the liblwgeom parser... -2008-10-04 21:29 pramsey +2008-10-04 21:29 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix boneheaded error in prepared intersects. + * [r3065] Fix boneheaded error in prepared intersects. -2008-10-04 17:49 pramsey +2008-10-04 17:49 Paul Ramsey <pramsey@cleverelephant.ca> - * Protect prepared geometry implementation in GEOS>=3.1 defines. + * [r3064] Protect prepared geometry implementation in GEOS>=3.1 + defines. -2008-10-04 16:00 mcayland +2008-10-04 16:00 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix the DEBUGF statements I didn't realise I broke with the new - LWGEOM parser/unparser API (in response to Paul's r3061 commit). + * [r3063] Fix the DEBUGF statements I didn't realise I broke with + the new LWGEOM parser/unparser API (in response to Paul's r3061 + commit). -2008-10-03 18:07 pramsey +2008-10-03 18:07 Paul Ramsey <pramsey@cleverelephant.ca> - * Some extra debugf's in the prepared geometry code. + * [r3062] Some extra debugf's in the prepared geometry code. -2008-10-03 17:37 pramsey +2008-10-03 17:37 Paul Ramsey <pramsey@cleverelephant.ca> - * Patch up and comment out some DEBUGF lines that don't compile due - to changes in function + * [r3061] Patch up and comment out some DEBUGF lines that don't + compile due to changes in function signatures in liblwgeom -2008-10-03 13:23 robe +2008-10-03 13:23 Regina Obe <lr@pcorp.us> - * correct incorrect statement + * [r3060] correct incorrect statement -2008-10-03 13:20 robe +2008-10-03 13:20 Regina Obe <lr@pcorp.us> - * Update ST_Union's fitness for 3d with examples. + * [r3059] Update ST_Union's fitness for 3d with examples. -2008-10-03 09:22 robe +2008-10-03 09:22 Regina Obe <lr@pcorp.us> - * Add more examples of 3d use and annotate more 3d functions + * [r3058] Add more examples of 3d use and annotate more 3d + functions -2008-10-02 23:53 pramsey +2008-10-02 23:53 Paul Ramsey <pramsey@cleverelephant.ca> - * Rework prepared geometry handling to look more like the + * [r3056] Rework prepared geometry handling to look more like the implementation of PJ caching in transform. -2008-10-02 18:52 pramsey +2008-10-02 18:52 Paul Ramsey <pramsey@cleverelephant.ca> - * Flip format to 'astyle --style=ansi --indent=tab=8' to make - upcoming + * [r3055] Flip format to 'astyle --style=ansi --indent=tab=8' to + make upcoming changes more consistent, stylewise. (Can't stand the mixed styles anymore!) -2008-10-02 18:35 pramsey +2008-10-02 18:35 Paul Ramsey <pramsey@cleverelephant.ca> - * add .so. to svn:ignore + * [r3054] add .so. to svn:ignore -2008-10-02 17:36 pramsey +2008-10-02 17:36 Paul Ramsey <pramsey@cleverelephant.ca> - * add check for invalid srid to addgeometrycolumn (#33) + * [r3053] add check for invalid srid to addgeometrycolumn (#33) -2008-10-02 16:46 pramsey +2008-10-02 16:46 Paul Ramsey <pramsey@cleverelephant.ca> - * ensure relate(g,g,p) is case insensitive (#44) + * [r3050] ensure relate(g,g,p) is case insensitive (#44) -2008-10-02 16:15 robe +2008-10-02 16:15 Regina Obe <lr@pcorp.us> - * Flag more 3d compatible functions + * [r3048] Flag more 3d compatible functions -2008-10-02 16:00 pramsey +2008-10-02 16:00 Paul Ramsey <pramsey@cleverelephant.ca> - * pass commandline options into backend command (#45) + * [r3047] pass commandline options into backend command (#45) -2008-10-02 15:56 pramsey +2008-10-02 15:56 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix log message to refer to correct function name + * [r3045] Fix log message to refer to correct function name -2008-10-02 12:43 robe +2008-10-02 12:43 Regina Obe <lr@pcorp.us> - * Fix minor typos in ST_Polygonize + * [r3044] Fix minor typos in ST_Polygonize -2008-10-02 12:14 robe +2008-10-02 12:14 Regina Obe <lr@pcorp.us> - * Get rid of extra line breaks in specialty function section (by - changing xsl). Move over ST_Polygonize and provide examples. + * [r3043] Get rid of extra line breaks in specialty function + section (by changing xsl). Move over ST_Polygonize and provide + examples. -2008-10-02 11:40 robe +2008-10-02 11:40 Regina Obe <lr@pcorp.us> - * Start annotating functions that support 3d, add some examples of - 3d, update xsl to pull out functions that support 3d in a - separate special function index + * [r3042] Start annotating functions that support 3d, add some + examples of 3d, update xsl to pull out functions that support 3d + in a separate special function index -2008-10-02 11:17 robe +2008-10-02 11:17 Regina Obe <lr@pcorp.us> - * extraneous junk left + * [r3041] extraneous junk left -2008-10-02 11:16 robe +2008-10-02 11:16 Regina Obe <lr@pcorp.us> - * Move over ST_Extent + * [r3040] Move over ST_Extent -2008-10-01 21:55 robe +2008-10-01 21:55 Regina Obe <lr@pcorp.us> - * Get rid of excess paragraph in mm compliance section + * [r3039] Get rid of excess paragraph in mm compliance section -2008-10-01 21:53 robe +2008-10-01 21:53 Regina Obe <lr@pcorp.us> - * Moved some functions to Geometry Processing section + * [r3038] Moved some functions to Geometry Processing section -2008-10-01 21:42 robe +2008-10-01 21:42 Regina Obe <lr@pcorp.us> - * Put in SQL mm compliance for ST_Intersection + * [r3037] Put in SQL mm compliance for ST_Intersection -2008-10-01 20:04 robe +2008-10-01 20:04 Regina Obe <lr@pcorp.us> - * Move ST_Intersection to new reference_new.xml + * [r3036] Move ST_Intersection to new reference_new.xml -2008-09-30 17:42 robe +2008-09-30 17:42 Regina Obe <lr@pcorp.us> - * Revise to include mm compliance section + * [r3035] Revise to include mm compliance section -2008-09-30 17:39 robe +2008-09-30 17:39 Regina Obe <lr@pcorp.us> - * Move over ST_Intersects sql mm compliance note to reference_new - (remove sT_Intersects from MM section of old reference) + * [r3034] Move over ST_Intersects sql mm compliance note to + reference_new (remove sT_Intersects from MM section of old + reference) -2008-09-30 13:29 mcayland +2008-09-30 13:29 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Update regression tests to include test cases for GBT#21. + * [r3032] Update regression tests to include test cases for GBT#21. -2008-09-30 13:25 mcayland +2008-09-30 13:25 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix for locate_along_measure returning invalid values (GBT#21) + * [r3031] Fix for locate_along_measure returning invalid values + (GBT#21) -2008-09-30 04:06 kneufeld +2008-09-30 04:06 Kevin Neufeld <kneufeld.ca@gmail.com> - * added a new aggregate and sql_mm toc to docs generated via a - custom xsl (provided by Regina Obe) to the documentation Makefile + * [r3030] added a new aggregate and sql_mm toc to docs generated + via a custom xsl (provided by Regina Obe) to the documentation + Makefile -2008-09-29 16:20 robe +2008-09-29 16:20 Regina Obe <lr@pcorp.us> - * change to sort functions alphabetically + * [r3027] change to sort functions alphabetically -2008-09-28 19:48 mcayland +2008-09-28 19:48 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Update LWGEOM unparser to (E)WKT/WKB to resturn a + * [r3026] Update LWGEOM unparser to (E)WKT/WKB to resturn a LWGEOM_UNPARSER_RESULT structure instead of just the WKT/WKB character array. This is the same work done for r3023 but applied to the unparser instead. -2008-09-28 16:18 mcayland +2008-09-28 16:18 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * With the advent of LWGEOM_PARSER_RESULT, it is now possible to - get rid of the horrible SERIALIZED_LWGEOM hack for PostgreSQL 8.3 - to allow us to return the size separate from the result. This is - good as it removes another level of indirection from the parser. - Note that the size field has now been added to the - LWGEOM_PARSER_RESULT structure. + * [r3025] With the advent of LWGEOM_PARSER_RESULT, it is now + possible to get rid of the horrible SERIALIZED_LWGEOM hack for + PostgreSQL 8.3 to allow us to return the size separate from the + result. This is good as it removes another level of indirection + from the parser. Note that the size field has now been added to + the LWGEOM_PARSER_RESULT structure. -2008-09-28 15:47 mcayland +2008-09-28 15:47 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Clear up warnings (mixed declartions within code and invalid - return) from r3022. + * [r3024] Clear up warnings (mixed declartions within code and + invalid return) from r3022. -2008-09-28 15:32 mcayland +2008-09-28 15:32 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Update (E)WKT/WKB parser to return a structure + * [r3023] Update (E)WKT/WKB parser to return a structure (LWGEOM_PARSER_RESULT) instead of just the serialized lwgeom. This is in preparation for returning more detailed error information back to the caller. -2008-09-28 09:03 pramsey +2008-09-28 09:03 Paul Ramsey <pramsey@cleverelephant.ca> - * Update pip shortcut code to be less aggressive in building cache. + * [r3022] Update pip shortcut code to be less aggressive in + building cache. -2008-09-27 08:19 mcayland +2008-09-27 08:19 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Rename parser_check_flags to unparser_check_flags for the + * [r3021] Rename parser_check_flags to unparser_check_flags for the unparser to prevent linking error under OS X. Also add missing function prototype to silence compiler warning in the PiP code. -2008-09-26 21:46 pramsey +2008-09-26 21:46 Paul Ramsey <pramsey@cleverelephant.ca> - * harmonize sql functions with c functions for prepared geometry + * [r3020] harmonize sql functions with c functions for prepared + geometry -2008-09-26 21:34 pramsey +2008-09-26 21:34 Paul Ramsey <pramsey@cleverelephant.ca> - * Make preparedgeometry memory handling a good deal kinder (no - longer losing base geometry every time) + * [r3019] Make preparedgeometry memory handling a good deal kinder + (no longer losing base geometry every time) -2008-09-26 21:01 robe +2008-09-26 21:01 Regina Obe <lr@pcorp.us> - * put index in listitems and hope for the best + * [r3018] put index in listitems and hope for the best -2008-09-26 19:43 pramsey +2008-09-26 19:43 Paul Ramsey <pramsey@cleverelephant.ca> - * P-I-P rennovation complete: memory leaks gone, multipolygon - support added + * [r3017] P-I-P rennovation complete: memory leaks gone, + multipolygon support added -2008-09-26 18:59 robe +2008-09-26 18:59 Regina Obe <lr@pcorp.us> - * correct the comments + * [r3016] correct the comments -2008-09-26 18:55 robe +2008-09-26 18:55 Regina Obe <lr@pcorp.us> - * xsl that generates index listing of postgis spatial aggregates - and MM compliant functions + * [r3015] xsl that generates index listing of postgis spatial + aggregates and MM compliant functions -2008-09-26 12:45 robe +2008-09-26 12:45 Regina Obe <lr@pcorp.us> - * Put in author/license info (hmm this is a guess - couldn't find a - good example in SVN to go by). Also comment on what xsl is doing. + * [r3014] Put in author/license info (hmm this is a guess - + couldn't find a good example in SVN to go by). Also comment on + what xsl is doing. -2008-09-26 02:50 kneufeld +2008-09-26 02:50 Kevin Neufeld <kneufeld.ca@gmail.com> - * updated "make clean" directive to include the newly generated - PDFs + * [r3013] updated "make clean" directive to include the newly + generated PDFs -2008-09-25 21:50 mcayland +2008-09-25 21:50 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Add parser flags to the LWGEOM to (E)WKB/WKT parsers, similar to - has already been done for the (E)WKB/WKT to LWGEOM parsers. + * [r3012] Add parser flags to the LWGEOM to (E)WKB/WKT parsers, + similar to has already been done for the (E)WKB/WKT to LWGEOM + parsers. -2008-09-25 21:34 mcayland +2008-09-25 21:34 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Remove missing variables from LWDEBUG(F) statement that would - cause compilation to fail with POSTGIS_DEBUG_LEVEL > 0 + * [r3011] Remove missing variables from LWDEBUG(F) statement that + would cause compilation to fail with POSTGIS_DEBUG_LEVEL > 0 -2008-09-25 20:46 pramsey +2008-09-25 20:46 Paul Ramsey <pramsey@cleverelephant.ca> - * Another biggish leak into the parent context. + * [r3010] Another biggish leak into the parent context. -2008-09-25 19:18 pramsey +2008-09-25 19:18 Paul Ramsey <pramsey@cleverelephant.ca> - * More small memory leaks removed. + * [r3009] More small memory leaks removed. -2008-09-25 17:18 pramsey +2008-09-25 17:18 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove more memory leaks from P-I-P shortcut code. + * [r3008] Remove more memory leaks from P-I-P shortcut code. -2008-09-25 12:18 robe +2008-09-25 12:18 Regina Obe <lr@pcorp.us> - * More typo fixes + * [r3007] More typo fixes -2008-09-25 12:10 robe +2008-09-25 12:10 Regina Obe <lr@pcorp.us> - * Move over ST_MakePointM, miscellaneous typo fixes + * [r3006] Move over ST_MakePointM, miscellaneous typo fixes -2008-09-24 14:05 robe +2008-09-24 14:05 Regina Obe <lr@pcorp.us> - * Put svn back in microversion + * [r3003] Put svn back in microversion -2008-09-24 14:01 robe +2008-09-24 14:01 Regina Obe <lr@pcorp.us> - * typo + * [r3002] typo -2008-09-24 13:55 robe +2008-09-24 13:55 Regina Obe <lr@pcorp.us> - * Added ST_MakePointM, removed redundant redefinition of MakePointM - so docs are now in synch with actual functions. + * [r2999] Added ST_MakePointM, removed redundant redefinition of + MakePointM so docs are now in synch with actual functions. -2008-09-23 21:32 mcayland +2008-09-23 21:32 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Use __va_copy() to pass a copy of the variadic structure to - lw_vasprintf() to solve ABI difference between 32bit/64bit + * [r2998] Use __va_copy() to pass a copy of the variadic structure + to lw_vasprintf() to solve ABI difference between 32bit/64bit architectures. -2008-09-23 19:59 mcayland +2008-09-23 19:59 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Remove a couple more warnings when compiling with debug enabled - from lwgeom_gist.c. + * [r2997] Remove a couple more warnings when compiling with debug + enabled from lwgeom_gist.c. -2008-09-23 19:53 mcayland +2008-09-23 19:53 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Revert commit 2990: the real bug was that the LWDEBUG statement - was incorrect rather than the code - the additional read_int() - was causing an off-by-one error when outputting WKB causing - several regression tests to fail. + * [r2996] Revert commit 2990: the real bug was that the LWDEBUG + statement was incorrect rather than the code - the additional + read_int() was causing an off-by-one error when outputting WKB + causing several regression tests to fail. -2008-09-23 19:44 mcayland +2008-09-23 19:44 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Refactor the memory management routines to account for the fact - that variadic functions can't be called directly from the initial - allocators. Also solve issues related to differences between the - system vasprintf() (if supplied) and the liblwgeom vasprintf() by - renaming to lw_vasprintf() and using it throughout PostGIS. With - all this in place, GBT#54 is fixed which is very useful when - debugging ;) + * [r2995] Refactor the memory management routines to account for + the fact that variadic functions can't be called directly from + the initial allocators. Also solve issues related to differences + between the system vasprintf() (if supplied) and the liblwgeom + vasprintf() by renaming to lw_vasprintf() and using it throughout + PostGIS. With all this in place, GBT#54 is fixed which is very + useful when debugging ;) -2008-09-23 19:07 pramsey +2008-09-23 19:07 Paul Ramsey <pramsey@cleverelephant.ca> - * Reduce p-i-p memory leak by 50% + * [r2993] Reduce p-i-p memory leak by 50% -2008-09-23 13:05 robe +2008-09-23 13:05 Regina Obe <lr@pcorp.us> - * fix typo add more links + * [r2992] fix typo add more links -2008-09-23 13:00 robe +2008-09-23 13:00 Regina Obe <lr@pcorp.us> - * Move over ST_Buffer + * [r2991] Move over ST_Buffer -2008-09-22 22:59 pramsey +2008-09-22 22:59 Paul Ramsey <pramsey@cleverelephant.ca> - * Add cnt declaration where missing. + * [r2990] Add cnt declaration where missing. -2008-09-22 17:55 robe +2008-09-22 17:55 Regina Obe <lr@pcorp.us> - * change to xsl 1.0 plus minor indent change + * [r2989] change to xsl 1.0 plus minor indent change -2008-09-22 12:28 robe +2008-09-22 12:28 Regina Obe <lr@pcorp.us> - * Add xsl file that autogenerates sql set comment statements from - reference_new.xml + * [r2988] Add xsl file that autogenerates sql set comment + statements from reference_new.xml -2008-09-22 12:18 robe +2008-09-22 12:18 Regina Obe <lr@pcorp.us> - * Realized from my sql comment generation xsl that there is really - no ST_WKTToSQL that takes an SRID and no ST_BD.. that doesn't - take an SRID. Very shocking. + * [r2987] Realized from my sql comment generation xsl that there is + really no ST_WKTToSQL that takes an SRID and no ST_BD.. that + doesn't take an SRID. Very shocking. -2008-09-21 23:15 robe +2008-09-21 23:15 Regina Obe <lr@pcorp.us> - * typo in st_setsrid returns geometry not boolean + * [r2986] typo in st_setsrid returns geometry not boolean -2008-09-18 22:12 pramsey +2008-09-18 22:12 Paul Ramsey <pramsey@cleverelephant.ca> - * Add a few more generated files to ignore + * [r2985] Add a few more generated files to ignore -2008-09-18 22:09 pramsey +2008-09-18 22:09 Paul Ramsey <pramsey@cleverelephant.ca> - * Set ignore properties on generated files. + * [r2984] Set ignore properties on generated files. -2008-09-18 13:54 mcayland +2008-09-18 13:54 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Update the code for unparsing LWGEOMs to WKB/WKT so that it - includes the standard simple checks: LINESTRINGs must have > 2 + * [r2983] Update the code for unparsing LWGEOMs to WKB/WKT so that + it includes the standard simple checks: LINESTRINGs must have > 2 points, POLYGONs must have closed rings and CIRCULARSTRINGs must have > 2 points and the number of points must be odd. There is still a little more work to do to allow flags to be passed into the parser to specify which checks should be enforced, much like has already been done for the parsing from WKB/WKT to LWGEOM. -2008-09-18 04:34 kneufeld +2008-09-18 04:34 Kevin Neufeld <kneufeld.ca@gmail.com> - * commit to test autobuild process and svn hooks + * [r2982] commit to test autobuild process and svn hooks - removed extra tabs from preformatted text blocks -2008-09-18 04:22 kneufeld +2008-09-18 04:22 Kevin Neufeld <kneufeld.ca@gmail.com> - * commit to test autobuild process and svn hooks + * [r2981] commit to test autobuild process and svn hooks - removed extra tabs from preformatted text blocks -2008-09-17 15:05 robe +2008-09-17 15:05 Regina Obe <lr@pcorp.us> - * Add to ST_SetSRID - reference to spatial_ref_sys + * [r2980] Add to ST_SetSRID - reference to spatial_ref_sys -2008-09-17 14:46 robe +2008-09-17 14:46 Regina Obe <lr@pcorp.us> - * Link ST_SetSRID to updated spatial_ref_sys section using cutesy - anchor. + * [r2979] Link ST_SetSRID to updated spatial_ref_sys section using + cutesy anchor. -2008-09-17 14:41 robe +2008-09-17 14:41 Regina Obe <lr@pcorp.us> - * Give spatial reference systems section a cutesy anchor. + * [r2978] Give spatial reference systems section a cutesy anchor. -2008-09-17 05:49 robe +2008-09-17 05:49 Regina Obe <lr@pcorp.us> - * + * [r2977] -2008-09-17 05:48 robe +2008-09-17 05:48 Regina Obe <lr@pcorp.us> - * typo in link + * [r2976] typo in link -2008-09-17 04:14 robe +2008-09-17 04:14 Regina Obe <lr@pcorp.us> - * more fleshing out of spatial ref section + * [r2975] more fleshing out of spatial ref section -2008-09-17 04:00 robe +2008-09-17 04:00 Regina Obe <lr@pcorp.us> - * Beef up spatial reference section. Still needs work. + * [r2974] Beef up spatial reference section. Still needs work. -2008-09-17 03:54 kneufeld +2008-09-17 03:54 Kevin Neufeld <kneufeld.ca@gmail.com> - * added an id to ST_Buffer to provide an end link for cross + * [r2973] added an id to ST_Buffer to provide an end link for cross references. -2008-09-16 22:43 mcayland +2008-09-16 22:43 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Silence a few more compiler warnings that had appeared during my - last few parser commits. + * [r2972] Silence a few more compiler warnings that had appeared + during my last few parser commits. -2008-09-16 22:29 mcayland +2008-09-16 22:29 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Add an example of how the liblwgeom API can be used by other C - programs to manipulate geometries and output the result. + * [r2971] Add an example of how the liblwgeom API can be used by + other C programs to manipulate geometries and output the result. Currently the unparser.c program shows how a geometry can be constructed "on the fly" and then exported in both WKT and HEXWKB formats; however it gives programmers the potential to devise some very unique processing tools which can generate files that can be loaded into PostGIS. -2008-09-16 18:44 mcayland +2008-09-16 18:44 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Move the LWGEOM-specific functions from lwgeom_sqlmm.c into - liblwgeom/lwsegmentize.c to ensure that liblwgeom can exist as a - standalone library. + * [r2970] Move the LWGEOM-specific functions from lwgeom_sqlmm.c + into liblwgeom/lwsegmentize.c to ensure that liblwgeom can exist + as a standalone library. -2008-09-16 13:35 robe +2008-09-16 13:35 Regina Obe <lr@pcorp.us> - * Cleanup of FAQ + * [r2969] Cleanup of FAQ -2008-09-16 13:17 robe +2008-09-16 13:17 Regina Obe <lr@pcorp.us> - * Move over ST_Expand + * [r2968] Move over ST_Expand -2008-09-16 01:51 robe +2008-09-16 01:51 Regina Obe <lr@pcorp.us> - * Expand list of contributors + * [r2966] Expand list of contributors -2008-09-16 01:47 robe +2008-09-16 01:47 Regina Obe <lr@pcorp.us> - * Expand list of contributors + * [r2965] Expand list of contributors -2008-09-15 11:54 robe +2008-09-15 11:54 Regina Obe <lr@pcorp.us> - * Fix url link to proj to point to osgeo + * [r2963] Fix url link to proj to point to osgeo -2008-09-13 05:41 kneufeld +2008-09-13 05:41 Kevin Neufeld <kneufeld.ca@gmail.com> - * Moved over ST_IsRing to new PostGIS reference. + * [r2962] Moved over ST_IsRing to new PostGIS reference. Fixed link errors to ST_IsSimple. -2008-09-12 12:12 robe +2008-09-12 12:12 Regina Obe <lr@pcorp.us> - * typo + * [r2960] typo -2008-09-12 10:46 robe +2008-09-12 10:46 Regina Obe <lr@pcorp.us> - * Spelled Kevin's last name wrong and Mateusz first name wrong. - Sorry Kevin and Mateusz. + * [r2959] Spelled Kevin's last name wrong and Mateusz first name + wrong. Sorry Kevin and Mateusz. -2008-09-12 10:40 robe +2008-09-12 10:40 Regina Obe <lr@pcorp.us> - * Update Credits and project links + * [r2958] Update Credits and project links 1) Get rid of emails 2) Change order of key contributors based on heuristics a) duration of contribution, b) frequency of contributions, c)recency of contributions, d) impact of contributions, and add some new contributors (more need to be added) -2008-09-11 12:18 mcayland +2008-09-11 12:18 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Reinstate the PDF documentation system based on OpenJade, + * [r2957] Reinstate the PDF documentation system based on OpenJade, including integration with autoconf. "make postgis.pdf" should now output lovely PDF format documentation :) -2008-09-11 12:04 mcayland +2008-09-11 12:04 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Documentation fixes to allow PDF documents to be generated from - Docbook source using OpenJade - OpenJade seems a lot more strict - than xsltproc when generating output :( + * [r2956] Documentation fixes to allow PDF documents to be + generated from Docbook source using OpenJade - OpenJade seems a + lot more strict than xsltproc when generating output :( -2008-09-10 21:06 robe +2008-09-10 21:06 Regina Obe <lr@pcorp.us> - * Get rid of left over stuff from ST_IsValid and ST_Summary copy. + * [r2955] Get rid of left over stuff from ST_IsValid and ST_Summary + copy. -2008-09-10 11:57 robe +2008-09-10 11:57 Regina Obe <lr@pcorp.us> - * example and result misaligned + * [r2954] example and result misaligned -2008-09-10 11:39 robe +2008-09-10 11:39 Regina Obe <lr@pcorp.us> - * Move over ST_Summary and provide example. + * [r2953] Move over ST_Summary and provide example. -2008-09-10 11:28 robe +2008-09-10 11:28 Regina Obe <lr@pcorp.us> - * Move over ST_IsValid and provide example + * [r2952] Move over ST_IsValid and provide example -2008-09-10 07:28 robe +2008-09-10 07:28 Regina Obe <lr@pcorp.us> - * correct st_contain signature, other misc fixes + * [r2951] correct st_contain signature, other misc fixes -2008-09-10 06:47 robe +2008-09-10 06:47 Regina Obe <lr@pcorp.us> - * Add ST_IsValid reference to ST_Within. + * [r2950] Add ST_IsValid reference to ST_Within. -2008-09-09 21:10 mcayland +2008-09-09 21:10 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Allow a flags parameter to be passed into the WKT parser to - determine which consistency checks are performed out of polygon - ring closure, minimum number of points and odd number of points. + * [r2949] Allow a flags parameter to be passed into the WKT parser + to determine which consistency checks are performed out of + polygon ring closure, minimum number of points and odd number of + points. -2008-09-08 20:17 mcayland +2008-09-08 20:17 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Commit generated versions of the new parser files for people who - do not have flex or bison installed. + * [r2948] Commit generated versions of the new parser files for + people who do not have flex or bison installed. -2008-09-08 20:16 mcayland +2008-09-08 20:16 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Enhance geometry parser so that it keeps track of the current - position during parsing. With a bit more work, this should allow - error messages to pinpoint the exact location of an invalid - geometry section or syntax error. + * [r2947] Enhance geometry parser so that it keeps track of the + current position during parsing. With a bit more work, this + should allow error messages to pinpoint the exact location of an + invalid geometry section or syntax error. -2008-09-08 13:12 robe +2008-09-08 13:12 Regina Obe <lr@pcorp.us> - * Move over ST_Translate and provide example use + * [r2946] Move over ST_Translate and provide example use -2008-09-07 11:02 mcayland +2008-09-07 11:02 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Yet another update to the liblwgeom parser API - + * [r2945] Yet another update to the liblwgeom parser API - lwgeom_from_ewkt() has been renamed to serialized_lwgeom_from_ewkt() to indicate that the function returns a serialied LWGEOM rather than an unserialized LWGEOM structure. -2008-09-07 09:14 robe +2008-09-07 09:14 Regina Obe <lr@pcorp.us> - * typo in funcprototype + * [r2944] typo in funcprototype -2008-09-07 09:07 robe +2008-09-07 09:07 Regina Obe <lr@pcorp.us> - * Provide example of ST_SetPoint + * [r2943] Provide example of ST_SetPoint -2008-09-07 08:43 robe +2008-09-07 08:43 Regina Obe <lr@pcorp.us> - * Move over ST_SetPoint to new section + * [r2942] Move over ST_SetPoint to new section -2008-09-06 19:12 robe +2008-09-06 19:12 Regina Obe <lr@pcorp.us> - * change alias field names of st_contains examples + * [r2941] change alias field names of st_contains examples -2008-09-06 19:02 robe +2008-09-06 19:02 Regina Obe <lr@pcorp.us> - * correct mm spec section of ST_Contains. Remove MM ST_Contains - from old ref section + * [r2940] correct mm spec section of ST_Contains. Remove MM + ST_Contains from old ref section -2008-09-06 18:58 robe +2008-09-06 18:58 Regina Obe <lr@pcorp.us> - * Move over ST_Contains to new section. Provide example. Minor - changes to ST_Within + * [r2939] Move over ST_Contains to new section. Provide example. + Minor changes to ST_Within -2008-09-04 18:28 robe +2008-09-04 18:28 Regina Obe <lr@pcorp.us> - * Put in disclaimer on ST_Equals when dealing with invalid + * [r2938] Put in disclaimer on ST_Equals when dealing with invalid geometries -2008-09-04 12:40 robe +2008-09-04 12:40 Regina Obe <lr@pcorp.us> - * Move over ST_NDims and ST_Dimension to new reference section + * [r2937] Move over ST_NDims and ST_Dimension to new reference + section -2008-09-04 12:08 robe +2008-09-04 12:08 Regina Obe <lr@pcorp.us> - * minor change to example + * [r2936] minor change to example -2008-09-04 12:04 robe +2008-09-04 12:04 Regina Obe <lr@pcorp.us> - * accidentally took out reference from ST_OrderingEquals + * [r2935] accidentally took out reference from ST_OrderingEquals -2008-09-04 11:56 robe +2008-09-04 11:56 Regina Obe <lr@pcorp.us> - * Move over ST_Overlaps to new reference section and provide some - examples + * [r2934] Move over ST_Overlaps to new reference section and + provide some examples -2008-08-28 21:09 robe +2008-08-28 21:09 Regina Obe <lr@pcorp.us> - * Fixed url links to geos and proj. Both are now osgeo projects and - no longer at refractions or remotesensing. Move around - instructions putting geos and proj compilation steps at the end - per Mark's request + * [r2932] Fixed url links to geos and proj. Both are now osgeo + projects and no longer at refractions or remotesensing. Move + around instructions putting geos and proj compilation steps at + the end per Mark's request -2008-08-27 04:34 kneufeld +2008-08-27 04:34 Kevin Neufeld <kneufeld.ca@gmail.com> - * moved ST_IsClosed to the new documentation template. + * [r2931] moved ST_IsClosed to the new documentation template. -2008-08-24 04:54 kneufeld +2008-08-24 04:54 Kevin Neufeld <kneufeld.ca@gmail.com> - * moved ST_StartPoint and ST_EndPoint to new reference_new.xml + * [r2930] moved ST_StartPoint and ST_EndPoint to new + reference_new.xml -2008-08-22 17:47 robe +2008-08-22 17:47 Regina Obe <lr@pcorp.us> - * another typo + * [r2929] another typo -2008-08-22 17:36 robe +2008-08-22 17:36 Regina Obe <lr@pcorp.us> - * Typo + * [r2928] Typo -2008-08-22 17:13 robe +2008-08-22 17:13 Regina Obe <lr@pcorp.us> - * Some changes based on Mark's comments. + * [r2927] Some changes based on Mark's comments. -2008-08-22 14:46 robe +2008-08-22 14:46 Regina Obe <lr@pcorp.us> - * More typos + * [r2926] More typos -2008-08-22 13:37 robe +2008-08-22 13:37 Regina Obe <lr@pcorp.us> - * typo + * [r2925] typo -2008-08-22 13:05 robe +2008-08-22 13:05 Regina Obe <lr@pcorp.us> - * More reordering + * [r2924] More reordering -2008-08-22 12:52 robe +2008-08-22 12:52 Regina Obe <lr@pcorp.us> - * Installation got moved out of order for some reason. + * [r2923] Installation got moved out of order for some reason. -2008-08-22 12:32 robe +2008-08-22 12:32 Regina Obe <lr@pcorp.us> - * Typo + * [r2922] Typo -2008-08-22 12:14 robe +2008-08-22 12:14 Regina Obe <lr@pcorp.us> - * Updated the installations docs. I took some of Olivier Courtin - instructions for install + * [r2921] Updated the installations docs. I took some of Olivier + Courtin instructions for install (http://postgis.refractions.net/pipermail/postgis-users/2008-August/020746.html) which seemed much easier to follow than the ones we currently have. Also corrected path settings we had to the install files. They are all in downloads not root of postgis as we suggested. -2008-08-21 11:27 mcayland - - * Update PostGIS README file to account for changes in SVN trunk. +2008-08-21 11:27 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> -2008-08-21 10:56 mcayland + * [r2920] Update PostGIS README file to account for changes in SVN + trunk. - * Update PostGIS SVN trunk to use the new 8.4 GiST API (where - RECHECK is now specified within the consistent function, rather - than being supplied as part of the operator class definition). - This allows PostGIS to compile and pass regression tests on the - latest PostgreSQL 8.4 CVS HEAD. +2008-08-21 10:56 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> -2008-08-21 08:45 mcayland - - * Alter the lwgeom Makefile so that liblwgeom.a is linked directly, - rather than using the -L...-l options on the command line. This - is to prevent problems on OSX where PGXSadds the PostgreSQL - $libdir to the PostGIS link line, causing it to link to - liblwgeom.so produced by older versions of PostGIS rather than + * [r2919] Update PostGIS SVN trunk to use the new 8.4 GiST API + (where RECHECK is now specified within the consistent function, + rather than being supplied as part of the operator class + definition). This allows PostGIS to compile and pass regression + tests on the latest PostgreSQL 8.4 CVS HEAD. + +2008-08-21 08:45 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r2918] Alter the lwgeom Makefile so that liblwgeom.a is linked + directly, rather than using the -L...-l options on the command + line. This is to prevent problems on OSX where PGXSadds the + PostgreSQL $libdir to the PostGIS link line, causing it to link + to liblwgeom.so produced by older versions of PostGIS rather than the static liblwgeom.a. Also change the PGXS CPP/LIB equivalent variables to use += so that extra compile/link options can be supplied. Per report from Robert Rainthorpe, with thanks to William Kyngesburye. -2008-08-12 16:42 pramsey +2008-08-12 16:42 Paul Ramsey <pramsey@cleverelephant.ca> - * move to CLASS/STYLE mapserver 5.X syntax + * [r2916] move to CLASS/STYLE mapserver 5.X syntax -2008-08-04 11:50 robe +2008-08-04 11:50 Regina Obe <lr@pcorp.us> - * Moved over ST_SRID, fixed a typo, added some references + * [r2915] Moved over ST_SRID, fixed a typo, added some references -2008-08-04 11:32 robe +2008-08-04 11:32 Regina Obe <lr@pcorp.us> - * got rid of additional entry for ST_GeomFromText - was already - moved over, moved over ST_PointFromText, ST_MakePoint + * [r2914] got rid of additional entry for ST_GeomFromText - was + already moved over, moved over ST_PointFromText, ST_MakePoint -2008-08-03 15:05 pramsey +2008-08-03 15:05 Paul Ramsey <pramsey@cleverelephant.ca> - * Spelling changes from Mark Kolybabi. + * [r2913] Spelling changes from Mark Kolybabi. -2008-08-02 22:03 mcayland +2008-08-02 22:03 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Add a download reference for Apache Ant, plus fix a couple more - typos. + * [r2912] Add a download reference for Apache Ant, plus fix a + couple more typos. -2008-08-02 08:41 mcayland +2008-08-02 08:41 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Correct typo from the previous documentation commit. + * [r2911] Correct typo from the previous documentation commit. -2008-08-02 08:24 mcayland +2008-08-02 08:24 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * A long overdue documentation update - update the installation - section to reflect the many changes in the new SVN trunk build - system. + * [r2909] A long overdue documentation update - update the + installation section to reflect the many changes in the new SVN + trunk build system. -2008-08-01 16:01 robe +2008-08-01 16:01 Regina Obe <lr@pcorp.us> - * bad break in GeoJSON example + * [r2908] bad break in GeoJSON example -2008-08-01 15:18 robe +2008-08-01 15:18 Regina Obe <lr@pcorp.us> - * Provide example for geojson (excerpts from postgis newsgroup - thread) + * [r2907] Provide example for geojson (excerpts from postgis + newsgroup thread) -2008-08-01 15:12 kneufeld +2008-08-01 15:12 Kevin Neufeld <kneufeld.ca@gmail.com> - * Reverted html markup for mathematical expressions in ST_Touches - and ST_Crosses to a gif image. It seems unicode markup does not - work well for both IE and Firefox. The next best thing to do is - to get MathML markup working. + * [r2906] Reverted html markup for mathematical expressions in + ST_Touches and ST_Crosses to a gif image. It seems unicode markup + does not work well for both IE and Firefox. The next best thing + to do is to get MathML markup working. -2008-08-01 04:42 kneufeld +2008-08-01 04:42 Kevin Neufeld <kneufeld.ca@gmail.com> - * small grammar correction in ST_Touches + * [r2905] small grammar correction in ST_Touches -2008-08-01 04:26 kneufeld +2008-08-01 04:26 Kevin Neufeld <kneufeld.ca@gmail.com> - * added ST_Touches examples + * [r2904] added ST_Touches examples -2008-07-31 12:32 robe +2008-07-31 12:32 Regina Obe <lr@pcorp.us> - * took out kml example - causing parsing error. + * [r2903] took out kml example - causing parsing error. -2008-07-31 12:14 robe +2008-07-31 12:14 Regina Obe <lr@pcorp.us> - * Moved over remaining geometry output functions and put in + * [r2902] Moved over remaining geometry output functions and put in availability for each. -2008-07-31 06:35 robe +2008-07-31 06:35 Regina Obe <lr@pcorp.us> - * Put in Availability 1.3.4 for ST_AsGeoJSON + * [r2901] Put in Availability 1.3.4 for ST_AsGeoJSON -2008-07-31 06:33 kneufeld +2008-07-31 06:33 Kevin Neufeld <kneufeld.ca@gmail.com> - * fixed small typo in ST_Touches mathematical expression + * [r2899] fixed small typo in ST_Touches mathematical expression -2008-07-31 06:29 kneufeld +2008-07-31 06:29 Kevin Neufeld <kneufeld.ca@gmail.com> - * Moved over ST_Touches to new PostGIS reference. Examples + * [r2898] Moved over ST_Touches to new PostGIS reference. Examples forthcoming. -2008-07-31 04:57 kneufeld +2008-07-31 04:57 Kevin Neufeld <kneufeld.ca@gmail.com> - * replaced the mathematical gif expression in ST_Crosses with - simple html markup + * [r2897] replaced the mathematical gif expression in ST_Crosses + with simple html markup -2008-07-30 14:05 robe +2008-07-30 14:05 Regina Obe <lr@pcorp.us> - * Move over ST_WKTToSQL and also defined ST_GeometryFromText - (didn't see it in the old docs, but its not deprecated and is a - popular variant) + * [r2896] Move over ST_WKTToSQL and also defined + ST_GeometryFromText (didn't see it in the old docs, but its not + deprecated and is a popular variant) -2008-07-30 11:41 robe +2008-07-30 11:41 Regina Obe <lr@pcorp.us> - * Got rid pf superfluous redirection to deprecated functions of - ST_GeomFromWkb and ST_GeomFromText - now they just point directly - to the c functions. Changed all FromWKB, FromText variants to - point to the non-deprecated ST_GeomFrom, ST_BuildArea etc. - (before they were pointing at deprecated functions) + * [r2895] Got rid pf superfluous redirection to deprecated + functions of ST_GeomFromWkb and ST_GeomFromText - now they just + point directly to the c functions. Changed all FromWKB, FromText + variants to point to the non-deprecated ST_GeomFrom, ST_BuildArea + etc. (before they were pointing at deprecated functions) -2008-07-29 15:46 robe +2008-07-29 15:46 Regina Obe <lr@pcorp.us> - * grammatical error + * [r2894] grammatical error -2008-07-29 15:42 robe +2008-07-29 15:42 Regina Obe <lr@pcorp.us> - * Move over ST_Collect and ST_Union, provide examples for ST_Union. - Get rid of comment about don't use ST_Union with geometry - collections - seems to work fine with those. + * [r2893] Move over ST_Collect and ST_Union, provide examples for + ST_Union. Get rid of comment about don't use ST_Union with + geometry collections - seems to work fine with those. -2008-07-29 12:35 robe +2008-07-29 12:35 Regina Obe <lr@pcorp.us> - * typo in function declare for perimeter + * [r2892] typo in function declare for perimeter -2008-07-29 12:00 robe +2008-07-29 12:00 Regina Obe <lr@pcorp.us> - * remove ST_Area from reference.xml already accounted for in - reference_new.xml, move over ST_Length, ST_Perimeter + * [r2891] remove ST_Area from reference.xml already accounted for + in reference_new.xml, move over ST_Length, ST_Perimeter -2008-07-29 05:43 kneufeld +2008-07-29 05:43 Kevin Neufeld <kneufeld.ca@gmail.com> - * moved over st_pointonsurface and provided examples. + * [r2890] moved over st_pointonsurface and provided examples. -2008-07-29 05:11 kneufeld +2008-07-29 05:11 Kevin Neufeld <kneufeld.ca@gmail.com> - * moved over st_centroid and provided examples in both svg and png - format. Eventually, ImageMagick will be used to generate the png - files, but for now they are committed into svn. + * [r2889] moved over st_centroid and provided examples in both svg + and png format. Eventually, ImageMagick will be used to generate + the png files, but for now they are committed into svn. -2008-07-29 04:42 robe +2008-07-29 04:42 Regina Obe <lr@pcorp.us> - * minor formatting changes, note about ST_NumPOints being an alias - for ST_NPoints moving forward. + * [r2888] minor formatting changes, note about ST_NumPOints being + an alias for ST_NPoints moving forward. -2008-07-28 19:05 kneufeld +2008-07-28 19:05 Kevin Neufeld <kneufeld.ca@gmail.com> - * fixed some minor xrefences in the documentation so the autobuild - doesn't throw errors. + * [r2887] fixed some minor xrefences in the documentation so the + autobuild doesn't throw errors. -2008-07-28 12:07 robe +2008-07-28 12:07 Regina Obe <lr@pcorp.us> - * Move over ST_GeomFromEWKT, ST_GeomFromEWKB and provide examples. - Fix some miscellaneous references. + * [r2886] Move over ST_GeomFromEWKT, ST_GeomFromEWKB and provide + examples. Fix some miscellaneous references. -2008-07-28 10:03 mcayland +2008-07-28 10:03 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Allow Makefile substitutions for PGCONFIG which are required if - pg_config is not located in the path. Note that as part of this - fix, we now need to generate topology/Makefile using autoconf. - Thanks to Jorgen Austvik for the report and partial patch. + * [r2885] Allow Makefile substitutions for PGCONFIG which are + required if pg_config is not located in the path. Note that as + part of this fix, we now need to generate topology/Makefile using + autoconf. Thanks to Jorgen Austvik for the report and partial + patch. -2008-07-28 09:13 mcayland +2008-07-28 09:13 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix -o option for flex; the output filename must be specified - immediately after -o without any preceding white space. Per - report from Jorgen Austvik. + * [r2884] Fix -o option for flex; the output filename must be + specified immediately after -o without any preceding white space. + Per report from Jorgen Austvik. -2008-07-24 11:58 robe +2008-07-24 11:58 Regina Obe <lr@pcorp.us> - * Move over ST_GeomFromText and provide examples + * [r2883] Move over ST_GeomFromText and provide examples -2008-07-24 10:22 mcayland +2008-07-24 10:22 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Add PROJ.4 version check to ensure that a minimum version of - 4.5.0 is installed. This is to ensure that the + * [r2882] Add PROJ.4 version check to ensure that a minimum version + of 4.5.0 is installed. This is to ensure that the pj_set_searchpath() function is present (note: it was actually added in 4.4.9, however we version detect on major.minor rather than major.minor.release) -2008-07-24 05:55 kneufeld +2008-07-24 05:55 Kevin Neufeld <kneufeld.ca@gmail.com> - * Moved several version functions to the new PostGIS reference. + * [r2881] Moved several version functions to the new PostGIS + reference. -2008-07-23 17:13 kneufeld +2008-07-23 17:13 Kevin Neufeld <kneufeld.ca@gmail.com> - * added some xreferences so the autobuild process does not throw - errors. + * [r2880] added some xreferences so the autobuild process does not + throw errors. -2008-07-23 16:40 kneufeld +2008-07-23 16:40 Kevin Neufeld <kneufeld.ca@gmail.com> - * changed @@LAST_RELEASE_VERSION@@ with a DocBook variable so the - correct version number gets substituted in all included files, - not just postgis.xml + * [r2879] changed @@LAST_RELEASE_VERSION@@ with a DocBook variable + so the correct version number gets substituted in all included + files, not just postgis.xml -2008-07-23 12:03 robe +2008-07-23 12:03 Regina Obe <lr@pcorp.us> - * move of ST_AsBinary,ST_AsEWKB - add examples, various minor fixes - to ST_As function descriptions + * [r2878] move of ST_AsBinary,ST_AsEWKB - add examples, various + minor fixes to ST_As function descriptions -2008-07-23 10:56 robe +2008-07-23 10:56 Regina Obe <lr@pcorp.us> - * + * [r2877] -2008-07-22 13:53 robe +2008-07-22 13:53 Regina Obe <lr@pcorp.us> - * Deprecate ST_area2d + * [r2876] Deprecate ST_area2d -2008-07-22 11:38 robe +2008-07-22 11:38 Regina Obe <lr@pcorp.us> - * Move over ST_AsText, ST_AsEWKT and provide examples. Change order - of ST_Multi. + * [r2875] Move over ST_AsText, ST_AsEWKT and provide examples. + Change order of ST_Multi. -2008-07-22 11:12 robe +2008-07-22 11:12 Regina Obe <lr@pcorp.us> - * move over ST_SetSRID, ST_Transform and ST_Multi. Provide + * [r2874] move over ST_SetSRID, ST_Transform and ST_Multi. Provide examples. -2008-07-21 16:20 robe +2008-07-21 16:20 Regina Obe <lr@pcorp.us> - * Remove ST_Area2D and replace with ST_Area - move to new section - and provide example + * [r2873] Remove ST_Area2D and replace with ST_Area - move to new + section and provide example -2008-07-21 12:09 robe +2008-07-21 12:09 Regina Obe <lr@pcorp.us> - * Move over ST_GeometryType, ST_MakePolygon + * [r2871] Move over ST_GeometryType, ST_MakePolygon -2008-07-21 11:38 robe +2008-07-21 11:38 Regina Obe <lr@pcorp.us> - * delete reference to ST_Equals in reference.xml - alread in new - version, include an ST_DWithin non-join join example. + * [r2870] delete reference to ST_Equals in reference.xml - alread + in new version, include an ST_DWithin non-join join example. -2008-07-18 12:23 robe +2008-07-18 12:23 Regina Obe <lr@pcorp.us> - * Move over ST_AddPoint, ST_RemovePoint, ST_Npoints, ST_NumPoints - and provide examples. + * [r2869] Move over ST_AddPoint, ST_RemovePoint, ST_Npoints, + ST_NumPoints and provide examples. -2008-07-17 14:16 robe +2008-07-17 14:16 Regina Obe <lr@pcorp.us> - * Move ST_Reverse and add example + * [r2868] Move ST_Reverse and add example -2008-07-17 12:14 robe +2008-07-17 12:14 Regina Obe <lr@pcorp.us> - * Move ST_BuildArea expand on definition, provide example, Move - ST_BdPolyFromText and ST_BdMPolyFromText + * [r2867] Move ST_BuildArea expand on definition, provide example, + Move ST_BdPolyFromText and ST_BdMPolyFromText -2008-07-17 11:20 robe +2008-07-17 11:20 Regina Obe <lr@pcorp.us> - * move over ST_Within and provide example + * [r2866] move over ST_Within and provide example -2008-07-16 08:42 mcayland +2008-07-16 08:42 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix for segfault in ANALYZE due to incorrect use of legacy BOX - type within compute_geometry_stats() (Fixes GBT#43). Thanks to - Landon Fuller for the bug report and fix. + * [r2864] Fix for segfault in ANALYZE due to incorrect use of + legacy BOX type within compute_geometry_stats() (Fixes GBT#43). + Thanks to Landon Fuller for the bug report and fix. -2008-07-16 06:42 kneufeld +2008-07-16 06:42 Kevin Neufeld <kneufeld.ca@gmail.com> - * moved ST_Envelope, complete with examples. + * [r2863] moved ST_Envelope, complete with examples. -2008-07-16 05:10 kneufeld +2008-07-16 05:10 Kevin Neufeld <kneufeld.ca@gmail.com> - * updated the st_crosses method: + * [r2862] updated the st_crosses method: made the geometry parameters lowercase and made a few changes to content. -2008-07-16 05:03 kneufeld +2008-07-16 05:03 Kevin Neufeld <kneufeld.ca@gmail.com> - * Moved ST_Crosses into new reference_new.xml file, complete with - images. + * [r2861] Moved ST_Crosses into new reference_new.xml file, + complete with images. Updated css to use fixed-width fonts for programlistings. -2008-07-16 04:55 kneufeld +2008-07-16 04:55 Kevin Neufeld <kneufeld.ca@gmail.com> - * fixed small typo + * [r2860] fixed small typo -2008-07-16 04:54 kneufeld +2008-07-16 04:54 Kevin Neufeld <kneufeld.ca@gmail.com> - * Apparently, the <inlinegraphic> will become deprecated in a - future version of DocBook. Now replaced with <inlinemediaobject>. + * [r2859] Apparently, the <inlinegraphic> will become deprecated in + a future version of DocBook. Now replaced with + <inlinemediaobject>. -2008-07-15 21:20 kneufeld +2008-07-15 21:20 Kevin Neufeld <kneufeld.ca@gmail.com> - * fixed a small typo so the autobuild process will still work. + * [r2858] fixed a small typo so the autobuild process will still + work. -2008-07-15 19:38 robe +2008-07-15 19:38 Regina Obe <lr@pcorp.us> - * Move ST_Equals, ST_OrderingEquals - provide examples. Make - Geometry - geometry + * [r2857] Move ST_Equals, ST_OrderingEquals - provide examples. + Make Geometry - geometry -2008-07-15 18:02 robe +2008-07-15 18:02 Regina Obe <lr@pcorp.us> - * minor corrections to ST_SetSRID and UpdateGeometrySRID + * [r2856] minor corrections to ST_SetSRID and UpdateGeometrySRID -2008-07-15 17:54 robe +2008-07-15 17:54 Regina Obe <lr@pcorp.us> - * remove includes index note for ST_MakeLine + * [r2855] remove includes index note for ST_MakeLine -2008-07-15 17:51 robe +2008-07-15 17:51 Regina Obe <lr@pcorp.us> - * Move ST_Intersection, ST_Disjoint provide examples for both. + * [r2854] Move ST_Intersection, ST_Disjoint provide examples for + both. -2008-07-15 15:33 kneufeld +2008-07-15 15:33 Kevin Neufeld <kneufeld.ca@gmail.com> - * applied patch from Mark to fix the if/then/else so the Makefile - can run on older systems (ie. FC3) + * [r2853] applied patch from Mark to fix the if/then/else so the + Makefile can run on older systems (ie. FC3) -2008-07-15 11:34 robe +2008-07-15 11:34 Regina Obe <lr@pcorp.us> - * typo + * [r2852] typo -2008-07-15 11:03 robe +2008-07-15 11:03 Regina Obe <lr@pcorp.us> - * Move ST_MakeLine from reference.xml to reference_new.xml and add - an additional example to ST_MakeLine + * [r2851] Move ST_MakeLine from reference.xml to reference_new.xml + and add an additional example to ST_MakeLine -2008-07-15 06:57 kneufeld +2008-07-15 06:57 Kevin Neufeld <kneufeld.ca@gmail.com> - * Started migration of the functions in reference.xml using the - <variablelist> concept to a new "reference_new.xml" using + * [r2850] Started migration of the functions in reference.xml using + the <variablelist> concept to a new "reference_new.xml" using DocBook's <refentry> concept. Once migration is complete, reference.xml will be removed and reference_new.xml will be renamed to reference.xml. The included template.xml file is not used, except to provide example usage of DocBook's refentry tag. -2008-07-14 21:52 pramsey +2008-07-14 21:52 Paul Ramsey <pramsey@cleverelephant.ca> - * Updated CSS from Dane Springmeyer + * [r2849] Updated CSS from Dane Springmeyer -2008-07-14 16:30 robe +2008-07-14 16:30 Regina Obe <lr@pcorp.us> - * Example use case of ST_DWithin + * [r2847] Example use case of ST_DWithin -2008-07-14 11:40 mcayland +2008-07-14 11:40 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Modify autoconf stylesheet logic (again) to correctly distinguish - between the case where a valid docbook stylesheet is found - automatically and where it is explicitly specified using the - --with-xsldir option. + * [r2846] Modify autoconf stylesheet logic (again) to correctly + distinguish between the case where a valid docbook stylesheet is + found automatically and where it is explicitly specified using + the --with-xsldir option. -2008-07-14 10:41 mcayland +2008-07-14 10:41 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Change autoconf iconv-detection code so that ICONV_LDFLAGS is - explicitly set in the AC_CHECK_LIB() action-if-found section - (LIBS does not get automatically set when action-if-found is - set). Thanks to Olivier Courtin for the bug report. + * [r2845] Change autoconf iconv-detection code so that + ICONV_LDFLAGS is explicitly set in the AC_CHECK_LIB() + action-if-found section (LIBS does not get automatically set when + action-if-found is set). Thanks to Olivier Courtin for the bug + report. -2008-07-14 10:05 mcayland +2008-07-14 10:05 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Apply some autoconf / Makefile changes from Olivier Courtin. - XSLBASE should not be checked for validity unless it has been - explicitly specified using the --with-xsldir option, and we also - add some friendlier messages in the documentation Makefile in - case the DocBook stylesheets and/or xsltproc cannot be found. + * [r2844] Apply some autoconf / Makefile changes from Olivier + Courtin. XSLBASE should not be checked for validity unless it has + been explicitly specified using the --with-xsldir option, and we + also add some friendlier messages in the documentation Makefile + in case the DocBook stylesheets and/or xsltproc cannot be found. Additionally, the configure --help output has been tidied up using the AS_HELP_STRING macro. -2008-07-13 23:47 pramsey +2008-07-13 23:47 Paul Ramsey <pramsey@cleverelephant.ca> - * Apply GeoJSON patch from Olivier Courtin. + * [r2842] Apply GeoJSON patch from Olivier Courtin. -2008-07-13 17:33 mcayland +2008-07-13 17:33 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Rename the new parser function ewkt_to_lwgeom() to + * [r2841] Rename the new parser function ewkt_to_lwgeom() to lwgeon_from_ewkt() so that it matches the rest of the parser API -2008-07-13 11:09 mcayland +2008-07-13 11:09 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Add some additional LWDEBUG(F) statements for debugging that I - missed the first time around with the new debugging + * [r2840] Add some additional LWDEBUG(F) statements for debugging + that I missed the first time around with the new debugging infrastructure -2008-07-13 10:50 mcayland +2008-07-13 10:50 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * More work on improving the EWKT/B parser; remove all references - to allocator functions from outside of liblwgeom by generating - wrapper functions with more meaningful names. As well as cleaning - up the API, it also makes the code much more readable + * [r2839] More work on improving the EWKT/B parser; remove all + references to allocator functions from outside of liblwgeom by + generating wrapper functions with more meaningful names. As well + as cleaning up the API, it also makes the code much more readable -2008-07-11 10:48 robe +2008-07-11 10:48 Regina Obe <lr@pcorp.us> - * Example uses of ST_Line_SubString + * [r2838] Example uses of ST_Line_SubString -2008-07-10 13:16 robe +2008-07-10 13:16 Regina Obe <lr@pcorp.us> - * Examples of using ST_ExteriorRing and ST_NumInteriorRings + * [r2837] Examples of using ST_ExteriorRing and ST_NumInteriorRings -2008-07-09 11:16 robe +2008-07-09 11:16 Regina Obe <lr@pcorp.us> - * Numerous small changes. Changed some returns 1 (TRUE) to just - TRUE. Automatic casting between 0 1 and boolean no longer exists - in PostgreSQL. Lets not confuse people by suggesting to them they - are the same. + * [r2836] Numerous small changes. Changed some returns 1 (TRUE) to + just TRUE. Automatic casting between 0 1 and boolean no longer + exists in PostgreSQL. Lets not confuse people by suggesting to + them they are the same. -2008-07-08 13:30 robe +2008-07-08 13:30 Regina Obe <lr@pcorp.us> - * numerous changes(remove additional parent, argument list changes, - multi function breakout) + * [r2835] numerous changes(remove additional parent, argument list + changes, multi function breakout) -2008-07-08 12:01 robe +2008-07-08 12:01 Regina Obe <lr@pcorp.us> - * Provide examples of using ST_MakePolygon in conjunction with - ST_Accum and PostgreSQL ARRAY() function + * [r2834] Provide examples of using ST_MakePolygon in conjunction + with ST_Accum and PostgreSQL ARRAY() function -2008-07-08 06:05 mleslie +2008-07-08 06:05 Mark Leslie <mark.leslie@lisasoft.com> - * Added brief descriptions to the SQL-MM curve types. + * [r2833] Added brief descriptions to the SQL-MM curve types. -2008-07-08 05:15 kneufeld +2008-07-08 05:15 Kevin Neufeld <kneufeld.ca@gmail.com> - * modified toc top generation level param + * [r2832] modified toc top generation level param -2008-07-08 05:09 kneufeld +2008-07-08 05:09 Kevin Neufeld <kneufeld.ca@gmail.com> - * split postgis.xml into manageable chunks, broken at chapter - divisions. + * [r2831] split postgis.xml into manageable chunks, broken at + chapter divisions. -2008-07-08 03:12 kneufeld +2008-07-08 03:12 Kevin Neufeld <kneufeld.ca@gmail.com> - * updated tips section to reference ST_* function names + * [r2830] updated tips section to reference ST_* function names -2008-07-07 12:20 robe +2008-07-07 12:20 Regina Obe <lr@pcorp.us> - * Example of ST_AddPoint, some fixes of non-ST references, + * [r2829] Example of ST_AddPoint, some fixes of non-ST references, miscellaneous indenting changes. -2008-07-07 11:57 robe +2008-07-07 11:57 Regina Obe <lr@pcorp.us> - * Add examples for ST_MakePolygon, correct non-st to ST references - in ST_MakePolygon section + * [r2828] Add examples for ST_MakePolygon, correct non-st to ST + references in ST_MakePolygon section -2008-07-06 07:22 robe +2008-07-06 07:22 Regina Obe <lr@pcorp.us> - * fixed ST_Dimension example, flipped order of conditions in WHERE - on some examples (in later versions of PostgreSQL since we don't - have our costs right - the planner may choose to process in order - of conditions + * [r2827] fixed ST_Dimension example, flipped order of conditions + in WHERE on some examples (in later versions of PostgreSQL since + we don't have our costs right - the planner may choose to process + in order of conditions -2008-07-06 01:47 kneufeld +2008-07-06 01:47 Kevin Neufeld <kneufeld.ca@gmail.com> - * fixed typo in a WKT example. + * [r2826] fixed typo in a WKT example. -2008-07-03 19:07 robe +2008-07-03 19:07 Regina Obe <lr@pcorp.us> - * Examples of use of ST_MakeLine, correction to my ST_Collect - example. + * [r2825] Examples of use of ST_MakeLine, correction to my + ST_Collect example. -2008-07-03 17:36 pramsey +2008-07-03 17:36 Paul Ramsey <pramsey@cleverelephant.ca> - * Add version information to <title> + * [r2824] Add version information to <title> -2008-07-03 17:08 pramsey +2008-07-03 17:08 Paul Ramsey <pramsey@cleverelephant.ca> - * Match version numbers to new naming conventions. + * [r2821] Match version numbers to new naming conventions. -2008-07-03 09:28 mcayland +2008-07-03 09:28 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Add the parser build rules back into the liblwgeom Makefile, so - now any changes to either the lexer or parser source files will - automatically invoke a rebuild of the relevant output files - during make + * [r2820] Add the parser build rules back into the liblwgeom + Makefile, so now any changes to either the lexer or parser source + files will automatically invoke a rebuild of the relevant output + files during make -2008-07-01 14:15 mcayland +2008-07-01 14:15 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix liblwgeom requiring gcc to compile. By using macros and - variables supplied by libtool, we can now detect the PIC flags - and whether the compiler will accept additional gcc warning flags - for developers + * [r2819] Fix liblwgeom requiring gcc to compile. By using macros + and variables supplied by libtool, we can now detect the PIC + flags and whether the compiler will accept additional gcc warning + flags for developers -2008-06-30 15:30 robe +2008-06-30 15:30 Regina Obe <lr@pcorp.us> - * Fixed typo + * [r2817] Fixed typo -2008-06-29 19:19 mcayland +2008-06-29 19:19 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Move some PostgreSQL compatibility macros from lwgeom_pg.h into - pgsql_compat.h which is their proper home + * [r2816] Move some PostgreSQL compatibility macros from + lwgeom_pg.h into pgsql_compat.h which is their proper home -2008-06-29 19:11 mcayland +2008-06-29 19:11 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Split the basic geometry accessors into a separate static library - liblwgeom.a; this potentially allows re-use of the liblwgeom - functions from within PostGIS, or could be extended at a later - date to include databases other than MySQL. This patch includes a - change to the liblwgeom handler functions; instead of sprinkling - init_pg_func()s around the source, I have changed the default - liblwgeom handlers to make use of a callback to allow linked - libraries to set their own handlers the first time any of them - are called. I have also tidied up the parser API a little in + * [r2815] Split the basic geometry accessors into a separate static + library liblwgeom.a; this potentially allows re-use of the + liblwgeom functions from within PostGIS, or could be extended at + a later date to include databases other than MySQL. This patch + includes a change to the liblwgeom handler functions; instead of + sprinkling init_pg_func()s around the source, I have changed the + default liblwgeom handlers to make use of a callback to allow + linked libraries to set their own handlers the first time any of + them are called. I have also tidied up the parser API a little in liblwgeom.h, which means wktparse.h can be removed from all of the headers in the lwgeom/ directory, plus renamed wktunparse.c to lwgunparse.c to keep things similar to lwgparse.c. Finally, I @@ -8348,96 +28255,99 @@ options, but these can be fixed later - it seemed more important to make the warnings visible to developers. -2008-06-28 05:34 robe +2008-06-28 05:34 Regina Obe <lr@pcorp.us> - * Flesh out definition of ST_Collect and how to use it. + * [r2814] Flesh out definition of ST_Collect and how to use it. -2008-06-26 02:40 kneufeld +2008-06-26 02:40 Kevin Neufeld <kneufeld.ca@gmail.com> - * ST_SnapToGrid SQL functions were referencing the deprecated - SnapToGrid instead of their ST_.. equivalents. + * [r2812] ST_SnapToGrid SQL functions were referencing the + deprecated SnapToGrid instead of their ST_.. equivalents. -2008-06-24 16:12 robe +2008-06-24 16:12 Regina Obe <lr@pcorp.us> - * Fix mismatched para in intersection documentation and remove - dangling command tag in Reporting Documentation Issues section. + * [r2811] Fix mismatched para in intersection documentation and + remove dangling command tag in Reporting Documentation Issues + section. -2008-06-24 15:57 robe +2008-06-24 15:57 Regina Obe <lr@pcorp.us> - * Definitions for st_convexhull and st_shift_longitude + * [r2810] Definitions for st_convexhull and st_shift_longitude -2008-06-06 08:53 mcayland +2008-06-06 08:53 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Rearrange lwgeom/Makefile.in in terms of the liblwgeom/PostgreSQL - distinction, plus remove remaining JTS reference. + * [r2809] Rearrange lwgeom/Makefile.in in terms of the + liblwgeom/PostgreSQL distinction, plus remove remaining JTS + reference. -2008-06-06 08:48 mcayland +2008-06-06 08:48 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Remove JTS support from liblwpostgis; native GCJ-compiled JTS - code is reported not to be reliable enough within a production - environment, so well stick with GEOS. + * [r2808] Remove JTS support from liblwpostgis; native GCJ-compiled + JTS code is reported not to be reliable enough within a + production environment, so well stick with GEOS. -2008-06-05 16:08 mcayland +2008-06-05 16:08 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Some more updates to lwpostgis.sql.in.c; correct a couple of - missing conversions from OPAQUE_TYPE to internal (how on earth + * [r2807] Some more updates to lwpostgis.sql.in.c; correct a couple + of missing conversions from OPAQUE_TYPE to internal (how on earth did regression tests pass with this still in place??), plus remove the UPDATE on pg_opclass to change the OID of the index storage type since we can do this by specifying a STORAGE clause instead. -2008-06-05 14:49 mcayland +2008-06-05 14:49 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Remove Makefile from lwgeom/ directory; it is no longer needed as - it is automatically generated from lwgeom/Makefile.in + * [r2806] Remove Makefile from lwgeom/ directory; it is no longer + needed as it is automatically generated from lwgeom/Makefile.in -2008-06-05 14:47 mcayland +2008-06-05 14:47 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Update new Makefile copyrights, also remove compat.h from the - loader/ directory since it is now no longer needed. + * [r2805] Update new Makefile copyrights, also remove compat.h from + the loader/ directory since it is now no longer needed. -2008-06-05 14:30 mcayland +2008-06-05 14:30 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Update copyrights for configure.ac (rewritten from scratch, and - now renamed from the deprecated form configure.in) and also the - PROJ.4 version detection macro + * [r2804] Update copyrights for configure.ac (rewritten from + scratch, and now renamed from the deprecated form configure.in) + and also the PROJ.4 version detection macro -2008-06-05 12:09 mcayland +2008-06-05 12:09 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Switch all SQL and PL/PGSQL stored procedures over to use dollar - quoting instead of apostrophes for function bodies. At last, most - of the stored procedures actually become readable + * [r2803] Switch all SQL and PL/PGSQL stored procedures over to use + dollar quoting instead of apostrophes for function bodies. At + last, most of the stored procedures actually become readable -2008-06-05 11:19 mcayland +2008-06-05 11:19 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Remove the HAS_SCHEMA #define and all related #else code since we - now guarantee to be using PostgreSQL > 7.2 + * [r2802] Remove the HAS_SCHEMA #define and all related #else code + since we now guarantee to be using PostgreSQL > 7.2 -2008-06-05 11:07 mcayland +2008-06-05 11:07 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Remove PQunescapeBytea hack from pgsql2shp which is no longer - needed, as it was only required for versions of PostgreSQL < 7.3 + * [r2801] Remove PQunescapeBytea hack from pgsql2shp which is no + longer needed, as it was only required for versions of PostgreSQL + < 7.3 -2008-06-05 10:51 mcayland +2008-06-05 10:51 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Remove all of the pre-PostgreSQL 7.3 schema #ifdefs from + * [r2800] Remove all of the pre-PostgreSQL 7.3 schema #ifdefs from lwpostgis.sql.in to make things readable once again. -2008-06-05 10:19 mcayland +2008-06-05 10:19 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Blast away the huge amounts of legacy C code related to + * [r2799] Blast away the huge amounts of legacy C code related to PostgreSQL versions < 8.1. Next step will be to work on the SQL script files too. -2008-05-31 10:35 mcayland +2008-05-31 10:35 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Provide a new text file called DEBUG explaining how to use the - new debug system. + * [r2798] Provide a new text file called DEBUG explaining how to + use the new debug system. -2008-05-31 09:56 mcayland +2008-05-31 09:56 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Commit new PostGIS debugging infrastructure. These changes unify - all the debug logging to use a new set of macros: + * [r2797] Commit new PostGIS debugging infrastructure. These + changes unify all the debug logging to use a new set of macros: LWDEBUG()/LWDEBUGF() for LWGEOM functions, and POSTGIS_DEBUG()/POSTGIS_DEBUGF() for PostgreSQL functions. To enable debugging, run configure with --enable-debug and then @@ -8447,262 +28357,267 @@ minor warning cleanups and a fix for the ST_Dwithin SQL definition. -2008-05-28 23:03 pramsey +2008-05-28 23:03 Paul Ramsey <pramsey@cleverelephant.ca> - * Enhanced speed _ST_DWithin(g,g,d) that returns as soon as g and g - are within d of each other, rather than using distance naively. - Change ST_DWithin to use enhanced op. (Issue 20) + * [r2796] Enhanced speed _ST_DWithin(g,g,d) that returns as soon as + g and g are within d of each other, rather than using distance + naively. Change ST_DWithin to use enhanced op. (Issue 20) -2008-05-28 21:58 pramsey +2008-05-28 21:58 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix towgs84 for 31300 and 31370 (issue 23) + * [r2793] Fix towgs84 for 31300 and 31370 (issue 23) -2008-05-28 21:47 pramsey +2008-05-28 21:47 Paul Ramsey <pramsey@cleverelephant.ca> - * Geomunion name change note, issue 26. + * [r2792] Geomunion name change note, issue 26. -2008-05-28 21:45 pramsey +2008-05-28 21:45 Paul Ramsey <pramsey@cleverelephant.ca> - * Bug reporting documentation (issue 27) + * [r2789] Bug reporting documentation (issue 27) -2008-05-28 21:35 pramsey +2008-05-28 21:35 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix for issue 30, ST_Buffer doco mistake + * [r2787] Fix for issue 30, ST_Buffer doco mistake -2008-05-27 15:08 mcayland +2008-05-27 15:08 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Remove extra warnings related to the shp2pgsql deleted records - patch + * [r2785] Remove extra warnings related to the shp2pgsql deleted + records patch -2008-05-27 14:47 mcayland +2008-05-27 14:47 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Update new build system to include iconv detection for shp2pgsql + * [r2784] Update new build system to include iconv detection for + shp2pgsql -2008-05-27 03:00 pramsey +2008-05-27 03:00 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix for DBF files with deleted records. (#29) + * [r2783] Fix for DBF files with deleted records. (#29) -2008-05-22 20:43 mcayland +2008-05-22 20:43 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Since PGXS compiles libraries with -Wall, attempt to remove as - many warnings as possible. Most of these are missing function - prototypes at the top of each file. + * [r2781] Since PGXS compiles libraries with -Wall, attempt to + remove as many warnings as possible. Most of these are missing + function prototypes at the top of each file. -2008-05-22 14:34 mcayland +2008-05-22 14:34 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Update documentation build so that "make install" now works. - Maybe this will fix the on-line website build? + * [r2780] Update documentation build so that "make install" now + works. Maybe this will fix the on-line website build? -2008-05-22 14:31 mcayland +2008-05-22 14:31 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Update topology/ directory to use the new PGXS build system. + * [r2779] Update topology/ directory to use the new PGXS build + system. -2008-05-20 22:24 mcayland +2008-05-20 22:24 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Update previous commit: add Makefile.in and remove Makefile, - since Makefile is now generated from Makefile.in automatically. + * [r2778] Update previous commit: add Makefile.in and remove + Makefile, since Makefile is now generated from Makefile.in + automatically. -2008-05-20 22:10 mcayland +2008-05-20 22:10 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Rework the documentation Makefile so that it works with the - autoconf build system. + * [r2777] Rework the documentation Makefile so that it works with + the autoconf build system. -2008-05-14 17:24 mcayland +2008-05-14 17:24 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fixes for previous commit: missed Makefile.config target for - "make clean" + * [r2776] Fixes for previous commit: missed Makefile.config target + for "make clean" -2008-05-14 17:19 mcayland +2008-05-14 17:19 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fixes for previous commit: Alter GNUmakefile to understand that - Makefile.config no longer exists, plus remove lwgeom/sqldefines.h - as it is generated by autoconf + * [r2775] Fixes for previous commit: Alter GNUmakefile to + understand that Makefile.config no longer exists, plus remove + lwgeom/sqldefines.h as it is generated by autoconf -2008-05-14 17:10 mcayland +2008-05-14 17:10 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Commit new build system based upon PGXS. Due to the large number - of changes, please refer to + * [r2774] Commit new build system based upon PGXS. Due to the large + number of changes, please refer to http://postgis.refractions.net/pipermail/postgis-devel/2008-May/003010.html. -2008-04-24 01:04 pramsey +2008-04-24 01:04 Paul Ramsey <pramsey@cleverelephant.ca> - * ST_AsGeoJSon patch from Olivier Courtin + * [r2772] ST_AsGeoJSon patch from Olivier Courtin <olivier.courtin@camptocamp.com>. -2008-04-22 14:54 pramsey +2008-04-22 14:54 Paul Ramsey <pramsey@cleverelephant.ca> - * envelope doco fix + * [r2771] envelope doco fix -2008-04-12 18:39 pramsey +2008-04-12 18:39 Paul Ramsey <pramsey@cleverelephant.ca> - * Bump trunk up to 1.3.4SVN + * [r2770] Bump trunk up to 1.3.4SVN -2008-04-12 18:32 pramsey +2008-04-12 18:32 Paul Ramsey <pramsey@cleverelephant.ca> - * Versions and news for the 1.3.3 release. + * [r2768] Versions and news for the 1.3.3 release. -2008-04-12 16:46 pramsey +2008-04-12 16:46 Paul Ramsey <pramsey@cleverelephant.ca> - * Update re dbf patch + * [r2765] Update re dbf patch -2008-04-12 16:44 pramsey +2008-04-12 16:44 Paul Ramsey <pramsey@cleverelephant.ca> - * New -n switch to support DBF-only loading of attributes without - shapes. + * [r2764] New -n switch to support DBF-only loading of attributes + without shapes. Submitted by Regina Obe. -2008-04-12 10:16 mcayland +2008-04-12 10:16 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Remove svn:eol-style from regress_ogc_expected; MingW requires - unix line endings in order for the diff to work as expected. + * [r2763] Remove svn:eol-style from regress_ogc_expected; MingW + requires unix line endings in order for the diff to work as + expected. -2008-04-10 14:44 pramsey +2008-04-10 14:44 Paul Ramsey <pramsey@cleverelephant.ca> - * Reduce FTDate field size to 8 bytes from 10. Matches other calls - in the file + * [r2762] Reduce FTDate field size to 8 bytes from 10. Matches + other calls in the file now, no good explanation in code why it was 10 to start with. http://postgis.refractions.net/pipermail/postgis-users/2008-April/019169.html -2008-04-10 06:40 mcayland +2008-04-10 06:40 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Another round of PostgreSQL 8.3 fixes, this time related to - arrays. Make sure that we use the supplied ArrayType pointer + * [r2761] Another round of PostgreSQL 8.3 fixes, this time related + to arrays. Make sure that we use the supplied ArrayType pointer macros, instead of attempting to access to cast directly to ArrayType. This resolved GBT#13 where a "corrupted histogram" error is thrown when using using ST_EstimatedExtent() under 8.3. -2008-04-09 19:52 pramsey +2008-04-09 19:52 Paul Ramsey <pramsey@cleverelephant.ca> - * Change sr_id into an integer, per mca's suggestion. + * [r2760] Change sr_id into an integer, per mca's suggestion. -2008-04-08 21:36 pramsey +2008-04-08 21:36 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix string literal comparison warnings: "comparison with string - literal results in + * [r2759] Fix string literal comparison warnings: "comparison with + string literal results in unspecified behaviour" -2008-04-07 20:09 pramsey +2008-04-07 20:09 Paul Ramsey <pramsey@cleverelephant.ca> - * Rename all occurances of getopt to pgis_getopt to work around + * [r2758] Rename all occurances of getopt to pgis_getopt to work + around OS/X 10.5 system function name collision. -2008-04-07 19:47 pramsey +2008-04-07 19:47 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix the ST_AsKML regression tests. + * [r2757] Fix the ST_AsKML regression tests. -2008-04-07 19:47 pramsey +2008-04-07 19:47 Paul Ramsey <pramsey@cleverelephant.ca> - * Allow conditional regression tests based on GEOS_VERNUM and move - the + * [r2756] Allow conditional regression tests based on GEOS_VERNUM + and move the cover/prepared tests into the appropriate buckets. Fix the AT_AsKML regression tests. -2008-04-05 14:49 pramsey +2008-04-05 14:49 Paul Ramsey <pramsey@cleverelephant.ca> - * remove unloved header file + * [r2755] remove unloved header file -2008-03-31 11:16 mcayland +2008-03-31 11:16 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Remove the code that adds share/contrib/nad to the PROJ.4 search - path for PostgreSQL < 8.0 since the mechanism for determining the - path has changed from earlier versions, and this was mainly for - Win32 users. Also rename nad/ directory to proj/ to keep it - inline with an existing PROJ.4 installation. + * [r2754] Remove the code that adds share/contrib/nad to the PROJ.4 + search path for PostgreSQL < 8.0 since the mechanism for + determining the path has changed from earlier versions, and this + was mainly for Win32 users. Also rename nad/ directory to proj/ + to keep it inline with an existing PROJ.4 installation. -2008-03-30 19:38 pramsey +2008-03-30 19:38 Paul Ramsey <pramsey@cleverelephant.ca> - * small syntax errors in ST_YMAX, etc functions + * [r2753] small syntax errors in ST_YMAX, etc functions -2008-03-30 19:37 pramsey +2008-03-30 19:37 Paul Ramsey <pramsey@cleverelephant.ca> - * confirm st_*min st_*max + * [r2752] confirm st_*min st_*max -2008-03-28 23:24 pramsey +2008-03-28 23:24 Paul Ramsey <pramsey@cleverelephant.ca> - * Syntax error in sql.in + * [r2751] Syntax error in sql.in -2008-03-28 21:31 pramsey +2008-03-28 21:31 Paul Ramsey <pramsey@cleverelephant.ca> - * Fixed up KML patch from Eduin Carillo. + * [r2750] Fixed up KML patch from Eduin Carillo. -2008-03-28 21:28 pramsey +2008-03-28 21:28 Paul Ramsey <pramsey@cleverelephant.ca> - * Enable the USE_PROJ and GEOS_VERNUM macros to propogate into - lwpostgis.sql.in + * [r2749] Enable the USE_PROJ and GEOS_VERNUM macros to propogate + into lwpostgis.sql.in -2008-03-28 21:10 pramsey +2008-03-28 21:10 Paul Ramsey <pramsey@cleverelephant.ca> - * Revert KML patch, bad puppy! + * [r2748] Revert KML patch, bad puppy! -2008-03-28 21:04 pramsey +2008-03-28 21:04 Paul Ramsey <pramsey@cleverelephant.ca> - * Added KML patch from Eduin Carillo. + * [r2747] Added KML patch from Eduin Carillo. http://code.google.com/p/postgis/issues/detail?id=17 -2008-03-28 20:18 pramsey +2008-03-28 20:18 Paul Ramsey <pramsey@cleverelephant.ca> - * Changed ifeq to ifndef for CXX macro test. + * [r2746] Changed ifeq to ifndef for CXX macro test. -2008-03-28 20:17 pramsey +2008-03-28 20:17 Paul Ramsey <pramsey@cleverelephant.ca> - * Removed unloved and un-used geos_version.sh file. + * [r2745] Removed unloved and un-used geos_version.sh file. -2008-03-28 20:03 pramsey +2008-03-28 20:03 Paul Ramsey <pramsey@cleverelephant.ca> - * Added SVN support patch from Dr. Marco Hugentobler, as described - in + * [r2744] Added SVN support patch from Dr. Marco Hugentobler, as + described in http://postgis.refractions.net/pipermail/postgis-devel/2008-February/002883.html -2008-03-28 19:25 pramsey +2008-03-28 19:25 Paul Ramsey <pramsey@cleverelephant.ca> - * Added GEOS_VERNUM macro and protected GEOS 3.0/3.1 functionality - behind it. + * [r2743] Added GEOS_VERNUM macro and protected GEOS 3.0/3.1 + functionality behind it. -2008-03-28 18:55 mcayland +2008-03-28 18:55 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix crash caused by double-free in LWGEOM_same - we were + * [r2742] Fix crash caused by double-free in LWGEOM_same - we were accidentally freeing the 1st parameter twice instead of freeing the second parameter. Thanks to Cliff Wright for the bug report. -2008-03-28 17:05 pramsey +2008-03-28 17:05 Paul Ramsey <pramsey@cleverelephant.ca> - * Removed regress_ogc_prep from tests temporarily until a new GEOS - is released with support + * [r2741] Removed regress_ogc_prep from tests temporarily until a + new GEOS is released with support for new predicates. -2008-03-27 21:18 mcayland +2008-03-27 21:18 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix bug with |>> and <<| operators - the BOX2D overabove and - overbelow functions were actually wrong, causing index scans to - return the wrong results. Per bug report from Tomas Karlsson. + * [r2740] Fix bug with |>> and <<| operators - the BOX2D overabove + and overbelow functions were actually wrong, causing index scans + to return the wrong results. Per bug report from Tomas Karlsson. -2008-03-26 03:40 pramsey +2008-03-26 03:40 Paul Ramsey <pramsey@cleverelephant.ca> - * Change link to postgis bug tracker + * [r2739] Change link to postgis bug tracker -2008-03-21 08:17 mcayland +2008-03-21 08:17 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Resolve GBT bugs #2,#3 and #9 related to crashes when calling - aggregate functions under PostgreSQL 8.3 (all earlier versions - would not see the error). This was due to missing more VARSIZE - macros in the PostgreSQL 8.3 conversion. The complete list of - affected functions under PostgreSQL 8.3 is: ST_force_2d(), - ST_force_3dz(), ST_force_3dm(), ST_force_4d(), ST_Collect(), - ST_MakeLine(), ST_Polygonize(), ST_Union()/ST_GeomUnion(), - ST_MakePolygon()/ST_Polygon(). + * [r2738] Resolve GBT bugs #2,#3 and #9 related to crashes when + calling aggregate functions under PostgreSQL 8.3 (all earlier + versions would not see the error). This was due to missing more + VARSIZE macros in the PostgreSQL 8.3 conversion. The complete + list of affected functions under PostgreSQL 8.3 is: + ST_force_2d(), ST_force_3dz(), ST_force_3dm(), ST_force_4d(), + ST_Collect(), ST_MakeLine(), ST_Polygonize(), + ST_Union()/ST_GeomUnion(), ST_MakePolygon()/ST_Polygon(). -2008-02-12 15:05 pramsey +2008-02-12 15:05 Paul Ramsey <pramsey@cleverelephant.ca> - * Document ST_SimplifyPreserveTopology(geometry,float) + * [r2737] Document ST_SimplifyPreserveTopology(geometry,float) -2008-02-12 15:03 pramsey +2008-02-12 15:03 Paul Ramsey <pramsey@cleverelephant.ca> - * Added hook to GEOSTopologyPreserveSimplify + * [r2736] Added hook to GEOSTopologyPreserveSimplify 2008-01-29 01:24 benjubb - * Changed the interface for the GEOS prepared predicates. + * [r2735] Changed the interface for the GEOS prepared predicates. ST_contains, ST_containsProperly, ST_covers, and ST_intersects are now overloaded. The new arguments style is ( geometry, geometry, integer). The @@ -8714,21 +28629,21 @@ 2008-01-22 19:44 benjubb - * Ammended to include prepared geometry cache code in scope of - PREPARED_GEOM symbol. + * [r2734] Ammended to include prepared geometry cache code in scope + of PREPARED_GEOM symbol. 2008-01-22 00:24 benjubb - * Modified to check version of GEOS and stub out prepared + * [r2733] Modified to check version of GEOS and stub out prepared predicates if GEOS is prior to 3.1.0 2008-01-18 18:57 benjubb - * Made some minor changes suggested by Mark Cave-Ayland. + * [r2732] Made some minor changes suggested by Mark Cave-Ayland. 2008-01-18 01:05 benjubb - * Added new function wrappers to expose prepared geometry + * [r2731] Added new function wrappers to expose prepared geometry predicates: ST_ContainsPrepared( geometry, geometry ) ST_ContainsProperlyPrepared( geometry, geometry ) @@ -8740,8 +28655,8 @@ 2008-01-18 01:04 benjubb - * Added new functions to lwgeom_geos_c.c to support prepared - geometry predicates. + * [r2730] Added new functions to lwgeom_geos_c.c to support + prepared geometry predicates. bool containsPrepared( geom, geom) bool containsProperlyPrepared( geom, geom) bool coversPrepared( geom, geom) @@ -8749,7 +28664,7 @@ 2008-01-18 00:59 benjubb - * Tests for the prepared geometry predicates. + * [r2729] Tests for the prepared geometry predicates. The tests were copied from regress_ogc, and modified. Most of the tests use a pattern where the same function is invoked three times with the same argument. @@ -8758,92 +28673,93 @@ fails for one case. This probably due to a bug in GEOS. -2008-01-11 15:05 mcayland +2008-01-11 15:05 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Bump version number to 1.3.3SVN for next development cycle. + * [r2727] Bump version number to 1.3.3SVN for next development + cycle. -2008-01-11 15:04 mcayland +2008-01-11 15:04 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Rewrite the pgsql2shp connection string code so that it uses a - connection string, rather than setting environment variables. - MingW-compiled and MSVC-compiled apps seem to have great problems - passing the variables to each other, causing regression to fail. - With this fix (and a Makefile tweak), it is now possible to run a - MingW-compiled PostGIS against an MSVC compiled PostgreSQL and - pass all regression tests. + * [r2726] Rewrite the pgsql2shp connection string code so that it + uses a connection string, rather than setting environment + variables. MingW-compiled and MSVC-compiled apps seem to have + great problems passing the variables to each other, causing + regression to fail. With this fix (and a Makefile tweak), it is + now possible to run a MingW-compiled PostGIS against an MSVC + compiled PostgreSQL and pass all regression tests. -2007-12-03 23:10 pramsey +2007-12-03 23:10 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix up bad entities and screwed up programlistings from some - previous pretty-printing + * [r2725] Fix up bad entities and screwed up programlistings from + some previous pretty-printing run on the XML. -2007-12-02 20:37 mcayland +2007-12-02 20:37 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Commit updated versions of the ChangeLog and README.postgis (also - change some references in README.postgis from "run as root" to - "run as postgres", and correct the --with-pgsql and --with-geos - documentation) + * [r2723] Commit updated versions of the ChangeLog and + README.postgis (also change some references in README.postgis + from "run as root" to "run as postgres", and correct the + --with-pgsql and --with-geos documentation) -2007-11-30 18:19 pramsey +2007-11-30 18:19 Paul Ramsey <pramsey@cleverelephant.ca> - * Added release notes. + * [r2722] Added release notes. -2007-11-30 13:04 mcayland +2007-11-30 13:04 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix the (E)WKB parser so that it performs validation checks in - the same way as the WKT parser, e.g. ensure POLYGON rings are - closed, LINESTRINGs consist of at least 2 points and that curves - have at least 3 points. As discovered when looking simplify() bug - submitted by Ivan Mincik. + * [r2721] Fix the (E)WKB parser so that it performs validation + checks in the same way as the WKT parser, e.g. ensure POLYGON + rings are closed, LINESTRINGs consist of at least 2 points and + that curves have at least 3 points. As discovered when looking + simplify() bug submitted by Ivan Mincik. -2007-11-27 22:39 mcayland +2007-11-27 22:39 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Rename the existing get_int32() and get_uint32() functions to - lw_get_int32() and lw_get_uint32() respectively in order to avoid - a collision with functions of the same name in newer versions of - OS X. This should resolve the problem with PostGIS crashing on - some OS X installations. Many thanks to William Kyngesburye and - others for resolving this issue. + * [r2719] Rename the existing get_int32() and get_uint32() + functions to lw_get_int32() and lw_get_uint32() respectively in + order to avoid a collision with functions of the same name in + newer versions of OS X. This should resolve the problem with + PostGIS crashing on some OS X installations. Many thanks to + William Kyngesburye and others for resolving this issue. -2007-11-27 22:19 mcayland +2007-11-27 22:19 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Extend the PROJ.4 search path to include + * [r2718] Extend the PROJ.4 search path to include $sharedir/contrib/postgis/nad when looking for grid files. This is mainly to allow Win32 builds to find grid files without having to use a PROJ.4 DLL compiled containing a fixed path. -2007-11-23 10:42 mcayland +2007-11-23 10:42 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Apply Tom Glancy's patch to shp2pgsql which corrects an + * [r2717] Apply Tom Glancy's patch to shp2pgsql which corrects an off-by-one error in the field_width calculation when determining which SQL numeric type is required depending upon the length of the corresponding shapefile field. This should eliminate various out of range error messages that may have appeared when attempting to load a converted shapefile into PostgreSQL. -2007-11-23 10:24 mcayland +2007-11-23 10:24 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Commit a first attempt at an Ant build.xml file for the PostGIS - JDBC driver so finally all the Java drivers build with Ant for - consistency, plus we eliminate numerous cross platform problems. - As it stands, the build.xml file supports only the standard JDBC - driver - if you wish to use a JTS-enabled JDBC driver or run the - online regression tests then you must still use the Makefile. Any - help porting the remaining parts of the Makefile would be - appreciated. - -2007-10-29 16:29 mcayland - - * Apply parts of Charlie Savage's MSVC patch - mainly tidying up - variable allocations so they appear at the start of functions, - but also making better use of the pj_get_errno_ref() which gets - rid of the auto-import warnings on MingW. + * [r2716] Commit a first attempt at an Ant build.xml file for the + PostGIS JDBC driver so finally all the Java drivers build with + Ant for consistency, plus we eliminate numerous cross platform + problems. As it stands, the build.xml file supports only the + standard JDBC driver - if you wish to use a JTS-enabled JDBC + driver or run the online regression tests then you must still use + the Makefile. Any help porting the remaining parts of the + Makefile would be appreciated. + +2007-10-29 16:29 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r2715] Apply parts of Charlie Savage's MSVC patch - mainly + tidying up variable allocations so they appear at the start of + functions, but also making better use of the pj_get_errno_ref() + which gets rid of the auto-import warnings on MingW. -2007-10-29 14:22 mcayland +2007-10-29 14:22 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Remove version numbers from liblwgeom references in lwpostgis.sql - as per + * [r2714] Remove version numbers from liblwgeom references in + lwpostgis.sql as per http://postgis.refractions.net/pipermail/postgis-devel/2007-September/002764.html. This should help make upgrades a lot easier for people since it removes the need to change the SQL function definitions when @@ -8852,212 +28768,219 @@ remove support for PostgreSQL < 8.0, we can use PGXS instead and thus remove the redundant shared library code from PostGIS. -2007-10-29 13:44 mcayland +2007-10-29 13:44 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Commit Charlie Savage's patches (with additional comments) to the - bounding box/envelope functions to ensure that valid geometries - are always returned; in more specific terms, if a bounding box is - a point then a POINT is returned, and if a bounding box is - 1-dimensional a LINESTRING is returned. Otherwise a POLYGON is - returned as per the old behaviour. For details see the thread in - the postgis-users archives Sept 2007 'How to get the centroid of - an bounding box using st_extent'. + * [r2713] Commit Charlie Savage's patches (with additional + comments) to the bounding box/envelope functions to ensure that + valid geometries are always returned; in more specific terms, if + a bounding box is a point then a POINT is returned, and if a + bounding box is 1-dimensional a LINESTRING is returned. Otherwise + a POLYGON is returned as per the old behaviour. For details see + the thread in the postgis-users archives Sept 2007 'How to get + the centroid of an bounding box using st_extent'. -2007-10-29 12:34 mcayland +2007-10-29 12:34 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix broken error message when attempting to deserialise a type - other than a point; the message should now correctly show the - name of the offending type. Patch supplied by Charlie Savage. + * [r2712] Fix broken error message when attempting to deserialise a + type other than a point; the message should now correctly show + the name of the offending type. Patch supplied by Charlie Savage. -2007-10-23 00:19 pramsey +2007-10-23 00:19 Paul Ramsey <pramsey@cleverelephant.ca> - * KML credits patch <yecarrillo> + * [r2711] KML credits patch <yecarrillo> -2007-10-10 21:27 mcayland +2007-10-10 21:27 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Apply extra fixes for the reworked AsGML() function to ensure - that enough memory is allocated for the GML output. Patch + * [r2710] Apply extra fixes for the reworked AsGML() function to + ensure that enough memory is allocated for the GML output. Patch supplied by Barbara Phillipot. -2007-09-28 10:18 mcayland +2007-09-28 10:18 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix a mistake in my refactoring of the AsGML() patch for GML3 - support - the detoasted geometry is now the second argument + * [r2709] Fix a mistake in my refactoring of the AsGML() patch for + GML3 support - the detoasted geometry is now the second argument rather than the first. Per report from Olivier Courtin. -2007-09-19 05:01 pramsey +2007-09-19 05:01 Paul Ramsey <pramsey@cleverelephant.ca> - * Applied patch from Charlie Savage to make ST_Envelope return a - POINT + * [r2708] Applied patch from Charlie Savage to make ST_Envelope + return a POINT when the input geometry is a POINT or a one-part MULTIPOINT. -2007-09-06 16:03 mcayland +2007-09-06 16:03 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Commit modified version of Barbara Phillipot's GML patch to fix - existing output to make it GML2 compliant, plus add GML3 output - capability + * [r2707] Commit modified version of Barbara Phillipot's GML patch + to fix existing output to make it GML2 compliant, plus add GML3 + output capability -2007-08-22 15:09 pramsey +2007-08-22 15:09 Paul Ramsey <pramsey@cleverelephant.ca> - * Rename ST_GeomUnion to ST_Union in docs and ST_MemGeomUnion to - ST_MemUnion in + * [r2700] Rename ST_GeomUnion to ST_Union in docs and + ST_MemGeomUnion to ST_MemUnion in .sql. -2007-08-21 23:02 mcayland +2007-08-21 23:02 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix crash when calling ST_EndPoint caused by a double-free in - LWGEOM_endpoint_linestring. This bug has been there for a while - - thanks to Eric Francois for the bug report. + * [r2699] Fix crash when calling ST_EndPoint caused by a + double-free in LWGEOM_endpoint_linestring. This bug has been + there for a while - thanks to Eric Francois for the bug report. 2007-08-15 14:39 snowman - * - Include levenshtein difference in rating when doing city/state - match. + * [r2694] - Include levenshtein difference in rating when doing + city/state match. -2007-08-13 16:30 pramsey +2007-08-13 16:30 Paul Ramsey <pramsey@cleverelephant.ca> - * Increment version number to 1.3.2 for next development cycle + * [r2693] Increment version number to 1.3.2 for next development + cycle -2007-08-13 16:12 pramsey +2007-08-13 16:12 Paul Ramsey <pramsey@cleverelephant.ca> - * Version flip up to 1.3.1 + * [r2691] Version flip up to 1.3.1 -2007-08-13 15:51 mcayland +2007-08-13 15:51 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fixed spelling error for the word "geometry" thanks to Regina - Obe, plus added comment about initial PostgreSQL 8.3 support. + * [r2690] Fixed spelling error for the word "geometry" thanks to + Regina Obe, plus added comment about initial PostgreSQL 8.3 + support. -2007-08-13 07:27 mcayland +2007-08-13 07:27 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * This time really fix the documentation missing tag problem... + * [r2689] This time really fix the documentation missing tag + problem... -2007-08-13 07:14 mcayland +2007-08-13 07:14 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix documentation since an error in the 1.3.0 release notes xml - caused the build to fail (this may need author review) + * [r2688] Fix documentation since an error in the 1.3.0 release + notes xml caused the build to fail (this may need author review) -2007-08-13 07:06 mcayland +2007-08-13 07:06 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Remove warning about unused variable in lwgeom.c (it was a - leftover from the PostgreSQL 8.3 compatibility patch) + * [r2687] Remove warning about unused variable in lwgeom.c (it was + a leftover from the PostgreSQL 8.3 compatibility patch) -2007-08-09 22:50 mleslie +2007-08-09 22:50 Mark Leslie <mark.leslie@lisasoft.com> - * Added release notes and updated version numbers and release - dates. + * [r2684] Added release notes and updated version numbers and + release dates. -2007-08-09 22:19 mleslie +2007-08-09 22:19 Mark Leslie <mark.leslie@lisasoft.com> - * Moved the intersects method back to the original definition and - disabled the new apparently broken implementation. + * [r2682] Moved the intersects method back to the original + definition and disabled the new apparently broken implementation. -2007-08-09 16:57 mleslie +2007-08-09 16:57 Mark Leslie <mark.leslie@lisasoft.com> - * Bumped the version number to RC5. + * [r2681] Bumped the version number to RC5. -2007-08-09 16:56 mleslie +2007-08-09 16:56 Mark Leslie <mark.leslie@lisasoft.com> - * Updated the regression tests for curved geoms to avoid the byte - ordering problems. + * [r2680] Updated the regression tests for curved geoms to avoid + the byte ordering problems. -2007-08-03 20:58 mleslie +2007-08-03 20:58 Mark Leslie <mark.leslie@lisasoft.com> - * Removed an unused function that was erroneously committed. + * [r2679] Removed an unused function that was erroneously + committed. -2007-08-02 19:58 mleslie +2007-08-02 19:58 Mark Leslie <mark.leslie@lisasoft.com> - * Added PreparedGeometry and caching support to the intersects - function in the jts connector. Created wrapper functions for the - PreparedGeometry functionality. + * [r2678] Added PreparedGeometry and caching support to the + intersects function in the jts connector. Created wrapper + functions for the PreparedGeometry functionality. -2007-08-02 19:57 mleslie +2007-08-02 19:57 Mark Leslie <mark.leslie@lisasoft.com> - * Removed a call to the deprecated point_in_ring function. + * [r2677] Removed a call to the deprecated point_in_ring function. -2007-07-31 20:40 mleslie +2007-07-31 20:40 Mark Leslie <mark.leslie@lisasoft.com> - * Updated the version numbers. + * [r2672] Updated the version numbers. -2007-07-26 18:55 mleslie +2007-07-26 18:55 Mark Leslie <mark.leslie@lisasoft.com> - * Applyed Michael Fuhrs patch to fix the reserved word issue - against PostgreSQL 8.3. + * [r2671] Applyed Michael Fuhrs patch to fix the reserved word + issue against PostgreSQL 8.3. -2007-07-23 21:43 mleslie +2007-07-23 21:43 Mark Leslie <mark.leslie@lisasoft.com> - * Fixed the FP_LTEQ macro to accomodate values significantly larger - that zero. + * [r2669] Fixed the FP_LTEQ macro to accomodate values + significantly larger that zero. -2007-07-23 18:52 mleslie +2007-07-23 18:52 Mark Leslie <mark.leslie@lisasoft.com> - * Added the covers and coveredby functions to the jts connector. + * [r2668] Added the covers and coveredby functions to the jts + connector. -2007-07-23 16:29 mleslie +2007-07-23 16:29 Mark Leslie <mark.leslie@lisasoft.com> - * Updated the loader to create the index after the data has been - loaded. + * [r2667] Updated the loader to create the index after the data has + been loaded. -2007-07-20 04:29 pramsey +2007-07-20 04:29 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix some ST_ declarations that were missing. + * [r2666] Fix some ST_ declarations that were missing. -2007-07-18 15:57 mleslie +2007-07-18 15:57 Mark Leslie <mark.leslie@lisasoft.com> - * Applying Michael Fuhrs patch to correct my attrocious selling. + * [r2665] Applying Michael Fuhrs patch to correct my attrocious + selling. -2007-07-16 18:53 mleslie +2007-07-16 18:53 Mark Leslie <mark.leslie@lisasoft.com> - * Added notes about the implicit index operators on the relational - functions. + * [r2664] Added notes about the implicit index operators on the + relational functions. -2007-07-16 18:26 mleslie +2007-07-16 18:26 Mark Leslie <mark.leslie@lisasoft.com> - * Resurrected the ST_LineToCurve regression tests, but commented - them out until ST_SnapToGrid excepts curves. + * [r2663] Resurrected the ST_LineToCurve regression tests, but + commented them out until ST_SnapToGrid excepts curves. -2007-07-16 18:06 mleslie +2007-07-16 18:06 Mark Leslie <mark.leslie@lisasoft.com> - * Upgraded the escaping of quotes from the deprecated backslashing - to the doubling of quotes. + * [r2662] Upgraded the escaping of quotes from the deprecated + backslashing to the doubling of quotes. -2007-07-13 05:48 mcayland +2007-07-13 05:48 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Rollback experimental shp2pgsql escaping change that accidently - got included in the last commit :( + * [r2657] Rollback experimental shp2pgsql escaping change that + accidently got included in the last commit :( -2007-07-13 05:42 mcayland +2007-07-13 05:42 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Correct previous commit for older PostgreSQL versions - the order - of the methods in PROJ4SRSCacheContextMethods is not consistent - between versions. + * [r2656] Correct previous commit for older PostgreSQL versions - + the order of the methods in PROJ4SRSCacheContextMethods is not + consistent between versions. -2007-07-12 20:33 mcayland +2007-07-12 20:33 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Add missing methods to the PROJ.4 cache memory context to prevent - a backend crash caused by a NULL pointer dereference when + * [r2655] Add missing methods to the PROJ.4 cache memory context to + prevent a backend crash caused by a NULL pointer dereference when PostgreSQL is trying to clean up memory contexts. Per report from Tom Lane. -2007-07-12 17:20 mleslie +2007-07-12 17:20 Mark Leslie <mark.leslie@lisasoft.com> - * Removing the unsnappable test calls to LineToCurve. + * [r2654] Removing the unsnappable test calls to LineToCurve. -2007-07-11 01:17 pramsey +2007-07-11 01:17 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove extra/debian, per recommendation from Stephen Frost + * [r2653] Remove extra/debian, per recommendation from Stephen + Frost -2007-07-10 21:12 pramsey +2007-07-10 21:12 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove templategis from make, install, clean targets. + * [r2652] Remove templategis from make, install, clean targets. 2007-07-09 03:11 snowman - * - Remove debugging NOTICE + * [r2651] - Remove debugging NOTICE 2007-07-09 02:20 snowman - * - Added print-print function for norm_addy type (norm_addy -> - varchar) + * [r2650] - Added print-print function for norm_addy type + (norm_addy -> varchar) - Restructured geocode(), accept address in parsed norm_addy form as well as unparsed varchar form. Return norm_addy type instead of @@ -9065,36 +28988,38 @@ 2007-07-08 21:56 snowman - * - City names are 90 characters (this matters more than you might + * [r2649] - City names are 90 characters (this matters more than + you might think because it affects the types returned from the various calls and if they don't match subsequent geocode() queries in the same session may complain about the planned record type not matching across calls) -2007-07-06 16:45 pramsey +2007-07-06 16:45 Paul Ramsey <pramsey@cleverelephant.ca> - * ST_Dwithin reference entry + * [r2648] ST_Dwithin reference entry -2007-07-06 16:44 pramsey +2007-07-06 16:44 Paul Ramsey <pramsey@cleverelephant.ca> - * Added ST_DWithin SQL function + * [r2647] Added ST_DWithin SQL function -2007-07-04 17:12 mleslie +2007-07-04 17:12 Mark Leslie <mark.leslie@lisasoft.com> - * Applied the patch from Michael Fuhr to fix the definition of - ST_PointN + * [r2646] Applied the patch from Michael Fuhr to fix the definition + of ST_PointN 2007-07-03 21:36 snowman - * - Change to generic database name + * [r2645] - Change to generic database name 2007-07-03 21:36 snowman - * - Update install instructions + * [r2644] - Update install instructions 2007-07-03 21:32 snowman - * Add in initial import scripts for importing the TIGER/Line + * [r2643] Add in initial import scripts for importing the + TIGER/Line data into a PostGIS system. Could probably be improved to accept more arguments/etc and require less direct script modification to make it work. Also, not sure the polygons @@ -9102,7 +29027,7 @@ 2007-07-03 21:30 snowman - * Add in broken out/updated normalize/geocode functions + * [r2642] Add in broken out/updated normalize/geocode functions - create_geocode.sql: Main creation script for pulling in all the other .sql files to create all the functions and whatnot @@ -9123,14 +29048,14 @@ 2007-07-03 21:22 snowman - * Initial import of utility functions, seperated into individual - files + * [r2641] Initial import of utility functions, seperated into + individual files for sanity. 2007-07-03 21:19 snowman - * tables/- New scripts for roads_local/tiger_geocode_roads, clean - up lookup_tables + * [r2640] tables/- New scripts for roads_local/tiger_geocode_roads, + clean up lookup_tables - roads_local.sql: Script to create the road_local table from the completechain table which is created by ogr2ogr. Mainly handles type @@ -9158,188 +29083,189 @@ 2007-07-03 21:05 snowman - * - Minor reorg, add in other parts of the initial load + * [r2639] - Minor reorg, add in other parts of the initial load 2007-07-03 20:51 snowman - * - Original tiger geocoder + * [r2638] - Original tiger geocoder -2007-07-03 20:03 mleslie +2007-07-03 20:03 Mark Leslie <mark.leslie@lisasoft.com> - * Added a home for the tiger geocoder. + * [r2637] Added a home for the tiger geocoder. -2007-06-28 22:46 mleslie +2007-06-28 22:46 Mark Leslie <mark.leslie@lisasoft.com> - * Added ST_Covers and ST_CoveredBy functions, as discussed at - http://lin-ear-th-inking.blogspot.com. Added regression tests and - documention for the new functions. + * [r2635] Added ST_Covers and ST_CoveredBy functions, as discussed + at http://lin-ear-th-inking.blogspot.com. Added regression tests + and documention for the new functions. -2007-06-28 20:21 mleslie +2007-06-28 20:21 Mark Leslie <mark.leslie@lisasoft.com> - * Added a 1D rtree for polygon segment indexing, and tied the index - into the point in polygon short-circuit of the contains, within, - intersects and disjoint methods. Added an index cache to the - comparitor methods to save index build times. + * [r2634] Added a 1D rtree for polygon segment indexing, and tied + the index into the point in polygon short-circuit of the + contains, within, intersects and disjoint methods. Added an index + cache to the comparitor methods to save index build times. -2007-06-28 20:16 mleslie +2007-06-28 20:16 Mark Leslie <mark.leslie@lisasoft.com> - * Added or updated debugging statements. + * [r2633] Added or updated debugging statements. -2007-06-28 20:14 mleslie +2007-06-28 20:14 Mark Leslie <mark.leslie@lisasoft.com> - * Altered the macro tests for pg_alloc, pg_realloc to only print - debugging information when alloc debugging is enabled. + * [r2632] Altered the macro tests for pg_alloc, pg_realloc to only + print debugging information when alloc debugging is enabled. -2007-06-15 19:06 mleslie +2007-06-15 19:06 Mark Leslie <mark.leslie@lisasoft.com> - * Updated the regression test suite to allow variable results - depending on jts/geos availability. + * [r2625] Updated the regression test suite to allow variable + results depending on jts/geos availability. -2007-06-15 19:04 mleslie +2007-06-15 19:04 Mark Leslie <mark.leslie@lisasoft.com> - * Added curvey geometry recognition to the jts connector. + * [r2624] Added curvey geometry recognition to the jts connector. -2007-06-12 14:46 pramsey +2007-06-12 14:46 Paul Ramsey <pramsey@cleverelephant.ca> - * Typo corrections from Michael Fuhr. + * [r2623] Typo corrections from Michael Fuhr. -2007-06-08 10:28 mcayland +2007-06-08 10:28 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Applied Michael Fuhr's patch to use explicit text casts where - required. Required for PostgreSQL 8.3 where many of the implicit - casts to text have been removed. + * [r2622] Applied Michael Fuhr's patch to use explicit text casts + where required. Required for PostgreSQL 8.3 where many of the + implicit casts to text have been removed. -2007-06-07 16:16 mleslie +2007-06-07 16:16 Mark Leslie <mark.leslie@lisasoft.com> - * Added relational function definitions that inline index operators - for automagic index utilization. + * [r2620] Added relational function definitions that inline index + operators for automagic index utilization. 2007-06-06 19:19 nbarker - * Hibernate Spatial Criteria Queries and Dialect + * [r2619] Hibernate Spatial Criteria Queries and Dialect -2007-06-05 20:46 mleslie +2007-06-05 20:46 Mark Leslie <mark.leslie@lisasoft.com> - * Updated the docs to reflect the function name transition. + * [r2618] Updated the docs to reflect the function name transition. -2007-06-05 20:45 mleslie +2007-06-05 20:45 Mark Leslie <mark.leslie@lisasoft.com> - * Reorganized the sqlmm function declarations to prevent + * [r2617] Reorganized the sqlmm function declarations to prevent duplication and confusion. -2007-06-04 23:06 mleslie +2007-06-04 23:06 Mark Leslie <mark.leslie@lisasoft.com> - * Added versions of functions with standard ST (Spatial Type) - prefixes to any functions that were lacking them. Updated the - regression tests to include the new functions. + * [r2616] Added versions of functions with standard ST (Spatial + Type) prefixes to any functions that were lacking them. Updated + the regression tests to include the new functions. -2007-06-01 20:56 mleslie +2007-06-01 20:56 Mark Leslie <mark.leslie@lisasoft.com> - * Ongoing PIP trauma. Addressed the issue of points in line with a - boundary segment, but not actually on it. Added appropriate unit - tests. + * [r2614] Ongoing PIP trauma. Addressed the issue of points in line + with a boundary segment, but not actually on it. Added + appropriate unit tests. + +2007-06-01 12:44 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r2613] Reduce 'LWGEOM_gist_joinsel called with arguments that + are not column references' warning to DEBUG1; it's not really a + problem, and in cases where people a lot of these types of + queries, the logs get flooded with these NOTICEs. Per email from + Flavio Perri. + +2007-06-01 09:54 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> -2007-06-01 12:44 mcayland + * [r2612] Fixed bug #145 - RemovePoint Failure in the bugtracker. + It was an off-by-one error in ptarray.c which caused the + penultimate point to not be copied to the new geometry. - * Reduce 'LWGEOM_gist_joinsel called with arguments that are not - column references' warning to DEBUG1; it's not really a problem, - and in cases where people a lot of these types of queries, the - logs get flooded with these NOTICEs. Per email from Flavio Perri. - -2007-06-01 09:54 mcayland - - * Fixed bug #145 - RemovePoint Failure in the bugtracker. It was an - off-by-one error in ptarray.c which caused the penultimate point - to not be copied to the new geometry. - -2007-06-01 07:01 mcayland - - * Fix broken docbook stylesheet search. AC_ARG_WITH only calls its - contents when a --with-* option is specified, so the search would - never be invoked in its current position. Moved the search into - the second macro argument, so it is now invoked if no --with-xsl - argument is specified, which I believe was the intended - behaviour. - -2007-05-31 13:18 mcayland - - * Add support for the upcoming release of PostgreSQL 8.3. From - PostgreSQL 8.3, the internal structure of varlena datatypes has - changed and so any references to the size of the varlena and its - address must use the VARSIZE and SET_VARSIZE macros. Includes a - #define in pgsql_compat.h so that SET_VARSIZE still works with +2007-06-01 07:01 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r2611] Fix broken docbook stylesheet search. AC_ARG_WITH only + calls its contents when a --with-* option is specified, so the + search would never be invoked in its current position. Moved the + search into the second macro argument, so it is now invoked if no + --with-xsl argument is specified, which I believe was the + intended behaviour. + +2007-05-31 13:18 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> + + * [r2610] Add support for the upcoming release of PostgreSQL 8.3. + From PostgreSQL 8.3, the internal structure of varlena datatypes + has changed and so any references to the size of the varlena and + its address must use the VARSIZE and SET_VARSIZE macros. Includes + a #define in pgsql_compat.h so that SET_VARSIZE still works with the older PostgreSQL versions. Passes all regression tests under PostgreSQL 8.2 and PostgreSQL 8.3. Thanks to David Techer and Michael Fuhr for additional testing. -2007-05-28 15:34 mleslie +2007-05-28 15:34 Mark Leslie <mark.leslie@lisasoft.com> - * Added curve handling to getType, numGeometries, geometryN, - dimension, exteriorRing, numInteriorRings, interiorRingN, closed - (lwgeom_ogc.c) lwgeom_clone (lwgeom.c) and area. Added function - ST_CurveToLine and ST_LineToCurve. Added regression tests for - sql-mm geometries and related functions. + * [r2609] Added curve handling to getType, numGeometries, + geometryN, dimension, exteriorRing, numInteriorRings, + interiorRingN, closed (lwgeom_ogc.c) lwgeom_clone (lwgeom.c) and + area. Added function ST_CurveToLine and ST_LineToCurve. Added + regression tests for sql-mm geometries and related functions. -2007-05-22 22:10 mleslie +2007-05-22 22:10 Mark Leslie <mark.leslie@lisasoft.com> - * Added short-circuit calls for the point-in-polygon cases of - disjoint and intersect calls. Added regression tests for the new - short-circuits. + * [r2608] Added short-circuit calls for the point-in-polygon cases + of disjoint and intersect calls. Added regression tests for the + new short-circuits. -2007-05-14 18:04 mcayland +2007-05-14 18:04 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Bump SVN code version to 1.2.2SVN + * [r2607] Bump SVN code version to 1.2.2SVN -2007-05-14 17:55 mcayland +2007-05-14 17:55 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fix broken regress_proj expected results by removing the extra - DELETE at the end of the file. + * [r2606] Fix broken regress_proj expected results by removing the + extra DELETE at the end of the file. -2007-05-14 17:51 mcayland +2007-05-14 17:51 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Remove GEOS C++ API support from PostGIS HEAD; it's been broken - since 1.2.0 and so we require a minimum of GEOS 2.2.0 to compile - and run PostGIS. Includes alterations to autoconf to display an - error message during configure if the GEOS version is incorrect. - Passes all regression tests with GEOS 2.2.3 and GEOS 3.0.0rc4 - using GEOS CAPI. + * [r2605] Remove GEOS C++ API support from PostGIS HEAD; it's been + broken since 1.2.0 and so we require a minimum of GEOS 2.2.0 to + compile and run PostGIS. Includes alterations to autoconf to + display an error message during configure if the GEOS version is + incorrect. Passes all regression tests with GEOS 2.2.3 and GEOS + 3.0.0rc4 using GEOS CAPI. -2007-05-08 16:37 pramsey +2007-05-08 16:37 Paul Ramsey <pramsey@cleverelephant.ca> - * Spelling fix + * [r2604] Spelling fix -2007-04-02 21:17 pramsey +2007-04-02 21:17 Paul Ramsey <pramsey@cleverelephant.ca> - * Small doco fix + * [r2602] Small doco fix 2007-03-15 09:22 mschaber - * aded PostGIS Dialect for Hibernate from Norman Barker + * [r2601] aded PostGIS Dialect for Hibernate from Norman Barker -2007-03-09 19:34 mleslie +2007-03-09 19:34 Mark Leslie <mark.leslie@lisasoft.com> - * Bug 143 is once again dealt with, this time for good. + * [r2600] Bug 143 is once again dealt with, this time for good. -2007-03-09 18:30 mleslie +2007-03-09 18:30 Mark Leslie <mark.leslie@lisasoft.com> - * Rolling back a cure that killed the patient. + * [r2599] Rolling back a cure that killed the patient. -2007-03-09 00:33 mleslie +2007-03-09 00:33 Mark Leslie <mark.leslie@lisasoft.com> - * Bug 143 code fix and regression case. + * [r2598] Bug 143 code fix and regression case. -2007-03-01 08:31 strk +2007-03-01 08:31 Sandro Santilli <strk@keybit.net> - * * extras/template_gis/Makefile: + * [r2597] * extras/template_gis/Makefile: Install 'defaults' file to $(DATADIR)$(prefix) -2007-02-28 17:39 pramsey +2007-02-28 17:39 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove minor typo + * [r2596] Remove minor typo -2007-02-26 09:03 strk +2007-02-26 09:03 Sandro Santilli <strk@keybit.net> - * * regress/run_test: discard CONTEXT and DELETE + * [r2595] * regress/run_test: discard CONTEXT and DELETE lines from test outputs. Patch by Eduin Carrillo, sliglty modified to take precision @@ -9348,157 +29274,161 @@ * regress/: Makefile, kml.sql, kml_expected: Regression test for asKML(). -2007-02-06 17:38 pramsey +2007-02-06 17:38 Paul Ramsey <pramsey@cleverelephant.ca> - * Edits from Bruce Rindahl + * [r2594] Edits from Bruce Rindahl -2007-01-26 15:11 mcayland +2007-01-26 15:11 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Refine previous patch to use a different delimiter than : (!) for - sed. This simplifies the Makefile and protects all the $*dir - arguments from escaping issues under Win32. + * [r2591] Refine previous patch to use a different delimiter than : + (!) for sed. This simplifies the Makefile and protects all the + $*dir arguments from escaping issues under Win32. -2007-01-19 09:44 strk +2007-01-19 09:44 Sandro Santilli <strk@keybit.net> - * * extras/template_gis/Makefile: escape $bindir + * [r2590] * extras/template_gis/Makefile: escape $bindir to allow for colons in it's value (win32 issue). 2007-01-18 18:51 mschaber - * finally really fixed javadoc build on Windows. Yes, that hack is - ugly. Kudos to Marc Cave-Ayland. + * [r2589] finally really fixed javadoc build on Windows. Yes, that + hack is ugly. Kudos to Marc Cave-Ayland. 2007-01-18 18:33 mschaber - * further fix for javadoc build + * [r2588] further fix for javadoc build 2007-01-18 17:56 mschaber - * fixed jdbc javadoc build + * [r2587] fixed jdbc javadoc build -2007-01-15 10:48 strk +2007-01-15 10:48 Sandro Santilli <strk@keybit.net> - * Patch by Michael Fuhr: * extras/template_gis/Makefile: quote grep - argument for Solaris to work. + * [r2586] Patch by Michael Fuhr: * extras/template_gis/Makefile: + quote grep argument for Solaris to work. -2007-01-12 20:28 pramsey +2007-01-12 20:28 Paul Ramsey <pramsey@cleverelephant.ca> - * Change 'Postgis' to 'PostGIS' + * [r2585] Change 'Postgis' to 'PostGIS' -2007-01-12 18:07 strk +2007-01-12 18:07 Sandro Santilli <strk@keybit.net> - * Patch by Gerald Fenoy <djay@gentoo.org>: + * [r2584] Patch by Gerald Fenoy <djay@gentoo.org>: * configure.in: add --with-xsl switch. -2007-01-12 01:50 pramsey +2007-01-12 01:50 Paul Ramsey <pramsey@cleverelephant.ca> - * 1.2.1 release prep + * [r2582] 1.2.1 release prep -2007-01-11 01:40 mleslie +2007-01-11 01:40 Mark Leslie <mark.leslie@lisasoft.com> - * Added a length check to prevent the point in polygon shortcut - from finding points contained within a zero length segment. + * [r2580] Added a length check to prevent the point in polygon + shortcut from finding points contained within a zero length + segment. -2007-01-11 01:39 mleslie +2007-01-11 01:39 Mark Leslie <mark.leslie@lisasoft.com> - * Fixed the COMPOUNDCURVE example to properly should the contained - CIRCULARSTRING. + * [r2579] Fixed the COMPOUNDCURVE example to properly should the + contained CIRCULARSTRING. 2007-01-08 10:48 mschaber - * fixed 8.2 compatibility + * [r2570] fixed 8.2 compatibility 2007-01-08 10:12 mschaber - * hopefully fixed GCJ build + * [r2569] hopefully fixed GCJ build -2007-01-05 00:52 strk +2007-01-05 00:52 Sandro Santilli <strk@keybit.net> - * * GNUmakefile: bring in extra/template_gis for all rules. + * [r2568] * GNUmakefile: bring in extra/template_gis for all rules. * extras/template_gis/Makefile: have 'install' also install manuals. -2007-01-03 17:28 kneufeld +2007-01-03 17:28 Kevin Neufeld <kneufeld.ca@gmail.com> - * initial load + * [r2567] initial load -2006-12-29 00:31 strk +2006-12-29 00:31 Sandro Santilli <strk@keybit.net> - * * configure.in: fixed GEOS_LDFLAGS detection + * [r2566] * configure.in: fixed GEOS_LDFLAGS detection for older GEOS versions. -2006-12-29 00:26 strk +2006-12-29 00:26 Sandro Santilli <strk@keybit.net> - * cleaned up Hard Upgrade manual section (was unreadable). + * [r2565] cleaned up Hard Upgrade manual section (was unreadable). 2006-12-27 04:58 devrim - * Update spec file to 1.2.0 and fix many issues. + * [r2564] Update spec file to 1.2.0 and fix many issues. Update RPM patches. 2006-12-22 11:28 mschaber - * Added generation of JDBC javadoc zip file + * [r2563] Added generation of JDBC javadoc zip file -2006-12-21 00:19 pramsey +2006-12-21 00:19 Paul Ramsey <pramsey@cleverelephant.ca> - * Updated to 1.2.0 + * [r2562] Updated to 1.2.0 -2006-12-20 20:43 strk +2006-12-20 20:43 Sandro Santilli <strk@keybit.net> - * * regress/README: wrote info about adding regression tests + * [r2561] * regress/README: wrote info about adding regression + tests (plus some ChangeLog formatting) -2006-12-20 18:47 kneufeld +2006-12-20 18:47 Kevin Neufeld <kneufeld.ca@gmail.com> - * Added fix to permit gist indexes to have more than 459 null - geometries in a table + * [r2560] Added fix to permit gist indexes to have more than 459 + null geometries in a table -2006-12-20 18:44 kneufeld +2006-12-20 18:44 Kevin Neufeld <kneufeld.ca@gmail.com> - * Added test to fix that permitted gist indexes to have more than - 459 null geometries in a table + * [r2559] Added test to fix that permitted gist indexes to have + more than 459 null geometries in a table -2006-12-20 18:43 kneufeld +2006-12-20 18:43 Kevin Neufeld <kneufeld.ca@gmail.com> - * Added fix to permit gist indexes to have more than 459 null - geometries in a table + * [r2558] Added fix to permit gist indexes to have more than 459 + null geometries in a table 2006-12-18 14:12 mschaber - * Improved SRID handling in regression tests and added + * [r2557] Improved SRID handling in regression tests and added CoordinateArraySequence tests. 2006-12-18 13:04 mschaber - * Added ChangeLog/News entries for recent commits + * [r2556] Added ChangeLog/News entries for recent commits 2006-12-18 12:58 mschaber - * Fix multi-dimension handling in JtsBinaryWriter, thanks to Thomas - Marti for the hints + * [r2555] Fix multi-dimension handling in JtsBinaryWriter, thanks + to Thomas Marti for the hints 2006-12-18 12:55 mschaber - * Fixed Makefile for jts tests, commented debug options better + * [r2554] Fixed Makefile for jts tests, commented debug options + better -2006-12-15 11:00 strk +2006-12-15 11:00 Sandro Santilli <strk@keybit.net> - * Patch by Eduin Carrillo: short circuit transform when source and - target SRID are the same. + * [r2553] Patch by Eduin Carrillo: short circuit transform when + source and target SRID are the same. -2006-12-15 10:54 strk +2006-12-15 10:54 Sandro Santilli <strk@keybit.net> - * Added additional step for adding release marks in ChangeLog + * [r2552] Added additional step for adding release marks in + ChangeLog -2006-12-15 10:51 strk +2006-12-15 10:51 Sandro Santilli <strk@keybit.net> - * marked 1.2.0 release + * [r2551] marked 1.2.0 release -2006-12-15 10:48 strk +2006-12-15 10:48 Sandro Santilli <strk@keybit.net> - * Patch by Eduin Carrillo <yecarrillo@yahoo.com>: + * [r2550] Patch by Eduin Carrillo <yecarrillo@yahoo.com>: * lwgeom/: Makefile, lwgeom_kml.c, lwpostgis.sql.in: New AsKML() function @@ -9506,915 +29436,939 @@ 2006-12-13 17:50 mschaber - * fixed 'hard upgrade' instructions in readme.postgis + * [r2549] fixed 'hard upgrade' instructions in readme.postgis -2006-12-11 17:41 pramsey +2006-12-11 17:41 Paul Ramsey <pramsey@cleverelephant.ca> - * Updated vers. # + * [r2548] Updated vers. # -2006-12-09 03:57 pramsey +2006-12-09 03:57 Paul Ramsey <pramsey@cleverelephant.ca> - * Update version to corrent 1.2.0 version, and set news to correct - version + * [r2543] Update version to corrent 1.2.0 version, and set news to + correct version and date. -2006-12-06 02:00 mleslie +2006-12-06 02:00 Mark Leslie <mark.leslie@lisasoft.com> - * Updated with curved geometry definitions. + * [r2541] Updated with curved geometry definitions. -2006-12-06 00:30 mleslie +2006-12-06 00:30 Mark Leslie <mark.leslie@lisasoft.com> - * Added sections for SQL-MM and ArcSDE function ports. + * [r2540] Added sections for SQL-MM and ArcSDE function ports. -2006-12-05 20:45 mleslie +2006-12-05 20:45 Mark Leslie <mark.leslie@lisasoft.com> - * Fixing some incomplete paths, and adding changes to the regress - directory. + * [r2539] Fixing some incomplete paths, and adding changes to the + regress directory. -2006-12-05 20:41 mleslie +2006-12-05 20:41 Mark Leslie <mark.leslie@lisasoft.com> - * Added the previous changes for the curved geometry support. + * [r2538] Added the previous changes for the curved geometry + support. -2006-12-05 19:22 kneufeld +2006-12-05 19:22 Kevin Neufeld <kneufeld.ca@gmail.com> - * Added SQL/MM wrappers to existing PostGIS functions + * [r2537] Added SQL/MM wrappers to existing PostGIS functions -2006-12-05 19:07 kneufeld +2006-12-05 19:07 Kevin Neufeld <kneufeld.ca@gmail.com> - * added a subset (only those implemented by ArcSDE) of the SQL/MM - function prototypes and appended the file to lwpostgis.sql + * [r2536] added a subset (only those implemented by ArcSDE) of the + SQL/MM function prototypes and appended the file to lwpostgis.sql -2006-12-05 19:05 kneufeld +2006-12-05 19:05 Kevin Neufeld <kneufeld.ca@gmail.com> - * Moved common sql defines to their own header file. + * [r2535] Moved common sql defines to their own header file. ie. IF USE_VERSION>72 ... 2006-12-05 11:00 mschaber - * Added JTS shape + missing News message + * [r2534] Added JTS shape + missing News message -2006-12-05 01:21 mleslie +2006-12-05 01:21 Mark Leslie <mark.leslie@lisasoft.com> - * Updated the documentation to include an SQL-MM types section. + * [r2533] Updated the documentation to include an SQL-MM types + section. -2006-12-01 22:16 mleslie +2006-12-01 22:16 Mark Leslie <mark.leslie@lisasoft.com> - * Added typedefs and serialization/deserialization functionality - for sql-mm defined curved geometry types. Added a + * [r2532] Added typedefs and serialization/deserialization + functionality for sql-mm defined curved geometry types. Added a point_in_polygon short-circuit for contains and within functions. 2006-11-22 10:42 mschaber - * java/ejb3/src/org/postgis/hibernate/GeometryType.java Added - Nullpointer Fix by Norman Barker + * [r2531] java/ejb3/src/org/postgis/hibernate/GeometryType.java + Added Nullpointer Fix by Norman Barker -2006-11-20 12:59 strk +2006-11-20 12:59 Sandro Santilli <strk@keybit.net> - * * utils/postgis_restore.pl (canonicalize_typename): + * [r2530] * utils/postgis_restore.pl (canonicalize_typename): canonicalize 'timezone .* time stamp' to 'timezone' (fixes bug #121) -2006-11-17 17:12 strk +2006-11-17 17:12 Sandro Santilli <strk@keybit.net> - * Patch by "Antoine Bajolet" <antoine.bajolet@tdf.fr>: + * [r2529] Patch by "Antoine Bajolet" <antoine.bajolet@tdf.fr>: * lwgeom/lwgeom_gist.c: fixed 'directives may not be used inside a macro argument' error raised by some compilers. -2006-11-10 15:17 strk +2006-11-10 15:17 Sandro Santilli <strk@keybit.net> - * * configure.in (geos detection): use $geos_prefix/lib when - --ldflags is not supported by geos-config available. + * [r2528] * configure.in (geos detection): use $geos_prefix/lib + when --ldflags is not supported by geos-config available. -2006-11-10 14:11 strk +2006-11-10 14:11 Sandro Santilli <strk@keybit.net> - * Patch by Havard Tveite <havard.tveite@nlh.no>: + * [r2527] Patch by Havard Tveite <havard.tveite@nlh.no>: * doc/postgix.xml (Hard Upgrade): add info about createdb params * utils/postgis_restore.pl: fix use of createdb params -2006-11-02 13:22 strk +2006-11-02 13:22 Sandro Santilli <strk@keybit.net> - * * doc/postgis.xml: list setSRID bug fix in 'Bug fixes' section. + * [r2525] * doc/postgis.xml: list setSRID bug fix in 'Bug fixes' + section. 2006-11-02 11:48 mschaber - * Added missing docs about setsrid() + * [r2524] Added missing docs about setsrid() 2006-11-02 09:03 mschaber - * fixed setSRID bug in JDBC ComposedGeom. + * [r2523] fixed setSRID bug in JDBC ComposedGeom. -2006-11-02 08:06 strk +2006-11-02 08:06 Sandro Santilli <strk@keybit.net> - * ready for 1.1.6 release + * [r2522] ready for 1.1.6 release -2006-11-02 07:55 strk +2006-11-02 07:55 Sandro Santilli <strk@keybit.net> - * * lwgeom/lwgeom_api.c, lwgeom/wktunparse.c: cast -1 to a char + * [r2521] * lwgeom/lwgeom_api.c, lwgeom/wktunparse.c: cast -1 to a + char to make some compilers happy about comparison with a char type. -2006-10-26 09:41 strk +2006-10-26 09:41 Sandro Santilli <strk@keybit.net> - * Renamed CHANGES file to NEWS, updated references to it + * [r2520] Renamed CHANGES file to NEWS, updated references to it -2006-10-26 09:35 strk +2006-10-26 09:35 Sandro Santilli <strk@keybit.net> - * Initial import of an automatic generated ChangeLog - all + * [r2519] Initial import of an automatic generated ChangeLog - all developers please manually edit this on each commit 2006-10-25 10:23 mschaber - * fixed CAPI change that broke 64-bit platforms + * [r2518] fixed CAPI change that broke 64-bit platforms 2006-10-25 10:00 mschaber - * updated changelog to reflect loader regression fix + * [r2517] updated changelog to reflect loader regression fix 2006-10-25 09:57 mschaber - * Make regress test build loader and dumper as it needs them + * [r2516] Make regress test build loader and dumper as it needs + them -2006-10-24 12:35 strk +2006-10-24 12:35 Sandro Santilli <strk@keybit.net> - * use Z ordinate in reprojections + * [r2515] use Z ordinate in reprojections -2006-10-19 12:01 strk +2006-10-19 12:01 Sandro Santilli <strk@keybit.net> - * spatial_ref_sys.sql updated to EPSG 6.11.1 + * [r2514] spatial_ref_sys.sql updated to EPSG 6.11.1 2006-10-14 14:22 mschaber - * sanitized usage info output on loader/dumper + * [r2513] sanitized usage info output on loader/dumper 2006-10-14 09:26 mschaber - * Cleaned up Version.config & co. + * [r2512] Cleaned up Version.config & co. 2006-10-13 15:56 mschaber - * updated CHANGES and doc/postgis.xml in preparation of upcoming - release + * [r2510] updated CHANGES and doc/postgis.xml in preparation of + upcoming release 2006-10-13 15:35 mschaber - * updated HOWTO_RELEASE to reflect version. + * [r2509] updated HOWTO_RELEASE to reflect version. -2006-10-13 14:18 mcayland +2006-10-13 14:18 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Updated CHANGES files to reflect the MingW (Win32) linker fix for - pgsql2hp under PostgreSQL 8.2 + * [r2508] Updated CHANGES files to reflect the MingW (Win32) linker + fix for pgsql2hp under PostgreSQL 8.2 2006-10-11 13:35 mschaber - * Added hint about template_postgis to docs, thanks to Marc + * [r2507] Added hint about template_postgis to docs, thanks to Marc Cave-Ayland for contribution. 2006-10-11 11:19 mschaber - * fix ARC regression test failures in loader + * [r2506] fix ARC regression test failures in loader 2006-10-11 10:45 mschaber - * added note about odt to README, re-exported pdf + * [r2505] added note about odt to README, re-exported pdf -2006-10-11 10:00 strk +2006-10-11 10:00 Sandro Santilli <strk@keybit.net> - * Fixed a bug in InsertLineStringWKT, also fixed some typos + * [r2504] Fixed a bug in InsertLineStringWKT, also fixed some typos 2006-10-11 09:43 mschaber - * added -S option and updated README to loader/dumper + * [r2503] added -S option and updated README to loader/dumper 2006-10-11 09:37 mschaber - * bumped versions to 1.1.5 + * [r2502] bumped versions to 1.1.5 2006-10-09 17:22 mschaber - * fix EJB3 replace Method for Hibernate + * [r2501] fix EJB3 replace Method for Hibernate 2006-10-09 17:12 mschaber - * added EJB3Spatial.odt, fixed Normans contact mail + * [r2500] added EJB3Spatial.odt, fixed Normans contact mail -2006-10-09 16:33 mcayland +2006-10-09 16:33 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Remove extra PGFELIBS definition in one of the MingW specific - sections since it was triggering a linker bug within MingW's gcc. - This was the reason that compiling against PostgreSQL 8.2 beta 1 - under MingW would produce pgsql2shp executables that would - segfault. + * [r2499] Remove extra PGFELIBS definition in one of the MingW + specific sections since it was triggering a linker bug within + MingW's gcc. This was the reason that compiling against + PostgreSQL 8.2 beta 1 under MingW would produce pgsql2shp + executables that would segfault. 2006-10-04 10:47 mschaber - * fixed svn:ignore + * [r2498] fixed svn:ignore 2006-10-02 23:26 mschaber - * Fix all Eclipse warnings in java code, small cleanup + * [r2497] Fix all Eclipse warnings in java code, small cleanup 2006-10-02 23:16 mschaber - * First PLJava checkin. + * [r2496] First PLJava checkin. pljava needs some patches that are currently floating on pljava-dev to make it work, it seems that we're the first actual users of varlen UTD mappings in pljava. 2006-10-02 15:58 mschaber - * fixed NullPointer exception in org.postgis.Geometry.equals() + * [r2495] fixed NullPointer exception in + org.postgis.Geometry.equals() 2006-10-02 14:39 mschaber - * added .settings to svn:ignore + * [r2494] added .settings to svn:ignore 2006-10-02 14:30 mschaber - * Removed obsolete synchronisation from JTS. + * [r2493] Removed obsolete synchronisation from JTS. 2006-10-02 12:37 mschaber - * fix bit width bugs in Docu + * [r2492] fix bit width bugs in Docu 2006-09-27 15:50 mschaber - * Added further jdbc Todo issues. + * [r2491] Added further jdbc Todo issues. -2006-09-27 12:37 strk +2006-09-27 12:37 Sandro Santilli <strk@keybit.net> - * removed incompatible pointer type warning + * [r2490] removed incompatible pointer type warning 2006-09-27 08:37 mschaber - * fix erroneously changed build.xml + * [r2488] fix erroneously changed build.xml 2006-09-27 08:36 mschaber - * removed hyperflous jar file + * [r2487] removed hyperflous jar file -2006-09-27 08:23 strk +2006-09-27 08:23 Sandro Santilli <strk@keybit.net> - * lower default verbosity level + * [r2485] lower default verbosity level -2006-09-27 08:22 strk +2006-09-27 08:22 Sandro Santilli <strk@keybit.net> - * fixed to work with SVN + * [r2483] fixed to work with SVN -2006-09-27 07:50 strk +2006-09-27 07:50 Sandro Santilli <strk@keybit.net> - * updated tag step + * [r2481] updated tag step -2006-09-27 07:39 strk +2006-09-27 07:39 Sandro Santilli <strk@keybit.net> - * updated release notes + * [r2480] updated release notes -2006-09-27 07:29 strk +2006-09-27 07:29 Sandro Santilli <strk@keybit.net> - * version set to 1.1.4 (stripped CVS suffix + * [r2479] version set to 1.1.4 (stripped CVS suffix -2006-09-25 08:27 strk +2006-09-25 08:27 Sandro Santilli <strk@keybit.net> - * Encode pgsql2shp process pid into temporary table name, to reduce - likelyhood of name clashes. + * [r2478] Encode pgsql2shp process pid into temporary table name, + to reduce likelyhood of name clashes. 2006-09-22 14:51 mschaber - * fixed typo, updated CHANGES + * [r2477] fixed typo, updated CHANGES 2006-09-20 09:03 mschaber - * added ejb3 tutorial + * [r2476] added ejb3 tutorial -2006-09-18 13:21 strk +2006-09-18 13:21 Sandro Santilli <strk@keybit.net> - * Applied patch by Michael Fuhr <mike@fuhr.org>: + * [r2475] Applied patch by Michael Fuhr <mike@fuhr.org>: Most are spelling errors, but in one case I removed the word "symmetric" from the description of the Difference() function (SymDifference() is symmetric; Difference() is not). -2006-09-18 09:16 strk +2006-09-18 09:16 Sandro Santilli <strk@keybit.net> - * Fixed regress tests to pass with GEOS-3.0.0 + * [r2474] Fixed regress tests to pass with GEOS-3.0.0 2006-09-13 20:17 mschaber - * updated readme to java directory layout change + * [r2473] updated readme to java directory layout change -2006-09-09 16:32 pramsey +2006-09-09 16:32 Paul Ramsey <pramsey@cleverelephant.ca> - * Added fix for null dates that are encoded as '' instead of - 00000000. + * [r2472] Added fix for null dates that are encoded as '' instead + of 00000000. -2006-09-07 17:37 strk +2006-09-07 17:37 Sandro Santilli <strk@keybit.net> - * More fixes for mixed declarations and code + * [r2471] More fixes for mixed declarations and code -2006-09-07 17:03 strk +2006-09-07 17:03 Sandro Santilli <strk@keybit.net> - * Declare variables at start of blocks... + * [r2470] Declare variables at start of blocks... -2006-09-06 11:16 strk +2006-09-06 11:16 Sandro Santilli <strk@keybit.net> - * removed duplicated function definition + * [r2469] removed duplicated function definition 2006-09-05 15:22 mschaber - * updated jdbc Makefile to new directory layout + * [r2468] updated jdbc Makefile to new directory layout 2006-09-05 15:16 mschaber - * Java/JDBC directory reorganization + * [r2467] Java/JDBC directory reorganization 2006-08-30 08:46 mschaber - * added EJB2 support POC + * [r2466] added EJB2 support POC 2006-08-30 08:39 mschaber - * fixed README about droped trove4j dependency + * [r2465] fixed README about droped trove4j dependency -2006-07-28 13:11 strk +2006-07-28 13:11 Sandro Santilli <strk@keybit.net> - * added regress/lwpostgis.sql to svn:ignore list + * [r2464] added regress/lwpostgis.sql to svn:ignore list -2006-07-28 13:08 strk +2006-07-28 13:08 Sandro Santilli <strk@keybit.net> - * updated + * [r2463] updated -2006-07-28 13:07 strk +2006-07-28 13:07 Sandro Santilli <strk@keybit.net> - * Added tests for makeline, makebox2d and makebox3d + * [r2462] Added tests for makeline, makebox2d and makebox3d -2006-07-28 13:07 strk +2006-07-28 13:07 Sandro Santilli <strk@keybit.net> - * Fixed small typo in debugging message, replaced custom SRID check - with errorIfSRIDMismatch() function in LWGEOM_makeline + * [r2461] Fixed small typo in debugging message, replaced custom + SRID check with errorIfSRIDMismatch() function in LWGEOM_makeline -2006-07-28 13:06 strk +2006-07-28 13:06 Sandro Santilli <strk@keybit.net> - * Added SRID match check in MakeBox3D, fixed small typo in error - message + * [r2460] Added SRID match check in MakeBox3D, fixed small typo in + error message -2006-07-28 13:05 strk +2006-07-28 13:05 Sandro Santilli <strk@keybit.net> - * Added SRID match check in MakeBox2D + * [r2459] Added SRID match check in MakeBox2D -2006-07-27 15:06 strk +2006-07-27 15:06 Sandro Santilli <strk@keybit.net> - * Marked shapefiles as binary, corrected accidentally mangled ones + * [r2458] Marked shapefiles as binary, corrected accidentally + mangled ones 2006-07-27 09:44 mschaber - * typo fix in comment + * [r2457] typo fix in comment -2006-07-26 18:44 pramsey +2006-07-26 18:44 Paul Ramsey <pramsey@cleverelephant.ca> - * Changed Refractions mailing address. + * [r2456] Changed Refractions mailing address. -2006-07-26 17:21 pramsey +2006-07-26 17:21 Paul Ramsey <pramsey@cleverelephant.ca> - * Re-order repository + * [r2455] Re-order repository -2006-07-26 17:21 pramsey +2006-07-26 17:21 Paul Ramsey <pramsey@cleverelephant.ca> - * Re-order repository + * [r2454] Re-order repository -2006-07-25 20:16 strk +2006-07-25 20:16 Sandro Santilli <strk@keybit.net> - * Fixed bug in collect() function discarding SRID of input + * [r2413] Fixed bug in collect() function discarding SRID of input 2006-07-25 18:24 mschaber - * Reworked jdbc2 makefile + * [r2412] Reworked jdbc2 makefile -2006-07-21 21:21 pramsey +2006-07-21 21:21 Paul Ramsey <pramsey@cleverelephant.ca> - * Add official "adaptions" to the files to make them suitable for + * [r2411] Add official "adaptions" to the files to make them + suitable for submission to the OGC compliance process. 2006-07-19 13:31 mschaber - * fixed checkSrid method in JtsBinaryWriter + * [r2410] fixed checkSrid method in JtsBinaryWriter 2006-07-19 09:45 mschaber - * Fix setSridRecurse function in JTS + * [r2409] Fix setSridRecurse function in JTS 2006-07-18 18:13 mschaber - * fix compiler warning due to deprecated method + * [r2408] fix compiler warning due to deprecated method 2006-07-18 18:13 mschaber - * fix SRID handling in JTS code + * [r2407] fix SRID handling in JTS code -2006-07-07 13:56 strk +2006-07-07 13:56 Sandro Santilli <strk@keybit.net> - * Applied Michael Fuhr patches: + * [r2406] Applied Michael Fuhr patches: Eliminate the warnings that escape_string_warning complains about. The patches change \' (backslash single-quote) to '' (single-quote single-quote) and replace a couple of other escapes with calls to chr(). -2006-07-02 23:41 strk +2006-07-02 23:41 Sandro Santilli <strk@keybit.net> - * Fixed support for PostgreSQL 8.2 (gist) - patch by Michael Fuhr - <mike@fuhr.org> + * [r2405] Fixed support for PostgreSQL 8.2 (gist) - patch by + Michael Fuhr <mike@fuhr.org> -2006-06-30 21:29 strk +2006-06-30 21:29 Sandro Santilli <strk@keybit.net> - * Prepared for 1.1.3 release: release notes, changes, version. - Release date set for today (2006-06-30) + * [r2403] Prepared for 1.1.3 release: release notes, changes, + version. Release date set for today (2006-06-30) -2006-06-26 01:02 strk +2006-06-26 01:02 Sandro Santilli <strk@keybit.net> - * replaced ROLLBACK with COMMIT in psql output to hide differences - with 7.4 and lower pgsql versions. + * [r2402] replaced ROLLBACK with COMMIT in psql output to hide + differences with 7.4 and lower pgsql versions. -2006-06-26 00:56 strk +2006-06-26 00:56 Sandro Santilli <strk@keybit.net> - * Fixed Invalid Memory Alloc request size error on GEOS=>LWGEOM - conversion for EMPTY geometries. Removed warnings when built with - POSTGIS_DEBUG enabled. + * [r2401] Fixed Invalid Memory Alloc request size error on + GEOS=>LWGEOM conversion for EMPTY geometries. Removed warnings + when built with POSTGIS_DEBUG enabled. -2006-06-26 00:41 strk +2006-06-26 00:41 Sandro Santilli <strk@keybit.net> - * Added debug lines in LWGEOM_affine, fixed some compiler warnings - for build with POSTGIS_DEBUG enabled. + * [r2400] Added debug lines in LWGEOM_affine, fixed some compiler + warnings for build with POSTGIS_DEBUG enabled. -2006-06-26 00:40 strk +2006-06-26 00:40 Sandro Santilli <strk@keybit.net> - * qualified all geometry arguments. + * [r2399] qualified all geometry arguments. -2006-06-25 23:59 strk +2006-06-25 23:59 Sandro Santilli <strk@keybit.net> - * Added Long Transaction Support routines, dox and regress test. + * [r2398] Added Long Transaction Support routines, dox and regress + test. -2006-06-25 23:45 strk +2006-06-25 23:45 Sandro Santilli <strk@keybit.net> - * Fixed the lc_messages failure by avoiding attempts at setting it - when run against a postgresql version < 8.0. Also fixed a path in - a message from run_test. + * [r2397] Fixed the lc_messages failure by avoiding attempts at + setting it when run against a postgresql version < 8.0. Also + fixed a path in a message from run_test. -2006-06-25 22:53 strk +2006-06-25 22:53 Sandro Santilli <strk@keybit.net> - * Release Notes moved to an higher depth to reduce ToC noise. + * [r2396] Release Notes moved to an higher depth to reduce ToC + noise. -2006-06-25 22:50 strk +2006-06-25 22:50 Sandro Santilli <strk@keybit.net> - * Fixed HTML output rules + * [r2395] Fixed HTML output rules -2006-06-25 22:33 strk +2006-06-25 22:33 Sandro Santilli <strk@keybit.net> - * Add getTransactionID() stored procedure to support pgsql 7.3 (not - tested against 7.2) + * [r2394] Add getTransactionID() stored procedure to support pgsql + 7.3 (not tested against 7.2) -2006-06-24 01:08 strk +2006-06-24 01:08 Sandro Santilli <strk@keybit.net> - * Removed compiler warnings (and more requested) + * [r2393] Removed compiler warnings (and more requested) -2006-06-24 00:11 strk +2006-06-24 00:11 Sandro Santilli <strk@keybit.net> - * Added spaces between parameters ref and operator, as pgsql 7.3 - chokes otherwise ($1*$2 becomes $1 * $2) + * [r2392] Added spaces between parameters ref and operator, as + pgsql 7.3 chokes otherwise ($1*$2 becomes $1 * $2) -2006-06-23 23:37 strk +2006-06-23 23:37 Sandro Santilli <strk@keybit.net> - * Added EnableLongTransactions() and DisableLongTransactions(). + * [r2391] Added EnableLongTransactions() and + DisableLongTransactions(). -2006-06-23 21:56 strk +2006-06-23 21:56 Sandro Santilli <strk@keybit.net> - * Fixed a couple of bugs, added a simple test script, cleaner error - messages + * [r2390] Fixed a couple of bugs, added a simple test script, + cleaner error messages and compile-time support for unauthorized row updates behaviour (abort, skip). -2006-06-19 10:42 strk +2006-06-19 10:42 Sandro Santilli <strk@keybit.net> - * Removed -0 values from polygon doubles + * [r2389] Removed -0 values from polygon doubles -2006-06-18 11:29 strk +2006-06-18 11:29 Sandro Santilli <strk@keybit.net> - * Changed -e test with -f, for Solaris support + * [r2388] Changed -e test with -f, for Solaris support -2006-06-17 11:46 strk +2006-06-17 11:46 Sandro Santilli <strk@keybit.net> - * removed spurious newline + * [r2387] removed spurious newline -2006-06-17 11:44 strk +2006-06-17 11:44 Sandro Santilli <strk@keybit.net> - * Fixed portability issues in the new run_test code, added loader - test + * [r2386] Fixed portability issues in the new run_test code, added + loader test for all supported shapefile types -2006-06-16 14:18 strk +2006-06-16 14:18 Sandro Santilli <strk@keybit.net> - * Aliased 'test' rule as 'check', to conform to common practice. + * [r2385] Aliased 'test' rule as 'check', to conform to common + practice. -2006-06-16 14:13 strk +2006-06-16 14:13 Sandro Santilli <strk@keybit.net> - * New regress test cases and support for loader/dumper. + * [r2384] New regress test cases and support for loader/dumper. -2006-06-16 14:12 strk +2006-06-16 14:12 Sandro Santilli <strk@keybit.net> - * - BUGFIX in pgsql2shp successful return code. + * [r2383] - BUGFIX in pgsql2shp successful return code. - BUGFIX in shp2pgsql handling of MultiLine WKT. -2006-06-13 10:20 strk +2006-06-13 10:20 Sandro Santilli <strk@keybit.net> - * Updated template_gis Makefile to work with older debian sarge - (stable). + * [r2382] Updated template_gis Makefile to work with older debian + sarge (stable). Patch by Alex Bodnaru. -2006-06-09 06:03 strk +2006-06-09 06:03 Sandro Santilli <strk@keybit.net> - * Fixed bug in PGISSCRIPT variable (provided by Alex Bodnaru) + * [r2381] Fixed bug in PGISSCRIPT variable (provided by Alex + Bodnaru) -2006-06-05 17:24 strk +2006-06-05 17:24 Sandro Santilli <strk@keybit.net> - * Updated misleading documentation for Segmentize() function + * [r2380] Updated misleading documentation for Segmentize() + function -2006-06-02 16:59 strk +2006-06-02 16:59 Sandro Santilli <strk@keybit.net> - * Fully supported georeferencing in chip drawing ops (must still - tweak edge cases) + * [r2379] Fully supported georeferencing in chip drawing ops (must + still tweak edge cases) -2006-06-01 16:57 strk +2006-06-01 16:57 Sandro Santilli <strk@keybit.net> - * Fixed lwgeom drawing primitives to honour georeferencing. + * [r2378] Fixed lwgeom drawing primitives to honour georeferencing. -2006-06-01 07:07 strk +2006-06-01 07:07 Sandro Santilli <strk@keybit.net> - * Added "fmgr.h" include, for PG_MODULE_MAGIC definition + * [r2377] Added "fmgr.h" include, for PG_MODULE_MAGIC definition -2006-06-01 06:58 strk +2006-06-01 06:58 Sandro Santilli <strk@keybit.net> - * Added magic block ctor for 8.2 compatibility + * [r2376] Added magic block ctor for 8.2 compatibility -2006-06-01 06:56 strk +2006-06-01 06:56 Sandro Santilli <strk@keybit.net> - * Don't link pgsql2shp to more libs then required. + * [r2375] Don't link pgsql2shp to more libs then required. -2006-05-31 08:58 strk +2006-05-31 08:58 Sandro Santilli <strk@keybit.net> - * Added support and info for CHIP.datatype 7,8,107 and 108. They - were not documented but used by CHIP canonical input function. + * [r2374] Added support and info for CHIP.datatype 7,8,107 and 108. + They were not documented but used by CHIP canonical input + function. -2006-05-31 06:43 strk +2006-05-31 06:43 Sandro Santilli <strk@keybit.net> - * Imported template_gis utilities contributed by Roberto Boati and - Alex Bodnaru. + * [r2373] Imported template_gis utilities contributed by Roberto + Boati and Alex Bodnaru. -2006-05-30 17:19 strk +2006-05-30 17:19 Sandro Santilli <strk@keybit.net> - * Added some primitives for CHIP management + rendering for points - and lines + * [r2372] Added some primitives for CHIP management + rendering for + points and lines -2006-05-30 17:17 strk +2006-05-30 17:17 Sandro Santilli <strk@keybit.net> - * Fixed bug in CHIP input routine failing on uncompressed 1x1 - integer chip inputs + * [r2371] Fixed bug in CHIP input routine failing on uncompressed + 1x1 integer chip inputs -2006-05-30 08:47 strk +2006-05-30 08:47 Sandro Santilli <strk@keybit.net> - * added copyright header + * [r2370] added copyright header -2006-05-30 08:38 strk +2006-05-30 08:38 Sandro Santilli <strk@keybit.net> - * Added some missing copyright headers. + * [r2369] Added some missing copyright headers. -2006-05-23 09:48 strk +2006-05-23 09:48 Sandro Santilli <strk@keybit.net> - * NEW AsHEXEWKB(geom, XDR|NDR) function + documentation + * [r2368] NEW AsHEXEWKB(geom, XDR|NDR) function + documentation -2006-05-22 15:29 strk +2006-05-22 15:29 Sandro Santilli <strk@keybit.net> - * Moved 'measures' query into a specific file, added a test for bug - #108 + * [r2367] Moved 'measures' query into a specific file, added a test + for bug #108 -2006-05-22 14:57 strk +2006-05-22 14:57 Sandro Santilli <strk@keybit.net> - * Set version to 1.1.3CVS + * [r2366] Set version to 1.1.3CVS -2006-05-22 14:23 strk +2006-05-22 14:23 Sandro Santilli <strk@keybit.net> - * Transform a SRID==0 from GEOS to a SRID=-1. + * [r2365] Transform a SRID==0 from GEOS to a SRID=-1. -2006-05-22 13:08 strk +2006-05-22 13:08 Sandro Santilli <strk@keybit.net> - * Fixed a bug in distance2d_poly_poly() never really comparing ring - distances + * [r2364] Fixed a bug in distance2d_poly_poly() never really + comparing ring distances between 1st ring of 1st geom and all rings of second one. -2006-05-22 12:10 strk +2006-05-22 12:10 Sandro Santilli <strk@keybit.net> - * Added 'with oids' specification to create table (oids are used - for the test). + * [r2363] Added 'with oids' specification to create table (oids are + used for the test). 'With oids' was available in postgresql 7.3.4 so we should not be highering the requirements for topology. Suggestion from Alex Bodnaru. -2006-05-22 11:17 strk +2006-05-22 11:17 Sandro Santilli <strk@keybit.net> - * Applied cleanups by Alex Bodnaru + * [r2362] Applied cleanups by Alex Bodnaru -2006-05-22 11:02 strk +2006-05-22 11:02 Sandro Santilli <strk@keybit.net> - * New DumpRings(polygon) function + docs + * [r2361] New DumpRings(polygon) function + docs -2006-05-22 10:58 strk +2006-05-22 10:58 Sandro Santilli <strk@keybit.net> - * fixed errors in DEBUG builds + * [r2360] fixed errors in DEBUG builds -2006-05-22 10:38 strk +2006-05-22 10:38 Sandro Santilli <strk@keybit.net> - * Added usage comment about lwpoly_construct() + * [r2359] Added usage comment about lwpoly_construct() -2006-05-17 15:52 strk +2006-05-17 15:52 Sandro Santilli <strk@keybit.net> - * Added Bruce Rindahl in the credits hall + * [r2358] Added Bruce Rindahl in the credits hall -2006-05-17 15:32 strk +2006-05-17 15:32 Sandro Santilli <strk@keybit.net> - * Added note about doc generation change + * [r2357] Added note about doc generation change -2006-05-17 13:11 strk +2006-05-17 13:11 Sandro Santilli <strk@keybit.net> - * DocBook version set to 4.3 (4.2 did not have <code> tag) + * [r2356] DocBook version set to 4.3 (4.2 did not have <code> tag) Thanks to Mateus Loskot for the tip! -2006-05-17 13:04 strk +2006-05-17 13:04 Sandro Santilli <strk@keybit.net> - * Changed PDF manual generation rule to use db2pdf from + * [r2355] Changed PDF manual generation rule to use db2pdf from docbook-utils package. Input does not validate, thus the rule doesn't succeed yet, but removing <code> tags is enough to complete. -2006-05-17 12:26 strk +2006-05-17 12:26 Sandro Santilli <strk@keybit.net> - * Added note about pdfxmltex being provided by xmltex package + * [r2354] Added note about pdfxmltex being provided by xmltex + package -2006-05-17 12:25 strk +2006-05-17 12:25 Sandro Santilli <strk@keybit.net> - * Added check for pdfxmltex availability before attempting to use - it + * [r2353] Added check for pdfxmltex availability before attempting + to use it -2006-05-17 07:52 strk +2006-05-17 07:52 Sandro Santilli <strk@keybit.net> - * Additional bbox tests for transcale, rotateX and rotateY + * [r2352] Additional bbox tests for transcale, rotateX and rotateY -2006-05-16 19:11 strk +2006-05-16 19:11 Sandro Santilli <strk@keybit.net> - * Added tests for translate and scale bbox computation + * [r2351] Added tests for translate and scale bbox computation -2006-05-16 17:09 strk +2006-05-16 17:09 Sandro Santilli <strk@keybit.net> - * BUGXFIX in affine() failing to update bounding box + * [r2350] BUGXFIX in affine() failing to update bounding box -2006-05-11 14:24 strk +2006-05-11 14:24 Sandro Santilli <strk@keybit.net> - * Update to 1.1.2 by Laurent WANDREBECK + * [r2349] Update to 1.1.2 by Laurent WANDREBECK -2006-05-11 09:41 strk +2006-05-11 09:41 Sandro Santilli <strk@keybit.net> - * added postgis.fo and postgis.pdf + * [r2348] added postgis.fo and postgis.pdf -2006-05-11 09:41 strk +2006-05-11 09:41 Sandro Santilli <strk@keybit.net> - * changed single-file html production to 'make html', simpler + * [r2347] changed single-file html production to 'make html', + simpler -2006-05-10 13:40 strk +2006-05-10 13:40 Sandro Santilli <strk@keybit.net> - * Added notes about requirements for dox generation, cleaned up - Makefile + * [r2346] Added notes about requirements for dox generation, + cleaned up Makefile 2006-05-10 10:47 mschaber - * Small typo fix in comment + * [r2345] Small typo fix in comment -2006-05-10 10:37 strk +2006-05-10 10:37 Sandro Santilli <strk@keybit.net> - * Removed >/dev/null redirection of pdfxmltex command, to see - what's going on + * [r2344] Removed >/dev/null redirection of pdfxmltex command, to + see what's going on 2006-05-09 13:06 mschaber - * Fixed JtsGeometry.equals() + * [r2343] Fixed JtsGeometry.equals() Imporoved Geometry setter/getter updated postgis version -2006-05-04 15:19 strk +2006-05-04 15:19 Sandro Santilli <strk@keybit.net> - * Support for Tru64 build (bug#104) + * [r2342] Support for Tru64 build (bug#104) 2006-05-03 08:33 mschaber - * added eclipsebin to cvsignore + * [r2341] added eclipsebin to cvsignore 2006-05-03 08:30 mschaber - * Added regression tests for OGC conformant multiPoint parsing, - updated CHANGELOG + * [r2340] Added regression tests for OGC conformant multiPoint + parsing, updated CHANGELOG 2006-05-03 08:18 mschaber - * Added test case for scientific notation + * [r2339] Added test case for scientific notation 2006-04-26 14:42 mschaber - * fixed typo in regression test online help + * [r2338] fixed typo in regression test online help -2006-04-26 12:19 strk +2006-04-26 12:19 Sandro Santilli <strk@keybit.net> - * Added --with-geos-libdir and --with-proj-libdir configure + * [r2337] Added --with-geos-libdir and --with-proj-libdir configure switches -2006-04-18 16:57 strk +2006-04-18 16:57 Sandro Santilli <strk@keybit.net> - * Fixed invalid C++ style comment + * [r2336] Fixed invalid C++ style comment -2006-04-18 16:56 strk +2006-04-18 16:56 Sandro Santilli <strk@keybit.net> - * Used ad-hoc AC_PROG_YACC for yacc detection + * [r2335] Used ad-hoc AC_PROG_YACC for yacc detection -2006-04-18 14:09 strk +2006-04-18 14:09 Sandro Santilli <strk@keybit.net> - * Limited text field size to 255 (bug #84) [will eventually provide - a switch to support wider fields ] + * [r2334] Limited text field size to 255 (bug #84) [will eventually + provide a switch to support wider fields ] -2006-04-18 12:36 strk +2006-04-18 12:36 Sandro Santilli <strk@keybit.net> - * updated + * [r2333] updated -2006-04-18 12:30 strk +2006-04-18 12:30 Sandro Santilli <strk@keybit.net> - * Added test for wkt parser + * [r2332] Added test for wkt parser -2006-04-18 12:30 strk +2006-04-18 12:30 Sandro Santilli <strk@keybit.net> - * WKT parser: forbidden EMPTY elements in non-collection + * [r2331] WKT parser: forbidden EMPTY elements in non-collection multigeoms. -2006-04-18 10:28 strk +2006-04-18 10:28 Sandro Santilli <strk@keybit.net> - * Cleanly handled deserialization of points with non-point input by - raising an error. Made other simple geoms deserializers errors of - this kind be consistent. Added a check in lwgeom_typename() to - avoid memory corruption when input geometrytype is out of range. + * [r2330] Cleanly handled deserialization of points with non-point + input by raising an error. Made other simple geoms deserializers + errors of this kind be consistent. Added a check in + lwgeom_typename() to avoid memory corruption when input + geometrytype is out of range. -2006-04-18 09:19 strk +2006-04-18 09:19 Sandro Santilli <strk@keybit.net> - * Added check for libiconv_open (for MingW) - patch provided by - Mark Cave-Ayland + * [r2329] Added check for libiconv_open (for MingW) - patch + provided by Mark Cave-Ayland -2006-04-18 09:16 strk +2006-04-18 09:16 Sandro Santilli <strk@keybit.net> - * Substituted bzero() use with memset() + * [r2328] Substituted bzero() use with memset() -2006-04-18 09:10 strk +2006-04-18 09:10 Sandro Santilli <strk@keybit.net> - * Applied patch by Mark Cave-Ayland allowing in-place regression - tests to + * [r2327] Applied patch by Mark Cave-Ayland allowing in-place + regression tests to be run under MingW (Win32) -2006-04-10 08:19 strk +2006-04-10 08:19 Sandro Santilli <strk@keybit.net> - * Added support for printing argument geoms on union failures + * [r2326] Added support for printing argument geoms on union + failures within unite_garray() loop. -2006-03-29 09:25 strk +2006-03-29 09:25 Sandro Santilli <strk@keybit.net> - * removed obsoleted items + * [r2325] removed obsoleted items -2006-03-29 09:19 strk +2006-03-29 09:19 Sandro Santilli <strk@keybit.net> - * Set release version and date + * [r2323] Set release version and date -2006-03-29 09:14 strk +2006-03-29 09:14 Sandro Santilli <strk@keybit.net> - * Prepared for 1.1.2 release + * [r2322] Prepared for 1.1.2 release -2006-03-28 08:39 strk +2006-03-28 08:39 Sandro Santilli <strk@keybit.net> - * Mangled Self-intersection message to remove 'at or near point' + * [r2321] Mangled Self-intersection message to remove 'at or near + point' so that test works with both GEOS 2.x (w/out point spec) and 3.x (with point spec) -2006-03-27 09:33 strk +2006-03-27 09:33 Sandro Santilli <strk@keybit.net> - * Used a larger grid for buffer() test, to account for rounding - changes between + * [r2320] Used a larger grid for buffer() test, to account for + rounding changes between GEOS-2.2 and GEOS-3.0 -2006-03-13 10:54 strk +2006-03-13 10:54 Sandro Santilli <strk@keybit.net> - * Applied patch from Mark Cave Ayland embedding access control for + * [r2319] Applied patch from Mark Cave Ayland embedding access + control for the estimated_extent functions. -2006-03-13 10:41 strk +2006-03-13 10:41 Sandro Santilli <strk@keybit.net> - * added enforceRHR fix + * [r2318] added enforceRHR fix -2006-03-12 17:20 pramsey +2006-03-12 17:20 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix isccw to return correct ccw answer. + * [r2317] Fix isccw to return correct ccw answer. -2006-03-12 17:13 pramsey +2006-03-12 17:13 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix for enforceRHR to actually enforce rather than just reverse. - (Note + * [r2316] Fix for enforceRHR to actually enforce rather than just + reverse. (Note that seems to be enforcing CW RHR rather than CCW RHR.) -2006-03-08 18:21 strk +2006-03-08 18:21 Sandro Santilli <strk@keybit.net> - * Added pg_config --libs to PGFELIBS as a workaround for systems + * [r2315] Added pg_config --libs to PGFELIBS as a workaround for + systems that doesn't automatically detect dependencies -2006-03-01 09:10 strk +2006-03-01 09:10 Sandro Santilli <strk@keybit.net> - * Fixed 'clean' rule to succeed also when tree already cleaned (rm - -f) + * [r2314] Fixed 'clean' rule to succeed also when tree already + cleaned (rm -f) -2006-02-24 20:23 pramsey +2006-02-24 20:23 Paul Ramsey <pramsey@cleverelephant.ca> - * Minor error in install instructions + * [r2313] Minor error in install instructions 2006-02-23 11:48 mschaber - * documented affine(), rewrote transscale() to use affine() + * [r2312] documented affine(), rewrote transscale() to use affine() -2006-02-22 14:06 strk +2006-02-22 14:06 Sandro Santilli <strk@keybit.net> - * Added affine() internal function. + * [r2311] Added affine() internal function. Provided rotate{Z,X,Y}() internally using affine(). Made scale() and translate() internally use affine(). Obsoleted transscale() function. Fixed a bbox-related bug in transscale() Added a test for affine transformations. -2006-02-15 08:38 strk +2006-02-15 08:38 Sandro Santilli <strk@keybit.net> - * Qualified args of difference() to avoid clashes with other - packages + * [r2310] Qualified args of difference() to avoid clashes with + other packages -2006-02-10 10:58 strk +2006-02-10 10:58 Sandro Santilli <strk@keybit.net> - * Made it a single transaction + * [r2309] Made it a single transaction -2006-02-10 10:57 strk +2006-02-10 10:57 Sandro Santilli <strk@keybit.net> - * Removed intermediate VACUUM + * [r2308] Removed intermediate VACUUM 2006-02-06 20:04 mschaber - * fixed srid handling in jts for composed geometries - this had - prevented 'inner' geometries with no given srid from inheriting - the srid from outer collection. + * [r2307] fixed srid handling in jts for composed geometries - this + had prevented 'inner' geometries with no given srid from + inheriting the srid from outer collection. -2006-02-06 11:16 strk +2006-02-06 11:16 Sandro Santilli <strk@keybit.net> - * Added uchar typedef + * [r2306] Added uchar typedef -2006-02-06 11:12 strk +2006-02-06 11:12 Sandro Santilli <strk@keybit.net> - * uint32_t typedef moved back from wktparse.h to lwgparse.c and - wktunparse.c + * [r2305] uint32_t typedef moved back from wktparse.h to lwgparse.c + and wktunparse.c -2006-02-06 11:09 strk +2006-02-06 11:09 Sandro Santilli <strk@keybit.net> - * added snaptogrid behavior + * [r2304] added snaptogrid behavior -2006-02-03 20:53 strk +2006-02-03 20:53 Sandro Santilli <strk@keybit.net> - * Swapped stdint.h (unavailable on Solaris9) with inttypes.h + * [r2303] Swapped stdint.h (unavailable on Solaris9) with + inttypes.h -2006-02-03 09:52 strk +2006-02-03 09:52 Sandro Santilli <strk@keybit.net> - * Changed int4 typedefs to use POSIX uint32_t + * [r2302] Changed int4 typedefs to use POSIX uint32_t -2006-02-02 04:46 pramsey +2006-02-02 04:46 Paul Ramsey <pramsey@cleverelephant.ca> - * Updated maintainers info. + * [r2301] Updated maintainers info. -2006-02-01 22:15 strk +2006-02-01 22:15 Sandro Santilli <strk@keybit.net> - * Made regress/run_test create and drop it's regress database + * [r2300] Made regress/run_test create and drop it's regress + database unless otherwise specified using --nocreate and --nodrop switches. -2006-02-01 20:48 strk +2006-02-01 20:48 Sandro Santilli <strk@keybit.net> - * Portable tests for docdir and datadir, comments fixed. + * [r2299] Portable tests for docdir and datadir, comments fixed. Thanks to Havard Tveite for pointing out. -2006-01-29 13:54 strk +2006-01-29 13:54 Sandro Santilli <strk@keybit.net> - * Fixed bug in SnapToGrid() bbox computation. + * [r2298] Fixed bug in SnapToGrid() bbox computation. Previous policy (WHEN SIMPLE) turned out to be non-simple, so this has been changed to TAINING. Bbox will then be recomputed by scanning output coordinates @@ -10429,249 +30383,253 @@ Version bumped to 1.1.2 and CHANGES file updated. -2006-01-23 00:13 strk +2006-01-23 00:13 Sandro Santilli <strk@keybit.net> - * Set version to 1.1.1, edited 1.1.1 Release Notes chapter in - manual + * [r2296] Set version to 1.1.1, edited 1.1.1 Release Notes chapter + in manual and set release date (2006-01-23). -2006-01-22 23:09 pramsey +2006-01-22 23:09 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix for bug 10, SRID 28992 incorrect + * [r2295] Fix for bug 10, SRID 28992 incorrect -2006-01-21 08:40 strk +2006-01-21 08:40 Sandro Santilli <strk@keybit.net> - * Separated 'export' from assignment, for Solaris support - + * [r2294] Separated 'export' from assignment, for Solaris support - reported by Michael Fuhr -2006-01-19 19:19 strk +2006-01-19 19:19 Sandro Santilli <strk@keybit.net> - * Updated documentation for line_substring() and + * [r2293] Updated documentation for line_substring() and line_interpolate_point() -2006-01-19 19:13 strk +2006-01-19 19:13 Sandro Santilli <strk@keybit.net> - * Added a couple of line_interpolate_point tests + * [r2292] Added a couple of line_interpolate_point tests -2006-01-19 19:11 strk +2006-01-19 19:11 Sandro Santilli <strk@keybit.net> - * Z and M interpolation in line_interpolate_point() + * [r2291] Z and M interpolation in line_interpolate_point() -2006-01-19 18:26 strk +2006-01-19 18:26 Sandro Santilli <strk@keybit.net> - * Made line_substring() handle corner case of start/end having the - same + * [r2290] Made line_substring() handle corner case of start/end + having the same value. A point is returned in that case. -2006-01-19 18:17 strk +2006-01-19 18:17 Sandro Santilli <strk@keybit.net> - * Added more regress tests for line_substring + * [r2289] Added more regress tests for line_substring -2006-01-19 18:17 strk +2006-01-19 18:17 Sandro Santilli <strk@keybit.net> - * Added Z and M interpolation in ptarray_substring(), fixed some - corner-case bugs + * [r2288] Added Z and M interpolation in ptarray_substring(), fixed + some corner-case bugs -2006-01-19 18:16 strk +2006-01-19 18:16 Sandro Santilli <strk@keybit.net> - * Added interpolate_point4d() general function in API + * [r2287] Added interpolate_point4d() general function in API -2006-01-19 18:15 strk +2006-01-19 18:15 Sandro Santilli <strk@keybit.net> - * Added -v switch to show differences inline + * [r2286] Added -v switch to show differences inline -2006-01-18 21:06 strk +2006-01-18 21:06 Sandro Santilli <strk@keybit.net> - * Forced lc_messages to be 'C' during regress tests + * [r2285] Forced lc_messages to be 'C' during regress tests -2006-01-18 10:19 strk +2006-01-18 10:19 Sandro Santilli <strk@keybit.net> - * Fixed out-of-bound condition in ptarray_substring during copy of + * [r2284] Fixed out-of-bound condition in ptarray_substring during + copy of unaltered points. Added regress test for the case (postgis-devel/2006-January/001951.html) -2006-01-17 14:53 strk +2006-01-17 14:53 Sandro Santilli <strk@keybit.net> - * Fixed $datadir and $docdir paths to support postgresql convention + * [r2283] Fixed $datadir and $docdir paths to support postgresql + convention of adding 'postgresql' component IFF neither 'pgsql' nor 'postgres' already appear in the path. -2006-01-17 08:37 strk +2006-01-17 08:37 Sandro Santilli <strk@keybit.net> - * Added postgis_restore.pl fix + * [r2282] Added postgis_restore.pl fix -2006-01-17 08:36 strk +2006-01-17 08:36 Sandro Santilli <strk@keybit.net> - * Commented out debugging premature exit left from last review + * [r2281] Commented out debugging premature exit left from last + review -2006-01-16 10:42 strk +2006-01-16 10:42 Sandro Santilli <strk@keybit.net> - * Added support for Bool and Date DBF<=>PGIS mapping + * [r2280] Added support for Bool and Date DBF<=>PGIS mapping -2006-01-16 10:10 strk +2006-01-16 10:10 Sandro Santilli <strk@keybit.net> - * Fixed default pgsql prefix to /usr/local/pgsql (default since - pgsql 7.2) + * [r2279] Fixed default pgsql prefix to /usr/local/pgsql (default + since pgsql 7.2) -2006-01-15 22:56 strk +2006-01-15 22:56 Sandro Santilli <strk@keybit.net> - * Fixed handling of pg_config --bindir + * [r2278] Fixed handling of pg_config --bindir -2006-01-13 09:11 strk +2006-01-13 09:11 Sandro Santilli <strk@keybit.net> - * Fixed bug in ptarray_locate_point() - added regress test for - specific case + * [r2277] Fixed bug in ptarray_locate_point() - added regress test + for specific case -2006-01-12 12:26 strk +2006-01-12 12:26 Sandro Santilli <strk@keybit.net> - * Fixed bug blessing all GEOMETRYCOLLECTIONS to MULTIPOLYGONS in - postgis->GEOS + * [r2276] Fixed bug blessing all GEOMETRYCOLLECTIONS to + MULTIPOLYGONS in postgis->GEOS converted trough C-API 2006-01-10 16:38 mschaber - * Added NumInteriorRing(geometry) alias function + * [r2275] Added NumInteriorRing(geometry) alias function -2006-01-09 16:40 strk +2006-01-09 16:40 Sandro Santilli <strk@keybit.net> - * ISO C90 comments, signedness mismatch fixes + * [r2274] ISO C90 comments, signedness mismatch fixes -2006-01-09 15:55 strk +2006-01-09 15:55 Sandro Santilli <strk@keybit.net> - * ISO C90 comments (finished in lwgeom/) + * [r2273] ISO C90 comments (finished in lwgeom/) -2006-01-09 15:12 strk +2006-01-09 15:12 Sandro Santilli <strk@keybit.net> - * ISO C90 comments + * [r2272] ISO C90 comments -2006-01-09 15:11 strk +2006-01-09 15:11 Sandro Santilli <strk@keybit.net> - * Removed variable-sized array and fixed comments as for ISO C90 - requirements. + * [r2271] Removed variable-sized array and fixed comments as for + ISO C90 requirements. -2006-01-09 15:09 strk +2006-01-09 15:09 Sandro Santilli <strk@keybit.net> - * Added simplify() test unit + * [r2270] Added simplify() test unit -2006-01-09 14:43 strk +2006-01-09 14:43 Sandro Santilli <strk@keybit.net> - * ISO C90 comments, indenting + * [r2269] ISO C90 comments, indenting -2006-01-09 12:56 strk +2006-01-09 12:56 Sandro Santilli <strk@keybit.net> - * Proc upgrade requirement message made more clear. + * [r2268] Proc upgrade requirement message made more clear. -2006-01-09 12:55 strk +2006-01-09 12:55 Sandro Santilli <strk@keybit.net> - * Removed variable-sized array forbidden by ISO C90. + * [r2267] Removed variable-sized array forbidden by ISO C90. -2006-01-09 12:39 strk +2006-01-09 12:39 Sandro Santilli <strk@keybit.net> - * C++ style comments removed, fixed return from void function. + * [r2266] C++ style comments removed, fixed return from void + function. -2006-01-09 12:36 strk +2006-01-09 12:36 Sandro Santilli <strk@keybit.net> - * Changed C++ style comments to ISO C format + * [r2265] Changed C++ style comments to ISO C format -2006-01-09 12:30 strk +2006-01-09 12:30 Sandro Santilli <strk@keybit.net> - * Changed C++ style comments to ISO C ones. + * [r2264] Changed C++ style comments to ISO C ones. -2006-01-09 12:17 strk +2006-01-09 12:17 Sandro Santilli <strk@keybit.net> - * Added Solaris 2.7 and MingW support improvements item + * [r2263] Added Solaris 2.7 and MingW support improvements item -2006-01-09 11:48 strk +2006-01-09 11:48 Sandro Santilli <strk@keybit.net> - * Fixed "strict-aliasing rule" breaks. + * [r2262] Fixed "strict-aliasing rule" breaks. -2006-01-09 11:43 strk +2006-01-09 11:43 Sandro Santilli <strk@keybit.net> - * Found another (faster) way to avoid breaking "strict-aliasing - rules" + * [r2261] Found another (faster) way to avoid breaking + "strict-aliasing rules" -2006-01-09 11:05 strk +2006-01-09 11:05 Sandro Santilli <strk@keybit.net> - * Removed POINT4D=>POINT2D cast raising GCC warning + * [r2260] Removed POINT4D=>POINT2D cast raising GCC warning -2006-01-09 10:56 strk +2006-01-09 10:56 Sandro Santilli <strk@keybit.net> - * Changed "! test" to "test !" and "-e" to "-f" for Solaris + * [r2259] Changed "! test" to "test !" and "-e" to "-f" for Solaris compatibility. -2006-01-09 10:42 strk +2006-01-09 10:42 Sandro Santilli <strk@keybit.net> - * Changed all C++ style comments to ISO C ones. + * [r2258] Changed all C++ style comments to ISO C ones. -2006-01-08 15:02 strk +2006-01-08 15:02 Sandro Santilli <strk@keybit.net> - * Added lwpostgis_upgrade.sql + * [r2257] Added lwpostgis_upgrade.sql -2006-01-07 10:18 strk +2006-01-07 10:18 Sandro Santilli <strk@keybit.net> - * Changed $PWD uses with `pwd` (required for Solaris 2.7) + * [r2256] Changed $PWD uses with `pwd` (required for Solaris 2.7) -2006-01-05 15:01 strk +2006-01-05 15:01 Sandro Santilli <strk@keybit.net> - * More portable (hopefully) use of quotes and backticks + * [r2255] More portable (hopefully) use of quotes and backticks -2006-01-05 00:26 chodgson +2006-01-05 00:26 Chris Hodgson <chodgson@refractions.net> - * rollback to contain cast + * [r2254] rollback to contain cast -2006-01-05 00:19 chodgson +2006-01-05 00:19 Chris Hodgson <chodgson@refractions.net> - * 1.12 with changes from 1.11 integrated + * [r2253] 1.12 with changes from 1.11 integrated -2006-01-05 00:07 chodgson +2006-01-05 00:07 Chris Hodgson <chodgson@refractions.net> - * Recommitted with changes from 1_34 integrated + * [r2252] Recommitted with changes from 1_34 integrated -2006-01-04 21:37 chodgson +2006-01-04 21:37 Chris Hodgson <chodgson@refractions.net> - * Added function optimistic_overlap in order to support + * [r2251] Added function optimistic_overlap in order to support TerrainServer. Note that optimistic_overlap existed in postgis prior to 1.0 but was removed. The included version is a hack to work with the newer lwgeom structs -2006-01-04 21:21 chodgson +2006-01-04 21:21 Chris Hodgson <chodgson@refractions.net> - * Modified lwgeom2 = ... line in LWGEOMFromWKB function; removed - the (uchar *) cast + * [r2250] Modified lwgeom2 = ... line in LWGEOMFromWKB function; + removed the (uchar *) cast -2006-01-04 21:16 chodgson +2006-01-04 21:16 Chris Hodgson <chodgson@refractions.net> - * Added the CHIP_send function which enables Postgres 8.0 to send a - binary CHIP + * [r2249] Added the CHIP_send function which enables Postgres 8.0 + to send a binary CHIP -2006-01-01 02:30 strk +2006-01-01 02:30 Sandro Santilli <strk@keybit.net> - * Added missing include for definition of unparse_WKB() + * [r2248] Added missing include for definition of unparse_WKB() -2006-01-01 02:19 strk +2006-01-01 02:19 Sandro Santilli <strk@keybit.net> - * Dropped unused box2df_to_box() and box_to_box2df() functions. - Added box_to_box2df_p() function to complement exiting + * [r2247] Dropped unused box2df_to_box() and box_to_box2df() + functions. Added box_to_box2df_p() function to complement exiting box2df_to_box_p(). -2005-12-31 15:11 strk +2005-12-31 15:11 Sandro Santilli <strk@keybit.net> - * Fixed reference to PostgreSQL "contrib" directory (no more - required) + * [r2246] Fixed reference to PostgreSQL "contrib" directory (no + more required) -2005-12-31 14:57 strk +2005-12-31 14:57 Sandro Santilli <strk@keybit.net> - * Fixed "possibly uninitialized" warning in box2df_to_box3d + * [r2245] Fixed "possibly uninitialized" warning in box2df_to_box3d -2005-12-30 18:14 strk +2005-12-30 18:14 Sandro Santilli <strk@keybit.net> - * Fixed all signedness warnings + * [r2244] Fixed all signedness warnings -2005-12-30 17:40 strk +2005-12-30 17:40 Sandro Santilli <strk@keybit.net> - * Moved PG_LWGEOM WKB I/O and SRID get/set funx + * [r2243] Moved PG_LWGEOM WKB I/O and SRID get/set funx from lwgeom_api.c to lwgeom_pg.c. Made lwgeom_from_ewkb directly invoke grammar parser rather then invoke @@ -10682,144 +30640,146 @@ 2005-12-28 18:43 devrim - * Removed unused patch + * [r2242] Removed unused patch 2005-12-28 18:40 devrim - * Lots of fixes for 1.1 + * [r2241] Lots of fixes for 1.1 -2005-12-21 18:45 strk +2005-12-21 18:45 Sandro Santilli <strk@keybit.net> - * Removed awk usage, --with-template is detected during the single + * [r2239] Removed awk usage, --with-template is detected during the + single pg_config --configure scan -2005-12-21 13:18 strk +2005-12-21 13:18 Sandro Santilli <strk@keybit.net> - * Changed $() constructs to "``" ones, for portability + * [r2238] Changed $() constructs to "``" ones, for portability -2005-12-21 12:12 strk +2005-12-21 12:12 Sandro Santilli <strk@keybit.net> - * Raised a warning on pj_errno==-38 (a nodatum transform is + * [r2237] Raised a warning on pj_errno==-38 (a nodatum transform is attempted before giving up) -2005-12-20 09:17 strk +2005-12-20 09:17 Sandro Santilli <strk@keybit.net> - * Used more portable sed syntax, submitted by Michael Fuhr. + * [r2236] Used more portable sed syntax, submitted by Michael Fuhr. -2005-12-20 09:06 strk +2005-12-20 09:06 Sandro Santilli <strk@keybit.net> - * Fixed inconsistency between docs install/uninstall paths + * [r2235] Fixed inconsistency between docs install/uninstall paths -2005-12-19 20:33 strk +2005-12-19 20:33 Sandro Santilli <strk@keybit.net> - * Fixed eprefix (bindir) use + * [r2234] Fixed eprefix (bindir) use -2005-12-19 20:23 strk +2005-12-19 20:23 Sandro Santilli <strk@keybit.net> - * Dropped `liblwgeom' dependency from 'test' rule + * [r2233] Dropped `liblwgeom' dependency from 'test' rule -2005-12-19 15:07 strk +2005-12-19 15:07 Sandro Santilli <strk@keybit.net> - * Allowed for overriding of --datadir. + * [r2232] Allowed for overriding of --datadir. reworked pg_config --configure parsing to make a single scan. Fixed mishanlding of --prefix -2005-12-19 12:26 strk +2005-12-19 12:26 Sandro Santilli <strk@keybit.net> - * make regress => make test + * [r2231] make regress => make test -2005-12-19 10:39 strk +2005-12-19 10:39 Sandro Santilli <strk@keybit.net> - * used a consistent construct for out_and_err redirect, + * [r2230] used a consistent construct for out_and_err redirect, added rule to make [eE][-+]0+[0-9]+ become e[-+][1-9]+ -2005-12-19 10:17 strk +2005-12-19 10:17 Sandro Santilli <strk@keybit.net> - * Applied patch for MingW support (buffering and INF representation - problems) + * [r2229] Applied patch for MingW support (buffering and INF + representation problems) -2005-12-19 09:43 strk +2005-12-19 09:43 Sandro Santilli <strk@keybit.net> - * Fixed uninstall rule for scripts + * [r2228] Fixed uninstall rule for scripts -2005-12-16 16:53 strk +2005-12-16 16:53 Sandro Santilli <strk@keybit.net> - * fixed iconv check + * [r2227] fixed iconv check -2005-12-16 16:47 strk +2005-12-16 16:47 Sandro Santilli <strk@keybit.net> - * Added support for mixed libiconv/iconv + * [r2226] Added support for mixed libiconv/iconv -2005-12-16 15:07 strk +2005-12-16 15:07 Sandro Santilli <strk@keybit.net> - * Added make_dist.sh argument. + * [r2225] Added make_dist.sh argument. -2005-12-16 11:55 strk +2005-12-16 11:55 Sandro Santilli <strk@keybit.net> - * Almost done with closure + * [r2224] Almost done with closure -2005-12-16 11:53 strk +2005-12-16 11:53 Sandro Santilli <strk@keybit.net> - * Added Carl Anderson to release-specifi credits section (forgot, - who know how many else) + * [r2223] Added Carl Anderson to release-specifi credits section + (forgot, who know how many else) -2005-12-16 11:14 strk +2005-12-16 11:14 Sandro Santilli <strk@keybit.net> - * Edited release notes in manual, set release date to 2005/12/21 + * [r2222] Edited release notes in manual, set release date to + 2005/12/21 (if everything goes file) 2005-12-16 10:06 mschaber - * small README improvements + * [r2221] small README improvements -2005-12-16 09:36 strk +2005-12-16 09:36 Sandro Santilli <strk@keybit.net> - * Added installed procs version when proc upgrade needed + * [r2220] Added installed procs version when proc upgrade needed -2005-12-16 09:32 strk +2005-12-16 09:32 Sandro Santilli <strk@keybit.net> - * Added release procedure and Versioning rationale. + * [r2219] Added release procedure and Versioning rationale. -2005-12-16 08:59 strk +2005-12-16 08:59 Sandro Santilli <strk@keybit.net> - * lwpostgis_upgrade.sql installed by install and removed by + * [r2218] lwpostgis_upgrade.sql installed by install and removed by uninstall, fixed path info for lwpostgis.sql install. Stripped CVS from version strings and added note about SO/REL versions being the same. -2005-12-16 08:56 strk +2005-12-16 08:56 Sandro Santilli <strk@keybit.net> - * Added required typinfo include + * [r2217] Added required typinfo include -2005-12-16 08:38 strk +2005-12-16 08:38 Sandro Santilli <strk@keybit.net> - * Simplified top warning about upgradability of changes. + * [r2216] Simplified top warning about upgradability of changes. -2005-12-16 08:37 strk +2005-12-16 08:37 Sandro Santilli <strk@keybit.net> - * Added dependency of postgis_proc_upgrade.pl in + * [r2215] Added dependency of postgis_proc_upgrade.pl in lwpostgis_upgrade.sql rule -2005-12-16 08:33 strk +2005-12-16 08:33 Sandro Santilli <strk@keybit.net> - * Fixed version checker to only use Major to compare + * [r2214] Fixed version checker to only use Major to compare -2005-12-16 02:08 strk +2005-12-16 02:08 Sandro Santilli <strk@keybit.net> - * Reverted use of $(shlib_major) to $(shlib). + * [r2213] Reverted use of $(shlib_major) to $(shlib). Since lwpostgis_upgrade.sql is always enough to rebind, and also required... -2005-12-16 01:48 strk +2005-12-16 01:48 Sandro Santilli <strk@keybit.net> - * Added comment about the use of postgis_lib_version in version - checker + * [r2212] Added comment about the use of postgis_lib_version in + version checker (last commit log was incomplete) -2005-12-16 01:41 strk +2005-12-16 01:41 Sandro Santilli <strk@keybit.net> - * Unified SCRIPTS, LIB and RELEASE versions for the sake of + * [r2211] Unified SCRIPTS, LIB and RELEASE versions for the sake of simplicity. postgis_scripts_released() will return the same as postgis_lib_version() @@ -10827,130 +30787,134 @@ written in the database at the time of lwpostgis.sql sourcing. -2005-12-16 01:35 strk +2005-12-16 01:35 Sandro Santilli <strk@keybit.net> - * Added notes `bout postgis_scripts_released(), + * [r2210] Added notes `bout postgis_scripts_released(), postgis_scripts_installed() and postgis_version(). Copied soft upgrade description from README file - removed most references about DBPROC/RELPROC and the like. -2005-12-15 23:57 strk +2005-12-15 23:57 Sandro Santilli <strk@keybit.net> - * perl availability check by ./configure (sorry, you'll need it - from now on) + * [r2209] perl availability check by ./configure (sorry, you'll + need it from now on) -2005-12-15 23:52 strk +2005-12-15 23:52 Sandro Santilli <strk@keybit.net> - * Added note about jdbc/ drop and PgSQL source dependency relief + * [r2208] Added note about jdbc/ drop and PgSQL source dependency + relief -2005-12-15 23:49 strk +2005-12-15 23:49 Sandro Santilli <strk@keybit.net> - * Removed obsoleted code + * [r2207] Removed obsoleted code -2005-12-15 23:46 pramsey +2005-12-15 23:46 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove qandasetdiv tags and fix numbering... + * [r2206] Remove qandasetdiv tags and fix numbering... -2005-12-15 23:28 strk +2005-12-15 23:28 Sandro Santilli <strk@keybit.net> - * - Made postgis_version() a C function w/out changing output. + * [r2205] - Made postgis_version() a C function w/out changing + output. - Moved postgis centroid() version (neither GEOS nor JTS) from lwgeom_functions_basic.c to lwgeom_nojts.c (fails far less times with "redefinition of centroid" errors.) - Made lwpostgis_upgrade.sql build by default (must add a check for perl availability in ./configure.in) -2005-12-15 23:17 pramsey +2005-12-15 23:17 Paul Ramsey <pramsey@cleverelephant.ca> - * Wording changes here and there. + * [r2204] Wording changes here and there. -2005-12-15 22:50 strk +2005-12-15 22:50 Sandro Santilli <strk@keybit.net> - * Updated Upgrading section + * [r2203] Updated Upgrading section -2005-12-15 19:11 strk +2005-12-15 19:11 Sandro Santilli <strk@keybit.net> - * back to single full package + * [r2202] back to single full package -2005-12-15 18:34 strk +2005-12-15 18:34 Sandro Santilli <strk@keybit.net> - * Switched HARD/SOFT upgrade and removed HACK upgrade sections. + * [r2201] Switched HARD/SOFT upgrade and removed HACK upgrade + sections. -2005-12-15 18:30 strk +2005-12-15 18:30 Sandro Santilli <strk@keybit.net> - * Added item for 1.1 closure + * [r2200] Added item for 1.1 closure -2005-12-15 15:18 strk +2005-12-15 15:18 Sandro Santilli <strk@keybit.net> - * Added things to do for 1.1.0 closeup + * [r2199] Added things to do for 1.1.0 closeup -2005-12-15 09:28 strk +2005-12-15 09:28 Sandro Santilli <strk@keybit.net> - * Infinite->Infinity + * [r2198] Infinite->Infinity -2005-12-15 01:27 strk +2005-12-15 01:27 Sandro Santilli <strk@keybit.net> - * Added PROJ version in output - would change the whole thing to - postgis_full_version() if it only fit into 80 cols + * [r2197] Added PROJ version in output - would change the whole + thing to postgis_full_version() if it only fit into 80 cols -2005-12-15 01:21 strk +2005-12-15 01:21 Sandro Santilli <strk@keybit.net> - * Made PROJ test be run only if USE_PROJ=1 + * [r2196] Made PROJ test be run only if USE_PROJ=1 -2005-12-15 01:19 strk +2005-12-15 01:19 Sandro Santilli <strk@keybit.net> - * Moved GEOS/JTS function from regress to ogc test + * [r2195] Moved GEOS/JTS function from regress to ogc test -2005-12-15 01:07 strk +2005-12-15 01:07 Sandro Santilli <strk@keybit.net> - * Removed call to replace(text,text,text) in regress.sql + * [r2194] Removed call to replace(text,text,text) in regress.sql (unsupported by pgsql 7.2) Used sed in run_test to Transform Infinite to inf and Inf to inf -2005-12-15 00:49 strk +2005-12-15 00:49 Sandro Santilli <strk@keybit.net> - * Splitted SCRIPTS_VERSION in MAJOR,MINOR,MICRO + * [r2193] Splitted SCRIPTS_VERSION in MAJOR,MINOR,MICRO -2005-12-15 00:47 strk +2005-12-15 00:47 Sandro Santilli <strk@keybit.net> - * 'IMMUTABLE STRICT' -> '_IMMUTABLE_STRICT' fix for new polygon - ctors + * [r2192] 'IMMUTABLE STRICT' -> '_IMMUTABLE_STRICT' fix for new + polygon ctors -2005-12-15 00:28 strk +2005-12-15 00:28 Sandro Santilli <strk@keybit.net> - * typo fixed + * [r2191] typo fixed -2005-12-14 18:56 strk +2005-12-14 18:56 Sandro Santilli <strk@keybit.net> - * Removed rectangle-level locking (DONE) + * [r2190] Removed rectangle-level locking (DONE) -2005-12-14 18:45 strk +2005-12-14 18:45 Sandro Santilli <strk@keybit.net> - * Dropped 1.1.0 specific section - all pending items dumped to - 'other random items' + * [r2189] Dropped 1.1.0 specific section - all pending items dumped + to 'other random items' -2005-12-14 18:44 strk +2005-12-14 18:44 Sandro Santilli <strk@keybit.net> - * Typo fixed (dumber->dumper) - was tempted to keep it ;) + * [r2188] Typo fixed (dumber->dumper) - was tempted to keep it ;) -2005-12-14 18:34 strk +2005-12-14 18:34 Sandro Santilli <strk@keybit.net> - * Reintroduced revised INSTALLATION, UPGRADE, USAGE. + * [r2187] Reintroduced revised INSTALLATION, UPGRADE, USAGE. Added REQUIREMENTS, CONFIGURATION and TESTING. UPGRADE still requires some cleanup (IMHO). -2005-12-14 15:40 strk +2005-12-14 15:40 Sandro Santilli <strk@keybit.net> - * Removed most info, added reference to PostGIS manual instead + * [r2186] Removed most info, added reference to PostGIS manual + instead -2005-12-14 15:29 strk +2005-12-14 15:29 Sandro Santilli <strk@keybit.net> - * Removed postgis_geos_version.h - should be under lwgeom/ + * [r2185] Removed postgis_geos_version.h - should be under lwgeom/ -2005-12-14 15:23 strk +2005-12-14 15:23 Sandro Santilli <strk@keybit.net> - * - Create two packages: + * [r2184] - Create two packages: postgis-$$.tar.gz and postgis-regress-$$.tar.gz - New syntax: @@ -10959,90 +30923,91 @@ -- postgis-1.1.0.tar.gz postgis-regress-1.1.0.tar.gz sh make_dist.sh 1.1.0 -2005-12-14 14:14 strk +2005-12-14 14:14 Sandro Santilli <strk@keybit.net> - * Removed obsoleted --param shade.verbatim param from xsltproc - call, + * [r2183] Removed obsoleted --param shade.verbatim param from + xsltproc call, moved common flags on top file. -2005-12-14 13:43 strk +2005-12-14 13:43 Sandro Santilli <strk@keybit.net> - * fixed closing tag mismatch + * [r2182] fixed closing tag mismatch -2005-12-14 13:42 strk +2005-12-14 13:42 Sandro Santilli <strk@keybit.net> - * Added release version in abstract, updated INSTALL section to - reflect autoconf-based layout + * [r2181] Added release version in abstract, updated INSTALL + section to reflect autoconf-based layout -2005-12-14 12:24 strk +2005-12-14 12:24 Sandro Santilli <strk@keybit.net> - * Nicely handled missing requirements for docs build + * [r2180] Nicely handled missing requirements for docs build -2005-12-14 11:13 strk +2005-12-14 11:13 Sandro Santilli <strk@keybit.net> - * Snapped buffer() output to a grid of 1.0E-14 grid to account for - slightly + * [r2179] Snapped buffer() output to a grid of 1.0E-14 grid to + account for slightly different floating number behaviours on Solaris. Normalized Infinity to inf to account for different libc outputs. -2005-12-14 00:26 strk +2005-12-14 00:26 Sandro Santilli <strk@keybit.net> - * Regression tests output made much more concise + * [r2178] Regression tests output made much more concise -2005-12-13 23:25 strk +2005-12-13 23:25 Sandro Santilli <strk@keybit.net> - * removed unused variable + * [r2177] removed unused variable -2005-12-13 22:04 strk +2005-12-13 22:04 Sandro Santilli <strk@keybit.net> - * Added GEOS/JTS version info when available + * [r2176] Added GEOS/JTS version info when available -2005-12-13 21:16 strk +2005-12-13 21:16 Sandro Santilli <strk@keybit.net> - * Fixed a misnamed test + * [r2175] Fixed a misnamed test -2005-12-13 19:01 strk +2005-12-13 19:01 Sandro Santilli <strk@keybit.net> - * Renamed ReplacePoint() to SetPoint() + * [r2174] Renamed ReplacePoint() to SetPoint() -2005-12-13 18:39 strk +2005-12-13 18:39 Sandro Santilli <strk@keybit.net> - * Added RemovePoint() and ReplacePoint() to complete Geometry - editiong function. + * [r2173] Added RemovePoint() and ReplacePoint() to complete + Geometry editiong function. Added regress tests for them. -2005-12-13 18:19 strk +2005-12-13 18:19 Sandro Santilli <strk@keybit.net> - * Fixed bug in lwgeom_as_anytype cast funcions + * [r2172] Fixed bug in lwgeom_as_anytype cast funcions -2005-12-13 14:19 strk +2005-12-13 14:19 Sandro Santilli <strk@keybit.net> - * LRS section repopulated + * [r2170] LRS section repopulated -2005-12-13 12:51 strk +2005-12-13 12:51 Sandro Santilli <strk@keybit.net> - * Moved out of LRS section: line_locate_point back (to Misc), + * [r2169] Moved out of LRS section: line_locate_point back (to + Misc), line_substring and line_interpolate_point (to Geometry constructors). Added more cross-references. -2005-12-13 12:12 strk +2005-12-13 12:12 Sandro Santilli <strk@keybit.net> - * updated + * [r2168] updated -2005-12-12 20:41 strk +2005-12-12 20:41 Sandro Santilli <strk@keybit.net> - * Handled common invokation mistake (accept trailing .sql in test - names) + * [r2167] Handled common invokation mistake (accept trailing .sql + in test names) -2005-12-12 20:31 strk +2005-12-12 20:31 Sandro Santilli <strk@keybit.net> - * Changed math statements to be compatible with solaris shell, - fixed typo + * [r2166] Changed math statements to be compatible with solaris + shell, fixed typo -2005-12-12 17:40 strk +2005-12-12 17:40 Sandro Santilli <strk@keybit.net> - * - Fixed Z presence detection in GEOS funcions (C++ and C + * [r2165] - Fixed Z presence detection in GEOS funcions (C++ and C wrappers). - NEW BuildArea(any_geometry) function - NEW OGC BdPolyFromText(linestring_wkt, srid) function @@ -11052,546 +31017,564 @@ - Reworked regress test runner to be more succint and report a summary of test results -2005-12-12 11:35 strk +2005-12-12 11:35 Sandro Santilli <strk@keybit.net> - * Avoided detect_geos_version rule when using the GEOS C-API + * [r2164] Avoided detect_geos_version rule when using the GEOS + C-API -2005-12-12 11:33 strk +2005-12-12 11:33 Sandro Santilli <strk@keybit.net> - * Wrapped grid_print declaration and definition in VERBOSE block, - to avoid compiler warning about it being unused + * [r2163] Wrapped grid_print declaration and definition in VERBOSE + block, to avoid compiler warning about it being unused -2005-12-10 15:46 strk +2005-12-10 15:46 Sandro Santilli <strk@keybit.net> - * Fixed error message typo + * [r2161] Fixed error message typo -2005-12-09 20:43 pramsey +2005-12-09 20:43 Paul Ramsey <pramsey@cleverelephant.ca> - * Added credits for GEOS and Proj4. + * [r2160] Added credits for GEOS and Proj4. -2005-12-09 15:14 strk +2005-12-09 15:14 Sandro Santilli <strk@keybit.net> - * Organized Change log for 1.1.0 + * [r2158] Organized Change log for 1.1.0 -2005-12-09 12:02 strk +2005-12-09 12:02 Sandro Santilli <strk@keybit.net> - * Added Charlie Savage in credits + * [r2157] Added Charlie Savage in credits -2005-12-09 12:00 strk +2005-12-09 12:00 Sandro Santilli <strk@keybit.net> - * Plugged memory leaks in Polygonize(). + * [r2155] Plugged memory leaks in Polygonize(). -2005-12-09 10:14 strk +2005-12-09 10:14 Sandro Santilli <strk@keybit.net> - * Added a couple of polygonize tests + * [r2153] Added a couple of polygonize tests -2005-12-07 12:22 strk +2005-12-07 12:22 Sandro Santilli <strk@keybit.net> - * Fixed handling of CAST for 8.0.0 restore. + * [r2151] Fixed handling of CAST for 8.0.0 restore. Type name canonicalization function defined separately. -2005-12-07 09:05 strk +2005-12-07 09:05 Sandro Santilli <strk@keybit.net> - * Added note about OID column drop in pre 8.1 to 8.1+ upgrades + * [r2150] Added note about OID column drop in pre 8.1 to 8.1+ + upgrades 2005-12-06 15:42 devrim - * Label the spec file as 1.1.0 + * [r2148] Label the spec file as 1.1.0 -2005-12-06 15:37 strk +2005-12-06 15:37 Sandro Santilli <strk@keybit.net> - * Updated SnapToGrid documentation + * [r2147] Updated SnapToGrid documentation 2005-12-06 15:26 devrim - * Update to 1.0.6 + * [r2146] Update to 1.0.6 -2005-12-06 15:09 strk +2005-12-06 15:09 Sandro Santilli <strk@keybit.net> - * Updated after release 1.0.6 + * [r2145] Updated after release 1.0.6 -2005-12-06 14:56 strk +2005-12-06 14:56 Sandro Santilli <strk@keybit.net> - * Added check for successfully postgis installation before running - tests + * [r2142] Added check for successfully postgis installation before + running tests -2005-12-06 14:51 strk +2005-12-06 14:51 Sandro Santilli <strk@keybit.net> - * Added user-reported intersects() test + * [r2141] Added user-reported intersects() test -2005-12-02 15:11 strk +2005-12-02 15:11 Sandro Santilli <strk@keybit.net> - * Had regress_ogc test skipped if no GEOS nor JTS support is - compiled in + * [r2139] Had regress_ogc test skipped if no GEOS nor JTS support + is compiled in -2005-12-02 14:56 strk +2005-12-02 14:56 Sandro Santilli <strk@keybit.net> - * Added missing rules + * [r2138] Added missing rules -2005-12-02 14:52 strk +2005-12-02 14:52 Sandro Santilli <strk@keybit.net> - * Copied PostgreSQL top-level Makefile for use by systems in which - make != gmake + * [r2137] Copied PostgreSQL top-level Makefile for use by systems + in which make != gmake -2005-12-02 14:35 strk +2005-12-02 14:35 Sandro Santilli <strk@keybit.net> - * Fixed support for PGSQL version 7.2 and 7.3 + * [r2136] Fixed support for PGSQL version 7.2 and 7.3 -2005-12-02 14:15 strk +2005-12-02 14:15 Sandro Santilli <strk@keybit.net> - * Fixed SnapToGrid output expectance (higher dims no more + * [r2135] Fixed SnapToGrid output expectance (higher dims no more discarded) -2005-12-02 13:21 strk +2005-12-02 13:21 Sandro Santilli <strk@keybit.net> - * Added note about new SnapToGrid function + * [r2134] Added note about new SnapToGrid function -2005-12-02 13:16 strk +2005-12-02 13:16 Sandro Santilli <strk@keybit.net> - * Added SnapToGrid(geom, point_offset, xsz, ysz, zsz, msz) + * [r2133] Added SnapToGrid(geom, point_offset, xsz, ysz, zsz, msz) -2005-12-02 10:46 strk +2005-12-02 10:46 Sandro Santilli <strk@keybit.net> - * Added LWGEOM_snaptogrid_pointoff and gridspec utility funx + * [r2132] Added LWGEOM_snaptogrid_pointoff and gridspec utility + funx -2005-12-02 09:12 strk +2005-12-02 09:12 Sandro Santilli <strk@keybit.net> - * Added note about SnapToGrid bbox computation + * [r2131] Added note about SnapToGrid bbox computation -2005-12-02 09:07 strk +2005-12-02 09:07 Sandro Santilli <strk@keybit.net> - * Fixed output box2d computation in SnapToGrid (was working with - float, + * [r2129] Fixed output box2d computation in SnapToGrid (was working + with float, changed to work with doubles and call appropriate box3d->box2d converter). -2005-12-02 09:06 strk +2005-12-02 09:06 Sandro Santilli <strk@keybit.net> - * Added PARANOIA_LEVEL checks in box3d<->box2d converters + * [r2128] Added PARANOIA_LEVEL checks in box3d<->box2d converters -2005-12-02 08:26 strk +2005-12-02 08:26 Sandro Santilli <strk@keybit.net> - * Quoted grep pattern (Solaris' shell threats carets as pipes). + * [r2127] Quoted grep pattern (Solaris' shell threats carets as + pipes). Added a sleep 1 before dropping DB (to avoid "database being accessed" errors). -2005-12-01 22:29 strk +2005-12-01 22:29 Sandro Santilli <strk@keybit.net> - * Changed back 'tests' to 'test' + * [r2126] Changed back 'tests' to 'test' -2005-12-01 19:25 strk +2005-12-01 19:25 Sandro Santilli <strk@keybit.net> - * Added note about SnapToGrid and higher dims + * [r2125] Added note about SnapToGrid and higher dims -2005-12-01 19:09 strk +2005-12-01 19:09 Sandro Santilli <strk@keybit.net> - * Exported DYNPTARRAY struct and accessor funx (from _lrs.c). + * [r2124] Exported DYNPTARRAY struct and accessor funx (from + _lrs.c). Rewritten ptarray_grid() to allow snapping of all dimensions and never discard input ordinates. -2005-12-01 17:14 strk +2005-12-01 17:14 Sandro Santilli <strk@keybit.net> - * Fixed missing LineMerge symbol when built against geos-1.0 + * [r2123] Fixed missing LineMerge symbol when built against + geos-1.0 -2005-12-01 16:21 strk +2005-12-01 16:21 Sandro Santilli <strk@keybit.net> - * Added SRID mismatch checks in GEOS and JTS wrappers + * [r2122] Added SRID mismatch checks in GEOS and JTS wrappers -2005-12-01 16:19 strk +2005-12-01 16:19 Sandro Santilli <strk@keybit.net> - * Updated comment about GEOS C-API (starts with 2.2.x) + * [r2121] Updated comment about GEOS C-API (starts with 2.2.x) -2005-12-01 15:53 strk +2005-12-01 15:53 Sandro Santilli <strk@keybit.net> - * Renamed clean: to cleanup:, provided empty clean: to make things - work + * [r2118] Renamed clean: to cleanup:, provided empty clean: to make + things work from toplevel makefile. -2005-12-01 15:50 strk +2005-12-01 15:50 Sandro Santilli <strk@keybit.net> - * Fixed handling of bogus geos-1.0 + * [r2117] Fixed handling of bogus geos-1.0 -2005-12-01 14:07 strk +2005-12-01 14:07 Sandro Santilli <strk@keybit.net> - * Skipped checks of SQL command outputs + * [r2116] Skipped checks of SQL command outputs (INSERT,UPDATE,CREATE,DROP). Cleaned up postgis_reg after tests run. -2005-12-01 13:53 strk +2005-12-01 13:53 Sandro Santilli <strk@keybit.net> - * Fixed lwgeom_segmentize2d() to always return a clone + * [r2115] Fixed lwgeom_segmentize2d() to always return a clone -2005-12-01 13:49 strk +2005-12-01 13:49 Sandro Santilli <strk@keybit.net> - * Fixed short-allocation in lwcollection_clone() + * [r2113] Fixed short-allocation in lwcollection_clone() -2005-12-01 13:37 strk +2005-12-01 13:37 Sandro Santilli <strk@keybit.net> - * Fixed test to cleanup after run + * [r2111] Fixed test to cleanup after run -2005-11-30 21:02 strk +2005-11-30 21:02 Sandro Santilli <strk@keybit.net> - * Added missing proj tests + * [r2109] Added missing proj tests -2005-11-30 18:24 strk +2005-11-30 18:24 Sandro Santilli <strk@keybit.net> - * Fixed segfault on addPoint() with invalid offset + * [r2108] Fixed segfault on addPoint() with invalid offset -2005-11-30 18:24 strk +2005-11-30 18:24 Sandro Santilli <strk@keybit.net> - * Fixed error message on non-readable expected file + * [r2107] Fixed error message on non-readable expected file -2005-11-30 17:04 strk +2005-11-30 17:04 Sandro Santilli <strk@keybit.net> - * Added Alex Mayrhofer to list of contributors + * [r2105] Added Alex Mayrhofer to list of contributors -2005-11-30 16:59 strk +2005-11-30 16:59 Sandro Santilli <strk@keybit.net> - * Moved 8.2 support to 1.0.6 section + * [r2103] Moved 8.2 support to 1.0.6 section -2005-11-30 16:57 strk +2005-11-30 16:57 Sandro Santilli <strk@keybit.net> - * Added proj tests, curtesy of Alex Mayrhofer + * [r2101] Added proj tests, curtesy of Alex Mayrhofer -2005-11-29 22:40 strk +2005-11-29 22:40 Sandro Santilli <strk@keybit.net> - * CAPI usage triggered starting at geos-2.2 + * [r2099] CAPI usage triggered starting at geos-2.2 -2005-11-29 10:05 strk +2005-11-29 10:05 Sandro Santilli <strk@keybit.net> - * Added locate_among_measure() and locate_between_measures() dox. + * [r2096] Added locate_among_measure() and + locate_between_measures() dox. Updated CHANGES adding new LRS funx and new transform() code. -2005-11-29 09:00 strk +2005-11-29 09:00 Sandro Santilli <strk@keybit.net> - * Updated documentation for X,Y,M and Z + * [r2095] Updated documentation for X,Y,M and Z -2005-11-28 16:01 strk +2005-11-28 16:01 Sandro Santilli <strk@keybit.net> - * Fixed a segfault on geom_accum(NULL, NULL) condition + * [r2094] Fixed a segfault on geom_accum(NULL, NULL) condition -2005-11-28 15:59 strk +2005-11-28 15:59 Sandro Santilli <strk@keybit.net> - * Added geom_accum(NULL,NULL) test + * [r2091] Added geom_accum(NULL,NULL) test -2005-11-28 15:06 strk +2005-11-28 15:06 Sandro Santilli <strk@keybit.net> - * Estrapolated SERIALIZED_FORM doc from liblwgeom.h and put it into + * [r2090] Estrapolated SERIALIZED_FORM doc from liblwgeom.h and put + it into SERIALIZED_FORM file. Cleaned up header files so to avoid C++ style comments and -pedantic errors. (more to come on this front) -2005-11-28 11:49 strk +2005-11-28 11:49 Sandro Santilli <strk@keybit.net> - * Added bbox cache handling fix in 1.0.6 + * [r2088] Added bbox cache handling fix in 1.0.6 -2005-11-28 11:48 strk +2005-11-28 11:48 Sandro Santilli <strk@keybit.net> - * minor cleanups and comments + * [r2087] minor cleanups and comments -2005-11-28 11:31 strk +2005-11-28 11:31 Sandro Santilli <strk@keybit.net> - * memory release in force_collection + * [r2085] memory release in force_collection -2005-11-28 11:27 strk +2005-11-28 11:27 Sandro Santilli <strk@keybit.net> - * Added force_collection test + * [r2083] Added force_collection test -2005-11-28 11:20 strk +2005-11-28 11:20 Sandro Santilli <strk@keybit.net> - * Fixed ExteriorRing() and Segmentize() handling of bbox cache + * [r2081] Fixed ExteriorRing() and Segmentize() handling of bbox + cache -2005-11-28 11:04 strk +2005-11-28 11:04 Sandro Santilli <strk@keybit.net> - * Added ExteriorRing and Segmentize tests + * [r2079] Added ExteriorRing and Segmentize tests 2005-11-25 17:22 mschaber - * java2d and doc improvements + * [r2077] java2d and doc improvements -2005-11-25 16:14 strk +2005-11-25 16:14 Sandro Santilli <strk@keybit.net> - * Added support for PostgreSQL head, as suggested by Michael Fuhr. + * [r2076] Added support for PostgreSQL head, as suggested by + Michael Fuhr. Cleaned up includes. -2005-11-25 16:11 strk +2005-11-25 16:11 Sandro Santilli <strk@keybit.net> - * Wrapped PROJ4SRSCacheCheck function in ifdef + * [r2075] Wrapped PROJ4SRSCacheCheck function in ifdef MEMORY_CONTEXT_CHECKING block, to avoid compiler warning -2005-11-25 15:43 strk +2005-11-25 15:43 Sandro Santilli <strk@keybit.net> - * Added unite_garray() test + * [r2074] Added unite_garray() test -2005-11-25 15:43 strk +2005-11-25 15:43 Sandro Santilli <strk@keybit.net> - * Added database version info + * [r2073] Added database version info -2005-11-25 15:34 strk +2005-11-25 15:34 Sandro Santilli <strk@keybit.net> - * Fixed expected ERROR and NOTICEs + * [r2072] Fixed expected ERROR and NOTICEs -2005-11-25 15:28 strk +2005-11-25 15:28 Sandro Santilli <strk@keybit.net> - * Fixed 0-size allocation in lwcollection deserializer + * [r2071] Fixed 0-size allocation in lwcollection deserializer (only matters when backend is compiled with --enable-cassert) -2005-11-25 14:14 strk +2005-11-25 14:14 Sandro Santilli <strk@keybit.net> - * Added postgis library version and builddate, to make sure the - existing database + * [r2069] Added postgis library version and builddate, to make sure + the existing database being used is equipped with the library we are willing to test. -2005-11-24 20:20 strk +2005-11-24 20:20 Sandro Santilli <strk@keybit.net> - * Added note about documentation updates requirement (will anyone - read it before 1.1.0 ? ;) + * [r2068] Added note about documentation updates requirement (will + anyone read it before 1.1.0 ? ;) -2005-11-24 20:18 strk +2005-11-24 20:18 Sandro Santilli <strk@keybit.net> - * Fixed sizeof(GEOSGeom) calls, minor debugging improvements. + * [r2067] Fixed sizeof(GEOSGeom) calls, minor debugging + improvements. -2005-11-24 20:11 strk +2005-11-24 20:11 Sandro Santilli <strk@keybit.net> - * Added -N and -g documentation + * [r2064] Added -N and -g documentation -2005-11-23 15:54 strk +2005-11-23 15:54 Sandro Santilli <strk@keybit.net> - * Changed X(), Y(), M() and Z() to raise an error if input + * [r2061] Changed X(), Y(), M() and Z() to raise an error if input is not strictly a point (must update documentation) -2005-11-23 15:30 strk +2005-11-23 15:30 Sandro Santilli <strk@keybit.net> - * Changed locate_between_measures() to return simpler types + * [r2060] Changed locate_between_measures() to return simpler types -2005-11-23 14:52 strk +2005-11-23 14:52 Sandro Santilli <strk@keybit.net> - * Changed M() and Z() to return NULL when input doesn't have + * [r2059] Changed M() and Z() to return NULL when input doesn't + have the requested dimension. Updated regress tests with a few of these cases. -2005-11-23 14:44 strk +2005-11-23 14:44 Sandro Santilli <strk@keybit.net> - * Added usage dox and check for required input files + * [r2058] Added usage dox and check for required input files -2005-11-23 14:38 strk +2005-11-23 14:38 Sandro Santilli <strk@keybit.net> - * Reworked regress tests to avoid multiple database creations + * [r2057] Reworked regress tests to avoid multiple database + creations -2005-11-23 13:48 strk +2005-11-23 13:48 Sandro Santilli <strk@keybit.net> - * fixed bug in points duplication check of dynptarray_addPoint4d + * [r2056] fixed bug in points duplication check of + dynptarray_addPoint4d -2005-11-23 13:46 strk +2005-11-23 13:46 Sandro Santilli <strk@keybit.net> - * Added a few regression tests for LRS functions + * [r2055] Added a few regression tests for LRS functions -2005-11-23 13:19 strk +2005-11-23 13:19 Sandro Santilli <strk@keybit.net> - * Initial implementation of locate_among_measure() and + * [r2054] Initial implementation of locate_among_measure() and locate_between_measures() -2005-11-22 21:29 strk +2005-11-22 21:29 Sandro Santilli <strk@keybit.net> - * Fixed a bug in getPoint{3dm,3dz,4d}_p() api calls automatically + * [r2053] Fixed a bug in getPoint{3dm,3dz,4d}_p() api calls + automatically fixing bugs in force_{3dm,3dz,4d}() user functions, for which tests have been added in regress dir. Wrapped paranoid checks in PARANOIA_LEVEL preprocessor blocks. Updated release notes and CHANGES file. -2005-11-22 19:59 strk +2005-11-22 19:59 Sandro Santilli <strk@keybit.net> - * Fixed debugging printf call + * [r2051] Fixed debugging printf call -2005-11-18 17:37 mcayland +2005-11-18 17:37 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Add fix for PG 8.1 calling the MemoryContext check method when - compiled as a debug build + * [r2049] Add fix for PG 8.1 calling the MemoryContext check method + when compiled as a debug build -2005-11-18 10:48 strk +2005-11-18 10:48 Sandro Santilli <strk@keybit.net> - * fixed double release of bbox cache memory + * [r2048] fixed double release of bbox cache memory -2005-11-18 10:16 strk +2005-11-18 10:16 Sandro Santilli <strk@keybit.net> - * Removed casts on lwalloc return. + * [r2047] Removed casts on lwalloc return. Used varlena macros when appropriate. -2005-11-17 23:35 mcayland +2005-11-17 23:35 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Removed duplicate debugging code used to reset the cache when it - was full + * [r2045] Removed duplicate debugging code used to reset the cache + when it was full -2005-11-17 23:25 mcayland +2005-11-17 23:25 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fixed assertion bug and an off-by-one palloc() in the new + * [r2044] Fixed assertion bug and an off-by-one palloc() in the new transform() code -2005-11-17 17:49 mcayland +2005-11-17 17:49 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Reimplement transform() using a cache that maintains SRS and - PROJ.4 library handles throughout each portal to speed up + * [r2043] Reimplement transform() using a cache that maintains SRS + and PROJ.4 library handles throughout each portal to speed up reprojections on large datasets 2005-11-16 13:04 mschaber - * small comment improvements in Point.java + * [r2042] small comment improvements in Point.java -2005-11-16 10:34 strk +2005-11-16 10:34 Sandro Santilli <strk@keybit.net> - * Added availability info of line_interpolate_point function + * [r2041] Added availability info of line_interpolate_point + function -2005-11-16 09:49 strk +2005-11-16 09:49 Sandro Santilli <strk@keybit.net> - * Updated 1.0.5 release documentation + * [r2040] Updated 1.0.5 release documentation -2005-11-14 10:05 strk +2005-11-14 10:05 Sandro Santilli <strk@keybit.net> - * Forced use of CAPI when building against GEOS 3.x.x or superior + * [r2038] Forced use of CAPI when building against GEOS 3.x.x or + superior -2005-11-14 09:01 strk +2005-11-14 09:01 Sandro Santilli <strk@keybit.net> - * Forced copy of BOX2D at deserialization time. + * [r2037] Forced copy of BOX2D at deserialization time. LWGEOM (sub)objects will always have their own copy, safely released by lwgeom_release(). This will remove memory alignment problems. -2005-11-11 18:04 strk +2005-11-11 18:04 Sandro Santilli <strk@keybit.net> - * updated + * [r2034] updated -2005-11-11 17:49 strk +2005-11-11 17:49 Sandro Santilli <strk@keybit.net> - * Updated + * [r2032] Updated -2005-11-11 17:45 strk +2005-11-11 17:45 Sandro Santilli <strk@keybit.net> - * Fixed memory alignment bug in base geometry type serializers, - added integrity check for geometry type flag and it's pointarrays - dimension mismatch + * [r2030] Fixed memory alignment bug in base geometry type + serializers, added integrity check for geometry type flag and + it's pointarrays dimension mismatch -2005-11-11 17:23 strk +2005-11-11 17:23 Sandro Santilli <strk@keybit.net> - * Fixed memory alignment issues in force_*d*_recursive + * [r2029] Fixed memory alignment issues in force_*d*_recursive -2005-11-11 17:03 strk +2005-11-11 17:03 Sandro Santilli <strk@keybit.net> - * Added some dimensionality changes tests + * [r2027] Added some dimensionality changes tests -2005-11-11 17:02 strk +2005-11-11 17:02 Sandro Santilli <strk@keybit.net> - * Added linemerge test + * [r2026] Added linemerge test -2005-11-11 10:49 strk +2005-11-11 10:49 Sandro Santilli <strk@keybit.net> - * Fixed short-initialization in getPoint4d_p + * [r2020] Fixed short-initialization in getPoint4d_p -2005-11-01 17:11 strk +2005-11-01 17:11 Sandro Santilli <strk@keybit.net> - * Ported ELF detection code from PostgreSQL. PostGIS builds on - freebsd > 2 out of the box now. + * [r2019] Ported ELF detection code from PostgreSQL. PostGIS builds + on freebsd > 2 out of the box now. -2005-11-01 11:56 strk +2005-11-01 11:56 Sandro Santilli <strk@keybit.net> - * Initial work on ST_AddEdgeNewFaces + * [r2018] Initial work on ST_AddEdgeNewFaces -2005-11-01 11:46 strk +2005-11-01 11:46 Sandro Santilli <strk@keybit.net> - * Removed calls to get_proj4_from_srid() from transform() to - require + * [r2016] Removed calls to get_proj4_from_srid() from transform() + to require a single scan of spatial_ref_sys for call rather then two. -2005-11-01 11:37 strk +2005-11-01 11:37 Sandro Santilli <strk@keybit.net> - * Fixed handling of --with-proj handling + * [r2015] Fixed handling of --with-proj handling -2005-11-01 10:29 strk +2005-11-01 10:29 Sandro Santilli <strk@keybit.net> - * updated + * [r2014] updated -2005-11-01 10:22 strk +2005-11-01 10:22 Sandro Santilli <strk@keybit.net> - * Changed major-minor version numbers extraction to be compatible - with postgresql 7.2.1 (relies on the fact that this information - will always be in the first 4 characters - single digit per - version) + * [r2011] Changed major-minor version numbers extraction to be + compatible with postgresql 7.2.1 (relies on the fact that this + information will always be in the first 4 characters - single + digit per version) -2005-11-01 09:25 strk +2005-11-01 09:25 Sandro Santilli <strk@keybit.net> - * Reworked NULL geometries handling code letting user specify - policy (insert,skip,abort). Insert is the default. + * [r2010] Reworked NULL geometries handling code letting user + specify policy (insert,skip,abort). Insert is the default. 2005-10-31 13:42 mschaber - * Document Bug in PGShapeGeometry + * [r2009] Document Bug in PGShapeGeometry 2005-10-28 13:48 mschaber - * Small winding rule fix and some comment improvements + * [r2008] Small winding rule fix and some comment improvements -2005-10-26 11:10 strk +2005-10-26 11:10 Sandro Santilli <strk@keybit.net> - * updated + * [r2006] updated -2005-10-26 11:07 strk +2005-10-26 11:07 Sandro Santilli <strk@keybit.net> - * Added optional second argument to specify schema in which postgis - functions are to be replaced + * [r2004] Added optional second argument to specify schema in which + postgis functions are to be replaced -2005-10-25 14:31 strk +2005-10-25 14:31 Sandro Santilli <strk@keybit.net> - * Added azimuth() and shift_longitude() functions + * [r2003] Added azimuth() and shift_longitude() functions -2005-10-25 14:31 strk +2005-10-25 14:31 Sandro Santilli <strk@keybit.net> - * Added documentation for azimuth() + * [r2002] Added documentation for azimuth() -2005-10-25 14:21 strk +2005-10-25 14:21 Sandro Santilli <strk@keybit.net> - * Added missing SRID check in azimuth() function + * [r2001] Added missing SRID check in azimuth() function -2005-10-25 14:15 strk +2005-10-25 14:15 Sandro Santilli <strk@keybit.net> - * Added azimuth(point,point) function. + * [r2000] Added azimuth(point,point) function. -2005-10-25 11:38 strk +2005-10-25 11:38 Sandro Santilli <strk@keybit.net> - * Added shift_longitude(geometry) sql procedure and underlying + * [r1999] Added shift_longitude(geometry) sql procedure and + underlying ptarray_longitude_shift(POINTARRAY *) and lwgeom_longitude_shift(LWGEOM *) functions. -2005-10-25 11:37 strk +2005-10-25 11:37 Sandro Santilli <strk@keybit.net> - * Fixed bug in GEOSCoordSeq to POINTARRAY converter + * [r1998] Fixed bug in GEOSCoordSeq to POINTARRAY converter -2005-10-25 11:16 strk +2005-10-25 11:16 Sandro Santilli <strk@keybit.net> - * Added pglwgeom_deserialize() + * [r1997] Added pglwgeom_deserialize() -2005-10-24 16:14 strk +2005-10-24 16:14 Sandro Santilli <strk@keybit.net> - * Moved loader/dumper stricter handling of attribute sizes from - 1.0.5 to head section + * [r1996] Moved loader/dumper stricter handling of attribute sizes + from 1.0.5 to head section -2005-10-24 15:54 strk +2005-10-24 15:54 Sandro Santilli <strk@keybit.net> - * fixed wrong assumption about maximum size of integer attributes - (width is maximum size of text representation) + * [r1993] fixed wrong assumption about maximum size of integer + attributes (width is maximum size of text representation) -2005-10-24 13:29 strk +2005-10-24 13:29 Sandro Santilli <strk@keybit.net> - * Updated to reflect ownership policy in GEOS C-api. + * [r1991] Updated to reflect ownership policy in GEOS C-api. -2005-10-24 11:33 strk +2005-10-24 11:33 Sandro Santilli <strk@keybit.net> - * Added attribute types mapping change + * [r1990] Added attribute types mapping change -2005-10-24 11:30 strk +2005-10-24 11:30 Sandro Santilli <strk@keybit.net> - * Fixed a bug in string attributes handling truncating values of - maximum + * [r1987] Fixed a bug in string attributes handling truncating + values of maximum allowed length, curtesy of Lars Roessiger. Reworked integer attributes handling to be stricter in dbf->sql mapping @@ -11599,1034 +31582,1053 @@ 2005-10-21 15:35 mschaber - * PGShapeGeometry constructor cleanup + * [r1986] PGShapeGeometry constructor cleanup 2005-10-21 13:06 mschaber - * Updated jdbc2 README to reflect JTS dependency on trove4j + * [r1985] Updated jdbc2 README to reflect JTS dependency on trove4j 2005-10-21 12:07 mschaber - * implemented JTS GeometryFactory caching + * [r1984] implemented JTS GeometryFactory caching -2005-10-21 11:33 strk +2005-10-21 11:33 Sandro Santilli <strk@keybit.net> - * Applied patch by Lars Roessiger handling numerical values with a - trailing decima + * [r1982] Applied patch by Lars Roessiger handling numerical values + with a trailing decima l dot 2005-10-21 08:53 mschaber - * typo fix in java2D example + * [r1981] typo fix in java2D example 2005-10-20 18:07 mschaber - * added example for java2d + * [r1980] added example for java2d 2005-10-20 16:13 mschaber - * moved java2d to ordinary src directory, as it does not depend on - any external libraries. + * [r1979] moved java2d to ordinary src directory, as it does not + depend on any external libraries. 2005-10-20 16:04 mschaber - * fix postgresql 7.2 datatype registration compatibility code + * [r1978] fix postgresql 7.2 datatype registration compatibility + code 2005-10-20 15:58 mschaber - * Fixed all deprecation warnings in JTS code by using proper - GeometryFactory instances (hope) + * [r1977] Fixed all deprecation warnings in JTS code by using + proper GeometryFactory instances (hope) 2005-10-20 15:57 mschaber - * added forgotten changelog entry + * [r1976] added forgotten changelog entry 2005-10-20 14:35 mschaber - * Added some source for java2D readonly support + * [r1975] Added some source for java2D readonly support -2005-10-19 13:11 strk +2005-10-19 13:11 Sandro Santilli <strk@keybit.net> - * Handled some more errors. + * [r1974] Handled some more errors. -2005-10-19 10:12 strk +2005-10-19 10:12 Sandro Santilli <strk@keybit.net> - * Removed useless variables from linemerge() + * [r1973] Removed useless variables from linemerge() -2005-10-19 10:09 strk +2005-10-19 10:09 Sandro Santilli <strk@keybit.net> - * Removed unused variables in linemerge() + * [r1972] Removed unused variables in linemerge() -2005-10-19 10:04 strk +2005-10-19 10:04 Sandro Santilli <strk@keybit.net> - * Added ST_ModEdgesSplit function, cleaned up test files, added - tests for + * [r1971] Added ST_ModEdgesSplit function, cleaned up test files, + added tests for the new topology editing functions. -2005-10-18 16:39 strk +2005-10-18 16:39 Sandro Santilli <strk@keybit.net> - * Fixed ST_NewEdgesSplit function to return new Node id rather then - text + * [r1970] Fixed ST_NewEdgesSplit function to return new Node id + rather then text -2005-10-18 15:31 strk +2005-10-18 15:31 Sandro Santilli <strk@keybit.net> - * Added SQL/MM functions ST_RemoveIsoEdge and ST_NewEdgesSplit. + * [r1969] Added SQL/MM functions ST_RemoveIsoEdge and + ST_NewEdgesSplit. The ST_NewEdgesSplit also updates the Relation table (out of SQL/MM specs). -2005-10-17 09:40 strk +2005-10-17 09:40 Sandro Santilli <strk@keybit.net> - * Changed GEOS initializzation to use lwnotice for errors rather - then + * [r1968] Changed GEOS initializzation to use lwnotice for errors + rather then lwerror, to allow for cleanup on exceptions. -2005-10-17 09:39 strk +2005-10-17 09:39 Sandro Santilli <strk@keybit.net> - * Added -Wall flag to compilers invocation + * [r1967] Added -Wall flag to compilers invocation -2005-10-17 08:37 strk +2005-10-17 08:37 Sandro Santilli <strk@keybit.net> - * Fixed compiler warnings, handled exceptions in POSTGIS2GEOS - conversions + * [r1966] Fixed compiler warnings, handled exceptions in + POSTGIS2GEOS conversions -2005-10-14 08:29 strk +2005-10-14 08:29 Sandro Santilli <strk@keybit.net> - * Added topology change + * [r1965] Added topology change -2005-10-13 16:21 strk +2005-10-13 16:21 Sandro Santilli <strk@keybit.net> - * Initial work on topology model support + * [r1964] Initial work on topology model support -2005-10-13 13:40 strk +2005-10-13 13:40 Sandro Santilli <strk@keybit.net> - * Fixed return code from shp2pgsql + * [r1963] Fixed return code from shp2pgsql -2005-10-10 16:19 strk +2005-10-10 16:19 Sandro Santilli <strk@keybit.net> - * Fixed null values fraction computation in geometry analyzer as - suggested by Michael Fuhr + * [r1961] Fixed null values fraction computation in geometry + analyzer as suggested by Michael Fuhr 2005-10-03 21:45 devrim - * Added basic doc about building RPMs + * [r1959] Added basic doc about building RPMs 2005-10-03 21:29 devrim - * - Make PostGIS build against pgxs so that we don't need + * [r1958] - Make PostGIS build against pgxs so that we don't need PostgreSQL sources. - Fixed all build errors except jdbc (so, defaulted to 0) - Added new files under %utils -2005-10-03 18:08 strk +2005-10-03 18:08 Sandro Santilli <strk@keybit.net> - * Stricter string attributes lenght handling. DBF header will be - used + * [r1957] Stricter string attributes lenght handling. DBF header + will be used to set varchar maxlenght, (var)char typmod will be used to set DBF header len. 2005-10-03 17:36 devrim - * Removed postgis-jdbc2-makefile.patch (applied to -head) + * [r1956] Removed postgis-jdbc2-makefile.patch (applied to -head) 2005-10-03 17:29 devrim - * Applied to HEAD, so removed + * [r1955] Applied to HEAD, so removed -2005-10-03 07:53 strk +2005-10-03 07:53 Sandro Santilli <strk@keybit.net> - * Added -W and -I loader switches to manuals. + * [r1954] Added -W and -I loader switches to manuals. -2005-10-03 07:45 strk +2005-10-03 07:45 Sandro Santilli <strk@keybit.net> - * Issued a warning when -W is specified and no UTF8 support has - been compiled in. + * [r1953] Issued a warning when -W is specified and no UTF8 support + has been compiled in. 2005-09-30 15:09 devrim - * Removed + * [r1952] Removed 2005-09-30 15:09 devrim - * Renamed the file and fixed the non-ascii char + * [r1951] Renamed the file and fixed the non-ascii char -2005-09-30 12:44 strk +2005-09-30 12:44 Sandro Santilli <strk@keybit.net> - * undefined UNITE_USING_BUFFER (defining it to 0 did not have the - expected result) + * [r1950] undefined UNITE_USING_BUFFER (defining it to 0 did not + have the expected result) -2005-09-30 08:59 strk +2005-09-30 08:59 Sandro Santilli <strk@keybit.net> - * Fixed release of stack memory occurring when shp2pgsql is + * [r1949] Fixed release of stack memory occurring when shp2pgsql is compiled with USE_ICONV defined, an attribute value needs to be escaped and no -W is used 2005-09-29 07:11 mschaber - * Manually applied Makefile changes from Devrim GUNDUZ + * [r1947] Manually applied Makefile changes from Devrim GUNDUZ (extras/rpm/patches/postgis-jdbc2-makefile.patch) to HEAD jdbc2 Makefile -2005-09-28 16:34 strk +2005-09-28 16:34 Sandro Santilli <strk@keybit.net> - * Honoured want3d parameter in GEOS2POSTGIS converters + * [r1946] Honoured want3d parameter in GEOS2POSTGIS converters 2005-09-27 21:50 devrim - * Mentioned about the patches in spec file. + * [r1945] Mentioned about the patches in spec file. 2005-09-27 21:48 devrim - * Initial README file for PostGIS RPM + * [r1944] Initial README file for PostGIS RPM 2005-09-27 21:26 devrim - * Initial import of postgis.spec + * [r1943] Initial import of postgis.spec 2005-09-27 21:12 devrim - * Necesarry patches used to build PostGIS RPMs. + * [r1942] Necesarry patches used to build PostGIS RPMs. -2005-09-27 16:30 strk +2005-09-27 16:30 Sandro Santilli <strk@keybit.net> - * Wrapped debugging line in preprocessor block. + * [r1941] Wrapped debugging line in preprocessor block. -2005-09-26 13:48 strk +2005-09-26 13:48 Sandro Santilli <strk@keybit.net> - * Made USE_GEOS_CAPI definable by ./configure + * [r1940] Made USE_GEOS_CAPI definable by ./configure -2005-09-26 13:47 strk +2005-09-26 13:47 Sandro Santilli <strk@keybit.net> - * Added --with-geos-capi switch + * [r1939] Added --with-geos-capi switch -2005-09-26 12:53 strk +2005-09-26 12:53 Sandro Santilli <strk@keybit.net> - * Added LineMerge function in Geometry Editors chapter + * [r1938] Added LineMerge function in Geometry Editors chapter -2005-09-26 12:36 strk +2005-09-26 12:36 Sandro Santilli <strk@keybit.net> - * Initial switches for use of GEOS C-API + * [r1937] Initial switches for use of GEOS C-API -2005-09-26 12:30 strk +2005-09-26 12:30 Sandro Santilli <strk@keybit.net> - * Added LineMerge interface + * [r1936] Added LineMerge interface -2005-09-26 12:09 strk +2005-09-26 12:09 Sandro Santilli <strk@keybit.net> - * Updated LineMerge facts + * [r1935] Updated LineMerge facts -2005-09-26 12:08 strk +2005-09-26 12:08 Sandro Santilli <strk@keybit.net> - * Added JTSLineMerge stub, fixed typos in profiling outputs. + * [r1934] Added JTSLineMerge stub, fixed typos in profiling + outputs. -2005-09-26 12:07 strk +2005-09-26 12:07 Sandro Santilli <strk@keybit.net> - * Added stub for linemerge() + * [r1933] Added stub for linemerge() -2005-09-26 12:04 strk +2005-09-26 12:04 Sandro Santilli <strk@keybit.net> - * Added new LineMerge funtion + * [r1932] Added new LineMerge funtion -2005-09-26 12:03 strk +2005-09-26 12:03 Sandro Santilli <strk@keybit.net> - * Fixed prototype of linemerge() and error typo in it + * [r1931] Fixed prototype of linemerge() and error typo in it -2005-09-26 11:35 strk +2005-09-26 11:35 Sandro Santilli <strk@keybit.net> - * Changed GEOSLineMerge function to take one geometry and return - the simplest + * [r1930] Changed GEOSLineMerge function to take one geometry and + return the simplest geometry formed by set of merged LineStrings. Fixed memory leak in GEOSrelate(). -2005-09-23 17:25 strk +2005-09-23 17:25 Sandro Santilli <strk@keybit.net> - * Added linemerge_garray function + * [r1929] Added linemerge_garray function -2005-09-23 17:22 strk +2005-09-23 17:22 Sandro Santilli <strk@keybit.net> - * Added LineMerger interface + * [r1928] Added LineMerger interface -2005-09-23 17:06 strk +2005-09-23 17:06 Sandro Santilli <strk@keybit.net> - * Initial wrapper to GEOS C api + * [r1927] Initial wrapper to GEOS C api -2005-09-23 16:43 strk +2005-09-23 16:43 Sandro Santilli <strk@keybit.net> - * Added wrappers for ewkb output + * [r1926] Added wrappers for ewkb output -2005-09-23 16:41 strk +2005-09-23 16:41 Sandro Santilli <strk@keybit.net> - * cleanups + * [r1925] cleanups -2005-09-23 16:24 strk +2005-09-23 16:24 Sandro Santilli <strk@keybit.net> - * cleanups + * [r1924] cleanups -2005-09-23 15:43 strk +2005-09-23 15:43 Sandro Santilli <strk@keybit.net> - * added header sentinels + * [r1923] added header sentinels -2005-09-23 11:45 strk +2005-09-23 11:45 Sandro Santilli <strk@keybit.net> - * Made LWGEOMFromWKB use underlying pglwgeom_from_ewkb() + * [r1922] Made LWGEOMFromWKB use underlying pglwgeom_from_ewkb() -2005-09-23 11:23 strk +2005-09-23 11:23 Sandro Santilli <strk@keybit.net> - * Added pglwgeom_from_ewkb function + * [r1921] Added pglwgeom_from_ewkb function -2005-09-16 13:19 strk +2005-09-16 13:19 Sandro Santilli <strk@keybit.net> - * given some consistent format to items + * [r1920] given some consistent format to items -2005-09-15 14:53 strk +2005-09-15 14:53 Sandro Santilli <strk@keybit.net> - * Fixed X(),Y() and Z() functions descriptions, added M(). + * [r1918] Fixed X(),Y() and Z() functions descriptions, added M(). -2005-09-15 10:24 strk +2005-09-15 10:24 Sandro Santilli <strk@keybit.net> - * Moved AddPoint() function from 'geometry constructors' to + * [r1917] Moved AddPoint() function from 'geometry constructors' to 'geometry editors' chapter -2005-09-15 10:16 strk +2005-09-15 10:16 Sandro Santilli <strk@keybit.net> - * Disabled buffer-based GeomUnion + * [r1915] Disabled buffer-based GeomUnion -2005-09-15 10:13 strk +2005-09-15 10:13 Sandro Santilli <strk@keybit.net> - * Moved the fix_geometry_column() removal to 1.1.0 section + * [r1914] Moved the fix_geometry_column() removal to 1.1.0 section -2005-09-15 09:55 strk +2005-09-15 09:55 Sandro Santilli <strk@keybit.net> - * Removed automatic fix_geometry_columns() call in + * [r1911] Removed automatic fix_geometry_columns() call in update_geometry_stats and AddGeometryColumns() -2005-09-15 09:50 strk +2005-09-15 09:50 Sandro Santilli <strk@keybit.net> - * Added Reporting Bugs chapter + * [r1910] Added Reporting Bugs chapter -2005-09-09 17:03 strk +2005-09-09 17:03 Sandro Santilli <strk@keybit.net> - * Updated release info for 1.0.4 + * [r1908] Updated release info for 1.0.4 -2005-09-09 16:21 strk +2005-09-09 16:21 Sandro Santilli <strk@keybit.net> - * Fixed bug in scale() and transscale() functions corrupting output - bounding box + * [r1906] Fixed bug in scale() and transscale() functions + corrupting output bounding box -2005-09-09 15:23 strk +2005-09-09 15:23 Sandro Santilli <strk@keybit.net> - * cleanups for waste left in previous patches + * [r1903] cleanups for waste left in previous patches -2005-09-09 14:47 strk +2005-09-09 14:47 Sandro Santilli <strk@keybit.net> - * Fixed bug in translate() corrupting output bounding box. + * [r1901] Fixed bug in translate() corrupting output bounding box. Bounding-box related cleanups in exterior_ring() -2005-09-08 23:30 strk +2005-09-08 23:30 Sandro Santilli <strk@keybit.net> - * Made ptarray_compute_box3d a wrapper of ptarray_compute_box3d_p + * [r1899] Made ptarray_compute_box3d a wrapper of + ptarray_compute_box3d_p -2005-09-08 22:59 strk +2005-09-08 22:59 Sandro Santilli <strk@keybit.net> - * minor speedups in distance() + * [r1896] minor speedups in distance() -2005-09-08 19:26 strk +2005-09-08 19:26 Sandro Santilli <strk@keybit.net> - * Handled search_box outside of histogram_box case in selectivity - estimator + * [r1894] Handled search_box outside of histogram_box case in + selectivity estimator 2005-09-07 11:58 mschaber - * added some more Todo points + * [r1892] added some more Todo points -2005-09-06 09:22 strk +2005-09-06 09:22 Sandro Santilli <strk@keybit.net> - * Added notes about PointN, GeometryN and InteriorRingN indexing - method + * [r1891] Added notes about PointN, GeometryN and InteriorRingN + indexing method -2005-09-06 08:29 strk +2005-09-06 08:29 Sandro Santilli <strk@keybit.net> - * BOX3d parser note + * [r1889] BOX3d parser note -2005-09-06 08:28 strk +2005-09-06 08:28 Sandro Santilli <strk@keybit.net> - * looser BOX3D parser + * [r1887] looser BOX3D parser -2005-09-03 06:11 strk +2005-09-03 06:11 Sandro Santilli <strk@keybit.net> - * Leak plugged in compute_serialized_box3d_p + * [r1885] Leak plugged in compute_serialized_box3d_p -2005-08-31 17:09 strk +2005-08-31 17:09 Sandro Santilli <strk@keybit.net> - * removed compiler warnings + * [r1883] removed compiler warnings -2005-08-31 16:49 strk +2005-08-31 16:49 Sandro Santilli <strk@keybit.net> - * Fixed bug in pointArray_construct() misinterpreting hasZ and hasM - parameters + * [r1881] Fixed bug in pointArray_construct() misinterpreting hasZ + and hasM parameters -2005-08-29 22:36 strk +2005-08-29 22:36 Sandro Santilli <strk@keybit.net> - * Removed premature object destruction in InsertLineString{WKT,} - causing segfault + * [r1879] Removed premature object destruction in + InsertLineString{WKT,} causing segfault -2005-08-29 12:08 strk +2005-08-29 12:08 Sandro Santilli <strk@keybit.net> - * Added Nikita Shulga <malfet@jscc.ru> in contributors list. + * [r1877] Added Nikita Shulga <malfet@jscc.ru> in contributors + list. -2005-08-29 11:56 strk +2005-08-29 11:56 Sandro Santilli <strk@keybit.net> - * Typo fixed + * [r1875] Typo fixed -2005-08-29 11:48 strk +2005-08-29 11:48 Sandro Santilli <strk@keybit.net> - * Fixed sprintf() calls to avoid overlapping memory, + * [r1872] Fixed sprintf() calls to avoid overlapping memory, reworked not-null objects existance check to reduce startup costs. -2005-08-16 21:38 strk +2005-08-16 21:38 Sandro Santilli <strk@keybit.net> - * Added M(point) function + * [r1871] Added M(point) function -2005-08-16 11:24 strk +2005-08-16 11:24 Sandro Santilli <strk@keybit.net> - * Early memory release in GiST indexing + * [r1870] Early memory release in GiST indexing -2005-08-12 19:20 pramsey +2005-08-12 19:20 Paul Ramsey <pramsey@cleverelephant.ca> - * Added +proj=longlat to all corrupt srs entries. + * [r1867] Added +proj=longlat to all corrupt srs entries. -2005-08-10 23:16 strk +2005-08-10 23:16 Sandro Santilli <strk@keybit.net> - * Removed pfree of proj4 text in make_project failure cases + * [r1865] Removed pfree of proj4 text in make_project failure cases (required for error message) -2005-08-10 23:12 strk +2005-08-10 23:12 Sandro Santilli <strk@keybit.net> - * Added segfault fix + * [r1863] Added segfault fix -2005-08-10 23:06 strk +2005-08-10 23:06 Sandro Santilli <strk@keybit.net> - * Fixed a segfault in transform_geom exploited by proj4's + * [r1860] Fixed a segfault in transform_geom exploited by proj4's make_project error. -2005-08-04 16:29 strk +2005-08-04 16:29 Sandro Santilli <strk@keybit.net> - * Checked for PSQL run success + * [r1857] Checked for PSQL run success -2005-08-04 15:20 strk +2005-08-04 15:20 Sandro Santilli <strk@keybit.net> - * Added availability note for version functions + * [r1855] Added availability note for version functions -2005-08-04 15:03 strk +2005-08-04 15:03 Sandro Santilli <strk@keybit.net> - * Updated + * [r1854] Updated -2005-08-04 14:55 strk +2005-08-04 14:55 Sandro Santilli <strk@keybit.net> - * 1.0.3 release notes and date + * [r1853] 1.0.3 release notes and date -2005-08-04 14:54 strk +2005-08-04 14:54 Sandro Santilli <strk@keybit.net> - * Added plpgsql_validator explicit function skip + * [r1852] Added plpgsql_validator explicit function skip -2005-07-29 22:24 strk +2005-07-29 22:24 Sandro Santilli <strk@keybit.net> - * updated 1.0.3 section + * [r1846] updated 1.0.3 section -2005-07-29 22:08 strk +2005-07-29 22:08 Sandro Santilli <strk@keybit.net> - * Added more obsoleted functions, new obsoleted_ops considered, + * [r1844] Added more obsoleted functions, new obsoleted_ops + considered, check of pg_restore -l return code, better regexp to allow broader range of dump/restore versions. 2005-07-28 12:23 mschaber - * fix EWKT constructors to accept SRID=4711; representation + * [r1839] fix EWKT constructors to accept SRID=4711; representation -2005-07-27 02:47 strk +2005-07-27 02:47 Sandro Santilli <strk@keybit.net> - * Support for multibyte field names in loader + * [r1838] Support for multibyte field names in loader -2005-07-27 02:35 strk +2005-07-27 02:35 Sandro Santilli <strk@keybit.net> - * Minor cleanups in loader + * [r1836] Minor cleanups in loader -2005-07-27 02:07 strk +2005-07-27 02:07 Sandro Santilli <strk@keybit.net> - * Fixed handling of POINT types as WKT (-w) in loader + * [r1834] Fixed handling of POINT types as WKT (-w) in loader -2005-07-25 22:24 strk +2005-07-25 22:24 Sandro Santilli <strk@keybit.net> - * bugfix in ptarray_compute_box2d_p + * [r1828] bugfix in ptarray_compute_box2d_p -2005-07-22 19:15 strk +2005-07-22 19:15 Sandro Santilli <strk@keybit.net> - * Fixed bug in {get,pop}{int,double} for 64bit archs + * [r1825] Fixed bug in {get,pop}{int,double} for 64bit archs -2005-07-19 11:26 strk +2005-07-19 11:26 Sandro Santilli <strk@keybit.net> - * removed useless strchr call in LWGEOM_in + * [r1820] removed useless strchr call in LWGEOM_in -2005-07-13 14:28 strk +2005-07-13 14:28 Sandro Santilli <strk@keybit.net> - * updated + * [r1818] updated -2005-07-13 14:26 strk +2005-07-13 14:26 Sandro Santilli <strk@keybit.net> - * Fixed bug reported by klaus F�rster + * [r1815] Fixed bug reported by klaus F�rster -2005-07-12 16:19 strk +2005-07-12 16:19 Sandro Santilli <strk@keybit.net> - * Fixed bug in user query handling, reported by Andrew Seales + * [r1813] Fixed bug in user query handling, reported by Andrew + Seales -2005-07-05 16:12 strk +2005-07-05 16:12 Sandro Santilli <strk@keybit.net> - * Forced INSTALL to be install-sh + * [r1811] Forced INSTALL to be install-sh -2005-07-05 15:13 strk +2005-07-05 15:13 Sandro Santilli <strk@keybit.net> - * Added more win32-specific variables + * [r1810] Added more win32-specific variables -2005-07-04 17:04 strk +2005-07-04 17:04 Sandro Santilli <strk@keybit.net> - * Cleaned up to use more facilities from Makefile.shlib + * [r1809] Cleaned up to use more facilities from Makefile.shlib -2005-07-04 09:47 strk +2005-07-04 09:47 Sandro Santilli <strk@keybit.net> - * Added conservative iconv detection code + * [r1808] Added conservative iconv detection code -2005-07-04 09:14 strk +2005-07-04 09:14 Sandro Santilli <strk@keybit.net> - * adjusted for 1.0.2 release + * [r1807] adjusted for 1.0.2 release -2005-07-04 09:12 strk +2005-07-04 09:12 Sandro Santilli <strk@keybit.net> - * Dropped broken attempt at 'detecting' iconv. + * [r1806] Dropped broken attempt at 'detecting' iconv. -2005-07-03 17:46 strk +2005-07-03 17:46 Sandro Santilli <strk@keybit.net> - * Added 1.0.2 release notes + * [r1805] Added 1.0.2 release notes -2005-07-01 21:10 strk +2005-07-01 21:10 Sandro Santilli <strk@keybit.net> - * Included debian packaging scripts + * [r1804] Included debian packaging scripts -2005-06-28 22:01 strk +2005-06-28 22:01 Sandro Santilli <strk@keybit.net> - * Added index concurrency tester + * [r1794] Added index concurrency tester -2005-06-28 22:00 strk +2005-06-28 22:00 Sandro Santilli <strk@keybit.net> - * Fixed extimators to work with postgresql 8.1.x + * [r1791] Fixed extimators to work with postgresql 8.1.x -2005-06-28 14:58 strk +2005-06-28 14:58 Sandro Santilli <strk@keybit.net> - * Reverted rtree logic back to use leaf/internal consistency - functions + * [r1787] Reverted rtree logic back to use leaf/internal + consistency functions -2005-06-28 14:51 strk +2005-06-28 14:51 Sandro Santilli <strk@keybit.net> - * updated + * [r1786] updated -2005-06-28 14:42 strk +2005-06-28 14:42 Sandro Santilli <strk@keybit.net> - * Maintained separate vars for CFLAGS and CXXFLAGS + * [r1783] Maintained separate vars for CFLAGS and CXXFLAGS -2005-06-28 14:34 strk +2005-06-28 14:34 Sandro Santilli <strk@keybit.net> - * Bugfix in RTBelowStrategyNumber handling + * [r1781] Bugfix in RTBelowStrategyNumber handling -2005-06-28 14:00 strk +2005-06-28 14:00 Sandro Santilli <strk@keybit.net> - * updated + * [r1780] updated -2005-06-28 13:53 strk +2005-06-28 13:53 Sandro Santilli <strk@keybit.net> - * Inclusion of core rtree header for StratregyNumber typedef (8.1 - support) + * [r1778] Inclusion of core rtree header for StratregyNumber + typedef (8.1 support) -2005-06-28 11:33 strk +2005-06-28 11:33 Sandro Santilli <strk@keybit.net> - * Added switch for pgsql 8.1 build + * [r1777] Added switch for pgsql 8.1 build -2005-06-28 11:33 strk +2005-06-28 11:33 Sandro Santilli <strk@keybit.net> - * Moved chunked GeomUnion defines on top of file + * [r1776] Moved chunked GeomUnion defines on top of file 2005-06-28 08:12 mschaber - * fix compile problems in ValueSetter for ancient jdk releases. + * [r1774] fix compile problems in ValueSetter for ancient jdk + releases. -2005-06-27 15:16 strk +2005-06-27 15:16 Sandro Santilli <strk@keybit.net> - * Initial chunk-based unite_garray implementation + * [r1773] Initial chunk-based unite_garray implementation -2005-06-26 09:15 strk +2005-06-26 09:15 Sandro Santilli <strk@keybit.net> - * Added collect,buffer implementation for unite_garray(). + * [r1772] Added collect,buffer implementation for unite_garray(). Compile-time definable: GEOS version defaults to on, JTS to off -2005-06-25 10:24 strk +2005-06-25 10:24 Sandro Santilli <strk@keybit.net> - * Added pgsql standard geometryc types cast + * [r1770] Added pgsql standard geometryc types cast -2005-06-24 12:36 strk +2005-06-24 12:36 Sandro Santilli <strk@keybit.net> - * Fixed rtree indexing (ported from pgsql rtree fix) + * [r1769] Fixed rtree indexing (ported from pgsql rtree fix) 2005-06-24 07:55 mschaber - * added casts between PostgreSQL and PostGIS geometries to TODO - list + * [r1767] added casts between PostgreSQL and PostGIS geometries to + TODO list -2005-06-17 14:51 strk +2005-06-17 14:51 Sandro Santilli <strk@keybit.net> - * Memory leak fix in pg_error + * [r1766] Memory leak fix in pg_error -2005-06-16 17:55 strk +2005-06-16 17:55 Sandro Santilli <strk@keybit.net> - * Added -I switch for GiST index creation in loader + * [r1764] Added -I switch for GiST index creation in loader -2005-06-15 16:04 strk +2005-06-15 16:04 Sandro Santilli <strk@keybit.net> - * fault tolerant btree ops + * [r1762] fault tolerant btree ops -2005-06-15 16:04 strk +2005-06-15 16:04 Sandro Santilli <strk@keybit.net> - * fault tolerant btree ops + * [r1761] fault tolerant btree ops -2005-06-10 16:27 strk +2005-06-10 16:27 Sandro Santilli <strk@keybit.net> - * Added (commented) aggregates handling + * [r1759] Added (commented) aggregates handling -2005-06-10 16:03 strk +2005-06-10 16:03 Sandro Santilli <strk@keybit.net> - * Renamed {GEOS,JTS}_polygonize_garray to polygonize_garray to - reduce + * [r1758] Renamed {GEOS,JTS}_polygonize_garray to polygonize_garray + to reduce redundancies. -2005-06-10 16:02 strk +2005-06-10 16:02 Sandro Santilli <strk@keybit.net> - * Fixed handling of --with-geos + * [r1757] Fixed handling of --with-geos -2005-06-10 12:36 strk +2005-06-10 12:36 Sandro Santilli <strk@keybit.net> - * Added availability info for postgis_full_version() and + * [r1756] Added availability info for postgis_full_version() and postgis_jts_version() -2005-06-10 12:00 strk +2005-06-10 12:00 Sandro Santilli <strk@keybit.net> - * Added JTSnoop and JTSversion functions. + * [r1755] Added JTSnoop and JTSversion functions. -2005-06-10 11:58 strk +2005-06-10 11:58 Sandro Santilli <strk@keybit.net> - * More info in the Upgrade chapter (soft upgrade/hard upgrade) + * [r1754] More info in the Upgrade chapter (soft upgrade/hard + upgrade) -2005-06-10 09:54 strk +2005-06-10 09:54 Sandro Santilli <strk@keybit.net> - * Added isvalid(empty) test + * [r1753] Added isvalid(empty) test -2005-06-09 16:02 strk +2005-06-09 16:02 Sandro Santilli <strk@keybit.net> - * updated + * [r1752] updated -2005-06-09 16:02 strk +2005-06-09 16:02 Sandro Santilli <strk@keybit.net> - * Added SRID check in line_locate_point() + * [r1751] Added SRID check in line_locate_point() -2005-06-09 16:02 strk +2005-06-09 16:02 Sandro Santilli <strk@keybit.net> - * removed spurious comments + * [r1750] removed spurious comments -2005-06-09 16:01 strk +2005-06-09 16:01 Sandro Santilli <strk@keybit.net> - * Fixed bug in ptarray_locate_point + * [r1749] Fixed bug in ptarray_locate_point -2005-06-09 16:00 strk +2005-06-09 16:00 Sandro Santilli <strk@keybit.net> - * Added test for line_locate_point + * [r1748] Added test for line_locate_point -2005-06-09 15:12 strk +2005-06-09 15:12 Sandro Santilli <strk@keybit.net> - * Added line_locate_point() function + * [r1747] Added line_locate_point() function -2005-06-09 12:30 strk +2005-06-09 12:30 Sandro Santilli <strk@keybit.net> - * Added a check for correct order of ``from'' and ``to'' args in - line_substring() + * [r1746] Added a check for correct order of ``from'' and ``to'' + args in line_substring() -2005-06-09 12:24 strk +2005-06-09 12:24 Sandro Santilli <strk@keybit.net> - * NEW line_substring() function + * [r1745] NEW line_substring() function -2005-06-07 07:51 strk +2005-06-07 07:51 Sandro Santilli <strk@keybit.net> - * Added missing Makefile.shlib and removed explicit 'all' rule from - lwgeom build + * [r1744] Added missing Makefile.shlib and removed explicit 'all' + rule from lwgeom build -2005-06-06 18:42 strk +2005-06-06 18:42 Sandro Santilli <strk@keybit.net> - * iconv autodetection + * [r1743] iconv autodetection -2005-06-06 17:28 strk +2005-06-06 17:28 Sandro Santilli <strk@keybit.net> - * Moved 'all' rule before Makefile.shlib inclusion, to have bare - 'make' calls work again + * [r1742] Moved 'all' rule before Makefile.shlib inclusion, to have + bare 'make' calls work again -2005-06-06 17:21 strk +2005-06-06 17:21 Sandro Santilli <strk@keybit.net> - * Added WARNING about changes implications in terms of + * [r1741] Added WARNING about changes implications in terms of SCRIPTS_VERSION upgrade. Removed extra tokens after #endif directives to make newer preprocessor (3.4.3) happy. -2005-06-06 16:49 strk +2005-06-06 16:49 Sandro Santilli <strk@keybit.net> - * Initial implementation of postgis procedures upgrade script + * [r1740] Initial implementation of postgis procedures upgrade + script -2005-06-06 16:49 strk +2005-06-06 16:49 Sandro Santilli <strk@keybit.net> - * Added availability info for new functions + * [r1739] Added availability info for new functions -2005-06-06 16:48 strk +2005-06-06 16:48 Sandro Santilli <strk@keybit.net> - * Incremented micro version number in SCRIPTS_VERSION (due to - functions addition) + * [r1738] Incremented micro version number in SCRIPTS_VERSION (due + to functions addition) -2005-06-06 16:47 strk +2005-06-06 16:47 Sandro Santilli <strk@keybit.net> - * Moved create_undef.pl from root to utils/ dir + * [r1737] Moved create_undef.pl from root to utils/ dir -2005-06-06 16:47 strk +2005-06-06 16:47 Sandro Santilli <strk@keybit.net> - * Removed automatic build of docs + * [r1736] Removed automatic build of docs 2005-06-06 07:58 mschaber - * added scale() and transscale() functions (like transform()) + * [r1735] added scale() and transscale() functions (like + transform()) 2005-06-06 07:54 mschaber - * merge Alex' jdbc2 specific Makefile patches + * [r1734] merge Alex' jdbc2 specific Makefile patches -2005-06-04 10:06 strk +2005-06-04 10:06 Sandro Santilli <strk@keybit.net> - * Applied Alex Bodnaru patch for pgsql source tree dependency drop. + * [r1733] Applied Alex Bodnaru patch for pgsql source tree + dependency drop. -2005-05-25 12:01 strk +2005-05-25 12:01 Sandro Santilli <strk@keybit.net> - * Stripped out CR chars + * [r1731] Stripped out CR chars 2005-05-25 10:12 mschaber - * fix comment + * [r1730] fix comment 2005-05-25 10:08 mschaber - * JTS binary parser now passes basic regression suite + * [r1729] JTS binary parser now passes basic regression suite -2005-05-24 17:19 strk +2005-05-24 17:19 Sandro Santilli <strk@keybit.net> - * Added release date for postgis-1.0.1 + * [r1728] Added release date for postgis-1.0.1 -2005-05-24 16:56 strk +2005-05-24 16:56 Sandro Santilli <strk@keybit.net> - * Added iconv autodetection, removed already-added things + * [r1727] Added iconv autodetection, removed already-added things -2005-05-24 14:02 strk +2005-05-24 14:02 Sandro Santilli <strk@keybit.net> - * Added postgis-1.0.1 release date + * [r1726] Added postgis-1.0.1 release date 2005-05-23 16:18 mschaber - * Cleaned up Point.equals(Point) mess + * [r1722] Cleaned up Point.equals(Point) mess -2005-05-23 14:15 strk +2005-05-23 14:15 Sandro Santilli <strk@keybit.net> - * Compiled 1.0.1 release notes + * [r1721] Compiled 1.0.1 release notes -2005-05-18 17:01 strk +2005-05-18 17:01 Sandro Santilli <strk@keybit.net> - * Applied 'strictness' patch by James Marca + * [r1719] Applied 'strictness' patch by James Marca -2005-05-18 15:49 strk +2005-05-18 15:49 Sandro Santilli <strk@keybit.net> - * Fixed SetSRID() entry + * [r1717] Fixed SetSRID() entry -2005-05-18 15:39 strk +2005-05-18 15:39 Sandro Santilli <strk@keybit.net> - * added Paris projections fixes + * [r1715] added Paris projections fixes -2005-05-18 15:36 strk +2005-05-18 15:36 Sandro Santilli <strk@keybit.net> - * Updated proj4text for some French projections, as for Nicolas - Ribot report + * [r1713] Updated proj4text for some French projections, as for + Nicolas Ribot report -2005-05-16 17:50 strk +2005-05-16 17:50 Sandro Santilli <strk@keybit.net> - * Added note about pgsq2shp attributes names bugfix + * [r1709] Added note about pgsq2shp attributes names bugfix -2005-05-16 17:22 strk +2005-05-16 17:22 Sandro Santilli <strk@keybit.net> - * Fixed DBF field names handling as for clashes avoiding. + * [r1708] Fixed DBF field names handling as for clashes avoiding. pgsql field renames are warned. -2005-05-16 08:05 strk +2005-05-16 08:05 Sandro Santilli <strk@keybit.net> - * Moved dumper and postgis_restore.pl changes in 1.0.1 section - (back-ported) + * [r1707] Moved dumper and postgis_restore.pl changes in 1.0.1 + section (back-ported) -2005-05-16 07:49 strk +2005-05-16 07:49 Sandro Santilli <strk@keybit.net> - * Allowed custom args passing to createdb invocation + * [r1703] Allowed custom args passing to createdb invocation -2005-05-15 08:05 strk +2005-05-15 08:05 Sandro Santilli <strk@keybit.net> - * updated docs as for -k switch + * [r1702] updated docs as for -k switch -2005-05-13 14:16 strk +2005-05-13 14:16 Sandro Santilli <strk@keybit.net> - * Added new -k switch and credits for it + * [r1701] Added new -k switch and credits for it -2005-05-13 14:06 strk +2005-05-13 14:06 Sandro Santilli <strk@keybit.net> - * Applied patch from Obe, Regina to keep identifiers case. + * [r1700] Applied patch from Obe, Regina to keep identifiers case. -2005-05-13 08:03 strk +2005-05-13 08:03 Sandro Santilli <strk@keybit.net> - * Added support for macosx build + * [r1699] Added support for macosx build -2005-05-12 10:09 strk +2005-05-12 10:09 Sandro Santilli <strk@keybit.net> - * changed PGBELIBS command to avoid backtics and newlines + * [r1698] changed PGBELIBS command to avoid backtics and newlines -2005-05-12 07:45 strk +2005-05-12 07:45 Sandro Santilli <strk@keybit.net> - * Added another dir in search path for docbook.xml, changed shell - invocation + * [r1697] Added another dir in search path for docbook.xml, changed + shell invocation line for mingw to avoid newline char being used. -2005-05-11 08:55 strk +2005-05-11 08:55 Sandro Santilli <strk@keybit.net> - * Renamed MINGW to mingw in HOST_OS findstrings + * [r1696] Renamed MINGW to mingw in HOST_OS findstrings -2005-05-10 12:52 strk +2005-05-10 12:52 Sandro Santilli <strk@keybit.net> - * Forced OID usage in geometry_column table + * [r1694] Forced OID usage in geometry_column table -2005-05-10 12:32 strk +2005-05-10 12:32 Sandro Santilli <strk@keybit.net> - * fixed mingw handling syntax + * [r1693] fixed mingw handling syntax -2005-05-10 10:58 strk +2005-05-10 10:58 Sandro Santilli <strk@keybit.net> - * Added Makefile.config + * [r1692] Added Makefile.config -2005-05-10 10:57 strk +2005-05-10 10:57 Sandro Santilli <strk@keybit.net> - * Added scripts used by autoconf + * [r1691] Added scripts used by autoconf -2005-05-10 09:35 strk +2005-05-10 09:35 Sandro Santilli <strk@keybit.net> - * Added initial custom support for MINGW + * [r1690] Added initial custom support for MINGW -2005-05-10 08:31 strk +2005-05-10 08:31 Sandro Santilli <strk@keybit.net> - * GEOS autodetect activated + * [r1689] GEOS autodetect activated -2005-05-10 08:15 strk +2005-05-10 08:15 Sandro Santilli <strk@keybit.net> - * fixed upgrade procedure section as suggested by Steven Bowden + * [r1687] fixed upgrade procedure section as suggested by Steven + Bowden -2005-05-09 22:33 strk +2005-05-09 22:33 Sandro Santilli <strk@keybit.net> - * updated + * [r1686] updated -2005-05-04 07:00 strk +2005-05-04 07:00 Sandro Santilli <strk@keybit.net> - * Version bumped to 1.1.0CVS + * [r1683] Version bumped to 1.1.0CVS -2005-05-04 06:58 strk +2005-05-04 06:58 Sandro Santilli <strk@keybit.net> - * GEOS/JTS performed operations dox made more explicit about which + * [r1682] GEOS/JTS performed operations dox made more explicit + about which argument is 'this' and which is 'otherGeometry'. -2005-05-02 10:52 strk +2005-05-02 10:52 Sandro Santilli <strk@keybit.net> - * Moved 1.0.1 changes into their own section - added jdbc2 -target - change notice + * [r1680] Moved 1.0.1 changes into their own section - added jdbc2 + -target change notice 2005-04-28 11:51 mschaber - * added jdbc2 maintainerclean + * [r1678] added jdbc2 maintainerclean -2005-04-28 11:01 strk +2005-04-28 11:01 Sandro Santilli <strk@keybit.net> - * Fixed distclean rule to build required Makefile.config + * [r1677] Fixed distclean rule to build required Makefile.config 2005-04-28 08:35 mschaber - * fix sources.inc things + * [r1676] fix sources.inc things 2005-04-27 16:14 mschaber - * Reworked Makefile + * [r1675] Reworked Makefile -2005-04-26 18:45 strk +2005-04-26 18:45 Sandro Santilli <strk@keybit.net> - * Added MakeValidShape() function + * [r1674] Added MakeValidShape() function -2005-04-26 18:08 strk +2005-04-26 18:08 Sandro Santilli <strk@keybit.net> - * Fixed USE_JTS variable to actually use autoconf-detected value + * [r1673] Fixed USE_JTS variable to actually use autoconf-detected + value 2005-04-26 07:01 mschaber - * Improved versionprinter to print offline versions even if + * [r1672] Improved versionprinter to print offline versions even if database is not available -2005-04-22 01:07 strk +2005-04-22 01:07 Sandro Santilli <strk@keybit.net> - * Added fix in join selectivity + * [r1671] Added fix in join selectivity -2005-04-22 01:07 strk +2005-04-22 01:07 Sandro Santilli <strk@keybit.net> - * Fixed bug in join selectivity estimator returning invalid + * [r1669] Fixed bug in join selectivity estimator returning invalid estimates (>1) -2005-04-21 16:31 strk +2005-04-21 16:31 Sandro Santilli <strk@keybit.net> - * Fixed bug in 3d spheroid length computation, patch by zmocnik at - hotmail dot com + * [r1666] Fixed bug in 3d spheroid length computation, patch by + zmocnik at hotmail dot com -2005-04-21 09:21 strk +2005-04-21 09:21 Sandro Santilli <strk@keybit.net> - * Added new LRS funx suggested by Paul + * [r1665] Added new LRS funx suggested by Paul -2005-04-21 09:09 strk +2005-04-21 09:09 Sandro Santilli <strk@keybit.net> - * updated + * [r1664] updated -2005-04-21 09:08 strk +2005-04-21 09:08 Sandro Santilli <strk@keybit.net> - * Applied patch from Ron Mayer fixing a segfault in string escaper - funx + * [r1663] Applied patch from Ron Mayer fixing a segfault in string + escaper funx -2005-04-20 15:22 strk +2005-04-20 15:22 Sandro Santilli <strk@keybit.net> - * Fixed link to SimpleFeature Specification + * [r1659] Fixed link to SimpleFeature Specification -2005-04-20 15:17 strk +2005-04-20 15:17 Sandro Santilli <strk@keybit.net> - * Fixed clean-lib rule (wasn't removing anything!) + * [r1658] Fixed clean-lib rule (wasn't removing anything!) 2005-04-20 15:09 mschaber - * Fixed pg_opclass update to be schema-aware. + * [r1657] Fixed pg_opclass update to be schema-aware. -2005-04-20 10:21 strk +2005-04-20 10:21 Sandro Santilli <strk@keybit.net> - * Fixed bogus example of GeometryFromText(box3d, int) changing it + * [r1654] Fixed bogus example of GeometryFromText(box3d, int) + changing it to SetSRID(box3d, int) in chapter 5.1.2 -2005-04-20 08:12 strk +2005-04-20 08:12 Sandro Santilli <strk@keybit.net> - * Updated + * [r1653] Updated -2005-04-20 08:10 strk +2005-04-20 08:10 Sandro Santilli <strk@keybit.net> - * Added rules to automatically call configure or config.status, + * [r1652] Added rules to automatically call configure or + config.status, added docs rule to be invoked by topdir. -2005-04-20 08:01 strk +2005-04-20 08:01 Sandro Santilli <strk@keybit.net> - * Removed again, can't work anymore. + * [r1651] Removed again, can't work anymore. -2005-04-20 07:55 strk +2005-04-20 07:55 Sandro Santilli <strk@keybit.net> - * Put old Makefile.config back to allow for automatic documentation - production, + * [r1650] Put old Makefile.config back to allow for automatic + documentation production, must be removed again when process gets updated. -2005-04-19 10:58 strk +2005-04-19 10:58 Sandro Santilli <strk@keybit.net> - * added LPATH to summary output (if different from install dir) + * [r1648] added LPATH to summary output (if different from install + dir) -2005-04-19 10:41 strk +2005-04-19 10:41 Sandro Santilli <strk@keybit.net> - * Reworked autoconf path to use pgsql or custom layout based on + * [r1647] Reworked autoconf path to use pgsql or custom layout + based on presence of a --prefix switch. -2005-04-19 09:32 strk +2005-04-19 09:32 Sandro Santilli <strk@keybit.net> - * Added -c flag to INSTALL invokations (copy, not move) + * [r1646] Added -c flag to INSTALL invokations (copy, not move) -2005-04-19 09:20 strk +2005-04-19 09:20 Sandro Santilli <strk@keybit.net> - * More info in configure output, added autogen.sh wrapper + * [r1645] More info in configure output, added autogen.sh wrapper -2005-04-18 23:31 strk +2005-04-18 23:31 Sandro Santilli <strk@keybit.net> - * Added 1.0.0 section + * [r1644] Added 1.0.0 section -2005-04-18 14:46 strk +2005-04-18 14:46 Sandro Santilli <strk@keybit.net> - * Improved autoconf script, dropped pgsql source dependency. - EXPERIMENTAL. + * [r1641] Improved autoconf script, dropped pgsql source + dependency. EXPERIMENTAL. -2005-04-18 14:25 strk +2005-04-18 14:25 Sandro Santilli <strk@keybit.net> - * Added TODO list for release 1.1 + * [r1640] Added TODO list for release 1.1 -2005-04-18 14:15 strk +2005-04-18 14:15 Sandro Santilli <strk@keybit.net> - * Fixed 1.0.0 release date to 2005/04/19 + * [r1639] Fixed 1.0.0 release date to 2005/04/19 -2005-04-18 14:12 strk +2005-04-18 14:12 Sandro Santilli <strk@keybit.net> - * Slightly changed standard deviation computation to be more - corner-case-friendly. + * [r1636] Slightly changed standard deviation computation to be + more corner-case-friendly. -2005-04-18 14:04 strk +2005-04-18 14:04 Sandro Santilli <strk@keybit.net> - * Added estmator code and testers bugfix for 1.0.0 release. + * [r1635] Added estmator code and testers bugfix for 1.0.0 release. -2005-04-18 13:50 strk +2005-04-18 13:50 Sandro Santilli <strk@keybit.net> - * Fixed bug in table2 schema parsing. + * [r1633] Fixed bug in table2 schema parsing. -2005-04-18 13:30 strk +2005-04-18 13:30 Sandro Santilli <strk@keybit.net> - * Fixed to work against LWGEOM installations + * [r1631] Fixed to work against LWGEOM installations -2005-04-18 10:57 strk +2005-04-18 10:57 Sandro Santilli <strk@keybit.net> - * Applied patched by Ron Mayer fixing memory leakages and invalid - results + * [r1629] Applied patched by Ron Mayer fixing memory leakages and + invalid results in join selectivity estimator. Fixed some return to use default JOIN selectivity estimate instead of default RESTRICT selectivity estimate. -2005-04-15 20:12 strk +2005-04-15 20:12 Sandro Santilli <strk@keybit.net> - * Fixed Makefile to read Makefile.config + * [r1627] Fixed Makefile to read Makefile.config -2005-04-15 15:10 strk +2005-04-15 15:10 Sandro Santilli <strk@keybit.net> - * Updated to reflect examples->extras rename + * [r1624] Updated to reflect examples->extras rename -2005-04-15 15:09 strk +2005-04-15 15:09 Sandro Santilli <strk@keybit.net> - * Renamed examples/ to extras/. Added WFS_locks. + * [r1623] Renamed examples/ to extras/. Added WFS_locks. 2005-04-15 14:04 mschaber - * jdbc2 works: + * [r1622] jdbc2 works: + Makefile improvements + JTS support improvements + Improved regression test system @@ -12634,602 +32636,610 @@ + Support for (Hex)(E)wkb + Autoprobing DriverWrapper for HexWKB / EWKT switching -2005-04-15 10:01 strk +2005-04-15 10:01 Sandro Santilli <strk@keybit.net> - * Added configure outputs + * [r1621] Added configure outputs -2005-04-15 09:54 strk +2005-04-15 09:54 Sandro Santilli <strk@keybit.net> - * Added more people to manual "CREDITS" chapter (copied from - CREDITS file). + * [r1620] Added more people to manual "CREDITS" chapter (copied + from CREDITS file). Added a not in CREDITS redirecting to the postgis manual. -2005-04-15 09:31 strk +2005-04-15 09:31 Sandro Santilli <strk@keybit.net> - * Version bumbed to 1.0.0 + * [r1619] Version bumbed to 1.0.0 -2005-04-14 13:35 strk +2005-04-14 13:35 Sandro Santilli <strk@keybit.net> - * Added shp2pgsql bugfix and autoconf improvement in Release Notes. + * [r1618] Added shp2pgsql bugfix and autoconf improvement in + Release Notes. -2005-04-14 12:58 strk +2005-04-14 12:58 Sandro Santilli <strk@keybit.net> - * Applied patch by Gino Lucrezi fixing bug in string escaping code. + * [r1617] Applied patch by Gino Lucrezi fixing bug in string + escaping code. -2005-04-14 11:25 strk +2005-04-14 11:25 Sandro Santilli <strk@keybit.net> - * --enable-autoconf put back + * [r1616] --enable-autoconf put back -2005-04-14 11:23 strk +2005-04-14 11:23 Sandro Santilli <strk@keybit.net> - * Cleanup, improvements, JTS support added + * [r1615] Cleanup, improvements, JTS support added -2005-04-14 09:40 strk +2005-04-14 09:40 Sandro Santilli <strk@keybit.net> - * Added Alex Bodnaru in the "Other contributors" section, for - debian packaging. + * [r1614] Added Alex Bodnaru in the "Other contributors" section, + for debian packaging. -2005-04-14 08:02 strk +2005-04-14 08:02 Sandro Santilli <strk@keybit.net> - * Added a not about need of memory alignment constraints handling - for deserializers + * [r1613] Added a not about need of memory alignment constraints + handling for deserializers -2005-04-13 15:57 strk +2005-04-13 15:57 Sandro Santilli <strk@keybit.net> - * Removed the CREDITS section from Release Notes and move + * [r1612] Removed the CREDITS section from Release Notes and move contributors in chapter 1.1 (Credits). -2005-04-13 14:25 strk +2005-04-13 14:25 Sandro Santilli <strk@keybit.net> - * Release notes made an appendix, updated credits section + * [r1611] Release notes made an appendix, updated credits section -2005-04-13 14:24 strk +2005-04-13 14:24 Sandro Santilli <strk@keybit.net> - * Added MINGW support as suggested by David Techer. + * [r1610] Added MINGW support as suggested by David Techer. -2005-04-12 11:18 strk +2005-04-12 11:18 Sandro Santilli <strk@keybit.net> - * Added release notes for 1.0.0 final + * [r1609] Added release notes for 1.0.0 final -2005-04-12 11:17 strk +2005-04-12 11:17 Sandro Santilli <strk@keybit.net> - * XSLBASE made back-redefinable + * [r1608] XSLBASE made back-redefinable -2005-04-08 06:45 pramsey +2005-04-08 06:45 Paul Ramsey <pramsey@cleverelephant.ca> - * Make xsl reference work for rackmount nightly build + * [r1607] Make xsl reference work for rackmount nightly build 2005-04-07 21:02 mschaber - * typo fixes and linked function in 4.2.4 + * [r1606] typo fixes and linked function in 4.2.4 -2005-04-07 19:03 strk +2005-04-07 19:03 Sandro Santilli <strk@keybit.net> - * Added new strict OGC compliancy enforcement sector of manual + * [r1605] Added new strict OGC compliancy enforcement sector of + manual -2005-04-07 19:00 strk +2005-04-07 19:00 Sandro Santilli <strk@keybit.net> - * Corrected and augmented the new chapter about ensuring OGC - compliancy. + * [r1604] Corrected and augmented the new chapter about ensuring + OGC compliancy. 2005-04-07 09:32 mschaber - * Added information about geometry validity. + * [r1603] Added information about geometry validity. -2005-04-06 16:49 strk +2005-04-06 16:49 Sandro Santilli <strk@keybit.net> - * Added -p flag addition for shp2pgsql + * [r1602] Added -p flag addition for shp2pgsql -2005-04-06 14:16 strk +2005-04-06 14:16 Sandro Santilli <strk@keybit.net> - * Removed manual update of gid field. + * [r1601] Removed manual update of gid field. 2005-04-06 14:02 mschaber - * added -p option (prepare mode) that spits out the table schema - without + * [r1600] added -p option (prepare mode) that spits out the table + schema without inserting any data. -2005-04-06 10:46 strk +2005-04-06 10:46 Sandro Santilli <strk@keybit.net> - * Bugfix in -w (hwgeom) handling of ZM shapefiles. + * [r1599] Bugfix in -w (hwgeom) handling of ZM shapefiles. Big reorganizzation of code to easy maintainance. -2005-04-06 08:53 strk +2005-04-06 08:53 Sandro Santilli <strk@keybit.net> - * force_3dm() bugfix + * [r1598] force_3dm() bugfix -2005-04-06 08:53 strk +2005-04-06 08:53 Sandro Santilli <strk@keybit.net> - * Augmented memory allocated by force_3dm() - detected cases of - memory shortage + * [r1597] Augmented memory allocated by force_3dm() - detected + cases of memory shortage 2005-04-05 13:43 mschaber - * Fix documentation of -D option in shp2pgsql manpage + * [r1596] Fix documentation of -D option in shp2pgsql manpage -2005-04-05 10:18 strk +2005-04-05 10:18 Sandro Santilli <strk@keybit.net> - * Added transform() bugfix + * [r1595] Added transform() bugfix -2005-04-05 10:18 strk +2005-04-05 10:18 Sandro Santilli <strk@keybit.net> - * BUGFIX in transform() releaseing random memory address + * [r1594] BUGFIX in transform() releaseing random memory address -2005-04-05 08:00 strk +2005-04-05 08:00 Sandro Santilli <strk@keybit.net> - * Documented loader support for 0.x versions + * [r1593] Documented loader support for 0.x versions -2005-04-04 20:51 strk +2005-04-04 20:51 Sandro Santilli <strk@keybit.net> - * Added -w flag to output old (WKT/HWGEOM) sql. + * [r1592] Added -w flag to output old (WKT/HWGEOM) sql. -2005-04-04 09:48 strk +2005-04-04 09:48 Sandro Santilli <strk@keybit.net> - * Added install of loader/dumper manual pages + * [r1591] Added install of loader/dumper manual pages -2005-04-01 09:39 strk +2005-04-01 09:39 Sandro Santilli <strk@keybit.net> - * Added not about new manual pages + * [r1590] Added not about new manual pages -2005-04-01 09:38 strk +2005-04-01 09:38 Sandro Santilli <strk@keybit.net> - * Added manual pages provided by Roberto Boati + * [r1589] Added manual pages provided by Roberto Boati <roberto.boati@daisyred.com> -2005-03-30 17:25 strk +2005-03-30 17:25 Sandro Santilli <strk@keybit.net> - * Updated to replace 'RC' into '-rc' when building package dir (and - tar). + * [r1588] Updated to replace 'RC' into '-rc' when building package + dir (and tar). Removed autom4te.cache directory after call to autoconf. -2005-03-30 17:03 strk +2005-03-30 17:03 Sandro Santilli <strk@keybit.net> - * Scripts version set to 0.3.0 (minor increment as a scripts - override won't + * [r1586] Scripts version set to 0.3.0 (minor increment as a + scripts override won't suffice to get rid of dropped box2d funx). Set release date and other versions to RC6 2005-03-30 15:24 mschaber - * Preliminary change email addres to private one because + * [r1585] Preliminary change email addres to private one because schabios@logi-track.com is currently not working. -2005-03-30 11:47 strk +2005-03-30 11:47 Sandro Santilli <strk@keybit.net> - * Added RC6 release notes. + * [r1584] Added RC6 release notes. -2005-03-30 11:46 strk +2005-03-30 11:46 Sandro Santilli <strk@keybit.net> - * Obsoleted functions set back in, to avoid problems upgrading. + * [r1583] Obsoleted functions set back in, to avoid problems + upgrading. -2005-03-30 11:40 strk +2005-03-30 11:40 Sandro Santilli <strk@keybit.net> - * Removed obsoleted box2d functions + * [r1582] Removed obsoleted box2d functions -2005-03-29 16:34 strk +2005-03-29 16:34 Sandro Santilli <strk@keybit.net> - * Added postgis_restore.pl bugfix + * [r1581] Added postgis_restore.pl bugfix -2005-03-29 16:33 strk +2005-03-29 16:33 Sandro Santilli <strk@keybit.net> - * Changed she-bang back the way it was (disabled) - didn't work - like that! Added {x,y}{min,max}(box2d) to list of obsoleted funx. + * [r1580] Changed she-bang back the way it was (disabled) - didn't + work like that! Added {x,y}{min,max}(box2d) to list of obsoleted + funx. 2005-03-29 13:23 mschaber - * Fix build for win32 using mingw + * [r1579] Fix build for win32 using mingw -2005-03-28 11:37 strk +2005-03-28 11:37 Sandro Santilli <strk@keybit.net> - * Dropped {x,y}{min,max}(box2d) functions + * [r1578] Dropped {x,y}{min,max}(box2d) functions -2005-03-28 09:48 strk +2005-03-28 09:48 Sandro Santilli <strk@keybit.net> - * Added multi() changes + * [r1577] Added multi() changes -2005-03-28 09:47 strk +2005-03-28 09:47 Sandro Santilli <strk@keybit.net> - * Fixed bug in multi() leaving SRID in inner geometries. + * [r1576] Fixed bug in multi() leaving SRID in inner geometries. Added early return for already multi() and BBOX'ed geoms. -2005-03-28 09:45 strk +2005-03-28 09:45 Sandro Santilli <strk@keybit.net> - * Added regress tests for multi() + * [r1575] Added regress tests for multi() -2005-03-25 18:43 strk +2005-03-25 18:43 Sandro Santilli <strk@keybit.net> - * Fixed PQunescapeBytearea argument (might give problems on 64bit - archs) + * [r1574] Fixed PQunescapeBytearea argument (might give problems on + 64bit archs) -2005-03-25 16:38 strk +2005-03-25 16:38 Sandro Santilli <strk@keybit.net> - * MICRO_VERSION set to RC5 + * [r1572] MICRO_VERSION set to RC5 -2005-03-25 16:38 strk +2005-03-25 16:38 Sandro Santilli <strk@keybit.net> - * Added release date and version + * [r1571] Added release date and version -2005-03-25 16:37 strk +2005-03-25 16:37 Sandro Santilli <strk@keybit.net> - * Added release dates + * [r1570] Added release dates -2005-03-25 16:28 strk +2005-03-25 16:28 Sandro Santilli <strk@keybit.net> - * Added a not in performance tips chapter about dimension + * [r1569] Added a not in performance tips chapter about dimension constraints. Removed part on update_geometry_stats as it should have no effect. -2005-03-25 14:49 strk +2005-03-25 14:49 Sandro Santilli <strk@keybit.net> - * generalized Other changes + * [r1568] generalized Other changes -2005-03-25 14:48 strk +2005-03-25 14:48 Sandro Santilli <strk@keybit.net> - * Fixed bogus she-bang + * [r1567] Fixed bogus she-bang -2005-03-25 13:56 strk +2005-03-25 13:56 Sandro Santilli <strk@keybit.net> - * Updated release notes section + * [r1566] Updated release notes section -2005-03-25 09:34 strk +2005-03-25 09:34 Sandro Santilli <strk@keybit.net> - * code cleanup + * [r1565] code cleanup 2005-03-24 18:01 mschaber - * additional performance tips + * [r1564] additional performance tips -2005-03-24 16:28 strk +2005-03-24 16:28 Sandro Santilli <strk@keybit.net> - * Variable declaration set in place in lwgeom_centroid() + * [r1563] Variable declaration set in place in lwgeom_centroid() -2005-03-24 16:27 strk +2005-03-24 16:27 Sandro Santilli <strk@keybit.net> - * Added estimated_extent() bugfix notice + * [r1562] Added estimated_extent() bugfix notice -2005-03-24 16:27 strk +2005-03-24 16:27 Sandro Santilli <strk@keybit.net> - * Added comments in estimate_allocation() bugfix point. + * [r1561] Added comments in estimate_allocation() bugfix point. -2005-03-24 15:07 strk +2005-03-24 15:07 Sandro Santilli <strk@keybit.net> - * Fixed non-GEOS centroid() function to avoid obsoleted + * [r1560] Fixed non-GEOS centroid() function to avoid obsoleted LWGEOM_EXPLODED funx -2005-03-24 14:45 strk +2005-03-24 14:45 Sandro Santilli <strk@keybit.net> - * Fixed bug in estimated_extent() returning pointer to a memory - allocated in SPI memory context + * [r1559] Fixed bug in estimated_extent() returning pointer to a + memory allocated in SPI memory context -2005-03-23 17:10 strk +2005-03-23 17:10 Sandro Santilli <strk@keybit.net> - * Removed cr + * [r1558] Removed cr -2005-03-23 16:29 strk +2005-03-23 16:29 Sandro Santilli <strk@keybit.net> - * Added box3d computation tests + * [r1557] Added box3d computation tests -2005-03-23 16:24 strk +2005-03-23 16:24 Sandro Santilli <strk@keybit.net> - * added box3d computation fix + * [r1556] added box3d computation fix -2005-03-23 16:23 strk +2005-03-23 16:23 Sandro Santilli <strk@keybit.net> - * Fixed bug in box3d computation. + * [r1555] Fixed bug in box3d computation. Dropped obsoleted LWGEOM_EXPLODED structure and associated functions. -2005-03-21 17:56 strk +2005-03-21 17:56 Sandro Santilli <strk@keybit.net> - * grep -v arg quoted.. + * [r1554] grep -v arg quoted.. -2005-03-21 17:52 strk +2005-03-21 17:52 Sandro Santilli <strk@keybit.net> - * Quoted grep argument + * [r1553] Quoted grep argument 2005-03-21 13:43 mschaber - * handle versioned jars in cvsignore + * [r1552] handle versioned jars in cvsignore -2005-03-21 12:24 strk +2005-03-21 12:24 Sandro Santilli <strk@keybit.net> - * Expanded estimated_extent() paragraph to document differences - between pre + * [r1551] Expanded estimated_extent() paragraph to document + differences between pre and post pgsql 800. -2005-03-18 21:04 strk +2005-03-18 21:04 Sandro Santilli <strk@keybit.net> - * Set release date + * [r1549] Set release date -2005-03-18 17:47 strk +2005-03-18 17:47 Sandro Santilli <strk@keybit.net> - * postgis_restore.pl improvements + * [r1548] postgis_restore.pl improvements -2005-03-18 17:23 strk +2005-03-18 17:23 Sandro Santilli <strk@keybit.net> - * Hash used for detecting obsoleted funx in dump + * [r1547] Hash used for detecting obsoleted funx in dump -2005-03-18 12:43 strk +2005-03-18 12:43 Sandro Santilli <strk@keybit.net> - * Fixed missing use of _IMMUTABLE_STRICT define in new + * [r1546] Fixed missing use of _IMMUTABLE_STRICT define in new get_proj4_from_srid(). Improvement in Makefile to allow reconstruction of missing ../lwpostgis.sql -2005-03-18 12:37 strk +2005-03-18 12:37 Sandro Santilli <strk@keybit.net> - * added box3d-computation bugfix note + * [r1545] added box3d-computation bugfix note -2005-03-18 12:36 strk +2005-03-18 12:36 Sandro Santilli <strk@keybit.net> - * Big API cleanup. + * [r1544] Big API cleanup. Bug fix in box3d computation for collections containing empty elements. -2005-03-18 10:47 strk +2005-03-18 10:47 Sandro Santilli <strk@keybit.net> - * Added extent(), extent3d() and collect() tests - should really + * [r1543] Added extent(), extent3d() and collect() tests - should + really give this tests a new layout ... -2005-03-17 18:14 strk +2005-03-17 18:14 Sandro Santilli <strk@keybit.net> - * box2d outupt precision increment + * [r1542] box2d outupt precision increment -2005-03-17 18:11 strk +2005-03-17 18:11 Sandro Santilli <strk@keybit.net> - * BOX2D output reverted to .15g precision + * [r1541] BOX2D output reverted to .15g precision -2005-03-17 09:39 strk +2005-03-17 09:39 Sandro Santilli <strk@keybit.net> - * Early memory releases in lwgeom_translate_recursive + * [r1540] Early memory releases in lwgeom_translate_recursive -2005-03-16 15:08 strk +2005-03-16 15:08 Sandro Santilli <strk@keybit.net> - * Changed get_proj4_from_srid() implementation from SQL to PLPGSQL - to + * [r1539] Changed get_proj4_from_srid() implementation from SQL to + PLPGSQL to workaround a bug of pgsql8.0.{1,2} -2005-03-16 11:41 strk +2005-03-16 11:41 Sandro Santilli <strk@keybit.net> - * Early memory releases on transform_geometry_recursive() and - LWGEOM_asText(). + * [r1538] Early memory releases on transform_geometry_recursive() + and LWGEOM_asText(). Code cleanups. -2005-03-15 12:24 strk +2005-03-15 12:24 Sandro Santilli <strk@keybit.net> - * hole-in-ring detector made more readable + * [r1537] hole-in-ring detector made more readable -2005-03-15 09:25 strk +2005-03-15 09:25 Sandro Santilli <strk@keybit.net> - * Added loader bug fix + * [r1536] Added loader bug fix -2005-03-14 22:02 strk +2005-03-14 22:02 Sandro Santilli <strk@keybit.net> - * Fixed holes handling. + * [r1535] Fixed holes handling. -2005-03-14 11:31 strk +2005-03-14 11:31 Sandro Santilli <strk@keybit.net> - * Added cleanup of versioned jars + * [r1534] Added cleanup of versioned jars -2005-03-14 11:14 strk +2005-03-14 11:14 Sandro Santilli <strk@keybit.net> - * installdirs/clean rules cleanup suggested by Alex Bodnaru + * [r1533] installdirs/clean rules cleanup suggested by Alex Bodnaru -2005-03-11 17:56 strk +2005-03-11 17:56 Sandro Santilli <strk@keybit.net> - * Early memory release in transform_geom + * [r1532] Early memory release in transform_geom -2005-03-11 17:47 strk +2005-03-11 17:47 Sandro Santilli <strk@keybit.net> - * Fixed destructive memory release in LWGEOM_translate() + * [r1531] Fixed destructive memory release in LWGEOM_translate() -2005-03-11 17:47 strk +2005-03-11 17:47 Sandro Santilli <strk@keybit.net> - * Added test for translate() + * [r1530] Added test for translate() -2005-03-10 21:37 strk +2005-03-10 21:37 Sandro Santilli <strk@keybit.net> - * added 64bit bug fix + * [r1529] added 64bit bug fix -2005-03-10 19:26 strk +2005-03-10 19:26 Sandro Santilli <strk@keybit.net> - * Hopefully fixed bug in int4 and double reader from byte stream - (was not + * [r1528] Hopefully fixed bug in int4 and double reader from byte + stream (was not working on 64bit machines). -2005-03-10 18:19 strk +2005-03-10 18:19 Sandro Santilli <strk@keybit.net> - * Made void args explicit to make newer compilers happy + * [r1527] Made void args explicit to make newer compilers happy -2005-03-10 18:18 strk +2005-03-10 18:18 Sandro Santilli <strk@keybit.net> - * changed report_error typedef to allow for lwerror usage w/out - problems + * [r1526] changed report_error typedef to allow for lwerror usage + w/out problems 2005-03-08 18:36 mschaber - * Additional explanations in README. + * [r1525] Additional explanations in README. 2005-03-08 18:32 mschaber - * Fix possible null pointer exception if PostGIS is compiled - without geos / proj support. + * [r1524] Fix possible null pointer exception if PostGIS is + compiled without geos / proj support. -2005-03-08 16:46 strk +2005-03-08 16:46 Sandro Santilli <strk@keybit.net> - * More cleanups on 'clean' + * [r1523] More cleanups on 'clean' -2005-03-08 16:41 strk +2005-03-08 16:41 Sandro Santilli <strk@keybit.net> - * Simplified clean rule + * [r1522] Simplified clean rule -2005-03-08 16:39 strk +2005-03-08 16:39 Sandro Santilli <strk@keybit.net> - * Added configure script removal in maintainer-clean rule + * [r1521] Added configure script removal in maintainer-clean rule -2005-03-08 16:00 strk +2005-03-08 16:00 Sandro Santilli <strk@keybit.net> - * Deleted libjts directory... libjts production should happen from - within JTS itself. + * [r1520] Deleted libjts directory... libjts production should + happen from within JTS itself. -2005-03-08 15:44 strk +2005-03-08 15:44 Sandro Santilli <strk@keybit.net> - * Changed default JTS includes and lib paths + * [r1519] Changed default JTS includes and lib paths -2005-03-08 12:39 strk +2005-03-08 12:39 Sandro Santilli <strk@keybit.net> - * Added libjts build scripts + * [r1518] Added libjts build scripts -2005-03-08 12:21 strk +2005-03-08 12:21 Sandro Santilli <strk@keybit.net> - * Added a distclean rule to get rid of autoconf-generated files. + * [r1517] Added a distclean rule to get rid of autoconf-generated + files. Had maintainer-clean rule invoke distclean rule. -2005-03-08 12:13 strk +2005-03-08 12:13 Sandro Santilli <strk@keybit.net> - * set USE_JTS back to 0 - got set to 1 from previous commit + * [r1516] set USE_JTS back to 0 - got set to 1 from previous commit -2005-03-08 12:11 strk +2005-03-08 12:11 Sandro Santilli <strk@keybit.net> - * Added utils rule to set the execute bit on utilities. + * [r1515] Added utils rule to set the execute bit on utilities. -2005-03-08 12:04 strk +2005-03-08 12:04 Sandro Santilli <strk@keybit.net> - * synced makefiles, changed default path of libjts + * [r1514] synced makefiles, changed default path of libjts -2005-03-08 11:24 strk +2005-03-08 11:24 Sandro Santilli <strk@keybit.net> - * Commented out debugging lines + * [r1513] Commented out debugging lines -2005-03-08 11:24 strk +2005-03-08 11:24 Sandro Santilli <strk@keybit.net> - * avoided initializzation of JvNewObjectArray with undefined - pointer + * [r1512] avoided initializzation of JvNewObjectArray with + undefined pointer -2005-03-08 11:06 strk +2005-03-08 11:06 Sandro Santilli <strk@keybit.net> - * modernized old-style parameter declarations + * [r1511] modernized old-style parameter declarations -2005-03-08 09:42 strk +2005-03-08 09:42 Sandro Santilli <strk@keybit.net> - * Added estimator changes + * [r1510] Added estimator changes -2005-03-08 09:27 strk +2005-03-08 09:27 Sandro Santilli <strk@keybit.net> - * RESTRICT selectivity estimator use self->varno instead of + * [r1509] RESTRICT selectivity estimator use self->varno instead of varRelid. Seems to work for subqueries... -2005-03-08 09:23 strk +2005-03-08 09:23 Sandro Santilli <strk@keybit.net> - * Fixed debugging lines. + * [r1508] Fixed debugging lines. -2005-03-08 08:38 strk +2005-03-08 08:38 Sandro Santilli <strk@keybit.net> - * Discarded environmental variable USE_JTS to avoid unexpected - enabling + * [r1507] Discarded environmental variable USE_JTS to avoid + unexpected enabling -2005-03-07 21:24 strk +2005-03-07 21:24 Sandro Santilli <strk@keybit.net> - * Added missing JTSnoop prototype + * [r1506] Added missing JTSnoop prototype -2005-03-07 21:19 strk +2005-03-07 21:19 Sandro Santilli <strk@keybit.net> - * Put optimization flag back to -O2 + * [r1505] Put optimization flag back to -O2 -2005-03-07 21:11 strk +2005-03-07 21:11 Sandro Santilli <strk@keybit.net> - * Removed stub functions (moved to lwgeom_nojts.c) and added stub + * [r1504] Removed stub functions (moved to lwgeom_nojts.c) and + added stub for JTSnoop. -2005-03-07 21:07 strk +2005-03-07 21:07 Sandro Santilli <strk@keybit.net> - * Added initial JTS wrapper. + * [r1503] Added initial JTS wrapper. -2005-03-07 21:06 strk +2005-03-07 21:06 Sandro Santilli <strk@keybit.net> - * Added spatial_ref_sys.sql and README.postgis to scripts install - targets. + * [r1502] Added spatial_ref_sys.sql and README.postgis to scripts + install targets. Moved .sql scripts from ...$(datadir) to ...$(datadir)/contrib. Modified GEOS/JTS stub handling to use separate file when disabled. -2005-03-07 20:47 strk +2005-03-07 20:47 Sandro Santilli <strk@keybit.net> - * Separate stub funx file for builds w/out GEOS or JTS + * [r1501] Separate stub funx file for builds w/out GEOS or JTS -2005-03-07 20:46 strk +2005-03-07 20:46 Sandro Santilli <strk@keybit.net> - * sync'd with Makefile.config + * [r1500] sync'd with Makefile.config -2005-03-07 20:44 strk +2005-03-07 20:44 Sandro Santilli <strk@keybit.net> - * Added JTS support parameter + * [r1499] Added JTS support parameter -2005-03-07 18:36 strk +2005-03-07 18:36 Sandro Santilli <strk@keybit.net> - * Sync with Makefile.config + * [r1498] Sync with Makefile.config -2005-03-07 16:08 strk +2005-03-07 16:08 Sandro Santilli <strk@keybit.net> - * Incremented SCRIPTS_VERSION micro num + * [r1497] Incremented SCRIPTS_VERSION micro num -2005-03-07 13:58 strk +2005-03-07 13:58 Sandro Santilli <strk@keybit.net> - * Added process id to output files. Removed 'clean' rule. + * [r1496] Added process id to output files. Removed 'clean' rule. -2005-03-07 13:20 strk +2005-03-07 13:20 Sandro Santilli <strk@keybit.net> - * Removed unused lwexploded_dump() function + * [r1495] Removed unused lwexploded_dump() function 2005-03-07 11:53 mschaber - * Fix version.in vs. version.config typo + * [r1494] Fix version.in vs. version.config typo -2005-03-04 19:34 strk +2005-03-04 19:34 Sandro Santilli <strk@keybit.net> - * cleanups - version file source + * [r1493] cleanups - version file source -2005-03-04 19:31 mleslie +2005-03-04 19:31 Mark Leslie <mark.leslie@lisasoft.com> - * Cleaned up distance_sphere and updated documentation. + * [r1492] Cleaned up distance_sphere and updated documentation. -2005-03-04 19:25 strk +2005-03-04 19:25 Sandro Santilli <strk@keybit.net> - * removed temp files used in docs creation step + * [r1491] removed temp files used in docs creation step -2005-03-04 19:18 strk +2005-03-04 19:18 Sandro Santilli <strk@keybit.net> - * Expanded "upgrading" chapter to explain postgis_restore.pl - upgrade procedure. + * [r1490] Expanded "upgrading" chapter to explain + postgis_restore.pl upgrade procedure. -2005-03-04 19:18 strk +2005-03-04 19:18 Sandro Santilli <strk@keybit.net> - * Made 'html' the default rule + * [r1489] Made 'html' the default rule -2005-03-04 19:15 strk +2005-03-04 19:15 Sandro Santilli <strk@keybit.net> - * Parametrized XSLBASE directory + * [r1488] Parametrized XSLBASE directory -2005-03-04 16:29 strk +2005-03-04 16:29 Sandro Santilli <strk@keybit.net> - * Changed to use Version.config + * [r1487] Changed to use Version.config -2005-03-04 15:54 strk +2005-03-04 15:54 Sandro Santilli <strk@keybit.net> - * Commented out unused variable + * [r1486] Commented out unused variable 2005-03-04 15:25 mschaber - * added version improvement to changes + * [r1485] added version improvement to changes 2005-03-04 15:22 mschaber - * - Separates the version config variables into the toplevel - Version.config + * [r1484] - Separates the version config variables into the + toplevel Version.config - Adds new version config variables for jdbc @@ -13241,247 +33251,255 @@ initialize its values, so it is always "in sync" with Version.config -2005-03-04 14:55 strk +2005-03-04 14:55 Sandro Santilli <strk@keybit.net> - * Added loader/dumper bug fixes + * [r1483] Added loader/dumper bug fixes -2005-03-04 14:54 strk +2005-03-04 14:54 Sandro Santilli <strk@keybit.net> - * Fixed bug in multiline handling. + * [r1482] Fixed bug in multiline handling. -2005-03-04 14:48 strk +2005-03-04 14:48 Sandro Santilli <strk@keybit.net> - * Applied patch from Jonne Savolainen fixing multilines handling + * [r1481] Applied patch from Jonne Savolainen fixing multilines + handling -2005-03-04 14:25 strk +2005-03-04 14:25 Sandro Santilli <strk@keybit.net> - * Added 'test' and 'maintainer-clean' rules. + * [r1480] Added 'test' and 'maintainer-clean' rules. -2005-03-04 14:25 strk +2005-03-04 14:25 Sandro Santilli <strk@keybit.net> - * Added a maintainer-clean rule. + * [r1479] Added a maintainer-clean rule. -2005-03-04 14:13 strk +2005-03-04 14:13 Sandro Santilli <strk@keybit.net> - * Parametrized test output dir and added Makefile + * [r1478] Parametrized test output dir and added Makefile 2005-03-04 11:03 mschaber - * another make install fix :-( + * [r1477] another make install fix :-( -2005-03-04 09:03 strk +2005-03-04 09:03 Sandro Santilli <strk@keybit.net> - * PG_LWGEOM_construct() moved from lwgeom_api.c to lwgeom_pg.c. + * [r1476] PG_LWGEOM_construct() moved from lwgeom_api.c to + lwgeom_pg.c. -2005-03-04 08:52 strk +2005-03-04 08:52 Sandro Santilli <strk@keybit.net> - * Modified upgrade section to show postgis_restore.pl based + * [r1475] Modified upgrade section to show postgis_restore.pl based procedure. 2005-03-04 07:51 mschaber - * another "make install" fix from alex + * [r1474] another "make install" fix from alex 2005-03-04 07:48 mschaber - * Adopted Version.java to the official PostGIS scheme. + * [r1473] Adopted Version.java to the official PostGIS scheme. 2005-03-04 07:36 mschaber - * Updated VERSION to RC4 + * [r1472] Updated VERSION to RC4 2005-03-04 07:32 mschaber - * Removed unneccesarry TEMP variable + * [r1471] Removed unneccesarry TEMP variable 2005-03-03 22:12 mschaber - * removed obsolete build.xml + * [r1470] removed obsolete build.xml 2005-03-03 21:55 mschaber - * Make classpath element separator configurable + * [r1469] Make classpath element separator configurable 2005-03-03 20:55 mschaber - * jdbc2 naming explanation + * [r1468] jdbc2 naming explanation Contact info Copyright notice 2005-03-03 19:08 mschaber - * add postgis_debug.jar to make install (thx to alex bodnaru) + * [r1467] add postgis_debug.jar to make install (thx to alex + bodnaru) -2005-03-03 17:20 mleslie +2005-03-03 17:20 Mark Leslie <mark.leslie@lisasoft.com> - * Rebuilt the distance_sphere function. + * [r1466] Rebuilt the distance_sphere function. 2005-03-03 16:06 mschaber - * Fix compile with jikes + * [r1465] Fix compile with jikes -2005-03-03 10:32 strk +2005-03-03 10:32 Sandro Santilli <strk@keybit.net> - * parser additions note + * [r1464] parser additions note -2005-03-03 10:31 strk +2005-03-03 10:31 Sandro Santilli <strk@keybit.net> - * Removed generated parser files. + * [r1463] Removed generated parser files. -2005-03-03 10:29 strk +2005-03-03 10:29 Sandro Santilli <strk@keybit.net> - * Added generated parsers to avoid FLEX/YACC requirement on + * [r1462] Added generated parsers to avoid FLEX/YACC requirement on release. -2005-03-02 17:29 strk +2005-03-02 17:29 Sandro Santilli <strk@keybit.net> - * Commented out parser generation... requires PGSQL source :( + * [r1461] Commented out parser generation... requires PGSQL source + :( -2005-03-02 17:26 strk +2005-03-02 17:26 Sandro Santilli <strk@keybit.net> - * Added parser generation. + * [r1460] Added parser generation. -2005-03-02 17:04 strk +2005-03-02 17:04 Sandro Santilli <strk@keybit.net> - * added FLEX & YACC fix + * [r1459] added FLEX & YACC fix 2005-03-02 13:10 mschaber - * Additional Regression Test for prepared statement usage + * [r1458] Additional Regression Test for prepared statement usage 2005-03-02 12:06 mschaber - * Code cleanups, Makefile improvements. + * [r1457] Code cleanups, Makefile improvements. -2005-03-01 13:22 strk +2005-03-01 13:22 Sandro Santilli <strk@keybit.net> - * Renamed lwgeom_to_wkt to lwgeom_to_ewkt, as it doesn't strip out - non-ogc + * [r1456] Renamed lwgeom_to_wkt to lwgeom_to_ewkt, as it doesn't + strip out non-ogc extensions. -2005-03-01 13:20 strk +2005-03-01 13:20 Sandro Santilli <strk@keybit.net> - * Corrected expected results. + * [r1455] Corrected expected results. -2005-03-01 11:41 strk +2005-03-01 11:41 Sandro Santilli <strk@keybit.net> - * Added GEOS/JTS provided functions test + * [r1454] Added GEOS/JTS provided functions test -2005-03-01 08:43 strk +2005-03-01 08:43 Sandro Santilli <strk@keybit.net> - * Fixed install-lwgeom-scripts rule as suggested by Rhys + * [r1453] Fixed install-lwgeom-scripts rule as suggested by Rhys Ickeringill. -2005-03-01 08:40 strk +2005-03-01 08:40 Sandro Santilli <strk@keybit.net> - * FLEX and YACC variables set after PGSQL/Makefile.global has been - sourced + * [r1452] FLEX and YACC variables set after PGSQL/Makefile.global + has been sourced and only if not therein defined. -2005-03-01 01:17 pramsey +2005-03-01 01:17 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix link error. + * [r1451] Fix link error. 2005-02-28 09:57 mschaber - * Add serialVersionUID for jdk1.5 + * [r1450] Add serialVersionUID for jdk1.5 correctly setType(), needed for jdbc 8.0+ 2005-02-28 08:14 mschaber - * Add serialVersionUID for jdk1.5 + * [r1449] Add serialVersionUID for jdk1.5 correctly setType(), needed for jdbc 8.0+ -2005-02-25 13:44 strk +2005-02-25 13:44 Sandro Santilli <strk@keybit.net> - * Added geom_accum and SnapToGrid bug fixes + * [r1448] Added geom_accum and SnapToGrid bug fixes -2005-02-25 13:42 strk +2005-02-25 13:42 Sandro Santilli <strk@keybit.net> - * SnapToGrid: Fixed minor bug in consistency check. + * [r1447] SnapToGrid: Fixed minor bug in consistency check. -2005-02-25 13:28 strk +2005-02-25 13:28 Sandro Santilli <strk@keybit.net> - * Fixed a bugus free() in LWGEOM_accum. + * [r1446] Fixed a bugus free() in LWGEOM_accum. -2005-02-25 09:34 strk +2005-02-25 09:34 Sandro Santilli <strk@keybit.net> - * added force_collection early return + * [r1445] added force_collection early return -2005-02-25 09:31 strk +2005-02-25 09:31 Sandro Santilli <strk@keybit.net> - * Added early return from force_collection when input is already a - collection + * [r1444] Added early return from force_collection when input is + already a collection AND has a bbox cache. Suggested by Ron Majer. -2005-02-25 08:57 strk +2005-02-25 08:57 Sandro Santilli <strk@keybit.net> - * Added comment on top of TYPE macros + * [r1443] Added comment on top of TYPE macros 2005-02-24 14:13 mschaber - * Fixed makefile to allow compilation via kaffe javac - this + * [r1442] Fixed makefile to allow compilation via kaffe javac - + this one does not automatically include non-mentioned source files that are present in the classpath. 2005-02-24 11:43 mschaber - * moved trim() call, this avoids calling trim() twice on unchanged - value if we have only (1 2,3 4) rep. + * [r1441] moved trim() call, this avoids calling trim() twice on + unchanged value if we have only (1 2,3 4) rep. 2005-02-24 11:20 mschaber - * Additional regression tests for EWKT and EWKB on PostGIS 1.X + * [r1440] Additional regression tests for EWKT and EWKB on PostGIS + 1.X -2005-02-24 08:36 strk +2005-02-24 08:36 Sandro Santilli <strk@keybit.net> - * Added missing prototype + * [r1438] Added missing prototype -2005-02-24 08:32 strk +2005-02-24 08:32 Sandro Santilli <strk@keybit.net> - * Fixed bug in StartPoint and EndPoint functions. + * [r1437] Fixed bug in StartPoint and EndPoint functions. -2005-02-24 08:10 strk +2005-02-24 08:10 Sandro Santilli <strk@keybit.net> - * lib version changed to 1.0.0RC3, scripts version to 0.2.0. + * [r1436] lib version changed to 1.0.0RC3, scripts version to + 0.2.0. -2005-02-24 08:08 strk +2005-02-24 08:08 Sandro Santilli <strk@keybit.net> - * Added spatial_ref_sys change and version/release + * [r1435] Added spatial_ref_sys change and version/release -2005-02-23 19:17 pramsey +2005-02-23 19:17 Paul Ramsey <pramsey@cleverelephant.ca> - * Hand edit paris central meridian definitions. + * [r1434] Hand edit paris central meridian definitions. Danger: other non-Greenwich projections might also have problems. 2005-02-23 13:31 mschaber - * another fastjar fix + * [r1433] another fastjar fix 2005-02-23 13:19 mschaber - * Fixed jikes compiler warning, using super. for static methods is - suboptimal. + * [r1432] Fixed jikes compiler warning, using super. for static + methods is suboptimal. -2005-02-23 09:59 strk +2005-02-23 09:59 Sandro Santilli <strk@keybit.net> - * GeometryFromText() bug fix + * [r1431] GeometryFromText() bug fix -2005-02-23 09:58 strk +2005-02-23 09:58 Sandro Santilli <strk@keybit.net> - * Fixed GeometryFromText() to add a bbox cache FOR_COMPLEX_GEOMS + * [r1430] Fixed GeometryFromText() to add a bbox cache + FOR_COMPLEX_GEOMS -2005-02-23 09:44 strk +2005-02-23 09:44 Sandro Santilli <strk@keybit.net> - * Added bool::text cast + * [r1429] Added bool::text cast -2005-02-23 09:00 strk +2005-02-23 09:00 Sandro Santilli <strk@keybit.net> - * Added bool::text cast. + * [r1428] Added bool::text cast. 2005-02-22 18:10 mschaber - * Updated jdbc2/Makefile: + * [r1427] Updated jdbc2/Makefile: - more comments - all helper binaries are now configurable @@ -13494,154 +33512,157 @@ 2005-02-22 13:05 mschaber - * Removed unused import + * [r1426] Removed unused import 2005-02-22 13:04 mschaber - * Some more debian woody fixes. + * [r1425] Some more debian woody fixes. 2005-02-22 13:01 mschaber - * Remove redundant addDataType() call that slipped in during + * [r1424] Remove redundant addDataType() call that slipped in + during WKT measured geometries work. It also broke pgjdbc7.2 compatibility. 2005-02-22 12:31 mschaber - * Patches from Alex Bodnaru (debian maintainer) + * [r1423] Patches from Alex Bodnaru (debian maintainer) -2005-02-22 12:12 strk +2005-02-22 12:12 Sandro Santilli <strk@keybit.net> - * Added not about early memory release + * [r1422] Added not about early memory release -2005-02-22 10:10 strk +2005-02-22 10:10 Sandro Santilli <strk@keybit.net> - * Early release of DETOASTED geoms. + * [r1421] Early release of DETOASTED geoms. -2005-02-22 09:59 strk +2005-02-22 09:59 Sandro Santilli <strk@keybit.net> - * Fixed path to lwpostgis.sql script + * [r1420] Fixed path to lwpostgis.sql script -2005-02-22 09:55 strk +2005-02-22 09:55 Sandro Santilli <strk@keybit.net> - * Early release of DETOASTED or deserialized geometries, to reduce - memory usage + * [r1419] Early release of DETOASTED or deserialized geometries, to + reduce memory usage -2005-02-22 09:39 strk +2005-02-22 09:39 Sandro Santilli <strk@keybit.net> - * Forced cleanup of DETOASTED and deserialized geometries for - better memory + * [r1418] Forced cleanup of DETOASTED and deserialized geometries + for better memory usage. 2005-02-21 18:28 mschaber - * *** empty log message *** + * [r1417] *** empty log message *** -2005-02-21 16:22 strk +2005-02-21 16:22 Sandro Santilli <strk@keybit.net> - * Changed min() max() usage with LW_MIN() LW_MAX() + * [r1416] Changed min() max() usage with LW_MIN() LW_MAX() -2005-02-21 16:16 strk +2005-02-21 16:16 Sandro Santilli <strk@keybit.net> - * Changed byte to uchar to avoid clashes with win32 headers. + * [r1415] Changed byte to uchar to avoid clashes with win32 + headers. 2005-02-21 15:49 mschaber - * removed ugly () display + * [r1414] removed ugly () display 2005-02-21 14:59 mschaber - * Added version printing (for debugging purposes) + * [r1413] Added version printing (for debugging purposes) 2005-02-21 14:16 mschaber - * Skip tests that are known to fail when running against older - PostGIS server versions + * [r1412] Skip tests that are known to fail when running against + older PostGIS server versions 2005-02-18 16:01 mschaber - * Some micro optimizations and cleanups + * [r1411] Some micro optimizations and cleanups 2005-02-18 14:49 mschaber - * Added Version.class to allow programatically identification of - PostGIS jdbc version + * [r1410] Added Version.class to allow programatically + identification of PostGIS jdbc version 2005-02-18 14:40 mschaber - * Added beta support for JTS classes + * [r1409] Added beta support for JTS classes -2005-02-18 08:43 strk +2005-02-18 08:43 Sandro Santilli <strk@keybit.net> - * added memory leak fix + * [r1408] added memory leak fix -2005-02-18 08:42 strk +2005-02-18 08:42 Sandro Santilli <strk@keybit.net> - * Removed memory leak in geos2postgis polygon conversion. + * [r1407] Removed memory leak in geos2postgis polygon conversion. -2005-02-17 16:09 strk +2005-02-17 16:09 Sandro Santilli <strk@keybit.net> - * Improved transform() errors verbosity. + * [r1406] Improved transform() errors verbosity. -2005-02-17 15:54 strk +2005-02-17 15:54 Sandro Santilli <strk@keybit.net> - * Syntaxes cleanups. + * [r1405] Syntaxes cleanups. 2005-02-17 15:44 mschaber - * removed verbosity from my last entry + * [r1404] removed verbosity from my last entry 2005-02-17 15:42 mschaber - * fixed postgis_debug.jar + * [r1403] fixed postgis_debug.jar -2005-02-17 15:39 strk +2005-02-17 15:39 Sandro Santilli <strk@keybit.net> - * Fixed some introduced misorderings of func declaration/body. + * [r1402] Fixed some introduced misorderings of func + declaration/body. 2005-02-17 14:48 mschaber - * Fixed dependency handling for jars + * [r1401] Fixed dependency handling for jars 2005-02-17 14:41 mschaber - * Updated makefile - better dependency management for jars, + * [r1400] Updated makefile - better dependency management for jars, additional targets for debian, more comments. -2005-02-17 09:19 strk +2005-02-17 09:19 Sandro Santilli <strk@keybit.net> - * Fixed a bug in pointArray_construct() copying input points - instead + * [r1399] Fixed a bug in pointArray_construct() copying input + points instead of keeping a pointer to them. This has been introduced *after* RC2 was released. -2005-02-17 08:36 strk +2005-02-17 08:36 Sandro Santilli <strk@keybit.net> - * Added wkb_recv and wkb_send obsoleted functions handling + * [r1398] Added wkb_recv and wkb_send obsoleted functions handling -2005-02-14 20:49 strk +2005-02-14 20:49 Sandro Santilli <strk@keybit.net> - * Added force_collection() bug fix + * [r1397] Added force_collection() bug fix -2005-02-14 20:45 strk +2005-02-14 20:45 Sandro Santilli <strk@keybit.net> - * Fixed bug in force_collection() leaving spurious bbox cache and - SRID info + * [r1396] Fixed bug in force_collection() leaving spurious bbox + cache and SRID info in inner geometry when applied to single geoms. 2005-02-14 11:49 mschaber - * Now compiles against 7.2 with some magic trickery instead of - patching. + * [r1395] Now compiles against 7.2 with some magic trickery instead + of patching. -2005-02-10 17:56 strk +2005-02-10 17:56 Sandro Santilli <strk@keybit.net> - * added memory alignment handling + * [r1394] added memory alignment handling -2005-02-10 17:41 strk +2005-02-10 17:41 Sandro Santilli <strk@keybit.net> - * Dropped getbox2d_internal(). + * [r1393] Dropped getbox2d_internal(). Removed all castings of getPoint() output, which has been renamed to getPoint_internal() and commented about danger of using it. Changed SERIALIZED_FORM() macro to use VARDATA() macro. @@ -13649,3406 +33670,3483 @@ alignment constraints which might be the cause of recent crash bug reports. -2005-02-10 17:38 strk +2005-02-10 17:38 Sandro Santilli <strk@keybit.net> - * Added a couple of distance() tests. + * [r1392] Added a couple of distance() tests. -2005-02-10 16:34 strk +2005-02-10 16:34 Sandro Santilli <strk@keybit.net> - * Added -Wall to CFLAGS + * [r1391] Added -Wall to CFLAGS -2005-02-10 10:52 strk +2005-02-10 10:52 Sandro Santilli <strk@keybit.net> - * Changed 'char' to 'uchar' (unsigned char typedef) wherever octet - is actually + * [r1390] Changed 'char' to 'uchar' (unsigned char typedef) + wherever octet is actually meant to be. -2005-02-10 10:03 strk +2005-02-10 10:03 Sandro Santilli <strk@keybit.net> - * Added X(), Y() and Z() tests. + * [r1389] Added X(), Y() and Z() tests. 2005-02-09 18:11 mschaber - * adopt documentation wr/t conflicting driverconfig.properties to + * [r1388] adopt documentation wr/t conflicting + driverconfig.properties to reflect what jdbc actually does. -2005-02-09 11:55 strk +2005-02-09 11:55 Sandro Santilli <strk@keybit.net> - * documentation update item + * [r1387] documentation update item -2005-02-09 11:53 strk +2005-02-09 11:53 Sandro Santilli <strk@keybit.net> - * Removed PGSQL7.1 references, clearly stated support starting from - 72. + * [r1386] Removed PGSQL7.1 references, clearly stated support + starting from 72. Renamed all postgis.sql refs to lwpostgis.sql. -2005-02-09 11:48 strk +2005-02-09 11:48 Sandro Santilli <strk@keybit.net> - * fixed debugging output + * [r1385] fixed debugging output 2005-02-08 17:48 mschaber - * Added patch to enable compilation against pg72jdbc2.jar. + * [r1384] Added patch to enable compilation against pg72jdbc2.jar. 2005-02-08 14:54 mschaber - * Added jdbc2 jdk1.3 enabling note. + * [r1383] Added jdbc2 jdk1.3 enabling note. 2005-02-08 14:53 mschaber - * Removed use of jdk1.4 only features to allow jdbc2 to be + * [r1382] Removed use of jdk1.4 only features to allow jdbc2 to be build with older jdk releases (tested with 1.3) -2005-02-08 08:17 strk +2005-02-08 08:17 Sandro Santilli <strk@keybit.net> - * Reduced scope of VACUUM ANALYZE call to the sole spatial_ref_sys - table + * [r1381] Reduced scope of VACUUM ANALYZE call to the sole + spatial_ref_sys table as suggested by Kevin Neufeld -2005-02-08 07:59 strk +2005-02-08 07:59 Sandro Santilli <strk@keybit.net> - * updated + * [r1380] updated -2005-02-08 07:59 strk +2005-02-08 07:59 Sandro Santilli <strk@keybit.net> - * Fixed probe_geometry_columns to work with PG72 (pg_constraint was - pg_relcheck) + * [r1379] Fixed probe_geometry_columns to work with PG72 + (pg_constraint was pg_relcheck) -2005-02-08 07:37 strk +2005-02-08 07:37 Sandro Santilli <strk@keybit.net> - * Fixed probe_geometry_columns so to work on spatial tables with - multiple + * [r1378] Fixed probe_geometry_columns so to work on spatial tables + with multiple geometry columns. -2005-02-07 14:06 strk +2005-02-07 14:06 Sandro Santilli <strk@keybit.net> - * updated + * [r1377] updated -2005-02-07 14:02 strk +2005-02-07 14:02 Sandro Santilli <strk@keybit.net> - * Fixed broken 72 index bindings. + * [r1376] Fixed broken 72 index bindings. 2005-02-07 13:42 mschaber - * Fixed pgjdbc 8.0 autoregistration. + * [r1375] Fixed pgjdbc 8.0 autoregistration. -2005-02-07 13:21 strk +2005-02-07 13:21 Sandro Santilli <strk@keybit.net> - * Replaced DEBUG* macros with PGIS_DEBUG*, to avoid clashes with - postgresql DEBUG + * [r1374] Replaced DEBUG* macros with PGIS_DEBUG*, to avoid clashes + with postgresql DEBUG -2005-02-07 12:56 strk +2005-02-07 12:56 Sandro Santilli <strk@keybit.net> - * updated CHANGES + * [r1373] updated CHANGES -2005-02-07 12:56 strk +2005-02-07 12:56 Sandro Santilli <strk@keybit.net> - * More portable date command for BUILDDATE extraction + * [r1372] More portable date command for BUILDDATE extraction -2005-02-07 12:32 strk +2005-02-07 12:32 Sandro Santilli <strk@keybit.net> - * updated with next release changes + * [r1371] updated with next release changes -2005-02-07 12:31 strk +2005-02-07 12:31 Sandro Santilli <strk@keybit.net> - * updated + * [r1370] updated 2005-02-07 11:49 mschaber - * Fix makefile (broken by driverconfig.properties rename + * [r1369] Fix makefile (broken by driverconfig.properties rename 2005-02-07 11:31 mschaber - * Removed issues that were done, hoping they will not re-emerge :-) + * [r1368] Removed issues that were done, hoping they will not + re-emerge :-) 2005-02-07 09:15 mschaber - * Fixed jdbc8.0 autoregistration, added regression test. + * [r1367] Fixed jdbc8.0 autoregistration, added regression test. -2005-02-04 17:08 pramsey +2005-02-04 17:08 Paul Ramsey <pramsey@cleverelephant.ca> - * Fixed literal && inside the text, replaced with & + * [r1366] Fixed literal && inside the text, replaced with & -2005-02-04 14:20 strk +2005-02-04 14:20 Sandro Santilli <strk@keybit.net> - * missing license + * [r1365] missing license -2005-02-04 10:20 strk +2005-02-04 10:20 Sandro Santilli <strk@keybit.net> - * Added Performance Tips chapter + * [r1364] Added Performance Tips chapter -2005-02-04 09:05 strk +2005-02-04 09:05 Sandro Santilli <strk@keybit.net> - * Applied Markus Shaber licensing patches. + * [r1363] Applied Markus Shaber licensing patches. -2005-02-01 16:53 strk +2005-02-01 16:53 Sandro Santilli <strk@keybit.net> - * Changed performance-sensible functions from STABLE to IMMUTABLE + * [r1362] Changed performance-sensible functions from STABLE to + IMMUTABLE -2005-02-01 15:26 strk +2005-02-01 15:26 Sandro Santilli <strk@keybit.net> - * Another small patch from Markus + * [r1361] Another small patch from Markus -2005-01-31 22:15 strk +2005-01-31 22:15 Sandro Santilli <strk@keybit.net> - * Added maintainer notice, to reduce Jeff-strk mail bounces + * [r1360] Added maintainer notice, to reduce Jeff-strk mail bounces -2005-01-31 17:17 strk +2005-01-31 17:17 Sandro Santilli <strk@keybit.net> - * Applied Markus Shaber patches. + * [r1359] Applied Markus Shaber patches. -2005-01-31 12:32 strk +2005-01-31 12:32 Sandro Santilli <strk@keybit.net> - * Markus Shaber version. + * [r1358] Markus Shaber version. -2005-01-31 09:24 strk +2005-01-31 09:24 Sandro Santilli <strk@keybit.net> - * Used default float precision in BOX2D output + * [r1357] Used default float precision in BOX2D output -2005-01-31 09:01 strk +2005-01-31 09:01 Sandro Santilli <strk@keybit.net> - * More error handlings in transform(geom, int) + * [r1356] More error handlings in transform(geom, int) -2005-01-30 09:48 strk +2005-01-30 09:48 Sandro Santilli <strk@keybit.net> - * replaced by PGbox2d.java + * [r1355] replaced by PGbox2d.java -2005-01-30 09:46 strk +2005-01-30 09:46 Sandro Santilli <strk@keybit.net> - * Added BOX2D and BOX3D support and tests, by Markus Shaber. + * [r1354] Added BOX2D and BOX3D support and tests, by Markus + Shaber. -2005-01-30 09:12 strk +2005-01-30 09:12 Sandro Santilli <strk@keybit.net> - * Made unparsable proj strings error more verbose and removed a - typo + * [r1353] Made unparsable proj strings error more verbose and + removed a typo in transform_geom(). -2005-01-28 16:10 strk +2005-01-28 16:10 Sandro Santilli <strk@keybit.net> - * Changed --with-geos arg to express GEOS_DIR (is more intuitive). + * [r1352] Changed --with-geos arg to express GEOS_DIR (is more + intuitive). Made --help string advertise optionality of args for --with-geos and --with-proj. Made configure show used variables values on path checks. -2005-01-28 15:40 strk +2005-01-28 15:40 Sandro Santilli <strk@keybit.net> - * LAST_RELEASE_VERSION bumped to 1.0.0 + * [r1351] LAST_RELEASE_VERSION bumped to 1.0.0 -2005-01-28 14:50 strk +2005-01-28 14:50 Sandro Santilli <strk@keybit.net> - * Applied small patches from Markus Shaber + * [r1350] Applied small patches from Markus Shaber -2005-01-27 18:06 strk +2005-01-27 18:06 Sandro Santilli <strk@keybit.net> - * Fixed a bug in transform() missing to update SRID in output + * [r1349] Fixed a bug in transform() missing to update SRID in + output -2005-01-27 11:17 strk +2005-01-27 11:17 Sandro Santilli <strk@keybit.net> - * Fixed FAQ to use the schema version of AddGeometryColumn + * [r1348] Fixed FAQ to use the schema version of AddGeometryColumn (generated confusion for 0.7.5 users) -2005-01-26 08:35 strk +2005-01-26 08:35 Sandro Santilli <strk@keybit.net> - * Version bumped to 1.0.0RC2 + * [r1346] Version bumped to 1.0.0RC2 -2005-01-26 08:34 strk +2005-01-26 08:34 Sandro Santilli <strk@keybit.net> - * Added 1.0.0RC2 section + * [r1345] Added 1.0.0RC2 section -2005-01-26 08:18 strk +2005-01-26 08:18 Sandro Santilli <strk@keybit.net> - * Added an --enable-autoconf switch to make sure users will known - about + * [r1344] Added an --enable-autoconf switch to make sure users will + known about the untested nature of the ./configure script. -2005-01-25 13:52 strk +2005-01-25 13:52 Sandro Santilli <strk@keybit.net> - * Removed ?= construct in FLEX/YACC rules + * [r1343] Removed ?= construct in FLEX/YACC rules -2005-01-25 11:29 strk +2005-01-25 11:29 Sandro Santilli <strk@keybit.net> - * Made all *FromText() accept only WKT <text>, no more cheating. + * [r1342] Made all *FromText() accept only WKT <text>, no more + cheating. -2005-01-25 09:47 strk +2005-01-25 09:47 Sandro Santilli <strk@keybit.net> - * Fixed a bug in transform() missing to update bbox cache + * [r1341] Fixed a bug in transform() missing to update bbox cache -2005-01-25 09:03 strk +2005-01-25 09:03 Sandro Santilli <strk@keybit.net> - * Made all OGC TypeFromWKB() functions consistent in taking a bytea + * [r1340] Made all OGC TypeFromWKB() functions consistent in taking + a bytea -2005-01-25 08:48 strk +2005-01-25 08:48 Sandro Santilli <strk@keybit.net> - * Added autoconf invokation + * [r1339] Added autoconf invokation -2005-01-24 18:11 strk +2005-01-24 18:11 Sandro Santilli <strk@keybit.net> - * Fixed bug in definition of distance_spheroid. + * [r1338] Fixed bug in definition of distance_spheroid. -2005-01-24 15:22 strk +2005-01-24 15:22 Sandro Santilli <strk@keybit.net> - * Added checks for flex and yacc paths. + * [r1337] Added checks for flex and yacc paths. -2005-01-24 15:16 strk +2005-01-24 15:16 Sandro Santilli <strk@keybit.net> - * Moved YACC default value set from inner to config Makefile. + * [r1336] Moved YACC default value set from inner to config + Makefile. -2005-01-24 15:14 strk +2005-01-24 15:14 Sandro Santilli <strk@keybit.net> - * Added default value for FLEX + * [r1335] Added default value for FLEX -2005-01-24 11:23 strk +2005-01-24 11:23 Sandro Santilli <strk@keybit.net> - * Removed spaces and '?' signs in Makefile.config.in. + * [r1334] Removed spaces and '?' signs in Makefile.config.in. Added support for geos-config call in configure. -2005-01-24 11:00 strk +2005-01-24 11:00 Sandro Santilli <strk@keybit.net> - * Initial autoconf script. + * [r1333] Initial autoconf script. -2005-01-19 18:18 strk +2005-01-19 18:18 Sandro Santilli <strk@keybit.net> - * removed unused files + * [r1332] removed unused files -2005-01-19 18:15 strk +2005-01-19 18:15 Sandro Santilli <strk@keybit.net> - * Added failcount output. + * [r1331] Added failcount output. -2005-01-19 18:05 strk +2005-01-19 18:05 Sandro Santilli <strk@keybit.net> - * Fixed ptest rule. + * [r1330] Fixed ptest rule. -2005-01-19 17:37 strk +2005-01-19 17:37 Sandro Santilli <strk@keybit.net> - * Quoted -classpath args, added ptest args in make ptest rule + * [r1329] Quoted -classpath args, added ptest args in make ptest + rule -2005-01-19 17:00 strk +2005-01-19 17:00 Sandro Santilli <strk@keybit.net> - * Added bin/ removal to clean rule + * [r1328] Added bin/ removal to clean rule -2005-01-19 16:58 strk +2005-01-19 16:58 Sandro Santilli <strk@keybit.net> - * Changed postgis_debug.jar rule to be portable + * [r1327] Changed postgis_debug.jar rule to be portable -2005-01-19 16:55 strk +2005-01-19 16:55 Sandro Santilli <strk@keybit.net> - * Added command line params to jtest rule + * [r1326] Added command line params to jtest rule -2005-01-19 16:51 strk +2005-01-19 16:51 Sandro Santilli <strk@keybit.net> - * Applied Markus patch to accept command line params + * [r1325] Applied Markus patch to accept command line params -2005-01-19 16:49 strk +2005-01-19 16:49 Sandro Santilli <strk@keybit.net> - * Applied Markus patch + * [r1324] Applied Markus patch -2005-01-19 16:46 strk +2005-01-19 16:46 Sandro Santilli <strk@keybit.net> - * Changed postgis.jar creation rule to respect + * [r1323] Changed postgis.jar creation rule to respect postgresql.properties path -2005-01-19 12:30 strk +2005-01-19 12:30 Sandro Santilli <strk@keybit.net> - * Added jar files + * [r1322] Added jar files -2005-01-19 12:27 strk +2005-01-19 12:27 Sandro Santilli <strk@keybit.net> - * Added postgresql.properties and .cvsignore, Modified CP variable - assignment to + * [r1321] Added postgresql.properties and .cvsignore, Modified CP + variable assignment to be quoted. -2005-01-19 09:53 strk +2005-01-19 09:53 Sandro Santilli <strk@keybit.net> - * Made output more readable + * [r1320] Made output more readable -2005-01-19 09:47 strk +2005-01-19 09:47 Sandro Santilli <strk@keybit.net> - * Changed 'compile' rule to keep track of last compile time and - avoid recompilation + * [r1319] Changed 'compile' rule to keep track of last compile time + and avoid recompilation -2005-01-19 09:38 strk +2005-01-19 09:38 Sandro Santilli <strk@keybit.net> - * fixed jar call for postgis.jar production + * [r1318] fixed jar call for postgis.jar production -2005-01-19 09:21 strk +2005-01-19 09:21 Sandro Santilli <strk@keybit.net> - * user env CLASSPATH honoured + * [r1317] user env CLASSPATH honoured -2005-01-19 08:54 strk +2005-01-19 08:54 Sandro Santilli <strk@keybit.net> - * Imported new jdbc driver source by Markus Schaber + * [r1316] Imported new jdbc driver source by Markus Schaber -2005-01-18 15:39 strk +2005-01-18 15:39 Sandro Santilli <strk@keybit.net> - * Fixed a bug in pointarray box3d computation. + * [r1315] Fixed a bug in pointarray box3d computation. -2005-01-18 13:31 strk +2005-01-18 13:31 Sandro Santilli <strk@keybit.net> - * Reintroduced support for '<anygeom> EMPTY' form, for OGC + * [r1314] Reintroduced support for '<anygeom> EMPTY' form, for OGC compliance. -2005-01-18 12:44 strk +2005-01-18 12:44 Sandro Santilli <strk@keybit.net> - * Handled GEOS Geometry construction errors as FALSE results in - isvalid(geom). + * [r1313] Handled GEOS Geometry construction errors as FALSE + results in isvalid(geom). -2005-01-18 10:09 strk +2005-01-18 10:09 Sandro Santilli <strk@keybit.net> - * updated + * [r1312] updated -2005-01-18 09:32 strk +2005-01-18 09:32 Sandro Santilli <strk@keybit.net> - * Changed unparse_WKB interface to take an output size pointer and - an HEXFORM + * [r1311] Changed unparse_WKB interface to take an output size + pointer and an HEXFORM specifier. Reworked code in wktunparse to use function pointers. -2005-01-18 09:30 strk +2005-01-18 09:30 Sandro Santilli <strk@keybit.net> - * Fixed bug introduced supporting GEOMETRYCOLLECTION(EMPTY). + * [r1310] Fixed bug introduced supporting + GEOMETRYCOLLECTION(EMPTY). Dropped support for all EMPTY goems execept GEOMETRYCOLLECTION. -2005-01-17 12:15 strk +2005-01-17 12:15 Sandro Santilli <strk@keybit.net> - * Added GEOMETRYCOLLECTION(EMPTY) support + * [r1309] Added GEOMETRYCOLLECTION(EMPTY) support -2005-01-17 11:44 strk +2005-01-17 11:44 Sandro Santilli <strk@keybit.net> - * Used quote_ident() for spatial columns constraints nams, + * [r1308] Used quote_ident() for spatial columns constraints nams, suggested by Bernhard Herzog -2005-01-17 09:21 strk +2005-01-17 09:21 Sandro Santilli <strk@keybit.net> - * Added one more bytes for terminating NULL in utf8 encoder + * [r1307] Added one more bytes for terminating NULL in utf8 encoder -2005-01-16 16:50 strk +2005-01-16 16:50 Sandro Santilli <strk@keybit.net> - * String escaping algorithm made simpler and more robust. + * [r1306] String escaping algorithm made simpler and more robust. Removed escaped strings leaking. Fixed UTF8 encoder to allocate enough space for 3bytes chars strings. -2005-01-14 16:36 strk +2005-01-14 16:36 Sandro Santilli <strk@keybit.net> - * Switched to preprocessor driver CREATEFUNCTION attribute + * [r1305] Switched to preprocessor driver CREATEFUNCTION attribute specification -2005-01-13 18:26 strk +2005-01-13 18:26 Sandro Santilli <strk@keybit.net> - * estimated_extent() implemented for PG<80 + * [r1303] estimated_extent() implemented for PG<80 -2005-01-13 17:41 strk +2005-01-13 17:41 Sandro Santilli <strk@keybit.net> - * estimated_extent() prepared for future expansion (support of - pre-800 PGSQL) + * [r1302] estimated_extent() prepared for future expansion (support + of pre-800 PGSQL) -2005-01-13 13:37 strk +2005-01-13 13:37 Sandro Santilli <strk@keybit.net> - * Updated expected error message on !closed polygon rings to match - current one. + * [r1301] Updated expected error message on !closed polygon rings + to match current one. -2005-01-13 13:36 strk +2005-01-13 13:36 Sandro Santilli <strk@keybit.net> - * Added closed-ring check for polygon geometry inputs. + * [r1300] Added closed-ring check for polygon geometry inputs. -2005-01-13 10:54 strk +2005-01-13 10:54 Sandro Santilli <strk@keybit.net> - * changed asText to asEWKT for lossless conversions + * [r1299] changed asText to asEWKT for lossless conversions -2005-01-13 10:45 strk +2005-01-13 10:45 Sandro Santilli <strk@keybit.net> - * Added GEOSexception test + * [r1298] Added GEOSexception test -2005-01-13 10:44 strk +2005-01-13 10:44 Sandro Santilli <strk@keybit.net> - * Fixed more tests + * [r1297] Fixed more tests -2005-01-13 10:37 strk +2005-01-13 10:37 Sandro Santilli <strk@keybit.net> - * Changed astext() calls with asewkt() to mach expected results. + * [r1296] Changed astext() calls with asewkt() to mach expected + results. -2005-01-13 09:42 strk +2005-01-13 09:42 Sandro Santilli <strk@keybit.net> - * Updated 1.0.0 release date and changed version to 1.0.0RC1 + * [r1295] Updated 1.0.0 release date and changed version to + 1.0.0RC1 -2005-01-13 09:10 strk +2005-01-13 09:10 Sandro Santilli <strk@keybit.net> - * Removed initial README, replaced with an updated one. + * [r1294] Removed initial README, replaced with an updated one. -2005-01-13 09:10 strk +2005-01-13 09:10 Sandro Santilli <strk@keybit.net> - * Added updated README file + * [r1293] Added updated README file -2005-01-13 08:48 strk +2005-01-13 08:48 Sandro Santilli <strk@keybit.net> - * Added note about utils/postgis_restore.pl + * [r1292] Added note about utils/postgis_restore.pl -2005-01-13 08:43 strk +2005-01-13 08:43 Sandro Santilli <strk@keybit.net> - * Added more New Things + * [r1291] Added more New Things -2005-01-13 08:39 strk +2005-01-13 08:39 Sandro Santilli <strk@keybit.net> - * Added release notes chapter + * [r1290] Added release notes chapter -2005-01-12 17:03 strk +2005-01-12 17:03 Sandro Santilli <strk@keybit.net> - * added USE_ICONV configuration + * [r1289] added USE_ICONV configuration -2005-01-12 17:03 strk +2005-01-12 17:03 Sandro Santilli <strk@keybit.net> - * Added optional UTF8 output support as suggested by IIDA Tetsushi + * [r1288] Added optional UTF8 output support as suggested by IIDA + Tetsushi -2005-01-12 09:38 strk +2005-01-12 09:38 Sandro Santilli <strk@keybit.net> - * Added not for AUTOCACHE_BBOX setting + * [r1287] Added not for AUTOCACHE_BBOX setting -2005-01-12 09:31 strk +2005-01-12 09:31 Sandro Santilli <strk@keybit.net> - * don't drop the regress test + * [r1286] don't drop the regress test -2005-01-12 09:23 strk +2005-01-12 09:23 Sandro Santilli <strk@keybit.net> - * Added a sleep before running make dist + * [r1285] Added a sleep before running make dist -2005-01-12 08:43 strk +2005-01-12 08:43 Sandro Santilli <strk@keybit.net> - * commented notice in LWGEOM_noop() + * [r1284] commented notice in LWGEOM_noop() -2005-01-12 08:30 strk +2005-01-12 08:30 Sandro Santilli <strk@keybit.net> - * Changed force_*d(geom) and multi(geom) to support AUTOCACHE_BBOX + * [r1283] Changed force_*d(geom) and multi(geom) to support + AUTOCACHE_BBOX -2005-01-12 07:37 strk +2005-01-12 07:37 Sandro Santilli <strk@keybit.net> - * setSRID() and force_2d() changed to use PG_LWGEOM_construct() - entry point, + * [r1282] setSRID() and force_2d() changed to use + PG_LWGEOM_construct() entry point, for AUTOCACHE_BBOX support. -2005-01-12 07:27 strk +2005-01-12 07:27 Sandro Santilli <strk@keybit.net> - * forceRHR() and reverse() forced to use pglwgeom_serialize() entry - point + * [r1281] forceRHR() and reverse() forced to use + pglwgeom_serialize() entry point for honouring the AUTOCACHE_BBOX define -2005-01-11 18:05 strk +2005-01-11 18:05 Sandro Santilli <strk@keybit.net> - * fixed postgis_gist_joinsel signature for PG72 + * [r1280] fixed postgis_gist_joinsel signature for PG72 -2005-01-11 18:04 strk +2005-01-11 18:04 Sandro Santilli <strk@keybit.net> - * added optional versions specificatoin on command line + * [r1279] added optional versions specificatoin on command line -2005-01-11 17:56 strk +2005-01-11 17:56 Sandro Santilli <strk@keybit.net> - * dropped special pgsql 7.1 handling + * [r1278] dropped special pgsql 7.1 handling -2005-01-11 17:46 strk +2005-01-11 17:46 Sandro Santilli <strk@keybit.net> - * added postgis_lib_build_date() and postgis_scripts_build_date() - docs + * [r1277] added postgis_lib_build_date() and + postgis_scripts_build_date() docs -2005-01-11 17:45 strk +2005-01-11 17:45 Sandro Santilli <strk@keybit.net> - * Changed builddate format to Y-m-D H:M:S + * [r1276] Changed builddate format to Y-m-D H:M:S -2005-01-11 17:39 strk +2005-01-11 17:39 Sandro Santilli <strk@keybit.net> - * Added postgis_lib_build_date() and postgis_scripts_build_date() - provided by Markus Schaber + * [r1275] Added postgis_lib_build_date() and + postgis_scripts_build_date() provided by Markus Schaber -2005-01-11 16:54 strk +2005-01-11 16:54 Sandro Santilli <strk@keybit.net> - * initial revision + * [r1274] initial revision -2005-01-11 15:40 strk +2005-01-11 15:40 Sandro Santilli <strk@keybit.net> - * Comments cleanup. + * [r1273] Comments cleanup. -2005-01-11 15:10 strk +2005-01-11 15:10 Sandro Santilli <strk@keybit.net> - * removed obsoleted script + * [r1272] removed obsoleted script -2005-01-11 15:09 strk +2005-01-11 15:09 Sandro Santilli <strk@keybit.net> - * Added SRID checks for all operators. + * [r1271] Added SRID checks for all operators. -2005-01-11 14:20 mcayland +2005-01-11 14:20 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Added new indexable operators <<|, &<|, |&> and |>> to allow - comparisons of bounding box positions in the Y axis + * [r1270] Added new indexable operators <<|, &<|, |&> and |>> to + allow comparisons of bounding box positions in the Y axis -2005-01-11 14:10 strk +2005-01-11 14:10 Sandro Santilli <strk@keybit.net> - * Fixed translate() to always use one of the AUTOCACHE_BBOX + * [r1269] Fixed translate() to always use one of the AUTOCACHE_BBOX honouring entry points. Cleaned up expand(geom). -2005-01-11 08:33 strk +2005-01-11 08:33 Sandro Santilli <strk@keybit.net> - * removed link from geometry_dump type ref + * [r1268] removed link from geometry_dump type ref -2005-01-11 08:29 strk +2005-01-11 08:29 Sandro Santilli <strk@keybit.net> - * Dropped inherithed rule for static lib build (liblwgeom.a), added + * [r1267] Dropped inherithed rule for static lib build + (liblwgeom.a), added a 'tsort' rule to check xdeps status. -2005-01-11 08:12 strk +2005-01-11 08:12 Sandro Santilli <strk@keybit.net> - * Fixed memory handling bug in dump(geom) + * [r1266] Fixed memory handling bug in dump(geom) -2005-01-10 09:47 strk +2005-01-10 09:47 Sandro Santilli <strk@keybit.net> - * Added missing prototypes + * [r1265] Added missing prototypes -2005-01-10 09:28 strk +2005-01-10 09:28 Sandro Santilli <strk@keybit.net> - * changed size_t printing lines to use %lu and unsigned long cast + * [r1264] changed size_t printing lines to use %lu and unsigned + long cast -2005-01-10 09:27 strk +2005-01-10 09:27 Sandro Santilli <strk@keybit.net> - * renamed misures.c to measures.c + * [r1263] renamed misures.c to measures.c -2005-01-09 20:28 strk +2005-01-09 20:28 Sandro Santilli <strk@keybit.net> - * size_t usage cleanups. + * [r1262] size_t usage cleanups. -2005-01-09 18:32 strk +2005-01-09 18:32 Sandro Santilli <strk@keybit.net> - * Avoided lwcollection_deserialize call for non collections (was - broken). + * [r1261] Avoided lwcollection_deserialize call for non collections + (was broken). -2005-01-07 18:32 strk +2005-01-07 18:32 Sandro Santilli <strk@keybit.net> - * Dropped BOX2D operators. They will rely on cast to geometry. + * [r1260] Dropped BOX2D operators. They will rely on cast to + geometry. -2005-01-07 16:43 strk +2005-01-07 16:43 Sandro Santilli <strk@keybit.net> - * Fixed handling of empty collection in GEOS2POSTGIS converter + * [r1259] Fixed handling of empty collection in GEOS2POSTGIS + converter -2005-01-07 14:42 strk +2005-01-07 14:42 Sandro Santilli <strk@keybit.net> - * Made accum(geometry) compatible with PG73. + * [r1258] Made accum(geometry) compatible with PG73. -2005-01-07 14:23 strk +2005-01-07 14:23 Sandro Santilli <strk@keybit.net> - * removed unused variable + * [r1257] removed unused variable -2005-01-07 14:20 strk +2005-01-07 14:20 Sandro Santilli <strk@keybit.net> - * Added a geometry type OID extractor and caching function. + * [r1256] Added a geometry type OID extractor and caching function. -2005-01-07 12:33 strk +2005-01-07 12:33 Sandro Santilli <strk@keybit.net> - * Added a note about compatibility of Dump(geometry) + * [r1255] Added a note about compatibility of Dump(geometry) -2005-01-07 12:28 strk +2005-01-07 12:28 Sandro Santilli <strk@keybit.net> - * made accum(geom) compatible with PG72 + * [r1254] made accum(geom) compatible with PG72 -2005-01-07 12:24 strk +2005-01-07 12:24 Sandro Santilli <strk@keybit.net> - * dropped dump(geometry) for PGSQL<73 builds + * [r1253] dropped dump(geometry) for PGSQL<73 builds -2005-01-07 12:09 strk +2005-01-07 12:09 Sandro Santilli <strk@keybit.net> - * fixed var declaration misplacement + * [r1252] fixed var declaration misplacement -2005-01-07 12:00 strk +2005-01-07 12:00 Sandro Santilli <strk@keybit.net> - * make LWGEOM_{to,from}_bytea available to all pgsql versions + * [r1251] make LWGEOM_{to,from}_bytea available to all pgsql + versions -2005-01-07 11:57 strk +2005-01-07 11:57 Sandro Santilli <strk@keybit.net> - * fixed typo in symdifference function definition + * [r1250] fixed typo in symdifference function definition -2005-01-07 11:55 strk +2005-01-07 11:55 Sandro Santilli <strk@keybit.net> - * fixed postgis_gist_joinsel definition for PG73 + * [r1249] fixed postgis_gist_joinsel definition for PG73 -2005-01-07 11:50 strk +2005-01-07 11:50 Sandro Santilli <strk@keybit.net> - * Moved pgsql compatibility code into pgsql_compat.h + * [r1248] Moved pgsql compatibility code into pgsql_compat.h -2005-01-07 10:26 strk +2005-01-07 10:26 Sandro Santilli <strk@keybit.net> - * variable declaration cleanups. + * [r1247] variable declaration cleanups. -2005-01-07 10:25 strk +2005-01-07 10:25 Sandro Santilli <strk@keybit.net> - * Added WARNING define for pgsql<73 + * [r1246] Added WARNING define for pgsql<73 -2005-01-07 10:13 strk +2005-01-07 10:13 Sandro Santilli <strk@keybit.net> - * fixed misplaced declaration after body start + * [r1245] fixed misplaced declaration after body start -2005-01-07 10:10 strk +2005-01-07 10:10 Sandro Santilli <strk@keybit.net> - * Dump(geometry) enabled by default. + * [r1244] Dump(geometry) enabled by default. -2005-01-07 10:06 strk +2005-01-07 10:06 Sandro Santilli <strk@keybit.net> - * Added Dump(geometry) doc + * [r1243] Added Dump(geometry) doc -2005-01-07 10:04 strk +2005-01-07 10:04 Sandro Santilli <strk@keybit.net> - * cleanup + * [r1242] cleanup -2005-01-07 09:56 strk +2005-01-07 09:56 Sandro Santilli <strk@keybit.net> - * fixed typo in error message + * [r1241] fixed typo in error message -2005-01-07 09:56 strk +2005-01-07 09:56 Sandro Santilli <strk@keybit.net> - * fixed typo in error message + * [r1240] fixed typo in error message -2005-01-07 09:52 strk +2005-01-07 09:52 Sandro Santilli <strk@keybit.net> - * JOINSEL disabled for builds against pgsql<80 + * [r1239] JOINSEL disabled for builds against pgsql<80 -2005-01-07 00:58 strk +2005-01-07 00:58 Sandro Santilli <strk@keybit.net> - * Initial import + * [r1238] Initial import -2005-01-06 15:45 strk +2005-01-06 15:45 Sandro Santilli <strk@keybit.net> - * Added MakePolygon documentation + * [r1237] Added MakePolygon documentation -2005-01-06 15:34 strk +2005-01-06 15:34 Sandro Santilli <strk@keybit.net> - * Added not about possible lost of simplicity() using SnapToGrid(), - added links to the function from there and simplify() + * [r1236] Added not about possible lost of simplicity() using + SnapToGrid(), added links to the function from there and + simplify() -2005-01-06 15:29 strk +2005-01-06 15:29 Sandro Santilli <strk@keybit.net> - * Renamed Apply_Grid to SnapToGrid, documented behaviour of + * [r1235] Renamed Apply_Grid to SnapToGrid, documented behaviour of collapsed geoms. -2005-01-06 13:46 strk +2005-01-06 13:46 Sandro Santilli <strk@keybit.net> - * Added makepolygon(geometry, geometry[]) + * [r1234] Added makepolygon(geometry, geometry[]) -2005-01-06 13:45 strk +2005-01-06 13:45 Sandro Santilli <strk@keybit.net> - * forward declarations for lwpoly_from_lwlines(), ptarray_clone() - and ptarray_isclosed2d() + * [r1233] forward declarations for lwpoly_from_lwlines(), + ptarray_clone() and ptarray_isclosed2d() -2005-01-06 13:45 strk +2005-01-06 13:45 Sandro Santilli <strk@keybit.net> - * Added lwpoly_from_lwlines() + * [r1232] Added lwpoly_from_lwlines() -2005-01-06 13:44 strk +2005-01-06 13:44 Sandro Santilli <strk@keybit.net> - * Added ptarray_clone() and ptarray_isclosed2d() + * [r1231] Added ptarray_clone() and ptarray_isclosed2d() -2005-01-06 09:38 strk +2005-01-06 09:38 Sandro Santilli <strk@keybit.net> - * Added accum(geom) documentation + * [r1230] Added accum(geom) documentation -2005-01-06 09:36 strk +2005-01-06 09:36 Sandro Santilli <strk@keybit.net> - * Added accom(geom) aggregate + * [r1229] Added accom(geom) aggregate -2005-01-06 09:08 strk +2005-01-06 09:08 Sandro Santilli <strk@keybit.net> - * Added apply_grid wrappers. + * [r1228] Added apply_grid wrappers. -2005-01-06 08:51 strk +2005-01-06 08:51 Sandro Santilli <strk@keybit.net> - * Modified transform() to always use PG_LWGEOM_construct entry - point for + * [r1227] Modified transform() to always use PG_LWGEOM_construct + entry point for output (to support AUTOCACHE_BBOX). -2005-01-06 01:10 pramsey +2005-01-06 01:10 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix spelling error + * [r1226] Fix spelling error -2005-01-05 22:52 strk +2005-01-05 22:52 Sandro Santilli <strk@keybit.net> - * updated Polygonize doc + * [r1225] updated Polygonize doc -2005-01-05 22:48 strk +2005-01-05 22:48 Sandro Santilli <strk@keybit.net> - * Had translate compute bbox cache translating input one if + * [r1224] Had translate compute bbox cache translating input one if present. Cleanups. -2005-01-05 22:11 strk +2005-01-05 22:11 Sandro Santilli <strk@keybit.net> - * Made apply_grid compute output bbox WHEN_SIMPLE (input bbox is - present) + * [r1223] Made apply_grid compute output bbox WHEN_SIMPLE (input + bbox is present) -2005-01-05 21:59 strk +2005-01-05 21:59 Sandro Santilli <strk@keybit.net> - * Simplify reworked to use LWGEOM abstraction (no more flattening - of input collection). + * [r1222] Simplify reworked to use LWGEOM abstraction (no more + flattening of input collection). -2005-01-05 17:08 strk +2005-01-05 17:08 Sandro Santilli <strk@keybit.net> - * Added apply_grid doc + * [r1221] Added apply_grid doc -2005-01-05 17:06 strk +2005-01-05 17:06 Sandro Santilli <strk@keybit.net> - * Integrated apply_grid() contributed function. + * [r1220] Integrated apply_grid() contributed function. -2005-01-05 12:44 strk +2005-01-05 12:44 Sandro Santilli <strk@keybit.net> - * Added is_worth_caching_serialized_bbox(). Renamed + * [r1219] Added is_worth_caching_serialized_bbox(). Renamed lwgeom_setSRID() to pglwgeom_setSRID(). Fixed a bug in PG_LWGEOM_construct support for AUTOCACHE_BBOX. -2005-01-05 10:06 strk +2005-01-05 10:06 Sandro Santilli <strk@keybit.net> - * Added AUTOCACHE_BBOX support in PG_LWGEOM_construct(). + * [r1218] Added AUTOCACHE_BBOX support in PG_LWGEOM_construct(). -2005-01-05 09:47 strk +2005-01-05 09:47 Sandro Santilli <strk@keybit.net> - * collect(geom, geom) and collect_garray(geom[]) use WHEN_SIMPLE - strategy + * [r1217] collect(geom, geom) and collect_garray(geom[]) use + WHEN_SIMPLE strategy for bbox computation. pglwgeom_serialize() honour user's AUTOCACHE_BBOX define. BBOXCACHE_BEHAVIOURS updated. -2005-01-03 17:51 strk +2005-01-03 17:51 Sandro Santilli <strk@keybit.net> - * GEOSpolygonize returns GEOMETRYCOLLECTION instead of MULTIPOLYGON + * [r1216] GEOSpolygonize returns GEOMETRYCOLLECTION instead of + MULTIPOLYGON -2005-01-03 15:00 strk +2005-01-03 15:00 Sandro Santilli <strk@keybit.net> - * iscacheable patch from Carl Anderson + * [r1215] iscacheable patch from Carl Anderson -2004-12-31 13:11 strk +2004-12-31 13:11 Sandro Santilli <strk@keybit.net> - * update ExteriorRing doc + * [r1214] update ExteriorRing doc -2004-12-31 13:10 strk +2004-12-31 13:10 Sandro Santilli <strk@keybit.net> - * Made ExteriorRing use LWGEOM. + * [r1213] Made ExteriorRing use LWGEOM. -2004-12-31 12:46 strk +2004-12-31 12:46 Sandro Santilli <strk@keybit.net> - * update InteriorRingN doc + * [r1212] update InteriorRingN doc -2004-12-31 12:44 strk +2004-12-31 12:44 Sandro Santilli <strk@keybit.net> - * GeometryN and InteriorRingN changed to use LWGEOM format (and the + * [r1211] GeometryN and InteriorRingN changed to use LWGEOM format + (and the latter made OGC-strict). -2004-12-31 12:00 strk +2004-12-31 12:00 Sandro Santilli <strk@keybit.net> - * updated + * [r1210] updated -2004-12-31 11:39 strk +2004-12-31 11:39 Sandro Santilli <strk@keybit.net> - * All output geoms serializzations made using pglwgeom_serialize + * [r1209] All output geoms serializzations made using + pglwgeom_serialize -2004-12-31 11:31 strk +2004-12-31 11:31 Sandro Santilli <strk@keybit.net> - * fixed bugs in convexhull, made GEOS2POSTGIS use + * [r1208] fixed bugs in convexhull, made GEOS2POSTGIS use pglwgeom_serialize -2004-12-31 11:30 strk +2004-12-31 11:30 Sandro Santilli <strk@keybit.net> - * Fixed a bug in lwpoint_serialize_size + * [r1207] Fixed a bug in lwpoint_serialize_size -2004-12-31 11:26 strk +2004-12-31 11:26 Sandro Santilli <strk@keybit.net> - * error messages and VARLENA handling cleanups + * [r1206] error messages and VARLENA handling cleanups -2004-12-31 10:47 strk +2004-12-31 10:47 Sandro Santilli <strk@keybit.net> - * initial import + * [r1205] initial import -2004-12-31 10:35 strk +2004-12-31 10:35 Sandro Santilli <strk@keybit.net> - * re-introduced G2P conversion profile for convexhull (was missing - from previous patch) + * [r1204] re-introduced G2P conversion profile for convexhull (was + missing from previous patch) -2004-12-31 10:28 strk +2004-12-31 10:28 Sandro Santilli <strk@keybit.net> - * Made convexhull use input bbox cache if any for output geom. + * [r1203] Made convexhull use input bbox cache if any for output + geom. -2004-12-31 09:04 strk +2004-12-31 09:04 Sandro Santilli <strk@keybit.net> - * Varlena handling cleanups + * [r1202] Varlena handling cleanups -2004-12-30 20:41 strk +2004-12-30 20:41 Sandro Santilli <strk@keybit.net> - * updated + * [r1201] updated -2004-12-30 20:36 strk +2004-12-30 20:36 Sandro Santilli <strk@keybit.net> - * Rewrote GEOSCentroid() to pass exception using an input arg, and - return + * [r1200] Rewrote GEOSCentroid() to pass exception using an input + arg, and return NULL for EMPTY geom. -2004-12-30 16:08 strk +2004-12-30 16:08 Sandro Santilli <strk@keybit.net> - * Made parse_WKT_lwgeom (text::geometry) use AUTOCACHE_BBOX + * [r1199] Made parse_WKT_lwgeom (text::geometry) use AUTOCACHE_BBOX heuristic, stricter use of PG text type -2004-12-30 15:59 strk +2004-12-30 15:59 Sandro Santilli <strk@keybit.net> - * Fixed a bug in translate() and transform() leaving result + * [r1198] Fixed a bug in translate() and transform() leaving result geometries with the old bounding box cache. -2004-12-30 15:58 strk +2004-12-30 15:58 Sandro Santilli <strk@keybit.net> - * Added compute_serialized_bbox_p() to always recomputed a geometry - bounding box + * [r1197] Added compute_serialized_bbox_p() to always recomputed a + geometry bounding box -2004-12-30 15:11 strk +2004-12-30 15:11 Sandro Santilli <strk@keybit.net> - * Had LineFromMultiPoint make use of input SRID + * [r1196] Had LineFromMultiPoint make use of input SRID -2004-12-30 14:44 strk +2004-12-30 14:44 Sandro Santilli <strk@keybit.net> - * Added AUTOCACHE_BBOX variable, defaulting to 1. + * [r1195] Added AUTOCACHE_BBOX variable, defaulting to 1. -2004-12-30 13:47 strk +2004-12-30 13:47 Sandro Santilli <strk@keybit.net> - * Introduced bbox caching worth evaluation functions, honoured in + * [r1194] Introduced bbox caching worth evaluation functions, + honoured in LWGEOM_in, LWGEOMFromWKB, and GEOS2POSTGIS. -2004-12-30 13:35 strk +2004-12-30 13:35 Sandro Santilli <strk@keybit.net> - * Handled NULL returns from getCentroid making it an EMPTY GEOM + * [r1193] Handled NULL returns from getCentroid making it an EMPTY + GEOM -2004-12-30 10:27 strk +2004-12-30 10:27 Sandro Santilli <strk@keybit.net> - * Applied Carl Anderson patch for LinearRing support. + * [r1192] Applied Carl Anderson patch for LinearRing support. -2004-12-30 10:27 strk +2004-12-30 10:27 Sandro Santilli <strk@keybit.net> - * USE_GEOS and USE_PROJ defaults switched to NO, and made + * [r1191] USE_GEOS and USE_PROJ defaults switched to NO, and made overridable via environment. -2004-12-30 10:24 strk +2004-12-30 10:24 Sandro Santilli <strk@keybit.net> - * Added cache_bbox trigger + * [r1190] Added cache_bbox trigger -2004-12-30 10:22 strk +2004-12-30 10:22 Sandro Santilli <strk@keybit.net> - * moved some BBOX procs signatures from lwgeom_inout.c to + * [r1189] moved some BBOX procs signatures from lwgeom_inout.c to lwgeom_pg.h -2004-12-30 10:21 strk +2004-12-30 10:21 Sandro Santilli <strk@keybit.net> - * removed useless memory copies in ndims(geom) + * [r1188] removed useless memory copies in ndims(geom) -2004-12-30 10:18 strk +2004-12-30 10:18 Sandro Santilli <strk@keybit.net> - * initial revision + * [r1187] initial revision -2004-12-28 09:23 strk +2004-12-28 09:23 Sandro Santilli <strk@keybit.net> - * specified LineString input requirement for StartPoint and + * [r1186] specified LineString input requirement for StartPoint and LastPoint -2004-12-27 13:34 strk +2004-12-27 13:34 Sandro Santilli <strk@keybit.net> - * Expanded "GIS Objects" chapter adding OGC/PostGIS (E)WKT/B and - canonical forms. + * [r1185] Expanded "GIS Objects" chapter adding OGC/PostGIS + (E)WKT/B and canonical forms. -2004-12-27 12:50 strk +2004-12-27 12:50 Sandro Santilli <strk@keybit.net> - * Added HasBBOX() item + * [r1184] Added HasBBOX() item -2004-12-27 09:59 strk +2004-12-27 09:59 Sandro Santilli <strk@keybit.net> - * Added bool hasBBOX(geometry). Removed useless input copy in - zmflag(geometry). + * [r1183] Added bool hasBBOX(geometry). Removed useless input copy + in zmflag(geometry). -2004-12-23 14:48 strk +2004-12-23 14:48 Sandro Santilli <strk@keybit.net> - * Fixed help string, and added a TODO item + * [r1182] Fixed help string, and added a TODO item -2004-12-23 11:02 strk +2004-12-23 11:02 Sandro Santilli <strk@keybit.net> - * Updated <GEOM>FromWKB signatures to take bytea instead of text, + * [r1181] Updated <GEOM>FromWKB signatures to take bytea instead of + text, Removed non-standard GeometryFromText references and substituted with OGC GeomFromText. -2004-12-23 10:39 strk +2004-12-23 10:39 Sandro Santilli <strk@keybit.net> - * Adjusted some function refereces, added another subsection for - Geometry Output functions. + * [r1180] Adjusted some function refereces, added another + subsection for Geometry Output functions. -2004-12-22 17:12 strk +2004-12-22 17:12 Sandro Santilli <strk@keybit.net> - * Added Mark Cave-Ayland implementation of JOIN selectivity + * [r1179] Added Mark Cave-Ayland implementation of JOIN selectivity estimator. -2004-12-22 17:02 strk +2004-12-22 17:02 Sandro Santilli <strk@keybit.net> - * initial revision + * [r1178] initial revision -2004-12-22 10:32 strk +2004-12-22 10:32 Sandro Santilli <strk@keybit.net> - * GeomFromWKB() and GeometryFromText() issue a warning if provided - formats + * [r1177] GeomFromWKB() and GeometryFromText() issue a warning if + provided formats are not OGC-strict. Introduced GeomFromEWKT() and GeomFromEWKB() for extended formats. -2004-12-22 10:29 strk +2004-12-22 10:29 Sandro Santilli <strk@keybit.net> - * Drop useless SRID from geometry when downloading EWKB format. + * [r1176] Drop useless SRID from geometry when downloading EWKB + format. -2004-12-21 17:46 strk +2004-12-21 17:46 Sandro Santilli <strk@keybit.net> - * Made asText and asBinary strict OGC conformant, introduced asEWKT - and asEWKB + * [r1175] Made asText and asBinary strict OGC conformant, + introduced asEWKT and asEWKB for extended version outputs. -2004-12-21 15:19 strk +2004-12-21 15:19 Sandro Santilli <strk@keybit.net> - * Canonical binary reverted back to EWKB, now supporting SRID - inclusion. + * [r1174] Canonical binary reverted back to EWKB, now supporting + SRID inclusion. -2004-12-21 15:17 strk +2004-12-21 15:17 Sandro Santilli <strk@keybit.net> - * Made setSRID(geom, -1) actually *remove* srid from LWGEOM. + * [r1173] Made setSRID(geom, -1) actually *remove* srid from + LWGEOM. -2004-12-21 12:21 mcayland +2004-12-21 12:21 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Fixed bug in pass 4 where sample boxes were referred as BOXs and - not BOX2DFLOAT4. Also increased SDFACTOR to 3.25 + * [r1172] Fixed bug in pass 4 where sample boxes were referred as + BOXs and not BOX2DFLOAT4. Also increased SDFACTOR to 3.25 -2004-12-21 12:04 strk +2004-12-21 12:04 Sandro Santilli <strk@keybit.net> - * Updated geom_accum to create *real* geometry arrays, changed - aggregates + * [r1171] Updated geom_accum to create *real* geometry arrays, + changed aggregates using it accordingly. Fixed collect output type settings, and dropped CR/LF in lwgeom_functions_basic.c -2004-12-21 11:25 strk +2004-12-21 11:25 Sandro Santilli <strk@keybit.net> - * allocation for deserialized lwline made after type checking + * [r1170] allocation for deserialized lwline made after type + checking -2004-12-20 17:49 strk +2004-12-20 17:49 Sandro Santilli <strk@keybit.net> - * Added array element delimiter for type geometry + * [r1169] Added array element delimiter for type geometry -2004-12-20 14:21 strk +2004-12-20 14:21 Sandro Santilli <strk@keybit.net> - * SRID is no more skipped from asText output. + * [r1168] SRID is no more skipped from asText output. -2004-12-20 14:11 strk +2004-12-20 14:11 Sandro Santilli <strk@keybit.net> - * Created a new 'Geometry Editors' section. + * [r1167] Created a new 'Geometry Editors' section. -2004-12-20 14:02 strk +2004-12-20 14:02 Sandro Santilli <strk@keybit.net> - * Added addBBOX() and dropBBOX() documentation. + * [r1166] Added addBBOX() and dropBBOX() documentation. -2004-12-20 14:01 strk +2004-12-20 14:01 Sandro Santilli <strk@keybit.net> - * Added dropBBOX(). + * [r1165] Added dropBBOX(). -2004-12-17 18:00 strk +2004-12-17 18:00 Sandro Santilli <strk@keybit.net> - * LWGEOM_gist_joinsel defined for all PG versions + * [r1164] LWGEOM_gist_joinsel defined for all PG versions -2004-12-17 18:00 strk +2004-12-17 18:00 Sandro Santilli <strk@keybit.net> - * Fixed call to geos_version.sh + * [r1163] Fixed call to geos_version.sh -2004-12-17 11:08 strk +2004-12-17 11:08 Sandro Santilli <strk@keybit.net> - * Moved getMachineEndian from parser to liblwgeom.{h,c}. + * [r1162] Moved getMachineEndian from parser to liblwgeom.{h,c}. Added XDR and NDR defines. Fixed all usage of them. -2004-12-17 11:07 strk +2004-12-17 11:07 Sandro Santilli <strk@keybit.net> - * Added missing prototype + * [r1161] Added missing prototype -2004-12-17 11:06 strk +2004-12-17 11:06 Sandro Santilli <strk@keybit.net> - * Added GEOSnoop stub for non-geos installations + * [r1160] Added GEOSnoop stub for non-geos installations -2004-12-17 10:10 strk +2004-12-17 10:10 Sandro Santilli <strk@keybit.net> - * Added canonical binary conversions as bytea<->geometry casts and + * [r1159] Added canonical binary conversions as bytea<->geometry + casts and explicit _send and _recv for PG>73 -2004-12-17 10:10 strk +2004-12-17 10:10 Sandro Santilli <strk@keybit.net> - * getMachineEndian exported + * [r1158] getMachineEndian exported -2004-12-17 06:53 pramsey +2004-12-17 06:53 Paul Ramsey <pramsey@cleverelephant.ca> - * Changes in preparation for 1.0.0RC1 + * [r1157] Changes in preparation for 1.0.0RC1 -2004-12-16 12:30 strk +2004-12-16 12:30 Sandro Santilli <strk@keybit.net> - * Initial skel for geometry_send canonical binary rep. + * [r1155] Initial skel for geometry_send canonical binary rep. -2004-12-16 12:07 strk +2004-12-16 12:07 Sandro Santilli <strk@keybit.net> - * pg_restore-800 handling + * [r1154] pg_restore-800 handling -2004-12-15 13:10 strk +2004-12-15 13:10 Sandro Santilli <strk@keybit.net> - * Added UpdateGeometrySRID documentation + * [r1152] Added UpdateGeometrySRID documentation -2004-12-15 12:59 strk +2004-12-15 12:59 Sandro Santilli <strk@keybit.net> - * Enforced schema use in UpdateGeometrySRID + * [r1151] Enforced schema use in UpdateGeometrySRID -2004-12-15 12:54 strk +2004-12-15 12:54 Sandro Santilli <strk@keybit.net> - * Added UpdateGeometrySRID + * [r1150] Added UpdateGeometrySRID -2004-12-15 09:46 strk +2004-12-15 09:46 Sandro Santilli <strk@keybit.net> - * updated TODO + * [r1149] updated TODO -2004-12-15 09:43 strk +2004-12-15 09:43 Sandro Santilli <strk@keybit.net> - * Die if target database exists + * [r1148] Die if target database exists -2004-12-15 08:46 strk +2004-12-15 08:46 Sandro Santilli <strk@keybit.net> - * Fixed memory leaks depending on input size. + * [r1145] Fixed memory leaks depending on input size. -2004-12-14 11:41 strk +2004-12-14 11:41 Sandro Santilli <strk@keybit.net> - * Fixed a bug in lwgeom_dropBBOX() + * [r1144] Fixed a bug in lwgeom_dropBBOX() -2004-12-14 11:02 strk +2004-12-14 11:02 Sandro Santilli <strk@keybit.net> - * Added geometry::text cast. + * [r1143] Added geometry::text cast. -2004-12-14 09:47 strk +2004-12-14 09:47 Sandro Santilli <strk@keybit.net> - * Added SRID check in collect_garray(); + * [r1142] Added SRID check in collect_garray(); -2004-12-14 09:37 strk +2004-12-14 09:37 Sandro Santilli <strk@keybit.net> - * reduced function calls in lwcollection_serialize_size + * [r1141] reduced function calls in lwcollection_serialize_size -2004-12-14 09:29 strk +2004-12-14 09:29 Sandro Santilli <strk@keybit.net> - * fixed a typo in polygonize function + * [r1140] fixed a typo in polygonize function -2004-12-13 14:12 strk +2004-12-13 14:12 Sandro Santilli <strk@keybit.net> - * updated + * [r1139] updated -2004-12-13 14:03 strk +2004-12-13 14:03 Sandro Santilli <strk@keybit.net> - * Initial skeleton on join selectivity estimator. + * [r1138] Initial skeleton on join selectivity estimator. Current estimators application for box2d && box2d operator. -2004-12-13 13:04 strk +2004-12-13 13:04 Sandro Santilli <strk@keybit.net> - * lwpostgis.sql copy moved from root to lwgeom/Makefile + * [r1137] lwpostgis.sql copy moved from root to lwgeom/Makefile -2004-12-13 12:56 strk +2004-12-13 12:56 Sandro Santilli <strk@keybit.net> - * Handled more schema specification in 800 pg_restore output. + * [r1136] Handled more schema specification in 800 pg_restore + output. -2004-12-13 12:25 strk +2004-12-13 12:25 Sandro Santilli <strk@keybit.net> - * Removed obsoleted function and fixed some warnings. + * [r1135] Removed obsoleted function and fixed some warnings. -2004-12-10 22:20 strk +2004-12-10 22:20 Sandro Santilli <strk@keybit.net> - * Added notice about availability of shorter syntax for + * [r1131] Added notice about availability of shorter syntax for estimated_extent() -2004-12-10 22:16 strk +2004-12-10 22:16 Sandro Santilli <strk@keybit.net> - * Added estimated_extent() doc. + * [r1130] Added estimated_extent() doc. -2004-12-10 12:35 strk +2004-12-10 12:35 Sandro Santilli <strk@keybit.net> - * implemented estimated_extent() function + * [r1129] implemented estimated_extent() function -2004-12-09 09:42 strk +2004-12-09 09:42 Sandro Santilli <strk@keybit.net> - * Adjusted to work with new bytea WKB encoding, only supports - 2d/3dz. + * [r1128] Adjusted to work with new bytea WKB encoding, only + supports 2d/3dz. -2004-12-08 14:46 strk +2004-12-08 14:46 Sandro Santilli <strk@keybit.net> - * updated + * [r1127] updated -2004-12-05 11:46 strk +2004-12-05 11:46 Sandro Santilli <strk@keybit.net> - * Initial revision + * [r1126] Initial revision -2004-12-05 11:45 strk +2004-12-05 11:45 Sandro Santilli <strk@keybit.net> - * commented out drops of unexistant tables + * [r1125] commented out drops of unexistant tables -2004-12-05 11:44 strk +2004-12-05 11:44 Sandro Santilli <strk@keybit.net> - * Changed AddGeometryColumns to not complain about invalid schema + * [r1124] Changed AddGeometryColumns to not complain about invalid + schema -2004-11-29 16:37 strk +2004-11-29 16:37 Sandro Santilli <strk@keybit.net> - * Fixed a bug in pt_in_ring_2d. + * [r1123] Fixed a bug in pt_in_ring_2d. -2004-11-29 11:16 strk +2004-11-29 11:16 Sandro Santilli <strk@keybit.net> - * Commented out useless CFLAGS override. + * [r1122] Commented out useless CFLAGS override. -2004-11-29 11:15 strk +2004-11-29 11:15 Sandro Santilli <strk@keybit.net> - * Some initializzations to make compiler happy. + * [r1121] Some initializzations to make compiler happy. -2004-11-26 17:08 strk +2004-11-26 17:08 Sandro Santilli <strk@keybit.net> - * Removed duplicated tests + * [r1120] Removed duplicated tests -2004-11-26 17:06 strk +2004-11-26 17:06 Sandro Santilli <strk@keybit.net> - * Moved basic LWGEOM parsing tests in mainstream regress dir. + * [r1119] Moved basic LWGEOM parsing tests in mainstream regress + dir. -2004-11-26 16:54 strk +2004-11-26 16:54 Sandro Santilli <strk@keybit.net> - * First regress test cleaned up. + * [r1118] First regress test cleaned up. -2004-11-26 16:26 strk +2004-11-26 16:26 Sandro Santilli <strk@keybit.net> - * Ported index regress test to lwgeom + * [r1117] Ported index regress test to lwgeom -2004-11-26 15:52 strk +2004-11-26 15:52 Sandro Santilli <strk@keybit.net> - * Added regressions test notes + * [r1116] Added regressions test notes -2004-11-26 15:50 strk +2004-11-26 15:50 Sandro Santilli <strk@keybit.net> - * Finished cleanup of main regression test. + * [r1115] Finished cleanup of main regression test. -2004-11-26 15:06 strk +2004-11-26 15:06 Sandro Santilli <strk@keybit.net> - * lwcollection_same allows different components ordering to + * [r1114] lwcollection_same allows different components ordering to reflect older behaviour. -2004-11-26 14:56 strk +2004-11-26 14:56 Sandro Santilli <strk@keybit.net> - * Cleanup + * [r1113] Cleanup -2004-11-26 14:55 strk +2004-11-26 14:55 Sandro Santilli <strk@keybit.net> - * Fixed a bug in lwcollection_same + * [r1112] Fixed a bug in lwcollection_same -2004-11-26 13:04 strk +2004-11-26 13:04 Sandro Santilli <strk@keybit.net> - * Initial regress tests adaptation for lwgeom + * [r1111] Initial regress tests adaptation for lwgeom -2004-11-23 16:16 strk +2004-11-23 16:16 Sandro Santilli <strk@keybit.net> - * POSTGIS2GEOS conversion failures handled cleanier + * [r1109] POSTGIS2GEOS conversion failures handled cleanier -2004-11-19 17:39 strk +2004-11-19 17:39 Sandro Santilli <strk@keybit.net> - * Massaged to work with pg_dump-7.2 and pg_restore-7.2 + * [r1107] Massaged to work with pg_dump-7.2 and pg_restore-7.2 -2004-11-19 17:29 strk +2004-11-19 17:29 Sandro Santilli <strk@keybit.net> - * precision made of type signed int (for %.*d correct use). + * [r1106] precision made of type signed int (for %.*d correct use). -2004-11-19 13:48 strk +2004-11-19 13:48 Sandro Santilli <strk@keybit.net> - * Added support for PG<73 in gist support functions + * [r1105] Added support for PG<73 in gist support functions and modified preprocessor flags to be compatible with older versions. -2004-11-19 13:32 strk +2004-11-19 13:32 Sandro Santilli <strk@keybit.net> - * Fixed IN/OUT representation of types to support < 73 PG versions + * [r1104] Fixed IN/OUT representation of types to support < 73 PG + versions -2004-11-18 18:16 strk +2004-11-18 18:16 Sandro Santilli <strk@keybit.net> - * updated + * [r1103] updated -2004-11-18 18:14 strk +2004-11-18 18:14 Sandro Santilli <strk@keybit.net> - * Added a copy of the PQunescapeBytea function found in libpq of - PG>=73 + * [r1102] Added a copy of the PQunescapeBytea function found in + libpq of PG>=73 -2004-11-18 13:47 strk +2004-11-18 13:47 Sandro Santilli <strk@keybit.net> - * Substituted isfinite() with finite(). + * [r1101] Substituted isfinite() with finite(). -2004-11-17 15:28 strk +2004-11-17 15:28 Sandro Santilli <strk@keybit.net> - * Yet another GEOSHasZ bug fix + * [r1100] Yet another GEOSHasZ bug fix -2004-11-17 15:18 strk +2004-11-17 15:18 Sandro Santilli <strk@keybit.net> - * GEOSHasZ now checks both DoubleNotANumber and isFinite + * [r1099] GEOSHasZ now checks both DoubleNotANumber and isFinite -2004-11-17 09:07 strk +2004-11-17 09:07 Sandro Santilli <strk@keybit.net> - * Changes GEOSHasZ to use isfinite() + * [r1098] Changes GEOSHasZ to use isfinite() -2004-11-17 07:57 strk +2004-11-17 07:57 Sandro Santilli <strk@keybit.net> - * Fixed a typo in geometry type names. + * [r1097] Fixed a typo in geometry type names. -2004-11-16 13:54 strk +2004-11-16 13:54 Sandro Santilli <strk@keybit.net> - * SRID checks and enforce for all GEOS operations. + * [r1096] SRID checks and enforce for all GEOS operations. Z value handled so to show it only when available. -2004-11-16 13:52 strk +2004-11-16 13:52 Sandro Santilli <strk@keybit.net> - * Added GEOSHasZ() and GEOSSetSRID() + * [r1095] Added GEOSHasZ() and GEOSSetSRID() -2004-11-15 10:51 strk +2004-11-15 10:51 Sandro Santilli <strk@keybit.net> - * Fixed a bug in PIP invocation, added some debugging lines. + * [r1094] Fixed a bug in PIP invocation, added some debugging + lines. -2004-11-13 01:47 pramsey +2004-11-13 01:47 Paul Ramsey <pramsey@cleverelephant.ca> - * Add information about where test was downloaded from. + * [r1093] Add information about where test was downloaded from. -2004-11-12 18:13 strk +2004-11-12 18:13 Sandro Santilli <strk@keybit.net> - * Deleted entries in spatial_ref_sys and geometry_columns. + * [r1092] Deleted entries in spatial_ref_sys and geometry_columns. -2004-11-12 17:50 strk +2004-11-12 17:50 Sandro Santilli <strk@keybit.net> - * Made PointN, InteriorRingN and GeometryN 1-based as required by + * [r1091] Made PointN, InteriorRingN and GeometryN 1-based as + required by OGC conformance suite. -2004-11-11 21:29 pramsey +2004-11-11 21:29 Paul Ramsey <pramsey@cleverelephant.ca> - * Added grep -v ^# to cpp pipeline for .sql generation. Under OS/X - cpp adds a + * [r1090] Added grep -v ^# to cpp pipeline for .sql generation. + Under OS/X cpp adds a header with a # comment field to the start of the output file. -2004-11-11 09:42 strk +2004-11-11 09:42 Sandro Santilli <strk@keybit.net> - * updated + * [r1089] updated -2004-11-08 11:08 strk +2004-11-08 11:08 Sandro Santilli <strk@keybit.net> - * Added -fPIC to CFLAGS as suggested by Vincent Schut. + * [r1086] Added -fPIC to CFLAGS as suggested by Vincent Schut. -2004-11-05 11:44 strk +2004-11-05 11:44 Sandro Santilli <strk@keybit.net> - * updated + * [r1085] updated -2004-11-05 11:44 strk +2004-11-05 11:44 Sandro Santilli <strk@keybit.net> - * Had isvalid raise a NOTICE with invalidity message. + * [r1084] Had isvalid raise a NOTICE with invalidity message. -2004-11-05 10:04 strk +2004-11-05 10:04 Sandro Santilli <strk@keybit.net> - * updated + * [r1083] updated -2004-11-05 08:16 strk +2004-11-05 08:16 Sandro Santilli <strk@keybit.net> - * Added ndims(geometry) function, used in a 3rd constraint set + * [r1082] Added ndims(geometry) function, used in a 3rd constraint + set by AddGeometryColumn, documented. -2004-11-04 11:40 strk +2004-11-04 11:40 Sandro Santilli <strk@keybit.net> - * Renamed max/min/avg macros to LW_MAX, LW_MIN, LW_AVG. + * [r1081] Renamed max/min/avg macros to LW_MAX, LW_MIN, LW_AVG. -2004-11-04 09:18 strk +2004-11-04 09:18 Sandro Santilli <strk@keybit.net> - * Oops.. my attemt at moving lwpostgis.sql.in one dir up was bogus. + * [r1080] Oops.. my attemt at moving lwpostgis.sql.in one dir up + was bogus. -2004-11-04 08:56 strk +2004-11-04 08:56 Sandro Santilli <strk@keybit.net> - * Moved lwpostgis.sql.in and it's build logic up to root directory. + * [r1079] Moved lwpostgis.sql.in and it's build logic up to root + directory. -2004-11-02 17:53 strk +2004-11-02 17:53 Sandro Santilli <strk@keybit.net> - * Fixed "compat.h" include to be local. + * [r1078] Fixed "compat.h" include to be local. -2004-11-02 16:48 strk +2004-11-02 16:48 Sandro Santilli <strk@keybit.net> - * Added a copy of GNU vsprintf.c file and compiled in. + * [r1077] Added a copy of GNU vsprintf.c file and compiled in. -2004-11-02 15:59 strk +2004-11-02 15:59 Sandro Santilli <strk@keybit.net> - * min/max macro made available regardless of MINGW32 define. + * [r1076] min/max macro made available regardless of MINGW32 + define. -2004-11-02 07:50 strk +2004-11-02 07:50 Sandro Santilli <strk@keybit.net> - * Updated as suggested by Frank Warmerdam. + * [r1074] Updated as suggested by Frank Warmerdam. -2004-11-02 07:25 strk +2004-11-02 07:25 Sandro Santilli <strk@keybit.net> - * Fixed a typo in probe_geometry_columns() reported by Vinko - Vrsalovic. + * [r1073] Fixed a typo in probe_geometry_columns() reported by + Vinko Vrsalovic. -2004-10-29 05:28 strk +2004-10-29 05:28 Sandro Santilli <strk@keybit.net> - * updated + * [r1072] updated -2004-10-29 05:27 strk +2004-10-29 05:27 Sandro Santilli <strk@keybit.net> - * Fixed bug in AddGeometryColumn refusing to add 4D geoms. + * [r1071] Fixed bug in AddGeometryColumn refusing to add 4D geoms. -2004-10-28 16:48 strk +2004-10-28 16:48 Sandro Santilli <strk@keybit.net> - * Initial local TODO + * [r1070] Initial local TODO -2004-10-28 16:28 strk +2004-10-28 16:28 Sandro Santilli <strk@keybit.net> - * header inclusion cleanup + * [r1069] header inclusion cleanup -2004-10-28 16:25 strk +2004-10-28 16:25 Sandro Santilli <strk@keybit.net> - * Fixed bug in debugguing output + * [r1068] Fixed bug in debugguing output -2004-10-28 16:24 strk +2004-10-28 16:24 Sandro Santilli <strk@keybit.net> - * removed LF + * [r1067] removed LF -2004-10-28 16:23 strk +2004-10-28 16:23 Sandro Santilli <strk@keybit.net> - * More cleanups. + * [r1066] More cleanups. -2004-10-28 16:13 strk +2004-10-28 16:13 Sandro Santilli <strk@keybit.net> - * cleanups. + * [r1065] cleanups. -2004-10-28 16:10 strk +2004-10-28 16:10 Sandro Santilli <strk@keybit.net> - * Made data structurs old-compilers-friendly. + * [r1064] Made data structurs old-compilers-friendly. -2004-10-28 16:10 strk +2004-10-28 16:10 Sandro Santilli <strk@keybit.net> - * Fixed a bug in LWGEOM_asGML. + * [r1063] Fixed a bug in LWGEOM_asGML. -2004-10-28 15:40 strk +2004-10-28 15:40 Sandro Santilli <strk@keybit.net> - * Fixed geos-based opPolygonize include. + * [r1062] Fixed geos-based opPolygonize include. -2004-10-28 09:38 strk +2004-10-28 09:38 Sandro Santilli <strk@keybit.net> - * Cleanups. + * [r1061] Cleanups. -2004-10-28 09:29 strk +2004-10-28 09:29 Sandro Santilli <strk@keybit.net> - * Added makeline(point, point). Changed LineFromMultiPoint + * [r1060] Added makeline(point, point). Changed LineFromMultiPoint definition. -2004-10-28 09:00 strk +2004-10-28 09:00 Sandro Santilli <strk@keybit.net> - * Added AddPoint(line, point, [position]) and support API + * [r1059] Added AddPoint(line, point, [position]) and support API functions. -2004-10-28 07:56 strk +2004-10-28 07:56 Sandro Santilli <strk@keybit.net> - * fixed name of line constructor as documentation reports it. + * [r1058] fixed name of line constructor as documentation reports + it. LineFromMultiPoint(). -2004-10-28 07:45 strk +2004-10-28 07:45 Sandro Santilli <strk@keybit.net> - * collect(geometry, geometry) re-introduced. collector() is an - alias for collect(). + * [r1057] collect(geometry, geometry) re-introduced. collector() is + an alias for collect(). -2004-10-27 15:40 strk +2004-10-27 15:40 Sandro Santilli <strk@keybit.net> - * Added MakeBox2D, MakeBox3D implementation and documentation. + * [r1056] Added MakeBox2D, MakeBox3D implementation and + documentation. -2004-10-27 15:19 strk +2004-10-27 15:19 Sandro Santilli <strk@keybit.net> - * MakePoly renamed to Polygonize + * [r1055] MakePoly renamed to Polygonize -2004-10-27 15:09 strk +2004-10-27 15:09 Sandro Santilli <strk@keybit.net> - * updated + * [r1054] updated -2004-10-27 14:28 strk +2004-10-27 14:28 Sandro Santilli <strk@keybit.net> - * Added constructors docs and intial organizzation for postgis - extension functions. + * [r1052] Added constructors docs and intial organizzation for + postgis extension functions. -2004-10-27 13:35 strk +2004-10-27 13:35 Sandro Santilli <strk@keybit.net> - * Unset debug define. + * [r1051] Unset debug define. -2004-10-27 12:30 strk +2004-10-27 12:30 Sandro Santilli <strk@keybit.net> - * AsSVG returns NULL on GEOMETRY COLLECTION input. + * [r1049] AsSVG returns NULL on GEOMETRY COLLECTION input. -2004-10-27 11:06 strk +2004-10-27 11:06 Sandro Santilli <strk@keybit.net> - * updated + * [r1048] updated -2004-10-27 11:05 strk +2004-10-27 11:05 Sandro Santilli <strk@keybit.net> - * Added polygonize interface (makepoly aggregate) + * [r1047] Added polygonize interface (makepoly aggregate) -2004-10-27 11:02 strk +2004-10-27 11:02 Sandro Santilli <strk@keybit.net> - * Removed another getbox2d() call. + * [r1046] Removed another getbox2d() call. -2004-10-27 10:55 strk +2004-10-27 10:55 Sandro Santilli <strk@keybit.net> - * Fixed fix_geometry_columns() to leave correctly linked records - untouched. + * [r1045] Fixed fix_geometry_columns() to leave correctly linked + records untouched. -2004-10-26 16:48 strk +2004-10-26 16:48 Sandro Santilli <strk@keybit.net> - * Bug fix in GEOS version extractor. + * [r1042] Bug fix in GEOS version extractor. -2004-10-25 17:07 strk +2004-10-25 17:07 Sandro Santilli <strk@keybit.net> - * Obsoleted getbox2d(). Use getbox2d_p() or getbox2d_internal() - instead. + * [r1041] Obsoleted getbox2d(). Use getbox2d_p() or + getbox2d_internal() instead. -2004-10-25 15:31 strk +2004-10-25 15:31 Sandro Santilli <strk@keybit.net> - * portable math expressions. + * [r1040] portable math expressions. -2004-10-25 14:20 strk +2004-10-25 14:20 Sandro Santilli <strk@keybit.net> - * Y axis reverse and relative path fixes from Olivier Courtin. + * [r1039] Y axis reverse and relative path fixes from Olivier + Courtin. -2004-10-25 12:27 strk +2004-10-25 12:27 Sandro Santilli <strk@keybit.net> - * Removed useless network type includes, + * [r1038] Removed useless network type includes, Added param.h include for BYTE_ORDER defines under win32. -2004-10-21 19:48 strk +2004-10-21 19:48 Sandro Santilli <strk@keybit.net> - * Stricter syntax fixes. Reported by S�bastien NICAISE + * [r1037] Stricter syntax fixes. Reported by S�bastien NICAISE <snicaise@iciatechnologies.com> -2004-10-21 19:47 strk +2004-10-21 19:47 Sandro Santilli <strk@keybit.net> - * updated + * [r1036] updated -2004-10-21 19:46 strk +2004-10-21 19:46 Sandro Santilli <strk@keybit.net> - * ZMflags check on costituent geometries only performed when there - is + * [r1035] ZMflags check on costituent geometries only performed + when there is at least one. -2004-10-21 19:45 strk +2004-10-21 19:45 Sandro Santilli <strk@keybit.net> - * Added detect_geos_version in all: rule + * [r1034] Added detect_geos_version in all: rule -2004-10-18 11:35 strk +2004-10-18 11:35 Sandro Santilli <strk@keybit.net> - * Added reverse(geometry) and ForceRHR(geometry) documentation. + * [r1033] Added reverse(geometry) and ForceRHR(geometry) + documentation. -2004-10-18 11:29 strk +2004-10-18 11:29 Sandro Santilli <strk@keybit.net> - * makeline_from_multipoint renamed to line_from_multipoint + * [r1032] makeline_from_multipoint renamed to line_from_multipoint -2004-10-18 09:37 strk +2004-10-18 09:37 Sandro Santilli <strk@keybit.net> - * updated + * [r1031] updated -2004-10-17 13:25 strk +2004-10-17 13:25 Sandro Santilli <strk@keybit.net> - * removed USE_WKB partially-used define + * [r1030] removed USE_WKB partially-used define -2004-10-17 13:24 strk +2004-10-17 13:24 Sandro Santilli <strk@keybit.net> - * HEXWKB polygon + * [r1029] HEXWKB polygon -2004-10-17 13:01 strk +2004-10-17 13:01 Sandro Santilli <strk@keybit.net> - * updated + * [r1028] updated -2004-10-17 12:59 strk +2004-10-17 12:59 Sandro Santilli <strk@keybit.net> - * HEXWKB multiline output + * [r1027] HEXWKB multiline output -2004-10-17 12:51 strk +2004-10-17 12:51 Sandro Santilli <strk@keybit.net> - * Fixed a bug in lwline_serialize_buf preventing dimension override + * [r1026] Fixed a bug in lwline_serialize_buf preventing dimension + override -2004-10-17 12:43 strk +2004-10-17 12:43 Sandro Santilli <strk@keybit.net> - * Fixed a debugging function output bug + * [r1025] Fixed a debugging function output bug -2004-10-17 12:26 strk +2004-10-17 12:26 Sandro Santilli <strk@keybit.net> - * Point and MultiPoint loaded using HEXWKB. + * [r1024] Point and MultiPoint loaded using HEXWKB. -2004-10-17 12:16 strk +2004-10-17 12:16 Sandro Santilli <strk@keybit.net> - * fixed prototype for user query table + * [r1022] fixed prototype for user query table -2004-10-17 12:15 strk +2004-10-17 12:15 Sandro Santilli <strk@keybit.net> - * Bug fixed in multipoint4D creation + * [r1020] Bug fixed in multipoint4D creation -2004-10-15 22:02 strk +2004-10-15 22:02 Sandro Santilli <strk@keybit.net> - * updated + * [r1019] updated -2004-10-15 22:01 strk +2004-10-15 22:01 Sandro Santilli <strk@keybit.net> - * Initial WKB functionalities + * [r1018] Initial WKB functionalities -2004-10-15 16:21 strk +2004-10-15 16:21 Sandro Santilli <strk@keybit.net> - * makeline_from_multipoint() implemented and exposed. + * [r1017] makeline_from_multipoint() implemented and exposed. -2004-10-15 15:25 strk +2004-10-15 15:25 Sandro Santilli <strk@keybit.net> - * updated + * [r1016] updated -2004-10-15 15:21 strk +2004-10-15 15:21 Sandro Santilli <strk@keybit.net> - * Fixed a bug in outputput dimension detection for makeline() + * [r1015] Fixed a bug in outputput dimension detection for + makeline() -2004-10-15 15:01 strk +2004-10-15 15:01 Sandro Santilli <strk@keybit.net> - * updated + * [r1014] updated -2004-10-15 15:00 strk +2004-10-15 15:00 Sandro Santilli <strk@keybit.net> - * Added debugging lines + * [r1013] Added debugging lines -2004-10-15 15:00 strk +2004-10-15 15:00 Sandro Santilli <strk@keybit.net> - * Fixed a bug in make_lwline + * [r1012] Fixed a bug in make_lwline -2004-10-15 11:52 strk +2004-10-15 11:52 Sandro Santilli <strk@keybit.net> - * updated + * [r1011] updated -2004-10-15 11:48 strk +2004-10-15 11:48 Sandro Santilli <strk@keybit.net> - * Fixed a bug making asSVG return a spurious char at the end. + * [r1009] Fixed a bug making asSVG return a spurious char at the + end. -2004-10-15 11:42 strk +2004-10-15 11:42 Sandro Santilli <strk@keybit.net> - * Added makeline() aggregate and make_lwline() API method. + * [r1008] Added makeline() aggregate and make_lwline() API method. -2004-10-15 09:44 strk +2004-10-15 09:44 Sandro Santilli <strk@keybit.net> - * updated AsSVG doc + * [r1007] updated AsSVG doc -2004-10-15 09:41 strk +2004-10-15 09:41 Sandro Santilli <strk@keybit.net> - * changed precision semantic back to number of decimal digits + * [r1006] changed precision semantic back to number of decimal + digits -2004-10-15 09:41 strk +2004-10-15 09:41 Sandro Santilli <strk@keybit.net> - * Added a trailing zeros trimmer + * [r1005] Added a trailing zeros trimmer -2004-10-15 08:26 strk +2004-10-15 08:26 Sandro Santilli <strk@keybit.net> - * Fixed handling of mixed dimensioned geometries in source table. + * [r1004] Fixed handling of mixed dimensioned geometries in source + table. -2004-10-15 07:35 strk +2004-10-15 07:35 Sandro Santilli <strk@keybit.net> - * Fixed a bug introduced by me (byteorder skipped for inner geoms - in WKB) + * [r1003] Fixed a bug introduced by me (byteorder skipped for inner + geoms in WKB) -2004-10-14 10:28 strk +2004-10-14 10:28 Sandro Santilli <strk@keybit.net> - * Updated pgsql2shp documentation. + * [r1001] Updated pgsql2shp documentation. -2004-10-14 09:59 strk +2004-10-14 09:59 Sandro Santilli <strk@keybit.net> - * Added support for user query (replacing schema.table) + * [r999] Added support for user query (replacing schema.table) -2004-10-13 19:33 strk +2004-10-13 19:33 Sandro Santilli <strk@keybit.net> - * updated + * [r998] updated -2004-10-13 19:32 strk +2004-10-13 19:32 Sandro Santilli <strk@keybit.net> - * Added third buffer arg expanation + * [r996] Added third buffer arg expanation -2004-10-13 18:49 strk +2004-10-13 18:49 Sandro Santilli <strk@keybit.net> - * fixed arg number in buffer third arg + * [r994] fixed arg number in buffer third arg -2004-10-13 18:39 strk +2004-10-13 18:39 Sandro Santilli <strk@keybit.net> - * Added a third argument to the buffer() function. + * [r993] Added a third argument to the buffer() function. -2004-10-13 17:21 strk +2004-10-13 17:21 Sandro Santilli <strk@keybit.net> - * Dropped SRID argument from point constructor. + * [r992] Dropped SRID argument from point constructor. Unified procedure name to 'makepoint' for 2d,3dz,4d and 'makepointm' for 3dm. -2004-10-13 15:20 strk +2004-10-13 15:20 Sandro Santilli <strk@keybit.net> - * updated + * [r991] updated -2004-10-13 15:19 strk +2004-10-13 15:19 Sandro Santilli <strk@keybit.net> - * Added point constructors PG funx. + * [r990] Added point constructors PG funx. -2004-10-13 14:26 strk +2004-10-13 14:26 Sandro Santilli <strk@keybit.net> - * Added simpler lwpoint constructors. + * [r989] Added simpler lwpoint constructors. -2004-10-11 14:36 strk +2004-10-11 14:36 Sandro Santilli <strk@keybit.net> - * updated + * [r986] updated -2004-10-11 14:34 strk +2004-10-11 14:34 Sandro Santilli <strk@keybit.net> - * Added endiannes specification for postgis-1.0.0+ + * [r985] Added endiannes specification for postgis-1.0.0+ -2004-10-11 14:03 strk +2004-10-11 14:03 Sandro Santilli <strk@keybit.net> - * Added endiannes specification to unparse_WKB, AsBinary, + * [r984] Added endiannes specification to unparse_WKB, AsBinary, lwgeom_to_wkb. -2004-10-11 12:23 strk +2004-10-11 12:23 Sandro Santilli <strk@keybit.net> - * Added test.o to cleanup list + * [r983] Added test.o to cleanup list -2004-10-11 12:23 strk +2004-10-11 12:23 Sandro Santilli <strk@keybit.net> - * updated + * [r982] updated -2004-10-11 11:53 strk +2004-10-11 11:53 Sandro Santilli <strk@keybit.net> - * Moved misuring functions to misures.c (from + * [r981] Moved misuring functions to misures.c (from lwgeom_functions_basic.c). Added -lm to build line for the API test application. -2004-10-11 11:46 strk +2004-10-11 11:46 Sandro Santilli <strk@keybit.net> - * changed description of pgsql2shp -b switch + * [r980] changed description of pgsql2shp -b switch -2004-10-11 10:31 strk +2004-10-11 10:31 Sandro Santilli <strk@keybit.net> - * Changed collect() to return MULTI* if applicabe (all input is - corresponding + * [r979] Changed collect() to return MULTI* if applicabe (all input + is corresponding SINGLE type). -2004-10-11 10:30 strk +2004-10-11 10:30 Sandro Santilli <strk@keybit.net> - * Added debug strings + * [r978] Added debug strings -2004-10-11 09:55 strk +2004-10-11 09:55 Sandro Santilli <strk@keybit.net> - * collect() always return a collection, with a component for each - input + * [r977] collect() always return a collection, with a component for + each input geometry. memcollect() obsoleted. -2004-10-11 09:46 strk +2004-10-11 09:46 Sandro Santilli <strk@keybit.net> - * Fixed bug making it unbuildable. + * [r976] Fixed bug making it unbuildable. -2004-10-11 09:32 strk +2004-10-11 09:32 Sandro Santilli <strk@keybit.net> - * Added lwgeom_addBBOX() and lwcollection_construct_empty() + * [r975] Added lwgeom_addBBOX() and lwcollection_construct_empty() -2004-10-11 07:15 strk +2004-10-11 07:15 Sandro Santilli <strk@keybit.net> - * lwgeom_same new implementation + * [r974] lwgeom_same new implementation -2004-10-11 06:03 strk +2004-10-11 06:03 Sandro Santilli <strk@keybit.net> - * updated + * [r973] updated -2004-10-10 20:31 strk +2004-10-10 20:31 Sandro Santilli <strk@keybit.net> - * segmentize2d() port and use of new LWGEOM structure. + * [r972] segmentize2d() port and use of new LWGEOM structure. -2004-10-09 15:17 strk +2004-10-09 15:17 Sandro Santilli <strk@keybit.net> - * updated + * [r971] updated -2004-10-08 13:26 strk +2004-10-08 13:26 Sandro Santilli <strk@keybit.net> - * updated + * [r969] updated -2004-10-08 13:21 strk +2004-10-08 13:21 Sandro Santilli <strk@keybit.net> - * Debugging output cleanup. + * [r968] Debugging output cleanup. -2004-10-08 13:20 strk +2004-10-08 13:20 Sandro Santilli <strk@keybit.net> - * Changed LWGEOM structure to point to an actual BOX2DFLOAT4. + * [r967] Changed LWGEOM structure to point to an actual + BOX2DFLOAT4. Renamed most function to reflect a TYPE_method naming convention. (you'll need a dump/reload for it to work) Added more manipulation functions. -2004-10-08 13:16 strk +2004-10-08 13:16 Sandro Santilli <strk@keybit.net> - * added memory allocation debugging + * [r966] added memory allocation debugging -2004-10-08 13:15 strk +2004-10-08 13:15 Sandro Santilli <strk@keybit.net> - * Added box2d.o module, reverted SCRIPTS_VERSION to 0.1.0. + * [r965] Added box2d.o module, reverted SCRIPTS_VERSION to 0.1.0. -2004-10-08 13:15 strk +2004-10-08 13:15 Sandro Santilli <strk@keybit.net> - * Initial revision + * [r964] Initial revision -2004-10-08 10:48 strk +2004-10-08 10:48 Sandro Santilli <strk@keybit.net> - * Some updates + * [r963] Some updates -2004-10-08 07:01 strk +2004-10-08 07:01 Sandro Santilli <strk@keybit.net> - * Dropped HWGEOM from this branch. + * [r962] Dropped HWGEOM from this branch. -2004-10-07 22:02 strk +2004-10-07 22:02 Sandro Santilli <strk@keybit.net> - * updated + * [r959] updated -2004-10-07 21:52 strk +2004-10-07 21:52 Sandro Santilli <strk@keybit.net> - * Lots of rewriting/cleanup. TypeM/TypeZ supports. + * [r958] Lots of rewriting/cleanup. TypeM/TypeZ supports. -2004-10-07 21:51 strk +2004-10-07 21:51 Sandro Santilli <strk@keybit.net> - * Fixed a bug in 4d handling + * [r957] Fixed a bug in 4d handling -2004-10-07 20:39 strk +2004-10-07 20:39 Sandro Santilli <strk@keybit.net> - * Fixed bugs in TYPE_ macro usage + * [r956] Fixed bugs in TYPE_ macro usage -2004-10-07 17:18 strk +2004-10-07 17:18 Sandro Santilli <strk@keybit.net> - * Changed ptarray2d_construct interface. + * [r955] Changed ptarray2d_construct interface. -2004-10-07 17:18 strk +2004-10-07 17:18 Sandro Santilli <strk@keybit.net> - * Changed geometrytype() to support TYPEM. + * [r954] Changed geometrytype() to support TYPEM. -2004-10-07 17:17 strk +2004-10-07 17:17 Sandro Santilli <strk@keybit.net> - * Changed AddGeometryColumn to handle TYPEM. + * [r953] Changed AddGeometryColumn to handle TYPEM. Updated SCRIPTS_VERSION to 1.1.0 -2004-10-07 17:15 strk +2004-10-07 17:15 Sandro Santilli <strk@keybit.net> - * Fixed TYPEM handling. + * [r952] Fixed TYPEM handling. -2004-10-07 10:03 strk +2004-10-07 10:03 Sandro Santilli <strk@keybit.net> - * API cleanup, more steps toward standalone library. + * [r951] API cleanup, more steps toward standalone library. -2004-10-07 06:54 strk +2004-10-07 06:54 Sandro Santilli <strk@keybit.net> - * cleanups + * [r950] cleanups -2004-10-06 17:04 strk +2004-10-06 17:04 Sandro Santilli <strk@keybit.net> - * ZM handling. Log trimmed. + * [r949] ZM handling. Log trimmed. -2004-10-06 10:11 strk +2004-10-06 10:11 Sandro Santilli <strk@keybit.net> - * Other separator fixes + * [r947] Other separator fixes -2004-10-06 09:52 strk +2004-10-06 09:52 Sandro Santilli <strk@keybit.net> - * Added zmflag(geom) doc + * [r946] Added zmflag(geom) doc -2004-10-06 09:40 strk +2004-10-06 09:40 Sandro Santilli <strk@keybit.net> - * Handled 0-DBF-attributes corner case. + * [r944] Handled 0-DBF-attributes corner case. -2004-10-06 08:53 strk +2004-10-06 08:53 Sandro Santilli <strk@keybit.net> - * Added zmflag(geom) function. + * [r943] Added zmflag(geom) function. -2004-10-06 08:17 strk +2004-10-06 08:17 Sandro Santilli <strk@keybit.net> - * updated + * [r942] updated -2004-10-06 07:19 strk +2004-10-06 07:19 Sandro Santilli <strk@keybit.net> - * Left off a semicolon in previous patch... + * [r941] Left off a semicolon in previous patch... -2004-10-05 22:46 strk +2004-10-05 22:46 Sandro Santilli <strk@keybit.net> - * Removed PGSQLException use as suggested by Kris Jurka + * [r939] Removed PGSQLException use as suggested by Kris Jurka -2004-10-05 21:59 strk +2004-10-05 21:59 Sandro Santilli <strk@keybit.net> - * Flex invocation patch by Kris Jurka. + * [r938] Flex invocation patch by Kris Jurka. -2004-10-05 21:54 strk +2004-10-05 21:54 Sandro Santilli <strk@keybit.net> - * Yes another change in SPI_cursor_open + * [r936] Yes another change in SPI_cursor_open -2004-10-05 21:53 strk +2004-10-05 21:53 Sandro Santilli <strk@keybit.net> - * Fixed bugs in Centroid (not GEOS) + * [r935] Fixed bugs in Centroid (not GEOS) -2004-10-05 21:42 strk +2004-10-05 21:42 Sandro Santilli <strk@keybit.net> - * Cleanups for older compilers and PG verisons. + * [r934] Cleanups for older compilers and PG verisons. -2004-10-05 21:20 strk +2004-10-05 21:20 Sandro Santilli <strk@keybit.net> - * updated + * [r933] updated -2004-10-05 21:08 strk +2004-10-05 21:08 Sandro Santilli <strk@keybit.net> - * Added debugging lines, fixed a bug in TYPE_HASSRID and + * [r932] Added debugging lines, fixed a bug in TYPE_HASSRID and TYPE_HASBBOX macros. -2004-10-05 21:08 strk +2004-10-05 21:08 Sandro Santilli <strk@keybit.net> - * Made clean rule verbose + * [r931] Made clean rule verbose -2004-10-05 17:15 strk +2004-10-05 17:15 Sandro Santilli <strk@keybit.net> - * Bug fix in size computation. + * [r930] Bug fix in size computation. -2004-10-05 16:28 strk +2004-10-05 16:28 Sandro Santilli <strk@keybit.net> - * Added ZM dimensions flags knowledge. + * [r929] Added ZM dimensions flags knowledge. -2004-10-05 16:07 strk +2004-10-05 16:07 Sandro Santilli <strk@keybit.net> - * updated + * [r928] updated -2004-10-05 15:12 strk +2004-10-05 15:12 Sandro Santilli <strk@keybit.net> - * Added newlines in standalone reporters + * [r927] Added newlines in standalone reporters -2004-10-05 15:11 strk +2004-10-05 15:11 Sandro Santilli <strk@keybit.net> - * Added force_3dz, force_3dm docs + * [r926] Added force_3dz, force_3dm docs -2004-10-05 15:11 strk +2004-10-05 15:11 Sandro Santilli <strk@keybit.net> - * Changed default variable setting to a more portable syntax + * [r925] Changed default variable setting to a more portable syntax -2004-10-05 07:53 strk +2004-10-05 07:53 Sandro Santilli <strk@keybit.net> - * ZM aware WKT/WKB input/output. + * [r924] ZM aware WKT/WKB input/output. -2004-10-04 13:53 strk +2004-10-04 13:53 Sandro Santilli <strk@keybit.net> - * Serialized form and WKB prepared to accept ZM flags replacing DD - (dimensions) + * [r923] Serialized form and WKB prepared to accept ZM flags + replacing DD (dimensions) -2004-10-04 09:25 strk +2004-10-04 09:25 Sandro Santilli <strk@keybit.net> - * Added missing prototype + * [r922] Added missing prototype -2004-10-03 15:57 strk +2004-10-03 15:57 Sandro Santilli <strk@keybit.net> - * updated + * [r921] updated -2004-10-03 15:52 strk +2004-10-03 15:52 Sandro Santilli <strk@keybit.net> - * Made GEOS<->LWGEOM converters keep geometry structures. + * [r920] Made GEOS<->LWGEOM converters keep geometry structures. Fixed bug in serializers. Added noop(geometry) for deserialize/serialize debugging. -2004-10-01 14:49 strk +2004-10-01 14:49 Sandro Santilli <strk@keybit.net> - * Added lwgeom_add(LWGEOM *to, int where, LWGEOM *what). + * [r919] Added lwgeom_add(LWGEOM *to, int where, LWGEOM *what). Added LWGEOM2GEOS keeping input geometry structure. -2004-10-01 07:51 strk +2004-10-01 07:51 Sandro Santilli <strk@keybit.net> - * initial revision + * [r918] initial revision -2004-10-01 07:51 strk +2004-10-01 07:51 Sandro Santilli <strk@keybit.net> - * Added runtime cast functions. + * [r917] Added runtime cast functions. -2004-09-30 16:06 strk +2004-09-30 16:06 Sandro Santilli <strk@keybit.net> - * bug fixes + * [r916] bug fixes -2004-09-30 15:42 strk +2004-09-30 15:42 Sandro Santilli <strk@keybit.net> - * Added BBOX finders and its support in serializer. + * [r915] Added BBOX finders and its support in serializer. -2004-09-30 11:49 strk +2004-09-30 11:49 Sandro Santilli <strk@keybit.net> - * updated + * [r914] updated -2004-09-30 11:45 strk +2004-09-30 11:45 Sandro Santilli <strk@keybit.net> - * More common flags between LW<type>s. + * [r913] More common flags between LW<type>s. LWGEOM_summary output made cleaner and moved to lwgeom_debug.c -2004-09-30 08:18 strk +2004-09-30 08:18 Sandro Santilli <strk@keybit.net> - * Added missing liblwgeom.c file. + * [r912] Added missing liblwgeom.c file. Made LWMPOINT, LWMLINE, LWMPOLY compatible with LWCOLLECTION. Fixed reverse() and forcerhr() to maintain geometry structure. -2004-09-30 06:54 strk +2004-09-30 06:54 Sandro Santilli <strk@keybit.net> - * updated + * [r911] updated -2004-09-29 15:25 strk +2004-09-29 15:25 Sandro Santilli <strk@keybit.net> - * Added serialize function for LWGEOM + * [r910] Added serialize function for LWGEOM -2004-09-29 10:50 strk +2004-09-29 10:50 Sandro Santilli <strk@keybit.net> - * Big layout change. + * [r909] Big layout change. lwgeom.h is public API liblwgeom.h is private header lwgeom_pg.h is for PG-links lw<type>.c contains type-specific functions -2004-09-29 06:31 strk +2004-09-29 06:31 Sandro Santilli <strk@keybit.net> - * Changed LWGEOM to PG_LWGEOM. + * [r908] Changed LWGEOM to PG_LWGEOM. Changed LWGEOM_construct to PG_LWGEOM_construct. -2004-09-28 17:13 strk +2004-09-28 17:13 Sandro Santilli <strk@keybit.net> - * Removed ^Ms, added note about flatting nature of LWGEOM_EXPLODED. + * [r907] Removed ^Ms, added note about flatting nature of + LWGEOM_EXPLODED. -2004-09-28 16:22 strk +2004-09-28 16:22 Sandro Santilli <strk@keybit.net> - * Added AsGML function ref + * [r906] Added AsGML function ref -2004-09-28 09:31 strk +2004-09-28 09:31 Sandro Santilli <strk@keybit.net> - * Fixed a bug in PostGIS2GEOS_point + * [r905] Fixed a bug in PostGIS2GEOS_point -2004-09-28 09:05 strk +2004-09-28 09:05 Sandro Santilli <strk@keybit.net> - * updated + * [r904] updated -2004-09-28 09:01 strk +2004-09-28 09:01 Sandro Santilli <strk@keybit.net> - * Added forceRHR() and support functions. + * [r903] Added forceRHR() and support functions. -2004-09-28 09:00 strk +2004-09-28 09:00 Sandro Santilli <strk@keybit.net> - * Added ptarray_isccw(). Added extern modifiers to public + * [r902] Added ptarray_isccw(). Added extern modifiers to public prototypes. -2004-09-28 08:28 strk +2004-09-28 08:28 Sandro Santilli <strk@keybit.net> - * updated + * [r901] updated -2004-09-28 08:22 strk +2004-09-28 08:22 Sandro Santilli <strk@keybit.net> - * Added reverse(geometry) and support functions + * [r900] Added reverse(geometry) and support functions -2004-09-28 08:21 strk +2004-09-28 08:21 Sandro Santilli <strk@keybit.net> - * Added some const modifiers + * [r899] Added some const modifiers -2004-09-27 17:27 strk +2004-09-27 17:27 Sandro Santilli <strk@keybit.net> - * updated + * [r898] updated -2004-09-27 08:26 strk +2004-09-27 08:26 Sandro Santilli <strk@keybit.net> - * Debugging defines set to NODEBUG. + * [r897] Debugging defines set to NODEBUG. -2004-09-27 08:24 strk +2004-09-27 08:24 Sandro Santilli <strk@keybit.net> - * updated + * [r896] updated -2004-09-27 08:23 strk +2004-09-27 08:23 Sandro Santilli <strk@keybit.net> - * Added USE_GIST variable on top of file. Changed true values - report + * [r895] Added USE_GIST variable on top of file. Changed true + values report as fraction of total rows. -2004-09-24 22:27 strk +2004-09-24 22:27 Sandro Santilli <strk@keybit.net> - * Added profile.h deps + * [r894] Added profile.h deps -2004-09-24 12:20 strk +2004-09-24 12:20 Sandro Santilli <strk@keybit.net> - * Added worst and best percentile for both intersects and distance + * [r893] Added worst and best percentile for both intersects and + distance -2004-09-24 11:58 strk +2004-09-24 11:58 Sandro Santilli <strk@keybit.net> - * approximated nums to 2 decimal digits + * [r892] approximated nums to 2 decimal digits -2004-09-24 11:35 strk +2004-09-24 11:35 Sandro Santilli <strk@keybit.net> - * initial intersects profiler frontend implementation + * [r891] initial intersects profiler frontend implementation -2004-09-24 09:46 strk +2004-09-24 09:46 Sandro Santilli <strk@keybit.net> - * Added box2d->geometry cast. + * [r890] Added box2d->geometry cast. -2004-09-23 16:14 strk +2004-09-23 16:14 Sandro Santilli <strk@keybit.net> - * Added -m / -z switches to control output type: XYM,XYMZ. + * [r889] Added -m / -z switches to control output type: XYM,XYMZ. -2004-09-23 15:09 strk +2004-09-23 15:09 Sandro Santilli <strk@keybit.net> - * Modified GML output as suggested by Martin Daly. + * [r888] Modified GML output as suggested by Martin Daly. -2004-09-23 11:12 strk +2004-09-23 11:12 Sandro Santilli <strk@keybit.net> - * Initial GML output routines. + * [r887] Initial GML output routines. -2004-09-23 10:13 strk +2004-09-23 10:13 Sandro Santilli <strk@keybit.net> - * Profile output modified again, input geoms points and conversion - times separated + * [r886] Profile output modified again, input geoms points and + conversion times separated -2004-09-22 17:13 strk +2004-09-22 17:13 Sandro Santilli <strk@keybit.net> - * indentation fixes + * [r885] indentation fixes -2004-09-22 17:12 strk +2004-09-22 17:12 Sandro Santilli <strk@keybit.net> - * indentation and function-call-debugging preparation + * [r884] indentation and function-call-debugging preparation -2004-09-22 17:11 strk +2004-09-22 17:11 Sandro Santilli <strk@keybit.net> - * removed some compiler warnings + * [r883] removed some compiler warnings -2004-09-22 17:11 strk +2004-09-22 17:11 Sandro Santilli <strk@keybit.net> - * Added missing prototype to make compiler happy + * [r882] Added missing prototype to make compiler happy -2004-09-22 16:52 strk +2004-09-22 16:52 Sandro Santilli <strk@keybit.net> - * Added lwpoint_size, lwline_size, lwpoly_size for computing + * [r881] Added lwpoint_size, lwline_size, lwpoly_size for computing serialized size from deserialized objects. -2004-09-22 16:29 strk +2004-09-22 16:29 Sandro Santilli <strk@keybit.net> - * Some more source file cleanups. + * [r880] Some more source file cleanups. -2004-09-22 16:09 strk +2004-09-22 16:09 Sandro Santilli <strk@keybit.net> - * Moved size computation functions in module static scope. + * [r879] Moved size computation functions in module static scope. Renamed public one to lwgeom_size(char *). -2004-09-22 15:15 strk +2004-09-22 15:15 Sandro Santilli <strk@keybit.net> - * lw<type>_findlength function made statics of lwgeom_api.c. + * [r878] lw<type>_findlength function made statics of lwgeom_api.c. public functions with those names should accept LW<TYPE> pointers instead.. -2004-09-22 15:11 strk +2004-09-22 15:11 Sandro Santilli <strk@keybit.net> - * LWGEOM TODO moved back to the lwgeom/ dir. + * [r877] LWGEOM TODO moved back to the lwgeom/ dir. -2004-09-22 14:57 strk +2004-09-22 14:57 Sandro Santilli <strk@keybit.net> - * updated + * [r876] updated -2004-09-22 14:57 strk +2004-09-22 14:57 Sandro Santilli <strk@keybit.net> - * line_interpolate_point added. + * [r875] line_interpolate_point added. -2004-09-22 14:56 strk +2004-09-22 14:56 Sandro Santilli <strk@keybit.net> - * fixed a comment + * [r874] fixed a comment -2004-09-22 13:45 strk +2004-09-22 13:45 Sandro Santilli <strk@keybit.net> - * Added 'label' argument to the profreport macro. + * [r873] Added 'label' argument to the profreport macro. -2004-09-22 11:42 strk +2004-09-22 11:42 Sandro Santilli <strk@keybit.net> - * Renamed lwgeom_npoints_recursive to lwgeom_npoints and exposed in - lwgeom.h. + * [r872] Renamed lwgeom_npoints_recursive to lwgeom_npoints and + exposed in lwgeom.h. Changed SERIALIZED_FORM macro to be less LWGEOM structure aware. Added profiling header file. Modified profiling calls to include total query time. Initial profiling support in the mindistance function. -2004-09-22 04:48 pramsey +2004-09-22 04:48 Paul Ramsey <pramsey@cleverelephant.ca> - * Add number nesting to sections. Fix link in postgis.xml + * [r871] Add number nesting to sections. Fix link in postgis.xml -2004-09-21 21:04 strk +2004-09-21 21:04 Sandro Santilli <strk@keybit.net> - * slightly changed PROF_SUM output for sort acceptance + * [r870] slightly changed PROF_SUM output for sort acceptance -2004-09-21 20:44 strk +2004-09-21 20:44 Sandro Santilli <strk@keybit.net> - * Fixed a profiler bug. + * [r869] Fixed a profiler bug. Added points count and doubled profiler output. -2004-09-21 19:10 pramsey +2004-09-21 19:10 Paul Ramsey <pramsey@cleverelephant.ca> - * Add section autolabelling to printed output + * [r868] Add section autolabelling to printed output -2004-09-21 19:09 pramsey +2004-09-21 19:09 Paul Ramsey <pramsey@cleverelephant.ca> - * Add autolabelling to sections in generated HTML. + * [r867] Add autolabelling to sections in generated HTML. -2004-09-21 17:50 strk +2004-09-21 17:50 Sandro Santilli <strk@keybit.net> - * Added missing profiling report calls in predicates + * [r866] Added missing profiling report calls in predicates -2004-09-21 17:36 strk +2004-09-21 17:36 Sandro Santilli <strk@keybit.net> - * Added GEOS profiling support. + * [r865] Added GEOS profiling support. -2004-09-21 16:08 strk +2004-09-21 16:08 Sandro Santilli <strk@keybit.net> - * reduced memory copies in GEOS2POSTGIS() + * [r864] reduced memory copies in GEOS2POSTGIS() -2004-09-21 16:07 strk +2004-09-21 16:07 Sandro Santilli <strk@keybit.net> - * buffer serialized accept NULL as return-size pointer + * [r863] buffer serialized accept NULL as return-size pointer -2004-09-21 15:44 strk +2004-09-21 15:44 Sandro Santilli <strk@keybit.net> - * Added lwgeom_empy_length(), lwgeom_constructempty_buf(), + * [r862] Added lwgeom_empy_length(), lwgeom_constructempty_buf(), lwexploded_serialize_buf() -2004-09-21 10:57 strk +2004-09-21 10:57 Sandro Santilli <strk@keybit.net> - * Added lwexploded_findlength + * [r861] Added lwexploded_findlength -2004-09-20 21:13 strk +2004-09-20 21:13 Sandro Santilli <strk@keybit.net> - * Optimized postgis->geos conversion + * [r860] Optimized postgis->geos conversion -2004-09-20 21:13 strk +2004-09-20 21:13 Sandro Santilli <strk@keybit.net> - * commented pfree call in GEOSnoop (seems to generate memory + * [r859] commented pfree call in GEOSnoop (seems to generate memory faults) -2004-09-20 17:14 strk +2004-09-20 17:14 Sandro Santilli <strk@keybit.net> - * updated + * [r858] updated -2004-09-20 17:13 strk +2004-09-20 17:13 Sandro Santilli <strk@keybit.net> - * changed comments to better show shape type handling + * [r857] changed comments to better show shape type handling -2004-09-20 17:11 strk +2004-09-20 17:11 Sandro Santilli <strk@keybit.net> - * Added -d -d availability notice in help string. + * [r856] Added -d -d availability notice in help string. Added user notice about output shape type. -2004-09-20 17:03 strk +2004-09-20 17:03 Sandro Santilli <strk@keybit.net> - * Added force_4d(geometry) + * [r855] Added force_4d(geometry) -2004-09-20 16:33 strk +2004-09-20 16:33 Sandro Santilli <strk@keybit.net> - * Added 4d geometries support. + * [r854] Added 4d geometries support. Changelog section moved at bottom file. -2004-09-20 14:14 strk +2004-09-20 14:14 Sandro Santilli <strk@keybit.net> - * Fixed a bug in popbyte. Trapped WKB endiannes errors. + * [r852] Fixed a bug in popbyte. Trapped WKB endiannes errors. -2004-09-20 13:50 strk +2004-09-20 13:50 Sandro Santilli <strk@keybit.net> - * updated + * [r851] updated -2004-09-20 13:49 strk +2004-09-20 13:49 Sandro Santilli <strk@keybit.net> - * Postgis-1.x support (LWGEOM) added. + * [r850] Postgis-1.x support (LWGEOM) added. postgis version detected at runtime. Endiannes unchecked ... TODO. -2004-09-20 12:07 strk +2004-09-20 12:07 Sandro Santilli <strk@keybit.net> - * Changed postgis.sql to lwpostgis.sql + * [r849] Changed postgis.sql to lwpostgis.sql -2004-09-20 12:07 strk +2004-09-20 12:07 Sandro Santilli <strk@keybit.net> - * Added lwpostgis.sql rule + * [r848] Added lwpostgis.sql rule -2004-09-20 10:58 strk +2004-09-20 10:58 Sandro Santilli <strk@keybit.net> - * updated layout description and configuration instructions + * [r847] updated layout description and configuration instructions -2004-09-20 10:09 strk +2004-09-20 10:09 Sandro Santilli <strk@keybit.net> - * Renamed README + * [r846] Renamed README -2004-09-20 10:08 strk +2004-09-20 10:08 Sandro Santilli <strk@keybit.net> - * Added missing 'uninstall' rules. Fixed existing install rules. + * [r845] Added missing 'uninstall' rules. Fixed existing install + rules. -2004-09-20 09:58 strk +2004-09-20 09:58 Sandro Santilli <strk@keybit.net> - * Configuration and common Makefile work moved to Makefile.config + * [r844] Configuration and common Makefile work moved to + Makefile.config Build is possible from each directory and from the root directory. -2004-09-20 09:29 strk +2004-09-20 09:29 Sandro Santilli <strk@keybit.net> - * added missing prototype + * [r843] added missing prototype -2004-09-20 09:22 strk +2004-09-20 09:22 Sandro Santilli <strk@keybit.net> - * Reworked build scripts. + * [r842] Reworked build scripts. -2004-09-20 09:21 strk +2004-09-20 09:21 Sandro Santilli <strk@keybit.net> - * fixed bugs in non-GEOS centroid function + * [r841] fixed bugs in non-GEOS centroid function -2004-09-20 09:20 strk +2004-09-20 09:20 Sandro Santilli <strk@keybit.net> - * cleanups + * [r840] cleanups -2004-09-20 08:53 strk +2004-09-20 08:53 Sandro Santilli <strk@keybit.net> - * generalized library ignore line + * [r839] generalized library ignore line -2004-09-20 08:52 strk +2004-09-20 08:52 Sandro Santilli <strk@keybit.net> - * Added postgis_geos_version.h + * [r838] Added postgis_geos_version.h -2004-09-20 08:52 strk +2004-09-20 08:52 Sandro Santilli <strk@keybit.net> - * included local postgis_geos_version.h + * [r837] included local postgis_geos_version.h -2004-09-20 08:51 strk +2004-09-20 08:51 Sandro Santilli <strk@keybit.net> - * Added detect_geos_version rule + * [r836] Added detect_geos_version rule -2004-09-20 08:29 strk +2004-09-20 08:29 Sandro Santilli <strk@keybit.net> - * Moved lwgeom TODO in the root + * [r835] Moved lwgeom TODO in the root -2004-09-20 08:25 strk +2004-09-20 08:25 Sandro Santilli <strk@keybit.net> - * HWGEOM functions moved under hwgeom/ directory + * [r834] HWGEOM functions moved under hwgeom/ directory -2004-09-20 08:21 strk +2004-09-20 08:21 Sandro Santilli <strk@keybit.net> - * fixed typo + * [r833] fixed typo -2004-09-20 07:50 strk +2004-09-20 07:50 Sandro Santilli <strk@keybit.net> - * prepared to contain old internal representation code + * [r832] prepared to contain old internal representation code -2004-09-18 22:15 strk +2004-09-18 22:15 Sandro Santilli <strk@keybit.net> - * Fixed a serius bug in pointArray_construct. + * [r831] Fixed a serius bug in pointArray_construct. Added debugging output, optimized some functions, indentation buties.. -2004-09-18 22:13 strk +2004-09-18 22:13 Sandro Santilli <strk@keybit.net> - * Added more debugging output + * [r830] Added more debugging output -2004-09-16 20:36 pramsey +2004-09-16 20:36 Paul Ramsey <pramsey@cleverelephant.ca> - * Reorganize OpenGIS function reference into categories. + * [r829] Reorganize OpenGIS function reference into categories. -2004-09-16 15:50 mleslie +2004-09-16 15:50 Mark Leslie <mark.leslie@lisasoft.com> - * Added the distance_sphere function to calculate the distance - between two points + * [r828] Added the distance_sphere function to calculate the + distance between two points on an earth-sized sphere using an algorithm implemented by Bruno Wolff III. Added the postgresql loader function. -2004-09-16 10:42 strk +2004-09-16 10:42 Sandro Santilli <strk@keybit.net> - * Added box3d_to_box2df_p to reduce number of required memcpys + * [r827] Added box3d_to_box2df_p to reduce number of required + memcpys -2004-09-16 09:06 strk +2004-09-16 09:06 Sandro Santilli <strk@keybit.net> - * Changed SPI_cursor_open call changes to be used for USE_VERSION > - 80 + * [r826] Changed SPI_cursor_open call changes to be used for + USE_VERSION > 80 (change seems to be intended for future releases) -2004-09-16 09:05 strk +2004-09-16 09:05 Sandro Santilli <strk@keybit.net> - * Added binary predicate short-circuits + * [r825] Added binary predicate short-circuits -2004-09-16 09:05 strk +2004-09-16 09:05 Sandro Santilli <strk@keybit.net> - * Added getbox2d_internal + * [r824] Added getbox2d_internal -2004-09-16 09:04 strk +2004-09-16 09:04 Sandro Santilli <strk@keybit.net> - * updated + * [r823] updated -2004-09-14 12:31 strk +2004-09-14 12:31 Sandro Santilli <strk@keybit.net> - * CHIP and GEOS types (forgot to add) + * [r821] CHIP and GEOS types (forgot to add) -2004-09-14 12:23 strk +2004-09-14 12:23 Sandro Santilli <strk@keybit.net> - * Added a note about tweeking random_page_cost + * [r819] Added a note about tweeking random_page_cost -2004-09-14 08:39 strk +2004-09-14 08:39 Sandro Santilli <strk@keybit.net> - * fixed a typo in the geometry_send function definition + * [r818] fixed a typo in the geometry_send function definition -2004-09-14 07:43 strk +2004-09-14 07:43 Sandro Santilli <strk@keybit.net> - * Updated call to SPI_cursor_open to 8.0 (beta2) interface. + * [r816] Updated call to SPI_cursor_open to 8.0 (beta2) interface. -2004-09-13 19:04 strk +2004-09-13 19:04 Sandro Santilli <strk@keybit.net> - * updated + * [r815] updated -2004-09-13 17:59 strk +2004-09-13 17:59 Sandro Santilli <strk@keybit.net> - * removed old files from Attic/ + * [r813] removed old files from Attic/ -2004-09-13 15:37 pramsey +2004-09-13 15:37 Paul Ramsey <pramsey@cleverelephant.ca> - * Added pdf rule that uses pdfxmltex + * [r810] Added pdf rule that uses pdfxmltex -2004-09-13 14:26 strk +2004-09-13 14:26 Sandro Santilli <strk@keybit.net> - * Added binary input/output function for type geometry. + * [r808] Added binary input/output function for type geometry. -2004-09-13 14:26 strk +2004-09-13 14:26 Sandro Santilli <strk@keybit.net> - * indentation fix + * [r807] indentation fix -2004-09-13 13:35 strk +2004-09-13 13:35 Sandro Santilli <strk@keybit.net> - * updated + * [r806] updated -2004-09-13 13:32 strk +2004-09-13 13:32 Sandro Santilli <strk@keybit.net> - * Added AsSVG(). + * [r805] Added AsSVG(). -2004-09-13 08:48 strk +2004-09-13 08:48 Sandro Santilli <strk@keybit.net> - * Added POINT rendering info for AsSVG function + * [r804] Added POINT rendering info for AsSVG function -2004-09-10 18:41 pramsey +2004-09-10 18:41 Paul Ramsey <pramsey@cleverelephant.ca> - * Bump version numbers to 0.9.0 + * [r803] Bump version numbers to 0.9.0 -2004-09-10 16:41 pramsey +2004-09-10 16:41 Paul Ramsey <pramsey@cleverelephant.ca> - * Added 'recommended' to proj/geos flags + * [r802] Added 'recommended' to proj/geos flags -2004-09-10 16:19 pramsey +2004-09-10 16:19 Paul Ramsey <pramsey@cleverelephant.ca> - * Note 8.0 support and w32 + * [r801] Note 8.0 support and w32 -2004-09-10 16:16 pramsey +2004-09-10 16:16 Paul Ramsey <pramsey@cleverelephant.ca> - * Added Log tag to header. + * [r800] Added Log tag to header. -2004-09-10 15:52 strk +2004-09-10 15:52 Sandro Santilli <strk@keybit.net> - * Added asSVG documentation + * [r799] Added asSVG documentation -2004-09-10 13:26 strk +2004-09-10 13:26 Sandro Santilli <strk@keybit.net> - * updated + * [r798] updated -2004-09-10 13:25 strk +2004-09-10 13:25 Sandro Santilli <strk@keybit.net> - * fixed a memory fault + * [r797] fixed a memory fault -2004-09-10 12:49 strk +2004-09-10 12:49 Sandro Santilli <strk@keybit.net> - * Included SVG output function, modified to have precision + * [r796] Included SVG output function, modified to have precision expressed in terms of significant digits. -2004-09-10 08:48 strk +2004-09-10 08:48 Sandro Santilli <strk@keybit.net> - * Added all ..FromWKB functions, asbinary(geom) and bytea<->geom - casts + * [r795] Added all ..FromWKB functions, asbinary(geom) and + bytea<->geom casts -2004-09-10 07:36 strk +2004-09-10 07:36 Sandro Santilli <strk@keybit.net> - * asbinary(), geomfromwkb + * [r794] asbinary(), geomfromwkb -2004-09-09 22:48 pramsey +2004-09-09 22:48 Paul Ramsey <pramsey@cleverelephant.ca> - * Changes in preparation for 0.9 + * [r793] Changes in preparation for 0.9 -2004-09-09 20:51 pramsey +2004-09-09 20:51 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix silly entity handling in chunked mode HTML generation + * [r792] Fix silly entity handling in chunked mode HTML generation -2004-09-09 19:08 pramsey +2004-09-09 19:08 Paul Ramsey <pramsey@cleverelephant.ca> - * Added FAQ for mapserver section and entries on SQL spatial + * [r791] Added FAQ for mapserver section and entries on SQL spatial queries. -2004-09-09 17:38 pramsey +2004-09-09 17:38 Paul Ramsey <pramsey@cleverelephant.ca> - * Added example spatial SQL section. + * [r790] Added example spatial SQL section. -2004-09-09 15:37 pramsey +2004-09-09 15:37 Paul Ramsey <pramsey@cleverelephant.ca> - * Add --output flag to html build rule + * [r789] Add --output flag to html build rule -2004-09-08 16:34 strk +2004-09-08 16:34 Sandro Santilli <strk@keybit.net> - * some bug fixes... geometry_analyze added + * [r788] some bug fixes... geometry_analyze added -2004-09-08 14:30 strk +2004-09-08 14:30 Sandro Santilli <strk@keybit.net> - * Fixed bug in GEOS link reference + * [r787] Fixed bug in GEOS link reference -2004-09-08 14:27 strk +2004-09-08 14:27 Sandro Santilli <strk@keybit.net> - * updated + * [r786] updated -2004-09-08 14:19 strk +2004-09-08 14:19 Sandro Santilli <strk@keybit.net> - * Added segmentize() + * [r785] Added segmentize() -2004-09-08 14:18 strk +2004-09-08 14:18 Sandro Santilli <strk@keybit.net> - * Added segmentize(geom,double) documentation + * [r784] Added segmentize(geom,double) documentation -2004-09-08 10:57 strk +2004-09-08 10:57 Sandro Santilli <strk@keybit.net> - * updated + * [r783] updated -2004-09-08 10:44 strk +2004-09-08 10:44 Sandro Santilli <strk@keybit.net> - * re-introduced 'jw' optional production method + * [r782] re-introduced 'jw' optional production method -2004-09-08 10:25 strk +2004-09-08 10:25 Sandro Santilli <strk@keybit.net> - * Fixed a bug in the z() function. + * [r781] Fixed a bug in the z() function. Added ! GEOS implementation of Centroid(). -2004-09-08 00:31 pramsey +2004-09-08 00:31 Paul Ramsey <pramsey@cleverelephant.ca> - * Commit today's edits. + * [r780] Commit today's edits. -2004-09-07 22:40 pramsey +2004-09-07 22:40 Paul Ramsey <pramsey@cleverelephant.ca> - * Make default html output be a single page. + * [r779] Make default html output be a single page. -2004-09-07 22:35 pramsey +2004-09-07 22:35 Paul Ramsey <pramsey@cleverelephant.ca> - * Change chunking depth to "chapter". + * [r778] Change chunking depth to "chapter". -2004-09-07 22:28 pramsey +2004-09-07 22:28 Paul Ramsey <pramsey@cleverelephant.ca> - * More minor editorial changes. + * [r777] More minor editorial changes. -2004-09-07 22:28 pramsey +2004-09-07 22:28 Paul Ramsey <pramsey@cleverelephant.ca> - * Changed Docbook processing from DSSSL to XSL. + * [r776] Changed Docbook processing from DSSSL to XSL. -2004-09-07 17:04 strk +2004-09-07 17:04 Sandro Santilli <strk@keybit.net> - * GEOS support added. + * [r775] GEOS support added. -2004-09-07 07:47 strk +2004-09-07 07:47 Sandro Santilli <strk@keybit.net> - * Added CHIP type and support funx + * [r774] Added CHIP type and support funx -2004-09-06 16:18 strk +2004-09-06 16:18 Sandro Santilli <strk@keybit.net> - * updated some comments + * [r773] updated some comments -2004-09-06 16:05 strk +2004-09-06 16:05 Sandro Santilli <strk@keybit.net> - * updated + * [r772] updated -2004-09-06 16:04 strk +2004-09-06 16:04 Sandro Santilli <strk@keybit.net> - * Changed getbox2d_p signature to return 0 for EMPTY geometries. + * [r771] Changed getbox2d_p signature to return 0 for EMPTY + geometries. Ported DP simplifier. -2004-09-06 12:24 strk +2004-09-06 12:24 Sandro Santilli <strk@keybit.net> - * Added IsEmpty() + * [r770] Added IsEmpty() -2004-09-06 10:37 strk +2004-09-06 10:37 Sandro Santilli <strk@keybit.net> - * Finished BOX3D functions porting. + * [r769] Finished BOX3D functions porting. Added envelope() and extent3d(). -2004-09-06 09:32 strk +2004-09-06 09:32 Sandro Santilli <strk@keybit.net> - * Added min/max coordinates from box2d and box3d. + * [r768] Added min/max coordinates from box2d and box3d. Made geometry->box3d cast actually use 'z' value. -2004-09-06 09:13 strk +2004-09-06 09:13 Sandro Santilli <strk@keybit.net> - * Added box3d support and expand(geom|box2d|box3d, double) + * [r767] Added box3d support and expand(geom|box2d|box3d, double) -2004-09-04 19:58 pramsey +2004-09-04 19:58 Paul Ramsey <pramsey@cleverelephant.ca> - * More minor edits. + * [r766] More minor edits. -2004-08-28 23:00 pramsey +2004-08-28 23:00 Paul Ramsey <pramsey@cleverelephant.ca> - * Replace all tabs with spaces. + * [r765] Replace all tabs with spaces. -2004-08-28 22:55 pramsey +2004-08-28 22:55 Paul Ramsey <pramsey@cleverelephant.ca> - * Updated street address reference. + * [r764] Updated street address reference. -2004-08-28 22:54 pramsey +2004-08-28 22:54 Paul Ramsey <pramsey@cleverelephant.ca> - * Removed < sign and replaced with < + * [r763] Removed < sign and replaced with < -2004-08-27 16:01 strk +2004-08-27 16:01 Sandro Santilli <strk@keybit.net> - * Added geom_accum(), collect_garray() and collect() + * [r762] Added geom_accum(), collect_garray() and collect() -2004-08-27 15:04 strk +2004-08-27 15:04 Sandro Santilli <strk@keybit.net> - * updated + * [r761] updated -2004-08-27 15:03 strk +2004-08-27 15:03 Sandro Santilli <strk@keybit.net> - * Fixed bug in lwgeom_explode allocating less memory then needed. + * [r760] Fixed bug in lwgeom_explode allocating less memory then + needed. -2004-08-27 14:35 strk +2004-08-27 14:35 Sandro Santilli <strk@keybit.net> - * Added LWGEOM_EXPLODED structure definition and utility funx. + * [r759] Added LWGEOM_EXPLODED structure definition and utility + funx. Added collector() function and memcollect() aggregate. Still faulting... -2004-08-27 08:13 strk +2004-08-27 08:13 Sandro Santilli <strk@keybit.net> - * Added point_inside_circle() and translate() + * [r758] Added point_inside_circle() and translate() -2004-08-27 08:12 strk +2004-08-27 08:12 Sandro Santilli <strk@keybit.net> - * Fixed typo ( mem_collect ==> memcollect ) + * [r757] Fixed typo ( mem_collect ==> memcollect ) -2004-08-26 16:55 strk +2004-08-26 16:55 Sandro Santilli <strk@keybit.net> - * max_distance() raises an 'unimplemented yet' error. + * [r756] max_distance() raises an 'unimplemented yet' error. -2004-08-26 16:44 strk +2004-08-26 16:44 Sandro Santilli <strk@keybit.net> - * Added nrings(geom), multi(geom) and all of <type>FromText(geom, - [srid]) + * [r755] Added nrings(geom), multi(geom) and all of + <type>FromText(geom, [srid]) -2004-08-26 15:04 strk +2004-08-26 15:04 Sandro Santilli <strk@keybit.net> - * updated + * [r754] updated -2004-08-26 15:02 strk +2004-08-26 15:02 Sandro Santilli <strk@keybit.net> - * Added (bogus) max_distance(geom,geom) + * [r753] Added (bogus) max_distance(geom,geom) -2004-08-26 12:55 strk +2004-08-26 12:55 Sandro Santilli <strk@keybit.net> - * Added distance(geometry) and all support functions. + * [r752] Added distance(geometry) and all support functions. -2004-08-26 12:54 strk +2004-08-26 12:54 Sandro Santilli <strk@keybit.net> - * Added a note about spheroid computation + * [r751] Added a note about spheroid computation -2004-08-26 08:57 strk +2004-08-26 08:57 Sandro Santilli <strk@keybit.net> - * Added spheroid type and functions + * [r750] Added spheroid type and functions -2004-08-25 15:28 strk +2004-08-25 15:28 Sandro Santilli <strk@keybit.net> - * Added IsClosed() and force_collection() + * [r749] Added IsClosed() and force_collection() -2004-08-25 15:26 strk +2004-08-25 15:26 Sandro Santilli <strk@keybit.net> - * Added macros for LWGEOM.type manipulation + * [r748] Added macros for LWGEOM.type manipulation -2004-08-25 13:41 strk +2004-08-25 13:41 Sandro Santilli <strk@keybit.net> - * Added force_3d + * [r747] Added force_3d -2004-08-25 12:32 strk +2004-08-25 12:32 Sandro Santilli <strk@keybit.net> - * Added perimeter,perimeter2d,perimeter3d. + * [r746] Added perimeter,perimeter2d,perimeter3d. Modified length,length2d,length3d semantic. Added force_2d. -2004-08-25 12:29 strk +2004-08-25 12:29 Sandro Santilli <strk@keybit.net> - * Added serialized functions writing to a pre-allocated buffer. + * [r745] Added serialized functions writing to a pre-allocated + buffer. -2004-08-25 07:29 strk +2004-08-25 07:29 Sandro Santilli <strk@keybit.net> - * Moved some OGC functions from lwgeom_inout.c to lwgeom_ogc.c. + * [r744] Moved some OGC functions from lwgeom_inout.c to + lwgeom_ogc.c. Added area2d (area) to lwgeom_functions_basic.c -2004-08-25 07:28 strk +2004-08-25 07:28 Sandro Santilli <strk@keybit.net> - * Added lwgeom_pg to contain PG-specific functions/interfaces. + * [r743] Added lwgeom_pg to contain PG-specific + functions/interfaces. -2004-08-24 16:33 strk +2004-08-24 16:33 Sandro Santilli <strk@keybit.net> - * Added StartPoint(), EndPoint() + * [r742] Added StartPoint(), EndPoint() -2004-08-24 16:20 strk +2004-08-24 16:20 Sandro Santilli <strk@keybit.net> - * Added X(), Y() and Z() funx + * [r741] Added X(), Y() and Z() funx -2004-08-24 15:50 strk +2004-08-24 15:50 Sandro Santilli <strk@keybit.net> - * PointN() ported. + * [r740] PointN() ported. -2004-08-24 15:10 strk +2004-08-24 15:10 Sandro Santilli <strk@keybit.net> - * fixed a bug preventing ExteriorRing() and InteriorRingN from - setting the + * [r739] fixed a bug preventing ExteriorRing() and InteriorRingN + from setting the correct SRID. -2004-08-24 15:07 strk +2004-08-24 15:07 Sandro Santilli <strk@keybit.net> - * updated + * [r738] updated -2004-08-24 15:05 strk +2004-08-24 15:05 Sandro Santilli <strk@keybit.net> - * Added NumInteriorRings() and InteriorRingN() + * [r737] Added NumInteriorRings() and InteriorRingN() -2004-08-24 14:48 strk +2004-08-24 14:48 Sandro Santilli <strk@keybit.net> - * Added dimension() and exteriorring() + * [r736] Added dimension() and exteriorring() -2004-08-24 14:47 strk +2004-08-24 14:47 Sandro Santilli <strk@keybit.net> - * Added LWGEOM_construct() function to easy the work of dealing + * [r735] Added LWGEOM_construct() function to easy the work of + dealing with SRID/BBOX optional embedding. -2004-08-24 13:45 strk +2004-08-24 13:45 Sandro Santilli <strk@keybit.net> - * Fixed a bug in lwgeom_getSRID() + * [r734] Fixed a bug in lwgeom_getSRID() -2004-08-24 13:35 strk +2004-08-24 13:35 Sandro Santilli <strk@keybit.net> - * Indentation and debugging output. + * [r733] Indentation and debugging output. -2004-08-24 13:34 strk +2004-08-24 13:34 Sandro Santilli <strk@keybit.net> - * fixed a typo in a comment + * [r732] fixed a typo in a comment -2004-08-24 13:33 strk +2004-08-24 13:33 Sandro Santilli <strk@keybit.net> - * Fixed a bug in LWGEOM_addBBOX preventing it to detect missing - BBOX embedding. + * [r731] Fixed a bug in LWGEOM_addBBOX preventing it to detect + missing BBOX embedding. -2004-08-24 10:01 strk +2004-08-24 10:01 Sandro Santilli <strk@keybit.net> - * OGC functions (not implemented by GEOS) moved to lwgeom_ogc.c. + * [r730] OGC functions (not implemented by GEOS) moved to + lwgeom_ogc.c. Renamed PG-exposed functions to start with LWGEOM -2004-08-24 09:34 strk +2004-08-24 09:34 Sandro Santilli <strk@keybit.net> - * Added npoints,numpoints,numgeometries,geometryn + * [r729] Added npoints,numpoints,numgeometries,geometryn -2004-08-24 07:40 strk +2004-08-24 07:40 Sandro Santilli <strk@keybit.net> - * transformation work made on an input copy (made by setSRID). + * [r728] transformation work made on an input copy (made by + setSRID). previous behaviour was unsafe (scribbling input object). -2004-08-24 07:32 strk +2004-08-24 07:32 Sandro Santilli <strk@keybit.net> - * initial import + * [r727] initial import -2004-08-24 06:59 strk +2004-08-24 06:59 Sandro Santilli <strk@keybit.net> - * added missing prototype + * [r726] added missing prototype -2004-08-24 06:56 strk +2004-08-24 06:56 Sandro Santilli <strk@keybit.net> - * geos version detector and wrapper used from parent directory + * [r725] geos version detector and wrapper used from parent + directory -2004-08-23 16:05 strk +2004-08-23 16:05 Sandro Santilli <strk@keybit.net> - * fixed typo + * [r724] fixed typo -2004-08-23 15:57 strk +2004-08-23 15:57 Sandro Santilli <strk@keybit.net> - * versioning functions completed + * [r723] versioning functions completed -2004-08-23 15:41 strk +2004-08-23 15:41 Sandro Santilli <strk@keybit.net> - * changed install rule to install lwpostgis.sql instead of + * [r722] changed install rule to install lwpostgis.sql instead of lwgeom.sql -2004-08-23 15:37 strk +2004-08-23 15:37 Sandro Santilli <strk@keybit.net> - * Changed SCRIPTS_VERSION to 0.0.1 + * [r721] Changed SCRIPTS_VERSION to 0.0.1 -2004-08-23 13:54 strk +2004-08-23 13:54 Sandro Santilli <strk@keybit.net> - * proj support added + * [r720] proj support added -2004-08-23 13:40 strk +2004-08-23 13:40 Sandro Santilli <strk@keybit.net> - * deleted debugging block from summary() fn + * [r719] deleted debugging block from summary() fn -2004-08-23 13:38 strk +2004-08-23 13:38 Sandro Santilli <strk@keybit.net> - * Added getPoint(POINTARRAY *pts, int ptnum) + * [r718] Added getPoint(POINTARRAY *pts, int ptnum) -2004-08-23 10:49 strk +2004-08-23 10:49 Sandro Santilli <strk@keybit.net> - * Fixed a bug in serializedform length computation (for + * [r717] Fixed a bug in serializedform length computation (for collection). -2004-08-23 08:32 strk +2004-08-23 08:32 Sandro Santilli <strk@keybit.net> - * Removed custom allocator from lwgeom_api. + * [r716] Removed custom allocator from lwgeom_api. Added summary(geometry). Some indentation. -2004-08-20 16:36 strk +2004-08-20 16:36 Sandro Santilli <strk@keybit.net> - * transform() support + * [r715] transform() support -2004-08-20 16:35 strk +2004-08-20 16:35 Sandro Santilli <strk@keybit.net> - * initial skel for transform() + * [r714] initial skel for transform() -2004-08-20 14:54 strk +2004-08-20 14:54 Sandro Santilli <strk@keybit.net> - * updated + * [r713] updated -2004-08-20 14:54 strk +2004-08-20 14:54 Sandro Santilli <strk@keybit.net> - * gist operators support functions renamed to allow for finer - control by postgis_restore.pl + * [r712] gist operators support functions renamed to allow for + finer control by postgis_restore.pl -2004-08-20 14:52 strk +2004-08-20 14:52 Sandro Santilli <strk@keybit.net> - * Hardcoded some functions being obsoleted + * [r711] Hardcoded some functions being obsoleted -2004-08-20 14:08 strk +2004-08-20 14:08 Sandro Santilli <strk@keybit.net> - * Added Geom{etry,}FromWkb(<geometry>,[<int4>]) funx. + * [r710] Added Geom{etry,}FromWkb(<geometry>,[<int4>]) funx. Added LWGEOM typedef and SERIALIZED_FORM(LWGEOM) macro. Made lwgeom_setSRID an API function. Added LWGEOM_setAllocator(). -2004-08-20 10:24 strk +2004-08-20 10:24 Sandro Santilli <strk@keybit.net> - * Added lwpostgis.sql + * [r709] Added lwpostgis.sql -2004-08-20 10:23 strk +2004-08-20 10:23 Sandro Santilli <strk@keybit.net> - * removed leak from mem_size() + * [r708] removed leak from mem_size() -2004-08-20 09:35 strk +2004-08-20 09:35 Sandro Santilli <strk@keybit.net> - * lwgeom_mem_size uses int32 cast instead of int + * [r707] lwgeom_mem_size uses int32 cast instead of int -2004-08-20 09:31 strk +2004-08-20 09:31 Sandro Santilli <strk@keybit.net> - * bug fixed in lwgeom_mem_size + * [r706] bug fixed in lwgeom_mem_size -2004-08-20 08:14 strk +2004-08-20 08:14 Sandro Santilli <strk@keybit.net> - * Whole output wrapped in transaction blocks. + * [r705] Whole output wrapped in transaction blocks. Drops are out of transaction, and multiple transactions are used for INSERT mode. -2004-08-20 07:57 strk +2004-08-20 07:57 Sandro Santilli <strk@keybit.net> - * Fixed a bug in 'append-mode'. + * [r704] Fixed a bug in 'append-mode'. Added -g switch to specify geometry column. Added a note about -d mode conceptual bugs. -2004-08-19 14:16 strk +2004-08-19 14:16 Sandro Santilli <strk@keybit.net> - * indentation fixes + * [r703] indentation fixes -2004-08-19 14:15 strk +2004-08-19 14:15 Sandro Santilli <strk@keybit.net> - * added lwpostgis.sql build rule + * [r702] added lwpostgis.sql build rule -2004-08-19 14:05 strk +2004-08-19 14:05 Sandro Santilli <strk@keybit.net> - * Added finite coordinate check. + * [r701] Added finite coordinate check. Reduced required bounding box copies. -2004-08-19 13:57 strk +2004-08-19 13:57 Sandro Santilli <strk@keybit.net> - * mem_size removed from list + * [r700] mem_size removed from list -2004-08-19 13:56 strk +2004-08-19 13:56 Sandro Santilli <strk@keybit.net> - * Added mem_size(lwgeom) + * [r699] Added mem_size(lwgeom) -2004-08-19 13:54 strk +2004-08-19 13:54 Sandro Santilli <strk@keybit.net> - * cpp checks updated to use 80 instead of 75 for USE_VERSION + * [r698] cpp checks updated to use 80 instead of 75 for USE_VERSION -2004-08-19 13:49 strk +2004-08-19 13:49 Sandro Santilli <strk@keybit.net> - * initial import + * [r697] initial import -2004-08-19 13:21 strk +2004-08-19 13:21 Sandro Santilli <strk@keybit.net> - * initial import + * [r696] initial import -2004-08-19 13:18 strk +2004-08-19 13:18 Sandro Santilli <strk@keybit.net> - * Added selectivity estimation + * [r695] Added selectivity estimation -2004-08-19 13:16 strk +2004-08-19 13:16 Sandro Santilli <strk@keybit.net> - * some indentation fixes + * [r694] some indentation fixes -2004-08-19 13:10 strk +2004-08-19 13:10 Sandro Santilli <strk@keybit.net> - * fixed typos + * [r693] fixed typos -2004-08-19 12:29 strk +2004-08-19 12:29 Sandro Santilli <strk@keybit.net> - * added btree index support file + * [r692] added btree index support file -2004-08-19 12:28 strk +2004-08-19 12:28 Sandro Santilli <strk@keybit.net> - * added btree index support + * [r691] added btree index support -2004-08-19 10:52 strk +2004-08-19 10:52 Sandro Santilli <strk@keybit.net> - * Fixed a bug in ascii dump "CREATE OPERATOR" scan + * [r690] Fixed a bug in ascii dump "CREATE OPERATOR" scan -2004-08-19 09:30 strk +2004-08-19 09:30 Sandro Santilli <strk@keybit.net> - * rename_geometry_table_constraints() re-introduced to make + * [r689] rename_geometry_table_constraints() re-introduced to make constraint names conformant. -2004-08-19 09:28 strk +2004-08-19 09:28 Sandro Santilli <strk@keybit.net> - * fixed some of the buch of broken comments + * [r688] fixed some of the buch of broken comments -2004-08-19 06:15 strk +2004-08-19 06:15 Sandro Santilli <strk@keybit.net> - * USE_VERSION gets 80 where it got 75 + * [r687] USE_VERSION gets 80 where it got 75 -2004-08-19 05:38 pramsey +2004-08-19 05:38 Paul Ramsey <pramsey@cleverelephant.ca> - * Added some references to Proj4 and GEOS utility and source code - location in the Makefile + * [r686] Added some references to Proj4 and GEOS utility and source + code location in the Makefile to add context for new users. -2004-08-18 13:46 strk +2004-08-18 13:46 Sandro Santilli <strk@keybit.net> - * Added PG80 (75) patches. + * [r685] Added PG80 (75) patches. -2004-08-18 13:21 strk +2004-08-18 13:21 Sandro Santilli <strk@keybit.net> - * Added skip of postgisgistcostestimate (obsoleted) + * [r684] Added skip of postgisgistcostestimate (obsoleted) -2004-08-18 08:26 strk +2004-08-18 08:26 Sandro Santilli <strk@keybit.net> - * Spatial table constraints names get column name appended. + * [r683] Spatial table constraints names get column name appended. rename_geometry_table_constraints() obsoleted. -2004-08-17 15:27 strk +2004-08-17 15:27 Sandro Santilli <strk@keybit.net> - * added extent(lwgeom) and support functions. + * [r682] added extent(lwgeom) and support functions. -2004-08-17 14:35 strk +2004-08-17 14:35 Sandro Santilli <strk@keybit.net> - * SRID(geometry) changed to SRID(lwgeom) + * [r681] SRID(geometry) changed to SRID(lwgeom) -2004-08-17 14:30 strk +2004-08-17 14:30 Sandro Santilli <strk@keybit.net> - * Initial support for geometry->lwgeom switch (dump objects defined - for + * [r680] Initial support for geometry->lwgeom switch (dump objects + defined for 'geometry' are considered same of sql object defined for 'oldgeometry') -2004-08-17 14:28 strk +2004-08-17 14:28 Sandro Santilli <strk@keybit.net> - * Added SRID(geometry) for backward compatibility + * [r679] Added SRID(geometry) for backward compatibility -2004-08-17 14:21 strk +2004-08-17 14:21 Sandro Santilli <strk@keybit.net> - * Added geometrytype(LWGEOM) + * [r678] Added geometrytype(LWGEOM) -2004-08-16 20:38 strk +2004-08-16 20:38 Sandro Santilli <strk@keybit.net> - * OPERATOR parsing bug fixed. Schema removal improoved. More test - reports. + * [r677] OPERATOR parsing bug fixed. Schema removal improoved. More + test reports. -2004-08-16 11:03 mcayland +2004-08-16 11:03 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> - * Added DLLIMPORT reference to "default_statistics_target" if we - are compiling under Win32. This should make it unnecessary to - apply Romi's patch to the PostgreSQL source tree when compiling - PostgreSQL ready for PostGIS. + * [r676] Added DLLIMPORT reference to "default_statistics_target" + if we are compiling under Win32. This should make it unnecessary + to apply Romi's patch to the PostgreSQL source tree when + compiling PostgreSQL ready for PostGIS. -2004-08-16 10:46 strk +2004-08-16 10:46 Sandro Santilli <strk@keybit.net> - * GEOS version extraction not attempted if USE_GEOS is not set to - 1. + * [r675] GEOS version extraction not attempted if USE_GEOS is not + set to 1. -2004-08-13 12:29 strk +2004-08-13 12:29 Sandro Santilli <strk@keybit.net> - * Support dump generated by pg_dump 7.4 + * [r674] Support dump generated by pg_dump 7.4 -2004-08-11 17:07 strk +2004-08-11 17:07 Sandro Santilli <strk@keybit.net> - * Fixed a bug in non-finite Z check + * [r673] Fixed a bug in non-finite Z check -2004-08-10 21:09 strk +2004-08-10 21:09 Sandro Santilli <strk@keybit.net> - * changed proj version extractor to support pre 4.4.8 releases + * [r672] changed proj version extractor to support pre 4.4.8 + releases -2004-08-08 18:10 strk +2004-08-08 18:10 Sandro Santilli <strk@keybit.net> - * reduced psql invocation to a single one. + * [r671] reduced psql invocation to a single one. -2004-08-08 18:09 strk +2004-08-08 18:09 Sandro Santilli <strk@keybit.net> - * lwgeom.sql production follow postgis.sql production rules (cpp - usage) + * [r670] lwgeom.sql production follow postgis.sql production rules + (cpp usage) -2004-08-08 18:09 strk +2004-08-08 18:09 Sandro Santilli <strk@keybit.net> - * Added missing required parameter to usage string + * [r669] Added missing required parameter to usage string -2004-08-07 12:13 strk +2004-08-07 12:13 Sandro Santilli <strk@keybit.net> - * more header comments + * [r668] more header comments -2004-08-06 09:54 strk +2004-08-06 09:54 Sandro Santilli <strk@keybit.net> - * added handling of operators and operator classes (skip postgis - defined, keep others) + * [r667] added handling of operators and operator classes (skip + postgis defined, keep others) -2004-08-06 08:08 strk +2004-08-06 08:08 Sandro Santilli <strk@keybit.net> - * perl detection and bug fixes. + * [r666] perl detection and bug fixes. -2004-08-05 20:00 strk +2004-08-05 20:00 Sandro Santilli <strk@keybit.net> - * Another schema support bug from Mark + * [r665] Another schema support bug from Mark -2004-08-05 19:12 strk +2004-08-05 19:12 Sandro Santilli <strk@keybit.net> - * fixed bug in automatic perl invokation + * [r664] fixed bug in automatic perl invokation -2004-08-05 16:53 strk +2004-08-05 16:53 Sandro Santilli <strk@keybit.net> - * schema support patches sent by Mark + * [r663] schema support patches sent by Mark -2004-08-03 09:41 strk +2004-08-03 09:41 Sandro Santilli <strk@keybit.net> - * geometry_columns and spatial_ref_sys back created from dump + * [r662] geometry_columns and spatial_ref_sys back created from + dump -2004-08-03 09:30 strk +2004-08-03 09:30 Sandro Santilli <strk@keybit.net> - * Always added 'public' to search_path, to bypass pg_dump loss of + * [r661] Always added 'public' to search_path, to bypass pg_dump + loss of constrain functions schema. Added automatic 'perl' invocation. Reduced output (set $DEBUG=1 to have it back). -2004-08-03 09:29 strk +2004-08-03 09:29 Sandro Santilli <strk@keybit.net> - * updated + * [r660] updated -2004-08-03 07:58 strk +2004-08-03 07:58 Sandro Santilli <strk@keybit.net> - * handling of more cases + * [r659] handling of more cases -2004-08-02 19:03 strk +2004-08-02 19:03 Sandro Santilli <strk@keybit.net> - * initial import + * [r658] initial import -2004-08-02 16:27 strk +2004-08-02 16:27 Sandro Santilli <strk@keybit.net> - * Fixed format bugs (needed for postgis_undef.pl to work) + * [r657] Fixed format bugs (needed for postgis_undef.pl to work) -2004-07-29 14:10 strk +2004-07-29 14:10 Sandro Santilli <strk@keybit.net> - * Unability to open a shapefile or dbffile reported more nicely. + * [r656] Unability to open a shapefile or dbffile reported more + nicely. -2004-07-28 17:32 strk +2004-07-28 17:32 Sandro Santilli <strk@keybit.net> - * Added postgis_full_version(), marked postgis_version() as + * [r655] Added postgis_full_version(), marked postgis_version() as deprecated. -2004-07-28 16:15 strk +2004-07-28 16:15 Sandro Santilli <strk@keybit.net> - * Fixed a bug in postgis_full_version() + * [r654] Fixed a bug in postgis_full_version() -2004-07-28 16:10 strk +2004-07-28 16:10 Sandro Santilli <strk@keybit.net> - * Changed all version functions to return text. + * [r653] Changed all version functions to return text. Renamed postgis_scripts_version() to postgis_scripts_installed() Added postgis_scripts_released(). Added postgis_full_version(). -2004-07-28 13:37 strk +2004-07-28 13:37 Sandro Santilli <strk@keybit.net> - * Added postgis_uses_stats and postgis_scripts_version. + * [r652] Added postgis_uses_stats and postgis_scripts_version. Experimented with PIP short-circuit in within/contains functions. Documented new version functions. -2004-07-28 10:52 strk +2004-07-28 10:52 Sandro Santilli <strk@keybit.net> - * Added postgis_scripts_version + * [r651] Added postgis_scripts_version -2004-07-27 17:51 strk +2004-07-27 17:51 Sandro Santilli <strk@keybit.net> - * short-circuit test for 'contains' + * [r650] short-circuit test for 'contains' -2004-07-27 17:49 strk +2004-07-27 17:49 Sandro Santilli <strk@keybit.net> - * Added short-circuit test for the within function. + * [r649] Added short-circuit test for the within function. -2004-07-23 21:24 strk +2004-07-23 21:24 Sandro Santilli <strk@keybit.net> - * Added postgis_proj_version() + * [r648] Added postgis_proj_version() -2004-07-22 16:58 strk +2004-07-22 16:58 Sandro Santilli <strk@keybit.net> - * Updated to reflect geos version string split. + * [r647] Updated to reflect geos version string split. -2004-07-22 16:20 strk +2004-07-22 16:20 Sandro Santilli <strk@keybit.net> - * Added postgis_lib_version() and postgis_geos_version() + * [r646] Added postgis_lib_version() and postgis_geos_version() -2004-07-19 16:24 strk +2004-07-19 16:24 Sandro Santilli <strk@keybit.net> - * Added -i switch + * [r645] Added -i switch -2004-07-17 09:52 strk +2004-07-17 09:52 Sandro Santilli <strk@keybit.net> - * GEOS multi-version support switches implemented with + * [r644] GEOS multi-version support switches implemented with GEOS_LAST_INTERFACE -2004-07-17 09:52 strk +2004-07-17 09:52 Sandro Santilli <strk@keybit.net> - * Added GEOS_FIRST_INTERFACE, GEOS_LAST_INTERFACE, GEOS_JTS_PORT - detection + * [r643] Added GEOS_FIRST_INTERFACE, GEOS_LAST_INTERFACE, + GEOS_JTS_PORT detection -2004-07-17 09:51 strk +2004-07-17 09:51 Sandro Santilli <strk@keybit.net> - * Modified to always detect geos version (no deps) + * [r642] Modified to always detect geos version (no deps) -2004-07-08 19:33 strk +2004-07-08 19:33 Sandro Santilli <strk@keybit.net> - * Updated to respect CoordinateSequence GEOS interface switch. + * [r641] Updated to respect CoordinateSequence GEOS interface + switch. -2004-07-02 13:33 strk +2004-07-02 13:33 Sandro Santilli <strk@keybit.net> - * Changed GEOS header inclusion mechanism to be more polite + * [r640] Changed GEOS header inclusion mechanism to be more polite -2004-07-01 17:02 strk +2004-07-01 17:02 Sandro Santilli <strk@keybit.net> - * Updated to support latest GEOS API. + * [r639] Updated to support latest GEOS API. -2004-07-01 17:02 strk +2004-07-01 17:02 Sandro Santilli <strk@keybit.net> - * Updated to support latest GEOS (actually removed all geos-version - related + * [r638] Updated to support latest GEOS (actually removed all + geos-version related switches). Fixed an access to unallocated memory. -2004-06-22 21:30 pramsey +2004-06-22 21:30 Paul Ramsey <pramsey@cleverelephant.ca> - * Compile patch from Markus Schaber + * [r637] Compile patch from Markus Schaber -2004-06-22 16:52 strk +2004-06-22 16:52 Sandro Santilli <strk@keybit.net> - * Standard deviation factor used in histogram extent computation - made + * [r636] Standard deviation factor used in histogram extent + computation made a compile-time define. -2004-06-22 11:05 strk +2004-06-22 11:05 Sandro Santilli <strk@keybit.net> - * Handled empty strings in numeric fields as '0'es... pg_atoi() - does + * [r635] Handled empty strings in numeric fields as '0'es... + pg_atoi() does not do this (while atoi() does). -2004-06-18 17:11 strk +2004-06-18 17:11 Sandro Santilli <strk@keybit.net> - * Fixed a bug in minor version extractor. + * [r634] Fixed a bug in minor version extractor. Wrapped GEOS_VERSION in an #ifndef block. More runtime checks. -2004-06-16 20:04 strk +2004-06-16 20:04 Sandro Santilli <strk@keybit.net> - * added geos_version.sh as dependency of postgis_geos_version.h - rule + * [r633] added geos_version.sh as dependency of + postgis_geos_version.h rule -2004-06-16 19:59 strk +2004-06-16 19:59 Sandro Santilli <strk@keybit.net> - * Changed GEOS_VERSION to POSTGIS_GEOS_VERSION to avoid future - clashes + * [r632] Changed GEOS_VERSION to POSTGIS_GEOS_VERSION to avoid + future clashes -2004-06-16 19:37 strk +2004-06-16 19:37 Sandro Santilli <strk@keybit.net> - * Added cleanup needed for GEOS > 1.0 + * [r631] Added cleanup needed for GEOS > 1.0 -2004-06-16 19:28 strk +2004-06-16 19:28 Sandro Santilli <strk@keybit.net> - * fixed a typo in preprocessor define + * [r630] fixed a typo in preprocessor define -2004-06-16 18:50 strk +2004-06-16 18:50 Sandro Santilli <strk@keybit.net> - * Added postgis_geos_version.h to .cvsignore and to the list of - files + * [r629] Added postgis_geos_version.h to .cvsignore and to the list + of files removed by the clean: rule. -2004-06-16 18:47 strk +2004-06-16 18:47 Sandro Santilli <strk@keybit.net> - * Added code to detect geos version. + * [r628] Added code to detect geos version. Added appropriate includes in geos connectors. -2004-06-16 18:47 strk +2004-06-16 18:47 Sandro Santilli <strk@keybit.net> - * initial import + * [r627] initial import -2004-06-16 13:42 strk +2004-06-16 13:42 Sandro Santilli <strk@keybit.net> - * Added schema support in getMaxFieldSize. + * [r626] Added schema support in getMaxFieldSize. Added direct support for TIMESTAMP field types (thanks to Steffen Macke). -2004-06-16 13:14 strk +2004-06-16 13:14 Sandro Santilli <strk@keybit.net> - * documented statistics gethering operations + * [r625] documented statistics gethering operations -2004-06-14 08:06 strk +2004-06-14 08:06 Sandro Santilli <strk@keybit.net> - * fixed bogus support for PG71 + * [r624] fixed bogus support for PG71 -2004-06-14 07:48 strk +2004-06-14 07:48 Sandro Santilli <strk@keybit.net> - * Histogram extent redefinition after hard deviant removal fixed to - be + * [r623] Histogram extent redefinition after hard deviant removal + fixed to be "at most" the standard deviation based computed. -2004-06-11 11:38 strk +2004-06-11 11:38 Sandro Santilli <strk@keybit.net> - * Infinite geometries handling. + * [r622] Infinite geometries handling. Histogram extent re-computation after 'hard deviant' features removal. -2004-06-10 18:54 strk +2004-06-10 18:54 Sandro Santilli <strk@keybit.net> - * histogram grid size refined to use near-square cells. + * [r621] histogram grid size refined to use near-square cells. -2004-06-10 15:44 strk +2004-06-10 15:44 Sandro Santilli <strk@keybit.net> - * Added standard deviation based histogram extent refinement + * [r620] Added standard deviation based histogram extent refinement -2004-06-10 13:42 strk +2004-06-10 13:42 Sandro Santilli <strk@keybit.net> - * Separated the estimator code in an estimate_selectivity() + * [r619] Separated the estimator code in an estimate_selectivity() function. Handled complete contaiment and complete miss of histogram by searc box. -2004-06-09 10:19 strk +2004-06-09 10:19 Sandro Santilli <strk@keybit.net> - * Moved changes needed for PG75 inside postgis_gist_72.c using #if - switches. + * [r618] Moved changes needed for PG75 inside postgis_gist_72.c + using #if switches. -2004-06-09 10:05 strk +2004-06-09 10:05 Sandro Santilli <strk@keybit.net> - * Added switch for GIST_SUPPORT=75 + * [r617] Added switch for GIST_SUPPORT=75 -2004-06-09 10:05 strk +2004-06-09 10:05 Sandro Santilli <strk@keybit.net> - * initial import + * [r616] initial import -2004-06-09 09:35 strk +2004-06-09 09:35 Sandro Santilli <strk@keybit.net> - * Removed partial pgsql List API copy + * [r615] Removed partial pgsql List API copy -2004-06-09 09:08 strk +2004-06-09 09:08 Sandro Santilli <strk@keybit.net> - * changed index/rindex to strchr/strrchr + * [r614] changed index/rindex to strchr/strrchr -2004-06-09 09:06 strk +2004-06-09 09:06 Sandro Santilli <strk@keybit.net> - * Added Romi's Win32 patches. + * [r613] Added Romi's Win32 patches. -2004-06-08 17:49 strk +2004-06-08 17:49 Sandro Santilli <strk@keybit.net> - * Fixed to build cleanly agains pg75 + * [r612] Fixed to build cleanly agains pg75 -2004-06-08 17:48 strk +2004-06-08 17:48 Sandro Santilli <strk@keybit.net> - * Compression of code terminated. + * [r611] Compression of code terminated. Big blocks switched based on version have been removed. -2004-06-08 17:40 strk +2004-06-08 17:40 Sandro Santilli <strk@keybit.net> - * removed user connect command + * [r610] removed user connect command -2004-06-08 15:18 strk +2004-06-08 15:18 Sandro Santilli <strk@keybit.net> - * Deleted prototype for isspace() in postgis.h + * [r609] Deleted prototype for isspace() in postgis.h and included <ctype.h> in postgis_inout.c, which is the only module calling isspace(). This was needed to compile postgis against PG75(CVS). -2004-06-08 08:42 strk +2004-06-08 08:42 Sandro Santilli <strk@keybit.net> - * MODULE_FILENAME path always defaults to $libdir, but is + * [r608] MODULE_FILENAME path always defaults to $libdir, but is overridable using environment variable LPATH. Added comments about it and cleaned up code. Made global and lwgeom Makefile conformant about this. -2004-06-08 08:20 strk +2004-06-08 08:20 Sandro Santilli <strk@keybit.net> - * added 'static' modifiers for the 'error' function, possibly - clashing with some other declaration + * [r607] added 'static' modifiers for the 'error' function, + possibly clashing with some other declaration -2004-06-07 17:58 strk +2004-06-07 17:58 Sandro Santilli <strk@keybit.net> - * reverted change in lwg_parse_yyerror + * [r606] reverted change in lwg_parse_yyerror -2004-06-07 17:26 strk +2004-06-07 17:26 Sandro Santilli <strk@keybit.net> - * Default MODULE_FILENAME uses $libdir unless LPATH is set in the - environment + * [r605] Default MODULE_FILENAME uses $libdir unless LPATH is set + in the environment -2004-06-07 16:57 strk +2004-06-07 16:57 Sandro Santilli <strk@keybit.net> - * Removed obsolete postgisgistcostestimate function creation + * [r604] Removed obsolete postgisgistcostestimate function creation -2004-06-07 16:34 strk +2004-06-07 16:34 Sandro Santilli <strk@keybit.net> - * Removed postgis_old.sql from list of default rules + * [r603] Removed postgis_old.sql from list of default rules -2004-06-07 16:32 strk +2004-06-07 16:32 Sandro Santilli <strk@keybit.net> - * Moved old version-specific sql files under the Attic directory. + * [r602] Moved old version-specific sql files under the Attic + directory. -2004-06-07 16:32 strk +2004-06-07 16:32 Sandro Santilli <strk@keybit.net> - * Moved old version-specific sql files under the Attic directory. + * [r601] Moved old version-specific sql files under the Attic + directory. -2004-06-07 16:11 strk +2004-06-07 16:11 Sandro Santilli <strk@keybit.net> - * AddGeometryColumns call table constraints 'enforce_srid' and - 'enforce_geotype' + * [r600] AddGeometryColumns call table constraints 'enforce_srid' + and 'enforce_geotype' -2004-06-07 15:32 strk +2004-06-07 15:32 Sandro Santilli <strk@keybit.net> - * Fixed a bug killing the backend - lwg_parse_yyerror never called - custom error handler + * [r599] Fixed a bug killing the backend - lwg_parse_yyerror never + called custom error handler -2004-06-07 10:07 strk +2004-06-07 10:07 Sandro Santilli <strk@keybit.net> - * allowed lower case in wkt + * [r598] allowed lower case in wkt -2004-06-07 09:16 strk +2004-06-07 09:16 Sandro Santilli <strk@keybit.net> - * Added missing prototypes. + * [r597] Added missing prototypes. -2004-06-04 15:24 strk +2004-06-04 15:24 Sandro Santilli <strk@keybit.net> - * Added y.output + * [r596] Added y.output -2004-06-04 15:24 strk +2004-06-04 15:24 Sandro Santilli <strk@keybit.net> - * Added more cleanup + * [r595] Added more cleanup -2004-06-04 15:23 strk +2004-06-04 15:23 Sandro Santilli <strk@keybit.net> - * added semicolumns at end of blocks + * [r594] added semicolumns at end of blocks -2004-06-04 15:21 strk +2004-06-04 15:21 Sandro Santilli <strk@keybit.net> - * removed, will be created + * [r593] removed, will be created -2004-06-04 13:39 strk +2004-06-04 13:39 Sandro Santilli <strk@keybit.net> - * Removed references to constraint name (unsafe) from + * [r592] Removed references to constraint name (unsafe) from probe_geometry_columns() and fix_geometry_columns(). Added a rename_geometry_table_constraints() renaming all geometry constraints to 'enforce_srid' and 'enforce_geotype' -2004-06-04 13:11 strk +2004-06-04 13:11 Sandro Santilli <strk@keybit.net> - * probe_geometry_columns() return message extended + * [r591] probe_geometry_columns() return message extended -2004-06-04 12:40 strk +2004-06-04 12:40 Sandro Santilli <strk@keybit.net> - * Added comments about fix_geometry_columns() job. + * [r590] Added comments about fix_geometry_columns() job. SRID and type checks made stricter in fix_geometry_columns(). -2004-06-04 12:26 strk +2004-06-04 12:26 Sandro Santilli <strk@keybit.net> - * Added probe_geometry_columns(). + * [r589] Added probe_geometry_columns(). Modified fix_geometry_columns() to prevent fixing of bogus records for which a corrected equivalent already exists. -2004-06-04 10:19 strk +2004-06-04 10:19 Sandro Santilli <strk@keybit.net> - * Added DropGeometryTable description + * [r588] Added DropGeometryTable description -2004-06-04 10:07 strk +2004-06-04 10:07 Sandro Santilli <strk@keybit.net> - * Added DropGeometryColumn function + * [r587] Added DropGeometryColumn function -2004-06-04 09:16 strk +2004-06-04 09:16 Sandro Santilli <strk@keybit.net> - * first entries + * [r586] first entries -2004-06-04 09:11 strk +2004-06-04 09:11 Sandro Santilli <strk@keybit.net> - * Added prototypes + * [r585] Added prototypes -2004-06-04 09:07 strk +2004-06-04 09:07 Sandro Santilli <strk@keybit.net> - * Fixed YACC call to rename standardly produced y.tab.c and y.tab.h + * [r584] Fixed YACC call to rename standardly produced y.tab.c and + y.tab.h to wktparse.tab.c and wktparse.tab.h -2004-06-04 08:49 strk +2004-06-04 08:49 Sandro Santilli <strk@keybit.net> - * Moved all geoemtry_columns cleanup in fix_geometry_columns, + * [r583] Moved all geoemtry_columns cleanup in + fix_geometry_columns, update_geometry_stats(*) and addgeometrycolumn(*) will now call the former and print out its result text. -2004-06-04 08:31 strk +2004-06-04 08:31 Sandro Santilli <strk@keybit.net> - * Lifted AddGeometryColumns result message, including output from - fix_geometry_columns + * [r582] Lifted AddGeometryColumns result message, including output + from fix_geometry_columns -2004-06-04 08:25 strk +2004-06-04 08:25 Sandro Santilli <strk@keybit.net> - * fix_geometry_columns() makes its best effort to find appropriate - schema. + * [r581] fix_geometry_columns() makes its best effort to find + appropriate schema. -2004-06-03 16:44 strk +2004-06-03 16:44 Sandro Santilli <strk@keybit.net> - * Added expand_geometry - expand(geometry, int8) + * [r580] Added expand_geometry - expand(geometry, int8) -2004-06-03 13:49 strk +2004-06-03 13:49 Sandro Santilli <strk@keybit.net> - * added postgis_old.sql + * [r579] added postgis_old.sql -2004-06-03 13:44 strk +2004-06-03 13:44 Sandro Santilli <strk@keybit.net> - * Made it functional again. + * [r578] Made it functional again. -2004-06-03 13:43 strk +2004-06-03 13:43 Sandro Santilli <strk@keybit.net> - * compatted CASTS section, commented out bogus cast geometry::chip - referring to missing function + * [r577] compatted CASTS section, commented out bogus cast + geometry::chip referring to missing function -2004-06-03 13:20 strk +2004-06-03 13:20 Sandro Santilli <strk@keybit.net> - * Skipped attrelid, varattnum linking for PG>=75 + * [r576] Skipped attrelid, varattnum linking for PG>=75 -2004-06-03 12:48 strk +2004-06-03 12:48 Sandro Santilli <strk@keybit.net> - * All type definitions moved at the beginning of the file. + * [r575] All type definitions moved at the beginning of the file. Left to compat: what was in postgis_sql_end_VER_. -2004-06-03 11:06 strk +2004-06-03 11:06 Sandro Santilli <strk@keybit.net> - * Fixed bug in update_geometry_stats() choking on null attrelids. + * [r574] Fixed bug in update_geometry_stats() choking on null + attrelids. Modified update_geometry_stats(varchar, varchar) to cleanup stale record(s). Added a CREATEFUNCTION define to become CREATE OR REPLACE @@ -17056,68 +37154,70 @@ for PG > 71. Made update_geometry_stats(*) return meaningful result. -2004-06-03 09:45 strk +2004-06-03 09:45 Sandro Santilli <strk@keybit.net> - * infinite geoms handled in WKB parser + * [r573] infinite geoms handled in WKB parser -2004-06-03 08:19 strk +2004-06-03 08:19 Sandro Santilli <strk@keybit.net> - * yet another Infinite check used: finite() - which checks for - NaN,-Inf,+Inf + * [r572] yet another Infinite check used: finite() - which checks + for NaN,-Inf,+Inf -2004-06-03 08:13 strk +2004-06-03 08:13 Sandro Santilli <strk@keybit.net> - * Simplified INFINITY checks by use of isinf() + * [r571] Simplified INFINITY checks by use of isinf() -2004-06-03 07:58 strk +2004-06-03 07:58 Sandro Santilli <strk@keybit.net> - * Infinite coordinate geoms omitted from index + * [r570] Infinite coordinate geoms omitted from index -2004-06-03 07:57 strk +2004-06-03 07:57 Sandro Santilli <strk@keybit.net> - * wkt parser throws an error on Infinite coordinates + * [r569] wkt parser throws an error on Infinite coordinates -2004-06-03 04:51 pramsey +2004-06-03 04:51 Paul Ramsey <pramsey@cleverelephant.ca> - * Document the expand() function (finally!) + * [r568] Document the expand() function (finally!) -2004-06-02 23:54 strk +2004-06-02 23:54 Sandro Santilli <strk@keybit.net> - * Made equality checks the default in picksplit to catch also NaN - results (INF geoms) + * [r567] Made equality checks the default in picksplit to catch + also NaN results (INF geoms) -2004-06-02 23:29 strk +2004-06-02 23:29 Sandro Santilli <strk@keybit.net> - * reverted Inf handling modification (conceptually bogus) + * [r566] reverted Inf handling modification (conceptually bogus) -2004-06-02 22:43 strk +2004-06-02 22:43 Sandro Santilli <strk@keybit.net> - * handled special case of Inf boxes as GiST keys in picksplit + * [r565] handled special case of Inf boxes as GiST keys in + picksplit -2004-06-02 17:15 strk +2004-06-02 17:15 Sandro Santilli <strk@keybit.net> - * stale locks removal in fix_geometry_columns() and + * [r564] stale locks removal in fix_geometry_columns() and update_geometry_stats(). Fixed a bug in fix_geometry_columns() deleting stats. -2004-06-02 16:21 strk +2004-06-02 16:21 Sandro Santilli <strk@keybit.net> - * build_histogram2d sets 'local' search_path. + * [r563] build_histogram2d sets 'local' search_path. fix_geometry_columns sets to NULL cached data for unexistant tables. -2004-06-01 16:56 strk +2004-06-01 16:56 Sandro Santilli <strk@keybit.net> - * removed namespace check for PG<73 in update_geometry_stats() + * [r562] removed namespace check for PG<73 in + update_geometry_stats() -2004-06-01 16:30 strk +2004-06-01 16:30 Sandro Santilli <strk@keybit.net> - * Made AddGeometryColumn delete from geometry_column records which - would be incompatible with the one being added + * [r561] Made AddGeometryColumn delete from geometry_column records + which would be incompatible with the one being added -2004-06-01 16:16 strk +2004-06-01 16:16 Sandro Santilli <strk@keybit.net> - * Placed histogram2d type definition in a common place; + * [r560] Placed histogram2d type definition in a common place; added find_extent(schema, table, column) and build_histogram2d(histogram, schema, table, column); modified update_geometry_stats() to make @@ -17125,259 +37225,265 @@ of available f_table_schema and to set statistical fields to NULL for stale records. Thanks to Carl Anderson for the ideas. -2004-05-28 03:01 pramsey +2004-05-28 03:01 Paul Ramsey <pramsey@cleverelephant.ca> - * Updates in anticipation of 0.8.2 release + * [r558] Updates in anticipation of 0.8.2 release -2004-05-28 02:42 pramsey +2004-05-28 02:42 Paul Ramsey <pramsey@cleverelephant.ca> - * Document the multi() function. + * [r557] Document the multi() function. -2004-05-24 13:02 strk +2004-05-24 13:02 Sandro Santilli <strk@keybit.net> - * compat definition of fix_geometry_columns + * [r556] compat definition of fix_geometry_columns -2004-05-20 19:21 pramsey +2004-05-20 19:21 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix bug in append mode that filled values into nonexistant gid - column. + * [r555] Fix bug in append mode that filled values into nonexistant + gid column. -2004-05-18 16:56 pramsey +2004-05-18 16:56 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix typos and section misreferences in OGC function reference - section + * [r554] Fix typos and section misreferences in OGC function + reference section -2004-05-18 16:52 pramsey +2004-05-18 16:52 Paul Ramsey <pramsey@cleverelephant.ca> - * Add multi() to the new cpp based sql.in file. + * [r553] Add multi() to the new cpp based sql.in file. -2004-05-13 12:24 strk +2004-05-13 12:24 Sandro Santilli <strk@keybit.net> - * Transformed NULL numeric values to 0 as it was before the + * [r552] Transformed NULL numeric values to 0 as it was before the introduction of bigint bug workaround. -2004-05-13 12:13 strk +2004-05-13 12:13 Sandro Santilli <strk@keybit.net> - * Used DBFWriteAttributeDirectly interface for writing attributes. + * [r551] Used DBFWriteAttributeDirectly interface for writing + attributes. This way we are not affected by shapelib long-integer bug. -2004-05-13 12:07 strk +2004-05-13 12:07 Sandro Santilli <strk@keybit.net> - * Other fix in 3d handling - you should now be able to dump as 2d - or 3d any 2d or 3d object + * [r550] Other fix in 3d handling - you should now be able to dump + as 2d or 3d any 2d or 3d object -2004-05-13 11:59 strk +2004-05-13 11:59 Sandro Santilli <strk@keybit.net> - * Fixed bug in 3d features handling. + * [r549] Fixed bug in 3d features handling. -2004-05-13 09:40 strk +2004-05-13 09:40 Sandro Santilli <strk@keybit.net> - * Totally reworked code to have a main loop for shapefile objects. + * [r548] Totally reworked code to have a main loop for shapefile + objects. Much more readable, I belive. -2004-05-13 07:48 strk +2004-05-13 07:48 Sandro Santilli <strk@keybit.net> - * Put table creation code in its own function. + * [r547] Put table creation code in its own function. Fixed a bug with NULL shape records handling. -2004-05-13 06:38 strk +2004-05-13 06:38 Sandro Santilli <strk@keybit.net> - * DBFReadStringValue always used to workaround shapelib bug with - int values. + * [r546] DBFReadStringValue always used to workaround shapelib bug + with int values. -2004-05-04 16:55 strk +2004-05-04 16:55 Sandro Santilli <strk@keybit.net> - * Added -fPIC to CXXFLAGS. Reported to be needed on Solaris7 w/ - gcc-3.3.2 + * [r545] Added -fPIC to CXXFLAGS. Reported to be needed on Solaris7 + w/ gcc-3.3.2 by Havard Tveite <havard.tveite@nlh.no>. 2004-04-29 21:07 rmason - * removed generated file + * [r544] removed generated file 2004-04-29 21:07 rmason - * *** empty log message *** + * [r543] *** empty log message *** 2004-04-29 18:44 dblasby - * Noted diff between inf and Infinity on Solaris/Intel machines + * [r542] Noted diff between inf and Infinity on Solaris/Intel + machines 2004-04-29 18:41 dblasby - * updated version + * [r541] updated version 2004-04-29 18:36 dblasby - * added sleep so it wouldnt complain on solarias as much + * [r540] added sleep so it wouldnt complain on solarias as much 2004-04-29 18:20 dblasby - * WKT parser changes required this change + * [r539] WKT parser changes required this change 2004-04-29 18:16 dblasby - * minor changes + * [r538] minor changes 2004-04-29 18:15 dblasby - * WKT parser changes to MULTIPOINT required this be updated + * [r537] WKT parser changes to MULTIPOINT required this be updated 2004-04-29 04:35 rmason - * clean up of wbk int and double reading code + * [r536] clean up of wbk int and double reading code 2004-04-29 03:57 rmason - * fix number parsing + * [r535] fix number parsing 2004-04-29 03:13 rmason - * remove extra brackets from multipoints + * [r534] remove extra brackets from multipoints -2004-04-28 23:07 pramsey +2004-04-28 23:07 Paul Ramsey <pramsey@cleverelephant.ca> - * Change PGSQL_SRC behavior back to developer-friendly. + * [r533] Change PGSQL_SRC behavior back to developer-friendly. 2004-04-28 22:59 dblasby - * minor changes + * [r532] minor changes 2004-04-28 22:50 dblasby - * Inital Version. Hasnt been proofread. + * [r531] Inital Version. Hasnt been proofread. -2004-04-28 22:40 pramsey +2004-04-28 22:40 Paul Ramsey <pramsey@cleverelephant.ca> - * Added flex/bison lines for parser. + * [r530] Added flex/bison lines for parser. -2004-04-28 22:26 pramsey +2004-04-28 22:26 Paul Ramsey <pramsey@cleverelephant.ca> - * Fixed spelling mistake in header text. + * [r529] Fixed spelling mistake in header text. 2004-04-28 21:20 dblasby - * minor changes to ensure its using the index + * [r528] minor changes to ensure its using the index 2004-04-28 21:08 dblasby - * updated results + * [r527] updated results 2004-04-28 21:02 dblasby - * minor change for endianess + * [r526] minor change for endianess 2004-04-28 21:00 dblasby - * removed an elog(NOTICE) + * [r525] removed an elog(NOTICE) 2004-04-28 19:17 dblasby - * inital version of regression tests + * [r524] inital version of regression tests 2004-04-28 18:27 dblasby - * moved to regress/ directory + * [r523] moved to regress/ directory 2004-04-28 18:10 dblasby - * Added automatic endian detection for the WKB parser/unparser. + * [r522] Added automatic endian detection for the WKB + parser/unparser. -2004-04-28 04:55 pramsey +2004-04-28 04:55 Paul Ramsey <pramsey@cleverelephant.ca> - * Genericize the Makefile per Dave's request. + * [r521] Genericize the Makefile per Dave's request. 2004-04-27 23:47 dblasby - * minor 3d geometrycollection bug fix + * [r520] minor 3d geometrycollection bug fix 2004-04-27 23:33 dblasby - * initial version + * [r519] initial version 2004-04-27 23:12 dblasby - * minor changes for solaris + * [r518] minor changes for solaris 2004-04-27 22:13 dblasby - * fixed some typos for flip_bytes in read_int and read_double + * [r517] fixed some typos for flip_bytes in read_int and + read_double 2004-04-27 20:53 dblasby - * minor ordering change + * [r516] minor ordering change 2004-04-27 20:49 dblasby - * added float nextafterf_custom(float x, float y) for OSs that do - not have + * [r515] added float nextafterf_custom(float x, float y) for OSs + that do not have a nextafterf implementation. 2004-04-27 17:46 dblasby - * bison -vd -p lwg_parse_yy wktparse.y + * [r514] bison -vd -p lwg_parse_yy wktparse.y flex -Plwg_parse_yy -if -o'lex.yy.c' wktparse.lex Initial versions (from Ralph Mason) -2004-04-27 13:50 strk +2004-04-27 13:50 Sandro Santilli <strk@keybit.net> - * Fixed bug in simplify() that was using the square of the given - tolerance. + * [r513] Fixed bug in simplify() that was using the square of the + given tolerance. -2004-04-27 07:44 strk +2004-04-27 07:44 Sandro Santilli <strk@keybit.net> - * Removed use of geometryFactory->toGeometry(), indicated by Martin - Davis + * [r512] Removed use of geometryFactory->toGeometry(), indicated by + Martin Davis as being intended for internal use only. Created a linear ring instead (the function converts a box3d to a geos geometry). 2004-04-26 23:16 dblasby - * made slightly more generic + * [r511] made slightly more generic 2004-04-26 23:15 dblasby - * Minor cleanup + * [r510] Minor cleanup 2004-04-26 23:12 dblasby - * inital version + * [r509] inital version 2004-04-26 23:05 dblasby - * Initial working version - based on Ralph Masons WKT and WKB - parser/writer. + * [r508] Initial working version - based on Ralph Masons WKT and + WKB parser/writer. 2004-04-22 16:05 dblasby - * fixed minor typos GeomFromWKB not GeometryFromWKB + * [r507] fixed minor typos GeomFromWKB not GeometryFromWKB -2004-04-21 09:13 strk +2004-04-21 09:13 Sandro Santilli <strk@keybit.net> - * Attribute names escaping mechanism added. You should now + * [r506] Attribute names escaping mechanism added. You should now be able to dump a shapefile equal to the one loaded. -2004-04-21 07:38 strk +2004-04-21 07:38 Sandro Santilli <strk@keybit.net> - * Memory allocated for main_scan_query was not enough when using - binary cursor. Fixed + * [r505] Memory allocated for main_scan_query was not enough when + using binary cursor. Fixed 2004-04-13 16:49 dblasby - * GeometryN(...) now correctly says "1" is the 1st geometry (used - to be 0). + * [r504] GeometryN(...) now correctly says "1" is the 1st geometry + (used to be 0). 2004-04-08 17:05 dblasby - * Somehow the memory leak changes I made got removed - I've + * [r503] Somehow the memory leak changes I made got removed - I've re-added them. 2004-04-08 17:00 dblasby - * Changed ggeometry_consistent to be aware of NULL queries. Ie. + * [r502] Changed ggeometry_consistent to be aware of NULL queries. + Ie. select * from <table> where the_geom && null::geometry; This tends to happen when you're joining two tables using && and @@ -17386,41 +37492,41 @@ 2004-04-07 23:12 dblasby - * Added a cstring(lwgeom) function that returns WKT! + * [r501] Added a cstring(lwgeom) function that returns WKT! -2004-04-07 16:23 strk +2004-04-07 16:23 Sandro Santilli <strk@keybit.net> - * Made new postgis.sql generation procedure the default + * [r500] Made new postgis.sql generation procedure the default 2004-04-06 22:58 dblasby - * Changes to make it work with all the PostGIS type. + * [r499] Changes to make it work with all the PostGIS type. 2004-04-02 19:03 dblasby - * Added support for 4d coordinates + * [r498] Added support for 4d coordinates -2004-03-29 10:46 strk +2004-03-29 10:46 Sandro Santilli <strk@keybit.net> - * postgis.sql.in is now parsed by both sed and cpp + * [r497] postgis.sql.in is now parsed by both sed and cpp -2004-03-29 10:20 strk +2004-03-29 10:20 Sandro Santilli <strk@keybit.net> - * Fixed a bug in WKB parsing for Multipoints. + * [r496] Fixed a bug in WKB parsing for Multipoints. Fixed a bug in -d handling for WKB. Added point->multipoint fluffing capabilities. -2004-03-26 01:09 pramsey +2004-03-26 01:09 Paul Ramsey <pramsey@cleverelephant.ca> - * Removed rogue docbook tags + * [r495] Removed rogue docbook tags 2004-03-26 01:07 dblasby - * changed name of fluffType() to multi(). + * [r494] changed name of fluffType() to multi(). 2004-03-26 00:54 dblasby - * added full support for fluffType(<geom>) + * [r493] added full support for fluffType(<geom>) postgis09=# select fluffType('POINT(0 0)'); flufftype ------------------------- @@ -17428,15 +37534,17 @@ 2004-03-25 00:43 dblasby - * added function fluffType() that takes POINT LINESTRING or POLYGON + * [r492] added function fluffType() that takes POINT LINESTRING or + POLYGON type and converts it to a multi*. Needs to be integrated into a proper Postgresql function and given an SQL CREATE FUNCTION -2004-03-22 09:39 strk +2004-03-22 09:39 Sandro Santilli <strk@keybit.net> - * Moved AddGeometryColumn and DropGeometryColumn from USE_VERSION + * [r491] Moved AddGeometryColumn and DropGeometryColumn from + USE_VERSION blocks to the end of file. Here, differences between versions are handled on a minimun-diff basis, making it easier to understand @@ -17444,347 +37552,356 @@ splitted between pgsql < 73 and >= 73. Added reduced-parameters wrappers to both functions. -2004-03-22 08:18 strk +2004-03-22 08:18 Sandro Santilli <strk@keybit.net> - * postgis_new.sql build by default + * [r490] postgis_new.sql build by default -2004-03-19 16:35 strk +2004-03-19 16:35 Sandro Santilli <strk@keybit.net> - * Updated AddGeometryColumn() and DropGeometryColumn() descriptions - to the schema-aware versions + * [r489] Updated AddGeometryColumn() and DropGeometryColumn() + descriptions to the schema-aware versions -2004-03-15 17:07 strk +2004-03-15 17:07 Sandro Santilli <strk@keybit.net> - * Added calls to vacuum_delay_point() to give backend a chance of + * [r488] Added calls to vacuum_delay_point() to give backend a + chance of interrupting geometry stats computation. Set default DEBUG_GEOMETRY_STATS to 0. 2004-03-11 01:27 dblasby - * minor clean and trying to figure out a memory bug. valgrind wasnt - helping, but + * [r487] minor clean and trying to figure out a memory bug. + valgrind wasnt helping, but it went away. 2004-03-11 00:54 dblasby - * Should be working (with a tonne of notices) for points lines and - polygons (2d + * [r486] Should be working (with a tonne of notices) for points + lines and polygons (2d and 3d) -2004-03-10 18:46 strk +2004-03-10 18:46 Sandro Santilli <strk@keybit.net> - * Fixed a bug reducing the output shapes from Multipolygon tables. + * [r485] Fixed a bug reducing the output shapes from Multipolygon + tables. -2004-03-10 17:35 strk +2004-03-10 17:35 Sandro Santilli <strk@keybit.net> - * removed just-introduced bug + * [r484] removed just-introduced bug -2004-03-10 17:23 strk +2004-03-10 17:23 Sandro Santilli <strk@keybit.net> - * code cleanup, fixed a bug missing to transform 'gid' to 'gid__2' - in shapefile attribute name + * [r483] code cleanup, fixed a bug missing to transform 'gid' to + 'gid__2' in shapefile attribute name 2004-03-10 01:15 dblasby - * WKB reader and WKB writer (totally untested) + * [r482] WKB reader and WKB writer (totally untested) 2004-03-09 17:29 dblasby - * Initial implementation - should compile; not at all tested. + * [r481] Initial implementation - should compile; not at all + tested. -2004-03-09 00:21 strk +2004-03-09 00:21 Sandro Santilli <strk@keybit.net> - * Removed useless code blocks in histogram builder + * [r480] Removed useless code blocks in histogram builder -2004-03-09 00:09 strk +2004-03-09 00:09 Sandro Santilli <strk@keybit.net> - * estimator applies a gain of AOI/cell_area on each cell it + * [r479] estimator applies a gain of AOI/cell_area on each cell it intersects (reverted to previous behaviour) -2004-03-08 17:21 strk +2004-03-08 17:21 Sandro Santilli <strk@keybit.net> - * changed error computation code to delta/totrows + * [r478] changed error computation code to delta/totrows -2004-03-08 12:16 strk +2004-03-08 12:16 Sandro Santilli <strk@keybit.net> - * Added the RECHECK clause for gist_geometry_ops operator class - operators + * [r477] Added the RECHECK clause for gist_geometry_ops operator + class operators -2004-03-06 18:02 strk +2004-03-06 18:02 Sandro Santilli <strk@keybit.net> - * Comma-separated bps values accepted + * [r476] Comma-separated bps values accepted -2004-03-06 17:43 strk +2004-03-06 17:43 Sandro Santilli <strk@keybit.net> - * Added RCSID string in usage output + * [r475] Added RCSID string in usage output -2004-03-06 17:35 strk +2004-03-06 17:35 Sandro Santilli <strk@keybit.net> - * Added rcsid string to usage output + * [r474] Added rcsid string to usage output -2004-03-05 21:06 strk +2004-03-05 21:06 Sandro Santilli <strk@keybit.net> - * Added -vacuum switch + * [r473] Added -vacuum switch -2004-03-05 21:03 strk +2004-03-05 21:03 Sandro Santilli <strk@keybit.net> - * Made the -bps switch specify the exact level(s) at which to run - the test + * [r472] Made the -bps switch specify the exact level(s) at which + to run the test 2004-03-05 18:25 dblasby - * Empty files - preparing for writting actual code. + * [r471] Empty files - preparing for writting actual code. 2004-03-05 18:23 dblasby - * Same as the one in the above directory + * [r470] Same as the one in the above directory 2004-03-05 18:23 dblasby - * moved to lwgeom/ directory + * [r469] moved to lwgeom/ directory -2004-03-05 18:16 strk +2004-03-05 18:16 Sandro Santilli <strk@keybit.net> - * Applied Mark Cave-Ayland patch + * [r468] Applied Mark Cave-Ayland patch -2004-03-05 16:40 strk +2004-03-05 16:40 Sandro Santilli <strk@keybit.net> - * rewritten split_extent to be more datatype-conservative + * [r467] rewritten split_extent to be more datatype-conservative -2004-03-05 16:01 strk +2004-03-05 16:01 Sandro Santilli <strk@keybit.net> - * added -bps switch to set maximun query level. reworked command - line parsing + * [r466] added -bps switch to set maximun query level. reworked + command line parsing -2004-03-05 15:29 strk +2004-03-05 15:29 Sandro Santilli <strk@keybit.net> - * more verbose output + * [r465] more verbose output -2004-03-05 11:52 strk +2004-03-05 11:52 Sandro Santilli <strk@keybit.net> - * initial import + * [r464] initial import 2004-03-05 00:38 dblasby - * Initial version - still under discussion. + * [r463] Initial version - still under discussion. -2004-03-04 13:50 strk +2004-03-04 13:50 Sandro Santilli <strk@keybit.net> - * postgis_gist_sel(): added warnings if search_box goes outside of - histogram grid + * [r462] postgis_gist_sel(): added warnings if search_box goes + outside of histogram grid -2004-03-04 09:44 strk +2004-03-04 09:44 Sandro Santilli <strk@keybit.net> - * The selectivity estimator does add the full value of each cell it - overlaps, + * [r461] The selectivity estimator does add the full value of each + cell it overlaps, regardless of the actual overlapping area. Final gain is not applied (formerly 1 / minimun between average feature cells occupation and search_box cells occupation) -2004-03-03 21:59 strk +2004-03-03 21:59 Sandro Santilli <strk@keybit.net> - * added check to keep selectivity value in the range of validity - (suggested by m.cave) + * [r460] added check to keep selectivity value in the range of + validity (suggested by m.cave) -2004-03-02 11:39 strk +2004-03-02 11:39 Sandro Santilli <strk@keybit.net> - * cpp call for postgis_new.sql creation uses shell redirection for - the output file + * [r459] cpp call for postgis_new.sql creation uses shell + redirection for the output file -2004-03-02 11:37 strk +2004-03-02 11:37 Sandro Santilli <strk@keybit.net> - * modified to reflect new statistics building process for PG75 + * [r458] modified to reflect new statistics building process for + PG75 -2004-03-01 16:02 strk +2004-03-01 16:02 Sandro Santilli <strk@keybit.net> - * histogram's boxesPerSide computed as a function of the column's - statistic target + * [r457] histogram's boxesPerSide computed as a function of the + column's statistic target -2004-02-29 21:53 strk +2004-02-29 21:53 Sandro Santilli <strk@keybit.net> - * bug fix in postgis_gist_sel (for PG75): SysCache is not released - if not acquired + * [r456] bug fix in postgis_gist_sel (for PG75): SysCache is not + released if not acquired -2004-02-28 14:44 strk +2004-02-28 14:44 Sandro Santilli <strk@keybit.net> - * Added rule to generate postgis_new.sql from postgis.sql.in using - cpp + * [r455] Added rule to generate postgis_new.sql from postgis.sql.in + using cpp -2004-02-28 14:43 strk +2004-02-28 14:43 Sandro Santilli <strk@keybit.net> - * initial import + * [r454] initial import -2004-02-26 16:42 strk +2004-02-26 16:42 Sandro Santilli <strk@keybit.net> - * Fixed bugs reported by Mark Cave-Ayland + * [r453] Fixed bugs reported by Mark Cave-Ayland <m.cave-ayland@webbased.co.uk>. Re-introduced previously removed estimate value incrementation by the fractional part of each of the cells' value computed as the fraction of overlapping area. -2004-02-25 13:17 strk +2004-02-25 13:17 Sandro Santilli <strk@keybit.net> - * RTContainedBy and RTOverlap strategries implemented locally with - a pgbox_overlap function + * [r452] RTContainedBy and RTOverlap strategries implemented + locally with a pgbox_overlap function -2004-02-25 12:00 strk +2004-02-25 12:00 Sandro Santilli <strk@keybit.net> - * Added handling for point features in histogram creation (add 1 - instead of AOI/cell_area when AOI is 0). + * [r451] Added handling for point features in histogram creation + (add 1 instead of AOI/cell_area when AOI is 0). Fixed a wrong cast of BOX3D to BOX (called the convertion func). Added some comments and an implementation on how to change evaluation based on the average feature and search box cells occupation. -2004-02-25 00:46 strk +2004-02-25 00:46 Sandro Santilli <strk@keybit.net> - * initial version of && selectivity estimation for PG75 + * [r450] initial version of && selectivity estimation for PG75 -2004-02-23 21:59 strk +2004-02-23 21:59 Sandro Santilli <strk@keybit.net> - * geometry analyzer builds the histogram + * [r449] geometry analyzer builds the histogram -2004-02-23 12:18 strk +2004-02-23 12:18 Sandro Santilli <strk@keybit.net> - * added skeleton functions for pg75 stats integration + * [r448] added skeleton functions for pg75 stats integration -2004-02-12 10:34 strk +2004-02-12 10:34 Sandro Santilli <strk@keybit.net> - * changed USE_GEOS check from ifdef / ifndef to if / if ! + * [r447] changed USE_GEOS check from ifdef / ifndef to if / if ! -2004-02-09 18:49 strk +2004-02-09 18:49 Sandro Santilli <strk@keybit.net> - * byte endiannes detected empirically + * [r446] byte endiannes detected empirically -2004-02-06 08:26 strk +2004-02-06 08:26 Sandro Santilli <strk@keybit.net> - * updated wkb reading funx to reflect changes made by pramsey in - postgis_inout.c to be nicer with solaris + * [r445] updated wkb reading funx to reflect changes made by + pramsey in postgis_inout.c to be nicer with solaris 2004-02-06 00:42 dblasby - * moved forward declarations from postgis.h to postgis_proj.c + * [r444] moved forward declarations from postgis.h to + postgis_proj.c 2004-02-05 20:31 dblasby - * Optimized the curvature method (doesnt have to calculate e2) + * [r443] Optimized the curvature method (doesnt have to calculate + e2) 2004-02-05 20:21 dblasby - * Added 'curvature method' for cases where the original algorithm - breaks down. + * [r442] Added 'curvature method' for cases where the original + algorithm breaks down. -2004-02-04 22:27 strk +2004-02-04 22:27 Sandro Santilli <strk@keybit.net> - * Added pg75 support scripts + * [r441] Added pg75 support scripts -2004-02-04 22:21 strk +2004-02-04 22:21 Sandro Santilli <strk@keybit.net> - * Added detection code for PG75 + * [r440] Added detection code for PG75 2004-02-04 02:53 dblasby - * applied patricia tozer's patch (distance function was taking acos - of something + * [r439] applied patricia tozer's patch (distance function was + taking acos of something just slightly outside [-1,1]). -2004-02-03 22:19 pramsey +2004-02-03 22:19 Paul Ramsey <pramsey@cleverelephant.ca> - * Backed default sql file location out of contrib insto share + * [r438] Backed default sql file location out of contrib insto + share -2004-02-03 22:04 pramsey +2004-02-03 22:04 Paul Ramsey <pramsey@cleverelephant.ca> - * Real DESTDIR changes this time. + * [r437] Real DESTDIR changes this time. -2004-02-03 21:51 pramsey +2004-02-03 21:51 Paul Ramsey <pramsey@cleverelephant.ca> - * Ooops, let local configuration slip into cvs version + * [r436] Ooops, let local configuration slip into cvs version -2004-02-03 21:42 pramsey +2004-02-03 21:42 Paul Ramsey <pramsey@cleverelephant.ca> - * Fixed error in -C loader directive + * [r435] Fixed error in -C loader directive -2004-02-03 21:38 pramsey +2004-02-03 21:38 Paul Ramsey <pramsey@cleverelephant.ca> - * Added DESTDIR to Makefiles to assist in RPM building. + * [r434] Added DESTDIR to Makefiles to assist in RPM building. -2004-02-03 08:37 strk +2004-02-03 08:37 Sandro Santilli <strk@keybit.net> - * schema support added, slightly modified logic used to keep table - and schema names cases (always quoted and forced to lower case if - not asked to keep original case) + * [r433] schema support added, slightly modified logic used to keep + table and schema names cases (always quoted and forced to lower + case if not asked to keep original case) -2004-01-25 19:33 pramsey +2004-01-25 19:33 Paul Ramsey <pramsey@cleverelephant.ca> - * Test commit on new CVS archive. + * [r432] Test commit on new CVS archive. -2004-01-21 19:11 strk +2004-01-21 19:11 Sandro Santilli <strk@keybit.net> - * Added line_interpolate_point entry + * [r431] Added line_interpolate_point entry -2004-01-21 19:04 strk +2004-01-21 19:04 Sandro Santilli <strk@keybit.net> - * Added line_interpolate_point function by jsunday@rochgrp.com + * [r430] Added line_interpolate_point function by + jsunday@rochgrp.com -2004-01-20 20:14 strk +2004-01-20 20:14 Sandro Santilli <strk@keybit.net> - * cleaner comments for DropGeometryColumn + * [r429] cleaner comments for DropGeometryColumn -2004-01-20 20:10 strk +2004-01-20 20:10 Sandro Santilli <strk@keybit.net> - * removed bogus comment about missed alter table drop column + * [r428] removed bogus comment about missed alter table drop column -2004-01-16 20:06 strk +2004-01-16 20:06 Sandro Santilli <strk@keybit.net> - * Added FTLogical<->boolean mapping + * [r427] Added FTLogical<->boolean mapping -2004-01-15 09:57 strk +2004-01-15 09:57 Sandro Santilli <strk@keybit.net> - * field type array allocates num_fields * sizeof(int) instead of - sizeof(char*) + * [r426] field type array allocates num_fields * sizeof(int) + instead of sizeof(char*) -2004-01-15 00:23 pramsey +2004-01-15 00:23 Paul Ramsey <pramsey@cleverelephant.ca> - * Change absolute classpath reference to relative. + * [r425] Change absolute classpath reference to relative. -2004-01-14 01:52 pramsey +2004-01-14 01:52 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix solaris alignment problem in transformations. + * [r424] Fix solaris alignment problem in transformations. -2004-01-13 22:14 pramsey +2004-01-13 22:14 Paul Ramsey <pramsey@cleverelephant.ca> - * Changed getint and getdouble used by WKB so that it plays nice - with + * [r423] Changed getint and getdouble used by WKB so that it plays + nice with memory alignment (solaris issue). -2004-01-13 20:30 strk +2004-01-13 20:30 Sandro Santilli <strk@keybit.net> - * Added useless PG_RETURN_NULL() call to make compiler happy + * [r422] Added useless PG_RETURN_NULL() call to make compiler happy -2004-01-12 19:12 pramsey +2004-01-12 19:12 Paul Ramsey <pramsey@cleverelephant.ca> - * Updates for 0.8.1 release. + * [r420] Updates for 0.8.1 release. -2004-01-02 20:11 strk +2004-01-02 20:11 Sandro Santilli <strk@keybit.net> - * always call setval with no schema specification. drop 'database' - argument using the empty string to the AddGeometryColumn call + * [r419] always call setval with no schema specification. drop + 'database' argument using the empty string to the + AddGeometryColumn call -2003-12-30 13:31 strk +2003-12-30 13:31 Sandro Santilli <strk@keybit.net> - * made shp2pgsql looser about numeric precisions + * [r418] made shp2pgsql looser about numeric precisions -2003-12-30 12:37 strk +2003-12-30 12:37 Sandro Santilli <strk@keybit.net> - * Fixed segfault bug reported by Randy George, removed explicit - sequence drop + * [r417] Fixed segfault bug reported by Randy George, removed + explicit sequence drop -2003-12-30 10:40 strk +2003-12-30 10:40 Sandro Santilli <strk@keybit.net> - * For all versions: + * [r416] For all versions: Updated fix_geometry_columns to use a more readable format in queries. @@ -17797,407 +37914,415 @@ Updated DropGeometryColumn to actually issue the ALTER TABLE DROP COLUMN query. -2003-12-27 13:30 strk +2003-12-27 13:30 Sandro Santilli <strk@keybit.net> - * Added schema specification support + * [r415] Added schema specification support -2003-12-23 09:00 strk +2003-12-23 09:00 Sandro Santilli <strk@keybit.net> - * AddGeometryColumn, DropGeometryColum moved to version-specific - scripts. + * [r414] AddGeometryColumn, DropGeometryColum moved to + version-specific scripts. Schema support enabled for version 73 and 74. -2003-12-19 18:55 strk +2003-12-19 18:55 Sandro Santilli <strk@keybit.net> - * substituted setenv() calls with putenv() for Solaris support + * [r413] substituted setenv() calls with putenv() for Solaris + support -2003-12-18 18:07 strk +2003-12-18 18:07 Sandro Santilli <strk@keybit.net> - * Changed fix_geometry_columns() for PG >= 73 so to set + * [r412] Changed fix_geometry_columns() for PG >= 73 so to set f_table_schema to the empty string if its value is not a valid pg namespace. -2003-12-16 11:04 strk +2003-12-16 11:04 Sandro Santilli <strk@keybit.net> - * added simplify() documentation + * [r411] added simplify() documentation -2003-12-12 18:00 strk +2003-12-12 18:00 Sandro Santilli <strk@keybit.net> - * reverted make_line patch, patched size_subobject instead - the - reported bug was caused to their inconsistency + * [r410] reverted make_line patch, patched size_subobject instead - + the reported bug was caused to their inconsistency -2003-12-12 14:39 strk +2003-12-12 14:39 Sandro Santilli <strk@keybit.net> - * Fixed a bug in make_line allocating less memory then required + * [r409] Fixed a bug in make_line allocating less memory then + required -2003-12-12 13:34 strk +2003-12-12 13:34 Sandro Santilli <strk@keybit.net> - * added missing 'const' in prototypes + * [r408] added missing 'const' in prototypes -2003-12-12 12:03 strk +2003-12-12 12:03 Sandro Santilli <strk@keybit.net> - * More debugging output, some code cleanup. + * [r407] More debugging output, some code cleanup. -2003-12-12 10:28 strk +2003-12-12 10:28 Sandro Santilli <strk@keybit.net> - * added GEOSnoop OUTPUT debugging info + * [r406] added GEOSnoop OUTPUT debugging info -2003-12-12 10:08 strk +2003-12-12 10:08 Sandro Santilli <strk@keybit.net> - * Added GEOSnoop function and some optional debugging output for + * [r405] Added GEOSnoop function and some optional debugging output + for geos<->postgis converter (define DEBUG_CONVERTER at top postgis_geos.c) -2003-12-09 11:58 strk +2003-12-09 11:58 Sandro Santilli <strk@keybit.net> - * Final touch to wkb binary input function + * [r404] Final touch to wkb binary input function -2003-12-09 11:13 strk +2003-12-09 11:13 Sandro Santilli <strk@keybit.net> - * WKB_recv: set StringInfo cursor to the end of StringInfo buf as - required by postgres backend + * [r403] WKB_recv: set StringInfo cursor to the end of StringInfo + buf as required by postgres backend -2003-12-08 17:57 strk +2003-12-08 17:57 Sandro Santilli <strk@keybit.net> - * Binary WKB input function built only when USE_VERSION > 73. - Making some modifications based on reported failures + * [r402] Binary WKB input function built only when USE_VERSION > + 73. Making some modifications based on reported failures -2003-12-04 19:12 strk +2003-12-04 19:12 Sandro Santilli <strk@keybit.net> - * Removed useless linkages from dumper and loader + * [r401] Removed useless linkages from dumper and loader -2003-12-04 19:11 strk +2003-12-04 19:11 Sandro Santilli <strk@keybit.net> - * code cleanup (removed useless and leaking malloc calls) + * [r400] code cleanup (removed useless and leaking malloc calls) 2003-12-04 18:58 dblasby - * changed david skae to skea + * [r399] changed david skae to skea -2003-12-01 20:52 strk +2003-12-01 20:52 Sandro Santilli <strk@keybit.net> - * shapelib put in sync with gdal cvs + * [r398] shapelib put in sync with gdal cvs -2003-12-01 14:27 strk +2003-12-01 14:27 Sandro Santilli <strk@keybit.net> - * added simple malloc wrapper + * [r397] added simple malloc wrapper -2003-11-28 11:28 strk +2003-11-28 11:28 Sandro Santilli <strk@keybit.net> - * Some more changes, now useless since wkb.h is no more used (just - to get in sync) + * [r396] Some more changes, now useless since wkb.h is no more used + (just to get in sync) -2003-11-28 11:25 strk +2003-11-28 11:25 Sandro Santilli <strk@keybit.net> - * Added explicit geometry as text cast + * [r395] Added explicit geometry as text cast -2003-11-28 11:06 strk +2003-11-28 11:06 Sandro Santilli <strk@keybit.net> - * Added WKB_recv function for binary WKB input + * [r394] Added WKB_recv function for binary WKB input -2003-11-26 18:54 strk +2003-11-26 18:54 Sandro Santilli <strk@keybit.net> - * fixed bug in HexDecoder, made WKB parsing the default + * [r393] fixed bug in HexDecoder, made WKB parsing the default -2003-11-26 18:14 strk +2003-11-26 18:14 Sandro Santilli <strk@keybit.net> - * binary cursor implemented + * [r392] binary cursor implemented -2003-11-26 17:21 strk +2003-11-26 17:21 Sandro Santilli <strk@keybit.net> - * Made HEXWKB parsing settable at compile time + * [r391] Made HEXWKB parsing settable at compile time -2003-11-26 16:40 strk +2003-11-26 16:40 Sandro Santilli <strk@keybit.net> - * Handled NULLS in wkb parsing, reduced functions args + * [r390] Handled NULLS in wkb parsing, reduced functions args -2003-11-26 15:45 strk +2003-11-26 15:45 Sandro Santilli <strk@keybit.net> - * wkb support for all geom types + * [r389] wkb support for all geom types -2003-11-26 14:31 strk +2003-11-26 14:31 Sandro Santilli <strk@keybit.net> - * WKB start to work + * [r388] WKB start to work -2003-11-25 17:32 strk +2003-11-25 17:32 Sandro Santilli <strk@keybit.net> - * first attempt at wkb definitions + * [r387] first attempt at wkb definitions -2003-11-25 17:28 strk +2003-11-25 17:28 Sandro Santilli <strk@keybit.net> - * hardly trying to get WKB parsing work + * [r386] hardly trying to get WKB parsing work -2003-11-25 03:03 pramsey +2003-11-25 03:03 Paul Ramsey <pramsey@cleverelephant.ca> - * Updates for 0.8.0 release. + * [r385] Updates for 0.8.0 release. -2003-11-25 02:38 pramsey +2003-11-25 02:38 Paul Ramsey <pramsey@cleverelephant.ca> - * Fixed syntax error in execution example. + * [r384] Fixed syntax error in execution example. -2003-11-24 17:36 strk +2003-11-24 17:36 Sandro Santilli <strk@keybit.net> - * Removed useless BYTE_ORDER checks + * [r383] Removed useless BYTE_ORDER checks -2003-11-21 23:51 pramsey +2003-11-21 23:51 Paul Ramsey <pramsey@cleverelephant.ca> - * Added Cygwin endian definition include to fix windows compile. + * [r381] Added Cygwin endian definition include to fix windows + compile. -2003-11-20 18:01 strk +2003-11-20 18:01 Sandro Santilli <strk@keybit.net> - * patch from m.spring@gmx.de + * [r380] patch from m.spring@gmx.de -2003-11-20 17:51 strk +2003-11-20 17:51 Sandro Santilli <strk@keybit.net> - * Installs for PG>7.1 goes to pkglibdir + * [r379] Installs for PG>7.1 goes to pkglibdir -2003-11-20 16:46 strk +2003-11-20 16:46 Sandro Santilli <strk@keybit.net> - * postgresql linking against libstdc++ reported as possibly needed - for geos support + * [r378] postgresql linking against libstdc++ reported as possibly + needed for geos support -2003-11-20 15:54 strk +2003-11-20 15:54 Sandro Santilli <strk@keybit.net> - * Updated postgis library path to be referenced with /.. + * [r377] Updated postgis library path to be referenced with /.. -2003-11-20 15:34 strk +2003-11-20 15:34 Sandro Santilli <strk@keybit.net> - * expected in-transaction memory release for btree operators + * [r376] expected in-transaction memory release for btree operators -2003-11-20 15:29 strk +2003-11-20 15:29 Sandro Santilli <strk@keybit.net> - * Moved MODULE_FILENAME definition where it will be easly + * [r375] Moved MODULE_FILENAME definition where it will be easly modifiable -2003-11-20 15:27 strk +2003-11-20 15:27 Sandro Santilli <strk@keybit.net> - * Removed some useless strdups. + * [r374] Removed some useless strdups. Removed pgtype 22 (int2vector) from the list of integer DBF field types. Added pgtype 1700 (numeric) in DBF doubles list. -2003-11-20 14:46 strk +2003-11-20 14:46 Sandro Santilli <strk@keybit.net> - * Set CFLAGS where useless CPPFLAGS were used before + * [r373] Set CFLAGS where useless CPPFLAGS were used before -2003-11-19 18:01 strk +2003-11-19 18:01 Sandro Santilli <strk@keybit.net> - * CR removed + * [r372] CR removed -2003-11-19 17:50 strk +2003-11-19 17:50 Sandro Santilli <strk@keybit.net> - * missing function definition added (I forgot - sorry) + * [r371] missing function definition added (I forgot - sorry) -2003-11-19 15:44 strk +2003-11-19 15:44 Sandro Santilli <strk@keybit.net> - * added prototypes for geometry_{le,ge,cmp} + * [r370] added prototypes for geometry_{le,ge,cmp} -2003-11-19 15:29 strk +2003-11-19 15:29 Sandro Santilli <strk@keybit.net> - * Added default btree operator class for PG7.4 + * [r369] Added default btree operator class for PG7.4 -2003-11-19 15:26 strk +2003-11-19 15:26 Sandro Santilli <strk@keybit.net> - * Added geometry_le, geometry_ge, geometry_cmp functions, + * [r368] Added geometry_le, geometry_ge, geometry_cmp functions, modified geometry_lt, geometry_gt, geometry_eq to be consistent. -2003-11-19 15:23 strk +2003-11-19 15:23 Sandro Santilli <strk@keybit.net> - * Fixed wrong COMMUTATOR specifications in '<','>','~=','@' + * [r367] Fixed wrong COMMUTATOR specifications in '<','>','~=','@' operators, added new '<=', '>=' operators -2003-11-19 10:27 strk +2003-11-19 10:27 Sandro Santilli <strk@keybit.net> - * typo fixed (ENABLE_SEQSCAN missing) - PG7.4 support listed in 2.2 + * [r366] typo fixed (ENABLE_SEQSCAN missing) - PG7.4 support listed + in 2.2 -2003-11-18 14:58 strk +2003-11-18 14:58 Sandro Santilli <strk@keybit.net> - * default row buffer lenght set to 100 + * [r365] default row buffer lenght set to 100 -2003-11-18 14:39 strk +2003-11-18 14:39 Sandro Santilli <strk@keybit.net> - * Some more structuring. Initialization routine moved out of main - loop. + * [r364] Some more structuring. Initialization routine moved out of + main loop. Preparing dumper for WKB parsing. -2003-11-16 00:27 strk +2003-11-16 00:27 Sandro Santilli <strk@keybit.net> - * Huge code re-organization. More structured code, more errors - handled, + * [r363] Huge code re-organization. More structured code, more + errors handled, cursor based iteration, less code lines. -2003-11-14 22:04 strk +2003-11-14 22:04 Sandro Santilli <strk@keybit.net> - * Used environment vars to pass libpq connection options (less - error prone, + * [r362] Used environment vars to pass libpq connection options + (less error prone, easier to read). Printed clearer error message on query error. -2003-11-13 13:14 strk +2003-11-13 13:14 Sandro Santilli <strk@keybit.net> - * used quote_ident() calls in AddGeometryColumns as suggested by - Bernhard Herzog + * [r361] used quote_ident() calls in AddGeometryColumns as + suggested by Bernhard Herzog -2003-11-12 20:59 strk +2003-11-12 20:59 Sandro Santilli <strk@keybit.net> - * more cvsignore + * [r360] more cvsignore -2003-11-12 20:57 strk +2003-11-12 20:57 Sandro Santilli <strk@keybit.net> - * first import + * [r359] first import -2003-11-12 20:55 strk +2003-11-12 20:55 Sandro Santilli <strk@keybit.net> - * AddGeometryColumn column identifier case respect fix as suggested - by Bernhard Herzog + * [r358] AddGeometryColumn column identifier case respect fix as + suggested by Bernhard Herzog -2003-11-12 16:36 strk +2003-11-12 16:36 Sandro Santilli <strk@keybit.net> - * delete all caught exceptions after use + * [r357] delete all caught exceptions after use -2003-11-11 11:28 strk +2003-11-11 11:28 Sandro Santilli <strk@keybit.net> - * Added (mem)GeomUnion and (mem_)collect aggregates documentation, - updated Centroid paragraph + * [r356] Added (mem)GeomUnion and (mem_)collect aggregates + documentation, updated Centroid paragraph -2003-11-11 10:58 strk +2003-11-11 10:58 Sandro Santilli <strk@keybit.net> - * Fixed a typo in envelope() + * [r355] Fixed a typo in envelope() -2003-11-11 10:38 strk +2003-11-11 10:38 Sandro Santilli <strk@keybit.net> - * Postgresql 7.4 enabler scripts. + * [r354] Postgresql 7.4 enabler scripts. -2003-11-11 10:14 strk +2003-11-11 10:14 Sandro Santilli <strk@keybit.net> - * Added support for PG74 + * [r353] Added support for PG74 -2003-11-05 18:26 strk +2003-11-05 18:26 Sandro Santilli <strk@keybit.net> - * Added fast collect() and geomunion() aggregates implementations + * [r352] Added fast collect() and geomunion() aggregates + implementations -2003-11-05 18:25 strk +2003-11-05 18:25 Sandro Santilli <strk@keybit.net> - * moved #ifdef USE_GEOS below prototypes, added NULL implementation - of unite_garray + * [r351] moved #ifdef USE_GEOS below prototypes, added NULL + implementation of unite_garray -2003-11-05 18:02 strk +2003-11-05 18:02 Sandro Santilli <strk@keybit.net> - * renamed unite_finalfunc to unite_garray + * [r350] renamed unite_finalfunc to unite_garray -2003-11-05 17:48 strk +2003-11-05 17:48 Sandro Santilli <strk@keybit.net> - * Added GEOS support tips to installation instructions + * [r349] Added GEOS support tips to installation instructions -2003-11-05 11:00 strk +2003-11-05 11:00 Sandro Santilli <strk@keybit.net> - * postgis.xml put back in place. Makefile modified to generate a + * [r348] postgis.xml put back in place. Makefile modified to + generate a postgis-out.xml from postgis.xml. -2003-11-04 21:54 strk +2003-11-04 21:54 Sandro Santilli <strk@keybit.net> - * made last release version a parameter + * [r347] made last release version a parameter -2003-11-04 21:52 strk +2003-11-04 21:52 Sandro Santilli <strk@keybit.net> - * added 'global' specification to sed command + * [r346] added 'global' specification to sed command -2003-11-04 19:23 strk +2003-11-04 19:23 Sandro Santilli <strk@keybit.net> - * renamed postgis.xml to postgis.xml.in + * [r345] renamed postgis.xml to postgis.xml.in -2003-11-04 19:20 strk +2003-11-04 19:20 Sandro Santilli <strk@keybit.net> - * dropped 'clean' rule (not really a good idea right now) + * [r344] dropped 'clean' rule (not really a good idea right now) -2003-11-04 19:07 strk +2003-11-04 19:07 Sandro Santilli <strk@keybit.net> - * added doc clean in clean rule + * [r343] added doc clean in clean rule -2003-11-04 19:06 strk +2003-11-04 19:06 Sandro Santilli <strk@keybit.net> - * added missing first geom pfree in unite_finalfunc + * [r342] added missing first geom pfree in unite_finalfunc -2003-11-04 18:56 strk +2003-11-04 18:56 Sandro Santilli <strk@keybit.net> - * initial import + * [r341] initial import -2003-10-29 15:53 strk +2003-10-29 15:53 Sandro Santilli <strk@keybit.net> - * geoscentroid() removed. both geos and pgis versions are called - 'centroid'. + * [r340] geoscentroid() removed. both geos and pgis versions are + called 'centroid'. only one version will be compiled based on USE_GEOS flag. -2003-10-29 13:59 strk +2003-10-29 13:59 Sandro Santilli <strk@keybit.net> - * Added geoscentroid function. + * [r339] Added geoscentroid function. -2003-10-29 13:58 strk +2003-10-29 13:58 Sandro Santilli <strk@keybit.net> - * Added GEOSGetCentroid() function + * [r338] Added GEOSGetCentroid() function -2003-10-28 16:57 strk +2003-10-28 16:57 Sandro Santilli <strk@keybit.net> - * Added collect_garray() function. + * [r337] Added collect_garray() function. -2003-10-28 15:16 strk +2003-10-28 15:16 Sandro Santilli <strk@keybit.net> - * unite_sfunc() from postgis_geos.c renamed to geom_accum() and - moved in postgis_fn.c + * [r336] unite_sfunc() from postgis_geos.c renamed to geom_accum() + and moved in postgis_fn.c -2003-10-28 11:18 strk +2003-10-28 11:18 Sandro Santilli <strk@keybit.net> - * Added Algorithms section and simplify() enabler code + * [r335] Added Algorithms section and simplify() enabler code -2003-10-28 11:16 strk +2003-10-28 11:16 Sandro Santilli <strk@keybit.net> - * Added postgis_algo.c prototypes + * [r334] Added postgis_algo.c prototypes -2003-10-28 11:16 strk +2003-10-28 11:16 Sandro Santilli <strk@keybit.net> - * Added postgis_algo.c build support + * [r333] Added postgis_algo.c build support -2003-10-28 10:59 strk +2003-10-28 10:59 Sandro Santilli <strk@keybit.net> - * handled NULL state array in unite_finalfunc, cleaned up some - spurios code + * [r332] handled NULL state array in unite_finalfunc, cleaned up + some spurios code -2003-10-27 23:44 strk +2003-10-27 23:44 Sandro Santilli <strk@keybit.net> - * unite_sfunc made always copy input array in long lived memory - context. + * [r331] unite_sfunc made always copy input array in long lived + memory context. It should now work with safer memory. -2003-10-27 20:13 strk +2003-10-27 20:13 Sandro Santilli <strk@keybit.net> - * Made GeomUnion release memory soon, Added fastunion support - functions + * [r330] Made GeomUnion release memory soon, Added fastunion + support functions -2003-10-27 10:21 strk +2003-10-27 10:21 Sandro Santilli <strk@keybit.net> - * Initial import. + * [r329] Initial import. -2003-10-24 21:52 strk +2003-10-24 21:52 Sandro Santilli <strk@keybit.net> - * Modified strcmp-based if-else with switch-case in GEOS2POSTGIS() + * [r328] Modified strcmp-based if-else with switch-case in + GEOS2POSTGIS() using new GEOSGeometryTypeId() interface. -2003-10-24 21:33 strk +2003-10-24 21:33 Sandro Santilli <strk@keybit.net> - * Added GEOSGeometryTypeId(Geometry *) wrapper function. + * [r327] Added GEOSGeometryTypeId(Geometry *) wrapper function. Added GEOSGetCoordinates_Polygon(Polygon *) as an experimental optimized version of GEOSGetCoordinates(Geometry *); More to add ... -2003-10-24 14:29 strk +2003-10-24 14:29 Sandro Santilli <strk@keybit.net> - * GEOSGetCoordinates() reverted to getCoordinates() call so to be - compatible + * [r326] GEOSGetCoordinates() reverted to getCoordinates() call so + to be compatible to all type of geometries (not only LineStrings) -2003-10-24 08:28 strk +2003-10-24 08:28 Sandro Santilli <strk@keybit.net> - * Fixed memory leak in GEOSGetCoordinates(), made sure that + * [r325] Fixed memory leak in GEOSGetCoordinates(), made sure that GEOS2POSTGIS free type string even in case of collapsed geoms. Made sure that geomunion @@ -18205,86 +38330,87 @@ release of palloced memory in PolyFromGeometry (pts_per_ring). -2003-10-23 19:52 strk +2003-10-23 19:52 Sandro Santilli <strk@keybit.net> - * added memory debugging tips for gcc >= 3.2.2 + * [r324] added memory debugging tips for gcc >= 3.2.2 -2003-10-23 09:14 strk +2003-10-23 09:14 Sandro Santilli <strk@keybit.net> - * Added default-commented line to disable gcc "smart" memory + * [r323] Added default-commented line to disable gcc "smart" memory caching feature. -2003-10-23 08:06 strk +2003-10-23 08:06 Sandro Santilli <strk@keybit.net> - * Added 'unite' aggregate. + * [r322] Added 'unite' aggregate. -2003-10-22 20:58 pramsey +2003-10-22 20:58 Paul Ramsey <pramsey@cleverelephant.ca> - * More additions to the TODO + * [r321] More additions to the TODO -2003-10-22 18:51 pramsey +2003-10-22 18:51 Paul Ramsey <pramsey@cleverelephant.ca> - * Updated TODO list somewhat + * [r320] Updated TODO list somewhat -2003-10-21 07:44 strk +2003-10-21 07:44 Sandro Santilli <strk@keybit.net> - * Made GEOS_DIR and PROJ_DIR settable via environment vars + * [r319] Made GEOS_DIR and PROJ_DIR settable via environment vars -2003-10-20 19:50 strk +2003-10-20 19:50 Sandro Santilli <strk@keybit.net> - * Removed some memory leaks in PostGIS2* converters. + * [r318] Removed some memory leaks in PostGIS2* converters. -2003-10-17 16:32 pramsey +2003-10-17 16:32 Paul Ramsey <pramsey@cleverelephant.ca> - * Pass USE_* information to version string, add some 7.4 version - passing + * [r317] Pass USE_* information to version string, add some 7.4 + version passing flags to the compile. 2003-10-17 16:12 dblasby - * Made Envelope() CW instead of CCW. + * [r316] Made Envelope() CW instead of CCW. 2003-10-17 16:07 dblasby - * made isEmpty() return true/false + * [r315] made isEmpty() return true/false -2003-10-17 00:56 pramsey +2003-10-17 00:56 Paul Ramsey <pramsey@cleverelephant.ca> - * Added some more AsText wrappers. + * [r314] Added some more AsText wrappers. -2003-10-17 00:55 pramsey +2003-10-17 00:55 Paul Ramsey <pramsey@cleverelephant.ca> - * Added some AsText wrappers to results to make results match - answers. + * [r313] Added some AsText wrappers to results to make results + match answers. 2003-10-16 20:16 dblasby - * Added NOTICE_HANDLER function. For some reason this didnt get - properly + * [r312] Added NOTICE_HANDLER function. For some reason this didnt + get properly committed last time. 2003-10-16 16:35 dblasby - * added #include <sys/types.h> for people using freeBSD + * [r311] added #include <sys/types.h> for people using freeBSD (strk@keybit.net patch) 2003-10-15 17:04 dblasby - * added a bunch of catch (GEOSExceptions) blocks to write out more - imformative + * [r310] added a bunch of catch (GEOSExceptions) blocks to write + out more imformative error messages. 2003-10-14 23:19 dblasby - * GEOS2POSTGIS - added protection to pfree(NULL) for multi* geoms + * [r309] GEOS2POSTGIS - added protection to pfree(NULL) for multi* + geoms -2003-10-14 21:42 pramsey +2003-10-14 21:42 Paul Ramsey <pramsey@cleverelephant.ca> - * Added const declarations to sync with current GEOS cvs. + * [r308] Added const declarations to sync with current GEOS cvs. 2003-10-06 18:09 dblasby - * Fixed typo in add_to_geometry(). With very poorly aligned + * [r307] Fixed typo in add_to_geometry(). With very poorly aligned sub-objects, it wouldnt allocate enough memory. Fixed it so its pesimistic and will allocate @@ -18292,13 +38418,13 @@ 2003-10-03 16:45 dblasby - * added pointonsurface() as a sub. Some memory management + * [r306] added pointonsurface() as a sub. Some memory management fixes/tests. removed a few NOTICEs. -2003-09-29 16:15 pramsey +2003-09-29 16:15 Paul Ramsey <pramsey@cleverelephant.ca> - * Patch from strk: + * [r305] Patch from strk: - "\t" always preceeded the first value of a dump_format query if NULL @@ -18315,76 +38441,77 @@ 2003-09-19 00:37 jeffloun - * fixed a bug that actually tests the first 2 point for pip instead - of just thinking I was testing the first two. + * [r304] fixed a bug that actually tests the first 2 point for pip + instead of just thinking I was testing the first two. 2003-09-16 20:27 dblasby - * added ability to delete geometries. + * [r303] added ability to delete geometries. 2003-09-10 22:44 jeffloun - * got rid of warning... + * [r302] got rid of warning... 2003-09-10 22:40 jeffloun - * changed it to make the field names in the dbf file capital + * [r301] changed it to make the field names in the dbf file capital letters 2003-09-10 21:36 jeffloun - * fixed a bug in is_clockwise... + * [r300] fixed a bug in is_clockwise... 2003-09-04 16:46 dblasby - * removed truly_inside() doc. + * [r299] removed truly_inside() doc. 2003-09-04 16:19 dblasby - * removed truly_inside() function. + * [r298] removed truly_inside() function. 2003-08-22 17:40 dblasby - * fixed geometry_in('SRID=<int>{no ;}'). + * [r297] fixed geometry_in('SRID=<int>{no ;}'). 2003-08-21 16:22 dblasby - * added patch from strk@freek.keybit.net for PG_NARGS() not being - in 7.2 + * [r296] added patch from strk@freek.keybit.net for PG_NARGS() not + being in 7.2 -2003-08-18 20:19 pramsey +2003-08-18 20:19 Paul Ramsey <pramsey@cleverelephant.ca> - * Add missing </para> + * [r295] Add missing </para> -2003-08-18 20:08 pramsey +2003-08-18 20:08 Paul Ramsey <pramsey@cleverelephant.ca> - * Removed illegal characters from the file. + * [r294] Removed illegal characters from the file. -2003-08-18 20:00 pramsey +2003-08-18 20:00 Paul Ramsey <pramsey@cleverelephant.ca> - * More entities + * [r293] More entities -2003-08-18 19:45 pramsey +2003-08-18 19:45 Paul Ramsey <pramsey@cleverelephant.ca> - * Replace <> with proper entities in Dave's new function entries + * [r292] Replace <> with proper entities in Dave's new function + entries -2003-08-18 16:59 pramsey +2003-08-18 16:59 Paul Ramsey <pramsey@cleverelephant.ca> - * Added info on piping results to output file. + * [r291] Added info on piping results to output file. -2003-08-18 16:41 pramsey +2003-08-18 16:41 Paul Ramsey <pramsey@cleverelephant.ca> - * Change include from io.h to geom.h. + * [r290] Change include from io.h to geom.h. -2003-08-17 19:00 pramsey +2003-08-17 19:00 Paul Ramsey <pramsey@cleverelephant.ca> - * Change sequence handling to respect versions prior to 7.3. Patch - from + * [r289] Change sequence handling to respect versions prior to 7.3. + Patch from strk. 2003-08-08 18:19 dblasby - * Conformance changes. + * [r288] Conformance changes. Removed junk from postgis_debug.c and added the first run of the long transaction locking support. (this will change - dont use it) @@ -18395,15 +38522,15 @@ pointN(<linestring>,1) now returns the first point (used to return 2nd) -2003-08-07 05:13 pramsey +2003-08-07 05:13 Paul Ramsey <pramsey@cleverelephant.ca> - * Added some information about compiling PostgreSQL with C++ + * [r287] Added some information about compiling PostgreSQL with C++ support to enable proper GEOS behavior. 2003-08-06 19:31 dblasby - * Added the WKB parser. Added all the functions like + * [r286] Added the WKB parser. Added all the functions like PolyFromWKB(<WKB>,[<SRID>]). Added all the functions like PolyFromText(<WKT>,[<SRID>]) @@ -18412,54 +38539,55 @@ 2003-08-05 18:27 dblasby - * Added null implementations of new GEOS-returning-geometry + * [r285] Added null implementations of new GEOS-returning-geometry functions (ie. buffer). 2003-08-05 16:28 jeffloun - * Removed the setval for the sequence if the value was going to be - 0. + * [r284] Removed the setval for the sequence if the value was going + to be 0. This avoids a warning that occirs when you try to set it to 0. 2003-08-01 23:58 dblasby - * added the functionality to convert GEOS->PostGIS geometries. - Added those geos + * [r283] added the functionality to convert GEOS->PostGIS + geometries. Added those geos functions to postgis. 2003-08-01 23:22 jeffloun - * Altered the loader to use a (gid serial) type instead of just a - (gid int4). + * [r282] Altered the loader to use a (gid serial) type instead of + just a (gid int4). Also the gid is now declared as a primary key. -2003-08-01 17:44 pramsey +2003-08-01 17:44 Paul Ramsey <pramsey@cleverelephant.ca> - * Added BC Albers parameterization (epsg 42102) + * [r281] Added BC Albers parameterization (epsg 42102) -2003-07-25 17:08 pramsey +2003-07-25 17:08 Paul Ramsey <pramsey@cleverelephant.ca> - * Moved Cygwin endian define out of source files into postgis.h - common + * [r280] Moved Cygwin endian define out of source files into + postgis.h common header file. 2003-07-08 18:35 dblasby - * changed asbinary_specify() so that it is more aware of TEXT being + * [r279] changed asbinary_specify() so that it is more aware of + TEXT being un-terminated. this is a modified patch from David Garnier <david.garnier@etudier-online.com>. -2003-07-01 18:30 pramsey +2003-07-01 18:30 Paul Ramsey <pramsey@cleverelephant.ca> - * Added CVS revision headers. + * [r278] Added CVS revision headers. -2003-06-18 16:30 pramsey +2003-06-18 16:30 Paul Ramsey <pramsey@cleverelephant.ca> - * It seems that invalid geometries where in the shapefile (as far - as shapelib + * [r277] It seems that invalid geometries where in the shapefile + (as far as shapelib let shp2pgsql know). LINEZ objects with less then 2 vertices. I've patched shp2pgsql to recognized such an inconsistence and use a @@ -18467,17 +38595,17 @@ geometry for that record printing a warning on stderr. <strk@freek.keybit.net> -2003-06-12 22:25 pramsey +2003-06-12 22:25 Paul Ramsey <pramsey@cleverelephant.ca> - * Added transaction begin and end. + * [r276] Added transaction begin and end. 2003-05-27 22:35 dblasby - * New version of the postgis-GEOS connector. + * [r275] New version of the postgis-GEOS connector. 2003-05-13 22:51 dblasby - * Added a modified version of Carl Anderson + * [r274] Added a modified version of Carl Anderson <carl.anderson@vadose.org> patch for schema-aware find_srid(). @@ -18492,553 +38620,564 @@ my system 3. throw an error if the the requested geometry couldnt be found. -2003-04-14 18:01 pramsey +2003-04-14 18:01 Paul Ramsey <pramsey@cleverelephant.ca> - * Patch for optional case sensitivity respect. From strk. + * [r273] Patch for optional case sensitivity respect. From strk. -2003-04-10 23:35 pramsey +2003-04-10 23:35 Paul Ramsey <pramsey@cleverelephant.ca> - * More info + * [r272] More info 2003-04-10 19:17 dblasby - * added area() as alias for area2d() + * [r271] added area() as alias for area2d() 2003-04-10 19:16 dblasby - * changes to area() + * [r270] changes to area() -2003-04-10 17:45 pramsey +2003-04-10 17:45 Paul Ramsey <pramsey@cleverelephant.ca> - * More info. + * [r269] More info. -2003-04-10 17:40 pramsey +2003-04-10 17:40 Paul Ramsey <pramsey@cleverelephant.ca> - * Fixed within() test to have right order of arguments. + * [r268] Fixed within() test to have right order of arguments. -2003-04-10 17:29 pramsey +2003-04-10 17:29 Paul Ramsey <pramsey@cleverelephant.ca> - * Changes to function names to MATCH the specification. + * [r267] Changes to function names to MATCH the specification. -2003-04-10 17:19 pramsey +2003-04-10 17:19 Paul Ramsey <pramsey@cleverelephant.ca> - * More consistency fixes. + * [r266] More consistency fixes. -2003-04-10 17:05 pramsey +2003-04-10 17:05 Paul Ramsey <pramsey@cleverelephant.ca> - * Fixes for consistency (!!!!) of the tests and a first README on - how to run + * [r265] Fixes for consistency (!!!!) of the tests and a first + README on how to run them. -2003-04-10 16:40 pramsey +2003-04-10 16:40 Paul Ramsey <pramsey@cleverelephant.ca> - * Extra OGC text constructor functions. + * [r264] Extra OGC text constructor functions. -2003-04-10 16:22 pramsey +2003-04-10 16:22 Paul Ramsey <pramsey@cleverelephant.ca> - * Hack to supply c++ CXX variable if undefined. + * [r263] Hack to supply c++ CXX variable if undefined. -2003-04-10 16:20 pramsey +2003-04-10 16:20 Paul Ramsey <pramsey@cleverelephant.ca> - * Cruft removal + * [r262] Cruft removal -2003-04-10 05:19 pramsey +2003-04-10 05:19 Paul Ramsey <pramsey@cleverelephant.ca> - * Formatting changes. + * [r261] Formatting changes. -2003-04-10 05:16 pramsey +2003-04-10 05:16 Paul Ramsey <pramsey@cleverelephant.ca> - * Remove old commented out duplicate function. + * [r260] Remove old commented out duplicate function. -2003-04-09 21:53 pramsey +2003-04-09 21:53 Paul Ramsey <pramsey@cleverelephant.ca> - * Makefile should fully honor USE_GEOS flag now. + * [r259] Makefile should fully honor USE_GEOS flag now. -2003-04-09 21:35 pramsey +2003-04-09 21:35 Paul Ramsey <pramsey@cleverelephant.ca> - * Cleaned up makefile and transform warning removed for null case. + * [r258] Cleaned up makefile and transform warning removed for null + case. -2003-04-09 21:08 pramsey +2003-04-09 21:08 Paul Ramsey <pramsey@cleverelephant.ca> - * Some reformatting. + * [r257] Some reformatting. 2003-04-09 18:34 dblasby - * GEOS support -first run + * [r256] GEOS support -first run 2003-04-09 18:34 dblasby - * test data for isvalid() + * [r255] test data for isvalid() -2003-04-09 03:40 pramsey +2003-04-09 03:40 Paul Ramsey <pramsey@cleverelephant.ca> - * Makefile update + * [r254] Makefile update -2003-04-09 03:40 pramsey +2003-04-09 03:40 Paul Ramsey <pramsey@cleverelephant.ca> - * Updates for 0.7.5 release. + * [r252] Updates for 0.7.5 release. -2003-04-08 21:41 pramsey +2003-04-08 21:41 Paul Ramsey <pramsey@cleverelephant.ca> - * Cygwin BE_DLLLIBS fix from nvine/jtishler + * [r251] Cygwin BE_DLLLIBS fix from nvine/jtishler 2003-04-08 21:23 dblasby - * simple table to test relate(g1,g2). Taken from JTS/GEOS + * [r250] simple table to test relate(g1,g2). Taken from JTS/GEOS regression test. 2003-04-01 23:02 jeffloun - * Fixed a bug which dropped the last Z value of each line in 3d - lines. + * [r249] Fixed a bug which dropped the last Z value of each line in + 3d lines. -2003-03-07 16:39 pramsey +2003-03-07 16:39 Paul Ramsey <pramsey@cleverelephant.ca> - * M-handling patch and some Z-recognition too. + * [r248] M-handling patch and some Z-recognition too. From strk@freek.keybit.net. -2003-03-06 18:57 chodgson +2003-03-06 18:57 Chris Hodgson <chodgson@refractions.net> - * swapped '~=' for '=' in the operator class definition for + * [r247] swapped '~=' for '=' in the operator class definition for gist_geometry_ops. -2003-03-06 18:29 chodgson +2003-03-06 18:29 Chris Hodgson <chodgson@refractions.net> - * changed 'geometry' to 'GEOMETRY' two places in the + * [r246] changed 'geometry' to 'GEOMETRY' two places in the AddGeometryColumn sql code. -2003-03-06 18:10 chodgson +2003-03-06 18:10 Chris Hodgson <chodgson@refractions.net> - * Updated the documentation for the '~' operator and added + * [r245] Updated the documentation for the '~' operator and added documentation for the '@' operator (they were backwards). 2003-03-06 18:04 dblasby - * indexing for 7.3: @ and ~ were backwards. Corrected. + * [r244] indexing for 7.3: @ and ~ were backwards. Corrected. 2003-02-15 00:27 jeffloun - * added more type checking into the create table statment. + * [r243] added more type checking into the create table statment. Now uses int8, and numeric types if the columns definitions are too big 2003-02-14 20:07 jeffloun - * changed the PIP function to loop from i=0 to 1<n-1 + * [r242] changed the PIP function to loop from i=0 to 1<n-1 -2003-02-13 02:48 pramsey +2003-02-13 02:48 Paul Ramsey <pramsey@cleverelephant.ca> - * Changes in preparation for 0.7.4 release. + * [r240] Changes in preparation for 0.7.4 release. -2003-02-12 21:03 pramsey +2003-02-12 21:03 Paul Ramsey <pramsey@cleverelephant.ca> - * Fixed bug with 7.1 build relating to postgis_estimate. + * [r239] Fixed bug with 7.1 build relating to postgis_estimate. -2003-02-04 23:11 pramsey +2003-02-04 23:11 Paul Ramsey <pramsey@cleverelephant.ca> - * Changed constraint name for geometry_columns_pk. + * [r238] Changed constraint name for geometry_columns_pk. -2003-02-04 22:57 pramsey +2003-02-04 22:57 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix memory management error, array of pointers allocated + * [r237] Fix memory management error, array of pointers allocated insufficient space. -2003-02-04 21:39 pramsey +2003-02-04 21:39 Paul Ramsey <pramsey@cleverelephant.ca> - * Added CVS substitution strings for logging. + * [r236] Added CVS substitution strings for logging. -2003-02-04 06:49 pramsey +2003-02-04 06:49 Paul Ramsey <pramsey@cleverelephant.ca> - * Fixed stupid case error in 7.2 gist support. + * [r235] Fixed stupid case error in 7.2 gist support. -2003-02-03 20:08 pramsey +2003-02-03 20:08 Paul Ramsey <pramsey@cleverelephant.ca> - * Updated SRS file with better proj4 definitions and nicer + * [r234] Updated SRS file with better proj4 definitions and nicer commented description lines. -2003-01-31 17:23 chodgson +2003-01-31 17:23 Chris Hodgson <chodgson@refractions.net> - * fixed a small error in an example - road_name -> name + * [r233] fixed a small error in an example - road_name -> name 2003-01-22 17:07 dblasby - * applied Mark Cave-Ayland's new patch that is a bit cleaner and - has a + * [r232] applied Mark Cave-Ayland's new patch that is a bit cleaner + and has a user-defined FETCH limit for creating a histogram. 2003-01-21 17:46 dblasby - * added patch from Mark Cave-Ayland that saves memory during + * [r231] added patch from Mark Cave-Ayland that saves memory during histogram calculations by using cursors instead of loading all the BOXs at once. -2003-01-06 18:07 pramsey +2003-01-06 18:07 Paul Ramsey <pramsey@cleverelephant.ca> - * Added USE_STATS fix for index selectivity. + * [r230] Added USE_STATS fix for index selectivity. 2002-12-17 23:24 dblasby - * fixed select astext(the_geom)||'dave' from ...; bug + * [r229] fixed select astext(the_geom)||'dave' from ...; bug -2002-12-10 04:45 pramsey +2002-12-10 04:45 Paul Ramsey <pramsey@cleverelephant.ca> - * Removed old sql.in files. + * [r228] Removed old sql.in files. -2002-12-10 04:37 pramsey +2002-12-10 04:37 Paul Ramsey <pramsey@cleverelephant.ca> - * Support for 7.3 undefinition. + * [r227] Support for 7.3 undefinition. -2002-12-10 04:36 pramsey +2002-12-10 04:36 Paul Ramsey <pramsey@cleverelephant.ca> - * New SQL update files, with version dependant start and end + * [r226] New SQL update files, with version dependant start and end scripts. -2002-12-06 20:31 pramsey +2002-12-06 20:31 Paul Ramsey <pramsey@cleverelephant.ca> - * Set USE_PROJ back to default 0. + * [r225] Set USE_PROJ back to default 0. -2002-12-05 22:12 pramsey +2002-12-05 22:12 Paul Ramsey <pramsey@cleverelephant.ca> - * Returned to 'opaque' as type in creation, since 7.3 will + * [r224] Returned to 'opaque' as type in creation, since 7.3 will automatically cast and < 7.3 will fail if I use a different value. This causes some warnings in 7.3, but no failures. -2002-12-05 21:49 pramsey +2002-12-05 21:49 Paul Ramsey <pramsey@cleverelephant.ca> - * Updates to support 7.3 typecasting conventions. 7.3 support is - now ready + * [r223] Updates to support 7.3 typecasting conventions. 7.3 + support is now ready for beta testing. -2002-12-05 21:11 pramsey +2002-12-05 21:11 Paul Ramsey <pramsey@cleverelephant.ca> - * "fixed" pg_opclass so that 7.3 index creation works. + * [r222] "fixed" pg_opclass so that 7.3 index creation works. -2002-12-05 20:57 pramsey +2002-12-05 20:57 Paul Ramsey <pramsey@cleverelephant.ca> - * Changed an opaque to internal (many to go...) + * [r221] Changed an opaque to internal (many to go...) -2002-12-05 20:54 pramsey +2002-12-05 20:54 Paul Ramsey <pramsey@cleverelephant.ca> - * Pass USE_VERSION macro into the C compilation process to the - pre-processor can + * [r220] Pass USE_VERSION macro into the C compilation process to + the pre-processor can make use of it -2002-12-05 20:48 pramsey +2002-12-05 20:48 Paul Ramsey <pramsey@cleverelephant.ca> - * Changed libdir references to LIBPATH and started using the magic + * [r219] Changed libdir references to LIBPATH and started using the + magic $libpath entry for default installs. -2002-12-05 20:40 pramsey +2002-12-05 20:40 Paul Ramsey <pramsey@cleverelephant.ca> - * Formatting change. + * [r218] Formatting change. -2002-12-05 20:30 pramsey +2002-12-05 20:30 Paul Ramsey <pramsey@cleverelephant.ca> - * Early support for 7.3. No fixes for typecasting problems yet. + * [r217] Early support for 7.3. No fixes for typecasting problems + yet. -2002-12-05 19:55 pramsey +2002-12-05 19:55 Paul Ramsey <pramsey@cleverelephant.ca> - * Removed DOS linefeeds from SQL files. + * [r216] Removed DOS linefeeds from SQL files. -2002-12-05 19:48 pramsey +2002-12-05 19:48 Paul Ramsey <pramsey@cleverelephant.ca> - * Changes to support 7.3 cleanly. + * [r215] Changes to support 7.3 cleanly. -2002-12-05 19:48 pramsey +2002-12-05 19:48 Paul Ramsey <pramsey@cleverelephant.ca> - * Changes to allow 7.3 support to be easily added. + * [r214] Changes to allow 7.3 support to be easily added. -2002-12-01 05:59 pramsey +2002-12-01 05:59 Paul Ramsey <pramsey@cleverelephant.ca> - * Original OpenGIS test suite files. To be edited to conform to + * [r213] Original OpenGIS test suite files. To be edited to conform + to PostGIS syntax where legal. -2002-11-26 03:59 pramsey +2002-11-26 03:59 Paul Ramsey <pramsey@cleverelephant.ca> - * Changed references to 'make' into macro references to MAKE + * [r212] Changed references to 'make' into macro references to MAKE -2002-11-22 21:25 chodgson +2002-11-22 21:25 Chris Hodgson <chodgson@refractions.net> - * changed the title of the new section from "Mapserver" to "Using - Mapserver" + * [r211] changed the title of the new section from "Mapserver" to + "Using Mapserver" -2002-11-22 21:22 chodgson +2002-11-22 21:22 Chris Hodgson <chodgson@refractions.net> - * added more advanced mapserver documentation, and separated + * [r210] added more advanced mapserver documentation, and separated mapserver into its own section of the documentation 2002-11-22 17:38 dblasby - * Non-compiled in transform() returns error instead of nop. + * [r209] Non-compiled in transform() returns error instead of nop. -2002-11-20 21:32 chodgson +2002-11-20 21:32 Chris Hodgson <chodgson@refractions.net> - * re-formatted the xml doc and added a bit about complex queries - (still lots more to come on that topic) + * [r208] re-formatted the xml doc and added a bit about complex + queries (still lots more to come on that topic) 2002-11-06 23:55 jeffloun - * added support for clockwise-ness in shp dumper + * [r207] added support for clockwise-ness in shp dumper -2002-11-04 21:21 pramsey +2002-11-04 21:21 Paul Ramsey <pramsey@cleverelephant.ca> - * Removed debugging connstring print. + * [r206] Removed debugging connstring print. 2002-10-25 16:13 dblasby - * Now accepts both types of multipoint - 'MULTIPOINT(0 0, 1 + * [r205] Now accepts both types of multipoint - 'MULTIPOINT(0 0, 1 1)'::geometry and 'MULTIPOINT( (0 0), (1 1))'::geometry; -2002-10-24 15:53 pramsey +2002-10-24 15:53 Paul Ramsey <pramsey@cleverelephant.ca> - * Added PGbox3d accessors for LLB and URB. Added PGgeometry update - to + * [r204] Added PGbox3d accessors for LLB and URB. Added PGgeometry + update to account for SRIDs when they are present in the WKT. Submitted by Rueben Schultz. -2002-10-17 17:06 chodgson +2002-10-17 17:06 Chris Hodgson <chodgson@refractions.net> - * fixed the last compile warning on solaris/gcc + * [r203] fixed the last compile warning on solaris/gcc -2002-10-17 16:45 chodgson +2002-10-17 16:45 Chris Hodgson <chodgson@refractions.net> - * - cleaned up all the compiler warnings + * [r202] - cleaned up all the compiler warnings - for getopt.c, this involved moving the line: extern char *getenv(const char *name); outside of the two nested #ifdefs that it was inside, as it is always required (the code that calls it isn't inside any #ifdefs) Perhaps this may break compilation in non-linux/gnu environments? -2002-10-16 23:48 pramsey +2002-10-16 23:48 Paul Ramsey <pramsey@cleverelephant.ca> - * Fixed syntax error in hyperlink to postgis source. + * [r201] Fixed syntax error in hyperlink to postgis source. 2002-10-16 20:33 dblasby - * Added support to turn off the postgis_gist_sel() computations - (see Makefile). + * [r200] Added support to turn off the postgis_gist_sel() + computations (see Makefile). -2002-10-16 17:27 pramsey +2002-10-16 17:27 Paul Ramsey <pramsey@cleverelephant.ca> - * Added USE_STATS switch to make the new statistics system + * [r199] Added USE_STATS switch to make the new statistics system optional. -2002-10-16 17:06 chodgson +2002-10-16 17:06 Chris Hodgson <chodgson@refractions.net> - * makefile now has both support for auto-determining postgres - version and support for the new histogram2d stuff + * [r198] makefile now has both support for auto-determining + postgres version and support for the new histogram2d stuff 2002-10-11 22:52 dblasby - * New file with original estimation methods. + * [r197] New file with original estimation methods. 2002-10-11 22:52 dblasby - * Added support for histogram2d and better statistical analysis. + * [r196] Added support for histogram2d and better statistical + analysis. 2002-10-11 20:22 jeffloun - * fixed the errors in the error fix i had just committed... + * [r195] fixed the errors in the error fix i had just committed... 2002-10-11 20:10 jeffloun - * Fixed a bug from adding NULL support to shape dumper + * [r194] Fixed a bug from adding NULL support to shape dumper 2002-10-10 17:32 jeffloun - * added support to write out null geometries to polygon, + * [r193] added support to write out null geometries to polygon, multipolygon, arc, and multiarcs... 2002-10-10 17:11 jeffloun - * Added support to write out Null geometries to point and + * [r192] Added support to write out Null geometries to point and mulitpoints -2002-10-10 17:00 chodgson +2002-10-10 17:00 Chris Hodgson <chodgson@refractions.net> - * - fixed a bug in box3d_overleft which would likely go unnoticed + * [r191] - fixed a bug in box3d_overleft which would likely go + unnoticed - fixed the docs for &<, &>, <<, and >> which were backwards 2002-09-20 18:05 dblasby - * Fixed complier complaint reported by Mark Sutton <mes@lazo.ca>. + * [r190] Fixed complier complaint reported by Mark Sutton + <mes@lazo.ca>. -2002-09-06 20:29 pramsey +2002-09-06 20:29 Paul Ramsey <pramsey@cleverelephant.ca> - * Trivial initialization bug, forget to set dimension. + * [r188] Trivial initialization bug, forget to set dimension. -2002-09-05 16:49 pramsey +2002-09-05 16:49 Paul Ramsey <pramsey@cleverelephant.ca> - * Changes in preparation for 0.7.3 release + * [r187] Changes in preparation for 0.7.3 release 2002-09-05 16:39 dblasby - * Fixed typo in dropgeometrycolumn() - IS null to =null. This was - caused in the + * [r186] Fixed typo in dropgeometrycolumn() - IS null to =null. + This was caused in the last 'fix'. -2002-09-05 00:07 pramsey +2002-09-05 00:07 Paul Ramsey <pramsey@cleverelephant.ca> - * Make 7.2 index test check for version 7.1 and default to 7.2 if - not + * [r185] Make 7.2 index test check for version 7.1 and default to + 7.2 if not This is preparatory to the 7.3 pgsql release which uses the sames GiST bindings as the 7.2 release. 2002-09-04 16:55 dblasby - * Applied "Mark Cave-Ayland" <mark.cave-ayland@webbased.co.uk>'s - patch so + * [r184] Applied "Mark Cave-Ayland" + <mark.cave-ayland@webbased.co.uk>'s patch so transform() will correctly tranform BBOX only geometries. -2002-09-03 15:31 pramsey +2002-09-03 15:31 Paul Ramsey <pramsey@cleverelephant.ca> - * Added automatic test for version string and setting of USE_PG72 - to + * [r183] Added automatic test for version string and setting of + USE_PG72 to appropriate value, as submitted by Greg Stark. -2002-09-01 20:04 pramsey +2002-09-01 20:04 Paul Ramsey <pramsey@cleverelephant.ca> - * Changes in preparation for 0.7.2 release. + * [r181] Changes in preparation for 0.7.2 release. 2002-08-19 16:14 dblasby - * changed "=NULL" to "is null" for postgresql 7.3 devel issues (as - reported + * [r180] changed "=NULL" to "is null" for postgresql 7.3 devel + issues (as reported by Eric - redmonde@purdue.edu) 2002-08-16 17:58 dblasby - * Applyed "Mark Cave-Ayland" <mark.cave-ayland@webbased.co.uk>'s - patch + * [r179] Applyed "Mark Cave-Ayland" + <mark.cave-ayland@webbased.co.uk>'s patch to the truly_inside() function. Thanks mark! -2002-08-07 16:31 pramsey +2002-08-07 16:31 Paul Ramsey <pramsey@cleverelephant.ca> - * Patch to write null geometries as "\N" in the dump file format - case. + * [r178] Patch to write null geometries as "\N" in the dump file + format case. Submitted by Steffen Macke <sdteffen@web.de> -2002-07-26 16:50 chodgson +2002-07-26 16:50 Chris Hodgson <chodgson@refractions.net> - * minor correction + * [r177] minor correction -2002-07-24 20:40 pramsey +2002-07-24 20:40 Paul Ramsey <pramsey@cleverelephant.ca> - * fixes the unwanted quotation of NULLs for the sql insert format. - Submitted + * [r176] fixes the unwanted quotation of NULLs for the sql insert + format. Submitted by Steffen Macke. -2002-07-17 20:10 chodgson +2002-07-17 20:10 Chris Hodgson <chodgson@refractions.net> - * fixed some formatting errors from my previous addition + * [r175] fixed some formatting errors from my previous addition -2002-07-17 18:34 chodgson +2002-07-17 18:34 Chris Hodgson <chodgson@refractions.net> - * added a "common problems" sub-section to the "installing postgis" - section + * [r174] added a "common problems" sub-section to the "installing + postgis" section -2002-07-06 17:51 pramsey +2002-07-06 17:51 Paul Ramsey <pramsey@cleverelephant.ca> - * Reverted USE_PROJ to 0 + * [r173] Reverted USE_PROJ to 0 -2002-07-06 15:16 pramsey +2002-07-06 15:16 Paul Ramsey <pramsey@cleverelephant.ca> - * Patch from Steffen Macke, NULL attributes are imported as NULL - now, + * [r172] Patch from Steffen Macke, NULL attributes are imported as + NULL now, gid field renaming works now (case problem), \ and ' are escaped and don't break the import 2002-07-04 23:38 dblasby - * added bytea(wkb) + * [r171] added bytea(wkb) -2002-06-26 18:34 pramsey +2002-06-26 18:34 Paul Ramsey <pramsey@cleverelephant.ca> - * fixed syntax error in reference to pgsql2shp + * [r170] fixed syntax error in reference to pgsql2shp -2002-06-26 18:25 pramsey +2002-06-26 18:25 Paul Ramsey <pramsey@cleverelephant.ca> - * Cygwin fixes to the install target to provide .exe extensions. + * [r169] Cygwin fixes to the install target to provide .exe + extensions. 2002-06-07 18:16 jeffloun - * fixed a bug in pgsql2shp which displayed the total DBF rows - written as one less than actually was written. + * [r168] fixed a bug in pgsql2shp which displayed the total DBF + rows written as one less than actually was written. -2002-05-28 18:01 chodgson +2002-05-28 18:01 Chris Hodgson <chodgson@refractions.net> - * - updated the ~ and @ operator definitions in postgis_gist.sql.in - so that ~ is contains and @ is contained (should have been done - in the last update, but I forgot) + * [r167] - updated the ~ and @ operator definitions in + postgis_gist.sql.in so that ~ is contains and @ is contained + (should have been done in the last update, but I forgot) -2002-05-28 17:59 chodgson +2002-05-28 17:59 Chris Hodgson <chodgson@refractions.net> - * - updated the ~ and @ operator definitions in + * [r166] - updated the ~ and @ operator definitions in postgis_gist_72.sql.in so that ~ is contains and @ is contained -2002-05-28 17:54 chodgson +2002-05-28 17:54 Chris Hodgson <chodgson@refractions.net> - * - updated the translate function in postgis_fn.c to translate the - bounding box as well, as suggested by Robert Burgholzer + * [r165] - updated the translate function in postgis_fn.c to + translate the bounding box as well, as suggested by Robert + Burgholzer -2002-05-22 19:29 pramsey +2002-05-22 19:29 Paul Ramsey <pramsey@cleverelephant.ca> - * Fixed syntax error in GeometryN defn. + * [r164] Fixed syntax error in GeometryN defn. -2002-05-14 20:50 pramsey +2002-05-14 20:50 Paul Ramsey <pramsey@cleverelephant.ca> - * Set USE_PG72 to 0. + * [r162] Set USE_PG72 to 0. -2002-05-14 20:47 pramsey +2002-05-14 20:47 Paul Ramsey <pramsey@cleverelephant.ca> - * Documentation updates for 0.7.1 release. + * [r161] Documentation updates for 0.7.1 release. -2002-05-14 20:36 pramsey +2002-05-14 20:36 Paul Ramsey <pramsey@cleverelephant.ca> - * Stripped DOS carriage returns from all source code files. Should + * [r160] Stripped DOS carriage returns from all source code files. + Should fix some compilation problems on some platforms. -2002-05-14 18:28 chodgson +2002-05-14 18:28 Chris Hodgson <chodgson@refractions.net> - * - integrated a bugfix for the rtree_picksplit algorithm from - Teodor Sigaev. This fixes the bug which reports "ERROR: + * [r159] - integrated a bugfix for the rtree_picksplit algorithm + from Teodor Sigaev. This fixes the bug which reports "ERROR: MemoryContextAlloc: invalid request size 0" while building a gist rtree index (first reported by Andy Turk) - cleaned up some warnings (mostly "possibly unitialized variables") -2002-05-06 17:35 chodgson +2002-05-06 17:35 Chris Hodgson <chodgson@refractions.net> - * - changed add_to_geometry() and collector() so that the sql - collect() aggregate returns the simplest possible geometric type, - ie. a MULTIPOINT instead of a GEOMETRYCOLLECTIONwhen all of the - geometries being collected are of either POINT or MULTIPOINT type + * [r158] - changed add_to_geometry() and collector() so that the + sql collect() aggregate returns the simplest possible geometric + type, ie. a MULTIPOINT instead of a GEOMETRYCOLLECTIONwhen all of + the geometries being collected are of either POINT or MULTIPOINT + type -2002-05-04 23:08 pramsey +2002-05-04 23:08 Paul Ramsey <pramsey@cleverelephant.ca> - * Fixed mistake in FAQ example on radius searching. + * [r155] Fixed mistake in FAQ example on radius searching. -2002-05-04 22:52 pramsey +2002-05-04 22:52 Paul Ramsey <pramsey@cleverelephant.ca> - * More docbook changes. + * [r154] More docbook changes. -2002-05-04 22:51 pramsey +2002-05-04 22:51 Paul Ramsey <pramsey@cleverelephant.ca> - * Docbook syntax error changes. + * [r153] Docbook syntax error changes. -2002-05-04 22:47 pramsey +2002-05-04 22:47 Paul Ramsey <pramsey@cleverelephant.ca> - * Added postgis_undef.sql to make clean target. + * [r152] Added postgis_undef.sql to make clean target. -2002-05-04 22:46 pramsey +2002-05-04 22:46 Paul Ramsey <pramsey@cleverelephant.ca> - * Documentation updates to go with the 0.7 release. All new + * [r151] Documentation updates to go with the 0.7 release. All new functions documented, and appropriate changes made to installation and other @@ -19046,41 +39185,41 @@ support added to Makefile. -2002-05-04 22:44 pramsey +2002-05-04 22:44 Paul Ramsey <pramsey@cleverelephant.ca> - * Add commenting to indicate the coordinate system of each insert - line in + * [r150] Add commenting to indicate the coordinate system of each + insert line in a human readable form. -2002-05-04 22:44 pramsey +2002-05-04 22:44 Paul Ramsey <pramsey@cleverelephant.ca> - * Update shapelib references to 1.2.9. + * [r149] Update shapelib references to 1.2.9. -2002-05-04 20:30 pramsey +2002-05-04 20:30 Paul Ramsey <pramsey@cleverelephant.ca> - * Added an "install" target which installs shp2pgsql and pgsql2shp - in the + * [r148] Added an "install" target which installs shp2pgsql and + pgsql2shp in the default pgsql bin directory. -2002-05-04 20:29 pramsey +2002-05-04 20:29 Paul Ramsey <pramsey@cleverelephant.ca> - * Changed WANT_PROJECTION flag to USE_PROJ to match other Makefile - defines. + * [r147] Changed WANT_PROJECTION flag to USE_PROJ to match other + Makefile defines. -2002-05-04 20:28 pramsey +2002-05-04 20:28 Paul Ramsey <pramsey@cleverelephant.ca> - * Added GeomFromText alias to GeometryFromText since the former is - in the + * [r146] Added GeomFromText alias to GeometryFromText since the + former is in the SFSQL spec and the latter is not. -2002-05-03 03:14 pramsey +2002-05-03 03:14 Paul Ramsey <pramsey@cleverelephant.ca> - * Start of 0.7 documenation edits. + * [r145] Start of 0.7 documenation edits. 2002-05-02 22:25 dblasby - * transform_geom() - if it gets and error -38 from PROJ.4 (couldnt - open + * [r144] transform_geom() - if it gets and error -38 from PROJ.4 + (couldnt open grid file) it will try to do the transform without a a datum conversion. This usually occurs if you ask for a re-projection for a point outside where you have @@ -19088,22 +39227,23 @@ 2002-04-30 23:37 dblasby - * Better error reporting. + * [r143] Better error reporting. 2002-04-30 23:20 dblasby - * Added some debugging to transform. + * [r142] Added some debugging to transform. 2002-04-29 17:23 dblasby - * Added distance_ellipsiod(point,point,ellipsoid) + * [r141] Added distance_ellipsiod(point,point,ellipsoid) (called distance_spheroid in SQL) -2002-04-26 22:50 chodgson +2002-04-26 22:50 Chris Hodgson <chodgson@refractions.net> - * - cut the gist indexing-related functions out of postgis_ops.c - and put them in postgis_gist.c, then put the new gist indexing - functions for postgres >= 7.2 in the file postgis_gist_72 + * [r140] - cut the gist indexing-related functions out of + postgis_ops.c and put them in postgis_gist.c, then put the new + gist indexing functions for postgres >= 7.2 in the file + postgis_gist_72 - similarly, the sql definitions of the gist functions have been split into their own new sql.in file, with postgis_gist_72.sql.in @@ -19129,55 +39269,57 @@ - also edited the loader/Makefile to clean up properly -2002-04-26 16:13 pramsey +2002-04-26 16:13 Paul Ramsey <pramsey@cleverelephant.ca> - * Column name length limitation removed. Patch submitted by + * [r139] Column name length limitation removed. Patch submitted by Bernhard Reiter <bernhard@intevation.de> -2002-04-23 17:02 pramsey +2002-04-23 17:02 Paul Ramsey <pramsey@cleverelephant.ca> - * XML syntax error. + * [r138] XML syntax error. -2002-04-19 18:20 pramsey +2002-04-19 18:20 Paul Ramsey <pramsey@cleverelephant.ca> - * Removed the CREATE INDEX statement since there is already a - primary + * [r137] Removed the CREATE INDEX statement since there is already + a primary key index. -2002-04-19 18:15 pramsey +2002-04-19 18:15 Paul Ramsey <pramsey@cleverelephant.ca> - * Added PROJ4 entries to all relevant rows, altered the auth_name - to + * [r136] Added PROJ4 entries to all relevant rows, altered the + auth_name to be EPSG for those IDs which originated from the EPSG. -2002-04-19 15:14 pramsey +2002-04-19 15:14 Paul Ramsey <pramsey@cleverelephant.ca> - * Patches to bring example up to current version in terms of SQL - access + * [r135] Patches to bring example up to current version in terms of + SQL access and to stop silly bug in missing table case. Submitted by Steffen Macke <sdteffen@web.de> 2002-04-15 22:38 jeffloun - * fixed bug that allowed two field names to be the same in + * [r134] fixed bug that allowed two field names to be the same in shp2psql, we are now checking for that. 2002-03-26 23:46 dblasby - * changed postgis_Version() to return type text, not type char. + * [r133] changed postgis_Version() to return type text, not type + char. -2002-03-25 22:20 pramsey +2002-03-25 22:20 Paul Ramsey <pramsey@cleverelephant.ca> - * Minor syntax changes in commenting. + * [r132] Minor syntax changes in commenting. -2002-03-25 02:04 pramsey +2002-03-25 02:04 Paul Ramsey <pramsey@cleverelephant.ca> - * Minor syntactical changes to try and allow compilation on IRIX. + * [r131] Minor syntactical changes to try and allow compilation on + IRIX. -2002-03-22 18:42 chodgson +2002-03-22 18:42 Chris Hodgson <chodgson@refractions.net> - * Added the collect(geometry) function which is an aggregate + * [r130] Added the collect(geometry) function which is an aggregate function that takes a group of geometries and turns them into a geometry collection. For @@ -19187,254 +39329,260 @@ 2002-03-15 17:10 dblasby - * ADD xmin(box3d) etc... for box3d's. + * [r129] ADD xmin(box3d) etc... for box3d's. 2002-03-14 19:35 jeffloun - * added a warning to the shape dumper when there are no fields in - the database. + * [r128] added a warning to the shape dumper when there are no + fields in the database. -2002-03-01 19:32 pramsey +2002-03-01 19:32 Paul Ramsey <pramsey@cleverelephant.ca> - * Alter shp2pgsql in the -d case so that 'DELETE FROM' is used to - clear the + * [r127] Alter shp2pgsql in the -d case so that 'DELETE FROM' is + used to clear the 'GEOMETRY_COLUMNS' table during table drop instead of DropGeometryColumns. Patch submitted by Steffen Macke <sdteffen@yahoo.com>. 2002-02-27 00:38 dblasby - * minor bug in geometry_to_text() for BOX3D only types fixed. + * [r126] minor bug in geometry_to_text() for BOX3D only types + fixed. 2002-02-27 00:06 dblasby - * BOX3D only geometries now dump as "SRID=x;BOX3D(...)". They are - now okay to dump/restore. + * [r125] BOX3D only geometries now dump as "SRID=x;BOX3D(...)". + They are now okay to dump/restore. 2002-02-26 23:46 dblasby - * for bbox only geometries, it will dump as "SRID=x;NULL", and on - load, it will be NULL. + * [r124] for bbox only geometries, it will dump as "SRID=x;NULL", + and on load, it will be NULL. -2002-02-23 19:04 pramsey +2002-02-23 19:04 Paul Ramsey <pramsey@cleverelephant.ca> - * Patch to pgsql2shp to allow dumping of tables with more than one - geometry + * [r123] Patch to pgsql2shp to allow dumping of tables with more + than one geometry column, and addition of -g option to specific which geometry column to dump. Submitted by Steffen Macke <sdteffen@yahoo.com>. -2002-02-19 16:57 pramsey +2002-02-19 16:57 Paul Ramsey <pramsey@cleverelephant.ca> - * Patch to shp2pgsql.c to properly handle 3D shape files. Submitted + * [r122] Patch to shp2pgsql.c to properly handle 3D shape files. + Submitted by Steffen Macke <sdteffen@yahoo.com>. 2002-02-18 18:02 dblasby - * minor bug fix + * [r121] minor bug fix 2002-02-18 17:02 dblasby - * Added TS support function (chip and some non-SFSQL functions) + * [r120] Added TS support function (chip and some non-SFSQL + functions) -2002-02-13 16:50 pramsey +2002-02-13 16:50 Paul Ramsey <pramsey@cleverelephant.ca> - * Fixed syntax error in UPDATE statement. + * [r119] Fixed syntax error in UPDATE statement. 2002-01-11 16:58 dblasby - * better "no proj4" support addded + * [r118] better "no proj4" support addded -2002-01-08 16:55 pramsey +2002-01-08 16:55 Paul Ramsey <pramsey@cleverelephant.ca> - * Fixed dumb error in POINT syntax example. + * [r117] Fixed dumb error in POINT syntax example. 2002-01-07 21:07 dblasby - * Order changes to avoid conflicts. + * [r116] Order changes to avoid conflicts. 2002-01-03 23:31 dblasby - * Added max_distance(l1,l2) function + * [r115] Added max_distance(l1,l2) function 2001-12-21 23:01 dblasby - * Coordinate transformation function, transform() added in this - file. + * [r114] Coordinate transformation function, transform() added in + this file. Adds requirement for linking the proj4 library if non-null version of function is requested. -2001-12-21 19:44 pramsey +2001-12-21 19:44 Paul Ramsey <pramsey@cleverelephant.ca> - * Doco changes to reflect use of 'createlang' as default language - creator. + * [r113] Doco changes to reflect use of 'createlang' as default + language creator. 2001-12-18 22:28 dblasby - * Added to achive (no code) + * [r112] Added to achive (no code) 2001-12-12 22:21 dblasby - * changed setSRID(chip and geometry, int) so its cachable + * [r111] changed setSRID(chip and geometry, int) so its cachable 2001-12-12 22:19 dblasby - * Made setSRID cachable + * [r110] Made setSRID cachable 2001-11-21 19:39 dblasby - * Chip now handles data with different datasizes (datum_size) + * [r109] Chip now handles data with different datasizes + (datum_size) -2001-11-19 17:25 pramsey +2001-11-19 17:25 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix error in sentence about OGC support. + * [r108] Fix error in sentence about OGC support. -2001-11-07 19:35 pramsey +2001-11-07 19:35 Paul Ramsey <pramsey@cleverelephant.ca> - * Added dates to changelog *yawn* + * [r106] Added dates to changelog *yawn* -2001-11-07 17:25 pramsey +2001-11-07 17:25 Paul Ramsey <pramsey@cleverelephant.ca> - * Added 0.6.2 changes. + * [r105] Added 0.6.2 changes. 2001-11-06 23:03 jeffloun - * Fixed the 'free memory that didn't exist problem' from newsgroup - feedback + * [r104] Fixed the 'free memory that didn't exist problem' from + newsgroup feedback 2001-11-02 23:04 dblasby - * New CHIP type + * [r103] New CHIP type 2001-11-02 23:00 dblasby - * Added CHIP info + * [r102] Added CHIP info -2001-11-02 00:28 pramsey +2001-11-02 00:28 Paul Ramsey <pramsey@cleverelephant.ca> - * Added README to files installed by default + * [r101] Added README to files installed by default -2001-11-01 22:57 pramsey +2001-11-01 22:57 Paul Ramsey <pramsey@cleverelephant.ca> - * Updated shapelib files from latest CVS version. + * [r100] Updated shapelib files from latest CVS version. -2001-10-31 22:18 pramsey +2001-10-31 22:18 Paul Ramsey <pramsey@cleverelephant.ca> - * Added spatial_ref_sys.sql to the installed files for 'make + * [r99] Added spatial_ref_sys.sql to the installed files for 'make install' -2001-10-30 19:52 pramsey +2001-10-30 19:52 Paul Ramsey <pramsey@cleverelephant.ca> - * Added some line commenting to make names more readable. + * [r98] Added some line commenting to make names more readable. -2001-10-30 19:47 pramsey +2001-10-30 19:47 Paul Ramsey <pramsey@cleverelephant.ca> - * More spelling fixes, this time with ispell! :) + * [r97] More spelling fixes, this time with ispell! :) -2001-10-30 19:43 pramsey +2001-10-30 19:43 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix spelling mistake. + * [r96] Fix spelling mistake. 2001-10-29 17:52 jeffloun - * fixed a bug which made the last column value in the dbf file - loading + * [r95] fixed a bug which made the last column value in the dbf + file loading incorrect if you were using Dump format. -2001-10-26 17:04 pramsey +2001-10-26 17:04 Paul Ramsey <pramsey@cleverelephant.ca> - * Added N.Vines changes to Makefile for better compilation under - cygwin. + * [r94] Added N.Vines changes to Makefile for better compilation + under cygwin. -2001-10-26 16:30 pramsey +2001-10-26 16:30 Paul Ramsey <pramsey@cleverelephant.ca> - * Fixed documentation error with respect to box3d + * [r93] Fixed documentation error with respect to box3d 2001-10-25 18:22 dblasby - * Fixed but in WKB out - wkb_multi* didnt set the 'size' return - value. + * [r92] Fixed but in WKB out - wkb_multi* didnt set the 'size' + return value. -2001-10-24 20:56 pramsey +2001-10-24 20:56 Paul Ramsey <pramsey@cleverelephant.ca> - * File with all the ESRI standard ID codes, with corresponding WKT + * [r91] File with all the ESRI standard ID codes, with + corresponding WKT definitions, for loading into the SPATIAL_REF_SYS table. -2001-10-24 20:42 pramsey +2001-10-24 20:42 Paul Ramsey <pramsey@cleverelephant.ca> - * Sweet mary, mother of god, getopt.c was a mess! Cleaned out HTML - entities + * [r90] Sweet mary, mother of god, getopt.c was a mess! Cleaned out + HTML entities and added stdio.h include. Works better now. 2001-10-23 23:41 jeffloun - * fixed a bug in shp2pgsqkl that allocated way too much memory in - polygon files. + * [r89] fixed a bug in shp2pgsqkl that allocated way too much + memory in polygon files. 2001-10-22 20:13 jeffloun - * Standard GNU option handling. + * [r88] Standard GNU option handling. 2001-10-22 20:12 jeffloun - * Modified both loader/dumper to use gnu getopt.c instead of + * [r87] Modified both loader/dumper to use gnu getopt.c instead of standar one since getopt was not the same on solaris and linux. -2001-10-18 17:52 pramsey +2001-10-18 17:52 Paul Ramsey <pramsey@cleverelephant.ca> - * postgis_undef.sql is now automatically generated from postgis.sql - so + * [r86] postgis_undef.sql is now automatically generated from + postgis.sql so no longer part of source code distribution -2001-10-18 17:51 pramsey +2001-10-18 17:51 Paul Ramsey <pramsey@cleverelephant.ca> - * Added lines to automatically create postgis_undef.sql from + * [r85] Added lines to automatically create postgis_undef.sql from postgis.sql using create_undef.pl as part of standard build process. 2001-10-18 16:39 dblasby - * create_undef.pl changed to reove the 2 meta-info tables + * [r84] create_undef.pl changed to reove the 2 meta-info tables (spatial_ref_sys and geometry_columns). -2001-10-17 23:13 pramsey +2001-10-17 23:13 Paul Ramsey <pramsey@cleverelephant.ca> - * Updated style.css to match new website. + * [r83] Updated style.css to match new website. -2001-10-15 18:07 pramsey +2001-10-15 18:07 Paul Ramsey <pramsey@cleverelephant.ca> - * 0.6.1 changes + * [r81] 0.6.1 changes -2001-10-15 17:42 pramsey +2001-10-15 17:42 Paul Ramsey <pramsey@cleverelephant.ca> - * Usage documentation changes. + * [r80] Usage documentation changes. -2001-10-11 18:35 pramsey +2001-10-11 18:35 Paul Ramsey <pramsey@cleverelephant.ca> - * Added line break ot usage. + * [r79] Added line break ot usage. -2001-10-11 18:34 pramsey +2001-10-11 18:34 Paul Ramsey <pramsey@cleverelephant.ca> - * Made usage line more friendly for 80 column displays. + * [r78] Made usage line more friendly for 80 column displays. -2001-10-11 18:26 pramsey +2001-10-11 18:26 Paul Ramsey <pramsey@cleverelephant.ca> - * Edited the usage log to by nicer to 80 column displays + * [r77] Edited the usage log to by nicer to 80 column displays 2001-10-11 18:07 jeffloun - * Fixed some errors and warning that caused it not to compile under - linux + * [r76] Fixed some errors and warning that caused it not to compile + under linux 2001-10-11 17:15 jeffloun - * Modified the .c files slightly to get rid of some warnings. + * [r75] Modified the .c files slightly to get rid of some warnings. 2001-10-04 18:53 jeffloun - * Modified the pgsql2shp file to use getopt to parse the arguments. + * [r74] Modified the pgsql2shp file to use getopt to parse the + arguments. Modified the Readme file accordingly to the new command line usages. @@ -19443,59 +39591,59 @@ 2001-10-01 19:33 jeffloun - * Modified the program to use getopt topion parsing. + * [r73] Modified the program to use getopt topion parsing. 2001-09-20 18:14 jeffloun - * Modified this file to dynamically detemine the name of the + * [r71] Modified this file to dynamically detemine the name of the geometry column instead of using the default one the loader assigns. 2001-09-20 16:08 dblasby - * Removed index-based extent() support functions in postgis_debug.c - due to + * [r70] Removed index-based extent() support functions in + postgis_debug.c due to compile errors reported under cygwin. -2001-09-19 23:03 pramsey +2001-09-19 23:03 Paul Ramsey <pramsey@cleverelephant.ca> - * Updated to provide usage information for the dumper. + * [r69] Updated to provide usage information for the dumper. -2001-09-19 22:59 pramsey +2001-09-19 22:59 Paul Ramsey <pramsey@cleverelephant.ca> - * Split the loader README into two readmes, one for loader and one - for + * [r68] Split the loader README into two readmes, one for loader + and one for dumper. -2001-09-19 19:01 pramsey +2001-09-19 19:01 Paul Ramsey <pramsey@cleverelephant.ca> - * Makefile changes in preparation for 0.6 release. + * [r67] Makefile changes in preparation for 0.6 release. Documentation fiddling for final format. -2001-09-19 18:47 pramsey +2001-09-19 18:47 Paul Ramsey <pramsey@cleverelephant.ca> - * Changes and additions necessary to include pgsql2shp + * [r66] Changes and additions necessary to include pgsql2shp -2001-09-19 18:00 pramsey +2001-09-19 18:00 Paul Ramsey <pramsey@cleverelephant.ca> - * Additions for the 0.6 release. + * [r65] Additions for the 0.6 release. -2001-09-18 01:34 pramsey +2001-09-18 01:34 Paul Ramsey <pramsey@cleverelephant.ca> - * Updates to the documentation (new functions, 0.6 special info, - mapserver + * [r64] Updates to the documentation (new functions, 0.6 special + info, mapserver info). Other release-specific updates in CHANGES, README, TODO to give info on the new code. 2001-09-17 21:24 jeffloun - * Fixed a stupid debugging error that would cause all things to be - treated as 3d points. + * [r63] Fixed a stupid debugging error that would cause all things + to be treated as 3d points. 2001-09-17 21:00 jeffloun - * Makefile changes: + * [r62] Makefile changes: I added an option in the makefile to add debugging information into the compile. @@ -19506,66 +39654,66 @@ 2001-09-04 19:41 dblasby - * Added workaround for PostgreSQL's user defined VARIABLE length - datatype default value bug + * [r61] Added workaround for PostgreSQL's user defined VARIABLE + length datatype default value bug 2001-09-04 19:30 dblasby - * Added support to make WKB a full type. + * [r60] Added support to make WKB a full type. -2001-08-30 22:24 pramsey +2001-08-30 22:24 Paul Ramsey <pramsey@cleverelephant.ca> - * Typo in SQL example fixed. + * [r59] Typo in SQL example fixed. 2001-08-24 21:11 dblasby - * geometry(text) function safer with null text fields. + * [r58] geometry(text) function safer with null text fields. 2001-08-24 21:02 dblasby - * added geometry(text) conversion function + * [r57] added geometry(text) conversion function 2001-08-14 22:15 dblasby - * Added support for better restrictivity of && searches. + * [r56] Added support for better restrictivity of && searches. Defaulted to 0.005 (in backend/utils/adt/geo_selfuncs.c) - I've changed it to be much smaller. This should work for everything but really really large tables. -2001-08-10 02:21 pramsey +2001-08-10 02:21 Paul Ramsey <pramsey@cleverelephant.ca> - * Fixed type in index description. + * [r55] Fixed type in index description. -2001-08-08 22:10 pramsey +2001-08-08 22:10 Paul Ramsey <pramsey@cleverelephant.ca> - * Added a -C option for the shp2pgsql compile + * [r54] Added a -C option for the shp2pgsql compile 2001-08-08 21:54 dblasby - * Added new undef.sql file and perl file to generate it. + * [r53] Added new undef.sql file and perl file to generate it. 2001-08-08 21:49 dblasby - * Added new perl function to make an undef SQL script. + * [r52] Added new perl function to make an undef SQL script. -2001-08-08 05:25 pramsey +2001-08-08 05:25 Paul Ramsey <pramsey@cleverelephant.ca> - * Made OGIS type numbers final per request from James MacGill @ - Leeds + * [r51] Made OGIS type numbers final per request from James MacGill + @ Leeds -2001-08-07 21:36 pramsey +2001-08-07 21:36 Paul Ramsey <pramsey@cleverelephant.ca> - * This file is superceded by the Makefile. + * [r50] This file is superceded by the Makefile. -2001-08-07 21:35 pramsey +2001-08-07 21:35 Paul Ramsey <pramsey@cleverelephant.ca> - * This binary should not have been in CVS. + * [r49] This binary should not have been in CVS. 2001-08-02 16:50 dblasby - * Added more openGIS functions: + * [r48] Added more openGIS functions: Length2d() is renamed length() perimeter2d() is renamed to perimeter() @@ -19607,186 +39755,188 @@ 2001-07-31 19:11 dblasby - * Added plpgsql functions AddGeometryColumn() and + * [r47] Added plpgsql functions AddGeometryColumn() and DeleteGeometryColumn(). 2001-07-30 17:29 dblasby - * Starting to integrate all the SRIDs into functions that create - geometries or + * [r46] Starting to integrate all the SRIDs into functions that + create geometries or use two geometries. Throws error if try to compare geometries with different SRIDs. -2001-07-30 16:41 pramsey +2001-07-30 16:41 Paul Ramsey <pramsey@cleverelephant.ca> - * Ooops, back to shp2pgsql as the target (dummy target) + * [r45] Ooops, back to shp2pgsql as the target (dummy target) -2001-07-30 16:31 pramsey +2001-07-30 16:31 Paul Ramsey <pramsey@cleverelephant.ca> - * Renamed loader target to 'loader'. + * [r44] Renamed loader target to 'loader'. -2001-07-30 16:27 pramsey +2001-07-30 16:27 Paul Ramsey <pramsey@cleverelephant.ca> - * Added a line to automatically make shp2pgsql with 'all' + * [r43] Added a line to automatically make shp2pgsql with 'all' -2001-07-29 17:18 pramsey +2001-07-29 17:18 Paul Ramsey <pramsey@cleverelephant.ca> - * Added section on upgrading. + * [r42] Added section on upgrading. -2001-07-26 17:41 pramsey +2001-07-26 17:41 Paul Ramsey <pramsey@cleverelephant.ca> - * And one last time, this time for real, fixing the install + * [r41] And one last time, this time for real, fixing the install location. -2001-07-26 17:37 pramsey +2001-07-26 17:37 Paul Ramsey <pramsey@cleverelephant.ca> - * Changed back to libdir for the install path + * [r40] Changed back to libdir for the install path -2001-07-26 17:22 pramsey +2001-07-26 17:22 Paul Ramsey <pramsey@cleverelephant.ca> - * Updated minor version number to 5 + * [r39] Updated minor version number to 5 2001-07-24 20:37 dblasby - * added expand_bbox(bbox,double) for easier searching. + * [r38] added expand_bbox(bbox,double) for easier searching. 2001-07-24 20:18 dblasby - * minor change to distance(geom,geom) for stability + * [r37] minor change to distance(geom,geom) for stability 2001-07-24 20:12 dblasby - * added distance(geometry,geometry) and support functions + * [r36] added distance(geometry,geometry) and support functions -2001-07-23 22:53 pramsey +2001-07-23 22:53 Paul Ramsey <pramsey@cleverelephant.ca> - * Apply Norman Vine's Cygwin fix for the loader to compile + * [r35] Apply Norman Vine's Cygwin fix for the loader to compile -2001-07-22 19:00 pramsey +2001-07-22 19:00 Paul Ramsey <pramsey@cleverelephant.ca> - * Fix error in shp2pgsql section. + * [r34] Fix error in shp2pgsql section. -2001-07-21 00:43 pramsey +2001-07-21 00:43 Paul Ramsey <pramsey@cleverelephant.ca> - * Added lines for 0.2 and 0.5 + * [r31] Added lines for 0.2 and 0.5 2001-07-21 00:16 dblasby - * Fixes to single-point-line problem. + * [r30] Fixes to single-point-line problem. -2001-07-21 00:02 pramsey +2001-07-21 00:02 Paul Ramsey <pramsey@cleverelephant.ca> - * Updates for 0.5 release. + * [r29] Updates for 0.5 release. -2001-07-20 23:49 pramsey +2001-07-20 23:49 Paul Ramsey <pramsey@cleverelephant.ca> - * Entered 0.5 change list + * [r28] Entered 0.5 change list -2001-07-20 23:40 pramsey +2001-07-20 23:40 Paul Ramsey <pramsey@cleverelephant.ca> - * First version. + * [r27] First version. -2001-07-20 23:27 pramsey +2001-07-20 23:27 Paul Ramsey <pramsey@cleverelephant.ca> - * Change version numbers + * [r26] Change version numbers -2001-07-20 23:26 pramsey +2001-07-20 23:26 Paul Ramsey <pramsey@cleverelephant.ca> - * Updated to include all new functions and features since release - 0.2 + * [r25] Updated to include all new functions and features since + release 0.2 2001-07-20 18:48 dblasby - * Dumper changes. + * [r24] Dumper changes. -2001-07-20 18:24 pramsey +2001-07-20 18:24 Paul Ramsey <pramsey@cleverelephant.ca> - * Spelling error in makefile. + * [r23] Spelling error in makefile. -2001-07-20 18:23 pramsey +2001-07-20 18:23 Paul Ramsey <pramsey@cleverelephant.ca> - * Fixed dos2unix problem. + * [r22] Fixed dos2unix problem. -2001-07-20 18:21 pramsey +2001-07-20 18:21 Paul Ramsey <pramsey@cleverelephant.ca> - * Added newlines after each begin directive. + * [r21] Added newlines after each begin directive. 2001-07-20 16:10 dblasby - * Added -dump option to produce pg_dump format output. Minor fixes. + * [r20] Added -dump option to produce pg_dump format output. Minor + fixes. -2001-07-20 15:25 pramsey +2001-07-20 15:25 Paul Ramsey <pramsey@cleverelephant.ca> - * Hopefully fixed PGSQL_SRC environment variable test. + * [r19] Hopefully fixed PGSQL_SRC environment variable test. 2001-07-18 22:17 dblasby - * Added function: + * [r18] Added function: point_inside_circle(geometry, Px, Py, d) - returns true if there is a point in geometry whose distance to (Px,Py) is < d -2001-07-18 21:45 pramsey +2001-07-18 21:45 Paul Ramsey <pramsey@cleverelephant.ca> - * Changed loader name to shp2pgsql + * [r17] Changed loader name to shp2pgsql -2001-07-18 21:42 pramsey +2001-07-18 21:42 Paul Ramsey <pramsey@cleverelephant.ca> - * Initial add of the data loader code. + * [r16] Initial add of the data loader code. -2001-07-16 16:53 pramsey +2001-07-16 16:53 Paul Ramsey <pramsey@cleverelephant.ca> - * Added a 'make clean' directive. + * [r15] Added a 'make clean' directive. 2001-06-29 22:32 dblasby - * Fixed bug: must ALWAYS copy input data - never modify it in + * [r14] Fixed bug: must ALWAYS copy input data - never modify it in place. If you do, it'll (unexpectly) update the database. 2001-06-29 00:08 dblasby - * Fix typo in box3d + * [r13] Fix typo in box3d 2001-06-28 23:53 dblasby - * Added force_collection(geometry) + * [r12] Added force_collection(geometry) 2001-06-28 17:52 dblasby - * converting a GEOMETRYCOLLECTION to wkb had the size of the wkb - off by 9 + * [r11] converting a GEOMETRYCOLLECTION to wkb had the size of the + wkb off by 9 bytes (size of the collection header). Fixed. 2001-06-27 21:43 dblasby - * *** empty log message *** + * [r10] *** empty log message *** 2001-06-27 17:28 dblasby - * Initial version of Projection support (currently limited to + * [r9] Initial version of Projection support (currently limited to ellipsoids). -2001-06-26 23:57 pramsey +2001-06-26 23:57 Paul Ramsey <pramsey@cleverelephant.ca> - * Building in non-standard location now requires the PGSQL_SRC + * [r8] Building in non-standard location now requires the PGSQL_SRC environment variable to be set and installs in the build location. 2001-06-26 18:33 dblasby - * Added OGIS support functions and basic constructors. + * [r7] Added OGIS support functions and basic constructors. 2001-06-22 18:13 dblasby - * Altered to point local development library path at right place. + * [r6] Altered to point local development library path at right + place. 2001-06-22 17:39 cvs - * Initial revision + * [r2] Initial revision 2001-06-22 17:39 cvs - * New repository initialized by cvs2svn. + * [r1] New repository initialized by cvs2svn. diff -Nru postgis-1.5.3/GNUmakefile postgis-2.0.1/GNUmakefile --- postgis-1.5.3/GNUmakefile 2010-01-28 15:09:45.000000000 +0000 +++ postgis-2.0.1/GNUmakefile 1970-01-01 00:00:00.000000000 +0000 @@ -1,118 +0,0 @@ -#----------------------------------------------------- -# -# Configuration directives are in postgis_config.h -# -#----------------------------------------------------- - -all: postgis loaderdumper utils - @echo "PostGIS was built successfully. Ready to install." - -install: all postgis-install loaderdumper-install - -uninstall: postgis-uninstall loaderdumper-uninstall docs-uninstall comments-uninstall - -clean: liblwgeom-clean postgis-clean loaderdumper-clean docs-clean test-clean - rm -f postgis.sql postgis_upgrade.sql - -distclean: clean - rm -Rf autom4te.cache - rm -f config.log config.cache config.status - rm -f postgis_config.h - -maintainer-clean: - @echo '------------------------------------------------------' - @echo 'This command is intended for maintainers to use; it' - @echo 'deletes files that may need special tools to rebuild.' - @echo '------------------------------------------------------' - $(MAKE) -C doc maintainer-clean - $(MAKE) -C postgis maintainer-clean - $(MAKE) -C java/jdbc maintainer-clean - $(MAKE) distclean - rm -f configure - -test check: postgis - $(MAKE) -C liblwgeom/cunit check - $(MAKE) -C regress check - -test-clean: - $(MAKE) -C regress clean - -liblwgeom: - $(MAKE) -C liblwgeom - -liblwgeom-clean: - $(MAKE) -C liblwgeom clean - -postgis: liblwgeom - $(MAKE) -C postgis - -postgis-clean: - $(MAKE) -C postgis clean - -postgis-install: - $(MAKE) -C postgis install - -postgis-uninstall: - $(MAKE) -C postgis uninstall - -loaderdumper: - $(MAKE) -C loader - -loaderdumper-clean: - $(MAKE) -C loader clean - -loaderdumper-install: - $(MAKE) -C loader install - -loaderdumper-uninstall: - $(MAKE) -C loader uninstall - -templategis: - $(MAKE) -C extras/template_gis - -templategis-clean: - $(MAKE) -C extras/template_gis clean - -templategis-install: - $(MAKE) -C extras/template_gis install - -templategis-uninstall: - $(MAKE) -C extras/template_gis uninstall - -docs: - $(MAKE) -C doc - -docs-clean: - $(MAKE) -C doc clean - -comments: - $(MAKE) -C doc comments - -comments-install: - $(MAKE) -C doc comments-install - -comments-uninstall: - $(MAKE) -C doc comments-uninstall - -docs-install: - $(MAKE) -C doc install - -docs-uninstall: - $(MAKE) -C doc uninstall - -utils: - $(MAKE) -C utils - -configure: configure.in - ./autogen.sh - -config.status: configure - ./configure - -ChangeLog.svn: - svn2cl --authors=authors.svn -i -o ChangeLog.svn - -astyle: - ./astyle.sh - -.PHONY: utils liblwgeom ChangeLog.svn diff -Nru postgis-1.5.3/GNUmakefile.in postgis-2.0.1/GNUmakefile.in --- postgis-1.5.3/GNUmakefile.in 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/GNUmakefile.in 2012-06-11 18:29:44.000000000 +0000 @@ -0,0 +1,144 @@ +#----------------------------------------------------- +# +# Configuration directives are in postgis_config.h +# +#----------------------------------------------------- + +# todo: add all subdirs +SUBDIRS = liblwgeom libpgcommon postgis regress @RASTER@ @TOPOLOGY@ loader utils @EXTENSIONS@ + +PERL = @PERL@ + +# todo: add more rules here, like uninstall, clean... +all install uninstall noop clean distclean check: + for s in $(SUBDIRS); do \ + echo "---- Making $@ in $${s}"; \ + $(MAKE) -C $${s} $@ || exit 1; \ + done; + @if test x"$@" = xall; then \ + echo "PostGIS was built successfully. Ready to install."; \ + fi + +all: postgis_svn_revision.h + +ifneq ($(XSLTPROC),) +all: comments +endif + +install: all comments-install + +uninstall: docs-uninstall comments-uninstall + +clean: docs-clean clean-local + +clean-local: + rm -f postgis.sql postgis_upgrade.sql + +# TODO: drop 'test' target.. +test: check + +check: all docs-check + +distclean: clean distclean-local + +distclean-local: clean + rm -Rf autom4te.cache + rm -f GNUmakefile + rm -f config.log config.cache config.status + rm -f postgis_config.h + +maintainer-clean: + @echo '------------------------------------------------------' + @echo 'This command is intended for maintainers to use; it' + @echo 'deletes files that may need special tools to rebuild.' + @echo '------------------------------------------------------' + $(MAKE) -C doc maintainer-clean + $(MAKE) -C postgis maintainer-clean + $(MAKE) -C liblwgeom maintainer-clean + $(MAKE) -C java/jdbc maintainer-clean + $(MAKE) distclean + rm -f configure + +garden: + @echo '------------------------------------------------------' + @echo 'Generating SQL file from Documentation' + @echo '------------------------------------------------------' + $(MAKE) -C doc garden + @echo '------------------------------------------------------' + @echo 'Launch regression Test' + @echo '------------------------------------------------------' + $(MAKE) -C regress garden + +templategis: + $(MAKE) -C extras/template_gis + +templategis-clean: + $(MAKE) -C extras/template_gis clean + +templategis-install: + $(MAKE) -C extras/template_gis install + +templategis-uninstall: + $(MAKE) -C extras/template_gis uninstall + +docs: + $(MAKE) -C doc html + +docs-clean: + $(MAKE) -C doc clean + +docs-check: + $(MAKE) -C doc check + +comments: + $(MAKE) -C doc comments + +cheatsheets: + $(MAKE) -C doc cheatsheets + +comments-install: + $(MAKE) -C doc comments-install + +comments-uninstall: + $(MAKE) -C doc comments-uninstall + +docs-install: + $(MAKE) -C doc install + +docs-uninstall: + $(MAKE) -C doc uninstall + +#utils: +# $(MAKE) -C utils + +configure: configure.in + ./autogen.sh + +config.status: configure + ./configure + +ChangeLog.svn: + svn2cl --authors=authors.svn -i -o ChangeLog.svn + +raster-post-install-check: + $(MAKE) -C raster post-install-check + +raster-sql: + $(MAKE) -C raster rtpostgis.sql + +astyle: + ./astyle.sh + +commit: + $(MAKE) astyle && $(MAKE) clean && $(MAKE) check && svn commit + +authors.git: authors.svn + sed -e 's/:/ = /' authors.svn > authors.git + +svnrebase: authors.git + git svn rebase --authors-file authors.git + +postgis_svn_revision.h: + $(PERL) utils/svn_repo_revision.pl + +.PHONY: utils liblwgeom ChangeLog.svn raster postgis_svn_revision.h diff -Nru postgis-1.5.3/LICENSE.TXT postgis-2.0.1/LICENSE.TXT --- postgis-1.5.3/LICENSE.TXT 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/LICENSE.TXT 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,49 @@ +PostGIS Licensing +================== + +This file attempts to include all licenses that apply within the PostGIS +source tree, in particular any that are supposed to be exposed to the end +user for credit requirements for instance. + +PostGIS General +---------------- + +In general PostGIS is licensed under GPL Version 2 terms except on files +where expressly stated otherwise. Please refer to the COPYING file for +licensing details. + +PostGIS has dependencies on other libraries which are not under GPL and +that are commonly distributed with PostGIS core libraries. In general +these are dynamically linked libraries. Libraries are as follows: + +Proj4 - http://proj.osgeo.org -- X/MIT License +GEOS - http://geos.osgeo.org -- LGPL License +LibXML - http://xmlsoft.org/ -- X/MIT License +GDAL - http://gdal.osgeo.org/ -- X/MIT Style License + +Source files included with PostGIS not under GPL +------------------------------------------------ + +-- The following loader/dumper files are derivative works or direct ports +of ShapeLib which is under an X/MIT License: loader/dbfopen,safileio.*, +shapefil.h, shpopen.c + +-- These are under AT&T public domain (someone should probably verify) +loader/getopt.* + +-- Doc/xsl files +These are under a BSD Style license + +The documentation for PostGIS is under a creative commons share-alike +3.0 license. http://creativecommons.org/licenses/by-sa/3.0/ + +Data used in documentation falls in one of the following categories +- Many of the examples in the topology and tiger geocoder section utilize + data from US Census Tiger data 2010 + http://www.census.gov/geo/www/tiger/tgrshp2010/tgrshp2010.html +- data or snapshots generated by community +- many images autogenerated by PostGIS documentation generator (which + utilizes ImageMagick) as described + http://trac.osgeo.org/postgis/wiki/DevWikiDocNewFeature +- PostGIS raster output functions such as the ST_AsPNG etc. +- raster/vector data from MassGIS: http://www.mass.gov/mgis/laylist.htm diff -Nru postgis-1.5.3/MIGRATION postgis-2.0.1/MIGRATION --- postgis-1.5.3/MIGRATION 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/MIGRATION 2012-03-26 13:17:31.000000000 +0000 @@ -0,0 +1,182 @@ +PostGIS 2.0 Migration Guide +=========================== + +PostGIS 2.0 introduces changes that may affect backwards compatibility +for some applications. This document lists those changes. + + +Deprecated Functions Removed +---------------------------- + +Since PostGIS 1.2, we have been encouraging users to use functions with +the ST_ prefix. The ST_ prefixed functions are part of the ISO SQL/MM +standard and used by other spatial SQL databases, so we want to conform +as closely to the industry usage as we can. + +At 2.0, we have finally removed the old functions. If you have an +application that *still* requires the old function signatures, please +look to the legacy_*.sql files to add the old signatures back in. + +If you are using MapServer, upgrade to the latest versions of the 6.0 +or 6.2 releases. For earlier releases, you will have to install the +legacy.sql files. + + +Unknown SRID +------------ + +The "unknown SRID", assigned to geometries when SRID is not specified, +is now 0, not -1. ST_SRID will now return 0 when called on a geometry +with no known SRID. + + +ST_AsBinary, ST_AsText and 3D +----------------------------- + +Previous versions of PostGIS returned 2D versions of objects when +ST_AsBinary and ST_AsText were called. PostGIS 2.0 returns ISO SQL/MM +versions when 3D or 4D objects are used. For example, a 3D point with a +Z dimension will return as 'POINT Z (0 0 0)'. A 4D point will return as +'POINT ZM (0 0 0 0)'. + +For WKB, extra dimensionality is indicated in the type numbers. The Z, +M, and ZM type numbers are indicated by adding 1000, 2000, and 3000 +respectively to the usual 2D type numbers. So, for example, a 2D Point +has a type number of 1. A 4D PointZM has a type number of 3001. A 2D +polygon has a type number of 3. A PolygonZ has a type number of 2003. + + +geometry_columns +---------------- + +In PostGIS 2.0, the ``geometry_columns`` metadata has been changed from +a table to a view. + + * For applications that manage ``geometry_columns`` + using the standard AddGeometryColumn() and other methods, there should + be no change. + + * Applications that have inserted directly into ``geometry_columns`` + will need to either move to the standard functions, or change + their create table syntax to include type/srid/dimensionality + information. + + For example, to specify a 3D feature in WGS84:: + + CREATE TABLE mytable ( + id SERIAL PRIMARY KEY, + g Geometry(PointZ,4326) + ); + + * Applications reading metadata from ``geometry_columns`` should expect + that the geometry type strings will be mixed case and include the + dimensionality modifiers. For example: PointZM, MultiLineStringZ. + + * If you have views built on tables that were built + the old constraint way or that use processing + functions to return new geometries, they will not register correctly + in geometry_columns. They will all appear as Geometry with srid=0. + + In order to fix this, you have to cast the geometries in the view. + So for example, If you had a view that looked like this: + CREATE OR REPLACE VIEW vwparcels AS + SELECT gid, parcel_id, + ST_Transform(geom, 26986) As geom_26986, -- a transformed geometry + geom, --one that used constraints before + ST_Centroid(geom) As cent_geom -- one that used processing function + FROM parcels; + + You will need to drop and recreate the view. + Sadly CREATE OR REPLACE will not work since the casting + makes geometries be treated as a different type as far as + CREATE OR REPLACE is concerned. + + NOTE for this, it might help to lookup in geometry_columns + to see the raw table srid/type + Alternatively you can convert some of your table columns to typmod, + then you would only need to CAST when doing processing. + This however still requires you rebuild your dependent views + DROP VIEW vwparcels; + CREATE OR REPLACE VIEW vwparcels AS + SELECT gid, parcel_id, + ST_Transform(geom, 26986)::geometry(MultiPolygon,26986) + As geom_26986, + geom::geometry(MultiPolygon, 2249) As geom, + ST_Centroid(geom)::geometry(Point,2249) As cent_geom + FROM parcels; + + +Restoring data from prior versions -- GOTCHAS +----------------------------------------------- +The populate_geometry_columns() function in PostGIS 1.5 and below, +used the deprecated functions ndims() and srid() for defining constraints. +As a result these tables will not +restore into a fresh PostGIS 2.0 database unless you + +1) Drop these contraints before you restore the data + +or + +2) Install the legacy functions srid() and ndims() found in the legacy.sql + file before you try to restore these tables. + +Function is not unique after restore +------------------------------------- +After you restore old data into a fresh PostGIS 2.0 database, +YOU MUST install the uninstall_legacy.sql +file after the restore. If you don't you will run into +"function is not unique" errors in your applications. +The other issue with having the old functions is the old functions you +restore will be bound to the old postgis library which is incompatible +with the new postgis geometry structures. + +If you still require legacy functions, you can install the legacy.sql +file after the uninstall_legacy.sql. + +GOTCHA with uninstall_legacy.sql +-------------------------------- +The uninstall_legacy.sql will not be able to uninstall functions and will +output errors detailing objects using these functions that are currently +being used in views and sql functions. + +If you run it in PgAdmin, the whole script will rollback not +uninstalling anything. So you should run it in PSQL mode. +If you get errors in uninstall_legacy.sql -- convert those views and sql +functions to use the newer equivalent functions +and then rerun the script again. + +BENCHMARK NOTES +------------------------------ +Querying a whole geometry_columns table of 200-240 someodd records +(tables/views all constraint based)( On windows 9.1beta2) +Speed for this set of data I'm okay with though a bit slower +I think the main issue why fancy is slower is that to get the fancy name +I need to do a double call to get dims since fancy_name needs dims as well +This I expect to be much faster using typ_mod +SELECT * FROM geometry_columns_v; -- 2063 ms, 1063 ms (using fancy name) +SELECT * FROM geometry_columns_v2; -- 656 ms (this is not using fancy name) + +SELECT * FROM geometry_columns; -- original static table 31ms - 150 ms + +-- Doing single selects of a table +-- constraint based one -- 76ms, 46ms +SELECT * FROM geometry_columns_v where f_table_name = 'streets'; + +-- One I converted to typmod -- 76 ms, 48 ms (first call was slower) +SELECT * FROM geometry_columns_v where f_table_name = 'buildings_1995'; + +--Filter query for schema -- +-- these are constraint based (7 rows) -- 76 ms, 240 ms, 68 ms +SELECT * FROM geometry_columns_v where f_table_schema = 'tiger'; + +-- CONVERTING TO Typmod as I feared is slow for tables with data. + I think it follows the same model +-- as converting varchar(100) to text or varchar(100) to varchar(300) etc. +-- This maybe can be remedied somehow in 9.1 since it hasn't been released +-- (haven't tried doing this exercise in 8.4, 9.0) +-- This took 36,018 ms for table of 350,572 records. +I assume it will be linear with number of records. + +ALTER TABLE buildings_1995 + ALTER COLUMN the_geom TYPE geometry(MultiPolygon,2249); + diff -Nru postgis-1.5.3/Makefile postgis-2.0.1/Makefile --- postgis-1.5.3/Makefile 2006-06-16 14:18:28.000000000 +0000 +++ postgis-2.0.1/Makefile 2012-02-27 22:08:12.000000000 +0000 @@ -2,7 +2,7 @@ # this file copied and adapted from PostgreSQL source # to allow easy build on BSD systems -all install uninstall clean distclean maintainer-clean test check docs docs-install docs-uninstall utils: +all install uninstall clean distclean maintainer-clean test check docs docs-install docs-uninstall utils: GNUmakefile @IFS=':' ; \ for dir in $$PATH; do \ for prog in gmake gnumake make; do \ @@ -20,3 +20,9 @@ echo "You must use GNU make to build PostGIS." ; \ false; \ fi + +configure: configure.in + ./autogen.sh + +GNUmakefile: GNUmakefile.in + ./configure diff -Nru postgis-1.5.3/NEWS postgis-2.0.1/NEWS --- postgis-1.5.3/NEWS 2011-06-25 16:27:43.000000000 +0000 +++ postgis-2.0.1/NEWS 2012-06-22 20:51:25.000000000 +0000 @@ -1,3 +1,163 @@ +PostGIS 2.0.1 +2012/06/22 + +* Bug Fixes * + + - #1264, fix st_dwithin(geog, geog, 0). + - #1468 shp2pgsql-gui table column schema get shifted + - #1694, fix building with clang. (vince) + - #1708, improve restore of pre-PostGIS 2.0 backups. + - #1714, more robust handling of high topology tolerance. + - #1755, ST_GeographyFromText support for higher dimensions. + - #1759, loading transformed shapefiles in raster enabled db. + - #1761, handling of subdatasets in NetCDF, HDF4 and HDF5 in raster2pgsql. + - #1763, topology.toTopoGeom use with custom search_path. + - #1766, don't let ST_RemEdge* destroy peripheral TopoGeometry objects. + - #1774, Clearer error on setting an edge geometry to an invalid one. + - #1775, ST_ChangeEdgeGeom collision detection with 2-vertex target. + - #1776, fix ST_SymDifference(empty, geom) to return geom. + - #1779, install SQL comment files. + - #1782, fix spatial reference string handling in raster. + - #1789, fix false edge-node crossing report in ValidateTopology. + - #1790, fix toTopoGeom handling of duplicated primitives. + - #1791, fix ST_Azimuth with very close but distinct points. + - #1797, fix (ValidateTopology(xxx)).* syntax calls. + - #1805, put back the 900913 SRID entry. + - #1813, Only show readable relations in metadata tables. + - #1819, fix floating point issues with ST_World2RasterCoord and + ST_Raster2WorldCoord variants. + - #1820 compilation on 9.2beta1. + - #1822, topology load on PostgreSQL 9.2beta1. + - #1825, fix prepared geometry cache lookup + - #1829, fix uninitialized read in GeoJSON parser + - #1834, revise postgis extension to only backup + user specified spatial_ref_sys + - #1839, handling of subdatasets in GeoTIFF in raster2pgsql. + - #1840, fix logic of when to compute # of tiles in raster2pgsql. + - #1851, fix spatial_ref_system parameters for EPSG:3844 + - #1857, fix failure to detect endpoint mismatch in ST_AddEdge*Face* + - #1865, data loss in postgis_restore.pl when data rows have leading + dashes. + - #1867, catch invalid topology name passed to topogeo_add* + - #1870, align the docs and actual behavior of raster's ST_Intersects + - #1872, fix ST_ApproxSummarystats to prevent division by zero + - #1873, fix ptarray_locate_point to return interpolated Z/M values for + on-the-line case + - #1875, ST_SummaryStats returns NULL for all parameters except count + when count is zero + +* Enhancements * + + - More detailed exception message from topology editing functions. + - #1786, improved build dependencies + - #1806, speedup of ST_BuildArea, ST_MakeValid and ST_GetFaceGeometry. + - #1812, Add lwgeom_normalize in LIBLWGEOM for more stable testing. + +PostGIS 2.0.0 +2012/04/03 + +* Important / Breaking Changes * + + - Upgrading to PostGIS 2.0 REQUIRES a dump and restore. See the + "Hard Upgrade" section of the documentation. + - Functions deprecated during the 1.X series (mostly non-ST variants) + have been removed. Update your application to the new signatures. + If you cannot update your application, see the legacy.sql file + to enable the old signatures. + - GEOMETRY_COLUMNS is now a view, not a table. Code that manually + updates the table must be changed to either use the management + functions (eg AddGeometryColumn) or the new geometry typmod options + (eg CREATE TABLE t (g GEOMETRY(Polgyon, 4326))) + - ST_AsBinary and ST_AsText now return 3D/4D results in ISO SQL/MM + format when called on 3D/4D features. + - The "unknonwn SRID" is now 0, not -1. + (eg ST_SRID(ST_GeomFromText('POINT(0 0)')) returns 0) + - ST_NumGeometries returns 1 for singletons. ST_GeometryN returns the + the geometry for singletons. + - probe_geometry_columns(), rename_geometry_table_constraints(), + fix_geometry_columns(), have been removed since GEOMETRY_COLUMNS + is now a view. + - 3D analysis functions are now named with "3D" as a prefix + instead of a suffix (eg ST_Length3D has become ST_3DLength) + +* New Features * + + - KNN Gist index based centroid (<->) and box (<#>) distance + operators (Paul Ramsey / funded by Vizzuality) + - PostgreSQL 9.1+ "extension" support (Regina Obe) + - Typmod support for geometry (Paul Ramsey) + - Support for TIN and PolyHedralSurface (Olivier Courtin / Oslandia) + - Raster support integrated and documented + (Pierre Racine, Jorge Arévalo, Mateusz Loskot, Sandro Santilli, + Regina Obe, David Zwarg) + (Company developer and funding: University Laval, Deimos Space, CadCorp, + Michigan Tech Research Institute, Paragon Corporation, Azavea) + - N-Dimensional spatial indexes (Paul Ramsey / OpenGeo) + - Topology support improved, documented, testing, bug fixes + (Sandro Santilli / Faunalia for RT-SIGTA, Regina Obe, Andrea Peri, + Jose Carlos Martinez Llari) + - 3D relationship support functions (Nicklas Avèn) + ST_3DDistance, ST_3DClosestPoint, ST_3DIntersects, + ST_3DShortestLine + - ST_Split (Sandro Santilli / Faunalia for RT-SIGTA) + - ST_Node (Sandro Santilli) + - ST_isValidDetail (Sandro Santilli / Faunalia for RT-SIGTA) + - ST_MakeValid (Sandro Santilli / Faunalia for RT-SIGTA) + - ST_RemoveRepeatedPoints (Sandro Santilli / Faunalia for RT-SIGTA) + - ST_GeometryN and ST_NumGeometries support for non-collections + (Sandro Santilli) + - ST_IsCollection (Sandro Santilli, Maxime van Noppen) + - ST_SharedPaths (Sandro Santilli / Faunalia for RT-SIGTA) + - ST_Snap (Sandro Santilli) + - ST_RelateMatch (Sandro Santilli / Faunalia for RT-SIGTA) + - ST_ConcaveHull (Regina Obe and Leo Hsu / Paragon Corporation) + - ST_UnaryUnion (Sandro Santilli) + - ST_Relate with boundary node rule (Sandro Santilli / Faunalia for RT-SIGTA) + - ST_AsX3D (Regina Obe / Arrival 3D) + - ST_OffsetCurve (Sandro Santilli, Rafal Magda) + - ST_GeomFromGeoJSON (Kashif Rasul, Paul Ramsey / Vizzuality) + - ST_AsBinary byte endian support for geography + +* Enhancements * + + - Made loader tolerant of truncated multibyte values found + in some free worldwide shapefiles (Sandro Santilli) + - Lots of bug fixes and enhancements to shp2pgsql + Beefing up regression tests for loaders + Reproject support for both geometry and geography during import + (Jeff Adams / Azavea, Mark Cave-Ayland) + - pgsql2shp conversion from predefined list + (Loic Dachary / Mark Cave-Ayland) + - Shp-pgsql GUI - support loading multiple files. (Mark Leslie) + - Shp-pgsql GUI - support exporting multiple tablee. (Mark Cave-Ayland) + - Extras - upgraded tiger_geocoder from using old TIGER format + to use new TIGER shp and file structure format (Stephen Frost) + - Enhancements and documentation of TIGER geocoder + (Regina Obe, Leo Hsu / Paragon Corporation / + funding provided by Hunter Systems Group) + - Documentation proofreading and corrections. (Kasif Rasul) + +* All Fixes and Enhancements * + + - http://trac.osgeo.org/postgis/query?status=closed&milestone=PostGIS+2.0.0 + +* Acknowledgements * + + We are most indebted to the numerous members in the PostGIS community + who were brave enough to TEST out the new features in this release. + No major release can be successful without lots of testing. + Below is an incomplete list of some of the many folks who helped + us get to this release. + + - Andrea Peri - Lots of testing on topology, checking for correctness + - Andreas Forø Tollefsen - raster testing + - Chris English - topology stress testing loader functions + - Salvatore Larosa - Lots of topology testing + - Brian Hamlin - Benchmarking, general testing all components + - Mike Pease - Tiger geocoder testing, very detailed reports of issues + - Tom van Tilburg - raster testing + + PostGIS 1.5.3 2011/06/25 @@ -11,7 +171,7 @@ (Sandro Santilli, reported by Birgit Laggner) - #940, support for PostgreSQL 9.1 beta 1 (Regina Obe, Paul Ramsey, patch submitted by stl) - - #845, ST_Intersects precision error (Sandro Santilli, Nicklas Avén) + - #845, ST_Intersects precision error (Sandro Santilli, Nicklas Avén) Reported by cdestigter - #884, Unstable results with ST_Within, ST_Intersects (Chris Hodgson) - #779, shp2pgsql -S option seems to fail on points (Jeff Adams) @@ -26,7 +186,7 @@ - #573 ST_Union fails on a group of linestrings Not a PostGIS bug, fixed in GEOS 3.3.0 - #457 ST_CollectionExtract returns non-requested type - (Nicklas Avén, Paul Ramsey) + (Nicklas Avén, Paul Ramsey) - #441 ST_AsGeoJson Bbox on GeometryCollection error (Olivier Courtin) - #411 Ability to backup invalid geometries (Sando Santilli) Reported by Regione Toscana @@ -34,8 +194,7 @@ Reported by Sdikiy - #373 Documentation syntax error in hard upgrade (Paul Ramsey) Reported by psvensso - - + PostGIS 1.5.2 2010/09/27 @@ -46,7 +205,7 @@ - Loader: fix handling of empty (0-verticed) geometries in shapefiles. (Sandro Santilli) - #536, Geography ST_Intersects, ST_Covers, ST_CoveredBy and - Geometry ST_Equals not using spatial index (Regina Obe, Nicklas Avén) + Geometry ST_Equals not using spatial index (Regina Obe, Nicklas Avén) - #573, Improvement to ST_Contains geography - Loader: Add support for command-q shutdown in Mac GTK build (Paul Ramsey) - #393, Loader: Add temporary patch for large DBF files @@ -109,8 +268,7 @@ (Paul Ramsey) - Ensure support for upcoming 9.0 PgSQL release (Paul Ramsey) - - + PostGIS 1.5.0 2010/02/04 @@ -127,9 +285,9 @@ - Added Hausdorff distance calculations (#209) (Vincent Picavet) - Added parameters argument to ST_Buffer operation to support one-sided buffering and other buffering styles (Sandro Santilli) - - Performance improvements to ST_Distance (Nicklas Avén) + - Performance improvements to ST_Distance (Nicklas Avén) - Addition of other Distance related visualization and analysis - functions (Nicklas Avén) + functions (Nicklas Avén) - ST_ClosestPoint - ST_DFullyWithin - ST_LongestLine @@ -191,7 +349,7 @@ GEOS 3.1+ (Paul Ramsey) - ST_ContainsProperly() requires GEOS 3.1+ - ST_Intersects(), ST_Contains(), ST_Within() use high-speed cached - prepared geometry against GEOS 3.1+ (Paul Ramsey) + prepared geometry against GEOS 3.1+ (Paul Ramsey / funded by Zonar Systems) - Vastly improved documentation and reference manual (Regina Obe & Kevin Neufeld) - Figures and diagram examples in the reference manual (Kevin Neufeld) @@ -249,7 +407,7 @@ (Mark Cave-Ayland, Mark Leslie) - Enhancement Trac#34 - pgsql2shp now creates .prj files where applicable (Regina Obe) - Fix Trac#88 - Windows Vista pgsql2shp memory bug (Regina Obe) - - Fix Trac#146 - for distance calculation on collections (Nicklas Avén, Paul Ramsey) + - Fix Trac#146 - for distance calculation on collections (Nicklas Avén, Paul Ramsey) - Fix Trac#116 - crashers for rare EWKB cases (Paul Ramsey) - Fix to address an SRID of -1 in probe_geometry_columns (Kevin Neufeld) - Fix Trac#99 shp2pgsql logical error when importing DBF-only (Regina Obe) diff -Nru postgis-1.5.3/README.postgis postgis-2.0.1/README.postgis --- postgis-1.5.3/README.postgis 2011-06-25 16:27:43.000000000 +0000 +++ postgis-2.0.1/README.postgis 2012-06-22 20:51:25.000000000 +0000 @@ -1,253 +1,286 @@ PostGIS - Geographic Information Systems Extensions to PostgreSQL -~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +================================================================= -VERSION: 1.5.3 (2011/06/25) +:Version: 2.0.1 +:Date: 2012-06-22 +:Website: http://postgis.org -MORE INFORMATION: http://postgis.refractions.net +This distribution contains a module which implements GIS simple features, ties +the features to R-tree indexing, and provides many spatial functions for +accessing and analyzing geographic data. -This distribution contains a module which implements GIS simple -features, ties the features to rtree indexing, and provides some -spatial functions for accessing and analyzing geographic data. +Directory structure:: -Directory structure: - - ./ Build scripts and install directions. - ./liblwgeom LWGEOM access library. - ./postgis PostGIS library source code. + ./ Build scripts and install directions + ./doc PostGIS Documentation + ./extensions Support for the PostgreSQL 9.1+ Extensions framework + ./extras Various pieces that didn't belong to mainstream + (package management specfiles, WFS_locks, sample WKB parser) ./java/ejb EJB Java support ./java/jdbc Extensions to the PostgreSQL JDBC drivers to support - the GIS objects. - ./java/pljava PostgreSQL PL/Java spatial object support - ./doc PostGIS Documentation - ./loader A program to convert ESRI Shape files into SQL text - suitable for uploading into a PostGIS/PostgreSQL database - and a program for converting PostGIS spatial tables into - Shape files. + the GIS objects + ./liblwgeom LWGEOM geometry library + ./libpgcommon PostGIS library to bridge LWGEOM to PostgreSQL + ./loader A program to convert ESRI Shape files into SQL text suitable + for uploading into a PostGIS/PostgreSQL database and a program + for converting PostGIS spatial tables into shapefiles + ./postgis PostGIS library source code + ./raster PostGIS rasters extension source code + ./regress Online regression tests + ./topology PostGIS topology extension source code ./utils Utility scripts for PostGIS (upgrade, profiling, ...) - ./extras Various pieces that didn't belong to mainstream - (package management specfiles, WFS_locks, sample wkb parser) - ./regress Regression tests - + REQUIREMENTS ------------ -PostGIS is compatible with PostgreSQL 8.3 and above. +PostGIS is compatible with PostgreSQL 8.4 and above. -You *must* have the full PostgreSQL - including server headers - installed -for this to work. +You *must* have the full PostgreSQL - including server headers - installed for +this to work. -* PROJ4 SUPPORT (Required, Version 4.5.0 or better): +* PROJ4 (Required, Version 4.6.0 or higher): - The Proj4 reprojection library is required if you want to use the - transform() function to reproject features within the database. + The PROJ4 catographic projection library is required if you want to use the + ST_Transform() function to reproject features within the database. http://trac.osgeo.org/proj/ -* SPATIAL PREDICATE / GEOS SUPPORT (Required, Version 3.1.1 or better): +* GEOS (Required, Version 3.2.2 or higher): - The GEOS library provides support for exact topological tests - such as Touches(), Contains(), Disjoint() and spatial operations - such as Intersection(), Union() and Buffer(). + The GEOS library provides support for exact topological tests such as + ST_Touches(), ST_Contains(), ST_Disjoint() and spatial operations such as + ST_Intersection(), ST_Union() and ST_Buffer(). GEOS 3.3.2 or higher is + recommended. http://trac.osgeo.org/geos/ -* XML SUPPORT (Required): +* XML SUPPORT (Required, Version 2.5.0 or higher): - The LibXML2 library is required to use the ST_GeomFromGML() and + The LibXML2 library is required to use the ST_GeomFromGML() and ST_GeomFromKML() functionality. http://xmlsoft.org/ +* GNU gettext + + The loader, and hence PostGIS, requires GNU gettext 0.14 or higher + (typically in libc on GNU/Linux, in which case 0.17 is required). + +* JSON-C (Required, Version 0.9 or higher) + + JSON-C is used to import GeoJSON via the function ST_GeomFromGeoJson(). + + http://oss.metaparadigm.com/json-c/. + + You can get it installed in apt-based systems using:: + + apt-get install libjson0-dev + +* GDAL (Optional, Version 1.6.0 or higher) + + GDAL (http://gdal.org) is *required* if you want to compile PostGIS + with raster support. To compile without raster support you + must ``./configure --without-raster`` + CONFIGURATION ------------- -To configure PostGIS, run: - +To configure PostGIS, run:: + ./configure The results of the configuration can be easily seen within the -postgis_config.h file. +``postgis_config.h`` file. + +If ``pg_config`` can't be found in your ``$PATH`` configure will complain +and refuse to proceed. You can specify it using the +``--with-pgconfig=/path/to/pg_config`` flag. + +If PROJ4 has been installed but cannot be found, configure will complain and +refuse to proceed. You can specify an alternative installation directory using +the ``--with-projdir=DIR`` option. + +If GEOS has been installed but cannot be found, configure will complain and +refuse to proceed. You can specify an alternative ``geos-config`` file using +the ``--with-geosconfig=/path/to/geos-config`` option. + +If GDAL cannot be found, configure will complain and refuse to proceed. +You can either procede without raster support using ``--without-raster`` +or use ``--with-gdalconfig=/path/to/gdal-config`` option. -If pg_config can't be found in your $PATH configure will complain -and refuse to proceed. You can specify it using the ---with-pgconfig=/path/to/pg_config flag. - -If PROJ4 has been installed (but cannot be found), configure will -complain and refuse to proceed. You can specify an alternative -installation directory using the --with-projdir=DIR option. - -If GEOS has been installed (but cannot be found), configure will -complain and refuse to proceed. You can specify an alternative -geos-config file using the --with-geosconfig=/path/to/geos-config -option. +By default, both Topology and Raster extensions are enabled in ``./configure``. + +If you want to compile PostGIS *without* Raster support, you must provide the +``--without-raster`` option. + +If you want to compile PostGIS *without* Topology support, you must provide the +``--without-topology`` option. + +See ``./configure --help`` for more options. -See ./configure --help for more options. BUILD ----- -PostGIS uses the GNU make (aka gmake) for building. -To build PostGIS library and utilities, as postgres run: +PostGIS uses the GNU make (aka gmake) for building. To build PostGIS library +and utilities, as postgres run:: make + TESTING ------- -You want to run regress tests before installation. -To do so, as postgres run: +You want to run regress tests before installation. To do so, as postgres run:: + + make check - make check +The above will create a test database with PostGIS extensions, run tests and +then drop the test database. -The above will create a test database with postgis extensions, -run tests and then drop the db. +Final lines of output contain a summary of test results: run, succeeded, +failed. If you have any failure please file a bug report using the online bug +tracker: http://trac.osgeo.org/postgis/report/3 -Final lines of output contain a summary of test results: -run, succeeded, failed. If you have any failure please -file a bug report using the online bug tracker: -http://trac.osgeo.org/postgis/report/3. - INSTALLATION ------------ -To install PostGIS library and utilities, as postgres run: +To install PostGIS library and utilities, as root run:: make install +Installation paths will typically be derived by ``pg_config``: -Installation paths will typically be derived by ``pg_config'': + - Lib in ``pg_config --pkglibdir`` + - Binaries (loader/dumper) in ``pg_config --bindir`` + - Important support files in ``[prefix]/share/contrib`` + - Manual pages in ``[prefix]/man`` + - Documentation in in ``[prefix]/share/doc`` - - Lib in `pg_config --pkglibdir` - - Binaries (loader/dumper) in `pg_config --bindir` - - Important support files in [prefix]/share/contrib - - Manual pages in [prefix]/man - - Documentation in in [prefix]/share/doc +Where `[prefix]` above is extracted from ``pg_config --configure``. -Where [prefix] above is extracted by `pg_config --configure`. +You can change them using ``./configure`` switches. See CONFIGURATION section. -You can change them using ./configure switches. -See CONFIGURATION section. CREATING NEW SPATIAL DATABASES ------------------------------ -PostGIS support must be enabled for each database that requires -its usage. This is done by feeding the postgis.sql (the enabler script) -file to the target database. - -The enabler script requires the PL/pgSQL procedural language in order -to operate correctly, you can use the 'createlang' program from the -PostgreSQL installation. +PostGIS support must be enabled for each database that requires its usage. +This is done by feeding the ``postgis.sql`` (the enabler script) file to the +target database. + +The enabler script requires the PL/pgSQL procedural language in order to +operate correctly, you can use the ``createlang`` program from the PostgreSQL +installation. + (The PostgreSQL Programmer's Guide has details if you want to do this manually for some reason.) -So, as postgres run: +So, as postgres run:: createlang plpgsql <yourdatabase> psql -f postgis/postgis.sql -d <your_database> Your database should now be spatially enabled. + +ADDING RASTER SUPPORT TO A SPATIAL DATABASE +------------------------------------------- + +To enable raster support you must first load the ``postgis.sql`` file. +You can then load the ``rtpostgis.sql`` file. + + psql -f postgis/rtpostgis.sql -d <your_database> + + UPGRADING EXISTING SPATIAL DATABASES ------------------------------------ -Upgrading existing spatial databases can be tricky as it requires -replacement or introduction of new PostGIS object definitions. +Upgrading existing spatial databases can be tricky as it requires replacement +or introduction of new PostGIS object definitions. + +Unfortunately not all definitions can be easily replaced in a live database, so +sometimes your best bet is a dump/reload process. + +PostGIS provides a SOFT UPGRADE procedure for minor or bugfix releases, and an +HARD UPGRADE procedure for major releases. -Unfortunately not all definitions can be easily replaced in -a live database, so sometimes your best bet is a dump/reload -process. - -PostGIS provides a SOFT UPGRADE procedure for minor or bugfix -releases, and an HARD UPGRADE procedure for major releases. - ---- SOFT UPGRADE --- - - -Soft upgrade consists of sourcing the postgis_upgrade_*.sql -script in your spatial database: - - * postgis_upgrade_13_to_15.sql, upgrade a 1.3.x database - to 1.5 - * postgis_upgrade_15_to_15.sql, upgrade a 1.4.x database - to 1.5 - * postgis_upgrade_16_minor.sql, upgrade a 1.5.x database - to the latest minor release - -If a soft upgrade is not possible the script will abort and -no harm will be done. You can then move on to the -HARD UPGRADE process. Always try a soft upgrade first, they -are much simpler. - ---- HARD UPGRADE --- - -Hard upgrade is a PostgreSQL dump/restore procedure combined -with a filter to selectively update PostGIS functions and -objects to point to a new library version. - -Hard upgrades are required when object definitions have changed, -aggregates have changed or been added, and when the underlying -PostgreSQL database itself has undergone a major update. - -For this purpose, PostGIS provides a utility script to restore a dump -in "custom" format. The hard upgrade procedure is as follows: - - # Create a "custom-format" dump of the database you want - # to upgrade (let's call it "olddb") - $ pg_dump -Fc olddb olddb.dump - - # Restore the dump while upgrading postgis into - # a new database. - # Note: The new database does NOT have to exist. - # Let's call it "newdb" - $ sh utils/postgis_restore.pl postgis.sql newdb olddb.dump > restore.log - - # Check that all restored dump objects really had to be - # restored from dump and do not conflict with the - # ones defined in postgis.sql - $ grep ^KEEPING restore.log | less - - # If upgrading from PostgreSQL < 8.0 to >= 8.0 you will want to - # drop the attrelid, varattnum and stats columns in the geometry_columns - # table, which are no-more needed. Keeping them won't hurt. - # !!! DROPPING THEM WHEN REALLY NEEDED WILL DO HARM !!!! - $ psql newdb -c "ALTER TABLE geometry_columns DROP attrelid" - $ psql newdb -c "ALTER TABLE geometry_columns DROP varattnum" - $ psql newdb -c "ALTER TABLE geometry_columns DROP stats" - - # The spatial_ref_sys table is restored from the dump, to - # ensure your custom additions are kept, but the distributed - # one might contain modification so you should backup your - # entries, drop the table and source the new one. - # If you did make additions we assume you know how to backup them before - # upgrading the table. Replace it with the new like this: - $ psql newdb - newdb=> DELETE FROM spatial_ref_sys; - DROP - newdb=> \i spatial_ref_sys.sql +SOFT UPGRADE +~~~~~~~~~~~~ + +Soft upgrade consists of sourcing the ``postgis_upgrade_*.sql`` script in your +spatial database: + + * ``postgis_upgrade_13_to_15.sql``, upgrade a 1.3.x database to 1.5 + * ``postgis_upgrade_15_to_15.sql``, upgrade a 1.4.x database to 1.5 + * ``postgis_upgrade_16_minor.sql``, upgrade a 1.5.x database to the latest + minor release + +If a soft upgrade is not possible the script will abort and no harm will be +done. You can then move on to the HARD UPGRADE process. Always try a soft +upgrade first; they are much simpler. + +HARD UPGRADE +~~~~~~~~~~~~ + +Hard upgrade is a PostgreSQL dump/restore procedure combined with a filter to +selectively update PostGIS functions and objects to point to a new library +version. + +Hard upgrades are required when object definitions have changed, aggregates +have changed or been added, and when the underlying PostgreSQL database itself +has undergone a major update. + +For this purpose, PostGIS provides a utility script to restore a dump in +"custom" format. The hard upgrade procedure is as follows:: + + # [1] Create a "custom-format" dump of the database you want + # to upgrade (let's call it "olddb") + $ pg_dump -Fc -f olddb.dump olddb + + # [2] Do a fresh install of PostGIS in a new database + # (let's call it "newdb"). + # Refer to CREATING NEW SPATIAL DATABASES for instructions + + # [3] Restore the dump into your new database. + $ perl utils/postgis_restore.pl -v olddb.dump \ + 2> restore.log | psql newdb 2> errors.log + +The ``spatial_ref_sys`` entries found in your dump will be restored, but they +will not override existing ones in ``spatial_ref_sys``. This is to ensure that +fixes in the official set will be properly propagated to restored databases. +If for any reason you really want your own overrides of standard entries just +don't load the ``spatial_ref_sys.sql`` file when creating the new database. + +If your database is really old or you know you've been using long deprecated +functions in your views and functions, you might need to load ``legacy.sql`` +before restoring the dump for all your functions and views etc. to properly +come back. Only do this if *really* needed. Consider upgrading your views and +functions before dumping instead, if possible. The deprecated functions can be +later removed by loading ``uninstall_legacy.sql``. USAGE ----- -Try the following example SQL statements to create non-OpenGIS tables and -geometries: +Try the following example SQL statements to create non-OpenGIS tables and +geometries:: - CREATE TABLE geom_test ( gid int4, geom geometry,name varchar(25) ); - INSERT INTO geom_test ( gid, geom, name ) + CREATE TABLE geom_test ( gid int4, geom geometry, name varchar(25) ); + INSERT INTO geom_test ( gid, geom, name ) VALUES ( 1, 'POLYGON((0 0 0,0 5 0,5 5 0,5 0 0,0 0 0))', '3D Square'); - INSERT INTO geom_test ( gid, geom, name ) + INSERT INTO geom_test ( gid, geom, name ) VALUES ( 2, 'LINESTRING(1 1 1,5 5 5,7 7 5)', '3D Line' ); INSERT INTO geom_test ( gid, geom, name ) VALUES ( 3, 'MULTIPOINT(3 4,8 9)', '2D Aggregate Point' ); SELECT * from geom_test WHERE geom && 'BOX3D(2 2 0,3 3 0)'::box3d; -The following SQL creates proper OpenGIS entries in the SPATIAL_REF_SYS -and GEOMETRY_COLUMNS tables, and ensures that all geometries are created -with an SRID. +The following SQL creates proper OpenGIS entries in the ``SPATIAL_REF_SYS`` +and ``GEOMETRY_COLUMNS`` tables, and ensures that all geometries are created +with an SRID:: INSERT INTO SPATIAL_REF_SYS ( SRID, AUTH_NAME, AUTH_SRID, SRTEXT ) VALUES @@ -270,31 +303,37 @@ name VARCHAR(32) ); - SELECT AddGeometryColumn('db','geotest','geopoint',1,'POINT',2); + SELECT AddGeometryColumn('db', 'geotest', 'geopoint', 1, 'POINT', 2); INSERT INTO geotest (id, name, geopoint) - VALUES (1, 'Olympia', GeometryFromText('POINT(-122.90 46.97)',1)); + VALUES (1, 'Olympia', ST_GeomFromText('POINT(-122.90 46.97)', 1)); INSERT INTO geotest (id, name, geopoint) - VALUES (2, 'Renton', GeometryFromText('POINT(-122.22 47.50)',1)); + VALUES (2, 'Renton', ST_GeomFromText('POINT(-122.22 47.50)', 1)); - SELECT name,AsText(geopoint) FROM geotest; + SELECT name, AsText(geopoint) FROM geotest; ---- Spatial Indexes --- +Spatial Indexes +~~~~~~~~~~~~~~~ -PostgreSQL provides support for GiST spatial indexing. The GiST scheme offers -indexing even on large objects, using a system of "lossy" indexing where -a large object is proxied by a smaller one in the index. In the case -of the PostGIS indexing system, all objects are proxied in the index by -their bounding boxes. +PostgreSQL provides support for GiST spatial indexing. The GiST scheme offers +indexing even on large objects, using a system of "lossy" indexing where a +large object is proxied by a smaller one in the index. In the case of the +PostGIS indexing system, all objects are proxied in the index by their +bounding boxes. -You can build a GiST index with: +You can build a GiST index with:: - CREATE INDEX <indexname> - ON <tablename> + CREATE INDEX <indexname> + ON <tablename> USING GIST ( <geometryfield> ); -Always run the "VACUUM ANALYZE <tablename>" on your tables after -creating an index. This gathers statistics which the query planner -uses to optimize index usage. +Always run the ``VACUUM ANALYZE <tablename>`` on your tables after creating an +index. This gathers statistics which the query planner uses to optimize index +usage. + + +PostGIS Topology support +~~~~~~~~~~~~~~~~~~~~~~~~ +See topology/README for more informations about topology support. diff -Nru postgis-1.5.3/TODO postgis-2.0.1/TODO --- postgis-1.5.3/TODO 2010-01-23 23:29:07.000000000 +0000 +++ postgis-2.0.1/TODO 2012-03-07 08:17:41.000000000 +0000 @@ -1,28 +1,14 @@ -$Id: TODO 5159 2010-01-23 23:29:07Z nicklas $ +$Id: TODO 9415 2012-03-07 08:17:41Z strk $ == Simple Projects == -* ST_CleanGeometry(geometry) - Attempt to make invalid geometry valid -* ST_SplitGeometry(polygon, line) returns components of polygon -* ST_SplitGeometry(lineA, lineB) returns components of lineA -* ST_SplitGeometry(line, point) returns components of line * ST_AverageDistance(g1 geometry, g2 geometry, nsamples integer) returns double Sum of minimum distances at regular intervals up two geometries, divided by the number of samples. -* ST_GeomFromGeoJSON(string) returns geometry. Ingests JSON geometry parts only. * ST_LatitudeFromText(string) returns float, LongitudeFromText(string) returns float for things like 132W 23' 23", or 45N 23.41232', or 123.14123W, etc, etc, etc. -* ST_AsLatLonText(<point>, [formatstring]) returns string. - Format string could use DD DD.DD MM MM.MM SS SSSS.SSS style - tokens and allow anything else (E, W, ", ', degree sign) - to be interleaved within. -* ST_DumpPoints(g1 geometry) returns setof geometry_dump - Similar in concept to ST_Dump and ST_DumpRings will output a - geometry_dump array for any geometry where each geometry is a point - and path info to denote the locaiton/subgeometry it is located in. - (C-version TODO) +* Port ST_DumpPoints(geometry) to C == Larger projects == @@ -57,33 +43,10 @@ The solution is to cut up the large features into smaller features. Some standard utilities for doing so are required. --- Topology -- - -Expand on the existing topology experiment, in particular buiding topologies -from existing POLYGON and MULTIPOLYGON "coverages" (simple feature collections -that have an expectation of no overlaps or gaps). - --- GEOMETRY_COLUMNS -- - -Add the maintenance of GEOMETRY_COLUMNS to the "ANALYZE" operation, so that -an ANALYZE automatically removes orphaned rows from GEOMETRY_COLUMNS and -adds entries for new rows. - --- typmod support -- - -Allow geometry(srid, type) constructors to automatically fill out GEOMETRY_COLUMNS and constraints. - -- Estimated Extent -- Fast extent estimation based on reading the head of the R-Tree. --- Nearest Neighbor -- - -Fast nearest neighbor searching based on traversing the R-Tree. -See, - http://citeseer.ist.psu.edu/roussopoulos95nearest.html - http://citeseer.ist.psu.edu/91356.html - -- Heat Map / Clustering -- Given a set of points, generate a heat map output. Or, given a set of points, generate a clustering and set of representative points. In general, extract a trend from a collection. @@ -92,16 +55,3 @@ A new object type to hold point cloud information in chunks < page size, filter functions to extract subsets of points from those types based on LIDAR-specific requests ("only return type 1"), and union functions to build complete sets from subsets. Index bindings (likely 3d) for searching. Potentially processing functions to extract surfaces or derived products like contours. -== Breaking Changes == - -* Consume and emit ISO standard WKT and WKB for extended dimensionality. - Deprecate "EWKT" concept. Consuming is non-breaking change, emitting is - breaking change. - WKT example: POINT Z (0 0 0), POINT M (0 0 0), POINT ZM (0 0 0 0) - WKB uses different numbering for Z/M variants than EWKB does -* Convert the "default SRID" from -1 to 0 -* Convert the LWGEOM struct(s) to have enough padding that the coordinates - are double-aligned and can be accessed directly as doubles on all - architectures -* Support all typologies of EMPTY (POINT EMPTY, LINESTRING EMPTY) instead - of just using GEOMETRYCOLLECTION EMPTY all the time. diff -Nru postgis-1.5.3/Version.config postgis-2.0.1/Version.config --- postgis-1.5.3/Version.config 2011-06-25 16:29:20.000000000 +0000 +++ postgis-2.0.1/Version.config 2012-06-22 20:51:25.000000000 +0000 @@ -3,7 +3,7 @@ # See HOWTO_RELEASE file in SVN for definitions of those three. -POSTGIS_MAJOR_VERSION=1 -POSTGIS_MINOR_VERSION=5 -POSTGIS_MICRO_VERSION=3 +POSTGIS_MAJOR_VERSION=2 +POSTGIS_MINOR_VERSION=0 +POSTGIS_MICRO_VERSION=1 diff -Nru postgis-1.5.3/aclocal.m4 postgis-2.0.1/aclocal.m4 --- postgis-1.5.3/aclocal.m4 2011-06-25 16:29:39.000000000 +0000 +++ postgis-2.0.1/aclocal.m4 2012-06-22 21:04:17.000000000 +0000 @@ -1,7 +1,8 @@ -# generated automatically by aclocal 1.11.1 -*- Autoconf -*- +# generated automatically by aclocal 1.11.2 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, +# Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,10 +12,48 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. +# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, +# Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# AM_PROG_MKDIR_P +# --------------- +# Check for `mkdir -p'. +AC_DEFUN([AM_PROG_MKDIR_P], +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) + m4_include([macros/ac_proj4_version.m4]) +m4_include([macros/gettext.m4]) m4_include([macros/gtk-2.0.m4]) +m4_include([macros/iconv.m4]) +m4_include([macros/intlmacosx.m4]) +m4_include([macros/lib-ld.m4]) +m4_include([macros/lib-link.m4]) +m4_include([macros/lib-prefix.m4]) m4_include([macros/libtool.m4]) m4_include([macros/ltoptions.m4]) m4_include([macros/ltsugar.m4]) m4_include([macros/ltversion.m4]) m4_include([macros/lt~obsolete.m4]) +m4_include([macros/nls.m4]) +m4_include([macros/po.m4]) +m4_include([macros/progtest.m4]) diff -Nru postgis-1.5.3/astyle.sh postgis-2.0.1/astyle.sh --- postgis-1.5.3/astyle.sh 2010-02-01 17:35:55.000000000 +0000 +++ postgis-2.0.1/astyle.sh 2012-02-27 22:08:12.000000000 +0000 @@ -10,10 +10,17 @@ exit fi + +RET=`astyle --version 2>&1` +if [ "$RET" != "Artistic Style Version 1.23" ]; then + echo "Only 1.23 astyle version is 'allowed'" + exit +fi + # Find all "pure" C files in the codebase # - not .in.c used for .sql generation # - not lex.yy.c or wktparse.tab.c as these are generated files -CFILES=`find . -name '*.c' -not \( -name '*.in.c' -o -name 'wktparse.tab.c' -o -name 'lex.yy.c' \)` +CFILES=`find . -name '*.c' -not \( -name '*.in.c' -o -name '*_parse.c' -o -name '*_lex.c' \)` # Run the standard format on the files, and do not # leave .orig files around for altered files. diff -Nru postgis-1.5.3/authors.svn postgis-2.0.1/authors.svn --- postgis-1.5.3/authors.svn 2009-08-11 16:38:32.000000000 +0000 +++ postgis-2.0.1/authors.svn 2012-05-21 14:47:33.000000000 +0000 @@ -1,10 +1,15 @@ strk:Sandro Santilli <strk@keybit.net> pramsey:Paul Ramsey <pramsey@cleverelephant.ca> -warmerdam:Frank Warmerdam <warmerdam@pobox.com> +warmerdam:Frank Warmerdam <warmerdam@pobox.com> mloskot:Mateusz Loskot <mateusz@loskot.net> robe:Regina Obe <lr@pcorp.us> mcayland:Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> colivier:Olivier Courtin <olivier.courtin@camptocamp.com> -kneufeld:Kevin Neufeld <kneufeld@refractions.net> +kneufeld:Kevin Neufeld <kneufeld.ca@gmail.com> +chodgson:Chris Hodgson <chodgson@refractions.net> mleslie:Mark Leslie <mark.leslie@lisasoft.com> -benjubb: +nicklas:Nicklas Avén <nicklas.aven@jordogskog.no> +pracine:Pierre Racine <Pierre.Racine@sbf.ulaval.ca> +jorgearevalo:Jorge Arévalo <jorge.arevalo at deimos-space.com> +dustymugs:Bborie Park <bkpark at ucdavis.edu> +dzwarg:David Zwarg <dzwarg@azavea.com> diff -Nru postgis-1.5.3/autogen.sh postgis-2.0.1/autogen.sh --- postgis-1.5.3/autogen.sh 2009-09-30 14:10:25.000000000 +0000 +++ postgis-2.0.1/autogen.sh 2012-02-27 22:08:12.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/sh # -# $Id: autogen.sh 4556 2009-09-30 14:10:25Z strk $ +# $Id: autogen.sh 9324 2012-02-27 22:08:12Z pramsey $ # # PostGIS Bootstrapping Script # diff -Nru postgis-1.5.3/config.guess postgis-2.0.1/config.guess --- postgis-1.5.3/config.guess 2011-06-25 16:29:36.000000000 +0000 +++ postgis-2.0.1/config.guess 2012-06-22 21:04:13.000000000 +0000 @@ -1,10 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -# Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +# 2011 Free Software Foundation, Inc. -timestamp='2010-08-21' +timestamp='2011-10-01' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -57,7 +57,7 @@ Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO @@ -92,7 +92,7 @@ exit 1 fi -trap 'exit 1' HUP INT TERM +trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires @@ -106,7 +106,7 @@ set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" HUP INT PIPE TERM ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || @@ -181,7 +181,7 @@ fi ;; *) - os=netbsd + os=netbsd ;; esac # The OS release @@ -224,7 +224,7 @@ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on @@ -270,7 +270,10 @@ # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead @@ -296,7 +299,7 @@ echo s390-ibm-zvmoe exit ;; *:OS400:*:*) - echo powerpc-ibm-os400 + echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} @@ -395,23 +398,23 @@ # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit ;; + exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; @@ -481,8 +484,8 @@ echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ @@ -495,7 +498,7 @@ else echo i586-dg-dgux${UNAME_RELEASE} fi - exit ;; + exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; @@ -595,52 +598,52 @@ 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac + esac ;; + esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include <stdlib.h> + #include <unistd.h> - #define _HPUX_SOURCE - #include <stdlib.h> - #include <unistd.h> - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa @@ -731,22 +734,22 @@ exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd - exit ;; + exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit ;; + exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd - exit ;; + exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd - exit ;; + exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd - exit ;; + exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; @@ -770,14 +773,14 @@ exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} @@ -789,13 +792,12 @@ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + UNAME_PROCESSOR=`/usr/bin/uname -p` + case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) @@ -805,14 +807,14 @@ echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) - case ${UNAME_MACHINE} in + case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; @@ -867,7 +869,7 @@ EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; - esac + esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} @@ -879,7 +881,13 @@ then echo ${UNAME_MACHINE}-unknown-linux-gnu else - echo ${UNAME_MACHINE}-unknown-linux-gnueabi + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo ${UNAME_MACHINE}-unknown-linux-gnueabi + else + echo ${UNAME_MACHINE}-unknown-linux-gnueabihf + fi fi exit ;; avr32*:Linux:*:*) @@ -892,7 +900,10 @@ echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) - echo frv-unknown-linux-gnu + echo frv-unknown-linux-gnu + exit ;; + hexagon:Linux:*:*) + echo hexagon-unknown-linux-gnu exit ;; i*86:Linux:*:*) LIBC=gnu @@ -960,7 +971,7 @@ echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu @@ -969,7 +980,7 @@ echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-tilera-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu @@ -978,7 +989,7 @@ echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -987,11 +998,11 @@ echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. + # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) @@ -1023,7 +1034,7 @@ fi exit ;; i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. + # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; @@ -1051,13 +1062,13 @@ exit ;; pc:*:*:*) # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp - exit ;; + exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; @@ -1092,8 +1103,8 @@ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ @@ -1136,10 +1147,10 @@ echo ns32k-sni-sysv fi exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says <Richard.M.Bartel@ccMail.Census.GOV> - echo i586-unisys-sysv4 - exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says <Richard.M.Bartel@ccMail.Census.GOV> + echo i586-unisys-sysv4 + exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes <hewes@openmarket.com>. # How about differentiating between stratus architectures? -djm @@ -1165,11 +1176,11 @@ exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} + echo mips-nec-sysv${UNAME_RELEASE} else - echo mips-unknown-sysv${UNAME_RELEASE} + echo mips-unknown-sysv${UNAME_RELEASE} fi - exit ;; + exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; @@ -1234,6 +1245,9 @@ *:QNX:*:4*) echo i386-pc-qnx exit ;; + NEO-?:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk${UNAME_RELEASE} + exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; @@ -1279,13 +1293,13 @@ echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} + echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` + UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; @@ -1325,11 +1339,11 @@ #include <sys/param.h> printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 - "4" + "4" #else - "" + "" #endif - ); exit (0); + ); exit (0); #endif #endif diff -Nru postgis-1.5.3/config.rpath postgis-2.0.1/config.rpath --- postgis-1.5.3/config.rpath 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/config.rpath 2010-12-09 16:10:01.000000000 +0000 @@ -0,0 +1,666 @@ +#! /bin/sh +# Output a system dependent set of variables, describing how to set the +# run time search path of shared libraries in an executable. +# +# Copyright 1996-2007 Free Software Foundation, Inc. +# Taken from GNU libtool, 2001 +# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. +# +# The first argument passed to this file is the canonical host specification, +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld +# should be set by the caller. +# +# The set of defined variables is at the end of this script. + +# Known limitations: +# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer +# than 256 bytes, otherwise the compiler driver will dump core. The only +# known workaround is to choose shorter directory names for the build +# directory and/or the installation directory. + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a +shrext=.so + +host="$1" +host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + +# Code taken from libtool.m4's _LT_CC_BASENAME. + +for cc_temp in $CC""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` + +# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC. + +wl= +if test "$GCC" = yes; then + wl='-Wl,' +else + case "$host_os" in + aix*) + wl='-Wl,' + ;; + darwin*) + case $cc_basename in + xlc*) + wl='-Wl,' + ;; + esac + ;; + mingw* | cygwin* | pw32* | os2*) + ;; + hpux9* | hpux10* | hpux11*) + wl='-Wl,' + ;; + irix5* | irix6* | nonstopux*) + wl='-Wl,' + ;; + newsos6) + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + wl='-Wl,' + ;; + pgcc | pgf77 | pgf90) + wl='-Wl,' + ;; + ccc*) + wl='-Wl,' + ;; + como) + wl='-lopt=' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + wl='-Wl,' + ;; + esac + ;; + esac + ;; + osf3* | osf4* | osf5*) + wl='-Wl,' + ;; + rdos*) + ;; + solaris*) + wl='-Wl,' + ;; + sunos4*) + wl='-Qoption ld ' + ;; + sysv4 | sysv4.2uw2* | sysv4.3*) + wl='-Wl,' + ;; + sysv4*MP*) + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + wl='-Wl,' + ;; + unicos*) + wl='-Wl,' + ;; + uts4*) + ;; + esac +fi + +# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS. + +hardcode_libdir_flag_spec= +hardcode_libdir_separator= +hardcode_direct=no +hardcode_minus_L=no + +case "$host_os" in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; +esac + +ld_shlibs=yes +if test "$with_gnu_ld" = yes; then + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + # Unlike libtool, we use -rpath here, not --rpath, since the documented + # option of GNU ld is called -rpath, not --rpath. + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + case "$host_os" in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + fi + ;; + amigaos*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we cannot use + # them. + ld_shlibs=no + ;; + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + cygwin* | mingw* | pw32*) + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + interix[3-9]*) + hardcode_direct=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + gnu* | linux* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + netbsd*) + ;; + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + else + ld_shlibs=no + fi + ;; + esac + ;; + sunos4*) + hardcode_direct=yes + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + esac + if test "$ld_shlibs" = no; then + hardcode_libdir_flag_spec= + fi +else + case "$host_os" in + aix3*) + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + else + aix_use_runtimelinking=no + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + fi + hardcode_direct=yes + hardcode_libdir_separator=':' + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct=unsupported + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + fi + # Begin _LT_AC_SYS_LIBPATH_AIX. + echo 'int main () { return 0; }' > conftest.c + ${CC} ${LDFLAGS} conftest.c -o conftest + aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` + if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` + fi + if test -z "$aix_libpath"; then + aix_libpath="/usr/lib:/lib" + fi + rm -f conftest.c conftest + # End _LT_AC_SYS_LIBPATH_AIX. + if test "$aix_use_runtimelinking" = yes; then + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + else + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + fi + fi + ;; + amigaos*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + # see comment about different semantics on the GNU ld section + ld_shlibs=no + ;; + bsdi[45]*) + ;; + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' + libext=lib + ;; + darwin* | rhapsody*) + hardcode_direct=no + if test "$GCC" = yes ; then + : + else + case $cc_basename in + xlc*) + ;; + *) + ld_shlibs=no + ;; + esac + fi + ;; + dgux*) + hardcode_libdir_flag_spec='-L$libdir' + ;; + freebsd1*) + ld_shlibs=no + ;; + freebsd2.2*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + freebsd2*) + hardcode_direct=yes + hardcode_minus_L=yes + ;; + freebsd* | dragonfly*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + hpux9*) + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + hpux10*) + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + hpux11*) + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct=no + ;; + *) + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + irix5* | irix6* | nonstopux*) + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + netbsd*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + newsos6) + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + else + case "$host_os" in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs=no + fi + ;; + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + osf3*) + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + osf4* | osf5*) + if test "$GCC" = yes; then + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + # Both cc and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + hardcode_libdir_separator=: + ;; + solaris*) + hardcode_libdir_flag_spec='-R$libdir' + ;; + sunos4*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + ;; + sysv4) + case $host_vendor in + sni) + hardcode_direct=yes # is this really true??? + ;; + siemens) + hardcode_direct=no + ;; + motorola) + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + ;; + sysv4.3*) + ;; + sysv4*MP*) + if test -d /usr/nec; then + ld_shlibs=yes + fi + ;; + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + ;; + sysv5* | sco3.2v5* | sco5v6*) + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator=':' + ;; + uts4*) + hardcode_libdir_flag_spec='-L$libdir' + ;; + *) + ld_shlibs=no + ;; + esac +fi + +# Check dynamic linker characteristics +# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER. +# Unlike libtool.m4, here we don't care about _all_ names of the library, but +# only about the one the linker finds when passed -lNAME. This is the last +# element of library_names_spec in libtool.m4, or possibly two of them if the +# linker has special search rules. +library_names_spec= # the last element of library_names_spec in libtool.m4 +libname_spec='lib$name' +case "$host_os" in + aix3*) + library_names_spec='$libname.a' + ;; + aix4* | aix5*) + library_names_spec='$libname$shrext' + ;; + amigaos*) + library_names_spec='$libname.a' + ;; + beos*) + library_names_spec='$libname$shrext' + ;; + bsdi[45]*) + library_names_spec='$libname$shrext' + ;; + cygwin* | mingw* | pw32*) + shrext=.dll + library_names_spec='$libname.dll.a $libname.lib' + ;; + darwin* | rhapsody*) + shrext=.dylib + library_names_spec='$libname$shrext' + ;; + dgux*) + library_names_spec='$libname$shrext' + ;; + freebsd1*) + ;; + freebsd* | dragonfly*) + case "$host_os" in + freebsd[123]*) + library_names_spec='$libname$shrext$versuffix' ;; + *) + library_names_spec='$libname$shrext' ;; + esac + ;; + gnu*) + library_names_spec='$libname$shrext' + ;; + hpux9* | hpux10* | hpux11*) + case $host_cpu in + ia64*) + shrext=.so + ;; + hppa*64*) + shrext=.sl + ;; + *) + shrext=.sl + ;; + esac + library_names_spec='$libname$shrext' + ;; + interix[3-9]*) + library_names_spec='$libname$shrext' + ;; + irix5* | irix6* | nonstopux*) + library_names_spec='$libname$shrext' + case "$host_os" in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; + *) libsuff= shlibsuff= ;; + esac + ;; + esac + ;; + linux*oldld* | linux*aout* | linux*coff*) + ;; + linux* | k*bsd*-gnu) + library_names_spec='$libname$shrext' + ;; + knetbsd*-gnu) + library_names_spec='$libname$shrext' + ;; + netbsd*) + library_names_spec='$libname$shrext' + ;; + newsos6) + library_names_spec='$libname$shrext' + ;; + nto-qnx*) + library_names_spec='$libname$shrext' + ;; + openbsd*) + library_names_spec='$libname$shrext$versuffix' + ;; + os2*) + libname_spec='$name' + shrext=.dll + library_names_spec='$libname.a' + ;; + osf3* | osf4* | osf5*) + library_names_spec='$libname$shrext' + ;; + rdos*) + ;; + solaris*) + library_names_spec='$libname$shrext' + ;; + sunos4*) + library_names_spec='$libname$shrext$versuffix' + ;; + sysv4 | sysv4.3*) + library_names_spec='$libname$shrext' + ;; + sysv4*MP*) + library_names_spec='$libname$shrext' + ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + library_names_spec='$libname$shrext' + ;; + uts4*) + library_names_spec='$libname$shrext' + ;; +esac + +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' +escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` +shlibext=`echo "$shrext" | sed -e 's,^\.,,'` +escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` +escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` +escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` + +LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF + +# How to pass a linker flag through the compiler. +wl="$escaped_wl" + +# Static library suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally "so"). +shlibext="$shlibext" + +# Format of library name prefix. +libname_spec="$escaped_libname_spec" + +# Library names that the linker finds when passed -lNAME. +library_names_spec="$escaped_library_names_spec" + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec" + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator="$hardcode_libdir_separator" + +# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the +# resulting binary. +hardcode_direct="$hardcode_direct" + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L="$hardcode_minus_L" + +EOF diff -Nru postgis-1.5.3/config.sub postgis-2.0.1/config.sub --- postgis-1.5.3/config.sub 2011-06-25 16:29:36.000000000 +0000 +++ postgis-2.0.1/config.sub 2012-06-22 21:04:13.000000000 +0000 @@ -1,10 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -# Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +# 2011 Free Software Foundation, Inc. -timestamp='2010-09-11' +timestamp='2011-10-08' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -76,7 +76,7 @@ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO @@ -158,8 +158,8 @@ os= basic_machine=$1 ;; - -bluegene*) - os=-cnk + -bluegene*) + os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= @@ -175,10 +175,10 @@ os=-chorusos basic_machine=$1 ;; - -chorusrdb) - os=-chorusrdb + -chorusrdb) + os=-chorusrdb basic_machine=$1 - ;; + ;; -hiux*) os=-hiuxwe2 ;; @@ -251,13 +251,17 @@ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | be32 | be64 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ + | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ + | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ @@ -286,9 +290,10 @@ | nds32 | nds32le | nds32be \ | nios | nios2 \ | ns16k | ns32k \ + | open8 \ | or32 \ | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | rx \ | score \ @@ -296,12 +301,12 @@ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ - | v850 | v850e \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ + | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; @@ -325,6 +330,18 @@ basic_machine=mt-unknown ;; + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown + ;; + # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. @@ -344,6 +361,7 @@ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ + | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ @@ -352,8 +370,10 @@ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ + | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ @@ -382,24 +402,26 @@ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile-* | tilegx-* \ + | tile*-* \ | tron-* \ | ubicom32-* \ - | v850-* | v850e-* | vax-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) @@ -424,7 +446,7 @@ basic_machine=a29k-amd os=-udi ;; - abacus) + abacus) basic_machine=abacus-unknown ;; adobe68k) @@ -507,7 +529,7 @@ basic_machine=c90-cray os=-unicos ;; - cegcc) + cegcc) basic_machine=arm-unknown os=-cegcc ;; @@ -539,7 +561,7 @@ basic_machine=craynv-cray os=-unicosmp ;; - cr16) + cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; @@ -755,7 +777,7 @@ basic_machine=ns32k-utek os=-sysv ;; - microblaze) + microblaze) basic_machine=microblaze-xilinx ;; mingw32) @@ -798,6 +820,10 @@ basic_machine=i370-ibm os=-mvs ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; ncr3000) basic_machine=i486-ncr os=-sysv4 @@ -862,10 +888,10 @@ np1) basic_machine=np1-gould ;; - neo-tandem) + neo-tandem) basic_machine=neo-tandem ;; - nse-tandem) + nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) @@ -950,9 +976,10 @@ ;; power) basic_machine=power-ibm ;; - ppc) basic_machine=powerpc-unknown + ppc | ppcbe) basic_machine=powerpc-unknown ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown @@ -1046,6 +1073,9 @@ basic_machine=i860-stratus os=-sysv4 ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; sun2) basic_machine=m68000-sun ;; @@ -1102,13 +1132,8 @@ basic_machine=t90-cray os=-unicos ;; - # This must be matched before tile*. - tilegx*) - basic_machine=tilegx-unknown - os=-linux-gnu - ;; tile*) - basic_machine=tile-unknown + basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) @@ -1178,6 +1203,9 @@ xps | xps100) basic_machine=xps100-honeywell ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + ;; ymp) basic_machine=ymp-cray os=-unicos @@ -1275,11 +1303,11 @@ if [ x"$os" != x"" ] then case $os in - # First match some system type aliases - # that might get confused with valid system types. + # First match some system type aliases + # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux + -auroraux) + os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` @@ -1364,7 +1392,7 @@ -opened*) os=-openedition ;; - -os400*) + -os400*) os=-os400 ;; -wince*) @@ -1413,7 +1441,7 @@ -sinix*) os=-sysv4 ;; - -tpf*) + -tpf*) os=-tpf ;; -triton*) @@ -1458,8 +1486,8 @@ -dicos*) os=-dicos ;; - -nacl*) - ;; + -nacl*) + ;; -none) ;; *) @@ -1482,10 +1510,10 @@ # system, and we'll never get to this point. case $basic_machine in - score-*) + score-*) os=-elf ;; - spu-*) + spu-*) os=-elf ;; *-acorn) @@ -1497,8 +1525,8 @@ arm*-semi) os=-aout ;; - c4x-* | tic4x-*) - os=-coff + c4x-* | tic4x-*) + os=-coff ;; tic54x-*) os=-coff @@ -1534,7 +1562,7 @@ m68*-cisco) os=-aout ;; - mep-*) + mep-*) os=-elf ;; mips*-cisco) @@ -1561,7 +1589,7 @@ *-ibm) os=-aix ;; - *-knuth) + *-knuth) os=-mmixware ;; *-wec) diff -Nru postgis-1.5.3/configure postgis-2.0.1/configure --- postgis-1.5.3/configure 2011-06-25 16:29:41.000000000 +0000 +++ postgis-2.0.1/configure 2012-06-22 21:04:18.000000000 +0000 @@ -608,8 +608,30 @@ # include <unistd.h> #endif" +gt_needs= ac_subst_vars='LTLIBOBJS LIBOBJS +EXTENSIONS +RT_POSTGIS_SQL +RT_LOADER +RT_PG_LIB +RT_CORE_LIB +RASTER +GDALFPOLYGONIZE +LIBGDAL_LDFLAGS +LIBGDAL_CFLAGS +POSTGIS_GDAL_VERSION +GDAL_CONFIG +POSTGIS_RASTER_SCRIPTS_VERSION +POSTGIS_RASTER_BUILD_DATE +POSTGIS_RASTER_LIB_VERSION +POSTGIS_RASTER_VERSION +POSTGIS_RASTER_MICRO_VERSION +POSTGIS_RASTER_MINOR_VERSION +POSTGIS_RASTER_MAJOR_VERSION +SRID_USR_MAX +SRID_MAX +TOPOLOGY SHLIB_LINK POSTGIS_SCRIPTS_VERSION POSTGIS_BUILD_DATE @@ -623,8 +645,40 @@ GTK_LIBS GTK_CFLAGS PKG_CONFIG +JSON_LDFLAGS +JSON_CPPFLAGS +HAVE_JSON +PROJ_LDFLAGS +PROJ_CPPFLAGS POSTGIS_PROJ_VERSION +GETTEXT_LDFLAGS +GETTEXT_CFLAGS +POSUB +LTLIBINTL +LIBINTL +INTLLIBS +LTLIBICONV +LIBICONV +INTL_MACOSX_LIBS +XGETTEXT_EXTRA_OPTIONS +MSGMERGE +XGETTEXT_015 +XGETTEXT +GMSGFMT_015 +MSGFMT_015 +GMSGFMT +MSGFMT +GETTEXT_MACRO_VERSION +USE_NLS +mkdir_p +MKDIR_P +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +SET_MAKE POSTGIS_GEOS_VERSION +GEOS_CPPFLAGS +GEOS_LDFLAGS GEOSCONFIG POSTGIS_LIBXML2_VERSION XML2CONFIG @@ -633,6 +687,7 @@ PGSQL_BINDIR PGSQL_MANDIR PGSQL_DOCDIR +PGSQL_BE_CPPFLAGS PGSQL_FE_CPPFLAGS PGSQL_FE_LDFLAGS PGXSOVERRIDE @@ -642,11 +697,14 @@ ICONV_LDFLAGS CUNIT_LDFLAGS CUNIT_CPPFLAGS +MATHML2_DTD XSLBASE DBLATEX +XMLLINT XSLTPROC IMAGEMAGICK -PWDREGRESS +PERL +MINGWBUILD YFLAGS YACC LEXLIB @@ -659,6 +717,10 @@ NUMERICFLAGS WARNFLAGS PICFLAGS +SQLPP +GPP +CPPBIN +ANT CXXCPP ac_ct_CXX CXXFLAGS @@ -755,11 +817,21 @@ with_pgconfig with_xml2config with_geosconfig +with_gettext +enable_nls +enable_rpath +with_libiconv_prefix +with_libintl_prefix with_projdir +with_jsondir with_gui enable_gtktest enable_debug enable_profile +with_topology +with_raster +with_raster_dblwarning +with_gdalconfig ' ac_precious_vars='build_alias host_alias @@ -1394,6 +1466,8 @@ --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) + --disable-nls do not use Native Language Support + --disable-rpath do not hardcode runtime library paths --disable-gtktest do not try to compile and run a test GTK+ program --enable-debug Enable verbose debugging messages --enable-profile Enable GEOS profiling messages @@ -1401,7 +1475,7 @@ Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-pic try to use only PIC/non-PIC objects [default=use + --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR @@ -1412,8 +1486,22 @@ --with-pgconfig=FILE specify an alternative pg_config file --with-xml2config=FILE specify an alternative xml2-config file --with-geosconfig=FILE specify an alternative geos-config file + --with-gettext=PATH specify a path to non-default gettext installation + --with-gnu-ld assume the C compiler uses GNU ld default=no + --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib + --without-libiconv-prefix don't search for libiconv in includedir and libdir + --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib + --without-libintl-prefix don't search for libintl in includedir and libdir --with-projdir=PATH specify the PROJ.4 installation directory + --with-jsondir=PATH specify the json-c installation directory --with-gui compile the data import GUI (requires GTK+2.0) + --without-topology Disable the topology extension + --without-raster Disable the raster extension + --with-raster-dblwarning + output double truncation warnings. Only used with + --with-raster + --with-gdalconfig=[ARG] specify location of gdal-config (ARG=path). Only + used with --with-raster Some influential environment variables: CC C compiler command @@ -2266,6 +2354,7 @@ >$cache_file fi +gt_needs="$gt_needs " # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false @@ -2376,8 +2465,8 @@ -macro_version='2.4' -macro_revision='1.3293' +macro_version='2.4.2' +macro_revision='1.3337' @@ -4012,6 +4101,11 @@ lt_cv_sys_max_cmd_len=196608 ;; + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not @@ -4051,7 +4145,7 @@ # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do @@ -4480,7 +4574,7 @@ lt_cv_deplibs_check_method=pass_all ;; -# This must be Linux ELF. +# This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; @@ -5121,13 +5215,13 @@ if test -n "$RANLIB"; then case $host_os in openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in @@ -5316,6 +5410,7 @@ # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ @@ -5704,7 +5799,7 @@ CFLAGS="$SAVE_CFLAGS" fi ;; -sparc*-*solaris*) +*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 @@ -5715,7 +5810,20 @@ case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" @@ -6355,7 +6463,13 @@ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&5 + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 @@ -6366,6 +6480,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : @@ -6398,6 +6513,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : @@ -6419,7 +6535,9 @@ echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? - if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&5 + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&5 @@ -6824,7 +6942,22 @@ # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : - withval=$with_pic; pic_mode="$withval" + withval=$with_pic; lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for lt_pkg in $withval; do + IFS="$lt_save_ifs" + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac else pic_mode=default fi @@ -6902,6 +7035,10 @@ + + + + test -z "$LN_S" && LN_S="ln -s" @@ -7361,7 +7498,9 @@ case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' - lt_prog_compiler_pic='-Xcompiler -fPIC' + if test -n "$lt_prog_compiler_pic"; then + lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" + fi ;; esac else @@ -7452,18 +7591,33 @@ ;; *) case `$CC -V 2>&1 | sed 5q` in - *Sun\ F* | *Sun*Fortran*) + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; + *Sun\ F* | *Sun*Fortran*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Qoption ld ' + ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; + *Intel*\ [CF]*Compiler*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + *Portland\ Group*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; esac ;; esac @@ -7825,7 +7979,6 @@ hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported @@ -8075,8 +8228,7 @@ xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld='-rpath $libdir' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ @@ -8455,6 +8607,7 @@ # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes + exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' @@ -8500,6 +8653,7 @@ hardcode_shlibpath_var=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + else whole_archive_flag_spec='' fi @@ -8528,10 +8682,6 @@ hardcode_shlibpath_var=no ;; - freebsd1*) - ld_shlibs=no - ;; - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little @@ -8544,7 +8694,7 @@ ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes @@ -8583,7 +8733,6 @@ fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes @@ -9207,11 +9356,6 @@ - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } @@ -9301,7 +9445,7 @@ case $host_os in aix3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH @@ -9310,7 +9454,7 @@ ;; aix[4-9]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes @@ -9375,7 +9519,7 @@ ;; bsdi[45]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' @@ -9514,7 +9658,7 @@ ;; dgux*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' @@ -9522,10 +9666,6 @@ shlibpath_var=LD_LIBRARY_PATH ;; -freebsd1*) - dynamic_linker=no - ;; - freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -9533,7 +9673,7 @@ objformat=`/usr/bin/objformat` else case $host_os in - freebsd[123]*) objformat=aout ;; + freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -9551,7 +9691,7 @@ esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) @@ -9571,17 +9711,18 @@ ;; gnu*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" @@ -9642,7 +9783,7 @@ ;; interix[3-9]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' @@ -9658,7 +9799,7 @@ nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; @@ -9695,9 +9836,9 @@ dynamic_linker=no ;; -# This must be Linux ELF. +# This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -9779,7 +9920,7 @@ ;; newsos6) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes @@ -9848,7 +9989,7 @@ ;; solaris*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -9873,7 +10014,7 @@ ;; sysv4 | sysv4.3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -9897,7 +10038,7 @@ sysv4*MP*) if test -d /usr/nec ;then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH @@ -9928,7 +10069,7 @@ tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -9938,7 +10079,7 @@ ;; uts4*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -10720,6 +10861,8 @@ + + ac_config_commands="$ac_config_commands libtool" @@ -11828,7 +11971,6 @@ hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no hardcode_libdir_flag_spec_CXX= -hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported @@ -12412,6 +12554,7 @@ hardcode_shlibpath_var_CXX=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + else whole_archive_flag_spec_CXX='' fi @@ -12456,7 +12599,7 @@ esac ;; - freebsd[12]*) + freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF ld_shlibs_CXX=no @@ -13132,6 +13275,7 @@ case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 @@ -13921,7 +14065,9 @@ ;; cygwin* | mingw* | cegcc*) case $cc_basename in - cl*) ;; + cl*) + exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' @@ -14074,8 +14220,6 @@ - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } @@ -14101,7 +14245,7 @@ case $host_os in aix3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH @@ -14110,7 +14254,7 @@ ;; aix[4-9]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes @@ -14175,7 +14319,7 @@ ;; bsdi[45]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' @@ -14312,7 +14456,7 @@ ;; dgux*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' @@ -14320,10 +14464,6 @@ shlibpath_var=LD_LIBRARY_PATH ;; -freebsd1*) - dynamic_linker=no - ;; - freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -14331,7 +14471,7 @@ objformat=`/usr/bin/objformat` else case $host_os in - freebsd[123]*) objformat=aout ;; + freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -14349,7 +14489,7 @@ esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) @@ -14369,17 +14509,18 @@ ;; gnu*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" @@ -14440,7 +14581,7 @@ ;; interix[3-9]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' @@ -14456,7 +14597,7 @@ nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; @@ -14493,9 +14634,9 @@ dynamic_linker=no ;; -# This must be Linux ELF. +# This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -14577,7 +14718,7 @@ ;; newsos6) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes @@ -14646,7 +14787,7 @@ ;; solaris*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -14671,7 +14812,7 @@ ;; sysv4 | sysv4.3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -14695,7 +14836,7 @@ sysv4*MP*) if test -d /usr/nec ;then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH @@ -14726,7 +14867,7 @@ tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -14736,7 +14877,7 @@ ;; uts4*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -14864,6 +15005,137 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +# Extract the first word of "ant", so it can be a program name with args. +set dummy ant; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ANT+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ANT in + [\\/]* | ?:[\\/]*) + ac_cv_path_ANT="$ANT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ANT="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ANT=$ac_cv_path_ANT +if test -n "$ANT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANT" >&5 +$as_echo "$ANT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + +# Extract the first word of "cpp", so it can be a program name with args. +set dummy cpp; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_CPPBIN+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $CPPBIN in + [\\/]* | ?:[\\/]*) + ac_cv_path_CPPBIN="$CPPBIN" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_CPPBIN="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +CPPBIN=$ac_cv_path_CPPBIN +if test -n "$CPPBIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPPBIN" >&5 +$as_echo "$CPPBIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +if test "x$CPPBIN" != "x"; then + SQLPP="${CPPBIN} -traditional-cpp -P" +else + # Extract the first word of "gpp_", so it can be a program name with args. +set dummy gpp_; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_GPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $GPP in + [\\/]* | ?:[\\/]*) + ac_cv_path_GPP="$GPP" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_GPP="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +GPP=$ac_cv_path_GPP +if test -n "$GPP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GPP" >&5 +$as_echo "$GPP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "x$GPP" != "x"; then + SQLPP="${GPP} -C -s \'" else + SQLPP="${CPP} -traditional-cpp" + fi +fi + PICFLAGS="$lt_prog_compiler_pic" @@ -15251,20 +15523,161 @@ #define HAVE_IEEEFP_H $HAVE_IEEEFP_H _ACEOF +ac_fn_c_check_header_mongrel "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default" +if test "x$ac_cv_header_termios_h" = xyes; then : + HAVE_TERMIOS_H=1 +else + HAVE_TERMIOS_H=0 +fi + + + +cat >>confdefs.h <<_ACEOF +#define HAVE_TERMIOS_H $HAVE_TERMIOS_H +_ACEOF + + + +ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf" +if test "x$ac_cv_func_vasprintf" = xyes; then : + HAVE_VASPRINTF=1 +else + HAVE_VASPRINTF=0 +fi + +$as_echo "#define HAVE_VASPRINTF 1" >>confdefs.h + +ac_fn_c_check_func "$LINENO" "asprintf" "ac_cv_func_asprintf" +if test "x$ac_cv_func_asprintf" = xyes; then : + HAVE_ASPRINTF=1 +else + HAVE_ASPRINTF=0 +fi + +$as_echo "#define HAVE_ASPRINTF 1" >>confdefs.h + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 +$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } +if ${ac_cv_sys_largefile_source+:} false; then : + $as_echo_n "(cached) " >&6 +else + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <sys/types.h> /* for off_t */ + #include <stdio.h> +int +main () +{ +int (*fp) (FILE *, off_t, int) = fseeko; + return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_sys_largefile_source=no; break +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _LARGEFILE_SOURCE 1 +#include <sys/types.h> /* for off_t */ + #include <stdio.h> +int +main () +{ +int (*fp) (FILE *, off_t, int) = fseeko; + return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_sys_largefile_source=1; break +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_cv_sys_largefile_source=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5 +$as_echo "$ac_cv_sys_largefile_source" >&6; } +case $ac_cv_sys_largefile_source in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source +_ACEOF +;; +esac +rm -rf conftest* + +# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug +# in glibc 2.1.3, but that breaks too many other things. +# If you want fseeko and ftello with glibc, upgrade to a fixed glibc. +if test $ac_cv_sys_largefile_source != unknown; then + +$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h + +fi + case $host_os in *mingw*) - PWDREGRESS="pwd -W" + MINGWBUILD=1 ;; *) - PWDREGRESS="pwd" + MINGWBUILD=0 ;; esac -cat >>confdefs.h <<_ACEOF -#define PWDREGRESS 1 -_ACEOF +# Extract the first word of "perl", so it can be a program name with args. +set dummy perl; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PERL+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PERL in + [\\/]* | ?:[\\/]*) + ac_cv_path_PERL="$PERL" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PERL=$ac_cv_path_PERL +if test -n "$PERL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 +$as_echo "$PERL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +if test "x$PERL" = "x"; then + as_fn_error $? "Perl was not found. Building PostGIS requires Perl." "$LINENO" 5 +fi @@ -15358,16 +15771,16 @@ $as_echo "$as_me: WARNING: xsltproc is not installed so documentation cannot be built" >&2;} fi -# Extract the first word of "dblatex", so it can be a program name with args. -set dummy dblatex; ac_word=$2 +# Extract the first word of "xmllint", so it can be a program name with args. +set dummy xmllint; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_DBLATEX+:} false; then : +if ${ac_cv_path_XMLLINT+:} false; then : $as_echo_n "(cached) " >&6 else - case $DBLATEX in + case $XMLLINT in [\\/]* | ?:[\\/]*) - ac_cv_path_DBLATEX="$DBLATEX" # Let the user override the test with a path. + ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -15377,7 +15790,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_DBLATEX="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -15388,19 +15801,64 @@ ;; esac fi -DBLATEX=$ac_cv_path_DBLATEX -if test -n "$DBLATEX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBLATEX" >&5 -$as_echo "$DBLATEX" >&6; } +XMLLINT=$ac_cv_path_XMLLINT +if test -n "$XMLLINT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5 +$as_echo "$XMLLINT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -if test "x$DBLATEX" = "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: dblatex is not installed so PDF documentation cannot be built" >&5 -$as_echo "$as_me: WARNING: dblatex is not installed so PDF documentation cannot be built" >&2;} +if test "x$XMLLINT" = "x"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: xmllint is not installed so documentation cannot be checked" >&5 +$as_echo "$as_me: WARNING: xmllint is not installed so documentation cannot be checked" >&2;} +fi + +# Extract the first word of "dblatex", so it can be a program name with args. +set dummy dblatex; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_DBLATEX+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $DBLATEX in + [\\/]* | ?:[\\/]*) + ac_cv_path_DBLATEX="$DBLATEX" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_DBLATEX="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +DBLATEX=$ac_cv_path_DBLATEX +if test -n "$DBLATEX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBLATEX" >&5 +$as_echo "$DBLATEX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +if test "x$DBLATEX" = "x"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: dblatex is not installed so PDF documentation cannot be built" >&5 +$as_echo "$as_me: WARNING: dblatex is not installed so PDF documentation cannot be built" >&2;} fi @@ -15454,6 +15912,19 @@ +MATHML2_DTD="http://www.w3.org/Math/DTD/mathml2/mathml2.dtd" +SEARCHPATH=" + /usr/share/xml/schema/w3c/mathml/dtd + " +for p in ${SEARCHPATH}; do + if test -r "${p}"/mathml2.dtd; then + MATHML2_DTD="${p}/mathml2.dtd" + break + fi +done + + + CUNIT_LDFLAGS="" ac_fn_c_check_header_mongrel "$LINENO" "CUnit/CUnit.h" "ac_cv_header_CUnit_CUnit_h" "$ac_includes_default" @@ -15793,6 +16264,10 @@ PGSQL_FULL_VERSION=`$PGCONFIG --version` POSTGIS_PGSQL_VERSION="$PGSQL_MAJOR_VERSION$PGSQL_MINOR_VERSION" +PGSQL_PKGLIBDIR=`$PGCONFIG --pkglibdir` +PGSQL_LIBDIR=`$PGCONFIG --libdir` +PGSQL_SHAREDIR=`$PGCONFIG --sharedir` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking PostgreSQL version... $PGSQL_FULL_VERSION" >&5 $as_echo "checking PostgreSQL version... $PGSQL_FULL_VERSION" >&6; } if test ! "$PGSQL_MAJOR_VERSION" -ge 8; then @@ -15819,12 +16294,29 @@ +PGSRV_INC=`$PGCONFIG --includedir-server` +PGSQL_BE_CPPFLAGS="-I${PGSRV_INC}" +case $host in + *mingw32*) + PGSQL_BE_CPPFLAGS="${PGSQL_BE_CPPFLAGS} -I${PGSRV_INC}/port/win32" + ;; +esac + + + PGSQL_DOCDIR=`$PGCONFIG --docdir` PGSQL_MANDIR=`$PGCONFIG --mandir` +PGSQL_LOCALEDIR=`$PGCONFIG --localedir` + +cat >>confdefs.h <<_ACEOF +#define PGSQL_LOCALEDIR "$PGSQL_LOCALEDIR" +_ACEOF + + PGSQL_BINDIR=`$PGCONFIG --bindir` @@ -15905,6 +16397,26 @@ +if test "$prefix" != "NONE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ------------------------------------------------------------------------" >&5 +$as_echo "------------------------------------------------------------------------" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: WARNING: You have set the --prefix to '$prefix'. But we mostly " >&5 +$as_echo " WARNING: You have set the --prefix to '$prefix'. But we mostly " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ignore the --prefix. For your info, using the values determined from " >&5 +$as_echo " ignore the --prefix. For your info, using the values determined from " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PGCONFIG we will be installing: " >&5 +$as_echo " $PGCONFIG we will be installing: " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: * postgis shared library in $PGSQL_LIBDIR " >&5 +$as_echo " * postgis shared library in $PGSQL_LIBDIR " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: * postgis SQL files in $PGSQL_SHAREDIR/contrib/postgis-$POSTGIS_MAJOR_VERSION.$POSTGIS_MINOR_VERSION " >&5 +$as_echo " * postgis SQL files in $PGSQL_SHAREDIR/contrib/postgis-$POSTGIS_MAJOR_VERSION.$POSTGIS_MINOR_VERSION " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: * postgis executables in $PGSQL_BINDIR " >&5 +$as_echo " * postgis executables in $PGSQL_BINDIR " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ------------------------------------------------------------------------" >&5 +$as_echo "------------------------------------------------------------------------" >&6; } +fi + + # Check whether --with-xml2config was given. if test "${with_xml2config+set}" = set; then : @@ -15995,6 +16507,7 @@ done +CPPFLAGS="$CPPFLAGS_SAVE" LIBS_SAVE="$LIBS" LIBS="$XML2_LDFLAGS" @@ -16045,6 +16558,7 @@ as_fn_error $? "could not find libxml2" "$LINENO" 5 fi +LIBS="$LIBS_SAVE" cat >>confdefs.h <<_ACEOF @@ -16126,6 +16640,9 @@ GEOS_MAJOR_VERSION=`$GEOSCONFIG --version | cut -d. -f1 | sed 's/[^0-9]//g'` GEOS_MINOR_VERSION=`$GEOSCONFIG --version | cut -d. -f2 | sed 's/[^0-9]//g'` GEOS_PATCH_VERSION=`$GEOSCONFIG --version | cut -d. -f3 | sed 's/[^0-9]//g'` +if test "x$GEOS_PATCH_VERSION" = "x"; then + GEOS_PATCH_VERSION="0"; +fi GEOS_FULL_VERSION=`$GEOSCONFIG --version` POSTGIS_GEOS_VERSION="$GEOS_MAJOR_VERSION$GEOS_MINOR_VERSION" GEOS_NUMERIC_VERSION="$GEOS_MAJOR_VERSION$GEOS_MINOR_VERSION$GEOS_PATCH_VERSION" @@ -16139,6 +16656,8 @@ GEOS_LDFLAGS=`$GEOSCONFIG --ldflags` GEOS_CPPFLAGS=-I`$GEOSCONFIG --includes` + + CPPFLAGS_SAVE="$CPPFLAGS" CPPFLAGS="$GEOS_CPPFLAGS" ac_fn_c_check_header_mongrel "$LINENO" "geos_c.h" "ac_cv_header_geos_c_h" "$ac_includes_default" @@ -16211,164 +16730,2379 @@ +GETTEXT_CFLAGS="" +GETTEXT_LDFLAGS="" -# Check whether --with-projdir was given. -if test "${with_projdir+set}" = set; then : - withval=$with_projdir; PROJDIR="$withval" + +# Check whether --with-gettext was given. +if test "${with_gettext+set}" = set; then : + withval=$with_gettext; GETTEXT_PATH="$withval" else - PROJDIR="" + GETTEXT_PATH="yes" fi -if test ! "x$PROJDIR" = "x"; then - if test "x$PROJDIR" = "xyes"; then - as_fn_error $? "you must specifiy a parameter to --with-projdir, e.g. --with-projdir=/path/to" "$LINENO" 5 - else - if test -d "$PROJDIR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using user-specified proj directory: $PROJDIR" >&5 -$as_echo "Using user-specified proj directory: $PROJDIR" >&6; } +LDFLAGS_SAVE="$LDFLAGS" +CFLAGS_SAVE="$CFLAGS" - PROJ_CPPFLAGS="-I$PROJDIR/include" - PROJ_LDFLAGS="-L$PROJDIR/lib" - else - as_fn_error $? "the --with-projdir directory \"$PROJDIR\" cannot be found" "$LINENO" 5 - fi +if test "x$GETTEXT_PATH" != "xno"; then + if test "x$GETTEXT_PATH" != "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking user-specified gettext location: $GETTEXT_PATH" >&5 +$as_echo "checking user-specified gettext location: $GETTEXT_PATH" >&6; } + GETTEXT_CFLAGS="-I$GETTEXT_PATH/include" + GETTEXT_LDFLAGS="-L$GETTEXT_PATH/lib" + LDFLAGS="$GETTEXT_LDFLAGS $LDFLAGS" + CFLAGS="$GETTEXT_CFLAGS $CFLAGS" fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" fi +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS -CPPFLAGS_SAVE="$CPPFLAGS" -CPPFLAGS="$PROJ_CPPFLAGS" -ac_fn_c_check_header_mongrel "$LINENO" "proj_api.h" "ac_cv_header_proj_api_h" "$ac_includes_default" -if test "x$ac_cv_header_proj_api_h" = xyes; then : +rm -rf conftest.one conftest.two conftest.dir -else - as_fn_error $? "could not find proj_api.h - you may need to specify the directory of a PROJ.4 installation using --with-projdir" "$LINENO" 5 fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #ifdef HAVE_STDINT_H - #include <stdio.h> - #endif - #include "proj_api.h" - -int -main () -{ + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS - FILE *fp; +fi - fp = fopen("conftest.out", "w"); - fprintf(fp, "%d\n", PJ_VERSION); - fclose(fp) - ; - return 0; -} + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac - POSTGIS_PROJ_VERSION=`cat conftest.out | sed 's/\([0-9]\)\([0-9]\)\([0-9]\)/\1\2/'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 +$as_echo_n "checking whether NLS is requested... " >&6; } + # Check whether --enable-nls was given. +if test "${enable_nls+set}" = set; then : + enableval=$enable_nls; USE_NLS=$enableval else + USE_NLS=yes +fi - POSTGIS_PROJ_VERSION="" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 +$as_echo "$USE_NLS" >&6; } -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi + GETTEXT_MACRO_VERSION=0.17 -cat >>confdefs.h <<_ACEOF -#define POSTGIS_PROJ_VERSION $POSTGIS_PROJ_VERSION -_ACEOF -CPPFLAGS="$CPPFLAGS_SAVE" -if test ! "$POSTGIS_PROJ_VERSION" -ge 45; then - as_fn_error $? "PostGIS requires PROJ >= 4.5.0" "$LINENO" 5 +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -LIBS_SAVE="$LIBS" -LIBS="$PROJ_LDFLAGS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pj_get_release in -lproj" >&5 -$as_echo_n "checking for pj_get_release in -lproj... " >&6; } -if ${ac_cv_lib_proj_pj_get_release+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lproj $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pj_get_release (); -int -main () -{ -return pj_get_release (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_proj_pj_get_release=yes +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" else - ac_cv_lib_proj_pj_get_release=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + ac_executable_p="test -f" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_proj_pj_get_release" >&5 -$as_echo "$ac_cv_lib_proj_pj_get_release" >&6; } -if test "x$ac_cv_lib_proj_pj_get_release" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBPROJ 1 -_ACEOF - - LIBS="-lproj $LIBS" +rm -f conf$$.file +# Extract the first word of "msgfmt", so it can be a program name with args. +set dummy msgfmt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_MSGFMT+:} false; then : + $as_echo_n "(cached) " >&6 else - as_fn_error $? "could not find libproj - you may need to specify the directory of a PROJ.4 installation using --with-projdir" "$LINENO" 5 + case "$MSGFMT" in + [\\/]* | ?:[\\/]*) + ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + echo "$as_me: trying $ac_dir/$ac_word..." >&5 + if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 && + (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" + test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" + ;; +esac fi - -LIBS="$LIBS_SAVE" - - - -# Check whether --with-gui was given. -if test "${with_gui+set}" = set; then : - withval=$with_gui; GUI="yes" +MSGFMT="$ac_cv_path_MSGFMT" +if test "$MSGFMT" != ":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 +$as_echo "$MSGFMT" >&6; } else - GUI="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - -if test "x$GUI" = "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: GUI: Build requested, checking for dependencies (GKT+2.0)" >&5 -$as_echo "GUI: Build requested, checking for dependencies (GKT+2.0)" >&6; } - # Check whether --enable-gtktest was given. + # Extract the first word of "gmsgfmt", so it can be a program name with args. +set dummy gmsgfmt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_GMSGFMT+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $GMSGFMT in + [\\/]* | ?:[\\/]*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" + ;; +esac +fi +GMSGFMT=$ac_cv_path_GMSGFMT +if test -n "$GMSGFMT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 +$as_echo "$GMSGFMT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; + *) MSGFMT_015=$MSGFMT ;; + esac + + case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; + *) GMSGFMT_015=$GMSGFMT ;; + esac + + + +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" +else + ac_executable_p="test -f" +fi +rm -f conf$$.file + +# Extract the first word of "xgettext", so it can be a program name with args. +set dummy xgettext; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_XGETTEXT+:} false; then : + $as_echo_n "(cached) " >&6 +else + case "$XGETTEXT" in + [\\/]* | ?:[\\/]*) + ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + echo "$as_me: trying $ac_dir/$ac_word..." >&5 + if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 && + (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" + test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" + ;; +esac +fi +XGETTEXT="$ac_cv_path_XGETTEXT" +if test "$XGETTEXT" != ":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 +$as_echo "$XGETTEXT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + rm -f messages.po + + case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; + *) XGETTEXT_015=$XGETTEXT ;; + esac + + + +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" +else + ac_executable_p="test -f" +fi +rm -f conf$$.file + +# Extract the first word of "msgmerge", so it can be a program name with args. +set dummy msgmerge; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_MSGMERGE+:} false; then : + $as_echo_n "(cached) " >&6 +else + case "$MSGMERGE" in + [\\/]* | ?:[\\/]*) + ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + echo "$as_me: trying $ac_dir/$ac_word..." >&5 + if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then + ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" + test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":" + ;; +esac +fi +MSGMERGE="$ac_cv_path_MSGMERGE" +if test "$MSGMERGE" != ":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 +$as_echo "$MSGMERGE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$localedir" || localedir='${datadir}/locale' + + + test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= + + + ac_config_commands="$ac_config_commands po-directories" + + + + if test "X$prefix" = "XNONE"; then + acl_final_prefix="$ac_default_prefix" + else + acl_final_prefix="$prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + acl_final_exec_prefix='${prefix}' + else + acl_final_exec_prefix="$exec_prefix" + fi + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" + prefix="$acl_save_prefix" + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then : + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 +$as_echo_n "checking for ld used by GCC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | [A-Za-z]:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the path of ld + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } +fi +if ${acl_cv_path_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in + *GNU* | *'with BFD'*) + test "$with_gnu_ld" != no && break ;; + *) + test "$with_gnu_ld" != yes && break ;; + esac + fi + done + IFS="$ac_save_ifs" +else + acl_cv_path_LD="$LD" # Let the user override the test with a path. +fi +fi + +LD="$acl_cv_path_LD" +if test -n "$LD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if ${acl_cv_prog_gnu_ld+:} false; then : + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU ld's only accept -v. +case `$LD -v 2>&1 </dev/null` in +*GNU* | *'with BFD'*) + acl_cv_prog_gnu_ld=yes ;; +*) + acl_cv_prog_gnu_ld=no ;; +esac +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 +$as_echo "$acl_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$acl_cv_prog_gnu_ld + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 +$as_echo_n "checking for shared library run path origin... " >&6; } +if ${acl_cv_rpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh + . ./conftest.sh + rm -f ./conftest.sh + acl_cv_rpath=done + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 +$as_echo "$acl_cv_rpath" >&6; } + wl="$acl_cv_wl" + acl_libext="$acl_cv_libext" + acl_shlibext="$acl_cv_shlibext" + acl_libname_spec="$acl_cv_libname_spec" + acl_library_names_spec="$acl_cv_library_names_spec" + acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + acl_hardcode_direct="$acl_cv_hardcode_direct" + acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" + # Check whether --enable-rpath was given. +if test "${enable_rpath+set}" = set; then : + enableval=$enable_rpath; : +else + enable_rpath=yes +fi + + + + acl_libdirstem=lib + searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test -n "$searchpath"; then + acl_save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib64 ) acl_libdirstem=lib64 ;; + esac ;; + esac + fi + done + IFS="$acl_save_IFS" + fi + + + + + + + + + + use_additional=yes + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + +# Check whether --with-libiconv-prefix was given. +if test "${with_libiconv_prefix+set}" = set; then : + withval=$with_libiconv_prefix; + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + fi + fi + +fi + + LIBICONV= + LTLIBICONV= + INCICONV= + LIBICONV_PREFIX= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='iconv ' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" + else + : + fi + else + found_dir= + found_la= + found_so= + found_a= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + dir="$additional_libdir" + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + if test "$acl_hardcode_direct" = yes; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + haveit= + for x in $LDFLAGS $LIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" + fi + if test "$acl_hardcode_minus_L" != no; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" + fi + fi + additional_includedir= + case "$found_dir" in + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + LIBICONV_PREFIX="$basedir" + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INCICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + if test -n "$found_la"; then + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" + ;; + esac + done + fi + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$acl_hardcode_libdir_separator"; then + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" + else + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + for found_dir in $ltrpathdirs; do + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" + done + fi + + + + + + + + + + + + + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 +$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; } +if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then : + $as_echo_n "(cached) " >&6 +else + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <CoreFoundation/CFPreferences.h> +int +main () +{ +CFPreferencesCopyAppValue(NULL, NULL) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gt_cv_func_CFPreferencesCopyAppValue=yes +else + gt_cv_func_CFPreferencesCopyAppValue=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gt_save_LIBS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 +$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } + if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then + +$as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5 +$as_echo_n "checking for CFLocaleCopyCurrent... " >&6; } +if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then : + $as_echo_n "(cached) " >&6 +else + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <CoreFoundation/CFLocale.h> +int +main () +{ +CFLocaleCopyCurrent(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gt_cv_func_CFLocaleCopyCurrent=yes +else + gt_cv_func_CFLocaleCopyCurrent=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gt_save_LIBS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 +$as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; } + if test $gt_cv_func_CFLocaleCopyCurrent = yes; then + +$as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h + + fi + INTL_MACOSX_LIBS= + if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then + INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" + fi + + + + + + + LIBINTL= + LTLIBINTL= + POSUB= + + case " $gt_needs " in + *" need-formatstring-macros "*) gt_api_version=3 ;; + *" need-ngettext "*) gt_api_version=2 ;; + *) gt_api_version=1 ;; + esac + gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" + gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" + + if test "$USE_NLS" = "yes"; then + gt_use_preinstalled_gnugettext=no + + + if test $gt_api_version -ge 3; then + gt_revision_test_code=' +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) +#endif +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; +' + else + gt_revision_test_code= + fi + if test $gt_api_version -ge 2; then + gt_expression_test_code=' + * ngettext ("", "", 0)' + else + gt_expression_test_code= + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 +$as_echo_n "checking for GNU gettext in libc... " >&6; } +if eval \${$gt_func_gnugettext_libc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <libintl.h> +$gt_revision_test_code +extern int _nl_msg_cat_cntr; +extern int *_nl_domain_bindings; +int +main () +{ +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$gt_func_gnugettext_libc=yes" +else + eval "$gt_func_gnugettext_libc=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$gt_func_gnugettext_libc + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then + + + + + + am_save_CPPFLAGS="$CPPFLAGS" + + for element in $INCICONV; do + haveit= + for x in $CPPFLAGS; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" + fi + done + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 +$as_echo_n "checking for iconv... " >&6; } +if ${am_cv_func_iconv+:} false; then : + $as_echo_n "(cached) " >&6 +else + + am_cv_func_iconv="no, consider installing GNU libiconv" + am_cv_lib_iconv=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdlib.h> +#include <iconv.h> +int +main () +{ +iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + am_cv_func_iconv=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test "$am_cv_func_iconv" != yes; then + am_save_LIBS="$LIBS" + LIBS="$LIBS $LIBICONV" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdlib.h> +#include <iconv.h> +int +main () +{ +iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + am_cv_lib_iconv=yes + am_cv_func_iconv=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$am_save_LIBS" + fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 +$as_echo "$am_cv_func_iconv" >&6; } + if test "$am_cv_func_iconv" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 +$as_echo_n "checking for working iconv... " >&6; } +if ${am_cv_func_iconv_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + + am_save_LIBS="$LIBS" + if test $am_cv_lib_iconv = yes; then + LIBS="$LIBS $LIBICONV" + fi + if test "$cross_compiling" = yes; then : + case "$host_os" in + aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; + *) am_cv_func_iconv_works="guessing yes" ;; + esac +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include <iconv.h> +#include <string.h> +int main () +{ + /* Test against AIX 5.1 bug: Failures are not distinguishable from successful + returns. */ + { + iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); + if (cd_utf8_to_88591 != (iconv_t)(-1)) + { + static const char input[] = "\342\202\254"; /* EURO SIGN */ + char buf[10]; + const char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_utf8_to_88591, + (char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res == 0) + return 1; + } + } +#if 0 /* This bug could be worked around by the caller. */ + /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ + { + iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); + if (cd_88591_to_utf8 != (iconv_t)(-1)) + { + static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; + char buf[50]; + const char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_88591_to_utf8, + (char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); + if ((int)res > 0) + return 1; + } + } +#endif + /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is + provided. */ + if (/* Try standardized names. */ + iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) + /* Try IRIX, OSF/1 names. */ + && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) + /* Try AIX names. */ + && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) + /* Try HP-UX names. */ + && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) + return 1; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + am_cv_func_iconv_works=yes +else + am_cv_func_iconv_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + LIBS="$am_save_LIBS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 +$as_echo "$am_cv_func_iconv_works" >&6; } + case "$am_cv_func_iconv_works" in + *no) am_func_iconv=no am_cv_lib_iconv=no ;; + *) am_func_iconv=yes ;; + esac + else + am_func_iconv=no am_cv_lib_iconv=no + fi + if test "$am_func_iconv" = yes; then + +$as_echo "#define HAVE_ICONV 1" >>confdefs.h + + fi + if test "$am_cv_lib_iconv" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 +$as_echo_n "checking how to link with libiconv... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 +$as_echo "$LIBICONV" >&6; } + else + CPPFLAGS="$am_save_CPPFLAGS" + LIBICONV= + LTLIBICONV= + fi + + + + + + + + + use_additional=yes + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + +# Check whether --with-libintl-prefix was given. +if test "${with_libintl_prefix+set}" = set; then : + withval=$with_libintl_prefix; + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + fi + fi + +fi + + LIBINTL= + LTLIBINTL= + INCINTL= + LIBINTL_PREFIX= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='intl ' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value" + else + : + fi + else + found_dir= + found_la= + found_so= + found_a= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + dir="$additional_libdir" + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + else + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + if test "$acl_hardcode_direct" = yes; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + else + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + haveit= + for x in $LDFLAGS $LIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir" + fi + if test "$acl_hardcode_minus_L" != no; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + else + LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a" + else + LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name" + fi + fi + additional_includedir= + case "$found_dir" in + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + LIBINTL_PREFIX="$basedir" + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INCINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + if test -n "$found_la"; then + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + LIBINTL="${LIBINTL}${LIBINTL:+ }$dep" + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep" + ;; + esac + done + fi + else + LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$acl_hardcode_libdir_separator"; then + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" + else + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + for found_dir in $ltrpathdirs; do + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir" + done + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 +$as_echo_n "checking for GNU gettext in libintl... " >&6; } +if eval \${$gt_func_gnugettext_libintl+:} false; then : + $as_echo_n "(cached) " >&6 +else + gt_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $INCINTL" + gt_save_LIBS="$LIBS" + LIBS="$LIBS $LIBINTL" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <libintl.h> +$gt_revision_test_code +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +int +main () +{ +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$gt_func_gnugettext_libintl=yes" +else + eval "$gt_func_gnugettext_libintl=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then + LIBS="$LIBS $LIBICONV" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <libintl.h> +$gt_revision_test_code +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (const char *); +int +main () +{ +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + LIBINTL="$LIBINTL $LIBICONV" + LTLIBINTL="$LTLIBINTL $LTLIBICONV" + eval "$gt_func_gnugettext_libintl=yes" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + CPPFLAGS="$gt_save_CPPFLAGS" + LIBS="$gt_save_LIBS" +fi +eval ac_res=\$$gt_func_gnugettext_libintl + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + fi + + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ + || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ + && test "$PACKAGE" != gettext-runtime \ + && test "$PACKAGE" != gettext-tools; }; then + gt_use_preinstalled_gnugettext=yes + else + LIBINTL= + LTLIBINTL= + INCINTL= + fi + + + + if test -n "$INTL_MACOSX_LIBS"; then + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" + LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" + fi + fi + + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + +$as_echo "#define ENABLE_NLS 1" >>confdefs.h + + else + USE_NLS=no + fi + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5 +$as_echo_n "checking whether to use NLS... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 +$as_echo "$USE_NLS" >&6; } + if test "$USE_NLS" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5 +$as_echo_n "checking where the gettext function comes from... " >&6; } + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then + gt_source="external libintl" + else + gt_source="libc" + fi + else + gt_source="included intl directory" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5 +$as_echo "$gt_source" >&6; } + fi + + if test "$USE_NLS" = "yes"; then + + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5 +$as_echo_n "checking how to link with libintl... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5 +$as_echo "$LIBINTL" >&6; } + + for element in $INCINTL; do + haveit= + for x in $CPPFLAGS; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" + fi + done + + fi + + +$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h + + +$as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h + + fi + + POSUB=po + fi + + + + INTLLIBS="$LIBINTL" + + + + + + + + if test "x$LIBINTL" = "x"; then + USE_NLS=no + fi +fi + + + + +LDFLAGS="$LDFLAGS_SAVE" +CFLAGS="$CFLAGS_SAVE" + + + +# Check whether --with-projdir was given. +if test "${with_projdir+set}" = set; then : + withval=$with_projdir; PROJDIR="$withval" +else + PROJDIR="" +fi + + +if test ! "x$PROJDIR" = "x"; then + if test "x$PROJDIR" = "xyes"; then + as_fn_error $? "you must specify a parameter to --with-projdir, e.g. --with-projdir=/path/to" "$LINENO" 5 + else + if test -d "$PROJDIR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using user-specified proj directory: $PROJDIR" >&5 +$as_echo "Using user-specified proj directory: $PROJDIR" >&6; } + + PROJ_CPPFLAGS="-I$PROJDIR/include" + PROJ_LDFLAGS="-L$PROJDIR/lib" + else + as_fn_error $? "the --with-projdir directory \"$PROJDIR\" cannot be found" "$LINENO" 5 + fi + fi +fi + + +CPPFLAGS_SAVE="$CPPFLAGS" +CPPFLAGS="$PROJ_CPPFLAGS" +ac_fn_c_check_header_mongrel "$LINENO" "proj_api.h" "ac_cv_header_proj_api_h" "$ac_includes_default" +if test "x$ac_cv_header_proj_api_h" = xyes; then : + +else + as_fn_error $? "could not find proj_api.h - you may need to specify the directory of a PROJ.4 installation using --with-projdir" "$LINENO" 5 +fi + + + + + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #ifdef HAVE_STDINT_H + #include <stdio.h> + #endif + #include "proj_api.h" + +int +main () +{ + + FILE *fp; + + fp = fopen("conftest.out", "w"); + fprintf(fp, "%d\n", PJ_VERSION); + fclose(fp) + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + + POSTGIS_PROJ_VERSION=`cat conftest.out | sed 's/\([0-9]\)\([0-9]\)\([0-9]\)/\1\2/'` + +else + + POSTGIS_PROJ_VERSION="" + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + + +cat >>confdefs.h <<_ACEOF +#define POSTGIS_PROJ_VERSION $POSTGIS_PROJ_VERSION +_ACEOF + + +CPPFLAGS="$CPPFLAGS_SAVE" + + + + +if test ! "$POSTGIS_PROJ_VERSION" -ge 45; then + as_fn_error $? "PostGIS requires PROJ >= 4.5.0" "$LINENO" 5 +fi + +LIBS_SAVE="$LIBS" +LIBS="$PROJ_LDFLAGS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pj_get_release in -lproj" >&5 +$as_echo_n "checking for pj_get_release in -lproj... " >&6; } +if ${ac_cv_lib_proj_pj_get_release+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lproj $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pj_get_release (); +int +main () +{ +return pj_get_release (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_proj_pj_get_release=yes +else + ac_cv_lib_proj_pj_get_release=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_proj_pj_get_release" >&5 +$as_echo "$ac_cv_lib_proj_pj_get_release" >&6; } +if test "x$ac_cv_lib_proj_pj_get_release" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBPROJ 1 +_ACEOF + + LIBS="-lproj $LIBS" + +else + as_fn_error $? "could not find libproj - you may need to specify the directory of a PROJ.4 installation using --with-projdir" "$LINENO" 5 +fi + +LIBS="$LIBS_SAVE" + + +HAVE_JSON=no + + + +# Check whether --with-jsondir was given. +if test "${with_jsondir+set}" = set; then : + withval=$with_jsondir; JSONDIR="$withval" +else + JSONDIR= +fi + + +if test ! "x$JSONDIR" = "x"; then + if test "x$JSONDIR" = "xyes"; then + as_fn_error $? "you must specify a parameter to --with-jsondir, e.g. --with-jsondir=/path/to" "$LINENO" 5 + else + if test ! -e "${JSONDIR}/include/json/json.h" -o \ + ! \( -e "${JSONDIR}/lib/libjson.so" -o \ + -e "${JSONDIR}/lib/libjson.dll" -o \ + -e "${JSONDIR}/lib/libjson.dylib" -o \ + -e "${JSONDIR}/bin/libjson.dll" -o \ + -e "${JSONDIR}/lib/libjson.a" \) + then + as_fn_error $? "Cannot find json dev files in \"$JSONDIR\"" "$LINENO" 5 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using user-specified json-c directory: $JSONDIR" >&5 +$as_echo "Using user-specified json-c directory: $JSONDIR" >&6; } + + JSON_CPPFLAGS="-I$JSONDIR/include" + JSON_LDFLAGS="-L$JSONDIR/lib -ljson" + fi +fi + +CPPFLAGS_SAVE="$CPPFLAGS" +CPPFLAGS="$JSON_CPPFLAGS" +ac_fn_c_check_header_mongrel "$LINENO" "json/json.h" "ac_cv_header_json_json_h" "$ac_includes_default" +if test "x$ac_cv_header_json_json_h" = xyes; then : + HAVE_JSON=yes +fi + + +CPPFLAGS="$CPPFLAGS_SAVE" + +LIBS_SAVE="$LIBS" +LIBS="$JSON_LDFLAGS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for json_object_get in -ljson" >&5 +$as_echo_n "checking for json_object_get in -ljson... " >&6; } +if ${ac_cv_lib_json_json_object_get+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ljson $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char json_object_get (); +int +main () +{ +return json_object_get (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_json_json_object_get=yes +else + ac_cv_lib_json_json_object_get=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_json_json_object_get" >&5 +$as_echo "$ac_cv_lib_json_json_object_get" >&6; } +if test "x$ac_cv_lib_json_json_object_get" = xyes; then : + HAVE_JSON=yes +fi + +LIBS="$LIBS_SAVE" + +if test "$HAVE_JSON" = "yes"; then + +$as_echo "#define HAVE_LIBJSON 1" >>confdefs.h + + if test "x$JSON_LDFLAGS" = "x"; then + JSON_LDFLAGS="-ljson" + fi +fi + + + + + + +# Check whether --with-gui was given. +if test "${with_gui+set}" = set; then : + withval=$with_gui; GUI="yes" +else + GUI="no" +fi + + +if test "x$GUI" = "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: GUI: Build requested, checking for dependencies (GKT+2.0)" >&5 +$as_echo "GUI: Build requested, checking for dependencies (GKT+2.0)" >&6; } + # Check whether --enable-gtktest was given. if test "${enable_gtktest+set}" = set; then : enableval=$enable_gtktest; else @@ -16588,92 +19322,276 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include <gtk/gtk.h> -#include <stdio.h> +#include <gtk/gtk.h> +#include <stdio.h> + +int +main () +{ + return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding GTK+ or finding the wrong" + echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" +else + echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means GTK+ is incorrectly installed." +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + GTK_CFLAGS="" + GTK_LIBS="" + GTK_BUILD="" + fi + + + + _gdk_tgt=`$PKG_CONFIG --variable=target gdk-2.0` + if test "x$_gdk_tgt" = xquartz; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ige-mac-integration" >&5 +$as_echo_n "checking for ige-mac-integration... " >&6; } + if $PKG_CONFIG --exists "ige-mac-integration" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IGE_MAC_CFLAGS" >&5 +$as_echo_n "checking for IGE_MAC_CFLAGS... " >&6; } + IGE_MAC_CFLAGS=`$PKG_CONFIG --cflags "ige-mac-integration"` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IGE_MAC_CFLAGS" >&5 +$as_echo "$IGE_MAC_CFLAGS" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IGE_MAC_LIBS" >&5 +$as_echo_n "checking for IGE_MAC_LIBS... " >&6; } + IGE_MAC_LIBS=`$PKG_CONFIG --libs "ige-mac-integration"` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IGE_MAC_LIBS" >&5 +$as_echo "$IGE_MAC_LIBS" >&6; } + + else + IGE_MAC_CFLAGS="" + IGE_MAC_LIBS="" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + + fi + + + + rm -f conf.gtktest + + + case $host in + *mingw32*) + GTK_WIN32_FLAGS=-mwindows + GTK_WIN32_RES=shp2pgsql-gui.res + GTK_WIN32_BUILD=gui-win32 + ;; + esac +fi + + + + + + + + + + + + + +# Check whether --enable-debug was given. +if test "${enable_debug+set}" = set; then : + enableval=$enable_debug; POSTGIS_DEBUG_LEVEL=4 +else + POSTGIS_DEBUG_LEVEL=0 +fi + + + +cat >>confdefs.h <<_ACEOF +#define POSTGIS_DEBUG_LEVEL $POSTGIS_DEBUG_LEVEL +_ACEOF + + + +# Check whether --enable-profile was given. +if test "${enable_profile+set}" = set; then : + enableval=$enable_profile; POSTGIS_PROFILE=1 +else + POSTGIS_PROFILE=0 +fi + + + +cat >>confdefs.h <<_ACEOF +#define POSTGIS_PROFILE $POSTGIS_PROFILE +_ACEOF + + + +POSTGIS_VERSION="$POSTGIS_MAJOR_VERSION.$POSTGIS_MINOR_VERSION USE_GEOS=1 USE_PROJ=1 USE_STATS=1" +if test "$HAVE_LIBXML2" = "1"; then + POSTGIS_VERSION="$POSTGIS_VERSION USE_LIBXML2=1" +fi + +POSTGIS_LIB_VERSION="$POSTGIS_MAJOR_VERSION.$POSTGIS_MINOR_VERSION.$POSTGIS_MICRO_VERSION" +POSTGIS_BUILD_DATE=`date -u "+%Y-%m-%d %H:%M:%S"` +POSTGIS_SCRIPTS_VERSION="$POSTGIS_LIB_VERSION" + + +cat >>confdefs.h <<_ACEOF +#define POSTGIS_VERSION "$POSTGIS_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define POSTGIS_LIB_VERSION "$POSTGIS_LIB_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define POSTGIS_BUILD_DATE "$POSTGIS_BUILD_DATE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define POSTGIS_SCRIPTS_VERSION "$POSTGIS_SCRIPTS_VERSION" +_ACEOF + + + + + + + + + + +cat >>confdefs.h <<_ACEOF +#define POSTGIS_AUTOCACHE_BBOX 1 +_ACEOF + + + +cat >>confdefs.h <<_ACEOF +#define POSTGIS_USE_STATS 1 +_ACEOF + + + +CPPFLAGS="$PGSQL_CPPFLAGS $GEOS_CPPFLAGS $PROJ_CPPFLAGS $JSON_CPPFLAGS $XML2_CPPFLAGS" + +SHLIB_LINK="$PGSQL_LDFLAGS $GEOS_LDFLAGS $PROJ_LDFLAGS -lgeos_c -lproj $JSON_LDFLAGS $XML2_LDFLAGS" + + + +# Check whether --with-topology was given. +if test "${with_topology+set}" = set; then : + withval=$with_topology; +fi + + +if test "x$with_topology" != "xno"; then + + TOPOLOGY="topology" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: TOPOLOGY: Topology support requested" >&5 +$as_echo "TOPOLOGY: Topology support requested" >&6; } + if test "$GEOS_NUMERIC_VERSION" -lt 332; then + as_fn_error $? "Topology requires GEOS version >= 3.3.2. Use --without-topology or install a newer GEOS." "$LINENO" 5 + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: TOPOLOGY: Topology support disabled" >&5 +$as_echo "TOPOLOGY: Topology support disabled" >&6; } +fi + + + + +SRID_MAX=999999 +SRID_USR_MAX=998999 + + + + + +# Check whether --with-raster was given. +if test "${with_raster+set}" = set; then : + withval=$with_raster; +fi + -int -main () -{ - return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); - ; - return 0; -} +if test "x$with_raster" != "xno"; then + RASTER="raster" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: RASTER: Raster support requested" >&5 +$as_echo "RASTER: Raster support requested" >&6; } + + ac_config_headers="$ac_config_headers raster/raster_config.h" + + + POSTGIS_RASTER_MAJOR_VERSION=`cat raster/Version.config | grep POSTGIS_RASTER_MAJOR_VERSION | sed 's/[^=]*=\([0-9]\)/\1/g'` + POSTGIS_RASTER_MINOR_VERSION=`cat raster/Version.config | grep POSTGIS_RASTER_MINOR_VERSION | sed 's/[^=]*=\([0-9]\)/\1/g'` + POSTGIS_RASTER_MICRO_VERSION=`cat raster/Version.config | grep POSTGIS_RASTER_MICRO_VERSION | sed 's/[^=]*=\([0-9]\)/\1/g'` + + +cat >>confdefs.h <<_ACEOF +#define POSTGIS_RASTER_MAJOR_VERSION "$POSTGIS_RASTER_MAJOR_VERSION" _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding GTK+ or finding the wrong" - echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your" - echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" - echo "*** to the installed location Also, make sure you have run ldconfig if that" - echo "*** is required on your system" - echo "***" - echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" -else - echo "*** The test program failed to compile or link. See the file config.log for the" - echo "*** exact error that occured. This usually means GTK+ is incorrectly installed." -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - GTK_CFLAGS="" - GTK_LIBS="" - GTK_BUILD="" - fi +cat >>confdefs.h <<_ACEOF +#define POSTGIS_RASTER_MINOR_VERSION "$POSTGIS_RASTER_MINOR_VERSION" +_ACEOF - _gdk_tgt=`$PKG_CONFIG --variable=target gdk-2.0` - if test "x$_gdk_tgt" = xquartz; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ige-mac-integration" >&5 -$as_echo_n "checking for ige-mac-integration... " >&6; } - if $PKG_CONFIG --exists "ige-mac-integration" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IGE_MAC_CFLAGS" >&5 -$as_echo_n "checking for IGE_MAC_CFLAGS... " >&6; } - IGE_MAC_CFLAGS=`$PKG_CONFIG --cflags "ige-mac-integration"` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IGE_MAC_CFLAGS" >&5 -$as_echo "$IGE_MAC_CFLAGS" >&6; } +cat >>confdefs.h <<_ACEOF +#define POSTGIS_RASTER_MICRO_VERSION "$POSTGIS_RASTER_MICRO_VERSION" +_ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IGE_MAC_LIBS" >&5 -$as_echo_n "checking for IGE_MAC_LIBS... " >&6; } - IGE_MAC_LIBS=`$PKG_CONFIG --libs "ige-mac-integration"` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IGE_MAC_LIBS" >&5 -$as_echo "$IGE_MAC_LIBS" >&6; } - else - IGE_MAC_CFLAGS="" - IGE_MAC_LIBS="" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - fi - rm -f conf.gtktest + POSTGIS_RASTER_VERSION="$POSTGIS_RASTER_MAJOR_VERSION.$POSTGIS_RASTER_MINOR_VERSION" + POSTGIS_RASTER_LIB_VERSION="$POSTGIS_RASTER_MAJOR_VERSION.$POSTGIS_RASTER_MINOR_VERSION.$POSTGIS_RASTER_MICRO_VERSION" + POSTGIS_RASTER_BUILD_DATE=`date -u "+%Y-%m-%d %H:%M:%S"` + POSTGIS_RASTER_SCRIPTS_VERSION="$POSTGIS_RASTER_LIB_VERSION" - case $host in - *mingw32*) - GTK_WIN32_FLAGS=-mwindows - GTK_WIN32_RES=shp2pgsql-gui.res - GTK_WIN32_BUILD=gui-win32 - ;; - esac -fi +cat >>confdefs.h <<_ACEOF +#define POSTGIS_RASTER_VERSION "$POSTGIS_RASTER_VERSION" +_ACEOF +cat >>confdefs.h <<_ACEOF +#define POSTGIS_RASTER_LIB_VERSION "$POSTGIS_RASTER_LIB_VERSION" +_ACEOF +cat >>confdefs.h <<_ACEOF +#define POSTGIS_RASTER_BUILD_DATE "$POSTGIS_RASTER_BUILD_DATE" +_ACEOF +cat >>confdefs.h <<_ACEOF +#define POSTGIS_RASTER_SCRIPTS_VERSION "$POSTGIS_RASTER_SCRIPTS_VERSION" +_ACEOF @@ -16682,93 +19600,312 @@ -# Check whether --enable-debug was given. -if test "${enable_debug+set}" = set; then : - enableval=$enable_debug; POSTGIS_DEBUG_LEVEL=4 +# Check whether --with-raster-dblwarning was given. +if test "${with_raster_dblwarning+set}" = set; then : + withval=$with_raster_dblwarning; POSTGIS_RASTER_WARN_ON_TRUNCATION=1 else - POSTGIS_DEBUG_LEVEL=0 + POSTGIS_RASTER_WARN_ON_TRUNCATION=0 fi cat >>confdefs.h <<_ACEOF -#define POSTGIS_DEBUG_LEVEL $POSTGIS_DEBUG_LEVEL +#define POSTGIS_RASTER_WARN_ON_TRUNCATION $POSTGIS_RASTER_WARN_ON_TRUNCATION _ACEOF + USE_GDAL_SOURCE_TREE="no" + LIBGDAL_CFLAGS="" + LIBGDAL_LDFLAGS="" -# Check whether --enable-profile was given. -if test "${enable_profile+set}" = set; then : - enableval=$enable_profile; POSTGIS_PROFILE=1 + GDAL_MIN_VERSION=1.6.0 + GDAL_MIN_VERSION_NUMBER=160 + +# Check whether --with-gdalconfig was given. +if test "${with_gdalconfig+set}" = set; then : + withval=$with_gdalconfig; GDAL_CONFIG="$withval" else - POSTGIS_PROFILE=0 + # Extract the first word of "gdal-config", so it can be a program name with args. +set dummy gdal-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_GDAL_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $GDAL_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_GDAL_CONFIG="$GDAL_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_GDAL_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +GDAL_CONFIG=$ac_cv_path_GDAL_CONFIG +if test -n "$GDAL_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GDAL_CONFIG" >&5 +$as_echo "$GDAL_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GDAL >= $GDAL_MIN_VERSION" >&5 +$as_echo_n "checking for GDAL >= $GDAL_MIN_VERSION... " >&6; } + + if test -x "$GDAL_CONFIG"; then + GDAL_MAJOR_VERSION=`$GDAL_CONFIG --version | cut -d. -f1 | sed 's/[^0-9]//g'` + GDAL_MINOR_VERSION=`$GDAL_CONFIG --version | cut -d. -f2 | sed 's/[^0-9]//g'` + GDAL_PATCH_VERSION=`$GDAL_CONFIG --version | cut -d. -f3 | sed 's/[^0-9]//g'` + GDAL_FULL_VERSION=`$GDAL_CONFIG --version` + POSTGIS_GDAL_VERSION="$GDAL_MAJOR_VERSION$GDAL_MINOR_VERSION" + GDAL_VERSION_NUMBER="$GDAL_MAJOR_VERSION$GDAL_MINOR_VERSION$GDAL_PATCH_VERSION" + + if test ! "$GDAL_VERSION_NUMBER" -ge "$GDAL_MIN_VERSION_NUMBER" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } + as_fn_error $? "PostGIS raster requires GDAL >= $GDAL_MIN_VERSION. Use --without-raster to build without raster support." "$LINENO" 5 + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } + cat >>confdefs.h <<_ACEOF -#define POSTGIS_PROFILE $POSTGIS_PROFILE +#define POSTGIS_GDAL_VERSION $POSTGIS_GDAL_VERSION _ACEOF -POSTGIS_VERSION="$POSTGIS_MAJOR_VERSION.$POSTGIS_MINOR_VERSION USE_GEOS=1 USE_PROJ=1 USE_STATS=1" -if test "$HAVE_LIBXML2" = "1"; then - POSTGIS_VERSION="$POSTGIS_VERSION USE_LIBXML2=1" + LIBGDAL_LDFLAGS=`$GDAL_CONFIG --libs` + LIBGDAL_CFLAGS=`$GDAL_CONFIG --cflags` + + CPPFLAGS_SAVE="$CPPFLAGS" + CPPFLAGS="$LIBGDAL_CFLAGS" + CFLAGS_SAVE="$CFLAGS" + CFLAGS="" + LIBS_SAVE="$LIBS" + LIBS="$LIBGDAL_LDFLAGS" + + for ac_header in gdal.h ogr_api.h cpl_conv.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +else + as_fn_error $? "could not find headers include related to gdal" "$LINENO" 5 fi -POSTGIS_LIB_VERSION="$POSTGIS_MAJOR_VERSION.$POSTGIS_MINOR_VERSION.$POSTGIS_MICRO_VERSION" -POSTGIS_BUILD_DATE=`date -u "+%Y-%m-%d %H:%M:%S"` -POSTGIS_SCRIPTS_SVNREV=`perl utils/read_scripts_version.pl` -POSTGIS_SCRIPTS_VERSION="$POSTGIS_MAJOR_VERSION.$POSTGIS_MINOR_VERSION r$POSTGIS_SCRIPTS_SVNREV" +done -cat >>confdefs.h <<_ACEOF -#define POSTGIS_VERSION "$POSTGIS_VERSION" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing GDALAllRegister" >&5 +$as_echo_n "checking for library containing GDALAllRegister... " >&6; } +if ${ac_cv_search_GDALAllRegister+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char GDALAllRegister (); +int +main () +{ +return GDALAllRegister (); + ; + return 0; +} _ACEOF +for ac_lib in '' gdal; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_GDALAllRegister=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_GDALAllRegister+:} false; then : + break +fi +done +if ${ac_cv_search_GDALAllRegister+:} false; then : + +else + ac_cv_search_GDALAllRegister=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_GDALAllRegister" >&5 +$as_echo "$ac_cv_search_GDALAllRegister" >&6; } +ac_res=$ac_cv_search_GDALAllRegister +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" +else + as_fn_error $? "could not find gdal" "$LINENO" 5 +fi -cat >>confdefs.h <<_ACEOF -#define POSTGIS_LIB_VERSION "$POSTGIS_LIB_VERSION" -_ACEOF + LIBS="$LIBGDAL_LDFLAGS" -cat >>confdefs.h <<_ACEOF -#define POSTGIS_BUILD_DATE "$POSTGIS_BUILD_DATE" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing GDALFPolygonize" >&5 +$as_echo_n "checking for library containing GDALFPolygonize... " >&6; } +if ${ac_cv_search_GDALFPolygonize+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char GDALFPolygonize (); +int +main () +{ +return GDALFPolygonize (); + ; + return 0; +} _ACEOF +for ac_lib in '' gdal; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_GDALFPolygonize=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_GDALFPolygonize+:} false; then : + break +fi +done +if ${ac_cv_search_GDALFPolygonize+:} false; then : +else + ac_cv_search_GDALFPolygonize=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_GDALFPolygonize" >&5 +$as_echo "$ac_cv_search_GDALFPolygonize" >&6; } +ac_res=$ac_cv_search_GDALFPolygonize +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" cat >>confdefs.h <<_ACEOF -#define POSTGIS_SCRIPTS_VERSION "$POSTGIS_SCRIPTS_VERSION" +#define GDALFPOLYGONIZE 1 _ACEOF +fi + CPPFLAGS="$CPPFLAGS_SAVE" + CFLAGS="$CFLAGS_SAVE" + LIBS="$LIBS_SAVE" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } + as_fn_error $? "gdal-config not found. Use --without-raster or try --with-gdalconfig=<path to gdal-config>" "$LINENO" 5 + fi + RT_CORE_LIB=corelib + RT_PG_LIB=pglib + RT_LOADER=rtloader + RT_POSTGIS_SQL=rtpostgis.sql -cat >>confdefs.h <<_ACEOF -#define POSTGIS_AUTOCACHE_BBOX 1 -_ACEOF -cat >>confdefs.h <<_ACEOF -#define POSTGIS_USE_STATS 1 -_ACEOF -CPPFLAGS="$PGSQL_CPPFLAGS $GEOS_CPPFLAGS $PROJ_CPPFLAGS $XML2_CPPFLAGS" + RT_MAKEFILE_LIST=" + raster/Makefile \ + raster/rt_core/Makefile \ + raster/rt_pg/Makefile \ + raster/loader/Makefile \ + raster/test/Makefile \ + raster/test/core/Makefile \ + raster/test/regress/Makefile \ + raster/scripts/Makefile \ + raster/scripts/python/Makefile" + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: RASTER: Raster support disabled" >&5 +$as_echo "RASTER: Raster support disabled" >&6; } + RT_MAKEFILE_LIST="raster/Makefile" +fi + + +EXTENSIONS="" +if test $POSTGIS_PGSQL_VERSION -ge 91; then + if test \ + "x$XSLTPROC" != "x" -o \ + -e doc/postgis_comments.sql -a \ + -e doc/raster_comments.sql; + then + if test "x$RASTER" = "xraster"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabling PostgreSQL extension support..." >&5 +$as_echo "enabling PostgreSQL extension support..." >&6; } + EXTENSIONS=extensions + + fi + fi +fi -SHLIB_LINK="$PGSQL_LDFLAGS $GEOS_LDFLAGS $PROJ_LDFLAGS -lgeos_c -lproj $XML2_LDFLAGS" -ac_config_files="$ac_config_files liblwgeom/Makefile liblwgeom/cunit/Makefile postgis/Makefile postgis/sqldefines.h loader/Makefile topology/Makefile regress/Makefile doc/Makefile doc/Makefile.comments doc/html/image_src/Makefile" +ac_config_files="$ac_config_files GNUmakefile extensions/Makefile extensions/postgis/Makefile extensions/postgis/postgis.control extensions/postgis_topology/Makefile extensions/postgis_topology/postgis_topology.control liblwgeom/Makefile liblwgeom/cunit/Makefile liblwgeom/liblwgeom.h libpgcommon/Makefile libpgcommon/cunit/Makefile postgis/Makefile postgis/sqldefines.h loader/Makefile loader/cunit/Makefile topology/Makefile regress/Makefile doc/Makefile doc/Makefile.comments doc/html/image_src/Makefile utils/Makefile java/jdbc/Makefile $RT_MAKEFILE_LIST" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -17364,6 +20501,8 @@ ac_pwd='$ac_pwd' srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF @@ -17488,6 +20627,7 @@ enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' +PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' @@ -17570,7 +20710,6 @@ allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' @@ -17642,7 +20781,6 @@ allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld_CXX='`$ECHO "$hardcode_libdir_flag_spec_ld_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' @@ -17681,6 +20819,7 @@ # Quote evaled strings. for var in SHELL \ ECHO \ +PATH_SEPARATOR \ SED \ GREP \ EGREP \ @@ -17731,7 +20870,6 @@ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ -hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ @@ -17765,7 +20903,6 @@ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ hardcode_libdir_flag_spec_CXX \ -hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_separator_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX \ @@ -17848,6 +20985,13 @@ +# Capture the value of obsolete ALL_LINGUAS because we need it to compute + # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it + # from automake < 1.5. + eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' + # Capture the value of LINGUAS because we need it to compute CATALOGS. + LINGUAS="${LINGUAS-%UNSET%}" + _ACEOF @@ -17859,16 +21003,31 @@ case $ac_config_target in "postgis_config.h") CONFIG_HEADERS="$CONFIG_HEADERS postgis_config.h" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; + "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;; + "raster/raster_config.h") CONFIG_HEADERS="$CONFIG_HEADERS raster/raster_config.h" ;; + "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;; + "extensions/Makefile") CONFIG_FILES="$CONFIG_FILES extensions/Makefile" ;; + "extensions/postgis/Makefile") CONFIG_FILES="$CONFIG_FILES extensions/postgis/Makefile" ;; + "extensions/postgis/postgis.control") CONFIG_FILES="$CONFIG_FILES extensions/postgis/postgis.control" ;; + "extensions/postgis_topology/Makefile") CONFIG_FILES="$CONFIG_FILES extensions/postgis_topology/Makefile" ;; + "extensions/postgis_topology/postgis_topology.control") CONFIG_FILES="$CONFIG_FILES extensions/postgis_topology/postgis_topology.control" ;; "liblwgeom/Makefile") CONFIG_FILES="$CONFIG_FILES liblwgeom/Makefile" ;; "liblwgeom/cunit/Makefile") CONFIG_FILES="$CONFIG_FILES liblwgeom/cunit/Makefile" ;; + "liblwgeom/liblwgeom.h") CONFIG_FILES="$CONFIG_FILES liblwgeom/liblwgeom.h" ;; + "libpgcommon/Makefile") CONFIG_FILES="$CONFIG_FILES libpgcommon/Makefile" ;; + "libpgcommon/cunit/Makefile") CONFIG_FILES="$CONFIG_FILES libpgcommon/cunit/Makefile" ;; "postgis/Makefile") CONFIG_FILES="$CONFIG_FILES postgis/Makefile" ;; "postgis/sqldefines.h") CONFIG_FILES="$CONFIG_FILES postgis/sqldefines.h" ;; "loader/Makefile") CONFIG_FILES="$CONFIG_FILES loader/Makefile" ;; + "loader/cunit/Makefile") CONFIG_FILES="$CONFIG_FILES loader/cunit/Makefile" ;; "topology/Makefile") CONFIG_FILES="$CONFIG_FILES topology/Makefile" ;; "regress/Makefile") CONFIG_FILES="$CONFIG_FILES regress/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "doc/Makefile.comments") CONFIG_FILES="$CONFIG_FILES doc/Makefile.comments" ;; "doc/html/image_src/Makefile") CONFIG_FILES="$CONFIG_FILES doc/html/image_src/Makefile" ;; + "utils/Makefile") CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;; + "java/jdbc/Makefile") CONFIG_FILES="$CONFIG_FILES java/jdbc/Makefile" ;; + "$RT_MAKEFILE_LIST") CONFIG_FILES="$CONFIG_FILES $RT_MAKEFILE_LIST" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac @@ -18313,6 +21472,15 @@ # CONFIG_FILE # + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 @@ -18366,6 +21534,8 @@ s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ @@ -18440,8 +21610,8 @@ # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. @@ -18495,6 +21665,9 @@ # An echo program that protects backslashes. ECHO=$lt_ECHO +# The PATH separator for the build system. +PATH_SEPARATOR=$lt_PATH_SEPARATOR + # The host system. host_alias=$host_alias host=$host @@ -18796,10 +21969,6 @@ # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec -# If ld is used when linking, flag to hardcode \$libdir into a binary -# during linking. This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld - # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator @@ -19142,10 +22311,6 @@ # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX -# If ld is used when linking, flag to hardcode \$libdir into a binary -# during linking. This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX - # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX @@ -19221,6 +22386,119 @@ _LT_EOF ;; + "po-directories":C) + for ac_file in $CONFIG_FILES; do + # Support "outfile[:infile[:infile...]]" + case "$ac_file" in + *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + esac + # PO directories have a Makefile.in generated from Makefile.in.in. + case "$ac_file" in */Makefile.in) + # Adjust a relative srcdir. + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` + ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` + # In autoconf-2.13 it is called $ac_given_srcdir. + # In autoconf-2.50 it is called $srcdir. + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" + case "$ac_given_srcdir" in + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; + /*) top_srcdir="$ac_given_srcdir" ;; + *) top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + # Treat a directory as a PO directory if and only if it has a + # POTFILES.in file. This allows packages to have multiple PO + # directories under different names or in different locations. + if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then + rm -f "$ac_dir/POTFILES" + test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" + cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" + POMAKEFILEDEPS="POTFILES.in" + # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend + # on $ac_dir but don't depend on user-specified configuration + # parameters. + if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then + # The LINGUAS file contains the set of available languages. + if test -n "$OBSOLETE_ALL_LINGUAS"; then + test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" + fi + ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` + # Hide the ALL_LINGUAS assigment from automake < 1.5. + eval 'ALL_LINGUAS''=$ALL_LINGUAS_' + POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" + else + # The set of available languages was given in configure.in. + # Hide the ALL_LINGUAS assigment from automake < 1.5. + eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' + fi + # Compute POFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) + # Compute UPDATEPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) + # Compute DUMMYPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) + # Compute GMOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) + case "$ac_given_srcdir" in + .) srcdirpre= ;; + *) srcdirpre='$(srcdir)/' ;; + esac + POFILES= + UPDATEPOFILES= + DUMMYPOFILES= + GMOFILES= + for lang in $ALL_LINGUAS; do + POFILES="$POFILES $srcdirpre$lang.po" + UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" + DUMMYPOFILES="$DUMMYPOFILES $lang.nop" + GMOFILES="$GMOFILES $srcdirpre$lang.gmo" + done + # CATALOGS depends on both $ac_dir and the user's LINGUAS + # environment variable. + INST_LINGUAS= + if test -n "$ALL_LINGUAS"; then + for presentlang in $ALL_LINGUAS; do + useit=no + if test "%UNSET%" != "$LINGUAS"; then + desiredlanguages="$LINGUAS" + else + desiredlanguages="$ALL_LINGUAS" + fi + for desiredlang in $desiredlanguages; do + # Use the presentlang catalog if desiredlang is + # a. equal to presentlang, or + # b. a variant of presentlang (because in this case, + # presentlang can be used as a fallback for messages + # which are not translated in the desiredlang catalog). + case "$desiredlang" in + "$presentlang"*) useit=yes;; + esac + done + if test $useit = yes; then + INST_LINGUAS="$INST_LINGUAS $presentlang" + fi + done + fi + CATALOGS= + if test -n "$INST_LINGUAS"; then + for lang in $INST_LINGUAS; do + CATALOGS="$CATALOGS $lang.gmo" + done + fi + test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" + sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" + for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do + if test -f "$f"; then + case "$f" in + *.orig | *.bak | *~) ;; + *) cat "$f" >> "$ac_dir/Makefile" ;; + esac + fi + done + fi + ;; + esac + done ;; esac done # for ac_tag @@ -19273,6 +22551,8 @@ $as_echo " C compiler: ${CC} ${CFLAGS}" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: C++ compiler: ${CXX} ${CXXFLAGS}" >&5 $as_echo " C++ compiler: ${CXX} ${CXXFLAGS}" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: SQL preprocessor: ${SQLPP}" >&5 +$as_echo " SQL preprocessor: ${SQLPP}" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 $as_echo "" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: -------------- Dependencies -------------- " >&5 @@ -19281,6 +22561,12 @@ $as_echo " GEOS config: ${GEOSCONFIG}" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: GEOS version: ${GEOS_FULL_VERSION}" >&5 $as_echo " GEOS version: ${GEOS_FULL_VERSION}" >&6; } +if test "x$RASTER" = "xraster"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: GDAL config: ${GDAL_CONFIG}" >&5 +$as_echo " GDAL config: ${GDAL_CONFIG}" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: GDAL version: ${GDAL_FULL_VERSION}" >&5 +$as_echo " GDAL version: ${GDAL_FULL_VERSION}" >&6; } +fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: PostgreSQL config: ${PGCONFIG}" >&5 $as_echo " PostgreSQL config: ${PGCONFIG}" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: PostgreSQL version: ${PGSQL_FULL_VERSION}" >&5 @@ -19291,8 +22577,31 @@ $as_echo " Libxml2 config: ${XML2CONFIG}" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: Libxml2 version: ${POSTGIS_LIBXML2_VERSION}" >&5 $as_echo " Libxml2 version: ${POSTGIS_LIBXML2_VERSION}" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: JSON-C support: ${HAVE_JSON}" >&5 +$as_echo " JSON-C support: ${HAVE_JSON}" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: PostGIS debug level: ${POSTGIS_DEBUG_LEVEL}" >&5 $as_echo " PostGIS debug level: ${POSTGIS_DEBUG_LEVEL}" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Perl: ${PERL}" >&5 +$as_echo " Perl: ${PERL}" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 +$as_echo "" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: --------------- Extensions --------------- " >&5 +$as_echo " --------------- Extensions --------------- " >&6; } +if test "x$RASTER" = "xraster"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: PostGIS Raster: enabled" >&5 +$as_echo " PostGIS Raster: enabled" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: PostGIS Raster: disabled" >&5 +$as_echo " PostGIS Raster: disabled" >&6; } + +fi +if test "x$TOPOLOGY" = "xtopology"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: PostGIS Topology: enabled" >&5 +$as_echo " PostGIS Topology: enabled" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: PostGIS Topology: disabled" >&5 +$as_echo " PostGIS Topology: disabled" >&6; } +fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 $as_echo "" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: -------- Documentation Generation -------- " >&5 @@ -19305,7 +22614,27 @@ $as_echo " dblatex: ${DBLATEX}" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: convert: ${IMAGEMAGICK}" >&5 $as_echo " convert: ${IMAGEMAGICK}" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: mathml2.dtd: ${MATHML2_DTD}" >&5 +$as_echo " mathml2.dtd: ${MATHML2_DTD}" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 $as_echo "" >&6; } +if test "$GEOS_NUMERIC_VERSION" -lt 332; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: --------- GEOS VERSION NOTICE ------------ " >&5 +$as_echo " --------- GEOS VERSION NOTICE ------------ " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: You are building against GEOS ${GEOS_FULL_VERSION} " >&5 +$as_echo " You are building against GEOS ${GEOS_FULL_VERSION} " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: To take advantage of all the features of " >&5 +$as_echo " To take advantage of all the features of " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: PostGIS we recommend you build using " >&5 +$as_echo " PostGIS we recommend you build using " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: GEOS 3.3.2 or higher. You can download " >&5 +$as_echo " GEOS 3.3.2 or higher. You can download " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: the latest versions from " >&5 +$as_echo " the latest versions from " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: http://trac.osgeo.org/geos " >&5 +$as_echo " http://trac.osgeo.org/geos " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 +$as_echo "" >&6; } +fi diff -Nru postgis-1.5.3/configure.ac postgis-2.0.1/configure.ac --- postgis-1.5.3/configure.ac 2010-09-10 13:01:17.000000000 +0000 +++ postgis-2.0.1/configure.ac 2012-05-17 12:10:04.000000000 +0000 @@ -25,6 +25,24 @@ AC_PROG_CC AC_PROG_CPP AC_PROG_CXX +AC_PATH_PROG([ANT], [ant], []) +AC_SUBST([ANT]) + +dnl +dnl SQL Preprocessor +dnl +AC_PATH_PROG([CPPBIN], [cpp], []) +if test "x$CPPBIN" != "x"; then + SQLPP="${CPPBIN} -traditional-cpp -P" +else + AC_PATH_PROG([GPP], [gpp_], []) + if test "x$GPP" != "x"; then + SQLPP="${GPP} -C -s \'" dnl Use better string support + else + SQLPP="${CPP} -traditional-cpp" + fi +fi +AC_SUBST([SQLPP]) dnl dnl Define PIC flags in PICFLAGS (note: this variable is set as part of libtool initialisation above) @@ -82,6 +100,18 @@ dnl AC_CHECK_HEADER([ieeefp.h], [HAVE_IEEEFP_H=1], [HAVE_IEEEFP_H=0]) AC_DEFINE_UNQUOTED([HAVE_IEEEFP_H], [$HAVE_IEEEFP_H], [ieeefp.h header]) +AC_CHECK_HEADER([termios.h], [HAVE_TERMIOS_H=1], [HAVE_TERMIOS_H=0]) +AC_DEFINE_UNQUOTED([HAVE_TERMIOS_H], [$HAVE_TERMIOS_H], [termios.h header]) + + +dnl +dnl Check for platform-specific functions +dnl +AC_CHECK_FUNC(vasprintf, [HAVE_VASPRINTF=1], [HAVE_VASPRINTF=0]) +AC_DEFINE([HAVE_VASPRINTF]) +AC_CHECK_FUNC(asprintf, [HAVE_ASPRINTF=1], [HAVE_ASPRINTF=0]) +AC_DEFINE([HAVE_ASPRINTF]) +AC_FUNC_FSEEKO() dnl dnl MingW requires use of pwd -W to give proper Windows (not MingW) paths @@ -89,15 +119,19 @@ dnl case $host_os in *mingw*) - PWDREGRESS="pwd -W" + MINGWBUILD=1 ;; *) - PWDREGRESS="pwd" + MINGWBUILD=0 ;; esac -AC_DEFINE_UNQUOTED([PWDREGRESS]) -AC_SUBST([PWDREGRESS]) +AC_SUBST([MINGWBUILD]) +AC_PATH_PROG([PERL], [perl], []) +if test "x$PERL" = "x"; then + AC_MSG_ERROR([Perl was not found. Building PostGIS requires Perl.]) +fi +AC_SUBST([PERL]) dnl =========================================================================== dnl Find components needed to build documentation @@ -116,6 +150,11 @@ AC_MSG_WARN([xsltproc is not installed so documentation cannot be built]) fi +AC_PATH_PROG([XMLLINT], [xmllint], []) +if test "x$XMLLINT" = "x"; then + AC_MSG_WARN([xmllint is not installed so documentation cannot be checked]) +fi + AC_PATH_PROG([DBLATEX], [dblatex], []) if test "x$DBLATEX" = "x"; then AC_MSG_WARN([dblatex is not installed so PDF documentation cannot be built]) @@ -182,6 +221,23 @@ AC_SUBST([XSLBASE]) +dnl +dnl Let's see if we can find mathml2.dtd +dnl + +MATHML2_DTD="http://www.w3.org/Math/DTD/mathml2/mathml2.dtd" +dnl TODO: get more paths to add here... +SEARCHPATH=" + /usr/share/xml/schema/w3c/mathml/dtd + " +for p in ${SEARCHPATH}; do + if test -r "${p}"/mathml2.dtd; then + MATHML2_DTD="${p}/mathml2.dtd" + break + fi +done + +AC_SUBST([MATHML2_DTD]) dnl =========================================================================== dnl Detect CUnit if it is installed (used for unit testing) @@ -319,6 +375,10 @@ PGSQL_FULL_VERSION=`$PGCONFIG --version` POSTGIS_PGSQL_VERSION="$PGSQL_MAJOR_VERSION$PGSQL_MINOR_VERSION" +PGSQL_PKGLIBDIR=`$PGCONFIG --pkglibdir` +PGSQL_LIBDIR=`$PGCONFIG --libdir` +PGSQL_SHAREDIR=`$PGCONFIG --sharedir` + AC_MSG_RESULT([checking PostgreSQL version... $PGSQL_FULL_VERSION]) dnl Ensure that we are using PostgreSQL >= 8.3 if test ! "$PGSQL_MAJOR_VERSION" -ge 8; then @@ -349,6 +409,18 @@ AC_SUBST([PGSQL_FE_LDFLAGS]) AC_SUBST([PGSQL_FE_CPPFLAGS]) +dnl Extract the include flags for the backend (libpgcommon) +PGSRV_INC=`$PGCONFIG --includedir-server` +PGSQL_BE_CPPFLAGS="-I${PGSRV_INC}" +dnl Add $PGSRV_INC/port/win32 to MinGW build to pick up netdb.h +case $host in + *mingw32*) + PGSQL_BE_CPPFLAGS="${PGSQL_BE_CPPFLAGS} -I${PGSRV_INC}/port/win32" + ;; +esac + +AC_SUBST([PGSQL_BE_CPPFLAGS]) + dnl Extract the documentation and man page directories PGSQL_DOCDIR=`$PGCONFIG --docdir` PGSQL_MANDIR=`$PGCONFIG --mandir` @@ -356,6 +428,10 @@ AC_SUBST([PGSQL_DOCDIR]) AC_SUBST([PGSQL_MANDIR]) +dnl Extract the locale directory +PGSQL_LOCALEDIR=`$PGCONFIG --localedir` +AC_DEFINE_UNQUOTED([PGSQL_LOCALEDIR], ["$PGSQL_LOCALEDIR"], [Location of PostgreSQL locale directory]) + dnl Extract the executable directory PGSQL_BINDIR=`$PGCONFIG --bindir` @@ -386,6 +462,21 @@ dnl =========================================================================== +dnl Explain our prefix policy if necessary. +dnl =========================================================================== + +if test "$prefix" != "NONE"; then + AC_MSG_RESULT([------------------------------------------------------------------------]) + AC_MSG_RESULT([ WARNING: You have set the --prefix to '$prefix'. But we mostly ]) + AC_MSG_RESULT([ ignore the --prefix. For your info, using the values determined from ]) + AC_MSG_RESULT([ $PGCONFIG we will be installing: ]) + AC_MSG_RESULT([ * postgis shared library in $PGSQL_LIBDIR ]) + AC_MSG_RESULT([ * postgis SQL files in $PGSQL_SHAREDIR/contrib/postgis-$POSTGIS_MAJOR_VERSION.$POSTGIS_MINOR_VERSION ]) + AC_MSG_RESULT([ * postgis executables in $PGSQL_BINDIR ]) + AC_MSG_RESULT([------------------------------------------------------------------------]) +fi + +dnl =========================================================================== dnl Detect libxml2 if it is installed dnl (needed to GeomFromGML and GeomFromKML functions) dnl =========================================================================== @@ -428,11 +519,13 @@ CPPFLAGS="$XML2_CPPFLAGS" AC_CHECK_HEADERS([libxml/tree.h libxml/parser.h libxml/xpath.h libxml/xpathInternals.h], [], [AC_MSG_ERROR([could not find headers include related to libxml2])]) +CPPFLAGS="$CPPFLAGS_SAVE" dnl Ensure we can link against libxml2 LIBS_SAVE="$LIBS" LIBS="$XML2_LDFLAGS" AC_CHECK_LIB([xml2], [xmlInitParser], [], [AC_MSG_ERROR([could not find libxml2])], []) +LIBS="$LIBS_SAVE" AC_DEFINE_UNQUOTED([POSTGIS_LIBXML2_VERSION], ["$POSTGIS_LIBXML2_VERSION"], [PostGIS libxml2 version]) AC_SUBST([POSTGIS_LIBXML2_VERSION]) @@ -475,6 +568,9 @@ GEOS_MAJOR_VERSION=`$GEOSCONFIG --version | cut -d. -f1 | sed 's/[[^0-9]]//g'` GEOS_MINOR_VERSION=`$GEOSCONFIG --version | cut -d. -f2 | sed 's/[[^0-9]]//g'` GEOS_PATCH_VERSION=`$GEOSCONFIG --version | cut -d. -f3 | sed 's/[[^0-9]]//g'` +if test "x$GEOS_PATCH_VERSION" = "x"; then + GEOS_PATCH_VERSION="0"; +fi GEOS_FULL_VERSION=`$GEOSCONFIG --version` POSTGIS_GEOS_VERSION="$GEOS_MAJOR_VERSION$GEOS_MINOR_VERSION" GEOS_NUMERIC_VERSION="$GEOS_MAJOR_VERSION$GEOS_MINOR_VERSION$GEOS_PATCH_VERSION" @@ -488,6 +584,8 @@ dnl Extract the linker and include flags GEOS_LDFLAGS=`$GEOSCONFIG --ldflags` GEOS_CPPFLAGS=-I`$GEOSCONFIG --includes` +AC_SUBST([GEOS_LDFLAGS]) +AC_SUBST([GEOS_CPPFLAGS]) dnl Ensure that we can parse geos_c.h CPPFLAGS_SAVE="$CPPFLAGS" @@ -509,6 +607,43 @@ dnl =========================================================================== +dnl Detect gettext +dnl =========================================================================== + +GETTEXT_CFLAGS="" +GETTEXT_LDFLAGS="" + +AC_ARG_WITH([gettext], + [AS_HELP_STRING([--with-gettext=PATH], [specify a path to non-default gettext installation])], + [GETTEXT_PATH="$withval"], [GETTEXT_PATH="yes"]) + +LDFLAGS_SAVE="$LDFLAGS" +CFLAGS_SAVE="$CFLAGS" + +if test "x$GETTEXT_PATH" != "xno"; then + dnl If user has specified a custom gettext installation path, use it. + if test "x$GETTEXT_PATH" != "xyes"; then + AC_MSG_RESULT([checking user-specified gettext location: $GETTEXT_PATH]) + GETTEXT_CFLAGS="-I$GETTEXT_PATH/include" + GETTEXT_LDFLAGS="-L$GETTEXT_PATH/lib" + LDFLAGS="$GETTEXT_LDFLAGS $LDFLAGS" + CFLAGS="$GETTEXT_CFLAGS $CFLAGS" + fi + + AM_GNU_GETTEXT([external], [], []) + + if test "x$LIBINTL" = "x"; then + USE_NLS=no + fi +fi + +AC_SUBST([GETTEXT_CFLAGS]) +AC_SUBST([GETTEXT_LDFLAGS]) + +LDFLAGS="$LDFLAGS_SAVE" +CFLAGS="$CFLAGS_SAVE" + +dnl =========================================================================== dnl Detect the version of PROJ.4 installed dnl =========================================================================== @@ -519,7 +654,7 @@ if test ! "x$PROJDIR" = "x"; then dnl Make sure that the directory exists if test "x$PROJDIR" = "xyes"; then - AC_MSG_ERROR([you must specifiy a parameter to --with-projdir, e.g. --with-projdir=/path/to]) + AC_MSG_ERROR([you must specify a parameter to --with-projdir, e.g. --with-projdir=/path/to]) else if test -d "$PROJDIR"; then AC_MSG_RESULT([Using user-specified proj directory: $PROJDIR]) @@ -545,6 +680,9 @@ AC_SUBST([POSTGIS_PROJ_VERSION]) CPPFLAGS="$CPPFLAGS_SAVE" +AC_SUBST([PROJ_CPPFLAGS]) +AC_SUBST([PROJ_LDFLAGS]) + dnl Ensure that we are using PROJ >= 4.5.0 (requires pj_set_searchpath) if test ! "$POSTGIS_PROJ_VERSION" -ge 45; then AC_MSG_ERROR([PostGIS requires PROJ >= 4.5.0]) @@ -560,6 +698,62 @@ LIBS="$LIBS_SAVE" dnl =========================================================================== +dnl Detect if json-c installed +dnl =========================================================================== + +HAVE_JSON=no +AC_SUBST([HAVE_JSON]) + +AC_ARG_WITH([jsondir], + [AS_HELP_STRING([--with-jsondir=PATH], [specify the json-c installation directory])], + [JSONDIR="$withval"], [JSONDIR=]) + +if test ! "x$JSONDIR" = "x"; then + dnl Make sure that the directory exists + if test "x$JSONDIR" = "xyes"; then + AC_MSG_ERROR([you must specify a parameter to --with-jsondir, e.g. --with-jsondir=/path/to]) + else + dnl We need (libjson.so OR libjson.a OR libjson.dll) AND json/json.h + if test ! -e "${JSONDIR}/include/json/json.h" -o \ + ! \( -e "${JSONDIR}/lib/libjson.so" -o \ + -e "${JSONDIR}/lib/libjson.dll" -o \ + -e "${JSONDIR}/lib/libjson.dylib" -o \ + -e "${JSONDIR}/bin/libjson.dll" -o \ + -e "${JSONDIR}/lib/libjson.a" \) + then + AC_MSG_ERROR([Cannot find json dev files in "$JSONDIR"]) + fi + AC_MSG_RESULT([Using user-specified json-c directory: $JSONDIR]) + + dnl Add the include directory to JSON_CPPFLAGS + JSON_CPPFLAGS="-I$JSONDIR/include" + JSON_LDFLAGS="-L$JSONDIR/lib -ljson" + fi +fi + +dnl Check that we can find the json/json.h header file +CPPFLAGS_SAVE="$CPPFLAGS" +CPPFLAGS="$JSON_CPPFLAGS" +AC_CHECK_HEADER([json/json.h], [HAVE_JSON=yes], []) +CPPFLAGS="$CPPFLAGS_SAVE" + +dnl Ensure we can link against libjson +LIBS_SAVE="$LIBS" +LIBS="$JSON_LDFLAGS" +AC_CHECK_LIB([json], [json_object_get], [HAVE_JSON=yes], [], []) +LIBS="$LIBS_SAVE" + +if test "$HAVE_JSON" = "yes"; then + AC_DEFINE([HAVE_LIBJSON], 1, [Define to 1 if libjson is present]) + if test "x$JSON_LDFLAGS" = "x"; then + JSON_LDFLAGS="-ljson" + fi +fi + +AC_SUBST([JSON_CPPFLAGS]) +AC_SUBST([JSON_LDFLAGS]) + +dnl =========================================================================== dnl Detect GTK+2.0 for GUI dnl =========================================================================== @@ -593,7 +787,6 @@ AC_SUBST([IGE_MAC_LIBS]) - dnl =========================================================================== dnl Allow the user to enable debugging with --enable-debug dnl @@ -625,8 +818,7 @@ POSTGIS_LIB_VERSION="$POSTGIS_MAJOR_VERSION.$POSTGIS_MINOR_VERSION.$POSTGIS_MICRO_VERSION" POSTGIS_BUILD_DATE=`date -u "+%Y-%m-%d %H:%M:%S"` -POSTGIS_SCRIPTS_SVNREV=`perl utils/read_scripts_version.pl` -POSTGIS_SCRIPTS_VERSION="$POSTGIS_MAJOR_VERSION.$POSTGIS_MINOR_VERSION r$POSTGIS_SCRIPTS_SVNREV" +POSTGIS_SCRIPTS_VERSION="$POSTGIS_LIB_VERSION" AC_DEFINE_UNQUOTED([POSTGIS_VERSION], ["$POSTGIS_VERSION"], [PostGIS version]) AC_DEFINE_UNQUOTED([POSTGIS_LIB_VERSION], ["$POSTGIS_LIB_VERSION"], [PostGIS library version]) @@ -650,16 +842,277 @@ AC_DEFINE_UNQUOTED([POSTGIS_USE_STATS], [1], [Enable use of ANALYZE statistics]) -CPPFLAGS="$PGSQL_CPPFLAGS $GEOS_CPPFLAGS $PROJ_CPPFLAGS $XML2_CPPFLAGS" +CPPFLAGS="$PGSQL_CPPFLAGS $GEOS_CPPFLAGS $PROJ_CPPFLAGS $JSON_CPPFLAGS $XML2_CPPFLAGS" dnl AC_MSG_RESULT([CPPFLAGS: $CPPFLAGS]) -SHLIB_LINK="$PGSQL_LDFLAGS $GEOS_LDFLAGS $PROJ_LDFLAGS -lgeos_c -lproj $XML2_LDFLAGS" +SHLIB_LINK="$PGSQL_LDFLAGS $GEOS_LDFLAGS $PROJ_LDFLAGS -lgeos_c -lproj $JSON_LDFLAGS $XML2_LDFLAGS" AC_SUBST([SHLIB_LINK]) dnl AC_MSG_RESULT([SHLIB_LINK: $SHLIB_LINK]) +dnl ==================================== +dnl topology stuff +dnl ==================================== +AC_ARG_WITH([topology], + [AS_HELP_STRING([--without-topology], + [Disable the topology extension])], + [], []) + +if test "x$with_topology" != "xno"; then + + TOPOLOGY="topology" + AC_MSG_RESULT([TOPOLOGY: Topology support requested]) + if test "$GEOS_NUMERIC_VERSION" -lt 332; then + AC_MSG_ERROR([Topology requires GEOS version >= 3.3.2. Use --without-topology or install a newer GEOS.]) + fi +else + AC_MSG_RESULT([TOPOLOGY: Topology support disabled]) +fi + +AC_SUBST([TOPOLOGY]) + +dnl =========================================================================== +dnl SRID stuff +dnl =========================================================================== + +SRID_MAX=999999 +SRID_USR_MAX=998999 +AC_SUBST([SRID_MAX]) +AC_SUBST([SRID_USR_MAX]) + + +dnl ==================================== +dnl raster stuff +dnl ==================================== +AC_ARG_WITH( + [raster], + AC_HELP_STRING([--without-raster], [Disable the raster extension]), + [], []) + +if test "x$with_raster" != "xno"; then + RASTER="raster" + AC_MSG_RESULT([RASTER: Raster support requested]) + + AC_CONFIG_HEADERS([raster/raster_config.h]) + + dnl + dnl Raster Version Information imported from raster/Version.config + dnl + POSTGIS_RASTER_MAJOR_VERSION=`cat raster/Version.config | grep POSTGIS_RASTER_MAJOR_VERSION | sed 's/[[^=]]*=\([[0-9]]\)/\1/g'` + POSTGIS_RASTER_MINOR_VERSION=`cat raster/Version.config | grep POSTGIS_RASTER_MINOR_VERSION | sed 's/[[^=]]*=\([[0-9]]\)/\1/g'` + POSTGIS_RASTER_MICRO_VERSION=`cat raster/Version.config | grep POSTGIS_RASTER_MICRO_VERSION | sed 's/[[^=]]*=\([[0-9]]\)/\1/g'` + + AC_DEFINE_UNQUOTED([POSTGIS_RASTER_MAJOR_VERSION], ["$POSTGIS_RASTER_MAJOR_VERSION"], [PostGIS Raster major version]) + AC_DEFINE_UNQUOTED([POSTGIS_RASTER_MINOR_VERSION], ["$POSTGIS_RASTER_MINOR_VERSION"], [PostGIS Raster minor version]) + AC_DEFINE_UNQUOTED([POSTGIS_RASTER_MICRO_VERSION], ["$POSTGIS_RASTER_MICRO_VERSION"], [PostGIS Raster micro version]) + + AC_SUBST([POSTGIS_RASTER_MAJOR_VERSION]) + AC_SUBST([POSTGIS_RASTER_MINOR_VERSION]) + AC_SUBST([POSTGIS_RASTER_MICRO_VERSION]) + + dnl ============================== + dnl Define raster version macros + dnl ============================== + POSTGIS_RASTER_VERSION="$POSTGIS_RASTER_MAJOR_VERSION.$POSTGIS_RASTER_MINOR_VERSION" + POSTGIS_RASTER_LIB_VERSION="$POSTGIS_RASTER_MAJOR_VERSION.$POSTGIS_RASTER_MINOR_VERSION.$POSTGIS_RASTER_MICRO_VERSION" + POSTGIS_RASTER_BUILD_DATE=`date -u "+%Y-%m-%d %H:%M:%S"` + POSTGIS_RASTER_SCRIPTS_VERSION="$POSTGIS_RASTER_LIB_VERSION" + + AC_DEFINE_UNQUOTED([POSTGIS_RASTER_VERSION], ["$POSTGIS_RASTER_VERSION"], [PostGIS Raster version]) + AC_DEFINE_UNQUOTED([POSTGIS_RASTER_LIB_VERSION], ["$POSTGIS_RASTER_LIB_VERSION"], [PostGIS Raster library version]) + AC_DEFINE_UNQUOTED([POSTGIS_RASTER_BUILD_DATE], ["$POSTGIS_RASTER_BUILD_DATE"], [PostGIS Raster build date]) + AC_DEFINE_UNQUOTED([POSTGIS_RASTER_SCRIPTS_VERSION], ["$POSTGIS_RASTER_SCRIPTS_VERSION"], [PostGIS Raster scripts version]) + + AC_SUBST([POSTGIS_RASTER_VERSION]) + AC_SUBST([POSTGIS_RASTER_LIB_VERSION]) + AC_SUBST([POSTGIS_RASTER_BUILD_DATE]) + AC_SUBST([POSTGIS_RASTER_SCRIPTS_VERSION]) + + dnl =========================================================================== + dnl Allow output of double truncation warnings with --with-raster-dblwarning + dnl =========================================================================== + AC_ARG_WITH( + [raster-dblwarning], + AC_HELP_STRING([--with-raster-dblwarning], [output double truncation warnings. Only used with --with-raster]), + [POSTGIS_RASTER_WARN_ON_TRUNCATION=1], + [POSTGIS_RASTER_WARN_ON_TRUNCATION=0]) + + AC_DEFINE_UNQUOTED( + [POSTGIS_RASTER_WARN_ON_TRUNCATION], + [$POSTGIS_RASTER_WARN_ON_TRUNCATION], + [Define to 1 if a warning is outputted every time a double is truncated]) + + dnl ======================================================================== + dnl Determine GDAL Support + dnl + dnl TODO: Now, --with-gdalconfig can have only 1 value: path to gdal-config. It + dnl could be useful to allow path to GDAL tree, because the cflags and the + dnl libs can be obtained from GDAL tree too, apart from gdal-config + dnl How to get cflags and libs from GDAL tree? + dnl + dnl LIBGDAL_CFLAGS="-I$with_gdal/port -I$with_gdal/ogr -I$with_gdal/alg -I$with_gdal/gcore -I$with_gdal/frmts " + dnl LIBGDAL_LDFLAGS="-L${with_gdal}/.libs -lgdal -L${with_gdal}/ -lgdal" + dnl ======================================================================== + dnl not used right now + USE_GDAL_SOURCE_TREE="no" + LIBGDAL_CFLAGS="" + LIBGDAL_LDFLAGS="" + + dnl GDAL version constants, update here + GDAL_MIN_VERSION=1.6.0 + GDAL_MIN_VERSION_NUMBER=160 dnl TODO: Use GDAL version calculation MAJOR*1000+MINOR*100+REV*10+BUILD + + AC_ARG_WITH( + [gdalconfig], + AC_HELP_STRING([--with-gdalconfig=@<:@ARG@:>@],[specify location of gdal-config (ARG=path). Only used with --with-raster]), + [GDAL_CONFIG="$withval"], + [AC_PATH_PROG([GDAL_CONFIG], [gdal-config], [])] + ) + + AC_MSG_CHECKING([for GDAL >= $GDAL_MIN_VERSION]) + + if test -x "$GDAL_CONFIG"; then + dnl Extract the version information from gdal-config + dnl Note: we extract the major & minor separately, ensure they are numeric, + dnl and then combine to give the final version. + dnl This is to guard against user error... + GDAL_MAJOR_VERSION=`$GDAL_CONFIG --version | cut -d. -f1 | sed 's/[[^0-9]]//g'` + GDAL_MINOR_VERSION=`$GDAL_CONFIG --version | cut -d. -f2 | sed 's/[[^0-9]]//g'` + GDAL_PATCH_VERSION=`$GDAL_CONFIG --version | cut -d. -f3 | sed 's/[[^0-9]]//g'` + GDAL_FULL_VERSION=`$GDAL_CONFIG --version` + POSTGIS_GDAL_VERSION="$GDAL_MAJOR_VERSION$GDAL_MINOR_VERSION" + GDAL_VERSION_NUMBER="$GDAL_MAJOR_VERSION$GDAL_MINOR_VERSION$GDAL_PATCH_VERSION" + + dnl Ensure we are using minimum required version of GDAL + if test ! "$GDAL_VERSION_NUMBER" -ge "$GDAL_MIN_VERSION_NUMBER" ; then + AC_MSG_RESULT([not found]) + AC_MSG_ERROR([PostGIS raster requires GDAL >= $GDAL_MIN_VERSION. Use --without-raster to build without raster support.]) + fi + + AC_MSG_RESULT([found]) + + AC_DEFINE_UNQUOTED([POSTGIS_GDAL_VERSION], [$POSTGIS_GDAL_VERSION], [GDAL library version]) + AC_SUBST([POSTGIS_GDAL_VERSION]) + + dnl Extract the linker and include flags + LIBGDAL_LDFLAGS=`$GDAL_CONFIG --libs` + LIBGDAL_CFLAGS=`$GDAL_CONFIG --cflags` + + CPPFLAGS_SAVE="$CPPFLAGS" + CPPFLAGS="$LIBGDAL_CFLAGS" + CFLAGS_SAVE="$CFLAGS" + CFLAGS="" + LIBS_SAVE="$LIBS" + LIBS="$LIBGDAL_LDFLAGS" + + dnl Check headers file + AC_CHECK_HEADERS( + [gdal.h ogr_api.h cpl_conv.h], + [], + [AC_MSG_ERROR([could not find headers include related to gdal])]) + + dnl Ensure we can link against gdal + AC_SEARCH_LIBS([GDALAllRegister], [gdal], [], [AC_MSG_ERROR([could not find gdal])], []) + + LIBS="$LIBGDAL_LDFLAGS" + + dnl Check if the new polygonize function is present + AC_SEARCH_LIBS( + [GDALFPolygonize], + [gdal], + [AC_DEFINE_UNQUOTED([GDALFPOLYGONIZE], [1], [Define to 1 if GDALFPolygonize function is available])], + []) + + CPPFLAGS="$CPPFLAGS_SAVE" + CFLAGS="$CFLAGS_SAVE" + LIBS="$LIBS_SAVE" + + AC_SUBST([LIBGDAL_CFLAGS]) + AC_SUBST([LIBGDAL_LDFLAGS]) + + AC_SUBST([GDALFPOLYGONIZE]) + else + AC_MSG_RESULT([not found]) + AC_MSG_ERROR([gdal-config not found. Use --without-raster or try --with-gdalconfig=<path to gdal-config>]) + fi + + dnl Define raster objects, for makefiles + RT_CORE_LIB=corelib + RT_PG_LIB=pglib + RT_LOADER=rtloader + RT_POSTGIS_SQL=rtpostgis.sql + + AC_SUBST([RASTER]) + AC_SUBST([RT_CORE_LIB]) + AC_SUBST([RT_PG_LIB]) + AC_SUBST([RT_LOADER]) + AC_SUBST([RT_POSTGIS_SQL]) + + RT_MAKEFILE_LIST=" + raster/Makefile \ + raster/rt_core/Makefile \ + raster/rt_pg/Makefile \ + raster/loader/Makefile \ + raster/test/Makefile \ + raster/test/core/Makefile \ + raster/test/regress/Makefile \ + raster/scripts/Makefile \ + raster/scripts/python/Makefile" + +else + AC_MSG_RESULT([RASTER: Raster support disabled]) + RT_MAKEFILE_LIST="raster/Makefile" +fi + +dnl =========================================================================== +dnl See if we have the requirements for building the extensions, namely +dnl PostgreSQL 9.1 or better and the xlstproc tool for generating the commends +dnl SQL file. +dnl =========================================================================== + +EXTENSIONS="" +if test $POSTGIS_PGSQL_VERSION -ge 91; then + if test \ + "x$XSLTPROC" != "x" -o \ + -e doc/postgis_comments.sql -a \ + -e doc/raster_comments.sql; + then + if test "x$RASTER" = "xraster"; then + AC_MSG_RESULT([enabling PostgreSQL extension support...]) + EXTENSIONS=extensions + AC_SUBST([EXTENSIONS]) + fi + fi +fi + + +dnl =========================================================================== dnl Output the relevant files -AC_OUTPUT([liblwgeom/Makefile liblwgeom/cunit/Makefile postgis/Makefile postgis/sqldefines.h loader/Makefile topology/Makefile regress/Makefile doc/Makefile doc/Makefile.comments doc/html/image_src/Makefile]) +dnl =========================================================================== +AC_OUTPUT([GNUmakefile + extensions/Makefile + extensions/postgis/Makefile + extensions/postgis/postgis.control + extensions/postgis_topology/Makefile + extensions/postgis_topology/postgis_topology.control + liblwgeom/Makefile + liblwgeom/cunit/Makefile + liblwgeom/liblwgeom.h + libpgcommon/Makefile + libpgcommon/cunit/Makefile + postgis/Makefile + postgis/sqldefines.h + loader/Makefile + loader/cunit/Makefile + topology/Makefile + regress/Makefile + doc/Makefile + doc/Makefile.comments + doc/html/image_src/Makefile + utils/Makefile + java/jdbc/Makefile + $RT_MAKEFILE_LIST]) + dnl =========================================================================== dnl Display the configuration status information dnl =========================================================================== @@ -670,22 +1123,53 @@ AC_MSG_RESULT([ -------------- Compiler Info ------------- ]) AC_MSG_RESULT([ C compiler: ${CC} ${CFLAGS}]) AC_MSG_RESULT([ C++ compiler: ${CXX} ${CXXFLAGS}]) +AC_MSG_RESULT([ SQL preprocessor: ${SQLPP}]) AC_MSG_RESULT() AC_MSG_RESULT([ -------------- Dependencies -------------- ]) AC_MSG_RESULT([ GEOS config: ${GEOSCONFIG}]) AC_MSG_RESULT([ GEOS version: ${GEOS_FULL_VERSION}]) +if test "x$RASTER" = "xraster"; then + AC_MSG_RESULT([ GDAL config: ${GDAL_CONFIG}]) + AC_MSG_RESULT([ GDAL version: ${GDAL_FULL_VERSION}]) +fi AC_MSG_RESULT([ PostgreSQL config: ${PGCONFIG}]) AC_MSG_RESULT([ PostgreSQL version: ${PGSQL_FULL_VERSION}]) AC_MSG_RESULT([ PROJ4 version: ${POSTGIS_PROJ_VERSION}]) AC_MSG_RESULT([ Libxml2 config: ${XML2CONFIG}]) AC_MSG_RESULT([ Libxml2 version: ${POSTGIS_LIBXML2_VERSION}]) +AC_MSG_RESULT([ JSON-C support: ${HAVE_JSON}]) AC_MSG_RESULT([ PostGIS debug level: ${POSTGIS_DEBUG_LEVEL}]) +AC_MSG_RESULT([ Perl: ${PERL}]) +AC_MSG_RESULT() +AC_MSG_RESULT([ --------------- Extensions --------------- ]) +if test "x$RASTER" = "xraster"; then + AC_MSG_RESULT([ PostGIS Raster: enabled]) +else + AC_MSG_RESULT([ PostGIS Raster: disabled]) + +fi +if test "x$TOPOLOGY" = "xtopology"; then + AC_MSG_RESULT([ PostGIS Topology: enabled]) +else + AC_MSG_RESULT([ PostGIS Topology: disabled]) +fi AC_MSG_RESULT() AC_MSG_RESULT([ -------- Documentation Generation -------- ]) AC_MSG_RESULT([ xsltproc: ${XSLTPROC}]) AC_MSG_RESULT([ xsl style sheets: ${XSLBASE}]) AC_MSG_RESULT([ dblatex: ${DBLATEX}]) AC_MSG_RESULT([ convert: ${IMAGEMAGICK}]) +AC_MSG_RESULT([ mathml2.dtd: ${MATHML2_DTD}]) AC_MSG_RESULT() +if test "$GEOS_NUMERIC_VERSION" -lt 332; then +AC_MSG_RESULT([ --------- GEOS VERSION NOTICE ------------ ]) +AC_MSG_RESULT([ You are building against GEOS ${GEOS_FULL_VERSION} ]) +AC_MSG_RESULT([ To take advantage of all the features of ]) +AC_MSG_RESULT([ PostGIS we recommend you build using ]) +AC_MSG_RESULT([ GEOS 3.3.2 or higher. You can download ]) +AC_MSG_RESULT([ the latest versions from ]) +AC_MSG_RESULT([ http://trac.osgeo.org/geos ]) +AC_MSG_RESULT() +fi diff -Nru postgis-1.5.3/debian/changelog postgis-2.0.1/debian/changelog --- postgis-1.5.3/debian/changelog 2012-06-08 14:05:14.000000000 +0000 +++ postgis-2.0.1/debian/changelog 2012-09-06 12:28:15.000000000 +0000 @@ -1,8 +1,17 @@ -postgis (1.5.3-3~precise1) precise; urgency=low +postgis (2.0.1-2~precise1) precise; urgency=low * Launchpad build for Precise + * Removed libpostgis-java - -- Jerome Villeneuve Larouche <jlarouche@mapgears.com> Fri, 08 Jun 2012 14:04:26 +0000 + -- Jerome Villeneuve Larouche <jlarouche@mapgears.com> Thu, 23 Aug 2012 16:15:01 +0000 + +postgis (2.0.1-1) unstable; urgency=low + + * New upstream release, 2.0.1 + * Removed old patches + * Added Makefile.comments patch + + -- Jerome Villeneuve Larouche <jlarouche@mapgears.com> Fri, 17 Aug 2012 14:56:22 +0000 postgis (1.5.3-2) unstable; urgency=low diff -Nru postgis-1.5.3/debian/control postgis-2.0.1/debian/control --- postgis-1.5.3/debian/control 2012-06-08 14:00:22.000000000 +0000 +++ postgis-2.0.1/debian/control 2012-09-06 12:27:34.000000000 +0000 @@ -6,7 +6,8 @@ Build-Depends: debhelper (>= 8), autotools-dev, flex, bison, libgeos-dev (>= 3.1.1), libproj-dev (>= 4.5.0), libssl-dev, xsltproc, docbook, docbook-xsl, default-jdk, libpg-java, fastjar, libjts-java (>= 1.7), imagemagick, - libcunit1-dev, dblatex, libxml2-dev, libgtk2.0-dev, postgresql-server-dev-9.1 + libcunit1-dev, dblatex, libxml2-dev, libgtk2.0-dev, postgresql-server-dev-9.1, + ant, libgdal-dev, postgresql-9.1 Standards-Version: 3.9.2 Homepage: http://postgis.refractions.net/ Vcs-Browser: http://git.debian.org/?p=pkg-grass/postgis.git @@ -38,19 +39,3 @@ . This package contains the PostGIS userland binaries, common files and documentation. - -Package: libpostgis-java -Architecture: all -Section: java -Depends: libpg-java -Suggests: postgresql-9.1-postgis, ${misc:Depends} -Conflicts: libpostgis-jdbc, libpostgisjava, postgresql-postgis-java -Replaces: libpostgis-jdbc, libpostgisjava, postgresql-postgis-java -Description: Geographic objects support for PostgreSQL -- JDBC support - PostGIS adds support for geographic objects to the PostgreSQL object-relational - database. In effect, PostGIS "spatially enables" the PostgreSQL server, - allowing it to be used as a backend spatial database for geographic information - systems (GIS), much like ESRI's SDE or Oracle's Spatial extension. PostGIS - follows the OpenGIS "Simple Features Specification for SQL". - . - This package contains JDBC support for PostGIS. diff -Nru postgis-1.5.3/debian/patches/fixmakedoc postgis-2.0.1/debian/patches/fixmakedoc --- postgis-1.5.3/debian/patches/fixmakedoc 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/debian/patches/fixmakedoc 2012-08-23 17:30:18.000000000 +0000 @@ -0,0 +1,30 @@ +--- a/doc/Makefile.comments ++++ b/doc/Makefile.comments +@@ -40,10 +40,10 @@ + # If REGRESS=1 passed as a parameter, change the default install paths + # so that no prefix is included. This allows us to relocate to a temporary + # directory for regression testing. +-ifeq ($(REGRESS),1) +- bindir=/bin +- pkglibdir=/lib +- datadir=/share +- datamoduledir=contrib/postgis +-endif ++#ifeq ($(REGRESS),1) ++ #bindir=/bin ++ #pkglibdir=/lib ++ #datadir=/share ++ #datamoduledir=contrib/postgis ++#endif + +--- a/doc/Makefile ++++ b/doc/Makefile +@@ -245,7 +245,7 @@ + rm -f $(DESTDIR)$(PGSQL_DOCDIR)/postgis/postgis.html + rm -f $(DESTDIR)$(PGSQL_DOCDIR)/postgis/README.postgis + +-install: comments-install ++install: man-install docs-install + + uninstall: comments-uninstall + diff -Nru postgis-1.5.3/debian/patches/series postgis-2.0.1/debian/patches/series --- postgis-1.5.3/debian/patches/series 2012-06-08 14:00:22.000000000 +0000 +++ postgis-2.0.1/debian/patches/series 2012-08-23 17:30:18.000000000 +0000 @@ -1,3 +1 @@ -install -generator -html_doc_resources +fixmakedoc diff -Nru postgis-1.5.3/debian/rules postgis-2.0.1/debian/rules --- postgis-1.5.3/debian/rules 2012-06-08 14:00:22.000000000 +0000 +++ postgis-2.0.1/debian/rules 2012-08-23 17:54:37.000000000 +0000 @@ -51,7 +51,7 @@ dh_testroot [ -f doc/html/postgis.html.prev ] && mv doc/html/postgis.html.prev doc/html/postgis.html || true [ ! -f GNUmakefile ] || $(MAKE) distclean || true - [ ! -f java/jdbc/Makefile ] || $(MAKE) -C java/jdbc clean + $(MAKE) -C doc images-clean rm -f $(CURDIR)/debian/*.postinst $(CURDIR)/debian/*.postrm dh_clean @@ -66,11 +66,7 @@ --docdir=\$${prefix}/share/doc/postgis \ --mandir=\$${prefix}/share/man \ --infodir=\$${prefix}/share/info \ - --with-pgconfig=/usr/lib/postgresql/9.1/bin/pg_config - # PostGIS JDBC (with debug support) - $(MAKE) -C java/jdbc clean - DEBUGJAR=postgis_debug.fastjar JAR=fastjar JAVAC=javac $(MAKE) -C java/jdbc jar - DEBUGJAR=postgis_debug.fastjar JAR=fastjar JAVAC=javac $(MAKE) -C java/jdbc install DESTDIR=$(CURDIR)/debian/libpostgis-java/usr/share/java/$(JAVA_PATH) + --with-pgconfig=/usr/lib/postgresql/9.1/bin/pg_config \ # regress target uses pushd/popd $(MAKE) SHELL=/bin/bash distclean dh_install -i @@ -98,11 +94,11 @@ $(MAKE) $(MAKE) -C doc $(MAKE) install DESTDIR=$(CURDIR)/debian/postgresql-9.1-postgis - $(MAKE) -C doc install \ - PGSQL_DOCDIR=$(CURDIR)/debian/postgis/usr/share/doc/postgis \ - PGSQL_MANDIR=$(CURDIR)/debian/postgis/usr/share/man \ - PGSQL_SHAREDIR=$(CURDIR)/debian/postgis/usr/share/postgresql/9.1 - install -o root -g root doc/postgis_comments.sql \ + $(MAKE) -C doc man-install \ + PGSQL_MANDIR=$(CURDIR)/debian/postgis/usr/share/man + $(MAKE) -C doc docs-install \ + PGSQL_DOCDIR=$(CURDIR)/debian/postgis/usr/share/doc/postgis + install -m644 doc/postgis_comments.sql \ $(CURDIR)/debian/postgresql-9.1-postgis/usr/share/postgresql/9.1/contrib/. install -o root -g root -d $(CURDIR)/debian/postgresql-9.1-postgis/usr/lib/postgis/$(VERSION)/postgres/9.1/lib mv $(CURDIR)/debian/postgresql-9.1-postgis/usr/lib/postgresql/9.1/lib/postgis-$(MAJOR_VERSION).$(MINOR_VERSION).so \ @@ -119,7 +115,7 @@ sed -e 's/@POSTGRES_VERSIONS@/9.1/' \ -e 's/@SOVERSION@/$(MAJOR_VERSION).$(MINOR_VERSION)/' \ $(CURDIR)/debian/postgis-generic.postrm.in >$(CURDIR)/debian/postgresql-9.1-postgis.postrm - + dh_install -s # copy utils for 9.1 @@ -144,6 +140,7 @@ dh_compress dh_fixperms dh_installdeb + dh_makeshlibs dh_shlibdeps dh_gencontrol dh_md5sums diff -Nru postgis-1.5.3/doc/Makefile postgis-2.0.1/doc/Makefile --- postgis-1.5.3/doc/Makefile 2011-06-25 16:29:50.000000000 +0000 +++ postgis-2.0.1/doc/Makefile 2012-06-22 21:04:32.000000000 +0000 @@ -9,24 +9,38 @@ # that we could produce a large number of files (think chunked HTML) # -POSTGIS_MAJOR_VERSION=1 -POSTGIS_MINOR_VERSION=5 -POSTGIS_MICRO_VERSION=3 +POSTGIS_MAJOR_VERSION=2 +POSTGIS_MINOR_VERSION=0 +POSTGIS_MICRO_VERSION=1 +MATHML2_DTD=http://www.w3.org/Math/DTD/mathml2/mathml2.dtd + +INSTALL=/opt/local/bin/ginstall -c +INSTALL_DATA=${INSTALL} -m 644 XSLTPROC=/opt/local/bin/xsltproc XSLBASE=/opt/local/share/xsl/docbook-xsl +XMLLINT=/opt/local/bin/xmllint + +# To allow network access use: +# +# make html XSLTPROCFLAGS= +# +ifeq ($(XSLTPROCFLAGS),) + XSLTPROCFLAGS=--nonet +endif XSLTPROC_COMMONOPTS= \ --param section.autolabel 1 \ --param section.label.includes.component.label 1 \ --param chunk.section.depth 0 \ --param generate.section.toc.level 1 \ - --param funcsynopsis.style ansi \ + --param funcsynopsis.style kr \ --param admon.graphics 1 \ --param admon.textlabel 0 \ --param simplesect.in.toc 0 \ --param use.id.as.filename 1 \ - --param chunk.quietly 1 + --param chunk.quietly 1 \ + $(XSLTPROCFLAGS) XSLTPROC_HTMLOPTS= \ --stringparam html.stylesheet style.css \ @@ -56,36 +70,96 @@ ifeq ($(IMAGEMAGICK),) all: requirements_not_met_imagemagick else -all: images html/postgis.html postgis_comments.sql +all: comments endif endif endif -postgis_aggs_mm.xml: ./xsl/postgis_aggs_mm.xml.xsl postgis.xml - $(XSLTPROC) ./xsl/postgis_aggs_mm.xml.xsl postgis.xml > $@ +XML_INPUTS = \ + extras_historytable.xml \ + extras_tigergeocoder.xml \ + extras_topology.xml \ + extras.xml \ + faq_raster.xml \ + faq.xml \ + installation.xml \ + introduction.xml \ + performance_tips.xml \ + postgis_aggs_mm.xml \ + postgis-out.xml \ + reference_accessor.xml \ + reference_constructor.xml \ + reference_editor.xml \ + reference_exception.xml \ + reference_lrs.xml \ + reference_management.xml \ + reference_measure.xml \ + reference_misc.xml \ + reference_operator.xml \ + reference_output.xml \ + reference_processing.xml \ + reference_raster.xml \ + reference_transaction.xml \ + reference.xml \ + release_notes.xml \ + reporting.xml \ + using_postgis_app.xml \ + using_postgis_dataman.xml \ + using_raster_dataman.xml -postgis_comments.sql: ./xsl/postgis_comments.sql.xsl postgis.xml postgis_aggs_mm.xml - $(XSLTPROC) ./xsl/postgis_comments.sql.xsl postgis.xml > $@ -postgis-out.xml: postgis.xml introduction.xml installation.xml faq.xml using_postgis_dataman.xml using_postgis_app.xml performance_tips.xml reference.xml reference_management.xml reference_constructor.xml reference_accessor.xml reference_editor.xml reference_output.xml reference_operator.xml reference_measure.xml reference_processing.xml reference_lrs.xml reference_transaction.xml reference_misc.xml reference_exception.xml postgis_aggs_mm.xml reporting.xml release_notes.xml ../Version.config - cat $< | sed "s/@@LAST_RELEASE_VERSION@@/${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}.${POSTGIS_MICRO_VERSION}/g" > $@ +ifeq ($(XSLTPROC),) +postgis_aggs_mm.xml: requirements_not_met_xsltproc +else +postgis_aggs_mm.xml: ./xsl/postgis_aggs_mm.xml.xsl postgis-out.xml Makefile + $(XSLTPROC) ./xsl/postgis_aggs_mm.xml.xsl postgis-out.xml > $@ +endif + +postgis_comments.sql: ./xsl/postgis_comments.sql.xsl $(XML_INPUTS) + $(XSLTPROC) ./xsl/postgis_comments.sql.xsl postgis-out.xml > $@ + +postgis_cheatsheet.html: ./xsl/postgis_cheatsheet.html.xsl $(XML_INPUTS) + $(XSLTPROC) ./xsl/postgis_cheatsheet.html.xsl postgis-out.xml > $@ + +raster_comments.sql: ./xsl/raster_comments.sql.xsl $(XML_INPUTS) + $(XSLTPROC) ./xsl/raster_comments.sql.xsl postgis-out.xml > $@ + +raster_cheatsheet.html: ./xsl/raster_cheatsheet.html.xsl $(XML_INPUTS) + $(XSLTPROC) ./xsl/raster_cheatsheet.html.xsl postgis-out.xml > $@ + +topology_comments.sql: ./xsl/topology_comments.sql.xsl $(XML_INPUTS) + $(XSLTPROC) ./xsl/topology_comments.sql.xsl postgis-out.xml > $@ + +topology_cheatsheet.html: ./xsl/topology_cheatsheet.html.xsl $(XML_INPUTS) + $(XSLTPROC) ./xsl/topology_cheatsheet.html.xsl postgis-out.xml > $@ + +tiger_geocoder_comments.sql: ./xsl/tiger_geocoder_comments.sql.xsl $(XML_INPUTS) + $(XSLTPROC) ./xsl/tiger_geocoder_comments.sql.xsl postgis-out.xml > $@ + +tiger_geocoder_cheatsheet.html: ./xsl/tiger_geocoder_cheatsheet.html.xsl $(XML_INPUTS) + $(XSLTPROC) ./xsl/tiger_geocoder_cheatsheet.html.xsl postgis-out.xml > $@ -chunked-html: postgis-out.xml images +postgis-out.xml: postgis.xml Makefile + cat $< | sed -e "s/@@LAST_RELEASE_VERSION@@/${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}.${POSTGIS_MICRO_VERSION}/g" -e "s;@@MATHML_PATH@@;${MATHML2_DTD};g" > $@ + +chunked-html: postgis-out.xml Makefile images $(XML_INPUTS) $(XSLTPROC) $(XSLTPROC_COMMONOPTS) $(XSLTPROC_HTMLOPTS) \ --output html/ \ --stringparam saxon.character.representation decimal \ $(CHUNK_HTML_DOCBOOK_XSL) \ $< -html/postgis.html: postgis-out.xml images +html: html/postgis.html + +html/postgis.html: postgis-out.xml Makefile images $(XML_INPUTS) $(XSLTPROC) $(XSLTPROC_COMMONOPTS) $(XSLTPROC_HTMLOPTS) \ --output html/postgis.html \ $(HTML_DOCBOOK_XSL) \ $< -postgis-${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}.${POSTGIS_MICRO_VERSION}.pdf: postgis-out.xml images - @if test x"$(DBLATEX)" = x; then \ +postgis-${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}.${POSTGIS_MICRO_VERSION}.pdf: postgis-out.xml images $(XML_INPUTS) + if test x"$(DBLATEX)" = x; then \ echo "Error: dblatex not found, can't build pdf"; \ echo " try installing dblatex and then re-run configure"; \ false; \ @@ -111,55 +185,117 @@ doxygen $< images: - make -C html/image_src images + $(MAKE) -C html/image_src images + +images-clean: + $(MAKE) -C html/image_src images-clean -clean: - make -C html/image_src clean - @rm -f postgis-out.xml postgis_aggs_mm.xml - -maintainer-clean: clean - make -C html/image_src clean - @rm -f html/*.html \ - postgis-${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}.${POSTGIS_MICRO_VERSION}.pdf +clean: + rm -f html/*.html + rm -f postgis-${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}.${POSTGIS_MICRO_VERSION}.pdf + $(MAKE) -C html/image_src clean + rm -f postgis-out.xml postgis_aggs_mm.xml + +distclean: clean + $(MAKE) -C html/image_src distclean + rm -f Makefile -comments: postgis_comments.sql +maintainer-clean: clean images-clean + rm -f postgis_comments.sql raster_comments.sql topology_comments.sql tiger_geocoder_comments.sql +ifeq ($(XSLTPROC),) +comments: requirements_not_met_xsltproc +else +comments: postgis_comments.sql raster_comments.sql topology_comments.sql tiger_geocoder_comments.sql +endif + +cheatsheets: postgis_cheatsheet.html raster_cheatsheet.html topology_cheatsheet.html tiger_geocoder_cheatsheet.html + +ifeq ($(XSLTPROC),) +comments-install: + if test -e postgis_comments.sql -a \ + -e raster_comments.sql -a \ + -e topology_comments.sql -a \ + -e tiger_geocoder_comments.sql; then \ + $(MAKE) -f Makefile.comments install; \ + fi +else comments-install: comments - make -f Makefile.comments install + $(MAKE) -f Makefile.comments install +endif comments-uninstall: - make -f Makefile.comments uninstall + $(MAKE) -f Makefile.comments uninstall + +man-install: man/shp2pgsql.1 man/pgsql2shp.1 + mkdir -p $(DESTDIR)$(PGSQL_MANDIR)/man1 + $(INSTALL_DATA) man/pgsql2shp.1 $(DESTDIR)$(PGSQL_MANDIR)/man1/pgsql2shp.1 + $(INSTALL_DATA) man/shp2pgsql.1 $(DESTDIR)$(PGSQL_MANDIR)/man1/shp2pgsql.1 + +man-uninstall: + rm -f $(DESTDIR)$(PGSQL_MANDIR)/man1/shp2pgsql.1 + rm -f $(DESTDIR)$(PGSQL_MANDIR)/man1/pgsql2shp.1 + +docs-install: html/postgis.html + mkdir -p $(DESTDIR)$(PGSQL_DOCDIR)/postgis + $(INSTALL_DATA) html/postgis.html $(DESTDIR)$(PGSQL_DOCDIR)/postgis/postgis.html + $(INSTALL_DATA) ../README.postgis $(DESTDIR)$(PGSQL_DOCDIR)/postgis/README.postgis + +docs-uninstall: + rm -f $(DESTDIR)$(PGSQL_DOCDIR)/postgis/postgis.html + rm -f $(DESTDIR)$(PGSQL_DOCDIR)/postgis/README.postgis + +install: comments-install + +uninstall: comments-uninstall + +ifeq ($(XSLTPROC),) +garden: requirements_not_met_xsltproc +else +garden: xsl/postgis_gardentest.sql.xsl $(XML_INPUTS) + $(XSLTPROC) -o postgis_gardentest_${POSTGIS_MAJOR_VERSION}${POSTGIS_MINOR_VERSION}.sql xsl/postgis_gardentest.sql.xsl postgis-out.xml + $(XSLTPROC) -o raster_gardentest_${POSTGIS_MAJOR_VERSION}${POSTGIS_MINOR_VERSION}.sql xsl/raster_gardentest.sql.xsl postgis-out.xml +endif + + + +ifeq ($(XMLLINT),) +check: requirements_not_met_xmllint +else +check: $(XML_INPUTS) + $(XMLLINT) --loaddtd --xinclude --valid postgis-out.xml > /dev/null +endif -install: html/postgis.html man/shp2pgsql.1 man/pgsql2shp.1 - @mkdir -p $(PGSQL_DOCDIR)/postgis - @mkdir -p $(PGSQL_MANDIR)/man1 - cp html/postgis.html $(PGSQL_DOCDIR)/postgis/postgis.html - cp ../README.postgis $(PGSQL_DOCDIR)/postgis/README.postgis - cp man/pgsql2shp.1 $(PGSQL_MANDIR)/man1/pgsql2shp.1 - cp man/shp2pgsql.1 $(PGSQL_MANDIR)/man1/shp2pgsql.1 - -uninstall: - rm -f $(PGSQL_DOCDIR)/postgis/postgis.html - rm -f $(PGSQL_DOCDIR)/postgis/README.postgis - rm -f $(PGSQL_MANDIR)/man1/shp2pgsql.1 - rm -f $(PGSQL_MANDIR)/man1/pgsql2shp.1 requirements_not_met_xsltproc: @echo - @echo "configure was unable to find 'xsltproc' which is required to build the documentation." - @echo "To build the documentation, install xsltproc and then re-run configure. Alternatively " + @echo "configure was unable to find 'xsltproc' which is required" + @echo "to build the documentation." + @echo "Install xsltproc and then re-run configure. Alternatively " @echo "refer to online manual:" @echo - @echo " http://postgis.refractions.net/docs" + @echo " http://www.postgis.org/docs" @echo -requirements_not_met_xslbase: +requirements_not_met_xmllint: @echo - @echo "configure was unable to find the Docbook XSL stylesheet directory which is required to build the documentation." - @echo "To build the documentation, install the Docbook XSL stylesheets and/or re-run configure with the --with-xsldir option. Alternatively " + @echo "configure was unable to find 'xmllint' which is required" + @echo "to test the documentation." + @echo "Install xmllint and then re-run configure. Alternatively " @echo "refer to online manual:" @echo - @echo " http://postgis.refractions.net/docs" + @echo " http://www.postgis.org/docs" + @echo + +requirements_not_met_xslbase: + @echo + @echo "configure was unable to find the Docbook XSL stylesheet directory" + @echo "which is required to build the documentation." + @echo "Install the Docbook XSL stylesheets and/or re-run configure " + @echo "with the --with-xsldir option." + @echo "Alternatively refer to online manual:" + @echo + @echo " http://www.postgis.org/docs" @echo requirements_not_met_imagemagick: @@ -168,8 +304,6 @@ @echo "To build the documentation, install ImageMagick and then re-run configure. Alternatively " @echo "refer to online manual:" @echo - @echo " http://postgis.refractions.net/docs" + @echo " http://www.postgis.org/docs" @echo -.PHONY: html - diff -Nru postgis-1.5.3/doc/Makefile.comments postgis-2.0.1/doc/Makefile.comments --- postgis-1.5.3/doc/Makefile.comments 2011-06-25 16:29:51.000000000 +0000 +++ postgis-2.0.1/doc/Makefile.comments 2012-06-22 21:04:32.000000000 +0000 @@ -14,11 +14,11 @@ # not possible to merge into the main Makefile as has been done for # the shapefile loader) -MODULE_doc=postgis-1.5 +MODULE_doc=postgis-2.0 MODULEDIR=contrib/$(MODULE_doc) # Files to be copied to the contrib/ directory -DATA_built=postgis_comments.sql +DATA_built=postgis_comments.sql raster_comments.sql topology_comments.sql # PGXS information PG_CONFIG = /usr/local/pgsql/9.1/bin/pg_config @@ -37,3 +37,13 @@ include ../postgis/Makefile.pgxs endif +# If REGRESS=1 passed as a parameter, change the default install paths +# so that no prefix is included. This allows us to relocate to a temporary +# directory for regression testing. +ifeq ($(REGRESS),1) + bindir=/bin + pkglibdir=/lib + datadir=/share + datamoduledir=contrib/postgis +endif + diff -Nru postgis-1.5.3/doc/Makefile.comments.in postgis-2.0.1/doc/Makefile.comments.in --- postgis-1.5.3/doc/Makefile.comments.in 2010-09-10 13:01:17.000000000 +0000 +++ postgis-2.0.1/doc/Makefile.comments.in 2012-02-27 22:08:12.000000000 +0000 @@ -18,7 +18,7 @@ MODULEDIR=contrib/$(MODULE_doc) # Files to be copied to the contrib/ directory -DATA_built=postgis_comments.sql +DATA_built=postgis_comments.sql raster_comments.sql topology_comments.sql # PGXS information PG_CONFIG = @PGCONFIG@ @@ -37,3 +37,13 @@ include ../postgis/Makefile.pgxs endif +# If REGRESS=1 passed as a parameter, change the default install paths +# so that no prefix is included. This allows us to relocate to a temporary +# directory for regression testing. +ifeq ($(REGRESS),1) + bindir=/bin + pkglibdir=/lib + datadir=/share + datamoduledir=contrib/postgis +endif + diff -Nru postgis-1.5.3/doc/Makefile.in postgis-2.0.1/doc/Makefile.in --- postgis-1.5.3/doc/Makefile.in 2010-09-19 12:21:28.000000000 +0000 +++ postgis-2.0.1/doc/Makefile.in 2012-06-12 07:56:32.000000000 +0000 @@ -12,21 +12,35 @@ POSTGIS_MAJOR_VERSION=@POSTGIS_MAJOR_VERSION@ POSTGIS_MINOR_VERSION=@POSTGIS_MINOR_VERSION@ POSTGIS_MICRO_VERSION=@POSTGIS_MICRO_VERSION@ +MATHML2_DTD=@MATHML2_DTD@ + +INSTALL=@INSTALL@ +INSTALL_DATA=@INSTALL_DATA@ XSLTPROC=@XSLTPROC@ XSLBASE=@XSLBASE@ +XMLLINT=@XMLLINT@ + +# To allow network access use: +# +# make html XSLTPROCFLAGS= +# +ifeq ($(XSLTPROCFLAGS),) + XSLTPROCFLAGS=--nonet +endif XSLTPROC_COMMONOPTS= \ --param section.autolabel 1 \ --param section.label.includes.component.label 1 \ --param chunk.section.depth 0 \ --param generate.section.toc.level 1 \ - --param funcsynopsis.style ansi \ + --param funcsynopsis.style kr \ --param admon.graphics 1 \ --param admon.textlabel 0 \ --param simplesect.in.toc 0 \ --param use.id.as.filename 1 \ - --param chunk.quietly 1 + --param chunk.quietly 1 \ + $(XSLTPROCFLAGS) XSLTPROC_HTMLOPTS= \ --stringparam html.stylesheet style.css \ @@ -56,36 +70,96 @@ ifeq ($(IMAGEMAGICK),) all: requirements_not_met_imagemagick else -all: images html/postgis.html postgis_comments.sql +all: comments endif endif endif -postgis_aggs_mm.xml: ./xsl/postgis_aggs_mm.xml.xsl postgis.xml - $(XSLTPROC) ./xsl/postgis_aggs_mm.xml.xsl postgis.xml > $@ +XML_INPUTS = \ + extras_historytable.xml \ + extras_tigergeocoder.xml \ + extras_topology.xml \ + extras.xml \ + faq_raster.xml \ + faq.xml \ + installation.xml \ + introduction.xml \ + performance_tips.xml \ + postgis_aggs_mm.xml \ + postgis-out.xml \ + reference_accessor.xml \ + reference_constructor.xml \ + reference_editor.xml \ + reference_exception.xml \ + reference_lrs.xml \ + reference_management.xml \ + reference_measure.xml \ + reference_misc.xml \ + reference_operator.xml \ + reference_output.xml \ + reference_processing.xml \ + reference_raster.xml \ + reference_transaction.xml \ + reference.xml \ + release_notes.xml \ + reporting.xml \ + using_postgis_app.xml \ + using_postgis_dataman.xml \ + using_raster_dataman.xml -postgis_comments.sql: ./xsl/postgis_comments.sql.xsl postgis.xml postgis_aggs_mm.xml - $(XSLTPROC) ./xsl/postgis_comments.sql.xsl postgis.xml > $@ -postgis-out.xml: postgis.xml introduction.xml installation.xml faq.xml using_postgis_dataman.xml using_postgis_app.xml performance_tips.xml reference.xml reference_management.xml reference_constructor.xml reference_accessor.xml reference_editor.xml reference_output.xml reference_operator.xml reference_measure.xml reference_processing.xml reference_lrs.xml reference_transaction.xml reference_misc.xml reference_exception.xml postgis_aggs_mm.xml reporting.xml release_notes.xml ../Version.config - cat $< | sed "s/@@LAST_RELEASE_VERSION@@/${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}.${POSTGIS_MICRO_VERSION}/g" > $@ +ifeq ($(XSLTPROC),) +postgis_aggs_mm.xml: requirements_not_met_xsltproc +else +postgis_aggs_mm.xml: ./xsl/postgis_aggs_mm.xml.xsl postgis-out.xml Makefile + $(XSLTPROC) ./xsl/postgis_aggs_mm.xml.xsl postgis-out.xml > $@ +endif -chunked-html: postgis-out.xml images +postgis_comments.sql: ./xsl/postgis_comments.sql.xsl $(XML_INPUTS) + $(XSLTPROC) ./xsl/postgis_comments.sql.xsl postgis-out.xml > $@ + +postgis_cheatsheet.html: ./xsl/postgis_cheatsheet.html.xsl $(XML_INPUTS) + $(XSLTPROC) ./xsl/postgis_cheatsheet.html.xsl postgis-out.xml > $@ + +raster_comments.sql: ./xsl/raster_comments.sql.xsl $(XML_INPUTS) + $(XSLTPROC) ./xsl/raster_comments.sql.xsl postgis-out.xml > $@ + +raster_cheatsheet.html: ./xsl/raster_cheatsheet.html.xsl $(XML_INPUTS) + $(XSLTPROC) ./xsl/raster_cheatsheet.html.xsl postgis-out.xml > $@ + +topology_comments.sql: ./xsl/topology_comments.sql.xsl $(XML_INPUTS) + $(XSLTPROC) ./xsl/topology_comments.sql.xsl postgis-out.xml > $@ + +topology_cheatsheet.html: ./xsl/topology_cheatsheet.html.xsl $(XML_INPUTS) + $(XSLTPROC) ./xsl/topology_cheatsheet.html.xsl postgis-out.xml > $@ + +tiger_geocoder_comments.sql: ./xsl/tiger_geocoder_comments.sql.xsl $(XML_INPUTS) + $(XSLTPROC) ./xsl/tiger_geocoder_comments.sql.xsl postgis-out.xml > $@ + +tiger_geocoder_cheatsheet.html: ./xsl/tiger_geocoder_cheatsheet.html.xsl $(XML_INPUTS) + $(XSLTPROC) ./xsl/tiger_geocoder_cheatsheet.html.xsl postgis-out.xml > $@ + +postgis-out.xml: postgis.xml Makefile + cat $< | sed -e "s/@@LAST_RELEASE_VERSION@@/${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}.${POSTGIS_MICRO_VERSION}/g" -e "s;@@MATHML_PATH@@;${MATHML2_DTD};g" > $@ + +chunked-html: postgis-out.xml Makefile images $(XML_INPUTS) $(XSLTPROC) $(XSLTPROC_COMMONOPTS) $(XSLTPROC_HTMLOPTS) \ --output html/ \ --stringparam saxon.character.representation decimal \ $(CHUNK_HTML_DOCBOOK_XSL) \ $< -html/postgis.html: postgis-out.xml images +html: html/postgis.html + +html/postgis.html: postgis-out.xml Makefile images $(XML_INPUTS) $(XSLTPROC) $(XSLTPROC_COMMONOPTS) $(XSLTPROC_HTMLOPTS) \ --output html/postgis.html \ $(HTML_DOCBOOK_XSL) \ $< -postgis-${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}.${POSTGIS_MICRO_VERSION}.pdf: postgis-out.xml images - @if test x"$(DBLATEX)" = x; then \ +postgis-${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}.${POSTGIS_MICRO_VERSION}.pdf: postgis-out.xml images $(XML_INPUTS) + if test x"$(DBLATEX)" = x; then \ echo "Error: dblatex not found, can't build pdf"; \ echo " try installing dblatex and then re-run configure"; \ false; \ @@ -111,55 +185,117 @@ doxygen $< images: - make -C html/image_src images + $(MAKE) -C html/image_src images + +images-clean: + $(MAKE) -C html/image_src images-clean -clean: - make -C html/image_src clean - @rm -f postgis-out.xml postgis_aggs_mm.xml - -maintainer-clean: clean - make -C html/image_src clean - @rm -f html/*.html \ - postgis-${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}.${POSTGIS_MICRO_VERSION}.pdf +clean: + rm -f html/*.html + rm -f postgis-${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}.${POSTGIS_MICRO_VERSION}.pdf + $(MAKE) -C html/image_src clean + rm -f postgis-out.xml postgis_aggs_mm.xml + +distclean: clean + $(MAKE) -C html/image_src distclean + rm -f Makefile + +maintainer-clean: clean images-clean + rm -f postgis_comments.sql raster_comments.sql topology_comments.sql tiger_geocoder_comments.sql -comments: postgis_comments.sql +ifeq ($(XSLTPROC),) +comments: requirements_not_met_xsltproc +else +comments: postgis_comments.sql raster_comments.sql topology_comments.sql tiger_geocoder_comments.sql +endif +cheatsheets: postgis_cheatsheet.html raster_cheatsheet.html topology_cheatsheet.html tiger_geocoder_cheatsheet.html + +ifeq ($(XSLTPROC),) +comments-install: + if test -e postgis_comments.sql -a \ + -e raster_comments.sql -a \ + -e topology_comments.sql -a \ + -e tiger_geocoder_comments.sql; then \ + $(MAKE) -f Makefile.comments install; \ + fi +else comments-install: comments - make -f Makefile.comments install + $(MAKE) -f Makefile.comments install +endif comments-uninstall: - make -f Makefile.comments uninstall + $(MAKE) -f Makefile.comments uninstall + +man-install: man/shp2pgsql.1 man/pgsql2shp.1 + mkdir -p $(DESTDIR)$(PGSQL_MANDIR)/man1 + $(INSTALL_DATA) man/pgsql2shp.1 $(DESTDIR)$(PGSQL_MANDIR)/man1/pgsql2shp.1 + $(INSTALL_DATA) man/shp2pgsql.1 $(DESTDIR)$(PGSQL_MANDIR)/man1/shp2pgsql.1 + +man-uninstall: + rm -f $(DESTDIR)$(PGSQL_MANDIR)/man1/shp2pgsql.1 + rm -f $(DESTDIR)$(PGSQL_MANDIR)/man1/pgsql2shp.1 + +docs-install: html/postgis.html + mkdir -p $(DESTDIR)$(PGSQL_DOCDIR)/postgis + $(INSTALL_DATA) html/postgis.html $(DESTDIR)$(PGSQL_DOCDIR)/postgis/postgis.html + $(INSTALL_DATA) ../README.postgis $(DESTDIR)$(PGSQL_DOCDIR)/postgis/README.postgis + +docs-uninstall: + rm -f $(DESTDIR)$(PGSQL_DOCDIR)/postgis/postgis.html + rm -f $(DESTDIR)$(PGSQL_DOCDIR)/postgis/README.postgis + +install: comments-install + +uninstall: comments-uninstall + +ifeq ($(XSLTPROC),) +garden: requirements_not_met_xsltproc +else +garden: xsl/postgis_gardentest.sql.xsl $(XML_INPUTS) + $(XSLTPROC) -o postgis_gardentest_${POSTGIS_MAJOR_VERSION}${POSTGIS_MINOR_VERSION}.sql xsl/postgis_gardentest.sql.xsl postgis-out.xml + $(XSLTPROC) -o raster_gardentest_${POSTGIS_MAJOR_VERSION}${POSTGIS_MINOR_VERSION}.sql xsl/raster_gardentest.sql.xsl postgis-out.xml +endif + + + +ifeq ($(XMLLINT),) +check: requirements_not_met_xmllint +else +check: $(XML_INPUTS) + $(XMLLINT) --loaddtd --xinclude --valid postgis-out.xml > /dev/null +endif -install: html/postgis.html man/shp2pgsql.1 man/pgsql2shp.1 - @mkdir -p $(PGSQL_DOCDIR)/postgis - @mkdir -p $(PGSQL_MANDIR)/man1 - cp html/postgis.html $(PGSQL_DOCDIR)/postgis/postgis.html - cp ../README.postgis $(PGSQL_DOCDIR)/postgis/README.postgis - cp man/pgsql2shp.1 $(PGSQL_MANDIR)/man1/pgsql2shp.1 - cp man/shp2pgsql.1 $(PGSQL_MANDIR)/man1/shp2pgsql.1 - -uninstall: - rm -f $(PGSQL_DOCDIR)/postgis/postgis.html - rm -f $(PGSQL_DOCDIR)/postgis/README.postgis - rm -f $(PGSQL_MANDIR)/man1/shp2pgsql.1 - rm -f $(PGSQL_MANDIR)/man1/pgsql2shp.1 requirements_not_met_xsltproc: @echo - @echo "configure was unable to find 'xsltproc' which is required to build the documentation." - @echo "To build the documentation, install xsltproc and then re-run configure. Alternatively " + @echo "configure was unable to find 'xsltproc' which is required" + @echo "to build the documentation." + @echo "Install xsltproc and then re-run configure. Alternatively " @echo "refer to online manual:" @echo - @echo " http://postgis.refractions.net/docs" + @echo " http://www.postgis.org/docs" @echo -requirements_not_met_xslbase: +requirements_not_met_xmllint: @echo - @echo "configure was unable to find the Docbook XSL stylesheet directory which is required to build the documentation." - @echo "To build the documentation, install the Docbook XSL stylesheets and/or re-run configure with the --with-xsldir option. Alternatively " + @echo "configure was unable to find 'xmllint' which is required" + @echo "to test the documentation." + @echo "Install xmllint and then re-run configure. Alternatively " @echo "refer to online manual:" @echo - @echo " http://postgis.refractions.net/docs" + @echo " http://www.postgis.org/docs" + @echo + +requirements_not_met_xslbase: + @echo + @echo "configure was unable to find the Docbook XSL stylesheet directory" + @echo "which is required to build the documentation." + @echo "Install the Docbook XSL stylesheets and/or re-run configure " + @echo "with the --with-xsldir option." + @echo "Alternatively refer to online manual:" + @echo + @echo " http://www.postgis.org/docs" @echo requirements_not_met_imagemagick: @@ -168,8 +304,6 @@ @echo "To build the documentation, install ImageMagick and then re-run configure. Alternatively " @echo "refer to online manual:" @echo - @echo " http://postgis.refractions.net/docs" + @echo " http://www.postgis.org/docs" @echo -.PHONY: html - diff -Nru postgis-1.5.3/doc/README postgis-2.0.1/doc/README --- postgis-1.5.3/doc/README 2009-10-08 11:43:32.000000000 +0000 +++ postgis-2.0.1/doc/README 2012-03-27 09:56:17.000000000 +0000 @@ -1,58 +1,81 @@ -==================================================== +PostGIS Documentation +===================== + Overview -==================================================== +-------- + +PostGIS documentation is written in DocBook XML. The input file is +``postgis.xml``, which in turn includes all the individual chapter XML files. +From that file we can publish several formats, including HTML and PDF. + +Make targets +------------ + +``make`` + same as ``make comments`` + +``make install`` + same as ``make comments-install`` + +``make uninstall`` + same as ``make comments-uninstall`` + +``make html`` + generates a single-file ``html/postgis.html`` + +``make chunked-html`` + generates a separate html file for every chapter or section break -Postgis documentation is written in docbook xml. The input file is postgis.xml, -which in turn includes all the individual chapter xml files. From that file we -can convert to chunked html, single-file html and pdf. - -Make targets are: - - make # defaults to creating - # - the images used in the generated documentation - # - the documentation as a single html file - # - a sql script used to apply COMMENTS for every postgis function - - make html/postgis.html # generates a single-file html file called html/postgis.html - make chunked-html # generates a separate html file for every chapter or section break - make pdf # generates a single pdf file with the postgis version as a filename - make images # generates all the images used in the html and pdf targets - make comments # generates a sql script that add COMMENTs for every function (derived from the documentation) - make doxygen # generates the developer's documentation using Doxygen - - make install # copies PostGIS' utility (ie. shp2pgsql) man pages to the PostgreSQL's doc directory - make uninstall # removes PostGIS' utility man pages - make comments-install # copies the postgis-comments.sql script to the PostgreSQL's contrib directory - make comments-uninstall # removes the postgis-comments.sql script from the contrib directory - - make clean # removes any generated files (except images and html files) - make maintainer-clean # clears out the generated images and html files +``make pdf`` + generates a single PDF file with the PostGIS version as a filename + +``make images`` + generates all the images used in the HTML and PDF targets + +``make comments`` + generates an SQL script that add COMMENTs for every function (derived from + the documentation) + +``make doxygen`` + generates the developer's documentation using Doxygen + +``make comments-install`` + copies the ``postgis-comments.sql`` script to the PostgreSQL ``contrib`` + directory + +``make comments-uninstall`` + removes the ``postgis-comments.sql`` script from the ``contrib`` directory + +``make clean`` + removes generated files except comments + +``make maintainer-clean`` + removes all generated files (including comments) -==================================================== Requirements -==================================================== +------------ -To generate the html files: - xsltproc (http://xmlsoft.org/XSLT/xsltproc2.html) - DocBook XSL scripts +To generate the html files and the comments: + * xsltproc - http://xmlsoft.org/xslt/xsltproc2.html + * DocBook XSL stylesheets + * MathML 3 DTD - http://www.w3.org/Math/DTD/ To generate the images: - ImageMagick (http://www.imagemagick.org/script/index.php) + * ImageMagick - http://www.imagemagick.org/ -To generate a pdf: - dblatex (http://dblatex.sourceforge.net) +To generate a PDF: + * dblatex - http://dblatex.sourceforge.net To generate the developer's documentation: - doxygen (http://www.stack.nl/~dimitri/doxygen) + * Doxygen - http://www.stack.nl/~dimitri/doxygen/ + * Graphviz - http://www.graphviz.org/ + +How to +------ +To generate images used in the documentation, follow these instructions on the +PostGIS wiki: http://trac.osgeo.org/postgis/wiki/DevWikiDocNewFeature -==================================================== -How To -==================================================== - -To generate images used in the documentation, follow these instructions on the PostGIS wiki: - http://trac.osgeo.org/postgis/wiki/DevWikiDocNewFeature - -To run garden tests against functions, follow these instructions on the PostGIS dev wiki: - http://trac.osgeo.org/postgis/wiki/DevWikiGardenTest +To run garden tests against functions, follow these instructions on the PostGIS +dev wiki: http://trac.osgeo.org/postgis/wiki/DevWikiGardenTest diff -Nru postgis-1.5.3/doc/ZMSgeoms.txt postgis-2.0.1/doc/ZMSgeoms.txt --- postgis-1.5.3/doc/ZMSgeoms.txt 2004-12-30 10:18:14.000000000 +0000 +++ postgis-2.0.1/doc/ZMSgeoms.txt 2012-02-27 22:08:12.000000000 +0000 @@ -59,7 +59,7 @@ wkbZ = 0x80000000 This proposal suggest the use of an M-presence flag (wkbM) to -allow for XY, XYM, XYZ and XYZM geometryes, and SRID-presence +allow for XY, XYM, XYZ and XYZM geometries, and SRID-presence flag to allow for embedded SRID: wkbM = 0x40000000 diff -Nru postgis-1.5.3/doc/doxygen.cfg.in postgis-2.0.1/doc/doxygen.cfg.in --- postgis-1.5.3/doc/doxygen.cfg.in 2009-05-03 03:33:09.000000000 +0000 +++ postgis-2.0.1/doc/doxygen.cfg.in 2012-02-27 22:08:12.000000000 +0000 @@ -459,7 +459,7 @@ # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = ../postgis ../liblwgeom ../loader +INPUT = ../postgis ../liblwgeom ../loader ../raster # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp diff -Nru postgis-1.5.3/doc/extras.xml postgis-2.0.1/doc/extras.xml --- postgis-1.5.3/doc/extras.xml 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/extras.xml 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +&extras_topology; +<chapter id="Extras"> + <title>PostGIS Extras + + This chapter documents features found in the extras folder of the PostGIS source tarballs and source repository. These + are not always packaged with PostGIS binary releases, but are usually plpgsql based or standard shell scripts that can be run as is. + + &extras_tigergeocoder; + diff -Nru postgis-1.5.3/doc/extras_historytable.xml postgis-2.0.1/doc/extras_historytable.xml --- postgis-1.5.3/doc/extras_historytable.xml 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/extras_historytable.xml 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,143 @@ + + + History Tracking + + + Suppose you have a table of data that represents the current state of a particular geographic feature. + A parcels table, or a roads table, or a fruit trees table, whatever. + Generally, GIS tools understand a table as a single entity into which they can update, insert and delete rows from. + How you do allow common GIS tools to work against your data, while maintaining an audit trail of what changes have been made, by whom, and what the past state of the data is? + This history_table extra module provides some utility functions for creating and maintaining history. + + + + The history_table was also packaged in PostGIS 1.5, but added to the documentation in PostGIS 2.0. This package is written in plpgsql and located in the extras/history_table of PostGIS source tar balls and source repository. + If you have a table 'roads', this module will maintain a 'roads_history' side table, which contains all the columns of the parent table, and the following additional columns: +history_id | integer | not null default + date_added | timestamp without time zone | not null default now() + date_deleted | timestamp without time zone | + last_operation | character varying(30) | not null + active_user | character varying(90) | not null default "current_user"() + current_version | text | not null + + + + When you insert a new record into 'roads' a record is automatically inserted into 'roads_history', with the 'date_added' filled in the 'date_deleted' set to NULL, a unique 'history_id', a 'last_operation' of 'INSERT' and 'active_user' set. + + + When you delete a record in 'roads', the record in the history table is *not* deleted, but the 'date_deleted' is set to the current date. + + + When you update a record in 'roads', the current record has 'date_deleted' filled in and a new record is created with the 'date_added' set and 'date_deleted' NULL. + + + +With this information maintained, it is possible to retrieve the history of any record in the roads table: +SELECT * FROM roads_history WHERE roads_pk = 111; + +Or, to retrieve a view of the roads table at any point in the past: +SELECT * FROM roads_history + WHERE date_added < 'January 1, 2001' AND + ( date_deleted >= 'January 1, 2001' OR date_deleted IS NULL ); + + + + Postgis_Install_History + Creates a table that will hold some interesting values for managing history tables. + + + + + + void Postgis_Install_History + + + + + + + Description + + Creates a table that will hold some interesting values for managing history tables. Creates a table called historic_information + + + + Availability: 1.5.0 + + + + + Examples + + SELECT postgis_install_history(); + + + + + + See Also + + + + + + Postgis_Enable_History + Registers a tablein the history_information table for tracking and also adds in side line history table and insert, update, delete rules on the table. + + + + + + boolean Postgis_Enable_History + text p_schema + text p_table + + + + + + Description + + Registers a table in the history_information table for tracking and also adds in side line history table with same name as table but prefixed with history in the same schema as the original table. Puts in insert, update, delete rules on the table. + Any inserts,updates,deletes of the geometry are recorded in the history table. + + This function currently relies on a geometry column being registered in geometry_columns and fails if the geometry column is not present in geometry_columns table. + + + Availability: 1.5.0 + + + + + Examples + + CREATE TABLE roads(gid SERIAL PRIMARY KEY, road_name varchar(150)); +SELECT AddGeometryColumn('roads', 'geom', 26986, 'LINESTRING', 2); + +SELECT postgis_enable_history('public', 'roads', 'geom') As register_table; +register_table +-------------- +t + +INSERT INTO roads(road_name, geom) + VALUES('Test Street', ST_GeomFromText('LINESTRING(231660.5 832170,231647 832202,231627.5 832250.5)',26986)); + +-- check transaction detail -- +SELECT date_added, last_operation, current_version +FROM roads_history +WHERE road_name = 'Test Street' ORDER BY date_added DESC; + + date_added | last_operation | current_version +------------------------+----------------+----------------- + 2011-02-07 12:44:36.92 | INSERT | 2 + + + + + + + + See Also + + + diff -Nru postgis-1.5.3/doc/extras_tigergeocoder.xml postgis-2.0.1/doc/extras_tigergeocoder.xml --- postgis-1.5.3/doc/extras_tigergeocoder.xml 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/extras_tigergeocoder.xml 2012-04-30 00:35:56.000000000 +0000 @@ -0,0 +1,1096 @@ + + + + + + A plpgsql based geocoder written to work with the TIGER (Topologically Integrated Geographic Encoding and Referencing system ) / Line and Master Address database export released by the US Census Bureau. In prior versions the TIGER files were + released in ASCII format. The older geocoder used to work with that format is in extras/tiger_geocoder/tiger_2006andbefore. + There are four components to the geocoder: the data loader functions, the address normalizer, the address geocoder, and the reverse geocoder. The latest version updated to use the TIGER 2010 census data is located in the extras/tiger_geocoder/tiger_2010 folder. + Although it is designed specifically for the US, a lot of the concepts and functions are applicable and can be adapted to work with other country address and road networks. + The script builds a schema called tiger to house all the tiger related functions, reusable lookup data such as road type prefixes, suffixes, states, various control tables for managing data load, and skeleton base tables from which all the tiger loaded tables inherit from. + Another schema called tiger_data is also created which houses all the census data for each state that the loader downloads from Census site and loads into the database. In the current model, each set of state tables is + prefixed with the state code e.g ma_addr, ca_edges etc with constraints to enforce only that state data. Each of these tables inherits from the base addr, faces, edges, etc located in the tiger schema. + All the geocode functions only reference the base tables, so there is no requirement that the data schema be called tiger_data or that data can't be further partitioned into other schemas -- e.g a different schema + for each state, as long as all the tables inherit from the tables in the tiger schema. + + + +If you are using a prerelease version of PostGIS 2.0.0 tiger geocoder, +you can upgrade the scripts using the accompanying upgrade_geocoder.bat +/ .sh scripts in tiger_2010. We'll be refining the upgrade scripts +until release. + + + Design: + The goal of this project is to build a fully functional geocoder that can process an arbitrary + address string and using normalized TIGER census data, produce a point geometry and rating reflecting the location of the given address and likeliness of the location. + The reverse_geocode function, introduced in PostGIS 2.0.0 is useful for deriving the street address and cross streets of a GPS location. + The geocoder should be simple for anyone familiar with PostGIS to install and use, and should be easily installable and usable on all platforms supported by PostGIS. + It should be robust enough to function properly despite formatting and spelling errors. + It should be extensible enough to be used with future data updates, or alternate data sources with a minimum of coding changes. + + The tiger schema must be added to the database search path for the functions to work properly. + + + + Tiger Geocoder + + There is another geocoder for PostGIS gaining in popularity and more suitable for international use. It is called Nominatim + and uses OpenStreetMap gazeteer formatted data. It requires osm2pgsql for loading the data, PostgreSQL 8.4+ and PostGIS 1.5+ to function. It is packaged as a webservice interface and seems designed to be called as a webservice. + Just like the tiger geocoder, it has both a geocoder and a reverse geocoder component. From the documentation, it is unclear if it has a pure SQL interface like the tiger geocoder, or if a good deal of the logic is implemented in the web interface. + + + + Drop_Indexes_Generate_Script + + Generates a script that drops all non-primary key and non-unique indexes on tiger schema and user specified schema. Defaults schema to tiger_data if no schema is specified. + + + + + + text Drop_Indexes_Generate_Script + text param_schema=tiger_data + + + + + + Description + + Generates a script that drops all non-primary key and non-unique indexes on tiger schema and user specified schema. Defaults schema to tiger_data if no schema is specified. + This is useful for minimizing index bloat that may confuse the query planner or take up unnecessary space. Use in combination with to add just the indexes used by the geocoder. + + + Availability: 2.0.0 + + + + + + + Examples + SELECT drop_indexes_generate_script() As actionsql; +actionsql +--------------------------------------------------------- +DROP INDEX tiger.idx_tiger_countysub_lookup_lower_name; +DROP INDEX tiger.idx_tiger_edges_countyfp; +DROP INDEX tiger.idx_tiger_faces_countyfp; +DROP INDEX tiger.tiger_place_the_geom_gist; +DROP INDEX tiger.tiger_edges_the_geom_gist; +DROP INDEX tiger.tiger_state_the_geom_gist; +DROP INDEX tiger.idx_tiger_addr_least_address; +DROP INDEX tiger.idx_tiger_addr_tlid; +DROP INDEX tiger.idx_tiger_addr_zip; +DROP INDEX tiger.idx_tiger_county_countyfp; +DROP INDEX tiger.idx_tiger_county_lookup_lower_name; +DROP INDEX tiger.idx_tiger_county_lookup_snd_name; +DROP INDEX tiger.idx_tiger_county_lower_name; +DROP INDEX tiger.idx_tiger_county_snd_name; +DROP INDEX tiger.idx_tiger_county_the_geom_gist; +DROP INDEX tiger.idx_tiger_countysub_lookup_snd_name; +DROP INDEX tiger.idx_tiger_cousub_countyfp; +DROP INDEX tiger.idx_tiger_cousub_cousubfp; +DROP INDEX tiger.idx_tiger_cousub_lower_name; +DROP INDEX tiger.idx_tiger_cousub_snd_name; +DROP INDEX tiger.idx_tiger_cousub_the_geom_gist; +DROP INDEX tiger_data.idx_tiger_data_ma_addr_least_address; +DROP INDEX tiger_data.idx_tiger_data_ma_addr_tlid; +DROP INDEX tiger_data.idx_tiger_data_ma_addr_zip; +DROP INDEX tiger_data.idx_tiger_data_ma_county_countyfp; +DROP INDEX tiger_data.idx_tiger_data_ma_county_lookup_lower_name; +DROP INDEX tiger_data.idx_tiger_data_ma_county_lookup_snd_name; +DROP INDEX tiger_data.idx_tiger_data_ma_county_lower_name; +DROP INDEX tiger_data.idx_tiger_data_ma_county_snd_name; +: +: + + + + + + + See Also + , + + + + + + Drop_State_Tables_Generate_Script + + Generates a script that drops all tables in the specified schema that are prefixed with the state abbreviation. Defaults schema to tiger_data if no schema is specified. + + + + + + text Drop_State_Tables_Generate_Script + text param_state + text param_schema=tiger_data + + + + + + Description + + Generates a script that drops all tables in the specified schema that are prefixed with the state abbreviation. Defaults schema to tiger_data if no schema is specified. + This function is useful for dropping tables of a state just before you reload a state in case something went wrong during your previous load. + + + Availability: 2.0.0 + + + + + + + Examples + SELECT drop_state_tables_generate_script('PA'); +DROP TABLE tiger_data.pa_addr; +DROP TABLE tiger_data.pa_county; +DROP TABLE tiger_data.pa_county_lookup; +DROP TABLE tiger_data.pa_cousub; +DROP TABLE tiger_data.pa_edges; +DROP TABLE tiger_data.pa_faces; +DROP TABLE tiger_data.pa_featnames; +DROP TABLE tiger_data.pa_place; +DROP TABLE tiger_data.pa_state; +DROP TABLE tiger_data.pa_zip_lookup_base; +DROP TABLE tiger_data.pa_zip_state; +DROP TABLE tiger_data.pa_zip_state_loc; + + + + + + + See Also + + + + + + Geocode + + Takes in an address as a string (or other normalized address) and outputs a set of possible locations which include a point geometry in NAD 83 long lat, a normalized address for each, and the rating. The lower the rating the more likely the match. + Results are sorted by lowest rating first. Can optionally pass in maximum results, defaults to 10, and restrict_region (defaults to NULL) + + + + + + setof record geocode + varchar address + integer max_results=10 + geometry restrict_region=NULL + norm_addy OUT addy + geometry OUT geomout + integer OUT rating + + + setof record geocode + norm_addy in_addy + integer max_results=10 + geometry restrict_region=NULL + norm_addy OUT addy + geometry OUT geomout + integer OUT rating + + + + + + Description + + Takes in an address as a string (or already normalized address) and outputs a set of possible locations which include a point geometry in NAD 83 long lat, a normalized_address (addy) for each, and the rating. The lower the rating the more likely the match. + Results are sorted by lowest rating first. Uses Tiger data (edges,faces,addr), PostgreSQL fuzzy string matching (soundex,levenshtein) and PostGIS line interpolation functions to interpolate address along the Tiger edges. The higher the rating the less likely the geocode is right. + The geocoded point is defaulted to offset 10 meters from center-line off to side (L/R) of street address is located on. + + Enhanced: 2.0.0 to support Tiger 2010 structured data and revised some logic to improve speed, accuracy of geocoding, and to offset point from centerline to side of street address is located on. New parameter max_results useful for specifying ot just return the best result. + + + + + + Examples: Basic + The below examples timings are on a 3.0 GHZ single processor Windows 7 machine with 2GB ram running PostgreSQL 9.1rc1/PostGIS 2.0 loaded with all of MA,MN,CA, RI state Tiger data loaded. + Exact matches are faster to compute (61ms) + SELECT g.rating, ST_X(g.geomout) As lon, ST_Y(g.geomout) As lat, + (addy).address As stno, (addy).streetname As street, + (addy).streettypeabbrev As styp, (addy).location As city, (addy).stateabbrev As st,(addy).zip + FROM geocode('75 State Street, Boston MA 02109') As g; + rating | lon | lat | stno | street | styp | city | st | zip +--------+-------------------+------------------+------+--------+------+--------+----+------- + 0 | -71.0556722990239 | 42.3589914927049 | 75 | State | St | Boston | MA | 02109 + + Even if zip is not passed in the geocoder can guess (took about 122-150 ms) + SELECT g.rating, ST_AsText(ST_SnapToGrid(g.geomout,0.00001)) As wktlonlat, + (addy).address As stno, (addy).streetname As street, + (addy).streettypeabbrev As styp, (addy).location As city, (addy).stateabbrev As st,(addy).zip + FROM geocode('226 Hanover Street, Boston, MA',1) As g; + rating | wktlonlat | stno | street | styp | city | st | zip +--------+---------------------------+------+---------+------+--------+----+------- + 1 | POINT(-71.05528 42.36316) | 226 | Hanover | St | Boston | MA | 02113 + +Can handle misspellings and provides more than one possible solution with ratings and takes longer (500ms). +SELECT g.rating, ST_AsText(ST_SnapToGrid(g.geomout,0.00001)) As wktlonlat, + (addy).address As stno, (addy).streetname As street, + (addy).streettypeabbrev As styp, (addy).location As city, (addy).stateabbrev As st,(addy).zip + FROM geocode('31 - 37 Stewart Street, Boston, MA 02116') As g; + rating | wktlonlat | stno | street | styp | city | st | zip +--------+---------------------------+------+--------+------+--------+----+------- + 70 | POINT(-71.06459 42.35113) | 31 | Stuart | St | Boston | MA | 02116 + + +Using to do a batch geocode of addresses. Easiest is to set max_results=1. Only process those not yet geocoded (have no rating). +CREATE TABLE addresses_to_geocode(addid serial PRIMARY KEY, address text, + lon numeric, lat numeric, new_address text, rating integer); + +INSERT INTO addresses_to_geocode(address) +VALUES ('529 Main Street, Boston MA, 02129'), + ('77 Massachusetts Avenue, Cambridge, MA 02139'), + ('25 Wizard of Oz, Walaford, KS 99912323'), + ('26 Capen Street, Medford, MA'), + ('124 Mount Auburn St, Cambridge, Massachusetts 02138'), + ('950 Main Street, Worcester, MA 01610'); + +-- only update the first 3 addresses (323-704 ms - there are caching and shared memory effects so first geocode you do is always slower) -- +-- for large numbers of addresses you don't want to update all at once +-- since the whole geocode must commit at once +-- For this example we rejoin with LEFT JOIN +-- and set to rating to -1 rating if no match +-- to ensure we don't regeocode a bad address +UPDATE addresses_to_geocode + SET (rating, new_address, lon, lat) + = ( COALESCE((g.geo).rating,-1), pprint_addy((g.geo).addy), + ST_X((g.geo).geomout)::numeric(8,5), ST_Y((g.geo).geomout)::numeric(8,5) ) +FROM (SELECT addid + FROM addresses_to_geocode + WHERE rating IS NULL ORDER BY addid LIMIT 3) As a + LEFT JOIN (SELECT addid, (geocode(address,1)) As geo + FROM addresses_to_geocode As ag + WHERE ag.rating IS NULL ORDER BY addid LIMIT 3) As g ON a.addid = g.addid +WHERE a.addid = addresses_to_geocode.addid; + +result +----- +Query returned successfully: 3 rows affected, 480 ms execution time. + +SELECT * FROM addresses_to_geocode WHERE rating is not null; + + addid | address | lon | lat | new_address | rating +-------+----------------------------------------------+-----------+----------+-------------------------------------------+-------- + 1 | 529 Main Street, Boston MA, 02129 | -71.07181 | 42.38359 | 529 Main St, Boston, MA 02129 | 0 + 2 | 77 Massachusetts Avenue, Cambridge, MA 02139 | -71.09428 | 42.35988 | 77 Massachusetts Ave, Cambridge, MA 02139 | 0 + 3 | 25 Wizard of Oz, Walaford, KS 99912323 | | | | -1 + + + + Examples: Using Geometry filter + +SELECT g.rating, ST_AsText(ST_SnapToGrid(g.geomout,0.00001)) As wktlonlat, + (addy).address As stno, (addy).streetname As street, + (addy).streettypeabbrev As styp, + (addy).location As city, (addy).stateabbrev As st,(addy).zip + FROM geocode('100 Federal Street, MA', + 3, + (SELECT ST_Union(the_geom) + FROM place WHERE statefp = '25' AND name = 'Lynn')::geometry + ) As g; + + rating | wktlonlat | stno | street | styp | city | st | zip +--------+--------------------------+------+---------+------+------+----+------- + 8 | POINT(-70.96796 42.4659) | 100 | Federal | St | Lynn | MA | 01905 +Total query runtime: 245 ms. + + + + + + See Also + , , , , , + + + + + + Geocode_Intersection + + Takes in 2 streets that intersect and a state, city, zip, and outputs a set of possible locations on the first cross street that is at the intersection, also includes a point geometry in NAD 83 long lat, a normalized address for each location, and the rating. The lower the rating the more likely the match. + Results are sorted by lowest rating first. Can optionally pass in maximum results, defaults to 10 + + + + + + setof record geocode_intersection + text roadway1 + text roadway2 + text in_state + text in_city + text in_zip + integer max_results=10 + norm_addy OUT addy + geometry OUT geomout + integer OUT rating + + + + + + Description + + Takes in 2 streets that intersect and a state, city, zip, and outputs a set of possible locations on the first cross street that is at the intersection, also includes a point geometry in NAD 83 long lat, a normalized address for each location, and the rating. The lower the rating the more likely the match. + Results are sorted by lowest rating first. Can optionally pass in maximum results, defaults to 10. + Returns normalized_address (addy) for each, geomout as the point location in nad 83 long lat, and the rating. The lower the rating the more likely the match. + Results are sorted by lowest rating first. Uses Tiger data (edges,faces,addr), PostgreSQL fuzzy string matching (soundex,levenshtein) + + Availability: 2.0.0 + + + + + + Examples: Basic + The below examples timings are on a 3.0 GHZ single processor Windows 7 machine with 2GB ram running PostgreSQL 9.0/PostGIS 1.5 loaded with all of MA state Tiger data loaded. Currently a bit slow (3000 ms) + Testing on Windows 2003 64-bit 8GB on PostGIS 2.0 PostgreSQL 64-bit Tiger 2011 data loaded -- (41ms) + SELECT pprint_addy(addy), st_astext(geomout),rating + FROM geocode_intersection( 'Haverford St','Germania St', 'MA', 'Boston', '02130',1); + pprint_addy | st_astext | rating +----------------------------------+----------------------------+-------- +98 Haverford St, Boston, MA 02130 | POINT(-71.101375 42.31376) | 0 + + Even if zip is not passed in the geocoder can guess (took about 3500 ms on the windows 7 box), on the windows 2003 64-bit 741 ms + SELECT pprint_addy(addy), st_astext(geomout),rating + FROM geocode_intersection('Weld', 'School', 'MA', 'Boston'); + pprint_addy | st_astext | rating +-------------------------------+--------------------------+-------- + 98 Weld Ave, Boston, MA 02119 | POINT(-71.099 42.314234) | 3 + 99 Weld Ave, Boston, MA 02119 | POINT(-71.099 42.314234) | 3 + + + + + + See Also + , , + + + + + + Get_Tract + + Returns census tract or field from tract table of where the geometry is located. Default to returning short name of tract. + + + + + + text get_tract + geometry loc_geom + text output_field='name' + + + + + + Description + + Given a geometry will return the census tract location of that geometry. NAD 83 long lat is assumed if no spatial ref sys is specified. + + Availability: 2.0.0 + + + + + + Examples: Basic + SELECT get_tract(ST_Point(-71.101375, 42.31376) ) As tract_name; +tract_name +--------- +1203.01 + + --this one returns the tiger geoid +SELECT get_tract(ST_Point(-71.101375, 42.31376), 'tract_id' ) As tract_id; +tract_id +--------- +25025120301 + + + + + See Also + > + + + + + + Install_Missing_Indexes + + Finds all tables with key columns used in geocoder joins and filter conditions that are missing used indexes on those columns and will add them. + + + + + + boolean Install_Missing_Indexes + + + + + + + Description + + Finds all tables in tiger and tiger_data schemas with key columns used in geocoder joins and filters that are missing indexes on those columns and will output the SQL DDL to + define the index for those tables and then execute the generated script. This is a helper function that adds new indexes needed to make queries faster that may have been missing during the load process. + This function is a companion to that in addition to generating the create index script, also executes it. + It is called as part of the update_geocode.sql upgrade script. + + + Availability: 2.0.0 + + + + + + + Examples + SELECT install_missing_indexes(); + install_missing_indexes +------------------------- + t + + + + + + + See Also + , + + + + + + Loader_Generate_Script + + Generates a shell script for the specified platform for the specified states that will download Tiger data, stage and load into tiger_data schema. Each state script is returned as a separate record. Latest version supports Tiger 2010 structural changes and also loads census tract, block groups, and blocks tables. + + + + + + setof text loader_generate_script + text[] param_states + text os + + + + + + Description + + Generates a shell script for the specified platform for the specified states that will download Tiger data, stage and load into tiger_data schema. Each state script is returned as a separate record. + It uses unzip on Linux (7-zip on Windows by default) and wget to do the downloading. It uses to load in the data. Note the smallest unit it does is a whole state, but you can overwrite this by downloading the files yourself. It will only + process the files in the staging and temp folders. + It uses the following control tables to control the process and different OS shell syntax variations. + + + + loader_variables keeps track of various variables such as census site, year, data and staging schemas + + + loader_platform profiles of various platforms and where the various executables are located. Comes with windows and linux. More can be added. + + + loader_lookuptables each record defines a kind of table (state, county), whether to process records in it and how to load them in. Defines the steps to import data, stage data, add, removes columns, indexes, and constraints for each. Each table is prefixed with the state and inherits from a table in the tiger schema. e.g. creates tiger_data.ma_faces which inherits from tiger.faces + + + Availability: 2.0.0 to support Tiger 2010 structured data and load census tract (tract), block groups (bg), and blocks (tabblocks) tables . + + + + + + + Examples + Generate script to load up data for 2 states in Windows shell script format. + SELECT loader_generate_script(ARRAY['MA','RI'], 'windows') AS result; +-- result -- +set STATEDIR="\gisdata\www2.census.gov\geo\pvs\tiger2010st\44_Rhode_Island" +set TMPDIR=\gisdata\temp\ +set UNZIPTOOL="C:\Program Files\7-Zip\7z.exe" +set WGETTOOL="C:\wget\wget.exe" +set PGBIN=C:\Program Files\PostgreSQL\8.4\bin\ +set PGPORT=5432 +set PGHOST=localhost +set PGUSER=postgres +set PGPASSWORD=yourpasswordhere +set PGDATABASE=geocoder +set PSQL="%PGBIN%psql" +set SHP2PGSQL="%PGBIN%shp2pgsql" + +%WGETTOOL% http://www2.census.gov/geo/pvs/tiger2010st/44_Rhode_Island/ --no-parent --relative --recursive --level=2 --accept=zip,txt --mirror --reject=html +: +: + Generate sh script + SELECT loader_generate_script(ARRAY['MA','RI'], 'sh') AS result; +-- result -- +STATEDIR="/gisdata/www2.census.gov/geo/pvs/tiger2010st/44_Rhode_Island" +TMPDIR="/gisdata/temp/" +UNZIPTOOL=unzip +PGPORT=5432 +PGHOST=localhost +PGUSER=postgres +PGPASSWORD=yourpasswordhere +PGDATABASE=geocoder +PSQL=psql +SHP2PGSQ=shp2pgsql + +wget http://www2.census.gov/geo/pvs/tiger2010st/44_Rhode_Island/ --no-parent --relative --recursive --level=2 --accept=zip,txt --mirror --reject=html +: +: + + + + + + See Also + + + + + + + Loader_Generate_Census_Script + + Generates a shell script for the specified platform for the specified states that will download Tiger census state tract, bg, and tabblocks data tables, stage and load into tiger_data schema. Each state script is returned as a separate record. + + + + + + setof text loader_generate_census_script + text[] param_states + text os + + + + + + Description + + Generates a shell script for the specified platform for the specified states that will download Tiger data census state tract, block groups bg, and tabblocks data tables, stage and load into tiger_data schema. Each state script is returned as a separate record. + It uses unzip on Linux (7-zip on Windows by default) and wget to do the downloading. It uses to load in the data. Note the smallest unit it does is a whole state. It will only + process the files in the staging and temp folders. + It uses the following control tables to control the process and different OS shell syntax variations. + + + + loader_variables keeps track of various variables such as census site, year, data and staging schemas + + + loader_platform profiles of various platforms and where the various executables are located. Comes with windows and linux. More can be added. + + + loader_lookuptables each record defines a kind of table (state, county), whether to process records in it and how to load them in. Defines the steps to import data, stage data, add, removes columns, indexes, and constraints for each. Each table is prefixed with the state and inherits from a table in the tiger schema. e.g. creates tiger_data.ma_faces which inherits from tiger.faces + + + Availability: 2.0.0 + includes this logic, but if you installed tiger geocoder prior to PostGIS 2.0.0 alpha5, you'll need to run this on the states you have already done + to get these additional tables. + + + + + Examples + Generate script to load up data for select states in Windows shell script format. + SELECT loader_generate_census_script(ARRAY['MA'], 'windows'); +-- result -- +set STATEDIR="\gisdata\www2.census.gov\geo\pvs\tiger2010st\25_Massachusetts" +set TMPDIR=\gisdata\temp\ +set UNZIPTOOL="C:\Program Files\7-Zip\7z.exe" +set WGETTOOL="C:\wget\wget.exe" +set PGBIN=C:\projects\pg\pg91win\bin\ +set PGPORT=5432 +set PGHOST=localhost +set PGUSER=postgres +set PGPASSWORD=yourpasswordhere +set PGDATABASE=tiger_postgis20 +set PSQL="%PGBIN%psql" +set SHP2PGSQL="%PGBIN%shp2pgsql" +cd \gisdata + +%WGETTOOL% http://www2.census.gov/geo/pvs/tiger2010st/25_Massachusetts/25/ --no-parent --relative --accept=*bg10.zip,*tract10.zip,*tabblock10.zip --mirror --reject=html +del %TMPDIR%\*.* /Q +%PSQL% -c "DROP SCHEMA tiger_staging CASCADE;" +%PSQL% -c "CREATE SCHEMA tiger_staging;" +cd %STATEDIR% +for /r %%z in (*.zip) do %UNZIPTOOL% e %%z -o%TMPDIR% +cd %TMPDIR% +%PSQL% -c "CREATE TABLE tiger_data.MA_tract(CONSTRAINT pk_MA_tract PRIMARY KEY (tract_id) ) INHERITS(tiger.tract); " +%SHP2PGSQL% -c -s 4269 -g the_geom -W "latin1" tl_2010_25_tract10.dbf tiger_staging.ma_tract10 | %PSQL% +%PSQL% -c "ALTER TABLE tiger_staging.MA_tract10 RENAME geoid10 TO tract_id; SELECT loader_load_staged_data(lower('MA_tract10'), lower('MA_tract')); " +%PSQL% -c "CREATE INDEX tiger_data_MA_tract_the_geom_gist ON tiger_data.MA_tract USING gist(the_geom);" +%PSQL% -c "VACUUM ANALYZE tiger_data.MA_tract;" +%PSQL% -c "ALTER TABLE tiger_data.MA_tract ADD CONSTRAINT chk_statefp CHECK (statefp = '25');" +: +Generate sh script +STATEDIR="/gisdata/www2.census.gov/geo/pvs/tiger2010st/25_Massachusetts" +TMPDIR="/gisdata/temp/" +UNZIPTOOL=unzip +WGETTOOL="/usr/bin/wget" +export PGBIN=/usr/pgsql-9.0/bin +export PGPORT=5432 +export PGHOST=localhost +export PGUSER=postgres +export PGPASSWORD=yourpasswordhere +export PGDATABASE=geocoder +PSQL=${PGBIN}/psql +SHP2PGSQL=${PGBIN}/shp2pgsql +cd /gisdata + +wget http://www2.census.gov/geo/pvs/tiger2010st/25_Massachusetts/25/ --no-parent --relative --accept=*bg10.zip,*tract10.zip,*tabblock10.zip --mirror --reject=html +rm -f ${TMPDIR}/*.* +${PSQL} -c "DROP SCHEMA tiger_staging CASCADE;" +${PSQL} -c "CREATE SCHEMA tiger_staging;" +cd $STATEDIR +for z in *.zip; do $UNZIPTOOL -o -d $TMPDIR $z; done +: +: + + + + + + See Also + + + + + + + Missing_Indexes_Generate_Script + + Finds all tables with key columns used in geocoder joins that are missing indexes on those columns and will output the SQL DDL to + define the index for those tables. + + + + + + text Missing_Indexes_Generate_Script + + + + + + + Description + + Finds all tables in tiger and tiger_data schemas with key columns used in geocoder joins that are missing indexes on those columns and will output the SQL DDL to + define the index for those tables. This is a helper function that adds new indexes needed to make queries faster that may have been missing during the load process. + As the geocoder is improved, this function will be updated to accommodate new indexes being used. If this function outputs nothing, it means + all your tables have what we think are the key indexes already in place. + + + Availability: 2.0.0 + + + + + + + Examples + SELECT missing_indexes_generate_script(); +-- output: This was run on a database that was created before many corrections were made to the loading script --- +CREATE INDEX idx_tiger_county_countyfp ON tiger.county USING btree(countyfp); +CREATE INDEX idx_tiger_cousub_countyfp ON tiger.cousub USING btree(countyfp); +CREATE INDEX idx_tiger_edges_tfidr ON tiger.edges USING btree(tfidr); +CREATE INDEX idx_tiger_edges_tfidl ON tiger.edges USING btree(tfidl); +CREATE INDEX idx_tiger_zip_lookup_all_zip ON tiger.zip_lookup_all USING btree(zip); +CREATE INDEX idx_tiger_data_ma_county_countyfp ON tiger_data.ma_county USING btree(countyfp); +CREATE INDEX idx_tiger_data_ma_cousub_countyfp ON tiger_data.ma_cousub USING btree(countyfp); +CREATE INDEX idx_tiger_data_ma_edges_countyfp ON tiger_data.ma_edges USING btree(countyfp); +CREATE INDEX idx_tiger_data_ma_faces_countyfp ON tiger_data.ma_faces USING btree(countyfp); + + + + + + + See Also + , + + + + + + Normalize_Address + + Given a textual street address, returns a composite norm_addy type that has road suffix, prefix and type standardized, street, streetname etc. broken into separate fields. This function + will work with just the lookup data packaged with the tiger_geocoder (no need for tiger census data). + + + + + + norm_addy normalize_address + varchar in_address + + + + + + Description + + Given a textual street address, returns a composite norm_addy type that has road suffix, prefix and type standardized, street, streetname etc. broken into separate fields. This is the first step in the geocoding process to + get all addresses into normalized postal form. No other data is required aside from what is packaged with the geocoder. + This function just uses the various direction/state/suffix lookup tables preloaded with the tiger_geocoder and located in the tiger schema, so it doesn't need you to download tiger census data or any other additional data to make use of it. + You may find the need to add more abbreviations or alternative namings to the various lookup tables in the tiger schema. + It uses various control lookup tables located in tiger schema to normalize the input address. + Fields in the norm_addy type object returned by this function in this order where () indicates a field required by the geocoder, [] indicates an optional field: + (address) [predirAbbrev] (streetName) [streetTypeAbbrev] [postdirAbbrev] [internal] [location] [stateAbbrev] [zip] + + + address is an integer: The street number + + + predirAbbrev is varchar: Directional prefix of road such as N, S, E, W etc. These are controlled using the direction_lookup table. + + + streetName varchar + + + streetTypeAbbrev varchar abbreviated version of street type: e.g. St, Ave, Cir. These are controlled using the street_type_lookup table. + + + postdirAbbrev varchar abbreviated directional suffice of road N, S, E, W etc. These are controlled using the direction_lookup table. + + + internal varchar internal address such as an apartment or suite number. + + + location varchar usually a city or governing province. + + + stateAbbrev varchar two character US State. e.g MA, NY, MI. These are controlled by the state_lookup table. + + + zip varchar 5-digit zipcode. e.g. 02109. + + + parsed boolean - denotes if addess was formed from normalize process. The normalize_address function sets this to true before returning the address. + + + + + + + + Examples + Output select fields. Use if you want a pretty textual output. + SELECT address As orig, (g.na).streetname, (g.na).streettypeabbrev + FROM (SELECT address, normalize_address(address) As na + FROM addresses_to_geocode) As g; + + orig | streetname | streettypeabbrev +-----------------------------------------------------+---------------+------------------ + 28 Capen Street, Medford, MA | Capen | St + 124 Mount Auburn St, Cambridge, Massachusetts 02138 | Mount Auburn | St + 950 Main Street, Worcester, MA 01610 | Main | St + 529 Main Street, Boston MA, 02129 | Main | St + 77 Massachusetts Avenue, Cambridge, MA 02139 | Massachusetts | Ave + 25 Wizard of Oz, Walaford, KS 99912323 | Wizard of Oz | + + + + + + + + + See Also + , + + + + + + Pprint_Addy + + Given a norm_addy composite type object, returns a pretty print representation of it. Usually used in conjunction with normalize_address. + + + + + + varchar pprint_addy + norm_addy in_addy + + + + + + Description + + Given a norm_addy composite type object, returns a pretty print representation of it. No other data is required aside from what is packaged with the geocoder. + Usually used in conjunction with . + + + + + + + Examples + Pretty print a single address + SELECT pprint_addy(normalize_address('202 East Fremont Street, Las Vegas, Nevada 89101')) As pretty_address; + pretty_address +--------------------------------------- + 202 E Fremont St, Las Vegas, NV 89101 + + + Pretty print address a table of addresses + SELECT address As orig, pprint_addy(normalize_address(address)) As pretty_address + FROM addresses_to_geocode; + + orig | pretty_address +-----------------------------------------------------+------------------------------------------- + 529 Main Street, Boston MA, 02129 | 529 Main St, Boston MA, 02129 + 77 Massachusetts Avenue, Cambridge, MA 02139 | 77 Massachusetts Ave, Cambridge, MA 02139 + 28 Capen Street, Medford, MA | 28 Capen St, Medford, MA + 124 Mount Auburn St, Cambridge, Massachusetts 02138 | 124 Mount Auburn St, Cambridge, MA 02138 + 950 Main Street, Worcester, MA 01610 | 950 Main St, Worcester, MA 01610 + + + + + + See Also + + + + + + + Reverse_Geocode + + Takes a geometry point in a known spatial ref sys and returns a record containing an array of theoretically possible addresses and an array of cross streets. If include_strnum_range = true, includes the street range in the cross streets. + + + + + + record Reverse_Geocode + geometry pt + boolean include_strnum_range=false + geometry[] OUT intpt + norm_addy[] OUT addy + varchar[] OUT street + + + + + + Description + + Takes a geometry point in a known spatial ref and returns a record containing an array of theoretically possible addresses and an array of cross streets. If include_strnum_range = true, includes the street range in the cross streets. + include_strnum_range defaults to false if not passed in. Addresses are sorted according to which road a point is closest to so first address is most likely the right one. + + Why do we say theoretical instead of actual addresses. The Tiger data doesn't have real addresses, but just street ranges. As such the theoretical address is an interpolated address based on the + street ranges. Like for example interpolating one of my addresses returns a 26 Court St. and 26 Court Sq., though there is no such place as 26 Court Sq. This is because a point may be at a corner of 2 + streets and thus the logic interpolates along both streets. The logic also assumes addresses are equally spaced along a street, which of course is wrong since you can have a municipal building taking up + a good chunk of the street range and the rest of the buildings are clustered at the end. + + Note: Hmm this function relies on Tiger data. If you have not loaded data covering the region of this point, then hmm you will get a record filled with NULLS. + Returned elements of the record are as follows: + + + intpt is an array of points: These are the center line points on the street closest to the input point. There are as many points as there are addresses. + + + addy is an array of norm_addy (normalized addresses): These are an array of possible addresses that fit the input point. The first one in the array is most likely. + Generally there should be only one, except in the case when a point is at the corner of 2 or 3 streets, or the point is somewhere on the road and not off to the side. + + + street an array of varchar: These are cross streets (or the street) (streets that intersect or are the street the point is projected to be on). + + + + + Availability: 2.0.0 + + + + + Examples + Example of a point at the corner of two streets, but closest to one. This is approximate location of MIT: 77 Massachusetts Ave, Cambridge, MA 02139 + Note that although we don't have 3 streets, PostgreSQL will just return null for entries above our upper bound so safe to use. This includes street ranges + SELECT pprint_addy(r.addy[1]) As st1, pprint_addy(r.addy[2]) As st2, pprint_addy(r.addy[3]) As st3, + array_to_string(r.street, ',') As cross_streets + FROM reverse_geocode(ST_GeomFromText('POINT(-71.093902 42.359446)',4269),true) As r; + + result + ------ + st1 | st2 | st3 | cross_streets +-------------------------------------------+-----+-----+---------------------------------------------- + 67 Massachusetts Ave, Cambridge, MA 02139 | | | 67 - 127 Massachusetts Ave,32 - 88 Vassar St + + Here we choose not to include the address ranges for the cross streets and picked a location +really really close to a corner of 2 streets thus could be known by two different addresses. +SELECT pprint_addy(r.addy[1]) As st1, pprint_addy(r.addy[2]) As st2, +pprint_addy(r.addy[3]) As st3, array_to_string(r.street, ',') As cross_str +FROM reverse_geocode(ST_GeomFromText('POINT(-71.06941 42.34225)',4269)) As r; + +result +-------- + st1 | st2 | st3 | cross_str +---------------------------------+---------------------------------+-----+------------------------ + 5 Bradford St, Boston, MA 02118 | 49 Waltham St, Boston, MA 02118 | | Waltham St + + +For this one we reuse our geocoded example from and we only want the primary address and at most 2 cross streets. +SELECT actual_addr, lon, lat, pprint_addy((rg).addy[1]) As int_addr1, + (rg).street[1] As cross1, (rg).street[2] As cross2 +FROM (SELECT address As actual_addr, lon, lat, + reverse_geocode( ST_SetSRID(ST_Point(lon,lat),4326) ) As rg + FROM addresses_to_geocode WHERE rating > -1) As foo; + + actual_addr | lon | lat | int_addr1 | cross1 | cross2 +-----------------------------------------------------+-----------+----------+-------------------------------------------+-----------------+------------ + 529 Main Street, Boston MA, 02129 | -71.07181 | 42.38359 | 527 Main St, Boston, MA 02129 | Medford St | + 77 Massachusetts Avenue, Cambridge, MA 02139 | -71.09428 | 42.35988 | 77 Massachusetts Ave, Cambridge, MA 02139 | Vassar St | + 26 Capen Street, Medford, MA | -71.12377 | 42.41101 | 9 Edison Ave, Medford, MA 02155 | Capen St | Tesla Ave + 124 Mount Auburn St, Cambridge, Massachusetts 02138 | -71.12304 | 42.37328 | 3 University Rd, Cambridge, MA 02138 | Mount Auburn St | + 950 Main Street, Worcester, MA 01610 | -71.82368 | 42.24956 | 3 Maywood St, Worcester, MA 01603 | Main St | Maywood Pl + + + + + + See Also + + , + + + + + + Topology_Load_Tiger + + Loads a defined region of tiger data into a PostGIS Topology and transforming the tiger data to spatial reference of the topology + and snapping to the precision tolerance of the topology. + + + + + + text Topology_Load_Tiger + varchar topo_name + varchar region_type + varchar region_id + + + + + + Description + + Loads a defined region of tiger data into a PostGIS Topology. The faces, nodes and edges are transformed to the spatial reference system of the target topology and points are snapped to the tolerance of the target topology. The created faces, nodes, edges maintain the same ids as the original Tiger data faces, nodes, edges + so that datasets can be in the future be more easily reconciled with tiger data. Returns summary details about the process. + + This would be useful for example for redistricting data where you require the newly formed polygons to follow the center lines of streets and for the resulting polygons not to overlap. + + This function relies on Tiger data as well as the installation of the PostGIS topology module. For more information, refer to and . If you have not loaded data covering the region of interest, then no topology records will be created. This function will also fail if you have not created a topology using the topology functions. + + Most topology validation errors are a result of tolerance issues where after transformation the edges points don't quite line up or overlap. + To remedy the situation you may want to increase or lower the precision if you get topology validation failures. + Required arguments: + + + topo_name The name of an existing PostGIS topology to load data into. + + + region_type The type of bounding region. Currently only place and county are supported. Plan is to have several more. This is the table to look into to define the region bounds. e.g tiger.place, tiger.county + + + region_id This is what TIGER calls the geoid. It is the unique identifier of the region in the table. For place it is the plcidfp column in tiger.place. For county it is the cntyidfp column in tiger.county + + + + + + Availability: 2.0.0 + + + Example: Boston, Massachusetts Topology + Create a topology for Boston, Massachusetts in Mass State Plane Feet (2249) + with tolerance 0.25 feet and then load in Boston city tiger faces, edges, nodes. + SELECT topology.CreateTopology('topo_boston', 2249, 0.25); +createtopology +-------------- + 15 +-- 60,902 ms ~ 1 minute on windows 7 desktop running 9.1 (with 5 states tiger data loaded) +SELECT tiger.topology_load_tiger('topo_boston', 'place', '2507000'); +-- topology_loader_tiger -- +29722 edges holding in temporary. 11108 faces added. 1875 edges of faces added. 20576 nodes added. +19962 nodes contained in a face. 0 edge start end corrected. 31597 edges added. + +-- 41 ms -- +SELECT topology.TopologySummary('topo_boston'); + -- topologysummary-- +Topology topo_boston (15), SRID 2249, precision 0.25 +20576 nodes, 31597 edges, 11109 faces, 0 topogeoms in 0 layers + +-- 28,797 ms to validate yeh returned no errors -- +SELECT * FROM + topology.ValidateTopology('topo_boston'); + + error | id1 | id2 +-------------------+----------+----------- + + + + + Example: Suffolk, Massachusetts Topology + Create a topology for Suffolk, Massachusetts in Mass State Plane Meters (26986) + with tolerance 0.25 meters and then load in Suffolk county tiger faces, edges, nodes. + SELECT topology.CreateTopology('topo_suffolk', 26986, 0.25); +-- this took 56,275 ms ~ 1 minute on Windows 7 32-bit with 5 states of tiger loaded +-- must have been warmed up after loading boston +SELECT tiger.topology_load_tiger('topo_suffolk', 'county', '25025'); +-- topology_loader_tiger -- + 36003 edges holding in temporary. 13518 faces added. 2172 edges of faces added. + 24761 nodes added. 24075 nodes contained in a face. 0 edge start end corrected. 38175 edges added. +-- 31 ms -- +SELECT topology.TopologySummary('topo_suffolk'); + -- topologysummary-- + Topology topo_suffolk (14), SRID 26986, precision 0.25 +24761 nodes, 38175 edges, 13519 faces, 0 topogeoms in 0 layers + +-- 33,606 ms to validate -- +SELECT * FROM + topology.ValidateTopology('topo_suffolk'); + + error | id1 | id2 +-------------------+----------+----------- + coincident nodes | 81045651 | 81064553 + edge crosses node | 81045651 | 85737793 + edge crosses node | 81045651 | 85742215 + edge crosses node | 81045651 | 620628939 + edge crosses node | 81064553 | 85697815 + edge crosses node | 81064553 | 85728168 + edge crosses node | 81064553 | 85733413 + + + + See Also + , , , + + + diff -Nru postgis-1.5.3/doc/extras_topology.xml postgis-2.0.1/doc/extras_topology.xml --- postgis-1.5.3/doc/extras_topology.xml 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/extras_topology.xml 2012-06-10 06:26:30.000000000 +0000 @@ -0,0 +1,2957 @@ + + + Topology + The PostGIS Topology types and functions are used to manage topological objects such as faces, edges and nodes. + Sandro Santilli's presentation at PostGIS Day Paris 2011 conference gives a good synopsis of PostGIS Topology and where it is headed Topology with PostGIS 2.0 slide deck. + Vincent Picavet provides a good synopsis and overview of what is Topology, how is it used, and various FOSS4G tools that support it in State of the art of FOSS4G for topology and network analysis. + An example of a topologically based GIS database is the US Census Topologically Integrated Geographic Encoding and Reference System (TIGER) database. If you want to experiment with PostGIS topology and need some data, check out . + The PostGIS topology module has existed in prior versions of PostGIS but was never part of the Official PostGIS documentation. + In PostGIS 2.0.0 major cleanup is going on to remove use of all deprecated functions in it, fix known usability issues, better document the features and functions, add new functions, and enhance to closer conform to SQL-MM standards. + Details of this project can be found at PostGIS Topology Wiki + All functions and tables associated with this module are installed in a schema called topology. + Functions that are defined in SQL/MM standard are prefixed with ST_ and functions specific to PostGIS are not prefixed. + To build PostGIS 2.0 with topology support, compile with the --with-topology option as described in . Some functions depend on GEOS 3.3+ so you should compile with GEOS 3.3+ to fully utilize the topology support. + + + + + This section lists the PostgreSQL data types installed by PostGIS Topology. Note we describe the casting behavior of these which is very + important especially when designing your own functions. + + + + Topology Types + + + + getfaceedges_returntype + A composite type that consists of a sequence number and edge number. This is the return type for ST_GetFaceEdges + + + Description + A composite type that consists of a sequence number and edge number. This is the return type for ST_GetFaceEdges function. + + + sequence is an integer: Refers to a topology defined in the topology.topology table which defines the topology schema and srid. + + + edge is an integer: The identifier of an edge. + + + + + + + + topogeometry + A composite type that refers to a topology geometry in a specific topology, layer, having specific type (1:[multi]point, 2:[multi]line, 3:[multi]poly, 4:collection) with specific identifier id in the topology. The id uniquely defines the topogeometry in the topology. + + + Description + A composite type that refers to a topology geometry in a specific topology, layer, having specific type with specific id. The elements of a topogeometry are the properties: topology_id,layer_id,id integer,type integer. + + + topology_id is an integer: Refers to a topology defined in the topology.topology table which defines the topology schema and srid. + + + layer_id is an integer: The layer_id in the layers table that hte topogeometry belongs to. The combination of topology_id, layer_id provides a unique reference in the topology.layers table. + + + type integer between 1 - 4 that defines the geometry type: 1:[multi]point, 2:[multi]line, 3:[multi]poly, 4:collection + + + id is an integer: The id is the autogenerated sequence number that uniquely defines the topogeometry in the respective topology. + + + + + + Casting Behavior + This section lists the automatic as well as explicit casts allowed for this data type + + + + + Cast To + Behavior + + + geometry + automatic + + + + + + + + See Also + + + + + + + validatetopology_returntype + A composite type that consists of an error message and id1 and id2 to denote location of error. This is the return type for ValidateTopology + + + Description + A composite type that consists of an error message and two integers. The function returns a set of these to denote validation errors and the id1 and id2 to denote the ids of the topology objects involved in the error. + + + error is varchar: Denotes type of error. + Current error descriptors are: coincident nodes, edge crosses node, edge not simple, edge end node geometry mis-match, edge start node geometry mismatch, face overlaps face,face within face, + + + id1 is an integer: Denotes identifier of edge / face / nodes in error. + + + id2 is an integer: For errors that involve 2 objects denotes the secondary edge / or node + + + + + + See Also + + + + + + + + + This section lists the PostgreSQL domains installed by PostGIS Topology. Domains can be used like object types as return objects of functions or table columns. The distinction between + a domain and a type is that a domain is an existing type with a check constraint bound to it. + + + + Topology Domains + + + + TopoElement + An array of 2 integers generally used to identify a TopoGeometry component. + + + Description + An array of 2 integers used to represent the id and type of a topology primitive or the id and layer of a TopoGeometry. Sets of such pairs are used to define TopoGeometry objects (either simple or hierarchical). + + + Examples + SELECT ARRAY[1,2]::topology.topoelement; + te +------- + {1,2} + + +--Example of what happens when you try to case a 3 element array to topoelement +-- NOTE: topoement has to be a 2 element array so fails dimension check +SELECT ARRAY[1,2,3]::topology.topoelement; +ERROR: value for domain topology.topoelement violates check constraint "dimensions" + + + + + See Also + + + + + + + topoelementarray + An array of element_id,element_type values. a bidimensional array of integers: '{{id,type}, {id,type}, ...}' + + + Description + An array of 1 or more topoelements ( a bidimensional array of integers: '{{id,type}, {id,type}, ...}'). So an array of 1 or more arrays each having 2 integers generally used to return an array of sets of element id and element type of a topology relation. + For types currrently only 3 types are supported: node=1, edge=2, face=3 + + + Examples + SELECT '{{1,2},{4,3}}'::topology.topoelementarray As tea; + tea +------- +{{1,2},{4,3}} + +-- more verbose equivalent -- +SELECT ARRAY[ARRAY[1,2], ARRAY[4,3]]::topology.topoelementarray As tea; + + tea +------- +{{1,2},{4,3}} + +--using the array agg function packaged with topology -- +SELECT topology.TopoElementArray_Agg(ARRAY[e,t]) As tea + FROM generate_series(1,4) As e CROSS JOIN generate_series(1,3) As t; + tea +-------------------------------------------------------------------------- +{{1,1},{1,2},{1,3},{2,1},{2,2},{2,3},{3,1},{3,2},{3,3},{4,1},{4,2},{4,3}} + + SELECT '{{1,2,4},{3,4,5}}'::topology.topoelementarray As tea; +ERROR: value for domain topology.topoelementarray violates check constraint "dimensions" + + + + + See Also + , + + + + + + + + This section lists the Topology functions for building new Topology schemas, validating topologies, and managing TopoGeometry Columns + + + Topology and TopoGeometry Management + + + AddTopoGeometryColumn + Adds a topogeometry column to an existing table, registers this new column as a layer in topology.layer and returns the new layer_id. + + + + + + text AddTopoGeometryColumn + varchar + topology_name + + varchar + schema_name + + varchar + table_name + + varchar + column_name + + varchar + feature_type + + + text AddTopoGeometryColumn + + varchar + topology_name + + varchar + schema_name + + varchar + table_name + + varchar + column_name + + varchar + feature_type + + integer + child_layer + + + + + + Description + + Each TopoGeometry object belongs to a specific Layer of a specific Topology. Before creating a TopoGeometry object you need to create its TopologyLayer. + A Topology Layer is an association of a feature-table with the topology. It also contain type and hierarchy information. We create a layer using the AddTopoGeometryColumn() function: + This function will both add the requested column to the table and add a record to the topology.layer table with all the given info. + If you don't specify [child_layer] (or set it to NULL) this layer would contain Basic TopoGeometries (composed by primitive topology elements). + Otherwise this layer will contain hierarchical TopoGeometries (composed by TopoGeometries from the child_layer). + + Once the layer is created (it's id is returned by the AddTopoGeometryColumn function) you're ready to construct TopoGeometry objects in it + Valid feature_types are: POINT, LINE, POLYGON, COLLECTION + + + Availability: 1.? + + + + + + Examples + -- Note for this example we created our new table in the ma_topo schema +-- though we could have created it in a different schema -- in which case topology_name and schema_name would be different +CREATE SCHEMA ma; +CREATE TABLE ma.parcels(gid serial, parcel_id varchar(20) PRIMARY KEY, address text); +SELECT topology.AddTopoGeometryColumn('ma_topo', 'ma', 'parcels', 'topo', 'POLYGON'); + +CREATE SCHEMA ri; +CREATE TABLE ri.roads(gid serial PRIMARY KEY, road_name text); +SELECT topology.AddTopoGeometryColumn('ri_topo', 'ri', 'roads', 'topo', 'LINE'); + + + + + + See Also + + , + + + + + DropTopology + + Use with caution: Drops a topology schema and deletes its reference from topology.topology table and references to tables in that schema from the geometry_columns table. + + + + + + integer DropTopology + varchar topology_schema_name + + + + + + Description + + Drops a topology schema and deletes its reference from topology.topology table and references to tables in that schema from the geometry_columns table. + This function should be USED WITH CAUTION, as it could destroy data you care about. If the schema does not exist, it just removes reference entries the named schema. + + + Availability: 1.? + + + + + Examples + Cascade drops the ma_topo schema and removes all references to it in topology.topology and geometry_columns. + SELECT topology.DropTopology('ma_topo'); + + + + + See Also + + + + + + DropTopoGeometryColumn + + Drops the topogeometry column from the table named table_name in schema schema_name and unregisters the columns from topology.layer table. + + + + + + text DropTopoGeometryColumn + varchar schema_name + varchar table_name + varchar column_name + + + + + + Description + + Drops the topogeometry column from the table named table_name in schema schema_name and unregisters the columns from topology.layer table. Returns summary + of drop status. NOTE: it first sets all values to NULL before dropping to bypass referential integrity checks. + + + Availability: 1.? + + + + + Examples + SELECT topology.DropTopoGeometryColumn('ma_topo', 'parcel_topo', 'topo'); + + + + + See Also + + + + + + + TopologySummary + + Takes a topology name and provides summary totals of types of objects in topology + + + + + + text TopologySummary + varchar topology_schema_name + + + + + + Description + + Takes a topology name and provides summary totals of types of objects in topology. + + + Availability: 2.0.0 + + + + + Examples + SELECT topology.topologysummary('city_data'); + topologysummary +-------------------------------------------------------- + Topology city_data (329), SRID 4326, precision: 0 + 22 nodes, 24 edges, 10 faces, 29 topogeoms in 5 layers + Layer 1, type Polygonal (3), 9 topogeoms + Deploy: features.land_parcels.feature + Layer 2, type Puntal (1), 8 topogeoms + Deploy: features.traffic_signs.feature + Layer 3, type Lineal (2), 8 topogeoms + Deploy: features.city_streets.feature + Layer 4, type Polygonal (3), 3 topogeoms + Hierarchy level 1, child layer 1 + Deploy: features.big_parcels.feature + Layer 5, type Puntal (1), 1 topogeoms + Hierarchy level 1, child layer 2 + Deploy: features.big_signs.feature + + + + See Also + + + + + + + ValidateTopology + + Returns a set of validatetopology_returntype objects detailing issues with topology + + + + + + setof validatetopology_returntype ValidateTopology + varchar topology_schema_name + + + + + + Description + + Returns a set of objects detailing issues with topology. Refer to + for listing of possible errors. + + + Availability: 1.? + + Enhanced: 2.0.0 more efficient edge crossing detection and fixes for false positives that were existent in prior versions. + + + + + Examples + SELECT * FROM topology.ValidateTopology('ma_topo'); + error | id1 | id2 +-------------------+-----+----- +face without edges | 0 | + + + + + + See Also + , + + + + + + + + This section covers the topology functions for creating new topologies. + + + Topology Constructors + + + + CreateTopology + Creates a new topology schema and registers this new schema in the topology.topology table. + + + + + + integer CreateTopology + varchar topology_schema_name + + + + integer CreateTopology + varchar topology_schema_name + integer srid + + + + integer CreateTopology + varchar topology_schema_name + integer srid + double precision tolerance + + + + integer CreateTopology + varchar topology_schema_name + integer srid + double precision tolerance + boolean hasz + + + + + + Description + + Creates a new schema with name topology_name consisting of tables (edge_data,face,node, relation + and registers this new topology in the topology.topology table. It returns the id of the topology in the topology table. The srid is the spatial reference identified as + defined in spatial_ref_sys table for that topology. Topologies must be uniquely named. The tolerance is measured in the units of the spatial reference system. If the tolerance is not specified defaults to 0. + + This is similar to the SQL/MM but a bit more functional. hasz defaults to false if not specified. + + + Availability: 1.? + + + + + Examples + This example creates a new schema called ma_topo that will store edges, faces, and relations in Massachusetts State Plane meters. + The tolerance represents 1/2 meter since the spatial reference system is a meter based spatial reference system + SELECT topology.CreateTopology('ma_topo',26986, 0.5); + + Create Rhode Island topology in State Plane ft +SELECT topology.CreateTopology('ri_topo',3438) As topoid; +topoid +------ +2 + + + + + See Also + + , , + + + + + + CopyTopology + Makes a copy of a topology structure (nodes, edges, faces, layers and TopoGeometries). + + + + + + integer CopyTopology + varchar existing_topology_name + varchar new_name + + + + + + Description + + +Creates a new topology with name new_topology_name and SRID and precision taken from existing_topology_name, copies all nodes, edges and faces in there, copies layers and their TopoGeometries too. + + + +The new rows in topology.layer will contain synthesized values for schema_name, table_name and feature_column. This is because the TopoGeometry will only exist as a definition but won't be available in any user-level table yet. + + + + Availability: 2.0.0 + + + + + Examples + +This example makes a backup of a topology called ma_topo + + SELECT topology.CopyTopology('ma_topo', 'ma_topo_bakup'); + + + + + + See Also + + , + + + + + + ST_InitTopoGeo + Creates a new topology schema and registers this new schema in the topology.topology table and details summary of process. + + + + + + text ST_InitTopoGeo + varchar topology_schema_name + + + + + + Description + + This is an SQL-MM equivalent of CreateTopology but lacks the spatial reference and tolerance options of CreateTopology and outputs a text description of creation instead of topology id. + + + Availability: 1.? + &sqlmm_compliant; SQL-MM 3 Topo-Geo and Topo-Net 3: Routine Details: X.3.17 + + + + + Examples + SELECT topology.ST_InitTopoGeo('topo_schema_to_create') AS topocreation; + astopocreation +------------------------------------------------------------ + Topology-Geometry 'topo_schema_to_create' (id:7) created. + + + + + + See Also + + + + + + + + + ST_CreateTopoGeo + + +Adds a collection of geometries to a given empty topology and returns a message detailing success. + + + + + + + text ST_CreateTopoGeo + varchar atopology + geometry acollection + + + + + + Description + + +Adds a collection of geometries to a given empty topology and returns a message detailing success. + + + Useful for populating an empty topology. + + + + Availability: 2.0 + &sqlmm_compliant; SQL-MM: Topo-Geo and Topo-Net 3: Routine Details -- X.3.18 + + + + + Examples + +-- Populate topology -- +SELECT topology.ST_CreateTopoGeo('ri_topo', + ST_GeomFromText('MULTILINESTRING((384744 236928,384750 236923,384769 236911,384799 236895,384811 236890,384833 236884, + 384844 236882,384866 236881,384879 236883,384954 236898,385087 236932,385117 236938, + 385167 236938,385203 236941,385224 236946,385233 236950,385241 236956,385254 236971, + 385260 236979,385268 236999,385273 237018,385273 237037,385271 237047,385267 237057, + 385225 237125,385210 237144,385192 237161,385167 237192,385162 237202,385159 237214, + 385159 237227,385162 237241,385166 237256,385196 237324,385209 237345,385234 237375, + 385237 237383,385238 237399,385236 237407,385227 237419,385213 237430,385193 237439, + 385174 237451,385170 237455,385169 237460,385171 237475,385181 237503,385190 237521, + 385200 237533,385206 237538,385213 237541,385221 237542,385235 237540,385242 237541, + 385249 237544,385260 237555,385270 237570,385289 237584,385292 237589,385291 237596,385284 237630))',3438) + ); + + st_createtopogeo +---------------------------- + Topology ri_topo populated + + +-- create tables and topo geometries -- +CREATE TABLE ri.roads(gid serial PRIMARY KEY, road_name text); + +SELECT topology.AddTopoGeometryColumn('ri_topo', 'ri', 'roads', 'topo', 'LINE'); + + + + + + See Also + , , + + + + + + TopoGeo_AddPoint + + +Adds a point to an existing topology using a tolerance and possibly splitting an existing edge. + + + + + + + integer TopoGeo_AddPoint + varchar toponame + geometry apoint + float8 tolerance + + + + + + Description + + +Adds a point to an existing topology and return its identifier. +The given point will snap to existing nodes or edges within given tolerance. +An existing edge may be split by the snapped point. + + + + Availability: 2.0.0 + + + + + + See Also + +, +, +, + + + + + + + + TopoGeo_AddLineString + + +Adds a linestring to an existing topology using a tolerance and possibly splitting existing edges/faces. + + + + + + + integer TopoGeo_AddLineString + varchar toponame + geometry aline + float8 tolerance + + + + + + Description + + +Adds a linestring to an existing topology and return a set of edge identifiers forming it up. +The given line will snap to existing nodes or edges within given tolerance. +Existing edges and faces may be split by the line. + + + + Availability: 2.0.0 + + + + + + See Also + +, +, +, + + + + + + + + TopoGeo_AddPolygon + + +Adds a polygon to an existing topology using a tolerance and possibly splitting existing edges/faces. + + + + + + + integer TopoGeo_AddPolygon + varchar atopology + geometry aline + float8 atolerance + + + + + + Description + + +Adds a polygon to an existing topology and return a set of face identifiers forming it up. +The boundary of the given polygon will snap to existing nodes or edges within given tolerance. +Existing edges and faces may be split by the boundary of the new polygon. + + + + Availability: 2.0.0 + + + + + + See Also + +, +, +, + + + + + + + + + + + + This section covers topology functions for adding, moving, deleting, and splitting edges, faces, and nodes. All of these functions are defined by ISO SQL/MM. + + + Topology Editors + + + + ST_AddIsoNode + + Adds an isolated node to a face in a topology and returns the nodeid of the new node. If face is null, the node is still created. + + + + + + integer ST_AddIsoNode + varchar atopology + integer aface + geometry apoint + + + + + + Description + + Adds an isolated node with point location apoint to an existing face with faceid aface to a topology atopology and returns the nodeid of the new node. + If the spatial reference system (srid) of the point geometry is not the same as the topology, the apoint is not a point geometry, the point is null, or the point intersects an existing edge (even at the boundaries) then an exception is thrown. If the point already + exists as a node, an exception is thrown. + If aface is not null and the apoint is not within the face, then an exception is thrown. + + + Availability: 1.? + &sqlmm_compliant; SQL-MM: Topo-Net Routines: X+1.3.1 + + + + + Examples + + + + + + + See Also + , , , + + + + + + ST_AddIsoEdge + + Adds an isolated edge defined by geometry alinestring to a topology connecting two existing isolated nodes anode and anothernode and returns the edge id of the new edge. + + + + + + integer ST_AddIsoEdge + varchar atopology + integer anode + integer anothernode + geometry alinestring + + + + + + Description + + Adds an isolated edge defined by geometry alinestring to a topology connecting two existing isolated nodes anode and anothernode and returns the edge id of the new edge. + If the spatial reference system (srid) of the alinestring geometry is not the same as the topology, any of the input arguments are null, or the nodes are contained in more than one face, or the nodes are start or end nodes of an existing edge, + then an exception is thrown. + If the alinestring is not within the face of the face the anode and anothernode belong to, then an exception is thrown. + If the anode and anothernode are not the start and end points of the alinestring then an exception is thrown. + + + Availability: 1.? + &sqlmm_compliant; SQL-MM: Topo-Geo and Topo-Net 3: Routine Details: X.3.4 + + + + + Examples + + + + + + + See Also + , , + + + + + + ST_AddEdgeNewFaces + + Add a new edge and, if in doing so it splits a face, delete the original face and replace it with two new faces. + + + + + + integer ST_AddEdgeNewFaces + varchar atopology + integer anode + integer anothernode + geometry acurve + + + + + + Description + + +Add a new edge and, if in doing so it splits a face, delete the original +face and replace it with two new faces. +Returns the id of the newly added edge. + + + +Updates all existing joined edges and relationships accordingly. + + + If any arguments are null, the given nodes are unknown (must already exist in the node table of the topology schema) , + the acurve is not a LINESTRING, the anode and anothernode are not the start + and endpoints of acurve then an error is thrown. + If the spatial reference system (srid) of the acurve geometry is not the same as the topology an exception is thrown. + + + Availability: 2.0 + &sqlmm_compliant; SQL-MM: Topo-Geo and Topo-Net 3: Routine Details: X.3.12 + + + + + Examples + + + + + + + See Also + + + + + + + + ST_AddEdgeModFace + + Add a new edge and, if in doing so it splits a face, modify the original face and add a new face. + + + + + + integer ST_AddEdgeModFace + varchar atopology + integer anode + integer anothernode + geometry acurve + + + + + + Description + + +Add a new edge and, if in doing so it splits a face, modify the original +face and add a new face. Unless the face being split is the Universal Face, +the new face will be on the right side of the newly added edge. +Returns the id of the newly added edge. + + + +Updates all existing joined edges and relationships accordingly. + + + If any arguments are null, the given nodes are unknown (must already exist in the node table of the topology schema) , + the acurve is not a LINESTRING, the anode and anothernode are not the start + and endpoints of acurve then an error is thrown. + If the spatial reference system (srid) of the acurve geometry is not the same as the topology an exception is thrown. + + Availability: 2.0 + &sqlmm_compliant; SQL-MM: Topo-Geo and Topo-Net 3: Routine Details: X.3.13 + + + + + Examples + + + + + + + See Also + + + + + + + + ST_RemEdgeNewFace + + +Removes an edge and, if the removed edge separated two faces, +delete the original faces and replace them with a new face. + + + + + + + integer ST_RemEdgeNewFace + varchar atopology + integer anedge + + + + + + Description + + +Removes an edge and, if the removed edge separated two faces, +delete the original faces and replace them with a new face. + + + +Returns the id of a newly created face or NULL, if no new face is created. +No new face is created when the removed edge is dangling or isolated or +confined with the universe face (possibly making the universe flood into +the face on the other side). + + + +Updates all existing joined edges and relationships accordingly. + + + +Refuses to remove an edge partecipating in the definition of an +existing TopoGeometry. +Refuses to heal two faces if any TopoGeometry is defined by only +one of them (and not the other). + + + +If any arguments are null, the given edge is unknown (must already exist in +the edge table of the topology schema), the topology +name is invalid then an error is thrown. + + + + Availability: 2.0 + &sqlmm_compliant; SQL-MM: Topo-Geo and Topo-Net 3: Routine Details: X.3.14 + + + + + Examples + + + + + + + See Also + + + + + + + + ST_RemEdgeModFace + + +Removes an edge and, if the removed edge separated two faces, +delete one of the them and modify the other to take the space of both. + + + + + + + integer ST_RemEdgeModFace + varchar atopology + integer anedge + + + + + + Description + + +Removes an edge and, if the removed edge separated two faces, +delete one of the them and modify the other to take the space of both. +Preferentially keeps the face on the right, to be symmetric with +ST_AddEdgeModFace also keeping it. +Returns the id of the face remaining in place of the removed edge. + + + +Updates all existing joined edges and relationships accordingly. + + + +Refuses to remove an edge partecipating in the definition of an +existing TopoGeometry. +Refuses to heal two faces if any TopoGeometry is defined by only +one of them (and not the other). + + + +If any arguments are null, the given edge is unknown (must already exist in +the edge table of the topology schema), the topology +name is invalid then an error is thrown. + + + + Availability: 2.0 + &sqlmm_compliant; SQL-MM: Topo-Geo and Topo-Net 3: Routine Details: X.3.15 + + + + + Examples + + + + + + + See Also + + + + + + + + ST_ChangeEdgeGeom + + +Changes the shape of an edge without affecting the topology structure. + + + + + + + integer ST_ChangeEdgeGeom + varchar atopology + integer anedge + geometry acurve + + + + + + Description + + +Changes the shape of an edge without affecting the topology structure. + + +If any arguments are null, the given edge does not exist in +the node table of the topology schema, the +acurve is not a LINESTRING, the +anode and anothernode are not the +start and endpoints of acurve or the modification would +change the underlying topology then an error is thrown. + + If the spatial reference system (srid) of the acurve geometry is not the same as the topology an exception is thrown. + If the new acurve is not simple, then an error is thrown. + + +If moving the edge from old to new position would hit an obstacle then +an error is thrown. + + + + Availability: 1.1.0 + + + + Enhanced: 2.0.0 adds topological consistency enforcement + + + &sqlmm_compliant; SQL-MM: Topo-Geo and Topo-Net 3: Routine Details X.3.6 + + + + + Examples + SELECT topology.ST_ChangeEdgeGeom('ma_topo', 1, + ST_GeomFromText('LINESTRING(227591.9 893900.4,227622.6 893844.3,227641.6 893816.6, 227704.5 893778.5)', 26986) ); + ---- + Edge 1 changed + + + + + See Also + + + + + + + + + ST_ModEdgeSplit + + Split an edge by creating a new node along an existing edge, modifying the original edge and adding a new edge. + + + + + + text ST_ModEdgeSplit + varchar atopology + integer anedge + geometry apoint + + + + + + Description + + +Split an edge by creating a new node along an existing edge, +modifying the original edge and adding a new edge. +Updates all existing joined edges and relationships accordingly. + + + + Availability: 1.? + Changed: 2.0 - In prior versions, this was misnamed ST_ModEdgesSplit + &sqlmm_compliant; SQL-MM: Topo-Geo and Topo-Net 3: Routine Details: X.3.9 + + + + + Examples + +-- Add an edge -- + SELECT topology.AddEdge('ma_topo', ST_GeomFromText('LINESTRING(227592 893910, 227600 893910)', 26986) ) As edgeid; + +-- edgeid- +3 + + +-- Split the edge -- +SELECT topology.ST_ModEdgeSplit('ma_topo', 3, ST_SetSRID(ST_Point(227594,893910),26986) ) As result; + result +------------------------- +7 + + + + + + See Also + + , + , + , + + + + + + + + ST_ModEdgeHeal + + +Heal two edges by deleting the node connecting them, modifying the first edge +and deleting the second edge. Returns the id of the deleted node. + + + + + + + int ST_ModEdgeHeal + varchar atopology + integer anedge + integer anotheredge + + + + + + Description + + +Heal two edges by deleting the node connecting them, modifying the first edge +and deleting the second edge. +Returns the id of the deleted node. +Updates all existing joined edges and relationships accordingly. + + + + Availability: 2.0 + &sqlmm_compliant; SQL-MM: Topo-Geo and Topo-Net 3: Routine Details: X.3.9 + + + + + + See Also + + + + + + + + + + ST_NewEdgeHeal + + +Heal two edges by deleting the node connecting them, deleting both edges, +and replacing them with an edge whose direction is the same as the first +edge provided. + + + + + + + int ST_NewEdgeHeal + varchar atopology + integer anedge + integer anotheredge + + + + + + Description + + +Heal two edges by deleting the node connecting them, deleting both edges, +and replacing them with an edge whose direction is the same as the first +edge provided. +Returns the id of the new edge replacing the healed ones. +Updates all existing joined edges and relationships accordingly. + + + + + Availability: 2.0 + &sqlmm_compliant; SQL-MM: Topo-Geo and Topo-Net 3: Routine Details: X.3.9 + + + + + + See Also + + + + + + + + + + + ST_MoveIsoNode + + Moves an isolated node in a topology from one point to another. If new apoint geometry exists as a node an error is thrown. REturns description of move. + + + + + + text ST_MoveIsoNode + varchar atopology + integer anedge + geometry apoint + + + + + + Description + + Moves an isolated node in a topology from one point to another. If new apoint geometry exists as a node an error is thrown. + If any arguments are null, the apoint is not a point, the existing node is not isolated (is a start or end point of an existing edge), new node location intersects an existing edge (even at the end points) then an exception is thrown. + If the spatial reference system (srid) of the point geometry is not the same as the topology an exception is thrown. + + + + Availability: 1.? + &sqlmm_compliant; SQL-MM: Topo-Net Routines: X.3.2 + + + + + Examples + +-- Add an isolated node with no face -- +SELECT topology.ST_AddIsoNode('ma_topo', NULL, ST_GeomFromText('POINT(227579 893916)', 26986) ) As nodeid; + nodeid +-------- + 7 +-- Move the new node -- +SELECT topology.ST_MoveIsoNode('ma_topo', 7, ST_GeomFromText('POINT(227579.5 893916.5)', 26986) ) As descrip; + descrip +---------------------------------------------------- +Isolated Node 7 moved to location 227579.5,893916.5 + + + + + See Also + + + + + + ST_NewEdgesSplit + + Split an edge by creating a new node along an existing edge, deleting the original edge and replacing it with two new edges. Returns the id of the new node created that joins the new edges. + + + + + + integer ST_NewEdgesSplit + varchar atopology + integer anedge + geometry apoint + + + + + + Description + + +Split an edge with edge id anedge by creating a +new node with point location apoint along current +edge, deleting the original edge and replacing it with two new edges. +Returns the id of the new node created that joins the new edges. +Updates all existing joined edges and relationships accordingly. + + + If the spatial reference system (srid) of the point geometry is not the same as the topology, the apoint is not a point geometry, the point is null, the point already exists as a node, the edge does not correspond to an existing edge or the point is not within the edge then an exception is thrown. + + + + Availability: 1.? + &sqlmm_compliant; SQL-MM: Topo-Net Routines: X.3.8 + + + + + Examples + +-- Add an edge -- +SELECT topology.AddEdge('ma_topo', ST_GeomFromText('LINESTRING(227575 893917,227592 893900)', 26986) ) As edgeid; +-- result- +edgeid +------ + 2 +-- Split the new edge -- +SELECT topology.ST_NewEdgesSplit('ma_topo', 2, ST_GeomFromText('POINT(227578.5 893913.5)', 26986) ) As newnodeid; + newnodeid +--------- + 6 + + + + + See Also + + + + + + + + + + + + ST_RemoveIsoNode + + Removes an isolated node and returns description of action. If the node is not isolated (is start or end of an edge), then an exception is thrown. + + + + + + text ST_RemoveIsoNode + varchar atopology + integer anode + + + + + + Description + + Removes an isolated node and returns description of action. If the node is not isolated (is start or end of an edge), then an exception is thrown. + + + + Availability: 1.? + &sqlmm_compliant; SQL-MM: Topo-Geo and Topo-Net 3: Routine Details: X+1.3.3 + + + + + Examples + +-- Add an isolated node with no face -- +SELECT topology.ST_RemoveIsoNode('ma_topo', 7 ) As result; + result +------------------------- + Isolated node 7 removed + + + + + + See Also + + + + + + + Topology Accessors + + + GetEdgeByPoint + + Find the edge-id of an edge that intersects a given point + + + + + + integer GetEdgeByPoint + varchar atopology + geometry apoint + float8 tol + + + + + + + Retrieve the id of an edge that intersects a Point + + The function returns an integer (id-edge) given a topology, a POINT and a tolerance. If tolerance = 0 then the point has to intersect the edge. + If the point is the location of a node, then an exception is thrown. To avoid this run the GetNodeByPoint function. + If the point doesn't intersect an edge, returns 0 (zero). + If use tolerance > 0 and there is more than one edge near the point then an exception is thrown. + + + + + If tolerance = 0, the function use ST_Intersects otherwise uses ST_DWithin. + + + Availability: 2.0.0 - requires GEOS >= 3.3.0. + + + + + Examples + These examples use edges we created in + SELECT topology.GetEdgeByPoint('ma_topo',geom, 1) As with1mtol, topology.GetEdgeByPoint('ma_topo',geom,0) As withnotol +FROM ST_GeomFromEWKT('SRID=26986;POINT(227622.6 893843)') As geom; + with1mtol | withnotol +-----------+----------- + 2 | 0 + + SELECT topology.GetEdgeByPoint('ma_topo',geom, 1) As nearnode +FROM ST_GeomFromEWKT('SRID=26986;POINT(227591.9 893900.4)') As geom; + +-- get error -- +ERROR: Two or more edges found + + + + + See Also + + , + + + + + + GetFaceByPoint + Find the face-id of a face that intersects a given point + + + + + integer GetFaceByPoint + varchar atopology + geometry apoint + float8 tol + + + + + Description + Retrieve the id of a face that intersects a Point. + The function returns an integer (id-face) given a topology, a POINT and a tolerance. If tolerance = 0 then the point has to intersect the face. + If the point is the location of a node, then an exception is thrown. To avoid this run the GetNodeByPoint function. + If the point doesn't intersect a face, returns 0 (zero). + If use tolerance > 0 and there is more than one face near the point then an exception is thrown. + + + + If tolerance = 0, the function uses ST_Intersects otherwise uses ST_DWithin. + + + Availability: 2.0.0 - requires GEOS >= 3.3.0. + + + Examples + These examples use edges faces created in + SELECT topology.GetFaceByPoint('ma_topo',geom, 10) As with1mtol, topology.GetFaceByPoint('ma_topo',geom,0) As withnotol + FROM ST_GeomFromEWKT('POINT(234604.6 899382.0)') As geom; + + with1mtol | withnotol + -----------+----------- + 1 | 0 + SELECT topology.GetFaceByPoint('ma_topo',geom, 1) As nearnode + FROM ST_GeomFromEWKT('POINT(227591.9 893900.4)') As geom; + +-- get error -- +ERROR: Two or more faces found + + + + See Also + , , + + + + + + GetNodeByPoint + + Find the id of a node at a point location + + + + + + integer GetNodeByPoint + varchar atopology + geometry point + float8 tol + + + + + + + Retrieve the id of a node at a point location + + The function return an integer (id-node) given a topology, a POINT and a tolerance. If tolerance = 0 mean exactly intersection otherwise retrieve the node from an interval. + If there isn't a node at the point, it return 0 (zero). + If use tolerance > 0 and near the point there are more than one node it throw an exception. + + + + + If tolerance = 0, the function use ST_Intersects otherwise will use ST_DWithin. + + + Availability: 2.0.0 - requires GEOS >= 3.3.0. + + + + + Examples + These examples use edges we created in + SELECT topology.GetNodeByPoint('ma_topo',geom, 1) As nearnode + FROM ST_GeomFromEWKT('SRID=26986;POINT(227591.9 893900.4)') As geom; + nearnode +---------- + 2 + + SELECT topology.GetNodeByPoint('ma_topo',geom, 1000) As too_much_tolerance + FROM ST_GeomFromEWKT('SRID=26986;POINT(227591.9 893900.4)') As geom; + + ----get error-- + ERROR: Two or more nodes found + + + + + + See Also + + , + + + + + + GetTopologyID + + Returns the id of a topology in the topology.topology table given the name of the topology. + + + + + + integer GetTopologyID + varchar toponame + + + + + + Description + + Returns the id of a topology in the topology.topology table given the name of the topology. + + Availability: 1.? + + + + + Examples + SELECT topology.GetTopologyID('ma_topo') As topo_id; + topo_id +--------- + 1 + + + + + See Also + + , + , + , + + + + + + + + GetTopologySRID + + Returns the SRID of a topology in the topology.topology table given the name of the topology. + + + + + + integer GetTopologyID + varchar toponame + + + + + + Description + + Returns the spatial reference id of a topology in the topology.topology table given the name of the topology. + + Availability: 2.0.0 + + + + + Examples + SELECT topology.GetTopologySRID('ma_topo') As SRID; + SRID +------- + 4326 + + + + + See Also + + , + , + , + + + + + + + + GetTopologyName + + Returns the name of a topology (schema) given the id of the topology. + + + + + + varchar GetTopologyName + integer topology_id + + + + + + Description + + Returns the topology name (schema) of a topology from the topology.topology table given the topology id of the topology. + + Availability: 1.? + + + + + Examples + SELECT topology.GetTopologyName(1) As topo_name; + topo_name +----------- + ma_topo + + + + + See Also + + , + , + , + + + + + + + + ST_GetFaceEdges + + Returns a set of ordered edges that bound aface includes the sequence order. + + + + + + getfaceedges_returntype ST_GetFaceEdges + varchar atopology + integer aface + + + + + + Description + + Returns a set of ordered edges that bound aface includes the sequence order. Each output consists of a sequence and edgeid. Sequence numbers start with value 1. + + +Enumeration of each ring edges start from the edge with smallest identifier. + + + + Availability: 2.0 + &sqlmm_compliant; SQL-MM 3 Topo-Geo and Topo-Net 3: Routine Details: X.3.5 + + + + + Examples + +-- Returns the edges bounding face 1 +SELECT (topology.ST_GetFaceEdges('tt', 1)).*; +-- result -- + sequence | edge +----------+------ + 1 | -4 + 2 | 5 + 3 | 7 + 4 | -6 + 5 | 1 + 6 | 2 + 7 | 3 +(7 rows) + + +-- Returns the sequenc, edge id +-- , and geometry of the edges that bound face 1 +-- If you just need geom and seq, can use ST_GetFaceGeometry +SELECT t.seq, t.edge, geom +FROM topology.ST_GetFaceEdges('tt',1) As t(seq,edge) + INNER JOIN tt.edge AS e ON abs(t.edge) = e.edge_id; + + + + + + See Also + +, +, + + + + + + + + ST_GetFaceGeometry + + Returns the polygon in the given topology with the specified face id. + + + + + + geometry ST_GetFaceGeometry + varchar atopology + integer aface + + + + + + Description + + Returns the polygon in the given topology with the specified face id. Builds the polygon from the edges making up the face. + + + + Availability: 1.? + &sqlmm_compliant; SQL-MM 3 Topo-Geo and Topo-Net 3: Routine Details: X.3.16 + + + + + Examples + +-- Returns the wkt of the polygon added with AddFace +SELECT ST_AsText(topology.ST_GetFaceGeometry('ma_topo', 1)) As facegeomwkt; +-- result -- + facegeomwkt + +-------------------------------------------------------------------------------- + POLYGON((234776.9 899563.7,234896.5 899456.7,234914 899436.4,234946.6 899356.9, +234872.5 899328.7,234891 899285.4,234992.5 899145,234890.6 899069, +234755.2 899255.4,234612.7 899379.4,234776.9 899563.7)) + + + + + + See Also + + + + + + + GetRingEdges + + +Returns an ordered set of edges forming a ring with the given edge . + + + + + + + getfaceedges_returntype GetRingEdges + varchar atopology + integer aring + integer max_edges=null + + + + + + Description + + +Returns an ordered set of edges forming a ring with the given edge. +Each output consists of a sequence and a signed edge id. +Sequence numbers start with value 1. +A negative edge identifier means that the given edge is taken backward. +You can pass a negative edge id to start walking backward. + + + +If max_edges is not null no more than those records +are returned by that function. This is meant to be a safety parameter +when dealing with possibly invalid topologies. + + + + + Availability: 2.0 + + + + + + See Also + +, + + + + + + + + GetNodeEdges + + +Returns an ordered set of edges incident to the given node. + + + + + + + getfaceedges_returntype GetNodeEdges + varchar atopology + integer anode + + + + + + Description + + +Returns an ordered set of edges incident to the given node. +Each output consists of a sequence and a signed edge id. +Sequence numbers start with value 1. +A positive edge starts at the given node. +A negative edge ends into the given node. +Closed edges will appear twice (with both signs). +Order is clockwise starting from northbound. + + + + +This function computes ordering rather than deriving from metadata +and is thus usable to build edge ring linking. + + + + + Availability: 2.0 + + + + + See Also + +, + + + + + + + + + + + + This section covers the functions for processing topologies in non-standard ways. + + + Topology Processing + + + Polygonize + Find and register all faces defined by topology edges + + + + + text Polygonize + varchar toponame + + + + + + Description + + Register all faces that can be built out a topology edge primitives. + The target topology is assumed to contain no self-intersecting edges. + Already known faces are recognized, so it is safe to call Polygonize multiple times on the same topology. + +This function does not use nor set the next_left_edge and next_right_edge fields of the edge table. + + + + + Availability: 2.0.0 + + + + + See Also + , + + + + + + AddNode + + Adds a point node to the node table in the specified topology schema and returns the nodeid of new node. If point already exists as node, the existing nodeid is returned. + + + + + + integer AddNode + varchar toponame + geometry apoint + boolean allowEdgeSplitting=false + boolean computeContainingFace=false + + + + + + Description + + +Adds a point node to the node table in the specified topology schema. +The function automatically adds start and end +points of an edge when called so not necessary to explicitly add nodes +of an edge. + + + +If any edge crossing the node is found either an exception is raised or +the edge is splitted, depending on the allowEdgeSplitting +parameter value. + + + +If computeContainingFace is true a newly added node would +get the correct containing face computed. + + + If the apoint geometry already exists as a node, the node is not added but the existing nodeid is returned. + + + Availability: 2.0.0 + + + + + Examples + SELECT topology.AddNode('ma_topo', ST_GeomFromText('POINT(227641.6 893816.5)', 26986) ) As nodeid; +-- result -- +nodeid +-------- + 4 + + + + + + + See Also + , + + + + + + AddEdge + + Adds a linestring edge to the edge table and associated start and end points to the point nodes table of the specified topology schema using the specified linestring geometry and returns the edgeid of the new (or existing) edge. + + + + + + integer AddEdge + varchar toponame + geometry aline + + + + + + Description + + Adds an edge to the edge table and associated nodes to the nodes table of the specified toponame schema using the specified linestring geometry and returns the edgeid of the new or existing record. + The newly added edge has "universe" face on both sides and links to itself. + If the aline geometry crosses, overlaps, contains or is contained by an existing linestring edge, then an error is thrown and the edge is not added. + The geometry of aline must have the same srid as defined for the topology otherwise an invalid spatial reference sys error will be thrown. + + + + Availability: 2.0.0 requires GEOS >= 3.3.0. + + + + + Examples + SELECT topology.AddEdge('ma_topo', ST_GeomFromText('LINESTRING(227575.8 893917.2,227591.9 893900.4)', 26986) ) As edgeid; +-- result- +edgeid +-------- + 1 + +SELECT topology.AddEdge('ma_topo', ST_GeomFromText('LINESTRING(227591.9 893900.4,227622.6 893844.2,227641.6 893816.5, + 227704.5 893778.5)', 26986) ) As edgeid; +-- result -- +edgeid +-------- + 2 + + SELECT topology.AddEdge('ma_topo', ST_GeomFromText('LINESTRING(227591.2 893900, 227591.9 893900.4, + 227704.5 893778.5)', 26986) ) As edgeid; + -- gives error -- + ERROR: Edge intersects (not on endpoints) with existing edge 1 + + + + + + See Also + , + + + + + + AddFace + + +Registers a face primitive to a topology and get it's identifier. + + + + + + + integer AddFace + varchar toponame + geometry apolygon + boolean force_new=false + + + + + + Description + + +Registers a face primitive to a topology and get it's identifier. + + + +For a newly added face, the edges forming its boundaries and the ones +contained in the face will be updated to have correct values in the +left_face and right_face fields. +Isolated nodes contained in the face will also be updated to have a correct +containing_face field value. + + + +This function does not use nor set the next_left_edge and next_right_edge fields of the edge table. + + + The target topology is assumed to be valid (containing no self-intersecting edges). An exception is raised if: The polygon boundary is not fully defined by existing edges or the polygon overlaps an existing face. + + +If the apolygon geometry already exists as a face, then: +if force_new is false (the default) the +face id of the existing face is returned; +if force_new is true a new id will be assigned to +the newly registered face. + + + +When a new registration of an existing face is performed (force_new=true), +no action will be taken to resolve dangling references to the existing +face in the edge, node an relation tables, nor will the MBR field of the +existing face record be updated. It is up to the caller to deal with that. + + + The apolygon geometry must have the same srid as defined for the topology otherwise an invalid spatial reference sys error will be thrown. + + + Availability: 2.0.0 + + + + + Examples + +-- first add the edges we use generate_series as an iterator (the below +-- will only work for polygons with < 10000 points because of our max in gs) +SELECT topology.AddEdge('ma_topo', ST_MakeLine(ST_PointN(geom,i), ST_PointN(geom, i + 1) )) As edgeid + FROM (SELECT ST_NPoints(geom) AS npt, geom + FROM + (SELECT ST_Boundary(ST_GeomFromText('POLYGON((234896.5 899456.7,234914 899436.4,234946.6 899356.9,234872.5 899328.7, + 234891 899285.4,234992.5 899145, 234890.6 899069,234755.2 899255.4, + 234612.7 899379.4,234776.9 899563.7,234896.5 899456.7))', 26986) ) As geom + ) As geoms) As facen CROSS JOIN generate_series(1,10000) As i + WHERE i < npt; +-- result -- + edgeid +-------- + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 +(10 rows) +-- then add the face - + +SELECT topology.AddFace('ma_topo', + ST_GeomFromText('POLYGON((234896.5 899456.7,234914 899436.4,234946.6 899356.9,234872.5 899328.7, + 234891 899285.4,234992.5 899145, 234890.6 899069,234755.2 899255.4, + 234612.7 899379.4,234776.9 899563.7,234896.5 899456.7))', 26986) ) As faceid; +-- result -- +faceid +-------- + 1 + + + + + + + See Also + , , + + + + + + + + + + This section covers the topology functions for creating new topogeometries. + + + TopoGeometry Constructors + + + CreateTopoGeom + + Creates a new topo geometry object from topo element array - tg_type: 1:[multi]point, 2:[multi]line, 3:[multi]poly, 4:collection + + + + + + topogeometry CreateTopoGeom + varchar toponame + integer tg_type + integer layer_id + topoelementarray tg_objs + + + + topogeometry CreateTopoGeom + varchar toponame + integer tg_type + integer layer_id + + + + + + Description + + Creates a topogeometry object for layer denoted by layer_id and registers it in the relations table in the toponame schema. + tg_type is an integer: 1:[multi]point (punctal), 2:[multi]line (lineal), 3:[multi]poly (areal), 4:collection. layer_id is the layer id in the topology.layer table. + punctal layers are formed from set of nodes, lineal layers are formed from a set of edges, areal layers are formed from a set of faces, + and collections can be formed from a mixture of nodes, edges, and faces. + Omitting the array of components generates an empty TopoGeometry object. + + Availability: 1.? + + + + + Examples: Form from existing edges + Create a topogeom in ri_topo schema for layer 2 (our ri_roads), of type (2) LINE, for the first edge (we loaded in ST_CreateTopoGeo. + INSERT INTO ri.ri_roads(road_name, topo) VALUES('Unknown', topology.CreateTopoGeom('ri_topo',2,2,'{{1,2}}'::topology.topoelementarray); + + + + + Examples: Convert an areal geometry to best guess topogeometry + Lets say we have geometries that should be formed from a collection of faces. We have for example blockgroups table + and want to know the topo geometry of each block group. If our data was perfectly aligned, we could do this: + +-- create our topo geometry column -- +SELECT topology.AddTopoGeometryColumn( + 'topo_boston', + 'boston', 'blockgroups', 'topo', 'POLYGON'); + +-- addtopgeometrycolumn -- +1 + +-- update our column assuming +-- everything is perfectly aligned with our edges +UPDATE boston.blockgroups AS bg + SET topo = topology.CreateTopoGeom('topo_boston' + ,3,1 + , foo.bfaces) +FROM (SELECT b.gid, topology.TopoElementArray_Agg(ARRAY[f.face_id,3]) As bfaces + FROM boston.blockgroups As b + INNER JOIN topo_boston.face As f ON b.geom && f.mbr + WHERE ST_Covers(b.geom, topology.ST_GetFaceGeometry('topo_boston', f.face_id)) + GROUP BY b.gid) As foo +WHERE foo.gid = bg.gid; + + + +--the world is rarely perfect allow for some error +--count the face if 50% of it falls +-- within what we think is our blockgroup boundary +UPDATE boston.blockgroups AS bg + SET topo = topology.CreateTopoGeom('topo_boston' + ,3,1 + , foo.bfaces) +FROM (SELECT b.gid, topology.TopoElementArray_Agg(ARRAY[f.face_id,3]) As bfaces + FROM boston.blockgroups As b + INNER JOIN topo_boston.face As f ON b.geom && f.mbr + WHERE ST_Covers(b.geom, topology.ST_GetFaceGeometry('topo_boston', f.face_id)) + OR + ( ST_Intersects(b.geom, topology.ST_GetFaceGeometry('topo_boston', f.face_id)) + AND ST_Area(ST_Intersection(b.geom, topology.ST_GetFaceGeometry('topo_boston', f.face_id) ) ) > + ST_Area(topology.ST_GetFaceGeometry('topo_boston', f.face_id))*0.5 + ) + GROUP BY b.gid) As foo +WHERE foo.gid = bg.gid; + +-- and if we wanted to convert our topogeometry back +-- to a denomalized geometry aligned with our faces and edges +-- cast the topo to a geometry +-- The really cool thing is my new geometries +-- are now aligned with my tiger street centerlines +UPDATE boston.blockgroups SET new_geom = topo::geometry; + + + + + + See Also + +, + +, +, +, + + + + + + + + toTopoGeom + + Creates a new topo geometry from a simple geometry + + + + + + topogeometry toTopoGeom + geometry geom + varchar toponame + integer layer_id + float8 tolerance + + + + + + Description + + +Creates a topogeometry object for layer denoted by layer_id and registers it in the relations table in the toponame schema. + + + +Topological primitives required to represent the input geometry will be added, possibly splitting existing ones. +Pre-existing TopoGeometry objects will retain their shapes. + + + +When tolerance is given it will be used to snap the input geometry to existing primitives. + + + + Availability: 2.0 + + + Examples + This is a full self-contained workflow + -- do this if you don't have a topology setup already +-- creates topology not allowing any tolerance +SELECT topology.CreateTopology('topo_boston_test', 2249); +-- create a new table +CREATE TABLE nei_topo(gid serial primary key, nei varchar(30)); +--add a topogeometry column to it +SELECT topology.AddTopoGeometryColumn('topo_boston_test', 'public', 'nei_topo', 'topo', 'MULTIPOLYGON') As new_layer_id; +new_layer_id +----------- +1 + +--use new layer id in populating the new topogeometry column +-- we add the topogeoms to the new layer with 0 tolerance +INSERT INTO nei_topo(nei, topo) +SELECT nei, topology.toTopoGeom(geom, 'topo_boston_test', 1) +FROM neighborhoods +WHERE gid BETWEEN 1 and 15; + +--use to verify what has happened -- +SELECT * FROM + topology.TopologySummary('topo_boston_test'); + +-- summary-- +Topology topo_boston_test (5), SRID 2249, precision 0 +61 nodes, 87 edges, 35 faces, 15 topogeoms in 1 layers +Layer 1, type Polygonal (3), 15 topogeoms + Deploy: public.nei_topo.topo + + + + + See Also + ,, +, + + + + + + TopoElementArray_Agg + Returns a topoelementarray for a set of element_id, type arrays (topoelements) + + + + + + topoelementarray TopoElementArray_Agg + topoelement set tefield + + + + + + Description + + Used to create a from a set of . + + + Availability: 2.0.0 + + + + + Examples + SELECT topology.TopoElementArray_Agg(ARRAY[e,t]) As tea + FROM generate_series(1,3) As e CROSS JOIN generate_series(1,4) As t; + tea +-------------------------------------------------------------------------- +{{1,1},{1,2},{1,3},{1,4},{2,1},{2,2},{2,3},{2,4},{3,1},{3,2},{3,3},{3,4}} + + + See Also + , + + + + + + TopoGeometry Accessors + + + + GetTopoGeomElementArray + + Returns a topoelementarray (an array of topoelements) containing the topological elements and type of the given TopoGeometry (primitive elements) + + + + + + topoelementarray GetTopoGeomElementArray + varchar toponame + integer layer_id + integer tg_id + + + + + topoelementarray topoelement GetTopoGeomElementArray + topogeometry tg + + + + + + Description + + Returns a containing the topological elements and type of the given TopoGeometry (primitive elements). This is similar to GetTopoGeomElements except it returns the elements as an array rather + than as a dataset. + tg_id is the topogeometry id of the topogeometry object in the topology in the layer denoted by layer_id in the topology.layer table. + + + Availability: 1.? + + + + + Examples + + + + + + + See Also + , + + + + + GetTopoGeomElements + + Returns a set of topoelement objects containing the topological element_id,element_type of the given TopoGeometry (primitive elements) + + + + + + setof topoelement GetTopoGeomElements + varchar toponame + integer layer_id + integer tg_id + + + + + setof topoelement GetTopoGeomElements + topogeometry tg + + + + + + Description + + Returns a set of element_id,element_type (topoelements) for a given topogeometry object in toponame schema. + tg_id is the topogeometry id of the topogeometry object in the topology in the layer denoted by layer_id in the topology.layer table. + + + Availability: 1.? + + + + + Examples + + + + + + + See Also + , + + + + + + + TopoGeometry Outputs + + + AsGML + + Returns the GML representation of a topogeometry. + + + + + + text AsGML + topogeometry tg + + + text AsGML + topogeometry tg + text nsprefix_in + + + text AsGML + topogeometry tg + regclass visitedTable + + + text AsGML + topogeometry tg + regclass visitedTable + text nsprefix + + + text AsGML + topogeometry tg + text nsprefix_in + integer precision + integer options + + + text AsGML + topogeometry tg + text nsprefix_in + integer precision + integer options + regclass visitedTable + + + text AsGML + topogeometry tg + text nsprefix_in + integer precision + integer options + regclass visitedTable + text idprefix + + + text AsGML + topogeometry tg + text nsprefix_in + integer precision + integer options + regclass visitedTable + text idprefix + int gmlversion + + + + + + Description + + Returns the GML representation of a topogeometry in version GML3 format. If no nsprefix_in is specified then gml is used. Pass in an empty string for nsprefix to get a non-qualified name space. The precision (default: 15) and options (default 1) parameters, if given, are passed untouched to the underlying call to ST_AsGML. + + +The visitedTable parameter, if given, is used for keeping track of the visited Node and Edge elements so to use cross-references (xlink:xref) rather than duplicating definitions. The table is expected to have (at least) two integer fields: 'element_type' and 'element_id'. The calling user must have both read and write privileges on the given table. +For best performance, an index should be defined on +element_type and element_id, +in that order. Such index would be created automatically by adding a unique +constraint to the fields. Example: + +CREATE TABLE visited ( + element_type integer, element_id integer, + unique(element_type, element_id) +); + + + + The idprefix parameter, if given, will be prepended to Edge and Node tag identifiers. + + The gmlver parameter, if given, will be passed to the underlying ST_AsGML. Defaults to 3. + + + Availability: 2.0.0 + + + + + Examples + This uses the topo geometry we created in + SELECT topology.AsGML(topo) As rdgml + FROM ri.roads + WHERE road_name = 'Unknown'; + +-- rdgml-- + + + + + + + + + + + + 384744 236928 384750 236923 384769 236911 384799 236895 384811 236890 + 384833 236884 384844 236882 384866 236881 384879 236883 384954 236898 385087 236932 385117 236938 + 385167 236938 385203 236941 385224 236946 385233 236950 385241 236956 385254 236971 + 385260 236979 385268 236999 385273 237018 385273 237037 385271 237047 385267 237057 385225 237125 + 385210 237144 385192 237161 385167 237192 385162 237202 385159 237214 385159 237227 385162 237241 + 385166 237256 385196 237324 385209 237345 385234 237375 385237 237383 385238 237399 385236 237407 + 385227 237419 385213 237430 385193 237439 385174 237451 385170 237455 385169 237460 385171 237475 + 385181 237503 385190 237521 385200 237533 385206 237538 385213 237541 385221 237542 385235 237540 385242 237541 + 385249 237544 385260 237555 385270 237570 385289 237584 385292 237589 385291 237596 385284 237630 + + + + + + +]]> + +Same exercise as previous without namespace +SELECT topology.AsGML(topo,'') As rdgml + FROM ri.roads + WHERE road_name = 'Unknown'; + +-- rdgml-- + + + + + + + + + + + + 384744 236928 384750 236923 384769 236911 384799 236895 384811 236890 + 384833 236884 384844 236882 384866 236881 384879 236883 384954 236898 385087 236932 385117 236938 + 385167 236938 385203 236941 385224 236946 385233 236950 385241 236956 385254 236971 + 385260 236979 385268 236999 385273 237018 385273 237037 385271 237047 385267 237057 385225 237125 + 385210 237144 385192 237161 385167 237192 385162 237202 385159 237214 385159 237227 385162 237241 + 385166 237256 385196 237324 385209 237345 385234 237375 385237 237383 385238 237399 385236 237407 + 385227 237419 385213 237430 385193 237439 385174 237451 385170 237455 385169 237460 385171 237475 + 385181 237503 385190 237521 385200 237533 385206 237538 385213 237541 385221 237542 385235 237540 385242 237541 + 385249 237544 385260 237555 385270 237570 385289 237584 385292 237589 385291 237596 385284 237630 + + + + + + +]]> + + + + + + See Also + , + + + + diff -Nru postgis-1.5.3/doc/faq.xml postgis-2.0.1/doc/faq.xml --- postgis-1.5.3/doc/faq.xml 2011-06-07 13:07:42.000000000 +0000 +++ postgis-2.0.1/doc/faq.xml 2012-03-10 13:42:12.000000000 +0000 @@ -1,8 +1,24 @@ - Frequently Asked Questions + PostGIS Frequently Asked Questions + + + My applications and desktop tools worked with PostGIS 1.5,but they don't work with PostGIS 2.0. How do I fix this? + + + + A lot of deprecated functions were removed from the PostGIS code base in PostGIS 2.0. This has affected applications in addition to third-party tools such as + Geoserver, MapServer, QuantumGIS, and OpenJump to name a few. There are a couple of ways to resolve this. For the third-party apps, you can try to upgrade to the latest versions + of these which have many of these issues fixed. For your own code, you can change your code to not use the functions removed. Most of these functions are non ST_ aliases of ST_Union, ST_Length etc. + and as a last resort, install the whole of legacy.sql or just the + portions of legacy.sql you need. + + The legacy.sql file is located in the same folder as postgis.sql. You can install this file after you have installed postgis.sql and spatial_ref_sys.sql + to get back all the 200 some-odd old functions we removed. + + I'm running PostgreSQL 9.0 and I can no longer read/view geometries in OpenJump, Safe FME, and some other tools? @@ -31,7 +47,7 @@ - PgAdmin doesn't show anything for large geometries. The best ways to verify you do have day in your geometry columns are? + PgAdmin doesn't show anything for large geometries. The best ways to verify you do have data in your geometry columns are? -- this should return no records if all your geom fields are filled in @@ -50,11 +66,13 @@ You can store point, line, polygon, multipoint, multiline, - multipolygon, and geometrycollections. These are specified in the Open - GIS Well Known Text Format (with XYZ,XYM,XYZM extensions). There are two data types currently supported. - The standard OGC geometry data type which uses a planar coordinate system for measurement and the - geography data type which uses a geodetic coordinate system. Only WGS 84 long lat (SRID:4326) is supported - by the geography data type. + multipolygon, and geometrycollections. In PostGIS 2.0 and above you can also store TINS and Polyhedral Surfaces in the basic geometry type. + These are specified in the Open + GIS Well Known Text Format (with XYZ,XYM,XYZM extensions). There are three data types currently supported. + The standard OGC geometry data type which uses a planar coordinate system for measurement, the + geography data type which uses a geodetic coordinate system (not OGC, but you'll find a similar type in Microsoft SQL Server 2008+). Only WGS 84 long lat (SRID:4326) is supported + by the geography data type. The newest family member of the PostGIS spatial type family is raster for storing and analyzing raster data. Raster has its very own FAQ. Refer to + and for more details. @@ -88,7 +106,7 @@ Your questions are too deep and complex to be adequately answered in this section. Please refer to our - . + . @@ -341,5 +359,18 @@ it is not showing you. + + + + I am releasing software that uses PostGIS, does that mean my software has to be licensed using the GPL like PostGIS? Will I have to publish all my code if I use PostGIS? + + + + Almost certainly not. As an example, consider Oracle database running on Linux. Linux is GPL, Oracle is not, does Oracle running on Linux have to be distributed using the GPL? No. So your software can use a PostgreSQL/PostGIS database as much as it wants and be under any license you like. + The only exception would be if you made changes to the PostGIS source code, and distributed your changed version of PostGIS. In that case you would have to share the code of your changed PostGIS (but not the code of applications running on top of it). Even in this limited case, you would still only have to distribute source code to people you distributed binaries to. The GPL does not require that you publish your source code, only that you share it with people you give binaries to. + + + - \ No newline at end of file + + diff -Nru postgis-1.5.3/doc/faq_raster.xml postgis-2.0.1/doc/faq_raster.xml --- postgis-1.5.3/doc/faq_raster.xml 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/faq_raster.xml 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,274 @@ + + + PostGIS Raster Frequently Asked Questions + + + + + + Where can I find out more about the PostGIS Raster Project? + + + + Refer to the PostGIS Raster home page. + + + + + + Are there any books or tutorials to get me started with this wonderful invention? + + + + There is a full length beginner tutorial Intersecting vector buffers with large raster coverage using PostGIS Raster. + Jorge has a series of blog articles on PostGIS Raster that demonstrate how to load raster data as well as cross compare to same tasks in Oracle GeoRaster. Check out + Jorge's PostGIS Raster / Oracle GeoRaster Series. + There is a whole chapter (more than 35 pages of content) dedicated to PostGIS Raster with free code and data downloads at PostGIS in Action - Raster chapter. + You can buy PostGIS in Action now from Manning in hard-copy (significant discounts for bulk purchases) or just the E-book format. + You can also buy from Amazon and various other book distributors. All hard-copy books come with a free coupon to download the E-book version. + + Here is a review from a PostGIS Raster user PostGIS raster applied to land classification urban forestry + + + + + + + How do I install Raster support in my PostGIS database? + + + + The easiest is to download binaries for PostGIS and Raster which are currently available for windows and latest versions of Mac OSX. + First you need a working PostGIS 2.0.0 or above and be running PostgreSQL 8.4, 9.0, or 9.1. Note in PostGIS 2.0 PostGIS Raster is fully integrated, so it will be compiled when you compile PostGIS. + Instructions for installing and running under windows are available at How to Install and Configure PostGIS raster on windows + + If you are on windows, you can compile yourself, or use the pre-compiled + PostGIS Raster windows binaries. + If you are on Mac OSX Leopard or Snow Leopard, there are binaries available at Kyng Chaos Mac OSX PostgreSQL/GIS binaries. + + Then to enable raster support in your database, run the rtpostgis.sql file in your database. To upgrade an existing install use rtpostgis_upgrade_minor..sql instead of rtpostgis.sql + For other platforms, you generally need to compile yourself. Dependencies are PostGIS and GDAL. For more details about compiling from source, please refer to Installing PostGIS Raster from source (in prior versions of PostGIS) + + + + + + I get error could not load library "C:/Program Files/PostgreSQL/8.4/lib/rtpostgis.dll": The specified module could not be found. + or could not load library on Linux when trying to run rtpostgis.sql + + + + rtpostgis.so/dll is built with dependency on libgdal.dll/so. Make sure for Windows you have libgdal-1.dll in the bin folder of your PostgreSQL install. + For Linux libgdal has to be in your path or bin folder. + You may also run into different errors if you don't have PostGIS installed in your database. Make sure to install PostGIS first in your + database before trying to install the raster support. + + + + + + How do I load Raster data into PostGIS? + + + + The latest version of PostGIS comes packaged with a raster2pgsql raster loader executable capable of loading many kinds of rasters and also generating lower resolution overviews without any additional software. Please refer to for more details. Pre-2.0 versions came with a raster2pgsql.py that required python with numpy and GDAL. This is no longer needed. + + + + + + What kind of raster file formats can I load into my database? + + + + Any that your GDAL library supports. GDAL supported formats are documented GDAL File Formats. + Your particular GDAL install may not support all formats. To verify the ones supported by your particular GDAL install, you can use + raster2pgsql -G + + + + + + Can I export my PostGIS raster data to other raster formats? + + + + Yes + GDAL 1.7+ has a PostGIS raster driver, but is only compiled in if you choose to compile with PostgreSQL support. + The driver currently doesn't support irregularly blocked rasters, + although you can store irregularly blocked rasters in PostGIS raster data type. + If you are compiling from source, you need to include in your configure + --with-pg=path/to/pg_config to enable the driver. + Refer to GDAL Build Hints for tips + on building GDAL against in various OS platforms. + + If your version of GDAL is compiled with the PostGIS Raster driver + you should see PostGIS Raster in list when you do + gdalinfo --formats + + To get a summary about your raster via GDAL use gdalinfo: + gdalinfo "PG:host=localhost port=5432 dbname='mygisdb' user='postgres' password='whatever' schema='someschema' table=sometable" + + + To export data to other raster formats, + use gdal_translate the below will export all data from a table to a PNG file at 10% size. + Depending on your pixel band types, some translations may not work if the export format does not support that Pixel type. + For example floating point band types and 32 bit unsigned ints + will not translate easily to JPG or some others. + Here is an example simple translation + gdal_translate -of PNG -outsize 10% 10% "PG:host=localhost dbname='mygisdb' user='postgres' password=whatever' schema='someschema' table=sometable" C:\somefile.png + You can also use SQL where clauses in your export using the where=... in your driver connection string. + Below are some using a where clause + gdal_translate -of PNG -outsize 10% 10% "PG:host=localhost dbname='mygisdb' user='postgres' password=whatever' schema='someschema' table=sometable where="owner='jimmy'" " C:\somefile.png + gdal_translate -of PNG -outsize 10% 10% "PG:host=localhost dbname='mygisdb' user='postgres' password=whatever' schema='someschema' table=sometable where='ST_Intersects(rast, ST_SetSRID(ST_Point(-71.032,42.3793),4326) )' " C:\intersectregion.png + To see more examples and syntax refer to Reading Raster Data of PostGIS Raster section + + + + + Are their binaries of GDAL available already compiled with PostGIS Raster suppport? + + Yes. Check out the page GDAL Binaries page. Any compiled with PostgreSQL + support should have PostGIS Raster in them. + We know for sure the following windows binaries have PostGIS Raster built in. + FWTools latest stable version for Windows is compiled with Raster support. + PostGIS Raster is undergoing many changes. If you want to get the latest nightly build for Windows -- then check out + the Tamas Szekeres nightly builds built with Visual Studio which contain GDAL trunk, Python Bindings and MapServer executables and PostGIS Raster driver built-in. Just + click the SDK bat and run your commands from there. http://vbkto.dyndns.org/sdk/. + Also available are VS project files. + + + + + + What tools can I use to view PostGIS raster data? + + + + You can use MapServer compiled with GDAL 1.7+ and PostGIS Raster driver support to view Raster data. QuantumGIS (QGIS) now supports viewing of PostGIS Raster if you + have PostGIS raster driver installed. + In theory any tool that renders data using GDAL can support PostGIS raster data or + support it with fairly minimal effort. Again for Windows, Tamas' binaries http://vbkto.dyndns.org/sdk/ are a good choice if you don't want the hassle of having to setup to compile your own. + + + + + + How can I add a PostGIS raster layer to my MapServer map? + + + + First you need GDAL 1.7 or higher compiled with PostGIS raster support. + GDAL 1.8 or above is preferred since many issues have been fixed in 1.8 and more PostGIS raster issues fixed in trunk version. + You can much like you can with any other raster. + Refer to MapServer Raster processing options + for list of various processing functions you can use with MapServer raster layers. + What makes PostGIS raster data particularly interesting, is that since + each tile can have various standard database columns, you can segment it in your data source + Below is an example of how you would define a PostGIS raster layer in MapServer. + The mode=2 is required for tiled rasters and was added in PostGIS 2.0 and GDAL 1.8 drivers. This does not exist in GDAL 1.7 drivers. + +-- displaying raster with standard raster options +LAYER + NAME coolwktraster + TYPE raster + STATUS ON + DATA "PG:host=localhost port=5432 dbname='somedb' user='someuser' password='whatever' + schema='someschema' table='cooltable' mode='2'" + PROCESSING "NODATA=0" + PROCESSING "SCALE=AUTO" + #... other standard raster processing functions here + #... classes are optional but useful for 1 band data + CLASS + NAME "boring" + EXPRESSION ([pixel] < 20) + COLOR 250 250 250 + END + CLASS + NAME "mildly interesting" + EXPRESSION ([pixel] > 20 AND [pixel] < 1000) + COLOR 255 0 0 + END + CLASS + NAME "very interesting" + EXPRESSION ([pixel] >= 1000) + COLOR 0 255 0 + END +END + + + +-- displaying raster with standard raster options and a where clause +LAYER + NAME soil_survey2009 + TYPE raster + STATUS ON + DATA "PG:host=localhost port=5432 dbname='somedb' user='someuser' password='whatever' + schema='someschema' table='cooltable' where='survey_year=2009' mode='2'" + PROCESSING "NODATA=0" + #... other standard raster processing functions here + #... classes are optional but useful for 1 band data +END + + + + + + + + + What functions can I currently use with my raster data? + + + + Refer to the list of . + There are more, but this is still a work in progress. + Refer to the PostGIS Raster roadmap page + for details of what you can expect in the future. + + + + + + I am getting error ERROR: function st_intersects(raster, unknown) is not unique or st_union(geometry,text) is not unique. How do I fix? + + + + The function is not unique error happens if one of your arguments is a textual representation of a geometry instead of a geometry. In these cases, PostgreSQL marks the textual representation as an unknown type, which means it can fall into the st_intersects(raster, geometry) or st_intersects(raster,raster) thus resulting in a non-unique case since both functions can in theory support your request. To prevent this, you need to cast the geometry to a geometry. + For example if your code looks like this: + SELECT rast + FROM my_raster + WHERE ST_Intersects(rast, 'SRID=4326;POINT(-10 10)'); + Cast the textual geometry representation to a geometry by changing your code to this: + SELECT rast + FROM my_raster + WHERE ST_Intersects(rast, 'SRID=4326;POINT(-10 10)'::geometry); + + + + + + + + How is PostGIS Raster different from Oracle GeoRaster (SDO_GEORASTER) and SDO_RASTER types? + + + + For a more extensive discussion on this topic, check out Jorge Arévalo Oracle GeoRaster and PostGIS Raster: First impressions + The major advantage of one-georeference-by-raster over one-georeference-by-layer is to allow: + * coverages to be not necessarily rectangular (which is often the case of raster coverage covering large extents. See the possible raster arrangements in the documentation) + * rasters to overlaps (which is necessary to implement lossless vector to raster conversion) + These arrangements are possible in Oracle as well, but they imply + the storage of multiple SDO_GEORASTER objects linked to as many + SDO_RASTER tables. A complex coverage can lead to hundreds of tables in + the database. With PostGIS Raster you can store a similar raster arrangement into a unique table. + + It's a bit like if PostGIS would force you to store only full rectangular vector coverage without gaps or overlaps (a perfect rectangular topological layer). + This is very practical in some applications but practice has shown that it is not realistic or desirable for most geographical coverages. Vector structures needs the flexibility to store discontinuous and non-rectangular coverages. + We think it is a big advantage that raster structure should benefit as well. + + + + diff -Nru postgis-1.5.3/doc/geography.txt postgis-2.0.1/doc/geography.txt --- postgis-1.5.3/doc/geography.txt 2009-09-14 10:54:33.000000000 +0000 +++ postgis-2.0.1/doc/geography.txt 2012-02-27 22:08:12.000000000 +0000 @@ -140,7 +140,7 @@ Using Input/Output Functions ============================ -There are only four intput/output functions at this time supporting the OGC well-known text (WKT) and well-known binary (WKB) formats. Adding further output formats (GML, GeoJSON) should be straight-forward, borrowing code from the geometry implementations. +There are only four input/output functions at this time supporting the OGC well-known text (WKT) and well-known binary (WKB) formats. Adding further output formats (GML, GeoJSON) should be straight-forward, borrowing code from the geometry implementations. * ST_AsText(geography) returns text * ST_AsBinary(geography) returns bytea diff -Nru postgis-1.5.3/doc/html/image_src/Makefile postgis-2.0.1/doc/html/image_src/Makefile --- postgis-1.5.3/doc/html/image_src/Makefile 2011-06-25 16:29:51.000000000 +0000 +++ postgis-2.0.1/doc/html/image_src/Makefile 2012-06-22 21:04:32.000000000 +0000 @@ -11,7 +11,7 @@ # ********************************************************************** CC=gcc -CFLAGS=-g -O2 -Wall -Wmissing-prototypes +CFLAGS=-g -O2 -Wall -Wmissing-prototypes CUNIT_LDFLAGS= -lcunit CUNIT_CPPFLAGS= -I../../../liblwgeom @@ -19,6 +19,8 @@ IMAGES= \ ../images/de9im01.png \ ../images/de9im02.png \ + ../images/st_azimuth01.png \ + ../images/st_azimuth02.png \ ../images/st_buffer01.png \ ../images/st_buffer02.png \ ../images/st_buffer03.png \ @@ -41,6 +43,14 @@ ../images/st_contains04.png \ ../images/st_contains05.png \ ../images/st_contains06.png \ + ../images/st_concavehull01.png \ + ../images/st_concavehull02.png \ + ../images/st_concavehull03.png \ + ../images/st_concavehull04.png \ + ../images/st_concavehull05.png \ + ../images/st_concavehull06.png \ + ../images/st_concavehull07.png \ + ../images/st_concavehull08.png \ ../images/st_convexhull01.png \ ../images/st_crosses01.png \ ../images/st_crosses02.png \ @@ -63,6 +73,7 @@ ../images/st_isvalid06.png \ ../images/st_isvalid07.png \ ../images/st_isvalid08.png \ + ../images/st_isvalid09.png \ ../images/st_linecrossingdirection01.png \ ../images/st_linecrossingdirection02.png \ ../images/st_linecrossingdirection03.png \ @@ -73,8 +84,28 @@ ../images/st_longestline02.png \ ../images/st_longestline03.png \ ../images/st_minimumboundingcircle01.png \ + ../images/st_offsetcurve01.png \ + ../images/st_offsetcurve02.png \ + ../images/st_offsetcurve03.png \ + ../images/st_offsetcurve04.png \ + ../images/st_offsetcurve05.png \ + ../images/st_offsetcurve06.png \ + ../images/st_overlaps01.png \ + ../images/st_overlaps02.png \ + ../images/st_overlaps03.png \ + ../images/st_sharedpaths01.png \ + ../images/st_sharedpaths02.png \ ../images/st_shortestline01.png \ ../images/st_shortestline02.png \ + ../images/st_snap01.png \ + ../images/st_snap02.png \ + ../images/st_snap03.png \ + ../images/st_snap04.png \ + ../images/st_snap05.png \ + ../images/st_split01.png \ + ../images/st_split02.png \ + ../images/st_split03.png \ + ../images/st_split04.png \ ../images/st_symdifference01.png \ ../images/st_symdifference02.png \ ../images/st_touches01.png \ @@ -121,16 +152,22 @@ convert $@ -resize 100x100 $@ # Build the main executable -generator: ../../../liblwgeom/liblwgeom.a $(OBJS) - $(CC) -o $@ $(OBJS) ../../../liblwgeom/liblwgeom.a -lm $(CUNIT_LDFLAGS) +generator: ../../../liblwgeom/.libs/liblwgeom.a $(OBJS) + $(CC) -o $@ $(OBJS) ../../../liblwgeom/.libs/liblwgeom.a -lm $(CUNIT_LDFLAGS) # Build liblwgeom -../../../liblwgeom/liblwgeom.a: - make -C ../../../liblwgeom liblwgeom.a +../../../liblwgeom/.libs/liblwgeom.a: + make -C ../../../liblwgeom liblwgeom.la # Clean target clean: - @rm -f $(OBJS) - @rm -f generator - @rm -f tmp[0-9].png + rm -f $(OBJS) + rm -f generator + rm -f tmp[0-9].png + +distclean: clean + rm -f Makefile + +images-clean: + rm -f $(IMAGES) $(IMAGES_RESIZED) diff -Nru postgis-1.5.3/doc/html/image_src/Makefile.in postgis-2.0.1/doc/html/image_src/Makefile.in --- postgis-1.5.3/doc/html/image_src/Makefile.in 2010-01-11 17:31:49.000000000 +0000 +++ postgis-2.0.1/doc/html/image_src/Makefile.in 2012-03-21 21:36:59.000000000 +0000 @@ -11,7 +11,7 @@ # ********************************************************************** CC=@CC@ -CFLAGS=@CFLAGS@ @WARNFLAGS@ +CFLAGS=@CFLAGS@ @WARNFLAGS@ @PROJ_CPPFLAGS@ CUNIT_LDFLAGS=@CUNIT_LDFLAGS@ CUNIT_CPPFLAGS=@CUNIT_CPPFLAGS@ -I../../../liblwgeom @@ -19,6 +19,8 @@ IMAGES= \ ../images/de9im01.png \ ../images/de9im02.png \ + ../images/st_azimuth01.png \ + ../images/st_azimuth02.png \ ../images/st_buffer01.png \ ../images/st_buffer02.png \ ../images/st_buffer03.png \ @@ -41,6 +43,14 @@ ../images/st_contains04.png \ ../images/st_contains05.png \ ../images/st_contains06.png \ + ../images/st_concavehull01.png \ + ../images/st_concavehull02.png \ + ../images/st_concavehull03.png \ + ../images/st_concavehull04.png \ + ../images/st_concavehull05.png \ + ../images/st_concavehull06.png \ + ../images/st_concavehull07.png \ + ../images/st_concavehull08.png \ ../images/st_convexhull01.png \ ../images/st_crosses01.png \ ../images/st_crosses02.png \ @@ -63,6 +73,7 @@ ../images/st_isvalid06.png \ ../images/st_isvalid07.png \ ../images/st_isvalid08.png \ + ../images/st_isvalid09.png \ ../images/st_linecrossingdirection01.png \ ../images/st_linecrossingdirection02.png \ ../images/st_linecrossingdirection03.png \ @@ -73,8 +84,28 @@ ../images/st_longestline02.png \ ../images/st_longestline03.png \ ../images/st_minimumboundingcircle01.png \ + ../images/st_offsetcurve01.png \ + ../images/st_offsetcurve02.png \ + ../images/st_offsetcurve03.png \ + ../images/st_offsetcurve04.png \ + ../images/st_offsetcurve05.png \ + ../images/st_offsetcurve06.png \ + ../images/st_overlaps01.png \ + ../images/st_overlaps02.png \ + ../images/st_overlaps03.png \ + ../images/st_sharedpaths01.png \ + ../images/st_sharedpaths02.png \ ../images/st_shortestline01.png \ ../images/st_shortestline02.png \ + ../images/st_snap01.png \ + ../images/st_snap02.png \ + ../images/st_snap03.png \ + ../images/st_snap04.png \ + ../images/st_snap05.png \ + ../images/st_split01.png \ + ../images/st_split02.png \ + ../images/st_split03.png \ + ../images/st_split04.png \ ../images/st_symdifference01.png \ ../images/st_symdifference02.png \ ../images/st_touches01.png \ @@ -121,16 +152,22 @@ convert $@ -resize 100x100 $@ # Build the main executable -generator: ../../../liblwgeom/liblwgeom.a $(OBJS) - $(CC) -o $@ $(OBJS) ../../../liblwgeom/liblwgeom.a -lm $(CUNIT_LDFLAGS) +generator: ../../../liblwgeom/.libs/liblwgeom.a $(OBJS) + $(CC) -o $@ $(OBJS) ../../../liblwgeom/.libs/liblwgeom.a -lm $(CUNIT_LDFLAGS) # Build liblwgeom -../../../liblwgeom/liblwgeom.a: - make -C ../../../liblwgeom liblwgeom.a +../../../liblwgeom/.libs/liblwgeom.a: + make -C ../../../liblwgeom liblwgeom.la # Clean target clean: - @rm -f $(OBJS) - @rm -f generator - @rm -f tmp[0-9].png + rm -f $(OBJS) + rm -f generator + rm -f tmp[0-9].png + +distclean: clean + rm -f Makefile + +images-clean: + rm -f $(IMAGES) $(IMAGES_RESIZED) diff -Nru postgis-1.5.3/doc/html/image_src/generator.c postgis-2.0.1/doc/html/image_src/generator.c --- postgis-1.5.3/doc/html/image_src/generator.c 2010-02-01 17:35:55.000000000 +0000 +++ postgis-2.0.1/doc/html/image_src/generator.c 2012-02-27 22:08:12.000000000 +0000 @@ -34,7 +34,8 @@ #include #include -#include "lwalgorithm.h" +#include "liblwgeom.h" +#include "lwgeom_log.h" #include "styles.h" #define SHOW_DIGS_DOUBLE 15 @@ -110,7 +111,7 @@ getPoint2d_p(pa, 0, &p); LWDEBUGF(4, "%s", "drawPoint called"); - LWDEBUGF( 4, "point = %s", lwgeom_to_ewkt((LWGEOM*)lwp,0) ); + LWDEBUGF( 4, "point = %s", lwgeom_to_ewkt((LWGEOM*)lwp) ); sprintf(x, "%f", p.x); trim_trailing_zeros(x); @@ -141,7 +142,7 @@ char *ptr = output; LWDEBUGF(4, "%s", "drawLineString called"); - LWDEBUGF( 4, "line = %s", lwgeom_to_ewkt((LWGEOM*)lwl,0) ); + LWDEBUGF( 4, "line = %s", lwgeom_to_ewkt((LWGEOM*)lwl) ); ptr += sprintf(ptr, "-fill none -stroke %s -strokewidth %d ", style->lineColor, style->lineWidth); ptr += sprintf(ptr, "-draw \"stroke-linecap round stroke-linejoin round path 'M "); @@ -167,7 +168,7 @@ int i; LWDEBUGF(4, "%s", "drawPolygon called"); - LWDEBUGF( 4, "poly = %s", lwgeom_to_ewkt((LWGEOM*)lwp,0) ); + LWDEBUGF( 4, "poly = %s", lwgeom_to_ewkt((LWGEOM*)lwp) ); ptr += sprintf(ptr, "-fill %s -stroke %s -strokewidth %d ", style->polygonFillColor, style->polygonStrokeColor, style->polygonStrokeWidth ); ptr += sprintf(ptr, "-draw \"path '"); @@ -196,7 +197,7 @@ { char *ptr = output; int i; - int type = lwgeom_getType(lwgeom->type); + int type = lwgeom->type; switch (type) { @@ -337,12 +338,13 @@ int layerCount; int styleNumber; LAYERSTYLE *styles; + char *image_path = "../images/"; getStyles(&styles); - if ( argc != 2 ) + if ( argc != 2 || strlen(argv[1]) < 3) { - lwerror("You must specifiy a wkt filename to convert.\n"); + lwerror("You must specify a wkt filename to convert, and it must be 3 or more characters long.\n"); return -1; } @@ -352,8 +354,8 @@ return -1; } - filename = malloc( strlen(argv[1])+11 ); - strncpy( filename, "../images/", 10 ); + filename = malloc( strlen(argv[1]) + strlen(image_path) + 1 ); + strcpy( filename, image_path ); strncat( filename, argv[1], strlen(argv[1])-3 ); strncat( filename, "png", 3 ); @@ -363,7 +365,7 @@ while ( fgets ( line, sizeof line, pfile ) != NULL && !isspace(*line) ) { - char output[2048]; + char output[32768]; char *ptr = output; char *styleName; int useDefaultStyle; @@ -376,11 +378,11 @@ if (useDefaultStyle) { printf(" Warning: using Default style for layer %d\n", layerCount); - lwgeom = lwgeom_from_ewkt( line, PARSER_CHECK_NONE ); + lwgeom = lwgeom_from_wkt( line, LW_PARSER_CHECK_NONE ); } else - lwgeom = lwgeom_from_ewkt( line+strlen(styleName)+1, PARSER_CHECK_NONE ); - LWDEBUGF( 4, "geom = %s", lwgeom_to_ewkt((LWGEOM*)lwgeom,0) ); + lwgeom = lwgeom_from_wkt( line+strlen(styleName)+1, LW_PARSER_CHECK_NONE ); + LWDEBUGF( 4, "geom = %s", lwgeom_to_ewkt((LWGEOM*)lwgeom) ); styleNumber = layerCount % length(styles); ptr += drawGeometry( ptr, lwgeom, getStyle(styles, styleName) ); diff -Nru postgis-1.5.3/doc/html/image_src/st_azimuth01.wkt postgis-2.0.1/doc/html/image_src/st_azimuth01.wkt --- postgis-1.5.3/doc/html/image_src/st_azimuth01.wkt 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/html/image_src/st_azimuth01.wkt 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,4 @@ +Style2;POINT(25 45) +Style1;POINT(75 100) +Style2-thinline;LINESTRING(25 45,99.3303 45) +Style3;LINESTRING(99.33034 45,98.9724 52.28569,97.90206 59.50121,96.12963 66.57707,93.67218 73.44514,90.55337 80.03925,86.80325 86.29593,82.45792 92.15489,77.55924 97.55973,75 100) diff -Nru postgis-1.5.3/doc/html/image_src/st_azimuth02.wkt postgis-2.0.1/doc/html/image_src/st_azimuth02.wkt --- postgis-1.5.3/doc/html/image_src/st_azimuth02.wkt 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/html/image_src/st_azimuth02.wkt 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,4 @@ +Style2;POINT(75 100) +Style1;POINT(25 45) +Style2-thinline;LINESTRING(75 100,149.33034 100) +Style3;LINESTRING(149.33034 100,148.97241 107.28565,147.90209 114.50113,146.12969 121.57695,143.67226 128.44498,140.55349 135.03907,136.8034 141.29571,132.4581 147.15465,127.55946 152.55946,122.15464 157.4581,116.29569 161.80338,110.03905 165.55347,103.44496 168.67223,96.57693 171.12965,89.5011 172.90205,82.28562 173.97236,74.99997 174.33027,67.71433 173.97235,60.49885 172.90203,53.42302 171.12962,46.55499 168.6722,39.96091 165.55342,33.70427 161.80333,27.84533 157.45804,22.44051 152.55939,17.54187 147.15457,13.19659 141.29563,9.44651 135.03898,6.32774 128.44489,3.87032 121.57686,2.09792 114.50103,1.02761 107.28555,0.6697 99.99991,1.02762 92.71426,2.09794 85.49878,3.87035 78.42295,6.32777 71.55493,9.44655 64.96084,13.19664 58.7042,17.54193 52.84526,22.44058 47.44045,25 45) diff -Nru postgis-1.5.3/doc/html/image_src/st_azimuthmath.sql postgis-2.0.1/doc/html/image_src/st_azimuthmath.sql --- postgis-1.5.3/doc/html/image_src/st_azimuthmath.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/html/image_src/st_azimuthmath.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,37 @@ +-- st_azimuth01.wkt +POINT(25 45); --point 1 +POINT(75 100); -- point 2 +SELECT ST_AsText( + ST_MakeLine( + ST_Point(25,45), ST_Point(25 + ST_Length('LINESTRING(25 45,75 100)'::Geometry) ,45)) + ); -- horizontal -- LINESTRING(25 45,99.33034 45) + +-- control point +SELECT ST_AsText( + ST_SnapToGrid( + ST_PointN(ST_Boundary(ST_Buffer(ST_Point(25, 45),ST_Length('LINESTRING(25 45,75 100)'::Geometry))),30), + 0.0001)); --POINT(86.8034 86.2957) + +-- arc from horizontal +-- LINESTRING(99.33034 45,98.9724 52.28569,97.90206 59.50121,96.12963 66.57707,93.67218 73.44514,90.55337 80.03925,86.80325 86.29593,82.45792 92.15489,77.55924 97.55973,75 100) +SELECT ST_AsText(ST_SnapToGrid(ST_CurveToLine('CIRCULARSTRING(99.33034 45, 86.8034 86.2957,75 100)',16),0.00001)); + +-- st_azimuth02.wkt +POINT(75 100); --point 1 +POINT(25 45); -- point 2 +SELECT ST_AsText( + ST_MakeLine( + ST_Point(75,100), ST_Point(75 + ST_Length('LINESTRING(25 45,75 100)'::Geometry) ,100)) + ); -- horizontal -- LINESTRING(75 100,149.33034 100) + +-- control point +SELECT ST_AsText( + ST_SnapToGrid( + ST_PointN(ST_Boundary(ST_Buffer(ST_Point(75, 100),ST_Length('LINESTRING(25 45,75 100)'::Geometry))),30), + 0.0001)); --POINT(136.8034 141.2957) + +-- arc from horizontal +-- LINESTRING(149.33034 100,148.97241 107.28565,147.90209 114.50113,146.12969 121.57695,143.67226 128.44498,140.55349 135.03907,136.8034 141.29571,132.4581 147.15465,127.55946 152.55946,122.15464 157.4581,116.29569 161.80338,110.03905 165.55347,103.44496 168.67223,96.57693 171.12965,89.5011 172.90205,82.28562 173.97236,74.99997 174.33027,67.71433 173.97235,60.49885 172.90203,53.42302 171.12962,46.55499 168.6722,39.96091 165.55342,33.70427 161.80333,27.84533 157.45804,22.44051 152.55939,17.54187 147.15457,13.19659 141.29563,9.44651 135.03898,6.32774 128.44489,3.87032 121.57686,2.09792 114.50103,1.02761 107.28555,0.6697 99.99991,1.02762 92.71426,2.09794 85.49878,3.87035 78.42295,6.32777 71.55493,9.44655 64.96084,13.19664 58.7042,17.54193 52.84526,22.44058 47.44045,25 45) +SELECT ST_AsText(ST_SnapToGrid(ST_CurveToLine('CIRCULARSTRING(149.33034 100, 136.8034 141.2957,25 45)',16),0.00001)); + + diff -Nru postgis-1.5.3/doc/html/image_src/st_concavehull01.wkt postgis-2.0.1/doc/html/image_src/st_concavehull01.wkt --- postgis-1.5.3/doc/html/image_src/st_concavehull01.wkt 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/html/image_src/st_concavehull01.wkt 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +Style1;POLYGON((175 150, 20 40, 50 60, 125 100, 175 150)) +Style1;POLYGON((130 170,129.615705608065 166.098193559677,128.477590650226 162.346331352698,126.629392246051 158.888595339608,124.142135623731 155.857864376269,121.111404660392 153.370607753949,117.653668647302 151.522409349774,113.901806440323 150.384294391935,110 150,106.098193559677 150.384294391935,102.346331352698 151.522409349774,98.888595339608 153.370607753949,95.8578643762691 155.857864376269,93.3706077539491 158.888595339608,91.5224093497743 162.346331352698,90.3842943919354 166.098193559677,90 170,90.3842943919354 173.901806440323,91.5224093497742 177.653668647302,93.3706077539491 181.111404660392,95.857864376269 184.142135623731,98.8885953396079 186.629392246051,102.346331352698 188.477590650226,106.098193559677 189.615705608065,110 190,113.901806440323 189.615705608065,117.653668647302 188.477590650226,121.111404660392 186.629392246051,124.142135623731 184.142135623731,126.629392246051 181.111404660392,128.477590650226 177.653668647302,129.615705608065 173.901806440323,130 170)) diff -Nru postgis-1.5.3/doc/html/image_src/st_concavehull02.wkt postgis-2.0.1/doc/html/image_src/st_concavehull02.wkt --- postgis-1.5.3/doc/html/image_src/st_concavehull02.wkt 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/html/image_src/st_concavehull02.wkt 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,3 @@ +Style2;POLYGON((20.5 39,20 39,19.5 39,19.5 39.5,19 39.5,19 40,19 40.5,93.5 157,93.5 157.5,93 157.5,93 158,92.5 158.5,92.5 159,92 159,92 159.5,91.5 160.5,91 160.5,91 161,90.5 162,90.5 162.5,90.5 163,90 163,90 163.5,90 164.5,89.5 164.5,89.5 165,89.5 165.5,89.5 166,89.5 166.5,89.5 167,89 167,89 167.5,89 168,89 168.5,89 169,89 169.5,89 170,89 171,89 171.5,89 172,89 172.5,89 173,89.5 174,89.5 174.5,89.5 175,90 175.5,90 176.5,90 177,90.5 177,90.5 177.5,90.5 178,91 179,91 179.5,91.5 180,92 180.5,92 181,92.5 181,92.5 181.5,92.5 182,93 182,93 182.5,93.5 182.5,93.5 183,94 183.5,94 184,94.5 184,95 184.5,95 185,96 185.5,96 186,96.5 186,97 186,97 186.5,97.5 186.5,97.5 187,98 187,98 187.5,98.5 187.5,99 187.5,99 188,99.5 188,100.5 188.5,100.5 189,101 189,102 189.5,102.5 189.5,103 189.5,103 190,103.5 190,104 190,104.5 190,105 190.5,105.5 190.5,106 190.5,106.5 190.5,107 190.5,107 191,107.5 191,108 191,108.5 191,109 191,109.5 191,110 191,110.5 191,111 191,111.5 191,112 191,112.5 191,113 191,114 190.5,115 190.5,115.5 190,116 190,116.5 190,117 190,117 189.5,117.5 189.5,118 189.5,119 189,119.5 189,119.5 188.5,120 188.5,120.5 188,121 188,121 187.5,121.5 187.5,122.5 187,122.5 186.5,123 186.5,123.5 186,124 186,124 185.5,124.5 185,125 185,125 184.5,125.5 184,126 184,126 183,126.5 183,126.5 182.5,127 182.5,127 182,127.5 181.5,127.5 181,128 181,128 180.5,128.5 179.5,129 179.5,129 179,129 178.5,129.5 178,129.5 177.5,129.5 177,130 177,130 176.5,130 176,130 175.5,130.5 175,130.5 174.5,130.5 174,130.5 173.5,130.5 173,131 173,131 172.5,131 172,131 171.5,131 171,131 170.5,131 170,131 169.5,131 169,131 168.5,131 168,131 167.5,131 167,130.5 166,130.5 165,130 164.5,130 164,130 163.5,130 163,129.5 163,129.5 162.5,129.5 162,129 161,175 151,175.5 151,175.5 150.5,176 150.5,176 150,176 149.5,175.5 149.5,135 109,125.5 99.5,125.5 99,20.5 39)) +Style1;POLYGON((175 150, 20 40, 50 60, 125 100, 175 150)) +Style1;POLYGON((130 170,129.615705608065 166.098193559677,128.477590650226 162.346331352698,126.629392246051 158.888595339608,124.142135623731 155.857864376269,121.111404660392 153.370607753949,117.653668647302 151.522409349774,113.901806440323 150.384294391935,110 150,106.098193559677 150.384294391935,102.346331352698 151.522409349774,98.888595339608 153.370607753949,95.8578643762691 155.857864376269,93.3706077539491 158.888595339608,91.5224093497743 162.346331352698,90.3842943919354 166.098193559677,90 170,90.3842943919354 173.901806440323,91.5224093497742 177.653668647302,93.3706077539491 181.111404660392,95.857864376269 184.142135623731,98.8885953396079 186.629392246051,102.346331352698 188.477590650226,106.098193559677 189.615705608065,110 190,113.901806440323 189.615705608065,117.653668647302 188.477590650226,121.111404660392 186.629392246051,124.142135623731 184.142135623731,126.629392246051 181.111404660392,128.477590650226 177.653668647302,129.615705608065 173.901806440323,130 170)) diff -Nru postgis-1.5.3/doc/html/image_src/st_concavehull03.wkt postgis-2.0.1/doc/html/image_src/st_concavehull03.wkt --- postgis-1.5.3/doc/html/image_src/st_concavehull03.wkt 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/html/image_src/st_concavehull03.wkt 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,3 @@ +Style2;POLYGON((20 40,91.5 177.75,93.25 181,95.75 184.25,99 186.75,102.25 188.5,106 189.5,110 190,114 189.5,117.75 188.5,121 186.75,175 150,125 100,20 40)) +Style1;POLYGON((175 150,125 100,50 60,20 40,175 150)) +Style1;POLYGON((130 170,129.5 166,128.5 162.25,126.75 159,124.25 155.75,121 153.25,117.75 151.5,114 150.5,110 150,106 150.5,102.25 151.5,99 153.25,95.75 155.75,93.25 159,91.5 162.25,90.5 166,90 170,90.5 174,91.5 177.75,93.25 181,95.75 184.25,99 186.75,102.25 188.5,106 189.5,110 190,114 189.5,117.75 188.5,121 186.75,124.25 184.25,126.75 181,128.5 177.75,129.5 174,130 170)) diff -Nru postgis-1.5.3/doc/html/image_src/st_concavehull04.wkt postgis-2.0.1/doc/html/image_src/st_concavehull04.wkt --- postgis-1.5.3/doc/html/image_src/st_concavehull04.wkt 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/html/image_src/st_concavehull04.wkt 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +Style2;POLYGON((8 6,6 8,6 194,14 194,154 14,154 6,8 6)) +Style1-thinline;MULTIPOINT(14 14,34 14,54 14,74 14,94 14,114 14,134 14,150 14,154 14,154 6,134 6,114 6,94 6,74 6,54 6,34 6,14 6,10 6,8 6,7 7,6 8,6 10,6 30,6 50,6 70,6 90,6 110,6 130,6 150,6 170,6 190,6 194,14 194,14 174,14 154,14 134,14 114,14 94,14 74,14 54,14 34,14 14) diff -Nru postgis-1.5.3/doc/html/image_src/st_concavehull05.wkt postgis-2.0.1/doc/html/image_src/st_concavehull05.wkt --- postgis-1.5.3/doc/html/image_src/st_concavehull05.wkt 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/html/image_src/st_concavehull05.wkt 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1 @@ +Style2;POLYGON((8 6,6 8,6 50,6 90,6 130,6 170,6 194,14 194,14 154,14 134,14 94,114 14,134 14,154 14,154 6,114 6,74 6,34 6,8 6)) diff -Nru postgis-1.5.3/doc/html/image_src/st_concavehull06.wkt postgis-2.0.1/doc/html/image_src/st_concavehull06.wkt --- postgis-1.5.3/doc/html/image_src/st_concavehull06.wkt 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/html/image_src/st_concavehull06.wkt 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1 @@ +Style2;POLYGON((26 179,27 177,26 170,24 162,27 157,26 150,24 142,27 137,26 130,24 122,27 117,26 110,24 102,27 97,26 90,24 82,27 77,26 70,24 62,27 57,26 50,24 42,25 41,27 34,27 27,31 27,41 37,54 40,64 38,74 40,84 38,94 40,104 38,114 40,124 38,134 40,154 14,154 6,8 6,6 8,6 194,14 194,26 179)) \ No newline at end of file diff -Nru postgis-1.5.3/doc/html/image_src/st_concavehull07.wkt postgis-2.0.1/doc/html/image_src/st_concavehull07.wkt --- postgis-1.5.3/doc/html/image_src/st_concavehull07.wkt 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/html/image_src/st_concavehull07.wkt 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +Style2;POLYGON((132 10,66 28,22 64,36 150,92 182,132 186,176 184,190 122,190 100,186 52,178 34,168 18,132 10)) +Style1-thinline;MULTILINESTRING((106 164,30 112,74 70,82 112,130 94,130 62,122 40,156 32,162 76,172 88),(132 178,134 148,128 136,96 128,132 108,150 130,170 142,174 110,156 96,158 90,158 88),(22 64,66 28,94 38,94 68,114 76,112 30,132 10,168 18,178 34,186 52,184 74,190 100,190 122,182 148,178 170,176 184,156 164,146 178,132 186,92 182,56 158,36 150,62 150,76 128,88 118)) \ No newline at end of file diff -Nru postgis-1.5.3/doc/html/image_src/st_concavehull08.wkt postgis-2.0.1/doc/html/image_src/st_concavehull08.wkt --- postgis-1.5.3/doc/html/image_src/st_concavehull08.wkt 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/html/image_src/st_concavehull08.wkt 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +Style2;POLYGON((132 10,119 23,85 35,68 29,66 28,49 42,32 56,22 64,32 110,40 119,36 150,57 158,75 171,92 182,114 184,132 186,146 178,176 184,179 162,184 141,190 122,190 100,185 79,186 56,186 52,178 34,168 18,147 13,132 10)) +Style1-thinline;MULTILINESTRING((106 164,30 112,74 70,82 112,130 94,130 62,122 40,156 32,162 76,172 88),(132 178,134 148,128 136,96 128,132 108,150 130,170 142,174 110,156 96,158 90,158 88),(22 64,66 28,94 38,94 68,114 76,112 30,132 10,168 18,178 34,186 52,184 74,190 100,190 122,182 148,178 170,176 184,156 164,146 178,132 186,92 182,56 158,36 150,62 150,76 128,88 118)) \ No newline at end of file diff -Nru postgis-1.5.3/doc/html/image_src/st_isvalid09.wkt postgis-2.0.1/doc/html/image_src/st_isvalid09.wkt --- postgis-1.5.3/doc/html/image_src/st_isvalid09.wkt 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/html/image_src/st_isvalid09.wkt 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +Style1;GEOMETRYCOLLECTION ( POLYGON (( 10 40, 29 118, 100 75, 180 88, 140 30, 70 10, 10 40 )), POLYGON (( 50 170, 100 190, 160 180, 180 140, 180 90, 120 120, 30 120, 50 170 ))) + diff -Nru postgis-1.5.3/doc/html/image_src/st_offsetcurve01.wkt postgis-2.0.1/doc/html/image_src/st_offsetcurve01.wkt --- postgis-1.5.3/doc/html/image_src/st_offsetcurve01.wkt 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/html/image_src/st_offsetcurve01.wkt 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +Style1-thinline;LINESTRING(164 16,144 16,124 16,104 16,84 16,64 16,44 16,24 16,20 16,18 16,17 17,16 18,16 20,16 40,16 60,16 80,16 100,16 120,16 140,16 160,16 180,16 195) +Style2-thinline;LINESTRING(164 1,18 1,12.2597485145237 2.1418070123307,7.39339828220179 5.39339828220179,5.39339828220179 7.39339828220179,2.14180701233067 12.2597485145237,1 18,1 195) diff -Nru postgis-1.5.3/doc/html/image_src/st_offsetcurve02.wkt postgis-2.0.1/doc/html/image_src/st_offsetcurve02.wkt --- postgis-1.5.3/doc/html/image_src/st_offsetcurve02.wkt 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/html/image_src/st_offsetcurve02.wkt 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +Style1-thinline;LINESTRING(164 16,144 16,124 16,104 16,84 16,64 16,44 16,24 16,20 16,18 16,17 17,16 18,16 20,16 40,16 60,16 80,16 100,16 120,16 140,16 160,16 180,16 195) +Style2-thinline;LINESTRING(31 195,31 31,164 31) diff -Nru postgis-1.5.3/doc/html/image_src/st_offsetcurve03.wkt postgis-2.0.1/doc/html/image_src/st_offsetcurve03.wkt --- postgis-1.5.3/doc/html/image_src/st_offsetcurve03.wkt 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/html/image_src/st_offsetcurve03.wkt 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +Style1-thinline;LINESTRING(164 16,144 16,124 16,104 16,84 16,64 16,44 16,24 16,20 16,18 16,17 17,16 18,16 20,16 40,16 60,16 80,16 100,16 120,16 140,16 160,16 180,16 195) +Style2-thinline;LINESTRING(164 1,18 1,7.39339828220179 5.39339828220179,5.39339828220179 7.39339828220179,1 18,1 195) diff -Nru postgis-1.5.3/doc/html/image_src/st_offsetcurve04.wkt postgis-2.0.1/doc/html/image_src/st_offsetcurve04.wkt --- postgis-1.5.3/doc/html/image_src/st_offsetcurve04.wkt 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/html/image_src/st_offsetcurve04.wkt 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +Style2-thinline;LINESTRING(164 1,11.7867965644036 1,1 11.7867965644036,1 195) +Style2-thinline;LINESTRING(31 195,31 31,164 31) diff -Nru postgis-1.5.3/doc/html/image_src/st_offsetcurve05.wkt postgis-2.0.1/doc/html/image_src/st_offsetcurve05.wkt --- postgis-1.5.3/doc/html/image_src/st_offsetcurve05.wkt 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/html/image_src/st_offsetcurve05.wkt 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +Style1-thinline;LINESTRING(164 16,144 16,124 16,104 16,84 16,64 16,44 16,24 16,20 16,18 16,17 17,16 18,16 20,16 40,16 60,16 80,16 100,16 120,16 140,16 160,16 180,16 195) +Style2-thinline;LINESTRING(164 31,46 31,40.2597485145236 32.1418070123307,35.3933982822018 35.3933982822018,32.1418070123307 40.2597485145237,31 46,31 195) diff -Nru postgis-1.5.3/doc/html/image_src/st_offsetcurve06.wkt postgis-2.0.1/doc/html/image_src/st_offsetcurve06.wkt --- postgis-1.5.3/doc/html/image_src/st_offsetcurve06.wkt 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/html/image_src/st_offsetcurve06.wkt 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,3 @@ +Style1-thinline;LINESTRING(164 16,144 16,124 16,104 16,84 16,64 16,44 16,24 16,20 16,18 16,17 17,16 18,16 20,16 40,16 60,16 80,16 100,16 120,16 140,16 160,16 180,16 195) +Style2-thinline;LINESTRING(164 1,18 1,12.2597485145237 2.1418070123307,7.39339828220179 5.39339828220179,5.39339828220179 7.39339828220179,2.14180701233067 12.2597485145237,1 18,1 195) +Style2-thinline;LINESTRING(164 31,46 31,40.2597485145236 32.1418070123307,35.3933982822018 35.3933982822018,32.1418070123307 40.2597485145237,31 46,31 195) diff -Nru postgis-1.5.3/doc/html/image_src/st_overlaps01.wkt postgis-2.0.1/doc/html/image_src/st_overlaps01.wkt --- postgis-1.5.3/doc/html/image_src/st_overlaps01.wkt 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/html/image_src/st_overlaps01.wkt 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +Style1-alpha;MULTIPOINT ( (20 20), (40 90), (80 130), (140 100), (110 40), (120 170), (150 70) ) +Style2-alpha;MULTIPOINT ( (180 10), (40 90), (80 130), (160 150), (110 40), (50 50), (50 160) ) diff -Nru postgis-1.5.3/doc/html/image_src/st_overlaps02.wkt postgis-2.0.1/doc/html/image_src/st_overlaps02.wkt --- postgis-1.5.3/doc/html/image_src/st_overlaps02.wkt 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/html/image_src/st_overlaps02.wkt 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +Style1-alpha;LINESTRING ( 10 10, 40 90, 70 110, 140 110, 170 130, 190 190 ) +Style2-alpha;LINESTRING ( 10 190, 50 130, 90 110, 130 110, 160 70, 180 10 ) diff -Nru postgis-1.5.3/doc/html/image_src/st_overlaps03.wkt postgis-2.0.1/doc/html/image_src/st_overlaps03.wkt --- postgis-1.5.3/doc/html/image_src/st_overlaps03.wkt 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/html/image_src/st_overlaps03.wkt 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,3 @@ +Style1-alpha;POLYGON (( 140 140, 140 122, 135 105, 126 100, 118 99, 110 94, 100 86, 97 73, 102 59, 98 49, 87 38, 70 30, 55 29, 40 30, 28 38, 20 50, 14 66, 10 84, 6 100, 4 119, 4 143, 6 166, 10 180, 18 191, 28 195, 40 190, 55 189, 67 186, 86 179, 112 165, 124 158, 133 148, 140 140 ), ( 48 177, 40 177, 30 174, 24 166, 22 159, 25 155, 30 153, 40 154, 45 157, 52 162, 53 169, 51 174, 48 177 )) +Style2-alpha;POLYGON (( 75 63, 79 50, 87 38, 95 31, 108 25, 124 22, 140 18, 154 11, 166 6, 176 10, 184 21, 188 35, 190 58, 190 82, 193 104, 190 121, 185 139, 178 154, 166 163, 154 171, 139 172, 124 171, 112 165, 96 152, 92 142, 92 126, 86 116, 79 110, 75 104, 72 94, 73 86, 75 76, 75 63 )) + diff -Nru postgis-1.5.3/doc/html/image_src/st_sharedpaths01.wkt postgis-2.0.1/doc/html/image_src/st_sharedpaths01.wkt --- postgis-1.5.3/doc/html/image_src/st_sharedpaths01.wkt 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/html/image_src/st_sharedpaths01.wkt 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +Style2;MULTILINESTRING((26 125,26 200,126 200,126 125,26 125),(51 150,101 150,76 175,51 150)) +Style5;LINESTRING(151 100,126 156.25,126 125,90 161, 76 175) diff -Nru postgis-1.5.3/doc/html/image_src/st_sharedpaths02.wkt postgis-2.0.1/doc/html/image_src/st_sharedpaths02.wkt --- postgis-1.5.3/doc/html/image_src/st_sharedpaths02.wkt 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/html/image_src/st_sharedpaths02.wkt 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,3 @@ +Style2;MULTILINESTRING((26 125,26 200,126 200,126 125,26 125),(51 150,101 150,76 175,51 150)) +Style5;LINESTRING(151 100,126 156.25,126 125,90 161, 76 175) +Style3;MULTILINESTRING((126 156.25,126 125),(101 150,90 161),(90 161,76 175)) diff -Nru postgis-1.5.3/doc/html/image_src/st_snap01.wkt postgis-2.0.1/doc/html/image_src/st_snap01.wkt --- postgis-1.5.3/doc/html/image_src/st_snap01.wkt 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/html/image_src/st_snap01.wkt 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +Style2;LINESTRING (5 107, 54 84, 101 100) +Style5;MULTIPOLYGON ((( 26 125, 26 200, 126 200, 126 125, 26 125 ), ( 51 150, 101 150, 76 175, 51 150 )), (( 151 100, 151 200, 176 175, 151 100 ))) diff -Nru postgis-1.5.3/doc/html/image_src/st_snap02.wkt postgis-2.0.1/doc/html/image_src/st_snap02.wkt --- postgis-1.5.3/doc/html/image_src/st_snap02.wkt 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/html/image_src/st_snap02.wkt 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +Style1;LINESTRING (5 107, 54 84, 101 100) +Style3;MULTIPOLYGON(((26 125,26 200,126 200,126 125,101 100,26 125),(51 150,101 150,76 175,51 150)),((151 100,151 200,176 175,151 100))) \ No newline at end of file diff -Nru postgis-1.5.3/doc/html/image_src/st_snap03.wkt postgis-2.0.1/doc/html/image_src/st_snap03.wkt --- postgis-1.5.3/doc/html/image_src/st_snap03.wkt 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/html/image_src/st_snap03.wkt 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +Style3;LINESTRING(5 107,26 125,54 84,101 100) +Style1;MULTIPOLYGON ((( 26 125, 26 200, 126 200, 126 125, 26 125 ),( 51 150, 101 150, 76 175, 51 150 )), (( 151 100, 151 200, 176 175, 151 100 ))) \ No newline at end of file diff -Nru postgis-1.5.3/doc/html/image_src/st_snap04.wkt postgis-2.0.1/doc/html/image_src/st_snap04.wkt --- postgis-1.5.3/doc/html/image_src/st_snap04.wkt 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/html/image_src/st_snap04.wkt 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +Style3;MULTIPOLYGON(((5 107,26 200,126 200,126 125,101 100,54 84,5 107),(51 150,101 150,76 175,51 150)),((151 100,151 200,176 175,151 100))) +Style1;LINESTRING (5 107, 54 84, 101 100) \ No newline at end of file diff -Nru postgis-1.5.3/doc/html/image_src/st_snap05.wkt postgis-2.0.1/doc/html/image_src/st_snap05.wkt --- postgis-1.5.3/doc/html/image_src/st_snap05.wkt 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/html/image_src/st_snap05.wkt 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +Style3;LINESTRING(26 125,54 84,101 100) +Style1;MULTIPOLYGON ((( 26 125, 26 200, 126 200, 126 125, 26 125 ),( 51 150, 101 150, 76 175, 51 150 )), (( 151 100, 151 200, 176 175, 151 100 ))) \ No newline at end of file diff -Nru postgis-1.5.3/doc/html/image_src/st_split01.wkt postgis-2.0.1/doc/html/image_src/st_split01.wkt --- postgis-1.5.3/doc/html/image_src/st_split01.wkt 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/html/image_src/st_split01.wkt 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +Style1;POLYGON((150 90,149.039264020162 80.2454838991936,146.193976625564 70.8658283817455,141.573480615127 62.2214883490199,135.355339059327 54.6446609406727,127.77851165098 48.4265193848728,119.134171618255 43.8060233744357,109.754516100806 40.9607359798385,100 40,90.2454838991937 40.9607359798385,80.8658283817456 43.8060233744356,72.22148834902 48.4265193848727,64.6446609406727 54.6446609406725,58.4265193848728 62.2214883490198,53.8060233744357 70.8658283817454,50.9607359798385 80.2454838991934,50 89.9999999999998,50.9607359798384 99.7545161008062,53.8060233744356 109.134171618254,58.4265193848726 117.77851165098,64.6446609406725 125.355339059327,72.2214883490197 131.573480615127,80.8658283817453 136.193976625564,90.2454838991934 139.039264020161,99.9999999999998 140,109.754516100806 139.039264020162,119.134171618254 136.193976625564,127.77851165098 131.573480615127,135.355339059327 125.355339059327,141.573480615127 117.77851165098,146.193976625564 109.134171618255,149.039264020162 99.7545161008065,150 90)) +Style2;LINESTRING(10 10,190 190) diff -Nru postgis-1.5.3/doc/html/image_src/st_split02.wkt postgis-2.0.1/doc/html/image_src/st_split02.wkt --- postgis-1.5.3/doc/html/image_src/st_split02.wkt 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/html/image_src/st_split02.wkt 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +Style1;POLYGON((150 90,149.039264020162 80.2454838991936,146.193976625564 70.8658283817455,141.573480615127 62.2214883490199,135.355339059327 54.6446609406727,127.77851165098 48.4265193848728,119.134171618255 43.8060233744357,109.754516100806 40.9607359798385,100 40,90.2454838991937 40.9607359798385,80.8658283817456 43.8060233744356,72.22148834902 48.4265193848727,64.6446609406727 54.6446609406725,60.1371179574584 60.1371179574584,129.862882042542 129.862882042542,135.355339059327 125.355339059327,141.573480615127 117.77851165098,146.193976625564 109.134171618255,149.039264020162 99.7545161008065,150 90)) +Style2;POLYGON((60.1371179574584 60.1371179574584,58.4265193848728 62.2214883490198,53.8060233744357 70.8658283817454,50.9607359798385 80.2454838991934,50 89.9999999999998,50.9607359798384 99.7545161008062,53.8060233744356 109.134171618254,58.4265193848726 117.77851165098,64.6446609406725 125.355339059327,72.2214883490197 131.573480615127,80.8658283817453 136.193976625564,90.2454838991934 139.039264020161,99.9999999999998 140,109.754516100806 139.039264020162,119.134171618254 136.193976625564,127.77851165098 131.573480615127,129.862882042542 129.862882042542,60.1371179574584 60.1371179574584)) diff -Nru postgis-1.5.3/doc/html/image_src/st_split03.wkt postgis-2.0.1/doc/html/image_src/st_split03.wkt --- postgis-1.5.3/doc/html/image_src/st_split03.wkt 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/html/image_src/st_split03.wkt 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +Style1;MULTILINESTRING((10 10, 190 190), (15 15, 30 30, 100 90)) +Style2;POINT(30 30) diff -Nru postgis-1.5.3/doc/html/image_src/st_split04.wkt postgis-2.0.1/doc/html/image_src/st_split04.wkt --- postgis-1.5.3/doc/html/image_src/st_split04.wkt 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/html/image_src/st_split04.wkt 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,4 @@ +Style1;LINESTRING(10 10,30 30) +Style2;LINESTRING(30 30,190 190) +Style3;LINESTRING(15 15,30 30) +Style4;LINESTRING(30 30,100 90) Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/PostGIS_logo.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/PostGIS_logo.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/ccbysa.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/ccbysa.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/de9im01.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/de9im01.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/de9im02.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/de9im02.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/de9im03.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/de9im03.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/de9im04.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/de9im04.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/de9im05.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/de9im05.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/de9im06.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/de9im06.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/de9im07.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/de9im07.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/de9im08.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/de9im08.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/de9im09.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/de9im09.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/de9im10.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/de9im10.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/de9im11.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/de9im11.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/de9im12.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/de9im12.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/de9im13.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/de9im13.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/osgeo_logo.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/osgeo_logo.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/raster_xscale_yscale_xskew_yskew.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/raster_xscale_yscale_xskew_yskew.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/rt_st_transform01.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/rt_st_transform01.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/rt_st_transform02.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/rt_st_transform02.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/rt_st_transform03.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/rt_st_transform03.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_asraster01.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_asraster01.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_asraster02.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_asraster02.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_band01.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_band01.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_band02.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_band02.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_band03.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_band03.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_buffer01.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_buffer01.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_buffer02.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_buffer02.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_buffer03.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_buffer03.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_buffer04.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_buffer04.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_buffer05.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_buffer05.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_buffer06.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_buffer06.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_buffer07.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_buffer07.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_buffer08.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_buffer08.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_buildarea01.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_buildarea01.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_buildarea02.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_buildarea02.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_centroid01.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_centroid01.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_centroid02.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_centroid02.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_centroid03.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_centroid03.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_centroid04.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_centroid04.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_clip01.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_clip01.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_clip02.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_clip02.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_clip03.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_clip03.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_clip04.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_clip04.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_clip05.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_clip05.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_closestpoint01.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_closestpoint01.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_closestpoint02.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_closestpoint02.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_contains01.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_contains01.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_contains02.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_contains02.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_contains03.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_contains03.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_contains04.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_contains04.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_contains05.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_contains05.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_contains06.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_contains06.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_convexhull01.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_convexhull01.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_crosses01.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_crosses01.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_crosses02.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_crosses02.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_crosses03.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_crosses03.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_crosses04.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_crosses04.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_difference01.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_difference01.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_dumppoints01.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_dumppoints01.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_issimple01.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_issimple01.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_issimple02.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_issimple02.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_issimple03.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_issimple03.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_issimple04.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_issimple04.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_issimple05.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_issimple05.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_issimple06.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_issimple06.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_issimple07.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_issimple07.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_isvalid01.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_isvalid01.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_isvalid02.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_isvalid02.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_isvalid03.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_isvalid03.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_isvalid04.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_isvalid04.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_isvalid05.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_isvalid05.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_isvalid06.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_isvalid06.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_isvalid07.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_isvalid07.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_isvalid08.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_isvalid08.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_line_interpolate_point01.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_line_interpolate_point01.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_line_substring01.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_line_substring01.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_linecrossingdirection01.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_linecrossingdirection01.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_linecrossingdirection02.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_linecrossingdirection02.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_linecrossingdirection03.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_linecrossingdirection03.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_linecrossingdirection04.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_linecrossingdirection04.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_longestline01.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_longestline01.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_longestline02.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_longestline02.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_longestline03.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_longestline03.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_mapalgebraexpr01.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_mapalgebraexpr01.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_mapalgebraexpr02.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_mapalgebraexpr02.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_mapalgebraexpr2_01.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_mapalgebraexpr2_01.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_mapalgebraexpr2_02.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_mapalgebraexpr2_02.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_mapalgebraexpr2_04.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_mapalgebraexpr2_04.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_mapalgebraexpr2_05.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_mapalgebraexpr2_05.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_mapalgebraexpr2_06.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_mapalgebraexpr2_06.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_mapalgebraexpr2_07.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_mapalgebraexpr2_07.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_mapalgebraexpr2_08.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_mapalgebraexpr2_08.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_mapalgebrafct2_01.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_mapalgebrafct2_01.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_mapalgebrafct2_02.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_mapalgebrafct2_02.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_mapalgebrafctngb01.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_mapalgebrafctngb01.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_mapalgebrafctngb02.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_mapalgebrafctngb02.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_minimumboundingcircle01.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_minimumboundingcircle01.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_resample01.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_resample01.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_resample02.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_resample02.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_rescale01.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_rescale01.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_rescale02.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_rescale02.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_shortestline01.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_shortestline01.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_shortestline02.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_shortestline02.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_symdifference01.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_symdifference01.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_symdifference02.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_symdifference02.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_touches01.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_touches01.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_touches02.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_touches02.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_touches03.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_touches03.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_touches04.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_touches04.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_touches05.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_touches05.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_touches06.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_touches06.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/doc/html/images/st_within01.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/doc/html/images/st_within01.png differ diff -Nru postgis-1.5.3/doc/html/postgis.html postgis-2.0.1/doc/html/postgis.html --- postgis-1.5.3/doc/html/postgis.html 2011-06-25 16:31:13.000000000 +0000 +++ postgis-2.0.1/doc/html/postgis.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,7983 +0,0 @@ -PostGIS 1.5.3 Manual

PostGIS 1.5.3 Manual

Abstract

PostGIS is an extension to the PostgreSQL object-relational - database system which allows GIS (Geographic Information Systems) - objects to be stored in the database. PostGIS includes support for - GiST-based R-Tree spatial indexes, and functions for analysis and - processing of GIS objects.

This is the manual for version 1.5.3


Table of Contents

1. Introduction
1.1. Project Steering Committee
1.2. Contributors Past and Present
1.3. More Information
2. Installation
2.1. Short Version
2.2. Requirements
2.3. Getting the Source
2.4. Installation
2.4.1. Configuration
2.4.2. Building
2.4.3. Testing
2.4.4. Installation
2.5. Create a spatially-enabled database
2.6. Create a spatially-enabled database from a template
2.7. Upgrading
2.7.1. Soft upgrade
2.7.2. Hard upgrade
2.8. Common Problems
2.9. JDBC
2.10. Loader/Dumper
3. Frequently Asked Questions
4. Using PostGIS: Data Management and Queries
4.1. GIS Objects
4.1.1. OpenGIS WKB and WKT
4.1.2. PostGIS EWKB, EWKT and Canonical Forms
4.1.3. SQL-MM Part 3
4.2. PostGIS Geography Type
4.2.1. Geography Basics
4.2.2. When to use Geography Data type over Geometry data type
4.2.3. Geography Advanced FAQ
4.3. Using OpenGIS Standards
4.3.1. The SPATIAL_REF_SYS Table and Spatial Reference Systems
4.3.2. The GEOMETRY_COLUMNS Table
4.3.3. Creating a Spatial Table
4.3.4. Manually Registering Geometry Columns in geometry_columns
4.3.5. Ensuring OpenGIS compliancy of geometries
4.3.6. Dimensionally Extended 9 Intersection Model (DE-9IM)
4.4. Loading GIS Data
4.4.1. Using SQL
4.4.2. Using the Loader
4.5. Retrieving GIS Data
4.5.1. Using SQL
4.5.2. Using the Dumper
4.6. Building Indexes
4.6.1. GiST Indexes
4.6.2. Using Indexes
4.7. Complex Queries
4.7.1. Taking Advantage of Indexes
4.7.2. Examples of Spatial SQL
5. Using PostGIS: Building Applications
5.1. Using MapServer
5.1.1. Basic Usage
5.1.2. Frequently Asked Questions
5.1.3. Advanced Usage
5.1.4. Examples
5.2. Java Clients (JDBC)
5.3. C Clients (libpq)
5.3.1. Text Cursors
5.3.2. Binary Cursors
6. Performance tips
6.1. Small tables of large geometries
6.1.1. Problem description
6.1.2. Workarounds
6.2. CLUSTERing on geometry indices
6.3. Avoiding dimension conversion
6.4. Tuning your configuration
6.4.1. Startup
6.4.2. Runtime
7. PostGIS Reference
7.1. PostgreSQL PostGIS Types
7.2. Management Functions
7.3. Geometry Constructors
7.4. Geometry Accessors
7.5. Geometry Editors
7.6. Geometry Outputs
7.7. Operators
7.8. Spatial Relationships and Measurements
7.9. Geometry Processing Functions
7.10. Linear Referencing
7.11. Long Transactions Support
7.12. Miscellaneous Functions
7.13. Exceptional Functions
8. PostGIS Special Functions Index
8.1. PostGIS Aggregate Functions
8.2. PostGIS SQL-MM Compliant Functions
8.3. PostGIS Geography Support Functions
8.4. PostGIS Geometry Dump Functions
8.5. PostGIS Box Functions
8.6. PostGIS Functions that support 3D
8.7. PostGIS Curved Geometry Support Functions
8.8. PostGIS Function Support Matrix
8.9. New PostGIS Functions
8.9.1. PostGIS Functions new, behavior changed, or enhanced in 1.5
8.9.2. PostGIS Functions new, behavior changed, or enhanced in 1.4
8.9.3. PostGIS Functions new in 1.3
9. Reporting Problems
9.1. Reporting Software Bugs
9.2. Reporting Documentation Issues
A. Appendix
A.1. Release 1.5.3
A.2. Release 1.5.2
A.3. Release 1.5.1
A.4. Release 1.5.0
A.5. Release 1.4.0
A.6. Release 1.3.6
A.7. Release 1.3.5
A.8. Release 1.3.4
A.9. Release 1.3.3
A.10. Release 1.3.2
A.11. Release 1.3.1
A.12. Release 1.3.0
A.13. Release 1.2.1
A.14. Release 1.2.0
A.15. Release 1.1.6
A.16. Release 1.1.5
A.17. Release 1.1.4
A.18. Release 1.1.3
A.19. Release 1.1.2
A.20. Release 1.1.1
A.21. Release 1.1.0
A.22. Release 1.0.6
A.23. Release 1.0.5
A.24. Release 1.0.4
A.25. Release 1.0.3
A.26. Release 1.0.2
A.27. Release 1.0.1
A.28. Release 1.0.0
A.29. Release 1.0.0RC6
A.30. Release 1.0.0RC5
A.31. Release 1.0.0RC4
A.32. Release 1.0.0RC3
A.33. Release 1.0.0RC2
A.34. Release 1.0.0RC1

Chapter 1. Introduction

PostGIS is developed by Refractions Research Inc, as a spatial - database technology research project. Refractions is a GIS and database - consulting company in Victoria, British Columbia, Canada, specializing in - data integration and custom software development. We plan on supporting and - developing PostGIS to support a range of important GIS functionality, - including full OpenGIS support, advanced topological constructs (coverages, - surfaces, networks), desktop user interface tools for viewing and editing - GIS data, and web-based access tools.

1.1. Project Steering Committee

- The PostGIS Project Steering Committee (PSC) coordinates the general direction, - release cycles, documentation, and outreach efforts for the PostGIS project. In addition - the PSC provides general user support, accepts and approves patches from the general PostGIS community - and votes on miscellaneous issues involving PostGIS such as developer commit access, new PSC members - or significant API changes. -

Mark Cave-Ayland

Coordinates bug fixing and maintenance effort, alignment of - PostGIS with PostgreSQL releases, spatial index selectivity and binding, windows production builds, integration of new - GEOS functionality, and new function enhancements.

Paul Ramsey

Co-founder of PostGIS project. General bug fixing, geography support, GEOS functionality integration and alignment with - GEOS releases.

Kevin Neufeld

Documentation, Hudson automated build, advanced user support - on PostGIS newsgroup, and postgis maintenance function enhancements.

Regina Obe

Documentation, general user support on PostGIS newsgroup, windows production and experimental builds, and - smoke testing new functionality or major code changes.

1.2. Contributors Past and Present

Sandro Santilli

Bug fixes and maintenance and integration of new GEOS - functionality. WKT Raster support.

Dave Blasby

The original developer/Co-founder of PostGIS. Dave wrote the server side - objects, index bindings, and many of the server side analytical - functions.

Jeff Lounsbury

Original development of the Shape file loader/dumper. Current PostGIS Project Owner representative.

Mark Leslie

Ongoing maintenance and development of core functions. Enhanced curve support.

Olivier Courtin

Input output XML (KML,GML)/GeoJSON functions and bug fixes.

Pierre Racine

WKT Raster overall architecture and programming support

Mateusz Loskot

WKT Raster support

Chris Hodgson

General development

Nicklas Avén

Distance function enhancements and additions, Windows testing, and general user support

Jorge Arevalo

WKT Raster development

Stephen Frost

Tiger geocoder development

Other contributors

In alphabetical order: Alex Bodnaru, Alex Mayrhofer, Barbara - Phillipot, Ben Jubb, Bernhard Reiter, Bruce Rindahl, Bruno Wolff - III, Carl Anderson, Charlie Savage, Dane Springmeyer, David Skea, - David Techer, Eduin Carrillo, IIDA Tetsushi, George Silva, Geographic Data BC, - Gerald Fenoy, Gino Lucrezi, Greg Stark, Guillaume Lelarge, Klaus Foerster, Kris Jurka, Mark - Sondheim, Markus Schaber, Maxime Guillaud, Maxime van Noppen, Michael Fuhr, Nikita Shulga, Norman Vine, - Ralph Mason, Steffen Macke, Vincent Picavet

Important Support Libraries

The GEOS - geometry operations library, and the algorithmic work of Martin - Davis in making it all work, ongoing maintenance and support of - Mateusz Loskot, Paul Ramsey and others.

The Proj4 - cartographic projection library, and the work of Gerald Evenden and - Frank Warmerdam in creating and maintaining it.

1.3. More Information

Chapter 2. Installation

- This chapter details the steps required to install PostGIS. -

2.1. Short Version

tar xvfz postgis-1.5.3.tar.gz
-cd postgis-1.5.3
-./configure
-make
-make install
-#BEGIN OPTIONAL -- this is already part of the tar
-# only really need this if installing from SVN
-cd doc/
-make comments-install
-#END OPTIONAL
-createdb yourdatabase
-createlang plpgsql yourdatabase
-psql -d yourdatabase -f postgis.sql
-psql -d yourdatabase -f postgis_comments.sql
-psql -d yourdatabase -f spatial_ref_sys.sql
[Note]

- NOTE: The postgis.sql and spatial_ref_sys.sql will be installed in the - /share/contrib/postgis-1.5 - of your PostGIS install. If you didn't install the OPTIONAL comments section, you will need to manually copy the - postgis_comments.sql file from the doc folder of your source install to your /share/contrib/postgis-1.5 - folder. -

- The rest of this chapter goes into detail each of the above installation - steps. -

2.2. Requirements

- PostGIS has the following requirements for building and usage: -

- Required -

  • - PostgreSQL 8.3 or higher. A complete installation of PostgreSQL - (including server headers) is required. PostgreSQL is available from - - http://www.postgresql.org - - . -

    For a full PostgreSQL / PostGIS support matrix and PostGIS/GEOS support matrix refer to - http://trac.osgeo.org/postgis/wiki/UsersWikiPostgreSQLPostGIS -

  • - GNU C compiler (gcc). Some other ANSI C compilers - can be used to compile PostGIS, but we find far fewer problems when - compiling with gcc. -

  • - GNU Make (gmake or make). - For many systems, GNU make is the default version - of make. Check the version by invoking make -v. - Other versions of make may not process the - PostGIS Makefile properly. -

  • - Proj4 reprojection library, version 4.6.0 or greater. The Proj4 - library is used to provide coordinate reprojection support within - PostGIS. Proj4 is available for download from - - http://trac.osgeo.org/proj/ - - . -

  • - GEOS geometry library, version 3.1.1 or greater, but GEOS 3.2 is recommended. Without GEOS 3.2, - you will be missing some major enhancements with handling of topological exceptions and improvements to ST_Buffer that allow beveling and mitre and much faster buffering. The GEOS library is - used to provide geometry tests (ST_Touches(), ST_Contains(), - ST_Intersects()) and operations (ST_Buffer(), ST_Union(),ST_Intersection() - ST_Difference()) within PostGIS. GEOS is available for download from - - http://trac.osgeo.org/geos/ - - . -

  • - LibXML2, version 2.5.x or higher. LibXML2 is currently used in some imports - functions (ST_GeomFromGML and ST_GeomFromKML). LibXML2 is available for download from - http://xmlsoft.org/downloads.html. -

- Optional -

2.3. Getting the Source

- Retrieve the PostGIS source archive from the downloads website - - http://www.postgis.org/download/postgis-1.5.3.tar.gz - -

wget http://www.postgis.org/download/postgis-1.5.3.tar.gz
-tar -xvzf postgis-1.5.3.tar.gz

- This will create a directory called - postgis-1.5.3 in the current working - directory. -

- Alternatively, checkout the source from the - - svn - - repository - - http://svn.osgeo.org/postgis/trunk/ - - . -

svn checkout http://svn.osgeo.org/postgis/trunk/ postgis-1.5.3

- Change into the newly created - postgis-1.5.3 directory to continue - the installation. -

2.4. Installation

[Note]

- Many OS systems now include pre-built packages for PostgreSQL/PostGIS. - In many cases compilation is only necessary if you want the most - bleeding edge versions or you are a package maintainer. -

- The PostGIS module is an extension to the PostgreSQL backend server. As - such, PostGIS 1.5.3 requires full - PostgreSQL server headers access in order to compile. It can be built - against PostgreSQL versions 8.3 or higher. Earlier versions of - PostgreSQL are not supported. -

- Refer to the PostgreSQL installation guides if you haven't already - installed PostgreSQL. - - http://www.postgresql.org - - . -

[Note]

- For GEOS functionality, when you install PostgresSQL you may need to - explicitly link PostgreSQL against the standard C++ library: -

LDFLAGS=-lstdc++ ./configure [YOUR OPTIONS HERE]

- This is a workaround for bogus C++ exceptions interaction with older - development tools. If you experience weird problems (backend - unexpectedly closed or similar things) try this trick. This will require - recompiling your PostgreSQL from scratch, of course. -

- The following steps outline the configuration and compilation of the - PostGIS source. They are written for Linux users and will not work on - Windows or Mac. -

2.4.1. Configuration

- As with most linux installations, the first step is to generate the - Makefile that will be used to build the source code. This is done by - running the shell script -

- ./configure -

- With no additional parameters, this command will attempt to - automatically locate the required components and libraries needed to - build the PostGIS source code on your system. Although this is the most - common usage of ./configure, the script accepts - several parameters for those who have the required libraries and - programs in non-standard locations. -

- The following list shows only the most commonly used parameters. For a - complete list, use the --help or - --help=short parameters. -

--prefix=PREFIX

- This is the location the PostGIS libraries and SQL scripts will be - installed to. By default, this location is the same as the - detected PostgreSQL installation. -

[Caution]

- This paramater is currently broken, as the package will only - install into the PostgreSQL installation directory. Visit - - http://trac.osgeo.org/postgis/ticket/160 - - to track this bug. -

--with-pgconfig=FILE

- PostgreSQL provides a utility called pg_config - to enable extensions like PostGIS to locate the PostgreSQL - installation directory. Use this parameter - (--with-pgconfig=/path/to/pg_config) to - manually specify a particular PostgreSQL installation that PostGIS - will build against. -

--with-geosconfig=FILE

- GEOS, a required geometry library, provides a utility called - geos-config to enable software installations to - locate the GEOS installation directory. Use this parameter - (--with-geosconfig=/path/to/geos-config) to - manually specify a particular GEOS installation that PostGIS will - build against. -

--with-projdir=DIR

- Proj4 is a reprojection library required by PostGIS. Use this - parameter (--with-projdir=/path/to/projdir) to - manually specify a particular Proj4 installation directory that - PostGIS will build against. -

--with-gui

- Compile the data import GUI (requires GTK+2.0). This will create shp2pgsql-gui graphical interface - to shp2pgsql. -

[Note]

- If you obtained PostGIS from the SVN - - repository - - , the first step is really to run the script -

- ./autogen.sh -

- This script will generate the configure script that - in turn is used to customize the intallation of PostGIS. -

- If you instead obtained PostGIS as a tarball, running - ./autogen.sh is not necessary as - configure has already been generated. -

2.4.2. Building

- Once the Makefile has been generated, building PostGIS is as simple as - running -

- make -

- The last line of the output should be "PostGIS was built - successfully. Ready to install." -

- As of PostGIS v1.4.0, all the functions have comments generated from the - documentation. If you wish to install these comments into your spatial - databases later, run the command which requires docbook. The postgis_comments.sql - is also packaged in the tar.gz distribution in the doc folder so no need to make comments - if installing from the tar ball. -

- make comments -

2.4.3. Testing

- If you wish to test the PostGIS build, run -

- make check -

- The above command will run through various checks and regression tests - using the generated library against an actual PostgreSQL database. -

[Note]

- If you configured PostGIS using non-standard PostgreSQL, GEOS, or - Proj4 locations, you may need to add their library locations to the - LD_LIBRARY_PATH environment variable. -

[Caution]

- Currently, the make check relies on the - PATH and PGPORT environment variables when - performing the checks - it does not use the - PostgreSQL version that may have been specified using the - configuration paramter --with-pgconfig. So make - sure to modify your PATH to match the detected PostgreSQL installation - during configuration or be prepared to deal with the impending - headaches. Visit - - http://trac.osgeo.org/postgis/ticket/186 - - to track this bug. -

- If successful, the output of the test should be similiar to the - following: -

     CUnit - A Unit testing framework for C - Version 2.1-0
-	 http://cunit.sourceforge.net/
-
-
-Suite: PostGIS Computational Geometry Suite
-  Test: test_lw_segment_side() ... passed
-  Test: test_lw_segment_intersects() ... passed
-  Test: test_lwline_crossing_short_lines() ... passed
-  Test: test_lwline_crossing_long_lines() ... passed
-  Test: test_lwpoint_set_ordinate() ... passed
-  Test: test_lwpoint_get_ordinate() ... passed
-  Test: test_lwpoint_interpolate() ... passed
-  Test: test_lwline_clip() ... passed
-  Test: test_lwline_clip_big() ... passed
-  Test: test_lwmline_clip() ... passed
-  Test: test_geohash_point() ... passed
-  Test: test_geohash_precision() ... passed
-  Test: test_geohash() ... passed
-Suite: PostGIS Measures Suite
-  Test: test_mindistance2d_recursive_tolerance() ... passed
-
---Run Summary: Type      Total     Ran  Passed  Failed
-			   suites        2       2     n/a       0
-			   tests        14      14      14       0
-			   asserts      84      84      84       0
-
-
-Creating spatial db postgis_reg
-TMPDIR is /tmp/pgis_reg_15328
-
- PostgreSQL 8.3.7 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-44)
- Postgis 1.4.0SVN - 2009-05-25 20:21:55
-   GEOS: 3.1.0-CAPI-1.5.0
-   PROJ: Rel. 4.6.1, 21 August 2008
-
-Running tests
-
- loader/Point.............. ok
- loader/PointM.............. ok
- loader/PointZ.............. ok
- loader/MultiPoint.............. ok
- loader/MultiPointM.............. ok
- loader/MultiPointZ.............. ok
- loader/Arc.............. ok
- loader/ArcM.............. ok
- loader/ArcZ.......... ok
- loader/Polygon.............. ok
- loader/PolygonM.............. ok
- loader/PolygonZ.............. ok
- regress. ok
- regress_index. ok
- regress_index_nulls. ok
- lwgeom_regress. ok
- regress_lrs. ok
- removepoint. ok
- setpoint. ok
- simplify. ok
- snaptogrid. ok
- affine. ok
- wkt. ok
- measures. ok
- long_xact. ok
- ctors. ok
- sql-mm-serialize. ok
- sql-mm-circularstring. ok
- sql-mm-compoundcurve. ok
- sql-mm-curvepoly. ok
- sql-mm-general. ok
- sql-mm-multicurve. ok
- sql-mm-multisurface. ok
- geojson. ok
- gml. ok
- svg. ok
- kml. ok
- regress_ogc. ok
- regress_bdpoly. ok
- regress_proj. ok
- regress_ogc_cover. ok
- regress_ogc_prep. ok
-
-Run tests: 42
-Failed: 0

2.4.4. Installation

- To install PostGIS, type -

- make install -

- This will copy the PostGIS installation files into their appropriate - subdirectory specified by the --prefix configuration - parameter. In particular: -

  • - The loader and dumper binaries are installed in - [prefix]/bin. -

  • - The SQL files, such as postgis.sql, are - installed in [prefix]/share/contrib. -

  • - The PostGIS libraries are installed in - [prefix]/lib. -

- If you previously ran the make comments command to - generate the postgis_comments.sql file, install the - sql file by running -

- make comments-install -

[Note]

- postgis_comments.sql was separated from the - typical build and installation targets since with it comes the extra - dependency of xsltproc. -

2.5. Create a spatially-enabled database

- The first step in creating a PostGIS database is to create a simple - PostgreSQL database. -

- createdb [yourdatabase] -

- Many of the PostGIS functions are written in the PL/pgSQL procedural - language. As such, the next step to create a PostGIS database is to enable - the PL/pgSQL language in your new database. This is accomplish by the - command -

- createlang plpgsql [yourdatabase] -

- Now load the PostGIS object and function definitions into your database by - loading the postgis.sql definitions file (located in - [prefix]/share/contrib as specified during the - configuration step). -

- psql -d [yourdatabase] -f postgis.sql -

- For a complete set of EPSG coordinate system definition identifiers, you - can also load the spatial_ref_sys.sql definitions - file and populate the spatial_ref_sys table. This will - permit you to perform ST_Transform() operations on geometries. -

- psql -d [yourdatabase] -f spatial_ref_sys.sql -

- If you wish to add comments to the PostGIS functions, the final step is to - load the postgis_comments.sql into your spatial - database. The comments can be viewed by simply typing \dd - [function_name] from a psql terminal window. -

- psql -d [yourdatabase] -f postgis_comments.sql -

2.6. Create a spatially-enabled database from a template

- Some packaged distributions of PostGIS (in particular the Win32 installers - for PostGIS >= 1.1.5) load the PostGIS functions into a template - database called template_postgis. If the - template_postgis database exists in your PostgreSQL - installation then it is possible for users and/or applications to create - spatially-enabled databases using a single command. Note that in both - cases, the database user must have been granted the privilege to create - new databases. -

- From the shell: -

# createdb -T template_postgis my_spatial_db

- From SQL: -

postgres=# CREATE DATABASE my_spatial_db TEMPLATE=template_postgis

2.7. Upgrading

- Upgrading existing spatial databases can be tricky as it requires - replacement or introduction of new PostGIS object definitions. -

- Unfortunately not all definitions can be easily replaced in a live - database, so sometimes your best bet is a dump/reload process. -

- PostGIS provides a SOFT UPGRADE procedure for minor or bugfix releases, - and an HARD UPGRADE procedure for major releases. -

- Before attempting to upgrade postgis, it is always worth to backup your - data. If you use the -Fc flag to pg_dump you will always be able to - restore the dump with an HARD UPGRADE. -

2.7.1. Soft upgrade

- After compiling you should find several postgis_upgrade*.sql files. Install the one - for your version of PostGIS. For example postgis_upgrade_13_to_15.sql should be used if you are upgrading - from postgis 1.3 to 1.5. -

$ psql -f postgis_upgrade_13_to_15.sql -d your_spatial_database

- If a soft upgrade is not possible the script will abort and you will be - warned about HARD UPGRADE being required, so do not hesitate to try a - soft upgrade first. -

[Note]

- If you can't find the postgis_upgrade*.sql files - you are probably using a version prior to 1.1 and must generate that - file by yourself. This is done with the following command: -

$ utils/postgis_proc_upgrade.pl postgis.sql > postgis_upgrade.sql

2.7.2. Hard upgrade

- By HARD UPGRADE we intend full dump/reload of postgis-enabled databases. - You need an HARD UPGRADE when postgis objects' internal storage changes - or when SOFT UPGRADE is not possible. The - Release Notes - appendix reports for each version whether you need a dump/reload (HARD - UPGRADE) to upgrade. -

- PostGIS provides an utility script to restore a dump produced with the - pg_dump -Fc command. It is experimental so redirecting its output to a - file will help in case of problems. The procedure is as follow: -

- Create a "custom-format" dump of the database you want to upgrade (let's - call it "olddb") -

$ pg_dump -Fc olddb > olddb.dump

- Restore the dump contextually upgrading postgis into a new database. The - new database doesn't have to exist. postgis_restore accepts createdb - parameters after the dump file name, and that can for instance be used - if you are using a non-default character encoding for your database. - Let's call it "newdb", with UNICODE as the character encoding: -

$ sh utils/postgis_restore.pl postgis.sql newdb olddb.dump -E=UNICODE > restore.log

- Check that all restored dump objects really had to be restored from dump - and do not conflict with the ones defined in postgis.sql -

$ grep ^KEEPING restore.log | less

- If upgrading from PostgreSQL < 8.0 to >= 8.0 you might want to - drop the attrelid, varattnum and stats columns in the geometry_columns - table, which are no-more needed. Keeping them won't hurt. DROPPING THEM - WHEN REALLY NEEDED WILL DO HURT ! -

$ psql newdb -c "ALTER TABLE geometry_columns DROP attrelid"
-$ psql newdb -c "ALTER TABLE geometry_columns DROP varattnum"
-$ psql newdb -c "ALTER TABLE geometry_columns DROP stats"

- spatial_ref_sys table is restore from the dump, to ensure your custom - additions are kept, but the distributed one might contain modification - so you should backup your entries, drop the table and source the new - one. If you did make additions we assume you know how to backup them - before upgrading the table. Replace of it with the new one is done like - this: -

$ psql newdb
-newdb=> truncate spatial_ref_sys;
-TRUNCATE
-newdb=> \i spatial_ref_sys.sql

2.8. Common Problems

- There are several things to check when your installation or upgrade - doesn't go as you expected. -

  1. - Check that you you have installed PostgreSQL 8.1 or newer, and that - you are compiling against the same version of the PostgreSQL source as - the version of PostgreSQL that is running. Mix-ups can occur when your - (Linux) distribution has already installed PostgreSQL, or you have - otherwise installed PostgreSQL before and forgotten about it. PostGIS - will only work with PostgreSQL 8.1 or newer, and strange, unexpected - error messages will result if you use an older version. To check the - version of PostgreSQL which is running, connect to the database using - psql and run this query: -

    SELECT version();

    - If you are running an RPM based distribution, you can check for the - existence of pre-installed packages using the rpm - command as follows: rpm -qa | grep postgresql -

- Also check that configure has correctly detected the location and version - of PostgreSQL, the Proj4 library and the GEOS library. -

  1. - The output from configure is used to generate the - postgis_config.h file. Check that the - POSTGIS_PGSQL_VERSION, - POSTGIS_PROJ_VERSION and - POSTGIS_GEOS_VERSION variables have been set - correctly. -

2.9. JDBC

- The JDBC extensions provide Java objects corresponding to the internal - PostGIS types. These objects can be used to write Java clients which query - the PostGIS database and draw or do calculations on the GIS data in - PostGIS. -

  1. - Enter the java/jdbc sub-directory of the PostGIS - distribution. -

  2. - Run the ant command. Copy the - postgis.jar file to wherever you keep your java - libraries. -

- The JDBC extensions require a PostgreSQL JDBC driver to be present in the - current CLASSPATH during the build process. If the PostgreSQL JDBC driver - is located elsewhere, you may pass the location of the JDBC driver JAR - separately using the -D parameter like this: -

# ant -Dclasspath=/path/to/postgresql-jdbc.jar

- PostgreSQL JDBC drivers can be downloaded from - - http://jdbc.postgresql.org - - . -

2.10. Loader/Dumper

- The data loader and dumper are built and installed automatically as part - of the PostGIS build. To build and install them manually: -

# cd postgis-1.5.3/loader
-# make
-# make install

- The loader is called shp2pgsql and converts ESRI - Shape files into SQL suitable for loading in PostGIS/PostgreSQL. The - dumper is called pgsql2shp and converts PostGIS - tables (or queries) into ESRI Shape files. For more verbose documentation, - see the online help, and the manual pages. -

Chapter 3. Frequently Asked Questions

3.1. I'm running PostgreSQL 9.0 and I can no longer read/view geometries in OpenJump, Safe FME, and some other tools?
3.2. I tried to use PgAdmin to view my geometry column and it is blank, what gives?
3.3. What kind of geometric objects can I store?
3.4. I'm all confused. Which data store should I use geometry or geography?
3.5. I have more intense questions about geography, such as how big of a geographic region can I stuff in a geography column and - still get reasonable answers. Are there limitations such as poles, everything in the field must fit in a hemisphere (like SQL Server 2008 has), speed etc?
3.6. How do I insert a GIS object into the database?
3.7. How do I construct a spatial query?
3.8. How do I speed up spatial queries on large tables?
3.9. Why aren't PostgreSQL R-Tree indexes supported?
3.10. Why should I use the AddGeometryColumn() - function and all the other OpenGIS stuff?
3.11. What is the best way to find all objects within a radius of - another object?
3.12. How do I perform a coordinate reprojection as part of a - query?
3.13. I did an ST_AsEWKT and ST_AsText on my rather large geometry and it returned blank field. What gives?
3.14. When I do an ST_Intersects, it says my two geometries don't intersect when I KNOW THEY DO. What gives?

3.1.

I'm running PostgreSQL 9.0 and I can no longer read/view geometries in OpenJump, Safe FME, and some other tools?

In PostgreSQL 9.0+, the default encoding for bytea data has been changed to hex and older JDBC drivers still assume escape format. This has affected some applications - such as Java applications using older JDBC drivers or .NET applications that use the older npgsql driver - that expect the old behavior of ST_AsBinary. There are two approaches to getting this to work again.

You can upgrade your JDBC driver to the latest PostgreSQL 9.0 version which you can get from - http://jdbc.postgresql.org/download.html

If you are running a .NET app, you can use Npgsql 2.0.11 or higher which you can download from - http://pgfoundry.org/frs/?group_id=1000140 and - as described on Francisco Figueiredo's NpgSQL 2.0.11 released blog entry

If upgrading your PostgreSQL driver is not an option, then you can set the default back to the old behavior with the following change:

ALTER DATABASE mypostgisdb SET bytea_output='escape';

3.2.

I tried to use PgAdmin to view my geometry column and it is blank, what gives?

PgAdmin doesn't show anything for large geometries. The best ways to verify you do have day in your geometry columns are?

-- this should return no records if all your geom fields are filled in        
-SELECT somefield FROM mytable WHERE geom IS NULL;
-- To tell just how large your geometry is do a query of the form
---which will tell you the most number of points you have in any of your geometry columns
-SELECT MAX(ST_NPoints(geom)) FROM sometable;

3.3.

What kind of geometric objects can I store?

You can store point, line, polygon, multipoint, multiline, - multipolygon, and geometrycollections. These are specified in the Open - GIS Well Known Text Format (with XYZ,XYM,XYZM extensions). There are two data types currently supported. - The standard OGC geometry data type which uses a planar coordinate system for measurement and the - geography data type which uses a geodetic coordinate system. Only WGS 84 long lat (SRID:4326) is supported - by the geography data type.

3.4.

I'm all confused. Which data store should I use geometry or geography?

Short Answer: geography is a new data type that supports long range distances measurements, but most computations on it are currently - slower than they are on geometry. If - you use geography -- you don't need to learn much about planar coordinate systems. Geography is generally best - if all you care about is measuring distances and lengths and you have data from all over the world. - Geometry data type is an older data type that has many more functions supporting it, enjoys greater support from third party tools, - and operations on it are generally faster -- sometimes as much as 10 fold faster for larger geometries. - Geometry is best if you are pretty comfortable with spatial reference systems or you are dealing with localized data - where all your data fits in a single spatial reference system (SRID), or you need to do a lot of spatial processing. - Note: It is fairly easy to do one-off conversions between the two types to gain the benefits of each. - Refer to Section 8.8, “PostGIS Function Support Matrix” to see what is currently supported and what is not. -

- Long Answer: Refer to our more lengthy discussion in the Section 4.2.2, “When to use Geography Data type over Geometry data type” and function type matrix. -

3.5.

I have more intense questions about geography, such as how big of a geographic region can I stuff in a geography column and - still get reasonable answers. Are there limitations such as poles, everything in the field must fit in a hemisphere (like SQL Server 2008 has), speed etc?

Your questions are too deep and complex to be adequately answered in this section. Please refer to our - Section 4.2.3, “Geography Advanced FAQ” .

3.6.

How do I insert a GIS object into the database?

First, you need to create a table with a column of type - "geometry" or "geography" to hold your GIS data. - Storing geography type data is a little different than storing geometry. Refer - to Section 4.2.1, “Geography Basics” for details on storing geography.

- For geometry: Connect to your database with - psql and try the following SQL:

CREATE TABLE gtest ( ID int4, NAME varchar(20) );
-SELECT AddGeometryColumn('', 'gtest','geom',-1,'LINESTRING',2);

If the geometry column addition fails, you probably have not - loaded the PostGIS functions and objects into this database. See the - Section 2.4, “Installation”.

Then, you can insert a geometry into the table using a SQL - insert statement. The GIS object itself is formatted using the OpenGIS - Consortium "well-known text" format:

INSERT INTO gtest (ID, NAME, GEOM) 
-VALUES (
-  1, 
-  'First Geometry', 
-  ST_GeomFromText('LINESTRING(2 3,4 5,6 5,7 8)', -1)
-);

For more information about other GIS objects, see the object reference.

To view your GIS data in the table:

SELECT id, name, ST_AsText(geom) AS geom FROM gtest;

The return value should look something like this:

 id | name           | geom
-----+----------------+-----------------------------
-  1 | First Geometry | LINESTRING(2 3,4 5,6 5,7 8) 
-(1 row)

3.7.

How do I construct a spatial query?

The same way you construct any other database query, as an SQL - combination of return values, functions, and boolean tests.

For spatial queries, there are two issues that are important to - keep in mind while constructing your query: is there a spatial index - you can make use of; and, are you doing expensive calculations on a - large number of geometries.

In general, you will want to use the "intersects operator" - (&&) which tests whether the bounding boxes of features - intersect. The reason the && operator is useful is because if - a spatial index is available to speed up the test, the && - operator will make use of this. This can make queries much much - faster.

You will also make use of spatial functions, such as Distance(), - ST_Intersects(), ST_Contains() and ST_Within(), among others, to - narrow down the results of your search. Most spatial queries include - both an indexed test and a spatial function test. The index test - serves to limit the number of return tuples to only tuples that - might meet the condition of interest. The spatial - functions are then use to test the condition exactly.

SELECT id, the_geom 
-FROM thetable 
-WHERE 
-  ST_Contains(the_geom,'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))');

3.8.

How do I speed up spatial queries on large tables?

Fast queries on large tables is the raison - d'etre of spatial databases (along with transaction - support) so having a good index is important.

To build a spatial index on a table with a - geometry column, use the "CREATE INDEX" function as - follows:

CREATE INDEX [indexname] ON [tablename] USING GIST ( [geometrycolumn] );

The "USING GIST" option tells the server to use a GiST - (Generalized Search Tree) index.

[Note]

GiST indexes are assumed to be lossy. Lossy indexes uses a - proxy object (in the spatial case, a bounding box) for building the - index.

You should also ensure that the PostgreSQL query planner has - enough information about your index to make rational decisions about - when to use it. To do this, you have to "gather statistics" on your - geometry tables.

For PostgreSQL 8.0.x and greater, just run the VACUUM - ANALYZE command.

For PostgreSQL 7.4.x and below, run the SELECT - UPDATE_GEOMETRY_STATS() command.

3.9.

Why aren't PostgreSQL R-Tree indexes supported?

Early versions of PostGIS used the PostgreSQL R-Tree indexes. - However, PostgreSQL R-Trees have been completely discarded since - version 0.6, and spatial indexing is provided with an R-Tree-over-GiST - scheme.

Our tests have shown search speed for native R-Tree and GiST to - be comparable. Native PostgreSQL R-Trees have two limitations which - make them undesirable for use with GIS features (note that these - limitations are due to the current PostgreSQL native R-Tree - implementation, not the R-Tree concept in general):

  • R-Tree indexes in PostgreSQL cannot handle features which - are larger than 8K in size. GiST indexes can, using the "lossy" - trick of substituting the bounding box for the feature - itself.

  • R-Tree indexes in PostgreSQL are not "null safe", so - building an index on a geometry column which contains null - geometries will fail.

3.10.

Why should I use the AddGeometryColumn() - function and all the other OpenGIS stuff?

If you do not want to use the OpenGIS support functions, you do - not have to. Simply create tables as in older versions, defining your - geometry columns in the CREATE statement. All your geometries will - have SRIDs of -1, and the OpenGIS meta-data tables will - not be filled in properly. However, this will - cause most applications based on PostGIS to fail, and it is generally - suggested that you do use AddGeometryColumn() to - create geometry tables.

MapServer is one application which makes use of the - geometry_columns meta-data. Specifically, MapServer - can use the SRID of the geometry column to do on-the-fly reprojection - of features into the correct map projection.

3.11.

What is the best way to find all objects within a radius of - another object?

To use the database most efficiently, it is best to do radius - queries which combine the radius test with a bounding box test: the - bounding box test uses the spatial index, giving fast access to a - subset of data which the radius test is then applied to.

The ST_DWithin(geometry, geometry, distance) - function is a handy way of performing an indexed distance search. It - works by creating a search rectangle large enough to enclose the - distance radius, then performing an exact distance search on the - indexed subset of results.

For example, to find all objects with 100 meters of POINT(1000 - 1000) the following query would work well:

SELECT * FROM geotable 
-WHERE ST_DWithin(geocolumn, 'POINT(1000 1000)', 100.0);

3.12.

How do I perform a coordinate reprojection as part of a - query?

To perform a reprojection, both the source and destination - coordinate systems must be defined in the SPATIAL_REF_SYS table, and - the geometries being reprojected must already have an SRID set on - them. Once that is done, a reprojection is as simple as referring to - the desired destination SRID. The below projects a geometry to NAD 83 long lat. - The below will only work if the srid of the_geom is not -1 (not undefined spatial ref)

SELECT ST_Transform(the_geom,4269) FROM geotable;

3.13.

I did an ST_AsEWKT and ST_AsText on my rather large geometry and it returned blank field. What gives?

You are probably using PgAdmin or some other tool that doesn't output large text. If your geometry is big - enough, it will appear blank in these tools. Use PSQL if you really need to see it or output it in WKT.

-				--To check number of geometries are really blank
-				SELECT count(gid) FROM geotable WHERE the_geom IS NULL;

3.14.

When I do an ST_Intersects, it says my two geometries don't intersect when I KNOW THEY DO. What gives?

This generally happens in two common cases. Your geometry is invalid -- check ST_IsValid - or you are assuming they intersect because ST_AsText truncates the numbers and you have lots of decimals after - it is not showing you.

Chapter 4. Using PostGIS: Data Management and Queries

4.1. GIS Objects

The GIS objects supported by PostGIS are a superset of the "Simple - Features" defined by the OpenGIS Consortium (OGC). As of version 0.9, - PostGIS supports all the objects and functions specified in the OGC - "Simple Features for SQL" specification.

PostGIS extends the standard with support for 3DZ,3DM and 4D - coordinates.

4.1.1. OpenGIS WKB and WKT

The OpenGIS specification defines two standard ways of expressing - spatial objects: the Well-Known Text (WKT) form and the Well-Known - Binary (WKB) form. Both WKT and WKB include information about the type - of the object and the coordinates which form the object.

Examples of the text representations (WKT) of the spatial objects - of the features are as follows:

  • POINT(0 0)

  • LINESTRING(0 0,1 1,1 2)

  • POLYGON((0 0,4 0,4 4,0 4,0 0),(1 1, 2 1, 2 2, 1 2,1 1))

  • MULTIPOINT(0 0,1 2)

  • MULTILINESTRING((0 0,1 1,1 2),(2 3,3 2,5 4))

  • MULTIPOLYGON(((0 0,4 0,4 4,0 4,0 0),(1 1,2 1,2 2,1 2,1 1)), - ((-1 -1,-1 -2,-2 -2,-2 -1,-1 -1)))

  • GEOMETRYCOLLECTION(POINT(2 3),LINESTRING(2 3,3 4))

The OpenGIS specification also requires that the internal storage - format of spatial objects include a spatial referencing system - identifier (SRID). The SRID is required when creating spatial objects - for insertion into the database.

Input/Output of these formats are available using the following - interfaces:

bytea WKB = ST_AsBinary(geometry);
-text WKT = ST_AsText(geometry);
-geometry = ST_GeomFromWKB(bytea WKB, SRID);
-geometry = ST_GeometryFromText(text WKT, SRID);

For example, a valid insert statement to create and insert an OGC - spatial object would be:

INSERT INTO geotable ( the_geom, the_name )
-  VALUES ( ST_GeomFromText('POINT(-126.4 45.32)', 312), 'A Place');

4.1.2. PostGIS EWKB, EWKT and Canonical Forms

OGC formats only support 2d geometries, and the associated SRID is - *never* embedded in the input/output representations.

PostGIS extended formats are currently superset of OGC one (every - valid WKB/WKT is a valid EWKB/EWKT) but this might vary in the future, - specifically if OGC comes out with a new format conflicting with our - extensions. Thus you SHOULD NOT rely on this feature!

PostGIS EWKB/EWKT add 3dm,3dz,4d coordinates support and embedded - SRID information.

Examples of the text representations (EWKT) of the extended - spatial objects of the features are as follows:

  • POINT(0 0 0) -- XYZ

  • SRID=32632;POINT(0 0) -- XY with SRID

  • POINTM(0 0 0) -- XYM

  • POINT(0 0 0 0) -- XYZM

  • SRID=4326;MULTIPOINTM(0 0 0,1 2 1) -- XYM with SRID

  • MULTILINESTRING((0 0 0,1 1 0,1 2 1),(2 3 1,3 2 1,5 4 - 1))

  • POLYGON((0 0 0,4 0 0,4 4 0,0 4 0,0 0 0),(1 1 0,2 1 0,2 2 0,1 2 - 0,1 1 0))

  • MULTIPOLYGON(((0 0 0,4 0 0,4 4 0,0 4 0,0 0 0),(1 1 0,2 1 0,2 2 - 0,1 2 0,1 1 0)),((-1 -1 0,-1 -2 0,-2 -2 0,-2 -1 0,-1 -1 0)))

  • GEOMETRYCOLLECTIONM(POINTM(2 3 9), LINESTRINGM(2 3 4, 3 4 - 5))

Input/Output of these formats are available using the following - interfaces:

bytea EWKB = ST_AsEWKB(geometry);
-text EWKT = ST_AsEWKT(geometry);
-geometry = ST_GeomFromEWKB(bytea EWKB);
-geometry = ST_GeomFromEWKT(text EWKT);

For example, a valid insert statement to create and insert a - PostGIS spatial object would be:

INSERT INTO geotable ( the_geom, the_name )
-  VALUES ( ST_GeomFromEWKT('SRID=312;POINTM(-126.4 45.32 15)'), 'A Place' )

The "canonical forms" of a PostgreSQL type are the representations - you get with a simple query (without any function call) and the one - which is guaranteed to be accepted with a simple insert, update or copy. - For the postgis 'geometry' type these are:

- Output
-  - binary: EWKB
-	ascii: HEXEWKB (EWKB in hex form)
-- Input
-  - binary: EWKB
-	ascii: HEXEWKB|EWKT 

For example this statement reads EWKT and returns HEXEWKB in the - process of canonical ascii input/output:

=# SELECT 'SRID=4;POINT(0 0)'::geometry;
-
-geometry
-----------------------------------------------------
-01010000200400000000000000000000000000000000000000
-(1 row)

4.1.3. SQL-MM Part 3

The SQL Multimedia Applications Spatial specification extends the - simple features for SQL spec by defining a number of circularly - interpolated curves.

The SQL-MM definitions include 3dm, 3dz and 4d coordinates, but do - not allow the embedding of SRID information.

The well-known text extensions are not yet fully supported. - Examples of some simple curved geometries are shown below:

  • CIRCULARSTRING(0 0, 1 1, 1 0)

    CIRCULARSTRING(0 0, 4 0, 4 4, 0 4, 0 0)

    The CIRCULARSTRING is the basic curve type, similar to a - LINESTRING in the linear world. A single segment required three - points, the start and end points (first and third) and any other - point on the arc. The exception to this is for a closed circle, - where the start and end points are the same. In this case the - second point MUST be the center of the arc, ie the opposite side of - the circle. To chain arcs together, the last point of the previous - arc becomes the first point of the next arc, just like in - LINESTRING. This means that a valid circular string must have an - odd number of points greated than 1.

  • COMPOUNDCURVE(CIRCULARSTRING(0 0, 1 1, 1 0),(1 0, 0 1))

    A compound curve is a single, continuous curve that has both - curved (circular) segments and linear segments. That means that - in addition to having well-formed components, the end point of - every component (except the last) must be coincident with the - start point of the following component.

  • CURVEPOLYGON(CIRCULARSTRING(0 0, 4 0, 4 4, 0 4, 0 0),(1 1, 3 - 3, 3 1, 1 1))

    Example compound curve in a curve polygon: - CURVEPOLYGON(COMPOUNDCURVE(CIRCULARSTRING(0 0,2 0, 2 1, 2 3, 4 3),(4 3, 4 5, 1 4, 0 0)), - CIRCULARSTRING(1.7 1, 1.4 0.4, 1.6 0.4, 1.6 0.5, 1.7 1) ) -

    A CURVEPOLYGON is just like a polygon, with an outer ring - and zero or more inner rings. The difference is that a ring can - take the form of a circular string, linear string or compound - string.

    As of PostGIS 1.4 PostGIS supports compound curves in a curve polygon.

  • MULTICURVE((0 0, 5 5),CIRCULARSTRING(4 0, 4 4, 8 4))

    The MULTICURVE is a collection of curves, which can include - linear strings, circular strings or compound strings.

  • MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(0 0, 4 0, 4 4, 0 4, 0 - 0),(1 1, 3 3, 3 1, 1 1)),((10 10, 14 12, 11 10, 10 10),(11 11, 11.5 - 11, 11 11.5, 11 11)))

    This is a collection of surfaces, which can be (linear) - polygons or curve polygons.

[Note]

PostGIS prior to 1.4 does not support compound curves in a curve polygon, but - PostGIS 1.4 and above do support the use of Compound Curves in - a Curve Polygon.

[Note]

All floating point comparisons within the SQL-MM implementation - are performed to a specified tolerance, currently 1E-8.

4.2. PostGIS Geography Type

The geography type provides native support for spatial features represented on "geographic" coordinates (sometimes called "geodetic" coordinates, or "lat/lon", or "lon/lat"). Geographic coordinates are spherical coordinates expressed in angular units (degrees).

The basis for the PostGIS geometry type is a plane. The shortest path between two points on the plane is a straight line. That means calculations on geometries (areas, distances, lengths, intersections, etc) can be calculated using cartesian mathematics and straight line vectors.

The basis for the PostGIS geographic type is a sphere. The shortest path between two points on the sphere is a great circle arc. That means that calculations on geographies (areas, distances, lengths, intersections, etc) must be calculated on the sphere, using more complicated mathematics. For more accurate measurements, the calculations must take the actual spheroidal shape of the world into account, and the mathematics becomes very complicated indeed.

Because the underlying mathematics is much more complicated, there are fewer functions defined for the geography type than for the geometry type. Over time, as new algorithms are added, the capabilities of the geography type will expand.

One restriction is that it only supports WGS 84 long lat (SRID:4326). It uses a new data type called - geography. I None of the GEOS functions support this new - type. As a workaround one can convert back and forth between geometry and geography types.

The new geography type uses the PostgreSQL 8.3+ typmod definition format so that a table with a geography field - can be added in a single step. All the standard OGC formats except for curves are supported.

4.2.1. Geography Basics

The geography type only supports the simplest of simple features. Standard geometry type data will autocast to geography if it is of SRID 4326. You can also use the EWKT and EWKB - conventions to insert data.

  • POINT: Creating a table with 2d point geometry:

    CREATE TABLE testgeog(gid serial PRIMARY KEY, the_geog geography(POINT,4326) );

    Creating a table with z coordinate point

    CREATE TABLE testgeog(gid serial PRIMARY KEY, the_geog geography(POINTZ,4326) );
  • LINESTRING

  • POLYGON

  • MULTIPOINT

  • MULTILINESTRING

  • MULTIPOLYGON

  • GEOMETRYCOLLECTION

The new geography fields don't get registered in the geometry_columns. They get registered in a new view called - geography_columns which is a view against the system catalogs so is always automatically kept up to date without need - for an AddGeom... like function.

Now, check the "geography_columns" view and see that your table is listed.

You can create a new table with a GEOGRAPHY column using the CREATE TABLE syntax. - Unlike GEOMETRY, there is no need to run a separate AddGeometryColumns() process to register the column in metadata.

-

CREATE TABLE global_points ( 
-    id SERIAL PRIMARY KEY,
-    name VARCHAR(64),
-    location GEOGRAPHY(POINT,4326)
-  );

-

Note that the location column has type GEOGRAPHY and that geography type supports two optional modifier: a type modifier that restricts the kind of shapes and dimensions allowed in the column; an SRID modifier that restricts the coordinate reference identifier to a particular number.

Allowable values for the type modifier are: POINT, LINESTRING, POLYGON, MULTIPOINT, MULTILINESTRING, MULTIPOLYGON. The modifier also supports dimensionality restrictions through suffixes: Z, M and ZM. So, for example a modifier of 'LINESTRINGM' would only allow line strings with three dimensions in, and would treat the third dimension as a measure. - Similarly, 'POINTZM' would expect four dimensional data.

The SRID modifier is currently of limited use: only 4326 (WGS84) is allowed as a value. If you do not specify an SRID, the a value 0 (undefined spheroid) will be used, and all calculations will proceed using WGS84 anyways.

In the future, alternate SRIDs will allow calculations on spheroids other than WGS84.

Once you have created your table, you can see it in the GEOGRAPHY_COLUMNS table:

--- See the contents of the metadata view
-SELECT * FROM geography_columns;

You can insert data into the table the same as you would if it was using a GEOMETRY column:

-- Add some data into the test table
-INSERT INTO global_points (name, location) VALUES ('Town', ST_GeographyFromText('SRID=4326;POINT(-110 30)') );
-INSERT INTO global_points (name, location) VALUES ('Forest', ST_GeographyFromText('SRID=4326;POINT(-109 29)') );
-INSERT INTO global_points (name, location) VALUES ('London', ST_GeographyFromText('SRID=4326;POINT(0 49)') );

Creating an index works the same as GEOMETRY. - PostGIS will note that the column type is GEOGRAPHY and create an appropriate sphere-based index instead of the usual planar index used for GEOMETRY.

-- Index the test table with a spherical index
-  CREATE INDEX global_points_gix ON global_points USING GIST ( location );

-

Query and measurement functions use units of meters. So distance parameters should be expressed in meters, and return values should be expected in meters (or square meters for areas).

-- Show a distance query and note, London is outside the 1000km tolerance
-  SELECT name FROM global_points WHERE ST_DWithin(location, ST_GeographyFromText('SRID=4326;POINT(-110 29)'), 1000000);

-

You can see the power of GEOGRAPHY in action by calculating the how close a plane flying from Seattle to London (LINESTRING(-122.33 47.606, 0.0 51.5)) comes to Reykjavik (POINT(-21.96 64.15)).

-- Distance calculation using GEOGRAPHY (122.2km)
-  SELECT ST_Distance('LINESTRING(-122.33 47.606, 0.0 51.5)'::geography, 'POINT(-21.96 64.15)':: geography);

-

-- Distance calculation using GEOMETRY (13.3 "degrees")
-  SELECT ST_Distance('LINESTRING(-122.33 47.606, 0.0 51.5)'::geometry, 'POINT(-21.96 64.15)':: geometry);

-

The GEOGRAPHY type calculates the true shortest distance over the sphere between Reykjavik and the great circle flight path between Seattle and London.

Great Circle mapper -The GEOMETRY type calculates a meaningless cartesian distance between Reykjavik and the straight line path from Seattle to London plotted on a flat map of the world. The nominal units of the result might be called "degrees", but the result doesn't correspond to any true angular difference between the points, so even calling them "degrees" is inaccurate.

4.2.2. When to use Geography Data type over Geometry data type

The new GEOGRAPHY type allows you to store data in longitude/latitude coordinates, but at a cost: there are fewer functions defined on GEOGRAPHY than there are on GEOMETRY; those functions that are defined take more CPU time to execute.

The type you choose should be conditioned on the expected working area of the application you are building. Will your data span the globe or a large continental area, or is it local to a state, county or municipality?

  • If your data is contained in a small area, you might find that choosing an appropriate projection and using GEOMETRY is the best solution, in terms of performance and functionality available.
  • If your data is global or covers a continental region, you may find that GEOGRAPHY allows you to build a system without having to worry about projection details. - You store your data in longitude/latitude, and use the functions that have been defined on GEOGRAPHY.
  • If you don't understand projections, and you don't want to learn about them, and you're prepared to accept the limitations in functionality available in GEOGRAPHY, then it might be easier for you to use GEOGRAPHY than GEOMETRY. - Simply load your data up as longitude/latitude and go from there.

Refer to Section 8.8, “PostGIS Function Support Matrix” for compare between - what is supported for Geography vs. Geometry. For a brief listing and description of Geography functions, refer to - Section 8.3, “PostGIS Geography Support Functions” -

4.2.3. Geography Advanced FAQ

4.2.3.1. Do you calculate on the sphere or the spheroid?
4.2.3.2. What about the date-line and the poles?
4.2.3.3. What is the longest arc you can process?
4.2.3.4. Why is it so slow to calculate the area of Europe / Russia / insert big geographic region here ?

4.2.3.1.

Do you calculate on the sphere or the spheroid?

By default, all distance and area calculations are done on the spheroid. You should find that the results of calculations in local areas match up will with local planar results in good local projections. - Over larger areas, the spheroidal calculations will be more accurate than any calculation done on a projected plane. -

All the geography functions have the option of using a sphere calculation, by setting a final boolean parameter to 'FALSE'. This will somewhat speed up calculations, particularly for cases where the geometries are very simple.

4.2.3.2.

What about the date-line and the poles?

All the calculations have no conception of date-line or poles, the coordinates are spherical (longitude/latitude) - so a shape that crosses the dateline is, from a calculation point of view, no different from any other shape. -

4.2.3.3.

What is the longest arc you can process?

We use great circle arcs as the "interpolation line" between two points. That means any two points are actually joined up two ways, depending on which direction you travel along the great circle. All our code assumes that the points are joined by the *shorter* of the two paths along the great circle. - As a consequence, shapes that have arcs of more than 180 degrees will not be correctly modelled.

4.2.3.4.

Why is it so slow to calculate the area of Europe / Russia / insert big geographic region here ?

Because the polygon is so darned huge! Big areas are bad for two reasons: their bounds are huge, - so the index tends to pull the feature no matter what query you run; the number of vertices is huge, - and tests (distance, containment) have to traverse the vertex list at least once and sometimes N times - (with N being the number of vertices in the other candidate feature). -

As with GEOMETRY, we recommend that when you have very large polygons, but are doing queries in small areas, you "denormalize" your geometric data into smaller chunks so that the index can effectively subquery parts of the object and so queries don't have to pull out the whole object every time. - Just because you *can* store all of Europe in one polygon doesn't mean you *should*.

4.3. Using OpenGIS Standards

The OpenGIS "Simple Features Specification for SQL" defines standard - GIS object types, the functions required to manipulate them, and a set of - meta-data tables. In order to ensure that meta-data remain consistent, - operations such as creating and removing a spatial column are carried out - through special procedures defined by OpenGIS.

There are two OpenGIS meta-data tables: - SPATIAL_REF_SYS and - GEOMETRY_COLUMNS. The - SPATIAL_REF_SYS table holds the numeric IDs and textual - descriptions of coordinate systems used in the spatial database.

4.3.1. The SPATIAL_REF_SYS Table and Spatial Reference Systems

The spatial_ref_sys table is a PostGIS included and OGC compliant database table that lists over 3000 - known spatial reference systems - and details needed to transform/reproject between them.

Although the PostGIS spatial_ref_sys table contains over 3000 of the more commonly used spatial reference system definitions that can be handled by the proj library, it does not contain all known to man and - you can even define your own custom projection if you are familiar with proj4 constructs. Keep in mind that most spatial reference systems are regional and have no meaning when used outside of the bounds they were intended for.

An excellent resource for finding spatial reference systems not defined in the core set is http://spatialreference.org/

Some of the more commonly used spatial reference systems are: 4326 - WGS 84 Long Lat, - 4269 - NAD 83 Long Lat, - 3395 - WGS 84 World Mercator, - 2163 - US National Atlas Equal Area, - Spatial reference systems for each NAD 83, WGS 84 UTM zone - UTM zones are one of the most ideal for measurement, but only cover 6-degree regions. -

- Various US state plane spatial reference systems (meter or feet based) - usually one or 2 exists per US state. Most of the meter ones are in the core set, but many of the - feet based ones or ESRI created ones you will need to pull from spatialreference.org. -

- For details on determining which UTM zone to use for your area of interest, check out the utmzone PostGIS plpgsql helper function. -

The SPATIAL_REF_SYS table definition is as - follows:

CREATE TABLE spatial_ref_sys (
-  srid       INTEGER NOT NULL PRIMARY KEY,
-  auth_name  VARCHAR(256),
-  auth_srid  INTEGER,
-  srtext     VARCHAR(2048),
-  proj4text  VARCHAR(2048)
-)

The SPATIAL_REF_SYS columns are as - follows:

SRID

An integer value that uniquely identifies the Spatial - Referencing System (SRS) within the database.

AUTH_NAME

The name of the standard or standards body that is being - cited for this reference system. For example, "EPSG" would be a - valid AUTH_NAME.

AUTH_SRID

The ID of the Spatial Reference System as defined by the - Authority cited in the AUTH_NAME. In the case - of EPSG, this is where the EPSG projection code would go.

SRTEXT

The Well-Known Text representation of the Spatial Reference - System. An example of a WKT SRS representation is:

PROJCS["NAD83 / UTM Zone 10N",
-  GEOGCS["NAD83",
-	DATUM["North_American_Datum_1983",
-	  SPHEROID["GRS 1980",6378137,298.257222101]
-	],
-	PRIMEM["Greenwich",0],
-	UNIT["degree",0.0174532925199433]
-  ],
-  PROJECTION["Transverse_Mercator"],
-  PARAMETER["latitude_of_origin",0],
-  PARAMETER["central_meridian",-123],
-  PARAMETER["scale_factor",0.9996],
-  PARAMETER["false_easting",500000],
-  PARAMETER["false_northing",0],
-  UNIT["metre",1]
-]

For a listing of EPSG projection codes and their - corresponding WKT representations, see http://www.opengeospatial.org/. - For a discussion of WKT in general, see the OpenGIS "Coordinate - Transformation Services Implementation Specification" at http://www.opengeospatial.org/standards. - For information on the European Petroleum Survey Group (EPSG) and - their database of spatial reference systems, see http://www.epsg.org.

PROJ4TEXT

PostGIS uses the Proj4 library to provide coordinate - transformation capabilities. The PROJ4TEXT - column contains the Proj4 coordinate definition string for a - particular SRID. For example:

+proj=utm +zone=10 +ellps=clrk66 +datum=NAD27 +units=m

For more information about, see the Proj4 web site at http://trac.osgeo.org/proj/. - The spatial_ref_sys.sql file contains both - SRTEXT and PROJ4TEXT - definitions for all EPSG projections.

4.3.2. The GEOMETRY_COLUMNS Table

The GEOMETRY_COLUMNS table definition is as - follows:

CREATE TABLE geometry_columns (
-  f_table_catalog    VARRCHAR(256) NOT NULL,
-  f_table_schema     VARCHAR(256) NOT NULL,
-  f_table_name        VARCHAR(256) NOT NULL,
-  f_geometry_column  VARCHAR(256) NOT NULL,
-  coord_dimension    INTEGER NOT NULL,
-  srid               INTEGER NOT NULL,
-  type               VARCHAR(30) NOT NULL
-)

The columns are as follows:

F_TABLE_CATALOG, F_TABLE_SCHEMA, F_TABLE_NAME

The fully qualified name of the feature table containing the - geometry column. Note that the terms "catalog" and "schema" are - Oracle-ish. There is not PostgreSQL analogue of "catalog" so that - column is left blank -- for "schema" the PostgreSQL schema name is - used (public is the default).

F_GEOMETRY_COLUMN

The name of the geometry column in the feature table.

COORD_DIMENSION

The spatial dimension (2, 3 or 4 dimensional) of the - column.

SRID

The ID of the spatial reference system used for the - coordinate geometry in this table. It is a foreign key reference - to the SPATIAL_REF_SYS.

TYPE

The type of the spatial object. To restrict the spatial - column to a single type, use one of: POINT, LINESTRING, POLYGON, - MULTIPOINT, MULTILINESTRING, MULTIPOLYGON, GEOMETRYCOLLECTION or - corresponding XYM versions POINTM, LINESTRINGM, POLYGONM, - MULTIPOINTM, MULTILINESTRINGM, MULTIPOLYGONM, GEOMETRYCOLLECTIONM. - For heterogeneous (mixed-type) collections, you can use "GEOMETRY" - as the type.

[Note]

This attribute is (probably) not part of the OpenGIS - specification, but is required for ensuring type - homogeneity.

4.3.3. Creating a Spatial Table

Creating a table with spatial data is done in two stages:

  • Create a normal non-spatial table.

    For example: CREATE TABLE ROADS_GEOM ( ID int4, NAME - varchar(25) )

  • Add a spatial column to the table using the OpenGIS - "AddGeometryColumn" function.

    The syntax is:

    AddGeometryColumn(
    -  <schema_name>,
    -  <table_name>,
    -  <column_name>,
    -  <srid>,
    -  <type>,
    -  <dimension>
    -)

    Or, using current schema:

    AddGeometryColumn(
    -  <table_name>,
    -  <column_name>,
    -  <srid>,
    -  <type>,
    -  <dimension>
    -)

    Example1: SELECT AddGeometryColumn('public', - 'roads_geom', 'geom', 423, 'LINESTRING', 2)

    Example2: SELECT AddGeometryColumn( 'roads_geom', - 'geom', 423, 'LINESTRING', 2)

Here is an example of SQL used to create a table and add a spatial - column (assuming that an SRID of 128 exists already):

CREATE TABLE parks (
-  park_id    INTEGER,
-  park_name  VARCHAR,
-  park_date  DATE,
-  park_type  VARCHAR
-);
-SELECT AddGeometryColumn('parks', 'park_geom', 128, 'MULTIPOLYGON', 2 );

Here is another example, using the generic "geometry" type and the - undefined SRID value of -1:

CREATE TABLE roads (
-  road_id INTEGER,
-  road_name VARCHAR
-);
-SELECT AddGeometryColumn( 'roads', 'roads_geom', -1, 'GEOMETRY', 3 );

4.3.4. Manually Registering Geometry Columns in geometry_columns

The AddGeometryColumn() approach creates a geometry column and also registers the new - column in the geometry_columns table. If your software utilizes geometry_columns, then - any geometry columns you need to query by must be registered in this table. Two of the cases - where you want a geometry column to be registered in the geometry_columns table, but you can't use - AddGeometryColumn, is in the case of SQL Views and bulk inserts. For these cases, you must register the column in the - geometry_columns table manually. Below is a simple script to do that.

---Lets say you have a view created like this
-CREATE VIEW  public.vwmytablemercator AS
-	SELECT gid, ST_Transform(the_geom,3395) As the_geom, f_name
-	FROM public.mytable;
-
---To register this table in AddGeometry columns - do the following
-INSERT INTO geometry_columns(f_table_catalog, f_table_schema, f_table_name, f_geometry_column, coord_dimension, srid, "type")
-SELECT '', 'public', 'vwmytablemercator', 'the_geom', ST_CoordDim(the_geom), ST_SRID(the_geom), GeometryType(the_geom)
-FROM public.vwmytablemercator LIMIT 1;
-
-		
---Lets say you created a derivative table by doing a bulk insert
-SELECT poi.gid, poi.the_geom, citybounds.city_name
-INTO myschema.myspecialpois
-FROM poi INNER JOIN citybounds ON ST_Intersects(citybounds.the_geom, poi.the_geom);
-
---Create index on new table
-CREATE INDEX idx_myschema_myspecialpois_geom_gist
-  ON myschema.myspecialpois USING gist(the_geom);
-
---To manually register this new table's geometry column in geometry_columns
--- we do the same thing as with view
-INSERT INTO geometry_columns(f_table_catalog, f_table_schema, f_table_name, f_geometry_column, coord_dimension, srid, "type")
-SELECT '', 'myschema', 'myspecialpois', 'the_geom', ST_CoordDim(the_geom), ST_SRID(the_geom), GeometryType(the_geom)
-FROM public.myschema.myspecialpois LIMIT 1;
-
-		

4.3.5. Ensuring OpenGIS compliancy of geometries

PostGIS is compliant with the Open Geospatial Consortium’s (OGC) - OpenGIS Specifications. As such, many PostGIS methods require, or more - accurately, assume that geometries that are operated on are both simple - and valid. for example, it does not make sense to calculate the area of - a polygon that has a hole defined outside of the polygon, or to construct - a polygon from a non-simple boundary line.

According to the OGC Specifications, a simple - geometry is one that has no anomalous geometric points, such as self - intersection or self tangency and primarily refers to 0 or 1-dimensional - geometries (i.e. [MULTI]POINT, [MULTI]LINESTRING). - Geometry validity, on the other hand, primarily refers to 2-dimensional - geometries (i.e. [MULTI]POLYGON) and defines the set - of assertions that characterizes a valid polygon. The description of each - geometric class includes specific conditions that further detail geometric - simplicity and validity.

A POINT is inheritably simple - as a 0-dimensional geometry object.

MULTIPOINTs are simple if - no two coordinates (POINTs) are equal (have identical - coordinate values).

A LINESTRING is simple if - it does not pass through the same POINT twice (except - for the endpoints, in which case it is referred to as a linear ring and - additionally considered closed).

(a)

(b)

(c)

(d)

(a) and - (c) are simple - LINESTRINGs, (b) - and (d) are not.

A MULTILINESTRING is simple - only if all of its elements are simple and the only intersection between - any two elements occurs at POINTs that are on the - boundaries of both elements.

(e)

(f)

(g)

(e) and - (f) are simple - MULTILINESTRINGs, (g) - is not.

By definition, a POLYGON is always - simple. It is valid if no two - rings in the boundary (made up of an exterior ring and interior rings) - cross. The boundary of a POLYGON may intersect at a - POINT but only as a tangent (i.e. not on a line). - A POLYGON may not have cut lines or spikes and the - interior rings must be contained entirely within the exterior ring.

(h)

(i)

(j)

(k)

(l)

(m)

(h) and - (i) are valid - POLYGONs, (j-m) - cannot be represented as single POLYGONs, but - (j) and (m) - could be represented as a valid MULTIPOLYGON. -

A MULTIPOLYGON is valid - if and only if all of its elements are valid and the interiors of no two - elements intersect. The boundaries of any two elements may touch, but - only at a finite number of POINTs.

(n)

(o)

(n) and - (o) are not valid - MULTIPOLYGONs.

Most of the functions implemented by the GEOS library rely on the - assumption that your geometries are valid as specified by the OpenGIS - Simple Feature Specification. To check simplicity or validity of - geometries you can use the ST_IsSimple() and - ST_IsValid()

-- Typically, it doesn't make sense to check
--- for validity on linear features since it will always return TRUE.
--- But in this example, PostGIS extends the definition of the OGC IsValid
--- by returning false if a LinearRing (start and end points are the same)
--- has less than 2 vertices.
-gisdb=# SELECT
-   ST_IsValid('LINESTRING(0 0, 1 1)'),
-   ST_IsValid('LINESTRING(0 0, 0 0)');
-
- st_isvalid | st_isvalid
-------------+-----------
-      t     |     f

By default, PostGIS does not apply this validity check on geometry - input, because testing for validity needs lots of CPU time for complex - geometries, especially polygons. If you do not trust your data sources, - you can manually enforce such a check to your tables by adding a check - constraint:

ALTER TABLE mytable
-  ADD CONSTRAINT geometry_valid_check
-	CHECK (ST_IsValid(the_geom));

If you encounter any strange error messages such as "GEOS - Intersection() threw an error!" or "JTS Intersection() threw an error!" - when calling PostGIS functions with valid input geometries, you likely - found an error in either PostGIS or one of the libraries it uses, and - you should contact the PostGIS developers. The same is true if a PostGIS - function returns an invalid geometry for valid input.

[Note]

Strictly compliant OGC geometries cannot have Z or M values. The - ST_IsValid() function won't consider - higher dimensioned geometries invalid! Invocations of AddGeometryColumn() will add a - constraint checking geometry dimensions, so it is enough to specify 2 - there.

4.3.6. Dimensionally Extended 9 Intersection Model (DE-9IM)

It is sometimes the case that the typical spatial predicates - (ST_Contains, ST_Crosses, - ST_Intersects, ST_Touches, ...) are - insufficient in and of themselves to adequately provide that desired - spatial filter.

For example, consider a linear - dataset representing a road network. It may be the task of a - GIS analyst to identify all road segments that cross - each other, not at a point, but on a line, perhaps invalidating - some business rule. In this case, ST_Crosses does not - adequately provide the necessary spatial filter since, for - linear features, it returns true only where - they cross at a point.

One two-step solution - might be to first perform the actual intersection - (ST_Intersection) of pairs of road segments that spatially - intersect (ST_Intersects), and then compare the intersection's - ST_GeometryType with 'LINESTRING' (properly - dealing with cases that return - GEOMETRYCOLLECTIONs of - [MULTI]POINTs, - [MULTI]LINESTRINGs, etc.).

A - more elegant / faster solution may indeed be - desirable.

A second [theoretical] - example may be that of a GIS analyst trying to locate all - wharfs or docks that intersect a lake's boundary on a line and - where only one end of the wharf is up on shore. In other - words, where a wharf is within, but not completely within a - lake, intersecting the boundary of a lake on a line, and where - the wharf's endpoints are both completely within and on the - boundary of the lake. The analyst may need to use a - combination of spatial predicates to isolate the sought after - features:

So enters the Dimensionally Extended 9 Intersection Model, or - DE-9IM for short.

4.3.6.1. Theory

According to the OpenGIS Simple - Features Implementation Specification for SQL, "the basic - approach to comparing two geometries is to make pair-wise tests of - the intersections between the Interiors, Boundaries and Exteriors of - the two geometries and to classify the relationship between the two - geometries based on the entries in the resulting 'intersection' - matrix."

Boundary

The boundary of a geometry is the set of geometries of - the next lower dimension. For POINTs, which - have a dimension of 0, the boundary is the empty set. The - boundary of a LINESTRING are the two - endpoints. For POLYGONs, the boundary is - the linework that make up the exterior and interior - rings.

Interior

The interior of a geometry are those points of a - geometry that are left when the boundary is removed. For - POINTs, the interior is the - POINT itself. The interior of a - LINESTRING are the set of real points - between the endpoints. For POLYGONs, the - interior is the areal surface inside the polygon.

Exterior

The exterior of a geometry is the universe, an areal - surface, not on the interior or boundary of the - geometry.

Given geometry a, where the - I(a), B(a), and - E(a) are the Interior, - Boundary, and Exterior of - a, the mathematical representation of the matrix is:

 InteriorBoundaryExterior
Interior - - dim( - I(a) - - - - I(b) ) - - - - dim( - I(a) - - - - B(b) ) - - - - dim( - I(a) - - - - E(b) ) - -
Boundary - - dim( - B(a) - - - - I(b) ) - - - - dim( - B(a) - - - - B(b) ) - - - - dim( - B(a) - - - - E(b) ) - -
Exterior - - dim( - E(a) - - - - I(b) ) - - - - dim( - E(a) - - - - B(b) ) - - - - dim( - E(a) - - - - E(b) ) - -

Where dim(a) is the dimension of - a as specified by - ST_Dimension but has the domain of - {0,1,2,T,F,*}

  • 0 => point

  • 1 => line

  • 2 => area

  • T => - {0,1,2}

  • F => empty set

  • * => don't care

Visually, for two overlapping polygonal geometries, this looks - like:

 

 InteriorBoundaryExterior
Interior

dim(...) = - 2

dim(...) = - 1

dim(...) = - 2

Boundary

dim(...) = - 1

dim(...) = - 0

dim(...) = - 1

Exterior

dim(...) = - 2

dim(...) = - 1

dim(...) = - 2

Read from left to right and from top to bottom, the dimensional matrix is - represented, '212101212'.

A relate matrix that would therefore represent our first - example of two lines that intersect on a line would be: '1*1***1**'

-- Identify road segments that cross on a line
-SELECT a.id
-FROM roads a, roads b
-WHERE a.id != b.id 
-AND a.geom && b.geom
-AND ST_Relate(a.geom, b.geom, '1*1***1**');

A relate matrix that represents the second example of wharfs - partly on the lake's shoreline would be '102101FF2'

-- Identify wharfs partly on a lake's shoreline
-SELECT a.lake_id, b.wharf_id
-FROM lakes a, wharfs b
-WHERE a.geom && b.geom
-AND ST_Relate(a.geom, b.geom, '102101FF2');

For more information or reading, see:

4.4. Loading GIS Data

Once you have created a spatial table, you are ready to upload GIS - data to the database. Currently, there are two ways to get data into a - PostGIS/PostgreSQL database: using formatted SQL statements or using the - Shape file loader/dumper.

4.4.1. Using SQL

If you can convert your data to a text representation, then using - formatted SQL might be the easiest way to get your data into PostGIS. As - with Oracle and other SQL databases, data can be bulk loaded by piping a - large text file full of SQL "INSERT" statements into the SQL terminal - monitor.

A data upload file (roads.sql for example) - might look like this:

BEGIN;
-INSERT INTO roads (road_id, roads_geom, road_name)
-  VALUES (1,ST_GeomFromText('LINESTRING(191232 243118,191108 243242)',-1),'Jeff Rd');
-INSERT INTO roads (road_id, roads_geom, road_name)
-  VALUES (2,ST_GeomFromText('LINESTRING(189141 244158,189265 244817)',-1),'Geordie Rd');
-INSERT INTO roads (road_id, roads_geom, road_name)
-  VALUES (3,ST_GeomFromText('LINESTRING(192783 228138,192612 229814)',-1),'Paul St');
-INSERT INTO roads (road_id, roads_geom, road_name)
-  VALUES (4,ST_GeomFromText('LINESTRING(189412 252431,189631 259122)',-1),'Graeme Ave');
-INSERT INTO roads (road_id, roads_geom, road_name)
-  VALUES (5,ST_GeomFromText('LINESTRING(190131 224148,190871 228134)',-1),'Phil Tce');
-INSERT INTO roads (road_id, roads_geom, road_name)
-  VALUES (6,ST_GeomFromText('LINESTRING(198231 263418,198213 268322)',-1),'Dave Cres');
-COMMIT;

The data file can be piped into PostgreSQL very easily using the - "psql" SQL terminal monitor:

psql -d [database] -f roads.sql

4.4.2. Using the Loader

- The shp2pgsql data loader converts ESRI Shape files into SQL suitable for - insertion into a PostGIS/PostgreSQL database either in geometry or geography format. The loader has several operating modes - distinguished by command line flags: -

In addition to the shp2pgsql command-line loader, there is an shp2pgsql-gui graphical interface with most - of the options as the command-line loader, but may be easier to use for one-off non-scripted loading or if you are new to PostGIS. - It can also be configured as a plugin to PgAdminIII. -

(c|a|d|p) These are mutually exclusive options:

-

-c

- Creates a new table and populates it from the shapefile. This is the - default mode. -

-a

- Appends data from the Shape file into the database table. Note that to use this - option to load multiple files, the files must have the same attributes and same - data types. -

-d

- Drops the database table before creating a new table with the data in the Shape - file. -

-p

- Only produces the table creation SQL code, without adding any actual data. This - can be used if you need to completely separate the table creation and data loading - steps. -

-

-?

- Display help screen. -

-D

- Use the PostgreSQL "dump" format for the output data. This can be combined with -a, -c and - -d. It is much faster to load than the default "insert" SQL format. Use this for very - large data sets. -

-s <SRID>

- Creates and populates the geometry tables with the specified SRID. -

-k

- Keep identifiers' case (column, schema and attributes). Note that attributes in Shapefile - are all UPPERCASE. -

-i

- Coerce all integers to standard 32-bit integers, do not create 64-bit bigints, even if the - DBF header signature appears to warrant it. -

-I

- Create a GiST index on the geometry column. -

-w

- Output WKT format, for use with older (0.x) versions of PostGIS. Note that this will - introduce coordinate drifts and will drop M values from shapefiles. -

-W <encoding>

- Specify encoding of the input data (dbf file). When used, all attributes of the dbf are - converted from the specified encoding to UTF8. The resulting SQL output will contain a - SET CLIENT_ENCODING to UTF8 command, so that the backend will be able to - reconvert from UTF8 to whatever encoding the database is configured to use internally. -

-N <policy>

- NULL geometries handling policy (insert*,skip,abort) -

-n

- -n Only import DBF file. If your data has no corresponding shapefile, it will automatically switch to this mode - and load just the dbf. So setting this flag is only needed if you have a full shapefile set, and you only want the attribute data and no geometry. -

-G

- Use geography type instead of geometry (requires lon/lat data) in WGS84 long lat (SRID=4326) -

- An example session using the loader to create an input file and uploading it might look like - this: -

# shp2pgsql -c -D -s 4269 -i -I shaperoads.shp myschema.roadstable > roads.sql
-# psql -d roadsdb -f roads.sql

- A conversion and upload can be done all in one step using UNIX pipes: -

# shp2pgsql shaperoads.shp myschema.roadstable | psql -d roadsdb

4.5. Retrieving GIS Data

Data can be extracted from the database using either SQL or the - Shape file loader/dumper. In the section on SQL we will discuss some of - the operators available to do comparisons and queries on spatial - tables.

4.5.1. Using SQL

The most straightforward means of pulling data out of the database - is to use a SQL select query and dump the resulting columns into a - parsable text file:

db=# SELECT road_id, ST_AsText(road_geom) AS geom, road_name FROM roads;
-
-road_id | geom                                    | road_name
---------+-----------------------------------------+-----------
-	  1 | LINESTRING(191232 243118,191108 243242) | Jeff Rd
-	  2 | LINESTRING(189141 244158,189265 244817) | Geordie Rd
-	  3 | LINESTRING(192783 228138,192612 229814) | Paul St
-	  4 | LINESTRING(189412 252431,189631 259122) | Graeme Ave
-	  5 | LINESTRING(190131 224148,190871 228134) | Phil Tce
-	  6 | LINESTRING(198231 263418,198213 268322) | Dave Cres
-	  7 | LINESTRING(218421 284121,224123 241231) | Chris Way
-(6 rows)

However, there will be times when some kind of restriction is - necessary to cut down the number of fields returned. In the case of - attribute-based restrictions, just use the same SQL syntax as normal - with a non-spatial table. In the case of spatial restrictions, the - following operators are available/useful:

&&

This operator tells whether the bounding box of one geometry - intersects the bounding box of another.

~=

This operators tests whether two geometries are - geometrically identical. For example, if 'POLYGON((0 0,1 1,1 0,0 - 0))' is the same as 'POLYGON((0 0,1 1,1 0,0 0))' (it is).

=

This operator is a little more naive, it only tests whether - the bounding boxes of two geometries are the same.

Next, you can use these operators in queries. Note that when - specifying geometries and boxes on the SQL command line, you must - explicitly turn the string representations into geometries by using the - "GeomFromText()" function. So, for example:

SELECT road_id, road_name
-  FROM roads
-  WHERE roads_geom ~= ST_GeomFromText('LINESTRING(191232 243118,191108 243242)',-1);

The above query would return the single record from the - "ROADS_GEOM" table in which the geometry was equal to that value.

When using the "&&" operator, you can specify either a - BOX3D as the comparison feature or a GEOMETRY. When you specify a - GEOMETRY, however, its bounding box will be used for the - comparison.

SELECT road_id, road_name
-FROM roads
-WHERE roads_geom && ST_GeomFromText('POLYGON((...))',-1);

The above query will use the bounding box of the polygon for - comparison purposes.

The most common spatial query will probably be a "frame-based" - query, used by client software, like data browsers and web mappers, to - grab a "map frame" worth of data for display. Using a "BOX3D" object for - the frame, such a query looks like this:

SELECT ST_AsText(roads_geom) AS geom
-FROM roads
-WHERE
-  roads_geom && SetSRID('BOX3D(191232 243117,191232 243119)'::box3d,-1);

Note the use of the SRID, to specify the projection of the BOX3D. - The value -1 is used to indicate no specified SRID.

4.5.2. Using the Dumper

The pgsql2shp table dumper connects directly - to the database and converts a table (possibly defined by a query) into - a shape file. The basic syntax is:

pgsql2shp [<options>] <database> [<schema>.]<table>
pgsql2shp [<options>] <database> <query>

The commandline options are:

-f <filename>

Write the output to a particular filename.

-h <host>

The database host to connect to.

-p <port>

The port to connect to on the database host.

-P <password>

The password to use when connecting to the database.

-u <user>

The username to use when connecting to the database.

-g <geometry column>

In the case of tables with multiple geometry columns, the - geometry column to use when writing the shape file.

-b

Use a binary cursor. This will make the operation faster, - but will not work if any NON-geometry attribute in the table lacks - a cast to text.

-r

Raw mode. Do not drop the gid field, or - escape column names.

-d

For backward compatibility: write a 3-dimensional shape file - when dumping from old (pre-1.0.0) postgis databases (the default - is to write a 2-dimensional shape file in that case). Starting - from postgis-1.0.0+, dimensions are fully encoded.

4.6. Building Indexes

Indexes are what make using a spatial database for large data sets - possible. Without indexing, any search for a feature would require a - "sequential scan" of every record in the database. Indexing speeds up - searching by organizing the data into a search tree which can be quickly - traversed to find a particular record. PostgreSQL supports three kinds of - indexes by default: B-Tree indexes, R-Tree indexes, and GiST - indexes.

  • B-Trees are used for data which can be sorted along one axis; - for example, numbers, letters, dates. GIS data cannot be rationally - sorted along one axis (which is greater, (0,0) or (0,1) or (1,0)?) so - B-Tree indexing is of no use for us.

  • R-Trees break up data into rectangles, and sub-rectangles, and - sub-sub rectangles, etc. R-Trees are used by some spatial databases to - index GIS data, but the PostgreSQL R-Tree implementation is not as - robust as the GiST implementation.

  • GiST (Generalized Search Trees) indexes break up data into - "things to one side", "things which overlap", "things which are - inside" and can be used on a wide range of data-types, including GIS - data. PostGIS uses an R-Tree index implemented on top of GiST to index - GIS data.

4.6.1. GiST Indexes

GiST stands for "Generalized Search Tree" and is a generic form of - indexing. In addition to GIS indexing, GiST is used to speed up searches - on all kinds of irregular data structures (integer arrays, spectral - data, etc) which are not amenable to normal B-Tree indexing.

Once a GIS data table exceeds a few thousand rows, you will want - to build an index to speed up spatial searches of the data (unless all - your searches are based on attributes, in which case you'll want to - build a normal index on the attribute fields).

The syntax for building a GiST index on a "geometry" column is as - follows:

CREATE INDEX [indexname] ON [tablename] USING GIST ( [geometryfield] ); 

Building a spatial index is a computationally intensive exercise: - on tables of around 1 million rows, on a 300MHz Solaris machine, we have - found building a GiST index takes about 1 hour. After building an index, - it is important to force PostgreSQL to collect table statistics, which - are used to optimize query plans:

VACUUM ANALYZE [table_name] [column_name];
--- This is only needed for PostgreSQL 7.4 installations and below
-SELECT UPDATE_GEOMETRY_STATS([table_name], [column_name]);

GiST indexes have two advantages over R-Tree indexes in - PostgreSQL. Firstly, GiST indexes are "null safe", meaning they can - index columns which include null values. Secondly, GiST indexes support - the concept of "lossiness" which is important when dealing with GIS - objects larger than the PostgreSQL 8K page size. Lossiness allows - PostgreSQL to store only the "important" part of an object in an index - -- in the case of GIS objects, just the bounding box. GIS objects larger - than 8K will cause R-Tree indexes to fail in the process of being - built.

4.6.2. Using Indexes

Ordinarily, indexes invisibly speed up data access: once the index - is built, the query planner transparently decides when to use index - information to speed up a query plan. Unfortunately, the PostgreSQL - query planner does not optimize the use of GiST indexes well, so - sometimes searches which should use a spatial index instead default to a - sequence scan of the whole table.

If you find your spatial indexes are not being used (or your - attribute indexes, for that matter) there are a couple things you can - do:

  • Firstly, make sure statistics are gathered about the number - and distributions of values in a table, to provide the query planner - with better information to make decisions around index usage. For - PostgreSQL 7.4 installations and below this is done by running - update_geometry_stats([table_name, column_name]) - (compute distribution) and VACUUM ANALYZE [table_name] - [column_name] (compute number of values). Starting with - PostgreSQL 8.0 running VACUUM ANALYZE will do - both operations. You should regularly vacuum your databases anyways - -- many PostgreSQL DBAs have VACUUM run as an - off-peak cron job on a regular basis.

  • If vacuuming does not work, you can force the planner to use - the index information by using the SET - ENABLE_SEQSCAN=OFF command. You should only use this - command sparingly, and only on spatially indexed queries: generally - speaking, the planner knows better than you do about when to use - normal B-Tree indexes. Once you have run your query, you should - consider setting ENABLE_SEQSCAN back on, so that - other queries will utilize the planner as normal.

    [Note]

    As of version 0.6, it should not be necessary to force the - planner to use the index with - ENABLE_SEQSCAN.

  • If you find the planner wrong about the cost of sequential vs - index scans try reducing the value of random_page_cost in - postgresql.conf or using SET random_page_cost=#. Default value for - the parameter is 4, try setting it to 1 or 2. Decrementing the value - makes the planner more inclined of using Index scans.

4.7. Complex Queries

The raison d'etre of spatial database - functionality is performing queries inside the database which would - ordinarily require desktop GIS functionality. Using PostGIS effectively - requires knowing what spatial functions are available, and ensuring that - appropriate indexes are in place to provide good performance.

4.7.1. Taking Advantage of Indexes

When constructing a query it is important to remember that only - the bounding-box-based operators such as && can take advantage - of the GiST spatial index. Functions such as - distance() cannot use the index to optimize their - operation. For example, the following query would be quite slow on a - large table:

SELECT the_geom
-FROM geom_table
-WHERE ST_Distance(the_geom, ST_GeomFromText('POINT(100000 200000)', -1)) < 100

This query is selecting all the geometries in geom_table which are - within 100 units of the point (100000, 200000). It will be slow because - it is calculating the distance between each point in the table and our - specified point, ie. one ST_Distance() calculation - for each row in the table. We can avoid this by using the && - operator to reduce the number of distance calculations required:

SELECT the_geom
-FROM geom_table
-WHERE the_geom && 'BOX3D(90900 190900, 100100 200100)'::box3d
-  AND
-ST_Distance(the_geom, ST_GeomFromText('POINT(100000 200000)', -1)) < 100

This query selects the same geometries, but it does it in a more - efficient way. Assuming there is a GiST index on the_geom, the query - planner will recognize that it can use the index to reduce the number of - rows before calculating the result of the distance() - function. Notice that the BOX3D geometry which is - used in the && operation is a 200 unit square box centered on - the original point - this is our "query box". The && operator - uses the index to quickly reduce the result set down to only those - geometries which have bounding boxes that overlap the "query box". - Assuming that our query box is much smaller than the extents of the - entire geometry table, this will drastically reduce the number of - distance calculations that need to be done.

[Note]Change in Behavior

As of PostGIS 1.3.0, most of the Geometry Relationship - Functions, with the notable exceptions of ST_Disjoint and ST_Relate, - include implicit bounding box overlap operators.

4.7.2. Examples of Spatial SQL

The examples in this section will make use of two tables, a table - of linear roads, and a table of polygonal municipality boundaries. The - table definitions for the bc_roads table is:

Column      | Type              | Description
-------------+-------------------+-------------------
-gid         | integer           | Unique ID
-name        | character varying | Road Name
-the_geom    | geometry          | Location Geometry (Linestring)

The table definition for the bc_municipality - table is:

Column     | Type              | Description
------------+-------------------+-------------------
-gid        | integer           | Unique ID
-code       | integer           | Unique ID
-name       | character varying | City / Town Name
-the_geom   | geometry          | Location Geometry (Polygon)
4.7.2.1. What is the total length of all roads, expressed in - kilometers?
4.7.2.2. How large is the city of Prince George, in hectares?
4.7.2.3. What is the largest municipality in the province, by - area?
4.7.2.4. What is the length of roads fully contained within each - municipality?
4.7.2.5. Create a new table with all the roads within the city of - Prince George.
4.7.2.6. What is the length in kilometers of "Douglas St" in - Victoria?
4.7.2.7. What is the largest municipality polygon that has a - hole?

4.7.2.1.

What is the total length of all roads, expressed in - kilometers?

You can answer this question with a very simple piece of - SQL:

SELECT sum(ST_Length(the_geom))/1000 AS km_roads FROM bc_roads;
-
-km_roads
-------------------
-70842.1243039643
-(1 row)

4.7.2.2.

How large is the city of Prince George, in hectares?

This query combines an attribute condition (on the - municipality name) with a spatial calculation (of the - area):

SELECT
-  ST_Area(the_geom)/10000 AS hectares
-FROM bc_municipality
-WHERE name = 'PRINCE GEORGE';
-
-hectares
-------------------
-32657.9103824927
-(1 row)

4.7.2.3.

What is the largest municipality in the province, by - area?

This query brings a spatial measurement into the query - condition. There are several ways of approaching this problem, but - the most efficient is below:

SELECT
-  name,
-  ST_Area(the_geom)/10000 AS hectares
-FROM
-  bc_municipality
-ORDER BY hectares DESC
-LIMIT 1;
-
-name           | hectares
----------------+-----------------
-TUMBLER RIDGE  | 155020.02556131
-(1 row)

Note that in order to answer this query we have to calculate - the area of every polygon. If we were doing this a lot it would - make sense to add an area column to the table that we could - separately index for performance. By ordering the results in a - descending direction, and them using the PostgreSQL "LIMIT" - command we can easily pick off the largest value without using an - aggregate function like max().

4.7.2.4.

What is the length of roads fully contained within each - municipality?

This is an example of a "spatial join", because we are - bringing together data from two tables (doing a join) but using a - spatial interaction condition ("contained") as the join condition - rather than the usual relational approach of joining on a common - key:

SELECT
-  m.name,
-  sum(ST_Length(r.the_geom))/1000 as roads_km
-FROM
-  bc_roads AS r,
-  bc_municipality AS m
-WHERE
-  ST_Contains(m.the_geom,r.the_geom)
-GROUP BY m.name
-ORDER BY roads_km;
-
-name                        | roads_km
-----------------------------+------------------
-SURREY                      | 1539.47553551242
-VANCOUVER                   | 1450.33093486576
-LANGLEY DISTRICT            | 833.793392535662
-BURNABY                     | 773.769091404338
-PRINCE GEORGE               | 694.37554369147
-...

This query takes a while, because every road in the table is - summarized into the final result (about 250K roads for our - particular example table). For smaller overlays (several thousand - records on several hundred) the response can be very fast.

4.7.2.5.

Create a new table with all the roads within the city of - Prince George.

This is an example of an "overlay", which takes in two - tables and outputs a new table that consists of spatially clipped - or cut resultants. Unlike the "spatial join" demonstrated above, - this query actually creates new geometries. An overlay is like a - turbo-charged spatial join, and is useful for more exact analysis - work:

CREATE TABLE pg_roads as
-SELECT
-  ST_Intersection(r.the_geom, m.the_geom) AS intersection_geom,
-  ST_Length(r.the_geom) AS rd_orig_length,
-  r.*
-FROM
-  bc_roads AS r,
-  bc_municipality AS m
-WHERE  m.name = 'PRINCE GEORGE' AND ST_Intersects(r.the_geom, m.the_geom);

4.7.2.6.

What is the length in kilometers of "Douglas St" in - Victoria?

SELECT
-  sum(ST_Length(r.the_geom))/1000 AS kilometers
-FROM
-  bc_roads r,
-  bc_municipality m
-WHERE  r.name = 'Douglas St' AND m.name = 'VICTORIA'
-	AND ST_Contains(m.the_geom, r.the_geom) ;
-
-kilometers
-------------------
-4.89151904172838
-(1 row)

4.7.2.7.

What is the largest municipality polygon that has a - hole?

SELECT gid, name, ST_Area(the_geom) AS area
-FROM bc_municipality
-WHERE ST_NRings(the_geom) > 1
-ORDER BY area DESC LIMIT 1;
-
-gid  | name         | area
------+--------------+------------------
-12   | SPALLUMCHEEN | 257374619.430216
-(1 row)

Chapter 5. Using PostGIS: Building Applications

5.1. Using MapServer

The Minnesota MapServer is an internet web-mapping server which - conforms to the OpenGIS Web Mapping Server specification.

5.1.1. Basic Usage

To use PostGIS with MapServer, you will need to know about how to - configure MapServer, which is beyond the scope of this documentation. - This section will cover specific PostGIS issues and configuration - details.

To use PostGIS with MapServer, you will need:

  • Version 0.6 or newer of PostGIS.

  • Version 3.5 or newer of MapServer.

MapServer accesses PostGIS/PostgreSQL data like any other - PostgreSQL client -- using the libpq interface. This means that - MapServer can be installed on any machine with network access to the - PostGIS server, and use PostGIS as a source of data. The faster the connection - between the systems, the better.

  1. Compile and install MapServer, with whatever options you - desire, including the "--with-postgis" configuration option.

  2. In your MapServer map file, add a PostGIS layer. For - example:

    LAYER 
    -  CONNECTIONTYPE postgis 
    -  NAME "widehighways" 
    -  # Connect to a remote spatial database
    -  CONNECTION "user=dbuser dbname=gisdatabase host=bigserver"
    -  PROCESSING "CLOSE_CONNECTION=DEFER"
    -  # Get the lines from the 'geom' column of the 'roads' table 
    -  DATA "geom from roads using srid=4326 using unique gid" 
    -  STATUS ON
    -  TYPE LINE 
    -  # Of the lines in the extents, only render the wide highways 
    -  FILTER "type = 'highway' and numlanes >= 4" 
    -  CLASS 
    -    # Make the superhighways brighter and 2 pixels wide
    -    EXPRESSION ([numlanes] >= 6) 
    -    STYLE
    -      COLOR 255 22 22 
    -      WIDTH 2 
    -    END
    -  END 
    -  CLASS 
    -    # All the rest are darker and only 1 pixel wide 
    -    EXPRESSION ([numlanes] < 6) 
    -    STYLE
    -      COLOR 205 92 82
    -    END
    -  END 
    -END

    In the example above, the PostGIS-specific directives are as - follows:

    CONNECTIONTYPE

    For PostGIS layers, this is always "postgis".

    CONNECTION

    The database connection is governed by the a 'connection - string' which is a standard set of keys and values like this - (with the default values in <>):

    user=<username> password=<password> - dbname=<username> hostname=<server> - port=<5432>

    An empty connection string is still valid, and any of - the key/value pairs can be omitted. At a minimum you will - generally supply the database name and username to connect - with.

    DATA

    The form of this parameter is "<geocolumn> from - <tablename> using srid=<srid> using unique <primary key>" where the column is the spatial column to - be rendered to the map, the SRID is SRID used by the column and the primary key is the table primary key (or any - other uniquely-valued column with an index).

    You can omit the "using srid" and "using unique" clauses and MapServer will automatically determine the - correct values if possible, but at the cost of running a few extra queries on the server for each map - draw.

    PROCESSING

    Putting in a CLOSE_CONNECTION=DEFER if you have multiple layers reuses existing connections instead of closing them. This improves - speed. Refer to for MapServer PostGIS Performance Tips for a more detailed explanation.

    FILTER

    The filter must be a valid SQL string corresponding to - the logic normally following the "WHERE" keyword in a SQL - query. So, for example, to render only roads with 6 or more - lanes, use a filter of "num_lanes >= 6".

  3. In your spatial database, ensure you have spatial (GiST) - indexes built for any the layers you will be drawing.

    CREATE INDEX [indexname] ON [tablename] USING GIST ( [geometrycolumn] );
  4. If you will be querying your layers using MapServer you will - also need to use the "using unique" clause in your DATA statement.

    MapServer requires unique identifiers for each spatial record - when doing queries, and the PostGIS module of MapServer uses the - unique value you specify in order to provide these unique - identifiers. Using the table primary key is the best practice.

5.1.2. Frequently Asked Questions

5.1.2.1. When I use an EXPRESSION in my map file, - the condition never returns as true, even though I know the values - exist in my table.
5.1.2.2. The FILTER I use for my Shape files is not working for my - PostGIS table of the same data.
5.1.2.3. My PostGIS layer draws much slower than my Shape file layer, - is this normal?
5.1.2.4. My PostGIS layer draws fine, but queries are really slow. - What is wrong?
5.1.2.5. Can I use "geography" columns (new in PostGIS 1.5) as a source for - MapServer layers?

5.1.2.1.

When I use an EXPRESSION in my map file, - the condition never returns as true, even though I know the values - exist in my table.

Unlike shape files, PostGIS field names have to be - referenced in EXPRESSIONS using lower - case.

EXPRESSION ([numlanes] >= 6)

5.1.2.2.

The FILTER I use for my Shape files is not working for my - PostGIS table of the same data.

Unlike shape files, filters for PostGIS layers use SQL - syntax (they are appended to the SQL statement the PostGIS - connector generates for drawing layers in MapServer).

FILTER "type = 'highway' and numlanes >= 4"

5.1.2.3.

My PostGIS layer draws much slower than my Shape file layer, - is this normal?

In general, the more features you are drawing into a given map, - the more likely it is that PostGIS will be slower than Shape files. - For maps with relatively few features (100s), PostGIS will often be faster. - For maps with high feature density (1000s), PostGIS will always be slower. -

If you are finding substantial draw performance problems, it - is possible that you have not built a spatial index on your - table.

postgis# CREATE INDEX geotable_gix ON geotable USING GIST ( geocolumn ); 
-postgis# VACUUM ANALYZE;

5.1.2.4.

My PostGIS layer draws fine, but queries are really slow. - What is wrong?

For queries to be fast, you must have a unique key for your - spatial table and you must have an index on that unique - key.

You can specify what unique key for mapserver to use with - the USING UNIQUE clause in your - DATA line:

DATA "the_geom FROM geotable USING UNIQUE gid"

5.1.2.5.

Can I use "geography" columns (new in PostGIS 1.5) as a source for - MapServer layers?

Yes! MapServer understands geography columns as being the same as - geometry columns, but always using an SRID of 4326. Just make sure to include - a "using srid=4326" clause in your DATA statement. Everything else - works exactly the same as with geometry.

DATA "the_geog FROM geogtable USING SRID=4326 USING UNIQUE gid"

5.1.3. Advanced Usage

The USING pseudo-SQL clause is used to add some - information to help mapserver understand the results of more complex - queries. More specifically, when either a view or a subselect is used as - the source table (the thing to the right of "FROM" in a - DATA definition) it is more difficult for mapserver - to automatically determine a unique identifier for each row and also the - SRID for the table. The USING clause can provide - mapserver with these two pieces of information as follows:

DATA "the_geom FROM (
-  SELECT 
-    table1.the_geom AS the_geom, 
-    table1.oid AS oid, 
-    table2.data AS data 
-  FROM table1 
-  LEFT JOIN table2 
-  ON table1.id = table2.id
-) AS new_table USING UNIQUE gid USING SRID=-1"
USING UNIQUE <uniqueid>

MapServer requires a unique id for each row in order to - identify the row when doing map queries. Normally it identifies - the primary key from the system tables. However, views and subselects don't - automatically have an known unique column. If you want to use MapServer's - query functionality, you need to ensure your view - or subselect includes a uniquely valued column, and declare it with USING UNIQUE. - For example, you could explicitly select nee of the table's primary key - values for this purpose, or any other column which is guaranteed - to be unique for the result set.

[Note]

"Querying a Map" is the action of clicking on a map to ask - for information about the map features in that location. Don't - confuse "map queries" with the SQL query in a - DATA definition.

USING SRID=<srid>

PostGIS needs to know which spatial referencing system is - being used by the geometries in order to return the correct data - back to MapServer. Normally it is possible to find this - information in the "geometry_columns" table in the PostGIS - database, however, this is not possible for tables which are - created on the fly such as subselects and views. So the - USING SRID= option allows the correct SRID to - be specified in the DATA definition.

5.1.4. Examples

Lets start with a simple example and work our way up. Consider the - following MapServer layer definition:

LAYER 
-  CONNECTIONTYPE postgis 
-  NAME "roads"
-  CONNECTION "user=theuser password=thepass dbname=thedb host=theserver" 
-  DATA "the_geom from roads" 
-  STATUS ON 
-  TYPE LINE 
-  CLASS 
-    STYLE
-      COLOR 0 0 0 
-    END
-  END 
-END

This layer will display all the road geometries in the roads table - as black lines.

Now lets say we want to show only the highways until we get zoomed - in to at least a 1:100000 scale - the next two layers will achieve this - effect:

LAYER 
-  CONNECTIONTYPE postgis 
-  CONNECTION "user=theuser password=thepass dbname=thedb host=theserver" 
-  PROCESSING "CLOSE_CONNECTION=DEFER"
-  DATA "the_geom from roads"
-  MINSCALE 100000 
-  STATUS ON 
-  TYPE LINE 
-  FILTER "road_type = 'highway'" 
-  CLASS 
-    COLOR 0 0 0 
-  END 
-END 
-LAYER 
-  CONNECTIONTYPE postgis 
-  CONNECTION "user=theuser password=thepass dbname=thedb host=theserver"
-  PROCESSING "CLOSE_CONNECTION=DEFER"
-  DATA "the_geom from roads" 
-  MAXSCALE 100000 
-  STATUS ON 
-  TYPE LINE
-  CLASSITEM road_type 
-  CLASS 
-    EXPRESSION "highway" 
-    STYLE
-      WIDTH 2 
-      COLOR 255 0 0  
-    END
-  END 
-  CLASS  
-    STYLE
-      COLOR 0 0 0 
-    END
-  END 
-END

The first layer is used when the scale is greater than 1:100000, - and displays only the roads of type "highway" as black lines. The - FILTER option causes only roads of type "highway" to - be displayed.

The second layer is used when the scale is less than 1:100000, and - will display highways as double-thick red lines, and other roads as - regular black lines.

So, we have done a couple of interesting things using only - MapServer functionality, but our DATA SQL statement - has remained simple. Suppose that the name of the road is stored in - another table (for whatever reason) and we need to do a join to get it - and label our roads.

LAYER 
-  CONNECTIONTYPE postgis
-  CONNECTION "user=theuser password=thepass dbname=thedb host=theserver" 
-  DATA "the_geom FROM (SELECT roads.oid AS oid, roads.the_geom AS the_geom, 
-        road_names.name as name FROM roads LEFT JOIN road_names ON 
-        roads.road_name_id = road_names.road_name_id) 
-        AS named_roads USING UNIQUE oid USING SRID=-1" 
-  MAXSCALE 20000 
-  STATUS ON 
-  TYPE ANNOTATION 
-  LABELITEM name
-  CLASS 
-    LABEL 
-      ANGLE auto 
-      SIZE 8 
-      COLOR 0 192 0 
-      TYPE truetype 
-      FONT arial
-    END
-  END 
-END

This annotation layer adds green labels to all the roads when the - scale gets down to 1:20000 or less. It also demonstrates how to use an - SQL join in a DATA definition.

5.2. Java Clients (JDBC)

Java clients can access PostGIS "geometry" objects in the PostgreSQL - database either directly as text representations or using the JDBC - extension objects bundled with PostGIS. In order to use the extension - objects, the "postgis.jar" file must be in your CLASSPATH along with the - "postgresql.jar" JDBC driver package.

import java.sql.*; 
-import java.util.*; 
-import java.lang.*; 
-import org.postgis.*; 
-
-public class JavaGIS { 
-
-public static void main(String[] args) { 
-
-  java.sql.Connection conn; 
-
-  try { 
-    /* 
-    * Load the JDBC driver and establish a connection. 
-    */
-    Class.forName("org.postgresql.Driver"); 
-    String url = "jdbc:postgresql://localhost:5432/database"; 
-    conn = DriverManager.getConnection(url, "postgres", ""); 
-    /* 
-    * Add the geometry types to the connection. Note that you 
-    * must cast the connection to the pgsql-specific connection 
-    * implementation before calling the addDataType() method. 
-    */
-    ((org.postgresql.PGConnection)conn).addDataType("geometry",Class.forName("org.postgis.PGgeometry"));
-    ((org.postgresql.PGConnection)conn).addDataType("box3d",Class.forName("org.postgis.PGbox3d"));
-
-    /* 
-    * Create a statement and execute a select query. 
-    */ 
-    Statement s = conn.createStatement(); 
-    ResultSet r = s.executeQuery("select geom,id from geomtable"); 
-    while( r.next() ) { 
-      /* 
-      * Retrieve the geometry as an object then cast it to the geometry type. 
-      * Print things out. 
-      */ 
-      PGgeometry geom = (PGgeometry)r.getObject(1); 
-      int id = r.getInt(2); 
-      System.out.println("Row " + id + ":");
-      System.out.println(geom.toString()); 
-    } 
-    s.close(); 
-    conn.close(); 
-  } 
-catch( Exception e ) { 
-  e.printStackTrace(); 
-  } 
-} 
-}

The "PGgeometry" object is a wrapper object which contains a - specific topological geometry object (subclasses of the abstract class - "Geometry") depending on the type: Point, LineString, Polygon, MultiPoint, - MultiLineString, MultiPolygon.

PGgeometry geom = (PGgeometry)r.getObject(1); 
-if( geom.getType() == Geometry.POLYGON ) { 
-  Polygon pl = (Polygon)geom.getGeometry(); 
-  for( int r = 0; r < pl.numRings(); r++) { 
-    LinearRing rng = pl.getRing(r); 
-    System.out.println("Ring: " + r); 
-    for( int p = 0; p < rng.numPoints(); p++ ) { 
-      Point pt = rng.getPoint(p); 
-      System.out.println("Point: " + p);
-      System.out.println(pt.toString()); 
-    } 
-  } 
-}

The JavaDoc for the extension objects provides a reference for the - various data accessor functions in the geometric objects.

5.3. C Clients (libpq)

...

5.3.1. Text Cursors

...

5.3.2. Binary Cursors

...

Chapter 6. Performance tips

6.1. Small tables of large geometries

6.1.1. Problem description

Current PostgreSQL versions (including 8.0) suffer from a query - optimizer weakness regarding TOAST tables. TOAST tables are a kind of - "extension room" used to store large (in the sense of data size) values - that do not fit into normal data pages (like long texts, images or - complex geometries with lots of vertices), see - http://www.postgresql.org/docs/current/interactive/storage-toast.html for more - information).

The problem appears if you happen to have a table with rather - large geometries, but not too much rows of them (like a table containing - the boundaries of all European countries in high resolution). Then the - table itself is small, but it uses lots of TOAST space. In our example - case, the table itself had about 80 rows and used only 3 data pages, but - the TOAST table used 8225 pages.

Now issue a query where you use the geometry operator && - to search for a bounding box that matches only very few of those rows. - Now the query optimizer sees that the table has only 3 pages and 80 - rows. He estimates that a sequential scan on such a small table is much - faster than using an index. And so he decides to ignore the GIST index. - Usually, this estimation is correct. But in our case, the && - operator has to fetch every geometry from disk to compare the bounding - boxes, thus reading all TOAST pages, too.

To see whether your suffer from this bug, use the "EXPLAIN - ANALYZE" postgresql command. For more information and the technical - details, you can read the thread on the postgres performance mailing - list: - http://archives.postgresql.org/pgsql-performance/2005-02/msg00030.php

6.1.2. Workarounds

The PostgreSQL people are trying to solve this issue by making the - query estimation TOAST-aware. For now, here are two workarounds:

The first workaround is to force the query planner to use the - index. Send "SET enable_seqscan TO off;" to the server before issuing - the query. This basically forces the query planner to avoid sequential - scans whenever possible. So it uses the GIST index as usual. But this - flag has to be set on every connection, and it causes the query planner - to make misestimations in other cases, so you should "SET enable_seqscan - TO on;" after the query.

The second workaround is to make the sequential scan as fast as - the query planner thinks. This can be achieved by creating an additional - column that "caches" the bbox, and matching against this. In our - example, the commands are like:

SELECT AddGeometryColumn('myschema','mytable','bbox','4326','GEOMETRY','2'); 
-UPDATE mytable SET bbox = ST_Envelope(ST_Force_2d(the_geom));

Now change your query to use the && operator against bbox - instead of geom_column, like:

SELECT geom_column 
-FROM mytable 
-WHERE bbox && ST_SetSRID('BOX3D(0 0,1 1)'::box3d,4326);

Of course, if you change or add rows to mytable, you have to keep - the bbox "in sync". The most transparent way to do this would be - triggers, but you also can modify your application to keep the bbox - column current or run the UPDATE query above after every - modification.

6.2. CLUSTERing on geometry indices

For tables that are mostly read-only, and where a single index is - used for the majority of queries, PostgreSQL offers the CLUSTER command. - This command physically reorders all the data rows in the same order as - the index criteria, yielding two performance advantages: First, for index - range scans, the number of seeks on the data table is drastically reduced. - Second, if your working set concentrates to some small intervals on the - indices, you have a more efficient caching because the data rows are - spread along fewer data pages. (Feel invited to read the CLUSTER command - documentation from the PostgreSQL manual at this point.)

However, currently PostgreSQL does not allow clustering on PostGIS - GIST indices because GIST indices simply ignores NULL values, you get an - error message like:

lwgeom=# CLUSTER my_geom_index ON my_table; 
-ERROR: cannot cluster when index access method does not handle null values
-HINT: You may be able to work around this by marking column "the_geom" NOT NULL.

As the HINT message tells you, one can work around this deficiency - by adding a "not null" constraint to the table:

lwgeom=# ALTER TABLE my_table ALTER COLUMN the_geom SET not null; 
-ALTER TABLE

Of course, this will not work if you in fact need NULL values in - your geometry column. Additionally, you must use the above method to add - the constraint, using a CHECK constraint like "ALTER TABLE blubb ADD CHECK - (geometry is not null);" will not work.

6.3. Avoiding dimension conversion

Sometimes, you happen to have 3D or 4D data in your table, but - always access it using OpenGIS compliant ST_AsText() or ST_AsBinary() - functions that only output 2D geometries. They do this by internally - calling the ST_Force_2d() function, which introduces a significant - overhead for large geometries. To avoid this overhead, it may be feasible - to pre-drop those additional dimensions once and forever:

UPDATE mytable SET the_geom = ST_Force_2d(the_geom); 
-VACUUM FULL ANALYZE mytable;

Note that if you added your geometry column using - AddGeometryColumn() there'll be a constraint on geometry dimension. To - bypass it you will need to drop the constraint. Remember to update the - entry in the geometry_columns table and recreate the constraint - afterwards.

In case of large tables, it may be wise to divide this UPDATE into - smaller portions by constraining the UPDATE to a part of the table via a - WHERE clause and your primary key or another feasible criteria, and - running a simple "VACUUM;" between your UPDATEs. This drastically reduces - the need for temporary disk space. Additionally, if you have mixed - dimension geometries, restricting the UPDATE by "WHERE - dimension(the_geom)>2" skips re-writing of geometries that already are - in 2D.

6.4. Tuning your configuration

These tips are taken from Kevin Neufeld's presentation "Tips for the - PostGIS Power User" at the FOSS4G 2007 conference. Depending on your - use of PostGIS (for example, static data and complex analysis vs frequently - updated data and lots of users) these changes can provide significant - speedups to your queries.

For a more tips (and better formatting), the original presentation - is at - - http://2007.foss4g.org/presentations/view.php?abstract_id=117. -

6.4.1. Startup

- These settings are configured in postgresql.conf: -

- checkpoint_segment_size - (this setting is obsolete in newer versions of PostgreSQL) got replaced with - many configurations with names starting with checkpoint and WAL. -

  • - # of WAL files = 16MB each; default is 3 -

  • - Set to at least 10 or 30 for databases with heavy write activity, or - more for large database loads. Another article on the topic worth reading Greg Smith: Checkpoint and Background writer -

  • - Possibly store the xlog on a separate disk device -

- constraint_exclusion -

  • - Default: off (prior to PostgreSQL 8.4 and for PostgreSQL 8.4+ is set to partition) -

  • - This is generally used for table partitioning. If you are running PostgreSQL versions below 8.4, set to "on" to ensure the query planner will optimize as desired. - As of PostgreSQL 8.4, the default for this is set to "partition" which is ideal for PostgreSQL 8.4 and above since - it will force the planner to only analyze tables for constraint consideration if they are in an inherited hierarchy - and not pay the planner penalty otherwise. -

- shared_buffers -

  • - Default: ~32MB -

  • - Set to about 1/3 to 3/4 of available RAM -

6.4.2. Runtime

- work_mem (the memory used for sort operations and complex queries) -

  • - Default: 1MB -

  • - Adjust up for large dbs, complex queries, lots of RAM -

  • - Adjust down for many concurrent users or low RAM. -

  • - If you have lots of RAM and few developers: -

    -                    SET work_mem TO 1200000;
    -                

    -

- maintenance_work_mem (used for VACUUM, CREATE INDEX, etc.) -

  • - Default: 16MB -

  • - Generally too low - ties up I/O, locks objects while swapping memory -

  • - Recommend 32MB to 256MB on production servers w/lots of RAM, but depends - on the # of concurrent users. If you have lots of RAM and few developers: -

    -                    SET maintainence_work_mem TO 1200000;
    -                

    -

Chapter 7. PostGIS Reference

The functions given below are the ones which a user of PostGIS is - likely to need. There are other functions which are required support - functions to the PostGIS objects which are not of use to a general - user.

[Note]

PostGIS has begun a transition from the existing naming convention - to an SQL-MM-centric convention. As a result, most of the functions that - you know and love have been renamed using the standard spatial type (ST) - prefix. Previous functions are still available, though are not listed in - this document where updated functions are equivalent. The non ST_ functions not listed in this documentation are - deprecated and will be removed in a future release so STOP USING THEM.

7.1. PostgreSQL PostGIS Types

Abstract

This section lists the PostgreSQL data types installed by PostGIS. Note we describe the casting behavior of these which is very - important especially when designing your own functions. -

A Cast is when one type is coerced into another type. PostgreSQL - is unique from most databases in that it allows you to define casting behavior for custom types and the functions used for casting. - A cast can be specified as automatic in which case, you do not have to do a CAST(myfoo As otherfootype) or myfoo::otherfootype - if you are feeding it to a function that only works with otherfootype and there is an automatic cast in place for it. -

The danger of relying on automatic cast behavior is when you have an overloaded function say one that takes a box2d and one that takes a box3d - but no geometry. What happens is that both functions are equally good to use with geometry since geometry has an autocast for both - -- so you end up with an ambiguous function error. To force PostgreSQL to choose, you do a CAST(mygeom As box3d) or mygeom::box3d.

[Note]
At least as of PostgreSQL 8.3 - Everything can be CAST to text (presumably because of the magical unknown type), so no defined CASTS for that need to be present for you to CAST an object to text.
box2d — A box composed of x min, ymin, xmax, ymax. Often used to return the 2d enclosing box of a geometry.
box3d — A box composed of x min, ymin, zmin, xmax, ymax, zmax. Often used to return the 3d extent of a geometry or collection of geometries.
box3d_extent — A box composed of x min, ymin, zmin, xmax, ymax, zmax. Often used to return the extent of a geometry.
geometry — Planar spatial data type.
geometry_dump — A spatial datatype with two fields - geom (holding a geometry object) - and path[] (a 1-d array holding the position of the geometry within the dumped object.)
geography — Ellipsoidal spatial data type.

Name

box2d — A box composed of x min, ymin, xmax, ymax. Often used to return the 2d enclosing box of a geometry.

Description

box2d is a spatial data type used to represent the enclosing box of a geometry or set of geometries. ST_Extent in earlier versions prior to PostGIS 1.4 would return a box2d.


Name

box3d — A box composed of x min, ymin, zmin, xmax, ymax, zmax. Often used to return the 3d extent of a geometry or collection of geometries.

Description

box3d is a postgis spatial data type used to represent the enclosing box of a geometry or set of geometries. ST_Extent3D returns a box3d object.

Casting Behavor

This section lists the automatic as well as explicit casts allowed for this data type

Cast ToBehavior
boxautomatic
box2dautomatic
geometryautomatic

Name

box3d_extent — A box composed of x min, ymin, zmin, xmax, ymax, zmax. Often used to return the extent of a geometry.

Description

box3d_extent is a data type returned by ST_Extent. In versions prior to PostGIS 1.4, ST_Extent would return a box2d.

Casting Behavor

This section lists the automatic as well as explicit casts allowed for this data type

Cast ToBehavior
box2dautomatic
box3dautomatic
geometryautomatic

Name

geometry — Planar spatial data type.

Description

geometry is a fundamental postgis spatial data type used to represent a feature in the Euclidean coordinate system.

Casting Behavor

This section lists the automatic as well as explicit casts allowed for this data type

Cast ToBehavior
boxautomatic
box2dautomatic
box3dautomatic
byteaautomatic
geographyautomatic
textautomatic

Name

geometry_dump — A spatial datatype with two fields - geom (holding a geometry object) - and path[] (a 1-d array holding the position of the geometry within the dumped object.)

Description

geometry_dump is a compound data type consisting of a geometry object referenced by the .geom field - and path[] a 1-dimensional integer array (starting at 1 e.g. path[1] to get first element) array that defines the navigation path within the dumped geometry to find this element. - It is used by the ST_Dump* family of functions as an output type to explode a more complex geometry into its - constituent parts and location of parts.


Name

geography — Ellipsoidal spatial data type.

Description

geography is a spatial data type used to represent a feature in the round-earth coordinate system.

Casting Behavor

This section lists the automatic as well as explicit casts allowed for this data type

Cast ToBehavior
geometryexplicit

7.2. Management Functions

AddGeometryColumn — Adds a geometry column to an existing table of - attributes.
DropGeometryColumn — Removes a geometry column from a spatial - table.
DropGeometryTable — Drops a table and all its references in - geometry_columns.
PostGIS_Full_Version — Reports full postgis version and build configuration - infos.
PostGIS_GEOS_Version — Returns the version number of the GEOS - library.
PostGIS_LibXML_Version — Returns the version number of the libxml2 - library.
PostGIS_Lib_Build_Date — Returns build date of the PostGIS library.
PostGIS_Lib_Version — Returns the version number of the PostGIS - library.
PostGIS_PROJ_Version — Returns the version number of the PROJ4 - library.
PostGIS_Scripts_Build_Date — Returns build date of the PostGIS scripts.
PostGIS_Scripts_Installed — Returns version of the postgis scripts installed in this - database.
PostGIS_Scripts_Released — Returns the version number of the postgis.sql script - released with the installed postgis lib.
PostGIS_Uses_Stats — Returns TRUE if STATS usage has been - enabled.
PostGIS_Version — Returns PostGIS version number and compile-time - options.
Populate_Geometry_Columns — Ensures geometry columns have appropriate spatial constraints - and exist in the geometry_columns table.
Probe_Geometry_Columns — Scans all tables with PostGIS geometry constraints and adds them to the geometry_columns - table if they are not there.
UpdateGeometrySRID — Updates the SRID of all features in a geometry - column, geometry_columns metadata and srid table constraint

Name

AddGeometryColumn — Adds a geometry column to an existing table of - attributes.

Synopsis

text AddGeometryColumn(varchar - table_name, varchar - column_name, integer - srid, varchar - type, integer - dimension);

text AddGeometryColumn(varchar - schema_name, varchar - table_name, varchar - column_name, integer - srid, varchar - type, integer - dimension);

text AddGeometryColumn(varchar - catalog_name, varchar - schema_name, varchar - table_name, varchar - column_name, integer - srid, varchar - type, integer - dimension);

Description

Adds a geometry column to an existing table of attributes. The - schema_name is the name of the table schema (unused - for pre-schema PostgreSQL installations). The srid - must be an integer value reference to an entry in the SPATIAL_REF_SYS - table. The type must be an uppercase string - corresponding to the geometry type, eg, 'POLYGON' or - 'MULTILINESTRING'. An error is thrown if the schemaname doesn't exist - (or not visible in the current search_path) or the specified SRID, - geometry type, or dimension is invalid.

[Note]

Views and derivatively created spatial tables will need to be registered in geometry_columns manually, - since AddGeometryColumn also adds a spatial column which is not needed when you already have a spatial column. Refer to Section 4.3.4, “Manually Registering Geometry Columns in geometry_columns”. -

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1.

- This function supports 3d and will not drop the z-index.

- This method supports Circular Strings and Curves

Examples

--- Create a new simple PostgreSQL table
-postgis=# CREATE TABLE my_schema.my_spatial_table (id serial);
-
--- Describing the table shows a simple table with a single "id" column.
-postgis=# \d my_schema.my_spatial_table
-							 Table "my_schema.my_spatial_table"
- Column |  Type   |                                Modifiers
---------+---------+-------------------------------------------------------------------------
- id     | integer | not null default nextval('my_schema.my_spatial_table_id_seq'::regclass)
-
--- Add a spatial column to the table
-postgis=# SELECT AddGeometryColumn ('my_schema','my_spatial_table','the_geom',4326,'POINT',2);
-
---Add a curvepolygon
-SELECT AddGeometryColumn ('my_schema','my_spatial_table','the_geomcp',4326,'CURVEPOLYGON',2);
-
--- Describe the table again reveals the addition of a new "the_geom" column.
-postgis=# \d my_schema.my_spatial_table
-   Column   |   Type   |                                Modifiers
-
-------------+----------+-------------------------------------------------------------------------
- id         | integer  | not null default nextval('my_schema.my_spatial_table_id_seq'::regclass)
- the_geom   | geometry |
- the_geomcp | geometry |
-Check constraints:
-	"enforce_dims_the_geom" CHECK (ndims(the_geom) = 2)
-	"enforce_dims_the_geomcp" CHECK (ndims(the_geomcp) = 2)
-	"enforce_geotype_the_geom" CHECK (geometrytype(the_geom) = 'POINT'::text OR
-the_geom IS NULL)
-	"enforce_geotype_the_geomcp" CHECK (geometrytype(the_geomcp) = 'CURVEPOLYGON
-'::text OR the_geomcp IS NULL)
-	"enforce_srid_the_geom" CHECK (srid(the_geom) = 4326)
-	"enforce_srid_the_geomcp" CHECK (srid(the_geomcp) = 4326)

Name

DropGeometryColumn — Removes a geometry column from a spatial - table.

Synopsis

text DropGeometryColumn(varchar - table_name, varchar - column_name);

text DropGeometryColumn(varchar - schema_name, varchar - table_name, varchar - column_name);

text DropGeometryColumn(varchar - catalog_name, varchar - schema_name, varchar - table_name, varchar - column_name);

Description

Removes a geometry column from a spatial table. Note that - schema_name will need to match the f_table_schema field of the table's - row in the geometry_columns table.

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1.

- This function supports 3d and will not drop the z-index.

- This method supports Circular Strings and Curves

Examples

-			SELECT DropGeometryColumn ('my_schema','my_spatial_table','the_geomcp');
-			----RESULT output ---
-			my_schema.my_spatial_table.the_geomcp effectively removed.
-		

Name

DropGeometryTable — Drops a table and all its references in - geometry_columns.

Synopsis

boolean DropGeometryTable(varchar - table_name);

boolean DropGeometryTable(varchar - schema_name, varchar - table_name);

boolean DropGeometryTable(varchar - catalog_name, varchar - schema_name, varchar - table_name);

Description

Drops a table and all its references in geometry_columns. Note: - uses current_schema() on schema-aware pgsql installations if schema is - not provided.

Examples

-			SELECT DropGeometryTable ('my_schema','my_spatial_table');
-			----RESULT output ---
-			my_schema.my_spatial_table dropped.
-		

Name

PostGIS_Full_Version — Reports full postgis version and build configuration - infos.

Synopsis

text PostGIS_Full_Version();

Description

Reports full postgis version and build configuration - infos.

Examples

SELECT PostGIS_Full_Version();
-							   postgis_full_version
-----------------------------------------------------------------------------------
- POSTGIS="1.3.3" GEOS="3.1.0-CAPI-1.5.0" PROJ="Rel. 4.4.9, 29 Oct 2004" USE_STATS
-(1 row)

Name

PostGIS_GEOS_Version — Returns the version number of the GEOS - library.

Synopsis

text PostGIS_GEOS_Version();

Description

Returns the version number of the GEOS library, or - NULL if GEOS support is not enabled.

Examples

SELECT PostGIS_GEOS_Version();
- postgis_geos_version
-----------------------
- 3.1.0-CAPI-1.5.0
-(1 row)

Name

PostGIS_LibXML_Version — Returns the version number of the libxml2 - library.

Synopsis

text PostGIS_LibXML_Version();

Description

Returns the version number of the LibXML2 library.

Availability: 1.5

Examples

SELECT PostGIS_LibXML_Version();
- postgis_libxml_version
-----------------------
- 2.7.6
-(1 row)

Name

PostGIS_Lib_Build_Date — Returns build date of the PostGIS library.

Synopsis

text PostGIS_Lib_Build_Date();

Description

Returns build date of the PostGIS library.

Examples

SELECT PostGIS_Lib_Build_Date();
- postgis_lib_build_date
-------------------------
- 2008-06-21 17:53:21
-(1 row)

Name

PostGIS_Lib_Version — Returns the version number of the PostGIS - library.

Synopsis

text PostGIS_Lib_Version();

Description

Returns the version number of the PostGIS library.

Examples

SELECT PostGIS_Lib_Version();
- postgis_lib_version
----------------------
- 1.3.3
-(1 row)

Name

PostGIS_PROJ_Version — Returns the version number of the PROJ4 - library.

Synopsis

text PostGIS_PROJ_Version();

Description

Returns the version number of the PROJ4 library, or - NULL if PROJ4 support is not enabled.

Examples

SELECT PostGIS_PROJ_Version();
-  postgis_proj_version
--------------------------
- Rel. 4.4.9, 29 Oct 2004
-(1 row)

Name

PostGIS_Scripts_Build_Date — Returns build date of the PostGIS scripts.

Synopsis

text PostGIS_Scripts_Build_Date();

Description

Returns build date of the PostGIS scripts.

Availability: 1.0.0RC1

Examples

SELECT PostGIS_Scripts_Build_Date();
-  postgis_scripts_build_date
--------------------------
- 2007-08-18 09:09:26
-(1 row)

Name

PostGIS_Scripts_Installed — Returns version of the postgis scripts installed in this - database.

Synopsis

text PostGIS_Scripts_Installed();

Description

Returns version of the postgis scripts installed in this - database.

[Note]

If the output of this function doesn't match the output of - PostGIS_Scripts_Released - you probably missed to properly upgrade an existing database. - See the Upgrading section for - more info.

Availability: 0.9.0

Examples

SELECT PostGIS_Scripts_Installed();
-  postgis_scripts_installed
--------------------------
- 1.5.0SVN
-(1 row)

Name

PostGIS_Scripts_Released — Returns the version number of the postgis.sql script - released with the installed postgis lib.

Synopsis

text PostGIS_Scripts_Released();

Description

Returns the version number of the postgis.sql script - released with the installed postgis lib.

[Note]

Starting with version 1.1.0 this function returns the same - value of PostGIS_Lib_Version. Kept - for backward compatibility.

Availability: 0.9.0

Examples

SELECT PostGIS_Scripts_Released();
-  postgis_scripts_released
--------------------------
- 1.3.4SVN
-(1 row)

Name

PostGIS_Uses_Stats — Returns TRUE if STATS usage has been - enabled.

Synopsis

text PostGIS_Uses_Stats();

Description

Returns TRUE if STATS usage has been enabled, - FALSE otherwise.

Examples

SELECT PostGIS_Uses_Stats();
- postgis_uses_stats
---------------------
- t
-(1 row)

Name

PostGIS_Version — Returns PostGIS version number and compile-time - options.

Synopsis

text PostGIS_Version();

Description

Returns PostGIS version number and compile-time options.

Examples

SELECT PostGIS_Version();
-			postgis_version
----------------------------------------
- 1.3 USE_GEOS=1 USE_PROJ=1 USE_STATS=1
-(1 row)

Name

Populate_Geometry_Columns — Ensures geometry columns have appropriate spatial constraints - and exist in the geometry_columns table.

Synopsis

text Populate_Geometry_Columns();

int Populate_Geometry_Columns(oid relation_oid);

Description

Ensures geometry columns have appropriate spatial constraints and - exist in the geometry_columns table. In particular, - this means that every geometry column belonging to a table has at least - three constraints:

  • enforce_dims_the_geom - ensures every - geometry has the same dimension (see ST_NDims)

  • enforce_geotype_the_geom - ensures every - geometry is of the same type (see GeometryType)

  • enforce_srid_the_geom - ensures every - geometry is in the same projection (see ST_SRID)

If a table oid is provided, this function - tries to determine the srid, dimension, and geometry type of all - geometry columns in the table, adding contraints as necessary. If - successful, an appropriate row is inserted into the geometry_columns - table, otherwise, the exception is caught and an error notice is raised - describing the problem.

If the oid of a view is provided, as with a - table oid, this function tries to determine the srid, dimension, and - type of all the geometries in the view, inserting appropriate entries - into the geometry_columns table, but nothing is done - to enforce contraints.

The parameterless variant is a simple wrapper for the parameterized - variant that first truncates and repopulates the geometry_columns table - for every spatial table and view in the database, adding spatial - contraints to tables where appropriate. It returns a summary of the - number of geometry columns detected in the database and the number that - were inserted into the geometry_columns table. The - parameterized version simply returns the number of rows inserted into - the geometry_columns table.

Availability: 1.4.0

Examples

SELECT Populate_Geometry_Columns('public.myspatial_table'::regclass);

Name

Probe_Geometry_Columns — Scans all tables with PostGIS geometry constraints and adds them to the geometry_columns - table if they are not there.

Synopsis

text Probe_Geometry_Columns();

Description

Scans all tables with PostGIS geometry constraints and adds them to the geometry_columns - table if they are not there. Also give stats on number of inserts and already present or possibly obsolete.

[Note]

This will usually only pick up records added by AddGeometryColumn() function. It will not scan views so views - will need to be manually added to geometry_columns table.

Examples

SELECT Probe_Geometry_Columns();
-			probe_geometry_columns
----------------------------------------
-probed:6 inserted:0 conflicts:6 stale:0
-(1 row)

Name

UpdateGeometrySRID — Updates the SRID of all features in a geometry - column, geometry_columns metadata and srid table constraint

Synopsis

text UpdateGeometrySRID(varchar - table_name, varchar - column_name, integer - srid);

text UpdateGeometrySRID(varchar - schema_name, varchar - table_name, varchar - column_name, integer - srid);

text UpdateGeometrySRID(varchar - catalog_name, varchar - schema_name, varchar - table_name, varchar - column_name, integer - srid);

Description

Updates the SRID of all features in a geometry column, updating - constraints and reference in geometry_columns. Note: uses - current_schema() on schema-aware pgsql installations if schema is not - provided.

- This function supports 3d and will not drop the z-index.

- This method supports Circular Strings and Curves

See Also

ST_SetSRID

7.3. Geometry Constructors

ST_BdPolyFromText — Construct a Polygon given an arbitrary collection of closed - linestrings as a MultiLineString Well-Known text representation.
ST_BdMPolyFromText — Construct a MultiPolygon given an arbitrary collection of - closed linestrings as a MultiLineString text - representation Well-Known text representation.
ST_GeogFromText — Return a specified geography value from Well-Known Text representation or extended (WKT).
ST_GeographyFromText — Return a specified geography value from Well-Known Text representation or extended (WKT).
ST_GeogFromWKB — Creates a geography instance from a Well-Known Binary geometry - representation (WKB) or extended Well Known Binary (EWKB).
ST_GeomCollFromText — Makes a collection Geometry from collection WKT with the given SRID. If SRID is - not give, it defaults to -1.
ST_GeomFromEWKB — Return a specified ST_Geometry value from Extended Well-Known Binary representation (EWKB).
ST_GeomFromEWKT — Return a specified ST_Geometry value from Extended Well-Known Text representation (EWKT).
ST_GeometryFromText — Return a specified ST_Geometry value from Well-Known Text representation (WKT). This is an alias name for ST_GeomFromText
ST_GeomFromGML — Takes as input GML representation of geometry and outputs a PostGIS geometry object
ST_GeomFromKML — Takes as input KML representation of geometry and outputs a PostGIS geometry object
ST_GMLToSQL — Return a specified ST_Geometry value from GML representation. This is an alias name for ST_GeomFromGML
ST_GeomFromText — Return a specified ST_Geometry value from Well-Known Text representation (WKT).
ST_GeomFromWKB — Creates a geometry instance from a Well-Known Binary geometry - representation (WKB) and optional SRID.
ST_LineFromMultiPoint — Creates a LineString from a MultiPoint geometry.
ST_LineFromText — Makes a Geometry from WKT representation with the given SRID. If SRID is - not given, it defaults to -1.
ST_LineFromWKB — Makes a LINESTRING from WKB with the given SRID
ST_LinestringFromWKB — Makes a geometry from WKB with the given SRID.
ST_MakeBox2D — Creates a BOX2D defined by the given point - geometries.
ST_MakeBox3D — Creates a BOX3D defined by the given 3d point - geometries.
ST_MakeLine — Creates a Linestring from point geometries.
ST_MakeEnvelope — Creates a rectangular Polygon formed from the given minimums and maximums. Input - values must be in SRS specified by the SRID.
ST_MakePolygon — Creates a Polygon formed by the given shell. Input - geometries must be closed LINESTRINGS.
ST_MakePoint — Creates a 2D,3DZ or 4D point geometry.
ST_MakePointM — Creates a point geometry with an x y and m coordinate.
ST_MLineFromText — Return a specified ST_MultiLineString value from WKT representation.
ST_MPointFromText — Makes a Geometry from WKT with the given SRID. If SRID is - not give, it defaults to -1.
ST_MPolyFromText — Makes a MultiPolygon Geometry from WKT with the given SRID. If SRID is - not give, it defaults to -1.
ST_Point — Returns an ST_Point with the given coordinate values. OGC alias for ST_MakePoint.
ST_PointFromText — Makes a point Geometry from WKT with the given SRID. If SRID is - not given, it defaults to unknown.
ST_PointFromWKB — Makes a geometry from WKB with the given SRID
ST_Polygon — Returns a polygon built from the specified linestring and SRID.
ST_PolygonFromText — Makes a Geometry from WKT with the given SRID. If SRID is - not give, it defaults to -1.
ST_WKBToSQL — Return a specified ST_Geometry value from Well-Known Binary representation (WKB). This is an alias name for ST_GeomFromWKB that takes no srid
ST_WKTToSQL — Return a specified ST_Geometry value from Well-Known Text representation (WKT). This is an alias name for ST_GeomFromText

Name

ST_BdPolyFromText — Construct a Polygon given an arbitrary collection of closed - linestrings as a MultiLineString Well-Known text representation.

Synopsis

geometry ST_BdPolyFromText(text WKT, integer srid);

Description

Construct a Polygon given an arbitrary collection of closed - linestrings as a MultiLineString Well-Known text representation.

[Note]

Throws an error if WKT is not a MULTILINESTRING. Throws an - error if output is a MULTIPOLYGON; use ST_BdMPolyFromText in that case, or - see ST_BuildArea() for a - postgis-specific approach.

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1. s3.2.6.2

Availability: 1.1.0 - requires GEOS >= 2.1.0.

Examples

Forthcoming

Name

ST_BdMPolyFromText — Construct a MultiPolygon given an arbitrary collection of - closed linestrings as a MultiLineString text - representation Well-Known text representation.

Synopsis

geometry ST_BdMPolyFromText(text WKT, integer srid);

Description

Construct a Polygon given an arbitrary collection of closed - linestrings, polygons, MultiLineStrings as Well-Known text representation.

[Note]

Throws an error if WKT is not a MULTILINESTRING. Forces - MULTIPOLYGON output even when result is really only composed by a - single POLYGON; use ST_BdPolyFromText if you're sure a - single POLYGON will result from operation, or see ST_BuildArea() for a postgis-specific - approach.

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1. s3.2.6.2

Availability: 1.1.0 - requires GEOS >= 2.1.0.

Examples

Forthcoming

Name

ST_GeogFromText — Return a specified geography value from Well-Known Text representation or extended (WKT).

Synopsis

geography ST_GeogFromText(text EWKT);

Description

Returns a geography object from the well-known text or extended well-known representation. SRID 4326 is assumed. This - is an alias for ST_GeographyFromText

Examples

---- converting lon lat coords to geography
-ALTER TABLE sometable ADD COLUMN geog geography(POINT,4326);
-UPDATE sometable SET geog = ST_GeogFromText('SRID=4326;POINT(' || lon || ' ' || lat || ')');		
-			

Name

ST_GeographyFromText — Return a specified geography value from Well-Known Text representation or extended (WKT).

Synopsis

geography ST_GeographyFromText(text EWKT);

Description

Returns a geography object from the well-known text representation. SRID 4326 is assumed.

See Also

ST_AsText


Name

ST_GeogFromWKB — Creates a geography instance from a Well-Known Binary geometry - representation (WKB) or extended Well Known Binary (EWKB).

Synopsis

geography ST_GeogFromWKB(bytea geom);

Description

The ST_GeogFromWKB function, takes a well-known - binary representation (WKB) of a geometry or PostGIS Extended WKB and creates an instance of the appropriate - geography type. This function plays the role of the Geometry Factory in - SQL.

If SRID is not specified, it defaults to 4326 (WGS 84 long lat).

- This method supports Circular Strings and Curves

Examples

--Although bytea rep contains single \, these need to be escaped when inserting into a table
-SELECT ST_AsText(
-ST_GeogFromWKB(E'\\001\\002\\000\\000\\000\\002\\000\\000\\000\\037\\205\\353Q\\270~\\\\\\300\\323Mb\\020X\\231C@\\020X9\\264\\310~\\\\\\300)\\\\\\217\\302\\365\\230C@')
-);
-					  st_astext
-------------------------------------------------------
- LINESTRING(-113.98 39.198,-113.981 39.195)
-(1 row)
-
-

Name

ST_GeomCollFromText — Makes a collection Geometry from collection WKT with the given SRID. If SRID is - not give, it defaults to -1.

Synopsis

geometry ST_GeomCollFromText(text WKT, integer srid);

geometry ST_GeomCollFromText(text WKT);

Description

Makes a collection Geometry from the Well-Known-Text (WKT) representation with the given SRID. If SRID is - not give, it defaults to -1.

OGC SPEC 3.2.6.2 - option SRID is from the conformance suite

Returns null if the WKT is not a GEOMETRYCOLLECTION

[Note]

If you are absolutely sure all your WKT geometries are collections, don't use this function. - It is slower than ST_GeomFromText since it adds an additional validation step. -

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1. s3.2.6.2

This method implements the SQL/MM specification.

Examples

SELECT ST_GeomCollFromText('GEOMETRYCOLLECTION(POINT(1 2),LINESTRING(1 2, 3 4))');
-

Name

ST_GeomFromEWKB — Return a specified ST_Geometry value from Extended Well-Known Binary representation (EWKB).

Synopsis

geometry ST_GeomFromEWKB(bytea EWKB);

Description

Constructs a PostGIS ST_Geometry object from the OGC Extended Well-Known binary (EWKT) representation.

[Note]

The EWKB format is not an OGC standard, but a PostGIS specific format that includes the spatial reference system (SRID) - identifier

- This function supports 3d and will not drop the z-index.

- This method supports Circular Strings and Curves

Examples

line string binary rep 0f - LINESTRING(-71.160281 42.258729,-71.160837 42.259113,-71.161144 42.25932) in NAD 83 long lat (4269).

[Note]

NOTE: Even though byte arrays are delimited with \ and may have ', we need to escape both out with \ and ''. So it does not - look exactly like its AsEWKB representation.

SELECT ST_GeomFromEWKB(E'\\001\\002\\000\\000 \\255\\020\\000\\000\\003\\000\\000\\000\\344J=
-\\013B\\312Q\\300n\\303(\\010\\036!E@''\\277E''K
-\\312Q\\300\\366{b\\235*!E@\\225|\\354.P\\312Q
-\\300p\\231\\323e1!E@');

Name

ST_GeomFromEWKT — Return a specified ST_Geometry value from Extended Well-Known Text representation (EWKT).

Synopsis

geometry ST_GeomFromEWKT(text EWKT);

Description

Constructs a PostGIS ST_Geometry object from the OGC Extended Well-Known text (EWKT) representation.

[Note]

The EWKT format is not an OGC standard, but an PostGIS specific format that includes the spatial reference system (SRID) - identifier

- This function supports 3d and will not drop the z-index.

- This method supports Circular Strings and Curves

Examples

SELECT ST_GeomFromEWKT('SRID=4269;LINESTRING(-71.160281 42.258729,-71.160837 42.259113,-71.161144 42.25932)');
-SELECT ST_GeomFromEWKT('SRID=4269;MULTILINESTRING((-71.160281 42.258729,-71.160837 42.259113,-71.161144 42.25932))');
-
-SELECT ST_GeomFromEWKT('SRID=4269;POINT(-71.064544 42.28787)');
-
-SELECT ST_GeomFromEWKT('SRID=4269;POLYGON((-71.1776585052917 42.3902909739571,-71.1776820268866 42.3903701743239,
--71.1776063012595 42.3903825660754,-71.1775826583081 42.3903033653531,-71.1776585052917 42.3902909739571))');
-
-SELECT ST_GeomFromEWKT('SRID=4269;MULTIPOLYGON(((-71.1031880899493 42.3152774590236,
--71.1031627617667 42.3152960829043,-71.102923838298 42.3149156848307,
--71.1023097974109 42.3151969047397,-71.1019285062273 42.3147384934248,
--71.102505233663 42.3144722937587,-71.10277487471 42.3141658254797,
--71.103113945163 42.3142739188902,-71.10324876416 42.31402489987,
--71.1033002961013 42.3140393340215,-71.1033488797549 42.3139495090772,
--71.103396240451 42.3138632439557,-71.1041521907712 42.3141153348029,
--71.1041411411543 42.3141545014533,-71.1041287795912 42.3142114839058,
--71.1041188134329 42.3142693656241,-71.1041112482575 42.3143272556118,
--71.1041072845732 42.3143851580048,-71.1041057218871 42.3144430686681,
--71.1041065602059 42.3145009876017,-71.1041097995362 42.3145589148055,
--71.1041166403905 42.3146168544148,-71.1041258822717 42.3146748022936,
--71.1041375307579 42.3147318674446,-71.1041492906949 42.3147711126569,
--71.1041598612795 42.314808571739,-71.1042515013869 42.3151287620809,
--71.1041173835118 42.3150739481917,-71.1040809891419 42.3151344119048,
--71.1040438678912 42.3151191367447,-71.1040194562988 42.3151832057859,
--71.1038734225584 42.3151140942995,-71.1038446938243 42.3151006300338,
--71.1038315271889 42.315094347535,-71.1037393329282 42.315054824985,
--71.1035447555574 42.3152608696313,-71.1033436658644 42.3151648370544,
--71.1032580383161 42.3152269126061,-71.103223066939 42.3152517403219,
--71.1031880899493 42.3152774590236)),
-((-71.1043632495873 42.315113108546,-71.1043583974082 42.3151211109857,
--71.1043443253471 42.3150676015829,-71.1043850704575 42.3150793250568,-71.1043632495873 42.315113108546)))');
-
---3d circular string
-SELECT ST_GeomFromEWKT('CIRCULARSTRING(220268 150415 1,220227 150505 2,220227 150406 3)');
-	

Name

ST_GeometryFromText — Return a specified ST_Geometry value from Well-Known Text representation (WKT). This is an alias name for ST_GeomFromText

Synopsis

geometry ST_GeometryFromText(text WKT);

geometry ST_GeometryFromText(text WKT, integer srid);

Description

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1.

This method implements the SQL/MM specification. SQL-MM 3: 5.1.40


Name

ST_GeomFromGML — Takes as input GML representation of geometry and outputs a PostGIS geometry object

Synopsis

geometry ST_GeomFromGML(text geomgml);

Description

Constructs a PostGIS ST_Geometry object from the OGC GML representation.

ST_GeomFromGML works only for GML Geometry fragments. It throws an error if you try to use it on a whole GML document.

- OGC GML versions supported: -

  • GML 3.2.1 Namespace

  • GML 3.1.1 Simple Features profile SF-2 (with GML 3.1.0 and 3.0.0 backward compatibility)

  • GML 2.1.2

- OGC GML standards, cf: http://www.opengeospatial.org/standards/gml: -

Availability: 1.5

- This function supports 3d and will not drop the z-index.

GML allow mixed dimensions (2D and 3D inside the same MultiGeometry for instance). As PostGIS geometries don't, ST_GeomFromGML convert the whole geometry to 2D if a missing Z dimension is found once.

GML support mixed SRS inside the same MultiGeometry. As PostGIS geometries don't, ST_GeomFromGML, in this case, reproject all subgeometries to the SRS root node. If no srsName attribute available for the GML root node, the function throw an error.

ST_GeomFromGML function is not pedantic about an explicit GML namespace. You could avoid to mention it explicitly for common usages. But you need it if you want to use XLink feature inside GML.

[Note]

ST_GeomFromGML function not support SQL/MM curves geometries.

Examples - A single geometry with srsName

SELECT ST_GeomFromGML('
-		<gml:LineString srsName="EPSG:4269">
-			<gml:coordinates>
-				-71.16028,42.258729 -71.160837,42.259112 -71.161143,42.25932
-			</gml:coordinates>
-		</gml:LineString>');
-		

Examples - XLink usage

ST_GeomFromGML('
-		<gml:LineString xmlns:gml="http://www.opengis.net/gml" 
-				xmlns:xlink="http://www.w3.org/1999/xlink"
-				srsName="urn:ogc:def:crs:EPSG::4269">
-			<gml:pointProperty>
-				<gml:Point gml:id="p1"><gml:pos>42.258729 -71.16028</gml:pos></gml:Point>
-			</gml:pointProperty>
-			<gml:pos>42.259112 -71.160837</gml:pos>
-			<gml:pointProperty>
-				<gml:Point xlink:type="simple" xlink:href="#p1"/>
-			</gml:pointProperty>
-		</gml:LineString>'););
-		

Name

ST_GeomFromKML — Takes as input KML representation of geometry and outputs a PostGIS geometry object

Synopsis

geometry ST_GeomFromKML(text geomkml);

Description

Constructs a PostGIS ST_Geometry object from the OGC KML representation.

ST_GeomFromKML works only for KML Geometry fragments. It throws an error if you try to use it on a whole KML document.

- OGC KML versions supported: -

  • KML 2.2.0 Namespace

- OGC KML standards, cf: http://www.opengeospatial.org/standards/kml: -

Availability: 1.5

- This function supports 3d and will not drop the z-index.

[Note]

ST_GeomFromKML function not support SQL/MM curves geometries.

Examples - A single geometry with srsName

SELECT ST_GeomFromKML('
-		<LineString>
-			<coordinates>-71.1663,42.2614 
-				-71.1667,42.2616</coordinates>
-		</LineString>');
-		

See Also

ST_AsKML


Name

ST_GMLToSQL — Return a specified ST_Geometry value from GML representation. This is an alias name for ST_GeomFromGML

Synopsis

geometry ST_GMLToSQL(text geomgml);

Description

This method implements the SQL/MM specification. SQL-MM 3: 5.1.50 (except for curves support).

Availability: 1.5


Name

ST_GeomFromText — Return a specified ST_Geometry value from Well-Known Text representation (WKT).

Synopsis

geometry ST_GeomFromText(text WKT);

geometry ST_GeomFromText(text WKT, integer srid);

Description

Constructs a PostGIS ST_Geometry object from the OGC Well-Known text representation.

[Note]

There are 2 variants of ST_GeomFromText function, the first takes no SRID and returns a geometry - with no defined spatial reference system. The second takes a spatial reference id as the second argument - and returns an ST_Geometry that includes this srid as part of its meta-data. The srid must be defined - in the spatial_ref_sys table.

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1. s3.2.6.2 - option SRID is from the conformance suite.

This method implements the SQL/MM specification. SQL-MM 3: 5.1.40

- This method supports Circular Strings and Curves

Examples

SELECT ST_GeomFromText('LINESTRING(-71.160281 42.258729,-71.160837 42.259113,-71.161144 42.25932)');
-SELECT ST_GeomFromText('LINESTRING(-71.160281 42.258729,-71.160837 42.259113,-71.161144 42.25932)',4269);
-
-SELECT ST_GeomFromText('MULTILINESTRING((-71.160281 42.258729,-71.160837 42.259113,-71.161144 42.25932))');
-
-SELECT ST_GeomFromText('POINT(-71.064544 42.28787)');
-
-SELECT ST_GeomFromText('POLYGON((-71.1776585052917 42.3902909739571,-71.1776820268866 42.3903701743239,
--71.1776063012595 42.3903825660754,-71.1775826583081 42.3903033653531,-71.1776585052917 42.3902909739571))');
-
-SELECT ST_GeomFromText('MULTIPOLYGON(((-71.1031880899493 42.3152774590236,
--71.1031627617667 42.3152960829043,-71.102923838298 42.3149156848307,
--71.1023097974109 42.3151969047397,-71.1019285062273 42.3147384934248,
--71.102505233663 42.3144722937587,-71.10277487471 42.3141658254797,
--71.103113945163 42.3142739188902,-71.10324876416 42.31402489987,
--71.1033002961013 42.3140393340215,-71.1033488797549 42.3139495090772,
--71.103396240451 42.3138632439557,-71.1041521907712 42.3141153348029,
--71.1041411411543 42.3141545014533,-71.1041287795912 42.3142114839058,
--71.1041188134329 42.3142693656241,-71.1041112482575 42.3143272556118,
--71.1041072845732 42.3143851580048,-71.1041057218871 42.3144430686681,
--71.1041065602059 42.3145009876017,-71.1041097995362 42.3145589148055,
--71.1041166403905 42.3146168544148,-71.1041258822717 42.3146748022936,
--71.1041375307579 42.3147318674446,-71.1041492906949 42.3147711126569,
--71.1041598612795 42.314808571739,-71.1042515013869 42.3151287620809,
--71.1041173835118 42.3150739481917,-71.1040809891419 42.3151344119048,
--71.1040438678912 42.3151191367447,-71.1040194562988 42.3151832057859,
--71.1038734225584 42.3151140942995,-71.1038446938243 42.3151006300338,
--71.1038315271889 42.315094347535,-71.1037393329282 42.315054824985,
--71.1035447555574 42.3152608696313,-71.1033436658644 42.3151648370544,
--71.1032580383161 42.3152269126061,-71.103223066939 42.3152517403219,
--71.1031880899493 42.3152774590236)),
-((-71.1043632495873 42.315113108546,-71.1043583974082 42.3151211109857,
--71.1043443253471 42.3150676015829,-71.1043850704575 42.3150793250568,-71.1043632495873 42.315113108546)))',4326);
-
-SELECT ST_GeomFromText('CIRCULARSTRING(220268 150415,220227 150505,220227 150406)');
-	

Name

ST_GeomFromWKB — Creates a geometry instance from a Well-Known Binary geometry - representation (WKB) and optional SRID.

Synopsis

geometry ST_GeomFromWKB(bytea geom);

geometry ST_GeomFromWKB(bytea geom, integer srid);

Description

The ST_GeomFromWKB function, takes a well-known - binary representation of a geometry and a Spatial Reference System ID - (SRID) and creates an instance of the appropriate - geometry type. This function plays the role of the Geometry Factory in - SQL. This is an alternate name for ST_WKBToSQL.

If SRID is not specified, it defaults to -1 (Unknown).

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1. s3.2.7.2 - the optional SRID is from the conformance suite

This method implements the SQL/MM specification. SQL-MM 3: 5.1.41

- This method supports Circular Strings and Curves

Examples

--Although bytea rep contains single \, these need to be escaped when inserting into a table
-SELECT ST_AsEWKT(
-ST_GeomFromWKB(E'\\001\\002\\000\\000\\000\\002\\000\\000\\000\\037\\205\\353Q\\270~\\\\\\300\\323Mb\\020X\\231C@\\020X9\\264\\310~\\\\\\300)\\\\\\217\\302\\365\\230C@',4326)
-);
-					  st_asewkt
-------------------------------------------------------
- SRID=4326;LINESTRING(-113.98 39.198,-113.981 39.195)
-(1 row)
-
-SELECT
-  ST_AsText(
-	ST_GeomFromWKB(
-	  ST_AsEWKB('POINT(2 5)'::geometry)
-	)
-  );
- st_astext
-------------
- POINT(2 5)
-(1 row)

Name

ST_LineFromMultiPoint — Creates a LineString from a MultiPoint geometry.

Synopsis

geometry ST_LineFromMultiPoint(geometry aMultiPoint);

Description

Creates a LineString from a MultiPoint geometry.

- This function supports 3d and will not drop the z-index.

Examples

---Create a 3d line string from a 3d multipoint
-SELECT ST_AsEWKT(ST_LineFromMultiPoint(ST_GeomFromEWKT('MULTIPOINT(1 2 3, 4 5 6, 7 8 9)')));
---result--
-LINESTRING(1 2 3,4 5 6,7 8 9)
-		

Name

ST_LineFromText — Makes a Geometry from WKT representation with the given SRID. If SRID is - not given, it defaults to -1.

Synopsis

geometry ST_LineFromText(text WKT);

geometry ST_LineFromText(text WKT, integer srid);

Description

Makes a Geometry from WKT with the given SRID. If SRID is - not give, it defaults to -1. If WKT passed in is not a LINESTRING, then null is returned.

[Note]

OGC SPEC 3.2.6.2 - option SRID is from the conformance - suite.

[Note]

If you know all your geometries are LINESTRINGS, its more efficient to just use ST_GeomFromText. - This just calls ST_GeomFromText and adds additional validation that it returns a linestring.

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1. s3.2.6.2

This method implements the SQL/MM specification. SQL-MM 3: 7.2.8

Examples

SELECT ST_LineFromText('LINESTRING(1 2, 3 4)') AS aline, ST_LineFromText('POINT(1 2)') AS null_return;
-aline                            | null_return
-------------------------------------------------
-010200000002000000000000000000F ... | t
-		

Name

ST_LineFromWKB — Makes a LINESTRING from WKB with the given SRID

Synopsis

geometry ST_LineFromWKB(bytea WKB);

geometry ST_LineFromWKB(bytea WKB, integer srid);

Description

The ST_LineFromWKB function, takes a well-known binary - representation of geometry and a Spatial Reference System ID (SRID) - and creates an instance of the appropriate geometry type - in this case, a - LINESTRING geometry. This function plays the role of the Geometry - Factory in SQL.

If an SRID is not specified, it defaults to -1. NULL is - returned if the input bytea - does not represent a LINESTRING.

[Note]

OGC SPEC 3.2.6.2 - option SRID is from the conformance - suite.

[Note]

If you know all your geometries are LINESTRINGs, its more - efficient to just use ST_GeomFromWKB. This function just - calls ST_GeomFromWKB and adds additional validation that - it returns a linestring.

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1. s3.2.6.2

This method implements the SQL/MM specification. SQL-MM 3: 7.2.9

Examples

SELECT ST_LineFromWKB(ST_AsBinary(ST_GeomFromText('LINESTRING(1 2, 3 4)'))) AS aline,
-		ST_LineFromWKB(ST_AsBinary(ST_GeomFromText('POINT(1 2)'))) IS NULL AS null_return;
-aline                            | null_return
-------------------------------------------------
-010200000002000000000000000000F ... | t
-		

Name

ST_LinestringFromWKB — Makes a geometry from WKB with the given SRID.

Synopsis

geometry ST_LinestringFromWKB(bytea WKB);

geometry ST_LinestringFromWKB(bytea WKB, integer srid);

Description

The ST_LinestringFromWKB function, takes a well-known binary - representation of geometry and a Spatial Reference System ID (SRID) - and creates an instance of the appropriate geometry type - in this case, a - LINESTRING geometry. This function plays the role of the Geometry - Factory in SQL.

If an SRID is not specified, it defaults to -1. NULL is - returned if the input bytea does not represent a - LINESTRING geometry. This an alias for ST_LineFromWKB.

[Note]

OGC SPEC 3.2.6.2 - optional SRID is from the conformance suite.

[Note]

If you know all your geometries are LINESTRINGs, it's more - efficient to just use ST_GeomFromWKB. This function just calls - ST_GeomFromWKB and adds additional validation that it returns a - LINESTRING.

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1. s3.2.6.2

This method implements the SQL/MM specification. SQL-MM 3: 7.2.9

Examples

SELECT
-  ST_LineStringFromWKB(
-	ST_AsBinary(ST_GeomFromText('LINESTRING(1 2, 3 4)'))
-  ) AS aline,
-  ST_LinestringFromWKB(
-	ST_AsBinary(ST_GeomFromText('POINT(1 2)'))
-  ) IS NULL AS null_return;
-   aline                            | null_return
-------------------------------------------------
-010200000002000000000000000000F ... | t

Name

ST_MakeBox2D — Creates a BOX2D defined by the given point - geometries.

Synopsis

box2d ST_MakeBox2D(geometry pointLowLeft, geometry pointUpRight);

Description

Creates a BOX2D defined by the given point - geometries. This is useful for doing range queries

Examples

---Return all features that fall reside or partly reside in a US national atlas coordinate bounding box
---It is assumed here that the geometries are stored with SRID = 2163 (US National atlas equal area)
-SELECT feature_id, feature_name, the_geom
-FROM features
-WHERE the_geom && ST_SetSRID(ST_MakeBox2D(ST_Point(-989502.1875, 528439.5625),
-	ST_Point(-987121.375 ,529933.1875)),2163)

Name

ST_MakeBox3D — Creates a BOX3D defined by the given 3d point - geometries.

Synopsis

box3d ST_MakeBox3D(geometry point3DLowLeftBottom, geometry point3DUpRightTop);

Description

Creates a BOX3D defined by the given 2 3D point - geometries.

This function supports 3d and will not drop the z-index.

Examples

-SELECT ST_MakeBox3D(ST_MakePoint(-989502.1875, 528439.5625, 10),
-	ST_MakePoint(-987121.375 ,529933.1875, 10)) As abb3d
-
---bb3d--
---------
-BOX3D(-989502.1875 528439.5625 10,-987121.375 529933.1875 10)
-	

Name

ST_MakeLine — Creates a Linestring from point geometries.

Synopsis

geometry ST_MakeLine(geometry set pointfield);

geometry ST_MakeLine(geometry point1, geometry point2);

geometry ST_MakeLine(geometry[] point_array);

Description

ST_MakeLine comes in 3 forms: a spatial aggregate that takes - rows of point geometries and returns a line string, a function that takes an array of points, and a regular function that takes two point geometries. You - might want to use a subselect to order points before feeding them - to the aggregate version of this function.

- This function supports 3d and will not drop the z-index.

Availability: 1.4.0 - ST_MakeLine(geomarray) was introduced. ST_MakeLine aggregate functions was enhanced to handle more points faster.

Examples: Spatial Aggregate version

This example takes a sequence of GPS points and creates one record for each - gps travel where the geometry field is a line string composed of the gps points - in the order of the travel.

-SELECT gps.gps_track, ST_MakeLine(gps.the_geom) As newgeom
-	FROM (SELECT gps_track,gps_time, the_geom
-			FROM gps_points ORDER BY gps_track, gps_time) As gps
-	GROUP BY gps.gps_track

Examples: Non-Spatial Aggregate version

First example is a simple one off line string composed of 2 points. The second formulates - line strings from 2 points a user draws. The third is a one-off that joins 2 3d points to create a line in 3d space.

-SELECT ST_AsText(ST_MakeLine(ST_MakePoint(1,2), ST_MakePoint(3,4)));
-	  st_astext
----------------------
- LINESTRING(1 2,3 4)
-
-SELECT userpoints.id, ST_MakeLine(startpoint, endpoint) As drawn_line
-	FROM userpoints ;
-
-SELECT ST_AsEWKT(ST_MakeLine(ST_MakePoint(1,2,3), ST_MakePoint(3,4,5)));
-		st_asewkt
--------------------------
- LINESTRING(1 2 3,3 4 5)
-			

Examples: Using Array version

-SELECT ST_MakeLine(ARRAY(SELECT ST_Centroid(the_geom) FROM visit_locations ORDER BY visit_time));
-
---Making a 3d line with 3 3-d points
-SELECT ST_AsEWKT(ST_MakeLine(ARRAY[ST_MakePoint(1,2,3),
-				ST_MakePoint(3,4,5), ST_MakePoint(6,6,6)]));
-		st_asewkt
--------------------------
-LINESTRING(1 2 3,3 4 5,6 6 6)
-			

Name

ST_MakeEnvelope — Creates a rectangular Polygon formed from the given minimums and maximums. Input - values must be in SRS specified by the SRID.

Synopsis

geometry ST_MakeEnvelope(double precision xmin, double precision ymin, double precision xmax, double precision ymax, integer srid);

Description

Creates a rectangular Polygon formed from the minima and maxima. by the given shell. Input - values must be in SRS specified by the SRID.

Availability: 1.5

Example: Building a bounding box polygon

-SELECT ST_AsText(ST_MakeEnvelope(10, 10, 11, 11, 4326));
-
-st_asewkt
------------
-POLYGON((10 10, 10 11, 11 11, 11 10, 10 10))
-			  

Name

ST_MakePolygon — Creates a Polygon formed by the given shell. Input - geometries must be closed LINESTRINGS.

Synopsis

geometry ST_MakePolygon(geometry linestring);

geometry ST_MakePolygon(geometry outerlinestring, geometry[] interiorlinestrings);

Description

Creates a Polygon formed by the given shell. Input - geometries must be closed LINESTRINGS. Comes in 2 variants.

Variant 1: takes one closed linestring.

Variant 2: Creates a Polygon formed by the given shell and array of - holes. You can construct a geometry array using ST_Accum or the PostgreSQL ARRAY[] and - ARRAY() constructs. Input geometries must be closed LINESTRINGS.

[Note]

This function will not accept a MULTILINESTRING. Use ST_LineMerge or ST_Dump to generate line strings.

- This function supports 3d and will not drop the z-index.

Examples: Single closed LINESTRING

---2d line
-SELECT ST_MakePolygon(ST_GeomFromText('LINESTRING(75.15 29.53,77 29,77.6 29.5, 75.15 29.53)'));
---If linestring is not closed
---you can add the start point to close it
-SELECT ST_MakePolygon(ST_AddPoint(foo.open_line, ST_StartPoint(foo.open_line)))
-FROM (
-SELECT ST_GeomFromText('LINESTRING(75.15 29.53,77 29,77.6 29.5)') As open_line) As foo;
-
---3d closed line
-SELECT ST_MakePolygon(ST_GeomFromText('LINESTRING(75.15 29.53 1,77 29 1,77.6 29.5 1, 75.15 29.53 1)'));
-
-st_asewkt
------------
-POLYGON((75.15 29.53 1,77 29 1,77.6 29.5 1,75.15 29.53 1))
-
---measured line --
-SELECT ST_MakePolygon(ST_GeomFromText('LINESTRINGM(75.15 29.53 1,77 29 1,77.6 29.5 2, 75.15 29.53 2)'));
-
-st_asewkt
-----------
-POLYGONM((75.15 29.53 1,77 29 1,77.6 29.5 2,75.15 29.53 2))
-			  

Examples: Outter shell with inner shells

Build a donut with an ant hole

-SELECT ST_MakePolygon(
-		ST_ExteriorRing(ST_Buffer(foo.line,10)),
-	ARRAY[ST_Translate(foo.line,1,1),
-		ST_ExteriorRing(ST_Buffer(ST_MakePoint(20,20),1)) ]
-	)
-FROM
-	(SELECT ST_ExteriorRing(ST_Buffer(ST_MakePoint(10,10),10,10))
-		As line )
-		As foo;
-		

Build province boundaries with holes - representing lakes in the province from a set of - province polygons/multipolygons and water line strings - this is an example of using PostGIS ST_Accum -

[Note]

The use of CASE because feeding a null array into - ST_MakePolygon results in NULL

-

[Note]

the use of left join to guarantee we get all provinces back even if they have no lakes

-	SELECT p.gid, p.province_name,
-		CASE WHEN
-			ST_Accum(w.the_geom) IS NULL THEN p.the_geom
-		ELSE  ST_MakePolygon(ST_LineMerge(ST_Boundary(p.the_geom)), ST_Accum(w.the_geom)) END
-	FROM
-		provinces p LEFT JOIN waterlines w
-			ON (ST_Within(w.the_geom, p.the_geom) AND ST_IsClosed(w.the_geom))
-	GROUP BY p.gid, p.province_name, p.the_geom;
-
-	--Same example above but utilizing a correlated subquery
-	--and PostgreSQL built-in ARRAY() function that converts a row set to an array
-
-	SELECT p.gid,  p.province_name, CASE WHEN
-		EXISTS(SELECT w.the_geom
-			FROM waterlines w
-			WHERE ST_Within(w.the_geom, p.the_geom)
-			AND ST_IsClosed(w.the_geom))
-		THEN
-		ST_MakePolygon(ST_LineMerge(ST_Boundary(p.the_geom)),
-			ARRAY(SELECT w.the_geom
-				FROM waterlines w
-				WHERE ST_Within(w.the_geom, p.the_geom)
-				AND ST_IsClosed(w.the_geom)))
-		ELSE p.the_geom END As the_geom
-	FROM
-		provinces p;
-			  

Name

ST_MakePoint — Creates a 2D,3DZ or 4D point geometry.

Synopsis

geometry ST_MakePoint(double precision x, double precision y);

geometry ST_MakePoint(double precision x, double precision y, double precision z);

geometry ST_MakePoint(double precision x, double precision y, double precision z, double precision m);

Description

Creates a 2D,3DZ or 4D point geometry (geometry with measure). - ST_MakePoint while not being OGC compliant is - generally faster and more precise than ST_GeomFromText - and ST_PointFromText. It is also easier to use if - you have raw coordinates rather than WKT.

[Note]

Note x is longitude and y is latitude

[Note]

Use ST_MakePointM if you need to make a point with x,y,m.

- This function supports 3d and will not drop the z-index.

Examples

--Return point with unknown SRID
-SELECT ST_MakePoint(-71.1043443253471, 42.3150676015829);
-
---Return point marked as WGS 84 long lat
-SELECT ST_SetSRID(ST_MakePoint(-71.1043443253471, 42.3150676015829),4326);
-
---Return a 3D point (e.g. has altitude)
-SELECT ST_MakePoint(1, 2,1.5);
-
---Get z of point
-SELECT ST_Z(ST_MakePoint(1, 2,1.5));
-result
--------
-1.5

Name

ST_MakePointM — Creates a point geometry with an x y and m coordinate.

Synopsis

geometry ST_MakePointM(float x, float y, float m);

Description

Creates a point with x, y and measure coordinates.

[Note]

Note x is longitude and y is latitude.

Examples

We use ST_AsEWKT in these examples to show the text representation instead of ST_AsText because ST_AsText does not - support returning M.

---Return EWKT representation of point with unknown SRID
-SELECT ST_AsEWKT(ST_MakePointM(-71.1043443253471, 42.3150676015829, 10));
-
---result
-				   st_asewkt
------------------------------------------------
- POINTM(-71.1043443253471 42.3150676015829 10)
-
---Return EWKT representation of point with measure marked as WGS 84 long lat
-SELECT ST_AsEWKT(ST_SetSRID(ST_MakePointM(-71.1043443253471, 42.3150676015829,10),4326));
-
-						st_asewkt
----------------------------------------------------------
-SRID=4326;POINTM(-71.1043443253471 42.3150676015829 10)
-
---Return a 3d point (e.g. has altitude)
-SELECT ST_MakePoint(1, 2,1.5);
-
---Get m of point
-SELECT ST_M(ST_MakePointM(-71.1043443253471, 42.3150676015829,10));
-result
--------
-10
-			  

Name

ST_MLineFromText — Return a specified ST_MultiLineString value from WKT representation.

Synopsis

geometry ST_MLineFromText(text WKT, integer srid);

geometry ST_MLineFromText(text WKT);

Description

Makes a Geometry from Well-Known-Text (WKT) with the given SRID. If SRID is - not give, it defaults to -1.

OGC SPEC 3.2.6.2 - option SRID is from the conformance - suite

Returns null if the WKT is not a MULTILINESTRING

[Note]

If you are absolutely sure all your WKT geometries are points, don't use this function. - It is slower than ST_GeomFromText since it adds an additional validation step. -

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1. s3.2.6.2

This method implements the SQL/MM specification.SQL-MM 3: 9.4.4

Examples

SELECT ST_MLineFromText('MULTILINESTRING((1 2, 3 4), (4 5, 6 7))');

Name

ST_MPointFromText — Makes a Geometry from WKT with the given SRID. If SRID is - not give, it defaults to -1.

Synopsis

geometry ST_MPointFromText(text WKT, integer srid);

geometry ST_MPointFromText(text WKT);

Description

Makes a Geometry from WKT with the given SRID. If SRID is - not give, it defaults to -1.

OGC SPEC 3.2.6.2 - option SRID is from the conformance - suite

Returns null if the WKT is not a MULTIPOINT

[Note]

If you are absolutely sure all your WKT geometries are points, don't use this function. - It is slower than ST_GeomFromText since it adds an additional validation step. -

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1. 3.2.6.2

This method implements the SQL/MM specification. SQL-MM 3: 9.2.4

Examples

SELECT ST_MPointFromText('MULTIPOINT(1 2, 3 4)');
-SELECT ST_MPointFromText('MULTIPOINT(-70.9590 42.1180, -70.9611 42.1223)', 4326);

Name

ST_MPolyFromText — Makes a MultiPolygon Geometry from WKT with the given SRID. If SRID is - not give, it defaults to -1.

Synopsis

geometry ST_MPolyFromText(text WKT, integer srid);

geometry ST_MPolyFromText(text WKT);

Description

Makes a MultiPolygon from WKT with the given SRID. If SRID is - not give, it defaults to -1.

OGC SPEC 3.2.6.2 - option SRID is from the conformance suite

Throws an error if the WKT is not a MULTIPOLYGON

[Note]

If you are absolutely sure all your WKT geometries are multipolygons, don't use this function. - It is slower than ST_GeomFromText since it adds an additional validation step. -

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1. s3.2.6.2

This method implements the SQL/MM specification. SQL-MM 3: 9.6.4

Examples

SELECT ST_MPolyFromText('MULTIPOLYGON(((0 0 1,20 0 1,20 20 1,0 20 1,0 0 1),(5 5 3,5 7 3,7 7 3,7 5 3,5 5 3)))');
-SELECt ST_MPolyFromText('MULTIPOLYGON(((-70.916 42.1002,-70.9468 42.0946,-70.9765 42.0872,-70.9754 42.0875,-70.9749 42.0879,-70.9752 42.0881,-70.9754 42.0891,-70.9758 42.0894,-70.9759 42.0897,-70.9759 42.0899,-70.9754 42.0902,-70.9756 42.0906,-70.9753 42.0907,-70.9753 42.0917,-70.9757 42.0924,-70.9755 42.0928,-70.9755 42.0942,-70.9751 42.0948,-70.9755 42.0953,-70.9751 42.0958,-70.9751 42.0962,-70.9759 42.0983,-70.9767 42.0987,-70.9768 42.0991,-70.9771 42.0997,-70.9771 42.1003,-70.9768 42.1005,-70.977 42.1011,-70.9766 42.1019,-70.9768 42.1026,-70.9769 42.1033,-70.9775 42.1042,-70.9773 42.1043,-70.9776 42.1043,-70.9778 42.1048,-70.9773 42.1058,-70.9774 42.1061,-70.9779 42.1065,-70.9782 42.1078,-70.9788 42.1085,-70.9798 42.1087,-70.9806 42.109,-70.9807 42.1093,-70.9806 42.1099,-70.9809 42.1109,-70.9808 42.1112,-70.9798 42.1116,-70.9792 42.1127,-70.979 42.1129,-70.9787 42.1134,-70.979 42.1139,-70.9791 42.1141,-70.9987 42.1116,-71.0022 42.1273,
-	-70.9408 42.1513,-70.9315 42.1165,-70.916 42.1002)))',4326);
-

Name

ST_Point — Returns an ST_Point with the given coordinate values. OGC alias for ST_MakePoint.

Synopsis

geometry ST_Point(float x_lon, float y_lat);

Description

Returns an ST_Point with the given coordinate values. MM compliant alias for ST_MakePoint that takes just an x and y.

This method implements the SQL/MM specification. SQL-MM 3: 6.1.2

Examples: Geometry

SELECT ST_SetSRID(ST_Point(-71.1043443253471, 42.3150676015829),4326)

Examples: Geography

SELECT CAST(ST_SetSRID(ST_Point(-71.1043443253471, 42.3150676015829),4326) As geography);
-- the :: is PostgreSQL short-hand for casting.
-SELECT ST_SetSRID(ST_Point(-71.1043443253471, 42.3150676015829),4326)::geography;
--If your point coordinates are in a different spatial reference from WGS-84 long lat, then you need to transform before casting
--- This example we convert a point in Pennsylvania State Plane feet to WGS 84 and then geography
-SELECT ST_Transform(ST_SetSRID(ST_Point(3637510, 3014852),2273),4326)::geography
; - -

Name

ST_PointFromText — Makes a point Geometry from WKT with the given SRID. If SRID is - not given, it defaults to unknown.

Synopsis

geometry ST_PointFromText(text WKT);

geometry ST_PointFromText(text WKT, integer srid);

Description

Constructs a PostGIS ST_Geometry point object from the OGC Well-Known text representation. If SRID is - not give, it defaults to unknown (currently -1). If geometry is not a WKT point representation, returns null. - If completely invalid WKT, then throws an error.

[Note]

There are 2 variants of ST_PointFromText function, the first takes no SRID and returns a geometry - with no defined spatial reference system. The second takes a spatial reference id as the second argument - and returns an ST_Geometry that includes this srid as part of its meta-data. The srid must be defined - in the spatial_ref_sys table.

[Note]

If you are absolutely sure all your WKT geometries are points, don't use this function. - It is slower than ST_GeomFromText since it adds an additional validation step. If you are building points from long lat coordinates and care more about performance and accuracy than OGC compliance, use ST_MakePoint or OGC compliant alias ST_Point.

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1. s3.2.6.2 - option SRID is from the conformance suite.

This method implements the SQL/MM specification. SQL-MM 3: 6.1.8

Examples

-SELECT ST_PointFromText('POINT(-71.064544 42.28787)');
-SELECT ST_PointFromText('POINT(-71.064544 42.28787)', 4326);
-	

Name

ST_PointFromWKB — Makes a geometry from WKB with the given SRID

Synopsis

geometry ST_GeomFromWKB(bytea geom);

geometry ST_GeomFromWKB(bytea geom, integer srid);

Description

The ST_PointFromWKB function, takes a well-known binary - representation of geometry and a Spatial Reference System ID (SRID) - and creates an instance of the appropriate geometry type - in this case, a - POINT geometry. This function plays the role of the Geometry - Factory in SQL.

If an SRID is not specified, it defaults to -1. NULL is - returned if the input bytea does not represent a - POINT geometry.

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1. s3.2.7.2

This method implements the SQL/MM specification. SQL-MM 3: 6.1.9

- This function supports 3d and will not drop the z-index.

- This method supports Circular Strings and Curves

Examples

SELECT
-  ST_AsText(
-	ST_PointFromWKB(
-	  ST_AsEWKB('POINT(2 5)'::geometry)
-	)
-  );
- st_astext
-------------
- POINT(2 5)
-(1 row)
-
-SELECT
-  ST_AsText(
-	ST_PointFromWKB(
-	  ST_AsEWKB('LINESTRING(2 5, 2 6)'::geometry)
-	)
-  );
- st_astext
------------
-
-(1 row)

Name

ST_Polygon — Returns a polygon built from the specified linestring and SRID.

Synopsis

geometry ST_Polygon(geometry aLineString, integer srid);

Description

Returns a polygon built from the specified linestring and SRID.

[Note]

ST_Polygon is similar to first version oST_MakePolygon except it also sets the spatial ref sys (SRID) of the polygon. Will not work with MULTILINESTRINGS - so use LineMerge to merge multilines. Also does not create polygons with holes. Use ST_MakePolygon for that.

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1.

This method implements the SQL/MM specification. SQL-MM 3: 8.3.2

- This function supports 3d and will not drop the z-index.

Examples

---a 2d polygon
-SELECT ST_Polygon(ST_GeomFromText('LINESTRING(75.15 29.53,77 29,77.6 29.5, 75.15 29.53)'), 4326);
-
---result--
-POLYGON((75.15 29.53,77 29,77.6 29.5,75.15 29.53))
---a 3d polygon
-SELECT ST_AsEWKT(ST_Polygon(ST_GeomFromEWKT('LINESTRING(75.15 29.53 1,77 29 1,77.6 29.5 1, 75.15 29.53 1)'), 4326));
-
-result
-------
-SRID=4326;POLYGON((75.15 29.53 1,77 29 1,77.6 29.5 1,75.15 29.53 1))
-			

Name

ST_PolygonFromText — Makes a Geometry from WKT with the given SRID. If SRID is - not give, it defaults to -1.

Synopsis

geometry ST_PolygonFromText(text WKT);

geometry ST_PolygonFromText(text WKT, integer srid);

Description

Makes a Geometry from WKT with the given SRID. If SRID is - not give, it defaults to -1. Returns null if WKT is not a polygon.

OGC SPEC 3.2.6.2 - option SRID is from the conformance - suite

[Note]

If you are absolutely sure all your WKT geometries are polygons, don't use this function. - It is slower than ST_GeomFromText since it adds an additional validation step.

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1. s3.2.6.2

This method implements the SQL/MM specification. SQL-MM 3: 8.3.6

Examples

SELECT ST_PolygonFromText('POLYGON((-71.1776585052917 42.3902909739571,-71.1776820268866 42.3903701743239,
--71.1776063012595 42.3903825660754,-71.1775826583081 42.3903033653531,-71.1776585052917 42.3902909739571))');
-st_polygonfromtext
-------------------
-010300000001000000050000006...
-
-
-SELECT ST_PolygonFromText('POINT(1 2)') IS NULL as point_is_notpoly;
-
-point_is_not_poly
-----------
-t
-

Name

ST_WKBToSQL — Return a specified ST_Geometry value from Well-Known Binary representation (WKB). This is an alias name for ST_GeomFromWKB that takes no srid

Synopsis

geometry ST_WKBToSQL(bytea WKB);

Description

This method implements the SQL/MM specification. SQL-MM 3: 5.1.36


Name

ST_WKTToSQL — Return a specified ST_Geometry value from Well-Known Text representation (WKT). This is an alias name for ST_GeomFromText

Synopsis

geometry ST_WKTToSQL(text WKT);

Description

This method implements the SQL/MM specification. SQL-MM 3: 5.1.34

7.4. Geometry Accessors

GeometryType — Returns the type of the geometry as a string. Eg: - 'LINESTRING', 'POLYGON', 'MULTIPOINT', etc.
ST_Boundary — Returns the closure of the combinatorial boundary of this - Geometry.
ST_CoordDim

Return the coordinate dimension of the ST_Geometry value.

ST_Dimension — The inherent dimension of this Geometry object, which must - be less than or equal to the coordinate dimension.
ST_EndPoint — Returns the last point of a LINESTRING - geometry as a POINT.
ST_Envelope — Returns a geometry representing the double precision (float8) bounding box of the - supplied geometry.
ST_ExteriorRing — Returns a line string representing the exterior ring of the POLYGON geometry. Return - NULL if the geometry is not a polygon. Will not work with MULTIPOLYGON
ST_GeometryN — Return the 1-based Nth geometry if the geometry is a - GEOMETRYCOLLECTION, MULTIPOINT, MULTILINESTRING, MULTICURVE or MULTIPOLYGON. - Otherwise, return NULL.
ST_GeometryType — Return the geometry type of the ST_Geometry value.
ST_InteriorRingN — Return the Nth interior linestring ring of the polygon geometry. - Return NULL if the geometry is not a polygon or the given N is out - of range.
ST_IsClosed — Returns TRUE if the - LINESTRING's start and end points are coincident. -
ST_IsEmpty — Returns true if this Geometry is an empty geometry . If - true, then this Geometry represents the empty point set - i.e. - GEOMETRYCOLLECTION(EMPTY).
ST_IsRing — Returns TRUE if this - LINESTRING is both closed and simple.
ST_IsSimple — Returns (TRUE) if this Geometry has no anomalous geometric - points, such as self intersection or self tangency.
ST_IsValid — Returns true if the - ST_Geometry is well formed. -
ST_IsValidReason — Returns text stating if a geometry is valid or not and if not valid, a reason why.
ST_M — Return the M coordinate of the point, or NULL if not - available. Input must be a point.
ST_NDims — Returns coordinate dimension of the geometry as a small int. - Values are: 2,3 or 4.
ST_NPoints — Return the number of points (vertexes) in a geometry.
ST_NRings — If the geometry is a polygon or multi-polygon returns the number of rings.
ST_NumGeometries — If geometry is a GEOMETRYCOLLECTION (or MULTI*) return the - number of geometries, otherwise return NULL.
ST_NumInteriorRings — Return the number of interior rings of the first polygon in - the geometry. This will work with both POLYGON and MULTIPOLYGON types but only looks at the first polygon. - Return NULL if there is no polygon in the - geometry.
ST_NumInteriorRing — Return the number of interior rings of the first polygon in - the geometry. Synonym to ST_NumInteriorRings.
ST_NumPoints — Return the number of points in an ST_LineString or - ST_CircularString value.
ST_PointN — Return the Nth point in the first linestring or circular linestring in the - geometry. Return NULL if there is no linestring in the - geometry.
ST_SRID — Returns the spatial reference identifier for the ST_Geometry as defined in spatial_ref_sys table.
ST_StartPoint — Returns the first point of a LINESTRING - geometry as a POINT.
ST_Summary — Returns a text summary of the contents of the - ST_Geometry. -
ST_X — Return the X coordinate of the point, or NULL if not - available. Input must be a point.
ST_Y — Return the Y coordinate of the point, or NULL if not - available. Input must be a point.
ST_Z — Return the Z coordinate of the point, or NULL if not - available. Input must be a point.
ST_Zmflag — Returns ZM (dimension semantic) flag of the geometries as a - small int. Values are: 0=2d, 1=3dm, 2=3dz, 3=4d.

Name

GeometryType — Returns the type of the geometry as a string. Eg: - 'LINESTRING', 'POLYGON', 'MULTIPOINT', etc.

Synopsis

text GeometryType(geometry geomA);

Description

Returns the type of the geometry as a string. Eg: - 'LINESTRING', 'POLYGON', 'MULTIPOINT', etc.

OGC SPEC s2.1.1.1 - Returns the name of the instantiable - subtype of Geometry of which this Geometry instance is a member. - The name of the instantiable subtype of Geometry is returned as a - string.

[Note]

This function also indicates if the geometry is measured, - by returning a string of the form 'POINTM'.

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1.

- This method supports Circular Strings and Curves

Examples

SELECT GeometryType(ST_GeomFromText('LINESTRING(77.29 29.07,77.42 29.26,77.27 29.31,77.29 29.07)'));
- geometrytype
---------------
- LINESTRING
-

Name

ST_Boundary — Returns the closure of the combinatorial boundary of this - Geometry.

Synopsis

geometry ST_Boundary(geometry geomA);

Description

Returns the closure of the combinatorial boundary of this - Geometry. The combinatorial boundary is defined as described in - section 3.12.3.2 of the OGC SPEC. Because the result of this - function is a closure, and hence topologically closed, the - resulting boundary can be represented using representational - geometry primitives as discussed in the OGC SPEC, section - 3.12.2.

Performed by the GEOS module

[Important]

Do not call with a GEOMETRYCOLLECTION as an argument

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1. OGC SPEC s2.1.1.1

This method implements the SQL/MM specification. SQL-MM 3: 5.1.14

- This function supports 3d and will not drop the z-index.

Examples

SELECT ST_AsText(ST_Boundary(ST_GeomFromText('LINESTRING(1 1,0 0, -1 1)')));
-st_astext
------------
-MULTIPOINT(1 1,-1 1)
-
-SELECT ST_AsText(ST_Boundary(ST_GeomFromText('POLYGON((1 1,0 0, -1 1, 1 1))')));
-st_astext
-----------
-LINESTRING(1 1,0 0,-1 1,1 1)
-
---Using a 3d polygon
-SELECT ST_AsEWKT(ST_Boundary(ST_GeomFromEWKT('POLYGON((1 1 1,0 0 1, -1 1 1, 1 1 1))')));
-
-st_asewkt
------------------------------------
-LINESTRING(1 1 1,0 0 1,-1 1 1,1 1 1)
-
---Using a 3d multilinestring
-SELECT ST_AsEWKT(ST_Boundary(ST_GeomFromEWKT('MULTILINESTRING((1 1 1,0 0 0.5, -1 1 1),(1 1 0.5,0 0 0.5, -1 1 0.5, 1 1 0.5) )')));
-
-st_asewkt
-----------
-MULTIPOINT(-1 1 1,1 1 0.75)
-

Name

ST_CoordDim —

Return the coordinate dimension of the ST_Geometry value.

Synopsis

integer ST_CoordDim(geometry geomA);

Description

Return the coordinate dimension of the ST_Geometry value.

This is the MM compliant alias name for ST_NDims

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1.

This method implements the SQL/MM specification. SQL-MM 3: 5.1.3

- This method supports Circular Strings and Curves

- This function supports 3d and will not drop the z-index.

Examples

SELECT ST_CoordDim('CIRCULARSTRING(1 2 3, 1 3 4, 5 6 7, 8 9 10, 11 12 13)');
-			---result--
-				3
-
-				SELECT ST_CoordDim(ST_Point(1,2));
-			--result--
-				2
-
-		

See Also

ST_NDims


Name

ST_Dimension — The inherent dimension of this Geometry object, which must - be less than or equal to the coordinate dimension.

Synopsis

integer ST_Dimension(geometry g);

Description

The inherent dimension of this Geometry object, which must - be less than or equal to the coordinate dimension. OGC SPEC - s2.1.1.1 - returns 0 for POINT, 1 for LINESTRING, 2 for POLYGON, and - the largest dimension of the components of a - GEOMETRYCOLLECTION.

This method implements the SQL/MM specification. SQL-MM 3: 5.1.2

Examples

SELECT ST_Dimension('GEOMETRYCOLLECTION(LINESTRING(1 1,0 0),POINT(0 0))');
-ST_Dimension
------------
-1
-

See Also

ST_NDims


Name

ST_EndPoint — Returns the last point of a LINESTRING - geometry as a POINT.

Synopsis

boolean ST_EndPoint(geometry g);

Description

Returns the last point of a LINESTRING geometry - as a POINT or NULL if the input - parameter is not a LINESTRING.

This method implements the SQL/MM specification. SQL-MM 3: 7.1.4

- This function supports 3d and will not drop the z-index.

Examples

postgis=# SELECT ST_AsText(ST_EndPoint('LINESTRING(1 1, 2 2, 3 3)'::geometry));
- st_astext
-------------
- POINT(3 3)
-(1 row)
-
-postgis=# SELECT ST_EndPoint('POINT(1 1)'::geometry) IS NULL AS is_null;
-  is_null
-----------
- t
-(1 row)
-
---3d endpoint
-SELECT ST_AsEWKT(ST_EndPoint('LINESTRING(1 1 2, 1 2 3, 0 0 5)'));
-  st_asewkt
---------------
- POINT(0 0 5)
-(1 row)
-

Name

ST_Envelope — Returns a geometry representing the double precision (float8) bounding box of the - supplied geometry.

Synopsis

geometry ST_Envelope(geometry g1);

Description

Returns the float8 minimum bounding box for the supplied geometry, as a geometry. - The polygon is defined by the corner points of the bounding box - ((MINX, MINY), - (MINX, MAXY), - (MAXX, MAXY), - (MAXX, MINY), - (MINX, MINY)). (PostGIS will add a - ZMIN/ZMAX coordinate as - well).

Degenerate cases (vertical lines, points) will return a geometry of - lower dimension than POLYGON, ie. - POINT or LINESTRING.

Availability: 1.5.0 behavior changed to output double precision instead of float4

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1. s2.1.1.1

This method implements the SQL/MM specification. SQL-MM 3: 5.1.15

Examples

-SELECT ST_AsText(ST_Envelope('POINT(1 3)'::geometry));
- st_astext
-------------
- POINT(1 3)
-(1 row)
-
-
-SELECT ST_AsText(ST_Envelope('LINESTRING(0 0, 1 3)'::geometry));
-		   st_astext
---------------------------------
- POLYGON((0 0,0 3,1 3,1 0,0 0))
-(1 row)
-
-
-SELECT ST_AsText(ST_Envelope('POLYGON((0 0, 0 1, 1.0000001 1, 1.0000001 0, 0 0))'::geometry));
-						  st_astext
---------------------------------------------------------------
- POLYGON((0 0,0 1,1.00000011920929 1,1.00000011920929 0,0 0))
-(1 row)
-SELECT ST_AsText(ST_Envelope('POLYGON((0 0, 0 1, 1.0000000001 1, 1.0000000001 0, 0 0))'::geometry));
-						  st_astext
---------------------------------------------------------------
- POLYGON((0 0,0 1,1.00000011920929 1,1.00000011920929 0,0 0))
-(1 row)
-	
-SELECT Box3D(geom), Box2D(geom), ST_AsText(ST_Envelope(geom)) As envelopewkt
-	FROM (SELECT 'POLYGON((0 0, 0 1000012333334.34545678, 1.0000001 1, 1.0000001 0, 0 0))'::geometry As geom) As foo;
-
-
-	

See Also

Box2D, Box3D


Name

ST_ExteriorRing — Returns a line string representing the exterior ring of the POLYGON geometry. Return - NULL if the geometry is not a polygon. Will not work with MULTIPOLYGON

Synopsis

geometry ST_ExteriorRing(geometry a_polygon);

Description

Returns a line string representing the exterior ring of the POLYGON geometry. Return - NULL if the geometry is not a polygon.

[Note]

Only works with POLYGON geometry types

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1. 2.1.5.1

This method implements the SQL/MM specification. SQL-MM 3: 8.2.3, 8.3.3

- This function supports 3d and will not drop the z-index.

Examples

---If you have a table of polygons
-SELECT gid, ST_ExteriorRing(the_geom) AS ering
-FROM sometable;
-
---If you have a table of MULTIPOLYGONs
---and want to return a MULTILINESTRING composed of the exterior rings of each polygon
-SELECT gid, ST_Collect(ST_ExteriorRing(the_geom)) AS erings
-	FROM (SELECT gid, (ST_Dump(the_geom)).geom As the_geom
-			FROM sometable) As foo
-GROUP BY gid;
-
---3d Example
-SELECT ST_AsEWKT(
-	ST_ExteriorRing(
-	ST_GeomFromEWKT('POLYGON((0 0 1, 1 1 1, 1 2 1, 1 1 1, 0 0 1))')
-	)
-);
-
-st_asewkt
----------
-LINESTRING(0 0 1,1 1 1,1 2 1,1 1 1,0 0 1)
-

Name

ST_GeometryN — Return the 1-based Nth geometry if the geometry is a - GEOMETRYCOLLECTION, MULTIPOINT, MULTILINESTRING, MULTICURVE or MULTIPOLYGON. - Otherwise, return NULL.

Synopsis

geometry ST_GeometryN(geometry geomA, integer n);

Description

Return the 1-based Nth geometry if the geometry is a - GEOMETRYCOLLECTION, MULTIPOINT, MULTILINESTRING, MULTICURVE or MULTIPOLYGON. - Otherwise, return NULL.

[Note]

Index is 1-based as for OGC specs since version 0.8.0. - Previous versions implemented this as 0-based instead.

[Note]

If you want to extract all geometries, of a geometry, ST_Dump is more efficient and will also work for singular geoms.

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1.

This method implements the SQL/MM specification. SQL-MM 3: 9.1.5

- This function supports 3d and will not drop the z-index.

- This method supports Circular Strings and Curves

Examples

---Extracting a subset of points from a 3d multipoint
-SELECT n, ST_AsEWKT(ST_GeometryN(the_geom, n)) As geomewkt
-FROM (
-VALUES (ST_GeomFromEWKT('MULTIPOINT(1 2 7, 3 4 7, 5 6 7, 8 9 10)') ),
-( ST_GeomFromEWKT('MULTICURVE(CIRCULARSTRING(2.5 2.5,4.5 2.5, 3.5 3.5), (10 11, 12 11))') )
-	)As foo(the_geom)
-	CROSS JOIN generate_series(1,100) n
-WHERE n <= ST_NumGeometries(the_geom);
-
- n |               geomewkt
----+-----------------------------------------
- 1 | POINT(1 2 7)
- 2 | POINT(3 4 7)
- 3 | POINT(5 6 7)
- 4 | POINT(8 9 10)
- 1 | CIRCULARSTRING(2.5 2.5,4.5 2.5,3.5 3.5)
- 2 | LINESTRING(10 11,12 11)
-
-
---Extracting all geometries (useful when you want to assign an id)
-SELECT gid, n, ST_GeometryN(the_geom, n)
-FROM sometable CROSS JOIN generate_series(1,100) n
-WHERE n <= ST_NumGeometries(the_geom);
-
-
-

Name

ST_GeometryType — Return the geometry type of the ST_Geometry value.

Synopsis

text ST_GeometryType(geometry g1);

Description

Returns the type of the geometry as a string. EG: 'ST_Linestring', 'ST_Polygon','ST_MultiPolygon' etc. This function differs from GeometryType(geometry) in the case of the string and ST in front that is returned, as well as the fact that it will not indicate whether the geometry is measured.

This method implements the SQL/MM specification. SQL-MM 3: 5.1.4

Examples

SELECT ST_GeometryType(ST_GeomFromText('LINESTRING(77.29 29.07,77.42 29.26,77.27 29.31,77.29 29.07)'));
-			--result
-			ST_LineString
-			

See Also

GeometryType


Name

ST_InteriorRingN — Return the Nth interior linestring ring of the polygon geometry. - Return NULL if the geometry is not a polygon or the given N is out - of range.

Synopsis

geometry ST_InteriorRingN(geometry a_polygon, integer n);

Description

Return the Nth interior linestring ring of the polygon geometry. - Return NULL if the geometry is not a polygon or the given N is out - of range. index starts at 1.

[Note]

This will not work for MULTIPOLYGONs. Use in conjunction with ST_Dump for MULTIPOLYGONS

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1.

This method implements the SQL/MM specification. SQL-MM 3: 8.2.6, 8.3.5

- This function supports 3d and will not drop the z-index.

Examples

-SELECT ST_AsText(ST_InteriorRingN(the_geom, 1)) As the_geom
-FROM (SELECT ST_BuildArea(
-		ST_Collect(ST_Buffer(ST_Point(1,2), 20,3),
-			ST_Buffer(ST_Point(1, 2), 10,3))) As the_geom
-		)  as foo
-		

Name

ST_IsClosed — Returns TRUE if the - LINESTRING's start and end points are coincident. -

Synopsis

boolean ST_IsClosed(geometry g);

Description

Returns TRUE if the LINESTRING's - start and end points are coincident.

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1.

This method implements the SQL/MM specification. SQL-MM 3: 7.1.5, 9.3.3

[Note]

SQL-MM defines the result of - ST_IsClosed(NULL) to be 0, while - PostGIS returns NULL.

- This function supports 3d and will not drop the z-index.

- This method supports Circular Strings and Curves

Examples

postgis=# SELECT ST_IsClosed('LINESTRING(0 0, 1 1)'::geometry);
- st_isclosed
--------------
- f
-(1 row)
-
-postgis=# SELECT ST_IsClosed('LINESTRING(0 0, 0 1, 1 1, 0 0)'::geometry);
- st_isclosed
--------------
- t
-(1 row)
-
-postgis=# SELECT ST_IsClosed('MULTILINESTRING((0 0, 0 1, 1 1, 0 0),(0 0, 1 1))'::geometry);
- st_isclosed
--------------
- f
-(1 row)
-
-postgis=# SELECT ST_IsClosed('POINT(0 0)'::geometry);
- st_isclosed
--------------
- t
-(1 row)
-
-postgis=# SELECT ST_IsClosed('MULTIPOINT((0 0), (1 1))'::geometry);
- st_isclosed
--------------
- t
-(1 row)

See Also

ST_IsRing


Name

ST_IsEmpty — Returns true if this Geometry is an empty geometry . If - true, then this Geometry represents the empty point set - i.e. - GEOMETRYCOLLECTION(EMPTY).

Synopsis

boolean ST_IsEmpty(geometry geomA);

Description

Returns true if this Geometry is an empty geometry . If - true, then this Geometry represents an empty geometry collection, polygon, point etc.

[Note]

SQL-MM defines the result of ST_IsEmpty(NULL) to be 0, while - PostGIS returns NULL.

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1. s2.1.1.1

This method implements the SQL/MM specification. SQL-MM 3: 5.1.7

- This method supports Circular Strings and Curves

Examples

-SELECT ST_IsEmpty('GEOMETRYCOLLECTION(EMPTY)');
- st_isempty
-------------
- t
-(1 row)
-
- SELECT ST_IsEmpty(ST_GeomFromText('POLYGON EMPTY'));
- st_isempty
-------------
- t
-(1 row)
-
-SELECT ST_IsEmpty(ST_GeomFromText('POLYGON((1 2, 3 4, 5 6, 1 2))'));
-
- st_isempty
-------------
- f
-(1 row)
-
- SELECT ST_IsEmpty(ST_GeomFromText('POLYGON((1 2, 3 4, 5 6, 1 2))')) = false;
- ?column?
-----------
- t
-(1 row)
-
- SELECT ST_IsEmpty(ST_GeomFromText('CIRCULARSTRING EMPTY'));
-  st_isempty
-------------
- t
-(1 row)
-
-
-		

Name

ST_IsRing — Returns TRUE if this - LINESTRING is both closed and simple.

Synopsis

boolean ST_IsRing(geometry g);

Description

Returns TRUE if this - LINESTRING is both ST_IsClosed - (ST_StartPoint(g) - ~= - ST_Endpoint(g)) and ST_IsSimple (does not self intersect).

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1. 2.1.5.1

This method implements the SQL/MM specification. SQL-MM 3: 7.1.6

[Note]

SQL-MM defines the result of - ST_IsRing(NULL) to be 0, while - PostGIS returns NULL.

Examples

SELECT ST_IsRing(the_geom), ST_IsClosed(the_geom), ST_IsSimple(the_geom)
-FROM (SELECT 'LINESTRING(0 0, 0 1, 1 1, 1 0, 0 0)'::geometry AS the_geom) AS foo;
- st_isring | st_isclosed | st_issimple
------------+-------------+-------------
- t         | t           | t
-(1 row)
-
-SELECT ST_IsRing(the_geom), ST_IsClosed(the_geom), ST_IsSimple(the_geom)
-FROM (SELECT 'LINESTRING(0 0, 0 1, 1 0, 1 1, 0 0)'::geometry AS the_geom) AS foo;
- st_isring | st_isclosed | st_issimple
------------+-------------+-------------
- f         | t           | f
-(1 row)

Name

ST_IsSimple — Returns (TRUE) if this Geometry has no anomalous geometric - points, such as self intersection or self tangency.

Synopsis

boolean ST_IsSimple(geometry geomA);

Description

Returns true if this Geometry has no anomalous geometric - points, such as self intersection or self tangency. For more - information on the OGC's definition of geometry simplicity and validity, refer - to "Ensuring OpenGIS compliancy of geometries"

[Note]

SQL-MM defines the result of ST_IsSimple(NULL) to be 0, - while PostGIS returns NULL.

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1. s2.1.1.1

This method implements the SQL/MM specification. SQL-MM 3: 5.1.8

- This function supports 3d and will not drop the z-index.

Examples

 SELECT ST_IsSimple(ST_GeomFromText('POLYGON((1 2, 3 4, 5 6, 1 2))'));
- st_issimple
--------------
- t
-(1 row)
-
- SELECT ST_IsSimple(ST_GeomFromText('LINESTRING(1 1,2 2,2 3.5,1 3,1 2,2 1)'));
- st_issimple
--------------
- f
-(1 row)

See Also

ST_IsValid


Name

ST_IsValid — Returns true if the - ST_Geometry is well formed. -

Synopsis

boolean ST_IsValid(geometry g);

Description

Test if an ST_Geometry value is well formed. For geometries that are invalid, - the PostgreSQL NOTICE will provide details of why it is not valid. For more - information on the OGC's definition of geometry simplicity and validity, refer - to "Ensuring OpenGIS compliancy of geometries"

[Note]

SQL-MM defines the result of ST_IsValid(NULL) to be 0, while - PostGIS returns NULL.

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1.

This method implements the SQL/MM specification. SQL-MM 3: 5.1.9

Examples

SELECT ST_IsValid(ST_GeomFromText('LINESTRING(0 0, 1 1)')) As good_line,
-	ST_IsValid(ST_GeomFromText('POLYGON((0 0, 1 1, 1 2, 1 1, 0 0))')) As bad_poly
---results
-NOTICE:  Self-intersection at or near point 0 0
- good_line | bad_poly
------------+----------
- t         | f
-

Name

ST_IsValidReason — Returns text stating if a geometry is valid or not and if not valid, a reason why.

Synopsis

text ST_IsValidReason(geometry geomA);

Description

Returns text stating if a geometry is valid or not an if not valid, a reason why.

Useful in combination with ST_IsValid to generate a detailed report of invalid geometries and reasons.

Availability: 1.4 - requires GEOS >= 3.1.0.

Examples

---First 3 Rejects from a successful quintuplet experiment
-SELECT gid, ST_IsValidReason(the_geom) as validity_info
-FROM
-(SELECT ST_MakePolygon(ST_ExteriorRing(e.buff), ST_Accum(f.line)) As the_geom, gid
-FROM (SELECT ST_Buffer(ST_MakePoint(x1*10,y1), z1) As buff, x1*10 + y1*100 + z1*1000 As gid
-	FROM generate_series(-4,6) x1
-	CROSS JOIN generate_series(2,5) y1
-	CROSS JOIN generate_series(1,8) z1
-	WHERE x1 > y1*0.5 AND z1 < x1*y1) As e
-	INNER JOIN (SELECT ST_Translate(ST_ExteriorRing(ST_Buffer(ST_MakePoint(x1*10,y1), z1)),y1*1, z1*2) As line
-	FROM generate_series(-3,6) x1
-	CROSS JOIN generate_series(2,5) y1
-	CROSS JOIN generate_series(1,10) z1
-	WHERE x1 > y1*0.75 AND z1 < x1*y1) As f
-ON (ST_Area(e.buff) > 78 AND ST_Contains(e.buff, f.line))
-GROUP BY gid, e.buff) As quintuplet_experiment
-WHERE ST_IsValid(the_geom) = false
-ORDER BY gid
-LIMIT 3;
-
- gid  |      validity_info
-------+--------------------------
- 5330 | Self-intersection [32 5]
- 5340 | Self-intersection [42 5]
- 5350 | Self-intersection [52 5]
-
- --simple example
-SELECT ST_IsValidReason('LINESTRING(220227 150406,2220227 150407,222020 150410)');
-
- st_isvalidreason
-------------------
- Valid Geometry
-
-		

Name

ST_M — Return the M coordinate of the point, or NULL if not - available. Input must be a point.

Synopsis

float ST_M(geometry a_point);

Description

Return the M coordinate of the point, or NULL if not - available. Input must be a point.

[Note]

This is not (yet) part of the OGC spec, but is listed here - to complete the point coordinate extractor function list.

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1.

This method implements the SQL/MM specification.

- This function supports 3d and will not drop the z-index.

Examples

SELECT ST_M(ST_GeomFromEWKT('POINT(1 2 3 4)'));
- st_m
-------
-	4
-(1 row)
-
-		

Name

ST_NDims — Returns coordinate dimension of the geometry as a small int. - Values are: 2,3 or 4.

Synopsis

integer ST_NDims(geometry g1);

Description

Returns the coordinate dimension of the geometry. PostGIS supports 2 - (x,y) , - 3 - (x,y,z) or 2D with measure - x,y,m, and 4 - 3D with measure space x,y,z,m

- This function supports 3d and will not drop the z-index.

Examples

SELECT ST_NDims(ST_GeomFromText('POINT(1 1)')) As d2point,
-	ST_NDims(ST_GeomFromEWKT('POINT(1 1 2)')) As d3point,
-	ST_NDims(ST_GeomFromEWKT('POINTM(1 1 0.5)')) As d2pointm;
-
-	 d2point | d3point | d2pointm
----------+---------+----------
-	   2 |       3 |        3
-			

Name

ST_NPoints — Return the number of points (vertexes) in a geometry.

Synopsis

integer ST_NPoints(geometry g1);

Description

Return the number of points in a geometry. Works for all geometries.

[Note]

Prior to 1.3.4, this function crashes if used with geometries that contain CURVES. This is fixed in 1.3.4+

- This function supports 3d and will not drop the z-index.

- This method supports Circular Strings and Curves

Examples

SELECT ST_NPoints(ST_GeomFromText('LINESTRING(77.29 29.07,77.42 29.26,77.27 29.31,77.29 29.07)'));
---result
-4
-
---Polygon in 3D space
-SELECT ST_NPoints(ST_GeomFromEWKT('LINESTRING(77.29 29.07 1,77.42 29.26 0,77.27 29.31 -1,77.29 29.07 3)'))
---result
-4

See Also

ST_NumPoints


Name

ST_NRings — If the geometry is a polygon or multi-polygon returns the number of rings.

Synopsis

integer ST_NRings(geometry geomA);

Description

If the geometry is a polygon or multi-polygon returns the number of rings. Unlike NumInteriorRings, it counts - the outer rings as well.

- This function supports 3d and will not drop the z-index.

- This method supports Circular Strings and Curves

Examples

SELECT ST_NRings(the_geom) As Nrings, ST_NumInteriorRings(the_geom) As ninterrings
-					FROM (SELECT ST_GeomFromText('POLYGON((1 2, 3 4, 5 6, 1 2))') As the_geom) As foo;
-	 nrings | ninterrings
---------+-------------
-	  1 |           0
-(1 row)
-

Name

ST_NumGeometries — If geometry is a GEOMETRYCOLLECTION (or MULTI*) return the - number of geometries, otherwise return NULL.

Synopsis

integer ST_NumGeometries(geometry a_multi_or_geomcollection);

Description

Returns the number of Geometries. If geometry is a GEOMETRYCOLLECTION (or MULTI*) return the - number of geometries, otherwise return NULL.

This method implements the SQL/MM specification. SQL-MM 3: 9.1.4

Examples

---Although ST_NumGeometries will return null when passed a single, you can wrap in ST_Multi to force 1 or more for all geoms
-SELECT ST_NumGeometries(ST_Multi(ST_GeomFromText('LINESTRING(77.29 29.07,77.42 29.26,77.27 29.31,77.29 29.07)')));
---result
-1
-
---Geometry Collection Example - multis count as one geom in a collection
-SELECT ST_NumGeometries(ST_GeomFromEWKT('GEOMETRYCOLLECTION(MULTIPOINT(-2 3 , -2 2),
-LINESTRING(5 5 ,10 10),
-POLYGON((-7 4.2,-7.1 5,-7.1 4.3,-7 4.2)))'));
---result
-3
-

Name

ST_NumInteriorRings — Return the number of interior rings of the first polygon in - the geometry. This will work with both POLYGON and MULTIPOLYGON types but only looks at the first polygon. - Return NULL if there is no polygon in the - geometry.

Synopsis

integer ST_NumInteriorRings(geometry a_polygon);

Description

Return the number of interior rings of the first polygon in - the geometry. This will work with both POLYGON and MULTIPOLYGON types but only looks at the first polygon. - Return NULL if there is no polygon in the - geometry.

This method implements the SQL/MM specification. SQL-MM 3: 8.2.5

Examples

---If you have a regular polygon
-SELECT gid, field1, field2, ST_NumInteriorRings(the_geom) AS numholes
-FROM sometable;
-
---If you have multipolygons
---And you want to know the total number of interior rings in the MULTIPOLYGON
-SELECT gid, field1, field2, SUM(ST_NumInteriorRings(the_geom)) AS numholes
-FROM (SELECT gid, field1, field2, (ST_Dump(the_geom)).geom As the_geom
-	FROM sometable) As foo
-GROUP BY gid, field1,field2;
-			

Name

ST_NumInteriorRing — Return the number of interior rings of the first polygon in - the geometry. Synonym to ST_NumInteriorRings.

Synopsis

integer ST_NumInteriorRing(geometry a_polygon);

Description

Return the number of interior rings of the first polygon in - the geometry. Synonym to ST_NumInteriorRings. The OpenGIS specs are - ambiguous about the exact function naming, so we provide both - spellings.

This method implements the SQL/MM specification. SQL-MM 3: 8.2.5


Name

ST_NumPoints — Return the number of points in an ST_LineString or - ST_CircularString value.

Synopsis

integer ST_NumPoints(geometry g1);

Description

Return the number of points in an ST_LineString or - ST_CircularString value. Prior to 1.4 only works with Linestrings as the specs state. From 1.4 forward this is an alias for ST_NPoints which returns number of vertexes for - not just line strings. - Consider using ST_NPoints instead which is multi-purpose - and works with many geometry types.

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1.

This method implements the SQL/MM specification. SQL-MM 3: 7.2.4

Examples

SELECT ST_NumPoints(ST_GeomFromText('LINESTRING(77.29 29.07,77.42 29.26,77.27 29.31,77.29 29.07)'));
-		--result
-		4
-		

See Also

ST_NPoints


Name

ST_PointN — Return the Nth point in the first linestring or circular linestring in the - geometry. Return NULL if there is no linestring in the - geometry.

Synopsis

geometry ST_PointN(geometry a_linestring, integer n);

Description

Return the Nth point in the first linestring or circular linestring in the - geometry. Return NULL if there is no linestring in the - geometry.

[Note]

Index is 1-based as for OGC specs since version 0.8.0. - Previous versions implemented this as 0-based instead.

[Note]

If you want to get the nth point of each line string in a multilinestring, use in conjunction - with ST_Dump

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1.

This method implements the SQL/MM specification. SQL-MM 3: 7.2.5, 7.3.5

- This function supports 3d and will not drop the z-index.

- This method supports Circular Strings and Curves

Examples

-- Extract all POINTs from a LINESTRING
-SELECT ST_AsText(
-   ST_PointN(
-	  column1,
-	  generate_series(1, ST_NPoints(column1))
-   ))
-FROM ( VALUES ('LINESTRING(0 0, 1 1, 2 2)'::geometry) ) AS foo;
-
- st_astext
-------------
- POINT(0 0)
- POINT(1 1)
- POINT(2 2)
-(3 rows)
-
---Example circular string
-SELECT ST_AsText(ST_PointN(ST_GeomFromText('CIRCULARSTRING(1 2, 3 2, 1 2)'),2));
-
-st_astext
-----------
-POINT(3 2)
-

See Also

ST_NPoints


Name

ST_SRID — Returns the spatial reference identifier for the ST_Geometry as defined in spatial_ref_sys table.

Synopsis

integer ST_SRID(geometry g1);

Description

Returns the spatial reference identifier for the ST_Geometry as defined in Section 4.3.1, “The SPATIAL_REF_SYS Table and Spatial Reference Systems” table.

[Note]

spatial_ref_sys - table is a table that catalogs all spatial reference systems known to PostGIS and is used for transformations from one spatial - reference system to another. So verifying you have the right spatial reference system identifier is important if you plan to ever transform your geometries.

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1. s2.1.1.1

This method implements the SQL/MM specification. SQL-MM 3: 5.1.5

- This method supports Circular Strings and Curves

Examples

SELECT ST_SRID(ST_GeomFromText('POINT(-71.1043 42.315)',4326));
-		--result
-		4326
-		

Name

ST_StartPoint — Returns the first point of a LINESTRING - geometry as a POINT.

Synopsis

geometry ST_StartPoint(geometry geomA);

Description

Returns the first point of a LINESTRING geometry - as a POINT or NULL if the input - parameter is not a LINESTRING.

This method implements the SQL/MM specification. SQL-MM 3: 7.1.3

- This function supports 3d and will not drop the z-index.

Examples

SELECT ST_AsText(ST_StartPoint('LINESTRING(0 1, 0 2)'::geometry));
- st_astext
-------------
- POINT(0 1)
-(1 row)
-
-SELECT ST_StartPoint('POINT(0 1)'::geometry) IS NULL AS is_null;
-  is_null
-----------
- t
-(1 row)
-
---3d line
-SELECT ST_AsEWKT(ST_StartPoint('LINESTRING(0 1 1, 0 2 2)'::geometry));
- st_asewkt
-------------
- POINT(0 1 1)
-(1 row)
-
-

Name

ST_Summary — Returns a text summary of the contents of the - ST_Geometry. -

Synopsis

text ST_Summary(geometry g);

Description

Returns a text summary of the contents of the geometry.

- This function supports 3d and will not drop the z-index.

Examples

SELECT ST_Summary(ST_GeomFromText('LINESTRING(0 0, 1 1)')) As good_line,
-	ST_Summary(ST_GeomFromText('POLYGON((0 0, 1 1, 1 2, 1 1, 0 0))')) As bad_poly
---results
-	  good_line       |        bad_poly
-----------------------+-------------------------
-					  |
-Line[B] with 2 points : Polygon[B] with 1 rings
-					  :    ring 0 has 5 points
-					  :
-
---3d polygon
-SELECT ST_Summary(ST_GeomFromEWKT('LINESTRING(0 0 1, 1 1 1)')) As good_line,
-	ST_Summary(ST_GeomFromEWKT('POLYGON((0 0 1, 1 1 2, 1 2 3, 1 1 1, 0 0 1))')) As poly
-
---results
-	  good_line       |        poly
-----------------------+-------------------------
-					  |
-Line[ZB] with 2 points : Polygon[ZB] with 1 rings
-					  :    ring 0 has 5 points
-					  :
-
-

Name

ST_X — Return the X coordinate of the point, or NULL if not - available. Input must be a point.

Synopsis

float ST_X(geometry a_point);

Description

Return the X coordinate of the point, or NULL if not - available. Input must be a point.

[Note]

If you want to get the max min x values of any geometry look at ST_XMin, ST_XMax functions.

This method implements the SQL/MM specification. SQL-MM 3: 6.1.3

- This function supports 3d and will not drop the z-index.

Examples

SELECT ST_X(ST_GeomFromEWKT('POINT(1 2 3 4)'));
- st_x
-------
-	1
-(1 row)
-
-SELECT ST_Y(ST_Centroid(ST_GeomFromEWKT('LINESTRING(1 2 3 4, 1 1 1 1)')));
- st_y
-------
-  1.5
-(1 row)
-
-		

Name

ST_Y — Return the Y coordinate of the point, or NULL if not - available. Input must be a point.

Synopsis

float ST_Y(geometry a_point);

Description

Return the Y coordinate of the point, or NULL if not - available. Input must be a point.

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1.

This method implements the SQL/MM specification. SQL-MM 3: 6.1.4

- This function supports 3d and will not drop the z-index.

Examples

SELECT ST_Y(ST_GeomFromEWKT('POINT(1 2 3 4)'));
- st_y
-------
-	2
-(1 row)
-
-SELECT ST_Y(ST_Centroid(ST_GeomFromEWKT('LINESTRING(1 2 3 4, 1 1 1 1)')));
- st_y
-------
-  1.5
-(1 row)
-
-
-		

Name

ST_Z — Return the Z coordinate of the point, or NULL if not - available. Input must be a point.

Synopsis

float ST_Z(geometry a_point);

Description

Return the Z coordinate of the point, or NULL if not - available. Input must be a point.

This method implements the SQL/MM specification.

- This function supports 3d and will not drop the z-index.

Examples

SELECT ST_Z(ST_GeomFromEWKT('POINT(1 2 3 4)'));
- st_z
-------
-	3
-(1 row)
-
-		

Name

ST_Zmflag — Returns ZM (dimension semantic) flag of the geometries as a - small int. Values are: 0=2d, 1=3dm, 2=3dz, 3=4d.

Synopsis

smallint ST_Zmflag(geometry geomA);

Description

Returns ZM (dimension semantic) flag of the geometries as a - small int. Values are: 0=2d, 1=3dm, 2=3dz, 3=4d.

- This function supports 3d and will not drop the z-index.

- This method supports Circular Strings and Curves

Examples

SELECT ST_Zmflag(ST_GeomFromEWKT('LINESTRING(1 2, 3 4)'));
- st_zmflag
------------
-		 0
-
-SELECT ST_Zmflag(ST_GeomFromEWKT('LINESTRINGM(1 2 3, 3 4 3)'));
- st_zmflag
------------
-		 1
-
-SELECT ST_Zmflag(ST_GeomFromEWKT('CIRCULARSTRING(1 2 3, 3 4 3, 5 6 3)'));
- st_zmflag
------------
-		 2
-SELECT ST_Zmflag(ST_GeomFromEWKT('POINT(1 2 3 4)'));
- st_zmflag
------------
-		 3
-

7.5. Geometry Editors

ST_AddPoint — Adds a point to a LineString before point <position> - (0-based index).
ST_Affine — Applies a 3d affine transformation to the geometry to do things like translate, rotate, scale in one step.
ST_Force_2D — Forces the geometries into a "2-dimensional mode" so that - all output representations will only have the X and Y coordinates.
ST_Force_3D — Forces the geometries into XYZ mode. This is an alias for ST_Force_3DZ.
ST_Force_3DZ — Forces the geometries into XYZ mode. This is a synonym for ST_Force_3D.
ST_Force_3DM — Forces the geometries into XYM mode.
ST_Force_4D — Forces the geometries into XYZM mode.
ST_Force_Collection — Converts the geometry into a GEOMETRYCOLLECTION.
ST_ForceRHR — Forces the orientation of the vertices in a polygon to follow the - Right-Hand-Rule.
ST_LineMerge — Returns a (set of) LineString(s) formed by sewing together - a MULTILINESTRING.
ST_CollectionExtract — Given a GEOMETRYCOLLECTION, returns a MULTI* geometry consisting only of the specified type. Sub-geometries that are not - the specified type are ignored. If there are no sub-geometries of the right type, an EMPTY collection will be returned. Only - points, lines and polygons are supported. Type numbers are 1 == POINT, 2 == LINESTRING, 3 == POLYGON.
ST_Multi — Returns the geometry as a MULTI* geometry. If the geometry - is already a MULTI*, it is returned unchanged.
ST_RemovePoint — Removes point from a linestring. Offset is 0-based.
ST_Reverse — Returns the geometry with vertex order reversed.
ST_Rotate — This is a synonym for ST_RotateZ
ST_RotateX — Rotate a geometry rotRadians about the X axis.
ST_RotateY — Rotate a geometry rotRadians about the Y axis.
ST_RotateZ — Rotate a geometry rotRadians about the Z axis.
ST_Scale — Scales the geometry to a new size by multiplying the - ordinates with the parameters. Ie: ST_Scale(geom, Xfactor, Yfactor, - Zfactor). -
ST_Segmentize — Return a modified geometry having no segment longer than the - given distance. Distance computation is performed in 2d - only.
ST_SetPoint — Replace point N of linestring with given point. Index is - 0-based.
ST_SetSRID — Sets the SRID on a geometry to a particular integer - value.
ST_SnapToGrid — Snap all points of the input geometry to the grid defined by - its origin and cell size. Remove consecutive points falling on the - same cell, eventually returning NULL if output points are not - enough to define a geometry of the given type. Collapsed - geometries in a collection are stripped from it. Useful for reducing precision.
ST_Transform — Returns a new geometry with its coordinates transformed to - the SRID referenced by the integer parameter.
ST_Translate — Translates the geometry to a new location using the numeric - parameters as offsets. Ie: ST_Translate(geom, X, Y) or ST_Translate(geom, X, Y,Z).
ST_TransScale — Translates the geometry using the deltaX and deltaY args, - then scales it using the XFactor, YFactor args, working in 2D only. -

Name

ST_AddPoint — Adds a point to a LineString before point <position> - (0-based index).

Synopsis

geometry ST_AddPoint(geometry linestring, geometry point);

geometry ST_AddPoint(geometry linestring, geometry point, integer position);

Description

Adds a point to a LineString before point <position> - (0-based index). Third parameter can be omitted or set to -1 for - appending.

Availability: 1.1.0

- This function supports 3d and will not drop the z-index.

Examples

-		--guarantee all linestrings in a table are closed
-		--by adding the start point of each linestring to the end of the line string
-		--only for those that are not closed
-		UPDATE sometable
-		SET the_geom = ST_AddPoint(the_geom, ST_StartPoint(the_geom))
-		FROM sometable
-		WHERE ST_IsClosed(the_geom) = false;
-
-		--Adding point to a 3-d line
-		SELECT ST_AsEWKT(ST_AddPoint(ST_GeomFromEWKT('LINESTRING(0 0 1, 1 1 1)'), ST_MakePoint(1, 2, 3)));
-
-		--result
-		st_asewkt
-		----------
-		LINESTRING(0 0 1,1 1 1,1 2 3)
-			

Name

ST_Affine — Applies a 3d affine transformation to the geometry to do things like translate, rotate, scale in one step.

Synopsis

geometry ST_Affine(geometry geomA, float a, float b, float c, float d, float e, float f, float g, float h, float i, float xoff, float yoff, float zoff);

geometry ST_Affine(geometry geomA, float a, float b, float d, float e, > - float xoff, float yoff);

Description

Applies a 3d affine transformation to the geometry to do things like translate, rotate, scale in one step.

- Version 1: The - call

ST_Affine(geom, a, b, c, d, e, f, g, h, i, xoff, yoff, zoff) 

- represents the transformation matrix

/ a  b  c  xoff \
-| d  e  f  yoff |
-| g  h  i  zoff |
-\ 0  0  0     1 /

and the vertices are transformed as - follows:

x' = a*x + b*y + c*z + xoff
-y' = d*x + e*y + f*z + yoff
-z' = g*x + h*y + i*z + zoff

All of the translate / scale - functions below are expressed via such an affine - transformation.

Version 2: Applies a 2d affine transformation to the geometry. The - call

ST_Affine(geom, a, b, d, e, xoff, yoff)

- represents the transformation matrix

/  a  b  0  xoff  \       /  a  b  xoff  \
-|  d  e  0  yoff  | rsp.  |  d  e  yoff  |
-|  0  0  1     0  |       \  0  0     1  /
-\  0  0  0     1  /

and the vertices are transformed as - follows:

x' = a*x + b*y + xoff
-y' = d*x + e*y + yoff
-z' = z 

This method is a subcase of the 3D method - above.

Availability: 1.1.2. Name changed from Affine to ST_Affine in 1.2.2

[Note]

Prior to 1.3.4, this function crashes if used with geometries that contain CURVES. This is fixed in 1.3.4+

- This function supports 3d and will not drop the z-index.

- This method supports Circular Strings and Curves

Examples

---Rotate a 3d line 180 degrees about the z axis.  Note this is long-hand for doing ST_RotateZ();
- SELECT ST_AsEWKT(ST_Affine(the_geom,  cos(pi()), -sin(pi()), 0,  sin(pi()), cos(pi()), 0,  0, 0, 1,  0, 0, 0)) As using_affine,
-	 ST_AsEWKT(ST_RotateZ(the_geom, pi())) As using_rotatez
-	FROM (SELECT ST_GeomFromEWKT('LINESTRING(1 2 3, 1 4 3)') As the_geom) As foo;
-		using_affine         |        using_rotatez
------------------------------+-----------------------------
- LINESTRING(-1 -2 3,-1 -4 3) | LINESTRING(-1 -2 3,-1 -4 3)
-(1 row)
-
---Rotate a 3d line 180 degrees in both the x and z axis
-SELECT ST_AsEWKT(ST_Affine(the_geom, cos(pi()), -sin(pi()), 0, sin(pi()), cos(pi()), -sin(pi()), 0, sin(pi()), cos(pi()), 0, 0, 0))
-	FROM (SELECT ST_GeomFromEWKT('LINESTRING(1 2 3, 1 4 3)') As the_geom) As foo;
-		   st_asewkt
--------------------------------
- LINESTRING(-1 -2 -3,-1 -4 -3)
-(1 row)
-
-		

Name

ST_Force_2D — Forces the geometries into a "2-dimensional mode" so that - all output representations will only have the X and Y coordinates.

Synopsis

geometry ST_Force_2D(geometry geomA);

Description

Forces the geometries into a "2-dimensional mode" so that - all output representations will only have the X and Y coordinates. - This is useful for force OGC-compliant output (since OGC only - specifies 2-D geometries).

- This method supports Circular Strings and Curves

Examples

SELECT ST_AsEWKT(ST_Force_2D(ST_GeomFromEWKT('CIRCULARSTRING(1 1 2, 2 3 2, 4 5 2, 6 7 2, 5 6 2)')));
-		st_asewkt
--------------------------------------
-CIRCULARSTRING(1 1,2 3,4 5,6 7,5 6)
-
-SELECT  ST_AsEWKT(ST_Force_2D('POLYGON((0 0 2,0 5 2,5 0 2,0 0 2),(1 1 2,3 1 2,1 3 2,1 1 2))'));
-
-				  st_asewkt
-----------------------------------------------
- POLYGON((0 0,0 5,5 0,0 0),(1 1,3 1,1 3,1 1))
-
-		

See Also

ST_Force_3D


Name

ST_Force_3D — Forces the geometries into XYZ mode. This is an alias for ST_Force_3DZ.

Synopsis

geometry ST_Force_3D(geometry geomA);

Description

Forces the geometries into XYZ mode. This is an alias for ST_Force_3DZ. If a geometry has no Z component, then a 0 Z coordinate is tacked on.

- This function supports 3d and will not drop the z-index.

- This method supports Circular Strings and Curves

Examples

-		--Nothing happens to an already 3D geometry
-		SELECT ST_AsEWKT(ST_Force_3D(ST_GeomFromEWKT('CIRCULARSTRING(1 1 2, 2 3 2, 4 5 2, 6 7 2, 5 6 2)')));
-				   st_asewkt
------------------------------------------------
- CIRCULARSTRING(1 1 2,2 3 2,4 5 2,6 7 2,5 6 2)
-
-
-SELECT  ST_AsEWKT(ST_Force_3D('POLYGON((0 0,0 5,5 0,0 0),(1 1,3 1,1 3,1 1))'));
-
-						 st_asewkt
---------------------------------------------------------------
- POLYGON((0 0 0,0 5 0,5 0 0,0 0 0),(1 1 0,3 1 0,1 3 0,1 1 0))
-		

Name

ST_Force_3DZ — Forces the geometries into XYZ mode. This is a synonym for ST_Force_3D.

Synopsis

geometry ST_Force_3DZ(geometry geomA);

Description

Forces the geometries into XYZ mode. This is a synonym for ST_Force_3DZ. If a geometry has no Z component, then a 0 Z coordinate is tacked on.

- This function supports 3d and will not drop the z-index.

- This method supports Circular Strings and Curves

Examples

---Nothing happens to an already 3D geometry
-SELECT ST_AsEWKT(ST_Force_3DZ(ST_GeomFromEWKT('CIRCULARSTRING(1 1 2, 2 3 2, 4 5 2, 6 7 2, 5 6 2)')));
-				   st_asewkt
------------------------------------------------
- CIRCULARSTRING(1 1 2,2 3 2,4 5 2,6 7 2,5 6 2)
-
-
-SELECT  ST_AsEWKT(ST_Force_3DZ('POLYGON((0 0,0 5,5 0,0 0),(1 1,3 1,1 3,1 1))'));
-
-						 st_asewkt
---------------------------------------------------------------
- POLYGON((0 0 0,0 5 0,5 0 0,0 0 0),(1 1 0,3 1 0,1 3 0,1 1 0))
-		

Name

ST_Force_3DM — Forces the geometries into XYM mode.

Synopsis

geometry ST_Force_3DM(geometry geomA);

Description

Forces the geometries into XYM mode. If a geometry has no M component, then a 0 M coordinate is tacked on. If it has a Z component, then Z is removed

- This method supports Circular Strings and Curves

Examples

---Nothing happens to an already 3D geometry
-SELECT ST_AsEWKT(ST_Force_3DM(ST_GeomFromEWKT('CIRCULARSTRING(1 1 2, 2 3 2, 4 5 2, 6 7 2, 5 6 2)')));
-				   st_asewkt
-------------------------------------------------
- CIRCULARSTRINGM(1 1 0,2 3 0,4 5 0,6 7 0,5 6 0)
-
-
-SELECT  ST_AsEWKT(ST_Force_3DM('POLYGON((0 0 1,0 5 1,5 0 1,0 0 1),(1 1 1,3 1 1,1 3 1,1 1 1))'));
-
-						  st_asewkt
----------------------------------------------------------------
- POLYGONM((0 0 0,0 5 0,5 0 0,0 0 0),(1 1 0,3 1 0,1 3 0,1 1 0))
-
-		

Name

ST_Force_4D — Forces the geometries into XYZM mode.

Synopsis

geometry ST_Force_4D(geometry geomA);

Description

Forces the geometries into XYZM mode. 0 is tacked on for missing Z and M dimensions.

- This function supports 3d and will not drop the z-index.

- This method supports Circular Strings and Curves

Examples

---Nothing happens to an already 3D geometry
-SELECT ST_AsEWKT(ST_Force_4D(ST_GeomFromEWKT('CIRCULARSTRING(1 1 2, 2 3 2, 4 5 2, 6 7 2, 5 6 2)')));
-						st_asewkt
----------------------------------------------------------
- CIRCULARSTRING(1 1 2 0,2 3 2 0,4 5 2 0,6 7 2 0,5 6 2 0)
-
-
-
-SELECT  ST_AsEWKT(ST_Force_4D('MULTILINESTRINGM((0 0 1,0 5 2,5 0 3,0 0 4),(1 1 1,3 1 1,1 3 1,1 1 1))'));
-
-									  st_asewkt
---------------------------------------------------------------------------------------
- MULTILINESTRING((0 0 0 1,0 5 0 2,5 0 0 3,0 0 0 4),(1 1 0 1,3 1 0 1,1 3 0 1,1 1 0 1))
-
-		

Name

ST_Force_Collection — Converts the geometry into a GEOMETRYCOLLECTION.

Synopsis

geometry ST_Force_Collection(geometry geomA);

Description

Converts the geometry into a GEOMETRYCOLLECTION. This is - useful for simplifying the WKB representation.

Availability: 1.2.2, prior to 1.3.4 this function will crash with Curves. This is fixed in 1.3.4+

- This function supports 3d and will not drop the z-index.

- This method supports Circular Strings and Curves

Examples

-
-SELECT  ST_AsEWKT(ST_Force_Collection('POLYGON((0 0 1,0 5 1,5 0 1,0 0 1),(1 1 1,3 1 1,1 3 1,1 1 1))'));
-
-								   st_asewkt
-----------------------------------------------------------------------------------
- GEOMETRYCOLLECTION(POLYGON((0 0 1,0 5 1,5 0 1,0 0 1),(1 1 1,3 1 1,1 3 1,1 1 1)))
-
-
-  SELECT ST_AsText(ST_Force_Collection('CIRCULARSTRING(220227 150406,2220227 150407,220227 150406)'));
-								   st_astext
---------------------------------------------------------------------------------
- GEOMETRYCOLLECTION(CIRCULARSTRING(220227 150406,2220227 150407,220227 150406))
-(1 row)
-
-		

Name

ST_ForceRHR — Forces the orientation of the vertices in a polygon to follow the - Right-Hand-Rule.

Synopsis

boolean - ST_ForceRHR(geometry g);

Description

Forces the orientation of the vertices in a polygon to follow the - Right-Hand-Rule. In GIS terminology, this means that the area that is bounded by the - polygon is to the right of the boundary. In particular, the exterior ring is - orientated in a clockwise direction and the interior rings in a counter-clockwise - direction.

- This function supports 3d and will not drop the z-index.

Examples

SELECT ST_AsEWKT(
-  ST_ForceRHR(
-	'POLYGON((0 0 2, 5 0 2, 0 5 2, 0 0 2),(1 1 2, 1 3 2, 3 1 2, 1 1 2))'
-  )
-);
-						  st_asewkt
---------------------------------------------------------------
- POLYGON((0 0 2,0 5 2,5 0 2,0 0 2),(1 1 2,3 1 2,1 3 2,1 1 2))
-(1 row)

Name

ST_LineMerge — Returns a (set of) LineString(s) formed by sewing together - a MULTILINESTRING.

Synopsis

geometry ST_LineMerge(geometry amultilinestring);

Description

Returns a (set of) LineString(s) formed by sewing together - the constituent line work of a MULTILINESTRING.

[Note]

Only use with MULTILINESTRING/LINESTRINGs. If you feed a polygon or geometry collection into this function, it - will return an empty GEOMETRYCOLLECTION

Availability: 1.1.0

[Note]

requires GEOS >= 2.1.0

Examples

SELECT ST_AsText(ST_LineMerge(
-ST_GeomFromText('MULTILINESTRING((-29 -27,-30 -29.7,-36 -31,-45 -33),(-45 -33,-46 -32))')
-		)
-);
-st_astext
---------------------------------------------------------------------------------------------------
-LINESTRING(-29 -27,-30 -29.7,-36 -31,-45 -33,-46 -32)
-(1 row)
-
---If can't be merged - original MULTILINESTRING is returned
-SELECT ST_AsText(ST_LineMerge(
-ST_GeomFromText('MULTILINESTRING((-29 -27,-30 -29.7,-36 -31,-45 -33),(-45.2 -33.2,-46 -32))')
-)
-);
-st_astext
-----------------
-MULTILINESTRING((-45.2 -33.2,-46 -32),(-29 -27,-30 -29.7,-36 -31,-45 -33))
-			

Name

ST_CollectionExtract — Given a GEOMETRYCOLLECTION, returns a MULTI* geometry consisting only of the specified type. Sub-geometries that are not - the specified type are ignored. If there are no sub-geometries of the right type, an EMPTY collection will be returned. Only - points, lines and polygons are supported. Type numbers are 1 == POINT, 2 == LINESTRING, 3 == POLYGON.

Synopsis

geometry ST_CollectionExtract(geometry collection, integer type);

Description

Given a GEOMETRYCOLLECTION, returns a MULTI* geometry consisting only of the specified type. Sub-geometries that are not - the specified type are ignored. If there are no sub-geometries of the right type, an EMPTY collection will be returned. Only - points, lines and polygons are supported. Type numbers are 1 == POINT, 2 == LINESTRING, 3 == POLYGON.

Availability: 1.5.0

Examples

-- Constants: 1 == POINT, 2 == LINESTRING, 3 == POLYGON
-SELECT ST_AsText(ST_CollectionExtract(ST_GeomFromText('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POINT(0 0)))'),1));
-st_astext
----------------
-MULTIPOINT(0 0)
-(1 row)
-
-SELECT ST_AsText(ST_CollectionExtract(ST_GeomFromText('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(LINESTRING(0 0, 1 1)),LINESTRING(2 2, 3 3))'),2));
-st_astext
----------------
-MULTILINESTRING((0 0, 1 1), (2 2, 3 3))
-(1 row)
-			

See Also

ST_Multi


Name

ST_Multi — Returns the geometry as a MULTI* geometry. If the geometry - is already a MULTI*, it is returned unchanged.

Synopsis

geometry ST_Multi(geometry g1);

Description

Returns the geometry as a MULTI* geometry. If the geometry - is already a MULTI*, it is returned unchanged.

Examples

SELECT ST_AsText(ST_Multi(ST_GeomFromText('POLYGON((743238 2967416,743238 2967450,
-			743265 2967450,743265.625 2967416,743238 2967416))')));
-			st_astext
-			--------------------------------------------------------------------------------------------------
-			MULTIPOLYGON(((743238 2967416,743238 2967450,743265 2967450,743265.625 2967416,
-			743238 2967416)))
-			(1 row)
-			

See Also

ST_AsText


Name

ST_RemovePoint — Removes point from a linestring. Offset is 0-based.

Synopsis

geometry ST_RemovePoint(geometry linestring, integer offset);

Description

Removes point from a linestring. Useful for turning a closed ring into an open line string

Availability: 1.1.0

- This function supports 3d and will not drop the z-index.

Examples

---guarantee no LINESTRINGS are closed
---by removing the end point.  The below assumes the_geom is of type LINESTRING
-UPDATE sometable
-	SET the_geom = ST_RemovePoint(the_geom, ST_NPoints(the_geom) - 1)
-	FROM sometable
-	WHERE ST_IsClosed(the_geom) = true;
-		

Name

ST_Reverse — Returns the geometry with vertex order reversed.

Synopsis

geometry ST_Reverse(geometry g1);

Description

Can be used on any geometry and reverses the order of the vertexes.

Examples

-SELECT ST_AsText(the_geom) as line, ST_AsText(ST_Reverse(the_geom)) As reverseline
-FROM
-(SELECT ST_MakeLine(ST_MakePoint(1,2),
-		ST_MakePoint(1,10)) As the_geom) as foo;
---result
-		line         |     reverseline
----------------------+----------------------
-LINESTRING(1 2,1 10) | LINESTRING(1 10,1 2)
-

Name

ST_Rotate — This is a synonym for ST_RotateZ

Synopsis

geometry ST_Rotate(geometry geomA, float rotZRadians);

Description

This is a synonym for ST_RotateZ.. Rotates geometry rotZRadians about the Z-axis.

Availability: 1.1.2. Name changed from Rotate to ST_Rotate in 1.2.2

- This function supports 3d and will not drop the z-index.

- This method supports Circular Strings and Curves

Examples


Name

ST_RotateX — Rotate a geometry rotRadians about the X axis.

Synopsis

geometry ST_RotateX(geometry geomA, float rotRadians);

Description

Rotate a geometry geomA - rotRadians about the X axis.

[Note]

ST_RotateX(geomA, rotRadians) - is short-hand for ST_Affine(geomA, 1, 0, 0, 0, cos(rotRadians), -sin(rotRadians), 0, sin(rotRadians), cos(rotRadians), 0, 0, 0).

Availability: 1.1.2. Name changed from RotateX to ST_RotateX in 1.2.2

- This function supports 3d and will not drop the z-index.

Examples

---Rotate a line 90 degrees along x-axis
-SELECT ST_AsEWKT(ST_RotateX(ST_GeomFromEWKT('LINESTRING(1 2 3, 1 1 1)'), pi()/2));
-		 st_asewkt
----------------------------
- LINESTRING(1 -3 2,1 -1 1)
-

Name

ST_RotateY — Rotate a geometry rotRadians about the Y axis.

Synopsis

geometry ST_RotateY(geometry geomA, float rotRadians);

Description

Rotate a geometry geomA - rotRadians about the y axis.

[Note]

ST_RotateY(geomA, rotRadians) - is short-hand for ST_Affine(geomA, cos(rotRadians), 0, sin(rotRadians), 0, 1, 0, -sin(rotRadians), 0, cos(rotRadians), 0, 0, 0).

Availability: 1.1.2. Name changed from RotateY to ST_RotateY in 1.2.2

- This function supports 3d and will not drop the z-index.

Examples

---Rotate a line 90 degrees along y-axis
- SELECT ST_AsEWKT(ST_RotateY(ST_GeomFromEWKT('LINESTRING(1 2 3, 1 1 1)'), pi()/2));
-		 st_asewkt
----------------------------
- LINESTRING(3 2 -1,1 1 -1)
-

Name

ST_RotateZ — Rotate a geometry rotRadians about the Z axis.

Synopsis

geometry ST_RotateZ(geometry geomA, float rotRadians);

Description

Rotate a geometry geomA - rotRadians about the Z axis.

[Note]

ST_RotateZ(geomA, rotRadians) - is short-hand for SELECT ST_Affine(geomA, cos(rotRadians), -sin(rotRadians), 0, sin(rotRadians), cos(rotRadians), 0, 0, 0, 1, 0, 0, 0).

Availability: 1.1.2. Name changed from RotateZ to ST_RotateZ in 1.2.2

[Note]

Prior to 1.3.4, this function crashes if used with geometries that contain CURVES. This is fixed in 1.3.4+

- This function supports 3d and will not drop the z-index.

- This method supports Circular Strings and Curves

Examples

---Rotate a line 90 degrees along z-axis
-SELECT ST_AsEWKT(ST_RotateZ(ST_GeomFromEWKT('LINESTRING(1 2 3, 1 1 1)'), pi()/2));
-		 st_asewkt
----------------------------
- LINESTRING(-2 1 3,-1 1 1)
-
- --Rotate a curved circle around z-axis
-SELECT ST_AsEWKT(ST_RotateZ(the_geom, pi()/2))
-FROM (SELECT ST_LineToCurve(ST_Buffer(ST_GeomFromText('POINT(234 567)'), 3)) As the_geom) As foo;
-
-													   st_asewkt
-----------------------------------------------------------------------------------------------------------------------------
- CURVEPOLYGON(CIRCULARSTRING(-567 237,-564.87867965644 236.12132034356,-564 234,-569.12132034356 231.87867965644,-567 237))
-
-

Name

ST_Scale — Scales the geometry to a new size by multiplying the - ordinates with the parameters. Ie: ST_Scale(geom, Xfactor, Yfactor, - Zfactor). -

Synopsis

geometry ST_Scale(geometry geomA, float XFactor, float YFactor, float ZFactor);

geometry ST_Scale(geometry geomA, float XFactor, float YFactor);

Description

Scales the geometry to a new size by multiplying the - ordinates with the parameters. Ie: ST_Scale(geom, Xfactor, Yfactor, - Zfactor).

[Note]

ST_Scale(geomA, XFactor, YFactor, ZFactor) - is short-hand for ST_Affine(geomA, XFactor, 0, 0, 0, YFactor, 0, 0, 0, ZFactor, 0, 0, 0).

[Note]

Prior to 1.3.4, this function crashes if used with geometries that contain CURVES. This is fixed in 1.3.4+

Availability: 1.1.0.

- This function supports 3d and will not drop the z-index.

- This method supports Circular Strings and Curves

Examples

--Version 1: scale X, Y, Z
-SELECT ST_AsEWKT(ST_Scale(ST_GeomFromEWKT('LINESTRING(1 2 3, 1 1 1)'), 0.5, 0.75, 0.8));
-			  st_asewkt
---------------------------------------
- LINESTRING(0.5 1.5 2.4,0.5 0.75 0.8)
-
---Version 2: Scale X Y
- SELECT ST_AsEWKT(ST_Scale(ST_GeomFromEWKT('LINESTRING(1 2 3, 1 1 1)'), 0.5, 0.75));
-			st_asewkt
-----------------------------------
- LINESTRING(0.5 1.5 3,0.5 0.75 1)
-
-
-

Name

ST_Segmentize — Return a modified geometry having no segment longer than the - given distance. Distance computation is performed in 2d - only.

Synopsis

geometry ST_Segmentize(geometry geomA, float max_length);

Description

Returns a modified geometry having no segment longer than the - given distance. Distance computation is performed in 2d - only.

Availability: 1.2.2

[Note]

This will only increase segments. It will not lengthen segments shorter than - max length

Examples

SELECT ST_AsText(ST_Segmentize(
-ST_GeomFromText('MULTILINESTRING((-29 -27,-30 -29.7,-36 -31,-45 -33),(-45 -33,-46 -32))')
-		,5)
-);
-st_astext
---------------------------------------------------------------------------------------------------
-MULTILINESTRING((-29 -27,-30 -29.7,-34.886615700134 -30.758766735029,-36 -31,
--40.8809353009198 -32.0846522890933,-45 -33),
-(-45 -33,-46 -32))
-(1 row)
-
-SELECT ST_AsText(ST_Segmentize(ST_GeomFromText('POLYGON((-29 28, -30 40, -29 28))'),10));
-st_astext
------------------------
-POLYGON((-29 28,-29.8304547985374 37.9654575824488,-30 40,-29.1695452014626 30.0345424175512,-29 28))
-(1 row)
-
-			

Name

ST_SetPoint — Replace point N of linestring with given point. Index is - 0-based.

Synopsis

geometry ST_SetPoint(geometry linestring, integer zerobasedposition, geometry point);

Description

Replace point N of linestring with given point. Index is - 0-based. - This is especially useful in triggers when trying to maintain relationship of joints when one vertex moves.

Availability: 1.1.0

- This function supports 3d and will not drop the z-index.

Examples

---Change first point in line string from -1 3 to -1 1
-SELECT ST_AsText(ST_SetPoint('LINESTRING(-1 2,-1 3)', 0, 'POINT(-1 1)'));
-	   st_astext
------------------------
- LINESTRING(-1 1,-1 3)
-
----Change last point in a line string (lets play with 3d linestring this time)
-SELECT ST_AsEWKT(ST_SetPoint(foo.the_geom, ST_NumPoints(foo.the_geom) - 1, ST_GeomFromEWKT('POINT(-1 1 3)')))
-FROM (SELECT ST_GeomFromEWKT('LINESTRING(-1 2 3,-1 3 4, 5 6 7)') As the_geom) As foo;
-	   st_asewkt
------------------------
-LINESTRING(-1 2 3,-1 3 4,-1 1 3)
-			

Name

ST_SetSRID — Sets the SRID on a geometry to a particular integer - value.

Synopsis

geometry ST_SetSRID(geometry - geom, integer - srid);

Description

Sets the SRID on a geometry to a particular integer value. - Useful in constructing bounding boxes for queries.

[Note]

This function does not transform the geometry coordinates in any way - - it simply sets the meta data defining the spatial reference system the geometry is assumed to be in. - Use ST_Transform if you want to transform the - geometry into a new projection.

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1.

- This method supports Circular Strings and Curves

Examples

-- Mark a point as WGS 84 long lat --

SELECT ST_SetSRID(ST_Point(-123.365556, 48.428611),4326) As wgs84long_lat;
--- the ewkt representation (wrap with ST_AsEWKT) -
-SRID=4326;POINT(-123.365556 48.428611)
-			

-- Mark a point as WGS 84 long lat and then transform to web mercator (Spherical Mercator) --

SELECT ST_Transform(ST_SetSRID(ST_Point(-123.365556, 48.428611),4326),3785) As spere_merc;
--- the ewkt representation (wrap with ST_AsEWKT) -
-SRID=3785;POINT(-13732990.8753491 6178458.96425423)
-			

Name

ST_SnapToGrid — Snap all points of the input geometry to the grid defined by - its origin and cell size. Remove consecutive points falling on the - same cell, eventually returning NULL if output points are not - enough to define a geometry of the given type. Collapsed - geometries in a collection are stripped from it. Useful for reducing precision.

Synopsis

geometry ST_SnapToGrid(geometry geomA, float originX, float originY, float sizeX, float sizeY);

geometry ST_SnapToGrid(geometry geomA, float sizeX, float sizeY);

geometry ST_SnapToGrid(geometry geomA, float size);

geometry ST_SnapToGrid(geometry geomA, geometry pointOrigin, float sizeX, float sizeY, float sizeZ, float sizeM);

Description

Variant 1,2,3: Snap all points of the input geometry to the grid defined by - its origin and cell size. Remove consecutive points falling on the - same cell, eventually returning NULL if output points are not - enough to define a geometry of the given type. Collapsed - geometries in a collection are stripped from it. -

Variant 4: Introduced 1.1.0 - Snap all points of the input geometry to the grid defined by - its origin (the second argument, must be a point) and cell sizes. - Specify 0 as size for any dimension you don't want to snap to a - grid.

[Note]

The returned geometry might loose its simplicity (see - ST_IsSimple).

[Note]

Before release 1.1.0 this function always returned a 2d - geometry. Starting at 1.1.0 the returned geometry will have same - dimensionality as the input one with higher dimension values - untouched. Use the version taking a second geometry argument to - define all grid dimensions.

Availability: 1.0.0RC1

Availability: 1.1.0 - Z and M support

- This function supports 3d and will not drop the z-index.

Examples

---Snap your geometries to a precision grid of 10^-3
-UPDATE mytable
-   SET the_geom = ST_SnapToGrid(the_geom, 0.001);
-
-SELECT ST_AsText(ST_SnapToGrid(
-			ST_GeomFromText('LINESTRING(1.1115678 2.123, 4.111111 3.2374897, 4.11112 3.23748667)'),
-			0.001)
-		);
-			  st_astext
--------------------------------------
- LINESTRING(1.112 2.123,4.111 3.237)
- --Snap a 4d geometry
-SELECT ST_AsEWKT(ST_SnapToGrid(
-	ST_GeomFromEWKT('LINESTRING(-1.1115678 2.123 2.3456 1.11111,
-		4.111111 3.2374897 3.1234 1.1111, -1.11111112 2.123 2.3456 1.1111112)'),
- ST_GeomFromEWKT('POINT(1.12 2.22 3.2 4.4444)'),
- 0.1, 0.1, 0.1, 0.01) );
-								  st_asewkt
-------------------------------------------------------------------------------
- LINESTRING(-1.08 2.12 2.3 1.1144,4.12 3.22 3.1 1.1144,-1.08 2.12 2.3 1.1144)
-
-
---With a 4d geometry - the ST_SnapToGrid(geom,size) only touches x and y coords but keeps m and z the same
-SELECT ST_AsEWKT(ST_SnapToGrid(ST_GeomFromEWKT('LINESTRING(-1.1115678 2.123 3 2.3456,
-		4.111111 3.2374897 3.1234 1.1111)'),
-	   0.01)      );
-						st_asewkt
----------------------------------------------------------
- LINESTRING(-1.11 2.12 3 2.3456,4.11 3.24 3.1234 1.1111)
-
-		

Name

ST_Transform — Returns a new geometry with its coordinates transformed to - the SRID referenced by the integer parameter.

Synopsis

geometry ST_Transform(geometry g1, integer srid);

Description

Returns a new geometry with its coordinates transformed to - spatial reference system referenced by the SRID integer parameter. The destination SRID - must exist in the SPATIAL_REF_SYS table.

ST_Transform is often confused with ST_SetSRID(). ST_Transform actually changes the coordinates - of a geometry from one spatial reference system to another, while ST_SetSRID() simply changes the SRID identifier of - the geometry

[Note]

Requires PostGIS be compiled with Proj support. Use PostGIS_Full_Version to confirm you have proj support compiled in.

[Note]

If using more than one transformation, it is useful to have a functional index on the commonly used - transformations to take advantage of index usage.

[Note]

Prior to 1.3.4, this function crashes if used with geometries that contain CURVES. This is fixed in 1.3.4+

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1.

This method implements the SQL/MM specification. SQL-MM 3: 5.1.6

- This method supports Circular Strings and Curves

Examples

Change Mass state plane US feet geometry to WGS 84 long lat

-SELECT ST_AsText(ST_Transform(ST_GeomFromText('POLYGON((743238 2967416,743238 2967450,
-	743265 2967450,743265.625 2967416,743238 2967416))',2249),4326)) As wgs_geom;
-
- wgs_geom
----------------------------
- POLYGON((-71.1776848522251 42.3902896512902,-71.1776843766326 42.3903829478009,
--71.1775844305465 42.3903826677917,-71.1775825927231 42.3902893647987,-71.177684
-8522251 42.3902896512902));
-(1 row)
-
---3D Circular String example
-SELECT ST_AsEWKT(ST_Transform(ST_GeomFromEWKT('SRID=2249;CIRCULARSTRING(743238 2967416 1,743238 2967450 2,743265 2967450 3,743265.625 2967416 3,743238 2967416 4)'),4326));
-
-				 st_asewkt
---------------------------------------------------------------------------------------
- SRID=4326;CIRCULARSTRING(-71.1776848522251 42.3902896512902 1,-71.1776843766326 42.3903829478009 2,
- -71.1775844305465 42.3903826677917 3,
- -71.1775825927231 42.3902893647987 3,-71.1776848522251 42.3902896512902 4)
-
-		

Example of creating a partial functional index. For tables where you are not sure all the geometries - will be filled in, its best to use a partial index that leaves out null geometries which will both conserve space and make your index smaller and more efficient.

-CREATE INDEX idx_the_geom_26986_parcels
-  ON parcels
-  USING gist
-  (ST_Transform(the_geom, 26986))
-  WHERE the_geom IS NOT NULL;
-		

Configuring transformation behaviour

Sometimes coordinate transformation involving a grid-shift can fail, for example if PROJ.4 has not been built with grid-shift files or the coordinate does not lie within the range for which the grid shift is defined. By default, PostGIS will throw an error if a grid shift file is not present, but this behaviour can be configured on a per-SRID basis by altering the proj4text value within the spatial_ref_sys table.

For example, the proj4text parameter +datum=NAD87 is a shorthand form for the following +nadgrids parameter:

+nadgrids=@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat

The @ prefix means no error is reported if the files are not present, but if the end of the list is reached with no file having been appropriate (ie. found and overlapping) then an error is issued.

If, conversely, you wanted to ensure that at least the standard files were present, but that if all files were scanned without a hit a null transformation is applied you could use:

+nadgrids=@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat,null

The null grid shift file is a valid grid shift file covering the whole world and applying no shift. So for a complete example, if you wanted to alter PostGIS so that transformations to SRID 4267 that didn't lie within the correct range did not throw an ERROR, you would use the following:

UPDATE spatial_ref_sys SET proj4text = '+proj=longlat +ellps=clrk66 +nadgrids=@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat,null +no_defs' WHERE srid = 4267;

Name

ST_Translate — Translates the geometry to a new location using the numeric - parameters as offsets. Ie: ST_Translate(geom, X, Y) or ST_Translate(geom, X, Y,Z).

Synopsis

geometry ST_Translate(geometry g1, float deltax, float deltay);

geometry ST_Translate(geometry g1, float deltax, float deltay, float deltaz);

Description

Returns a new geometry whose coordinates are translated delta x,delta y,delta z units. Units are - based on the units defined in spatial reference (SRID) for this geometry.

[Note]

Prior to 1.3.4, this function crashes if used with geometries that contain CURVES. This is fixed in 1.3.4+

Availability: 1.2.2

- This function supports 3d and will not drop the z-index.

- This method supports Circular Strings and Curves

Examples

Move a point 1 degree longitude

-	SELECT ST_AsText(ST_Translate(ST_GeomFromText('POINT(-71.01 42.37)',4326),1,0)) As wgs_transgeomtxt;
-
-	wgs_transgeomtxt
-	---------------------
-	POINT(-70.01 42.37)
-		

Move a linestring 1 degree longitude and 1/2 degree latitude

SELECT ST_AsText(ST_Translate(ST_GeomFromText('LINESTRING(-71.01 42.37,-71.11 42.38)',4326),1,0.5)) As wgs_transgeomtxt;
-		   wgs_transgeomtxt
-	---------------------------------------
-	LINESTRING(-70.01 42.87,-70.11 42.88)
-		

Move a 3d point

SELECT ST_AsEWKT(ST_Translate(CAST('POINT(0 0 0)' As geometry), 5, 12,3));
-	st_asewkt
-	---------
-	POINT(5 12 3)
-		

Move a curve and a point

SELECT ST_AsText(ST_Translate(ST_Collect('CURVEPOLYGON(CIRCULARSTRING(4 3,3.12 0.878,1 0,-1.121 5.1213,6 7, 8 9,4 3))','POINT(1 3)'),1,2));
-														 st_astext
-------------------------------------------------------------------------------------------------------------
- GEOMETRYCOLLECTION(CURVEPOLYGON(CIRCULARSTRING(5 5,4.12 2.878,2 2,-0.121 7.1213,7 9,9 11,5 5)),POINT(2 5))
-

Name

ST_TransScale — Translates the geometry using the deltaX and deltaY args, - then scales it using the XFactor, YFactor args, working in 2D only. -

Synopsis

geometry ST_TransScale(geometry geomA, float deltaX, float deltaY, float XFactor, float YFactor);

Description

Translates the geometry using the deltaX and deltaY args, - then scales it using the XFactor, YFactor args, working in 2D only.

[Note]

ST_TransScale(geomA, deltaX, deltaY, XFactor, YFactor) - is short-hand for ST_Affine(geomA, XFactor, 0, 0, 0, YFactor, 0, - 0, 0, 1, deltaX*XFactor, deltaY*YFactor, 0).

[Note]

Prior to 1.3.4, this function crashes if used with geometries that contain CURVES. This is fixed in 1.3.4+

Availability: 1.1.0.

- This function supports 3d and will not drop the z-index.

- This method supports Circular Strings and Curves

Examples

SELECT ST_AsEWKT(ST_TransScale(ST_GeomFromEWKT('LINESTRING(1 2 3, 1 1 1)'), 0.5, 1, 1, 2));
-		  st_asewkt
------------------------------
- LINESTRING(1.5 6 3,1.5 4 1)
-
-
---Buffer a point to get an approximation of a circle, convert to curve and then translate 1,2 and scale it 3,4
-  SELECT ST_AsText(ST_Transscale(ST_LineToCurve(ST_Buffer('POINT(234 567)', 3)),1,2,3,4));
-														  st_astext
-------------------------------------------------------------------------------------------------------------------------------
- CURVEPOLYGON(CIRCULARSTRING(714 2276,711.363961030679 2267.51471862576,705 2264,698.636038969321 2284.48528137424,714 2276))
-
-

7.6. Geometry Outputs

ST_AsBinary — Return the Well-Known Binary (WKB) representation of the geometry/geography without SRID meta data.
ST_AsEWKB — Return the Well-Known Binary (WKB) representation of the geometry with SRID meta data.
ST_AsEWKT — Return the Well-Known Text (WKT) representation of the geometry with SRID meta data.
ST_AsGeoJSON — Return the geometry as a GeoJSON element.
ST_AsGML — Return the geometry as a GML version 2 or 3 element.
ST_AsHEXEWKB — Returns a Geometry in HEXEWKB format (as text) using either - little-endian (NDR) or big-endian (XDR) encoding.
ST_AsKML — Return the geometry as a KML element. Several variants. Default version=2, default precision=15
ST_AsSVG — Returns a Geometry in SVG path data given a geometry or geography object.
ST_GeoHash — Return a GeoHash representation (geohash.org) of the geometry.
ST_AsText — Return the Well-Known Text (WKT) representation of the geometry/geography without SRID metadata.

Name

ST_AsBinary — Return the Well-Known Binary (WKB) representation of the geometry/geography without SRID meta data.

Synopsis

bytea ST_AsBinary(geometry g1);

bytea ST_AsBinary(geography g1);

bytea ST_AsBinary(geometry g1, text NDR_or_XDR);

Description

Returns the Well-Known Binary representation of the geometry. There are 2 variants of the function. The first - variant takes no endian encoding paramater and defaults to little endian. The second variant takes a second argument - denoting the encoding - using little-endian ('NDR') or big-endian ('XDR') encoding.

This is useful in binary cursors to pull data out of the - database without converting it to a string representation.

[Note]

The WKB spec does not include the SRID. To get the OGC WKB with SRID format use ST_AsEWKB

[Note]

ST_AsBinary is the reverse of ST_GeomFromWKB for geometry. Use ST_GeomFromWKB to convert to a postgis geometry from ST_AsBinary representation.

Availability: 1.5.0 geography support was introduced.

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1. s2.1.1.1

This method implements the SQL/MM specification. SQL-MM 3: 5.1.37

- This method supports Circular Strings and Curves

Examples

SELECT ST_AsBinary(ST_GeomFromText('POLYGON((0 0,0 1,1 1,1 0,0 0))',4326));
-
-		   st_asbinary
---------------------------------
-\001\003\000\000\000\001\000\000\000\005
-\000\000\000\000\000\000\000\000\000\000
-\000\000\000\000\000\000\000\000\000\000
-\000\000\000\000\000\000\000\000\000\000
-\000\000\000\360?\000\000\000\000\000\000
-\360?\000\000\000\000\000\000\360?\000\000
-\000\000\000\000\360?\000\000\000\000\000
-\000\000\000\000\000\000\000\000\000\000\000
-\000\000\000\000\000\000\000\000
-(1 row)
SELECT ST_AsBinary(ST_GeomFromText('POLYGON((0 0,0 1,1 1,1 0,0 0))',4326), 'XDR');
-		   st_asbinary
---------------------------------
-\000\000\000\000\003\000\000\000\001\000\000\000\005\000\000\000\000\000
-\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000
-\000?\360\000\000\000\000\000\000?\360\000\000\000\000\000\000?\360\000\000
-\000\000\000\000?\360\000\000\000\000\000\000\000\000\000\000\000\000\000\000
-\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000
-(1 row)

Name

ST_AsEWKB — Return the Well-Known Binary (WKB) representation of the geometry with SRID meta data.

Synopsis

bytea ST_AsEWKB(geometry g1);

bytea ST_AsEWKB(geometry g1, text NDR_or_XDR);

Description

Returns the Well-Known Binary representation of the geometry with SRID metadata. There are 2 variants of the function. The first - variant takes no endian encoding paramater and defaults to little endian. The second variant takes a second argument - denoting the encoding - using little-endian ('NDR') or big-endian ('XDR') encoding.

This is useful in binary cursors to pull data out of the - database without converting it to a string representation.

[Note]

The WKB spec does not include the SRID. To get the OGC WKB format use ST_AsBinary

[Note]

ST_AsEWKB is the reverse of ST_GeomFromEWKB. Use ST_GeomFromEWKB to convert to a postgis geometry from ST_AsEWKB representation.

- This function supports 3d and will not drop the z-index.

- This method supports Circular Strings and Curves

Examples

SELECT ST_AsEWKB(ST_GeomFromText('POLYGON((0 0,0 1,1 1,1 0,0 0))',4326));
-
-		   st_asewkb
---------------------------------
-\001\003\000\000 \346\020\000\000\001\000
-\000\000\005\000\000\000\000
-\000\000\000\000\000\000\000\000
-\000\000\000\000\000\000\000\000\000
-\000\000\000\000\000\000\000\000\000\000
-\000\000\360?\000\000\000\000\000\000\360?
-\000\000\000\000\000\000\360?\000\000\000\000\000
-\000\360?\000\000\000\000\000\000\000\000\000\000\000
-\000\000\000\000\000\000\000\000\000\000\000\000\000
-(1 row)
-			SELECT ST_AsEWKB(ST_GeomFromText('POLYGON((0 0,0 1,1 1,1 0,0 0))',4326), 'XDR');
-		   st_asewkb
---------------------------------
-\000 \000\000\003\000\000\020\346\000\000\000\001\000\000\000\005\000\000\000\000\
-000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000?
-\360\000\000\000\000\000\000?\360\000\000\000\000\000\000?\360\000\000\000\000
-\000\000?\360\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000
-\000\000\000\000\000\000\000\000\000\000\000\000\000
-		

Name

ST_AsEWKT — Return the Well-Known Text (WKT) representation of the geometry with SRID meta data.

Synopsis

text ST_AsEWKT(geometry g1);

Description

Returns the Well-Known Text representation of the geometry prefixed with the SRID.

[Note]

The WKT spec does not include the SRID. To get the OGC WKT format use ST_AsText

- WKT format does not maintain precision so to prevent floating truncation, use ST_AsBinary or ST_AsEWKB format for transport. -

[Note]

ST_AsEWKT is the reverse of ST_GeomFromEWKT. Use ST_GeomFromEWKT to convert to a postgis geometry from ST_AsEWKT representation.

- This function supports 3d and will not drop the z-index.

- This method supports Circular Strings and Curves

Examples

SELECT ST_AsEWKT('0103000020E61000000100000005000000000000
-			000000000000000000000000000000000000000000000000000000
-			F03F000000000000F03F000000000000F03F000000000000F03
-			F000000000000000000000000000000000000000000000000'::geometry);
-
-		   st_asewkt
---------------------------------
-SRID=4326;POLYGON((0 0,0 1,1 1,1 0,0 0))
-(1 row)
-
-SELECT ST_AsEWKT('0108000080030000000000000060E30A4100000000785C0241000000000000F03F0000000018
-E20A4100000000485F024100000000000000400000000018
-E20A4100000000305C02410000000000000840')
-
---st_asewkt---
-CIRCULARSTRING(220268 150415 1,220227 150505 2,220227 150406 3)
-

Name

ST_AsGeoJSON — Return the geometry as a GeoJSON element.

Synopsis

text ST_AsGeoJSON(geometry g1);

text ST_AsGeoJSON(geography g1);

text ST_AsGeoJSON(geometry g1, integer max_decimal_digits);

text ST_AsGeoJSON(geography g1, integer max_decimal_digits);

text ST_AsGeoJSON(geometry g1, integer max_decimal_digits, integer options);

text ST_AsGeoJSON(geography g1, integer max_decimal_digits, integer options);

text ST_AsGeoJSON(integer gj_version, geometry g1);

text ST_AsGeoJSON(integer gj_version, geography g1);

text ST_AsGeoJSON(integer gj_version, geometry g1, integer max_decimal_digits);

text ST_AsGeoJSON(integer gj_version, geography g1, integer max_decimal_digits);

text ST_AsGeoJSON(integer gj_version, geometry g1, integer max_decimal_digits, integer options);

text ST_AsGeoJSON(integer gj_version, geography g1, integer max_decimal_digits, integer options);

Description

Return the geometry as a Geometry Javascript Object Notation (GeoJSON) element. (Cf GeoJSON - specifications 1.0). 2D and 3D Geometries are both - supported. GeoJSON only support SFS 1.1 geometry type (no curve - support for example).

The gj_version parameter is the major version of the GeoJSON spec. If specified, must be 1.

The third argument may be used to reduce the maximum number - of decimal places used in output (defaults to 15).

The last 'options' argument could be used to add Bbox or Crs - in GeoJSON output: -

  • 0: means no option (default value)

  • 1: GeoJSON Bbox

  • 2: GeoJSON Short CRS (e.g EPSG:4326)

  • 4: GeoJSON Long CRS (e.g urn:ogc:def:crs:EPSG::4326)

-

Version 1: ST_AsGeoJSON(geom) / precision=15 version=1 options=0

Version 2: ST_AsGeoJSON(geom, precision) / version=1 options=0

Version 3: ST_AsGeoJSON(geom, precision, options) / version=1

Version 4: ST_AsGeoJSON(version, geom) / precision=15 options=0

Version 5: ST_AsGeoJSON(version, geom, precision) /options=0

Version 6: ST_AsGeoJSON(version, geom, precision,options)

Availability: 1.3.4

Availability: 1.5.0 geography support was introduced.

- This function supports 3d and will not drop the z-index.

Examples

GeoJSON format is generally more efficient than other formats for use in ajax mapping. - One popular javascript client that supports this is Open Layers. - Example of its use is OpenLayers GeoJSON Example -

SELECT ST_AsGeoJSON(the_geom) from fe_edges limit 1;
-					   st_asgeojson
------------------------------------------------------------------------------------------------------------
-
-{"type":"MultiLineString","coordinates":[[[-89.734634999999997,31.492072000000000],
-[-89.734955999999997,31.492237999999997]]]}
-(1 row)
---3d point
-SELECT ST_AsGeoJSON('LINESTRING(1 2 3, 4 5 6)');
-
-st_asgeojson
------------------------------------------------------------------------------------------
- {"type":"LineString","coordinates":[[1,2,3],[4,5,6]]}
-
-

Name

ST_AsGML — Return the geometry as a GML version 2 or 3 element.

Synopsis

text ST_AsGML(geometry g1);

text ST_AsGML(geography g1);

text ST_AsGML(geometry g1, integer precision);

text ST_AsGML(geography g1, integer precision);

text ST_AsGML(integer version, geometry g1);

text ST_AsGML(integer version, geography g1);

text ST_AsGML(integer version, geometry g1, integer precision);

text ST_AsGML(integer version, geography g1, integer precision);

text ST_AsGML(integer version, geometry g1, integer precision, integer options);

text ST_AsGML(integer version, geography g1, integer precision, integer options);

Description

Return the geometry as a Geography Markup Language (GML) element. The version parameter, - if specified, may be either 2 or 3. If no version parameter is - specified then the default is assumed to be 2. The third argument - may be used to reduce the maximum number of decimal places - used in output (defaults to 15).

GML 2 refer to 2.1.2 version, GML 3 to 3.1.1 version

The last 'options' argument is a bitfield. It could be used to define CRS output type - in GML output, and to declare data as lat/lon: -

  • 0: GML Short CRS (e.g EPSG:4326), default value

  • 1: GML Long CRS (e.g urn:ogc:def:crs:EPSG::4326)

  • 16: Declare that datas are lat/lon (e.g srid=4326). Default is to assume that data are planars. This option is usefull for GML 3.1.1 output only, related to axis order.

-

[Note]

Availability: 1.3.2

Availability: 1.5.0 geography support was introduced.

- This function supports 3d and will not drop the z-index.

Examples

SELECT ST_AsGML(ST_GeomFromText('POLYGON((0 0,0 1,1 1,1 0,0 0))',4326));
-		st_asgml
-		--------
-		<gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>0,0 0,1 1,1 1,0 0,0</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon>
-			
SELECT ST_AsGML(3, ST_GeomFromText('POINT(5.234234233242 6.34534534534)',4326), 5, 17);
-			st_asgml
-			--------
-		<gml:Point srsName="urn:ogc:def:crs:EPSG::4326"><gml:pos>6.34535 5.23423</gml:pos></gml:Point>
-			

Name

ST_AsHEXEWKB — Returns a Geometry in HEXEWKB format (as text) using either - little-endian (NDR) or big-endian (XDR) encoding.

Synopsis

text ST_AsHEXEWKB(geometry g1, text NDRorXDR);

text ST_AsHEXEWKB(geometry g1);

Description

Returns a Geometry in HEXEWKB format (as text) using either - little-endian (NDR) or big-endian (XDR) encoding. If no encoding is specified, then NDR is used.

[Note]

Availability: 1.2.2

- This function supports 3d and will not drop the z-index.

- This method supports Circular Strings and Curves

Examples

SELECT ST_AsHEXEWKB(ST_GeomFromText('POLYGON((0 0,0 1,1 1,1 0,0 0))',4326));
-		which gives same answer as
-
-		SELECT ST_GeomFromText('POLYGON((0 0,0 1,1 1,1 0,0 0))',4326)::text;
-
-		st_ashexewkb
-		--------
-		0103000020E6100000010000000500
-		00000000000000000000000000000000
-		00000000000000000000000000000000F03F
-		000000000000F03F000000000000F03F000000000000F03
-		F000000000000000000000000000000000000000000000000

Name

ST_AsKML — Return the geometry as a KML element. Several variants. Default version=2, default precision=15

Synopsis

text ST_AsKML(geometry g1);

text ST_AsKML(geography g1);

text ST_AsKML(geometry g1, integer precision);

text ST_AsKML(geography g1, integer precision);

text ST_AsKML(integer version, geometry geom1);

text ST_AsKML(integer version, geography geom1);

text ST_AsKML(integer version, geometry geom1, integer precision);

text ST_AsKML(integer version, geography geom1, integer precision);

Description

Return the geometry as a Keyhole Markup Language (KML) element. There are several variants of this function. - maximum number of decimal places used in - output (defaults to 15) and version default to 2.

Version 1: ST_AsKML(geom) / version=2 precision=15

Version 2: ST_AsKML(geom, max_sig_digits) / version=2

Version 3: ST_AsKML(version, geom) / precision=15

Version 4: ST_AsKML(version, geom, precision)

[Note]

Requires PostGIS be compiled with Proj support. Use PostGIS_Full_Version to confirm you have proj support compiled in.

[Note]

Availability: 1.2.2 - later variants that include version param came in 1.3.2

[Note]

AsKML output will not work with geometries that do not have an SRID

- This function supports 3d and will not drop the z-index.

Examples

SELECT ST_AsKML(ST_GeomFromText('POLYGON((0 0,0 1,1 1,1 0,0 0))',4326));
-
-		st_askml
-		--------
-		<Polygon><outerBoundaryIs><LinearRing><coordinates>0,0 0,1 1,1 1,0 0,0</coordinates></LinearRing></outerBoundaryIs></Polygon>
-
-		--3d linestring
-		SELECT ST_AsKML('SRID=4326;LINESTRING(1 2 3, 4 5 6)');
-		<LineString><coordinates>1,2,3 4,5,6</coordinates></LineString>
-		
-		

Name

ST_AsSVG — Returns a Geometry in SVG path data given a geometry or geography object.

Synopsis

text ST_AsSVG(geometry g1);

text ST_AsSVG(geography g1);

text ST_AsSVG(geometry g1, integer rel);

text ST_AsSVG(geography g1, integer rel);

text ST_AsSVG(geometry g1, integer rel, integer maxdecimaldigits);

text ST_AsSVG(geography g1, integer rel, integer maxdecimaldigits);

Description

Return the geometry as Scalar Vector Graphics (SVG) path data. Use 1 as second - argument to have the path data implemented in terms of relative - moves, the default (or 0) uses absolute moves. Third argument may - be used to reduce the maximum number of decimal digits used in - output (defaults to 15). Point geometries will be rendered as - cx/cy when 'rel' arg is 0, x/y when 'rel' is 1. Multipoint - geometries are delimited by commas (","), GeometryCollection - geometries are delimited by semicolons (";").

[Note]

Availability: 1.2.2 . Availability: 1.4.0 Changed in PostGIS 1.4.0 to include L command in absolute path to conform to http://www.w3.org/TR/SVG/paths.html#PathDataBNF

Examples

SELECT ST_AsSVG(ST_GeomFromText('POLYGON((0 0,0 1,1 1,1 0,0 0))',4326));
-
-		st_assvg
-		--------
-		M 0 0 L 0 -1 1 -1 1 0 Z

Name

ST_GeoHash — Return a GeoHash representation (geohash.org) of the geometry.

Synopsis

text ST_GeoHash(geometry g1);

text ST_GeoHash(geometry g1, integer precision);

Description

Return a GeoHash representation (geohash.org) of the geometry. A GeoHash encodes a point into a text form that is sortable and searchable based on prefixing. A shorter GeoHash is a less precise representation of a point. It can also be thought of as a box, that contains the actual point.

The one-parameter variant of ST_GeoHash returns a GeoHash based on the input geometry type. Points return a GeoHash with 20 characters of precision (about enough to hold the full double precision of the input). Other types return a GeoHash with a variable amount of precision, based on the size of the feature. Larger features are represented with less precision, smaller features with more precision. The idea is that the box implied by the GeoHash will always contain the input feature.

The two-parameter variant of ST_GeoHash returns a GeoHash with a requested precision. For non-points, the starting point of the calculation is the center of the bounding box of the geometry.

Availability: 1.4.0

[Note]

ST_GeoHash will not work with geometries that are not in geographic (lon/lat) coordinates.

- This method supports Circular Strings and Curves

Examples

SELECT ST_GeoHash(ST_SetSRID(ST_MakePoint(-126,48),4326));
-
-	 st_geohash
-----------------------
- c0w3hf1s70w3hf1s70w3
-
-SELECT ST_GeoHash(ST_SetSRID(ST_MakePoint(-126,48),4326),5);
-
- st_geohash
-------------
- c0w3h
-		
-		

See Also


Name

ST_AsText — Return the Well-Known Text (WKT) representation of the geometry/geography without SRID metadata.

Synopsis

text ST_AsText(geometry g1);

text ST_AsText(geography g1);

Description

Returns the Well-Known Text representation of the geometry/geography.

[Note]

The WKT spec does not include the SRID. To get the SRID as part of the data, use the non-standard - PostGIS ST_AsEWKT

- WKT format does not maintain precision so to prevent floating truncation, use ST_AsBinary or ST_AsEWKB format for transport. -

[Note]

ST_AsText is the reverse of ST_GeomFromText. Use ST_GeomFromText to convert to a postgis geometry from ST_AsText representation.

Availability: 1.5 - support for geography was introduced.

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1. s2.1.1.1

This method implements the SQL/MM specification. SQL-MM 3: 5.1.25

- This method supports Circular Strings and Curves

Examples

SELECT ST_AsText('01030000000100000005000000000000000000
-000000000000000000000000000000000000000000000000
-F03F000000000000F03F000000000000F03F000000000000F03
-F000000000000000000000000000000000000000000000000');
-
-		   st_astext
---------------------------------
- POLYGON((0 0,0 1,1 1,1 0,0 0))
-(1 row)

7.7. Operators

&& — Returns TRUE if A's bounding box overlaps B's.
&< — Returns TRUE if A's bounding box overlaps or is to the left of B's.
&<| — Returns TRUE if A's bounding box overlaps or is below B's.
&> — Returns TRUE if A' bounding box overlaps or is to the right of B's.
<< — Returns TRUE if A's bounding box is strictly to the left of B's.
<<| — Returns TRUE if A's bounding box is strictly below B's.
= — Returns TRUE if A's bounding box is the same as B's.
>> — Returns TRUE if A's bounding box is strictly to the right of B's.
@ — Returns TRUE if A's bounding box is contained by B's.
|&> — Returns TRUE if A's bounding box overlaps or is above B's.
|>> — Returns TRUE if A's bounding box is strictly above B's.
~ — Returns TRUE if A's bounding box contains B's.
~= — Returns TRUE if A's bounding box is the same as B's.

Name

&& — Returns TRUE if A's bounding box overlaps B's.

Synopsis

boolean &&( - geometry - - A - , - geometry - - B - );

boolean &&( - geography - - A - , - geography - - B - );

Description

The && operator returns TRUE if the bounding box of geometry A overlaps the bounding box of geometry B.

[Note]

This operand will make use of any indexes that may be available on the - geometries.

Availability: 1.5.0 support for geography was introduced.

- This method supports Circular Strings and Curves

Examples

SELECT tbl1.column1, tbl2.column1, tbl1.column2 && tbl2.column2 AS overlaps
-FROM ( VALUES
-	(1, 'LINESTRING(0 0, 3 3)'::geometry),
-	(2, 'LINESTRING(0 1, 0 5)'::geometry)) AS tbl1,
-( VALUES
-	(3, 'LINESTRING(1 2, 4 6)'::geometry)) AS tbl2;
-
- column1 | column1 | overlaps
----------+---------+----------
-	   1 |       3 | t
-	   2 |       3 | f
-(2 rows)

See Also

- |&>, - &>, - &<|, - &<, - ~, - @


Name

&< — Returns TRUE if A's bounding box overlaps or is to the left of B's.

Synopsis

boolean &<( - geometry - - A - , - geometry - - B - );

Description

The &< operator returns TRUE if the bounding box of geometry A - overlaps or is to the left of the bounding box of geometry B, or more accurately, overlaps or is NOT to the right - of the bounding box of geometry B.

[Note]

This operand will make use of any indexes that may be available on the - geometries.

Examples

SELECT tbl1.column1, tbl2.column1, tbl1.column2 &< tbl2.column2 AS overleft
-FROM
-  ( VALUES
-	(1, 'LINESTRING(1 2, 4 6)'::geometry)) AS tbl1,
-  ( VALUES
-	(2, 'LINESTRING(0 0, 3 3)'::geometry),
-	(3, 'LINESTRING(0 1, 0 5)'::geometry),
-	(4, 'LINESTRING(6 0, 6 1)'::geometry)) AS tbl2;
-
- column1 | column1 | overleft
----------+---------+----------
-	   1 |       2 | f
-	   1 |       3 | f
-	   1 |       4 | t
-(3 rows)

See Also

- &&, - |&>, - &>, - &<|


Name

&<| — Returns TRUE if A's bounding box overlaps or is below B's.

Synopsis

boolean &<|( - geometry - - A - , - geometry - - B - );

Description

The &<| operator returns TRUE if the bounding box of geometry A - overlaps or is below of the bounding box of geometry B, or more accurately, overlaps or is NOT above the bounding - box of geometry B.

- This method supports Circular Strings and Curves

[Note]

This operand will make use of any indexes that may be available on the - geometries.

Examples

SELECT tbl1.column1, tbl2.column1, tbl1.column2 &<| tbl2.column2 AS overbelow
-FROM
-  ( VALUES
-	(1, 'LINESTRING(6 0, 6 4)'::geometry)) AS tbl1,
-  ( VALUES
-	(2, 'LINESTRING(0 0, 3 3)'::geometry),
-	(3, 'LINESTRING(0 1, 0 5)'::geometry),
-	(4, 'LINESTRING(1 2, 4 6)'::geometry)) AS tbl2;
-
- column1 | column1 | overbelow
----------+---------+-----------
-	   1 |       2 | f
-	   1 |       3 | t
-	   1 |       4 | t
-(3 rows)

See Also

- &&, - |&>, - &>, - &<


Name

&> — Returns TRUE if A' bounding box overlaps or is to the right of B's.

Synopsis

boolean &>( - geometry - - A - , - geometry - - B - );

Description

The &> operator returns TRUE if the bounding box of geometry A - overlaps or is to the right of the bounding box of geometry B, or more accurately, overlaps or is NOT to the left - of the bounding box of geometry B.

[Note]

This operand will make use of any indexes that may be available on the - geometries.

Examples

SELECT tbl1.column1, tbl2.column1, tbl1.column2 &> tbl2.column2 AS overright
-FROM
-  ( VALUES
-	(1, 'LINESTRING(1 2, 4 6)'::geometry)) AS tbl1,
-  ( VALUES
-	(2, 'LINESTRING(0 0, 3 3)'::geometry),
-	(3, 'LINESTRING(0 1, 0 5)'::geometry),
-	(4, 'LINESTRING(6 0, 6 1)'::geometry)) AS tbl2;
-
- column1 | column1 | overright
----------+---------+-----------
-	   1 |       2 | t
-	   1 |       3 | t
-	   1 |       4 | f
-(3 rows)

See Also

- &&, - |&>, - &<|, - &<


Name

<< — Returns TRUE if A's bounding box is strictly to the left of B's.

Synopsis

boolean <<( - geometry - - A - , - geometry - - B - );

Description

The << operator returns TRUE if the bounding box of geometry A - is strictly to the left of the bounding box of geometry B.

[Note]

This operand will make use of any indexes that may be available on the - geometries.

Examples

SELECT tbl1.column1, tbl2.column1, tbl1.column2 << tbl2.column2 AS left
-FROM
-  ( VALUES
-	(1, 'LINESTRING (1 2, 1 5)'::geometry)) AS tbl1,
-  ( VALUES
-	(2, 'LINESTRING (0 0, 4 3)'::geometry),
-	(3, 'LINESTRING (6 0, 6 5)'::geometry),
-	(4, 'LINESTRING (2 2, 5 6)'::geometry)) AS tbl2;
-
- column1 | column1 | left
----------+---------+------
-	   1 |       2 | f
-	   1 |       3 | t
-	   1 |       4 | t
-(3 rows)

See Also

>>, |>>, <<|


Name

<<| — Returns TRUE if A's bounding box is strictly below B's.

Synopsis

boolean <<|( - geometry - - A - , - geometry - - B - );

Description

The <<| operator returns TRUE if the bounding box of geometry A - is strictly below the bounding box of geometry B.

[Note]

This operand will make use of any indexes that may be available on the - geometries.

Examples

SELECT tbl1.column1, tbl2.column1, tbl1.column2 <<| tbl2.column2 AS below
-FROM
-  ( VALUES
-	(1, 'LINESTRING (0 0, 4 3)'::geometry)) AS tbl1,
-  ( VALUES
-	(2, 'LINESTRING (1 4, 1 7)'::geometry),
-	(3, 'LINESTRING (6 1, 6 5)'::geometry),
-	(4, 'LINESTRING (2 3, 5 6)'::geometry)) AS tbl2;
-
- column1 | column1 | below
----------+---------+-------
-	   1 |       2 | t
-	   1 |       3 | f
-	   1 |       4 | f
-(3 rows)

See Also

<<, >>, |>>


Name

= — Returns TRUE if A's bounding box is the same as B's.

Synopsis

boolean =( - geometry - - A - , - geometry - - B - );

boolean =( - geography - - A - , - geography - - B - );

Description

The = operator returns TRUE if the bounding box of geometry/geography A - is the same as the bounding box of geometry/geography B. PostgreSQL uses the =, <, and > operators defined for geometries to - perform internal orderings and comparison of geometries (ie. in a GROUP BY or ORDER BY clause).

[Warning]

This is cause for a lot of confusion. When you compare geometryA = - geometryB it will return true even when the geometries are clearly - different IF their bounding boxes are the same. To check for true - equality use ST_OrderingEquals or ST_Equals

[Caution]

This operand will NOT make use of any indexes that may be available on the - geometries.

- This method supports Circular Strings and Curves

Examples

SELECT 'LINESTRING(0 0, 0 1, 1 0)'::geometry = 'LINESTRING(1 1, 0 0)'::geometry;
- ?column?
-----------
- t
-(1 row)
-
-SELECT ST_AsText(column1)
-FROM ( VALUES
-	('LINESTRING(0 0, 1 1)'::geometry),
-	('LINESTRING(1 1, 0 0)'::geometry)) AS foo;
-	  st_astext
----------------------
- LINESTRING(0 0,1 1)
- LINESTRING(1 1,0 0)
-(2 rows)
-
--- Note: the GROUP BY uses the "=" to compare for geometry equivalency.
-SELECT ST_AsText(column1)
-FROM ( VALUES
-	('LINESTRING(0 0, 1 1)'::geometry),
-	('LINESTRING(1 1, 0 0)'::geometry)) AS foo
-GROUP BY column1;
-	  st_astext
----------------------
- LINESTRING(0 0,1 1)
-(1 row)

Name

>> — Returns TRUE if A's bounding box is strictly to the right of B's.

Synopsis

boolean >>( - geometry - - A - , - geometry - - B - );

Description

The >> operator returns TRUE if the bounding box of geometry A - is strictly to the right of the bounding box of geometry B.

[Note]

This operand will make use of any indexes that may be available on the - geometries.

Examples

SELECT tbl1.column1, tbl2.column1, tbl1.column2 >> tbl2.column2 AS right
-FROM
-  ( VALUES
-	(1, 'LINESTRING (2 3, 5 6)'::geometry)) AS tbl1,
-  ( VALUES
-	(2, 'LINESTRING (1 4, 1 7)'::geometry),
-	(3, 'LINESTRING (6 1, 6 5)'::geometry),
-	(4, 'LINESTRING (0 0, 4 3)'::geometry)) AS tbl2;
-
- column1 | column1 | right
----------+---------+-------
-	   1 |       2 | t
-	   1 |       3 | f
-	   1 |       4 | f
-(3 rows)

See Also

<<, |>>, <<|


Name

@ — Returns TRUE if A's bounding box is contained by B's.

Synopsis

boolean @( - geometry - - A - , - geometry - - B - );

Description

The @ operator returns TRUE if the bounding box of geometry A is completely - contained by the bounding box of geometry B.

[Note]

This operand will make use of any indexes that may be available on the - geometries.

Examples

SELECT tbl1.column1, tbl2.column1, tbl1.column2 @ tbl2.column2 AS contained
-FROM
-  ( VALUES
-	(1, 'LINESTRING (1 1, 3 3)'::geometry)) AS tbl1,
-  ( VALUES
-	(2, 'LINESTRING (0 0, 4 4)'::geometry),
-	(3, 'LINESTRING (2 2, 4 4)'::geometry),
-	(4, 'LINESTRING (1 1, 3 3)'::geometry)) AS tbl2;
-
- column1 | column1 | contained
----------+---------+-----------
-	   1 |       2 | t
-	   1 |       3 | f
-	   1 |       4 | t
-(3 rows)

See Also

~, &&


Name

|&> — Returns TRUE if A's bounding box overlaps or is above B's.

Synopsis

boolean |&>( - geometry - - A - , - geometry - - B - );

Description

The |&> operator returns TRUE if the bounding box of geometry A - overlaps or is above the bounding box of geometry B, or more accurately, overlaps or is NOT below - the bounding box of geometry B.

[Note]

This operand will make use of any indexes that may be available on the - geometries.

Examples

SELECT tbl1.column1, tbl2.column1, tbl1.column2 |&> tbl2.column2 AS overabove
-FROM
-  ( VALUES
-	(1, 'LINESTRING(6 0, 6 4)'::geometry)) AS tbl1,
-  ( VALUES
-	(2, 'LINESTRING(0 0, 3 3)'::geometry),
-	(3, 'LINESTRING(0 1, 0 5)'::geometry),
-	(4, 'LINESTRING(1 2, 4 6)'::geometry)) AS tbl2;
-
- column1 | column1 | overabove
----------+---------+-----------
-	   1 |       2 | t
-	   1 |       3 | f
-	   1 |       4 | f
-(3 rows)

See Also

- &&, - &>, - &<|, - &<


Name

|>> — Returns TRUE if A's bounding box is strictly above B's.

Synopsis

boolean |>>( - geometry - - A - , - geometry - - B - );

Description

The |>> operator returns TRUE if the bounding box of geometry A - is strictly to the right of the bounding box of geometry B.

[Note]

This operand will make use of any indexes that may be available on the - geometries.

Examples

SELECT tbl1.column1, tbl2.column1, tbl1.column2 |>> tbl2.column2 AS above
-FROM
-  ( VALUES
-	(1, 'LINESTRING (1 4, 1 7)'::geometry)) AS tbl1,
-  ( VALUES
-	(2, 'LINESTRING (0 0, 4 2)'::geometry),
-	(3, 'LINESTRING (6 1, 6 5)'::geometry),
-	(4, 'LINESTRING (2 3, 5 6)'::geometry)) AS tbl2;
-
- column1 | column1 | above
----------+---------+-------
-	   1 |       2 | t
-	   1 |       3 | f
-	   1 |       4 | f
-(3 rows)

See Also

<<, >>, <<|


Name

~ — Returns TRUE if A's bounding box contains B's.

Synopsis

boolean ~( - geometry - - A - , - geometry - - B - );

Description

The ~ operator returns TRUE if the bounding box of geometry A completely - contains the bounding box of geometry B.

[Note]

This operand will make use of any indexes that may be available on the - geometries.

Examples

SELECT tbl1.column1, tbl2.column1, tbl1.column2 ~ tbl2.column2 AS contains
-FROM
-  ( VALUES
-	(1, 'LINESTRING (0 0, 3 3)'::geometry)) AS tbl1,
-  ( VALUES
-	(2, 'LINESTRING (0 0, 4 4)'::geometry),
-	(3, 'LINESTRING (1 1, 2 2)'::geometry),
-	(4, 'LINESTRING (0 0, 3 3)'::geometry)) AS tbl2;
-
- column1 | column1 | contains
----------+---------+----------
-	   1 |       2 | f
-	   1 |       3 | t
-	   1 |       4 | t
-(3 rows)

See Also

@, &&


Name

~= — Returns TRUE if A's bounding box is the same as B's.

Synopsis

boolean ~=( - geometry - - A - , - geometry - - B - );

Description

The ~= operator returns TRUE if the bounding box of geometry/geography A - is the same as the bounding box of geometry/geography B.

[Note]

This operand will make use of any indexes that may be available on the - geometries.

Availability: 1.5.0 changed behavior

[Warning]

This operator has changed behavior in PostGIS 1.5 - from testing for actual geometric equality to only - checking for bounding box equality. To complicate things - it also depends on if you have done a hard or soft upgrade - which behavior your database has. To find out which behavior - your database has you can run the query below. - To check for true equality use ST_OrderingEquals or ST_Equals and to check for bounding box equality =; - operator is a safer option.

Examples

-
-select 'LINESTRING(0 0, 1 1)'::geometry ~= 'LINESTRING(0 1, 1 0)'::geometry as equality;
- equality   |
------------------+
-          t    |
- 			

The above can be used to test if you have the new or old behavior of ~= operator.

7.8. Spatial Relationships and Measurements

ST_Area — Returns the area of the surface if it is a polygon or - multi-polygon. For "geometry" type area is in SRID units. For "geography" area is in square meters.
ST_Azimuth — Returns the angle in radians from the horizontal of the vector defined by pointA and pointB
ST_Centroid — Returns the geometric center of a geometry.
ST_ClosestPoint — Returns the 2-dimensional point on g1 that is closest to g2. This is the first point of - the shortest line.
ST_Contains — Returns true if and only if no points of B lie in the exterior of A, and at least one point of the interior of B lies in the interior of A.
ST_ContainsProperly — Returns true if B intersects the interior of A but not the boundary (or exterior). A does not contain properly itself, but does contain itself.
ST_Covers — Returns 1 (TRUE) if no point in Geometry B is outside - Geometry A. For geography: if geography point B is not outside Polygon Geography A
ST_CoveredBy — Returns 1 (TRUE) if no point in Geometry/Geography A is outside - Geometry/Geography B
ST_Crosses — Returns TRUE if the supplied geometries have some, but not all, - interior points in common.
ST_LineCrossingDirection — Given 2 linestrings, returns a number between -3 and 3 denoting what kind of crossing behavior. 0 is no crossing.
ST_Disjoint — Returns TRUE if the Geometries do not "spatially - intersect" - if they do not share any space together. -
ST_Distance — For geometry type Returns the 2-dimensional cartesian minimum distance (based on spatial ref) between two geometries in - projected units. For geography type defaults to return spheroidal minimum distance between two geographies in meters.
ST_HausdorffDistance — Returns the Hausdorff distance between two geometries. Basically a measure of how similar or dissimilar 2 geometries are. Units are in the units of the spatial - reference system of the geometries.
ST_MaxDistance — Returns the 2-dimensional largest distance between two geometries in - projected units.
ST_Distance_Sphere — Returns minimum distance in meters between two lon/lat - geometries. Uses a spherical earth and radius of 6370986 meters. - Faster than ST_Distance_Spheroid, but less - accurate. PostGIS versions prior to 1.5 only implemented for points.
ST_Distance_Spheroid — Returns the minimum distance between two lon/lat geometries given a - particular spheroid. - PostGIS versions prior to 1.5 only support points.
ST_DFullyWithin — Returns true if all of the geometries are within the specified - distance of one another
ST_DWithin — Returns true if the geometries are within the specified - distance of one another. For geometry units are in those of spatial reference and For geography units are in meters and measurement is - defaulted to use_spheroid=true (measure around spheroid), for faster check, use_spheroid=false to measure along sphere.
ST_Equals — Returns true if the given geometries represent the same geometry. Directionality - is ignored.
ST_HasArc — Returns true if a geometry or geometry collection contains a circular string
ST_Intersects — Returns TRUE if the Geometries/Geography "spatially - intersect" - (share any portion of space) and FALSE if they don't (they are Disjoint). - For geography -- tolerance is 0.00001 meters (so any points that close are considered to intersect) -
ST_Length — Returns the 2d length of the geometry if it is a linestring or multilinestring. geometry are in units of spatial reference and geography are in meters (default spheroid)
ST_Length2D — Returns the 2-dimensional length of the geometry if it is a - linestring or multi-linestring. This is an alias for ST_Length
ST_Length3D — Returns the 3-dimensional or 2-dimensional length of the geometry if it is a - linestring or multi-linestring.
ST_Length_Spheroid — Calculates the 2D or 3D length of a linestring/multilinestring on an ellipsoid. This - is useful if the coordinates of the geometry are in - longitude/latitude and a length is desired without reprojection.
ST_Length2D_Spheroid — Calculates the 2D length of a linestring/multilinestring on an ellipsoid. This - is useful if the coordinates of the geometry are in - longitude/latitude and a length is desired without reprojection.
ST_Length3D_Spheroid — Calculates the length of a geometry on an ellipsoid, - taking the elevation into account. This is just an alias for ST_Length_Spheroid.
ST_LongestLine — Returns the 2-dimensional longest line points of two geometries. - The function will only return the first longest line if more than one, that the function finds. - The line returned will always start in g1 and end in g2. - The length of the line this function returns will always be the same as st_maxdistance returns for g1 and g2.
ST_OrderingEquals — Returns true if the given geometries represent the same geometry - and points are in the same directional order.
ST_Overlaps — Returns TRUE if the Geometries share space, are of the same dimension, but are not completely contained by each other.
ST_Perimeter — Return the length measurement of the boundary of an ST_Surface - or ST_MultiSurface value. (Polygon, Multipolygon)
ST_Perimeter2D — Returns the 2-dimensional perimeter of the geometry, if it - is a polygon or multi-polygon. This is currently an alias for ST_Perimeter.
ST_Perimeter3D — Returns the 3-dimensional perimeter of the geometry, if it - is a polygon or multi-polygon.
ST_PointOnSurface — Returns a POINT guaranteed to lie on the surface.
ST_Relate — Returns true if this Geometry is spatially related to - anotherGeometry, by testing for intersections between the - Interior, Boundary and Exterior of the two geometries as specified - by the values in the intersectionMatrixPattern. If no intersectionMatrixPattern - is passed in, then returns the maximum intersectionMatrixPattern that relates the 2 geometries.
ST_ShortestLine — Returns the 2-dimensional shortest line between two geometries
ST_Touches — Returns TRUE if the geometries have at least one point in common, - but their interiors do not intersect.
ST_Within — Returns true if the geometry A is completely inside geometry B

Name

ST_Area — Returns the area of the surface if it is a polygon or - multi-polygon. For "geometry" type area is in SRID units. For "geography" area is in square meters.

Synopsis

float ST_Area(geometry g1);

float ST_Area(geography g1);

float ST_Area(geography g1, boolean use_spheroid);

Description

Returns the area of the geometry if it is a polygon or - multi-polygon. Return the area measurement of an ST_Surface or - ST_MultiSurface value. For geometry Area is in the units of the srid. For geography area is in square meters and defaults to measuring about the spheroid of the geography (currently only WGS84). - To measure around the faster but less accurate sphere -- ST_Area(geog,false). -

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1.

This method implements the SQL/MM specification. SQL-MM 3: 8.1.2, 9.5.3

Examples

Return area in square feet for a plot of Massachusetts land and multiply by conversion to get square meters. - Note this is in square feet because 2249 is - Mass State Plane Feet

-SELECT ST_Area(the_geom) As sqft, ST_Area(the_geom)*POWER(0.3048,2) As sqm
-		FROM (SELECT
-		ST_GeomFromText('POLYGON((743238 2967416,743238 2967450,
-			743265 2967450,743265.625 2967416,743238 2967416))',2249) ) As foo(the_geom);
-  sqft   |     sqm
----------+-------------
- 928.625 | 86.27208552
-

Return area square feet and transform to Massachusetts state plane meters (26986) to get square meters. - Note this is in square feet because 2249 is - Mass State Plane Feet and transformed area is in square meters since 26986 is state plane mass meters

-
-SELECT ST_Area(the_geom) As sqft, ST_Area(ST_Transform(the_geom,26986)) As sqm
-		FROM (SELECT
-		ST_GeomFromText('POLYGON((743238 2967416,743238 2967450,
-			743265 2967450,743265.625 2967416,743238 2967416))',2249) ) As foo(the_geom);
-  sqft   |       sqm
----------+------------------
- 928.625 | 86.2724304199219
-			

Return area square feet and square meters using Geography data type. Note that we transform to our geometry to geography - (before you can do that make sure your geometry is in WGS 84 long lat 4326). Geography always measures in meters. - This is just for demonstration to compare. Normally your table will be stored in geography data type already.

-
-SELECT ST_Area(the_geog)/POWER(0.3048,2) As sqft_spheroid,  ST_Area(the_geog,false)/POWER(0.3048,2) As sqft_sphere, ST_Area(the_geog) As sqm_spheroid
-		FROM (SELECT
-		geography(
-		ST_Transform(
-			ST_GeomFromText('POLYGON((743238 2967416,743238 2967450,743265 2967450,743265.625 2967416,743238 2967416))',
-				2249
-				) ,4326
-			)
-		)
-	) As foo(the_geog);
- sqft_spheroid   |   sqft_sphere    |   sqm_spheroid
------------------+------------------+------------------
-928.684405217197 | 927.186481558724 | 86.2776044452694
-
- --if your data is in geography already
- SELECT ST_Area(the_geog)/POWER(0.3048,2) As  sqft, ST_Area(the_geog) As sqm
-	FROM somegeogtable;
-			

Name

ST_Azimuth — Returns the angle in radians from the horizontal of the vector defined by pointA and pointB

Synopsis

float ST_Azimuth(geometry pointA, geometry pointB);

Description

Returns the azimuth of the segment defined by the given - Point geometries, or NULL if the two points are coincident. Return - value is in radians.

The Azimuth is mathematical concept defined as the angle, in this case measured in radian, between a reference plane - and a point

Availability: 1.1.0

Azimuth is especially useful in conjunction with ST_Translate for shifting an object along its perpendicular axis. See - upgis_lineshift Plpgsqlfunctions PostGIS wiki section for example of this.

Examples

--Azimuth in degrees

-SELECT ST_Azimuth(ST_MakePoint(1,2), ST_MakePoint(3,4))/(2*pi())*360 as degAz,
-	ST_Azimuth(ST_MakePoint(3,4), ST_MakePoint(1,2))/(2*pi())*360 As degAzrev
-
-degaz	degazrev
-------	---------
-45		225
-

Name

ST_Centroid — Returns the geometric center of a geometry.

Synopsis

geometry ST_Centroid(geometry - g1);

Description

Computes the geometric center of a geometry, or equivalently, - the center of mass of the geometry as a POINT. For - [MULTI]POINTs, this is computed - as the arithmetric mean of the input coordinates. For - [MULTI]LINESTRINGs, this is - computed as the weighted length of each line segment. For - [MULTI]POLYGONs, "weight" is - thought in terms of area. If an empty geometry is supplied, an empty - GEOMETRYCOLLECTION is returned. If - NULL is supplied, NULL is - returned.

The centroid is equal to the centroid of the set of component - Geometries of highest dimension (since the lower-dimension geometries - contribute zero "weight" to the centroid).

[Note]

Computation will be more accurate if performed by the GEOS - module (enabled at compile time).

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1.

This method implements the SQL/MM specification. SQL-MM 3: 8.1.4, 9.5.5

Examples

In each of the following illustrations, the blue dot represents - the centroid of the source geometry.

Centroid of a - MULTIPOINT

Centroid of a - LINESTRING

Centroid of a - POLYGON

Centroid of a - GEOMETRYCOLLECTION

SELECT ST_AsText(ST_Centroid('MULTIPOINT ( -1 0, -1 2, -1 3, -1 4, -1 7, 0 1, 0 3, 1 1, 2 0, 6 0, 7 8, 9 8, 10 6 )'));
-				st_astext
-------------------------------------------
- POINT(2.30769230769231 3.30769230769231)
-(1 row)

Name

ST_ClosestPoint — Returns the 2-dimensional point on g1 that is closest to g2. This is the first point of - the shortest line.

Synopsis

geometry ST_ClosestPoint(geometry - g1, geometry - g2);

Description

Returns the 2-dimensional point on g1 that is closest to g2. This is the first point of - the shortest line. -

Availability: 1.5.0

Examples

Closest between point and linestring is the point itself, but closest - point between a linestring and point is the point on line string that is closest.

-

-SELECT ST_AsText(ST_ClosestPoint(pt,line)) AS cp_pt_line, 
-	ST_AsText(ST_ClosestPoint(line,pt)) As cp_line_pt
-FROM (SELECT 'POINT(100 100)'::geometry As pt, 
-		'LINESTRING (20 80, 98 190, 110 180, 50 75 )'::geometry As line
-	) As foo;
-
-	
-   cp_pt_line   |                cp_line_pt
-----------------+------------------------------------------
- POINT(100 100) | POINT(73.0769230769231 115.384615384615)
-				

-

closest point on polygon A to polygon B

-

-SELECT ST_AsText(
-		ST_ClosestPoint(
-			ST_GeomFromText('POLYGON((175 150, 20 40, 50 60, 125 100, 175 150))'),
-			ST_Buffer(ST_GeomFromText('POINT(110 170)'), 20)
-			) 
-		) As ptwkt;
-		
-                  ptwkt
-------------------------------------------
- POINT(140.752120669087 125.695053378061)
-				

-


Name

ST_Contains — Returns true if and only if no points of B lie in the exterior of A, and at least one point of the interior of B lies in the interior of A.

Synopsis

boolean ST_Contains(geometry - geomA, geometry - geomB);

Description

Geometry A contains Geometry B if and only if no points of B lie in the exterior of A, and at least one point of the interior of B lies in the interior of A. - An important subtlety of this definition is that A does not contain its boundary, but A does contain itself. Contrast that to ST_ContainsProperly where geometry - A does not Contain Properly itself.

Returns TRUE if geometry B is completely inside geometry A. For this function to make - sense, the source geometries must both be of the same coordinate projection, - having the same SRID. ST_Contains is the inverse of ST_Within. So ST_Contains(A,B) implies ST_Within(B,A) except in the case of - invalid geometries where the result is always false regardless or not defined.

Performed by the GEOS module

[Important]

Do not call with a GEOMETRYCOLLECTION as an argument

[Important]

Do not use this function with invalid geometries. You will get unexpected results.

This function call will automatically include a bounding box - comparison that will make use of any indexes that are available on - the geometries. To avoid index use, use the function - _ST_Contains.

NOTE: this is the "allowable" version that returns a - boolean, not an integer.

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1. s2.1.1.2 // s2.1.13.3 - - same as within(geometry B, geometry A)

This method implements the SQL/MM specification. SQL-MM 3: 5.1.31

There are certain subtleties to ST_Contains and ST_Within that are not intuitively obvious. - For details check out Subtleties of OGC Covers, Contains, Within

Examples

The ST_Contains predicate returns TRUE in all the following illustrations.

LINESTRING / MULTIPOINT

POLYGON / POINT

POLYGON / LINESTRING

POLYGON / POLYGON

The ST_Contains predicate returns FALSE in all the following illustrations.

POLYGON / MULTIPOINT

POLYGON / LINESTRING

--- A circle within a circle
-SELECT ST_Contains(smallc, bigc) As smallcontainsbig,
-	   ST_Contains(bigc,smallc) As bigcontainssmall,
-	   ST_Contains(bigc, ST_Union(smallc, bigc)) as bigcontainsunion,
-	   ST_Equals(bigc, ST_Union(smallc, bigc)) as bigisunion,
-	   ST_Covers(bigc, ST_ExteriorRing(bigc)) As bigcoversexterior,
-	   ST_Contains(bigc, ST_ExteriorRing(bigc)) As bigcontainsexterior
-FROM (SELECT ST_Buffer(ST_GeomFromText('POINT(1 2)'), 10) As smallc,
-			 ST_Buffer(ST_GeomFromText('POINT(1 2)'), 20) As bigc) As foo;
-
--- Result
-  smallcontainsbig | bigcontainssmall | bigcontainsunion | bigisunion | bigcoversexterior | bigcontainsexterior
-------------------+------------------+------------------+------------+-------------------+---------------------
- f                | t                | t                | t          | t        | f
-
--- Example demonstrating difference between contains and contains properly
-SELECT ST_GeometryType(geomA) As geomtype, ST_Contains(geomA,geomA) AS acontainsa, ST_ContainsProperly(geomA, geomA) AS acontainspropa,
-   ST_Contains(geomA, ST_Boundary(geomA)) As acontainsba, ST_ContainsProperly(geomA, ST_Boundary(geomA)) As acontainspropba
-FROM (VALUES ( ST_Buffer(ST_Point(1,1), 5,1) ),
-			 ( ST_MakeLine(ST_Point(1,1), ST_Point(-1,-1) ) ),
-			 ( ST_Point(1,1) )
-	  ) As foo(geomA);
-
-  geomtype    | acontainsa | acontainspropa | acontainsba | acontainspropba
---------------+------------+----------------+-------------+-----------------
-ST_Polygon    | t          | f              | f           | f
-ST_LineString | t          | f              | f           | f
-ST_Point      | t          | t              | f           | f
-
- 

Name

ST_ContainsProperly — Returns true if B intersects the interior of A but not the boundary (or exterior). A does not contain properly itself, but does contain itself.

Synopsis

boolean ST_ContainsProperly(geometry - geomA, geometry - geomB);

Description

Returns true if B intersects the interior of A but not the boundary (or exterior).

A does not contain properly itself, but does contain itself.

Every point of the other geometry is a point of this geometry's interior. The DE-9IM Intersection Matrix for the two geometries matches - [T**FF*FF*] used in ST_Relate

[Note]

From JTS docs slightly reworded: The advantage to using this predicate over ST_Contains and ST_Intersects is that it can be computed - efficiently, with no need to compute topology at individual points.

- An example use case for this predicate is computing the intersections - of a set of geometries with a large polygonal geometry. - Since intersection is a fairly slow operation, it can be more efficient - to use containsProperly to filter out test geometries which lie - wholly inside the area. In these cases the intersection is - known a priori to be exactly the original test geometry. -

Availability: 1.4.0 - requires GEOS >= 3.1.0.

[Important]

Do not call with a GEOMETRYCOLLECTION as an argument

[Important]

Do not use this function with invalid geometries. You will get unexpected results.

This function call will automatically include a bounding box - comparison that will make use of any indexes that are available on - the geometries. To avoid index use, use the function - _ST_ContainsProperly.

Examples

-	--a circle within a circle
-	SELECT ST_ContainsProperly(smallc, bigc) As smallcontainspropbig,
-	ST_ContainsProperly(bigc,smallc) As bigcontainspropsmall,
-	ST_ContainsProperly(bigc, ST_Union(smallc, bigc)) as bigcontainspropunion,
-	ST_Equals(bigc, ST_Union(smallc, bigc)) as bigisunion,
-	ST_Covers(bigc, ST_ExteriorRing(bigc)) As bigcoversexterior,
-	ST_ContainsProperly(bigc, ST_ExteriorRing(bigc)) As bigcontainsexterior
-	FROM (SELECT ST_Buffer(ST_GeomFromText('POINT(1 2)'), 10) As smallc,
-	ST_Buffer(ST_GeomFromText('POINT(1 2)'), 20) As bigc) As foo;
-	--Result
-  smallcontainspropbig | bigcontainspropsmall | bigcontainspropunion | bigisunion | bigcoversexterior | bigcontainsexterior
-------------------+------------------+------------------+------------+-------------------+---------------------
- f                     | t                    | f                    | t          | t                 | f
-
- --example demonstrating difference between contains and contains properly
- SELECT ST_GeometryType(geomA) As geomtype, ST_Contains(geomA,geomA) AS acontainsa, ST_ContainsProperly(geomA, geomA) AS acontainspropa,
- ST_Contains(geomA, ST_Boundary(geomA)) As acontainsba, ST_ContainsProperly(geomA, ST_Boundary(geomA)) As acontainspropba
- FROM (VALUES ( ST_Buffer(ST_Point(1,1), 5,1) ),
-		  ( ST_MakeLine(ST_Point(1,1), ST_Point(-1,-1) ) ),
-		  ( ST_Point(1,1) )
-	) As foo(geomA);
-
-  geomtype    | acontainsa | acontainspropa | acontainsba | acontainspropba
---------------+------------+----------------+-------------+-----------------
-ST_Polygon    | t          | f              | f           | f
-ST_LineString | t          | f              | f           | f
-ST_Point      | t          | t              | f           | f
- 

Name

ST_Covers — Returns 1 (TRUE) if no point in Geometry B is outside - Geometry A. For geography: if geography point B is not outside Polygon Geography A

Synopsis

boolean ST_Covers(geometry - geomA, geometry - geomB);

boolean ST_Covers(geography - geogpolyA, geography - geogpointB);

Description

Returns 1 (TRUE) if no point in Geometry/Geography B is outside - Geometry/Geography A

Performed by the GEOS module

[Important]

Do not call with a GEOMETRYCOLLECTION as an argument

[Important]

For geography only Polygon covers point is supported.

[Important]

Do not use this function with invalid geometries. You will get unexpected results.

This function call will automatically include a bounding box - comparison that will make use of any indexes that are available on - the geometries. To avoid index use, use the function - _ST_Covers.

Availability: 1.2.2 - requires GEOS >= 3.0

Availability: 1.5 - support for geography was introduced.

NOTE: this is the "allowable" version that returns a - boolean, not an integer.

Not an OGC standard, but Oracle has it too.

There are certain subtleties to ST_Contains and ST_Within that are not intuitively obvious. - For details check out Subtleties of OGC Covers, Contains, Within

Examples

Geometry example

-	--a circle covering a circle
-SELECT ST_Covers(smallc,smallc) As smallinsmall,
-	ST_Covers(smallc, bigc) As smallcoversbig,
-	ST_Covers(bigc, ST_ExteriorRing(bigc)) As bigcoversexterior,
-	ST_Contains(bigc, ST_ExteriorRing(bigc)) As bigcontainsexterior
-FROM (SELECT ST_Buffer(ST_GeomFromText('POINT(1 2)'), 10) As smallc,
-	ST_Buffer(ST_GeomFromText('POINT(1 2)'), 20) As bigc) As foo;
-	--Result
- smallinsmall | smallcoversbig | bigcoversexterior | bigcontainsexterior
---------------+----------------+-------------------+---------------------
- t            | f              | t                 | f
-(1 row)	

Geeography Example

--- a point with a 300 meter buffer compared to a point, a point and its 10 meter buffer
-SELECT ST_Covers(geog_poly, geog_pt) As poly_covers_pt, 
-	ST_Covers(ST_Buffer(geog_pt,10), geog_pt) As buff_10m_covers_cent
-	FROM (SELECT ST_Buffer(ST_GeogFromText('SRID=4326;POINT(-99.327 31.4821)'), 300) As geog_poly,
-				ST_GeogFromText('SRID=4326;POINT(-99.33 31.483)') As geog_pt ) As foo;
-				
- poly_covers_pt | buff_10m_covers_cent
-----------------+------------------
- f              | t
-		

Name

ST_CoveredBy — Returns 1 (TRUE) if no point in Geometry/Geography A is outside - Geometry/Geography B

Synopsis

boolean ST_CoveredBy(geometry - geomA, geometry - geomB);

boolean ST_CoveredBy(geography - geogA, geography - geogB);

Description

Returns 1 (TRUE) if no point in Geometry/Geography A is outside - Geometry/Geography B

Performed by the GEOS module

[Important]

Do not call with a GEOMETRYCOLLECTION as an argument

[Important]

Do not use this function with invalid geometries. You will get unexpected results.

Availability: 1.2.2 - requires GEOS >= 3.0

This function call will automatically include a bounding box - comparison that will make use of any indexes that are available on - the geometries. To avoid index use, use the function - _ST_CoveredBy.

NOTE: this is the "allowable" version that returns a - boolean, not an integer.

Not an OGC standard, but Oracle has it too.

There are certain subtleties to ST_Contains and ST_Within that are not intuitively obvious. - For details check out Subtleties of OGC Covers, Contains, Within

Examples

-	--a circle coveredby a circle
-SELECT ST_CoveredBy(smallc,smallc) As smallinsmall,
-	ST_CoveredBy(smallc, bigc) As smallcoveredbybig,
-	ST_CoveredBy(ST_ExteriorRing(bigc), bigc) As exteriorcoveredbybig,
-	ST_Within(ST_ExteriorRing(bigc),bigc) As exeriorwithinbig
-FROM (SELECT ST_Buffer(ST_GeomFromText('POINT(1 2)'), 10) As smallc,
-	ST_Buffer(ST_GeomFromText('POINT(1 2)'), 20) As bigc) As foo;
-	--Result
- smallinsmall | smallcoveredbybig | exteriorcoveredbybig | exeriorwithinbig
---------------+-------------------+----------------------+------------------
- t            | t                 | t                    | f
-(1 row)	

Name

ST_Crosses — Returns TRUE if the supplied geometries have some, but not all, - interior points in common.

Synopsis

boolean ST_Crosses(geometry g1, geometry g2);

Description

ST_Crosses takes two geometry objects and - returns TRUE if their intersection "spatially cross", that is, the - geometries have some, but not all interior points in common. The - intersection of the interiors of the geometries must not be the empty - set and must have a dimensionality less than the the maximum dimension - of the two input geometries. Additionally, the intersection of the two - geometries must not equal either of the source geometries. Otherwise, it - returns FALSE.

In mathematical terms, this is expressed as:

TODO: Insert appropriate MathML markup here or use a gif. - Simple HTML markup does not work well in both IE and Firefox.

The DE-9IM Intersection Matrix for the two geometries is:

  • T*T****** (for Point/Line, Point/Area, and - Line/Area situations)

  • T*****T** (for Line/Point, Area/Point, and - Area/Line situations)

  • 0******** (for Line/Line situations)

For any other combination of dimensions this predicate returns - false.

The OpenGIS Simple Features Specification defines this predicate - only for Point/Line, Point/Area, Line/Line, and Line/Area situations. - JTS / GEOS extends the definition to apply to Line/Point, Area/Point and - Area/Line situations as well. This makes the relation - symmetric.

[Important]

Do not call with a GEOMETRYCOLLECTION as an argument

[Note]

This function call will automatically include a bounding box - comparison that will make use of any indexes that are available on the - geometries.

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1. s2.1.13.3

This method implements the SQL/MM specification. SQL-MM 3: 5.1.29

Examples

The following illustrations all return TRUE.

MULTIPOINT / LINESTRING

MULTIPOINT / POLYGON

LINESTRING / POLYGON

LINESTRING / LINESTRING

Consider a situation where a user has two tables: a table of roads - and a table of highways.

CREATE TABLE roads (
-  id serial NOT NULL,
-  the_geom geometry,
-  CONSTRAINT roads_pkey PRIMARY KEY (road_id)
-);

CREATE TABLE highways (
-  id serial NOT NULL,
-  the_gem geometry,
-  CONSTRAINT roads_pkey PRIMARY KEY (road_id)
-);

To determine a list of roads that cross a highway, use a query - similiar to:

SELECT roads.id
-FROM roads, highways
-WHERE ST_Crosses(roads.the_geom, highways.the_geom);

Name

ST_LineCrossingDirection — Given 2 linestrings, returns a number between -3 and 3 denoting what kind of crossing behavior. 0 is no crossing.

Synopsis

integer ST_LineCrossingDirection(geometry linestringA, geometry linestringB);

Description

Given 2 linestrings, returns a number between -3 and 3 denoting what kind of crossing behavior. 0 is no crossing. This is only supported for LINESTRING

Definition of integer constants is as follows: -

  • 0: LINE NO CROSS

  • -1: LINE CROSS LEFT

  • 1: LINE CROSS RIGHT

  • -2: LINE MULTICROSS END LEFT

  • 2: LINE MULTICROSS END RIGHT

  • -3: LINE MULTICROSS END SAME FIRST LEFT

  • 3: LINE MULTICROSS END SAME FIRST RIGHT

-

Availability: 1.4

Examples

Line 1 (green), Line 2 ball is start point, - triangle are end points. Query below.

-

-SELECT ST_LineCrossingDirection(foo.line1, foo.line2) As l1_cross_l2 ,
-	  ST_LineCrossingDirection(foo.line2, foo.line1) As l2_cross_l1
-FROM (
-SELECT
- ST_GeomFromText('LINESTRING(25 169,89 114,40 70,86 43)') As line1,
- ST_GeomFromText('LINESTRING(171 154,20 140,71 74,161 53)') As line2
-	) As foo;
-
- l1_cross_l2 | l2_cross_l1
--------------+-------------
-           3 |          -3
-				

-

-
-

Line 1 (green), Line 2 (blue) ball is start point, - triangle are end points. Query below.

-

-SELECT ST_LineCrossingDirection(foo.line1, foo.line2) As l1_cross_l2 ,
-	  ST_LineCrossingDirection(foo.line2, foo.line1) As l2_cross_l1
-FROM (
- SELECT
-  ST_GeomFromText('LINESTRING(25 169,89 114,40 70,86 43)') As line1,
-  ST_GeomFromText('LINESTRING (171 154, 20 140, 71 74, 2.99 90.16)') As line2
-) As foo;
-
- l1_cross_l2 | l2_cross_l1
--------------+-------------
-           2 |          -2
-				

-

-

Line 1 (green), Line 2 (blue) ball is start point, - triangle are end points. Query below.

-

-SELECT
-	ST_LineCrossingDirection(foo.line1, foo.line2) As l1_cross_l2 ,
-	ST_LineCrossingDirection(foo.line2, foo.line1) As l2_cross_l1
-FROM (
- SELECT
-  ST_GeomFromText('LINESTRING(25 169,89 114,40 70,86 43)') As line1,
-  ST_GeomFromText('LINESTRING (20 140, 71 74, 161 53)') As line2
-  ) As foo;
-
- l1_cross_l2 | l2_cross_l1
--------------+-------------
-          -1 |          1
-				

-

-
-

Line 1 (green), Line 2 (blue) ball is start point, - triangle are end points. Query below.

-

-SELECT ST_LineCrossingDirection(foo.line1, foo.line2) As l1_cross_l2 ,
-	  ST_LineCrossingDirection(foo.line2, foo.line1) As l2_cross_l1
-FROM (SELECT
-	ST_GeomFromText('LINESTRING(25 169,89 114,40 70,86 43)') As line1,
-	ST_GeomFromText('LINESTRING(2.99 90.16,71 74,20 140,171 154)') As line2
-	) As foo;
-
- l1_cross_l2 | l2_cross_l1
--------------+-------------
-          -2 |          2
-				

-

-
-SELECT s1.gid, s2.gid, ST_LineCrossingDirection(s1.the_geom, s2.the_geom)
-	FROM streets s1 CROSS JOIN streets s2 ON (s1.gid != s2.gid AND s1.the_geom && s2.the_geom )
-WHERE ST_CrossingDirection(s1.the_geom, s2.the_geom) > 0;
-

See Also

ST_Crosses


Name

ST_Disjoint — Returns TRUE if the Geometries do not "spatially - intersect" - if they do not share any space together. -

Synopsis

boolean ST_Disjoint( - geometry - A - , - geometry - B - );

Description

Overlaps, Touches, Within all imply geometries are not spatially disjoint. If any of the aforementioned - returns true, then the geometries are not spatially disjoint. - Disjoint implies false for spatial intersection.

[Important]

Do not call with a GEOMETRYCOLLECTION as an argument

Performed by the GEOS module

[Note]

This function call does not use indexes

[Note]

NOTE: this is the "allowable" version that returns a - boolean, not an integer.

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1. s2.1.1.2 //s2.1.13.3 - - a.Relate(b, 'FF*FF****')

This method implements the SQL/MM specification. SQL-MM 3: 5.1.26

Examples

SELECT ST_Disjoint('POINT(0 0)'::geometry, 'LINESTRING ( 2 0, 0 2 )'::geometry);
- st_disjoint
----------------
- t
-(1 row)
-SELECT ST_Disjoint('POINT(0 0)'::geometry, 'LINESTRING ( 0 0, 0 2 )'::geometry);
- st_disjoint
----------------
- f
-(1 row)
-		

See Also

ST_IntersectsST_Intersects


Name

ST_Distance — For geometry type Returns the 2-dimensional cartesian minimum distance (based on spatial ref) between two geometries in - projected units. For geography type defaults to return spheroidal minimum distance between two geographies in meters.

Synopsis

float ST_Distance(geometry - g1, geometry - g2);

float ST_Distance(geography - gg1, geography - gg2);

float ST_Distance(geography - gg1, geography - gg2, boolean - use_spheroid);

Description

For geometry type returns the 2-dimensional minimum cartesian distance between two geometries in - projected units (spatial ref units). For geography type defaults to return the minimum distance around WGS 84 spheroid between two geographies in meters. Pass in - false to return answer in sphere instead of spheroid.

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1.

This method implements the SQL/MM specification. SQL-MM 3: 5.1.23

Availability: 1.5.0 geography support was introduced in 1.5. Speed improvements for planar to better handle large or many vertex geometries

Examples

---Geometry example - units in planar degrees 4326 is WGS 84 long lat unit=degrees
-SELECT ST_Distance(
-		ST_GeomFromText('POINT(-72.1235 42.3521)',4326),
-		ST_GeomFromText('LINESTRING(-72.1260 42.45, -72.123 42.1546)', 4326)
-	);
-st_distance
------------------
-0.00150567726382282
-
--- Geometry example - units in meters (SRID: 26986 Massachusetts state plane meters) (most accurate for Massachusetts)
-SELECT ST_Distance(
-			ST_Transform(ST_GeomFromText('POINT(-72.1235 42.3521)',4326),26986),
-			ST_Transform(ST_GeomFromText('LINESTRING(-72.1260 42.45, -72.123 42.1546)', 4326),26986)
-		);
-st_distance
------------------
-123.797937878454
-
--- Geometry example - units in meters (SRID: 2163 US National Atlas Equal area) (least accurate)
-SELECT ST_Distance(
-			ST_Transform(ST_GeomFromText('POINT(-72.1235 42.3521)',4326),2163),
-			ST_Transform(ST_GeomFromText('LINESTRING(-72.1260 42.45, -72.123 42.1546)', 4326),2163)
-		);
-
-st_distance
-------------------
-126.664256056812
-
--- Geography example -- same but note units in meters - use sphere for slightly faster less accurate
-SELECT ST_Distance(gg1, gg2) As spheroid_dist, ST_Distance(gg1, gg2, false) As sphere_dist 
-FROM (SELECT
-	ST_GeographyFromText('SRID=4326;POINT(-72.1235 42.3521)') As gg1,
-	ST_GeographyFromText('SRID=4326;LINESTRING(-72.1260 42.45, -72.123 42.1546)') As gg2
-	) As foo  ;
-
-  spheroid_dist   |   sphere_dist
-------------------+------------------
- 123.802076746848 | 123.475736916397
-
-

Name

ST_HausdorffDistance — Returns the Hausdorff distance between two geometries. Basically a measure of how similar or dissimilar 2 geometries are. Units are in the units of the spatial - reference system of the geometries.

Synopsis

float ST_HausdorffDistance(geometry - g1, geometry - g2);

float ST_HausdorffDistance(geometry - g1, geometry - g2, float - densifyFrac);

Description

Implements algorithm for computing a distance metric which can be thought of as the "Discrete Hausdorff Distance". -This is the Hausdorff distance restricted to discrete points for one of the geometries. Wikipedia article on Hausdorff distance - Martin Davis note on how Hausdorff Distance calculation was used to prove correctness of the CascadePolygonUnion approach.

-When densifyFrac is specified, this function performs a segment densification before computing the discrete hausdorff distance. The densifyFrac parameter sets the fraction by which to densify each segment. Each segment will be split into a number of equal-length subsegments, whose fraction of the total length is closest to the given fraction. -

[Note]

-The current implementation supports only vertices as the discrete locations. This could be extended to allow an arbitrary density of points to be used. -

[Note]

- This algorithm is NOT equivalent to the standard Hausdorff distance. However, it computes an approximation that is correct for a large subset of useful cases. - One important part of this subset is Linestrings that are roughly parallel to each other, and roughly equal in length. This is a useful metric for line matching. -

Availability: 1.5.0 - requires GEOS >= 3.2.0

Examples

postgis=# SELECT st_HausdorffDistance(
-				'LINESTRING (0 0, 2 0)'::geometry,
-				'MULTIPOINT (0 1, 1 0, 2 1)'::geometry);
- st_hausdorffdistance
- ----------------------
-					 1
-(1 row)
-			
postgis=# SELECT st_hausdorffdistance('LINESTRING (130 0, 0 0, 0 150)'::geometry, 'LINESTRING (10 10, 10 150, 130 10)'::geometry, 0.5);
- st_hausdorffdistance
- ----------------------
-					70
-(1 row)
-			

Name

ST_MaxDistance — Returns the 2-dimensional largest distance between two geometries in - projected units.

Synopsis

float ST_MaxDistance(geometry g1, geometry g2);

Description

Some useful description here.

[Note]

Returns the 2-dimensional maximum distance between two linestrings in - projected units. If g1 and g2 is the same geometry the function will return the distance between - the two vertices most far from each other in that geometry.

Availability: 1.5.0

Examples

postgis=# SELECT ST_MaxDistance('POINT(0 0)'::geometry, 'LINESTRING ( 2 0, 0 2 )'::geometry);
-   st_maxdistance
------------------
- 2
-(1 row)
-
-postgis=# SELECT ST_MaxDistance('POINT(0 0)'::geometry, 'LINESTRING ( 2 2, 2 2 )'::geometry);
-  st_maxdistance  
-------------------
- 2.82842712474619
-(1 row)

Name

ST_Distance_Sphere — Returns minimum distance in meters between two lon/lat - geometries. Uses a spherical earth and radius of 6370986 meters. - Faster than ST_Distance_Spheroid, but less - accurate. PostGIS versions prior to 1.5 only implemented for points.

Synopsis

float ST_Distance_Sphere(geometry geomlonlatA, geometry geomlonlatB);

Description

Returns minimum distance in meters between two lon/lat - points. Uses a spherical earth and radius of 6370986 meters. - Faster than ST_Distance_Spheroid, but less - accurate. PostGIS Versions prior to 1.5 only implemented for points.

[Note]

This function currently does not look at the SRID of a geometry and will always assume its in WGS 84 long lat. Prior versions of this function only support points.

Availability: 1.5 - support for other geometry types besides points was introduced. Prior versions only work with points.

Examples

SELECT round(CAST(ST_Distance_Sphere(ST_Centroid(the_geom), ST_GeomFromText('POINT(-118 38)',4326)) As numeric),2) As dist_meters,
-round(CAST(ST_Distance(ST_Transform(ST_Centroid(the_geom),32611),
-		ST_Transform(ST_GeomFromText('POINT(-118 38)', 4326),32611)) As numeric),2) As dist_utm11_meters,
-round(CAST(ST_Distance(ST_Centroid(the_geom), ST_GeomFromText('POINT(-118 38)', 4326)) As numeric),5) As dist_degrees,
-round(CAST(ST_Distance(ST_Transform(the_geom,32611),
-		ST_Transform(ST_GeomFromText('POINT(-118 38)', 4326),32611)) As numeric),2) As min_dist_line_point_meters
-FROM
-	(SELECT ST_GeomFromText('LINESTRING(-118.584 38.374,-118.583 38.5)', 4326) As the_geom) as foo;
-	 dist_meters | dist_utm11_meters | dist_degrees | min_dist_line_point_meters
-	-------------+-------------------+--------------+----------------------------
-		70424.47 |          70438.00 |      0.72900 |                   65871.18
-
-	

Name

ST_Distance_Spheroid — Returns the minimum distance between two lon/lat geometries given a - particular spheroid. - PostGIS versions prior to 1.5 only support points.

Synopsis

float ST_Distance_Spheroid(geometry geomlonlatA, geometry geomlonlatB, spheroid measurement_spheroid);

Description

Returns minimum distance in meters between two lon/lat - geometries given a particular spheroid. See the explanation of spheroids given for - ST_Length_Spheroid. PostGIS version prior to 1.5 only support points.

[Note]

This function currently does not look at the SRID of a geometry and will always assume its represented in the coordinates of the passed in spheroid. Prior versions of this function only support points.

Availability: 1.5 - support for other geometry types besides points was introduced. Prior versions only work with points.

Examples

SELECT round(CAST(
-		ST_Distance_Spheroid(ST_Centroid(the_geom), ST_GeomFromText('POINT(-118 38)',4326), 'SPHEROID["WGS 84",6378137,298.257223563]')
-			As numeric),2) As dist_meters_spheroid,
-		round(CAST(ST_Distance_Sphere(ST_Centroid(the_geom), ST_GeomFromText('POINT(-118 38)',4326)) As numeric),2) As dist_meters_sphere,
-round(CAST(ST_Distance(ST_Transform(ST_Centroid(the_geom),32611),
-		ST_Transform(ST_GeomFromText('POINT(-118 38)', 4326),32611)) As numeric),2) As dist_utm11_meters
-FROM
-	(SELECT ST_GeomFromText('LINESTRING(-118.584 38.374,-118.583 38.5)', 4326) As the_geom) as foo;
- dist_meters_spheroid | dist_meters_sphere | dist_utm11_meters
-----------------------+--------------------+-------------------
-			 70454.92 |           70424.47 |          70438.00
-
-	

Name

ST_DFullyWithin — Returns true if all of the geometries are within the specified - distance of one another

Synopsis

boolean ST_DFullyWithin(geometry - g1, geometry - g2, double precision - distance);

Description

Returns true if the geometries is fully within the specified distance - of one another. The distance is specified in units defined by the - spatial reference system of the geometries. For this function to make - sense, the source geometries must both be of the same coordinate projection, - having the same SRID.

[Note]

This function call will automatically include a bounding box - comparison that will make use of any indexes that are available on - the geometries.

Availability: 1.5.0

Examples

postgis=# SELECT ST_DFullyWithin(geom_a, geom_b, 10) as DFullyWithin10, ST_DWithin(geom_a, geom_b, 10) as DWithin10, ST_DFullyWithin(geom_a, geom_b, 20) as DFullyWithin20 from 
-		(select ST_GeomFromText('POINT(1 1)') as geom_a,ST_GeomFromText('LINESTRING(1 5, 2 7, 1 9, 14 12)') as geom_b) t1;
-   
------------------
- DFullyWithin10 | DWithin10 | DFullyWithin20 |
----------------+----------+---------------+
- f             | t        | t             |  

Name

ST_DWithin — Returns true if the geometries are within the specified - distance of one another. For geometry units are in those of spatial reference and For geography units are in meters and measurement is - defaulted to use_spheroid=true (measure around spheroid), for faster check, use_spheroid=false to measure along sphere.

Synopsis

boolean ST_DWithin(geometry - g1, geometry - g2, double precision - distance_of_srid);

boolean ST_DWithin(geography - gg1, geography - gg2, double precision - distance_meters);

boolean ST_DWithin(geography - gg1, geography - gg2, double precision - distance_meters, boolean - use_spheroid);

Description

Returns true if the geometries are within the specified distance - of one another.

For Geometries: The distance is specified in units defined by the - spatial reference system of the geometries. For this function to make - sense, the source geometries must both be of the same coorindate projection, - having the same SRID.

For geography units are in meters and measurement is - defaulted to use_spheroid=true (measure around WGS 84 spheroid), for faster check, use_spheroid=false to measure along sphere. -

[Note]

This function call will automatically include a bounding box - comparison that will make use of any indexes that are available on - the geometries.

[Note]

Prior to 1.3, ST_Expand was commonly used in conjunction with && and ST_Distance to - achieve the same effect and in pre-1.3.4 this function was basically short-hand for that construct. - From 1.3.4, ST_DWithin uses a more short-circuit distance function which should make it more efficient - than prior versions for larger buffer regions.

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1.

Availability: 1.5.0 support for geography was introduced

Examples

---Find the nearest hospital to each school
---that is within 3000 units of the school.
--- We do an ST_DWithin search to utilize indexes to limit our search list
--- that the non-indexable ST_Distance needs to process
---If the units of the spatial reference is meters then units would be meters
-SELECT DISTINCT ON (s.gid) s.gid, s.school_name, s.the_geom, h.hospital_name
-	FROM schools s
-		LEFT JOIN hospitals h ON ST_DWithin(s.the_geom, h.the_geom, 3000)
-	ORDER BY s.gid, ST_Distance(s.the_geom, h.the_geom);
-
---The schools with no close hospitals
---Find all schools with no hospital within 3000 units
---away from the school.  Units is in units of spatial ref (e.g. meters, feet, degrees)
-SELECT s.gid, s.school_name
-	FROM schools s
-		LEFT JOIN hospitals h ON ST_DWithin(s.the_geom, h.the_geom, 3000)
-	WHERE h.gid IS NULL;
-			  

Name

ST_Equals — Returns true if the given geometries represent the same geometry. Directionality - is ignored.

Synopsis

boolean ST_Equals(geometry A, geometry B);

Description

Returns TRUE if the given Geometries are "spatially - equal". Use this for a 'better' answer than '='. - Note by spatially equal we mean ST_Within(A,B) = true and ST_Within(B,A) = true and - also mean ordering of points can be different but - represent the same geometry structure. To verify the order of points is consistent, use - ST_OrderingEquals (it must be noted ST_OrderingEquals is a little more stringent than simply verifying order of - points are the same).

[Important]

This function will return false if either geometry is invalid even if they are binary equal.

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1. s2.1.1.2

This method implements the SQL/MM specification. SQL-MM 3: 5.1.24

Examples

SELECT ST_Equals(ST_GeomFromText('LINESTRING(0 0, 10 10)'),
-		ST_GeomFromText('LINESTRING(0 0, 5 5, 10 10)'));
- st_equals
------------
- t
-(1 row)
-
-SELECT ST_Equals(ST_Reverse(ST_GeomFromText('LINESTRING(0 0, 10 10)')),
-		ST_GeomFromText('LINESTRING(0 0, 5 5, 10 10)'));
- st_equals
------------
- t
-(1 row)
-

Name

ST_HasArc — Returns true if a geometry or geometry collection contains a circular string

Synopsis

boolean ST_HasArc(geometry geomA);

Description

Returns true if a geometry or geometry collection contains a circular string

Availability: 1.2.3?

- This function supports 3d and will not drop the z-index.

- This method supports Circular Strings and Curves

Examples

SELECT ST_HasArc(ST_Collect('LINESTRING(1 2, 3 4, 5 6)', 'CIRCULARSTRING(1 1, 2 3, 4 5, 6 7, 5 6)'));
-		st_hasarc
-		--------
-		t
-		

Name

ST_Intersects — Returns TRUE if the Geometries/Geography "spatially - intersect" - (share any portion of space) and FALSE if they don't (they are Disjoint). - For geography -- tolerance is 0.00001 meters (so any points that close are considered to intersect) -

Synopsis

boolean ST_Intersects( - geometry - geomA - , - geometry - geomB - );

boolean ST_Intersects( - geography - geogA - , - geography - geogB - );

Description

Overlaps, Touches, Within all imply spatial intersection. If any of the aforementioned - returns true, then the geometries also spatially intersect. - Disjoint implies false for spatial intersection.

[Important]

Do not call with a GEOMETRYCOLLECTION as an argument for geometry version. The geography - version supports GEOMETRYCOLLECTION since its a thin wrapper around distance implementation.

Performed by the GEOS module (for geometry), geography is native

Availability: 1.5 support for geography was introduced.

[Note]

This function call will automatically include a bounding box - comparison that will make use of any indexes that are available on the - geometries.

[Note]

For geography, this function has a distance tolerance of about 0.00001 meters and uses the sphere rather - than spheroid calculation.

[Note]

NOTE: this is the "allowable" version that returns a - boolean, not an integer.

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1. s2.1.1.2 //s2.1.13.3 - - ST_Intersects(g1, g2 ) --> Not (ST_Disjoint(g1, g2 )) -

This method implements the SQL/MM specification. SQL-MM 3: 5.1.27

Geometry Examples

SELECT ST_Intersects('POINT(0 0)'::geometry, 'LINESTRING ( 2 0, 0 2 )'::geometry);
- st_intersects
----------------
- f
-(1 row)
-SELECT ST_Intersects('POINT(0 0)'::geometry, 'LINESTRING ( 0 0, 0 2 )'::geometry);
- st_intersects
----------------
- t
-(1 row)
-		

Geography Examples

SELECT ST_Intersects(
-		ST_GeographyFromText('SRID=4326;LINESTRING(-43.23456 72.4567,-43.23456 72.4568)'),
-		ST_GeographyFromText('SRID=4326;POINT(-43.23456 72.4567772)')
-		);
-
- st_intersects
----------------
-t
-

See Also

ST_Disjoint


Name

ST_Length — Returns the 2d length of the geometry if it is a linestring or multilinestring. geometry are in units of spatial reference and geography are in meters (default spheroid)

Synopsis

float ST_Length(geometry a_2dlinestring);

float ST_Length(geography gg);

float ST_Length(geography gg, boolean use_spheroid);

Description

For geometry: Returns the cartesian 2D length of the geometry if it is a linestring, multilinestring, ST_Curve, ST_MultiCurve. 0 is returned for - areal geometries. For areal geometries use ST_Perimeter. Geometry: Measurements are in the units of the - spatial reference system of the geometry. Geography: Units are in meters and also acts as a Perimeter function for areal geogs.

Currently for geometry this is an alias for ST_Length2D, but this may change to support higher dimensions.

[Note]

Currently applying this to a MULTI/POLYGON of type geography will give you the perimeter of the POLYGON/MULTIPOLYGON. This is not the - case with the geometry implementation.

[Note]

For geography measurement defaults spheroid measurement. To use the faster less accurate sphere use ST_Length(gg,false);

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1. s2.1.5.1

This method implements the SQL/MM specification. SQL-MM 3: 7.1.2, 9.3.4

Availability: 1.5.0 geography support was introduced in 1.5.

Geometry Examples

Return length in feet for line string. Note this is in feet because 2249 is - Mass State Plane Feet

-SELECT ST_Length(ST_GeomFromText('LINESTRING(743238 2967416,743238 2967450,743265 2967450,
-743265.625 2967416,743238 2967416)',2249));
-st_length
----------
- 122.630744000095
-
-
---Transforming WGS 84 linestring to Massachusetts state plane meters
-SELECT ST_Length(
-	ST_Transform(
-		ST_GeomFromEWKT('SRID=4326;LINESTRING(-72.1260 42.45, -72.1240 42.45666, -72.123 42.1546)'),
-		26986
-	)
-);
-st_length
----------
-34309.4563576191
-			

Geography Examples

Return length of WGS 84 geography line

-			-- default calculation is using a sphere rather than spheroid
-SELECT ST_Length(the_geog) As length_spheroid,  ST_Length(the_geog,false) As length_sphere
-FROM (SELECT ST_GeographyFromText(
-'SRID=4326;LINESTRING(-72.1260 42.45, -72.1240 42.45666, -72.123 42.1546)') As the_geog)
- As foo;
- length_spheroid  |  length_sphere
-------------------+------------------
- 34310.5703627305 | 34346.2060960742
-(1 row)
-			

Name

ST_Length2D — Returns the 2-dimensional length of the geometry if it is a - linestring or multi-linestring. This is an alias for ST_Length

Synopsis

float ST_Length2D(geometry a_2dlinestring);

Description

Returns the 2-dimensional length of the geometry if it is a - linestring or multi-linestring. This is an alias for ST_Length


Name

ST_Length3D — Returns the 3-dimensional or 2-dimensional length of the geometry if it is a - linestring or multi-linestring.

Synopsis

float ST_Length3D(geometry a_3dlinestring);

Description

Returns the 3-dimensional or 2-dimensional length of the geometry if it is a - linestring or multi-linestring. For 2-d lines it will just return the 2-d length (same as ST_Length and ST_Length2D)

- This function supports 3d and will not drop the z-index.

Examples

Return length in feet for a 3D cable. Note this is in feet because 2249 is - Mass State Plane Feet

-SELECT ST_Length3D(ST_GeomFromText('LINESTRING(743238 2967416 1,743238 2967450 1,743265 2967450 3,
-743265.625 2967416 3,743238 2967416 3)',2249));
-st_length3d
------------
-122.704716741457
-		

Name

ST_Length_Spheroid — Calculates the 2D or 3D length of a linestring/multilinestring on an ellipsoid. This - is useful if the coordinates of the geometry are in - longitude/latitude and a length is desired without reprojection.

Synopsis

float ST_Length_Spheroid(geometry a_linestring, spheroid a_spheroid);

Description

Calculates the length of a geometry on an ellipsoid. This - is useful if the coordinates of the geometry are in - longitude/latitude and a length is desired without reprojection. - The ellipsoid is a separate database type and can be constructed - as follows:

SPHEROID[<NAME>,<SEMI-MAJOR
-   AXIS>,<INVERSE FLATTENING>]

SPHEROID["GRS_1980",6378137,298.257222101]

[Note]

Will return 0 for anything that is not a MULTILINESTRING or LINESTRING

- This function supports 3d and will not drop the z-index.

Examples

SELECT ST_Length_Spheroid( geometry_column,
-			  'SPHEROID["GRS_1980",6378137,298.257222101]' )
-			  FROM geometry_table;
-
-SELECT ST_Length_Spheroid( the_geom, sph_m ) As tot_len,
-ST_Length_Spheroid(ST_GeometryN(the_geom,1), sph_m) As len_line1,
-ST_Length_Spheroid(ST_GeometryN(the_geom,2), sph_m) As len_line2
-			  FROM (SELECT ST_GeomFromText('MULTILINESTRING((-118.584 38.374,-118.583 38.5),
-	(-71.05957 42.3589 , -71.061 43))') As the_geom,
-CAST('SPHEROID["GRS_1980",6378137,298.257222101]' As spheroid) As sph_m)  as foo;
-	tot_len      |    len_line1     |    len_line2
-------------------+------------------+------------------
- 85204.5207562955 | 13986.8725229309 | 71217.6482333646
-
- --3D
-SELECT ST_Length_Spheroid( the_geom, sph_m ) As tot_len,
-ST_Length_Spheroid(ST_GeometryN(the_geom,1), sph_m) As len_line1,
-ST_Length_Spheroid(ST_GeometryN(the_geom,2), sph_m) As len_line2
-			  FROM (SELECT ST_GeomFromEWKT('MULTILINESTRING((-118.584 38.374 20,-118.583 38.5 30),
-	(-71.05957 42.3589 75, -71.061 43 90))') As the_geom,
-CAST('SPHEROID["GRS_1980",6378137,298.257222101]' As spheroid) As sph_m)  as foo;
-
-	 tot_len      |    len_line1    |    len_line2
-------------------+-----------------+------------------
- 85204.5259107402 | 13986.876097711 | 71217.6498130292
-
-

Name

ST_Length2D_Spheroid — Calculates the 2D length of a linestring/multilinestring on an ellipsoid. This - is useful if the coordinates of the geometry are in - longitude/latitude and a length is desired without reprojection.

Synopsis

float ST_Length2D_Spheroid(geometry a_linestring, spheroid a_spheroid);

Description

Calculates the 2D length of a geometry on an ellipsoid. This - is useful if the coordinates of the geometry are in - longitude/latitude and a length is desired without reprojection. - The ellipsoid is a separate database type and can be constructed - as follows:

SPHEROID[<NAME>,<SEMI-MAJOR
-   AXIS>,<INVERSE FLATTENING>]

SPHEROID["GRS_1980",6378137,298.257222101]

[Note]

Will return 0 for anything that is not a MULTILINESTRING or LINESTRING

[Note]

This is much like ST_Length_Spheroid and ST_Length3D_Spheroid except it will throw away the Z coordinate in calculations.

Examples

SELECT ST_Length2D_Spheroid( geometry_column,
-			  'SPHEROID["GRS_1980",6378137,298.257222101]' )
-			  FROM geometry_table;
-
-SELECT ST_Length2D_Spheroid( the_geom, sph_m ) As tot_len,
-ST_Length2D_Spheroid(ST_GeometryN(the_geom,1), sph_m) As len_line1,
-ST_Length2D_Spheroid(ST_GeometryN(the_geom,2), sph_m) As len_line2
-			  FROM (SELECT ST_GeomFromText('MULTILINESTRING((-118.584 38.374,-118.583 38.5),
-	(-71.05957 42.3589 , -71.061 43))') As the_geom,
-CAST('SPHEROID["GRS_1980",6378137,298.257222101]' As spheroid) As sph_m)  as foo;
-	tot_len      |    len_line1     |    len_line2
-------------------+------------------+------------------
- 85204.5207562955 | 13986.8725229309 | 71217.6482333646
-
- --3D Observe same answer
-SELECT ST_Length2D_Spheroid( the_geom, sph_m ) As tot_len,
-ST_Length2D_Spheroid(ST_GeometryN(the_geom,1), sph_m) As len_line1,
-ST_Length2D_Spheroid(ST_GeometryN(the_geom,2), sph_m) As len_line2
-			  FROM (SELECT ST_GeomFromEWKT('MULTILINESTRING((-118.584 38.374 20,-118.583 38.5 30),
-	(-71.05957 42.3589 75, -71.061 43 90))') As the_geom,
-CAST('SPHEROID["GRS_1980",6378137,298.257222101]' As spheroid) As sph_m)  as foo;
-
-	tot_len      |    len_line1     |    len_line2
-------------------+------------------+------------------
- 85204.5207562955 | 13986.8725229309 | 71217.6482333646
-
-

Name

ST_Length3D_Spheroid — Calculates the length of a geometry on an ellipsoid, - taking the elevation into account. This is just an alias for ST_Length_Spheroid.

Synopsis

float ST_Length3D_Spheroid(geometry a_linestring, spheroid a_spheroid);

Description

Calculates the length of a geometry on an ellipsoid, - taking the elevation into account. This is just an alias - for ST_Length_Spheroid.

[Note]

Will return 0 for anything that is not a MULTILINESTRING or LINESTRING

[Note]

This functionis just an alias for ST_Length_Spheroid.

- This function supports 3d and will not drop the z-index.

Examples

See ST_Length_Spheroid

Name

ST_LongestLine — Returns the 2-dimensional longest line points of two geometries. - The function will only return the first longest line if more than one, that the function finds. - The line returned will always start in g1 and end in g2. - The length of the line this function returns will always be the same as st_maxdistance returns for g1 and g2.

Synopsis

geometry ST_LongestLine(geometry - g1, geometry - g2);

Description

Returns the 2-dimensional longest line between the points of two geometries. -

Availability: 1.5.0

Examples

Longest line between point and line

-

-SELECT ST_AsText(
-	ST_LongestLine('POINT(100 100)'::geometry, 
-		'LINESTRING (20 80, 98 190, 110 180, 50 75 )'::geometry)
-	) As lline;
-
-	
-   lline
------------------
-LINESTRING(100 100,98 190)
-				

-

longest line between polygon and polygon

-

-SELECT ST_AsText(
-	ST_LongestLine(
-		ST_GeomFromText('POLYGON((175 150, 20 40, 
-			50 60, 125 100, 175 150))'),
-		ST_Buffer(ST_GeomFromText('POINT(110 170)'), 20)
-		) 
-	) As llinewkt;
-		
-   lline
------------------
-LINESTRING(20 40,121.111404660392 186.629392246051)
-				

-

longest straight distance to travel from one part of an elegant city to the other - Note the max distance = to the length of the line.

-

-SELECT ST_AsText(ST_LongestLine(c.the_geom, c.the_geom)) As llinewkt, 
-	ST_MaxDistance(c.the_geom,c.the_geom) As max_dist, 
-	ST_Length(ST_LongestLine(c.the_geom, c.the_geom)) As lenll 
-FROM (SELECT ST_BuildArea(ST_Collect(the_geom)) As the_geom
-	FROM (SELECT ST_Translate(ST_SnapToGrid(ST_Buffer(ST_Point(50 ,generate_series(50,190, 50) 
-			),40, 'quad_segs=2'),1), x, 0)  As the_geom 
-			FROM generate_series(1,100,50) As x)  AS foo
-) As c;
-		
-          llinewkt          |     max_dist     |      lenll
----------------------------+------------------+------------------
- LINESTRING(23 22,129 178) | 188.605408193933 | 188.605408193933
-				

-


Name

ST_OrderingEquals — Returns true if the given geometries represent the same geometry - and points are in the same directional order.

Synopsis

boolean ST_OrderingEquals(geometry A, geometry B);

Description

ST_OrderingEquals compares two geometries and t (TRUE) if the - geometries are equal and the coordinates are in the same order; - otherwise it returns f (FALSE).

[Note]

This function is implemented as per the ArcSDE SQL - specification rather than SQL-MM. - http://edndoc.esri.com/arcsde/9.1/sql_api/sqlapi3.htm#ST_OrderingEquals

This method implements the SQL/MM specification. SQL-MM 3: 5.1.43

Examples

SELECT ST_OrderingEquals(ST_GeomFromText('LINESTRING(0 0, 10 10)'),
-		ST_GeomFromText('LINESTRING(0 0, 5 5, 10 10)'));
- st_orderingequals
------------
- f
-(1 row)
-
-SELECT ST_OrderingEquals(ST_GeomFromText('LINESTRING(0 0, 10 10)'),
-		ST_GeomFromText('LINESTRING(0 0, 0 0, 10 10)'));
- st_orderingequals
------------
- t
-(1 row)
-
-SELECT ST_OrderingEquals(ST_Reverse(ST_GeomFromText('LINESTRING(0 0, 10 10)')),
-		ST_GeomFromText('LINESTRING(0 0, 0 0, 10 10)'));
- st_orderingequals
------------
- f
-(1 row)
-

Name

ST_Overlaps — Returns TRUE if the Geometries share space, are of the same dimension, but are not completely contained by each other.

Synopsis

boolean ST_Overlaps(geometry A, geometry B);

Description

Returns TRUE if the Geometries "spatially - overlap". By that we mean they intersect, but one does not completely contain another.

Performed by the GEOS module

[Note]

Do not call with a GeometryCollection as an argument

This function call will automatically include a bounding box - comparison that will make use of any indexes that are available on - the geometries. To avoid index use, use the function - _ST_Overlaps.

NOTE: this is the "allowable" version that returns a - boolean, not an integer.

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1. s2.1.1.2 // s2.1.13.3

This method implements the SQL/MM specification. SQL-MM 3: 5.1.32

Examples

--a point on a line is contained by the line and is of a lower dimension, and therefore does not overlap the line
-			nor crosses
-
-SELECT ST_Overlaps(a,b) As a_overlap_b,
-	ST_Crosses(a,b) As a_crosses_b,
-		ST_Intersects(a, b) As a_intersects_b, ST_Contains(b,a) As b_contains_a
-FROM (SELECT ST_GeomFromText('POINT(1 0.5)') As a, ST_GeomFromText('LINESTRING(1 0, 1 1, 3 5)')  As b)
-	As foo
-
-a_overlap_b | a_crosses_b | a_intersects_b | b_contains_a
-------------+-------------+----------------+--------------
-f           | f           | t              | t
-
---a line that is partly contained by circle, but not fully is defined as intersecting and crossing,
--- but since of different dimension it does not overlap
-SELECT ST_Overlaps(a,b) As a_overlap_b, ST_Crosses(a,b) As a_crosses_b,
-	ST_Intersects(a, b) As a_intersects_b,
-	ST_Contains(a,b) As a_contains_b
-FROM (SELECT ST_Buffer(ST_GeomFromText('POINT(1 0.5)'), 3)  As a, ST_GeomFromText('LINESTRING(1 0, 1 1, 3 5)')  As b)
-	As foo;
-
- a_overlap_b | a_crosses_b | a_intersects_b | a_contains_b
--------------+-------------+----------------+--------------
- f           | t           | t              | f
-
- -- a 2-dimensional bent hot dog (aka puffered line string) that intersects a circle,
- --	but is not fully contained by the circle is defined as overlapping since they are of the same dimension,
---	but it does not cross, because the intersection of the 2 is of the same dimension
---	as the maximum dimension of the 2
-
-SELECT ST_Overlaps(a,b) As a_overlap_b, ST_Crosses(a,b) As a_crosses_b, ST_Intersects(a, b) As a_intersects_b,
-ST_Contains(b,a) As b_contains_a,
-ST_Dimension(a) As dim_a, ST_Dimension(b) as dim_b, ST_Dimension(ST_Intersection(a,b)) As dima_intersection_b
-FROM (SELECT ST_Buffer(ST_GeomFromText('POINT(1 0.5)'), 3)  As a,
-	ST_Buffer(ST_GeomFromText('LINESTRING(1 0, 1 1, 3 5)'),0.5)  As b)
-	As foo;
-
- a_overlap_b | a_crosses_b | a_intersects_b | b_contains_a | dim_a | dim_b | dima_intersection_b
--------------+-------------+----------------+--------------+-------+-------+---------------------
- t           | f           | t              | f            |     2 |     2 |              2
-

Name

ST_Perimeter — Return the length measurement of the boundary of an ST_Surface - or ST_MultiSurface value. (Polygon, Multipolygon)

Synopsis

float ST_Perimeter(geometry g1);

Description

Returns the 2D perimeter of the geometry if it is a ST_Surface, ST_MultiSurface (Polygon, Multipolygon). 0 is returned for - non-areal geometries. For linestrings use ST_Length. Measurements are in the units of the - spatial reference system of the geometry.

Currently this is an alias for ST_Perimeter2D, but this may change to support higher dimensions.

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1. s2.1.5.1

This method implements the SQL/MM specification. SQL-MM 3: 8.1.3, 9.5.4

Examples

Return perimeter in feet for polygon and multipolygon. Note this is in feet because 2249 is - Mass State Plane Feet

-SELECT ST_Perimeter(ST_GeomFromText('POLYGON((743238 2967416,743238 2967450,743265 2967450,
-743265.625 2967416,743238 2967416))', 2249));
-st_perimeter
----------
- 122.630744000095
-(1 row)
-
-SELECT ST_Perimeter(ST_GeomFromText('MULTIPOLYGON(((763104.471273676 2949418.44119003,
-763104.477769673 2949418.42538203,
-763104.189609677 2949418.22343004,763104.471273676 2949418.44119003)),
-((763104.471273676 2949418.44119003,763095.804579742 2949436.33850239,
-763086.132105649 2949451.46730207,763078.452329651 2949462.11549407,
-763075.354136904 2949466.17407812,763064.362142565 2949477.64291974,
-763059.953961626 2949481.28983009,762994.637609571 2949532.04103014,
-762990.568508415 2949535.06640477,762986.710889563 2949539.61421415,
-763117.237897679 2949709.50493431,763235.236617789 2949617.95619822,
-763287.718121842 2949562.20592617,763111.553321674 2949423.91664605,
-763104.471273676 2949418.44119003)))', 2249));
-st_perimeter
----------
- 845.227713366825
-(1 row)
-			

See Also

ST_Length


Name

ST_Perimeter2D — Returns the 2-dimensional perimeter of the geometry, if it - is a polygon or multi-polygon. This is currently an alias for ST_Perimeter.

Synopsis

float ST_Perimeter2D(geometry geomA);

Description

Returns the 2-dimensional perimeter of the geometry, if it - is a polygon or multi-polygon.

[Note]

This is currently an alias for ST_Perimeter. In future versions ST_Perimeter may return the highest dimension perimeter for a geometry. This is still under consideration

See Also

ST_Perimeter


Name

ST_Perimeter3D — Returns the 3-dimensional perimeter of the geometry, if it - is a polygon or multi-polygon.

Synopsis

float ST_Perimeter3D(geometry geomA);

Description

Returns the 3-dimensional perimeter of the geometry, if it - is a polygon or multi-polygon. If the geometry is 2-dimensional, then the 2-dimensional perimeter is returned.

- This function supports 3d and will not drop the z-index.

Examples

Perimeter of a slightly elevated polygon in the air in Massachusetts state plane feet

SELECT ST_Perimeter3D(the_geom), ST_Perimeter2d(the_geom), ST_Perimeter(the_geom) FROM
-			(SELECT ST_GeomFromEWKT('SRID=2249;POLYGON((743238 2967416 2,743238 2967450 1,
-743265.625 2967416 1,743238 2967416 2))') As the_geom) As foo;
-
-  st_perimeter3d  |  st_perimeter2d  |   st_perimeter
-------------------+------------------+------------------
- 105.465793597674 | 105.432997272188 | 105.432997272188
-
-

Name

ST_PointOnSurface — Returns a POINT guaranteed to lie on the surface.

Synopsis

geometry ST_PointOnSurface(geometry - g1);

Description

Returns a POINT guaranteed to intersect a surface.

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1. s3.2.14.2 // s3.2.18.2

This method implements the SQL/MM specification. SQL-MM 3: 8.1.5, 9.5.6. - According to the specs, ST_PointOnSurface works for surface geometries (POLYGONs, MULTIPOLYGONS, CURVED POLYGONS). So PostGIS seems to be extending what - the spec allows here. Most databases Oracle,DB II, ESRI SDE seem to only support this function for surfaces. SQL Server 2008 like PostGIS supports for all common geometries.

- This function supports 3d and will not drop the z-index.

Examples

SELECT ST_AsText(ST_PointOnSurface('POINT(0 5)'::geometry));
- st_astext
-------------
- POINT(0 5)
-(1 row)
-
-SELECT ST_AsText(ST_PointOnSurface('LINESTRING(0 5, 0 10)'::geometry));
- st_astext
-------------
- POINT(0 5)
-(1 row)
-
-SELECT ST_AsText(ST_PointOnSurface('POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))'::geometry));
-   st_astext
-----------------
- POINT(2.5 2.5)
-(1 row)
-
-SELECT ST_AsEWKT(ST_PointOnSurface(ST_GeomFromEWKT('LINESTRING(0 5 1, 0 0 1, 0 10 2)')));
-   st_asewkt
-----------------
- POINT(0 0 1)
-(1 row)
-

Name

ST_Relate — Returns true if this Geometry is spatially related to - anotherGeometry, by testing for intersections between the - Interior, Boundary and Exterior of the two geometries as specified - by the values in the intersectionMatrixPattern. If no intersectionMatrixPattern - is passed in, then returns the maximum intersectionMatrixPattern that relates the 2 geometries.

Synopsis

boolean ST_Relate(geometry geomA, geometry geomB, text intersectionMatrixPattern);

text ST_Relate(geometry geomA, geometry geomB);

Description

Version 1: Takes geomA, geomB, intersectionMatrix and Returns 1 (TRUE) if this Geometry is spatially related to - anotherGeometry, by testing for intersections between the - Interior, Boundary and Exterior of the two geometries as specified - by the values in the intersectionMatrixPattern.

This is especially useful for testing compound checks of intersection, crosses, etc in one step.

Do not call with a GeometryCollection as an argument

[Note]

This is the "allowable" version that returns a - boolean, not an integer. This is defined in OGC spec

[Note]

This DOES NOT automagically include an index call. The reason for that - is some relationships are anti e.g. Disjoint. If you are - using a relationship pattern that requires intersection, then include the && - index call.

Version 2: Takes geomA and geomB and returns the Section 4.3.6, “Dimensionally Extended 9 Intersection Model (DE-9IM)”

[Note]

Do not call with a GeometryCollection as an argument

not in OGC spec, but implied. see s2.1.13.2

Both Performed by the GEOS module

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1. s2.1.1.2 // s2.1.13.3

This method implements the SQL/MM specification. SQL-MM 3: 5.1.25

Examples

---Find all compounds that intersect and not touch a poly (interior intersects)
-SELECT l.* , b.name As poly_name
-FROM polys As b
-	INNER JOIN compounds As l
-	ON (p.the_geom && b.the_geom
-	AND ST_Relate(l.the_geom, b.the_geom,'T********'));
-
-SELECT ST_Relate(ST_GeometryFromText('POINT(1 2)'), ST_Buffer(ST_GeometryFromText('POINT(1 2)'),2));
- st_relate
------------
- 0FFFFF212
-
-SELECT ST_Relate(ST_GeometryFromText('LINESTRING(1 2, 3 4)'), ST_GeometryFromText('LINESTRING(5 6, 7 8)'));
- st_relate
------------
- FF1FF0102
-
-
-SELECT ST_Relate(ST_GeometryFromText('POINT(1 2)'), ST_Buffer(ST_GeometryFromText('POINT(1 2)'),2), '0FFFFF212');
- st_relate
------------
- t
-
-SELECT ST_Relate(ST_GeometryFromText('POINT(1 2)'), ST_Buffer(ST_GeometryFromText('POINT(1 2)'),2), '*FF*FF212');
- st_relate
------------
- t
-		

Name

ST_ShortestLine — Returns the 2-dimensional shortest line between two geometries

Synopsis

geometry ST_ShortestLine(geometry - g1, geometry - g2);

Description

Returns the 2-dimensional shortest line between two geometries. The function will - only return the first shortest line if more than one, that the function finds. - If g1 and g2 intersects in just one point the function will return a line with both start - and end in that intersection-point. - If g1 and g2 are intersecting with more than one point the function will return a line with start - and end in the same point but it can be any of the intersecting points. - The line returned will always start in g1 and end in g2. - The length of the line this function returns will always be the same as st_distance returns for g1 and g2. -

Availability: 1.5.0

Examples

Shortest line between point and linestring

-

-SELECT ST_AsText(
-	ST_ShortestLine('POINT(100 100)'::geometry, 
-		'LINESTRING (20 80, 98 190, 110 180, 50 75 )'::geometry)
-	) As sline;
-
-	
-   sline
------------------
-LINESTRING(100 100,73.0769230769231 115.384615384615)
-				

-

shortest line between polygon and polygon

-

-SELECT ST_AsText(
-		ST_ShortestLine(
-			ST_GeomFromText('POLYGON((175 150, 20 40, 50 60, 125 100, 175 150))'),
-			ST_Buffer(ST_GeomFromText('POINT(110 170)'), 20)
-			) 
-		) As slinewkt;
-		
- LINESTRING(140.752120669087 125.695053378061,121.111404660392 153.370607753949)
-				

-


Name

ST_Touches — Returns TRUE if the geometries have at least one point in common, - but their interiors do not intersect.

Synopsis

boolean ST_Touches(geometry - g1, geometry - g2);

Description

Returns TRUE if the only points in common between - g1 and g2 lie in the union of the - boundaries of g1 and g2. - The ST_Touches relation applies - to all Area/Area, Line/Line, Line/Area, Point/Area and Point/Line pairs of relationships, - but not to the Point/Point pair.

In mathematical terms, this predicate is expressed as:

TODO: Insert appropriate MathML markup here or use a gif. - Simple HTML markup does not work well in both IE and Firefox.

The allowable DE-9IM Intersection Matrices for the two geometries are:

  • FT*******

  • F**T*****

  • F***T****

[Important]

Do not call with a GEOMETRYCOLLECTION as an argument

[Note]

This function call will automatically include a bounding box - comparison that will make use of any indexes that are available on - the geometries. To avoid using an index, use _ST_Touches instead.

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1. s2.1.1.2 // s2.1.13.3

This method implements the SQL/MM specification. SQL-MM 3: 5.1.28

Examples

The ST_Touches predicate returns TRUE in all the following illustrations.

POLYGON / POLYGON

POLYGON / POLYGON

POLYGON / LINESTRING

LINESTRING / LINESTRING

LINESTRING / LINESTRING

POLYGON / POINT

SELECT ST_Touches('LINESTRING(0 0, 1 1, 0 2)'::geometry, 'POINT(1 1)'::geometry);
- st_touches
-------------
- f
-(1 row)
-
-SELECT ST_Touches('LINESTRING(0 0, 1 1, 0 2)'::geometry, 'POINT(0 2)'::geometry);
- st_touches
-------------
- t
-(1 row)

Name

ST_Within — Returns true if the geometry A is completely inside geometry B

Synopsis

boolean ST_Within(geometry - A, geometry - B);

Description

Returns TRUE if geometry A is completely inside geometry B. For this function to make - sense, the source geometries must both be of the same coordinate projection, - having the same SRID. It is a given that if ST_Within(A,B) is true and ST_Within(B,A) is true, then - the two geometries are considered spatially equal.

Performed by the GEOS module

[Important]

Do not call with a GEOMETRYCOLLECTION as an argument

[Important]

Do not use this function with invalid geometries. You will get unexpected results.

This function call will automatically include a bounding box - comparison that will make use of any indexes that are available on - the geometries. To avoid index use, use the function - _ST_Within.

NOTE: this is the "allowable" version that returns a - boolean, not an integer.

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1. s2.1.1.2 // s2.1.13.3 - - a.Relate(b, 'T*F**F***') -

This method implements the SQL/MM specification. SQL-MM 3: 5.1.30

Examples

---a circle within a circle
-SELECT ST_Within(smallc,smallc) As smallinsmall,
-	ST_Within(smallc, bigc) As smallinbig,
-	ST_Within(bigc,smallc) As biginsmall,
-	ST_Within(ST_Union(smallc, bigc), bigc) as unioninbig,
-	ST_Within(bigc, ST_Union(smallc, bigc)) as biginunion,
-	ST_Equals(bigc, ST_Union(smallc, bigc)) as bigisunion
-FROM
-(
-SELECT ST_Buffer(ST_GeomFromText('POINT(50 50)'), 20) As smallc,
-	ST_Buffer(ST_GeomFromText('POINT(50 50)'), 40) As bigc) As foo;
---Result
- smallinsmall | smallinbig | biginsmall | unioninbig | biginunion | bigisunion
---------------+------------+------------+------------+------------+------------
- t            | t          | f          | t          | t          | t
-(1 row)
-		

7.9. Geometry Processing Functions

ST_Buffer — (T) For geometry: Returns a geometry that represents all points whose distance - from this Geometry is less than or equal to distance. Calculations - are in the Spatial Reference System of this Geometry. For geography: Uses a planar transform wrapper. Introduced in 1.5 support for - different end cap and mitre settings to control shape. buffer_style options: quad_segs=#,endcap=round|flat|square,join=round|mitre|bevel,mitre_limit=#.# -
ST_BuildArea — Creates an areal geometry formed by the constituent linework - of given geometry
ST_Collect — Return a specified ST_Geometry value from a collection of other geometries.
ST_ConvexHull — The convex hull of a geometry represents the minimum convex - geometry that encloses all geometries within the set.
ST_CurveToLine — Converts a CIRCULARSTRING/CURVEDPOLYGON to a LINESTRING/POLYGON
ST_Difference — Returns a geometry that represents that part of geometry A - that does not intersect with geometry B.
ST_Dump — Returns a set of geometry_dump (geom,path) rows, that make up a geometry g1.
ST_DumpPoints — Returns a set of geometry_dump (geom,path) rows of all points that make up a geometry.
ST_DumpRings — Returns a set of geometry_dump rows, representing - the exterior and interior rings of a polygon.
ST_Intersection — (T) Returns a geometry that represents the shared portion of geomA and geomB. The geography implementation - does a transform to geometry to do the intersection and then transform back to WGS84. -
ST_LineToCurve — Converts a LINESTRING/POLYGON to a CIRCULARSTRING, CURVED POLYGON
ST_MemUnion — Same as ST_Union, only memory-friendly (uses less memory - and more processor time).
ST_MinimumBoundingCircle — Returns the smallest circle polygon that can fully contain a geometry. Default - uses 48 segments per quarter circle.
ST_Polygonize — Aggregate. Creates a GeometryCollection containing possible - polygons formed from the constituent linework of a set of - geometries.
ST_Shift_Longitude — Reads every point/vertex in every component of every feature - in a geometry, and if the longitude coordinate is <0, adds 360 - to it. The result would be a 0-360 version of the data to be - plotted in a 180 centric map
ST_Simplify — Returns a "simplified" version of the given geometry using - the Douglas-Peucker algorithm.
ST_SimplifyPreserveTopology — Returns a "simplified" version of the given geometry using - the Douglas-Peucker algorithm. Will avoid creating derived - geometries (polygons in particular) that are invalid.
ST_SymDifference — Returns a geometry that represents the portions of A and B - that do not intersect. It is called a symmetric difference because - ST_SymDifference(A,B) = ST_SymDifference(B,A).
ST_Union — Returns a geometry that represents the point set union of - the Geometries.

Name

ST_Buffer — (T) For geometry: Returns a geometry that represents all points whose distance - from this Geometry is less than or equal to distance. Calculations - are in the Spatial Reference System of this Geometry. For geography: Uses a planar transform wrapper. Introduced in 1.5 support for - different end cap and mitre settings to control shape. buffer_style options: quad_segs=#,endcap=round|flat|square,join=round|mitre|bevel,mitre_limit=#.# -

Synopsis

geometry ST_Buffer(geometry g1, float radius_of_buffer);

geometry ST_Buffer(geometry g1, float radius_of_buffer, integer num_seg_quarter_circle);

geometry ST_Buffer(geometry g1, float radius_of_buffer, text buffer_style_parameters);

geography ST_Buffer(geography g1, float radius_of_buffer_in_meters);

Description

Returns a geometry/geography that represents all points whose distance - from this Geometry/geography is less than or equal to distance.

Geometry: Calculations - are in the Spatial Reference System of the geometry. Introduced in 1.5 support for - different end cap and mitre settings to control shape.

[Note]

Geography: For geography this is really a thin wrapper around the geometry implementation. It first determines the best SRID that - fits the bounding box of the geography object (favoring UTM, Lambert Azimuthal Equal Area (LAEA) north/south pole, and falling back on mercator in worst case scenario) and then buffers in that planar spatial ref and retransforms back to WGS84 geography.

- For geography this may not behave as expected if object is sufficiently large that it falls between two UTM zones or crosses the dateline

Availability: 1.5 - ST_Buffer was enhanced to support different endcaps and join types. These are useful for example to convert road linestrings - into polygon roads with flat or square edges instead of rounded edges. Thin wrapper for geography was added. - requires GEOS >= 3.2 to take advantage of advanced geometry functionality. -

-The optional third parameter (currently only applies to geometry) can either specify number of segments used to approximate a quarter circle (integer case, defaults to 8) or a list of blank-separated key=value pairs (string case) to tweak operations as follows: -

  • -'quad_segs=#' : number of segments used to approximate a quarter circle (defaults to 8). -
  • -'endcap=round|flat|square' : endcap style (defaults to "round", needs GEOS-3.2 or higher for a different value). 'butt' is also accepted as a synonym for 'flat'. -
  • -'join=round|mitre|bevel' : join style (defaults to "round", needs GEOS-3.2 or higher for a different value). 'miter' is also accepted as a synonym for 'mitre'. -
  • -'mitre_limit=#.#' : mitre ratio limit (only affects mitred join style). 'miter_limit' is also accepted as a synonym for 'mitre_limit'. -

-

Units of radius are measured in units of the spatial reference system.

The inputs can be POINTS, MULTIPOINTS, LINESTRINGS, MULTILINESTRINGS, POLYGONS, MULTIPOLYGONS, and GeometryCollections.

[Note]

This function ignores the third dimension (z) and will always give a 2-d buffer even when presented with a 3d-geometry.

Performed by the GEOS module.

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1. s2.1.1.3

This method implements the SQL/MM specification. SQL-MM 3: 5.1.17

[Note]

People often make the mistake of using this function to try to do radius searches. Creating a - buffer to to a radius search is slow and pointless. Use ST_DWithin instead.

Examples

quad_segs=8 (default)

-

-SELECT ST_Buffer(
- ST_GeomFromText('POINT(100 90)'),
- 50, 'quad_segs=8');
-				

-

quad_segs=2 (lame)

-

-SELECT ST_Buffer(
- ST_GeomFromText('POINT(100 90)'),
- 50, 'quad_segs=2');
-				

-

endcap=round join=round (default)

-

-SELECT ST_Buffer(
- ST_GeomFromText(
-  'LINESTRING(50 50,150 150,150 50)'
- ), 10, 'endcap=round join=round');
-				

-

endcap=square

-

-SELECT ST_Buffer(
- ST_GeomFromText(
-  'LINESTRING(50 50,150 150,150 50)'
- ), 10, 'endcap=square join=round');
-				

-

endcap=flat

-

-SELECT ST_Buffer(
- ST_GeomFromText(
-  'LINESTRING(50 50,150 150,150 50)'
- ), 10, 'endcap=flat join=round');
-				

-

join=bevel

-

-SELECT ST_Buffer(
- ST_GeomFromText(
-  'LINESTRING(50 50,150 150,150 50)'
- ), 10, 'join=bevel');
-				

-

join=mitre mitre_limit=5.0 (default mitre limit)

-

-SELECT ST_Buffer(
- ST_GeomFromText(
-  'LINESTRING(50 50,150 150,150 50)'
- ), 10, 'join=mitre mitre_limit=5.0');
-				

-

join=mitre mitre_limit=1

-

-SELECT ST_Buffer(
- ST_GeomFromText(
-  'LINESTRING(50 50,150 150,150 50)'
- ), 10, 'join=mitre mitre_limit=1.0');
-				

-

--A buffered point approximates a circle
--- A buffered point forcing approximation of (see diagram)
--- 2 points per circle is poly with 8 sides (see diagram)
-SELECT ST_NPoints(ST_Buffer(ST_GeomFromText('POINT(100 90)'), 50)) As promisingcircle_pcount,
-ST_NPoints(ST_Buffer(ST_GeomFromText('POINT(100 90)'), 50, 2)) As lamecircle_pcount;
-
-promisingcircle_pcount | lamecircle_pcount
-------------------------+-------------------
-			 33 |                9
-
---A lighter but lamer circle
--- only 2 points per quarter circle is an octagon
---Below is a 100 meter octagon
--- Note coordinates are in NAD 83 long lat which we transform
-to Mass state plane meter and then buffer to get measurements in meters;
-SELECT ST_AsText(ST_Buffer(
-ST_Transform(
-ST_SetSRID(ST_MakePoint(-71.063526, 42.35785),4269), 26986)
-,100,2)) As octagon;
-----------------------
-POLYGON((236057.59057465 900908.759918696,236028.301252769 900838.049240578,235
-957.59057465 900808.759918696,235886.879896532 900838.049240578,235857.59057465
-900908.759918696,235886.879896532 900979.470596815,235957.59057465 901008.759918
-696,236028.301252769 900979.470596815,236057.59057465 900908.759918696))
-
---Buffer is often also used as a poor man's polygon fixer or a sometimes speedier unioner
---Sometimes able to fix invalid polygons - using below
--- using below on anything but a polygon will result in empty geometry
--- and for geometry collections kill anything in the collection that is not a polygon
---Poor man's bad poly fixer
-SELECT ST_IsValid(foo.invalidpoly)  as isvalid, ST_IsValid(ST_Buffer(foo.invalidpoly,0.0)) as bufferisvalid,
-ST_AsText(ST_Buffer(foo.invalidpoly,0.0)) As newpolytextrep
-FROM (SELECT ST_GeomFromText('POLYGON((-1 2, 3 4, 5 6, -1 2, 5 6, -1 2))') as invalidpoly) As foo
-NOTICE:  Self-intersection at or near point -1 2
-isvalid | bufferisvalid |        newpolytextrep
----------+---------------+------------------------------
-f       | t             | POLYGON((-1 2,5 6,3 4,-1 2))
-
---Poor man's polygon unioner
-SELECT ST_AsText(the_geom) as textorig, ST_AsText(ST_Buffer(foo.the_geom,0.0)) As textbuffer
-FROM (SELECT ST_Collect('POLYGON((-1 2, 3 4, 5 6, -1 2))', 'POLYGON((-1 2, 2 3, 5 6, -1 2))') As the_geom) as foo;
-				 textorig                          |            textbuffer
------------------------------------------------------------+--------------------
-MULTIPOLYGON(((-1 2,3 4,5 6,-1 2)),((-1 2,2 3,5 6,-1 2))) | POLYGON((-1 2,5 6,3 4,2 3,-1 2))
-
-
-		

Name

ST_BuildArea — Creates an areal geometry formed by the constituent linework - of given geometry

Synopsis

geometry ST_BuildArea(geometry A);

Description

Creates an areal geometry formed by the constituent linework - of given geometry. The return type can be a Polygon or - MultiPolygon, depending on input. If the input lineworks do not - form polygons NULL is returned. The inputs can be LINESTRINGS, MULTILINESTRINGS, POLYGONS, MULTIPOLYGONS, and GeometryCollections. -

This function will assume all inner geometries represent holes

Availability: 1.1.0 - requires GEOS >= 2.1.0.

Examples

This will create a donut

-

-SELECT ST_BuildArea(ST_Collect(smallc,bigc))
-FROM (SELECT
-	ST_Buffer(
-	  ST_GeomFromText('POINT(100 90)'), 25) As smallc,
-	ST_Buffer(ST_GeomFromText('POINT(100 90)'), 50) As bigc) As foo;
-				

-

This will create a gaping hole inside the circle with prongs sticking out

-

-SELECT ST_BuildArea(ST_Collect(line,circle))
-FROM (SELECT
-	ST_Buffer(
-		ST_MakeLine(ST_MakePoint(10, 10),ST_MakePoint(190, 190)),
-				5)  As line,
-	ST_Buffer(ST_GeomFromText('POINT(100 90)'), 50) As circle) As foo;
-
---this creates the same gaping hole
---but using linestrings instead of polygons
-SELECT ST_BuildArea(
-	ST_Collect(ST_ExteriorRing(line),ST_ExteriorRing(circle))
-	)
-FROM (SELECT ST_Buffer(
-	ST_MakeLine(ST_MakePoint(10, 10),ST_MakePoint(190, 190))
-		,5)  As line,
-	ST_Buffer(ST_GeomFromText('POINT(100 90)'), 50) As circle) As foo;
-
-				

-

See Also

- ST_BdPolyFromText, - ST_BdMPolyFromTextwrappers to - this function with standard OGC interface


Name

ST_Collect — Return a specified ST_Geometry value from a collection of other geometries.

Synopsis

geometry ST_Collect(geometry set g1field);

geometry ST_Collect(geometry g1, geometry g2);

geometry ST_Collect(geometry[] g1_array);

Description

Output type can be a MULTI* or a - GEOMETRYCOLLECTION. Comes in 2 variants. Variant 1 collects 2 geometries. Variant 2 is an aggregate function that takes a set of geometries and collects - them into a single ST_Geometry.

Aggregate version: This function returns a GEOMETRYCOLLECTION or a MULTI object - from a set of geometries. The ST_Collect() function is an "aggregate" - function in the terminology of PostgreSQL. That means that it - operates on rows of data, in the same way the SUM() and AVG() - functions do. For example, "SELECT ST_Collect(GEOM) FROM GEOMTABLE - GROUP BY ATTRCOLUMN" will return a separate GEOMETRYCOLLECTION for - each distinct value of ATTRCOLUMN.

Non-Aggregate version: This function returns a geometry being a collection of two - input geometries. Output type can be a MULTI* or a - GEOMETRYCOLLECTION.

[Note]

ST_Collect and ST_Union are often interchangeable. - ST_Collect is in general orders of magnitude faster than ST_Union - because it does not try to dissolve boundaries or validate that a constructed MultiPolgon doesn't - have overlapping regions. It merely rolls up - single geometries into MULTI and MULTI or mixed geometry types - into Geometry Collections. Unfortunately geometry collections are - not well-supported by GIS tools. To prevent ST_Collect from - returning a Geometry Collection when collecting MULTI geometries, - one can use the below trick that utilizes ST_Dump to expand the - MULTIs out to singles and then regroup them.

Availability: 1.4.0 - ST_Collect(geomarray) was introduced. ST_Collect was enhanced to handle more geometries faster.

- This function supports 3d and will not drop the z-index.

- This method supports Circular Strings and Curves This method supports Circular Strings - and Curves, but will never return a MULTICURVE or MULTI as one - would expect and PostGIS does not currently support those.

Examples

Aggregate example

Thread ref: http://postgis.refractions.net/pipermail/postgis-users/2008-June/020331.html
-SELECT stusps,
-	   ST_Multi(ST_Collect(f.the_geom)) as singlegeom
-	 FROM (SELECT stusps, (ST_Dump(the_geom)).geom As the_geom
-				FROM
-				somestatetable ) As f
-GROUP BY stusps

Non-Aggregate example

Thread ref: http://postgis.refractions.net/pipermail/postgis-users/2008-June/020331.html
-SELECT ST_AsText(ST_Collect(ST_GeomFromText('POINT(1 2)'),
-	ST_GeomFromText('POINT(-2 3)') ));
-
-st_astext
-----------
-MULTIPOINT(1 2,-2 3)
-
---Collect 2 d points
-SELECT ST_AsText(ST_Collect(ST_GeomFromText('POINT(1 2)'),
-		ST_GeomFromText('POINT(1 2)') ) );
-
-st_astext
-----------
-MULTIPOINT(1 2,1 2)
-
---Collect 3d points
-SELECT ST_AsEWKT(ST_Collect(ST_GeomFromEWKT('POINT(1 2 3)'),
-		ST_GeomFromEWKT('POINT(1 2 4)') ) );
-
-		st_asewkt
--------------------------
- MULTIPOINT(1 2 3,1 2 4)
-
- --Example with curves
-SELECT ST_AsText(ST_Collect(ST_GeomFromText('CIRCULARSTRING(220268 150415,220227 150505,220227 150406)'),
-ST_GeomFromText('CIRCULARSTRING(220227 150406,2220227 150407,220227 150406)')));
-																st_astext
-------------------------------------------------------------------------------------
- GEOMETRYCOLLECTION(CIRCULARSTRING(220268 150415,220227 150505,220227 150406),
- CIRCULARSTRING(220227 150406,2220227 150407,220227 150406))
-
---New ST_Collect array construct
-SELECT ST_Collect(ARRAY(SELECT the_geom FROM sometable));
-
-SELECT ST_AsText(ST_Collect(ARRAY[ST_GeomFromText('LINESTRING(1 2, 3 4)'),
-			ST_GeomFromText('LINESTRING(3 4, 4 5)')])) As wktcollect;
-
---wkt collect --
-MULTILINESTRING((1 2,3 4),(3 4,4 5))
-
-

See Also

ST_Dump, ST_Union


Name

ST_ConvexHull — The convex hull of a geometry represents the minimum convex - geometry that encloses all geometries within the set.

Synopsis

geometry ST_ConvexHull(geometry geomA);

Description

The convex hull of a geometry represents the minimum convex - geometry that encloses all geometries within the set.

One can think of the convex hull as the geometry you get by wrapping an elastic - band around a set of geometries. This is different from a concave hull (not currently supported) - which is analogous to shrink-wrapping your geometries.

It is usually used with MULTI and Geometry Collections. - Although it is not an aggregate - you can use it in conjunction - with ST_Collect to get the convex hull of a set of points. - ST_ConvexHull(ST_Collect(somepointfield)).

It is often used to - determine an affected area based on a set of point - observations.

Performed by the GEOS module

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1. s2.1.1.3

This method implements the SQL/MM specification. SQL-MM 3: 5.1.16

- This function supports 3d and will not drop the z-index.

Examples

---Get estimate of infected area based on point observations
-SELECT d.disease_type,
-	ST_ConvexHull(ST_Collect(d.the_geom)) As the_geom
-	FROM disease_obs As d
-	GROUP BY d.disease_type;
-

-

Convex Hull of a MultiLinestring and a MultiPoint seen together with the MultiLinestring and MultiPoint

-

-SELECT ST_AsText(ST_ConvexHull(
-	ST_Collect(
-		ST_GeomFromText('MULTILINESTRING((100 190,10 8),(150 10, 20 30))'),
-			ST_GeomFromText('MULTIPOINT(50 5, 150 30, 50 10, 10 10)')
-			)) );
----st_astext--
-POLYGON((50 5,10 8,10 10,100 190,150 30,150 10,50 5))
-	

-


Name

ST_CurveToLine — Converts a CIRCULARSTRING/CURVEDPOLYGON to a LINESTRING/POLYGON

Synopsis

geometry ST_CurveToLine(geometry curveGeom);

geometry ST_CurveToLine(geometry curveGeom, integer segments_per_qtr_circle);

Description

Converst a CIRCULAR STRING to regular LINESTRING or CURVEPOLYGON to POLYGON. Useful for outputting to devices that can't support CIRCULARSTRING geometry types

Converts a given geometry to a linear geometry. - Each curved geometry or segment is converted into a linear approximation using the default value of 32 segments per quarter circle

Availability: 1.2.2?

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1.

This method implements the SQL/MM specification. SQL-MM 3: 7.1.7

- This function supports 3d and will not drop the z-index.

- This method supports Circular Strings and Curves

Examples

SELECT ST_AsText(ST_CurveToLine(ST_GeomFromText('CIRCULARSTRING(220268 150415,220227 150505,220227 150406)')));
-
---Result --
- LINESTRING(220268 150415,220269.95064912 150416.539364228,220271.823415575 150418.17258804,220273.613787707 150419.895736857,
- 220275.317452352 150421.704659462,220276.930305234 150423.594998003,220278.448460847 150425.562198489,
- 220279.868261823 150427.60152176,220281.186287736 150429.708054909,220282.399363347 150431.876723113,
- 220283.50456625 150434.10230186,220284.499233914 150436.379429536,220285.380970099 150438.702620341,220286.147650624 150441.066277505,
- 220286.797428488 150443.464706771,220287.328738321 150445.892130112,220287.740300149 150448.342699654,
- 220288.031122486 150450.810511759,220288.200504713 150453.289621251,220288.248038775 150455.77405574,
- 220288.173610157 150458.257830005,220287.977398166 150460.734960415,220287.659875492 150463.199479347,
- 220287.221807076 150465.64544956,220286.664248262 150468.066978495,220285.988542259 150470.458232479,220285.196316903 150472.81345077,
- 220284.289480732 150475.126959442,220283.270218395 150477.39318505,220282.140985384 150479.606668057,
- 220280.90450212 150481.762075989,220279.5637474 150483.85421628,220278.12195122 150485.87804878,
- 220276.582586992 150487.828697901,220274.949363179 150489.701464356,220273.226214362 150491.491836488,
- 220271.417291757 150493.195501133,220269.526953216 150494.808354014,220267.559752731 150496.326509628,
- 220265.520429459 150497.746310603,220263.41389631 150499.064336517,220261.245228106 150500.277412127,
- 220259.019649359 150501.38261503,220256.742521683 150502.377282695,220254.419330878 150503.259018879,
- 220252.055673714 150504.025699404,220249.657244448 150504.675477269,220247.229821107 150505.206787101,
- 220244.779251566 150505.61834893,220242.311439461 150505.909171266,220239.832329968 150506.078553494,
- 220237.347895479 150506.126087555,220234.864121215 150506.051658938,220232.386990804 150505.855446946,
- 220229.922471872 150505.537924272,220227.47650166 150505.099855856,220225.054972724 150504.542297043,
- 220222.663718741 150503.86659104,220220.308500449 150503.074365683,
- 220217.994991777 150502.167529512,220215.72876617 150501.148267175,
- 220213.515283163 150500.019034164,220211.35987523 150498.7825509,
- 220209.267734939 150497.441796181,220207.243902439 150496,
- 220205.293253319 150494.460635772,220203.420486864 150492.82741196,220201.630114732 150491.104263143,
- 220199.926450087 150489.295340538,220198.313597205 150487.405001997,220196.795441592 150485.437801511,
- 220195.375640616 150483.39847824,220194.057614703 150481.291945091,220192.844539092 150479.123276887,220191.739336189 150476.89769814,
- 220190.744668525 150474.620570464,220189.86293234 150472.297379659,220189.096251815 150469.933722495,
- 220188.446473951 150467.535293229,220187.915164118 150465.107869888,220187.50360229 150462.657300346,
- 220187.212779953 150460.189488241,220187.043397726 150457.710378749,220186.995863664 150455.22594426,
- 220187.070292282 150452.742169995,220187.266504273 150450.265039585,220187.584026947 150447.800520653,
- 220188.022095363 150445.35455044,220188.579654177 150442.933021505,220189.25536018 150440.541767521,
- 220190.047585536 150438.18654923,220190.954421707 150435.873040558,220191.973684044 150433.60681495,
- 220193.102917055 150431.393331943,220194.339400319 150429.237924011,220195.680155039 150427.14578372,220197.12195122 150425.12195122,
- 220198.661315447 150423.171302099,220200.29453926 150421.298535644,220202.017688077 150419.508163512,220203.826610682 150417.804498867,
- 220205.716949223 150416.191645986,220207.684149708 150414.673490372,220209.72347298 150413.253689397,220211.830006129 150411.935663483,
- 220213.998674333 150410.722587873,220216.22425308 150409.61738497,220218.501380756 150408.622717305,220220.824571561 150407.740981121,
- 220223.188228725 150406.974300596,220225.586657991 150406.324522731,220227 150406)
-
---3d example
-SELECT ST_AsEWKT(ST_CurveToLine(ST_GeomFromEWKT('CIRCULARSTRING(220268 150415 1,220227 150505 2,220227 150406 3)')));
-Output
-------
- LINESTRING(220268 150415 1,220269.95064912 150416.539364228 1.0181172856673,
- 220271.823415575 150418.17258804 1.03623457133459,220273.613787707 150419.895736857 1.05435185700189,....AD INFINITUM ....
-	220225.586657991 150406.324522731 1.32611114201132,220227 150406 3)
-
---use only 2 segments to approximate quarter circle
-SELECT ST_AsText(ST_CurveToLine(ST_GeomFromText('CIRCULARSTRING(220268 150415,220227 150505,220227 150406)'),2));
-st_astext
-------------------------------
- LINESTRING(220268 150415,220287.740300149 150448.342699654,220278.12195122 150485.87804878,
- 220244.779251566 150505.61834893,220207.243902439 150496,220187.50360229 150462.657300346,
- 220197.12195122 150425.12195122,220227 150406)
-
-
-		

Name

ST_Difference — Returns a geometry that represents that part of geometry A - that does not intersect with geometry B.

Synopsis

geometry ST_Difference(geometry geomA, geometry geomB);

Description

Returns a geometry that represents that part of geometry A - that does not intersect with geometry B. One can think of this as GeometryA - ST_Intersection(A,B). If A is completely contained in B - then an empty geometry collection is returned.

[Note]

Note - order matters. B - A will always return a portion of B

Performed by the GEOS module

[Note]

Do not call with a GeometryCollection as an argument

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1. s2.1.1.3

This method implements the SQL/MM specification. SQL-MM 3: 5.1.20

- This function supports 3d and will not drop the z-index. However it seems to only consider x y when - doing the difference and tacks back on the Z-Index

Examples

-

-

The original linestrings shown together.

-

-
-

The difference of the two linestrings

-

-
---Safe for 2d. This is same geometries as what is shown for st_symdifference
-SELECT ST_AsText(
-	ST_Difference(
-			ST_GeomFromText('LINESTRING(50 100, 50 200)'),
-			ST_GeomFromText('LINESTRING(50 50, 50 150)')
-		)
-	);
-
-st_astext
----------
-LINESTRING(50 150,50 200)
-
-
---When used in 3d doesn't quite do the right thing
-SELECT ST_AsEWKT(ST_Difference(ST_GeomFromEWKT('MULTIPOINT(-118.58 38.38 5,-118.60 38.329 6,-118.614 38.281 7)'), ST_GeomFromEWKT('POINT(-118.614 38.281 5)')));
-st_asewkt
----------
-MULTIPOINT(-118.6 38.329 6,-118.58 38.38 5)
-		

Name

ST_Dump — Returns a set of geometry_dump (geom,path) rows, that make up a geometry g1.

Synopsis

geometry_dump[]ST_Dump(geometry g1);

Description

This is a set-returning function (SRF). It returns a set of - geometry_dump rows, formed by a geometry (geom) and an array of - integers (path). When the input geometry is a simple type - (POINT,LINESTRING,POLYGON) a single record will be returned with - an empty path array and the input geometry as geom. When the input - geometry is a collection or multi it will return a record for each - of the collection components, and the path will express the - position of the component inside the collection.

ST_Dump is useful for expanding geometries. It is the - reverse of a GROUP BY in that it creates new rows. For example it - can be use to expand MULTIPOLYGONS into POLYGONS.

Availability: PostGIS 1.0.0RC1. Requires PostgreSQL 7.3 or higher.

[Note]

Prior to 1.3.4, this function crashes if used with geometries that contain CURVES. This is fixed in 1.3.4+

- This function supports 3d and will not drop the z-index.

- This method supports Circular Strings and Curves

Examples

SELECT sometable.field1, sometable.field1,
-      (ST_Dump(sometable.the_geom)).geom AS the_geom
-FROM sometable;
-
---Break a compound curve into its constituent linestrings and circularstrings
-SELECT ST_AsEWKT(a.geom), ST_HasArc(a.geom)
-  FROM ( SELECT (ST_Dump(p_geom)).geom AS geom
-         FROM (SELECT ST_GeomFromEWKT('COMPOUNDCURVE(CIRCULARSTRING(0 0, 1 1, 1 0),(1 0, 0 1))') AS p_geom) AS b
-        ) AS a;
-          st_asewkt          | st_hasarc
------------------------------+----------
- CIRCULARSTRING(0 0,1 1,1 0) | t
- LINESTRING(1 0,0 1)         | f
-(2 rows)

Name

ST_DumpPoints — Returns a set of geometry_dump (geom,path) rows of all points that make up a geometry.

Synopsis

geometry_dump[]ST_DumpPoints(geometry geom);

Description

This set-returning function (SRF) returns a set of geometry_dump rows formed - by a geometry (geom) and an array of integers (path).

The geom component of geometry_dump are - all the POINTs that make up the supplied geometry

The path component of geometry_dump (an integer[]) - is an index reference enumerating the POINTs of the supplied geometry. - For example, if a LINESTRING is supplied, a path of {i} is - returned where i is the nth coordinate in the LINESTRING. - If a POLYGON is supplied, a path of {i,j} is returned where - i is the outer ring followed by the inner rings and j - enumerates the POINTs. -

Availability: 1.5.0

- This function supports 3d and will not drop the z-index.

- This method supports Circular Strings and Curves

Examples

SELECT path, ST_AsText(geom) 
-FROM (
-  SELECT (ST_DumpPoints(g.geom)).* 
-  FROM
-    (SELECT 
-       'GEOMETRYCOLLECTION(
-          POINT ( 0 1 ), 
-          LINESTRING ( 0 3, 3 4 ),
-          POLYGON (( 2 0, 2 3, 0 2, 2 0 )),
-          POLYGON (( 3 0, 3 3, 6 3, 6 0, 3 0 ), 
-                   ( 5 1, 4 2, 5 2, 5 1 )),
-          MULTIPOLYGON (
-                  (( 0 5, 0 8, 4 8, 4 5, 0 5 ), 
-                   ( 1 6, 3 6, 2 7, 1 6 )), 
-                  (( 5 4, 5 8, 6 7, 5 4 ))
-          )
-        )'::geometry AS geom
-    ) AS g
-  ) j;
-  
-   path    | st_astext  
------------+------------
- {1,1}     | POINT(0 1)
- {2,1}     | POINT(0 3)
- {2,2}     | POINT(3 4)
- {3,1,1}   | POINT(2 0)
- {3,1,2}   | POINT(2 3)
- {3,1,3}   | POINT(0 2)
- {3,1,4}   | POINT(2 0)
- {4,1,1}   | POINT(3 0)
- {4,1,2}   | POINT(3 3)
- {4,1,3}   | POINT(6 3)
- {4,1,4}   | POINT(6 0)
- {4,1,5}   | POINT(3 0)
- {4,2,1}   | POINT(5 1)
- {4,2,2}   | POINT(4 2)
- {4,2,3}   | POINT(5 2)
- {4,2,4}   | POINT(5 1)
- {5,1,1,1} | POINT(0 5)
- {5,1,1,2} | POINT(0 8)
- {5,1,1,3} | POINT(4 8)
- {5,1,1,4} | POINT(4 5)
- {5,1,1,5} | POINT(0 5)
- {5,1,2,1} | POINT(1 6)
- {5,1,2,2} | POINT(3 6)
- {5,1,2,3} | POINT(2 7)
- {5,1,2,4} | POINT(1 6)
- {5,2,1,1} | POINT(5 4)
- {5,2,1,2} | POINT(5 8)
- {5,2,1,3} | POINT(6 7)
- {5,2,1,4} | POINT(5 4)
-(29 rows)

Name

ST_DumpRings — Returns a set of geometry_dump rows, representing - the exterior and interior rings of a polygon.

Synopsis

geometry_dump[] ST_DumpRings(geometry a_polygon);

Description

This is a set-returning function (SRF). It returns a set of - geometry_dump rows, defined as an integer[] - and a geometry, aliased "path" and "geom" respectively. - The "path" field holds the polygon ring index containing a single integer: 0 for the shell, >0 for holes. - The "geom" field contains the corresponding ring as a polygon.

Availability: PostGIS 1.1.3. Requires PostgreSQL 7.3 or higher.

[Note]

This only works for POLYGON geometries. It will not work for MULTIPOLYGONS

- This function supports 3d and will not drop the z-index.

Examples

SELECT sometable.field1, sometable.field1,
-	  (ST_DumpRings(sometable.the_geom)).geom As the_geom
-FROM sometableOfpolys;
-
-SELECT ST_AsEWKT(geom) As the_geom, path
-	FROM ST_DumpRings(
-		ST_GeomFromEWKT('POLYGON((-8149064 5133092 1,-8149064 5132986 1,-8148996 5132839 1,-8148972 5132767 1,-8148958 5132508 1,-8148941 5132466 1,-8148924 5132394 1,
-		-8148903 5132210 1,-8148930 5131967 1,-8148992 5131978 1,-8149237 5132093 1,-8149404 5132211 1,-8149647 5132310 1,-8149757 5132394 1,
-		-8150305 5132788 1,-8149064 5133092 1),
-		(-8149362 5132394 1,-8149446 5132501 1,-8149548 5132597 1,-8149695 5132675 1,-8149362 5132394 1))')
-		)  as foo;
- path |                                            the_geom
-----------------------------------------------------------------------------------------------------------------
-  {0} | POLYGON((-8149064 5133092 1,-8149064 5132986 1,-8148996 5132839 1,-8148972 5132767 1,-8148958 5132508 1,
-	  |          -8148941 5132466 1,-8148924 5132394 1,
-	  |          -8148903 5132210 1,-8148930 5131967 1,
-	  |          -8148992 5131978 1,-8149237 5132093 1,
-	  |          -8149404 5132211 1,-8149647 5132310 1,-8149757 5132394 1,-8150305 5132788 1,-8149064 5133092 1))
-  {1} | POLYGON((-8149362 5132394 1,-8149446 5132501 1,
-	  |          -8149548 5132597 1,-8149695 5132675 1,-8149362 5132394 1))

Name

ST_Intersection — (T) Returns a geometry that represents the shared portion of geomA and geomB. The geography implementation - does a transform to geometry to do the intersection and then transform back to WGS84. -

Synopsis

geometry ST_Intersection( - geometry - geomA - , - geometry - geomB - );

geography ST_Intersection( - geography - geogA - , - geography - geogB - );

Description

Returns a geometry that represents the point set - intersection of the Geometries.

In other words - that portion of geometry A and geometry B - that is shared between the two geometries.

If the geometries do not share any space (are disjoint), then an empty geometry collection - is returned.

ST_Intersection in conjunction with ST_Intersects is very useful for clipping geometries such as in bounding box, buffer, region - queries where you only want to return that portion of a geometry that sits in a country or region of interest.

[Note]

Geography: For geography this is really a thin wrapper around the geometry implementation. It first determines the best SRID that - fits the bounding box of the 2 geography objects (if geography objects are within one half zone UTM but not same UTM will pick one of those) (favoring UTM or Lambert Azimuthal Equal Area (LAEA) north/south pole, and falling back on mercator in worst case scenario) and then intersection in that best fit planar spatial ref and retransforms back to WGS84 geography.

[Important]

Do not call with a GEOMETRYCOLLECTION as an argument

Performed by the GEOS module

Availability: 1.5 support for geography data type was introduced.

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1. s2.1.1.3

This method implements the SQL/MM specification. SQL-MM 3: 5.1.18

Examples

SELECT ST_AsText(ST_Intersection('POINT(0 0)'::geometry, 'LINESTRING ( 2 0, 0 2 )'::geometry));
- st_astext
----------------
-GEOMETRYCOLLECTION EMPTY
-(1 row)
-SELECT ST_AsText(ST_Intersection('POINT(0 0)'::geometry, 'LINESTRING ( 0 0, 0 2 )'::geometry));
- st_astext
----------------
-POINT(0 0)
-(1 row)
-
----Clip all lines (trails) by country (here we assume country geom are POLYGON or MULTIPOLYGONS)
--- NOTE: we are only keeping intersections that result in a LINESTRING or MULTILINESTRING because we don't
--- care about trails that just share a point
--- the dump is needed to expand a geometry collection into individual single MULT* parts
--- the below is fairly generic and will work for polys, etc. by just changing the where clause
-SELECT clipped.gid, clipped.f_name, clipped_geom
-FROM (SELECT trails.gid, trails.f_name, (ST_Dump(ST_Intersection(country.the_geom, trails.the_geom))).geom As clipped_geom
-FROM country
-	INNER JOIN trails
-	ON ST_Intersects(country.the_geom, trails.the_geom))  As clipped
-	WHERE ST_Dimension(clipped.clipped_geom) = 1 ;
-
---For polys e.g. polygon landmarks, you can also use the sometimes faster hack that buffering anything by 0.0
--- except a polygon results in an empty geometry collection
---(so a geometry collection containing polys, lines and points)
--- buffered by 0.0 would only leave the polygons and dissolve the collection shell
-SELECT poly.gid,  ST_Multi(ST_Buffer(
-				ST_Intersection(country.the_geom, poly.the_geom),
-				0.0)
-				) As clipped_geom
-FROM country
-	INNER JOIN poly
-	ON ST_Intersects(country.the_geom, poly.the_geom)
-	WHERE Not ST_IsEmpty(ST_Buffer(ST_Intersection(country.the_geom, poly.the_geom),0.0));
-		

Name

ST_LineToCurve — Converts a LINESTRING/POLYGON to a CIRCULARSTRING, CURVED POLYGON

Synopsis

geometry ST_LineToCurve(geometry geomANoncircular);

Description

Converts plain LINESTRING/POLYGONS to CIRCULAR STRINGs and Curved Polygons. Note much fewer points are needed to describe the curved equivalent.

Availability: 1.2.2?

- This function supports 3d and will not drop the z-index.

- This method supports Circular Strings and Curves

Examples

-SELECT ST_AsText(ST_LineToCurve(foo.the_geom)) As curvedastext,ST_AsText(foo.the_geom) As non_curvedastext
-	FROM (SELECT ST_Buffer('POINT(1 3)'::geometry, 3) As the_geom) As foo;
-
-curvedatext															non_curvedastext
-------------------------------------------------------------------|	-----------------------------------------------------------------
-CURVEPOLYGON(CIRCULARSTRING(4 3,3.12132034355964 0.878679656440359,	 |	POLYGON((4 3,3.94235584120969 2.41472903395162,3.77163859753386 1.85194970290473
-1 0,-1.12132034355965 5.12132034355963,4 3))						 | ,3.49440883690764 1.33328930094119,3.12132034355964 0.878679656440359,
-																	|				2.66671069905881 0.505591163092366,2.14805029709527 0.228361402466141,
-																	|				1.58527096604839 0.0576441587903094,1 0,
-																	|				0.414729033951621 0.0576441587903077,-0.148050297095264 0.228361402466137,
-																	|				-0.666710699058802 0.505591163092361,-1.12132034355964 0.878679656440353,
-																	|				-1.49440883690763 1.33328930094119,-1.77163859753386 1.85194970290472
-																	|				--ETC-- ,3.94235584120969 3.58527096604839,4 3))
---3D example
-SELECT ST_AsEWKT(ST_LineToCurve(ST_GeomFromEWKT('LINESTRING(1 2 3, 3 4 8, 5 6 4, 7 8 4, 9 10 4)')));
-
-			 st_asewkt
-------------------------------------
- CIRCULARSTRING(1 2 3,5 6 4,9 10 4)
-
-		

Name

ST_MemUnion — Same as ST_Union, only memory-friendly (uses less memory - and more processor time).

Synopsis

geometry ST_MemUnion(geometry set geomfield);

Description

Some useful description here.

[Note]

Same as ST_Union, only memory-friendly (uses less memory - and more processor time). This aggregate function works by unioning the geometries one at a time to previous result as opposed to - ST_Union aggregate which first creates an array and then unions

- This function supports 3d and will not drop the z-index.

Examples

See ST_Union

See Also

ST_Union


Name

ST_MinimumBoundingCircle — Returns the smallest circle polygon that can fully contain a geometry. Default - uses 48 segments per quarter circle.

Synopsis

geometry ST_MinimumBoundingCircle(geometry geomA);

geometry ST_MinimumBoundingCircle(geometry geomA, integer num_segs_per_qt_circ);

Description

Returns the smallest circle polygon that can fully contain a geometry.

[Note]

The circle is approximated by a polygon with a default of 48 segments per quarter circle. This number can be increased with little performance penalty to obtain a more accurate result.

It is often used with MULTI and Geometry Collections. - Although it is not an aggregate - you can use it in conjunction - with ST_Collect to get the minimum bounding cirlce of a set of geometries. - ST_MinimumBoundingCircle(ST_Collect(somepointfield)).

The ratio of the area of a polygon divided by the area of its Minimum Bounding Circle is often referred to as the Roeck test.

Availability: 1.4.0 - requires GEOS

Examples

SELECT d.disease_type,
-	ST_MinimumBoundingCircle(ST_Collect(d.the_geom)) As the_geom
-	FROM disease_obs As d
-	GROUP BY d.disease_type;
-

Minimum bounding circle of a point and linestring. Using 8 segs to approximate a quarter circle

-SELECT ST_AsText(ST_MinimumBoundingCircle(
-		ST_Collect(
-			ST_GeomFromEWKT('LINESTRING(55 75,125 150)'),
-				ST_Point(20, 80)), 8
-				)) As wktmbc;
-wktmbc
------------
-POLYGON((135.59714732062 115,134.384753327498 102.690357210921,130.79416296937 90.8537670908995,124.963360620072 79.9451031602111,117.116420743937 70.3835792560632,107.554896839789 62.5366393799277,96.6462329091006 56.70583703063,84.8096427890789 53.115246672502,72.5000000000001 51.9028526793802,60.1903572109213 53.1152466725019,48.3537670908996 56.7058370306299,37.4451031602112 62.5366393799276,27.8835792560632 70.383579256063,20.0366393799278 79.9451031602109,14.20583703063 90.8537670908993,10.615246672502 102.690357210921,9.40285267938019 115,10.6152466725019 127.309642789079,14.2058370306299 139.1462329091,20.0366393799275 150.054896839789,27.883579256063 159.616420743937,
-37.4451031602108 167.463360620072,48.3537670908992 173.29416296937,60.190357210921 176.884753327498,
-72.4999999999998 178.09714732062,84.8096427890786 176.884753327498,96.6462329091003 173.29416296937,107.554896839789 167.463360620072,
-117.116420743937 159.616420743937,124.963360620072 150.054896839789,130.79416296937 139.146232909101,134.384753327498 127.309642789079,135.59714732062 115))
-				

Name

ST_Polygonize — Aggregate. Creates a GeometryCollection containing possible - polygons formed from the constituent linework of a set of - geometries.

Synopsis

geometry ST_Polygonize(geometry set geomfield);

geometry ST_Polygonize(geometry[] geom_array);

Description

Creates a GeometryCollection containing possible - polygons formed from the constituent linework of a set of - geometries.

[Note]

Geometry Collections are often difficult to deal with with third party tools, so use ST_Polygonize in conjunction with ST_Dump to dump the polygons - out into individual polygons.

Availability: 1.0.0RC1 - requires GEOS >= 2.1.0.

Examples: Polygonizing single linestrings

-SELECT ST_AsEWKT(ST_Polygonize(the_geom_4269)) As geomtextrep
-FROM (SELECT the_geom_4269 FROM ma.suffolk_edges ORDER BY tlid LIMIT 45) As foo;
-
-geomtextrep
--------------------------------------
- SRID=4269;GEOMETRYCOLLECTION(POLYGON((-71.040878 42.285678,-71.040943 42.2856,-71.04096 42.285752,-71.040878 42.285678)),
- POLYGON((-71.17166 42.353675,-71.172026 42.354044,-71.17239 42.354358,-71.171794 42.354971,-71.170511 42.354855,
- -71.17112 42.354238,-71.17166 42.353675)))
-(1 row)
-
---Use ST_Dump to dump out the polygonize geoms into individual polygons
-SELECT ST_AsEWKT((ST_Dump(foofoo.polycoll)).geom) As geomtextrep
-FROM (SELECT ST_Polygonize(the_geom_4269) As polycoll
-	FROM (SELECT the_geom_4269 FROM ma.suffolk_edges
-		ORDER BY tlid LIMIT 45) As foo) As foofoo;
-
-geomtextrep
-------------------------
- SRID=4269;POLYGON((-71.040878 42.285678,-71.040943 42.2856,-71.04096 42.285752,
--71.040878 42.285678))
- SRID=4269;POLYGON((-71.17166 42.353675,-71.172026 42.354044,-71.17239 42.354358
-,-71.171794 42.354971,-71.170511 42.354855,-71.17112 42.354238,-71.17166 42.353675))
-(2 rows)
-
-			  

See Also

ST_Dump


Name

ST_Shift_Longitude — Reads every point/vertex in every component of every feature - in a geometry, and if the longitude coordinate is <0, adds 360 - to it. The result would be a 0-360 version of the data to be - plotted in a 180 centric map

Synopsis

geometry ST_Shift_Longitude(geometry geomA);

Description

Reads every point/vertex in every component of every feature - in a geometry, and if the longitude coordinate is <0, adds 360 - to it. The result would be a 0-360 version of the data to be - plotted in a 180 centric map

[Note]

This is only useful for data in long lat e.g. 4326 (WGS 84 long lat)

- Pre-1.3.4 bug prevented this from working for MULTIPOINT. 1.3.4+ works with MULTIPOINT as well. -

- This function supports 3d and will not drop the z-index.

Examples

--3d points
-SELECT ST_AsEWKT(ST_Shift_Longitude(ST_GeomFromEWKT('SRID=4326;POINT(-118.58 38.38 10)'))) As geomA,
-	ST_AsEWKT(ST_Shift_Longitude(ST_GeomFromEWKT('SRID=4326;POINT(241.42 38.38 10)'))) As geomb
-geomA							  geomB
-----------						  -----------
-SRID=4326;POINT(241.42 38.38 10) SRID=4326;POINT(-118.58 38.38 10)
-
---regular line string
-SELECT ST_AsText(ST_Shift_Longitude(ST_GeomFromText('LINESTRING(-118.58 38.38, -118.20 38.45)')))
-
-st_astext
-----------
-LINESTRING(241.42 38.38,241.8 38.45)
-		

Name

ST_Simplify — Returns a "simplified" version of the given geometry using - the Douglas-Peucker algorithm.

Synopsis

geometry ST_Simplify(geometry geomA, float tolerance);

Description

Returns a "simplified" version of the given geometry using - the Douglas-Peucker algorithm. Will actually do something only with - (multi)lines and (multi)polygons but you can safely call it with - any kind of geometry. Since simplification occurs on a - object-by-object basis you can also feed a GeometryCollection to - this function.

[Note]

Note that returned geometry might loose its - simplicity (see ST_IsSimple)

[Note]

Note topology may not be preserved and may result in invalid geometries. Use (see ST_SimplifyPreserveTopology) to preserve topology.

Performed by the GEOS module.

Availability: 1.2.2

Examples

A circle simplified too much becomes a triangle, medium an octagon,

-SELECT ST_Npoints(the_geom) As np_before, ST_NPoints(ST_Simplify(the_geom,0.1)) As np01_notbadcircle, ST_NPoints(ST_Simplify(the_geom,0.5)) As np05_notquitecircle,
-ST_NPoints(ST_Simplify(the_geom,1)) As np1_octagon, ST_NPoints(ST_Simplify(the_geom,10)) As np10_triangle,
-(ST_Simplify(the_geom,100) is null) As  np100_geometrygoesaway
-FROM (SELECT ST_Buffer('POINT(1 3)', 10,12) As the_geom) As foo;
--result
- np_before | np01_notbadcircle | np05_notquitecircle | np1_octagon | np10_triangle | np100_geometrygoesaway
------------+-------------------+---------------------+-------------+---------------+------------------------
-		49 |                33 |                  17 |           9 |             4 | t
-
-				

Name

ST_SimplifyPreserveTopology — Returns a "simplified" version of the given geometry using - the Douglas-Peucker algorithm. Will avoid creating derived - geometries (polygons in particular) that are invalid.

Synopsis

geometry ST_SimplifyPreserveTopology(geometry geomA, float tolerance);

Description

Returns a "simplified" version of the given geometry using - the Douglas-Peucker algorithm. Will avoid creating derived - geometries (polygons in particular) that are invalid. Will actually do something only with - (multi)lines and (multi)polygons but you can safely call it with - any kind of geometry. Since simplification occurs on a - object-by-object basis you can also feed a GeometryCollection to - this function.

Performed by the GEOS module.

[Note]

Requires GEOS 3.0.0+

Availability: 1.3.3

Examples

Same example as Simplify, but we see Preserve Topology prevents oversimplification. The circle can at most become a square.

-SELECT ST_Npoints(the_geom) As np_before, ST_NPoints(ST_SimplifyPreserveTopology(the_geom,0.1)) As np01_notbadcircle, ST_NPoints(ST_SimplifyPreserveTopology(the_geom,0.5)) As np05_notquitecircle,
-ST_NPoints(ST_SimplifyPreserveTopology(the_geom,1)) As np1_octagon, ST_NPoints(ST_SimplifyPreserveTopology(the_geom,10)) As np10_square,
-ST_NPoints(ST_SimplifyPreserveTopology(the_geom,100)) As  np100_stillsquare
-FROM (SELECT ST_Buffer('POINT(1 3)', 10,12) As the_geom) As foo;
-
---result--
- np_before | np01_notbadcircle | np05_notquitecircle | np1_octagon | np10_square | np100_stillsquare
------------+-------------------+---------------------+-------------+---------------+-------------------
-		49 |                33 |                  17 |           9 |             5 |                 5
-				

See Also

ST_Simplify


Name

ST_SymDifference — Returns a geometry that represents the portions of A and B - that do not intersect. It is called a symmetric difference because - ST_SymDifference(A,B) = ST_SymDifference(B,A).

Synopsis

geometry ST_SymDifference(geometry geomA, geometry geomB);

Description

Returns a geometry that represents the portions of A and B - that do not intersect. It is called a symmetric difference because - ST_SymDifference(A,B) = ST_SymDifference(B,A). One can think of this as ST_Union(geomA,geomB) - ST_Intersection(A,B). -

Performed by the GEOS module

[Note]

Do not call with a GeometryCollection as an argument

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1. s2.1.1.3

This method implements the SQL/MM specification. SQL-MM 3: 5.1.21

- This function supports 3d and will not drop the z-index. However it seems to only consider x y when - doing the difference and tacks back on the Z-Index

Examples

-

-

The original linestrings shown together

-

-
-

The symmetric difference of the two linestrings

-

-
---Safe for 2d - symmetric difference of 2 linestrings
-SELECT ST_AsText(
-	ST_SymDifference(
-		ST_GeomFromText('LINESTRING(50 100, 50 200)'),
-		ST_GeomFromText('LINESTRING(50 50, 50 150)')
-	)
-);
-
-st_astext
----------
-MULTILINESTRING((50 150,50 200),(50 50,50 100))
-
-
---When used in 3d doesn't quite do the right thing
-SELECT ST_AsEWKT(ST_SymDifference(ST_GeomFromEWKT('LINESTRING(1 2 1, 1 4 2)'),
-	ST_GeomFromEWKT('LINESTRING(1 1 3, 1 3 4)')))
-
-st_astext
-------------
-MULTILINESTRING((1 3 2.75,1 4 2),(1 1 3,1 2 2.25))
-		

Name

ST_Union — Returns a geometry that represents the point set union of - the Geometries.

Synopsis

geometry ST_Union(geometry set g1field);

geometry ST_Union(geometry g1, geometry g2);

geometry ST_Union(geometry[] g1_array);

Description

Output type can be a MULTI* , single geometry, or Geometry Collection. Comes in 2 variants. Variant 1 unions 2 geometries resulting in a new geomety with no intersecting regions. - Variant 2 is an aggregate function that takes a set of geometries and unions - them into a single ST_Geometry resulting in no intersecting regions.

Aggregate version: This function returns a MULTI geometry or NON-MULTI geometry - from a set of geometries. The ST_Union() function is an "aggregate" - function in the terminology of PostgreSQL. That means that it - operates on rows of data, in the same way the SUM() and AVG() - functions do.

Non-Aggregate version: This function returns a geometry being a union of two - input geometries. Output type can be a MULTI* ,NON-MULTI or - GEOMETRYCOLLECTION.

[Note]

ST_Collect and ST_Union are often interchangeable. - ST_Union is in general orders of magnitude slower than ST_Collect - because it tries to dissolve boundaries and reorder geometries to ensure that a constructed Multi* doesn't - have intersecting regions.

Performed by the GEOS module.

NOTE: this function was formerly called GeomUnion(), which - was renamed from "Union" because UNION is an SQL reserved - word.

Availability: 1.4.0 - ST_Union was enhanced. ST_Union(geomarray) was introduced and also faster aggregate collection in PostgreSQL. If you are using GEOS 3.1.0+ - ST_Union will use the faster Cascaded Union algorithm described in - http://blog.cleverelephant.ca/2009/01/must-faster-unions-in-postgis-14.html

- This method implements the OpenGIS Simple Features - Implementation Specification for SQL 1.1. s2.1.1.3

[Note]

Aggregate version is not explicitly defined in OGC SPEC.

This method implements the SQL/MM specification. SQL-MM 3: 5.1.19 - the z-index (elevation) when polygons are involved.

Examples

Aggregate example

-SELECT stusps,
-	   ST_Multi(ST_Union(f.the_geom)) as singlegeom
-	 FROM sometable As f
-GROUP BY stusps
-			  

Non-Aggregate example

-SELECT ST_AsText(ST_Union(ST_GeomFromText('POINT(1 2)'),
-	ST_GeomFromText('POINT(-2 3)') ) )
-
-st_astext
-----------
-MULTIPOINT(-2 3,1 2)
-
-
-SELECT ST_AsText(ST_Union(ST_GeomFromText('POINT(1 2)'),
-		ST_GeomFromText('POINT(1 2)') ) );
-st_astext
-----------
-POINT(1 2)
-
---3d example - sort of supports 3d (and with mixed dimensions!)
-SELECT ST_AsEWKT(st_union(the_geom))
-FROM
-(SELECT ST_GeomFromEWKT('POLYGON((-7 4.2,-7.1 4.2,-7.1 4.3,
--7 4.2))') as the_geom
-UNION ALL
-SELECT ST_GeomFromEWKT('POINT(5 5 5)') as the_geom
-UNION ALL
-	SELECT ST_GeomFromEWKT('POINT(-2 3 1)') as the_geom
-UNION ALL
-SELECT ST_GeomFromEWKT('LINESTRING(5 5 5, 10 10 10)') as the_geom ) as foo;
-
-st_asewkt
----------
-GEOMETRYCOLLECTION(POINT(-2 3 1),LINESTRING(5 5 5,10 10 10),POLYGON((-7 4.2 5,-7.1 4.2 5,-7.1 4.3 5,-7 4.2 5)));
-
---3d example not mixing dimensions
-SELECT ST_AsEWKT(st_union(the_geom))
-FROM
-(SELECT ST_GeomFromEWKT('POLYGON((-7 4.2 2,-7.1 4.2 3,-7.1 4.3 2,
--7 4.2 2))') as the_geom
-UNION ALL
-SELECT ST_GeomFromEWKT('POINT(5 5 5)') as the_geom
-UNION ALL
-	SELECT ST_GeomFromEWKT('POINT(-2 3 1)') as the_geom
-UNION ALL
-SELECT ST_GeomFromEWKT('LINESTRING(5 5 5, 10 10 10)') as the_geom ) as foo;
-
-st_asewkt
----------
-GEOMETRYCOLLECTION(POINT(-2 3 1),LINESTRING(5 5 5,10 10 10),POLYGON((-7 4.2 2,-7.1 4.2 3,-7.1 4.3 2,-7 4.2 2)))
-
---Examples using new Array construct
-SELECT ST_Union(ARRAY(SELECT the_geom FROM sometable));
-
-SELECT ST_AsText(ST_Union(ARRAY[ST_GeomFromText('LINESTRING(1 2, 3 4)'),
-			ST_GeomFromText('LINESTRING(3 4, 4 5)')])) As wktunion;
-
---wktunion---
-MULTILINESTRING((3 4,4 5),(1 2,3 4))
-
-			  

See Also

ST_Collect

7.10. Linear Referencing

ST_Line_Interpolate_Point — Returns a point interpolated along a line. Second argument is a float8 between 0 and 1 - representing fraction of total length of linestring the point has to be located.
ST_Line_Locate_Point — Returns a float between 0 and 1 representing the location of - the closest point on LineString to the given Point, as a fraction - of total 2d line length.
ST_Line_Substring — Return a linestring being a substring of the input one - starting and ending at the given fractions of total 2d length. - Second and third arguments are float8 values between 0 and - 1.
ST_Locate_Along_Measure — Return a derived geometry collection value with elements - that match the specified measure. Polygonal elements are not - supported.
ST_Locate_Between_Measures — Return a derived geometry collection value with elements - that match the specified range of measures inclusively. Polygonal - elements are not supported.
ST_LocateBetweenElevations — Return a derived geometry (collection) value with elements - that intersect the specified range of elevations inclusively. Only 3D, 4D LINESTRINGS and MULTILINESTRINGS - are supported.
ST_AddMeasure — Return a derived geometry with measure elements linearly interpolated between the start and end points. If the geometry has no measure dimension, one is added. If the geometry has a measure dimension, it is over-written with new values. Only LINESTRINGS and MULTILINESTRINGS are supported.

Name

ST_Line_Interpolate_Point — Returns a point interpolated along a line. Second argument is a float8 between 0 and 1 - representing fraction of total length of linestring the point has to be located.

Synopsis

geometry ST_Line_Interpolate_Point(geometry a_linestring, float a_fraction);

Description

Returns a point interpolated along a line. First argument - must be a LINESTRING. Second argument is a float8 between 0 and 1 - representing fraction of total linestring length the point has to be located.

See ST_Line_Locate_Point for - computing the line location nearest to a Point.

[Note]

Since release 1.1.1 this function also interpolates M and - Z values (when present), while prior releases set them to - 0.0.

Availability: 0.8.2, Z and M supported added in 1.1.1

- This function supports 3d and will not drop the z-index.

Examples

A linestring with the interpolated point at 20% position (0.20)

--Return point 20% along 2d line
-SELECT ST_AsEWKT(ST_Line_Interpolate_Point(the_line, 0.20))
-	FROM (SELECT ST_GeomFromEWKT('LINESTRING(25 50, 100 125, 150 190)') as the_line) As foo;
-   st_asewkt
-----------------
- POINT(51.5974135047432 76.5974135047432)
-
-
---Return point mid-way of 3d line
-SELECT ST_AsEWKT(ST_Line_Interpolate_Point(the_line, 0.5))
-	FROM (SELECT ST_GeomFromEWKT('LINESTRING(1 2 3, 4 5 6, 6 7 8)') as the_line) As foo;
-
-	st_asewkt
---------------------
- POINT(3.5 4.5 5.5)
-
-
---find closest point on a line to a point or other geometry
- SELECT ST_AsText(ST_Line_Interpolate_Point(foo.the_line, ST_Line_Locate_Point(foo.the_line, ST_GeomFromText('POINT(4 3)'))))
-FROM (SELECT ST_GeomFromText('LINESTRING(1 2, 4 5, 6 7)') As the_line) As foo;
-   st_astext
-----------------
- POINT(3 4)
-
-

Name

ST_Line_Locate_Point — Returns a float between 0 and 1 representing the location of - the closest point on LineString to the given Point, as a fraction - of total 2d line length.

Synopsis

float ST_Line_Locate_Point(geometry a_linestring, geometry a_point);

Description

Returns a float between 0 and 1 representing the location of - the closest point on LineString to the given Point, as a fraction - of total 2d line length.

You can use the returned location to extract a Point (ST_Line_Interpolate_Point) or - a substring (ST_Line_Substring).

This is useful for approximating numbers of addresses

Availability: 1.1.0

Availability: 1.5.1 - support for MULTILINESTRINGS was introduced.

Examples

---Rough approximation of finding the street number of a point along the street
---Note the whole foo thing is just to generate dummy data that looks
---like house centroids and street
---We use ST_DWithin to exclude
---houses too far away from the street to be considered on the street
-SELECT ST_AsText(house_loc) As as_text_house_loc,
-	startstreet_num +
-		CAST( (endstreet_num - startstreet_num)
-			* ST_Line_Locate_Point(street_line, house_loc) As integer) As street_num
-FROM
-(SELECT ST_GeomFromText('LINESTRING(1 2, 3 4)') As street_line,
-	ST_MakePoint(x*1.01,y*1.03) As house_loc, 10 As startstreet_num,
-		20 As endstreet_num
-FROM generate_series(1,3) x CROSS JOIN generate_series(2,4) As y)
-As foo
-WHERE ST_DWithin(street_line, house_loc, 0.2);
-
- as_text_house_loc | street_num
--------------------+------------
- POINT(1.01 2.06)  |         10
- POINT(2.02 3.09)  |         15
- POINT(3.03 4.12)  |         20
-
- --find closest point on a line to a point or other geometry
- SELECT ST_AsText(ST_Line_Interpolate_Point(foo.the_line, ST_Line_Locate_Point(foo.the_line, ST_GeomFromText('POINT(4 3)'))))
-FROM (SELECT ST_GeomFromText('LINESTRING(1 2, 4 5, 6 7)') As the_line) As foo;
-   st_astext
-----------------
- POINT(3 4)
-
-

Name

ST_Line_Substring — Return a linestring being a substring of the input one - starting and ending at the given fractions of total 2d length. - Second and third arguments are float8 values between 0 and - 1.

Synopsis

geometry ST_Line_Substring(geometry a_linestring, float startfraction, float endfraction);

Description

Return a linestring being a substring of the input one - starting and ending at the given fractions of total 2d length. - Second and third arguments are float8 values between 0 and - 1. This only works with LINESTRINGs. - To use with contiguous MULTILINESTRINGs use in conjunction with ST_LineMerge.

If 'start' and 'end' have the same value this is equivalent - to ST_Line_Interpolate_Point.

See ST_Line_Locate_Point for - computing the line location nearest to a Point.

[Note]

Since release 1.1.1 this function also interpolates M and - Z values (when present), while prior releases set them to - unspecified values.

Availability: 1.1.0 , Z and M supported added in 1.1.1

- This function supports 3d and will not drop the z-index.

Examples

A linestring seen with 1/3 midrange overlaid (0.333, 0.666)

---Return the approximate 1/3 mid-range part of a linestring
-SELECT ST_AsText(ST_Line_SubString(ST_GeomFromText('LINESTRING(25 50, 100 125, 150 190)'), 0.333, 0.666));
-
-										   st_astext
-------------------------------------------------------------------------------------------------
-LINESTRING(69.2846934853974 94.2846934853974,100 125,111.700356260683 140.210463138888)
-
---The below example simulates a while loop in
---SQL using PostgreSQL generate_series() to cut all
---linestrings in a table to 100 unit segments
--- of which no segment is longer than 100 units
--- units are measured in the SRID units of measurement
--- It also assumes all geometries are LINESTRING or contiguous MULTILINESTRING
---and no geometry is longer than 100 units*10000
---for better performance you can reduce the 10000
---to match max number of segments you expect
-
-SELECT field1, field2, ST_Line_Substring(the_geom, 100.00*n/length,
-  CASE
-	WHEN 100.00*(n+1) < length THEN 100.00*(n+1)/length
-	ELSE 1
-  END) As the_geom
-FROM
-  (SELECT sometable.field1, sometable.field2,
-  ST_LineMerge(sometable.the_geom) AS the_geom,
-  ST_Length(sometable.the_geom) As length
-  FROM sometable
-  ) AS t
-CROSS JOIN generate_series(0,10000) AS n
-WHERE n*100.00/length < 1;
-			

Name

ST_Locate_Along_Measure — Return a derived geometry collection value with elements - that match the specified measure. Polygonal elements are not - supported.

Synopsis

geometry ST_Locate_Along_Measure(geometry ageom_with_measure, float a_measure);

Description

Return a derived geometry collection value with elements - that match the specified measure. Polygonal elements are not - supported.

Semantic is specified by: ISO/IEC CD 13249-3:200x(E) - Text - for Continuation CD Editing Meeting

Availability: 1.1.0

[Note]

Use this function only for geometries with an M component

- This function supports M coordinates.

Examples

SELECT ST_AsEWKT(the_geom)
-		FROM
-		(SELECT ST_Locate_Along_Measure(
-			ST_GeomFromEWKT('MULTILINESTRINGM((1 2 3, 3 4 2, 9 4 3),
-		(1 2 3, 5 4 5))'),3) As the_geom) As foo;
-
-						 st_asewkt
------------------------------------------------------------
- GEOMETRYCOLLECTIONM(MULTIPOINT(1 2 3,9 4 3),POINT(1 2 3))
-
---Geometry collections are difficult animals so dump them
---to make them more digestable
-SELECT ST_AsEWKT((ST_Dump(the_geom)).geom)
-	FROM
-	(SELECT ST_Locate_Along_Measure(
-			ST_GeomFromEWKT('MULTILINESTRINGM((1 2 3, 3 4 2, 9 4 3),
-	(1 2 3, 5 4 5))'),3) As the_geom) As foo;
-
-   st_asewkt
----------------
- POINTM(1 2 3)
- POINTM(9 4 3)
- POINTM(1 2 3)
-	

Name

ST_Locate_Between_Measures — Return a derived geometry collection value with elements - that match the specified range of measures inclusively. Polygonal - elements are not supported.

Synopsis

geometry ST_Locate_Between_Measures(geometry geomA, float measure_start, float measure_end);

Description

Return a derived geometry collection value with elements - that match the specified range of measures inclusively. Polygonal - elements are not supported.

Semantic is specified by: ISO/IEC CD 13249-3:200x(E) - Text - for Continuation CD Editing Meeting

Availability: 1.1.0

- This function supports M coordinates.

Examples

SELECT ST_AsEWKT(the_geom)
-		FROM
-		(SELECT ST_Locate_Between_Measures(
-			ST_GeomFromEWKT('MULTILINESTRINGM((1 2 3, 3 4 2, 9 4 3),
-		(1 2 3, 5 4 5))'),1.5, 3) As the_geom) As foo;
-
-							 st_asewkt
------------------------------------------------------------------
- GEOMETRYCOLLECTIONM(LINESTRING(1 2 3,3 4 2,9 4 3),POINT(1 2 3))
-
---Geometry collections are difficult animals so dump them
---to make them more digestable
-SELECT ST_AsEWKT((ST_Dump(the_geom)).geom)
-		FROM
-		(SELECT ST_Locate_Between_Measures(
-			ST_GeomFromEWKT('MULTILINESTRINGM((1 2 3, 3 4 2, 9 4 3),
-		(1 2 3, 5 4 5))'),1.5, 3) As the_geom) As foo;
-
-		   st_asewkt
---------------------------------
- LINESTRINGM(1 2 3,3 4 2,9 4 3)
- POINTM(1 2 3)

Name

ST_LocateBetweenElevations — Return a derived geometry (collection) value with elements - that intersect the specified range of elevations inclusively. Only 3D, 4D LINESTRINGS and MULTILINESTRINGS - are supported.

Synopsis

geometry ST_LocateBetweenElevations(geometry geom_mline, float elevation_start, float elevation_end);

Description

Return a derived geometry (collection) value with elements - that intersect the specified range of elevations inclusively. Only 3D, 3DM LINESTRINGS and MULTILINESTRINGS - are supported.

Availability: 1.4.0

- This function supports 3d and will not drop the z-index.

Examples

SELECT ST_AsEWKT(ST_LocateBetweenElevations(
-			ST_GeomFromEWKT('LINESTRING(1 2 3, 4 5 6)'),2,4)) As ewelev;
-								   ewelev
-----------------------------------------------------------------
-	MULTILINESTRING((1 2 3,2 3 4))
-
-SELECT ST_AsEWKT(ST_LocateBetweenElevations(
-			ST_GeomFromEWKT('LINESTRING(1 2 6, 4 5 -1, 7 8 9)'),6,9)) As ewelev;
-
-				ewelev
-----------------------------------------------------------------
-GEOMETRYCOLLECTION(POINT(1 2 6),LINESTRING(6.1 7.1 6,7 8 9))
-
---Geometry collections are difficult animals so dump them
---to make them more digestable
-SELECT ST_AsEWKT((ST_Dump(the_geom)).geom)
-		FROM
-		(SELECT ST_LocateBetweenElevations(
-			ST_GeomFromEWKT('LINESTRING(1 2 6, 4 5 -1, 7 8 9)'),6,9) As the_geom) As foo;
-
-		   st_asewkt
---------------------------------
-POINT(1 2 6)
-LINESTRING(6.1 7.1 6,7 8 9)
-

See Also

ST_Dump


Name

ST_AddMeasure — Return a derived geometry with measure elements linearly interpolated between the start and end points. If the geometry has no measure dimension, one is added. If the geometry has a measure dimension, it is over-written with new values. Only LINESTRINGS and MULTILINESTRINGS are supported.

Synopsis

geometry ST_AddMeasure(geometry geom_mline, float measure_start, float measure_end);

Description

Return a derived geometry with measure elements linearly interpolated between the start and end points. If the geometry has no measure dimension, one is added. If the geometry has a measure dimension, it is over-written with new values. Only LINESTRINGS and MULTILINESTRINGS are supported.

Availability: 1.5.0

- This function supports 3d and will not drop the z-index.

Examples

SELECT ST_AsEWKT(ST_AddMeasure(
-ST_GeomFromEWKT('LINESTRING(1 0, 2 0, 4 0)'),1,4)) As ewelev;
-           ewelev             
---------------------------------
- LINESTRINGM(1 0 1,2 0 2,4 0 4)
-
-SELECT ST_AsEWKT(ST_AddMeasure(
-ST_GeomFromEWKT('LINESTRING(1 0 4, 2 0 4, 4 0 4)'),10,40)) As ewelev;
-                 ewelev                 
-----------------------------------------
- LINESTRING(1 0 4 10,2 0 4 20,4 0 4 40)
-
-SELECT ST_AsEWKT(ST_AddMeasure(
-ST_GeomFromEWKT('LINESTRINGM(1 0 4, 2 0 4, 4 0 4)'),10,40)) As ewelev;
-                 ewelev                 
-----------------------------------------
- LINESTRINGM(1 0 10,2 0 20,4 0 40)
- 
-SELECT ST_AsEWKT(ST_AddMeasure(
-ST_GeomFromEWKT('MULTILINESTRINGM((1 0 4, 2 0 4, 4 0 4),(1 0 4, 2 0 4, 4 0 4))'),10,70)) As ewelev;
-                             ewelev                              
------------------------------------------------------------------
- MULTILINESTRINGM((1 0 10,2 0 20,4 0 40),(1 0 40,2 0 50,4 0 70))
-

7.11. Long Transactions Support

AddAuth — Add an authorization token to be used in current transaction.
CheckAuth — Creates trigger on a table to prevent/allow updates and deletes of rows based on authorization token.
DisableLongTransactions — Disable long transaction support. This function removes the - long transaction support metadata tables, and drops all triggers - attached to lock-checked tables.
EnableLongTransactions — Enable long transaction support. This function creates the - required metadata tables, needs to be called once before using the - other functions in this section. Calling it twice is - harmless.
LockRow — Set lock/authorization for specific row in table
UnlockRows — Remove all locks held by specified authorization id. Returns - the number of locks released.

This module and associated pl/pgsql functions have been - implemented to provide long locking support required by Web Feature Service specification.

[Note]

Users must use serializable - transaction level otherwise locking mechanism would - break.

Name

AddAuth — Add an authorization token to be used in current transaction.

Synopsis

boolean AddAuth(text auth_token);

Description

Add an authorization token to be used in current transaction.

Creates/adds to a temp table called temp_lock_have_table the current transaction identifier - and authorization token key.

Availability: 1.1.3

Examples

-		SELECT LockRow('towns', '353', 'priscilla');
-		BEGIN TRANSACTION;
-			SELECT AddAuth('joey');
-			UPDATE towns SET the_geom = ST_Translate(the_geom,2,2) WHERE gid = 353;
-		COMMIT;
-
-
-		---Error--
-		ERROR:  UPDATE where "gid" = '353' requires authorization 'priscilla'
-		

See Also

LockRow


Name

CheckAuth — Creates trigger on a table to prevent/allow updates and deletes of rows based on authorization token.

Synopsis

integer CheckAuth(text a_schema_name, text a_table_name, text a_key_column_name);

integer CheckAuth(text a_table_name, text a_key_column_name);

Description

Creates trigger on a table to prevent/allow updates and deletes of rows based on authorization token. Identify rows using <rowid_col> column.

If a_schema_name is not passed in, then searches for table in current schema.

[Note]

If an authorization trigger already exists on this table function errors.

If Transaction support is not enabled, function throws an exception.

Availability: 1.1.3

Examples

-			SELECT CheckAuth('public', 'towns', 'gid');
-			result
-			------
-			0
-			

Name

DisableLongTransactions — Disable long transaction support. This function removes the - long transaction support metadata tables, and drops all triggers - attached to lock-checked tables.

Synopsis

text DisableLongTransactions(

Description

Disable long transaction support. This function removes the - long transaction support metadata tables, and drops all triggers - attached to lock-checked tables.

Drops meta table called authorization_table and a view called authorized_tables - and all triggers called checkauthtrigger

Availability: 1.1.3

Examples

SELECT DisableLongTransactions();
---result--
-Long transactions support disabled
-		  

Name

EnableLongTransactions — Enable long transaction support. This function creates the - required metadata tables, needs to be called once before using the - other functions in this section. Calling it twice is - harmless.

Synopsis

text EnableLongTransactions(

Description

Enable long transaction support. This function creates the - required metadata tables, needs to be called once before using the - other functions in this section. Calling it twice is - harmless.

Creates a meta table called authorization_table and a view called authorized_tables

Availability: 1.1.3

Examples

SELECT EnableLongTransactions();
---result--
-Long transactions support enabled
-		  

Name

LockRow — Set lock/authorization for specific row in table

Synopsis

integer LockRow(text a_schema_name, text a_table_name, text a_row_key, text an_auth_token, timestamp expire_dt);

integer LockRow(text a_table_name, text a_row_key, text an_auth_token, timestamp expire_dt);

integer LockRow(text a_table_name, text a_row_key, text an_auth_token);

Description

Set lock/authorization for specific row in table - <authid> is a text value, <expires> is a timestamp - defaulting to now()+1hour. Returns 1 if lock has been assigned, 0 - otherwise (already locked by other auth)

Availability: 1.1.3

Examples

SELECT LockRow('public', 'towns', '2', 'joey');
-LockRow
--------
-1
-
---Joey has already locked the record and Priscilla is out of luck
-SELECT LockRow('public', 'towns', '2', 'priscilla');
-LockRow
--------
-0
-
-		

See Also

UnlockRows


Name

UnlockRows — Remove all locks held by specified authorization id. Returns - the number of locks released.

Synopsis

integer UnlockRows(text auth_token);

Description

Remove all locks held by specified authorization id. Returns - the number of locks released.

Availability: 1.1.3

Examples

-		SELECT LockRow('towns', '353', 'priscilla');
-		SELECT LockRow('towns', '2', 'priscilla');
-		SELECT UnLockRows('priscilla');
-		UnLockRows
-		------------
-		2
-		

See Also

LockRow

7.12. Miscellaneous Functions

ST_Accum — Aggregate. Constructs an array of geometries.
Box2D — Returns a BOX2D representing the maximum extents of the geometry.
Box3D — Returns a BOX3D representing the maximum extents of the geometry.
ST_Estimated_Extent — Return the 'estimated' extent of the given spatial table. - The estimated is taken from the geometry column's statistics. The - current schema will be used if not specified.
ST_Expand — Returns bounding box expanded in all directions from the bounding box of the input geometry. Uses double-precision
ST_Extent — an aggregate function that returns the bounding box that bounds rows of geometries.
ST_Extent3D — an aggregate function that returns the box3D bounding box that bounds rows of geometries.
Find_SRID — The syntax is find_srid(<db/schema>, <table>, - <column>) and the function returns the integer SRID of the - specified column by searching through the GEOMETRY_COLUMNS table.
ST_Mem_Size — Returns the amount of space (in bytes) the geometry takes.
ST_Point_Inside_Circle — Is the point geometry insert circle defined by center_x, center_y , radius
ST_XMax — Returns X maxima of a bounding box 2d or 3d or a geometry.
ST_XMin — Returns X minima of a bounding box 2d or 3d or a geometry.
ST_YMax — Returns Y maxima of a bounding box 2d or 3d or a geometry.
ST_YMin — Returns Y minima of a bounding box 2d or 3d or a geometry.
ST_ZMax — Returns Z minima of a bounding box 2d or 3d or a geometry.
ST_ZMin — Returns Z minima of a bounding box 2d or 3d or a geometry.

Name

ST_Accum — Aggregate. Constructs an array of geometries.

Synopsis

geometry[] ST_Accum(geometry set geomfield);

Description

Aggregate. Constructs an array of geometries.

- This function supports 3d and will not drop the z-index.

- This method supports Circular Strings and Curves

Examples

SELECT (ST_Accum(the_geom)) As all_em, ST_AsText((ST_Accum(the_geom))[1]) As grabone,
-(ST_Accum(the_geom))[2:4] as grab_rest
-			FROM (SELECT ST_MakePoint(a*CAST(random()*10 As integer), a*CAST(random()*10 As integer), a*CAST(random()*10 As integer)) As the_geom
-				FROM generate_series(1,4) a) As foo;
-
-all_em|grabone   | grab_rest
-
--------------------------------------------------------------------------------+
-
- {0101000080000000000000144000000000000024400000000000001040:
- 0101000080000000000
-00018400000000000002C400000000000003040:
-0101000080000000000000354000000000000038400000000000001840:
-010100008000000000000040400000000000003C400000000000003040} |
- POINT(5 10) | {010100008000000000000018400000000000002C400000000000003040:
- 0101000080000000000000354000000000000038400000000000001840:
- 010100008000000000000040400000000000003C400000000000003040}
-(1 row)
-		

See Also

ST_Collect


Name

Box2D — Returns a BOX2D representing the maximum extents of the geometry.

Synopsis

box2d Box2D(geometry geomA);

Description

Returns a BOX2D representing the maximum extents of the geometry.

- This method supports Circular Strings and Curves

Examples

SELECT Box2D(ST_GeomFromText('LINESTRING(1 2, 3 4, 5 6)'));
-	box2d
-	---------
-	BOX(1 2,5 6)
-
-	SELECT Box2D(ST_GeomFromText('CIRCULARSTRING(220268 150415,220227 150505,220227 150406)'));
-	box2d
-	--------
-	BOX(220186.984375 150406,220288.25 150506.140625)
-	

Name

Box3D — Returns a BOX3D representing the maximum extents of the geometry.

Synopsis

box3d Box3D(geometry geomA);

Description

Returns a BOX3D representing the maximum extents of the geometry.

- This function supports 3d and will not drop the z-index.

- This method supports Circular Strings and Curves

Examples

SELECT Box3D(ST_GeomFromEWKT('LINESTRING(1 2 3, 3 4 5, 5 6 5)'));
-	Box3d
-	---------
-	BOX3D(1 2 3,5 6 5)
-
-	SELECT Box3D(ST_GeomFromEWKT('CIRCULARSTRING(220268 150415 1,220227 150505 1,220227 150406 1)'));
-	Box3d
-	--------
-	BOX3D(220227 150406 1,220268 150415 1)
-	

Name

ST_Estimated_Extent — Return the 'estimated' extent of the given spatial table. - The estimated is taken from the geometry column's statistics. The - current schema will be used if not specified.

Synopsis

box2d ST_Estimated_Extent(text schema_name, text table_name, text geocolumn_name);

box2d ST_Estimated_Extent(text table_name, text geocolumn_name);

Description

Return the 'estimated' extent of the given spatial table. - The estimated is taken from the geometry column's statistics. The - current schema will be used if not specified.

For PostgreSQL>=8.0.0 statistics are gathered by VACUUM - ANALYZE and resulting extent will be about 95% of the real - one.

For PostgreSQL<8.0.0 statistics are gathered by - update_geometry_stats() and resulting extent will be exact.

- This method supports Circular Strings and Curves

Examples

SELECT ST_Estimated_extent('ny', 'edges', 'the_geom');
---result--
-BOX(-8877653 4912316,-8010225.5 5589284)
-
-SELECT ST_Estimated_Extent('feature_poly', 'the_geom');
---result--
-BOX(-124.659652709961 24.6830825805664,-67.7798080444336 49.0012092590332)
-		

See Also

ST_Extent


Name

ST_Expand — Returns bounding box expanded in all directions from the bounding box of the input geometry. Uses double-precision

Synopsis

geometry ST_Expand(geometry g1, float units_to_expand);

box2d ST_Expand(box2d g1, float units_to_expand);

box3d ST_Expand(box3d g1, float units_to_expand);

Description

This function returns a bounding box expanded in all - directions from the bounding box of the input geometry, by an - amount specified in the second argument. Uses double-precision. Very useful for - distance() queries, or bounding box queries to add an index filter to the query.

There are 3 variants of this. The one that takes a geometry will return a POLYGON geometry representation - of the bounding box and is the most commonly used variant.

ST_Expand is similar in concept to ST_Buffer except while buffer expands the geometry in all directions, - ST_Expand expands the bounding box an x,y,z unit amount.

Units are in the units of the spatial reference system in use denoted by the SRID

[Note]

Pre 1.3, ST_Expand was used in conjunction with distance to do indexable queries. Something of the form - the_geom && ST_Expand('POINT(10 20)', 10) AND ST_Distance(the_geom, 'POINT(10 20)') < 10 - Post 1.2, this was replaced with the easier ST_DWithin construct.

[Note]

Bounding boxes of all geometries are currently 2-d even if they are 3-dimensional geometries.

[Note]

Availability: 1.5.0 behavior changed to output double precision instead of float4 coordinates.

Examples

[Note]

Examples below use US National Atlas Equal Area (SRID=2163) which is a meter projection

-		
---10 meter expanded box around bbox of a linestring
-SELECT CAST(ST_Expand(ST_GeomFromText('LINESTRING(2312980 110676,2312923 110701,2312892 110714)', 2163),10) As box2d);
-					 st_expand
-------------------------------------
- BOX(2312882 110666,2312990 110724)
-
---10 meter expanded 3d box of a 3d box
-SELECT ST_Expand(CAST('BOX3D(778783 2951741 1,794875 2970042.61545891 10)' As box3d),10)
-							  st_expand
------------------------------------------------------
- BOX3D(778773 2951731 -9,794885 2970052.61545891 20)
-
- --10 meter geometry astext rep of a expand box around a point geometry
- SELECT ST_AsEWKT(ST_Expand(ST_GeomFromEWKT('SRID=2163;POINT(2312980 110676)'),10));
-											st_asewkt
--------------------------------------------------------------------------------------------------
- SRID=2163;POLYGON((2312970 110666,2312970 110686,2312990 110686,2312990 110666,2312970 110666))
-
-		

Name

ST_Extent — an aggregate function that returns the bounding box that bounds rows of geometries.

Synopsis

box3d_extent ST_Extent(geometry set geomfield);

Description

ST_Extent returns a bounding box that encloses a set of geometries. The ST_Extent function is an "aggregate" function in the - terminology of SQL. That means that it operates on lists - of data, in the same way the SUM() and AVG() functions do.

Since it returns a bounding box, the spatial Units are in the units of the spatial reference system in use denoted by the SRID

ST_Extent is similar in concept to Oracle Spatial/Locator's SDO_AGGR_MBR

[Note]

Since ST_Extent returns a bounding box, the SRID meta-data is lost. Use ST_SetSRID to force it back into - a geometry with SRID meta data. The coordinates are in the units of the spatial ref of the orginal geometries.

[Note]

ST_Extent will return boxes with only an x and y component even with (x,y,z) coordinate geometries. To maintain x,y,z use ST_Extent3D instead.

[Note]

Availability: 1.4.0 As of 1.4.0 now returns a box3d_extent instead of box2d object.

Examples

[Note]

Examples below use Massachusetts State Plane ft (SRID=2249)

-
-SELECT ST_Extent(the_geom) as bextent FROM sometable;
-					 st_bextent
-------------------------------------
-BOX(739651.875 2908247.25,794875.8125 2970042.75)
-
-
---Return extent of each category of geometries
-SELECT ST_Extent(the_geom) as bextent
-FROM sometable
-GROUP BY category ORDER BY category;
-
-					  bextent                       |         name
-----------------------------------------------------+----------------
- BOX(778783.5625 2951741.25,794875.8125 2970042.75) | A
- BOX(751315.8125 2919164.75,765202.6875 2935417.25) | B
- BOX(739651.875 2917394.75,756688.375 2935866)      | C
-
- --Force back into a geometry
- -- and render the extended text representation of that geometry
-SELECT ST_SetSRID(ST_Extent(the_geom),2249) as bextent FROM sometable;
-
-				bextent
---------------------------------------------------------------------------------
- SRID=2249;POLYGON((739651.875 2908247.25,739651.875 2970042.75,794875.8125 2970042.75,
- 794875.8125 2908247.25,739651.875 2908247.25))
-		

Name

ST_Extent3D — an aggregate function that returns the box3D bounding box that bounds rows of geometries.

Synopsis

box3d ST_Extent3D(geometry set geomfield);

Description

ST_Extent3D returns a box3d (includes Z coordinate) bounding box that encloses a set of geometries. The ST_Extent3D function is an "aggregate" function in the - terminology of SQL. That means that it operates on lists - of data, in the same way the SUM() and AVG() functions do.

Since it returns a bounding box, the spatial Units are in the units of the spatial reference system in use denoted by the SRID

[Note]

Since ST_Extent3D returns a bounding box, the SRID meta-data is lost. Use ST_SetSRID to force it back into - a geometry with SRID meta data. The coordinates are in the units of the spatial ref of the orginal geometries.

- This function supports 3d and will not drop the z-index.

- This method supports Circular Strings and Curves

Examples

-SELECT ST_Extent3D(foo.the_geom) As b3extent
-FROM (SELECT ST_MakePoint(x,y,z) As the_geom
-	FROM generate_series(1,3) As x
-		CROSS JOIN generate_series(1,2) As y
-		CROSS JOIN generate_series(0,2) As Z) As foo;
-	  b3extent
---------------------
- BOX3D(1 1 0,3 2 2)
-
---Get the extent of various elevated circular strings
-SELECT ST_Extent3D(foo.the_geom) As b3extent
-FROM (SELECT ST_Translate(ST_Force_3DZ(ST_LineToCurve(ST_Buffer(ST_MakePoint(x,y),1))),0,0,z) As the_geom
-	FROM generate_series(1,3) As x
-		CROSS JOIN generate_series(1,2) As y
-		CROSS JOIN generate_series(0,2) As Z) As foo;
-
-	b3extent
---------------------
- BOX3D(1 0 0,4 2 2)
-		

Name

Find_SRID — The syntax is find_srid(<db/schema>, <table>, - <column>) and the function returns the integer SRID of the - specified column by searching through the GEOMETRY_COLUMNS table.

Synopsis

integer Find_SRID(varchar a_schema_name, varchar a_table_name, varchar a_geomfield_name);

Description

The syntax is find_srid(<db/schema>, <table>, - <column>) and the function returns the integer SRID of the - specified column by searching through the GEOMETRY_COLUMNS table. - If the geometry column has not been properly added with the - AddGeometryColumns() function, this function will not work - either.

Examples

 SELECT Find_SRID('public', 'tiger_us_state_2007', 'the_geom_4269');
-find_srid
-----------
-4269
-

See Also

ST_SRID


Name

ST_Mem_Size — Returns the amount of space (in bytes) the geometry takes.

Synopsis

integer ST_Mem_Size(geometry geomA);

Description

Returns the amount of space (in bytes) the geometry takes.

This is a nice compliment to PostgreSQL built in functions pg_size_pretty, pg_relation_size, pg_total_relation_size.

[Note]

pg_relation_size which gives the byte size of a table may return byte size lower than ST_Mem_Size. This is because - pg_relation_size does not add toasted table contribution and large geometries are stored in TOAST tables.

pg_total_relation_size - includes, the table, the toasted tables, and the indexes.

- This function supports 3d and will not drop the z-index.

- This method supports Circular Strings and Curves

Examples

---Return how much byte space Boston takes up  in our Mass data set
-SELECT pg_size_pretty(SUM(ST_Mem_Size(the_geom))) as totgeomsum,
-pg_size_pretty(SUM(CASE WHEN town = 'BOSTON' THEN st_mem_size(the_geom) ELSE 0 END)) As bossum,
-CAST(SUM(CASE WHEN town = 'BOSTON' THEN st_mem_size(the_geom) ELSE 0 END)*1.00 /
-		SUM(st_mem_size(the_geom))*100 As numeric(10,2)) As perbos
-FROM towns;
-
-totgeomsum	bossum	perbos
-----------	------	------
-1522 kB		30 kB	1.99
-
-
-SELECT ST_Mem_Size(ST_GeomFromText('CIRCULARSTRING(220268 150415,220227 150505,220227 150406)'));
-
----
-73
-
---What percentage of our table is taken up by just the geometry
-SELECT pg_total_relation_size('public.neighborhoods') As fulltable_size, sum(ST_Mem_Size(the_geom)) As geomsize,
-sum(ST_Mem_Size(the_geom))*1.00/pg_total_relation_size('public.neighborhoods')*100 As pergeom
-FROM neighborhoods;
-fulltable_size geomsize  pergeom
-------------------------------------------------
-262144         96238	 36.71188354492187500000
-	

See Also


Name

ST_Point_Inside_Circle — Is the point geometry insert circle defined by center_x, center_y , radius

Synopsis

boolean ST_Point_Inside_Circle(geometry a_point, float center_x, float center_y, float radius);

Description

The syntax for this functions is - point_inside_circle(<geometry>,<circle_center_x>,<circle_center_y>,<radius>). - Returns the true if the geometry is a point and is inside the - circle. Returns false otherwise.

[Note]
This only works for points as the name suggests

Examples

SELECT ST_Point_Inside_Circle(ST_Point(1,2), 0.5, 2, 3);
- st_point_inside_circle
-------------------------
- t
-

See Also

ST_DWithin


Name

ST_XMax — Returns X maxima of a bounding box 2d or 3d or a geometry.

Synopsis

float ST_XMax(box3d aGeomorBox2DorBox3D);

Description

Returns X maxima of a bounding box 2d or 3d or a geometry.

[Note]

Although this function is only defined for box3d, it will work for box2d and geometry because of the auto-casting behavior - defined for geometries and box2d. However you can not feed it a geometry or box2d text represenation, since that will not auto-cast.

- This function supports 3d and will not drop the z-index.

- This method supports Circular Strings and Curves

Examples

SELECT ST_XMax('BOX3D(1 2 3, 4 5 6)');
-st_xmax
--------
-4
-
-SELECT ST_XMax(ST_GeomFromText('LINESTRING(1 3 4, 5 6 7)'));
-st_xmax
--------
-5
-
-SELECT ST_XMax(CAST('BOX(-3 2, 3 4)' As box2d));
-st_xmax
--------
-3
---Observe THIS DOES NOT WORK because it will try to autocast the string representation to a BOX3D
-SELECT ST_XMax('LINESTRING(1 3, 5 6)');
-
---ERROR:  BOX3D parser - doesnt start with BOX3D(
-
-SELECT ST_XMax(ST_GeomFromEWKT('CIRCULARSTRING(220268 150415 1,220227 150505 2,220227 150406 3)'));
-st_xmax
---------
-220288.248780547
-		

Name

ST_XMin — Returns X minima of a bounding box 2d or 3d or a geometry.

Synopsis

float ST_XMin(box3d aGeomorBox2DorBox3D);

Description

Returns X minima of a bounding box 2d or 3d or a geometry.

[Note]

Although this function is only defined for box3d, it will work for box2d and geometry because of the auto-casting behavior - defined for geometries and box2d. However you can not feed it a geometry or box2d text represenation, since that will not auto-cast.

- This function supports 3d and will not drop the z-index.

- This method supports Circular Strings and Curves

Examples

SELECT ST_XMin('BOX3D(1 2 3, 4 5 6)');
-st_xmin
--------
-1
-
-SELECT ST_XMin(ST_GeomFromText('LINESTRING(1 3 4, 5 6 7)'));
-st_xmin
--------
-1
-
-SELECT ST_XMin(CAST('BOX(-3 2, 3 4)' As box2d));
-st_xmin
--------
--3
---Observe THIS DOES NOT WORK because it will try to autocast the string representation to a BOX3D
-SELECT ST_XMin('LINESTRING(1 3, 5 6)');
-
---ERROR:  BOX3D parser - doesnt start with BOX3D(
-
-SELECT ST_XMin(ST_GeomFromEWKT('CIRCULARSTRING(220268 150415 1,220227 150505 2,220227 150406 3)'));
-st_xmin
---------
-220186.995121892
-		

Name

ST_YMax — Returns Y maxima of a bounding box 2d or 3d or a geometry.

Synopsis

float ST_YMax(box3d aGeomorBox2DorBox3D);

Description

Returns Y maxima of a bounding box 2d or 3d or a geometry.

[Note]

Although this function is only defined for box3d, it will work for box2d and geometry because of the auto-casting behavior - defined for geometries and box2d. However you can not feed it a geometry or box2d text represenation, since that will not auto-cast.

- This function supports 3d and will not drop the z-index.

- This method supports Circular Strings and Curves

Examples

SELECT ST_YMax('BOX3D(1 2 3, 4 5 6)');
-st_ymax
--------
-5
-
-SELECT ST_YMax(ST_GeomFromText('LINESTRING(1 3 4, 5 6 7)'));
-st_ymax
--------
-6
-
-SELECT ST_YMax(CAST('BOX(-3 2, 3 4)' As box2d));
-st_ymax
--------
-4
---Observe THIS DOES NOT WORK because it will try to autocast the string representation to a BOX3D
-SELECT ST_YMax('LINESTRING(1 3, 5 6)');
-
---ERROR:  BOX3D parser - doesnt start with BOX3D(
-
-SELECT ST_YMax(ST_GeomFromEWKT('CIRCULARSTRING(220268 150415 1,220227 150505 2,220227 150406 3)'));
-st_ymax
---------
-150506.126829327
-		

Name

ST_YMin — Returns Y minima of a bounding box 2d or 3d or a geometry.

Synopsis

float ST_YMin(box3d aGeomorBox2DorBox3D);

Description

Returns Y minima of a bounding box 2d or 3d or a geometry.

[Note]

Although this function is only defined for box3d, it will work for box2d and geometry because of the auto-casting behavior - defined for geometries and box2d. However you can not feed it a geometry or box2d text represenation, since that will not auto-cast.

- This function supports 3d and will not drop the z-index.

- This method supports Circular Strings and Curves

Examples

SELECT ST_YMin('BOX3D(1 2 3, 4 5 6)');
-st_ymin
--------
-2
-
-SELECT ST_YMin(ST_GeomFromText('LINESTRING(1 3 4, 5 6 7)'));
-st_ymin
--------
-3
-
-SELECT ST_YMin(CAST('BOX(-3 2, 3 4)' As box2d));
-st_ymin
--------
-2
---Observe THIS DOES NOT WORK because it will try to autocast the string representation to a BOX3D
-SELECT ST_YMin('LINESTRING(1 3, 5 6)');
-
---ERROR:  BOX3D parser - doesnt start with BOX3D(
-
-SELECT ST_YMin(ST_GeomFromEWKT('CIRCULARSTRING(220268 150415 1,220227 150505 2,220227 150406 3)'));
-st_ymin
---------
-150406
-		

Name

ST_ZMax — Returns Z minima of a bounding box 2d or 3d or a geometry.

Synopsis

float ST_ZMax(box3d aGeomorBox2DorBox3D);

Description

Returns Z maxima of a bounding box 2d or 3d or a geometry.

[Note]

Although this function is only defined for box3d, it will work for box2d and geometry because of the auto-casting behavior - defined for geometries and box2d. However you can not feed it a geometry or box2d text represenation, since that will not auto-cast.

- This function supports 3d and will not drop the z-index.

- This method supports Circular Strings and Curves

Examples

SELECT ST_ZMax('BOX3D(1 2 3, 4 5 6)');
-st_zmax
--------
-6
-
-SELECT ST_ZMax(ST_GeomFromEWKT('LINESTRING(1 3 4, 5 6 7)'));
-st_zmax
--------
-7
-
-SELECT ST_ZMax('BOX3D(-3 2 1, 3 4 1)' );
-st_zmax
--------
-1
---Observe THIS DOES NOT WORK because it will try to autocast the string representation to a BOX3D
-SELECT ST_ZMax('LINESTRING(1 3 4, 5 6 7)');
-
---ERROR:  BOX3D parser - doesnt start with BOX3D(
-
-SELECT ST_ZMax(ST_GeomFromEWKT('CIRCULARSTRING(220268 150415 1,220227 150505 2,220227 150406 3)'));
-st_zmax
---------
-3
-		

Name

ST_ZMin — Returns Z minima of a bounding box 2d or 3d or a geometry.

Synopsis

float ST_ZMin(box3d aGeomorBox2DorBox3D);

Description

Returns Z minima of a bounding box 2d or 3d or a geometry.

[Note]

Although this function is only defined for box3d, it will work for box2d and geometry because of the auto-casting behavior - defined for geometries and box2d. However you can not feed it a geometry or box2d text represenation, since that will not auto-cast.

- This function supports 3d and will not drop the z-index.

- This method supports Circular Strings and Curves

Examples

SELECT ST_ZMin('BOX3D(1 2 3, 4 5 6)');
-st_zmin
--------
-3
-
-SELECT ST_ZMin(ST_GeomFromEWKT('LINESTRING(1 3 4, 5 6 7)'));
-st_zmin
--------
-4
-
-SELECT ST_ZMin('BOX3D(-3 2 1, 3 4 1)' );
-st_zmin
--------
-1
---Observe THIS DOES NOT WORK because it will try to autocast the string representation to a BOX3D
-SELECT ST_ZMin('LINESTRING(1 3 4, 5 6 7)');
-
---ERROR:  BOX3D parser - doesnt start with BOX3D(
-
-SELECT ST_ZMin(ST_GeomFromEWKT('CIRCULARSTRING(220268 150415 1,220227 150505 2,220227 150406 3)'));
-st_zmin
---------
-1
-		

7.13. Exceptional Functions

PostGIS_AddBBox — Add bounding box to the geometry.
PostGIS_DropBBox — Drop the bounding box cache from the geometry.
PostGIS_HasBBox — Returns TRUE if the bbox of this geometry is cached, FALSE otherwise.

These functions are rarely used functions that should only be used if your data is corrupted in someway. They are used for troubleshooting corruption - and also fixing things that should under normal circumstances, never happen.

Name

PostGIS_AddBBox — Add bounding box to the geometry.

Synopsis

geometry PostGIS_AddBBox(geometry geomA);

Description

Add bounding box to the geometry. This would make bounding - box based queries faster, but will increase the size of the - geometry.

[Note]

Bounding boxes are automatically added to geometries so in general this is not needed - unless the generated bounding box somehow becomes corrupted or you have an old install that is lacking bounding boxes. Then you need to drop the old and readd.

- This method supports Circular Strings and Curves

Examples

UPDATE sometable
- SET the_geom =  PostGIS_AddBBox(the_geom)
- WHERE PostGIS_HasBBox(the_geom) = false;

Name

PostGIS_DropBBox — Drop the bounding box cache from the geometry.

Synopsis

geometry PostGIS_DropBBox(geometry geomA);

Description

Drop the bounding box cache from the geometry. This reduces - geometry size, but makes bounding-box based queries slower. It is also used to drop a corrupt bounding box. A tale-tell sign of a corrupt cached bounding box - is when your ST_Intersects and other relation queries leave out geometries that rightfully should return true.

[Note]

Bounding boxes are automatically added to geometries and improve speed of queries so in general this is not needed - unless the generated bounding box somehow becomes corrupted or you have an old install that is lacking bounding boxes. - Then you need to drop the old and readd. This kind of corruption has been observed in 8.3-8.3.6 series whereby cached bboxes were not always recalculated when a geometry changed and upgrading to a newer version without a dump reload will not - correct already corrupted boxes. So one can manually correct using below and readd the bbox or do a dump reload.

- This method supports Circular Strings and Curves

Examples

--This example drops bounding boxes where the cached box is not correct
-			--The force to ST_AsBinary before applying Box2D forces a recalculation of the box, and Box2D applied to the table geometry always
-			-- returns the cached bounding box.
-			UPDATE sometable
- SET the_geom =  PostGIS_DropBBox(the_geom)
- WHERE Not (Box2D(ST_AsBinary(the_geom)) = Box2D(the_geom));
-
-	UPDATE sometable
- SET the_geom =  PostGIS_AddBBox(the_geom)
- WHERE Not PostGIS_HasBBOX(the_geom);
-
-
- 

Name

PostGIS_HasBBox — Returns TRUE if the bbox of this geometry is cached, FALSE otherwise.

Synopsis

boolean PostGIS_HasBBox(geometry geomA);

Description

Returns TRUE if the bbox of this geometry is cached, FALSE - otherwise. Use PostGIS_AddBBox and PostGIS_DropBBox to control caching.

- This method supports Circular Strings and Curves

Examples

SELECT the_geom
-FROM sometable WHERE PostGIS_HasBBox(the_geom) = false;

Chapter 8. PostGIS Special Functions Index

8.1. PostGIS Aggregate Functions

The functions given below are spatial aggregate functions provided with PostGIS that can be used just like any other sql aggregate function such as sum, average.

  • ST_Accum - Aggregate. Constructs an array of geometries.
  • ST_Collect - Return a specified ST_Geometry value from a collection of other geometries.
  • ST_Extent - an aggregate function that returns the bounding box that bounds rows of geometries.
  • ST_Extent3D - an aggregate function that returns the box3D bounding box that bounds rows of geometries.
  • ST_MakeLine - Creates a Linestring from point geometries.
  • ST_MemUnion - Same as ST_Union, only memory-friendly (uses less memory and more processor time).
  • ST_Polygonize - Aggregate. Creates a GeometryCollection containing possible polygons formed from the constituent linework of a set of geometries.
  • ST_Union - Returns a geometry that represents the point set union of the Geometries.

8.2. PostGIS SQL-MM Compliant Functions

The functions given below are PostGIS functions that conform to the SQL/MM 3 standard

[Note]

SQL-MM defines the default SRID of all geometry constructors as 0. - PostGIS uses a default SRID of -1.

  • ST_Area - Returns the area of the surface if it is a polygon or multi-polygon. For "geometry" type area is in SRID units. For "geography" area is in square meters. - - - - This method implements the SQL/MM specification. SQL-MM 3: 8.1.2, 9.5.3
  • ST_AsBinary - Return the Well-Known Binary (WKB) representation of the geometry/geography without SRID meta data. - - - - This method implements the SQL/MM specification. SQL-MM 3: 5.1.37
  • ST_AsText - Return the Well-Known Text (WKT) representation of the geometry/geography without SRID metadata. - - - - This method implements the SQL/MM specification. SQL-MM 3: 5.1.25
  • ST_Boundary - Returns the closure of the combinatorial boundary of this Geometry. - - - - This method implements the SQL/MM specification. SQL-MM 3: 5.1.14
  • ST_Buffer - (T) For geometry: Returns a geometry that represents all points whose distance from this Geometry is less than or equal to distance. Calculations are in the Spatial Reference System of this Geometry. For geography: Uses a planar transform wrapper. Introduced in 1.5 support for different end cap and mitre settings to control shape. buffer_style options: quad_segs=#,endcap=round|flat|square,join=round|mitre|bevel,mitre_limit=#.# - - - - This method implements the SQL/MM specification. SQL-MM 3: 5.1.17
  • ST_Centroid - Returns the geometric center of a geometry. - - - - This method implements the SQL/MM specification. SQL-MM 3: 8.1.4, 9.5.5
  • ST_Contains - Returns true if and only if no points of B lie in the exterior of A, and at least one point of the interior of B lies in the interior of A. - - - - This method implements the SQL/MM specification. SQL-MM 3: 5.1.31
  • ST_ConvexHull - The convex hull of a geometry represents the minimum convex geometry that encloses all geometries within the set. - - - - This method implements the SQL/MM specification. SQL-MM 3: 5.1.16
  • ST_CoordDim - Return the coordinate dimension of the ST_Geometry value. - - - - This method implements the SQL/MM specification. SQL-MM 3: 5.1.3
  • ST_Crosses - Returns TRUE if the supplied geometries have some, but not all, interior points in common. - - - - This method implements the SQL/MM specification. SQL-MM 3: 5.1.29
  • ST_CurveToLine - Converts a CIRCULARSTRING/CURVEDPOLYGON to a LINESTRING/POLYGON - - - - This method implements the SQL/MM specification. SQL-MM 3: 7.1.7
  • ST_Difference - Returns a geometry that represents that part of geometry A that does not intersect with geometry B. - - - - This method implements the SQL/MM specification. SQL-MM 3: 5.1.20
  • ST_Dimension - The inherent dimension of this Geometry object, which must be less than or equal to the coordinate dimension. - - - - This method implements the SQL/MM specification. SQL-MM 3: 5.1.2
  • ST_Disjoint - Returns TRUE if the Geometries do not "spatially intersect" - if they do not share any space together. - - - - This method implements the SQL/MM specification. SQL-MM 3: 5.1.26
  • ST_Distance - For geometry type Returns the 2-dimensional cartesian minimum distance (based on spatial ref) between two geometries in projected units. For geography type defaults to return spheroidal minimum distance between two geographies in meters. - - - - This method implements the SQL/MM specification. SQL-MM 3: 5.1.23
  • ST_EndPoint - Returns the last point of a LINESTRING geometry as a POINT. - - - - This method implements the SQL/MM specification. SQL-MM 3: 7.1.4
  • ST_Envelope - Returns a geometry representing the double precision (float8) bounding box of the supplied geometry. - - - - This method implements the SQL/MM specification. SQL-MM 3: 5.1.15
  • ST_Equals - Returns true if the given geometries represent the same geometry. Directionality is ignored. - - - - This method implements the SQL/MM specification. SQL-MM 3: 5.1.24
  • ST_ExteriorRing - Returns a line string representing the exterior ring of the POLYGON geometry. Return NULL if the geometry is not a polygon. Will not work with MULTIPOLYGON - - - - This method implements the SQL/MM specification. SQL-MM 3: 8.2.3, 8.3.3
  • ST_GMLToSQL - Return a specified ST_Geometry value from GML representation. This is an alias name for ST_GeomFromGML - - - - This method implements the SQL/MM specification. SQL-MM 3: 5.1.50 (except for curves support).
  • ST_GeomCollFromText - Makes a collection Geometry from collection WKT with the given SRID. If SRID is not give, it defaults to -1. - - - - This method implements the SQL/MM specification.
  • ST_GeomFromText - Return a specified ST_Geometry value from Well-Known Text representation (WKT). - - - - This method implements the SQL/MM specification. SQL-MM 3: 5.1.40
  • ST_GeomFromWKB - Creates a geometry instance from a Well-Known Binary geometry representation (WKB) and optional SRID. - - - - This method implements the SQL/MM specification. SQL-MM 3: 5.1.41
  • ST_GeometryFromText - Return a specified ST_Geometry value from Well-Known Text representation (WKT). This is an alias name for ST_GeomFromText - - - - This method implements the SQL/MM specification. SQL-MM 3: 5.1.40
  • ST_GeometryN - Return the 1-based Nth geometry if the geometry is a GEOMETRYCOLLECTION, MULTIPOINT, MULTILINESTRING, MULTICURVE or MULTIPOLYGON. Otherwise, return NULL. - - - - This method implements the SQL/MM specification. SQL-MM 3: 9.1.5
  • ST_GeometryType - Return the geometry type of the ST_Geometry value. - - - - This method implements the SQL/MM specification. SQL-MM 3: 5.1.4
  • ST_InteriorRingN - Return the Nth interior linestring ring of the polygon geometry. Return NULL if the geometry is not a polygon or the given N is out of range. - - - - This method implements the SQL/MM specification. SQL-MM 3: 8.2.6, 8.3.5
  • ST_Intersection - (T) Returns a geometry that represents the shared portion of geomA and geomB. The geography implementation does a transform to geometry to do the intersection and then transform back to WGS84. - - - - This method implements the SQL/MM specification. SQL-MM 3: 5.1.18
  • ST_Intersects - Returns TRUE if the Geometries/Geography "spatially intersect" - (share any portion of space) and FALSE if they don't (they are Disjoint). For geography -- tolerance is 0.00001 meters (so any points that close are considered to intersect) - - - - This method implements the SQL/MM specification. SQL-MM 3: 5.1.27
  • ST_IsClosed - Returns TRUE if the LINESTRING's start and end points are coincident. - - - - This method implements the SQL/MM specification. SQL-MM 3: 7.1.5, 9.3.3
  • ST_IsEmpty - Returns true if this Geometry is an empty geometry . If true, then this Geometry represents the empty point set - i.e. GEOMETRYCOLLECTION(EMPTY). - - - - This method implements the SQL/MM specification. SQL-MM 3: 5.1.7
  • ST_IsRing - Returns TRUE if this LINESTRING is both closed and simple. - - - - This method implements the SQL/MM specification. SQL-MM 3: 7.1.6
  • ST_IsSimple - Returns (TRUE) if this Geometry has no anomalous geometric points, such as self intersection or self tangency. - - - - This method implements the SQL/MM specification. SQL-MM 3: 5.1.8
  • ST_IsValid - Returns true if the ST_Geometry is well formed. - - - - This method implements the SQL/MM specification. SQL-MM 3: 5.1.9
  • ST_Length - Returns the 2d length of the geometry if it is a linestring or multilinestring. geometry are in units of spatial reference and geography are in meters (default spheroid) - - - - This method implements the SQL/MM specification. SQL-MM 3: 7.1.2, 9.3.4
  • ST_LineFromText - Makes a Geometry from WKT representation with the given SRID. If SRID is not given, it defaults to -1. - - - - This method implements the SQL/MM specification. SQL-MM 3: 7.2.8
  • ST_LineFromWKB - Makes a LINESTRING from WKB with the given SRID - - - - This method implements the SQL/MM specification. SQL-MM 3: 7.2.9
  • ST_LinestringFromWKB - Makes a geometry from WKB with the given SRID. - - - - This method implements the SQL/MM specification. SQL-MM 3: 7.2.9
  • ST_M - Return the M coordinate of the point, or NULL if not available. Input must be a point. - - - - This method implements the SQL/MM specification.
  • ST_MLineFromText - Return a specified ST_MultiLineString value from WKT representation. - - - - This method implements the SQL/MM specification.SQL-MM 3: 9.4.4
  • ST_MPointFromText - Makes a Geometry from WKT with the given SRID. If SRID is not give, it defaults to -1. - - - - This method implements the SQL/MM specification. SQL-MM 3: 9.2.4
  • ST_MPolyFromText - Makes a MultiPolygon Geometry from WKT with the given SRID. If SRID is not give, it defaults to -1. - - - - This method implements the SQL/MM specification. SQL-MM 3: 9.6.4
  • ST_NumGeometries - If geometry is a GEOMETRYCOLLECTION (or MULTI*) return the number of geometries, otherwise return NULL. - - - - This method implements the SQL/MM specification. SQL-MM 3: 9.1.4
  • ST_NumInteriorRing - Return the number of interior rings of the first polygon in the geometry. Synonym to ST_NumInteriorRings. - - - - This method implements the SQL/MM specification. SQL-MM 3: 8.2.5
  • ST_NumInteriorRings - Return the number of interior rings of the first polygon in the geometry. This will work with both POLYGON and MULTIPOLYGON types but only looks at the first polygon. Return NULL if there is no polygon in the geometry. - - - - This method implements the SQL/MM specification. SQL-MM 3: 8.2.5
  • ST_NumPoints - Return the number of points in an ST_LineString or ST_CircularString value. - - - - This method implements the SQL/MM specification. SQL-MM 3: 7.2.4
  • ST_OrderingEquals - Returns true if the given geometries represent the same geometry and points are in the same directional order. - - - - This method implements the SQL/MM specification. SQL-MM 3: 5.1.43
  • ST_Overlaps - Returns TRUE if the Geometries share space, are of the same dimension, but are not completely contained by each other. - - - - This method implements the SQL/MM specification. SQL-MM 3: 5.1.32
  • ST_Perimeter - Return the length measurement of the boundary of an ST_Surface or ST_MultiSurface value. (Polygon, Multipolygon) - - - - This method implements the SQL/MM specification. SQL-MM 3: 8.1.3, 9.5.4
  • ST_Point - Returns an ST_Point with the given coordinate values. OGC alias for ST_MakePoint. - - - - This method implements the SQL/MM specification. SQL-MM 3: 6.1.2
  • ST_PointFromText - Makes a point Geometry from WKT with the given SRID. If SRID is not given, it defaults to unknown. - - - - This method implements the SQL/MM specification. SQL-MM 3: 6.1.8
  • ST_PointFromWKB - Makes a geometry from WKB with the given SRID - - - - This method implements the SQL/MM specification. SQL-MM 3: 6.1.9
  • ST_PointN - Return the Nth point in the first linestring or circular linestring in the geometry. Return NULL if there is no linestring in the geometry. - - - - This method implements the SQL/MM specification. SQL-MM 3: 7.2.5, 7.3.5
  • ST_PointOnSurface - Returns a POINT guaranteed to lie on the surface. - - - - This method implements the SQL/MM specification. SQL-MM 3: 8.1.5, 9.5.6. - According to the specs, ST_PointOnSurface works for surface geometries (POLYGONs, MULTIPOLYGONS, CURVED POLYGONS). So PostGIS seems to be extending what - the spec allows here. Most databases Oracle,DB II, ESRI SDE seem to only support this function for surfaces. SQL Server 2008 like PostGIS supports for all common geometries.
  • ST_Polygon - Returns a polygon built from the specified linestring and SRID. - - - - This method implements the SQL/MM specification. SQL-MM 3: 8.3.2
  • ST_PolygonFromText - Makes a Geometry from WKT with the given SRID. If SRID is not give, it defaults to -1. - - - - This method implements the SQL/MM specification. SQL-MM 3: 8.3.6
  • ST_Relate - Returns true if this Geometry is spatially related to anotherGeometry, by testing for intersections between the Interior, Boundary and Exterior of the two geometries as specified by the values in the intersectionMatrixPattern. If no intersectionMatrixPattern is passed in, then returns the maximum intersectionMatrixPattern that relates the 2 geometries. - - - - This method implements the SQL/MM specification. SQL-MM 3: 5.1.25
  • ST_SRID - Returns the spatial reference identifier for the ST_Geometry as defined in spatial_ref_sys table. - - - - This method implements the SQL/MM specification. SQL-MM 3: 5.1.5
  • ST_StartPoint - Returns the first point of a LINESTRING geometry as a POINT. - - - - This method implements the SQL/MM specification. SQL-MM 3: 7.1.3
  • ST_SymDifference - Returns a geometry that represents the portions of A and B that do not intersect. It is called a symmetric difference because ST_SymDifference(A,B) = ST_SymDifference(B,A). - - - - This method implements the SQL/MM specification. SQL-MM 3: 5.1.21
  • ST_Touches - Returns TRUE if the geometries have at least one point in common, but their interiors do not intersect. - - - - This method implements the SQL/MM specification. SQL-MM 3: 5.1.28
  • ST_Transform - Returns a new geometry with its coordinates transformed to the SRID referenced by the integer parameter. - - - - This method implements the SQL/MM specification. SQL-MM 3: 5.1.6
  • ST_Union - Returns a geometry that represents the point set union of the Geometries. - - - - This method implements the SQL/MM specification. SQL-MM 3: 5.1.19 - the z-index (elevation) when polygons are involved.
  • ST_WKBToSQL - Return a specified ST_Geometry value from Well-Known Binary representation (WKB). This is an alias name for ST_GeomFromWKB that takes no srid - - - - This method implements the SQL/MM specification. SQL-MM 3: 5.1.36
  • ST_WKTToSQL - Return a specified ST_Geometry value from Well-Known Text representation (WKT). This is an alias name for ST_GeomFromText - - - - This method implements the SQL/MM specification. SQL-MM 3: 5.1.34
  • ST_Within - Returns true if the geometry A is completely inside geometry B - - - - This method implements the SQL/MM specification. SQL-MM 3: 5.1.30
  • ST_X - Return the X coordinate of the point, or NULL if not available. Input must be a point. - - - - This method implements the SQL/MM specification. SQL-MM 3: 6.1.3
  • ST_Y - Return the Y coordinate of the point, or NULL if not available. Input must be a point. - - - - This method implements the SQL/MM specification. SQL-MM 3: 6.1.4
  • ST_Z - Return the Z coordinate of the point, or NULL if not available. Input must be a point. - - - - This method implements the SQL/MM specification.

8.3. PostGIS Geography Support Functions

The functions and operators given below are PostGIS functions/operators that take as input or return as output a geography data type object.

[Note]

Functions with a (T) are not native geodetic functions, and use a ST_Transform call to and from geometry to do the operation. As a result, they may not behave as expected when going over dateline, poles, - and for large geometries or geometry pairs that cover more than one UTM zone. Basic tranform - (favoring UTM, Lambert Azimuthal (North/South), and falling back on mercator in worst case scenario)

  • ST_Area - Returns the area of the surface if it is a polygon or multi-polygon. For "geometry" type area is in SRID units. For "geography" area is in square meters.
  • ST_AsBinary - Return the Well-Known Binary (WKB) representation of the geometry/geography without SRID meta data.
  • ST_AsGML - Return the geometry as a GML version 2 or 3 element.
  • ST_AsGeoJSON - Return the geometry as a GeoJSON element.
  • ST_AsKML - Return the geometry as a KML element. Several variants. Default version=2, default precision=15
  • ST_AsSVG - Returns a Geometry in SVG path data given a geometry or geography object.
  • ST_AsText - Return the Well-Known Text (WKT) representation of the geometry/geography without SRID metadata.
  • ST_Buffer - (T) For geometry: Returns a geometry that represents all points whose distance from this Geometry is less than or equal to distance. Calculations are in the Spatial Reference System of this Geometry. For geography: Uses a planar transform wrapper. Introduced in 1.5 support for different end cap and mitre settings to control shape. buffer_style options: quad_segs=#,endcap=round|flat|square,join=round|mitre|bevel,mitre_limit=#.#
  • ST_CoveredBy - Returns 1 (TRUE) if no point in Geometry/Geography A is outside Geometry/Geography B
  • ST_Covers - Returns 1 (TRUE) if no point in Geometry B is outside Geometry A. For geography: if geography point B is not outside Polygon Geography A
  • ST_DWithin - Returns true if the geometries are within the specified distance of one another. For geometry units are in those of spatial reference and For geography units are in meters and measurement is defaulted to use_spheroid=true (measure around spheroid), for faster check, use_spheroid=false to measure along sphere.
  • ST_Distance - For geometry type Returns the 2-dimensional cartesian minimum distance (based on spatial ref) between two geometries in projected units. For geography type defaults to return spheroidal minimum distance between two geographies in meters.
  • ST_GeogFromText - Return a specified geography value from Well-Known Text representation or extended (WKT).
  • ST_GeogFromWKB - Creates a geography instance from a Well-Known Binary geometry representation (WKB) or extended Well Known Binary (EWKB).
  • ST_GeographyFromText - Return a specified geography value from Well-Known Text representation or extended (WKT).
  • = - Returns TRUE if A's bounding box is the same as B's.
  • && - Returns TRUE if A's bounding box overlaps B's.
  • ST_Intersection - (T) Returns a geometry that represents the shared portion of geomA and geomB. The geography implementation does a transform to geometry to do the intersection and then transform back to WGS84.
  • ST_Intersects - Returns TRUE if the Geometries/Geography "spatially intersect" - (share any portion of space) and FALSE if they don't (they are Disjoint). For geography -- tolerance is 0.00001 meters (so any points that close are considered to intersect)
  • ST_Length - Returns the 2d length of the geometry if it is a linestring or multilinestring. geometry are in units of spatial reference and geography are in meters (default spheroid)

8.4. PostGIS Geometry Dump Functions

The functions given below are PostGIS functions that take as input or return as output a set of or single geometry_dump data type object.

  • ST_Dump - Returns a set of geometry_dump (geom,path) rows, that make up a geometry g1.
  • ST_DumpPoints - Returns a set of geometry_dump (geom,path) rows of all points that make up a geometry.
  • ST_DumpRings - Returns a set of geometry_dump rows, representing the exterior and interior rings of a polygon.

8.5. PostGIS Box Functions

The functions given below are PostGIS functions that take as input or return as output the box* family of PostGIS spatial types. - The box family of types consists of box2d, box3d, box3d_extent

  • Box2D - Returns a BOX2D representing the maximum extents of the geometry.
  • Box3D - Returns a BOX3D representing the maximum extents of the geometry.
  • ST_Estimated_Extent - Return the 'estimated' extent of the given spatial table. The estimated is taken from the geometry column's statistics. The current schema will be used if not specified.
  • ST_Expand - Returns bounding box expanded in all directions from the bounding box of the input geometry. Uses double-precision
  • ST_Extent - an aggregate function that returns the bounding box that bounds rows of geometries.
  • ST_Extent3D - an aggregate function that returns the box3D bounding box that bounds rows of geometries.
  • ST_MakeBox2D - Creates a BOX2D defined by the given point geometries.
  • ST_MakeBox3D - Creates a BOX3D defined by the given 3d point geometries.
  • ST_XMax - Returns X maxima of a bounding box 2d or 3d or a geometry.
  • ST_XMin - Returns X minima of a bounding box 2d or 3d or a geometry.
  • ST_YMax - Returns Y maxima of a bounding box 2d or 3d or a geometry.
  • ST_YMin - Returns Y minima of a bounding box 2d or 3d or a geometry.
  • ST_ZMax - Returns Z minima of a bounding box 2d or 3d or a geometry.
  • ST_ZMin - Returns Z minima of a bounding box 2d or 3d or a geometry.

8.6. PostGIS Functions that support 3D

The functions given below are PostGIS functions that do not throw away the Z-Index.

  • AddGeometryColumn - Adds a geometry column to an existing table of attributes.
  • Box3D - Returns a BOX3D representing the maximum extents of the geometry.
  • DropGeometryColumn - Removes a geometry column from a spatial table.
  • ST_Accum - Aggregate. Constructs an array of geometries.
  • ST_AddMeasure - Return a derived geometry with measure elements linearly interpolated between the start and end points. If the geometry has no measure dimension, one is added. If the geometry has a measure dimension, it is over-written with new values. Only LINESTRINGS and MULTILINESTRINGS are supported.
  • ST_AddPoint - Adds a point to a LineString before point <position> (0-based index).
  • ST_Affine - Applies a 3d affine transformation to the geometry to do things like translate, rotate, scale in one step.
  • ST_AsEWKB - Return the Well-Known Binary (WKB) representation of the geometry with SRID meta data.
  • ST_AsEWKT - Return the Well-Known Text (WKT) representation of the geometry with SRID meta data.
  • ST_AsGML - Return the geometry as a GML version 2 or 3 element.
  • ST_AsGeoJSON - Return the geometry as a GeoJSON element.
  • ST_AsHEXEWKB - Returns a Geometry in HEXEWKB format (as text) using either little-endian (NDR) or big-endian (XDR) encoding.
  • ST_AsKML - Return the geometry as a KML element. Several variants. Default version=2, default precision=15
  • ST_Boundary - Returns the closure of the combinatorial boundary of this Geometry.
  • ST_Collect - Return a specified ST_Geometry value from a collection of other geometries.
  • ST_ConvexHull - The convex hull of a geometry represents the minimum convex geometry that encloses all geometries within the set.
  • ST_CoordDim - Return the coordinate dimension of the ST_Geometry value.
  • ST_CurveToLine - Converts a CIRCULARSTRING/CURVEDPOLYGON to a LINESTRING/POLYGON
  • ST_Difference - Returns a geometry that represents that part of geometry A that does not intersect with geometry B.
  • ST_Dump - Returns a set of geometry_dump (geom,path) rows, that make up a geometry g1.
  • ST_DumpPoints - Returns a set of geometry_dump (geom,path) rows of all points that make up a geometry.
  • ST_DumpRings - Returns a set of geometry_dump rows, representing the exterior and interior rings of a polygon.
  • ST_EndPoint - Returns the last point of a LINESTRING geometry as a POINT.
  • ST_Extent3D - an aggregate function that returns the box3D bounding box that bounds rows of geometries.
  • ST_ExteriorRing - Returns a line string representing the exterior ring of the POLYGON geometry. Return NULL if the geometry is not a polygon. Will not work with MULTIPOLYGON
  • ST_ForceRHR - Forces the orientation of the vertices in a polygon to follow the Right-Hand-Rule.
  • ST_Force_3D - Forces the geometries into XYZ mode. This is an alias for ST_Force_3DZ.
  • ST_Force_3DZ - Forces the geometries into XYZ mode. This is a synonym for ST_Force_3D.
  • ST_Force_4D - Forces the geometries into XYZM mode.
  • ST_Force_Collection - Converts the geometry into a GEOMETRYCOLLECTION.
  • ST_GeomFromEWKB - Return a specified ST_Geometry value from Extended Well-Known Binary representation (EWKB).
  • ST_GeomFromEWKT - Return a specified ST_Geometry value from Extended Well-Known Text representation (EWKT).
  • ST_GeomFromGML - Takes as input GML representation of geometry and outputs a PostGIS geometry object
  • ST_GeomFromKML - Takes as input KML representation of geometry and outputs a PostGIS geometry object
  • ST_GeometryN - Return the 1-based Nth geometry if the geometry is a GEOMETRYCOLLECTION, MULTIPOINT, MULTILINESTRING, MULTICURVE or MULTIPOLYGON. Otherwise, return NULL.
  • ST_HasArc - Returns true if a geometry or geometry collection contains a circular string
  • ST_InteriorRingN - Return the Nth interior linestring ring of the polygon geometry. Return NULL if the geometry is not a polygon or the given N is out of range.
  • ST_IsClosed - Returns TRUE if the LINESTRING's start and end points are coincident.
  • ST_IsSimple - Returns (TRUE) if this Geometry has no anomalous geometric points, such as self intersection or self tangency.
  • ST_Length3D - Returns the 3-dimensional or 2-dimensional length of the geometry if it is a linestring or multi-linestring.
  • ST_Length3D_Spheroid - Calculates the length of a geometry on an ellipsoid, taking the elevation into account. This is just an alias for ST_Length_Spheroid.
  • ST_Length_Spheroid - Calculates the 2D or 3D length of a linestring/multilinestring on an ellipsoid. This is useful if the coordinates of the geometry are in longitude/latitude and a length is desired without reprojection.
  • ST_LineFromMultiPoint - Creates a LineString from a MultiPoint geometry.
  • ST_LineToCurve - Converts a LINESTRING/POLYGON to a CIRCULARSTRING, CURVED POLYGON
  • ST_Line_Interpolate_Point - Returns a point interpolated along a line. Second argument is a float8 between 0 and 1 representing fraction of total length of linestring the point has to be located.
  • ST_Line_Substring - Return a linestring being a substring of the input one starting and ending at the given fractions of total 2d length. Second and third arguments are float8 values between 0 and 1.
  • ST_LocateBetweenElevations - Return a derived geometry (collection) value with elements that intersect the specified range of elevations inclusively. Only 3D, 4D LINESTRINGS and MULTILINESTRINGS are supported.
  • ST_M - Return the M coordinate of the point, or NULL if not available. Input must be a point.
  • ST_MakeBox3D - Creates a BOX3D defined by the given 3d point geometries.
  • ST_MakeLine - Creates a Linestring from point geometries.
  • ST_MakePoint - Creates a 2D,3DZ or 4D point geometry.
  • ST_MakePolygon - Creates a Polygon formed by the given shell. Input geometries must be closed LINESTRINGS.
  • ST_MemUnion - Same as ST_Union, only memory-friendly (uses less memory and more processor time).
  • ST_Mem_Size - Returns the amount of space (in bytes) the geometry takes.
  • ST_NDims - Returns coordinate dimension of the geometry as a small int. Values are: 2,3 or 4.
  • ST_NPoints - Return the number of points (vertexes) in a geometry.
  • ST_NRings - If the geometry is a polygon or multi-polygon returns the number of rings.
  • ST_Perimeter3D - Returns the 3-dimensional perimeter of the geometry, if it is a polygon or multi-polygon.
  • ST_PointFromWKB - Makes a geometry from WKB with the given SRID
  • ST_PointN - Return the Nth point in the first linestring or circular linestring in the geometry. Return NULL if there is no linestring in the geometry.
  • ST_PointOnSurface - Returns a POINT guaranteed to lie on the surface.
  • ST_Polygon - Returns a polygon built from the specified linestring and SRID.
  • ST_RemovePoint - Removes point from a linestring. Offset is 0-based.
  • ST_Rotate - This is a synonym for ST_RotateZ
  • ST_RotateX - Rotate a geometry rotRadians about the X axis.
  • ST_RotateY - Rotate a geometry rotRadians about the Y axis.
  • ST_RotateZ - Rotate a geometry rotRadians about the Z axis.
  • ST_Scale - Scales the geometry to a new size by multiplying the ordinates with the parameters. Ie: ST_Scale(geom, Xfactor, Yfactor, Zfactor).
  • ST_SetPoint - Replace point N of linestring with given point. Index is 0-based.
  • ST_Shift_Longitude - Reads every point/vertex in every component of every feature in a geometry, and if the longitude coordinate is <0, adds 360 to it. The result would be a 0-360 version of the data to be plotted in a 180 centric map
  • ST_SnapToGrid - Snap all points of the input geometry to the grid defined by its origin and cell size. Remove consecutive points falling on the same cell, eventually returning NULL if output points are not enough to define a geometry of the given type. Collapsed geometries in a collection are stripped from it. Useful for reducing precision.
  • ST_StartPoint - Returns the first point of a LINESTRING geometry as a POINT.
  • ST_Summary - Returns a text summary of the contents of the ST_Geometry.
  • ST_SymDifference - Returns a geometry that represents the portions of A and B that do not intersect. It is called a symmetric difference because ST_SymDifference(A,B) = ST_SymDifference(B,A).
  • ST_TransScale - Translates the geometry using the deltaX and deltaY args, then scales it using the XFactor, YFactor args, working in 2D only.
  • ST_Translate - Translates the geometry to a new location using the numeric parameters as offsets. Ie: ST_Translate(geom, X, Y) or ST_Translate(geom, X, Y,Z).
  • ST_X - Return the X coordinate of the point, or NULL if not available. Input must be a point.
  • ST_XMax - Returns X maxima of a bounding box 2d or 3d or a geometry.
  • ST_XMin - Returns X minima of a bounding box 2d or 3d or a geometry.
  • ST_Y - Return the Y coordinate of the point, or NULL if not available. Input must be a point.
  • ST_YMax - Returns Y maxima of a bounding box 2d or 3d or a geometry.
  • ST_YMin - Returns Y minima of a bounding box 2d or 3d or a geometry.
  • ST_Z - Return the Z coordinate of the point, or NULL if not available. Input must be a point.
  • ST_ZMax - Returns Z minima of a bounding box 2d or 3d or a geometry.
  • ST_ZMin - Returns Z minima of a bounding box 2d or 3d or a geometry.
  • ST_Zmflag - Returns ZM (dimension semantic) flag of the geometries as a small int. Values are: 0=2d, 1=3dm, 2=3dz, 3=4d.
  • UpdateGeometrySRID - Updates the SRID of all features in a geometry column, geometry_columns metadata and srid table constraint

8.7. PostGIS Curved Geometry Support Functions

The functions given below are PostGIS functions that can use CIRCULARSTRING, CURVEDPOLYGON, and other curved geometry types

  • AddGeometryColumn - Adds a geometry column to an existing table of attributes.
  • Box2D - Returns a BOX2D representing the maximum extents of the geometry.
  • Box3D - Returns a BOX3D representing the maximum extents of the geometry.
  • DropGeometryColumn - Removes a geometry column from a spatial table.
  • GeometryType - Returns the type of the geometry as a string. Eg: 'LINESTRING', 'POLYGON', 'MULTIPOINT', etc.
  • PostGIS_AddBBox - Add bounding box to the geometry.
  • PostGIS_DropBBox - Drop the bounding box cache from the geometry.
  • PostGIS_HasBBox - Returns TRUE if the bbox of this geometry is cached, FALSE otherwise.
  • ST_Accum - Aggregate. Constructs an array of geometries.
  • ST_Affine - Applies a 3d affine transformation to the geometry to do things like translate, rotate, scale in one step.
  • ST_AsBinary - Return the Well-Known Binary (WKB) representation of the geometry/geography without SRID meta data.
  • ST_AsEWKB - Return the Well-Known Binary (WKB) representation of the geometry with SRID meta data.
  • ST_AsEWKT - Return the Well-Known Text (WKT) representation of the geometry with SRID meta data.
  • ST_AsHEXEWKB - Returns a Geometry in HEXEWKB format (as text) using either little-endian (NDR) or big-endian (XDR) encoding.
  • ST_AsText - Return the Well-Known Text (WKT) representation of the geometry/geography without SRID metadata.
  • ST_Collect - Return a specified ST_Geometry value from a collection of other geometries.
  • ST_CoordDim - Return the coordinate dimension of the ST_Geometry value.
  • ST_CurveToLine - Converts a CIRCULARSTRING/CURVEDPOLYGON to a LINESTRING/POLYGON
  • ST_Dump - Returns a set of geometry_dump (geom,path) rows, that make up a geometry g1.
  • ST_DumpPoints - Returns a set of geometry_dump (geom,path) rows of all points that make up a geometry.
  • ST_Estimated_Extent - Return the 'estimated' extent of the given spatial table. The estimated is taken from the geometry column's statistics. The current schema will be used if not specified.
  • ST_Extent3D - an aggregate function that returns the box3D bounding box that bounds rows of geometries.
  • ST_Force_2D - Forces the geometries into a "2-dimensional mode" so that all output representations will only have the X and Y coordinates.
  • ST_Force_3D - Forces the geometries into XYZ mode. This is an alias for ST_Force_3DZ.
  • ST_Force_3DM - Forces the geometries into XYM mode.
  • ST_Force_3DZ - Forces the geometries into XYZ mode. This is a synonym for ST_Force_3D.
  • ST_Force_4D - Forces the geometries into XYZM mode.
  • ST_Force_Collection - Converts the geometry into a GEOMETRYCOLLECTION.
  • ST_GeoHash - Return a GeoHash representation (geohash.org) of the geometry.
  • ST_GeogFromWKB - Creates a geography instance from a Well-Known Binary geometry representation (WKB) or extended Well Known Binary (EWKB).
  • ST_GeomFromEWKB - Return a specified ST_Geometry value from Extended Well-Known Binary representation (EWKB).
  • ST_GeomFromEWKT - Return a specified ST_Geometry value from Extended Well-Known Text representation (EWKT).
  • ST_GeomFromText - Return a specified ST_Geometry value from Well-Known Text representation (WKT).
  • ST_GeomFromWKB - Creates a geometry instance from a Well-Known Binary geometry representation (WKB) and optional SRID.
  • ST_GeometryN - Return the 1-based Nth geometry if the geometry is a GEOMETRYCOLLECTION, MULTIPOINT, MULTILINESTRING, MULTICURVE or MULTIPOLYGON. Otherwise, return NULL.
  • = - Returns TRUE if A's bounding box is the same as B's.
  • &<| - Returns TRUE if A's bounding box overlaps or is below B's.
  • && - Returns TRUE if A's bounding box overlaps B's.
  • ST_HasArc - Returns true if a geometry or geometry collection contains a circular string
  • ST_IsClosed - Returns TRUE if the LINESTRING's start and end points are coincident.
  • ST_IsEmpty - Returns true if this Geometry is an empty geometry . If true, then this Geometry represents the empty point set - i.e. GEOMETRYCOLLECTION(EMPTY).
  • ST_LineToCurve - Converts a LINESTRING/POLYGON to a CIRCULARSTRING, CURVED POLYGON
  • ST_Mem_Size - Returns the amount of space (in bytes) the geometry takes.
  • ST_NPoints - Return the number of points (vertexes) in a geometry.
  • ST_NRings - If the geometry is a polygon or multi-polygon returns the number of rings.
  • ST_PointFromWKB - Makes a geometry from WKB with the given SRID
  • ST_PointN - Return the Nth point in the first linestring or circular linestring in the geometry. Return NULL if there is no linestring in the geometry.
  • ST_Rotate - This is a synonym for ST_RotateZ
  • ST_RotateZ - Rotate a geometry rotRadians about the Z axis.
  • ST_SRID - Returns the spatial reference identifier for the ST_Geometry as defined in spatial_ref_sys table.
  • ST_Scale - Scales the geometry to a new size by multiplying the ordinates with the parameters. Ie: ST_Scale(geom, Xfactor, Yfactor, Zfactor).
  • ST_SetSRID - Sets the SRID on a geometry to a particular integer value.
  • ST_TransScale - Translates the geometry using the deltaX and deltaY args, then scales it using the XFactor, YFactor args, working in 2D only.
  • ST_Transform - Returns a new geometry with its coordinates transformed to the SRID referenced by the integer parameter.
  • ST_Translate - Translates the geometry to a new location using the numeric parameters as offsets. Ie: ST_Translate(geom, X, Y) or ST_Translate(geom, X, Y,Z).
  • ST_XMax - Returns X maxima of a bounding box 2d or 3d or a geometry.
  • ST_XMin - Returns X minima of a bounding box 2d or 3d or a geometry.
  • ST_YMax - Returns Y maxima of a bounding box 2d or 3d or a geometry.
  • ST_YMin - Returns Y minima of a bounding box 2d or 3d or a geometry.
  • ST_ZMax - Returns Z minima of a bounding box 2d or 3d or a geometry.
  • ST_ZMin - Returns Z minima of a bounding box 2d or 3d or a geometry.
  • ST_Zmflag - Returns ZM (dimension semantic) flag of the geometries as a small int. Values are: 0=2d, 1=3dm, 2=3dz, 3=4d.
  • UpdateGeometrySRID - Updates the SRID of all features in a geometry column, geometry_columns metadata and srid table constraint

8.8. PostGIS Function Support Matrix

Below is an alphabetical listing of spatial specific functions in PostGIS and the kinds of spatial - types they work with or OGC/SQL compliance they try to conform to.

-

  • A means the function works with the type or subtype natively.
  • A means it works but with a transform cast built-in using cast to geometry, transform to a "best srid" spatial ref and then cast back. Results may not be as expected for large areas or areas at poles - and may accumulate floating point junk.
  • A means the function works with the type because of a auto-cast to another such as to box3d rather than direct type support.

-

-

Functiongeometrygeography3D (2.5D)CurvesSQL MM
- Box2D -    
- Box3D -   
- Find_SRID -      
- GeometryType -    
- ST_Accum -   
- ST_AddMeasure -    
- ST_AddPoint -    
- ST_Affine -   
- ST_Area -   
- ST_AsBinary -  
- ST_AsEWKB -   
- ST_AsEWKT -   
- ST_AsGML -   
- ST_AsGeoJSON -   
- ST_AsHEXEWKB -   
- ST_AsKML -   
- ST_AsSVG -    
- ST_AsText -  
- ST_Azimuth -     
- ST_BdMPolyFromText -     
- ST_BdPolyFromText -     
- ST_Boundary -   
- ST_Buffer -   
- ST_BuildArea -     
- ST_Centroid -    
- ST_ClosestPoint -     
- ST_Collect -   
- ST_CollectionExtract -     
- ST_Contains -    
- ST_ContainsProperly -     
- ST_ConvexHull -   
- ST_CoordDim -  
- ST_CoveredBy -    
- ST_Covers -    
- ST_Crosses -    
- ST_CurveToLine -  
- ST_DFullyWithin -     
- ST_DWithin -    
- ST_Difference -   
- ST_Dimension -    
- ST_Disjoint -    
- ST_Distance -   
- ST_Distance_Sphere -     
- ST_Distance_Spheroid -     
- ST_Dump -   
- ST_DumpPoints -   
- ST_DumpRings -    
- ST_EndPoint -   
- ST_Envelope -    
- ST_Equals -    
- ST_Estimated_Extent -    
- ST_Expand -     
- ST_Extent -     
- ST_Extent3D -   
- ST_ExteriorRing -   
- ST_ForceRHR -    
- ST_Force_2D -    
- ST_Force_3D -   
- ST_Force_3DM -    
- ST_Force_3DZ -   
- ST_Force_4D -   
- ST_Force_Collection -   
- ST_GMLToSQL -    
- ST_GeoHash -    
- ST_GeogFromText -     
- ST_GeogFromWKB -    
- ST_GeographyFromText -     
- ST_GeomCollFromText -    
- ST_GeomFromEWKB -   
- ST_GeomFromEWKT -   
- ST_GeomFromGML -    
- ST_GeomFromKML -    
- ST_GeomFromText -   
- ST_GeomFromWKB -   
- ST_GeometryFromText -    
- ST_GeometryN -  
- ST_GeometryType -    
- |>> -     
- <<| -     
- ~ -     
- @ -     
- = -   
- << -     
- |&> -     
- &<| -    
- && -   
- &< -     
- &> -     
- >> -     
- ~= -     
- ST_HasArc -   
- ST_HausdorffDistance -     
- ST_InteriorRingN -   
- ST_Intersection -   
- ST_Intersects -   
- ST_IsClosed -  
- ST_IsEmpty -   
- ST_IsRing -    
- ST_IsSimple -   
- ST_IsValid -    
- ST_IsValidReason -     
- ST_Length -   
- ST_Length2D -     
- ST_Length2D_Spheroid -     
- ST_Length3D -    
- ST_Length3D_Spheroid -    
- ST_Length_Spheroid -    
- ST_LineCrossingDirection -     
- ST_LineFromMultiPoint -    
- ST_LineFromText -    
- ST_LineFromWKB -    
- ST_LineMerge -     
- ST_LineToCurve -   
- ST_Line_Interpolate_Point -    
- ST_Line_Locate_Point -     
- ST_Line_Substring -    
- ST_LinestringFromWKB -    
- ST_LocateBetweenElevations -    
- ST_Locate_Along_Measure -     
- ST_Locate_Between_Measures -     
- ST_LongestLine -     
- ST_M -   
- ST_MLineFromText -    
- ST_MPointFromText -    
- ST_MPolyFromText -    
- ST_MakeBox2D -     
- ST_MakeBox3D -    
- ST_MakeEnvelope -     
- ST_MakeLine -    
- ST_MakePoint -    
- ST_MakePointM -     
- ST_MakePolygon -    
- ST_MaxDistance -     
- ST_MemUnion -    
- ST_Mem_Size -   
- ST_MinimumBoundingCircle -     
- ST_Multi -     
- ST_NDims -    
- ST_NPoints -   
- ST_NRings -   
- ST_NumGeometries -    
- ST_NumInteriorRing -    
- ST_NumInteriorRings -    
- ST_NumPoints -    
- ST_OrderingEquals -    
- ST_Overlaps -    
- ST_Perimeter -    
- ST_Perimeter2D -     
- ST_Perimeter3D -    
- ST_Point -    
- ST_PointFromText -    
- ST_PointFromWKB -  
- ST_PointN -  
- ST_PointOnSurface -   
- ST_Point_Inside_Circle -     
- ST_Polygon -   
- ST_PolygonFromText -    
- ST_Polygonize -     
- ST_Relate -    
- ST_RemovePoint -    
- ST_Reverse -     
- ST_Rotate -   
- ST_RotateX -    
- ST_RotateY -    
- ST_RotateZ -   
- ST_SRID -   
- ST_Scale -   
- ST_Segmentize -     
- ST_SetPoint -    
- ST_SetSRID -    
- ST_Shift_Longitude -    
- ST_ShortestLine -     
- ST_Simplify -     
- ST_SimplifyPreserveTopology -     
- ST_SnapToGrid -    
- ST_StartPoint -   
- ST_Summary -    
- ST_SymDifference -   
- ST_Touches -    
- ST_TransScale -   
- ST_Transform -   
- ST_Translate -   
- ST_Union -    
- ST_WKBToSQL -    
- ST_WKTToSQL -    
- ST_Within -    
- ST_X -   
- ST_XMax -   
- ST_XMin -   
- ST_Y -   
- ST_YMax -   
- ST_YMin -   
- ST_Z -   
- ST_ZMax -   
- ST_ZMin -   
- ST_Zmflag -   

-

8.9. New PostGIS Functions

8.9.1. PostGIS Functions new, behavior changed, or enhanced in 1.5

The functions given below are PostGIS functions that were introduced or enhanced in this major release.

  • PostGIS_LibXML_Version - Availability: 1.5 Returns the version number of the libxml2 library.
  • ST_AddMeasure - Availability: 1.5.0 Return a derived geometry with measure elements linearly interpolated between the start and end points. If the geometry has no measure dimension, one is added. If the geometry has a measure dimension, it is over-written with new values. Only LINESTRINGS and MULTILINESTRINGS are supported.
  • ST_AsBinary - Availability: 1.5.0 geography support was introduced. Return the Well-Known Binary (WKB) representation of the geometry/geography without SRID meta data.
  • ST_AsGeoJSON - Availability: 1.5.0 geography support was introduced. Return the geometry as a GeoJSON element.
  • ST_AsText - Availability: 1.5 - support for geography was introduced. Return the Well-Known Text (WKT) representation of the geometry/geography without SRID metadata.
  • ST_Buffer - Availability: 1.5 - ST_Buffer was enhanced to support different endcaps and join types. These are useful for example to convert road linestrings - into polygon roads with flat or square edges instead of rounded edges. Thin wrapper for geography was added. - requires GEOS >= 3.2 to take advantage of advanced geometry functionality. - (T) For geometry: Returns a geometry that represents all points whose distance from this Geometry is less than or equal to distance. Calculations are in the Spatial Reference System of this Geometry. For geography: Uses a planar transform wrapper. Introduced in 1.5 support for different end cap and mitre settings to control shape. buffer_style options: quad_segs=#,endcap=round|flat|square,join=round|mitre|bevel,mitre_limit=#.#
  • ST_ClosestPoint - Availability: 1.5.0 Returns the 2-dimensional point on g1 that is closest to g2. This is the first point of the shortest line.
  • ST_CollectionExtract - Availability: 1.5.0 Given a GEOMETRYCOLLECTION, returns a MULTI* geometry consisting only of the specified type. Sub-geometries that are not the specified type are ignored. If there are no sub-geometries of the right type, an EMPTY collection will be returned. Only points, lines and polygons are supported. Type numbers are 1 == POINT, 2 == LINESTRING, 3 == POLYGON.
  • ST_Covers - Availability: 1.5 - support for geography was introduced. Returns 1 (TRUE) if no point in Geometry B is outside Geometry A. For geography: if geography point B is not outside Polygon Geography A
  • ST_DFullyWithin - Availability: 1.5.0 Returns true if all of the geometries are within the specified distance of one another
  • ST_DWithin - Availability: 1.5.0 support for geography was introduced Returns true if the geometries are within the specified distance of one another. For geometry units are in those of spatial reference and For geography units are in meters and measurement is defaulted to use_spheroid=true (measure around spheroid), for faster check, use_spheroid=false to measure along sphere.
  • ST_Distance - Availability: 1.5.0 geography support was introduced in 1.5. Speed improvements for planar to better handle large or many vertex geometries For geometry type Returns the 2-dimensional cartesian minimum distance (based on spatial ref) between two geometries in projected units. For geography type defaults to return spheroidal minimum distance between two geographies in meters.
  • ST_Distance_Sphere - Availability: 1.5 - support for other geometry types besides points was introduced. Prior versions only work with points. Returns minimum distance in meters between two lon/lat geometries. Uses a spherical earth and radius of 6370986 meters. Faster than ST_Distance_Spheroid, but less accurate. PostGIS versions prior to 1.5 only implemented for points.
  • ST_Distance_Spheroid - Availability: 1.5 - support for other geometry types besides points was introduced. Prior versions only work with points. Returns the minimum distance between two lon/lat geometries given a particular spheroid. PostGIS versions prior to 1.5 only support points.
  • ST_DumpPoints - Availability: 1.5.0 Returns a set of geometry_dump (geom,path) rows of all points that make up a geometry.
  • ST_Envelope - Availability: 1.5.0 behavior changed to output double precision instead of float4 Returns a geometry representing the double precision (float8) bounding box of the supplied geometry.
  • ST_GMLToSQL - Availability: 1.5 Return a specified ST_Geometry value from GML representation. This is an alias name for ST_GeomFromGML
  • ST_GeomFromGML - Availability: 1.5 Takes as input GML representation of geometry and outputs a PostGIS geometry object
  • ST_GeomFromKML - Availability: 1.5 Takes as input KML representation of geometry and outputs a PostGIS geometry object
  • && - Availability: 1.5.0 support for geography was introduced. Returns TRUE if A's bounding box overlaps B's.
  • ~= - Availability: 1.5.0 changed behavior Returns TRUE if A's bounding box is the same as B's.
  • ST_HausdorffDistance - Availability: 1.5.0 - requires GEOS >= 3.2.0 Returns the Hausdorff distance between two geometries. Basically a measure of how similar or dissimilar 2 geometries are. Units are in the units of the spatial reference system of the geometries.
  • ST_Intersection - Availability: 1.5 support for geography data type was introduced. (T) Returns a geometry that represents the shared portion of geomA and geomB. The geography implementation does a transform to geometry to do the intersection and then transform back to WGS84.
  • ST_Intersects - Availability: 1.5 support for geography was introduced. Returns TRUE if the Geometries/Geography "spatially intersect" - (share any portion of space) and FALSE if they don't (they are Disjoint). For geography -- tolerance is 0.00001 meters (so any points that close are considered to intersect)
  • ST_Length - Availability: 1.5.0 geography support was introduced in 1.5. Returns the 2d length of the geometry if it is a linestring or multilinestring. geometry are in units of spatial reference and geography are in meters (default spheroid)
  • ST_Line_Locate_Point - Availability: 1.5.1 - support for MULTILINESTRINGS was introduced. Returns a float between 0 and 1 representing the location of the closest point on LineString to the given Point, as a fraction of total 2d line length.
  • ST_LongestLine - Availability: 1.5.0 Returns the 2-dimensional longest line points of two geometries. The function will only return the first longest line if more than one, that the function finds. The line returned will always start in g1 and end in g2. The length of the line this function returns will always be the same as st_maxdistance returns for g1 and g2.
  • ST_MakeEnvelope - Availability: 1.5 Creates a rectangular Polygon formed from the given minimums and maximums. Input values must be in SRS specified by the SRID.
  • ST_MaxDistance - Availability: 1.5.0 Returns the 2-dimensional largest distance between two geometries in projected units.
  • ST_ShortestLine - Availability: 1.5.0 Returns the 2-dimensional shortest line between two geometries

8.9.2. PostGIS Functions new, behavior changed, or enhanced in 1.4

The functions given below are PostGIS functions that were introduced or enhanced in the 1.4 release.

  • Populate_Geometry_Columns - Ensures geometry columns have appropriate spatial constraints and exist in the geometry_columns table. Availability: 1.4.0
  • ST_AsSVG - Returns a Geometry in SVG path data given a geometry or geography object. - Availability: 1.2.2 . Availability: 1.4.0 Changed in PostGIS 1.4.0 to include L command in absolute path to conform to http://www.w3.org/TR/SVG/paths.html#PathDataBNF -
  • ST_Collect - Return a specified ST_Geometry value from a collection of other geometries. Availability: 1.4.0 - ST_Collect(geomarray) was introduced. ST_Collect was enhanced to handle more geometries faster.
  • ST_ContainsProperly - Returns true if B intersects the interior of A but not the boundary (or exterior). A does not contain properly itself, but does contain itself. Availability: 1.4.0 - requires GEOS >= 3.1.0.
  • ST_Extent - an aggregate function that returns the bounding box that bounds rows of geometries. - Availability: 1.4.0 As of 1.4.0 now returns a box3d_extent instead of box2d object. -
  • ST_GeoHash - Return a GeoHash representation (geohash.org) of the geometry. Availability: 1.4.0
  • ST_IsValidReason - Returns text stating if a geometry is valid or not and if not valid, a reason why. Availability: 1.4 - requires GEOS >= 3.1.0.
  • ST_LineCrossingDirection - Given 2 linestrings, returns a number between -3 and 3 denoting what kind of crossing behavior. 0 is no crossing. Availability: 1.4
  • ST_LocateBetweenElevations - Return a derived geometry (collection) value with elements that intersect the specified range of elevations inclusively. Only 3D, 4D LINESTRINGS and MULTILINESTRINGS are supported. Availability: 1.4.0
  • ST_MakeLine - Creates a Linestring from point geometries. Availability: 1.4.0 - ST_MakeLine(geomarray) was introduced. ST_MakeLine aggregate functions was enhanced to handle more points faster.
  • ST_MinimumBoundingCircle - Returns the smallest circle polygon that can fully contain a geometry. Default uses 48 segments per quarter circle. Availability: 1.4.0 - requires GEOS
  • ST_Union - Returns a geometry that represents the point set union of the Geometries. Availability: 1.4.0 - ST_Union was enhanced. ST_Union(geomarray) was introduced and also faster aggregate collection in PostgreSQL. If you are using GEOS 3.1.0+ - ST_Union will use the faster Cascaded Union algorithm described in - http://blog.cleverelephant.ca/2009/01/must-faster-unions-in-postgis-14.html

8.9.3. PostGIS Functions new in 1.3

The functions given below are PostGIS functions that were introduced in the 1.3 release.

  • ST_AsGeoJSON - Return the geometry as a GeoJSON element. Availability: 1.3.4
  • ST_SimplifyPreserveTopology - Returns a "simplified" version of the given geometry using the Douglas-Peucker algorithm. Will avoid creating derived geometries (polygons in particular) that are invalid. Availability: 1.3.3

Chapter 9. Reporting Problems

9.1. Reporting Software Bugs

Reporting bugs effectively is a fundamental way to help PostGIS - development. The most effective bug report is that enabling PostGIS - developers to reproduce it, so it would ideally contain a script - triggering it and every information regarding the environment in which it - was detected. Good enough info can be extracted running SELECT - postgis_full_version() [for postgis] and SELECT - version() [for postgresql].

If you aren't using the latest release, it's worth taking a look at - its release - changelog first, to find out if your bug has already been - fixed.

Using the PostGIS bug - tracker will ensure your reports are not discarded, and will keep - you informed on its handling process. Before reporting a new bug please - query the database to see if it is a known one, and if it is please add - any new information you have about it.

You might want to read Simon Tatham's paper about How to Report - Bugs Effectively before filing a new report.

9.2. Reporting Documentation Issues

The documentation should accurately reflect the features and - behavior of the software. If it doesn't, it could be because of a software - bug or because the documentation is in error or deficient.

Documentation issues can also be reported to the PostGIS bug - tracker.

If your revision is trivial, just describe it in a new bug tracker - issue, being specific about its location in the documentation.

If your changes are more extensive, a Subversion patch is definitely - preferred. This is a four step process on Unix (assuming you already have - Subversion - installed):

  1. Check out a copy of PostGIS' Subversion trunk. On Unix, - type:

    svn checkout - http://svn.osgeo.org/postgis/trunk/

    This will be stored in the directory ./trunk

  2. Make your changes to the documentation with your favorite text - editor. On Unix, type (for example):

    vim trunk/doc/postgis.xml

    Note that the documentation is written in SGML rather than HTML, - so if you are not familiar with it please follow the example of the - rest of the documentation.

  3. Make a patch file containing the differences from the master - copy of the documentation. On Unix, type:

    svn diff trunk/doc/postgis.xml > - doc.patch

  4. Attach the patch to a new issue in bug tracker.

Appendix A. Appendix

Release Notes

A.1. Release 1.5.3

Release date: 2011/06/25

This is a bug fix release, addressing issues that have been filed since the 1.5.2 release.

Bug Fixes

#1007, ST_IsValid crash fix requires GEOS 3.3.0+ or 3.2.3+ - (Sandro Santilli, reported by Birgit Laggner)

#940, support for PostgreSQL 9.1 beta 1 - (Regina Obe, Paul Ramsey, patch submitted by stl)

#845, ST_Intersects precision error (Sandro Santilli, Nicklas Avén) - Reported by cdestigter

#884, Unstable results with ST_Within, ST_Intersects (Chris Hodgson)

#779, shp2pgsql -S option seems to fail on points (Jeff Adams)

#666, ST_DumpPoints is not null safe (Regina Obe)

#631, Update NZ projections for grid transformation support (jpalmer)

#630, Peculiar Null treatment in arrays in ST_Collect (Chris Hodgson) - Reported by David Bitner

#624, Memory leak in ST_GeogFromText (ryang, Paul Ramsey)

#609, Bad source code in manual section 5.2 Java Clients (simoc, Regina Obe)

#604, shp2pgsql usage touchups (Mike Toews, Paul Ramsey)

#573 ST_Union fails on a group of linestrings - Not a PostGIS bug, fixed in GEOS 3.3.0

#457 ST_CollectionExtract returns non-requested type - (Nicklas Avén, Paul Ramsey)

#441 ST_AsGeoJson Bbox on GeometryCollection error (Olivier Courtin)

#411 Ability to backup invalid geometries (Sando Santilli) - Reported by Regione Toscana

#409 ST_AsSVG - degraded (Olivier Courtin) - Reported by Sdikiy

#373 Documentation syntax error in hard upgrade (Paul Ramsey) - Reported by psvensso

A.2. Release 1.5.2

Release date: 2010/09/27

This is a bug fix release, addressing issues that have been filed since the 1.5.1 release.

Bug Fixes

Loader: fix handling of empty (0-verticed) geometries in shapefiles. (Sandro Santilli)

#536, Geography ST_Intersects, ST_Covers, ST_CoveredBy and Geometry ST_Equals not using spatial index (Regina Obe, Nicklas Aven)

#573, Improvement to ST_Contains geography (Paul Ramsey)

Loader: Add support for command-q shutdown in Mac GTK build (Paul Ramsey)

#393, Loader: Add temporary patch for large DBF files (Maxime Guillaud, Paul Ramsey)

#507, Fix wrong OGC URN in GeoJSON and GML output (Olivier Courtin)

spatial_ref_sys.sql Add datum conversion for projection SRID 3021 (Paul Ramsey)

Geography - remove crash for case when all geographies are out of the estimate (Paul Ramsey)

#469, Fix for array_aggregation error (Greg Stark, Paul Ramsey)

#532, Temporary geography tables showing up in other user sessions (Paul Ramsey)

#562, ST_Dwithin errors for large geographies (Paul Ramsey)

#513, shape loading GUI tries to make spatial index when loading DBF only mode (Paul Ramsey)

#527, shape loading GUI should always append log messages (Mark Cave-Ayland)

#504, shp2pgsql should rename xmin/xmax fields (Sandro Santilli)

#458, postgis_comments being installed in contrib instead of version folder (Mark Cave-Ayland)

#474, Analyzing a table with geography column crashes server (Paul Ramsey)

#581, LWGEOM-expand produces inconsistent results (Mark Cave-Ayland)

#513, Add dbf filter to shp2pgsql-gui and allow uploading dbf only (Paul Ramsey)

Fix further build issues against PostgreSQL 9.0 (Mark Cave-Ayland)

#572, Password whitespace for Shape File

#603, shp2pgsql: "-w" produces invalid WKT for MULTI* objects. (Mark Cave-Ayland)

A.3. Release 1.5.1

Release date: 2010/03/11

This is a bug fix release, addressing issues that have been filed since the 1.4.1 release.

Bug Fixes

#410, update embedded bbox when applying ST_SetPoint, ST_AddPoint ST_RemovePoint to a linestring (Paul Ramsey)

#411, allow dumping tables with invalid geometries (Sandro Santilli, for Regione Toscana-SIGTA)

#414, include geography_columns view when running upgrade scripts (Paul Ramsey)

#419, allow support for multilinestring in ST_Line_Substring (Paul Ramsey, for Lidwala Consulting Engineers)

#421, fix computed string length in ST_AsGML() (Olivier Courtin)

#441, fix GML generation with heterogeneous collections (Olivier Courtin)

#443, incorrect coordinate reversal in GML 3 generation (Olivier Courtin)

#450, #451, wrong area calculation for geography features that cross the date line (Paul Ramsey)

Ensure support for upcoming 9.0 PgSQL release (Paul Ramsey)

A.4. Release 1.5.0

Release date: 2010/02/04

This release provides support for geographic coordinates (lat/lon) via a new GEOGRAPHY type. Also performance enhancements, new input format support (GML,KML) and general upkeep.

API Stability

The public API of PostGIS will not change during minor (0.0.X) releases.

The definition of the =~ operator has changed from an exact geometric equality check to a bounding box equality check.

Compatibility

GEOS, Proj4, and LibXML2 are now mandatory dependencies

The library versions below are the minimum requirements for PostGIS 1.5

PostgreSQL 8.3 and higher on all platforms

GEOS 3.1 and higher only (GEOS 3.2+ to take advantage of all features)

LibXML2 2.5+ related to new ST_GeomFromGML/KML functionality

Proj4 4.5 and higher only

New Features

Section 8.9.1, “PostGIS Functions new, behavior changed, or enhanced in 1.5”

Added Hausdorff distance calculations (#209) (Vincent Picavet)

Added parameters argument to ST_Buffer operation to support one-sided buffering and other buffering styles (Sandro Santilli)

Addition of other Distance related visualization and analysis functions (Nicklas Aven)

  • ST_ClosestPoint

  • ST_DFullyWithin

  • ST_LongestLine

  • ST_MaxDistance

  • ST_ShortestLine

ST_DumpPoints (Maxime van Noppen)

KML, GML input via ST_GeomFromGML and ST_GeomFromKML (Olivier Courtin)

Extract homogeneous collection with ST_CollectionExtract (Paul Ramsey)

Add measure values to an existing linestring with ST_AddMeasure (Paul Ramsey)

History table implementation in utils (George Silva)

Geography type and supporting functions

  • Spherical algorithms (Dave Skea)

  • Object/index implementation (Paul Ramsey)

  • Selectivity implementation (Mark Cave-Ayland)

  • Serializations to KML, GML and JSON (Olivier Courtin)

  • ST_Area, ST_Distance, ST_DWithin, ST_GeogFromText, ST_GeogFromWKB, ST_Intersects, ST_Covers, ST_Buffer (Paul Ramsey)

Enhancements

Performance improvements to ST_Distance (Nicklas Aven)

Documentation updates and improvements (Regina Obe, Kevin Neufeld)

Testing and quality control (Regina Obe)

PostGIS 1.5 support PostgreSQL 8.5 trunk (Guillaume Lelarge)

Win32 support and improvement of core shp2pgsql-gui (Mark Cave-Ayland)

In place 'make check' support (Paul Ramsey)

Bug fixes

http://trac.osgeo.org/postgis/query?status=closed&milestone=postgis+1.5.0&order=priority

A.5. Release 1.4.0

Release date: 2009/07/24

This release provides performance enhancements, improved internal structures and testing, new features, and upgraded documentation.

API Stability

As of the 1.4 release series, the public API of PostGIS will not change during minor releases.

Compatibility

The versions below are the *minimum* requirements for PostGIS 1.4

PostgreSQL 8.2 and higher on all platforms

GEOS 3.0 and higher only

PROJ4 4.5 and higher only

New Features

ST_Union() uses high-speed cascaded union when compiled against - GEOS 3.1+ (Paul Ramsey)

ST_ContainsProperly() requires GEOS 3.1+

ST_Intersects(), ST_Contains(), ST_Within() use high-speed cached prepared geometry against GEOS 3.1+ (Paul Ramsey)

Vastly improved documentation and reference manual (Regina Obe & Kevin Neufeld)

Figures and diagram examples in the reference manual (Kevin Neufeld)

ST_IsValidReason() returns readable explanations for validity failures (Paul Ramsey)

ST_GeoHash() returns a geohash.org signature for geometries (Paul Ramsey)

GTK+ multi-platform GUI for shape file loading (Paul Ramsey)

ST_LineCrossingDirection() returns crossing directions (Paul Ramsey)

ST_LocateBetweenElevations() returns sub-string based on Z-ordinate. (Paul Ramsey)

Geometry parser returns explicit error message about location of syntax errors (Mark Cave-Ayland)

ST_AsGeoJSON() return JSON formatted geometry (Olivier Courtin)

Populate_Geometry_Columns() -- automatically add records to geometry_columns for TABLES and VIEWS (Kevin Neufeld)

ST_MinimumBoundingCircle() -- returns the smallest circle polygon that can encompass a geometry (Bruce Rindahl)

Enhancements

Core geometry system moved into independent library, liblwgeom. (Mark Cave-Ayland)

New build system uses PostgreSQL "pgxs" build bootstrapper. (Mark Cave-Ayland)

Debugging framework formalized and simplified. (Mark Cave-Ayland)

All build-time #defines generated at configure time and placed in headers for easier cross-platform support (Mark Cave-Ayland)

Logging framework formalized and simplified (Mark Cave-Ayland)

Expanded and more stable support for CIRCULARSTRING, COMPOUNDCURVE and CURVEPOLYGON, better parsing, wider support in functions (Mark Leslie & Mark Cave-Ayland)

Improved support for OpenSolaris builds (Paul Ramsey)

Improved support for MSVC builds (Mateusz Loskot)

Updated KML support (Olivier Courtin)

Unit testing framework for liblwgeom (Paul Ramsey)

New testing framework to comprehensively exercise every PostGIS function (Regine Obe)

Performance improvements to all geometry aggregate functions (Paul Ramsey)

Support for the upcoming PostgreSQL 8.4 (Mark Cave-Ayland, Talha Bin Rizwan)

Shp2pgsql and pgsql2shp re-worked to depend on the common parsing/unparsing code in liblwgeom (Mark Cave-Ayland)

Use of PDF DbLatex to build PDF docs and preliminary instructions for build (Jean David Techer)

Automated User documentation build (PDF and HTML) and Developer Doxygen Documentation (Kevin Neufeld)

Automated build of document images using ImageMagick from WKT geometry text files (Kevin Neufeld)

More attractive CSS for HTML documentation (Dane Springmeyer)

Bug fixes

http://trac.osgeo.org/postgis/query?status=closed&milestone=postgis+1.4.0&order=priority

A.6. Release 1.3.6

Release date: 2009/05/04

This release adds support for PostgreSQL 8.4, exporting - prj files from the database with shape data, some crash fixes for shp2pgsql, and several small - bug fixes in the handling of "curve" types, logical error importing dbf only files, improved error handling of AddGeometryColumns.

A.7. Release 1.3.5

Release date: 2008/12/15

This release is a bug fix release to address a failure - in ST_Force_Collection and related functions that critically - affects using Mapserver with LINE layers.

A.8. Release 1.3.4

Release date: 2008/11/24

This release adds support for GeoJSON output, building - with PostgreSQL 8.4, improves documentation quality and - output aesthetics, adds function-level SQL documentation, - and improves performance for some spatial predicates - (point-in-polygon tests).

Bug fixes include removal of crashers in handling - circular strings for many functions, some memory leaks - removed, a linear referencing failure for measures on vertices, - and more. See the NEWS file for details.

A.9. Release 1.3.3

Release date: 2008/04/12

This release fixes bugs shp2pgsql, adds enhancements to SVG and - KML support, adds a ST_SimplifyPreserveTopology function, makes the - build more sensitive to GEOS versions, and fixes a handful of severe but - rare failure cases.

A.10. Release 1.3.2

Release date: 2007/12/01

This release fixes bugs in ST_EndPoint() and ST_Envelope, improves - support for JDBC building and OS/X, and adds better support for GML - output with ST_AsGML(), including GML3 output.

A.11. Release 1.3.1

Release date: 2007/08/13

This release fixes some oversights in the previous release around - version numbering, documentation, and tagging.

A.12. Release 1.3.0

Release date: 2007/08/09

This release provides performance enhancements to the relational - functions, adds new relational functions and begins the migration of our - function names to the SQL-MM convention, using the spatial type (SP) - prefix.

Added Functionality

JDBC: Added Hibernate Dialect (thanks to Norman Barker)

Added ST_Covers and ST_CoveredBy relational functions. - Description and justification of these functions can be found at - http://lin-ear-th-inking.blogspot.com/2007/06/subtleties-of-ogc-covers-spatial.html

Added ST_DWithin relational function.

Performance Enhancements

Added cached and indexed point-in-polygon short-circuits for the - functions ST_Contains, ST_Intersects, ST_Within and ST_Disjoint

Added inline index support for relational functions (except - ST_Disjoint)

Other Changes

Extended curved geometry support into the geometry accessor and - some processing functions

Began migration of functions to the SQL-MM naming convention; - using a spatial type (ST) prefix.

Added initial support for PostgreSQL 8.3

A.13. Release 1.2.1

Release date: 2007/01/11

This release provides bug fixes in PostgreSQL 8.2 support and some - small performance enhancements.

Changes

Fixed point-in-polygon shortcut bug in Within().

Fixed PostgreSQL 8.2 NULL handling for indexes.

Updated RPM spec files.

Added short-circuit for Transform() in no-op case.

JDBC: Fixed JTS handling for multi-dimensional geometries - (thanks to Thomas Marti for hint and partial patch). Additionally, now - JavaDoc is compiled and packaged. Fixed classpath problems with GCJ. - Fixed pgjdbc 8.2 compatibility, losing support for jdk 1.3 and - older.

A.14. Release 1.2.0

Release date: 2006/12/08

This release provides type definitions along with - serialization/deserialization capabilities for SQL-MM defined curved - geometries, as well as performance enhancements.

Changes

Added curved geometry type support for - serialization/deserialization

Added point-in-polygon shortcircuit to the Contains and Within - functions to improve performance for these cases.

A.15. Release 1.1.6

Release date: 2006/11/02

This is a bugfix release, in particular fixing a critical error - with GEOS interface in 64bit systems. Includes an updated of the SRS - parameters and an improvement in reprojections (take Z in - consideration). Upgrade is encouraged.

Upgrading

If you are upgrading from release 1.0.3 or later follow the - soft upgrade procedure.

If you are upgrading from a release between 1.0.0RC6 - and 1.0.2 (inclusive) and really want a live upgrade read - the upgrade section of the - 1.0.3 release notes chapter.

Upgrade from any release prior to 1.0.0RC6 requires an hard upgrade.

Bug fixes

fixed CAPI change that broke 64-bit platforms

loader/dumper: fixed regression tests and usage output

Fixed setSRID() bug in JDBC, thanks to Thomas Marti

Other changes

use Z ordinate in reprojections

spatial_ref_sys.sql updated to EPSG 6.11.1

Simplified Version.config infrastructure to use a single pack of - version variables for everything.

Include the Version.config in loader/dumper USAGE - messages

Replace hand-made, fragile JDBC version parser with - Properties

A.16. Release 1.1.5

Release date: 2006/10/13

This is an bugfix release, including a critical segfault on win32. - Upgrade is encouraged.

Upgrading

If you are upgrading from release 1.0.3 or later follow the - soft upgrade procedure.

If you are upgrading from a release between 1.0.0RC6 - and 1.0.2 (inclusive) and really want a live upgrade read - the upgrade section of the - 1.0.3 release notes chapter.

Upgrade from any release prior to 1.0.0RC6 requires an hard upgrade.

Bug fixes

Fixed MingW link error that was causing pgsql2shp to segfault on - Win32 when compiled for PostgreSQL 8.2

fixed nullpointer Exception in Geometry.equals() method in - Java

Added EJB3Spatial.odt to fulfill the GPL requirement of - distributing the "preferred form of modification"

Removed obsolete synchronization from JDBC Jts code.

Updated heavily outdated README files for shp2pgsql/pgsql2shp by - merging them with the manpages.

Fixed version tag in jdbc code that still said "1.1.3" in the - "1.1.4" release.

New Features

Added -S option for non-multi geometries to shp2pgsql

A.17. Release 1.1.4

Release date: 2006/09/27

This is an bugfix release including some improvements in the Java - interface. Upgrade is encouraged.

Upgrading

If you are upgrading from release 1.0.3 or later follow the - soft upgrade procedure.

If you are upgrading from a release between 1.0.0RC6 - and 1.0.2 (inclusive) and really want a live upgrade read - the upgrade section of the - 1.0.3 release notes chapter.

Upgrade from any release prior to 1.0.0RC6 requires an hard upgrade.

Bug fixes

Fixed support for PostgreSQL 8.2

Fixed bug in collect() function discarding SRID of input

Added SRID match check in MakeBox2d and MakeBox3d

Fixed regress tests to pass with GEOS-3.0.0

Improved pgsql2shp run concurrency.

Java changes

reworked JTS support to reflect new upstream JTS developers' - attitude to SRID handling. Simplifies code and drops build depend on - GNU trove.

Added EJB2 support generously donated by the "Geodetix s.r.l. - Company" http://www.geodetix.it/

Added EJB3 tutorial / examples donated by Norman Barker - <nbarker@ittvis.com>

Reorganized java directory layout a little.

A.18. Release 1.1.3

Release date: 2006/06/30

This is an bugfix release including also some new functionalities - (most notably long transaction support) and portability enhancements. - Upgrade is encouraged.

Upgrading

If you are upgrading from release 1.0.3 or later follow the - soft upgrade procedure.

If you are upgrading from a release between 1.0.0RC6 - and 1.0.2 (inclusive) and really want a live upgrade read - the upgrade section of the - 1.0.3 release notes chapter.

Upgrade from any release prior to 1.0.0RC6 requires an hard upgrade.

Bug fixes / correctness

BUGFIX in distance(poly,poly) giving wrong results.

BUGFIX in pgsql2shp successful return code.

BUGFIX in shp2pgsql handling of MultiLine WKT.

BUGFIX in affine() failing to update bounding box.

WKT parser: forbidden construction of multigeometries with EMPTY - elements (still supported for GEOMETRYCOLLECTION).

New functionalities

NEW Long Transactions support.

NEW DumpRings() function.

NEW AsHEXEWKB(geom, XDR|NDR) function.

JDBC changes

Improved regression tests: MultiPoint and scientific - ordinates

Fixed some minor bugs in jdbc code

Added proper accessor functions for all fields in preparation of - making those fields private later

Other changes

NEW regress test support for loader/dumper.

Added --with-proj-libdir and --with-geos-libdir configure - switches.

Support for build Tru64 build.

Use Jade for generating documentation.

Don't link pgsql2shp to more libs then required.

Initial support for PostgreSQL 8.2.

A.19. Release 1.1.2

Release date: 2006/03/30

This is an bugfix release including some new functions and - portability enhancements. Upgrade is - encouraged.

Upgrading

If you are upgrading from release 1.0.3 or later follow the - soft upgrade procedure.

If you are upgrading from a release between 1.0.0RC6 - and 1.0.2 (inclusive) and really want a live upgrade read - the upgrade section of the - 1.0.3 release notes chapter.

Upgrade from any release prior to 1.0.0RC6 requires an hard upgrade.

Bug fixes

BUGFIX in SnapToGrid() computation of output bounding box

BUGFIX in EnforceRHR()

jdbc2 SRID handling fixes in JTS code

Fixed support for 64bit archs

New functionalities

Regress tests can now be run *before* postgis - installation

New affine() matrix transformation functions

New rotate{,X,Y,Z}() function

Old translating and scaling functions now use affine() - internally

Embedded access control in estimated_extent() for builds against - pgsql >= 8.0.0

Other changes

More portable ./configure script

Changed ./run_test script to have more sane default - behaviour

A.20. Release 1.1.1

Release date: 2006/01/23

This is an important Bugfix release, upgrade is highly - recommended. Previous version contained a bug in - postgis_restore.pl preventing hard - upgrade procedure to complete and a bug in GEOS-2.2+ connector - preventing GeometryCollection objects to be used in topological - operations.

Upgrading

If you are upgrading from release 1.0.3 or later follow the - soft upgrade procedure.

If you are upgrading from a release between 1.0.0RC6 - and 1.0.2 (inclusive) and really want a live upgrade read - the upgrade section of the - 1.0.3 release notes chapter.

Upgrade from any release prior to 1.0.0RC6 requires an hard upgrade.

Bug fixes

Fixed a premature exit in postgis_restore.pl

BUGFIX in geometrycollection handling of GEOS-CAPI - connector

Solaris 2.7 and MingW support improvements

BUGFIX in line_locate_point()

Fixed handling of postgresql paths

BUGFIX in line_substring()

Added support for localized cluster in regress tester

New functionalities

New Z and M interpolation in line_substring()

New Z and M interpolation in line_interpolate_point()

added NumInteriorRing() alias due to OpenGIS ambiguity

A.21. Release 1.1.0

Release date: 2005/12/21

This is a Minor release, containing many improvements and new - things. Most notably: build procedure greatly simplified; transform() - performance drastically improved; more stable GEOS connectivity (CAPI - support); lots of new functions; draft topology support.

It is highly recommended that you upgrade to - GEOS-2.2.x before installing PostGIS, this will ensure future GEOS - upgrades won't require a rebuild of the PostGIS library.

Credits

This release includes code from Mark Cave Ayland for caching of - proj4 objects. Markus Schaber added many improvements in his JDBC2 - code. Alex Bodnaru helped with PostgreSQL source dependency relief and - provided Debian specfiles. Michael Fuhr tested new things on Solaris - arch. David Techer and Gerald Fenoy helped testing GEOS C-API - connector. Hartmut Tschauner provided code for the azimuth() function. - Devrim GUNDUZ provided RPM specfiles. Carl Anderson helped with the - new area building functions. See the credits section for more names.

Upgrading

If you are upgrading from release 1.0.3 or later you - DO NOT need a dump/reload. Simply sourcing the - new lwpostgis_upgrade.sql script in all your existing databases will - work. See the soft upgrade chapter - for more information.

If you are upgrading from a release between 1.0.0RC6 - and 1.0.2 (inclusive) and really want a live upgrade read - the upgrade section of the - 1.0.3 release notes chapter.

Upgrade from any release prior to 1.0.0RC6 requires an hard upgrade.

New functions

scale() and transscale() companion methods to translate()

line_substring()

line_locate_point()

M(point)

LineMerge(geometry)

shift_longitude(geometry)

azimuth(geometry)

locate_along_measure(geometry, float8)

locate_between_measures(geometry, float8, float8)

SnapToGrid by point offset (up to 4d support)

BuildArea(any_geometry)

OGC BdPolyFromText(linestring_wkt, srid)

OGC BdMPolyFromText(linestring_wkt, srid)

RemovePoint(linestring, offset)

ReplacePoint(linestring, offset, point)

Bug fixes

Fixed memory leak in polygonize()

Fixed bug in lwgeom_as_anytype cast functions

Fixed USE_GEOS, USE_PROJ and USE_STATS elements of - postgis_version() output to always reflect library state.

Function semantic changes

SnapToGrid doesn't discard higher dimensions

Changed Z() function to return NULL if requested dimension is - not available

Performance improvements

Much faster transform() function, caching proj4 objects

Removed automatic call to fix_geometry_columns() in - AddGeometryColumns() and update_geometry_stats()

JDBC2 works

Makefile improvements

JTS support improvements

Improved regression test system

Basic consistency check method for geometry collections

Support for (Hex)(E)wkb

Autoprobing DriverWrapper for HexWKB / EWKT switching

fix compile problems in ValueSetter for ancient jdk - releases.

fix EWKT constructors to accept SRID=4711; representation

added preliminary read-only support for java2d geometries

Other new things

Full autoconf-based configuration, with PostgreSQL source - dependency relief

GEOS C-API support (2.2.0 and higher)

Initial support for topology modelling

Debian and RPM specfiles

New lwpostgis_upgrade.sql script

Other changes

JTS support improvements

Stricter mapping between DBF and SQL integer and string - attributes

Wider and cleaner regression test suite

old jdbc code removed from release

obsoleted direct use of postgis_proc_upgrade.pl

scripts version unified with release version

A.22. Release 1.0.6

Release date: 2005/12/06

Contains a few bug fixes and improvements.

Upgrading

If you are upgrading from release 1.0.3 or later you - DO NOT need a dump/reload.

If you are upgrading from a release between 1.0.0RC6 - and 1.0.2 (inclusive) and really want a live upgrade read - the upgrade section of the - 1.0.3 release notes chapter.

Upgrade from any release prior to 1.0.0RC6 requires an hard upgrade.

Bug fixes

Fixed palloc(0) call in collection deserializer (only gives - problem with --enable-cassert)

Fixed bbox cache handling bugs

Fixed geom_accum(NULL, NULL) segfault

Fixed segfault in addPoint()

Fixed short-allocation in lwcollection_clone()

Fixed bug in segmentize()

Fixed bbox computation of SnapToGrid output

Improvements

Initial support for postgresql 8.2

Added missing SRID mismatch checks in GEOS ops

A.23. Release 1.0.5

Release date: 2005/11/25

Contains memory-alignment fixes in the library, a segfault fix in - loader's handling of UTF8 attributes and a few improvements and - cleanups.

[Note]

Return code of shp2pgsql changed from previous releases to - conform to unix standards (return 0 on success).

Upgrading

If you are upgrading from release 1.0.3 or later you - DO NOT need a dump/reload.

If you are upgrading from a release between 1.0.0RC6 - and 1.0.2 (inclusive) and really want a live upgrade read - the upgrade section of the - 1.0.3 release notes chapter.

Upgrade from any release prior to 1.0.0RC6 requires an hard upgrade.

Library changes

Fixed memory alignment problems

Fixed computation of null values fraction in analyzer

Fixed a small bug in the getPoint4d_p() low-level - function

Speedup of serializer functions

Fixed a bug in force_3dm(), force_3dz() and force_4d()

Loader changes

Fixed return code of shp2pgsql

Fixed back-compatibility issue in loader (load of null - shapefiles)

Fixed handling of trailing dots in dbf numerical - attributes

Segfault fix in shp2pgsql (utf8 encoding)

Other changes

Schema aware postgis_proc_upgrade.pl, support for pgsql - 7.2+

New "Reporting Bugs" chapter in manual

A.24. Release 1.0.4

Release date: 2005/09/09

Contains important bug fixes and a few improvements. In - particular, it fixes a memory leak preventing successful build of GiST - indexes for large spatial tables.

Upgrading

If you are upgrading from release 1.0.3 you DO - NOT need a dump/reload.

If you are upgrading from a release between 1.0.0RC6 - and 1.0.2 (inclusive) and really want a live upgrade read - the upgrade section of the - 1.0.3 release notes chapter.

Upgrade from any release prior to 1.0.0RC6 requires an hard upgrade.

Bug fixes

Memory leak plugged in GiST indexing

Segfault fix in transform() handling of proj4 errors

Fixed some proj4 texts in spatial_ref_sys (missing +proj)

Loader: fixed string functions usage, reworked NULL objects - check, fixed segfault on MULTILINESTRING input.

Fixed bug in MakeLine dimension handling

Fixed bug in translate() corrupting output bounding box

Improvements

Documentation improvements

More robust selectivity estimator

Minor speedup in distance()

Minor cleanups

GiST indexing cleanup

Looser syntax acceptance in box3d parser

A.25. Release 1.0.3

Release date: 2005/08/08

Contains some bug fixes - including a severe one - affecting correctness of stored geometries - and a few - improvements.

Upgrading

Due to a bug in a bounding box computation routine, the upgrade - procedure requires special attention, as bounding boxes cached in the - database could be incorrect.

An hard upgrade procedure - (dump/reload) will force recomputation of all bounding boxes (not - included in dumps). This is required if upgrading - from releases prior to 1.0.0RC6.

If you are upgrading from versions 1.0.0RC6 or up, this release - includes a perl script (utils/rebuild_bbox_caches.pl) to force - recomputation of geometries' bounding boxes and invoke all operations - required to propagate eventual changes in them (geometry statistics - update, reindexing). Invoke the script after a make install (run with - no args for syntax help). Optionally run utils/postgis_proc_upgrade.pl - to refresh postgis procedures and functions signatures (see Soft upgrade).

Bug fixes

Severe bugfix in lwgeom's 2d bounding box computation

Bugfix in WKT (-w) POINT handling in loader

Bugfix in dumper on 64bit machines

Bugfix in dumper handling of user-defined queries

Bugfix in create_undef.pl script

Improvements

Small performance improvement in canonical input function

Minor cleanups in loader

Support for multibyte field names in loader

Improvement in the postgis_restore.pl script

New rebuild_bbox_caches.pl util script

A.26. Release 1.0.2

Release date: 2005/07/04

Contains a few bug fixes and improvements.

Upgrading

If you are upgrading from release 1.0.0RC6 or up you - DO NOT need a dump/reload.

Upgrading from older releases requires a dump/reload. See the - upgrading chapter for more - informations.

Bug fixes

Fault tolerant btree ops

Memory leak plugged in pg_error

Rtree index fix

Cleaner build scripts (avoided mix of CFLAGS and - CXXFLAGS)

Improvements

New index creation capabilities in loader (-I switch)

Initial support for postgresql 8.1dev

A.27. Release 1.0.1

Release date: 2005/05/24

Contains a few bug fixes and some improvements.

Upgrading

If you are upgrading from release 1.0.0RC6 or up you - DO NOT need a dump/reload.

Upgrading from older releases requires a dump/reload. See the - upgrading chapter for more - informations.

Library changes

BUGFIX in 3d computation of length_spheroid()

BUGFIX in join selectivity estimator

Other changes/additions

BUGFIX in shp2pgsql escape functions

better support for concurrent postgis in multiple schemas

documentation fixes

jdbc2: compile with "-target 1.2 -source 1.2" by default

NEW -k switch for pgsql2shp

NEW support for custom createdb options in - postgis_restore.pl

BUGFIX in pgsql2shp attribute names unicity enforcement

BUGFIX in Paris projections definitions

postgis_restore.pl cleanups

A.28. Release 1.0.0

Release date: 2005/04/19

Final 1.0.0 release. Contains a few bug fixes, some improvements - in the loader (most notably support for older postgis versions), and - more docs.

Upgrading

If you are upgrading from release 1.0.0RC6 you DO - NOT need a dump/reload.

Upgrading from any other precedent release requires a - dump/reload. See the upgrading - chapter for more informations.

Library changes

BUGFIX in transform() releasing random memory address

BUGFIX in force_3dm() allocating less memory then - required

BUGFIX in join selectivity estimator (defaults, leaks, - tuplecount, sd)

Other changes/additions

BUGFIX in shp2pgsql escape of values starting with tab or - single-quote

NEW manual pages for loader/dumper

NEW shp2pgsql support for old (HWGEOM) postgis versions

NEW -p (prepare) flag for shp2pgsql

NEW manual chapter about OGC compliancy enforcement

NEW autoconf support for JTS lib

BUGFIX in estimator testers (support for LWGEOM and schema - parsing)

A.29. Release 1.0.0RC6

Release date: 2005/03/30

Sixth release candidate for 1.0.0. Contains a few bug fixes and - cleanups.

Upgrading

You need a dump/reload to upgrade from precedent releases. See - the upgrading chapter for more - informations.

Library changes

BUGFIX in multi()

early return [when noop] from multi()

Scripts changes

dropped {x,y}{min,max}(box2d) functions

Other changes

BUGFIX in postgis_restore.pl scrip

BUGFIX in dumper's 64bit support

A.30. Release 1.0.0RC5

Release date: 2005/03/25

Fifth release candidate for 1.0.0. Contains a few bug fixes and a - improvements.

Upgrading

If you are upgrading from release 1.0.0RC4 you DO - NOT need a dump/reload.

Upgrading from any other precedent release requires a - dump/reload. See the upgrading - chapter for more informations.

Library changes

BUGFIX (segfaulting) in box3d computation (yes, - another!).

BUGFIX (segfaulting) in estimated_extent().

Other changes

Small build scripts and utilities refinements.

Additional performance tips documented.

A.31. Release 1.0.0RC4

Release date: 2005/03/18

Fourth release candidate for 1.0.0. Contains bug fixes and a few - improvements.

Upgrading

You need a dump/reload to upgrade from precedent releases. See - the upgrading chapter for more - informations.

Library changes

BUGFIX (segfaulting) in geom_accum().

BUGFIX in 64bit architectures support.

BUGFIX in box3d computation function with collections.

NEW subselects support in selectivity estimator.

Early return from force_collection.

Consistency check fix in SnapToGrid().

Box2d output changed back to 15 significant digits.

Scripts changes

NEW distance_sphere() function.

Changed get_proj4_from_srid implementation to use PL/PGSQL - instead of SQL.

Other changes

BUGFIX in loader and dumper handling of MultiLine shapes

BUGFIX in loader, skipping all but first hole of - polygons.

jdbc2: code cleanups, Makefile improvements

FLEX and YACC variables set *after* pgsql Makefile.global is - included and only if the pgsql *stripped* version evaluates to the - empty string

Added already generated parser in release

Build scripts refinements

improved version handling, central Version.config

improvements in postgis_restore.pl

A.32. Release 1.0.0RC3

Release date: 2005/02/24

Third release candidate for 1.0.0. Contains many bug fixes and - improvements.

Upgrading

You need a dump/reload to upgrade from precedent releases. See - the upgrading chapter for more - informations.

Library changes

BUGFIX in transform(): missing SRID, better error - handling.

BUGFIX in memory alignment handling

BUGFIX in force_collection() causing mapserver connector - failures on simple (single) geometry types.

BUGFIX in GeometryFromText() missing to add a bbox cache.

reduced precision of box2d output.

prefixed DEBUG macros with PGIS_ to avoid clash with pgsql - one

plugged a leak in GEOS2POSTGIS converter

Reduced memory usage by early releasing query-context palloced - one.

Scripts changes

BUGFIX in 72 index bindings.

BUGFIX in probe_geometry_columns() to work with PG72 and support - multiple geometry columns in a single table

NEW bool::text cast

Some functions made IMMUTABLE from STABLE, for performance - improvement.

JDBC changes

jdbc2: small patches, box2d/3d tests, revised docs and - license.

jdbc2: bug fix and testcase in for pgjdbc 8.0 type - autoregistration

jdbc2: Removed use of jdk1.4 only features to enable build with - older jdk releases.

jdbc2: Added support for building against pg72jdbc2.jar

jdbc2: updated and cleaned makefile

jdbc2: added BETA support for jts geometry classes

jdbc2: Skip known-to-fail tests against older PostGIS - servers.

jdbc2: Fixed handling of measured geometries in EWKT.

Other changes

new performance tips chapter in manual

documentation updates: pgsql72 requirement, lwpostgis.sql

few changes in autoconf

BUILDDATE extraction made more portable

fixed spatial_ref_sys.sql to avoid vacuuming the whole - database.

spatial_ref_sys: changed Paris entries to match the ones - distributed with 0.x.

A.33. Release 1.0.0RC2

Release date: 2005/01/26

Second release candidate for 1.0.0 containing bug fixes and a few - improvements.

Upgrading

You need a dump/reload to upgrade from precedent releases. See - the upgrading chapter for more - informations.

Library changes

BUGFIX in pointarray box3d computation

BUGFIX in distance_spheroid definition

BUGFIX in transform() missing to update bbox cache

NEW jdbc driver (jdbc2)

GEOMETRYCOLLECTION(EMPTY) syntax support for backward - compatibility

Faster binary outputs

Stricter OGC WKB/WKT constructors

Scripts changes

More correct STABLE, IMMUTABLE, STRICT uses in - lwpostgis.sql

stricter OGC WKB/WKT constructors

Other changes

Faster and more robust loader (both i18n and not)

Initial autoconf script

A.34. Release 1.0.0RC1

Release date: 2005/01/13

This is the first candidate of a major postgis release, with - internal storage of postgis types redesigned to be smaller and faster on - indexed queries.

Upgrading

You need a dump/reload to upgrade from precedent releases. See - the upgrading chapter for more - informations.

Changes

Faster canonical input parsing.

Lossless canonical output.

EWKB Canonical binary IO with PG>73.

Support for up to 4d coordinates, providing lossless - shapefile->postgis->shapefile conversion.

New function: UpdateGeometrySRID(), AsGML(), SnapToGrid(), - ForceRHR(), estimated_extent(), accum().

Vertical positioning indexed operators.

JOIN selectivity function.

More geometry constructors / editors.

PostGIS extension API.

UTF8 support in loader.

diff -Nru postgis-1.5.3/doc/html/style.css postgis-2.0.1/doc/html/style.css --- postgis-1.5.3/doc/html/style.css 2009-12-02 23:25:21.000000000 +0000 +++ postgis-2.0.1/doc/html/style.css 2012-03-23 13:16:11.000000000 +0000 @@ -47,3 +47,4 @@ .styledtable table thead th { border-right-width: 0px; border-left-width: 0px; border-bottom-width: 1px; border-top-width: 0px; border-color: #f7931e; border-style: solid; } .styledtable > table { border-right-width: 0px; border-left-width: 0px; border-bottom-width: 2px; border-top-width: 2px; border-color: #f7931e; border-style: solid; } .styledtable table td,th { color: #000000; font-style: italic; padding-right:10px; padding-left:10px; border-right-width: 0px; border-left-width: 0px; border-bottom-width: 2px; border-top-width: 2px; border-width: 0px;} +.pdparam {color: #990000} diff -Nru postgis-1.5.3/doc/installation.xml postgis-2.0.1/doc/installation.xml --- postgis-1.5.3/doc/installation.xml 2011-06-09 20:31:30.000000000 +0000 +++ postgis-2.0.1/doc/installation.xml 2012-06-16 17:47:33.000000000 +0000 @@ -1,5 +1,5 @@ - + Installation @@ -8,32 +8,32 @@ Short Version - + The raster support is currently optional, but installed by default. For installing using the PostgreSQL 9.1+ extensions model it is required. + Please refer to if you are using PostgreSQL 9.1+. + All the .sql files once installed will be installed in share/contrib/postgis-&last_release_version; folder + of your PostgreSQL install + The postgis_comments.sql, raster_comments.sql, topology_comments.sql + generate quick help tips for each function that can be accessed via pgAdmin III or psql. In psql with a command of the form e.g.\dd ST_SetPoint tar xvfz postgis-&last_release_version;.tar.gz cd postgis-&last_release_version; -./configure +./configure --with-raster --with-topology --with-gui make make install -#BEGIN OPTIONAL -- this is already part of the tar -# only really need this if installing from SVN -cd doc/ -make comments-install -#END OPTIONAL createdb yourdatabase createlang plpgsql yourdatabase psql -d yourdatabase -f postgis.sql psql -d yourdatabase -f postgis_comments.sql -psql -d yourdatabase -f spatial_ref_sys.sql - - - - NOTE: The postgis.sql and spatial_ref_sys.sql will be installed in the - /share/contrib/postgis-&last_minor_release_version; - of your PostGIS install. If you didn't install the OPTIONAL comments section, you will need to manually copy the - postgis_comments.sql file from the doc folder of your source install to your /share/contrib/postgis-&last_minor_release_version; - folder. - - +psql -d yourdatabase -f spatial_ref_sys.sql +psql -d yourdatabase -f rtpostgis.sql +psql -d yourdatabase -f raster_comments.sql +psql -d yourdatabase -f topology/topology.sql +psql -d yourdatabase -f doc/topology_comments.sql + + +topology_comments.sql since its an optional feature is not installed by make install or make comments install. However if +you do a make comments or make topology_comments.sql, it will be generated in the docs folder + + The rest of this chapter goes into detail each of the above installation steps. @@ -54,8 +54,9 @@ - PostgreSQL 8.3 or higher. A complete installation of PostgreSQL - (including server headers) is required. PostgreSQL is available from + PostgreSQL &min_postgres_version; or higher. A complete installation + of PostgreSQL (including server headers) is required. PostgreSQL + is available from http://www.postgresql.org @@ -98,18 +99,14 @@ - GEOS geometry library, version 3.1.1 or greater, but GEOS 3.2 is recommended. Without GEOS 3.2, - you will be missing some major enhancements with handling of topological exceptions and improvements to ST_Buffer that allow beveling and mitre and much faster buffering. The GEOS library is - used to provide geometry tests (ST_Touches(), ST_Contains(), - ST_Intersects()) and operations (ST_Buffer(), ST_Union(),ST_Intersection() - ST_Difference()) within PostGIS. GEOS is available for download from + GEOS geometry library, version 3.2.2 or greater, but GEOS 3.3.2+ is recommended. Without GEOS 3.3, + you will be missing some major enhancements with handling of topological exceptions and improvements to geometry validation and + making geometries valid such as ST_ValidDetail and ST_MakeValid. GEOS 3.3.2+ is also required for topology support. GEOS is available for download from http://trac.osgeo.org/geos/ - - . + and 3.3+ is backward-compatible with older versions so fairly safe to upgrade. - LibXML2, version 2.5.x or higher. LibXML2 is currently used in some imports @@ -117,6 +114,20 @@ http://xmlsoft.org/downloads.html. + + + JSON-C, version 0.9 or higher. JSON-C is currently used to import GeoJSON via the + function ST_GeomFromGeoJson. JSON-C is available for download from + http://oss.metaparadigm.com/json-c/. + + + + + + GDAL, version 1.6 or higher (1.9 or higher is preferable since some things will not work well with lower versions). This is needed for raster support and will be required in final release of PostGIS 2.0. + http://trac.osgeo.org/gdal/wiki/DownloadSource. + + @@ -136,10 +147,10 @@ - CUnit (CUnit). This is needed for regression tests. http://cunit.sourceforge.net/ + CUnit (CUnit). This is needed for regression testing. http://cunit.sourceforge.net/ - + Apache Ant (ant) is required for building any of @@ -208,7 +219,7 @@ Alternatively, checkout the source from the - + svn repository @@ -236,14 +247,19 @@ In many cases compilation is only necessary if you want the most bleeding edge versions or you are a package maintainer. + This section includes general compilation instructions, if you are compiling for Windows etc + or another OS, you may find additional more detailed help at PostGIS User contributed compile/install guides and PostGIS Dev Wiki. + If you are a windows user, you can get stable builds via Stackbuilder or PostGIS Windows download site + We also have very bleeding-edge windows experimental builds that are built usually once or twice a week or whenever anything exciting happens. You can + use these to experiment with the in progress releases of PostGIS The PostGIS module is an extension to the PostgreSQL backend server. As such, PostGIS &last_release_version; requires full PostgreSQL server headers access in order to compile. It can be built - against PostgreSQL versions 8.3 or higher. Earlier versions of - PostgreSQL are not supported. + against PostgreSQL versions &min_postgres_version; or higher. Earlier + versions of PostgreSQL are not supported. @@ -277,7 +293,7 @@ Windows or Mac. - + Configuration @@ -307,7 +323,7 @@ - --prefix=PREFIX + --prefix=PREFIX This is the location the PostGIS libraries and SQL scripts will be @@ -317,10 +333,10 @@ - This paramater is currently broken, as the package will only + This parameter is currently broken, as the package will only install into the PostgreSQL installation directory. Visit - - http://trac.osgeo.org/postgis/ticket/160 + + http://trac.osgeo.org/postgis/ticket/635 to track this bug. @@ -329,7 +345,7 @@ - --with-pgconfig=FILE + --with-pgconfig=FILE PostgreSQL provides a utility called pg_config @@ -341,9 +357,23 @@ + + + --with-gdalconfig=FILE + + + GDAL, a required library, provides functionality needed for raster support + gdal-config to enable software installations to + locate the GDAL installation directory. Use this parameter + (--with-gdalconfig=/path/to/gdal-config) to + manually specify a particular GDAL installation that PostGIS will + build against. + + + - --with-geosconfig=FILE + --with-geosconfig=FILE GEOS, a required geometry library, provides a utility called @@ -355,9 +385,27 @@ + + + --with-xml2config=FILE + + + LibXML is the library required for doing GeomFromKML/GML processes. + It normally is found if you have libxml installed, but if not or you want + a specific version used, you'll need to point PostGIS at a specific + xml2-config confi file to enable software installations to + locate the LibXML installation directory. Use this parameter + (>--with-xml2config=/path/to/xml2-config) to + manually specify a particular LibXML installation that PostGIS will + build against. + + + + + - --with-projdir=DIR + --with-projdir=DIR Proj4 is a reprojection library required by PostGIS. Use this @@ -367,6 +415,28 @@ + + + --with-libiconv=DIR + + + Directory where iconv is installed. + + + + + + --with-jsondir=DIR + + + JSON-C is an MIT-licensed JSON library required by PostGIS ST_GeomFromJSON support. Use this + parameter (--with-jsondir=/path/to/jsondir) to + manually specify a particular JSON-C installation directory that + PostGIS will build against. + + + + --with-gui @@ -376,6 +446,35 @@ + + --with-raster + + + Compile with raster support. This will build rtpostgis-&last_release_version; library and rtpostgis.sql file. This may not + be required in final release as plan is to build in raster support by default. + + + + + --with-topology + + + Compile with topology support. This will build the topology.sql file. There is no corresponding library + as all logic needed for topology is in postgis-&last_release_version; library. + + + + + --with-gettext=no + + + By default PostGIS will try to detect gettext support and compile with it, however if you run into incompatibility issues that + cause breakage of loader, you can disable it entirely with this command. Refer to ticket http://trac.osgeo.org/postgis/ticket/748 for an example issue solved by configuring with this. + NOTE: that you aren't missing much by turning this off. This is used for international help/label support for the GUI loader which is not yet documented + and still experimental. + + + @@ -392,7 +491,7 @@ This script will generate the configure script that - in turn is used to customize the intallation of PostGIS. + in turn is used to customize the installation of PostGIS. @@ -423,15 +522,101 @@ As of PostGIS v1.4.0, all the functions have comments generated from the documentation. If you wish to install these comments into your spatial - databases later, run the command which requires docbook. The postgis_comments.sql - is also packaged in the tar.gz distribution in the doc folder so no need to make comments + databases later, run the command which requires docbook. The postgis_comments.sql and other + package comments files raster_comments.sql, topology_comments.sql are + also packaged in the tar.gz distribution in the doc folder so no need to make comments if installing from the tar ball. make comments + + + Introduced in PostGIS 2.0. This generates html cheat sheets suitable for quick reference or for student handouts. + This requires xsltproc to build and will generate 4 files in doc folder topology_cheatsheet.html, tiger_geocoder_cheatsheet.html, + raster_cheatsheet.html, postgis_cheatsheet.html + + You can download some pre-built ones available in html and pdf from PostGIS / PostgreSQL Study Guides + + + make cheatsheets + + + + Building PostGIS Extensions and Deploying them + + + The PostGIS extensions are built and installed automatically if you are using PostgreSQL 9.1+. + + If you are building from source repository, you need to build the function descriptions first. These get built if you have docbook installed. You can also manually build with the statement: + make comments + Building the comments is not necessary if you are building from a release tar ball since these are packaged pre-built with the tar ball already. + If you are building against PostgreSQL 9.1, the extensions should automatically build as part of the make install process. You can if needed build from the extensions + folders or copy files if you need them on a different server. + cd extensions +cd postgis +make clean +make +make install +cd .. +cd postgis_topology +make clean +make +make install + + The extension files will always be the same for the same version of PostGIS regardless of OS, so it is fine to copy over the extension files from one OS to another as long as you + have the PostGIS binaries already installed on your servers. + If you want to install the extensions manually on a separate server different from your development, + You need to copy the following files from the extensions folder into the PostgreSQL / share / extension folder + of your PostgreSQL install as well as the needed binaries for regular PostGIS if you don't have them already on the server. + + + + + + These are the control files that denote information such as the version of the extension to install if not specified. + postgis.control, postgis_topology.control. + + + + + All the files in the /sql folder of each extension. Note that these need to be copied to the root of the PostgreSQL share/extension folder + extensions/postgis/sql/*.sql, extensions/postgis_topology/sql/*.sql + + + + Once you do that, you should see postgis, postgis_topology as available extensions in PgAdmin -> extensions. + If you are using psql, you can verify that the extensions are installed by running this query: + SELECT name, default_version,installed_version +FROM pg_available_extensions WHERE name LIKE 'postgis%' ; + name | default_version | installed_version +-----------------+-----------------+------------------- +postgis | &last_release_version; | &last_release_version; +postgis_topology | &last_release_version; | + +If you have the extension installed in the database you are querying, you'll see mention in the installed_version column. +If you get no records back, it means you don't have postgis extensions installed on the server at all. PgAdmin III 1.14+ will also provide this information +in the extensions section of the database browser tree and will even allow upgrade or uninstall by right-clicking. + +If you have the extensions available, you can install postgis extension in your database of choice by either using pgAdmin extension interface or running these sql commands: +CREATE EXTENSION postgis; +CREATE EXTENSION postgis_topology; + +Extension tables spatial_ref_sys, layer, topology can not be explicitly backed up. They can only +be backed up when the respective postgis or postgis_topology extension is backed up, which only seems to happen when you backup the whole database. +As of PostGIS 2.0.1, only srid records not packaged with PostGIS are backed up when the database is backed up so don't go around changing srids we package and expect your changes to be there. Put in a ticket if you find an issue. The structures of extension tables are never backed up since they are created with CREATE EXTENSION +and assumed to be the same for a given version of an extension. These behaviors are built into the current PostgreSQL extension model, so nothing we can do about it. + +If you installed &last_release_version;, without using our wonderful extension system, you can change it to be extension based by first upgrading to the latest micro version running the upgrade scripts: postgis_upgrade_20_minor.sql,raster_upgrade_20_minor.sql,topology_upgrade_20_minor.sql. +If you installed postgis without raster support, you'll need to install raster support first (using the full rtpostgis.sql +Then you can run teh below commands to package the functions in their respective extension. +CREATE EXTENSION postgis FROM unpackaged; +CREATE EXTENSION postgis_topology FROM unpackaged; + + + Testing @@ -463,19 +648,15 @@ PATH and PGPORT environment variables when performing the checks - it does not use the PostgreSQL version that may have been specified using the - configuration paramter --with-pgconfig. So make + configuration parameter --with-pgconfig. So make sure to modify your PATH to match the detected PostgreSQL installation during configuration or be prepared to deal with the impending - headaches. Visit - - http://trac.osgeo.org/postgis/ticket/186 - - to track this bug. + headaches. - If successful, the output of the test should be similiar to the + If successful, the output of the test should be similar to the following: @@ -483,35 +664,59 @@ http://cunit.sourceforge.net/ +Suite: print_suite + Test: test_lwprint_default_format ... passed + Test: test_lwprint_format_orders ... passed + Test: test_lwprint_optional_format ... passed + Test: test_lwprint_oddball_formats ... passed + Test: test_lwprint_bad_formats ... passed +Suite: Misc Suite + Test: test_misc_force_2d ... passed + Test: test_misc_simplify ... passed + Test: test_misc_count_vertices ... passed + Test: test_misc_area ... passed + Test: test_misc_wkb ... passed +Suite: PointArray Suite + Test: test_ptarray_append_point ... passed + Test: test_ptarray_append_ptarray ... passed Suite: PostGIS Computational Geometry Suite - Test: test_lw_segment_side() ... passed - Test: test_lw_segment_intersects() ... passed - Test: test_lwline_crossing_short_lines() ... passed - Test: test_lwline_crossing_long_lines() ... passed - Test: test_lwpoint_set_ordinate() ... passed - Test: test_lwpoint_get_ordinate() ... passed - Test: test_lwpoint_interpolate() ... passed - Test: test_lwline_clip() ... passed - Test: test_lwline_clip_big() ... passed - Test: test_lwmline_clip() ... passed - Test: test_geohash_point() ... passed - Test: test_geohash_precision() ... passed - Test: test_geohash() ... passed + Test: test_lw_segment_side ... passed + Test: test_lw_segment_intersects ... passed + Test: test_lwline_crossing_short_lines ... passed + Test: test_lwline_crossing_long_lines ... passed + Test: test_lwline_crossing_bugs ... passed + Test: test_lwpoint_set_ordinate ... passed + Test: test_lwpoint_get_ordinate ... passed + Test: test_point_interpolate ... passed + Test: test_lwline_clip ... passed + Test: test_lwline_clip_big ... passed + Test: test_lwmline_clip ... passed + Test: test_geohash_point ... passed + Test: test_geohash_precision ... passed + Test: test_geohash ... passed + Test: test_isclosed ... passed Suite: PostGIS Measures Suite - Test: test_mindistance2d_recursive_tolerance() ... passed - + Test: test_mindistance2d_tolerance ... passed + Test: test_rect_tree_contains_point ... passed + Test: test_rect_tree_intersects_tree ... passed + Test: test_lwgeom_segmentize2d ... passed +Suite: WKT Out Suite + Test: test_wkt_out_point ... passed + Test: test_wkt_out_linestring ... passed + Test: test_wkt_out_polygon ... passed + Test: test_wkt_out_multipoint ... passed + Test: test_wkt_out_multilinestring ... passed +: +: --Run Summary: Type Total Ran Passed Failed - suites 2 2 n/a 0 - tests 14 14 14 0 - asserts 84 84 84 0 + suites 17 17 n/a 0 + tests 143 143 143 0 + asserts 1228 1228 1228 0 Creating spatial db postgis_reg -TMPDIR is /tmp/pgis_reg_15328 - - PostgreSQL 8.3.7 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-44) - Postgis 1.4.0SVN - 2009-05-25 20:21:55 - GEOS: 3.1.0-CAPI-1.5.0 + Postgis 2.0.0SVN - 2011-01-11 15:33:37 + GEOS: 3.3.0-CAPI-1.7.0 PROJ: Rel. 4.6.1, 21 August 2008 Running tests @@ -538,7 +743,6 @@ simplify. ok snaptogrid. ok affine. ok - wkt. ok measures. ok long_xact. ok ctors. ok @@ -549,18 +753,33 @@ sql-mm-general. ok sql-mm-multicurve. ok sql-mm-multisurface. ok - geojson. ok - gml. ok - svg. ok - kml. ok + polyhedralsurface. ok + out_geometry. ok + out_geography. ok + in_gml. ok + in_kml. ok + iscollection. ok regress_ogc. ok - regress_bdpoly. ok - regress_proj. ok regress_ogc_cover. ok regress_ogc_prep. ok - -Run tests: 42 -Failed: 0 + regress_bdpoly. ok + regress_proj. ok + dump. ok + dumppoints. ok + wmsservers_new. ok + tickets. ok + remove_repeated_points. ok + split. ok + relatematch. ok + regress_buffer_params. ok + hausdorff. ok + clean. ok + sharedpaths. ok + snap. ok + +Run tests: 55 +Failed: 0 + @@ -605,7 +824,7 @@ If you previously ran the make comments command to - generate the postgis_comments.sql file, install the + generate the postgis_comments.sql, raster_comments.sql file, install the sql file by running @@ -615,7 +834,7 @@ - postgis_comments.sql was separated from the + postgis_comments.sql, raster_comments.sql, topology_comments.sql was separated from the typical build and installation targets since with it comes the extra dependency of xsltproc. @@ -623,8 +842,8 @@ - - Create a spatially-enabled database + + Create a spatially-enabled database on PostgreSQL lower than 9.1 The first step in creating a PostGIS database is to create a simple @@ -639,7 +858,7 @@ Many of the PostGIS functions are written in the PL/pgSQL procedural language. As such, the next step to create a PostGIS database is to enable the PL/pgSQL language in your new database. This is accomplish by the - command + command below command. For PostgreSQL 8.4+, this is generally already installed @@ -678,6 +897,166 @@ psql -d [yourdatabase] -f postgis_comments.sql + + + Install raster support + + + + psql -d [yourdatabase] -f rtpostgis.sql + + + + Install raster support comments. This will provide quick help info for each raster function + using psql or PgAdmin or any other PostgreSQL tool that can show function comments + + + + psql -d [yourdatabase] -f raster_comments.sql + + + Install topology support + + + + psql -d [yourdatabase] -f topology/topology.sql + + + + Install topology support comments. This will provide quick help info for each topology function / type + using psql or PgAdmin or any other PostgreSQL tool that can show function comments + + + + psql -d [yourdatabase] -f topology/topology_comments.sql + + + If you plan to restore an old backup from prior versions in this new db, run: + psql -d [yourdatabase] -f legacy.sql + There is an alternative legacy_minimal.sql you can run instead which will install barebones needed to recover tables and work with apps like MapServer + and GeoServer. If you have views that use things like distance / length etc, you'll need the full blown legacy.sql + + You can later run uninstall_legacy.sql to get rid of the deprecated functions after you are done with restoring and cleanup. + + + + Creating a spatial database using EXTENSIONS + + + If you are using PostgreSQL 9.1+ and have compiled and installed the extensions/ postgis modules, you + can create a spatial database the new way. + + + + createdb [yourdatabase] + + + + The core postgis extension installs PostGIS geometry, geography, raster, spatial_ref_sys and all the functions and comments with a simple: + CREATE EXTENSION postgis; command. + + + + psql -d [yourdatabase] -c "CREATE EXTENSION postgis;" + + + + Topology is packaged as a separate extension and installable with command: + + + + psql -d [yourdatabase] -c "CREATE EXTENSION postgis_topology;" + + + If you plan to restore an old backup from prior versions in this new db, run: + psql -d [yourdatabase] -f legacy.sql + + You can later run uninstall_legacy.sql to get rid of the deprecated functions after you are done with restoring and cleanup. + + + + Installing, Upgrading Tiger Geocoder and loading data + + The Tiger geocoder does not get installed / upgraded with the core PostGIS scripts because it is only of regional use. In fact nothing located + in the extras folder is installed by default with the regular PostGIS install / upgrade. Extras like Tiger geocoder may also not be packaged in your PostGIS distribution, but will always be available in the postgis-&last_release_version;.tar.gz file. The instructions provided here are also available in the extras/tiger_geocoder/tiger_2010/README + If you are on Windows and you don't have tar installed, you can use http://www.7-zip.org/ to unzip the PostGIS tarball. + + Tiger Geocoder Enabling your PostGIS database + + First install PostGIS using the prior instructions. + + + + If you don't have an extras folder, download http://www.postgis.org/download/postgis-&last_release_version;.tar.gz + + + + tar xvfz postgis-&last_release_version;.tar.gz + + + + cd postgis-&last_release_version;/extras/tiger_geocoder/tiger_2010 + + + Edit the tiger_loader.sql to the paths of your executables server etc. + If you are installing Tiger geocoder for the first time edit either the create_geocode.bat script If you are on windows + or the create_geocode.sh if you are on Linux/Unix/Mac OSX with your PostgreSQL specific settings and run the corresponding script from the commandline. If you don't edit this file, it will just contain common case locations of items. You can edit the generated script after the fact when you run the command. + + Verify that you now have a tiger schema in your database and that it is part of your database search_path. If it is not, add it with a command something along the line of: ALTER DATABASE geocoder SET search_path=public, tiger; + The normalizing address functionality works more or less without any data except for tricky addresses. Run this test and verify things look like this: + SELECT pprint_addy(normalize_address('202 East Fremont Street, Las Vegas, Nevada 89101')) As pretty_address; +pretty_address +--------------------------------------- +202 E Fremont St, Las Vegas, NV 89101 + + + + + Upgrading your Tiger Geocoder Install + + If you have Tiger Geocoder packaged with 2.0 already installed, you can upgrade the functions at any time even from an interim tar ball if there are fixes you badly need. + + + + If you don't have an extras folder, download http://www.postgis.org/download/postgis-&last_release_version;.tar.gz + + + + tar xvfz postgis-&last_release_version;.tar.gz + + + + cd postgis-&last_release_version;/extras/tiger_geocoder/tiger_2010 + + + Locate the upgrade_geocoder.bat script If you are on windows + or the upgrade_geocoder.sh if you are on Linux/Unix/Mac OSX. Edit the file to have your postgis database credientials and run then corresponding script from the commandline. + + + + + Loading Tiger Data + The instructions for loading data are available in a more detailed form in the extras/tiger_geocoder/tiger_2010/README. This just includes the general steps. + The load process downloads data from the census website for the respective states requested, extracts the files, and then loads each state into its own separate + set of state tables. Each state table inherits from the tables defined in tiger schema so that its sufficient to just query those tables to access all the data and drop a set of state tables at any time using the if you need to reload a state or just don't need a state anymore. + In order to be able to load data you'll need the following tools: + + A tool to unzip the zip files from census website. + For Unix like systems: unzip executable which is usually already installed on most Unix like platforms. + For Windows, 7-zip which is a free compress/uncompress tool you can download from http://www.7-zip.org/ + + shp2pgsql commandline which is installed by default when you install PostGIS. + wget which is a web grabber tool usually installed on most Unix/Linux systems. + If you are on windows, you can get pre-compiled binaries from http://gnuwin32.sourceforge.net/packages/wget.htm + + + To load data refer to to generate a data load script for your platform for the states you desire. + Note that you can install these piecemeal. You don't have to load all the states you want all at once. You can load them as you need them. + + After the states you desire have been loaded, make sure to run the: + SELECT install_missing_indexes(); as described in . + To test that things are working as they should, try to run a geocode on an address in your state using + @@ -722,49 +1101,77 @@ PostGIS provides a SOFT UPGRADE procedure for minor or bugfix releases, - and an HARD UPGRADE procedure for major releases. + and a HARD UPGRADE procedure for major releases. - Before attempting to upgrade postgis, it is always worth to backup your + Before attempting to upgrade PostGIS, it is always worth to backup your data. If you use the -Fc flag to pg_dump you will always be able to - restore the dump with an HARD UPGRADE. + restore the dump with a HARD UPGRADE. Soft upgrade + If you installed your database using extensions, you'll need to upgrade using the extension model as well. If you installed using the old sql script way, + then you should upgrade using the sql script way. Please refer to the appropriate. + + Soft Upgrade Pre 9.1+ or without extensions + This section applies only to those who installed PostGIS not using extensions. If you have extensions and try to upgrade with this approach you'll get messages like: + can't drop ... because postgis extension depends on it After compiling you should find several postgis_upgrade*.sql files. Install the one for your version of PostGIS. For example postgis_upgrade_13_to_15.sql should be used if you are upgrading - from postgis 1.3 to 1.5. + from PostGIS 1.3 to 1.5. If you are moving from PostGIS 1.* to PostGIS 2.* or from PostGIS 2.* prior to r7409, you need to do a HARD UPGRADE. - $ psql -f postgis_upgrade_13_to_15.sql -d your_spatial_database + psql -f postgis_upgrade_20_minor.sql -d your_spatial_database - If a soft upgrade is not possible the script will abort and you will be - warned about HARD UPGRADE being required, so do not hesitate to try a - soft upgrade first. + The same procedure applies to raster and + topology extensions, with upgrade files named + rtpostgis_upgrade*.sql and + topology_upgrade*.sql respectively. + If you need them: + psql -f rtpostgis_upgrade_20_minor.sql -d your_spatial_database + psql -f topology_upgrade_20_minor.sql -d your_spatial_database + - If you can't find the postgis_upgrade*.sql files - you are probably using a version prior to 1.1 and must generate that - file by yourself. This is done with the following command: + If you can't find the postgis_upgrade*.sql specific for upgrading your version you are using a version too early for + a soft upgrade and need to do a HARD UPGRADE. - - $ utils/postgis_proc_upgrade.pl postgis.sql > postgis_upgrade.sql + + + The function + should inform you about the need to run this kind of + upgrade using a "procs need upgrade" message. + + + + Soft Upgrade 9.1+ using extensions + If you originally installed PostGIS with extensions, then you need to upgrade using extensions as well. Doing a minor upgrade with extensions, is fairly painless. + ALTER EXTENSION postgis UPDATE TO "&last_release_version;"; +ALTER EXTENSION postgis_topology UPDATE TO "&last_release_version;"; + If you get an error notice something like: + No migration path defined for ... to &last_release_version; + Then you'll need to backup your database, create a fresh one as described in and then restore your backup on top of this new database. + You might get a message that postgis extension already installed which you can safely ignore. + If you installed PostGIS originally without a version specified, you can often skip the reinstallation of postgis extension before restoring since the backup just has CREATE EXTENSION postgis and thus + picks up the newest latest version during restore. . + + Hard upgrade - By HARD UPGRADE we intend full dump/reload of postgis-enabled databases. - You need an HARD UPGRADE when postgis objects' internal storage changes + By HARD UPGRADE we mean full dump/reload of postgis-enabled databases. + You need a HARD UPGRADE when PostGIS objects' internal storage changes or when SOFT UPGRADE is not possible. The Release Notes appendix reports for each version whether you need a dump/reload (HARD @@ -772,65 +1179,139 @@ - PostGIS provides an utility script to restore a dump produced with the - pg_dump -Fc command. It is experimental so redirecting its output to a - file will help in case of problems. The procedure is as follow: + The dump/reload process is assisted by the postgis_restore.pl + script which takes care of skipping from the dump all + definitions which belong to PostGIS (including old ones), + allowing you to restore your schemas and data into a + database with PostGIS installed without getting duplicate + symbol errors or bringing forward deprecated objects. + + Supplementary instructions for windows users are available at Windows Hard upgrade. + - Create a "custom-format" dump of the database you want to upgrade (let's - call it "olddb") + The Procedure is as follows: - $ pg_dump -Fc olddb > olddb.dump + + + - Restore the dump contextually upgrading postgis into a new database. The - new database doesn't have to exist. postgis_restore accepts createdb - parameters after the dump file name, and that can for instance be used - if you are using a non-default character encoding for your database. - Let's call it "newdb", with UNICODE as the character encoding: + Create a "custom-format" dump of the database you want + to upgrade (let's call it olddb) + include binary blobs (-b) and verbose (-v) output. + The user can be the owner of the db, need not be postgres + super account. - $ sh utils/postgis_restore.pl postgis.sql newdb olddb.dump -E=UNICODE > restore.log + pg_dump -h localhost -p 5432 -U postgres -Fc -b -v -f "/somepath/olddb.backup" olddb + + + + - Check that all restored dump objects really had to be restored from dump - and do not conflict with the ones defined in postgis.sql + Do a fresh install of PostGIS in a new database -- we'll + refer to this database as newdb. + Please refer to and for + instructions on how to do this. - $ grep ^KEEPING restore.log | less + + The spatial_ref_sys entries found in your dump will be + restored, but they will not override existing ones in + spatial_ref_sys. This is to ensure that fixes in the + official set will be properly propagated to restored + databases. If for any reason you really want your own + overrides of standard entries just don't load the + spatial_ref_sys.sql file when creating the new db. + - If upgrading from PostgreSQL < 8.0 to >= 8.0 you might want to - drop the attrelid, varattnum and stats columns in the geometry_columns - table, which are no-more needed. Keeping them won't hurt. DROPPING THEM - WHEN REALLY NEEDED WILL DO HURT ! + If your database is really old or you know you've + been using long deprecated functions in your + views and functions, you might need to load + legacy.sql for all your functions + and views etc. to properly come back. + Only do this if _really_ needed. Consider upgrading your + views and functions before dumping instead, if possible. + The deprecated functions can be later removed by loading + uninstall_legacy.sql. - $ psql newdb -c "ALTER TABLE geometry_columns DROP attrelid" -$ psql newdb -c "ALTER TABLE geometry_columns DROP varattnum" -$ psql newdb -c "ALTER TABLE geometry_columns DROP stats" + + + - spatial_ref_sys table is restore from the dump, to ensure your custom - additions are kept, but the distributed one might contain modification - so you should backup your entries, drop the table and source the new - one. If you did make additions we assume you know how to backup them - before upgrading the table. Replace of it with the new one is done like - this: + Restore your backup into your fresh + newdb database using + postgis_restore.pl. + Unexpected errors, if any, will be printed to the standard + error stream by psql. Keep a log of those. - $ psql newdb -newdb=> truncate spatial_ref_sys; -TRUNCATE -newdb=> \i spatial_ref_sys.sql + perl utils/postgis_restore.pl "/somepath/olddb.backup" | psql -h localhost -p 5432 -U postgres newdb 2> errors.txt + + + + + + + Errors may arise in the following cases: + + + + + + Some of your views or functions make use of deprecated PostGIS objects. + In order to fix this you may try loading legacy.sql + script prior to restore or you'll have to restore to a + version of PostGIS which still contains those objects + and try a migration again after porting your code. + If the legacy.sql way works for you, don't forget + to fix your code to stop using deprecated functions and drop them + loading uninstall_legacy.sql. + + + + + Some custom records of spatial_ref_sys in dump file have + an invalid SRID value. Valid SRID values are bigger than 0 + and smaller than 999000. Values in the 999000.999999 range + are reserved for internal use while values > 999999 can't + be used at all. + All your custom records with invalid SRIDs will be retained, + with those > 999999 moved into the reserved range, but the + spatial_ref_sys table would loose a check constraint guarding + for that invariant to hold and possibly also its primary key + ( when multiple invalid SRIDS get converted to the same reserved + SRID value ). + + + + In order to fix this you should copy your custom SRS to + a SRID with a valid value (maybe in the 910000..910999 + range), convert all your tables to the new srid (see + ), delete the invalid + entry from spatial_ref_sys and re-construct the check(s) with: + + ALTER TABLE spatial_ref_sys ADD CONSTRAINT spatial_ref_sys_srid_check check (srid > 0 AND srid < 999000 ); + + ALTER TABLE spatial_ref_sys ADD PRIMARY KEY(srid)); + + + + + + Common Problems - There are several things to check when your installation or upgrade doesn't go as you expected. @@ -839,12 +1320,13 @@ - Check that you you have installed PostgreSQL 8.1 or newer, and that - you are compiling against the same version of the PostgreSQL source as - the version of PostgreSQL that is running. Mix-ups can occur when your - (Linux) distribution has already installed PostgreSQL, or you have - otherwise installed PostgreSQL before and forgotten about it. PostGIS - will only work with PostgreSQL 8.1 or newer, and strange, unexpected + Check that you have installed PostgreSQL &min_postgres_version; + or newer, and that you are compiling against the same version of the + PostgreSQL source as the version of PostgreSQL that is running. + Mix-ups can occur when your (Linux) distribution has already + installed PostgreSQL, or you have otherwise installed PostgreSQL + before and forgotten about it. PostGIS will only work with PostgreSQL + &min_postgres_version; or newer, and strange, unexpected error messages will result if you use an older version. To check the version of PostgreSQL which is running, connect to the database using psql and run this query: @@ -858,6 +1340,11 @@ command as follows: rpm -qa | grep postgresql + + + If your upgrade fails, make sure you are restoring into a database that already has PostGIS installed. + SELECT postgis_full_version(); + diff -Nru postgis-1.5.3/doc/introduction.xml postgis-2.0.1/doc/introduction.xml --- postgis-1.5.3/doc/introduction.xml 2010-09-01 05:57:12.000000000 +0000 +++ postgis-2.0.1/doc/introduction.xml 2012-04-20 14:50:08.000000000 +0000 @@ -1,8 +1,8 @@ - + Introduction - PostGIS is developed by Refractions Research Inc, as a spatial + PostGIS was developed by Refractions Research Inc, as a spatial database technology research project. Refractions is a GIS and database consulting company in Victoria, British Columbia, Canada, specializing in data integration and custom software development. We plan on supporting and @@ -10,6 +10,12 @@ including full OpenGIS support, advanced topological constructs (coverages, surfaces, networks), desktop user interface tools for viewing and editing GIS data, and web-based access tools. + + + PostGIS is an incubation project of the OSGeo Foundation. PostGIS is being continually improved and funded by many FOSS4G Developers as well + as corporations all over the world that gain great benefit from its functionality and versatility. + + Project Steering Committee @@ -25,49 +31,58 @@ Mark Cave-Ayland Coordinates bug fixing and maintenance effort, alignment of - PostGIS with PostgreSQL releases, spatial index selectivity and binding, windows production builds, integration of new - GEOS functionality, and new function enhancements. + PostGIS with PostgreSQL releases, spatial index selectivity and binding, loader/dumper, and Shapefile GUI Loader, integration of new + and new function enhancements. + + + Chris Hodgson + + General development, site and buildbot maintenance, OSGeo incubation management + + + - Paul Ramsey + Regina Obe - Co-founder of PostGIS project. General bug fixing, geography support, GEOS functionality integration and alignment with - GEOS releases. + Documentation, general user support on PostGIS newsgroup, windows production and experimental builds, + X3D support, Tiger Geocoder Support, management functions, and + smoke testing new functionality or major code changes. - Kevin Neufeld + Paul Ramsey (Chair) - Documentation, Hudson automated build, advanced user support - on PostGIS newsgroup, and postgis maintenance function enhancements. + Co-founder of PostGIS project. General bug fixing, geography support, geography and geometry index support (2D, 3D, nD index and anything spatial index), underlying geometry internal structures, GEOS functionality integration and alignment with + GEOS releases, loader/dumper, and Shapefile GUI loader. - Regina Obe + Sandro Santilli + - Documentation, general user support on PostGIS newsgroup, windows production and experimental builds, and - smoke testing new functionality or major code changes. + Bug fixes and maintenance and integration of new GEOS functionality and alignment with GEOS releases, Topology support, and Raster framework and low level api functions. + Contributors Past and Present - + - Sandro Santilli - + Kevin Neufeld - Bug fixes and maintenance and integration of new GEOS - functionality. WKT Raster support. + Prior PSC Member. Documentation and documentation support tools, advanced user support + on PostGIS newsgroup, and PostGIS maintenance function enhancements. - + Dave Blasby @@ -86,76 +101,176 @@ - Mark Leslie + Olivier Courtin - Ongoing maintenance and development of core functions. Enhanced curve support. + Input output XML (KML,GML)/GeoJSON functions, 3D support and bug fixes. - Olivier Courtin + Mark Leslie - Input output XML (KML,GML)/GeoJSON functions and bug fixes. + Ongoing maintenance and development of core functions. Enhanced curve support. Shapefile GUI loader. Pierre Racine - WKT Raster overall architecture and programming support + Raster overall architecture, prototyping, programming support - + - Mateusz Loskot - - WKT Raster support - - - - - Chris Hodgson + Nicklas Avén - General development + Distance function enhancements (including 3D distance and relationship functions) and additions, Windows testing, and general user support - Nicklas Avén + Jorge Arévalo - Distance function enhancements and additions, Windows testing, and general user support + Raster development, GDAL driver support, loader - - - Jorge Arevalo + + Bborie Park - WKT Raster development + Raster development - - Stephen Frost - + + Mateusz Loskot - Tiger geocoder development + Raster loader, low level raster api functions - + - Other contributors + David Zwarg - In alphabetical order: Alex Bodnaru, Alex Mayrhofer, Barbara - Phillipot, Ben Jubb, Bernhard Reiter, Bruce Rindahl, Bruno Wolff - III, Carl Anderson, Charlie Savage, Dane Springmeyer, David Skea, - David Techer, Eduin Carrillo, IIDA Tetsushi, George Silva, Geographic Data BC, - Gerald Fenoy, Gino Lucrezi, Greg Stark, Guillaume Lelarge, Klaus Foerster, Kris Jurka, Mark - Sondheim, Markus Schaber, Maxime Guillaud, Maxime van Noppen, Michael Fuhr, Nikita Shulga, Norman Vine, - Ralph Mason, Steffen Macke, Vincent Picavet + Raster development + + + + + Other contributors: Individuals + + + In alphabetical order: +Alex Bodnaru, +Alex Mayrhofer, +Andrea Peri, +Andreas Forø Tollefsen, +Andreas Neumann, +Anne Ghisla, +Barbara Phillipot, +Ben Jubb, +Bernhard Reiter, +Brian Hamlin, +Bruce Rindahl, +Bruno Wolff III, +Bryce L. Nordgren, +Carl Anderson, +Charlie Savage, +Dane Springmeyer, +David Skea, +David Techer, +Eduin Carrillo, +Even Rouault, +Frank Warmerdam, +George Silva, +Gerald Fenoy, +Gino Lucrezi, +Guillaume Lelarge, +IIDA Tetsushi, +Ingvild Nystuen, +Jeff Adams, +Jose Carlos Martinez Llari, +Kashif Rasul, +Klaus Foerster, +Kris Jurka, +Leo Hsu, +Loic Dachary, +Luca S. Percich, +Maria Arias de Reyna, +Mark Sondheim, +Markus Schaber, +Maxime Guillaud, +Maxime van Noppen, +Michael Fuhr, +Nikita Shulga, +Norman Vine, +Rafal Magda, +Ralph Mason, +Richard Greenwood, +Silvio Grosso, +Steffen Macke, +Stephen Frost, +Tom van Tilburg, +Vincent Picavet + + + + + + Other contributors: Corporate Sponsors + + + These are corporate entities that have contributed developer time, hosting, or direct monetary funding to the PostGIS project + In alphabetical order: +Arrival 3D, +Associazione Italiana per l'Informazione Geografica Libera (GFOSS.it), +AusVet, +Avencia, +Azavea, +Cadcorp, +CampToCamp, +City of Boston (DND), +Clever Elephant Solutions, +Cooperativa Alveo, +Deimos Space, +Faunalia, +Geographic Data BC, +Hunter Systems Group, +Lidwala Consulting Engineers, +LisaSoft, +Logical Tracking & Tracing International AG, +Michigan Tech Research Institute, +Norwegian Forest and Landscape Institute, +OpenGeo, +OSGeo, +Oslandia, +Paragon Corporation, +R3 GIS,, +Refractions Research, +Regione Toscana-SIGTA, +Safe Software, +Sirius Corporation plc, +Stadt Uster, +UC Davis Center for Vectorborne Diseases, +University of Laval, +U.S Department of State (HIU), +Vizzuality, +Zonar Systems + + + + + + Crowd Funding Campaigns + + + Crowd funding campaigns are campaigns we run to get badly wanted features funded that can service a large number of people. Each campaign is specifically focused on a particular feature or set of features. Each sponsor chips in a small fraction of the needed funding and with enough people/organizations contributing, we have the funds to pay for the work that will help many. If you have an idea for a feature you think many others would be willing to co-fund, please post to the PostGIS newsgroup your thoughts and together we can make it happen. + PostGIS 2.0.0 was the first release we tried this strategy. We used PledgeBank and we got two successful campaigns out of it. + postgistopology - 10 plus sponsors each contributed $250 USD to build toTopoGeometry function and beef up topology support in 2.0.0. It happened. + postgis64windows - 20 someodd sponsors each contributed $100 USD to pay for the work needed to work out PostGIS 64-bit on windows issues. It happened. We now have a 64-bit beta release for PostGIS 2.0.0 and a final one planned for release that will be available on PostgreSQL stack builder. @@ -166,11 +281,20 @@ The GEOS geometry operations library, and the algorithmic work of Martin Davis in making it all work, ongoing maintenance and support of - Mateusz Loskot, Paul Ramsey and others. + Mateusz Loskot, Sandro Santilli (strk), Paul Ramsey and others. + + The GDAL + Geospatial Data Abstraction Library, by Frank Warmerdam and others is used to + power much of the raster functionality introduced in PostGIS 2.0.0. In kind, improvements needed in GDAL + to support PostGIS are contributed back to the GDAL project. The Proj4 cartographic projection library, and the work of Gerald Evenden and Frank Warmerdam in creating and maintaining it. + + Last but not least, the PostgreSQL DBMS, + The giant that PostGIS stands on. Much of the speed and flexibility of PostGIS would not be possible without + the extensibility, great query planner, GIST index, and plethora of SQL features provided by PostgreSQL. @@ -183,7 +307,7 @@ The latest software, documentation and news items are available at the PostGIS web site, http://postgis.refractions.net. + url="http://www.postgis.org">http://www.postgis.org. @@ -213,15 +337,13 @@ More information about MapServer internet map server is available at http://mapserver.gis.umn.edu. + url="http://mapserver.org/">http://mapserver.org. - The "Simple Features for - Specification for SQL" is available at the OpenGIS Consortium - web site: http://www.opengeospatial.org/. + The "Simple Features for + Specification for SQL" is available at the OpenGIS Consortium + web site: http://www.opengeospatial.org/. diff -Nru postgis-1.5.3/doc/man/pgsql2shp.1 postgis-2.0.1/doc/man/pgsql2shp.1 --- postgis-1.5.3/doc/man/pgsql2shp.1 2006-10-14 14:22:10.000000000 +0000 +++ postgis-2.0.1/doc/man/pgsql2shp.1 2011-06-29 22:40:54.000000000 +0000 @@ -52,7 +52,7 @@ Use a binary cursor. When used on pre\-1.0.0 PostGIS versions this will reduce the likelihood of coordinate drift due to conversion to and from WKT format. Coordinate drifts will not occur with PostGIS 1.0.0 and newer -versions. It will be slightly faster, but might fail if any NON\-gemetry +versions. It will be slightly faster, but might fail if any NON\-geometry column lacks a cast to text. .TP \fB\-r\fR @@ -65,8 +65,19 @@ dimensions are fully encoded. .TP \fB\-k\fR -Keep idendifiers case (don't uppercase field names). +Keep identifiers case (don't uppercase field names). .TP +\fB\-m\fR <\fIfilename\fR> +Specify a file containing a set of mappings of (long) column names to 10 +character DBF column names. The content of the file is one or more lines +of two names separated by white space and no trailing or leading space: + +COLUMNNAME DBFFIELD1\\n +.br +AVERYLONGCOLUMNNAME DBFFIELD2\\n + +etc. +.TP \fB\-?\fR Display version and usage information. diff -Nru postgis-1.5.3/doc/man/shp2pgsql.1 postgis-2.0.1/doc/man/shp2pgsql.1 --- postgis-1.5.3/doc/man/shp2pgsql.1 2006-10-14 14:22:10.000000000 +0000 +++ postgis-2.0.1/doc/man/shp2pgsql.1 2011-12-21 16:17:55.000000000 +0000 @@ -53,8 +53,24 @@ with -a, -c and -d. It is much faster to load than the default "insert" SQL format. Use this for very large data sets. .TP -\fB\-s\fR <\fISRID\fR> +\fB\-w\fR +Output WKT format, instead of WKB. Note that this can +introduce coordinate drifts due to loss of precision. +.TP +\fB\-e\fR +Execute each statement on its own, without using a transaction. +This allows loading of the majority of good data when there are some bad +geometries that generate errors. Note that this cannot be used with the +-D flag as the "dump" format always uses a transaction. +.TP +\fB\-s\fR [<\fIFROM_SRID\fR>:]<\fISRID\fR> Creates and populates the geometry tables with the specified SRID. +If FROM_SRID is given, the geometries will be reprojected. +Reprojection cannot be used with -D. +.TP +\fB\-G\fR +Use the geography type instead of geometry. Geography is used to store +lat/lon data. At the moment the only spatial reference supported is 4326. .TP \fB\-g\fR <\fIgeometry_column\fR> Specify the name of the geometry column (mostly useful in append mode). @@ -74,11 +90,6 @@ but shp2pgsql will fail when it hits a real MULTILINESTRING. The same works for POLYGONs vs. MULTIPOLYGONs. .TP -\fB\-w\fR -Output WKT format, for use with older (0.x) versions of PostGIS. -Note that this will introduce coordinate drifts and will drop -M values from shapefiles. -.TP \fB\-W\fR <\fIencoding\fR> Specify the character \fIencoding\fR of Shapefile's attributes. If this option is used the output will be encoded in UTF-8. @@ -89,6 +100,15 @@ \fB\-N\fR <\fIpolicy\fR> Specify NULL geometries handling policy (insert,skip,abort). .TP +\fB\-T\fR <\fItablespace\fR> +Specify the tablespace for the new table. Indexes will still use the +default tablespace unless the -X parameter is also used. The PostgreSQL +documentation has a good description on when to use custom tablespaces. +.TP +\fB\-X\fR <\fItablespace\fR> +Specify the tablespace for the new table's indexes. This applies to +the primary key index, and the GIST spatial index if -I is also used. +.TP \fB\-?\fR Display version and usage information. diff -Nru postgis-1.5.3/doc/performance_tips.xml postgis-2.0.1/doc/performance_tips.xml --- postgis-1.5.3/doc/performance_tips.xml 2009-08-28 11:34:17.000000000 +0000 +++ postgis-2.0.1/doc/performance_tips.xml 2012-02-27 22:08:12.000000000 +0000 @@ -13,7 +13,7 @@ "extension room" used to store large (in the sense of data size) values that do not fit into normal data pages (like long texts, images or complex geometries with lots of vertices), see - http://www.postgresql.org/docs/current/interactive/storage-toast.html for more + the PostgreSQL Documentation for TOAST for more information). The problem appears if you happen to have a table with rather @@ -162,15 +162,14 @@ - checkpoint_segment_size - (this setting is obsolete in newer versions of PostgreSQL) got replaced with - many configurations with names starting with checkpoint and WAL. + checkpoint_segments - # of WAL files = 16MB each; default is 3 + Maximum number of log file segments between automatic WAL checkpoints + (each segment is normally 16MB); default is 3 @@ -187,7 +186,7 @@ - constraint_exclusion + constraint_exclusion @@ -207,7 +206,7 @@ - shared_buffers + shared_buffers @@ -228,7 +227,7 @@ Runtime - work_mem (the memory used for sort operations and complex queries) + work_mem (the memory used for sort operations and complex queries) @@ -258,7 +257,7 @@ - maintenance_work_mem (used for VACUUM, CREATE INDEX, etc.) + maintenance_work_mem (used for VACUUM, CREATE INDEX, etc.) diff -Nru postgis-1.5.3/doc/postgis.xml postgis-2.0.1/doc/postgis.xml --- postgis-1.5.3/doc/postgis.xml 2010-09-22 12:57:36.000000000 +0000 +++ postgis-2.0.1/doc/postgis.xml 2012-02-28 10:28:20.000000000 +0000 @@ -1,21 +1,28 @@ - + + + + + +%mathml; - - - - + + + @@ -35,6 +42,12 @@ + + + + + + @@ -72,6 +85,22 @@ This function supports M coordinates."> + + + + + + + This function supports Polyhedral surfaces."> + + + + + + + This function supports Triangles and Triangulated Irregular Network Surfaces (TIN)."> ]> PostGIS &last_release_version; Manual @@ -97,7 +126,14 @@ objects to be stored in the database. PostGIS includes support for GiST-based R-Tree spatial indexes, and functions for analysis and processing of GIS objects. + + + + This is the manual for version &last_release_version; + This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License. + Feel free to use this material any way you like, but we ask that you attribute credit to the PostGIS Project + and wherever possible, a link back to http://www.postgis.org. @@ -105,9 +141,13 @@ &installation; &faq; &using_postgis_dataman; + &using_raster_dataman; &using_postgis_app; &performance_tips; &reference; + &reference_raster; + &faq_raster; + &extras; &postgis_aggs_mm; &reporting; &release_notes; diff -Nru postgis-1.5.3/doc/postgis_comments.sql postgis-2.0.1/doc/postgis_comments.sql --- postgis-1.5.3/doc/postgis_comments.sql 2011-06-25 16:31:13.000000000 +0000 +++ postgis-2.0.1/doc/postgis_comments.sql 2012-06-22 21:04:49.000000000 +0000 @@ -3,19 +3,17 @@ COMMENT ON TYPE box3d IS 'postgis type: A box composed of x min, ymin, zmin, xmax, ymax, zmax. Often used to return the 3d extent of a geometry or collection of geometries.'; - COMMENT ON TYPE box3d_extent IS 'postgis type: A box composed of x min, ymin, zmin, xmax, ymax, zmax. Often used to return the extent of a geometry.'; - COMMENT ON TYPE geometry IS 'postgis type: Planar spatial data type.'; COMMENT ON TYPE geometry_dump IS 'postgis type: A spatial datatype with two fields - geom (holding a geometry object) and path[] (a 1-d array holding the position of the geometry within the dumped object.)'; COMMENT ON TYPE geography IS 'postgis type: Ellipsoidal spatial data type.'; -COMMENT ON FUNCTION AddGeometryColumn(varchar , varchar , integer , varchar , integer ) IS 'args: table_name, column_name, srid, type, dimension - Adds a geometry column to an existing table of attributes.'; +COMMENT ON FUNCTION AddGeometryColumn(varchar , varchar , integer , varchar , integer , boolean ) IS 'args: table_name, column_name, srid, type, dimension, use_typmod=true - Adds a geometry column to an existing table of attributes. By default uses type modifier to define rather than constraints. Pass in false for use_typmod to get old check constraint based behavior'; -COMMENT ON FUNCTION AddGeometryColumn(varchar , varchar , varchar , integer , varchar , integer ) IS 'args: schema_name, table_name, column_name, srid, type, dimension - Adds a geometry column to an existing table of attributes.'; +COMMENT ON FUNCTION AddGeometryColumn(varchar , varchar , varchar , integer , varchar , integer , boolean ) IS 'args: schema_name, table_name, column_name, srid, type, dimension, use_typmod=true - Adds a geometry column to an existing table of attributes. By default uses type modifier to define rather than constraints. Pass in false for use_typmod to get old check constraint based behavior'; -COMMENT ON FUNCTION AddGeometryColumn(varchar , varchar , varchar , varchar , integer , varchar , integer ) IS 'args: catalog_name, schema_name, table_name, column_name, srid, type, dimension - Adds a geometry column to an existing table of attributes.'; +COMMENT ON FUNCTION AddGeometryColumn(varchar , varchar , varchar , varchar , integer , varchar , integer , boolean ) IS 'args: catalog_name, schema_name, table_name, column_name, srid, type, dimension, use_typmod=true - Adds a geometry column to an existing table of attributes. By default uses type modifier to define rather than constraints. Pass in false for use_typmod to get old check constraint based behavior'; COMMENT ON FUNCTION DropGeometryColumn(varchar , varchar ) IS 'args: table_name, column_name - Removes a geometry column from a spatial table.'; @@ -47,15 +45,11 @@ COMMENT ON FUNCTION PostGIS_Scripts_Released() IS 'Returns the version number of the postgis.sql script released with the installed postgis lib.'; -COMMENT ON FUNCTION PostGIS_Uses_Stats() IS 'Returns TRUE if STATS usage has been enabled.'; - COMMENT ON FUNCTION PostGIS_Version() IS 'Returns PostGIS version number and compile-time options.'; -COMMENT ON FUNCTION Populate_Geometry_Columns() IS 'Ensures geometry columns have appropriate spatial constraints and exist in the geometry_columns table.'; - -COMMENT ON FUNCTION Populate_Geometry_Columns(oid) IS 'args: relation_oid - Ensures geometry columns have appropriate spatial constraints and exist in the geometry_columns table.'; +COMMENT ON FUNCTION Populate_Geometry_Columns(boolean ) IS 'args: use_typmod=true - Ensures geometry columns are defined with type modifiers or have appropriate spatial constraints This ensures they will be registered correctly in geometry_columns view. By default will convert all geometry columns with no type modifier to ones with type modifiers. To get old behavior set use_typmod=false'; -COMMENT ON FUNCTION Probe_Geometry_Columns() IS 'Scans all tables with PostGIS geometry constraints and adds them to the geometry_columns table if they are not there.'; +COMMENT ON FUNCTION Populate_Geometry_Columns(oid, boolean ) IS 'args: relation_oid, use_typmod=true - Ensures geometry columns are defined with type modifiers or have appropriate spatial constraints This ensures they will be registered correctly in geometry_columns view. By default will convert all geometry columns with no type modifier to ones with type modifiers. To get old behavior set use_typmod=false'; COMMENT ON FUNCTION UpdateGeometrySRID(varchar , varchar , integer ) IS 'args: table_name, column_name, srid - Updates the SRID of all features in a geometry column, geometry_columns metadata and srid table constraint'; @@ -87,10 +81,16 @@ COMMENT ON FUNCTION ST_GeomFromGML(text ) IS 'args: geomgml - Takes as input GML representation of geometry and outputs a PostGIS geometry object'; +COMMENT ON FUNCTION ST_GeomFromGML(text , integer ) IS 'args: geomgml, srid - Takes as input GML representation of geometry and outputs a PostGIS geometry object'; + +COMMENT ON FUNCTION ST_GeomFromGeoJSON(text ) IS 'args: geomjson - Takes as input a geojson representation of a geometry and outputs a PostGIS geometry object'; + COMMENT ON FUNCTION ST_GeomFromKML(text ) IS 'args: geomkml - Takes as input KML representation of geometry and outputs a PostGIS geometry object'; COMMENT ON FUNCTION ST_GMLToSQL(text ) IS 'args: geomgml - Return a specified ST_Geometry value from GML representation. This is an alias name for ST_GeomFromGML'; +COMMENT ON FUNCTION ST_GMLToSQL(text , integer ) IS 'args: geomgml, srid - Return a specified ST_Geometry value from GML representation. This is an alias name for ST_GeomFromGML'; + COMMENT ON FUNCTION ST_GeomFromText(text ) IS 'args: WKT - Return a specified ST_Geometry value from Well-Known Text representation (WKT).'; COMMENT ON FUNCTION ST_GeomFromText(text , integer ) IS 'args: WKT, srid - Return a specified ST_Geometry value from Well-Known Text representation (WKT).'; @@ -115,15 +115,15 @@ COMMENT ON FUNCTION ST_MakeBox2D(geometry , geometry ) IS 'args: pointLowLeft, pointUpRight - Creates a BOX2D defined by the given point geometries.'; -COMMENT ON FUNCTION ST_MakeBox3D(geometry , geometry ) IS 'args: point3DLowLeftBottom, point3DUpRightTop - Creates a BOX3D defined by the given 3d point geometries.'; +COMMENT ON FUNCTION ST_3DMakeBox(geometry , geometry ) IS 'args: point3DLowLeftBottom, point3DUpRightTop - Creates a BOX3D defined by the given 3d point geometries.'; -COMMENT ON AGGREGATE ST_MakeLine(geometry) IS 'args: pointfield - Creates a Linestring from point geometries.'; +COMMENT ON AGGREGATE ST_MakeLine(geometry) IS 'args: geoms - Creates a Linestring from point or line geometries.'; -COMMENT ON FUNCTION ST_MakeLine(geometry, geometry) IS 'args: point1, point2 - Creates a Linestring from point geometries.'; +COMMENT ON FUNCTION ST_MakeLine(geometry, geometry) IS 'args: geom1, geom2 - Creates a Linestring from point or line geometries.'; -COMMENT ON FUNCTION ST_MakeLine(geometry[]) IS 'args: point_array - Creates a Linestring from point geometries.'; +COMMENT ON FUNCTION ST_MakeLine(geometry[]) IS 'args: geoms_array - Creates a Linestring from point or line geometries.'; -COMMENT ON FUNCTION ST_MakeEnvelope(double precision, double precision, double precision, double precision, integer ) IS 'args: xmin, ymin, xmax, ymax, srid - Creates a rectangular Polygon formed from the given minimums and maximums. Input values must be in SRS specified by the SRID.'; +COMMENT ON FUNCTION ST_MakeEnvelope(double precision, double precision, double precision, double precision, integer ) IS 'args: xmin, ymin, xmax, ymax, srid=unknown - Creates a rectangular Polygon formed from the given minimums and maximums. Input values must be in SRS specified by the SRID.'; COMMENT ON FUNCTION ST_MakePolygon(geometry) IS 'args: linestring - Creates a Polygon formed by the given shell. Input geometries must be closed LINESTRINGS.'; @@ -183,15 +183,17 @@ COMMENT ON FUNCTION ST_ExteriorRing(geometry ) IS 'args: a_polygon - Returns a line string representing the exterior ring of the POLYGON geometry. Return NULL if the geometry is not a polygon. Will not work with MULTIPOLYGON'; -COMMENT ON FUNCTION ST_GeometryN(geometry , integer ) IS 'args: geomA, n - Return the 1-based Nth geometry if the geometry is a GEOMETRYCOLLECTION, MULTIPOINT, MULTILINESTRING, MULTICURVE or MULTIPOLYGON. Otherwise, return NULL.'; +COMMENT ON FUNCTION ST_GeometryN(geometry , integer ) IS 'args: geomA, n - Return the 1-based Nth geometry if the geometry is a GEOMETRYCOLLECTION, (MULTI)POINT, (MULTI)LINESTRING, MULTICURVE or (MULTI)POLYGON, POLYHEDRALSURFACE Otherwise, return NULL.'; COMMENT ON FUNCTION ST_GeometryType(geometry ) IS 'args: g1 - Return the geometry type of the ST_Geometry value.'; COMMENT ON FUNCTION ST_InteriorRingN(geometry , integer ) IS 'args: a_polygon, n - Return the Nth interior linestring ring of the polygon geometry. Return NULL if the geometry is not a polygon or the given N is out of range.'; -COMMENT ON FUNCTION ST_IsClosed(geometry ) IS 'args: g - Returns TRUE if the LINESTRINGs start and end points are coincident.'; +COMMENT ON FUNCTION ST_IsClosed(geometry ) IS 'args: g - Returns TRUE if the LINESTRINGs start and end points are coincident. For Polyhedral surface is closed (volumetric).'; + +COMMENT ON FUNCTION ST_IsCollection(geometry ) IS 'args: g - Returns TRUE if the argument is a collection (MULTI*, GEOMETRYCOLLECTION, ...)'; -COMMENT ON FUNCTION ST_IsEmpty(geometry ) IS 'args: geomA - Returns true if this Geometry is an empty geometry . If true, then this Geometry represents the empty point set - i.e. GEOMETRYCOLLECTION(EMPTY).'; +COMMENT ON FUNCTION ST_IsEmpty(geometry ) IS 'args: geomA - Returns true if this Geometry is an empty geometrycollection, polygon, point etc.'; COMMENT ON FUNCTION ST_IsRing(geometry ) IS 'args: g - Returns TRUE if this LINESTRING is both closed and simple.'; @@ -199,8 +201,16 @@ COMMENT ON FUNCTION ST_IsValid(geometry ) IS 'args: g - Returns true if the ST_Geometry is well formed.'; +COMMENT ON FUNCTION ST_IsValid(geometry , integer ) IS 'args: g, flags - Returns true if the ST_Geometry is well formed.'; + COMMENT ON FUNCTION ST_IsValidReason(geometry ) IS 'args: geomA - Returns text stating if a geometry is valid or not and if not valid, a reason why.'; +COMMENT ON FUNCTION ST_IsValidReason(geometry , integer ) IS 'args: geomA, flags - Returns text stating if a geometry is valid or not and if not valid, a reason why.'; + +COMMENT ON FUNCTION ST_IsValidDetail(geometry ) IS 'args: geom - Returns a valid_detail (valid,reason,location) row stating if a geometry is valid or not and if not valid, a reason why and a location where.'; + +COMMENT ON FUNCTION ST_IsValidDetail(geometry , integer ) IS 'args: geom, flags - Returns a valid_detail (valid,reason,location) row stating if a geometry is valid or not and if not valid, a reason why and a location where.'; + COMMENT ON FUNCTION ST_M(geometry ) IS 'args: a_point - Return the M coordinate of the point, or NULL if not available. Input must be a point.'; COMMENT ON FUNCTION ST_NDims(geometry ) IS 'args: g1 - Returns coordinate dimension of the geometry as a small int. Values are: 2,3 or 4.'; @@ -209,30 +219,48 @@ COMMENT ON FUNCTION ST_NRings(geometry ) IS 'args: geomA - If the geometry is a polygon or multi-polygon returns the number of rings.'; -COMMENT ON FUNCTION ST_NumGeometries(geometry ) IS 'args: a_multi_or_geomcollection - If geometry is a GEOMETRYCOLLECTION (or MULTI*) return the number of geometries, otherwise return NULL.'; +COMMENT ON FUNCTION ST_NumGeometries(geometry ) IS 'args: geom - If geometry is a GEOMETRYCOLLECTION (or MULTI*) return the number of geometries, for single geometries will return 1, otherwise return NULL.'; COMMENT ON FUNCTION ST_NumInteriorRings(geometry ) IS 'args: a_polygon - Return the number of interior rings of the first polygon in the geometry. This will work with both POLYGON and MULTIPOLYGON types but only looks at the first polygon. Return NULL if there is no polygon in the geometry.'; COMMENT ON FUNCTION ST_NumInteriorRing(geometry ) IS 'args: a_polygon - Return the number of interior rings of the first polygon in the geometry. Synonym to ST_NumInteriorRings.'; +COMMENT ON FUNCTION ST_NumPatches(geometry ) IS 'args: g1 - Return the number of faces on a Polyhedral Surface. Will return null for non-polyhedral geometries.'; + COMMENT ON FUNCTION ST_NumPoints(geometry ) IS 'args: g1 - Return the number of points in an ST_LineString or ST_CircularString value.'; +COMMENT ON FUNCTION ST_PatchN(geometry , integer ) IS 'args: geomA, n - Return the 1-based Nth geometry (face) if the geometry is a POLYHEDRALSURFACE, POLYHEDRALSURFACEM. Otherwise, return NULL.'; + COMMENT ON FUNCTION ST_PointN(geometry , integer ) IS 'args: a_linestring, n - Return the Nth point in the first linestring or circular linestring in the geometry. Return NULL if there is no linestring in the geometry.'; COMMENT ON FUNCTION ST_SRID(geometry ) IS 'args: g1 - Returns the spatial reference identifier for the ST_Geometry as defined in spatial_ref_sys table.'; COMMENT ON FUNCTION ST_StartPoint(geometry ) IS 'args: geomA - Returns the first point of a LINESTRING geometry as a POINT.'; -COMMENT ON FUNCTION ST_Summary(geometry ) IS 'args: g - Returns a text summary of the contents of the ST_Geometry.'; +COMMENT ON FUNCTION ST_Summary(geometry ) IS 'args: g - Returns a text summary of the contents of the geometry.'; + +COMMENT ON FUNCTION ST_Summary(geography ) IS 'args: g - Returns a text summary of the contents of the geometry.'; COMMENT ON FUNCTION ST_X(geometry ) IS 'args: a_point - Return the X coordinate of the point, or NULL if not available. Input must be a point.'; +COMMENT ON FUNCTION ST_XMax(box3d ) IS 'args: aGeomorBox2DorBox3D - Returns X maxima of a bounding box 2d or 3d or a geometry.'; + +COMMENT ON FUNCTION ST_XMin(box3d ) IS 'args: aGeomorBox2DorBox3D - Returns X minima of a bounding box 2d or 3d or a geometry.'; + COMMENT ON FUNCTION ST_Y(geometry ) IS 'args: a_point - Return the Y coordinate of the point, or NULL if not available. Input must be a point.'; +COMMENT ON FUNCTION ST_YMax(box3d ) IS 'args: aGeomorBox2DorBox3D - Returns Y maxima of a bounding box 2d or 3d or a geometry.'; + +COMMENT ON FUNCTION ST_YMin(box3d ) IS 'args: aGeomorBox2DorBox3D - Returns Y minima of a bounding box 2d or 3d or a geometry.'; + COMMENT ON FUNCTION ST_Z(geometry ) IS 'args: a_point - Return the Z coordinate of the point, or NULL if not available. Input must be a point.'; +COMMENT ON FUNCTION ST_ZMax(box3d ) IS 'args: aGeomorBox2DorBox3D - Returns Z minima of a bounding box 2d or 3d or a geometry.'; + COMMENT ON FUNCTION ST_Zmflag(geometry ) IS 'args: geomA - Returns ZM (dimension semantic) flag of the geometries as a small int. Values are: 0=2d, 1=3dm, 2=3dz, 3=4d.'; +COMMENT ON FUNCTION ST_ZMin(box3d ) IS 'args: aGeomorBox2DorBox3D - Returns Z minima of a bounding box 2d or 3d or a geometry.'; + COMMENT ON FUNCTION ST_AddPoint(geometry, geometry) IS 'args: linestring, point - Adds a point to a LineString before point (0-based index).'; COMMENT ON FUNCTION ST_AddPoint(geometry, geometry, integer) IS 'args: linestring, point, position - Adds a point to a LineString before point (0-based index).'; @@ -257,7 +285,9 @@ COMMENT ON FUNCTION ST_LineMerge(geometry ) IS 'args: amultilinestring - Returns a (set of) LineString(s) formed by sewing together a MULTILINESTRING.'; -COMMENT ON FUNCTION ST_CollectionExtract(geometry , integer ) IS 'args: collection, type - Given a GEOMETRYCOLLECTION, returns a MULTI* geometry consisting only of the specified type. Sub-geometries that are not the specified type are ignored. If there are no sub-geometries of the right type, an EMPTY collection will be returned. Only points, lines and polygons are supported. Type numbers are 1 == POINT, 2 == LINESTRING, 3 == POLYGON.'; +COMMENT ON FUNCTION ST_CollectionExtract(geometry , integer ) IS 'args: collection, type - Given a (multi)geometry, returns a (multi)geometry consisting only of elements of the specified type.'; + +COMMENT ON FUNCTION ST_CollectionHomogenize(geometry ) IS 'args: collection - Given a geometry collection, returns the "simplest" representation of the contents.'; COMMENT ON FUNCTION ST_Multi(geometry ) IS 'args: g1 - Returns the geometry as a MULTI* geometry. If the geometry is already a MULTI*, it is returned unchanged.'; @@ -265,7 +295,11 @@ COMMENT ON FUNCTION ST_Reverse(geometry ) IS 'args: g1 - Returns the geometry with vertex order reversed.'; -COMMENT ON FUNCTION ST_Rotate(geometry, float) IS 'args: geomA, rotZRadians - This is a synonym for ST_RotateZ'; +COMMENT ON FUNCTION ST_Rotate(geometry, float) IS 'args: geomA, rotRadians - Rotate a geometry rotRadians counter-clockwise about an origin.'; + +COMMENT ON FUNCTION ST_Rotate(geometry, float, float, float) IS 'args: geomA, rotRadians, x0, y0 - Rotate a geometry rotRadians counter-clockwise about an origin.'; + +COMMENT ON FUNCTION ST_Rotate(geometry, float, geometry) IS 'args: geomA, rotRadians, pointOrigin - Rotate a geometry rotRadians counter-clockwise about an origin.'; COMMENT ON FUNCTION ST_RotateX(geometry, float) IS 'args: geomA, rotRadians - Rotate a geometry rotRadians about the X axis.'; @@ -283,13 +317,15 @@ COMMENT ON FUNCTION ST_SetSRID(geometry , integer ) IS 'args: geom, srid - Sets the SRID on a geometry to a particular integer value.'; -COMMENT ON FUNCTION ST_SnapToGrid(geometry , float , float , float , float ) IS 'args: geomA, originX, originY, sizeX, sizeY - Snap all points of the input geometry to the grid defined by its origin and cell size. Remove consecutive points falling on the same cell, eventually returning NULL if output points are not enough to define a geometry of the given type. Collapsed geometries in a collection are stripped from it. Useful for reducing precision.'; +COMMENT ON FUNCTION ST_SnapToGrid(geometry , float , float , float , float ) IS 'args: geomA, originX, originY, sizeX, sizeY - Snap all points of the input geometry to a regular grid.'; + +COMMENT ON FUNCTION ST_SnapToGrid(geometry , float , float ) IS 'args: geomA, sizeX, sizeY - Snap all points of the input geometry to a regular grid.'; -COMMENT ON FUNCTION ST_SnapToGrid(geometry , float , float ) IS 'args: geomA, sizeX, sizeY - Snap all points of the input geometry to the grid defined by its origin and cell size. Remove consecutive points falling on the same cell, eventually returning NULL if output points are not enough to define a geometry of the given type. Collapsed geometries in a collection are stripped from it. Useful for reducing precision.'; +COMMENT ON FUNCTION ST_SnapToGrid(geometry , float ) IS 'args: geomA, size - Snap all points of the input geometry to a regular grid.'; -COMMENT ON FUNCTION ST_SnapToGrid(geometry , float ) IS 'args: geomA, size - Snap all points of the input geometry to the grid defined by its origin and cell size. Remove consecutive points falling on the same cell, eventually returning NULL if output points are not enough to define a geometry of the given type. Collapsed geometries in a collection are stripped from it. Useful for reducing precision.'; +COMMENT ON FUNCTION ST_SnapToGrid(geometry , geometry , float , float , float , float ) IS 'args: geomA, pointOrigin, sizeX, sizeY, sizeZ, sizeM - Snap all points of the input geometry to a regular grid.'; -COMMENT ON FUNCTION ST_SnapToGrid(geometry , geometry , float , float , float , float ) IS 'args: geomA, pointOrigin, sizeX, sizeY, sizeZ, sizeM - Snap all points of the input geometry to the grid defined by its origin and cell size. Remove consecutive points falling on the same cell, eventually returning NULL if output points are not enough to define a geometry of the given type. Collapsed geometries in a collection are stripped from it. Useful for reducing precision.'; +COMMENT ON FUNCTION ST_Snap(geometry , geometry , float ) IS 'args: input, reference, tolerance - Snap segments and vertices of input geometry to vertices of a reference geometry.'; COMMENT ON FUNCTION ST_Transform(geometry , integer ) IS 'args: g1, srid - Returns a new geometry with its coordinates transformed to the SRID referenced by the integer parameter.'; @@ -301,9 +337,11 @@ COMMENT ON FUNCTION ST_AsBinary(geometry ) IS 'args: g1 - Return the Well-Known Binary (WKB) representation of the geometry/geography without SRID meta data.'; +COMMENT ON FUNCTION ST_AsBinary(geometry , text ) IS 'args: g1, NDR_or_XDR - Return the Well-Known Binary (WKB) representation of the geometry/geography without SRID meta data.'; + COMMENT ON FUNCTION ST_AsBinary(geography ) IS 'args: g1 - Return the Well-Known Binary (WKB) representation of the geometry/geography without SRID meta data.'; -COMMENT ON FUNCTION ST_AsBinary(geometry , text ) IS 'args: g1, NDR_or_XDR - Return the Well-Known Binary (WKB) representation of the geometry/geography without SRID meta data.'; +COMMENT ON FUNCTION ST_AsBinary(geography , text ) IS 'args: g1, NDR_or_XDR - Return the Well-Known Binary (WKB) representation of the geometry/geography without SRID meta data.'; COMMENT ON FUNCTION ST_AsEWKB(geometry ) IS 'args: g1 - Return the Well-Known Binary (WKB) representation of the geometry with SRID meta data.'; @@ -311,97 +349,75 @@ COMMENT ON FUNCTION ST_AsEWKT(geometry ) IS 'args: g1 - Return the Well-Known Text (WKT) representation of the geometry with SRID meta data.'; -COMMENT ON FUNCTION ST_AsGeoJSON(geometry ) IS 'args: g1 - Return the geometry as a GeoJSON element.'; - -COMMENT ON FUNCTION ST_AsGeoJSON(geography ) IS 'args: g1 - Return the geometry as a GeoJSON element.'; - -COMMENT ON FUNCTION ST_AsGeoJSON(geometry , integer ) IS 'args: g1, max_decimal_digits - Return the geometry as a GeoJSON element.'; - -COMMENT ON FUNCTION ST_AsGeoJSON(geography , integer ) IS 'args: g1, max_decimal_digits - Return the geometry as a GeoJSON element.'; - -COMMENT ON FUNCTION ST_AsGeoJSON(geometry , integer , integer ) IS 'args: g1, max_decimal_digits, options - Return the geometry as a GeoJSON element.'; - -COMMENT ON FUNCTION ST_AsGeoJSON(geography , integer , integer ) IS 'args: g1, max_decimal_digits, options - Return the geometry as a GeoJSON element.'; - -COMMENT ON FUNCTION ST_AsGeoJSON(integer , geometry ) IS 'args: gj_version, g1 - Return the geometry as a GeoJSON element.'; - -COMMENT ON FUNCTION ST_AsGeoJSON(integer , geography ) IS 'args: gj_version, g1 - Return the geometry as a GeoJSON element.'; +COMMENT ON FUNCTION ST_AsEWKT(geography ) IS 'args: g1 - Return the Well-Known Text (WKT) representation of the geometry with SRID meta data.'; -COMMENT ON FUNCTION ST_AsGeoJSON(integer , geometry , integer ) IS 'args: gj_version, g1, max_decimal_digits - Return the geometry as a GeoJSON element.'; +COMMENT ON FUNCTION ST_AsGeoJSON(geometry , integer , integer ) IS 'args: geom, maxdecimaldigits=15, options=0 - Return the geometry as a GeoJSON element.'; -COMMENT ON FUNCTION ST_AsGeoJSON(integer , geography , integer ) IS 'args: gj_version, g1, max_decimal_digits - Return the geometry as a GeoJSON element.'; +COMMENT ON FUNCTION ST_AsGeoJSON(geography , integer , integer ) IS 'args: geog, maxdecimaldigits=15, options=0 - Return the geometry as a GeoJSON element.'; -COMMENT ON FUNCTION ST_AsGeoJSON(integer , geometry , integer , integer ) IS 'args: gj_version, g1, max_decimal_digits, options - Return the geometry as a GeoJSON element.'; +COMMENT ON FUNCTION ST_AsGeoJSON(integer , geometry , integer , integer ) IS 'args: gj_version, geom, maxdecimaldigits=15, options=0 - Return the geometry as a GeoJSON element.'; -COMMENT ON FUNCTION ST_AsGeoJSON(integer , geography , integer , integer ) IS 'args: gj_version, g1, max_decimal_digits, options - Return the geometry as a GeoJSON element.'; +COMMENT ON FUNCTION ST_AsGeoJSON(integer , geography , integer , integer ) IS 'args: gj_version, geog, maxdecimaldigits=15, options=0 - Return the geometry as a GeoJSON element.'; -COMMENT ON FUNCTION ST_AsGML(geometry ) IS 'args: g1 - Return the geometry as a GML version 2 or 3 element.'; +COMMENT ON FUNCTION ST_AsGML(geometry , integer , integer ) IS 'args: geom, maxdecimaldigits=15, options=0 - Return the geometry as a GML version 2 or 3 element.'; -COMMENT ON FUNCTION ST_AsGML(geography ) IS 'args: g1 - Return the geometry as a GML version 2 or 3 element.'; +COMMENT ON FUNCTION ST_AsGML(geography , integer , integer ) IS 'args: geog, maxdecimaldigits=15, options=0 - Return the geometry as a GML version 2 or 3 element.'; -COMMENT ON FUNCTION ST_AsGML(geometry , integer ) IS 'args: g1, precision - Return the geometry as a GML version 2 or 3 element.'; +COMMENT ON FUNCTION ST_AsGML(integer , geometry , integer , integer , text ) IS 'args: version, geom, maxdecimaldigits=15, options=0, nprefix=null - Return the geometry as a GML version 2 or 3 element.'; -COMMENT ON FUNCTION ST_AsGML(geography , integer ) IS 'args: g1, precision - Return the geometry as a GML version 2 or 3 element.'; - -COMMENT ON FUNCTION ST_AsGML(integer , geometry ) IS 'args: version, g1 - Return the geometry as a GML version 2 or 3 element.'; - -COMMENT ON FUNCTION ST_AsGML(integer , geography ) IS 'args: version, g1 - Return the geometry as a GML version 2 or 3 element.'; - -COMMENT ON FUNCTION ST_AsGML(integer , geometry , integer ) IS 'args: version, g1, precision - Return the geometry as a GML version 2 or 3 element.'; - -COMMENT ON FUNCTION ST_AsGML(integer , geography , integer ) IS 'args: version, g1, precision - Return the geometry as a GML version 2 or 3 element.'; - -COMMENT ON FUNCTION ST_AsGML(integer , geometry , integer , integer ) IS 'args: version, g1, precision, options - Return the geometry as a GML version 2 or 3 element.'; - -COMMENT ON FUNCTION ST_AsGML(integer , geography , integer , integer ) IS 'args: version, g1, precision, options - Return the geometry as a GML version 2 or 3 element.'; +COMMENT ON FUNCTION ST_AsGML(integer , geography , integer , integer , text ) IS 'args: version, geog, maxdecimaldigits=15, options=0, nprefix=null - Return the geometry as a GML version 2 or 3 element.'; COMMENT ON FUNCTION ST_AsHEXEWKB(geometry , text ) IS 'args: g1, NDRorXDR - Returns a Geometry in HEXEWKB format (as text) using either little-endian (NDR) or big-endian (XDR) encoding.'; COMMENT ON FUNCTION ST_AsHEXEWKB(geometry ) IS 'args: g1 - Returns a Geometry in HEXEWKB format (as text) using either little-endian (NDR) or big-endian (XDR) encoding.'; -COMMENT ON FUNCTION ST_AsKML(geometry ) IS 'args: g1 - Return the geometry as a KML element. Several variants. Default version=2, default precision=15'; +COMMENT ON FUNCTION ST_AsKML(geometry , integer ) IS 'args: geom, maxdecimaldigits=15 - Return the geometry as a KML element. Several variants. Default version=2, default precision=15'; -COMMENT ON FUNCTION ST_AsKML(geography ) IS 'args: g1 - Return the geometry as a KML element. Several variants. Default version=2, default precision=15'; +COMMENT ON FUNCTION ST_AsKML(geography , integer ) IS 'args: geog, maxdecimaldigits=15 - Return the geometry as a KML element. Several variants. Default version=2, default precision=15'; -COMMENT ON FUNCTION ST_AsKML(geometry , integer ) IS 'args: g1, precision - Return the geometry as a KML element. Several variants. Default version=2, default precision=15'; +COMMENT ON FUNCTION ST_AsKML(integer , geometry , integer , text ) IS 'args: version, geom, maxdecimaldigits=15, nprefix=NULL - Return the geometry as a KML element. Several variants. Default version=2, default precision=15'; -COMMENT ON FUNCTION ST_AsKML(geography , integer ) IS 'args: g1, precision - Return the geometry as a KML element. Several variants. Default version=2, default precision=15'; +COMMENT ON FUNCTION ST_AsKML(integer , geography , integer , text ) IS 'args: version, geog, maxdecimaldigits=15, nprefix=NULL - Return the geometry as a KML element. Several variants. Default version=2, default precision=15'; -COMMENT ON FUNCTION ST_AsKML(integer , geometry ) IS 'args: version, geom1 - Return the geometry as a KML element. Several variants. Default version=2, default precision=15'; +COMMENT ON FUNCTION ST_AsSVG(geometry , integer , integer ) IS 'args: geom, rel=0, maxdecimaldigits=15 - Returns a Geometry in SVG path data given a geometry or geography object.'; -COMMENT ON FUNCTION ST_AsKML(integer , geography ) IS 'args: version, geom1 - Return the geometry as a KML element. Several variants. Default version=2, default precision=15'; +COMMENT ON FUNCTION ST_AsSVG(geography , integer , integer ) IS 'args: geog, rel=0, maxdecimaldigits=15 - Returns a Geometry in SVG path data given a geometry or geography object.'; -COMMENT ON FUNCTION ST_AsKML(integer , geometry , integer ) IS 'args: version, geom1, precision - Return the geometry as a KML element. Several variants. Default version=2, default precision=15'; +COMMENT ON FUNCTION ST_AsX3D(geometry , integer , integer ) IS 'args: g1, maxdecimaldigits=15, options=0 - Returns a Geometry in X3D xml node element format: ISO-IEC-19776-1.2-X3DEncodings-XML'; -COMMENT ON FUNCTION ST_AsKML(integer , geography , integer ) IS 'args: version, geom1, precision - Return the geometry as a KML element. Several variants. Default version=2, default precision=15'; +COMMENT ON FUNCTION ST_GeoHash(geometry , integer ) IS 'args: geom, maxchars=full_precision_of_point - Return a GeoHash representation (geohash.org) of the geometry.'; -COMMENT ON FUNCTION ST_AsSVG(geometry ) IS 'args: g1 - Returns a Geometry in SVG path data given a geometry or geography object.'; +COMMENT ON FUNCTION ST_AsText(geometry ) IS 'args: g1 - Return the Well-Known Text (WKT) representation of the geometry/geography without SRID metadata.'; -COMMENT ON FUNCTION ST_AsSVG(geography ) IS 'args: g1 - Returns a Geometry in SVG path data given a geometry or geography object.'; +COMMENT ON FUNCTION ST_AsText(geography ) IS 'args: g1 - Return the Well-Known Text (WKT) representation of the geometry/geography without SRID metadata.'; -COMMENT ON FUNCTION ST_AsSVG(geometry , integer ) IS 'args: g1, rel - Returns a Geometry in SVG path data given a geometry or geography object.'; +COMMENT ON FUNCTION ST_AsLatLonText(geometry ) IS 'args: pt - Return the Degrees, Minutes, Seconds representation of the given point.'; -COMMENT ON FUNCTION ST_AsSVG(geography , integer ) IS 'args: g1, rel - Returns a Geometry in SVG path data given a geometry or geography object.'; +COMMENT ON FUNCTION ST_AsLatLonText(geometry , text ) IS 'args: pt, format - Return the Degrees, Minutes, Seconds representation of the given point.'; -COMMENT ON FUNCTION ST_AsSVG(geometry , integer , integer ) IS 'args: g1, rel, maxdecimaldigits - Returns a Geometry in SVG path data given a geometry or geography object.'; +COMMENT ON FUNCTION ST_3DClosestPoint(geometry , geometry ) IS 'args: g1, g2 - Returns the 3-dimensional point on g1 that is closest to g2. This is the first point of the 3D shortest line.'; -COMMENT ON FUNCTION ST_AsSVG(geography , integer , integer ) IS 'args: g1, rel, maxdecimaldigits - Returns a Geometry in SVG path data given a geometry or geography object.'; +COMMENT ON FUNCTION ST_3DDistance(geometry , geometry ) IS 'args: g1, g2 - For geometry type Returns the 3-dimensional cartesian minimum distance (based on spatial ref) between two geometries in projected units.'; -COMMENT ON FUNCTION ST_GeoHash(geometry ) IS 'args: g1 - Return a GeoHash representation (geohash.org) of the geometry.'; +COMMENT ON FUNCTION ST_3DDWithin(geometry , geometry , double precision ) IS 'args: g1, g2, distance_of_srid - For 3d (z) geometry type Returns true if two geometries 3d distance is within number of units.'; -COMMENT ON FUNCTION ST_GeoHash(geometry , integer ) IS 'args: g1, precision - Return a GeoHash representation (geohash.org) of the geometry.'; +COMMENT ON FUNCTION ST_3DDFullyWithin(geometry , geometry , double precision ) IS 'args: g1, g2, distance - Returns true if all of the 3D geometries are within the specified distance of one another.'; -COMMENT ON FUNCTION ST_AsText(geometry ) IS 'args: g1 - Return the Well-Known Text (WKT) representation of the geometry/geography without SRID metadata.'; +COMMENT ON FUNCTION ST_3DIntersects(geometry, geometry) IS 'args: geomA, geomB - Returns TRUE if the Geometries "spatially intersect" in 3d - only for points and linestrings'; -COMMENT ON FUNCTION ST_AsText(geography ) IS 'args: g1 - Return the Well-Known Text (WKT) representation of the geometry/geography without SRID metadata.'; +COMMENT ON FUNCTION ST_3DLongestLine(geometry , geometry ) IS 'args: g1, g2 - Returns the 3-dimensional longest line between two geometries'; + +COMMENT ON FUNCTION ST_3DMaxDistance(geometry , geometry ) IS 'args: g1, g2 - For geometry type Returns the 3-dimensional cartesian maximum distance (based on spatial ref) between two geometries in projected units.'; + +COMMENT ON FUNCTION ST_3DShortestLine(geometry , geometry ) IS 'args: g1, g2 - Returns the 3-dimensional shortest line between two geometries'; COMMENT ON FUNCTION ST_Area(geometry ) IS 'args: g1 - Returns the area of the surface if it is a polygon or multi-polygon. For "geometry" type area is in SRID units. For "geography" area is in square meters.'; -COMMENT ON FUNCTION ST_Area(geography ) IS 'args: g1 - Returns the area of the surface if it is a polygon or multi-polygon. For "geometry" type area is in SRID units. For "geography" area is in square meters.'; +COMMENT ON FUNCTION ST_Area(geography , boolean ) IS 'args: geog, use_spheroid=true - Returns the area of the surface if it is a polygon or multi-polygon. For "geometry" type area is in SRID units. For "geography" area is in square meters.'; -COMMENT ON FUNCTION ST_Area(geography , boolean ) IS 'args: g1, use_spheroid - Returns the area of the surface if it is a polygon or multi-polygon. For "geometry" type area is in SRID units. For "geography" area is in square meters.'; +COMMENT ON FUNCTION ST_Azimuth(geometry , geometry ) IS 'args: pointA, pointB - Returns the angle in radians from the horizontal of the vector defined by pointA and pointB. Angle is computed clockwise from down-to-up: on the clock: 12=0; 3=PI/2; 6=PI; 9=3PI/2.'; -COMMENT ON FUNCTION ST_Azimuth(geometry , geometry ) IS 'args: pointA, pointB - Returns the angle in radians from the horizontal of the vector defined by pointA and pointB'; +COMMENT ON FUNCTION ST_Azimuth(geography , geography ) IS 'args: pointA, pointB - Returns the angle in radians from the horizontal of the vector defined by pointA and pointB. Angle is computed clockwise from down-to-up: on the clock: 12=0; 3=PI/2; 6=PI; 9=3PI/2.'; COMMENT ON FUNCTION ST_Centroid(geometry ) IS 'args: g1 - Returns the geometric center of a geometry.'; @@ -411,9 +427,9 @@ COMMENT ON FUNCTION ST_ContainsProperly(geometry , geometry ) IS 'args: geomA, geomB - Returns true if B intersects the interior of A but not the boundary (or exterior). A does not contain properly itself, but does contain itself.'; -COMMENT ON FUNCTION ST_Covers(geometry , geometry ) IS 'args: geomA, geomB - Returns 1 (TRUE) if no point in Geometry B is outside Geometry A. For geography: if geography point B is not outside Polygon Geography A'; +COMMENT ON FUNCTION ST_Covers(geometry , geometry ) IS 'args: geomA, geomB - Returns 1 (TRUE) if no point in Geometry B is outside Geometry A'; -COMMENT ON FUNCTION ST_Covers(geography , geography ) IS 'args: geogpolyA, geogpointB - Returns 1 (TRUE) if no point in Geometry B is outside Geometry A. For geography: if geography point B is not outside Polygon Geography A'; +COMMENT ON FUNCTION ST_Covers(geography , geography ) IS 'args: geogpolyA, geogpointB - Returns 1 (TRUE) if no point in Geometry B is outside Geometry A'; COMMENT ON FUNCTION ST_CoveredBy(geometry , geometry ) IS 'args: geomA, geomB - Returns 1 (TRUE) if no point in Geometry/Geography A is outside Geometry/Geography B'; @@ -437,7 +453,7 @@ COMMENT ON FUNCTION ST_MaxDistance(geometry , geometry ) IS 'args: g1, g2 - Returns the 2-dimensional largest distance between two geometries in projected units.'; -COMMENT ON FUNCTION ST_Distance_Sphere(geometry , geometry ) IS 'args: geomlonlatA, geomlonlatB - Returns minimum distance in meters between two lon/lat geometries. Uses a spherical earth and radius of 6370986 meters. Faster than ST_Distance_Spheroid, but less accurate. PostGIS versions prior to 1.5 only implemented for points.'; +COMMENT ON FUNCTION ST_Distance_Sphere(geometry , geometry ) IS 'args: geomlonlatA, geomlonlatB - Returns minimum distance in meters between two lon/lat geometries. Uses a spherical earth and radius of 6370986 meters. Faster than ST_Distance_Spheroid , but less accurate. PostGIS versions prior to 1.5 only implemented for points.'; COMMENT ON FUNCTION ST_Distance_Spheroid(geometry , geometry , spheroid ) IS 'args: geomlonlatA, geomlonlatB, measurement_spheroid - Returns the minimum distance between two lon/lat geometries given a particular spheroid. PostGIS versions prior to 1.5 only support points.'; @@ -453,25 +469,23 @@ COMMENT ON FUNCTION ST_HasArc(geometry ) IS 'args: geomA - Returns true if a geometry or geometry collection contains a circular string'; -COMMENT ON FUNCTION ST_Intersects(geometry, geometry) IS 'args: geomA, geomB - Returns TRUE if the Geometries/Geography "spatially intersect" - (share any portion of space) and FALSE if they dont (they are Disjoint). For geography -- tolerance is 0.00001 meters (so any points that close are considered to intersect)'; +COMMENT ON FUNCTION ST_Intersects(geometry, geometry) IS 'args: geomA, geomB - Returns TRUE if the Geometries/Geography "spatially intersect in 2D" - (share any portion of space) and FALSE if they dont (they are Disjoint). For geography -- tolerance is 0.00001 meters (so any points that close are considered to intersect)'; -COMMENT ON FUNCTION ST_Intersects(geography, geography) IS 'args: geogA, geogB - Returns TRUE if the Geometries/Geography "spatially intersect" - (share any portion of space) and FALSE if they dont (they are Disjoint). For geography -- tolerance is 0.00001 meters (so any points that close are considered to intersect)'; +COMMENT ON FUNCTION ST_Intersects(geography, geography) IS 'args: geogA, geogB - Returns TRUE if the Geometries/Geography "spatially intersect in 2D" - (share any portion of space) and FALSE if they dont (they are Disjoint). For geography -- tolerance is 0.00001 meters (so any points that close are considered to intersect)'; COMMENT ON FUNCTION ST_Length(geometry ) IS 'args: a_2dlinestring - Returns the 2d length of the geometry if it is a linestring or multilinestring. geometry are in units of spatial reference and geography are in meters (default spheroid)'; -COMMENT ON FUNCTION ST_Length(geography ) IS 'args: gg - Returns the 2d length of the geometry if it is a linestring or multilinestring. geometry are in units of spatial reference and geography are in meters (default spheroid)'; - -COMMENT ON FUNCTION ST_Length(geography , boolean ) IS 'args: gg, use_spheroid - Returns the 2d length of the geometry if it is a linestring or multilinestring. geometry are in units of spatial reference and geography are in meters (default spheroid)'; +COMMENT ON FUNCTION ST_Length(geography , boolean ) IS 'args: geog, use_spheroid=true - Returns the 2d length of the geometry if it is a linestring or multilinestring. geometry are in units of spatial reference and geography are in meters (default spheroid)'; COMMENT ON FUNCTION ST_Length2D(geometry ) IS 'args: a_2dlinestring - Returns the 2-dimensional length of the geometry if it is a linestring or multi-linestring. This is an alias for ST_Length'; -COMMENT ON FUNCTION ST_Length3D(geometry ) IS 'args: a_3dlinestring - Returns the 3-dimensional or 2-dimensional length of the geometry if it is a linestring or multi-linestring.'; +COMMENT ON FUNCTION ST_3DLength(geometry ) IS 'args: a_3dlinestring - Returns the 3-dimensional or 2-dimensional length of the geometry if it is a linestring or multi-linestring.'; COMMENT ON FUNCTION ST_Length_Spheroid(geometry , spheroid ) IS 'args: a_linestring, a_spheroid - Calculates the 2D or 3D length of a linestring/multilinestring on an ellipsoid. This is useful if the coordinates of the geometry are in longitude/latitude and a length is desired without reprojection.'; COMMENT ON FUNCTION ST_Length2D_Spheroid(geometry , spheroid ) IS 'args: a_linestring, a_spheroid - Calculates the 2D length of a linestring/multilinestring on an ellipsoid. This is useful if the coordinates of the geometry are in longitude/latitude and a length is desired without reprojection.'; -COMMENT ON FUNCTION ST_Length3D_Spheroid(geometry , spheroid ) IS 'args: a_linestring, a_spheroid - Calculates the length of a geometry on an ellipsoid, taking the elevation into account. This is just an alias for ST_Length_Spheroid.'; +COMMENT ON FUNCTION ST_3DLength_Spheroid(geometry , spheroid ) IS 'args: a_linestring, a_spheroid - Calculates the length of a geometry on an ellipsoid, taking the elevation into account. This is just an alias for ST_Length_Spheroid.'; COMMENT ON FUNCTION ST_LongestLine(geometry , geometry ) IS 'args: g1, g2 - Returns the 2-dimensional longest line points of two geometries. The function will only return the first longest line if more than one, that the function finds. The line returned will always start in g1 and end in g2. The length of the line this function returns will always be the same as st_maxdistance returns for g1 and g2.'; @@ -479,18 +493,26 @@ COMMENT ON FUNCTION ST_Overlaps(geometry , geometry ) IS 'args: A, B - Returns TRUE if the Geometries share space, are of the same dimension, but are not completely contained by each other.'; -COMMENT ON FUNCTION ST_Perimeter(geometry ) IS 'args: g1 - Return the length measurement of the boundary of an ST_Surface or ST_MultiSurface value. (Polygon, Multipolygon)'; +COMMENT ON FUNCTION ST_Perimeter(geometry ) IS 'args: g1 - Return the length measurement of the boundary of an ST_Surface or ST_MultiSurface geometry or geography. (Polygon, Multipolygon). geometry measurement is in units of spatial reference and geography is in meters.'; + +COMMENT ON FUNCTION ST_Perimeter(geography , boolean ) IS 'args: geog, use_spheroid=true - Return the length measurement of the boundary of an ST_Surface or ST_MultiSurface geometry or geography. (Polygon, Multipolygon). geometry measurement is in units of spatial reference and geography is in meters.'; COMMENT ON FUNCTION ST_Perimeter2D(geometry ) IS 'args: geomA - Returns the 2-dimensional perimeter of the geometry, if it is a polygon or multi-polygon. This is currently an alias for ST_Perimeter.'; -COMMENT ON FUNCTION ST_Perimeter3D(geometry ) IS 'args: geomA - Returns the 3-dimensional perimeter of the geometry, if it is a polygon or multi-polygon.'; +COMMENT ON FUNCTION ST_3DPerimeter(geometry ) IS 'args: geomA - Returns the 3-dimensional perimeter of the geometry, if it is a polygon or multi-polygon.'; COMMENT ON FUNCTION ST_PointOnSurface(geometry ) IS 'args: g1 - Returns a POINT guaranteed to lie on the surface.'; +COMMENT ON FUNCTION ST_Project(geography , float , float ) IS 'args: g1, distance, azimuth - Returns a POINT projected from a start point using a bearing and distance.'; + COMMENT ON FUNCTION ST_Relate(geometry , geometry , text ) IS 'args: geomA, geomB, intersectionMatrixPattern - Returns true if this Geometry is spatially related to anotherGeometry, by testing for intersections between the Interior, Boundary and Exterior of the two geometries as specified by the values in the intersectionMatrixPattern. If no intersectionMatrixPattern is passed in, then returns the maximum intersectionMatrixPattern that relates the 2 geometries.'; COMMENT ON FUNCTION ST_Relate(geometry , geometry ) IS 'args: geomA, geomB - Returns true if this Geometry is spatially related to anotherGeometry, by testing for intersections between the Interior, Boundary and Exterior of the two geometries as specified by the values in the intersectionMatrixPattern. If no intersectionMatrixPattern is passed in, then returns the maximum intersectionMatrixPattern that relates the 2 geometries.'; +COMMENT ON FUNCTION ST_Relate(geometry , geometry , int ) IS 'args: geomA, geomB, BoundaryNodeRule - Returns true if this Geometry is spatially related to anotherGeometry, by testing for intersections between the Interior, Boundary and Exterior of the two geometries as specified by the values in the intersectionMatrixPattern. If no intersectionMatrixPattern is passed in, then returns the maximum intersectionMatrixPattern that relates the 2 geometries.'; + +COMMENT ON FUNCTION ST_RelateMatch(text , text ) IS 'args: intersectionMatrix, intersectionMatrixPattern - Returns true if intersectionMattrixPattern1 implies intersectionMatrixPattern2'; + COMMENT ON FUNCTION ST_ShortestLine(geometry , geometry ) IS 'args: g1, g2 - Returns the 2-dimensional shortest line between two geometries'; COMMENT ON FUNCTION ST_Touches(geometry , geometry ) IS 'args: g1, g2 - Returns TRUE if the geometries have at least one point in common, but their interiors do not intersect.'; @@ -513,6 +535,8 @@ COMMENT ON FUNCTION ST_Collect(geometry[]) IS 'args: g1_array - Return a specified ST_Geometry value from a collection of other geometries.'; +COMMENT ON FUNCTION ST_ConcaveHull(geometry , float , boolean ) IS 'args: geomA, target_percent, allow_holes=false - The concave hull of a geometry represents a possibly concave geometry that encloses all geometries within the set. You can think of it as shrink wrapping.'; + COMMENT ON FUNCTION ST_ConvexHull(geometry ) IS 'args: geomA - The convex hull of a geometry represents the minimum convex geometry that encloses all geometries within the set.'; COMMENT ON FUNCTION ST_CurveToLine(geometry) IS 'args: curveGeom - Converts a CIRCULARSTRING/CURVEDPOLYGON to a LINESTRING/POLYGON'; @@ -527,28 +551,40 @@ COMMENT ON FUNCTION ST_DumpRings(geometry ) IS 'args: a_polygon - Returns a set of geometry_dump rows, representing the exterior and interior rings of a polygon.'; +COMMENT ON FUNCTION ST_FlipCoordinates(geometry) IS 'args: geom - Returns a version of the given geometry with X and Y axis flipped. Useful for people who have built latitude/longitude features and need to fix them.'; + COMMENT ON FUNCTION ST_Intersection(geometry, geometry) IS 'args: geomA, geomB - (T) Returns a geometry that represents the shared portion of geomA and geomB. The geography implementation does a transform to geometry to do the intersection and then transform back to WGS84.'; COMMENT ON FUNCTION ST_Intersection(geography, geography) IS 'args: geogA, geogB - (T) Returns a geometry that represents the shared portion of geomA and geomB. The geography implementation does a transform to geometry to do the intersection and then transform back to WGS84.'; COMMENT ON FUNCTION ST_LineToCurve(geometry ) IS 'args: geomANoncircular - Converts a LINESTRING/POLYGON to a CIRCULARSTRING, CURVED POLYGON'; -COMMENT ON AGGREGATE ST_MemUnion(geometry) IS 'args: geomfield - Same as ST_Union, only memory-friendly (uses less memory and more processor time).'; +COMMENT ON FUNCTION ST_MakeValid(geometry) IS 'args: input - Attempts to make an invalid geometry valid w/out loosing vertices.'; -COMMENT ON FUNCTION ST_MinimumBoundingCircle(geometry ) IS 'args: geomA - Returns the smallest circle polygon that can fully contain a geometry. Default uses 48 segments per quarter circle.'; +COMMENT ON AGGREGATE ST_MemUnion(geometry) IS 'args: geomfield - Same as ST_Union, only memory-friendly (uses less memory and more processor time).'; -COMMENT ON FUNCTION ST_MinimumBoundingCircle(geometry , integer ) IS 'args: geomA, num_segs_per_qt_circ - Returns the smallest circle polygon that can fully contain a geometry. Default uses 48 segments per quarter circle.'; +COMMENT ON FUNCTION ST_MinimumBoundingCircle(geometry , integer ) IS 'args: geomA, num_segs_per_qt_circ=48 - Returns the smallest circle polygon that can fully contain a geometry. Default uses 48 segments per quarter circle.'; COMMENT ON AGGREGATE ST_Polygonize(geometry) IS 'args: geomfield - Aggregate. Creates a GeometryCollection containing possible polygons formed from the constituent linework of a set of geometries.'; COMMENT ON FUNCTION ST_Polygonize(geometry[]) IS 'args: geom_array - Aggregate. Creates a GeometryCollection containing possible polygons formed from the constituent linework of a set of geometries.'; +COMMENT ON FUNCTION ST_Node(geometry ) IS 'args: geom - Node a set of linestrings.'; + +COMMENT ON FUNCTION ST_OffsetCurve(geometry , float , text ) IS 'args: line, signed_distance, style_parameters='' - Return an offset line at a given distance and side from an input line. Useful for computing parallel lines about a center line'; + +COMMENT ON FUNCTION ST_RemoveRepeatedPoints(geometry) IS 'args: geom - Returns a version of the given geometry with duplicated points removed.'; + +COMMENT ON FUNCTION ST_SharedPaths(geometry, geometry) IS 'args: lineal1, lineal2 - Returns a collection containing paths shared by the two input linestrings/multilinestrings.'; + COMMENT ON FUNCTION ST_Shift_Longitude(geometry ) IS 'args: geomA - Reads every point/vertex in every component of every feature in a geometry, and if the longitude coordinate is <0, adds 360 to it. The result would be a 0-360 version of the data to be plotted in a 180 centric map'; COMMENT ON FUNCTION ST_Simplify(geometry, float) IS 'args: geomA, tolerance - Returns a "simplified" version of the given geometry using the Douglas-Peucker algorithm.'; COMMENT ON FUNCTION ST_SimplifyPreserveTopology(geometry, float) IS 'args: geomA, tolerance - Returns a "simplified" version of the given geometry using the Douglas-Peucker algorithm. Will avoid creating derived geometries (polygons in particular) that are invalid.'; +COMMENT ON FUNCTION ST_Split(geometry, geometry) IS 'args: input, blade - Returns a collection of geometries resulting by splitting a geometry.'; + COMMENT ON FUNCTION ST_SymDifference(geometry , geometry ) IS 'args: geomA, geomB - Returns a geometry that represents the portions of A and B that do not intersect. It is called a symmetric difference because ST_SymDifference(A,B) = ST_SymDifference(B,A).'; COMMENT ON AGGREGATE ST_Union(geometry) IS 'args: g1field - Returns a geometry that represents the point set union of the Geometries.'; @@ -557,18 +593,22 @@ COMMENT ON FUNCTION ST_Union(geometry[]) IS 'args: g1_array - Returns a geometry that represents the point set union of the Geometries.'; +COMMENT ON FUNCTION ST_UnaryUnion(geometry ) IS 'args: geom - Like ST_Union, but working at the geometry component level.'; + COMMENT ON FUNCTION ST_Line_Interpolate_Point(geometry , float ) IS 'args: a_linestring, a_fraction - Returns a point interpolated along a line. Second argument is a float8 between 0 and 1 representing fraction of total length of linestring the point has to be located.'; COMMENT ON FUNCTION ST_Line_Locate_Point(geometry , geometry ) IS 'args: a_linestring, a_point - Returns a float between 0 and 1 representing the location of the closest point on LineString to the given Point, as a fraction of total 2d line length.'; COMMENT ON FUNCTION ST_Line_Substring(geometry , float , float ) IS 'args: a_linestring, startfraction, endfraction - Return a linestring being a substring of the input one starting and ending at the given fractions of total 2d length. Second and third arguments are float8 values between 0 and 1.'; -COMMENT ON FUNCTION ST_Locate_Along_Measure(geometry , float ) IS 'args: ageom_with_measure, a_measure - Return a derived geometry collection value with elements that match the specified measure. Polygonal elements are not supported.'; +COMMENT ON FUNCTION ST_LocateAlong(geometry , float , float ) IS 'args: ageom_with_measure, a_measure, offset - Return a derived geometry collection value with elements that match the specified measure. Polygonal elements are not supported.'; -COMMENT ON FUNCTION ST_Locate_Between_Measures(geometry , float , float ) IS 'args: geomA, measure_start, measure_end - Return a derived geometry collection value with elements that match the specified range of measures inclusively. Polygonal elements are not supported.'; +COMMENT ON FUNCTION ST_LocateBetween(geometry , float , float , float ) IS 'args: geomA, measure_start, measure_end, offset - Return a derived geometry collection value with elements that match the specified range of measures inclusively. Polygonal elements are not supported.'; COMMENT ON FUNCTION ST_LocateBetweenElevations(geometry , float , float ) IS 'args: geom_mline, elevation_start, elevation_end - Return a derived geometry (collection) value with elements that intersect the specified range of elevations inclusively. Only 3D, 4D LINESTRINGS and MULTILINESTRINGS are supported.'; +COMMENT ON FUNCTION ST_InterpolatePoint(geometry , geometry ) IS 'args: line, point - Return the value of the measure dimension of a geometry at the point closed to the provided point.'; + COMMENT ON FUNCTION ST_AddMeasure(geometry , float , float ) IS 'args: geom_mline, measure_start, measure_end - Return a derived geometry with measure elements linearly interpolated between the start and end points. If the geometry has no measure dimension, one is added. If the geometry has a measure dimension, it is over-written with new values. Only LINESTRINGS and MULTILINESTRINGS are supported.'; COMMENT ON FUNCTION AddAuth(text ) IS 'args: auth_token - Add an authorization token to be used in current transaction.'; @@ -607,25 +647,13 @@ COMMENT ON AGGREGATE ST_Extent(geometry) IS 'args: geomfield - an aggregate function that returns the bounding box that bounds rows of geometries.'; -COMMENT ON AGGREGATE ST_Extent3D(geometry) IS 'args: geomfield - an aggregate function that returns the box3D bounding box that bounds rows of geometries.'; +COMMENT ON AGGREGATE ST_3DExtent(geometry) IS 'args: geomfield - an aggregate function that returns the box3D bounding box that bounds rows of geometries.'; COMMENT ON FUNCTION Find_SRID(varchar , varchar , varchar ) IS 'args: a_schema_name, a_table_name, a_geomfield_name - The syntax is find_srid(, , ) and the function returns the integer SRID of the specified column by searching through the GEOMETRY_COLUMNS table.'; COMMENT ON FUNCTION ST_Mem_Size(geometry ) IS 'args: geomA - Returns the amount of space (in bytes) the geometry takes.'; -COMMENT ON FUNCTION ST_Point_Inside_Circle(geometry , float , float , float ) IS 'args: a_point, center_x, center_y, radius - Is the point geometry insert circle defined by center_x, center_y , radius'; - -COMMENT ON FUNCTION ST_XMax(box3d ) IS 'args: aGeomorBox2DorBox3D - Returns X maxima of a bounding box 2d or 3d or a geometry.'; - -COMMENT ON FUNCTION ST_XMin(box3d ) IS 'args: aGeomorBox2DorBox3D - Returns X minima of a bounding box 2d or 3d or a geometry.'; - -COMMENT ON FUNCTION ST_YMax(box3d ) IS 'args: aGeomorBox2DorBox3D - Returns Y maxima of a bounding box 2d or 3d or a geometry.'; - -COMMENT ON FUNCTION ST_YMin(box3d ) IS 'args: aGeomorBox2DorBox3D - Returns Y minima of a bounding box 2d or 3d or a geometry.'; - -COMMENT ON FUNCTION ST_ZMax(box3d ) IS 'args: aGeomorBox2DorBox3D - Returns Z minima of a bounding box 2d or 3d or a geometry.'; - -COMMENT ON FUNCTION ST_ZMin(box3d ) IS 'args: aGeomorBox2DorBox3D - Returns Z minima of a bounding box 2d or 3d or a geometry.'; +COMMENT ON FUNCTION ST_Point_Inside_Circle(geometry , float , float , float ) IS 'args: a_point, center_x, center_y, radius - Is the point geometry insert circle defined by center_x, center_y, radius'; COMMENT ON FUNCTION PostGIS_AddBBox(geometry ) IS 'args: geomA - Add bounding box to the geometry.'; diff -Nru postgis-1.5.3/doc/raster_comments.sql postgis-2.0.1/doc/raster_comments.sql --- postgis-1.5.3/doc/raster_comments.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/raster_comments.sql 2012-06-22 21:04:59.000000000 +0000 @@ -0,0 +1,426 @@ + +COMMENT ON FUNCTION AddRasterConstraints(name , name , boolean , boolean , boolean , boolean , boolean , boolean , boolean , boolean , boolean , boolean , boolean , boolean ) IS 'args: rasttable, rastcolumn, srid, scale_x, scale_y, blocksize_x, blocksize_y, same_alignment, regular_blocking, num_bands=true, pixel_types=true, nodata_values=true, out_db=true, extent=true - Adds raster constraints to a loaded raster table for a specific column that constrains spatial ref, scaling, blocksize, alignment, bands, band type and a flag to denote if raster column is regularly blocked. The table must be loaded with data for the constraints to be inferred. Returns true of the constraint setting was accomplished and if issues a notice.'; + +COMMENT ON FUNCTION AddRasterConstraints(name , name , text[] ) IS 'args: rasttable, rastcolumn, VARIADIC constraints - Adds raster constraints to a loaded raster table for a specific column that constrains spatial ref, scaling, blocksize, alignment, bands, band type and a flag to denote if raster column is regularly blocked. The table must be loaded with data for the constraints to be inferred. Returns true of the constraint setting was accomplished and if issues a notice.'; + +COMMENT ON FUNCTION AddRasterConstraints(name , name , name , text[] ) IS 'args: rastschema, rasttable, rastcolumn, VARIADIC constraints - Adds raster constraints to a loaded raster table for a specific column that constrains spatial ref, scaling, blocksize, alignment, bands, band type and a flag to denote if raster column is regularly blocked. The table must be loaded with data for the constraints to be inferred. Returns true of the constraint setting was accomplished and if issues a notice.'; + +COMMENT ON FUNCTION AddRasterConstraints(name , name , name , boolean , boolean , boolean , boolean , boolean , boolean , boolean , boolean , boolean , boolean , boolean , boolean ) IS 'args: rastschema, rasttable, rastcolumn, srid=true, scale_x=true, scale_y=true, blocksize_x=true, blocksize_y=true, same_alignment=true, regular_blocking=true, num_bands=true, pixel_types=true, nodata_values=true, out_db=true, extent=true - Adds raster constraints to a loaded raster table for a specific column that constrains spatial ref, scaling, blocksize, alignment, bands, band type and a flag to denote if raster column is regularly blocked. The table must be loaded with data for the constraints to be inferred. Returns true of the constraint setting was accomplished and if issues a notice.'; + +COMMENT ON FUNCTION DropRasterConstraints(name , name , boolean , boolean , boolean , boolean , boolean , boolean , boolean , boolean , boolean , boolean , boolean , boolean ) IS 'args: rasttable, rastcolumn, srid, scale_x, scale_y, blocksize_x, blocksize_y, same_alignment, regular_blocking, num_bands=true, pixel_types=true, nodata_values=true, out_db=true, extent=true - Drops PostGIS raster constraints that refer to a raster table column. Useful if you need to reload data or update your raster column data.'; + +COMMENT ON FUNCTION DropRasterConstraints(name , name , name , boolean , boolean , boolean , boolean , boolean , boolean , boolean , boolean , boolean , boolean , boolean , boolean ) IS 'args: rastschema, rasttable, rastcolumn, srid=true, scale_x=true, scale_y=true, blocksize_x=true, blocksize_y=true, same_alignment=true, regular_blocking=true, num_bands=true, pixel_types=true, nodata_values=true, out_db=true, extent=true - Drops PostGIS raster constraints that refer to a raster table column. Useful if you need to reload data or update your raster column data.'; + +COMMENT ON FUNCTION DropRasterConstraints(name , name , name , text[] ) IS 'args: rastschema, rasttable, rastcolumn, constraints - Drops PostGIS raster constraints that refer to a raster table column. Useful if you need to reload data or update your raster column data.'; + +COMMENT ON FUNCTION PostGIS_Raster_Lib_Build_Date() IS 'Reports full raster library build date.'; + +COMMENT ON FUNCTION PostGIS_Raster_Lib_Version() IS 'Reports full raster version and build configuration infos.'; + +COMMENT ON FUNCTION ST_GDALDrivers() IS 'args: OUT idx, OUT short_name, OUT long_name, OUT create_options - Returns a list of raster formats supported by your lib gdal. These are the formats you can output your raster using ST_AsGDALRaster.'; + +COMMENT ON FUNCTION ST_AddBand(raster , text , double precision , double precision ) IS 'args: rast, pixeltype, initialvalue=0, nodataval=NULL - Returns a raster with the new band(s) of given type added with given initial value in the given index location. If no index is specified, the band is added to the end.'; + +COMMENT ON FUNCTION ST_AddBand(raster , integer , text , double precision , double precision ) IS 'args: rast, index, pixeltype, initialvalue=0, nodataval=NULL - Returns a raster with the new band(s) of given type added with given initial value in the given index location. If no index is specified, the band is added to the end.'; + +COMMENT ON FUNCTION ST_AddBand(raster , raster , integer , integer ) IS 'args: torast, fromrast, fromband=1, torastindex=at_end - Returns a raster with the new band(s) of given type added with given initial value in the given index location. If no index is specified, the band is added to the end.'; + +COMMENT ON FUNCTION ST_AddBand(raster , raster[] , integer ) IS 'args: torast, fromrasts, fromband=1 - Returns a raster with the new band(s) of given type added with given initial value in the given index location. If no index is specified, the band is added to the end.'; + +COMMENT ON FUNCTION ST_AsRaster(geometry , raster , text , double precision , double precision , boolean ) IS 'args: geom, ref, pixeltype, value=1, nodataval=0, touched=false - Converts a PostGIS geometry to a PostGIS raster.'; + +COMMENT ON FUNCTION ST_AsRaster(geometry , raster , text[] , double precision[] , double precision[] , boolean ) IS 'args: geom, ref, pixeltype=ARRAY[''8BUI''], value=ARRAY[1], nodataval=ARRAY[0], touched=false - Converts a PostGIS geometry to a PostGIS raster.'; + +COMMENT ON FUNCTION ST_AsRaster(geometry , double precision , double precision , double precision , double precision , text , double precision , double precision , double precision , double precision , boolean ) IS 'args: geom, scalex, scaley, gridx, gridy, pixeltype, value=1, nodataval=0, skewx=0, skewy=0, touched=false - Converts a PostGIS geometry to a PostGIS raster.'; + +COMMENT ON FUNCTION ST_AsRaster(geometry , double precision , double precision , double precision , double precision , text[] , double precision[] , double precision[] , double precision , double precision , boolean ) IS 'args: geom, scalex, scaley, gridx=NULL, gridy=NULL, pixeltype=ARRAY[''8BUI''], value=ARRAY[1], nodataval=ARRAY[0], skewx=0, skewy=0, touched=false - Converts a PostGIS geometry to a PostGIS raster.'; + +COMMENT ON FUNCTION ST_AsRaster(geometry , double precision , double precision , text , double precision , double precision , double precision , double precision , double precision , double precision , boolean ) IS 'args: geom, scalex, scaley, pixeltype, value=1, nodataval=0, upperleftx=NULL, upperlefty=NULL, skewx=0, skewy=0, touched=false - Converts a PostGIS geometry to a PostGIS raster.'; + +COMMENT ON FUNCTION ST_AsRaster(geometry , double precision , double precision , text[] , double precision[] , double precision[] , double precision , double precision , double precision , double precision , boolean ) IS 'args: geom, scalex, scaley, pixeltype, value=ARRAY[1], nodataval=ARRAY[0], upperleftx=NULL, upperlefty=NULL, skewx=0, skewy=0, touched=false - Converts a PostGIS geometry to a PostGIS raster.'; + +COMMENT ON FUNCTION ST_AsRaster(geometry , integer , integer , double precision , double precision , text , double precision , double precision , double precision , double precision , boolean ) IS 'args: geom, width, height, gridx, gridy, pixeltype, value=1, nodataval=0, skewx=0, skewy=0, touched=false - Converts a PostGIS geometry to a PostGIS raster.'; + +COMMENT ON FUNCTION ST_AsRaster(geometry , integer , integer , double precision , double precision , text[] , double precision[] , double precision[] , double precision , double precision , boolean ) IS 'args: geom, width, height, gridx=NULL, gridy=NULL, pixeltype=ARRAY[''8BUI''], value=ARRAY[1], nodataval=ARRAY[0], skewx=0, skewy=0, touched=false - Converts a PostGIS geometry to a PostGIS raster.'; + +COMMENT ON FUNCTION ST_AsRaster(geometry , integer , integer , text , double precision , double precision , double precision , double precision , double precision , double precision , boolean ) IS 'args: geom, width, height, pixeltype, value=1, nodataval=0, upperleftx=NULL, upperlefty=NULL, skewx=0, skewy=0, touched=false - Converts a PostGIS geometry to a PostGIS raster.'; + +COMMENT ON FUNCTION ST_AsRaster(geometry , integer , integer , text[] , double precision[] , double precision[] , double precision , double precision , double precision , double precision , boolean ) IS 'args: geom, width, height, pixeltype, value=ARRAY[1], nodataval=ARRAY[0], upperleftx=NULL, upperlefty=NULL, skewx=0, skewy=0, touched=false - Converts a PostGIS geometry to a PostGIS raster.'; + +COMMENT ON FUNCTION ST_Band(raster , integer[] ) IS 'args: rast, nbands = ARRAY[1] - Returns one or more bands of an existing raster as a new raster. Useful for building new rasters from existing rasters.'; + +COMMENT ON FUNCTION ST_Band(raster , text , character ) IS 'args: rast, nbands, delimiter=, - Returns one or more bands of an existing raster as a new raster. Useful for building new rasters from existing rasters.'; + +COMMENT ON FUNCTION ST_Band(raster , integer ) IS 'args: rast, nband - Returns one or more bands of an existing raster as a new raster. Useful for building new rasters from existing rasters.'; + +COMMENT ON FUNCTION ST_MakeEmptyRaster(raster ) IS 'args: rast - Returns an empty raster (having no bands) of given dimensions (width & height), upperleft X and Y, pixel size and rotation (scalex, scaley, skewx & skewy) and reference system (srid). If a raster is passed in, returns a new raster with the same size, alignment and SRID. If srid is left out, the spatial ref is set to unknown (0).'; + +COMMENT ON FUNCTION ST_MakeEmptyRaster(integer , integer , float8 , float8 , float8 , float8 , float8 , float8 , integer ) IS 'args: width, height, upperleftx, upperlefty, scalex, scaley, skewx, skewy, srid=unknown - Returns an empty raster (having no bands) of given dimensions (width & height), upperleft X and Y, pixel size and rotation (scalex, scaley, skewx & skewy) and reference system (srid). If a raster is passed in, returns a new raster with the same size, alignment and SRID. If srid is left out, the spatial ref is set to unknown (0).'; + +COMMENT ON FUNCTION ST_MakeEmptyRaster(integer , integer , float8 , float8 , float8 ) IS 'args: width, height, upperleftx, upperlefty, pixelsize - Returns an empty raster (having no bands) of given dimensions (width & height), upperleft X and Y, pixel size and rotation (scalex, scaley, skewx & skewy) and reference system (srid). If a raster is passed in, returns a new raster with the same size, alignment and SRID. If srid is left out, the spatial ref is set to unknown (0).'; + +COMMENT ON FUNCTION ST_GeoReference(raster , text ) IS 'args: rast, format=GDAL - Returns the georeference meta data in GDAL or ESRI format as commonly seen in a world file. Default is GDAL.'; + +COMMENT ON FUNCTION ST_Height(raster ) IS 'args: rast - Returns the height of the raster in pixels.'; + +COMMENT ON FUNCTION ST_MetaData(raster ) IS 'args: rast - Returns basic meta data about a raster object such as pixel size, rotation (skew), upper, lower left, etc.'; + +COMMENT ON FUNCTION ST_NumBands(raster ) IS 'args: rast - Returns the number of bands in the raster object.'; + +COMMENT ON FUNCTION ST_PixelHeight(raster ) IS 'args: rast - Returns the pixel height in geometric units of the spatial reference system.'; + +COMMENT ON FUNCTION ST_PixelWidth(raster ) IS 'args: rast - Returns the pixel width in geometric units of the spatial reference system.'; + +COMMENT ON FUNCTION ST_ScaleX(raster ) IS 'args: rast - Returns the X component of the pixel width in units of coordinate reference system.'; + +COMMENT ON FUNCTION ST_ScaleY(raster ) IS 'args: rast - Returns the Y component of the pixel height in units of coordinate reference system.'; + +COMMENT ON FUNCTION ST_Raster2WorldCoordX(raster , integer ) IS 'args: rast, xcolumn - Returns the geometric X coordinate upper left of a raster, column and row. Numbering of columns and rows starts at 1.'; + +COMMENT ON FUNCTION ST_Raster2WorldCoordX(raster , integer , integer ) IS 'args: rast, xcolumn, yrow - Returns the geometric X coordinate upper left of a raster, column and row. Numbering of columns and rows starts at 1.'; + +COMMENT ON FUNCTION ST_Raster2WorldCoordY(raster , integer ) IS 'args: rast, yrow - Returns the geometric Y coordinate upper left corner of a raster, column and row. Numbering of columns and rows starts at 1.'; + +COMMENT ON FUNCTION ST_Raster2WorldCoordY(raster , integer , integer ) IS 'args: rast, xcolumn, yrow - Returns the geometric Y coordinate upper left corner of a raster, column and row. Numbering of columns and rows starts at 1.'; + +COMMENT ON FUNCTION ST_Rotation(raster) IS 'args: rast - Returns the rotation of the raster in radian.'; + +COMMENT ON FUNCTION ST_SkewX(raster ) IS 'args: rast - Returns the georeference X skew (or rotation parameter).'; + +COMMENT ON FUNCTION ST_SkewY(raster ) IS 'args: rast - Returns the georeference Y skew (or rotation parameter).'; + +COMMENT ON FUNCTION ST_SRID(raster ) IS 'args: rast - Returns the spatial reference identifier of the raster as defined in spatial_ref_sys table.'; + +COMMENT ON FUNCTION ST_UpperLeftX(raster ) IS 'args: rast - Returns the upper left X coordinate of raster in projected spatial ref.'; + +COMMENT ON FUNCTION ST_UpperLeftY(raster ) IS 'args: rast - Returns the upper left Y coordinate of raster in projected spatial ref.'; + +COMMENT ON FUNCTION ST_Width(raster ) IS 'args: rast - Returns the width of the raster in pixels.'; + +COMMENT ON FUNCTION ST_World2RasterCoordX(raster , geometry ) IS 'args: rast, pt - Returns the column in the raster of the point geometry (pt) or a X and Y world coordinate (xw, yw) represented in world spatial reference system of raster.'; + +COMMENT ON FUNCTION ST_World2RasterCoordX(raster , double precision ) IS 'args: rast, xw - Returns the column in the raster of the point geometry (pt) or a X and Y world coordinate (xw, yw) represented in world spatial reference system of raster.'; + +COMMENT ON FUNCTION ST_World2RasterCoordX(raster , double precision , double precision ) IS 'args: rast, xw, yw - Returns the column in the raster of the point geometry (pt) or a X and Y world coordinate (xw, yw) represented in world spatial reference system of raster.'; + +COMMENT ON FUNCTION ST_World2RasterCoordY(raster , geometry ) IS 'args: rast, pt - Returns the row in the raster of the point geometry (pt) or a X and Y world coordinate (xw, yw) represented in world spatial reference system of raster.'; + +COMMENT ON FUNCTION ST_World2RasterCoordY(raster , double precision ) IS 'args: rast, xw - Returns the row in the raster of the point geometry (pt) or a X and Y world coordinate (xw, yw) represented in world spatial reference system of raster.'; + +COMMENT ON FUNCTION ST_World2RasterCoordY(raster , double precision , double precision ) IS 'args: rast, xw, yw - Returns the row in the raster of the point geometry (pt) or a X and Y world coordinate (xw, yw) represented in world spatial reference system of raster.'; + +COMMENT ON FUNCTION ST_IsEmpty(raster ) IS 'args: rast - Returns true if the raster is empty (width = 0 and height = 0). Otherwise, returns false.'; + +COMMENT ON FUNCTION ST_BandMetaData(raster , integer ) IS 'args: rast, bandnum=1 - Returns basic meta data for a specific raster band. band num 1 is assumed if none-specified.'; + +COMMENT ON FUNCTION ST_BandNoDataValue(raster , integer ) IS 'args: rast, bandnum=1 - Returns the value in a given band that represents no data. If no band num 1 is assumed.'; + +COMMENT ON FUNCTION ST_BandIsNoData(raster , integer , boolean ) IS 'args: rast, band, forceChecking=true - Returns true if the band is filled with only nodata values.'; + +COMMENT ON FUNCTION ST_BandIsNoData(raster , boolean ) IS 'args: rast, forceChecking=true - Returns true if the band is filled with only nodata values.'; + +COMMENT ON FUNCTION ST_BandPath(raster , integer ) IS 'args: rast, bandnum=1 - Returns system file path to a band stored in file system. If no bandnum specified, 1 is assumed.'; + +COMMENT ON FUNCTION ST_BandPixelType(raster , integer ) IS 'args: rast, bandnum=1 - Returns the type of pixel for given band. If no bandnum specified, 1 is assumed.'; + +COMMENT ON FUNCTION ST_HasNoBand(raster , integer ) IS 'args: rast, bandnum=1 - Returns true if there is no band with given band number. If no band number is specified, then band number 1 is assumed.'; + +COMMENT ON FUNCTION ST_PixelAsPolygon(raster , integer , integer ) IS 'args: rast, columnx, rowy - Returns the geometry that bounds the pixel for a particular row and column.'; + +COMMENT ON FUNCTION ST_PixelAsPolygons(raster , integer ) IS 'args: rast, band=1 - Returns the geometry that bounds every pixel of a raster band along with the value, the X and the Y raster coordinates of each pixel.'; + +COMMENT ON FUNCTION ST_Value(raster , geometry , boolean ) IS 'args: rast, pt, exclude_nodata_value=true - Returns the value of a given band in a given columnx, rowy pixel or at a particular geometric point. Band numbers start at 1 and assumed to be 1 if not specified. If exclude_nodata_value is set to false, then all pixels include nodata pixels are considered to intersect and return value. If exclude_nodata_value is not passed in then reads it from metadata of raster.'; + +COMMENT ON FUNCTION ST_Value(raster , integer , geometry , boolean ) IS 'args: rast, bandnum, pt, exclude_nodata_value=true - Returns the value of a given band in a given columnx, rowy pixel or at a particular geometric point. Band numbers start at 1 and assumed to be 1 if not specified. If exclude_nodata_value is set to false, then all pixels include nodata pixels are considered to intersect and return value. If exclude_nodata_value is not passed in then reads it from metadata of raster.'; + +COMMENT ON FUNCTION ST_Value(raster , integer , integer , boolean ) IS 'args: rast, columnx, rowy, exclude_nodata_value=true - Returns the value of a given band in a given columnx, rowy pixel or at a particular geometric point. Band numbers start at 1 and assumed to be 1 if not specified. If exclude_nodata_value is set to false, then all pixels include nodata pixels are considered to intersect and return value. If exclude_nodata_value is not passed in then reads it from metadata of raster.'; + +COMMENT ON FUNCTION ST_Value(raster , integer , integer , integer , boolean ) IS 'args: rast, bandnum, columnx, rowy, exclude_nodata_value=true - Returns the value of a given band in a given columnx, rowy pixel or at a particular geometric point. Band numbers start at 1 and assumed to be 1 if not specified. If exclude_nodata_value is set to false, then all pixels include nodata pixels are considered to intersect and return value. If exclude_nodata_value is not passed in then reads it from metadata of raster.'; + +COMMENT ON FUNCTION ST_SetValue(raster , geometry , double precision ) IS 'args: rast, pt, newvalue - Returns modified raster resulting from setting the value of a given band in a given columnx, rowy pixel or at a pixel that intersects a particular geometric point. Band numbers start at 1 and assumed to be 1 if not specified.'; + +COMMENT ON FUNCTION ST_SetValue(raster , integer , geometry , double precision ) IS 'args: rast, bandnum, pt, newvalue - Returns modified raster resulting from setting the value of a given band in a given columnx, rowy pixel or at a pixel that intersects a particular geometric point. Band numbers start at 1 and assumed to be 1 if not specified.'; + +COMMENT ON FUNCTION ST_SetValue(raster , integer , integer , double precision ) IS 'args: rast, columnx, rowy, newvalue - Returns modified raster resulting from setting the value of a given band in a given columnx, rowy pixel or at a pixel that intersects a particular geometric point. Band numbers start at 1 and assumed to be 1 if not specified.'; + +COMMENT ON FUNCTION ST_SetValue(raster , integer , integer , integer , double precision ) IS 'args: rast, bandnum, columnx, rowy, newvalue - Returns modified raster resulting from setting the value of a given band in a given columnx, rowy pixel or at a pixel that intersects a particular geometric point. Band numbers start at 1 and assumed to be 1 if not specified.'; + +COMMENT ON FUNCTION ST_SetGeoReference(raster , text , text ) IS 'args: rast, georefcoords, format=GDAL - Set Georeference 6 georeference parameters in a single call. Numbers should be separated by white space. Accepts inputs in GDAL or ESRI format. Default is GDAL.'; + +COMMENT ON FUNCTION ST_SetRotation(raster, float8) IS 'args: rast, rotation - Set the rotation of the raster in radian.'; + +COMMENT ON FUNCTION ST_SetScale(raster , float8 ) IS 'args: rast, xy - Sets the X and Y size of pixels in units of coordinate reference system. Number units/pixel width/height.'; + +COMMENT ON FUNCTION ST_SetScale(raster , float8 , float8 ) IS 'args: rast, x, y - Sets the X and Y size of pixels in units of coordinate reference system. Number units/pixel width/height.'; + +COMMENT ON FUNCTION ST_SetSkew(raster , float8 ) IS 'args: rast, skewxy - Sets the georeference X and Y skew (or rotation parameter). If only one is passed in, sets X and Y to the same value.'; + +COMMENT ON FUNCTION ST_SetSkew(raster , float8 , float8 ) IS 'args: rast, skewx, skewy - Sets the georeference X and Y skew (or rotation parameter). If only one is passed in, sets X and Y to the same value.'; + +COMMENT ON FUNCTION ST_SetSRID(raster , integer ) IS 'args: rast, srid - Sets the SRID of a raster to a particular integer srid defined in the spatial_ref_sys table.'; + +COMMENT ON FUNCTION ST_SetUpperLeft(raster , double precision , double precision ) IS 'args: rast, x, y - Sets the value of the upper left corner of the pixel to projected X and Y coordinates.'; + +COMMENT ON FUNCTION ST_Resample(raster , integer , integer , integer , double precision , double precision , double precision , double precision , text , double precision ) IS 'args: rast, width, height, srid=same_as_rast, gridx=NULL, gridy=NULL, skewx=0, skewy=0, algorithm=NearestNeighbour, maxerr=0.125 - Resample a raster using a specified resampling algorithm, new dimensions, an arbitrary grid corner and a set of raster georeferencing attributes defined or borrowed from another raster. New pixel values are computed using the NearestNeighbor (english or american spelling), Bilinear, Cubic, CubicSpline or Lanczos resampling algorithm. Default is NearestNeighbor.'; + +COMMENT ON FUNCTION ST_Resample(raster , integer , double precision , double precision , double precision , double precision , double precision , double precision , text , double precision ) IS 'args: rast, srid=NULL, scalex=0, scaley=0, gridx=NULL, gridy=NULL, skewx=0, skewy=0, algorithm=NearestNeighbor, maxerr=0.125 - Resample a raster using a specified resampling algorithm, new dimensions, an arbitrary grid corner and a set of raster georeferencing attributes defined or borrowed from another raster. New pixel values are computed using the NearestNeighbor (english or american spelling), Bilinear, Cubic, CubicSpline or Lanczos resampling algorithm. Default is NearestNeighbor.'; + +COMMENT ON FUNCTION ST_Resample(raster , raster , text , double precision , boolean ) IS 'args: rast, ref, algorithm=NearestNeighbour, maxerr=0.125, usescale=true - Resample a raster using a specified resampling algorithm, new dimensions, an arbitrary grid corner and a set of raster georeferencing attributes defined or borrowed from another raster. New pixel values are computed using the NearestNeighbor (english or american spelling), Bilinear, Cubic, CubicSpline or Lanczos resampling algorithm. Default is NearestNeighbor.'; + +COMMENT ON FUNCTION ST_Resample(raster , raster , boolean , text , double precision ) IS 'args: rast, ref, usescale, algorithm=NearestNeighbour, maxerr=0.125 - Resample a raster using a specified resampling algorithm, new dimensions, an arbitrary grid corner and a set of raster georeferencing attributes defined or borrowed from another raster. New pixel values are computed using the NearestNeighbor (english or american spelling), Bilinear, Cubic, CubicSpline or Lanczos resampling algorithm. Default is NearestNeighbor.'; + +COMMENT ON FUNCTION ST_Rescale(raster , double precision , text , double precision ) IS 'args: rast, scalexy, algorithm=NearestNeighbour, maxerr=0.125 - Resample a raster by adjusting only its scale (or pixel size). New pixel values are computed using the NearestNeighbor (english or american spelling), Bilinear, Cubic, CubicSpline or Lanczos resampling algorithm. Default is NearestNeighbor.'; + +COMMENT ON FUNCTION ST_Rescale(raster , double precision , double precision , text , double precision ) IS 'args: rast, scalex, scaley, algorithm=NearestNeighbour, maxerr=0.125 - Resample a raster by adjusting only its scale (or pixel size). New pixel values are computed using the NearestNeighbor (english or american spelling), Bilinear, Cubic, CubicSpline or Lanczos resampling algorithm. Default is NearestNeighbor.'; + +COMMENT ON FUNCTION ST_Reskew(raster , double precision , text , double precision ) IS 'args: rast, skewxy, algorithm=NearestNeighbour, maxerr=0.125 - Resample a raster by adjusting only its skew (or rotation parameters). New pixel values are computed using the NearestNeighbor (english or american spelling), Bilinear, Cubic, CubicSpline or Lanczos resampling algorithm. Default is NearestNeighbor.'; + +COMMENT ON FUNCTION ST_Reskew(raster , double precision , double precision , text , double precision ) IS 'args: rast, skewx, skewy, algorithm=NearestNeighbour, maxerr=0.125 - Resample a raster by adjusting only its skew (or rotation parameters). New pixel values are computed using the NearestNeighbor (english or american spelling), Bilinear, Cubic, CubicSpline or Lanczos resampling algorithm. Default is NearestNeighbor.'; + +COMMENT ON FUNCTION ST_SnapToGrid(raster , double precision , double precision , text , double precision , double precision , double precision ) IS 'args: rast, gridx, gridy, algorithm=NearestNeighbour, maxerr=0.125, scalex=DEFAULT 0, scaley=DEFAULT 0 - Resample a raster by snapping it to a grid. New pixel values are computed using the NearestNeighbor (english or american spelling), Bilinear, Cubic, CubicSpline or Lanczos resampling algorithm. Default is NearestNeighbor.'; + +COMMENT ON FUNCTION ST_SnapToGrid(raster , double precision , double precision , double precision , double precision , text , double precision ) IS 'args: rast, gridx, gridy, scalex, scaley, algorithm=NearestNeighbour, maxerr=0.125 - Resample a raster by snapping it to a grid. New pixel values are computed using the NearestNeighbor (english or american spelling), Bilinear, Cubic, CubicSpline or Lanczos resampling algorithm. Default is NearestNeighbor.'; + +COMMENT ON FUNCTION ST_SnapToGrid(raster , double precision , double precision , double precision , text , double precision ) IS 'args: rast, gridx, gridy, scalexy, algorithm=NearestNeighbour, maxerr=0.125 - Resample a raster by snapping it to a grid. New pixel values are computed using the NearestNeighbor (english or american spelling), Bilinear, Cubic, CubicSpline or Lanczos resampling algorithm. Default is NearestNeighbor.'; + +COMMENT ON FUNCTION ST_Transform(raster , integer , double precision , double precision , text , double precision ) IS 'args: rast, srid, scalex, scaley, algorithm=NearestNeighbor, maxerr=0.125 - Reprojects a raster in a known spatial reference system to another known spatial reference system using specified resampling algorithm. Options are NearestNeighbor, Bilinear, Cubic, CubicSpline, Lanczos defaulting to NearestNeighbor.'; + +COMMENT ON FUNCTION ST_Transform(raster , integer , text , double precision , double precision , double precision ) IS 'args: rast, srid, algorithm=NearestNeighbor, maxerr=0.125, scalex, scaley - Reprojects a raster in a known spatial reference system to another known spatial reference system using specified resampling algorithm. Options are NearestNeighbor, Bilinear, Cubic, CubicSpline, Lanczos defaulting to NearestNeighbor.'; + +COMMENT ON FUNCTION ST_SetBandNoDataValue(raster , double precision ) IS 'args: rast, nodatavalue - Sets the value for the given band that represents no data. Band 1 is assumed if no band is specified. To mark a band as having no nodata value, set the nodata value = NULL.'; + +COMMENT ON FUNCTION ST_SetBandNoDataValue(raster , integer , double precision , boolean ) IS 'args: rast, band, nodatavalue, forcechecking=false - Sets the value for the given band that represents no data. Band 1 is assumed if no band is specified. To mark a band as having no nodata value, set the nodata value = NULL.'; + +COMMENT ON FUNCTION ST_SetBandIsNoData(raster , integer ) IS 'args: rast, band=1 - Sets the isnodata flag of the band to TRUE. You may want to call this function if ST_BandIsNoData(rast, band) != ST_BandIsNodata(rast, band, TRUE). This is, if the isnodata flag is dirty. Band 1 is assumed if no band is specified.'; + +COMMENT ON FUNCTION ST_Count(raster , integer , boolean ) IS 'args: rast, nband=1, exclude_nodata_value=true - Returns the number of pixels in a given band of a raster or raster coverage. If no band is specified defaults to band 1. If exclude_nodata_value is set to true, will only count pixels that are not equal to the nodata value.'; + +COMMENT ON FUNCTION ST_Count(raster , boolean ) IS 'args: rast, exclude_nodata_value - Returns the number of pixels in a given band of a raster or raster coverage. If no band is specified defaults to band 1. If exclude_nodata_value is set to true, will only count pixels that are not equal to the nodata value.'; + +COMMENT ON FUNCTION ST_Count(text , text , integer , boolean ) IS 'args: rastertable, rastercolumn, nband=1, exclude_nodata_value=true - Returns the number of pixels in a given band of a raster or raster coverage. If no band is specified defaults to band 1. If exclude_nodata_value is set to true, will only count pixels that are not equal to the nodata value.'; + +COMMENT ON FUNCTION ST_Count(text , text , boolean ) IS 'args: rastertable, rastercolumn, exclude_nodata_value - Returns the number of pixels in a given band of a raster or raster coverage. If no band is specified defaults to band 1. If exclude_nodata_value is set to true, will only count pixels that are not equal to the nodata value.'; + +COMMENT ON FUNCTION ST_Histogram(raster , integer , boolean , integer , double precision[] , boolean ) IS 'args: rast, nband=1, exclude_nodata_value=true, bins=autocomputed, width=NULL, right=false - Returns a set of histogram summarizing a raster or raster coverage data distribution separate bin ranges. Number of bins are autocomputed if not specified.'; + +COMMENT ON FUNCTION ST_Histogram(raster , integer , integer , double precision[] , boolean ) IS 'args: rast, nband, bins, width=NULL, right=false - Returns a set of histogram summarizing a raster or raster coverage data distribution separate bin ranges. Number of bins are autocomputed if not specified.'; + +COMMENT ON FUNCTION ST_Histogram(raster , integer , boolean , integer , boolean ) IS 'args: rast, nband, exclude_nodata_value, bins, right - Returns a set of histogram summarizing a raster or raster coverage data distribution separate bin ranges. Number of bins are autocomputed if not specified.'; + +COMMENT ON FUNCTION ST_Histogram(raster , integer , integer , boolean ) IS 'args: rast, nband, bins, right - Returns a set of histogram summarizing a raster or raster coverage data distribution separate bin ranges. Number of bins are autocomputed if not specified.'; + +COMMENT ON FUNCTION ST_Histogram(text , text , integer , integer , boolean ) IS 'args: rastertable, rastercolumn, nband, bins, right - Returns a set of histogram summarizing a raster or raster coverage data distribution separate bin ranges. Number of bins are autocomputed if not specified.'; + +COMMENT ON FUNCTION ST_Histogram(text , text , integer , boolean , integer , boolean ) IS 'args: rastertable, rastercolumn, nband, exclude_nodata_value, bins, right - Returns a set of histogram summarizing a raster or raster coverage data distribution separate bin ranges. Number of bins are autocomputed if not specified.'; + +COMMENT ON FUNCTION ST_Histogram(text , text , integer , boolean , integer , double precision[] , boolean ) IS 'args: rastertable, rastercolumn, nband=1, exclude_nodata_value=true, bins=autocomputed, width=NULL, right=false - Returns a set of histogram summarizing a raster or raster coverage data distribution separate bin ranges. Number of bins are autocomputed if not specified.'; + +COMMENT ON FUNCTION ST_Histogram(text , text , integer , integer , double precision[] , boolean ) IS 'args: rastertable, rastercolumn, nband=1, bins, width=NULL, right=false - Returns a set of histogram summarizing a raster or raster coverage data distribution separate bin ranges. Number of bins are autocomputed if not specified.'; + +COMMENT ON FUNCTION ST_Quantile(raster , integer , boolean , double precision[] ) IS 'args: rast, nband=1, exclude_nodata_value=true, quantiles=NULL - Compute quantiles for a raster or raster table coverage in the context of the sample or population. Thus, a value could be examined to be at the rasters 25%, 50%, 75% percentile.'; + +COMMENT ON FUNCTION ST_Quantile(raster , double precision[] ) IS 'args: rast, quantiles - Compute quantiles for a raster or raster table coverage in the context of the sample or population. Thus, a value could be examined to be at the rasters 25%, 50%, 75% percentile.'; + +COMMENT ON FUNCTION ST_Quantile(raster , integer , double precision[] ) IS 'args: rast, nband, quantiles - Compute quantiles for a raster or raster table coverage in the context of the sample or population. Thus, a value could be examined to be at the rasters 25%, 50%, 75% percentile.'; + +COMMENT ON FUNCTION ST_Quantile(raster , double precision ) IS 'args: rast, quantile - Compute quantiles for a raster or raster table coverage in the context of the sample or population. Thus, a value could be examined to be at the rasters 25%, 50%, 75% percentile.'; + +COMMENT ON FUNCTION ST_Quantile(raster , boolean , double precision ) IS 'args: rast, exclude_nodata_value, quantile=NULL - Compute quantiles for a raster or raster table coverage in the context of the sample or population. Thus, a value could be examined to be at the rasters 25%, 50%, 75% percentile.'; + +COMMENT ON FUNCTION ST_Quantile(raster , integer , double precision ) IS 'args: rast, nband, quantile - Compute quantiles for a raster or raster table coverage in the context of the sample or population. Thus, a value could be examined to be at the rasters 25%, 50%, 75% percentile.'; + +COMMENT ON FUNCTION ST_Quantile(raster , integer , boolean , double precision ) IS 'args: rast, nband, exclude_nodata_value, quantile - Compute quantiles for a raster or raster table coverage in the context of the sample or population. Thus, a value could be examined to be at the rasters 25%, 50%, 75% percentile.'; + +COMMENT ON FUNCTION ST_Quantile(raster , integer , double precision ) IS 'args: rast, nband, quantile - Compute quantiles for a raster or raster table coverage in the context of the sample or population. Thus, a value could be examined to be at the rasters 25%, 50%, 75% percentile.'; + +COMMENT ON FUNCTION ST_Quantile(text , text , integer , boolean , double precision[] ) IS 'args: rastertable, rastercolumn, nband=1, exclude_nodata_value=true, quantiles=NULL - Compute quantiles for a raster or raster table coverage in the context of the sample or population. Thus, a value could be examined to be at the rasters 25%, 50%, 75% percentile.'; + +COMMENT ON FUNCTION ST_Quantile(text , text , integer , double precision[] ) IS 'args: rastertable, rastercolumn, nband, quantiles - Compute quantiles for a raster or raster table coverage in the context of the sample or population. Thus, a value could be examined to be at the rasters 25%, 50%, 75% percentile.'; + +COMMENT ON FUNCTION ST_SummaryStats(text , text , boolean ) IS 'args: rastertable, rastercolumn, exclude_nodata_value - Returns summary stats consisting of count,sum,mean,stddev,min,max for a given raster band of a raster or raster coverage. Band 1 is assumed is no band is specified.'; + +COMMENT ON FUNCTION ST_SummaryStats(raster , boolean ) IS 'args: rast, exclude_nodata_value - Returns summary stats consisting of count,sum,mean,stddev,min,max for a given raster band of a raster or raster coverage. Band 1 is assumed is no band is specified.'; + +COMMENT ON FUNCTION ST_SummaryStats(text , text , integer , boolean ) IS 'args: rastertable, rastercolumn, nband=1, exclude_nodata_value=true - Returns summary stats consisting of count,sum,mean,stddev,min,max for a given raster band of a raster or raster coverage. Band 1 is assumed is no band is specified.'; + +COMMENT ON FUNCTION ST_SummaryStats(raster , integer , boolean ) IS 'args: rast, nband, exclude_nodata_value - Returns summary stats consisting of count,sum,mean,stddev,min,max for a given raster band of a raster or raster coverage. Band 1 is assumed is no band is specified.'; + +COMMENT ON FUNCTION ST_ValueCount(raster , integer , boolean , double precision[] , double precision ) IS 'args: rast, nband=1, exclude_nodata_value=true, searchvalues=NULL, roundto=0, OUT value, OUT count - Returns a set of records containing a pixel band value and count of the number of pixels in a given band of a raster (or a raster coverage) that have a given set of values. If no band is specified defaults to band 1. By default nodata value pixels are not counted. and all other values in the pixel are output and pixel band values are rounded to the nearest integer.'; + +COMMENT ON FUNCTION ST_ValueCount(raster , integer , double precision[] , double precision ) IS 'args: rast, nband, searchvalues, roundto=0, OUT value, OUT count - Returns a set of records containing a pixel band value and count of the number of pixels in a given band of a raster (or a raster coverage) that have a given set of values. If no band is specified defaults to band 1. By default nodata value pixels are not counted. and all other values in the pixel are output and pixel band values are rounded to the nearest integer.'; + +COMMENT ON FUNCTION ST_ValueCount(raster , double precision[] , double precision ) IS 'args: rast, searchvalues, roundto=0, OUT value, OUT count - Returns a set of records containing a pixel band value and count of the number of pixels in a given band of a raster (or a raster coverage) that have a given set of values. If no band is specified defaults to band 1. By default nodata value pixels are not counted. and all other values in the pixel are output and pixel band values are rounded to the nearest integer.'; + +COMMENT ON FUNCTION ST_ValueCount(raster , double precision , double precision ) IS 'args: rast, searchvalue, roundto=0 - Returns a set of records containing a pixel band value and count of the number of pixels in a given band of a raster (or a raster coverage) that have a given set of values. If no band is specified defaults to band 1. By default nodata value pixels are not counted. and all other values in the pixel are output and pixel band values are rounded to the nearest integer.'; + +COMMENT ON FUNCTION ST_ValueCount(raster , integer , boolean , double precision , double precision ) IS 'args: rast, nband, exclude_nodata_value, searchvalue, roundto=0 - Returns a set of records containing a pixel band value and count of the number of pixels in a given band of a raster (or a raster coverage) that have a given set of values. If no band is specified defaults to band 1. By default nodata value pixels are not counted. and all other values in the pixel are output and pixel band values are rounded to the nearest integer.'; + +COMMENT ON FUNCTION ST_ValueCount(raster , integer , double precision , double precision ) IS 'args: rast, nband, searchvalue, roundto=0 - Returns a set of records containing a pixel band value and count of the number of pixels in a given band of a raster (or a raster coverage) that have a given set of values. If no band is specified defaults to band 1. By default nodata value pixels are not counted. and all other values in the pixel are output and pixel band values are rounded to the nearest integer.'; + +COMMENT ON FUNCTION ST_ValueCount(text , text , integer , boolean , double precision[] , double precision ) IS 'args: rastertable, rastercolumn, nband=1, exclude_nodata_value=true, searchvalues=NULL, roundto=0, OUT value, OUT count - Returns a set of records containing a pixel band value and count of the number of pixels in a given band of a raster (or a raster coverage) that have a given set of values. If no band is specified defaults to band 1. By default nodata value pixels are not counted. and all other values in the pixel are output and pixel band values are rounded to the nearest integer.'; + +COMMENT ON FUNCTION ST_ValueCount(text , text , double precision[] , double precision ) IS 'args: rastertable, rastercolumn, searchvalues, roundto=0, OUT value, OUT count - Returns a set of records containing a pixel band value and count of the number of pixels in a given band of a raster (or a raster coverage) that have a given set of values. If no band is specified defaults to band 1. By default nodata value pixels are not counted. and all other values in the pixel are output and pixel band values are rounded to the nearest integer.'; + +COMMENT ON FUNCTION ST_ValueCount(text , text , integer , double precision[] , double precision ) IS 'args: rastertable, rastercolumn, nband, searchvalues, roundto=0, OUT value, OUT count - Returns a set of records containing a pixel band value and count of the number of pixels in a given band of a raster (or a raster coverage) that have a given set of values. If no band is specified defaults to band 1. By default nodata value pixels are not counted. and all other values in the pixel are output and pixel band values are rounded to the nearest integer.'; + +COMMENT ON FUNCTION ST_ValueCount(text , text , integer , boolean , double precision , double precision ) IS 'args: rastertable, rastercolumn, nband, exclude_nodata_value, searchvalue, roundto=0 - Returns a set of records containing a pixel band value and count of the number of pixels in a given band of a raster (or a raster coverage) that have a given set of values. If no band is specified defaults to band 1. By default nodata value pixels are not counted. and all other values in the pixel are output and pixel band values are rounded to the nearest integer.'; + +COMMENT ON FUNCTION ST_ValueCount(text , text , double precision , double precision ) IS 'args: rastertable, rastercolumn, searchvalue, roundto=0 - Returns a set of records containing a pixel band value and count of the number of pixels in a given band of a raster (or a raster coverage) that have a given set of values. If no band is specified defaults to band 1. By default nodata value pixels are not counted. and all other values in the pixel are output and pixel band values are rounded to the nearest integer.'; + +COMMENT ON FUNCTION ST_ValueCount(text , text , integer , double precision , double precision ) IS 'args: rastertable, rastercolumn, nband, searchvalue, roundto=0 - Returns a set of records containing a pixel band value and count of the number of pixels in a given band of a raster (or a raster coverage) that have a given set of values. If no band is specified defaults to band 1. By default nodata value pixels are not counted. and all other values in the pixel are output and pixel band values are rounded to the nearest integer.'; + +COMMENT ON FUNCTION ST_AsBinary(raster ) IS 'args: rast - Return the Well-Known Binary (WKB) representation of the raster without SRID meta data.'; + +COMMENT ON FUNCTION ST_AsGDALRaster(raster , text , text[] , integer ) IS 'args: rast, format, options=NULL, srid=sameassource - Return the raster tile in the designated GDAL Raster format. Raster formats are one of those supported by your compiled library. Use ST_GDALRasters() to get a list of formats supported by your library.'; + +COMMENT ON FUNCTION ST_AsJPEG(raster , text[] ) IS 'args: rast, options=NULL - Return the raster tile selected bands as a single Joint Photographic Exports Group (JPEG) image (byte array). If no band is specified and 1 or more than 3 bands, then only the first band is used. If only 3 bands then all 3 bands are used and mapped to RGB.'; + +COMMENT ON FUNCTION ST_AsJPEG(raster , integer , integer ) IS 'args: rast, nband, quality - Return the raster tile selected bands as a single Joint Photographic Exports Group (JPEG) image (byte array). If no band is specified and 1 or more than 3 bands, then only the first band is used. If only 3 bands then all 3 bands are used and mapped to RGB.'; + +COMMENT ON FUNCTION ST_AsJPEG(raster , integer , text[] ) IS 'args: rast, nband, options=NULL - Return the raster tile selected bands as a single Joint Photographic Exports Group (JPEG) image (byte array). If no band is specified and 1 or more than 3 bands, then only the first band is used. If only 3 bands then all 3 bands are used and mapped to RGB.'; + +COMMENT ON FUNCTION ST_AsJPEG(raster , integer[] , text[] ) IS 'args: rast, nbands, options=NULL - Return the raster tile selected bands as a single Joint Photographic Exports Group (JPEG) image (byte array). If no band is specified and 1 or more than 3 bands, then only the first band is used. If only 3 bands then all 3 bands are used and mapped to RGB.'; + +COMMENT ON FUNCTION ST_AsJPEG(raster , integer[] , integer ) IS 'args: rast, nbands, quality - Return the raster tile selected bands as a single Joint Photographic Exports Group (JPEG) image (byte array). If no band is specified and 1 or more than 3 bands, then only the first band is used. If only 3 bands then all 3 bands are used and mapped to RGB.'; + +COMMENT ON FUNCTION ST_AsPNG(raster , text[] ) IS 'args: rast, options=NULL - Return the raster tile selected bands as a single portable network graphics (PNG) image (byte array). If 1, 3, or 4 bands in raster and no bands are specified, then all bands are used. If more 2 or more than 4 bands and no bands specified, then only band 1 is used. Bands are mapped to RGB or RGBA space.'; + +COMMENT ON FUNCTION ST_AsPNG(raster , integer , integer ) IS 'args: rast, nband, compression - Return the raster tile selected bands as a single portable network graphics (PNG) image (byte array). If 1, 3, or 4 bands in raster and no bands are specified, then all bands are used. If more 2 or more than 4 bands and no bands specified, then only band 1 is used. Bands are mapped to RGB or RGBA space.'; + +COMMENT ON FUNCTION ST_AsPNG(raster , integer , text[] ) IS 'args: rast, nband, options=NULL - Return the raster tile selected bands as a single portable network graphics (PNG) image (byte array). If 1, 3, or 4 bands in raster and no bands are specified, then all bands are used. If more 2 or more than 4 bands and no bands specified, then only band 1 is used. Bands are mapped to RGB or RGBA space.'; + +COMMENT ON FUNCTION ST_AsPNG(raster , integer[] , integer ) IS 'args: rast, nbands, compression - Return the raster tile selected bands as a single portable network graphics (PNG) image (byte array). If 1, 3, or 4 bands in raster and no bands are specified, then all bands are used. If more 2 or more than 4 bands and no bands specified, then only band 1 is used. Bands are mapped to RGB or RGBA space.'; + +COMMENT ON FUNCTION ST_AsPNG(raster , integer[] , text[] ) IS 'args: rast, nbands, options=NULL - Return the raster tile selected bands as a single portable network graphics (PNG) image (byte array). If 1, 3, or 4 bands in raster and no bands are specified, then all bands are used. If more 2 or more than 4 bands and no bands specified, then only band 1 is used. Bands are mapped to RGB or RGBA space.'; + +COMMENT ON FUNCTION ST_AsTIFF(raster , text[] , integer ) IS 'args: rast, options='', srid=sameassource - Return the raster selected bands as a single TIFF image (byte array). If no band is specified, then will try to use all bands.'; + +COMMENT ON FUNCTION ST_AsTIFF(raster , text , integer ) IS 'args: rast, compression='', srid=sameassource - Return the raster selected bands as a single TIFF image (byte array). If no band is specified, then will try to use all bands.'; + +COMMENT ON FUNCTION ST_AsTIFF(raster , integer[] , text , integer ) IS 'args: rast, nbands, compression='', srid=sameassource - Return the raster selected bands as a single TIFF image (byte array). If no band is specified, then will try to use all bands.'; + +COMMENT ON FUNCTION ST_AsTIFF(raster , integer[] , text[] , integer ) IS 'args: rast, nbands, options, srid=sameassource - Return the raster selected bands as a single TIFF image (byte array). If no band is specified, then will try to use all bands.'; + +COMMENT ON FUNCTION Box3D(raster ) IS 'args: rast - Returns the box 3d representation of the enclosing box of the raster.'; + +COMMENT ON FUNCTION ST_Clip(raster , geometry , double precision[] , boolean ) IS 'args: rast, geom, nodataval=NULL, crop=true - Returns the raster clipped by the input geometry. If no band is specified all bands are returned. If crop is not specified, true is assumed meaning the output raster is cropped.'; + +COMMENT ON FUNCTION ST_Clip(raster , geometry , boolean ) IS 'args: rast, geom, crop - Returns the raster clipped by the input geometry. If no band is specified all bands are returned. If crop is not specified, true is assumed meaning the output raster is cropped.'; + +COMMENT ON FUNCTION ST_Clip(raster , integer , geometry , boolean ) IS 'args: rast, band, geom, crop - Returns the raster clipped by the input geometry. If no band is specified all bands are returned. If crop is not specified, true is assumed meaning the output raster is cropped.'; + +COMMENT ON FUNCTION ST_ConvexHull(raster ) IS 'args: rast - Return the convex hull geometry of the raster including pixel values equal to BandNoDataValue. For regular shaped and non-skewed rasters, this gives the same result as ST_Envelope so only useful for irregularly shaped or skewed rasters.'; + +COMMENT ON FUNCTION ST_DumpAsPolygons(raster , integer ) IS 'args: rast, band_num=1 - Returns a set of geomval (geom,val) rows, from a given raster band. If no band number is specified, band num defaults to 1.'; + +COMMENT ON FUNCTION ST_Envelope(raster ) IS 'args: rast - Returns the polygon representation of the extent of the raster.'; + +COMMENT ON FUNCTION ST_HillShade(raster , integer , text , double precision , double precision , double precision , double precision ) IS 'args: rast, band, pixeltype, azimuth, altitude, max_bright=255, elevation_scale=1 - Returns the hypothetical illumination of an elevation raster band using provided azimuth, altitude, brightness and elevation scale inputs. Useful for visualizing terrain.'; + +COMMENT ON FUNCTION ST_Aspect(raster , integer , text ) IS 'args: rast, band, pixeltype - Returns the surface aspect of an elevation raster band. Useful for analyzing terrain.'; + +COMMENT ON FUNCTION ST_Slope(raster , integer , text ) IS 'args: rast, band, pixeltype - Returns the surface slope of an elevation raster band. Useful for analyzing terrain.'; + +COMMENT ON FUNCTION ST_Intersection(geometry , raster , integer ) IS 'args: geom, rast, band_num=1 - Returns a raster or a set of geometry-pixelvalue pairs representing the shared portion of two rasters or the geometrical intersection of a vectorization of the raster and a geometry.'; + +COMMENT ON FUNCTION ST_Intersection(raster , geometry ) IS 'args: rast, geom - Returns a raster or a set of geometry-pixelvalue pairs representing the shared portion of two rasters or the geometrical intersection of a vectorization of the raster and a geometry.'; + +COMMENT ON FUNCTION ST_Intersection(raster , integer , geometry ) IS 'args: rast, band_num, geom - Returns a raster or a set of geometry-pixelvalue pairs representing the shared portion of two rasters or the geometrical intersection of a vectorization of the raster and a geometry.'; + +COMMENT ON FUNCTION ST_Intersection(raster , raster , double precision[] ) IS 'args: rast1, rast2, nodataval - Returns a raster or a set of geometry-pixelvalue pairs representing the shared portion of two rasters or the geometrical intersection of a vectorization of the raster and a geometry.'; + +COMMENT ON FUNCTION ST_Intersection(raster , raster , text , double precision[] ) IS 'args: rast1, rast2, returnband=''BOTH'', nodataval=NULL - Returns a raster or a set of geometry-pixelvalue pairs representing the shared portion of two rasters or the geometrical intersection of a vectorization of the raster and a geometry.'; + +COMMENT ON FUNCTION ST_Intersection(raster , integer , raster , integer , double precision[] ) IS 'args: rast1, band_num1, rast2, band_num2, nodataval - Returns a raster or a set of geometry-pixelvalue pairs representing the shared portion of two rasters or the geometrical intersection of a vectorization of the raster and a geometry.'; + +COMMENT ON FUNCTION ST_Intersection(raster , integer , raster , integer , text , double precision[] ) IS 'args: rast1, band_num1, rast2, band_num2, returnband=''BOTH'', nodataval=NULL - Returns a raster or a set of geometry-pixelvalue pairs representing the shared portion of two rasters or the geometrical intersection of a vectorization of the raster and a geometry.'; + +COMMENT ON FUNCTION ST_MapAlgebraExpr(raster , integer , text , text , double precision ) IS 'args: rast, band, pixeltype, expression, nodataval=NULL - 1 raster band version: Creates a new one band raster formed by applying a valid PostgreSQL algebraic operation on the input raster band and of pixeltype provided. Band 1 is assumed if no band is specified.'; + +COMMENT ON FUNCTION ST_MapAlgebraExpr(raster , text , text , double precision ) IS 'args: rast, pixeltype, expression, nodataval=NULL - 1 raster band version: Creates a new one band raster formed by applying a valid PostgreSQL algebraic operation on the input raster band and of pixeltype provided. Band 1 is assumed if no band is specified.'; + +COMMENT ON FUNCTION ST_MapAlgebraExpr(raster , raster , text , text , text , text , text , double precision ) IS 'args: rast1, rast2, expression, pixeltype=same_as_rast1_band, extenttype=INTERSECTION, nodata1expr=NULL, nodata2expr=NULL, nodatanodataval=NULL - 2 raster band version: Creates a new one band raster formed by applying a valid PostgreSQL algebraic operation on the two input raster bands and of pixeltype provided. band 1 of each raster is assumed if no band numbers are specified. The resulting raster will be aligned (scale, skew and pixel corners) on the grid defined by the first raster and have its extent defined by the "extenttype" parameter. Values for "extenttype" can be: INTERSECTION, UNION, FIRST, SECOND.'; + +COMMENT ON FUNCTION ST_MapAlgebraExpr(raster , integer , raster , integer , text , text , text , text , text , double precision ) IS 'args: rast1, band1, rast2, band2, expression, pixeltype=same_as_rast1_band, extenttype=INTERSECTION, nodata1expr=NULL, nodata2expr=NULL, nodatanodataval=NULL - 2 raster band version: Creates a new one band raster formed by applying a valid PostgreSQL algebraic operation on the two input raster bands and of pixeltype provided. band 1 of each raster is assumed if no band numbers are specified. The resulting raster will be aligned (scale, skew and pixel corners) on the grid defined by the first raster and have its extent defined by the "extenttype" parameter. Values for "extenttype" can be: INTERSECTION, UNION, FIRST, SECOND.'; + +COMMENT ON FUNCTION ST_MapAlgebraFct(raster, regprocedure) IS 'args: rast, onerasteruserfunc - 1 band version - Creates a new one band raster formed by applying a valid PostgreSQL function on the input raster band and of pixeltype prodived. Band 1 is assumed if no band is specified.'; + +COMMENT ON FUNCTION ST_MapAlgebraFct(raster, regprocedure, text[]) IS 'args: rast, onerasteruserfunc, VARIADIC args - 1 band version - Creates a new one band raster formed by applying a valid PostgreSQL function on the input raster band and of pixeltype prodived. Band 1 is assumed if no band is specified.'; + +COMMENT ON FUNCTION ST_MapAlgebraFct(raster, text, regprocedure) IS 'args: rast, pixeltype, onerasteruserfunc - 1 band version - Creates a new one band raster formed by applying a valid PostgreSQL function on the input raster band and of pixeltype prodived. Band 1 is assumed if no band is specified.'; + +COMMENT ON FUNCTION ST_MapAlgebraFct(raster, text, regprocedure, text[]) IS 'args: rast, pixeltype, onerasteruserfunc, VARIADIC args - 1 band version - Creates a new one band raster formed by applying a valid PostgreSQL function on the input raster band and of pixeltype prodived. Band 1 is assumed if no band is specified.'; + +COMMENT ON FUNCTION ST_MapAlgebraFct(raster, integer, regprocedure) IS 'args: rast, band, onerasteruserfunc - 1 band version - Creates a new one band raster formed by applying a valid PostgreSQL function on the input raster band and of pixeltype prodived. Band 1 is assumed if no band is specified.'; + +COMMENT ON FUNCTION ST_MapAlgebraFct(raster, integer, regprocedure, text[]) IS 'args: rast, band, onerasteruserfunc, VARIADIC args - 1 band version - Creates a new one band raster formed by applying a valid PostgreSQL function on the input raster band and of pixeltype prodived. Band 1 is assumed if no band is specified.'; + +COMMENT ON FUNCTION ST_MapAlgebraFct(raster, integer, text, regprocedure) IS 'args: rast, band, pixeltype, onerasteruserfunc - 1 band version - Creates a new one band raster formed by applying a valid PostgreSQL function on the input raster band and of pixeltype prodived. Band 1 is assumed if no band is specified.'; + +COMMENT ON FUNCTION ST_MapAlgebraFct(raster, integer, text, regprocedure, text[]) IS 'args: rast, band, pixeltype, onerasteruserfunc, VARIADIC args - 1 band version - Creates a new one band raster formed by applying a valid PostgreSQL function on the input raster band and of pixeltype prodived. Band 1 is assumed if no band is specified.'; + +COMMENT ON FUNCTION ST_MapAlgebraFct(raster, raster, regprocedure, text, text, text[]) IS 'args: rast1, rast2, tworastuserfunc, pixeltype=same_as_rast1, extenttype=INTERSECTION, VARIADIC userargs - 2 band version - Creates a new one band raster formed by applying a valid PostgreSQL function on the 2 input raster bands and of pixeltype prodived. Band 1 is assumed if no band is specified. Extent type defaults to INTERSECTION if not specified.'; + +COMMENT ON FUNCTION ST_MapAlgebraFct(raster, integer, raster, integer, regprocedure, text, text, text[]) IS 'args: rast1, band1, rast2, band2, tworastuserfunc, pixeltype=same_as_rast1, extenttype=INTERSECTION, VARIADIC userargs - 2 band version - Creates a new one band raster formed by applying a valid PostgreSQL function on the 2 input raster bands and of pixeltype prodived. Band 1 is assumed if no band is specified. Extent type defaults to INTERSECTION if not specified.'; + +COMMENT ON FUNCTION ST_MapAlgebraFctNgb(raster , integer , text , integer , integer , regprocedure , text , text[] ) IS 'args: rast, band, pixeltype, ngbwidth, ngbheight, onerastngbuserfunc, nodatamode, VARIADIC args - 1-band version: Map Algebra Nearest Neighbor using user-defined PostgreSQL function. Return a raster which values are the result of a PLPGSQL user function involving a neighborhood of values from the input raster band.'; + +COMMENT ON FUNCTION ST_Polygon(raster , integer ) IS 'args: rast, band_num=1 - Returns a polygon geometry formed by the union of pixels that have a pixel value that is not no data value. If no band number is specified, band num defaults to 1.'; + +COMMENT ON FUNCTION ST_Reclass(raster , integer , text , text , double precision ) IS 'args: rast, nband, reclassexpr, pixeltype, nodataval=NULL - Creates a new raster composed of band types reclassified from original. The nband is the band to be changed. If nband is not specified assumed to be 1. All other bands are returned unchanged. Use case: convert a 16BUI band to a 8BUI and so forth for simpler rendering as viewable formats.'; + +COMMENT ON FUNCTION ST_Reclass(raster , reclassarg[] ) IS 'args: rast, VARIADIC reclassargset - Creates a new raster composed of band types reclassified from original. The nband is the band to be changed. If nband is not specified assumed to be 1. All other bands are returned unchanged. Use case: convert a 16BUI band to a 8BUI and so forth for simpler rendering as viewable formats.'; + +COMMENT ON FUNCTION ST_Reclass(raster , text , text ) IS 'args: rast, reclassexpr, pixeltype - Creates a new raster composed of band types reclassified from original. The nband is the band to be changed. If nband is not specified assumed to be 1. All other bands are returned unchanged. Use case: convert a 16BUI band to a 8BUI and so forth for simpler rendering as viewable formats.'; + +COMMENT ON FUNCTION ST_Union(setof raster ) IS 'args: rast - Returns the union of a set of raster tiles into a single raster composed of 1 band. If no band is specified for unioning, band num 1 is assumed. The resulting rasters extent is the extent of the whole set. In the case of intersection, the resulting value is defined by p_expression which is one of the following: LAST - the default when none is specified, MEAN, SUM, FIRST, MAX, MIN.'; + +COMMENT ON AGGREGATE ST_Union(raster, integer) IS 'args: rast, band_num - Returns the union of a set of raster tiles into a single raster composed of 1 band. If no band is specified for unioning, band num 1 is assumed. The resulting rasters extent is the extent of the whole set. In the case of intersection, the resulting value is defined by p_expression which is one of the following: LAST - the default when none is specified, MEAN, SUM, FIRST, MAX, MIN.'; + +COMMENT ON AGGREGATE ST_Union(raster, text) IS 'args: rast, p_expression - Returns the union of a set of raster tiles into a single raster composed of 1 band. If no band is specified for unioning, band num 1 is assumed. The resulting rasters extent is the extent of the whole set. In the case of intersection, the resulting value is defined by p_expression which is one of the following: LAST - the default when none is specified, MEAN, SUM, FIRST, MAX, MIN.'; + +COMMENT ON AGGREGATE ST_Union(raster, integer, text) IS 'args: rast, band_num, p_expression - Returns the union of a set of raster tiles into a single raster composed of 1 band. If no band is specified for unioning, band num 1 is assumed. The resulting rasters extent is the extent of the whole set. In the case of intersection, the resulting value is defined by p_expression which is one of the following: LAST - the default when none is specified, MEAN, SUM, FIRST, MAX, MIN.'; + +COMMENT ON FUNCTION ST_Min4ma(float8[][], text , text[]) IS 'args: matrix, nodatamode, VARIADIC args - Raster processing function that calculates the minimum pixel value in a neighborhood.'; + +COMMENT ON FUNCTION ST_Max4ma(float8[][], text, text[]) IS 'args: matrix, nodatamode, VARIADIC args - Raster processing function that calculates the maximum pixel value in a neighborhood.'; + +COMMENT ON FUNCTION ST_Sum4ma(float8[][], text, text[]) IS 'args: matrix, nodatamode, VARIADIC args - Raster processing function that calculates the sum of all pixel values in a neighborhood.'; + +COMMENT ON FUNCTION ST_Mean4ma(float8[][], text, text[]) IS 'args: matrix, nodatamode, VARIADIC args - Raster processing function that calculates the mean pixel value in a neighborhood.'; + +COMMENT ON FUNCTION ST_Range4ma(float8[][], text, text[]) IS 'args: matrix, nodatamode, VARIADIC args - Raster processing function that calculates the range of pixel values in a neighborhood.'; + +COMMENT ON FUNCTION ST_Distinct4ma(float8[][], text, text[]) IS 'args: matrix, nodatamode, VARIADIC args - Raster processing function that calculates the number of unique pixel values in a neighborhood.'; + +COMMENT ON FUNCTION ST_StdDev4ma(float8[][], text , text[]) IS 'args: matrix, nodatamode, VARIADIC args - Raster processing function that calculates the standard deviation of pixel values in a neighborhood.'; + +COMMENT ON FUNCTION ST_Intersects(raster , integer , raster , integer ) IS 'args: rasta, nbanda, rastb, nbandb - Return true if the raster spatially intersects a separate raster or geometry. If the band number is not provided (or set to NULL), only the convex hull of the raster is considered in the test. If the band number is provided, only those pixels with value (not NODATA) are considered in the test.'; + +COMMENT ON FUNCTION ST_Intersects(raster , raster ) IS 'args: rasta, rastb - Return true if the raster spatially intersects a separate raster or geometry. If the band number is not provided (or set to NULL), only the convex hull of the raster is considered in the test. If the band number is provided, only those pixels with value (not NODATA) are considered in the test.'; + +COMMENT ON FUNCTION ST_Intersects(raster , integer , geometry ) IS 'args: rast, nband, geommin - Return true if the raster spatially intersects a separate raster or geometry. If the band number is not provided (or set to NULL), only the convex hull of the raster is considered in the test. If the band number is provided, only those pixels with value (not NODATA) are considered in the test.'; + +COMMENT ON FUNCTION ST_Intersects(raster , geometry , integer ) IS 'args: rast, geommin, nband=NULL - Return true if the raster spatially intersects a separate raster or geometry. If the band number is not provided (or set to NULL), only the convex hull of the raster is considered in the test. If the band number is provided, only those pixels with value (not NODATA) are considered in the test.'; + +COMMENT ON FUNCTION ST_Intersects(geometry , raster , integer ) IS 'args: geommin, rast, nband=NULL - Return true if the raster spatially intersects a separate raster or geometry. If the band number is not provided (or set to NULL), only the convex hull of the raster is considered in the test. If the band number is provided, only those pixels with value (not NODATA) are considered in the test.'; + +COMMENT ON FUNCTION ST_SameAlignment(raster , raster ) IS 'args: rastA, rastB - Returns true if rasters have same skew, scale, spatial ref and false if they dont with notice detailing issue.'; + +COMMENT ON FUNCTION ST_SameAlignment(double precision , double precision , double precision , double precision , double precision , double precision , double precision , double precision , double precision , double precision , double precision , double precision ) IS 'args: ulx1, uly1, scalex1, scaley1, skewx1, skewy1, ulx2, uly2, scalex2, scaley2, skewx2, skewy2 - Returns true if rasters have same skew, scale, spatial ref and false if they dont with notice detailing issue.'; + + COMMENT ON TYPE geomval IS 'postgis raster type: A spatial datatype with two fields - geom (holding a geometry object) and val (holding a double precision pixel value from a raster band).'; + + + COMMENT ON TYPE histogram IS 'postgis raster type: A composite type used as record output of the ST_Histogram and ST_ApproxHistogram functions.'; + + + COMMENT ON TYPE raster IS 'postgis raster type: raster spatial data type.'; + + + COMMENT ON TYPE reclassarg IS 'postgis raster type: A composite type used as input into the ST_Reclass function defining the behavior of reclassification.'; + + + COMMENT ON TYPE summarystats IS 'postgis raster type: A composite type used as output of the ST_SummaryStats function.'; + + \ No newline at end of file diff -Nru postgis-1.5.3/doc/reference_accessor.xml postgis-2.0.1/doc/reference_accessor.xml --- postgis-1.5.3/doc/reference_accessor.xml 2009-12-30 15:12:49.000000000 +0000 +++ postgis-2.0.1/doc/reference_accessor.xml 2012-06-10 06:26:30.000000000 +0000 @@ -35,9 +35,12 @@ This function also indicates if the geometry is measured, by returning a string of the form 'POINTM'. - + Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced. &sfs_compliant; &curve_support; + &Z_support; + &P_support; + &T_support; @@ -50,6 +53,32 @@ -------------- LINESTRING + SELECT ST_GeometryType(ST_GeomFromEWKT('POLYHEDRALSURFACE( ((0 0 0, 0 0 1, 0 1 1, 0 1 0, 0 0 0)), + ((0 0 0, 0 1 0, 1 1 0, 1 0 0, 0 0 0)), ((0 0 0, 1 0 0, 1 0 1, 0 0 1, 0 0 0)), + ((1 1 0, 1 1 1, 1 0 1, 1 0 0, 1 1 0)), + ((0 1 0, 0 1 1, 1 1 1, 1 1 0, 0 1 0)), ((0 0 1, 1 0 1, 1 1 1, 0 1 1, 0 0 1)) )')); + --result + POLYHEDRALSURFACE + +SELECT GeometryType(geom) as result + FROM + (SELECT + ST_GeomFromEWKT('TIN ((( + 0 0 0, + 0 0 1, + 0 1 0, + 0 0 0 + )), (( + 0 0 0, + 0 1 0, + 1 1 0, + 0 0 0 + )) + )') AS geom + ) AS g; + result +-------- + TIN @@ -87,9 +116,8 @@ geometry primitives as discussed in the OGC SPEC, section 3.12.2. Performed by the GEOS module - - Do not call with a GEOMETRYCOLLECTION as an argument - + + Prior to 2.0.0, this function throws an exception if used with GEOMETRYCOLLECTION. From 2.0.0 up it will return NULL instead (unsupported input). &sfs_compliant; OGC SPEC s2.1.1.1 &sqlmm_compliant; SQL-MM 3: 5.1.14 @@ -135,7 +163,7 @@ ST_CoordDim - Return the coordinate dimension of the ST_Geometry value. + Return the coordinate dimension of the ST_Geometry value. @@ -158,7 +186,8 @@ &sqlmm_compliant; SQL-MM 3: 5.1.3 &curve_support; &Z_support; - + &P_support; + &T_support; @@ -209,10 +238,15 @@ be less than or equal to the coordinate dimension. OGC SPEC s2.1.1.1 - returns 0 for POINT, 1 for LINESTRING, 2 for POLYGON, and the largest dimension of the components of a - GEOMETRYCOLLECTION. + GEOMETRYCOLLECTION. + If unknown (empty geometry) null is returned. + &sqlmm_compliant; SQL-MM 3: 5.1.2 - + Enhanced: 2.0.0 support for Polyhedral surfaces and TINs was introduced. No longer throws an exception if given empty geometry. + Prior to 2.0.0, this function throws an exception if used with empty geometry. + &P_support; + &T_support; @@ -258,6 +292,11 @@ &sqlmm_compliant; SQL-MM 3: 7.1.4 &Z_support; + Changed: 2.0.0 no longer works with single geometry multilinestrings. In older + versions of PostGIS -- a single line multilinestring would work happily with this + function and return the start point. In 2.0.0 it just returns NULL like any other multilinestring. + The older behavior was an undocumented feature, but people who assumed they had their data stored as LINESTRING + may experience these returning NULL in 2.0 now. @@ -437,7 +476,11 @@ See Also - , + +, +, + + @@ -446,7 +489,7 @@ ST_GeometryN Return the 1-based Nth geometry if the geometry is a - GEOMETRYCOLLECTION, MULTIPOINT, MULTILINESTRING, MULTICURVE or MULTIPOLYGON. + GEOMETRYCOLLECTION, (MULTI)POINT, (MULTI)LINESTRING, MULTICURVE or (MULTI)POLYGON, POLYHEDRALSURFACE Otherwise, return NULL. @@ -464,8 +507,8 @@ Description Return the 1-based Nth geometry if the geometry is a - GEOMETRYCOLLECTION, MULTIPOINT, MULTILINESTRING, MULTICURVE or MULTIPOLYGON. - Otherwise, return NULL. + GEOMETRYCOLLECTION, (MULTI)POINT, (MULTI)LINESTRING, MULTICURVE or (MULTI)POLYGON, POLYHEDRALSURFACE + Otherwise, return NULL Index is 1-based as for OGC specs since version 0.8.0. @@ -475,20 +518,22 @@ If you want to extract all geometries, of a geometry, ST_Dump is more efficient and will also work for singular geoms. - + Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced. + Changed: 2.0.0 Prior versions would return NULL for singular geometries. This was changed to return the geometry for ST_GeometryN(..,1) case. &sfs_compliant; - &sqlmm_compliant; SQL-MM 3: 9.1.5 - &Z_support; - &curve_support; + &sqlmm_compliant; SQL-MM 3: 9.1.5 + &Z_support; + &curve_support; + &P_support; + &T_support; - Examples + Standard Examples - ---Extracting a subset of points from a 3d multipoint + --Extracting a subset of points from a 3d multipoint SELECT n, ST_AsEWKT(ST_GeometryN(the_geom, n)) As geomewkt FROM ( VALUES (ST_GeomFromEWKT('MULTIPOINT(1 2 7, 3 4 7, 5 6 7, 8 9 10)') ), @@ -510,10 +555,47 @@ --Extracting all geometries (useful when you want to assign an id) SELECT gid, n, ST_GeometryN(the_geom, n) FROM sometable CROSS JOIN generate_series(1,100) n -WHERE n <= ST_NumGeometries(the_geom); - - - +WHERE n <= ST_NumGeometries(the_geom); + + +Polyhedral Surfaces, TIN and Triangle Examples +-- Polyhedral surface example +-- Break a Polyhedral surface into its faces +SELECT ST_AsEWKT(ST_GeometryN(p_geom,3)) As geom_ewkt + FROM (SELECT ST_GeomFromEWKT('POLYHEDRALSURFACE( +((0 0 0, 0 0 1, 0 1 1, 0 1 0, 0 0 0)), +((0 0 0, 0 1 0, 1 1 0, 1 0 0, 0 0 0)), +((0 0 0, 1 0 0, 1 0 1, 0 0 1, 0 0 0)), +((1 1 0, 1 1 1, 1 0 1, 1 0 0, 1 1 0)), +((0 1 0, 0 1 1, 1 1 1, 1 1 0, 0 1 0)), +((0 0 1, 1 0 1, 1 1 1, 0 1 1, 0 0 1)) +)') AS p_geom ) AS a; + + geom_ewkt +------------------------------------------ + POLYGON((0 0 0,1 0 0,1 0 1,0 0 1,0 0 0)) + +-- TIN -- +SELECT ST_AsEWKT(ST_GeometryN(geom,2)) as wkt + FROM + (SELECT + ST_GeomFromEWKT('TIN ((( + 0 0 0, + 0 0 1, + 0 1 0, + 0 0 0 + )), (( + 0 0 0, + 0 1 0, + 1 1 0, + 0 0 0 + )) + )') AS geom + ) AS g; +-- result -- + wkt +------------------------------------- + TRIANGLE((0 0 0,0 1 0,1 1 0,0 0 0)) @@ -543,7 +625,10 @@ Returns the type of the geometry as a string. EG: 'ST_Linestring', 'ST_Polygon','ST_MultiPolygon' etc. This function differs from GeometryType(geometry) in the case of the string and ST in front that is returned, as well as the fact that it will not indicate whether the geometry is measured. + Enhanced: 2.0.0 support for Polyhedral surfaces was introduced. &sqlmm_compliant; SQL-MM 3: 5.1.4 + &Z_support; + &P_support; @@ -552,8 +637,41 @@ SELECT ST_GeometryType(ST_GeomFromText('LINESTRING(77.29 29.07,77.42 29.26,77.27 29.31,77.29 29.07)')); --result - ST_LineString - + ST_LineString + + SELECT ST_GeometryType(ST_GeomFromEWKT('POLYHEDRALSURFACE( ((0 0 0, 0 0 1, 0 1 1, 0 1 0, 0 0 0)), + ((0 0 0, 0 1 0, 1 1 0, 1 0 0, 0 0 0)), ((0 0 0, 1 0 0, 1 0 1, 0 0 1, 0 0 0)), + ((1 1 0, 1 1 1, 1 0 1, 1 0 0, 1 1 0)), + ((0 1 0, 0 1 1, 1 1 1, 1 1 0, 0 1 0)), ((0 0 1, 1 0 1, 1 1 1, 0 1 1, 0 0 1)) )')); + --result + ST_PolyhedralSurface + + SELECT ST_GeometryType(ST_GeomFromEWKT('POLYHEDRALSURFACE( ((0 0 0, 0 0 1, 0 1 1, 0 1 0, 0 0 0)), + ((0 0 0, 0 1 0, 1 1 0, 1 0 0, 0 0 0)), ((0 0 0, 1 0 0, 1 0 1, 0 0 1, 0 0 0)), + ((1 1 0, 1 1 1, 1 0 1, 1 0 0, 1 1 0)), + ((0 1 0, 0 1 1, 1 1 1, 1 1 0, 0 1 0)), ((0 0 1, 1 0 1, 1 1 1, 0 1 1, 0 0 1)) )')); + --result + ST_PolyhedralSurface + + SELECT ST_GeometryType(geom) as result + FROM + (SELECT + ST_GeomFromEWKT('TIN ((( + 0 0 0, + 0 0 1, + 0 1 0, + 0 0 0 + )), (( + 0 0 0, + 0 1 0, + 1 1 0, + 0 0 0 + )) + )') AS geom + ) AS g; + result +-------- + ST_Tin See Also @@ -618,7 +736,14 @@ See Also - , , , , + + +, +, +, +, + + @@ -627,7 +752,7 @@ ST_IsClosed Returns TRUE if the - LINESTRING's start and end points are coincident. + LINESTRING's start and end points are coincident. For Polyhedral surface is closed (volumetric). @@ -645,7 +770,7 @@ Description Returns TRUE if the LINESTRING's - start and end points are coincident. + start and end points are coincident. For Polyhedral Surfaces, it tells you if the surface is areal (open) or volumetric (closed). &sfs_compliant; &sqlmm_compliant; SQL-MM 3: 7.1.5, 9.3.3 @@ -657,11 +782,14 @@ &Z_support; &curve_support; + Enhanced: 2.0.0 support for Polyhedral surfaces was introduced. + + &P_support; - Examples + Line String and Point Examples postgis=# SELECT ST_IsClosed('LINESTRING(0 0, 1 1)'::geometry); st_isclosed @@ -693,21 +821,131 @@ t (1 row) + + + Polyhedral Surface Examples + + + -- A cube -- + SELECT ST_IsClosed(ST_GeomFromEWKT('POLYHEDRALSURFACE( ((0 0 0, 0 0 1, 0 1 1, 0 1 0, 0 0 0)), + ((0 0 0, 0 1 0, 1 1 0, 1 0 0, 0 0 0)), ((0 0 0, 1 0 0, 1 0 1, 0 0 1, 0 0 0)), + ((1 1 0, 1 1 1, 1 0 1, 1 0 0, 1 1 0)), + ((0 1 0, 0 1 1, 1 1 1, 1 1 0, 0 1 0)), ((0 0 1, 1 0 1, 1 1 1, 0 1 1, 0 0 1)) )')); + + st_isclosed +------------- + t + + + -- Same as cube but missing a side -- + SELECT ST_IsClosed(ST_GeomFromEWKT('POLYHEDRALSURFACE( ((0 0 0, 0 0 1, 0 1 1, 0 1 0, 0 0 0)), + ((0 0 0, 0 1 0, 1 1 0, 1 0 0, 0 0 0)), ((0 0 0, 1 0 0, 1 0 1, 0 0 1, 0 0 0)), + ((1 1 0, 1 1 1, 1 0 1, 1 0 0, 1 1 0)), + ((0 1 0, 0 1 1, 1 1 1, 1 1 0, 0 1 0)) )')); + + st_isclosed +------------- + f + + + See Also - + + + + + ST_IsCollection + + Returns TRUE if the argument is a + collection (MULTI*, GEOMETRYCOLLECTION, ...) + + + + + + + boolean ST_IsCollection + geometry g + + + + + + Description + + Returns TRUE if the geometry type of + the argument is either: + + GEOMETRYCOLLECTION + MULTI{POINT,POLYGON,LINESTRING,CURVE,SURFACE} + COMPOUNDCURVE + + + + + + This function analyzes the type of the geometry. This means + that it will return TRUE on collections + that are empty or that contain a single element. + + + + &Z_support; + &curve_support; + + + + + Examples + + postgis=# SELECT ST_IsCollection('LINESTRING(0 0, 1 1)'::geometry); + st_iscollection +------------- + f +(1 row) + +postgis=# SELECT ST_IsCollection('MULTIPOINT EMPTY'::geometry); + st_iscollection +------------- + t +(1 row) + +postgis=# SELECT ST_IsCollection('MULTIPOINT((0 0))'::geometry); + st_iscollection +------------- + t +(1 row) + +postgis=# SELECT ST_IsCollection('MULTIPOINT((0 0), (42 42))'::geometry); + st_iscollection +------------- + t +(1 row) + +postgis=# SELECT ST_IsCollection('GEOMETRYCOLLECTION(POINT(0 0))'::geometry); + st_iscollection +------------- + t +(1 row) + + + + See Also + + + + ST_IsEmpty - Returns true if this Geometry is an empty geometry . If - true, then this Geometry represents the empty point set - i.e. - GEOMETRYCOLLECTION(EMPTY). + Returns true if this Geometry is an empty geometrycollection, polygon, point etc. @@ -723,7 +961,7 @@ Description - Returns true if this Geometry is an empty geometry . If + Returns true if this Geometry is an empty geometry. If true, then this Geometry represents an empty geometry collection, polygon, point etc. SQL-MM defines the result of ST_IsEmpty(NULL) to be 0, while @@ -733,6 +971,7 @@ &sfs_compliant; s2.1.1.1 &sqlmm_compliant; SQL-MM 3: 5.1.7 &curve_support; + Changed: 2.0.0 In prior versions of PostGIS ST_GeomFromText('GEOMETRYCOLLECTION(EMPTY)') was allowed. This is now illegal in PostGIS 2.0.0 to better conform with SQL/MM standards @@ -741,7 +980,7 @@ Examples -SELECT ST_IsEmpty('GEOMETRYCOLLECTION(EMPTY)'); +SELECT ST_IsEmpty(ST_GeomFromText('GEOMETRYCOLLECTION EMPTY')); st_isempty ------------ t @@ -917,6 +1156,12 @@ geometry g + + boolean ST_IsValid + + geometry g + integer flags + @@ -926,15 +1171,24 @@ Test if an ST_Geometry value is well formed. For geometries that are invalid, the PostgreSQL NOTICE will provide details of why it is not valid. For more information on the OGC's definition of geometry simplicity and validity, refer - to "Ensuring OpenGIS compliancy of geometries" + to "Ensuring OpenGIS compliancy of geometries" + SQL-MM defines the result of ST_IsValid(NULL) to be 0, while PostGIS returns NULL. + +The version accepting flags is available starting with 2.0.0 +and requires GEOS >= 3.3.0. Such version does not print a NOTICE +explaining the invalidity. +Allowed flags are documented in . + + &sfs_compliant; &sqlmm_compliant; SQL-MM 3: 5.1.9 + @@ -953,7 +1207,12 @@ See Also - , , + +, +, +, + + @@ -970,6 +1229,11 @@ text ST_IsValidReason geometry geomA + + text ST_IsValidReason + geometry geomA + integer flags + @@ -979,7 +1243,13 @@ Returns text stating if a geometry is valid or not an if not valid, a reason why. Useful in combination with ST_IsValid to generate a detailed report of invalid geometries and reasons. + + +Allowed flags are documented in . + + Availability: 1.4 - requires GEOS >= 3.1.0. + Availability: 2.0 - requires GEOS >= 3.3.0 for the version taking flags. @@ -1032,6 +1302,103 @@ + + + ST_IsValidDetail + + Returns a valid_detail (valid,reason,location) row stating if a geometry is valid or not and if not valid, a reason why and a location where. + + + + + + valid_detail ST_IsValidDetail + geometry geom + + + valid_detail ST_IsValidDetail + geometry geom + integer flags + + + + + + Description + + Returns a valid_detail row, formed by a boolean (valid) stating if a geometry is valid, a varchar (reason) stating a reason why it is invalid and a geometry (location) pointing out where it is invalid. + + Useful to substitute and improve the combination of ST_IsValid and ST_IsValidReason to generate a detailed report of invalid geometries. + + +The 'flags' argument is a bitfield. It can have the following values: + + + +1: Consider self-intersecting rings forming holes as valid. + This is also know as "the ESRI flag". + Note that this is against the OGC model. + + + + + + Availability: 2.0.0 - requires GEOS >= 3.3.0. + + + + + + Examples + + +--First 3 Rejects from a successful quintuplet experiment +SELECT gid, reason(ST_IsValidDetail(the_geom)), ST_AsText(location(ST_IsValidDetail(the_geom))) as location +FROM +(SELECT ST_MakePolygon(ST_ExteriorRing(e.buff), ST_Accum(f.line)) As the_geom, gid +FROM (SELECT ST_Buffer(ST_MakePoint(x1*10,y1), z1) As buff, x1*10 + y1*100 + z1*1000 As gid + FROM generate_series(-4,6) x1 + CROSS JOIN generate_series(2,5) y1 + CROSS JOIN generate_series(1,8) z1 + WHERE x1 > y1*0.5 AND z1 < x1*y1) As e + INNER JOIN (SELECT ST_Translate(ST_ExteriorRing(ST_Buffer(ST_MakePoint(x1*10,y1), z1)),y1*1, z1*2) As line + FROM generate_series(-3,6) x1 + CROSS JOIN generate_series(2,5) y1 + CROSS JOIN generate_series(1,10) z1 + WHERE x1 > y1*0.75 AND z1 < x1*y1) As f +ON (ST_Area(e.buff) > 78 AND ST_Contains(e.buff, f.line)) +GROUP BY gid, e.buff) As quintuplet_experiment +WHERE ST_IsValid(the_geom) = false +ORDER BY gid +LIMIT 3; + + gid | reason | location +------+-------------------+------------- + 5330 | Self-intersection | POINT(32 5) + 5340 | Self-intersection | POINT(42 5) + 5350 | Self-intersection | POINT(52 5) + + --simple example +SELECT * FROM ST_IsValidDetail('LINESTRING(220227 150406,2220227 150407,222020 150410)'); + + valid | reason | location +-------+--------+---------- + t | | + + + + + + + See Also + + +, + + + + + ST_M @@ -1147,9 +1514,11 @@ Description Return the number of points in a geometry. Works for all geometries. + Enhanced: 2.0.0 support for Polyhedral surfaces was introduced. Prior to 1.3.4, this function crashes if used with geometries that contain CURVES. This is fixed in 1.3.4+ &Z_support; &curve_support; + &P_support; @@ -1221,14 +1590,14 @@ ST_NumGeometries If geometry is a GEOMETRYCOLLECTION (or MULTI*) return the - number of geometries, otherwise return NULL. + number of geometries, for single geometries will return 1, otherwise return NULL. integer ST_NumGeometries - geometry a_multi_or_geomcollection + geometry geom @@ -1237,9 +1606,15 @@ Description Returns the number of Geometries. If geometry is a GEOMETRYCOLLECTION (or MULTI*) return the - number of geometries, otherwise return NULL. + number of geometries, for single geometries will return 1, otherwise return NULL. + Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced. + Changed: 2.0.0 In prior versions this would return NULL if the geometry was not a collection/MULTI type. + 2.0.0+ now returns 1 for single geometries e.g POLYGON, LINESTRING, POINT. &sqlmm_compliant; SQL-MM 3: 9.1.4 + &Z_support; + &P_support; + &T_support; @@ -1247,8 +1622,8 @@ Examples ---Although ST_NumGeometries will return null when passed a single, you can wrap in ST_Multi to force 1 or more for all geoms -SELECT ST_NumGeometries(ST_Multi(ST_GeomFromText('LINESTRING(77.29 29.07,77.42 29.26,77.27 29.31,77.29 29.07)'))); +--Prior versions would have returned NULL for this -- in 2.0.0 this returns 1 +SELECT ST_NumGeometries(ST_GeomFromText('LINESTRING(77.29 29.07,77.42 29.26,77.27 29.31,77.29 29.07)')); --result 1 @@ -1352,6 +1727,52 @@ + + + + ST_NumPatches + Return the number of faces on a Polyhedral Surface. Will return null for non-polyhedral geometries. + + + + + + integer ST_NumPatches + geometry g1 + + + + + + Description + + Return the number of faces on a Polyhedral Surface. Will return null for non-polyhedral geometries. This is + an alias for ST_NumGeometries to support MM naming. Faster to use ST_NumGeometries if you don't care about MM convention. + + Availability: 2.0.0 + &Z_support; + &sfs_compliant; + &sqlmm_compliant; SQL-MM 3: ? + &P_support; + + + + Examples + + SELECT ST_NumPatches(ST_GeomFromEWKT('POLYHEDRALSURFACE( ((0 0 0, 0 0 1, 0 1 1, 0 1 0, 0 0 0)), + ((0 0 0, 0 1 0, 1 1 0, 1 0 0, 0 0 0)), ((0 0 0, 1 0 0, 1 0 1, 0 0 1, 0 0 0)), + ((1 1 0, 1 1 1, 1 0 1, 1 0 0, 1 1 0)), + ((0 1 0, 0 1 1, 1 1 1, 1 1 0, 0 1 0)), ((0 0 1, 1 0 1, 1 1 1, 0 1 1, 0 0 1)) )')); + --result + 6 + + + + See Also + + , + + @@ -1396,6 +1817,75 @@ + + + + ST_PatchN + + Return the 1-based Nth geometry (face) if the geometry is a + POLYHEDRALSURFACE, POLYHEDRALSURFACEM. + Otherwise, return NULL. + + + + + + geometry ST_PatchN + geometry geomA + integer n + + + + + + Description + + >Return the 1-based Nth geometry (face) if the geometry is a + POLYHEDRALSURFACE, POLYHEDRALSURFACEM. + Otherwise, return NULL. This returns the same answer as ST_GeometryN for Polyhedral Surfaces. + Using ST_GemoetryN is faster. + + + Index is 1-based. + + + + If you want to extract all geometries, of a geometry, ST_Dump is more efficient. + + + Availability: 2.0.0 + &sqlmm_compliant; SQL-MM 3: ? + &Z_support; + &P_support; + + + + + + Examples + + +--Extract the 2nd face of the polyhedral surface +SELECT ST_AsEWKT(ST_PatchN(geom, 2)) As geomewkt +FROM ( +VALUES (ST_GeomFromEWKT('POLYHEDRALSURFACE( ((0 0 0, 0 0 1, 0 1 1, 0 1 0, 0 0 0)), + ((0 0 0, 0 1 0, 1 1 0, 1 0 0, 0 0 0)), ((0 0 0, 1 0 0, 1 0 1, 0 0 1, 0 0 0)), + ((1 1 0, 1 1 1, 1 0 1, 1 0 0, 1 1 0)), + ((0 1 0, 0 1 1, 1 1 1, 1 1 0, 0 1 0)), ((0 0 1, 1 0 1, 1 1 1, 0 1 1, 0 0 1)) )')) ) As foo(geom); + + geomewkt +---+----------------------------------------- + POLYGON((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)) + + + + + + See Also + + , , , , + + @@ -1493,7 +1983,7 @@ Description - Returns the spatial reference identifier for the ST_Geometry as defined in spatial_ref_sys table. + Returns the spatial reference identifier for the ST_Geometry as defined in spatial_ref_sys table. spatial_ref_sys table is a table that catalogs all spatial reference systems known to PostGIS and is used for transformations from one spatial reference system to another. So verifying you have the right spatial reference system identifier is important if you plan to ever transform your geometries. @@ -1514,7 +2004,7 @@ See Also - ,, , + , , , @@ -1545,6 +2035,11 @@ &sqlmm_compliant; SQL-MM 3: 7.1.3 &Z_support; + Changed: 2.0.0 no longer works with single geometry multilinestrings. In older + versions of PostGIS -- a single line multilinestring would work happily with this + function and return the start point. In 2.0.0 it just returns NULL like any other multilinestring. + The older behavior was an undocumented feature, but people who assumed they had their data stored as LINESTRING + may experience these returning NULL in 2.0 now. @@ -1583,8 +2078,8 @@ ST_Summary - Returns a text summary of the contents of the - ST_Geometry. + +Returns a text summary of the contents of the geometry. @@ -1592,9 +2087,12 @@ text ST_Summary - geometry g + + text ST_Summary + geography g + @@ -1602,34 +2100,45 @@ Description Returns a text summary of the contents of the geometry. - &Z_support; + + + Flags shown square brackets after the geometry type + have the following meaning: + + M: has M ordinate + Z: has Z ordinate + B: has a cached bounding box + G: is geodetic (geography) + + + + Availability: 1.2.2 - 2.0.0 added support for geography Examples - SELECT ST_Summary(ST_GeomFromText('LINESTRING(0 0, 1 1)')) As good_line, - ST_Summary(ST_GeomFromText('POLYGON((0 0, 1 1, 1 2, 1 1, 0 0))')) As bad_poly ---results - good_line | bad_poly -----------------------+------------------------- - | -Line[B] with 2 points : Polygon[B] with 1 rings - : ring 0 has 5 points - : - ---3d polygon -SELECT ST_Summary(ST_GeomFromEWKT('LINESTRING(0 0 1, 1 1 1)')) As good_line, - ST_Summary(ST_GeomFromEWKT('POLYGON((0 0 1, 1 1 2, 1 2 3, 1 1 1, 0 0 1))')) As poly + +=# SELECT ST_Summary(ST_GeomFromText('LINESTRING(0 0, 1 1)')) as geom, + ST_Summary(ST_GeogFromText('POLYGON((0 0, 1 1, 1 2, 1 1, 0 0))')) geog; + geom | geog +-----------------------------+-------------------------- + LineString[B] with 2 points | Polygon[BG] with 1 rings + : ring 0 has 5 points + : +(1 row) ---results - good_line | poly -----------------------+------------------------- - | -Line[ZB] with 2 points : Polygon[ZB] with 1 rings - : ring 0 has 5 points - : + +=# SELECT ST_Summary(ST_GeogFromText('LINESTRING(0 0 1, 1 1 1)')) As geog_line, + ST_Summary(ST_GeomFromText('POLYGON((0 0 1, 1 1 2, 1 2 3, 1 1 1, 0 0 1))')) As geom_poly; +; + geog_line | geom_poly +-------------------------------+-------------------------- + LineString[ZBG] with 2 points | Polygon[ZB] with 1 rings + : ring 0 has 5 points + : +(1 row) @@ -1637,7 +2146,21 @@ See Also - , + +, +, +, +, +, + + + + +, +, +, + + @@ -1696,6 +2219,142 @@ , , , , , , + + + + ST_XMax + + Returns X maxima of a bounding box 2d or 3d or a geometry. + + + + + + float ST_XMax + box3d aGeomorBox2DorBox3D + + + + + + Description + + Returns X maxima of a bounding box 2d or 3d or a geometry. + + + Although this function is only defined for box3d, it will work for box2d and geometry because of the auto-casting behavior + defined for geometries and box2d. However you can not feed it a geometry or box2d text representation, since that will not auto-cast. + + + &Z_support; + &curve_support; + + + + + Examples + + SELECT ST_XMax('BOX3D(1 2 3, 4 5 6)'); +st_xmax +------- +4 + +SELECT ST_XMax(ST_GeomFromText('LINESTRING(1 3 4, 5 6 7)')); +st_xmax +------- +5 + +SELECT ST_XMax(CAST('BOX(-3 2, 3 4)' As box2d)); +st_xmax +------- +3 +--Observe THIS DOES NOT WORK because it will try to autocast the string representation to a BOX3D +SELECT ST_XMax('LINESTRING(1 3, 5 6)'); + +--ERROR: BOX3D parser - doesnt start with BOX3D( + +SELECT ST_XMax(ST_GeomFromEWKT('CIRCULARSTRING(220268 150415 1,220227 150505 2,220227 150406 3)')); +st_xmax +-------- +220288.248780547 + + + + + + See Also + + , , , , + + + + + + ST_XMin + + Returns X minima of a bounding box 2d or 3d or a geometry. + + + + + + float ST_XMin + box3d aGeomorBox2DorBox3D + + + + + + Description + + Returns X minima of a bounding box 2d or 3d or a geometry. + + + Although this function is only defined for box3d, it will work for box2d and geometry because of the auto-casting behavior + defined for geometries and box2d. However you can not feed it a geometry or box2d text representation, since that will not auto-cast. + + + &Z_support; + &curve_support; + + + + + Examples + + SELECT ST_XMin('BOX3D(1 2 3, 4 5 6)'); +st_xmin +------- +1 + +SELECT ST_XMin(ST_GeomFromText('LINESTRING(1 3 4, 5 6 7)')); +st_xmin +------- +1 + +SELECT ST_XMin(CAST('BOX(-3 2, 3 4)' As box2d)); +st_xmin +------- +-3 +--Observe THIS DOES NOT WORK because it will try to autocast the string representation to a BOX3D +SELECT ST_XMin('LINESTRING(1 3, 5 6)'); + +--ERROR: BOX3D parser - doesnt start with BOX3D( + +SELECT ST_XMin(ST_GeomFromEWKT('CIRCULARSTRING(220268 150415 1,220227 150505 2,220227 150406 3)')); +st_xmin +-------- +220186.995121892 + + + + + + See Also + + , , , , + + @@ -1752,6 +2411,142 @@ , , , , , , + + + + ST_YMax + + Returns Y maxima of a bounding box 2d or 3d or a geometry. + + + + + + float ST_YMax + box3d aGeomorBox2DorBox3D + + + + + + Description + + Returns Y maxima of a bounding box 2d or 3d or a geometry. + + + Although this function is only defined for box3d, it will work for box2d and geometry because of the auto-casting behavior + defined for geometries and box2d. However you can not feed it a geometry or box2d text representation, since that will not auto-cast. + + + &Z_support; + &curve_support; + + + + + Examples + + SELECT ST_YMax('BOX3D(1 2 3, 4 5 6)'); +st_ymax +------- +5 + +SELECT ST_YMax(ST_GeomFromText('LINESTRING(1 3 4, 5 6 7)')); +st_ymax +------- +6 + +SELECT ST_YMax(CAST('BOX(-3 2, 3 4)' As box2d)); +st_ymax +------- +4 +--Observe THIS DOES NOT WORK because it will try to autocast the string representation to a BOX3D +SELECT ST_YMax('LINESTRING(1 3, 5 6)'); + +--ERROR: BOX3D parser - doesnt start with BOX3D( + +SELECT ST_YMax(ST_GeomFromEWKT('CIRCULARSTRING(220268 150415 1,220227 150505 2,220227 150406 3)')); +st_ymax +-------- +150506.126829327 + + + + + + See Also + + , , , , + + + + + + ST_YMin + + Returns Y minima of a bounding box 2d or 3d or a geometry. + + + + + + float ST_YMin + box3d aGeomorBox2DorBox3D + + + + + + Description + + Returns Y minima of a bounding box 2d or 3d or a geometry. + + + Although this function is only defined for box3d, it will work for box2d and geometry because of the auto-casting behavior + defined for geometries and box2d. However you can not feed it a geometry or box2d text representation, since that will not auto-cast. + + + &Z_support; + &curve_support; + + + + + Examples + + SELECT ST_YMin('BOX3D(1 2 3, 4 5 6)'); +st_ymin +------- +2 + +SELECT ST_YMin(ST_GeomFromText('LINESTRING(1 3 4, 5 6 7)')); +st_ymin +------- +3 + +SELECT ST_YMin(CAST('BOX(-3 2, 3 4)' As box2d)); +st_ymin +------- +2 +--Observe THIS DOES NOT WORK because it will try to autocast the string representation to a BOX3D +SELECT ST_YMin('LINESTRING(1 3, 5 6)'); + +--ERROR: BOX3D parser - doesnt start with BOX3D( + +SELECT ST_YMin(ST_GeomFromEWKT('CIRCULARSTRING(220268 150415 1,220227 150505 2,220227 150406 3)')); +st_ymin +-------- +150406 + + + + + + See Also + + , , , , , + + @@ -1801,6 +2596,74 @@ , , , , , + + + + ST_ZMax + + Returns Z minima of a bounding box 2d or 3d or a geometry. + + + + + + float ST_ZMax + box3d aGeomorBox2DorBox3D + + + + + + Description + + Returns Z maxima of a bounding box 2d or 3d or a geometry. + + + Although this function is only defined for box3d, it will work for box2d and geometry because of the auto-casting behavior + defined for geometries and box2d. However you can not feed it a geometry or box2d text representation, since that will not auto-cast. + + + &Z_support; + &curve_support; + + + + + Examples + + SELECT ST_ZMax('BOX3D(1 2 3, 4 5 6)'); +st_zmax +------- +6 + +SELECT ST_ZMax(ST_GeomFromEWKT('LINESTRING(1 3 4, 5 6 7)')); +st_zmax +------- +7 + +SELECT ST_ZMax('BOX3D(-3 2 1, 3 4 1)' ); +st_zmax +------- +1 +--Observe THIS DOES NOT WORK because it will try to autocast the string representation to a BOX3D +SELECT ST_ZMax('LINESTRING(1 3 4, 5 6 7)'); + +--ERROR: BOX3D parser - doesnt start with BOX3D( + +SELECT ST_ZMax(ST_GeomFromEWKT('CIRCULARSTRING(220268 150415 1,220227 150505 2,220227 150406 3)')); +st_zmax +-------- +3 + + + + + + See Also + + , , , , , + + @@ -1861,6 +2724,74 @@ , , + + + + ST_ZMin + + Returns Z minima of a bounding box 2d or 3d or a geometry. + + + + + + float ST_ZMin + box3d aGeomorBox2DorBox3D + + + + + + Description + + Returns Z minima of a bounding box 2d or 3d or a geometry. + + + Although this function is only defined for box3d, it will work for box2d and geometry because of the auto-casting behavior + defined for geometries and box2d. However you can not feed it a geometry or box2d text representation, since that will not auto-cast. + + + &Z_support; + &curve_support; + + + + + Examples + + SELECT ST_ZMin('BOX3D(1 2 3, 4 5 6)'); +st_zmin +------- +3 + +SELECT ST_ZMin(ST_GeomFromEWKT('LINESTRING(1 3 4, 5 6 7)')); +st_zmin +------- +4 + +SELECT ST_ZMin('BOX3D(-3 2 1, 3 4 1)' ); +st_zmin +------- +1 +--Observe THIS DOES NOT WORK because it will try to autocast the string representation to a BOX3D +SELECT ST_ZMin('LINESTRING(1 3 4, 5 6 7)'); + +--ERROR: BOX3D parser - doesnt start with BOX3D( + +SELECT ST_ZMin(ST_GeomFromEWKT('CIRCULARSTRING(220268 150415 1,220227 150505 2,220227 150406 3)')); +st_zmin +-------- +1 + + + + + + See Also + + , , , , , , + + diff -Nru postgis-1.5.3/doc/reference_constructor.xml postgis-2.0.1/doc/reference_constructor.xml --- postgis-1.5.3/doc/reference_constructor.xml 2011-06-10 01:54:11.000000000 +0000 +++ postgis-2.0.1/doc/reference_constructor.xml 2012-05-08 16:47:25.000000000 +0000 @@ -118,10 +118,10 @@ Description Returns a geography object from the well-known text or extended well-known representation. SRID 4326 is assumed. This - is an alias for ST_GeographyFromText + is an alias for ST_GeographyFromText. Points are always expressed in long lat form. - + Examples --- converting lon lat coords to geography @@ -129,10 +129,9 @@ UPDATE sometable SET geog = ST_GeogFromText('SRID=4326;POINT(' || lon || ' ' || lat || ')'); - See Also - , + , @@ -156,7 +155,7 @@ See Also - + , @@ -296,20 +295,31 @@ The EWKB format is not an OGC standard, but a PostGIS specific format that includes the spatial reference system (SRID) identifier + Enhanced: 2.0.0 support for Polyhedral surfaces and TIN was introduced. &Z_support; &curve_support; + &P_support; + &T_support; Examples line string binary rep 0f LINESTRING(-71.160281 42.258729,-71.160837 42.259113,-71.161144 42.25932) in NAD 83 long lat (4269). - NOTE: Even though byte arrays are delimited with \ and may have ', we need to escape both out with \ and ''. So it does not + NOTE: Even though byte arrays are delimited with \ and may have ', we need to escape both out with \ and '' if standard_conforming_strings is off. So it does not look exactly like its AsEWKB representation. SELECT ST_GeomFromEWKB(E'\\001\\002\\000\\000 \\255\\020\\000\\000\\003\\000\\000\\000\\344J= \\013B\\312Q\\300n\\303(\\010\\036!E@''\\277E''K \\312Q\\300\\366{b\\235*!E@\\225|\\354.P\\312Q \\300p\\231\\323e1!E@'); + + In PostgreSQL 9.1+ - standard_conforming_strings is set to on by default, where as in past versions it was set to on. You can change defaults as needed + for a single query or at the database or server level. Below is how you would do it with standard_conforming_strings = on. In this case we escape the ' with standard ansi ', + but slashes are not escaped + + set standard_conforming_strings = on; +SELECT ST_GeomFromEWKB('\001\002\000\000 \255\020\000\000\003\000\000\000\344J=\012\013B + \312Q\300n\303(\010\036!E@''\277E''K\012\312Q\300\366{b\235*!E@\225|\354.P\312Q\012\300p\231\323e1') See Also @@ -339,8 +349,11 @@ The EWKT format is not an OGC standard, but an PostGIS specific format that includes the spatial reference system (SRID) identifier + Enhanced: 2.0.0 support for Polyhedral surfaces and TIN was introduced. &Z_support; &curve_support; + &P_support; + &T_support; @@ -376,10 +389,22 @@ -71.1031880899493 42.3152774590236)), ((-71.1043632495873 42.315113108546,-71.1043583974082 42.3151211109857, -71.1043443253471 42.3150676015829,-71.1043850704575 42.3150793250568,-71.1043632495873 42.315113108546)))'); - + + --3d circular string SELECT ST_GeomFromEWKT('CIRCULARSTRING(220268 150415 1,220227 150505 2,220227 150406 3)'); - + + +--Polyhedral Surface example +SELECT ST_GeomFromEWKT('POLYHEDRALSURFACE( + ((0 0 0, 0 0 1, 0 1 1, 0 1 0, 0 0 0)), + ((0 0 0, 0 1 0, 1 1 0, 1 0 0, 0 0 0)), + ((0 0 0, 1 0 0, 1 0 1, 0 0 1, 0 0 0)), + ((1 1 0, 1 1 1, 1 0 1, 1 0 0, 1 1 0)), + ((0 1 0, 0 1 1, 1 1 1, 1 1 0, 0 1 0)), + ((0 0 1, 1 0 1, 1 1 1, 0 1 1, 0 0 1)) +)'); + See Also @@ -427,6 +452,11 @@ geometry ST_GeomFromGML text geomgml + + geometry ST_GeomFromGML + text geomgml + integer srid + @@ -450,8 +480,12 @@ OGC GML standards, cf: http://www.opengeospatial.org/standards/gml: - Availability: 1.5 + Availability: 1.5, requires libxml2 1.6+ + Enhanced: 2.0.0 support for Polyhedral surfaces and TIN was introduced. + Enhanced: 2.0.0 default srid optional parameter added. &Z_support; + &P_support; + &T_support; GML allow mixed dimensions (2D and 3D inside the same MultiGeometry for instance). As PostGIS geometries don't, ST_GeomFromGML convert the whole geometry to 2D if a missing Z dimension is found once. GML support mixed SRS inside the same MultiGeometry. As PostGIS geometries don't, ST_GeomFromGML, in this case, reproject all subgeometries to the SRS root node. If no srsName attribute available for the GML root node, the function throw an error. @@ -476,7 +510,7 @@ Examples - XLink usage - SELECT @@ -490,11 +524,108 @@ ');]]>); + + + Examples - Polyhedral Surface + SELECT ST_AsEWKT( + + + + 0 0 0 0 0 1 0 1 1 0 1 0 0 0 0 + + + + + 0 0 0 0 1 0 1 1 0 1 0 0 0 0 0 + + + + + 0 0 0 1 0 0 1 0 1 0 0 1 0 0 0 + + + + + 1 1 0 1 1 1 1 0 1 1 0 0 1 1 0 + + + + + 0 1 0 0 1 1 1 1 1 1 1 0 0 1 0 + + + + + 0 0 1 1 0 1 1 1 1 0 1 1 0 0 1 + + + +']]>)); + +-- result -- + POLYHEDRALSURFACE(((0 0 0,0 0 1,0 1 1,0 1 0,0 0 0)), + ((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)), + ((0 0 0,1 0 0,1 0 1,0 0 1,0 0 0)), + ((1 1 0,1 1 1,1 0 1,1 0 0,1 1 0)), + ((0 1 0,0 1 1,1 1 1,1 1 0,0 1 0)), + ((0 0 1,1 0 1,1 1 1,0 1 1,0 0 1))) + + + + + + See Also + , , + + + + + + ST_GeomFromGeoJSON + Takes as input a geojson representation of a geometry and outputs a PostGIS geometry object + + + + + + geometry ST_GeomFromGeoJSON + text geomjson + + + + + + Description + Constructs a PostGIS geometry object from the GeoJSON representation. + ST_GeomFromGeoJSON works only for JSON Geometry fragments. It throws an error if you try to use it on a whole JSON document. + + Availability: 2.0.0 requires - JSON-C >= 0.9 + If you do not have JSON-C enabled, support you will get an error notice instead of seeing an output. + To enable JSON-C, run configure --with-jsondir=/path/to/json-c. See for details. + &Z_support; + + + + Examples + SELECT ST_AsText(ST_GeomFromGeoJSON('{"type":"Point","coordinates":[-48.23456,20.12345]}')) As wkt; +wkt +------ +POINT(-48.23456 20.12345) + +-- a 3D linestring +SELECT ST_AsText(ST_GeomFromGeoJSON('{"type":"LineString","coordinates":[[1,2,3],[4,5,6],[7,8,9]]}')) As wkt; + +wkt +------------------- +LINESTRING(1 2,4 5,7 8) + + + See Also - - + , , @@ -527,7 +658,7 @@ OGC KML standards, cf: http://www.opengeospatial.org/standards/kml: - Availability: 1.5 + Availability: 1.5,libxml2 2.6+ &Z_support; ST_GeomFromKML function not support SQL/MM curves geometries. @@ -547,7 +678,7 @@ See Also - + , @@ -562,17 +693,23 @@ geometry ST_GMLToSQL text geomgml + + geometry ST_GMLToSQL + text geomgml + integer srid + Description &sqlmm_compliant; SQL-MM 3: 5.1.50 (except for curves support). - Availability: 1.5 + Availability: 1.5, requires libxml2 1.6+ + Enhanced: 2.0.0 support for Polyhedral surfaces and TIN was introduced. + Enhanced: 2.0.0 default srid optional parameter added. See Also - - + , , @@ -611,6 +748,8 @@ &sfs_compliant; s3.2.6.2 - option SRID is from the conformance suite. &sqlmm_compliant; SQL-MM 3: 5.1.40 &curve_support; + Changed: 2.0.0 In prior versions of PostGIS ST_GeomFromText('GEOMETRYCOLLECTION(EMPTY)') was allowed. This is now illegal in PostGIS 2.0.0 to better conform with SQL/MM standards. This should now be + written as ST_GeomFromText('GEOMETRYCOLLECTION EMPTY') @@ -691,19 +830,17 @@ SQL. This is an alternate name for ST_WKBToSQL. If SRID is not specified, it defaults to -1 (Unknown). - &sfs_compliant; s3.2.7.2 - the optional SRID is from the conformance suite - &sqlmm_compliant; SQL-MM 3: 5.1.41 &curve_support; - Examples - --Although bytea rep contains single \, these need to be escaped when inserting into a table + --Although bytea rep contains single \, these need to be escaped when inserting into a table + -- unless standard_conforming_strings is set to on. SELECT ST_AsEWKT( ST_GeomFromWKB(E'\\001\\002\\000\\000\\000\\002\\000\\000\\000\\037\\205\\353Q\\270~\\\\\\300\\323Mb\\020X\\231C@\\020X9\\264\\310~\\\\\\300)\\\\\\217\\302\\365\\230C@',4326) ); @@ -771,7 +908,7 @@ See Also - , , + , , @@ -1031,18 +1168,17 @@ - + - ST_MakeBox3D + ST_3DMakeBox Creates a BOX3D defined by the given 3d point geometries. - - box3d ST_MakeBox3D + box3d ST_3DMakeBox geometry point3DLowLeftBottom geometry point3DUpRightTop @@ -1061,6 +1197,7 @@ This function supports 3d and will not drop the z-index. + Changed: 2.0.0 In prior versions this used to be called ST_MakeBox3D @@ -1068,7 +1205,7 @@ Examples -SELECT ST_MakeBox3D(ST_MakePoint(-989502.1875, 528439.5625, 10), +SELECT ST_3DMakeBox(ST_MakePoint(-989502.1875, 528439.5625, 10), ST_MakePoint(-987121.375 ,529933.1875, 10)) As abb3d --bb3d-- @@ -1089,25 +1226,25 @@ ST_MakeLine - Creates a Linestring from point geometries. + Creates a Linestring from point or line geometries. geometry ST_MakeLine - geometry set pointfield + geometry set geoms geometry ST_MakeLine - geometry point1 - geometry point2 + geometry geom1 + geometry geom2 geometry ST_MakeLine - geometry[] point_array + geometry[] geoms_array @@ -1116,12 +1253,17 @@ Description ST_MakeLine comes in 3 forms: a spatial aggregate that takes - rows of point geometries and returns a line string, a function that takes an array of points, and a regular function that takes two point geometries. You + rows of point-or-line geometries and returns a line string, a function that takes an array of point-or-lines, and a regular function that takes two point-or-line geometries. You might want to use a subselect to order points before feeding them to the aggregate version of this function. + + When adding line components a common node is removed from the output. + + &Z_support; Availability: 1.4.0 - ST_MakeLine(geomarray) was introduced. ST_MakeLine aggregate functions was enhanced to handle more points faster. + Availability: 2.0.0 - Support for linestring input elements was introduced @@ -1131,10 +1273,21 @@ in the order of the travel. +-- For pre-PostgreSQL 9.0 - this usually works, +-- but the planner may on occasion choose not to respect the order of the subquery SELECT gps.gps_track, ST_MakeLine(gps.the_geom) As newgeom FROM (SELECT gps_track,gps_time, the_geom FROM gps_points ORDER BY gps_track, gps_time) As gps - GROUP BY gps.gps_track + GROUP BY gps.gps_track; + + +-- If you are using PostgreSQL 9.0+ +-- (you can use the new ORDER BY support for aggregates) +-- this is a guaranteed way to get a correctly ordered linestring +-- Your order by part can order by more than one column if needed +SELECT gps.gps_track, ST_MakeLine(gps.the_geom ORDER BY gps_time) As newgeom + FROM gps_points As gps + GROUP BY gps.gps_track; Examples: Non-Spatial Aggregate version @@ -1171,6 +1324,9 @@ LINESTRING(1 2 3,3 4 5,6 6 6) + + + See Also , , , @@ -1194,18 +1350,19 @@ double precision ymin double precision xmax double precision ymax - integer srid + integer srid=unknown - + Description Creates a rectangular Polygon formed from the minima and maxima. by the given shell. Input - values must be in SRS specified by the SRID. + values must be in SRS specified by the SRID. If no SRID is specified the unknown spatial reference system is assumed Availability: 1.5 + Enhanced: 2.0: Ability to specify an envelope without specifying an SRID was introduced. @@ -1344,7 +1501,14 @@ See Also - , , , , + + , + , + , + , + , + + @@ -1710,8 +1874,8 @@ --If your point coordinates are in a different spatial reference from WGS-84 long lat, then you need to transform before casting -- This example we convert a point in Pennsylvania State Plane feet to WGS 84 and then geography -SELECT ST_Transform(ST_SetSRID(ST_Point(3637510, 3014852),2273),4326)::geography - ; +SELECT ST_Transform(ST_SetSRID(ST_Point(3637510, 3014852),2273),4326)::geography; + @@ -1812,12 +1976,10 @@ If an SRID is not specified, it defaults to -1. NULL is returned if the input bytea does not represent a POINT geometry. - &sfs_compliant; s3.2.7.2 &sqlmm_compliant; SQL-MM 3: 6.1.9 &Z_support; &curve_support; - diff -Nru postgis-1.5.3/doc/reference_editor.xml postgis-2.0.1/doc/reference_editor.xml --- postgis-1.5.3/doc/reference_editor.xml 2011-02-06 00:36:19.000000000 +0000 +++ postgis-2.0.1/doc/reference_editor.xml 2012-03-10 13:42:43.000000000 +0000 @@ -94,7 +94,7 @@ float a float b float d - float e> + float e float xoff float yoff @@ -128,9 +128,12 @@ z' = z This method is a subcase of the 3D method above. + Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced. Availability: 1.1.2. Name changed from Affine to ST_Affine in 1.2.2 Prior to 1.3.4, this function crashes if used with geometries that contain CURVES. This is fixed in 1.3.4+ + &P_support; + &T_support; &Z_support; &curve_support; @@ -140,11 +143,11 @@ Examples ---Rotate a 3d line 180 degrees about the z axis. Note this is long-hand for doing ST_RotateZ(); +--Rotate a 3d line 180 degrees about the z axis. Note this is long-hand for doing ST_Rotate(); SELECT ST_AsEWKT(ST_Affine(the_geom, cos(pi()), -sin(pi()), 0, sin(pi()), cos(pi()), 0, 0, 0, 1, 0, 0, 0)) As using_affine, - ST_AsEWKT(ST_RotateZ(the_geom, pi())) As using_rotatez + ST_AsEWKT(ST_Rotate(the_geom, pi())) As using_rotate FROM (SELECT ST_GeomFromEWKT('LINESTRING(1 2 3, 1 4 3)') As the_geom) As foo; - using_affine | using_rotatez + using_affine | using_rotate -----------------------------+----------------------------- LINESTRING(-1 -2 3,-1 -4 3) | LINESTRING(-1 -2 3,-1 -4 3) (1 row) @@ -152,11 +155,10 @@ --Rotate a 3d line 180 degrees in both the x and z axis SELECT ST_AsEWKT(ST_Affine(the_geom, cos(pi()), -sin(pi()), 0, sin(pi()), cos(pi()), -sin(pi()), 0, sin(pi()), cos(pi()), 0, 0, 0)) FROM (SELECT ST_GeomFromEWKT('LINESTRING(1 2 3, 1 4 3)') As the_geom) As foo; - st_asewkt + st_asewkt ------------------------------- LINESTRING(-1 -2 -3,-1 -4 -3) (1 row) - @@ -193,7 +195,10 @@ This is useful for force OGC-compliant output (since OGC only specifies 2-D geometries). + Enhanced: 2.0.0 support for Polyhedral surfaces was introduced. &curve_support; + &P_support; + &Z_support; @@ -243,8 +248,10 @@ Forces the geometries into XYZ mode. This is an alias for ST_Force_3DZ. If a geometry has no Z component, then a 0 Z coordinate is tacked on. - &Z_support; + Enhanced: 2.0.0 support for Polyhedral surfaces was introduced. + &P_support; &curve_support; + &Z_support; @@ -296,6 +303,8 @@ Forces the geometries into XYZ mode. This is a synonym for ST_Force_3DZ. If a geometry has no Z component, then a 0 Z coordinate is tacked on. + Enhanced: 2.0.0 support for Polyhedral surfaces was introduced. + &P_support; &Z_support; &curve_support; @@ -459,7 +468,10 @@ Converts the geometry into a GEOMETRYCOLLECTION. This is useful for simplifying the WKB representation. + Enhanced: 2.0.0 support for Polyhedral surfaces was introduced. Availability: 1.2.2, prior to 1.3.4 this function will crash with Curves. This is fixed in 1.3.4+ + + &P_support; &Z_support; &curve_support; @@ -484,6 +496,27 @@ (1 row) + + +-- POLYHEDRAL example -- +SELECT ST_AsEWKT(ST_Force_Collection('POLYHEDRALSURFACE(((0 0 0,0 0 1,0 1 1,0 1 0,0 0 0)), + ((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)), + ((0 0 0,1 0 0,1 0 1,0 0 1,0 0 0)), + ((1 1 0,1 1 1,1 0 1,1 0 0,1 1 0)), + ((0 1 0,0 1 1,1 1 1,1 1 0,0 1 0)), + ((0 0 1,1 0 1,1 1 1,0 1 1,0 0 1)))')) + + st_asewkt +---------------------------------------------------------------------------------- +GEOMETRYCOLLECTION( + POLYGON((0 0 0,0 0 1,0 1 1,0 1 0,0 0 0)), + POLYGON((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)), + POLYGON((0 0 0,1 0 0,1 0 1,0 0 1,0 0 0)), + POLYGON((1 1 0,1 1 1,1 0 1,1 0 0,1 1 0)), + POLYGON((0 1 0,0 1 1,1 1 1,1 1 0,0 1 0)), + POLYGON((0 0 1,1 0 1,1 1 1,0 1 1,0 0 1)) +) + @@ -522,7 +555,9 @@ orientated in a clockwise direction and the interior rings in a counter-clockwise direction. + Enhanced: 2.0.0 support for Polyhedral surfaces was introduced. &Z_support; + &P_support; @@ -609,9 +644,9 @@ ST_CollectionExtract - Given a GEOMETRYCOLLECTION, returns a MULTI* geometry consisting only of the specified type. Sub-geometries that are not - the specified type are ignored. If there are no sub-geometries of the right type, an EMPTY collection will be returned. Only - points, lines and polygons are supported. Type numbers are 1 == POINT, 2 == LINESTRING, 3 == POLYGON. + +Given a (multi)geometry, returns a (multi)geometry consisting only of elements of the specified type. + @@ -627,12 +662,20 @@ Description - Given a GEOMETRYCOLLECTION, returns a MULTI* geometry consisting only of the specified type. Sub-geometries that are not - the specified type are ignored. If there are no sub-geometries of the right type, an EMPTY collection will be returned. Only - points, lines and polygons are supported. Type numbers are 1 == POINT, 2 == LINESTRING, 3 == POLYGON. + +Given a (multi)geometry, returns a (multi)geometry consisting only of elements of the specified type. +Sub-geometries that are not the specified type are ignored. If there are no sub-geometries of the right type, an EMPTY geometry will be returned. +Only points, lines and polygons are supported. Type numbers are 1 == POINT, 2 == LINESTRING, 3 == POLYGON. + Availability: 1.5.0 - + + +Prior to 1.5.3 this function returned non-collection inputs untouched, no matter type. +In 1.5.3 non-matching single geometries result in a NULL return. +In of 2.0.0 every case of missing match results in a typed EMPTY return. + + @@ -654,10 +697,65 @@ See Also - + , , + + + ST_CollectionHomogenize + + + Given a geometry collection, returns the "simplest" representation of the contents. + + + + + + + geometry ST_CollectionHomogenize + geometry collection + + + + + + Description + + + Given a geometry collection, returns the "simplest" representation of the contents. Singletons will be returned as singletons. Collections that are homogeneous will be returned as the appropriate multi-type. + + + Availability: 2.0.0 + + + + + Examples + + + SELECT ST_AsText(ST_CollectionHomogenize('GEOMETRYCOLLECTION(POINT(0 0))')); + + st_astext + ------------ + POINT(0 0) + (1 row) + + SELECT ST_AsText(ST_CollectionHomogenize('GEOMETRYCOLLECTION(POINT(0 0),POINT(1 1))')); + + st_astext + --------------------- + MULTIPOINT(0 0,1 1) + (1 row) + + + + + See Also + , + + + ST_Multi @@ -781,7 +879,7 @@ ST_Rotate - This is a synonym for ST_RotateZ + Rotate a geometry rotRadians counter-clockwise about an origin. @@ -789,26 +887,70 @@ geometry ST_Rotate geometry geomA - float rotZRadians + float rotRadians + + + geometry ST_Rotate + geometry geomA + float rotRadians + float x0 + float y0 + + + + geometry ST_Rotate + geometry geomA + float rotRadians + geometry pointOrigin + Description - This is a synonym for ST_RotateZ.. Rotates geometry rotZRadians about the Z-axis. + Rotates geometry rotRadians counter-clockwise about the origin. The rotation origin can be + specified either as a POINT geometry, or as x and y coordinates. If the origin is not + specified, the geometry is rotated about POINT(0 0). + Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced. + Enhanced: 2.0.0 additional parameters for specifying the origin of rotation were added. Availability: 1.1.2. Name changed from Rotate to ST_Rotate in 1.2.2 &Z_support; &curve_support; + &P_support; + &T_support; + Examples - + +--Rotate 180 degrees +SELECT ST_AsEWKT(ST_Rotate('LINESTRING (50 160, 50 50, 100 50)', pi())); + st_asewkt +--------------------------------------- + LINESTRING(-50 -160,-50 -50,-100 -50) +(1 row) + +--Rotate 30 degrees counter-clockwise at x=50, y=160 +SELECT ST_AsEWKT(ST_Rotate('LINESTRING (50 160, 50 50, 100 50)', pi()/6, 50, 160)); + st_asewkt +--------------------------------------------------------------------------- + LINESTRING(50 160,105 64.7372055837117,148.301270189222 89.7372055837117) +(1 row) + +--Rotate 60 degrees clockwise from centroid +SELECT ST_AsEWKT(ST_Rotate(geom, -pi()/3, ST_Centroid(geom))) +FROM (SELECT 'LINESTRING (50 160, 50 50, 100 50)'::geometry AS geom) AS foo; + st_asewkt +-------------------------------------------------------------- + LINESTRING(116.4225 130.6721,21.1597 75.6721,46.1597 32.3708) +(1 row) + @@ -844,9 +986,11 @@ ST_RotateX(geomA, rotRadians) is short-hand for ST_Affine(geomA, 1, 0, 0, 0, cos(rotRadians), -sin(rotRadians), 0, sin(rotRadians), cos(rotRadians), 0, 0, 0). + Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced. Availability: 1.1.2. Name changed from RotateX to ST_RotateX in 1.2.2 - + &P_support; &Z_support; + &T_support; @@ -896,8 +1040,12 @@ is short-hand for ST_Affine(geomA, cos(rotRadians), 0, sin(rotRadians), 0, 1, 0, -sin(rotRadians), 0, cos(rotRadians), 0, 0, 0). Availability: 1.1.2. Name changed from RotateY to ST_RotateY in 1.2.2 - + Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced. + + &P_support; &Z_support; + &T_support; + @@ -917,8 +1065,7 @@ See Also - , , , Rotate around Point, Create Ellipse functions + , , @@ -944,14 +1091,19 @@ Rotate a geometry geomA - rotRadians about the Z axis. + This is a synonym for ST_Rotate ST_RotateZ(geomA, rotRadians) is short-hand for SELECT ST_Affine(geomA, cos(rotRadians), -sin(rotRadians), 0, sin(rotRadians), cos(rotRadians), 0, 0, 0, 1, 0, 0, 0). + Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced. + Availability: 1.1.2. Name changed from RotateZ to ST_RotateZ in 1.2.2 Prior to 1.3.4, this function crashes if used with geometries that contain CURVES. This is fixed in 1.3.4+ &Z_support; &curve_support; + &P_support; + &T_support; @@ -980,8 +1132,7 @@ See Also - , , , Rotate around Point, Create Ellipse functions + , , @@ -1028,8 +1179,11 @@ Availability: 1.1.0. + Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced. + &P_support; &Z_support; &curve_support; + &T_support; @@ -1165,7 +1319,7 @@ See Also - ,, , , + , , , , @@ -1224,21 +1378,18 @@ See Also - , , , ,, + , , , , , - ST_SnapToGrid - Snap all points of the input geometry to the grid defined by - its origin and cell size. Remove consecutive points falling on the - same cell, eventually returning NULL if output points are not - enough to define a geometry of the given type. Collapsed - geometries in a collection are stripped from it. Useful for reducing precision. + + Snap all points of the input geometry to a regular grid. + @@ -1285,6 +1436,7 @@ same cell, eventually returning NULL if output points are not enough to define a geometry of the given type. Collapsed geometries in a collection are stripped from it. + Useful for reducing precision. Variant 4: Introduced 1.1.0 - Snap all points of the input geometry to the grid defined by @@ -1353,7 +1505,214 @@ See Also - , , , , + + , + , + , + , + , + + + + + + + + ST_Snap + + + Snap segments and vertices of input geometry + to vertices of a reference geometry. + + + + + + + geometry ST_Snap + geometry input + geometry reference + float tolerance + + + + + + Description + + + Snaps the vertices and segments of a geometry + another Geometry's vertices. + A snap distance tolerance is used to control where snapping is performed. + + + Snapping one geometry to another can improve + robustness for overlay operations by eliminating + nearly-coincident edges + (which cause problems during noding and intersection calculation). + + + + Too much snapping can result in invalid topology + being created, so the number and location of snapped vertices + is decided using heuristics to determine when it + is safe to snap. + This can result in some potential snaps being omitted, however. + + + + + The returned geometry might loose its simplicity (see + ) and validity (see + ). + + + + Availability: 2.0.0 requires GEOS >= 3.3.0. + + + + Examples + + + + + + + + + + + + + + + + + + + + + + + + + + + +SELECT ST_AsText(ST_Snap(poly,line, ST_Distance(poly,line)*1.01)) AS polysnapped +FROM (SELECT + ST_GeomFromText('MULTIPOLYGON( + ((26 125, 26 200, 126 200, 126 125, 26 125 ), + ( 51 150, 101 150, 76 175, 51 150 )), + (( 151 100, 151 200, 176 175, 151 100 )))') As poly, + ST_GeomFromText('LINESTRING (5 107, 54 84, 101 100)') As line + + ) As foo; + + polysnapped +--------------------------------------------------------------------- + MULTIPOLYGON(((26 125,26 200,126 200,126 125,101 100,26 125), + (51 150,101 150,76 175,51 150)),((151 100,151 200,176 175,151 100))) + + + + + + + + + + + +SELECT ST_AsText( + ST_Snap(poly,line, ST_Distance(poly,line)*1.25) + ) AS polysnapped +FROM (SELECT + ST_GeomFromText('MULTIPOLYGON( + (( 26 125, 26 200, 126 200, 126 125, 26 125 ), + ( 51 150, 101 150, 76 175, 51 150 )), + (( 151 100, 151 200, 176 175, 151 100 )))') As poly, + ST_GeomFromText('LINESTRING (5 107, 54 84, 101 100)') As line + + ) As foo; + + polysnapped +--------------------------------------------------------------------- +MULTIPOLYGON(((5 107,26 200,126 200,126 125,101 100,54 84,5 107), +(51 150,101 150,76 175,51 150)),((151 100,151 200,176 175,151 100))) + + + + + + + + + + + + + +SELECT ST_AsText( + ST_Snap(line, poly, ST_Distance(poly,line)*1.01) + ) AS linesnapped +FROM (SELECT + ST_GeomFromText('MULTIPOLYGON( + ((26 125, 26 200, 126 200, 126 125, 26 125), + (51 150, 101 150, 76 175, 51 150 )), + ((151 100, 151 200, 176 175, 151 100)))') As poly, + ST_GeomFromText('LINESTRING (5 107, 54 84, 101 100)') As line + ) As foo; + + linesnapped +---------------------------------------- + LINESTRING(5 107,26 125,54 84,101 100) + + + + + + + + + + + + +SELECT ST_AsText( + ST_Snap(line, poly, ST_Distance(poly,line)*1.25) + ) AS linesnapped +FROM (SELECT + ST_GeomFromText('MULTIPOLYGON( + (( 26 125, 26 200, 126 200, 126 125, 26 125 ), + (51 150, 101 150, 76 175, 51 150 )), + ((151 100, 151 200, 176 175, 151 100 )))') As poly, + ST_GeomFromText('LINESTRING (5 107, 54 84, 101 100)') As line + ) As foo; + linesnapped +--------------------------------------- +LINESTRING(26 125,54 84,101 100) + + + + + + + + + + + + See Also + + + + @@ -1396,9 +1755,10 @@ Prior to 1.3.4, this function crashes if used with geometries that contain CURVES. This is fixed in 1.3.4+ - &sfs_compliant; + Enhanced: 2.0.0 support for Polyhedral surfaces was introduced.&sqlmm_compliant; SQL-MM 3: 5.1.6&curve_support; + &P_support; diff -Nru postgis-1.5.3/doc/reference_lrs.xml postgis-2.0.1/doc/reference_lrs.xml --- postgis-1.5.3/doc/reference_lrs.xml 2010-03-12 00:22:58.000000000 +0000 +++ postgis-2.0.1/doc/reference_lrs.xml 2012-02-27 22:08:12.000000000 +0000 @@ -1,6 +1,7 @@ Linear Referencing + ST_Line_Interpolate_Point @@ -81,7 +82,7 @@ See Also - ,,, + , , , @@ -117,8 +118,6 @@ This is useful for approximating numbers of addresses Availability: 1.1.0 - Availability: 1.5.1 - support for MULTILINESTRINGS was introduced. - @@ -195,7 +194,7 @@ starting and ending at the given fractions of total 2d length. Second and third arguments are float8 values between 0 and 1. This only works with LINESTRINGs. - To use with contiguous MULTILINESTRINGs use in conjunction with ST_LineMerge. + To use with contiguous MULTILINESTRINGs use in conjunction with . If 'start' and 'end' have the same value this is equivalent to . @@ -209,7 +208,7 @@ unspecified values. - Availability: 1.1.0 , Z and M supported added in 1.1.1 + Availability: 1.1.0, Z and M supported added in 1.1.1 &Z_support; @@ -265,9 +264,9 @@ - + - ST_Locate_Along_Measure + ST_LocateAlong Return a derived geometry collection value with elements that match the specified measure. Polygonal elements are not @@ -277,9 +276,10 @@ - geometry ST_Locate_Along_Measure + geometry ST_LocateAlong geometry ageom_with_measure float a_measure + float offset @@ -290,11 +290,17 @@ Return a derived geometry collection value with elements that match the specified measure. Polygonal elements are not supported. + + If an offset is provided, the resultant will be offset to the + left or right of the input line by the specified number of units. + A positive offset will be to the left, and a negative one to the + right. Semantic is specified by: ISO/IEC CD 13249-3:200x(E) - Text for Continuation CD Editing Meeting - - Availability: 1.1.0 + + Availability: 1.1.0 by old name ST_Locate_Along_Measure. + Changed: 2.0.0 in prior versions this used to be called ST_Locate_Along_Measure. The old name has been deprecated and will be removed in the future but is still available. Use this function only for geometries with an M component &M_support; @@ -303,22 +309,22 @@ Examples - SELECT ST_AsEWKT(the_geom) + SELECT ST_AsText(the_geom) FROM - (SELECT ST_Locate_Along_Measure( - ST_GeomFromEWKT('MULTILINESTRINGM((1 2 3, 3 4 2, 9 4 3), + (SELECT ST_LocateAlong( + ST_GeomFromText('MULTILINESTRINGM((1 2 3, 3 4 2, 9 4 3), (1 2 3, 5 4 5))'),3) As the_geom) As foo; st_asewkt ----------------------------------------------------------- - GEOMETRYCOLLECTIONM(MULTIPOINT(1 2 3,9 4 3),POINT(1 2 3)) + MULTIPOINT M (1 2 3) --Geometry collections are difficult animals so dump them --to make them more digestable -SELECT ST_AsEWKT((ST_Dump(the_geom)).geom) +SELECT ST_AsText((ST_Dump(the_geom)).geom) FROM - (SELECT ST_Locate_Along_Measure( - ST_GeomFromEWKT('MULTILINESTRINGM((1 2 3, 3 4 2, 9 4 3), + (SELECT ST_LocateAlong( + ST_GeomFromText('MULTILINESTRINGM((1 2 3, 3 4 2, 9 4 3), (1 2 3, 5 4 5))'),3) As the_geom) As foo; st_asewkt @@ -333,13 +339,13 @@ See Also - , + , - + - ST_Locate_Between_Measures + ST_LocateBetween Return a derived geometry collection value with elements that match the specified range of measures inclusively. Polygonal @@ -349,10 +355,11 @@ - geometry ST_Locate_Between_Measures + geometry ST_LocateBetween geometry geomA float measure_start float measure_end + float offset @@ -368,7 +375,8 @@ Semantic is specified by: ISO/IEC CD 13249-3:200x(E) - Text for Continuation CD Editing Meeting - Availability: 1.1.0 + Availability: 1.1.0 by old name ST_Locate_Between_Measures. + Changed: 2.0.0 - in prior versions this used to be called ST_Locate_Between_Measures. The old name has been deprecated and will be removed in the future but is still available for backward compatibility. &M_support; @@ -376,35 +384,35 @@ Examples - SELECT ST_AsEWKT(the_geom) + SELECT ST_AsText(the_geom) FROM - (SELECT ST_Locate_Between_Measures( - ST_GeomFromEWKT('MULTILINESTRINGM((1 2 3, 3 4 2, 9 4 3), + (SELECT ST_LocateBetween( + ST_GeomFromText('MULTILINESTRING M ((1 2 3, 3 4 2, 9 4 3), (1 2 3, 5 4 5))'),1.5, 3) As the_geom) As foo; st_asewkt ------------------------------------------------------------------ - GEOMETRYCOLLECTIONM(LINESTRING(1 2 3,3 4 2,9 4 3),POINT(1 2 3)) +------------------------------------------------------------------------ + GEOMETRYCOLLECTION M (LINESTRING M (1 2 3,3 4 2,9 4 3),POINT M (1 2 3)) --Geometry collections are difficult animals so dump them --to make them more digestable -SELECT ST_AsEWKT((ST_Dump(the_geom)).geom) +SELECT ST_AsText((ST_Dump(the_geom)).geom) FROM - (SELECT ST_Locate_Between_Measures( - ST_GeomFromEWKT('MULTILINESTRINGM((1 2 3, 3 4 2, 9 4 3), + (SELECT ST_LocateBetween( + ST_GeomFromText('MULTILINESTRING M ((1 2 3, 3 4 2, 9 4 3), (1 2 3, 5 4 5))'),1.5, 3) As the_geom) As foo; st_asewkt -------------------------------- - LINESTRINGM(1 2 3,3 4 2,9 4 3) - POINTM(1 2 3) + LINESTRING M (1 2 3,3 4 2,9 4 3) + POINT M (1 2 3) See Also - , + , @@ -480,6 +488,53 @@ + + + ST_InterpolatePoint + + Return the value of the measure dimension of a geometry at the point closed to the provided point. + + + + + + float ST_InterpolatePoint + geometry line + geometry point + + + + + + + Description + + Return the value of the measure dimension of a geometry at the point closed to the provided point. + + Availability: 2.0.0 + + &Z_support; + + + + Examples + + SELECT ST_InterpolatePoint('LINESTRING M (0 0 0, 10 0 20)', 'POINT(5 5)'); + st_interpolatepoint + --------------------- + 10 + + + + + See Also + + , , + + + + + ST_AddMeasure @@ -512,25 +567,25 @@ Examples - SELECT ST_AsEWKT(ST_AddMeasure( + SELECT ST_AsText(ST_AddMeasure( ST_GeomFromEWKT('LINESTRING(1 0, 2 0, 4 0)'),1,4)) As ewelev; ewelev -------------------------------- LINESTRINGM(1 0 1,2 0 2,4 0 4) -SELECT ST_AsEWKT(ST_AddMeasure( +SELECT ST_AsText(ST_AddMeasure( ST_GeomFromEWKT('LINESTRING(1 0 4, 2 0 4, 4 0 4)'),10,40)) As ewelev; ewelev ---------------------------------------- LINESTRING(1 0 4 10,2 0 4 20,4 0 4 40) -SELECT ST_AsEWKT(ST_AddMeasure( +SELECT ST_AsText(ST_AddMeasure( ST_GeomFromEWKT('LINESTRINGM(1 0 4, 2 0 4, 4 0 4)'),10,40)) As ewelev; ewelev ---------------------------------------- LINESTRINGM(1 0 10,2 0 20,4 0 40) -SELECT ST_AsEWKT(ST_AddMeasure( +SELECT ST_AsText(ST_AddMeasure( ST_GeomFromEWKT('MULTILINESTRINGM((1 0 4, 2 0 4, 4 0 4),(1 0 4, 2 0 4, 4 0 4))'),10,70)) As ewelev; ewelev ----------------------------------------------------------------- diff -Nru postgis-1.5.3/doc/reference_management.xml postgis-2.0.1/doc/reference_management.xml --- postgis-1.5.3/doc/reference_management.xml 2009-12-18 19:08:20.000000000 +0000 +++ postgis-2.0.1/doc/reference_management.xml 2012-06-10 06:26:30.000000000 +0000 @@ -7,7 +7,8 @@ AddGeometryColumn Adds a geometry column to an existing table of - attributes. + attributes. By default uses type modifier to define rather than constraints. + Pass in false for use_typmod to get old check constraint based behavior @@ -29,6 +30,8 @@ integer dimension + boolean + use_typmod=true @@ -51,6 +54,8 @@ integer dimension + boolean + use_typmod=true @@ -76,6 +81,9 @@ integer dimension + + boolean + use_typmod=true @@ -84,31 +92,41 @@ Description Adds a geometry column to an existing table of attributes. The - schema_name is the name of the table schema (unused - for pre-schema PostgreSQL installations). The srid + schema_name is the name of the table schema. The srid must be an integer value reference to an entry in the SPATIAL_REF_SYS - table. The type must be an uppercase string + table. The type must be a string corresponding to the geometry type, eg, 'POLYGON' or - 'MULTILINESTRING'. An error is thrown if the schemaname doesn't exist + 'MULTILINESTRING' . An error is thrown if the schemaname doesn't exist (or not visible in the current search_path) or the specified SRID, geometry type, or dimension is invalid. - Views and derivatively created spatial tables will need to be registered in geometry_columns manually, - since AddGeometryColumn also adds a spatial column which is not needed when you already have a spatial column. Refer to . + Changed: 2.0.0 This function no longer updates geometry_columns since geometry_columns is a view that reads from system catalogs. It by default + also does not create constraints, but instead uses the built in type modifier behavior of PostgreSQL. So for example building a wgs84 POINT column with this function is now + equivalent to: ALTER TABLE some_table ADD COLUMN geom geometry(Point,4326); + Changed: 2.0.0 If you require the old behavior of constraints use the default use_typmod, but set it to false. + + + + Changed: 2.0.0 Views can no longer be manually registered in geometry_columns, however views built against geometry typmod tables geometries and used without wrapper functions will register themselves correctly + because they inherit the typmod behavior of their parent table column. + Views that use geometry functions that output other geometries will need to be cast to typmod geometries for these view geometry columns to be registered correctly + in geometry_columns. Refer to . &sfs_compliant; &Z_support; &curve_support; + Enhanced: 2.0.0 use_typmod argument introduced. Defaults to creating typmod geometry column instead of constraint-based. Examples - + -- Create schema to hold data +CREATE SCHEMA my_schema; -- Create a new simple PostgreSQL table -postgis=# CREATE TABLE my_schema.my_spatial_table (id serial); +CREATE TABLE my_schema.my_spatial_table (id serial); -- Describing the table shows a simple table with a single "id" column. postgis=# \d my_schema.my_spatial_table @@ -118,34 +136,53 @@ id | integer | not null default nextval('my_schema.my_spatial_table_id_seq'::regclass) -- Add a spatial column to the table -postgis=# SELECT AddGeometryColumn ('my_schema','my_spatial_table','the_geom',4326,'POINT',2); +SELECT AddGeometryColumn ('my_schema','my_spatial_table','geom',4326,'POINT',2); ---Add a curvepolygon -SELECT AddGeometryColumn ('my_schema','my_spatial_table','the_geomcp',4326,'CURVEPOLYGON',2); +-- Add a point using the old constraint based behavior +SELECT AddGeometryColumn ('my_schema','my_spatial_table','geom_c',4326,'POINT',2, false); --- Describe the table again reveals the addition of a new "the_geom" column. -postgis=# \d my_schema.my_spatial_table - Column | Type | Modifiers +--Add a curvepolygon using old constraint behavior +SELECT AddGeometryColumn ('my_schema','my_spatial_table','geomcp_c',4326,'CURVEPOLYGON',2, false); -------------+----------+------------------------------------------------------------------------- - id | integer | not null default nextval('my_schema.my_spatial_table_id_seq'::regclass) - the_geom | geometry | - the_geomcp | geometry | +-- Describe the table again reveals the addition of a new geometry columns. +\d my_schema.my_spatial_table + addgeometrycolumn +------------------------------------------------------------------------- + my_schema.my_spatial_table.geomcp_c SRID:4326 TYPE:CURVEPOLYGON DIMS:2 +(1 row) + + Table "my_schema.my_spatial_table" + Column | Type | Modifiers +----------+----------------------+------------------------------------------------------------------------- + id | integer | not null default nextval('my_schema.my_spatial_table_id_seq'::regclass) + geom | geometry(Point,4326) | + geom_c | geometry | + geomcp_c | geometry | Check constraints: - "enforce_dims_the_geom" CHECK (ndims(the_geom) = 2) - "enforce_dims_the_geomcp" CHECK (ndims(the_geomcp) = 2) - "enforce_geotype_the_geom" CHECK (geometrytype(the_geom) = 'POINT'::text OR -the_geom IS NULL) - "enforce_geotype_the_geomcp" CHECK (geometrytype(the_geomcp) = 'CURVEPOLYGON -'::text OR the_geomcp IS NULL) - "enforce_srid_the_geom" CHECK (srid(the_geom) = 4326) - "enforce_srid_the_geomcp" CHECK (srid(the_geomcp) = 4326) + "enforce_dims_geom_c" CHECK (st_ndims(geom_c) = 2) + "enforce_dims_geomcp_c" CHECK (st_ndims(geomcp_c) = 2) + "enforce_geotype_geom_c" CHECK (geometrytype(geom_c) = 'POINT'::text OR geom_c IS NULL) + "enforce_geotype_geomcp_c" CHECK (geometrytype(geomcp_c) = 'CURVEPOLYGON'::text OR geomcp_c IS NULL) + "enforce_srid_geom_c" CHECK (st_srid(geom_c) = 4326) + "enforce_srid_geomcp_c" CHECK (st_srid(geomcp_c) = 4326) + +-- geometry_columns view also registers the new columns -- +SELECT f_geometry_column As col_name, type, srid, coord_dimension As ndims + FROM geometry_columns + WHERE f_table_name = 'my_spatial_table' AND f_table_schema = 'my_schema'; + + col_name | type | srid | ndims +----------+--------------+------+------- + geom | Point | 4326 | 2 + geom_c | Point | 4326 | 2 + geomcp_c | CurvePolygon | 4326 | 2 + See Also - , , + , , , @@ -210,20 +247,30 @@ &sfs_compliant; &Z_support; &curve_support; + + Changed: 2.0.0 This function is provided for backward compatibility. Now that since geometry_columns is now a view against the system catalogs, + you can drop a geometry column like any other table column using ALTER TABLE + Examples - SELECT DropGeometryColumn ('my_schema','my_spatial_table','the_geomcp'); + SELECT DropGeometryColumn ('my_schema','my_spatial_table','geom'); ----RESULT output --- - my_schema.my_spatial_table.the_geomcp effectively removed. + dropgeometrycolumn +------------------------------------------------------ + my_schema.my_spatial_table.geom effectively removed. + +-- In PostGIS 2.0+ the above is also equivalent to the standard +-- the standard alter table. Both will deregister from geometry_columns +ALTER TABLE my_schema.my_spatial_table DROP column geom; See Also - , + , , @@ -272,21 +319,28 @@ Drops a table and all its references in geometry_columns. Note: uses current_schema() on schema-aware pgsql installations if schema is not provided. + + + Changed: 2.0.0 This function is provided for backward compatibility. Now that since geometry_columns is now a view against the system catalogs, + you can drop a table with geometry columns like any other table using DROP TABLE + Examples - - SELECT DropGeometryTable ('my_schema','my_spatial_table'); - ----RESULT output --- - my_schema.my_spatial_table dropped. + SELECT DropGeometryTable ('my_schema','my_spatial_table'); +----RESULT output --- +my_schema.my_spatial_table dropped. + +-- The above is now equivalent to -- +DROP TABLE my_schema.my_spatial_table; See Also - , + , , @@ -313,7 +367,8 @@ Description Reports full postgis version and build configuration - infos. + infos. Also informs about synchronization between + libraries and scripts suggesting upgrades as needed. @@ -329,11 +384,14 @@ See Also - , , , , + + , + , + , + , + , + + @@ -702,48 +760,6 @@ - - - PostGIS_Uses_Stats - - Returns TRUE if STATS usage has been - enabled. - - - - - - text PostGIS_Uses_Stats - - - - - - - - Description - - Returns TRUE if STATS usage has been enabled, - FALSE otherwise. - - - - Examples - - SELECT PostGIS_Uses_Stats(); - postgis_uses_stats --------------------- - t -(1 row) - - - - See Also - - - - - PostGIS_Version @@ -782,7 +798,7 @@ See Also , ,, , , @@ -793,8 +809,9 @@ Populate_Geometry_Columns - Ensures geometry columns have appropriate spatial constraints - and exist in the geometry_columns table. + Ensures geometry columns are defined with type modifiers or have appropriate spatial constraints + This ensures they will be registered correctly in geometry_columns view. By default will convert all geometry + columns with no type modifier to ones with type modifiers. To get old behavior set use_typmod=false @@ -802,13 +819,14 @@ text Populate_Geometry_Columns - + boolean use_typmod=true int Populate_Geometry_Columns oid relation_oid + boolean use_typmod=true @@ -816,8 +834,11 @@ Description - Ensures geometry columns have appropriate spatial constraints and - exist in the geometry_columns table. In particular, + Ensures geometry columns have appropriate type modifiers or spatial constraints to ensure they are registered correctly in geometry_columns table. + + For backwards compatibility and for spatial needs such as tble inheritance where each child table may have different geometry type, the old check constraint behavior is still supported. + If you need the old behavior, you need to pass in the new optional argument as false use_typmod=false. When this is done geometry columns will be created with no type modifiers + but will have 3 constraints defined. In particular, this means that every geometry column belonging to a table has at least three constraints: @@ -843,7 +864,7 @@ If a table oid is provided, this function tries to determine the srid, dimension, and geometry type of all - geometry columns in the table, adding contraints as necessary. If + geometry columns in the table, adding constraints as necessary. If successful, an appropriate row is inserted into the geometry_columns table, otherwise, the exception is caught and an error notice is raised describing the problem. @@ -852,76 +873,76 @@ table oid, this function tries to determine the srid, dimension, and type of all the geometries in the view, inserting appropriate entries into the geometry_columns table, but nothing is done - to enforce contraints. + to enforce constraints. The parameterless variant is a simple wrapper for the parameterized variant that first truncates and repopulates the geometry_columns table for every spatial table and view in the database, adding spatial - contraints to tables where appropriate. It returns a summary of the + constraints to tables where appropriate. It returns a summary of the number of geometry columns detected in the database and the number that were inserted into the geometry_columns table. The parameterized version simply returns the number of rows inserted into the geometry_columns table. Availability: 1.4.0 + Changed: 2.0.0 By default, now uses type modifiers instead of check constraints to constrain geometry types. You can still use check + constraint behavior instead by using the new use_typmod and setting it to false. + Enhanced: 2.0.0 use_typmod optional argument was introduced that allows controlling if columns are created with typmodifiers or with check constraints. Examples - SELECT Populate_Geometry_Columns('public.myspatial_table'::regclass); + +CREATE TABLE public.myspatial_table(gid serial, geom geometry); +INSERT INTO myspatial_table(geom) VALUES(ST_GeomFromText('LINESTRING(1 2, 3 4)',4326) ); +-- This will now use typ modifiers. For this to work, there must exist data +SELECT Populate_Geometry_Columns('public.myspatial_table'::regclass); + +populate_geometry_columns +-------------------------- + 1 + + +\d myspatial_table + + Table "public.myspatial_table" + Column | Type | Modifiers +--------+---------------------------+--------------------------------------------------------------- + gid | integer | not null default nextval('myspatial_table_gid_seq'::regclass) + geom | geometry(LineString,4326) | + + + -- This will change the geometry columns to use constraints if they are not typmod or have constraints already. +--For this to work, there must exist data +CREATE TABLE public.myspatial_table_cs(gid serial, geom geometry); +INSERT INTO myspatial_table_cs(geom) VALUES(ST_GeomFromText('LINESTRING(1 2, 3 4)',4326) ); +SELECT Populate_Geometry_Columns('public.myspatial_table_cs'::regclass, false); +populate_geometry_columns +-------------------------- + 1 +\d myspatial_table_cs + + Table "public.myspatial_table_cs" + Column | Type | Modifiers +--------+----------+------------------------------------------------------------------ + gid | integer | not null default nextval('myspatial_table_cs_gid_seq'::regclass) + geom | geometry | +Check constraints: + "enforce_dims_geom" CHECK (st_ndims(geom) = 2) + "enforce_geotype_geom" CHECK (geometrytype(geom) = 'LINESTRING'::text OR geom IS NULL) + "enforce_srid_geom" CHECK (st_srid(geom) = 4326) + - - - Probe_Geometry_Columns - - Scans all tables with PostGIS geometry constraints and adds them to the geometry_columns - table if they are not there. - - - - - - text Probe_Geometry_Columns - - - - - - - Description - - Scans all tables with PostGIS geometry constraints and adds them to the geometry_columns - table if they are not there. Also give stats on number of inserts and already present or possibly obsolete. - This will usually only pick up records added by AddGeometryColumn() function. It will not scan views so views - will need to be manually added to geometry_columns table. - - - - Examples - - SELECT Probe_Geometry_Columns(); - probe_geometry_columns ---------------------------------------- -probed:6 inserted:0 conflicts:6 stale:0 -(1 row) - - - - See Also - - - - UpdateGeometrySRID diff -Nru postgis-1.5.3/doc/reference_measure.xml postgis-2.0.1/doc/reference_measure.xml --- postgis-1.5.3/doc/reference_measure.xml 2010-12-21 22:19:03.000000000 +0000 +++ postgis-2.0.1/doc/reference_measure.xml 2012-04-24 19:12:12.000000000 +0000 @@ -1,6 +1,631 @@ Spatial Relationships and Measurements + + + ST_3DClosestPoint + + Returns the 3-dimensional point on g1 that is closest to g2. This is the first point of + the 3D shortest line. + + + + + + geometry ST_3DClosestPoint + + geometry + g1 + + geometry + g2 + + + + + + Description + + Returns the 3-dimensional point on g1 that is closest to g2. This is the first point of + the 3D shortest line. The 3D length of the 3D shortest line is the 3D distance. + + &Z_support; + + &P_support; + Availability: 2.0.0 + + + + Examples + + + + + linestring and point -- both 3d and 2d closest point + +SELECT ST_AsEWKT(ST_3DClosestPoint(line,pt)) AS cp3d_line_pt, + ST_AsEWKT(ST_ClosestPoint(line,pt)) As cp2d_line_pt + FROM (SELECT 'POINT(100 100 30)'::geometry As pt, + 'LINESTRING (20 80 20, 98 190 1, 110 180 3, 50 75 1000)'::geometry As line + ) As foo; + + + cp3d_line_pt | cp2d_line_pt +-----------------------------------------------------------+------------------------------------------ + POINT(54.6993798867619 128.935022917228 11.5475869506606) | POINT(73.0769230769231 115.384615384615) + + + + + linestring and multipoint -- both 3d and 2d closest point + SELECT ST_AsEWKT(ST_3DClosestPoint(line,pt)) AS cp3d_line_pt, + ST_AsEWKT(ST_ClosestPoint(line,pt)) As cp2d_line_pt + FROM (SELECT 'MULTIPOINT(100 100 30, 50 74 1000)'::geometry As pt, + 'LINESTRING (20 80 20, 98 190 1, 110 180 3, 50 75 900)'::geometry As line + ) As foo; + + + cp3d_line_pt | cp2d_line_pt +-----------------------------------------------------------+-------------- + POINT(54.6993798867619 128.935022917228 11.5475869506606) | POINT(50 75) + + + + + Multilinestring and polygon both 3d and 2d closest point + SELECT ST_AsEWKT(ST_3DClosestPoint(poly, mline)) As cp3d, + ST_AsEWKT(ST_ClosestPoint(poly, mline)) As cp2d + FROM (SELECT ST_GeomFromEWKT('POLYGON((175 150 5, 20 40 5, 35 45 5, 50 60 5, 100 100 5, 175 150 5))') As poly, + ST_GeomFromEWKT('MULTILINESTRING((175 155 2, 20 40 20, 50 60 -2, 125 100 1, 175 155 1), + (1 10 2, 5 20 1))') As mline ) As foo; + cp3d | cp2d +-------------------------------------------+-------------- + POINT(39.993580415989 54.1889925532825 5) | POINT(20 40) + + + + + + + + + + + See Also + + , , , + + + + + ST_3DDistance + + For geometry type Returns the 3-dimensional cartesian minimum distance (based on spatial ref) between two geometries in + projected units. + + + + + float ST_3DDistance + + geometry + g1 + + geometry + g2 + + + + + + Description + + For geometry type returns the 3-dimensional minimum cartesian distance between two geometries in + projected units (spatial ref units). + + &Z_support; + + &P_support; + &sqlmm_compliant; SQL-MM ? + + Availability: 2.0.0 + + + + Examples + + +-- Geometry example - units in meters (SRID: 2163 US National Atlas Equal area) (3D point and line compared 2D point and line) +-- Note: currently no vertical datum support so Z is not transformed and assumed to be same units as final. +SELECT ST_3DDistance( + ST_Transform(ST_GeomFromEWKT('SRID=4326;POINT(-72.1235 42.3521 4)'),2163), + ST_Transform(ST_GeomFromEWKT('SRID=4326;LINESTRING(-72.1260 42.45 15, -72.123 42.1546 20)'),2163) + ) As dist_3d, + ST_Distance( + ST_Transform(ST_GeomFromText('POINT(-72.1235 42.3521)',4326),2163), + ST_Transform(ST_GeomFromText('LINESTRING(-72.1260 42.45, -72.123 42.1546)', 4326),2163) + ) As dist_2d; + + dist_3d | dist_2d +------------------+----------------- + 127.295059324629 | 126.66425605671 + + +-- Multilinestring and polygon both 3d and 2d distance +-- Same example as 3D closest point example +SELECT ST_3DDistance(poly, mline) As dist3d, + ST_Distance(poly, mline) As dist2d + FROM (SELECT ST_GeomFromEWKT('POLYGON((175 150 5, 20 40 5, 35 45 5, 50 60 5, 100 100 5, 175 150 5))') As poly, + ST_GeomFromEWKT('MULTILINESTRING((175 155 2, 20 40 20, 50 60 -2, 125 100 1, 175 155 1), + (1 10 2, 5 20 1))') As mline ) As foo; + dist3d | dist2d +-------------------+-------- + 0.716635696066337 | 0 + + + + + See Also + + , , , , , + + + + + + ST_3DDWithin + + For 3d (z) geometry type Returns true if two geometries 3d distance is within number of units. + + + + + boolean ST_3DDWithin + + geometry + g1 + + geometry + g2 + + double precision + distance_of_srid + + + + + + Description + + For geometry type returns true if the 3d distance between two objects is within distance_of_srid specified + projected units (spatial ref units). + + &Z_support; + + &P_support; + &sqlmm_compliant; SQL-MM ? + + Availability: 2.0.0 + + + + Examples + + +-- Geometry example - units in meters (SRID: 2163 US National Atlas Equal area) (3D point and line compared 2D point and line) +-- Note: currently no vertical datum support so Z is not transformed and assumed to be same units as final. +SELECT ST_3DDWithin( + ST_Transform(ST_GeomFromEWKT('SRID=4326;POINT(-72.1235 42.3521 4)'),2163), + ST_Transform(ST_GeomFromEWKT('SRID=4326;LINESTRING(-72.1260 42.45 15, -72.123 42.1546 20)'),2163), + 126.8 + ) As within_dist_3d, +ST_DWithin( + ST_Transform(ST_GeomFromEWKT('SRID=4326;POINT(-72.1235 42.3521 4)'),2163), + ST_Transform(ST_GeomFromEWKT('SRID=4326;LINESTRING(-72.1260 42.45 15, -72.123 42.1546 20)'),2163), + 126.8 + ) As within_dist_2d; + + within_dist_3d | within_dist_2d +----------------+---------------- + f | t + + + + + See Also + + , , , , + + + + + + ST_3DDFullyWithin + + Returns true if all of the 3D geometries are within the specified + distance of one another. + + + + + + boolean ST_3DDFullyWithin + + geometry + g1 + + geometry + g2 + + double precision + distance + + + + + + Description + + Returns true if the 3D geometries are fully within the specified distance + of one another. The distance is specified in units defined by the + spatial reference system of the geometries. For this function to make + sense, the source geometries must both be of the same coordinate projection, + having the same SRID. + + + This function call will automatically include a bounding box + comparison that will make use of any indexes that are available on + the geometries. + + + Availability: 2.0.0 + &Z_support; + + &P_support; + + + + + Examples + + -- This compares the difference between fully within and distance within as well + -- as the distance fully within for the 2D footprint of the line/point vs. the 3d fully within + SELECT ST_3DDFullyWithin(geom_a, geom_b, 10) as D3DFullyWithin10, ST_3DDWithin(geom_a, geom_b, 10) as D3DWithin10, + ST_DFullyWithin(geom_a, geom_b, 20) as D2DFullyWithin20, + ST_3DDFullyWithin(geom_a, geom_b, 20) as D3DFullyWithin20 from + (select ST_GeomFromEWKT('POINT(1 1 2)') as geom_a, + ST_GeomFromEWKT('LINESTRING(1 5 2, 2 7 20, 1 9 100, 14 12 3)') as geom_b) t1; + d3dfullywithin10 | d3dwithin10 | d2dfullywithin20 | d3dfullywithin20 +------------------+-------------+------------------+------------------ + f | t | t | f + + + + See Also + + , , , + + + + + + ST_3DIntersects + + Returns TRUE if the Geometries "spatially + intersect" in 3d - only for points and linestrings + + + + + + boolean ST_3DIntersects + + geometry + geomA + + + geometry + geomB + + + + + + Description + Overlaps, Touches, Within all imply spatial intersection. If any of the aforementioned + returns true, then the geometries also spatially intersect. + Disjoint implies false for spatial intersection. + + + + Availability: 2.0.0 + + This function call will automatically include a bounding box + comparison that will make use of any indexes that are available on the + geometries. + + &Z_support; + + &P_support; + &sqlmm_compliant; SQL-MM 3: ? + + + Geometry Examples +SELECT ST_3DIntersects(pt, line), ST_Intersects(pt,line) + FROM (SELECT 'POINT(0 0 2)'::geometry As pt, + 'LINESTRING (0 0 1, 0 2 3 )'::geometry As line) As foo; + st_3dintersects | st_intersects +-----------------+--------------- + f | t +(1 row) + + + + See Also + + + + + + + ST_3DLongestLine + + Returns the 3-dimensional longest line between two geometries + + + + + + geometry ST_3DLongestLine + + geometry + g1 + + geometry + g2 + + + + + + Description + + Returns the 3-dimensional longest line between two geometries. The function will + only return the first longest line if more than one. + The line returned will always start in g1 and end in g2. + The 3D length of the line this function returns will always be the same as returns for g1 and g2. + + + Availability: 2.0.0 + &Z_support; + + &P_support; + + + + Examples + + + + + linestring and point -- both 3d and 2d longest line + +SELECT ST_AsEWKT(ST_3DLongestLine(line,pt)) AS lol3d_line_pt, + ST_AsEWKT(ST_LongestLine(line,pt)) As lol2d_line_pt + FROM (SELECT 'POINT(100 100 30)'::geometry As pt, + 'LINESTRING (20 80 20, 98 190 1, 110 180 3, 50 75 1000)'::geometry As line + ) As foo; + + + lol3d_line_pt | lol2d_line_pt +-----------------------------------+---------------------------- + LINESTRING(50 75 1000,100 100 30) | LINESTRING(98 190,100 100) + + + + + linestring and multipoint -- both 3d and 2d longest line + SELECT ST_AsEWKT(ST_3DLongestLine(line,pt)) AS lol3d_line_pt, + ST_AsEWKT(ST_LongestLine(line,pt)) As lol2d_line_pt + FROM (SELECT 'MULTIPOINT(100 100 30, 50 74 1000)'::geometry As pt, + 'LINESTRING (20 80 20, 98 190 1, 110 180 3, 50 75 900)'::geometry As line + ) As foo; + + + lol3d_line_pt | lol2d_line_pt +---------------------------------+-------------------------- + LINESTRING(98 190 1,50 74 1000) | LINESTRING(98 190,50 74) + + + + + Multilinestring and polygon both 3d and 2d longest line + SELECT ST_AsEWKT(ST_3DLongestLine(poly, mline)) As lol3d, + ST_AsEWKT(ST_LongestLine(poly, mline)) As lol2d + FROM (SELECT ST_GeomFromEWKT('POLYGON((175 150 5, 20 40 5, 35 45 5, 50 60 5, 100 100 5, 175 150 5))') As poly, + ST_GeomFromEWKT('MULTILINESTRING((175 155 2, 20 40 20, 50 60 -2, 125 100 1, 175 155 1), + (1 10 2, 5 20 1))') As mline ) As foo; + lol3d | lol2d +------------------------------+-------------------------- + LINESTRING(175 150 5,1 10 2) | LINESTRING(175 150,1 10) + + + + + + + + + + + See Also + + , , , , + + + + + + ST_3DMaxDistance + + For geometry type Returns the 3-dimensional cartesian maximum distance (based on spatial ref) between two geometries in + projected units. + + + + + float ST_3DMaxDistance + + geometry + g1 + + geometry + g2 + + + + + + Description + + For geometry type returns the 3-dimensional maximum cartesian distance between two geometries in + projected units (spatial ref units). + + &Z_support; + + &P_support; + + Availability: 2.0.0 + + + + Examples + + +-- Geometry example - units in meters (SRID: 2163 US National Atlas Equal area) (3D point and line compared 2D point and line) +-- Note: currently no vertical datum support so Z is not transformed and assumed to be same units as final. +SELECT ST_3DMaxDistance( + ST_Transform(ST_GeomFromEWKT('SRID=4326;POINT(-72.1235 42.3521 10000)'),2163), + ST_Transform(ST_GeomFromEWKT('SRID=4326;LINESTRING(-72.1260 42.45 15, -72.123 42.1546 20)'),2163) + ) As dist_3d, + ST_MaxDistance( + ST_Transform(ST_GeomFromEWKT('SRID=4326;POINT(-72.1235 42.3521 10000)'),2163), + ST_Transform(ST_GeomFromEWKT('SRID=4326;LINESTRING(-72.1260 42.45 15, -72.123 42.1546 20)'),2163) + ) As dist_2d; + + dist_3d | dist_2d +------------------+------------------ + 24383.7467488441 | 22247.8472107251 + + + + + See Also + + , , , + + + + + ST_3DShortestLine + + Returns the 3-dimensional shortest line between two geometries + + + + + + geometry ST_3DShortestLine + + geometry + g1 + + geometry + g2 + + + + + + Description + + Returns the 3-dimensional shortest line between two geometries. The function will + only return the first shortest line if more than one, that the function finds. + If g1 and g2 intersects in just one point the function will return a line with both start + and end in that intersection-point. + If g1 and g2 are intersecting with more than one point the function will return a line with start + and end in the same point but it can be any of the intersecting points. + The line returned will always start in g1 and end in g2. + The 3D length of the line this function returns will always be the same as returns for g1 and g2. + + + Availability: 2.0.0 + &Z_support; + + &P_support; + + + + Examples + + + + + linestring and point -- both 3d and 2d shortest line + +SELECT ST_AsEWKT(ST_3DShortestLine(line,pt)) AS shl3d_line_pt, + ST_AsEWKT(ST_ShortestLine(line,pt)) As shl2d_line_pt + FROM (SELECT 'POINT(100 100 30)'::geometry As pt, + 'LINESTRING (20 80 20, 98 190 1, 110 180 3, 50 75 1000)'::geometry As line + ) As foo; + + + shl3d_line_pt | shl2d_line_pt +----------------------------------------------------------------------------+------------------------------------------------------ + LINESTRING(54.6993798867619 128.935022917228 11.5475869506606,100 100 30) | LINESTRING(73.0769230769231 115.384615384615,100 100) + + + + + linestring and multipoint -- both 3d and 2d shortest line + SELECT ST_AsEWKT(ST_3DShortestLine(line,pt)) AS shl3d_line_pt, + ST_AsEWKT(ST_ShortestLine(line,pt)) As shl2d_line_pt + FROM (SELECT 'MULTIPOINT(100 100 30, 50 74 1000)'::geometry As pt, + 'LINESTRING (20 80 20, 98 190 1, 110 180 3, 50 75 900)'::geometry As line + ) As foo; + + + shl3d_line_pt | shl2d_line_pt +---------------------------------------------------------------------------+------------------------ + LINESTRING(54.6993798867619 128.935022917228 11.5475869506606,100 100 30) | LINESTRING(50 75,50 74) + + + + + Multilinestring and polygon both 3d and 2d shortest line + SELECT ST_AsEWKT(ST_3DShortestLine(poly, mline)) As shl3d, + ST_AsEWKT(ST_ShortestLine(poly, mline)) As shl2d + FROM (SELECT ST_GeomFromEWKT('POLYGON((175 150 5, 20 40 5, 35 45 5, 50 60 5, 100 100 5, 175 150 5))') As poly, + ST_GeomFromEWKT('MULTILINESTRING((175 155 2, 20 40 20, 50 60 -2, 125 100 1, 175 155 1), + (1 10 2, 5 20 1))') As mline ) As foo; + shl3d | shl2d +---------------------------------------------------------------------------------------------------+------------------------ + LINESTRING(39.993580415989 54.1889925532825 5,40.4078575708294 53.6052383805529 5.03423778139177) | LINESTRING(20 40,20 40) + + + + + + + + + + + See Also + + , , , , + + ST_Area @@ -17,13 +642,8 @@ float ST_Area - geography g1 - - - - float ST_Area - geography g1 - boolean use_spheroid + geography geog + boolean use_spheroid=true @@ -35,8 +655,12 @@ ST_MultiSurface value. For geometry Area is in the units of the srid. For geography area is in square meters and defaults to measuring about the spheroid of the geography (currently only WGS84). To measure around the faster but less accurate sphere -- ST_Area(geog,false). + Enhanced: 2.0.0 - support for 2D polyhedral surfaces was introduced. &sfs_compliant; &sqlmm_compliant; SQL-MM 3: 8.1.2, 9.5.3 + &P_support; + For polyhedral surfaces, only supports 2D polyhedral surfaces (not 2.5D). For 2.5D, may give a non-zero answer, but only for the faces that + sit completely in XY plane. @@ -88,21 +712,19 @@ --if your data is in geography already SELECT ST_Area(the_geog)/POWER(0.3048,2) As sqft, ST_Area(the_geog) As sqm - FROM somegeogtable; - + FROM somegeogtable; See Also - , , , + , , , - ST_Azimuth - Returns the angle in radians from the horizontal of the vector defined by pointA and pointB + Returns the angle in radians from the horizontal of the vector defined by pointA and pointB. Angle is computed clockwise from down-to-up: on the clock: 12=0; 3=PI/2; 6=PI; 9=3PI/2. @@ -111,6 +733,11 @@ geometry pointA geometry pointB + + float ST_Azimuth + geography pointA + geography pointB + @@ -118,31 +745,65 @@ Returns the azimuth of the segment defined by the given Point geometries, or NULL if the two points are coincident. Return - value is in radians. + value is in radians. Angle is computed clockwise from down-to-up: on the clock: 12=0; 3=PI/2; 6=PI; 9=3PI/2 The Azimuth is mathematical concept defined as the angle, in this case measured in radian, between a reference plane - and a point + and a point. Availability: 1.1.0 + Enhanced: 2.0.0 support for geography was introduced. Azimuth is especially useful in conjunction with ST_Translate for shifting an object along its perpendicular axis. See - upgis_lineshift Plpgsqlfunctions PostGIS wiki section for example of this. + upgis_lineshift Plpgsqlfunctions PostGIS wiki section for example of this. Examples - --Azimuth in degrees + Geometry Azimuth in degrees -SELECT ST_Azimuth(ST_MakePoint(1,2), ST_MakePoint(3,4))/(2*pi())*360 as degAz, - ST_Azimuth(ST_MakePoint(3,4), ST_MakePoint(1,2))/(2*pi())*360 As degAzrev +SELECT ST_Azimuth(ST_Point(25,45), ST_Point(75,100))/(2*pi())*360 as degAz, + ST_Azimuth(ST_Point(75,100), ST_Point(25,45))/(2*pi())*360 As degAzrev; + +-- NOTE easier to remember syntax using PostgreSQL built-in degrees function -- +-- Both yield same answer -- +SELECT degrees( ST_Azimuth(ST_Point(25,45), ST_Point(75,100)) ) as degAz, + degrees( ST_Azimuth(ST_Point(75,100), ST_Point(25,45)) ) As degAzrev; -degaz degazrev ------- --------- -45 225 + degaz | degazrev +------------------+------------------ + 42.2736890060937 | 222.273689006094 + + + + + + + + + + + + + + + + + + + + + + + + + + See Also - , + , @@ -539,7 +1200,7 @@ See Also - , , ,, , + , , , , , @@ -638,7 +1299,7 @@ See Also - , , , ,, ,, + , , , , , , , @@ -647,7 +1308,7 @@ ST_CoversReturns 1 (TRUE) if no point in Geometry B is outside - Geometry A. For geography: if geography point B is not outside Polygon Geography A + Geometry A @@ -1362,7 +2023,7 @@ See Also - , , , , + , , , , , @@ -1507,7 +2168,7 @@ Returns minimum distance in meters between two lon/lat geometries. Uses a spherical earth and radius of 6370986 meters. - Faster than ST_Distance_Spheroid, but less + Faster than ST_Distance_Spheroid , but less accurate. PostGIS versions prior to 1.5 only implemented for points. @@ -1562,7 +2223,7 @@ - + ST_Distance_Spheroid @@ -1742,7 +2403,7 @@ of one another. For Geometries: The distance is specified in units defined by the spatial reference system of the geometries. For this function to make - sense, the source geometries must both be of the same coorindate projection, + sense, the source geometries must both be of the same coordinate projection, having the same SRID. For geography units are in meters and measurement is @@ -1760,6 +2421,8 @@ From 1.3.4, ST_DWithin uses a more short-circuit distance function which should make it more efficient than prior versions for larger buffer regions. + + Use ST_3DDWithin if you have 3D geometries. &sfs_compliant; Availability: 1.5.0 support for geography was introduced @@ -1900,7 +2563,7 @@ See Also - , + , @@ -1909,7 +2572,7 @@ ST_Intersects Returns TRUE if the Geometries/Geography "spatially - intersect" - (share any portion of space) and FALSE if they don't (they are Disjoint). + intersect in 2D" - (share any portion of space) and FALSE if they don't (they are Disjoint). For geography -- tolerance is 0.00001 meters (so any points that close are considered to intersect) @@ -1998,7 +2661,7 @@ See Also - + , @@ -2015,12 +2678,8 @@ float ST_Length - geography gg - - - float ST_Length - geography gg - boolean use_spheroid + geography geog + boolean use_spheroid=true @@ -2032,8 +2691,8 @@ spatial reference system of the geometry. Geography: Units are in meters and also acts as a Perimeter function for areal geogs.Currently for geometry this is an alias for ST_Length2D, but this may change to support higher dimensions. - Currently applying this to a MULTI/POLYGON of type geography will give you the perimeter of the POLYGON/MULTIPOLYGON. This is not the - case with the geometry implementation. + Changed: 2.0.0 Breaking change -- in prior versions applying this to a MULTI/POLYGON of type geography would give you the perimeter of the POLYGON/MULTIPOLYGON. In 2.0.0 + this was changed to return 0 to be in line with geometry behavior. Please use ST_Perimeter if you want the perimeter of a polygonFor geography measurement defaults spheroid measurement. To use the faster less accurate sphere use ST_Length(gg,false);&sfs_compliant; s2.1.5.1&sqlmm_compliant; SQL-MM 3: 7.1.2, 9.3.4 @@ -2114,13 +2773,13 @@ See Also - , + , - + - ST_Length3D + ST_3DLength Returns the 3-dimensional or 2-dimensional length of the geometry if it is a linestring or multi-linestring. @@ -2129,7 +2788,7 @@ - float ST_Length3D + float ST_3DLength geometry a_3dlinestring @@ -2140,8 +2799,8 @@ Returns the 3-dimensional or 2-dimensional length of the geometry if it is a linestring or multi-linestring. For 2-d lines it will just return the 2-d length (same as ST_Length and ST_Length2D) - &Z_support; + Changed: 2.0.0 In prior versions this used to be called ST_Length3D @@ -2151,9 +2810,9 @@ Return length in feet for a 3D cable. Note this is in feet because 2249 is Mass State Plane Feet -SELECT ST_Length3D(ST_GeomFromText('LINESTRING(743238 2967416 1,743238 2967450 1,743265 2967450 3, +SELECT ST_3DLength(ST_GeomFromText('LINESTRING(743238 2967416 1,743238 2967450 1,743265 2967450 3, 743265.625 2967416 3,743238 2967416 3)',2249)); -st_length3d +ST_3DLength ----------- 122.704716741457 @@ -2242,7 +2901,7 @@ See Also - , , + , , @@ -2280,7 +2939,7 @@ SPHEROID["GRS_1980",6378137,298.257222101] Will return 0 for anything that is not a MULTILINESTRING or LINESTRING - This is much like and except it will throw away the Z coordinate in calculations. + This is much like and except it will throw away the Z coordinate in calculations. @@ -2321,13 +2980,13 @@ See Also - , , + , , - + - ST_Length3D_Spheroid + ST_3DLength_Spheroid Calculates the length of a geometry on an ellipsoid, taking the elevation into account. This is just an alias for ST_Length_Spheroid. @@ -2336,7 +2995,7 @@ - float ST_Length3D_Spheroid + float ST_3DLength_Spheroid geometry a_linestring spheroid a_spheroid @@ -2350,10 +3009,10 @@ taking the elevation into account. This is just an alias for ST_Length_Spheroid. - Will return 0 for anything that is not a MULTILINESTRING or LINESTRING - This functionis just an alias for ST_Length_Spheroid. - + Changed: 2.0.0 In prior versions this used to return 0 for anything that is not a MULTILINESTRING or LINESTRING and in 2.0.0 on returns the perimeter of if given a polgon. + This function is just an alias for ST_Length_Spheroid. &Z_support; + Changed: 2.0.0 In prior versions this used to be called ST_Length3d_Spheroid @@ -2521,7 +3180,7 @@ Description - ST_OrderingEquals compares two geometries and t (TRUE) if the + ST_OrderingEquals compares two geometries and returns t (TRUE) if the geometries are equal and the coordinates are in the same order; otherwise it returns f (FALSE). @@ -2605,7 +3264,41 @@ Examples + The following illustrations all return TRUE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + --a point on a line is contained by the line and is of a lower dimension, and therefore does not overlap the line nor crosses @@ -2631,7 +3324,7 @@ -------------+-------------+----------------+-------------- f | t | t | f - -- a 2-dimensional bent hot dog (aka puffered line string) that intersects a circle, + -- a 2-dimensional bent hot dog (aka buffered line string) that intersects a circle, -- but is not fully contained by the circle is defined as overlapping since they are of the same dimension, -- but it does not cross, because the intersection of the 2 is of the same dimension -- as the maximum dimension of the 2 @@ -2647,6 +3340,8 @@ -------------+-------------+----------------+--------------+-------+-------+--------------------- t | f | t | f | 2 | 2 | 2 + + @@ -2660,7 +3355,7 @@ ST_Perimeter Return the length measurement of the boundary of an ST_Surface - or ST_MultiSurface value. (Polygon, Multipolygon) + or ST_MultiSurface geometry or geography. (Polygon, Multipolygon). geometry measurement is in units of spatial reference and geography is in meters. @@ -2669,22 +3364,31 @@ geometry g1 + + + float ST_Perimeter + geography geog + boolean use_spheroid=true + + Description - Returns the 2D perimeter of the geometry if it is a ST_Surface, ST_MultiSurface (Polygon, Multipolygon). 0 is returned for - non-areal geometries. For linestrings use ST_Length. Measurements are in the units of the - spatial reference system of the geometry. + Returns the 2D perimeter of the geometry/geography if it is a ST_Surface, ST_MultiSurface (Polygon, Multipolygon). 0 is returned for + non-areal geometries. For linestrings use ST_Length. Measurements for geometry are in the units of the + spatial reference system of the geometry. Measurements for geography are in meters. If use_spheroid is set to false, then will + model earth as a sphere instead of a spheroid. Currently this is an alias for ST_Perimeter2D, but this may change to support higher dimensions. &sfs_compliant; s2.1.5.1 &sqlmm_compliant; SQL-MM 3: 8.1.3, 9.5.4 + Availability 2.0.0: Support for geography was introduced - - Examples + + Examples: Geometry Return perimeter in feet for polygon and multipolygon. Note this is in feet because 2249 is Mass State Plane Feet @@ -2712,9 +3416,38 @@ (1 row) + + Examples: Geography + Return perimeter in meters and feet for polygon and multipolygon. Note this is geography (WGS 84 long lat) + +SELECT ST_Perimeter(geog) As per_meters, ST_Perimeter(geog)/0.3048 As per_ft +FROM ST_GeogFromText('POLYGON((-71.1776848522251 42.3902896512902,-71.1776843766326 42.3903829478009, +-71.1775844305465 42.3903826677917,-71.1775825927231 42.3902893647987,-71.1776848522251 42.3902896512902))') As geog; + + per_meters | per_ft +-----------------+------------------ +37.3790462565251 | 122.634666195949 + + +-- Multipolygon example -- +SELECT ST_Perimeter(geog) As per_meters, ST_Perimeter(geog,false) As per_sphere_meters, ST_Perimeter(geog)/0.3048 As per_ft +FROM ST_GeogFromText('MULTIPOLYGON(((-71.1044543107478 42.340674480411,-71.1044542869917 42.3406744369506, +-71.1044553562977 42.340673886454,-71.1044543107478 42.340674480411)), +((-71.1044543107478 42.340674480411,-71.1044860600303 42.3407237015564,-71.1045215770124 42.3407653385914, +-71.1045498002983 42.3407946553165,-71.1045611902745 42.3408058316308,-71.1046016507427 42.340837442371, +-71.104617893173 42.3408475056957,-71.1048586153981 42.3409875993595,-71.1048736143677 42.3409959528211, +-71.1048878050242 42.3410084812078,-71.1044020965803 42.3414730072048, +-71.1039672113619 42.3412202916693,-71.1037740497748 42.3410666421308, +-71.1044280218456 42.3406894151355,-71.1044543107478 42.340674480411)))') As geog; + + per_meters | per_sphere_meters | per_ft +------------------+-------------------+------------------ + 257.634283683311 | 257.412311446337 | 845.256836231335 + + See Also - + , , @@ -2755,9 +3488,9 @@ - + - ST_Perimeter3D + ST_3DPerimeter Returns the 3-dimensional perimeter of the geometry, if it is a polygon or multi-polygon. @@ -2766,7 +3499,7 @@ - float ST_Perimeter3D + float ST_3DPerimeter geometry geomA @@ -2777,19 +3510,19 @@ Returns the 3-dimensional perimeter of the geometry, if it is a polygon or multi-polygon. If the geometry is 2-dimensional, then the 2-dimensional perimeter is returned. - &Z_support; + Changed: 2.0.0 In prior versions this used to be called ST_Perimeter3D Examples Perimeter of a slightly elevated polygon in the air in Massachusetts state plane feet - SELECT ST_Perimeter3D(the_geom), ST_Perimeter2d(the_geom), ST_Perimeter(the_geom) FROM + SELECT ST_3DPerimeter(the_geom), ST_Perimeter2d(the_geom), ST_Perimeter(the_geom) FROM (SELECT ST_GeomFromEWKT('SRID=2249;POLYGON((743238 2967416 2,743238 2967450 1, 743265.625 2967416 1,743238 2967416 2))') As the_geom) As foo; - st_perimeter3d | st_perimeter2d | st_perimeter + ST_3DPerimeter | st_perimeter2d | st_perimeter ------------------+------------------+------------------ 105.465793597674 | 105.432997272188 | 105.432997272188 @@ -2870,107 +3603,224 @@ - - - ST_Relate + + + ST_Project - Returns true if this Geometry is spatially related to - anotherGeometry, by testing for intersections between the - Interior, Boundary and Exterior of the two geometries as specified - by the values in the intersectionMatrixPattern. If no intersectionMatrixPattern - is passed in, then returns the maximum intersectionMatrixPattern that relates the 2 geometries. - + Returns a POINT projected from a start point using a bearing and distance. + - - - - boolean ST_Relate - geometry geomA - geometry geomB - text intersectionMatrixPattern - + + + + geography ST_Project - - text ST_Relate - geometry geomA - geometry geomB - + geography + g1 + float + distance + float + azimuth + + + - - + + Description - - Description + Returns a POINT projected from a start point using an azimuth (bearing) and distance. + Distance, azimuth and projection are all aspects of the same operation, describing (or in the case of projection, constructing) the relationship between two points on the world. + The azimuth is sometimes called the heading or the bearing in navigation. It is measured relative to true north (azimuth zero). East is azimuth 90, south is azimuth 180, west is azimuth 270. + The distance is given in meters. + + - Version 1: Takes geomA, geomB, intersectionMatrix and Returns 1 (TRUE) if this Geometry is spatially related to - anotherGeometry, by testing for intersections between the - Interior, Boundary and Exterior of the two geometries as specified - by the values in the intersectionMatrixPattern. + + Examples - This is especially useful for testing compound checks of intersection, crosses, etc in one step. - Do not call with a GeometryCollection as an argument + SELECT ST_AsText(ST_Project('POINT(0 0)'::geography, 100000, 45)); + st_astext + ------------------------------------------ + POINT(0.63523102912532 0.63947233472882) + (1 row) + + - This is the "allowable" version that returns a - boolean, not an integer. This is defined in OGC spec + + See Also - This DOES NOT automagically include an index call. The reason for that - is some relationships are anti e.g. Disjoint. If you are - using a relationship pattern that requires intersection, then include the && - index call. + , + + - Version 2: Takes geomA and geomB and returns the + + + ST_Relate + + Returns true if this Geometry is spatially related to + anotherGeometry, by testing for intersections between the + Interior, Boundary and Exterior of the two geometries as specified + by the values in the intersectionMatrixPattern. If no intersectionMatrixPattern + is passed in, then returns the maximum intersectionMatrixPattern that relates the 2 geometries. + - Do not call with a GeometryCollection as an argument + + + + boolean ST_Relate + geometry geomA + geometry geomB + text intersectionMatrixPattern + + + + text ST_Relate + geometry geomA + geometry geomB + + + + text ST_Relate + geometry geomA + geometry geomB + int BoundaryNodeRule + + + - not in OGC spec, but implied. see s2.1.13.2 + + Description + + Version 1: Takes geomA, geomB, intersectionMatrix and Returns 1 (TRUE) if this Geometry is spatially related to + anotherGeometry, by testing for intersections between the + Interior, Boundary and Exterior of the two geometries as specified + by the values in the DE-9IM matrix pattern. + + This is especially useful for testing compound checks of intersection, crosses, etc in one step. + Do not call with a GeometryCollection as an argument + + This is the "allowable" version that returns a + boolean, not an integer. This is defined in OGC spec + + This DOES NOT automagically include an index call. The reason for that + is some relationships are anti e.g. Disjoint. If you are + using a relationship pattern that requires intersection, then include the && + index call. + + Version 2: Takes geomA and geomB and returns the - Both Performed by the GEOS module + Version 3: same as version 2 bu allows to specify a boundary node rule (1:OGC/MOD2, 2:Endpoint, 3:MultivalentEndpoint, 4:MonovalentEndpoint) + + Do not call with a GeometryCollection as an argument + + not in OGC spec, but implied. see s2.1.13.2 + + Performed by the GEOS module + + &sfs_compliant; s2.1.1.2 // s2.1.13.3 + &sqlmm_compliant; SQL-MM 3: 5.1.25 + Enhanced: 2.0.0 - added support for specifying boundary node rule (requires GEOS >= 3.0). - &sfs_compliant; s2.1.1.2 // s2.1.13.3 - &sqlmm_compliant; SQL-MM 3: 5.1.25 - + - + Examples --Find all compounds that intersect and not touch a poly (interior intersects) SELECT l.* , b.name As poly_name -FROM polys As b - INNER JOIN compounds As l - ON (p.the_geom && b.the_geom - AND ST_Relate(l.the_geom, b.the_geom,'T********')); + FROM polys As b +INNER JOIN compounds As l +ON (p.the_geom && b.the_geom +AND ST_Relate(l.the_geom, b.the_geom,'T********')); SELECT ST_Relate(ST_GeometryFromText('POINT(1 2)'), ST_Buffer(ST_GeometryFromText('POINT(1 2)'),2)); - st_relate +st_relate ----------- - 0FFFFF212 +0FFFFF212 SELECT ST_Relate(ST_GeometryFromText('LINESTRING(1 2, 3 4)'), ST_GeometryFromText('LINESTRING(5 6, 7 8)')); - st_relate +st_relate ----------- - FF1FF0102 +FF1FF0102 SELECT ST_Relate(ST_GeometryFromText('POINT(1 2)'), ST_Buffer(ST_GeometryFromText('POINT(1 2)'),2), '0FFFFF212'); - st_relate +st_relate ----------- - t +t SELECT ST_Relate(ST_GeometryFromText('POINT(1 2)'), ST_Buffer(ST_GeometryFromText('POINT(1 2)'),2), '*FF*FF212'); - st_relate +st_relate ----------- - t +t - - - - + + + + See Also - + , , , , - - + + + + + + ST_RelateMatch + + Returns true if intersectionMattrixPattern1 implies intersectionMatrixPattern2 + + + + + + boolean ST_RelateMatch + text intersectionMatrix + text intersectionMatrixPattern + + + + + + Description + + Takes intersectionMatrix and intersectionMatrixPattern and Returns true if the intersectionMatrix satisfies + the intersectionMatrixPattern. For more information refer to . + + Availability: 2.0.0 - requires GEOS >= 3.3.0. + + + + + Examples + +SELECT ST_RelateMatch('101202FFF', 'TTTTTTFFF') ; +-- result -- +t +--example of common intersection matrix patterns and example matrices +-- comparing relationships of involving one invalid geometry and ( a line and polygon that intersect at interior and boundary) +SELECT mat.name, pat.name, ST_RelateMatch(mat.val, pat.val) As satisfied + FROM + ( VALUES ('Equality', 'T1FF1FFF1'), + ('Overlaps', 'T*T***T**'), + ('Within', 'T*F**F***'), + ('Disjoint', 'FF*FF****') As pat(name,val) + CROSS JOIN + ( VALUES ('Self intersections (invalid)', '111111111'), + ('IE2_BI1_BB0_BE1_EI1_EE2', 'FF2101102'), + ('IB1_IE1_BB0_BE0_EI2_EI1_EE2', 'F11F00212') + ) As mat(name,val); + + + + + + + See Also + , + + @@ -3065,7 +3915,7 @@ See Also - , , , , + , , , @@ -3103,9 +3953,6 @@ In mathematical terms, this predicate is expressed as: - TODO: Insert appropriate MathML markup here or use a gif. - Simple HTML markup does not work well in both IE and Firefox. - @@ -3314,7 +4161,7 @@ See Also - , , + , , - + diff -Nru postgis-1.5.3/doc/reference_misc.xml postgis-2.0.1/doc/reference_misc.xml --- postgis-1.5.3/doc/reference_misc.xml 2009-12-30 15:12:49.000000000 +0000 +++ postgis-2.0.1/doc/reference_misc.xml 2012-02-27 22:08:12.000000000 +0000 @@ -22,8 +22,11 @@ Description Aggregate. Constructs an array of geometries. + Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced. &Z_support; &curve_support; + &P_support; + &T_support; @@ -79,7 +82,11 @@ Description Returns a BOX2D representing the maximum extents of the geometry. + + Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced. &curve_support; + &P_support; + &T_support; @@ -126,8 +133,11 @@ Description Returns a BOX3D representing the maximum extents of the geometry. - &Z_support; + Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced. &curve_support; + &P_support; + &T_support; + &Z_support; @@ -191,9 +201,20 @@ ANALYZE and resulting extent will be about 95% of the real one. + + +In absence of statistics (empty table or no ANALYZE called) this function +returns NULL. Prior to version 1.5.4 an exception was thrown +instead. + + + + For PostgreSQL<8.0.0 statistics are gathered by update_geometry_stats() and resulting extent will be exact. + Availability: 1.0.0 + &curve_support; @@ -272,6 +293,10 @@ Availability: 1.5.0 behavior changed to output double precision instead of float4 coordinates. + + Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced. + &P_support; + &T_support; @@ -303,7 +328,7 @@ See Also - , , , ,, + , , , , , @@ -316,7 +341,7 @@ - box3d_extent ST_Extent + box2d ST_Extent geometry set geomfield @@ -336,12 +361,16 @@ - ST_Extent will return boxes with only an x and y component even with (x,y,z) coordinate geometries. To maintain x,y,z use ST_Extent3D instead. + ST_Extent will return boxes with only an x and y component even with (x,y,z) coordinate geometries. To maintain x,y,z use ST_3DExtent instead. - Availability: 1.4.0 As of 1.4.0 now returns a box3d_extent instead of box2d object. + Availability: 1.4.0 + + Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced. + &P_support; + &T_support; @@ -380,20 +409,20 @@ See Also - , , , + , , , - + - ST_Extent3D + ST_3DExtent an aggregate function that returns the box3D bounding box that bounds rows of geometries. - box3d ST_Extent3D + box3d ST_3DExtent geometry set geomfield @@ -402,24 +431,28 @@ Description - ST_Extent3D returns a box3d (includes Z coordinate) bounding box that encloses a set of geometries. The ST_Extent3D function is an "aggregate" function in the + ST_3DExtent returns a box3d (includes Z coordinate) bounding box that encloses a set of geometries. The ST_3DExtent function is an "aggregate" function in the terminology of SQL. That means that it operates on lists of data, in the same way the SUM() and AVG() functions do. Since it returns a bounding box, the spatial Units are in the units of the spatial reference system in use denoted by the SRID - Since ST_Extent3D returns a bounding box, the SRID meta-data is lost. Use ST_SetSRID to force it back into + Since ST_3DExtent returns a bounding box, the SRID meta-data is lost. Use ST_SetSRID to force it back into a geometry with SRID meta data. The coordinates are in the units of the spatial ref of the orginal geometries. + Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced. + Changed: 2.0.0 In prior versions this used to be called ST_Extent3D &Z_support; &curve_support; + &P_support; + &T_support; Examples -SELECT ST_Extent3D(foo.the_geom) As b3extent +SELECT ST_3DExtent(foo.the_geom) As b3extent FROM (SELECT ST_MakePoint(x,y,z) As the_geom FROM generate_series(1,3) As x CROSS JOIN generate_series(1,2) As y @@ -429,7 +462,7 @@ BOX3D(1 1 0,3 2 2) --Get the extent of various elevated circular strings -SELECT ST_Extent3D(foo.the_geom) As b3extent +SELECT ST_3DExtent(foo.the_geom) As b3extent FROM (SELECT ST_Translate(ST_Force_3DZ(ST_LineToCurve(ST_Buffer(ST_MakePoint(x,y),1))),0,0,z) As the_geom FROM generate_series(1,3) As x CROSS JOIN generate_series(1,2) As y @@ -526,6 +559,8 @@ &Z_support; &curve_support; + &P_support; + &T_support; @@ -572,7 +607,7 @@ ST_Point_Inside_Circle - Is the point geometry insert circle defined by center_x, center_y , radius + Is the point geometry insert circle defined by center_x, center_y, radius @@ -594,7 +629,7 @@ point_inside_circle(<geometry>,<circle_center_x>,<circle_center_y>,<radius>). Returns the true if the geometry is a point and is inside the circle. Returns false otherwise. - This only works for points as the name suggests + This only works for points as the name suggests @@ -616,412 +651,5 @@ - - - ST_XMax - - Returns X maxima of a bounding box 2d or 3d or a geometry. - - - - - - float ST_XMax - box3d aGeomorBox2DorBox3D - - - - - - Description - - Returns X maxima of a bounding box 2d or 3d or a geometry. - - - Although this function is only defined for box3d, it will work for box2d and geometry because of the auto-casting behavior - defined for geometries and box2d. However you can not feed it a geometry or box2d text represenation, since that will not auto-cast. - - - &Z_support; - &curve_support; - - - - - Examples - - SELECT ST_XMax('BOX3D(1 2 3, 4 5 6)'); -st_xmax -------- -4 - -SELECT ST_XMax(ST_GeomFromText('LINESTRING(1 3 4, 5 6 7)')); -st_xmax -------- -5 - -SELECT ST_XMax(CAST('BOX(-3 2, 3 4)' As box2d)); -st_xmax -------- -3 ---Observe THIS DOES NOT WORK because it will try to autocast the string representation to a BOX3D -SELECT ST_XMax('LINESTRING(1 3, 5 6)'); - ---ERROR: BOX3D parser - doesnt start with BOX3D( - -SELECT ST_XMax(ST_GeomFromEWKT('CIRCULARSTRING(220268 150415 1,220227 150505 2,220227 150406 3)')); -st_xmax --------- -220288.248780547 - - - - - - See Also - - , , , , - - - - - - ST_XMin - - Returns X minima of a bounding box 2d or 3d or a geometry. - - - - - - float ST_XMin - box3d aGeomorBox2DorBox3D - - - - - - Description - - Returns X minima of a bounding box 2d or 3d or a geometry. - - - Although this function is only defined for box3d, it will work for box2d and geometry because of the auto-casting behavior - defined for geometries and box2d. However you can not feed it a geometry or box2d text represenation, since that will not auto-cast. - - - &Z_support; - &curve_support; - - - - - Examples - - SELECT ST_XMin('BOX3D(1 2 3, 4 5 6)'); -st_xmin -------- -1 - -SELECT ST_XMin(ST_GeomFromText('LINESTRING(1 3 4, 5 6 7)')); -st_xmin -------- -1 - -SELECT ST_XMin(CAST('BOX(-3 2, 3 4)' As box2d)); -st_xmin -------- --3 ---Observe THIS DOES NOT WORK because it will try to autocast the string representation to a BOX3D -SELECT ST_XMin('LINESTRING(1 3, 5 6)'); - ---ERROR: BOX3D parser - doesnt start with BOX3D( - -SELECT ST_XMin(ST_GeomFromEWKT('CIRCULARSTRING(220268 150415 1,220227 150505 2,220227 150406 3)')); -st_xmin --------- -220186.995121892 - - - - - - See Also - - , , , , - - - - - - ST_YMax - - Returns Y maxima of a bounding box 2d or 3d or a geometry. - - - - - - float ST_YMax - box3d aGeomorBox2DorBox3D - - - - - - Description - - Returns Y maxima of a bounding box 2d or 3d or a geometry. - - - Although this function is only defined for box3d, it will work for box2d and geometry because of the auto-casting behavior - defined for geometries and box2d. However you can not feed it a geometry or box2d text represenation, since that will not auto-cast. - - - &Z_support; - &curve_support; - - - - - Examples - - SELECT ST_YMax('BOX3D(1 2 3, 4 5 6)'); -st_ymax -------- -5 - -SELECT ST_YMax(ST_GeomFromText('LINESTRING(1 3 4, 5 6 7)')); -st_ymax -------- -6 - -SELECT ST_YMax(CAST('BOX(-3 2, 3 4)' As box2d)); -st_ymax -------- -4 ---Observe THIS DOES NOT WORK because it will try to autocast the string representation to a BOX3D -SELECT ST_YMax('LINESTRING(1 3, 5 6)'); - ---ERROR: BOX3D parser - doesnt start with BOX3D( - -SELECT ST_YMax(ST_GeomFromEWKT('CIRCULARSTRING(220268 150415 1,220227 150505 2,220227 150406 3)')); -st_ymax --------- -150506.126829327 - - - - - - See Also - - , , , , - - - - - - ST_YMin - - Returns Y minima of a bounding box 2d or 3d or a geometry. - - - - - - float ST_YMin - box3d aGeomorBox2DorBox3D - - - - - - Description - - Returns Y minima of a bounding box 2d or 3d or a geometry. - - - Although this function is only defined for box3d, it will work for box2d and geometry because of the auto-casting behavior - defined for geometries and box2d. However you can not feed it a geometry or box2d text represenation, since that will not auto-cast. - - - &Z_support; - &curve_support; - - - - - Examples - - SELECT ST_YMin('BOX3D(1 2 3, 4 5 6)'); -st_ymin -------- -2 - -SELECT ST_YMin(ST_GeomFromText('LINESTRING(1 3 4, 5 6 7)')); -st_ymin -------- -3 - -SELECT ST_YMin(CAST('BOX(-3 2, 3 4)' As box2d)); -st_ymin -------- -2 ---Observe THIS DOES NOT WORK because it will try to autocast the string representation to a BOX3D -SELECT ST_YMin('LINESTRING(1 3, 5 6)'); - ---ERROR: BOX3D parser - doesnt start with BOX3D( - -SELECT ST_YMin(ST_GeomFromEWKT('CIRCULARSTRING(220268 150415 1,220227 150505 2,220227 150406 3)')); -st_ymin --------- -150406 - - - - - - See Also - - , , , , , - - - - - - ST_ZMax - - Returns Z minima of a bounding box 2d or 3d or a geometry. - - - - - - float ST_ZMax - box3d aGeomorBox2DorBox3D - - - - - - Description - - Returns Z maxima of a bounding box 2d or 3d or a geometry. - - - Although this function is only defined for box3d, it will work for box2d and geometry because of the auto-casting behavior - defined for geometries and box2d. However you can not feed it a geometry or box2d text represenation, since that will not auto-cast. - - - &Z_support; - &curve_support; - - - - - Examples - - SELECT ST_ZMax('BOX3D(1 2 3, 4 5 6)'); -st_zmax -------- -6 - -SELECT ST_ZMax(ST_GeomFromEWKT('LINESTRING(1 3 4, 5 6 7)')); -st_zmax -------- -7 - -SELECT ST_ZMax('BOX3D(-3 2 1, 3 4 1)' ); -st_zmax -------- -1 ---Observe THIS DOES NOT WORK because it will try to autocast the string representation to a BOX3D -SELECT ST_ZMax('LINESTRING(1 3 4, 5 6 7)'); - ---ERROR: BOX3D parser - doesnt start with BOX3D( - -SELECT ST_ZMax(ST_GeomFromEWKT('CIRCULARSTRING(220268 150415 1,220227 150505 2,220227 150406 3)')); -st_zmax --------- -3 - - - - - - See Also - - , , , , , - - - - - - ST_ZMin - - Returns Z minima of a bounding box 2d or 3d or a geometry. - - - - - - float ST_ZMin - box3d aGeomorBox2DorBox3D - - - - - - Description - - Returns Z minima of a bounding box 2d or 3d or a geometry. - - - Although this function is only defined for box3d, it will work for box2d and geometry because of the auto-casting behavior - defined for geometries and box2d. However you can not feed it a geometry or box2d text represenation, since that will not auto-cast. - - - &Z_support; - &curve_support; - - - - - Examples - - SELECT ST_ZMin('BOX3D(1 2 3, 4 5 6)'); -st_zmin -------- -3 - -SELECT ST_ZMin(ST_GeomFromEWKT('LINESTRING(1 3 4, 5 6 7)')); -st_zmin -------- -4 - -SELECT ST_ZMin('BOX3D(-3 2 1, 3 4 1)' ); -st_zmin -------- -1 ---Observe THIS DOES NOT WORK because it will try to autocast the string representation to a BOX3D -SELECT ST_ZMin('LINESTRING(1 3 4, 5 6 7)'); - ---ERROR: BOX3D parser - doesnt start with BOX3D( - -SELECT ST_ZMin(ST_GeomFromEWKT('CIRCULARSTRING(220268 150415 1,220227 150505 2,220227 150406 3)')); -st_zmin --------- -1 - - - - - - See Also - - , , , , , , - - diff -Nru postgis-1.5.3/doc/reference_old.xml postgis-2.0.1/doc/reference_old.xml --- postgis-1.5.3/doc/reference_old.xml 2009-11-25 19:15:57.000000000 +0000 +++ postgis-2.0.1/doc/reference_old.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,241 +0,0 @@ - - - PostGIS Reference - - The functions given below are the ones which a user of PostGIS is - likely to need. There are other functions which are required support - functions to the PostGIS objects which are not of use to a general - user. - - - PostGIS has begun a transition from the existing naming convention - to an SQL-MM-centric convention. As a result, most of the functions that - you know and love have been renamed using the standard spatial type (ST) - prefix. Previous functions are still available, though are not listed in - this document where updated functions are equivalent. These will be - deprecated in a future release. - - - - OpenGIS Functions - - - Geometry Constructors - - - - - ST_PolyFromWKB(bytea,[<srid>]) - - - Makes a Geometry from WKB with the given SRID. If SRID is - not give, it defaults to -1. - - OGC SPEC 3.2.7.2 - option SRID is from the conformance - suite - - throws an error if WKB is not a POLYGON - - - - - ST_PolygonFromWKB(bytea,[<srid>]) - - - Makes a Geometry from WKB with the given SRID. If SRID is - not give, it defaults to -1. - - from the conformance suite - - throws an error if WKB is not a POLYGON - - - - - ST_MPointFromWKB(bytea,[<srid>]) - - - Makes a Geometry from WKB with the given SRID. If SRID is - not give, it defaults to -1. - - OGC SPEC 3.2.7.2 - option SRID is from the conformance - suite - - throws an error if WKB is not a MULTIPOINT - - - - - ST_MLineFromWKB(bytea,[<srid>]) - - - Makes a Geometry from WKB with the given SRID. If SRID is - not give, it defaults to -1. - - OGC SPEC 3.2.7.2 - option SRID is from the conformance - suite - - throws an error if WKB is not a MULTILINESTRING - - - - - ST_MPolyFromWKB(bytea,[<srid>]) - - - Makes a Geometry from WKB with the given SRID. If SRID is - not give, it defaults to -1. - - OGC SPEC 3.2.7.2 - option SRID is from the conformance - suite - - throws an error if WKB is not a MULTIPOLYGON - - - - - ST_GeomCollFromWKB(bytea,[<srid>]) - - - Makes a Geometry from WKB with the given SRID. If SRID is - not give, it defaults to -1. - - OGC SPEC 3.2.7.2 - option SRID is from the conformance - suite - - throws an error if WKB is not a GEOMETRYCOLLECTION - - - - - - - - - SQL-MM Functions - - This is a listing of the SQL-MM defined functions that PostGIS - currently supports. The implementations of these functions follow the - ArcSDE implementation, and thus deviate somewhat from the spec. These - deviations will be noted. - - As of version 1.2.0, these functions have been implemented by - wrapping existing PostGIS functions. As a result, full support for curved - geometries may not be in place for many functions. - - - SQL-MM defines the default SRID of all geometry constructors as 0. - PostGIS uses a default SRID of -1. - - - - - ST_MLineFromWKB - - - Return a specified ST_MultiLineString value. - - SQL-MM 3: 9.4.5 - - - - - ST_MPointFromWKB - - - Return a specified ST_MultiPoint value. - - SQL-MM 3: 9.2.5 - - - - - ST_MPolyFromWKB - - - Return a specified ST_MultiPolygon value. - - SQL-MM 3: 9.6.5 - - - - - ST_PolyFromWKB - - - Return a specified ST_Polygon value. - - SQL-MM 3: 8.3.7 - - - - - - - ArcSDE Functions - - Additional functions have been added to improve support for an - ArcSDE style interface. - - - - SE_EnvelopesIntersect - - - Returns t (TRUE) if the envelopes of two geometries intersect; - otherwise, it returns f (FALSE). - - - - - SE_Is3d - - - Test if a geometry value has z coordinate values. - - - - - SE_IsMeasured - - - Test if a geometry value has m coordinate values. - - - - - SE_LocateAlong - - - Return a derived geometry collection value with elements that - match the specified measur. - - - - - SE_LocateBetween - - - Return a derived geometry collection value with elements that - match the specified range of measures inclusively. - - - - - SE_M - - - Returns the m coordinate value of an ST_Point value. - - - - - SE_Z - - - Returns the z coordinate value of an ST_Point value - - - - - diff -Nru postgis-1.5.3/doc/reference_operator.xml postgis-2.0.1/doc/reference_operator.xml --- postgis-1.5.3/doc/reference_operator.xml 2010-12-02 16:03:25.000000000 +0000 +++ postgis-2.0.1/doc/reference_operator.xml 2012-03-10 13:42:56.000000000 +0000 @@ -1,11 +1,11 @@ Operators - + && - Returns TRUE if A's bounding box overlaps B's. + Returns TRUE if A's 2D bounding box intersects B's 2D bounding box. @@ -49,13 +49,15 @@ Description - The && operator returns TRUE if the bounding box of geometry A overlaps the bounding box of geometry B. + The && operator returns TRUE if the 2D bounding box of geometry A intersects the 2D bounding box of geometry B. This operand will make use of any indexes that may be available on the geometries. + Enhanced: 2.0.0 support for Polyhedral surfaces was introduced. Availability: 1.5.0 support for geography was introduced. &curve_support; + &P_support; @@ -88,6 +90,92 @@ + + + + &&& + + Returns TRUE if A's 3D bounding box intersects B's 3D bounding box. + + + + + + boolean &&& + + + geometry + + A + + + + geometry + + B + + + + + + + Description + + The &&& operator returns TRUE if the n-D bounding box of geometry A intersects the n-D bounding box of geometry B. + + This operand will make use of any indexes that may be available on the + geometries. + + Availability: 2.0.0 + &curve_support; + &P_support; + &T_support; + &Z_support; + + + + Examples: 3D LineStrings + + SELECT tbl1.column1, tbl2.column1, tbl1.column2 &&& tbl2.column2 AS overlaps_3d, + tbl1.column2 && tbl2.column2 AS overlaps_2d +FROM ( VALUES + (1, 'LINESTRING Z(0 0 1, 3 3 2)'::geometry), + (2, 'LINESTRING Z(1 2 0, 0 5 -1)'::geometry)) AS tbl1, +( VALUES + (3, 'LINESTRING Z(1 2 1, 4 6 1)'::geometry)) AS tbl2; + + column1 | column1 | overlaps_3d | overlaps_2d +---------+---------+-------------+------------- + 1 | 3 | t | t + 2 | 3 | f | t + + + + + Examples: 3M LineStrings + + SELECT tbl1.column1, tbl2.column1, tbl1.column2 &&& tbl2.column2 AS overlaps_3zm, + tbl1.column2 && tbl2.column2 AS overlaps_2d +FROM ( VALUES + (1, 'LINESTRING M(0 0 1, 3 3 2)'::geometry), + (2, 'LINESTRING M(1 2 0, 0 5 -1)'::geometry)) AS tbl1, +( VALUES + (3, 'LINESTRING M(1 2 1, 4 6 1)'::geometry)) AS tbl2; + + column1 | column1 | overlaps_3zm | overlaps_2d +---------+---------+-------------+------------- + 1 | 3 | t | t + 2 | 3 | f | t + + + + + + See Also + + + + @@ -154,7 +242,7 @@ See Also - , + , , , @@ -199,6 +287,7 @@ box of geometry B. &curve_support; + &P_support; This operand will make use of any indexes that may be available on the geometries. @@ -228,7 +317,7 @@ See Also - , + , , , @@ -300,7 +389,7 @@ See Also - , + , , , @@ -445,7 +534,7 @@ = - Returns TRUE if A's bounding box is the same as B's. + Returns TRUE if A's bounding box is the same as B's. Uses double precision bounding box. @@ -506,6 +595,11 @@ geometries. &curve_support; + &P_support; + Changed: 2.0.0 , the bounding box of geometries was changed to use double precision instead of float4 precision of + prior. The side effect of this is that in particular points in prior versions that were a little different may have returned + true in prior versions and false in 2.0+ since their float4 boxes would be the same but there float8 (double precision), would be + different. @@ -537,13 +631,21 @@ st_astext --------------------- LINESTRING(0 0,1 1) -(1 row) +(1 row) + +-- In versions prior to 2.0, this used to return true -- + SELECT ST_GeomFromText('POINT(1707296.37 4820536.77)') = + ST_GeomFromText('POINT(1707296.27 4820536.87)') As pt_intersect; + +--pt_intersect -- +f + See Also - , , + , @@ -680,7 +782,7 @@ See Also - , + , @@ -749,7 +851,7 @@ See Also - , + , , , @@ -886,7 +988,7 @@ See Also - , + , @@ -930,8 +1032,8 @@ geometries. Availability: 1.5.0 changed behavior - - + &P_support; + This operator has changed behavior in PostGIS 1.5 from testing for actual geometric equality to only @@ -943,6 +1045,8 @@ linkend="ST_Equals" /> and to check for bounding box equality ; operator is a safer option. + + Examples @@ -959,5 +1063,207 @@ , , + + + + <-> + + Returns the distance between two points. For point / point checks it uses floating point accuracy (as opposed to the double precision accuracy of the underlying point geometry). For other geometry types + the distance between the floating point bounding box centroids is returned. Useful for doing distance ordering and nearest neighbor limits + using KNN gist functionality. + + + + + + double precision <-> + + + geometry + + A + + + + geometry + + B + + + + + + + Description + + The <-> operator returns distance between two points read from the spatial index for points (float precision). For + other geometries it returns the distance from centroid of bounding box of geometries. Useful for doing nearest neighbor approximate distance ordering. + + This operand will make use of any indexes that may be available on the + geometries. It is different from other operators that use spatial indexes in that the spatial index is only used when the operator + is in the ORDER BY clause. + Index only kicks in if one of the geometries is a constant (not in a subquery/cte). e.g. 'SRID=3005;POINT(1011102 450541)'::geometry instead of a.geom + + Availability: 2.0.0 only available for PostgreSQL 9.1+ + + + + + + Examples + + + d | edabbr | vaabbr +------------------+--------+-------- + 0 | ALQ | 128 + 5541.57712511724 | ALQ | 129A + 5579.67450712005 | ALQ | 001 + 6083.4207708641 | ALQ | 131 + 7691.2205404848 | ALQ | 003 + 7900.75451037313 | ALQ | 122 + 8694.20710669982 | ALQ | 129B + 9564.24289057111 | ALQ | 130 + 12089.665931705 | ALQ | 127 + 18472.5531479404 | ALQ | 002 +(10 rows) + + +Then the KNN raw answer: + + 'SRID=3005;POINT(1011102 450541)'::geometry limit 10;]]> + + d | edabbr | vaabbr +------------------+--------+-------- + 0 | ALQ | 128 + 5579.67450712005 | ALQ | 001 + 5541.57712511724 | ALQ | 129A + 8694.20710669982 | ALQ | 129B + 9564.24289057111 | ALQ | 130 + 6083.4207708641 | ALQ | 131 + 12089.665931705 | ALQ | 127 + 24795.264503022 | ALQ | 124 + 24587.6584922302 | ALQ | 123 + 26764.2555463114 | ALQ | 125 +(10 rows) + + +Note the misordering in the actual distances and the different entries that actually show up in the top 10. + + + +Finally the hybrid: + + 'SRID=3005;POINT(1011102 450541)'::geometry LIMIT 100) + SELECT * + FROM index_query + ORDER BY d limit 10;]]> + + d | edabbr | vaabbr +------------------+--------+-------- + 0 | ALQ | 128 + 5541.57712511724 | ALQ | 129A + 5579.67450712005 | ALQ | 001 + 6083.4207708641 | ALQ | 131 + 7691.2205404848 | ALQ | 003 + 7900.75451037313 | ALQ | 122 + 8694.20710669982 | ALQ | 129B + 9564.24289057111 | ALQ | 130 + 12089.665931705 | ALQ | 127 + 18472.5531479404 | ALQ | 002 +(10 rows) + + + + + See Also + , , + + + + + + <#> + + Returns the distance between bounding box of 2 geometries. For point / point checks it's almost the same as distance (though may be different since the bounding box is at floating point accuracy and geometries are double precision). Useful for doing distance ordering and nearest neighbor limits + using KNN gist functionality. + + + + + + double precision <#> + + + geometry + + A + + + + geometry + + B + + + + + + + Description + + The <#> KNN GIST operator returns distance between two floating point bounding boxes read from the spatial index if available. Useful for doing nearest neighbor approximate distance ordering. + + This operand will make use of any indexes that may be available on the + geometries. It is different from other operators that use spatial indexes in that the spatial index is only used when the operator + is in the ORDER BY clause. + Index only kicks in if one of the geometries is a constant e.g. ORDER BY (ST_GeomFromText('POINT(1 2)') <#> geom) instead of g1.geom <#>. + + Availability: 2.0.0 only available for PostgreSQL 9.1+ + + + + + Examples + ST_GeomFromText('LINESTRING(746149 2948672,745954 2948576, + 745787 2948499,745740 2948468,745712 2948438, + 745690 2948384,745677 2948319)',2249) As b_dist, + ST_Distance(b.geom, ST_GeomFromText('LINESTRING(746149 2948672,745954 2948576, + 745787 2948499,745740 2948468,745712 2948438, + 745690 2948384,745677 2948319)',2249)) As act_dist + FROM bos_roads As b + ORDER BY b_dist, b.tlid + LIMIT 100) As foo + ORDER BY act_dist, tlid LIMIT 10;]]> + + tlid | mtfcc | b_dist | act_dist +-----------+-------+------------------+------------------ + 85732027 | S1400 | 0 | 0 + 85732029 | S1400 | 0 | 0 + 85732031 | S1400 | 0 | 0 + 85734335 | S1400 | 0 | 0 + 85736037 | S1400 | 0 | 0 + 624683742 | S1400 | 0 | 128.528874268666 + 85719343 | S1400 | 260.839270432962 | 260.839270432962 + 85741826 | S1400 | 164.759294123275 | 260.839270432962 + 85732032 | S1400 | 277.75 | 311.830282365264 + 85735592 | S1400 | 222.25 | 311.830282365264 +(10 rows) + + + + See Also + , , + + diff -Nru postgis-1.5.3/doc/reference_output.xml postgis-2.0.1/doc/reference_output.xml --- postgis-1.5.3/doc/reference_output.xml 2010-12-08 13:12:21.000000000 +0000 +++ postgis-2.0.1/doc/reference_output.xml 2012-02-27 22:08:12.000000000 +0000 @@ -16,11 +16,16 @@ bytea ST_AsBinary + geometry g1 + text NDR_or_XDR + + + bytea ST_AsBinary geography g1 bytea ST_AsBinary - geometry g1 + geography g1 text NDR_or_XDR @@ -30,22 +35,33 @@ Description Returns the Well-Known Binary representation of the geometry. There are 2 variants of the function. The first - variant takes no endian encoding paramater and defaults to little endian. The second variant takes a second argument + variant takes no endian encoding parameter and defaults to server machine endian. The second variant takes a second argument denoting the encoding - using little-endian ('NDR') or big-endian ('XDR') encoding. This is useful in binary cursors to pull data out of the database without converting it to a string representation. - The WKB spec does not include the SRID. To get the OGC WKB with SRID format use ST_AsEWKB + The WKB spec does not include the SRID. To get the WKB with SRID format use ST_AsEWKB ST_AsBinary is the reverse of for geometry. Use to convert to a postgis geometry from ST_AsBinary representation. + + + The default behavior in PostgreSQL 9.0 has been changed to output bytea in hex encoding. ST_AsBinary is the reverse of for geometry. If your GUI tools + require the old behavior, then SET bytea_output='escape' in your database. + + Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced. + Enhanced: 2.0.0 support for higher coordinate dimensions was introduced. + Enhanced: 2.0.0 support for specifying endian with geography was introduced. Availability: 1.5.0 geography support was introduced. &sfs_compliant; s2.1.1.1 &sqlmm_compliant; SQL-MM 3: 5.1.37 &curve_support; + &P_support; + &T_support; + &Z_support; @@ -80,7 +96,11 @@ See Also - , , , + + +, +, + @@ -106,7 +126,7 @@ Description Returns the Well-Known Binary representation of the geometry with SRID metadata. There are 2 variants of the function. The first - variant takes no endian encoding paramater and defaults to little endian. The second variant takes a second argument + variant takes no endian encoding parameter and defaults to little endian. The second variant takes a second argument denoting the encoding - using little-endian ('NDR') or big-endian ('XDR') encoding. This is useful in binary cursors to pull data out of the database without converting it to a string representation. @@ -116,8 +136,11 @@ ST_AsEWKB is the reverse of ST_GeomFromEWKB. Use ST_GeomFromEWKB to convert to a postgis geometry from ST_AsEWKB representation. + Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced. &Z_support; &curve_support; + &P_support; + &T_support; @@ -168,6 +191,10 @@ text ST_AsEWKT geometry g1 + + text ST_AsEWKT + geography g1 + @@ -185,8 +212,11 @@ ST_AsEWKT is the reverse of . Use to convert to a postgis geometry from ST_AsEWKT representation. + Enhanced: 2.0.0 support for Geography, Polyhedral surfaces, Triangles and TIN was introduced. &Z_support; &curve_support; + &P_support; + &T_support; @@ -229,69 +259,29 @@ text ST_AsGeoJSON - geometry g1 - - - text ST_AsGeoJSON - geography g1 - - - text ST_AsGeoJSON - geometry g1 - integer max_decimal_digits + geometry geom + integer maxdecimaldigits=15 + integer options=0 text ST_AsGeoJSON - geography g1 - integer max_decimal_digits - - - text ST_AsGeoJSON - geometry g1 - integer max_decimal_digits - integer options - - - text ST_AsGeoJSON - geography g1 - integer max_decimal_digits - integer options - - - text ST_AsGeoJSON - integer gj_version - geometry g1 + geography geog + integer maxdecimaldigits=15 + integer options=0 text ST_AsGeoJSON integer gj_version - geography g1 + geometry geom + integer maxdecimaldigits=15 + integer options=0 text ST_AsGeoJSON integer gj_version - geometry g1 - integer max_decimal_digits - - - text ST_AsGeoJSON - integer gj_version - geography g1 - integer max_decimal_digits - - - text ST_AsGeoJSON - integer gj_version - geometry g1 - integer max_decimal_digits - integer options - - - text ST_AsGeoJSON - integer gj_version - geography g1 - integer max_decimal_digits - integer options + geography geog + integer maxdecimaldigits=15 + integer options=0 @@ -305,8 +295,7 @@ supported. GeoJSON only support SFS 1.1 geometry type (no curve support for example). - The gj_version parameter is the major version of the GeoJSON spec. If specified, must be 1. - + The gj_version parameter is the major version of the GeoJSON spec. If specified, must be 1. This represents the spec version of GeoJSON. The third argument may be used to reduce the maximum number of decimal places used in output (defaults to 15). @@ -334,12 +323,13 @@ Version 1: ST_AsGeoJSON(geom) / precision=15 version=1 options=0 Version 2: ST_AsGeoJSON(geom, precision) / version=1 options=0 Version 3: ST_AsGeoJSON(geom, precision, options) / version=1 - Version 4: ST_AsGeoJSON(version, geom) / precision=15 options=0 - Version 5: ST_AsGeoJSON(version, geom, precision) /options=0 - Version 6: ST_AsGeoJSON(version, geom, precision,options) + Version 4: ST_AsGeoJSON(gj_version, geom) / precision=15 options=0 + Version 5: ST_AsGeoJSON(gj_version, geom, precision) /options=0 + Version 6: ST_AsGeoJSON(gj_version, geom, precision,options) Availability: 1.3.4 Availability: 1.5.0 geography support was introduced. + Changed: 2.0.0 support default args and named args. &Z_support; @@ -377,57 +367,33 @@ text ST_AsGML - geometry g1 - - - text ST_AsGML - geography g1 - - - text ST_AsGML - geometry g1 - integer precision - - - text ST_AsGML - geography g1 - integer precision - - - text ST_AsGML - integer version - geometry g1 - - - text ST_AsGML - integer version - geography g1 + geometry geom + integer maxdecimaldigits=15 + integer options=0 text ST_AsGML - integer version - geometry g1 - integer precision - - - text ST_AsGML - integer version - geography g1 - integer precision + geography geog + integer maxdecimaldigits=15 + integer options=0 + text ST_AsGML integer version - geometry g1 - integer precision - integer options + geometry geom + integer maxdecimaldigits=15 + integer options=0 + text nprefix=null + text ST_AsGML integer version - geography g1 - integer precision - integer options + geography geog + integer maxdecimaldigits=15 + integer options=0 + text nprefix=null @@ -437,11 +403,11 @@ Return the geometry as a Geography Markup Language (GML) element. The version parameter, if specified, may be either 2 or 3. If no version parameter is - specified then the default is assumed to be 2. The third argument - may be used to reduce the maximum number of decimal places + specified then the default is assumed to be 2. The precision argument + may be used to reduce the maximum number of decimal places (maxdecimaldigits) used in output (defaults to 15). GML 2 refer to 2.1.2 version, GML 3 to 3.1.1 version - The last 'options' argument is a bitfield. It could be used to define CRS output type + The 'options' argument is a bitfield. It could be used to define CRS output type in GML output, and to declare data as lat/lon: @@ -453,36 +419,132 @@ - 16: Declare that datas are lat/lon (e.g srid=4326). Default is to assume that data are planars. This option is usefull for GML 3.1.1 output only, related to axis order. + 2: For GML 3 only, remove srsDimension attribute from output. + + + + 4: For GML 3 only, use <LineString> rather than <Curve> tag for lines. + + + + 16: Declare that datas are lat/lon (e.g srid=4326). Default is to assume that data are planars. + This option is useful for GML 3.1.1 output only, related to axis order. So if you set it, it will swap the coordinates + so order is lat lon instead of database lon lat. + + + + 32: Output the box of the geometry (envelope). - + The 'namespace prefix' argument may be used to specify a custom +namespace prefix or no prefix (if empty). If null or omitted 'gml' prefix is used + - Availability: 1.3.2 Availability: 1.5.0 geography support was introduced. - - + Enhanced: 2.0.0 prefix support was introduced. Option 4 for GML3 was introduced to allow using LineString instead of Curve tag for lines. GML3 Support for Polyhedral surfaces and TINS was introduced. Option 32 was introduced to output the box. + Changed: 2.0.0 use default named args + + Only version 3+ of ST_AsGML supports Polyhedral Surfaces and TINS. &Z_support; + &P_support; + &T_support; - Examples + Examples: Version 2 0,0 0,1 1,1 1,0 0,0]]> - + + Examples: Version 3 + -- Flip coordinates and output extended EPSG (16 | 1)-- +6.34535 5.23423]]> + -- Output the envelope (32) -- + + 1 2 + 10 20 + ]]> + + + -- Output the envelope (32) , reverse (lat lon instead of lon lat) (16), long srs (1)= 32 | 16 | 1 = 49 -- + + 2 1 + 20 10 +]]> + + + -- Polyhedral Example -- +SELECT ST_AsGML(3, ST_GeomFromEWKT('POLYHEDRALSURFACE( ((0 0 0, 0 0 1, 0 1 1, 0 1 0, 0 0 0)), +((0 0 0, 0 1 0, 1 1 0, 1 0 0, 0 0 0)), ((0 0 0, 1 0 0, 1 0 1, 0 0 1, 0 0 0)), +((1 1 0, 1 1 1, 1 0 1, 1 0 0, 1 1 0)), +((0 1 0, 0 1 1, 1 1 1, 1 1 0, 0 1 0)), ((0 0 1, 1 0 1, 1 1 1, 0 1 1, 0 0 1)) )')); + st_asgml + -------- + + + + + + 0 0 0 0 0 1 0 1 1 0 1 0 0 0 0 + + + + + + + 0 0 0 0 1 0 1 1 0 1 0 0 0 0 0 + + + + + + + 0 0 0 1 0 0 1 0 1 0 0 1 0 0 0 + + + + + + + 1 1 0 1 1 1 1 0 1 1 0 0 1 1 0 + + + + + + + 0 1 0 0 1 1 1 1 1 1 1 0 0 1 0 + + + + + + + 0 0 1 1 0 1 1 1 1 0 1 1 0 0 1 + + + + +]]> + - See Also @@ -555,43 +617,28 @@ text ST_AsKML - geometry g1 - - - text ST_AsKML - geography g1 - - - text ST_AsKML - geometry g1 - integer precision - - - text ST_AsKML - geography g1 - integer precision - - - text ST_AsKML - integer version - geometry geom1 + geometry geom + integer maxdecimaldigits=15 text ST_AsKML - integer version - geography geom1 + geography geog + integer maxdecimaldigits=15 + text ST_AsKML integer version - geometry geom1 - integer precision + geometry geom + integer maxdecimaldigits=15 + text nprefix=NULL text ST_AsKML integer version - geography geom1 - integer precision + geography geog + integer maxdecimaldigits=15 + text nprefix=NULL @@ -601,12 +648,10 @@ Return the geometry as a Keyhole Markup Language (KML) element. There are several variants of this function. maximum number of decimal places used in - output (defaults to 15) and version default to 2. + output (defaults to 15), version default to 2 and default namespace is no prefix. - Version 1: ST_AsKML(geom) / version=2 precision=15 - Version 2: ST_AsKML(geom, max_sig_digits) / version=2 - Version 3: ST_AsKML(version, geom) / precision=15 - Version 4: ST_AsKML(version, geom, precision) + Version 1: ST_AsKML(geom_or_geog, maxdecimaldigits) / version=2 / maxdecimaldigits=15 + Version 2: ST_AsKML(version, geom_or_geog, maxdecimaldigits, nprefix) maxdecimaldigits=15 / nprefix=NULL Requires PostGIS be compiled with Proj support. Use to confirm you have proj support compiled in. @@ -615,6 +660,12 @@ Availability: 1.2.2 - later variants that include version param came in 1.3.2 + + Enhanced: 2.0.0 - Add prefix namespace. Default is no prefix + + + Changed: 2.0.0 - uses default args and supports named args + AsKML output will not work with geometries that do not have an SRID @@ -654,33 +705,15 @@ text ST_AsSVG - geometry g1 - - - text ST_AsSVG - geography g1 + geometry geom + integer rel=0 + integer maxdecimaldigits=15 text ST_AsSVG - geometry g1 - integer rel - - - text ST_AsSVG - geography g1 - integer rel - - - text ST_AsSVG - geometry g1 - integer rel - integer maxdecimaldigits - - - text ST_AsSVG - geography g1 - integer rel - integer maxdecimaldigits + geography geog + integer rel=0 + integer maxdecimaldigits=15 @@ -698,9 +731,10 @@ geometries are delimited by semicolons (";"). - Availability: 1.2.2 . Availability: 1.4.0 Changed in PostGIS 1.4.0 to include L command in absolute path to conform to Availability: 1.2.2. Availability: 1.4.0 Changed in PostGIS 1.4.0 to include L command in absolute path to conform to http://www.w3.org/TR/SVG/paths.html#PathDataBNF + Changed: 2.0.0 to use default args and support named args @@ -712,7 +746,179 @@ M 0 0 L 0 -1 1 -1 1 0 Z + + + + ST_AsX3D + + Returns a Geometry in X3D xml node element format: ISO-IEC-19776-1.2-X3DEncodings-XML + + + + + + text ST_AsX3D + geometry g1 + integer maxdecimaldigits=15 + integer options=0 + + + + + + Description + + Returns a geometry as an X3D xml formatted node element http://web3d.org/x3d/specifications/ISO-IEC-19776-1.2-X3DEncodings-XML/Part01/EncodingOfNodes.html. If maxdecimaldigits (precision) is not specified then defaults to 15. + + There are various options for translating PostGIS geometries to X3D since X3D geometry types don't map directly to PostGIS geometry types and some newer X3D types that might be better mappings we ahve avoided since most rendering tools don't currently support them. + These are the mappings we have settled on. Feel free to post a bug ticket if you have thoughts on the idea or ways we can allow people to denote their preferred mappings. + Below is how we currently map PostGIS 2D/3D types to X3D types + + + + + + + PostGIS Type + 2D X3D Type + 3D X3D Type + + + + + LINESTRING + not yet implemented - will be PolyLine2D + LineSet + + + MULTILINESTRING + not yet implemented - will be PolyLine2D + IndexedLineSet + + + MULTIPOINT + Polypoint2D + PointSet + + + POINT + outputs the space delimited coordinates + outputs the space delimited coordinates + + + (MULTI) POLYGON, POLYHEDRALSURFACE + Invalid X3D markup + IndexedFaceSet (inner rings currently output as another faceset) + + + TIN + TriangleSet2D (Not Yet Implemented) + IndexedTriangleSet + + + + + 2D geometry support not yet complete. Inner rings currently just drawn as separate polygons. We are working on these. + Lots of advancements happening in 3D space particularly with X3D Integration with HTML5 + There is also a nice open source X3D viewer you can use to view rendered geometries. Free Wrl http://freewrl.sourceforge.net/ binaries available for Mac, Linux, and Windows. Use the FreeWRL_Launcher packaged to view the geometries. + Availability: 2.0.0: ISO-IEC-19776-1.2-X3DEncodings-XML + + &Z_support; + + &P_support; + + + &T_support; + + + + + Example: Create a fully functional X3D document - This will generate a cube that is viewable in FreeWrl and other X3D viewers. + + + + + + + + + ' || + ST_AsX3D( ST_GeomFromEWKT('POLYHEDRALSURFACE( ((0 0 0, 0 0 1, 0 1 1, 0 1 0, 0 0 0)), +((0 0 0, 0 1 0, 1 1 0, 1 0 0, 0 0 0)), ((0 0 0, 1 0 0, 1 0 1, 0 0 1, 0 0 0)), +((1 1 0, 1 1 1, 1 0 1, 1 0 0, 1 1 0)), +((0 1 0, 0 1 1, 1 1 1, 1 1 0, 0 1 0)), ((0 0 1, 1 0 1, 1 1 1, 0 1 1, 0 0 1)) )')) || + ' + + +' As x3ddoc;]]> + + x3ddoc + -------- + + + + + + + + + + + + + + + +]]> + + + Example: An Octagon elevated 3 Units and decimal precision of 6 + SELECT ST_AsX3D( +ST_Translate( + ST_Force_3d( + ST_Buffer(ST_Point(10,10),5, 'quad_segs=2')), 0,0, + 3) + ,6) As x3dfrag; + +x3dfrag +-------- + + +]]> + + + Example: TIN + + + x3dfrag + -------- +]]> + + + Example: Closed multilinestring (the boundary of a polygon with holes) + + x3dfrag + -------- + + + ]]> + + @@ -725,12 +931,8 @@ text ST_GeoHash - geometry g1 - - - text ST_GeoHash - geometry g1 - integer precision + geometry geom + integer maxchars=full_precision_of_point @@ -740,9 +942,9 @@ Return a GeoHash representation (geohash.org) of the geometry. A GeoHash encodes a point into a text form that is sortable and searchable based on prefixing. A shorter GeoHash is a less precise representation of a point. It can also be thought of as a box, that contains the actual point. - The one-parameter variant of ST_GeoHash returns a GeoHash based on the input geometry type. Points return a GeoHash with 20 characters of precision (about enough to hold the full double precision of the input). Other types return a GeoHash with a variable amount of precision, based on the size of the feature. Larger features are represented with less precision, smaller features with more precision. The idea is that the box implied by the GeoHash will always contain the input feature. + If no maxchars is specficified ST_GeoHash returns a GeoHash based on full precision of the input geometry type. Points return a GeoHash with 20 characters of precision (about enough to hold the full double precision of the input). Other types return a GeoHash with a variable amount of precision, based on the size of the feature. Larger features are represented with less precision, smaller features with more precision. The idea is that the box implied by the GeoHash will always contain the input feature. - The two-parameter variant of ST_GeoHash returns a GeoHash with a requested precision. For non-points, the starting point of the calculation is the center of the bounding box of the geometry. + If maxchars is specified ST_GeoHash returns a GeoHash with at most that many characters so a possibly lower precision representation of the input geometry. For non-points, the starting point of the calculation is the center of the bounding box of the geometry. Availability: 1.4.0 @@ -841,4 +1043,103 @@ + + + + ST_AsLatLonText + Return the Degrees, Minutes, Seconds representation of the given point. + + + + + + text ST_AsLatLonText + geometry pt + + + text ST_AsLatLonText + geometry pt + text format + + + + + + Description + + Returns the Degrees, Minutes, Seconds representation of the point. + + + It is assumed the point is in a lat/lon projection. The X (lon) and Y (lat) coordinates are normalized in the output + to the "normal" range (-180 to +180 for lon, -90 to +90 for lat). + + + The text parameter is a format string containing the format for the resulting text, similar to a date format string. Valid tokens + are "D" for degrees, "M" for minutes, "S" for seconds, and "C" for cardinal direction (NSEW). DMS tokens may be repeated to indicate + desired width and precision ("SSS.SSSS" means " 1.0023"). + + + "M", "S", and "C" are optional. If "C" is omitted, degrees are + shown with a "-" sign if south or west. If "S" is omitted, minutes will be shown as decimal with as many digits of precision + as you specify. If "M" is also omitted, degrees are shown as decimal with as many digits precision as you specify. + + + If the format string is omitted (or zero-length) a default format will be used. + + + + + Availability: 2.0 + + + + + Examples +Default format. + +SELECT (ST_AsLatLonText('POINT (-3.2342342 -2.32498)')); + st_aslatlontext +---------------------------- + 2°19'29.928"S 3°14'3.243"W + +Providing a format (same as the default). + +SELECT (ST_AsLatLonText('POINT (-3.2342342 -2.32498)', 'D°M''S.SSS"C')); + st_aslatlontext +---------------------------- + 2°19'29.928"S 3°14'3.243"W + +Characters other than D, M, S, C and . are just passed through. + +SELECT (ST_AsLatLonText('POINT (-3.2342342 -2.32498)', 'D degrees, M minutes, S seconds to the C')); + st_aslatlontext +-------------------------------------------------------------------------------------- + 2 degrees, 19 minutes, 30 seconds to the S 3 degrees, 14 minutes, 3 seconds to the W + +Signed degrees instead of cardinal directions. + +SELECT (ST_AsLatLonText('POINT (-3.2342342 -2.32498)', 'D°M''S.SSS"')); + st_aslatlontext +---------------------------- + -2°19'29.928" -3°14'3.243" + +Decimal degrees. + +SELECT (ST_AsLatLonText('POINT (-3.2342342 -2.32498)', 'D.DDDD degrees C')); + st_aslatlontext +----------------------------------- + 2.3250 degrees S 3.2342 degrees W + +Excessively large values are normalized. + +SELECT (ST_AsLatLonText('POINT (-302.2342342 -792.32498)')); + st_aslatlontext +------------------------------- + 72°19'29.928"S 57°45'56.757"E + + + + + + diff -Nru postgis-1.5.3/doc/reference_processing.xml postgis-2.0.1/doc/reference_processing.xml --- postgis-1.5.3/doc/reference_processing.xml 2010-11-02 14:22:54.000000000 +0000 +++ postgis-2.0.1/doc/reference_processing.xml 2012-06-10 06:26:30.000000000 +0000 @@ -1,6 +1,6 @@ - Geometry Processing Functions + Geometry Processing ST_Buffer @@ -51,6 +51,7 @@ Geometry: Calculations are in the Spatial Reference System of the geometry. Introduced in 1.5 support for different end cap and mitre settings to control shape. + Negative radii: For polygons, a negative radius can be used, which will shrink the polygon rather than expanding it. Geography: For geography this is really a thin wrapper around the geometry implementation. It first determines the best SRID that fits the bounding box of the geography object (favoring UTM, Lambert Azimuthal Equal Area (LAEA) north/south pole, and falling back on mercator in worst case scenario) and then buffers in that planar spatial ref and retransforms back to WGS84 geography. @@ -62,16 +63,16 @@ The optional third parameter (currently only applies to geometry) can either specify number of segments used to approximate a quarter circle (integer case, defaults to 8) or a list of blank-separated key=value pairs (string case) to tweak operations as follows: -'quad_segs=#' : number of segments used to approximate a quarter circle (defaults to 8). +'quad_segs=#' : number of segments used to approximate a quarter circle (defaults to 8). -'endcap=round|flat|square' : endcap style (defaults to "round", needs GEOS-3.2 or higher for a different value). 'butt' is also accepted as a synonym for 'flat'. +'endcap=round|flat|square' : endcap style (defaults to "round", needs GEOS-3.2 or higher for a different value). 'butt' is also accepted as a synonym for 'flat'. -'join=round|mitre|bevel' : join style (defaults to "round", needs GEOS-3.2 or higher for a different value). 'miter' is also accepted as a synonym for 'mitre'. +'join=round|mitre|bevel' : join style (defaults to "round", needs GEOS-3.2 or higher for a different value). 'miter' is also accepted as a synonym for 'mitre'. -'mitre_limit=#.#' : mitre ratio limit (only affects mitred join style). 'miter_limit' is also accepted as a synonym for 'mitre_limit'. +'mitre_limit=#.#' : mitre ratio limit (only affects mitered join style). 'miter_limit' is also accepted as a synonym for 'mitre_limit'. @@ -251,28 +252,6 @@ 957.59057465 900808.759918696,235886.879896532 900838.049240578,235857.59057465 900908.759918696,235886.879896532 900979.470596815,235957.59057465 901008.759918 696,236028.301252769 900979.470596815,236057.59057465 900908.759918696)) - ---Buffer is often also used as a poor man's polygon fixer or a sometimes speedier unioner ---Sometimes able to fix invalid polygons - using below --- using below on anything but a polygon will result in empty geometry --- and for geometry collections kill anything in the collection that is not a polygon ---Poor man's bad poly fixer -SELECT ST_IsValid(foo.invalidpoly) as isvalid, ST_IsValid(ST_Buffer(foo.invalidpoly,0.0)) as bufferisvalid, -ST_AsText(ST_Buffer(foo.invalidpoly,0.0)) As newpolytextrep -FROM (SELECT ST_GeomFromText('POLYGON((-1 2, 3 4, 5 6, -1 2, 5 6, -1 2))') as invalidpoly) As foo -NOTICE: Self-intersection at or near point -1 2 -isvalid | bufferisvalid | newpolytextrep ----------+---------------+------------------------------ -f | t | POLYGON((-1 2,5 6,3 4,-1 2)) - ---Poor man's polygon unioner -SELECT ST_AsText(the_geom) as textorig, ST_AsText(ST_Buffer(foo.the_geom,0.0)) As textbuffer -FROM (SELECT ST_Collect('POLYGON((-1 2, 3 4, 5 6, -1 2))', 'POLYGON((-1 2, 2 3, 5 6, -1 2))') As the_geom) as foo; - textorig | textbuffer ------------------------------------------------------------+-------------------- -MULTIPOLYGON(((-1 2,3 4,5 6,-1 2)),((-1 2,2 3,5 6,-1 2))) | POLYGON((-1 2,5 6,3 4,2 3,-1 2)) - - @@ -309,6 +288,11 @@ form polygons NULL is returned. The inputs can be LINESTRINGS, MULTILINESTRINGS, POLYGONS, MULTIPOLYGONS, and GeometryCollections. This function will assume all inner geometries represent holes + + + Input linework must be correctly noded for this function to work properly + + Availability: 1.1.0 - requires GEOS >= 2.1.0. @@ -374,6 +358,8 @@ See Also + , + , , wrappers to this function with standard OGC interface @@ -441,17 +427,15 @@ Examples - Aggregate example - Thread ref: http://postgis.refractions.net/pipermail/postgis-users/2008-June/020331.html -SELECT stusps, + Aggregate example (http://postgis.refractions.net/pipermail/postgis-users/2008-June/020331.html) + SELECT stusps, ST_Multi(ST_Collect(f.the_geom)) as singlegeom FROM (SELECT stusps, (ST_Dump(the_geom)).geom As the_geom FROM somestatetable ) As f GROUP BY stusps Non-Aggregate example - Thread ref: http://postgis.refractions.net/pipermail/postgis-users/2008-June/020331.html -SELECT ST_AsText(ST_Collect(ST_GeomFromText('POINT(1 2)'), + SELECT ST_AsText(ST_Collect(ST_GeomFromText('POINT(1 2)'), ST_GeomFromText('POINT(-2 3)') )); st_astext @@ -498,7 +482,211 @@ , + + + ST_ConcaveHull + The concave hull of a geometry represents a possibly concave + geometry that encloses all geometries within the set. You can think of it as shrink wrapping. + + + + + + geometry ST_ConcaveHull + geometry geomA + float target_percent + boolean allow_holes=false + + + + + + Description + The concave hull of a geometry represents a possibly concave + geometry that encloses all geometries within the set. Defaults to false for allowing polygons with holes. + The result is never higher than a single polygon. + + The target_percent is the target percent of area of convex hull the PostGIS solution will try to approach before giving up or exiting. + One can think of the concave hull as the geometry you get by vacuum sealing a set of geometries. The + target_percent of 1 will give you the same answer as the convex hull. A target_percent + between 0 and 0.99 will give you something that should have a smaller area than the convex hull. This is different from a convex hull which is more like wrapping a rubber band around the set of geometries. + + It is usually used with MULTI and Geometry Collections. + Although it is not an aggregate - you can use it in conjunction + with ST_Collect or ST_Union to get the concave hull of a set of points/linestring/polygons + ST_ConcaveHull(ST_Collect(somepointfield), 0.80). + + It is much slower to compute than convex hull but encloses the geometry better and is also useful for + image recognition. + + Performed by the GEOS module + Note - If you are using with points, linestrings, or geometry collections use ST_Collect. If you are using with polygons, use ST_Union since + it may fail with invalid geometries. + + Note - The smaller you make the target percent, the longer it takes to process the concave hull and more likely to run into topological exceptions. Also the more + floating points and number of points you accrue. First try a 0.99 which does a first hop, is usually very fast, sometimes as fast as computing the convex hull, and usually gives much better than 99% of shrink since it almost always overshoots. Second hope of 0.98 it slower, others get slower usually quadratically. + To reduce precision and float points, use or after ST_ConcaveHull. ST_SnapToGrid is a bit faster, but + could result in invalid geometries where as ST_SimplifyPreserveTopology almost always preserves the validity of the geometry. + + More real world examples and brief explanation of the technique are shown http://www.bostongis.com/postgis_concavehull.snippet + + Also check out Simon Greener's article on demonstrating ConcaveHull introduced in Oracle 11G R2. http://www.spatialdbadvisor.com/oracle_spatial_tips_tricks/172/concave-hull-geometries-in-oracle-11gr2. + The solution we get at 0.75 target percent of convex hull is similar to the shape Simon gets with Oracle SDO_CONCAVEHULL_BOUNDARY. + + Availability: 2.0.0 + + + + Examples + +--Get estimate of infected area based on point observations +SELECT d.disease_type, + ST_ConcaveHull(ST_Collect(d.pnt_geom), 0.99) As geom + FROM disease_obs As d + GROUP BY d.disease_type; + + + + + + + + + + + + + + +-- geometries overlaid with concavehull +-- at target 100% shrink (this is the same as convex hull - since no shrink) +SELECT + ST_ConcaveHull( + ST_Union(ST_GeomFromText('POLYGON((175 150, 20 40, + 50 60, 125 100, 175 150))'), + ST_Buffer(ST_GeomFromText('POINT(110 170)'), 20) + ), 1) + As convexhull; + + + + + + + + + + + +-- geometries overlaid with concavehull at target 90% shrink +SELECT + ST_ConcaveHull( + ST_Union(ST_GeomFromText('POLYGON((175 150, 20 40, + 50 60, 125 100, 175 150))'), + ST_Buffer(ST_GeomFromText('POINT(110 170)'), 20) + ), 0.9) + As target_90; + + + + + + + + + + + + + +-- this produces a table of 42 points that form an L shape +SELECT (ST_DumpPoints(ST_GeomFromText( +'MULTIPOINT(14 14,34 14,54 14,74 14,94 14,114 14,134 14, +150 14,154 14,154 6,134 6,114 6,94 6,74 6,54 6,34 6, +14 6,10 6,8 6,7 7,6 8,6 10,6 30,6 50,6 70,6 90,6 110,6 130, +6 150,6 170,6 190,6 194,14 194,14 174,14 154,14 134,14 114, +14 94,14 74,14 54,14 34,14 14)'))).geom + INTO TABLE l_shape; +SELECT ST_ConvexHull(ST_Collect(geom)) +FROM l_shape; + + + + + + + + + + + +SELECT ST_ConcaveHull(ST_Collect(geom), 0.99) + FROM l_shape; + + + + + + + + + + + + + + -- Concave Hull L shape points + -- at target 80% of convexhull + SELECT ST_ConcaveHull(ST_Collect(geom), 0.80) + FROM l_shape; + + + + + + + + + + + + + + + + + + + + + +SELECT ST_ConcaveHull(ST_GeomFromText('MULTILINESTRING((106 164,30 112,74 70,82 112,130 94, + 130 62,122 40,156 32,162 76,172 88), +(132 178,134 148,128 136,96 128,132 108,150 130, +170 142,174 110,156 96,158 90,158 88), +(22 64,66 28,94 38,94 68,114 76,112 30, +132 10,168 18,178 34,186 52,184 74,190 100, +190 122,182 148,178 170,176 184,156 164,146 178, +132 186,92 182,56 158,36 150,62 150,76 128,88 118))'),0.99) + + + + + + + + + + See Also + , , , + + + ST_ConvexHull @@ -521,7 +709,7 @@ geometry that encloses all geometries within the set. One can think of the convex hull as the geometry you get by wrapping an elastic - band around a set of geometries. This is different from a concave hull (not currently supported) + band around a set of geometries. This is different from a concave hull which is analogous to shrink-wrapping your geometries. It is usually used with MULTI and Geometry Collections. @@ -572,7 +760,7 @@ See Also - , + , , @@ -793,7 +981,7 @@ - geometry_dump[]ST_Dump + geometry_dump[] ST_Dump geometry g1 @@ -814,20 +1002,26 @@ reverse of a GROUP BY in that it creates new rows. For example it can be use to expand MULTIPOLYGONS into POLYGONS. + Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced. Availability: PostGIS 1.0.0RC1. Requires PostgreSQL 7.3 or higher. + Prior to 1.3.4, this function crashes if used with geometries that contain CURVES. This is fixed in 1.3.4+ - &Z_support; - &curve_support; + + + &curve_support; + &P_support; + &T_support; + &Z_support; - Examples + Standard Examples SELECT sometable.field1, sometable.field1, (ST_Dump(sometable.the_geom)).geom AS the_geom FROM sometable; ---Break a compound curve into its constituent linestrings and circularstrings +-- Break a compound curve into its constituent linestrings and circularstrings SELECT ST_AsEWKT(a.geom), ST_HasArc(a.geom) FROM ( SELECT (ST_Dump(p_geom)).geom AS geom FROM (SELECT ST_GeomFromEWKT('COMPOUNDCURVE(CIRCULARSTRING(0 0, 1 1, 1 0),(1 0, 0 1))') AS p_geom) AS b @@ -837,6 +1031,49 @@ CIRCULARSTRING(0 0,1 1,1 0) | t LINESTRING(1 0,0 1) | f (2 rows) + +Polyhedral Surfaces, TIN and Triangle Examples +-- Polyhedral surface example +-- Break a Polyhedral surface into its faces +SELECT (a.p_geom).path[1] As path, ST_AsEWKT((a.p_geom).geom) As geom_ewkt + FROM (SELECT ST_Dump(ST_GeomFromEWKT('POLYHEDRALSURFACE( +((0 0 0, 0 0 1, 0 1 1, 0 1 0, 0 0 0)), +((0 0 0, 0 1 0, 1 1 0, 1 0 0, 0 0 0)), ((0 0 0, 1 0 0, 1 0 1, 0 0 1, 0 0 0)), ((1 1 0, 1 1 1, 1 0 1, 1 0 0, 1 1 0)), +((0 1 0, 0 1 1, 1 1 1, 1 1 0, 0 1 0)), ((0 0 1, 1 0 1, 1 1 1, 0 1 1, 0 0 1)) +)') ) AS p_geom ) AS a; + + path | geom_ewkt +------+------------------------------------------ + 1 | POLYGON((0 0 0,0 0 1,0 1 1,0 1 0,0 0 0)) + 2 | POLYGON((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)) + 3 | POLYGON((0 0 0,1 0 0,1 0 1,0 0 1,0 0 0)) + 4 | POLYGON((1 1 0,1 1 1,1 0 1,1 0 0,1 1 0)) + 5 | POLYGON((0 1 0,0 1 1,1 1 1,1 1 0,0 1 0)) + 6 | POLYGON((0 0 1,1 0 1,1 1 1,0 1 1,0 0 1)) + +-- TIN -- +SELECT (g.gdump).path, ST_AsEWKT((g.gdump).geom) as wkt + FROM + (SELECT + ST_Dump( ST_GeomFromEWKT('TIN ((( + 0 0 0, + 0 0 1, + 0 1 0, + 0 0 0 + )), (( + 0 0 0, + 0 1 0, + 1 1 0, + 0 0 0 + )) + )') ) AS gdump + ) AS g; +-- result -- + path | wkt +------+------------------------------------- + {1} | TRIANGLE((0 0 0,0 0 1,0 1 0,0 0 0)) + {2} | TRIANGLE((0 0 0,0 1 0,1 1 0,0 0 0)) + See Also @@ -872,18 +1109,19 @@ For example, if a LINESTRING is supplied, a path of {i} is returned where i is the nth coordinate in the LINESTRING. If a POLYGON is supplied, a path of {i,j} is returned where - i is the outer ring followed by the inner rings and j - enumerates the POINTs. + i is the ring number (1 is outer; inner rings follow) and j + enumerates the POINTs (again 1-based index). - + Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced. Availability: 1.5.0 - - &Z_support; &curve_support; + &P_support; + &T_support; + &Z_support; - Examples + Standard Geometry Examples @@ -946,6 +1184,101 @@ {5,2,1,4} | POINT(5 4) (29 rows) + + Polyhedral Surfaces, TIN and Triangle Examples + -- Polyhedral surface cube -- +SELECT (g.gdump).path, ST_AsEWKT((g.gdump).geom) as wkt + FROM + (SELECT + ST_DumpPoints(ST_GeomFromEWKT('POLYHEDRALSURFACE( ((0 0 0, 0 0 1, 0 1 1, 0 1 0, 0 0 0)), +((0 0 0, 0 1 0, 1 1 0, 1 0 0, 0 0 0)), ((0 0 0, 1 0 0, 1 0 1, 0 0 1, 0 0 0)), +((1 1 0, 1 1 1, 1 0 1, 1 0 0, 1 1 0)), +((0 1 0, 0 1 1, 1 1 1, 1 1 0, 0 1 0)), ((0 0 1, 1 0 1, 1 1 1, 0 1 1, 0 0 1)) )') ) AS gdump + ) AS g; +-- result -- + path | wkt +---------+-------------- + {1,1,1} | POINT(0 0 0) + {1,1,2} | POINT(0 0 1) + {1,1,3} | POINT(0 1 1) + {1,1,4} | POINT(0 1 0) + {1,1,5} | POINT(0 0 0) + {2,1,1} | POINT(0 0 0) + {2,1,2} | POINT(0 1 0) + {2,1,3} | POINT(1 1 0) + {2,1,4} | POINT(1 0 0) + {2,1,5} | POINT(0 0 0) + {3,1,1} | POINT(0 0 0) + {3,1,2} | POINT(1 0 0) + {3,1,3} | POINT(1 0 1) + {3,1,4} | POINT(0 0 1) + {3,1,5} | POINT(0 0 0) + {4,1,1} | POINT(1 1 0) + {4,1,2} | POINT(1 1 1) + {4,1,3} | POINT(1 0 1) + {4,1,4} | POINT(1 0 0) + {4,1,5} | POINT(1 1 0) + {5,1,1} | POINT(0 1 0) + {5,1,2} | POINT(0 1 1) + {5,1,3} | POINT(1 1 1) + {5,1,4} | POINT(1 1 0) + {5,1,5} | POINT(0 1 0) + {6,1,1} | POINT(0 0 1) + {6,1,2} | POINT(1 0 1) + {6,1,3} | POINT(1 1 1) + {6,1,4} | POINT(0 1 1) + {6,1,5} | POINT(0 0 1) +(30 rows) +-- Triangle -- +SELECT (g.gdump).path, ST_AsText((g.gdump).geom) as wkt + FROM + (SELECT + ST_DumpPoints( ST_GeomFromEWKT('TRIANGLE (( + 0 0, + 0 9, + 9 0, + 0 0 + ))') ) AS gdump + ) AS g; +-- result -- + path | wkt +------+------------ + {1} | POINT(0 0) + {2} | POINT(0 9) + {3} | POINT(9 0) + {4} | POINT(0 0) + +-- TIN -- +SELECT (g.gdump).path, ST_AsEWKT((g.gdump).geom) as wkt + FROM + (SELECT + ST_DumpPoints( ST_GeomFromEWKT('TIN ((( + 0 0 0, + 0 0 1, + 0 1 0, + 0 0 0 + )), (( + 0 0 0, + 0 1 0, + 1 1 0, + 0 0 0 + )) + )') ) AS gdump + ) AS g; +-- result -- + path | wkt +---------+-------------- + {1,1,1} | POINT(0 0 0) + {1,1,2} | POINT(0 0 1) + {1,1,3} | POINT(0 1 0) + {1,1,4} | POINT(0 0 0) + {2,1,1} | POINT(0 0 0) + {2,1,2} | POINT(0 1 0) + {2,1,3} | POINT(1 1 0) + {2,1,4} | POINT(0 0 0) +(8 rows) + + See Also , , , @@ -1015,6 +1348,47 @@ , , , , + + + + ST_FlipCoordinates + Returns a version of the given geometry with + X and Y axis flipped. Useful for people + who have built latitude/longitude features + and need to fix them. + + + + + + geometry ST_FlipCoordinates + geometry geom + + + + + + Description + Returns a version of the given geometry with X and Y axis flipped. + &curve_support; + &Z_support; + &M_support; + Availability: 2.0.0 + &P_support; + &T_support; + + + + Example + + + + @@ -1155,16 +1529,16 @@ SELECT ST_AsText(ST_LineToCurve(foo.the_geom)) As curvedastext,ST_AsText(foo.the_geom) As non_curvedastext FROM (SELECT ST_Buffer('POINT(1 3)'::geometry, 3) As the_geom) As foo; -curvedatext non_curvedastext -------------------------------------------------------------------| ----------------------------------------------------------------- -CURVEPOLYGON(CIRCULARSTRING(4 3,3.12132034355964 0.878679656440359, | POLYGON((4 3,3.94235584120969 2.41472903395162,3.77163859753386 1.85194970290473 -1 0,-1.12132034355965 5.12132034355963,4 3)) | ,3.49440883690764 1.33328930094119,3.12132034355964 0.878679656440359, - | 2.66671069905881 0.505591163092366,2.14805029709527 0.228361402466141, - | 1.58527096604839 0.0576441587903094,1 0, - | 0.414729033951621 0.0576441587903077,-0.148050297095264 0.228361402466137, - | -0.666710699058802 0.505591163092361,-1.12132034355964 0.878679656440353, - | -1.49440883690763 1.33328930094119,-1.77163859753386 1.85194970290472 - | --ETC-- ,3.94235584120969 3.58527096604839,4 3)) +curvedatext non_curvedastext +--------------------------------------------------------------------|----------------------------------------------------------------- +CURVEPOLYGON(CIRCULARSTRING(4 3,3.12132034355964 0.878679656440359, | POLYGON((4 3,3.94235584120969 2.41472903395162,3.77163859753386 1.85194970290473, +1 0,-1.12132034355965 5.12132034355963,4 3)) | 3.49440883690764 1.33328930094119,3.12132034355964 0.878679656440359, + | 2.66671069905881 0.505591163092366,2.14805029709527 0.228361402466141, + | 1.58527096604839 0.0576441587903094,1 0, + | 0.414729033951621 0.0576441587903077,-0.148050297095264 0.228361402466137, + | -0.666710699058802 0.505591163092361,-1.12132034355964 0.878679656440353, + | -1.49440883690763 1.33328930094119,-1.77163859753386 1.85194970290472 + | --ETC-- ,3.94235584120969 3.58527096604839,4 3)) --3D example SELECT ST_AsEWKT(ST_LineToCurve(ST_GeomFromEWKT('LINESTRING(1 2 3, 3 4 8, 5 6 4, 7 8 4, 9 10 4)'))); @@ -1182,6 +1556,58 @@ + + + + ST_MakeValid + Attempts to make an invalid geometry valid w/out loosing vertices. + + + + + + geometry ST_MakeValid + geometry input + + + + + + Description + + The function attempts to create a valid representation of a given invalid + geometry without loosing any of the input vertices. + Already-valid geometries are returned w/out further intervention. + + + + Supported inputs are: LINESTRINGS, MULTILINESTRINGS, POLYGONS, MULTIPOLYGONS. + + + + In case of full or partial dimensional collapses, the output geometry + may be a collection of lower-to-equal dimension geometries or a + geometry of lower dimension. + + + + Single polygons may become multi-geometries in case of self-intersections. + + + Availability: 2.0.0, requires GEOS-3.3.0 or higher. + + &Z_support; + + + + + See Also + + + + + + @@ -1243,11 +1669,7 @@ geometry ST_MinimumBoundingCircle geometry geomA - - - geometry ST_MinimumBoundingCircle - geometry geomA - integer num_segs_per_qt_circ + integer num_segs_per_qt_circ=48 @@ -1259,7 +1681,7 @@ It is often used with MULTI and Geometry Collections. Although it is not an aggregate - you can use it in conjunction - with ST_Collect to get the minimum bounding cirlce of a set of geometries. + with ST_Collect to get the minimum bounding circle of a set of geometries. ST_MinimumBoundingCircle(ST_Collect(somepointfield)).The ratio of the area of a polygon divided by the area of its Minimum Bounding Circle is often referred to as the Roeck test. @@ -1338,6 +1760,11 @@ Geometry Collections are often difficult to deal with with third party tools, so use ST_Polygonize in conjunction with to dump the polygons out into individual polygons. + + + Input linework must be correctly noded for this function to work properly + + Availability: 1.0.0RC1 - requires GEOS >= 2.1.0. @@ -1373,9 +1800,447 @@ See Also - + + , + + + + + + ST_Node + + +Node a set of linestrings. + + + + + + + geometry ST_Node + geometry geom + + + + + + + Description + + +Fully node a set of linestrings using the least possible number of nodes +while preserving all of the input ones. + + + &Z_support; + + Availability: 2.0.0 - requires GEOS >= 3.3.0. + + +Due to a bug in GEOS up to 3.3.1 this function fails to node self-intersecting +lines. This is fixed with GEOS 3.3.2 or higher. + + + + Examples + +SELECT ST_AsEWKT( + ST_Node('LINESTRINGZ(0 0 0, 10 10 10, 0 10 5, 10 0 3)'::geometry) + ) As output; +output +----------- +MULTILINESTRING((0 0 0,5 5 4.5),(5 5 4.5,10 10 10,0 10 5,5 5 4.5),(5 5 4.5,10 0 3)) + + + + + + See Also + + + + + + + + + + ST_OffsetCurve + + +Return an offset line at a given distance and side from an input line. Useful for computing parallel lines about a center line + + + + + + + + geometry ST_OffsetCurve + geometry line + float signed_distance + text style_parameters='' + + + + + + + Description + + +Return an offset line at a given distance and side from an input line. +All points of the returned geometries are not further than the given +distance from the input geometry. + + + +For positive distance the offset will be at the left side of the input line +and retain the same direction. For a negative distance it'll be at the right +side and in the opposite direction. + + + +Availability: 2.0 - requires GEOS >= 3.2, improved with GEOS >= 3.3 + + + +The optional third parameter allows specifying a list of blank-separated +key=value pairs to tweak operations as follows: + + +'quad_segs=#' : number of segments used to approximate a quarter circle (defaults to 8). + + +'join=round|mitre|bevel' : join style (defaults to "round"). 'miter' is also accepted as a synonym for 'mitre'. + + +'mitre_limit=#.#' : mitre ratio limit (only affects mitred join style). 'miter_limit' is also accepted as a synonym for 'mitre_limit'. + + + + + +Units of distance are measured in units of the spatial reference system. + + + The inputs can only be LINESTRINGS. + + Performed by the GEOS module. + + +This function ignores the third dimension (z) and will always give a +2-d result even when presented with a 3d-geometry. + + + + + Examples +Compute an open buffer around roads + +SELECT ST_Union( + ST_OffsetCurve(f.the_geom, f.width/2, 'quad_segs=4 join=round'), + ST_OffsetCurve(f.the_geom, -f.width/2, 'quad_segs=4 join=round') +) as track +FROM someroadstable; + + + + + + + + + + + + + + + +SELECT ST_AsText(ST_OffsetCurve(ST_GeomFromText( +'LINESTRING(164 16,144 16,124 16,104 16,84 16,64 16, + 44 16,24 16,20 16,18 16,17 17, + 16 18,16 20,16 40,16 60,16 80,16 100, + 16 120,16 140,16 160,16 180,16 195)'), + 15, 'quad_segs=4 join=round')); +--output -- +LINESTRING(164 1,18 1,12.2597485145237 2.1418070123307, + 7.39339828220179 5.39339828220179, + 5.39339828220179 7.39339828220179, + 2.14180701233067 12.2597485145237,1 18,1 195) + + + + + + + + + + + +SELECT ST_AsText(ST_OffsetCurve(geom, + -15, 'quad_segs=4 join=round')) As notsocurvy + FROM ST_GeomFromText( +'LINESTRING(164 16,144 16,124 16,104 16,84 16,64 16, + 44 16,24 16,20 16,18 16,17 17, + 16 18,16 20,16 40,16 60,16 80,16 100, + 16 120,16 140,16 160,16 180,16 195)') As geom; +-- notsocurvy -- +LINESTRING(31 195,31 31,164 31) + + + + + + + + + + + + + +SELECT ST_AsText(ST_OffsetCurve(ST_OffsetCurve(geom, + -30, 'quad_segs=4 join=round'), -15, 'quad_segs=4 join=round')) As morecurvy + FROM ST_GeomFromText( +'LINESTRING(164 16,144 16,124 16,104 16,84 16,64 16, + 44 16,24 16,20 16,18 16,17 17, + 16 18,16 20,16 40,16 60,16 80,16 100, + 16 120,16 140,16 160,16 180,16 195)') As geom; +-- morecurvy -- +LINESTRING(164 31,46 31,40.2597485145236 32.1418070123307, +35.3933982822018 35.3933982822018, +32.1418070123307 40.2597485145237,31 46,31 195) + + + + + + + + + + + SELECT ST_AsText(ST_Collect( + ST_OffsetCurve(geom, 15, 'quad_segs=4 join=round'), + ST_OffsetCurve(ST_OffsetCurve(geom, + -30, 'quad_segs=4 join=round'), -15, 'quad_segs=4 join=round') + ) +) As parallel_curves + FROM ST_GeomFromText( +'LINESTRING(164 16,144 16,124 16,104 16,84 16,64 16, + 44 16,24 16,20 16,18 16,17 17, + 16 18,16 20,16 40,16 60,16 80,16 100, + 16 120,16 140,16 160,16 180,16 195)') As geom; +-- parallel curves -- +MULTILINESTRING((164 1,18 1,12.2597485145237 2.1418070123307, +7.39339828220179 5.39339828220179,5.39339828220179 7.39339828220179, +2.14180701233067 12.2597485145237,1 18,1 195), +(164 31,46 31,40.2597485145236 32.1418070123307,35.3933982822018 35.3933982822018, +32.1418070123307 40.2597485145237,31 46,31 195)) + + + + + + + + + + + + + +SELECT ST_AsText(ST_OffsetCurve(ST_GeomFromText( +'LINESTRING(164 16,144 16,124 16,104 16,84 16,64 16, + 44 16,24 16,20 16,18 16,17 17, + 16 18,16 20,16 40,16 60,16 80,16 100, + 16 120,16 140,16 160,16 180,16 195)'), + 15, 'quad_segs=4 join=bevel')); +-- output -- +LINESTRING(164 1,18 1,7.39339828220179 5.39339828220179, + 5.39339828220179 7.39339828220179,1 18,1 195) + + + + + + + + + + + + +SELECT ST_AsText(ST_Collect( + ST_OffsetCurve(geom, 15, 'quad_segs=4 join=mitre mitre_limit=2.2'), + ST_OffsetCurve(geom, -15, 'quad_segs=4 join=mitre mitre_limit=2.2') + ) ) + FROM ST_GeomFromText( +'LINESTRING(164 16,144 16,124 16,104 16,84 16,64 16, + 44 16,24 16,20 16,18 16,17 17, + 16 18,16 20,16 40,16 60,16 80,16 100, + 16 120,16 140,16 160,16 180,16 195)') As geom; +-- output -- +MULTILINESTRING((164 1,11.7867965644036 1,1 11.7867965644036,1 195), + (31 195,31 31,164 31)) + + + + + + + + + + + See Also + + + + + + + ST_RemoveRepeatedPoints + Returns a version of the given geometry with + duplicated points removed. + + + + + + geometry ST_RemoveRepeatedPoints + geometry geom + + + + + + Description + Returns a version of the given geometry with + duplicated points removed. Will actually do something only with + (multi)lines, (multi)polygons and multipoints but you can safely call it with + any kind of geometry. Since simplification occurs on a + object-by-object basis you can also feed a GeometryCollection to + this function. + + Availability: 2.0.0 + &P_support; + &Z_support; + + + + See Also + + + + + + + ST_SharedPaths + Returns a collection containing paths shared by the two input linestrings/multilinestrings. + + + + + + geometry ST_SharedPaths + geometry lineal1 + geometry lineal2 + + + + + + Description + Returns a collection containing paths shared by the two input geometries. + Those going in the same direction are in the first element of the collection, those going in the opposite direction are in the second element. + The paths themselves are given in the direction of the first geometry. + + + Availability: 2.0.0 requires GEOS >= 3.3.0. + + + Examples: Finding shared paths + + + + + + + + + + + + + + + + + + + + + + + + + SELECT ST_AsText( + ST_SharedPaths( + ST_GeomFromText('MULTILINESTRING((26 125,26 200,126 200,126 125,26 125), + (51 150,101 150,76 175,51 150))'), + ST_GeomFromText('LINESTRING(151 100,126 156.25,126 125,90 161, 76 175)') + ) + ) As wkt + + wkt +------------------------------------------------------------- +GEOMETRYCOLLECTION(MULTILINESTRING((126 156.25,126 125), + (101 150,90 161),(90 161,76 175)),MULTILINESTRING EMPTY) + + + + + + + +-- same example but linestring orientation flipped +SELECT ST_AsText( + ST_SharedPaths( + ST_GeomFromText('LINESTRING(76 175,90 161,126 125,126 156.25,151 100)'), + ST_GeomFromText('MULTILINESTRING((26 125,26 200,126 200,126 125,26 125), + (51 150,101 150,76 175,51 150))') + ) + ) As wkt + + wkt +------------------------------------------------------------- +GEOMETRYCOLLECTION(MULTILINESTRING EMPTY, +MULTILINESTRING((76 175,90 161),(90 161,101 150),(126 125,126 156.25))) + + + + + + + + + + See Also + + , + , + + + + @@ -1410,6 +2275,9 @@ &Z_support; + Enhanced: 2.0.0 support for Polyhedral surfaces and TIN was introduced. + &P_support; + &T_support; @@ -1547,6 +2415,150 @@ + + + + ST_Split + Returns a collection of geometries resulting by splitting a geometry. + + + + + + geometry ST_Split + geometry input + geometry blade + + + + + + Description + + The function supports splitting a line by point, a line by line, a polygon by line. The returned geometry is always a collection. + + + + Think of this function as the opposite of ST_Union. + Theoretically applying ST_Union to the elements of the returned collection + should always yield the original geometry. + + + Availability: 2.0.0 + + + + Examples + Polygon Cut by Line + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +-- this creates a geometry collection consisting of the 2 halves of the polygon +-- this is similar to the example we demonstrated in ST_BuildArea +SELECT ST_Split(circle, line) +FROM (SELECT + ST_MakeLine(ST_MakePoint(10, 10),ST_MakePoint(190, 190)) As line, + ST_Buffer(ST_GeomFromText('POINT(100 90)'), 50) As circle) As foo; + +-- result -- + GEOMETRYCOLLECTION(POLYGON((150 90,149.039264020162 80.2454838991936,146.193976625564 70.8658283817455,..), POLYGON(..))) + +-- To convert to individual polygons, you can use ST_Dump or ST_GeometryN +SELECT ST_AsText((ST_Dump(ST_Split(circle, line))).geom) As wkt +FROM (SELECT + ST_MakeLine(ST_MakePoint(10, 10),ST_MakePoint(190, 190)) As line, + ST_Buffer(ST_GeomFromText('POINT(100 90)'), 50) As circle) As foo; + +-- result -- +wkt +--------------- +POLYGON((150 90,149.039264020162 80.2454838991936,..)) +POLYGON((60.1371179574584 60.1371179574584,58.4265193848728 62.2214883490198,53.8060233744357 ..)) + + Multilinestring Cut by point + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +SELECT ST_AsText(ST_Split(mline, pt)) As wktcut + FROM (SELECT + ST_GeomFromText('MULTILINESTRING((10 10, 190 190), (15 15, 30 30, 100 90))') As mline, + ST_Point(30,30) As pt) As foo; + +wktcut +------ +GEOMETRYCOLLECTION( + LINESTRING(10 10,30 30), + LINESTRING(30 30,190 190), + LINESTRING(15 15,30 30), + LINESTRING(30 30,100 90) +) + + + + See Also + , , , , + + @@ -1683,7 +2695,7 @@ Description - Output type can be a MULTI* , single geometry, or Geometry Collection. Comes in 2 variants. Variant 1 unions 2 geometries resulting in a new geomety with no intersecting regions. + Output type can be a MULTI*, single geometry, or Geometry Collection. Comes in 2 variants. Variant 1 unions 2 geometries resulting in a new geometry with no intersecting regions. Variant 2 is an aggregate function that takes a set of geometries and unions them into a single ST_Geometry resulting in no intersecting regions. @@ -1694,7 +2706,7 @@ functions do. Non-Aggregate version: This function returns a geometry being a union of two - input geometries. Output type can be a MULTI* ,NON-MULTI or + input geometries. Output type can be a MULTI*, NON-MULTI or GEOMETRYCOLLECTION. ST_Collect and ST_Union are often interchangeable. @@ -1787,7 +2799,66 @@ See Also - + + + + + + + + + + ST_UnaryUnion + + Like ST_Union, but working at the geometry component level. + + + + + + geometry ST_UnaryUnion + geometry geom + + + + + + + Description + + + Unlike ST_Union, ST_UnaryUnion does dissolve boundaries + between components of a multipolygon (invalid) + and does perform union between the components of a + geometrycollection. + Each components of the input geometry is assumed to be + valid, so you won't get a valid multipolygon out of a + bow-tie polygon (invalid). + + + + You may use this function to node a set of linestrings. + You may mix ST_UnaryUnion with ST_Collect to fine-tune + how many geometries at once you want to dissolve to + be nice on both memory size and CPU time, finding the + balance between ST_Union and ST_MemUnion. + + + &Z_support; + + Availability: 2.0.0 - requires GEOS >= 3.3.0. + + + + + + See Also + + + + + + diff -Nru postgis-1.5.3/doc/reference_raster.xml postgis-2.0.1/doc/reference_raster.xml --- postgis-1.5.3/doc/reference_raster.xml 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/reference_raster.xml 2012-06-18 22:44:40.000000000 +0000 @@ -0,0 +1,8176 @@ + + + Raster Reference + + The functions given below are the ones which a user of PostGIS Raster is + likely to need and which are currently available in PostGIS Raster. There are other functions which are required support + functions to the raster objects which are not of use to a general + user. + raster is a new PostGIS type for storing and analyzing raster data. + For loading rasters from raster files please refer to + + For the examples in this reference we will be using a raster table of dummy rasters - Formed with the following code +CREATE TABLE dummy_rast(rid integer, rast raster); +INSERT INTO dummy_rast(rid, rast) +VALUES (1, +('01' -- little endian (uint8 ndr) +|| +'0000' -- version (uint16 0) +|| +'0000' -- nBands (uint16 0) +|| +'0000000000000040' -- scaleX (float64 2) +|| +'0000000000000840' -- scaleY (float64 3) +|| +'000000000000E03F' -- ipX (float64 0.5) +|| +'000000000000E03F' -- ipY (float64 0.5) +|| +'0000000000000000' -- skewX (float64 0) +|| +'0000000000000000' -- skewY (float64 0) +|| +'00000000' -- SRID (int32 0) +|| +'0A00' -- width (uint16 10) +|| +'1400' -- height (uint16 20) +)::raster +), +-- Raster: 5 x 5 pixels, 3 bands, PT_8BUI pixel type, NODATA = 0 +(2, ('01000003009A9999999999A93F9A9999999999A9BF000000E02B274A' || +'41000000007719564100000000000000000000000000000000FFFFFFFF050005000400FDFEFDFEFEFDFEFEFDF9FAFEF' || +'EFCF9FBFDFEFEFDFCFAFEFEFE04004E627AADD16076B4F9FE6370A9F5FE59637AB0E54F58617087040046566487A1506CA2E3FA5A6CAFFBFE4D566DA4CB3E454C5665')::raster); + + + + This section lists the PostgreSQL data types specifically created to support raster functionality. + + + Raster Support Data types + + + + geomval + A spatial datatype with two fields - geom (holding a geometry object) + and val (holding a double precision pixel value from a raster band). + + + + Description + geomval is a compound data type consisting of a geometry object referenced by the .geom field + and val, a double precision value that represents the pixel value at a particular geometric location in a raster band. + It is used by the ST_DumpAsPolygon and Raster intersection family of functions as an output type to explode a raster band into + geometry polygons. + + + See Also + + + + + + + histogram + A composite type used as record output of the ST_Histogram and ST_ApproxHistogram functions. + + + Description + A composite type used as record outputs of the ST_ApproxHistogram functions. Note that depending on exclude_nodata_value of function, may or may not contain nodata pixels. + Each histogram record in results corresponds to a bin for a selected raster band. + + + min double precision + minimum pixel value in this bin + + + max double precision + Maximum pixel value in this bin. + + + count integer + count of pixels in this bin. + + + percent double precision + Percent of pixels of the overall population in this bin. + + + + + See Also + + + + + + + raster + raster spatial data type. + + + + Description + raster is a spatial data type used to represent raster data such as those imported from jpegs, tiffs, pngs, digital elevation models. + Each raster has 1 or more bands each having a set of pixel values. Rasters can be georeferenced. + + Requires PostGIS be compiled with GDAL support. Currently rasters can be implicitly converted to geometry type, but the conversion returns the + of the raster. This auto casting may be removed in the near future so don't rely on it. + + + + + Casting Behavior + This section lists the automatic as well as explicit casts allowed for this data type + + + + + Cast To + Behavior + + + geometry + automatic + + + + + + + + See Also + + + + + + + reclassarg + A composite type used as input into the ST_Reclass function defining the behavior of reclassification. + + + Description + A composite type used as input into the ST_Reclass function defining the behavior of reclassification. + + + nband integer + The band number of band to reclassify. + + + reclassexpr text + range expression consisting of comma delimited range:map_range mappings. : to define mapping that defines how to map old band values to new band values. ( means >, ) means less than, ] < or equal, [ means > or equal + 1. [a-b] = a <= x <= b + +2. (a-b] = a < x <= b + +3. [a-b) = a <= x < b + +4. (a-b) = a < x < b +( notation is optional so a-b means the same as (a-b) + + + + + pixeltype text + One of defined pixel types as described in + + + nodataval double precision + Value to treat as no data. For image outputs that support transparency, these will be blank. + + + + + Example: Reclassify band 2 as an 8BUI where 255 is nodata value + SELECT ROW(2, '0-100:1-10, 101-500:11-150,501 - 10000: 151-254', '8BUI', 255)::reclassarg; + + + Example: Reclassify band 1 as an 1BB and no nodata value defined + SELECT ROW(1, '0-100]:0, (100-255:1', '1BB', NULL)::reclassarg; + + + See Also + + + + + + + summarystats + A composite type used as output of the ST_SummaryStats function. + + + Description + A composite type used as output the ST_SummaryStats function. Note that depending on exclude_nodata_value of function, may or may not contain nodata pixels. + + + count bigint + count of pixels in raster band. Depending on arguments may or many not include nodata pixel values. + + + sum double precision + sum of all pixel values in band + + + mean double precision + Mean of pixel values + + + stddev double precision + Standard deviation of pixel values. + + + min double precision + Minimum pixel value + + + max double precision + Maximum pixel value + + + + + See Also + + + + + + Raster Management + + + AddRasterConstraints + + Adds raster constraints to a loaded raster table for a specific column that constrains spatial ref, scaling, blocksize, alignment, bands, band type and a flag to denote if raster column is regularly blocked. The table must be loaded with data for the constraints to be inferred. Returns true of the constraint setting was accomplished and if issues a notice. + + + + + + boolean AddRasterConstraints + + name + rasttable + + name + rastcolumn + + boolean + srid + + boolean + scale_x + + boolean + scale_y + + boolean + blocksize_x + + boolean + blocksize_y + + boolean + same_alignment + + boolean + regular_blocking + + boolean + num_bands=true + + boolean + pixel_types=true + + boolean + nodata_values=true + + boolean + out_db=true + + boolean + extent=true + + + + + boolean AddRasterConstraints + name + rasttable + + name + rastcolumn + + text[] + VARIADIC constraints + + + + boolean AddRasterConstraints + + name + rastschema + + name + rasttable + + name + rastcolumn + + text[] + VARIADIC constraints + + + + boolean AddRasterConstraints + + name + rastschema + + name + rasttable + + name + rastcolumn + + boolean + srid=true + + boolean + scale_x=true + + boolean + scale_y=true + + boolean + blocksize_x=true + + boolean + blocksize_y=true + + boolean + same_alignment=true + + boolean + regular_blocking=true + + boolean + num_bands=true + boolean + pixel_types=true + + boolean + nodata_values=true + + boolean + out_db=true + + boolean + extent=true + + + + + + + Description + + Generates constraints on a raster column that are used to display information in the raster_columns raster catalog. + The rastschema is the name of the table schema the table resides in. The srid + must be an integer value reference to an entry in the SPATIAL_REF_SYS + table. + + raster2pgsql loader uses this function to register raster tables + Valid constraint names to pass in: refer to for more details. + + blocksize sets both X and Y blocksize + blocksize_x sets X tile (width in pixels of each tile) + blocksize_y sets Y tile (height in pixels of each tile) + extent computes extent of whole table and applys constraint all rasters must be within that extent + + num_bands number of bands + pixel_types reads array of pixel types for each band ensure all band n have same pixel type + regular_blocking apply informational flag to denote all tiles are regularly blocked + same_alignment ensures they all have same alignment meaning any two tiles you compare will return true for. Refer to + srid ensures all have same srid + More -- any listed as inputs into the above functions + + + This function infers the constraints from the data already present in the table. As such for it to work, you must create the raster column first + and then load it with data. + + + + If you need to load more data in your tables after you have already applied constraints, you may want to run the DropRasterConstraints + if the extent of your data has changed. + + + Availability: 2.0.0 + + + + Examples: Apply all possible constraints on column based on data + + CREATE TABLE myrasters(rid SERIAL primary key, rast raster); +INSERT INTO myrasters(rast) +SELECT ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 0.3, -0.3, 2, 2, 0, 0,4326), 1, '8BSI'::text, -129, NULL); + +SELECT AddRasterConstraints('myrasters'::name, 'rast'::name); + + +-- verify if registered correctly in the raster_columns view -- +SELECT srid, scale_x, scale_y, blocksize_x, blocksize_y, num_bands, pixel_types, nodata_values + FROM raster_columns + WHERE r_table_name = 'myrasters'; + + srid | scale_x | scale_y | blocksize_x | blocksize_y | num_bands | pixel_types| nodata_values +------+---------+---------+-------------+-------------+-----------+-------------+--------------- + 4326 | 2 | 2 | 1000 | 1000 | 1 | {8BSI} | {0} + + + + + Examples: Apply single constraint + + CREATE TABLE public.myrasters2(rid SERIAL primary key, rast raster); +INSERT INTO myrasters2(rast) +SELECT ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 0.3, -0.3, 2, 2, 0, 0,4326), 1, '8BSI'::text, -129, NULL); + +SELECT AddRasterConstraints('public'::name, 'myrasters2'::name, 'rast'::name,'regular_blocking', 'blocksize'); +-- get notice-- +NOTICE: Adding regular blocking constraint +INFO: The regular_blocking constraint is just a flag indicating that the column "rast" is regularly blocked. As no function exist yet to assert that a raster column is regularly blocked, it is up to the end-user to ensure that the column is truly regularly blocked. +CONTEXT: PL/pgSQL function "addrasterconstraints" line 85 at assignment +NOTICE: Adding blocksize-X constraint +NOTICE: Adding blocksize-Y constraint + + + + See Also + + , , , , , + + + + + + DropRasterConstraints + + Drops PostGIS raster constraints that refer to a raster table column. Useful if you need to reload data or update your raster column data. + + + + + + boolean DropRasterConstraints + name + rasttable + + name + rastcolumn + + boolean + srid + + boolean + scale_x + + boolean + scale_y + + boolean + blocksize_x + + boolean + blocksize_y + + boolean + same_alignment + + boolean + regular_blocking + + boolean + num_bands=true + boolean + pixel_types=true + + boolean + nodata_values=true + + boolean + out_db=true + + boolean + extent=true + + + + boolean DropRasterConstraints + name + rastschema + + name + rasttable + + name + rastcolumn + + boolean + srid=true + + boolean + scale_x=true + + boolean + scale_y=true + + boolean + blocksize_x=true + + boolean + blocksize_y=true + + boolean + same_alignment=true + + boolean + regular_blocking=true + + boolean + num_bands=true + boolean + pixel_types=true + + boolean + nodata_values=true + + boolean + out_db=true + + + boolean + extent=true + + + + boolean DropRasterConstraints + name + rastschema + + name + rasttable + + name + rastcolumn + text[] + constraints + + + + + + + + Description + Drops PostGIS raster constraints that refer to a raster table column that were added by . Useful if you need to load more data or update your raster column data. + You do not need to do this if you want to get rid of a raster table or a raster column. + To drop a raster table use the standard DROP TABLE mytable + To drop just a raster column and leave the rest of the table, use standard SQL ALTER TABLE mytable DROP COLUMN rast + the table will disappear from the raster_columns catalog if the column or table is dropped. However if only the constraints are dropped, the + raster column will still be listed in the raster_columns catalog, but there will be no other information about it aside from the column name and table. + Availability: 2.0.0 + + + Examples + + +SELECT DropRasterConstraints ('myrasters','rast'); +----RESULT output --- +t + +-- verify change in raster_columns -- +SELECT srid, scale_x, scale_y, blocksize_x, blocksize_y, num_bands, pixel_types, nodata_values + FROM raster_columns + WHERE r_table_name = 'myrasters'; + + srid | scale_x | scale_y | blocksize_x | blocksize_y | num_bands | pixel_types| nodata_values +------+---------+---------+-------------+-------------+-----------+-------------+--------------- + 0 | | | | | | | + + + + See Also + + + + + + + + PostGIS_Raster_Lib_Build_Date + + Reports full raster library build date. + + + + + + text PostGIS_Raster_Lib_Build_Date + + + + + + + + Description + + Reports raster build date + + + + Examples + + SELECT PostGIS_Raster_Lib_Build_Date(); +postgis_raster_lib_build_date +----------------------------- +2010-04-28 21:15:10 + + + + + See Also + + + + + + + + PostGIS_Raster_Lib_Version + + Reports full raster version and build configuration + infos. + + + + + + text PostGIS_Raster_Lib_Version + + + + + + + + Description + + Reports full raster version and build configuration + infos. + + + + Examples + + SELECT PostGIS_Raster_Lib_Version(); +postgis_raster_lib_version +----------------------------- + 2.0.0 + + + + + See Also + + + + + + + + + ST_GDALDrivers + + Returns a list of raster formats supported by your lib gdal. These are the formats you can output your raster using ST_AsGDALRaster. + + + + + + setof record ST_GDALDrivers + integer OUT idx + text OUT short_name + text OUT long_name + text OUT create_options + + + + + + Description + + Returns a list of raster formats short_name,long_name and creator options of each format supported by your lib gdal. Use the short_name as input in the format parameter of . + Options vary depending on what drivers your libgdal was compiled with. create_options returns an xml formatted set of CreationOptionList/Option consisting of name and optional type, description and set of VALUE for each creator option for the specific driver. + + Availability: 2.0.0 - requires GDAL >= 1.6.0. + + + + Examples: List of Drivers + + SELECT short_name, long_name +FROM st_gdaldrivers() +ORDER BY short_name; + short_name | long_name +----------------+-------------------------------------- +AAIGrid | Arc/Info ASCII Grid +DTED | DTED Elevation Raster +EHdr | ESRI .hdr Labelled +FIT | FIT Image +GIF | Graphics Interchange Format (.gif) +GSAG | Golden Software ASCII Grid (.grd) +GSBG | Golden Software Binary Grid (.grd) +GTiff | GeoTIFF +HF2 | HF2/HFZ heightfield raster +HFA | Erdas Imagine Images (.img) +ILWIS | ILWIS Raster Map +INGR | Intergraph Raster +JPEG | JPEG JFIF +KMLSUPEROVERLAY | Kml Super Overlay +NITF | National Imagery Transmission Format +PNG | Portable Network Graphics +R | R Object Data Store +SAGA | SAGA GIS Binary Grid (.sdat) +SRTMHGT | SRTMHGT File Format +USGSDEM | USGS Optional ASCII DEM (and CDED) +VRT | Virtual Raster +XPM | X11 PixMap Format + + + +Example: List of options for each driver +-- Output the create options XML column of JPEG as a table -- +-- Note you can use these creator options in ST_AsGDALRaster options argument +SELECT (xpath('@name', g.opt))[1]::text As oname, + (xpath('@type', g.opt))[1]::text As otype, + (xpath('@description', g.opt))[1]::text As descrip +FROM (SELECT unnest(xpath('/CreationOptionList/Option', create_options::xml)) As opt +FROM st_gdaldrivers() +WHERE short_name = 'JPEG') As g; + + oname | otype | descrip +-------------+---------+----------------------------- + PROGRESSIVE | boolean | + QUALITY | int | good=100, bad=0, default=75 + WORLDFILE | boolean | + + + +-- raw xml output for creator options for GeoTiff -- +SELECT create_options +FROM st_gdaldrivers() +WHERE short_name = 'GTiff'; + + + + + + + + + + + + + + See Also + + , + + + + + + + Raster Constructors + + + ST_AddBand + Returns a raster with the new band(s) of given type added with given initial value in the given index location. If no index is specified, the band is added to the end. + + + + + + raster ST_AddBand + raster rast + text pixeltype + double precision initialvalue=0 + double precision nodataval=NULL + + + + raster ST_AddBand + raster rast + integer index + text pixeltype + double precision initialvalue=0 + double precision nodataval=NULL + + + + raster ST_AddBand + raster torast + raster fromrast + integer fromband=1 + integer torastindex=at_end + + + + raster ST_AddBand + raster torast + raster[] fromrasts + integer fromband=1 + + + + + + + Description + + Returns a raster with a new band added in given position (index), of given type, of given initial value, and of given nodata value. If no index is specified, the band is added to the end. + If no fromband is specified, band 1 is assumed. Pixel type is a string representation + of one of the pixel types specified in . If an existing index is specified all subsequent bands >= that index are incremented by 1. + If an initial value greater than the max of the pixel type + is specified, then the initial value is set to the highest + value allowed by the pixel type. The last version add the + fromband from fromrast raster to torast in position torastindex. + For the version that takes an array of bands if torast is NULL, then the fromband band of each raster in the array + is accumulated into a new raster + + + + Examples: Single Add Band versions + + -- Add another band of type 8 bit unsigned integer with pixels initialized to 200 +UPDATE dummy_rast + SET rast = ST_AddBand(rast,'8BUI'::text,200) +WHERE rid = 1; + + + -- Create an empty raster 100x100 units, with upper left right at 0, add 2 bands (band 1 is 0/1 boolean bit switch, band2 allows values 0-15) +INSERT INTO dummy_rast(rid,rast) + VALUES(10, ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(100, 100, 0, 0, 1, -1, 0, 0, 0), '1BB'::text), '4BUI'::text) ); + +-- output meta data of raster bands to verify all is right -- +SELECT (bmd).* +FROM (SELECT ST_BandMetaData(rast,generate_series(1,2)) As bmd + FROM dummy_rast WHERE rid = 10) AS foo; + --result -- + pixeltype | nodatavalue | isoutdb | path +-----------+----------------+-------------+---------+------ + 1BB | | f | + 4BUI | | f | + + +-- output meta data of raster - +SELECT (rmd).width, (rmd).height, (rmd).numbands +FROM (SELECT ST_MetaData(rast) As rmd + FROM dummy_rast WHERE rid = 10) AS foo; +-- result -- + upperleftx | upperlefty | width | height | scalex | scaley | skewx | skewy | srid | numbands +------------+------------+-------+--------+------------+------------+-------+-------+------+---------- + 0 | 0 | 100 | 100 | 1 | -1 | 0 | 0 | 0 | 2 + + + + + + Examples: Multi-Band versions + + -- Aggregate the 1st band of a table of like rasters into a single raster +-- with as many bands as there are test_types and as many rows (new rasters) as there are mice +-- NOTE: The ORDER BY test_type is only supported in PostgreSQL 9.0+ +-- for 8.4 and below it usually works to order your data in a subselect (but not guaranteed) +-- The resulting raster will have a band for each test_type alphabetical by test_type +-- For mouse lovers: No mice were harmed in this exercise +SELECT mouse, ST_AddBand(NULL, array_agg(rast ORDER BY test_type), 1 ) As rast + FROM mice_studies + GROUP BY mouse; + + + + + + See Also + , , , , , + + + + + ST_AsRaster + Converts a PostGIS geometry to a PostGIS raster. + + + + + + raster ST_AsRaster + geometry geom + raster ref + text pixeltype + double precision value=1 + double precision nodataval=0 + boolean touched=false + + + + raster ST_AsRaster + geometry geom + raster ref + text[] pixeltype=ARRAY['8BUI'] + double precision[] value=ARRAY[1] + double precision[] nodataval=ARRAY[0] + boolean touched=false + + + + raster ST_AsRaster + geometry geom + double precision scalex + double precision scaley + double precision gridx + double precision gridy + text pixeltype + double precision value=1 + double precision nodataval=0 + double precision skewx=0 + double precision skewy=0 + boolean touched=false + + + + raster ST_AsRaster + geometry geom + double precision scalex + double precision scaley + double precision gridx=NULL + double precision gridy=NULL + text[] pixeltype=ARRAY['8BUI'] + double precision[] value=ARRAY[1] + double precision[] nodataval=ARRAY[0] + double precision skewx=0 + double precision skewy=0 + boolean touched=false + + + + raster ST_AsRaster + geometry geom + double precision scalex + double precision scaley + text pixeltype + double precision value=1 + double precision nodataval=0 + double precision upperleftx=NULL + double precision upperlefty=NULL + double precision skewx=0 + double precision skewy=0 + boolean touched=false + + + + raster ST_AsRaster + geometry geom + double precision scalex + double precision scaley + text[] pixeltype + double precision[] value=ARRAY[1] + double precision[] nodataval=ARRAY[0] + double precision upperleftx=NULL + double precision upperlefty=NULL + double precision skewx=0 + double precision skewy=0 + boolean touched=false + + + + raster ST_AsRaster + geometry geom + integer width + integer height + double precision gridx + double precision gridy + text pixeltype + double precision value=1 + double precision nodataval=0 + double precision skewx=0 + double precision skewy=0 + boolean touched=false + + + + raster ST_AsRaster + geometry geom + integer width + integer height + double precision gridx=NULL + double precision gridy=NULL + text[] pixeltype=ARRAY['8BUI'] + double precision[] value=ARRAY[1] + double precision[] nodataval=ARRAY[0] + double precision skewx=0 + double precision skewy=0 + boolean touched=false + + + + raster ST_AsRaster + geometry geom + integer width + integer height + text pixeltype + double precision value=1 + double precision nodataval=0 + double precision upperleftx=NULL + double precision upperlefty=NULL + double precision skewx=0 + double precision skewy=0 + boolean touched=false + + + + raster ST_AsRaster + geometry geom + integer width + integer height + text[] pixeltype + double precision[] value=ARRAY[1] + double precision[] nodataval=ARRAY[0] + double precision upperleftx=NULL + double precision upperlefty=NULL + double precision skewx=0 + double precision skewy=0 + boolean touched=false + + + + + + + + Description + + Converts a PostGIS geometry to a PostGIS raster. The many variants offers three groups of possibilities for setting the alignment and pixelsize of the resulting raster. + + The first group, composed of the two first variants, produce a raster having the same alignment (scalex, scaley, gridx and gridy), pixel type and nodata value as the provided reference raster. You generally pass this reference raster by joining the table containing the geometry with the table containing the reference raster. + + The second group, composed of four variants, let you set the dimensions of the raster by providing the parameters of a pixel size (scalex & scaley and skewx & skewy). The width & height of the resulting raster will be adjusted to fit the extent of the geometry. In most cases, you must cast integer scalex & scaley arguments to double precision so that PostgreSQL choose the right variant. + + The third group, composed of four variants, let you fix the dimensions of the raster by providing the dimensions of the raster (width & height). The parameters of the pixel size (scalex & scaley and skewx & skewy) of the resulting raster will be adjusted to fit the extent of the geometry. + + The two first variants of each of those two last groups let you specify the alignment with an arbitrary corner of the alignment grid (gridx & gridy) and the two last variants takes the upper left corner (upperleftx & upperlefty). + + Each group of variant allows producing a one band raster or a multiple bands raster. To produce a multiple bands raster, you must provide an array of pixel types (pixeltype[]), an array of initial values (value) and an array of nodata values (nodataval). If not provided pixeltyped defaults to 8BUI, values to 1 and nodataval to 0. + + The output raster will be in the same spatial reference as the source geometry. The only exception is for variants with a reference raster. In this case the resulting raster will get the same SRID as the reference raster. + + The optional touched parameter defaults to false and maps to the GDAL ALL_TOUCHED rasterization option, which determines if pixels touched by lines or polygons will be burned. Not just those on the line render path, or whose center point is within the polygon. + + This is particularly useful for rendering jpegs and pngs of geometries directly from the database when using in combination + with and other family of functions. + Availability: 2.0.0 - requires GDAL >= 1.6.0. + + Not yet capable of rendering complex geometry types such as curves, TINS, and PolyhedralSurfaces, but should be + able too once GDAL can. + + + + Examples: Output geometries as PNG files + + + + + + + + + +-- this will output a black circle taking up 150 x 150 pixels -- +SELECT ST_AsPNG(ST_AsRaster(ST_Buffer(ST_Point(1,5),10),150, 150, '2BUI')); + + + + + + + + + + + -- the bands map to RGB bands - the value (118,154,118) - teal -- +SELECT ST_AsPNG( + ST_AsRaster( + ST_Buffer( + ST_GeomFromText('LINESTRING(50 50,150 150,150 50)'), 10,'join=bevel'), + 200,200,ARRAY['8BUI', '8BUI', '8BUI'], ARRAY[118,154,118], ARRAY[0,0,0])); + + + + + See Also + , , , , , , + + + + + + ST_Band + Returns one or more bands of an existing raster as a new raster. Useful for building new rasters from existing rasters. + + + + + + raster ST_Band + raster rast + integer[] nbands = ARRAY[1] + + + + raster ST_Band + raster rast + text nbands + character delimiter=, + + + + raster ST_Band + raster rast + integer nband + + + + + + Description + + Returns a single band of an existing raster as a new raster. Useful for building new rasters from existing rasters or export of only selected + bands of a raster. If no band is specified, band 1 is assumed. Used as a helper function in various functions such as for deleting a band. + + Availability: 2.0.0 + + + + Examples + + -- Make 2 new rasters: 1 containing band 1 of dummy, second containing band 2 of dummy and then reclassified as a 2BUI +SELECT ST_NumBands(rast1) As numb1, ST_BandPixelType(rast1) As pix1, + ST_NumBands(rast2) As numb2, ST_BandPixelType(rast2) As pix2 +FROM ( + SELECT ST_Band(rast) As rast1, ST_Reclass(ST_Band(rast,3), '100-200):1, [200-254:2', '2BUI') As rast2 + FROM dummy_rast + WHERE rid = 2) As foo; + + numb1 | pix1 | numb2 | pix2 +-------+------+-------+------ + 1 | 8BUI | 1 | 2BUI + + + -- Return bands 2 and 3. Use text to define bands +SELECT ST_NumBands(ST_Band(rast, '2,3')) As num_bands + FROM dummy_rast WHERE rid=2; + +num_bands +---------- +2 + +-- Return bands 2 and 3. Use array to define bands +SELECT ST_NumBands(ST_Band(rast, ARRAY[2,3])) As num_bands + FROM dummy_rast +WHERE rid=2; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + --Make a new raster with 2nd band of original and 1st band repeated twice, +and another with just the third band +SELECT rast, ST_Band(rast, ARRAY[2,1,1]) As dupe_band, + ST_Band(rast, 3) As sing_band +FROM samples.than_chunked +WHERE rid=35; + + + + + + See Also + , , , + + + + + ST_MakeEmptyRaster + Returns an empty raster (having no bands) of given dimensions (width & height), upperleft X and Y, pixel size and rotation (scalex, scaley, skewx & skewy) and reference system (srid). + If a raster is passed in, returns a new raster with the same size, alignment and SRID. If srid is left out, the spatial ref is set to unknown (0). + + + + + raster ST_MakeEmptyRaster + raster rast + + + raster ST_MakeEmptyRaster + integer width + integer height + float8 upperleftx + float8 upperlefty + float8 scalex + float8 scaley + float8 skewx + float8 skewy + integer srid=unknown + + + + raster ST_MakeEmptyRaster + integer width + integer height + float8 upperleftx + float8 upperlefty + float8 pixelsize + + + + + Description + Returns an empty raster (having no band) of given dimensions (width & height) and georeferenced in spatial (or world) coordinates with upper left X (upperleftx), upper left Y (upperlefty), + pixel size and rotation (scalex, scaley, skewx & skewy) and reference system (srid). + + The last version use a single parameter to specify the pixel size (pixelsize). scalex is set to this argument and scaley is set to the negative value of this argument. skewx and skewy are set to 0. + + If an existing raster is passed in, it returns a new raster with the same meta data settings (without the bands). + + If no srid is specified it defaults to 0. After you create an empty raster you probably want to add bands to it and maybe edit it. Refer to to define bands and to set initial pixel values. + + + + + Examples + + +INSERT INTO dummy_rast(rid,rast) +VALUES(3, ST_MakeEmptyRaster( 100, 100, 0.0005, 0.0005, 1, 1, 0, 0, 4326) ); + +--use an existing raster as template for new raster +INSERT INTO dummy_rast(rid,rast) +SELECT 4, ST_MakeEmptyRaster(rast) +FROM dummy_rast WHERE rid = 3; + +-- output meta data of rasters we just added +SELECT rid, (md).* +FROM (SELECT rid, ST_MetaData(rast) As md + FROM dummy_rast + WHERE rid IN(3,4)) As foo; + +-- output -- + rid | upperleftx | upperlefty | width | height | scalex | scaley | skewx | skewy | srid | numbands +-----+------------+------------+-------+--------+------------+------------+-------+-------+------+---------- + 3 | 0.0005 | 0.0005 | 100 | 100 | 1 | 1 | 0 | 0 | 4326 | 0 + 4 | 0.0005 | 0.0005 | 100 | 100 | 1 | 1 | 0 | 0 | 4326 | 0 + + + + + + See Also + , , , , , , , + + + + + Raster Accessors + + + + ST_GeoReference + Returns the georeference meta data in GDAL or ESRI format as commonly seen in a world file. Default is GDAL. + + + + + + text ST_GeoReference + raster rast + text format=GDAL + + + + + + Description + + Returns the georeference meta data including carriage return in GDAL or ESRI format as commonly seen in a world file. Default is GDAL if no type specified. type is string 'GDAL' or 'ESRI'. + + Difference between format representations is as follows: + GDAL: +scalex +skewy +skewx +scaley +upperleftx +upperlefty + ESRI: +scalex +skewy +skewx +scaley +upperleftx + scalex*0.5 +upperlefty + scaley*0.5 + + + + Examples + + SELECT ST_GeoReference(rast, 'ESRI') As esri_ref, ST_GeoReference(rast, 'GDAL') As gdal_ref + FROM dummy_rast WHERE rid=1; + + esri_ref | gdal_ref +--------------+-------------- + 2.0000000000 | 2.0000000000 + 0.0000000000 : 0.0000000000 + 0.0000000000 : 0.0000000000 + 3.0000000000 : 3.0000000000 + 1.5000000000 : 0.5000000000 + 2.0000000000 : 0.5000000000 + + + + + See Also + , , + + + + + + ST_Height + Returns the height of the raster in pixels. + + + + + + integer ST_Height + raster rast + + + + + + Description + + Returns the height of the raster. + + + + Examples + + SELECT rid, ST_Height(rast) As rastheight +FROM dummy_rast; + + rid | rastheight +-----+------------ + 1 | 20 + 2 | 5 + + + + + + See Also + + + + + + + ST_MetaData + Returns basic meta data about a raster object such as pixel size, rotation (skew), upper, lower left, etc. + + + + + + record ST_MetaData + raster rast + + + + + + Description + + Returns basic meta data about a raster object such as pixel size, rotation (skew), upper, lower left, etc. Columns returned: + upperleftx | upperlefty | width | height | scalex | scaley | skewx | skewy | srid | numbands + + + + Examples + + SELECT rid, (foo.md).* + FROM (SELECT rid, ST_MetaData(rast) As md +FROM dummy_rast) As foo; + + rid | upperleftx | upperlefty | width | height | scalex | scaley | skewx | skewy | srid | numbands + ----+------------+------------+-------+--------+--------+-----------+-------+-------+------+------- + 1 | 0.5 | 0.5 | 10 | 20 | 2 | 3 | 0 | 0 | 0 | 0 + 2 | 3427927.75 | 5793244 | 5 | 5 | 0.05 | -0.05 | 0 | 0 | 0 | 3 + + + + + + See Also + , + + + + + + ST_NumBands + Returns the number of bands in the raster object. + + + + + + integer ST_NumBands + raster rast + + + + + + Description + + Returns the number of bands in the raster object. + + + + Examples + + SELECT rid, ST_NumBands(rast) As numbands +FROM dummy_rast; + +rid | numbands +----+---------- + 1 | 0 + 2 | 3 + + + + + + See Also + + + + + + + ST_PixelHeight + Returns the pixel height in geometric units of the spatial reference system. + + + + + + double precision ST_PixelHeight + raster rast + + + + + + Description + + Returns the height of a pixel in geometric units of the spatial reference system. In the common case where + there is no skew, the pixel height is just the scale ratio between geometric coordinates and raster pixels. + Refer to for a diagrammatic visualization of the relationship. + + + + Examples: Rasters with no skew + + SELECT ST_Height(rast) As rastheight, ST_PixelHeight(rast) As pixheight, + ST_ScaleX(rast) As scalex, ST_ScaleY(rast) As scaley, ST_SkewX(rast) As skewx, + ST_SkewY(rast) As skewy +FROM dummy_rast; + + rastheight | pixheight | scalex | scaley | skewx | skewy +------------+-----------+--------+--------+-------+---------- + 20 | 3 | 2 | 3 | 0 | 0 + 5 | 0.05 | 0.05 | -0.05 | 0 | 0 + + + + + + Examples: Rasters with skew different than 0 + + SELECT ST_Height(rast) As rastheight, ST_PixelHeight(rast) As pixheight, + ST_ScaleX(rast) As scalex, ST_ScaleY(rast) As scaley, ST_SkewX(rast) As skewx, + ST_SkewY(rast) As skewy +FROM (SELECT ST_SetSKew(rast,0.5,0.5) As rast + FROM dummy_rast) As skewed; + +rastheight | pixheight | scalex | scaley | skewx | skewy +-----------+-------------------+--------+--------+-------+---------- + 20 | 3.04138126514911 | 2 | 3 | 0.5 | 0.5 + 5 | 0.502493781056044 | 0.05 | -0.05 | 0.5 | 0.5 + + + + + + + See Also + , , , , + + + + + + + ST_PixelWidth + Returns the pixel width in geometric units of the spatial reference system. + + + + + + double precision ST_PixelWidth + raster rast + + + + + + Description + + Returns the width of a pixel in geometric units of the spatial reference system. In the common case where + there is no skew, the pixel width is just the scale ratio between geometric coordinates and raster pixels. + The following diagram demonstrates the relationship: + + + + + + + + + + + + + + Examples: Rasters with no skew + + SELECT ST_Width(rast) As rastwidth, ST_PixelWidth(rast) As pixwidth, + ST_ScaleX(rast) As scalex, ST_ScaleY(rast) As scaley, ST_SkewX(rast) As skewx, + ST_SkewY(rast) As skewy + FROM dummy_rast; + + rastwidth | pixwidth | scalex | scaley | skewx | skewy + -----------+----------+--------+--------+-------+---------- + 10 | 2 | 2 | 3 | 0 | 0 + 5 | 0.05 | 0.05 | -0.05 | 0 | 0 + + + + + + Examples: Rasters with skew different than 0 + + SELECT ST_Width(rast) As rastwidth, ST_PixelWidth(rast) As pixwidth, + ST_ScaleX(rast) As scalex, ST_ScaleY(rast) As scaley, ST_SkewX(rast) As skewx, + ST_SkewY(rast) As skewy + FROM (SELECT ST_SetSkew(rast,0.5,0.5) As rast + FROM dummy_rast) As skewed; + + rastwidth | pixwidth | scalex | scaley | skewx | skewy + -----------+-------------------+--------+--------+-------+---------- + 10 | 2.06155281280883 | 2 | 3 | 0.5 | 0.5 + 5 | 0.502493781056044 | 0.05 | -0.05 | 0.5 | 0.5 + + + + + + + See Also + , , , , + + + + + + ST_ScaleX + Returns the X component of the pixel width in units of coordinate reference system. + + + + + + float8 ST_ScaleX + raster rast + + + + + + Description + + Returns the X component of the pixel width in units of coordinate reference system. Refer to World File + for more details. + Changed: 2.0.0. In WKTRaster versions this was called ST_PixelSizeX. + + + + Examples + + SELECT rid, ST_ScaleX(rast) As rastpixwidth +FROM dummy_rast; + + rid | rastpixwidth +-----+-------------- + 1 | 2 + 2 | 0.05 + + + + + + + See Also + + + + + + + ST_ScaleY + Returns the Y component of the pixel height in units of coordinate reference system. + + + + + + float8 ST_ScaleY + raster rast + + + + + + Description + + Returns the Y component of the pixel height in units of coordinate reference system. May be negative. Refer to World File + for more details. + + Changed: 2.0.0. In WKTRaster versions this was called ST_PixelSizeY. + + + + Examples + + SELECT rid, ST_ScaleY(rast) As rastpixheight +FROM dummy_rast; + + rid | rastpixheight +-----+--------------- + 1 | 3 + 2 | -0.05 + + + + + + + See Also + + + + + + + ST_Raster2WorldCoordX + Returns the geometric X coordinate upper left of a raster, column and row. Numbering of columns + and rows starts at 1. + + + + + + float8 ST_Raster2WorldCoordX + raster rast + integer xcolumn + + + float8 ST_Raster2WorldCoordX + raster rast + integer xcolumn + integer yrow + + + + + + Description + + Returns the upper left X coordinate of a raster column row in geometric units of the georeferenced raster. + Numbering of columns and rows starts at 1 but if you pass in a negative number or number higher than number of + columns in raster, it will give you + coordinates outside of the raster file to left or right with the assumption that the + skew and pixel sizes are same as selected raster. + For non-skewed rasters, providing the X column is sufficient. For skewed rasters, + the georeferenced coordinate is a function of the ST_ScaleX and ST_SkewX and row and column. + An error will be raised if you give just the X column for a skewed raster. + + + + Examples + + +-- non-skewed raster providing column is sufficient +SELECT rid, ST_Raster2WorldCoordX(rast,1) As x1coord, + ST_Raster2WorldCoordX(rast,2) As x2coord, + ST_ScaleX(rast) As pixelx +FROM dummy_rast; + + rid | x1coord | x2coord | pixelx +-----+------------+-----------+-------- + 1 | 0.5 | 2.5 | 2 + 2 | 3427927.75 | 3427927.8 | 0.05 + + + +-- for fun lets skew it +SELECT rid, ST_Raster2WorldCoordX(rast, 1, 1) As x1coord, + ST_Raster2WorldCoordX(rast, 2, 3) As x2coord, + ST_ScaleX(rast) As pixelx +FROM (SELECT rid, ST_SetSkew(rast, 100.5, 0) As rast FROM dummy_rast) As foo; + + rid | x1coord | x2coord | pixelx +-----+------------+-----------+-------- + 1 | 0.5 | 203.5 | 2 + 2 | 3427927.75 | 3428128.8 | 0.05 + + + + + + + See Also + , , , + + + + + + ST_Raster2WorldCoordY + Returns the geometric Y coordinate upper left corner of a raster, column and row. Numbering of columns + and rows starts at 1. + + + + + + float8 ST_Raster2WorldCoordY + raster rast + integer yrow + + + float8 ST_Raster2WorldCoordY + raster rast + integer xcolumn + integer yrow + + + + + + Description + + Returns the upper left Y coordinate of a raster column row in geometric units of the georeferenced raster. + Numbering of columns and rows starts at 1 but if you pass in a negative number or number higher than number of + columns/rows in raster, it will give you + coordinates outside of the raster file to left or right with the assumption that the + skew and pixel sizes are same as selected raster tile. + For non-skewed rasters, providing the Y column is sufficient. For skewed rasters, + the georeferenced coordinate is a function of the ST_ScaleY and ST_SkewY and row and column. + An error will be raised if you give just the Y row for a skewed raster. + + + + Examples + + +-- non-skewed raster providing row is sufficient +SELECT rid, ST_Raster2WorldCoordY(rast,1) As y1coord, + ST_Raster2WorldCoordY(rast,3) As y2coord, + ST_ScaleY(rast) As pixely +FROM dummy_rast; + + rid | y1coord | y2coord | pixely +-----+---------+-----------+-------- + 1 | 0.5 | 6.5 | 3 + 2 | 5793244 | 5793243.9 | -0.05 + + + +-- for fun lets skew it +SELECT rid, ST_Raster2WorldCoordY(rast,1,1) As y1coord, + ST_Raster2WorldCoordY(rast,2,3) As y2coord, + ST_ScaleY(rast) As pixely +FROM (SELECT rid, ST_SetSkew(rast,0,100.5) As rast FROM dummy_rast) As foo; + + rid | y1coord | y2coord | pixely +-----+---------+-----------+-------- + 1 | 0.5 | 107 | 3 + 2 | 5793244 | 5793344.4 | -0.05 + + + + + + + See Also + , , , + + + + + + ST_Rotation + Returns the rotation of the raster in radian. + + + + + + float8 ST_Rotation + raster rast + + + + + + Description + + Returns the uniform rotation of the raster in radian. If a raster does not have uniform rotation, NaN is returned. + Refer to World File for more details. + + + + Examples + + SELECT rid, ST_Rotation(ST_SetScale(ST_SetSkew(rast, sqrt(2)), sqrt(2))) as rot FROM dummy_rast; + + rid | rot +-----+------------------- + 1 | 0.785398163397448 + 2 | 0.785398163397448 + + + + + + See Also + , , + + + + + + ST_SkewX + Returns the georeference X skew (or rotation parameter). + + + + + + float8 ST_SkewX + raster rast + + + + + + Description + + Returns the georeference X skew (or rotation parameter). Refer to World File + for more details. + + + + Examples + + SELECT rid, ST_SkewX(rast) As skewx, ST_SkewY(rast) As skewy, + ST_GeoReference(rast) as georef +FROM dummy_rast; + + rid | skewx | skewy | georef +-----+-------+-------+-------------------- + 1 | 0 | 0 | 2.0000000000 + : 0.0000000000 + : 0.0000000000 + : 3.0000000000 + : 0.5000000000 + : 0.5000000000 + : + 2 | 0 | 0 | 0.0500000000 + : 0.0000000000 + : 0.0000000000 + : -0.0500000000 + : 3427927.7500000000 + : 5793244.0000000000 + + + + + + + See Also + , , + + + + + + ST_SkewY + Returns the georeference Y skew (or rotation parameter). + + + + + + float8 ST_SkewY + raster rast + + + + + + Description + + Returns the georeference Y skew (or rotation parameter). Refer to World File + for more details. + + + + Examples + + SELECT rid, ST_SkewX(rast) As skewx, ST_SkewY(rast) As skewy, + ST_GeoReference(rast) as georef +FROM dummy_rast; + + rid | skewx | skewy | georef +-----+-------+-------+-------------------- + 1 | 0 | 0 | 2.0000000000 + : 0.0000000000 + : 0.0000000000 + : 3.0000000000 + : 0.5000000000 + : 0.5000000000 + : + 2 | 0 | 0 | 0.0500000000 + : 0.0000000000 + : 0.0000000000 + : -0.0500000000 + : 3427927.7500000000 + : 5793244.0000000000 + + + + + + + See Also + , , + + + + + + ST_SRID + Returns the spatial reference identifier of the raster as defined in spatial_ref_sys table. + + + + + + integer ST_SRID + raster rast + + + + + + Description + + Returns the spatial reference identifier of the raster object as defined in the spatial_ref_sys table. + From PostGIS 2.0+ the srid of a non-georeferenced raster/geometry is 0 instead of the prior -1. + + + + Examples + + SELECT ST_SRID(rast) As srid +FROM dummy_rast WHERE rid=1; + +srid +---------------- +0 + + + + + + See Also + , + + + + + + ST_UpperLeftX + Returns the upper left X coordinate of raster in projected spatial ref. + + + + + + float8 ST_UpperLeftX + raster rast + + + + + + Description + + Returns the upper left X coordinate of raster in projected spatial ref. + + + + Examples + + +SELECt rid, ST_UpperLeftX(rast) As ulx +FROM dummy_rast; + + rid | ulx +-----+------------ + 1 | 0.5 + 2 | 3427927.75 + + + + + + See Also + , , + + + + + + ST_UpperLeftY + Returns the upper left Y coordinate of raster in projected spatial ref. + + + + + + float8 ST_UpperLeftY + raster rast + + + + + + Description + + Returns the upper left Y coordinate of raster in projected spatial ref. + + + + Examples + + +SELECT rid, ST_UpperLeftY(rast) As uly +FROM dummy_rast; + + rid | uly +-----+--------- + 1 | 0.5 + 2 | 5793244 + + + + + + See Also + , , + + + + + + ST_Width + Returns the width of the raster in pixels. + + + + + + integer ST_Width + raster rast + + + + + + Description + + Returns the width of the raster in pixels. + + + + Examples + + SELECT ST_Width(rast) As rastwidth +FROM dummy_rast WHERE rid=1; + +rastwidth +---------------- +10 + + + + + + + See Also + + + + + + + ST_World2RasterCoordX + Returns the column in the raster of the point geometry (pt) or a X and Y world coordinate (xw, yw) represented + in world spatial reference system of raster. + + + + + + integer ST_World2RasterCoordX + raster rast + geometry pt + + + + integer ST_World2RasterCoordX + raster rast + double precision xw + + + + integer ST_World2RasterCoordX + raster rast + double precision xw + double precision yw + + + + + + Description + + Returns the column in the raster of the point geometry (pt) or a X and Y world coordinate (xw, yw). A point, or (both xw and yw world coordinates are required if a raster is skewed). If a raster + is not skewed then xw is sufficient. World coordinates are in the spatial reference coordinate system of the raster. + + + + Examples + + SELECT rid, ST_World2RasterCoordX(rast,3427927.8) As xcoord, + ST_World2RasterCoordX(rast,3427927.8,20.5) As xcoord_xwyw, + ST_World2RasterCoordX(rast,ST_GeomFromText('POINT(3427927.8 20.5)',ST_SRID(rast))) As ptxcoord +FROM dummy_rast; + + rid | xcoord | xcoord_xwyw | ptxcoord +-----+---------+---------+---------- + 1 | 1713964 | 1713964 | 1713964 + 2 | 1 | 1 | 1 + + + + + + See Also + , + , + + + + + + + ST_World2RasterCoordY + Returns the row in the raster of the point geometry (pt) or a X and Y world coordinate (xw, yw) represented + in world spatial reference system of raster. + + + + + + integer ST_World2RasterCoordY + raster rast + geometry pt + + + + integer ST_World2RasterCoordY + raster rast + double precision xw + + + + integer ST_World2RasterCoordY + raster rast + double precision xw + double precision yw + + + + + + Description + + Returns the row in the raster of the point geometry (pt) or a X and Y world coordinate (xw, yw). A point, or (both xw and yw world coordinates are required if a raster is skewed). If a raster + is not skewed then xw is sufficient. World coordinates are in the spatial reference coordinate system of the raster. + + + + Examples + + SELECT rid, ST_World2RasterCoordY(rast,20.5) As ycoord, + ST_World2RasterCoordY(rast,3427927.8,20.5) As ycoord_xwyw, + ST_World2RasterCoordY(rast,ST_GeomFromText('POINT(3427927.8 20.5)',ST_SRID(rast))) As ptycoord +FROM dummy_rast; + + rid | ycoord | ycoord_xwyw | ptycoord +-----+-----------+-------------+----------- + 1 | 7 | 7 | 7 + 2 | 115864471 | 115864471 | 115864471 + + + + + + See Also + , , + + + + + + ST_IsEmpty + Returns true if the raster is empty (width = 0 and height = 0). Otherwise, returns false. + + + + + + boolean ST_IsEmpty + raster rast + + + + + + Description + + Returns true if the raster is empty (width = 0 and height = 0). Otherwise, returns false. + + + + Examples + + SELECT ST_IsEmpty(ST_MakeEmptyRaster(100, 100, 0, 0, 0, 0, 0, 0)) +st_isempty | +-----------+ +f | + + +SELECT ST_IsEmpty(ST_MakeEmptyRaster(0, 0, 0, 0, 0, 0, 0, 0)) +st_isempty | +-----------+ +t | + + + + + + + See Also + + + + + + + Raster Band Accessors + + + ST_BandMetaData + Returns basic meta data for a specific raster band. band num 1 is assumed if none-specified. + + + + + + record ST_BandMetaData + raster rast + integer bandnum=1 + + + + + + Description + + Returns basic meta data about a raster band. Columns returned + pixeltype | nodatavalue | isoutdb | path. + + + + If raster contains no bands then an error is thrown. + + + + + If band has no NODATA value, nodatavalue will be NULL. + + + + + + Examples + + SELECT rid, (foo.md).* + FROM (SELECT rid, ST_BandMetaData(rast,1) As md +FROM dummy_rast WHERE rid=2) As foo; + + rid | pixeltype | nodatavalue | isoutdb | path +-----+-----------+----------------+-------------+---------+------ + 2 | 8BUI | 0 | f | + + + + + + See Also + , + + + + + + ST_BandNoDataValue + Returns the value in a given band that represents no data. If no band num 1 is assumed. + + + + + + double precision ST_BandNoDataValue + raster rast + integer bandnum=1 + + + + + + Description + + Returns the value that represents no data for the band + + + + Examples + + SELECT ST_BandNoDataValue(rast,1) As bnval1, + ST_BandNoDataValue(rast,2) As bnval2, ST_BandNoDataValue(rast,3) As bnval3 +FROM dummy_rast +WHERE rid = 2; + + bnval1 | bnval2 | bnval3 +--------+--------+-------- + 0 | 0 | 0 + + + + + + See Also + + + + + + + + ST_BandIsNoData + Returns true if the band is filled with only nodata values. + + + + + + boolean ST_BandIsNoData + raster rast + integer band + boolean forceChecking=true + + + boolean ST_BandIsNoData + raster rast + boolean forceChecking=true + + + + + + Description + Returns true if the band is filled with only nodata + values. Band 1 is assumed if not specified. If the last argument + is TRUE, the entire band is checked pixel by pixel. Otherwise, + the function simply returns the value of the isnodata flag for + the band. The default value for this parameter is FALSE, if not + specified. + + Availability: 2.0.0 + + + If the flag is dirty (this is, the result is different + using TRUE as last parameter and not using it) you should + update the raster to set this flag to true, by using ST_SetBandIsNodata function, + or ST_SetBandNodataValue function with TRUE as last argument. The + loader (raster2pgsql.py) currently can not properly set the + flag while loading raster data. See . + + + + + Examples + + +-- Create dummy table with one raster column +create table dummy_rast (rid integer, rast raster); + +-- Add raster with two bands, one pixel/band. In the first band, nodatavalue = pixel value = 3. +-- In the second band, nodatavalue = 13, pixel value = 4 +insert into dummy_rast values(1, +( +'01' -- little endian (uint8 ndr) +|| +'0000' -- version (uint16 0) +|| +'0200' -- nBands (uint16 0) +|| +'17263529ED684A3F' -- scaleX (float64 0.000805965234044584) +|| +'F9253529ED684ABF' -- scaleY (float64 -0.00080596523404458) +|| +'1C9F33CE69E352C0' -- ipX (float64 -75.5533328537098) +|| +'718F0E9A27A44840' -- ipY (float64 49.2824585505576) +|| +'ED50EB853EC32B3F' -- skewX (float64 0.000211812383858707) +|| +'7550EB853EC32B3F' -- skewY (float64 0.000211812383858704) +|| +'E6100000' -- SRID (int32 4326) +|| +'0100' -- width (uint16 1) +|| +'0100' -- height (uint16 1) +|| +'6' -- hasnodatavalue and isnodata value set to true. +|| +'2' -- first band type (4BUI) +|| +'03' -- novalue==3 +|| +'03' -- pixel(0,0)==3 (same that nodata) +|| +'0' -- hasnodatavalue set to false +|| +'5' -- second band type (16BSI) +|| +'0D00' -- novalue==13 +|| +'0400' -- pixel(0,0)==4 +)::raster +); + +select st_bandisnodata(rast, 1) from dummy_rast where rid = 1; -- Expected true +select st_bandisnodata(rast, 2) from dummy_rast where rid = 1; -- Expected false + + + + + + See Also + , , , + + + + + + ST_BandPath + Returns system file path to a band stored in file system. If no bandnum specified, 1 is assumed. + + + + + + text ST_BandPath + raster rast + integer bandnum=1 + + + + + + Description + + Returns system file path to a band. Throws an error if called with an in db band. + + + + Examples + + + + + + + + See Also + + + + + + + ST_BandPixelType + Returns the type of pixel for given band. If no bandnum specified, 1 is assumed. + + + + + + text ST_BandPixelType + raster rast + integer bandnum=1 + + + + + + Description + + Returns the value that represents no data for the band + There are 11 pixel types. Pixel Types supported are as follows: + + + 1BB - 1-bit boolean + + + + 2BUI - 2-bit unsigned integer + + + + 4BUI - 4-bit unsigned integer + + + + 8BSI - 8-bit signed integer + + + 8BUI - 8-bit unsigned integer + + + 16BSI - 16-bit signed integer + + + 16BUI - 16-bit unsigned integer + + + 32BSI - 32-bit signed integer + + + 32BUI - 32-bit unsigned integer + + + 32BF - 32-bit float + + + 64BF - 64-bit float + + + + + + + Examples + + SELECT ST_BandPixelType(rast,1) As btype1, + ST_BandPixelType(rast,2) As btype2, ST_BandPixelType(rast,3) As btype3 +FROM dummy_rast +WHERE rid = 2; + + btype1 | btype2 | btype3 +--------+--------+-------- + 8BUI | 8BUI | 8BUI + + + + + + See Also + + + + + + + ST_HasNoBand + Returns true if there is no band with given band number. If no band number is specified, then band number 1 is assumed. + + + + + + boolean ST_HasNoBand + raster rast + integer bandnum=1 + + + + + + Description + + Returns true if there is no band with given band number. If no band number is specified, then band number 1 is assumed. + + Availability: 2.0.0 + + + + Examples + + SELECT rid, ST_HasNoBand(rast) As hb1, ST_HasNoBand(rast,2) as hb2, +ST_HasNoBand(rast,4) as hb4, ST_NumBands(rast) As numbands +FROM dummy_rast; + +rid | hb1 | hb2 | hb4 | numbands +-----+-----+-----+-----+---------- +1 | t | t | t | 0 +2 | f | f | t | 3 + + + + + + See Also + + + + + + + Raster Pixel Accessors and Setters + + + + ST_PixelAsPolygon + Returns the geometry that bounds the pixel for a particular row and column. + + + + + + geometry ST_PixelAsPolygon + raster rast + integer columnx + integer rowy + + + + + + Description + + Returns the geometry that bounds the pixel for a particular row and column. + + + + + Examples + +-- get raster pixel polygon +SELECT i,j, ST_AsText(ST_PixelAsPolygon(foo.rast, i,j)) As b1pgeom +FROM dummy_rast As foo + CROSS JOIN generate_series(1,2) As i + CROSS JOIN generate_series(1,1) As j +WHERE rid=2; + + i | j | b1pgeom +---+---+----------------------------------------------------------------------------- + 1 | 1 | POLYGON((3427927.75 5793244,3427927.8 5793244,3427927.8 5793243.95,... + 2 | 1 | POLYGON((3427927.8 5793244,3427927.85 5793244,3427927.85 5793243.95, .. + + + + + See Also + , , + + + + + + + + ST_PixelAsPolygons + Returns the geometry that bounds every pixel of a raster band along with the value, the X and the Y raster coordinates of each pixel. + + + + + + setof record ST_PixelAsPolygons + raster rast + integer band=1 + + + + + + Description + + Returns the geometry that bounds every pixel of a raster band along with the value (double precision), the X and the Y raster coordinates (integers) of each pixel. + + + + + Examples + +-- get raster pixel polygon +SELECT (gv).x, (gv).y, (gv).val, ST_AsText((gv).geom) geom +FROM (SELECT ST_PixelAsPolygons( + ST_SetValue(ST_SetValue(ST_AddBand(ST_MakeEmptyRaster(2, 2, 0, 0, 0.001, -0.001, 0.001, 0.001, 4269), + '8BUI'::text, 1, 0), + 2, 2, 10), + 1, 1, NULL) +) gv +) foo; + + x | y | val | geom +---+---+----------------------------------------------------------------------------- + 1 | 1 | | POLYGON((0 0,0.001 0.001,0.002 0,0.001 -0.001,0 0)) + 1 | 2 | 1 | POLYGON((0.001 -0.001,0.002 0,0.003 -0.001,0.002 -0.002,0.001 -0.001)) + 2 | 1 | 1 | POLYGON((0.001 0.001,0.002 0.002,0.003 0.001,0.002 0,0.001 0.001)) + 2 | 2 | 10 | POLYGON((0.002 0,0.003 0.001,0.004 0,0.003 -0.001,0.002 0)) + + + + + See Also + , , + + + + + + + + ST_Value + Returns the value of a given band in a given columnx, rowy pixel or at a particular geometric point. Band numbers start at 1 and assumed to be 1 if not specified. If exclude_nodata_value is set to false, then all pixels include nodata pixels are considered to intersect and return value. If exclude_nodata_value is not passed in then reads it from metadata of raster. + + + + + + double precision ST_Value + raster rast + geometry pt + boolean exclude_nodata_value=true + + + double precision ST_Value + raster rast + integer bandnum + geometry pt + boolean exclude_nodata_value=true + + + double precision ST_Value + raster rast + integer columnx + integer rowy + boolean exclude_nodata_value=true + + + double precision ST_Value + raster rast + integer bandnum + integer columnx + integer rowy + boolean exclude_nodata_value=true + + + + + + Description + + Returns the value of a given band in a given columnx, rowy pixel or at a given geometry point. Band numbers start at 1 and band is assumed to be 1 if not specified. + If exclude_nodata_value is set to true, then only non nodata pixels are considered. If exclude_nodata_value is set to false, then all pixels are considered. + + Enhanced: 2.0.0 exclude_nodata_value optional argument was added. + + + + Examples + +-- get raster values at particular postgis geometry points +-- the srid of your geometry should be same as for your raster +SELECT rid, ST_Value(rast, foo.pt_geom) As b1pval, ST_Value(rast, 2, foo.pt_geom) As b2pval +FROM dummy_rast CROSS JOIN (SELECT ST_SetSRID(ST_Point(3427927.77, 5793243.76), 0) As pt_geom) As foo +WHERE rid=2; + + rid | b1pval | b2pval +-----+--------+-------- + 2 | 252 | 79 + + +-- general fictitious example using a real table +SELECT rid, ST_Value(rast, 3, sometable.geom) As b3pval +FROM sometable +WHERE ST_Intersects(rast,sometable.geom); + + +SELECT rid, ST_Value(rast, 1, 1, 1) As b1pval, + ST_Value(rast, 2, 1, 1) As b2pval, ST_Value(rast, 3, 1, 1) As b3pval +FROM dummy_rast +WHERE rid=2; + + rid | b1pval | b2pval | b3pval +-----+--------+--------+-------- + 2 | 253 | 78 | 70 + + + +--- Get all values in bands 1,2,3 of each pixel -- +SELECT x, y, ST_Value(rast, 1, x, y) As b1val, + ST_Value(rast, 2, x, y) As b2val, ST_Value(rast, 3, x, y) As b3val +FROM dummy_rast CROSS JOIN +generate_series(1, 1000) As x CROSS JOIN generate_series(1, 1000) As y +WHERE rid = 2 AND x <= ST_Width(rast) AND y <= ST_Height(rast); + + x | y | b1val | b2val | b3val +---+---+-------+-------+------- + 1 | 1 | 253 | 78 | 70 + 1 | 2 | 253 | 96 | 80 + 1 | 3 | 250 | 99 | 90 + 1 | 4 | 251 | 89 | 77 + 1 | 5 | 252 | 79 | 62 + 2 | 1 | 254 | 98 | 86 + 2 | 2 | 254 | 118 | 108 + : + : + + + +--- Get all values in bands 1,2,3 of each pixel same as above but returning the upper left point point of each pixel -- +SELECT ST_AsText(ST_SetSRID( + ST_Point(ST_UpperLeftX(rast) + ST_ScaleX(rast)*x, + ST_UpperLeftY(rast) + ST_ScaleY(rast)*y), + ST_SRID(rast))) As uplpt + , ST_Value(rast, 1, x, y) As b1val, + ST_Value(rast, 2, x, y) As b2val, ST_Value(rast, 3, x, y) As b3val +FROM dummy_rast CROSS JOIN +generate_series(1,1000) As x CROSS JOIN generate_series(1,1000) As y +WHERE rid = 2 AND x <= ST_Width(rast) AND y <= ST_Height(rast); + + uplpt | b1val | b2val | b3val +-----------------------------+-------+-------+------- + POINT(3427929.25 5793245.5) | 253 | 78 | 70 + POINT(3427929.25 5793247) | 253 | 96 | 80 + POINT(3427929.25 5793248.5) | 250 | 99 | 90 +: + + +--- Get a polygon formed by union of all pixels + that fall in a particular value range and intersect particular polygon -- +SELECT ST_AsText(ST_Union(pixpolyg)) As shadow +FROM (SELECT ST_Translate(ST_MakeEnvelope( + ST_UpperLeftX(rast), ST_UpperLeftY(rast), + ST_UpperLeftX(rast) + ST_ScaleX(rast), + ST_UpperLeftY(rast) + ST_ScaleY(rast), 0 + ), ST_ScaleX(rast)*x, ST_ScaleY(rast)*y + ) As pixpolyg, ST_Value(rast, 2, x, y) As b2val + FROM dummy_rast CROSS JOIN +generate_series(1,1000) As x CROSS JOIN generate_series(1,1000) As y +WHERE rid = 2 + AND x <= ST_Width(rast) AND y <= ST_Height(rast)) As foo +WHERE + ST_Intersects( + pixpolyg, + ST_GeomFromText('POLYGON((3427928 5793244,3427927.75 5793243.75,3427928 5793243.75,3427928 5793244))',0) + ) AND b2val != 254; + + + shadow +------------------------------------------------------------------------------------ + MULTIPOLYGON(((3427928 5793243.9,3427928 5793243.85,3427927.95 5793243.85,3427927.95 5793243.9, + 3427927.95 5793243.95,3427928 5793243.95,3427928.05 5793243.95,3427928.05 5793243.9,3427928 5793243.9)),((3427927.95 5793243.9,3427927.95 579324 +3.85,3427927.9 5793243.85,3427927.85 5793243.85,3427927.85 5793243.9,3427927.9 5793243.9,3427927.9 5793243.95, +3427927.95 5793243.95,3427927.95 5793243.9)),((3427927.85 5793243.75,3427927.85 5793243.7,3427927.8 5793243.7,3427927.8 5793243.75 +,3427927.8 5793243.8,3427927.8 5793243.85,3427927.85 5793243.85,3427927.85 5793243.8,3427927.85 5793243.75)), +((3427928.05 5793243.75,3427928.05 5793243.7,3427928 5793243.7,3427927.95 5793243.7,3427927.95 5793243.75,3427927.95 5793243.8,3427 +927.95 5793243.85,3427928 5793243.85,3427928 5793243.8,3427928.05 5793243.8, +3427928.05 5793243.75)),((3427927.95 5793243.75,3427927.95 5793243.7,3427927.9 5793243.7,3427927.85 5793243.7, +3427927.85 5793243.75,3427927.85 5793243.8,3427927.85 5793243.85,3427927.9 5793243.85, +3427927.95 5793243.85,3427927.95 5793243.8,3427927.95 5793243.75))) + + + +--- Checking all the pixels of a large raster tile can take a long time. +--- You can dramatically improve speed at some lose of precision by orders of magnitude +-- by sampling pixels using the step optional parameter of generate_series. +-- This next example does the same as previous but by checking 1 for every 4 (2x2) pixels and putting in the last checked +-- putting in the checked pixel as the value for subsequent 4 + +SELECT ST_AsText(ST_Union(pixpolyg)) As shadow +FROM (SELECT ST_Translate(ST_MakeEnvelope( + ST_UpperLeftX(rast), ST_UpperLeftY(rast), + ST_UpperLeftX(rast) + ST_ScaleX(rast)*2, + ST_UpperLeftY(rast) + ST_ScaleY(rast)*2, 0 + ), ST_ScaleX(rast)*x, ST_ScaleY(rast)*y + ) As pixpolyg, ST_Value(rast, 2, x, y) As b2val + FROM dummy_rast CROSS JOIN +generate_series(1,1000,2) As x CROSS JOIN generate_series(1,1000,2) As y +WHERE rid = 2 + AND x <= ST_Width(rast) AND y <= ST_Height(rast) ) As foo +WHERE + ST_Intersects( + pixpolyg, + ST_GeomFromText('POLYGON((3427928 5793244,3427927.75 5793243.75,3427928 5793243.75,3427928 5793244))',0) + ) AND b2val != 254; + + shadow +------------------------------------------------------------------------------------ + MULTIPOLYGON(((3427927.9 5793243.85,3427927.8 5793243.85,3427927.8 5793243.95, + 3427927.9 5793243.95,3427928 5793243.95,3427928.1 5793243.95,3427928.1 5793243.85,3427928 5793243.85,3427927.9 5793243.85)), + ((3427927.9 5793243.65,3427927.8 5793243.65,3427927.8 5793243.75,3427927.8 5793243.85,3427927.9 5793243.85, + 3427928 5793243.85,3427928 5793243.75,3427928.1 5793243.75,3427928.1 5793243.65,3427928 5793243.65,3427927.9 5793243.65))) + + + + + See Also + , , , , + , , , + , , , + , , , + , + + + + + + ST_SetValue + Returns modified raster resulting from setting the value of a given band in a given columnx, rowy pixel or at a pixel that intersects a particular geometric point. Band numbers start at 1 and assumed to be 1 if not specified. + + + + + + raster ST_SetValue + raster rast + geometry pt + double precision newvalue + + + raster ST_SetValue + raster rast + integer bandnum + geometry pt + double precision newvalue + + + raster ST_SetValue + raster rast + integer columnx + integer rowy + double precision newvalue + + + raster ST_SetValue + raster rast + integer bandnum + integer columnx + integer rowy + double precision newvalue + + + + + + Description + Returns modified raster resulting from setting the specified pixel value to new value for the designed band given the row column location or a geometric point location. + If no band is specified, then band 1 is assumed. + + Setting by geometry currently only works for points. + + + + Examples + + + -- Geometry example +SELECT (foo.geomval).val, ST_AsText(ST_Union((foo.geomval).geom)) +FROM (SELECT ST_DumpAsPolygons( + ST_SetValue(rast,1, + ST_Point(3427927.75, 5793243.95), + 50) + ) As geomval +FROM dummy_rast +where rid = 2) As foo +WHERE (foo.geomval).val < 250 +GROUP BY (foo.geomval).val; + + val | st_astext +-----+------------------------------------------------------------------- + 50 | POLYGON((3427927.75 5793244,3427927.75 5793243.95,3427927.8 579324 ... + 249 | POLYGON((3427927.95 5793243.95,3427927.95 5793243.85,3427928 57932 ... + + + + +-- Store the changed raster -- + UPDATE dummy_rast SET rast = ST_SetValue(rast,1, ST_Point(3427927.75, 5793243.95),100) + WHERE rid = 2 ; + + + + + See Also + , + + + + + + Raster Editors + + + + ST_SetGeoReference + Set Georeference 6 georeference parameters in a single call. Numbers should be separated by white space. Accepts inputs in GDAL or ESRI format. Default is GDAL. + + + + + + raster ST_SetGeoReference + raster rast + text georefcoords + text format=GDAL + + + + + + Description + + Set Georeference 6 georeference parameters in a single call. Accepts inputs in 'GDAL' or 'ESRI' format. Default is GDAL. If 6 coordinates are not provided will return null. + Difference between format representations is as follows: + GDAL: +scalex skewy skewx scaley upperleftx upperlefty + ESRI: +scalex skewy skewx scaley upperleftx + scalex*0.5 upperlefty + scaley*0.5 + + + + Examples + + UPDATE dummy_rast SET rast = ST_SetGeoReference(rast, '2 0 0 3 0.5 0.5','GDAL') + WHERE rid=1; + +-- same coordinates set in 'ESRI' format +UPDATE dummy_rast SET rast = ST_SetGeoReference(rast, '2 0 0 3 1.5 2','ESRI') + WHERE rid=1; + + + + + See Also + , , , , + + + + + + ST_SetRotation + Set the rotation of the raster in radian. + + + + + + float8 ST_SetRotation + raster rast + float8 rotation + + + + + + Description + + Uniformly rotate the raster. Rotation is in radian. Refer to World File for more details. + + + + Examples + + SELECT + ST_ScaleX(rast1), ST_ScaleY(rast1), ST_SkewX(rast1), ST_SkewY(rast1), + ST_ScaleX(rast2), ST_ScaleY(rast2), ST_SkewX(rast2), ST_SkewY(rast2) +FROM ( + SELECT ST_SetRotation(rast, 15) AS rast1, rast as rast2 FROM dummy_rast +) AS foo; + st_scalex | st_scaley | st_skewx | st_skewy | st_scalex | st_scaley | st_skewx | st_skewy +---------------------+---------------------+--------------------+--------------------+-----------+-----------+----------+---------- + -1.51937582571764 | -2.27906373857646 | 1.95086352047135 | 1.30057568031423 | 2 | 3 | 0 | 0 + -0.0379843956429411 | -0.0379843956429411 | 0.0325143920078558 | 0.0325143920078558 | 0.05 | -0.05 | 0 | 0 + + + + + + See Also + , , , , + + + + + + + ST_SetScale + Sets the X and Y size of pixels in units of coordinate reference system. Number units/pixel width/height. + + + + + + raster ST_SetScale + raster rast + float8 xy + + + + raster ST_SetScale + raster rast + float8 x + float8 y + + + + + + Description + + Sets the X and Y size of pixels in units of coordinate reference system. Number units/pixel width/height. If + only one unit passed in, assumed X and Y are the same number. + + ST_SetScale is different from in that ST_SetScale do not resample the raster to match the raster extent. It only changes the metadata (or georeference) of the raster to correct an originally mis-specified scaling. ST_Rescale results in a raster having different width and height computed to fit the geographic extent of the input raster. ST_SetScale do not modify the width, nor the height of the raster. + + Changed: 2.0.0 In WKTRaster versions this was called ST_SetPixelSize. This was changed in 2.0.0. + + + + Examples + + UPDATE dummy_rast + SET rast = ST_SetScale(rast, 1.5) +WHERE rid = 2; + +SELECT ST_ScaleX(rast) As pixx, ST_ScaleY(rast) As pixy, Box3D(rast) As newbox +FROM dummy_rast +WHERE rid = 2; + + pixx | pixy | newbox +------+------+---------------------------------------------- + 1.5 | 1.5 | BOX(3427927.75 5793244 0, 3427935.25 5793251.5 0) + + UPDATE dummy_rast + SET rast = ST_SetScale(rast, 1.5, 0.55) +WHERE rid = 2; + +SELECT ST_ScaleX(rast) As pixx, ST_ScaleY(rast) As pixy, Box3D(rast) As newbox +FROM dummy_rast +WHERE rid = 2; + + pixx | pixy | newbox +------+------+-------------------------------------------- + 1.5 | 0.55 | BOX(3427927.75 5793244 0,3427935.25 5793247 0) + + + + + + See Also + , , + + + + + + ST_SetSkew + Sets the georeference X and Y skew (or rotation parameter). If only one is passed in, sets X and Y to the same value. + + + + + + raster ST_SetSkew + raster rast + float8 skewxy + + + raster ST_SetSkew + raster rast + float8 skewx + float8 skewy + + + + + + Description + + Sets the georeference X and Y skew (or rotation parameter). If only one is passed in, sets X and Y to the same value. Refer to World File + for more details. + + + + Examples + + +-- Example 1 +UPDATE dummy_rast SET rast = ST_SetSkew(rast,1,2) WHERE rid = 1; +SELECT rid, ST_SkewX(rast) As skewx, ST_SkewY(rast) As skewy, + ST_GeoReference(rast) as georef +FROM dummy_rast WHERE rid = 1; + +rid | skewx | skewy | georef +----+-------+-------+-------------- + 1 | 1 | 2 | 2.0000000000 + : 2.0000000000 + : 1.0000000000 + : 3.0000000000 + : 0.5000000000 + : 0.5000000000 + + + + +-- Example 2 set both to same number: +UPDATE dummy_rast SET rast = ST_SetSkew(rast,0) WHERE rid = 1; +SELECT rid, ST_SkewX(rast) As skewx, ST_SkewY(rast) As skewy, + ST_GeoReference(rast) as georef +FROM dummy_rast WHERE rid = 1; + + rid | skewx | skewy | georef +-----+-------+-------+-------------- + 1 | 0 | 0 | 2.0000000000 + : 0.0000000000 + : 0.0000000000 + : 3.0000000000 + : 0.5000000000 + : 0.5000000000 + + + + + + + See Also + , , , + + + + + + ST_SetSRID + + Sets the SRID of a raster to a particular integer srid defined in the spatial_ref_sys table. + + + + + + raster ST_SetSRID + + raster + rast + + integer + srid + + + + + + Description + + Sets the SRID on a raster to a particular integer value. + + + This function does not transform the raster in any way - + it simply sets meta data defining the spatial ref of the coordinate reference system that it's currently in. + Useful for transformations later. + + + + + + See Also + + , + + + + + + + ST_SetUpperLeft + Sets the value of the upper left corner of the pixel to projected X and Y coordinates. + + + + + + raster ST_SetUpperLeft + raster rast + double precision x + double precision y + + + + + + Description + + Set the value of the upper left corner of raster to the projected X coordinates + + + + Examples + + +SELECT ST_SetUpperLeft(rast,-71.01,42.37) +FROM dummy_rast +WHERE rid = 2; + + + + + + See Also + , + + + + + + ST_Resample + Resample a raster using a specified resampling algorithm, new dimensions, an arbitrary grid corner and a set of raster georeferencing attributes defined or borrowed from another raster. New pixel values are computed using the NearestNeighbor (english or american spelling), Bilinear, Cubic, CubicSpline or Lanczos resampling algorithm. Default is NearestNeighbor. + + + + + + raster ST_Resample + raster rast + integer width + integer height + integer srid=same_as_rast + double precision gridx=NULL + double precision gridy=NULL + double precision skewx=0 + double precision skewy=0 + text algorithm=NearestNeighbour + double precision maxerr=0.125 + + + + raster ST_Resample + raster rast + integer srid=NULL + double precision scalex=0 + double precision scaley=0 + double precision gridx=NULL + double precision gridy=NULL + double precision skewx=0 + double precision skewy=0 + text algorithm=NearestNeighbor + double precision maxerr=0.125 + + + + raster ST_Resample + raster rast + raster ref + text algorithm=NearestNeighbour + double precision maxerr=0.125 + boolean usescale=true + + + + raster ST_Resample + raster rast + raster ref + boolean usescale + text algorithm=NearestNeighbour + double precision maxerr=0.125 + + + + + + Description + + Resample a raster using a specified resampling algorithm, new dimensions (width & height), a grid corner (gridx & gridy) and a set of raster georeferencing attributes (scalex, scaley, skewx & skewy) defined or borrowed from another raster. + + New pixel values are computed using the NearestNeighbor (english or american spelling), Bilinear, Cubic, CubicSpline or Lanczos resampling algorithm. Default is NearestNeighbor which is the fastest but produce the worst interpolation. + + A maxerror percent of 0.125 is used if no maxerr is specified. + + Only works if raster is in a known spatial reference system (SRID). + Refer to: GDAL Warp resampling methods for more details. + Availability: 2.0.0 Requires GDAL 1.6.1+ + + + + Examples + + SELECT ST_Width(orig) As orig_width, ST_Width(reduce_100) As new_width + FROM ( + SELECT rast As orig, ST_Resample(rast,100,100) As reduce_100 + FROM aerials.boston + WHERE ST_Intersects(rast, + ST_Transform( + ST_MakeEnvelope(-71.128, 42.2392,-71.1277, 42.2397, 4326),26986) ) + limit 1 ) As foo; + orig_width | new_width +------------+------------- + 200 | 100 + + + + + See Also + , + + + + + + ST_Rescale + Resample a raster by adjusting only its scale (or pixel size). New pixel values are computed using the NearestNeighbor (english or american spelling), Bilinear, Cubic, CubicSpline or Lanczos resampling algorithm. Default is NearestNeighbor. + + + + + + + raster ST_Rescale + raster rast + double precision scalexy + text algorithm=NearestNeighbour + double precision maxerr=0.125 + + + + raster ST_Rescale + raster rast + double precision scalex + double precision scaley + text algorithm=NearestNeighbour + double precision maxerr=0.125 + + + + + + + Description + + Resample a raster by adjusting only its scale (or pixel size). New pixel values are computed using the NearestNeighbor (english or american spelling), Bilinear, Cubic, CubicSpline or Lanczos resampling algorithm. The default is NearestNeighbor which is the fastest but results in the worst interpolation. + + scalex and scaley define the new pixel size. scaley must often be negative to get well oriented raster. + + When the new scalex or scaley is not a divisor of the raster width or height, the extent of the resulting raster is expanded to encompass the extent of the provided raster. + + A maxerror percent of 0.125 is used if no maxerr is specified. + + Refer to: GDAL Warp resampling methods for more details. + + Only works if raster is in a known spatial reference system (SRID). + + ST_Rescale is different from in that ST_SetScale do not resample the raster to match the raster extent. ST_SetScale only changes the metadata (or georeference) of the raster to correct an originally mis-specified scaling. ST_Rescale results in a raster having different width and height computed to fit the geographic extent of the input raster. ST_SetScale do not modify the width, nor the height of the raster. + + Availability: 2.0.0 Requires GDAL 1.6.1+ + + + + Examples + A simple example rescaling a raster from a pixel size of 0.001 degree to a pixel size of 0.0015 degree. + + -- the original raster pixel size +SELECT ST_PixelWidth(ST_AddBand(ST_MakeEmptyRaster(100, 100, 0, 0, 0.001, -0.001, 0, 0, 4269), '8BUI'::text, 1, 0)) width + + width +---------- +0.001 + +-- the rescaled raster raster pixel size +SELECT ST_PixelWidth(ST_Rescale(ST_AddBand(ST_MakeEmptyRaster(100, 100, 0, 0, 0.001, -0.001, 0, 0, 4269), '8BUI'::text, 1, 0), 0.0015)) width + + width +---------- +0.0015 + + + + + See Also + , , , , + + + + + + ST_Reskew + Resample a raster by adjusting only its skew (or rotation parameters). New pixel values are computed using the NearestNeighbor (english or american spelling), Bilinear, Cubic, CubicSpline or Lanczos resampling algorithm. Default is NearestNeighbor. + + + + + + + raster ST_Reskew + raster rast + double precision skewxy + text algorithm=NearestNeighbour + double precision maxerr=0.125 + + + + raster ST_Reskew + raster rast + double precision skewx + double precision skewy + text algorithm=NearestNeighbour + double precision maxerr=0.125 + + + + + + + Description + + Resample a raster by adjusting only its skew (or rotation parameters). New pixel values are computed using the NearestNeighbor (english or american spelling), Bilinear, Cubic, CubicSpline or Lanczos resampling algorithm. The default is NearestNeighbor which is the fastest but results in the worst interpolation. + + skewx and skewy define the new skew. + + The extent of the new raster will encompass the extent of the provided raster. + + A maxerror percent of 0.125 if no maxerr is specified. + + Only works if raster is in a known spatial reference system (SRID). + + Refer to: GDAL Warp resampling methods for more details. + + ST_Reskew is different from in that ST_SetSkew do not resample the raster to match the raster extent. ST_SetSkew only changes the metadata (or georeference) of the raster to correct an originally mis-specified skew. ST_Reskew results in a raster having different width and height computed to fit the geographic extent of the input raster. ST_SetSkew do not modify the width, nor the height of the raster. + + Availability: 2.0.0 Requires GDAL 1.6.1+ + + + + Examples + A simple example reskewing a raster from a skew of 0.0 to a skew of 0.0015. + + -- the original raster pixel size +SELECT ST_Rotation(ST_AddBand(ST_MakeEmptyRaster(100, 100, 0, 0, 0.001, -0.001, 0, 0, 4269), '8BUI'::text, 1, 0)) + +-- the rescaled raster raster pixel size +SELECT ST_Rotation(ST_Reskew(ST_AddBand(ST_MakeEmptyRaster(100, 100, 0, 0, 0.001, -0.001, 0, 0, 4269), '8BUI'::text, 1, 0), 0.0015)) + + + + + + See Also + , , , , , , + + + + + + ST_SnapToGrid + Resample a raster by snapping it to a grid. New pixel values are computed using the NearestNeighbor (english or american spelling), Bilinear, Cubic, CubicSpline or Lanczos resampling algorithm. Default is NearestNeighbor. + + + + + + + raster ST_SnapToGrid + raster rast + double precision gridx + double precision gridy + text algorithm=NearestNeighbour + double precision maxerr=0.125 + double precision scalex=DEFAULT 0 + double precision scaley=DEFAULT 0 + + + + raster ST_SnapToGrid + raster rast + double precision gridx + double precision gridy + double precision scalex + double precision scaley + text algorithm=NearestNeighbour + double precision maxerr=0.125 + + + + raster ST_SnapToGrid + raster rast + double precision gridx + double precision gridy + double precision scalexy + text algorithm=NearestNeighbour + double precision maxerr=0.125 + + + + + + + Description + + Resample a raster by snapping it to a grid defined by an arbitrary pixel corner (gridx & gridy) and optionally a pixel size (scalex & scaley). New pixel values are computed using the NearestNeighbor (english or american spelling), Bilinear, Cubic, CubicSpline or Lanczos resampling algorithm. The default is NearestNeighbor which is the fastest but results in the worst interpolation. + + gridx and gridy define any arbitrary pixel corner of the new grid. This is not necessarily the upper left corner of the new raster and it does not have to be inside or on the edge of the new raster extent. + + You can optionnal define the pixel size of the new grid with scalex and scaley. + The extent of the new raster will encompass the extent of the provided raster. + + A maxerror percent of 0.125 if no maxerr is specified. + + Only works if raster is in a known spatial reference system (SRID). + + Refer to: GDAL Warp resampling methods for more details. + + Use if you need more control over the grid parameters. + + Availability: 2.0.0 Requires GDAL 1.6.1+ + + + + Examples + A simple example snapping a raster to a slightly different grid. + + -- the original raster pixel size +SELECT ST_UpperLeftX(ST_AddBand(ST_MakeEmptyRaster(10, 10, 0, 0, 0.001, -0.001, 0, 0, 4269), '8BUI'::text, 1, 0)) + +-- the rescaled raster raster pixel size +SELECT ST_UpperLeftX(ST_SnapToGrid(ST_AddBand(ST_MakeEmptyRaster(10, 10, 0, 0, 0.001, -0.001, 0, 0, 4269), '8BUI'::text, 1, 0), 0.0002, 0.0002)) + + + + + + See Also + , , , + + + + + + ST_Transform + Reprojects a raster in a known spatial reference system to another known spatial reference system using specified resampling algorithm. Options are NearestNeighbor, Bilinear, Cubic, CubicSpline, Lanczos defaulting to NearestNeighbor. + + + + + + raster ST_Transform + raster rast + integer srid + double precision scalex + double precision scaley + text algorithm=NearestNeighbor + double precision maxerr=0.125 + + + + raster ST_Transform + raster rast + integer srid + text algorithm=NearestNeighbor + double precision maxerr=0.125 + double precision scalex + double precision scaley + + + + + + Description + + Reprojects a raster in a known spatial reference system to another known spatial reference system using specified pixel warping algorithm. + Uses 'NearestNeighbor' if no algorithm is specified and maxerror percent of 0.125 if no maxerr is specified. + Algorithm options are: 'NearestNeighbor', 'Bilinear', 'Cubic', 'CubicSpline', and 'Lanczos'. Refer to: GDAL Warp resampling methods for more details. + Availability: 2.0.0 Requires GDAL 1.6.1+ + If you find your transformation support is not working right, you may need to set the environment variable PROJSO to the .so or .dll projection library + your PostGIS is using. This just needs to have the name of the file. So for example on windows, you would in Control Panel -> System -> Environment Variables add a system variable called PROJSO and set it to libproj.dll (if you are using proj 4.6.1). You'll have to restart your PostgreSQL service/daemon after this change. + + + + Examples + + SELECT ST_Width(mass_stm) As w_before, ST_Width(wgs_84) As w_after, + ST_Height(mass_stm) As h_before, ST_Height(wgs_84) As h_after + FROM + ( SELECT rast As mass_stm, ST_Transform(rast,4326) As wgs_84 + , ST_Transform(rast,4326, 'Bilinear') AS wgs_84_bilin + FROM aerials.o_2_boston + WHERE ST_Intersects(rast, + ST_Transform(ST_MakeEnvelope(-71.128, 42.2392,-71.1277, 42.2397, 4326),26986) ) + LIMIT 1) As foo; + + w_before | w_after | h_before | h_after +----------+---------+----------+--------- + 200 | 228 | 200 | 170 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + See Also + , + + + + + + Raster Band Editors + + + + ST_SetBandNoDataValue + Sets the value for the given band that represents no data. Band 1 is assumed if no band is specified. To mark a band as having no nodata value, set the nodata value = NULL. + + + + + + raster ST_SetBandNoDataValue + raster rast + double precision nodatavalue + + + + raster ST_SetBandNoDataValue + raster rast + integer band + double precision nodatavalue + boolean forcechecking=false + + + + + + + Description + + Sets the value that represents no data for the band. Band 1 is assumed if not specified. This will effect and results. + + + + Examples + + -- change just first band no data value +UPDATE dummy_rast + SET rast = ST_SetBandNoDataValue(rast,1, 254) +WHERE rid = 2; + +-- change no data band value of bands 1,2,3 +UPDATE dummy_rast + SET rast = + ST_SetBandNoDataValue( + ST_SetBandNoDataValue( + ST_SetBandNoDataValue( + rast,1, 254) + ,2,99), + 3,108) + WHERE rid = 2; + +-- wipe out the nodata value this will ensure all pixels are considered for all processing functions +UPDATE dummy_rast + SET rast = ST_SetBandNoDataValue(rast,1, NULL) +WHERE rid = 2; + + + + + + See Also + , + + + + + + ST_SetBandIsNoData + Sets the isnodata flag of the band to TRUE. You may + want to call this function if ST_BandIsNoData(rast, band) != + ST_BandIsNodata(rast, band, TRUE). This is, if the isnodata flag + is dirty. Band 1 is assumed if no band is specified. + + + + + + + integer ST_SetBandIsNoData + raster rast + integer band=1 + + + + + + Description + + Sets the isnodata flag for the band to true. Band 1 is + assumed if not specified. This function should be called only + when the flag is considered dirty. This is, when the result + calling is different using + TRUE as last argument and without using it + + Availability: 2.0.0 + Currently, the loader (raster2pgsql.py) is not able + to set the isnodata flag for bands. So, this is the fastest way + to set it to TRUE, without changing any other band value + + + + + Examples + + +-- Create dummy table with one raster column +create table dummy_rast (rid integer, rast raster); + +-- Add raster with two bands, one pixel/band. In the first band, nodatavalue = pixel value = 3. +-- In the second band, nodatavalue = 13, pixel value = 4 +insert into dummy_rast values(1, +( +'01' -- little endian (uint8 ndr) +|| +'0000' -- version (uint16 0) +|| +'0200' -- nBands (uint16 0) +|| +'17263529ED684A3F' -- scaleX (float64 0.000805965234044584) +|| +'F9253529ED684ABF' -- scaleY (float64 -0.00080596523404458) +|| +'1C9F33CE69E352C0' -- ipX (float64 -75.5533328537098) +|| +'718F0E9A27A44840' -- ipY (float64 49.2824585505576) +|| +'ED50EB853EC32B3F' -- skewX (float64 0.000211812383858707) +|| +'7550EB853EC32B3F' -- skewY (float64 0.000211812383858704) +|| +'E6100000' -- SRID (int32 4326) +|| +'0100' -- width (uint16 1) +|| +'0100' -- height (uint16 1) +|| +'4' -- hasnodatavalue set to true, isnodata value set to false (when it should be true) +|| +'2' -- first band type (4BUI) +|| +'03' -- novalue==3 +|| +'03' -- pixel(0,0)==3 (same that nodata) +|| +'0' -- hasnodatavalue set to false +|| +'5' -- second band type (16BSI) +|| +'0D00' -- novalue==13 +|| +'0400' -- pixel(0,0)==4 +)::raster +); + +select st_bandisnodata(rast, 1) from dummy_rast where rid = 1; -- Expected false +select st_bandisnodata(rast, 1, TRUE) from dummy_rast where rid = 1; -- Expected true + +-- The isnodata flag is dirty. We are going to set it to true +update dummy_rast set rast = st_setbandisnodata(rast, 1) where rid = 1; + + +select st_bandisnodata(rast, 1) from dummy_rast where rid = 1; -- Expected true + + + + + + + See Also + , , , + + + + + + Raster Band Statistics and Analytics + + + ST_Count + Returns the number of pixels in a given band of a raster or raster coverage. If no band is specified defaults to band 1. If exclude_nodata_value is set to true, will only count pixels that are not equal to the nodata value. + + + + + + bigint ST_Count + raster rast + integer nband=1 + boolean exclude_nodata_value=true + + + bigint ST_Count + raster rast + boolean exclude_nodata_value + + + bigint ST_Count + text rastertable + text rastercolumn + integer nband=1 + boolean exclude_nodata_value=true + + + bigint ST_Count + text rastertable + text rastercolumn + boolean exclude_nodata_value + + + + + + Description + + Returns the number of pixels in a given band of a raster or raster coverage. If no band is specified nband defaults to 1. + If exclude_nodata_value is set to true, will only count pixels with value not equal to the nodata value of the raster. Set exclude_nodata_value to false to get count all pixels + Availability: 2.0.0 + + + + Examples + + +--example will count all pixels not 249 and one will count all pixels. -- +SELECT rid, ST_Count(ST_SetBandNoDataValue(rast,249)) As exclude_nodata, + ST_Count(ST_SetBandNoDataValue(rast,249),false) As include_nodata + FROM dummy_rast WHERE rid=2; + +rid | exclude_nodata | include_nodata +-----+----------------+---------------- + 2 | 23 | 25 + + + + + See Also + + + + + + + ST_Histogram + Returns a set of histogram summarizing a raster or raster coverage data distribution separate bin ranges. Number of bins are autocomputed if not specified. + + + + + + SETOF histogram ST_Histogram + raster rast + integer nband=1 + boolean exclude_nodata_value=true + integer bins=autocomputed + double precision[] width=NULL + boolean right=false + + + + SETOF histogram ST_Histogram + raster rast + integer nband + integer bins + double precision[] width=NULL + boolean right=false + + + + SETOF histogram ST_Histogram + raster rast + integer nband + boolean exclude_nodata_value + integer bins + boolean right + + + + SETOF histogram ST_Histogram + raster rast + integer nband + integer bins + boolean right + + + + SETOF histogram ST_Histogram + text rastertable + text rastercolumn + integer nband + integer bins + boolean right + + + + SETOF histogram ST_Histogram + text rastertable + text rastercolumn + integer nband + boolean exclude_nodata_value + integer bins + boolean right + + + + SETOF histogram ST_Histogram + text rastertable + text rastercolumn + integer nband=1 + boolean exclude_nodata_value=true + integer bins=autocomputed + double precision[] width=NULL + boolean right=false + + + + SETOF histogram ST_Histogram + text rastertable + text rastercolumn + integer nband=1 + integer bins + double precision[] width=NULL + boolean right=false + + + + + + Description + + Returns set of histogram records consisting of min,max, count, percent for a given raster band for each bin. If no band is specified nband defaults to 1. + By default only considers pixel values not equal to the nodata value . Set exclude_nodata_value to false to get count all pixels. + + + + width double precision[] + width: an array indicating the width of each category/bin. If the number of bins is greater than the number of widths, the widths are repeated. + Example: 9 bins, widths are [a, b, c] will have the output be [a, b, c, a, b, c, a, b, c] + + + bins integer + Number of breakouts -- this is the number of records you'll get back from the function if specified. If not specified + then the number of breakouts is autocomputed. + + + right boolean + compute the histogram from the right rather than from the left (default). This changes the criteria for evaluating a value x from [a, b) to (a, b] + + + Availability: 2.0.0 + + + + Example: Single raster tile - compute histograms for bands 1, 2, 3 and autocompute bins + SELECT band, (stats).* +FROM (SELECT rid, band, ST_Histogram(rast, band) As stats + FROM dummy_rast CROSS JOIN generate_series(1,3) As band + WHERE rid=2) As foo; + + band | min | max | count | percent +------+-------+-------+-------+--------- + 1 | 249 | 250 | 2 | 0.08 + 1 | 250 | 251 | 2 | 0.08 + 1 | 251 | 252 | 1 | 0.04 + 1 | 252 | 253 | 2 | 0.08 + 1 | 253 | 254 | 18 | 0.72 + 2 | 78 | 113.2 | 11 | 0.44 + 2 | 113.2 | 148.4 | 4 | 0.16 + 2 | 148.4 | 183.6 | 4 | 0.16 + 2 | 183.6 | 218.8 | 1 | 0.04 + 2 | 218.8 | 254 | 5 | 0.2 + 3 | 62 | 100.4 | 11 | 0.44 + 3 | 100.4 | 138.8 | 5 | 0.2 + 3 | 138.8 | 177.2 | 4 | 0.16 + 3 | 177.2 | 215.6 | 1 | 0.04 + 3 | 215.6 | 254 | 4 | 0.16 + + + + Example: Just band 2 but for 6 bins + SELECT (stats).* +FROM (SELECT rid, ST_Histogram(rast, 2,6) As stats + FROM dummy_rast + WHERE rid=2) As foo; + + min | max | count | percent +------------+------------+-------+--------- + 78 | 107.333333 | 9 | 0.36 + 107.333333 | 136.666667 | 6 | 0.24 + 136.666667 | 166 | 0 | 0 + 166 | 195.333333 | 4 | 0.16 + 195.333333 | 224.666667 | 1 | 0.04 + 224.666667 | 254 | 5 | 0.2 +(6 rows) + +-- Same as previous but we explicitly control the pixel value range of each bin. +SELECT (stats).* +FROM (SELECT rid, ST_Histogram(rast, 2,6,ARRAY[0.5,1,4,100,5]) As stats + FROM dummy_rast + WHERE rid=2) As foo; + + min | max | count | percent +-------+-------+-------+---------- + 78 | 78.5 | 1 | 0.08 + 78.5 | 79.5 | 1 | 0.04 + 79.5 | 83.5 | 0 | 0 + 83.5 | 183.5 | 17 | 0.0068 + 183.5 | 188.5 | 0 | 0 + 188.5 | 254 | 6 | 0.003664 +(6 rows) + + + + See Also + , , + + + + + + ST_Quantile + Compute quantiles for a raster or raster table coverage in the context of the sample or population. Thus, a value could be examined to be at the raster's 25%, 50%, 75% percentile. + + + + + + SETOF quantile ST_Quantile + raster rast + integer nband=1 + boolean exclude_nodata_value=true + double precision[] quantiles=NULL + + + SETOF quantile ST_Quantile + raster rast + double precision[] quantiles + + + SETOF quantile ST_Quantile + raster rast + integer nband + double precision[] quantiles + + + double precision ST_Quantile + raster rast + double precision quantile + + + double precision ST_Quantile + raster rast + boolean exclude_nodata_value + double precision quantile=NULL + + + double precision ST_Quantile + raster rast + integer nband + double precision quantile + + + double precision ST_Quantile + raster rast + integer nband + boolean exclude_nodata_value + double precision quantile + + + double precision ST_Quantile + raster rast + integer nband + double precision quantile + + + + + setof quantile ST_Quantile + text rastertable + text rastercolumn + integer nband=1 + boolean exclude_nodata_value=true + double precision[] quantiles=NULL + + + setof quantile ST_Quantile + text rastertable + text rastercolumn + integer nband + double precision[] quantiles + + + + + + Description + + Compute quantiles for a raster or raster table coverage in the context of the sample or population. Thus, a value could be examined to be at the raster's 25%, 50%, 75% percentile. + If exclude_nodata_value is set to false, will also count pixels with no data. + Availability: 2.0.0 + + + + Examples + + +UPDATE dummy_rast SET rast = ST_SetBandNoDataValue(rast,249) WHERE rid=2; +--Example will consider only pixels of band 1 that are not 249 and in named quantiles -- + +SELECT (pvq).* +FROM (SELECT ST_Quantile(rast, ARRAY[0.25,0.75]) As pvq + FROM dummy_rast WHERE rid=2) As foo + ORDER BY (pvq).quantile; + + quantile | value +----------+------- + 0.25 | 253 + 0.75 | 254 + +SELECT ST_Quantile(rast, 0.75) As value + FROM dummy_rast WHERE rid=2; + +value +------ + 254 + + +--real live example. Quantile of all pixels in band 2 intersecting a geometry +SELECT rid, (ST_Quantile(rast,2)).* As pvc + FROM o_4_boston + WHERE ST_Intersects(rast, + ST_GeomFromText('POLYGON((224486 892151,224486 892200,224706 892200,224706 892151,224486 892151))',26986) + ) +ORDER BY value, quantile,rid +; + + + rid | quantile | value +-----+----------+------- + 1 | 0 | 0 + 2 | 0 | 0 + 14 | 0 | 1 + 15 | 0 | 2 + 14 | 0.25 | 37 + 1 | 0.25 | 42 + 15 | 0.25 | 47 + 2 | 0.25 | 50 + 14 | 0.5 | 56 + 1 | 0.5 | 64 + 15 | 0.5 | 66 + 2 | 0.5 | 77 + 14 | 0.75 | 81 + 15 | 0.75 | 87 + 1 | 0.75 | 94 + 2 | 0.75 | 106 + 14 | 1 | 199 + 1 | 1 | 244 + 2 | 1 | 255 + 15 | 1 | 255 + + + + + See Also + , + + + + + + ST_SummaryStats + Returns summary stats consisting of count,sum,mean,stddev,min,max for a given raster band of a raster or raster coverage. Band 1 is assumed is no band is specified. + + + + + + summarystats ST_SummaryStats + text rastertable + text rastercolumn + boolean exclude_nodata_value + + + + summarystats ST_SummaryStats + raster rast + boolean exclude_nodata_value + + + + summarystats ST_SummaryStats + text rastertable + text rastercolumn + integer nband=1 + boolean exclude_nodata_value=true + + + + summarystats ST_SummaryStats + raster rast + integer nband + boolean exclude_nodata_value + + + + + + + + Description + + Returns summarystats consisting of count, sum, mean, stddev, min, max for a given raster band of a raster or raster coverage. If no band is specified nband defaults to 1. + + By default only considers pixel values not equal to the nodata value. Set exclude_nodata_value to false to get count of all pixels. + + By default will sample all pixels. To get faster response, set sample_percent to lower than 1 + Availability: 2.0.0 + + + + Example: Single raster tile + +SELECT rid, band, (stats).* +FROM (SELECT rid, band, ST_SummaryStats(rast, band) As stats + FROM dummy_rast CROSS JOIN generate_series(1,3) As band + WHERE rid=2) As foo; + + rid | band | count | sum | mean | stddev | min | max +-----+------+-------+------+------------+-----------+-----+----- + 2 | 1 | 23 | 5821 | 253.086957 | 1.248061 | 250 | 254 + 2 | 2 | 25 | 3682 | 147.28 | 59.862188 | 78 | 254 + 2 | 3 | 25 | 3290 | 131.6 | 61.647384 | 62 | 254 + + + + + Example: Summarize pixels that intersect buildings of interest + This example took 574ms on PostGIS windows 64-bit with all of Boston Buildings +and aerial Tiles (tiles each 150x150 pixels ~ 134,000 tiles), ~102,000 building records + WITH +-- our features of interest + feat AS (SELECT gid As building_id, geom_26986 As geom FROM buildings AS b + WHERE gid IN(100, 103,150) + ), +-- clip band 2 of raster tiles to boundaries of builds +-- then get stats for these clipped regions + b_stats AS + (SELECT building_id, (stats).* +FROM (SELECT building_id, ST_SummaryStats(ST_Clip(rast,2,geom)) As stats + FROM aerials.boston + INNER JOIN feat + ON ST_Intersects(feat.geom,rast) + ) As foo + ) +-- finally summarize stats +SELECT building_id, SUM(count) As num_pixels + , MIN(min) As min_pval + , MAX(max) As max_pval + , SUM(mean*count)/SUM(count) As avg_pval + FROM b_stats + WHERE count > 0 + GROUP BY building_id + ORDER BY building_id; + building_id | num_pixels | min_pval | max_pval | avg_pval +-------------+------------+----------+----------+------------------ + 100 | 1090 | 1 | 255 | 61.0697247706422 + 103 | 655 | 7 | 182 | 70.5038167938931 + 150 | 895 | 2 | 252 | 185.642458100559 + + + + Example: Raster coverage + +-- stats for each band -- +SELECT band, (stats).* +FROM (SELECT band, ST_SummaryStats('o_4_boston','rast', band) As stats + FROM generate_series(1,3) As band) As foo; + + band | count | sum | mean | stddev | min | max +------+---------+--------+------------------+------------------+-----+----- + 1 | 8450000 | 725799 | 82.7064349112426 | 45.6800222638537 | 0 | 255 + 2 | 8450000 | 700487 | 81.4197705325444 | 44.2161184161765 | 0 | 255 + 3 | 8450000 | 575943 | 74.682739408284 | 44.2143885481407 | 0 | 255 + +-- For a table -- will get better speed if set sampling to less than 100% +-- Here we set to 25% and get a much faster answer +SELECT band, (stats).* +FROM (SELECT band, ST_SummaryStats('o_4_boston','rast', band,true,0.25) As stats + FROM generate_series(1,3) As band) As foo; + + band | count | sum | mean | stddev | min | max +------+---------+--------+------------------+------------------+-----+----- + 1 | 2112500 | 180686 | 82.6890480473373 | 45.6961043857248 | 0 | 255 + 2 | 2112500 | 174571 | 81.448503668639 | 44.2252623171821 | 0 | 255 + 3 | 2112500 | 144364 | 74.6765884023669 | 44.2014869384578 | 0 | 255 + + + + + See Also + +, +, + + + + + + + ST_ValueCount + Returns a set of records containing a pixel band value and count of the number of pixels in a given band of a raster (or a raster coverage) that have a given set of values. If no band is specified defaults to band 1. By default nodata value pixels are not counted. + and all other values in the pixel are output and pixel band values are rounded to the nearest integer. + + + + + + SETOF record ST_ValueCount + raster rast + integer nband=1 + boolean exclude_nodata_value=true + double precision[] searchvalues=NULL + double precision roundto=0 + double precision OUT value + integer OUT count + + + SETOF record ST_ValueCount + raster rast + integer nband + double precision[] searchvalues + double precision roundto=0 + double precision OUT value + integer OUT count + + + SETOF record ST_ValueCount + raster rast + double precision[] searchvalues + double precision roundto=0 + double precision OUT value + integer OUT count + + + + bigint ST_ValueCount + raster rast + double precision searchvalue + double precision roundto=0 + + + + bigint ST_ValueCount + raster rast + integer nband + boolean exclude_nodata_value + double precision searchvalue + double precision roundto=0 + + + + bigint ST_ValueCount + raster rast + integer nband + double precision searchvalue + double precision roundto=0 + + + + SETOF record ST_ValueCount + text rastertable + text rastercolumn + integer nband=1 + boolean exclude_nodata_value=true + double precision[] searchvalues=NULL + double precision roundto=0 + double precision OUT value + integer OUT count + + + SETOF record ST_ValueCount + text rastertable + text rastercolumn + double precision[] searchvalues + double precision roundto=0 + double precision OUT value + integer OUT count + + + SETOF record ST_ValueCount + text rastertable + text rastercolumn + integer nband + double precision[] searchvalues + double precision roundto=0 + double precision OUT value + integer OUT count + + + bigintST_ValueCount + text rastertable + text rastercolumn + integer nband + boolean exclude_nodata_value + double precision searchvalue + double precision roundto=0 + + + bigint ST_ValueCount + text rastertable + text rastercolumn + double precision searchvalue + double precision roundto=0 + + + bigint ST_ValueCount + text rastertable + text rastercolumn + integer nband + double precision searchvalue + double precision roundto=0 + + + + + + Description + + Returns a set of records with columns value count which contain the pixel band value and count of pixels in the raster tile or raster coverage of selected band. + If no band is specified nband defaults to 1. If no searchvalues are specified, will return all pixel values found in the raster or raster coverage. If one searchvalue is given, will return an integer instead of records denoting the count of pixels having that pixel band value + If exclude_nodata_value is set to false, will also count pixels with no data. + Availability: 2.0.0 + + + + Examples + + +UPDATE dummy_rast SET rast = ST_SetBandNoDataValue(rast,249) WHERE rid=2; +--Example will count only pixels of band 1 that are not 249. -- + +SELECT (pvc).* +FROM (SELECT ST_ValueCount(rast) As pvc + FROM dummy_rast WHERE rid=2) As foo + ORDER BY (pvc).value; + + value | count +-------+------- + 250 | 2 + 251 | 1 + 252 | 2 + 253 | 6 + 254 | 12 + +-- Example will coount all pixels of band 1 including 249 -- +SELECT (pvc).* +FROM (SELECT ST_ValueCount(rast,1,false) As pvc + FROM dummy_rast WHERE rid=2) As foo + ORDER BY (pvc).value; + + value | count +-------+------- + 249 | 2 + 250 | 2 + 251 | 1 + 252 | 2 + 253 | 6 + 254 | 12 + +-- Example will count only non-nodata value pixels of band 2 +SELECT (pvc).* +FROM (SELECT ST_ValueCount(rast,2) As pvc + FROM dummy_rast WHERE rid=2) As foo + ORDER BY (pvc).value; + value | count +-------+------- + 78 | 1 + 79 | 1 + 88 | 1 + 89 | 1 + 96 | 1 + 97 | 1 + 98 | 1 + 99 | 2 + 112 | 2 +: + + + +--real live example. Count all the pixels in an aerial raster tile band 2 intersecting a geometry +-- and return only the pixel band values that have a count > 500 +SELECT (pvc).value, SUM((pvc).count) As total +FROM (SELECT ST_ValueCount(rast,2) As pvc + FROM o_4_boston + WHERE ST_Intersects(rast, + ST_GeomFromText('POLYGON((224486 892151,224486 892200,224706 892200,224706 892151,224486 892151))',26986) + ) + ) As foo + GROUP BY (pvc).value + HAVING SUM((pvc).count) > 500 + ORDER BY (pvc).value; + + value | total +-------+----- + 51 | 502 + 54 | 521 + + + +-- Just return count of pixels in each raster tile that have value of 100 of tiles that intersect a specific geometry -- +SELECT rid, ST_ValueCount(rast,2,100) As count + FROM o_4_boston + WHERE ST_Intersects(rast, + ST_GeomFromText('POLYGON((224486 892151,224486 892200,224706 892200,224706 892151,224486 892151))',26986) + ) ; + + rid | count +-----+------- + 1 | 56 + 2 | 95 + 14 | 37 + 15 | 64 + + + + + See Also + , + + + + + + Raster Outputs + + + ST_AsBinary + Return the Well-Known Binary (WKB) representation of the raster without SRID meta data. + + + + + + bytea ST_AsBinary + raster rast + + + + + + Description + + Returns the Binary representation of the raster. There are 2 variants of the function. The first + variant takes no endian encoding parameter and defaults to little endian. The second variant takes a second argument + denoting the encoding - using little-endian ('NDR') or big-endian ('XDR') encoding. + This is useful in binary cursors to pull data out of the + database without converting it to a string representation. + + + + Examples + + SELECT ST_AsBinary(rast) As rastbin +FROM dummy_rast WHERE rid=1; + + rastbin +--------------------------------------------------------------------------------- +\001\000\000\000\000\000\000\000\000\000\000\000@\000\000\000\000\000\000\010@\ +000\000\000\000\000\000\340?\000\000\000\000\000\000\340?\000\000\000\000\000\00 +0\000\000\000\000\000\000\000\000\000\000\012\000\000\000\012\000\024\000 + + + + + + + + ST_AsGDALRaster + Return the raster tile in the designated GDAL Raster format. Raster formats are one of those supported by your compiled library. Use ST_GDALRasters() to get a list of formats supported by your library. + + + + + + bytea ST_AsGDALRaster + raster rast + text format + text[] options=NULL + integer srid=sameassource + + + + + + + Description + + Returns the raster tile in the designated format. Arguments are itemized below: + + + + format format to output. This is dependent on the drivers compiled in your libgdal library. Generally available are 'JPEG', 'GTIff', 'PNG'. Use to get a list of formats supported by your library. + + + + + options text array of GDAL options. Valid options are dependent on the format. Refer to GDAL Raster format options for more details. + + + + + srs The proj4text or srtext (from spatial_ref_sys) to embed in the image + + + + Availability: 2.0.0 - requires GDAL >= 1.6.0. + + + + JPEG Output Examples + + SELECT ST_AsGDALRaster(rast, 'JPEG') As rastjpg +FROM dummy_rast WHERE rid=1; + +SELECT ST_AsGDALRaster(rast, 'JPEG', ARRAY!['QUALITY=50']) As rastjpg +FROM dummy_rast WHERE rid=2; + + + + + + GTIFF Output Examples + + SELECT ST_AsGDALRaster(rast, 'GTiff') As rastjpg +FROM dummy_rast WHERE rid=2; + +-- Out GeoTiff with jpeg compression, 90% quality +SELECT ST_AsGDALRaster(rast, 'GTiff', + ARRAY['COMPRESS=JPEG', 'JPEG_QUALITY=90'], + 4269) As rasttiff +FROM dummy_rast WHERE rid=2; + + + + + + + See Also + , , + + + + + + ST_AsJPEG + Return the raster tile selected bands as a single Joint Photographic Exports Group (JPEG) image (byte array). If no band is specified and 1 or more than 3 bands, then only the first band is used. If only 3 bands then all 3 bands are used and mapped to RGB. + + + + + + bytea ST_AsJPEG + raster rast + text[] options=NULL + + + bytea ST_AsJPEG + raster rast + integer nband + integer quality + + + bytea ST_AsJPEG + raster rast + integer nband + text[] options=NULL + + + bytea ST_AsJPEG + raster rast + integer[] nbands + text[] options=NULL + + + bytea ST_AsJPEG + raster rast + integer[] nbands + integer quality + + + + + + Description + + Returns the selected bands of the raster as a single Joint Photographic Exports Group Image (JPEG). Use if you need to export as less common raster types. If no band is specified and 1 or more than 3 bands, then only the first band is used. If 3 bands then all 3 bands are used. There are many variants of the function with many options. These are itemized below: + + + + nband is for single band exports. + + + + + nbands is an array of bands to export (note that max is 3 for JPEG) and the order of the bands is RGB. e.g ARRAY[3,2,1] means map band 3 to Red, band 2 to green and band 1 to blue + + + + + quality number from 0 to 100. The higher the number the crisper the image. + + + + + options text Array + of GDAL options as defined for JPEG + (look at create_options for JPEG ). For JPEG + valid ones are PROGRESSIVE + ON or OFF and QUALITY a range + from 0 to 100 and default to 75. Refer to GDAL + Raster format options for more details. + + + + Availability: 2.0.0 - requires GDAL >= 1.6.0. + + + + Examples: Output + + -- output first 3 bands 75% quality +SELECT ST_AsJPEG(rast) As rastjpg + FROM dummy_rast WHERE rid=2; + +-- output only first band as 90% quality +SELECT ST_AsJPEG(rast,1,90) As rastjpg + FROM dummy_rast WHERE rid=2; + +-- output first 3 bands (but make band 2 Red, band 1 green, and band 3 blue, progressive and 90% quality +SELECT ST_AsJPEG(rast,ARRAY[2,1,3],ARRAY['QUALITY=90','PROGRESSIVE=ON']) As rastjpg + FROM dummy_rast WHERE rid=2; + + + + + + See Also + , , , , + + + + + + ST_AsPNG + Return the raster tile selected bands as a single portable network graphics (PNG) image (byte array). If 1, 3, or 4 bands in raster and no bands are specified, then all bands are used. If more 2 or more than 4 bands and no bands specified, then only band 1 is used. Bands are mapped to RGB or RGBA space. + + + + + + bytea ST_AsPNG + raster rast + text[] options=NULL + + + bytea ST_AsPNG + raster rast + integer nband + integer compression + + + bytea ST_AsPNG + raster rast + integer nband + text[] options=NULL + + + bytea ST_AsPNG + raster rast + integer[] nbands + integer compression + + + bytea ST_AsPNG + raster rast + integer[] nbands + text[] options=NULL + + + + + + Description + + Returns the selected bands of the raster as a single Portable Network Graphics Image (PNG). Use if you need to export as less common raster types. If no band is specified, then the first 3 bands are exported. There are many variants of the function with many options. If no srid is specified then then srid of the raster is used. These are itemized below: + + + + nband is for single band exports. + + + + + nbands is an array of bands to export (note that max is 3 for PNG) and the order of the bands is RGB. e.g ARRAY[3,2,1] means map band 3 to Red, band 2 to green and band 1 to blue + + + + + compression number from 1 to 9. The higher the number the greater the compression. + + + + + options text Array of GDAL + options as defined for PNG (look at create_options + for PNG of ). For PNG valid one is only ZLEVEL (amount + of time to spend on compression -- default 6) + e.g. ARRAY['ZLEVEL=9']. + WORLDFILE is not allowed since the function + would have to output two outputs. Refer to GDAL + Raster format options for more details. + + + + Availability: 2.0.0 - requires GDAL >= 1.6.0. + + + + Examples + + SELECT ST_AsPNG(rast) As rastpng +FROM dummy_rast WHERE rid=2; + +-- export the first 3 bands and map band 3 to Red, band 1 to Green, band 2 to blue +SELECT ST_AsPNG(rast, ARRAY[3,1,2]) As rastpng +FROM dummy_rast WHERE rid=2; + + + + + + + See Also + , , + + + + + + ST_AsTIFF + Return the raster selected bands as a single TIFF image (byte array). If no band is specified, then will try to use all bands. + + + + + + bytea ST_AsTIFF + raster rast + text[] options='' + integer srid=sameassource + + + bytea ST_AsTIFF + raster rast + text compression='' + integer srid=sameassource + + + bytea ST_AsTIFF + raster rast + integer[] nbands + text compression='' + integer srid=sameassource + + + bytea ST_AsTIFF + raster rast + integer[] nbands + text[] options + integer srid=sameassource + + + + + + Description + + Returns the selected bands of the raster as a single Tagged Image File Format (TIFF). If no band is specified, will try to use all bands. This is a wrapper around . Use if you need to export as less common raster types. There are many variants of the function with many options. If no spatial reference SRS text is present, the spatial reference of the raster is used. These are itemized below: + + + + nbands is an array of bands to export (note that max is 3 for PNG) and the order of the bands is RGB. e.g ARRAY[3,2,1] means map band 3 to Red, band 2 to green and band 1 to blue + + + + +compression Compression expression -- JPEG90 (or some other percent), LZW, JPEG, DEFLATE9. + + + + +options text Array of GDAL create options as defined for GTiff (look at create_options for GTiff of ). or refer to GDAL Raster format options for more details. + + + + +srid srid of spatial_ref_sys of the raster. This is used to populate the georeference information + + + + Availability: 2.0.0 - requires GDAL >= 1.6.0. + + + + Examples: Use jpeg compression 90% + + SELECT ST_AsTIFF(rast, 'JPEG90') As rasttiff +FROM dummy_rast WHERE rid=2; + + + + + + + See Also + , , + + + + + + Raster Processing + + + Box3D + Returns the box 3d representation of the enclosing box of the raster. + + + + + + box3d Box3D + raster rast + + + + + + Description + + Returns the box representing the extent of the raster. + The polygon is defined by the corner points of the bounding box + ((MINX, MINY), + (MAXX, MAXY)) + + Changed: 2.0.0 In pre-2.0 versions, there used to be a box2d instead of box3d. Since box2d is a deprecated type, this was changed to box3d. + + + + Examples + + SELECT rid, Box3D(rast) As rastbox +FROM dummy_rast; + +rid | rastbox +----+------------------------------------------------- +1 | BOX3D(0.5 0.5 0,20.5 60.5 0) +2 | BOX3D(3427927.75 5793243.5 0,3427928 5793244 0) + + + + + + See Also + + + + + + + ST_Clip + Returns the raster clipped by the input geometry. If no band is specified all bands are returned. If crop is not specified, true is assumed meaning + the output raster is cropped. + + + + + + raster ST_Clip + raster rast + geometry geom + double precision[] nodataval=NULL + boolean crop=true + + + + raster ST_Clip + raster rast + geometry geom + boolean crop + + + + raster ST_Clip + raster rast + integer band + geometry geom + boolean crop + + + + + + Description + + Returns a raster that is clipped by the input geometry geom. If no band is specified all bands are returned. + + Rasters resulting from ST_Clip must have a nodata value assigned for areas clipped, one for each band. If none are provided and the input raster do not have a nodata value defined, nodata values of the resulting raster are set to ST_MinPossibleValue(ST_BandPixelType(rast, band)). When the number of nodata value in the array is smaller than the number of band, the last one in the array is used for the remaining bands. If the number of nodata value is greater than the number of band, the extra nodata values are ignored. All variants accepting an array of nodata values also accept a single value which will be assigned to each band. + + If crop is not specified, true is assumed meaning the output raster is cropped to the intersection of the geomand rast extents. If crop is set to false, the new raster gets the same extent as rast. + + Availability: 2.0.0 + + Examples here use Massachusetts aerial data available on MassGIS site MassGIS Aerial Orthos. Coordinates are in Massachusetts State Plane Meters. + + + + Examples: 1 band clipping +-- Clip the first band of an aerial tile by a 20 meter buffer. +SELECT ST_Clip(rast, 1, + ST_Buffer(ST_Centroid(ST_Envelope(rast)),20) + ) from aerials.boston +WHERE rid = 4; + +-- Demonstrate effect of crop on final dimensions of raster +-- Note how final extent is clipped to that of the geometry +-- if crop = true +SELECT ST_XMax(ST_Envelope(ST_Clip(rast, 1, clipper, true))) As xmax_w_trim, + ST_XMax(clipper) As xmax_clipper, + ST_XMax(ST_Envelope(ST_Clip(rast, 1, clipper, false))) As xmax_wo_trim, + ST_XMax(ST_Envelope(rast)) As xmax_rast_orig +FROM (SELECT rast, ST_Buffer(ST_Centroid(ST_Envelope(rast)),6) As clipper + FROM aerials.boston +WHERE rid = 6) As foo; + + xmax_w_trim | xmax_clipper | xmax_wo_trim | xmax_rast_orig +------------------+------------------+------------------+------------------ + 230657.436173996 | 230657.436173996 | 230666.436173996 | 230666.436173996 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Examples: 1 band clipping with no crop and add back other bands unchanged +-- Same example as before, but we need to set crop to false to be able to use ST_AddBand +-- because ST_AddBand requires all bands be the same Width and height +SELECT ST_AddBand(ST_Clip(rast, 1, + ST_Buffer(ST_Centroid(ST_Envelope(rast)),20),false + ), ARRAY[ST_Band(rast,2),ST_Band(rast,3)] ) from aerials.boston +WHERE rid = 6; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Examples: Clip all bands +-- Clip all bands of an aerial tile by a 20 meter buffer. +-- Only difference is we don't specify a specific band to clip +-- so all bands are clipped +SELECT ST_Clip(rast, + ST_Buffer(ST_Centroid(ST_Envelope(rast)), 20), + false + ) from aerials.boston +WHERE rid = 4; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + See Also + , + + + + + + ST_ConvexHull + Return the convex hull geometry of the raster including pixel values equal to BandNoDataValue. + For regular shaped and non-skewed + rasters, this gives the same result as ST_Envelope so only useful for irregularly shaped or skewed rasters. + + + + + + geometry ST_ConvexHull + raster rast + + + + + + Description + + Return the convex hull geometry of the raster including the NoDataBandValue band pixels. For regular shaped and non-skewed + rasters, this gives more or less the same result as ST_Envelope + so only useful for irregularly shaped or skewed rasters. + + ST_Envelope floors the coordinates and hence add a little buffer around the raster so the answer is subtly + different from ST_ConvexHull which does not floor. + + + + + Examples + Refer to PostGIS Raster Specification + for a diagram of this. + + + + + + +-- Note envelope and convexhull are more or less the same +SELECT ST_AsText(ST_ConvexHull(rast)) As convhull, + ST_AsText(ST_Envelope(rast)) As env +FROM dummy_rast WHERE rid=1; + + convhull | env + +--------------------------------------------------------+----------------------- + POLYGON((0.5 0.5,20.5 0.5,20.5 60.5,0.5 60.5,0.5 0.5)) | POLYGON((0 0,20 0,20 60,0 60,0 0)) + + + + + + + + +-- now we skew the raster +-- note how the convex hull and envelope are now different +SELECT ST_AsText(ST_ConvexHull(rast)) As convhull, + ST_AsText(ST_Envelope(rast)) As env +FROM (SELECT ST_SetRotation(rast, 0.1, 0.1) As rast + FROM dummy_rast WHERE rid=1) As foo; + + convhull | env + +--------------------------------------------------------+------------------------------------ + POLYGON((0.5 0.5,20.5 1.5,22.5 61.5,2.5 60.5,0.5 0.5)) | POLYGON((0 0,22 0,22 61,0 61,0 0)) + + + + + + + + + + + + See Also + , , + + + + + + ST_DumpAsPolygons + Returns a set of geomval (geom,val) rows, from a given raster band. If no band number is specified, band num defaults to 1. + + + + + + setof geomval ST_DumpAsPolygons + raster rast + integer band_num=1 + + + + + + Description + This is a set-returning function (SRF). It returns a set of + geomval rows, formed by a geometry (geom) and a pixel band value (val). + Each polygon is the union of all pixels for that band that have the same pixel value denoted by val. + + ST_DumpAsPolygon is useful for polygonizing rasters. It is the + reverse of a GROUP BY in that it creates new rows. For example it + can be used to expand a single raster into multiple POLYGONS/MULTIPOLYGONS. + + Availability: Requires GDAL 1.7 or higher. + If there is a no data value set for a band, pixels with that value will not be returned. + If you only care about count of pixels with a given value in a raster, it is faster to use . + + + + Examples + SELECT val, ST_AsText(geom) As geomwkt +FROM ( +SELECT (ST_DumpAsPolygons(rast)).* +FROM dummy_rast +WHERE rid = 2 +) As foo +WHERE val BETWEEN 249 and 251 +ORDER BY val; + + val | geomwkt +-----+-------------------------------------------------------------------------- + 249 | POLYGON((3427927.95 5793243.95,3427927.95 5793243.85,3427928 5793243.85, + 3427928 5793243.95,3427927.95 5793243.95)) + 250 | POLYGON((3427927.75 5793243.9,3427927.75 5793243.85,3427927.8 5793243.85, + 3427927.8 5793243.9,3427927.75 5793243.9)) + 250 | POLYGON((3427927.8 5793243.8,3427927.8 5793243.75,3427927.85 5793243.75, + 3427927.85 5793243.8, 3427927.8 5793243.8)) + 251 | POLYGON((3427927.75 5793243.85,3427927.75 5793243.8,3427927.8 5793243.8, + 3427927.8 5793243.85,3427927.75 5793243.85)) + + + + See Also + , , , + + + + + + ST_Envelope + Returns the polygon representation of the extent of the raster. + + + + + + geometry ST_Envelope + raster rast + + + + + + Description + + Returns the polygon representation of the extent of the raster in spatial coordinate units defined by srid. It is a float8 minimum bounding box represented as a polygon. + The polygon is defined by the corner points of the bounding box + ((MINX, MINY), + (MINX, MAXY), + (MAXX, MAXY), + (MAXX, MINY), + (MINX, MINY)) + + + + Examples + + SELECT rid, ST_AsText(ST_Envelope(rast)) As envgeomwkt +FROM dummy_rast; + + rid | envgeomwkt +-----+-------------------------------------------------------------------- + 1 | POLYGON((0 0,20 0,20 60,0 60,0 0)) + 2 | POLYGON((3427927 5793243,3427928 5793243, + 3427928 5793244,3427927 5793244, 3427927 5793243)) + + + + + + See Also + , , + + + + + + ST_HillShade + Returns the hypothetical illumination of an elevation raster band using provided azimuth, altitude, brightness and elevation scale inputs. Useful for visualizing terrain. + + + + + raster ST_HillShade + raster rast + integer band + text pixeltype + double precision azimuth + double precision altitude + double precision max_bright=255 + double precision elevation_scale=1 + + + + + + Description + + Returns the hypothetical illumination of an elevation raster band using the azimuth, altitude, brightness, and elevation scale inputs. Utilizes map algebra and applies the hill shade equation to neighboring pixels. + The hill shade equation is: max_bright * ( (cos(zenith)*cos(slope)) + (sin(zenith)*sin(slope)*cos(azimuth - aspect)) ). + Availability: 2.0.0 + + + + + Examples - coming soon +coming soon + + + + + See Also + + + + + + + + + ST_Aspect + Returns the surface aspect of an elevation raster band. Useful for analyzing terrain. + + + + + raster ST_Aspect + raster rast + integer band + text pixeltype + + + + + + Description + + Returns the surface aspect of an elevation raster band. Utilizes map algebra and applies the aspect equation to neighboring pixels. + + Given the following representation of a 3x3 neighborhood of pixels: + + + + + + A + B + C + + + D + E + F + + + G + H + I + + + + + + The equation for the pixel aspect of cell E is: atan2((((G + 2H + I) - (A + 2B + C)) / 8), -(((C + 2F + I) - (A + 2D + G)) / 8)) + + Availability: 2.0.0 + + + + + Examples - coming soon + coming soon + + + + + See Also + + + + + + + + + ST_Slope + Returns the surface slope of an elevation raster band. Useful for analyzing terrain. + + + + + raster ST_Slope + raster rast + integer band + text pixeltype + + + + + + Description + + Returns the surface slope of an elevation raster band. Utilizes map algebra and applies the slope equation to neighboring pixels. + + Given the following representation of a 3x3 neighborhood of pixels: + + + + + + A + B + C + + + D + E + F + + + G + H + I + + + + + + The equation for the pixel slope of cell E is: atan(sqrt(((c + 2f + i) - (a + 2d + g) / 8)^2 + (((g + 2h + i) - (a + 2b + c)) / 8) ^ 2)) + + Availability: 2.0.0 + + + + + Examples - coming soon + coming soon + + + + + See Also + + + + + + + + + ST_Intersection + Returns a raster or a set of geometry-pixelvalue pairs representing the shared portion of two rasters or the geometrical intersection of a vectorization of the raster and a geometry. + + + + + + setof geomval ST_Intersection + geometry geom + raster rast + integer band_num=1 + + + + setof geomval ST_Intersection + raster rast + geometry geom + + + + setof geomval ST_Intersection + raster rast + integer band_num + geometry geom + + + + raster ST_Intersection + raster rast1 + raster rast2 + double precision[] nodataval + + + + raster ST_Intersection + raster rast1 + raster rast2 + text returnband='BOTH' + double precision[] nodataval=NULL + + + + raster ST_Intersection + raster rast1 + integer band_num1 + raster rast2 + integer band_num2 + double precision[] nodataval + + + + raster ST_Intersection + raster rast1 + integer band_num1 + raster rast2 + integer band_num2 + text returnband='BOTH' + double precision[] nodataval=NULL + + + + + + + Description + Returns a raster or a set of geometry-pixelvalue pairs representing the shared portion of two rasters or the geometrical intersection of a vectorization of the raster and a geometry. + + The first three variants, returning a setof geomval, works in vector space. The raster is first vectorized (using ST_DumpAsPolygon) into a set of geomval rows and those rows are then intersected with the geometry using the ST_Intersection(geometry, geometry) PostGIS function. Geometries intersecting only with a nodata value area of a raster returns an empty geometry. They are normally excluded from the results by the proper usage of ST_Intersect in the WHERE clause. + + You can access the geometry and the value parts of the resulting set of geomval by surrounding them with parenthesis and adding '.geom' or '.val' at the end of the expression. e.g. (ST_Intersection(rast, geom)).geom + + The other variants, returning a raster, works in raster space. They are using the two rasters version of ST_MapAlgebraExpr to perform the intersection. + + The extent of the resulting raster corresponds to the geometrical intersection of the two raster extents. The resulting raster includes 'BAND1', 'BAND2' or 'BOTH' bands, following what is passed as the returnband parameter. Nodata value areas present in any band results in nodata value areas in every bands of the result. In other words, any pixel intersecting with a nodata value pixel becomes a nodata value pixel in the result. + + Rasters resulting from ST_Intersection must have a nodata value assigned for areas not intersecting. You can define or replace the nodata value for any resulting band by providing a nodataval[] array of one or two nodata values depending if you request 'BAND1', 'BAND2' or 'BOTH' bands. The first value in the array replace the nodata value in the first band and the second value replace the nodata value in the second band. If one input band do not have a nodata value defined and none are provided as an array, one is chosen using the ST_MinPossibleValue function. All variant accepting an array of nodata value can also accept a single value which will be assigned to each requested band. + + In all variants, if no band number is specified band 1 is assumed. + + To get more control on the resulting extent or on what to return when encountering a nodata value, use the two rasters version of . + + To compute the intersection of a raster band with a geometry in raster space, use . ST_Clip works on multiple bands rasters and does not return a band corresponding to the rasterized geometry. + + ST_Intersection should be used in conjunction with ST_Intersects and an index on the raster column and/or the geometry column. + + Enhanced: 2.0.0 - Intersection in the raster space was introduced. In earlier pre-2.0.0 versions, only intersection performed in vector space were supported. + + + + Examples: Geometry, Raster -- resulting in geometry vals + + SELECT foo.rid, foo.gid, + ST_AsText((foo.geomval).geom) As geomwkt, (foo.geomval).val +FROM + ( +SELECT A.rid, g.gid , ST_Intersection(A.rast, g.geom) As geomval + FROM dummy_rast AS A CROSS JOIN + (VALUES (1, ST_Point(3427928, 5793243.85) ) , + (2, ST_GeomFromText('LINESTRING(3427927.85 5793243.75,3427927.8 5793243.75,3427927.8 5793243.8)') ), + (3, ST_GeomFromText('LINESTRING(1 2, 3 4)') ) + ) As g(gid,geom) +WHERE A.rid =2 ) As foo; + + rid | gid | geomwkt | val +-----+-----+--------------------------------------------------------------------------------------------- + 2 | 1 | POINT(3427928 5793243.85) | 249 + 2 | 1 | POINT(3427928 5793243.85) | 253 + 2 | 2 | POINT(3427927.85 5793243.75) | 254 + 2 | 2 | POINT(3427927.8 5793243.8) | 251 + 2 | 2 | POINT(3427927.8 5793243.8) | 253 + 2 | 2 | LINESTRING(3427927.8 5793243.75,3427927.8 5793243.8) | 252 + 2 | 2 | MULTILINESTRING((3427927.8 5793243.8,3427927.8 5793243.75),...) | 250 + 2 | 3 | GEOMETRYCOLLECTION EMPTY + + + + + + Example: Raster, Geometry -- resulting is a raster + Examples coming soon + + + + + + See Also + , , , , + + + + + + ST_MapAlgebraExpr + 1 raster band version: Creates a new one band raster formed by applying a valid PostgreSQL algebraic operation on the input raster band and of pixeltype provided. Band 1 is assumed if no band is specified. + + + + + + raster ST_MapAlgebraExpr + raster rast + integer band + text pixeltype + text expression + double precision nodataval=NULL + + + + raster ST_MapAlgebraExpr + raster rast + text pixeltype + text expression + double precision nodataval=NULL + + + + + + Description + + Creates a new one band raster formed by applying a valid PostgreSQL algebraic operation defined by the expression on the input raster (rast). If no band is specified band 1 is assumed. The new raster will have the same georeference, width, and height as the original raster but will only have one band. + + If pixeltype is passed in, then the new raster will have a band of that pixeltype. If pixeltype is passed NULL, then the new raster band will have the same pixeltype as the input rast band. + + In the expression you can use the term + [rast] to refer to the pixel value of + the original band, [rast.x] to refer to + the 1-based pixel column index, [rast.y] + to refer to the 1-based pixel row index. + + Availability: 2.0.0 + + + + Examples + + Create a new 1 band raster from our original that is a function of modulo 2 of the original raster band. + ALTER TABLE dummy_rast ADD COLUMN map_rast raster; +UPDATE dummy_rast SET map_rast = ST_MapAlgebraExpr(rast,NULL,'mod([rast],2)') WHERE rid = 2; + +SELECT ST_Value(rast,1,i,j) As origval, ST_Value(map_rast, 1, i, j) As mapval +FROM dummy_rast CROSS JOIN generate_series(1, 3) AS i CROSS JOIN generate_series(1,3) AS j +WHERE rid = 2; + + origval | mapval +---------+-------- + 253 | 1 + 254 | 0 + 253 | 1 + 253 | 1 + 254 | 0 + 254 | 0 + 250 | 0 + 254 | 0 + 254 | 0 + + Create a new 1 band raster of pixel-type 2BUI from our original that is reclassified and set the nodata value to be 0. + ALTER TABLE dummy_rast ADD COLUMN map_rast2 raster; +UPDATE dummy_rast SET map_rast2 = ST_MapAlgebraExpr(rast,'2BUI','CASE WHEN [rast] BETWEEN 100 and 250 THEN 1 +WHEN [rast] = 252 THEN 2 +WHEN [rast] BETWEEN 253 and 254 THEN 3 ELSE 0 END', '0') WHERE rid = 2; + +SELECT DISTINCT ST_Value(rast,1,i,j) As origval, ST_Value(map_rast2, 1, i, j) As mapval +FROM dummy_rast CROSS JOIN generate_series(1, 5) AS i CROSS JOIN generate_series(1,5) AS j +WHERE rid = 2; + + origval | mapval +---------+-------- + 249 | 1 + 250 | 1 + 251 | + 252 | 2 + 253 | 3 + 254 | 3 + +SELECT ST_BandPixelType(map_rast2) As b1pixtyp +FROM dummy_rast WHERE rid = 2; + + b1pixtyp +---------- + 2BUI + + + + + + + + + + + + + + + + + + + + + + + + + + + Create a new 3 band raster same pixel type from our original 3 band raster with first band + altered by map algebra and remaining 2 bands unaltered. + SELECT ST_AddBand( +ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(rast_view), + ST_MapAlgebraExpr(rast_view,1,NULL,'tan([rast])*[rast]') + ), + ST_Band(rast_view,2) + ), + ST_Band(rast_view, 3) As rast_view_ma +) +FROM wind +WHERE rid=167; + + + + + See Also + , , , , + + + + + + ST_MapAlgebraExpr + 2 raster band version: Creates a new one band raster formed by applying a valid PostgreSQL algebraic operation on the two input raster bands and of pixeltype provided. band 1 of each raster is assumed if no band numbers are specified. The resulting raster will be aligned (scale, skew and pixel corners) on the grid defined by the first raster and have its extent defined by the "extenttype" parameter. Values for "extenttype" can be: INTERSECTION, UNION, FIRST, SECOND. + + + + + + raster ST_MapAlgebraExpr + raster rast1 + raster rast2 + text expression + text pixeltype=same_as_rast1_band + text extenttype=INTERSECTION + text nodata1expr=NULL + text nodata2expr=NULL + double precision nodatanodataval=NULL + + + + raster ST_MapAlgebraExpr + raster rast1 + integer band1 + raster rast2 + integer band2 + text expression + text pixeltype=same_as_rast1_band + text extenttype=INTERSECTION + text nodata1expr=NULL + text nodata2expr=NULL + double precision nodatanodataval=NULL + + + + + + Description + + Creates a new one band raster formed by applying a valid PostgreSQL algebraic operation to the two bands defined by the expression on the two input raster bands rast1, (rast2). If no band1, band2 is specified band 1 is assumed. + The resulting raster will be aligned (scale, skew and pixel corners) on the grid defined by the first raster. The resulting raster will have the extent defined by the extenttype parameter. + + + + expression + A PostgreSQL algebraic expression involving the two rasters and PostgreSQL defined functions/operators that will define the pixel value when pixels intersect. e.g. (([rast1] + [rast2])/2.0)::integer + + + pixeltype + The resulting pixel type of the output raster. Must be one listed in , left out or set to NULL. If not passed in or set to NULL, will default to the pixeltype of the first raster. + + + extenttype + Controls the extent of resulting raster + + + INTERSECTION - The extent of the new raster is the intersection of the two rasters. This is the default. + + + UNION - The extent of the new raster is the union of the two rasters. + + + FIRST - The extent of the new raster is the same as the one of the first raster. + + + SECOND - The extent of the new raster is the same as the one of the second raster. + + + + + + nodata1expr + An algebraic expression involving only rast2 or a constant that defines what to return when pixels of rast1 are nodata values and spatially corresponding rast2 pixels have values. + + + nodata2expr + An algebraic expression involving only rast1 or a constant that defines what to return when pixels of rast2 are nodata values and spatially corresponding rast1 pixels have values. + + + nodatanodataval + A numeric constant to return when spatially corresponding rast1 and rast2 pixels are both nodata values. + + + + + If pixeltype is passed in, then the new raster will have a band of that pixeltype. If pixeltype is passed NULL or no pixel type specified, then the new raster band will have the same pixeltype as the input rast1 band. + Use the term [rast1.val] [rast2.val] to refer to the pixel value of the original raster bands and + [rast1.x], [rast1.y] etc. to refer to the column / row positions of the pixels. + + + Availability: 2.0.0 + + + + Example: 2 Band Intersection and Union + + Create a new 1 band raster from our original that is a function of modulo 2 of the original raster band. + +--Create a cool set of rasters -- +DROP TABLE IF EXISTS fun_shapes; +CREATE TABLE fun_shapes(rid serial PRIMARY KEY, fun_name text, rast raster); + +-- Insert some cool shapes around Boston in Massachusetts state plane meters -- +INSERT INTO fun_shapes(fun_name, rast) +VALUES ('ref', ST_AsRaster(ST_MakeEnvelope(235229, 899970, 237229, 901930,26986),200,200,'8BUI',0,0)); + +INSERT INTO fun_shapes(fun_name,rast) +WITH ref(rast) AS (SELECT rast FROM fun_shapes WHERE fun_name = 'ref' ) +SELECT 'area' AS fun_name, ST_AsRaster(ST_Buffer(ST_SetSRID(ST_Point(236229, 900930),26986), 1000), + ref.rast,'8BUI', 10, 0) As rast +FROM ref +UNION ALL +SELECT 'rand bubbles', + ST_AsRaster( + (SELECT ST_Collect(geom) + FROM (SELECT ST_Buffer(ST_SetSRID(ST_Point(236229 + i*random()*100, 900930 + j*random()*100),26986), random()*20) As geom + FROM generate_series(1,10) As i, generate_series(1,10) As j + ) As foo ), ref.rast,'8BUI', 200, 0) +FROM ref; + +--map them - +SELECT ST_MapAlgebraExpr( + area.rast, bub.rast, '[rast2.val]', '8BUI', 'INTERSECTION', '[rast2.val]', '[rast1.val]') As interrast, + ST_MapAlgebraExpr( + area.rast, bub.rast, '[rast2.val]', '8BUI', 'UNION', '[rast2.val]', '[rast1.val]') As unionrast +FROM + (SELECT rast FROM fun_shapes WHERE + fun_name = 'area') As area +CROSS JOIN (SELECT rast +FROM fun_shapes WHERE + fun_name = 'rand bubbles') As bub + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example: Overlaying rasters on a canvas as separate bands + +-- we use ST_AsPNG to render the image so all single band ones look grey -- +WITH mygeoms + AS ( SELECT 2 As bnum, ST_Buffer(ST_Point(1,5),10) As geom + UNION ALL + SELECT 3 AS bnum, + ST_Buffer(ST_GeomFromText('LINESTRING(50 50,150 150,150 50)'), 10,'join=bevel') As geom + UNION ALL + SELECT 1 As bnum, + ST_Buffer(ST_GeomFromText('LINESTRING(60 50,150 150,150 50)'), 5,'join=bevel') As geom + ), + -- define our canvas to be 1 to 1 pixel to geometry + canvas + AS (SELECT ST_AddBand(ST_MakeEmptyRaster(200, + 200, + ST_XMin(e)::integer, ST_YMax(e)::integer, 1, -1, 0, 0) , '8BUI'::text,0) As rast + FROM (SELECT ST_Extent(geom) As e, + Max(ST_SRID(geom)) As srid + from mygeoms + ) As foo + ), + rbands AS (SELECT ARRAY(SELECT ST_MapAlgebraExpr(canvas.rast, ST_AsRaster(m.geom, canvas.rast, '8BUI', 100), + '[rast2.val]', '8BUI', 'FIRST', '[rast2.val]', '[rast1.val]') As rast + FROM mygeoms AS m CROSS JOIN canvas + ORDER BY m.bnum) As rasts + ) + SELECT rasts[1] As rast1 , rasts[2] As rast2, rasts[3] As rast3, ST_AddBand( + ST_AddBand(rasts[1],rasts[2]), rasts[3]) As final_rast + FROM rbands; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Example: Overlay 2 meter boundary of select parcels over an aerial imagery + -- Create new 3 band raster composed of first 2 clipped bands, and overlay of 3rd band with our geometry +-- This query took 3.6 seconds on PostGIS windows 64-bit install +WITH pr AS +-- Note the order of operation: we clip all the rasters to dimensions of our region +(SELECT ST_Clip(rast,ST_Expand(geom,50) ) As rast, g.geom + FROM aerials.o_2_boston AS r INNER JOIN +-- union our parcels of interest so they form a single geometry we can later intersect with + (SELECT ST_Union(ST_Transform(the_geom,26986)) AS geom + FROM landparcels WHERE pid IN('0303890000', '0303900000')) As g + ON ST_Intersects(rast::geometry, ST_Expand(g.geom,50)) +), +-- we then union the raster shards together +-- ST_Union on raster is kinda of slow but much faster the smaller you can get the rasters +-- therefore we want to clip first and then union +prunion AS +(SELECT ST_AddBand(NULL, ARRAY[ST_Union(rast,1),ST_Union(rast,2),ST_Union(rast,3)] ) As clipped,geom +FROM pr +GROUP BY geom) +-- return our final raster which is the unioned shard with +-- with the overlay of our parcel boundaries +-- add first 2 bands, then mapalgebra of 3rd band + geometry +SELECT ST_AddBand(ST_Band(clipped,ARRAY[1,2]) + , ST_MapAlgebraExpr(ST_Band(clipped,3), ST_AsRaster(ST_Buffer(ST_Boundary(geom),2),clipped, '8BUI',250), + '[rast2.val]', '8BUI', 'FIRST', '[rast2.val]', '[rast1.val]') ) As rast +FROM prunion; + + + + + + + + + + + + + + + + + + + + + See Also + , , , , , , , + , , + + + + + + ST_MapAlgebraFct + 1 band version - Creates a new one band raster formed by applying a valid PostgreSQL function on the input raster band and of pixeltype prodived. Band 1 is assumed if no band is specified. + + + + + + raster ST_MapAlgebraFct + raster rast + regprocedure onerasteruserfunc + + + raster ST_MapAlgebraFct + raster rast + regprocedure onerasteruserfunc + text[] VARIADIC args + + + + raster ST_MapAlgebraFct + raster rast + text pixeltype + regprocedure onerasteruserfunc + + + raster ST_MapAlgebraFct + raster rast + text pixeltype + regprocedure onerasteruserfunc + text[] VARIADIC args + + + + raster ST_MapAlgebraFct + raster rast + integer band + regprocedure onerasteruserfunc + + + raster ST_MapAlgebraFct + raster rast + integer band + regprocedure onerasteruserfunc + text[] VARIADIC args + + + + raster ST_MapAlgebraFct + raster rast + integer band + text pixeltype + regprocedure onerasteruserfunc + + + raster ST_MapAlgebraFct + raster rast + integer band + text pixeltype + regprocedure onerasteruserfunc + text[] VARIADIC args + + + + + + + Description + + Creates a new one band raster formed by applying a valid PostgreSQL function specified by the onerasteruserfunc on the input raster (rast). If no band is specified, band 1 is assumed. The new raster will have the same georeference, width, and height as the original raster but will only have one band. + + If pixeltype is passed in, then the new raster will have a band of that pixeltype. If pixeltype is passed NULL, then the new raster band will have the same pixeltype as the input rast band. + + The onerasteruserfunc parameter must be the name and signature of a SQL or PL/pgSQL function, cast to a regprocedure. A very simple and quite useless PL/pgSQL function example is: + CREATE OR REPLACE FUNCTION simple_function(pixel FLOAT, pos INTEGER[], VARIADIC args TEXT[]) + RETURNS FLOAT + AS $$ BEGIN + RETURN 0.0; + END; $$ + LANGUAGE 'plpgsql' IMMUTABLE; + The userfunction may accept two or three arguments: a float value, an optional integer array, and a variadic text array. The first argument is the value of an individual raster cell (regardless of the raster datatype). The second argument is the position of the current processing cell in the form '{x,y}'. The third argument indicates that all remaining parameters to shall be passed through to the userfunction. + + Passing a regprodedure argument to a SQL function requires the full function signature to be passed, then cast to a regprocedure type. To pass the above example PL/pgSQL function as an argument, the SQL for the argument is:'simple_function(float,integer[],text[])'::regprocedureNote that the argument contains the name of the function, the types of the function arguments, quotes around the name and argument types, and a cast to a regprocedure. + + The third argument to the userfunction is a variadic text array. All trailing text arguments to any call are passed through to the specified userfunction, and are contained in the args argument. + + For more information about the VARIADIC keyword, please refer to the PostgreSQL documentation and the "SQL Functions with Variable Numbers of Arguments" section of Query Language (SQL) Functions. + + The text[] argument to the userfunction is required, regardless of whether you choose to pass any arguments to your user function for processing or not. + + Availability: 2.0.0 + + + + Examples + + Create a new 1 band raster from our original that is a function of modulo 2 of the original raster band. + ALTER TABLE dummy_rast ADD COLUMN map_rast raster; +CREATE FUNCTION mod_fct(pixel float, pos integer[], variadic args text[]) +RETURNS float +AS $$ +BEGIN + RETURN pixel::integer % 2; +END; +$$ +LANGUAGE 'plpgsql' IMMUTABLE; + +UPDATE dummy_rast SET map_rast = ST_MapAlgebraFct(rast,NULL,'mod_fct(float,integer[],text[])'::regprocedure) WHERE rid = 2; + +SELECT ST_Value(rast,1,i,j) As origval, ST_Value(map_rast, 1, i, j) As mapval +FROM dummy_rast CROSS JOIN generate_series(1, 3) AS i CROSS JOIN generate_series(1,3) AS j +WHERE rid = 2; + + origval | mapval +---------+-------- + 253 | 1 + 254 | 0 + 253 | 1 + 253 | 1 + 254 | 0 + 254 | 0 + 250 | 0 + 254 | 0 + 254 | 0 + + Create a new 1 band raster of pixel-type 2BUI from our original that is reclassified and set the nodata value to a passed parameter to the user function (0). + ALTER TABLE dummy_rast ADD COLUMN map_rast2 raster; +CREATE FUNCTION classify_fct(pixel float, pos integer[], variadic args text[]) +RETURNS float +AS +$$ +DECLARE + nodata float := 0; +BEGIN + IF NOT args[1] IS NULL THEN + nodata := args[1]; + END IF; + IF pixel < 251 THEN + RETURN 1; + ELSIF pixel = 252 THEN + RETURN 2; + ELSIF pixel > 252 THEN + RETURN 3; + ELSE + RETURN nodata; + END IF; +END; +$$ +LANGUAGE 'plpgsql'; +UPDATE dummy_rast SET map_rast2 = ST_MapAlgebraFct(rast,'2BUI','classify_fct(float,integer[],text[])'::regprocedure, '0') WHERE rid = 2; + +SELECT DISTINCT ST_Value(rast,1,i,j) As origval, ST_Value(map_rast2, 1, i, j) As mapval +FROM dummy_rast CROSS JOIN generate_series(1, 5) AS i CROSS JOIN generate_series(1,5) AS j +WHERE rid = 2; + + origval | mapval +---------+-------- + 249 | 1 + 250 | 1 + 251 | + 252 | 2 + 253 | 3 + 254 | 3 + +SELECT ST_BandPixelType(map_rast2) As b1pixtyp +FROM dummy_rast WHERE rid = 2; + + b1pixtyp +---------- + 2BUI + + + + + + + + + + + + + + + + + + + + + + + + + + Create a new 3 band raster same pixel type from our original 3 band raster with first band altered by map algebra and remaining 2 bands unaltered. + CREATE FUNCTION rast_plus_tan(pixel float, pos integer[], variadic args text[]) +RETURNS float +AS +$$ +BEGIN + RETURN tan(pixel) * pixel; +END; +$$ +LANGUAGE 'plpgsql'; + +SELECT ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(rast_view), + ST_MapAlgebraFct(rast_view,1,NULL,'rast_plus_tan(float,integer[],text[])'::regprocedure) + ), + ST_Band(rast_view,2) + ), + ST_Band(rast_view, 3) As rast_view_ma +) +FROM wind +WHERE rid=167; + + + + + See Also + , , , + + + + + + ST_MapAlgebraFct + 2 band version - Creates a new one band raster formed by applying a valid PostgreSQL function on the 2 input raster bands and of pixeltype prodived. Band 1 is assumed if no band is specified. Extent type defaults to INTERSECTION if not specified. + + + + + + raster ST_MapAlgebraFct + raster rast1 + raster rast2 + regprocedure tworastuserfunc + text pixeltype=same_as_rast1 + text extenttype=INTERSECTION + text[] VARIADIC userargs + + + + raster ST_MapAlgebraFct + raster rast1 + integer band1 + raster rast2 + integer band2 + regprocedure tworastuserfunc + text pixeltype=same_as_rast1 + text extenttype=INTERSECTION + text[] VARIADIC userargs + + + + + + Description + + Creates a new one band raster formed by applying a valid PostgreSQL function specified by the tworastuserfunc on the input raster rast1, rast2. If no band1 or band2 is specified, band 1 is assumed. The new raster will have the same georeference, width, and height as the original rasters but will only have one band. + + If pixeltype is passed in, then the new raster will have a band of that pixeltype. If pixeltype is passed NULL or left out, then the new raster band will have the same pixeltype as the input rast1 band. + + The tworastuserfunc parameter must be the name and signature of an SQL or PL/pgSQL function, cast to a regprocedure. An example PL/pgSQL function example is: + CREATE OR REPLACE FUNCTION simple_function_for_two_rasters(pixel1 FLOAT, pixel2 FLOAT, pos INTEGER[], VARIADIC args TEXT[]) + RETURNS FLOAT + AS $$ BEGIN + RETURN 0.0; + END; $$ + LANGUAGE 'plpgsql' IMMUTABLE; + + The tworastuserfunc may accept three or four arguments: a double precision value, a double precision value, an optional integer array, and a variadic text array. The first argument is the value of an individual raster cell in rast1 (regardless of the raster datatype). The second argument is an individual raster cell value in rast2. The third argument is the position of the current processing cell in the form '{x,y}'. The fourth argument indicates that all remaining parameters to shall be passed through to the tworastuserfunc. + + Passing a regprodedure argument to a SQL function requires the full function signature to be passed, then cast to a regprocedure type. To pass the above example PL/pgSQL function as an argument, the SQL for the argument is:'simple_function(double precision, double precision, integer[], text[])'::regprocedureNote that the argument contains the name of the function, the types of the function arguments, quotes around the name and argument types, and a cast to a regprocedure. + + The third argument to the tworastuserfunc is a variadic text array. All trailing text arguments to any call are passed through to the specified tworastuserfunc, and are contained in the userargs argument. + + For more information about the VARIADIC keyword, please refer to the PostgreSQL documentation and the "SQL Functions with Variable Numbers of Arguments" section of Query Language (SQL) Functions. + + The text[] argument to the tworastuserfunc is required, regardless of whether you choose to pass any arguments to your user function for processing or not. + + Availability: 2.0.0 + + + + Example: Overlaying rasters on a canvas as separate bands + +-- define our user defined function -- +CREATE OR REPLACE FUNCTION raster_mapalgebra_union( + rast1 double precision, + rast2 double precision, + pos integer[], + VARIADIC userargs text[] +) + RETURNS double precision + AS $$ + DECLARE + BEGIN + CASE + WHEN rast1 IS NOT NULL AND rast2 IS NOT NULL THEN + RETURN ((rast1 + rast2)/2.); + WHEN rast1 IS NULL AND rast2 IS NULL THEN + RETURN NULL; + WHEN rast1 IS NULL THEN + RETURN rast2; + ELSE + RETURN rast1; + END CASE; + + RETURN NULL; + END; + $$ LANGUAGE 'plpgsql' IMMUTABLE COST 1000; + +-- prep our test table of rasters +DROP TABLE IF EXISTS map_shapes; +CREATE TABLE map_shapes(rid serial PRIMARY KEY, rast raster, bnum integer, descrip text); +INSERT INTO map_shapes(rast,bnum, descrip) +WITH mygeoms + AS ( SELECT 2 As bnum, ST_Buffer(ST_Point(90,90),30) As geom, 'circle' As descrip + UNION ALL + SELECT 3 AS bnum, + ST_Buffer(ST_GeomFromText('LINESTRING(50 50,150 150,150 50)'), 15) As geom, 'big road' As descrip + UNION ALL + SELECT 1 As bnum, + ST_Translate(ST_Buffer(ST_GeomFromText('LINESTRING(60 50,150 150,150 50)'), 8,'join=bevel'), 10,-6) As geom, 'small road' As descrip + ), + -- define our canvas to be 1 to 1 pixel to geometry + canvas + AS ( SELECT ST_AddBand(ST_MakeEmptyRaster(250, + 250, + ST_XMin(e)::integer, ST_YMax(e)::integer, 1, -1, 0, 0 ) , '8BUI'::text,0) As rast + FROM (SELECT ST_Extent(geom) As e, + Max(ST_SRID(geom)) As srid + from mygeoms + ) As foo + ) +-- return our rasters aligned with our canvas +SELECT ST_AsRaster(m.geom, canvas.rast, '8BUI', 240) As rast, bnum, descrip + FROM mygeoms AS m CROSS JOIN canvas +UNION ALL +SELECT canvas.rast, 4, 'canvas' +FROM canvas; + +-- Map algebra on single band rasters and then collect with ST_AddBand +INSERT INTO map_shapes(rast,bnum,descrip) +SELECT ST_AddBand(ST_AddBand(rasts[1], rasts[2]),rasts[3]), 4, 'map bands overlay fct union (canvas)' + FROM (SELECT ARRAY(SELECT ST_MapAlgebraFct(m1.rast, m2.rast, + 'raster_mapalgebra_union(double precision, double precision, integer[], text[])'::regprocedure, '8BUI', 'FIRST') + FROM map_shapes As m1 CROSS JOIN map_shapes As m2 + WHERE m1.descrip = 'canvas' AND m2.descrip <> 'canvas' ORDER BY m2.bnum) As rasts) As foo; + + + + + + + + + + + + + + + + + + + + + + + User Defined function that takes extra args + +CREATE OR REPLACE FUNCTION raster_mapalgebra_userargs( + rast1 double precision, + rast2 double precision, + pos integer[], + VARIADIC userargs text[] +) + RETURNS double precision + AS $$ + DECLARE + BEGIN + CASE + WHEN rast1 IS NOT NULL AND rast2 IS NOT NULL THEN + RETURN least(userargs[1]::integer,(rast1 + rast2)/2.); + WHEN rast1 IS NULL AND rast2 IS NULL THEN + RETURN userargs[2]::integer; + WHEN rast1 IS NULL THEN + RETURN greatest(rast2,random()*userargs[3]::integer)::integer; + ELSE + RETURN greatest(rast1, random()*userargs[4]::integer)::integer; + END CASE; + + RETURN NULL; + END; + $$ LANGUAGE 'plpgsql' VOLATILE COST 1000; + +SELECT ST_MapAlgebraFct(m1.rast, 1, m1.rast, 3, + 'raster_mapalgebra_userargs(double precision, double precision, integer[], text[])'::regprocedure, + '8BUI', 'INTERSECT', '100','200','200','0') + FROM map_shapes As m1 + WHERE m1.descrip = 'map bands overlay fct union (canvas)'; + + + + + + + + + + + + + + + + + See Also + , , , + + + + + + ST_MapAlgebraFctNgb + + 1-band version: Map Algebra Nearest Neighbor using user-defined PostgreSQL function. Return a raster which values are the result of a PLPGSQL user function involving a neighborhood of values from the input raster band. + + + + + + raster ST_MapAlgebraFctNgb + raster rast + integer band + text pixeltype + integer ngbwidth + integer ngbheight + regprocedure onerastngbuserfunc + text nodatamode + text[] VARIADIC args + + + + + + + Description + + (one raster version) Return a raster which values + are the result of a PLPGSQL user function involving a + neighborhood of values from the input raster band. The user function takes the neighborhood of pixel values + as an array of numbers, for each pixel, returns the result from the user function, + replacing pixel value of currently inspected pixel with the function result. + + + + rast + Raster on which the user function is evaluated. + + + band + Band number of the raster to be evaluated. Default to 1. + + + pixeltype + The resulting pixel type of the output raster. Must be one listed in or left out or set to NULL. If not passed in or set to NULL, will default to the pixeltype of the rast. Results are truncated if they are larger than what is allowed for the pixeltype. + + + ngbwidth + The width of the neighborhood, in cells. + + + ngbheight + The height of the neighborhood, in cells. + + + onerastngbuserfunc + PLPGSQL/psql user function to apply to neighborhood pixels of a single band of a raster. The first element is a 2-dimensional + array of numbers representing the rectangular pixel neighborhood + + + nodatamode + Defines what value to pass to the function for a neighborhood pixel that is nodata or NULL + 'ignore': any NODATA values encountered in the neighborhood are ignored by the computation -- this flag must be sent to the user callback function, and the user function decides how to ignore it. + 'NULL': any NODATA values encountered in the neighborhood will cause the resulting pixel to be NULL -- the user callback function is skipped in this case. + 'value': any NODATA values encountered in the neighborhood are replaced by the reference pixel (the one in the center of the neighborhood). Note that if this value is NODATA, the behavior is the same as 'NULL' (for the affected neighborhood) + + + + args + Arguments to pass into the user function. + + + Availability: 2.0.0 + + + + + + + Examples + Examples utilize the katrina raster loaded as a single tile described in + http://trac.osgeo.org/gdal/wiki/frmts_wtkraster.html + and then prepared in the examples + +-- +-- A simple 'callback' user function that averages up all the values in a neighborhood. +-- +CREATE OR REPLACE FUNCTION rast_avg(matrix float[][], nodatamode text, variadic args text[]) + RETURNS float AS + $$ + DECLARE + _matrix float[][]; + x1 integer; + x2 integer; + y1 integer; + y2 integer; + sum float; + BEGIN + _matrix := matrix; + sum := 0; + FOR x in array_lower(matrix, 1)..array_upper(matrix, 1) LOOP + FOR y in array_lower(matrix, 2)..array_upper(matrix, 2) LOOP + sum := sum + _matrix[x][y]; + END LOOP; + END LOOP; + RETURN (sum*1.0/(array_upper(matrix,1)*array_upper(matrix,2) ))::integer ; + END; + $$ +LANGUAGE 'plpgsql' IMMUTABLE COST 1000; + +-- now we apply to our raster averaging pixels within 2 pixels of each other in X and Y direction -- +SELECT ST_MapAlgebraFctNgb(rast, 1, '8BUI', 4,4, + 'rast_avg(float[][], text, text[])'::regprocedure, 'NULL', NULL) As nn_with_border + FROM katrinas_rescaled + limit 1; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + See Also + + , , + + + + + + ST_Polygon + Returns a polygon geometry formed by the union of pixels that have a pixel value that is not no data value. If no band number is specified, band num defaults to 1. + + + + + + + geometry ST_Polygon + raster rast + integer band_num=1 + + + + + + Description + Availability: Requires GDAL 1.7 or higher. + + + + Examples + +-- by default no data band value is 0 or not set, so polygon will return a square polygon +SELECT ST_AsText(ST_Polygon(rast)) As geomwkt +FROM dummy_rast +WHERE rid = 2; + +geomwkt +-------------------------------------------- +POLYGON((3427927.8 5793243.75,3427927.75 5793243.75,3427927.75 5793243.8,3427927.75 5793243.85,3427927.75 5793243.9, +3427927.75 5793244,3427927.8 5793244,3427927.85 5793244,3427927.9 5793244,3427928 5793244,3427928 5793243.95, +3427928 5793243.85,3427928 5793243.8,3427928 5793243.75,3427927.85 5793243.75,3427927.8 5793243.75)) + + +-- now we change the no data value of first band +UPDATE dummy_rast SET rast = ST_SetBandNoDataValue(rast,1,254) +WHERE rid = 2; +SELECt rid, ST_BandNoDataValue(rast) +from dummy_rast where rid = 2; + +-- ST_Polygon excludes the pixel value 254 and returns a multipolygon +SELECT ST_AsText(ST_Polygon(rast)) As geomwkt +FROM dummy_rast +WHERE rid = 2; + +geomwkt +--------------------------------------------------------- +MULTIPOLYGON(((3427927.9 5793243.95,3427927.85 5793243.95,3427927.85 5793244,3427927.9 5793244,3427927.9 5793243.95)), +((3427928 5793243.85,3427928 5793243.8,3427927.95 5793243.8,3427927.95 5793243.85,3427927.9 5793243.85,3427927.9 5793243.9,3427927.9 5793243.95,3427927.95 5793243.95,3427928 5793243.95,3427928 5793243.85)), +((3427927.8 5793243.75,3427927.75 5793243.75,3427927.75 5793243.8,3427927.75 5793243.85,3427927.75 5793243.9,3427927.75 5793244,3427927.8 5793244, +3427927.8 5793243.9,3427927.8 5793243.85,3427927.85 5793243.85,3427927.85 5793243.8,3427927.85 5793243.75,3427927.8 5793243.75))) + +-- Or if you want the no data value different for just one time + +SELECT ST_AsText( + ST_Polygon( + ST_SetBandNoDataValue(rast,1,252) + ) + ) As geomwkt +FROM dummy_rast +WHERE rid =2; + +geomwkt +--------------------------------- +POLYGON((3427928 5793243.85,3427928 5793243.8,3427928 5793243.75,3427927.85 5793243.75,3427927.8 5793243.75,3427927.8 5793243.8,3427927.75 5793243.8,3427927.75 5793243.85,3427927.75 5793243.9,3427927.75 5793244,3427927.8 5793244,3427927.85 5793244,3427927.9 5793244,3427928 5793244,3427928 5793243.95,3427928 5793243.85), +(3427927.9 5793243.9,3427927.9 5793243.85,3427927.95 5793243.85,3427927.95 5793243.9,3427927.9 5793243.9)) + + + + + + See Also + , + + + + + + ST_Reclass + Creates a new raster composed of band types reclassified from original. The nband is the band to be changed. If nband is not specified assumed to be 1. All other bands are returned unchanged. + Use case: convert a 16BUI band to a 8BUI and so forth for simpler rendering as viewable formats. + + + + + + raster ST_Reclass + raster rast + integer nband + text reclassexpr + text pixeltype + double precision nodataval=NULL + + + + raster ST_Reclass + raster rast + reclassarg[] VARIADIC reclassargset + + + + raster ST_Reclass + raster rast + text reclassexpr + text pixeltype + + + + + + Description + + Creates a new raster formed by applying a valid PostgreSQL algebraic operation defined by the reclassexpr on the input raster (rast). If no band is specified + band 1 is assumed. The new raster will have the same georeference, width, and height as the original raster. Bands not designated will come back unchanged. + Refer to for description of valid reclassification expressions. + + The bands of the new raster will have pixel type of pixeltype. If reclassargset is passed in then each reclassarg defines behavior of each band generated. + + + Availability: 2.0.0 + + + + Examples Basic + + Create a new raster from the original where band 2 is converted from 8BUI to 4BUI and all values from 101-254 are set to nodata value. + ALTER TABLE dummy_rast ADD COLUMN reclass_rast raster; +UPDATE dummy_rast SET reclass_rast = ST_Reclass(rast,2,'0-87:1-10, 88-100:11-15, 101-254:0-0', '4BUI',0) WHERE rid = 2; + +SELECT i as col, j as row, ST_Value(rast,2,i,j) As origval, + ST_Value(reclass_rast, 2, i, j) As reclassval, + ST_Value(reclass_rast, 2, i, j, false) As reclassval_include_nodata +FROM dummy_rast CROSS JOIN generate_series(1, 3) AS i CROSS JOIN generate_series(1,3) AS j +WHERE rid = 2; + + col | row | origval | reclassval | reclassval_include_nodata +-----+-----+---------+------------+--------------------------- + 1 | 1 | 78 | 9 | 9 + 2 | 1 | 98 | 14 | 14 + 3 | 1 | 122 | | 0 + 1 | 2 | 96 | 14 | 14 + 2 | 2 | 118 | | 0 + 3 | 2 | 180 | | 0 + 1 | 3 | 99 | 15 | 15 + 2 | 3 | 112 | | 0 + 3 | 3 | 169 | | 0 + + + + Example: Advanced using multiple reclassargs + + Create a new raster from the original where band 1,2,3 is converted to 1BB,4BUI, 4BUI respectively and reclassified. + Note this uses the variadic reclassarg argument which can take as input an indefinite number of reclassargs (theoretically as many bands as you have) + UPDATE dummy_rast SET reclass_rast = + ST_Reclass(rast, + ROW(2,'0-87]:1-10, (87-100]:11-15, (101-254]:0-0', '4BUI',NULL)::reclassarg, + ROW(1,'0-253]:1, 254:0', '1BB', NULL)::reclassarg, + ROW(3,'0-70]:1, (70-86:2, [86-150):3, [150-255:4', '4BUI', NULL)::reclassarg + ) WHERE rid = 2; + +SELECT i as col, j as row,ST_Value(rast,1,i,j) As ov1, ST_Value(reclass_rast, 1, i, j) As rv1, + ST_Value(rast,2,i,j) As ov2, ST_Value(reclass_rast, 2, i, j) As rv2, + ST_Value(rast,3,i,j) As ov3, ST_Value(reclass_rast, 3, i, j) As rv3 +FROM dummy_rast CROSS JOIN generate_series(1, 3) AS i CROSS JOIN generate_series(1,3) AS j +WHERE rid = 2; + +col | row | ov1 | rv1 | ov2 | rv2 | ov3 | rv3 +----+-----+-----+-----+-----+-----+-----+----- + 1 | 1 | 253 | 1 | 78 | 9 | 70 | 1 + 2 | 1 | 254 | 0 | 98 | 14 | 86 | 3 + 3 | 1 | 253 | 1 | 122 | 0 | 100 | 3 + 1 | 2 | 253 | 1 | 96 | 14 | 80 | 2 + 2 | 2 | 254 | 0 | 118 | 0 | 108 | 3 + 3 | 2 | 254 | 0 | 180 | 0 | 162 | 4 + 1 | 3 | 250 | 1 | 99 | 15 | 90 | 3 + 2 | 3 | 254 | 0 | 112 | 0 | 108 | 3 + 3 | 3 | 254 | 0 | 169 | 0 | 175 | 4 + + + Example: Advanced Map a single band 32BF raster to multiple viewable bands + + Create a new 3 band (8BUI,8BUI,8BUI viewable raster) from a raster that has only one 32bf band + +ALTER TABLE wind ADD COLUMN rast_view raster; +UPDATE wind + set rast_view = ST_AddBand( NULL, + ARRAY[ + ST_Reclass(rast, 1,'0.1-10]:1-10,9-10]:11,(11-33:0'::text, '8BUI'::text,0), + ST_Reclass(rast,1, '11-33):0-255,[0-32:0,(34-1000:0'::text, '8BUI'::text,0), + ST_Reclass(rast,1,'0-32]:0,(32-100:100-255'::text, '8BUI'::text,0) + ] + ) ; + + + + + See Also + , , , , , + + + + + + ST_Union + Returns the union of a set of raster tiles into a single raster composed of 1 band. If no band is specified for unioning, band num 1 is assumed. The resulting raster's extent is the extent of the whole set. In the case of intersection, the resulting value is defined by p_expression which is one of the following: LAST - the default when none is specified, MEAN, SUM, FIRST, MAX, MIN. + + + + + + raster ST_Union + setof raster rast + + + + + raster ST_Union + raster set rast + integer band_num + + + + + raster ST_Union + raster set rast + text p_expression + + + + + raster ST_Union + raster set rast + integer band_num + text p_expression + + + + + + + Description + + Returns the union of a set of raster tiles into a single raster composed of 1 band. If no band is specified for unioning, band num 1 is assumed. The resulting raster's extent is the extent of the whole set. In the case of intersection, the resulting value is defined by p_expression which is one of the following: LAST - the default when none is specified, MEAN, SUM, FIRST, MAX, MIN + + There are several other variants of this function not installed by default in PostGIS 2.0.0 -- these can be found in the raster/scripts/plpgsql/st_union.sql file of postgis source code. + + The ST_Union function in 2.0.0 is currently implemented predominantly in plpgsql. Because of the memory copying needed to copy between the C and plpgsql layer, this function is much much slower than it needs to be. + Future 2.0 releases will have this function implemented in C, so you should witness significant improvements in speed when that happens. As a general rule of thumb you want to minimize the size of the rasters, that ST_Union works with. + One approach is to clip first and then union the clipped versions. Refer to select parcels example in . That example if unioning is done before clipping takes about 4 times longer. With the higher res imagery the timing the ratio between is even higher. + Availability: 2.0.0 + + + + Examples: Reconstitute a single band chunked raster tile + -- this creates a single band from first band of raster tiles +-- that form the original file system tile +SELECT filename, ST_Union(rast) As file_rast +FROM sometable WHERE filename IN('dem01', 'dem02') GROUP BY filename; + + + + Examples: Return a multi-band raster that is the union of tiles intersecting geometry + -- this creates a multi band raster collecting all the tiles that intersect a line +SELECT ST_AddBand(NULL,ARRAY[ST_Union(rast,1), ST_Union(rast,2), ST_Union(rast,3) ]) +FROM aerials.boston +WHERE ST_Intersects(rast, ST_GeomFromText('LINESTRING(230486 887771, 230500 88772)',26986) ); + + + + + + See Also + , , , + + + + + + Raster Processing Builtin Functions + + + ST_Min4ma + Raster processing function that calculates the minimum pixel value in a neighborhood. + + + + + + float8 ST_Min4ma + float8[][] matrix + text nodatamode + text[] VARIADIC args + + + + + + Description + + Calculate the minimum pixel value in a neighborhood of pixels. + + + This function is a specialized callback function for use as a callback parameter to . + + + Availability: 2.0.0 + + + + Examples + + SELECT + rid, + st_value( + st_mapalgebrafctngb(rast, 1, NULL, 1, 1, 'st_min4ma(float[][],text,text[])'::regprocedure, 'ignore', NULL), 2, 2 + ) +FROM dummy_rast +WHERE rid = 2; + rid | st_value +-----+---------- + 2 | 250 +(1 row) + + + + + + See Also + + , + , + , + , + , + + + + + + + + + ST_Max4ma + Raster processing function that calculates the maximum pixel value in a neighborhood. + + + + + + float8 ST_Max4ma + float8[][] matrix + text nodatamode + text[] VARIADIC args + + + + + + Description + + Calculate the maximum pixel value in a neighborhood of pixels. + + + This function is a specialized callback function for use as a callback parameter to . + + + Availability: 2.0.0 + + + + Examples + + SELECT + rid, + st_value( + st_mapalgebrafctngb(rast, 1, NULL, 1, 1, 'st_max4ma(float[][],text,text[])'::regprocedure, 'ignore', NULL), 2, 2 + ) +FROM dummy_rast +WHERE rid = 2; + rid | st_value +-----+---------- + 2 | 254 +(1 row) + + + + + + See Also + + , + , + , + , + , + + + + + + + + + ST_Sum4ma + Raster processing function that calculates the sum of all pixel values in a neighborhood. + + + + + + float8 ST_Sum4ma + float8[][] matrix + text nodatamode + text[] VARIADIC args + + + + + + Description + + Calculate the sum of all pixel values in a neighborhood of pixels. + + + This function is a specialized callback function for use as a callback parameter to . + + + Availability: 2.0.0 + + + + Examples + + SELECT + rid, + st_value( + st_mapalgebrafctngb(rast, 1, '32BF', 1, 1, 'st_sum4ma(float[][],text,text[])'::regprocedure, 'ignore', NULL), 2, 2 + ) +FROM dummy_rast +WHERE rid = 2; + rid | st_value +-----+---------- + 2 | 2279 +(1 row) + + + + + + See Also + + , + , + , + , + , + + + + + + + + + ST_Mean4ma + Raster processing function that calculates the mean pixel value in a neighborhood. + + + + + + float8 ST_Mean4ma + float8[][] matrix + text nodatamode + text[] VARIADIC args + + + + + + Description + + Calculate the mean pixel value in a neighborhood of pixels. + + + This function is a specialized callback function for use as a callback parameter to . + + + Availability: 2.0.0 + + + + Examples + + SELECT + rid, + st_value( + st_mapalgebrafctngb(rast, 1, '32BF', 1, 1, 'st_mean4ma(float[][],text,text[])'::regprocedure, 'ignore', NULL), 2, 2 + ) +FROM dummy_rast +WHERE rid = 2; + rid | st_value +-----+------------------ + 2 | 253.222229003906 +(1 row) + + + + + + See Also + + , + , + , + , + , + + + + + + + + ST_Range4ma + Raster processing function that calculates the range of pixel values in a neighborhood. + + + + + + float8 ST_Range4ma + float8[][] matrix + text nodatamode + text[] VARIADIC args + + + + + + Description + + Calculate the range of pixel values in a neighborhood of pixels. + + + This function is a specialized callback function for use as a callback parameter to . + + + Availability: 2.0.0 + + + + Examples + + SELECT + rid, + st_value( + st_mapalgebrafctngb(rast, 1, NULL, 1, 1, 'st_range4ma(float[][],text,text[])'::regprocedure, 'ignore', NULL), 2, 2 + ) +FROM dummy_rast +WHERE rid = 2; + rid | st_value +-----+---------- + 2 | 4 +(1 row) + + + + + + See Also + + , + , + , + , + , + + + + + + + + + ST_Distinct4ma + Raster processing function that calculates the number of unique pixel values in a neighborhood. + + + + + + float8 ST_Distinct4ma + float8[][] matrix + text nodatamode + text[] VARIADIC args + + + + + + Description + + Calculate the number of unique pixel values in a neighborhood of pixels. + + + This function is a specialized callback function for use as a callback parameter to . + + + Availability: 2.0.0 + + + + Examples + + SELECT + rid, + st_value( + st_mapalgebrafctngb(rast, 1, NULL, 1, 1, 'st_distinct4ma(float[][],text,text[])'::regprocedure, 'ignore', NULL), 2, 2 + ) +FROM dummy_rast +WHERE rid = 2; + rid | st_value +-----+---------- + 2 | 3 +(1 row) + + + + + + See Also + + , + , + , + , + , + + + + + + + + + ST_StdDev4ma + Raster processing function that calculates the standard deviation of pixel values in a neighborhood. + + + + + + float8 ST_StdDev4ma + float8[][] matrix + text nodatamode + text[] VARIADIC args + + + + + + Description + + Calculate the standard deviation of pixel values in a neighborhood of pixels. + + + This function is a specialized callback function for use as a callback parameter to . + + + Availability: 2.0.0 + + + + Examples + + SELECT + rid, + st_value( + st_mapalgebrafctngb(rast, 1, '32BF', 1, 1, 'st_stddev4ma(float[][],text,text[])'::regprocedure, 'ignore', NULL), 2, 2 + ) +FROM dummy_rast +WHERE rid = 2; + rid | st_value +-----+------------------ + 2 | 1.30170822143555 +(1 row) + + + + + + See Also + + , + , + , + , + , + + + + + + + + + + Raster Operators + + + && + + Returns TRUE if A's bounding box overlaps B's. + + + + + + boolean && + + + raster + + A + + + + raster + + B + + + + + + + Description + + The && operator returns TRUE if the bounding box of raster A overlaps the bounding box of raster B. + + This operand will make use of any indexes that may be available on the + rasters. + + + + + Examples + + SELECT A.rid As a_rid, B.rid As b_rid, A.rast && B.rast As overlap + FROM dummy_rast AS A CROSS JOIN dummy_rast AS B LIMIT 3; + + a_rid | b_rid | overlap +-------+-------+--------- + 2 | 2 | t + 2 | 3 | f + 2 | 1 | f + + + + + + + &< + + Returns TRUE if A's bounding box is to the left of B's. + + + + + + boolean &< + + + raster + + A + + + + raster + + B + + + + + + + Description + + The &< operator returns TRUE if the bounding box of raster A + overlaps or is to the left of the bounding box of raster B, or more accurately, overlaps or is NOT to the right + of the bounding box of raster B. + + This operand will make use of any indexes that may be available on the + geometries. + + + + Examples + + SELECT A.rid As a_rid, B.rid As b_rid, A.rast &< B.rast As overleft + FROM dummy_rast AS A CROSS JOIN dummy_rast AS B; + +a_rid | b_rid | overleft +------+-------+---------- + 2 | 2 | t + 2 | 3 | f + 2 | 1 | f + 3 | 2 | t + 3 | 3 | t + 3 | 1 | f + 1 | 2 | t + 1 | 3 | t + 1 | 1 | t + + + + + + + &> + + Returns TRUE if A's bounding box is to the right of B's. + + + + + + boolean &> + + + raster + + A + + + + raster + + B + + + + + + + Description + + The &> operator returns TRUE if the bounding box of raster A + overlaps or is to the right of the bounding box of raster B, or more accurately, overlaps or is NOT to the left + of the bounding box of raster B. + + This operand will make use of any indexes that may be available on the + geometries. + + + + Examples + + SELECT A.rid As a_rid, B.rid As b_rid, A.rast &> B.rast As overright + FROM dummy_rast AS A CROSS JOIN dummy_rast AS B; + + a_rid | b_rid | overright +-------+-------+---------- + 2 | 2 | t + 2 | 3 | t + 2 | 1 | t + 3 | 2 | f + 3 | 3 | t + 3 | 1 | f + 1 | 2 | f + 1 | 3 | t + 1 | 1 | t + + + + + + + Raster and Raster Band Spatial Relationships + + + ST_Intersects + + Return true if the raster spatially intersects a separate raster or geometry. If the band number is not provided (or set to NULL), only the convex hull of the raster is considered in the test. If the band number is provided, only those pixels with value (not NODATA) are considered in the test. + + + + + + + boolean ST_Intersects + + raster + rasta + + + integer + nbanda + + + raster + rastb + + + integer + nbandb + + + + + boolean ST_Intersects + + raster + rasta + + + raster + rastb + + + + + boolean ST_Intersects + + raster + rast + + + integer + nband + + + geometry + geommin + + + + + boolean ST_Intersects + + raster + rast + + + geometry + geommin + + + integer + nband=NULL + + + + + boolean ST_Intersects + + geometry + geommin + + + raster + rast + + + integer + nband=NULL + + + + + + + + Description + + + Return true if the raster spatially intersects a separate raster or geometry. If the band number is not provided (or set to NULL), only the convex hull of the raster is considered in the test. If the band number is provided, only those pixels with value (not NODATA) are considered in the test. + + + + Depending on the order that the raster and geometry is passed to ST_Intersects(), the test will operate in either raster-space or geometry-space. If ST_Intersects(raster, ....), the test is in raster-space (the geometry is converted to a raster). If ST_Intersects(geometry, ...), the test is in geometry-space (the raster is converted to a set of pixel polygons). + + + + + This operand will make use of any indexes that may be available on the geometries / rasters. + + + + Enhanced: 2.0.0 support raster/raster intersects was introduced. + + + + Examples + + SELECT A.rid, g.gid , ST_Intersects(A.rast, g.geom) As inter +FROM dummy_rast AS A CROSS JOIN + (VALUES (1, ST_Point(3427928, 5793243.85) ) , + (2, ST_GeomFromText('LINESTRING(3427927.85 5793243.75,3427927.8 5793243.75,3427927.8 5793243.8)') ), + (3, ST_GeomFromText('LINESTRING(1 2, 3 4)') ) + ) As g(gid,geom) +WHERE A.rid =2 ; + + rid | gid | inter +-----+-----+------- + 2 | 1 | t + 2 | 2 | t + 2 | 3 | f + + + + See Also + + + + + + + ST_SameAlignment + + Returns true if rasters have same skew, scale, spatial ref and false if they don't with notice detailing issue. + + + + + + boolean ST_SameAlignment + + raster + rastA + + + raster + rastB + + + + + boolean ST_SameAlignment + + double precision + ulx1 + + + double precision + uly1 + + + double precision + scalex1 + + + double precision + scaley1 + + + double precision + skewx1 + + + double precision + skewy1 + + + double precision + ulx2 + + + double precision + uly2 + + + double precision + scalex2 + + + double precision + scaley2 + + + double precision + skewx2 + + + double precision + skewy2 + + + + + + + Description + + Returns true if the raster have same skew scale etc. Returns false if they don't and a NOTICE detailing the alignment issue. + + Availability: 2.0.0 + + + + Examples: Rasters + + SELECT ST_SameAlignment( + ST_MakeEmptyRaster(1, 1, 0, 0, 1, 1, 0, 0), + ST_MakeEmptyRaster(1, 1, 0, 0, 1, 1, 0, 0) +) as sm; + +sm +---- +t + + +SELECT ST_SameAlignment(A.rast,b.rast) + FROM dummy_rast AS A CROSS JOIN dummy_rast AS B; + + NOTICE: The two rasters provided have different SRIDs +NOTICE: The two rasters provided have different SRIDs + st_samealignment +------------------ + t + f + f + f + + + + See Also + , + + + + diff -Nru postgis-1.5.3/doc/reference_transaction.xml postgis-2.0.1/doc/reference_transaction.xml --- postgis-1.5.3/doc/reference_transaction.xml 2009-11-15 20:39:17.000000000 +0000 +++ postgis-2.0.1/doc/reference_transaction.xml 2012-02-27 22:08:12.000000000 +0000 @@ -4,11 +4,11 @@ This module and associated pl/pgsql functions have been implemented to provide long locking support required by Web Feature Service specification. + url="http://www.opengeospatial.org/standards/wfs">Web Feature Service specification. Users must use serializable + url="http://www.postgresql.org/docs/current/static/transaction-iso.html">serializable transaction level otherwise locking mechanism would break. @@ -136,6 +136,7 @@ text DisableLongTransactions + @@ -185,6 +186,7 @@ text EnableLongTransactions + diff -Nru postgis-1.5.3/doc/reference_type.xml postgis-2.0.1/doc/reference_type.xml --- postgis-1.5.3/doc/reference_type.xml 2009-11-28 07:13:35.000000000 +0000 +++ postgis-2.0.1/doc/reference_type.xml 2012-02-27 22:08:12.000000000 +0000 @@ -1,6 +1,5 @@ - PostgreSQL PostGIS Types This section lists the PostgreSQL data types installed by PostGIS. Note we describe the casting behavior of these which is very @@ -15,10 +14,12 @@ but no geometry. What happens is that both functions are equally good to use with geometry since geometry has an autocast for both -- so you end up with an ambiguous function error. To force PostgreSQL to choose, you do a CAST(mygeom As box3d) or mygeom::box3d. - At least as of PostgreSQL 8.3 - Everything can be CAST to text (presumably because of the magical unknown type), so no defined CASTS for that need to be present for you to CAST an object to text. + At least as of PostgreSQL 8.3 - Everything can be CAST to text (presumably because of the magical unknown type), so no defined CASTS for that need to be present for you to CAST an object to text. - + PostgreSQL PostGIS Geometry/Geography/Box Types + + box2d A box composed of x min, ymin, xmax, ymax. Often used to return the 2d enclosing box of a geometry. @@ -29,7 +30,7 @@ box2d is a spatial data type used to represent the enclosing box of a geometry or set of geometries. ST_Extent in earlier versions prior to PostGIS 1.4 would return a box2d. - + box3d A box composed of x min, ymin, zmin, xmax, ymax, zmax. Often used to return the 3d extent of a geometry or collection of geometries. @@ -37,11 +38,11 @@ Description - box3d is a postgis spatial data type used to represent the enclosing box of a geometry or set of geometries. ST_Extent3D returns a box3d object. + box3d is a postgis spatial data type used to represent the enclosing box of a geometry or set of geometries. ST_3DExtent returns a box3d object. - Casting Behavor + Casting Behavior This section lists the automatic as well as explicit casts allowed for this data type @@ -68,50 +69,6 @@ - - - box3d_extent - A box composed of x min, ymin, zmin, xmax, ymax, zmax. Often used to return the extent of a geometry. - - - - Description - box3d_extent is a data type returned by ST_Extent. In versions prior to PostGIS 1.4, ST_Extent would return a box2d. - - - - Casting Behavor - This section lists the automatic as well as explicit casts allowed for this data type - - - - - Cast To - Behavior - - - box2d - automatic - - - box3d - automatic - - - geometry - automatic - - - - - - - - See Also - - - - geometry @@ -124,7 +81,7 @@ - Casting Behavor + Casting Behavior This section lists the automatic as well as explicit casts allowed for this data type @@ -200,7 +157,7 @@ - Casting Behavor + Casting Behavior This section lists the automatic as well as explicit casts allowed for this data type @@ -220,7 +177,7 @@ See Also - , + , diff -Nru postgis-1.5.3/doc/release_notes.xml postgis-2.0.1/doc/release_notes.xml --- postgis-1.5.3/doc/release_notes.xml 2011-06-25 16:27:43.000000000 +0000 +++ postgis-2.0.1/doc/release_notes.xml 2012-06-22 20:51:25.000000000 +0000 @@ -3,14 +3,220 @@ AppendixRelease Notes + Release 2.0.1 + Release date: 2012/06/22 + This is a bug fix release, addressing issues that have been filed since the 2.0.0 release. + + Bug Fixes + #1264, fix st_dwithin(geog, geog, 0). + #1468 shp2pgsql-gui table column schema get shifted + #1694, fix building with clang. (vince) + #1708, improve restore of pre-PostGIS 2.0 backups. + #1714, more robust handling of high topology tolerance. + #1755, ST_GeographyFromText support for higher dimensions. + #1759, loading transformed shapefiles in raster enabled db. + #1761, handling of subdatasets in NetCDF, HDF4 and HDF5 in raster2pgsql. + #1763, topology.toTopoGeom use with custom search_path. + #1766, don't let ST_RemEdge* destroy peripheral TopoGeometry objects. + #1774, Clearer error on setting an edge geometry to an invalid one. + #1775, ST_ChangeEdgeGeom collision detection with 2-vertex target. + #1776, fix ST_SymDifference(empty, geom) to return geom. + #1779, install SQL comment files. + #1782, fix spatial reference string handling in raster. + #1789, fix false edge-node crossing report in ValidateTopology. + #1790, fix toTopoGeom handling of duplicated primitives. + #1791, fix ST_Azimuth with very close but distinct points. + #1797, fix (ValidateTopology(xxx)).* syntax calls. + #1805, put back the 900913 SRID entry. + #1813, Only show readable relations in metadata tables. + #1819, fix floating point issues with ST_World2RasterCoord and + ST_Raster2WorldCoord variants. + #1820 compilation on 9.2beta1. + #1822, topology load on PostgreSQL 9.2beta1. + #1825, fix prepared geometry cache lookup + #1829, fix uninitialized read in GeoJSON parser + #1834, revise postgis extension to only backup + user specified spatial_ref_sys + #1839, handling of subdatasets in GeoTIFF in raster2pgsql. + #1840, fix logic of when to compute # of tiles in raster2pgsql. + #1851, fix spatial_ref_system parameters for EPSG:3844 + #1857, fix failure to detect endpoint mismatch in ST_AddEdge*Face* + #1865, data loss in postgis_restore.pl when data rows have leading + dashes. + #1867, catch invalid topology name passed to topogeo_add* + #1872, fix ST_ApproxSummarystats to prevent division by zero + #1873, fix ptarray_locate_point to return interpolated Z/M values for + on-the-line case + #1875, ST_SummaryStats returns NULL for all parameters except count + when count is zero + + + + Enhancements + More detailed exception message from topology editing functions. + #1786, improved build dependencies + #1806, speedup of ST_BuildArea, ST_MakeValid and ST_GetFaceGeometry. + #1812, Add lwgeom_normalize in LIBLWGEOM for more stable testing. + + + + Release 2.0.0 + Release date: 2012/04/03 + This is a major release. A hard upgrade is required. Yes this means a full dump reload and some special preparations if you are using obsolete functions. Refer + to for details on upgrading. + Refer to for more details and changed/new functions. + + Testers - Our unsung heroes + We are most indebted to the numerous members in the PostGIS community + who were brave enough to test out the new features in this release. + No major release can be successful without these folk. + Below are those who have been most valiant, provided very detailed + and thorough bug reports, + and detailed analysis. + + Andrea Peri - Lots of testing on topology, checking for correctness + Andreas Forø Tollefsen - raster testing + Chris English - topology stress testing loader functions + Salvatore Larosa - topology robustness testing + Brian Hamlin - Benchmarking + (also experimental experimental branches + before they are folded into core) + , general testing of various pieces + including Tiger and Topology. Testing on various server VMs + Mike Pease - Tiger geocoder testing - very detailed reports of issues + Tom van Tilburg - raster testing + + + + Important / Breaking Changes + #722, #302, Most deprecated functions removed (over 250 functions) (Regina Obe, Paul Ramsey) + Unknown SRID changed from -1 to 0. (Paul Ramsey) + -- (most deprecated in 1.2) removed non-ST variants buffer, length, intersects + (and internal functions renamed) etc. + -- If you have been using deprecated functions CHANGE your apps or suffer the consequences. + If you don't see a function documented -- it ain't supported or it is an internal function. + Some constraints in older tables were built with deprecated functions. + If you restore you may need to rebuild table constraints with populate_geometry_columns(). If you have applications or tools + that rely on deprecated functions, please refer to for more details. + #944 geometry_columns is now a view instead of a table + (Paul Ramsey, Regina Obe) + for tables created the old way reads (srid, type, dims) constraints + for geometry columns created with type modifiers + reads rom column definition + #1081, #1082, #1084, #1088 - Mangement functions support typmod + geometry column creation functions now default to typmod creation + (Regina Obe) + #1083 probe_geometry_columns(), rename_geometry_table_constraints(), + fix_geometry_columns(); removed + - now obsolete with geometry_column view + (Regina Obe) + #817 Renaming old 3D functions to the convention ST_3D (Nicklas Avén) + #548 (sorta), ST_NumGeometries,ST_GeometryN now returns 1 (or the geometry) instead of null + for single geometries (Sandro Santilli, Maxime van Noppen) + + + New Features + KNN Gist index based centroid (<->) and box (<#>) distance operators (Paul Ramsey / funded by Vizzuality) + Support for TIN and PolyHedralSurface and enhancement of many functions to support 3D (Olivier Courtin / Oslandia) + Raster support integrated and documented + (Pierre Racine, Jorge Arévalo, Mateusz Loskot, Sandro Santilli, David Zwarg, Regina Obe, Bborie Park) + (Company developer and funding: University Laval, Deimos Space, CadCorp, Michigan Tech Research Institute, Azavea, Paragon Corporation, UC Davis Center for Vectorborne Diseases) + Making spatial indexes 3D aware - in progress (Paul Ramsey, Mark Cave-Ayland) + Topology support improved (more functions), documented, testing (Sandro Santilli / Faunalia for RT-SIGTA), Andrea Peri, Regina Obe, Jose Carlos Martinez Llari + 3D relationship and measurement support functions (Nicklas Avén) + ST_3DDistance, ST_3DClosestPoint, ST_3DIntersects, ST_3DShortestLine and more... + N-Dimensional spatial indexes (Paul Ramsey / OpenGeo) + ST_Split (Sandro Santilli / Faunalia for RT-SIGTA) + ST_IsValidDetail (Sandro Santilli / Faunalia for RT-SIGTA) + ST_MakeValid (Sandro Santilli / Faunalia for RT-SIGTA) + ST_RemoveRepeatedPoints (Sandro Santilli / Faunalia for RT-SIGTA) + ST_GeometryN and ST_NumGeometries support for non-collections (Sandro Santilli) + ST_IsCollection (Sandro Santilli, Maxime van Noppen) + ST_SharedPaths (Sandro Santilli / Faunalia for RT-SIGTA) + ST_Snap (Sandro Santilli) + ST_RelateMatch (Sandro Santilli / Faunalia for RT-SIGTA) + ST_ConcaveHull (Regina Obe and Leo Hsu / Paragon Corporation) + ST_UnaryUnion (Sandro Santilli / Faunalia for RT-SIGTA) + ST_AsX3D (Regina Obe / Arrival 3D funding) + ST_OffsetCurve (Sandro Santilli, Rafal Magda) + ST_GeomFromGeoJSON (Kashif Rasul, Paul Ramsey / Vizzuality funding) + + + Enhancements + Made shape file loader tolerant of truncated multibyte values found in some free worldwide shapefiles (Sandro Santilli) + Lots of bug fixes and enhancements to shp2pgsql + Beefing up regression tests for loaders + Reproject support for both geometry and geography during import + (Jeff Adams / Azavea, Mark Cave-Ayland) + pgsql2shp conversion from predefined list + (Loic Dachary / Mark Cave-Ayland) + Shp-pgsql GUI loader - support loading multiple files at a time. (Mark Leslie) + Extras - upgraded tiger_geocoder from using old TIGER format to use new TIGER shp and file structure format (Stephen Frost) + Extras - revised tiger_geocoder to work with TIGER census 2010 data, addition of reverse geocoder function, various bug fixes, accuracy enhancements, + limit max result return, speed improvements, loading routines. + (Regina Obe, Leo Hsu / Paragon Corporation / funding provided by Hunter Systems Group) + Overall Documentation proofreading and corrections. (Kasif Rasul) + Cleanup PostGIS JDBC classes, revise to use Maven build. (Maria Arias de Reyna, Sandro Santilli) + + + Bug Fixes + #1335 ST_AddPoint returns incorrect result on Linux (Even Rouault) + + + Release specific credits + We thank U.S Department of State Human Information Unit (HIU) and Vizzuality for general monetary support to get PostGIS 2.0 out the door. + + + + + Release 1.5.4 + Release date: 2012/05/07 + This is a bug fix release, addressing issues that have been filed since the 1.5.3 release. + + Bug Fixes + #547, ST_Contains memory problems (Sandro Santilli) + #621, Problem finding intersections with geography (Paul Ramsey) + #627, PostGIS/PostgreSQL process die on invalid geometry (Paul Ramsey) + #810, Increase accuracy of area calculation (Paul Ramsey) + #852, improve spatial predicates robustness (Sandro Santilli, Nicklas Avén) + #877, ST_Estimated_Extent returns NULL on empty tables (Sandro Santilli) + #1028, ST_AsSVG kills whole postgres server when fails (Paul Ramsey) + #1056, Fix boxes of arcs and circle stroking code (Paul Ramsey) + #1121, populate_geometry_columns using deprecated functions (Regin Obe, Paul Ramsey) + #1135, improve testsuite predictability (Andreas 'ads' Scherbaum) + #1146, images generator crashes (bronaugh) + #1170, North Pole intersection fails (Paul Ramsey) + #1179, ST_AsText crash with bad value (kjurka) + #1184, honour DESTDIR in documentation Makefile (Bryce L Nordgren) + #1227, server crash on invalid GML + #1252, SRID appearing in WKT (Paul Ramsey) + #1264, st_dwithin(g, g, 0) doesn't work (Paul Ramsey) + #1344, allow exporting tables with invalid geometries (Sandro Santilli) + #1389, wrong proj4text for SRID 31300 and 31370 (Paul Ramsey) + #1406, shp2pgsql crashes when loading into geography (Sandro Santilli) + #1595, fixed SRID redundancy in ST_Line_SubString (Sandro Santilli) + #1596, check SRID in UpdateGeometrySRID (Mike Toews, Sandro Santilli) + #1602, fix ST_Polygonize to retain Z (Sandro Santilli) + #1697, fix crash with EMPTY entries in GiST index (Paul Ramsey) + #1772, fix ST_Line_Locate_Point with collapsed input (Sandro Santilli) + #1799, Protect ST_Segmentize from max_length=0 (Sandro Santilli) + Alter parameter order in 900913 (Paul Ramsey) + Support builds with "gmake" (Greg Troxel) + + + + Release 1.5.3 Release date: 2011/06/25 - This is a bug fix release, addressing issues that have been filed since the 1.5.2 release. + This is a bug fix release, addressing issues that have been filed since the 1.5.2 release. If you are running PostGIS 1.3+, a soft upgrade is sufficient + otherwise a hard upgrade is recommended. Bug Fixes + #1056, produce correct bboxes for arc geometries, fixes index errors + (Paul Ramsey) #1007, ST_IsValid crash fix requires GEOS 3.3.0+ or 3.2.3+ (Sandro Santilli, reported by Birgit Laggner) - #940, support for PostgreSQL 9.1 beta 1 + #940, support for PostgreSQL 9.1 beta 1 (Regina Obe, Paul Ramsey, patch submitted by stl) #845, ST_Intersects precision error (Sandro Santilli, Nicklas Avén) Reported by cdestigter @@ -40,7 +246,8 @@ Release 1.5.2 Release date: 2010/09/27 - This is a bug fix release, addressing issues that have been filed since the 1.5.1 release. + This is a bug fix release, addressing issues that have been filed since the 1.5.1 release. If you are running PostGIS 1.3+, a soft upgrade is sufficient + otherwise a hard upgrade is recommended. Bug Fixes Loader: fix handling of empty (0-verticed) geometries in shapefiles. (Sandro Santilli) @@ -62,15 +269,16 @@ #581, LWGEOM-expand produces inconsistent results (Mark Cave-Ayland) #513, Add dbf filter to shp2pgsql-gui and allow uploading dbf only (Paul Ramsey) Fix further build issues against PostgreSQL 9.0 (Mark Cave-Ayland) - #572, Password whitespace for Shape File + #572, Password whitespace for Shape File (Mark Cave-Ayland) #603, shp2pgsql: "-w" produces invalid WKT for MULTI* objects. (Mark Cave-Ayland) - + Release 1.5.1 Release date: 2010/03/11 - This is a bug fix release, addressing issues that have been filed since the 1.4.1 release. + This is a bug fix release, addressing issues that have been filed since the 1.4.1 release. If you are running PostGIS 1.3+, a soft upgrade is sufficient + otherwise a hard upgrade is recommended. Bug Fixes #410, update embedded bbox when applying ST_SetPoint, ST_AddPoint ST_RemovePoint to a linestring (Paul Ramsey) @@ -84,7 +292,7 @@ Ensure support for upcoming 9.0 PgSQL release (Paul Ramsey) - + Release 1.5.0 Release date: 2010/02/04 @@ -119,7 +327,7 @@ ST_MaxDistance ST_ShortestLine - ST_DumpPoints (Maxime van Noppen) + ST_DumpPoints (Maxime van Noppen) KML, GML input via ST_GeomFromGML and ST_GeomFromKML (Olivier Courtin) Extract homogeneous collection with ST_CollectionExtract (Paul Ramsey) Add measure values to an existing linestring with ST_AddMeasure (Paul Ramsey) @@ -146,14 +354,16 @@ Bug fixes - http://trac.osgeo.org/postgis/query?status=closed&milestone=postgis+1.5.0&order=priority + http://trac.osgeo.org/postgis/query?status=closed&milestone=PostGIS+1.5.0&order=priority Release 1.4.0 Release date: 2009/07/24 - This release provides performance enhancements, improved internal structures and testing, new features, and upgraded documentation. + This release provides performance enhancements, improved internal structures and testing, new features, and upgraded documentation. + If you are running PostGIS 1.1+, a soft upgrade is sufficient + otherwise a hard upgrade is recommended. API Stability @@ -173,7 +383,7 @@ ST_Union() uses high-speed cascaded union when compiled against GEOS 3.1+ (Paul Ramsey) ST_ContainsProperly() requires GEOS 3.1+ - ST_Intersects(), ST_Contains(), ST_Within() use high-speed cached prepared geometry against GEOS 3.1+ (Paul Ramsey) + ST_Intersects(), ST_Contains(), ST_Within() use high-speed cached prepared geometry against GEOS 3.1+ (Paul Ramsey / funded by Zonar Systems) Vastly improved documentation and reference manual (Regina Obe & Kevin Neufeld) Figures and diagram examples in the reference manual (Kevin Neufeld) ST_IsValidReason() returns readable explanations for validity failures (Paul Ramsey) @@ -210,14 +420,15 @@ Bug fixes - http://trac.osgeo.org/postgis/query?status=closed&milestone=postgis+1.4.0&order=priority + http://trac.osgeo.org/postgis/query?status=closed&milestone=PostGIS+1.4.0&order=priority Release 1.3.6 Release date: 2009/05/04 - This release adds support for PostgreSQL 8.4, exporting + If you are running PostGIS 1.1+, a soft upgrade is sufficient + otherwise a hard upgrade is recommended. This release adds support for PostgreSQL 8.4, exporting prj files from the database with shape data, some crash fixes for shp2pgsql, and several small bug fixes in the handling of "curve" types, logical error importing dbf only files, improved error handling of AddGeometryColumns. @@ -225,9 +436,10 @@ Release 1.3.5 Release date: 2008/12/15 - This release is a bug fix release to address a failure + If you are running PostGIS 1.1+, a soft upgrade is sufficient + otherwise a hard upgrade is recommended. This release is a bug fix release to address a failure in ST_Force_Collection and related functions that critically - affects using Mapserver with LINE layers. + affects using MapServer with LINE layers. @@ -291,7 +503,7 @@ Added ST_Covers and ST_CoveredBy relational functions. Description and justification of these functions can be found at - http://lin-ear-th-inking.blogspot.com/2007/06/subtleties-of-ogc-covers-spatial.html + http://lin-ear-th-inking.blogspot.com/2007/06/subtleties-of-ogc-covers-spatial.html Added ST_DWithin relational function. @@ -515,7 +727,7 @@ GNU trove. Added EJB2 support generously donated by the "Geodetix s.r.l. - Company" http://www.geodetix.it/ + Company" http://www.geodetix.it/ Added EJB3 tutorial / examples donated by Norman Barker <nbarker@ittvis.com> diff -Nru postgis-1.5.3/doc/reporting.xml postgis-2.0.1/doc/reporting.xml --- postgis-1.5.3/doc/reporting.xml 2009-10-28 10:58:33.000000000 +0000 +++ postgis-2.0.1/doc/reporting.xml 2012-02-27 22:08:12.000000000 +0000 @@ -46,7 +46,7 @@ If your changes are more extensive, a Subversion patch is definitely preferred. This is a four step process on Unix (assuming you already have - Subversion + Subversion installed): @@ -66,7 +66,7 @@ vim trunk/doc/postgis.xml - Note that the documentation is written in SGML rather than HTML, + Note that the documentation is written in DocBook XML rather than HTML, so if you are not familiar with it please follow the example of the rest of the documentation. @@ -84,4 +84,4 @@ - \ No newline at end of file + diff -Nru postgis-1.5.3/doc/rfc/postgis_rfc_03_sheet.txt postgis-2.0.1/doc/rfc/postgis_rfc_03_sheet.txt --- postgis-1.5.3/doc/rfc/postgis_rfc_03_sheet.txt 2009-01-24 20:49:40.000000000 +0000 +++ postgis-2.0.1/doc/rfc/postgis_rfc_03_sheet.txt 2012-02-27 22:08:12.000000000 +0000 @@ -1 +1,681 @@ -Type Name Visibility Action Rename Notes FUNCTION spheroid_in(cstring) PRIVATE KEEP FUNCTION ST_spheroid_in(cstring) PRIVATE DELETE FUNCTION spheroid_out(spheroid) PRIVATE KEEP FUNCTION ST_spheroid_out(spheroid) PRIVATE DELETE FUNCTION geometry_in(cstring) PRIVATE KEEP FUNCTION ST_geometry_in(cstring) PRIVATE DELETE FUNCTION geometry_out(geometry) PRIVATE KEEP FUNCTION ST_geometry_out(geometry) PRIVATE DELETE FUNCTION geometry_analyze(internal) PRIVATE KEEP FUNCTION ST_geometry_analyze(internal) PRIVATE DELETE FUNCTION geometry_recv(internal) PRIVATE KEEP FUNCTION ST_geometry_recv(internal) PRIVATE DELETE FUNCTION geometry_send(geometry) PRIVATE KEEP FUNCTION ST_geometry_send(geometry) PRIVATE DELETE FUNCTION "Affine(geometry,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8)" PUBLIC DEPRECATE FUNCTION "ST_Affine(geometry,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8)" PUBLIC KEEP FUNCTION "Affine(geometry,float8,float8,float8,float8,float8,float8)" PUBLIC DEPRECATE FUNCTION "ST_Affine(geometry,float8,float8,float8,float8,float8,float8)" PUBLIC KEEP FUNCTION "RotateZ(geometry,float8)" PUBLIC DEPRECATE FUNCTION "ST_RotateZ(geometry,float8)" PUBLIC KEEP FUNCTION "Rotate(geometry,float8)" PUBLIC DEPRECATE FUNCTION "ST_Rotate(geometry,float8)" PUBLIC KEEP FUNCTION "RotateX(geometry,float8)" PUBLIC DEPRECATE FUNCTION "ST_RotateX(geometry,float8)" PUBLIC KEEP FUNCTION "RotateY(geometry,float8)" PUBLIC DEPRECATE FUNCTION "ST_RotateY(geometry,float8)" PUBLIC KEEP FUNCTION "Translate(geometry,float8,float8,float8)" PUBLIC DEPRECATE FUNCTION "ST_Translate(geometry,float8,float8,float8)" PUBLIC KEEP FUNCTION "Translate(geometry,float8,float8)" PUBLIC DEPRECATE FUNCTION "ST_Translate(geometry,float8,float8)" PUBLIC KEEP FUNCTION "Scale(geometry,float8,float8,float8)" PUBLIC DEPRECATE FUNCTION "ST_Scale(geometry,float8,float8,float8)" PUBLIC KEEP FUNCTION "Scale(geometry,float8,float8)" PUBLIC DEPRECATE FUNCTION "ST_Scale(geometry,float8,float8)" PUBLIC KEEP FUNCTION "transscale(geometry,float8,float8,float8,float8)" PUBLIC DEPRECATE FUNCTION "ST_transscale(geometry,float8,float8,float8,float8)" PUBLIC KEEP FUNCTION shift_longitude(geometry) PUBLIC DEPRECATE FUNCTION ST_shift_longitude(geometry) PUBLIC KEEP FUNCTION box3d_in(cstring) PRIVATE KEEP FUNCTION box3d_out(box3d) PRIVATE KEEP FUNCTION ST_box3d_in(cstring) PRIVATE DELETE FUNCTION ST_box3d_out(box3d) PRIVATE DELETE FUNCTION xmin(box3d) PUBLIC DEPRECATE FUNCTION ST_XMin(box3d) PUBLIC KEEP FUNCTION ymin(box3d) PUBLIC DEPRECATE FUNCTION ST_YMin(box3d) PUBLIC KEEP FUNCTION zmin(box3d) PUBLIC DEPRECATE FUNCTION ST_ZMin(box3d) PUBLIC KEEP FUNCTION xmax(box3d) PUBLIC DEPRECATE FUNCTION ST_XMax(box3d) PUBLIC KEEP FUNCTION ymax(box3d) PUBLIC DEPRECATE FUNCTION ST_YMax(box3d) PUBLIC KEEP FUNCTION zmax(box3d) PUBLIC DEPRECATE FUNCTION ST_ZMax(box3d) PUBLIC KEEP FUNCTION chip_in(cstring) PRIVATE KEEP FUNCTION ST_chip_in(cstring) PRIVATE DELETE FUNCTION chip_out(chip) PRIVATE KEEP FUNCTION ST_chip_out(chip) PRIVATE DELETE FUNCTION box2d_in(cstring) PRIVATE KEEP FUNCTION ST_box2d_in(cstring) PRIVATE DELETE FUNCTION box2d_out(box2d) PRIVATE KEEP FUNCTION ST_box2d_out(box2d) PRIVATE DELETE FUNCTION "box2d_overleft(box2d, box2d)" PRIVATE KEEP FUNCTION "ST_box2d_overleft(box2d, box2d)" PRIVATE DELETE FUNCTION "box2d_overright(box2d, box2d)" PRIVATE KEEP FUNCTION "ST_box2d_overright(box2d, box2d)" PRIVATE DELETE FUNCTION "box2d_left(box2d, box2d)" PRIVATE KEEP FUNCTION "ST_box2d_left(box2d, box2d)" PRIVATE DELETE FUNCTION "box2d_right(box2d, box2d)" PRIVATE KEEP FUNCTION "ST_box2d_right(box2d, box2d)" PRIVATE DELETE FUNCTION "box2d_contain(box2d, box2d)" PRIVATE KEEP FUNCTION "ST_box2d_contain(box2d, box2d)" PRIVATE DELETE FUNCTION "box2d_contained(box2d, box2d)" PRIVATE KEEP FUNCTION "ST_box2d_contained(box2d, box2d)" PRIVATE DELETE FUNCTION "box2d_overlap(box2d, box2d)" PRIVATE KEEP FUNCTION "ST_box2d_overlap(box2d, box2d)" PRIVATE DELETE FUNCTION "box2d_same(box2d, box2d)" PRIVATE KEEP FUNCTION "ST_box2d_same(box2d, box2d)" PRIVATE DELETE FUNCTION "box2d_intersects(box2d, box2d)" PRIVATE KEEP FUNCTION "ST_box2d_intersects(box2d, box2d)" PRIVATE DELETE FUNCTION "geometry_lt(geometry, geometry)" PRIVATE KEEP FUNCTION "ST_geometry_lt(geometry, geometry)" PRIVATE DELETE FUNCTION "geometry_le(geometry, geometry)" PRIVATE KEEP FUNCTION "ST_geometry_le(geometry, geometry)" PRIVATE DELETE FUNCTION "geometry_gt(geometry, geometry)" PRIVATE KEEP FUNCTION "ST_geometry_gt(geometry, geometry)" PRIVATE DELETE FUNCTION "geometry_ge(geometry, geometry)" PRIVATE KEEP FUNCTION "ST_geometry_ge(geometry, geometry)" PRIVATE DELETE FUNCTION "geometry_eq(geometry, geometry)" PRIVATE KEEP FUNCTION "ST_geometry_eq(geometry, geometry)" PRIVATE DELETE FUNCTION "geometry_cmp(geometry, geometry)" PRIVATE KEEP FUNCTION "ST_geometry_cmp(geometry, geometry)" PRIVATE DELETE FUNCTION "postgis_gist_sel (internal, oid, internal, int4)" PRIVATE KEEP FUNCTION "ST_postgis_gist_sel (internal, oid, internal, int4)" PRIVATE DELETE FUNCTION "postgis_gist_joinsel(internal, oid, internal, smallint)" PRIVATE KEEP FUNCTION "ST_postgis_gist_joinsel(internal, oid, internal, smallint)" PRIVATE DELETE FUNCTION "geometry_overleft(geometry, geometry)" PRIVATE KEEP FUNCTION "ST_geometry_overleft(geometry, geometry)" PRIVATE DELETE FUNCTION "geometry_overright(geometry, geometry)" PRIVATE KEEP FUNCTION "ST_geometry_overright(geometry, geometry)" PRIVATE DELETE FUNCTION "geometry_overabove(geometry, geometry)" PRIVATE KEEP FUNCTION "ST_geometry_overabove(geometry, geometry)" PRIVATE DELETE FUNCTION "geometry_overbelow(geometry, geometry)" PRIVATE KEEP FUNCTION "ST_geometry_overbelow(geometry, geometry)" PRIVATE DELETE FUNCTION "geometry_left(geometry, geometry)" PRIVATE KEEP FUNCTION "ST_geometry_left(geometry, geometry)" PRIVATE DELETE FUNCTION "geometry_right(geometry, geometry)" PRIVATE KEEP FUNCTION "ST_geometry_right(geometry, geometry)" PRIVATE DELETE FUNCTION "geometry_above(geometry, geometry)" PRIVATE KEEP FUNCTION "ST_geometry_above(geometry, geometry)" PRIVATE DELETE FUNCTION "geometry_below(geometry, geometry)" PRIVATE KEEP FUNCTION "ST_geometry_below(geometry, geometry)" PRIVATE DELETE FUNCTION "geometry_contain(geometry, geometry)" PRIVATE KEEP FUNCTION "ST_geometry_contain(geometry, geometry)" PRIVATE DELETE FUNCTION "geometry_contained(geometry, geometry)" PRIVATE KEEP FUNCTION "ST_geometry_contained(geometry, geometry)" PRIVATE DELETE FUNCTION "geometry_overlap(geometry, geometry)" PRIVATE KEEP FUNCTION "ST_geometry_overlap(geometry, geometry)" PRIVATE DELETE FUNCTION "geometry_same(geometry, geometry)" PRIVATE KEEP FUNCTION "ST_geometry_same(geometry, geometry)" PRIVATE DELETE FUNCTION "LWGEOM_gist_consistent(internal,geometry,int4)" PRIVATE RENAME postgis_gist_consistent FUNCTION LWGEOM_gist_compress(internal) PRIVATE RENAME postgis_gist_compress FUNCTION "LWGEOM_gist_penalty(internal,internal,internal)" PRIVATE RENAME postgis_gist_penalty FUNCTION "LWGEOM_gist_picksplit(internal, internal)" PRIVATE RENAME postgis_gist_picksplit FUNCTION "LWGEOM_gist_union(bytea, internal)" PRIVATE RENAME postgis_gist_union FUNCTION "LWGEOM_gist_same(box2d, box2d, internal)" PRIVATE RENAME postgis_gist_same FUNCTION LWGEOM_gist_decompress(internal) PRIVATE RENAME postgis_gist_decompress FUNCTION addBBOX(geometry) PUBLIC DEPRECATE FUNCTION ST_addBBOX(geometry) PUBLIC KEEP FUNCTION dropBBOX(geometry) PUBLIC DEPRECATE FUNCTION ST_dropBBOX(geometry) PUBLIC KEEP FUNCTION getSRID(geometry) PUBLIC DEPRECATE FUNCTION getSRID(geometry) PUBLIC DELETE duplicate FUNCTION getBBOX(geometry) PUBLIC DEPRECATE FUNCTION getBBOX(geometry) PUBLIC DELETE duplicate FUNCTION srid(chip) PUBLIC DEPRECATE FUNCTION ST_srid(chip) PUBLIC KEEP FUNCTION height(chip) PUBLIC DEPRECATE FUNCTION ST_height(chip) PUBLIC KEEP FUNCTION factor(chip) PUBLIC DEPRECATE FUNCTION ST_factor(chip) PUBLIC KEEP FUNCTION width(chip) PUBLIC DEPRECATE FUNCTION ST_width(chip) PUBLIC KEEP FUNCTION dataTYPE(chip) PUBLIC DEPRECATE FUNCTION ST_dataTYPE(chip) PUBLIC KEEP FUNCTION compression(chip) PUBLIC DEPRECATE FUNCTION ST_compression(chip) PUBLIC KEEP FUNCTION "setSRID(chip,int4)" PUBLIC DEPRECATE FUNCTION "setFactor(chip,float4)" PUBLIC DEPRECATE FUNCTION "ST_setFactor(chip,float4)" PUBLIC KEEP FUNCTION mem_size(geometry) PUBLIC DEPRECATE FUNCTION ST_mem_size(geometry) PUBLIC KEEP FUNCTION summary(geometry) PUBLIC DEPRECATE FUNCTION ST_summary(geometry) PUBLIC KEEP FUNCTION npoints(geometry) PUBLIC DEPRECATE FUNCTION ST_npoints(geometry) PUBLIC KEEP FUNCTION nrings(geometry) PUBLIC DEPRECATE FUNCTION ST_nrings(geometry) PUBLIC KEEP FUNCTION length3d(geometry) PUBLIC DEPRECATE FUNCTION ST_length3d(geometry) PUBLIC DEPRECATE FUNCTION length2d(geometry) PUBLIC DEPRECATE FUNCTION ST_length2d(geometry) PUBLIC DEPRECATE FUNCTION "ST_Length(geometry, dims)" PUBLIC NEW calculate length using n dims FUNCTION length(geometry) PUBLIC DEPRECATE FUNCTION ST_Length(geometry) PUBLIC KEEP "calculate length using 2 or 3 dims, whatever is available" FUNCTION ST_Length_WGS84(geometry) PUBLIC NEW spheroid length with WGS84 set automatically FUNCTION "length3d_spheroid(geometry, spheroid)" PUBLIC DEPRECATE FUNCTION "ST_length3d_spheroid(geometry, spheroid)" PUBLIC DEPRECATE FUNCTION "length_spheroid(geometry, spheroid)" PUBLIC DEPRECATE FUNCTION "ST_length_spheroid(geometry, spheroid)" PUBLIC KEEP FUNCTION "length2d_spheroid(geometry, spheroid)" PUBLIC DEPRECATE FUNCTION "ST_length2d_spheroid(geometry, spheroid)" PUBLIC DEPRECATE FUNCTION perimeter3d(geometry) PUBLIC DEPRECATE FUNCTION ST_perimeter3d(geometry) PUBLIC DEPRECATE FUNCTION perimeter2d(geometry) PUBLIC DEPRECATE FUNCTION ST_perimeter2d(geometry) PUBLIC DEPRECATE FUNCTION perimeter(geometry) PUBLIC DEPRECATE FUNCTION ST_Perimeter(geometry) PUBLIC KEEP FUNCTION area2d(geometry) PUBLIC DEPRECATE FUNCTION ST_area2d(geometry) PUBLIC DEPRECATE FUNCTION area(geometry) PUBLIC DEPRECATE FUNCTION ST_Area(geometry) PUBLIC KEEP FUNCTION "distance_spheroid(geometry,geometry,spheroid)" PUBLIC DEPRECATE FUNCTION "ST_Distance_WGS84(geometry,geometry)" PUBLIC NEW calculate distance with WGS84 autoset for spheroid FUNCTION "ST_distance_spheroid(geometry,geometry,spheroid)" PUBLIC KEEP FUNCTION "distance_sphere(geometry,geometry)" PUBLIC DEPRECATE FUNCTION "ST_distance_sphere(geometry,geometry)" PUBLIC KEEP FUNCTION "distance(geometry,geometry)" PUBLIC DEPRECATE FUNCTION "ST_Distance(geometry,geometry)" PUBLIC KEEP FUNCTION "max_distance(geometry,geometry)" PUBLIC DEPRECATE FUNCTION "ST_max_distance(geometry,geometry)" PUBLIC KEEP FUNCTION "point_inside_circle(geometry,float8,float8,float8)" PUBLIC DEPRECATE FUNCTION "ST_point_inside_circle(geometry,float8,float8,float8)" PUBLIC KEEP FUNCTION "azimuth(geometry,geometry)" PUBLIC DEPRECATE FUNCTION "ST_azimuth(geometry,geometry)" PUBLIC KEEP FUNCTION force_2d(geometry) PUBLIC DEPRECATE FUNCTION ST_force_2d(geometry) PUBLIC KEEP FUNCTION force_3dz(geometry) PUBLIC DEPRECATE FUNCTION ST_force_3dz(geometry) PUBLIC KEEP FUNCTION force_3d(geometry) PUBLIC DEPRECATE FUNCTION ST_force_3d(geometry) PUBLIC KEEP FUNCTION force_3dm(geometry) PUBLIC DEPRECATE FUNCTION ST_force_3dm(geometry) PUBLIC KEEP FUNCTION force_4d(geometry) PUBLIC DEPRECATE FUNCTION ST_force_4d(geometry) PUBLIC KEEP FUNCTION force_collection(geometry) PUBLIC DEPRECATE FUNCTION ST_force_collection(geometry) PUBLIC KEEP FUNCTION multi(geometry) PUBLIC DEPRECATE FUNCTION ST_multi(geometry) PUBLIC KEEP FUNCTION "expand(box3d,float8)" PUBLIC DEPRECATE FUNCTION "ST_Expand(box3d,float8)" PUBLIC KEEP FUNCTION "expand(box2d,float8)" PUBLIC DEPRECATE FUNCTION "ST_expand(box2d,float8)" PUBLIC KEEP FUNCTION "expand(geometry,float8)" PUBLIC DEPRECATE FUNCTION "ST_expand(geometry,float8)" PUBLIC KEEP FUNCTION envelope(geometry) PUBLIC DEPRECATE FUNCTION ST_Envelope(geometry) PUBLIC KEEP FUNCTION reverse(geometry) PUBLIC DEPRECATE FUNCTION ST_Reverse(geometry) PUBLIC KEEP FUNCTION ForceRHR(geometry) PUBLIC DEPRECATE FUNCTION ST_ForceRHR(geometry) PUBLIC KEEP FUNCTION noop(geometry) PRIVATE RENAME postgis_noop(geometry) FUNCTION ST_noop(geometry) PRIVATE DELETE FUNCTION zmflag(geometry) PUBLIC DEPRECATE FUNCTION ST_zmflag(geometry) PUBLIC DEPRECATE "replace with st_hasz, st_hasm from iso" FUNCTION hasBBOX(geometry) PRIVATE RENAME postgis_bbox_cached(geometry) FUNCTION ST_HasBBOX(geometry) PRIVATE DELETE FUNCTION ndims(geometry) PUBLIC DEPRECATE FUNCTION ST_NDims(geometry) PUBLIC KEEP FUNCTION AsEWKT(geometry) PUBLIC DEPRECATE FUNCTION ST_AsEWKT(geometry) PUBLIC KEEP FUNCTION AsEWKB(geometry) PUBLIC DEPRECATE FUNCTION ST_AsEWKB(geometry) PUBLIC KEEP FUNCTION AsHEXEWKB(geometry) PUBLIC DEPRECATE FUNCTION ST_AsHEXEWKB(geometry) PUBLIC KEEP FUNCTION "AsHEXEWKB(geometry, text)" PUBLIC DEPRECATE FUNCTION "ST_AsHEXEWKB(geometry, text)" PUBLIC KEEP FUNCTION "AsEWKB(geometry,text)" PUBLIC DEPRECATE FUNCTION "ST_AsEWKB(geometry,text)" PUBLIC KEEP FUNCTION GeomFromEWKB(bytea) PUBLIC DEPRECATE FUNCTION ST_GeomFromEWKB(bytea) PUBLIC KEEP FUNCTION GeomFromEWKT(text) PUBLIC DEPRECATE FUNCTION ST_GeomFromEWKT(text) PUBLIC KEEP FUNCTION cache_bbox() PUBLIC RENAME postgis_cache_bbox() this is a utility trigger FUNCTION ST_Cache_BBox() PUBLIC DEPRECATE FUNCTION "MakePoint(float8, float8)" PUBLIC DEPRECATE FUNCTION "ST_MakePoint(float8, float8)" PUBLIC KEEP FUNCTION "MakePoint(float8, float8, float8)" PUBLIC DEPRECATE FUNCTION "ST_MakePoint(float8, float8, float8)" PUBLIC KEEP FUNCTION "MakePoint(float8, float8, float8, float8)" PUBLIC DEPRECATE FUNCTION "ST_MakePoint(float8, float8, float8, float8)" PUBLIC KEEP FUNCTION "MakePointM(float8, float8, float8)" PUBLIC DEPRECATE FUNCTION "ST_MakePointM(float8, float8, float8)" PUBLIC KEEP FUNCTION "MakeBox2d(geometry, geometry)" PUBLIC DEPRECATE FUNCTION "ST_MakeBox2d(geometry, geometry)" PUBLIC KEEP FUNCTION "MakeBox3d(geometry, geometry)" PUBLIC DEPRECATE FUNCTION "ST_MakeBox3d(geometry, geometry)" PUBLIC KEEP FUNCTION makeline_garray (geometry[]) PUBLIC DEPRECATE FUNCTION ST_MakeLine_GArray (geometry[]) PUBLIC DEPRECATE FUNCTION ST_MakeLine (geometry[]) PUBLIC KEEP FUNCTION LineFromMultiPoint(geometry) PUBLIC DEPRECATE FUNCTION ST_LineFromMultiPoint(geometry) PUBLIC KEEP FUNCTION "MakeLine(geometry, geometry)" PUBLIC DEPRECATE FUNCTION "ST_MakeLine(geometry, geometry)" PUBLIC KEEP FUNCTION "AddPoint(geometry, geometry)" PUBLIC DEPRECATE FUNCTION "ST_AddPoint(geometry, geometry)" PUBLIC KEEP FUNCTION "AddPoint(geometry, geometry, integer)" PUBLIC DEPRECATE FUNCTION "ST_AddPoint(geometry, geometry, integer)" PUBLIC KEEP FUNCTION "RemovePoint(geometry, integer)" PUBLIC DEPRECATE FUNCTION "ST_RemovePoint(geometry, integer)" PUBLIC KEEP FUNCTION "SetPoint(geometry, integer, geometry)" PUBLIC DEPRECATE FUNCTION "ST_SetPoint(geometry, integer, geometry)" PUBLIC KEEP FUNCTION "MakePolygon(geometry, geometry[])" PUBLIC DEPRECATE FUNCTION "ST_MakePolygon(geometry, geometry[])" PUBLIC KEEP FUNCTION MakePolygon(geometry) PUBLIC DEPRECATE FUNCTION ST_MakePolygon(geometry) PUBLIC KEEP FUNCTION BuildArea(geometry) PUBLIC DEPRECATE FUNCTION ST_BuildArea(geometry) PUBLIC KEEP FUNCTION Polygonize_GArray (geometry[]) PUBLIC DEPRECATE FUNCTION ST_Polygonize_GArray (geometry[]) PUBLIC DEPRECATE FUNCTION ST_Polygonize (geometry[]) PUBLIC KEEP FUNCTION LineMerge(geometry) PUBLIC DEPRECATE FUNCTION ST_LineMerge(geometry) PUBLIC KEEP FUNCTION Dump(geometry) PUBLIC DEPRECATE FUNCTION ST_Dump(geometry) PUBLIC KEEP FUNCTION DumpRings(geometry) PUBLIC DEPRECATE FUNCTION ST_DumpRings(geometry) PUBLIC KEEP FUNCTION "combine_bbox(box2d,geometry)" PUBLIC DEPRECATE FUNCTION "ST_Combine_BBox(box2d,geometry)" PUBLIC RENAME "postgis_combine_bbox(box2d, geometry)" AGGREGATE Extent( PUBLIC DEPRECATE AGGREGATE ST_Extent( PUBLIC KEEP FUNCTION "combine_bbox(box3d,geometry)" PUBLIC DEPRECATE FUNCTION "ST_Combine_BBox(box3d,geometry)" PUBLIC KEEP AGGREGATE Extent3d( PUBLIC DEPRECATE AGGREGATE ST_Extent3d( PUBLIC KEEP FUNCTION "estimated_extent(text,text,text) RETURNS box2d AS" PUBLIC DEPRECATE FUNCTION "ST_estimated_extent(text,text,text) RETURNS box2d AS" PUBLIC KEEP FUNCTION "estimated_extent(text,text) RETURNS box2d AS" PUBLIC DEPRECATE FUNCTION "ST_estimated_extent(text,text) RETURNS box2d AS" PUBLIC KEEP FUNCTION "find_extent(text,text,text) RETURNS box2d AS" PUBLIC DEPRECATE FUNCTION "ST_find_extent(text,text,text) RETURNS box2d AS" PUBLIC KEEP FUNCTION "find_extent(text,text) RETURNS box2d AS" PUBLIC DEPRECATE FUNCTION "ST_find_extent(text,text) RETURNS box2d AS" PUBLIC KEEP FUNCTION rename_geometry_table_constraints() RETURNS text PUBLIC KEEP FUNCTION fix_geometry_columns() RETURNS text PUBLIC KEEP FUNCTION populate_geometry_columns() PUBLIC KEEP FUNCTION populate_geometry_columns(tbl_oid oid) PUBLIC KEEP FUNCTION probe_geometry_columns() RETURNS text AS PUBLIC KEEP FUNCTION "AddGeometryColumn(varchar,varchar,varchar,varchar,integer,varchar,integer)" PUBLIC KEEP FUNCTION "AddGeometryColumn(varchar,varchar,varchar,integer,varchar,integer) RETURNS text AS $$" PUBLIC KEEP FUNCTION "AddGeometryColumn(varchar,varchar,integer,varchar,integer) RETURNS text AS $$" PUBLIC KEEP FUNCTION "DropGeometryColumn(varchar, varchar,varchar,varchar)" PUBLIC KEEP FUNCTION "DropGeometryColumn(varchar,varchar,varchar)" PUBLIC KEEP FUNCTION "DropGeometryColumn(varchar,varchar)" PUBLIC KEEP FUNCTION "DropGeometryTable(varchar, varchar,varchar)" PUBLIC KEEP FUNCTION "DropGeometryTable(varchar,varchar) RETURNS text AS" PUBLIC KEEP FUNCTION DropGeometryTable(varchar) RETURNS text AS PUBLIC KEEP FUNCTION "UpdateGeometrySRID(varchar,varchar,varchar,varchar,integer)" PUBLIC KEEP FUNCTION "UpdateGeometrySRID(varchar,varchar,varchar,integer)" PUBLIC KEEP FUNCTION "UpdateGeometrySRID(varchar,varchar,integer)" PUBLIC KEEP FUNCTION "find_srid(varchar,varchar,varchar) RETURNS int4 AS" PUBLIC KEEP FUNCTION get_proj4_from_srid(integer) RETURNS text AS PUBLIC KEEP FUNCTION "transform_geometry(geometry,text,text,int)" PRIVATE RENAME "postgis_transform_geometry(geometry, text, text, int)" FUNCTION "transform(geometry,integer)" PUBLIC DEPRECATE FUNCTION "ST_Transform(geometry,integer)" PUBLIC KEEP FUNCTION postgis_version() RETURNS text PUBLIC KEEP FUNCTION postgis_proj_version() RETURNS text PUBLIC KEEP FUNCTION postgis_scripts_installed() RETURNS text PUBLIC KEEP FUNCTION postgis_lib_version() RETURNS text PUBLIC KEEP FUNCTION postgis_scripts_released() RETURNS text PUBLIC KEEP FUNCTION postgis_uses_stats() RETURNS bool PUBLIC KEEP FUNCTION postgis_geos_version() RETURNS text PUBLIC KEEP FUNCTION postgis_scripts_build_date() RETURNS text PUBLIC KEEP FUNCTION postgis_lib_build_date() RETURNS text PUBLIC KEEP FUNCTION postgis_full_version() RETURNS text PUBLIC KEEP FUNCTION box2d(geometry) PRIVATE KEEP FUNCTION ST_box2d(geometry) PRIVATE DEPRECATE "these are pgsql casts, they should use pgsql convention" FUNCTION box3d(geometry) PRIVATE KEEP FUNCTION ST_box3d(geometry) PRIVATE DEPRECATE FUNCTION box(geometry) PRIVATE KEEP FUNCTION ST_box(geometry) PRIVATE DEPRECATE FUNCTION box2d(box3d) PRIVATE KEEP FUNCTION ST_box2d(box3d) PRIVATE DEPRECATE FUNCTION box3d(box2d) PRIVATE KEEP FUNCTION ST_box3d(box2d) PRIVATE DEPRECATE FUNCTION box(box3d) PRIVATE KEEP FUNCTION ST_box(box3d) PRIVATE DEPRECATE FUNCTION text(geometry) PRIVATE KEEP FUNCTION ST_text(geometry) PRIVATE DEPRECATE FUNCTION box3dtobox(box3d) PRIVATE KEEP FUNCTION geometry(box2d) PRIVATE KEEP FUNCTION ST_geometry(box2d) PRIVATE DEPRECATE FUNCTION geometry(box3d) PRIVATE KEEP FUNCTION ST_geometry(box3d) PRIVATE DEPRECATE FUNCTION geometry(text) PRIVATE KEEP FUNCTION ST_geometry(text) PRIVATE DEPRECATE FUNCTION geometry(chip) PRIVATE KEEP FUNCTION ST_geometry(chip) PRIVATE DEPRECATE FUNCTION geometry(bytea) PRIVATE KEEP FUNCTION ST_geometry(bytea) PRIVATE DEPRECATE FUNCTION bytea(geometry) PRIVATE KEEP FUNCTION ST_bytea(geometry) PRIVATE DEPRECATE FUNCTION text(bool) PRIVATE KEEP FUNCTION ST_text(bool) PRIVATE DEPRECATE FUNCTION "Simplify(geometry, float8)" PUBLIC DEPRECATE FUNCTION "ST_Simplify(geometry, float8)" PUBLIC KEEP FUNCTION "SnapToGrid(geometry, float8, float8, float8, float8)" PUBLIC DEPRECATE FUNCTION "ST_SnapToGrid(geometry, float8, float8, float8, float8)" PUBLIC KEEP FUNCTION "SnapToGrid(geometry, float8, float8)" PUBLIC DEPRECATE FUNCTION "ST_SnapToGrid(geometry, float8, float8)" PUBLIC KEEP FUNCTION "SnapToGrid(geometry, float8)" PUBLIC DEPRECATE FUNCTION "ST_SnapToGrid(geometry, float8)" PUBLIC KEEP FUNCTION "SnapToGrid(geometry, geometry, float8, float8, float8, float8)" PUBLIC DEPRECATE FUNCTION "ST_SnapToGrid(geometry, geometry, float8, float8, float8, float8)" PUBLIC KEEP FUNCTION "Segmentize(geometry, float8)" PUBLIC DEPRECATE FUNCTION "ST_Segmentize(geometry, float8)" PUBLIC KEEP FUNCTION "line_interpolate_point(geometry, float8)" PUBLIC DEPRECATE FUNCTION "ST_line_interpolate_point(geometry, float8)" PUBLIC KEEP FUNCTION "line_substring(geometry, float8, float8)" PUBLIC DEPRECATE FUNCTION "ST_line_substring(geometry, float8, float8)" PUBLIC KEEP FUNCTION "line_locate_point(geometry, geometry)" PUBLIC DEPRECATE FUNCTION "ST_line_locate_point(geometry, geometry)" PUBLIC KEEP FUNCTION "locate_between_measures(geometry, float8, float8)" PUBLIC DEPRECATE FUNCTION "ST_locate_between_measures(geometry, float8, float8)" PUBLIC KEEP FUNCTION "locate_along_measure(geometry, float8)" PUBLIC DEPRECATE FUNCTION "ST_locate_along_measure(geometry, float8)" PUBLIC KEEP FUNCTION "intersection(geometry,geometry)" PUBLIC DEPRECATE FUNCTION "ST_Intersection(geometry,geometry)" PUBLIC KEEP FUNCTION "buffer(geometry,float8)" PUBLIC DEPRECATE FUNCTION "ST_Buffer(geometry,float8)" PUBLIC KEEP FUNCTION "buffer(geometry,float8,integer)" PUBLIC DEPRECATE FUNCTION "ST_buffer(geometry,float8,integer)" PUBLIC KEEP FUNCTION convexhull(geometry) PUBLIC DEPRECATE FUNCTION ST_ConvexHull(geometry) PUBLIC KEEP FUNCTION "_ST_LineCrossingDirection(geometry, geometry)" PUBLIC KEEP FUNCTION "ST_LineCrossingDirection(geometry, geometry)" PUBLIC KEEP FUNCTION "ST_LocateBetweenElevations(geometry, float8, float8)" PUBLIC KEEP FUNCTION "ST_SimplifyPreserveTopology(geometry, float8)" PUBLIC KEEP FUNCTION ST_IsValidReason(geometry) PUBLIC KEEP FUNCTION "difference(geometry,geometry)" PUBLIC DEPRECATE FUNCTION "ST_Difference(geometry,geometry)" PUBLIC KEEP FUNCTION boundary(geometry) PUBLIC DEPRECATE FUNCTION ST_Boundary(geometry) PUBLIC KEEP FUNCTION "symdifference(geometry,geometry)" PUBLIC DEPRECATE FUNCTION "ST_SymDifference(geometry,geometry)" PUBLIC KEEP FUNCTION "symmetricdifference(geometry,geometry)" PUBLIC DEPRECATE FUNCTION "ST_symmetricdifference(geometry,geometry)" PUBLIC KEEP FUNCTION "GeomUnion(geometry,geometry)" PUBLIC DEPRECATE FUNCTION "ST_Union(geometry,geometry)" PUBLIC KEEP FUNCTION "collector(geometry, geometry)" PUBLIC DELETE dupe of st_collect FUNCTION "ST_collector(geometry, geometry)" PUBLIC DELETE dupe of st_collect FUNCTION "collect(geometry, geometry)" PUBLIC DEPRECATE FUNCTION "ST_collect(geometry, geometry)" PUBLIC KEEP AGGREGATE memcollect( PUBLIC DEPRECATE AGGREGATE ST_memcollect( PUBLIC KEEP FUNCTION "geom_accum (geometry[],geometry)" PUBLIC DELETE superceded by new aggregator FUNCTION "ST_geom_accum (geometry[],geometry)" PUBLIC DELETE superceded by new aggregator FUNCTION collect_garray (geometry[]) PUBLIC DELETE superceded by new aggregator FUNCTION ST_collect_garray (geometry[]) PUBLIC DELETE superceded by new aggregator FUNCTION ST_collect (geometry[]) PUBLIC KEEP AGGREGATE MemGeomUnion ( PUBLIC DEPRECATE AGGREGATE ST_MemUnion ( PUBLIC KEEP FUNCTION pgis_abs_in(cstring) PRIVATE KEEP FUNCTION pgis_abs_out(pgis_abs) PRIVATE KEEP TYPE pgis_abs ( PRIVATE KEEP FUNCTION "pgis_geometry_accum_transfn(pgis_abs, geometry)" PRIVATE KEEP FUNCTION pgis_geometry_accum_finalfn(pgis_abs) PRIVATE KEEP FUNCTION pgis_geometry_union_finalfn(pgis_abs) PRIVATE KEEP FUNCTION pgis_geometry_collect_finalfn(pgis_abs) PRIVATE KEEP FUNCTION pgis_geometry_polygonize_finalfn(pgis_abs) PRIVATE KEEP FUNCTION pgis_geometry_makeline_finalfn(pgis_abs) PRIVATE KEEP AGGREGATE accum ( PUBLIC DEPRECATE AGGREGATE ST_Accum ( PUBLIC KEEP AGGREGATE accum_old ( PUBLIC DELETE AGGREGATE ST_accum_old ( PUBLIC DELETE FUNCTION unite_garray (geometry[]) PUBLIC DEPRECATE FUNCTION ST_unite_garray (geometry[]) PUBLIC DEPRECATE superceded by st_union(geometry[]) FUNCTION ST_Union (geometry[]) PUBLIC KEEP AGGREGATE GeomUnion_Old ( PUBLIC DELETE AGGREGATE ST_Union_Old ( PUBLIC DELETE AGGREGATE ST_Union ( PUBLIC KEEP AGGREGATE collect ( PUBLIC DEPRECATE AGGREGATE ST_Collect ( PUBLIC KEEP AGGREGATE Polygonize ( PUBLIC DEPRECATE AGGREGATE ST_Polygonize ( PUBLIC KEEP AGGREGATE makeline ( PUBLIC DEPRECATE AGGREGATE ST_MakeLine ( PUBLIC KEEP FUNCTION "relate(geometry,geometry)" PUBLIC DEPRECATE FUNCTION "ST_relate(geometry,geometry)" PUBLIC KEEP FUNCTION "relate(geometry,geometry,text)" PUBLIC DEPRECATE FUNCTION "ST_Relate(geometry,geometry,text)" PUBLIC KEEP FUNCTION "disjoint(geometry,geometry)" PUBLIC DEPRECATE FUNCTION "ST_Disjoint(geometry,geometry)" PUBLIC KEEP FUNCTION "touches(geometry,geometry)" PUBLIC DEPRECATE FUNCTION "_ST_Touches(geometry,geometry)" PUBLIC KEEP FUNCTION "ST_Touches(geometry,geometry)" PUBLIC KEEP FUNCTION "_ST_DWithin(geometry,geometry,float8)" PUBLIC KEEP FUNCTION "ST_DWithin(geometry, geometry, float8)" PUBLIC KEEP FUNCTION "intersects(geometry,geometry)" PUBLIC DEPRECATE FUNCTION "_ST_Intersects(geometry,geometry)" PUBLIC KEEP FUNCTION "ST_Intersects(geometry,geometry)" PUBLIC KEEP FUNCTION "crosses(geometry,geometry)" PUBLIC DEPRECATE FUNCTION "_ST_Crosses(geometry,geometry)" PUBLIC KEEP FUNCTION "ST_Crosses(geometry,geometry)" PUBLIC KEEP FUNCTION "within(geometry,geometry)" PUBLIC DEPRECATE FUNCTION "_ST_Within(geometry,geometry)" PUBLIC KEEP FUNCTION "ST_Within(geometry,geometry)" PUBLIC KEEP FUNCTION "Contains(geometry,geometry)" PUBLIC DEPRECATE FUNCTION "_ST_Contains(geometry,geometry)" PUBLIC KEEP FUNCTION "ST_Contains(geometry,geometry)" PUBLIC KEEP FUNCTION "_ST_CoveredBy(geometry,geometry)" PUBLIC KEEP FUNCTION "ST_CoveredBy(geometry,geometry)" PUBLIC KEEP FUNCTION "_ST_Covers(geometry,geometry)" PUBLIC KEEP FUNCTION "ST_Covers(geometry,geometry)" PUBLIC KEEP FUNCTION "_ST_ContainsProperly(geometry,geometry)" PUBLIC KEEP FUNCTION "ST_ContainsProperly(geometry,geometry)" PUBLIC KEEP FUNCTION "overlaps(geometry,geometry)" PUBLIC DEPRECATE FUNCTION "_ST_Overlaps(geometry,geometry)" PUBLIC KEEP FUNCTION "ST_Overlaps(geometry,geometry)" PUBLIC KEEP FUNCTION IsValid(geometry) PUBLIC DEPRECATE FUNCTION ST_IsValid(geometry) PUBLIC KEEP FUNCTION GEOSnoop(geometry) PRIVATE RENAME postgis_geos_noop FUNCTION Centroid(geometry) PUBLIC DEPRECATE FUNCTION ST_Centroid(geometry) PUBLIC KEEP FUNCTION IsRing(geometry) PUBLIC DEPRECATE FUNCTION ST_IsRing(geometry) PUBLIC KEEP FUNCTION PointOnSurface(geometry) PUBLIC DEPRECATE FUNCTION ST_PointOnSurface(geometry) PUBLIC KEEP FUNCTION IsSimple(geometry) PUBLIC DEPRECATE FUNCTION ST_IsSimple(geometry) PUBLIC KEEP FUNCTION "Equals(geometry,geometry)" PUBLIC DEPRECATE FUNCTION "ST_Equals(geometry,geometry)" PUBLIC KEEP FUNCTION "AsSVG(geometry,int4,int4)" PUBLIC DEPRECATE FUNCTION "ST_AsSVG(geometry,int4,int4)" PUBLIC KEEP FUNCTION "AsSVG(geometry,int4)" PUBLIC DEPRECATE FUNCTION "ST_AsSVG(geometry,int4)" PUBLIC KEEP FUNCTION AsSVG(geometry) PUBLIC DEPRECATE FUNCTION ST_AsSVG(geometry) PUBLIC KEEP FUNCTION "_ST_AsGML(int4, geometry, int4)" PUBLIC KEEP FUNCTION "AsGML(geometry, int4)" PUBLIC DEPRECATE FUNCTION "ST_AsGML(geometry, int4)" PUBLIC KEEP FUNCTION AsGML(geometry) PUBLIC DEPRECATE FUNCTION ST_AsGML(geometry) PUBLIC KEEP FUNCTION "ST_AsGML(int4, geometry)" PUBLIC KEEP FUNCTION "ST_AsGML(int4, geometry, int4)" PUBLIC KEEP FUNCTION "_ST_AsKML(int4, geometry, int4)" PUBLIC KEEP FUNCTION "AsKML(geometry, int4)" PUBLIC DEPRECATE FUNCTION "ST_AsKML(geometry, int4)" PUBLIC KEEP FUNCTION AsKML(geometry) PUBLIC DEPRECATE FUNCTION "AsKML(int4, geometry, int4)" PUBLIC DEPRECATE FUNCTION ST_AsKML(geometry) PUBLIC KEEP FUNCTION "ST_AsKML(int4, geometry)" PUBLIC KEEP FUNCTION "ST_AsKML(int4, geometry, int4)" PUBLIC KEEP FUNCTION "_ST_AsGeoJson(int4, geometry, int4, int4)" PUBLIC KEEP FUNCTION "ST_AsGeoJson(geometry, int4)" PUBLIC KEEP FUNCTION ST_AsGeoJson(geometry) PUBLIC KEEP FUNCTION "ST_AsGeoJson(int4, geometry)" PUBLIC KEEP FUNCTION "ST_AsGeoJson(int4, geometry, int4)" PUBLIC KEEP FUNCTION "ST_AsGeoJson(geometry, int4, int4)" PUBLIC KEEP FUNCTION "ST_AsGeoJson(int4, geometry, int4, int4)" PUBLIC KEEP FUNCTION NumPoints(geometry) PUBLIC DEPRECATE FUNCTION ST_NumPoints(geometry) PUBLIC KEEP FUNCTION NumGeometries(geometry) PUBLIC DEPRECATE FUNCTION ST_NumGeometries(geometry) PUBLIC KEEP FUNCTION "GeometryN(geometry,integer)" PUBLIC DEPRECATE FUNCTION "ST_GeometryN(geometry,integer)" PUBLIC KEEP FUNCTION Dimension(geometry) PUBLIC DEPRECATE FUNCTION ST_Dimension(geometry) PUBLIC KEEP FUNCTION ExteriorRing(geometry) PUBLIC DEPRECATE FUNCTION ST_ExteriorRing(geometry) PUBLIC KEEP FUNCTION NumInteriorRings(geometry) PUBLIC DEPRECATE FUNCTION ST_NumInteriorRings(geometry) PUBLIC KEEP FUNCTION NumInteriorRing(geometry) PUBLIC DEPRECATE FUNCTION ST_NumInteriorRing(geometry) PUBLIC KEEP FUNCTION "InteriorRingN(geometry,integer)" PUBLIC DEPRECATE FUNCTION "ST_InteriorRingN(geometry,integer)" PUBLIC KEEP FUNCTION GeometryTYPE(geometry) PUBLIC DEPRECATE FUNCTION ST_GeometryTYPE(geometry) PUBLIC KEEP FUNCTION "PointN(geometry,integer)" PUBLIC DEPRECATE FUNCTION "ST_PointN(geometry,integer)" PUBLIC KEEP FUNCTION X(geometry) PUBLIC DEPRECATE FUNCTION ST_X(geometry) PUBLIC KEEP FUNCTION Y(geometry) PUBLIC DEPRECATE FUNCTION ST_Y(geometry) PUBLIC KEEP FUNCTION Z(geometry) PUBLIC DEPRECATE FUNCTION SE_Z(geometry) PUBLIC KEEP FUNCTION ST_Z(geometry) PUBLIC KEEP ESRI compatibility (feh!) FUNCTION M(geometry) PUBLIC DEPRECATE FUNCTION ST_M(geometry) PUBLIC KEEP FUNCTION StartPoint(geometry) PUBLIC DEPRECATE FUNCTION ST_StartPoint(geometry) PUBLIC KEEP FUNCTION EndPoint(geometry) PUBLIC DEPRECATE FUNCTION ST_EndPoint(geometry) PUBLIC KEEP FUNCTION IsClosed(geometry) PUBLIC DEPRECATE FUNCTION ST_IsClosed(geometry) PUBLIC KEEP FUNCTION IsEmpty(geometry) PUBLIC DEPRECATE FUNCTION ST_IsEmpty(geometry) PUBLIC KEEP FUNCTION SRID(geometry) PUBLIC DEPRECATE FUNCTION ST_SRID(geometry) PUBLIC KEEP FUNCTION "SetSRID(geometry,int4)" PUBLIC DEPRECATE FUNCTION "ST_SetSRID(geometry,int4)" PUBLIC KEEP FUNCTION AsBinary(geometry) PUBLIC DEPRECATE FUNCTION ST_AsBinary(geometry) PUBLIC KEEP FUNCTION "AsBinary(geometry,text)" PUBLIC DEPRECATE FUNCTION "ST_AsBinary(geometry,text)" PUBLIC KEEP FUNCTION AsText(geometry) PUBLIC DEPRECATE FUNCTION ST_AsText(geometry) PUBLIC KEEP FUNCTION GeometryFromText(text) PUBLIC DEPRECATE FUNCTION ST_GeometryFromText(text) PUBLIC KEEP FUNCTION "GeometryFromText(text, int4)" PUBLIC DEPRECATE FUNCTION "ST_GeometryFromText(text, int4)" PUBLIC KEEP FUNCTION GeomFromText(text) PUBLIC DEPRECATE FUNCTION ST_GeomFromText(text) PUBLIC KEEP FUNCTION "GeomFromText(text, int4)" PUBLIC DEPRECATE FUNCTION "ST_GeomFromText(text, int4)" PUBLIC KEEP FUNCTION PointFromText(text) PUBLIC DEPRECATE FUNCTION ST_PointFromText(text) PUBLIC KEEP FUNCTION "PointFromText(text, int4)" PUBLIC DEPRECATE FUNCTION "ST_PointFromText(text, int4)" PUBLIC KEEP FUNCTION LineFromText(text) PUBLIC DEPRECATE FUNCTION ST_LineFromText(text) PUBLIC KEEP FUNCTION "LineFromText(text, int4)" PUBLIC DEPRECATE FUNCTION "ST_LineFromText(text, int4)" PUBLIC KEEP FUNCTION LineStringFromText(text) PUBLIC DEPRECATE FUNCTION "LineStringFromText(text, int4)" PUBLIC DEPRECATE FUNCTION PolyFromText(text) PUBLIC DEPRECATE FUNCTION ST_PolyFromText(text) PUBLIC KEEP FUNCTION "PolyFromText(text, int4)" PUBLIC DEPRECATE FUNCTION "ST_PolyFromText(text, int4)" PUBLIC KEEP FUNCTION "PolygonFromText(text, int4)" PUBLIC DEPRECATE FUNCTION "ST_PolygonFromText(text, int4)" PUBLIC KEEP FUNCTION PolygonFromText(text) PUBLIC DEPRECATE FUNCTION ST_PolygonFromText(text) PUBLIC KEEP FUNCTION "MLineFromText(text, int4)" PUBLIC DEPRECATE FUNCTION "ST_MLineFromText(text, int4)" PUBLIC KEEP FUNCTION MLineFromText(text) PUBLIC DEPRECATE FUNCTION ST_MLineFromText(text) PUBLIC KEEP FUNCTION MultiLineStringFromText(text) PUBLIC DEPRECATE FUNCTION ST_MultiLineStringFromText(text) PUBLIC KEEP FUNCTION "MultiLineStringFromText(text, int4)" PUBLIC DEPRECATE FUNCTION "ST_MultiLineStringFromText(text, int4)" PUBLIC KEEP FUNCTION "MPointFromText(text, int4)" PUBLIC DEPRECATE FUNCTION "ST_MPointFromText(text, int4)" PUBLIC KEEP FUNCTION MPointFromText(text) PUBLIC DEPRECATE FUNCTION ST_MPointFromText(text) PUBLIC KEEP FUNCTION "MultiPointFromText(text, int4)" PUBLIC DEPRECATE FUNCTION MultiPointFromText(text) PUBLIC DEPRECATE FUNCTION ST_MultiPointFromText(text) PUBLIC KEEP FUNCTION MultiPointFromText(text) PUBLIC DEPRECATE FUNCTION ST_MultiPointFromText(text) PUBLIC KEEP FUNCTION "MPolyFromText(text, int4)" PUBLIC DEPRECATE FUNCTION "ST_MPolyFromText(text, int4)" PUBLIC KEEP FUNCTION MPolyFromText(text) PUBLIC DEPRECATE FUNCTION ST_MPolyFromText(text) PUBLIC KEEP FUNCTION "MultiPolygonFromText(text, int4)" PUBLIC DEPRECATE FUNCTION "ST_MultiPolygonFromText(text, int4)" PUBLIC KEEP FUNCTION MultiPolygonFromText(text) PUBLIC DEPRECATE FUNCTION ST_MultiPolygonFromText(text) PUBLIC KEEP FUNCTION "GeomCollFromText(text, int4)" PUBLIC DEPRECATE FUNCTION "ST_GeomCollFromText(text, int4)" PUBLIC KEEP FUNCTION GeomCollFromText(text) PUBLIC DEPRECATE FUNCTION ST_GeomCollFromText(text) PUBLIC KEEP FUNCTION GeomFromWKB(bytea) PUBLIC DEPRECATE FUNCTION ST_GeomFromWKB(bytea) PUBLIC KEEP FUNCTION "GeomFromWKB(bytea, int)" PUBLIC DEPRECATE FUNCTION "ST_GeomFromWKB(bytea, int)" PUBLIC KEEP FUNCTION "PointFromWKB(bytea, int)" PUBLIC DEPRECATE FUNCTION "ST_PointFromWKB(bytea, int)" PUBLIC KEEP FUNCTION PointFromWKB(bytea) PUBLIC DEPRECATE FUNCTION ST_PointFromWKB(bytea) PUBLIC KEEP FUNCTION "LineFromWKB(bytea, int)" PUBLIC DEPRECATE FUNCTION "ST_LineFromWKB(bytea, int)" PUBLIC KEEP FUNCTION LineFromWKB(bytea) PUBLIC DEPRECATE FUNCTION ST_LineFromWKB(bytea) PUBLIC KEEP FUNCTION "LinestringFromWKB(bytea, int)" PUBLIC DEPRECATE FUNCTION "ST_LinestringFromWKB(bytea, int)" PUBLIC KEEP FUNCTION LinestringFromWKB(bytea) PUBLIC DEPRECATE FUNCTION ST_LinestringFromWKB(bytea) PUBLIC KEEP FUNCTION "PolyFromWKB(bytea, int)" PUBLIC DEPRECATE FUNCTION "ST_PolyFromWKB(bytea, int)" PUBLIC KEEP FUNCTION PolyFromWKB(bytea) PUBLIC DEPRECATE FUNCTION ST_PolyFromWKB(bytea) PUBLIC KEEP FUNCTION "PolygonFromWKB(bytea, int)" PUBLIC DEPRECATE FUNCTION "ST_PolygonFromWKB(bytea, int)" PUBLIC KEEP FUNCTION PolygonFromWKB(bytea) PUBLIC DEPRECATE FUNCTION ST_PolygonFromWKB(bytea) PUBLIC KEEP FUNCTION "MPointFromWKB(bytea, int)" PUBLIC DEPRECATE FUNCTION "ST_MPointFromWKB(bytea, int)" PUBLIC KEEP FUNCTION MPointFromWKB(bytea) PUBLIC DEPRECATE FUNCTION ST_MPointFromWKB(bytea) PUBLIC KEEP FUNCTION "MultiPointFromWKB(bytea, int)" PUBLIC DEPRECATE FUNCTION "ST_MultiPointFromWKB(bytea, int)" PUBLIC KEEP FUNCTION MultiPointFromWKB(bytea) PUBLIC DEPRECATE FUNCTION ST_MultiPointFromWKB(bytea) PUBLIC KEEP FUNCTION "MultiLineFromWKB(bytea, int)" PUBLIC DEPRECATE FUNCTION "MultiLineFromWKB(bytea, int)" PUBLIC DEPRECATE FUNCTION MultiLineFromWKB(bytea) PUBLIC DEPRECATE FUNCTION ST_MultiLineFromWKB(bytea) PUBLIC KEEP FUNCTION "MLineFromWKB(bytea, int)" PUBLIC DEPRECATE FUNCTION "ST_MLineFromWKB(bytea, int)" PUBLIC KEEP FUNCTION MLineFromWKB(bytea) PUBLIC DEPRECATE FUNCTION ST_MLineFromWKB(bytea) PUBLIC KEEP FUNCTION "MPolyFromWKB(bytea, int)" PUBLIC DEPRECATE FUNCTION "ST_MPolyFromWKB(bytea, int)" PUBLIC KEEP FUNCTION MPolyFromWKB(bytea) PUBLIC DEPRECATE FUNCTION ST_MPolyFromWKB(bytea) PUBLIC KEEP FUNCTION "MultiPolyFromWKB(bytea, int)" PUBLIC DEPRECATE FUNCTION "ST_MultiPolyFromWKB(bytea, int)" PUBLIC KEEP FUNCTION MultiPolyFromWKB(bytea) PUBLIC DEPRECATE FUNCTION ST_MultiPolyFromWKB(bytea) PUBLIC KEEP FUNCTION "GeomCollFromWKB(bytea, int)" PUBLIC DEPRECATE FUNCTION "ST_GeomCollFromWKB(bytea, int)" PUBLIC KEEP FUNCTION GeomCollFromWKB(bytea) PUBLIC DEPRECATE FUNCTION ST_GeomCollFromWKB(bytea) PUBLIC KEEP FUNCTION "BdPolyFromText(text, integer)" PUBLIC DEPRECATE FUNCTION "ST_BdPolyFromText(text, integer)" PUBLIC KEEP FUNCTION "BdMPolyFromText(text, integer)" PUBLIC DEPRECATE FUNCTION "ST_BdMPolyFromText(text, integer)" PUBLIC KEEP FUNCTION "ST_CurveToLine(geometry, integer)" PUBLIC KEEP FUNCTION ST_CurveToLine(geometry) PUBLIC KEEP FUNCTION ST_HasArc(geometry) PUBLIC KEEP FUNCTION ST_LineToCurve(geometry) PUBLIC KEEP \ No newline at end of file +Type Name Visibility Action Rename Notes +FUNCTION spheroid_in(cstring) PRIVATE KEEP +FUNCTION ST_spheroid_in(cstring) PRIVATE DELETE +FUNCTION spheroid_out(spheroid) PRIVATE KEEP +FUNCTION ST_spheroid_out(spheroid) PRIVATE DELETE +FUNCTION geometry_in(cstring) PRIVATE KEEP +FUNCTION ST_geometry_in(cstring) PRIVATE DELETE +FUNCTION geometry_out(geometry) PRIVATE KEEP +FUNCTION ST_geometry_out(geometry) PRIVATE DELETE +FUNCTION geometry_analyze(internal) PRIVATE KEEP +FUNCTION ST_geometry_analyze(internal) PRIVATE DELETE +FUNCTION geometry_recv(internal) PRIVATE KEEP +FUNCTION ST_geometry_recv(internal) PRIVATE DELETE +FUNCTION geometry_send(geometry) PRIVATE KEEP +FUNCTION ST_geometry_send(geometry) PRIVATE DELETE +FUNCTION "Affine(geometry,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8)" PUBLIC DEPRECATE +FUNCTION "ST_Affine(geometry,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8)" PUBLIC KEEP +FUNCTION "Affine(geometry,float8,float8,float8,float8,float8,float8)" PUBLIC DEPRECATE +FUNCTION "ST_Affine(geometry,float8,float8,float8,float8,float8,float8)" PUBLIC KEEP +FUNCTION "RotateZ(geometry,float8)" PUBLIC DEPRECATE +FUNCTION "ST_RotateZ(geometry,float8)" PUBLIC KEEP +FUNCTION "Rotate(geometry,float8)" PUBLIC DEPRECATE +FUNCTION "ST_Rotate(geometry,float8)" PUBLIC KEEP +FUNCTION "RotateX(geometry,float8)" PUBLIC DEPRECATE +FUNCTION "ST_RotateX(geometry,float8)" PUBLIC KEEP +FUNCTION "RotateY(geometry,float8)" PUBLIC DEPRECATE +FUNCTION "ST_RotateY(geometry,float8)" PUBLIC KEEP +FUNCTION "Translate(geometry,float8,float8,float8)" PUBLIC DEPRECATE +FUNCTION "ST_Translate(geometry,float8,float8,float8)" PUBLIC KEEP +FUNCTION "Translate(geometry,float8,float8)" PUBLIC DEPRECATE +FUNCTION "ST_Translate(geometry,float8,float8)" PUBLIC KEEP +FUNCTION "Scale(geometry,float8,float8,float8)" PUBLIC DEPRECATE +FUNCTION "ST_Scale(geometry,float8,float8,float8)" PUBLIC KEEP +FUNCTION "Scale(geometry,float8,float8)" PUBLIC DEPRECATE +FUNCTION "ST_Scale(geometry,float8,float8)" PUBLIC KEEP +FUNCTION "transscale(geometry,float8,float8,float8,float8)" PUBLIC DEPRECATE +FUNCTION "ST_transscale(geometry,float8,float8,float8,float8)" PUBLIC KEEP +FUNCTION shift_longitude(geometry) PUBLIC DEPRECATE +FUNCTION ST_shift_longitude(geometry) PUBLIC KEEP +FUNCTION box3d_in(cstring) PRIVATE KEEP +FUNCTION box3d_out(box3d) PRIVATE KEEP +FUNCTION ST_box3d_in(cstring) PRIVATE DELETE +FUNCTION ST_box3d_out(box3d) PRIVATE DELETE +FUNCTION xmin(box3d) PUBLIC DEPRECATE +FUNCTION ST_XMin(box3d) PUBLIC KEEP +FUNCTION ymin(box3d) PUBLIC DEPRECATE +FUNCTION ST_YMin(box3d) PUBLIC KEEP +FUNCTION zmin(box3d) PUBLIC DEPRECATE +FUNCTION ST_ZMin(box3d) PUBLIC KEEP +FUNCTION xmax(box3d) PUBLIC DEPRECATE +FUNCTION ST_XMax(box3d) PUBLIC KEEP +FUNCTION ymax(box3d) PUBLIC DEPRECATE +FUNCTION ST_YMax(box3d) PUBLIC KEEP +FUNCTION zmax(box3d) PUBLIC DEPRECATE +FUNCTION ST_ZMax(box3d) PUBLIC KEEP +FUNCTION chip_in(cstring) PRIVATE DELETE +FUNCTION ST_chip_in(cstring) PRIVATE DELETE +FUNCTION chip_out(chip) PRIVATE DELETE +FUNCTION ST_chip_out(chip) PRIVATE DELETE +FUNCTION box2d_in(cstring) PRIVATE KEEP +FUNCTION ST_box2d_in(cstring) PRIVATE DELETE +FUNCTION box2d_out(box2d) PRIVATE KEEP +FUNCTION ST_box2d_out(box2d) PRIVATE DELETE +FUNCTION "box2d_overleft(box2d, box2d)" PRIVATE KEEP +FUNCTION "ST_box2d_overleft(box2d, box2d)" PRIVATE DELETE +FUNCTION "box2d_overright(box2d, box2d)" PRIVATE KEEP +FUNCTION "ST_box2d_overright(box2d, box2d)" PRIVATE DELETE +FUNCTION "box2d_left(box2d, box2d)" PRIVATE KEEP +FUNCTION "ST_box2d_left(box2d, box2d)" PRIVATE DELETE +FUNCTION "box2d_right(box2d, box2d)" PRIVATE KEEP +FUNCTION "ST_box2d_right(box2d, box2d)" PRIVATE DELETE +FUNCTION "box2d_contain(box2d, box2d)" PRIVATE KEEP +FUNCTION "ST_box2d_contain(box2d, box2d)" PRIVATE DELETE +FUNCTION "box2d_contained(box2d, box2d)" PRIVATE KEEP +FUNCTION "ST_box2d_contained(box2d, box2d)" PRIVATE DELETE +FUNCTION "box2d_overlap(box2d, box2d)" PRIVATE KEEP +FUNCTION "ST_box2d_overlap(box2d, box2d)" PRIVATE DELETE +FUNCTION "box2d_intersects(box2d, box2d)" PRIVATE KEEP +FUNCTION "ST_box2d_intersects(box2d, box2d)" PRIVATE DELETE +FUNCTION "geometry_lt(geometry, geometry)" PRIVATE KEEP +FUNCTION "ST_geometry_lt(geometry, geometry)" PRIVATE DELETE +FUNCTION "geometry_le(geometry, geometry)" PRIVATE KEEP +FUNCTION "ST_geometry_le(geometry, geometry)" PRIVATE DELETE +FUNCTION "geometry_gt(geometry, geometry)" PRIVATE KEEP +FUNCTION "ST_geometry_gt(geometry, geometry)" PRIVATE DELETE +FUNCTION "geometry_ge(geometry, geometry)" PRIVATE KEEP +FUNCTION "ST_geometry_ge(geometry, geometry)" PRIVATE DELETE +FUNCTION "geometry_eq(geometry, geometry)" PRIVATE KEEP +FUNCTION "ST_geometry_eq(geometry, geometry)" PRIVATE DELETE +FUNCTION "geometry_cmp(geometry, geometry)" PRIVATE KEEP +FUNCTION "ST_geometry_cmp(geometry, geometry)" PRIVATE DELETE +FUNCTION "postgis_gist_sel (internal, oid, internal, int4)" PRIVATE KEEP +FUNCTION "ST_postgis_gist_sel (internal, oid, internal, int4)" PRIVATE DELETE +FUNCTION "postgis_gist_joinsel(internal, oid, internal, smallint)" PRIVATE KEEP +FUNCTION "ST_postgis_gist_joinsel(internal, oid, internal, smallint)" PRIVATE DELETE +FUNCTION "geometry_overleft(geometry, geometry)" PRIVATE KEEP +FUNCTION "ST_geometry_overleft(geometry, geometry)" PRIVATE DELETE +FUNCTION "geometry_overright(geometry, geometry)" PRIVATE KEEP +FUNCTION "ST_geometry_overright(geometry, geometry)" PRIVATE DELETE +FUNCTION "geometry_overabove(geometry, geometry)" PRIVATE KEEP +FUNCTION "ST_geometry_overabove(geometry, geometry)" PRIVATE DELETE +FUNCTION "geometry_overbelow(geometry, geometry)" PRIVATE KEEP +FUNCTION "ST_geometry_overbelow(geometry, geometry)" PRIVATE DELETE +FUNCTION "geometry_left(geometry, geometry)" PRIVATE KEEP +FUNCTION "ST_geometry_left(geometry, geometry)" PRIVATE DELETE +FUNCTION "geometry_right(geometry, geometry)" PRIVATE KEEP +FUNCTION "ST_geometry_right(geometry, geometry)" PRIVATE DELETE +FUNCTION "geometry_above(geometry, geometry)" PRIVATE KEEP +FUNCTION "ST_geometry_above(geometry, geometry)" PRIVATE DELETE +FUNCTION "geometry_below(geometry, geometry)" PRIVATE KEEP +FUNCTION "ST_geometry_below(geometry, geometry)" PRIVATE DELETE +FUNCTION "geometry_contain(geometry, geometry)" PRIVATE KEEP +FUNCTION "ST_geometry_contain(geometry, geometry)" PRIVATE DELETE +FUNCTION "geometry_contained(geometry, geometry)" PRIVATE KEEP +FUNCTION "ST_geometry_contained(geometry, geometry)" PRIVATE DELETE +FUNCTION "geometry_overlap(geometry, geometry)" PRIVATE KEEP +FUNCTION "ST_geometry_overlap(geometry, geometry)" PRIVATE DELETE +FUNCTION "geometry_same(geometry, geometry)" PRIVATE KEEP +FUNCTION "ST_geometry_same(geometry, geometry)" PRIVATE DELETE +FUNCTION "LWGEOM_gist_consistent(internal,geometry,int4)" PRIVATE RENAME postgis_gist_consistent +FUNCTION LWGEOM_gist_compress(internal) PRIVATE RENAME postgis_gist_compress +FUNCTION "LWGEOM_gist_penalty(internal,internal,internal)" PRIVATE RENAME postgis_gist_penalty +FUNCTION "LWGEOM_gist_picksplit(internal, internal)" PRIVATE RENAME postgis_gist_picksplit +FUNCTION "LWGEOM_gist_union(bytea, internal)" PRIVATE RENAME postgis_gist_union +FUNCTION "LWGEOM_gist_same(box2d, box2d, internal)" PRIVATE RENAME postgis_gist_same +FUNCTION LWGEOM_gist_decompress(internal) PRIVATE RENAME postgis_gist_decompress +FUNCTION addBBOX(geometry) PUBLIC DEPRECATE +FUNCTION ST_addBBOX(geometry) PUBLIC KEEP +FUNCTION dropBBOX(geometry) PUBLIC DEPRECATE +FUNCTION ST_dropBBOX(geometry) PUBLIC KEEP +FUNCTION getSRID(geometry) PUBLIC DEPRECATE +FUNCTION getSRID(geometry) PUBLIC DELETE duplicate +FUNCTION getBBOX(geometry) PUBLIC DEPRECATE +FUNCTION getBBOX(geometry) PUBLIC DELETE duplicate +FUNCTION srid(chip) PUBLIC DELETE +FUNCTION ST_srid(chip) PUBLIC DELETE +FUNCTION height(chip) PUBLIC DELETE +FUNCTION ST_height(chip) PUBLIC DELETE +FUNCTION factor(chip) PUBLIC DELETE +FUNCTION ST_factor(chip) PUBLIC DELETE +FUNCTION width(chip) PUBLIC DELETE +FUNCTION ST_width(chip) PUBLIC DELETE +FUNCTION dataTYPE(chip) PUBLIC DELETE +FUNCTION ST_dataTYPE(chip) PUBLIC DELETE +FUNCTION compression(chip) PUBLIC DELETE +FUNCTION ST_compression(chip) PUBLIC DELETE +FUNCTION "setSRID(chip,int4)" PUBLIC DELETE +FUNCTION "setFactor(chip,float4)" PUBLIC DELETE +FUNCTION "ST_setFactor(chip,float4)" PUBLIC DELETE +FUNCTION mem_size(geometry) PUBLIC DEPRECATE +FUNCTION ST_mem_size(geometry) PUBLIC KEEP +FUNCTION summary(geometry) PUBLIC DEPRECATE +FUNCTION ST_summary(geometry) PUBLIC KEEP +FUNCTION npoints(geometry) PUBLIC DEPRECATE +FUNCTION ST_npoints(geometry) PUBLIC KEEP +FUNCTION nrings(geometry) PUBLIC DEPRECATE +FUNCTION ST_nrings(geometry) PUBLIC KEEP +FUNCTION length3d(geometry) PUBLIC DEPRECATE +FUNCTION ST_3dlength(geometry) PUBLIC DEPRECATE +FUNCTION length2d(geometry) PUBLIC DEPRECATE +FUNCTION ST_length2d(geometry) PUBLIC DEPRECATE +FUNCTION "ST_Length(geometry, dims)" PUBLIC NEW calculate length using n dims +FUNCTION length(geometry) PUBLIC DEPRECATE +FUNCTION ST_Length(geometry) PUBLIC KEEP "calculate length using 2 or 3 dims, whatever is available" +FUNCTION ST_Length_WGS84(geometry) PUBLIC NEW spheroid length with WGS84 set automatically +FUNCTION "length3d_spheroid(geometry, spheroid)" PUBLIC DEPRECATE +FUNCTION "ST_3dlength_spheroid(geometry, spheroid)" PUBLIC DEPRECATE +FUNCTION "length_spheroid(geometry, spheroid)" PUBLIC DEPRECATE +FUNCTION "ST_length_spheroid(geometry, spheroid)" PUBLIC KEEP +FUNCTION "length2d_spheroid(geometry, spheroid)" PUBLIC DEPRECATE +FUNCTION "ST_length2d_spheroid(geometry, spheroid)" PUBLIC DEPRECATE +FUNCTION perimeter3d(geometry) PUBLIC DEPRECATE +FUNCTION ST_3DPerimeter(geometry) PUBLIC DEPRECATE +FUNCTION perimeter2d(geometry) PUBLIC DEPRECATE +FUNCTION ST_perimeter2d(geometry) PUBLIC DEPRECATE +FUNCTION perimeter(geometry) PUBLIC DEPRECATE +FUNCTION ST_Perimeter(geometry) PUBLIC KEEP +FUNCTION area2d(geometry) PUBLIC DEPRECATE +FUNCTION ST_area2d(geometry) PUBLIC DEPRECATE +FUNCTION area(geometry) PUBLIC DEPRECATE +FUNCTION ST_Area(geometry) PUBLIC KEEP +FUNCTION "distance_spheroid(geometry,geometry,spheroid)" PUBLIC DEPRECATE +FUNCTION "ST_Distance_WGS84(geometry,geometry)" PUBLIC NEW calculate distance with WGS84 autoset for spheroid +FUNCTION "ST_distance_spheroid(geometry,geometry,spheroid)" PUBLIC KEEP +FUNCTION "distance_sphere(geometry,geometry)" PUBLIC DEPRECATE +FUNCTION "ST_distance_sphere(geometry,geometry)" PUBLIC KEEP +FUNCTION "distance(geometry,geometry)" PUBLIC DEPRECATE +FUNCTION "ST_Distance(geometry,geometry)" PUBLIC KEEP +FUNCTION "max_distance(geometry,geometry)" PUBLIC DEPRECATE +FUNCTION "ST_max_distance(geometry,geometry)" PUBLIC KEEP +FUNCTION "point_inside_circle(geometry,float8,float8,float8)" PUBLIC DEPRECATE +FUNCTION "ST_point_inside_circle(geometry,float8,float8,float8)" PUBLIC KEEP +FUNCTION "azimuth(geometry,geometry)" PUBLIC DEPRECATE +FUNCTION "ST_azimuth(geometry,geometry)" PUBLIC KEEP +FUNCTION force_2d(geometry) PUBLIC DEPRECATE +FUNCTION ST_force_2d(geometry) PUBLIC KEEP +FUNCTION force_3dz(geometry) PUBLIC DEPRECATE +FUNCTION ST_force_3dz(geometry) PUBLIC KEEP +FUNCTION force_3d(geometry) PUBLIC DEPRECATE +FUNCTION ST_force_3d(geometry) PUBLIC KEEP +FUNCTION force_3dm(geometry) PUBLIC DEPRECATE +FUNCTION ST_force_3dm(geometry) PUBLIC KEEP +FUNCTION force_4d(geometry) PUBLIC DEPRECATE +FUNCTION ST_force_4d(geometry) PUBLIC KEEP +FUNCTION force_collection(geometry) PUBLIC DEPRECATE +FUNCTION ST_force_collection(geometry) PUBLIC KEEP +FUNCTION multi(geometry) PUBLIC DEPRECATE +FUNCTION ST_multi(geometry) PUBLIC KEEP +FUNCTION "expand(box3d,float8)" PUBLIC DEPRECATE +FUNCTION "ST_Expand(box3d,float8)" PUBLIC KEEP +FUNCTION "expand(box2d,float8)" PUBLIC DEPRECATE +FUNCTION "ST_expand(box2d,float8)" PUBLIC KEEP +FUNCTION "expand(geometry,float8)" PUBLIC DEPRECATE +FUNCTION "ST_expand(geometry,float8)" PUBLIC KEEP +FUNCTION envelope(geometry) PUBLIC DEPRECATE +FUNCTION ST_Envelope(geometry) PUBLIC KEEP +FUNCTION reverse(geometry) PUBLIC DEPRECATE +FUNCTION ST_Reverse(geometry) PUBLIC KEEP +FUNCTION ForceRHR(geometry) PUBLIC DEPRECATE +FUNCTION ST_ForceRHR(geometry) PUBLIC KEEP +FUNCTION noop(geometry) PRIVATE RENAME postgis_noop(geometry) +FUNCTION ST_noop(geometry) PRIVATE DELETE +FUNCTION zmflag(geometry) PUBLIC DEPRECATE +FUNCTION ST_zmflag(geometry) PUBLIC DEPRECATE "replace with st_hasz, st_hasm from iso" +FUNCTION hasBBOX(geometry) PRIVATE RENAME postgis_bbox_cached(geometry) +FUNCTION ST_HasBBOX(geometry) PRIVATE DELETE +FUNCTION ndims(geometry) PUBLIC DEPRECATE +FUNCTION ST_NDims(geometry) PUBLIC KEEP +FUNCTION AsEWKT(geometry) PUBLIC DEPRECATE +FUNCTION ST_AsEWKT(geometry) PUBLIC KEEP +FUNCTION AsEWKB(geometry) PUBLIC DEPRECATE +FUNCTION ST_AsEWKB(geometry) PUBLIC KEEP +FUNCTION AsHEXEWKB(geometry) PUBLIC DEPRECATE +FUNCTION ST_AsHEXEWKB(geometry) PUBLIC KEEP +FUNCTION "AsHEXEWKB(geometry, text)" PUBLIC DEPRECATE +FUNCTION "ST_AsHEXEWKB(geometry, text)" PUBLIC KEEP +FUNCTION "AsEWKB(geometry,text)" PUBLIC DEPRECATE +FUNCTION "ST_AsEWKB(geometry,text)" PUBLIC KEEP +FUNCTION GeomFromEWKB(bytea) PUBLIC DEPRECATE +FUNCTION ST_GeomFromEWKB(bytea) PUBLIC KEEP +FUNCTION GeomFromEWKT(text) PUBLIC DEPRECATE +FUNCTION ST_GeomFromEWKT(text) PUBLIC KEEP +FUNCTION cache_bbox() PUBLIC RENAME postgis_cache_bbox() this is a utility trigger +FUNCTION ST_Cache_BBox() PUBLIC DEPRECATE +FUNCTION "MakePoint(float8, float8)" PUBLIC DEPRECATE +FUNCTION "ST_MakePoint(float8, float8)" PUBLIC KEEP +FUNCTION "MakePoint(float8, float8, float8)" PUBLIC DEPRECATE +FUNCTION "ST_MakePoint(float8, float8, float8)" PUBLIC KEEP +FUNCTION "MakePoint(float8, float8, float8, float8)" PUBLIC DEPRECATE +FUNCTION "ST_MakePoint(float8, float8, float8, float8)" PUBLIC KEEP +FUNCTION "MakePointM(float8, float8, float8)" PUBLIC DEPRECATE +FUNCTION "ST_MakePointM(float8, float8, float8)" PUBLIC KEEP +FUNCTION "MakeBox2d(geometry, geometry)" PUBLIC DEPRECATE +FUNCTION "ST_MakeBox2d(geometry, geometry)" PUBLIC KEEP +FUNCTION "MakeBox3d(geometry, geometry)" PUBLIC DEPRECATE +FUNCTION "ST_3DMakeBox(geometry, geometry)" PUBLIC KEEP +FUNCTION makeline_garray (geometry[]) PUBLIC DEPRECATE +FUNCTION ST_MakeLine_GArray (geometry[]) PUBLIC DEPRECATE +FUNCTION ST_MakeLine (geometry[]) PUBLIC KEEP +FUNCTION LineFromMultiPoint(geometry) PUBLIC DEPRECATE +FUNCTION ST_LineFromMultiPoint(geometry) PUBLIC KEEP +FUNCTION "MakeLine(geometry, geometry)" PUBLIC DEPRECATE +FUNCTION "ST_MakeLine(geometry, geometry)" PUBLIC KEEP +FUNCTION "AddPoint(geometry, geometry)" PUBLIC DEPRECATE +FUNCTION "ST_AddPoint(geometry, geometry)" PUBLIC KEEP +FUNCTION "AddPoint(geometry, geometry, integer)" PUBLIC DEPRECATE +FUNCTION "ST_AddPoint(geometry, geometry, integer)" PUBLIC KEEP +FUNCTION "RemovePoint(geometry, integer)" PUBLIC DEPRECATE +FUNCTION "ST_RemovePoint(geometry, integer)" PUBLIC KEEP +FUNCTION "SetPoint(geometry, integer, geometry)" PUBLIC DEPRECATE +FUNCTION "ST_SetPoint(geometry, integer, geometry)" PUBLIC KEEP +FUNCTION "MakePolygon(geometry, geometry[])" PUBLIC DEPRECATE +FUNCTION "ST_MakePolygon(geometry, geometry[])" PUBLIC KEEP +FUNCTION MakePolygon(geometry) PUBLIC DEPRECATE +FUNCTION ST_MakePolygon(geometry) PUBLIC KEEP +FUNCTION BuildArea(geometry) PUBLIC DEPRECATE +FUNCTION ST_BuildArea(geometry) PUBLIC KEEP +FUNCTION Polygonize_GArray (geometry[]) PUBLIC DEPRECATE +FUNCTION ST_Polygonize_GArray (geometry[]) PUBLIC DEPRECATE +FUNCTION ST_Polygonize (geometry[]) PUBLIC KEEP +FUNCTION LineMerge(geometry) PUBLIC DEPRECATE +FUNCTION ST_LineMerge(geometry) PUBLIC KEEP +FUNCTION Dump(geometry) PUBLIC DEPRECATE +FUNCTION ST_Dump(geometry) PUBLIC KEEP +FUNCTION DumpRings(geometry) PUBLIC DEPRECATE +FUNCTION ST_DumpRings(geometry) PUBLIC KEEP +FUNCTION "combine_bbox(box2d,geometry)" PUBLIC DEPRECATE +FUNCTION "ST_Combine_BBox(box2d,geometry)" PUBLIC RENAME "postgis_combine_bbox(box2d, geometry)" +AGGREGATE Extent( PUBLIC DEPRECATE +AGGREGATE ST_Extent( PUBLIC KEEP +FUNCTION "combine_bbox(box3d,geometry)" PUBLIC DEPRECATE +FUNCTION "ST_Combine_BBox(box3d,geometry)" PUBLIC KEEP +AGGREGATE Extent3d( PUBLIC DEPRECATE +AGGREGATE ST_3DExtent( PUBLIC KEEP +FUNCTION "estimated_extent(text,text,text) RETURNS box2d AS" PUBLIC DEPRECATE +FUNCTION "ST_estimated_extent(text,text,text) RETURNS box2d AS" PUBLIC KEEP +FUNCTION "estimated_extent(text,text) RETURNS box2d AS" PUBLIC DEPRECATE +FUNCTION "ST_estimated_extent(text,text) RETURNS box2d AS" PUBLIC KEEP +FUNCTION "find_extent(text,text,text) RETURNS box2d AS" PUBLIC DEPRECATE +FUNCTION "ST_find_extent(text,text,text) RETURNS box2d AS" PUBLIC KEEP +FUNCTION "find_extent(text,text) RETURNS box2d AS" PUBLIC DEPRECATE +FUNCTION "ST_find_extent(text,text) RETURNS box2d AS" PUBLIC KEEP +FUNCTION rename_geometry_table_constraints() RETURNS text PUBLIC KEEP +FUNCTION fix_geometry_columns() RETURNS text PUBLIC KEEP +FUNCTION populate_geometry_columns() PUBLIC KEEP +FUNCTION populate_geometry_columns(tbl_oid oid) PUBLIC KEEP +FUNCTION probe_geometry_columns() RETURNS text AS PUBLIC KEEP +FUNCTION "AddGeometryColumn(varchar,varchar,varchar,varchar,integer,varchar,integer)" PUBLIC KEEP +FUNCTION "AddGeometryColumn(varchar,varchar,varchar,integer,varchar,integer) RETURNS text AS $$" PUBLIC KEEP +FUNCTION "AddGeometryColumn(varchar,varchar,integer,varchar,integer) RETURNS text AS $$" PUBLIC KEEP +FUNCTION "DropGeometryColumn(varchar, varchar,varchar,varchar)" PUBLIC KEEP +FUNCTION "DropGeometryColumn(varchar,varchar,varchar)" PUBLIC KEEP +FUNCTION "DropGeometryColumn(varchar,varchar)" PUBLIC KEEP +FUNCTION "DropGeometryTable(varchar, varchar,varchar)" PUBLIC KEEP +FUNCTION "DropGeometryTable(varchar,varchar) RETURNS text AS" PUBLIC KEEP +FUNCTION DropGeometryTable(varchar) RETURNS text AS PUBLIC KEEP +FUNCTION "UpdateGeometrySRID(varchar,varchar,varchar,varchar,integer)" PUBLIC KEEP +FUNCTION "UpdateGeometrySRID(varchar,varchar,varchar,integer)" PUBLIC KEEP +FUNCTION "UpdateGeometrySRID(varchar,varchar,integer)" PUBLIC KEEP +FUNCTION "find_srid(varchar,varchar,varchar) RETURNS int4 AS" PUBLIC KEEP +FUNCTION get_proj4_from_srid(integer) RETURNS text AS PUBLIC KEEP +FUNCTION "transform_geometry(geometry,text,text,int)" PRIVATE RENAME "postgis_transform_geometry(geometry, text, text, int)" +FUNCTION "transform(geometry,integer)" PUBLIC DEPRECATE +FUNCTION "ST_Transform(geometry,integer)" PUBLIC KEEP +FUNCTION postgis_version() RETURNS text PUBLIC KEEP +FUNCTION postgis_proj_version() RETURNS text PUBLIC KEEP +FUNCTION postgis_scripts_installed() RETURNS text PUBLIC KEEP +FUNCTION postgis_lib_version() RETURNS text PUBLIC KEEP +FUNCTION postgis_scripts_released() RETURNS text PUBLIC KEEP +FUNCTION postgis_uses_stats() RETURNS bool PUBLIC KEEP +FUNCTION postgis_geos_version() RETURNS text PUBLIC KEEP +FUNCTION postgis_scripts_build_date() RETURNS text PUBLIC KEEP +FUNCTION postgis_lib_build_date() RETURNS text PUBLIC KEEP +FUNCTION postgis_full_version() RETURNS text PUBLIC KEEP +FUNCTION box2d(geometry) PRIVATE KEEP +FUNCTION ST_box2d(geometry) PRIVATE DEPRECATE "these are pgsql casts, they should use pgsql convention" +FUNCTION box3d(geometry) PRIVATE KEEP +FUNCTION ST_box3d(geometry) PRIVATE DEPRECATE +FUNCTION box(geometry) PRIVATE KEEP +FUNCTION ST_box(geometry) PRIVATE DEPRECATE +FUNCTION box2d(box3d) PRIVATE KEEP +FUNCTION ST_box2d(box3d) PRIVATE DEPRECATE +FUNCTION box3d(box2d) PRIVATE KEEP +FUNCTION ST_box3d(box2d) PRIVATE DEPRECATE +FUNCTION box(box3d) PRIVATE KEEP +FUNCTION ST_box(box3d) PRIVATE DEPRECATE +FUNCTION text(geometry) PRIVATE KEEP +FUNCTION ST_text(geometry) PRIVATE DEPRECATE +FUNCTION box3dtobox(box3d) PRIVATE KEEP +FUNCTION geometry(box2d) PRIVATE KEEP +FUNCTION ST_geometry(box2d) PRIVATE DEPRECATE +FUNCTION geometry(box3d) PRIVATE KEEP +FUNCTION ST_geometry(box3d) PRIVATE DEPRECATE +FUNCTION geometry(text) PRIVATE KEEP +FUNCTION ST_geometry(text) PRIVATE DEPRECATE +FUNCTION geometry(chip) PRIVATE DELETE +FUNCTION ST_geometry(chip) PRIVATE DELETE +FUNCTION geometry(bytea) PRIVATE KEEP +FUNCTION ST_geometry(bytea) PRIVATE DEPRECATE +FUNCTION bytea(geometry) PRIVATE KEEP +FUNCTION ST_bytea(geometry) PRIVATE DEPRECATE +FUNCTION text(bool) PRIVATE KEEP +FUNCTION ST_text(bool) PRIVATE DEPRECATE +FUNCTION "Simplify(geometry, float8)" PUBLIC DEPRECATE +FUNCTION "ST_Simplify(geometry, float8)" PUBLIC KEEP +FUNCTION "SnapToGrid(geometry, float8, float8, float8, float8)" PUBLIC DEPRECATE +FUNCTION "ST_SnapToGrid(geometry, float8, float8, float8, float8)" PUBLIC KEEP +FUNCTION "SnapToGrid(geometry, float8, float8)" PUBLIC DEPRECATE +FUNCTION "ST_SnapToGrid(geometry, float8, float8)" PUBLIC KEEP +FUNCTION "SnapToGrid(geometry, float8)" PUBLIC DEPRECATE +FUNCTION "ST_SnapToGrid(geometry, float8)" PUBLIC KEEP +FUNCTION "SnapToGrid(geometry, geometry, float8, float8, float8, float8)" PUBLIC DEPRECATE +FUNCTION "ST_SnapToGrid(geometry, geometry, float8, float8, float8, float8)" PUBLIC KEEP +FUNCTION "Segmentize(geometry, float8)" PUBLIC DEPRECATE +FUNCTION "ST_Segmentize(geometry, float8)" PUBLIC KEEP +FUNCTION "line_interpolate_point(geometry, float8)" PUBLIC DEPRECATE +FUNCTION "ST_line_interpolate_point(geometry, float8)" PUBLIC KEEP +FUNCTION "line_substring(geometry, float8, float8)" PUBLIC DEPRECATE +FUNCTION "ST_line_substring(geometry, float8, float8)" PUBLIC KEEP +FUNCTION "line_locate_point(geometry, geometry)" PUBLIC DEPRECATE +FUNCTION "ST_line_locate_point(geometry, geometry)" PUBLIC KEEP +FUNCTION "locate_between_measures(geometry, float8, float8)" PUBLIC DEPRECATE +FUNCTION "ST_locate_between_measures(geometry, float8, float8)" PUBLIC KEEP +FUNCTION "locate_along_measure(geometry, float8)" PUBLIC DEPRECATE +FUNCTION "ST_locate_along_measure(geometry, float8)" PUBLIC KEEP +FUNCTION "intersection(geometry,geometry)" PUBLIC DEPRECATE +FUNCTION "ST_Intersection(geometry,geometry)" PUBLIC KEEP +FUNCTION "buffer(geometry,float8)" PUBLIC DEPRECATE +FUNCTION "ST_Buffer(geometry,float8)" PUBLIC KEEP +FUNCTION "buffer(geometry,float8,integer)" PUBLIC DEPRECATE +FUNCTION "ST_buffer(geometry,float8,integer)" PUBLIC KEEP +FUNCTION convexhull(geometry) PUBLIC DEPRECATE +FUNCTION ST_ConvexHull(geometry) PUBLIC KEEP +FUNCTION "_ST_LineCrossingDirection(geometry, geometry)" PUBLIC KEEP +FUNCTION "ST_LineCrossingDirection(geometry, geometry)" PUBLIC KEEP +FUNCTION "ST_LocateBetweenElevations(geometry, float8, float8)" PUBLIC KEEP +FUNCTION "ST_SimplifyPreserveTopology(geometry, float8)" PUBLIC KEEP +FUNCTION ST_IsValidReason(geometry) PUBLIC KEEP +FUNCTION "difference(geometry,geometry)" PUBLIC DEPRECATE +FUNCTION "ST_Difference(geometry,geometry)" PUBLIC KEEP +FUNCTION boundary(geometry) PUBLIC DEPRECATE +FUNCTION ST_Boundary(geometry) PUBLIC KEEP +FUNCTION "symdifference(geometry,geometry)" PUBLIC DEPRECATE +FUNCTION "ST_SymDifference(geometry,geometry)" PUBLIC KEEP +FUNCTION "symmetricdifference(geometry,geometry)" PUBLIC DEPRECATE +FUNCTION "ST_symmetricdifference(geometry,geometry)" PUBLIC KEEP +FUNCTION "GeomUnion(geometry,geometry)" PUBLIC DEPRECATE +FUNCTION "ST_Union(geometry,geometry)" PUBLIC KEEP +FUNCTION "collector(geometry, geometry)" PUBLIC DELETE dupe of st_collect +FUNCTION "ST_collector(geometry, geometry)" PUBLIC DELETE dupe of st_collect +FUNCTION "collect(geometry, geometry)" PUBLIC DEPRECATE +FUNCTION "ST_collect(geometry, geometry)" PUBLIC KEEP +AGGREGATE memcollect( PUBLIC DEPRECATE +AGGREGATE ST_memcollect( PUBLIC KEEP +FUNCTION "geom_accum (geometry[],geometry)" PUBLIC DELETE superceded by new aggregator +FUNCTION "ST_geom_accum (geometry[],geometry)" PUBLIC DELETE superceded by new aggregator +FUNCTION collect_garray (geometry[]) PUBLIC DELETE superceded by new aggregator +FUNCTION ST_collect_garray (geometry[]) PUBLIC DELETE superceded by new aggregator +FUNCTION ST_collect (geometry[]) PUBLIC KEEP +AGGREGATE MemGeomUnion ( PUBLIC DEPRECATE +AGGREGATE ST_MemUnion ( PUBLIC KEEP +FUNCTION pgis_abs_in(cstring) PRIVATE KEEP +FUNCTION pgis_abs_out(pgis_abs) PRIVATE KEEP +TYPE pgis_abs ( PRIVATE KEEP +FUNCTION "pgis_geometry_accum_transfn(pgis_abs, geometry)" PRIVATE KEEP +FUNCTION pgis_geometry_accum_finalfn(pgis_abs) PRIVATE KEEP +FUNCTION pgis_geometry_union_finalfn(pgis_abs) PRIVATE KEEP +FUNCTION pgis_geometry_collect_finalfn(pgis_abs) PRIVATE KEEP +FUNCTION pgis_geometry_polygonize_finalfn(pgis_abs) PRIVATE KEEP +FUNCTION pgis_geometry_makeline_finalfn(pgis_abs) PRIVATE KEEP +AGGREGATE accum ( PUBLIC DEPRECATE +AGGREGATE ST_Accum ( PUBLIC KEEP +AGGREGATE accum_old ( PUBLIC DELETE +AGGREGATE ST_accum_old ( PUBLIC DELETE +FUNCTION unite_garray (geometry[]) PUBLIC DEPRECATE +FUNCTION ST_unite_garray (geometry[]) PUBLIC DEPRECATE superceded by st_union(geometry[]) +FUNCTION ST_Union (geometry[]) PUBLIC KEEP +AGGREGATE GeomUnion_Old ( PUBLIC DELETE +AGGREGATE ST_Union_Old ( PUBLIC DELETE +AGGREGATE ST_Union ( PUBLIC KEEP +AGGREGATE collect ( PUBLIC DEPRECATE +AGGREGATE ST_Collect ( PUBLIC KEEP +AGGREGATE Polygonize ( PUBLIC DEPRECATE +AGGREGATE ST_Polygonize ( PUBLIC KEEP +AGGREGATE makeline ( PUBLIC DEPRECATE +AGGREGATE ST_MakeLine ( PUBLIC KEEP +FUNCTION "relate(geometry,geometry)" PUBLIC DEPRECATE +FUNCTION "ST_relate(geometry,geometry)" PUBLIC KEEP +FUNCTION "relate(geometry,geometry,text)" PUBLIC DEPRECATE +FUNCTION "ST_Relate(geometry,geometry,text)" PUBLIC KEEP +FUNCTION "disjoint(geometry,geometry)" PUBLIC DEPRECATE +FUNCTION "ST_Disjoint(geometry,geometry)" PUBLIC KEEP +FUNCTION "touches(geometry,geometry)" PUBLIC DEPRECATE +FUNCTION "_ST_Touches(geometry,geometry)" PUBLIC KEEP +FUNCTION "ST_Touches(geometry,geometry)" PUBLIC KEEP +FUNCTION "_ST_DWithin(geometry,geometry,float8)" PUBLIC KEEP +FUNCTION "ST_DWithin(geometry, geometry, float8)" PUBLIC KEEP +FUNCTION "intersects(geometry,geometry)" PUBLIC DEPRECATE +FUNCTION "_ST_Intersects(geometry,geometry)" PUBLIC KEEP +FUNCTION "ST_Intersects(geometry,geometry)" PUBLIC KEEP +FUNCTION "crosses(geometry,geometry)" PUBLIC DEPRECATE +FUNCTION "_ST_Crosses(geometry,geometry)" PUBLIC KEEP +FUNCTION "ST_Crosses(geometry,geometry)" PUBLIC KEEP +FUNCTION "within(geometry,geometry)" PUBLIC DEPRECATE +FUNCTION "_ST_Within(geometry,geometry)" PUBLIC KEEP +FUNCTION "ST_Within(geometry,geometry)" PUBLIC KEEP +FUNCTION "Contains(geometry,geometry)" PUBLIC DEPRECATE +FUNCTION "_ST_Contains(geometry,geometry)" PUBLIC KEEP +FUNCTION "ST_Contains(geometry,geometry)" PUBLIC KEEP +FUNCTION "_ST_CoveredBy(geometry,geometry)" PUBLIC KEEP +FUNCTION "ST_CoveredBy(geometry,geometry)" PUBLIC KEEP +FUNCTION "_ST_Covers(geometry,geometry)" PUBLIC KEEP +FUNCTION "ST_Covers(geometry,geometry)" PUBLIC KEEP +FUNCTION "_ST_ContainsProperly(geometry,geometry)" PUBLIC KEEP +FUNCTION "ST_ContainsProperly(geometry,geometry)" PUBLIC KEEP +FUNCTION "overlaps(geometry,geometry)" PUBLIC DEPRECATE +FUNCTION "_ST_Overlaps(geometry,geometry)" PUBLIC KEEP +FUNCTION "ST_Overlaps(geometry,geometry)" PUBLIC KEEP +FUNCTION IsValid(geometry) PUBLIC DEPRECATE +FUNCTION ST_IsValid(geometry) PUBLIC KEEP +FUNCTION GEOSnoop(geometry) PRIVATE RENAME postgis_geos_noop +FUNCTION Centroid(geometry) PUBLIC DEPRECATE +FUNCTION ST_Centroid(geometry) PUBLIC KEEP +FUNCTION IsRing(geometry) PUBLIC DEPRECATE +FUNCTION ST_IsRing(geometry) PUBLIC KEEP +FUNCTION PointOnSurface(geometry) PUBLIC DEPRECATE +FUNCTION ST_PointOnSurface(geometry) PUBLIC KEEP +FUNCTION IsSimple(geometry) PUBLIC DEPRECATE +FUNCTION ST_IsSimple(geometry) PUBLIC KEEP +FUNCTION "Equals(geometry,geometry)" PUBLIC DEPRECATE +FUNCTION "ST_Equals(geometry,geometry)" PUBLIC KEEP +FUNCTION "AsSVG(geometry,int4,int4)" PUBLIC DEPRECATE +FUNCTION "ST_AsSVG(geometry,int4,int4)" PUBLIC KEEP +FUNCTION "AsSVG(geometry,int4)" PUBLIC DEPRECATE +FUNCTION "ST_AsSVG(geometry,int4)" PUBLIC KEEP +FUNCTION AsSVG(geometry) PUBLIC DEPRECATE +FUNCTION ST_AsSVG(geometry) PUBLIC KEEP +FUNCTION "_ST_AsGML(int4, geometry, int4)" PUBLIC KEEP +FUNCTION "AsGML(geometry, int4)" PUBLIC DEPRECATE +FUNCTION "ST_AsGML(geometry, int4)" PUBLIC KEEP +FUNCTION AsGML(geometry) PUBLIC DEPRECATE +FUNCTION ST_AsGML(geometry) PUBLIC KEEP +FUNCTION "ST_AsGML(int4, geometry)" PUBLIC KEEP +FUNCTION "ST_AsGML(int4, geometry, int4)" PUBLIC KEEP +FUNCTION "_ST_AsKML(int4, geometry, int4)" PUBLIC KEEP +FUNCTION "AsKML(geometry, int4)" PUBLIC DEPRECATE +FUNCTION "ST_AsKML(geometry, int4)" PUBLIC KEEP +FUNCTION AsKML(geometry) PUBLIC DEPRECATE +FUNCTION "AsKML(int4, geometry, int4)" PUBLIC DEPRECATE +FUNCTION ST_AsKML(geometry) PUBLIC KEEP +FUNCTION "ST_AsKML(int4, geometry)" PUBLIC KEEP +FUNCTION "ST_AsKML(int4, geometry, int4)" PUBLIC KEEP +FUNCTION "_ST_AsGeoJson(int4, geometry, int4, int4)" PUBLIC KEEP +FUNCTION "ST_AsGeoJson(geometry, int4)" PUBLIC KEEP +FUNCTION ST_AsGeoJson(geometry) PUBLIC KEEP +FUNCTION "ST_AsGeoJson(int4, geometry)" PUBLIC KEEP +FUNCTION "ST_AsGeoJson(int4, geometry, int4)" PUBLIC KEEP +FUNCTION "ST_AsGeoJson(geometry, int4, int4)" PUBLIC KEEP +FUNCTION "ST_AsGeoJson(int4, geometry, int4, int4)" PUBLIC KEEP +FUNCTION NumPoints(geometry) PUBLIC DEPRECATE +FUNCTION ST_NumPoints(geometry) PUBLIC KEEP +FUNCTION NumGeometries(geometry) PUBLIC DEPRECATE +FUNCTION ST_NumGeometries(geometry) PUBLIC KEEP +FUNCTION "GeometryN(geometry,integer)" PUBLIC DEPRECATE +FUNCTION "ST_GeometryN(geometry,integer)" PUBLIC KEEP +FUNCTION Dimension(geometry) PUBLIC DEPRECATE +FUNCTION ST_Dimension(geometry) PUBLIC KEEP +FUNCTION ExteriorRing(geometry) PUBLIC DEPRECATE +FUNCTION ST_ExteriorRing(geometry) PUBLIC KEEP +FUNCTION NumInteriorRings(geometry) PUBLIC DEPRECATE +FUNCTION ST_NumInteriorRings(geometry) PUBLIC KEEP +FUNCTION NumInteriorRing(geometry) PUBLIC DEPRECATE +FUNCTION ST_NumInteriorRing(geometry) PUBLIC KEEP +FUNCTION "InteriorRingN(geometry,integer)" PUBLIC DEPRECATE +FUNCTION "ST_InteriorRingN(geometry,integer)" PUBLIC KEEP +FUNCTION GeometryTYPE(geometry) PUBLIC DEPRECATE +FUNCTION ST_GeometryTYPE(geometry) PUBLIC KEEP +FUNCTION "PointN(geometry,integer)" PUBLIC DEPRECATE +FUNCTION "ST_PointN(geometry,integer)" PUBLIC KEEP +FUNCTION X(geometry) PUBLIC DEPRECATE +FUNCTION ST_X(geometry) PUBLIC KEEP +FUNCTION Y(geometry) PUBLIC DEPRECATE +FUNCTION ST_Y(geometry) PUBLIC KEEP +FUNCTION Z(geometry) PUBLIC DEPRECATE +FUNCTION SE_Z(geometry) PUBLIC KEEP +FUNCTION ST_Z(geometry) PUBLIC KEEP ESRI compatibility (feh!) +FUNCTION M(geometry) PUBLIC DEPRECATE +FUNCTION ST_M(geometry) PUBLIC KEEP +FUNCTION StartPoint(geometry) PUBLIC DEPRECATE +FUNCTION ST_StartPoint(geometry) PUBLIC KEEP +FUNCTION EndPoint(geometry) PUBLIC DEPRECATE +FUNCTION ST_EndPoint(geometry) PUBLIC KEEP +FUNCTION IsClosed(geometry) PUBLIC DEPRECATE +FUNCTION ST_IsClosed(geometry) PUBLIC KEEP +FUNCTION IsEmpty(geometry) PUBLIC DEPRECATE +FUNCTION ST_IsEmpty(geometry) PUBLIC KEEP +FUNCTION SRID(geometry) PUBLIC DEPRECATE +FUNCTION ST_SRID(geometry) PUBLIC KEEP +FUNCTION "SetSRID(geometry,int4)" PUBLIC DEPRECATE +FUNCTION "ST_SetSRID(geometry,int4)" PUBLIC KEEP +FUNCTION AsBinary(geometry) PUBLIC DEPRECATE +FUNCTION ST_AsBinary(geometry) PUBLIC KEEP +FUNCTION "AsBinary(geometry,text)" PUBLIC DEPRECATE +FUNCTION "ST_AsBinary(geometry,text)" PUBLIC KEEP +FUNCTION AsText(geometry) PUBLIC DEPRECATE +FUNCTION ST_AsText(geometry) PUBLIC KEEP +FUNCTION GeometryFromText(text) PUBLIC DEPRECATE +FUNCTION ST_GeometryFromText(text) PUBLIC KEEP +FUNCTION "GeometryFromText(text, int4)" PUBLIC DEPRECATE +FUNCTION "ST_GeometryFromText(text, int4)" PUBLIC KEEP +FUNCTION GeomFromText(text) PUBLIC DEPRECATE +FUNCTION ST_GeomFromText(text) PUBLIC KEEP +FUNCTION "GeomFromText(text, int4)" PUBLIC DEPRECATE +FUNCTION "ST_GeomFromText(text, int4)" PUBLIC KEEP +FUNCTION PointFromText(text) PUBLIC DEPRECATE +FUNCTION ST_PointFromText(text) PUBLIC KEEP +FUNCTION "PointFromText(text, int4)" PUBLIC DEPRECATE +FUNCTION "ST_PointFromText(text, int4)" PUBLIC KEEP +FUNCTION LineFromText(text) PUBLIC DEPRECATE +FUNCTION ST_LineFromText(text) PUBLIC KEEP +FUNCTION "LineFromText(text, int4)" PUBLIC DEPRECATE +FUNCTION "ST_LineFromText(text, int4)" PUBLIC KEEP +FUNCTION LineStringFromText(text) PUBLIC DEPRECATE +FUNCTION "LineStringFromText(text, int4)" PUBLIC DEPRECATE +FUNCTION PolyFromText(text) PUBLIC DEPRECATE +FUNCTION ST_PolyFromText(text) PUBLIC KEEP +FUNCTION "PolyFromText(text, int4)" PUBLIC DEPRECATE +FUNCTION "ST_PolyFromText(text, int4)" PUBLIC KEEP +FUNCTION "PolygonFromText(text, int4)" PUBLIC DEPRECATE +FUNCTION "ST_PolygonFromText(text, int4)" PUBLIC KEEP +FUNCTION PolygonFromText(text) PUBLIC DEPRECATE +FUNCTION ST_PolygonFromText(text) PUBLIC KEEP +FUNCTION "MLineFromText(text, int4)" PUBLIC DEPRECATE +FUNCTION "ST_MLineFromText(text, int4)" PUBLIC KEEP +FUNCTION MLineFromText(text) PUBLIC DEPRECATE +FUNCTION ST_MLineFromText(text) PUBLIC KEEP +FUNCTION MultiLineStringFromText(text) PUBLIC DEPRECATE +FUNCTION ST_MultiLineStringFromText(text) PUBLIC KEEP +FUNCTION "MultiLineStringFromText(text, int4)" PUBLIC DEPRECATE +FUNCTION "ST_MultiLineStringFromText(text, int4)" PUBLIC KEEP +FUNCTION "MPointFromText(text, int4)" PUBLIC DEPRECATE +FUNCTION "ST_MPointFromText(text, int4)" PUBLIC KEEP +FUNCTION MPointFromText(text) PUBLIC DEPRECATE +FUNCTION ST_MPointFromText(text) PUBLIC KEEP +FUNCTION "MultiPointFromText(text, int4)" PUBLIC DEPRECATE +FUNCTION MultiPointFromText(text) PUBLIC DEPRECATE +FUNCTION ST_MultiPointFromText(text) PUBLIC KEEP +FUNCTION MultiPointFromText(text) PUBLIC DEPRECATE +FUNCTION ST_MultiPointFromText(text) PUBLIC KEEP +FUNCTION "MPolyFromText(text, int4)" PUBLIC DEPRECATE +FUNCTION "ST_MPolyFromText(text, int4)" PUBLIC KEEP +FUNCTION MPolyFromText(text) PUBLIC DEPRECATE +FUNCTION ST_MPolyFromText(text) PUBLIC KEEP +FUNCTION "MultiPolygonFromText(text, int4)" PUBLIC DEPRECATE +FUNCTION "ST_MultiPolygonFromText(text, int4)" PUBLIC KEEP +FUNCTION MultiPolygonFromText(text) PUBLIC DEPRECATE +FUNCTION ST_MultiPolygonFromText(text) PUBLIC KEEP +FUNCTION "GeomCollFromText(text, int4)" PUBLIC DEPRECATE +FUNCTION "ST_GeomCollFromText(text, int4)" PUBLIC KEEP +FUNCTION GeomCollFromText(text) PUBLIC DEPRECATE +FUNCTION ST_GeomCollFromText(text) PUBLIC KEEP +FUNCTION GeomFromWKB(bytea) PUBLIC DEPRECATE +FUNCTION ST_GeomFromWKB(bytea) PUBLIC KEEP +FUNCTION "GeomFromWKB(bytea, int)" PUBLIC DEPRECATE +FUNCTION "ST_GeomFromWKB(bytea, int)" PUBLIC KEEP +FUNCTION "PointFromWKB(bytea, int)" PUBLIC DEPRECATE +FUNCTION "ST_PointFromWKB(bytea, int)" PUBLIC KEEP +FUNCTION PointFromWKB(bytea) PUBLIC DEPRECATE +FUNCTION ST_PointFromWKB(bytea) PUBLIC KEEP +FUNCTION "LineFromWKB(bytea, int)" PUBLIC DEPRECATE +FUNCTION "ST_LineFromWKB(bytea, int)" PUBLIC KEEP +FUNCTION LineFromWKB(bytea) PUBLIC DEPRECATE +FUNCTION ST_LineFromWKB(bytea) PUBLIC KEEP +FUNCTION "LinestringFromWKB(bytea, int)" PUBLIC DEPRECATE +FUNCTION "ST_LinestringFromWKB(bytea, int)" PUBLIC KEEP +FUNCTION LinestringFromWKB(bytea) PUBLIC DEPRECATE +FUNCTION ST_LinestringFromWKB(bytea) PUBLIC KEEP +FUNCTION "PolyFromWKB(bytea, int)" PUBLIC DEPRECATE +FUNCTION "ST_PolyFromWKB(bytea, int)" PUBLIC KEEP +FUNCTION PolyFromWKB(bytea) PUBLIC DEPRECATE +FUNCTION ST_PolyFromWKB(bytea) PUBLIC KEEP +FUNCTION "PolygonFromWKB(bytea, int)" PUBLIC DEPRECATE +FUNCTION "ST_PolygonFromWKB(bytea, int)" PUBLIC KEEP +FUNCTION PolygonFromWKB(bytea) PUBLIC DEPRECATE +FUNCTION ST_PolygonFromWKB(bytea) PUBLIC KEEP +FUNCTION "MPointFromWKB(bytea, int)" PUBLIC DEPRECATE +FUNCTION "ST_MPointFromWKB(bytea, int)" PUBLIC KEEP +FUNCTION MPointFromWKB(bytea) PUBLIC DEPRECATE +FUNCTION ST_MPointFromWKB(bytea) PUBLIC KEEP +FUNCTION "MultiPointFromWKB(bytea, int)" PUBLIC DEPRECATE +FUNCTION "ST_MultiPointFromWKB(bytea, int)" PUBLIC KEEP +FUNCTION MultiPointFromWKB(bytea) PUBLIC DEPRECATE +FUNCTION ST_MultiPointFromWKB(bytea) PUBLIC KEEP +FUNCTION "MultiLineFromWKB(bytea, int)" PUBLIC DEPRECATE +FUNCTION "MultiLineFromWKB(bytea, int)" PUBLIC DEPRECATE +FUNCTION MultiLineFromWKB(bytea) PUBLIC DEPRECATE +FUNCTION ST_MultiLineFromWKB(bytea) PUBLIC KEEP +FUNCTION "MLineFromWKB(bytea, int)" PUBLIC DEPRECATE +FUNCTION "ST_MLineFromWKB(bytea, int)" PUBLIC KEEP +FUNCTION MLineFromWKB(bytea) PUBLIC DEPRECATE +FUNCTION ST_MLineFromWKB(bytea) PUBLIC KEEP +FUNCTION "MPolyFromWKB(bytea, int)" PUBLIC DEPRECATE +FUNCTION "ST_MPolyFromWKB(bytea, int)" PUBLIC KEEP +FUNCTION MPolyFromWKB(bytea) PUBLIC DEPRECATE +FUNCTION ST_MPolyFromWKB(bytea) PUBLIC KEEP +FUNCTION "MultiPolyFromWKB(bytea, int)" PUBLIC DEPRECATE +FUNCTION "ST_MultiPolyFromWKB(bytea, int)" PUBLIC KEEP +FUNCTION MultiPolyFromWKB(bytea) PUBLIC DEPRECATE +FUNCTION ST_MultiPolyFromWKB(bytea) PUBLIC KEEP +FUNCTION "GeomCollFromWKB(bytea, int)" PUBLIC DEPRECATE +FUNCTION "ST_GeomCollFromWKB(bytea, int)" PUBLIC KEEP +FUNCTION GeomCollFromWKB(bytea) PUBLIC DEPRECATE +FUNCTION ST_GeomCollFromWKB(bytea) PUBLIC KEEP +FUNCTION "BdPolyFromText(text, integer)" PUBLIC DEPRECATE +FUNCTION "ST_BdPolyFromText(text, integer)" PUBLIC KEEP +FUNCTION "BdMPolyFromText(text, integer)" PUBLIC DEPRECATE +FUNCTION "ST_BdMPolyFromText(text, integer)" PUBLIC KEEP +FUNCTION "ST_CurveToLine(geometry, integer)" PUBLIC KEEP +FUNCTION ST_CurveToLine(geometry) PUBLIC KEEP +FUNCTION ST_HasArc(geometry) PUBLIC KEEP +FUNCTION ST_LineToCurve(geometry) PUBLIC KEEP diff -Nru postgis-1.5.3/doc/template.xml postgis-2.0.1/doc/template.xml --- postgis-1.5.3/doc/template.xml 2009-11-30 14:30:02.000000000 +0000 +++ postgis-2.0.1/doc/template.xml 2012-02-27 22:08:12.000000000 +0000 @@ -20,6 +20,8 @@ geometry g1geometry g2varchar myparam + + varchar myparam=the_default_value @@ -35,9 +37,13 @@ comparison that will make use of any indexes that are available on the geometries. - - Availability: version goes here - requires GEOS >= 2.1.0. - + + Availability: version goes here - requires GEOS >= 3.3.0. + + + Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced. + + Changed: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced.&sfs_compliant; @@ -50,6 +56,12 @@ &curve_support; + + + &P_support; + + + &T_support; diff -Nru postgis-1.5.3/doc/tiger_geocoder_comments.sql postgis-2.0.1/doc/tiger_geocoder_comments.sql --- postgis-1.5.3/doc/tiger_geocoder_comments.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/tiger_geocoder_comments.sql 2012-06-22 21:05:15.000000000 +0000 @@ -0,0 +1,29 @@ + +COMMENT ON FUNCTION Drop_Indexes_Generate_Script(text ) IS 'args: param_schema=tiger_data - Generates a script that drops all non-primary key and non-unique indexes on tiger schema and user specified schema. Defaults schema to tiger_data if no schema is specified.'; + +COMMENT ON FUNCTION Drop_State_Tables_Generate_Script(text , text ) IS 'args: param_state, param_schema=tiger_data - Generates a script that drops all tables in the specified schema that are prefixed with the state abbreviation. Defaults schema to tiger_data if no schema is specified.'; + +COMMENT ON FUNCTION geocode(varchar , integer , geometry ) IS 'args: address, max_results=10, restrict_region=NULL, OUT addy, OUT geomout, OUT rating - Takes in an address as a string (or other normalized address) and outputs a set of possible locations which include a point geometry in NAD 83 long lat, a normalized address for each, and the rating. The lower the rating the more likely the match. Results are sorted by lowest rating first. Can optionally pass in maximum results, defaults to 10, and restrict_region (defaults to NULL)'; + +COMMENT ON FUNCTION geocode(norm_addy , integer , geometry ) IS 'args: in_addy, max_results=10, restrict_region=NULL, OUT addy, OUT geomout, OUT rating - Takes in an address as a string (or other normalized address) and outputs a set of possible locations which include a point geometry in NAD 83 long lat, a normalized address for each, and the rating. The lower the rating the more likely the match. Results are sorted by lowest rating first. Can optionally pass in maximum results, defaults to 10, and restrict_region (defaults to NULL)'; + +COMMENT ON FUNCTION geocode_intersection(text , text , text , text , text , integer ) IS 'args: roadway1, roadway2, in_state, in_city, in_zip, max_results=10, OUT addy, OUT geomout, OUT rating - Takes in 2 streets that intersect and a state, city, zip, and outputs a set of possible locations on the first cross street that is at the intersection, also includes a point geometry in NAD 83 long lat, a normalized address for each location, and the rating. The lower the rating the more likely the match. Results are sorted by lowest rating first. Can optionally pass in maximum results, defaults to 10'; + +COMMENT ON FUNCTION get_tract(geometry , text ) IS 'args: loc_geom, output_field='name' - Returns census tract or field from tract table of where the geometry is located. Default to returning short name of tract.'; + +COMMENT ON FUNCTION Install_Missing_Indexes() IS 'Finds all tables with key columns used in geocoder joins and filter conditions that are missing used indexes on those columns and will add them.'; + +COMMENT ON FUNCTION loader_generate_script(text[], text) IS 'args: param_states, os - Generates a shell script for the specified platform for the specified states that will download Tiger data, stage and load into tiger_data schema. Each state script is returned as a separate record. Latest version supports Tiger 2010 structural changes and also loads census tract, block groups, and blocks tables.'; + +COMMENT ON FUNCTION loader_generate_census_script(text[], text) IS 'args: param_states, os - Generates a shell script for the specified platform for the specified states that will download Tiger census state tract, bg, and tabblocks data tables, stage and load into tiger_data schema. Each state script is returned as a separate record.'; + +COMMENT ON FUNCTION Missing_Indexes_Generate_Script() IS 'Finds all tables with key columns used in geocoder joins that are missing indexes on those columns and will output the SQL DDL to define the index for those tables.'; + +COMMENT ON FUNCTION normalize_address(varchar ) IS 'args: in_address - Given a textual street address, returns a composite norm_addy type that has road suffix, prefix and type standardized, street, streetname etc. broken into separate fields. This function will work with just the lookup data packaged with the tiger_geocoder (no need for tiger census data).'; + +COMMENT ON FUNCTION pprint_addy(norm_addy ) IS 'args: in_addy - Given a norm_addy composite type object, returns a pretty print representation of it. Usually used in conjunction with normalize_address.'; + +COMMENT ON FUNCTION Reverse_Geocode(geometry , boolean ) IS 'args: pt, include_strnum_range=false, OUT intpt, OUT addy, OUT street - Takes a geometry point in a known spatial ref sys and returns a record containing an array of theoretically possible addresses and an array of cross streets. If include_strnum_range = true, includes the street range in the cross streets.'; + +COMMENT ON FUNCTION Topology_Load_Tiger(varchar , varchar , varchar ) IS 'args: topo_name, region_type, region_id - Loads a defined region of tiger data into a PostGIS Topology and transforming the tiger data to spatial reference of the topology and snapping to the precision tolerance of the topology.'; + \ No newline at end of file diff -Nru postgis-1.5.3/doc/topology_comments.sql postgis-2.0.1/doc/topology_comments.sql --- postgis-1.5.3/doc/topology_comments.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/topology_comments.sql 2012-06-22 21:05:08.000000000 +0000 @@ -0,0 +1,129 @@ + +COMMENT ON TYPE topology.getfaceedges_returntype IS 'postgis type: A composite type that consists of a sequence number and edge number. This is the return type for ST_GetFaceEdges'; + +COMMENT ON TYPE topology.topogeometry IS 'postgis type: A composite type that refers to a topology geometry in a specific topology, layer, having specific type (1:[multi]point, 2:[multi]line, 3:[multi]poly, 4:collection) with specific identifier id in the topology. The id uniquely defines the topogeometry in the topology.'; + +COMMENT ON TYPE topology.validatetopology_returntype IS 'postgis type: A composite type that consists of an error message and id1 and id2 to denote location of error. This is the return type for ValidateTopology'; + +COMMENT ON DOMAIN topology.TopoElement IS 'postgis domain: An array of 2 integers generally used to identify a TopoGeometry component.'; + +COMMENT ON DOMAIN topology.topoelementarray IS 'postgis domain: An array of element_id,element_type values. a bidimensional array of integers: {{id,type}, {id,type}, ...}'; + +COMMENT ON FUNCTION topology.AddTopoGeometryColumn(varchar , varchar , varchar , varchar , varchar ) IS 'args: topology_name, schema_name, table_name, column_name, feature_type - Adds a topogeometry column to an existing table, registers this new column as a layer in topology.layer and returns the new layer_id.'; + +COMMENT ON FUNCTION topology.AddTopoGeometryColumn(varchar , varchar , varchar , varchar , varchar , integer ) IS 'args: topology_name, schema_name, table_name, column_name, feature_type, child_layer - Adds a topogeometry column to an existing table, registers this new column as a layer in topology.layer and returns the new layer_id.'; + +COMMENT ON FUNCTION topology.DropTopology(varchar ) IS 'args: topology_schema_name - Use with caution: Drops a topology schema and deletes its reference from topology.topology table and references to tables in that schema from the geometry_columns table.'; + +COMMENT ON FUNCTION topology.DropTopoGeometryColumn(varchar , varchar , varchar ) IS 'args: schema_name, table_name, column_name - Drops the topogeometry column from the table named table_name in schema schema_name and unregisters the columns from topology.layer table.'; + +COMMENT ON FUNCTION topology.TopologySummary(varchar ) IS 'args: topology_schema_name - Takes a topology name and provides summary totals of types of objects in topology'; + +COMMENT ON FUNCTION topology.ValidateTopology(varchar ) IS 'args: topology_schema_name - Returns a set of validatetopology_returntype objects detailing issues with topology'; + +COMMENT ON FUNCTION topology.CreateTopology(varchar ) IS 'args: topology_schema_name - Creates a new topology schema and registers this new schema in the topology.topology table.'; + +COMMENT ON FUNCTION topology.CreateTopology(varchar , integer ) IS 'args: topology_schema_name, srid - Creates a new topology schema and registers this new schema in the topology.topology table.'; + +COMMENT ON FUNCTION topology.CreateTopology(varchar , integer , double precision ) IS 'args: topology_schema_name, srid, tolerance - Creates a new topology schema and registers this new schema in the topology.topology table.'; + +COMMENT ON FUNCTION topology.CreateTopology(varchar , integer , double precision , boolean ) IS 'args: topology_schema_name, srid, tolerance, hasz - Creates a new topology schema and registers this new schema in the topology.topology table.'; + +COMMENT ON FUNCTION topology.CopyTopology(varchar , varchar ) IS 'args: existing_topology_name, new_name - Makes a copy of a topology structure (nodes, edges, faces, layers and TopoGeometries).'; + +COMMENT ON FUNCTION topology.ST_InitTopoGeo(varchar ) IS 'args: topology_schema_name - Creates a new topology schema and registers this new schema in the topology.topology table and details summary of process.'; + +COMMENT ON FUNCTION topology.ST_CreateTopoGeo(varchar , geometry ) IS 'args: atopology, acollection - Adds a collection of geometries to a given empty topology and returns a message detailing success.'; + +COMMENT ON FUNCTION topology.TopoGeo_AddPoint(varchar , geometry , float8 ) IS 'args: toponame, apoint, tolerance - Adds a point to an existing topology using a tolerance and possibly splitting an existing edge.'; + +COMMENT ON FUNCTION topology.TopoGeo_AddLineString(varchar , geometry , float8 ) IS 'args: toponame, aline, tolerance - Adds a linestring to an existing topology using a tolerance and possibly splitting existing edges/faces.'; + +COMMENT ON FUNCTION topology.TopoGeo_AddPolygon(varchar , geometry , float8 ) IS 'args: atopology, aline, atolerance - Adds a polygon to an existing topology using a tolerance and possibly splitting existing edges/faces.'; + +COMMENT ON FUNCTION topology.ST_AddIsoNode(varchar , integer , geometry ) IS 'args: atopology, aface, apoint - Adds an isolated node to a face in a topology and returns the nodeid of the new node. If face is null, the node is still created.'; + +COMMENT ON FUNCTION topology.ST_AddIsoEdge(varchar , integer , integer , geometry ) IS 'args: atopology, anode, anothernode, alinestring - Adds an isolated edge defined by geometry alinestring to a topology connecting two existing isolated nodes anode and anothernode and returns the edge id of the new edge.'; + +COMMENT ON FUNCTION topology.ST_AddEdgeNewFaces(varchar , integer , integer , geometry ) IS 'args: atopology, anode, anothernode, acurve - Add a new edge and, if in doing so it splits a face, delete the original face and replace it with two new faces.'; + +COMMENT ON FUNCTION topology.ST_AddEdgeModFace(varchar , integer , integer , geometry ) IS 'args: atopology, anode, anothernode, acurve - Add a new edge and, if in doing so it splits a face, modify the original face and add a new face.'; + +COMMENT ON FUNCTION topology.ST_RemEdgeNewFace(varchar , integer ) IS 'args: atopology, anedge - Removes an edge and, if the removed edge separated two faces,delete the original faces and replace them with a new face.'; + +COMMENT ON FUNCTION topology.ST_RemEdgeModFace(varchar , integer ) IS 'args: atopology, anedge - Removes an edge and, if the removed edge separated two faces,delete one of the them and modify the other to take the space of both.'; + +COMMENT ON FUNCTION topology.ST_ChangeEdgeGeom(varchar , integer , geometry ) IS 'args: atopology, anedge, acurve - Changes the shape of an edge without affecting the topology structure.'; + +COMMENT ON FUNCTION topology.ST_ModEdgeSplit(varchar , integer , geometry ) IS 'args: atopology, anedge, apoint - Split an edge by creating a new node along an existing edge, modifying the original edge and adding a new edge.'; + +COMMENT ON FUNCTION topology.ST_ModEdgeHeal(varchar , integer , integer ) IS 'args: atopology, anedge, anotheredge - Heal two edges by deleting the node connecting them, modifying the first edgeand deleting the second edge. Returns the id of the deleted node.'; + +COMMENT ON FUNCTION topology.ST_NewEdgeHeal(varchar , integer , integer ) IS 'args: atopology, anedge, anotheredge - Heal two edges by deleting the node connecting them, deleting both edges,and replacing them with an edge whose direction is the same as the firstedge provided.'; + +COMMENT ON FUNCTION topology.ST_MoveIsoNode(varchar , integer , geometry ) IS 'args: atopology, anedge, apoint - Moves an isolated node in a topology from one point to another. If new apoint geometry exists as a node an error is thrown. REturns description of move.'; + +COMMENT ON FUNCTION topology.ST_NewEdgesSplit(varchar , integer , geometry ) IS 'args: atopology, anedge, apoint - Split an edge by creating a new node along an existing edge, deleting the original edge and replacing it with two new edges. Returns the id of the new node created that joins the new edges.'; + +COMMENT ON FUNCTION topology.ST_RemoveIsoNode(varchar , integer ) IS 'args: atopology, anode - Removes an isolated node and returns description of action. If the node is not isolated (is start or end of an edge), then an exception is thrown.'; + +COMMENT ON FUNCTION topology.GetEdgeByPoint(varchar , geometry , float8 ) IS 'args: atopology, apoint, tol - Find the edge-id of an edge that intersects a given point'; + +COMMENT ON FUNCTION topology.GetFaceByPoint(varchar , geometry , float8 ) IS 'args: atopology, apoint, tol - Find the face-id of a face that intersects a given point'; + +COMMENT ON FUNCTION topology.GetNodeByPoint(varchar , geometry , float8 ) IS 'args: atopology, point, tol - Find the id of a node at a point location'; + +COMMENT ON FUNCTION topology.GetTopologyID(varchar) IS 'args: toponame - Returns the id of a topology in the topology.topology table given the name of the topology.'; + +COMMENT ON FUNCTION topology.GetTopologyID(varchar) IS 'args: toponame - Returns the SRID of a topology in the topology.topology table given the name of the topology.'; + +COMMENT ON FUNCTION topology.GetTopologyName(integer) IS 'args: topology_id - Returns the name of a topology (schema) given the id of the topology.'; + +COMMENT ON FUNCTION topology.ST_GetFaceEdges(varchar , integer ) IS 'args: atopology, aface - Returns a set of ordered edges that bound aface includes the sequence order.'; + +COMMENT ON FUNCTION topology.ST_GetFaceGeometry(varchar , integer ) IS 'args: atopology, aface - Returns the polygon in the given topology with the specified face id.'; + +COMMENT ON FUNCTION topology.GetRingEdges(varchar , integer , integer ) IS 'args: atopology, aring, max_edges=null - Returns an ordered set of edges forming a ring with the given edge .'; + +COMMENT ON FUNCTION topology.GetNodeEdges(varchar , integer ) IS 'args: atopology, anode - Returns an ordered set of edges incident to the given node.'; + +COMMENT ON FUNCTION topology.Polygonize(varchar ) IS 'args: toponame - Find and register all faces defined by topology edges'; + +COMMENT ON FUNCTION topology.AddNode(varchar , geometry , boolean , boolean ) IS 'args: toponame, apoint, allowEdgeSplitting=false, computeContainingFace=false - Adds a point node to the node table in the specified topology schema and returns the nodeid of new node. If point already exists as node, the existing nodeid is returned.'; + +COMMENT ON FUNCTION topology.AddEdge(varchar , geometry ) IS 'args: toponame, aline - Adds a linestring edge to the edge table and associated start and end points to the point nodes table of the specified topology schema using the specified linestring geometry and returns the edgeid of the new (or existing) edge.'; + +COMMENT ON FUNCTION topology.AddFace(varchar , geometry , boolean ) IS 'args: toponame, apolygon, force_new=false - Registers a face primitive to a topology and get its identifier.'; + +COMMENT ON FUNCTION topology.CreateTopoGeom(varchar , integer , integer, topoelementarray) IS 'args: toponame, tg_type, layer_id, tg_objs - Creates a new topo geometry object from topo element array - tg_type: 1:[multi]point, 2:[multi]line, 3:[multi]poly, 4:collection'; + +COMMENT ON FUNCTION topology.CreateTopoGeom(varchar , integer , integer) IS 'args: toponame, tg_type, layer_id - Creates a new topo geometry object from topo element array - tg_type: 1:[multi]point, 2:[multi]line, 3:[multi]poly, 4:collection'; + +COMMENT ON FUNCTION topology.toTopoGeom(geometry , varchar , integer, float8) IS 'args: geom, toponame, layer_id, tolerance - Creates a new topo geometry from a simple geometry'; + +COMMENT ON AGGREGATE topology.TopoElementArray_Agg(topoelement) IS 'args: tefield - Returns a topoelementarray for a set of element_id, type arrays (topoelements)'; + +COMMENT ON FUNCTION topology.GetTopoGeomElementArray(varchar , integer , integer) IS 'args: toponame, layer_id, tg_id - Returns a topoelementarray (an array of topoelements) containing the topological elements and type of the given TopoGeometry (primitive elements)'; + +COMMENT ON FUNCTION topology.GetTopoGeomElementArray(topogeometry ) IS 'args: tg - Returns a topoelementarray (an array of topoelements) containing the topological elements and type of the given TopoGeometry (primitive elements)'; + +COMMENT ON FUNCTION topology.GetTopoGeomElements(varchar , integer , integer) IS 'args: toponame, layer_id, tg_id - Returns a set of topoelement objects containing the topological element_id,element_type of the given TopoGeometry (primitive elements)'; + +COMMENT ON FUNCTION topology.GetTopoGeomElements(topogeometry ) IS 'args: tg - Returns a set of topoelement objects containing the topological element_id,element_type of the given TopoGeometry (primitive elements)'; + +COMMENT ON FUNCTION topology.AsGML(topogeometry ) IS 'args: tg - Returns the GML representation of a topogeometry.'; + +COMMENT ON FUNCTION topology.AsGML(topogeometry , text ) IS 'args: tg, nsprefix_in - Returns the GML representation of a topogeometry.'; + +COMMENT ON FUNCTION topology.AsGML(topogeometry , regclass ) IS 'args: tg, visitedTable - Returns the GML representation of a topogeometry.'; + +COMMENT ON FUNCTION topology.AsGML(topogeometry , regclass , text ) IS 'args: tg, visitedTable, nsprefix - Returns the GML representation of a topogeometry.'; + +COMMENT ON FUNCTION topology.AsGML(topogeometry , text , integer , integer ) IS 'args: tg, nsprefix_in, precision, options - Returns the GML representation of a topogeometry.'; + +COMMENT ON FUNCTION topology.AsGML(topogeometry , text , integer , integer , regclass ) IS 'args: tg, nsprefix_in, precision, options, visitedTable - Returns the GML representation of a topogeometry.'; + +COMMENT ON FUNCTION topology.AsGML(topogeometry , text , integer , integer , regclass , text ) IS 'args: tg, nsprefix_in, precision, options, visitedTable, idprefix - Returns the GML representation of a topogeometry.'; + +COMMENT ON FUNCTION topology.AsGML(topogeometry , text , integer , integer , regclass , text , int ) IS 'args: tg, nsprefix_in, precision, options, visitedTable, idprefix, gmlversion - Returns the GML representation of a topogeometry.'; + \ No newline at end of file diff -Nru postgis-1.5.3/doc/using_postgis_app.xml postgis-2.0.1/doc/using_postgis_app.xml --- postgis-1.5.3/doc/using_postgis_app.xml 2011-06-13 11:24:00.000000000 +0000 +++ postgis-2.0.1/doc/using_postgis_app.xml 2012-02-27 22:08:12.000000000 +0000 @@ -1,6 +1,6 @@ - Using PostGIS: Building Applications + Using PostGIS Geometry: Building Applications Using MapServer @@ -242,7 +242,7 @@ the USING UNIQUE clause in your DATA line: - DATA "the_geom FROM geotable USING UNIQUE gid" + DATA "geom FROM geotable USING UNIQUE gid" @@ -259,7 +259,7 @@ a "using srid=4326" clause in your DATA statement. Everything else works exactly the same as with geometry. - DATA "the_geog FROM geogtable USING SRID=4326 USING UNIQUE gid" + DATA "geog FROM geogtable USING SRID=4326 USING UNIQUE gid" @@ -280,15 +280,15 @@ SRID for the table. The USING clause can provide mapserver with these two pieces of information as follows: - DATA "the_geom FROM ( + DATA "geom FROM ( SELECT - table1.the_geom AS the_geom, - table1.oid AS oid, + table1.geom AS geom, + table1.gid AS gid, table2.data AS data FROM table1 LEFT JOIN table2 ON table1.id = table2.id -) AS new_table USING UNIQUE gid USING SRID=-1" +) AS new_table USING UNIQUE gid USING SRID=4326" @@ -342,7 +342,7 @@ CONNECTIONTYPE postgis NAME "roads" CONNECTION "user=theuser password=thepass dbname=thedb host=theserver" - DATA "the_geom from roads" + DATA "geom from roads" STATUS ON TYPE LINE CLASS @@ -363,7 +363,7 @@ CONNECTIONTYPE postgis CONNECTION "user=theuser password=thepass dbname=thedb host=theserver" PROCESSING "CLOSE_CONNECTION=DEFER" - DATA "the_geom from roads" + DATA "geom from roads" MINSCALE 100000 STATUS ON TYPE LINE @@ -376,7 +376,7 @@ CONNECTIONTYPE postgis CONNECTION "user=theuser password=thepass dbname=thedb host=theserver" PROCESSING "CLOSE_CONNECTION=DEFER" - DATA "the_geom from roads" + DATA "geom from roads" MAXSCALE 100000 STATUS ON TYPE LINE @@ -413,10 +413,10 @@ LAYER CONNECTIONTYPE postgis CONNECTION "user=theuser password=thepass dbname=thedb host=theserver" - DATA "the_geom FROM (SELECT roads.oid AS oid, roads.the_geom AS the_geom, + DATA "geom FROM (SELECT roads.gid AS gid, roads.geom AS geom, road_names.name as name FROM roads LEFT JOIN road_names ON roads.road_name_id = road_names.road_name_id) - AS named_roads USING UNIQUE oid USING SRID=-1" + AS named_roads USING UNIQUE gid USING SRID=4326" MAXSCALE 20000 STATUS ON TYPE ANNOTATION @@ -472,7 +472,6 @@ */ ((org.postgresql.PGConnection)conn).addDataType("geometry",Class.forName("org.postgis.PGgeometry")); ((org.postgresql.PGConnection)conn).addDataType("box3d",Class.forName("org.postgis.PGbox3d")); - /* * Create a statement and execute a select query. */ diff -Nru postgis-1.5.3/doc/using_postgis_dataman.xml postgis-2.0.1/doc/using_postgis_dataman.xml --- postgis-1.5.3/doc/using_postgis_dataman.xml 2010-12-26 19:13:46.000000000 +0000 +++ postgis-2.0.1/doc/using_postgis_dataman.xml 2012-04-23 05:48:25.000000000 +0000 @@ -1,6 +1,6 @@ - - Using PostGIS: Data Management and Queries + + Using PostGIS: Data Management and Queries GIS Objects @@ -90,7 +90,7 @@ SRID information. Examples of the text representations (EWKT) of the extended - spatial objects of the features are as follows: + spatial objects of the features are as follows. The * ones are new in this version of PostGIS: @@ -129,8 +129,26 @@ - GEOMETRYCOLLECTIONM(POINTM(2 3 9), LINESTRINGM(2 3 4, 3 4 - 5)) + GEOMETRYCOLLECTIONM( POINTM(2 3 9), LINESTRINGM(2 3 4, 3 4 5) ) + + + + MULTICURVE( (0 0, 5 5), CIRCULARSTRING(4 0, 4 4, 8 4) ) + + + + POLYHEDRALSURFACE( ((0 0 0, 0 0 1, 0 1 1, 0 1 0, 0 0 0)), +((0 0 0, 0 1 0, 1 1 0, 1 0 0, 0 0 0)), ((0 0 0, 1 0 0, 1 0 1, 0 0 1, 0 0 0)), ((1 1 0, 1 1 1, 1 0 1, 1 0 0, 1 1 0)), +((0 1 0, 0 1 1, 1 1 1, 1 1 0, 0 1 0)), ((0 0 1, 1 0 1, 1 1 1, 0 1 1, 0 0 1)) ) + + + + TRIANGLE ((0 0, 0 9, 9 0, 0 0)) + + + + TIN( ((0 0 0, 0 0 1, 0 1 0, 0 0 0)), + ((0 0 0, 0 1 0, 1 1 0, 0 0 0)) ) @@ -260,7 +278,7 @@ One restriction is that it only supports WGS 84 long lat (SRID:4326). It uses a new data type called - geography. I None of the GEOS functions support this new + geography. None of the GEOS functions support this new type. As a workaround one can convert back and forth between geometry and geography types. The new geography type uses the PostgreSQL 8.3+ typmod definition format so that a table with a geography field @@ -298,7 +316,7 @@ - The new geography fields don't get registered in the geometry_columns. They get registered in a new view called + The new geography fields don't get registered in the geometry_columns. They get registered in a new view called geography_columns which is a view against the system catalogs so is always automatically kept up to date without need for an AddGeom... like function. @@ -365,11 +383,11 @@ The new GEOGRAPHY type allows you to store data in longitude/latitude coordinates, but at a cost: there are fewer functions defined on GEOGRAPHY than there are on GEOMETRY; those functions that are defined take more CPU time to execute. The type you choose should be conditioned on the expected working area of the application you are building. Will your data span the globe or a large continental area, or is it local to a state, county or municipality? - If your data is contained in a small area, you might find that choosing an appropriate projection and using GEOMETRY is the best solution, in terms of performance and functionality available. - If your data is global or covers a continental region, you may find that GEOGRAPHY allows you to build a system without having to worry about projection details. - You store your data in longitude/latitude, and use the functions that have been defined on GEOGRAPHY. - If you don't understand projections, and you don't want to learn about them, and you're prepared to accept the limitations in functionality available in GEOGRAPHY, then it might be easier for you to use GEOGRAPHY than GEOMETRY. - Simply load your data up as longitude/latitude and go from there. + If your data is contained in a small area, you might find that choosing an appropriate projection and using GEOMETRY is the best solution, in terms of performance and functionality available. + If your data is global or covers a continental region, you may find that GEOGRAPHY allows you to build a system without having to worry about projection details. + You store your data in longitude/latitude, and use the functions that have been defined on GEOGRAPHY. + If you don't understand projections, and you don't want to learn about them, and you're prepared to accept the limitations in functionality available in GEOGRAPHY, then it might be easier for you to use GEOGRAPHY than GEOMETRY. + Simply load your data up as longitude/latitude and go from there. Refer to for compare between what is supported for Geography vs. Geometry. For a brief listing and description of Geography functions, refer to @@ -577,22 +595,25 @@ - The GEOMETRY_COLUMNS Table + The GEOMETRY_COLUMNS VIEW - The GEOMETRY_COLUMNS table definition is as - follows: + In versions of PostGIS prior to 2.0.0, geometry_columns was a table that could be directly edited, and sometimes got out of synch with the actual definition of the geometry columns. + In PostGIS 2.0.0, GEOMETRY_COLUMNS became a view with the same front-facing structure as prior versions, but reading from database system catalogs + Its structure is as follows: + + \d geometry_columns + View "public.geometry_columns" + Column | Type | Modifiers +-------------------+------------------------+----------- + f_table_catalog | character varying(256) | + f_table_schema | character varying(256) | + f_table_name | character varying(256) | + f_geometry_column | character varying(256) | + coord_dimension | integer | + srid | integer | + type | character varying(30) | - CREATE TABLE geometry_columns ( - f_table_catalog VARRCHAR(256) NOT NULL, - f_table_schema VARCHAR(256) NOT NULL, - f_table_name VARCHAR(256) NOT NULL, - f_geometry_column VARCHAR(256) NOT NULL, - coord_dimension INTEGER NOT NULL, - srid INTEGER NOT NULL, - type VARCHAR(30) NOT NULL -) - - The columns are as follows: + The column meanings have not changed from prior versions and are: @@ -659,19 +680,27 @@ Creating a Spatial Table - Creating a table with spatial data is done in two stages: + Creating a table with spatial data, can be done in one step. As shown in the following example + which creates a roads table with a 2D linestring geometry column in WGS84 long lat + CREATE TABLE ROADS ( ID int4 + , ROAD_NAME varchar(25), geom geometry(LINESTRING,4326) ); + + We can add additional columns using standard ALTER TABLE command as we do in this next example where we add a 3-D linestring. + ALTER TABLE roads ADD COLUMN geom2 geometry(LINESTRINGZ,4326); + + For backwards compability, you can still create a spatial table in two stages using the management functions. Create a normal non-spatial table. - For example: CREATE TABLE ROADS_GEOM ( ID int4, NAME + For example: CREATE TABLE ROADS ( ID int4, ROAD_NAME varchar(25) ) Add a spatial column to the table using the OpenGIS - "AddGeometryColumn" function. + "AddGeometryColumn" function. Refer to for more details. The syntax is: AddGeometryColumn( <schema_name>, @@ -689,9 +718,9 @@ ) Example1: SELECT AddGeometryColumn('public', - 'roads_geom', 'geom', 423, 'LINESTRING', 2) + 'roads', 'geom', 423, 'LINESTRING', 2) - Example2: SELECT AddGeometryColumn( 'roads_geom', + Example2: SELECT AddGeometryColumn( 'roads', 'geom', 423, 'LINESTRING', 2) @@ -708,56 +737,141 @@ SELECT AddGeometryColumn('parks', 'park_geom', 128, 'MULTIPOLYGON', 2 ); Here is another example, using the generic "geometry" type and the - undefined SRID value of -1: + undefined SRID value of 0: CREATE TABLE roads ( road_id INTEGER, road_name VARCHAR ); -SELECT AddGeometryColumn( 'roads', 'roads_geom', -1, 'GEOMETRY', 3 ); +SELECT AddGeometryColumn( 'roads', 'roads_geom', 0, 'GEOMETRY', 3 ); Manually Registering Geometry Columns in geometry_columns The AddGeometryColumn() approach creates a geometry column and also registers the new column in the geometry_columns table. If your software utilizes geometry_columns, then - any geometry columns you need to query by must be registered in this table. Two of the cases - where you want a geometry column to be registered in the geometry_columns table, but you can't use - AddGeometryColumn, is in the case of SQL Views and bulk inserts. For these cases, you must register the column in the - geometry_columns table manually. Below is a simple script to do that. + any geometry columns you need to query by must be registered in this view. + Starting with PoastGIS 2.0, geometry_columns is no longer editable and all geometry columns are autoregistered. + However they may be registered as a generic geometry column if the column was not defined as a specific type during creation. + + Two of the cases + where this may happen, but you can't use + AddGeometryColumn, is in the case of SQL Views and bulk inserts. For these cases, you can correct the registration in the geometry_columns table + by constraining the column. Note in PostGIS 2.0+ if your column is typmod based, the creation process would register it correctly, so no need to do anything. - ---Lets say you have a view created like this + --Lets say you have a view created like this CREATE VIEW public.vwmytablemercator AS - SELECT gid, ST_Transform(the_geom,3395) As the_geom, f_name + SELECT gid, ST_Transform(geom,3395) As geom, f_name FROM public.mytable; + +-- For it to register correctly in PostGIS 2.0+ +-- You need to cast the geometry +-- +DROP VIEW public.vwmytablemercator; +CREATE VIEW public.vwmytablemercator AS + SELECT gid, ST_Transform(geom,3395)::geometry(3395) As geom, f_name + FROM public.mytable; + +-- If you know the geometry type for sure is a 2D POLYGON then you could do +DROP VIEW public.vwmytablemercator; +CREATE VIEW public.vwmytablemercator AS + SELECT gid, ST_Transform(geom,3395)::geometry(Polygon, 3395) As geom, f_name + FROM public.mytable; + --Lets say you created a derivative table by doing a bulk insert +SELECT poi.gid, poi.geom, citybounds.city_name +INTO myschema.my_special_pois +FROM poi INNER JOIN citybounds ON ST_Intersects(citybounds.geom, poi.geom); ---To register this table in AddGeometry columns - do the following -INSERT INTO geometry_columns(f_table_catalog, f_table_schema, f_table_name, f_geometry_column, coord_dimension, srid, "type") -SELECT '', 'public', 'vwmytablemercator', 'the_geom', ST_CoordDim(the_geom), ST_SRID(the_geom), GeometryType(the_geom) -FROM public.vwmytablemercator LIMIT 1; - - - - ---Lets say you created a derivative table by doing a bulk insert -SELECT poi.gid, poi.the_geom, citybounds.city_name -INTO myschema.myspecialpois -FROM poi INNER JOIN citybounds ON ST_Intersects(citybounds.the_geom, poi.the_geom); - ---Create index on new table +--Create 2d index on new table CREATE INDEX idx_myschema_myspecialpois_geom_gist - ON myschema.myspecialpois USING gist(the_geom); + ON myschema.my_special_pois USING gist(geom); + +-- If your points are 3D points or 3M points, +-- then you might want to create an nd index instead of a 2d index +-- like so +CREATE INDEX my_special_pois_geom_gist_nd + ON my_special_pois USING gist(geom gist_geometry_ops_nd); --To manually register this new table's geometry column in geometry_columns --- we do the same thing as with view -INSERT INTO geometry_columns(f_table_catalog, f_table_schema, f_table_name, f_geometry_column, coord_dimension, srid, "type") -SELECT '', 'myschema', 'myspecialpois', 'the_geom', ST_CoordDim(the_geom), ST_SRID(the_geom), GeometryType(the_geom) -FROM public.myschema.myspecialpois LIMIT 1; - - - - +-- Note that this approach will work for both PostGIS 2.0+ and PostGIS 1.4+ +-- For PostGIS 2.0 it will also change the underlying structure of the table to +-- to make the column typmod based. +-- For PostGIS prior to 2.0, this technique can also be used to register views +SELECT populate_geometry_columns('myschema.my_special_pois'::regclass); + +--If you are using PostGIS 2.0 and for whatever reason, you +-- you need the old constraint based definition behavior +-- (such as case of inherited tables where all children do not have the same type and srid) +-- set new optional use_typmod argument to false +SELECT populate_geometry_columns('myschema.my_special_pois'::regclass, false); + +Although the old-constraint based method is still supported, a constraint-based geomentry column used directly +in a view, will not register correctly in geometry_columns, as will a typmod one. +In this example we define a column using typmod and another using constraints. +CREATE TABLE pois_ny(gid SERIAL PRIMARY KEY + , poi_name text, cat varchar(20) + , geom geometry(POINT,4326) ); +SELECT AddGeometryColumn('pois_ny', 'geom_2160', 2160, 'POINT', 2, false); +If we run in psql +\d pois_ny; +We observe they are defined differently -- one is typmod, one is constraint + Table "public.pois_ny" + Column | Type | Modifiers + +-----------+-----------------------+------------------------------------------------------ + gid | integer | not null default nextval('pois_ny_gid_seq'::regclass) + poi_name | text | + cat | character varying(20) | + geom | geometry(Point,4326) | + geom_2160 | geometry | +Indexes: + "pois_ny_pkey" PRIMARY KEY, btree (gid) +Check constraints: + "enforce_dims_geom_2160" CHECK (st_ndims(geom_2160) = 2) + "enforce_geotype_geom_2160" CHECK (geometrytype(geom_2160) = 'POINT'::text + OR geom_2160 IS NULL) + "enforce_srid_geom_2160" CHECK (st_srid(geom_2160) = 2160) +In geometry_columns, they both register correctly +SELECT f_table_name, f_geometry_column, srid, type + FROM geometry_columns + WHERE f_table_name = 'pois_ny'; +f_table_name | f_geometry_column | srid | type +-------------+-------------------+------+------- +pois_ny | geom | 4326 | POINT +pois_ny | geom_2160 | 2160 | POINT +However -- if we were to create a view like this +CREATE VIEW vw_pois_ny_parks AS +SELECT * + FROM pois_ny + WHERE cat='park'; + +SELECT f_table_name, f_geometry_column, srid, type + FROM geometry_columns + WHERE f_table_name = 'vw_pois_ny_parks'; +The typmod based geom view column registers correctly, +but the constraint based one does not. + f_table_name | f_geometry_column | srid | type +------------------+-------------------+------+---------- + vw_pois_ny_parks | geom | 4326 | POINT + vw_pois_ny_parks | geom_2160 | 0 | GEOMETRY + +This may change in future versions of PostGIS, but for now +To force the constraint based view column to register correctly, we need to do this: +DROP VIEW vw_pois_ny_parks; +CREATE VIEW vw_pois_ny_parks AS +SELECT gid, poi_name, cat + , geom + , geom_2160::geometry(POINT,2160) As geom_2160 + FROM pois_ny + WHERE cat='park'; +SELECT f_table_name, f_geometry_column, srid, type + FROM geometry_columns + WHERE f_table_name = 'vw_pois_ny_parks'; + f_table_name | f_geometry_column | srid | type +------------------+-------------------+------+------- + vw_pois_ny_parks | geom | 4326 | POINT + vw_pois_ny_parks | geom_2160 | 2160 | POINT + Ensuring OpenGIS compliancy of geometries @@ -765,7 +879,7 @@ PostGIS is compliant with the Open Geospatial Consortium’s (OGC) OpenGIS Specifications. As such, many PostGIS methods require, or more accurately, assume that geometries that are operated on are both simple - and valid. for example, it does not make sense to calculate the area of + and valid. For example, it does not make sense to calculate the area of a polygon that has a hole defined outside of the polygon, or to construct a polygon from a non-simple boundary line. @@ -1025,6 +1139,16 @@ + + + + + + + + + + @@ -1033,7 +1157,8 @@ (n) and (o) are not valid - MULTIPOLYGONs. + MULTIPOLYGONs. + (p), however, is valid. @@ -1048,11 +1173,10 @@ -- Typically, it doesn't make sense to check -- for validity on linear features since it will always return TRUE. -- But in this example, PostGIS extends the definition of the OGC IsValid --- by returning false if a LinearRing (start and end points are the same) --- has less than 2 vertices. +-- by returning false if a LineString has less than 2 *distinct* vertices. gisdb=# SELECT ST_IsValid('LINESTRING(0 0, 1 1)'), - ST_IsValid('LINESTRING(0 0, 0 0)'); + ST_IsValid('LINESTRING(0 0, 0 0, 0 0)'); st_isvalid | st_isvalid ------------+----------- @@ -1245,8 +1369,7 @@ Interior - + dim( I(a) @@ -1259,8 +1382,7 @@ - + dim( I(a) @@ -1273,8 +1395,7 @@ - + dim( I(a) @@ -1291,8 +1412,7 @@ Boundary - + dim( B(a) @@ -1305,8 +1425,7 @@ - + dim( B(a) @@ -1319,8 +1438,7 @@ - + dim( B(a) @@ -1337,8 +1455,7 @@ Exterior - + dim( E(a) @@ -1351,8 +1468,7 @@ - + dim( E(a) @@ -1365,8 +1481,7 @@ - + dim( E(a) @@ -1568,9 +1683,8 @@ Extended Nine-Intersection Model (DE-9IM) by Christian Strobl - GeoTools: Dimensionally Extended Nine-Intersection Matrix + GeoTools: Point Set Theory and the DE-9IM Matrix - Encyclopedia of GIS By Hui Xiong @@ -1708,10 +1822,14 @@ - -s <SRID> + -s [<FROM_SRID%gt;:]<SRID> Creates and populates the geometry tables with the specified SRID. + Optionally specifies that the input shapefile uses the given + FROM_SRID, in which case the geometries will be reprojected to the + target SRID. + FROM_SRID cannot be specified with -D. @@ -1744,13 +1862,50 @@ + + -S + + + Generate simple geometries instead of MULTI geometries. Will only succeed if + all the geometries are actually single (I.E. a MULTIPOLYGON with a single shell, or + or a MULTIPOINT with a single vertex). + + + + + + -t <dimensionality> + + + Force the output geometry to have the specified dimensionality. Use the following + strings to indicate the dimensionality: 2D, 3DZ, 3DM, 4D. + + + If the input has fewer dimensions that specified, the output will have those dimensions filled + in with zeroes. If the input has more dimensions that specified, the unwanted dimensions will + be stripped. + + + -w - Output WKT format, for use with older (0.x) versions of PostGIS. Note that this will - introduce coordinate drifts and will drop M values from shapefiles. + Output WKT format, instead of WKB. Note that this can + introduce coordinate drifts due to loss of precision. + + + + + + -e + + + Execute each statement on its own, without using a transaction. + This allows loading of the majority of good data when there are some bad + geometries that generate errors. Note that this cannot be used with the + -D flag as the "dump" format always uses a transaction. @@ -1793,6 +1948,25 @@ + + -T <tablespace> + + + Specify the tablespace for the new table. Indexes will still use the + default tablespace unless the -X parameter is also used. The PostgreSQL + documentation has a good description on when to use custom tablespaces. + + + + + -X <tablespace> + + + Specify the tablespace for the new table's indexes. This applies to + the primary key index, and the GIST spatial index if -I is also used. + + + @@ -1822,9 +1996,10 @@ Using SQL - The most straightforward means of pulling data out of the database - is to use a SQL select query and dump the resulting columns into a - parsable text file: + The most straightforward means of pulling data out of the + database is to use a SQL select query to reduce the number of RECORDS and COLUMNS returned + and dump the resulting columns + into a parsable text file: db=# SELECT road_id, ST_AsText(road_geom) AS geom, road_name FROM roads; @@ -1856,10 +2031,10 @@ - ~= + ST_OrderingEquals - This operators tests whether two geometries are + This tests whether two geometries are geometrically identical. For example, if 'POLYGON((0 0,1 1,1 0,0 0))' is the same as 'POLYGON((0 0,1 1,1 0,0 0))' (it is). @@ -1878,11 +2053,12 @@ Next, you can use these operators in queries. Note that when specifying geometries and boxes on the SQL command line, you must explicitly turn the string representations into geometries by using the - "GeomFromText()" function. So, for example: + "ST_GeomFromText()" function. The 312 is a fictitious spatial reference system that matches our data. + So, for example: SELECT road_id, road_name FROM roads - WHERE roads_geom ~= ST_GeomFromText('LINESTRING(191232 243118,191108 243242)',-1); + WHERE ST_OrderingEquals(roads_geom , ST_GeomFromText('LINESTRING(191232 243118,191108 243242)',312) ) ;The above query would return the single record from the "ROADS_GEOM" table in which the geometry was equal to that value. @@ -1894,7 +2070,7 @@ SELECT road_id, road_name FROM roads -WHERE roads_geom && ST_GeomFromText('POLYGON((...))',-1); +WHERE roads_geom && ST_GeomFromText('POLYGON((...))',312);The above query will use the bounding box of the polygon for comparison purposes. @@ -1907,10 +2083,9 @@ SELECT ST_AsText(roads_geom) AS geom FROM roads WHERE - roads_geom && SetSRID('BOX3D(191232 243117,191232 243119)'::box3d,-1); + roads_geom && ST_MakeEnvelope(191232, 243117,191232, 243119,312); - Note the use of the SRID, to specify the projection of the BOX3D. - The value -1 is used to indicate no specified SRID. + Note the use of the SRID 312, to specify the projection of the envelope. @@ -2005,6 +2180,18 @@ from postgis-1.0.0+, dimensions are fully encoded. + + + -m filename + + Remap identifiers to ten character names. + The content of the file is lines of two symbols separated by + a single white space and no trailing or leading space: + VERYLONGSYMBOL SHORTONE + ANOTHERVERYLONGSYMBOL SHORTER + etc. + + @@ -2044,7 +2231,7 @@ - + GiST Indexes GiST stands for "Generalized Search Tree" and is a generic form of @@ -2061,6 +2248,8 @@ follows: CREATE INDEX [indexname] ON [tablename] USING GIST ( [geometryfield] ); + The above syntax will always build a 2D-index. To get the an n-dimensional index supported in PostGIS 2.0+ for the geometry type, you can create one using this syntax + CREATE INDEX [indexname] ON [tablename] USING GIST ([geometryfield] gist_geometry_ops_nd); Building a spatial index is a computationally intensive exercise: on tables of around 1 million rows, on a 300MHz Solaris machine, we have @@ -2068,7 +2257,7 @@ it is important to force PostgreSQL to collect table statistics, which are used to optimize query plans: - VACUUM ANALYZE [table_name] [column_name]; + VACUUM ANALYZE [table_name] [(column_name)]; -- This is only needed for PostgreSQL 7.4 installations and below SELECT UPDATE_GEOMETRY_STATS([table_name], [column_name]); @@ -2147,7 +2336,14 @@ functionality is performing queries inside the database which would ordinarily require desktop GIS functionality. Using PostGIS effectively requires knowing what spatial functions are available, and ensuring that - appropriate indexes are in place to provide good performance. + appropriate indexes are in place to provide good performance. The SRID of 312 used in these + examples is purely for demonstration. You should be using a REAL SRID listed in the the spatial_ref_sys table + and one that matches the projection of your data. If your data has no spatial reference system + specified, you should be THINKING very thoughtfully why it doesn't and maybe it should. + If your reason is because you are modeling something that doesn't have a geographic spatial reference system defined such as the internals of a molecule + or a good location + on Mars to transport the human race in the event of a nuclear holocaust, + then simply leave out the SRID or make one up and insert it in the spatial_ref_sys table. Taking Advantage of Indexes @@ -2155,13 +2351,13 @@ When constructing a query it is important to remember that only the bounding-box-based operators such as && can take advantage of the GiST spatial index. Functions such as - distance() cannot use the index to optimize their + ST_Distance() cannot use the index to optimize their operation. For example, the following query would be quite slow on a large table: SELECT the_geom FROM geom_table -WHERE ST_Distance(the_geom, ST_GeomFromText('POINT(100000 200000)', -1)) < 100 +WHERE ST_Distance(the_geom, ST_GeomFromText('POINT(100000 200000)', 312)) < 100 This query is selecting all the geometries in geom_table which are within 100 units of the point (100000, 200000). It will be slow because @@ -2172,15 +2368,14 @@ SELECT the_geom FROM geom_table -WHERE the_geom && 'BOX3D(90900 190900, 100100 200100)'::box3d - AND -ST_Distance(the_geom, ST_GeomFromText('POINT(100000 200000)', -1)) < 100 +WHERE ST_DWithin(the_geom, ST_MakeEnvelope(90900, 190900, 100100, 200100,312), 100) + This query selects the same geometries, but it does it in a more efficient way. Assuming there is a GiST index on the_geom, the query planner will recognize that it can use the index to reduce the number of - rows before calculating the result of the distance() - function. Notice that the BOX3D geometry which is + rows before calculating the result of the ST_distance() + function. Notice that the ST_MakeEnvelope geometry which is used in the && operation is a 200 unit square box centered on the original point - this is our "query box". The && operator uses the index to quickly reduce the result set down to only those diff -Nru postgis-1.5.3/doc/using_raster_dataman.xml postgis-2.0.1/doc/using_raster_dataman.xml --- postgis-1.5.3/doc/using_raster_dataman.xml 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/using_raster_dataman.xml 2012-06-10 06:26:30.000000000 +0000 @@ -0,0 +1,754 @@ + + + Raster Data Management, Queries, and Applications + + Loading and Creating Rasters + For most use cases, you will create PostGIS rasters by loading existing raster files using the packaged raster2pgsql raster loader. + + + Using raster2pgsql to load rasters + + The raster2pgsql is a raster loader executable that loads GDAL supported raster formats into sql suitable for loading into a PostGIS raster table. + It is capable of loading folders of raster files as well as creating overviews of rasters. + Since the raster2pgsql is compiled as part of PostGIS most often (unless you compile your own GDAL library), the raster types supported + by the executable will be the same as those compiled in the GDAL dependency library. To get a list of raster types your particular raster2pgsql supports use the -G switch. These should be the same as those provided by your PostGIS install documented here if you are using the same gdal library for both. + + The older version of this tool was a python script. The executable has replaced the python script. If you still find the need for the Python script + Examples of the python one can be found at GDAL PostGIS Raster Driver Usage. + Please note that the raster2pgsql python script may not work with future versions of PostGIS raster and is no longer supported. + + + + When creating overviews of a specific factor from a set of rasters that are aligned, it is possible for the overviews to not align. Visit http://trac.osgeo.org/postgis/ticket/1764 for an example where the overviews do not align. + + + EXAMPLE USAGE: + raster2pgsql raster_options_go_here raster_file someschema.sometable > out.sql + + + + -? + + + Display help screen. Help will also display if you don't pass in any arguments. + + + + + + -G + + + Print the supported raster formats. + + + + + + (c|a|d) These are mutually exclusive options: + + + + + -c + + + Create new table and populate it with raster(s), this is the default mode + + + + + + -a + + + Append raster(s) to an existing table. + + + + + + -d + + + Drop table, create new one and populate it with raster(s) + + + + + + + + + + Raster processing: Applying constraints for proper registering in raster catalogs + + + + + -C + + + Apply raster constraints -- srid, pixelsize etc. to ensure raster is properly registered in raster_columns view. + + + + + -x + + + Disable setting the max extent constraint. Only applied if -C flag is also used. + + + + + -r + + + Set the regular blocking constraint. Only applied if -C flag is also used. + + + + + + + + + + Raster processing: Optional parameters used to manipulate input raster dataset + + + + + -s <SRID> + + + Assign output raster with specified SRID. + + + + + + -b BAND + + + Index (1-based) of band to extract from raster. For more than one band index, separate with comma (,). If unspecified, + all bands of raster will be extracted. + + + + + + -t TILE_SIZE + + + Cut raster into tiles to be inserted one per table row. TILE_SIZE is expressed as WIDTHxHEIGHT. + + + + + + -R, --register + + Register the raster as a filesystem (out-db) raster. + Only the metadata of the raster and path location to the raster is stored in the database (not the pixels). + + + + + -l OVERVIEW_FACTOR + -l overview factor Create overview of the raster. For more than + one factor, separate with comma(,). Overview table name follows + the pattern o_overview factor_table. Created overview is + stored in the database and is not affected by -R. Note that your generated sql file will contain both the main table and overview tables. + + + + + + + + + Optional parameters used to manipulate database objects + + + + + -q + + Wrap PostgreSQL identifiers in quotes + + + + + -f COLUMN + + Specify name of destination raster column, default is 'rast' + + + + + + -F + + Add a column with the name of the file + + + + + -I + + + Create a GiST index on the raster column. + + + + + + -M + + + Vacuum analyze the raster table. + + + + + + -T tablespace + + + Specify the tablespace for the new table. + Note that indices (including the primary key) will still use + the default tablespace unless the -X flag is also used. + + + + + + -Y + + + Use copy statements instead of insert statements. + + + + + + + + + + -e + Execute each statement individually, do not use a transaction. + + + + -E ENDIAN + Control endianness of generated binary output of raster; specify 0 for XDR and 1 for NDR (default); only NDR output is supported now + + + + -V version + Specify version of output format. Default is 0. Only 0 is supported at this time. + + + An example session using the loader to create an input file and uploading it chunked in 100x100 tiles might look like this: + You can leave the schema name out e.g demelevation instead of public.demelevation and + the raster table will be created in the default schema of the database or user + raster2pgsql -s 4236 -I -C -M *.tif -F -t 100x100 public.demelevation > elev.sql +psql -d gisdb -f elev.sql + + A conversion and upload can be done all in one step using UNIX pipes: + + raster2pgsql -s 4236 -I -C -M *.tif -F -t 100x100 public.demelevation | psql -d gisdb + + Load rasters Massachusetts state plane meters aerial tiles + into a schema called aerial and create a full view, 2 and 4 level overview tables, use copy mode for inserting (no intermediary file just straight to db), and -e don't force everything in a transaction (good if you want to see data in tables right away without waiting). Break up the rasters into 128x128 pixel tiles and apply raster constraints. Use copy mode instead of table insert. (-F) Include a field called filename to hold the name of the file the tiles were cut from. + raster2pgsql -I -C -e -Y -F -s 26986 -t 128x128 -l 2,4 bostonaerials2008/*.jpg aerials.boston | psql -U postgres -d gisdb -h localhost -p 5432 + + --get a list of raster types supported: +raster2pgsql -G + +The -G commands outputs a list something like + +Available GDAL raster formats: + Virtual Raster + GeoTIFF + National Imagery Transmission Format + Raster Product Format TOC format + ECRG TOC format + Erdas Imagine Images (.img) + CEOS SAR Image + CEOS Image + JAXA PALSAR Product Reader (Level 1.1/1.5) + Ground-based SAR Applications Testbed File Format (.gff) + ELAS + Arc/Info Binary Grid + Arc/Info ASCII Grid + GRASS ASCII Grid + SDTS Raster + DTED Elevation Raster + Portable Network Graphics + JPEG JFIF + In Memory Raster + Japanese DEM (.mem) + Graphics Interchange Format (.gif) + Graphics Interchange Format (.gif) + Envisat Image Format + Maptech BSB Nautical Charts + X11 PixMap Format + MS Windows Device Independent Bitmap + SPOT DIMAP + AirSAR Polarimetric Image + RadarSat 2 XML Product + PCIDSK Database File + PCRaster Raster File + ILWIS Raster Map + SGI Image File Format 1.0 + SRTMHGT File Format + Leveller heightfield + Terragen heightfield + USGS Astrogeology ISIS cube (Version 3) + USGS Astrogeology ISIS cube (Version 2) + NASA Planetary Data System + EarthWatch .TIL + ERMapper .ers Labelled + NOAA Polar Orbiter Level 1b Data Set + FIT Image + GRIdded Binary (.grb) + Raster Matrix Format + EUMETSAT Archive native (.nat) + Idrisi Raster A.1 + Intergraph Raster + Golden Software ASCII Grid (.grd) + Golden Software Binary Grid (.grd) + Golden Software 7 Binary Grid (.grd) + COSAR Annotated Binary Matrix (TerraSAR-X) + TerraSAR-X Product + DRDC COASP SAR Processor Raster + R Object Data Store + Portable Pixmap Format (netpbm) + USGS DOQ (Old Style) + USGS DOQ (New Style) + ENVI .hdr Labelled + ESRI .hdr Labelled + Generic Binary (.hdr Labelled) + PCI .aux Labelled + Vexcel MFF Raster + Vexcel MFF2 (HKV) Raster + Fuji BAS Scanner Image + GSC Geogrid + EOSAT FAST Format + VTP .bt (Binary Terrain) 1.3 Format + Erdas .LAN/.GIS + Convair PolGASP + Image Data and Analysis + NLAPS Data Format + Erdas Imagine Raw + DIPEx + FARSITE v.4 Landscape File (.lcp) + NOAA Vertical Datum .GTX + NADCON .los/.las Datum Grid Shift + NTv2 Datum Grid Shift + ACE2 + Snow Data Assimilation System + Swedish Grid RIK (.rik) + USGS Optional ASCII DEM (and CDED) + GeoSoft Grid Exchange Format + Northwood Numeric Grid Format .grd/.tab + Northwood Classified Grid Format .grc/.tab + ARC Digitized Raster Graphics + Standard Raster Product (ASRP/USRP) + Magellan topo (.blx) + SAGA GIS Binary Grid (.sdat) + Kml Super Overlay + ASCII Gridded XYZ + HF2/HFZ heightfield raster + OziExplorer Image File + USGS LULC Composite Theme Grid + Arc/Info Export E00 GRID + ZMap Plus Grid + NOAA NGS Geoid Height Grids + + + Creating rasters using PostGIS raster functions + On many occasions, you'll want to create rasters and raster tables right in the database. There are a plethora of functions to do that. The general steps to follow. + + Create a table with a raster column to hold the new raster records which can be accomplished with: + CREATE TABLE myrasters(rid serial primary key, rast raster); + + + There are many functions to help with that goal. If you are creating rasters not as a derivative of other rasters, you will want to start with: + , followed by + You can also create rasters from geometries. To achieve that you'll want to use perhaps accompanied with + other functions such as or or any of the family of other map algebra functions. + There are even many more options for creating new raster tables from existing tables. For example you can create a raster table in a different projection from an existing one using + + Once you are done populating your table initially, you'll want to create a spatial index on the raster column with something like: + CREATE INDEX myrasters_rast_st_convexhull_idx ON myrasters USING gist( ST_ConvexHull(rast) ); + Note the use of since most raster operators are based on the convex hull of the rasters. + Pre-2.0 versions of PostGIS raster were based on the envelop rather than the convex hull. For teh spatial idnexes to work properly you'll need to drop those and replace with convex hull based index. + Apply raster constraints using + + + + + Raster Catalogs + There are two raster catalog views that come packaged with PostGIS. Both views utilize information embedded in the constraints of the raster tables. As a result + the catalog views are always consistent with the raster data in the tables since the constraints are enforced. + + + raster_columns this view catalogs all the raster table columns in your database. + + + raster_overviews this view catalogs all the raster table columns in your database that serve as overviews for a finer grained table. Tables of this type are generated when you use the -l switch during load. + + + + Raster Columns Catalog + The raster_columns is a catalog of all raster table columns in your database that are of type raster. It is a view utilizing the constraints on the tables + so the information is always consistent even if you restore one raster table from a backup of another database. The following columns exist in the raster_columns catalog. + If you created your tables not with the loader or forgot to specify the -C flag during load, you can enforce the constraints after the + fact using so that the raster_columns catalog registers the common information about your raster tiles. + + + + r_table_catalog The database the table is in. This will always read the current database. + + + r_table_schema The database schema the raster table belongs to. + + + r_table_name raster table + + + r_raster_column the column in the r_table_name table that is of type raster. There is nothing in PostGIS preventing you from having multiple raster columns per table so its possible to have a raster table listed multiple times with a different raster column for each. + + + srid The spatial reference identifier of the raster. Should be an entry in the . + + + scale_x The scaling between geometric spatial coordinates and pixel. This is only available if all tiles in the raster column have the same scale_x and this constraint is applied. Refer to for more details. + + + scale_y The scaling between geometric spatial coordinates and pixel. This is only available if all tiles in the raster column have the same scale_y and the scale_y constraint is applied. Refer to for more details. + + + blocksize_x The width (number of pixels across) of each raster tile . Refer to for more details. + + + blocksize_y The width (number of pixels down) of each raster tile . Refer to for more details. + + + same_alignment A boolean that is true if all the raster tiles have the same alignment . Refer to for more details. + + + regular_blocking This is a true/false constraint flag set on the table to denote that the tiles do not overlap, are of the same alignment, pixel size, srid etc. It is not really validated but just taken as a given so should be used for informational. In the future we plan to properly constrain this so that this inforamtion is guaranteed to be right when it returns true + + + num_bands The number of bands in each tile of your raster set. This is the same information as what is provided by + + + pixel_types An array defining the pixel type for each band. You will have the same number of elements in this array as you have number of bands. The pixel_types are one of the following defined in . + + + nodata_values An array of double precision numbers denoting the nodata_value for each band. You will have the same number of elements in this array as you have number of bands. These numbers define the pixel value for each band that should be ignored for most operations. This is similar information provided by . + + + extent This is the extent of all the raster rows in your raster set. If you plan to load more data that will change the extent of the set, you'll want to run the function before load and then reapply constraints with after load. + + + + + Raster Overviews + raster_overviews catalogs information about raster table columns used for overviews and additional information about them that is useful to know when utilizing overviews. Overview tables are cataloged in both raster_columns and raster_overviews because they are rasters in their own right but also serve an additional special purpose of being a lower resolution caricature of a higher resolution table. These are generated along-side the main raster table when you use the -l switch in raster loading. + Overview tables contain the same constraints as other raster tables as well as additional informational only constraints specific to overviews. + The information in raster_overviews does not duplicate the information in raster_columns. If you need the information about an overview table present in raster_columns you can join the raster_overviews and raster_columns together to get the full set of information you need. + Two main reasons for overviews are: + + Low resolution representation of the core tables commonly used for fast mapping zoom-out. + Computations are generally faster to do on them than their higher resolution parents because there are fewer records and each pixel covers more territory. Though the computations are not as accurate as the high-res tables they support, they can be sufficient in many rule-of-thumb computations. + + + The raster_overviews catalog contains the following columns of information. + + + o_table_catalog The database the overview table is in. This will always read the current database. + + + o_table_schema The database schema the overview raster table belongs to. + + + o_table_name raster overview table name + + + o_raster_column the raster column in the overview table. + + + + r_table_catalog The database the raster table that this overview services is in. This will always read the current database. + + + r_table_schema The database schema the raster table that this overview services belongs to. + + + r_table_name raster table that this overview services. + + + r_raster_column the raster column that this overview column services. + + + overview_factor - this is the pyramid level of the overview table. The higher the number the lower the resolution of the table. + raster2pgsql if given a folder of images, will compute overview of each image file and load separately. Level 1 is assumed and always the original file. Level 2 is + will have each tile represent 4 of the original. So for example if you have a folder of 5000x5000 pixel image files that you chose to chunk 125x125, for each image file your base table will + have (5000*5000)/(125*125) records = 1600, your (l=2) o_2 table will have ceiling(1600/Power(2,2)) = 400 rows, your (l=3) o_3 will have ceiling(1600/Power(2,3) ) = 200 rows. + If your pixels aren't divisible by the size of your tiles, you'll get some scrap tiles (tiles not completely filled). Note that each overview tile generated by raster2pgsql has the same number of + pixels as its parent, but is of a lower resolution where each pixel of it represents (Power(2,overview_factor) pixels of the original). + + + + + + + Building Custom Applications with PostGIS Raster + The fact that PostGIS raster provides you with SQL functions to render rasters in known image formats gives you a lot of optoins for rendering them. + For example you can use OpenOffice / LibreOffice for rendering as demonstrated in Rendering PostGIS Raster graphics with LibreOffice Base Reports. In addition you can use a wide variety of languages as demonstrated in this section. + + PHP Example Outputting using ST_AsPNG in concert with other raster functions + In this section, we'll demonstrate how to use the PHP PostgreSQL driver and the family of functions to + output band 1,2,3 of a raster to a PHP request stream that can then be embedded in an img src html tag. + + The sample query demonstrates how to combine a whole bunch of raster functions together to grab all tiles that intersect + a particular wgs 84 bounding box and then unions with the intersecting tiles together returning all bands, transforms to user specified projection using , + and then outputs the results as a png using . + You would call the below using http://mywebserver/test_raster.php?srid=2249 to get the raster image in Massachusetts state plane feet. + +]]> + + + ASP.NET C# Example Outputting using ST_AsPNG in concert with other raster functions + In this section, we'll demonstrate how to use Npgsql PostgreSQL .NET driver and the family of functions to + output band 1,2,3 of a raster to a PHP request stream that can then be embedded in an img src html tag. + + You will need the npgsql .NET PostgreSQL driver for this exercise which you can get the latest of from http://npgsql.projects.postgresql.org/. Just download the latest and drop into your ASP.NET bin folder and you'll be good to go. + The sample query demonstrates how to combine a whole bunch of raster functions together to grab all tiles that intersect + a particular wgs 84 bounding box and then unions with the intersecting tiles together returning all bands, transforms to user specified projection using , + and then outputs the results as a png using . + This is same example as except implemented in C#. + You would call the below using http://mywebserver/TestRaster.ashx?srid=2249 to get the raster image in Massachusetts state plane feet. + -- web.config connection string section -- + + +]]> + // Code for TestRaster.ashx + +using System; +using System.Data; +using System.Web; +using Npgsql; + +public class TestRaster : IHttpHandler +{ + public void ProcessRequest(HttpContext context) + { + + context.Response.ContentType = "image/png"; + context.Response.BinaryWrite(GetResults(context)); + + } + + public bool IsReusable { + get { return false; } + } + + public byte[] GetResults(HttpContext context) + { + byte[] result = null; + NpgsqlCommand command; + string sql = null; + int input_srid = 26986; + try { + using (NpgsqlConnection conn = new NpgsqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["DSN"].ConnectionString)) { + conn.Open(); + + if (context.Request["srid"] != null) + { + input_srid = Convert.ToInt32(context.Request["srid"]); + } + sql = @"SELECT ST_AsPNG( + ST_Transform( + ST_AddBand( + ST_Union(rast,1), ARRAY[ST_Union(rast,2),ST_Union(rast,3)]) + ,:input_srid) ) As new_rast + FROM aerials.boston + WHERE + ST_Intersects(rast, + ST_Transform(ST_MakeEnvelope(-71.1217, 42.227, -71.1210, 42.218,4326),26986) )"; + command = new NpgsqlCommand(sql, conn); + command.Parameters.Add(new NpgsqlParameter("input_srid", input_srid)); + + + result = (byte[]) command.ExecuteScalar(); + conn.Close(); + } + + } + catch (Exception ex) + { + result = null; + context.Response.Write(ex.Message.Trim()); + } + return result; + } +}]]> + + + Java console app that outputs raster query as Image file + This is a simple java console app that takes a query that returns one image and outputs to specified file. + You can download the latest PostgreSQL JDBC drivers from http://jdbc.postgresql.org/download.html + You can compile the following code using a command something like: +set env CLASSPATH .:..\postgresql-9.0-801.jdbc4.jar +javac SaveQueryImage.java +jar cfm SaveQueryImage.jar Manifest.txt *.class +And call it from the command-line with something like +java -jar SaveQueryImage.jar "SELECT ST_AsPNG(ST_AsRaster(ST_Buffer(ST_Point(1,5),10, 'quad_segs=2'),150, 150, '8BUI',100));" "test.png" + -- Manifest.txt -- + + // Code for SaveQueryImage.java + + + + + Use PLPython to dump out images via SQL + This is a plpython stored function that creates a file in the server directory for each record. + //plpython postgresql stored proc. Requires you have plpython installed + +--write out 5 images to the PostgreSQL server in varying sizes +-- note the postgresql daemon account needs to have write access to folder +-- this echos back the file names created; + SELECT write_file(ST_AsPNG( + ST_AsRaster(ST_Buffer(ST_Point(1,5),j*5, 'quad_segs=2'),150*j, 150*j, '8BUI',100)), + 'C:/temp/slices'|| j || '.png') + FROM generate_series(1,5) As j; + + write_file +--------------------- + C:/temp/slices1.png + C:/temp/slices2.png + C:/temp/slices3.png + C:/temp/slices4.png + C:/temp/slices5.png + + + + Outputting Rasters with PSQL + Sadly PSQL doesn't have easy to use built-in functionality for outputting binaries. This is a bit of a hack and based on one of the suggestions outlined in + Clever Trick Challenge -- Outputting bytea with psql that piggy backs on PostgreSQL somewhat legacy large object support. To use first launch your psql commandline connected to your database. + + Unlike the python approach, this approach creates the file on your local computer. + SELECT oid, lowrite(lo_open(oid, 131072), png) As num_bytes + FROM + ( VALUES (lo_create(0), + ST_AsPNG( (SELECT rast FROM aerials.boston WHERE rid=1) ) + ) ) As v(oid,png); +-- you'll get an output something like -- + oid | num_bytes +---------+----------- + 2630819 | 74860 + +-- next note the oid and do this replacing the c:/test.png to file path location +-- on your local computer + \lo_export 2630819 'C:/temp/aerial_samp.png' + +-- this deletes the file from large object storage on db +SELECT lo_unlink(2630819); + + + + diff -Nru postgis-1.5.3/doc/xsl/post_gis_day_cards.html.xsl postgis-2.0.1/doc/xsl/post_gis_day_cards.html.xsl --- postgis-1.5.3/doc/xsl/post_gis_day_cards.html.xsl 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/xsl/post_gis_day_cards.html.xsl 2011-11-17 04:25:51.000000000 +0000 @@ -0,0 +1,160 @@ + + + + + 2.0 + Availability: + Enhanced: + + + Post GIS PostGIS Playing Cards + +

Post GIS ]]> +    http://www.postgis.org +

Celebrate this Post GIS day with these versatile Post GIS day commemorative playing cards. The number of games and fun-filled hours you + can have with these cards is priceless. Here is a small listing of the infinite number of games you can play with Post GIS cards:

+
  • Name that thing In this game you have the descriptions face up and have the opponent guess the name of the function, type, or operator.
  • +
  • What does it do? In this game you have the name of the thing face up and have the opponent describe what the thing does or is for. Your friends and even + strangers you tricked into playing this game will be amazed at your mastery of the 400 some-odd functions PostGIS provides. To be able to exercise all 400 some-odd functions, you need to be running PostGIS 2.0+
  • +
  • Post GIS war game This game requires no knowledge of PostGIS what-so-ever. In this game, you play with the descriptions face up. Even your kids will like this game, and may learn how to use PostGIS better than you. + There are two joker cards -- the "What Is Post GIS?" and "What does Post GIS?". Any player that is dealt either of these cards wins - period. For other cards the order of precedence is: + 1 - Is super and beats anything else except another 1 or joker card. In the event of multiple 1, the one that happens alphabetically first trumps the others. Symbols always trump letters.
    + 2 - Second favorite, alphabetical rules apply (is beaten by a joker, 1)
    + mm - third highest ranking
    + All other cards precedence by alphabetical order.
  • +
  • Post GIS in a language I don't understand To celebrate the ubiquity of PostGIS, you can create Post GIS playing cards in a language + you don't understand. Here is what you do. Go to http://translate.google.com and paste in the URL to this page in the first text box (make sure it is set to English), + in the To: drop down, pick a language you do not know, but preferably you have friends that speak that language and can laugh at your grammar and pronounciation. In no time you'll be able to impress your friends living far far away with your command of their language. + Warning: because of the great number of functions PostGIS has to offer, Google (or any other translator) may refuse to translate all cards leaving you with a mix of some other language and English cards. +
  • +
  • Post GIS in a language I do understand Similar to the I don't understand game, except you pick a non-english language that you do understand. Enjoy many moments of laughter reading machine generated translations that are sorta accurate but often comical. +
  • +
  • The Scotch and Milk moment, the beginning of all brilliant ideas You realize there are 66 pages each of which has 6 cards. You realize you are a grown-up and grown-ups look silly cutting out cards from paper unless if accompanied by a minor. You have a kid staring at you wondering why this day is so special. Eureka Moment + Pour yourself a glass of scotch and the kid a glass of milk and whip out the old scissors, glue, and print outs. + Serving suggestion: It might be a good idea to pour the Scotch in a clear glass so you don't hand out the wrong glass to the kids. + After the second helping, it might be prudent to stay away from the scissors.
  • +
  • Invent your own Post GIS card game. The possiblities are only limited by your imagination.
  • +
+

+

WHAT IS POST GIS?
POSTGIS
+
 
+
WHAT DOES POST GIS?
POSTGIS
+
 
]]> + + ]]> + + + + + + ]]> + + + + + + + + + + + + + + + +
]]>1 ]]> + + 2 ]]> + mm ]]> + G ]]> + g3.3 ]]> + 3d ]]> + +
]]>
+
 
]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + diff -Nru postgis-1.5.3/doc/xsl/postgis_aggs_mm.xml.xsl postgis-2.0.1/doc/xsl/postgis_aggs_mm.xml.xsl --- postgis-1.5.3/doc/xsl/postgis_aggs_mm.xml.xsl 2009-12-30 15:31:27.000000000 +0000 +++ postgis-2.0.1/doc/xsl/postgis_aggs_mm.xml.xsl 2012-03-10 12:51:42.000000000 +0000 @@ -1,457 +1,649 @@ - - - - - - - - - - - - - PostGIS Special Functions Index - - PostGIS Aggregate Functions - The functions given below are spatial aggregate functions provided with PostGIS that can be used just like any other sql aggregate function such as sum, average. - - - - - - - - - - - - - - - - - - - - - - - - - - PostGIS SQL-MM Compliant Functions - The functions given below are PostGIS functions that conform to the SQL/MM 3 standard - - SQL-MM defines the default SRID of all geometry constructors as 0. - PostGIS uses a default SRID of -1. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - PostGIS Geography Support Functions - The functions and operators given below are PostGIS functions/operators that take as input or return as output a geography data type object. - Functions with a (T) are not native geodetic functions, and use a ST_Transform call to and from geometry to do the operation. As a result, they may not behave as expected when going over dateline, poles, - and for large geometries or geometry pairs that cover more than one UTM zone. Basic tranform - (favoring UTM, Lambert Azimuthal (North/South), and falling back on mercator in worst case scenario) - - - - - - - - - - - - - - - - - - - - - - - - - - - PostGIS Geometry Dump Functions - The functions given below are PostGIS functions that take as input or return as output a set of or single geometry_dump data type object. - - - - - - - - - - - - - - - - - - - - - - - - - - - PostGIS Box Functions - The functions given below are PostGIS functions that take as input or return as output the box* family of PostGIS spatial types. - The box family of types consists of box2d, box3d, box3d_extent - - - - - - - - - - - - - - - - - - - - - - - - - - - PostGIS Functions that support 3D - The functions given below are PostGIS functions that do not throw away the Z-Index. - - - - - - - - - - - - - - - - - - - - - - - - - - - - PostGIS Curved Geometry Support Functions - The functions given below are PostGIS functions that can use CIRCULARSTRING, CURVEDPOLYGON, and other curved geometry types - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ]]> - ]]> - ]]> - PostGIS Function Support Matrix - - Below is an alphabetical listing of spatial specific functions in PostGIS and the kinds of spatial - types they work with or OGC/SQL compliance they try to conform to. - - A means the function works with the type or subtype natively. - A means it works but with a transform cast built-in using cast to geometry, transform to a "best srid" spatial ref and then cast back. Results may not be as expected for large areas or areas at poles - and may accumulate floating point junk. - A means the function works with the type because of a auto-cast to another such as to box3d rather than direct type support. - - - - - - - - - - - - -

- - Function - geometry - geography - 3D (2.5D) - Curves - SQL MM - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - New PostGIS Functions - - PostGIS Functions new, behavior changed, or enhanced in 1.5 - The functions given below are PostGIS functions that were introduced or enhanced in this major release. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - PostGIS Functions new, behavior changed, or enhanced in 1.4 - The functions given below are PostGIS functions that were introduced or enhanced in the 1.4 release. - - - - - - - - - - - - - - - - - - - - - - - - - - - PostGIS Functions new in 1.3 - The functions given below are PostGIS functions that were introduced in the 1.3 release. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - args: - - - - - - - , - - - - - - - + + + + + + + + + + + + PostGIS Special Functions Index + + PostGIS Aggregate Functions + The functions given below are spatial aggregate functions provided with PostGIS that can be used just like any other sql aggregate function such as sum, average. + + + + + + + + + + + + + + + + + + + - + + + + + + + + + PostGIS SQL-MM Compliant Functions + The functions given below are PostGIS functions that conform to the SQL/MM 3 standard + + SQL-MM defines the default SRID of all geometry constructors as 0. + PostGIS uses a default SRID of -1. + + + + + + + + + + + + + + + + + + - + + + + + + + + + + PostGIS Geography Support Functions + The functions and operators given below are PostGIS functions/operators that take as input or return as output a geography data type object. + Functions with a (T) are not native geodetic functions, and use a ST_Transform call to and from geometry to do the operation. As a result, they may not behave as expected when going over dateline, poles, + and for large geometries or geometry pairs that cover more than one UTM zone. Basic tranform - (favoring UTM, Lambert Azimuthal (North/South), and falling back on mercator in worst case scenario) + + + + + + + + + + + + + + + + + + - + + + + + + + + PostGIS Raster Support Functions + The functions and operators given below are PostGIS functions/operators that take as input or return as output a data type object. Listed + in alphabetical order. + + + + + + + + + + + + + + + + + + - + + + + + + + + + PostGIS Geometry / Geography / Raster Dump Functions + The functions given below are PostGIS functions that take as input or return as output a set of or single geometry_dump or geomval data type object. + + + + + + + + + + + + + + + + + + - + + + + + + + + PostGIS Box Functions + The functions given below are PostGIS functions that take as input or return as output the box* family of PostGIS spatial types. + The box family of types consists of box2d, and box3d + + + + + + + + + + + + + + + + + + - + + + + + + + + PostGIS Functions that support 3D + The functions given below are PostGIS functions that do not throw away the Z-Index. + + + + + + + + + + + + + + + + + - + + + + + + + + + + PostGIS Curved Geometry Support Functions + The functions given below are PostGIS functions that can use CIRCULARSTRING, CURVEDPOLYGON, and other curved geometry types + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + PostGIS Polyhedral Surface Support Functions + The functions given below are PostGIS functions that can use POLYHEDRALSURFACE, POLYHEDRALSURFACEM geometries + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + ]]> + ]]> + ]]> + PostGIS Function Support Matrix + + Below is an alphabetical listing of spatial specific functions in PostGIS and the kinds of spatial + types they work with or OGC/SQL compliance they try to conform to. + + A means the function works with the type or subtype natively. + A means it works but with a transform cast built-in using cast to geometry, transform to a "best srid" spatial ref and then cast back. Results may not be as expected for large areas or areas at poles + and may accumulate floating point junk. + A means the function works with the type because of a auto-cast to another such as to box3d rather than direct type support. + geom - Basic 2D geometry support (x,y). + geog - Basic 2D geography support (x,y). + 2.5D - basic 2D geometries in 3 D/4D space (has Z or M coord). + PS - Polyhedral surfaces + T - Triangles and Triangulated Irregular Network surfaces (TIN) + + + + + + + + + + + + + + + + + Function + geom + geog + 2.5D + Curves + SQL MM + PS + T + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + New, Enhanced or changed PostGIS Functions + + PostGIS Functions new, behavior changed, or enhanced in 2.0 + The functions given below are PostGIS functions that were added, enhanced, or have breaking changes in 2.0 releases. + New geometry types: TIN and Polyhedral surfaces was introduced in 2.0 + Greatly improved support for Topology. Please refer to for more details. + In PostGIS 2.0, raster type and raster functionality has been integrated. There are way too many new raster functions to list here and all are new so + please refer to for more details of the raster functions available. Earlier pre-2.0 versions had raster_columns/raster_overviews as real tables. These were changed to views before release. Functions such as ST_AddRasterColumn were removed and replaced with , as a result some apps that created raster tables may need changing. + Tiger Geocoder upgraded to work with TIGER 2010 census data and now included in the core PostGIS documentation. A reverse geocoder function was also added. + Please refer to for more details. + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + The functions given below are PostGIS functions that are enhanced in PostGIS 2.0. + + + + + + + + + + + + + + + + + - + + + + + + + + + PostGIS Functions changed behavior in 2.0 + The functions given below are PostGIS functions that have changed behavior in PostGIS 2.0 and may require application changes. + Most deprecated functions have been removed. These are functions that haven't been documented since 1.2 + or some internal functions that were never documented. If you are using a function that you don't see documented, + it's probably deprecated, about to be deprecated, or internal and should be avoided. If you have applications or tools + that rely on deprecated functions, please refer to for more details. + Bounding boxes of geometries have been changed from float4 to double precision (float8). This has an impact + on answers you get using bounding box operators and casting of bounding boxes to geometries. E.g ST_SetSRID(abbox) will + often return a different more accurate answer in PostGIS 2.0+ than it did in prior versions which may very well slightly + change answers to view port queries. + The arguments hasnodata was replaced with exclude_nodata_value which has the same meaning as the older hasnodata but clearer in purpose. + + + + + + + + + + + + + + + + + - + + + + + + + + + PostGIS Functions new, behavior changed, or enhanced in 1.5 + The functions given below are PostGIS functions that were introduced or enhanced in this minor release. + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + PostGIS Functions new, behavior changed, or enhanced in 1.4 + The functions given below are PostGIS functions that were introduced or enhanced in the 1.4 release. + + + + + + + + + + + + + + + + + - + + + + + + + + + PostGIS Functions new in 1.3 + The functions given below are PostGIS functions that were introduced in the 1.3 release. + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + args: + + + + + + + , + + - + + + + diff -Nru postgis-1.5.3/doc/xsl/postgis_cheatsheet.html.xsl postgis-2.0.1/doc/xsl/postgis_cheatsheet.html.xsl --- postgis-1.5.3/doc/xsl/postgis_cheatsheet.html.xsl 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/xsl/postgis_cheatsheet.html.xsl 2012-04-25 22:36:38.000000000 +0000 @@ -0,0 +1,278 @@ + + + + + 2.0 + Availability: + Enhanced: + false + true + http://www.postgis.org/documentation/manual-svn/ + + PostGIS Cheat Sheet + +

PostGIS ]]> ]]> + New in this release 1 Enhanced in this release 2 Requires GEOS 3.3 or higherg3.3  2.5/3D support3d SQL-MMmm  Supports geography G
]]> + + ]]> + ]]> + + + + + ]]> + ]]> + + + + + ]]> + + + + + + + + + +
]]> + + + +

]]> + + + + class="evenrowoddrow" ]]> + +
]]> + + + ]]> + + + + + + + + + + ]]> + + + + + + + + + + + + + + + + + + + + + class="evenrowoddrow"]]> + ]]>
]]>]]> +
+ ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + + + + + + + + + , + + + + + + + diff -Nru postgis-1.5.3/doc/xsl/postgis_comments.sql.xsl postgis-2.0.1/doc/xsl/postgis_comments.sql.xsl --- postgis-1.5.3/doc/xsl/postgis_comments.sql.xsl 2009-11-23 18:07:37.000000000 +0000 +++ postgis-2.0.1/doc/xsl/postgis_comments.sql.xsl 2011-05-30 03:43:09.000000000 +0000 @@ -1,7 +1,7 @@ - + - + COMMENT ON TYPE IS 'postgis type: '; + If its input is a geometry set - we know it is an aggregate function rather than a regular function + Do not output OUT params since they define output rather than act as input and do not put a comma after argument just before an OUT parameter --> COMMENT ON AGGREGATEFUNCTION ( -geometry, +geometry, ) IS ' '; @@ -71,7 +72,7 @@ - + diff -Nru postgis-1.5.3/doc/xsl/postgis_gardentest.sql.xsl postgis-2.0.1/doc/xsl/postgis_gardentest.sql.xsl --- postgis-1.5.3/doc/xsl/postgis_gardentest.sql.xsl 2011-04-17 16:35:58.000000000 +0000 +++ postgis-2.0.1/doc/xsl/postgis_gardentest.sql.xsl 2011-06-26 19:44:47.000000000 +0000 @@ -1,654 +1,711 @@ - - - - - 1.5.3 - AddGeometryColumn DropGeometryColumn DropGeometryTable - AddGeometryColumn DropGeometryColumn DropGeometryTable Populate_Geometry_Columns - - - 3395 - 1 - 3 - 5 - 0.5 - 0.75 - 100 - 1 - 2 - 1 - XDR - 'monkey' - 'quad_segs=1 endcap=square join=mitre mitre_limit=1.1' - 'test' - 'SPHEROID["GRS_1980",6378137,298.257222101]' - 'FF1FF0102' - false - postgis_garden15_log - UPDATE SET log_end = clock_timestamp() - FROM (SELECT logid FROM ORDER BY logid DESC limit 1) As foo - WHERE .logid = foo.logid AND .log_end IS NULL; - - - INSERT INTO _output(logid, log_output) - SELECT logid, query_to_xml(log_sql, false,false,'') As log_output - FROM ORDER BY logid DESC LIMIT 1; - - (SELECT ST_SetSRID(ST_Point(i,j),4326) As the_geom - FROM (SELECT a*1.11111111 FROM generate_series(-10,50,10) As a) As i(i) - CROSS JOIN generate_series(40,70, 15) j - ORDER BY i,j - ) - (SELECT ST_MakeLine(ST_SetSRID(ST_Point(i,j),4326),ST_SetSRID(ST_Point(j,i),4326)) As the_geom - FROM (SELECT a*1.11111111 FROM generate_series(-10,50,10) As a) As i(i) - CROSS JOIN generate_series(40,70, 15) As j - WHERE NOT(i = j) - ORDER BY i, i*j) - (SELECT ST_Buffer(ST_SetSRID(ST_Point(i,j),4326), j*0.05) As the_geom - FROM (SELECT a*1.11111111 FROM generate_series(-10,50,10) As a) As i(i) - CROSS JOIN generate_series(40,70, 20) As j - ORDER BY i, i*j, j) - (SELECT ST_SetSRID(ST_MakePointM(i,j,m),4326) As the_geom - FROM generate_series(-10,50,10) As i - CROSS JOIN generate_series(50,70, 20) AS j - CROSS JOIN generate_series(1,2) As m - ORDER BY i, j, i*j*m) - (SELECT ST_MakeLine(ST_SetSRID(ST_MakePointM(i,j,m),4326),ST_SetSRID(ST_MakePointM(j,i,m),4326)) As the_geom - FROM generate_series(-10,50,10) As i - CROSS JOIN generate_series(50,70, 20) As j - CROSS JOIN generate_series(1,2) As m - WHERE NOT(i = j) - ORDER BY i, j, m, i*j*m) - - (SELECT geom As the_geom -FROM (VALUES ( ST_GeomFromEWKT('SRID=4326;POLYGONM((-71.1319 42.2503 1,-71.132 42.2502 3,-71.1323 42.2504 -2,-71.1322 42.2505 1,-71.1319 42.2503 0))') ), - ( ST_GeomFromEWKT('SRID=4326;POLYGONM((-71.1319 42.2512 0,-71.1318 42.2511 20,-71.1317 42.2511 -20,-71.1317 42.251 5,-71.1317 42.2509 4,-71.132 42.2511 6,-71.1319 42.2512 30))') ) - ) As g(geom)) - - (SELECT ST_SetSRID(ST_MakePoint(i,j,k),4326) As the_geom - FROM generate_series(-10,50,20) As i - CROSS JOIN generate_series(40,70, 20) j - CROSS JOIN generate_series(1,2) k - ORDER BY i,i*j, j*k, i + j + k) - (SELECT ST_SetSRID(ST_MakeLine(ST_MakePoint(i,j,k), ST_MakePoint(i+k,j+k,k)),4326) As the_geom - FROM generate_series(-10,50,20) As i - CROSS JOIN generate_series(40,70, 20) j - CROSS JOIN generate_series(1,2) k - ORDER BY i, j, i+j+k, k, i*j*k) - - (SELECT geom As the_geom -FROM (VALUES ( ST_GeomFromEWKT('SRID=4326;POLYGON((-71.0771 42.3866 1,-71.0767 42.3872 1,-71.0767 42.3863 1,-71.0771 42.3866 1))') ), - ( ST_GeomFromEWKT('SRID=4326;POLYGON((-71.0775 42.386 2,-71.0773 42.3863 1.75,-71.0773 42.3859 1.75,-71.0775 42.386 2))') ) - ) As g(geom)) - - (SELECT geom As the_geom -FROM (VALUES ( ST_GeomFromEWKT('SRID=4326;POLYGON((-71.0771 42.3866 1 2,-71.0767 42.3872 1 2.3,-71.0767 42.3863 1 2.3,-71.0771 42.3866 1 2))') ), - ( ST_GeomFromEWKT('SRID=4326;POLYGON((-71.0775 42.386 2 1.5,-71.0773 42.3863 1.75 1.5,-71.0773 42.3859 1.75 1.5,-71.0775 42.386 2 1.5))') ) - ) As g(geom)) - - - - (SELECT ST_Collect(geom) As the_geom - FROM (VALUES ( ST_GeomFromEWKT('SRID=4326;MULTIPOLYGON(((-71.0821 42.3036 2,-71.0822 42.3036 2,-71.082 42.3038 2,-71.0819 42.3037 2,-71.0821 42.3036 2)))') ), - ( ST_GeomFromEWKT('SRID=4326;POLYGON((-71.1261 42.2703 1,-71.1257 42.2703 1,-71.1257 42.2701 1,-71.126 42.2701 1,-71.1261 42.2702 1,-71.1261 42.2703 1))') ) - ) As g(geom) CROSS JOIN generate_series(1,3) As i - GROUP BY i - ) - - (SELECT ST_Collect(geom) As the_geom - FROM (VALUES ( ST_GeomFromEWKT('SRID=4326;MULTIPOLYGONM(((-71.0821 42.3036 2,-71.0822 42.3036 3,-71.082 42.3038 2,-71.0819 42.3037 2,-71.0821 42.3036 2)))') ), - ( ST_GeomFromEWKT('SRID=4326;POLYGONM((-71.1261 42.2703 1,-71.1257 42.2703 1,-71.1257 42.2701 2,-71.126 42.2701 1,-71.1261 42.2702 1,-71.1261 42.2703 1))') ) - ) As g(geom) CROSS JOIN generate_series(1,3) As i - GROUP BY i - ) - - - (SELECT ST_Collect(s.the_geom) As the_geom - FROM (SELECT ST_SetSRID(ST_Point(i,j),4326) As the_geom - FROM generate_series(-10,50,15) As i - CROSS JOIN generate_series(40,70, 15) j - ) As s) - - (SELECT ST_Collect(s.the_geom) As the_geom - FROM (SELECT ST_MakeLine(ST_SetSRID(ST_Point(i,j),4326),ST_SetSRID(ST_Point(j,i),4326)) As the_geom - FROM generate_series(-10,50,10) As i - CROSS JOIN generate_series(40,70, 15) As j - WHERE NOT(i = j)) As s) - - (SELECT ST_Multi(ST_Union(ST_Buffer(ST_SetSRID(ST_Point(i,j),4326), j*0.05))) As the_geom - FROM generate_series(-10,50,10) As i - CROSS JOIN generate_series(40,70, 25) As j) - - (SELECT ST_Collect(ST_SetSRID(ST_MakePoint(i,j,k),4326)) As the_geom - FROM generate_series(-10,50,20) As i - CROSS JOIN generate_series(40,70, 25) j - CROSS JOIN generate_series(1,3) k - ) - - (SELECT ST_Multi(ST_Union(ST_SetSRID(ST_MakeLine(ST_MakePoint(i,j,k), ST_MakePoint(i+k,j+k,k)),4326))) As the_geom - FROM generate_series(-10,50,20) As i - CROSS JOIN generate_series(40,70, 25) j - CROSS JOIN generate_series(1,2) k - ) - - - (SELECT geom As the_geom -FROM (VALUES ( ST_GeomFromEWKT('SRID=4326;MULTIPOLYGON(((-71.0821 42.3036 2,-71.0822 42.3036 2,-71.082 42.3038 2,-71.0819 42.3037 2,-71.0821 42.3036 2)))') ), - ( ST_GeomFromEWKT('SRID=4326;MULTIPOLYGON(((-71.1261 42.2703 1,-71.1257 42.2703 1,-71.1257 42.2701 1,-71.126 42.2701 1,-71.1261 42.2702 1,-71.1261 42.2703 1)))') ) - ) As g(geom)) - - - (SELECT ST_Collect(s.the_geom) As the_geom - FROM (SELECT ST_SetSRID(ST_MakePointM(i - 0.0821,j + 0.3036,m),4326) As the_geom - FROM generate_series(-71,50,15) As i - CROSS JOIN generate_series(42,70, 25) AS j - CROSS JOIN generate_series(1,2) As m - ) As s) - - (SELECT ST_Collect(s.the_geom) As the_geom - FROM (SELECT ST_MakeLine(ST_SetSRID(ST_MakePointM(i - 0.0821,j + 0.3036,m),4326),ST_SetSRID(ST_MakePointM(j,i,m),4326)) As the_geom - FROM generate_series(-71,50,15) As i - CROSS JOIN generate_series(50,70, 25) As j - CROSS JOIN generate_series(1,2) As m - WHERE NOT(i = j)) As s) - - ( - SELECT ST_GeomFromEWKT('SRID=4326;MULTIPOLYGONM(((0 0 2,10 0 1,10 10 -2,0 10 -5,0 0 -5),(5 5 6,7 5 6,7 7 6,5 7 10,5 5 -2)))') As the_geom - ) - - - (SELECT ST_GeomFromEWKT('SRID=4326;CURVEPOLYGON(CIRCULARSTRING(-71.0821 42.3036, -71.4821 42.3036, -71.7821 42.7036, -71.0821 42.7036, -71.0821 42.3036),(-71.1821 42.4036, -71.3821 42.6036, -71.3821 42.4036, -71.1821 42.4036) ) ') As the_geom) - - (SELECT ST_GeomFromEWKT('SRID=4326;CIRCULARSTRING(-71.0821 42.3036,-71.4821 42.3036,-71.7821 42.7036,-71.0821 42.7036,-71.0821 42.3036)') As the_geom) - (SELECT ST_GeomFromEWKT('SRID=4326;MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-71.0821 42.3036, -71.4821 42.3036, -71.7821 42.7036, -71.0821 42.7036, -71.0821 42.3036),(-71.1821 42.4036, -71.3821 42.6036, -71.3821 42.4036, -71.1821 42.4036) ))') As the_geom) - - (SELECT ST_GeomFromText('GEOMETRYCOLLECTION EMPTY',4326) As the_geom - UNION ALL SELECT ST_GeomFromText('LINESTRING EMPTY',4326) As the_geom - UNION ALL SELECT ST_GeomFromText('POINT EMPTY',4326) As the_geom - ) - - - - - (SELECT CAST(Null As geometry) As the_geom) - (SELECT CAST(Null As geometry) As the_geom FROM generate_series(1,4) As foo) - - - - - - - - - (SELECT ST_LineToCurve(ST_Buffer(ST_SetSRID(ST_Point(i,j),4326), j)) As the_geom - FROM generate_series(-10,50,10) As i - CROSS JOIN generate_series(40,70, 20) As j - ORDER BY i, j, i*j) - (SELECT ST_LineToCurve(ST_Boundary(ST_Buffer(ST_SetSRID(ST_Point(i,j),4326), j))) As the_geom - FROM generate_series(-10,50,10) As i - CROSS JOIN generate_series(40,70, 20) As j - ORDER BY i, j, i*j) - - (SELECT ST_GeomFromText('GEOMETRYCOLLECTION EMPTY',4326) As the_geom - UNION ALL SELECT ST_GeomFromText('POLYGON EMPTY',4326) As the_geom - UNION ALL SELECT ST_GeomFromText('LINESTRING EMPTY',4326) As the_geom - UNION ALL SELECT ST_GeomFromText('POINT EMPTY',4326) As the_geom - ) - - - (SELECT ST_Collect(ST_GeomFromText('GEOMETRYCOLLECTION EMPTY',4326), ST_GeomFromText('POLYGON EMPTY',4326)) As the_geom - UNION ALL SELECT ST_COLLECT(ST_GeomFromText('POLYGON EMPTY',4326),ST_GeomFromText('TRIANGLE EMPTY',4326)) As the_geom - UNION ALL SELECT ST_Collect(ST_GeomFromText('POINT EMPTY',4326), ST_GeomFromText('MULTIPOINT EMPTY',4326)) As the_geom - ) - - - - - - - -DROP TABLE IF EXISTS ; -CREATE TABLE (logid serial PRIMARY KEY, log_label text, spatial_class text, func text, g1 text, g2 text, log_start timestamp, log_end timestamp, log_sql text); -DROP TABLE IF EXISTS _output; -CREATE TABLE _output(logid integer PRIMARY KEY, log_output xml); - - - - - - - - table Test -SELECT ': Start Testing'; -CREATE TABLE pgis_garden (gid serial); - SELECT AddGeometryColumn('pgis_garden','the_geom',ST_SRID(the_geom),GeometryType(the_geom),ST_CoordDim(the_geom)) - FROM () As foo limit 1; - SELECT AddGeometryColumn('pgis_garden','the_geom_multi',ST_SRID(the_geom),GeometryType(ST_Multi(the_geom)),ST_CoordDim(the_geom)) - FROM () As foo limit 1; -INSERT INTO (log_label, func, g1, log_start, log_sql) -VALUES(' AddGeometryColumn','AddGeometryColumn', '', clock_timestamp(), - ''); -BEGIN; - - -COMMIT; - -SELECT ' Geometry index: Start Testing '; -INSERT INTO (log_label, func, g1, log_start) VALUES(' gist index Geometry','CREATE gist index geometry', '', clock_timestamp()); -BEGIN; - CREATE INDEX idx_pgis_geom_gist ON pgis_garden USING gist(the_geom); - -COMMIT; -SELECT ' geometry index: End Testing '; - -INSERT INTO (log_label, func, g1, log_start) -VALUES(' insert data Geometry','insert data', '', clock_timestamp()); - -BEGIN; - INSERT INTO pgis_garden(the_geom, the_geom_multi) - SELECT the_geom, ST_Multi(the_geom) - FROM () As foo; - -COMMIT; - -INSERT INTO (log_label, func, g1, log_start) -VALUES(' UpdateGeometrySRID','UpdateGeometrySRID', '', clock_timestamp()); -BEGIN; - SELECT UpdateGeometrySRID('pgis_garden', 'the_geom', 4269); - -COMMIT; - -INSERT INTO (log_label, func, g1, log_start) -VALUES(' vacuum analyze Geometry','vacuum analyze Geometry', '', clock_timestamp()); -VACUUM ANALYZE pgis_garden; - - -INSERT INTO (log_label, func, g1, log_start) -VALUES(' DropGeometryColumn','DropGeometryColumn', '', clock_timestamp()); - -BEGIN; - SELECT DropGeometryColumn ('pgis_garden','the_geom'); - -COMMIT; -INSERT INTO (log_label, func, g1, log_start) -VALUES(' DropGeometryTable','DropGeometryTable', '', clock_timestamp()); - -BEGIN; - SELECT DropGeometryTable ('pgis_garden'); - -COMMIT; -SELECT ': End Testing '; - - - -SELECT ' Geography: Start Testing '; -INSERT INTO (log_label, func, g1, log_start) VALUES(' Create Table / Add data - Geography','CREATE TABLE geography', '', clock_timestamp()); -BEGIN; - CREATE TABLE pgis_geoggarden (gid serial PRIMARY KEY, the_geog geography(, 4326)); - INSERT INTO pgis_geoggarden(the_geog) - SELECT the_geom - FROM () As foo; - -COMMIT; -SELECT ' Geography: End Testing '; - -SELECT ' Geography index: Start Testing '; -INSERT INTO (log_label, func, g1, log_start) VALUES(' gist index Geography','CREATE gist index geography', '', clock_timestamp()); -BEGIN; - CREATE INDEX idx_pgis_geoggarden_geog_gist ON pgis_geoggarden USING gist(the_geog); - -COMMIT; -SELECT ' Geography index: End Testing '; - - - -INSERT INTO (log_label, func, g1, log_start, log_sql) VALUES(' vacuum analyze Geography','analyze geography table', '', clock_timestamp(), - 'VACUUM ANALYZE pgis_geoggarden;'); -VACUUM ANALYZE pgis_geoggarden; - - -INSERT INTO (log_label, func, g1, log_start) VALUES(' drop Geography table','drop geography table', '', clock_timestamp()); -BEGIN; - SELECT 'BEFORE DROP' As look_at, * FROM geography_columns; - DROP TABLE pgis_geoggarden; - SELECT 'AFTER DROP' As look_at, * FROM geography_columns; - -COMMIT; -SELECT ' Geography: End Testing'; - - - - - - - - - - - - - - - - - - against other types - SELECT ': Start Testing '; - - - - INSERT INTO (log_label, func, g1, g2, log_start, log_sql) - VALUES(' Geography ','', '','', clock_timestamp(), - ' - SELECT ST_AsEWKT(foo1.the_geom) as ewktgeog1, ST_AsEWKT(foo2.the_geom) as ewktgeog2, geography(foo1.the_geom) geography(foo2.the_geom) As geog1_op_geog2 - FROM () As foo1 CROSS JOIN () As foo2 - WHERE (geography(foo1.the_geom) geography(foo2.the_geom)) = true OR - (geography(foo1.the_geom) geography(foo2.the_geom)) = false; -'); - - SELECT 'Geography : Start Testing , '; - BEGIN; - - - COMMIT; - - - SELECT 'Geometry : Start Testing , '; - INSERT INTO (log_label, func, g1, g2, log_start, log_sql) - VALUES(' Geometry ','', '','', clock_timestamp(), - ' - SELECT ST_AsEWKT(foo1.the_geom) as ewktgeom1, ST_AsEWKT(foo2.the_geom) as ewktgeom2, foo1.the_geom foo2.the_geom As geom1_op_geom2 - FROM () As foo1 CROSS JOIN () As foo2 - WHERE (foo1.the_geom foo2.the_geom) = true OR - (foo1.the_geom foo2.the_geom) = false;'); - - BEGIN; - - - COMMIT; - - - - SELECT ' : End Testing against other types'; - - - - - - - - - - - - - - - - - - () - - - - - - - - - - - - - - - - - - - SELECT 'Starting ()'; -INSERT INTO (log_label, func, log_start, log_sql) - VALUES(' ','', clock_timestamp(), - ' - SELECT () As output;'); - -BEGIN; - - -COMMIT; -SELECT 'Ending ()'; - - - - - - SELECT ' : Start Testing'; - - INSERT INTO (log_label, func, g1, log_start, log_sql) - VALUES(' ','', '', clock_timestamp(), - ' - SELECT () As result - FROM () As foo1 - LIMIT 3;'); -BEGIN; - - -COMMIT; - SELECT ' : End Testing'; - - - - - - - - - - -SELECT ' (): Start Testing against other types'; - - - - INSERT INTO (log_label, func, g1, g2, log_start, log_sql) - VALUES(' ','','', '', clock_timestamp(), - ' - SELECT () As result, ST_AsText(foo1.the_geom) As ref1_geom, ST_AsText(foo2.the_geom) As ref2_geom - FROM () As foo1 CROSS JOIN () As foo2 - LIMIT 2;'); - - BEGIN; - - - COMMIT; - - - INSERT INTO (log_label, func, g1, g2, log_start, log_sql) - VALUES(' Other ','', '','', clock_timestamp(), - ' - SELECT ()'); - - SELECT 'Other (): Start Testing , '; - BEGIN; - - - COMMIT; - - - - SELECT '() : End Testing , '; - - - - -SELECT ' (): End Testing against other types'; - - - - - - - UPDATE SET spatial_class = 'geography' WHERE (log_label ILIKE '%geography%' or log_sql ILIKE '%geography%') AND spatial_class IS NULL; - UPDATE SET spatial_class = 'geometry' WHERE log_label ILIKE '%geometry%' or log_label ILIKE '%other%' AND spatial_class IS NULL; - - - - - - - - - - - - - - - - - - - - - - - - - - '' - - - - - - - - - - - - ST_AsGML(foo1.the_geom) - - - ST_AsKML(foo1.the_geom) - - - foo1.the_geom - - - geography(foo1.the_geom) - - - foo2.the_geom - - - geography(foo2.the_geom) - - - ARRAY[foo1.the_geom] - - - ARRAY[foo2.the_geom] - - - ST_AsEWKT(foo1.the_geom) - - - ST_AsText(foo1.the_geom) - - - ST_AsEWKB(foo1.the_geom) - - - ST_AsBinary(foo1.the_geom) - - - - - - - - - - - - - - - - - - - - - '2009-01-01' - - - - - - , - - - - - - - - - - - - - - - - , - - - - - - - - ' - - - - '' - - - - - - - - - - + + + + + 2.0.0 + AddGeometryColumn DropGeometryColumn DropGeometryTable + AddGeometryColumn DropGeometryColumn DropGeometryTable + + + 3395 + 1 + 3 + 5 + 0.5 + 0.75 + 100 + 1 + 2 + 1 + XDR + 'monkey' + 'quad_segs=1 endcap=square join=mitre mitre_limit=1.1' + 'test' + 'SPHEROID["GRS_1980",6378137,298.257222101]' + 'FF1FF0102' + false + postgis_garden_log20 + UPDATE SET log_end = clock_timestamp() + FROM (SELECT logid FROM ORDER BY logid DESC limit 1) As foo + WHERE .logid = foo.logid AND .log_end IS NULL; + + + INSERT INTO _output(logid, log_output) + SELECT logid, query_to_xml(log_sql, false,false,'') As log_output + FROM ORDER BY logid DESC LIMIT 1; + + (SELECT ST_SetSRID(ST_Point(i,j),4326) As the_geom + FROM (SELECT a*1.11111111 FROM generate_series(-10,50,2) As a) As i(i) + CROSS JOIN generate_series(40,70, 5) j + ORDER BY i,j + ) + (SELECT ST_MakeLine(ST_SetSRID(ST_Point(i,j),4326),ST_SetSRID(ST_Point(j,i),4326)) As the_geom + FROM (SELECT a*1.11111111 FROM generate_series(-10,50,10) As a) As i(i) + CROSS JOIN generate_series(40,70, 15) As j + WHERE NOT(i = j) + ORDER BY i, i*j) + (SELECT ST_Buffer(ST_SetSRID(ST_Point(i,j),4326), j*0.05) As the_geom + FROM (SELECT a*1.11111111 FROM generate_series(-10,50,10) As a) As i(i) + CROSS JOIN generate_series(40,70, 20) As j + ORDER BY i, i*j, j) + (SELECT ST_SetSRID(ST_MakePointM(i,j,m),4326) As the_geom + FROM generate_series(-10,50,10) As i + CROSS JOIN generate_series(50,70, 20) AS j + CROSS JOIN generate_series(1,2) As m + ORDER BY i, j, i*j*m) + (SELECT ST_MakeLine(ST_SetSRID(ST_MakePointM(i,j,m),4326),ST_SetSRID(ST_MakePointM(j,i,m),4326)) As the_geom + FROM generate_series(-10,50,10) As i + CROSS JOIN generate_series(50,70, 20) As j + CROSS JOIN generate_series(1,2) As m + WHERE NOT(i = j) + ORDER BY i, j, m, i*j*m) + + (SELECT geom As the_geom +FROM (VALUES ( ST_GeomFromEWKT('SRID=4326;POLYGONM((-71.1319 42.2503 1,-71.132 42.2502 3,-71.1323 42.2504 -2,-71.1322 42.2505 1,-71.1319 42.2503 0))') ), + ( ST_GeomFromEWKT('SRID=4326;POLYGONM((-71.1319 42.2512 0,-71.1318 42.2511 20,-71.1317 42.2511 -20,-71.1317 42.251 5,-71.1317 42.2509 4,-71.132 42.2511 6,-71.1319 42.2512 30))') ) + ) As g(geom)) + + (SELECT ST_SetSRID(ST_MakePoint(i,j,k),4326) As the_geom + FROM generate_series(-10,50,20) As i + CROSS JOIN generate_series(40,70, 20) j + CROSS JOIN generate_series(1,2) k + ORDER BY i,i*j, j*k, i + j + k) + (SELECT ST_SetSRID(ST_MakeLine(ST_MakePoint(i,j,k), ST_MakePoint(i+k,j+k,k)),4326) As the_geom + FROM generate_series(-10,50,20) As i + CROSS JOIN generate_series(40,70, 20) j + CROSS JOIN generate_series(1,2) k + ORDER BY i, j, i+j+k, k, i*j*k) + + (SELECT geom As the_geom +FROM (VALUES ( ST_GeomFromEWKT('SRID=4326;POLYGON((-71.0771 42.3866 1,-71.0767 42.3872 1,-71.0767 42.3863 1,-71.0771 42.3866 1))') ), + ( ST_GeomFromEWKT('SRID=4326;POLYGON((-71.0775 42.386 2,-71.0773 42.3863 1.75,-71.0773 42.3859 1.75,-71.0775 42.386 2))') ) + ) As g(geom)) + + (SELECT geom As the_geom +FROM (VALUES ( ST_GeomFromEWKT('SRID=4326;POLYGON((-71.0771 42.3866 1 2,-71.0767 42.3872 1 2.3,-71.0767 42.3863 1 2.3,-71.0771 42.3866 1 2))') ), + ( ST_GeomFromEWKT('SRID=4326;POLYGON((-71.0775 42.386 2 1.5,-71.0773 42.3863 1.75 1.5,-71.0773 42.3859 1.75 1.5,-71.0775 42.386 2 1.5))') ) + ) As g(geom)) + + (SELECT ST_Translate(the_geom,-72.2, 41.755) As the_geom + FROM (VALUES ( ST_GeomFromEWKT( +'SRID=4326;PolyhedralSurface( +((0 0 0, 0 0 1, 0 1 1, 0 1 0, 0 0 0)), +((0 0 0, 0 1 0, 1 1 0, 1 0 0, 0 0 0)), ((0 0 0, 1 0 0, 1 0 1, 0 0 1, 0 0 0)), ((1 1 0, 1 1 1, 1 0 1, 1 0 0, 1 1 0)), +((0 1 0, 0 1 1, 1 1 1, 1 1 0, 0 1 0)), ((0 0 1, 1 0 1, 1 1 1, 0 1 1, 0 0 1)) +)') ) , +( ST_GeomFromEWKT( +'SRID=4326;PolyhedralSurface( +((0 0 0, 0 0 1, 0 1 1, 0 1 0, 0 0 0)), +((0 0 0, 0 1 0, 1 1 0, 1 0 0, 0 0 0)) )') ) ) +As foo(the_geom) ) + + (SELECT ST_GeomFromEWKT( +'SRID=4326;TRIANGLE (( + -71.0821 42.3036, + -71.0821 42.3936, + -71.0901 42.3036, + -71.0821 42.3036 + ))') As the_geom) + + (SELECT ST_GeomFromEWKT( +'SRID=4326;TIN ((( + -71.0821 42.3036 0, + -71.0821 42.3036 1, + -71.0821 42.3436 0, + -71.0821 42.3036 0 + )), (( + -71.0821 42.3036 0, + -71.0821 42.3436 0, + -71.0831 42.3436 0, + -71.0821 42.3036 0 + )) + )') As the_geom) + + + (SELECT ST_Collect(geom) As the_geom + FROM (VALUES ( ST_GeomFromEWKT('SRID=4326;MULTIPOLYGON(((-71.0821 42.3036 2,-71.0822 42.3036 2,-71.082 42.3038 2,-71.0819 42.3037 2,-71.0821 42.3036 2)))') ), + ( ST_GeomFromEWKT('SRID=4326;POLYGON((-71.1261 42.2703 1,-71.1257 42.2703 1,-71.1257 42.2701 1,-71.126 42.2701 1,-71.1261 42.2702 1,-71.1261 42.2703 1))') ) + ) As g(geom) CROSS JOIN generate_series(1,3) As i + GROUP BY i + ) + + (SELECT ST_Collect(geom) As the_geom + FROM (VALUES ( ST_GeomFromEWKT('SRID=4326;MULTIPOLYGONM(((-71.0821 42.3036 2,-71.0822 42.3036 3,-71.082 42.3038 2,-71.0819 42.3037 2,-71.0821 42.3036 2)))') ), + ( ST_GeomFromEWKT('SRID=4326;POLYGONM((-71.1261 42.2703 1,-71.1257 42.2703 1,-71.1257 42.2701 2,-71.126 42.2701 1,-71.1261 42.2702 1,-71.1261 42.2703 1))') ) + ) As g(geom) CROSS JOIN generate_series(1,3) As i + GROUP BY i + ) + + + (SELECT ST_Collect(s.the_geom) As the_geom + FROM (SELECT ST_SetSRID(ST_Point(i,j),4326) As the_geom + FROM generate_series(-10,50,15) As i + CROSS JOIN generate_series(40,70, 15) j + ) As s) + + (SELECT ST_Collect(s.the_geom) As the_geom + FROM (SELECT ST_MakeLine(ST_SetSRID(ST_Point(i,j),4326),ST_SetSRID(ST_Point(j,i),4326)) As the_geom + FROM generate_series(-10,50,10) As i + CROSS JOIN generate_series(40,70, 15) As j + WHERE NOT(i = j)) As s) + + (SELECT ST_Multi(ST_Union(ST_Buffer(ST_SetSRID(ST_Point(i,j),4326), j*0.05))) As the_geom + FROM generate_series(-10,50,10) As i + CROSS JOIN generate_series(40,70, 25) As j) + + (SELECT ST_Collect(ST_SetSRID(ST_MakePoint(i,j,k),4326)) As the_geom + FROM generate_series(-10,50,20) As i + CROSS JOIN generate_series(40,70, 25) j + CROSS JOIN generate_series(1,3) k + ) + + (SELECT ST_Multi(ST_Union(ST_SetSRID(ST_MakeLine(ST_MakePoint(i,j,k), ST_MakePoint(i+k,j+k,k)),4326))) As the_geom + FROM generate_series(-10,50,20) As i + CROSS JOIN generate_series(40,70, 25) j + CROSS JOIN generate_series(1,2) k + ) + + + (SELECT geom As the_geom +FROM (VALUES ( ST_GeomFromEWKT('SRID=4326;MULTIPOLYGON(((-71.0821 42.3036 2,-71.0822 42.3036 2,-71.082 42.3038 2,-71.0819 42.3037 2,-71.0821 42.3036 2)))') ), + ( ST_GeomFromEWKT('SRID=4326;MULTIPOLYGON(((-71.1261 42.2703 1,-71.1257 42.2703 1,-71.1257 42.2701 1,-71.126 42.2701 1,-71.1261 42.2702 1,-71.1261 42.2703 1)))') ) + ) As g(geom)) + + + (SELECT ST_Collect(s.the_geom) As the_geom + FROM (SELECT ST_SetSRID(ST_MakePointM(i - 0.0821,j + 0.3036,m),4326) As the_geom + FROM generate_series(-71,50,15) As i + CROSS JOIN generate_series(42,70, 25) AS j + CROSS JOIN generate_series(1,2) As m + ) As s) + + (SELECT ST_Collect(s.the_geom) As the_geom + FROM (SELECT ST_MakeLine(ST_SetSRID(ST_MakePointM(i - 0.0821,j + 0.3036,m),4326),ST_SetSRID(ST_MakePointM(j,i,m),4326)) As the_geom + FROM generate_series(-71,50,15) As i + CROSS JOIN generate_series(50,70, 25) As j + CROSS JOIN generate_series(1,2) As m + WHERE NOT(i = j)) As s) + + ( + SELECT ST_GeomFromEWKT('SRID=4326;MULTIPOLYGONM(((0 0 2,10 0 1,10 10 -2,0 10 -5,0 0 -5),(5 5 6,7 5 6,7 7 6,5 7 10,5 5 -2)))') As the_geom + ) + + + (SELECT ST_GeomFromEWKT('SRID=4326;CURVEPOLYGON(CIRCULARSTRING(-71.0821 42.3036, -71.4821 42.3036, -71.7821 42.7036, -71.0821 42.7036, -71.0821 42.3036),(-71.1821 42.4036, -71.3821 42.6036, -71.3821 42.4036, -71.1821 42.4036) ) ') As the_geom) + + (SELECT ST_LineToCurve(ST_Buffer(ST_SetSRID(ST_Point(i,j),4326), j)) As the_geom + FROM generate_series(-10,50,10) As i + CROSS JOIN generate_series(40,70, 20) As j + ORDER BY i, j, i*j) + + + (SELECT ST_GeomFromEWKT('SRID=4326;CIRCULARSTRING(-71.0821 42.3036,-71.4821 42.3036,-71.7821 42.7036,-71.0821 42.7036,-71.0821 42.3036)') As the_geom) + (SELECT ST_GeomFromEWKT('SRID=4326;MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-71.0821 42.3036, -71.4821 42.3036, -71.7821 42.7036, -71.0821 42.7036, -71.0821 42.3036),(-71.1821 42.4036, -71.3821 42.6036, -71.3821 42.4036, -71.1821 42.4036) ))') As the_geom) + + (SELECT ST_GeomFromText('POINT EMPTY',4326) As the_geom + UNION ALL SELECT ST_GeomFromText('MULTIPOINT EMPTY',4326) As the_geom + UNION ALL SELECT ST_GeomFromText('MULTIPOLYGON EMPTY',4326) As the_geom + UNION ALL SELECT ST_GeomFromText('LINESTRING EMPTY',4326) As the_geom + UNION ALL SELECT ST_GeomFromText('MULTILINESTRING EMPTY',4326) As the_geom + ) + + + + + (SELECT ST_GeomFromText('GEOMETRYCOLLECTION EMPTY',4326) As the_geom ) + + + (SELECT CAST(Null As geometry) As the_geom) + (SELECT CAST(Null As geometry) As the_geom FROM generate_series(1,4) As foo) + + + + + + (SELECT ST_LineToCurve(ST_Buffer(ST_SetSRID(ST_Point(i,j),4326), j)) As the_geom + FROM generate_series(-10,50,10) As i + CROSS JOIN generate_series(40,70, 20) As j + ORDER BY i, j, i*j) + (SELECT ST_LineToCurve(ST_Boundary(ST_Buffer(ST_SetSRID(ST_Point(i,j),4326), j))) As the_geom + FROM generate_series(-10,50,10) As i + CROSS JOIN generate_series(40,70, 20) As j + ORDER BY i, j, i*j) + + (SELECT ST_Collect(ST_GeomFromText('GEOMETRYCOLLECTION EMPTY',4326), ST_GeomFromText('POLYGON EMPTY',4326)) As the_geom + UNION ALL SELECT ST_COLLECT(ST_GeomFromText('POLYGON EMPTY',4326),ST_GeomFromText('TRIANGLE EMPTY',4326)) As the_geom + UNION ALL SELECT ST_Collect(ST_GeomFromText('POINT EMPTY',4326), ST_GeomFromText('MULTIPOINT EMPTY',4326)) As the_geom + ) + (SELECT ST_GeomFromText('POLYGON EMPTY',4326) As the_geom) + + + + + + + + + + +DROP TABLE IF EXISTS ; +CREATE TABLE (logid serial PRIMARY KEY, log_label text, spatial_class text, func text, g1 text, g2 text, log_start timestamp, log_end timestamp, log_sql text); +DROP TABLE IF EXISTS _output; +CREATE TABLE _output(logid integer PRIMARY KEY, log_output xml); + + + + + + + + table Test +SELECT ': Start Testing'; +CREATE TABLE pgis_garden (gid serial); + SELECT AddGeometryColumn('pgis_garden','the_geom',ST_SRID(the_geom),GeometryType(the_geom),ST_CoordDim(the_geom)) + FROM () As foo limit 1; + SELECT AddGeometryColumn('pgis_garden','the_geom_multi',ST_SRID(the_geom),GeometryType(ST_Multi(the_geom)),ST_CoordDim(the_geom)) + FROM () As foo limit 1; +INSERT INTO (log_label, func, g1, log_start, log_sql) +VALUES(' AddGeometryColumn','AddGeometryColumn', '', clock_timestamp(), + ''); +BEGIN; + + +COMMIT; + +SELECT ' Geometry index: Start Testing '; +INSERT INTO (log_label, func, g1, log_start) VALUES(' gist index Geometry','CREATE gist index geometry', '', clock_timestamp()); +BEGIN; + CREATE INDEX idx_pgis_geom_gist ON pgis_garden USING gist(the_geom); + +COMMIT; +SELECT ' geometry index: End Testing '; + + +INSERT INTO (log_label, func, g1, log_start, log_sql) +VALUES(' insert data Geometry','insert data', '', clock_timestamp(), ' + INSERT INTO pgis_garden(the_geom, the_geom_multi) + SELECT the_geom, ST_Multi(the_geom) + FROM () As foo;'); + +BEGIN; + INSERT INTO pgis_garden(the_geom, the_geom_multi) + SELECT the_geom, ST_Multi(the_geom) + FROM () As foo; + +COMMIT; + + +SELECT ' Geometry index overlaps: Start Testing '; +INSERT INTO (log_label, func, g1, log_start, log_sql) VALUES(' gist index Geometry overlaps test','Gist index overlap', '', clock_timestamp(), + 'SELECT count(*) As result FROM pgis_garden As foo1 INNER JOIN pgis_garden As foo2 ON foo1.the_geom && foo2.the_geom'); +BEGIN; + + +COMMIT; + +SELECT ' geometry index overlaps: End Testing '; + +INSERT INTO (log_label, func, g1, log_start) +VALUES(' UpdateGeometrySRID','UpdateGeometrySRID', '', clock_timestamp()); +BEGIN; + SELECT UpdateGeometrySRID('pgis_garden', 'the_geom', 4269); + +COMMIT; + +INSERT INTO (log_label, func, g1, log_start) +VALUES(' vacuum analyze Geometry','vacuum analyze Geometry', '', clock_timestamp()); +VACUUM ANALYZE pgis_garden; + + +INSERT INTO (log_label, func, g1, log_start) +VALUES(' DropGeometryColumn','DropGeometryColumn', '', clock_timestamp()); + +BEGIN; + SELECT DropGeometryColumn ('pgis_garden','the_geom'); + +COMMIT; +INSERT INTO (log_label, func, g1, log_start) +VALUES(' DropGeometryTable','DropGeometryTable', '', clock_timestamp()); + +BEGIN; + SELECT DropGeometryTable ('pgis_garden'); + +COMMIT; +SELECT ': End Testing '; + + + +SELECT ' Geography: Start Testing '; +INSERT INTO (log_label, func, g1, log_start) VALUES(' Create Table / Add data - Geography','CREATE TABLE geography', '', clock_timestamp()); +BEGIN; + CREATE TABLE pgis_geoggarden (gid serial PRIMARY KEY, the_geog geography(, 4326)); + INSERT INTO pgis_geoggarden(the_geog) + SELECT the_geom + FROM () As foo; + +COMMIT; +SELECT ' Geography: End Testing '; + +SELECT ' Geography index: Start Testing '; +INSERT INTO (log_label, func, g1, log_start) VALUES(' gist index Geography','CREATE gist index geography', '', clock_timestamp()); +BEGIN; + CREATE INDEX idx_pgis_geoggarden_geog_gist ON pgis_geoggarden USING gist(the_geog); + +COMMIT; +SELECT ' Geography index: End Testing '; + + + +INSERT INTO (log_label, func, g1, log_start, log_sql) VALUES(' vacuum analyze Geography','analyze geography table', '', clock_timestamp(), + 'VACUUM ANALYZE pgis_geoggarden;'); +VACUUM ANALYZE pgis_geoggarden; + + +INSERT INTO (log_label, func, g1, log_start) VALUES(' drop Geography table','drop geography table', '', clock_timestamp()); +BEGIN; + SELECT 'BEFORE DROP' As look_at, * FROM geography_columns; + DROP TABLE pgis_geoggarden; + SELECT 'AFTER DROP' As look_at, * FROM geography_columns; + +COMMIT; +SELECT ' Geography: End Testing'; + + + + + + + + + + + + + + + + + + against other types + SELECT ': Start Testing '; + + + + INSERT INTO (log_label, func, g1, g2, log_start, log_sql) + VALUES(' Geography ','', '','', clock_timestamp(), + ' + SELECT ST_AsEWKT(foo1.the_geom) as ewktgeog1, ST_AsEWKT(foo2.the_geom) as ewktgeog2, geography(foo1.the_geom) geography(foo2.the_geom) As geog1_op_geog2 + FROM () As foo1 CROSS JOIN () As foo2 + WHERE (geography(foo1.the_geom) geography(foo2.the_geom)) = true OR + (geography(foo1.the_geom) geography(foo2.the_geom)) = false; +'); + + SELECT 'Geography : Start Testing , '; + BEGIN; + + + COMMIT; + + + SELECT 'Geometry : Start Testing , '; + INSERT INTO (log_label, func, g1, g2, log_start, log_sql) + VALUES(' Geometry ','', '','', clock_timestamp(), + ' + SELECT ST_AsEWKT(foo1.the_geom) as ewktgeom1, ST_AsEWKT(foo2.the_geom) as ewktgeom2, foo1.the_geom foo2.the_geom As geom1_op_geom2 + FROM () As foo1 CROSS JOIN () As foo2 + WHERE (foo1.the_geom foo2.the_geom) = true OR + (foo1.the_geom foo2.the_geom) = false;'); + + BEGIN; + + + COMMIT; + + + + SELECT ' : End Testing against other types'; + + + + + + + + + + + + + + + + + + () + + + + + + + + + + + + + + + + + + + SELECT 'Starting ()'; +INSERT INTO (log_label, func, log_start, log_sql) + VALUES(' ','', clock_timestamp(), + ' + SELECT () As output;'); + +BEGIN; + + +COMMIT; +SELECT 'Ending ()'; + + + + + + SELECT ' : Start Testing'; + + INSERT INTO (log_label, func, g1, log_start, log_sql) + VALUES(' ','', '', clock_timestamp(), + ' + SELECT () As result + FROM () As foo1 + LIMIT 3;'); +BEGIN; + + +COMMIT; + SELECT ' : End Testing'; + + + + + + + + + + +SELECT ' (): Start Testing against other types'; + + + + INSERT INTO (log_label, func, g1, g2, log_start, log_sql) + VALUES(' ','','', '', clock_timestamp(), + ' + SELECT () As result, ST_AsText(foo1.the_geom) As ref1_geom, ST_AsText(foo2.the_geom) As ref2_geom + FROM () As foo1 CROSS JOIN () As foo2 + LIMIT 2;'); + + BEGIN; + + + COMMIT; + + + INSERT INTO (log_label, func, g1, g2, log_start, log_sql) + VALUES(' Other ','', '','', clock_timestamp(), + ' + SELECT ()'); + + SELECT 'Other (): Start Testing , '; + BEGIN; + + + COMMIT; + + + + SELECT '() : End Testing , '; + + + + +SELECT ' (): End Testing against other types'; + + + + + + + UPDATE SET spatial_class = 'geography' WHERE (log_label ILIKE '%geography%' or log_sql ILIKE '%geography%') AND spatial_class IS NULL; + UPDATE SET spatial_class = 'geometry' WHERE log_label ILIKE '%geometry%' or log_label ILIKE '%other%' AND spatial_class IS NULL; + + + + + + + + + + + + + + + + + + + + + + + + + + + + '' + + + + + + + + + + + + ST_AsGML(foo1.the_geom) + + + ST_AsKML(foo1.the_geom) + + + foo1.the_geom + + + geography(foo1.the_geom) + + + foo2.the_geom + + + geography(foo2.the_geom) + + + ARRAY[foo1.the_geom] + + + ARRAY[foo2.the_geom] + + + ST_AsEWKT(foo1.the_geom) + + + ST_AsText(foo1.the_geom) + + + ST_AsEWKB(foo1.the_geom) + + + ST_AsBinary(foo1.the_geom) + + + + + + + + + + + + + + + + + + + + + '2009-01-01' + + + + + + + , + + + + + + + + + + + + + + + + , + + + + + + + + ' + + + + '' + + + + + + + + + + diff -Nru postgis-1.5.3/doc/xsl/postgis_gardentest_subset.sql.xsl postgis-2.0.1/doc/xsl/postgis_gardentest_subset.sql.xsl --- postgis-1.5.3/doc/xsl/postgis_gardentest_subset.sql.xsl 2009-11-19 22:35:17.000000000 +0000 +++ postgis-2.0.1/doc/xsl/postgis_gardentest_subset.sql.xsl 2011-02-09 12:54:23.000000000 +0000 @@ -1,369 +1,376 @@ - - - - - 1.5.0 - - 3395 - 1 - 3 - 5 - 0.5 - 0.75 - 100 - 1 - 2 - XDR - 'monkey' - 'test' - 'SPHEROID["GRS_1980",6378137,298.257222101]' - 'FF1FF0102' - false - - (SELECT ST_SetSRID(ST_Point(i,j),4326) As the_geom - FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i) - CROSS JOIN generate_series(40,70, 15) j - ORDER BY i,j - ) - (SELECT ST_MakeLine(ST_SetSRID(ST_Point(i,j),4326),ST_SetSRID(ST_Point(j,i),4326)) As the_geom - FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i) - CROSS JOIN generate_series(40,70, 15) As j - WHERE NOT(i = j) - ORDER BY i, i*j) - (SELECT ST_Buffer(ST_SetSRID(ST_Point(i,j),4326), j*0.05) As the_geom - FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i) - CROSS JOIN generate_series(40,70, 20) As j - ORDER BY i, i*j, j) - (SELECT ST_SetSRID(ST_MakePointM(i,j,m),4326) As the_geom - FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i) - CROSS JOIN generate_series(50,70, 20) AS j - CROSS JOIN generate_series(1,2) As m - ORDER BY i, j, i*j*m) - (SELECT ST_MakeLine(ST_SetSRID(ST_MakePointM(i,j,m),4326),ST_SetSRID(ST_MakePointM(j,i,m),4326)) As the_geom - FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i) - CROSS JOIN generate_series(50,70, 20) As j - CROSS JOIN generate_series(1,2) As m - WHERE NOT(i = j) - ORDER BY i, j, m, i*j*m) - (SELECT ST_MakePolygon(ST_AddPoint(ST_AddPoint(ST_MakeLine(ST_SetSRID(ST_MakePointM(i+m,j,m),4326),ST_SetSRID(ST_MakePointM(j+m,i-m,m),4326)),ST_SetSRID(ST_MakePointM(i,j,m),4326)),ST_SetSRID(ST_MakePointM(i+m,j,m),4326))) As the_geom - FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i) - CROSS JOIN generate_series(50,70, 20) As j - CROSS JOIN generate_series(1,2) As m - ORDER BY i, j, m, i*j*m - ) - (SELECT ST_SetSRID(ST_MakePoint(i,j,k),4326) As the_geom - FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i) - CROSS JOIN generate_series(40,70, 20) j - CROSS JOIN generate_series(1,2) k - ORDER BY i,i*j, j*k, i + j + k) - (SELECT ST_SetSRID(ST_MakeLine(ST_MakePoint(i,j,k), ST_MakePoint(i+k,j+k,k)),4326) As the_geom - FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i) - CROSS JOIN generate_series(40,70, 20) j - CROSS JOIN generate_series(1,2) k - ORDER BY i, j, i+j+k, k, i*j*k) - (SELECT ST_SetSRID(ST_MakePolygon(ST_AddPoint(ST_AddPoint(ST_MakeLine(ST_MakePoint(i+m,j,m),ST_MakePoint(j+m,i-m,m)),ST_MakePoint(i,j,m)),ST_MakePointM(i+m,j,m))),4326) As the_geom - FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i) - CROSS JOIN generate_series(50,70, 20) As j - CROSS JOIN generate_series(1,2) As m - ORDER BY i, j, i+j+m, m, i*j*m) - - (SELECT ST_Collect(ST_Collect(ST_SetSRID(ST_MakePoint(i,j,m),4326),ST_SetSRID(ST_MakePolygon(ST_AddPoint(ST_AddPoint(ST_MakeLine(ST_MakePoint(i+m,j,m),ST_MakePoint(j+m,i-m,m)),ST_MakePoint(i,j,m)),ST_MakePointM(i+m,j,m))),4326))) As the_geom - FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i) - CROSS JOIN generate_series(50,70, 20) As j - CROSS JOIN generate_series(1,2) As m - ) - - - (SELECT ST_Collect(s.the_geom) As the_geom - FROM (SELECT ST_SetSRID(ST_Point(i,j),4326) As the_geom - FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i) - CROSS JOIN generate_series(40,70, 15) j - ) As s) - - (SELECT ST_Collect(s.the_geom) As the_geom - FROM (SELECT ST_MakeLine(ST_SetSRID(ST_Point(i,j),4326),ST_SetSRID(ST_Point(j,i),4326)) As the_geom - FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i) - CROSS JOIN generate_series(40,70, 15) As j - WHERE NOT(i = j)) As s) - - (SELECT ST_Multi(ST_Union(ST_Buffer(ST_SetSRID(ST_Point(i,j),4326), j*0.05))) As the_geom - FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i) - CROSS JOIN generate_series(40,70, 25) As j) - - (SELECT ST_Collect(ST_SetSRID(ST_MakePoint(i,j,k),4326)) As the_geom - FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i) - CROSS JOIN generate_series(40,70, 25) j - CROSS JOIN generate_series(1,3) k - ) - - (SELECT ST_Multi(ST_Union(ST_SetSRID(ST_MakeLine(ST_MakePoint(i,j,k), ST_MakePoint(i+k,j+k,k)),4326))) As the_geom - FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i) - CROSS JOIN generate_series(40,70, 25) j - CROSS JOIN generate_series(1,2) k - ) - - (SELECT ST_Multi(ST_Union(s.the_geom)) As the_geom - FROM (SELECT ST_MakePolygon(ST_AddPoint(ST_AddPoint(ST_MakeLine(ST_SetSRID(ST_MakePoint(i+m,j,m),4326),ST_SetSRID(ST_MakePoint(j+m,i-m,m),4326)),ST_SetSRID(ST_MakePoint(i,j,m),4326)),ST_SetSRID(ST_MakePoint(i+m,j,m),4326))) As the_geom - FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i) - CROSS JOIN generate_series(50,70, 25) As j - CROSS JOIN generate_series(1,2) As m - ) As s) - - (SELECT ST_Collect(s.the_geom) As the_geom - FROM (SELECT ST_SetSRID(ST_MakePointM(i,j,m),4326) As the_geom - FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i) - CROSS JOIN generate_series(50,70, 25) AS j - CROSS JOIN generate_series(1,2) As m - ) As s) - - (SELECT ST_Collect(s.the_geom) As the_geom - FROM (SELECT ST_MakeLine(ST_SetSRID(ST_MakePointM(i,j,m),4326),ST_SetSRID(ST_MakePointM(j,i,m),4326)) As the_geom - FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i) - CROSS JOIN generate_series(50,70, 25) As j - CROSS JOIN generate_series(1,2) As m - WHERE NOT(i = j)) As s) - - ( - SELECT ST_GeomFromEWKT('SRID=4326;MULTIPOLYGONM(((0 0 2,10 0 1,10 10 -2,0 10 -5,0 0 -5),(5 5 6,7 5 6,7 7 6,5 7 10,5 5 -2)))') As the_geom - ) - - - (SELECT ST_GeomFromText('GEOMETRYCOLLECTION EMPTY',4326) As the_geom - UNION ALL SELECT ST_GeomFromText('POLYGON EMPTY',4326) As the_geom - ) - - - (SELECT CAST(Null As geometry) As the_geom) - (SELECT CAST(Null As geometry) As the_geom FROM generate_series(1,4) As foo) - - - - - - - (SELECT ST_LineToCurve(ST_Buffer(ST_SetSRID(ST_Point(i,j),4326), j)) As the_geom - FROM generate_series(-10,50,10) As i - CROSS JOIN generate_series(40,70, 20) As j - ORDER BY i, j, i*j) - (SELECT ST_LineToCurve(ST_Boundary(ST_Buffer(ST_SetSRID(ST_Point(i,j),4326), j))) As the_geom - FROM generate_series(-10,50,10) As i - CROSS JOIN generate_series(40,70, 20) As j - ORDER BY i, j, i*j) - - - - - - - - - - - - - - - - - - - - - - - - - - SELECT 'Starting ()';BEGIN; -SELECT (); -COMMIT; -SELECT 'Ending ()'; - - - - - - - - - SELECT 'Geometry : Start Testing '; - BEGIN; - SELECT ST_AsEWKT(()) - - - SELECT 'Geography : Start Testing '; - BEGIN; - SELECT ST_AsText(()) - - - SELECT 'Other : Start Testing '; - BEGIN; - SELECT () - - - FROM () As foo1 - LIMIT 3; - COMMIT; - SELECT ' : End Testing '; - - - - - - - - - - - - -SELECT ' (): Start Testing against other types'; - - - - SELECT 'Geography (): Start Testing , '; - BEGIN; - SELECT (), ST_AsText(foo1.the_geom) As ref1_geom, ST_AsText(foo2.the_geom) As ref2_geom - - - SELECT 'Geometry (): Start Testing , '; - BEGIN; - SELECT (), ST_AsEWKT(foo1.the_geom) As ref1_geom, ST_AsEWKT(foo2.the_geom) As ref2_geom - - - SELECT 'Other (): Start Testing , '; - BEGIN; - SELECT () - - - FROM () As foo1 CROSS JOIN () As foo2 - LIMIT 2; - COMMIT; - SELECT '() : End Testing , '; - - - - -SELECT ' (): End Testing against other types'; - - - - - - - - - - - - - - - - - - - - - - - - - - - '' - - - - - - - - - ST_AsGML(foo1.the_geom) - - - foo1.the_geom - - - geography(foo1.the_geom) - - - foo2.the_geom - - - geography(foo2.the_geom) - - - ARRAY[foo1.the_geom] - - - ARRAY[foo2.the_geom] - - - ST_AsEWKT(foo1.the_geom) - - - ST_AsText(foo1.the_geom) - - - ST_AsEWKB(foo1.the_geom) - - - ST_AsBinary(foo1.the_geom) - - - - - - - - - - - - - - - - - - - - - '2009-01-01' - - - - - - , - - - - - - - - - - - - - - - - , - - - - + + + + + 1.5.0 + + 3395 + 1 + 3 + 5 + 0.5 + 0.75 + 100 + 1 + 2 + XDR + 'monkey' + 'test' + 'SPHEROID["GRS_1980",6378137,298.257222101]' + 'FF1FF0102' + false + + (SELECT ST_SetSRID(ST_Point(i,j),4326) As the_geom + FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i) + CROSS JOIN generate_series(40,70, 15) j + ORDER BY i,j + ) + (SELECT ST_MakeLine(ST_SetSRID(ST_Point(i,j),4326),ST_SetSRID(ST_Point(j,i),4326)) As the_geom + FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i) + CROSS JOIN generate_series(40,70, 15) As j + WHERE NOT(i = j) + ORDER BY i, i*j) + (SELECT ST_Buffer(ST_SetSRID(ST_Point(i,j),4326), j*0.05) As the_geom + FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i) + CROSS JOIN generate_series(40,70, 20) As j + ORDER BY i, i*j, j) + (SELECT ST_SetSRID(ST_MakePointM(i,j,m),4326) As the_geom + FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i) + CROSS JOIN generate_series(50,70, 20) AS j + CROSS JOIN generate_series(1,2) As m + ORDER BY i, j, i*j*m) + (SELECT ST_MakeLine(ST_SetSRID(ST_MakePointM(i,j,m),4326),ST_SetSRID(ST_MakePointM(j,i,m),4326)) As the_geom + FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i) + CROSS JOIN generate_series(50,70, 20) As j + CROSS JOIN generate_series(1,2) As m + WHERE NOT(i = j) + ORDER BY i, j, m, i*j*m) + (SELECT ST_MakePolygon(ST_AddPoint(ST_AddPoint(ST_MakeLine(ST_SetSRID(ST_MakePointM(i+m,j,m),4326),ST_SetSRID(ST_MakePointM(j+m,i-m,m),4326)),ST_SetSRID(ST_MakePointM(i,j,m),4326)),ST_SetSRID(ST_MakePointM(i+m,j,m),4326))) As the_geom + FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i) + CROSS JOIN generate_series(50,70, 20) As j + CROSS JOIN generate_series(1,2) As m + ORDER BY i, j, m, i*j*m + ) + (SELECT ST_SetSRID(ST_MakePoint(i,j,k),4326) As the_geom + FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i) + CROSS JOIN generate_series(40,70, 20) j + CROSS JOIN generate_series(1,2) k + ORDER BY i,i*j, j*k, i + j + k) + (SELECT ST_SetSRID(ST_MakeLine(ST_MakePoint(i,j,k), ST_MakePoint(i+k,j+k,k)),4326) As the_geom + FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i) + CROSS JOIN generate_series(40,70, 20) j + CROSS JOIN generate_series(1,2) k + ORDER BY i, j, i+j+k, k, i*j*k) + (SELECT ST_SetSRID(ST_MakePolygon(ST_AddPoint(ST_AddPoint(ST_MakeLine(ST_MakePoint(i+m,j,m),ST_MakePoint(j+m,i-m,m)),ST_MakePoint(i,j,m)),ST_MakePointM(i+m,j,m))),4326) As the_geom + FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i) + CROSS JOIN generate_series(50,70, 20) As j + CROSS JOIN generate_series(1,2) As m + ORDER BY i, j, i+j+m, m, i*j*m) + + (SELECT ST_GeomFromEWKT( +'SRID=0;PolyhedralSurface( +((0 0 0, 0 0 1, 0 1 1, 0 1 0, 0 0 0)), +((0 0 0, 0 1 0, 1 1 0, 1 0 0, 0 0 0)), ((0 0 0, 1 0 0, 1 0 1, 0 0 1, 0 0 0)), ((1 1 0, 1 1 1, 1 0 1, 1 0 0, 1 1 0)), +((0 1 0, 0 1 1, 1 1 1, 1 1 0, 0 1 0)), ((0 0 1, 1 0 1, 1 1 1, 0 1 1, 0 0 1)) +)') ) + + (SELECT ST_Collect(ST_Collect(ST_SetSRID(ST_MakePoint(i,j,m),4326),ST_SetSRID(ST_MakePolygon(ST_AddPoint(ST_AddPoint(ST_MakeLine(ST_MakePoint(i+m,j,m),ST_MakePoint(j+m,i-m,m)),ST_MakePoint(i,j,m)),ST_MakePointM(i+m,j,m))),4326))) As the_geom + FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i) + CROSS JOIN generate_series(50,70, 20) As j + CROSS JOIN generate_series(1,2) As m + ) + + + (SELECT ST_Collect(s.the_geom) As the_geom + FROM (SELECT ST_SetSRID(ST_Point(i,j),4326) As the_geom + FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i) + CROSS JOIN generate_series(40,70, 15) j + ) As s) + + (SELECT ST_Collect(s.the_geom) As the_geom + FROM (SELECT ST_MakeLine(ST_SetSRID(ST_Point(i,j),4326),ST_SetSRID(ST_Point(j,i),4326)) As the_geom + FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i) + CROSS JOIN generate_series(40,70, 15) As j + WHERE NOT(i = j)) As s) + + (SELECT ST_Multi(ST_Union(ST_Buffer(ST_SetSRID(ST_Point(i,j),4326), j*0.05))) As the_geom + FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i) + CROSS JOIN generate_series(40,70, 25) As j) + + (SELECT ST_Collect(ST_SetSRID(ST_MakePoint(i,j,k),4326)) As the_geom + FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i) + CROSS JOIN generate_series(40,70, 25) j + CROSS JOIN generate_series(1,3) k + ) + + (SELECT ST_Multi(ST_Union(ST_SetSRID(ST_MakeLine(ST_MakePoint(i,j,k), ST_MakePoint(i+k,j+k,k)),4326))) As the_geom + FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i) + CROSS JOIN generate_series(40,70, 25) j + CROSS JOIN generate_series(1,2) k + ) + + (SELECT ST_Multi(ST_Union(s.the_geom)) As the_geom + FROM (SELECT ST_MakePolygon(ST_AddPoint(ST_AddPoint(ST_MakeLine(ST_SetSRID(ST_MakePoint(i+m,j,m),4326),ST_SetSRID(ST_MakePoint(j+m,i-m,m),4326)),ST_SetSRID(ST_MakePoint(i,j,m),4326)),ST_SetSRID(ST_MakePoint(i+m,j,m),4326))) As the_geom + FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i) + CROSS JOIN generate_series(50,70, 25) As j + CROSS JOIN generate_series(1,2) As m + ) As s) + + (SELECT ST_Collect(s.the_geom) As the_geom + FROM (SELECT ST_SetSRID(ST_MakePointM(i,j,m),4326) As the_geom + FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i) + CROSS JOIN generate_series(50,70, 25) AS j + CROSS JOIN generate_series(1,2) As m + ) As s) + + (SELECT ST_Collect(s.the_geom) As the_geom + FROM (SELECT ST_MakeLine(ST_SetSRID(ST_MakePointM(i,j,m),4326),ST_SetSRID(ST_MakePointM(j,i,m),4326)) As the_geom + FROM (SELECT a*1.01234567890 FROM generate_series(-10,50,10) As a) As i(i) + CROSS JOIN generate_series(50,70, 25) As j + CROSS JOIN generate_series(1,2) As m + WHERE NOT(i = j)) As s) + + ( + SELECT ST_GeomFromEWKT('SRID=4326;MULTIPOLYGONM(((0 0 2,10 0 1,10 10 -2,0 10 -5,0 0 -5),(5 5 6,7 5 6,7 7 6,5 7 10,5 5 -2)))') As the_geom + ) + + + (SELECT ST_GeomFromText('GEOMETRYCOLLECTION EMPTY',4326) As the_geom + UNION ALL SELECT ST_GeomFromText('POLYGON EMPTY',4326) As the_geom + ) + + + (SELECT CAST(Null As geometry) As the_geom) + (SELECT CAST(Null As geometry) As the_geom FROM generate_series(1,4) As foo) + + + + + + + (SELECT ST_LineToCurve(ST_Buffer(ST_SetSRID(ST_Point(i,j),4326), j)) As the_geom + FROM generate_series(-10,50,10) As i + CROSS JOIN generate_series(40,70, 20) As j + ORDER BY i, j, i*j) + (SELECT ST_LineToCurve(ST_Boundary(ST_Buffer(ST_SetSRID(ST_Point(i,j),4326), j))) As the_geom + FROM generate_series(-10,50,10) As i + CROSS JOIN generate_series(40,70, 20) As j + ORDER BY i, j, i*j) + + + + + + + + + + + + + + + + + + + + + + + + + + SELECT 'Starting ()';BEGIN; +SELECT (); +COMMIT; +SELECT 'Ending ()'; + + + + + + + + + SELECT 'Geometry : Start Testing '; + BEGIN; + SELECT ST_AsEWKT(()) + + + SELECT 'Geography : Start Testing '; + BEGIN; + SELECT ST_AsText(()) + + + SELECT 'Other : Start Testing '; + BEGIN; + SELECT () + + + FROM () As foo1 + LIMIT 3; + COMMIT; + SELECT ' : End Testing '; + + + + + + + + + + + + +SELECT ' (): Start Testing against other types'; + + + + SELECT 'Geography (): Start Testing , '; + BEGIN; + SELECT (), ST_AsText(foo1.the_geom) As ref1_geom, ST_AsText(foo2.the_geom) As ref2_geom + + + SELECT 'Geometry (): Start Testing , '; + BEGIN; + SELECT (), ST_AsEWKT(foo1.the_geom) As ref1_geom, ST_AsEWKT(foo2.the_geom) As ref2_geom + + + SELECT 'Other (): Start Testing , '; + BEGIN; + SELECT () + + + FROM () As foo1 CROSS JOIN () As foo2 + LIMIT 2; + COMMIT; + SELECT '() : End Testing , '; + + + + +SELECT ' (): End Testing against other types'; + + + + + + + + + + + + + + + + + + + + + + + + + + + '' + + + + + + + + + ST_AsGML(foo1.the_geom) + + + foo1.the_geom + + + geography(foo1.the_geom) + + + foo2.the_geom + + + geography(foo2.the_geom) + + + ARRAY[foo1.the_geom] + + + ARRAY[foo2.the_geom] + + + ST_AsEWKT(foo1.the_geom) + + + ST_AsText(foo1.the_geom) + + + ST_AsEWKB(foo1.the_geom) + + + ST_AsBinary(foo1.the_geom) + + + + + + + + + + + + + + + + + + + + + '2009-01-01' + + + + + + , + + + + + + + + + + + + + + + + , + + + + diff -Nru postgis-1.5.3/doc/xsl/raster_cheatsheet.html.xsl postgis-2.0.1/doc/xsl/raster_cheatsheet.html.xsl --- postgis-1.5.3/doc/xsl/raster_cheatsheet.html.xsl 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/xsl/raster_cheatsheet.html.xsl 2012-04-25 22:36:38.000000000 +0000 @@ -0,0 +1,252 @@ + + + + + 2.0 + Availability: + Enhanced: + false + true + http://www.postgis.org/documentation/manual-svn/ + + PostGIS Raster Cheat Sheet + +

PostGIS ]]> ]]> + New in this release 1 Enhanced in this release 2 Requires GEOS 3.3 or higherg3.3  2.5/3D support3d SQL-MMmm  Supports geography G
]]> + + ]]> + ]]> + + + + + ]]> + ]]> + + + + + + +

]]> + + + + class="evenrowoddrow" ]]> + + + ]]> + + + + + + + + + + ]]> + + + + + + + + + + + + + + + + + + + + + class="evenrowoddrow"]]> + ]]>
]]>]]> +
+ ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + + + + + + + + + , + + + + + + + + diff -Nru postgis-1.5.3/doc/xsl/raster_comments.sql.xsl postgis-2.0.1/doc/xsl/raster_comments.sql.xsl --- postgis-1.5.3/doc/xsl/raster_comments.sql.xsl 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/xsl/raster_comments.sql.xsl 2012-02-20 13:16:05.000000000 +0000 @@ -0,0 +1,125 @@ + + + + + + + + + + + + + ' + + + + + + + + + + + + + + + +COMMENT ON AGGREGATEFUNCTION ( +geometryraster, +) IS ' '; + + + + + + ' + + + + + + + + + + + + + + COMMENT ON TYPE IS 'postgis raster type: '; + + + + + + + + + + + + + + + + + + + + + + + + + + + ' + + + + '' + + + + + + + + + + + + + + args: + + + + + + + + + , + + - + + + + diff -Nru postgis-1.5.3/doc/xsl/raster_gardentest.sql.xsl postgis-2.0.1/doc/xsl/raster_gardentest.sql.xsl --- postgis-1.5.3/doc/xsl/raster_gardentest.sql.xsl 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/xsl/raster_gardentest.sql.xsl 2012-01-08 07:57:03.000000000 +0000 @@ -0,0 +1,540 @@ + + + + + 2.0.0 + AddRasterColumn AddRasterConstraints DropRasterConstraints DropRasterColumn DropRasterTable + + + 'GDAL' + 3395 + 1 + 1 + 2 + 1.5 + 1.75 + 100 + XDR + 'monkey' + 'test' + '1BB' + 8BUI + 0 + 'rast' + 'pgis_rgarden_1bb' + false + raster_garden_log + {8BUI,1BB} + {255,0} + 'Lanczos' + ST_Centroid(rast1.rast::geometry) + + ROW(2, '0-100:1-10, 101-500:11-150,501 - 10000: 151-254', '8BUI', 255) + '2 0 0 3 0.5 0.5' + UPDATE SET log_end = clock_timestamp() + FROM (SELECT logid FROM ORDER BY logid DESC limit 1) As foo + WHERE .logid = foo.logid AND .log_end IS NULL; + + INSERT INTO _output(logid, log_output) + SELECT logid, query_to_xml(log_sql, false,false,'') As log_output + FROM ORDER BY logid DESC LIMIT 1; + + + (SELECT ST_SetSRID(ST_Point(i,j),4326) As the_geom + FROM (SELECT a*1.11111111 FROM generate_series(-10,50,10) As a) As i(i) + CROSS JOIN generate_series(40,70, 15) j + ORDER BY i,j + ) + (SELECT ST_MakeLine(ST_SetSRID(ST_Point(i,j),4326),ST_SetSRID(ST_Point(j,i),4326)) As the_geom + FROM (SELECT a*1.11111111 FROM generate_series(-10,50,10) As a) As i(i) + CROSS JOIN generate_series(40,70, 15) As j + WHERE NOT(i = j) + ORDER BY i, i*j) + (SELECT ST_Buffer(ST_SetSRID(ST_Point(i,j),4326), j*0.05) As the_geom + FROM (SELECT a*1.11111111 FROM generate_series(-10,50,10) As a) As i(i) + CROSS JOIN generate_series(40,70, 20) As j + ORDER BY i, i*j, j) + + (SELECT CAST(Null As geometry) As the_geom) + (SELECT CAST(Null As geometry) As the_geom FROM generate_series(1,4) As foo) + + + + + (SELECT ST_SetSRID(ST_SetValue(ST_AddBand(ST_MakeEmptyRaster( 100, 100, (i-1)*100, (i-1)*100, 0.0005, -0.0005, 0*i, 0*i), '1BB'), i, (i+1),0),4326) As rast + FROM generate_series(1,10) As i) + + + (SELECT ST_SetSRID(ST_SetValue(ST_AddBand(ST_MakeEmptyRaster( 100, 100, (i-1)*100, (i-1)*100, 0.0005, -0.0005, 0*i, 0*i), '2BUI'), i, (i+1),1),4326) As rast + FROM generate_series(1,10) As i) + + + (SELECT ST_SetSRID(ST_SetValue(ST_AddBand(ST_MakeEmptyRaster( 100, 100, (i-1)*100, (i-1)*100, 0.0005, -0.0005, 0*i, 0*i), '4BUI'), i, (i+1),14),4326) As rast + FROM generate_series(1,10) As i) + + + (SELECT ST_SetSRID(ST_SetValue(ST_AddBand(ST_MakeEmptyRaster( 100, 100, (i-1)*100, (i-1)*100, 0.0005, -0.0005, 0*i, 0*i), '8BSI'), i, (i+1),-50),4326) As rast + FROM generate_series(1,10) As i) + + + (SELECT ST_SetSRID(ST_SetValue(ST_AddBand(ST_MakeEmptyRaster( 100, 100, (i-1)*100, (i-1)*100, 0.0005, -0.0005, 0*i, 0*i), '8BUI'), i, (i+1),150),4326) As rast + FROM generate_series(1,10) As i) + + + (SELECT ST_SetSRID(ST_SetValue(ST_AddBand(ST_MakeEmptyRaster( 100, 100, (i-1)*100, (i-1)*100, 0.0005, -0.0005, 0*i, 0*i), '16BSI'), i, (i+1),-6000),4326) As rast + FROM generate_series(1,10) As i) + + + (SELECT ST_SetSRID(ST_SetValue(ST_AddBand(ST_MakeEmptyRaster( 100, 100, (i-1)*100, (i-1)*100, 0.0005, -0.0005, 0*i, 0*i), '16BUI'), i, (i+1),64567),4326) As rast + FROM generate_series(1,10) As i) + + + (SELECT ST_SetSRID(ST_SetValue(ST_AddBand(ST_MakeEmptyRaster( 100, 100, (i-1)*100, (i-1)*100, 0.0005, -0.0005, 0*i, 0*i), '32BSI'), i, (i+1),-429496),4326) As rast + FROM generate_series(1,10) As i) + + + (SELECT ST_SetSRID(ST_SetValue(ST_AddBand(ST_MakeEmptyRaster( 100, 100, (i-1)*100, (i-1)*100, 0.0005, -0.0005, 0*i, 0*i), '32BUI'), i, (i+1),42949),4326) As rast + FROM generate_series(1,10) As i) + + + (SELECT ST_SetSRID(ST_SetValue(ST_AddBand(ST_MakeEmptyRaster( 100, 100, (i-1)*100, (i-1)*100, 0.0005, -0.0005, 0*i, 0*i), '32BF'), i, (i+1),-4294),4326) As rast + FROM generate_series(1,10) As i) + + + (SELECT ST_SetSRID(ST_SetValue(ST_AddBand(ST_MakeEmptyRaster( 100, 100, (i-1)*100, (i-1)*100, 0.0005, -0.0005, 0*i, 0*i), '64BF'), i, (i+1),42949.12345),4326) As rast + FROM generate_series(1,10) As i) + + + + + + +DROP TABLE IF EXISTS ; +CREATE TABLE (logid serial PRIMARY KEY, log_label text, spatial_class text DEFAULT 'raster', func text, g1 text, g2 text, log_start timestamp, log_end timestamp, log_sql text); +DROP TABLE IF EXISTS _output; +CREATE TABLE _output(logid integer PRIMARY KEY, log_output xml); + + + + +DROP TABLE IF EXISTS pgis_rgarden_mega; +CREATE TABLE pgis_rgarden_mega(rid serial PRIMARY KEY, rast raster); + + + create table Test +SELECT ': Start Testing'; +CREATE TABLE pgis_rgarden_(rid serial PRIMARY KEY); + ALTER TABLE pgis_rgarden_ ADD COLUMN rast raster; + ALTER TABLE pgis_rgarden_ ADD COLUMN r_rasttothrow raster; +INSERT INTO (log_label, func, g1, log_start,log_sql) +VALUES(' add raster column','add raster column', '', clock_timestamp(), + ''); +BEGIN; + + +COMMIT; + +INSERT INTO (log_label, func, g1, log_start,log_sql) +VALUES(' insert data raster','insert data', '', clock_timestamp(), + 'INSERT INTO pgis_rgarden_(rast, r_rasttothrow) + SELECT rast, rast + FROM () As foo;'); +BEGIN; + INSERT INTO pgis_rgarden_(rast, r_rasttothrow) + SELECT rast, rast + FROM () As foo; + +COMMIT; + +INSERT INTO (log_label, func, g1, log_start,log_sql) +VALUES(' apply raster constraints','apply raster constraints', '', clock_timestamp(), + 'SELECT AddRasterConstraints(CAST(lower('pgis_rgarden_') AS name), CAST('rast' AS name));'); +BEGIN; + SELECT AddRasterConstraints(CAST(lower('pgis_rgarden_') As name), CAST('rast' AS name)); + +COMMIT; + +INSERT INTO (log_label, func, g1, log_start,log_sql) +VALUES(' drop raster constraints','drop raster constraints', '', clock_timestamp(), + 'SELECT DropRasterConstraints(CAST(lower('pgis_rgarden_') AS name), CAST('rast' AS name));'); +BEGIN; + SELECT DropRasterConstraints(CAST(lower('pgis_rgarden_') As name), CAST('rast' AS name)); + +COMMIT; + + + + + + + + + + + + + + + against other types + SELECT ': Start Testing '; + + + + SELECT 'Geometry : Start Testing , '; + SELECT foo1.the_geom foo2.the_geom + FROM () As foo1 CROSS JOIN () As foo2; + INSERT INTO (log_label, func, g1, g2, log_start,log_sql) + VALUES(' Geometry ','', '','', clock_timestamp(), + ''); + + BEGIN; + + + + COMMIT; + + + SELECT rast1.rast rast2.rast + FROM () As rast1 CROSS JOIN () As rast2; + SELECT 'Raster : Start Testing , '; + INSERT INTO (log_label, func, g1, g2, log_start, log_sql) + VALUES(' Raster ','', '','', clock_timestamp(), + ''); + + BEGIN; + + + + COMMIT; + + + + SELECT ' : End Testing against other types'; + + + + + + + + + + + + + + + + -- + + + + () + + + + + + + + + + + + + + + + + + + + + + + SELECT 'Starting ()'; + SELECT (); +INSERT INTO (log_label, func, log_start, log_sql) + VALUES('','', clock_timestamp(), + ''); + + BEGIN; + + + + + COMMIT; +SELECT 'Ending ()'; + + + + + + SELECT ' : Start Testing '; + + + + INSERT INTO (log_label, func, g1, log_start, log_sql) + VALUES(' ','', '', clock_timestamp(), + 'SELECT ST_AsEWKT(ST_ConvexHull(())) FROM () As rast1 LIMIT 3;' + ); + + + SELECT 'Other : Start Testing '; + + INSERT INTO (log_label, func, g1, log_start, log_sql) + VALUES(' ','', '', clock_timestamp(), + 'SELECT () FROM () As rast1 LIMIT 3;' + ); + + + + BEGIN; + + + + + COMMIT; + SELECT ' : End Testing '; + + + + + + + + + + + SELECT ' : Start Testing '; + + + + + + SELECT ' (): Start Testing against other types'; + + + INSERT INTO (log_label, func, g1, g2, log_start) + VALUES(' ','', '','', clock_timestamp()); + BEGIN; + + + SELECT 'Raster (): Start Testing , '; + + + + SELECT ST_ConvexHull(() ) + + + + SELECT () + + , ST_AsText(ST_ConvexHull(rast1.rast)) As ref1_geom, ST_AsText(ST_ConvexHull(rast2.rast)) As ref2_geom + + + SELECT ' (): Start Testing , '; + + + + SELECT ST_ConvexHull(() ) + + + + SELECT () + + , ST_AsEWKT(rast1.rast::geometry) As ref1_geom, ST_AsEWKT(rast2.rast::geometry) As ref2_geom + + + SELECT 'Other (): Start Testing , '; + + SELECT ST_AsText(()) + + + FROM () As rast1 CROSS JOIN () As rast2 + LIMIT 2; + + + COMMIT; + SELECT '() : End Testing , '; + + + + +SELECT ' (): End Testing against other types'; + + + + + + + + + + + + + + + + + + + + + + + + ARRAY[] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + '' + + + + + + rast1.rast::geometry + + + rast1.rast::geometry::geography + + + + + rast2.rast::geometry + + + geography(rast2.rast::geometry) + + + ARRAY[rast1.rast] + + + ARRAY[rast2.rast] + + + rast1.rast + + + rast2.rast + + + ARRAY[foo1.the_geom] + + + ARRAY[foo2.the_geom] + + + ST_AsEWKT(foo1.the_geom) + + + ST_AsText(foo1.the_geom) + + + ST_AsEWKB(foo1.the_geom) + + + ST_AsBinary(foo1.the_geom) + + + + + + + + + + + + + + + + + + + + + + + + '2009-01-01' + + + + + + + , + + + + + + + + + + + + + + + + , + + + + + + + + ' + + + + '' + + + + + + + + + diff -Nru postgis-1.5.3/doc/xsl/tiger_geocoder_cheatsheet.html.xsl postgis-2.0.1/doc/xsl/tiger_geocoder_cheatsheet.html.xsl --- postgis-1.5.3/doc/xsl/tiger_geocoder_cheatsheet.html.xsl 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/xsl/tiger_geocoder_cheatsheet.html.xsl 2012-04-25 22:36:38.000000000 +0000 @@ -0,0 +1,230 @@ + + + + + 2.0 + Availability: + Enhanced: + true + true + + PostGIS ]]></xsl:text> <xsl:value-of select="$postgis_version" /> Tiger Geocoder Cheat Sheet <xsl:text><![CDATA[ + +

PostGIS ]]> ]]> + New in this release 1 Enhanced in this release2]]> + + ]]> + ]]> + + + ]]> + ]]> + + + + + + +

]]> + + + class="evenrowoddrow" ]]> + + + ]]> + + + + + + + + ]]> + + + + + + + + + + + + + + + + class="evenrowoddrow"]]> + ]]>
]]>]]> + + + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + + + + + + + + + , + + + + + + + diff -Nru postgis-1.5.3/doc/xsl/tiger_geocoder_comments.sql.xsl postgis-2.0.1/doc/xsl/tiger_geocoder_comments.sql.xsl --- postgis-1.5.3/doc/xsl/tiger_geocoder_comments.sql.xsl 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/xsl/tiger_geocoder_comments.sql.xsl 2011-07-14 11:32:45.000000000 +0000 @@ -0,0 +1,86 @@ + + + + + + + + + + + + ' + + + + + + + + + + + + + + + +COMMENT ON AGGREGATEFUNCTION ( +geometry, +) IS ' '; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + args: + + + + + + + , + + - + + + + diff -Nru postgis-1.5.3/doc/xsl/topology_cheatsheet.html.xsl postgis-2.0.1/doc/xsl/topology_cheatsheet.html.xsl --- postgis-1.5.3/doc/xsl/topology_cheatsheet.html.xsl 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/xsl/topology_cheatsheet.html.xsl 2012-04-25 22:36:38.000000000 +0000 @@ -0,0 +1,234 @@ + + + + + 2.0 + Availability: + Enhanced: + false + true + http://www.postgis.org/documentation/manual-svn/ + + PostGIS Topology Cheat Sheet + +

PostGIS ]]> ]]> + New in this release 1  Enhanced in this release 2 Requires GEOS 3.3 or higher3.3
]]> + + ]]> + ]]> + + + + + ]]> + ]]> + + + + + + +

]]> + + + + class="evenrowoddrow" ]]> + + + ]]> + + + + + + + + + + ]]> + + + + + + + + + + + + + + + + + + class="evenrowoddrow"]]> + ]]>
]]>]]> + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + + + + + + + + + , + + + + + + + diff -Nru postgis-1.5.3/doc/xsl/topology_comments.sql.xsl postgis-2.0.1/doc/xsl/topology_comments.sql.xsl --- postgis-1.5.3/doc/xsl/topology_comments.sql.xsl 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/xsl/topology_comments.sql.xsl 2012-03-27 17:06:20.000000000 +0000 @@ -0,0 +1,95 @@ + + + + + + + + + + + + ' + + + + + + + + + + + + + + + + +COMMENT ON TYPE topology. IS 'postgis type: '; + + +COMMENT ON DOMAIN topology. IS 'postgis domain: '; + + + + +COMMENT ON AGGREGATEFUNCTION topology.( +topoelement, +) IS ' '; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + args: + + + + + + + , + + - + + + + diff -Nru postgis-1.5.3/doc/xsl/topology_gardentest.sql.xsl postgis-2.0.1/doc/xsl/topology_gardentest.sql.xsl --- postgis-1.5.3/doc/xsl/topology_gardentest.sql.xsl 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/doc/xsl/topology_gardentest.sql.xsl 2011-11-16 20:39:43.000000000 +0000 @@ -0,0 +1,586 @@ + + + + + 2.0.0 + AddTopoGeometryColumn DropTopoGeometryColumn CreateTopology + + + 3395 + 1 + 3 + 5 + 0.5 + 0.75 + 100 + 1 + 2 + XDR + 'monkey' + 'test' + 'SPHEROID["GRS_1980",6378137,298.257222101]' + 'FF1FF0102' + false + postgis_garden_log + UPDATE SET log_end = clock_timestamp() + FROM (SELECT logid FROM ORDER BY logid DESC limit 1) As foo + WHERE .logid = foo.logid AND .log_end IS NULL; + + + INSERT INTO _output(logid, log_output) + SELECT logid, query_to_xml(log_sql, false,false,'') As log_output + FROM ORDER BY logid DESC LIMIT 1; + + (SELECT ST_SetSRID(ST_Point(i,j),4326) As the_geom + FROM (SELECT a*1.11111111 FROM generate_series(-10,50,10) As a) As i(i) + CROSS JOIN generate_series(40,70, 15) j + ORDER BY i,j + ) + (SELECT ST_MakeLine(ST_SetSRID(ST_Point(i,j),4326),ST_SetSRID(ST_Point(j,i),4326)) As the_geom + FROM (SELECT a*1.11111111 FROM generate_series(-10,50,10) As a) As i(i) + CROSS JOIN generate_series(40,70, 15) As j + WHERE NOT(i = j) + ORDER BY i, i*j) + (SELECT ST_Buffer(ST_SetSRID(ST_Point(i,j),4326), j*0.05) As the_geom + FROM (SELECT a*1.11111111 FROM generate_series(-10,50,10) As a) As i(i) + CROSS JOIN generate_series(40,70, 20) As j + ORDER BY i, i*j, j) + (SELECT ST_SetSRID(ST_MakePointM(i,j,m),4326) As the_geom + FROM generate_series(-10,50,10) As i + CROSS JOIN generate_series(50,70, 20) AS j + CROSS JOIN generate_series(1,2) As m + ORDER BY i, j, i*j*m) + (SELECT ST_MakeLine(ST_SetSRID(ST_MakePointM(i,j,m),4326),ST_SetSRID(ST_MakePointM(j,i,m),4326)) As the_geom + FROM generate_series(-10,50,10) As i + CROSS JOIN generate_series(50,70, 20) As j + CROSS JOIN generate_series(1,2) As m + WHERE NOT(i = j) + ORDER BY i, j, m, i*j*m) + + (SELECT geom As the_geom +FROM (VALUES ( ST_GeomFromEWKT('SRID=4326;POLYGONM((-71.1319 42.2503 1,-71.132 42.2502 3,-71.1323 42.2504 -2,-71.1322 42.2505 1,-71.1319 42.2503 0))') ), + ( ST_GeomFromEWKT('SRID=4326;POLYGONM((-71.1319 42.2512 0,-71.1318 42.2511 20,-71.1317 42.2511 -20,-71.1317 42.251 5,-71.1317 42.2509 4,-71.132 42.2511 6,-71.1319 42.2512 30))') ) + ) As g(geom)) + + (SELECT ST_SetSRID(ST_MakePoint(i,j,k),4326) As the_geom + FROM generate_series(-10,50,20) As i + CROSS JOIN generate_series(40,70, 20) j + CROSS JOIN generate_series(1,2) k + ORDER BY i,i*j, j*k, i + j + k) + (SELECT ST_SetSRID(ST_MakeLine(ST_MakePoint(i,j,k), ST_MakePoint(i+k,j+k,k)),4326) As the_geom + FROM generate_series(-10,50,20) As i + CROSS JOIN generate_series(40,70, 20) j + CROSS JOIN generate_series(1,2) k + ORDER BY i, j, i+j+k, k, i*j*k) + + (SELECT geom As the_geom +FROM (VALUES ( ST_GeomFromEWKT('SRID=4326;POLYGON((-71.0771 42.3866 1,-71.0767 42.3872 1,-71.0767 42.3863 1,-71.0771 42.3866 1))') ), + ( ST_GeomFromEWKT('SRID=4326;POLYGON((-71.0775 42.386 2,-71.0773 42.3863 1.75,-71.0773 42.3859 1.75,-71.0775 42.386 2))') ) + ) As g(geom)) + + (SELECT geom As the_geom +FROM (VALUES ( ST_GeomFromEWKT('SRID=4326;POLYGON((-71.0771 42.3866 1 2,-71.0767 42.3872 1 2.3,-71.0767 42.3863 1 2.3,-71.0771 42.3866 1 2))') ), + ( ST_GeomFromEWKT('SRID=4326;POLYGON((-71.0775 42.386 2 1.5,-71.0773 42.3863 1.75 1.5,-71.0773 42.3859 1.75 1.5,-71.0775 42.386 2 1.5))') ) + ) As g(geom)) + + + + (SELECT ST_Collect(s.the_geom) As the_geom + FROM (SELECT ST_SetSRID(ST_Point(i,j),4326) As the_geom + FROM generate_series(-10,50,15) As i + CROSS JOIN generate_series(40,70, 15) j + ) As s) + + (SELECT ST_Collect(s.the_geom) As the_geom + FROM (SELECT ST_MakeLine(ST_SetSRID(ST_Point(i,j),4326),ST_SetSRID(ST_Point(j,i),4326)) As the_geom + FROM generate_series(-10,50,10) As i + CROSS JOIN generate_series(40,70, 15) As j + WHERE NOT(i = j)) As s) + + (SELECT ST_Multi(ST_Union(ST_Buffer(ST_SetSRID(ST_Point(i,j),4326), j*0.05))) As the_geom + FROM generate_series(-10,50,10) As i + CROSS JOIN generate_series(40,70, 25) As j) + + (SELECT ST_Collect(ST_SetSRID(ST_MakePoint(i,j,k),4326)) As the_geom + FROM generate_series(-10,50,20) As i + CROSS JOIN generate_series(40,70, 25) j + CROSS JOIN generate_series(1,3) k + ) + + (SELECT ST_Multi(ST_Union(ST_SetSRID(ST_MakeLine(ST_MakePoint(i,j,k), ST_MakePoint(i+k,j+k,k)),4326))) As the_geom + FROM generate_series(-10,50,20) As i + CROSS JOIN generate_series(40,70, 25) j + CROSS JOIN generate_series(1,2) k + ) + + + (SELECT geom As the_geom +FROM (VALUES ( ST_GeomFromEWKT('SRID=4326;MULTIPOLYGON(((-71.0821 42.3036 2,-71.0822 42.3036 2,-71.082 42.3038 2,-71.0819 42.3037 2,-71.0821 42.3036 2)))') ), + ( ST_GeomFromEWKT('SRID=4326;MULTIPOLYGON(((-71.1261 42.2703 1,-71.1257 42.2703 1,-71.1257 42.2701 1,-71.126 42.2701 1,-71.1261 42.2702 1,-71.1261 42.2703 1)))') ) + ) As g(geom)) + + + (SELECT ST_Collect(s.the_geom) As the_geom + FROM (SELECT ST_SetSRID(ST_MakePointM(i - 0.0821,j + 0.3036,m),4326) As the_geom + FROM generate_series(-71,50,15) As i + CROSS JOIN generate_series(42,70, 25) AS j + CROSS JOIN generate_series(1,2) As m + ) As s) + + (SELECT ST_Collect(s.the_geom) As the_geom + FROM (SELECT ST_MakeLine(ST_SetSRID(ST_MakePointM(i - 0.0821,j + 0.3036,m),4326),ST_SetSRID(ST_MakePointM(j,i,m),4326)) As the_geom + FROM generate_series(-71,50,15) As i + CROSS JOIN generate_series(50,70, 25) As j + CROSS JOIN generate_series(1,2) As m + WHERE NOT(i = j)) As s) + + ( + SELECT ST_GeomFromEWKT('SRID=4326;MULTIPOLYGONM(((0 0 2,10 0 1,10 10 -2,0 10 -5,0 0 -5),(5 5 6,7 5 6,7 7 6,5 7 10,5 5 -2)))') As the_geom + ) + + + + + + + + + + +DROP TABLE IF EXISTS ; +CREATE TABLE (logid serial PRIMARY KEY, log_label text, spatial_class text, func text, g1 text, g2 text, log_start timestamp, log_end timestamp, log_sql text); +DROP TABLE IF EXISTS _output; +CREATE TABLE _output(logid integer PRIMARY KEY, log_output xml); + + + + + + + + table Test +SELECT ': Start Testing'; +CREATE TABLE pgis_garden (gid serial); + SELECT AddGeometryColumn('pgis_garden','the_geom',ST_SRID(the_geom),GeometryType(the_geom),ST_CoordDim(the_geom)) + FROM () As foo limit 1; + SELECT AddGeometryColumn('pgis_garden','the_geom_multi',ST_SRID(the_geom),GeometryType(ST_Multi(the_geom)),ST_CoordDim(the_geom)) + FROM () As foo limit 1; +INSERT INTO (log_label, func, g1, log_start, log_sql) +VALUES(' AddGeometryColumn','AddGeometryColumn', '', clock_timestamp(), + ''); +BEGIN; + + +COMMIT; + +SELECT ' Geometry index: Start Testing '; +INSERT INTO (log_label, func, g1, log_start) VALUES(' gist index Geometry','CREATE gist index geometry', '', clock_timestamp()); +BEGIN; + CREATE INDEX idx_pgis_geom_gist ON pgis_garden USING gist(the_geom); + +COMMIT; +SELECT ' geometry index: End Testing '; + +INSERT INTO (log_label, func, g1, log_start) +VALUES(' insert data Geometry','insert data', '', clock_timestamp()); + +BEGIN; + INSERT INTO pgis_garden(the_geom, the_geom_multi) + SELECT the_geom, ST_Multi(the_geom) + FROM () As foo; + +COMMIT; + +INSERT INTO (log_label, func, g1, log_start) +VALUES(' UpdateGeometrySRID','UpdateGeometrySRID', '', clock_timestamp()); +BEGIN; + SELECT UpdateGeometrySRID('pgis_garden', 'the_geom', 4269); + +COMMIT; + +INSERT INTO (log_label, func, g1, log_start) +VALUES(' vacuum analyze Geometry','vacuum analyze Geometry', '', clock_timestamp()); +VACUUM ANALYZE pgis_garden; + + +INSERT INTO (log_label, func, g1, log_start) +VALUES(' DropGeometryColumn','DropGeometryColumn', '', clock_timestamp()); + +BEGIN; + SELECT DropGeometryColumn ('pgis_garden','the_geom'); + +COMMIT; +INSERT INTO (log_label, func, g1, log_start) +VALUES(' DropGeometryTable','DropGeometryTable', '', clock_timestamp()); + +BEGIN; + SELECT DropGeometryTable ('pgis_garden'); + +COMMIT; +SELECT ': End Testing '; + + + +SELECT ' Geography: Start Testing '; +INSERT INTO (log_label, func, g1, log_start) VALUES(' Create Table / Add data - Geography','CREATE TABLE geography', '', clock_timestamp()); +BEGIN; + CREATE TABLE pgis_geoggarden (gid serial PRIMARY KEY, the_geog geography(, 4326)); + INSERT INTO pgis_geoggarden(the_geog) + SELECT the_geom + FROM () As foo; + +COMMIT; +SELECT ' Geography: End Testing '; + +SELECT ' Geography index: Start Testing '; +INSERT INTO (log_label, func, g1, log_start) VALUES(' gist index Geography','CREATE gist index geography', '', clock_timestamp()); +BEGIN; + CREATE INDEX idx_pgis_geoggarden_geog_gist ON pgis_geoggarden USING gist(the_geog); + +COMMIT; +SELECT ' Geography index: End Testing '; + + + +INSERT INTO (log_label, func, g1, log_start, log_sql) VALUES(' vacuum analyze Geography','analyze geography table', '', clock_timestamp(), + 'VACUUM ANALYZE pgis_geoggarden;'); +VACUUM ANALYZE pgis_geoggarden; + + +INSERT INTO (log_label, func, g1, log_start) VALUES(' drop Geography table','drop geography table', '', clock_timestamp()); +BEGIN; + SELECT 'BEFORE DROP' As look_at, * FROM geography_columns; + DROP TABLE pgis_geoggarden; + SELECT 'AFTER DROP' As look_at, * FROM geography_columns; + +COMMIT; +SELECT ' Geography: End Testing'; + + + + + + + + + + + + + + + + + + against other types + SELECT ': Start Testing '; + + + + INSERT INTO (log_label, func, g1, g2, log_start, log_sql) + VALUES(' Geography ','', '','', clock_timestamp(), + ' + SELECT ST_AsEWKT(foo1.the_geom) as ewktgeog1, ST_AsEWKT(foo2.the_geom) as ewktgeog2, geography(foo1.the_geom) geography(foo2.the_geom) As geog1_op_geog2 + FROM () As foo1 CROSS JOIN () As foo2 + WHERE (geography(foo1.the_geom) geography(foo2.the_geom)) = true OR + (geography(foo1.the_geom) geography(foo2.the_geom)) = false; +'); + + SELECT 'Geography : Start Testing , '; + BEGIN; + + + COMMIT; + + + SELECT 'Geometry : Start Testing , '; + INSERT INTO (log_label, func, g1, g2, log_start, log_sql) + VALUES(' Geometry ','', '','', clock_timestamp(), + ' + SELECT ST_AsEWKT(foo1.the_geom) as ewktgeom1, ST_AsEWKT(foo2.the_geom) as ewktgeom2, foo1.the_geom foo2.the_geom As geom1_op_geom2 + FROM () As foo1 CROSS JOIN () As foo2 + WHERE (foo1.the_geom foo2.the_geom) = true OR + (foo1.the_geom foo2.the_geom) = false;'); + + BEGIN; + + + COMMIT; + + + + SELECT ' : End Testing against other types'; + + + + + + + + + + + + + + + + + + () + + + + + + + + + + + + + + + + + + + SELECT 'Starting ()'; +INSERT INTO (log_label, func, log_start, log_sql) + VALUES(' ','', clock_timestamp(), + ' + SELECT () As output;'); + +BEGIN; + + +COMMIT; +SELECT 'Ending ()'; + + + + + + SELECT ' : Start Testing'; + + INSERT INTO (log_label, func, g1, log_start, log_sql) + VALUES(' ','', '', clock_timestamp(), + ' + SELECT () As result + FROM () As foo1 + LIMIT 3;'); +BEGIN; + + +COMMIT; + SELECT ' : End Testing'; + + + + + + + + + + +SELECT ' (): Start Testing against other types'; + + + + INSERT INTO (log_label, func, g1, g2, log_start, log_sql) + VALUES(' ','','', '', clock_timestamp(), + ' + SELECT () As result, ST_AsText(foo1.the_geom) As ref1_geom, ST_AsText(foo2.the_geom) As ref2_geom + FROM () As foo1 CROSS JOIN () As foo2 + LIMIT 2;'); + + BEGIN; + + + COMMIT; + + + INSERT INTO (log_label, func, g1, g2, log_start, log_sql) + VALUES(' Other ','', '','', clock_timestamp(), + ' + SELECT ()'); + + SELECT 'Other (): Start Testing , '; + BEGIN; + + + COMMIT; + + + + SELECT '() : End Testing , '; + + + + +SELECT ' (): End Testing against other types'; + + + + + + + UPDATE SET spatial_class = 'geography' WHERE (log_label ILIKE '%geography%' or log_sql ILIKE '%geography%') AND spatial_class IS NULL; + UPDATE SET spatial_class = 'geometry' WHERE log_label ILIKE '%geometry%' or log_label ILIKE '%other%' AND spatial_class IS NULL; + + + + + + + + + + + + + + + + + + + + + + + '' + + + + + + + + + + + + ST_AsGML(foo1.the_geom) + + + ST_AsKML(foo1.the_geom) + + + foo1.the_geom + + + geography(foo1.the_geom) + + + foo2.the_geom + + + geography(foo2.the_geom) + + + ARRAY[foo1.the_geom] + + + ARRAY[foo2.the_geom] + + + ST_AsEWKT(foo1.the_geom) + + + ST_AsText(foo1.the_geom) + + + ST_AsEWKB(foo1.the_geom) + + + ST_AsBinary(foo1.the_geom) + + + + + + + + + + + + + + + + + + + + + '2009-01-01' + + + + + + , + + + + + + + + + + + + + + + + , + + + + + + + + ' + + + + '' + + + + + + + + + + diff -Nru postgis-1.5.3/extensions/Makefile.in postgis-2.0.1/extensions/Makefile.in --- postgis-1.5.3/extensions/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extensions/Makefile.in 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,32 @@ +############################################################################# +# +# Master makefile used to build extensions +# +# Copyright (C) 2012 Sandro Santilli +# +# This is free software; you can redistribute and/or modify it under +# the terms of the GNU General Public Licence. See the COPYING file. +# +############################################################################# + +SUBDIRS = postgis + +ifeq (@TOPOLOGY@,topology) + SUBDIRS += postgis_topology +endif + +all clean distclean install uninstall: + for DIR in $(SUBDIRS); do \ + echo "---- Making $@ in $${DIR}"; \ + $(MAKE) -C "$${DIR}" $@; \ + done + +distclean: distclean-local + +distclean-local: + rm -f Makefile + + +check: + @echo "Nothing to check" + diff -Nru postgis-1.5.3/extensions/README postgis-2.0.1/extensions/README --- postgis-1.5.3/extensions/README 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extensions/README 2012-03-27 14:47:12.000000000 +0000 @@ -0,0 +1,64 @@ +PostGIS Extension for PostgreSQL +================================ + +PostgreSQL 9.1 (and up) supports PostGIS extensions. A database can easily be +extended to use PostGIS using the syntax:: + + CREATE EXTENSION postgis; -- Includes raster + CREATE EXTENSION postgis_topology; -- Depends on postgis + +Requirements +------------ + * PostgreSQL 9.1 or later + * PostGIS must be configured and built ``--with-raster`` + +Building and installing +----------------------- +First, make sure you follow the regular configuration and installation steps, +completing these steps:: + + make + make install + +If you are building from the source SVN repository, it is also recommended to +make the comments, since the function descriptions will be included:: + + make comments + +Making the comments is not necessary if you are building from the tar.gz source +distributions, since these include pre-built ``postgis_comments.sql``, +``topology_comments.sql``, and ``raster_comments.sql`` files. + +Then, to build and install the extensions:: + + cd extensions + make + make install + +The extensions are installed in `SHAREDIR/extension`. (If you're uncertain +where `SHAREDIR` is, run ``pg_config --sharedir``.) + +Then in your PostgreSQL database run:: + + CREATE EXTENSION postgis; + CREATE EXTENSION postgis_topology; + +The dependency logic should warn if you try to install ``postgis_topology`` +without ``postgis`` or try to drop ``postgis`` without first dropping +``postgis_topology``. + +You will also not be able to drop any PostGIS functions installed by the +extension. + +Manual extension installation +----------------------------- +If you want to manually install the extensions from one server to another, +just copy over the following files to the `SHAREDIR/extension` directory: + + * PostGIS (including raster); from ``extensions/postgis``: + ``postgis.control`` + ``sql/*`` + + * Topology extension; from ``extensions/postgis_topolology``: + ``postgis_topology.control`` + ``sql/*`` diff -Nru postgis-1.5.3/extensions/compute_srid_contiguous_ranges.sql postgis-2.0.1/extensions/compute_srid_contiguous_ranges.sql --- postgis-1.5.3/extensions/compute_srid_contiguous_ranges.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extensions/compute_srid_contiguous_ranges.sql 2012-06-08 14:37:04.000000000 +0000 @@ -0,0 +1,24 @@ +--this is the query to use to recompute what spatial_refs to exclude from backup +--it computes the where clause to put in mark_editable_objects.sql.in +WITH s AS -- our series + (SELECT srid As n + FROM spatial_ref_sys + ), + -- get start ranges (numbers where next is not next + 1) +n1 AS (SELECT n AS start_n +FROM s +EXCEPT +SELECT n + 1 AS start_n +FROM s), +-- for each start range find the next start range +n2 AS (SELECT n1.start_n, lead(start_n) OVER (ORDER BY start_n) As next_set_n +FROM n1 +GROUP BY n1.start_n), +-- determine end range for each start +-- end range is the last number that is before start of next range +n3 As (SELECT start_n, MAX(COALESCE(s.n,start_n)) As end_n +FROM n2 LEFT JOIN s ON( s.n >= n2.start_n AND s.n < n2.next_set_n) +GROUP BY start_n, next_set_n +ORDER BY start_n) +SELECT 'NOT (' || string_agg('srid BETWEEN ' || start_n || ' AND ' || end_n, ' OR ' ORDER BY start_n) || ') ' +FROM n3 ; \ No newline at end of file diff -Nru postgis-1.5.3/extensions/make_unpackaged.sql postgis-2.0.1/extensions/make_unpackaged.sql --- postgis-1.5.3/extensions/make_unpackaged.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extensions/make_unpackaged.sql 2012-03-27 23:17:43.000000000 +0000 @@ -0,0 +1,21 @@ +-- for postgis +SELECT 'ALTER EXTENSION ' || extname || ' ADD ' || regexp_replace( + regexp_replace(pg_catalog.pg_describe_object(d.classid, d.objid, 0), E'cast from (.*) to (.*)', E'cast\(\\1 as \\2\)'), + E'(.*) for access method (.*)', E'\\1 using \\2') || ';' AS sqladd +FROM pg_catalog.pg_depend AS d +INNER JOIN pg_extension AS e ON (d.refobjid = e.oid) +WHERE d.refclassid = 'pg_catalog.pg_extension'::pg_catalog.regclass +AND deptype = 'e' AND e.extname = 'postgis' +ORDER BY sqladd; + +-- for topology +SELECT 'ALTER EXTENSION ' || extname || ' ADD ' || regexp_replace( + regexp_replace(pg_catalog.pg_describe_object(d.classid, d.objid, 0), E'cast from (.*) to (.*)', E'cast\(\\1 as \\2\)'), + E'(.*) for access method (.*)', E'\\1 using \\2') || ';' AS sqladd +FROM pg_catalog.pg_depend AS d +INNER JOIN pg_extension AS e ON (d.refobjid = e.oid) +WHERE d.refclassid = 'pg_catalog.pg_extension'::pg_catalog.regclass +AND deptype = 'e' AND e.extname = 'postgis_topology' +ORDER BY sqladd; + + diff -Nru postgis-1.5.3/extensions/postgis/META.json postgis-2.0.1/extensions/postgis/META.json --- postgis-1.5.3/extensions/postgis/META.json 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extensions/postgis/META.json 2012-01-09 20:17:59.000000000 +0000 @@ -0,0 +1,57 @@ +{ + "name": "postgis", + "abstract": "PostGIS 2.0 OGC/SQL-MM compliant spatial extender for PostgreSQL", + "description": "This module provides GIS geometry, geography, raster types, functions, and tables", + "version": "2.0.0a1", + "release_status": "unstable", + "maintainer": "PostGIS Steering Committee", + "license": "gpl_2", + "provides": { + "postgis": { + "abstract": "PostGIS GIS types, indexes and functions", + "version": "2.0.0", + "file": "sql/postgis.sql", + "docfile": "doc/postgis.md" + }, + "spatial_ref_sys": { + "file": "sql/spatial_ref_sys.sql", + "version": "2.0.0", + "abstract": "Directory of spatial reference systems needed for geometry transformation between different spatial reference systems" + }, + "raster": { + "file": "sql/rtpostgis.sql", + "version": "2.0.0", + "abstract": "Raster functions and types" + } + }, + "prereqs": { + "runtime": { + "requires": { + "plpgsql": 0, + "PostgreSQL": "8.4.0" + } + } + }, + "generated_by": "Regina O. Obe", + "resources": { + "bugtracker": { + "web": "http://trac.osgeo.org/postgis" + }, + "repository": { + "url": "svn://svn.osgeo.org/postgis/", + "web": "http://www.postgis.org", + "type": "svn" + } + }, + "meta-spec": { + "version": "1.0.0", + "url": "http://pgxn.org/meta/spec.txt" + }, + "tags": [ + "gis", + "spatial", + "geometry","raster", + "geography", + "location" + ] +} diff -Nru postgis-1.5.3/extensions/postgis/Makefile.in postgis-2.0.1/extensions/postgis/Makefile.in --- postgis-1.5.3/extensions/postgis/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extensions/postgis/Makefile.in 2012-03-27 23:17:43.000000000 +0000 @@ -0,0 +1,152 @@ +include ../upgradeable_versions.mk + +EXTENSION = postgis +EXTVERSION = @POSTGIS_LIB_VERSION@ +MINORVERSION = @POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@ + +MICRO_NUMBER = $(shell echo $(EXTVERSION) | sed "s/[0-9]\.[0-9]\.\([0-9]*\)[a-zA-Z]*[0-9]*/\1/") +PREREL_NUMBER = $(shell echo $(EXTVERSION) | \ + sed "s/[0-9]\.[0-9]\.\(.*\)/\1/" | \ + grep "[a-zA-Z]" | \ + sed "s/[0-9][a-zA-Z]\([0-9]*\)[a-zA-Z]*/\1/") +MICRO_PREV = $(shell if test "$(MICRO_NUMBER)x" != "x"; then expr $(MICRO_NUMBER) - 1; fi) +PREREL_PREV = $(shell if test "$(PREREL_NUMBER)x" != "x"; then expr $(PREREL_NUMBER) - 1; fi) + +PREREL_PREFIX = $(shell echo $(EXTVERSION) | \ + sed "s/[0-9]\.[0-9]\.\(.*\)/\1/" | \ + grep "[a-zA-Z]" | \ + sed "s/\([0-9][a-zA-Z]*\)[0-9]*/\1/") + +DATA = $(filter-out $(wildcard sql/*--*.sql),$(wildcard sql/*.sql)) + +#DOCS = $(wildcard ../../doc/html/*.html) +PG_CONFIG = @PGCONFIG@ + +PG91 = $(shell $(PG_CONFIG) --version | grep -qE " 8\.| 9\.0" && echo no || echo yes) +SQL_BITS = $(wildcard sql_bits/*.sql) +EXTRA_CLEAN += ${SQL_BITS} sql/*.sql + + +ifeq ($(PG91),yes) +sql/$(EXTENSION).sql: sql_bits/postgis.sql sql_bits/postgis_comments.sql sql_bits/rtpostgis.sql sql_bits/mark_editable_objects.sql.in sql_bits/raster_comments.sql sql_bits/spatial_ref_sys.sql + cat $^ > $@ + +all: sql/$(EXTENSION)--$(EXTVERSION).sql sql/$(EXTENSION)--unpackaged--$(EXTVERSION).sql sql_minor_upgrade + +sql/$(EXTENSION)--$(EXTVERSION).sql: sql/$(EXTENSION).sql + cp $< $@ + +sql/$(EXTENSION)--unpackaged--$(EXTVERSION).sql: sql_bits/postgis--unpackaged.sql.in + cp $< $@ + +#strip BEGIN/COMMIT since these are not allowed in extensions +sql_bits/spatial_ref_sys.sql: ../../spatial_ref_sys.sql + sed -e 's/BEGIN;//g' -e 's/COMMIT;//g' $< > $@ + +#strip BEGIN/COMMIT since these are not allowed in extensions +sql_bits/postgis.sql: ../../postgis/postgis.sql + sed -e 's/BEGIN;//g' -e 's/COMMIT;//g' $< > $@ + +../../doc/postgis_comments.sql: + $(MAKE) -C ../../doc comments + +sql_bits/postgis_comments.sql: ../../doc/postgis_comments.sql + cp $< $@ + +#strip BEGIN/COMMIT since these are not allowed in extensions +sql_bits/rtpostgis.sql: ../../raster/rt_pg/rtpostgis.sql + sed -e 's/BEGIN;//g' -e 's/COMMIT;//g' $< > $@ + +# we need to also drop this temporary function from the extension +# for casts that are being dropped we need to drop them +# from extension only if they are in the existension so we use our postgis_extension_drop.. +# so that it will silently fail if cast is not in extension +sql_bits/rtpostgis_upgrade_20_minor.sql: ../../raster/rt_pg/rtpostgis_upgrade_20_minor.sql + sed -e 's/BEGIN;//g' -e 's/COMMIT;//g' \ + -e 's/DROP FUNCTION _rename_raster_tables();/ALTER EXTENSION ${EXTENSION} DROP FUNCTION _rename_raster_tables();DROP FUNCTION _rename_raster_tables();/g' \ + -e 's/DROP FUNCTION _drop_st_samealignment();/ALTER EXTENSION ${EXTENSION} DROP FUNCTION _drop_st_samealignment();DROP FUNCTION _drop_st_samealignment();/g' \ + -e 's/DROP CAST\(.*\)/SELECT postgis_extension_drop_if_exists('\''$(EXTENSION)'\'', '\''DROP CAST \1'\'');DROP CAST \1/' \ + $< > $@ + +#can't use the one built because can't drop the postgis_version function +#leave out all casts, operators, types, tables, schemas +# sql_bits/postgis_upgrade_minor.sql: ../../postgis/postgis.sql +# sed -e '/^\(CREATE\|ALTER\) \(CAST\|OPERATOR\|TYPE\|TABLE\|SCHEMA\|DOMAIN\|TRIGGER\).*;/d' \ +# -e '/^\(CREATE\|ALTER\) \(CAST\|OPERATOR\|TYPE\|TABLE\|SCHEMA\|DOMAIN\|TRIGGER\)/,/\;/d' \ +# -e 's/BEGIN;//g' -e 's/COMMIT;//g' \ +# $< > $@ +#don't drop casts just yet since we don't have provision to remove from extension yet +#need to also drop temeporary functions from extenions since it gets auto-added +sql_bits/postgis_upgrade_minor.sql: ../../postgis/postgis_upgrade_20_minor.sql + sed -e 's/BEGIN;//g' -e 's/COMMIT;//g' \ + -e '/^\(DROP\|CREATE\) \(CAST\).*;/d' \ + -e '/^\(DROP\|CREATE\) \(CAST\)/,/\;/d' \ + -e 's/DROP FUNCTION postgis_major_version_check();/ALTER EXTENSION ${EXTENSION} DROP FUNCTION postgis_major_version_check();DROP FUNCTION postgis_major_version_check();/g' \ + $< > $@ + + +../../doc/raster_comments.sql: + $(MAKE) -C ../../doc comments + +sql_bits/raster_comments.sql: ../../doc/raster_comments.sql + cp $< $@ + +#postgis_raster_upgrade_minor.sql is the one that contains both postgis AND raster +#TODO: come up with a better name +#TODO: what about postgis_drop_after.sql ? where does it fit ?? +sql_bits/postgis_raster_upgrade_minor.sql: ../postgis_extension_helper.sql sql_bits/remove_from_extension.sql.in ../../postgis/postgis_drop_before.sql sql_bits/postgis_upgrade_minor.sql sql_bits/rtpostgis_upgrade_20_minor.sql sql_bits/mark_editable_objects.sql.in ../../doc/raster_comments.sql ../../doc/postgis_comments.sql ../postgis_extension_helper_uninstall.sql + cat $^ > $@ + +# sql_bits/rtpostgis--unpackaged.sql: ../../raster/rt_pg/rtpostgis.sql +# sed -e 's/^[\t]*//' \ +# -e :a -e '$!N; s/,\n/,/; ta' \ +# $< > $@ +#remove leading white space and tabs +#remove line break from a line if it ends in , + +sql_bits/rtpostgis-filtered.sql: ../../raster/rt_pg/rtpostgis.sql + sed \ + -e 's/^[\t]*//' \ + $< > $@ + +## we are going to hard code for now using sql script to generate unpackage script +# sql_bits/rtpostgis--unpackaged.sql: ../../raster/rt_pg/rtpostgis.sql +# sed \ +# -e 's/^[\t]*//' \ +# -e '$!N; s/(\n/(/g' \ +# -e '/^CREATE \(OR REPLACE FUNCTION\|TRIGGER\|TYPE\|TABLE\|VIEW\)/!d;' \ +# -e 's/OR REPLACE//g' \ +# -e 's/CREATE\(.*\)/ALTER EXTENSION $(EXTENSION) ADD\1;/' \ +# -e 's/DEFAULT [^()]\+//g' \ +# -e 's/\(BEFORE\|AS\|RETURNS\)\(.*\)/;/' \ +# -e 's/(;/;/' \ +# -e 's/\\(;/;/' \ +# -e 's/;;/;/g' $< > $@ + +# sql_bits/postgis--unpackaged.sql: ../../postgis/postgis.sql +# sed -e '/^CREATE \(OR REPLACE\|TRIGGER\|TYPE\|TABLE\|VIEW\)/!d;' \ +# -e 's/OR REPLACE//g' \ +# -e 's/CREATE\(.*\)/ALTER EXTENSION $(EXTENSION) ADD\1;/' \ +# -e 's/DEFAULT [\.0-9a-zA-Z]\+//g' \ +# -e 's/\(BEFORE\|AS\|RETURNS\)\(.*\)/;/' \ +# -e 's/(;/;/' \ +# -e 's/\\(;/;/' \ +# -e 's/;;/;/g' $< > $@ + + +sql/postgis--unpackaged--$(EXTVERSION).sql: sql_bits/postgis--unpackaged.sql.in + +sql_minor_upgrade: sql_bits/postgis_raster_upgrade_minor.sql + for OLD_VERSION in $(UPGRADEABLE_VERSIONS); do \ + cat $< > sql/$(EXTENSION)--$$OLD_VERSION--$(EXTVERSION).sql; \ + done + +DATA = $(wildcard sql/*--*.sql) sql/$(EXTENSION)--$(EXTVERSION).sql +EXTRA_CLEAN += sql/$(EXTENSION)--$(EXTVERSION).sql sql/postgis--unpackaged--$(EXTVERSION).sql +endif + +distclean: clean + rm -f Makefile + +PGXS := $(shell $(PG_CONFIG) --pgxs) +include $(PGXS) diff -Nru postgis-1.5.3/extensions/postgis/doc/postgis.md postgis-2.0.1/extensions/postgis/doc/postgis.md --- postgis-1.5.3/extensions/postgis/doc/postgis.md 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extensions/postgis/doc/postgis.md 2012-01-09 20:17:59.000000000 +0000 @@ -0,0 +1,6 @@ +PostGIS 2.0.0 +============ + +Extensive documentation can be found at. +HTML: http://www.postgis.org/documentation/manual-svn/ +PDF: http://www.postgis.org/download/postgis-2.0.0SVN.pdf diff -Nru postgis-1.5.3/extensions/postgis/postgis.control postgis-2.0.1/extensions/postgis/postgis.control --- postgis-1.5.3/extensions/postgis/postgis.control 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extensions/postgis/postgis.control 2012-06-22 21:04:32.000000000 +0000 @@ -0,0 +1,5 @@ +# postgis extension +comment = 'PostGIS geometry, geography, and raster spatial types and functions' +default_version = '2.0.1' +module_pathname = '$libdir/postgis-2.0' +relocatable = true diff -Nru postgis-1.5.3/extensions/postgis/postgis.control.in postgis-2.0.1/extensions/postgis/postgis.control.in --- postgis-1.5.3/extensions/postgis/postgis.control.in 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extensions/postgis/postgis.control.in 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,5 @@ +# postgis extension +comment = 'PostGIS geometry, geography, and raster spatial types and functions' +default_version = '@POSTGIS_LIB_VERSION@' +module_pathname = '$libdir/postgis-@POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@' +relocatable = true diff -Nru postgis-1.5.3/extensions/postgis/sql_bits/mark_editable_objects.sql.in postgis-2.0.1/extensions/postgis/sql_bits/mark_editable_objects.sql.in --- postgis-1.5.3/extensions/postgis/sql_bits/mark_editable_objects.sql.in 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extensions/postgis/sql_bits/mark_editable_objects.sql.in 2012-06-08 14:37:04.000000000 +0000 @@ -0,0 +1 @@ +SELECT pg_catalog.pg_extension_config_dump('spatial_ref_sys', 'WHERE NOT (srid BETWEEN 2000 AND 2180 OR srid BETWEEN 2188 AND 2217 OR srid BETWEEN 2219 AND 2220 OR srid BETWEEN 2222 AND 2292 OR srid BETWEEN 2294 AND 2295 OR srid BETWEEN 2308 AND 2962 OR srid BETWEEN 2964 AND 2973 OR srid BETWEEN 2975 AND 2984 OR srid BETWEEN 2987 AND 3051 OR srid BETWEEN 3054 AND 3138 OR srid BETWEEN 3140 AND 3143 OR srid BETWEEN 3146 AND 3172 OR srid BETWEEN 3174 AND 3294 OR srid BETWEEN 3296 AND 3791 OR srid BETWEEN 3793 AND 3802 OR srid BETWEEN 3812 AND 3812 OR srid BETWEEN 3814 AND 3816 OR srid BETWEEN 3819 AND 3819 OR srid BETWEEN 3821 AND 3821 OR srid BETWEEN 3824 AND 3829 OR srid BETWEEN 3832 AND 3852 OR srid BETWEEN 3854 AND 3854 OR srid BETWEEN 3857 AND 3857 OR srid BETWEEN 3889 AND 3893 OR srid BETWEEN 3906 AND 3912 OR srid BETWEEN 3920 AND 3920 OR srid BETWEEN 3942 AND 3950 OR srid BETWEEN 3968 AND 3970 OR srid BETWEEN 3975 AND 3976 OR srid BETWEEN 3978 AND 3979 OR srid BETWEEN 3985 AND 3989 OR srid BETWEEN 3991 AND 3992 OR srid BETWEEN 3994 AND 3997 OR srid BETWEEN 4001 AND 4016 OR srid BETWEEN 4018 AND 4038 OR srid BETWEEN 4041 AND 4063 OR srid BETWEEN 4071 AND 4071 OR srid BETWEEN 4075 AND 4075 OR srid BETWEEN 4081 AND 4083 OR srid BETWEEN 4093 AND 4096 OR srid BETWEEN 4120 AND 4176 OR srid BETWEEN 4178 AND 4185 OR srid BETWEEN 4188 AND 4216 OR srid BETWEEN 4218 AND 4289 OR srid BETWEEN 4291 AND 4304 OR srid BETWEEN 4306 AND 4319 OR srid BETWEEN 4322 AND 4322 OR srid BETWEEN 4324 AND 4324 OR srid BETWEEN 4326 AND 4326 OR srid BETWEEN 4414 AND 4415 OR srid BETWEEN 4417 AND 4417 OR srid BETWEEN 4434 AND 4434 OR srid BETWEEN 4437 AND 4437 OR srid BETWEEN 4455 AND 4457 OR srid BETWEEN 4462 AND 4463 OR srid BETWEEN 4467 AND 4467 OR srid BETWEEN 4470 AND 4471 OR srid BETWEEN 4474 AND 4475 OR srid BETWEEN 4483 AND 4555 OR srid BETWEEN 4558 AND 4559 OR srid BETWEEN 4568 AND 4589 OR srid BETWEEN 4600 AND 4647 OR srid BETWEEN 4652 AND 4824 OR srid BETWEEN 4826 AND 4826 OR srid BETWEEN 4901 AND 4904 OR srid BETWEEN 20004 AND 20032 OR srid BETWEEN 20064 AND 20092 OR srid BETWEEN 20135 AND 20138 OR srid BETWEEN 20248 AND 20258 OR srid BETWEEN 20348 AND 20358 OR srid BETWEEN 20436 AND 20440 OR srid BETWEEN 20499 AND 20499 OR srid BETWEEN 20538 AND 20539 OR srid BETWEEN 20790 AND 20791 OR srid BETWEEN 20822 AND 20824 OR srid BETWEEN 20934 AND 20936 OR srid BETWEEN 21035 AND 21037 OR srid BETWEEN 21095 AND 21097 OR srid BETWEEN 21100 AND 21100 OR srid BETWEEN 21148 AND 21150 OR srid BETWEEN 21291 AND 21292 OR srid BETWEEN 21413 AND 21423 OR srid BETWEEN 21453 AND 21463 OR srid BETWEEN 21473 AND 21483 OR srid BETWEEN 21500 AND 21500 OR srid BETWEEN 21780 AND 21782 OR srid BETWEEN 21817 AND 21818 OR srid BETWEEN 21891 AND 21894 OR srid BETWEEN 21896 AND 21899 OR srid BETWEEN 22032 AND 22033 OR srid BETWEEN 22091 AND 22092 OR srid BETWEEN 22171 AND 22177 OR srid BETWEEN 22181 AND 22187 OR srid BETWEEN 22191 AND 22197 OR srid BETWEEN 22234 AND 22236 OR srid BETWEEN 22275 AND 22275 OR srid BETWEEN 22277 AND 22277 OR srid BETWEEN 22279 AND 22279 OR srid BETWEEN 22281 AND 22281 OR srid BETWEEN 22283 AND 22283 OR srid BETWEEN 22285 AND 22285 OR srid BETWEEN 22287 AND 22287 OR srid BETWEEN 22289 AND 22289 OR srid BETWEEN 22291 AND 22291 OR srid BETWEEN 22293 AND 22293 OR srid BETWEEN 22300 AND 22300 OR srid BETWEEN 22332 AND 22332 OR srid BETWEEN 22391 AND 22392 OR srid BETWEEN 22521 AND 22525 OR srid BETWEEN 22700 AND 22700 OR srid BETWEEN 22770 AND 22770 OR srid BETWEEN 22780 AND 22780 OR srid BETWEEN 22832 AND 22832 OR srid BETWEEN 22991 AND 22994 OR srid BETWEEN 23028 AND 23038 OR srid BETWEEN 23090 AND 23090 OR srid BETWEEN 23095 AND 23095 OR srid BETWEEN 23239 AND 23240 OR srid BETWEEN 23433 AND 23433 OR srid BETWEEN 23700 AND 23700 OR srid BETWEEN 23830 AND 23853 OR srid BETWEEN 23866 AND 23872 OR srid BETWEEN 23877 AND 23884 OR srid BETWEEN 23886 AND 23894 OR srid BETWEEN 23946 AND 23948 OR srid BETWEEN 24047 AND 24048 OR srid BETWEEN 24100 AND 24100 OR srid BETWEEN 24200 AND 24200 OR srid BETWEEN 24305 AND 24306 OR srid BETWEEN 24311 AND 24313 OR srid BETWEEN 24342 AND 24347 OR srid BETWEEN 24370 AND 24383 OR srid BETWEEN 24500 AND 24500 OR srid BETWEEN 24547 AND 24548 OR srid BETWEEN 24571 AND 24571 OR srid BETWEEN 24600 AND 24600 OR srid BETWEEN 24718 AND 24720 OR srid BETWEEN 24817 AND 24821 OR srid BETWEEN 24877 AND 24882 OR srid BETWEEN 24891 AND 24893 OR srid BETWEEN 25000 AND 25000 OR srid BETWEEN 25231 AND 25231 OR srid BETWEEN 25391 AND 25395 OR srid BETWEEN 25700 AND 25700 OR srid BETWEEN 25828 AND 25838 OR srid BETWEEN 25884 AND 25884 OR srid BETWEEN 25932 AND 25932 OR srid BETWEEN 26191 AND 26195 OR srid BETWEEN 26237 AND 26237 OR srid BETWEEN 26331 AND 26332 OR srid BETWEEN 26391 AND 26393 OR srid BETWEEN 26432 AND 26432 OR srid BETWEEN 26591 AND 26592 OR srid BETWEEN 26632 AND 26632 OR srid BETWEEN 26692 AND 26692 OR srid BETWEEN 26701 AND 26722 OR srid BETWEEN 26729 AND 26760 OR srid BETWEEN 26766 AND 26787 OR srid BETWEEN 26791 AND 26799 OR srid BETWEEN 26801 AND 26803 OR srid BETWEEN 26811 AND 26815 OR srid BETWEEN 26819 AND 26826 OR srid BETWEEN 26830 AND 26837 OR srid BETWEEN 26841 AND 26870 OR srid BETWEEN 26891 AND 26899 OR srid BETWEEN 26901 AND 26923 OR srid BETWEEN 26929 AND 26946 OR srid BETWEEN 26948 AND 26998 OR srid BETWEEN 27037 AND 27040 OR srid BETWEEN 27120 AND 27120 OR srid BETWEEN 27200 AND 27200 OR srid BETWEEN 27205 AND 27232 OR srid BETWEEN 27258 AND 27260 OR srid BETWEEN 27291 AND 27292 OR srid BETWEEN 27391 AND 27398 OR srid BETWEEN 27429 AND 27429 OR srid BETWEEN 27492 AND 27493 OR srid BETWEEN 27500 AND 27500 OR srid BETWEEN 27561 AND 27564 OR srid BETWEEN 27571 AND 27574 OR srid BETWEEN 27581 AND 27584 OR srid BETWEEN 27591 AND 27594 OR srid BETWEEN 27700 AND 27700 OR srid BETWEEN 28191 AND 28193 OR srid BETWEEN 28232 AND 28232 OR srid BETWEEN 28348 AND 28358 OR srid BETWEEN 28402 AND 28432 OR srid BETWEEN 28462 AND 28492 OR srid BETWEEN 28600 AND 28600 OR srid BETWEEN 28991 AND 28992 OR srid BETWEEN 29100 AND 29101 OR srid BETWEEN 29118 AND 29122 OR srid BETWEEN 29168 AND 29172 OR srid BETWEEN 29177 AND 29185 OR srid BETWEEN 29187 AND 29195 OR srid BETWEEN 29220 AND 29221 OR srid BETWEEN 29333 AND 29333 OR srid BETWEEN 29371 AND 29371 OR srid BETWEEN 29373 AND 29373 OR srid BETWEEN 29375 AND 29375 OR srid BETWEEN 29377 AND 29377 OR srid BETWEEN 29379 AND 29379 OR srid BETWEEN 29381 AND 29381 OR srid BETWEEN 29383 AND 29383 OR srid BETWEEN 29385 AND 29385 OR srid BETWEEN 29635 AND 29636 OR srid BETWEEN 29700 AND 29702 OR srid BETWEEN 29738 AND 29739 OR srid BETWEEN 29849 AND 29850 OR srid BETWEEN 29871 AND 29873 OR srid BETWEEN 29900 AND 29903 OR srid BETWEEN 30161 AND 30179 OR srid BETWEEN 30200 AND 30200 OR srid BETWEEN 30339 AND 30340 OR srid BETWEEN 30491 AND 30494 OR srid BETWEEN 30729 AND 30732 OR srid BETWEEN 30791 AND 30792 OR srid BETWEEN 30800 AND 30800 OR srid BETWEEN 31028 AND 31028 OR srid BETWEEN 31121 AND 31121 OR srid BETWEEN 31154 AND 31154 OR srid BETWEEN 31170 AND 31171 OR srid BETWEEN 31251 AND 31259 OR srid BETWEEN 31265 AND 31268 OR srid BETWEEN 31275 AND 31279 OR srid BETWEEN 31281 AND 31297 OR srid BETWEEN 31300 AND 31300 OR srid BETWEEN 31370 AND 31370 OR srid BETWEEN 31461 AND 31469 OR srid BETWEEN 31528 AND 31529 OR srid BETWEEN 31600 AND 31600 OR srid BETWEEN 31700 AND 31700 OR srid BETWEEN 31838 AND 31839 OR srid BETWEEN 31900 AND 31901 OR srid BETWEEN 31965 AND 32003 OR srid BETWEEN 32005 AND 32031 OR srid BETWEEN 32033 AND 32058 OR srid BETWEEN 32061 AND 32062 OR srid BETWEEN 32064 AND 32067 OR srid BETWEEN 32074 AND 32077 OR srid BETWEEN 32081 AND 32086 OR srid BETWEEN 32098 AND 32100 OR srid BETWEEN 32104 AND 32104 OR srid BETWEEN 32107 AND 32130 OR srid BETWEEN 32133 AND 32158 OR srid BETWEEN 32161 AND 32161 OR srid BETWEEN 32164 AND 32167 OR srid BETWEEN 32180 AND 32199 OR srid BETWEEN 32201 AND 32260 OR srid BETWEEN 32301 AND 32360 OR srid BETWEEN 32401 AND 32460 OR srid BETWEEN 32501 AND 32560 OR srid BETWEEN 32601 AND 32662 OR srid BETWEEN 32664 AND 32667 OR srid BETWEEN 32701 AND 32761 OR srid BETWEEN 32766 AND 32766 OR srid BETWEEN 900913 AND 900913)'); diff -Nru postgis-1.5.3/extensions/postgis/sql_bits/postgis--unpackaged.sql.in postgis-2.0.1/extensions/postgis/sql_bits/postgis--unpackaged.sql.in --- postgis-1.5.3/extensions/postgis/sql_bits/postgis--unpackaged.sql.in 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extensions/postgis/sql_bits/postgis--unpackaged.sql.in 2012-03-27 23:17:43.000000000 +0000 @@ -0,0 +1,1002 @@ +ALTER EXTENSION postgis ADD cast(box2d as box3d); +ALTER EXTENSION postgis ADD cast(box2d as geometry); +ALTER EXTENSION postgis ADD cast(box3d as box); +ALTER EXTENSION postgis ADD cast(box3d as box2d); +ALTER EXTENSION postgis ADD cast(box3d as geometry); +ALTER EXTENSION postgis ADD cast(bytea as geography); +ALTER EXTENSION postgis ADD cast(bytea as geometry); +ALTER EXTENSION postgis ADD cast(geography as bytea); +ALTER EXTENSION postgis ADD cast(geography as geography); +ALTER EXTENSION postgis ADD cast(geography as geometry); +ALTER EXTENSION postgis ADD cast(geometry as box); +ALTER EXTENSION postgis ADD cast(geometry as box2d); +ALTER EXTENSION postgis ADD cast(geometry as box3d); +ALTER EXTENSION postgis ADD cast(geometry as bytea); +ALTER EXTENSION postgis ADD cast(geometry as geography); +ALTER EXTENSION postgis ADD cast(geometry as geometry); +ALTER EXTENSION postgis ADD cast(geometry as text); +ALTER EXTENSION postgis ADD cast(raster as box3d); +ALTER EXTENSION postgis ADD cast(raster as bytea); +ALTER EXTENSION postgis ADD cast(raster as geometry); +ALTER EXTENSION postgis ADD cast(text as geometry); +ALTER EXTENSION postgis ADD function _add_overview_constraint(name,name,name,name,name,name,integer); +ALTER EXTENSION postgis ADD function _add_raster_constraint(name,text); +ALTER EXTENSION postgis ADD function _add_raster_constraint_alignment(name,name,name); +ALTER EXTENSION postgis ADD function _add_raster_constraint_blocksize(name,name,name,text); +ALTER EXTENSION postgis ADD function _add_raster_constraint_extent(name,name,name); +ALTER EXTENSION postgis ADD function _add_raster_constraint_nodata_values(name,name,name); +ALTER EXTENSION postgis ADD function _add_raster_constraint_num_bands(name,name,name); +ALTER EXTENSION postgis ADD function _add_raster_constraint_out_db(name,name,name); +ALTER EXTENSION postgis ADD function _add_raster_constraint_pixel_types(name,name,name); +ALTER EXTENSION postgis ADD function _add_raster_constraint_regular_blocking(name,name,name); +ALTER EXTENSION postgis ADD function _add_raster_constraint_scale(name,name,name,character); +ALTER EXTENSION postgis ADD function _add_raster_constraint_srid(name,name,name); +ALTER EXTENSION postgis ADD function _drop_overview_constraint(name,name,name); +ALTER EXTENSION postgis ADD function _drop_raster_constraint(name,name,name); +ALTER EXTENSION postgis ADD function _drop_raster_constraint_alignment(name,name,name); +ALTER EXTENSION postgis ADD function _drop_raster_constraint_blocksize(name,name,name,text); +ALTER EXTENSION postgis ADD function _drop_raster_constraint_extent(name,name,name); +ALTER EXTENSION postgis ADD function _drop_raster_constraint_nodata_values(name,name,name); +ALTER EXTENSION postgis ADD function _drop_raster_constraint_num_bands(name,name,name); +ALTER EXTENSION postgis ADD function _drop_raster_constraint_out_db(name,name,name); +ALTER EXTENSION postgis ADD function _drop_raster_constraint_pixel_types(name,name,name); +ALTER EXTENSION postgis ADD function _drop_raster_constraint_regular_blocking(name,name,name); +ALTER EXTENSION postgis ADD function _drop_raster_constraint_scale(name,name,name,character); +ALTER EXTENSION postgis ADD function _drop_raster_constraint_srid(name,name,name); +ALTER EXTENSION postgis ADD function _overview_constraint(raster,integer,name,name,name); +ALTER EXTENSION postgis ADD function _overview_constraint_info(name,name,name); +ALTER EXTENSION postgis ADD function _raster_constraint_info_alignment(name,name,name); +ALTER EXTENSION postgis ADD function _raster_constraint_info_blocksize(name,name,name,text); +ALTER EXTENSION postgis ADD function _raster_constraint_info_extent(name,name,name); +ALTER EXTENSION postgis ADD function _raster_constraint_info_nodata_values(name,name,name); +ALTER EXTENSION postgis ADD function _raster_constraint_info_num_bands(name,name,name); +ALTER EXTENSION postgis ADD function _raster_constraint_info_out_db(name,name,name); +ALTER EXTENSION postgis ADD function _raster_constraint_info_pixel_types(name,name,name); +ALTER EXTENSION postgis ADD function _raster_constraint_info_regular_blocking(name,name,name); +ALTER EXTENSION postgis ADD function _raster_constraint_info_scale(name,name,name,character); +ALTER EXTENSION postgis ADD function _raster_constraint_info_srid(name,name,name); +ALTER EXTENSION postgis ADD function _raster_constraint_nodata_values(raster); +ALTER EXTENSION postgis ADD function _raster_constraint_out_db(raster); +ALTER EXTENSION postgis ADD function _raster_constraint_pixel_types(raster); +ALTER EXTENSION postgis ADD function _st_3ddfullywithin(geometry,geometry,double precision); +ALTER EXTENSION postgis ADD function _st_3ddwithin(geometry,geometry,double precision); +ALTER EXTENSION postgis ADD function _st_asgeojson(integer,geography,integer,integer); +ALTER EXTENSION postgis ADD function _st_asgeojson(integer,geometry,integer,integer); +ALTER EXTENSION postgis ADD function _st_asgml(integer,geography,integer,integer,text); +ALTER EXTENSION postgis ADD function _st_asgml(integer,geometry,integer,integer,text); +ALTER EXTENSION postgis ADD function _st_askml(integer,geography,integer,text); +ALTER EXTENSION postgis ADD function _st_askml(integer,geometry,integer,text); +ALTER EXTENSION postgis ADD function _st_aspect4ma(double precision[],text,text[]); +ALTER EXTENSION postgis ADD function _st_asraster(geometry,double precision,double precision,integer,integer,text[],double precision[],double precision[],double precision,double precision,double precision,double precision,double precision,double precision,boolean); +ALTER EXTENSION postgis ADD function _st_asx3d(integer,geometry,integer,integer,text); +ALTER EXTENSION postgis ADD function _st_bestsrid(geography); +ALTER EXTENSION postgis ADD function _st_bestsrid(geography,geography); +ALTER EXTENSION postgis ADD function _st_buffer(geometry,double precision,cstring); +ALTER EXTENSION postgis ADD function _st_concavehull(geometry); +ALTER EXTENSION postgis ADD function _st_contains(geometry,geometry); +ALTER EXTENSION postgis ADD function _st_containsproperly(geometry,geometry); +ALTER EXTENSION postgis ADD function _st_count(raster,integer,boolean,double precision); +ALTER EXTENSION postgis ADD function _st_count(text,text,integer,boolean,double precision); +ALTER EXTENSION postgis ADD function _st_coveredby(geometry,geometry); +ALTER EXTENSION postgis ADD function _st_covers(geography,geography); +ALTER EXTENSION postgis ADD function _st_covers(geometry,geometry); +ALTER EXTENSION postgis ADD function _st_crosses(geometry,geometry); +ALTER EXTENSION postgis ADD function _st_dfullywithin(geometry,geometry,double precision); +ALTER EXTENSION postgis ADD function _st_distance(geography,geography,double precision,boolean); +ALTER EXTENSION postgis ADD function _st_dumppoints(geometry,integer[]); +ALTER EXTENSION postgis ADD function _st_dwithin(geography,geography,double precision,boolean); +ALTER EXTENSION postgis ADD function _st_dwithin(geometry,geometry,double precision); +ALTER EXTENSION postgis ADD function _st_equals(geometry,geometry); +ALTER EXTENSION postgis ADD function _st_expand(geography,double precision); +ALTER EXTENSION postgis ADD function _st_geomfromgml(text,integer); +ALTER EXTENSION postgis ADD function _st_hillshade4ma(double precision[],text,text[]); +ALTER EXTENSION postgis ADD function _st_histogram(raster,integer,boolean,double precision,integer,double precision[],boolean,double precision,double precision); +ALTER EXTENSION postgis ADD function _st_histogram(text,text,integer,boolean,double precision,integer,double precision[],boolean); +ALTER EXTENSION postgis ADD function _st_intersects(geometry,geometry); +ALTER EXTENSION postgis ADD function _st_intersects(geometry,raster,integer); +ALTER EXTENSION postgis ADD function _st_intersects(raster,geometry,integer); +ALTER EXTENSION postgis ADD function _st_intersects(raster,integer,raster,integer); +ALTER EXTENSION postgis ADD function _st_linecrossingdirection(geometry,geometry); +ALTER EXTENSION postgis ADD function _st_longestline(geometry,geometry); +ALTER EXTENSION postgis ADD function _st_mapalgebra4unionfinal1(raster); +ALTER EXTENSION postgis ADD function _st_mapalgebra4unionstate(raster,raster); +ALTER EXTENSION postgis ADD function _st_mapalgebra4unionstate(raster,raster,integer); +ALTER EXTENSION postgis ADD function _st_mapalgebra4unionstate(raster,raster,integer,text); +ALTER EXTENSION postgis ADD function _st_mapalgebra4unionstate(raster,raster,text); +ALTER EXTENSION postgis ADD function _st_mapalgebra4unionstate(raster,raster,text,text,text,double precision,text,text,text,double precision); +ALTER EXTENSION postgis ADD function _st_maxdistance(geometry,geometry); +ALTER EXTENSION postgis ADD function _st_orderingequals(geometry,geometry); +ALTER EXTENSION postgis ADD function _st_overlaps(geometry,geometry); +ALTER EXTENSION postgis ADD function _st_pointoutside(geography); +ALTER EXTENSION postgis ADD function _st_quantile(raster,integer,boolean,double precision,double precision[]); +ALTER EXTENSION postgis ADD function _st_quantile(text,text,integer,boolean,double precision,double precision[]); +ALTER EXTENSION postgis ADD function _st_reclass(raster,reclassarg[]); +ALTER EXTENSION postgis ADD function _st_resample(raster,text,double precision,integer,double precision,double precision,double precision,double precision,double precision,double precision,integer,integer); +ALTER EXTENSION postgis ADD function _st_slope4ma(double precision[],text,text[]); +ALTER EXTENSION postgis ADD function _st_summarystats(raster,integer,boolean,double precision); +ALTER EXTENSION postgis ADD function _st_summarystats(text,text,integer,boolean,double precision); +ALTER EXTENSION postgis ADD function _st_touches(geometry,geometry); +ALTER EXTENSION postgis ADD function _st_valuecount(raster,integer,boolean,double precision[],double precision); +ALTER EXTENSION postgis ADD function _st_valuecount(text,text,integer,boolean,double precision[],double precision); +ALTER EXTENSION postgis ADD function _st_within(geometry,geometry); +ALTER EXTENSION postgis ADD function addauth(text); +ALTER EXTENSION postgis ADD function addgeometrycolumn(character varying,character varying,character varying,character varying,integer,character varying,integer,boolean); +ALTER EXTENSION postgis ADD function addgeometrycolumn(character varying,character varying,character varying,integer,character varying,integer,boolean); +ALTER EXTENSION postgis ADD function addgeometrycolumn(character varying,character varying,integer,character varying,integer,boolean); +ALTER EXTENSION postgis ADD function addoverviewconstraints(name,name,name,name,integer); +ALTER EXTENSION postgis ADD function addoverviewconstraints(name,name,name,name,name,name,integer); +ALTER EXTENSION postgis ADD function addrasterconstraints(name,name,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean); +ALTER EXTENSION postgis ADD function addrasterconstraints(name,name,name,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean); +ALTER EXTENSION postgis ADD function addrasterconstraints(name,name,name,text[]); +ALTER EXTENSION postgis ADD function addrasterconstraints(name,name,text[]); +ALTER EXTENSION postgis ADD function box(box3d); +ALTER EXTENSION postgis ADD function box(geometry); +ALTER EXTENSION postgis ADD function box2d(box3d); +ALTER EXTENSION postgis ADD function box2d(geometry); +ALTER EXTENSION postgis ADD function box2d_in(cstring); +ALTER EXTENSION postgis ADD function box2d_out(box2d); +ALTER EXTENSION postgis ADD function box2df_in(cstring); +ALTER EXTENSION postgis ADD function box2df_out(box2df); +ALTER EXTENSION postgis ADD function box3d(box2d); +ALTER EXTENSION postgis ADD function box3d(geometry); +ALTER EXTENSION postgis ADD function box3d(raster); +ALTER EXTENSION postgis ADD function box3d_in(cstring); +ALTER EXTENSION postgis ADD function box3d_out(box3d); +ALTER EXTENSION postgis ADD function box3dtobox(box3d); +ALTER EXTENSION postgis ADD function bytea(geography); +ALTER EXTENSION postgis ADD function bytea(geometry); +ALTER EXTENSION postgis ADD function bytea(raster); +ALTER EXTENSION postgis ADD function checkauth(text,text); +ALTER EXTENSION postgis ADD function checkauth(text,text,text); +ALTER EXTENSION postgis ADD function checkauthtrigger(); +ALTER EXTENSION postgis ADD function disablelongtransactions(); +ALTER EXTENSION postgis ADD function dropgeometrycolumn(character varying,character varying); +ALTER EXTENSION postgis ADD function dropgeometrycolumn(character varying,character varying,character varying); +ALTER EXTENSION postgis ADD function dropgeometrycolumn(character varying,character varying,character varying,character varying); +ALTER EXTENSION postgis ADD function dropgeometrytable(character varying); +ALTER EXTENSION postgis ADD function dropgeometrytable(character varying,character varying); +ALTER EXTENSION postgis ADD function dropgeometrytable(character varying,character varying,character varying); +ALTER EXTENSION postgis ADD function dropoverviewconstraints(name,name); +ALTER EXTENSION postgis ADD function dropoverviewconstraints(name,name,name); +ALTER EXTENSION postgis ADD function droprasterconstraints(name,name,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean); +ALTER EXTENSION postgis ADD function droprasterconstraints(name,name,name,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean); +ALTER EXTENSION postgis ADD function droprasterconstraints(name,name,name,text[]); +ALTER EXTENSION postgis ADD function droprasterconstraints(name,name,text[]); +ALTER EXTENSION postgis ADD function enablelongtransactions(); +ALTER EXTENSION postgis ADD function equals(geometry,geometry); +ALTER EXTENSION postgis ADD function find_srid(character varying,character varying,character varying); +ALTER EXTENSION postgis ADD function geography(bytea); +ALTER EXTENSION postgis ADD function geography(geography,integer,boolean); +ALTER EXTENSION postgis ADD function geography(geometry); +ALTER EXTENSION postgis ADD function geography_analyze(internal); +ALTER EXTENSION postgis ADD function geography_cmp(geography,geography); +ALTER EXTENSION postgis ADD function geography_eq(geography,geography); +ALTER EXTENSION postgis ADD function geography_ge(geography,geography); +ALTER EXTENSION postgis ADD function geography_gist_compress(internal); +ALTER EXTENSION postgis ADD function geography_gist_consistent(internal,geography,integer); +ALTER EXTENSION postgis ADD function geography_gist_decompress(internal); +ALTER EXTENSION postgis ADD function geography_gist_join_selectivity(internal,oid,internal,smallint); +ALTER EXTENSION postgis ADD function geography_gist_penalty(internal,internal,internal); +ALTER EXTENSION postgis ADD function geography_gist_picksplit(internal,internal); +ALTER EXTENSION postgis ADD function geography_gist_same(box2d,box2d,internal); +ALTER EXTENSION postgis ADD function geography_gist_selectivity(internal,oid,internal,integer); +ALTER EXTENSION postgis ADD function geography_gist_union(bytea,internal); +ALTER EXTENSION postgis ADD function geography_gt(geography,geography); +ALTER EXTENSION postgis ADD function geography_in(cstring,oid,integer); +ALTER EXTENSION postgis ADD function geography_le(geography,geography); +ALTER EXTENSION postgis ADD function geography_lt(geography,geography); +ALTER EXTENSION postgis ADD function geography_out(geography); +ALTER EXTENSION postgis ADD function geography_overlaps(geography,geography); +ALTER EXTENSION postgis ADD function geography_recv(internal,oid,integer); +ALTER EXTENSION postgis ADD function geography_send(geography); +ALTER EXTENSION postgis ADD function geography_typmod_in(cstring[]); +ALTER EXTENSION postgis ADD function geography_typmod_out(integer); +ALTER EXTENSION postgis ADD function geometry(box2d); +ALTER EXTENSION postgis ADD function geometry(box3d); +ALTER EXTENSION postgis ADD function geometry(bytea); +ALTER EXTENSION postgis ADD function geometry(geography); +ALTER EXTENSION postgis ADD function geometry(geometry,integer,boolean); +ALTER EXTENSION postgis ADD function geometry(text); +ALTER EXTENSION postgis ADD function geometry_above(geometry,geometry); +ALTER EXTENSION postgis ADD function geometry_analyze(internal); +ALTER EXTENSION postgis ADD function geometry_below(geometry,geometry); +ALTER EXTENSION postgis ADD function geometry_cmp(geometry,geometry); +ALTER EXTENSION postgis ADD function geometry_contains(geometry,geometry); +ALTER EXTENSION postgis ADD function geometry_distance_box(geometry,geometry); +ALTER EXTENSION postgis ADD function geometry_distance_centroid(geometry,geometry); +ALTER EXTENSION postgis ADD function geometry_eq(geometry,geometry); +ALTER EXTENSION postgis ADD function geometry_ge(geometry,geometry); +ALTER EXTENSION postgis ADD function geometry_gist_compress_2d(internal); +ALTER EXTENSION postgis ADD function geometry_gist_compress_nd(internal); +ALTER EXTENSION postgis ADD function geometry_gist_consistent_2d(internal,geometry,integer); +ALTER EXTENSION postgis ADD function geometry_gist_consistent_nd(internal,geometry,integer); +ALTER EXTENSION postgis ADD function geometry_gist_decompress_2d(internal); +ALTER EXTENSION postgis ADD function geometry_gist_decompress_nd(internal); +ALTER EXTENSION postgis ADD function geometry_gist_distance_2d(internal,geometry,integer); +ALTER EXTENSION postgis ADD function geometry_gist_joinsel_2d(internal,oid,internal,smallint); +ALTER EXTENSION postgis ADD function geometry_gist_penalty_2d(internal,internal,internal); +ALTER EXTENSION postgis ADD function geometry_gist_penalty_nd(internal,internal,internal); +ALTER EXTENSION postgis ADD function geometry_gist_picksplit_2d(internal,internal); +ALTER EXTENSION postgis ADD function geometry_gist_picksplit_nd(internal,internal); +ALTER EXTENSION postgis ADD function geometry_gist_same_2d(geometry,geometry,internal); +ALTER EXTENSION postgis ADD function geometry_gist_same_nd(geometry,geometry,internal); +ALTER EXTENSION postgis ADD function geometry_gist_sel_2d(internal,oid,internal,integer); +ALTER EXTENSION postgis ADD function geometry_gist_union_2d(bytea,internal); +ALTER EXTENSION postgis ADD function geometry_gist_union_nd(bytea,internal); +ALTER EXTENSION postgis ADD function geometry_gt(geometry,geometry); +ALTER EXTENSION postgis ADD function geometry_in(cstring); +ALTER EXTENSION postgis ADD function geometry_le(geometry,geometry); +ALTER EXTENSION postgis ADD function geometry_left(geometry,geometry); +ALTER EXTENSION postgis ADD function geometry_lt(geometry,geometry); +ALTER EXTENSION postgis ADD function geometry_out(geometry); +ALTER EXTENSION postgis ADD function geometry_overabove(geometry,geometry); +ALTER EXTENSION postgis ADD function geometry_overbelow(geometry,geometry); +ALTER EXTENSION postgis ADD function geometry_overlaps(geometry,geometry); +ALTER EXTENSION postgis ADD function geometry_overlaps_nd(geometry,geometry); +ALTER EXTENSION postgis ADD function geometry_overleft(geometry,geometry); +ALTER EXTENSION postgis ADD function geometry_overright(geometry,geometry); +ALTER EXTENSION postgis ADD function geometry_raster_contain(geometry,raster); +ALTER EXTENSION postgis ADD function geometry_raster_overlap(geometry,raster); +ALTER EXTENSION postgis ADD function geometry_recv(internal); +ALTER EXTENSION postgis ADD function geometry_right(geometry,geometry); +ALTER EXTENSION postgis ADD function geometry_same(geometry,geometry); +ALTER EXTENSION postgis ADD function geometry_send(geometry); +ALTER EXTENSION postgis ADD function geometry_typmod_in(cstring[]); +ALTER EXTENSION postgis ADD function geometry_typmod_out(integer); +ALTER EXTENSION postgis ADD function geometry_within(geometry,geometry); +ALTER EXTENSION postgis ADD function geometrytype(geography); +ALTER EXTENSION postgis ADD function geometrytype(geometry); +ALTER EXTENSION postgis ADD function geomfromewkb(bytea); +ALTER EXTENSION postgis ADD function geomfromewkt(text); +ALTER EXTENSION postgis ADD function get_proj4_from_srid(integer); +ALTER EXTENSION postgis ADD function gettransactionid(); +ALTER EXTENSION postgis ADD function gidx_in(cstring); +ALTER EXTENSION postgis ADD function gidx_out(gidx); +ALTER EXTENSION postgis ADD function lockrow(text,text,text); +ALTER EXTENSION postgis ADD function lockrow(text,text,text,text); +ALTER EXTENSION postgis ADD function lockrow(text,text,text,text,timestamp without time zone); +ALTER EXTENSION postgis ADD function lockrow(text,text,text,timestamp without time zone); +ALTER EXTENSION postgis ADD function longtransactionsenabled(); +ALTER EXTENSION postgis ADD function pgis_abs_in(cstring); +ALTER EXTENSION postgis ADD function pgis_abs_out(pgis_abs); +ALTER EXTENSION postgis ADD function pgis_geometry_accum_finalfn(pgis_abs); +ALTER EXTENSION postgis ADD function pgis_geometry_accum_transfn(pgis_abs,geometry); +ALTER EXTENSION postgis ADD function pgis_geometry_collect_finalfn(pgis_abs); +ALTER EXTENSION postgis ADD function pgis_geometry_makeline_finalfn(pgis_abs); +ALTER EXTENSION postgis ADD function pgis_geometry_polygonize_finalfn(pgis_abs); +ALTER EXTENSION postgis ADD function pgis_geometry_union_finalfn(pgis_abs); +ALTER EXTENSION postgis ADD function populate_geometry_columns(boolean); +ALTER EXTENSION postgis ADD function populate_geometry_columns(oid,boolean); +ALTER EXTENSION postgis ADD function postgis_addbbox(geometry); +ALTER EXTENSION postgis ADD function postgis_cache_bbox(); +ALTER EXTENSION postgis ADD function postgis_constraint_dims(text,text,text); +ALTER EXTENSION postgis ADD function postgis_constraint_srid(text,text,text); +ALTER EXTENSION postgis ADD function postgis_constraint_type(text,text,text); +ALTER EXTENSION postgis ADD function postgis_dropbbox(geometry); +ALTER EXTENSION postgis ADD function postgis_full_version(); +ALTER EXTENSION postgis ADD function postgis_gdal_version(); +ALTER EXTENSION postgis ADD function postgis_geos_version(); +ALTER EXTENSION postgis ADD function postgis_getbbox(geometry); +ALTER EXTENSION postgis ADD function postgis_hasbbox(geometry); +ALTER EXTENSION postgis ADD function postgis_lib_build_date(); +ALTER EXTENSION postgis ADD function postgis_lib_version(); +ALTER EXTENSION postgis ADD function postgis_libjson_version(); +ALTER EXTENSION postgis ADD function postgis_libxml_version(); +ALTER EXTENSION postgis ADD function postgis_noop(geometry); +ALTER EXTENSION postgis ADD function postgis_proj_version(); +ALTER EXTENSION postgis ADD function postgis_raster_lib_build_date(); +ALTER EXTENSION postgis ADD function postgis_raster_lib_version(); +ALTER EXTENSION postgis ADD function postgis_raster_scripts_installed(); +ALTER EXTENSION postgis ADD function postgis_scripts_build_date(); +ALTER EXTENSION postgis ADD function postgis_scripts_installed(); +ALTER EXTENSION postgis ADD function postgis_scripts_released(); +ALTER EXTENSION postgis ADD function postgis_svn_version(); +ALTER EXTENSION postgis ADD function postgis_transform_geometry(geometry,text,text,integer); +ALTER EXTENSION postgis ADD function postgis_type_name(character varying,integer,boolean); +ALTER EXTENSION postgis ADD function postgis_typmod_dims(integer); +ALTER EXTENSION postgis ADD function postgis_typmod_srid(integer); +ALTER EXTENSION postgis ADD function postgis_typmod_type(integer); +ALTER EXTENSION postgis ADD function postgis_version(); +ALTER EXTENSION postgis ADD function raster_above(raster,raster); +ALTER EXTENSION postgis ADD function raster_below(raster,raster); +ALTER EXTENSION postgis ADD function raster_contain(raster,raster); +ALTER EXTENSION postgis ADD function raster_contained(raster,raster); +ALTER EXTENSION postgis ADD function raster_geometry_contain(raster,geometry); +ALTER EXTENSION postgis ADD function raster_geometry_overlap(raster,geometry); +ALTER EXTENSION postgis ADD function raster_in(cstring); +ALTER EXTENSION postgis ADD function raster_left(raster,raster); +ALTER EXTENSION postgis ADD function raster_out(raster); +ALTER EXTENSION postgis ADD function raster_overabove(raster,raster); +ALTER EXTENSION postgis ADD function raster_overbelow(raster,raster); +ALTER EXTENSION postgis ADD function raster_overlap(raster,raster); +ALTER EXTENSION postgis ADD function raster_overleft(raster,raster); +ALTER EXTENSION postgis ADD function raster_overright(raster,raster); +ALTER EXTENSION postgis ADD function raster_right(raster,raster); +ALTER EXTENSION postgis ADD function raster_same(raster,raster); +ALTER EXTENSION postgis ADD function spheroid_in(cstring); +ALTER EXTENSION postgis ADD function spheroid_out(spheroid); +ALTER EXTENSION postgis ADD function st_3dclosestpoint(geometry,geometry); +ALTER EXTENSION postgis ADD function st_3ddfullywithin(geometry,geometry,double precision); +ALTER EXTENSION postgis ADD function st_3ddistance(geometry,geometry); +ALTER EXTENSION postgis ADD function st_3ddwithin(geometry,geometry,double precision); +ALTER EXTENSION postgis ADD function st_3dextent(geometry); +ALTER EXTENSION postgis ADD function st_3dintersects(geometry,geometry); +ALTER EXTENSION postgis ADD function st_3dlength(geometry); +ALTER EXTENSION postgis ADD function st_3dlength_spheroid(geometry,spheroid); +ALTER EXTENSION postgis ADD function st_3dlongestline(geometry,geometry); +ALTER EXTENSION postgis ADD function st_3dmakebox(geometry,geometry); +ALTER EXTENSION postgis ADD function st_3dmaxdistance(geometry,geometry); +ALTER EXTENSION postgis ADD function st_3dperimeter(geometry); +ALTER EXTENSION postgis ADD function st_3dshortestline(geometry,geometry); +ALTER EXTENSION postgis ADD function st_accum(geometry); +ALTER EXTENSION postgis ADD function st_addband(raster,integer,text,double precision,double precision); +ALTER EXTENSION postgis ADD function st_addband(raster,raster,integer,integer); +ALTER EXTENSION postgis ADD function st_addband(raster,raster[],integer); +ALTER EXTENSION postgis ADD function st_addband(raster,text,double precision,double precision); +ALTER EXTENSION postgis ADD function st_addmeasure(geometry,double precision,double precision); +ALTER EXTENSION postgis ADD function st_addpoint(geometry,geometry); +ALTER EXTENSION postgis ADD function st_addpoint(geometry,geometry,integer); +ALTER EXTENSION postgis ADD function st_affine(geometry,double precision,double precision,double precision,double precision,double precision,double precision); +ALTER EXTENSION postgis ADD function st_affine(geometry,double precision,double precision,double precision,double precision,double precision,double precision,double precision,double precision,double precision,double precision,double precision,double precision); +ALTER EXTENSION postgis ADD function st_approxcount(raster,boolean,double precision); +ALTER EXTENSION postgis ADD function st_approxcount(raster,double precision); +ALTER EXTENSION postgis ADD function st_approxcount(raster,integer,boolean,double precision); +ALTER EXTENSION postgis ADD function st_approxcount(raster,integer,double precision); +ALTER EXTENSION postgis ADD function st_approxcount(text,text,boolean,double precision); +ALTER EXTENSION postgis ADD function st_approxcount(text,text,double precision); +ALTER EXTENSION postgis ADD function st_approxcount(text,text,integer,boolean,double precision); +ALTER EXTENSION postgis ADD function st_approxcount(text,text,integer,double precision); +ALTER EXTENSION postgis ADD function st_approxhistogram(raster,double precision); +ALTER EXTENSION postgis ADD function st_approxhistogram(raster,integer,boolean,double precision,integer,boolean); +ALTER EXTENSION postgis ADD function st_approxhistogram(raster,integer,boolean,double precision,integer,double precision[],boolean); +ALTER EXTENSION postgis ADD function st_approxhistogram(raster,integer,double precision); +ALTER EXTENSION postgis ADD function st_approxhistogram(raster,integer,double precision,integer,boolean); +ALTER EXTENSION postgis ADD function st_approxhistogram(raster,integer,double precision,integer,double precision[],boolean); +ALTER EXTENSION postgis ADD function st_approxhistogram(text,text,double precision); +ALTER EXTENSION postgis ADD function st_approxhistogram(text,text,integer,boolean,double precision,integer,boolean); +ALTER EXTENSION postgis ADD function st_approxhistogram(text,text,integer,boolean,double precision,integer,double precision[],boolean); +ALTER EXTENSION postgis ADD function st_approxhistogram(text,text,integer,double precision); +ALTER EXTENSION postgis ADD function st_approxhistogram(text,text,integer,double precision,integer,boolean); +ALTER EXTENSION postgis ADD function st_approxhistogram(text,text,integer,double precision,integer,double precision[],boolean); +ALTER EXTENSION postgis ADD function st_approxquantile(raster,boolean,double precision); +ALTER EXTENSION postgis ADD function st_approxquantile(raster,double precision); +ALTER EXTENSION postgis ADD function st_approxquantile(raster,double precision,double precision); +ALTER EXTENSION postgis ADD function st_approxquantile(raster,double precision,double precision[]); +ALTER EXTENSION postgis ADD function st_approxquantile(raster,double precision[]); +ALTER EXTENSION postgis ADD function st_approxquantile(raster,integer,boolean,double precision,double precision); +ALTER EXTENSION postgis ADD function st_approxquantile(raster,integer,boolean,double precision,double precision[]); +ALTER EXTENSION postgis ADD function st_approxquantile(raster,integer,double precision,double precision); +ALTER EXTENSION postgis ADD function st_approxquantile(raster,integer,double precision,double precision[]); +ALTER EXTENSION postgis ADD function st_approxquantile(text,text,boolean,double precision); +ALTER EXTENSION postgis ADD function st_approxquantile(text,text,double precision); +ALTER EXTENSION postgis ADD function st_approxquantile(text,text,double precision,double precision); +ALTER EXTENSION postgis ADD function st_approxquantile(text,text,double precision,double precision[]); +ALTER EXTENSION postgis ADD function st_approxquantile(text,text,double precision[]); +ALTER EXTENSION postgis ADD function st_approxquantile(text,text,integer,boolean,double precision,double precision); +ALTER EXTENSION postgis ADD function st_approxquantile(text,text,integer,boolean,double precision,double precision[]); +ALTER EXTENSION postgis ADD function st_approxquantile(text,text,integer,double precision,double precision); +ALTER EXTENSION postgis ADD function st_approxquantile(text,text,integer,double precision,double precision[]); +ALTER EXTENSION postgis ADD function st_approxsummarystats(raster,boolean,double precision); +ALTER EXTENSION postgis ADD function st_approxsummarystats(raster,double precision); +ALTER EXTENSION postgis ADD function st_approxsummarystats(raster,integer,boolean,double precision); +ALTER EXTENSION postgis ADD function st_approxsummarystats(raster,integer,double precision); +ALTER EXTENSION postgis ADD function st_approxsummarystats(text,text,boolean); +ALTER EXTENSION postgis ADD function st_approxsummarystats(text,text,double precision); +ALTER EXTENSION postgis ADD function st_approxsummarystats(text,text,integer,boolean,double precision); +ALTER EXTENSION postgis ADD function st_approxsummarystats(text,text,integer,double precision); +ALTER EXTENSION postgis ADD function st_area(geography,boolean); +ALTER EXTENSION postgis ADD function st_area(geometry); +ALTER EXTENSION postgis ADD function st_area(text); +ALTER EXTENSION postgis ADD function st_area2d(geometry); +ALTER EXTENSION postgis ADD function st_asbinary(geography); +ALTER EXTENSION postgis ADD function st_asbinary(geography,text); +ALTER EXTENSION postgis ADD function st_asbinary(geometry); +ALTER EXTENSION postgis ADD function st_asbinary(geometry,text); +ALTER EXTENSION postgis ADD function st_asbinary(raster); +ALTER EXTENSION postgis ADD function st_asewkb(geometry); +ALTER EXTENSION postgis ADD function st_asewkb(geometry,text); +ALTER EXTENSION postgis ADD function st_asewkt(geography); +ALTER EXTENSION postgis ADD function st_asewkt(geometry); +ALTER EXTENSION postgis ADD function st_asewkt(text); +ALTER EXTENSION postgis ADD function st_asgdalraster(raster,text,text[],integer); +ALTER EXTENSION postgis ADD function st_asgeojson(geography,integer,integer); +ALTER EXTENSION postgis ADD function st_asgeojson(geometry,integer,integer); +ALTER EXTENSION postgis ADD function st_asgeojson(integer,geography,integer,integer); +ALTER EXTENSION postgis ADD function st_asgeojson(integer,geometry,integer,integer); +ALTER EXTENSION postgis ADD function st_asgeojson(text); +ALTER EXTENSION postgis ADD function st_asgml(geography,integer,integer); +ALTER EXTENSION postgis ADD function st_asgml(geometry,integer,integer); +ALTER EXTENSION postgis ADD function st_asgml(integer,geography,integer,integer,text); +ALTER EXTENSION postgis ADD function st_asgml(integer,geometry,integer,integer,text); +ALTER EXTENSION postgis ADD function st_asgml(text); +ALTER EXTENSION postgis ADD function st_ashexewkb(geometry); +ALTER EXTENSION postgis ADD function st_ashexewkb(geometry,text); +ALTER EXTENSION postgis ADD function st_asjpeg(raster,integer,integer); +ALTER EXTENSION postgis ADD function st_asjpeg(raster,integer,text[]); +ALTER EXTENSION postgis ADD function st_asjpeg(raster,integer[],integer); +ALTER EXTENSION postgis ADD function st_asjpeg(raster,integer[],text[]); +ALTER EXTENSION postgis ADD function st_asjpeg(raster,text[]); +ALTER EXTENSION postgis ADD function st_askml(geography,integer); +ALTER EXTENSION postgis ADD function st_askml(geometry,integer); +ALTER EXTENSION postgis ADD function st_askml(integer,geography,integer,text); +ALTER EXTENSION postgis ADD function st_askml(integer,geometry,integer,text); +ALTER EXTENSION postgis ADD function st_askml(text); +ALTER EXTENSION postgis ADD function st_aslatlontext(geometry); +ALTER EXTENSION postgis ADD function st_aslatlontext(geometry,text); +ALTER EXTENSION postgis ADD function st_aspect(raster,integer,text); +ALTER EXTENSION postgis ADD function st_aspng(raster,integer,integer); +ALTER EXTENSION postgis ADD function st_aspng(raster,integer,text[]); +ALTER EXTENSION postgis ADD function st_aspng(raster,integer[],integer); +ALTER EXTENSION postgis ADD function st_aspng(raster,integer[],text[]); +ALTER EXTENSION postgis ADD function st_aspng(raster,text[]); +ALTER EXTENSION postgis ADD function st_asraster(geometry,double precision,double precision,double precision,double precision,text,double precision,double precision,double precision,double precision,boolean); +ALTER EXTENSION postgis ADD function st_asraster(geometry,double precision,double precision,double precision,double precision,text[],double precision[],double precision[],double precision,double precision,boolean); +ALTER EXTENSION postgis ADD function st_asraster(geometry,double precision,double precision,text,double precision,double precision,double precision,double precision,double precision,double precision,boolean); +ALTER EXTENSION postgis ADD function st_asraster(geometry,double precision,double precision,text[],double precision[],double precision[],double precision,double precision,double precision,double precision,boolean); +ALTER EXTENSION postgis ADD function st_asraster(geometry,integer,integer,double precision,double precision,text,double precision,double precision,double precision,double precision,boolean); +ALTER EXTENSION postgis ADD function st_asraster(geometry,integer,integer,double precision,double precision,text[],double precision[],double precision[],double precision,double precision,boolean); +ALTER EXTENSION postgis ADD function st_asraster(geometry,integer,integer,text,double precision,double precision,double precision,double precision,double precision,double precision,boolean); +ALTER EXTENSION postgis ADD function st_asraster(geometry,integer,integer,text[],double precision[],double precision[],double precision,double precision,double precision,double precision,boolean); +ALTER EXTENSION postgis ADD function st_asraster(geometry,raster,text,double precision,double precision,boolean); +ALTER EXTENSION postgis ADD function st_asraster(geometry,raster,text[],double precision[],double precision[],boolean); +ALTER EXTENSION postgis ADD function st_assvg(geography,integer,integer); +ALTER EXTENSION postgis ADD function st_assvg(geometry,integer,integer); +ALTER EXTENSION postgis ADD function st_assvg(text); +ALTER EXTENSION postgis ADD function st_astext(geography); +ALTER EXTENSION postgis ADD function st_astext(geometry); +ALTER EXTENSION postgis ADD function st_astext(text); +ALTER EXTENSION postgis ADD function st_astiff(raster,integer[],text,integer); +ALTER EXTENSION postgis ADD function st_astiff(raster,integer[],text[],integer); +ALTER EXTENSION postgis ADD function st_astiff(raster,text,integer); +ALTER EXTENSION postgis ADD function st_astiff(raster,text[],integer); +ALTER EXTENSION postgis ADD function st_asx3d(geometry,integer,integer); +ALTER EXTENSION postgis ADD function st_azimuth(geography,geography); +ALTER EXTENSION postgis ADD function st_azimuth(geometry,geometry); +ALTER EXTENSION postgis ADD function st_band(raster,integer); +ALTER EXTENSION postgis ADD function st_band(raster,integer[]); +ALTER EXTENSION postgis ADD function st_band(raster,text,character); +ALTER EXTENSION postgis ADD function st_bandisnodata(raster,boolean); +ALTER EXTENSION postgis ADD function st_bandisnodata(raster,integer,boolean); +ALTER EXTENSION postgis ADD function st_bandmetadata(raster,integer); +ALTER EXTENSION postgis ADD function st_bandmetadata(raster,integer[]); +ALTER EXTENSION postgis ADD function st_bandnodatavalue(raster,integer); +ALTER EXTENSION postgis ADD function st_bandpath(raster,integer); +ALTER EXTENSION postgis ADD function st_bandpixeltype(raster,integer); +ALTER EXTENSION postgis ADD function st_bdmpolyfromtext(text,integer); +ALTER EXTENSION postgis ADD function st_bdpolyfromtext(text,integer); +ALTER EXTENSION postgis ADD function st_boundary(geometry); +ALTER EXTENSION postgis ADD function st_buffer(geography,double precision); +ALTER EXTENSION postgis ADD function st_buffer(geometry,double precision); +ALTER EXTENSION postgis ADD function st_buffer(geometry,double precision,integer); +ALTER EXTENSION postgis ADD function st_buffer(geometry,double precision,text); +ALTER EXTENSION postgis ADD function st_buffer(text,double precision); +ALTER EXTENSION postgis ADD function st_buildarea(geometry); +ALTER EXTENSION postgis ADD function st_centroid(geometry); +ALTER EXTENSION postgis ADD function st_cleangeometry(geometry); +ALTER EXTENSION postgis ADD function st_clip(raster,geometry,boolean); +ALTER EXTENSION postgis ADD function st_clip(raster,geometry,double precision,boolean); +ALTER EXTENSION postgis ADD function st_clip(raster,geometry,double precision[],boolean); +ALTER EXTENSION postgis ADD function st_clip(raster,integer,geometry,boolean); +ALTER EXTENSION postgis ADD function st_clip(raster,integer,geometry,double precision,boolean); +ALTER EXTENSION postgis ADD function st_clip(raster,integer,geometry,double precision[],boolean); +ALTER EXTENSION postgis ADD function st_closestpoint(geometry,geometry); +ALTER EXTENSION postgis ADD function st_collect(geometry); +ALTER EXTENSION postgis ADD function st_collect(geometry,geometry); +ALTER EXTENSION postgis ADD function st_collect(geometry[]); +ALTER EXTENSION postgis ADD function st_collectionextract(geometry,integer); +ALTER EXTENSION postgis ADD function st_collectionhomogenize(geometry); +ALTER EXTENSION postgis ADD function st_combine_bbox(box2d,geometry); +ALTER EXTENSION postgis ADD function st_combine_bbox(box3d,geometry); +ALTER EXTENSION postgis ADD function st_concavehull(geometry,double precision,boolean); +ALTER EXTENSION postgis ADD function st_contains(geometry,geometry); +ALTER EXTENSION postgis ADD function st_containsproperly(geometry,geometry); +ALTER EXTENSION postgis ADD function st_convexhull(geometry); +ALTER EXTENSION postgis ADD function st_convexhull(raster); +ALTER EXTENSION postgis ADD function st_coorddim(geometry); +ALTER EXTENSION postgis ADD function st_count(raster,boolean); +ALTER EXTENSION postgis ADD function st_count(raster,integer,boolean); +ALTER EXTENSION postgis ADD function st_count(text,text,boolean); +ALTER EXTENSION postgis ADD function st_count(text,text,integer,boolean); +ALTER EXTENSION postgis ADD function st_coveredby(geography,geography); +ALTER EXTENSION postgis ADD function st_coveredby(geometry,geometry); +ALTER EXTENSION postgis ADD function st_coveredby(text,text); +ALTER EXTENSION postgis ADD function st_covers(geography,geography); +ALTER EXTENSION postgis ADD function st_covers(geometry,geometry); +ALTER EXTENSION postgis ADD function st_covers(text,text); +ALTER EXTENSION postgis ADD function st_crosses(geometry,geometry); +ALTER EXTENSION postgis ADD function st_curvetoline(geometry); +ALTER EXTENSION postgis ADD function st_curvetoline(geometry,integer); +ALTER EXTENSION postgis ADD function st_dfullywithin(geometry,geometry,double precision); +ALTER EXTENSION postgis ADD function st_difference(geometry,geometry); +ALTER EXTENSION postgis ADD function st_dimension(geometry); +ALTER EXTENSION postgis ADD function st_disjoint(geometry,geometry); +ALTER EXTENSION postgis ADD function st_distance(geography,geography); +ALTER EXTENSION postgis ADD function st_distance(geography,geography,boolean); +ALTER EXTENSION postgis ADD function st_distance(geometry,geometry); +ALTER EXTENSION postgis ADD function st_distance(text,text); +ALTER EXTENSION postgis ADD function st_distance_sphere(geometry,geometry); +ALTER EXTENSION postgis ADD function st_distance_spheroid(geometry,geometry,spheroid); +ALTER EXTENSION postgis ADD function st_distinct4ma(double precision[],text,text[]); +ALTER EXTENSION postgis ADD function st_dump(geometry); +ALTER EXTENSION postgis ADD function st_dumpaspolygons(raster,integer); +ALTER EXTENSION postgis ADD function st_dumppoints(geometry); +ALTER EXTENSION postgis ADD function st_dumprings(geometry); +ALTER EXTENSION postgis ADD function st_dwithin(geography,geography,double precision); +ALTER EXTENSION postgis ADD function st_dwithin(geography,geography,double precision,boolean); +ALTER EXTENSION postgis ADD function st_dwithin(geometry,geometry,double precision); +ALTER EXTENSION postgis ADD function st_dwithin(text,text,double precision); +ALTER EXTENSION postgis ADD function st_endpoint(geometry); +ALTER EXTENSION postgis ADD function st_envelope(geometry); +ALTER EXTENSION postgis ADD function st_envelope(raster); +ALTER EXTENSION postgis ADD function st_equals(geometry,geometry); +ALTER EXTENSION postgis ADD function st_estimated_extent(text,text); +ALTER EXTENSION postgis ADD function st_estimated_extent(text,text,text); +ALTER EXTENSION postgis ADD function st_expand(box2d,double precision); +ALTER EXTENSION postgis ADD function st_expand(box3d,double precision); +ALTER EXTENSION postgis ADD function st_expand(geometry,double precision); +ALTER EXTENSION postgis ADD function st_extent(geometry); +ALTER EXTENSION postgis ADD function st_exteriorring(geometry); +ALTER EXTENSION postgis ADD function st_find_extent(text,text); +ALTER EXTENSION postgis ADD function st_find_extent(text,text,text); +ALTER EXTENSION postgis ADD function st_flipcoordinates(geometry); +ALTER EXTENSION postgis ADD function st_force_2d(geometry); +ALTER EXTENSION postgis ADD function st_force_3d(geometry); +ALTER EXTENSION postgis ADD function st_force_3dm(geometry); +ALTER EXTENSION postgis ADD function st_force_3dz(geometry); +ALTER EXTENSION postgis ADD function st_force_4d(geometry); +ALTER EXTENSION postgis ADD function st_force_collection(geometry); +ALTER EXTENSION postgis ADD function st_forcerhr(geometry); +ALTER EXTENSION postgis ADD function st_gdaldrivers(); +ALTER EXTENSION postgis ADD function st_geogfromtext(text); +ALTER EXTENSION postgis ADD function st_geogfromwkb(bytea); +ALTER EXTENSION postgis ADD function st_geographyfromtext(text); +ALTER EXTENSION postgis ADD function st_geohash(geometry,integer); +ALTER EXTENSION postgis ADD function st_geomcollfromtext(text); +ALTER EXTENSION postgis ADD function st_geomcollfromtext(text,integer); +ALTER EXTENSION postgis ADD function st_geomcollfromwkb(bytea); +ALTER EXTENSION postgis ADD function st_geomcollfromwkb(bytea,integer); +ALTER EXTENSION postgis ADD function st_geometryfromtext(text); +ALTER EXTENSION postgis ADD function st_geometryfromtext(text,integer); +ALTER EXTENSION postgis ADD function st_geometryn(geometry,integer); +ALTER EXTENSION postgis ADD function st_geometrytype(geometry); +ALTER EXTENSION postgis ADD function st_geomfromewkb(bytea); +ALTER EXTENSION postgis ADD function st_geomfromewkt(text); +ALTER EXTENSION postgis ADD function st_geomfromgeojson(text); +ALTER EXTENSION postgis ADD function st_geomfromgml(text); +ALTER EXTENSION postgis ADD function st_geomfromgml(text,integer); +ALTER EXTENSION postgis ADD function st_geomfromkml(text); +ALTER EXTENSION postgis ADD function st_geomfromtext(text); +ALTER EXTENSION postgis ADD function st_geomfromtext(text,integer); +ALTER EXTENSION postgis ADD function st_geomfromwkb(bytea); +ALTER EXTENSION postgis ADD function st_geomfromwkb(bytea,integer); +ALTER EXTENSION postgis ADD function st_georeference(raster,text); +ALTER EXTENSION postgis ADD function st_geotransform(raster); +ALTER EXTENSION postgis ADD function st_gmltosql(text); +ALTER EXTENSION postgis ADD function st_gmltosql(text,integer); +ALTER EXTENSION postgis ADD function st_hasarc(geometry); +ALTER EXTENSION postgis ADD function st_hasnoband(raster,integer); +ALTER EXTENSION postgis ADD function st_hausdorffdistance(geometry,geometry); +ALTER EXTENSION postgis ADD function st_hausdorffdistance(geometry,geometry,double precision); +ALTER EXTENSION postgis ADD function st_height(raster); +ALTER EXTENSION postgis ADD function st_hillshade(raster,integer,text,double precision,double precision,double precision,double precision); +ALTER EXTENSION postgis ADD function st_histogram(raster,integer,boolean,integer,boolean); +ALTER EXTENSION postgis ADD function st_histogram(raster,integer,boolean,integer,double precision[],boolean); +ALTER EXTENSION postgis ADD function st_histogram(raster,integer,integer,boolean); +ALTER EXTENSION postgis ADD function st_histogram(raster,integer,integer,double precision[],boolean); +ALTER EXTENSION postgis ADD function st_histogram(text,text,integer,boolean,integer,boolean); +ALTER EXTENSION postgis ADD function st_histogram(text,text,integer,boolean,integer,double precision[],boolean); +ALTER EXTENSION postgis ADD function st_histogram(text,text,integer,integer,boolean); +ALTER EXTENSION postgis ADD function st_histogram(text,text,integer,integer,double precision[],boolean); +ALTER EXTENSION postgis ADD function st_interiorringn(geometry,integer); +ALTER EXTENSION postgis ADD function st_interpolatepoint(geometry,geometry); +ALTER EXTENSION postgis ADD function st_intersection(geography,geography); +ALTER EXTENSION postgis ADD function st_intersection(geometry,geometry); +ALTER EXTENSION postgis ADD function st_intersection(geometry,raster,integer); +ALTER EXTENSION postgis ADD function st_intersection(raster,geometry); +ALTER EXTENSION postgis ADD function st_intersection(raster,integer,geometry); +ALTER EXTENSION postgis ADD function st_intersection(raster,integer,raster,integer,double precision); +ALTER EXTENSION postgis ADD function st_intersection(raster,integer,raster,integer,double precision[]); +ALTER EXTENSION postgis ADD function st_intersection(raster,integer,raster,integer,text,double precision); +ALTER EXTENSION postgis ADD function st_intersection(raster,integer,raster,integer,text,double precision[]); +ALTER EXTENSION postgis ADD function st_intersection(raster,raster,double precision); +ALTER EXTENSION postgis ADD function st_intersection(raster,raster,double precision[]); +ALTER EXTENSION postgis ADD function st_intersection(raster,raster,text,double precision); +ALTER EXTENSION postgis ADD function st_intersection(raster,raster,text,double precision[]); +ALTER EXTENSION postgis ADD function st_intersection(text,text); +ALTER EXTENSION postgis ADD function st_intersects(geography,geography); +ALTER EXTENSION postgis ADD function st_intersects(geometry,geometry); +ALTER EXTENSION postgis ADD function st_intersects(geometry,raster,integer); +ALTER EXTENSION postgis ADD function st_intersects(raster,geometry,integer); +ALTER EXTENSION postgis ADD function st_intersects(raster,integer,geometry); +ALTER EXTENSION postgis ADD function st_intersects(raster,integer,raster,integer); +ALTER EXTENSION postgis ADD function st_intersects(raster,raster); +ALTER EXTENSION postgis ADD function st_intersects(text,text); +ALTER EXTENSION postgis ADD function st_isclosed(geometry); +ALTER EXTENSION postgis ADD function st_iscollection(geometry); +ALTER EXTENSION postgis ADD function st_isempty(geometry); +ALTER EXTENSION postgis ADD function st_isempty(raster); +ALTER EXTENSION postgis ADD function st_isring(geometry); +ALTER EXTENSION postgis ADD function st_issimple(geometry); +ALTER EXTENSION postgis ADD function st_isvalid(geometry); +ALTER EXTENSION postgis ADD function st_isvalid(geometry,integer); +ALTER EXTENSION postgis ADD function st_isvaliddetail(geometry); +ALTER EXTENSION postgis ADD function st_isvaliddetail(geometry,integer); +ALTER EXTENSION postgis ADD function st_isvalidreason(geometry); +ALTER EXTENSION postgis ADD function st_isvalidreason(geometry,integer); +ALTER EXTENSION postgis ADD function st_length(geography,boolean); +ALTER EXTENSION postgis ADD function st_length(geometry); +ALTER EXTENSION postgis ADD function st_length(text); +ALTER EXTENSION postgis ADD function st_length_spheroid(geometry,spheroid); +ALTER EXTENSION postgis ADD function st_length2d(geometry); +ALTER EXTENSION postgis ADD function st_length2d_spheroid(geometry,spheroid); +ALTER EXTENSION postgis ADD function st_line_interpolate_point(geometry,double precision); +ALTER EXTENSION postgis ADD function st_line_locate_point(geometry,geometry); +ALTER EXTENSION postgis ADD function st_line_substring(geometry,double precision,double precision); +ALTER EXTENSION postgis ADD function st_linecrossingdirection(geometry,geometry); +ALTER EXTENSION postgis ADD function st_linefrommultipoint(geometry); +ALTER EXTENSION postgis ADD function st_linefromtext(text); +ALTER EXTENSION postgis ADD function st_linefromtext(text,integer); +ALTER EXTENSION postgis ADD function st_linefromwkb(bytea); +ALTER EXTENSION postgis ADD function st_linefromwkb(bytea,integer); +ALTER EXTENSION postgis ADD function st_linemerge(geometry); +ALTER EXTENSION postgis ADD function st_linestringfromwkb(bytea); +ALTER EXTENSION postgis ADD function st_linestringfromwkb(bytea,integer); +ALTER EXTENSION postgis ADD function st_linetocurve(geometry); +ALTER EXTENSION postgis ADD function st_locate_along_measure(geometry,double precision); +ALTER EXTENSION postgis ADD function st_locate_between_measures(geometry,double precision,double precision); +ALTER EXTENSION postgis ADD function st_locatealong(geometry,double precision,double precision); +ALTER EXTENSION postgis ADD function st_locatebetween(geometry,double precision,double precision,double precision); +ALTER EXTENSION postgis ADD function st_locatebetweenelevations(geometry,double precision,double precision); +ALTER EXTENSION postgis ADD function st_longestline(geometry,geometry); +ALTER EXTENSION postgis ADD function st_m(geometry); +ALTER EXTENSION postgis ADD function st_makebox2d(geometry,geometry); +ALTER EXTENSION postgis ADD function st_makeemptyraster(integer,integer,double precision,double precision,double precision); +ALTER EXTENSION postgis ADD function st_makeemptyraster(integer,integer,double precision,double precision,double precision,double precision,double precision,double precision,integer); +ALTER EXTENSION postgis ADD function st_makeemptyraster(raster); +ALTER EXTENSION postgis ADD function st_makeenvelope(double precision,double precision,double precision,double precision,integer); +ALTER EXTENSION postgis ADD function st_makeline(geometry); +ALTER EXTENSION postgis ADD function st_makeline(geometry,geometry); +ALTER EXTENSION postgis ADD function st_makeline(geometry[]); +ALTER EXTENSION postgis ADD function st_makepoint(double precision,double precision); +ALTER EXTENSION postgis ADD function st_makepoint(double precision,double precision,double precision); +ALTER EXTENSION postgis ADD function st_makepoint(double precision,double precision,double precision,double precision); +ALTER EXTENSION postgis ADD function st_makepointm(double precision,double precision,double precision); +ALTER EXTENSION postgis ADD function st_makepolygon(geometry); +ALTER EXTENSION postgis ADD function st_makepolygon(geometry,geometry[]); +ALTER EXTENSION postgis ADD function st_makevalid(geometry); +ALTER EXTENSION postgis ADD function st_mapalgebraexpr(raster,integer,raster,integer,text,text,text,text,text,double precision); +ALTER EXTENSION postgis ADD function st_mapalgebraexpr(raster,integer,text,text,double precision); +ALTER EXTENSION postgis ADD function st_mapalgebraexpr(raster,raster,text,text,text,text,text,double precision); +ALTER EXTENSION postgis ADD function st_mapalgebraexpr(raster,text,text,double precision); +ALTER EXTENSION postgis ADD function st_mapalgebrafct(raster,integer,raster,integer,regprocedure,text,text,text[]); +ALTER EXTENSION postgis ADD function st_mapalgebrafct(raster,integer,regprocedure); +ALTER EXTENSION postgis ADD function st_mapalgebrafct(raster,integer,regprocedure,text[]); +ALTER EXTENSION postgis ADD function st_mapalgebrafct(raster,integer,text,regprocedure); +ALTER EXTENSION postgis ADD function st_mapalgebrafct(raster,integer,text,regprocedure,text[]); +ALTER EXTENSION postgis ADD function st_mapalgebrafct(raster,raster,regprocedure,text,text,text[]); +ALTER EXTENSION postgis ADD function st_mapalgebrafct(raster,regprocedure); +ALTER EXTENSION postgis ADD function st_mapalgebrafct(raster,regprocedure,text[]); +ALTER EXTENSION postgis ADD function st_mapalgebrafct(raster,text,regprocedure); +ALTER EXTENSION postgis ADD function st_mapalgebrafct(raster,text,regprocedure,text[]); +ALTER EXTENSION postgis ADD function st_mapalgebrafctngb(raster,integer,text,integer,integer,regprocedure,text,text[]); +ALTER EXTENSION postgis ADD function st_max4ma(double precision[],text,text[]); +ALTER EXTENSION postgis ADD function st_maxdistance(geometry,geometry); +ALTER EXTENSION postgis ADD function st_mean4ma(double precision[],text,text[]); +ALTER EXTENSION postgis ADD function st_mem_size(geometry); +ALTER EXTENSION postgis ADD function st_memcollect(geometry); +ALTER EXTENSION postgis ADD function st_memunion(geometry); +ALTER EXTENSION postgis ADD function st_metadata(raster); +ALTER EXTENSION postgis ADD function st_min4ma(double precision[],text,text[]); +ALTER EXTENSION postgis ADD function st_minimumboundingcircle(geometry,integer); +ALTER EXTENSION postgis ADD function st_minpossiblevalue(text); +ALTER EXTENSION postgis ADD function st_mlinefromtext(text); +ALTER EXTENSION postgis ADD function st_mlinefromtext(text,integer); +ALTER EXTENSION postgis ADD function st_mlinefromwkb(bytea); +ALTER EXTENSION postgis ADD function st_mlinefromwkb(bytea,integer); +ALTER EXTENSION postgis ADD function st_mpointfromtext(text); +ALTER EXTENSION postgis ADD function st_mpointfromtext(text,integer); +ALTER EXTENSION postgis ADD function st_mpointfromwkb(bytea); +ALTER EXTENSION postgis ADD function st_mpointfromwkb(bytea,integer); +ALTER EXTENSION postgis ADD function st_mpolyfromtext(text); +ALTER EXTENSION postgis ADD function st_mpolyfromtext(text,integer); +ALTER EXTENSION postgis ADD function st_mpolyfromwkb(bytea); +ALTER EXTENSION postgis ADD function st_mpolyfromwkb(bytea,integer); +ALTER EXTENSION postgis ADD function st_multi(geometry); +ALTER EXTENSION postgis ADD function st_multilinefromwkb(bytea); +ALTER EXTENSION postgis ADD function st_multilinestringfromtext(text); +ALTER EXTENSION postgis ADD function st_multilinestringfromtext(text,integer); +ALTER EXTENSION postgis ADD function st_multipointfromtext(text); +ALTER EXTENSION postgis ADD function st_multipointfromwkb(bytea); +ALTER EXTENSION postgis ADD function st_multipointfromwkb(bytea,integer); +ALTER EXTENSION postgis ADD function st_multipolyfromwkb(bytea); +ALTER EXTENSION postgis ADD function st_multipolyfromwkb(bytea,integer); +ALTER EXTENSION postgis ADD function st_multipolygonfromtext(text); +ALTER EXTENSION postgis ADD function st_multipolygonfromtext(text,integer); +ALTER EXTENSION postgis ADD function st_ndims(geometry); +ALTER EXTENSION postgis ADD function st_node(geometry); +ALTER EXTENSION postgis ADD function st_npoints(geometry); +ALTER EXTENSION postgis ADD function st_nrings(geometry); +ALTER EXTENSION postgis ADD function st_numbands(raster); +ALTER EXTENSION postgis ADD function st_numgeometries(geometry); +ALTER EXTENSION postgis ADD function st_numinteriorring(geometry); +ALTER EXTENSION postgis ADD function st_numinteriorrings(geometry); +ALTER EXTENSION postgis ADD function st_numpatches(geometry); +ALTER EXTENSION postgis ADD function st_numpoints(geometry); +ALTER EXTENSION postgis ADD function st_offsetcurve(geometry,double precision,text); +ALTER EXTENSION postgis ADD function st_orderingequals(geometry,geometry); +ALTER EXTENSION postgis ADD function st_overlaps(geometry,geometry); +ALTER EXTENSION postgis ADD function st_patchn(geometry,integer); +ALTER EXTENSION postgis ADD function st_perimeter(geography,boolean); +ALTER EXTENSION postgis ADD function st_perimeter(geometry); +ALTER EXTENSION postgis ADD function st_perimeter2d(geometry); +ALTER EXTENSION postgis ADD function st_pixelaspolygon(raster,integer,integer); +ALTER EXTENSION postgis ADD function st_pixelaspolygons(raster,integer); +ALTER EXTENSION postgis ADD function st_pixelheight(raster); +ALTER EXTENSION postgis ADD function st_pixelwidth(raster); +ALTER EXTENSION postgis ADD function st_point(double precision,double precision); +ALTER EXTENSION postgis ADD function st_point_inside_circle(geometry,double precision,double precision,double precision); +ALTER EXTENSION postgis ADD function st_pointfromtext(text); +ALTER EXTENSION postgis ADD function st_pointfromtext(text,integer); +ALTER EXTENSION postgis ADD function st_pointfromwkb(bytea); +ALTER EXTENSION postgis ADD function st_pointfromwkb(bytea,integer); +ALTER EXTENSION postgis ADD function st_pointn(geometry,integer); +ALTER EXTENSION postgis ADD function st_pointonsurface(geometry); +ALTER EXTENSION postgis ADD function st_polyfromtext(text); +ALTER EXTENSION postgis ADD function st_polyfromtext(text,integer); +ALTER EXTENSION postgis ADD function st_polyfromwkb(bytea); +ALTER EXTENSION postgis ADD function st_polyfromwkb(bytea,integer); +ALTER EXTENSION postgis ADD function st_polygon(geometry,integer); +ALTER EXTENSION postgis ADD function st_polygon(raster,integer); +ALTER EXTENSION postgis ADD function st_polygonfromtext(text); +ALTER EXTENSION postgis ADD function st_polygonfromtext(text,integer); +ALTER EXTENSION postgis ADD function st_polygonfromwkb(bytea); +ALTER EXTENSION postgis ADD function st_polygonfromwkb(bytea,integer); +ALTER EXTENSION postgis ADD function st_polygonize(geometry); +ALTER EXTENSION postgis ADD function st_polygonize(geometry[]); +ALTER EXTENSION postgis ADD function st_project(geography,double precision,double precision); +ALTER EXTENSION postgis ADD function st_quantile(raster,boolean,double precision); +ALTER EXTENSION postgis ADD function st_quantile(raster,double precision); +ALTER EXTENSION postgis ADD function st_quantile(raster,double precision[]); +ALTER EXTENSION postgis ADD function st_quantile(raster,integer,boolean,double precision); +ALTER EXTENSION postgis ADD function st_quantile(raster,integer,boolean,double precision[]); +ALTER EXTENSION postgis ADD function st_quantile(raster,integer,double precision); +ALTER EXTENSION postgis ADD function st_quantile(raster,integer,double precision[]); +ALTER EXTENSION postgis ADD function st_quantile(text,text,boolean,double precision); +ALTER EXTENSION postgis ADD function st_quantile(text,text,double precision); +ALTER EXTENSION postgis ADD function st_quantile(text,text,double precision[]); +ALTER EXTENSION postgis ADD function st_quantile(text,text,integer,boolean,double precision); +ALTER EXTENSION postgis ADD function st_quantile(text,text,integer,boolean,double precision[]); +ALTER EXTENSION postgis ADD function st_quantile(text,text,integer,double precision); +ALTER EXTENSION postgis ADD function st_quantile(text,text,integer,double precision[]); +ALTER EXTENSION postgis ADD function st_range4ma(double precision[],text,text[]); +ALTER EXTENSION postgis ADD function st_raster2worldcoordx(raster,integer); +ALTER EXTENSION postgis ADD function st_raster2worldcoordx(raster,integer,integer); +ALTER EXTENSION postgis ADD function st_raster2worldcoordy(raster,integer); +ALTER EXTENSION postgis ADD function st_raster2worldcoordy(raster,integer,integer); +ALTER EXTENSION postgis ADD function st_reclass(raster,integer,text,text,double precision); +ALTER EXTENSION postgis ADD function st_reclass(raster,reclassarg[]); +ALTER EXTENSION postgis ADD function st_reclass(raster,text,text); +ALTER EXTENSION postgis ADD function st_relate(geometry,geometry); +ALTER EXTENSION postgis ADD function st_relate(geometry,geometry,integer); +ALTER EXTENSION postgis ADD function st_relate(geometry,geometry,text); +ALTER EXTENSION postgis ADD function st_relatematch(text,text); +ALTER EXTENSION postgis ADD function st_removepoint(geometry,integer); +ALTER EXTENSION postgis ADD function st_removerepeatedpoints(geometry); +ALTER EXTENSION postgis ADD function st_resample(raster,integer,double precision,double precision,double precision,double precision,double precision,double precision,text,double precision); +ALTER EXTENSION postgis ADD function st_resample(raster,integer,integer,integer,double precision,double precision,double precision,double precision,text,double precision); +ALTER EXTENSION postgis ADD function st_resample(raster,raster,boolean,text,double precision); +ALTER EXTENSION postgis ADD function st_resample(raster,raster,text,double precision,boolean); +ALTER EXTENSION postgis ADD function st_rescale(raster,double precision,double precision,text,double precision); +ALTER EXTENSION postgis ADD function st_rescale(raster,double precision,text,double precision); +ALTER EXTENSION postgis ADD function st_reskew(raster,double precision,double precision,text,double precision); +ALTER EXTENSION postgis ADD function st_reskew(raster,double precision,text,double precision); +ALTER EXTENSION postgis ADD function st_reverse(geometry); +ALTER EXTENSION postgis ADD function st_rotate(geometry,double precision); +ALTER EXTENSION postgis ADD function st_rotate(geometry,double precision,double precision,double precision); +ALTER EXTENSION postgis ADD function st_rotate(geometry,double precision,geometry); +ALTER EXTENSION postgis ADD function st_rotatex(geometry,double precision); +ALTER EXTENSION postgis ADD function st_rotatey(geometry,double precision); +ALTER EXTENSION postgis ADD function st_rotatez(geometry,double precision); +ALTER EXTENSION postgis ADD function st_rotation(raster); +ALTER EXTENSION postgis ADD function st_samealignment(double precision,double precision,double precision,double precision,double precision,double precision,double precision,double precision,double precision,double precision,double precision,double precision); +ALTER EXTENSION postgis ADD function st_samealignment(raster,raster); +ALTER EXTENSION postgis ADD function st_scale(geometry,double precision,double precision); +ALTER EXTENSION postgis ADD function st_scale(geometry,double precision,double precision,double precision); +ALTER EXTENSION postgis ADD function st_scalex(raster); +ALTER EXTENSION postgis ADD function st_scaley(raster); +ALTER EXTENSION postgis ADD function st_segmentize(geometry,double precision); +ALTER EXTENSION postgis ADD function st_setbandisnodata(raster,integer); +ALTER EXTENSION postgis ADD function st_setbandnodatavalue(raster,double precision); +ALTER EXTENSION postgis ADD function st_setbandnodatavalue(raster,integer,double precision,boolean); +ALTER EXTENSION postgis ADD function st_setgeoreference(raster,text,text); +ALTER EXTENSION postgis ADD function st_setgeotransform(raster,double precision,double precision,double precision,double precision,double precision,double precision); +ALTER EXTENSION postgis ADD function st_setpoint(geometry,integer,geometry); +ALTER EXTENSION postgis ADD function st_setrotation(raster,double precision); +ALTER EXTENSION postgis ADD function st_setscale(raster,double precision); +ALTER EXTENSION postgis ADD function st_setscale(raster,double precision,double precision); +ALTER EXTENSION postgis ADD function st_setskew(raster,double precision); +ALTER EXTENSION postgis ADD function st_setskew(raster,double precision,double precision); +ALTER EXTENSION postgis ADD function st_setsrid(geometry,integer); +ALTER EXTENSION postgis ADD function st_setsrid(raster,integer); +ALTER EXTENSION postgis ADD function st_setupperleft(raster,double precision,double precision); +ALTER EXTENSION postgis ADD function st_setvalue(raster,geometry,double precision); +ALTER EXTENSION postgis ADD function st_setvalue(raster,integer,geometry,double precision); +ALTER EXTENSION postgis ADD function st_setvalue(raster,integer,integer,double precision); +ALTER EXTENSION postgis ADD function st_setvalue(raster,integer,integer,integer,double precision); +ALTER EXTENSION postgis ADD function st_sharedpaths(geometry,geometry); +ALTER EXTENSION postgis ADD function st_shift_longitude(geometry); +ALTER EXTENSION postgis ADD function st_shortestline(geometry,geometry); +ALTER EXTENSION postgis ADD function st_simplify(geometry,double precision); +ALTER EXTENSION postgis ADD function st_simplifypreservetopology(geometry,double precision); +ALTER EXTENSION postgis ADD function st_skewx(raster); +ALTER EXTENSION postgis ADD function st_skewy(raster); +ALTER EXTENSION postgis ADD function st_slope(raster,integer,text); +ALTER EXTENSION postgis ADD function st_snap(geometry,geometry,double precision); +ALTER EXTENSION postgis ADD function st_snaptogrid(geometry,double precision); +ALTER EXTENSION postgis ADD function st_snaptogrid(geometry,double precision,double precision); +ALTER EXTENSION postgis ADD function st_snaptogrid(geometry,double precision,double precision,double precision,double precision); +ALTER EXTENSION postgis ADD function st_snaptogrid(geometry,geometry,double precision,double precision,double precision,double precision); +ALTER EXTENSION postgis ADD function st_snaptogrid(raster,double precision,double precision,double precision,double precision,text,double precision); +ALTER EXTENSION postgis ADD function st_snaptogrid(raster,double precision,double precision,double precision,text,double precision); +ALTER EXTENSION postgis ADD function st_snaptogrid(raster,double precision,double precision,text,double precision,double precision,double precision); +ALTER EXTENSION postgis ADD function st_split(geometry,geometry); +ALTER EXTENSION postgis ADD function st_srid(geometry); +ALTER EXTENSION postgis ADD function st_srid(raster); +ALTER EXTENSION postgis ADD function st_startpoint(geometry); +ALTER EXTENSION postgis ADD function st_stddev4ma(double precision[],text,text[]); +ALTER EXTENSION postgis ADD function st_sum4ma(double precision[],text,text[]); +ALTER EXTENSION postgis ADD function st_summary(geography); +ALTER EXTENSION postgis ADD function st_summary(geometry); +ALTER EXTENSION postgis ADD function st_summarystats(raster,boolean); +ALTER EXTENSION postgis ADD function st_summarystats(raster,integer,boolean); +ALTER EXTENSION postgis ADD function st_summarystats(text,text,boolean); +ALTER EXTENSION postgis ADD function st_summarystats(text,text,integer,boolean); +ALTER EXTENSION postgis ADD function st_symdifference(geometry,geometry); +ALTER EXTENSION postgis ADD function st_symmetricdifference(geometry,geometry); +ALTER EXTENSION postgis ADD function st_touches(geometry,geometry); +ALTER EXTENSION postgis ADD function st_transform(geometry,integer); +ALTER EXTENSION postgis ADD function st_transform(raster,integer,double precision,double precision,text,double precision); +ALTER EXTENSION postgis ADD function st_transform(raster,integer,double precision,text,double precision); +ALTER EXTENSION postgis ADD function st_transform(raster,integer,text,double precision,double precision,double precision); +ALTER EXTENSION postgis ADD function st_translate(geometry,double precision,double precision); +ALTER EXTENSION postgis ADD function st_translate(geometry,double precision,double precision,double precision); +ALTER EXTENSION postgis ADD function st_transscale(geometry,double precision,double precision,double precision,double precision); +ALTER EXTENSION postgis ADD function st_unaryunion(geometry); +ALTER EXTENSION postgis ADD function st_union(geometry); +ALTER EXTENSION postgis ADD function st_union(geometry,geometry); +ALTER EXTENSION postgis ADD function st_union(geometry[]); +ALTER EXTENSION postgis ADD function st_union(raster); +ALTER EXTENSION postgis ADD function st_union(raster,integer); +ALTER EXTENSION postgis ADD function st_union(raster,integer,text); +ALTER EXTENSION postgis ADD function st_union(raster,text); +ALTER EXTENSION postgis ADD function st_upperleftx(raster); +ALTER EXTENSION postgis ADD function st_upperlefty(raster); +ALTER EXTENSION postgis ADD function st_value(raster,geometry,boolean); +ALTER EXTENSION postgis ADD function st_value(raster,integer,geometry,boolean); +ALTER EXTENSION postgis ADD function st_value(raster,integer,integer,boolean); +ALTER EXTENSION postgis ADD function st_value(raster,integer,integer,integer,boolean); +ALTER EXTENSION postgis ADD function st_valuecount(raster,double precision,double precision); +ALTER EXTENSION postgis ADD function st_valuecount(raster,double precision[],double precision); +ALTER EXTENSION postgis ADD function st_valuecount(raster,integer,boolean,double precision,double precision); +ALTER EXTENSION postgis ADD function st_valuecount(raster,integer,boolean,double precision[],double precision); +ALTER EXTENSION postgis ADD function st_valuecount(raster,integer,double precision,double precision); +ALTER EXTENSION postgis ADD function st_valuecount(raster,integer,double precision[],double precision); +ALTER EXTENSION postgis ADD function st_valuecount(text,text,double precision,double precision); +ALTER EXTENSION postgis ADD function st_valuecount(text,text,double precision[],double precision); +ALTER EXTENSION postgis ADD function st_valuecount(text,text,integer,boolean,double precision,double precision); +ALTER EXTENSION postgis ADD function st_valuecount(text,text,integer,boolean,double precision[],double precision); +ALTER EXTENSION postgis ADD function st_valuecount(text,text,integer,double precision,double precision); +ALTER EXTENSION postgis ADD function st_valuecount(text,text,integer,double precision[],double precision); +ALTER EXTENSION postgis ADD function st_valuepercent(raster,double precision,double precision); +ALTER EXTENSION postgis ADD function st_valuepercent(raster,double precision[],double precision); +ALTER EXTENSION postgis ADD function st_valuepercent(raster,integer,boolean,double precision,double precision); +ALTER EXTENSION postgis ADD function st_valuepercent(raster,integer,boolean,double precision[],double precision); +ALTER EXTENSION postgis ADD function st_valuepercent(raster,integer,double precision,double precision); +ALTER EXTENSION postgis ADD function st_valuepercent(raster,integer,double precision[],double precision); +ALTER EXTENSION postgis ADD function st_valuepercent(text,text,double precision,double precision); +ALTER EXTENSION postgis ADD function st_valuepercent(text,text,double precision[],double precision); +ALTER EXTENSION postgis ADD function st_valuepercent(text,text,integer,boolean,double precision,double precision); +ALTER EXTENSION postgis ADD function st_valuepercent(text,text,integer,boolean,double precision[],double precision); +ALTER EXTENSION postgis ADD function st_valuepercent(text,text,integer,double precision,double precision); +ALTER EXTENSION postgis ADD function st_valuepercent(text,text,integer,double precision[],double precision); +ALTER EXTENSION postgis ADD function st_width(raster); +ALTER EXTENSION postgis ADD function st_within(geometry,geometry); +ALTER EXTENSION postgis ADD function st_wkbtosql(bytea); +ALTER EXTENSION postgis ADD function st_wkttosql(text); +ALTER EXTENSION postgis ADD function st_world2rastercoordx(raster,double precision); +ALTER EXTENSION postgis ADD function st_world2rastercoordx(raster,double precision,double precision); +ALTER EXTENSION postgis ADD function st_world2rastercoordx(raster,geometry); +ALTER EXTENSION postgis ADD function st_world2rastercoordy(raster,double precision); +ALTER EXTENSION postgis ADD function st_world2rastercoordy(raster,double precision,double precision); +ALTER EXTENSION postgis ADD function st_world2rastercoordy(raster,geometry); +ALTER EXTENSION postgis ADD function st_x(geometry); +ALTER EXTENSION postgis ADD function st_xmax(box3d); +ALTER EXTENSION postgis ADD function st_xmin(box3d); +ALTER EXTENSION postgis ADD function st_y(geometry); +ALTER EXTENSION postgis ADD function st_ymax(box3d); +ALTER EXTENSION postgis ADD function st_ymin(box3d); +ALTER EXTENSION postgis ADD function st_z(geometry); +ALTER EXTENSION postgis ADD function st_zmax(box3d); +ALTER EXTENSION postgis ADD function st_zmflag(geometry); +ALTER EXTENSION postgis ADD function st_zmin(box3d); +ALTER EXTENSION postgis ADD function text(geometry); +ALTER EXTENSION postgis ADD function unlockrows(text); +ALTER EXTENSION postgis ADD function updategeometrysrid(character varying,character varying,character varying,character varying,integer); +ALTER EXTENSION postgis ADD function updategeometrysrid(character varying,character varying,character varying,integer); +ALTER EXTENSION postgis ADD function updategeometrysrid(character varying,character varying,integer); +ALTER EXTENSION postgis ADD operator &&&(geometry,geometry); +ALTER EXTENSION postgis ADD operator &&(geography,geography); +ALTER EXTENSION postgis ADD operator &&(geometry,geometry); +ALTER EXTENSION postgis ADD operator &&(geometry,raster); +ALTER EXTENSION postgis ADD operator &&(raster,geometry); +ALTER EXTENSION postgis ADD operator &&(raster,raster); +ALTER EXTENSION postgis ADD operator &<(geometry,geometry); +ALTER EXTENSION postgis ADD operator &<(raster,raster); +ALTER EXTENSION postgis ADD operator &<|(geometry,geometry); +ALTER EXTENSION postgis ADD operator &<|(raster,raster); +ALTER EXTENSION postgis ADD operator &>(geometry,geometry); +ALTER EXTENSION postgis ADD operator &>(raster,raster); +ALTER EXTENSION postgis ADD operator @(geometry,geometry); +ALTER EXTENSION postgis ADD operator @(geometry,raster); +ALTER EXTENSION postgis ADD operator @(raster,geometry); +ALTER EXTENSION postgis ADD operator @(raster,raster); +ALTER EXTENSION postgis ADD operator |&>(geometry,geometry); +ALTER EXTENSION postgis ADD operator |&>(raster,raster); +ALTER EXTENSION postgis ADD operator |>>(geometry,geometry); +ALTER EXTENSION postgis ADD operator |>>(raster,raster); +ALTER EXTENSION postgis ADD operator ~(geometry,geometry); +ALTER EXTENSION postgis ADD operator ~(geometry,raster); +ALTER EXTENSION postgis ADD operator ~(raster,geometry); +ALTER EXTENSION postgis ADD operator ~(raster,raster); +ALTER EXTENSION postgis ADD operator ~=(geometry,geometry); +ALTER EXTENSION postgis ADD operator ~=(raster,raster); +ALTER EXTENSION postgis ADD operator <->(geometry,geometry); +ALTER EXTENSION postgis ADD operator <#>(geometry,geometry); +ALTER EXTENSION postgis ADD operator <(geography,geography); +ALTER EXTENSION postgis ADD operator <(geometry,geometry); +ALTER EXTENSION postgis ADD operator <<(geometry,geometry); +ALTER EXTENSION postgis ADD operator <<(raster,raster); +ALTER EXTENSION postgis ADD operator <<|(geometry,geometry); +ALTER EXTENSION postgis ADD operator <<|(raster,raster); +ALTER EXTENSION postgis ADD operator <=(geography,geography); +ALTER EXTENSION postgis ADD operator <=(geometry,geometry); +ALTER EXTENSION postgis ADD operator =(geography,geography); +ALTER EXTENSION postgis ADD operator =(geometry,geometry); +ALTER EXTENSION postgis ADD operator >(geography,geography); +ALTER EXTENSION postgis ADD operator >(geometry,geometry); +ALTER EXTENSION postgis ADD operator >=(geography,geography); +ALTER EXTENSION postgis ADD operator >=(geometry,geometry); +ALTER EXTENSION postgis ADD operator >>(geometry,geometry); +ALTER EXTENSION postgis ADD operator >>(raster,raster); +ALTER EXTENSION postgis ADD operator class btree_geography_ops using btree; +ALTER EXTENSION postgis ADD operator class btree_geometry_ops using btree; +ALTER EXTENSION postgis ADD operator class gist_geography_ops using gist; +ALTER EXTENSION postgis ADD operator class gist_geometry_ops_2d using gist; +ALTER EXTENSION postgis ADD operator class gist_geometry_ops_nd using gist; +ALTER EXTENSION postgis ADD operator family btree_geography_ops using btree; +ALTER EXTENSION postgis ADD operator family btree_geometry_ops using btree; +ALTER EXTENSION postgis ADD operator family gist_geography_ops using gist; +ALTER EXTENSION postgis ADD operator family gist_geometry_ops_2d using gist; +ALTER EXTENSION postgis ADD operator family gist_geometry_ops_nd using gist; +ALTER EXTENSION postgis ADD table spatial_ref_sys; +ALTER EXTENSION postgis ADD type box2d; +ALTER EXTENSION postgis ADD type box2df; +ALTER EXTENSION postgis ADD type box3d; +ALTER EXTENSION postgis ADD type geography; +ALTER EXTENSION postgis ADD type geometry; +ALTER EXTENSION postgis ADD type geometry_dump; +ALTER EXTENSION postgis ADD type geomval; +ALTER EXTENSION postgis ADD type gidx; +ALTER EXTENSION postgis ADD type histogram; +ALTER EXTENSION postgis ADD type pgis_abs; +ALTER EXTENSION postgis ADD type quantile; +ALTER EXTENSION postgis ADD type raster; +ALTER EXTENSION postgis ADD type reclassarg; +ALTER EXTENSION postgis ADD type spheroid; +ALTER EXTENSION postgis ADD type summarystats; +ALTER EXTENSION postgis ADD type valid_detail; +ALTER EXTENSION postgis ADD type valuecount; +ALTER EXTENSION postgis ADD view geography_columns; +ALTER EXTENSION postgis ADD view geometry_columns; +ALTER EXTENSION postgis ADD view raster_columns; +ALTER EXTENSION postgis ADD view raster_overviews; diff -Nru postgis-1.5.3/extensions/postgis/sql_bits/remove_from_extension.sql.in postgis-2.0.1/extensions/postgis/sql_bits/remove_from_extension.sql.in --- postgis-1.5.3/extensions/postgis/sql_bits/remove_from_extension.sql.in 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extensions/postgis/sql_bits/remove_from_extension.sql.in 2012-03-02 15:02:17.000000000 +0000 @@ -0,0 +1,25 @@ +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- +-- $Id: remove_from_extension.sql.in 9385 2012-03-02 15:02:17Z robe $ +---- +-- PostGIS - Spatial Types for PostgreSQL +-- http://www.postgis.org +-- +-- Copyright (C) 2011 Regina Obe +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +-- +-- Author: Regina Obe +-- +-- This drops extension helper functions +-- and should be called at the end of the extension upgrade file +-- removes all postgis_topology functions from postgis_topology extension since they will be readded +-- during upgrade +SELECT postgis_extension_remove_objects('postgis', 'FUNCTION'); +SELECT postgis_extension_remove_objects('postgis', 'AGGREGATE'); +SELECT postgis_extension_drop_if_exists('postgis', 'DROP VIEW raster_columns'); +SELECT postgis_extension_drop_if_exists('postgis', 'DROP TYPE wktgeomval'); +SELECT postgis_extension_drop_if_exists('postgis', 'DROP TYPE _wktgeomval'); +SELECT postgis_extension_drop_if_exists('postgis', 'DROP TYPE raster_columns'); +SELECT postgis_extension_drop_if_exists('postgis', 'DROP TYPE _raster_columns'); diff -Nru postgis-1.5.3/extensions/postgis_extension_helper.sql postgis-2.0.1/extensions/postgis_extension_helper.sql --- postgis-1.5.3/extensions/postgis_extension_helper.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extensions/postgis_extension_helper.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,82 @@ +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- +-- $Id: postgis_extension_helper.sql 9324 2012-02-27 22:08:12Z pramsey $ +---- +-- PostGIS - Spatial Types for PostgreSQL +-- http://www.postgis.org +-- +-- Copyright (C) 2011 Regina Obe +-- Copyright (C) 2005 Refractions Research Inc. +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +-- +-- Author: Regina Obe +-- +-- This is a suite of SQL helper functions for use during a PostGIS extension install/upgrade +-- The functions get uninstalled after the extention install/upgrade process +--------------------------- +-- postgis_extension_remove_objects: This function removes objects of a particular class from an extension +-- this is needed because there is no ALTER EXTENSION DROP FUNCTION/AGGREGATE command +-- and we can't CREATE OR REPALCe functions whose signatures have changed and we can drop them if they are part of an extention +-- So we use this to remove it from extension first before we drop +CREATE OR REPLACE FUNCTION postgis_extension_remove_objects(param_extension text, param_type text) + RETURNS boolean AS +$$ +DECLARE + var_sql text := ''; + var_r record; + var_result boolean := false; + var_class text := ''; + var_is_aggregate boolean := false; + var_sql_list text := ''; +BEGIN + var_class := CASE WHEN lower(param_type) = 'function' OR lower(param_type) = 'aggregate' THEN 'pg_proc' ELSE '' END; + var_is_aggregate := CASE WHEN lower(param_type) = 'aggregate' THEN true ELSE false END; + var_sql_list := 'SELECT ''ALTER EXTENSION '' || e.extname || '' DROP '' || $3 || '' '' || COALESCE(proc.proname || ''('' || oidvectortypes(proc.proargtypes) || '')'',typ.typname, cd.relname, op.oprname, + cs.typname || '' AS '' || ct.typname || '') '', opcname, opfname) || '';'' AS remove_command + FROM pg_depend As d INNER JOIN pg_extension As e + ON d.refobjid = e.oid INNER JOIN pg_class As c ON + c.oid = d.classid + LEFT JOIN pg_proc AS proc ON proc.oid = d.objid + LEFT JOIN pg_type AS typ ON typ.oid = d.objid + LEFT JOIN pg_class As cd ON cd.oid = d.objid + LEFT JOIN pg_operator As op ON op.oid = d.objid + LEFT JOIN pg_cast AS ca ON ca.oid = d.objid + LEFT JOIN pg_type AS cs ON ca.castsource = cs.oid + LEFT JOIN pg_type AS ct ON ca.casttarget = ct.oid + LEFT JOIN pg_opclass As oc ON oc.oid = d.objid + LEFT JOIN pg_opfamily As ofa ON ofa.oid = d.objid + WHERE d.deptype = ''e'' and e.extname = $1 and c.relname = $2 AND COALESCE(proc.proisagg, false) = $4;'; + FOR var_r IN EXECUTE var_sql_list USING param_extension, var_class, param_type, var_is_aggregate + LOOP + var_sql := var_sql || var_r.remove_command || ';'; + END LOOP; + IF var_sql > '' THEN + EXECUTE var_sql; + var_result := true; + END IF; + RETURN var_result; +END; +$$ +LANGUAGE plpgsql VOLATILE; + +CREATE OR REPLACE FUNCTION postgis_extension_drop_if_exists(param_extension text, param_statement text) + RETURNS boolean AS +$$ +DECLARE + var_sql_ext text := 'ALTER EXTENSION ' || quote_ident(param_extension) || ' ' || replace(param_statement, 'IF EXISTS', ''); + var_result boolean := false; +BEGIN + BEGIN + EXECUTE var_sql_ext; + var_result := true; + EXCEPTION + WHEN OTHERS THEN + --this is to allow ignoring if the object does not exist in extension + var_result := false; + END; + RETURN var_result; +END; +$$ +LANGUAGE plpgsql VOLATILE; diff -Nru postgis-1.5.3/extensions/postgis_extension_helper_uninstall.sql postgis-2.0.1/extensions/postgis_extension_helper_uninstall.sql --- postgis-1.5.3/extensions/postgis_extension_helper_uninstall.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extensions/postgis_extension_helper_uninstall.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,18 @@ +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- +-- $Id: postgis_extension_helper_uninstall.sql 9324 2012-02-27 22:08:12Z pramsey $ +---- +-- PostGIS - Spatial Types for PostgreSQL +-- http://www.postgis.org +-- +-- Copyright (C) 2011 Regina Obe +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +-- +-- Author: Regina Obe +-- +-- This drops extension helper functions +-- and should be called at the end of the extension upgrade file +DROP FUNCTION postgis_extension_remove_objects(text, text); +DROP FUNCTION postgis_extension_drop_if_exists(text, text) diff -Nru postgis-1.5.3/extensions/postgis_topology/META.json postgis-2.0.1/extensions/postgis_topology/META.json --- postgis-1.5.3/extensions/postgis_topology/META.json 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extensions/postgis_topology/META.json 2012-01-09 20:17:59.000000000 +0000 @@ -0,0 +1,47 @@ +{ + "name": "postgis_topology", + "abstract": "PostGIS 2.0 Topology OGC/SQL-MM compliant spatial extender for PostgreSQL", + "description": "This module provides GIS Topology geometry types and functions", + "version": "2.0.0", + "release_status": "unstable", + "maintainer": "PostGIS Steering Committee", + "license": "gpl_2", + "provides": { + "postgis_raster": { + "abstract": "PostGIS SQL/MM Topology types and functions", + "version": "2.0.0", + "file": "sql/postgis_topology.sql", + "docfile": "doc/postgis.md" + } + } + "prereqs": { + "runtime": { + "requires": { + "plpgsql": 0, + "PostgreSQL": "8.4.0", + "postgis_core": "2.0.0" + } + } + }, + "generated_by": "Regina O. Obe", + "resources": { + "bugtracker": { + "web": "http://trac.osgeo.org/postgis" + }, + "repository": { + "url": "svn://svn.osgeo.org/postgis/", + "web": "http://www.postgis.org", + "type": "svn" + } + }, + "meta-spec": { + "version": "1.0.0", + "url": "http://pgxn.org/meta/spec.txt" + }, + "tags": [ + "gis", + "spatial", + "geometry", + "location", "topology", "sql/mm" + ] +} diff -Nru postgis-1.5.3/extensions/postgis_topology/Makefile.in postgis-2.0.1/extensions/postgis_topology/Makefile.in --- postgis-1.5.3/extensions/postgis_topology/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extensions/postgis_topology/Makefile.in 2012-03-27 23:17:43.000000000 +0000 @@ -0,0 +1,95 @@ +include ../upgradeable_versions.mk + +EXTENSION = postgis_topology +EXTVERSION = @POSTGIS_LIB_VERSION@ +MINORVERSION = @POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@ + +MICRO_NUMBER = $(shell echo $(EXTVERSION) | sed "s/[0-9]\.[0-9]\.\([0-9]*\)[a-zA-Z]*[0-9]*/\1/") +PREREL_NUMBER = $(shell echo $(EXTVERSION) | \ + sed "s/[0-9]\.[0-9]\.\(.*\)/\1/" | \ + grep "[a-zA-Z]" | \ + sed "s/[0-9][a-zA-Z]\([0-9]*\)[a-zA-Z]*/\1/") +MICRO_PREV = $(shell if test "$(MICRO_NUMBER)x" != "x"; then expr $(MICRO_NUMBER) - 1; fi) +PREREL_PREV = $(shell if test "$(PREREL_NUMBER)x" != "x"; then expr $(PREREL_NUMBER) - 1; fi) + +PREREL_PREFIX = $(shell echo $(EXTVERSION) | \ + sed "s/[0-9]\.[0-9]\.\(.*\)/\1/" | \ + grep "[a-zA-Z]" | \ + sed "s/\([0-9][a-zA-Z]*\)[0-9]*/\1/") + +DATA = $(filter-out $(wildcard sql/*--*.sql),$(wildcard sql/*.sql)) + +PG_CONFIG = @PGCONFIG@ + +PG91 = $(shell $(PG_CONFIG) --version | grep -qE " 8\.| 9\.0" && echo no || echo yes) +SQL_BITS = $(wildcard sql_bits/*.sql) +EXTRA_CLEAN += sql/*.sql ${SQL_BITS} + + +ifeq ($(PG91),yes) +all: sql/$(EXTENSION)--$(EXTVERSION).sql sql/$(EXTENSION)--unpackaged--$(EXTVERSION).sql sql_minor_upgrade + +sql/$(EXTENSION)--$(EXTVERSION).sql: sql/$(EXTENSION).sql + cp $< $@ + +sql/$(EXTENSION).sql: sql_bits/topology.sql sql_bits/mark_editable_objects.sql.in sql_bits/topology_comments.sql + cat $^ > $@ + +#strip BEGIN/COMMIT since these are not allowed in extensions +#strip CREATE SCHEMA since we force extension +# to create schema by setting schema to topology in control +sql_bits/topology.sql: ../../topology/topology.sql + sed -e 's/BEGIN;//g' -e 's/COMMIT;//g' -e '/^CREATE SCHEMA/d;' $< > $@ + +../../doc/topology_comments.sql: + $(MAKE) -C ../../doc comments + +sql_bits/topology_comments.sql: ../../doc/topology_comments.sql + cp $< $@ + +#grep all lines that start with CREATE OR REPLACE FUNCTION, TRIGGER... +#then replace CREATE OR REPLACE .. with ALTER EXTENSION..; +#then remove default values and extra junk +# sql/$(EXTENSION)--unpackaged--$(EXTVERSION).sql: ../../topology/topology.sql +# sed -e '/^CREATE \(OR REPLACE\|TYPE\|TABLE\|VIEW\|CAST\)/!d;' \ +# -e 's/OR REPLACE//g' \ +# -e 's/CREATE\(.*\)/ALTER EXTENSION $(EXTENSION) ADD\1;/' \ +# -e 's/DEFAULT [\.0-9a-zA-Z]\+//g' \ +# -e 's/\(BEFORE\|WITH FUNCTION\)\(.*\)/;/' \ +# -e 's/[ \t]+;/;/' \ +# -e 's/(;/;/' \ +# -e 's/\\(;/;/' \ +# -e 's/;;/;/g' $< > $@ + +#hardcode for now using +#the extensions/make_unpackaged.sql script form an install +sql/$(EXTENSION)--unpackaged--$(EXTVERSION).sql: sql_bits/topology--unpackaged.sql.in + cp $< $@ + +#upgrade script should have everything but table, schema, type creation/alter +#NOTE: we assume all object definitions end in ; +#first expression deletes all non-removable objects defined on same line +#second deletes all non-removable defined on multiple lines +# the end of the body of object we assume ends in ; +#aggregates are special +#they can be dropped but we need to remove +#them from the extension first +sql/topology_upgrade_minor.sql: sql_bits/topology.sql + sed -e '/^\(CREATE\|ALTER\) \(CAST\|TYPE\|TABLE\|SCHEMA\|DOMAIN\|TRIGGER\).*;/d' \ + -e '/^\(CREATE\|ALTER\) \(CAST\|TYPE\|TABLE\|SCHEMA\|DOMAIN\|TRIGGER\)/,/\;/d' \ + $< > $@ + +sql_minor_upgrade: ../postgis_extension_helper.sql sql_bits/remove_from_extension.sql.in sql/topology_upgrade_minor.sql sql_bits/mark_editable_objects.sql.in sql_bits/topology_comments.sql ../postgis_extension_helper_uninstall.sql + for OLD_VERSION in $(UPGRADEABLE_VERSIONS); do \ + cat $^ > sql/$(EXTENSION)--$$OLD_VERSION--$(EXTVERSION).sql; \ + done + +DATA = $(wildcard sql/*--*.sql) sql/$(EXTENSION)--$(EXTVERSION).sql +EXTRA_CLEAN += sql/$(EXTENSION)--$(EXTVERSION).sql sql/$(EXTENSION)--unpackaged--$(EXTVERSION).sql +endif + +distclean: clean + rm Makefile + +PGXS := $(shell $(PG_CONFIG) --pgxs) +include $(PGXS) diff -Nru postgis-1.5.3/extensions/postgis_topology/doc/postgis.md postgis-2.0.1/extensions/postgis_topology/doc/postgis.md --- postgis-1.5.3/extensions/postgis_topology/doc/postgis.md 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extensions/postgis_topology/doc/postgis.md 2012-01-09 20:17:59.000000000 +0000 @@ -0,0 +1,6 @@ +PostGIS 2.0.0 +============ + +Extensive documentation can be found at. +HTML: http://www.postgis.org/documentation/manual-svn/ +PDF: http://www.postgis.org/download/postgis-2.0.0SVN.pdf diff -Nru postgis-1.5.3/extensions/postgis_topology/postgis_topology.control postgis-2.0.1/extensions/postgis_topology/postgis_topology.control --- postgis-1.5.3/extensions/postgis_topology/postgis_topology.control 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extensions/postgis_topology/postgis_topology.control 2012-06-22 21:04:32.000000000 +0000 @@ -0,0 +1,6 @@ +# postgis topology extension +comment = 'PostGIS topology spatial types and functions' +default_version = '2.0.1' +relocatable = false +schema = topology +requires = postgis diff -Nru postgis-1.5.3/extensions/postgis_topology/postgis_topology.control.in postgis-2.0.1/extensions/postgis_topology/postgis_topology.control.in --- postgis-1.5.3/extensions/postgis_topology/postgis_topology.control.in 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extensions/postgis_topology/postgis_topology.control.in 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,6 @@ +# postgis topology extension +comment = 'PostGIS topology spatial types and functions' +default_version = '@POSTGIS_LIB_VERSION@' +relocatable = false +schema = topology +requires = postgis diff -Nru postgis-1.5.3/extensions/postgis_topology/sql_bits/mark_editable_objects.sql.in postgis-2.0.1/extensions/postgis_topology/sql_bits/mark_editable_objects.sql.in --- postgis-1.5.3/extensions/postgis_topology/sql_bits/mark_editable_objects.sql.in 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extensions/postgis_topology/sql_bits/mark_editable_objects.sql.in 2012-02-29 08:04:55.000000000 +0000 @@ -0,0 +1,2 @@ +SELECT pg_catalog.pg_extension_config_dump('topology', ''); +SELECT pg_catalog.pg_extension_config_dump('layer', ''); diff -Nru postgis-1.5.3/extensions/postgis_topology/sql_bits/remove_from_extension.sql.in postgis-2.0.1/extensions/postgis_topology/sql_bits/remove_from_extension.sql.in --- postgis-1.5.3/extensions/postgis_topology/sql_bits/remove_from_extension.sql.in 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extensions/postgis_topology/sql_bits/remove_from_extension.sql.in 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,20 @@ +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- +-- $Id: remove_from_extension.sql.in 9324 2012-02-27 22:08:12Z pramsey $ +---- +-- PostGIS - Spatial Types for PostgreSQL +-- http://www.postgis.org +-- +-- Copyright (C) 2011 Regina Obe +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +-- +-- Author: Regina Obe +-- +-- This drops extension helper functions +-- and should be called at the end of the extension upgrade file +-- removes all postgis_topology functions from postgis_topology extension since they will be readded +-- during upgrade +SELECT postgis_extension_remove_objects('postgis_topology', 'FUNCTION'); +SELECT postgis_extension_remove_objects('postgis_topology', 'AGGREGATE'); diff -Nru postgis-1.5.3/extensions/postgis_topology/sql_bits/topology--unpackaged.sql.in postgis-2.0.1/extensions/postgis_topology/sql_bits/topology--unpackaged.sql.in --- postgis-1.5.3/extensions/postgis_topology/sql_bits/topology--unpackaged.sql.in 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extensions/postgis_topology/sql_bits/topology--unpackaged.sql.in 2012-03-27 23:17:43.000000000 +0000 @@ -0,0 +1,89 @@ +ALTER EXTENSION postgis_topology ADD cast(topogeometry as geometry); +ALTER EXTENSION postgis_topology ADD function _asgmledge(integer,integer,integer,geometry,regclass,text,integer,integer,text,integer); +ALTER EXTENSION postgis_topology ADD function _asgmlface(text,integer,regclass,text,integer,integer,text,integer); +ALTER EXTENSION postgis_topology ADD function _asgmlnode(integer,geometry,text,integer,integer,text,integer); +ALTER EXTENSION postgis_topology ADD function _st_addfacesplit(character varying,integer,integer,boolean); +ALTER EXTENSION postgis_topology ADD function _st_adjacentedges(character varying,integer,integer); +ALTER EXTENSION postgis_topology ADD function _st_mintolerance(character varying,geometry); +ALTER EXTENSION postgis_topology ADD function _st_mintolerance(geometry); +ALTER EXTENSION postgis_topology ADD function addedge(character varying,geometry); +ALTER EXTENSION postgis_topology ADD function addface(character varying,geometry,boolean); +ALTER EXTENSION postgis_topology ADD function addnode(character varying,geometry); +ALTER EXTENSION postgis_topology ADD function addnode(character varying,geometry,boolean,boolean); +ALTER EXTENSION postgis_topology ADD function addtopogeometrycolumn(character varying,character varying,character varying,character varying,character varying); +ALTER EXTENSION postgis_topology ADD function addtopogeometrycolumn(character varying,character varying,character varying,character varying,character varying,integer); +ALTER EXTENSION postgis_topology ADD function addtosearchpath(character varying); +ALTER EXTENSION postgis_topology ADD function asgml(topogeometry); +ALTER EXTENSION postgis_topology ADD function asgml(topogeometry,regclass); +ALTER EXTENSION postgis_topology ADD function asgml(topogeometry,regclass,text); +ALTER EXTENSION postgis_topology ADD function asgml(topogeometry,text); +ALTER EXTENSION postgis_topology ADD function asgml(topogeometry,text,integer,integer); +ALTER EXTENSION postgis_topology ADD function asgml(topogeometry,text,integer,integer,regclass); +ALTER EXTENSION postgis_topology ADD function asgml(topogeometry,text,integer,integer,regclass,text); +ALTER EXTENSION postgis_topology ADD function asgml(topogeometry,text,integer,integer,regclass,text,integer); +ALTER EXTENSION postgis_topology ADD function copytopology(character varying,character varying); +ALTER EXTENSION postgis_topology ADD function createtopogeom(character varying,integer,integer); +ALTER EXTENSION postgis_topology ADD function createtopogeom(character varying,integer,integer,topoelementarray); +ALTER EXTENSION postgis_topology ADD function createtopology(character varying); +ALTER EXTENSION postgis_topology ADD function createtopology(character varying,integer); +ALTER EXTENSION postgis_topology ADD function createtopology(character varying,integer,double precision); +ALTER EXTENSION postgis_topology ADD function createtopology(character varying,integer,double precision,boolean); +ALTER EXTENSION postgis_topology ADD function droptopogeometrycolumn(character varying,character varying,character varying); +ALTER EXTENSION postgis_topology ADD function droptopology(character varying); +ALTER EXTENSION postgis_topology ADD function equals(topogeometry,topogeometry); +ALTER EXTENSION postgis_topology ADD function geometry(topogeometry); +ALTER EXTENSION postgis_topology ADD function geometrytype(topogeometry); +ALTER EXTENSION postgis_topology ADD function getedgebypoint(character varying,geometry,double precision); +ALTER EXTENSION postgis_topology ADD function getfacebypoint(character varying,geometry,double precision); +ALTER EXTENSION postgis_topology ADD function getnodebypoint(character varying,geometry,double precision); +ALTER EXTENSION postgis_topology ADD function getnodeedges(character varying,integer); +ALTER EXTENSION postgis_topology ADD function getringedges(character varying,integer,integer); +ALTER EXTENSION postgis_topology ADD function gettopogeomelementarray(character varying,integer,integer); +ALTER EXTENSION postgis_topology ADD function gettopogeomelementarray(topogeometry); +ALTER EXTENSION postgis_topology ADD function gettopogeomelements(character varying,integer,integer); +ALTER EXTENSION postgis_topology ADD function gettopogeomelements(topogeometry); +ALTER EXTENSION postgis_topology ADD function gettopologyid(character varying); +ALTER EXTENSION postgis_topology ADD function gettopologyname(integer); +ALTER EXTENSION postgis_topology ADD function gettopologysrid(character varying); +ALTER EXTENSION postgis_topology ADD function intersects(topogeometry,topogeometry); +ALTER EXTENSION postgis_topology ADD function layertrigger(); +ALTER EXTENSION postgis_topology ADD function polygonize(character varying); +ALTER EXTENSION postgis_topology ADD function postgis_topology_scripts_installed(); +ALTER EXTENSION postgis_topology ADD function relationtrigger(); +ALTER EXTENSION postgis_topology ADD function st_addedgemodface(character varying,integer,integer,geometry); +ALTER EXTENSION postgis_topology ADD function st_addedgenewfaces(character varying,integer,integer,geometry); +ALTER EXTENSION postgis_topology ADD function st_addisoedge(character varying,integer,integer,geometry); +ALTER EXTENSION postgis_topology ADD function st_addisonode(character varying,integer,geometry); +ALTER EXTENSION postgis_topology ADD function st_changeedgegeom(character varying,integer,geometry); +ALTER EXTENSION postgis_topology ADD function st_createtopogeo(character varying,geometry); +ALTER EXTENSION postgis_topology ADD function st_geometrytype(topogeometry); +ALTER EXTENSION postgis_topology ADD function st_getfaceedges(character varying,integer); +ALTER EXTENSION postgis_topology ADD function st_getfacegeometry(character varying,integer); +ALTER EXTENSION postgis_topology ADD function st_inittopogeo(character varying); +ALTER EXTENSION postgis_topology ADD function st_modedgeheal(character varying,integer,integer); +ALTER EXTENSION postgis_topology ADD function st_modedgesplit(character varying,integer,geometry); +ALTER EXTENSION postgis_topology ADD function st_moveisonode(character varying,integer,geometry); +ALTER EXTENSION postgis_topology ADD function st_newedgeheal(character varying,integer,integer); +ALTER EXTENSION postgis_topology ADD function st_newedgessplit(character varying,integer,geometry); +ALTER EXTENSION postgis_topology ADD function st_remedgemodface(character varying,integer); +ALTER EXTENSION postgis_topology ADD function st_remedgenewface(character varying,integer); +ALTER EXTENSION postgis_topology ADD function st_remisonode(character varying,integer); +ALTER EXTENSION postgis_topology ADD function st_removeisoedge(character varying,integer); +ALTER EXTENSION postgis_topology ADD function st_removeisonode(character varying,integer); +ALTER EXTENSION postgis_topology ADD function topoelementarray_agg(topoelement); +ALTER EXTENSION postgis_topology ADD function topoelementarray_append(topoelementarray,topoelement); +ALTER EXTENSION postgis_topology ADD function topogeo_addgeometry(character varying,geometry,double precision); +ALTER EXTENSION postgis_topology ADD function topogeo_addlinestring(character varying,geometry,double precision); +ALTER EXTENSION postgis_topology ADD function topogeo_addpoint(character varying,geometry,double precision); +ALTER EXTENSION postgis_topology ADD function topogeo_addpolygon(character varying,geometry,double precision); +ALTER EXTENSION postgis_topology ADD function topologysummary(character varying); +ALTER EXTENSION postgis_topology ADD function totopogeom(geometry,character varying,integer,double precision); +ALTER EXTENSION postgis_topology ADD function validatetopology(character varying); +ALTER EXTENSION postgis_topology ADD sequence topology_id_seq; +ALTER EXTENSION postgis_topology ADD table layer; +ALTER EXTENSION postgis_topology ADD table topology; +ALTER EXTENSION postgis_topology ADD type getfaceedges_returntype; +ALTER EXTENSION postgis_topology ADD type topoelement; +ALTER EXTENSION postgis_topology ADD type topoelementarray; +ALTER EXTENSION postgis_topology ADD type topogeometry; +ALTER EXTENSION postgis_topology ADD type validatetopology_returntype; diff -Nru postgis-1.5.3/extensions/upgradeable_versions.mk postgis-2.0.1/extensions/upgradeable_versions.mk --- postgis-1.5.3/extensions/upgradeable_versions.mk 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extensions/upgradeable_versions.mk 2012-04-03 19:22:38.000000000 +0000 @@ -0,0 +1,14 @@ +UPGRADEABLE_VERSIONS = \ + 2.0.0alpha1 \ + 2.0.0alpha2 \ + 2.0.0alpha3 \ + 2.0.0alpha4 \ + 2.0.0alpha5 \ + 2.0.0alpha6 \ + 2.0.0beta1 \ + 2.0.0beta2 \ + 2.0.0beta3 \ + 2.0.0beta4 \ + 2.0.0rc1 \ + 2.0.0rc2 \ + 2.0.0 diff -Nru postgis-1.5.3/extras/WFS_locks/WFS_locks.sql.in postgis-2.0.1/extras/WFS_locks/WFS_locks.sql.in --- postgis-1.5.3/extras/WFS_locks/WFS_locks.sql.in 2006-06-25 22:33:55.000000000 +0000 +++ postgis-2.0.1/extras/WFS_locks/WFS_locks.sql.in 2012-02-27 22:08:12.000000000 +0000 @@ -1,6 +1,6 @@ -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- --- $Id: WFS_locks.sql.in 2394 2006-06-25 22:33:55Z strk $ +-- $Id: WFS_locks.sql.in 9324 2012-02-27 22:08:12Z pramsey $ -- -- PostGIS - Spatial Types for PostgreSQL -- http://postgis.refractions.net diff -Nru postgis-1.5.3/extras/tiger_geocoder/INSTALL postgis-2.0.1/extras/tiger_geocoder/INSTALL --- postgis-1.5.3/extras/tiger_geocoder/INSTALL 2009-01-15 18:35:06.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/INSTALL 1970-01-01 00:00:00.000000000 +0000 @@ -1,76 +0,0 @@ -TIGER Geocoder - -2007/07/03 install instructions: - -- Install postgresql-8.2-postgis (For various GIS bits) -- Install PostGIS functions and spatial ref definitions: - \i /usr/share/postgresql-8.2-postgis/postgis.sql - \i /usr/share/postgresql-8.2-postgis/spatial_ref_sys.sql -- Install postgresql-contrib-8.2 for soundex (from fuzzystrmatch) -- Install functions into PG using: - \i /usr/share/postgresql/8.2/contrib/fuzzystrmatch.sql -- Modify and run import/load_tiger.sh for TIGER/Line data - (May wish to run the CompleteChain import seperate from the - Polygon import, since the latter takes an enourmous amount of time) -- Rename tables to be lower-case and whatnot -- Run ogr2ogr (example from tigerimport.sh called from load_tiger.sh) - for the TIGER Boundary SHP files (state boundaries, county boundaries, etc). - Might want download them into boundary/ - - Single-file import something like this: - ogr2ogr -append -f PostgreSQL -a_srs EPSG:4269 "PG:dbname=mydb user=tiger password=XXXXXXXX" WHATEVER.shp WHATEVER -lco DIM=2 - - Script to import the multi-file sets into a single table: - for file in *; do - mkdir x - cd x - unzip ../$file - BASE=`echo *.shp | cut -f1 -d.` - ogr2ogr -append -f PostgreSQL -a_srs EPSG:4269 "PG:dbname=mydb user=tiger password=XXXXXXXX" $BASE.shp $BASE -nln vt99_d00 -lco DIM=2 - cd .. - rm -rf x - done - -- Create geometry indexes on all the tables using GiST, eg: - CREATE INDEX completechain_geom_idx ON completechain - USING GIST (wkb_geometry public.gist_geometry_ops); -- Create lookup tables using lookup_tables.sql -- Create roads_local using roads_local.sql -- Create 'tiger_geocode_roads' using tiger_geocode_roads.sql -- Run create_geocode.sql to load the functions -- Profit! - -Old install instructions: - - 2004/10/28 - - A plpgsql based geocoder written for TIGER census data. - -Installation instructions: - -- If the database being used is new, ensure the following scripts have - been loaded: - - /opt/pgsql74/share/postgis.sql - /opt/pgsql74/share/contrib/spatial_ref_sys.sql - -- Load the fuzzy string matching functions. These must first be compiled, - and may be found in the contrib directory of the postgres source directory. - - psql [-p (port)] (database) < /usr/local/src/postgresql-7.4.5/contrib/fuzzystrmatch/fuzzystrmatch.sql - -- Ensure that the TIGER data is loaded into the target database. - -- Load the lookup tables. This creates the lookup tables and loads predefined - data into them. If the standardized TIGER data is not being used, this - script will need to be altered to reflect the actual data. Since the place - and countysub lookup tables are generated to reflect the data in use, the - database must be populated before this script is run. Indicies are also - created in this script. - - psql [-p (port)] (database) < lookup_tables.sql - -- Load the function scripts. This script loads the geocode function, and all - support modules and functions required by it. - - psql [-p (port)] (database) < tiger_geocoder.sql diff -Nru postgis-1.5.3/extras/tiger_geocoder/README postgis-2.0.1/extras/tiger_geocoder/README --- postgis-1.5.3/extras/tiger_geocoder/README 2007-07-03 21:05:03.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/README 2012-02-27 22:08:12.000000000 +0000 @@ -1,349 +1,62 @@ -TIGER Geocoder - - 2004/10/28 - - A plpgsql based geocoder written for TIGER census data. - -Design: - -There are two components to the geocoder, the address normalizer and the -address geocoder. These two components are described seperatly below. - -The goal of this project is to build a fully functional geocoder that can -process an arbitrary address string and, using normalized TIGER censes data, -produce a point geometry reflecting the location of the given address. - -- The geocoder should be simple for anyone familiar with PostGIS to install - and use. -- It should be robust enough to function properly despite formatting and - spelling errors. -- It should be extensible enough to be used with future data updates, or - alternate data sources with a minimum of coding changes. - -Installation: - - Refer to the INSTALL file for installation instructions. - -Usage: - - refcursor geocode(refcursor, 'address string'); - -Notes: - -- The assumed format for the address is the US Postal Service standard: - () indicates a field required by the geocoder, [] indicates an optional field. - - (address) [dirPrefix] (streetName) [streetType] [dirSuffix] - [internalAddress] [location] [state] [zipCode] - - - -Address Normalizer: - -The goal of the address normalizer is to provide a robust function to break a -given address string down into the components of an address. While the -normalizer is built specifically for the normalized US TIGER Census data, it -has been designed to be reasonably extensible to other data sets and localities. - -Usage: - - normalize_address('address string'); - -Support functions: - - location_extract_countysub_exact('partial address string', 'state abbreviation') - location_extract_countysub_fuzzy('partial address string', 'state abbreviation') - location_extract_place_exact('partial address string', 'state abbreviation') - location_extract_place_fuzzy('partial address string', 'state abbreviation') - cull_null('string') - count_words('string') - get_last_words('string') - state_extract('partial address string') - levenshtein_ignore_case('string', 'string') - -Notes: - -- A set of lookup tables, listed below, is used to provide street type, - secondary unit and direction abbreviation standards for a given set - of data. These are provided with the geocoder, but will need to be - customized for the data used. - - direction_lookup - secondary_unit_lookup - street_type_lookup - -- Additional lookup tables are required to perform matching for state - and location extraction. The state lookup is derived from the - US Postal Service standards, while the place and county subdivision - lookups are generated from the dataset. The creation statements for - the place and countysub tables are given in the INSTALL file. - - state_lookup - place_lookup - countysub_lookup - -- The use of lookup tables is intended to provide a versatile way of applying - the normalizer to data sets and localities other than the US Census TIGER - data. However, due to the need for matching based extraction in the event - of poorly formatted or incomplete address strings, assumptions are made about - the data available. Most notably the division of place and county - subdivision. For data sets without exactly two logical divisions in location - precision, code changes will be required. - -- The normalizer will perform better the more information is provided. - -- The process for normalization is roughly as follows: - - Extract the address from the beginning. - Extract the zipCode from the end. - Extract the state, using a fuzzy search if exact matching fails. - Attempt to extract the location by parsing the punctuation - of the address. - Find and remove any internal address. - If internal address was found: - Set location as everything between internal address and state. - Extract the street type from the string. - If multiple potential street types are found: - If internal address was found: - Extract the last street type that preceeds the internal address. - Else: - Extract the last street type. - If street type was found: - If a word beginning with a number follows the street type. - This indicates the street type is part of the street name, - eg. 'State Hwy 92a'. - Set street type to NULL. - Else if location not yet found: - Set location as everything between street type and state. - Extract direction prefix from start of street name. - If internal address was found: - Extract direction suffix from end of street name. - Else: - Extract direction suffix from start of location. - Set street name as everything that is not the address, direction - prefix or suffix, internal address, location, state or - zip code. - Else: - If internal address was found: - Extract direction prefix from beginning of string. - Extract direction suffix before internal address. - Set street name as everything that is not the address, direction - prefix or suffix, internal address, location, state or - zip code. - Else: - Extract direction suffix. - If direction suffix is found: - Set location as everything between direction suffix and state, - zip or end of string as appropriate. - Extract direction prefix from beginning of string. - Set street name as everything that is not the address, direction - prefix or suffix, internal address, location, state or - zip code. - Else: - Attempt to determine the location via exact comparison against - the places lookup. - Attempt to determine the location via exact comparison against - the countysub lookup. - Attempt to determine the location via fuzzy comparison against - the places lookup. - Attempt to determine the location via fuzzy comparison against - the countysub lookup. - Extract direction prefix. - Set street name as everything that is not the address, direction - prefix or suffix, internal address, location, state or - zip code. - - - -Address Geocoder: - -The goal of the address geocoder is to provide a robust means of searching -the database for a match to whatever data the user provides. To accomplish -this, the coder uses a series of checks and fallthrough cases. Starting with -the most specific combination of parameters, the algorithm works outwards -towards the most vague combination, until valid results are found. The result -of this is that the more accurate information that is provided, the faster the -algorithm will return. - -Usage: - - normalize_address('address string'); - -Support functions: - - geocode_address(cursor, address, 'dirPrefix', 'streetName', 'streetType', - 'dirSuffix', 'location', 'state', zipCode) - geocode_address_zip(cursor, address, 'dirPrefix', 'streetName', - 'streetType', 'dirSuffix', zipCode) - geocode_address_countysub_exact(cursor, address, 'dirPrefix', 'streetName', - 'streetType', 'dirSuffix', 'location', 'state') - geocode_address_countysub_fuzzy(cursor, address, 'dirPrefix', 'streetName', - 'streetType', 'dirSuffix', 'location', 'state') - geocode_address_place_exact(cursor, address, 'dirPrefix', 'streetName', - 'streetType', 'dirSuffix', 'location', 'state') - geocode_address_place_fuzzy(cursor, address, 'dirPrefix', 'streetName', - 'streetType', 'dirSuffix', 'location', 'state') - rate_attributes('dirPrefixA', 'dirPrefixB', 'streetNameA', 'streetNameB', - 'streetTypeA', 'streetTypeB', 'dirSuffixA', 'dirSuffixB') - rate_attributes('dirPrefixA', 'dirPrefixB', 'streetNameA', 'streetNameB', - 'streetTypeA', 'streetTypeB', 'dirSuffixA', 'dirSuffixB', - 'locationA', 'locationB') - location_extract_countysub_exact('partial address string', 'state abbreviation') - location_extract_countysub_fuzzy('partial address string', 'state abbreviation') - location_extract_place_exact('partial address string', 'state abbreviation') - location_extract_place_fuzzy('partial address string', 'state abbreviation') - cull_null('string') - count_words('string') - get_last_words('string') - state_extract('partial address string') - levenshtein_ignore_case('string', 'string') - interpolate_from_address(given address, from address L, to address L, - from address R, to address R, street segment) - interpolate_from_address(given address, 'from address L', 'to address L', - 'from address R', 'to address R', street segment) - includes_address(given address, from address L, to address L, - from address R, to address R) - includes_address(given address, 'from address L', 'to address L', - 'from address R', 'to address R') - -Notes: - -- The geocoder is quite dependent on the address normalizer. The direction - prefix and suffix, streetType and state are all expected to be standard - abbreviations that will match exactly to the database. - -- Either a zip code, or a location must be provided. No exception will be - thrown, but the result will be null. If the zip code or location cannot - be matched, with the other information provided, against the database - the result is null. - -- The process is as follows: - - If a zipCode is provided: - Check if the zipCode, streetName and optionally state match any roads. - If they do: - Check if the given address fits any of the roads. - If it does: - Return the matching road segment information, rating and - interpolated geographic point. - If location exactly matches a place: - Check if the place, streetName and optionally state match any roads. - If they do: - Check if the given address fits any of the roads. - If it does: - Return the matching road segment information, rating and - interpolated geographic point. - If location exactly matches a countySubdivision: - Check if the countySubdivision, streetName and optionally state - match any roads. - If they do: - Check if the given address fits any of the roads. - If it does: - Return the matching road segment information, rating and - interpolated geographic point. - If location approximately matches a place: - Check if the place, streetName and optionally state match any roads. - If they do: - Check if the given address fits any of the roads. - If it does: - Return the matching road segment information, rating and - interpolated geographic point. - If location approximately matches a countySubdivision: - Check if the countySubdivision, streetName and optionally state - match any roads. - If they do: - Check if the given address fits any of the roads. - If it does: - Return the matching road segment information, rating and - interpolated geographic point. - - -Current Issues / Known Failures: - -- If a location starts with a direction, eg. East Seattle, and no suffix - direction is given, the direction from the location will be interpreted - as the streets suffix direction. - - '18196 68th Ave East Seattle Washington' - address = 18196 - dirPrefix = NULL - streetName = '68th' - streetType = 'Ave' - dirSuffix = 'E' - location = 'Seattle' - state = 'WA' - zip = NULL - -- The last possible street type in the string is interpreted as the street type - to allow street names to contain type words. As a result, any location - containing a street type will have the type interpreted as the street type. - - '29645 7th Street SW Federal Way 98023' - address = 29645 - dirPrefix = NULL - streetName = 7th Street SW Federal - streetType = Way - dirSuffix = NULL - location = NULL - state = NULL - zip = 98023 - -- While some state misspellings will be picked up by the fuzzy searches, - misspelled or non-standard abbreviations may not be picked up, due to - the length (soundex uses an intial character plus three codeable - characters) - - '2554 E Highland Dr Seatel Wash' - address = 2554 - dirPrefix = 'E' - streetName = 'Highland' - streetType = 'Dr' - dirSuffix = NULL - location = 'Seatel Wash' - state = NULL - zip = NULL - -- If neither a location or a zip code are found by the normalizer, no search - is performed. - -- If neither street type, direction suffix nor location are given in the - address string, the street name is generally misclassified as the - location. - - '98 E Main Washington 98012' - address = 98 - dirPrefix = 'E' - streetName = NULL - streetType = NULL - dirSuffix = NULL - location = 'Main' - state = 'WA' - zip = 98012 - -- If no street type is given and the street name contains a type word, then the - type in the street name is interpreted as the street type. - - '1348 SW Orchard Seattle wa 98106' - 1348::SW:Orch::Seattle:WA:98106 - address = 1348 - dirPrefix = NULL - streetName = SW - streetType = Orch - dirSuffix = NULL - location = Seattle - state = WA - zip = 98106 - -- Misspellings of words are only handled so far as their soundex values match. - - 'Hiland' will not be matched with 'Highland' - soundex('Hiland') = 'H453' - soundex('Highland') = 'H245' - -- Missing words in location or street name are not handled. - - 'Redmond Fall' will not be matched with 'Redmond Fall City' - -- Unacceptable failure cases: - The street name is parsed out as 'West Central Park' - '500 South West Central Park Ave Chicago Illinois 60624' +$Id: README 9324 2012-02-27 22:08:12Z pramsey $ +TIGER Geocoder + + 2011/01/23 + + A plpgsql based geocoder written for TIGER census data. + +Design: + +There are two components to the geocoder, the address normalizer and the +address geocoder. These two components are described separately. + +The goal of this project is to build a fully functional geocoder that can +process an arbitrary address string and, using normalized TIGER census data, +produce a point geometry reflecting the location of the given address. + +- The geocoder should be simple for anyone familiar with PostGIS to install + and use. +- It should be robust enough to function properly despite formatting and + spelling errors. +- It should be extensible enough to be used with future data updates, or + alternate data sources with a minimum of coding changes. + +Installation: + + Refer to the README in the respective year tiger folder for installation and example usage. The latest scripts as of this writing are for tiger_2010. + + +Usage: + + SELECT g.rating, g.geomout, (addy).* FROM geocode('address string') As g; + +e.g: SELECT g.rating, + ST_X(geomout) As lon, + ST_Y(geomout) As lat, (addy).* FROM geocode('1731 New Hampshire Avenue Northwest, Washington, DC 20010') As g; + +Notes: + +- The assumed format for the address is the US Postal Service standard: + () indicates a field required by the geocoder, [] indicates an optional field. + + (address) [dirPrefix] (streetName) [streetType] [dirSuffix] + [internalAddress] [location] [state] [zipCode] + + + +Address Normalizer: + +The goal of the address normalizer is to provide a robust function to break a +given address string down into the components of an address. While the +normalizer is built specifically for the normalized US TIGER Census data, it +has been designed to be reasonably extensible to other data sets and localities. + +Usage: + + normalize_address('address string'); + + e.g.: SELECT naddy.* FROM normalize_address('29645 7th Street SW Federal Way 98023') AS naddy; + + address | predirabbrev | streetname | streettypeabbrev | postdirabbrev | internal | location | stateabbrev | zip | parsed + ---------+-------------+-----------------------+------------------+---------------+----------+----------+-------------+-------+-------- + 29645 | | 7th Street SW Federal | Way | | | | | 98023 | \ No newline at end of file diff -Nru postgis-1.5.3/extras/tiger_geocoder/create_geocode.sql postgis-2.0.1/extras/tiger_geocoder/create_geocode.sql --- postgis-1.5.3/extras/tiger_geocoder/create_geocode.sql 2007-07-09 02:20:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/create_geocode.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,59 +0,0 @@ - --- Tiger is where we're going to create the functions, but we need --- the PostGIS functions/types which are in public. -SET search_path TO tiger,public; - --- Type used to pass around a normalized address between functions -DROP TYPE IF EXISTS norm_addy CASCADE; -CREATE TYPE norm_addy AS ( - address INTEGER, - preDirAbbrev VARCHAR, - streetName VARCHAR, - streetTypeAbbrev VARCHAR, - postDirAbbrev VARCHAR, - internal VARCHAR, - location VARCHAR, - stateAbbrev VARCHAR, - zip INTEGER, - parsed BOOLEAN); - --- System/General helper functions -\i utility/utmzone.sql -\i utility/cull_null.sql -\i utility/nullable_levenshtein.sql -\i utility/levenshtein_ignore_case.sql - ----- Address normalizer --- General helpers -\i normalize/end_soundex.sql -\i normalize/count_words.sql -\i normalize/state_extract.sql -\i normalize/get_last_words.sql --- Location extraction/normalization helpers -\i normalize/location_extract_countysub_exact.sql -\i normalize/location_extract_countysub_fuzzy.sql -\i normalize/location_extract_place_exact.sql -\i normalize/location_extract_place_fuzzy.sql -\i normalize/location_extract.sql --- Normalization API, called by geocode mainly. -\i normalize/normalize_address.sql -\i normalize/pprint_addy.sql - ----- Geocoder functions --- General helpers -\i geocode/rate_attributes.sql -\i geocode/includes_address.sql -\i geocode/interpolate_from_address.sql --- Actual lookups/geocoder helpers -\i geocode/geocode_address_countysub_exact.sql -\i geocode/geocode_address_countysub_fuzzy.sql -\i geocode/geocode_address_place_exact.sql -\i geocode/geocode_address_place_fuzzy.sql -\i geocode/geocode_address.sql -\i geocode/geocode_address_state.sql -\i geocode/geocode_address_zip.sql -\i geocode/geocode_zip.sql -\i geocode/geocode_location.sql --- Geocode API, called by user -\i geocode/geocode_get_point.sql -\i geocode/geocode.sql diff -Nru postgis-1.5.3/extras/tiger_geocoder/geocode/geocode.sql postgis-2.0.1/extras/tiger_geocoder/geocode/geocode.sql --- postgis-1.5.3/extras/tiger_geocoder/geocode/geocode.sql 2007-07-09 03:11:25.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/geocode/geocode.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,111 +0,0 @@ -CREATE OR REPLACE FUNCTION geocode( - input VARCHAR, - OUT ADDY NORM_ADDY, - OUT GEOMOUT GEOMETRY, - OUT RATING INTEGER -) RETURNS SETOF RECORD -AS $_$ -DECLARE - result REFCURSOR; - rec RECORD; -BEGIN - - IF input IS NULL THEN - RETURN; - END IF; - - -- Pass the input string into the address normalizer - ADDY := normalize_address(input); - IF NOT ADDY.parsed THEN - RETURN; - END IF; - - OPEN result FOR SELECT * FROM geocode(ADDY); - - LOOP - FETCH result INTO rec; - - IF NOT FOUND THEN - RETURN; - END IF; - - ADDY := rec.addy; - GEOMOUT := rec.geomout; - RATING := rec.rating; - - RETURN NEXT; - END LOOP; - - RETURN; - -END; -$_$ LANGUAGE plpgsql; - - -CREATE OR REPLACE FUNCTION geocode( - IN_ADDY NORM_ADDY, - OUT ADDY NORM_ADDY, - OUT GEOMOUT GEOMETRY, - OUT RATING INTEGER -) RETURNS SETOF RECORD -AS $_$ -DECLARE - result REFCURSOR; - rec RECORD; -BEGIN - - IF NOT IN_ADDY.parsed THEN - RETURN; - END IF; - - -- Go for the full monty if we've got enough info - IF IN_ADDY.address IS NOT NULL AND - IN_ADDY.streetName IS NOT NULL AND - (IN_ADDY.zip IS NOT NULL OR IN_ADDY.stateAbbrev IS NOT NULL) THEN - - result := geocode_address(IN_ADDY); - END IF; - - -- Next best is zipcode, if we've got it - IF result IS NULL AND IN_ADDY.zip IS NOT NULL THEN - result := geocode_zip(IN_ADDY); - END IF; - - -- No zip code, try state/location, need both or we'll get too much stuffs. - IF result IS NULL AND IN_ADDY.stateAbbrev IS NOT NULL AND IN_ADDY.location IS NOT NULL THEN - result := geocode_location(IN_ADDY); - END IF; - - IF result IS NULL THEN - RETURN; - END IF; - - ADDY.address := IN_ADDY.address; - ADDY.internal := IN_ADDY.internal; - - LOOP - FETCH result INTO rec; - - IF NOT FOUND THEN - RETURN; - END IF; - - ADDY.preDirAbbrev := rec.fedirp; - ADDY.streetName := rec.fename; - ADDY.streetTypeAbbrev := rec.fetype; - ADDY.postDirAbbrev := rec.fedirs; - ADDY.location := rec.place; - ADDY.stateAbbrev := rec.state; - ADDY.zip := rec.zip; - ADDY.parsed := TRUE; - - GEOMOUT := rec.address_geom; - RATING := rec.rating; - - RETURN NEXT; - END LOOP; - - RETURN; - -END; -$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/geocode/geocode_address.sql postgis-2.0.1/extras/tiger_geocoder/geocode/geocode_address.sql --- postgis-1.5.3/extras/tiger_geocoder/geocode/geocode_address.sql 2007-07-03 21:30:34.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/geocode/geocode_address.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,94 +0,0 @@ --- geocode(cursor, address, directionPrefix, streetName, --- streetTypeAbbreviation, directionSuffix, location, stateAbbreviation, --- zipCode) -CREATE OR REPLACE FUNCTION geocode_address( - parsed NORM_ADDY -) RETURNS REFCURSOR -AS $_$ -DECLARE - result REFCURSOR; - tempString VARCHAR; - ziplookup RECORD; -BEGIN - -- The first step is to determine what weve been given, and if its enough. - IF parsed.address IS NULL THEN - -- The address is manditory. - -- Without it, wed be wandering into strangers homes all the time. - RETURN NULL; - END IF; - - IF parsed.streetName IS NULL THEN - -- A street name must be given. Think about it. - RETURN NULL; - END IF; - - IF parsed.zip IS NOT NULL THEN - -- If the zip code is given, it is the most useful way to narrow the - -- search. We will try it first, and if no results match, we will move - -- on to a location search. There is no fuzzy searching on zip codes. - result := geocode_address_zip(result, parsed); - IF result IS NOT NULL THEN - RETURN result; - END IF; - -- If we weren't able to find one using the zip code, but the zip code - -- exists, and location is null, then fill in the location and/or state - -- based on the zip code so that the location lookup has a chance. - IF parsed.stateAbbrev IS NULL OR parsed.location IS NULL THEN - SELECT INTO ziplookup * FROM zip_lookup_base JOIN state_lookup ON (state = name) WHERE zip = parsed.zip; - IF FOUND THEN - parsed.stateAbbrev := coalesce(parsed.stateAbbrev,ziplookup.abbrev); - parsed.location := coalesce(parsed.location,ziplookup.city); - END IF; - END IF; - END IF; - - -- After now, the location becomes manditory. - IF parsed.location IS NOT NULL THEN - -- location may be useful, it may not. The first step is to determine if - -- there are any potenial matches in the place and countysub fields. - -- This is done against the lookup tables, and will save us time on much - -- larger queries if they dont match. - tempString := location_extract_place_exact(parsed.location, parsed.stateAbbrev); - IF tempString IS NOT NULL THEN - result := geocode_address_place_exact(result, parsed); - IF result IS NOT NULL THEN - RETURN result; - END IF; - END IF; - - tempString := location_extract_countysub_exact(parsed.location, parsed.stateAbbrev); - IF tempString IS NOT NULL THEN - result := geocode_address_countysub_exact(result, parsed); - IF result IS NOT NULL THEN - RETURN result; - END IF; - END IF; - - tempString := location_extract_place_fuzzy(parsed.location, parsed.stateAbbrev); - IF tempString IS NOT NULL THEN - result := geocode_address_place_fuzzy(result, parsed); - IF result IS NOT NULL THEN - RETURN result; - END IF; - END IF; - - tempString := location_extract_countysub_fuzzy(parsed.location, parsed.stateAbbrev); - IF tempString IS NOT NULL THEN - result := geocode_address_countysub_fuzzy(result, parsed); - IF result IS NOT NULL THEN - RETURN result; - END IF; - END IF; - END IF; - - -- Try with just the state if we can't find the location - IF parsed.stateAbbrev IS NOT NULL THEN - result := geocode_address_state(result, parsed); - IF result IS NOT NULL THEN - RETURN result; - END IF; - END IF; - - RETURN NULL; -END; -$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/geocode/geocode_address_countysub_exact.sql postgis-2.0.1/extras/tiger_geocoder/geocode/geocode_address_countysub_exact.sql --- postgis-1.5.3/extras/tiger_geocoder/geocode/geocode_address_countysub_exact.sql 2009-03-12 23:20:26.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/geocode/geocode_address_countysub_exact.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,161 +0,0 @@ -CREATE OR REPLACE FUNCTION geocode_address_countysub_exact( - result REFCURSOR, - parsed NORM_ADDY -) RETURNS REFCURSOR -AS $_$ -DECLARE - result REFCURSOR; - tempString VARCHAR; - tempInt INTEGER; -BEGIN - IF parsed.location IS NULL THEN - -- location is manditory. This is the location geocoder after all. - RETURN NULL; - END IF; - - -- Check to see if the road name can be matched. - IF parsed.stateAbbrev IS NOT NULL THEN - SELECT INTO tempInt count(*) FROM tiger_geocode_roads - WHERE parsed.location = tiger_geocode_roads.cousub - AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) - AND parsed.stateAbbrev = tiger_geocode_roads.state; - ELSE - SELECT INTO tempInt count(*) FROM tiger_geocode_roads - WHERE parsed.location = tiger_geocode_roads.cousub - AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename); - END IF; - - IF tempInt = 0 THEN - RETURN NULL; - ELSE - -- The road name matches, now we check to see if the addresses match - IF parsed.stateAbbrev IS NOT NULL THEN - SELECT INTO tempInt count(*) - FROM ( - SELECT *, rate_attributes(parsed.preDirAbbrev, tiger_geocode_roads.fedirp, - parsed.streetName, tiger_geocode_roads.fename, parsed.streetTypeAbbrev, - tiger_geocode_roads.fetype, parsed.postDirAbbrev, - tiger_geocode_roads.fedirs) as rating - FROM tiger_geocode_roads - WHERE parsed.location = tiger_geocode_roads.cousub - AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) - AND parsed.stateAbbrev = tiger_geocode_roads.state - ) AS subquery, roads_local - WHERE includes_address(parsed.address, roads_local.fraddl, roads_local.toaddl, - roads_local.fraddr, roads_local.toaddr) - AND subquery.tlid = roads_local.tlid; - ELSE - SELECT INTO tempInt count(*) - FROM ( - SELECT *, rate_attributes(parsed.preDirAbbrev, tiger_geocode_roads.fedirp, - parsed.streetName, tiger_geocode_roads.fename, parsed.streetTypeAbbrev, - tiger_geocode_roads.fetype, parsed.postDirAbbrev, - tiger_geocode_roads.fedirs) as rating - FROM tiger_geocode_roads - WHERE parsed.location = tiger_geocode_roads.cousub - AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) - ) AS subquery, roads_local - WHERE includes_address(parsed.address, roads_local.fraddl, roads_local.toaddl, - roads_local.fraddr, roads_local.toaddr) - AND subquery.tlid = roads_local.tlid; - END IF; - - IF tempInt = 0 THEN - RETURN NULL; - ELSE - IF parsed.stateAbbrev IS NOT NULL THEN - OPEN result FOR - SELECT - roads_local.fedirp as fedirp, - roads_local.fename as fename, - roads_local.fetype as fetype, - roads_local.fedirs as fedirs, - CASE WHEN (parsed.address % 2) = roads_local.fraddl - OR (parsed.address % 2) = roads_local.toaddl - THEN coalesce(pl.name,zipl.city,csl.name,col.name) ELSE coalesce(pr.name,zipr.city,csr.name,cor.name) END as place, - CASE WHEN (parsed.address % 2) = roads_local.fraddl - OR (parsed.address % 2) = roads_local.toaddl - THEN sl.abbrev ELSE sr.abbrev END as state, - CASE WHEN (parsed.address % 2) = roads_local.fraddl - OR (parsed.address % 2) = roads_local.toaddl - THEN zipl ELSE zipr END as zip, - interpolate_from_address(parsed.address, roads_local.fraddl, - roads_local.toaddl, roads_local.fraddr, roads_local.toaddr, - roads_local.geom) as address_geom, - subquery.rating as rating - FROM ( - SELECT *, rate_attributes(parsed.preDirAbbrev, tiger_geocode_roads.fedirp, - parsed.streetName, tiger_geocode_roads.fename, parsed.streetTypeAbbrev, - tiger_geocode_roads.fetype, parsed.postDirAbbrev, - tiger_geocode_roads.fedirs, parsed.location, - tiger_geocode_roads.cousub) as rating - FROM tiger_geocode_roads - WHERE parsed.location = tiger_geocode_roads.cousub - AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) - AND parsed.stateAbbrev = tiger_geocode_roads.state - ) AS subquery - JOIN roads_local ON (subquery.tlid = roads_local.tlid) - JOIN state_lookup sl ON (roads_local.statel = sl.st_code) - JOIN state_lookup sr ON (roads_local.stater = sr.st_code) - LEFT JOIN place_lookup pl ON (roads_local.statel = pl.st_code AND roads_local.placel = pl.pl_code) - LEFT JOIN place_lookup pr ON (roads_local.stater = pr.st_code AND roads_local.placer = pr.pl_code) - LEFT JOIN county_lookup col ON (roads_local.statel = col.st_code AND roads_local.countyl = col.co_code) - LEFT JOIN county_lookup cor ON (roads_local.stater = cor.st_code AND roads_local.countyr = cor.co_code) - LEFT JOIN countysub_lookup csl ON (roads_local.statel = csl.st_code AND roads_local.countyl = csl.co_code AND roads_local.cousubl = csl.cs_code) - LEFT JOIN countysub_lookup csr ON (roads_local.stater = csr.st_code AND roads_local.countyr = csr.co_code AND roads_local.cousubr = csr.cs_code) - LEFT JOIN zip_lookup_base zipl ON (roads_local.zipl = zipl.zip) - LEFT JOIN zip_lookup_base zipr ON (roads_local.zipr = zipr.zip) - WHERE includes_address(parsed.address, roads_local.fraddl, roads_local.toaddl, - roads_local.fraddr, roads_local.toaddr) - ORDER BY subquery.rating; - RETURN result; - ELSE - OPEN result FOR - SELECT - roads_local.fedirp as fedirp, - roads_local.fename as fename, - roads_local.fetype as fetype, - roads_local.fedirs as fedirs, - CASE WHEN (parsed.address % 2) = roads_local.fraddl - OR (parsed.address % 2) = roads_local.toaddl - THEN coalesce(pl.name,zipl.city,csl.name,col.name) ELSE coalesce(pr.name,zipr.city,csr.name,cor.name) END as place, - CASE WHEN (parsed.address % 2) = roads_local.fraddl - OR (parsed.address % 2) = roads_local.toaddl - THEN sl.abbrev ELSE sr.abbrev END as state, - CASE WHEN (parsed.address % 2) = roads_local.fraddl - OR (parsed.address % 2) = roads_local.toaddl - THEN zipl ELSE zipr END as zip, - interpolate_from_address(parsed.address, roads_local.fraddl, - roads_local.toaddl, roads_local.fraddr, roads_local.toaddr, - roads_local.geom) as address_geom, - subquery.rating as rating - FROM ( - SELECT *, rate_attributes(parsed.preDirAbbrev, tiger_geocode_roads.fedirp, - parsed.streetName, tiger_geocode_roads.fename, parsed.streetTypeAbbrev, - tiger_geocode_roads.fetype, parsed.postDirAbbrev, - tiger_geocode_roads.fedirs, parsed.location, - tiger_geocode_roads.cousub) as rating - FROM tiger_geocode_roads - WHERE parsed.location = tiger_geocode_roads.cousub - AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) - ) AS subquery - JOIN roads_local ON (subquery.tlid = roads_local.tlid) - JOIN state_lookup sl ON (roads_local.statel = sl.st_code) - JOIN state_lookup sr ON (roads_local.stater = sr.st_code) - LEFT JOIN place_lookup pl ON (roads_local.statel = pl.st_code AND roads_local.placel = pl.pl_code) - LEFT JOIN place_lookup pr ON (roads_local.stater = pr.st_code AND roads_local.placer = pr.pl_code) - LEFT JOIN county_lookup col ON (roads_local.statel = col.st_code AND roads_local.countyl = col.co_code) - LEFT JOIN county_lookup cor ON (roads_local.stater = cor.st_code AND roads_local.countyr = cor.co_code) - LEFT JOIN countysub_lookup csl ON (roads_local.statel = csl.st_code AND roads_local.countyl = csl.co_code AND roads_local.cousubl = csl.cs_code) - LEFT JOIN countysub_lookup csr ON (roads_local.stater = csr.st_code AND roads_local.countyr = csr.co_code AND roads_local.cousubr = csr.cs_code) - LEFT JOIN zip_lookup_base zipl ON (roads_local.zipl = zipl.zip) - LEFT JOIN zip_lookup_base zipr ON (roads_local.zipr = zipr.zip) - WHERE includes_address(parsed.address, roads_local.fraddl, roads_local.toaddl, - roads_local.fraddr, roads_local.toaddr) - ORDER BY subquery.rating; - RETURN result; - END IF; - END IF; - END IF; -END; -$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/geocode/geocode_address_countysub_fuzzy.sql postgis-2.0.1/extras/tiger_geocoder/geocode/geocode_address_countysub_fuzzy.sql --- postgis-1.5.3/extras/tiger_geocoder/geocode/geocode_address_countysub_fuzzy.sql 2009-03-12 23:20:26.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/geocode/geocode_address_countysub_fuzzy.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,162 +0,0 @@ -CREATE OR REPLACE FUNCTION geocode_address_countysub_fuzzy( - result REFCURSOR, - parsed NORM_ADDY -) RETURNS REFCURSOR -AS $_$ -DECLARE - result REFCURSOR; - tempString VARCHAR; - tempInt INTEGER; -BEGIN - -- The first step is to determine what weve been given, and if its enough. - IF parsed.location IS NULL THEN - -- location is manditory. This is the location geocoder after all. - RETURN NULL; - END IF; - - -- Check to see if the road name can be matched. - IF parsed.stateAbbrev IS NOT NULL THEN - SELECT INTO tempInt count(*) FROM tiger_geocode_roads - WHERE soundex(parsed.location) = soundex(tiger_geocode_roads.cousub) - AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) - AND parsed.stateAbbrev = tiger_geocode_roads.state; - ELSE - SELECT INTO tempInt count(*) FROM tiger_geocode_roads - WHERE soundex(parsed.location) = soundex(tiger_geocode_roads.cousub) - AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename); - END IF; - - IF tempInt = 0 THEN - RETURN NULL; - END IF; - - -- The road name matches, now we check to see if the addresses match - IF parsed.stateAbbrev IS NOT NULL THEN - SELECT INTO tempInt count(*) - FROM ( - SELECT *, rate_attributes(parsed.preDirAbbrev, tiger_geocode_roads.fedirp, - parsed.streetName, tiger_geocode_roads.fename, parsed.streetTypeAbbrev, - tiger_geocode_roads.fetype, parsed.postDirAbbrev, - tiger_geocode_roads.fedirs) as rating - FROM tiger_geocode_roads - WHERE soundex(parsed.location) = soundex(tiger_geocode_roads.cousub) - AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) - AND parsed.stateAbbrev = tiger_geocode_roads.state - ) AS subquery, roads_local - WHERE includes_address(parsed.address, roads_local.fraddl, roads_local.toaddl, - roads_local.fraddr, roads_local.toaddr) - AND subquery.tlid = roads_local.tlid; - ELSE - SELECT INTO tempInt count(*) - FROM ( - SELECT *, rate_attributes(parsed.preDirAbbrev, tiger_geocode_roads.fedirp, - parsed.streetName, tiger_geocode_roads.fename, parsed.streetTypeAbbrev, - tiger_geocode_roads.fetype, parsed.postDirAbbrev, - tiger_geocode_roads.fedirs) as rating - FROM tiger_geocode_roads - WHERE soundex(parsed.location) = soundex(tiger_geocode_roads.cousub) - AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) - ) AS subquery, roads_local - WHERE includes_address(parsed.address, roads_local.fraddl, roads_local.toaddl, - roads_local.fraddr, roads_local.toaddr) - AND subquery.tlid = roads_local.tlid; - END IF; - - IF tempInt = 0 THEN - RETURN NULL; - END IF; - - IF parsed.stateAbbrev IS NOT NULL THEN - OPEN result FOR - SELECT - roads_local.fedirp as fedirp, - roads_local.fename as fename, - roads_local.fetype as fetype, - roads_local.fedirs as fedirs, - CASE WHEN (parsed.address % 2) = roads_local.fraddl - OR (parsed.address % 2) = roads_local.toaddl - THEN coalesce(pl.name,zipl.city,csl.name,col.name) ELSE coalesce(pr.name,zipr.city,csr.name,cor.name) END as place, - CASE WHEN (parsed.address % 2) = roads_local.fraddl - OR (parsed.address % 2) = roads_local.toaddl - THEN sl.abbrev ELSE sr.abbrev END as state, - CASE WHEN (parsed.address % 2) = roads_local.fraddl - OR (parsed.address % 2) = roads_local.toaddl - THEN zipl ELSE zipr END as zip, - interpolate_from_address(parsed.address, roads_local.fraddl, - roads_local.toaddl, roads_local.fraddr, roads_local.toaddr, - roads_local.geom) as address_geom, - subquery.rating as rating - FROM ( - SELECT *, rate_attributes(parsed.preDirAbbrev, tiger_geocode_roads.fedirp, - parsed.streetName, tiger_geocode_roads.fename, parsed.streetTypeAbbrev, - tiger_geocode_roads.fetype, parsed.postDirAbbrev, - tiger_geocode_roads.fedirs, parsed.location, - tiger_geocode_roads.cousub) as rating - FROM tiger_geocode_roads - WHERE soundex(parsed.location) = soundex(tiger_geocode_roads.cousub) - AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) - AND parsed.stateAbbrev = tiger_geocode_roads.state - ) AS subquery - JOIN roads_local ON (subquery.tlid = roads_local.tlid) - JOIN state_lookup sl ON (roads_local.statel = sl.st_code) - JOIN state_lookup sr ON (roads_local.stater = sr.st_code) - LEFT JOIN place_lookup pl ON (roads_local.statel = pl.st_code AND roads_local.placel = pl.pl_code) - LEFT JOIN place_lookup pr ON (roads_local.stater = pr.st_code AND roads_local.placer = pr.pl_code) - LEFT JOIN county_lookup col ON (roads_local.statel = col.st_code AND roads_local.countyl = col.co_code) - LEFT JOIN county_lookup cor ON (roads_local.stater = cor.st_code AND roads_local.countyr = cor.co_code) - LEFT JOIN countysub_lookup csl ON (roads_local.statel = csl.st_code AND roads_local.countyl = csl.co_code AND roads_local.cousubl = csl.cs_code) - LEFT JOIN countysub_lookup csr ON (roads_local.stater = csr.st_code AND roads_local.countyr = csr.co_code AND roads_local.cousubr = csr.cs_code) - LEFT JOIN zip_lookup_base zipl ON (roads_local.zipl = zipl.zip) - LEFT JOIN zip_lookup_base zipr ON (roads_local.zipr = zipr.zip) - WHERE includes_address(parsed.address, roads_local.fraddl, roads_local.toaddl, - roads_local.fraddr, roads_local.toaddr) - ORDER BY subquery.rating; - RETURN result; - ELSE - OPEN result FOR - SELECT - roads_local.fedirp as fedirp, - roads_local.fename as fename, - roads_local.fetype as fetype, - roads_local.fedirs as fedirs, - CASE WHEN (parsed.address % 2) = roads_local.fraddl - OR (parsed.address % 2) = roads_local.toaddl - THEN coalesce(pl.name,zipl.city,csl.name,col.name) ELSE coalesce(pr.name,zipr.city,csr.name,cor.name) END as place, - CASE WHEN (parsed.address % 2) = roads_local.fraddl - OR (parsed.address % 2) = roads_local.toaddl - THEN sl.abbrev ELSE sr.abbrev END as state, - CASE WHEN (parsed.address % 2) = roads_local.fraddl - OR (parsed.address % 2) = roads_local.toaddl - THEN zipl ELSE zipr END as zip, - interpolate_from_address(parsed.address, roads_local.fraddl, - roads_local.toaddl, roads_local.fraddr, roads_local.toaddr, - roads_local.geom) as address_geom, - subquery.rating as rating - FROM ( - SELECT *, rate_attributes(parsed.preDirAbbrev, tiger_geocode_roads.fedirp, - parsed.streetName, tiger_geocode_roads.fename, parsed.streetTypeAbbrev, - tiger_geocode_roads.fetype, parsed.postDirAbbrev, - tiger_geocode_roads.fedirs, parsed.location, - tiger_geocode_roads.cousub) as rating - FROM tiger_geocode_roads - WHERE soundex(parsed.location) = soundex(tiger_geocode_roads.cousub) - AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) - ) AS subquery - JOIN roads_local ON (subquery.tlid = roads_local.tlid) - JOIN state_lookup sl ON (roads_local.statel = sl.st_code) - JOIN state_lookup sr ON (roads_local.stater = sr.st_code) - LEFT JOIN place_lookup pl ON (roads_local.statel = pl.st_code AND roads_local.placel = pl.pl_code) - LEFT JOIN place_lookup pr ON (roads_local.stater = pr.st_code AND roads_local.placer = pr.pl_code) - LEFT JOIN county_lookup col ON (roads_local.statel = col.st_code AND roads_local.countyl = col.co_code) - LEFT JOIN county_lookup cor ON (roads_local.stater = cor.st_code AND roads_local.countyr = cor.co_code) - LEFT JOIN countysub_lookup csl ON (roads_local.statel = csl.st_code AND roads_local.countyl = csl.co_code AND roads_local.cousubl = csl.cs_code) - LEFT JOIN countysub_lookup csr ON (roads_local.stater = csr.st_code AND roads_local.countyr = csr.co_code AND roads_local.cousubr = csr.cs_code) - LEFT JOIN zip_lookup_base zipl ON (roads_local.zipl = zipl.zip) - LEFT JOIN zip_lookup_base zipr ON (roads_local.zipr = zipr.zip) - WHERE includes_address(parsed.address, roads_local.fraddl, roads_local.toaddl, - roads_local.fraddr, roads_local.toaddr) - ORDER BY subquery.rating; - RETURN result; - END IF; -END; -$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/geocode/geocode_address_place_exact.sql postgis-2.0.1/extras/tiger_geocoder/geocode/geocode_address_place_exact.sql --- postgis-1.5.3/extras/tiger_geocoder/geocode/geocode_address_place_exact.sql 2009-03-12 23:20:26.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/geocode/geocode_address_place_exact.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,156 +0,0 @@ -CREATE OR REPLACE FUNCTION geocode_address_place_exact( - result REFCURSOR, - parsed NORM_ADDY -) RETURNS REFCURSOR -AS $_$ -DECLARE - result REFCURSOR; - tempString VARCHAR; - tempInt INTEGER; -BEGIN - -- Check to see if the road name can be matched. - IF parsed.stateAbbrev IS NOT NULL THEN - SELECT INTO tempInt count(*) FROM tiger_geocode_roads - WHERE parsed.location = tiger_geocode_roads.place - AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) - AND parsed.stateAbbrev = tiger_geocode_roads.state; - ELSE - SELECT INTO tempInt count(*) FROM tiger_geocode_roads - WHERE parsed.location = tiger_geocode_roads.place - AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename); - END IF; - - IF tempInt = 0 THEN - RETURN NULL; - END IF; - - -- The road name matches, now we check to see if the addresses match - IF parsed.stateAbbrev IS NOT NULL THEN - SELECT INTO tempInt count(*) - FROM ( - SELECT *, rate_attributes(parsed.preDirAbbrev, tiger_geocode_roads.fedirp, - parsed.streetName, tiger_geocode_roads.fename, parsed.streetTypeAbbrev, - tiger_geocode_roads.fetype, parsed.postDirAbbrev, - tiger_geocode_roads.fedirs) as rating - FROM tiger_geocode_roads - WHERE parsed.location = tiger_geocode_roads.place - AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) - AND parsed.stateAbbrev = tiger_geocode_roads.state - ) AS subquery, roads_local - WHERE includes_address(parsed.address, roads_local.fraddl, roads_local.toaddl, - roads_local.fraddr, roads_local.toaddr) - AND subquery.tlid = roads_local.tlid; - ELSE - SELECT INTO tempInt count(*) - FROM ( - SELECT *, rate_attributes(parsed.preDirAbbrev, tiger_geocode_roads.fedirp, - parsed.streetName, tiger_geocode_roads.fename, parsed.streetTypeAbbrev, - tiger_geocode_roads.fetype, parsed.postDirAbbrev, - tiger_geocode_roads.fedirs) as rating - FROM tiger_geocode_roads - WHERE parsed.location = tiger_geocode_roads.place - AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) - ) AS subquery, roads_local - WHERE includes_address(parsed.address, roads_local.fraddl, roads_local.toaddl, - roads_local.fraddr, roads_local.toaddr) - AND subquery.tlid = roads_local.tlid; - END IF; - - IF tempInt = 0 THEN - return NULL; - END IF; - - IF parsed.stateAbbrev IS NOT NULL THEN - OPEN result FOR - SELECT - roads_local.fedirp as fedirp, - roads_local.fename as fename, - roads_local.fetype as fetype, - roads_local.fedirs as fedirs, - CASE WHEN (parsed.address % 2) = roads_local.fraddl - OR (parsed.address % 2) = roads_local.toaddl - THEN coalesce(pl.name,zipl.city,csl.name,col.name) ELSE coalesce(pr.name,zipr.city,csr.name,cor.name) END as place, - CASE WHEN (parsed.address % 2) = roads_local.fraddl - OR (parsed.address % 2) = roads_local.toaddl - THEN sl.abbrev ELSE sr.abbrev END as state, - CASE WHEN (parsed.address % 2) = roads_local.fraddl - OR (parsed.address % 2) = roads_local.toaddl - THEN zipl ELSE zipr END as zip, - interpolate_from_address(parsed.address, roads_local.fraddl, - roads_local.toaddl, roads_local.fraddr, roads_local.toaddr, - roads_local.geom) as address_geom, - subquery.rating as rating - FROM ( - SELECT *, rate_attributes(parsed.preDirAbbrev, tiger_geocode_roads.fedirp, - parsed.streetName, tiger_geocode_roads.fename, parsed.streetTypeAbbrev, - tiger_geocode_roads.fetype, parsed.postDirAbbrev, - tiger_geocode_roads.fedirs, parsed.location, - tiger_geocode_roads.place) as rating - FROM tiger_geocode_roads - WHERE parsed.location = tiger_geocode_roads.place - AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) - AND parsed.stateAbbrev = tiger_geocode_roads.state - ) AS subquery - JOIN roads_local ON (subquery.tlid = roads_local.tlid) - JOIN state_lookup sl ON (roads_local.statel = sl.st_code) - JOIN state_lookup sr ON (roads_local.stater = sr.st_code) - LEFT JOIN place_lookup pl ON (roads_local.statel = pl.st_code AND roads_local.placel = pl.pl_code) - LEFT JOIN place_lookup pr ON (roads_local.stater = pr.st_code AND roads_local.placer = pr.pl_code) - LEFT JOIN county_lookup col ON (roads_local.statel = col.st_code AND roads_local.countyl = col.co_code) - LEFT JOIN county_lookup cor ON (roads_local.stater = cor.st_code AND roads_local.countyr = cor.co_code) - LEFT JOIN countysub_lookup csl ON (roads_local.statel = csl.st_code AND roads_local.countyl = csl.co_code AND roads_local.cousubl = csl.cs_code) - LEFT JOIN countysub_lookup csr ON (roads_local.stater = csr.st_code AND roads_local.countyr = csr.co_code AND roads_local.cousubr = csr.cs_code) - LEFT JOIN zip_lookup_base zipl ON (roads_local.zipl = zipl.zip) - LEFT JOIN zip_lookup_base zipr ON (roads_local.zipr = zipr.zip) - WHERE includes_address(parsed.address, roads_local.fraddl, roads_local.toaddl, - roads_local.fraddr, roads_local.toaddr) - ORDER BY subquery.rating; - RETURN result; - ELSE - OPEN result FOR - SELECT - roads_local.fedirp as fedirp, - roads_local.fename as fename, - roads_local.fetype as fetype, - roads_local.fedirs as fedirs, - CASE WHEN (parsed.address % 2) = roads_local.fraddl - OR (parsed.address % 2) = roads_local.toaddl - THEN coalesce(pl.name,zipl.city,csl.name,col.name) ELSE coalesce(pr.name,zipr.city,csr.name,cor.name) END as place, - CASE WHEN (parsed.address % 2) = roads_local.fraddl - OR (parsed.address % 2) = roads_local.toaddl - THEN sl.abbrev ELSE sr.abbrev END as state, - CASE WHEN (parsed.address % 2) = roads_local.fraddl - OR (parsed.address % 2) = roads_local.toaddl - THEN zipl ELSE zipr END as zip, - interpolate_from_address(parsed.address, roads_local.fraddl, - roads_local.toaddl, roads_local.fraddr, roads_local.toaddr, - roads_local.geom) as address_geom, - subquery.rating as rating - FROM ( - SELECT *, rate_attributes(parsed.preDirAbbrev, tiger_geocode_roads.fedirp, - parsed.streetName, tiger_geocode_roads.fename, parsed.streetTypeAbbrev, - tiger_geocode_roads.fetype, parsed.postDirAbbrev, - tiger_geocode_roads.fedirs, parsed.location, - tiger_geocode_roads.place) as rating - FROM tiger_geocode_roads - WHERE parsed.location = tiger_geocode_roads.place - AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) - ) AS subquery - JOIN roads_local ON (subquery.tlid = roads_local.tlid) - JOIN state_lookup sl ON (roads_local.statel = sl.st_code) - JOIN state_lookup sr ON (roads_local.stater = sr.st_code) - LEFT JOIN place_lookup pl ON (roads_local.statel = pl.st_code AND roads_local.placel = pl.pl_code) - LEFT JOIN place_lookup pr ON (roads_local.stater = pr.st_code AND roads_local.placer = pr.pl_code) - LEFT JOIN county_lookup col ON (roads_local.statel = col.st_code AND roads_local.countyl = col.co_code) - LEFT JOIN county_lookup cor ON (roads_local.stater = cor.st_code AND roads_local.countyr = cor.co_code) - LEFT JOIN countysub_lookup csl ON (roads_local.statel = csl.st_code AND roads_local.countyl = csl.co_code AND roads_local.cousubl = csl.cs_code) - LEFT JOIN countysub_lookup csr ON (roads_local.stater = csr.st_code AND roads_local.countyr = csr.co_code AND roads_local.cousubr = csr.cs_code) - LEFT JOIN zip_lookup_base zipl ON (roads_local.zipl = zipl.zip) - LEFT JOIN zip_lookup_base zipr ON (roads_local.zipr = zipr.zip) - WHERE includes_address(parsed.address, roads_local.fraddl, roads_local.toaddl, - roads_local.fraddr, roads_local.toaddr) - ORDER BY subquery.rating; - RETURN result; - END IF; -END; -$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/geocode/geocode_address_place_fuzzy.sql postgis-2.0.1/extras/tiger_geocoder/geocode/geocode_address_place_fuzzy.sql --- postgis-1.5.3/extras/tiger_geocoder/geocode/geocode_address_place_fuzzy.sql 2009-03-12 23:20:26.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/geocode/geocode_address_place_fuzzy.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,155 +0,0 @@ -CREATE OR REPLACE FUNCTION geocode_address_place_fuzzy( - result REFCURSOR, - parsed NORM_ADDY -) RETURNS REFCURSOR -AS $_$ -DECLARE - tempString VARCHAR; - tempInt INTEGER; -BEGIN - -- Check to see if the road name can be matched. - IF parsed.stateAbbrev IS NOT NULL THEN - SELECT INTO tempInt count(*) FROM tiger_geocode_roads - WHERE soundex(parsed.location) = soundex(tiger_geocode_roads.place) - AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) - AND parsed.stateAbbrev = tiger_geocode_roads.state; - ELSE - SELECT INTO tempInt count(*) FROM tiger_geocode_roads - WHERE soundex(parsed.location) = soundex(tiger_geocode_roads.place) - AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename); - END IF; - - IF tempInt = 0 THEN - RETURN NULL; - END IF; - - -- The road name matches, now we check to see if the addresses match - IF parsed.stateAbbrev IS NOT NULL THEN - SELECT INTO tempInt count(*) - FROM ( - SELECT *, rate_attributes(parsed.preDirAbbrev, tiger_geocode_roads.fedirp, - parsed.streetName, tiger_geocode_roads.fename, parsed.streetTypeAbbrev, - tiger_geocode_roads.fetype, parsed.postDirAbbrev, - tiger_geocode_roads.fedirs) as rating - FROM tiger_geocode_roads - WHERE soundex(parsed.location) = soundex(tiger_geocode_roads.place) - AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) - AND parsed.stateAbbrev = tiger_geocode_roads.state - ) AS subquery, roads_local - WHERE includes_address(parsed.address, roads_local.fraddl, roads_local.toaddl, - roads_local.fraddr, roads_local.toaddr) - AND subquery.tlid = roads_local.tlid; - ELSE - SELECT INTO tempInt count(*) - FROM ( - SELECT *, rate_attributes(parsed.preDirAbbrev, tiger_geocode_roads.fedirp, - parsed.streetName, tiger_geocode_roads.fename, parsed.streetTypeAbbrev, - tiger_geocode_roads.fetype, parsed.postDirAbbrev, - tiger_geocode_roads.fedirs) as rating - FROM tiger_geocode_roads - WHERE soundex(parsed.location) = soundex(tiger_geocode_roads.place) - AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) - ) AS subquery, roads_local - WHERE includes_address(parsed.address, roads_local.fraddl, roads_local.toaddl, - roads_local.fraddr, roads_local.toaddr) - AND subquery.tlid = roads_local.tlid; - END IF; - - IF tempInt = 0 THEN - RETURN NULL; - END IF; - - IF parsed.stateAbbrev IS NOT NULL THEN - OPEN result FOR - SELECT - roads_local.fedirp as fedirp, - roads_local.fename as fename, - roads_local.fetype as fetype, - roads_local.fedirs as fedirs, - CASE WHEN (parsed.address % 2) = roads_local.fraddl - OR (parsed.address % 2) = roads_local.toaddl - THEN coalesce(pl.name,zipl.city,csl.name,col.name) ELSE coalesce(pr.name,zipr.city,csr.name,cor.name) END as place, - CASE WHEN (parsed.address % 2) = roads_local.fraddl - OR (parsed.address % 2) = roads_local.toaddl - THEN sl.abbrev ELSE sr.abbrev END as state, - CASE WHEN (parsed.address % 2) = roads_local.fraddl - OR (parsed.address % 2) = roads_local.toaddl - THEN zipl ELSE zipr END as zip, - interpolate_from_address(parsed.address, roads_local.fraddl, - roads_local.toaddl, roads_local.fraddr, roads_local.toaddr, - roads_local.geom) as address_geom, - subquery.rating as rating - FROM ( - SELECT *, rate_attributes(parsed.preDirAbbrev, tiger_geocode_roads.fedirp, - parsed.streetName, tiger_geocode_roads.fename, parsed.streetTypeAbbrev, - tiger_geocode_roads.fetype, parsed.postDirAbbrev, - tiger_geocode_roads.fedirs, parsed.location, - tiger_geocode_roads.place) as rating - FROM tiger_geocode_roads - WHERE soundex(parsed.location) = soundex(tiger_geocode_roads.place) - AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) - AND parsed.stateAbbrev = tiger_geocode_roads.state - ) AS subquery - JOIN roads_local ON (subquery.tlid = roads_local.tlid) - JOIN state_lookup sl ON (roads_local.statel = sl.st_code) - JOIN state_lookup sr ON (roads_local.stater = sr.st_code) - LEFT JOIN place_lookup pl ON (roads_local.statel = pl.st_code AND roads_local.placel = pl.pl_code) - LEFT JOIN place_lookup pr ON (roads_local.stater = pr.st_code AND roads_local.placer = pr.pl_code) - LEFT JOIN county_lookup col ON (roads_local.statel = col.st_code AND roads_local.countyl = col.co_code) - LEFT JOIN county_lookup cor ON (roads_local.stater = cor.st_code AND roads_local.countyr = cor.co_code) - LEFT JOIN countysub_lookup csl ON (roads_local.statel = csl.st_code AND roads_local.countyl = csl.co_code AND roads_local.cousubl = csl.cs_code) - LEFT JOIN countysub_lookup csr ON (roads_local.stater = csr.st_code AND roads_local.countyr = csr.co_code AND roads_local.cousubr = csr.cs_code) - LEFT JOIN zip_lookup_base zipl ON (roads_local.zipl = zipl.zip) - LEFT JOIN zip_lookup_base zipr ON (roads_local.zipr = zipr.zip) - WHERE includes_address(parsed.address, roads_local.fraddl, roads_local.toaddl, - roads_local.fraddr, roads_local.toaddr) - ORDER BY subquery.rating; - RETURN result; - ELSE - OPEN result FOR - SELECT - roads_local.fedirp as fedirp, - roads_local.fename as fename, - roads_local.fetype as fetype, - roads_local.fedirs as fedirs, - CASE WHEN (parsed.address % 2) = roads_local.fraddl - OR (parsed.address % 2) = roads_local.toaddl - THEN coalesce(pl.name,zipl.city,csl.name,col.name) ELSE coalesce(pr.name,zipr.city,csr.name,cor.name) END as place, - CASE WHEN (parsed.address % 2) = roads_local.fraddl - OR (parsed.address % 2) = roads_local.toaddl - THEN sl.abbrev ELSE sr.abbrev END as state, - CASE WHEN (parsed.address % 2) = roads_local.fraddl - OR (parsed.address % 2) = roads_local.toaddl - THEN zipl ELSE zipr END as zip, - interpolate_from_address(parsed.address, roads_local.fraddl, - roads_local.toaddl, roads_local.fraddr, roads_local.toaddr, - roads_local.geom) as address_geom, - subquery.rating as rating - FROM ( - SELECT *, rate_attributes(parsed.preDirAbbrev, tiger_geocode_roads.fedirp, - parsed.streetName, tiger_geocode_roads.fename, parsed.streetTypeAbbrev, - tiger_geocode_roads.fetype, parsed.postDirAbbrev, - tiger_geocode_roads.fedirs, parsed.location, - tiger_geocode_roads.place) as rating - FROM tiger_geocode_roads - WHERE soundex(parsed.location) = soundex(tiger_geocode_roads.place) - AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) - ) AS subquery - JOIN roads_local ON (subquery.tlid = roads_local.tlid) - JOIN state_lookup sl ON (roads_local.statel = sl.st_code) - JOIN state_lookup sr ON (roads_local.stater = sr.st_code) - LEFT JOIN place_lookup pl ON (roads_local.statel = pl.st_code AND roads_local.placel = pl.pl_code) - LEFT JOIN place_lookup pr ON (roads_local.stater = pr.st_code AND roads_local.placer = pr.pl_code) - LEFT JOIN county_lookup col ON (roads_local.statel = col.st_code AND roads_local.countyl = col.co_code) - LEFT JOIN county_lookup cor ON (roads_local.stater = cor.st_code AND roads_local.countyr = cor.co_code) - LEFT JOIN countysub_lookup csl ON (roads_local.statel = csl.st_code AND roads_local.countyl = csl.co_code AND roads_local.cousubl = csl.cs_code) - LEFT JOIN countysub_lookup csr ON (roads_local.stater = csr.st_code AND roads_local.countyr = csr.co_code AND roads_local.cousubr = csr.cs_code) - LEFT JOIN zip_lookup_base zipl ON (roads_local.zipl = zipl.zip) - LEFT JOIN zip_lookup_base zipr ON (roads_local.zipr = zipr.zip) - WHERE includes_address(parsed.address, roads_local.fraddl, roads_local.toaddl, - roads_local.fraddr, roads_local.toaddr) - ORDER BY subquery.rating; - RETURN result; - END IF; -END; -$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/geocode/geocode_address_state.sql postgis-2.0.1/extras/tiger_geocoder/geocode/geocode_address_state.sql --- postgis-1.5.3/extras/tiger_geocoder/geocode/geocode_address_state.sql 2009-03-12 23:20:26.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/geocode/geocode_address_state.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,81 +0,0 @@ -CREATE OR REPLACE FUNCTION geocode_address_state( - result REFCURSOR, - parsed NORM_ADDY -) RETURNS REFCURSOR -AS $_$ -DECLARE - tempInt INTEGER; -BEGIN - -- Check to see if the road name can be matched. - SELECT INTO tempInt count(*) FROM tiger_geocode_roads - WHERE soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) - AND parsed.stateAbbrev = tiger_geocode_roads.state; - - IF tempInt = 0 THEN - RETURN NULL; - END IF; - - -- The road name matches, now we check to see if the addresses match - SELECT INTO tempInt count(*) - FROM ( - SELECT *, rate_attributes(parsed.preDirAbbrev, tiger_geocode_roads.fedirp, - parsed.streetName, tiger_geocode_roads.fename, parsed.streetTypeAbbrev, - tiger_geocode_roads.fetype, parsed.postDirAbbrev, - tiger_geocode_roads.fedirs) as rating - FROM tiger_geocode_roads - WHERE soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) - AND parsed.stateAbbrev = tiger_geocode_roads.state - ) AS subquery, roads_local - WHERE includes_address(parsed.address, roads_local.fraddl, roads_local.toaddl, - roads_local.fraddr, roads_local.toaddr) - AND subquery.tlid = roads_local.tlid; - - IF tempInt = 0 THEN - return NULL; - END IF; - - OPEN result FOR - SELECT - roads_local.fedirp as fedirp, - roads_local.fename as fename, - roads_local.fetype as fetype, - roads_local.fedirs as fedirs, - CASE WHEN (parsed.address % 2) = roads_local.fraddl - OR (parsed.address % 2) = roads_local.toaddl - THEN coalesce(pl.name,zipl.city,csl.name,col.name) ELSE coalesce(pr.name,zipr.city,csr.name,cor.name) END as place, - CASE WHEN (parsed.address % 2) = roads_local.fraddl - OR (parsed.address % 2) = roads_local.toaddl - THEN sl.abbrev ELSE sr.abbrev END as state, - CASE WHEN (parsed.address % 2) = roads_local.fraddl - OR (parsed.address % 2) = roads_local.toaddl - THEN zipl ELSE zipr END as zip, - interpolate_from_address(parsed.address, roads_local.fraddl, - roads_local.toaddl, roads_local.fraddr, roads_local.toaddr, - roads_local.geom) as address_geom, - subquery.rating as rating - FROM ( - SELECT *, rate_attributes(parsed.preDirAbbrev, tiger_geocode_roads.fedirp, - parsed.streetName, tiger_geocode_roads.fename, parsed.streetTypeAbbrev, - tiger_geocode_roads.fetype, parsed.postDirAbbrev, - tiger_geocode_roads.fedirs) as rating - FROM tiger_geocode_roads - WHERE soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) - AND parsed.stateAbbrev = tiger_geocode_roads.state - ) AS subquery - JOIN roads_local ON (subquery.tlid = roads_local.tlid) - JOIN state_lookup sl ON (roads_local.statel = sl.st_code) - JOIN state_lookup sr ON (roads_local.stater = sr.st_code) - LEFT JOIN place_lookup pl ON (roads_local.statel = pl.st_code AND roads_local.placel = pl.pl_code) - LEFT JOIN place_lookup pr ON (roads_local.stater = pr.st_code AND roads_local.placer = pr.pl_code) - LEFT JOIN county_lookup col ON (roads_local.statel = col.st_code AND roads_local.countyl = col.co_code) - LEFT JOIN county_lookup cor ON (roads_local.stater = cor.st_code AND roads_local.countyr = cor.co_code) - LEFT JOIN countysub_lookup csl ON (roads_local.statel = csl.st_code AND roads_local.countyl = csl.co_code AND roads_local.cousubl = csl.cs_code) - LEFT JOIN countysub_lookup csr ON (roads_local.stater = csr.st_code AND roads_local.countyr = csr.co_code AND roads_local.cousubr = csr.cs_code) - LEFT JOIN zip_lookup_base zipl ON (roads_local.zipl = zipl.zip) - LEFT JOIN zip_lookup_base zipr ON (roads_local.zipr = zipr.zip) - WHERE includes_address(parsed.address, roads_local.fraddl, roads_local.toaddl, - roads_local.fraddr, roads_local.toaddr) - ORDER BY subquery.rating; - RETURN result; -END; -$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/geocode/geocode_address_zip.sql postgis-2.0.1/extras/tiger_geocoder/geocode/geocode_address_zip.sql --- postgis-1.5.3/extras/tiger_geocoder/geocode/geocode_address_zip.sql 2009-03-12 23:20:26.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/geocode/geocode_address_zip.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,83 +0,0 @@ -CREATE OR REPLACE FUNCTION geocode_address_zip( - result REFCURSOR, - parsed NORM_ADDY -) RETURNS REFCURSOR -AS $_$ -DECLARE - tempString VARCHAR; - tempInt INTEGER; -BEGIN - -- Check to see if the road name can be matched. - SELECT INTO tempInt count(*) FROM tiger_geocode_roads - WHERE parsed.zip = tiger_geocode_roads.zip - AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename); - - IF tempInt = 0 THEN - RETURN NULL; - END IF; - - -- The road name matches, now we check to see if the addresses match - SELECT INTO tempInt count(*) - FROM ( - SELECT *, rate_attributes(parsed.preDirAbbrev, tiger_geocode_roads.fedirp, - parsed.streetName, tiger_geocode_roads.fename, parsed.streetTypeAbbrev, - tiger_geocode_roads.fetype, parsed.postDirAbbrev, - tiger_geocode_roads.fedirs) as rating - FROM tiger_geocode_roads - WHERE parsed.zip = tiger_geocode_roads.zip - AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) - ) AS subquery, roads_local - WHERE includes_address(parsed.address, roads_local.fraddl, roads_local.toaddl, - roads_local.fraddr, roads_local.toaddr) - AND subquery.tlid = roads_local.tlid; - - IF tempInt = 0 THEN - RETURN NULL; - END IF; - - OPEN result FOR - SELECT - roads_local.fedirp as fedirp, - roads_local.fename as fename, - roads_local.fetype as fetype, - roads_local.fedirs as fedirs, - CASE WHEN (parsed.address % 2) = roads_local.fraddl - OR (parsed.address % 2) = roads_local.toaddl - THEN coalesce(pl.name,zipl.city,csl.name,col.name) ELSE coalesce(pr.name,zipr.city,csr.name,cor.name) END as place, - CASE WHEN (parsed.address % 2) = roads_local.fraddl - OR (parsed.address % 2) = roads_local.toaddl - THEN sl.abbrev ELSE sr.abbrev END as state, - CASE WHEN (parsed.address % 2) = roads_local.fraddl - OR (parsed.address % 2) = roads_local.toaddl - THEN zipl ELSE zipr END as zip, - interpolate_from_address(parsed.address, roads_local.fraddl, - roads_local.toaddl, roads_local.fraddr, roads_local.toaddr, - roads_local.geom) as address_geom, - subquery.rating as rating - FROM ( - SELECT *, rate_attributes(parsed.preDirAbbrev, tiger_geocode_roads.fedirp, - parsed.streetName, tiger_geocode_roads.fename, parsed.streetTypeAbbrev, - tiger_geocode_roads.fetype, parsed.postDirAbbrev, - tiger_geocode_roads.fedirs) as rating - FROM tiger_geocode_roads - WHERE parsed.zip = tiger_geocode_roads.zip - AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) - ) AS subquery - JOIN roads_local ON (subquery.tlid = roads_local.tlid) - JOIN state_lookup sl ON (roads_local.statel = sl.st_code) - JOIN state_lookup sr ON (roads_local.stater = sr.st_code) - LEFT JOIN place_lookup pl ON (roads_local.statel = pl.st_code AND roads_local.placel = pl.pl_code) - LEFT JOIN place_lookup pr ON (roads_local.stater = pr.st_code AND roads_local.placer = pr.pl_code) - LEFT JOIN county_lookup col ON (roads_local.statel = col.st_code AND roads_local.countyl = col.co_code) - LEFT JOIN county_lookup cor ON (roads_local.stater = cor.st_code AND roads_local.countyr = cor.co_code) - LEFT JOIN countysub_lookup csl ON (roads_local.statel = csl.st_code AND roads_local.countyl = csl.co_code AND roads_local.cousubl = csl.cs_code) - LEFT JOIN countysub_lookup csr ON (roads_local.stater = csr.st_code AND roads_local.countyr = csr.co_code AND roads_local.cousubr = csr.cs_code) - LEFT JOIN zip_lookup_base zipl ON (roads_local.zipl = zipl.zip) - LEFT JOIN zip_lookup_base zipr ON (roads_local.zipr = zipr.zip) - WHERE includes_address(parsed.address, roads_local.fraddl, roads_local.toaddl, - roads_local.fraddr, roads_local.toaddr) - ORDER BY subquery.rating; - - RETURN result; -END; -$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/geocode/geocode_get_point.sql postgis-2.0.1/extras/tiger_geocoder/geocode/geocode_get_point.sql --- postgis-1.5.3/extras/tiger_geocoder/geocode/geocode_get_point.sql 2007-07-03 21:30:34.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/geocode/geocode_get_point.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -CREATE OR REPLACE FUNCTION geocode_get_point(VARCHAR) RETURNS GEOMETRY -AS $_$ -DECLARE - ans RECORD; -BEGIN - ans := geocode(NULL, $1); - - RETURN centroid(ans.geom); -END; -$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/geocode/geocode_location.sql postgis-2.0.1/extras/tiger_geocoder/geocode/geocode_location.sql --- postgis-1.5.3/extras/tiger_geocoder/geocode/geocode_location.sql 2009-03-12 23:20:26.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/geocode/geocode_location.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,67 +0,0 @@ -CREATE OR REPLACE FUNCTION geocode_location( - parsed NORM_ADDY -) RETURNS REFCURSOR -AS $_$ -DECLARE - result REFCURSOR; - tempString VARCHAR; - tempInt INTEGER; -BEGIN - -- Try to match the city/state to a zipcode first - SELECT INTO tempInt count(*) - FROM zip_lookup_base zip - JOIN state_lookup sl ON (zip.state = sl.name) - JOIN zt99_d00 zl ON (zip.zip = zl.zcta::integer) - WHERE soundex(zip.city) = soundex(parsed.location) and sl.abbrev = parsed.stateAbbrev; - - -- If that worked, just use the zipcode lookup - IF tempInt > 0 THEN - OPEN result FOR - SELECT - NULL::varchar(2) as fedirp, - NULL::varchar(30) as fename, - NULL::varchar(4) as fetype, - NULL::varchar(2) as fedirs, - coalesce(zip.city) as place, - sl.abbrev as state, - parsed.zip as zip, - centroid(wkb_geometry) as address_geom, - 100::integer + levenshtein_ignore_case(coalesce(zip.city), parsed.location) as rating - FROM - zip_lookup_base zip - JOIN state_lookup sl on (zip.state = sl.name) - JOIN zt99_d00 zl ON (zip.zip = zl.zcta::integer) - WHERE - soundex(zip.city) = soundex(parsed.location) and sl.abbrev = parsed.stateAbbrev; - - RETURN result; - END IF; - - -- Try to match the city/state to a place next - SELECT INTO tempInt count(*) - FROM pl99_d00 pl - JOIN state_lookup sl ON (pl.state::integer = sl.st_code) - WHERE soundex(pl.name) = soundex(parsed.location) and sl.abbrev = parsed.stateAbbrev; - - -- If that worked then use it - IF tempInt > 0 THEN - OPEN result FOR - SELECT - NULL::varchar(2) as fedirp, - NULL::varchar(30) as fename, - NULL::varchar(4) as fetype, - NULL::varchar(2) as fedirs, - pl.name as place, - sl.abbrev as state, - NULL::integer as zip, - centroid(wkb_geometry) as address_geom, - 100::integer + levenshtein_ignore_case(coalesce(zip.city), parsed.location) as rating - FROM pl99_d00 pl - JOIN state_lookup sl ON (pl.state::integer = sl.st_code) - WHERE soundex(pl.name) = soundex(parsed.location) and sl.abbrev = parsed.stateAbbrev; - - RETURN result; - END IF; - RETURN result; -END; -$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/geocode/geocode_zip.sql postgis-2.0.1/extras/tiger_geocoder/geocode/geocode_zip.sql --- postgis-1.5.3/extras/tiger_geocoder/geocode/geocode_zip.sql 2009-03-12 23:20:26.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/geocode/geocode_zip.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -CREATE OR REPLACE FUNCTION geocode_zip( - parsed NORM_ADDY -) RETURNS REFCURSOR -AS $_$ -DECLARE - result REFCURSOR; - tempString VARCHAR; - tempInt INTEGER; -BEGIN - -- Check to see if the road name can be matched. - SELECT INTO tempInt count(*) - FROM zip_lookup_base zip - JOIN state_lookup sl on (zip.state = sl.name) - JOIN zt99_d00 zl ON (zip.zip = zl.zcta::integer) - WHERE zip = parsed.zip; - - IF tempInt = 0 THEN - RETURN NULL; - END IF; - - OPEN result FOR - SELECT - NULL::varchar(2) as fedirp, - NULL::varchar(30) as fename, - NULL::varchar(4) as fetype, - NULL::varchar(2) as fedirs, - coalesce(zip.city) as place, - sl.abbrev as state, - parsed.zip as zip, - centroid(wkb_geometry) as address_geom, - 100::integer as rating - FROM - zip_lookup_base zip - JOIN state_lookup sl on (zip.state = sl.name) - JOIN zt99_d00 zl ON (zip.zip = zl.zcta::integer) - WHERE - zip.zip = parsed.zip; - - RETURN result; -END; -$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/geocode/includes_address.sql postgis-2.0.1/extras/tiger_geocoder/geocode/includes_address.sql --- postgis-1.5.3/extras/tiger_geocoder/geocode/includes_address.sql 2007-07-03 21:30:34.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/geocode/includes_address.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,93 +0,0 @@ --- This function requires the addresses to be grouped, such that the second and --- third arguments are from one side of the street, and the fourth and fifth --- from the other. -CREATE OR REPLACE FUNCTION includes_address( - given_address INTEGER, - addr1 INTEGER, - addr2 INTEGER, - addr3 INTEGER, - addr4 INTEGER -) RETURNS BOOLEAN -AS $_$ -DECLARE - lmaxaddr INTEGER := -1; - rmaxaddr INTEGER := -1; - lminaddr INTEGER := -1; - rminaddr INTEGER := -1; - maxaddr INTEGER := -1; - minaddr INTEGER := -1; - verbose BOOLEAN := false; -BEGIN - IF addr1 IS NOT NULL THEN - maxaddr := addr1; - minaddr := addr1; - lmaxaddr := addr1; - lminaddr := addr1; - END IF; - - IF addr2 IS NOT NULL THEN - IF addr2 < minaddr OR minaddr = -1 THEN - minaddr := addr2; - END IF; - IF addr2 > maxaddr OR maxaddr = -1 THEN - maxaddr := addr2; - END IF; - IF addr2 > lmaxaddr OR lmaxaddr = -1 THEN - lmaxaddr := addr2; - END IF; - IF addr2 < lminaddr OR lminaddr = -1 THEN - lminaddr := addr2; - END IF; - END IF; - - IF addr3 IS NOT NULL THEN - IF addr3 < minaddr OR minaddr = -1 THEN - minaddr := addr3; - END IF; - IF addr3 > maxaddr OR maxaddr = -1 THEN - maxaddr := addr3; - END IF; - rmaxaddr := addr3; - rminaddr := addr3; - END IF; - - IF addr4 IS NOT NULL THEN - IF addr4 < minaddr OR minaddr = -1 THEN - minaddr := addr4; - END IF; - IF addr4 > maxaddr OR maxaddr = -1 THEN - maxaddr := addr4; - END IF; - IF addr4 > rmaxaddr OR rmaxaddr = -1 THEN - rmaxaddr := addr4; - END IF; - IF addr4 < rminaddr OR rminaddr = -1 THEN - rminaddr := addr4; - END IF; - END IF; - - IF minaddr = -1 OR maxaddr = -1 THEN - -- No addresses were non-null, return FALSE (arbitrary) - RETURN FALSE; - ELSIF given_address >= minaddr AND given_address <= maxaddr THEN - -- The address is within the given range - IF given_address >= lminaddr AND given_address <= lmaxaddr THEN - -- This checks to see if the address is on this side of the - -- road, ie if the address is even, the street range must be even - IF (given_address % 2) = (lminaddr % 2) - OR (given_address % 2) = (lmaxaddr % 2) THEN - RETURN TRUE; - END IF; - END IF; - IF given_address >= rminaddr AND given_address <= rmaxaddr THEN - -- See above - IF (given_address % 2) = (rminaddr % 2) - OR (given_address % 2) = (rmaxaddr % 2) THEN - RETURN TRUE; - END IF; - END IF; - END IF; - -- The address is not within the range - RETURN FALSE; -END; -$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/geocode/interpolate_from_address.sql postgis-2.0.1/extras/tiger_geocoder/geocode/interpolate_from_address.sql --- postgis-1.5.3/extras/tiger_geocoder/geocode/interpolate_from_address.sql 2007-07-03 21:30:34.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/geocode/interpolate_from_address.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,123 +0,0 @@ --- This function converts string addresses to integers and passes them to --- the other interpolate_from_address function. -CREATE OR REPLACE FUNCTION interpolate_from_address(INTEGER, VARCHAR, VARCHAR, VARCHAR, VARCHAR, GEOMETRY) RETURNS GEOMETRY -AS $_$ -DECLARE - given_address INTEGER; - addr1 INTEGER; - addr2 INTEGER; - addr3 INTEGER; - addr4 INTEGER; - road GEOMETRY; - result GEOMETRY; -BEGIN - given_address := $1; - addr1 := to_number($2, '999999'); - addr2 := to_number($3, '999999'); - addr3 := to_number($4, '999999'); - addr4 := to_number($5, '999999'); - road := $6; - result = interpolate_from_address(given_address, addr1, addr2, addr3, addr4, road); - RETURN result; -END -$_$ LANGUAGE plpgsql; - --- interpolate_from_address(local_address, from_address_l, to_address_l, from_address_r, to_address_r, local_road) --- This function returns a point along the given geometry (must be linestring) --- corresponding to the given address. If the given address is not within --- the address range of the road, null is returned. --- This function requires that the address be grouped, such that the second and --- third arguments are from one side of the street, while the fourth and --- fifth are from the other. -CREATE OR REPLACE FUNCTION interpolate_from_address(INTEGER, INTEGER, INTEGER, INTEGER, INTEGER, GEOMETRY) RETURNS GEOMETRY -AS $_$ -DECLARE - given_address INTEGER; - lmaxaddr INTEGER := -1; - rmaxaddr INTEGER := -1; - lminaddr INTEGER := -1; - rminaddr INTEGER := -1; - lfrgreater BOOLEAN; - rfrgreater BOOLEAN; - frgreater BOOLEAN; - addrwidth INTEGER; - part DOUBLE PRECISION; - road GEOMETRY; - result GEOMETRY; -BEGIN - IF $1 IS NULL THEN - RETURN NULL; - ELSE - given_address := $1; - END IF; - - IF $6 IS NULL THEN - RETURN NULL; - ELSE - IF geometrytype($6) = 'LINESTRING' THEN - road := $6; - ELSIF geometrytype($6) = 'MULTILINESTRING' THEN - road := geometryn($6,1); - ELSE - RETURN NULL; - END IF; - END IF; - - IF $2 IS NOT NULL THEN - lfrgreater := TRUE; - lmaxaddr := $2; - lminaddr := $2; - END IF; - - IF $3 IS NOT NULL THEN - IF $3 > lmaxaddr OR lmaxaddr = -1 THEN - lmaxaddr := $3; - lfrgreater := FALSE; - END IF; - IF $3 < lminaddr OR lminaddr = -1 THEN - lminaddr := $3; - END IF; - END IF; - - IF $4 IS NOT NULL THEN - rmaxaddr := $4; - rminaddr := $4; - rfrgreater := TRUE; - END IF; - - IF $5 IS NOT NULL THEN - IF $5 > rmaxaddr OR rmaxaddr = -1 THEN - rmaxaddr := $5; - rfrgreater := FALSE; - END IF; - IF $5 < rminaddr OR rminaddr = -1 THEN - rminaddr := $5; - END IF; - END IF; - - IF given_address >= lminaddr AND given_address <= lmaxaddr THEN - IF (given_address % 2) = (lminaddr % 2) - OR (given_address % 2) = (lmaxaddr % 2) THEN - addrwidth := lmaxaddr - lminaddr; - part := (given_address - lminaddr) / trunc(addrwidth, 1); - frgreater := lfrgreater; - END IF; - END IF; - - IF given_address >= rminaddr AND given_address <= rmaxaddr THEN - IF (given_address % 2) = (rminaddr % 2) - OR (given_address % 2) = (rmaxaddr % 2) THEN - addrwidth := rmaxaddr - rminaddr; - part := (given_address - rminaddr) / trunc(addrwidth, 1); - frgreater := rfrgreater; - END IF; - END IF; - - IF frgreater THEN - part := 1 - part; - END IF; - - result = line_interpolate_point(road, part); - RETURN result; -END; -$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/geocode/rate_attributes.sql postgis-2.0.1/extras/tiger_geocoder/geocode/rate_attributes.sql --- postgis-1.5.3/extras/tiger_geocoder/geocode/rate_attributes.sql 2007-07-03 21:30:34.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/geocode/rate_attributes.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,58 +0,0 @@ --- rate_attributes(dirpA, dirpB, streetNameA, streetNameB, streetTypeA, --- streetTypeB, dirsA, dirsB, locationA, locationB) --- Rates the street based on the given attributes. The locations must be --- non-null. The other eight values are handled by the other rate_attributes --- function, so it's requirements must also be met. -CREATE OR REPLACE FUNCTION rate_attributes(VARCHAR, VARCHAR, VARCHAR, VARCHAR, - VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR) RETURNS INTEGER -AS $_$ -DECLARE - result INTEGER := 0; - locationWeight INTEGER := 14; - verbose BOOLEAN := FALSE; -BEGIN - IF $9 IS NOT NULL AND $10 IS NOT NULL THEN - result := levenshtein_ignore_case($9, $10); - ELSE - IF verbose THEN - RAISE NOTICE 'rate_attributes() - Location names cannot be null!'; - END IF; - RETURN NULL; - END IF; - result := result + rate_attributes($1, $2, $3, $4, $5, $6, $7, $8); - RETURN result; -END; -$_$ LANGUAGE plpgsql; - --- rate_attributes(dirpA, dirpB, streetNameA, streetNameB, streetTypeA, --- streetTypeB, dirsA, dirsB) --- Rates the street based on the given attributes. Only streetNames are --- required. If any others are null (either A or B) they are treated as --- empty strings. -CREATE OR REPLACE FUNCTION rate_attributes(VARCHAR, VARCHAR, VARCHAR, VARCHAR, - VARCHAR, VARCHAR, VARCHAR, VARCHAR) RETURNS INTEGER -AS $_$ -DECLARE - result INTEGER := 0; - directionWeight INTEGER := 2; - nameWeight INTEGER := 10; - typeWeight INTEGER := 5; - verbose BOOLEAN := FALSE; -BEGIN - result := result + levenshtein_ignore_case(cull_null($1), cull_null($2)) * - directionWeight; - IF $3 IS NOT NULL AND $4 IS NOT NULL THEN - result := result + levenshtein_ignore_case($3, $4) * nameWeight; - ELSE - IF verbose THEN - RAISE NOTICE 'rate_attributes() - Street names cannot be null!'; - END IF; - RETURN NULL; - END IF; - result := result + levenshtein_ignore_case(cull_null($5), cull_null($6)) * - typeWeight; - result := result + levenshtein_ignore_case(cull_null($7), cull_null($7)) * - directionWeight; - return result; -END; -$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/import/load_tiger.sh postgis-2.0.1/extras/tiger_geocoder/import/load_tiger.sh --- postgis-1.5.3/extras/tiger_geocoder/import/load_tiger.sh 2007-07-03 21:36:28.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/import/load_tiger.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -#!/bin/sh - -FIRST="" -for file in /data/tiger/www2.census.gov/geo/tiger/tiger2006se/*/*.ZIP; do - ./tigerimport.sh append mydb $file $FIRST - if [ -z "$FIRST" ]; then - FIRST="-a" - fi -done diff -Nru postgis-1.5.3/extras/tiger_geocoder/import/newdb.sh postgis-2.0.1/extras/tiger_geocoder/import/newdb.sh --- postgis-1.5.3/extras/tiger_geocoder/import/newdb.sh 2009-01-15 18:35:06.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/import/newdb.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -#!/bin/bash - -dropdb $1 -createdb $1 -createlang plpgsql $1 -psql $1 -# Last updated Fri Mar 4 08:13:28 PST 2005 -# -# tigerimport.sh imports the CompleteChain, Landmarks, AreaLandMarks, and -# Polygon layers from a TIGER/Line .ZIP file into a PostGIS database. You -# must have ogr2ogr from GDAL (http://gdal.org), as well as the GDAL -# Python extensions. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You can download a copy of the GPL from http://www.gnu.org/copyleft/gpl.html, -# or write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. - -MODE=$1 -DATABASE=$2 -ZIP=$3 -APPEND=$4 - -TIGERPOLY=tigerpoly2.py - -case $MODE in - append) PRE="-append"; POST="" ;; - update) PRE="-update"; POST="" ;; - create) PRE=""; POST="-lco OVERWRITE=YES" ;; - *) echo "Usage: $0 [append|update|create] "; - exit -1;; -esac - -FILE=$(basename $ZIP) -FILE=${FILE#TGR} -FILE=${FILE%.ZIP} -TIGER=TGR$FILE.RT1 - -SRID=4269 -#cat > nad83_srs.txt < -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. -############################################################################### -# -# $Log: tigerpoly.py,v $ -# Revision 1.3 2003/07/11 14:52:13 warmerda -# Added logic to replicate all source polygon fields onto output file. -# -# Revision 1.2 2003/07/11 14:31:17 warmerda -# Use provided input filename. -# -# Revision 1.1 2003/03/03 05:17:06 warmerda -# New -# -# - -import osr -import ogr -import sys, os - -############################################################################# -class Module: - - def __init__( self ): - self.lines = {} - self.poly_line_links = {} - -############################################################################# -def Usage(): - print 'Usage: tigerpoly.py infile [outfile].shp' - print - sys.exit(1) - -############################################################################# -# Argument processing. - -infile = None -outfile = None - -i = 1 -while i < len(sys.argv): - arg = sys.argv[i] - - if infile is None: - infile = arg - - elif outfile is None: - outfile = arg - - else: - Usage() - - i = i + 1 - -if infile is None: - Usage() - -############################################################################# -# Open the datasource to operate on. - -ds = ogr.Open( infile, update = 0 ) - -poly_layer = ds.GetLayerByName( 'Polygon' ) -lm_layer = ds.GetLayerByName( 'Landmarks' ) - -############################################################################# -# Create output file for the composed polygons. - -shp_driver = ogr.GetDriverByName( 'ESRI Shapefile' ) - -shp_ds_cache = [] -def create_layer (outfile, layer, type): - if os.access( outfile, os.W_OK ): - shp_driver.DeleteDataSource( outfile ) - - defn = layer.GetLayerDefn() - shp_ds = shp_driver.CreateDataSource( outfile ) - shp_layer = shp_ds.CreateLayer( 'out', geom_type = type ) - field_count = defn.GetFieldCount() - - for fld_index in range(field_count): - src_fd = defn.GetFieldDefn( fld_index ) - - fd = ogr.FieldDefn( src_fd.GetName(), src_fd.GetType() ) - fd.SetWidth( src_fd.GetWidth() ) - fd.SetPrecision( src_fd.GetPrecision() ) - shp_layer.CreateField( fd ) - - shp_ds_cache.append(shp_ds) - return shp_layer - -poly_out = create_layer("Polygon.shp", poly_layer, ogr.wkbPolygon) -area_out = create_layer("AreaLandmarks.shp", lm_layer, ogr.wkbPolygon) - -############################################################################# -# Read all features in the line layer, holding just the geometry in a hash -# for fast lookup by TLID. - -line_layer = ds.GetLayerByName( 'CompleteChain' ) -line_count = 0 - -modules_hash = {} - -feat = line_layer.GetNextFeature() -geom_id_field = feat.GetFieldIndex( 'TLID' ) -tile_ref_field = feat.GetFieldIndex( 'MODULE' ) -while feat is not None: - geom_id = feat.GetField( geom_id_field ) - tile_ref = feat.GetField( tile_ref_field ) - - try: - module = modules_hash[tile_ref] - except: - module = Module() - modules_hash[tile_ref] = module - - module.lines[geom_id] = feat.GetGeometryRef().Clone() - line_count = line_count + 1 - - feat.Destroy() - - feat = line_layer.GetNextFeature() - -print 'Got %d lines in %d modules.' % (line_count,len(modules_hash)) - -############################################################################# -# Read all polygon/chain links and build a hash keyed by POLY_ID listing -# the chains (by TLID) attached to it. - -link_layer = ds.GetLayerByName( 'PolyChainLink' ) - -feat = link_layer.GetNextFeature() -geom_id_field = feat.GetFieldIndex( 'TLID' ) -tile_ref_field = feat.GetFieldIndex( 'MODULE' ) -lpoly_field = feat.GetFieldIndex( 'POLYIDL' ) -lcenid_field = feat.GetFieldIndex( 'CENIDL' ) -rpoly_field = feat.GetFieldIndex( 'POLYIDR' ) -rcenid_field = feat.GetFieldIndex( 'CENIDR' ) - -link_count = 0 - -while feat is not None: - module = modules_hash[feat.GetField( tile_ref_field )] - - tlid = feat.GetField( geom_id_field ) - - lpoly_id = feat.GetField( lpoly_field ) - lcenid_id = feat.GetField( lcenid_field ) - rpoly_id = feat.GetField( rpoly_field ) - rcenid_id = feat.GetField( rcenid_field ) - - if lcenid_id == rcenid_id and lpoly_id == rpoly_id: - feat.Destroy() - feat = link_layer.GetNextFeature() - continue - - for cenid, polyid in ((rcenid_id, rpoly_id), (lcenid_id, lpoly_id)): - if module.poly_line_links.has_key((cenid, polyid)): - module.poly_line_links[cenid, polyid].append( tlid ) - else: - module.poly_line_links[cenid, polyid] = [ tlid ] - - link_count = link_count + 1 - - feat.Destroy() - - feat = link_layer.GetNextFeature() - -print 'Processed %d links.' % link_count - -############################################################################# -# Process all polygon features. - -feat = poly_layer.GetNextFeature() -tile_ref_field = feat.GetFieldIndex( 'MODULE' ) -polyid_field = feat.GetFieldIndex( 'POLYID' ) -cenid_field = feat.GetFieldIndex( 'CENID' ) - -poly_count = 0 -degenerate_count = 0 - -while feat is not None: - module = modules_hash[feat.GetField( tile_ref_field )] - polyid = feat.GetField( polyid_field ) - cenid = feat.GetField( cenid_field ) - - link_coll = ogr.Geometry( type = ogr.wkbGeometryCollection ) - tlid_list = module.poly_line_links[cenid, polyid] - for tlid in tlid_list: - geom = module.lines[tlid] - link_coll.AddGeometry( geom ) - - try: - poly = ogr.BuildPolygonFromEdges( link_coll, 0, 0 ) - - if poly.GetGeometryRef(0).GetPointCount() < 4: - degenerate_count = degenerate_count + 1 - poly.Destroy() - feat.Destroy() - feat = poly_layer.GetNextFeature() - continue - - #print poly.ExportToWkt() - #feat.SetGeometryDirectly( poly ) - - feat2 = ogr.Feature(feature_def=poly_out.GetLayerDefn()) - - for fld_index in range(poly_out.GetLayerDefn().GetFieldCount()): - feat2.SetField( fld_index, feat.GetField( fld_index ) ) - - feat2.SetGeometryDirectly( poly ) - poly_out.CreateFeature( feat2 ) - feat2.Destroy() - poly_count += 1 - - except: - raise - print 'BuildPolygonFromEdges failed.' - - feat.Destroy() - feat = poly_layer.GetNextFeature() - -if degenerate_count: - print 'Discarded %d degenerate polygons.' % degenerate_count - -print 'Built %d polygons.' % poly_count - -############################################################################# -# Extract landmarks... - -area_layer = ds.GetLayerByName( 'AreaLandmarks' ) -feat = area_layer.GetNextFeature() -land_field = feat.GetFieldIndex( 'LAND' ) -polyid_field = feat.GetFieldIndex( 'POLYID' ) -cenid_field = feat.GetFieldIndex( 'CENID' ) - -area = {} -while feat is not None: - land = feat.GetField( land_field ) - polyid = feat.GetField( polyid_field ) - cenid = feat.GetField( cenid_field ) - - if area.has_key(land): - area[land].append(( cenid, polyid )) - else: - area[land] = [(cenid, polyid)] - - feat.Destroy() - feat = area_layer.GetNextFeature() - -feat = lm_layer.GetNextFeature() -land_field = feat.GetFieldIndex( 'LAND' ) -tile_ref_field = feat.GetFieldIndex( 'MODULE' ) -area_count = 0 - -while feat is not None: - module = modules_hash[feat.GetField( tile_ref_field )] - land = feat.GetField( land_field ) - if not area.has_key(land): - # print "Can't find LAND %s in Landmarks" % land - feat.Destroy() - feat = lm_layer.GetNextFeature() - continue - - link_coll = ogr.Geometry( type = ogr.wkbGeometryCollection ) - for cenid, polyid in area[land]: - seen = {} - tlid_list = module.poly_line_links[cenid, polyid] - for tlid in tlid_list: - if seen.has_key(tlid): - seen[tlid] += 1 - else: - seen[tlid] = 1 - - for tlid in seen.keys(): - if seen[tlid] == 1: - geom = module.lines[tlid] - link_coll.AddGeometry( geom ) - - try: - poly = ogr.BuildPolygonFromEdges( link_coll, 1, 1 ) - except: - print 'BuildPolygonFromEdges failed.' - feat.Destroy() - feat = lm_layer.GetNextFeature() - - feat2 = ogr.Feature(feature_def=area_out.GetLayerDefn()) - for fld_index in range(area_out.GetLayerDefn().GetFieldCount()): - feat2.SetField( fld_index, feat.GetField( fld_index ) ) - - feat2.SetGeometryDirectly( poly ) - area_out.CreateFeature( feat2 ) - feat2.Destroy() - - area_count += 1 - - feat.Destroy() - feat = lm_layer.GetNextFeature() - -print "Built %d area landmarks." % area_count - -############################################################################# -# Cleanup - -for shpds in shp_ds_cache: - shpds.Destroy() -ds.Destroy() diff -Nru postgis-1.5.3/extras/tiger_geocoder/normalize/count_words.sql postgis-2.0.1/extras/tiger_geocoder/normalize/count_words.sql --- postgis-1.5.3/extras/tiger_geocoder/normalize/count_words.sql 2007-07-03 21:30:34.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/normalize/count_words.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ --- Determine the number of words in a string. Words are allowed to --- be seperated only by spaces, but multiple spaces between --- words are allowed. -CREATE OR REPLACE FUNCTION count_words(VARCHAR) RETURNS INTEGER -AS $_$ -DECLARE - tempString VARCHAR; - tempInt INTEGER; - count INTEGER := 1; - lastSpace BOOLEAN := FALSE; -BEGIN - IF $1 IS NULL THEN - return -1; - END IF; - tempInt := length($1); - IF tempInt = 0 THEN - return 0; - END IF; - FOR i IN 1..tempInt LOOP - tempString := substring($1 from i for 1); - IF tempString = ' ' THEN - IF NOT lastSpace THEN - count := count + 1; - END IF; - lastSpace := TRUE; - ELSE - lastSpace := FALSE; - END IF; - END LOOP; - return count; -END; -$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/normalize/end_soundex.sql postgis-2.0.1/extras/tiger_geocoder/normalize/end_soundex.sql --- postgis-1.5.3/extras/tiger_geocoder/normalize/end_soundex.sql 2007-07-03 21:30:34.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/normalize/end_soundex.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ --- Runs the soundex function on the last word in the string provided. --- Words are allowed to be seperated by space, comma, period, new-line --- tab or form feed. -CREATE OR REPLACE FUNCTION end_soundex(VARCHAR) RETURNS VARCHAR -AS $_$ -DECLARE - tempString VARCHAR; -BEGIN - tempString := substring($1, E'[ ,.\n\t\f]([a-zA-Z0-9]*)$'); - IF tempString IS NOT NULL THEN - tempString := soundex(tempString); - ELSE - tempString := soundex($1); - END IF; - return tempString; -END; -$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/normalize/get_last_words.sql postgis-2.0.1/extras/tiger_geocoder/normalize/get_last_words.sql --- postgis-1.5.3/extras/tiger_geocoder/normalize/get_last_words.sql 2007-07-03 21:30:34.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/normalize/get_last_words.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ --- Returns a string consisting of the last N words. Words are allowed --- to be seperated only by spaces, but multiple spaces between --- words are allowed. Words must be alphanumberic. --- If more words are requested than exist, the full input string is --- returned. -CREATE OR REPLACE FUNCTION get_last_words( - inputString VARCHAR, - count INTEGER -) RETURNS VARCHAR -AS $_$ -DECLARE - tempString VARCHAR; - result VARCHAR := ''; -BEGIN - FOR i IN 1..count LOOP - tempString := substring(inputString from '((?: )+[a-zA-Z0-9_]*)' || result || '$'); - - IF tempString IS NULL THEN - RETURN inputString; - END IF; - - result := tempString || result; - END LOOP; - - result := trim(both from result); - - RETURN result; -END; -$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/normalize/location_extract.sql postgis-2.0.1/extras/tiger_geocoder/normalize/location_extract.sql --- postgis-1.5.3/extras/tiger_geocoder/normalize/location_extract.sql 2007-07-03 21:30:34.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/normalize/location_extract.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ --- location_extract(streetAddressString, stateAbbreviation) --- This function extracts a location name from the end of the given string. --- The first attempt is to find an exact match against the place_lookup --- table. If this fails, a word-by-word soundex match is tryed against the --- same table. If multiple candidates are found, the one with the smallest --- levenshtein distance from the given string is assumed the correct one. --- If no match is found against the place_lookup table, the same tests are --- run against the countysub_lookup table. --- --- The section of the given string corresponding to the location found is --- returned, rather than the string found from the tables. All the searching --- is done largely to determine the length (words) of the location, to allow --- the intended street name to be correctly identified. -CREATE OR REPLACE FUNCTION location_extract(fullStreet VARCHAR, stateAbbrev VARCHAR) RETURNS VARCHAR -AS $_$ -DECLARE - location VARCHAR; -BEGIN - IF fullStreet IS NULL THEN - RETURN NULL; - END IF; - - location := location_extract_place_exact(fullStreet, stateAbbrev); - IF location IS NULL THEN - location := location_extract_countysub_exact(fullStreet, stateAbbrev); - IF location IS NULL THEN - location := location_extract_place_fuzzy(fullStreet, stateAbbrev); - IF location IS NULL THEN - location := location_extract_countysub_fuzzy(fullStreet, stateAbbrev); - END IF; - END IF; - END IF; - - RETURN location; -END; -$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/normalize/location_extract_countysub_exact.sql postgis-2.0.1/extras/tiger_geocoder/normalize/location_extract_countysub_exact.sql --- postgis-1.5.3/extras/tiger_geocoder/normalize/location_extract_countysub_exact.sql 2007-07-03 21:30:34.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/normalize/location_extract_countysub_exact.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,54 +0,0 @@ --- location_extract_countysub_exact(string, stateAbbrev) --- This function checks the place_lookup table to find a potential match to --- the location described at the end of the given string. If an exact match --- fails, a fuzzy match is performed. The location as found in the given --- string is returned. -CREATE OR REPLACE FUNCTION location_extract_countysub_exact( - fullStreet VARCHAR, - stateAbbrev VARCHAR -) RETURNS VARCHAR -AS $_$ -DECLARE - ws VARCHAR; - location VARCHAR; - tempInt INTEGER; - rec RECORD; -BEGIN - ws := E'[ ,.\n\f\t]'; - - -- No hope of determining the location from place. Try countysub. - IF stateAbbrev IS NOT NULL THEN - SELECT INTO tempInt count(*) FROM countysub_lookup - WHERE countysub_lookup.state = stateAbbrev - AND texticregexeq(fullStreet, '(?i)' || name || '$'); - ELSE - SELECT INTO tempInt count(*) FROM countysub_lookup - WHERE texticregexeq(fullStreet, '(?i)' || name || '$'); - END IF; - - IF tempInt > 0 THEN - IF stateAbbrev IS NOT NULL THEN - FOR rec IN SELECT substring(fullStreet, '(?i)(' - || name || ')$') AS value, name FROM countysub_lookup - WHERE countysub_lookup.state = stateAbbrev - AND texticregexeq(fullStreet, '(?i)' || ws || name || - '$') ORDER BY length(name) DESC LOOP - -- Only the first result is needed. - location := rec.value; - EXIT; - END LOOP; - ELSE - FOR rec IN SELECT substring(fullStreet, '(?i)(' - || name || ')$') AS value, name FROM countysub_lookup - WHERE texticregexeq(fullStreet, '(?i)' || ws || name || - '$') ORDER BY length(name) DESC LOOP - -- again, only the first is needed. - location := rec.value; - EXIT; - END LOOP; - END IF; - END IF; - - RETURN location; -END; -$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/normalize/location_extract_countysub_fuzzy.sql postgis-2.0.1/extras/tiger_geocoder/normalize/location_extract_countysub_fuzzy.sql --- postgis-1.5.3/extras/tiger_geocoder/normalize/location_extract_countysub_fuzzy.sql 2007-07-03 21:30:34.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/normalize/location_extract_countysub_fuzzy.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,87 +0,0 @@ --- location_extract_countysub_fuzzy(string, stateAbbrev) --- This function checks the place_lookup table to find a potential match to --- the location described at the end of the given string. If an exact match --- fails, a fuzzy match is performed. The location as found in the given --- string is returned. -CREATE OR REPLACE FUNCTION location_extract_countysub_fuzzy( - fullStreet VARCHAR, - stateAbbrev VARCHAR -) RETURNS VARCHAR -AS $_$ -DECLARE - ws VARCHAR; - tempString VARCHAR; - location VARCHAR; - tempInt INTEGER; - word_count INTEGER; - rec RECORD; - test BOOLEAN; -BEGIN - ws := E'[ ,.\n\f\t]'; - - -- Fuzzy matching. - tempString := substring(fullStreet, '(?i)' || ws || - '([a-zA-Z0-9]+)$'); - IF tempString IS NULL THEN - tempString := fullStreet; - END IF; - - IF stateAbbrev IS NOT NULL THEN - SELECT INTO tempInt count(*) FROM countysub_lookup - WHERE countysub_lookup.state = stateAbbrev - AND soundex(tempString) = end_soundex(name); - ELSE - SELECT INTO tempInt count(*) FROM countysub_lookup - WHERE soundex(tempString) = end_soundex(name); - END IF; - - IF tempInt > 0 THEN - tempInt := 50; - -- Some potentials were found. Begin a word-by-word soundex on each. - IF stateAbbrev IS NOT NULL THEN - FOR rec IN SELECT name FROM countysub_lookup - WHERE countysub_lookup.state = stateAbbrev - AND soundex(tempString) = end_soundex(name) LOOP - word_count := count_words(rec.name); - test := TRUE; - tempString := get_last_words(fullStreet, word_count); - FOR i IN 1..word_count LOOP - IF soundex(split_part(tempString, ' ', i)) != - soundex(split_part(rec.name, ' ', i)) THEN - test := FALSE; - END IF; - END LOOP; - IF test THEN - -- The soundex matched, determine if the distance is better. - IF levenshtein_ignore_case(rec.name, tempString) < tempInt THEN - location := tempString; - tempInt := levenshtein_ignore_case(rec.name, tempString); - END IF; - END IF; - END LOOP; - ELSE - FOR rec IN SELECT name FROM countysub_lookup - WHERE soundex(tempString) = end_soundex(name) LOOP - word_count := count_words(rec.name); - test := TRUE; - tempString := get_last_words(fullStreet, word_count); - FOR i IN 1..word_count LOOP - IF soundex(split_part(tempString, ' ', i)) != - soundex(split_part(rec.name, ' ', i)) THEN - test := FALSE; - END IF; - END LOOP; - IF test THEN - -- The soundex matched, determine if the distance is better. - IF levenshtein_ignore_case(rec.name, tempString) < tempInt THEN - location := tempString; - tempInt := levenshtein_ignore_case(rec.name, tempString); - END IF; - END IF; - END LOOP; - END IF; - END IF; -- If no fuzzys were found, leave location null. - - RETURN location; -END; -$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/normalize/location_extract_place_exact.sql postgis-2.0.1/extras/tiger_geocoder/normalize/location_extract_place_exact.sql --- postgis-1.5.3/extras/tiger_geocoder/normalize/location_extract_place_exact.sql 2007-07-03 21:30:34.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/normalize/location_extract_place_exact.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,57 +0,0 @@ --- location_extract_place_exact(string, stateAbbrev) --- This function checks the place_lookup table to find a potential match to --- the location described at the end of the given string. If an exact match --- fails, a fuzzy match is performed. The location as found in the given --- string is returned. -CREATE OR REPLACE FUNCTION location_extract_place_exact( - fullStreet VARCHAR, - stateAbbrev VARCHAR -) RETURNS VARCHAR -AS $_$ -DECLARE - ws VARCHAR; - location VARCHAR; - tempInt INTEGER; - rec RECORD; -BEGIN - ws := E'[ ,.\n\f\t]'; - - -- Try for an exact match against places - IF stateAbbrev IS NOT NULL THEN - SELECT INTO tempInt count(*) FROM place_lookup - WHERE place_lookup.state = stateAbbrev - AND texticregexeq(fullStreet, '(?i)' || name || '$'); - ELSE - SELECT INTO tempInt count(*) FROM place_lookup - WHERE texticregexeq(fullStreet, '(?i)' || name || '$'); - END IF; - - IF tempInt > 0 THEN - -- Some matches were found. Look for the last one in the string. - IF stateAbbrev IS NOT NULL THEN - FOR rec IN SELECT substring(fullStreet, '(?i)(' - || name || ')$') AS value, name FROM place_lookup - WHERE place_lookup.state = stateAbbrev - AND texticregexeq(fullStreet, '(?i)' - || name || '$') ORDER BY length(name) DESC LOOP - -- Since the regex is end of string, only the longest (first) result - -- is useful. - location := rec.value; - EXIT; - END LOOP; - ELSE - FOR rec IN SELECT substring(fullStreet, '(?i)(' - || name || ')$') AS value, name FROM place_lookup - WHERE texticregexeq(fullStreet, '(?i)' - || name || '$') ORDER BY length(name) DESC LOOP - -- Since the regex is end of string, only the longest (first) result - -- is useful. - location := rec.value; - EXIT; - END LOOP; - END IF; - END IF; - - RETURN location; -END; -$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/normalize/location_extract_place_fuzzy.sql postgis-2.0.1/extras/tiger_geocoder/normalize/location_extract_place_fuzzy.sql --- postgis-1.5.3/extras/tiger_geocoder/normalize/location_extract_place_fuzzy.sql 2007-07-03 21:30:34.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/normalize/location_extract_place_fuzzy.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,86 +0,0 @@ --- location_extract_place_fuzzy(string, stateAbbrev) --- This function checks the place_lookup table to find a potential match to --- the location described at the end of the given string. If an exact match --- fails, a fuzzy match is performed. The location as found in the given --- string is returned. -CREATE OR REPLACE FUNCTION location_extract_place_fuzzy( - fullStreet VARCHAR, - stateAbbrev VARCHAR -) RETURNS VARCHAR -AS $_$ -DECLARE - ws VARCHAR; - tempString VARCHAR; - location VARCHAR; - tempInt INTEGER; - word_count INTEGER; - rec RECORD; - test BOOLEAN; -BEGIN - ws := E'[ ,.\n\f\t]'; - - tempString := substring(fullStreet, '(?i)' || ws - || '([a-zA-Z0-9]+)$'); - IF tempString IS NULL THEN - tempString := fullStreet; - END IF; - - IF stateAbbrev IS NOT NULL THEN - SELECT into tempInt count(*) FROM place_lookup - WHERE place_lookup.state = stateAbbrev - AND soundex(tempString) = end_soundex(name); - ELSE - SELECT into tempInt count(*) FROM place_lookup - WHERE soundex(tempString) = end_soundex(name); - END IF; - - IF tempInt > 0 THEN - -- Some potentials were found. Begin a word-by-word soundex on each. - tempInt := 50; - IF stateAbbrev IS NOT NULL THEN - FOR rec IN SELECT name FROM place_lookup - WHERE place_lookup.state = stateAbbrev - AND soundex(tempString) = end_soundex(name) LOOP - word_count := count_words(rec.name); - test := TRUE; - tempString := get_last_words(fullStreet, word_count); - FOR i IN 1..word_count LOOP - IF soundex(split_part(tempString, ' ', i)) != - soundex(split_part(rec.name, ' ', i)) THEN - test := FALSE; - END IF; - END LOOP; - IF test THEN - -- The soundex matched, determine if the distance is better. - IF levenshtein_ignore_case(rec.name, tempString) < tempInt THEN - location := tempString; - tempInt := levenshtein_ignore_case(rec.name, tempString); - END IF; - END IF; - END LOOP; - ELSE - FOR rec IN SELECT name FROM place_lookup - WHERE soundex(tempString) = end_soundex(name) LOOP - word_count := count_words(rec.name); - test := TRUE; - tempString := get_last_words(fullStreet, word_count); - FOR i IN 1..word_count LOOP - IF soundex(split_part(tempString, ' ', i)) != - soundex(split_part(rec.name, ' ', i)) THEN - test := FALSE; - END IF; - END LOOP; - IF test THEN - -- The soundex matched, determine if the distance is better. - IF levenshtein_ignore_case(rec.name, tempString) < tempInt THEN - location := tempString; - tempInt := levenshtein_ignore_case(rec.name, tempString); - END IF; - END IF; - END LOOP; - END IF; - END IF; - - RETURN location; -END; -$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/normalize/normalize_address.sql postgis-2.0.1/extras/tiger_geocoder/normalize/normalize_address.sql --- postgis-1.5.3/extras/tiger_geocoder/normalize/normalize_address.sql 2007-07-03 21:30:34.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/normalize/normalize_address.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,493 +0,0 @@ --- normalize_address(addressString) --- This takes an address string and parses it into address (internal/street) --- street name, type, direction prefix and suffix, location, state and --- zip code, depending on what can be found in the string. --- --- The US postal address standard is used: --- --- --- --- State is assumed to be included in the string, and MUST be matchable to --- something in the state_lookup table. Fuzzy matching is used if no direct --- match is found. --- --- Two formats of zip code are acceptable: five digit, and five + 4. --- --- The internal addressing indicators are looked up from the --- secondary_unit_lookup table. A following identifier is accepted --- but it must start with a digit. --- --- The location is parsed from the string using other indicators, such --- as street type, direction suffix or internal address, if available. --- If these are not, the location is extracted using comparisons against --- the places_lookup table, then the countysub_lookup table to determine --- what, in the original string, is intended to be the location. In both --- cases, an exact match is first pursued, then a word-by-word fuzzy match. --- The result is not the name of the location from the tables, but the --- section of the given string that corresponds to the name from the tables. --- --- Zip codes and street names are not validated. --- --- Direction indicators are extracted by comparison with the direction_lookup --- table. --- --- Street addresses are assumed to be a single word, starting with a number. --- Address is manditory; if no address is given, and the street is numbered, --- the resulting address will be the street name, and the street name --- will be an empty string. --- --- In some cases, the street type is part of the street name. --- eg State Hwy 22a. As long as the word following the type starts with a --- number (this is usually the case) this will be caught. Some street names --- include a type name, and have a street type that differs. This will be --- handled properly, so long as both are given. If the street type is --- omitted, the street names included type will be parsed as the street type. --- --- The output is currently a colon seperated list of values: --- InternalAddress:StreetAddress:DirectionPrefix:StreetName:StreetType: --- DirectionSuffix:Location:State:ZipCode --- This returns each element as entered. It's mainly meant for debugging. --- There is also another option that returns: --- StreetAddress:DirectionPrefixAbbreviation:StreetName:StreetTypeAbbreviation: --- DirectionSuffixAbbreviation:Location:StateAbbreviation:ZipCode --- This is more standardized and better for use with a geocoder. -CREATE OR REPLACE FUNCTION normalize_address( - rawInput VARCHAR -) RETURNS norm_addy -AS $_$ -DECLARE - result norm_addy; - addressString VARCHAR; - zipString VARCHAR; - preDir VARCHAR; - postDir VARCHAR; - fullStreet VARCHAR; - reducedStreet VARCHAR; - streetType VARCHAR; - state VARCHAR; - tempString VARCHAR; - tempInt INTEGER; - rec RECORD; - ws VARCHAR; -BEGIN - result.parsed := FALSE; - - IF rawInput IS NULL THEN - RETURN result; - END IF; - - ws := E'[ ,.\t\n\f\r]'; - - -- Assume that the address begins with a digit, and extract it from - -- the input string. - addressString := substring(rawInput from '^([0-9].*?)[ ,/.]'); - - -- There are two formats for zip code, the normal 5 digit, and - -- the nine digit zip-4. It may also not exist. - zipString := substring(rawInput from ws || '([0-9]{5})$'); - IF zipString IS NULL THEN - zipString := substring(rawInput from ws || '([0-9]{5})-[0-9]{4}$'); - -- Check if all we got was a zipcode, of either form - IF zipString IS NULL THEN - zipString := substring(rawInput from '^([0-9]{5})$'); - IF zipString IS NULL THEN - zipString := substring(rawInput from '^([0-9]{5})-[0-9]{4}$'); - END IF; - -- If it was only a zipcode, then just return it. - IF zipString IS NOT NULL THEN - result.zip := to_number(zipString, '99999'); - result.parsed := TRUE; - RETURN result; - END IF; - END IF; - END IF; - - IF zipString IS NOT NULL THEN - fullStreet := substring(rawInput from '(.*)' - || ws || '+' || cull_null(zipString) || '[- ]?([0-9]{4})?$'); - ELSE - fullStreet := rawInput; - END IF; - - -- FIXME: state_extract should probably be returning a record so we can - -- avoid having to parse the result from it. - tempString := state_extract(fullStreet); - IF tempString IS NOT NULL THEN - state := split_part(tempString, ':', 1); - result.stateAbbrev := split_part(tempString, ':', 2); - END IF; - - -- The easiest case is if the address is comma delimited. There are some - -- likely cases: - -- street level, location, state - -- street level, location state - -- street level, location - -- street level, internal address, location, state - -- street level, internal address, location state - -- street level, internal address location state - -- street level, internal address, location - -- street level, internal address location - -- The first three are useful. - tempString := substring(fullStreet, '(?i),' || ws || '+(.*?)(,?' || ws || - '*' || cull_null(state) || '$)'); - IF tempString = '' THEN tempString := NULL; END IF; - IF tempString IS NOT NULL THEN - result.location := tempString; - IF addressString IS NOT NULL THEN - fullStreet := substring(fullStreet, '(?i)' || addressString || ws || - '+(.*),' || ws || '+' || result.location); - ELSE - fullStreet := substring(fullStreet, '(?i)(.*),' || ws || '+' || - result.location); - END IF; - END IF; - - -- Pull out the full street information, defined as everything between the - -- address and the state. This includes the location. - -- This doesnt need to be done if location has already been found. - IF result.location IS NULL THEN - IF addressString IS NOT NULL THEN - IF state IS NOT NULL THEN - fullStreet := substring(fullStreet, '(?i)' || addressString || - ws || '+(.*?)' || ws || '+' || state); - ELSE - fullStreet := substring(fullStreet, '(?i)' || addressString || - ws || '+(.*?)'); - END IF; - ELSE - IF state IS NOT NULL THEN - fullStreet := substring(fullStreet, '(?i)(.*?)' || ws || - '+' || state); - ELSE - fullStreet := substring(fullStreet, '(?i)(.*?)'); - END IF; - END IF; - END IF; - - -- Determine if any internal address is included, such as apartment - -- or suite number. - SELECT INTO tempInt count(*) FROM secondary_unit_lookup - WHERE texticregexeq(fullStreet, '(?i)' || ws || name || '(' - || ws || '|$)'); - IF tempInt = 1 THEN - SELECT INTO result.internal substring(fullStreet, '(?i)' || ws || '(' - || name || ws || '*#?' || ws - || '*(?:[0-9][-0-9a-zA-Z]*)?' || ')(?:' || ws || '|$)') - FROM secondary_unit_lookup - WHERE texticregexeq(fullStreet, '(?i)' || ws || name || '(' - || ws || '|$)'); - ELSIF tempInt > 1 THEN - -- In the event of multiple matches to a secondary unit designation, we - -- will assume that the last one is the true one. - tempInt := 0; - FOR rec in SELECT trim(substring(fullStreet, '(?i)' || ws || '(' - || name || '(?:' || ws || '*#?' || ws - || '*(?:[0-9][-0-9a-zA-Z]*)?)' || ws || '?|$)')) as value - FROM secondary_unit_lookup - WHERE texticregexeq(fullStreet, '(?i)' || ws || name || '(' - || ws || '|$)') LOOP - IF tempInt < position(rec.value in fullStreet) THEN - tempInt := position(rec.value in fullStreet); - result.internal := rec.value; - END IF; - END LOOP; - END IF; - - IF result.location IS NULL THEN - -- If the internal address is given, the location is everything after it. - result.location := substring(fullStreet, result.internal || ws || '+(.*)$'); - END IF; - - -- Pull potential street types from the full street information - SELECT INTO tempInt count(*) FROM street_type_lookup - WHERE texticregexeq(fullStreet, '(?i)' || ws || '(' || name - || ')(?:' || ws || '|$)'); - IF tempInt = 1 THEN - SELECT INTO rec abbrev, substring(fullStreet, '(?i)' || ws || '(' - || name || ')(?:' || ws || '|$)') AS given FROM street_type_lookup - WHERE texticregexeq(fullStreet, '(?i)' || ws || '(' || name - || ')(?:' || ws || '|$)'); - streetType := rec.given; - result.streetTypeAbbrev := rec.abbrev; - ELSIF tempInt > 1 THEN - tempInt := 0; - FOR rec IN SELECT abbrev, substring(fullStreet, '(?i)' || ws || '(' - || name || ')(?:' || ws || '|$)') AS given FROM street_type_lookup - WHERE texticregexeq(fullStreet, '(?i)' || ws || '(' || name - || ')(?:' || ws || '|$)') LOOP - -- If we have found an internal address, make sure the type - -- precedes it. - IF result.internal IS NOT NULL THEN - IF position(rec.given IN fullStreet) < position(result.internal IN fullStreet) THEN - IF tempInt < position(rec.given IN fullStreet) THEN - streetType := rec.given; - result.streetTypeAbbrev := rec.abbrev; - tempInt := position(rec.given IN fullStreet); - END IF; - END IF; - ELSIF tempInt < position(rec.given IN fullStreet) THEN - streetType := rec.given; - result.streetTypeAbbrev := rec.abbrev; - tempInt := position(rec.given IN fullStreet); - END IF; - END LOOP; - END IF; - - -- There is a little more processing required now. If the word after the - -- street type begins with a number, the street type should be considered - -- part of the name, as well as the next word. eg, State Route 225a. If - -- the next word starts with a char, then everything after the street type - -- will be considered location. If there is no street type, then I'm sad. - IF streetType IS NOT NULL THEN - tempString := substring(fullStreet, streetType || ws || - E'+([0-9][^ ,.\t\r\n\f]*?)' || ws); - IF tempString IS NOT NULL THEN - IF result.location IS NULL THEN - result.location := substring(fullStreet, streetType || ws || '+' - || tempString || ws || '+(.*)$'); - END IF; - reducedStreet := substring(fullStreet, '(.*)' || ws || '+' - || result.location || '$'); - streetType := NULL; - result.streetTypeAbbrev := NULL; - ELSE - IF result.location IS NULL THEN - result.location := substring(fullStreet, streetType || ws || '+(.*)$'); - END IF; - reducedStreet := substring(fullStreet, '^(.*)' || ws || '+' - || streetType); - END IF; - - -- The pre direction should be at the beginning of the fullStreet string. - -- The post direction should be at the beginning of the location string - -- if there is no internal address - SELECT INTO tempString substring(reducedStreet, '(?i)(^' || name - || ')' || ws) FROM direction_lookup WHERE - texticregexeq(reducedStreet, '(?i)(^' || name || ')' || ws) - ORDER BY length(name) DESC; - IF tempString IS NOT NULL THEN - preDir := tempString; - SELECT INTO result.preDirAbbrev abbrev FROM direction_lookup - where texticregexeq(reducedStreet, '(?i)(^' || name || ')' || ws) - ORDER BY length(name) DESC; - result.streetName := substring(reducedStreet, '^' || preDir || ws || '(.*)'); - ELSE - result.streetName := reducedStreet; - END IF; - - IF texticregexeq(result.location, '(?i)' || result.internal || '$') THEN - -- If the internal address is at the end of the location, then no - -- location was given. We still need to look for post direction. - SELECT INTO rec abbrev, - substring(result.location, '(?i)^(' || name || ')' || ws) as value - FROM direction_lookup WHERE texticregexeq(result.location, '(?i)^' - || name || ws) ORDER BY length(name) desc; - IF rec.value IS NOT NULL THEN - postDir := rec.value; - result.postDirAbbrev := rec.abbrev; - END IF; - result.location := null; - ELSIF result.internal IS NULL THEN - -- If no location is given, the location string will be the post direction - SELECT INTO tempInt count(*) FROM direction_lookup WHERE - upper(result.location) = upper(name); - IF tempInt != 0 THEN - postDir := result.location; - SELECT INTO result.postDirAbbrev abbrev FROM direction_lookup WHERE - upper(postDir) = upper(name); - result.location := NULL; - ELSE - -- postDirection is not equal location, but may be contained in it. - SELECT INTO tempString substring(result.location, '(?i)(^' || name - || ')' || ws) FROM direction_lookup WHERE - texticregexeq(result.location, '(?i)(^' || name || ')' || ws) - ORDER BY length(name) desc; - IF tempString IS NOT NULL THEN - postDir := tempString; - SELECT INTO result.postDirAbbrev abbrev FROM direction_lookup - where texticregexeq(result.location, '(?i)(^' || name || ')' || ws); - result.location := substring(result.location, '^' || postDir || ws || '+(.*)'); - END IF; - END IF; - ELSE - -- internal is not null, but is not at the end of the location string - -- look for post direction before the internal address - SELECT INTO tempString substring(fullStreet, '(?i)' || streetType - || ws || '+(' || name || ')' || ws || '+' || result.internal) - FROM direction_lookup WHERE texticregexeq(fullStreet, '(?i)' - || ws || name || ws || '+' || result.internal) ORDER BY length(name) desc; - IF tempString IS NOT NULL THEN - postDir := tempString; - SELECT INTO result.postDirAbbrev abbrev FROM direction_lookup - WHERE texticregexeq(fullStreet, '(?i)' || ws || name || ws); - END IF; - END IF; - ELSE - -- No street type was found - - -- If an internal address was given, then the split becomes easy, and the - -- street name is everything before it, without directions. - IF result.internal IS NOT NULL THEN - reducedStreet := substring(fullStreet, '(?i)^(.*?)' || ws || '+' - || result.internal); - SELECT INTO tempInt count(*) FROM direction_lookup WHERE - texticregexeq(reducedStreet, '(?i)' || ws || name || '$'); - IF tempInt > 0 THEN - SELECT INTO postDir substring(reducedStreet, '(?i)' || ws || '(' - || name || ')' || '$') FROM direction_lookup - WHERE texticregexeq(reducedStreet, '(?i)' || ws || name || '$'); - SELECT INTO result.postDirAbbrev abbrev FROM direction_lookup - WHERE texticregexeq(reducedStreet, '(?i)' || ws || name || '$'); - END IF; - SELECT INTO tempString substring(reducedStreet, '(?i)^(' || name - || ')' || ws) FROM direction_lookup WHERE - texticregexeq(reducedStreet, '(?i)^(' || name || ')' || ws) - ORDER BY length(name) DESC; - IF tempString IS NOT NULL THEN - preDir := tempString; - SELECT INTO result.preDirAbbrev abbrev FROM direction_lookup WHERE - texticregexeq(reducedStreet, '(?i)(^' || name || ')' || ws) - ORDER BY length(name) DESC; - result.streetName := substring(reducedStreet, '(?i)^' || preDir || ws - || '+(.*?)(?:' || ws || '+' || cull_null(postDir) || '|$)'); - ELSE - result.streetName := substring(reducedStreet, '(?i)^(.*?)(?:' || ws - || '+' || cull_null(postDir) || '|$)'); - END IF; - ELSE - - -- If a post direction is given, then the location is everything after, - -- the street name is everything before, less any pre direction. - SELECT INTO tempInt count(*) FROM direction_lookup - WHERE texticregexeq(fullStreet, '(?i)' || ws || name || '(?:' - || ws || '|$)'); - - IF tempInt = 1 THEN - -- A single postDir candidate was found. This makes it easier. - SELECT INTO postDir substring(fullStreet, '(?i)' || ws || '(' - || name || ')(?:' || ws || '|$)') FROM direction_lookup WHERE - texticregexeq(fullStreet, '(?i)' || ws || name || '(?:' - || ws || '|$)'); - SELECT INTO result.postDirAbbrev abbrev FROM direction_lookup - WHERE texticregexeq(fullStreet, '(?i)' || ws || name - || '(?:' || ws || '|$)'); - IF result.location IS NULL THEN - result.location := substring(fullStreet, '(?i)' || ws || postDir - || ws || '+(.*?)$'); - END IF; - reducedStreet := substring(fullStreet, '^(.*?)' || ws || '+' - || postDir); - SELECT INTO tempString substring(reducedStreet, '(?i)(^' || name - || ')' || ws) FROM direction_lookup WHERE - texticregexeq(reducedStreet, '(?i)(^' || name || ')' || ws) - ORDER BY length(name) DESC; - IF tempString IS NOT NULL THEN - preDir := tempString; - SELECT INTO result.preDirAbbrev abbrev FROM direction_lookup WHERE - texticregexeq(reducedStreet, '(?i)(^' || name || ')' || ws) - ORDER BY length(name) DESC; - result.streetName := substring(reducedStreet, '^' || preDir || ws - || '+(.*)'); - ELSE - result.streetName := reducedStreet; - END IF; - ELSIF tempInt > 1 THEN - -- Multiple postDir candidates were found. We need to find the last - -- incident of a direction, but avoid getting the last word from - -- a two word direction. eg extracting "East" from "North East" - -- We do this by sorting by length, and taking the last direction - -- in the results that is not included in an earlier one. - -- This wont be a problem it preDir is North East and postDir is - -- East as the regex requires a space before the direction. Only - -- the East will return from the preDir. - tempInt := 0; - FOR rec IN SELECT abbrev, substring(fullStreet, '(?i)' || ws || '(' - || name || ')(?:' || ws || '|$)') AS value - FROM direction_lookup - WHERE texticregexeq(fullStreet, '(?i)' || ws || name - || '(?:' || ws || '|$)') - ORDER BY length(name) desc LOOP - tempInt := 0; - IF tempInt < position(rec.value in fullStreet) THEN - IF postDir IS NULL THEN - tempInt := position(rec.value in fullStreet); - postDir := rec.value; - result.postDirAbbrev := rec.abbrev; - ELSIF NOT texticregexeq(postDir, '(?i)' || rec.value) THEN - tempInt := position(rec.value in fullStreet); - postDir := rec.value; - result.postDirAbbrev := rec.abbrev; - END IF; - END IF; - END LOOP; - IF result.location IS NULL THEN - result.location := substring(fullStreet, '(?i)' || ws || postDir || ws - || '+(.*?)$'); - END IF; - reducedStreet := substring(fullStreet, '(?i)^(.*?)' || ws || '+' - || postDir); - SELECT INTO tempString substring(reducedStreet, '(?i)(^' || name - || ')' || ws) FROM direction_lookup WHERE - texticregexeq(reducedStreet, '(?i)(^' || name || ')' || ws) - ORDER BY length(name) DESC; - IF tempString IS NOT NULL THEN - preDir := tempString; - SELECT INTO result.preDirAbbrev abbrev FROM direction_lookup WHERE - texticregexeq(reducedStreet, '(?i)(^' || name || ')' || ws) - ORDER BY length(name) DESC; - result.streetName := substring(reducedStreet, '^' || preDir || ws - || '+(.*)'); - ELSE - result.streetName := reducedStreet; - END IF; - ELSE - - -- There is no street type, directional suffix or internal address - -- to allow distinction between street name and location. - IF result.location IS NULL THEN - result.location := location_extract(fullStreet, result.stateAbbrev); - -- If the location was found, remove it from fullStreet - fullStreet := substring(fullStreet, '(?i)(.*),' || ws || '+' || - result.location); - END IF; - - -- Check for a direction prefix. - SELECT INTO tempString substring(fullStreet, '(?i)(^' || name - || ')' || ws) FROM direction_lookup WHERE - texticregexeq(fullStreet, '(?i)(^' || name || ')' || ws) - ORDER BY length(name); - IF tempString IS NOT NULL THEN - preDir := tempString; - SELECT INTO result.preDirAbbrev abbrev FROM direction_lookup WHERE - texticregexeq(fullStreet, '(?i)(^' || name || ')' || ws) - ORDER BY length(name) DESC; - IF result.location IS NOT NULL THEN - -- The location may still be in the fullStreet, or may - -- have been removed already - result.streetName := substring(fullStreet, '^' || preDir || ws - || '+(.*?)(' || ws || '+' || result.location || '|$)'); - ELSE - result.streetName := substring(fullStreet, '^' || preDir || ws - || '+(.*?)' || ws || '*'); - END IF; - ELSE - IF result.location IS NOT NULL THEN - -- The location may still be in the fullStreet, or may - -- have been removed already - result.streetName := substring(fullStreet, '^(.*?)(' || ws - || '+' || result.location || '|$)'); - ELSE - result.streetName := fullStreet; - END IF; - END IF; - END IF; - END IF; - END IF; - - result.address := to_number(addressString, '99999999999'); - result.zip := to_number(zipString, '99999'); - - result.parsed := TRUE; - RETURN result; -END -$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/normalize/pprint_addy.sql postgis-2.0.1/extras/tiger_geocoder/normalize/pprint_addy.sql --- postgis-1.5.3/extras/tiger_geocoder/normalize/pprint_addy.sql 2009-03-12 23:20:26.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/normalize/pprint_addy.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ -CREATE OR REPLACE FUNCTION pprint_addy( - input NORM_ADDY -) RETURNS VARCHAR -AS $_$ -DECLARE - result VARCHAR; -BEGIN - IF NOT input.parsed THEN - RETURN NULL; - END IF; - - result := cull_null(input.address::text) - || CASE WHEN input.preDirAbbrev IS NOT NULL THEN ' ' ELSE '' END - || cull_null(input.preDirAbbrev) - || CASE WHEN input.streetName IS NOT NULL THEN ' ' ELSE '' END - || cull_null(input.streetName) - || CASE WHEN input.streetTypeAbbrev IS NOT NULL THEN ' ' ELSE '' END - || cull_null(input.streetTypeAbbrev) - || CASE WHEN input.postDirAbbrev IS NOT NULL THEN ' ' ELSE '' END - || cull_null(input.postDirAbbrev) - || CASE WHEN - input.address IS NOT NULL OR - input.streetName IS NOT NULL - THEN ', ' ELSE '' END - || cull_null(input.internal) - || CASE WHEN input.internal IS NOT NULL THEN ', ' ELSE '' END - || cull_null(input.location) - || CASE WHEN input.location IS NOT NULL THEN ', ' ELSE '' END - || cull_null(input.stateAbbrev) - || CASE WHEN input.stateAbbrev IS NOT NULL THEN ' ' ELSE '' END - || cull_null(lpad(input.zip::text,5,'0')); - - RETURN result; - -END; -$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/normalize/state_extract.sql postgis-2.0.1/extras/tiger_geocoder/normalize/state_extract.sql --- postgis-1.5.3/extras/tiger_geocoder/normalize/state_extract.sql 2007-07-03 21:30:34.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/normalize/state_extract.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,82 +0,0 @@ --- state_extract(addressStringLessZipCode) --- Extracts the state from end of the given string. --- --- This function uses the state_lookup table to determine which state --- the input string is indicating. First, an exact match is pursued, --- and in the event of failure, a word-by-word fuzzy match is attempted. --- --- The result is the state as given in the input string, and the approved --- state abbreviation, seperated by a colon. -CREATE OR REPLACE FUNCTION state_extract(rawInput VARCHAR) RETURNS VARCHAR -AS $_$ -DECLARE - tempInt INTEGER; - tempString VARCHAR; - state VARCHAR; - stateAbbrev VARCHAR; - result VARCHAR; - rec RECORD; - test BOOLEAN; - ws VARCHAR; -BEGIN - ws := E'[ ,.\t\n\f\r]'; - - -- Separate out the last word of the state, and use it to compare to - -- the state lookup table to determine the entire name, as well as the - -- abbreviation associated with it. The zip code may or may not have - -- been found. - tempString := substring(rawInput from ws || E'+([^ ,.\t\n\f\r0-9]*?)$'); - SELECT INTO tempInt count(*) FROM (select distinct abbrev from state_lookup - WHERE upper(abbrev) = upper(tempString)) as blah; - IF tempInt = 1 THEN - state := tempString; - SELECT INTO stateAbbrev abbrev FROM (select distinct abbrev from - state_lookup WHERE upper(abbrev) = upper(tempString)) as blah; - ELSE - SELECT INTO tempInt count(*) FROM state_lookup WHERE upper(name) - like upper('%' || tempString); - IF tempInt >= 1 THEN - FOR rec IN SELECT name from state_lookup WHERE upper(name) - like upper('%' || tempString) LOOP - SELECT INTO test texticregexeq(rawInput, name) FROM state_lookup - WHERE rec.name = name; - IF test THEN - SELECT INTO stateAbbrev abbrev FROM state_lookup - WHERE rec.name = name; - state := substring(rawInput, '(?i)' || rec.name); - EXIT; - END IF; - END LOOP; - ELSE - -- No direct match for state, so perform fuzzy match. - SELECT INTO tempInt count(*) FROM state_lookup - WHERE soundex(tempString) = end_soundex(name); - IF tempInt >= 1 THEN - FOR rec IN SELECT name, abbrev FROM state_lookup - WHERE soundex(tempString) = end_soundex(name) LOOP - tempInt := count_words(rec.name); - tempString := get_last_words(rawInput, tempInt); - test := TRUE; - FOR i IN 1..tempInt LOOP - IF soundex(split_part(tempString, ' ', i)) != - soundex(split_part(rec.name, ' ', i)) THEN - test := FALSE; - END IF; - END LOOP; - IF test THEN - state := tempString; - stateAbbrev := rec.abbrev; - EXIT; - END IF; - END LOOP; - END IF; - END IF; - END IF; - - IF state IS NOT NULL AND stateAbbrev IS NOT NULL THEN - result := state || ':' || stateAbbrev; - END IF; - - RETURN result; -END; -$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/orig/tiger_geocoder.sql postgis-2.0.1/extras/tiger_geocoder/orig/tiger_geocoder.sql --- postgis-1.5.3/extras/tiger_geocoder/orig/tiger_geocoder.sql 2007-07-03 21:05:03.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/orig/tiger_geocoder.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,2657 +0,0 @@ --- Runs the soundex function on the last word in the string provided. --- Words are allowed to be seperated by space, comma, period, new-line --- tab or form feed. -CREATE OR REPLACE FUNCTION end_soundex(VARCHAR) RETURNS VARCHAR -AS ' -DECLARE - tempString VARCHAR; -BEGIN - tempString := substring($1, ''[ ,\.\n\t\f]([a-zA-Z0-9]*)$''); - IF tempString IS NOT NULL THEN - tempString := soundex(tempString); - ELSE - tempString := soundex($1); - END IF; - return tempString; -END; -' LANGUAGE plpgsql; - --- Returns the value passed, or an empty string if null. --- This is used to concatinate values that may be null. -CREATE OR REPLACE FUNCTION cull_null(VARCHAR) RETURNS VARCHAR -AS ' -BEGIN - IF $1 IS NULL THEN - return ''''; - ELSE - return $1; - END IF; -END; -' LANGUAGE plpgsql; - --- Determine the number of words in a string. Words are allowed to --- be seperated only by spaces, but multiple spaces between --- words are allowed. -CREATE OR REPLACE FUNCTION count_words(VARCHAR) RETURNS INTEGER -AS ' -DECLARE - tempString VARCHAR; - tempInt INTEGER; - count INTEGER := 1; - lastSpace BOOLEAN := FALSE; -BEGIN - IF $1 IS NULL THEN - return -1; - END IF; - tempInt := length($1); - IF tempInt = 0 THEN - return 0; - END IF; - FOR i IN 1..tempInt LOOP - tempString := substring($1 from i for 1); - IF tempString = '' '' THEN - IF NOT lastSpace THEN - count := count + 1; - END IF; - lastSpace := TRUE; - ELSE - lastSpace := FALSE; - END IF; - END LOOP; - return count; -END; -' LANGUAGE plpgsql; - - - -CREATE OR REPLACE FUNCTION geocode(VARCHAR) RETURNS REFCURSOR -AS ' -BEGIN - return geocode(NULL, $1); -END; -' LANGUAGE plpgsql; - -CREATE OR REPLACE FUNCTION geocode(REFCURSOR, VARCHAR) RETURNS REFCURSOR -AS ' -DECLARE - result REFCURSOR; - input VARCHAR; - parsed VARCHAR; - addressString VARCHAR; - address INTEGER; - directionPrefix VARCHAR; - streetName VARCHAR; - streetType VARCHAR; - directionSuffix VARCHAR; - location VARCHAR; - state VARCHAR; - zipCodeString VARCHAR; - zipCode INTEGER; - verbose BOOLEAN := TRUE; -BEGIN - IF verbose THEN - RAISE NOTICE ''geocode()''; - END IF; - -- Check inputs. - IF $1 IS NOT NULL THEN - result := $1; - END IF; - IF $2 IS NULL THEN - -- The address string is manditory. - RAISE EXCEPTION ''geocode() - No address string provided.''; - ELSE - input := $2; - END IF; - - -- Pass the input string into the address normalizer - parsed := normalize_address(input); - IF parsed IS NULL THEN - RAISE EXCEPTION ''geocode() - address string failed to parse.''; - END IF; - - addressString := split_part(parsed, '':'', 1); - directionPrefix := split_part(parsed, '':'', 2); - streetName := split_part(parsed, '':'', 3); - streetType := split_part(parsed, '':'', 4); - directionSuffix := split_part(parsed, '':'', 5); - location := split_part(parsed, '':'', 6); - state := split_part(parsed, '':'', 7); - zipCodeString := split_part(parsed, '':'', 8); - - -- Empty strings must be converted to nulls; - IF addressString = '''' THEN - addressString := NULL; - END IF; - IF directionPrefix = '''' THEN - directionPrefix := NULL; - END IF; - IF streetName = '''' THEN - streetName := NULL; - END IF; - IF streetType = '''' THEN - streetType := NULL; - END IF; - IF directionSuffix = '''' THEN - directionSuffix := NULL; - END IF; - IF location = '''' THEN - location := NULL; - END IF; - IF state = '''' THEN - state := NULL; - END IF; - IF zipCodeString = '''' THEN - zipCodeString := NULL; - END IF; - - -- address and zipCode must be integers - IF addressString IS NOT NULL THEN - address := to_number(addressString, ''99999999999''); - END IF; - IF zipCodeString IS NOT NULL THEN - zipCode := to_number(zipCodeString, ''99999''); - END IF; - - IF verbose THEN - RAISE NOTICE ''geocode() - address %'', address; - RAISE NOTICE ''geocode() - directionPrefix %'', directionPrefix; - RAISE NOTICE ''geocode() - streetName "%"'', streetName; - RAISE NOTICE ''geocode() - streetType %'', streetType; - RAISE NOTICE ''geocode() - directionSuffix %'', directionSuffix; - RAISE NOTICE ''geocode() - location "%"'', location; - RAISE NOTICE ''geocode() - state %'', state; - RAISE NOTICE ''geocode() - zipCode %'', zipCode; - END IF; - -- This is where any validation above the geocode_address functions would go. - - -- Call geocode_address - result := geocode_address(result, address, directionPrefix, streetName, - streetType, directionSuffix, location, state, zipCode); - RETURN result; -END; -' LANGUAGE plpgsql; - - - --- geocode(cursor, address, directionPrefix, streetName, --- streetTypeAbbreviation, directionSuffix, location, stateAbbreviation, --- zipCode) -CREATE OR REPLACE FUNCTION geocode_address(refcursor, INTEGER, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, INTEGER) RETURNS REFCURSOR -AS ' -DECLARE - result REFCURSOR; - address INTEGER; - directionPrefix VARCHAR; - streetName VARCHAR; - streetTypeAbbrev VARCHAR; - directionSuffix VARCHAR; - location VARCHAR; - stateAbbrev VARCHAR; - state VARCHAR; - zipCode INTEGER; - tempString VARCHAR; - tempInt VARCHAR; - locationPlaceExact BOOLEAN := FALSE; - locationPlaceFuzzy BOOLEAN := FALSE; - locationCountySubExact BOOLEAN := FALSE; - locationCountySubFuzzy BOOLEAN := FALSE; - verbose BOOLEAN := TRUE; -BEGIN - IF verbose THEN - RAISE NOTICE ''geocode_address()''; - END IF; - -- The first step is to determine what weve been given, and if its enough. - IF $1 IS NOT NULL THEN - -- The result was not provided. No matter, we can use an unnamed one. - result := $1; - END IF; - IF $2 IS NULL THEN - -- The address is manditory. - -- Without it, wed be wandering into strangers homes all the time. - RAISE EXCEPTION ''geocode_address() - No address provided!''; - ELSE - address := $2; - END IF; - IF $3 IS NOT NULL THEN - -- The direction prefix really isnt important. - -- It will be used for rating if provided. - directionPrefix := $3; - END IF; - IF $4 IS NULL THEN - -- A street name must be given. Think about it. - RAISE EXCEPTION ''geocode_address() - No street name provided!''; - ELSE - streetName := $4; - END IF; - IF $5 IS NOT NULL THEN - -- A street type will be used for rating if provided, but isnt required. - streetTypeAbbrev := $5; - END IF; - IF $6 IS NOT NULL THEN - -- Same as direction prefix, only later. - directionSuffix := $6; - END IF; - IF $7 IS NOT NULL THEN - -- Location is not needed iff a zip is given. The check occurs after - -- the geocode_address_zip call. - location := $7; - END IF; - IF $8 IS NULL THEN - -- State abbreviation is manditory. It is also assumed to be valid. - ELSE - stateAbbrev := $8; - END IF; - IF $9 IS NOT NULL THEN - -- Zip code is optional, but nice. - zipCode := $9; - END IF; - - -- The geocoding tables store the state name rather than the abbreviation. - -- We can validate the abbreviation while retrieving the name. - IF stateAbbrev IS NOT NULL THEN - SELECT INTO state name FROM state_lookup - WHERE state_lookup.abbrev = stateAbbrev; - IF state IS NULL THEN - END IF; - END IF; - - IF zipCode IS NOT NULL THEN - IF verbose THEN - RAISE NOTICE ''geocode_address() - calling geocode_address_zip()''; - END IF; - -- If the zip code is given, it is the most useful way to narrow the - -- search. We will try it first, and if no results match, we will move - -- on to a location search. There is no fuzzy searching on zip codes. - result := geocode_address_zip(result, address, directionPrefix, streetName, - streetTypeAbbrev, directionSuffix, zipCode); - IF result IS NOT NULL THEN - RETURN result; - ELSE - result := $1; - END IF; - END IF; - -- After now, the location becomes manditory. - IF location IS NOT NULL THEN - -- location may be useful, it may not. The first step is to determine if - -- there are any potenial matches in the place and countysub fields. - -- This is done against the lookup tables, and will save us time on much - -- larger queries if they dont match. - IF verbose THEN - RAISE NOTICE ''geocode_address() - calling location_extract_place_*()''; - END IF; - tempString := location_extract_place_exact(location, stateAbbrev); - IF tempString IS NOT NULL THEN - locationPlaceExact := TRUE; - ELSE - locationPlaceExact := FALSE; - END IF; - tempString := location_extract_place_fuzzy(location, stateAbbrev); - IF tempString IS NOT NULL THEN - locationPlaceFuzzy := true; - ELSE - locationPlaceFuzzy := false; - END IF; - IF verbose THEN - RAISE NOTICE ''geocode_address() - calling location_extract_countysub_*()''; - END IF; - tempString := location_extract_countysub_exact(location, stateAbbrev); - IF tempString IS NOT NULL THEN - locationCountySubExact := TRUE; - ELSE - locationCountySubExact := FALSE; - END IF; - tempString := location_extract_countysub_fuzzy(location, stateAbbrev); - IF tempString IS NOT NULL THEN - locationCountySubFuzzy := true; - ELSE - locationCountySubFuzzy := false; - END IF; - END IF; - IF locationPlaceExact THEN - IF verbose THEN - RAISE NOTICE ''geocode_address() - calling geocode_address_place_exact()''; - END IF; - result := geocode_address_place_exact(result, address, directionPrefix, - streetName, streetTypeAbbrev, directionSuffix, location, state); - IF result IS NOT NULL THEN - RETURN result; - ELSE - result := $1; - END IF; - END IF; - IF locationCountySubExact THEN - IF verbose THEN - RAISE NOTICE ''geocode_address() - calling geocode_address_countysub_exact()''; - END IF; - result := geocode_address_countysub_exact(result, address, directionPrefix, - streetName, streetTypeAbbrev, directionSuffix, location, state); - IF result IS NOT NULL THEN - RETURN result; - ELSE - result := $1; - END IF; - END IF; - IF locationPlaceFuzzy THEN - IF verbose THEN - RAISE NOTICE ''geocode_address() - calling geocode_address_place_fuzzy()''; - END IF; - result := geocode_address_place_fuzzy(result, address, directionPrefix, - streetName, streetTypeAbbrev, directionSuffix, location, state); - IF result IS NOT NULL THEN - RETURN result; - ELSE - result := $1; - END IF; - END IF; - IF locationCountySubFuzzy THEN - IF verbose THEN - RAISE NOTICE ''geocode_address() - calling geocode_address_countysub_fuzzy()''; - END IF; - result := geocode_address_countysub_fuzzy(result, address, directionPrefix, - streetName, streetTypeAbbrev, directionSuffix, location, state); - IF result IS NOT NULL THEN - RETURN result; - ELSE - result := $1; - END IF; - END IF; - IF state IS NOT NULL THEN - IF verbose THEN - RAISE NOTICE ''geocode_address() - calling geocode_address_state()''; - END IF; - result := geocode_address_state(result, address, directionPrefix, - streetName, streetTypeAbbrev, directionSuffix, state); - IF result IS NOT NULL THEN - RETURN result; - ELSE - result := $1; - END IF; - END IF; - RETURN NULL; -END; -' LANGUAGE plpgsql; - - - -CREATE OR REPLACE FUNCTION geocode_address_countysub_exact(REFCURSOR, INTEGER, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR) RETURNS REFCURSOR -AS ' -DECLARE - result REFCURSOR; - address INTEGER; - directionPrefix VARCHAR; - streetName VARCHAR; - streetTypeAbbrev VARCHAR; - directionSuffix VARCHAR; - state VARCHAR; - location VARCHAR; - tempString VARCHAR; - tempInt VARCHAR; - verbose BOOLEAN := TRUE; -BEGIN - IF verbose THEN - RAISE NOTICE ''geocode_address_countysub_exact()''; - END IF; - -- The first step is to determine what weve been given, and if its enough. - IF $1 IS NOT NULL THEN - -- The cursor was not provided. No matter, we can use an unnamed one. - result := $1; - END IF; - IF $2 IS NULL THEN - -- The address is manditory. - -- Without it, wed be wandering into strangers homes all the time. - RAISE EXCEPTION ''geocode_address_countysub_exact() - No address provided!''; - ELSE - address := $2; - END IF; - IF $3 IS NOT NULL THEN - -- The direction prefix really isnt important. - -- It will be used for rating if provided. - directionPrefix := $3; - END IF; - IF $4 IS NULL THEN - -- A street name must be given. Think about it. - RAISE EXCEPTION ''geocode_address_countysub_exact() - No street name provided!''; - ELSE - streetName := $4; - END IF; - IF $5 IS NOT NULL THEN - -- A street type will be used for rating if provided, but isnt required. - streetTypeAbbrev := $5; - END IF; - IF $6 IS NOT NULL THEN - -- Same as direction prefix, only later. - directionSuffix := $6; - END IF; - IF $7 IS NULL THEN - -- location is manditory. This is the location geocoder after all. - RAISE EXCEPTION ''geocode_address_countysub_exact() - No location provided!''; - ELSE - location := $7; - END IF; - IF $8 IS NOT NULL THEN - state := $8; - END IF; - - -- Check to see if the road name can be matched. - IF state IS NOT NULL THEN - SELECT INTO tempInt count(*) FROM tiger_geocode_roads - WHERE location = tiger_geocode_roads.cousub - AND soundex(streetName) = soundex(tiger_geocode_roads.fename) - AND state = tiger_geocode_roads.state; - ELSE - SELECT INTO tempInt count(*) FROM tiger_geocode_roads - WHERE location = tiger_geocode_roads.cousub - AND soundex(streetName) = soundex(tiger_geocode_roads.fename); - END IF; - IF verbose THEN - RAISE NOTICE ''geocode_address_countysub_exact() - % potential matches.'', tempInt; - END IF; - IF tempInt = 0 THEN - RETURN NULL; - ELSE - -- The road name matches, now we check to see if the addresses match - IF state IS NOT NULL THEN - SELECT INTO tempInt count(*) - FROM ( - SELECT *, rate_attributes(directionPrefix, tiger_geocode_roads.fedirp, - streetName, tiger_geocode_roads.fename, streetTypeAbbrev, - tiger_geocode_roads.fetype, directionSuffix, - tiger_geocode_roads.fedirs) as rating - FROM tiger_geocode_roads - WHERE location = tiger_geocode_roads.cousub - AND soundex(streetName) = soundex(tiger_geocode_roads.fename) - AND state = tiger_geocode_roads.state - ) AS subquery, tiger_geocode_join, roads_local - WHERE includes_address(address, roads_local.fraddl, roads_local.toaddl, - roads_local.fraddr, roads_local.toaddr) - AND subquery.id = tiger_geocode_join.id - AND tiger_geocode_join.tlid = roads_local.tlid; - ELSE - SELECT INTO tempInt count(*) - FROM ( - SELECT *, rate_attributes(directionPrefix, tiger_geocode_roads.fedirp, - streetName, tiger_geocode_roads.fename, streetTypeAbbrev, - tiger_geocode_roads.fetype, directionSuffix, - tiger_geocode_roads.fedirs) as rating - FROM tiger_geocode_roads - WHERE location = tiger_geocode_roads.cousub - AND soundex(streetName) = soundex(tiger_geocode_roads.fename) - ) AS subquery, tiger_geocode_join, roads_local - WHERE includes_address(address, roads_local.fraddl, roads_local.toaddl, - roads_local.fraddr, roads_local.toaddr) - AND subquery.id = tiger_geocode_join.id - AND tiger_geocode_join.tlid = roads_local.tlid; - END IF; - IF verbose THEN - RAISE NOTICE ''geocode_address_countysub_exact() - % address matches.'', tempInt; - END IF; - IF tempInt = 0 THEN - return NULL; - ELSE - IF state IS NOT NULL THEN - OPEN result FOR - SELECT *, interpolate_from_address(address, roads_local.fraddl, - roads_local.toaddl, roads_local.fraddr, roads_local.toaddr, - roads_local.geom) as address_geom - FROM ( - SELECT *, rate_attributes(directionPrefix, tiger_geocode_roads.fedirp, - streetName, tiger_geocode_roads.fename, streetTypeAbbrev, - tiger_geocode_roads.fetype, directionSuffix, - tiger_geocode_roads.fedirs, location, - tiger_geocode_roads.cousub) as rating - FROM tiger_geocode_roads - WHERE location = tiger_geocode_roads.cousub - AND soundex(streetName) = soundex(tiger_geocode_roads.fename) - AND state = tiger_geocode_roads.state - ) AS subquery, tiger_geocode_join, roads_local - WHERE includes_address(address, roads_local.fraddl, roads_local.toaddl, - roads_local.fraddr, roads_local.toaddr) - AND subquery.id = tiger_geocode_join.id - AND tiger_geocode_join.tlid = roads_local.tlid - ORDER BY subquery.rating; - return result; - ELSE - OPEN result FOR - SELECT *, interpolate_from_address(address, roads_local.fraddl, - roads_local.toaddl, roads_local.fraddr, roads_local.toaddr, - roads_local.geom) as address_geom - FROM ( - SELECT *, rate_attributes(directionPrefix, tiger_geocode_roads.fedirp, - streetName, tiger_geocode_roads.fename, streetTypeAbbrev, - tiger_geocode_roads.fetype, directionSuffix, - tiger_geocode_roads.fedirs, location, - tiger_geocode_roads.cousub) as rating - FROM tiger_geocode_roads - WHERE location = tiger_geocode_roads.cousub - AND soundex(streetName) = soundex(tiger_geocode_roads.fename) - ) AS subquery, tiger_geocode_join, roads_local - WHERE includes_address(address, roads_local.fraddl, roads_local.toaddl, - roads_local.fraddr, roads_local.toaddr) - AND subquery.id = tiger_geocode_join.id - AND tiger_geocode_join.tlid = roads_local.tlid - ORDER BY subquery.rating; - RETURN result; - END IF; - END IF; - END IF; -END; -' LANGUAGE plpgsql; - - -CREATE OR REPLACE FUNCTION geocode_address_countysub_fuzzy(REFCURSOR, INTEGER, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR) RETURNS REFCURSOR -AS ' -DECLARE - result REFCURSOR; - address INTEGER; - directionPrefix VARCHAR; - streetName VARCHAR; - streetTypeAbbrev VARCHAR; - directionSuffix VARCHAR; - state VARCHAR; - location VARCHAR; - tempString VARCHAR; - tempInt VARCHAR; - verbose BOOLEAN := TRUE; -BEGIN - IF verbose THEN - RAISE NOTICE ''geocode_address_countysub_fuzzy()''; - END IF; - -- The first step is to determine what weve been given, and if its enough. - IF $1 IS NOT NULL THEN - -- The cursor was not provided. No matter, we can use an unnamed one. - result := $1; - END IF; - IF $2 IS NULL THEN - -- The address is manditory. - -- Without it, wed be wandering into strangers homes all the time. - RAISE EXCEPTION ''geocode_address_countysub_fuzzy() - No address provided!''; - ELSE - address := $2; - END IF; - IF $3 IS NOT NULL THEN - -- The direction prefix really isnt important. - -- It will be used for rating if provided. - directionPrefix := $3; - END IF; - IF $4 IS NULL THEN - -- A street name must be given. Think about it. - RAISE EXCEPTION ''geocode_address_countysub_fuzzy() - No street name provided!''; - ELSE - streetName := $4; - END IF; - IF $5 IS NOT NULL THEN - -- A street type will be used for rating if provided, but isnt required. - streetTypeAbbrev := $5; - END IF; - IF $6 IS NOT NULL THEN - -- Same as direction prefix, only later. - directionSuffix := $6; - END IF; - IF $7 IS NULL THEN - -- location is manditory. This is the location geocoder after all. - RAISE EXCEPTION ''geocode_address_countysub_fuzzy() - No location provided!''; - ELSE - location := $7; - END IF; - IF $8 IS NOT NULL THEN - state := $8; - END IF; - - -- Check to see if the road name can be matched. - IF state IS NOT NULL THEN - SELECT INTO tempInt count(*) FROM tiger_geocode_roads - WHERE soundex(location) = soundex(tiger_geocode_roads.cousub) - AND soundex(streetName) = soundex(tiger_geocode_roads.fename) - AND state = tiger_geocode_roads.state; - ELSE - SELECT INTO tempInt count(*) FROM tiger_geocode_roads - WHERE soundex(location) = soundex(tiger_geocode_roads.cousub) - AND soundex(streetName) = soundex(tiger_geocode_roads.fename); - END IF; - IF verbose THEN - RAISE NOTICE ''geocode_address_countysub_fuzzy() - % potential matches.'', tempInt; - END IF; - IF tempInt = 0 THEN - RETURN NULL; - ELSE - -- The road name matches, now we check to see if the addresses match - IF state IS NOT NULL THEN - SELECT INTO tempInt count(*) - FROM ( - SELECT *, rate_attributes(directionPrefix, tiger_geocode_roads.fedirp, - streetName, tiger_geocode_roads.fename, streetTypeAbbrev, - tiger_geocode_roads.fetype, directionSuffix, - tiger_geocode_roads.fedirs) as rating - FROM tiger_geocode_roads - WHERE soundex(location) = soundex(tiger_geocode_roads.cousub) - AND soundex(streetName) = soundex(tiger_geocode_roads.fename) - AND state = tiger_geocode_roads.state - ) AS subquery, tiger_geocode_join, roads_local - WHERE includes_address(address, roads_local.fraddl, roads_local.toaddl, - roads_local.fraddr, roads_local.toaddr) - AND subquery.id = tiger_geocode_join.id - AND tiger_geocode_join.tlid = roads_local.tlid; - ELSE - SELECT INTO tempInt count(*) - FROM ( - SELECT *, rate_attributes(directionPrefix, tiger_geocode_roads.fedirp, - streetName, tiger_geocode_roads.fename, streetTypeAbbrev, - tiger_geocode_roads.fetype, directionSuffix, - tiger_geocode_roads.fedirs) as rating - FROM tiger_geocode_roads - WHERE soundex(location) = soundex(tiger_geocode_roads.cousub) - AND soundex(streetName) = soundex(tiger_geocode_roads.fename) - ) AS subquery, tiger_geocode_join, roads_local - WHERE includes_address(address, roads_local.fraddl, roads_local.toaddl, - roads_local.fraddr, roads_local.toaddr) - AND subquery.id = tiger_geocode_join.id - AND tiger_geocode_join.tlid = roads_local.tlid; - END IF; - IF verbose THEN - RAISE NOTICE ''geocode_address_countysub_fuzzy() - % address matches.'', tempInt; - END IF; - IF tempInt = 0 THEN - return NULL; - ELSE - IF state IS NOT NULL THEN - OPEN result FOR - SELECT *, interpolate_from_address(address, roads_local.fraddl, - roads_local.toaddl, roads_local.fraddr, roads_local.toaddr, - roads_local.geom) as address_geom - FROM ( - SELECT *, rate_attributes(directionPrefix, tiger_geocode_roads.fedirp, - streetName, tiger_geocode_roads.fename, streetTypeAbbrev, - tiger_geocode_roads.fetype, directionSuffix, - tiger_geocode_roads.fedirs, location, - tiger_geocode_roads.cousub) as rating - FROM tiger_geocode_roads - WHERE soundex(location) = soundex(tiger_geocode_roads.cousub) - AND soundex(streetName) = soundex(tiger_geocode_roads.fename) - AND state = tiger_geocode_roads.state - ) AS subquery, tiger_geocode_join, roads_local - WHERE includes_address(address, roads_local.fraddl, roads_local.toaddl, - roads_local.fraddr, roads_local.toaddr) - AND subquery.id = tiger_geocode_join.id - AND tiger_geocode_join.tlid = roads_local.tlid - ORDER BY subquery.rating; - return result; - ELSE - OPEN result FOR - SELECT *, interpolate_from_address(address, roads_local.fraddl, - roads_local.toaddl, roads_local.fraddr, roads_local.toaddr, - roads_local.geom) as address_geom - FROM ( - SELECT *, rate_attributes(directionPrefix, tiger_geocode_roads.fedirp, - streetName, tiger_geocode_roads.fename, streetTypeAbbrev, - tiger_geocode_roads.fetype, directionSuffix, - tiger_geocode_roads.fedirs, location, - tiger_geocode_roads.cousub) as rating - FROM tiger_geocode_roads - WHERE soundex(location) = soundex(tiger_geocode_roads.cousub) - AND soundex(streetName) = soundex(tiger_geocode_roads.fename) - ) AS subquery, tiger_geocode_join, roads_local - WHERE includes_address(address, roads_local.fraddl, roads_local.toaddl, - roads_local.fraddr, roads_local.toaddr) - AND subquery.id = tiger_geocode_join.id - AND tiger_geocode_join.tlid = roads_local.tlid - ORDER BY subquery.rating; - RETURN result; - END IF; - END IF; - END IF; -END; -' LANGUAGE plpgsql; - - -CREATE OR REPLACE FUNCTION geocode_address_place_exact(REFCURSOR, INTEGER, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR) RETURNS REFCURSOR -AS ' -DECLARE - result REFCURSOR; - address INTEGER; - directionPrefix VARCHAR; - streetName VARCHAR; - streetTypeAbbrev VARCHAR; - directionSuffix VARCHAR; - state VARCHAR; - location VARCHAR; - tempString VARCHAR; - tempInt VARCHAR; - verbose BOOLEAN := TRUE; -BEGIN - IF verbose THEN - RAISE NOTICE ''geocode_address_place_exact()''; - END IF; - -- The first step is to determine what weve been given, and if its enough. - IF $1 IS NOT NULL THEN - -- The cursor was not provided. No matter, we can use an unnamed one. - result := $1; - END IF; - IF $2 IS NULL THEN - -- The address is manditory. - -- Without it, wed be wandering into strangers homes all the time. - RAISE EXCEPTION ''geocode_address_place_exact() - No address provided!''; - ELSE - address := $2; - END IF; - IF $3 IS NOT NULL THEN - -- The direction prefix really isnt important. - -- It will be used for rating if provided. - directionPrefix := $3; - END IF; - IF $4 IS NULL THEN - -- A street name must be given. Think about it. - RAISE EXCEPTION ''geocode_address_place_exact() - No street name provided!''; - ELSE - streetName := $4; - END IF; - IF $5 IS NOT NULL THEN - -- A street type will be used for rating if provided, but isnt required. - streetTypeAbbrev := $5; - END IF; - IF $6 IS NOT NULL THEN - -- Same as direction prefix, only later. - directionSuffix := $6; - END IF; - IF $7 IS NULL THEN - -- location is manditory. This is the location geocoder after all. - RAISE EXCEPTION ''geocode_address_place_exact() - No location provided!''; - ELSE - location := $7; - END IF; - IF $8 IS NOT NULL THEN - state := $8; - END IF; - - -- Check to see if the road name can be matched. - IF state IS NOT NULL THEN - SELECT INTO tempInt count(*) FROM tiger_geocode_roads - WHERE location = tiger_geocode_roads.place - AND soundex(streetName) = soundex(tiger_geocode_roads.fename) - AND state = tiger_geocode_roads.state; - ELSE - SELECT INTO tempInt count(*) FROM tiger_geocode_roads - WHERE location = tiger_geocode_roads.place - AND soundex(streetName) = soundex(tiger_geocode_roads.fename); - END IF; - IF verbose THEN - RAISE NOTICE ''geocode_address_place_exact() - % potential matches.'', tempInt; - END IF; - IF tempInt = 0 THEN - RETURN NULL; - ELSE - -- The road name matches, now we check to see if the addresses match - IF state IS NOT NULL THEN - SELECT INTO tempInt count(*) - FROM ( - SELECT *, rate_attributes(directionPrefix, tiger_geocode_roads.fedirp, - streetName, tiger_geocode_roads.fename, streetTypeAbbrev, - tiger_geocode_roads.fetype, directionSuffix, - tiger_geocode_roads.fedirs) as rating - FROM tiger_geocode_roads - WHERE location = tiger_geocode_roads.place - AND soundex(streetName) = soundex(tiger_geocode_roads.fename) - AND state = tiger_geocode_roads.state - ) AS subquery, tiger_geocode_join, roads_local - WHERE includes_address(address, roads_local.fraddl, roads_local.toaddl, - roads_local.fraddr, roads_local.toaddr) - AND subquery.id = tiger_geocode_join.id - AND tiger_geocode_join.tlid = roads_local.tlid; - ELSE - SELECT INTO tempInt count(*) - FROM ( - SELECT *, rate_attributes(directionPrefix, tiger_geocode_roads.fedirp, - streetName, tiger_geocode_roads.fename, streetTypeAbbrev, - tiger_geocode_roads.fetype, directionSuffix, - tiger_geocode_roads.fedirs) as rating - FROM tiger_geocode_roads - WHERE location = tiger_geocode_roads.place - AND soundex(streetName) = soundex(tiger_geocode_roads.fename) - ) AS subquery, tiger_geocode_join, roads_local - WHERE includes_address(address, roads_local.fraddl, roads_local.toaddl, - roads_local.fraddr, roads_local.toaddr) - AND subquery.id = tiger_geocode_join.id - AND tiger_geocode_join.tlid = roads_local.tlid; - END IF; - IF verbose THEN - RAISE NOTICE ''geocode_address_place_exact() - % address matches.'', tempInt; - END IF; - IF tempInt = 0 THEN - return NULL; - ELSE - IF state IS NOT NULL THEN - OPEN result FOR - SELECT *, interpolate_from_address(address, roads_local.fraddl, - roads_local.toaddl, roads_local.fraddr, roads_local.toaddr, - roads_local.geom) as address_geom - FROM ( - SELECT *, rate_attributes(directionPrefix, tiger_geocode_roads.fedirp, - streetName, tiger_geocode_roads.fename, streetTypeAbbrev, - tiger_geocode_roads.fetype, directionSuffix, - tiger_geocode_roads.fedirs, location, - tiger_geocode_roads.place) as rating - FROM tiger_geocode_roads - WHERE location = tiger_geocode_roads.place - AND soundex(streetName) = soundex(tiger_geocode_roads.fename) - AND state = tiger_geocode_roads.state - ) AS subquery, tiger_geocode_join, roads_local - WHERE includes_address(address, roads_local.fraddl, roads_local.toaddl, - roads_local.fraddr, roads_local.toaddr) - AND subquery.id = tiger_geocode_join.id - AND tiger_geocode_join.tlid = roads_local.tlid - ORDER BY subquery.rating; - return result; - ELSE - OPEN result FOR - SELECT *, interpolate_from_address(address, roads_local.fraddl, - roads_local.toaddl, roads_local.fraddr, roads_local.toaddr, - roads_local.geom) as address_geom - FROM ( - SELECT *, rate_attributes(directionPrefix, tiger_geocode_roads.fedirp, - streetName, tiger_geocode_roads.fename, streetTypeAbbrev, - tiger_geocode_roads.fetype, directionSuffix, - tiger_geocode_roads.fedirs, location, - tiger_geocode_roads.place) as rating - FROM tiger_geocode_roads - WHERE location = tiger_geocode_roads.place - AND soundex(streetName) = soundex(tiger_geocode_roads.fename) - ) AS subquery, tiger_geocode_join, roads_local - WHERE includes_address(address, roads_local.fraddl, roads_local.toaddl, - roads_local.fraddr, roads_local.toaddr) - AND subquery.id = tiger_geocode_join.id - AND tiger_geocode_join.tlid = roads_local.tlid - ORDER BY subquery.rating; - RETURN result; - END IF; - END IF; - END IF; -END; -' LANGUAGE plpgsql; - - - -CREATE OR REPLACE FUNCTION geocode_address_place_fuzzy(REFCURSOR, INTEGER, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR) RETURNS REFCURSOR -AS ' -DECLARE - result REFCURSOR; - address INTEGER; - directionPrefix VARCHAR; - streetName VARCHAR; - streetTypeAbbrev VARCHAR; - directionSuffix VARCHAR; - state VARCHAR; - location VARCHAR; - tempString VARCHAR; - tempInt VARCHAR; - verbose BOOLEAN := TRUE; -BEGIN - IF verbose THEN - RAISE NOTICE ''geocode_address_place_fuzzy()''; - END IF; - -- The first step is to determine what weve been given, and if its enough. - IF $1 IS NOT NULL THEN - -- The cursor was not provided. No matter, we can use an unnamed one. - result := $1; - END IF; - IF $2 IS NULL THEN - -- The address is manditory. - -- Without it, wed be wandering into strangers homes all the time. - RAISE EXCEPTION ''geocode_address_place_fuzzy() - No address provided!''; - ELSE - address := $2; - END IF; - IF $3 IS NOT NULL THEN - -- The direction prefix really isnt important. - -- It will be used for rating if provided. - directionPrefix := $3; - END IF; - IF $4 IS NULL THEN - -- A street name must be given. Think about it. - RAISE EXCEPTION ''geocode_address_place_fuzzy() - No street name provided!''; - ELSE - streetName := $4; - END IF; - IF $5 IS NOT NULL THEN - -- A street type will be used for rating if provided, but isnt required. - streetTypeAbbrev := $5; - END IF; - IF $6 IS NOT NULL THEN - -- Same as direction prefix, only later. - directionSuffix := $6; - END IF; - IF $7 IS NULL THEN - -- location is manditory. This is the location geocoder after all. - RAISE EXCEPTION ''geocode_address_place_fuzzy() - No location provided!''; - ELSE - location := $7; - END IF; - IF $8 IS NOT NULL THEN - state := $8; - END IF; - - -- Check to see if the road name can be matched. - IF state IS NOT NULL THEN - SELECT INTO tempInt count(*) FROM tiger_geocode_roads - WHERE soundex(location) = soundex(tiger_geocode_roads.place) - AND soundex(streetName) = soundex(tiger_geocode_roads.fename) - AND state = tiger_geocode_roads.state; - ELSE - SELECT INTO tempInt count(*) FROM tiger_geocode_roads - WHERE soundex(location) = soundex(tiger_geocode_roads.place) - AND soundex(streetName) = soundex(tiger_geocode_roads.fename); - END IF; - IF verbose THEN - RAISE NOTICE ''geocode_address_place_fuzzy() - % potential matches.'', tempInt; - END IF; - IF tempInt = 0 THEN - RETURN NULL; - ELSE - -- The road name matches, now we check to see if the addresses match - IF state IS NOT NULL THEN - SELECT INTO tempInt count(*) - FROM ( - SELECT *, rate_attributes(directionPrefix, tiger_geocode_roads.fedirp, - streetName, tiger_geocode_roads.fename, streetTypeAbbrev, - tiger_geocode_roads.fetype, directionSuffix, - tiger_geocode_roads.fedirs) as rating - FROM tiger_geocode_roads - WHERE soundex(location) = soundex(tiger_geocode_roads.place) - AND soundex(streetName) = soundex(tiger_geocode_roads.fename) - AND state = tiger_geocode_roads.state - ) AS subquery, tiger_geocode_join, roads_local - WHERE includes_address(address, roads_local.fraddl, roads_local.toaddl, - roads_local.fraddr, roads_local.toaddr) - AND subquery.id = tiger_geocode_join.id - AND tiger_geocode_join.tlid = roads_local.tlid; - ELSE - SELECT INTO tempInt count(*) - FROM ( - SELECT *, rate_attributes(directionPrefix, tiger_geocode_roads.fedirp, - streetName, tiger_geocode_roads.fename, streetTypeAbbrev, - tiger_geocode_roads.fetype, directionSuffix, - tiger_geocode_roads.fedirs) as rating - FROM tiger_geocode_roads - WHERE soundex(location) = soundex(tiger_geocode_roads.place) - AND soundex(streetName) = soundex(tiger_geocode_roads.fename) - ) AS subquery, tiger_geocode_join, roads_local - WHERE includes_address(address, roads_local.fraddl, roads_local.toaddl, - roads_local.fraddr, roads_local.toaddr) - AND subquery.id = tiger_geocode_join.id - AND tiger_geocode_join.tlid = roads_local.tlid; - END IF; - IF verbose THEN - RAISE NOTICE ''geocode_address_place_fuzzy() - % address matches.'', tempInt; - END IF; - IF tempInt = 0 THEN - return NULL; - ELSE - IF state IS NOT NULL THEN - OPEN result FOR - SELECT *, interpolate_from_address(address, roads_local.fraddl, - roads_local.toaddl, roads_local.fraddr, roads_local.toaddr, - roads_local.geom) as address_geom - FROM ( - SELECT *, rate_attributes(directionPrefix, tiger_geocode_roads.fedirp, - streetName, tiger_geocode_roads.fename, streetTypeAbbrev, - tiger_geocode_roads.fetype, directionSuffix, - tiger_geocode_roads.fedirs, location, - tiger_geocode_roads.place) as rating - FROM tiger_geocode_roads - WHERE soundex(location) = soundex(tiger_geocode_roads.place) - AND soundex(streetName) = soundex(tiger_geocode_roads.fename) - AND state = tiger_geocode_roads.state - ) AS subquery, tiger_geocode_join, roads_local - WHERE includes_address(address, roads_local.fraddl, roads_local.toaddl, - roads_local.fraddr, roads_local.toaddr) - AND subquery.id = tiger_geocode_join.id - AND tiger_geocode_join.tlid = roads_local.tlid - ORDER BY subquery.rating; - return result; - ELSE - OPEN result FOR - SELECT *, interpolate_from_address(address, roads_local.fraddl, - roads_local.toaddl, roads_local.fraddr, roads_local.toaddr, - roads_local.geom) as address_geom - FROM ( - SELECT *, rate_attributes(directionPrefix, tiger_geocode_roads.fedirp, - streetName, tiger_geocode_roads.fename, streetTypeAbbrev, - tiger_geocode_roads.fetype, directionSuffix, - tiger_geocode_roads.fedirs, location, - tiger_geocode_roads.place) as rating - FROM tiger_geocode_roads - WHERE soundex(location) = soundex(tiger_geocode_roads.place) - AND soundex(streetName) = soundex(tiger_geocode_roads.fename) - ) AS subquery, tiger_geocode_join, roads_local - WHERE includes_address(address, roads_local.fraddl, roads_local.toaddl, - roads_local.fraddr, roads_local.toaddr) - AND subquery.id = tiger_geocode_join.id - AND tiger_geocode_join.tlid = roads_local.tlid - ORDER BY subquery.rating; - RETURN result; - END IF; - END IF; - END IF; -END; -' LANGUAGE plpgsql; - - - -CREATE OR REPLACE FUNCTION geocode_address_state(REFCURSOR, INTEGER, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR) RETURNS REFCURSOR -AS ' -DECLARE - result REFCURSOR; - address INTEGER; - directionPrefix VARCHAR; - streetName VARCHAR; - streetTypeAbbrev VARCHAR; - directionSuffix VARCHAR; - state VARCHAR; - tempString VARCHAR; - tempInt VARCHAR; - verbose BOOLEAN := TRUE; -BEGIN - IF verbose THEN - RAISE NOTICE ''geocode_address_state()''; - END IF; - -- The first step is to determine what weve been given, and if its enough. - IF $1 IS NOT NULL THEN - -- The cursor was not provided. No matter, we can use an unnamed one. - result := $1; - END IF; - IF $2 IS NULL THEN - -- The address is manditory. - -- Without it, wed be wandering into strangers homes all the time. - RAISE EXCEPTION ''geocode_address_state() - No address provided!''; - ELSE - address := $2; - END IF; - IF $3 IS NOT NULL THEN - -- The direction prefix really isnt important. - -- It will be used for rating if provided. - directionPrefix := $3; - END IF; - IF $4 IS NULL THEN - -- A street name must be given. Think about it. - RAISE EXCEPTION ''geocode_address_state() - No street name provided!''; - ELSE - streetName := $4; - END IF; - IF $5 IS NOT NULL THEN - -- A street type will be used for rating if provided, but isnt required. - streetTypeAbbrev := $5; - END IF; - IF $6 IS NOT NULL THEN - -- Same as direction prefix, only later. - directionSuffix := $6; - END IF; - IF $7 IS NOT NULL THEN - state := $7; - ELSE - -- It is unreasonable to do a country wide search. State is already - -- pretty sketchy. No state, no search. - RAISE EXCEPTION ''geocode_address_state() - No state name provided!''; - END IF; - - -- Check to see if the road name can be matched. - SELECT INTO tempInt count(*) FROM tiger_geocode_roads - WHERE soundex(streetName) = soundex(tiger_geocode_roads.fename) - AND state = tiger_geocode_roads.state; - IF verbose THEN - RAISE NOTICE ''geocode_address_state() - % potential matches.'', tempInt; - END IF; - IF tempInt = 0 THEN - RETURN NULL; - ELSE - -- The road name matches, now we check to see if the addresses match - SELECT INTO tempInt count(*) - FROM ( - SELECT *, rate_attributes(directionPrefix, tiger_geocode_roads.fedirp, - streetName, tiger_geocode_roads.fename, streetTypeAbbrev, - tiger_geocode_roads.fetype, directionSuffix, - tiger_geocode_roads.fedirs) as rating - FROM tiger_geocode_roads - WHERE soundex(streetName) = soundex(tiger_geocode_roads.fename) - AND state = tiger_geocode_roads.state - ) AS subquery, tiger_geocode_join, roads_local - WHERE includes_address(address, roads_local.fraddl, roads_local.toaddl, - roads_local.fraddr, roads_local.toaddr) - AND subquery.id = tiger_geocode_join.id - AND tiger_geocode_join.tlid = roads_local.tlid; - IF verbose THEN - RAISE NOTICE ''geocode_address_state() - % address matches.'', tempInt; - END IF; - IF tempInt = 0 THEN - return NULL; - ELSE - OPEN result FOR - SELECT *, interpolate_from_address(address, roads_local.fraddl, - roads_local.toaddl, roads_local.fraddr, roads_local.toaddr, - roads_local.geom) as address_geom - FROM ( - SELECT *, rate_attributes(directionPrefix, tiger_geocode_roads.fedirp, - streetName, tiger_geocode_roads.fename, streetTypeAbbrev, - tiger_geocode_roads.fetype, directionSuffix, - tiger_geocode_roads.fedirs) as rating - FROM tiger_geocode_roads - WHERE soundex(streetName) = soundex(tiger_geocode_roads.fename) - AND state = tiger_geocode_roads.state - ) AS subquery, tiger_geocode_join, roads_local - WHERE includes_address(address, roads_local.fraddl, roads_local.toaddl, - roads_local.fraddr, roads_local.toaddr) - AND subquery.id = tiger_geocode_join.id - AND tiger_geocode_join.tlid = roads_local.tlid - ORDER BY subquery.rating; - return result; - END IF; - END IF; -END; -' LANGUAGE plpgsql; - - - -CREATE OR REPLACE FUNCTION geocode_address_zip(REFCURSOR, INTEGER, VARCHAR, VARCHAR, VARCHAR, VARCHAR, INTEGER) RETURNS REFCURSOR -AS ' -DECLARE - result REFCURSOR; - address INTEGER; - directionPrefix VARCHAR; - streetName VARCHAR; - streetTypeAbbrev VARCHAR; - directionSuffix VARCHAR; - zipCode INTEGER; - tempString VARCHAR; - tempInt VARCHAR; - verbose BOOLEAN := TRUE; -BEGIN - IF verbose THEN - RAISE NOTICE ''geocode_address_zip()''; - END IF; - -- The first step is to determine what weve been given, and if its enough. - IF $1 IS NOT NULL THEN - -- The cursor was not provided. No matter, we can use an unnamed one. - result := $1; - END IF; - IF $2 IS NULL THEN - -- The address is manditory. - -- Without it, wed be wandering into strangers homes all the time. - RAISE EXCEPTION ''geocode_address_zip() - No address provided!''; - ELSE - address := $2; - END IF; - IF $3 IS NOT NULL THEN - -- The direction prefix really isnt important. - -- It will be used for rating if provided. - directionPrefix := $3; - END IF; - IF $4 IS NULL THEN - -- A street name must be given. Think about it. - RAISE EXCEPTION ''geocode_address_zip() - No street name provided!''; - ELSE - streetName := $4; - END IF; - IF $5 IS NOT NULL THEN - -- A street type will be used for rating if provided, but isnt required. - streetTypeAbbrev := $5; - END IF; - IF $6 IS NOT NULL THEN - -- Same as direction prefix, only later. - directionSuffix := $6; - END IF; - IF $7 IS NULL THEN - -- Zip code is not optional. - RAISE EXCEPTION ''geocode_address_zip() - No zip provided!''; - ELSE - zipCode := $7; - END IF; - - -- Check to see if the road name can be matched. - SELECT INTO tempInt count(*) FROM tiger_geocode_roads - WHERE zipCode = tiger_geocode_roads.zip - AND soundex(streetName) = soundex(tiger_geocode_roads.fename); - IF tempInt = 0 THEN - return NULL; - ELSE - -- The road name matches, now we check to see if the addresses match - SELECT INTO tempInt count(*) - FROM ( - SELECT *, rate_attributes(directionPrefix, tiger_geocode_roads.fedirp, - streetName, tiger_geocode_roads.fename, streetTypeAbbrev, - tiger_geocode_roads.fetype, directionSuffix, - tiger_geocode_roads.fedirs) as rating - FROM tiger_geocode_roads - WHERE zipCode = tiger_geocode_roads.zip - AND soundex(streetName) = soundex(tiger_geocode_roads.fename) - ) AS subquery, tiger_geocode_join, roads_local - WHERE includes_address(address, roads_local.fraddl, roads_local.toaddl, - roads_local.fraddr, roads_local.toaddr) - AND subquery.id = tiger_geocode_join.id - AND tiger_geocode_join.tlid = roads_local.tlid; - IF tempInt = 0 THEN - return NULL; - ELSE - OPEN result FOR - SELECT *, interpolate_from_address(address, roads_local.fraddl, - roads_local.toaddl, roads_local.fraddr, roads_local.toaddr, - roads_local.geom) as address_geom - FROM ( - SELECT *, rate_attributes(directionPrefix, tiger_geocode_roads.fedirp, - streetName, tiger_geocode_roads.fename, streetTypeAbbrev, - tiger_geocode_roads.fetype, directionSuffix, - tiger_geocode_roads.fedirs) as rating - FROM tiger_geocode_roads - WHERE zipCode = tiger_geocode_roads.zip - AND soundex(streetName) = soundex(tiger_geocode_roads.fename) - ) AS subquery, tiger_geocode_join, roads_local - WHERE includes_address(address, roads_local.fraddl, roads_local.toaddl, - roads_local.fraddr, roads_local.toaddr) - AND subquery.id = tiger_geocode_join.id - AND tiger_geocode_join.tlid = roads_local.tlid - ORDER BY subquery.rating; - return result; - END IF; - END IF; -END; -' LANGUAGE plpgsql; - - - --- Returns a string consisting of the last N words. Words are allowed --- to be seperated only by spaces, but multiple spaces between --- words are allowed. Words must be alphanumberic. --- If more words are requested than exist, the full input string is --- returned. -CREATE OR REPLACE FUNCTION get_last_words(VARCHAR, INTEGER) RETURNS VARCHAR -AS ' -DECLARE - inputString VARCHAR; - tempString VARCHAR; - count VARCHAR; - result VARCHAR := ''''; -BEGIN - IF $1 IS NULL THEN - return NULL; - ELSE - inputString := $1; - END IF; - IF $2 IS NULL THEN - RAISE EXCEPTION ''get_last_words() - word count is null!''; - ELSE - count := $2; - END IF; - FOR i IN 1..count LOOP - tempString := substring(inputString from ''((?: )+[a-zA-Z0-9_]*)'' || result || ''$''); - IF tempString IS NULL THEN - return inputString; - END IF; - result := tempString || result; - END LOOP; - result := trim(both from result); - return result; -END; -' LANGUAGE plpgsql; - - - --- This function converts the string addresses to integers and passes them --- to the other includes_address function. -CREATE OR REPLACE FUNCTION includes_address(INTEGER, VARCHAR, VARCHAR, VARCHAR, VARCHAR) RETURNS BOOLEAN -AS ' -DECLARE - given_address INTEGER; - addr1 INTEGER; - addr2 INTEGER; - addr3 INTEGER; - addr4 INTEGER; - result BOOLEAN; -BEGIN - given_address = $1; - addr1 = to_number($2, ''999999''); - addr2 = to_number($3, ''999999''); - addr3 = to_number($4, ''999999''); - addr4 = to_number($5, ''999999''); - result = includes_address(given_address, addr1, addr2, addr3, addr4); - RETURN result; -END -' LANGUAGE plpgsql; - - - --- This function requires the addresses to be grouped, such that the second and --- third arguments are from one side of the street, and the fourth and fifth --- from the other. -CREATE OR REPLACE FUNCTION includes_address(INTEGER, INTEGER, INTEGER, INTEGER, INTEGER) RETURNS BOOLEAN -AS ' -DECLARE - given_address INTEGER; - addr1 INTEGER; - addr2 INTEGER; - addr3 INTEGER; - addr4 INTEGER; - lmaxaddr INTEGER := -1; - rmaxaddr INTEGER := -1; - lminaddr INTEGER := -1; - rminaddr INTEGER := -1; - maxaddr INTEGER := -1; - minaddr INTEGER := -1; -BEGIN - IF $1 IS NULL THEN - RAISE EXCEPTION ''includes_address() - local address is NULL!''; - ELSE - given_address := $1; - END IF; - - IF $2 IS NOT NULL THEN - addr1 := $2; - maxaddr := addr1; - minaddr := addr1; - lmaxaddr := addr1; - lminaddr := addr1; - END IF; - - IF $3 IS NOT NULL THEN - addr2 := $3; - IF addr2 < minaddr OR minaddr = -1 THEN - minaddr := addr2; - END IF; - IF addr2 > maxaddr OR maxaddr = -1 THEN - maxaddr := addr2; - END IF; - IF addr2 > lmaxaddr OR lmaxaddr = -1 THEN - lmaxaddr := addr2; - END IF; - IF addr2 < lminaddr OR lminaddr = -1 THEN - lminaddr := addr2; - END IF; - END IF; - - IF $4 IS NOT NULL THEN - addr3 := $4; - IF addr3 < minaddr OR minaddr = -1 THEN - minaddr := addr3; - END IF; - IF addr3 > maxaddr OR maxaddr = -1 THEN - maxaddr := addr3; - END IF; - rmaxaddr := addr3; - rminaddr := addr3; - END IF; - - IF $5 IS NOT NULL THEN - addr4 := $5; - IF addr4 < minaddr OR minaddr = -1 THEN - minaddr := addr4; - END IF; - IF addr4 > maxaddr OR maxaddr = -1 THEN - maxaddr := addr4; - END IF; - IF addr4 > rmaxaddr OR rmaxaddr = -1 THEN - rmaxaddr := addr4; - END IF; - IF addr4 < rminaddr OR rminaddr = -1 THEN - rminaddr := addr4; - END IF; - END IF; - - IF minaddr = -1 OR maxaddr = -1 THEN - -- No addresses were non-null, return FALSE (arbitrary) - RETURN FALSE; - ELSIF given_address >= minaddr AND given_address <= maxaddr THEN - -- The address is within the given range - IF given_address >= lminaddr AND given_address <= lmaxaddr THEN - -- This checks to see if the address is on this side of the - -- road, ie if the address is even, the street range must be even - IF (given_address % 2) = (lminaddr % 2) - OR (given_address % 2) = (lmaxaddr % 2) THEN - RETURN TRUE; - END IF; - END IF; - IF given_address >= rminaddr AND given_address <= rmaxaddr THEN - -- See above - IF (given_address % 2) = (rminaddr % 2) - OR (given_address % 2) = (rmaxaddr % 2) THEN - RETURN TRUE; - END IF; - END IF; - END IF; - -- The address is not within the range - RETURN FALSE; -END; - -' LANGUAGE plpgsql; - - - --- This function converts string addresses to integers and passes them to --- the other interpolate_from_address function. -CREATE OR REPLACE FUNCTION interpolate_from_address(INTEGER, VARCHAR, VARCHAR, VARCHAR, VARCHAR, GEOMETRY) RETURNS GEOMETRY -AS ' -DECLARE - given_address INTEGER; - addr1 INTEGER; - addr2 INTEGER; - addr3 INTEGER; - addr4 INTEGER; - road GEOMETRY; - result GEOMETRY; -BEGIN - given_address := $1; - addr1 := to_number($2, ''999999''); - addr2 := to_number($3, ''999999''); - addr3 := to_number($4, ''999999''); - addr4 := to_number($5, ''999999''); - road := $6; - result = interpolate_from_address(given_address, addr1, addr2, addr3, addr4, road); - RETURN result; -END -' LANGUAGE plpgsql; - --- interpolate_from_address(local_address, from_address_l, to_address_l, from_address_r, to_address_r, local_road) --- This function returns a point along the given geometry (must be linestring) --- corresponding to the given address. If the given address is not within --- the address range of the road, null is returned. --- This function requires that the address be grouped, such that the second and --- third arguments are from one side of the street, while the fourth and --- fifth are from the other. -CREATE OR REPLACE FUNCTION interpolate_from_address(INTEGER, INTEGER, INTEGER, INTEGER, INTEGER, GEOMETRY) RETURNS GEOMETRY -AS ' -DECLARE - given_address INTEGER; - lmaxaddr INTEGER := -1; - rmaxaddr INTEGER := -1; - lminaddr INTEGER := -1; - rminaddr INTEGER := -1; - lfrgreater BOOLEAN; - rfrgreater BOOLEAN; - frgreater BOOLEAN; - addrwidth INTEGER; - part DOUBLE PRECISION; - road GEOMETRY; - result GEOMETRY; -BEGIN - IF $1 IS NULL THEN - RAISE EXCEPTION ''interpolate_from_address() - local address is NULL!''; - ELSE - given_address := $1; - END IF; - - IF $6 IS NULL THEN - RAISE EXCEPTION ''interpolate_from_address() - local road is NULL!''; - ELSE - IF geometrytype($6) = ''LINESTRING'' THEN - road := $6; - ELSIF geometrytype($6) = ''MULTILINESTRING'' THEN - road := geometryn($6,1); - ELSE - RAISE EXCEPTION ''interpolate_from_address() - local road is not a line!''; - END IF; - END IF; - - IF $2 IS NOT NULL THEN - lfrgreater := TRUE; - lmaxaddr := $2; - lminaddr := $2; - END IF; - - IF $3 IS NOT NULL THEN - IF $3 > lmaxaddr OR lmaxaddr = -1 THEN - lmaxaddr := $3; - lfrgreater := FALSE; - END IF; - IF $3 < lminaddr OR lminaddr = -1 THEN - lminaddr := $3; - END IF; - END IF; - - IF $4 IS NOT NULL THEN - rmaxaddr := $4; - rminaddr := $4; - rfrgreater := TRUE; - END IF; - - IF $5 IS NOT NULL THEN - IF $5 > rmaxaddr OR rmaxaddr = -1 THEN - rmaxaddr := $5; - rfrgreater := FALSE; - END IF; - IF $5 < rminaddr OR rminaddr = -1 THEN - rminaddr := $5; - END IF; - END IF; - - IF given_address >= lminaddr AND given_address <= lmaxaddr THEN - IF (given_address % 2) = (lminaddr % 2) - OR (given_address % 2) = (lmaxaddr % 2) THEN - addrwidth := lmaxaddr - lminaddr; - part := (given_address - lminaddr) / trunc(addrwidth, 1); - frgreater := lfrgreater; - END IF; - END IF; - IF given_address >= rminaddr AND given_address <= rmaxaddr THEN - IF (given_address % 2) = (rminaddr % 2) - OR (given_address % 2) = (rmaxaddr % 2) THEN - addrwidth := rmaxaddr - rminaddr; - part := (given_address - rminaddr) / trunc(addrwidth, 1); - frgreater := rfrgreater; - END IF; - ELSE - RETURN null; - END IF; - - IF frgreater THEN - part := 1 - part; - END IF; - - result = line_interpolate_point(road, part); - RETURN result; -END; -' LANGUAGE plpgsql; - - --- This function determines the levenshtein distance irespective of case. -CREATE OR REPLACE FUNCTION levenshtein_ignore_case(VARCHAR, VARCHAR) RETURNS INTEGER -AS ' -DECLARE - result INTEGER; -BEGIN - result := levenshtein(upper($1), upper($2)); - RETURN result; -END -' LANGUAGE plpgsql; - --- This function take two arguements. The first is the "given string" and --- must not be null. The second arguement is the "compare string" and may --- or may not be null. If the second string is null, the value returned is --- 3, otherwise it is the levenshtein difference between the two. -CREATE OR REPLACE FUNCTION nullable_levenshtein(VARCHAR, VARCHAR) RETURNS INTEGER -AS ' -DECLARE - given_string VARCHAR; - result INTEGER := 3; -BEGIN - IF $1 IS NULL THEN - RAISE EXCEPTION ''nullable_levenshtein - given string is NULL!''; - ELSE - given_string := $1; - END IF; - - IF $2 IS NOT NULL AND $2 != '''' THEN - result := levenshtein_ignore_case(given_string, $2); - END IF; - - RETURN result; -END -' LANGUAGE plpgsql; - - - --- location_extract(streetAddressString, stateAbbreviation) --- This function extracts a location name from the end of the given string. --- The first attempt is to find an exact match against the place_lookup --- table. If this fails, a word-by-word soundex match is tryed against the --- same table. If multiple candidates are found, the one with the smallest --- levenshtein distance from the given string is assumed the correct one. --- If no match is found against the place_lookup table, the same tests are --- run against the countysub_lookup table. --- --- The section of the given string corresponding to the location found is --- returned, rather than the string found from the tables. All the searching --- is done largely to determine the length (words) of the location, to allow --- the intended street name to be correctly identified. -CREATE OR REPLACE FUNCTION location_extract(VARCHAR, VARCHAR) RETURNS VARCHAR -AS ' -DECLARE - fullStreet VARCHAR; - stateAbbrev VARCHAR; - location VARCHAR; - verbose BOOLEAN := TRUE; -BEGIN - IF verbose THEN - RAISE NOTICE ''location_extract()''; - END IF; - IF $1 IS NULL THEN - RAISE EXCEPTION ''location_extract() - No input given!''; - ELSE - fullStreet := $1; - END IF; - IF $2 IS NULL THEN - ELSE - stateAbbrev := $2; - END IF; - location := location_extract_place_exact(fullStreet, stateAbbrev); - IF location IS NULL THEN - location := location_extract_countysub_exact(fullStreet, stateAbbrev); - IF location IS NULL THEN - location := location_extract_place_fuzzy(fullStreet, stateAbbrev); - IF location IS NULL THEN - location := location_extract_countysub_fuzzy(fullStreet, stateAbbrev); - END IF; - END IF; - END IF; - return location; -END; -' LANGUAGE plpgsql; - - - --- location_extract_countysub_exact(string, stateAbbrev) --- This function checks the place_lookup table to find a potential match to --- the location described at the end of the given string. If an exact match --- fails, a fuzzy match is performed. The location as found in the given --- string is returned. -CREATE OR REPLACE FUNCTION location_extract_countysub_exact(VARCHAR, VARCHAR) RETURNS VARCHAR -AS ' -DECLARE - fullStreet VARCHAR; - ws VARCHAR; - tempString VARCHAR; - location VARCHAR; - tempInt INTEGER; - word_count INTEGER; - stateAbbrev VARCHAR; - rec RECORD; - test BOOLEAN; - result VARCHAR; - verbose BOOLEAN := TRUE; -BEGIN - IF verbose THEN - RAISE NOTICE ''location_extract_countysub_exact()''; - END IF; - IF $1 IS NULL THEN - RAISE EXCEPTION ''location_extract_countysub_exact() - No input given!''; - ELSE - fullStreet := $1; - END IF; - IF $2 IS NOT NULL THEN - stateAbbrev := $2; - END IF; - ws := ''[ ,\.\n\f\t]''; - -- No hope of determining the location from place. Try countysub. - IF stateAbbrev IS NOT NULL THEN - SELECT INTO tempInt count(*) FROM countysub_lookup - WHERE countysub_lookup.state = stateAbbrev - AND texticregexeq(fullStreet, ''(?i)'' || name || ''$''); - ELSE - SELECT INTO tempInt count(*) FROM countysub_lookup - WHERE texticregexeq(fullStreet, ''(?i)'' || name || ''$''); - END IF; - IF tempInt > 0 THEN - IF stateAbbrev IS NOT NULL THEN - FOR rec IN SELECT substring(fullStreet, ''(?i)('' - || name || '')$'') AS value, name FROM countysub_lookup - WHERE countysub_lookup.state = stateAbbrev - AND texticregexeq(fullStreet, ''(?i)'' || ws || name || - ''$'') ORDER BY length(name) DESC LOOP - -- Only the first result is needed. - location := rec.value; - EXIT; - END LOOP; - ELSE - FOR rec IN SELECT substring(fullStreet, ''(?i)('' - || name || '')$'') AS value, name FROM countysub_lookup - WHERE texticregexeq(fullStreet, ''(?i)'' || ws || name || - ''$'') ORDER BY length(name) DESC LOOP - -- again, only the first is needed. - location := rec.value; - EXIT; - END LOOP; - END IF; - END IF; - RETURN location; -END; -' LANGUAGE plpgsql; - - --- location_extract_countysub_fuzzy(string, stateAbbrev) --- This function checks the place_lookup table to find a potential match to --- the location described at the end of the given string. If an exact match --- fails, a fuzzy match is performed. The location as found in the given --- string is returned. -CREATE OR REPLACE FUNCTION location_extract_countysub_fuzzy(VARCHAR, VARCHAR) RETURNS VARCHAR -AS ' -DECLARE - fullStreet VARCHAR; - ws VARCHAR; - tempString VARCHAR; - location VARCHAR; - tempInt INTEGER; - word_count INTEGER; - stateAbbrev VARCHAR; - rec RECORD; - test BOOLEAN; - result VARCHAR; - verbose BOOLEAN := TRUE; -BEGIN - IF verbose THEN - RAISE NOTICE ''location_extract_countysub_fuzzy()''; - END IF; - IF $1 IS NULL THEN - RAISE EXCEPTION ''location_extract_countysub_fuzzy() - No input given!''; - ELSE - fullStreet := $1; - END IF; - IF $2 IS NOT NULL THEN - stateAbbrev := $2; - END IF; - ws := ''[ ,\.\n\f\t]''; - - -- Fuzzy matching. - tempString := substring(fullStreet, ''(?i)'' || ws || - ''([a-zA-Z0-9]+)$''); - IF tempString IS NULL THEN - tempString := fullStreet; - END IF; - IF stateAbbrev IS NOT NULL THEN - SELECT INTO tempInt count(*) FROM countysub_lookup - WHERE countysub_lookup.state = stateAbbrev - AND soundex(tempString) = end_soundex(name); - ELSE - SELECT INTO tempInt count(*) FROM countysub_lookup - WHERE soundex(tempString) = end_soundex(name); - END IF; - IF tempInt > 0 THEN - tempInt := 50; - -- Some potentials were found. Begin a word-by-word soundex on each. - IF stateAbbrev IS NOT NULL THEN - FOR rec IN SELECT name FROM countysub_lookup - WHERE countysub_lookup.state = stateAbbrev - AND soundex(tempString) = end_soundex(name) LOOP - word_count := count_words(rec.name); - test := TRUE; - tempString := get_last_words(fullStreet, word_count); - FOR i IN 1..word_count LOOP - IF soundex(split_part(tempString, '' '', i)) != - soundex(split_part(rec.name, '' '', i)) THEN - test := FALSE; - END IF; - END LOOP; - IF test THEN - -- The soundex matched, determine if the distance is better. - IF levenshtein_ignore_case(rec.name, tempString) < tempInt THEN - location := tempString; - tempInt := levenshtein_ignore_case(rec.name, tempString); - END IF; - END IF; - END LOOP; - ELSE - FOR rec IN SELECT name FROM countysub_lookup - WHERE soundex(tempString) = end_soundex(name) LOOP - word_count := count_words(rec.name); - test := TRUE; - tempString := get_last_words(fullStreet, word_count); - FOR i IN 1..word_count LOOP - IF soundex(split_part(tempString, '' '', i)) != - soundex(split_part(rec.name, '' '', i)) THEN - test := FALSE; - END IF; - END LOOP; - IF test THEN - -- The soundex matched, determine if the distance is better. - IF levenshtein_ignore_case(rec.name, tempString) < tempInt THEN - location := tempString; - tempInt := levenshtein_ignore_case(rec.name, tempString); - END IF; - END IF; - END LOOP; - END IF; - END IF; -- If no fuzzys were found, leave location null. - RETURN location; -END; -' LANGUAGE plpgsql; - - - --- location_extract_place_exact(string, stateAbbrev) --- This function checks the place_lookup table to find a potential match to --- the location described at the end of the given string. If an exact match --- fails, a fuzzy match is performed. The location as found in the given --- string is returned. -CREATE OR REPLACE FUNCTION location_extract_place_exact(VARCHAR, VARCHAR) RETURNS VARCHAR -AS ' -DECLARE - fullStreet VARCHAR; - ws VARCHAR; - tempString VARCHAR; - location VARCHAR; - tempInt INTEGER; - word_count INTEGER; - stateAbbrev VARCHAR; - rec RECORD; - test BOOLEAN; - result VARCHAR; - verbose BOOLEAN := TRUE; -BEGIN - IF verbose THEN - RAISE NOTICE ''location_extract_place_exact()''; - END IF; - IF $1 IS NULL THEN - RAISE EXCEPTION ''location_extract_place_exact() - No input given!''; - ELSE - fullStreet := $1; - END IF; - IF verbose THEN - RAISE NOTICE ''location_extract_place_exact() - input: "%"'', fullStreet; - END IF; - IF $2 IS NOT NULL THEN - stateAbbrev := $2; - END IF; - ws := ''[ ,\.\n\f\t]''; - -- Try for an exact match against places - IF stateAbbrev IS NOT NULL THEN - SELECT INTO tempInt count(*) FROM place_lookup - WHERE place_lookup.state = stateAbbrev - AND texticregexeq(fullStreet, ''(?i)'' || name || ''$''); - ELSE - SELECT INTO tempInt count(*) FROM place_lookup - WHERE texticregexeq(fullStreet, ''(?i)'' || name || ''$''); - END IF; - IF verbose THEN - RAISE NOTICE ''location_extract_place_exact() - Exact Matches %'', tempInt; - END IF; - IF tempInt > 0 THEN - -- Some matches were found. Look for the last one in the string. - IF stateAbbrev IS NOT NULL THEN - FOR rec IN SELECT substring(fullStreet, ''(?i)('' - || name || '')$'') AS value, name FROM place_lookup - WHERE place_lookup.state = stateAbbrev - AND texticregexeq(fullStreet, ''(?i)'' - || name || ''$'') ORDER BY length(name) DESC LOOP - -- Since the regex is end of string, only the longest (first) result - -- is useful. - location := rec.value; - EXIT; - END LOOP; - ELSE - FOR rec IN SELECT substring(fullStreet, ''(?i)('' - || name || '')$'') AS value, name FROM place_lookup - WHERE texticregexeq(fullStreet, ''(?i)'' - || name || ''$'') ORDER BY length(name) DESC LOOP - -- Since the regex is end of string, only the longest (first) result - -- is useful. - location := rec.value; - EXIT; - END LOOP; - END IF; - END IF; - RETURN location; -END; -' LANGUAGE plpgsql; - - - --- location_extract_place_fuzzy(string, stateAbbrev) --- This function checks the place_lookup table to find a potential match to --- the location described at the end of the given string. If an exact match --- fails, a fuzzy match is performed. The location as found in the given --- string is returned. -CREATE OR REPLACE FUNCTION location_extract_place_fuzzy(VARCHAR, VARCHAR) RETURNS VARCHAR -AS ' -DECLARE - fullStreet VARCHAR; - ws VARCHAR; - tempString VARCHAR; - location VARCHAR; - tempInt INTEGER; - word_count INTEGER; - stateAbbrev VARCHAR; - rec RECORD; - test BOOLEAN; - result VARCHAR; - verbose BOOLEAN := TRUE; -BEGIN - IF verbose THEN - RAISE NOTICE ''location_extract_place_fuzzy()''; - END IF; - IF $1 IS NULL THEN - RAISE EXCEPTION ''location_extract_place_fuzzy() - No input given!''; - ELSE - fullStreet := $1; - END IF; - IF verbose THEN - RAISE NOTICE ''location_extract_place_fuzzy() - input: "%"'', fullStreet; - END IF; - IF $2 IS NOT NULL THEN - stateAbbrev := $2; - END IF; - ws := ''[ ,\.\n\f\t]''; - - tempString := substring(fullStreet, ''(?i)'' || ws - || ''([a-zA-Z0-9]+)$''); - IF tempString IS NULL THEN - tempString := fullStreet; - END IF; - IF stateAbbrev IS NOT NULL THEN - SELECT into tempInt count(*) FROM place_lookup - WHERE place_lookup.state = stateAbbrev - AND soundex(tempString) = end_soundex(name); - ELSE - SELECT into tempInt count(*) FROM place_lookup - WHERE soundex(tempString) = end_soundex(name); - END IF; - IF verbose THEN - RAISE NOTICE ''location_extract_place_fuzzy() - Fuzzy matches %'', tempInt; - END IF; - IF tempInt > 0 THEN - -- Some potentials were found. Begin a word-by-word soundex on each. - tempInt := 50; - IF stateAbbrev IS NOT NULL THEN - FOR rec IN SELECT name FROM place_lookup - WHERE place_lookup.state = stateAbbrev - AND soundex(tempString) = end_soundex(name) LOOP - IF verbose THEN - RAISE NOTICE ''location_extract_place_fuzzy() - Fuzzy: "%"'', rec.name; - END IF; - word_count := count_words(rec.name); - test := TRUE; - tempString := get_last_words(fullStreet, word_count); - FOR i IN 1..word_count LOOP - IF soundex(split_part(tempString, '' '', i)) != - soundex(split_part(rec.name, '' '', i)) THEN - IF verbose THEN - RAISE NOTICE ''location_extract_place_fuzzy() - No Match.''; - END IF; - test := FALSE; - END IF; - END LOOP; - IF test THEN - -- The soundex matched, determine if the distance is better. - IF levenshtein_ignore_case(rec.name, tempString) < tempInt THEN - location := tempString; - tempInt := levenshtein_ignore_case(rec.name, tempString); - END IF; - END IF; - END LOOP; - ELSE - FOR rec IN SELECT name FROM place_lookup - WHERE soundex(tempString) = end_soundex(name) LOOP - word_count := count_words(rec.name); - test := TRUE; - tempString := get_last_words(fullStreet, word_count); - FOR i IN 1..word_count LOOP - IF soundex(split_part(tempString, '' '', i)) != - soundex(split_part(rec.name, '' '', i)) THEN - test := FALSE; - END IF; - END LOOP; - IF test THEN - -- The soundex matched, determine if the distance is better. - IF levenshtein_ignore_case(rec.name, tempString) < tempInt THEN - location := tempString; - tempInt := levenshtein_ignore_case(rec.name, tempString); - END IF; - END IF; - END LOOP; - END IF; - END IF; - RETURN location; -END; -' LANGUAGE plpgsql; - - - --- normalize_address(addressString) --- This takes an address string and parses it into address (internal/street) --- street name, type, direction prefix and suffix, location, state and --- zip code, depending on what can be found in the string. --- --- The US postal address standard is used: --- --- --- --- State is assumed to be included in the string, and MUST be matchable to --- something in the state_lookup table. Fuzzy matching is used if no direct --- match is found. --- --- Two formats of zip code are acceptable: five digit, and five + 4. --- --- The internal addressing indicators are looked up from the --- secondary_unit_lookup table. A following identifier is accepted --- but it must start with a digit. --- --- The location is parsed from the string using other indicators, such --- as street type, direction suffix or internal address, if available. --- If these are not, the location is extracted using comparisons against --- the places_lookup table, then the countysub_lookup table to determine --- what, in the original string, is intended to be the location. In both --- cases, an exact match is first pursued, then a word-by-word fuzzy match. --- The result is not the name of the location from the tables, but the --- section of the given string that corresponds to the name from the tables. --- --- Zip codes and street names are not validated. --- --- Direction indicators are extracted by comparison with the direction_lookup --- table. --- --- Street addresses are assumed to be a single word, starting with a number. --- Address is manditory; if no address is given, and the street is numbered, --- the resulting address will be the street name, and the street name --- will be an empty string. --- --- In some cases, the street type is part of the street name. --- eg State Hwy 22a. As long as the word following the type starts with a --- number (this is usually the case) this will be caught. Some street names --- include a type name, and have a street type that differs. This will be --- handled properly, so long as both are given. If the street type is --- omitted, the street names included type will be parsed as the street type. --- --- The output is currently a colon seperated list of values: --- InternalAddress:StreetAddress:DirectionPrefix:StreetName:StreetType: --- DirectionSuffix:Location:State:ZipCode --- This returns each element as entered. It's mainly meant for debugging. --- There is also another option that returns: --- StreetAddress:DirectionPrefixAbbreviation:StreetName:StreetTypeAbbreviation: --- DirectionSuffixAbbreviation:Location:StateAbbreviation:ZipCode --- This is more standardized and better for use with a geocoder. -CREATE OR REPLACE FUNCTION normalize_address(VARCHAR) RETURNS VARCHAR -AS ' -DECLARE - rawInput VARCHAR; - address VARCHAR; - preDir VARCHAR; - preDirAbbrev VARCHAR; - postDir VARCHAR; - postDirAbbrev VARCHAR; - fullStreet VARCHAR; - reducedStreet VARCHAR; - streetName VARCHAR; - streetType VARCHAR; - streetTypeAbbrev VARCHAR; - internal VARCHAR; - location VARCHAR; - state VARCHAR; - stateAbbrev VARCHAR; - tempString VARCHAR; - tempInt INTEGER; - result VARCHAR; - zip VARCHAR; - test BOOLEAN; - working REFCURSOR; - rec RECORD; - ws VARCHAR; - verbose BOOLEAN := TRUE; -BEGIN - IF verbose THEN - RAISE NOTICE ''normalize_address()''; - END IF; - IF $1 IS NULL THEN - RAISE EXCEPTION ''normalise_address() - address string is null!''; - ELSE - rawInput := $1; - END IF; - ws := ''[ ,\.\t\n\f\r]''; - - -- Assume that the address begins with a digit, and extract it from - -- the input string. - address := substring(rawInput from ''^([0-9].*?)[ ,/.]''); - - -- There are two formats for zip code, the normal 5 digit, and - -- the nine digit zip-4. It may also not exist. - zip := substring(rawInput from ws || ''([0-9]{5})$''); - IF zip IS NULL THEN - zip := substring(rawInput from ws || ''([0-9]{5})-[0-9]{4}$''); - END IF; - - IF zip IS NOT NULL THEN - fullStreet := substring(rawInput from ''(.*)'' - || ws || ''+'' || cull_null(zip) || ''[- ]?([0-9]{4})?$''); - ELSE - fullStreet := rawInput; - END IF; - IF verbose THEN - RAISE NOTICE ''normalize_address() - after zip extract "%"'', fullStreet; - END IF; - tempString := state_extract(fullStreet); - IF tempString IS NOT NULL THEN - state := split_part(tempString, '':'', 1); - stateAbbrev := split_part(tempString, '':'', 2); - END IF; - - -- The easiest case is if the address is comma delimited. There are some - -- likely cases: - -- street level, location, state - -- street level, location state - -- street level, location - -- street level, internal address, location, state - -- street level, internal address, location state - -- street level, internal address location state - -- street level, internal address, location - -- street level, internal address location - -- The first three are useful. - tempString := substring(fullStreet, ''(?i),'' || ws || ''+(.*)(,?'' || ws || - ''+'' || cull_null(state) || ''|$)''); - IF tempString IS NOT NULL THEN - location := tempString; - IF address IS NOT NULL THEN - fullStreet := substring(fullStreet, ''(?i)'' || address || ws || - ''+(.*),'' || ws || ''+'' || location); - ELSE - fullStreet := substring(fullStreet, ''(?i)(.*),'' || ws || ''+'' || - location); - END IF; - IF verbose THEN - RAISE NOTICE ''normalize_address() - Parsed by punctuation.''; - RAISE NOTICE ''normalize_address() - Location "%"'', location; - RAISE NOTICE ''normalize_address() - FullStreet "%"'', fullStreet; - END IF; - END IF; - - -- Pull out the full street information, defined as everything between the - -- address and the state. This includes the location. - -- This doesnt need to be done if location has already been found. - IF location IS NULL THEN - IF address IS NOT NULL THEN - IF state IS NOT NULL THEN - fullStreet := substring(fullStreet, ''(?i)'' || address || - ws || ''+(.*?)'' || ws || ''+'' || state); - ELSE - fullStreet := substring(fullStreet, ''(?i)'' || address || - ws || ''+(.*?)''); - END IF; - ELSE - IF state IS NOT NULL THEN - fullStreet := substring(fullStreet, ''(?i)(.*?)'' || ws || - ''+'' || state); - ELSE - fullStreet := substring(fullStreet, ''(?i)(.*?)''); - END IF; - END IF; - END IF; - IF verbose THEN - RAISE NOTICE ''normalize_address() - after addy extract "%"'', fullStreet; - END IF; - - -- Determine if any internal address is included, such as apartment - -- or suite number. - SELECT INTO tempInt count(*) FROM secondary_unit_lookup - WHERE texticregexeq(fullStreet, ''(?i)'' || ws || name || ''('' - || ws || ''|$)''); - IF tempInt = 1 THEN - SELECT INTO internal substring(fullStreet, ''(?i)'' || ws || ''('' - || name || ws || ''*#?'' || ws - || ''*(?:[0-9][0-9a-zA-Z\-]*)?'' || '')(?:'' || ws || ''|$)'') - FROM secondary_unit_lookup - WHERE texticregexeq(fullStreet, ''(?i)'' || ws || name || ''('' - || ws || ''|$)''); - ELSIF tempInt > 1 THEN - -- In the event of multiple matches to a secondary unit designation, we - -- will assume that the last one is the true one. - tempInt := 0; - FOR rec in SELECT trim(substring(fullStreet, ''(?i)'' || ws || ''('' - || name || ''(?:'' || ws || ''*#?'' || ws - || ''*(?:[0-9][0-9a-zA-Z\-]*)?)'' || ws || ''?|$)'')) as value - FROM secondary_unit_lookup - WHERE texticregexeq(fullStreet, ''(?i)'' || ws || name || ''('' - || ws || ''|$)'') LOOP - IF tempInt < position(rec.value in fullStreet) THEN - tempInt := position(rec.value in fullStreet); - internal := rec.value; - END IF; - END LOOP; - END IF; - - IF verbose THEN - RAISE NOTICE ''normalize_address() - internal: "%"'', internal; - END IF; - - IF location IS NULL THEN - -- If the internal address is given, the location is everything after it. - location := substring(fullStreet, internal || ws || ''+(.*)$''); - END IF; - - -- Pull potential street types from the full street information - SELECT INTO tempInt count(*) FROM street_type_lookup - WHERE texticregexeq(fullStreet, ''(?i)'' || ws || ''('' || name - || '')(?:'' || ws || ''|$)''); - IF tempInt = 1 THEN - SELECT INTO rec abbrev, substring(fullStreet, ''(?i)'' || ws || ''('' - || name || '')(?:'' || ws || ''|$)'') AS given FROM street_type_lookup - WHERE texticregexeq(fullStreet, ''(?i)'' || ws || ''('' || name - || '')(?:'' || ws || ''|$)''); - streetType := rec.given; - streetTypeAbbrev := rec.abbrev; - ELSIF tempInt > 1 THEN - tempInt := 0; - FOR rec IN SELECT abbrev, substring(fullStreet, ''(?i)'' || ws || ''('' - || name || '')(?:'' || ws || ''|$)'') AS given FROM street_type_lookup - WHERE texticregexeq(fullStreet, ''(?i)'' || ws || ''('' || name - || '')(?:'' || ws || ''|$)'') LOOP - -- If we have found an internal address, make sure the type - -- precedes it. - IF internal IS NOT NULL THEN - IF position(rec.given IN fullStreet) < - position(internal IN fullStreet) THEN - IF tempInt < position(rec.given IN fullStreet) THEN - streetType := rec.given; - streetTypeAbbrev := rec.abbrev; - tempInt := position(rec.given IN fullStreet); - END IF; - END IF; - ELSIF tempInt < position(rec.given IN fullStreet) THEN - streetType := rec.given; - streetTypeAbbrev := rec.abbrev; - tempInt := position(rec.given IN fullStreet); - END IF; - END LOOP; - END IF; - IF verbose THEN - RAISE NOTICE ''normalize_address() - street Type: "%"'', streetType; - END IF; - - -- There is a little more processing required now. If the word after the - -- street type begins with a number, the street type should be considered - -- part of the name, as well as the next word. eg, State Route 225a. If - -- the next word starts with a char, then everything after the street type - -- will be considered location. If there is no street type, then Im sad. - IF streetType IS NOT NULL THEN - tempString := substring(fullStreet, streetType || ws || - ''+([0-9][^ ,\.\t\r\n\f]*?)'' || ws); - IF tempString IS NOT NULL THEN - IF location IS NULL THEN - location := substring(fullStreet, streetType || ws || ''+'' - || tempString || ws || ''+(.*)$''); - END IF; - reducedStreet := substring(fullStreet, ''(.*)'' || ws || ''+'' - || location || ''$''); - streetType := NULL; - streetTypeAbbrev := NULL; - ELSE - IF location IS NULL THEN - location := substring(fullStreet, streetType || ws || ''+(.*)$''); - END IF; - reducedStreet := substring(fullStreet, ''^(.*)'' || ws || ''+'' - || streetType); - END IF; - - -- The pre direction should be at the beginning of the fullStreet string. - -- The post direction should be at the beginning of the location string - -- if there is no internal address - SELECT INTO tempString substring(reducedStreet, ''(?i)(^'' || name - || '')'' || ws) FROM direction_lookup WHERE - texticregexeq(reducedStreet, ''(?i)(^'' || name || '')'' || ws) - ORDER BY length(name) DESC; - IF tempString IS NOT NULL THEN - preDir := tempString; - SELECT INTO preDirAbbrev abbrev FROM direction_lookup - where texticregexeq(reducedStreet, ''(?i)(^'' || name || '')'' || ws) - ORDER BY length(name) DESC; - streetName := substring(reducedStreet, ''^'' || preDir || ws || ''(.*)''); - ELSE - streetName := reducedStreet; - END IF; - - IF texticregexeq(location, ''(?i)'' || internal || ''$'') THEN - -- If the internal address is at the end of the location, then no - -- location was given. We still need to look for post direction. - SELECT INTO rec abbrev, - substring(location, ''(?i)^('' || name || '')'' || ws) as value - FROM direction_lookup WHERE texticregexeq(location, ''(?i)^'' - || name || ws) ORDER BY length(name) desc; - IF rec.value IS NOT NULL THEN - postDir := rec.value; - postDirAbbrev := rec.abbrev; - END IF; - location := null; - ELSIF internal IS NULL THEN - -- If no location is given, the location string will be the post direction - SELECT INTO tempInt count(*) FROM direction_lookup WHERE - upper(location) = upper(name); - IF tempInt != 0 THEN - postDir := location; - SELECT INTO postDirAbbrev abbrev FROM direction_lookup WHERE - upper(postDir) = upper(name); - location := NULL; - ELSE - -- postDirection is not equal location, but may be contained in it. - SELECT INTO tempString substring(location, ''(?i)(^'' || name - || '')'' || ws) FROM direction_lookup WHERE - texticregexeq(location, ''(?i)(^'' || name || '')'' || ws) - ORDER BY length(name) desc; - IF tempString IS NOT NULL THEN - postDir := tempString; - SELECT INTO postDirAbbrev abbrev FROM direction_lookup - where texticregexeq(location, ''(?i)(^'' || name || '')'' || ws); - location := substring(location, ''^'' || postDir || ws || ''+(.*)''); - END IF; - END IF; - ELSE - -- internal is not null, but is not at the end of the location string - -- look for post direction before the internal address - SELECT INTO tempString substring(fullStreet, ''(?i)'' || streetType - || ws || ''+('' || name || '')'' || ws || ''+'' || internal) - FROM direction_lookup WHERE texticregexeq(fullStreet, ''(?i)'' - || ws || name || ws || ''+'' || internal) ORDER BY length(name) desc; - IF tempString IS NOT NULL THEN - postDir := tempString; - SELECT INTO postDirAbbrev abbrev FROM direction_lookup - WHERE texticregexeq(fullStreet, ''(?i)'' || ws || name || ws); - END IF; - END IF; - ELSE - -- No street type was found - - -- If an internal address was given, then the split becomes easy, and the - -- street name is everything before it, without directions. - IF internal IS NOT NULL THEN - reducedStreet := substring(fullStreet, ''(?i)^(.*?)'' || ws || ''+'' - || internal); - SELECT INTO tempInt count(*) FROM direction_lookup WHERE - texticregexeq(reducedStreet, ''(?i)'' || ws || name || ''$''); - IF tempInt > 0 THEN - SELECT INTO postDir substring(reducedStreet, ''(?i)'' || ws || ''('' - || name || '')'' || ''$'') FROM direction_lookup - WHERE texticregexeq(reducedStreet, ''(?i)'' || ws || name || ''$''); - SELECT INTO postDirAbbrev abbrev FROM direction_lookup - WHERE texticregexeq(reducedStreet, ''(?i)'' || ws || name || ''$''); - END IF; - SELECT INTO tempString substring(reducedStreet, ''(?i)^('' || name - || '')'' || ws) FROM direction_lookup WHERE - texticregexeq(reducedStreet, ''(?i)^('' || name || '')'' || ws) - ORDER BY length(name) DESC; - IF tempString IS NOT NULL THEN - preDir := tempString; - SELECT INTO preDirAbbrev abbrev FROM direction_lookup WHERE - texticregexeq(reducedStreet, ''(?i)(^'' || name || '')'' || ws) - ORDER BY length(name) DESC; - streetName := substring(reducedStreet, ''(?i)^'' || preDir || ws - || ''+(.*?)(?:'' || ws || ''+'' || cull_null(postDir) || ''|$)''); - ELSE - streetName := substring(reducedStreet, ''(?i)^(.*?)(?:'' || ws - || ''+'' || cull_null(postDir) || ''|$)''); - END IF; - ELSE - - -- If a post direction is given, then the location is everything after, - -- the street name is everything before, less any pre direction. - SELECT INTO tempInt count(*) FROM direction_lookup - WHERE texticregexeq(fullStreet, ''(?i)'' || ws || name || ''(?:'' - || ws || ''|$)''); - - IF tempInt = 1 THEN - -- A single postDir candidate was found. This makes it easier. - SELECT INTO postDir substring(fullStreet, ''(?i)'' || ws || ''('' - || name || '')(?:'' || ws || ''|$)'') FROM direction_lookup WHERE - texticregexeq(fullStreet, ''(?i)'' || ws || name || ''(?:'' - || ws || ''|$)''); - SELECT INTO postDirAbbrev abbrev FROM direction_lookup - WHERE texticregexeq(fullStreet, ''(?i)'' || ws || name - || ''(?:'' || ws || ''|$)''); - IF location IS NULL THEN - location := substring(fullStreet, ''(?i)'' || ws || postDir - || ws || ''+(.*?)$''); - END IF; - reducedStreet := substring(fullStreet, ''^(.*?)'' || ws || ''+'' - || postDir); - SELECT INTO tempString substring(reducedStreet, ''(?i)(^'' || name - || '')'' || ws) FROM direction_lookup WHERE - texticregexeq(reducedStreet, ''(?i)(^'' || name || '')'' || ws) - ORDER BY length(name) DESC; - IF tempString IS NOT NULL THEN - preDir := tempString; - SELECT INTO preDirAbbrev abbrev FROM direction_lookup WHERE - texticregexeq(reducedStreet, ''(?i)(^'' || name || '')'' || ws) - ORDER BY length(name) DESC; - streetName := substring(reducedStreet, ''^'' || preDir || ws - || ''+(.*)''); - ELSE - streetName := reducedStreet; - END IF; - ELSIF tempInt > 1 THEN - -- Multiple postDir candidates were found. We need to find the last - -- incident of a direction, but avoid getting the last word from - -- a two word direction. eg extracting "East" from "North East" - -- We do this by sorting by length, and taking the last direction - -- in the results that is not included in an earlier one. - -- This wont be a problem it preDir is North East and postDir is - -- East as the regex requires a space before the direction. Only - -- the East will return from the preDir. - tempInt := 0; - FOR rec IN SELECT abbrev, substring(fullStreet, ''(?i)'' || ws || ''('' - || name || '')(?:'' || ws || ''|$)'') AS value - FROM direction_lookup - WHERE texticregexeq(fullStreet, ''(?i)'' || ws || name - || ''(?:'' || ws || ''|$)'') - ORDER BY length(name) desc LOOP - tempInt := 0; - IF tempInt < position(rec.value in fullStreet) THEN - IF postDir IS NULL THEN - tempInt := position(rec.value in fullStreet); - postDir := rec.value; - postDirAbbrev := rec.abbrev; - ELSIF NOT texticregexeq(postDir, ''(?i)'' || rec.value) THEN - tempInt := position(rec.value in fullStreet); - postDir := rec.value; - postDirAbbrev := rec.abbrev; - END IF; - END IF; - END LOOP; - IF location IS NULL THEN - location := substring(fullStreet, ''(?i)'' || ws || postDir || ws - || ''+(.*?)$''); - END IF; - reducedStreet := substring(fullStreet, ''(?i)^(.*?)'' || ws || ''+'' - || postDir); - SELECT INTO tempString substring(reducedStreet, ''(?i)(^'' || name - || '')'' || ws) FROM direction_lookup WHERE - texticregexeq(reducedStreet, ''(?i)(^'' || name || '')'' || ws) - ORDER BY length(name) DESC; - IF tempString IS NOT NULL THEN - preDir := tempString; - SELECT INTO preDirAbbrev abbrev FROM direction_lookup WHERE - texticregexeq(reducedStreet, ''(?i)(^'' || name || '')'' || ws) - ORDER BY length(name) DESC; - streetName := substring(reducedStreet, ''^'' || preDir || ws - || ''+(.*)''); - ELSE - streetName := reducedStreet; - END IF; - ELSE - - -- There is no street type, directional suffix or internal address - -- to allow distinction between street name and location. - IF location IS NULL THEN - location := location_extract(fullStreet, stateAbbrev); - END IF; - -- Check for a direction prefix. - SELECT INTO tempString substring(fullStreet, ''(?i)(^'' || name - || '')'' || ws) FROM direction_lookup WHERE - texticregexeq(fullStreet, ''(?i)(^'' || name || '')'' || ws) - ORDER BY length(name); - RAISE NOTICE ''DEBUG 1''; - IF tempString IS NOT NULL THEN - preDir := tempString; - SELECT INTO preDirAbbrev abbrev FROM direction_lookup WHERE - texticregexeq(fullStreet, ''(?i)(^'' || name || '')'' || ws) - ORDER BY length(name) DESC; - IF location IS NOT NULL THEN - -- The location may still be in the fullStreet, or may - -- have been removed already - streetName := substring(fullStreet, ''^'' || preDir || ws - || ''+(.*?)('' || ws || ''+'' || location || ''|$)''); - RAISE NOTICE ''DEBUG 2.1 "%", "%"'', streetName, fullStreet; - ELSE - streetName := substring(fullStreet, ''^'' || preDir || ws - || ''+(.*?)'' || ws || ''*''); - END IF; - ELSE - IF location IS NOT NULL THEN - -- The location may still be in the fullStreet, or may - -- have been removed already - streetName := substring(fullStreet, ''^(.*?)('' || ws - || ''+'' || location || ''|$)''); - RAISE NOTICE ''DEBUG 2.2 "%", "%"'', streetName, fullStreet; - ELSE - streetName := fullStreet; - END IF; - END IF; - END IF; - END IF; - END IF; - - - - RAISE NOTICE ''normalize_address() - final internal "%"'', internal; - RAISE NOTICE ''normalize_address() - prefix_direction "%"'', preDir; - RAISE NOTICE ''normalize_address() - street_type "%"'', streetType; - RAISE NOTICE ''normalize_address() - suffix_direction "%"'', postDir; - RAISE NOTICE ''normalize_address() - state "%"'', state; - - -- This is useful for scripted checking. It returns what was entered - -- for each field, rather than what should be used by the geocoder. - --result := cull_null(internal) || '':'' || cull_null(address) || '':'' - --|| cull_null(preDir) || '':'' || cull_null(streetName) || '':'' - --|| cull_null(streetType) || '':'' || cull_null(postDir) - --|| '':'' || cull_null(location) || '':'' || cull_null(state) || '':'' - --|| cull_null(zip); - - -- This is the standardized return. - result := cull_null(address) || '':'' || cull_null(preDirAbbrev) || '':'' - || cull_null(streetName) || '':'' || cull_null(streetTypeAbbrev) || '':'' - || cull_null(postDirAbbrev) || '':'' || cull_null(location) || '':'' - || cull_null(stateAbbrev) || '':'' || cull_null(zip); - return result; -END -' LANGUAGE plpgsql; - - - --- rate_attributes(dirpA, dirpB, streetNameA, streetNameB, streetTypeA, --- streetTypeB, dirsA, dirsB, locationA, locationB) --- Rates the street based on the given attributes. The locations must be --- non-null. The other eight values are handled by the other rate_attributes --- function, so it's requirements must also be met. -CREATE OR REPLACE FUNCTION rate_attributes(VARCHAR, VARCHAR, VARCHAR, VARCHAR, - VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR) RETURNS INTEGER -AS ' -DECLARE - result INTEGER := 0; - locationWeight INTEGER := 14; -BEGIN - IF $9 IS NOT NULL AND $10 IS NOT NULL THEN - result := levenshtein_ignore_case($9, $10); - ELSE - RAISE EXCEPTION ''rate_attributes() - Location names cannot be null!''; - END IF; - result := result + rate_attributes($1, $2, $3, $4, $5, $6, $7, $8); - RETURN result; -END; -' LANGUAGE plpgsql; - --- rate_attributes(dirpA, dirpB, streetNameA, streetNameB, streetTypeA, --- streetTypeB, dirsA, dirsB) --- Rates the street based on the given attributes. Only streetNames are --- required. If any others are null (either A or B) they are treated as --- empty strings. -CREATE OR REPLACE FUNCTION rate_attributes(VARCHAR, VARCHAR, VARCHAR, VARCHAR, - VARCHAR, VARCHAR, VARCHAR, VARCHAR) RETURNS INTEGER -AS ' -DECLARE - result INTEGER := 0; - directionWeight INTEGER := 2; - nameWeight INTEGER := 10; - typeWeight INTEGER := 5; -BEGIN - result := result + levenshtein_ignore_case(cull_null($1), cull_null($2)) * - directionWeight; - IF $3 IS NOT NULL AND $4 IS NOT NULL THEN - result := result + levenshtein_ignore_case($3, $4) * nameWeight; - ELSE - RAISE EXCEPTION ''rate_attributes() - Street names cannot be null!''; - END IF; - result := result + levenshtein_ignore_case(cull_null($5), cull_null($6)) * - typeWeight; - result := result + levenshtein_ignore_case(cull_null($7), cull_null($7)) * - directionWeight; - return result; -END; -' LANGUAGE plpgsql; - - - --- state_extract(addressStringLessZipCode) --- Extracts the state from end of the given string. --- --- This function uses the state_lookup table to determine which state --- the input string is indicating. First, an exact match is pursued, --- and in the event of failure, a word-by-word fuzzy match is attempted. --- --- The result is the state as given in the input string, and the approved --- state abbreviation, seperated by a colon. -CREATE OR REPLACE FUNCTION state_extract(VARCHAR) RETURNS VARCHAR -AS ' -DECLARE - tempInt INTEGER; - tempString VARCHAR; - rawInput VARCHAR; - state VARCHAR; - stateAbbrev VARCHAR; - result VARCHAR; - rec RECORD; - test BOOLEAN; - ws VARCHAR; - verbose BOOLEAN := TRUE; -BEGIN - IF verbose THEN - RAISE NOTICE ''state_extract()''; - END IF; - IF $1 IS NULL THEN - RAISE EXCEPTION ''state_extract() - no input''; - ELSE - rawInput := $1; - END IF; - ws := ''[ ,\.\t\n\f\r]''; - - -- Separate out the last word of the state, and use it to compare to - -- the state lookup table to determine the entire name, as well as the - -- abbreviation associated with it. The zip code may or may not have - -- been found. - tempString := substring(rawInput from ws || ''+([^ ,\.\t\n\f\r0-9]*?)$''); - SELECT INTO tempInt count(*) FROM (select distinct abbrev from state_lookup - WHERE upper(abbrev) = upper(tempString)) as blah; - IF tempInt = 1 THEN - state := tempString; - SELECT INTO stateAbbrev abbrev FROM (select distinct abbrev from - state_lookup WHERE upper(abbrev) = upper(tempString)) as blah; - ELSE - SELECT INTO tempInt count(*) FROM state_lookup WHERE upper(name) - like upper(''%'' || tempString); - IF tempInt >= 1 THEN - FOR rec IN SELECT name from state_lookup WHERE upper(name) - like upper(''%'' || tempString) LOOP - SELECT INTO test texticregexeq(rawInput, name) FROM state_lookup - WHERE rec.name = name; - IF test THEN - SELECT INTO stateAbbrev abbrev FROM state_lookup - WHERE rec.name = name; - state := substring(rawInput, ''(?i)'' || rec.name); - EXIT; - END IF; - END LOOP; - ELSE - -- No direct match for state, so perform fuzzy match. - SELECT INTO tempInt count(*) FROM state_lookup - WHERE soundex(tempString) = end_soundex(name); - IF tempInt >= 1 THEN - FOR rec IN SELECT name, abbrev FROM state_lookup - WHERE soundex(tempString) = end_soundex(name) LOOP - tempInt := count_words(rec.name); - tempString := get_last_words(rawInput, tempInt); - test := TRUE; - FOR i IN 1..tempInt LOOP - IF soundex(split_part(tempString, '' '', i)) != - soundex(split_part(rec.name, '' '', i)) THEN - test := FALSE; - END IF; - END LOOP; - IF test THEN - state := tempString; - stateAbbrev := rec.abbrev; - EXIT; - END IF; - END LOOP; - END IF; - END IF; - END IF; - IF state IS NOT NULL AND stateAbbrev IS NOT NULL THEN - result := state || '':'' || stateAbbrev; - END IF; - return result; -END; -' LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tables/lookup_tables.sql postgis-2.0.1/extras/tiger_geocoder/tables/lookup_tables.sql --- postgis-1.5.3/extras/tiger_geocoder/tables/lookup_tables.sql 2009-03-12 23:20:26.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tables/lookup_tables.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,885 +0,0 @@ --- Create direction lookup table -DROP TABLE IF EXISTS direction_lookup; -CREATE TABLE direction_lookup (name VARCHAR(20) PRIMARY KEY, abbrev VARCHAR(3)); -INSERT INTO direction_lookup (name, abbrev) VALUES('WEST', 'W'); -INSERT INTO direction_lookup (name, abbrev) VALUES('W', 'W'); -INSERT INTO direction_lookup (name, abbrev) VALUES('SW', 'SW'); -INSERT INTO direction_lookup (name, abbrev) VALUES('SOUTH-WEST', 'SW'); -INSERT INTO direction_lookup (name, abbrev) VALUES('SOUTHWEST', 'SW'); -INSERT INTO direction_lookup (name, abbrev) VALUES('SOUTH-EAST', 'SE'); -INSERT INTO direction_lookup (name, abbrev) VALUES('SOUTHEAST', 'SE'); -INSERT INTO direction_lookup (name, abbrev) VALUES('SOUTH_WEST', 'SW'); -INSERT INTO direction_lookup (name, abbrev) VALUES('SOUTH_EAST', 'SE'); -INSERT INTO direction_lookup (name, abbrev) VALUES('SOUTH', 'S'); -INSERT INTO direction_lookup (name, abbrev) VALUES('SOUTH WEST', 'SW'); -INSERT INTO direction_lookup (name, abbrev) VALUES('SOUTH EAST', 'SE'); -INSERT INTO direction_lookup (name, abbrev) VALUES('SE', 'SE'); -INSERT INTO direction_lookup (name, abbrev) VALUES('S', 'S'); -INSERT INTO direction_lookup (name, abbrev) VALUES('NW', 'NW'); -INSERT INTO direction_lookup (name, abbrev) VALUES('NORTH-WEST', 'NW'); -INSERT INTO direction_lookup (name, abbrev) VALUES('NORTHWEST', 'NW'); -INSERT INTO direction_lookup (name, abbrev) VALUES('NORTH-EAST', 'NE'); -INSERT INTO direction_lookup (name, abbrev) VALUES('NORTHEAST', 'NE'); -INSERT INTO direction_lookup (name, abbrev) VALUES('NORTH_WEST', 'NW'); -INSERT INTO direction_lookup (name, abbrev) VALUES('NORTH_EAST', 'NE'); -INSERT INTO direction_lookup (name, abbrev) VALUES('NORTH', 'N'); -INSERT INTO direction_lookup (name, abbrev) VALUES('NORTH WEST', 'NW'); -INSERT INTO direction_lookup (name, abbrev) VALUES('NORTH EAST', 'NE'); -INSERT INTO direction_lookup (name, abbrev) VALUES('NE', 'NE'); -INSERT INTO direction_lookup (name, abbrev) VALUES('N', 'N'); -INSERT INTO direction_lookup (name, abbrev) VALUES('EAST', 'E'); -INSERT INTO direction_lookup (name, abbrev) VALUES('E', 'E'); -CREATE INDEX direction_lookup_abbrev_idx ON direction_lookup (abbrev); - - - --- Create secondary unit lookup table -DROP TABLE IF EXISTS secondary_unit_lookup; -CREATE TABLE secondary_unit_lookup (name VARCHAR(20) PRIMARY KEY, abbrev VARCHAR(5)); -INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('APARTMENT', 'APT'); -INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('APT', 'APT'); -INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('BASEMENT', 'BSMT'); -INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('BSMT', 'BSMT'); -INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('BUILDING', 'BLDG'); -INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('BLDG', 'BLDG'); -INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('DEPARTMENT', 'DEPT'); -INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('DEPT', 'DEPT'); -INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('FLOOR', 'FL'); -INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('FL', 'FL'); -INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('FRONT', 'FRNT'); -INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('FRNT', 'FRNT'); -INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('HANGAR', 'HNGR'); -INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('HNGR', 'HNGR'); -INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('LOBBY', 'LBBY'); -INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('LBBY', 'LBBY'); -INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('LOT', 'LOT'); -INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('LOWER', 'LOWR'); -INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('LOWR', 'LOWR'); -INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('OFFICE', 'OFC'); -INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('OFC', 'OFC'); -INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('PENTHOUSE', 'PH'); -INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('PH', 'PH'); -INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('PIER', 'PIER'); -INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('REAR', 'REAR'); -INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('ROOM', 'RM'); -INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('RM', 'RM'); -INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('SIDE', 'SIDE'); -INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('SLIP', 'SLIP'); -INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('SPACE', 'SPC'); -INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('SPC', 'SPC'); -INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('STOP', 'STOP'); -INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('SUITE', 'STE'); -INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('STE', 'STE'); -INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('TRAILER', 'TRLR'); -INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('TRLR', 'TRLR'); -INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('UNIT', 'UNIT'); -INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('UPPER', 'UPPR'); -INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('UPPR', 'UPPR'); -CREATE INDEX secondary_unit_lookup_abbrev_idx ON secondary_unit_lookup (abbrev); - - - --- Create state lookup table -DROP TABLE IF EXISTS state_lookup; -CREATE TABLE state_lookup (st_code INTEGER PRIMARY KEY, name VARCHAR(40) UNIQUE, abbrev VARCHAR(3) UNIQUE); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Alabama', 'AL', '01'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Alaska', 'AK', '02'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('American Samoa', 'AS', -1); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Arizona', 'AZ', '04'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Arkansas', 'AR', '05'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('California', 'CA', '06'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Colorado', 'CO', '08'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Connecticut', 'CT', '09'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Delaware', 'DE', '10'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('District of Columbia', 'DC', '11'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Federated States of Micronesia', 'FM', -2); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Florida', 'FL', '12'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Georgia', 'GA', '13'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Guam', 'GU', -7); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Hawaii', 'HI', '15'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Idaho', 'ID', '16'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Illinois', 'IL', '17'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Indiana', 'IN', '18'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Iowa', 'IA', '19'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Kansas', 'KS', '20'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Kentucky', 'KY', '21'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Louisiana', 'LA', '22'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Maine', 'ME', '23'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Marshall Islands', 'MH', -3); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Maryland', 'MD', '24'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Massachusetts', 'MA', '25'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Michigan', 'MI', '26'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Minnesota', 'MN', '27'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Mississippi', 'MS', '28'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Missouri', 'MO', '29'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Montana', 'MT', '30'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Nebraska', 'NE', '31'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Nevada', 'NV', '32'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('New Hampshire', 'NH', '33'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('New Jersey', 'NJ', '34'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('New Mexico', 'NM', '35'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('New York', 'NY', '36'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('North Carolina', 'NC', '37'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('North Dakota', 'ND', '38'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Northern Mariana Islands', 'MP', -4); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Ohio', 'OH', '39'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Oklahoma', 'OK', '40'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Oregon', 'OR', '41'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Palau', 'PW', -5); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Pennsylvania', 'PA', '42'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Puerto Rico', 'PR', '72'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Rhode Island', 'RI', '44'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('South Carolina', 'SC', '45'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('South Dakota', 'SD', '46'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Tennessee', 'TN', '47'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Texas', 'TX', '48'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Utah', 'UT', '49'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Vermont', 'VT', '50'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Virgin Islands', 'VI', -6); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Virginia', 'VA', '51'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Washington', 'WA', '53'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('West Virginia', 'WV', '54'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Wisconsin', 'WI', '55'); -INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Wyoming', 'WY', '56'); - - --- Create street type lookup table -DROP TABLE IF EXISTS street_type_lookup; -CREATE TABLE street_type_lookup (name VARCHAR(20) PRIMARY KEY, abbrev VARCHAR(4)); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('ALLEE', 'Aly'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('ALLEY', 'Aly'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('ALLY', 'Aly'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('ALY', 'Aly'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('ANEX', 'Anx'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('ANNEX', 'Anx'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('ANNX', 'Anx'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('ANX', 'Anx'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('ARC', 'Arc'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('ARCADE', 'Arc'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('AV', 'Ave'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('AVE', 'Ave'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('AVEN', 'Ave'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('AVENU', 'Ave'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('AVENUE', 'Ave'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('AVN', 'Ave'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('AVNUE', 'Ave'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('BAYOO', 'Byu'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('BAYOU', 'Byu'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('BCH', 'Bch'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('BEACH', 'Bch'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('BEND', 'Bnd'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('BND', 'Bnd'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('BLF', 'Blf'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('BLUF', 'Blf'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('BLUFF', 'Blf'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('BLUFFS', 'Blfs'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('BOT', 'Btm'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('BOTTM', 'Btm'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('BOTTOM', 'Btm'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('BTM', 'Btm'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('BLVD', 'Blvd'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('BOUL', 'Blvd'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('BOULEVARD', 'Blvd'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('BOULV', 'Blvd'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('BR', 'Br'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('BRANCH', 'Br'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('BRNCH', 'Br'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('BRDGE', 'Brg'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('BRG', 'Brg'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('BRIDGE', 'Brg'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('BRK', 'Brk'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('BROOK', 'Brk'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('BROOKS', 'Brks'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('BURG', 'Bg'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('BURGS', 'Bgs'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('BYP', 'Byp'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('BYPA', 'Byp'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('BYPAS', 'Byp'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('BYPASS', 'ByP'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('BYPS', 'Byp'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CAMP', 'Cp'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CMP', 'Cp'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CP', 'Cp'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CANYN', 'Cyn'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CANYON', 'Cyn'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CNYN', 'Cyn'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CYN', 'Cyn'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CAPE', 'Cpe'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CPE', 'Cpe'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CAUSEWAY', 'Cswy'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CAUSWAY', 'Cswy'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CSWY', 'Cswy'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CEN', 'Ctr'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CENT', 'Ctr'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CENTER', 'Ctr'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CENTR', 'Ctr'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CENTRE', 'Ctr'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CNTER', 'Ctr'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CNTR', 'Ctr'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CTR', 'Ctr'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CENTERS', 'Ctrs'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CIR', 'Cir'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CIRC', 'Cir'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CIRCL', 'Cir'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CIRCLE', 'Cir'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRCL', 'Cir'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRCLE', 'Cir'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CIRCLES', 'Cirs'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CLF', 'Clf'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CLIFF', 'Clf'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CLFS', 'Clfs'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CLIFFS', 'Clfs'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CLB', 'Clb'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CLUB', 'Clb'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('COMMON', 'Cmn'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('COR', 'Cor'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CORNER', 'Cor'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CORNERS', 'Cors'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CORS', 'Cors'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('COURSE', 'Crse'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRSE', 'Crse'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('COURT', 'Ct'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRT', 'Ct'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CT', 'Ct'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('COURTS', 'Cts'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('COVE', 'Cv'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CV', 'Cv'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('COVES', 'Cvs'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CK', 'Crk'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CR', 'Crk'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CREEK', 'Crk'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRK', 'Crk'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRECENT', 'Cres'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRES', 'Cres'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRESCENT', 'Cres'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRESENT', 'Cres'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRSCNT', 'Cres'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRSENT', 'Cres'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRSNT', 'Cres'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CREST', 'Crst'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CROSSING', 'Xing'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRSSING', 'Xing'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRSSNG', 'Xing'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('XING', 'Xing'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CROSSROAD', 'Xrd'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CURVE', 'Curv'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('DALE', 'Dl'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('DL', 'Dl'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('DAM', 'Dm'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('DM', 'Dm'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('DIV', 'Dv'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('DIVIDE', 'Dv'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('DV', 'Dv'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('DVD', 'Dv'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('DR', 'Dr'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('DRIV', 'Dr'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('DRIVE', 'Dr'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('DRV', 'Dr'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('DRIVES', 'Drs'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('EST', 'Est'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('ESTATE', 'Est'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('ESTATES', 'Ests'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('ESTS', 'Ests'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('EXP', 'Expy'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('EXPR', 'Expy'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('EXPRESS', 'Expy'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('EXPRESSWAY', 'Expy'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('EXPW', 'Expy'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('EXPY', 'Expy'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('EXT', 'Ext'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('EXTENSION', 'Ext'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('EXTN', 'Ext'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('EXTNSN', 'Ext'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('EXTENSIONS', 'Exts'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('EXTS', 'Exts'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('FALL', 'Fall'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('FALLS', 'Fls'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('FLS', 'Fls'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('FERRY', 'Fry'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('FRRY', 'Fry'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('FRY', 'Fry'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('FIELD', 'Fld'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('FLD', 'Fld'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('FIELDS', 'Flds'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('FLDS', 'Flds'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('FLAT', 'Flt'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('FLT', 'Flt'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('FLATS', 'Flts'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('FLTS', 'Flts'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('FORD', 'Frd'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('FRD', 'Frd'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('FORDS', 'Frds'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('FOREST', 'Frst'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('FORESTS', 'Frst'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('FRST', 'Frst'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('FORG', 'Frg'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('FORGE', 'Frg'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('FRG', 'Frg'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('FORGES', 'Frgs'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('FORK', 'Frk'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('FRK', 'Frk'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('FORKS', 'Frks'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('FRKS', 'Frks'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('FORT', 'Ft'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('FRT', 'Ft'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('FT', 'Ft'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('FREEWAY', 'Fwy'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('FREEWY', 'Fwy'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('FRWAY', 'Fwy'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('FRWY', 'Fwy'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('FWY', 'Fwy'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('GARDEN', 'Gdn'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('GARDN', 'Gdn'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('GDN', 'Gdn'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('GRDEN', 'Gdn'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('GRDN', 'Gdn'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('GARDENS', 'Gdns'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('GDNS', 'Gdns'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('GRDNS', 'Gdns'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('GATEWAY', 'Gtwy'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('GATEWY', 'Gtwy'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('GATWAY', 'Gtwy'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('GTWAY', 'Gtwy'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('GTWY', 'Gtwy'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('GLEN', 'Gln'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('GLN', 'Gln'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('GLENS', 'Glns'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('GREEN', 'Grn'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('GRN', 'Grn'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('GREENS', 'Grns'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('GROV', 'Grv'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('GROVE', 'Grv'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('GRV', 'Grv'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('GROVES', 'Grvs'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('HARB', 'Hbr'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('HARBOR', 'Hbr'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('HARBR', 'Hbr'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('HBR', 'Hbr'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('HRBOR', 'Hbr'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('HARBORS', 'Hbrs'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('HAVEN', 'Hvn'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('HAVN', 'Hvn'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('HVN', 'Hvn'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('HEIGHT', 'Hts'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('HEIGHTS', 'Hts'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('HGTS', 'Hts'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('HT', 'Hts'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('HTS', 'Hts'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('HIGHWAY', 'Hwy'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('HIGHWY', 'Hwy'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('HIWAY', 'Hwy'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('HIWY', 'Hwy'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('HWAY', 'Hwy'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('HWY', 'Hwy'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('HILL', 'Hl'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('HL', 'Hl'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('HILLS', 'Hls'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('HLS', 'Hls'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('HLLW', 'Holw'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('HOLLOW', 'Holw'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('HOLLOWS', 'Holw'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('HOLW', 'Holw'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('HOLWS', 'Holw'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('INLET', 'Inlt'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('INLT', 'Inlt'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('IS', 'Is'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('ISLAND', 'Is'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('ISLND', 'Is'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('ISLANDS', 'Iss'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('ISLNDS', 'Iss'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('ISS', 'Iss'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('ISLE', 'Isle'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('ISLES', 'Isle'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('JCT', 'Jct'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('JCTION', 'Jct'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('JCTN', 'Jct'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('JUNCTION', 'Jct'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('JUNCTN', 'Jct'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('JUNCTON', 'Jct'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('JCTNS', 'Jcts'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('JCTS', 'Jcts'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('JUNCTIONS', 'Jcts'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('KEY', 'Ky'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('KY', 'Ky'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('KEYS', 'Kys'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('KYS', 'Kys'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('KNL', 'Knl'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('KNOL', 'Knl'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('KNOLL', 'Knl'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('KNLS', 'Knls'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('KNOLLS', 'Knls'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('LAKE', 'Lk'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('LK', 'Lk'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('LAKES', 'Lks'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('LKS', 'Lks'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('LAND', 'Land'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('LANDING', 'Lndg'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('LNDG', 'Lndg'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('LNDNG', 'Lndg'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('LA', 'Ln'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('LANE', 'Ln'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('LANES', 'Ln'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('LN', 'Ln'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('LGT', 'Lgt'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('LIGHT', 'Lgt'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('LIGHTS', 'Lgts'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('LF', 'Lf'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('LOAF', 'Lf'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('LCK', 'Lck'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('LOCK', 'Lck'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('LCKS', 'Lcks'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('LOCKS', 'Lcks'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('LDG', 'Ldg'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('LDGE', 'Ldg'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('LODG', 'Ldg'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('LODGE', 'Ldg'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('LOOP', 'Loop'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('LOOPS', 'Loop'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('MALL', 'Mall'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('MANOR', 'Mnr'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('MNR', 'Mnr'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('MANORS', 'Mnrs'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('MNRS', 'Mnrs'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('MDW', 'Mdw'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('MEADOW', 'Mdw'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('MDWS', 'Mdws'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('MEADOWS', 'Mdws'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('MEDOWS', 'Mdws'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('MEWS', 'Mews'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('MILL', 'Ml'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('ML', 'Ml'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('MILLS', 'Mls'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('MLS', 'Mls'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('MISSION', 'Msn'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('MISSN', 'Msn'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('MSN', 'Msn'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('MSSN', 'Msn'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('MOTORWAY', 'Mtwy'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('MNT', 'Mt'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('MOUNT', 'Mt'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('MT', 'Mt'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('MNTAIN', 'Mtn'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('MNTN', 'Mtn'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('MOUNTAIN', 'Mtn'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('MOUNTIN', 'Mtn'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('MTIN', 'Mtn'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('MTN', 'Mtn'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('MNTNS', 'Mtns'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('MOUNTAINS', 'Mtns'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('NCK', 'Nck'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('NECK', 'Nck'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('ORCH', 'Orch'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('ORCHARD', 'Orch'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('ORCHRD', 'Orch'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('OVAL', 'Oval'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('OVL', 'Oval'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('OVERPASS', 'Opas'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('PARK', 'Park'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('PK', 'Park'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('PRK', 'Park'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('PARKS', 'Park'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('PARKWAY', 'Pkwy'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('PARKWY', 'Pkwy'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('PKWAY', 'Pkwy'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('PKWY', 'Pkwy'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('PKY', 'Pkwy'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('PARKWAYS', 'Pkwy'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('PKWYS', 'Pkwy'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('PASS', 'Pass'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('PASSAGE', 'Psge'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('PATH', 'Path'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('PATHS', 'Path'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('PIKE', 'Pike'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('PIKES', 'Pike'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('PINE', 'Pne'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('PINES', 'Pnes'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('PNES', 'Pnes'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('PL', 'Pl'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('PLACE', 'Pl'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('PLAIN', 'Pln'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('PLN', 'Pln'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('PLAINES', 'Plns'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('PLAINS', 'Plns'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('PLNS', 'Plns'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('PLAZA', 'Plz'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('PLZ', 'Plz'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('PLZA', 'Plz'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('POINT', 'Pt'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('PT', 'Pt'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('POINTS', 'Pts'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('PTS', 'Pts'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('PORT', 'Prt'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('PRT', 'Prt'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('PORTS', 'Prts'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('PRTS', 'Prts'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('PR', 'Pr'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('PRAIRIE', 'Pr'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('PRARIE', 'Pr'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('PRR', 'Pr'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('RAD', 'Radl'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('RADIAL', 'Radl'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('RADIEL', 'Radl'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('RADL', 'Radl'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('RAMP', 'Ramp'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('RANCH', 'Rnch'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('RANCHES', 'Rnch'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('RNCH', 'Rnch'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('RNCHS', 'Rnch'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('RAPID', 'Rpd'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('RPD', 'Rpd'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('RAPIDS', 'Rpds'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('RPDS', 'Rpds'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('REST', 'Rst'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('RST', 'Rst'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('RDG', 'Rdg'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('RDGE', 'Rdg'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('RIDGE', 'Rdg'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('RDGS', 'Rdgs'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('RIDGES', 'Rdgs'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('RIV', 'Riv'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('RIVER', 'Riv'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('RIVR', 'Riv'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('RVR', 'Riv'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('RD', 'Rd'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('ROAD', 'Rd'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('RDS', 'Rds'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('ROADS', 'Rds'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('ROUTE', 'Rte'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('ROW', 'Row'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('RUE', 'Rue'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('RUN', 'Run'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('SHL', 'Shl'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('SHOAL', 'Shl'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('SHLS', 'Shls'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('SHOALS', 'Shls'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('SHOAR', 'Shr'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('SHORE', 'Shr'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('SHR', 'Shr'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('SHOARS', 'Shrs'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('SHORES', 'Shrs'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('SHRS', 'Shrs'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('SKYWAY', 'Skwy'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('SPG', 'Spg'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('SPNG', 'Spg'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('SPRING', 'Spg'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('SPRNG', 'Spg'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('SPGS', 'Spgs'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('SPNGS', 'Spgs'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('SPRINGS', 'Spgs'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('SPRNGS', 'Spgs'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('SPUR', 'Spur'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('SPURS', 'Spur'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('SQ', 'Sq'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('SQR', 'Sq'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('SQRE', 'Sq'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('SQU', 'Sq'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('SQUARE', 'Sq'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('SQRS', 'Sqs'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('SQUARES', 'Sqs'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('STA', 'Sta'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('STATION', 'Sta'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('STATN', 'Sta'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('STN', 'Sta'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('STRA', 'Stra'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('STRAV', 'Stra'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('STRAVE', 'Stra'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('STRAVEN', 'Stra'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('STRAVENUE', 'Stra'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('STRAVN', 'Stra'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('STRVN', 'Stra'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('STRVNUE', 'Stra'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('STREAM', 'Strm'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('STREME', 'Strm'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('STRM', 'Strm'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('ST', 'St'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('STR', 'St'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('STREET', 'St'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('STRT', 'St'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('STREETS', 'Sts'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('SMT', 'Smt'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('SUMIT', 'Smt'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('SUMITT', 'Smt'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('SUMMIT', 'Smt'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('TER', 'Ter'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('TERR', 'Ter'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('TERRACE', 'Ter'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('THROUGHWAY', 'Trwy'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRACE', 'Trce'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRACES', 'Trce'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRCE', 'Trce'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRACK', 'Trak'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRACKS', 'Trak'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRAK', 'Trak'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRK', 'Trak'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRKS', 'Trak'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRAFFICWAY', 'Trfy'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRFY', 'Trfy'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('TR', 'Trl'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRAIL', 'Trl'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRAILS', 'Trl'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRL', 'Trl'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRLS', 'Trl'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('TUNEL', 'Tunl'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('TUNL', 'Tunl'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('TUNLS', 'Tunl'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('TUNNEL', 'Tunl'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('TUNNELS', 'Tunl'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('TUNNL', 'Tunl'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('TPK', 'Tpke'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('TPKE', 'Tpke'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRNPK', 'Tpke'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRPK', 'Tpke'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('TURNPIKE', 'Tpke'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('TURNPK', 'Tpke'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('UNDERPASS', 'Upas'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('UN', 'Un'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('UNION', 'Un'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('UNIONS', 'Uns'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('VALLEY', 'Vly'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('VALLY', 'Vly'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('VLLY', 'Vly'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('VLY', 'Vly'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('VALLEYS', 'Vlys'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('VLYS', 'Vlys'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('VDCT', 'Via'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('VIA', 'Via'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('VIADCT', 'Via'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('VIADUCT', 'Via'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('VIEW', 'Vw'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('VW', 'Vw'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('VIEWS', 'Vws'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('VWS', 'Vws'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('VILL', 'Vlg'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('VILLAG', 'Vlg'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('VILLAGE', 'Vlg'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('VILLG', 'Vlg'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('VILLIAGE', 'Vlg'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('VLG', 'Vlg'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('VILLAGES', 'Vlgs'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('VLGS', 'Vlgs'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('VILLE', 'Vl'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('VL', 'Vl'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('VIS', 'Vis'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('VIST', 'Vis'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('VISTA', 'Vis'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('VST', 'Vis'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('VSTA', 'Vis'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('WALK', 'Walk'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('WALKS', 'Walk'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('WALL', 'Wall'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('WAY', 'Way'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('WY', 'Way'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('WAYS', 'Ways'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('WELL', 'Wl'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('WELLS', 'Wls'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('WLS', 'Wls'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('BYU', 'Byu'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('BLFS', 'Blfs'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('BRKS', 'Brks'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('BG', 'Bg'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('BGS', 'Bgs'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CTRS', 'Ctrs'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CIRS', 'Cirs'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CMN', 'Cmn'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CTS', 'Cts'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CVS', 'Cvs'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRST', 'Crst'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('XRD', 'Xrd'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('CURV', 'Curv'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('DRS', 'Drs'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('FRDS', 'Frds'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('FRGS', 'Frgs'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('GLNS', 'Glns'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('GRNS', 'Grns'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('GRVS', 'Grvs'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('HBRS', 'Hbrs'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('LGTS', 'Lgts'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('MTWY', 'Mtwy'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('MTNS', 'Mtns'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('OPAS', 'Opas'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('PSGE', 'Psge'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('PNE', 'Pne'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('RTE', 'Rte'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('SKWY', 'Skwy'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('SQS', 'Sqs'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('STS', 'Sts'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRWY', 'Trwy'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('UPAS', 'Upas'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('UNS', 'Uns'); -INSERT INTO street_type_lookup (name, abbrev) VALUES ('WL', 'Wl'); -CREATE INDEX street_type_lookup_abbrev_idx ON street_type_lookup (abbrev); - --- Create place and countysub lookup tables -DROP TABLE IF EXISTS place_lookup; -CREATE TABLE place_lookup ( - st_code INTEGER, - state VARCHAR(2), - pl_code INTEGER, - name VARCHAR(90), - PRIMARY KEY (st_code,pl_code) -); - -INSERT INTO place_lookup - SELECT - pl.state::integer as st_code, - sl.abbrev as state, - pl.placefp::integer as pl_code, - pl.name as name - FROM - pl99_d00 pl - JOIN state_lookup sl ON (pl.state::integer = sl.st_code) - GROUP BY pl.state, sl.abbrev, pl.placefp, pl.name; - -CREATE INDEX place_lookup_name_idx ON place_lookup (soundex(name)); -CREATE INDEX place_lookup_state_idx ON place_lookup (state); - -DROP TABLE IF EXISTS county_lookup; -CREATE TABLE county_lookup ( - st_code INTEGER, - state VARCHAR(2), - co_code INTEGER, - name VARCHAR(90), - PRIMARY KEY (st_code, co_code) -); - -INSERT INTO county_lookup - SELECT - co.state::integer as st_code, - sl.abbrev as state, - co.county::integer as co_code, - co.name as name - FROM - co99_d00 co - JOIN state_lookup sl ON (co.state::integer = sl.st_code) - GROUP BY co.state, sl.abbrev, co.county, co.name; - -CREATE INDEX county_lookup_name_idx ON county_lookup (soundex(name)); -CREATE INDEX county_lookup_state_idx ON county_lookup (state); - -DROP TABLE IF EXISTS countysub_lookup; -CREATE TABLE countysub_lookup ( - st_code INTEGER, - state VARCHAR(2), - co_code INTEGER, - county VARCHAR(90), - cs_code INTEGER, - name VARCHAR(90), - PRIMARY KEY (st_code, co_code, cs_code) -); - -INSERT INTO countysub_lookup - SELECT - cs.state::integer as st_code, - sl.abbrev as state, - cs.county::integer as co_code, - cl.name as county, - cs.cousubfp::integer as cs_code, - cs.name as name - FROM - cs99_d00 cs - JOIN state_lookup sl ON (cs.state::integer = sl.st_code) - JOIN county_lookup cl ON (cs.state::integer = cl.st_code AND cs.county::integer = cl.co_code) - GROUP BY cs.state, sl.abbrev, cs.county, cl.name, cs.cousubfp, cs.name; - -CREATE INDEX countysub_lookup_name_idx ON countysub_lookup (soundex(name)); -CREATE INDEX countysub_lookup_state_idx ON countysub_lookup (state); - -DROP TABLE IF EXISTS zip_lookup_all; -CREATE TABLE zip_lookup_all ( - zip INTEGER, - st_code INTEGER, - state VARCHAR(2), - co_code INTEGER, - county VARCHAR(90), - cs_code INTEGER, - cousub VARCHAR(90), - pl_code INTEGER, - place VARCHAR(90), - cnt INTEGER -); - -SET work_mem = '2GB'; - -INSERT INTO zip_lookup_all - SELECT *,count(*) as cnt FROM - (SELECT - zipl as zip, - rl.statel as st_code, - sl.abbrev as state, - rl.countyl as co_code, - cl.name as county, - rl.cousubl as cs_code, - cs.name as countysub, - rl.placel as pl_code, - pl.name as place - FROM - roads_local rl - JOIN state_lookup sl ON (rl.statel::integer = sl.st_code) - LEFT JOIN county_lookup cl ON (rl.statel::integer = cl.st_code AND rl.countyl::integer = cl.co_code) - LEFT JOIN countysub_lookup cs ON (rl.statel::integer = cs.st_code AND rl.countyl::integer = cs.co_code AND rl.cousubl = cs.cs_code) - LEFT JOIN place_lookup pl ON (rl.statel::integer = pl.st_code AND rl.placel::integer = pl.pl_code) - WHERE zipl IS NOT NULL - UNION ALL - SELECT - zipr as zip, - rl.stater as st_code, - sl.abbrev as state, - rl.countyr as co_code, - cl.name as county, - rl.cousubr as cs_code, - cs.name as countysub, - rl.placer as pl_code, - pl.name as place - FROM - roads_local rl - JOIN state_lookup sl ON (rl.stater = sl.st_code) - LEFT JOIN county_lookup cl ON (rl.stater = cl.st_code AND rl.countyr = cl.co_code) - LEFT JOIN countysub_lookup cs ON (rl.stater = cs.st_code AND rl.countyr = cs.co_code AND rl.cousubr = cs.cs_code) - LEFT JOIN place_lookup pl ON (rl.stater = pl.st_code AND rl.placer = pl.pl_code) - WHERE zipr IS NOT NULL - ) as subquery - GROUP BY zip, st_code, state, co_code, county, cs_code, countysub, pl_code, place; - -DROP TABLE IF EXISTS zip_lookup_base; -CREATE TABLE zip_lookup_base ( - zip INTEGER, - state VARCHAR(40), - county VARCHAR(90), - city VARCHAR(90), - PRIMARY KEY (zip) -); - --- INSERT INTO zip_lookup_base --- Populate through magic --- If anyone knows of a good, public, free, place to pull this information from, that'd be awesome to have... - -DROP TABLE IF EXISTS zip_lookup; -CREATE TABLE zip_lookup ( - zip INTEGER, - st_code INTEGER, - state VARCHAR(2), - co_code INTEGER, - county VARCHAR(90), - cs_code INTEGER, - cousub VARCHAR(90), - pl_code INTEGER, - place VARCHAR(90), - cnt INTEGER, - PRIMARY KEY (zip) -); - -INSERT INTO zip_lookup - SELECT - DISTINCT ON (zip) - zip, - st_code, - state, - co_code, - county, - cs_code, - cousub, - pl_code, - place, - cnt - FROM zip_lookup_all - ORDER BY zip,cnt desc; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tables/roads_local.sql postgis-2.0.1/extras/tiger_geocoder/tables/roads_local.sql --- postgis-1.5.3/extras/tiger_geocoder/tables/roads_local.sql 2007-07-03 21:19:54.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tables/roads_local.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,92 +0,0 @@ -create table roads_local ( - ogc_fid INTEGER, - geom GEOMETRY, - module VARCHAR(8), - tlid INTEGER, - side1 INTEGER, - source CHAR(1), - fedirp VARCHAR(2), - fename VARCHAR(30), - fetype VARCHAR(4), - fedirs VARCHAR(2), - cfcc VARCHAR(3), - fraddl INTEGER, - toaddl INTEGER, - fraddr INTEGER, - toaddr INTEGER, - friaddl CHAR(1), - toiaddl CHAR(1), - friaddr CHAR(1), - toiaddr CHAR(1), - zipl INTEGER, - zipr INTEGER, - aianhhfpl INTEGER, - aianhhfpr INTEGER, - aihhtlil CHAR(1), - aihhtlir CHAR(1), - census1 CHAR(1), - census2 CHAR(1), - statel INTEGER, - stater INTEGER, - countyl INTEGER, - countyr INTEGER, - cousubl INTEGER, - cousubr INTEGER, - submcdl INTEGER, - submcdr INTEGER, - placel INTEGER, - placer INTEGER, - tractl INTEGER, - tractr INTEGER, - blockl INTEGER, - blockr INTEGER -); - -insert into roads_local -select - ogc_fid, - wkb_geometry, - trim(module), - tlid, - side1, - trim(source), - trim(fedirp), - trim(fename), - trim(fetype), - trim(fedirs), - trim(cfcc), - to_number(fraddl,'99999999999'), - to_number(toaddl,'99999999999'), - to_number(fraddr,'99999999999'), - to_number(toaddr,'99999999999'), - trim(friaddl), - trim(toiaddl), - trim(friaddr), - trim(toiaddr), - zipl, - zipr, - aianhhfpl, - aianhhfpr, - trim(aihhtlil), - trim(aihhtlir), - trim(census1), - trim(census2), - statel, - stater, - countyl, - countyr, - cousubl, - cousubr, - submcdl, - submcdr, - placel, - placer, - tractl, - tractr, - blockl, - blockr -from completechain; - -CREATE INDEX roads_local_tlid_idx ON roads_local (tlid); -CREATE INDEX roads_local_geom_idx ON roads_local USING GIST (geom public.gist_geometry_ops); -CREATE INDEX roads_local_cfcc_idx ON roads_local (cfcc); diff -Nru postgis-1.5.3/extras/tiger_geocoder/tables/tiger_geocode_roads.sql postgis-2.0.1/extras/tiger_geocoder/tables/tiger_geocode_roads.sql --- postgis-1.5.3/extras/tiger_geocoder/tables/tiger_geocode_roads.sql 2007-07-03 21:19:54.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tables/tiger_geocode_roads.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,78 +0,0 @@ -DROP SEQUENCE IF EXISTS tiger_geocode_roads_seq; -CREATE SEQUENCE tiger_geocode_roads_seq; - -DROP TABLE IF EXISTS tiger_geocode_roads; -CREATE TABLE tiger_geocode_roads ( - id INTEGER, - tlid INTEGER, - fedirp VARCHAR(2), - fename VARCHAR(30), - fetype VARCHAR(4), - fedirs VARCHAR(2), - zip INTEGER, - state VARCHAR(2), - county VARCHAR(90), - cousub VARCHAR(90), - place VARCHAR(90) -); - -INSERT INTO tiger_geocode_roads - SELECT - nextval('tiger_geocode_roads_seq'), - tlid, - fedirp, - fename, - fetype, - fedirs, - zip, - state, - county, - cousub, - place - FROM - (SELECT - tlid, - fedirp, - fename, - fetype, - fedirs, - zipl as zip, - sl.abbrev as state, - co.name as county, - cs.name as cousub, - pl.name as place - FROM - roads_local rl - JOIN state_lookup sl on (rl.statel = sl.st_code) - LEFT JOIN county_lookup co on (rl.statel = co.st_code AND rl.countyl = co.co_code) - LEFT JOIN countysub_lookup cs on (rl.statel = cs.st_code AND rl.countyl = cs.co_code AND rl.cousubl = cs.cs_code) - LEFT JOIN place_lookup pl on (rl.statel = pl.st_code AND rl.placel = pl.pl_code) - WHERE fename IS NOT NULL - UNION - SELECT - tlid, - fedirp, - fename, - fetype, - fedirs, - zipr as zip, - sl.abbrev as state, - co.name as county, - cs.name as cousub, - pl.name as place - FROM - roads_local rl - JOIN state_lookup sl on (rl.stater = sl.st_code) - LEFT JOIN county_lookup co on (rl.stater = co.st_code AND rl.countyr = co.co_code) - LEFT JOIN countysub_lookup cs on (rl.stater = cs.st_code AND rl.countyr = cs.co_code AND rl.cousubr = cs.cs_code) - LEFT JOIN place_lookup pl on (rl.stater = pl.st_code AND rl.placer = pl.pl_code) - WHERE fename IS NOT NULL - ) AS sub; - -CREATE INDEX tiger_geocode_roads_zip_soundex_idx ON tiger_geocode_roads (soundex(fename), zip, state); -CREATE INDEX tiger_geocode_roads_place_soundex_idx ON tiger_geocode_roads (soundex(fename), place, state); -CREATE INDEX tiger_geocode_roads_cousub_soundex_idx ON tiger_geocode_roads (soundex(fename), cousub, state); -CREATE INDEX tiger_geocode_roads_place_more_soundex_idx ON tiger_geocode_roads (soundex(fename), soundex(place), state); -CREATE INDEX tiger_geocode_roads_cousub_more_soundex_idx ON tiger_geocode_roads (soundex(fename), soundex(cousub), state); -CREATE INDEX tiger_geocode_roads_state_soundex_idx ON tiger_geocode_roads (soundex(fename), state); - diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/INSTALL postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/INSTALL --- postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/INSTALL 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/INSTALL 2011-01-25 06:31:28.000000000 +0000 @@ -0,0 +1,76 @@ +TIGER Geocoder + +2007/07/03 install instructions: + +- Install postgresql-8.2-postgis (For various GIS bits) +- Install PostGIS functions and spatial ref definitions: + \i /usr/share/postgresql-8.2-postgis/postgis.sql + \i /usr/share/postgresql-8.2-postgis/spatial_ref_sys.sql +- Install postgresql-contrib-8.2 for soundex (from fuzzystrmatch) +- Install functions into PG using: + \i /usr/share/postgresql/8.2/contrib/fuzzystrmatch.sql +- Modify and run import/load_tiger.sh for TIGER/Line data + (May wish to run the CompleteChain import seperate from the + Polygon import, since the latter takes an enourmous amount of time) +- Rename tables to be lower-case and whatnot +- Run ogr2ogr (example from tigerimport.sh called from load_tiger.sh) + for the TIGER Boundary SHP files (state boundaries, county boundaries, etc). + Might want download them into boundary/ + + Single-file import something like this: + ogr2ogr -append -f PostgreSQL -a_srs EPSG:4269 "PG:dbname=mydb user=tiger password=XXXXXXXX" WHATEVER.shp WHATEVER -lco DIM=2 + + Script to import the multi-file sets into a single table: + for file in *; do + mkdir x + cd x + unzip ../$file + BASE=`echo *.shp | cut -f1 -d.` + ogr2ogr -append -f PostgreSQL -a_srs EPSG:4269 "PG:dbname=mydb user=tiger password=XXXXXXXX" $BASE.shp $BASE -nln vt99_d00 -lco DIM=2 + cd .. + rm -rf x + done + +- Create geometry indexes on all the tables using GiST, eg: + CREATE INDEX completechain_geom_idx ON completechain + USING GIST (wkb_geometry public.gist_geometry_ops); +- Create lookup tables using lookup_tables.sql +- Create roads_local using roads_local.sql +- Create 'tiger_geocode_roads' using tiger_geocode_roads.sql +- Run create_geocode.sql to load the functions +- Profit! + +Old install instructions: + + 2004/10/28 + + A plpgsql based geocoder written for TIGER census data. + +Installation instructions: + +- If the database being used is new, ensure the following scripts have + been loaded: + + /opt/pgsql74/share/postgis.sql + /opt/pgsql74/share/contrib/spatial_ref_sys.sql + +- Load the fuzzy string matching functions. These must first be compiled, + and may be found in the contrib directory of the postgres source directory. + + psql [-p (port)] (database) < /usr/local/src/postgresql-7.4.5/contrib/fuzzystrmatch/fuzzystrmatch.sql + +- Ensure that the TIGER data is loaded into the target database. + +- Load the lookup tables. This creates the lookup tables and loads predefined + data into them. If the standardized TIGER data is not being used, this + script will need to be altered to reflect the actual data. Since the place + and countysub lookup tables are generated to reflect the data in use, the + database must be populated before this script is run. Indicies are also + created in this script. + + psql [-p (port)] (database) < lookup_tables.sql + +- Load the function scripts. This script loads the geocode function, and all + support modules and functions required by it. + + psql [-p (port)] (database) < tiger_geocoder.sql diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/README postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/README --- postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/README 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/README 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,350 @@ +$Id: README 6731 2011-01-25 18:08:57Z robe $ +TIGER Geocoder + + 2004/10/28 + + A plpgsql based geocoder written for TIGER census data. + +Design: + +There are two components to the geocoder, the address normalizer and the +address geocoder. These two components are described seperatly below. + +The goal of this project is to build a fully functional geocoder that can +process an arbitrary address string and, using normalized TIGER censes data, +produce a point geometry reflecting the location of the given address. + +- The geocoder should be simple for anyone familiar with PostGIS to install + and use. +- It should be robust enough to function properly despite formatting and + spelling errors. +- It should be extensible enough to be used with future data updates, or + alternate data sources with a minimum of coding changes. + +Installation: + + Refer to the INSTALL file for installation instructions. + +Usage: + + refcursor geocode(refcursor, 'address string'); + +Notes: + +- The assumed format for the address is the US Postal Service standard: + () indicates a field required by the geocoder, [] indicates an optional field. + + (address) [dirPrefix] (streetName) [streetType] [dirSuffix] + [internalAddress] [location] [state] [zipCode] + + + +Address Normalizer: + +The goal of the address normalizer is to provide a robust function to break a +given address string down into the components of an address. While the +normalizer is built specifically for the normalized US TIGER Census data, it +has been designed to be reasonably extensible to other data sets and localities. + +Usage: + + normalize_address('address string'); + +Support functions: + + location_extract_countysub_exact('partial address string', 'state abbreviation') + location_extract_countysub_fuzzy('partial address string', 'state abbreviation') + location_extract_place_exact('partial address string', 'state abbreviation') + location_extract_place_fuzzy('partial address string', 'state abbreviation') + cull_null('string') + count_words('string') + get_last_words('string') + state_extract('partial address string') + levenshtein_ignore_case('string', 'string') + +Notes: + +- A set of lookup tables, listed below, is used to provide street type, + secondary unit and direction abbreviation standards for a given set + of data. These are provided with the geocoder, but will need to be + customized for the data used. + + direction_lookup + secondary_unit_lookup + street_type_lookup + +- Additional lookup tables are required to perform matching for state + and location extraction. The state lookup is derived from the + US Postal Service standards, while the place and county subdivision + lookups are generated from the dataset. The creation statements for + the place and countysub tables are given in the INSTALL file. + + state_lookup + place_lookup + countysub_lookup + +- The use of lookup tables is intended to provide a versatile way of applying + the normalizer to data sets and localities other than the US Census TIGER + data. However, due to the need for matching based extraction in the event + of poorly formatted or incomplete address strings, assumptions are made about + the data available. Most notably the division of place and county + subdivision. For data sets without exactly two logical divisions in location + precision, code changes will be required. + +- The normalizer will perform better the more information is provided. + +- The process for normalization is roughly as follows: + + Extract the address from the beginning. + Extract the zipCode from the end. + Extract the state, using a fuzzy search if exact matching fails. + Attempt to extract the location by parsing the punctuation + of the address. + Find and remove any internal address. + If internal address was found: + Set location as everything between internal address and state. + Extract the street type from the string. + If multiple potential street types are found: + If internal address was found: + Extract the last street type that preceeds the internal address. + Else: + Extract the last street type. + If street type was found: + If a word beginning with a number follows the street type. + This indicates the street type is part of the street name, + eg. 'State Hwy 92a'. + Set street type to NULL. + Else if location not yet found: + Set location as everything between street type and state. + Extract direction prefix from start of street name. + If internal address was found: + Extract direction suffix from end of street name. + Else: + Extract direction suffix from start of location. + Set street name as everything that is not the address, direction + prefix or suffix, internal address, location, state or + zip code. + Else: + If internal address was found: + Extract direction prefix from beginning of string. + Extract direction suffix before internal address. + Set street name as everything that is not the address, direction + prefix or suffix, internal address, location, state or + zip code. + Else: + Extract direction suffix. + If direction suffix is found: + Set location as everything between direction suffix and state, + zip or end of string as appropriate. + Extract direction prefix from beginning of string. + Set street name as everything that is not the address, direction + prefix or suffix, internal address, location, state or + zip code. + Else: + Attempt to determine the location via exact comparison against + the places lookup. + Attempt to determine the location via exact comparison against + the countysub lookup. + Attempt to determine the location via fuzzy comparison against + the places lookup. + Attempt to determine the location via fuzzy comparison against + the countysub lookup. + Extract direction prefix. + Set street name as everything that is not the address, direction + prefix or suffix, internal address, location, state or + zip code. + + + +Address Geocoder: + +The goal of the address geocoder is to provide a robust means of searching +the database for a match to whatever data the user provides. To accomplish +this, the coder uses a series of checks and fallthrough cases. Starting with +the most specific combination of parameters, the algorithm works outwards +towards the most vague combination, until valid results are found. The result +of this is that the more accurate information that is provided, the faster the +algorithm will return. + +Usage: + + normalize_address('address string'); + +Support functions: + + geocode_address(cursor, address, 'dirPrefix', 'streetName', 'streetType', + 'dirSuffix', 'location', 'state', zipCode) + geocode_address_zip(cursor, address, 'dirPrefix', 'streetName', + 'streetType', 'dirSuffix', zipCode) + geocode_address_countysub_exact(cursor, address, 'dirPrefix', 'streetName', + 'streetType', 'dirSuffix', 'location', 'state') + geocode_address_countysub_fuzzy(cursor, address, 'dirPrefix', 'streetName', + 'streetType', 'dirSuffix', 'location', 'state') + geocode_address_place_exact(cursor, address, 'dirPrefix', 'streetName', + 'streetType', 'dirSuffix', 'location', 'state') + geocode_address_place_fuzzy(cursor, address, 'dirPrefix', 'streetName', + 'streetType', 'dirSuffix', 'location', 'state') + rate_attributes('dirPrefixA', 'dirPrefixB', 'streetNameA', 'streetNameB', + 'streetTypeA', 'streetTypeB', 'dirSuffixA', 'dirSuffixB') + rate_attributes('dirPrefixA', 'dirPrefixB', 'streetNameA', 'streetNameB', + 'streetTypeA', 'streetTypeB', 'dirSuffixA', 'dirSuffixB', + 'locationA', 'locationB') + location_extract_countysub_exact('partial address string', 'state abbreviation') + location_extract_countysub_fuzzy('partial address string', 'state abbreviation') + location_extract_place_exact('partial address string', 'state abbreviation') + location_extract_place_fuzzy('partial address string', 'state abbreviation') + cull_null('string') + count_words('string') + get_last_words('string') + state_extract('partial address string') + levenshtein_ignore_case('string', 'string') + interpolate_from_address(given address, from address L, to address L, + from address R, to address R, street segment) + interpolate_from_address(given address, 'from address L', 'to address L', + 'from address R', 'to address R', street segment) + includes_address(given address, from address L, to address L, + from address R, to address R) + includes_address(given address, 'from address L', 'to address L', + 'from address R', 'to address R') + +Notes: + +- The geocoder is quite dependent on the address normalizer. The direction + prefix and suffix, streetType and state are all expected to be standard + abbreviations that will match exactly to the database. + +- Either a zip code, or a location must be provided. No exception will be + thrown, but the result will be null. If the zip code or location cannot + be matched, with the other information provided, against the database + the result is null. + +- The process is as follows: + + If a zipCode is provided: + Check if the zipCode, streetName and optionally state match any roads. + If they do: + Check if the given address fits any of the roads. + If it does: + Return the matching road segment information, rating and + interpolated geographic point. + If location exactly matches a place: + Check if the place, streetName and optionally state match any roads. + If they do: + Check if the given address fits any of the roads. + If it does: + Return the matching road segment information, rating and + interpolated geographic point. + If location exactly matches a countySubdivision: + Check if the countySubdivision, streetName and optionally state + match any roads. + If they do: + Check if the given address fits any of the roads. + If it does: + Return the matching road segment information, rating and + interpolated geographic point. + If location approximately matches a place: + Check if the place, streetName and optionally state match any roads. + If they do: + Check if the given address fits any of the roads. + If it does: + Return the matching road segment information, rating and + interpolated geographic point. + If location approximately matches a countySubdivision: + Check if the countySubdivision, streetName and optionally state + match any roads. + If they do: + Check if the given address fits any of the roads. + If it does: + Return the matching road segment information, rating and + interpolated geographic point. + + +Current Issues / Known Failures: + +- If a location starts with a direction, eg. East Seattle, and no suffix + direction is given, the direction from the location will be interpreted + as the streets suffix direction. + + '18196 68th Ave East Seattle Washington' + address = 18196 + dirPrefix = NULL + streetName = '68th' + streetType = 'Ave' + dirSuffix = 'E' + location = 'Seattle' + state = 'WA' + zip = NULL + +- The last possible street type in the string is interpreted as the street type + to allow street names to contain type words. As a result, any location + containing a street type will have the type interpreted as the street type. + + '29645 7th Street SW Federal Way 98023' + address = 29645 + dirPrefix = NULL + streetName = 7th Street SW Federal + streetType = Way + dirSuffix = NULL + location = NULL + state = NULL + zip = 98023 + +- While some state misspellings will be picked up by the fuzzy searches, + misspelled or non-standard abbreviations may not be picked up, due to + the length (soundex uses an intial character plus three codeable + characters) + + '2554 E Highland Dr Seatel Wash' + address = 2554 + dirPrefix = 'E' + streetName = 'Highland' + streetType = 'Dr' + dirSuffix = NULL + location = 'Seatel Wash' + state = NULL + zip = NULL + +- If neither a location or a zip code are found by the normalizer, no search + is performed. + +- If neither street type, direction suffix nor location are given in the + address string, the street name is generally misclassified as the + location. + + '98 E Main Washington 98012' + address = 98 + dirPrefix = 'E' + streetName = NULL + streetType = NULL + dirSuffix = NULL + location = 'Main' + state = 'WA' + zip = 98012 + +- If no street type is given and the street name contains a type word, then the + type in the street name is interpreted as the street type. + + '1348 SW Orchard Seattle wa 98106' + 1348::SW:Orch::Seattle:WA:98106 + address = 1348 + dirPrefix = NULL + streetName = SW + streetType = Orch + dirSuffix = NULL + location = Seattle + state = WA + zip = 98106 + +- Misspellings of words are only handled so far as their soundex values match. + + 'Hiland' will not be matched with 'Highland' + soundex('Hiland') = 'H453' + soundex('Highland') = 'H245' + +- Missing words in location or street name are not handled. + + 'Redmond Fall' will not be matched with 'Redmond Fall City' + +- Unacceptable failure cases: + The street name is parsed out as 'West Central Park' + '500 South West Central Park Ave Chicago Illinois 60624' diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/create_geocode.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/create_geocode.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/create_geocode.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/create_geocode.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,59 @@ + +-- Tiger is where we're going to create the functions, but we need +-- the PostGIS functions/types which are in public. +SET search_path TO tiger,public; + +-- Type used to pass around a normalized address between functions +DROP TYPE IF EXISTS norm_addy CASCADE; +CREATE TYPE norm_addy AS ( + address INTEGER, + preDirAbbrev VARCHAR, + streetName VARCHAR, + streetTypeAbbrev VARCHAR, + postDirAbbrev VARCHAR, + internal VARCHAR, + location VARCHAR, + stateAbbrev VARCHAR, + zip INTEGER, + parsed BOOLEAN); + +-- System/General helper functions +\i utility/utmzone.sql +\i utility/cull_null.sql +\i utility/nullable_levenshtein.sql +\i utility/levenshtein_ignore_case.sql + +---- Address normalizer +-- General helpers +\i normalize/end_soundex.sql +\i normalize/count_words.sql +\i normalize/state_extract.sql +\i normalize/get_last_words.sql +-- Location extraction/normalization helpers +\i normalize/location_extract_countysub_exact.sql +\i normalize/location_extract_countysub_fuzzy.sql +\i normalize/location_extract_place_exact.sql +\i normalize/location_extract_place_fuzzy.sql +\i normalize/location_extract.sql +-- Normalization API, called by geocode mainly. +\i normalize/normalize_address.sql +\i normalize/pprint_addy.sql + +---- Geocoder functions +-- General helpers +\i geocode/rate_attributes.sql +\i geocode/includes_address.sql +\i geocode/interpolate_from_address.sql +-- Actual lookups/geocoder helpers +\i geocode/geocode_address_countysub_exact.sql +\i geocode/geocode_address_countysub_fuzzy.sql +\i geocode/geocode_address_place_exact.sql +\i geocode/geocode_address_place_fuzzy.sql +\i geocode/geocode_address.sql +\i geocode/geocode_address_state.sql +\i geocode/geocode_address_zip.sql +\i geocode/geocode_zip.sql +\i geocode/geocode_location.sql +-- Geocode API, called by user +\i geocode/geocode_get_point.sql +\i geocode/geocode.sql diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,111 @@ +CREATE OR REPLACE FUNCTION geocode( + input VARCHAR, + OUT ADDY NORM_ADDY, + OUT GEOMOUT GEOMETRY, + OUT RATING INTEGER +) RETURNS SETOF RECORD +AS $_$ +DECLARE + result REFCURSOR; + rec RECORD; +BEGIN + + IF input IS NULL THEN + RETURN; + END IF; + + -- Pass the input string into the address normalizer + ADDY := normalize_address(input); + IF NOT ADDY.parsed THEN + RETURN; + END IF; + + OPEN result FOR SELECT * FROM geocode(ADDY); + + LOOP + FETCH result INTO rec; + + IF NOT FOUND THEN + RETURN; + END IF; + + ADDY := rec.addy; + GEOMOUT := rec.geomout; + RATING := rec.rating; + + RETURN NEXT; + END LOOP; + + RETURN; + +END; +$_$ LANGUAGE plpgsql; + + +CREATE OR REPLACE FUNCTION geocode( + IN_ADDY NORM_ADDY, + OUT ADDY NORM_ADDY, + OUT GEOMOUT GEOMETRY, + OUT RATING INTEGER +) RETURNS SETOF RECORD +AS $_$ +DECLARE + result REFCURSOR; + rec RECORD; +BEGIN + + IF NOT IN_ADDY.parsed THEN + RETURN; + END IF; + + -- Go for the full monty if we've got enough info + IF IN_ADDY.address IS NOT NULL AND + IN_ADDY.streetName IS NOT NULL AND + (IN_ADDY.zip IS NOT NULL OR IN_ADDY.stateAbbrev IS NOT NULL) THEN + + result := geocode_address(IN_ADDY); + END IF; + + -- Next best is zipcode, if we've got it + IF result IS NULL AND IN_ADDY.zip IS NOT NULL THEN + result := geocode_zip(IN_ADDY); + END IF; + + -- No zip code, try state/location, need both or we'll get too much stuffs. + IF result IS NULL AND IN_ADDY.stateAbbrev IS NOT NULL AND IN_ADDY.location IS NOT NULL THEN + result := geocode_location(IN_ADDY); + END IF; + + IF result IS NULL THEN + RETURN; + END IF; + + ADDY.address := IN_ADDY.address; + ADDY.internal := IN_ADDY.internal; + + LOOP + FETCH result INTO rec; + + IF NOT FOUND THEN + RETURN; + END IF; + + ADDY.preDirAbbrev := rec.fedirp; + ADDY.streetName := rec.fename; + ADDY.streetTypeAbbrev := rec.fetype; + ADDY.postDirAbbrev := rec.fedirs; + ADDY.location := rec.place; + ADDY.stateAbbrev := rec.state; + ADDY.zip := rec.zip; + ADDY.parsed := TRUE; + + GEOMOUT := rec.address_geom; + RATING := rec.rating; + + RETURN NEXT; + END LOOP; + + RETURN; + +END; +$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode_address.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode_address.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode_address.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode_address.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,94 @@ +-- geocode(cursor, address, directionPrefix, streetName, +-- streetTypeAbbreviation, directionSuffix, location, stateAbbreviation, +-- zipCode) +CREATE OR REPLACE FUNCTION geocode_address( + parsed NORM_ADDY +) RETURNS REFCURSOR +AS $_$ +DECLARE + result REFCURSOR; + tempString VARCHAR; + ziplookup RECORD; +BEGIN + -- The first step is to determine what weve been given, and if its enough. + IF parsed.address IS NULL THEN + -- The address is manditory. + -- Without it, wed be wandering into strangers homes all the time. + RETURN NULL; + END IF; + + IF parsed.streetName IS NULL THEN + -- A street name must be given. Think about it. + RETURN NULL; + END IF; + + IF parsed.zip IS NOT NULL THEN + -- If the zip code is given, it is the most useful way to narrow the + -- search. We will try it first, and if no results match, we will move + -- on to a location search. There is no fuzzy searching on zip codes. + result := geocode_address_zip(result, parsed); + IF result IS NOT NULL THEN + RETURN result; + END IF; + -- If we weren't able to find one using the zip code, but the zip code + -- exists, and location is null, then fill in the location and/or state + -- based on the zip code so that the location lookup has a chance. + IF parsed.stateAbbrev IS NULL OR parsed.location IS NULL THEN + SELECT INTO ziplookup * FROM zip_lookup_base JOIN state_lookup ON (state = name) WHERE zip = parsed.zip; + IF FOUND THEN + parsed.stateAbbrev := coalesce(parsed.stateAbbrev,ziplookup.abbrev); + parsed.location := coalesce(parsed.location,ziplookup.city); + END IF; + END IF; + END IF; + + -- After now, the location becomes manditory. + IF parsed.location IS NOT NULL THEN + -- location may be useful, it may not. The first step is to determine if + -- there are any potenial matches in the place and countysub fields. + -- This is done against the lookup tables, and will save us time on much + -- larger queries if they dont match. + tempString := location_extract_place_exact(parsed.location, parsed.stateAbbrev); + IF tempString IS NOT NULL THEN + result := geocode_address_place_exact(result, parsed); + IF result IS NOT NULL THEN + RETURN result; + END IF; + END IF; + + tempString := location_extract_countysub_exact(parsed.location, parsed.stateAbbrev); + IF tempString IS NOT NULL THEN + result := geocode_address_countysub_exact(result, parsed); + IF result IS NOT NULL THEN + RETURN result; + END IF; + END IF; + + tempString := location_extract_place_fuzzy(parsed.location, parsed.stateAbbrev); + IF tempString IS NOT NULL THEN + result := geocode_address_place_fuzzy(result, parsed); + IF result IS NOT NULL THEN + RETURN result; + END IF; + END IF; + + tempString := location_extract_countysub_fuzzy(parsed.location, parsed.stateAbbrev); + IF tempString IS NOT NULL THEN + result := geocode_address_countysub_fuzzy(result, parsed); + IF result IS NOT NULL THEN + RETURN result; + END IF; + END IF; + END IF; + + -- Try with just the state if we can't find the location + IF parsed.stateAbbrev IS NOT NULL THEN + result := geocode_address_state(result, parsed); + IF result IS NOT NULL THEN + RETURN result; + END IF; + END IF; + + RETURN NULL; +END; +$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode_address_countysub_exact.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode_address_countysub_exact.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode_address_countysub_exact.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode_address_countysub_exact.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,161 @@ +CREATE OR REPLACE FUNCTION geocode_address_countysub_exact( + result REFCURSOR, + parsed NORM_ADDY +) RETURNS REFCURSOR +AS $_$ +DECLARE + result REFCURSOR; + tempString VARCHAR; + tempInt INTEGER; +BEGIN + IF parsed.location IS NULL THEN + -- location is manditory. This is the location geocoder after all. + RETURN NULL; + END IF; + + -- Check to see if the road name can be matched. + IF parsed.stateAbbrev IS NOT NULL THEN + SELECT INTO tempInt count(*) FROM tiger_geocode_roads + WHERE parsed.location = tiger_geocode_roads.cousub + AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) + AND parsed.stateAbbrev = tiger_geocode_roads.state; + ELSE + SELECT INTO tempInt count(*) FROM tiger_geocode_roads + WHERE parsed.location = tiger_geocode_roads.cousub + AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename); + END IF; + + IF tempInt = 0 THEN + RETURN NULL; + ELSE + -- The road name matches, now we check to see if the addresses match + IF parsed.stateAbbrev IS NOT NULL THEN + SELECT INTO tempInt count(*) + FROM ( + SELECT *, rate_attributes(parsed.preDirAbbrev, tiger_geocode_roads.fedirp, + parsed.streetName, tiger_geocode_roads.fename, parsed.streetTypeAbbrev, + tiger_geocode_roads.fetype, parsed.postDirAbbrev, + tiger_geocode_roads.fedirs) as rating + FROM tiger_geocode_roads + WHERE parsed.location = tiger_geocode_roads.cousub + AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) + AND parsed.stateAbbrev = tiger_geocode_roads.state + ) AS subquery, roads_local + WHERE includes_address(parsed.address, roads_local.fraddl, roads_local.toaddl, + roads_local.fraddr, roads_local.toaddr) + AND subquery.tlid = roads_local.tlid; + ELSE + SELECT INTO tempInt count(*) + FROM ( + SELECT *, rate_attributes(parsed.preDirAbbrev, tiger_geocode_roads.fedirp, + parsed.streetName, tiger_geocode_roads.fename, parsed.streetTypeAbbrev, + tiger_geocode_roads.fetype, parsed.postDirAbbrev, + tiger_geocode_roads.fedirs) as rating + FROM tiger_geocode_roads + WHERE parsed.location = tiger_geocode_roads.cousub + AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) + ) AS subquery, roads_local + WHERE includes_address(parsed.address, roads_local.fraddl, roads_local.toaddl, + roads_local.fraddr, roads_local.toaddr) + AND subquery.tlid = roads_local.tlid; + END IF; + + IF tempInt = 0 THEN + RETURN NULL; + ELSE + IF parsed.stateAbbrev IS NOT NULL THEN + OPEN result FOR + SELECT + roads_local.fedirp as fedirp, + roads_local.fename as fename, + roads_local.fetype as fetype, + roads_local.fedirs as fedirs, + CASE WHEN (parsed.address % 2) = roads_local.fraddl + OR (parsed.address % 2) = roads_local.toaddl + THEN coalesce(pl.name,zipl.city,csl.name,col.name) ELSE coalesce(pr.name,zipr.city,csr.name,cor.name) END as place, + CASE WHEN (parsed.address % 2) = roads_local.fraddl + OR (parsed.address % 2) = roads_local.toaddl + THEN sl.abbrev ELSE sr.abbrev END as state, + CASE WHEN (parsed.address % 2) = roads_local.fraddl + OR (parsed.address % 2) = roads_local.toaddl + THEN zipl ELSE zipr END as zip, + interpolate_from_address(parsed.address, roads_local.fraddl, + roads_local.toaddl, roads_local.fraddr, roads_local.toaddr, + roads_local.geom) as address_geom, + subquery.rating as rating + FROM ( + SELECT *, rate_attributes(parsed.preDirAbbrev, tiger_geocode_roads.fedirp, + parsed.streetName, tiger_geocode_roads.fename, parsed.streetTypeAbbrev, + tiger_geocode_roads.fetype, parsed.postDirAbbrev, + tiger_geocode_roads.fedirs, parsed.location, + tiger_geocode_roads.cousub) as rating + FROM tiger_geocode_roads + WHERE parsed.location = tiger_geocode_roads.cousub + AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) + AND parsed.stateAbbrev = tiger_geocode_roads.state + ) AS subquery + JOIN roads_local ON (subquery.tlid = roads_local.tlid) + JOIN state_lookup sl ON (roads_local.statel = sl.st_code) + JOIN state_lookup sr ON (roads_local.stater = sr.st_code) + LEFT JOIN place_lookup pl ON (roads_local.statel = pl.st_code AND roads_local.placel = pl.pl_code) + LEFT JOIN place_lookup pr ON (roads_local.stater = pr.st_code AND roads_local.placer = pr.pl_code) + LEFT JOIN county_lookup col ON (roads_local.statel = col.st_code AND roads_local.countyl = col.co_code) + LEFT JOIN county_lookup cor ON (roads_local.stater = cor.st_code AND roads_local.countyr = cor.co_code) + LEFT JOIN countysub_lookup csl ON (roads_local.statel = csl.st_code AND roads_local.countyl = csl.co_code AND roads_local.cousubl = csl.cs_code) + LEFT JOIN countysub_lookup csr ON (roads_local.stater = csr.st_code AND roads_local.countyr = csr.co_code AND roads_local.cousubr = csr.cs_code) + LEFT JOIN zip_lookup_base zipl ON (roads_local.zipl = zipl.zip) + LEFT JOIN zip_lookup_base zipr ON (roads_local.zipr = zipr.zip) + WHERE includes_address(parsed.address, roads_local.fraddl, roads_local.toaddl, + roads_local.fraddr, roads_local.toaddr) + ORDER BY subquery.rating; + RETURN result; + ELSE + OPEN result FOR + SELECT + roads_local.fedirp as fedirp, + roads_local.fename as fename, + roads_local.fetype as fetype, + roads_local.fedirs as fedirs, + CASE WHEN (parsed.address % 2) = roads_local.fraddl + OR (parsed.address % 2) = roads_local.toaddl + THEN coalesce(pl.name,zipl.city,csl.name,col.name) ELSE coalesce(pr.name,zipr.city,csr.name,cor.name) END as place, + CASE WHEN (parsed.address % 2) = roads_local.fraddl + OR (parsed.address % 2) = roads_local.toaddl + THEN sl.abbrev ELSE sr.abbrev END as state, + CASE WHEN (parsed.address % 2) = roads_local.fraddl + OR (parsed.address % 2) = roads_local.toaddl + THEN zipl ELSE zipr END as zip, + interpolate_from_address(parsed.address, roads_local.fraddl, + roads_local.toaddl, roads_local.fraddr, roads_local.toaddr, + roads_local.geom) as address_geom, + subquery.rating as rating + FROM ( + SELECT *, rate_attributes(parsed.preDirAbbrev, tiger_geocode_roads.fedirp, + parsed.streetName, tiger_geocode_roads.fename, parsed.streetTypeAbbrev, + tiger_geocode_roads.fetype, parsed.postDirAbbrev, + tiger_geocode_roads.fedirs, parsed.location, + tiger_geocode_roads.cousub) as rating + FROM tiger_geocode_roads + WHERE parsed.location = tiger_geocode_roads.cousub + AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) + ) AS subquery + JOIN roads_local ON (subquery.tlid = roads_local.tlid) + JOIN state_lookup sl ON (roads_local.statel = sl.st_code) + JOIN state_lookup sr ON (roads_local.stater = sr.st_code) + LEFT JOIN place_lookup pl ON (roads_local.statel = pl.st_code AND roads_local.placel = pl.pl_code) + LEFT JOIN place_lookup pr ON (roads_local.stater = pr.st_code AND roads_local.placer = pr.pl_code) + LEFT JOIN county_lookup col ON (roads_local.statel = col.st_code AND roads_local.countyl = col.co_code) + LEFT JOIN county_lookup cor ON (roads_local.stater = cor.st_code AND roads_local.countyr = cor.co_code) + LEFT JOIN countysub_lookup csl ON (roads_local.statel = csl.st_code AND roads_local.countyl = csl.co_code AND roads_local.cousubl = csl.cs_code) + LEFT JOIN countysub_lookup csr ON (roads_local.stater = csr.st_code AND roads_local.countyr = csr.co_code AND roads_local.cousubr = csr.cs_code) + LEFT JOIN zip_lookup_base zipl ON (roads_local.zipl = zipl.zip) + LEFT JOIN zip_lookup_base zipr ON (roads_local.zipr = zipr.zip) + WHERE includes_address(parsed.address, roads_local.fraddl, roads_local.toaddl, + roads_local.fraddr, roads_local.toaddr) + ORDER BY subquery.rating; + RETURN result; + END IF; + END IF; + END IF; +END; +$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode_address_countysub_fuzzy.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode_address_countysub_fuzzy.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode_address_countysub_fuzzy.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode_address_countysub_fuzzy.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,162 @@ +CREATE OR REPLACE FUNCTION geocode_address_countysub_fuzzy( + result REFCURSOR, + parsed NORM_ADDY +) RETURNS REFCURSOR +AS $_$ +DECLARE + result REFCURSOR; + tempString VARCHAR; + tempInt INTEGER; +BEGIN + -- The first step is to determine what weve been given, and if its enough. + IF parsed.location IS NULL THEN + -- location is manditory. This is the location geocoder after all. + RETURN NULL; + END IF; + + -- Check to see if the road name can be matched. + IF parsed.stateAbbrev IS NOT NULL THEN + SELECT INTO tempInt count(*) FROM tiger_geocode_roads + WHERE soundex(parsed.location) = soundex(tiger_geocode_roads.cousub) + AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) + AND parsed.stateAbbrev = tiger_geocode_roads.state; + ELSE + SELECT INTO tempInt count(*) FROM tiger_geocode_roads + WHERE soundex(parsed.location) = soundex(tiger_geocode_roads.cousub) + AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename); + END IF; + + IF tempInt = 0 THEN + RETURN NULL; + END IF; + + -- The road name matches, now we check to see if the addresses match + IF parsed.stateAbbrev IS NOT NULL THEN + SELECT INTO tempInt count(*) + FROM ( + SELECT *, rate_attributes(parsed.preDirAbbrev, tiger_geocode_roads.fedirp, + parsed.streetName, tiger_geocode_roads.fename, parsed.streetTypeAbbrev, + tiger_geocode_roads.fetype, parsed.postDirAbbrev, + tiger_geocode_roads.fedirs) as rating + FROM tiger_geocode_roads + WHERE soundex(parsed.location) = soundex(tiger_geocode_roads.cousub) + AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) + AND parsed.stateAbbrev = tiger_geocode_roads.state + ) AS subquery, roads_local + WHERE includes_address(parsed.address, roads_local.fraddl, roads_local.toaddl, + roads_local.fraddr, roads_local.toaddr) + AND subquery.tlid = roads_local.tlid; + ELSE + SELECT INTO tempInt count(*) + FROM ( + SELECT *, rate_attributes(parsed.preDirAbbrev, tiger_geocode_roads.fedirp, + parsed.streetName, tiger_geocode_roads.fename, parsed.streetTypeAbbrev, + tiger_geocode_roads.fetype, parsed.postDirAbbrev, + tiger_geocode_roads.fedirs) as rating + FROM tiger_geocode_roads + WHERE soundex(parsed.location) = soundex(tiger_geocode_roads.cousub) + AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) + ) AS subquery, roads_local + WHERE includes_address(parsed.address, roads_local.fraddl, roads_local.toaddl, + roads_local.fraddr, roads_local.toaddr) + AND subquery.tlid = roads_local.tlid; + END IF; + + IF tempInt = 0 THEN + RETURN NULL; + END IF; + + IF parsed.stateAbbrev IS NOT NULL THEN + OPEN result FOR + SELECT + roads_local.fedirp as fedirp, + roads_local.fename as fename, + roads_local.fetype as fetype, + roads_local.fedirs as fedirs, + CASE WHEN (parsed.address % 2) = roads_local.fraddl + OR (parsed.address % 2) = roads_local.toaddl + THEN coalesce(pl.name,zipl.city,csl.name,col.name) ELSE coalesce(pr.name,zipr.city,csr.name,cor.name) END as place, + CASE WHEN (parsed.address % 2) = roads_local.fraddl + OR (parsed.address % 2) = roads_local.toaddl + THEN sl.abbrev ELSE sr.abbrev END as state, + CASE WHEN (parsed.address % 2) = roads_local.fraddl + OR (parsed.address % 2) = roads_local.toaddl + THEN zipl ELSE zipr END as zip, + interpolate_from_address(parsed.address, roads_local.fraddl, + roads_local.toaddl, roads_local.fraddr, roads_local.toaddr, + roads_local.geom) as address_geom, + subquery.rating as rating + FROM ( + SELECT *, rate_attributes(parsed.preDirAbbrev, tiger_geocode_roads.fedirp, + parsed.streetName, tiger_geocode_roads.fename, parsed.streetTypeAbbrev, + tiger_geocode_roads.fetype, parsed.postDirAbbrev, + tiger_geocode_roads.fedirs, parsed.location, + tiger_geocode_roads.cousub) as rating + FROM tiger_geocode_roads + WHERE soundex(parsed.location) = soundex(tiger_geocode_roads.cousub) + AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) + AND parsed.stateAbbrev = tiger_geocode_roads.state + ) AS subquery + JOIN roads_local ON (subquery.tlid = roads_local.tlid) + JOIN state_lookup sl ON (roads_local.statel = sl.st_code) + JOIN state_lookup sr ON (roads_local.stater = sr.st_code) + LEFT JOIN place_lookup pl ON (roads_local.statel = pl.st_code AND roads_local.placel = pl.pl_code) + LEFT JOIN place_lookup pr ON (roads_local.stater = pr.st_code AND roads_local.placer = pr.pl_code) + LEFT JOIN county_lookup col ON (roads_local.statel = col.st_code AND roads_local.countyl = col.co_code) + LEFT JOIN county_lookup cor ON (roads_local.stater = cor.st_code AND roads_local.countyr = cor.co_code) + LEFT JOIN countysub_lookup csl ON (roads_local.statel = csl.st_code AND roads_local.countyl = csl.co_code AND roads_local.cousubl = csl.cs_code) + LEFT JOIN countysub_lookup csr ON (roads_local.stater = csr.st_code AND roads_local.countyr = csr.co_code AND roads_local.cousubr = csr.cs_code) + LEFT JOIN zip_lookup_base zipl ON (roads_local.zipl = zipl.zip) + LEFT JOIN zip_lookup_base zipr ON (roads_local.zipr = zipr.zip) + WHERE includes_address(parsed.address, roads_local.fraddl, roads_local.toaddl, + roads_local.fraddr, roads_local.toaddr) + ORDER BY subquery.rating; + RETURN result; + ELSE + OPEN result FOR + SELECT + roads_local.fedirp as fedirp, + roads_local.fename as fename, + roads_local.fetype as fetype, + roads_local.fedirs as fedirs, + CASE WHEN (parsed.address % 2) = roads_local.fraddl + OR (parsed.address % 2) = roads_local.toaddl + THEN coalesce(pl.name,zipl.city,csl.name,col.name) ELSE coalesce(pr.name,zipr.city,csr.name,cor.name) END as place, + CASE WHEN (parsed.address % 2) = roads_local.fraddl + OR (parsed.address % 2) = roads_local.toaddl + THEN sl.abbrev ELSE sr.abbrev END as state, + CASE WHEN (parsed.address % 2) = roads_local.fraddl + OR (parsed.address % 2) = roads_local.toaddl + THEN zipl ELSE zipr END as zip, + interpolate_from_address(parsed.address, roads_local.fraddl, + roads_local.toaddl, roads_local.fraddr, roads_local.toaddr, + roads_local.geom) as address_geom, + subquery.rating as rating + FROM ( + SELECT *, rate_attributes(parsed.preDirAbbrev, tiger_geocode_roads.fedirp, + parsed.streetName, tiger_geocode_roads.fename, parsed.streetTypeAbbrev, + tiger_geocode_roads.fetype, parsed.postDirAbbrev, + tiger_geocode_roads.fedirs, parsed.location, + tiger_geocode_roads.cousub) as rating + FROM tiger_geocode_roads + WHERE soundex(parsed.location) = soundex(tiger_geocode_roads.cousub) + AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) + ) AS subquery + JOIN roads_local ON (subquery.tlid = roads_local.tlid) + JOIN state_lookup sl ON (roads_local.statel = sl.st_code) + JOIN state_lookup sr ON (roads_local.stater = sr.st_code) + LEFT JOIN place_lookup pl ON (roads_local.statel = pl.st_code AND roads_local.placel = pl.pl_code) + LEFT JOIN place_lookup pr ON (roads_local.stater = pr.st_code AND roads_local.placer = pr.pl_code) + LEFT JOIN county_lookup col ON (roads_local.statel = col.st_code AND roads_local.countyl = col.co_code) + LEFT JOIN county_lookup cor ON (roads_local.stater = cor.st_code AND roads_local.countyr = cor.co_code) + LEFT JOIN countysub_lookup csl ON (roads_local.statel = csl.st_code AND roads_local.countyl = csl.co_code AND roads_local.cousubl = csl.cs_code) + LEFT JOIN countysub_lookup csr ON (roads_local.stater = csr.st_code AND roads_local.countyr = csr.co_code AND roads_local.cousubr = csr.cs_code) + LEFT JOIN zip_lookup_base zipl ON (roads_local.zipl = zipl.zip) + LEFT JOIN zip_lookup_base zipr ON (roads_local.zipr = zipr.zip) + WHERE includes_address(parsed.address, roads_local.fraddl, roads_local.toaddl, + roads_local.fraddr, roads_local.toaddr) + ORDER BY subquery.rating; + RETURN result; + END IF; +END; +$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode_address_place_exact.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode_address_place_exact.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode_address_place_exact.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode_address_place_exact.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,156 @@ +CREATE OR REPLACE FUNCTION geocode_address_place_exact( + result REFCURSOR, + parsed NORM_ADDY +) RETURNS REFCURSOR +AS $_$ +DECLARE + result REFCURSOR; + tempString VARCHAR; + tempInt INTEGER; +BEGIN + -- Check to see if the road name can be matched. + IF parsed.stateAbbrev IS NOT NULL THEN + SELECT INTO tempInt count(*) FROM tiger_geocode_roads + WHERE parsed.location = tiger_geocode_roads.place + AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) + AND parsed.stateAbbrev = tiger_geocode_roads.state; + ELSE + SELECT INTO tempInt count(*) FROM tiger_geocode_roads + WHERE parsed.location = tiger_geocode_roads.place + AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename); + END IF; + + IF tempInt = 0 THEN + RETURN NULL; + END IF; + + -- The road name matches, now we check to see if the addresses match + IF parsed.stateAbbrev IS NOT NULL THEN + SELECT INTO tempInt count(*) + FROM ( + SELECT *, rate_attributes(parsed.preDirAbbrev, tiger_geocode_roads.fedirp, + parsed.streetName, tiger_geocode_roads.fename, parsed.streetTypeAbbrev, + tiger_geocode_roads.fetype, parsed.postDirAbbrev, + tiger_geocode_roads.fedirs) as rating + FROM tiger_geocode_roads + WHERE parsed.location = tiger_geocode_roads.place + AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) + AND parsed.stateAbbrev = tiger_geocode_roads.state + ) AS subquery, roads_local + WHERE includes_address(parsed.address, roads_local.fraddl, roads_local.toaddl, + roads_local.fraddr, roads_local.toaddr) + AND subquery.tlid = roads_local.tlid; + ELSE + SELECT INTO tempInt count(*) + FROM ( + SELECT *, rate_attributes(parsed.preDirAbbrev, tiger_geocode_roads.fedirp, + parsed.streetName, tiger_geocode_roads.fename, parsed.streetTypeAbbrev, + tiger_geocode_roads.fetype, parsed.postDirAbbrev, + tiger_geocode_roads.fedirs) as rating + FROM tiger_geocode_roads + WHERE parsed.location = tiger_geocode_roads.place + AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) + ) AS subquery, roads_local + WHERE includes_address(parsed.address, roads_local.fraddl, roads_local.toaddl, + roads_local.fraddr, roads_local.toaddr) + AND subquery.tlid = roads_local.tlid; + END IF; + + IF tempInt = 0 THEN + return NULL; + END IF; + + IF parsed.stateAbbrev IS NOT NULL THEN + OPEN result FOR + SELECT + roads_local.fedirp as fedirp, + roads_local.fename as fename, + roads_local.fetype as fetype, + roads_local.fedirs as fedirs, + CASE WHEN (parsed.address % 2) = roads_local.fraddl + OR (parsed.address % 2) = roads_local.toaddl + THEN coalesce(pl.name,zipl.city,csl.name,col.name) ELSE coalesce(pr.name,zipr.city,csr.name,cor.name) END as place, + CASE WHEN (parsed.address % 2) = roads_local.fraddl + OR (parsed.address % 2) = roads_local.toaddl + THEN sl.abbrev ELSE sr.abbrev END as state, + CASE WHEN (parsed.address % 2) = roads_local.fraddl + OR (parsed.address % 2) = roads_local.toaddl + THEN zipl ELSE zipr END as zip, + interpolate_from_address(parsed.address, roads_local.fraddl, + roads_local.toaddl, roads_local.fraddr, roads_local.toaddr, + roads_local.geom) as address_geom, + subquery.rating as rating + FROM ( + SELECT *, rate_attributes(parsed.preDirAbbrev, tiger_geocode_roads.fedirp, + parsed.streetName, tiger_geocode_roads.fename, parsed.streetTypeAbbrev, + tiger_geocode_roads.fetype, parsed.postDirAbbrev, + tiger_geocode_roads.fedirs, parsed.location, + tiger_geocode_roads.place) as rating + FROM tiger_geocode_roads + WHERE parsed.location = tiger_geocode_roads.place + AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) + AND parsed.stateAbbrev = tiger_geocode_roads.state + ) AS subquery + JOIN roads_local ON (subquery.tlid = roads_local.tlid) + JOIN state_lookup sl ON (roads_local.statel = sl.st_code) + JOIN state_lookup sr ON (roads_local.stater = sr.st_code) + LEFT JOIN place_lookup pl ON (roads_local.statel = pl.st_code AND roads_local.placel = pl.pl_code) + LEFT JOIN place_lookup pr ON (roads_local.stater = pr.st_code AND roads_local.placer = pr.pl_code) + LEFT JOIN county_lookup col ON (roads_local.statel = col.st_code AND roads_local.countyl = col.co_code) + LEFT JOIN county_lookup cor ON (roads_local.stater = cor.st_code AND roads_local.countyr = cor.co_code) + LEFT JOIN countysub_lookup csl ON (roads_local.statel = csl.st_code AND roads_local.countyl = csl.co_code AND roads_local.cousubl = csl.cs_code) + LEFT JOIN countysub_lookup csr ON (roads_local.stater = csr.st_code AND roads_local.countyr = csr.co_code AND roads_local.cousubr = csr.cs_code) + LEFT JOIN zip_lookup_base zipl ON (roads_local.zipl = zipl.zip) + LEFT JOIN zip_lookup_base zipr ON (roads_local.zipr = zipr.zip) + WHERE includes_address(parsed.address, roads_local.fraddl, roads_local.toaddl, + roads_local.fraddr, roads_local.toaddr) + ORDER BY subquery.rating; + RETURN result; + ELSE + OPEN result FOR + SELECT + roads_local.fedirp as fedirp, + roads_local.fename as fename, + roads_local.fetype as fetype, + roads_local.fedirs as fedirs, + CASE WHEN (parsed.address % 2) = roads_local.fraddl + OR (parsed.address % 2) = roads_local.toaddl + THEN coalesce(pl.name,zipl.city,csl.name,col.name) ELSE coalesce(pr.name,zipr.city,csr.name,cor.name) END as place, + CASE WHEN (parsed.address % 2) = roads_local.fraddl + OR (parsed.address % 2) = roads_local.toaddl + THEN sl.abbrev ELSE sr.abbrev END as state, + CASE WHEN (parsed.address % 2) = roads_local.fraddl + OR (parsed.address % 2) = roads_local.toaddl + THEN zipl ELSE zipr END as zip, + interpolate_from_address(parsed.address, roads_local.fraddl, + roads_local.toaddl, roads_local.fraddr, roads_local.toaddr, + roads_local.geom) as address_geom, + subquery.rating as rating + FROM ( + SELECT *, rate_attributes(parsed.preDirAbbrev, tiger_geocode_roads.fedirp, + parsed.streetName, tiger_geocode_roads.fename, parsed.streetTypeAbbrev, + tiger_geocode_roads.fetype, parsed.postDirAbbrev, + tiger_geocode_roads.fedirs, parsed.location, + tiger_geocode_roads.place) as rating + FROM tiger_geocode_roads + WHERE parsed.location = tiger_geocode_roads.place + AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) + ) AS subquery + JOIN roads_local ON (subquery.tlid = roads_local.tlid) + JOIN state_lookup sl ON (roads_local.statel = sl.st_code) + JOIN state_lookup sr ON (roads_local.stater = sr.st_code) + LEFT JOIN place_lookup pl ON (roads_local.statel = pl.st_code AND roads_local.placel = pl.pl_code) + LEFT JOIN place_lookup pr ON (roads_local.stater = pr.st_code AND roads_local.placer = pr.pl_code) + LEFT JOIN county_lookup col ON (roads_local.statel = col.st_code AND roads_local.countyl = col.co_code) + LEFT JOIN county_lookup cor ON (roads_local.stater = cor.st_code AND roads_local.countyr = cor.co_code) + LEFT JOIN countysub_lookup csl ON (roads_local.statel = csl.st_code AND roads_local.countyl = csl.co_code AND roads_local.cousubl = csl.cs_code) + LEFT JOIN countysub_lookup csr ON (roads_local.stater = csr.st_code AND roads_local.countyr = csr.co_code AND roads_local.cousubr = csr.cs_code) + LEFT JOIN zip_lookup_base zipl ON (roads_local.zipl = zipl.zip) + LEFT JOIN zip_lookup_base zipr ON (roads_local.zipr = zipr.zip) + WHERE includes_address(parsed.address, roads_local.fraddl, roads_local.toaddl, + roads_local.fraddr, roads_local.toaddr) + ORDER BY subquery.rating; + RETURN result; + END IF; +END; +$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode_address_place_fuzzy.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode_address_place_fuzzy.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode_address_place_fuzzy.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode_address_place_fuzzy.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,155 @@ +CREATE OR REPLACE FUNCTION geocode_address_place_fuzzy( + result REFCURSOR, + parsed NORM_ADDY +) RETURNS REFCURSOR +AS $_$ +DECLARE + tempString VARCHAR; + tempInt INTEGER; +BEGIN + -- Check to see if the road name can be matched. + IF parsed.stateAbbrev IS NOT NULL THEN + SELECT INTO tempInt count(*) FROM tiger_geocode_roads + WHERE soundex(parsed.location) = soundex(tiger_geocode_roads.place) + AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) + AND parsed.stateAbbrev = tiger_geocode_roads.state; + ELSE + SELECT INTO tempInt count(*) FROM tiger_geocode_roads + WHERE soundex(parsed.location) = soundex(tiger_geocode_roads.place) + AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename); + END IF; + + IF tempInt = 0 THEN + RETURN NULL; + END IF; + + -- The road name matches, now we check to see if the addresses match + IF parsed.stateAbbrev IS NOT NULL THEN + SELECT INTO tempInt count(*) + FROM ( + SELECT *, rate_attributes(parsed.preDirAbbrev, tiger_geocode_roads.fedirp, + parsed.streetName, tiger_geocode_roads.fename, parsed.streetTypeAbbrev, + tiger_geocode_roads.fetype, parsed.postDirAbbrev, + tiger_geocode_roads.fedirs) as rating + FROM tiger_geocode_roads + WHERE soundex(parsed.location) = soundex(tiger_geocode_roads.place) + AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) + AND parsed.stateAbbrev = tiger_geocode_roads.state + ) AS subquery, roads_local + WHERE includes_address(parsed.address, roads_local.fraddl, roads_local.toaddl, + roads_local.fraddr, roads_local.toaddr) + AND subquery.tlid = roads_local.tlid; + ELSE + SELECT INTO tempInt count(*) + FROM ( + SELECT *, rate_attributes(parsed.preDirAbbrev, tiger_geocode_roads.fedirp, + parsed.streetName, tiger_geocode_roads.fename, parsed.streetTypeAbbrev, + tiger_geocode_roads.fetype, parsed.postDirAbbrev, + tiger_geocode_roads.fedirs) as rating + FROM tiger_geocode_roads + WHERE soundex(parsed.location) = soundex(tiger_geocode_roads.place) + AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) + ) AS subquery, roads_local + WHERE includes_address(parsed.address, roads_local.fraddl, roads_local.toaddl, + roads_local.fraddr, roads_local.toaddr) + AND subquery.tlid = roads_local.tlid; + END IF; + + IF tempInt = 0 THEN + RETURN NULL; + END IF; + + IF parsed.stateAbbrev IS NOT NULL THEN + OPEN result FOR + SELECT + roads_local.fedirp as fedirp, + roads_local.fename as fename, + roads_local.fetype as fetype, + roads_local.fedirs as fedirs, + CASE WHEN (parsed.address % 2) = roads_local.fraddl + OR (parsed.address % 2) = roads_local.toaddl + THEN coalesce(pl.name,zipl.city,csl.name,col.name) ELSE coalesce(pr.name,zipr.city,csr.name,cor.name) END as place, + CASE WHEN (parsed.address % 2) = roads_local.fraddl + OR (parsed.address % 2) = roads_local.toaddl + THEN sl.abbrev ELSE sr.abbrev END as state, + CASE WHEN (parsed.address % 2) = roads_local.fraddl + OR (parsed.address % 2) = roads_local.toaddl + THEN zipl ELSE zipr END as zip, + interpolate_from_address(parsed.address, roads_local.fraddl, + roads_local.toaddl, roads_local.fraddr, roads_local.toaddr, + roads_local.geom) as address_geom, + subquery.rating as rating + FROM ( + SELECT *, rate_attributes(parsed.preDirAbbrev, tiger_geocode_roads.fedirp, + parsed.streetName, tiger_geocode_roads.fename, parsed.streetTypeAbbrev, + tiger_geocode_roads.fetype, parsed.postDirAbbrev, + tiger_geocode_roads.fedirs, parsed.location, + tiger_geocode_roads.place) as rating + FROM tiger_geocode_roads + WHERE soundex(parsed.location) = soundex(tiger_geocode_roads.place) + AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) + AND parsed.stateAbbrev = tiger_geocode_roads.state + ) AS subquery + JOIN roads_local ON (subquery.tlid = roads_local.tlid) + JOIN state_lookup sl ON (roads_local.statel = sl.st_code) + JOIN state_lookup sr ON (roads_local.stater = sr.st_code) + LEFT JOIN place_lookup pl ON (roads_local.statel = pl.st_code AND roads_local.placel = pl.pl_code) + LEFT JOIN place_lookup pr ON (roads_local.stater = pr.st_code AND roads_local.placer = pr.pl_code) + LEFT JOIN county_lookup col ON (roads_local.statel = col.st_code AND roads_local.countyl = col.co_code) + LEFT JOIN county_lookup cor ON (roads_local.stater = cor.st_code AND roads_local.countyr = cor.co_code) + LEFT JOIN countysub_lookup csl ON (roads_local.statel = csl.st_code AND roads_local.countyl = csl.co_code AND roads_local.cousubl = csl.cs_code) + LEFT JOIN countysub_lookup csr ON (roads_local.stater = csr.st_code AND roads_local.countyr = csr.co_code AND roads_local.cousubr = csr.cs_code) + LEFT JOIN zip_lookup_base zipl ON (roads_local.zipl = zipl.zip) + LEFT JOIN zip_lookup_base zipr ON (roads_local.zipr = zipr.zip) + WHERE includes_address(parsed.address, roads_local.fraddl, roads_local.toaddl, + roads_local.fraddr, roads_local.toaddr) + ORDER BY subquery.rating; + RETURN result; + ELSE + OPEN result FOR + SELECT + roads_local.fedirp as fedirp, + roads_local.fename as fename, + roads_local.fetype as fetype, + roads_local.fedirs as fedirs, + CASE WHEN (parsed.address % 2) = roads_local.fraddl + OR (parsed.address % 2) = roads_local.toaddl + THEN coalesce(pl.name,zipl.city,csl.name,col.name) ELSE coalesce(pr.name,zipr.city,csr.name,cor.name) END as place, + CASE WHEN (parsed.address % 2) = roads_local.fraddl + OR (parsed.address % 2) = roads_local.toaddl + THEN sl.abbrev ELSE sr.abbrev END as state, + CASE WHEN (parsed.address % 2) = roads_local.fraddl + OR (parsed.address % 2) = roads_local.toaddl + THEN zipl ELSE zipr END as zip, + interpolate_from_address(parsed.address, roads_local.fraddl, + roads_local.toaddl, roads_local.fraddr, roads_local.toaddr, + roads_local.geom) as address_geom, + subquery.rating as rating + FROM ( + SELECT *, rate_attributes(parsed.preDirAbbrev, tiger_geocode_roads.fedirp, + parsed.streetName, tiger_geocode_roads.fename, parsed.streetTypeAbbrev, + tiger_geocode_roads.fetype, parsed.postDirAbbrev, + tiger_geocode_roads.fedirs, parsed.location, + tiger_geocode_roads.place) as rating + FROM tiger_geocode_roads + WHERE soundex(parsed.location) = soundex(tiger_geocode_roads.place) + AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) + ) AS subquery + JOIN roads_local ON (subquery.tlid = roads_local.tlid) + JOIN state_lookup sl ON (roads_local.statel = sl.st_code) + JOIN state_lookup sr ON (roads_local.stater = sr.st_code) + LEFT JOIN place_lookup pl ON (roads_local.statel = pl.st_code AND roads_local.placel = pl.pl_code) + LEFT JOIN place_lookup pr ON (roads_local.stater = pr.st_code AND roads_local.placer = pr.pl_code) + LEFT JOIN county_lookup col ON (roads_local.statel = col.st_code AND roads_local.countyl = col.co_code) + LEFT JOIN county_lookup cor ON (roads_local.stater = cor.st_code AND roads_local.countyr = cor.co_code) + LEFT JOIN countysub_lookup csl ON (roads_local.statel = csl.st_code AND roads_local.countyl = csl.co_code AND roads_local.cousubl = csl.cs_code) + LEFT JOIN countysub_lookup csr ON (roads_local.stater = csr.st_code AND roads_local.countyr = csr.co_code AND roads_local.cousubr = csr.cs_code) + LEFT JOIN zip_lookup_base zipl ON (roads_local.zipl = zipl.zip) + LEFT JOIN zip_lookup_base zipr ON (roads_local.zipr = zipr.zip) + WHERE includes_address(parsed.address, roads_local.fraddl, roads_local.toaddl, + roads_local.fraddr, roads_local.toaddr) + ORDER BY subquery.rating; + RETURN result; + END IF; +END; +$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode_address_state.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode_address_state.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode_address_state.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode_address_state.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,81 @@ +CREATE OR REPLACE FUNCTION geocode_address_state( + result REFCURSOR, + parsed NORM_ADDY +) RETURNS REFCURSOR +AS $_$ +DECLARE + tempInt INTEGER; +BEGIN + -- Check to see if the road name can be matched. + SELECT INTO tempInt count(*) FROM tiger_geocode_roads + WHERE soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) + AND parsed.stateAbbrev = tiger_geocode_roads.state; + + IF tempInt = 0 THEN + RETURN NULL; + END IF; + + -- The road name matches, now we check to see if the addresses match + SELECT INTO tempInt count(*) + FROM ( + SELECT *, rate_attributes(parsed.preDirAbbrev, tiger_geocode_roads.fedirp, + parsed.streetName, tiger_geocode_roads.fename, parsed.streetTypeAbbrev, + tiger_geocode_roads.fetype, parsed.postDirAbbrev, + tiger_geocode_roads.fedirs) as rating + FROM tiger_geocode_roads + WHERE soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) + AND parsed.stateAbbrev = tiger_geocode_roads.state + ) AS subquery, roads_local + WHERE includes_address(parsed.address, roads_local.fraddl, roads_local.toaddl, + roads_local.fraddr, roads_local.toaddr) + AND subquery.tlid = roads_local.tlid; + + IF tempInt = 0 THEN + return NULL; + END IF; + + OPEN result FOR + SELECT + roads_local.fedirp as fedirp, + roads_local.fename as fename, + roads_local.fetype as fetype, + roads_local.fedirs as fedirs, + CASE WHEN (parsed.address % 2) = roads_local.fraddl + OR (parsed.address % 2) = roads_local.toaddl + THEN coalesce(pl.name,zipl.city,csl.name,col.name) ELSE coalesce(pr.name,zipr.city,csr.name,cor.name) END as place, + CASE WHEN (parsed.address % 2) = roads_local.fraddl + OR (parsed.address % 2) = roads_local.toaddl + THEN sl.abbrev ELSE sr.abbrev END as state, + CASE WHEN (parsed.address % 2) = roads_local.fraddl + OR (parsed.address % 2) = roads_local.toaddl + THEN zipl ELSE zipr END as zip, + interpolate_from_address(parsed.address, roads_local.fraddl, + roads_local.toaddl, roads_local.fraddr, roads_local.toaddr, + roads_local.geom) as address_geom, + subquery.rating as rating + FROM ( + SELECT *, rate_attributes(parsed.preDirAbbrev, tiger_geocode_roads.fedirp, + parsed.streetName, tiger_geocode_roads.fename, parsed.streetTypeAbbrev, + tiger_geocode_roads.fetype, parsed.postDirAbbrev, + tiger_geocode_roads.fedirs) as rating + FROM tiger_geocode_roads + WHERE soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) + AND parsed.stateAbbrev = tiger_geocode_roads.state + ) AS subquery + JOIN roads_local ON (subquery.tlid = roads_local.tlid) + JOIN state_lookup sl ON (roads_local.statel = sl.st_code) + JOIN state_lookup sr ON (roads_local.stater = sr.st_code) + LEFT JOIN place_lookup pl ON (roads_local.statel = pl.st_code AND roads_local.placel = pl.pl_code) + LEFT JOIN place_lookup pr ON (roads_local.stater = pr.st_code AND roads_local.placer = pr.pl_code) + LEFT JOIN county_lookup col ON (roads_local.statel = col.st_code AND roads_local.countyl = col.co_code) + LEFT JOIN county_lookup cor ON (roads_local.stater = cor.st_code AND roads_local.countyr = cor.co_code) + LEFT JOIN countysub_lookup csl ON (roads_local.statel = csl.st_code AND roads_local.countyl = csl.co_code AND roads_local.cousubl = csl.cs_code) + LEFT JOIN countysub_lookup csr ON (roads_local.stater = csr.st_code AND roads_local.countyr = csr.co_code AND roads_local.cousubr = csr.cs_code) + LEFT JOIN zip_lookup_base zipl ON (roads_local.zipl = zipl.zip) + LEFT JOIN zip_lookup_base zipr ON (roads_local.zipr = zipr.zip) + WHERE includes_address(parsed.address, roads_local.fraddl, roads_local.toaddl, + roads_local.fraddr, roads_local.toaddr) + ORDER BY subquery.rating; + RETURN result; +END; +$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode_address_zip.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode_address_zip.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode_address_zip.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode_address_zip.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,83 @@ +CREATE OR REPLACE FUNCTION geocode_address_zip( + result REFCURSOR, + parsed NORM_ADDY +) RETURNS REFCURSOR +AS $_$ +DECLARE + tempString VARCHAR; + tempInt INTEGER; +BEGIN + -- Check to see if the road name can be matched. + SELECT INTO tempInt count(*) FROM tiger_geocode_roads + WHERE parsed.zip = tiger_geocode_roads.zip + AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename); + + IF tempInt = 0 THEN + RETURN NULL; + END IF; + + -- The road name matches, now we check to see if the addresses match + SELECT INTO tempInt count(*) + FROM ( + SELECT *, rate_attributes(parsed.preDirAbbrev, tiger_geocode_roads.fedirp, + parsed.streetName, tiger_geocode_roads.fename, parsed.streetTypeAbbrev, + tiger_geocode_roads.fetype, parsed.postDirAbbrev, + tiger_geocode_roads.fedirs) as rating + FROM tiger_geocode_roads + WHERE parsed.zip = tiger_geocode_roads.zip + AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) + ) AS subquery, roads_local + WHERE includes_address(parsed.address, roads_local.fraddl, roads_local.toaddl, + roads_local.fraddr, roads_local.toaddr) + AND subquery.tlid = roads_local.tlid; + + IF tempInt = 0 THEN + RETURN NULL; + END IF; + + OPEN result FOR + SELECT + roads_local.fedirp as fedirp, + roads_local.fename as fename, + roads_local.fetype as fetype, + roads_local.fedirs as fedirs, + CASE WHEN (parsed.address % 2) = roads_local.fraddl + OR (parsed.address % 2) = roads_local.toaddl + THEN coalesce(pl.name,zipl.city,csl.name,col.name) ELSE coalesce(pr.name,zipr.city,csr.name,cor.name) END as place, + CASE WHEN (parsed.address % 2) = roads_local.fraddl + OR (parsed.address % 2) = roads_local.toaddl + THEN sl.abbrev ELSE sr.abbrev END as state, + CASE WHEN (parsed.address % 2) = roads_local.fraddl + OR (parsed.address % 2) = roads_local.toaddl + THEN zipl ELSE zipr END as zip, + interpolate_from_address(parsed.address, roads_local.fraddl, + roads_local.toaddl, roads_local.fraddr, roads_local.toaddr, + roads_local.geom) as address_geom, + subquery.rating as rating + FROM ( + SELECT *, rate_attributes(parsed.preDirAbbrev, tiger_geocode_roads.fedirp, + parsed.streetName, tiger_geocode_roads.fename, parsed.streetTypeAbbrev, + tiger_geocode_roads.fetype, parsed.postDirAbbrev, + tiger_geocode_roads.fedirs) as rating + FROM tiger_geocode_roads + WHERE parsed.zip = tiger_geocode_roads.zip + AND soundex(parsed.streetName) = soundex(tiger_geocode_roads.fename) + ) AS subquery + JOIN roads_local ON (subquery.tlid = roads_local.tlid) + JOIN state_lookup sl ON (roads_local.statel = sl.st_code) + JOIN state_lookup sr ON (roads_local.stater = sr.st_code) + LEFT JOIN place_lookup pl ON (roads_local.statel = pl.st_code AND roads_local.placel = pl.pl_code) + LEFT JOIN place_lookup pr ON (roads_local.stater = pr.st_code AND roads_local.placer = pr.pl_code) + LEFT JOIN county_lookup col ON (roads_local.statel = col.st_code AND roads_local.countyl = col.co_code) + LEFT JOIN county_lookup cor ON (roads_local.stater = cor.st_code AND roads_local.countyr = cor.co_code) + LEFT JOIN countysub_lookup csl ON (roads_local.statel = csl.st_code AND roads_local.countyl = csl.co_code AND roads_local.cousubl = csl.cs_code) + LEFT JOIN countysub_lookup csr ON (roads_local.stater = csr.st_code AND roads_local.countyr = csr.co_code AND roads_local.cousubr = csr.cs_code) + LEFT JOIN zip_lookup_base zipl ON (roads_local.zipl = zipl.zip) + LEFT JOIN zip_lookup_base zipr ON (roads_local.zipr = zipr.zip) + WHERE includes_address(parsed.address, roads_local.fraddl, roads_local.toaddl, + roads_local.fraddr, roads_local.toaddr) + ORDER BY subquery.rating; + + RETURN result; +END; +$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode_get_point.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode_get_point.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode_get_point.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode_get_point.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,10 @@ +CREATE OR REPLACE FUNCTION geocode_get_point(VARCHAR) RETURNS GEOMETRY +AS $_$ +DECLARE + ans RECORD; +BEGIN + ans := geocode(NULL, $1); + + RETURN centroid(ans.geom); +END; +$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode_location.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode_location.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode_location.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode_location.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,67 @@ +CREATE OR REPLACE FUNCTION geocode_location( + parsed NORM_ADDY +) RETURNS REFCURSOR +AS $_$ +DECLARE + result REFCURSOR; + tempString VARCHAR; + tempInt INTEGER; +BEGIN + -- Try to match the city/state to a zipcode first + SELECT INTO tempInt count(*) + FROM zip_lookup_base zip + JOIN state_lookup sl ON (zip.state = sl.name) + JOIN zt99_d00 zl ON (zip.zip = zl.zcta::integer) + WHERE soundex(zip.city) = soundex(parsed.location) and sl.abbrev = parsed.stateAbbrev; + + -- If that worked, just use the zipcode lookup + IF tempInt > 0 THEN + OPEN result FOR + SELECT + NULL::varchar(2) as fedirp, + NULL::varchar(30) as fename, + NULL::varchar(4) as fetype, + NULL::varchar(2) as fedirs, + coalesce(zip.city) as place, + sl.abbrev as state, + parsed.zip as zip, + centroid(wkb_geometry) as address_geom, + 100::integer + levenshtein_ignore_case(coalesce(zip.city), parsed.location) as rating + FROM + zip_lookup_base zip + JOIN state_lookup sl on (zip.state = sl.name) + JOIN zt99_d00 zl ON (zip.zip = zl.zcta::integer) + WHERE + soundex(zip.city) = soundex(parsed.location) and sl.abbrev = parsed.stateAbbrev; + + RETURN result; + END IF; + + -- Try to match the city/state to a place next + SELECT INTO tempInt count(*) + FROM pl99_d00 pl + JOIN state_lookup sl ON (pl.state::integer = sl.st_code) + WHERE soundex(pl.name) = soundex(parsed.location) and sl.abbrev = parsed.stateAbbrev; + + -- If that worked then use it + IF tempInt > 0 THEN + OPEN result FOR + SELECT + NULL::varchar(2) as fedirp, + NULL::varchar(30) as fename, + NULL::varchar(4) as fetype, + NULL::varchar(2) as fedirs, + pl.name as place, + sl.abbrev as state, + NULL::integer as zip, + centroid(wkb_geometry) as address_geom, + 100::integer + levenshtein_ignore_case(coalesce(zip.city), parsed.location) as rating + FROM pl99_d00 pl + JOIN state_lookup sl ON (pl.state::integer = sl.st_code) + WHERE soundex(pl.name) = soundex(parsed.location) and sl.abbrev = parsed.stateAbbrev; + + RETURN result; + END IF; + RETURN result; +END; +$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode_zip.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode_zip.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode_zip.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/geocode/geocode_zip.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,41 @@ +CREATE OR REPLACE FUNCTION geocode_zip( + parsed NORM_ADDY +) RETURNS REFCURSOR +AS $_$ +DECLARE + result REFCURSOR; + tempString VARCHAR; + tempInt INTEGER; +BEGIN + -- Check to see if the road name can be matched. + SELECT INTO tempInt count(*) + FROM zip_lookup_base zip + JOIN state_lookup sl on (zip.state = sl.name) + JOIN zt99_d00 zl ON (zip.zip = zl.zcta::integer) + WHERE zip = parsed.zip; + + IF tempInt = 0 THEN + RETURN NULL; + END IF; + + OPEN result FOR + SELECT + NULL::varchar(2) as fedirp, + NULL::varchar(30) as fename, + NULL::varchar(4) as fetype, + NULL::varchar(2) as fedirs, + coalesce(zip.city) as place, + sl.abbrev as state, + parsed.zip as zip, + centroid(wkb_geometry) as address_geom, + 100::integer as rating + FROM + zip_lookup_base zip + JOIN state_lookup sl on (zip.state = sl.name) + JOIN zt99_d00 zl ON (zip.zip = zl.zcta::integer) + WHERE + zip.zip = parsed.zip; + + RETURN result; +END; +$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/geocode/includes_address.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/geocode/includes_address.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/geocode/includes_address.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/geocode/includes_address.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,93 @@ +-- This function requires the addresses to be grouped, such that the second and +-- third arguments are from one side of the street, and the fourth and fifth +-- from the other. +CREATE OR REPLACE FUNCTION includes_address( + given_address INTEGER, + addr1 INTEGER, + addr2 INTEGER, + addr3 INTEGER, + addr4 INTEGER +) RETURNS BOOLEAN +AS $_$ +DECLARE + lmaxaddr INTEGER := -1; + rmaxaddr INTEGER := -1; + lminaddr INTEGER := -1; + rminaddr INTEGER := -1; + maxaddr INTEGER := -1; + minaddr INTEGER := -1; + verbose BOOLEAN := false; +BEGIN + IF addr1 IS NOT NULL THEN + maxaddr := addr1; + minaddr := addr1; + lmaxaddr := addr1; + lminaddr := addr1; + END IF; + + IF addr2 IS NOT NULL THEN + IF addr2 < minaddr OR minaddr = -1 THEN + minaddr := addr2; + END IF; + IF addr2 > maxaddr OR maxaddr = -1 THEN + maxaddr := addr2; + END IF; + IF addr2 > lmaxaddr OR lmaxaddr = -1 THEN + lmaxaddr := addr2; + END IF; + IF addr2 < lminaddr OR lminaddr = -1 THEN + lminaddr := addr2; + END IF; + END IF; + + IF addr3 IS NOT NULL THEN + IF addr3 < minaddr OR minaddr = -1 THEN + minaddr := addr3; + END IF; + IF addr3 > maxaddr OR maxaddr = -1 THEN + maxaddr := addr3; + END IF; + rmaxaddr := addr3; + rminaddr := addr3; + END IF; + + IF addr4 IS NOT NULL THEN + IF addr4 < minaddr OR minaddr = -1 THEN + minaddr := addr4; + END IF; + IF addr4 > maxaddr OR maxaddr = -1 THEN + maxaddr := addr4; + END IF; + IF addr4 > rmaxaddr OR rmaxaddr = -1 THEN + rmaxaddr := addr4; + END IF; + IF addr4 < rminaddr OR rminaddr = -1 THEN + rminaddr := addr4; + END IF; + END IF; + + IF minaddr = -1 OR maxaddr = -1 THEN + -- No addresses were non-null, return FALSE (arbitrary) + RETURN FALSE; + ELSIF given_address >= minaddr AND given_address <= maxaddr THEN + -- The address is within the given range + IF given_address >= lminaddr AND given_address <= lmaxaddr THEN + -- This checks to see if the address is on this side of the + -- road, ie if the address is even, the street range must be even + IF (given_address % 2) = (lminaddr % 2) + OR (given_address % 2) = (lmaxaddr % 2) THEN + RETURN TRUE; + END IF; + END IF; + IF given_address >= rminaddr AND given_address <= rmaxaddr THEN + -- See above + IF (given_address % 2) = (rminaddr % 2) + OR (given_address % 2) = (rmaxaddr % 2) THEN + RETURN TRUE; + END IF; + END IF; + END IF; + -- The address is not within the range + RETURN FALSE; +END; +$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/geocode/interpolate_from_address.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/geocode/interpolate_from_address.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/geocode/interpolate_from_address.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/geocode/interpolate_from_address.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,123 @@ +-- This function converts string addresses to integers and passes them to +-- the other interpolate_from_address function. +CREATE OR REPLACE FUNCTION interpolate_from_address(INTEGER, VARCHAR, VARCHAR, VARCHAR, VARCHAR, GEOMETRY) RETURNS GEOMETRY +AS $_$ +DECLARE + given_address INTEGER; + addr1 INTEGER; + addr2 INTEGER; + addr3 INTEGER; + addr4 INTEGER; + road GEOMETRY; + result GEOMETRY; +BEGIN + given_address := $1; + addr1 := to_number($2, '999999'); + addr2 := to_number($3, '999999'); + addr3 := to_number($4, '999999'); + addr4 := to_number($5, '999999'); + road := $6; + result = interpolate_from_address(given_address, addr1, addr2, addr3, addr4, road); + RETURN result; +END +$_$ LANGUAGE plpgsql; + +-- interpolate_from_address(local_address, from_address_l, to_address_l, from_address_r, to_address_r, local_road) +-- This function returns a point along the given geometry (must be linestring) +-- corresponding to the given address. If the given address is not within +-- the address range of the road, null is returned. +-- This function requires that the address be grouped, such that the second and +-- third arguments are from one side of the street, while the fourth and +-- fifth are from the other. +CREATE OR REPLACE FUNCTION interpolate_from_address(INTEGER, INTEGER, INTEGER, INTEGER, INTEGER, GEOMETRY) RETURNS GEOMETRY +AS $_$ +DECLARE + given_address INTEGER; + lmaxaddr INTEGER := -1; + rmaxaddr INTEGER := -1; + lminaddr INTEGER := -1; + rminaddr INTEGER := -1; + lfrgreater BOOLEAN; + rfrgreater BOOLEAN; + frgreater BOOLEAN; + addrwidth INTEGER; + part DOUBLE PRECISION; + road GEOMETRY; + result GEOMETRY; +BEGIN + IF $1 IS NULL THEN + RETURN NULL; + ELSE + given_address := $1; + END IF; + + IF $6 IS NULL THEN + RETURN NULL; + ELSE + IF geometrytype($6) = 'LINESTRING' THEN + road := $6; + ELSIF geometrytype($6) = 'MULTILINESTRING' THEN + road := geometryn($6,1); + ELSE + RETURN NULL; + END IF; + END IF; + + IF $2 IS NOT NULL THEN + lfrgreater := TRUE; + lmaxaddr := $2; + lminaddr := $2; + END IF; + + IF $3 IS NOT NULL THEN + IF $3 > lmaxaddr OR lmaxaddr = -1 THEN + lmaxaddr := $3; + lfrgreater := FALSE; + END IF; + IF $3 < lminaddr OR lminaddr = -1 THEN + lminaddr := $3; + END IF; + END IF; + + IF $4 IS NOT NULL THEN + rmaxaddr := $4; + rminaddr := $4; + rfrgreater := TRUE; + END IF; + + IF $5 IS NOT NULL THEN + IF $5 > rmaxaddr OR rmaxaddr = -1 THEN + rmaxaddr := $5; + rfrgreater := FALSE; + END IF; + IF $5 < rminaddr OR rminaddr = -1 THEN + rminaddr := $5; + END IF; + END IF; + + IF given_address >= lminaddr AND given_address <= lmaxaddr THEN + IF (given_address % 2) = (lminaddr % 2) + OR (given_address % 2) = (lmaxaddr % 2) THEN + addrwidth := lmaxaddr - lminaddr; + part := (given_address - lminaddr) / trunc(addrwidth, 1); + frgreater := lfrgreater; + END IF; + END IF; + + IF given_address >= rminaddr AND given_address <= rmaxaddr THEN + IF (given_address % 2) = (rminaddr % 2) + OR (given_address % 2) = (rmaxaddr % 2) THEN + addrwidth := rmaxaddr - rminaddr; + part := (given_address - rminaddr) / trunc(addrwidth, 1); + frgreater := rfrgreater; + END IF; + END IF; + + IF frgreater THEN + part := 1 - part; + END IF; + + result = line_interpolate_point(road, part); + RETURN result; +END; +$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/geocode/rate_attributes.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/geocode/rate_attributes.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/geocode/rate_attributes.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/geocode/rate_attributes.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,58 @@ +-- rate_attributes(dirpA, dirpB, streetNameA, streetNameB, streetTypeA, +-- streetTypeB, dirsA, dirsB, locationA, locationB) +-- Rates the street based on the given attributes. The locations must be +-- non-null. The other eight values are handled by the other rate_attributes +-- function, so it's requirements must also be met. +CREATE OR REPLACE FUNCTION rate_attributes(VARCHAR, VARCHAR, VARCHAR, VARCHAR, + VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR) RETURNS INTEGER +AS $_$ +DECLARE + result INTEGER := 0; + locationWeight INTEGER := 14; + verbose BOOLEAN := FALSE; +BEGIN + IF $9 IS NOT NULL AND $10 IS NOT NULL THEN + result := levenshtein_ignore_case($9, $10); + ELSE + IF verbose THEN + RAISE NOTICE 'rate_attributes() - Location names cannot be null!'; + END IF; + RETURN NULL; + END IF; + result := result + rate_attributes($1, $2, $3, $4, $5, $6, $7, $8); + RETURN result; +END; +$_$ LANGUAGE plpgsql; + +-- rate_attributes(dirpA, dirpB, streetNameA, streetNameB, streetTypeA, +-- streetTypeB, dirsA, dirsB) +-- Rates the street based on the given attributes. Only streetNames are +-- required. If any others are null (either A or B) they are treated as +-- empty strings. +CREATE OR REPLACE FUNCTION rate_attributes(VARCHAR, VARCHAR, VARCHAR, VARCHAR, + VARCHAR, VARCHAR, VARCHAR, VARCHAR) RETURNS INTEGER +AS $_$ +DECLARE + result INTEGER := 0; + directionWeight INTEGER := 2; + nameWeight INTEGER := 10; + typeWeight INTEGER := 5; + verbose BOOLEAN := FALSE; +BEGIN + result := result + levenshtein_ignore_case(cull_null($1), cull_null($2)) * + directionWeight; + IF $3 IS NOT NULL AND $4 IS NOT NULL THEN + result := result + levenshtein_ignore_case($3, $4) * nameWeight; + ELSE + IF verbose THEN + RAISE NOTICE 'rate_attributes() - Street names cannot be null!'; + END IF; + RETURN NULL; + END IF; + result := result + levenshtein_ignore_case(cull_null($5), cull_null($6)) * + typeWeight; + result := result + levenshtein_ignore_case(cull_null($7), cull_null($7)) * + directionWeight; + return result; +END; +$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/import/load_tiger.sh postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/import/load_tiger.sh --- postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/import/load_tiger.sh 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/import/load_tiger.sh 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,9 @@ +#!/bin/sh + +FIRST="" +for file in /data/tiger/www2.census.gov/geo/tiger/tiger2006se/*/*.ZIP; do + ./tigerimport.sh append mydb $file $FIRST + if [ -z "$FIRST" ]; then + FIRST="-a" + fi +done diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/import/newdb.sh postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/import/newdb.sh --- postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/import/newdb.sh 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/import/newdb.sh 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,6 @@ +#!/bin/bash + +dropdb $1 +createdb $1 +createlang plpgsql $1 +psql $1 +# Last updated Fri Mar 4 08:13:28 PST 2005 +# +# tigerimport.sh imports the CompleteChain, Landmarks, AreaLandMarks, and +# Polygon layers from a TIGER/Line .ZIP file into a PostGIS database. You +# must have ogr2ogr from GDAL (http://gdal.org), as well as the GDAL +# Python extensions. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You can download a copy of the GPL from http://www.gnu.org/copyleft/gpl.html, +# or write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +MODE=$1 +DATABASE=$2 +ZIP=$3 +APPEND=$4 + +TIGERPOLY=tigerpoly2.py + +case $MODE in + append) PRE="-append"; POST="" ;; + update) PRE="-update"; POST="" ;; + create) PRE=""; POST="-lco OVERWRITE=YES" ;; + *) echo "Usage: $0 [append|update|create] "; + exit -1;; +esac + +FILE=$(basename $ZIP) +FILE=${FILE#TGR} +FILE=${FILE%.ZIP} +TIGER=TGR$FILE.RT1 + +SRID=4269 +#cat > nad83_srs.txt < +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +############################################################################### +# +# $Log: tigerpoly.py,v $ +# Revision 1.3 2003/07/11 14:52:13 warmerda +# Added logic to replicate all source polygon fields onto output file. +# +# Revision 1.2 2003/07/11 14:31:17 warmerda +# Use provided input filename. +# +# Revision 1.1 2003/03/03 05:17:06 warmerda +# New +# +# + +import osr +import ogr +import sys, os + +############################################################################# +class Module: + + def __init__( self ): + self.lines = {} + self.poly_line_links = {} + +############################################################################# +def Usage(): + print 'Usage: tigerpoly.py infile [outfile].shp' + print + sys.exit(1) + +############################################################################# +# Argument processing. + +infile = None +outfile = None + +i = 1 +while i < len(sys.argv): + arg = sys.argv[i] + + if infile is None: + infile = arg + + elif outfile is None: + outfile = arg + + else: + Usage() + + i = i + 1 + +if infile is None: + Usage() + +############################################################################# +# Open the datasource to operate on. + +ds = ogr.Open( infile, update = 0 ) + +poly_layer = ds.GetLayerByName( 'Polygon' ) +lm_layer = ds.GetLayerByName( 'Landmarks' ) + +############################################################################# +# Create output file for the composed polygons. + +shp_driver = ogr.GetDriverByName( 'ESRI Shapefile' ) + +shp_ds_cache = [] +def create_layer (outfile, layer, type): + if os.access( outfile, os.W_OK ): + shp_driver.DeleteDataSource( outfile ) + + defn = layer.GetLayerDefn() + shp_ds = shp_driver.CreateDataSource( outfile ) + shp_layer = shp_ds.CreateLayer( 'out', geom_type = type ) + field_count = defn.GetFieldCount() + + for fld_index in range(field_count): + src_fd = defn.GetFieldDefn( fld_index ) + + fd = ogr.FieldDefn( src_fd.GetName(), src_fd.GetType() ) + fd.SetWidth( src_fd.GetWidth() ) + fd.SetPrecision( src_fd.GetPrecision() ) + shp_layer.CreateField( fd ) + + shp_ds_cache.append(shp_ds) + return shp_layer + +poly_out = create_layer("Polygon.shp", poly_layer, ogr.wkbPolygon) +area_out = create_layer("AreaLandmarks.shp", lm_layer, ogr.wkbPolygon) + +############################################################################# +# Read all features in the line layer, holding just the geometry in a hash +# for fast lookup by TLID. + +line_layer = ds.GetLayerByName( 'CompleteChain' ) +line_count = 0 + +modules_hash = {} + +feat = line_layer.GetNextFeature() +geom_id_field = feat.GetFieldIndex( 'TLID' ) +tile_ref_field = feat.GetFieldIndex( 'MODULE' ) +while feat is not None: + geom_id = feat.GetField( geom_id_field ) + tile_ref = feat.GetField( tile_ref_field ) + + try: + module = modules_hash[tile_ref] + except: + module = Module() + modules_hash[tile_ref] = module + + module.lines[geom_id] = feat.GetGeometryRef().Clone() + line_count = line_count + 1 + + feat.Destroy() + + feat = line_layer.GetNextFeature() + +print 'Got %d lines in %d modules.' % (line_count,len(modules_hash)) + +############################################################################# +# Read all polygon/chain links and build a hash keyed by POLY_ID listing +# the chains (by TLID) attached to it. + +link_layer = ds.GetLayerByName( 'PolyChainLink' ) + +feat = link_layer.GetNextFeature() +geom_id_field = feat.GetFieldIndex( 'TLID' ) +tile_ref_field = feat.GetFieldIndex( 'MODULE' ) +lpoly_field = feat.GetFieldIndex( 'POLYIDL' ) +lcenid_field = feat.GetFieldIndex( 'CENIDL' ) +rpoly_field = feat.GetFieldIndex( 'POLYIDR' ) +rcenid_field = feat.GetFieldIndex( 'CENIDR' ) + +link_count = 0 + +while feat is not None: + module = modules_hash[feat.GetField( tile_ref_field )] + + tlid = feat.GetField( geom_id_field ) + + lpoly_id = feat.GetField( lpoly_field ) + lcenid_id = feat.GetField( lcenid_field ) + rpoly_id = feat.GetField( rpoly_field ) + rcenid_id = feat.GetField( rcenid_field ) + + if lcenid_id == rcenid_id and lpoly_id == rpoly_id: + feat.Destroy() + feat = link_layer.GetNextFeature() + continue + + for cenid, polyid in ((rcenid_id, rpoly_id), (lcenid_id, lpoly_id)): + if module.poly_line_links.has_key((cenid, polyid)): + module.poly_line_links[cenid, polyid].append( tlid ) + else: + module.poly_line_links[cenid, polyid] = [ tlid ] + + link_count = link_count + 1 + + feat.Destroy() + + feat = link_layer.GetNextFeature() + +print 'Processed %d links.' % link_count + +############################################################################# +# Process all polygon features. + +feat = poly_layer.GetNextFeature() +tile_ref_field = feat.GetFieldIndex( 'MODULE' ) +polyid_field = feat.GetFieldIndex( 'POLYID' ) +cenid_field = feat.GetFieldIndex( 'CENID' ) + +poly_count = 0 +degenerate_count = 0 + +while feat is not None: + module = modules_hash[feat.GetField( tile_ref_field )] + polyid = feat.GetField( polyid_field ) + cenid = feat.GetField( cenid_field ) + + link_coll = ogr.Geometry( type = ogr.wkbGeometryCollection ) + tlid_list = module.poly_line_links[cenid, polyid] + for tlid in tlid_list: + geom = module.lines[tlid] + link_coll.AddGeometry( geom ) + + try: + poly = ogr.BuildPolygonFromEdges( link_coll, 0, 0 ) + + if poly.GetGeometryRef(0).GetPointCount() < 4: + degenerate_count = degenerate_count + 1 + poly.Destroy() + feat.Destroy() + feat = poly_layer.GetNextFeature() + continue + + #print poly.ExportToWkt() + #feat.SetGeometryDirectly( poly ) + + feat2 = ogr.Feature(feature_def=poly_out.GetLayerDefn()) + + for fld_index in range(poly_out.GetLayerDefn().GetFieldCount()): + feat2.SetField( fld_index, feat.GetField( fld_index ) ) + + feat2.SetGeometryDirectly( poly ) + poly_out.CreateFeature( feat2 ) + feat2.Destroy() + poly_count += 1 + + except: + raise + print 'BuildPolygonFromEdges failed.' + + feat.Destroy() + feat = poly_layer.GetNextFeature() + +if degenerate_count: + print 'Discarded %d degenerate polygons.' % degenerate_count + +print 'Built %d polygons.' % poly_count + +############################################################################# +# Extract landmarks... + +area_layer = ds.GetLayerByName( 'AreaLandmarks' ) +feat = area_layer.GetNextFeature() +land_field = feat.GetFieldIndex( 'LAND' ) +polyid_field = feat.GetFieldIndex( 'POLYID' ) +cenid_field = feat.GetFieldIndex( 'CENID' ) + +area = {} +while feat is not None: + land = feat.GetField( land_field ) + polyid = feat.GetField( polyid_field ) + cenid = feat.GetField( cenid_field ) + + if area.has_key(land): + area[land].append(( cenid, polyid )) + else: + area[land] = [(cenid, polyid)] + + feat.Destroy() + feat = area_layer.GetNextFeature() + +feat = lm_layer.GetNextFeature() +land_field = feat.GetFieldIndex( 'LAND' ) +tile_ref_field = feat.GetFieldIndex( 'MODULE' ) +area_count = 0 + +while feat is not None: + module = modules_hash[feat.GetField( tile_ref_field )] + land = feat.GetField( land_field ) + if not area.has_key(land): + # print "Can't find LAND %s in Landmarks" % land + feat.Destroy() + feat = lm_layer.GetNextFeature() + continue + + link_coll = ogr.Geometry( type = ogr.wkbGeometryCollection ) + for cenid, polyid in area[land]: + seen = {} + tlid_list = module.poly_line_links[cenid, polyid] + for tlid in tlid_list: + if seen.has_key(tlid): + seen[tlid] += 1 + else: + seen[tlid] = 1 + + for tlid in seen.keys(): + if seen[tlid] == 1: + geom = module.lines[tlid] + link_coll.AddGeometry( geom ) + + try: + poly = ogr.BuildPolygonFromEdges( link_coll, 1, 1 ) + except: + print 'BuildPolygonFromEdges failed.' + feat.Destroy() + feat = lm_layer.GetNextFeature() + + feat2 = ogr.Feature(feature_def=area_out.GetLayerDefn()) + for fld_index in range(area_out.GetLayerDefn().GetFieldCount()): + feat2.SetField( fld_index, feat.GetField( fld_index ) ) + + feat2.SetGeometryDirectly( poly ) + area_out.CreateFeature( feat2 ) + feat2.Destroy() + + area_count += 1 + + feat.Destroy() + feat = lm_layer.GetNextFeature() + +print "Built %d area landmarks." % area_count + +############################################################################# +# Cleanup + +for shpds in shp_ds_cache: + shpds.Destroy() +ds.Destroy() diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/normalize/count_words.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/normalize/count_words.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/normalize/count_words.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/normalize/count_words.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,32 @@ +-- Determine the number of words in a string. Words are allowed to +-- be seperated only by spaces, but multiple spaces between +-- words are allowed. +CREATE OR REPLACE FUNCTION count_words(VARCHAR) RETURNS INTEGER +AS $_$ +DECLARE + tempString VARCHAR; + tempInt INTEGER; + count INTEGER := 1; + lastSpace BOOLEAN := FALSE; +BEGIN + IF $1 IS NULL THEN + return -1; + END IF; + tempInt := length($1); + IF tempInt = 0 THEN + return 0; + END IF; + FOR i IN 1..tempInt LOOP + tempString := substring($1 from i for 1); + IF tempString = ' ' THEN + IF NOT lastSpace THEN + count := count + 1; + END IF; + lastSpace := TRUE; + ELSE + lastSpace := FALSE; + END IF; + END LOOP; + return count; +END; +$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/normalize/end_soundex.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/normalize/end_soundex.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/normalize/end_soundex.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/normalize/end_soundex.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,17 @@ +-- Runs the soundex function on the last word in the string provided. +-- Words are allowed to be seperated by space, comma, period, new-line +-- tab or form feed. +CREATE OR REPLACE FUNCTION end_soundex(VARCHAR) RETURNS VARCHAR +AS $_$ +DECLARE + tempString VARCHAR; +BEGIN + tempString := substring($1, E'[ ,.\n\t\f]([a-zA-Z0-9]*)$'); + IF tempString IS NOT NULL THEN + tempString := soundex(tempString); + ELSE + tempString := soundex($1); + END IF; + return tempString; +END; +$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/normalize/get_last_words.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/normalize/get_last_words.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/normalize/get_last_words.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/normalize/get_last_words.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,29 @@ +-- Returns a string consisting of the last N words. Words are allowed +-- to be seperated only by spaces, but multiple spaces between +-- words are allowed. Words must be alphanumberic. +-- If more words are requested than exist, the full input string is +-- returned. +CREATE OR REPLACE FUNCTION get_last_words( + inputString VARCHAR, + count INTEGER +) RETURNS VARCHAR +AS $_$ +DECLARE + tempString VARCHAR; + result VARCHAR := ''; +BEGIN + FOR i IN 1..count LOOP + tempString := substring(inputString from '((?: )+[a-zA-Z0-9_]*)' || result || '$'); + + IF tempString IS NULL THEN + RETURN inputString; + END IF; + + result := tempString || result; + END LOOP; + + result := trim(both from result); + + RETURN result; +END; +$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/normalize/location_extract.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/normalize/location_extract.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/normalize/location_extract.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/normalize/location_extract.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,36 @@ +-- location_extract(streetAddressString, stateAbbreviation) +-- This function extracts a location name from the end of the given string. +-- The first attempt is to find an exact match against the place_lookup +-- table. If this fails, a word-by-word soundex match is tryed against the +-- same table. If multiple candidates are found, the one with the smallest +-- levenshtein distance from the given string is assumed the correct one. +-- If no match is found against the place_lookup table, the same tests are +-- run against the countysub_lookup table. +-- +-- The section of the given string corresponding to the location found is +-- returned, rather than the string found from the tables. All the searching +-- is done largely to determine the length (words) of the location, to allow +-- the intended street name to be correctly identified. +CREATE OR REPLACE FUNCTION location_extract(fullStreet VARCHAR, stateAbbrev VARCHAR) RETURNS VARCHAR +AS $_$ +DECLARE + location VARCHAR; +BEGIN + IF fullStreet IS NULL THEN + RETURN NULL; + END IF; + + location := location_extract_place_exact(fullStreet, stateAbbrev); + IF location IS NULL THEN + location := location_extract_countysub_exact(fullStreet, stateAbbrev); + IF location IS NULL THEN + location := location_extract_place_fuzzy(fullStreet, stateAbbrev); + IF location IS NULL THEN + location := location_extract_countysub_fuzzy(fullStreet, stateAbbrev); + END IF; + END IF; + END IF; + + RETURN location; +END; +$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/normalize/location_extract_countysub_exact.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/normalize/location_extract_countysub_exact.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/normalize/location_extract_countysub_exact.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/normalize/location_extract_countysub_exact.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,54 @@ +-- location_extract_countysub_exact(string, stateAbbrev) +-- This function checks the place_lookup table to find a potential match to +-- the location described at the end of the given string. If an exact match +-- fails, a fuzzy match is performed. The location as found in the given +-- string is returned. +CREATE OR REPLACE FUNCTION location_extract_countysub_exact( + fullStreet VARCHAR, + stateAbbrev VARCHAR +) RETURNS VARCHAR +AS $_$ +DECLARE + ws VARCHAR; + location VARCHAR; + tempInt INTEGER; + rec RECORD; +BEGIN + ws := E'[ ,.\n\f\t]'; + + -- No hope of determining the location from place. Try countysub. + IF stateAbbrev IS NOT NULL THEN + SELECT INTO tempInt count(*) FROM countysub_lookup + WHERE countysub_lookup.state = stateAbbrev + AND texticregexeq(fullStreet, '(?i)' || name || '$'); + ELSE + SELECT INTO tempInt count(*) FROM countysub_lookup + WHERE texticregexeq(fullStreet, '(?i)' || name || '$'); + END IF; + + IF tempInt > 0 THEN + IF stateAbbrev IS NOT NULL THEN + FOR rec IN SELECT substring(fullStreet, '(?i)(' + || name || ')$') AS value, name FROM countysub_lookup + WHERE countysub_lookup.state = stateAbbrev + AND texticregexeq(fullStreet, '(?i)' || ws || name || + '$') ORDER BY length(name) DESC LOOP + -- Only the first result is needed. + location := rec.value; + EXIT; + END LOOP; + ELSE + FOR rec IN SELECT substring(fullStreet, '(?i)(' + || name || ')$') AS value, name FROM countysub_lookup + WHERE texticregexeq(fullStreet, '(?i)' || ws || name || + '$') ORDER BY length(name) DESC LOOP + -- again, only the first is needed. + location := rec.value; + EXIT; + END LOOP; + END IF; + END IF; + + RETURN location; +END; +$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/normalize/location_extract_countysub_fuzzy.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/normalize/location_extract_countysub_fuzzy.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/normalize/location_extract_countysub_fuzzy.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/normalize/location_extract_countysub_fuzzy.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,87 @@ +-- location_extract_countysub_fuzzy(string, stateAbbrev) +-- This function checks the place_lookup table to find a potential match to +-- the location described at the end of the given string. If an exact match +-- fails, a fuzzy match is performed. The location as found in the given +-- string is returned. +CREATE OR REPLACE FUNCTION location_extract_countysub_fuzzy( + fullStreet VARCHAR, + stateAbbrev VARCHAR +) RETURNS VARCHAR +AS $_$ +DECLARE + ws VARCHAR; + tempString VARCHAR; + location VARCHAR; + tempInt INTEGER; + word_count INTEGER; + rec RECORD; + test BOOLEAN; +BEGIN + ws := E'[ ,.\n\f\t]'; + + -- Fuzzy matching. + tempString := substring(fullStreet, '(?i)' || ws || + '([a-zA-Z0-9]+)$'); + IF tempString IS NULL THEN + tempString := fullStreet; + END IF; + + IF stateAbbrev IS NOT NULL THEN + SELECT INTO tempInt count(*) FROM countysub_lookup + WHERE countysub_lookup.state = stateAbbrev + AND soundex(tempString) = end_soundex(name); + ELSE + SELECT INTO tempInt count(*) FROM countysub_lookup + WHERE soundex(tempString) = end_soundex(name); + END IF; + + IF tempInt > 0 THEN + tempInt := 50; + -- Some potentials were found. Begin a word-by-word soundex on each. + IF stateAbbrev IS NOT NULL THEN + FOR rec IN SELECT name FROM countysub_lookup + WHERE countysub_lookup.state = stateAbbrev + AND soundex(tempString) = end_soundex(name) LOOP + word_count := count_words(rec.name); + test := TRUE; + tempString := get_last_words(fullStreet, word_count); + FOR i IN 1..word_count LOOP + IF soundex(split_part(tempString, ' ', i)) != + soundex(split_part(rec.name, ' ', i)) THEN + test := FALSE; + END IF; + END LOOP; + IF test THEN + -- The soundex matched, determine if the distance is better. + IF levenshtein_ignore_case(rec.name, tempString) < tempInt THEN + location := tempString; + tempInt := levenshtein_ignore_case(rec.name, tempString); + END IF; + END IF; + END LOOP; + ELSE + FOR rec IN SELECT name FROM countysub_lookup + WHERE soundex(tempString) = end_soundex(name) LOOP + word_count := count_words(rec.name); + test := TRUE; + tempString := get_last_words(fullStreet, word_count); + FOR i IN 1..word_count LOOP + IF soundex(split_part(tempString, ' ', i)) != + soundex(split_part(rec.name, ' ', i)) THEN + test := FALSE; + END IF; + END LOOP; + IF test THEN + -- The soundex matched, determine if the distance is better. + IF levenshtein_ignore_case(rec.name, tempString) < tempInt THEN + location := tempString; + tempInt := levenshtein_ignore_case(rec.name, tempString); + END IF; + END IF; + END LOOP; + END IF; + END IF; -- If no fuzzys were found, leave location null. + + RETURN location; +END; +$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/normalize/location_extract_place_exact.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/normalize/location_extract_place_exact.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/normalize/location_extract_place_exact.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/normalize/location_extract_place_exact.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,57 @@ +-- location_extract_place_exact(string, stateAbbrev) +-- This function checks the place_lookup table to find a potential match to +-- the location described at the end of the given string. If an exact match +-- fails, a fuzzy match is performed. The location as found in the given +-- string is returned. +CREATE OR REPLACE FUNCTION location_extract_place_exact( + fullStreet VARCHAR, + stateAbbrev VARCHAR +) RETURNS VARCHAR +AS $_$ +DECLARE + ws VARCHAR; + location VARCHAR; + tempInt INTEGER; + rec RECORD; +BEGIN + ws := E'[ ,.\n\f\t]'; + + -- Try for an exact match against places + IF stateAbbrev IS NOT NULL THEN + SELECT INTO tempInt count(*) FROM place_lookup + WHERE place_lookup.state = stateAbbrev + AND texticregexeq(fullStreet, '(?i)' || name || '$'); + ELSE + SELECT INTO tempInt count(*) FROM place_lookup + WHERE texticregexeq(fullStreet, '(?i)' || name || '$'); + END IF; + + IF tempInt > 0 THEN + -- Some matches were found. Look for the last one in the string. + IF stateAbbrev IS NOT NULL THEN + FOR rec IN SELECT substring(fullStreet, '(?i)(' + || name || ')$') AS value, name FROM place_lookup + WHERE place_lookup.state = stateAbbrev + AND texticregexeq(fullStreet, '(?i)' + || name || '$') ORDER BY length(name) DESC LOOP + -- Since the regex is end of string, only the longest (first) result + -- is useful. + location := rec.value; + EXIT; + END LOOP; + ELSE + FOR rec IN SELECT substring(fullStreet, '(?i)(' + || name || ')$') AS value, name FROM place_lookup + WHERE texticregexeq(fullStreet, '(?i)' + || name || '$') ORDER BY length(name) DESC LOOP + -- Since the regex is end of string, only the longest (first) result + -- is useful. + location := rec.value; + EXIT; + END LOOP; + END IF; + END IF; + + RETURN location; +END; +$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/normalize/location_extract_place_fuzzy.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/normalize/location_extract_place_fuzzy.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/normalize/location_extract_place_fuzzy.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/normalize/location_extract_place_fuzzy.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,86 @@ +-- location_extract_place_fuzzy(string, stateAbbrev) +-- This function checks the place_lookup table to find a potential match to +-- the location described at the end of the given string. If an exact match +-- fails, a fuzzy match is performed. The location as found in the given +-- string is returned. +CREATE OR REPLACE FUNCTION location_extract_place_fuzzy( + fullStreet VARCHAR, + stateAbbrev VARCHAR +) RETURNS VARCHAR +AS $_$ +DECLARE + ws VARCHAR; + tempString VARCHAR; + location VARCHAR; + tempInt INTEGER; + word_count INTEGER; + rec RECORD; + test BOOLEAN; +BEGIN + ws := E'[ ,.\n\f\t]'; + + tempString := substring(fullStreet, '(?i)' || ws + || '([a-zA-Z0-9]+)$'); + IF tempString IS NULL THEN + tempString := fullStreet; + END IF; + + IF stateAbbrev IS NOT NULL THEN + SELECT into tempInt count(*) FROM place_lookup + WHERE place_lookup.state = stateAbbrev + AND soundex(tempString) = end_soundex(name); + ELSE + SELECT into tempInt count(*) FROM place_lookup + WHERE soundex(tempString) = end_soundex(name); + END IF; + + IF tempInt > 0 THEN + -- Some potentials were found. Begin a word-by-word soundex on each. + tempInt := 50; + IF stateAbbrev IS NOT NULL THEN + FOR rec IN SELECT name FROM place_lookup + WHERE place_lookup.state = stateAbbrev + AND soundex(tempString) = end_soundex(name) LOOP + word_count := count_words(rec.name); + test := TRUE; + tempString := get_last_words(fullStreet, word_count); + FOR i IN 1..word_count LOOP + IF soundex(split_part(tempString, ' ', i)) != + soundex(split_part(rec.name, ' ', i)) THEN + test := FALSE; + END IF; + END LOOP; + IF test THEN + -- The soundex matched, determine if the distance is better. + IF levenshtein_ignore_case(rec.name, tempString) < tempInt THEN + location := tempString; + tempInt := levenshtein_ignore_case(rec.name, tempString); + END IF; + END IF; + END LOOP; + ELSE + FOR rec IN SELECT name FROM place_lookup + WHERE soundex(tempString) = end_soundex(name) LOOP + word_count := count_words(rec.name); + test := TRUE; + tempString := get_last_words(fullStreet, word_count); + FOR i IN 1..word_count LOOP + IF soundex(split_part(tempString, ' ', i)) != + soundex(split_part(rec.name, ' ', i)) THEN + test := FALSE; + END IF; + END LOOP; + IF test THEN + -- The soundex matched, determine if the distance is better. + IF levenshtein_ignore_case(rec.name, tempString) < tempInt THEN + location := tempString; + tempInt := levenshtein_ignore_case(rec.name, tempString); + END IF; + END IF; + END LOOP; + END IF; + END IF; + + RETURN location; +END; +$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/normalize/normalize_address.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/normalize/normalize_address.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/normalize/normalize_address.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/normalize/normalize_address.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,493 @@ +-- normalize_address(addressString) +-- This takes an address string and parses it into address (internal/street) +-- street name, type, direction prefix and suffix, location, state and +-- zip code, depending on what can be found in the string. +-- +-- The US postal address standard is used: +-- +-- +-- +-- State is assumed to be included in the string, and MUST be matchable to +-- something in the state_lookup table. Fuzzy matching is used if no direct +-- match is found. +-- +-- Two formats of zip code are acceptable: five digit, and five + 4. +-- +-- The internal addressing indicators are looked up from the +-- secondary_unit_lookup table. A following identifier is accepted +-- but it must start with a digit. +-- +-- The location is parsed from the string using other indicators, such +-- as street type, direction suffix or internal address, if available. +-- If these are not, the location is extracted using comparisons against +-- the places_lookup table, then the countysub_lookup table to determine +-- what, in the original string, is intended to be the location. In both +-- cases, an exact match is first pursued, then a word-by-word fuzzy match. +-- The result is not the name of the location from the tables, but the +-- section of the given string that corresponds to the name from the tables. +-- +-- Zip codes and street names are not validated. +-- +-- Direction indicators are extracted by comparison with the direction_lookup +-- table. +-- +-- Street addresses are assumed to be a single word, starting with a number. +-- Address is manditory; if no address is given, and the street is numbered, +-- the resulting address will be the street name, and the street name +-- will be an empty string. +-- +-- In some cases, the street type is part of the street name. +-- eg State Hwy 22a. As long as the word following the type starts with a +-- number (this is usually the case) this will be caught. Some street names +-- include a type name, and have a street type that differs. This will be +-- handled properly, so long as both are given. If the street type is +-- omitted, the street names included type will be parsed as the street type. +-- +-- The output is currently a colon seperated list of values: +-- InternalAddress:StreetAddress:DirectionPrefix:StreetName:StreetType: +-- DirectionSuffix:Location:State:ZipCode +-- This returns each element as entered. It's mainly meant for debugging. +-- There is also another option that returns: +-- StreetAddress:DirectionPrefixAbbreviation:StreetName:StreetTypeAbbreviation: +-- DirectionSuffixAbbreviation:Location:StateAbbreviation:ZipCode +-- This is more standardized and better for use with a geocoder. +CREATE OR REPLACE FUNCTION normalize_address( + rawInput VARCHAR +) RETURNS norm_addy +AS $_$ +DECLARE + result norm_addy; + addressString VARCHAR; + zipString VARCHAR; + preDir VARCHAR; + postDir VARCHAR; + fullStreet VARCHAR; + reducedStreet VARCHAR; + streetType VARCHAR; + state VARCHAR; + tempString VARCHAR; + tempInt INTEGER; + rec RECORD; + ws VARCHAR; +BEGIN + result.parsed := FALSE; + + IF rawInput IS NULL THEN + RETURN result; + END IF; + + ws := E'[ ,.\t\n\f\r]'; + + -- Assume that the address begins with a digit, and extract it from + -- the input string. + addressString := substring(rawInput from '^([0-9].*?)[ ,/.]'); + + -- There are two formats for zip code, the normal 5 digit, and + -- the nine digit zip-4. It may also not exist. + zipString := substring(rawInput from ws || '([0-9]{5})$'); + IF zipString IS NULL THEN + zipString := substring(rawInput from ws || '([0-9]{5})-[0-9]{4}$'); + -- Check if all we got was a zipcode, of either form + IF zipString IS NULL THEN + zipString := substring(rawInput from '^([0-9]{5})$'); + IF zipString IS NULL THEN + zipString := substring(rawInput from '^([0-9]{5})-[0-9]{4}$'); + END IF; + -- If it was only a zipcode, then just return it. + IF zipString IS NOT NULL THEN + result.zip := to_number(zipString, '99999'); + result.parsed := TRUE; + RETURN result; + END IF; + END IF; + END IF; + + IF zipString IS NOT NULL THEN + fullStreet := substring(rawInput from '(.*)' + || ws || '+' || cull_null(zipString) || '[- ]?([0-9]{4})?$'); + ELSE + fullStreet := rawInput; + END IF; + + -- FIXME: state_extract should probably be returning a record so we can + -- avoid having to parse the result from it. + tempString := state_extract(fullStreet); + IF tempString IS NOT NULL THEN + state := split_part(tempString, ':', 1); + result.stateAbbrev := split_part(tempString, ':', 2); + END IF; + + -- The easiest case is if the address is comma delimited. There are some + -- likely cases: + -- street level, location, state + -- street level, location state + -- street level, location + -- street level, internal address, location, state + -- street level, internal address, location state + -- street level, internal address location state + -- street level, internal address, location + -- street level, internal address location + -- The first three are useful. + tempString := substring(fullStreet, '(?i),' || ws || '+(.*?)(,?' || ws || + '*' || cull_null(state) || '$)'); + IF tempString = '' THEN tempString := NULL; END IF; + IF tempString IS NOT NULL THEN + result.location := tempString; + IF addressString IS NOT NULL THEN + fullStreet := substring(fullStreet, '(?i)' || addressString || ws || + '+(.*),' || ws || '+' || result.location); + ELSE + fullStreet := substring(fullStreet, '(?i)(.*),' || ws || '+' || + result.location); + END IF; + END IF; + + -- Pull out the full street information, defined as everything between the + -- address and the state. This includes the location. + -- This doesnt need to be done if location has already been found. + IF result.location IS NULL THEN + IF addressString IS NOT NULL THEN + IF state IS NOT NULL THEN + fullStreet := substring(fullStreet, '(?i)' || addressString || + ws || '+(.*?)' || ws || '+' || state); + ELSE + fullStreet := substring(fullStreet, '(?i)' || addressString || + ws || '+(.*?)'); + END IF; + ELSE + IF state IS NOT NULL THEN + fullStreet := substring(fullStreet, '(?i)(.*?)' || ws || + '+' || state); + ELSE + fullStreet := substring(fullStreet, '(?i)(.*?)'); + END IF; + END IF; + END IF; + + -- Determine if any internal address is included, such as apartment + -- or suite number. + SELECT INTO tempInt count(*) FROM secondary_unit_lookup + WHERE texticregexeq(fullStreet, '(?i)' || ws || name || '(' + || ws || '|$)'); + IF tempInt = 1 THEN + SELECT INTO result.internal substring(fullStreet, '(?i)' || ws || '(' + || name || ws || '*#?' || ws + || '*(?:[0-9][-0-9a-zA-Z]*)?' || ')(?:' || ws || '|$)') + FROM secondary_unit_lookup + WHERE texticregexeq(fullStreet, '(?i)' || ws || name || '(' + || ws || '|$)'); + ELSIF tempInt > 1 THEN + -- In the event of multiple matches to a secondary unit designation, we + -- will assume that the last one is the true one. + tempInt := 0; + FOR rec in SELECT trim(substring(fullStreet, '(?i)' || ws || '(' + || name || '(?:' || ws || '*#?' || ws + || '*(?:[0-9][-0-9a-zA-Z]*)?)' || ws || '?|$)')) as value + FROM secondary_unit_lookup + WHERE texticregexeq(fullStreet, '(?i)' || ws || name || '(' + || ws || '|$)') LOOP + IF tempInt < position(rec.value in fullStreet) THEN + tempInt := position(rec.value in fullStreet); + result.internal := rec.value; + END IF; + END LOOP; + END IF; + + IF result.location IS NULL THEN + -- If the internal address is given, the location is everything after it. + result.location := substring(fullStreet, result.internal || ws || '+(.*)$'); + END IF; + + -- Pull potential street types from the full street information + SELECT INTO tempInt count(*) FROM street_type_lookup + WHERE texticregexeq(fullStreet, '(?i)' || ws || '(' || name + || ')(?:' || ws || '|$)'); + IF tempInt = 1 THEN + SELECT INTO rec abbrev, substring(fullStreet, '(?i)' || ws || '(' + || name || ')(?:' || ws || '|$)') AS given FROM street_type_lookup + WHERE texticregexeq(fullStreet, '(?i)' || ws || '(' || name + || ')(?:' || ws || '|$)'); + streetType := rec.given; + result.streetTypeAbbrev := rec.abbrev; + ELSIF tempInt > 1 THEN + tempInt := 0; + FOR rec IN SELECT abbrev, substring(fullStreet, '(?i)' || ws || '(' + || name || ')(?:' || ws || '|$)') AS given FROM street_type_lookup + WHERE texticregexeq(fullStreet, '(?i)' || ws || '(' || name + || ')(?:' || ws || '|$)') LOOP + -- If we have found an internal address, make sure the type + -- precedes it. + IF result.internal IS NOT NULL THEN + IF position(rec.given IN fullStreet) < position(result.internal IN fullStreet) THEN + IF tempInt < position(rec.given IN fullStreet) THEN + streetType := rec.given; + result.streetTypeAbbrev := rec.abbrev; + tempInt := position(rec.given IN fullStreet); + END IF; + END IF; + ELSIF tempInt < position(rec.given IN fullStreet) THEN + streetType := rec.given; + result.streetTypeAbbrev := rec.abbrev; + tempInt := position(rec.given IN fullStreet); + END IF; + END LOOP; + END IF; + + -- There is a little more processing required now. If the word after the + -- street type begins with a number, the street type should be considered + -- part of the name, as well as the next word. eg, State Route 225a. If + -- the next word starts with a char, then everything after the street type + -- will be considered location. If there is no street type, then I'm sad. + IF streetType IS NOT NULL THEN + tempString := substring(fullStreet, streetType || ws || + E'+([0-9][^ ,.\t\r\n\f]*?)' || ws); + IF tempString IS NOT NULL THEN + IF result.location IS NULL THEN + result.location := substring(fullStreet, streetType || ws || '+' + || tempString || ws || '+(.*)$'); + END IF; + reducedStreet := substring(fullStreet, '(.*)' || ws || '+' + || result.location || '$'); + streetType := NULL; + result.streetTypeAbbrev := NULL; + ELSE + IF result.location IS NULL THEN + result.location := substring(fullStreet, streetType || ws || '+(.*)$'); + END IF; + reducedStreet := substring(fullStreet, '^(.*)' || ws || '+' + || streetType); + END IF; + + -- The pre direction should be at the beginning of the fullStreet string. + -- The post direction should be at the beginning of the location string + -- if there is no internal address + SELECT INTO tempString substring(reducedStreet, '(?i)(^' || name + || ')' || ws) FROM direction_lookup WHERE + texticregexeq(reducedStreet, '(?i)(^' || name || ')' || ws) + ORDER BY length(name) DESC; + IF tempString IS NOT NULL THEN + preDir := tempString; + SELECT INTO result.preDirAbbrev abbrev FROM direction_lookup + where texticregexeq(reducedStreet, '(?i)(^' || name || ')' || ws) + ORDER BY length(name) DESC; + result.streetName := substring(reducedStreet, '^' || preDir || ws || '(.*)'); + ELSE + result.streetName := reducedStreet; + END IF; + + IF texticregexeq(result.location, '(?i)' || result.internal || '$') THEN + -- If the internal address is at the end of the location, then no + -- location was given. We still need to look for post direction. + SELECT INTO rec abbrev, + substring(result.location, '(?i)^(' || name || ')' || ws) as value + FROM direction_lookup WHERE texticregexeq(result.location, '(?i)^' + || name || ws) ORDER BY length(name) desc; + IF rec.value IS NOT NULL THEN + postDir := rec.value; + result.postDirAbbrev := rec.abbrev; + END IF; + result.location := null; + ELSIF result.internal IS NULL THEN + -- If no location is given, the location string will be the post direction + SELECT INTO tempInt count(*) FROM direction_lookup WHERE + upper(result.location) = upper(name); + IF tempInt != 0 THEN + postDir := result.location; + SELECT INTO result.postDirAbbrev abbrev FROM direction_lookup WHERE + upper(postDir) = upper(name); + result.location := NULL; + ELSE + -- postDirection is not equal location, but may be contained in it. + SELECT INTO tempString substring(result.location, '(?i)(^' || name + || ')' || ws) FROM direction_lookup WHERE + texticregexeq(result.location, '(?i)(^' || name || ')' || ws) + ORDER BY length(name) desc; + IF tempString IS NOT NULL THEN + postDir := tempString; + SELECT INTO result.postDirAbbrev abbrev FROM direction_lookup + where texticregexeq(result.location, '(?i)(^' || name || ')' || ws); + result.location := substring(result.location, '^' || postDir || ws || '+(.*)'); + END IF; + END IF; + ELSE + -- internal is not null, but is not at the end of the location string + -- look for post direction before the internal address + SELECT INTO tempString substring(fullStreet, '(?i)' || streetType + || ws || '+(' || name || ')' || ws || '+' || result.internal) + FROM direction_lookup WHERE texticregexeq(fullStreet, '(?i)' + || ws || name || ws || '+' || result.internal) ORDER BY length(name) desc; + IF tempString IS NOT NULL THEN + postDir := tempString; + SELECT INTO result.postDirAbbrev abbrev FROM direction_lookup + WHERE texticregexeq(fullStreet, '(?i)' || ws || name || ws); + END IF; + END IF; + ELSE + -- No street type was found + + -- If an internal address was given, then the split becomes easy, and the + -- street name is everything before it, without directions. + IF result.internal IS NOT NULL THEN + reducedStreet := substring(fullStreet, '(?i)^(.*?)' || ws || '+' + || result.internal); + SELECT INTO tempInt count(*) FROM direction_lookup WHERE + texticregexeq(reducedStreet, '(?i)' || ws || name || '$'); + IF tempInt > 0 THEN + SELECT INTO postDir substring(reducedStreet, '(?i)' || ws || '(' + || name || ')' || '$') FROM direction_lookup + WHERE texticregexeq(reducedStreet, '(?i)' || ws || name || '$'); + SELECT INTO result.postDirAbbrev abbrev FROM direction_lookup + WHERE texticregexeq(reducedStreet, '(?i)' || ws || name || '$'); + END IF; + SELECT INTO tempString substring(reducedStreet, '(?i)^(' || name + || ')' || ws) FROM direction_lookup WHERE + texticregexeq(reducedStreet, '(?i)^(' || name || ')' || ws) + ORDER BY length(name) DESC; + IF tempString IS NOT NULL THEN + preDir := tempString; + SELECT INTO result.preDirAbbrev abbrev FROM direction_lookup WHERE + texticregexeq(reducedStreet, '(?i)(^' || name || ')' || ws) + ORDER BY length(name) DESC; + result.streetName := substring(reducedStreet, '(?i)^' || preDir || ws + || '+(.*?)(?:' || ws || '+' || cull_null(postDir) || '|$)'); + ELSE + result.streetName := substring(reducedStreet, '(?i)^(.*?)(?:' || ws + || '+' || cull_null(postDir) || '|$)'); + END IF; + ELSE + + -- If a post direction is given, then the location is everything after, + -- the street name is everything before, less any pre direction. + SELECT INTO tempInt count(*) FROM direction_lookup + WHERE texticregexeq(fullStreet, '(?i)' || ws || name || '(?:' + || ws || '|$)'); + + IF tempInt = 1 THEN + -- A single postDir candidate was found. This makes it easier. + SELECT INTO postDir substring(fullStreet, '(?i)' || ws || '(' + || name || ')(?:' || ws || '|$)') FROM direction_lookup WHERE + texticregexeq(fullStreet, '(?i)' || ws || name || '(?:' + || ws || '|$)'); + SELECT INTO result.postDirAbbrev abbrev FROM direction_lookup + WHERE texticregexeq(fullStreet, '(?i)' || ws || name + || '(?:' || ws || '|$)'); + IF result.location IS NULL THEN + result.location := substring(fullStreet, '(?i)' || ws || postDir + || ws || '+(.*?)$'); + END IF; + reducedStreet := substring(fullStreet, '^(.*?)' || ws || '+' + || postDir); + SELECT INTO tempString substring(reducedStreet, '(?i)(^' || name + || ')' || ws) FROM direction_lookup WHERE + texticregexeq(reducedStreet, '(?i)(^' || name || ')' || ws) + ORDER BY length(name) DESC; + IF tempString IS NOT NULL THEN + preDir := tempString; + SELECT INTO result.preDirAbbrev abbrev FROM direction_lookup WHERE + texticregexeq(reducedStreet, '(?i)(^' || name || ')' || ws) + ORDER BY length(name) DESC; + result.streetName := substring(reducedStreet, '^' || preDir || ws + || '+(.*)'); + ELSE + result.streetName := reducedStreet; + END IF; + ELSIF tempInt > 1 THEN + -- Multiple postDir candidates were found. We need to find the last + -- incident of a direction, but avoid getting the last word from + -- a two word direction. eg extracting "East" from "North East" + -- We do this by sorting by length, and taking the last direction + -- in the results that is not included in an earlier one. + -- This wont be a problem it preDir is North East and postDir is + -- East as the regex requires a space before the direction. Only + -- the East will return from the preDir. + tempInt := 0; + FOR rec IN SELECT abbrev, substring(fullStreet, '(?i)' || ws || '(' + || name || ')(?:' || ws || '|$)') AS value + FROM direction_lookup + WHERE texticregexeq(fullStreet, '(?i)' || ws || name + || '(?:' || ws || '|$)') + ORDER BY length(name) desc LOOP + tempInt := 0; + IF tempInt < position(rec.value in fullStreet) THEN + IF postDir IS NULL THEN + tempInt := position(rec.value in fullStreet); + postDir := rec.value; + result.postDirAbbrev := rec.abbrev; + ELSIF NOT texticregexeq(postDir, '(?i)' || rec.value) THEN + tempInt := position(rec.value in fullStreet); + postDir := rec.value; + result.postDirAbbrev := rec.abbrev; + END IF; + END IF; + END LOOP; + IF result.location IS NULL THEN + result.location := substring(fullStreet, '(?i)' || ws || postDir || ws + || '+(.*?)$'); + END IF; + reducedStreet := substring(fullStreet, '(?i)^(.*?)' || ws || '+' + || postDir); + SELECT INTO tempString substring(reducedStreet, '(?i)(^' || name + || ')' || ws) FROM direction_lookup WHERE + texticregexeq(reducedStreet, '(?i)(^' || name || ')' || ws) + ORDER BY length(name) DESC; + IF tempString IS NOT NULL THEN + preDir := tempString; + SELECT INTO result.preDirAbbrev abbrev FROM direction_lookup WHERE + texticregexeq(reducedStreet, '(?i)(^' || name || ')' || ws) + ORDER BY length(name) DESC; + result.streetName := substring(reducedStreet, '^' || preDir || ws + || '+(.*)'); + ELSE + result.streetName := reducedStreet; + END IF; + ELSE + + -- There is no street type, directional suffix or internal address + -- to allow distinction between street name and location. + IF result.location IS NULL THEN + result.location := location_extract(fullStreet, result.stateAbbrev); + -- If the location was found, remove it from fullStreet + fullStreet := substring(fullStreet, '(?i)(.*),' || ws || '+' || + result.location); + END IF; + + -- Check for a direction prefix. + SELECT INTO tempString substring(fullStreet, '(?i)(^' || name + || ')' || ws) FROM direction_lookup WHERE + texticregexeq(fullStreet, '(?i)(^' || name || ')' || ws) + ORDER BY length(name); + IF tempString IS NOT NULL THEN + preDir := tempString; + SELECT INTO result.preDirAbbrev abbrev FROM direction_lookup WHERE + texticregexeq(fullStreet, '(?i)(^' || name || ')' || ws) + ORDER BY length(name) DESC; + IF result.location IS NOT NULL THEN + -- The location may still be in the fullStreet, or may + -- have been removed already + result.streetName := substring(fullStreet, '^' || preDir || ws + || '+(.*?)(' || ws || '+' || result.location || '|$)'); + ELSE + result.streetName := substring(fullStreet, '^' || preDir || ws + || '+(.*?)' || ws || '*'); + END IF; + ELSE + IF result.location IS NOT NULL THEN + -- The location may still be in the fullStreet, or may + -- have been removed already + result.streetName := substring(fullStreet, '^(.*?)(' || ws + || '+' || result.location || '|$)'); + ELSE + result.streetName := fullStreet; + END IF; + END IF; + END IF; + END IF; + END IF; + + result.address := to_number(addressString, '99999999999'); + result.zip := to_number(zipString, '99999'); + + result.parsed := TRUE; + RETURN result; +END +$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/normalize/pprint_addy.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/normalize/pprint_addy.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/normalize/pprint_addy.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/normalize/pprint_addy.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,36 @@ +CREATE OR REPLACE FUNCTION pprint_addy( + input NORM_ADDY +) RETURNS VARCHAR +AS $_$ +DECLARE + result VARCHAR; +BEGIN + IF NOT input.parsed THEN + RETURN NULL; + END IF; + + result := cull_null(input.address::text) + || CASE WHEN input.preDirAbbrev IS NOT NULL THEN ' ' ELSE '' END + || cull_null(input.preDirAbbrev) + || CASE WHEN input.streetName IS NOT NULL THEN ' ' ELSE '' END + || cull_null(input.streetName) + || CASE WHEN input.streetTypeAbbrev IS NOT NULL THEN ' ' ELSE '' END + || cull_null(input.streetTypeAbbrev) + || CASE WHEN input.postDirAbbrev IS NOT NULL THEN ' ' ELSE '' END + || cull_null(input.postDirAbbrev) + || CASE WHEN + input.address IS NOT NULL OR + input.streetName IS NOT NULL + THEN ', ' ELSE '' END + || cull_null(input.internal) + || CASE WHEN input.internal IS NOT NULL THEN ', ' ELSE '' END + || cull_null(input.location) + || CASE WHEN input.location IS NOT NULL THEN ', ' ELSE '' END + || cull_null(input.stateAbbrev) + || CASE WHEN input.stateAbbrev IS NOT NULL THEN ' ' ELSE '' END + || cull_null(lpad(input.zip::text,5,'0')); + + RETURN result; + +END; +$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/normalize/state_extract.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/normalize/state_extract.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/normalize/state_extract.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/normalize/state_extract.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,82 @@ +-- state_extract(addressStringLessZipCode) +-- Extracts the state from end of the given string. +-- +-- This function uses the state_lookup table to determine which state +-- the input string is indicating. First, an exact match is pursued, +-- and in the event of failure, a word-by-word fuzzy match is attempted. +-- +-- The result is the state as given in the input string, and the approved +-- state abbreviation, seperated by a colon. +CREATE OR REPLACE FUNCTION state_extract(rawInput VARCHAR) RETURNS VARCHAR +AS $_$ +DECLARE + tempInt INTEGER; + tempString VARCHAR; + state VARCHAR; + stateAbbrev VARCHAR; + result VARCHAR; + rec RECORD; + test BOOLEAN; + ws VARCHAR; +BEGIN + ws := E'[ ,.\t\n\f\r]'; + + -- Separate out the last word of the state, and use it to compare to + -- the state lookup table to determine the entire name, as well as the + -- abbreviation associated with it. The zip code may or may not have + -- been found. + tempString := substring(rawInput from ws || E'+([^ ,.\t\n\f\r0-9]*?)$'); + SELECT INTO tempInt count(*) FROM (select distinct abbrev from state_lookup + WHERE upper(abbrev) = upper(tempString)) as blah; + IF tempInt = 1 THEN + state := tempString; + SELECT INTO stateAbbrev abbrev FROM (select distinct abbrev from + state_lookup WHERE upper(abbrev) = upper(tempString)) as blah; + ELSE + SELECT INTO tempInt count(*) FROM state_lookup WHERE upper(name) + like upper('%' || tempString); + IF tempInt >= 1 THEN + FOR rec IN SELECT name from state_lookup WHERE upper(name) + like upper('%' || tempString) LOOP + SELECT INTO test texticregexeq(rawInput, name) FROM state_lookup + WHERE rec.name = name; + IF test THEN + SELECT INTO stateAbbrev abbrev FROM state_lookup + WHERE rec.name = name; + state := substring(rawInput, '(?i)' || rec.name); + EXIT; + END IF; + END LOOP; + ELSE + -- No direct match for state, so perform fuzzy match. + SELECT INTO tempInt count(*) FROM state_lookup + WHERE soundex(tempString) = end_soundex(name); + IF tempInt >= 1 THEN + FOR rec IN SELECT name, abbrev FROM state_lookup + WHERE soundex(tempString) = end_soundex(name) LOOP + tempInt := count_words(rec.name); + tempString := get_last_words(rawInput, tempInt); + test := TRUE; + FOR i IN 1..tempInt LOOP + IF soundex(split_part(tempString, ' ', i)) != + soundex(split_part(rec.name, ' ', i)) THEN + test := FALSE; + END IF; + END LOOP; + IF test THEN + state := tempString; + stateAbbrev := rec.abbrev; + EXIT; + END IF; + END LOOP; + END IF; + END IF; + END IF; + + IF state IS NOT NULL AND stateAbbrev IS NOT NULL THEN + result := state || ':' || stateAbbrev; + END IF; + + RETURN result; +END; +$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/orig/tiger_geocoder.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/orig/tiger_geocoder.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/orig/tiger_geocoder.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/orig/tiger_geocoder.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2657 @@ +-- Runs the soundex function on the last word in the string provided. +-- Words are allowed to be seperated by space, comma, period, new-line +-- tab or form feed. +CREATE OR REPLACE FUNCTION end_soundex(VARCHAR) RETURNS VARCHAR +AS ' +DECLARE + tempString VARCHAR; +BEGIN + tempString := substring($1, ''[ ,\.\n\t\f]([a-zA-Z0-9]*)$''); + IF tempString IS NOT NULL THEN + tempString := soundex(tempString); + ELSE + tempString := soundex($1); + END IF; + return tempString; +END; +' LANGUAGE plpgsql; + +-- Returns the value passed, or an empty string if null. +-- This is used to concatinate values that may be null. +CREATE OR REPLACE FUNCTION cull_null(VARCHAR) RETURNS VARCHAR +AS ' +BEGIN + IF $1 IS NULL THEN + return ''''; + ELSE + return $1; + END IF; +END; +' LANGUAGE plpgsql; + +-- Determine the number of words in a string. Words are allowed to +-- be seperated only by spaces, but multiple spaces between +-- words are allowed. +CREATE OR REPLACE FUNCTION count_words(VARCHAR) RETURNS INTEGER +AS ' +DECLARE + tempString VARCHAR; + tempInt INTEGER; + count INTEGER := 1; + lastSpace BOOLEAN := FALSE; +BEGIN + IF $1 IS NULL THEN + return -1; + END IF; + tempInt := length($1); + IF tempInt = 0 THEN + return 0; + END IF; + FOR i IN 1..tempInt LOOP + tempString := substring($1 from i for 1); + IF tempString = '' '' THEN + IF NOT lastSpace THEN + count := count + 1; + END IF; + lastSpace := TRUE; + ELSE + lastSpace := FALSE; + END IF; + END LOOP; + return count; +END; +' LANGUAGE plpgsql; + + + +CREATE OR REPLACE FUNCTION geocode(VARCHAR) RETURNS REFCURSOR +AS ' +BEGIN + return geocode(NULL, $1); +END; +' LANGUAGE plpgsql; + +CREATE OR REPLACE FUNCTION geocode(REFCURSOR, VARCHAR) RETURNS REFCURSOR +AS ' +DECLARE + result REFCURSOR; + input VARCHAR; + parsed VARCHAR; + addressString VARCHAR; + address INTEGER; + directionPrefix VARCHAR; + streetName VARCHAR; + streetType VARCHAR; + directionSuffix VARCHAR; + location VARCHAR; + state VARCHAR; + zipCodeString VARCHAR; + zipCode INTEGER; + verbose BOOLEAN := TRUE; +BEGIN + IF verbose THEN + RAISE NOTICE ''geocode()''; + END IF; + -- Check inputs. + IF $1 IS NOT NULL THEN + result := $1; + END IF; + IF $2 IS NULL THEN + -- The address string is manditory. + RAISE EXCEPTION ''geocode() - No address string provided.''; + ELSE + input := $2; + END IF; + + -- Pass the input string into the address normalizer + parsed := normalize_address(input); + IF parsed IS NULL THEN + RAISE EXCEPTION ''geocode() - address string failed to parse.''; + END IF; + + addressString := split_part(parsed, '':'', 1); + directionPrefix := split_part(parsed, '':'', 2); + streetName := split_part(parsed, '':'', 3); + streetType := split_part(parsed, '':'', 4); + directionSuffix := split_part(parsed, '':'', 5); + location := split_part(parsed, '':'', 6); + state := split_part(parsed, '':'', 7); + zipCodeString := split_part(parsed, '':'', 8); + + -- Empty strings must be converted to nulls; + IF addressString = '''' THEN + addressString := NULL; + END IF; + IF directionPrefix = '''' THEN + directionPrefix := NULL; + END IF; + IF streetName = '''' THEN + streetName := NULL; + END IF; + IF streetType = '''' THEN + streetType := NULL; + END IF; + IF directionSuffix = '''' THEN + directionSuffix := NULL; + END IF; + IF location = '''' THEN + location := NULL; + END IF; + IF state = '''' THEN + state := NULL; + END IF; + IF zipCodeString = '''' THEN + zipCodeString := NULL; + END IF; + + -- address and zipCode must be integers + IF addressString IS NOT NULL THEN + address := to_number(addressString, ''99999999999''); + END IF; + IF zipCodeString IS NOT NULL THEN + zipCode := to_number(zipCodeString, ''99999''); + END IF; + + IF verbose THEN + RAISE NOTICE ''geocode() - address %'', address; + RAISE NOTICE ''geocode() - directionPrefix %'', directionPrefix; + RAISE NOTICE ''geocode() - streetName "%"'', streetName; + RAISE NOTICE ''geocode() - streetType %'', streetType; + RAISE NOTICE ''geocode() - directionSuffix %'', directionSuffix; + RAISE NOTICE ''geocode() - location "%"'', location; + RAISE NOTICE ''geocode() - state %'', state; + RAISE NOTICE ''geocode() - zipCode %'', zipCode; + END IF; + -- This is where any validation above the geocode_address functions would go. + + -- Call geocode_address + result := geocode_address(result, address, directionPrefix, streetName, + streetType, directionSuffix, location, state, zipCode); + RETURN result; +END; +' LANGUAGE plpgsql; + + + +-- geocode(cursor, address, directionPrefix, streetName, +-- streetTypeAbbreviation, directionSuffix, location, stateAbbreviation, +-- zipCode) +CREATE OR REPLACE FUNCTION geocode_address(refcursor, INTEGER, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, INTEGER) RETURNS REFCURSOR +AS ' +DECLARE + result REFCURSOR; + address INTEGER; + directionPrefix VARCHAR; + streetName VARCHAR; + streetTypeAbbrev VARCHAR; + directionSuffix VARCHAR; + location VARCHAR; + stateAbbrev VARCHAR; + state VARCHAR; + zipCode INTEGER; + tempString VARCHAR; + tempInt VARCHAR; + locationPlaceExact BOOLEAN := FALSE; + locationPlaceFuzzy BOOLEAN := FALSE; + locationCountySubExact BOOLEAN := FALSE; + locationCountySubFuzzy BOOLEAN := FALSE; + verbose BOOLEAN := TRUE; +BEGIN + IF verbose THEN + RAISE NOTICE ''geocode_address()''; + END IF; + -- The first step is to determine what weve been given, and if its enough. + IF $1 IS NOT NULL THEN + -- The result was not provided. No matter, we can use an unnamed one. + result := $1; + END IF; + IF $2 IS NULL THEN + -- The address is manditory. + -- Without it, wed be wandering into strangers homes all the time. + RAISE EXCEPTION ''geocode_address() - No address provided!''; + ELSE + address := $2; + END IF; + IF $3 IS NOT NULL THEN + -- The direction prefix really isnt important. + -- It will be used for rating if provided. + directionPrefix := $3; + END IF; + IF $4 IS NULL THEN + -- A street name must be given. Think about it. + RAISE EXCEPTION ''geocode_address() - No street name provided!''; + ELSE + streetName := $4; + END IF; + IF $5 IS NOT NULL THEN + -- A street type will be used for rating if provided, but isnt required. + streetTypeAbbrev := $5; + END IF; + IF $6 IS NOT NULL THEN + -- Same as direction prefix, only later. + directionSuffix := $6; + END IF; + IF $7 IS NOT NULL THEN + -- Location is not needed iff a zip is given. The check occurs after + -- the geocode_address_zip call. + location := $7; + END IF; + IF $8 IS NULL THEN + -- State abbreviation is manditory. It is also assumed to be valid. + ELSE + stateAbbrev := $8; + END IF; + IF $9 IS NOT NULL THEN + -- Zip code is optional, but nice. + zipCode := $9; + END IF; + + -- The geocoding tables store the state name rather than the abbreviation. + -- We can validate the abbreviation while retrieving the name. + IF stateAbbrev IS NOT NULL THEN + SELECT INTO state name FROM state_lookup + WHERE state_lookup.abbrev = stateAbbrev; + IF state IS NULL THEN + END IF; + END IF; + + IF zipCode IS NOT NULL THEN + IF verbose THEN + RAISE NOTICE ''geocode_address() - calling geocode_address_zip()''; + END IF; + -- If the zip code is given, it is the most useful way to narrow the + -- search. We will try it first, and if no results match, we will move + -- on to a location search. There is no fuzzy searching on zip codes. + result := geocode_address_zip(result, address, directionPrefix, streetName, + streetTypeAbbrev, directionSuffix, zipCode); + IF result IS NOT NULL THEN + RETURN result; + ELSE + result := $1; + END IF; + END IF; + -- After now, the location becomes manditory. + IF location IS NOT NULL THEN + -- location may be useful, it may not. The first step is to determine if + -- there are any potenial matches in the place and countysub fields. + -- This is done against the lookup tables, and will save us time on much + -- larger queries if they dont match. + IF verbose THEN + RAISE NOTICE ''geocode_address() - calling location_extract_place_*()''; + END IF; + tempString := location_extract_place_exact(location, stateAbbrev); + IF tempString IS NOT NULL THEN + locationPlaceExact := TRUE; + ELSE + locationPlaceExact := FALSE; + END IF; + tempString := location_extract_place_fuzzy(location, stateAbbrev); + IF tempString IS NOT NULL THEN + locationPlaceFuzzy := true; + ELSE + locationPlaceFuzzy := false; + END IF; + IF verbose THEN + RAISE NOTICE ''geocode_address() - calling location_extract_countysub_*()''; + END IF; + tempString := location_extract_countysub_exact(location, stateAbbrev); + IF tempString IS NOT NULL THEN + locationCountySubExact := TRUE; + ELSE + locationCountySubExact := FALSE; + END IF; + tempString := location_extract_countysub_fuzzy(location, stateAbbrev); + IF tempString IS NOT NULL THEN + locationCountySubFuzzy := true; + ELSE + locationCountySubFuzzy := false; + END IF; + END IF; + IF locationPlaceExact THEN + IF verbose THEN + RAISE NOTICE ''geocode_address() - calling geocode_address_place_exact()''; + END IF; + result := geocode_address_place_exact(result, address, directionPrefix, + streetName, streetTypeAbbrev, directionSuffix, location, state); + IF result IS NOT NULL THEN + RETURN result; + ELSE + result := $1; + END IF; + END IF; + IF locationCountySubExact THEN + IF verbose THEN + RAISE NOTICE ''geocode_address() - calling geocode_address_countysub_exact()''; + END IF; + result := geocode_address_countysub_exact(result, address, directionPrefix, + streetName, streetTypeAbbrev, directionSuffix, location, state); + IF result IS NOT NULL THEN + RETURN result; + ELSE + result := $1; + END IF; + END IF; + IF locationPlaceFuzzy THEN + IF verbose THEN + RAISE NOTICE ''geocode_address() - calling geocode_address_place_fuzzy()''; + END IF; + result := geocode_address_place_fuzzy(result, address, directionPrefix, + streetName, streetTypeAbbrev, directionSuffix, location, state); + IF result IS NOT NULL THEN + RETURN result; + ELSE + result := $1; + END IF; + END IF; + IF locationCountySubFuzzy THEN + IF verbose THEN + RAISE NOTICE ''geocode_address() - calling geocode_address_countysub_fuzzy()''; + END IF; + result := geocode_address_countysub_fuzzy(result, address, directionPrefix, + streetName, streetTypeAbbrev, directionSuffix, location, state); + IF result IS NOT NULL THEN + RETURN result; + ELSE + result := $1; + END IF; + END IF; + IF state IS NOT NULL THEN + IF verbose THEN + RAISE NOTICE ''geocode_address() - calling geocode_address_state()''; + END IF; + result := geocode_address_state(result, address, directionPrefix, + streetName, streetTypeAbbrev, directionSuffix, state); + IF result IS NOT NULL THEN + RETURN result; + ELSE + result := $1; + END IF; + END IF; + RETURN NULL; +END; +' LANGUAGE plpgsql; + + + +CREATE OR REPLACE FUNCTION geocode_address_countysub_exact(REFCURSOR, INTEGER, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR) RETURNS REFCURSOR +AS ' +DECLARE + result REFCURSOR; + address INTEGER; + directionPrefix VARCHAR; + streetName VARCHAR; + streetTypeAbbrev VARCHAR; + directionSuffix VARCHAR; + state VARCHAR; + location VARCHAR; + tempString VARCHAR; + tempInt VARCHAR; + verbose BOOLEAN := TRUE; +BEGIN + IF verbose THEN + RAISE NOTICE ''geocode_address_countysub_exact()''; + END IF; + -- The first step is to determine what weve been given, and if its enough. + IF $1 IS NOT NULL THEN + -- The cursor was not provided. No matter, we can use an unnamed one. + result := $1; + END IF; + IF $2 IS NULL THEN + -- The address is manditory. + -- Without it, wed be wandering into strangers homes all the time. + RAISE EXCEPTION ''geocode_address_countysub_exact() - No address provided!''; + ELSE + address := $2; + END IF; + IF $3 IS NOT NULL THEN + -- The direction prefix really isnt important. + -- It will be used for rating if provided. + directionPrefix := $3; + END IF; + IF $4 IS NULL THEN + -- A street name must be given. Think about it. + RAISE EXCEPTION ''geocode_address_countysub_exact() - No street name provided!''; + ELSE + streetName := $4; + END IF; + IF $5 IS NOT NULL THEN + -- A street type will be used for rating if provided, but isnt required. + streetTypeAbbrev := $5; + END IF; + IF $6 IS NOT NULL THEN + -- Same as direction prefix, only later. + directionSuffix := $6; + END IF; + IF $7 IS NULL THEN + -- location is manditory. This is the location geocoder after all. + RAISE EXCEPTION ''geocode_address_countysub_exact() - No location provided!''; + ELSE + location := $7; + END IF; + IF $8 IS NOT NULL THEN + state := $8; + END IF; + + -- Check to see if the road name can be matched. + IF state IS NOT NULL THEN + SELECT INTO tempInt count(*) FROM tiger_geocode_roads + WHERE location = tiger_geocode_roads.cousub + AND soundex(streetName) = soundex(tiger_geocode_roads.fename) + AND state = tiger_geocode_roads.state; + ELSE + SELECT INTO tempInt count(*) FROM tiger_geocode_roads + WHERE location = tiger_geocode_roads.cousub + AND soundex(streetName) = soundex(tiger_geocode_roads.fename); + END IF; + IF verbose THEN + RAISE NOTICE ''geocode_address_countysub_exact() - % potential matches.'', tempInt; + END IF; + IF tempInt = 0 THEN + RETURN NULL; + ELSE + -- The road name matches, now we check to see if the addresses match + IF state IS NOT NULL THEN + SELECT INTO tempInt count(*) + FROM ( + SELECT *, rate_attributes(directionPrefix, tiger_geocode_roads.fedirp, + streetName, tiger_geocode_roads.fename, streetTypeAbbrev, + tiger_geocode_roads.fetype, directionSuffix, + tiger_geocode_roads.fedirs) as rating + FROM tiger_geocode_roads + WHERE location = tiger_geocode_roads.cousub + AND soundex(streetName) = soundex(tiger_geocode_roads.fename) + AND state = tiger_geocode_roads.state + ) AS subquery, tiger_geocode_join, roads_local + WHERE includes_address(address, roads_local.fraddl, roads_local.toaddl, + roads_local.fraddr, roads_local.toaddr) + AND subquery.id = tiger_geocode_join.id + AND tiger_geocode_join.tlid = roads_local.tlid; + ELSE + SELECT INTO tempInt count(*) + FROM ( + SELECT *, rate_attributes(directionPrefix, tiger_geocode_roads.fedirp, + streetName, tiger_geocode_roads.fename, streetTypeAbbrev, + tiger_geocode_roads.fetype, directionSuffix, + tiger_geocode_roads.fedirs) as rating + FROM tiger_geocode_roads + WHERE location = tiger_geocode_roads.cousub + AND soundex(streetName) = soundex(tiger_geocode_roads.fename) + ) AS subquery, tiger_geocode_join, roads_local + WHERE includes_address(address, roads_local.fraddl, roads_local.toaddl, + roads_local.fraddr, roads_local.toaddr) + AND subquery.id = tiger_geocode_join.id + AND tiger_geocode_join.tlid = roads_local.tlid; + END IF; + IF verbose THEN + RAISE NOTICE ''geocode_address_countysub_exact() - % address matches.'', tempInt; + END IF; + IF tempInt = 0 THEN + return NULL; + ELSE + IF state IS NOT NULL THEN + OPEN result FOR + SELECT *, interpolate_from_address(address, roads_local.fraddl, + roads_local.toaddl, roads_local.fraddr, roads_local.toaddr, + roads_local.geom) as address_geom + FROM ( + SELECT *, rate_attributes(directionPrefix, tiger_geocode_roads.fedirp, + streetName, tiger_geocode_roads.fename, streetTypeAbbrev, + tiger_geocode_roads.fetype, directionSuffix, + tiger_geocode_roads.fedirs, location, + tiger_geocode_roads.cousub) as rating + FROM tiger_geocode_roads + WHERE location = tiger_geocode_roads.cousub + AND soundex(streetName) = soundex(tiger_geocode_roads.fename) + AND state = tiger_geocode_roads.state + ) AS subquery, tiger_geocode_join, roads_local + WHERE includes_address(address, roads_local.fraddl, roads_local.toaddl, + roads_local.fraddr, roads_local.toaddr) + AND subquery.id = tiger_geocode_join.id + AND tiger_geocode_join.tlid = roads_local.tlid + ORDER BY subquery.rating; + return result; + ELSE + OPEN result FOR + SELECT *, interpolate_from_address(address, roads_local.fraddl, + roads_local.toaddl, roads_local.fraddr, roads_local.toaddr, + roads_local.geom) as address_geom + FROM ( + SELECT *, rate_attributes(directionPrefix, tiger_geocode_roads.fedirp, + streetName, tiger_geocode_roads.fename, streetTypeAbbrev, + tiger_geocode_roads.fetype, directionSuffix, + tiger_geocode_roads.fedirs, location, + tiger_geocode_roads.cousub) as rating + FROM tiger_geocode_roads + WHERE location = tiger_geocode_roads.cousub + AND soundex(streetName) = soundex(tiger_geocode_roads.fename) + ) AS subquery, tiger_geocode_join, roads_local + WHERE includes_address(address, roads_local.fraddl, roads_local.toaddl, + roads_local.fraddr, roads_local.toaddr) + AND subquery.id = tiger_geocode_join.id + AND tiger_geocode_join.tlid = roads_local.tlid + ORDER BY subquery.rating; + RETURN result; + END IF; + END IF; + END IF; +END; +' LANGUAGE plpgsql; + + +CREATE OR REPLACE FUNCTION geocode_address_countysub_fuzzy(REFCURSOR, INTEGER, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR) RETURNS REFCURSOR +AS ' +DECLARE + result REFCURSOR; + address INTEGER; + directionPrefix VARCHAR; + streetName VARCHAR; + streetTypeAbbrev VARCHAR; + directionSuffix VARCHAR; + state VARCHAR; + location VARCHAR; + tempString VARCHAR; + tempInt VARCHAR; + verbose BOOLEAN := TRUE; +BEGIN + IF verbose THEN + RAISE NOTICE ''geocode_address_countysub_fuzzy()''; + END IF; + -- The first step is to determine what weve been given, and if its enough. + IF $1 IS NOT NULL THEN + -- The cursor was not provided. No matter, we can use an unnamed one. + result := $1; + END IF; + IF $2 IS NULL THEN + -- The address is manditory. + -- Without it, wed be wandering into strangers homes all the time. + RAISE EXCEPTION ''geocode_address_countysub_fuzzy() - No address provided!''; + ELSE + address := $2; + END IF; + IF $3 IS NOT NULL THEN + -- The direction prefix really isnt important. + -- It will be used for rating if provided. + directionPrefix := $3; + END IF; + IF $4 IS NULL THEN + -- A street name must be given. Think about it. + RAISE EXCEPTION ''geocode_address_countysub_fuzzy() - No street name provided!''; + ELSE + streetName := $4; + END IF; + IF $5 IS NOT NULL THEN + -- A street type will be used for rating if provided, but isnt required. + streetTypeAbbrev := $5; + END IF; + IF $6 IS NOT NULL THEN + -- Same as direction prefix, only later. + directionSuffix := $6; + END IF; + IF $7 IS NULL THEN + -- location is manditory. This is the location geocoder after all. + RAISE EXCEPTION ''geocode_address_countysub_fuzzy() - No location provided!''; + ELSE + location := $7; + END IF; + IF $8 IS NOT NULL THEN + state := $8; + END IF; + + -- Check to see if the road name can be matched. + IF state IS NOT NULL THEN + SELECT INTO tempInt count(*) FROM tiger_geocode_roads + WHERE soundex(location) = soundex(tiger_geocode_roads.cousub) + AND soundex(streetName) = soundex(tiger_geocode_roads.fename) + AND state = tiger_geocode_roads.state; + ELSE + SELECT INTO tempInt count(*) FROM tiger_geocode_roads + WHERE soundex(location) = soundex(tiger_geocode_roads.cousub) + AND soundex(streetName) = soundex(tiger_geocode_roads.fename); + END IF; + IF verbose THEN + RAISE NOTICE ''geocode_address_countysub_fuzzy() - % potential matches.'', tempInt; + END IF; + IF tempInt = 0 THEN + RETURN NULL; + ELSE + -- The road name matches, now we check to see if the addresses match + IF state IS NOT NULL THEN + SELECT INTO tempInt count(*) + FROM ( + SELECT *, rate_attributes(directionPrefix, tiger_geocode_roads.fedirp, + streetName, tiger_geocode_roads.fename, streetTypeAbbrev, + tiger_geocode_roads.fetype, directionSuffix, + tiger_geocode_roads.fedirs) as rating + FROM tiger_geocode_roads + WHERE soundex(location) = soundex(tiger_geocode_roads.cousub) + AND soundex(streetName) = soundex(tiger_geocode_roads.fename) + AND state = tiger_geocode_roads.state + ) AS subquery, tiger_geocode_join, roads_local + WHERE includes_address(address, roads_local.fraddl, roads_local.toaddl, + roads_local.fraddr, roads_local.toaddr) + AND subquery.id = tiger_geocode_join.id + AND tiger_geocode_join.tlid = roads_local.tlid; + ELSE + SELECT INTO tempInt count(*) + FROM ( + SELECT *, rate_attributes(directionPrefix, tiger_geocode_roads.fedirp, + streetName, tiger_geocode_roads.fename, streetTypeAbbrev, + tiger_geocode_roads.fetype, directionSuffix, + tiger_geocode_roads.fedirs) as rating + FROM tiger_geocode_roads + WHERE soundex(location) = soundex(tiger_geocode_roads.cousub) + AND soundex(streetName) = soundex(tiger_geocode_roads.fename) + ) AS subquery, tiger_geocode_join, roads_local + WHERE includes_address(address, roads_local.fraddl, roads_local.toaddl, + roads_local.fraddr, roads_local.toaddr) + AND subquery.id = tiger_geocode_join.id + AND tiger_geocode_join.tlid = roads_local.tlid; + END IF; + IF verbose THEN + RAISE NOTICE ''geocode_address_countysub_fuzzy() - % address matches.'', tempInt; + END IF; + IF tempInt = 0 THEN + return NULL; + ELSE + IF state IS NOT NULL THEN + OPEN result FOR + SELECT *, interpolate_from_address(address, roads_local.fraddl, + roads_local.toaddl, roads_local.fraddr, roads_local.toaddr, + roads_local.geom) as address_geom + FROM ( + SELECT *, rate_attributes(directionPrefix, tiger_geocode_roads.fedirp, + streetName, tiger_geocode_roads.fename, streetTypeAbbrev, + tiger_geocode_roads.fetype, directionSuffix, + tiger_geocode_roads.fedirs, location, + tiger_geocode_roads.cousub) as rating + FROM tiger_geocode_roads + WHERE soundex(location) = soundex(tiger_geocode_roads.cousub) + AND soundex(streetName) = soundex(tiger_geocode_roads.fename) + AND state = tiger_geocode_roads.state + ) AS subquery, tiger_geocode_join, roads_local + WHERE includes_address(address, roads_local.fraddl, roads_local.toaddl, + roads_local.fraddr, roads_local.toaddr) + AND subquery.id = tiger_geocode_join.id + AND tiger_geocode_join.tlid = roads_local.tlid + ORDER BY subquery.rating; + return result; + ELSE + OPEN result FOR + SELECT *, interpolate_from_address(address, roads_local.fraddl, + roads_local.toaddl, roads_local.fraddr, roads_local.toaddr, + roads_local.geom) as address_geom + FROM ( + SELECT *, rate_attributes(directionPrefix, tiger_geocode_roads.fedirp, + streetName, tiger_geocode_roads.fename, streetTypeAbbrev, + tiger_geocode_roads.fetype, directionSuffix, + tiger_geocode_roads.fedirs, location, + tiger_geocode_roads.cousub) as rating + FROM tiger_geocode_roads + WHERE soundex(location) = soundex(tiger_geocode_roads.cousub) + AND soundex(streetName) = soundex(tiger_geocode_roads.fename) + ) AS subquery, tiger_geocode_join, roads_local + WHERE includes_address(address, roads_local.fraddl, roads_local.toaddl, + roads_local.fraddr, roads_local.toaddr) + AND subquery.id = tiger_geocode_join.id + AND tiger_geocode_join.tlid = roads_local.tlid + ORDER BY subquery.rating; + RETURN result; + END IF; + END IF; + END IF; +END; +' LANGUAGE plpgsql; + + +CREATE OR REPLACE FUNCTION geocode_address_place_exact(REFCURSOR, INTEGER, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR) RETURNS REFCURSOR +AS ' +DECLARE + result REFCURSOR; + address INTEGER; + directionPrefix VARCHAR; + streetName VARCHAR; + streetTypeAbbrev VARCHAR; + directionSuffix VARCHAR; + state VARCHAR; + location VARCHAR; + tempString VARCHAR; + tempInt VARCHAR; + verbose BOOLEAN := TRUE; +BEGIN + IF verbose THEN + RAISE NOTICE ''geocode_address_place_exact()''; + END IF; + -- The first step is to determine what weve been given, and if its enough. + IF $1 IS NOT NULL THEN + -- The cursor was not provided. No matter, we can use an unnamed one. + result := $1; + END IF; + IF $2 IS NULL THEN + -- The address is manditory. + -- Without it, wed be wandering into strangers homes all the time. + RAISE EXCEPTION ''geocode_address_place_exact() - No address provided!''; + ELSE + address := $2; + END IF; + IF $3 IS NOT NULL THEN + -- The direction prefix really isnt important. + -- It will be used for rating if provided. + directionPrefix := $3; + END IF; + IF $4 IS NULL THEN + -- A street name must be given. Think about it. + RAISE EXCEPTION ''geocode_address_place_exact() - No street name provided!''; + ELSE + streetName := $4; + END IF; + IF $5 IS NOT NULL THEN + -- A street type will be used for rating if provided, but isnt required. + streetTypeAbbrev := $5; + END IF; + IF $6 IS NOT NULL THEN + -- Same as direction prefix, only later. + directionSuffix := $6; + END IF; + IF $7 IS NULL THEN + -- location is manditory. This is the location geocoder after all. + RAISE EXCEPTION ''geocode_address_place_exact() - No location provided!''; + ELSE + location := $7; + END IF; + IF $8 IS NOT NULL THEN + state := $8; + END IF; + + -- Check to see if the road name can be matched. + IF state IS NOT NULL THEN + SELECT INTO tempInt count(*) FROM tiger_geocode_roads + WHERE location = tiger_geocode_roads.place + AND soundex(streetName) = soundex(tiger_geocode_roads.fename) + AND state = tiger_geocode_roads.state; + ELSE + SELECT INTO tempInt count(*) FROM tiger_geocode_roads + WHERE location = tiger_geocode_roads.place + AND soundex(streetName) = soundex(tiger_geocode_roads.fename); + END IF; + IF verbose THEN + RAISE NOTICE ''geocode_address_place_exact() - % potential matches.'', tempInt; + END IF; + IF tempInt = 0 THEN + RETURN NULL; + ELSE + -- The road name matches, now we check to see if the addresses match + IF state IS NOT NULL THEN + SELECT INTO tempInt count(*) + FROM ( + SELECT *, rate_attributes(directionPrefix, tiger_geocode_roads.fedirp, + streetName, tiger_geocode_roads.fename, streetTypeAbbrev, + tiger_geocode_roads.fetype, directionSuffix, + tiger_geocode_roads.fedirs) as rating + FROM tiger_geocode_roads + WHERE location = tiger_geocode_roads.place + AND soundex(streetName) = soundex(tiger_geocode_roads.fename) + AND state = tiger_geocode_roads.state + ) AS subquery, tiger_geocode_join, roads_local + WHERE includes_address(address, roads_local.fraddl, roads_local.toaddl, + roads_local.fraddr, roads_local.toaddr) + AND subquery.id = tiger_geocode_join.id + AND tiger_geocode_join.tlid = roads_local.tlid; + ELSE + SELECT INTO tempInt count(*) + FROM ( + SELECT *, rate_attributes(directionPrefix, tiger_geocode_roads.fedirp, + streetName, tiger_geocode_roads.fename, streetTypeAbbrev, + tiger_geocode_roads.fetype, directionSuffix, + tiger_geocode_roads.fedirs) as rating + FROM tiger_geocode_roads + WHERE location = tiger_geocode_roads.place + AND soundex(streetName) = soundex(tiger_geocode_roads.fename) + ) AS subquery, tiger_geocode_join, roads_local + WHERE includes_address(address, roads_local.fraddl, roads_local.toaddl, + roads_local.fraddr, roads_local.toaddr) + AND subquery.id = tiger_geocode_join.id + AND tiger_geocode_join.tlid = roads_local.tlid; + END IF; + IF verbose THEN + RAISE NOTICE ''geocode_address_place_exact() - % address matches.'', tempInt; + END IF; + IF tempInt = 0 THEN + return NULL; + ELSE + IF state IS NOT NULL THEN + OPEN result FOR + SELECT *, interpolate_from_address(address, roads_local.fraddl, + roads_local.toaddl, roads_local.fraddr, roads_local.toaddr, + roads_local.geom) as address_geom + FROM ( + SELECT *, rate_attributes(directionPrefix, tiger_geocode_roads.fedirp, + streetName, tiger_geocode_roads.fename, streetTypeAbbrev, + tiger_geocode_roads.fetype, directionSuffix, + tiger_geocode_roads.fedirs, location, + tiger_geocode_roads.place) as rating + FROM tiger_geocode_roads + WHERE location = tiger_geocode_roads.place + AND soundex(streetName) = soundex(tiger_geocode_roads.fename) + AND state = tiger_geocode_roads.state + ) AS subquery, tiger_geocode_join, roads_local + WHERE includes_address(address, roads_local.fraddl, roads_local.toaddl, + roads_local.fraddr, roads_local.toaddr) + AND subquery.id = tiger_geocode_join.id + AND tiger_geocode_join.tlid = roads_local.tlid + ORDER BY subquery.rating; + return result; + ELSE + OPEN result FOR + SELECT *, interpolate_from_address(address, roads_local.fraddl, + roads_local.toaddl, roads_local.fraddr, roads_local.toaddr, + roads_local.geom) as address_geom + FROM ( + SELECT *, rate_attributes(directionPrefix, tiger_geocode_roads.fedirp, + streetName, tiger_geocode_roads.fename, streetTypeAbbrev, + tiger_geocode_roads.fetype, directionSuffix, + tiger_geocode_roads.fedirs, location, + tiger_geocode_roads.place) as rating + FROM tiger_geocode_roads + WHERE location = tiger_geocode_roads.place + AND soundex(streetName) = soundex(tiger_geocode_roads.fename) + ) AS subquery, tiger_geocode_join, roads_local + WHERE includes_address(address, roads_local.fraddl, roads_local.toaddl, + roads_local.fraddr, roads_local.toaddr) + AND subquery.id = tiger_geocode_join.id + AND tiger_geocode_join.tlid = roads_local.tlid + ORDER BY subquery.rating; + RETURN result; + END IF; + END IF; + END IF; +END; +' LANGUAGE plpgsql; + + + +CREATE OR REPLACE FUNCTION geocode_address_place_fuzzy(REFCURSOR, INTEGER, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR) RETURNS REFCURSOR +AS ' +DECLARE + result REFCURSOR; + address INTEGER; + directionPrefix VARCHAR; + streetName VARCHAR; + streetTypeAbbrev VARCHAR; + directionSuffix VARCHAR; + state VARCHAR; + location VARCHAR; + tempString VARCHAR; + tempInt VARCHAR; + verbose BOOLEAN := TRUE; +BEGIN + IF verbose THEN + RAISE NOTICE ''geocode_address_place_fuzzy()''; + END IF; + -- The first step is to determine what weve been given, and if its enough. + IF $1 IS NOT NULL THEN + -- The cursor was not provided. No matter, we can use an unnamed one. + result := $1; + END IF; + IF $2 IS NULL THEN + -- The address is manditory. + -- Without it, wed be wandering into strangers homes all the time. + RAISE EXCEPTION ''geocode_address_place_fuzzy() - No address provided!''; + ELSE + address := $2; + END IF; + IF $3 IS NOT NULL THEN + -- The direction prefix really isnt important. + -- It will be used for rating if provided. + directionPrefix := $3; + END IF; + IF $4 IS NULL THEN + -- A street name must be given. Think about it. + RAISE EXCEPTION ''geocode_address_place_fuzzy() - No street name provided!''; + ELSE + streetName := $4; + END IF; + IF $5 IS NOT NULL THEN + -- A street type will be used for rating if provided, but isnt required. + streetTypeAbbrev := $5; + END IF; + IF $6 IS NOT NULL THEN + -- Same as direction prefix, only later. + directionSuffix := $6; + END IF; + IF $7 IS NULL THEN + -- location is manditory. This is the location geocoder after all. + RAISE EXCEPTION ''geocode_address_place_fuzzy() - No location provided!''; + ELSE + location := $7; + END IF; + IF $8 IS NOT NULL THEN + state := $8; + END IF; + + -- Check to see if the road name can be matched. + IF state IS NOT NULL THEN + SELECT INTO tempInt count(*) FROM tiger_geocode_roads + WHERE soundex(location) = soundex(tiger_geocode_roads.place) + AND soundex(streetName) = soundex(tiger_geocode_roads.fename) + AND state = tiger_geocode_roads.state; + ELSE + SELECT INTO tempInt count(*) FROM tiger_geocode_roads + WHERE soundex(location) = soundex(tiger_geocode_roads.place) + AND soundex(streetName) = soundex(tiger_geocode_roads.fename); + END IF; + IF verbose THEN + RAISE NOTICE ''geocode_address_place_fuzzy() - % potential matches.'', tempInt; + END IF; + IF tempInt = 0 THEN + RETURN NULL; + ELSE + -- The road name matches, now we check to see if the addresses match + IF state IS NOT NULL THEN + SELECT INTO tempInt count(*) + FROM ( + SELECT *, rate_attributes(directionPrefix, tiger_geocode_roads.fedirp, + streetName, tiger_geocode_roads.fename, streetTypeAbbrev, + tiger_geocode_roads.fetype, directionSuffix, + tiger_geocode_roads.fedirs) as rating + FROM tiger_geocode_roads + WHERE soundex(location) = soundex(tiger_geocode_roads.place) + AND soundex(streetName) = soundex(tiger_geocode_roads.fename) + AND state = tiger_geocode_roads.state + ) AS subquery, tiger_geocode_join, roads_local + WHERE includes_address(address, roads_local.fraddl, roads_local.toaddl, + roads_local.fraddr, roads_local.toaddr) + AND subquery.id = tiger_geocode_join.id + AND tiger_geocode_join.tlid = roads_local.tlid; + ELSE + SELECT INTO tempInt count(*) + FROM ( + SELECT *, rate_attributes(directionPrefix, tiger_geocode_roads.fedirp, + streetName, tiger_geocode_roads.fename, streetTypeAbbrev, + tiger_geocode_roads.fetype, directionSuffix, + tiger_geocode_roads.fedirs) as rating + FROM tiger_geocode_roads + WHERE soundex(location) = soundex(tiger_geocode_roads.place) + AND soundex(streetName) = soundex(tiger_geocode_roads.fename) + ) AS subquery, tiger_geocode_join, roads_local + WHERE includes_address(address, roads_local.fraddl, roads_local.toaddl, + roads_local.fraddr, roads_local.toaddr) + AND subquery.id = tiger_geocode_join.id + AND tiger_geocode_join.tlid = roads_local.tlid; + END IF; + IF verbose THEN + RAISE NOTICE ''geocode_address_place_fuzzy() - % address matches.'', tempInt; + END IF; + IF tempInt = 0 THEN + return NULL; + ELSE + IF state IS NOT NULL THEN + OPEN result FOR + SELECT *, interpolate_from_address(address, roads_local.fraddl, + roads_local.toaddl, roads_local.fraddr, roads_local.toaddr, + roads_local.geom) as address_geom + FROM ( + SELECT *, rate_attributes(directionPrefix, tiger_geocode_roads.fedirp, + streetName, tiger_geocode_roads.fename, streetTypeAbbrev, + tiger_geocode_roads.fetype, directionSuffix, + tiger_geocode_roads.fedirs, location, + tiger_geocode_roads.place) as rating + FROM tiger_geocode_roads + WHERE soundex(location) = soundex(tiger_geocode_roads.place) + AND soundex(streetName) = soundex(tiger_geocode_roads.fename) + AND state = tiger_geocode_roads.state + ) AS subquery, tiger_geocode_join, roads_local + WHERE includes_address(address, roads_local.fraddl, roads_local.toaddl, + roads_local.fraddr, roads_local.toaddr) + AND subquery.id = tiger_geocode_join.id + AND tiger_geocode_join.tlid = roads_local.tlid + ORDER BY subquery.rating; + return result; + ELSE + OPEN result FOR + SELECT *, interpolate_from_address(address, roads_local.fraddl, + roads_local.toaddl, roads_local.fraddr, roads_local.toaddr, + roads_local.geom) as address_geom + FROM ( + SELECT *, rate_attributes(directionPrefix, tiger_geocode_roads.fedirp, + streetName, tiger_geocode_roads.fename, streetTypeAbbrev, + tiger_geocode_roads.fetype, directionSuffix, + tiger_geocode_roads.fedirs, location, + tiger_geocode_roads.place) as rating + FROM tiger_geocode_roads + WHERE soundex(location) = soundex(tiger_geocode_roads.place) + AND soundex(streetName) = soundex(tiger_geocode_roads.fename) + ) AS subquery, tiger_geocode_join, roads_local + WHERE includes_address(address, roads_local.fraddl, roads_local.toaddl, + roads_local.fraddr, roads_local.toaddr) + AND subquery.id = tiger_geocode_join.id + AND tiger_geocode_join.tlid = roads_local.tlid + ORDER BY subquery.rating; + RETURN result; + END IF; + END IF; + END IF; +END; +' LANGUAGE plpgsql; + + + +CREATE OR REPLACE FUNCTION geocode_address_state(REFCURSOR, INTEGER, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR) RETURNS REFCURSOR +AS ' +DECLARE + result REFCURSOR; + address INTEGER; + directionPrefix VARCHAR; + streetName VARCHAR; + streetTypeAbbrev VARCHAR; + directionSuffix VARCHAR; + state VARCHAR; + tempString VARCHAR; + tempInt VARCHAR; + verbose BOOLEAN := TRUE; +BEGIN + IF verbose THEN + RAISE NOTICE ''geocode_address_state()''; + END IF; + -- The first step is to determine what weve been given, and if its enough. + IF $1 IS NOT NULL THEN + -- The cursor was not provided. No matter, we can use an unnamed one. + result := $1; + END IF; + IF $2 IS NULL THEN + -- The address is manditory. + -- Without it, wed be wandering into strangers homes all the time. + RAISE EXCEPTION ''geocode_address_state() - No address provided!''; + ELSE + address := $2; + END IF; + IF $3 IS NOT NULL THEN + -- The direction prefix really isnt important. + -- It will be used for rating if provided. + directionPrefix := $3; + END IF; + IF $4 IS NULL THEN + -- A street name must be given. Think about it. + RAISE EXCEPTION ''geocode_address_state() - No street name provided!''; + ELSE + streetName := $4; + END IF; + IF $5 IS NOT NULL THEN + -- A street type will be used for rating if provided, but isnt required. + streetTypeAbbrev := $5; + END IF; + IF $6 IS NOT NULL THEN + -- Same as direction prefix, only later. + directionSuffix := $6; + END IF; + IF $7 IS NOT NULL THEN + state := $7; + ELSE + -- It is unreasonable to do a country wide search. State is already + -- pretty sketchy. No state, no search. + RAISE EXCEPTION ''geocode_address_state() - No state name provided!''; + END IF; + + -- Check to see if the road name can be matched. + SELECT INTO tempInt count(*) FROM tiger_geocode_roads + WHERE soundex(streetName) = soundex(tiger_geocode_roads.fename) + AND state = tiger_geocode_roads.state; + IF verbose THEN + RAISE NOTICE ''geocode_address_state() - % potential matches.'', tempInt; + END IF; + IF tempInt = 0 THEN + RETURN NULL; + ELSE + -- The road name matches, now we check to see if the addresses match + SELECT INTO tempInt count(*) + FROM ( + SELECT *, rate_attributes(directionPrefix, tiger_geocode_roads.fedirp, + streetName, tiger_geocode_roads.fename, streetTypeAbbrev, + tiger_geocode_roads.fetype, directionSuffix, + tiger_geocode_roads.fedirs) as rating + FROM tiger_geocode_roads + WHERE soundex(streetName) = soundex(tiger_geocode_roads.fename) + AND state = tiger_geocode_roads.state + ) AS subquery, tiger_geocode_join, roads_local + WHERE includes_address(address, roads_local.fraddl, roads_local.toaddl, + roads_local.fraddr, roads_local.toaddr) + AND subquery.id = tiger_geocode_join.id + AND tiger_geocode_join.tlid = roads_local.tlid; + IF verbose THEN + RAISE NOTICE ''geocode_address_state() - % address matches.'', tempInt; + END IF; + IF tempInt = 0 THEN + return NULL; + ELSE + OPEN result FOR + SELECT *, interpolate_from_address(address, roads_local.fraddl, + roads_local.toaddl, roads_local.fraddr, roads_local.toaddr, + roads_local.geom) as address_geom + FROM ( + SELECT *, rate_attributes(directionPrefix, tiger_geocode_roads.fedirp, + streetName, tiger_geocode_roads.fename, streetTypeAbbrev, + tiger_geocode_roads.fetype, directionSuffix, + tiger_geocode_roads.fedirs) as rating + FROM tiger_geocode_roads + WHERE soundex(streetName) = soundex(tiger_geocode_roads.fename) + AND state = tiger_geocode_roads.state + ) AS subquery, tiger_geocode_join, roads_local + WHERE includes_address(address, roads_local.fraddl, roads_local.toaddl, + roads_local.fraddr, roads_local.toaddr) + AND subquery.id = tiger_geocode_join.id + AND tiger_geocode_join.tlid = roads_local.tlid + ORDER BY subquery.rating; + return result; + END IF; + END IF; +END; +' LANGUAGE plpgsql; + + + +CREATE OR REPLACE FUNCTION geocode_address_zip(REFCURSOR, INTEGER, VARCHAR, VARCHAR, VARCHAR, VARCHAR, INTEGER) RETURNS REFCURSOR +AS ' +DECLARE + result REFCURSOR; + address INTEGER; + directionPrefix VARCHAR; + streetName VARCHAR; + streetTypeAbbrev VARCHAR; + directionSuffix VARCHAR; + zipCode INTEGER; + tempString VARCHAR; + tempInt VARCHAR; + verbose BOOLEAN := TRUE; +BEGIN + IF verbose THEN + RAISE NOTICE ''geocode_address_zip()''; + END IF; + -- The first step is to determine what weve been given, and if its enough. + IF $1 IS NOT NULL THEN + -- The cursor was not provided. No matter, we can use an unnamed one. + result := $1; + END IF; + IF $2 IS NULL THEN + -- The address is manditory. + -- Without it, wed be wandering into strangers homes all the time. + RAISE EXCEPTION ''geocode_address_zip() - No address provided!''; + ELSE + address := $2; + END IF; + IF $3 IS NOT NULL THEN + -- The direction prefix really isnt important. + -- It will be used for rating if provided. + directionPrefix := $3; + END IF; + IF $4 IS NULL THEN + -- A street name must be given. Think about it. + RAISE EXCEPTION ''geocode_address_zip() - No street name provided!''; + ELSE + streetName := $4; + END IF; + IF $5 IS NOT NULL THEN + -- A street type will be used for rating if provided, but isnt required. + streetTypeAbbrev := $5; + END IF; + IF $6 IS NOT NULL THEN + -- Same as direction prefix, only later. + directionSuffix := $6; + END IF; + IF $7 IS NULL THEN + -- Zip code is not optional. + RAISE EXCEPTION ''geocode_address_zip() - No zip provided!''; + ELSE + zipCode := $7; + END IF; + + -- Check to see if the road name can be matched. + SELECT INTO tempInt count(*) FROM tiger_geocode_roads + WHERE zipCode = tiger_geocode_roads.zip + AND soundex(streetName) = soundex(tiger_geocode_roads.fename); + IF tempInt = 0 THEN + return NULL; + ELSE + -- The road name matches, now we check to see if the addresses match + SELECT INTO tempInt count(*) + FROM ( + SELECT *, rate_attributes(directionPrefix, tiger_geocode_roads.fedirp, + streetName, tiger_geocode_roads.fename, streetTypeAbbrev, + tiger_geocode_roads.fetype, directionSuffix, + tiger_geocode_roads.fedirs) as rating + FROM tiger_geocode_roads + WHERE zipCode = tiger_geocode_roads.zip + AND soundex(streetName) = soundex(tiger_geocode_roads.fename) + ) AS subquery, tiger_geocode_join, roads_local + WHERE includes_address(address, roads_local.fraddl, roads_local.toaddl, + roads_local.fraddr, roads_local.toaddr) + AND subquery.id = tiger_geocode_join.id + AND tiger_geocode_join.tlid = roads_local.tlid; + IF tempInt = 0 THEN + return NULL; + ELSE + OPEN result FOR + SELECT *, interpolate_from_address(address, roads_local.fraddl, + roads_local.toaddl, roads_local.fraddr, roads_local.toaddr, + roads_local.geom) as address_geom + FROM ( + SELECT *, rate_attributes(directionPrefix, tiger_geocode_roads.fedirp, + streetName, tiger_geocode_roads.fename, streetTypeAbbrev, + tiger_geocode_roads.fetype, directionSuffix, + tiger_geocode_roads.fedirs) as rating + FROM tiger_geocode_roads + WHERE zipCode = tiger_geocode_roads.zip + AND soundex(streetName) = soundex(tiger_geocode_roads.fename) + ) AS subquery, tiger_geocode_join, roads_local + WHERE includes_address(address, roads_local.fraddl, roads_local.toaddl, + roads_local.fraddr, roads_local.toaddr) + AND subquery.id = tiger_geocode_join.id + AND tiger_geocode_join.tlid = roads_local.tlid + ORDER BY subquery.rating; + return result; + END IF; + END IF; +END; +' LANGUAGE plpgsql; + + + +-- Returns a string consisting of the last N words. Words are allowed +-- to be seperated only by spaces, but multiple spaces between +-- words are allowed. Words must be alphanumberic. +-- If more words are requested than exist, the full input string is +-- returned. +CREATE OR REPLACE FUNCTION get_last_words(VARCHAR, INTEGER) RETURNS VARCHAR +AS ' +DECLARE + inputString VARCHAR; + tempString VARCHAR; + count VARCHAR; + result VARCHAR := ''''; +BEGIN + IF $1 IS NULL THEN + return NULL; + ELSE + inputString := $1; + END IF; + IF $2 IS NULL THEN + RAISE EXCEPTION ''get_last_words() - word count is null!''; + ELSE + count := $2; + END IF; + FOR i IN 1..count LOOP + tempString := substring(inputString from ''((?: )+[a-zA-Z0-9_]*)'' || result || ''$''); + IF tempString IS NULL THEN + return inputString; + END IF; + result := tempString || result; + END LOOP; + result := trim(both from result); + return result; +END; +' LANGUAGE plpgsql; + + + +-- This function converts the string addresses to integers and passes them +-- to the other includes_address function. +CREATE OR REPLACE FUNCTION includes_address(INTEGER, VARCHAR, VARCHAR, VARCHAR, VARCHAR) RETURNS BOOLEAN +AS ' +DECLARE + given_address INTEGER; + addr1 INTEGER; + addr2 INTEGER; + addr3 INTEGER; + addr4 INTEGER; + result BOOLEAN; +BEGIN + given_address = $1; + addr1 = to_number($2, ''999999''); + addr2 = to_number($3, ''999999''); + addr3 = to_number($4, ''999999''); + addr4 = to_number($5, ''999999''); + result = includes_address(given_address, addr1, addr2, addr3, addr4); + RETURN result; +END +' LANGUAGE plpgsql; + + + +-- This function requires the addresses to be grouped, such that the second and +-- third arguments are from one side of the street, and the fourth and fifth +-- from the other. +CREATE OR REPLACE FUNCTION includes_address(INTEGER, INTEGER, INTEGER, INTEGER, INTEGER) RETURNS BOOLEAN +AS ' +DECLARE + given_address INTEGER; + addr1 INTEGER; + addr2 INTEGER; + addr3 INTEGER; + addr4 INTEGER; + lmaxaddr INTEGER := -1; + rmaxaddr INTEGER := -1; + lminaddr INTEGER := -1; + rminaddr INTEGER := -1; + maxaddr INTEGER := -1; + minaddr INTEGER := -1; +BEGIN + IF $1 IS NULL THEN + RAISE EXCEPTION ''includes_address() - local address is NULL!''; + ELSE + given_address := $1; + END IF; + + IF $2 IS NOT NULL THEN + addr1 := $2; + maxaddr := addr1; + minaddr := addr1; + lmaxaddr := addr1; + lminaddr := addr1; + END IF; + + IF $3 IS NOT NULL THEN + addr2 := $3; + IF addr2 < minaddr OR minaddr = -1 THEN + minaddr := addr2; + END IF; + IF addr2 > maxaddr OR maxaddr = -1 THEN + maxaddr := addr2; + END IF; + IF addr2 > lmaxaddr OR lmaxaddr = -1 THEN + lmaxaddr := addr2; + END IF; + IF addr2 < lminaddr OR lminaddr = -1 THEN + lminaddr := addr2; + END IF; + END IF; + + IF $4 IS NOT NULL THEN + addr3 := $4; + IF addr3 < minaddr OR minaddr = -1 THEN + minaddr := addr3; + END IF; + IF addr3 > maxaddr OR maxaddr = -1 THEN + maxaddr := addr3; + END IF; + rmaxaddr := addr3; + rminaddr := addr3; + END IF; + + IF $5 IS NOT NULL THEN + addr4 := $5; + IF addr4 < minaddr OR minaddr = -1 THEN + minaddr := addr4; + END IF; + IF addr4 > maxaddr OR maxaddr = -1 THEN + maxaddr := addr4; + END IF; + IF addr4 > rmaxaddr OR rmaxaddr = -1 THEN + rmaxaddr := addr4; + END IF; + IF addr4 < rminaddr OR rminaddr = -1 THEN + rminaddr := addr4; + END IF; + END IF; + + IF minaddr = -1 OR maxaddr = -1 THEN + -- No addresses were non-null, return FALSE (arbitrary) + RETURN FALSE; + ELSIF given_address >= minaddr AND given_address <= maxaddr THEN + -- The address is within the given range + IF given_address >= lminaddr AND given_address <= lmaxaddr THEN + -- This checks to see if the address is on this side of the + -- road, ie if the address is even, the street range must be even + IF (given_address % 2) = (lminaddr % 2) + OR (given_address % 2) = (lmaxaddr % 2) THEN + RETURN TRUE; + END IF; + END IF; + IF given_address >= rminaddr AND given_address <= rmaxaddr THEN + -- See above + IF (given_address % 2) = (rminaddr % 2) + OR (given_address % 2) = (rmaxaddr % 2) THEN + RETURN TRUE; + END IF; + END IF; + END IF; + -- The address is not within the range + RETURN FALSE; +END; + +' LANGUAGE plpgsql; + + + +-- This function converts string addresses to integers and passes them to +-- the other interpolate_from_address function. +CREATE OR REPLACE FUNCTION interpolate_from_address(INTEGER, VARCHAR, VARCHAR, VARCHAR, VARCHAR, GEOMETRY) RETURNS GEOMETRY +AS ' +DECLARE + given_address INTEGER; + addr1 INTEGER; + addr2 INTEGER; + addr3 INTEGER; + addr4 INTEGER; + road GEOMETRY; + result GEOMETRY; +BEGIN + given_address := $1; + addr1 := to_number($2, ''999999''); + addr2 := to_number($3, ''999999''); + addr3 := to_number($4, ''999999''); + addr4 := to_number($5, ''999999''); + road := $6; + result = interpolate_from_address(given_address, addr1, addr2, addr3, addr4, road); + RETURN result; +END +' LANGUAGE plpgsql; + +-- interpolate_from_address(local_address, from_address_l, to_address_l, from_address_r, to_address_r, local_road) +-- This function returns a point along the given geometry (must be linestring) +-- corresponding to the given address. If the given address is not within +-- the address range of the road, null is returned. +-- This function requires that the address be grouped, such that the second and +-- third arguments are from one side of the street, while the fourth and +-- fifth are from the other. +CREATE OR REPLACE FUNCTION interpolate_from_address(INTEGER, INTEGER, INTEGER, INTEGER, INTEGER, GEOMETRY) RETURNS GEOMETRY +AS ' +DECLARE + given_address INTEGER; + lmaxaddr INTEGER := -1; + rmaxaddr INTEGER := -1; + lminaddr INTEGER := -1; + rminaddr INTEGER := -1; + lfrgreater BOOLEAN; + rfrgreater BOOLEAN; + frgreater BOOLEAN; + addrwidth INTEGER; + part DOUBLE PRECISION; + road GEOMETRY; + result GEOMETRY; +BEGIN + IF $1 IS NULL THEN + RAISE EXCEPTION ''interpolate_from_address() - local address is NULL!''; + ELSE + given_address := $1; + END IF; + + IF $6 IS NULL THEN + RAISE EXCEPTION ''interpolate_from_address() - local road is NULL!''; + ELSE + IF geometrytype($6) = ''LINESTRING'' THEN + road := $6; + ELSIF geometrytype($6) = ''MULTILINESTRING'' THEN + road := geometryn($6,1); + ELSE + RAISE EXCEPTION ''interpolate_from_address() - local road is not a line!''; + END IF; + END IF; + + IF $2 IS NOT NULL THEN + lfrgreater := TRUE; + lmaxaddr := $2; + lminaddr := $2; + END IF; + + IF $3 IS NOT NULL THEN + IF $3 > lmaxaddr OR lmaxaddr = -1 THEN + lmaxaddr := $3; + lfrgreater := FALSE; + END IF; + IF $3 < lminaddr OR lminaddr = -1 THEN + lminaddr := $3; + END IF; + END IF; + + IF $4 IS NOT NULL THEN + rmaxaddr := $4; + rminaddr := $4; + rfrgreater := TRUE; + END IF; + + IF $5 IS NOT NULL THEN + IF $5 > rmaxaddr OR rmaxaddr = -1 THEN + rmaxaddr := $5; + rfrgreater := FALSE; + END IF; + IF $5 < rminaddr OR rminaddr = -1 THEN + rminaddr := $5; + END IF; + END IF; + + IF given_address >= lminaddr AND given_address <= lmaxaddr THEN + IF (given_address % 2) = (lminaddr % 2) + OR (given_address % 2) = (lmaxaddr % 2) THEN + addrwidth := lmaxaddr - lminaddr; + part := (given_address - lminaddr) / trunc(addrwidth, 1); + frgreater := lfrgreater; + END IF; + END IF; + IF given_address >= rminaddr AND given_address <= rmaxaddr THEN + IF (given_address % 2) = (rminaddr % 2) + OR (given_address % 2) = (rmaxaddr % 2) THEN + addrwidth := rmaxaddr - rminaddr; + part := (given_address - rminaddr) / trunc(addrwidth, 1); + frgreater := rfrgreater; + END IF; + ELSE + RETURN null; + END IF; + + IF frgreater THEN + part := 1 - part; + END IF; + + result = line_interpolate_point(road, part); + RETURN result; +END; +' LANGUAGE plpgsql; + + +-- This function determines the levenshtein distance irespective of case. +CREATE OR REPLACE FUNCTION levenshtein_ignore_case(VARCHAR, VARCHAR) RETURNS INTEGER +AS ' +DECLARE + result INTEGER; +BEGIN + result := levenshtein(upper($1), upper($2)); + RETURN result; +END +' LANGUAGE plpgsql; + +-- This function take two arguements. The first is the "given string" and +-- must not be null. The second arguement is the "compare string" and may +-- or may not be null. If the second string is null, the value returned is +-- 3, otherwise it is the levenshtein difference between the two. +CREATE OR REPLACE FUNCTION nullable_levenshtein(VARCHAR, VARCHAR) RETURNS INTEGER +AS ' +DECLARE + given_string VARCHAR; + result INTEGER := 3; +BEGIN + IF $1 IS NULL THEN + RAISE EXCEPTION ''nullable_levenshtein - given string is NULL!''; + ELSE + given_string := $1; + END IF; + + IF $2 IS NOT NULL AND $2 != '''' THEN + result := levenshtein_ignore_case(given_string, $2); + END IF; + + RETURN result; +END +' LANGUAGE plpgsql; + + + +-- location_extract(streetAddressString, stateAbbreviation) +-- This function extracts a location name from the end of the given string. +-- The first attempt is to find an exact match against the place_lookup +-- table. If this fails, a word-by-word soundex match is tryed against the +-- same table. If multiple candidates are found, the one with the smallest +-- levenshtein distance from the given string is assumed the correct one. +-- If no match is found against the place_lookup table, the same tests are +-- run against the countysub_lookup table. +-- +-- The section of the given string corresponding to the location found is +-- returned, rather than the string found from the tables. All the searching +-- is done largely to determine the length (words) of the location, to allow +-- the intended street name to be correctly identified. +CREATE OR REPLACE FUNCTION location_extract(VARCHAR, VARCHAR) RETURNS VARCHAR +AS ' +DECLARE + fullStreet VARCHAR; + stateAbbrev VARCHAR; + location VARCHAR; + verbose BOOLEAN := TRUE; +BEGIN + IF verbose THEN + RAISE NOTICE ''location_extract()''; + END IF; + IF $1 IS NULL THEN + RAISE EXCEPTION ''location_extract() - No input given!''; + ELSE + fullStreet := $1; + END IF; + IF $2 IS NULL THEN + ELSE + stateAbbrev := $2; + END IF; + location := location_extract_place_exact(fullStreet, stateAbbrev); + IF location IS NULL THEN + location := location_extract_countysub_exact(fullStreet, stateAbbrev); + IF location IS NULL THEN + location := location_extract_place_fuzzy(fullStreet, stateAbbrev); + IF location IS NULL THEN + location := location_extract_countysub_fuzzy(fullStreet, stateAbbrev); + END IF; + END IF; + END IF; + return location; +END; +' LANGUAGE plpgsql; + + + +-- location_extract_countysub_exact(string, stateAbbrev) +-- This function checks the place_lookup table to find a potential match to +-- the location described at the end of the given string. If an exact match +-- fails, a fuzzy match is performed. The location as found in the given +-- string is returned. +CREATE OR REPLACE FUNCTION location_extract_countysub_exact(VARCHAR, VARCHAR) RETURNS VARCHAR +AS ' +DECLARE + fullStreet VARCHAR; + ws VARCHAR; + tempString VARCHAR; + location VARCHAR; + tempInt INTEGER; + word_count INTEGER; + stateAbbrev VARCHAR; + rec RECORD; + test BOOLEAN; + result VARCHAR; + verbose BOOLEAN := TRUE; +BEGIN + IF verbose THEN + RAISE NOTICE ''location_extract_countysub_exact()''; + END IF; + IF $1 IS NULL THEN + RAISE EXCEPTION ''location_extract_countysub_exact() - No input given!''; + ELSE + fullStreet := $1; + END IF; + IF $2 IS NOT NULL THEN + stateAbbrev := $2; + END IF; + ws := ''[ ,\.\n\f\t]''; + -- No hope of determining the location from place. Try countysub. + IF stateAbbrev IS NOT NULL THEN + SELECT INTO tempInt count(*) FROM countysub_lookup + WHERE countysub_lookup.state = stateAbbrev + AND texticregexeq(fullStreet, ''(?i)'' || name || ''$''); + ELSE + SELECT INTO tempInt count(*) FROM countysub_lookup + WHERE texticregexeq(fullStreet, ''(?i)'' || name || ''$''); + END IF; + IF tempInt > 0 THEN + IF stateAbbrev IS NOT NULL THEN + FOR rec IN SELECT substring(fullStreet, ''(?i)('' + || name || '')$'') AS value, name FROM countysub_lookup + WHERE countysub_lookup.state = stateAbbrev + AND texticregexeq(fullStreet, ''(?i)'' || ws || name || + ''$'') ORDER BY length(name) DESC LOOP + -- Only the first result is needed. + location := rec.value; + EXIT; + END LOOP; + ELSE + FOR rec IN SELECT substring(fullStreet, ''(?i)('' + || name || '')$'') AS value, name FROM countysub_lookup + WHERE texticregexeq(fullStreet, ''(?i)'' || ws || name || + ''$'') ORDER BY length(name) DESC LOOP + -- again, only the first is needed. + location := rec.value; + EXIT; + END LOOP; + END IF; + END IF; + RETURN location; +END; +' LANGUAGE plpgsql; + + +-- location_extract_countysub_fuzzy(string, stateAbbrev) +-- This function checks the place_lookup table to find a potential match to +-- the location described at the end of the given string. If an exact match +-- fails, a fuzzy match is performed. The location as found in the given +-- string is returned. +CREATE OR REPLACE FUNCTION location_extract_countysub_fuzzy(VARCHAR, VARCHAR) RETURNS VARCHAR +AS ' +DECLARE + fullStreet VARCHAR; + ws VARCHAR; + tempString VARCHAR; + location VARCHAR; + tempInt INTEGER; + word_count INTEGER; + stateAbbrev VARCHAR; + rec RECORD; + test BOOLEAN; + result VARCHAR; + verbose BOOLEAN := TRUE; +BEGIN + IF verbose THEN + RAISE NOTICE ''location_extract_countysub_fuzzy()''; + END IF; + IF $1 IS NULL THEN + RAISE EXCEPTION ''location_extract_countysub_fuzzy() - No input given!''; + ELSE + fullStreet := $1; + END IF; + IF $2 IS NOT NULL THEN + stateAbbrev := $2; + END IF; + ws := ''[ ,\.\n\f\t]''; + + -- Fuzzy matching. + tempString := substring(fullStreet, ''(?i)'' || ws || + ''([a-zA-Z0-9]+)$''); + IF tempString IS NULL THEN + tempString := fullStreet; + END IF; + IF stateAbbrev IS NOT NULL THEN + SELECT INTO tempInt count(*) FROM countysub_lookup + WHERE countysub_lookup.state = stateAbbrev + AND soundex(tempString) = end_soundex(name); + ELSE + SELECT INTO tempInt count(*) FROM countysub_lookup + WHERE soundex(tempString) = end_soundex(name); + END IF; + IF tempInt > 0 THEN + tempInt := 50; + -- Some potentials were found. Begin a word-by-word soundex on each. + IF stateAbbrev IS NOT NULL THEN + FOR rec IN SELECT name FROM countysub_lookup + WHERE countysub_lookup.state = stateAbbrev + AND soundex(tempString) = end_soundex(name) LOOP + word_count := count_words(rec.name); + test := TRUE; + tempString := get_last_words(fullStreet, word_count); + FOR i IN 1..word_count LOOP + IF soundex(split_part(tempString, '' '', i)) != + soundex(split_part(rec.name, '' '', i)) THEN + test := FALSE; + END IF; + END LOOP; + IF test THEN + -- The soundex matched, determine if the distance is better. + IF levenshtein_ignore_case(rec.name, tempString) < tempInt THEN + location := tempString; + tempInt := levenshtein_ignore_case(rec.name, tempString); + END IF; + END IF; + END LOOP; + ELSE + FOR rec IN SELECT name FROM countysub_lookup + WHERE soundex(tempString) = end_soundex(name) LOOP + word_count := count_words(rec.name); + test := TRUE; + tempString := get_last_words(fullStreet, word_count); + FOR i IN 1..word_count LOOP + IF soundex(split_part(tempString, '' '', i)) != + soundex(split_part(rec.name, '' '', i)) THEN + test := FALSE; + END IF; + END LOOP; + IF test THEN + -- The soundex matched, determine if the distance is better. + IF levenshtein_ignore_case(rec.name, tempString) < tempInt THEN + location := tempString; + tempInt := levenshtein_ignore_case(rec.name, tempString); + END IF; + END IF; + END LOOP; + END IF; + END IF; -- If no fuzzys were found, leave location null. + RETURN location; +END; +' LANGUAGE plpgsql; + + + +-- location_extract_place_exact(string, stateAbbrev) +-- This function checks the place_lookup table to find a potential match to +-- the location described at the end of the given string. If an exact match +-- fails, a fuzzy match is performed. The location as found in the given +-- string is returned. +CREATE OR REPLACE FUNCTION location_extract_place_exact(VARCHAR, VARCHAR) RETURNS VARCHAR +AS ' +DECLARE + fullStreet VARCHAR; + ws VARCHAR; + tempString VARCHAR; + location VARCHAR; + tempInt INTEGER; + word_count INTEGER; + stateAbbrev VARCHAR; + rec RECORD; + test BOOLEAN; + result VARCHAR; + verbose BOOLEAN := TRUE; +BEGIN + IF verbose THEN + RAISE NOTICE ''location_extract_place_exact()''; + END IF; + IF $1 IS NULL THEN + RAISE EXCEPTION ''location_extract_place_exact() - No input given!''; + ELSE + fullStreet := $1; + END IF; + IF verbose THEN + RAISE NOTICE ''location_extract_place_exact() - input: "%"'', fullStreet; + END IF; + IF $2 IS NOT NULL THEN + stateAbbrev := $2; + END IF; + ws := ''[ ,\.\n\f\t]''; + -- Try for an exact match against places + IF stateAbbrev IS NOT NULL THEN + SELECT INTO tempInt count(*) FROM place_lookup + WHERE place_lookup.state = stateAbbrev + AND texticregexeq(fullStreet, ''(?i)'' || name || ''$''); + ELSE + SELECT INTO tempInt count(*) FROM place_lookup + WHERE texticregexeq(fullStreet, ''(?i)'' || name || ''$''); + END IF; + IF verbose THEN + RAISE NOTICE ''location_extract_place_exact() - Exact Matches %'', tempInt; + END IF; + IF tempInt > 0 THEN + -- Some matches were found. Look for the last one in the string. + IF stateAbbrev IS NOT NULL THEN + FOR rec IN SELECT substring(fullStreet, ''(?i)('' + || name || '')$'') AS value, name FROM place_lookup + WHERE place_lookup.state = stateAbbrev + AND texticregexeq(fullStreet, ''(?i)'' + || name || ''$'') ORDER BY length(name) DESC LOOP + -- Since the regex is end of string, only the longest (first) result + -- is useful. + location := rec.value; + EXIT; + END LOOP; + ELSE + FOR rec IN SELECT substring(fullStreet, ''(?i)('' + || name || '')$'') AS value, name FROM place_lookup + WHERE texticregexeq(fullStreet, ''(?i)'' + || name || ''$'') ORDER BY length(name) DESC LOOP + -- Since the regex is end of string, only the longest (first) result + -- is useful. + location := rec.value; + EXIT; + END LOOP; + END IF; + END IF; + RETURN location; +END; +' LANGUAGE plpgsql; + + + +-- location_extract_place_fuzzy(string, stateAbbrev) +-- This function checks the place_lookup table to find a potential match to +-- the location described at the end of the given string. If an exact match +-- fails, a fuzzy match is performed. The location as found in the given +-- string is returned. +CREATE OR REPLACE FUNCTION location_extract_place_fuzzy(VARCHAR, VARCHAR) RETURNS VARCHAR +AS ' +DECLARE + fullStreet VARCHAR; + ws VARCHAR; + tempString VARCHAR; + location VARCHAR; + tempInt INTEGER; + word_count INTEGER; + stateAbbrev VARCHAR; + rec RECORD; + test BOOLEAN; + result VARCHAR; + verbose BOOLEAN := TRUE; +BEGIN + IF verbose THEN + RAISE NOTICE ''location_extract_place_fuzzy()''; + END IF; + IF $1 IS NULL THEN + RAISE EXCEPTION ''location_extract_place_fuzzy() - No input given!''; + ELSE + fullStreet := $1; + END IF; + IF verbose THEN + RAISE NOTICE ''location_extract_place_fuzzy() - input: "%"'', fullStreet; + END IF; + IF $2 IS NOT NULL THEN + stateAbbrev := $2; + END IF; + ws := ''[ ,\.\n\f\t]''; + + tempString := substring(fullStreet, ''(?i)'' || ws + || ''([a-zA-Z0-9]+)$''); + IF tempString IS NULL THEN + tempString := fullStreet; + END IF; + IF stateAbbrev IS NOT NULL THEN + SELECT into tempInt count(*) FROM place_lookup + WHERE place_lookup.state = stateAbbrev + AND soundex(tempString) = end_soundex(name); + ELSE + SELECT into tempInt count(*) FROM place_lookup + WHERE soundex(tempString) = end_soundex(name); + END IF; + IF verbose THEN + RAISE NOTICE ''location_extract_place_fuzzy() - Fuzzy matches %'', tempInt; + END IF; + IF tempInt > 0 THEN + -- Some potentials were found. Begin a word-by-word soundex on each. + tempInt := 50; + IF stateAbbrev IS NOT NULL THEN + FOR rec IN SELECT name FROM place_lookup + WHERE place_lookup.state = stateAbbrev + AND soundex(tempString) = end_soundex(name) LOOP + IF verbose THEN + RAISE NOTICE ''location_extract_place_fuzzy() - Fuzzy: "%"'', rec.name; + END IF; + word_count := count_words(rec.name); + test := TRUE; + tempString := get_last_words(fullStreet, word_count); + FOR i IN 1..word_count LOOP + IF soundex(split_part(tempString, '' '', i)) != + soundex(split_part(rec.name, '' '', i)) THEN + IF verbose THEN + RAISE NOTICE ''location_extract_place_fuzzy() - No Match.''; + END IF; + test := FALSE; + END IF; + END LOOP; + IF test THEN + -- The soundex matched, determine if the distance is better. + IF levenshtein_ignore_case(rec.name, tempString) < tempInt THEN + location := tempString; + tempInt := levenshtein_ignore_case(rec.name, tempString); + END IF; + END IF; + END LOOP; + ELSE + FOR rec IN SELECT name FROM place_lookup + WHERE soundex(tempString) = end_soundex(name) LOOP + word_count := count_words(rec.name); + test := TRUE; + tempString := get_last_words(fullStreet, word_count); + FOR i IN 1..word_count LOOP + IF soundex(split_part(tempString, '' '', i)) != + soundex(split_part(rec.name, '' '', i)) THEN + test := FALSE; + END IF; + END LOOP; + IF test THEN + -- The soundex matched, determine if the distance is better. + IF levenshtein_ignore_case(rec.name, tempString) < tempInt THEN + location := tempString; + tempInt := levenshtein_ignore_case(rec.name, tempString); + END IF; + END IF; + END LOOP; + END IF; + END IF; + RETURN location; +END; +' LANGUAGE plpgsql; + + + +-- normalize_address(addressString) +-- This takes an address string and parses it into address (internal/street) +-- street name, type, direction prefix and suffix, location, state and +-- zip code, depending on what can be found in the string. +-- +-- The US postal address standard is used: +-- +-- +-- +-- State is assumed to be included in the string, and MUST be matchable to +-- something in the state_lookup table. Fuzzy matching is used if no direct +-- match is found. +-- +-- Two formats of zip code are acceptable: five digit, and five + 4. +-- +-- The internal addressing indicators are looked up from the +-- secondary_unit_lookup table. A following identifier is accepted +-- but it must start with a digit. +-- +-- The location is parsed from the string using other indicators, such +-- as street type, direction suffix or internal address, if available. +-- If these are not, the location is extracted using comparisons against +-- the places_lookup table, then the countysub_lookup table to determine +-- what, in the original string, is intended to be the location. In both +-- cases, an exact match is first pursued, then a word-by-word fuzzy match. +-- The result is not the name of the location from the tables, but the +-- section of the given string that corresponds to the name from the tables. +-- +-- Zip codes and street names are not validated. +-- +-- Direction indicators are extracted by comparison with the direction_lookup +-- table. +-- +-- Street addresses are assumed to be a single word, starting with a number. +-- Address is manditory; if no address is given, and the street is numbered, +-- the resulting address will be the street name, and the street name +-- will be an empty string. +-- +-- In some cases, the street type is part of the street name. +-- eg State Hwy 22a. As long as the word following the type starts with a +-- number (this is usually the case) this will be caught. Some street names +-- include a type name, and have a street type that differs. This will be +-- handled properly, so long as both are given. If the street type is +-- omitted, the street names included type will be parsed as the street type. +-- +-- The output is currently a colon seperated list of values: +-- InternalAddress:StreetAddress:DirectionPrefix:StreetName:StreetType: +-- DirectionSuffix:Location:State:ZipCode +-- This returns each element as entered. It's mainly meant for debugging. +-- There is also another option that returns: +-- StreetAddress:DirectionPrefixAbbreviation:StreetName:StreetTypeAbbreviation: +-- DirectionSuffixAbbreviation:Location:StateAbbreviation:ZipCode +-- This is more standardized and better for use with a geocoder. +CREATE OR REPLACE FUNCTION normalize_address(VARCHAR) RETURNS VARCHAR +AS ' +DECLARE + rawInput VARCHAR; + address VARCHAR; + preDir VARCHAR; + preDirAbbrev VARCHAR; + postDir VARCHAR; + postDirAbbrev VARCHAR; + fullStreet VARCHAR; + reducedStreet VARCHAR; + streetName VARCHAR; + streetType VARCHAR; + streetTypeAbbrev VARCHAR; + internal VARCHAR; + location VARCHAR; + state VARCHAR; + stateAbbrev VARCHAR; + tempString VARCHAR; + tempInt INTEGER; + result VARCHAR; + zip VARCHAR; + test BOOLEAN; + working REFCURSOR; + rec RECORD; + ws VARCHAR; + verbose BOOLEAN := TRUE; +BEGIN + IF verbose THEN + RAISE NOTICE ''normalize_address()''; + END IF; + IF $1 IS NULL THEN + RAISE EXCEPTION ''normalise_address() - address string is null!''; + ELSE + rawInput := $1; + END IF; + ws := ''[ ,\.\t\n\f\r]''; + + -- Assume that the address begins with a digit, and extract it from + -- the input string. + address := substring(rawInput from ''^([0-9].*?)[ ,/.]''); + + -- There are two formats for zip code, the normal 5 digit, and + -- the nine digit zip-4. It may also not exist. + zip := substring(rawInput from ws || ''([0-9]{5})$''); + IF zip IS NULL THEN + zip := substring(rawInput from ws || ''([0-9]{5})-[0-9]{4}$''); + END IF; + + IF zip IS NOT NULL THEN + fullStreet := substring(rawInput from ''(.*)'' + || ws || ''+'' || cull_null(zip) || ''[- ]?([0-9]{4})?$''); + ELSE + fullStreet := rawInput; + END IF; + IF verbose THEN + RAISE NOTICE ''normalize_address() - after zip extract "%"'', fullStreet; + END IF; + tempString := state_extract(fullStreet); + IF tempString IS NOT NULL THEN + state := split_part(tempString, '':'', 1); + stateAbbrev := split_part(tempString, '':'', 2); + END IF; + + -- The easiest case is if the address is comma delimited. There are some + -- likely cases: + -- street level, location, state + -- street level, location state + -- street level, location + -- street level, internal address, location, state + -- street level, internal address, location state + -- street level, internal address location state + -- street level, internal address, location + -- street level, internal address location + -- The first three are useful. + tempString := substring(fullStreet, ''(?i),'' || ws || ''+(.*)(,?'' || ws || + ''+'' || cull_null(state) || ''|$)''); + IF tempString IS NOT NULL THEN + location := tempString; + IF address IS NOT NULL THEN + fullStreet := substring(fullStreet, ''(?i)'' || address || ws || + ''+(.*),'' || ws || ''+'' || location); + ELSE + fullStreet := substring(fullStreet, ''(?i)(.*),'' || ws || ''+'' || + location); + END IF; + IF verbose THEN + RAISE NOTICE ''normalize_address() - Parsed by punctuation.''; + RAISE NOTICE ''normalize_address() - Location "%"'', location; + RAISE NOTICE ''normalize_address() - FullStreet "%"'', fullStreet; + END IF; + END IF; + + -- Pull out the full street information, defined as everything between the + -- address and the state. This includes the location. + -- This doesnt need to be done if location has already been found. + IF location IS NULL THEN + IF address IS NOT NULL THEN + IF state IS NOT NULL THEN + fullStreet := substring(fullStreet, ''(?i)'' || address || + ws || ''+(.*?)'' || ws || ''+'' || state); + ELSE + fullStreet := substring(fullStreet, ''(?i)'' || address || + ws || ''+(.*?)''); + END IF; + ELSE + IF state IS NOT NULL THEN + fullStreet := substring(fullStreet, ''(?i)(.*?)'' || ws || + ''+'' || state); + ELSE + fullStreet := substring(fullStreet, ''(?i)(.*?)''); + END IF; + END IF; + END IF; + IF verbose THEN + RAISE NOTICE ''normalize_address() - after addy extract "%"'', fullStreet; + END IF; + + -- Determine if any internal address is included, such as apartment + -- or suite number. + SELECT INTO tempInt count(*) FROM secondary_unit_lookup + WHERE texticregexeq(fullStreet, ''(?i)'' || ws || name || ''('' + || ws || ''|$)''); + IF tempInt = 1 THEN + SELECT INTO internal substring(fullStreet, ''(?i)'' || ws || ''('' + || name || ws || ''*#?'' || ws + || ''*(?:[0-9][0-9a-zA-Z\-]*)?'' || '')(?:'' || ws || ''|$)'') + FROM secondary_unit_lookup + WHERE texticregexeq(fullStreet, ''(?i)'' || ws || name || ''('' + || ws || ''|$)''); + ELSIF tempInt > 1 THEN + -- In the event of multiple matches to a secondary unit designation, we + -- will assume that the last one is the true one. + tempInt := 0; + FOR rec in SELECT trim(substring(fullStreet, ''(?i)'' || ws || ''('' + || name || ''(?:'' || ws || ''*#?'' || ws + || ''*(?:[0-9][0-9a-zA-Z\-]*)?)'' || ws || ''?|$)'')) as value + FROM secondary_unit_lookup + WHERE texticregexeq(fullStreet, ''(?i)'' || ws || name || ''('' + || ws || ''|$)'') LOOP + IF tempInt < position(rec.value in fullStreet) THEN + tempInt := position(rec.value in fullStreet); + internal := rec.value; + END IF; + END LOOP; + END IF; + + IF verbose THEN + RAISE NOTICE ''normalize_address() - internal: "%"'', internal; + END IF; + + IF location IS NULL THEN + -- If the internal address is given, the location is everything after it. + location := substring(fullStreet, internal || ws || ''+(.*)$''); + END IF; + + -- Pull potential street types from the full street information + SELECT INTO tempInt count(*) FROM street_type_lookup + WHERE texticregexeq(fullStreet, ''(?i)'' || ws || ''('' || name + || '')(?:'' || ws || ''|$)''); + IF tempInt = 1 THEN + SELECT INTO rec abbrev, substring(fullStreet, ''(?i)'' || ws || ''('' + || name || '')(?:'' || ws || ''|$)'') AS given FROM street_type_lookup + WHERE texticregexeq(fullStreet, ''(?i)'' || ws || ''('' || name + || '')(?:'' || ws || ''|$)''); + streetType := rec.given; + streetTypeAbbrev := rec.abbrev; + ELSIF tempInt > 1 THEN + tempInt := 0; + FOR rec IN SELECT abbrev, substring(fullStreet, ''(?i)'' || ws || ''('' + || name || '')(?:'' || ws || ''|$)'') AS given FROM street_type_lookup + WHERE texticregexeq(fullStreet, ''(?i)'' || ws || ''('' || name + || '')(?:'' || ws || ''|$)'') LOOP + -- If we have found an internal address, make sure the type + -- precedes it. + IF internal IS NOT NULL THEN + IF position(rec.given IN fullStreet) < + position(internal IN fullStreet) THEN + IF tempInt < position(rec.given IN fullStreet) THEN + streetType := rec.given; + streetTypeAbbrev := rec.abbrev; + tempInt := position(rec.given IN fullStreet); + END IF; + END IF; + ELSIF tempInt < position(rec.given IN fullStreet) THEN + streetType := rec.given; + streetTypeAbbrev := rec.abbrev; + tempInt := position(rec.given IN fullStreet); + END IF; + END LOOP; + END IF; + IF verbose THEN + RAISE NOTICE ''normalize_address() - street Type: "%"'', streetType; + END IF; + + -- There is a little more processing required now. If the word after the + -- street type begins with a number, the street type should be considered + -- part of the name, as well as the next word. eg, State Route 225a. If + -- the next word starts with a char, then everything after the street type + -- will be considered location. If there is no street type, then Im sad. + IF streetType IS NOT NULL THEN + tempString := substring(fullStreet, streetType || ws || + ''+([0-9][^ ,\.\t\r\n\f]*?)'' || ws); + IF tempString IS NOT NULL THEN + IF location IS NULL THEN + location := substring(fullStreet, streetType || ws || ''+'' + || tempString || ws || ''+(.*)$''); + END IF; + reducedStreet := substring(fullStreet, ''(.*)'' || ws || ''+'' + || location || ''$''); + streetType := NULL; + streetTypeAbbrev := NULL; + ELSE + IF location IS NULL THEN + location := substring(fullStreet, streetType || ws || ''+(.*)$''); + END IF; + reducedStreet := substring(fullStreet, ''^(.*)'' || ws || ''+'' + || streetType); + END IF; + + -- The pre direction should be at the beginning of the fullStreet string. + -- The post direction should be at the beginning of the location string + -- if there is no internal address + SELECT INTO tempString substring(reducedStreet, ''(?i)(^'' || name + || '')'' || ws) FROM direction_lookup WHERE + texticregexeq(reducedStreet, ''(?i)(^'' || name || '')'' || ws) + ORDER BY length(name) DESC; + IF tempString IS NOT NULL THEN + preDir := tempString; + SELECT INTO preDirAbbrev abbrev FROM direction_lookup + where texticregexeq(reducedStreet, ''(?i)(^'' || name || '')'' || ws) + ORDER BY length(name) DESC; + streetName := substring(reducedStreet, ''^'' || preDir || ws || ''(.*)''); + ELSE + streetName := reducedStreet; + END IF; + + IF texticregexeq(location, ''(?i)'' || internal || ''$'') THEN + -- If the internal address is at the end of the location, then no + -- location was given. We still need to look for post direction. + SELECT INTO rec abbrev, + substring(location, ''(?i)^('' || name || '')'' || ws) as value + FROM direction_lookup WHERE texticregexeq(location, ''(?i)^'' + || name || ws) ORDER BY length(name) desc; + IF rec.value IS NOT NULL THEN + postDir := rec.value; + postDirAbbrev := rec.abbrev; + END IF; + location := null; + ELSIF internal IS NULL THEN + -- If no location is given, the location string will be the post direction + SELECT INTO tempInt count(*) FROM direction_lookup WHERE + upper(location) = upper(name); + IF tempInt != 0 THEN + postDir := location; + SELECT INTO postDirAbbrev abbrev FROM direction_lookup WHERE + upper(postDir) = upper(name); + location := NULL; + ELSE + -- postDirection is not equal location, but may be contained in it. + SELECT INTO tempString substring(location, ''(?i)(^'' || name + || '')'' || ws) FROM direction_lookup WHERE + texticregexeq(location, ''(?i)(^'' || name || '')'' || ws) + ORDER BY length(name) desc; + IF tempString IS NOT NULL THEN + postDir := tempString; + SELECT INTO postDirAbbrev abbrev FROM direction_lookup + where texticregexeq(location, ''(?i)(^'' || name || '')'' || ws); + location := substring(location, ''^'' || postDir || ws || ''+(.*)''); + END IF; + END IF; + ELSE + -- internal is not null, but is not at the end of the location string + -- look for post direction before the internal address + SELECT INTO tempString substring(fullStreet, ''(?i)'' || streetType + || ws || ''+('' || name || '')'' || ws || ''+'' || internal) + FROM direction_lookup WHERE texticregexeq(fullStreet, ''(?i)'' + || ws || name || ws || ''+'' || internal) ORDER BY length(name) desc; + IF tempString IS NOT NULL THEN + postDir := tempString; + SELECT INTO postDirAbbrev abbrev FROM direction_lookup + WHERE texticregexeq(fullStreet, ''(?i)'' || ws || name || ws); + END IF; + END IF; + ELSE + -- No street type was found + + -- If an internal address was given, then the split becomes easy, and the + -- street name is everything before it, without directions. + IF internal IS NOT NULL THEN + reducedStreet := substring(fullStreet, ''(?i)^(.*?)'' || ws || ''+'' + || internal); + SELECT INTO tempInt count(*) FROM direction_lookup WHERE + texticregexeq(reducedStreet, ''(?i)'' || ws || name || ''$''); + IF tempInt > 0 THEN + SELECT INTO postDir substring(reducedStreet, ''(?i)'' || ws || ''('' + || name || '')'' || ''$'') FROM direction_lookup + WHERE texticregexeq(reducedStreet, ''(?i)'' || ws || name || ''$''); + SELECT INTO postDirAbbrev abbrev FROM direction_lookup + WHERE texticregexeq(reducedStreet, ''(?i)'' || ws || name || ''$''); + END IF; + SELECT INTO tempString substring(reducedStreet, ''(?i)^('' || name + || '')'' || ws) FROM direction_lookup WHERE + texticregexeq(reducedStreet, ''(?i)^('' || name || '')'' || ws) + ORDER BY length(name) DESC; + IF tempString IS NOT NULL THEN + preDir := tempString; + SELECT INTO preDirAbbrev abbrev FROM direction_lookup WHERE + texticregexeq(reducedStreet, ''(?i)(^'' || name || '')'' || ws) + ORDER BY length(name) DESC; + streetName := substring(reducedStreet, ''(?i)^'' || preDir || ws + || ''+(.*?)(?:'' || ws || ''+'' || cull_null(postDir) || ''|$)''); + ELSE + streetName := substring(reducedStreet, ''(?i)^(.*?)(?:'' || ws + || ''+'' || cull_null(postDir) || ''|$)''); + END IF; + ELSE + + -- If a post direction is given, then the location is everything after, + -- the street name is everything before, less any pre direction. + SELECT INTO tempInt count(*) FROM direction_lookup + WHERE texticregexeq(fullStreet, ''(?i)'' || ws || name || ''(?:'' + || ws || ''|$)''); + + IF tempInt = 1 THEN + -- A single postDir candidate was found. This makes it easier. + SELECT INTO postDir substring(fullStreet, ''(?i)'' || ws || ''('' + || name || '')(?:'' || ws || ''|$)'') FROM direction_lookup WHERE + texticregexeq(fullStreet, ''(?i)'' || ws || name || ''(?:'' + || ws || ''|$)''); + SELECT INTO postDirAbbrev abbrev FROM direction_lookup + WHERE texticregexeq(fullStreet, ''(?i)'' || ws || name + || ''(?:'' || ws || ''|$)''); + IF location IS NULL THEN + location := substring(fullStreet, ''(?i)'' || ws || postDir + || ws || ''+(.*?)$''); + END IF; + reducedStreet := substring(fullStreet, ''^(.*?)'' || ws || ''+'' + || postDir); + SELECT INTO tempString substring(reducedStreet, ''(?i)(^'' || name + || '')'' || ws) FROM direction_lookup WHERE + texticregexeq(reducedStreet, ''(?i)(^'' || name || '')'' || ws) + ORDER BY length(name) DESC; + IF tempString IS NOT NULL THEN + preDir := tempString; + SELECT INTO preDirAbbrev abbrev FROM direction_lookup WHERE + texticregexeq(reducedStreet, ''(?i)(^'' || name || '')'' || ws) + ORDER BY length(name) DESC; + streetName := substring(reducedStreet, ''^'' || preDir || ws + || ''+(.*)''); + ELSE + streetName := reducedStreet; + END IF; + ELSIF tempInt > 1 THEN + -- Multiple postDir candidates were found. We need to find the last + -- incident of a direction, but avoid getting the last word from + -- a two word direction. eg extracting "East" from "North East" + -- We do this by sorting by length, and taking the last direction + -- in the results that is not included in an earlier one. + -- This wont be a problem it preDir is North East and postDir is + -- East as the regex requires a space before the direction. Only + -- the East will return from the preDir. + tempInt := 0; + FOR rec IN SELECT abbrev, substring(fullStreet, ''(?i)'' || ws || ''('' + || name || '')(?:'' || ws || ''|$)'') AS value + FROM direction_lookup + WHERE texticregexeq(fullStreet, ''(?i)'' || ws || name + || ''(?:'' || ws || ''|$)'') + ORDER BY length(name) desc LOOP + tempInt := 0; + IF tempInt < position(rec.value in fullStreet) THEN + IF postDir IS NULL THEN + tempInt := position(rec.value in fullStreet); + postDir := rec.value; + postDirAbbrev := rec.abbrev; + ELSIF NOT texticregexeq(postDir, ''(?i)'' || rec.value) THEN + tempInt := position(rec.value in fullStreet); + postDir := rec.value; + postDirAbbrev := rec.abbrev; + END IF; + END IF; + END LOOP; + IF location IS NULL THEN + location := substring(fullStreet, ''(?i)'' || ws || postDir || ws + || ''+(.*?)$''); + END IF; + reducedStreet := substring(fullStreet, ''(?i)^(.*?)'' || ws || ''+'' + || postDir); + SELECT INTO tempString substring(reducedStreet, ''(?i)(^'' || name + || '')'' || ws) FROM direction_lookup WHERE + texticregexeq(reducedStreet, ''(?i)(^'' || name || '')'' || ws) + ORDER BY length(name) DESC; + IF tempString IS NOT NULL THEN + preDir := tempString; + SELECT INTO preDirAbbrev abbrev FROM direction_lookup WHERE + texticregexeq(reducedStreet, ''(?i)(^'' || name || '')'' || ws) + ORDER BY length(name) DESC; + streetName := substring(reducedStreet, ''^'' || preDir || ws + || ''+(.*)''); + ELSE + streetName := reducedStreet; + END IF; + ELSE + + -- There is no street type, directional suffix or internal address + -- to allow distinction between street name and location. + IF location IS NULL THEN + location := location_extract(fullStreet, stateAbbrev); + END IF; + -- Check for a direction prefix. + SELECT INTO tempString substring(fullStreet, ''(?i)(^'' || name + || '')'' || ws) FROM direction_lookup WHERE + texticregexeq(fullStreet, ''(?i)(^'' || name || '')'' || ws) + ORDER BY length(name); + RAISE NOTICE ''DEBUG 1''; + IF tempString IS NOT NULL THEN + preDir := tempString; + SELECT INTO preDirAbbrev abbrev FROM direction_lookup WHERE + texticregexeq(fullStreet, ''(?i)(^'' || name || '')'' || ws) + ORDER BY length(name) DESC; + IF location IS NOT NULL THEN + -- The location may still be in the fullStreet, or may + -- have been removed already + streetName := substring(fullStreet, ''^'' || preDir || ws + || ''+(.*?)('' || ws || ''+'' || location || ''|$)''); + RAISE NOTICE ''DEBUG 2.1 "%", "%"'', streetName, fullStreet; + ELSE + streetName := substring(fullStreet, ''^'' || preDir || ws + || ''+(.*?)'' || ws || ''*''); + END IF; + ELSE + IF location IS NOT NULL THEN + -- The location may still be in the fullStreet, or may + -- have been removed already + streetName := substring(fullStreet, ''^(.*?)('' || ws + || ''+'' || location || ''|$)''); + RAISE NOTICE ''DEBUG 2.2 "%", "%"'', streetName, fullStreet; + ELSE + streetName := fullStreet; + END IF; + END IF; + END IF; + END IF; + END IF; + + + + RAISE NOTICE ''normalize_address() - final internal "%"'', internal; + RAISE NOTICE ''normalize_address() - prefix_direction "%"'', preDir; + RAISE NOTICE ''normalize_address() - street_type "%"'', streetType; + RAISE NOTICE ''normalize_address() - suffix_direction "%"'', postDir; + RAISE NOTICE ''normalize_address() - state "%"'', state; + + -- This is useful for scripted checking. It returns what was entered + -- for each field, rather than what should be used by the geocoder. + --result := cull_null(internal) || '':'' || cull_null(address) || '':'' + --|| cull_null(preDir) || '':'' || cull_null(streetName) || '':'' + --|| cull_null(streetType) || '':'' || cull_null(postDir) + --|| '':'' || cull_null(location) || '':'' || cull_null(state) || '':'' + --|| cull_null(zip); + + -- This is the standardized return. + result := cull_null(address) || '':'' || cull_null(preDirAbbrev) || '':'' + || cull_null(streetName) || '':'' || cull_null(streetTypeAbbrev) || '':'' + || cull_null(postDirAbbrev) || '':'' || cull_null(location) || '':'' + || cull_null(stateAbbrev) || '':'' || cull_null(zip); + return result; +END +' LANGUAGE plpgsql; + + + +-- rate_attributes(dirpA, dirpB, streetNameA, streetNameB, streetTypeA, +-- streetTypeB, dirsA, dirsB, locationA, locationB) +-- Rates the street based on the given attributes. The locations must be +-- non-null. The other eight values are handled by the other rate_attributes +-- function, so it's requirements must also be met. +CREATE OR REPLACE FUNCTION rate_attributes(VARCHAR, VARCHAR, VARCHAR, VARCHAR, + VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR) RETURNS INTEGER +AS ' +DECLARE + result INTEGER := 0; + locationWeight INTEGER := 14; +BEGIN + IF $9 IS NOT NULL AND $10 IS NOT NULL THEN + result := levenshtein_ignore_case($9, $10); + ELSE + RAISE EXCEPTION ''rate_attributes() - Location names cannot be null!''; + END IF; + result := result + rate_attributes($1, $2, $3, $4, $5, $6, $7, $8); + RETURN result; +END; +' LANGUAGE plpgsql; + +-- rate_attributes(dirpA, dirpB, streetNameA, streetNameB, streetTypeA, +-- streetTypeB, dirsA, dirsB) +-- Rates the street based on the given attributes. Only streetNames are +-- required. If any others are null (either A or B) they are treated as +-- empty strings. +CREATE OR REPLACE FUNCTION rate_attributes(VARCHAR, VARCHAR, VARCHAR, VARCHAR, + VARCHAR, VARCHAR, VARCHAR, VARCHAR) RETURNS INTEGER +AS ' +DECLARE + result INTEGER := 0; + directionWeight INTEGER := 2; + nameWeight INTEGER := 10; + typeWeight INTEGER := 5; +BEGIN + result := result + levenshtein_ignore_case(cull_null($1), cull_null($2)) * + directionWeight; + IF $3 IS NOT NULL AND $4 IS NOT NULL THEN + result := result + levenshtein_ignore_case($3, $4) * nameWeight; + ELSE + RAISE EXCEPTION ''rate_attributes() - Street names cannot be null!''; + END IF; + result := result + levenshtein_ignore_case(cull_null($5), cull_null($6)) * + typeWeight; + result := result + levenshtein_ignore_case(cull_null($7), cull_null($7)) * + directionWeight; + return result; +END; +' LANGUAGE plpgsql; + + + +-- state_extract(addressStringLessZipCode) +-- Extracts the state from end of the given string. +-- +-- This function uses the state_lookup table to determine which state +-- the input string is indicating. First, an exact match is pursued, +-- and in the event of failure, a word-by-word fuzzy match is attempted. +-- +-- The result is the state as given in the input string, and the approved +-- state abbreviation, seperated by a colon. +CREATE OR REPLACE FUNCTION state_extract(VARCHAR) RETURNS VARCHAR +AS ' +DECLARE + tempInt INTEGER; + tempString VARCHAR; + rawInput VARCHAR; + state VARCHAR; + stateAbbrev VARCHAR; + result VARCHAR; + rec RECORD; + test BOOLEAN; + ws VARCHAR; + verbose BOOLEAN := TRUE; +BEGIN + IF verbose THEN + RAISE NOTICE ''state_extract()''; + END IF; + IF $1 IS NULL THEN + RAISE EXCEPTION ''state_extract() - no input''; + ELSE + rawInput := $1; + END IF; + ws := ''[ ,\.\t\n\f\r]''; + + -- Separate out the last word of the state, and use it to compare to + -- the state lookup table to determine the entire name, as well as the + -- abbreviation associated with it. The zip code may or may not have + -- been found. + tempString := substring(rawInput from ws || ''+([^ ,\.\t\n\f\r0-9]*?)$''); + SELECT INTO tempInt count(*) FROM (select distinct abbrev from state_lookup + WHERE upper(abbrev) = upper(tempString)) as blah; + IF tempInt = 1 THEN + state := tempString; + SELECT INTO stateAbbrev abbrev FROM (select distinct abbrev from + state_lookup WHERE upper(abbrev) = upper(tempString)) as blah; + ELSE + SELECT INTO tempInt count(*) FROM state_lookup WHERE upper(name) + like upper(''%'' || tempString); + IF tempInt >= 1 THEN + FOR rec IN SELECT name from state_lookup WHERE upper(name) + like upper(''%'' || tempString) LOOP + SELECT INTO test texticregexeq(rawInput, name) FROM state_lookup + WHERE rec.name = name; + IF test THEN + SELECT INTO stateAbbrev abbrev FROM state_lookup + WHERE rec.name = name; + state := substring(rawInput, ''(?i)'' || rec.name); + EXIT; + END IF; + END LOOP; + ELSE + -- No direct match for state, so perform fuzzy match. + SELECT INTO tempInt count(*) FROM state_lookup + WHERE soundex(tempString) = end_soundex(name); + IF tempInt >= 1 THEN + FOR rec IN SELECT name, abbrev FROM state_lookup + WHERE soundex(tempString) = end_soundex(name) LOOP + tempInt := count_words(rec.name); + tempString := get_last_words(rawInput, tempInt); + test := TRUE; + FOR i IN 1..tempInt LOOP + IF soundex(split_part(tempString, '' '', i)) != + soundex(split_part(rec.name, '' '', i)) THEN + test := FALSE; + END IF; + END LOOP; + IF test THEN + state := tempString; + stateAbbrev := rec.abbrev; + EXIT; + END IF; + END LOOP; + END IF; + END IF; + END IF; + IF state IS NOT NULL AND stateAbbrev IS NOT NULL THEN + result := state || '':'' || stateAbbrev; + END IF; + return result; +END; +' LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/tables/lookup_tables.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/tables/lookup_tables.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/tables/lookup_tables.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/tables/lookup_tables.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,885 @@ +-- Create direction lookup table +DROP TABLE IF EXISTS direction_lookup; +CREATE TABLE direction_lookup (name VARCHAR(20) PRIMARY KEY, abbrev VARCHAR(3)); +INSERT INTO direction_lookup (name, abbrev) VALUES('WEST', 'W'); +INSERT INTO direction_lookup (name, abbrev) VALUES('W', 'W'); +INSERT INTO direction_lookup (name, abbrev) VALUES('SW', 'SW'); +INSERT INTO direction_lookup (name, abbrev) VALUES('SOUTH-WEST', 'SW'); +INSERT INTO direction_lookup (name, abbrev) VALUES('SOUTHWEST', 'SW'); +INSERT INTO direction_lookup (name, abbrev) VALUES('SOUTH-EAST', 'SE'); +INSERT INTO direction_lookup (name, abbrev) VALUES('SOUTHEAST', 'SE'); +INSERT INTO direction_lookup (name, abbrev) VALUES('SOUTH_WEST', 'SW'); +INSERT INTO direction_lookup (name, abbrev) VALUES('SOUTH_EAST', 'SE'); +INSERT INTO direction_lookup (name, abbrev) VALUES('SOUTH', 'S'); +INSERT INTO direction_lookup (name, abbrev) VALUES('SOUTH WEST', 'SW'); +INSERT INTO direction_lookup (name, abbrev) VALUES('SOUTH EAST', 'SE'); +INSERT INTO direction_lookup (name, abbrev) VALUES('SE', 'SE'); +INSERT INTO direction_lookup (name, abbrev) VALUES('S', 'S'); +INSERT INTO direction_lookup (name, abbrev) VALUES('NW', 'NW'); +INSERT INTO direction_lookup (name, abbrev) VALUES('NORTH-WEST', 'NW'); +INSERT INTO direction_lookup (name, abbrev) VALUES('NORTHWEST', 'NW'); +INSERT INTO direction_lookup (name, abbrev) VALUES('NORTH-EAST', 'NE'); +INSERT INTO direction_lookup (name, abbrev) VALUES('NORTHEAST', 'NE'); +INSERT INTO direction_lookup (name, abbrev) VALUES('NORTH_WEST', 'NW'); +INSERT INTO direction_lookup (name, abbrev) VALUES('NORTH_EAST', 'NE'); +INSERT INTO direction_lookup (name, abbrev) VALUES('NORTH', 'N'); +INSERT INTO direction_lookup (name, abbrev) VALUES('NORTH WEST', 'NW'); +INSERT INTO direction_lookup (name, abbrev) VALUES('NORTH EAST', 'NE'); +INSERT INTO direction_lookup (name, abbrev) VALUES('NE', 'NE'); +INSERT INTO direction_lookup (name, abbrev) VALUES('N', 'N'); +INSERT INTO direction_lookup (name, abbrev) VALUES('EAST', 'E'); +INSERT INTO direction_lookup (name, abbrev) VALUES('E', 'E'); +CREATE INDEX direction_lookup_abbrev_idx ON direction_lookup (abbrev); + + + +-- Create secondary unit lookup table +DROP TABLE IF EXISTS secondary_unit_lookup; +CREATE TABLE secondary_unit_lookup (name VARCHAR(20) PRIMARY KEY, abbrev VARCHAR(5)); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('APARTMENT', 'APT'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('APT', 'APT'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('BASEMENT', 'BSMT'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('BSMT', 'BSMT'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('BUILDING', 'BLDG'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('BLDG', 'BLDG'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('DEPARTMENT', 'DEPT'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('DEPT', 'DEPT'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('FLOOR', 'FL'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('FL', 'FL'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('FRONT', 'FRNT'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('FRNT', 'FRNT'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('HANGAR', 'HNGR'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('HNGR', 'HNGR'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('LOBBY', 'LBBY'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('LBBY', 'LBBY'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('LOT', 'LOT'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('LOWER', 'LOWR'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('LOWR', 'LOWR'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('OFFICE', 'OFC'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('OFC', 'OFC'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('PENTHOUSE', 'PH'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('PH', 'PH'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('PIER', 'PIER'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('REAR', 'REAR'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('ROOM', 'RM'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('RM', 'RM'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('SIDE', 'SIDE'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('SLIP', 'SLIP'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('SPACE', 'SPC'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('SPC', 'SPC'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('STOP', 'STOP'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('SUITE', 'STE'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('STE', 'STE'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('TRAILER', 'TRLR'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('TRLR', 'TRLR'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('UNIT', 'UNIT'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('UPPER', 'UPPR'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('UPPR', 'UPPR'); +CREATE INDEX secondary_unit_lookup_abbrev_idx ON secondary_unit_lookup (abbrev); + + + +-- Create state lookup table +DROP TABLE IF EXISTS state_lookup; +CREATE TABLE state_lookup (st_code INTEGER PRIMARY KEY, name VARCHAR(40) UNIQUE, abbrev VARCHAR(3) UNIQUE); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Alabama', 'AL', '01'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Alaska', 'AK', '02'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('American Samoa', 'AS', -1); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Arizona', 'AZ', '04'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Arkansas', 'AR', '05'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('California', 'CA', '06'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Colorado', 'CO', '08'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Connecticut', 'CT', '09'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Delaware', 'DE', '10'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('District of Columbia', 'DC', '11'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Federated States of Micronesia', 'FM', -2); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Florida', 'FL', '12'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Georgia', 'GA', '13'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Guam', 'GU', -7); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Hawaii', 'HI', '15'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Idaho', 'ID', '16'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Illinois', 'IL', '17'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Indiana', 'IN', '18'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Iowa', 'IA', '19'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Kansas', 'KS', '20'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Kentucky', 'KY', '21'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Louisiana', 'LA', '22'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Maine', 'ME', '23'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Marshall Islands', 'MH', -3); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Maryland', 'MD', '24'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Massachusetts', 'MA', '25'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Michigan', 'MI', '26'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Minnesota', 'MN', '27'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Mississippi', 'MS', '28'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Missouri', 'MO', '29'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Montana', 'MT', '30'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Nebraska', 'NE', '31'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Nevada', 'NV', '32'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('New Hampshire', 'NH', '33'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('New Jersey', 'NJ', '34'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('New Mexico', 'NM', '35'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('New York', 'NY', '36'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('North Carolina', 'NC', '37'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('North Dakota', 'ND', '38'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Northern Mariana Islands', 'MP', -4); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Ohio', 'OH', '39'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Oklahoma', 'OK', '40'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Oregon', 'OR', '41'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Palau', 'PW', -5); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Pennsylvania', 'PA', '42'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Puerto Rico', 'PR', '72'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Rhode Island', 'RI', '44'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('South Carolina', 'SC', '45'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('South Dakota', 'SD', '46'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Tennessee', 'TN', '47'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Texas', 'TX', '48'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Utah', 'UT', '49'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Vermont', 'VT', '50'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Virgin Islands', 'VI', -6); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Virginia', 'VA', '51'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Washington', 'WA', '53'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('West Virginia', 'WV', '54'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Wisconsin', 'WI', '55'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Wyoming', 'WY', '56'); + + +-- Create street type lookup table +DROP TABLE IF EXISTS street_type_lookup; +CREATE TABLE street_type_lookup (name VARCHAR(20) PRIMARY KEY, abbrev VARCHAR(4)); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ALLEE', 'Aly'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ALLEY', 'Aly'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ALLY', 'Aly'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ALY', 'Aly'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ANEX', 'Anx'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ANNEX', 'Anx'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ANNX', 'Anx'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ANX', 'Anx'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ARC', 'Arc'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ARCADE', 'Arc'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('AV', 'Ave'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('AVE', 'Ave'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('AVEN', 'Ave'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('AVENU', 'Ave'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('AVENUE', 'Ave'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('AVN', 'Ave'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('AVNUE', 'Ave'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BAYOO', 'Byu'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BAYOU', 'Byu'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BCH', 'Bch'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BEACH', 'Bch'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BEND', 'Bnd'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BND', 'Bnd'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BLF', 'Blf'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BLUF', 'Blf'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BLUFF', 'Blf'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BLUFFS', 'Blfs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BOT', 'Btm'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BOTTM', 'Btm'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BOTTOM', 'Btm'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BTM', 'Btm'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BLVD', 'Blvd'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BOUL', 'Blvd'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BOULEVARD', 'Blvd'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BOULV', 'Blvd'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BR', 'Br'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BRANCH', 'Br'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BRNCH', 'Br'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BRDGE', 'Brg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BRG', 'Brg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BRIDGE', 'Brg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BRK', 'Brk'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BROOK', 'Brk'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BROOKS', 'Brks'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BURG', 'Bg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BURGS', 'Bgs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BYP', 'Byp'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BYPA', 'Byp'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BYPAS', 'Byp'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BYPASS', 'ByP'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BYPS', 'Byp'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CAMP', 'Cp'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CMP', 'Cp'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CP', 'Cp'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CANYN', 'Cyn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CANYON', 'Cyn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CNYN', 'Cyn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CYN', 'Cyn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CAPE', 'Cpe'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CPE', 'Cpe'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CAUSEWAY', 'Cswy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CAUSWAY', 'Cswy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CSWY', 'Cswy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CEN', 'Ctr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CENT', 'Ctr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CENTER', 'Ctr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CENTR', 'Ctr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CENTRE', 'Ctr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CNTER', 'Ctr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CNTR', 'Ctr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CTR', 'Ctr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CENTERS', 'Ctrs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CIR', 'Cir'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CIRC', 'Cir'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CIRCL', 'Cir'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CIRCLE', 'Cir'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRCL', 'Cir'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRCLE', 'Cir'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CIRCLES', 'Cirs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CLF', 'Clf'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CLIFF', 'Clf'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CLFS', 'Clfs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CLIFFS', 'Clfs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CLB', 'Clb'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CLUB', 'Clb'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('COMMON', 'Cmn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('COR', 'Cor'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CORNER', 'Cor'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CORNERS', 'Cors'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CORS', 'Cors'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('COURSE', 'Crse'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRSE', 'Crse'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('COURT', 'Ct'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRT', 'Ct'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CT', 'Ct'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('COURTS', 'Cts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('COVE', 'Cv'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CV', 'Cv'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('COVES', 'Cvs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CK', 'Crk'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CR', 'Crk'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CREEK', 'Crk'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRK', 'Crk'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRECENT', 'Cres'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRES', 'Cres'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRESCENT', 'Cres'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRESENT', 'Cres'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRSCNT', 'Cres'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRSENT', 'Cres'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRSNT', 'Cres'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CREST', 'Crst'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CROSSING', 'Xing'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRSSING', 'Xing'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRSSNG', 'Xing'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('XING', 'Xing'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CROSSROAD', 'Xrd'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CURVE', 'Curv'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('DALE', 'Dl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('DL', 'Dl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('DAM', 'Dm'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('DM', 'Dm'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('DIV', 'Dv'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('DIVIDE', 'Dv'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('DV', 'Dv'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('DVD', 'Dv'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('DR', 'Dr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('DRIV', 'Dr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('DRIVE', 'Dr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('DRV', 'Dr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('DRIVES', 'Drs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('EST', 'Est'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ESTATE', 'Est'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ESTATES', 'Ests'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ESTS', 'Ests'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('EXP', 'Expy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('EXPR', 'Expy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('EXPRESS', 'Expy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('EXPRESSWAY', 'Expy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('EXPW', 'Expy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('EXPY', 'Expy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('EXT', 'Ext'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('EXTENSION', 'Ext'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('EXTN', 'Ext'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('EXTNSN', 'Ext'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('EXTENSIONS', 'Exts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('EXTS', 'Exts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FALL', 'Fall'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FALLS', 'Fls'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FLS', 'Fls'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FERRY', 'Fry'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FRRY', 'Fry'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FRY', 'Fry'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FIELD', 'Fld'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FLD', 'Fld'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FIELDS', 'Flds'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FLDS', 'Flds'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FLAT', 'Flt'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FLT', 'Flt'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FLATS', 'Flts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FLTS', 'Flts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FORD', 'Frd'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FRD', 'Frd'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FORDS', 'Frds'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FOREST', 'Frst'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FORESTS', 'Frst'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FRST', 'Frst'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FORG', 'Frg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FORGE', 'Frg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FRG', 'Frg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FORGES', 'Frgs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FORK', 'Frk'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FRK', 'Frk'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FORKS', 'Frks'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FRKS', 'Frks'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FORT', 'Ft'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FRT', 'Ft'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FT', 'Ft'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FREEWAY', 'Fwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FREEWY', 'Fwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FRWAY', 'Fwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FRWY', 'Fwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FWY', 'Fwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GARDEN', 'Gdn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GARDN', 'Gdn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GDN', 'Gdn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GRDEN', 'Gdn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GRDN', 'Gdn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GARDENS', 'Gdns'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GDNS', 'Gdns'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GRDNS', 'Gdns'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GATEWAY', 'Gtwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GATEWY', 'Gtwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GATWAY', 'Gtwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GTWAY', 'Gtwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GTWY', 'Gtwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GLEN', 'Gln'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GLN', 'Gln'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GLENS', 'Glns'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GREEN', 'Grn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GRN', 'Grn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GREENS', 'Grns'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GROV', 'Grv'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GROVE', 'Grv'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GRV', 'Grv'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GROVES', 'Grvs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HARB', 'Hbr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HARBOR', 'Hbr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HARBR', 'Hbr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HBR', 'Hbr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HRBOR', 'Hbr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HARBORS', 'Hbrs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HAVEN', 'Hvn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HAVN', 'Hvn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HVN', 'Hvn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HEIGHT', 'Hts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HEIGHTS', 'Hts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HGTS', 'Hts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HT', 'Hts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HTS', 'Hts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HIGHWAY', 'Hwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HIGHWY', 'Hwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HIWAY', 'Hwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HIWY', 'Hwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HWAY', 'Hwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HWY', 'Hwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HILL', 'Hl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HL', 'Hl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HILLS', 'Hls'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HLS', 'Hls'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HLLW', 'Holw'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HOLLOW', 'Holw'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HOLLOWS', 'Holw'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HOLW', 'Holw'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HOLWS', 'Holw'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('INLET', 'Inlt'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('INLT', 'Inlt'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('IS', 'Is'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ISLAND', 'Is'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ISLND', 'Is'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ISLANDS', 'Iss'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ISLNDS', 'Iss'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ISS', 'Iss'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ISLE', 'Isle'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ISLES', 'Isle'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('JCT', 'Jct'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('JCTION', 'Jct'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('JCTN', 'Jct'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('JUNCTION', 'Jct'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('JUNCTN', 'Jct'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('JUNCTON', 'Jct'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('JCTNS', 'Jcts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('JCTS', 'Jcts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('JUNCTIONS', 'Jcts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('KEY', 'Ky'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('KY', 'Ky'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('KEYS', 'Kys'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('KYS', 'Kys'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('KNL', 'Knl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('KNOL', 'Knl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('KNOLL', 'Knl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('KNLS', 'Knls'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('KNOLLS', 'Knls'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LAKE', 'Lk'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LK', 'Lk'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LAKES', 'Lks'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LKS', 'Lks'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LAND', 'Land'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LANDING', 'Lndg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LNDG', 'Lndg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LNDNG', 'Lndg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LA', 'Ln'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LANE', 'Ln'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LANES', 'Ln'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LN', 'Ln'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LGT', 'Lgt'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LIGHT', 'Lgt'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LIGHTS', 'Lgts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LF', 'Lf'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LOAF', 'Lf'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LCK', 'Lck'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LOCK', 'Lck'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LCKS', 'Lcks'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LOCKS', 'Lcks'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LDG', 'Ldg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LDGE', 'Ldg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LODG', 'Ldg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LODGE', 'Ldg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LOOP', 'Loop'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LOOPS', 'Loop'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MALL', 'Mall'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MANOR', 'Mnr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MNR', 'Mnr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MANORS', 'Mnrs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MNRS', 'Mnrs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MDW', 'Mdw'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MEADOW', 'Mdw'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MDWS', 'Mdws'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MEADOWS', 'Mdws'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MEDOWS', 'Mdws'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MEWS', 'Mews'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MILL', 'Ml'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ML', 'Ml'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MILLS', 'Mls'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MLS', 'Mls'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MISSION', 'Msn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MISSN', 'Msn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MSN', 'Msn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MSSN', 'Msn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MOTORWAY', 'Mtwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MNT', 'Mt'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MOUNT', 'Mt'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MT', 'Mt'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MNTAIN', 'Mtn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MNTN', 'Mtn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MOUNTAIN', 'Mtn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MOUNTIN', 'Mtn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MTIN', 'Mtn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MTN', 'Mtn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MNTNS', 'Mtns'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MOUNTAINS', 'Mtns'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('NCK', 'Nck'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('NECK', 'Nck'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ORCH', 'Orch'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ORCHARD', 'Orch'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ORCHRD', 'Orch'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('OVAL', 'Oval'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('OVL', 'Oval'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('OVERPASS', 'Opas'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PARK', 'Park'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PK', 'Park'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PRK', 'Park'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PARKS', 'Park'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PARKWAY', 'Pkwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PARKWY', 'Pkwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PKWAY', 'Pkwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PKWY', 'Pkwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PKY', 'Pkwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PARKWAYS', 'Pkwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PKWYS', 'Pkwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PASS', 'Pass'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PASSAGE', 'Psge'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PATH', 'Path'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PATHS', 'Path'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PIKE', 'Pike'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PIKES', 'Pike'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PINE', 'Pne'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PINES', 'Pnes'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PNES', 'Pnes'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PL', 'Pl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PLACE', 'Pl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PLAIN', 'Pln'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PLN', 'Pln'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PLAINES', 'Plns'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PLAINS', 'Plns'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PLNS', 'Plns'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PLAZA', 'Plz'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PLZ', 'Plz'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PLZA', 'Plz'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('POINT', 'Pt'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PT', 'Pt'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('POINTS', 'Pts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PTS', 'Pts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PORT', 'Prt'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PRT', 'Prt'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PORTS', 'Prts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PRTS', 'Prts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PR', 'Pr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PRAIRIE', 'Pr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PRARIE', 'Pr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PRR', 'Pr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RAD', 'Radl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RADIAL', 'Radl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RADIEL', 'Radl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RADL', 'Radl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RAMP', 'Ramp'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RANCH', 'Rnch'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RANCHES', 'Rnch'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RNCH', 'Rnch'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RNCHS', 'Rnch'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RAPID', 'Rpd'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RPD', 'Rpd'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RAPIDS', 'Rpds'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RPDS', 'Rpds'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('REST', 'Rst'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RST', 'Rst'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RDG', 'Rdg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RDGE', 'Rdg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RIDGE', 'Rdg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RDGS', 'Rdgs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RIDGES', 'Rdgs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RIV', 'Riv'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RIVER', 'Riv'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RIVR', 'Riv'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RVR', 'Riv'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RD', 'Rd'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ROAD', 'Rd'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RDS', 'Rds'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ROADS', 'Rds'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ROUTE', 'Rte'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ROW', 'Row'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RUE', 'Rue'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RUN', 'Run'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SHL', 'Shl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SHOAL', 'Shl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SHLS', 'Shls'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SHOALS', 'Shls'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SHOAR', 'Shr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SHORE', 'Shr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SHR', 'Shr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SHOARS', 'Shrs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SHORES', 'Shrs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SHRS', 'Shrs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SKYWAY', 'Skwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SPG', 'Spg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SPNG', 'Spg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SPRING', 'Spg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SPRNG', 'Spg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SPGS', 'Spgs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SPNGS', 'Spgs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SPRINGS', 'Spgs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SPRNGS', 'Spgs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SPUR', 'Spur'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SPURS', 'Spur'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SQ', 'Sq'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SQR', 'Sq'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SQRE', 'Sq'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SQU', 'Sq'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SQUARE', 'Sq'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SQRS', 'Sqs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SQUARES', 'Sqs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('STA', 'Sta'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('STATION', 'Sta'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('STATN', 'Sta'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('STN', 'Sta'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('STRA', 'Stra'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('STRAV', 'Stra'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('STRAVE', 'Stra'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('STRAVEN', 'Stra'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('STRAVENUE', 'Stra'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('STRAVN', 'Stra'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('STRVN', 'Stra'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('STRVNUE', 'Stra'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('STREAM', 'Strm'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('STREME', 'Strm'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('STRM', 'Strm'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ST', 'St'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('STR', 'St'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('STREET', 'St'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('STRT', 'St'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('STREETS', 'Sts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SMT', 'Smt'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SUMIT', 'Smt'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SUMITT', 'Smt'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SUMMIT', 'Smt'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TER', 'Ter'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TERR', 'Ter'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TERRACE', 'Ter'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('THROUGHWAY', 'Trwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRACE', 'Trce'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRACES', 'Trce'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRCE', 'Trce'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRACK', 'Trak'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRACKS', 'Trak'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRAK', 'Trak'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRK', 'Trak'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRKS', 'Trak'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRAFFICWAY', 'Trfy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRFY', 'Trfy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TR', 'Trl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRAIL', 'Trl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRAILS', 'Trl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRL', 'Trl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRLS', 'Trl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TUNEL', 'Tunl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TUNL', 'Tunl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TUNLS', 'Tunl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TUNNEL', 'Tunl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TUNNELS', 'Tunl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TUNNL', 'Tunl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TPK', 'Tpke'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TPKE', 'Tpke'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRNPK', 'Tpke'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRPK', 'Tpke'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TURNPIKE', 'Tpke'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TURNPK', 'Tpke'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('UNDERPASS', 'Upas'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('UN', 'Un'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('UNION', 'Un'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('UNIONS', 'Uns'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VALLEY', 'Vly'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VALLY', 'Vly'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VLLY', 'Vly'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VLY', 'Vly'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VALLEYS', 'Vlys'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VLYS', 'Vlys'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VDCT', 'Via'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VIA', 'Via'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VIADCT', 'Via'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VIADUCT', 'Via'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VIEW', 'Vw'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VW', 'Vw'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VIEWS', 'Vws'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VWS', 'Vws'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VILL', 'Vlg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VILLAG', 'Vlg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VILLAGE', 'Vlg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VILLG', 'Vlg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VILLIAGE', 'Vlg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VLG', 'Vlg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VILLAGES', 'Vlgs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VLGS', 'Vlgs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VILLE', 'Vl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VL', 'Vl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VIS', 'Vis'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VIST', 'Vis'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VISTA', 'Vis'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VST', 'Vis'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VSTA', 'Vis'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('WALK', 'Walk'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('WALKS', 'Walk'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('WALL', 'Wall'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('WAY', 'Way'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('WY', 'Way'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('WAYS', 'Ways'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('WELL', 'Wl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('WELLS', 'Wls'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('WLS', 'Wls'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BYU', 'Byu'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BLFS', 'Blfs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BRKS', 'Brks'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BG', 'Bg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BGS', 'Bgs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CTRS', 'Ctrs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CIRS', 'Cirs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CMN', 'Cmn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CTS', 'Cts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CVS', 'Cvs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRST', 'Crst'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('XRD', 'Xrd'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CURV', 'Curv'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('DRS', 'Drs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FRDS', 'Frds'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FRGS', 'Frgs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GLNS', 'Glns'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GRNS', 'Grns'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GRVS', 'Grvs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HBRS', 'Hbrs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LGTS', 'Lgts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MTWY', 'Mtwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MTNS', 'Mtns'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('OPAS', 'Opas'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PSGE', 'Psge'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PNE', 'Pne'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RTE', 'Rte'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SKWY', 'Skwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SQS', 'Sqs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('STS', 'Sts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRWY', 'Trwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('UPAS', 'Upas'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('UNS', 'Uns'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('WL', 'Wl'); +CREATE INDEX street_type_lookup_abbrev_idx ON street_type_lookup (abbrev); + +-- Create place and countysub lookup tables +DROP TABLE IF EXISTS place_lookup; +CREATE TABLE place_lookup ( + st_code INTEGER, + state VARCHAR(2), + pl_code INTEGER, + name VARCHAR(90), + PRIMARY KEY (st_code,pl_code) +); + +INSERT INTO place_lookup + SELECT + pl.state::integer as st_code, + sl.abbrev as state, + pl.placefp::integer as pl_code, + pl.name as name + FROM + pl99_d00 pl + JOIN state_lookup sl ON (pl.state::integer = sl.st_code) + GROUP BY pl.state, sl.abbrev, pl.placefp, pl.name; + +CREATE INDEX place_lookup_name_idx ON place_lookup (soundex(name)); +CREATE INDEX place_lookup_state_idx ON place_lookup (state); + +DROP TABLE IF EXISTS county_lookup; +CREATE TABLE county_lookup ( + st_code INTEGER, + state VARCHAR(2), + co_code INTEGER, + name VARCHAR(90), + PRIMARY KEY (st_code, co_code) +); + +INSERT INTO county_lookup + SELECT + co.state::integer as st_code, + sl.abbrev as state, + co.county::integer as co_code, + co.name as name + FROM + co99_d00 co + JOIN state_lookup sl ON (co.state::integer = sl.st_code) + GROUP BY co.state, sl.abbrev, co.county, co.name; + +CREATE INDEX county_lookup_name_idx ON county_lookup (soundex(name)); +CREATE INDEX county_lookup_state_idx ON county_lookup (state); + +DROP TABLE IF EXISTS countysub_lookup; +CREATE TABLE countysub_lookup ( + st_code INTEGER, + state VARCHAR(2), + co_code INTEGER, + county VARCHAR(90), + cs_code INTEGER, + name VARCHAR(90), + PRIMARY KEY (st_code, co_code, cs_code) +); + +INSERT INTO countysub_lookup + SELECT + cs.state::integer as st_code, + sl.abbrev as state, + cs.county::integer as co_code, + cl.name as county, + cs.cousubfp::integer as cs_code, + cs.name as name + FROM + cs99_d00 cs + JOIN state_lookup sl ON (cs.state::integer = sl.st_code) + JOIN county_lookup cl ON (cs.state::integer = cl.st_code AND cs.county::integer = cl.co_code) + GROUP BY cs.state, sl.abbrev, cs.county, cl.name, cs.cousubfp, cs.name; + +CREATE INDEX countysub_lookup_name_idx ON countysub_lookup (soundex(name)); +CREATE INDEX countysub_lookup_state_idx ON countysub_lookup (state); + +DROP TABLE IF EXISTS zip_lookup_all; +CREATE TABLE zip_lookup_all ( + zip INTEGER, + st_code INTEGER, + state VARCHAR(2), + co_code INTEGER, + county VARCHAR(90), + cs_code INTEGER, + cousub VARCHAR(90), + pl_code INTEGER, + place VARCHAR(90), + cnt INTEGER +); + +SET work_mem = '2GB'; + +INSERT INTO zip_lookup_all + SELECT *,count(*) as cnt FROM + (SELECT + zipl as zip, + rl.statel as st_code, + sl.abbrev as state, + rl.countyl as co_code, + cl.name as county, + rl.cousubl as cs_code, + cs.name as countysub, + rl.placel as pl_code, + pl.name as place + FROM + roads_local rl + JOIN state_lookup sl ON (rl.statel::integer = sl.st_code) + LEFT JOIN county_lookup cl ON (rl.statel::integer = cl.st_code AND rl.countyl::integer = cl.co_code) + LEFT JOIN countysub_lookup cs ON (rl.statel::integer = cs.st_code AND rl.countyl::integer = cs.co_code AND rl.cousubl = cs.cs_code) + LEFT JOIN place_lookup pl ON (rl.statel::integer = pl.st_code AND rl.placel::integer = pl.pl_code) + WHERE zipl IS NOT NULL + UNION ALL + SELECT + zipr as zip, + rl.stater as st_code, + sl.abbrev as state, + rl.countyr as co_code, + cl.name as county, + rl.cousubr as cs_code, + cs.name as countysub, + rl.placer as pl_code, + pl.name as place + FROM + roads_local rl + JOIN state_lookup sl ON (rl.stater = sl.st_code) + LEFT JOIN county_lookup cl ON (rl.stater = cl.st_code AND rl.countyr = cl.co_code) + LEFT JOIN countysub_lookup cs ON (rl.stater = cs.st_code AND rl.countyr = cs.co_code AND rl.cousubr = cs.cs_code) + LEFT JOIN place_lookup pl ON (rl.stater = pl.st_code AND rl.placer = pl.pl_code) + WHERE zipr IS NOT NULL + ) as subquery + GROUP BY zip, st_code, state, co_code, county, cs_code, countysub, pl_code, place; + +DROP TABLE IF EXISTS zip_lookup_base; +CREATE TABLE zip_lookup_base ( + zip INTEGER, + state VARCHAR(40), + county VARCHAR(90), + city VARCHAR(90), + PRIMARY KEY (zip) +); + +-- INSERT INTO zip_lookup_base +-- Populate through magic +-- If anyone knows of a good, public, free, place to pull this information from, that'd be awesome to have... + +DROP TABLE IF EXISTS zip_lookup; +CREATE TABLE zip_lookup ( + zip INTEGER, + st_code INTEGER, + state VARCHAR(2), + co_code INTEGER, + county VARCHAR(90), + cs_code INTEGER, + cousub VARCHAR(90), + pl_code INTEGER, + place VARCHAR(90), + cnt INTEGER, + PRIMARY KEY (zip) +); + +INSERT INTO zip_lookup + SELECT + DISTINCT ON (zip) + zip, + st_code, + state, + co_code, + county, + cs_code, + cousub, + pl_code, + place, + cnt + FROM zip_lookup_all + ORDER BY zip,cnt desc; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/tables/roads_local.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/tables/roads_local.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/tables/roads_local.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/tables/roads_local.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,92 @@ +create table roads_local ( + ogc_fid INTEGER, + geom GEOMETRY, + module VARCHAR(8), + tlid INTEGER, + side1 INTEGER, + source CHAR(1), + fedirp VARCHAR(2), + fename VARCHAR(30), + fetype VARCHAR(4), + fedirs VARCHAR(2), + cfcc VARCHAR(3), + fraddl INTEGER, + toaddl INTEGER, + fraddr INTEGER, + toaddr INTEGER, + friaddl CHAR(1), + toiaddl CHAR(1), + friaddr CHAR(1), + toiaddr CHAR(1), + zipl INTEGER, + zipr INTEGER, + aianhhfpl INTEGER, + aianhhfpr INTEGER, + aihhtlil CHAR(1), + aihhtlir CHAR(1), + census1 CHAR(1), + census2 CHAR(1), + statel INTEGER, + stater INTEGER, + countyl INTEGER, + countyr INTEGER, + cousubl INTEGER, + cousubr INTEGER, + submcdl INTEGER, + submcdr INTEGER, + placel INTEGER, + placer INTEGER, + tractl INTEGER, + tractr INTEGER, + blockl INTEGER, + blockr INTEGER +); + +insert into roads_local +select + ogc_fid, + wkb_geometry, + trim(module), + tlid, + side1, + trim(source), + trim(fedirp), + trim(fename), + trim(fetype), + trim(fedirs), + trim(cfcc), + to_number(fraddl,'99999999999'), + to_number(toaddl,'99999999999'), + to_number(fraddr,'99999999999'), + to_number(toaddr,'99999999999'), + trim(friaddl), + trim(toiaddl), + trim(friaddr), + trim(toiaddr), + zipl, + zipr, + aianhhfpl, + aianhhfpr, + trim(aihhtlil), + trim(aihhtlir), + trim(census1), + trim(census2), + statel, + stater, + countyl, + countyr, + cousubl, + cousubr, + submcdl, + submcdr, + placel, + placer, + tractl, + tractr, + blockl, + blockr +from completechain; + +CREATE INDEX roads_local_tlid_idx ON roads_local (tlid); +CREATE INDEX roads_local_geom_idx ON roads_local USING GIST (geom public.gist_geometry_ops); +CREATE INDEX roads_local_cfcc_idx ON roads_local (cfcc); diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/tables/tiger_geocode_roads.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/tables/tiger_geocode_roads.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/tables/tiger_geocode_roads.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/tables/tiger_geocode_roads.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,78 @@ +DROP SEQUENCE IF EXISTS tiger_geocode_roads_seq; +CREATE SEQUENCE tiger_geocode_roads_seq; + +DROP TABLE IF EXISTS tiger_geocode_roads; +CREATE TABLE tiger_geocode_roads ( + id INTEGER, + tlid INTEGER, + fedirp VARCHAR(2), + fename VARCHAR(30), + fetype VARCHAR(4), + fedirs VARCHAR(2), + zip INTEGER, + state VARCHAR(2), + county VARCHAR(90), + cousub VARCHAR(90), + place VARCHAR(90) +); + +INSERT INTO tiger_geocode_roads + SELECT + nextval('tiger_geocode_roads_seq'), + tlid, + fedirp, + fename, + fetype, + fedirs, + zip, + state, + county, + cousub, + place + FROM + (SELECT + tlid, + fedirp, + fename, + fetype, + fedirs, + zipl as zip, + sl.abbrev as state, + co.name as county, + cs.name as cousub, + pl.name as place + FROM + roads_local rl + JOIN state_lookup sl on (rl.statel = sl.st_code) + LEFT JOIN county_lookup co on (rl.statel = co.st_code AND rl.countyl = co.co_code) + LEFT JOIN countysub_lookup cs on (rl.statel = cs.st_code AND rl.countyl = cs.co_code AND rl.cousubl = cs.cs_code) + LEFT JOIN place_lookup pl on (rl.statel = pl.st_code AND rl.placel = pl.pl_code) + WHERE fename IS NOT NULL + UNION + SELECT + tlid, + fedirp, + fename, + fetype, + fedirs, + zipr as zip, + sl.abbrev as state, + co.name as county, + cs.name as cousub, + pl.name as place + FROM + roads_local rl + JOIN state_lookup sl on (rl.stater = sl.st_code) + LEFT JOIN county_lookup co on (rl.stater = co.st_code AND rl.countyr = co.co_code) + LEFT JOIN countysub_lookup cs on (rl.stater = cs.st_code AND rl.countyr = cs.co_code AND rl.cousubr = cs.cs_code) + LEFT JOIN place_lookup pl on (rl.stater = pl.st_code AND rl.placer = pl.pl_code) + WHERE fename IS NOT NULL + ) AS sub; + +CREATE INDEX tiger_geocode_roads_zip_soundex_idx ON tiger_geocode_roads (soundex(fename), zip, state); +CREATE INDEX tiger_geocode_roads_place_soundex_idx ON tiger_geocode_roads (soundex(fename), place, state); +CREATE INDEX tiger_geocode_roads_cousub_soundex_idx ON tiger_geocode_roads (soundex(fename), cousub, state); +CREATE INDEX tiger_geocode_roads_place_more_soundex_idx ON tiger_geocode_roads (soundex(fename), soundex(place), state); +CREATE INDEX tiger_geocode_roads_cousub_more_soundex_idx ON tiger_geocode_roads (soundex(fename), soundex(cousub), state); +CREATE INDEX tiger_geocode_roads_state_soundex_idx ON tiger_geocode_roads (soundex(fename), state); + diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/utility/cull_null.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/utility/cull_null.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/utility/cull_null.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/utility/cull_null.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,8 @@ +-- Returns the value passed, or an empty string if null. +-- This is used to concatinate values that may be null. +CREATE OR REPLACE FUNCTION cull_null(VARCHAR) RETURNS VARCHAR +AS $_$ +BEGIN + RETURN coalesce($1,''); +END; +$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/utility/levenshtein_ignore_case.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/utility/levenshtein_ignore_case.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/utility/levenshtein_ignore_case.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/utility/levenshtein_ignore_case.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,10 @@ +-- This function determines the levenshtein distance irespective of case. +CREATE OR REPLACE FUNCTION levenshtein_ignore_case(VARCHAR, VARCHAR) RETURNS INTEGER +AS $_$ +DECLARE + result INTEGER; +BEGIN + result := levenshtein(upper($1), upper($2)); + RETURN result; +END +$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/utility/nullable_levenshtein.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/utility/nullable_levenshtein.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/utility/nullable_levenshtein.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/utility/nullable_levenshtein.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,27 @@ +-- This function take two arguements. The first is the "given string" and +-- must not be null. The second arguement is the "compare string" and may +-- or may not be null. If the second string is null, the value returned is +-- 3, otherwise it is the levenshtein difference between the two. +CREATE OR REPLACE FUNCTION nullable_levenshtein(VARCHAR, VARCHAR) RETURNS INTEGER +AS $_$ +DECLARE + given_string VARCHAR; + result INTEGER := 3; + verbose BOOLEAN := FALSE; +BEGIN + IF $1 IS NULL THEN + IF verbose THEN + RAISE NOTICE 'nullable_levenshtein - given string is NULL!'; + END IF; + RETURN NULL; + ELSE + given_string := $1; + END IF; + + IF $2 IS NOT NULL AND $2 != '' THEN + result := levenshtein_ignore_case(given_string, $2); + END IF; + + RETURN result; +END +$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/utility/utmzone.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/utility/utmzone.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2006andbefore/utility/utmzone.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2006andbefore/utility/utmzone.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,17 @@ +CREATE OR REPLACE FUNCTION utmzone(geometry) RETURNS integer AS +$BODY$ +DECLARE + geomgeog geometry; + zone int; + pref int; +BEGIN + geomgeog:=transform($1,4326); + IF (y(geomgeog))>0 THEN + pref:=32600; + ELSE + pref:=32700; + END IF; + zone:=floor((x(geomgeog)+180)/6)+1; + RETURN zone+pref; +END; +$BODY$ LANGUAGE 'plpgsql' immutable; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2010/README postgis-2.0.1/extras/tiger_geocoder/tiger_2010/README --- postgis-1.5.3/extras/tiger_geocoder/tiger_2010/README 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2010/README 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,127 @@ +$Id: README 9324 2012-02-27 22:08:12Z pramsey $ + +Installing The Tiger Geocoder + +This is a customized version of Steve Frost's tiger geocoder revisions +(http://www.snowman.net/git/tiger_geocoder/). + +This version includes a loader that is portable between Linux and +Windows but loads a full state of data. The loader helper tables and +functions are prefixed with loader and stored in the tiger schema. If +you only want to load a county, revise the wget call that is generated +for the state to just download the statewide and specific counties or +just download them by hand. The loader will only process files that +exist. + +If you are on windows, you will need 7zip and wget. 7zip you can get +from http://www.7-zip.org/ and wget you can get from +http://gnuwin32.sourceforge.net/packages/wget.htm + +Tiger Geocoder is now part of the PostGIS documentation +for further details about function use, refer to: +http://www.postgis.org/documentation/manual-svn/Extras.html#Tiger_Geocoder + +Steps to install and load: + +1. Create a PostGIS enabled db if you don't have one already + +2. From command line, cd into the tiger_geocoder_2010 folder + +3. Edit the tiger_loader.sql to the paths of your executables server etc. + +4. Edit the create_geocode.bat or create_geocode.sh and run + +(NOTE: if you installed soundex in its own schema, you will need to +add it to the set path of the create_geocode.sql file and also have it +in the search_path of your database) + +5. Now add tiger schema to your database search path by doing +something like: +ALTER DATABASE geocoder SET search_path=public, tiger; + +6. Create a folder called gisdata on root of server or your local pc +if you have a fast network connection to the server. This folder is +where the tiger files will be downloaded to. + +7. Create a folder called temp in the gisdata folder. This will be +the folder where we extract the downloaded tiger data. + +8. Run the following commands at psql or pgAdmin III query window to +generate the script, replacing 'DC', 'RI' with list of states you want +and save contents to a .bat or sh file in YOUR CURRENT DIRECTORY. This +will generate CODE for each state and append it to the script. + +(IF YOU ARE AT A PSQL PROMPT, FIRST RUN "\a", "\t", AND "\o +script.xxx". THIS WILL MAKE YOUR OUTPUT UNALIGNED AND REDIRECT IT TO +script.xxx. WITHOUT "\a" and "\t", THE SCRIPT WILL HAVE EXTRA +WHITESPACE AND POSSIBLY NON-SCRIPT CHARACTERS THAT CAUSE IT TO BREAK.) + +-- UNIX /LINUX USERS -- +--To generate a bash script suitable for Unix command lines +SELECT loader_generate_script(ARRAY['DC','RI'], 'sh'); + +ONCE YOU GENERATE THIS SCRIPT, EDIT IT TO ADD "set -e -u" AT THE TOP; +THIS SETTING WILL MAKE IT STOP ON ERROR OR UNITIALIZED VARIABLE AND +MAKE IT EASIER TO DEBUG ANY PROBLEMS. THEN RUN THE SCRIPT AT THE +COMMAND LINE, REDIRECTING STANDARD OUTPUT AND STANDARD ERROR TO USEFUL +FILES. YOU MAY WANT TO RUN "tail -f " TO SEE THE STANDARD ERROR AS IT +GETS WRITTEN. FOR EXAMPLE: + +$ sh foo.sh 1>out 2>err; tail -f err + +-- WINDOWS USERS -- +--To generate a WINDOWS DOS script +SELECT loader_generate_script(ARRAY['DC','RI'], 'windows'); + +If your script disappears without loading anything, +most likely one of your path settings is wrong. +To troubleshoot run the batch script by +first opening up a commandline and executing the file. + +That will keep the window open for you to see the error. + +-- Next run the script to install any missing indexes -- +SELECT install_missing_indexes(); + +Alternatively if you want to see what indexes will be created before +you create them run the below and manually run the steps generated: +SELECT missing_indexes_generate_script(); + + +9. Copy and paste the generated script into a .bat or .sh file and put +in gisdata folder you created and then run it, OR IF YOU REDIRECTED +THE OUTPUT TO A FILE WITH "\o" MOVE THAT FILE TO GISDATA. + +10. Test out the geocoder run these queries + +-- To get the best rated answer -- +-- this is generally faster +SELECT g.rating, + ST_X(geomout) As lon, + ST_Y(geomout) As lat, (addy).* +FROM geocode('1731 New Hampshire Avenue Northwest, Washington, DC 20010', 1) As g; + +--To get multiple answers if there is more than 1 +SELECT g.rating, + ST_X(geomout) As lon, + ST_Y(geomout) As lat, (addy).* +FROM geocode('1731 New Hampshire Avenue Northwest, Washington, DC 20010') As g; + +STEPS TO UPGRADE YOUR INSTALL: +If you need to upgrade the geocoder/tiger loader from a pre-release +2.0.0 install -- run the upgrade_geocoder.sh or upgrade_geocoder.bat +script. + +CAUTION: The upgrade script will drop any table columns that have a +norm_addy type for a column type. This is rare if ever done so you +should be fine. We plan to fix this later. It will also drop any +customizations you have made to the tiger_loader configuration tables. +To prevent this, you can remark out the install loader part. This we +plan to remedy in the future. + +It will also install any missing indexes that are deemed needed by +queries. + +It will fail on some steps such as addition of new columns +to lookup tables if they already exist in your intall. +These errors can be safely ignored. \ No newline at end of file diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2010/census_loader.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2010/census_loader.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2010/census_loader.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2010/census_loader.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,174 @@ +--$Id: census_loader.sql 9324 2012-02-27 22:08:12Z pramsey $ +-- +-- PostGIS - Spatial Types for PostgreSQL +-- http://www.postgis.org +-- +-- Copyright (C) 2010, 2011 Regina Obe and Leo Hsu +-- Paragon Corporation +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +-- +-- Author: Regina Obe and Leo Hsu +-- +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +SET search_path TO tiger,public; +CREATE OR REPLACE FUNCTION create_census_base_tables() + RETURNS text AS +$$ +DECLARE +BEGIN +IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_schema = 'tiger' AND column_name = 'tract_id' AND table_name = 'tract') THEN + -- census block group/tracts parent tables not created yet or an older version -- drop old if not in use, create new structure + DROP TABLE IF EXISTS tiger.tract; + CREATE TABLE tract + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + tract_id varchar(11) PRIMARY KEY, + name varchar(7), + namelsad varchar(20), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + COMMENT ON TABLE tiger.tract IS 'census tracts - $Id: census_loader.sql 9324 2012-02-27 22:08:12Z pramsey $'; + + DROP TABLE IF EXISTS tiger.tabblock; + CREATE TABLE tabblock + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blockce varchar(4), + tabblock_id varchar(15) PRIMARY KEY, + name varchar(10), + mtfcc varchar(5), + ur varchar(1), + uace varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + COMMENT ON TABLE tiger.tabblock IS 'census blocks - $Id: census_loader.sql 9324 2012-02-27 22:08:12Z pramsey $'; + + DROP TABLE IF EXISTS tiger.bg; + CREATE TABLE bg + ( + gid serial NOT NULL, + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + bg_id varchar(12) PRIMARY KEY, + namelsad varchar(13), + mtfcc varchar(5), + funcstat varchar(1), + aland double precision, + awater double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) + ); + COMMENT ON TABLE tiger.bg IS 'block groups'; + RETURN 'Done creating census tract base tables - $Id: census_loader.sql 9324 2012-02-27 22:08:12Z pramsey $'; +ELSE + RETURN 'Tables already present'; +END IF; +END +$$ +language 'plpgsql'; +ALTER FUNCTION create_census_base_tables() SET search_path=tiger,public; + +DROP FUNCTION IF EXISTS loader_generate_census(text[], text); +CREATE OR REPLACE FUNCTION loader_generate_census_script(param_states text[], os text) + RETURNS SETOF text AS +$$ +SELECT create_census_base_tables(); +SELECT + loader_macro_replace( + replace( + loader_macro_replace(declare_sect + , ARRAY['staging_fold', 'state_fold','website_root', 'psql', 'state_abbrev', 'data_schema', 'staging_schema', 'state_fips'], + ARRAY[variables.staging_fold, s.state_fold, variables.website_root, platform.psql, s.state_abbrev, variables.data_schema, variables.staging_schema, s.state_fips::text] + ), '/', platform.path_sep) || ' + ' || platform.wget || ' http://' || variables.website_root || '/' + || state_fold || '/' || state_fips || '/ --no-parent --relative --accept=*bg10.zip,*tract10.zip,*tabblock10.zip --mirror --reject=html +' || platform.unzip_command || + ' + ' || + -- State level files + array_to_string( ARRAY(SELECT loader_macro_replace(COALESCE(lu.pre_load_process || E'\n', '') || platform.loader || ' -' || lu.insert_mode || ' -s 4269 -g the_geom ' + || CASE WHEN lu.single_geom_mode THEN ' -S ' ELSE ' ' END::text || ' -W "latin1" tl_' || variables.tiger_year || '_' || s.state_fips + || '_' || lu.table_name || '.dbf tiger_staging.' || lower(s.state_abbrev) || '_' || lu.table_name || ' | '::text || platform.psql + || COALESCE(E'\n' || + lu.post_load_process , '') , ARRAY['loader','table_name', 'lookup_name'], ARRAY[platform.loader, lu.table_name, lu.lookup_name ]) + FROM loader_lookuptables AS lu + WHERE level_state = true AND load = true AND lookup_name IN('tract','bg','tabblock') + ORDER BY process_order, lookup_name), E'\n') ::text + -- County Level files + || E'\n' || + array_to_string( ARRAY(SELECT loader_macro_replace(COALESCE(lu.pre_load_process || E'\n', '') || COALESCE(county_process_command || E'\n','') + || COALESCE(E'\n' ||lu.post_load_process , '') , ARRAY['loader','table_name','lookup_name'], ARRAY[platform.loader, lu.table_name, lu.lookup_name ]) + FROM loader_lookuptables AS lu + WHERE level_county = true AND load = true AND lookup_name IN('tract','bg','tabblock') + ORDER BY process_order, lookup_name), E'\n') ::text + , ARRAY['psql', 'data_schema','staging_schema', 'staging_fold', 'state_fold', 'website_root', 'state_abbrev','state_fips'], + ARRAY[platform.psql, variables.data_schema, variables.staging_schema, variables.staging_fold, s.state_fold,variables.website_root, s.state_abbrev, s.state_fips::text]) + || E'\n' || loader_macro_replace('${psql} -c "SELECT install_missing_indexes();" ', ARRAY['psql'], ARRAY[platform.psql]) + AS shell_code +FROM loader_variables As variables + CROSS JOIN (SELECT name As state, abbrev As state_abbrev, lpad(st_code::text,2,'0') As state_fips, + lpad(st_code::text,2,'0') || '_' + || replace(name, ' ', '_') As state_fold +FROM state_lookup) As s CROSS JOIN loader_platform As platform +WHERE $1 @> ARRAY[state_abbrev::text] -- If state is contained in list of states input generate script for it +AND platform.os = $2 -- generate script for selected platform +; +$$ + LANGUAGE sql VOLATILE; + +--update with census tract loading logic +DELETE FROM loader_lookuptables WHERE lookup_name IN('tract','tabblock','bg'); +INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process, columns_exclude ) +VALUES(10, 'tract', 'tract10', true, false, true,false, 'c', +'${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${lookup_name}(CONSTRAINT pk_${state_abbrev}_${lookup_name} PRIMARY KEY (tract_id) ) INHERITS(tiger.${lookup_name}); " ', + '${psql} -c "ALTER TABLE ${staging_schema}.${state_abbrev}_${table_name} RENAME geoid10 TO tract_id; SELECT loader_load_staged_data(lower(''${state_abbrev}_${table_name}''), lower(''${state_abbrev}_${lookup_name}'')); " + ${psql} -c "CREATE INDEX ${data_schema}_${state_abbrev}_${lookup_name}_the_geom_gist ON ${data_schema}.${state_abbrev}_${lookup_name} USING gist(the_geom);" + ${psql} -c "VACUUM ANALYZE ${data_schema}.${state_abbrev}_${lookup_name};" + ${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');"', ARRAY['gid']); + +INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process, columns_exclude ) +VALUES(11, 'tabblock', 'tabblock10', true, false, true,false, 'c', +'${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${lookup_name}(CONSTRAINT pk_${state_abbrev}_${lookup_name} PRIMARY KEY (tabblock_id)) INHERITS(tiger.${lookup_name});" ', +'${psql} -c "ALTER TABLE ${staging_schema}.${state_abbrev}_${table_name} RENAME geoid10 TO tabblock_id; SELECT loader_load_staged_data(lower(''${state_abbrev}_${table_name}''), lower(''${state_abbrev}_${lookup_name}'')); " +${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');" +${psql} -c "CREATE INDEX ${data_schema}_${state_abbrev}_${lookup_name}_the_geom_gist ON ${data_schema}.${state_abbrev}_${lookup_name} USING gist(the_geom);" +${psql} -c "vacuum analyze ${data_schema}.${state_abbrev}_${lookup_name};"', ARRAY['gid']); + +INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process, columns_exclude ) +VALUES(12, 'bg', 'bg10', true,false, true,false, 'c', +'${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${lookup_name}(CONSTRAINT pk_${state_abbrev}_${lookup_name} PRIMARY KEY (bg_id)) INHERITS(tiger.${lookup_name});" ', +'${psql} -c "ALTER TABLE ${staging_schema}.${state_abbrev}_${table_name} RENAME geoid10 TO bg_id; SELECT loader_load_staged_data(lower(''${state_abbrev}_${table_name}''), lower(''${state_abbrev}_${lookup_name}'')); " +${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');" +${psql} -c "CREATE INDEX ${data_schema}_${state_abbrev}_${lookup_name}_the_geom_gist ON ${data_schema}.${state_abbrev}_${lookup_name} USING gist(the_geom);" +${psql} -c "vacuum analyze ${data_schema}.${state_abbrev}_${lookup_name};"', ARRAY['gid']); diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2010/create_geocode.bat postgis-2.0.1/extras/tiger_geocoder/tiger_2010/create_geocode.bat --- postgis-1.5.3/extras/tiger_geocoder/tiger_2010/create_geocode.bat 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2010/create_geocode.bat 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,23 @@ +REM $Id: create_geocode.bat 9324 2012-02-27 22:08:12Z pramsey $ +set PGPORT=5432 +set PGHOST=localhost +set PGUSER=postgres +set PGPASSWORD=yourpasswordhere +set THEDB=geocoder +set PGBIN=C:\Program Files\PostgreSQL\9.0\bin +set PGCONTRIB=C:\Program Files\PostgreSQL\9.0\share\contrib +"%PGBIN%\psql" -d "%THEDB%" -f "%PGCONTRIB%\fuzzystrmatch.sql" +REM If you are using PostgreSQL 9.1 or above, use the extension syntax instead as shown below +REM "%PGBIN%\psql" -d "%THEDB%" -c "CREATE EXTENSION fuzzystrmatch" +"%PGBIN%\psql" -d "%THEDB%" -c "CREATE SCHEMA tiger" +REM unremark this next line and edit if you want the search paths set as part of the install +REM "%PGBIN%\psql" -d "%THEDB%" -c "ALTER DATABASE %THEDB% SET search_path=public, tiger;" +"%PGBIN%\psql" -d "%THEDB%" -f "tables\lookup_tables_2010.sql" +"%PGBIN%\psql" -d "%THEDB%" -c "CREATE SCHEMA tiger_data" +"%PGBIN%\psql" -d "%THEDB%" -f "tiger_loader.sql" +"%PGBIN%\psql" -d "%THEDB%" -f "census_loader.sql" +"%PGBIN%\psql" -d "%THEDB%" -c "SELECT tiger.create_census_base_tables();" +"%PGBIN%\psql" -d "%THEDB%" -f "create_geocode.sql" +"%PGBIN%\psql" -d "%THEDB%" -c "CREATE INDEX idx_tiger_addr_least_address ON addr USING btree (least_hn(fromhn,tohn));" +pause + diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2010/create_geocode.sh postgis-2.0.1/extras/tiger_geocoder/tiger_2010/create_geocode.sh --- postgis-1.5.3/extras/tiger_geocoder/tiger_2010/create_geocode.sh 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2010/create_geocode.sh 2012-06-22 05:48:34.000000000 +0000 @@ -0,0 +1,22 @@ +#!/bin/bash +# $Id: create_geocode.sh 9972 2012-06-22 05:48:34Z robe $ +PGPORT=5432 +PGHOST=localhost +PGUSER=postgres +PGPASSWORD=yourpasswordhere +THEDB=geocoder +PSQL_CMD=/usr/bin/psql +PGCONTRIB=/usr/share/postgresql/contrib +#if you are on 9.1+ use the CREATE EXTENSION syntax instead +${PSQL_CMD} -d "${THEDB}" -f "${PGCONTRIB}/fuzzystrmatch.sql" +#${PSQL_CMD} -d "${THEDB}" -c "CREATE EXTENSION fuzzystrmatch" +${PSQL_CMD} -d "${THEDB}" -c "CREATE SCHEMA tiger" +#unremark this next line and edit if you want the search paths set as part of the install +#${PSQL_CMD} -d "${THEDB}" -c "ALTER DATABASE ${THEDB} SET search_path=public, tiger;" +${PSQL_CMD} -d "${THEDB}" -f "tables/lookup_tables_2010.sql" +${PSQL_CMD} -d "${THEDB}" -c "CREATE SCHEMA tiger_data" +${PSQL_CMD} -d "${THEDB}" -f "tiger_loader.sql" +${PSQL_CMD} -d "${THEDB}" -f "census_loader.sql" +${PSQL_CMD} -d "${THEDB}" -c "SELECT tiger.create_census_base_tables();" +${PSQL_CMD} -d "${THEDB}" -f "create_geocode.sql" +${PSQL_CMD} -d "${THEDB}" -c "CREATE INDEX idx_tiger_addr_least_address ON addr USING btree (least_hn(fromhn,tohn));" \ No newline at end of file diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2010/create_geocode.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2010/create_geocode.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2010/create_geocode.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2010/create_geocode.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,78 @@ +--$Id: create_geocode.sql 9324 2012-02-27 22:08:12Z pramsey $ +-- +-- PostGIS - Spatial Types for PostgreSQL +-- http://www.postgis.org +-- +-- Copyright (C) 2010, 2011 Regina Obe and Leo Hsu +-- Copyright (C) 2008 Stephen Frost (et al) +-- reintegrated back into PostGIS code base from Steven's git (http://www.snowman.net/git/tiger_geocoder/) +-- Copyright Refractions Research +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +-- +-- +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- Tiger is where we're going to create the functions, but we need +-- the PostGIS functions/types which are in public. +SET search_path TO tiger,public; +BEGIN; +-- Type used to pass around a normalized address between functions +-- This is s bit dangerous since it could potentially drop peoples tables +-- TODO: put in logic to check if any tables have norm_addy and don't drop if they do +DROP TYPE IF EXISTS norm_addy CASCADE; +CREATE TYPE norm_addy AS ( + address INTEGER, + preDirAbbrev VARCHAR, + streetName VARCHAR, + streetTypeAbbrev VARCHAR, + postDirAbbrev VARCHAR, + internal VARCHAR, + location VARCHAR, + stateAbbrev VARCHAR, + zip VARCHAR, + parsed BOOLEAN); + +-- System/General helper functions +\i utility/utmzone.sql +\i utility/cull_null.sql +\i utility/nullable_levenshtein.sql +\i utility/levenshtein_ignore_case.sql + +---- Address normalizer +-- General helpers +\i normalize/end_soundex.sql +\i normalize/count_words.sql +\i normalize/state_extract.sql +\i normalize/get_last_words.sql +-- Location extraction/normalization helpers +\i normalize/location_extract_countysub_exact.sql +\i normalize/location_extract_countysub_fuzzy.sql +\i normalize/location_extract_place_exact.sql +\i normalize/location_extract_place_fuzzy.sql +\i normalize/location_extract.sql +-- Normalization API, called by geocode mainly. +\i normalize/normalize_address.sql +\i normalize/pprint_addy.sql + +---- Geocoder functions +-- General helpers +\i geocode/other_helper_functions.sql +\i geocode/rate_attributes.sql +\i geocode/includes_address.sql +\i geocode/interpolate_from_address.sql +-- Actual lookups/geocoder helpers +\i geocode/geocode_address.sql +\i geocode/geocode_location.sql +-- Geocode API, called by user +\i geocode/geocode_intersection.sql +\i geocode/geocode.sql + +-- Reverse Geocode API, called by user +\i geocode/reverse_geocode.sql +\i geocode/census_tracts_functions.sql +COMMIT; + +-- Tiger to PostGIS Topology +-- only useable if you have topology installed +\i topology/tiger_topology_loader.sql \ No newline at end of file diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2010/geocode/census_tracts_functions.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2010/geocode/census_tracts_functions.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2010/geocode/census_tracts_functions.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2010/geocode/census_tracts_functions.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,57 @@ +--$Id: census_tracts_functions.sql 7996 2011-10-21 12:01:12Z robe $ + /*** + * + * Copyright (C) 2012 Regina Obe and Leo Hsu (Paragon Corporation) + **/ +-- This function given a geometry try will try to determine the tract. +-- It defaults to returning the tract name but can be changed to return track geoid id. +-- pass in 'tract_id' to get the full geoid, 'name' to get the short decimal name + +CREATE OR REPLACE FUNCTION get_tract(IN loc_geom geometry, output_field text DEFAULT 'name') + RETURNS text AS +$$ +DECLARE + var_state text := NULL; + var_stusps text := NULL; + var_result text := NULL; + var_loc_geom geometry; + var_stmt text; + var_debug boolean = false; +BEGIN + --$Id: census_tracts_functions.sql 7996 2011-10-21 12:01:12Z robe $ + IF loc_geom IS NULL THEN + RETURN null; + ELSE + IF ST_SRID(loc_geom) = 4269 THEN + var_loc_geom := loc_geom; + ELSIF ST_SRID(loc_geom) > 0 THEN + var_loc_geom := ST_Transform(loc_geom, 4269); + ELSE --If srid is unknown, assume its 4269 + var_loc_geom := ST_SetSRID(loc_geom, 4269); + END IF; + IF GeometryType(var_loc_geom) != 'POINT' THEN + var_loc_geom := ST_Centroid(var_loc_geom); + END IF; + END IF; + -- Determine state tables to check + -- this is needed to take advantage of constraint exclusion + IF var_debug THEN + RAISE NOTICE 'Get matching states start: %', clock_timestamp(); + END IF; + SELECT statefp, stusps INTO var_state, var_stusps FROM state WHERE ST_Intersects(the_geom, var_loc_geom) LIMIT 1; + IF var_debug THEN + RAISE NOTICE 'Get matching states end: % - %', var_state, clock_timestamp(); + END IF; + IF var_state IS NULL THEN + -- We don't have any data for this state + RAISE NOTICE 'No data for this state'; + RETURN NULL; + END IF; + -- locate county + var_stmt := 'SELECT ' || quote_ident(output_field) || ' FROM tract WHERE statefp = $1 AND ST_Intersects(the_geom, $2) LIMIT 1;'; + EXECUTE var_stmt INTO var_result USING var_state, var_loc_geom ; + RETURN var_result; +END; +$$ + LANGUAGE plpgsql IMMUTABLE + COST 500; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2010/geocode/geocode.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2010/geocode/geocode.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2010/geocode/geocode.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2010/geocode/geocode.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,131 @@ +--$Id: geocode.sql 9324 2012-02-27 22:08:12Z pramsey $ +CREATE OR REPLACE FUNCTION geocode( + input VARCHAR, max_results integer DEFAULT 10, + restrict_geom geometry DEFAULT NULL, + OUT ADDY NORM_ADDY, + OUT GEOMOUT GEOMETRY, + OUT RATING INTEGER +) RETURNS SETOF RECORD +AS $_$ +DECLARE + rec RECORD; +BEGIN + + IF input IS NULL THEN + RETURN; + END IF; + + -- Pass the input string into the address normalizer + ADDY := normalize_address(input); + IF NOT ADDY.parsed THEN + RETURN; + END IF; + +/* FOR rec IN SELECT * FROM geocode(ADDY) + LOOP + + ADDY := rec.addy; + GEOMOUT := rec.geomout; + RATING := rec.rating; + + RETURN NEXT; + END LOOP;*/ + + RETURN QUERY SELECT g.addy, g.geomout, g.rating FROM geocode(ADDY, max_results, restrict_geom) As g ORDER BY g.rating; + +END; +$_$ LANGUAGE plpgsql STABLE; + + +CREATE OR REPLACE FUNCTION geocode( + IN_ADDY NORM_ADDY, + max_results integer DEFAULT 10, + restrict_geom geometry DEFAULT null, + OUT ADDY NORM_ADDY, + OUT GEOMOUT GEOMETRY, + OUT RATING INTEGER +) RETURNS SETOF RECORD +AS $_$ +DECLARE + rec RECORD; +BEGIN + + IF NOT IN_ADDY.parsed THEN + RETURN; + END IF; + + -- Go for the full monty if we've got enough info + IF IN_ADDY.streetName IS NOT NULL AND + (IN_ADDY.zip IS NOT NULL OR IN_ADDY.stateAbbrev IS NOT NULL) THEN + + FOR rec IN + SELECT * + FROM + (SELECT + DISTINCT ON ( + (a.addy).address, + (a.addy).predirabbrev, + (a.addy).streetname, + (a.addy).streettypeabbrev, + (a.addy).postdirabbrev, + (a.addy).internal, + (a.addy).location, + (a.addy).stateabbrev, + (a.addy).zip + ) + * + FROM + geocode_address(IN_ADDY, max_results, restrict_geom) a + ORDER BY + (a.addy).address, + (a.addy).predirabbrev, + (a.addy).streetname, + (a.addy).streettypeabbrev, + (a.addy).postdirabbrev, + (a.addy).internal, + (a.addy).location, + (a.addy).stateabbrev, + (a.addy).zip, + a.rating + ) as b + ORDER BY b.rating LIMIT max_results + LOOP + + ADDY := rec.addy; + GEOMOUT := rec.geomout; + RATING := rec.rating; + + RETURN NEXT; + + IF RATING = 0 THEN + RETURN; + END IF; + + END LOOP; + + IF RATING IS NOT NULL THEN + RETURN; + END IF; + END IF; + + -- No zip code, try state/location, need both or we'll get too much stuffs. + IF IN_ADDY.zip IS NOT NULL OR (IN_ADDY.stateAbbrev IS NOT NULL AND IN_ADDY.location IS NOT NULL) THEN + FOR rec in SELECT * FROM geocode_location(IN_ADDY, restrict_geom) As b ORDER BY b.rating LIMIT max_results + LOOP + ADDY := rec.addy; + GEOMOUT := rec.geomout; + RATING := rec.rating; + + RETURN NEXT; + IF RATING = 100 THEN + RETURN; + END IF; + END LOOP; + + END IF; + + RETURN; + +END; +$_$ LANGUAGE plpgsql STABLE + COST 1000; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2010/geocode/geocode_address.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2010/geocode/geocode_address.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2010/geocode/geocode_address.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2010/geocode/geocode_address.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,438 @@ +--$Id: geocode_address.sql 9324 2012-02-27 22:08:12Z pramsey $ +--DROP FUNCTION IF EXISTS geocode_address(norm_addy, integer , geometry); +CREATE OR REPLACE FUNCTION geocode_address(IN parsed norm_addy, max_results integer DEFAULT 10, restrict_geom geometry DEFAULT NULL, OUT addy norm_addy, OUT geomout geometry, OUT rating integer) + RETURNS SETOF record AS +$$ +DECLARE + results RECORD; + zip_info RECORD; + stmt VARCHAR; + in_statefp VARCHAR; + exact_street boolean := false; + var_debug boolean := false; + var_sql text := ''; + var_n integer := 0; + var_restrict_geom geometry := NULL; + var_bfilter text := null; + var_bestrating integer := NULL; +BEGIN + IF parsed.streetName IS NULL THEN + -- A street name must be given. Think about it. + RETURN; + END IF; + + ADDY.internal := parsed.internal; + + IF parsed.stateAbbrev IS NOT NULL THEN + in_statefp := statefp FROM state_lookup As s WHERE s.abbrev = parsed.stateAbbrev; + END IF; + + IF in_statefp IS NULL THEN + --if state is not provided or was bogus, just pick the first where the zip is present + in_statefp := statefp FROM zip_lookup_base WHERE zip = substring(parsed.zip,1,5) LIMIT 1; + END IF; + + IF restrict_geom IS NOT NULL THEN + IF ST_SRID(restrict_geom) < 1 OR ST_SRID(restrict_geom) = 4236 THEN + -- basically has no srid or if wgs84 close enough to NAD 83 -- assume same as data + var_restrict_geom = ST_SetSRID(restrict_geom,4269); + ELSE + --transform and snap + var_restrict_geom = ST_SnapToGrid(ST_Transform(restrict_geom, 4269), 0.000001); + END IF; + END IF; + var_bfilter := ' SELECT zcta5ce FROM zcta5 AS zc + WHERE zc.statefp = ' || quote_nullable(in_statefp) || ' + AND ST_Intersects(zc.the_geom, ' || quote_literal(var_restrict_geom::text) || '::geometry) ' ; + + SELECT NULL::varchar[] As zip INTO zip_info; + + IF parsed.zip IS NOT NULL THEN + -- Create an array of 5 zips containing 2 before and 2 after our target if our streetName is longer + IF length(parsed.streetName) > 7 THEN + SELECT zip_range(parsed.zip, -2, 2) As zip INTO zip_info; + ELSE + -- If our street name is short, we'll run into many false positives so reduce our zip window a bit + SELECT zip_range(parsed.zip, -1, 1) As zip INTO zip_info; + END IF; + --This signals bad zip input, only use the range if it falls in the place zip range + IF length(parsed.zip) != 5 AND parsed.location IS NOT NULL THEN + stmt := 'SELECT ARRAY(SELECT DISTINCT zip + FROM zip_lookup_base AS z + WHERE z.statefp = $1 + AND z.zip = ANY($3) AND lower(z.city) LIKE lower($2) || ''%''::text ' || COALESCE(' AND z.zip IN(' || var_bfilter || ')', '') || ')::varchar[] AS zip ORDER BY zip' ; + EXECUTE stmt INTO zip_info USING in_statefp, parsed.location, zip_info.zip; + IF var_debug THEN + RAISE NOTICE 'Bad zip newzip range: %', quote_nullable(zip_info.zip); + END IF; + IF array_upper(zip_info.zip,1) = 0 OR array_upper(zip_info.zip,1) IS NULL THEN + -- zips do not fall in city ignore them + IF var_debug THEN + RAISE NOTICE 'Ignore new zip range that is bad too: %', quote_nullable(zip_info.zip); + END IF; + zip_info.zip = NULL::varchar[]; + END IF; + END IF; + END IF; + IF zip_info.zip IS NULL THEN + -- If no good zips just include all for the location + -- We do a like instead of absolute check since tiger sometimes tacks things like Town at end of places + stmt := 'SELECT ARRAY(SELECT DISTINCT zip + FROM zip_lookup_base AS z + WHERE z.statefp = $1 + AND lower(z.city) LIKE lower($2) || ''%''::text ' || COALESCE(' AND z.zip IN(' || var_bfilter || ')', '') || ')::varchar[] AS zip ORDER BY zip' ; + EXECUTE stmt INTO zip_info USING in_statefp, parsed.location; + IF var_debug THEN + RAISE NOTICE 'Zip range based on only considering city: %', quote_nullable(zip_info.zip); + END IF; + END IF; + -- Brute force -- try to find perfect matches and exit if we have one + -- we first pull all the names in zip and rank by if zip matches input zip and streetname matches street + stmt := 'WITH a AS + ( SELECT * + FROM (SELECT f.*, ad.side, ad.zip, ad.fromhn, ad.tohn, + RANK() OVER(ORDER BY ' || CASE WHEN parsed.zip > '' THEN ' diff_zip(ad.zip,$7) + ' ELSE '' END + ||' CASE WHEN lower(f.name) = lower($2) THEN 0 ELSE levenshtein_ignore_case(f.name, lower($2) ) END + + levenshtein_ignore_case(f.fullname, lower($2 || '' '' || COALESCE($4,'''')) ) + + CASE WHEN (greatest_hn(ad.fromhn,ad.tohn) % 2)::integer = ($1 % 2)::integer THEN 0 ELSE 1 END + + CASE WHEN $1::integer BETWEEN least_hn(ad.fromhn,ad.tohn) AND greatest_hn(ad.fromhn, ad.tohn) + THEN 0 ELSE 4 END + + CASE WHEN lower($4) = lower(f.suftypabrv) OR lower($4) = lower(f.pretypabrv) THEN 0 ELSE 1 END + + rate_attributes($5, f.predirabrv,' + || ' $2, f.name , $4,' + || ' suftypabrv , $6,' + || ' sufdirabrv, prequalabr) + ) + As rank + FROM featnames As f INNER JOIN addr As ad ON (f.tlid = ad.tlid) + WHERE $10 = f.statefp AND $10 = ad.statefp + ' + || CASE WHEN length(parsed.streetName) > 5 THEN ' AND (lower(f.fullname) LIKE (COALESCE($5 || '' '','''') || lower($2) || ''%'')::text OR lower(f.name) = lower($2) OR soundex(f.name) = soundex($2) ) ' ELSE ' AND lower(f.name) = lower($2) ' END + || CASE WHEN zip_info.zip IS NOT NULL THEN ' AND ( ad.zip = ANY($9::varchar[]) ) ' ELSE '' END + || ' ) AS foo ORDER BY rank LIMIT ' || max_results*3 || ' ) + SELECT * FROM ( + SELECT DISTINCT ON (sub.predirabrv,sub.fename,COALESCE(sub.suftypabrv, sub.pretypabrv) ,sub.sufdirabrv,sub.place,s.stusps,sub.zip)' + || ' sub.predirabrv as fedirp,' + || ' sub.fename,' + || ' COALESCE(sub.suftypabrv, sub.pretypabrv) as fetype,' + || ' sub.sufdirabrv as fedirs,' + || ' sub.place ,' + || ' s.stusps as state,' + || ' sub.zip as zip,' + || ' interpolate_from_address($1, sub.fromhn,' + || ' sub.tohn, sub.the_geom, sub.side) as address_geom,' + || ' sub.sub_rating + ' + || CASE WHEN parsed.zip > '' THEN ' least(coalesce(diff_zip($7 , sub.zip),0), 10)::integer ' + ELSE '1' END::text + || ' + coalesce(levenshtein_ignore_case($3, sub.place),5)' + || ' as sub_rating,' + || ' sub.exact_address as exact_address, sub.tohn, sub.fromhn ' + || ' FROM (' + || ' SELECT tlid, predirabrv, COALESCE(b.prequalabr || '' '','''' ) || b.name As fename, suftypabrv, sufdirabrv, fromhn, tohn, + side, zip, rate_attributes($5, predirabrv,' + || ' $2, b.name , $4,' + || ' suftypabrv , $6,' + || ' sufdirabrv, prequalabr) + ' + || ' CASE ' + || ' WHEN $1::integer IS NULL OR b.fromhn IS NULL THEN 20' + || ' WHEN $1::integer >= least_hn(b.fromhn, b.tohn) ' + || ' AND $1::integer <= greatest_hn(b.fromhn,b.tohn)' + || ' AND ($1::integer % 2) = (to_number(b.fromhn,''99999999'') % 2)::integer' + || ' THEN 0' + || ' WHEN $1::integer >= least_hn(b.fromhn,b.tohn)' + || ' AND $1::integer <= greatest_hn(b.fromhn,b.tohn)' + || ' THEN 2' + || ' ELSE' + || ' ((1.0 - ' + || '(least_hn($1::text,least_hn(b.fromhn,b.tohn)::text)::numeric /' + || ' (greatest(1,greatest_hn($1::text,greatest_hn(b.fromhn,b.tohn)::text))) )' + || ') * 5)::integer + 5' + || ' END' + || ' as sub_rating,$1::integer >= least_hn(b.fromhn,b.tohn) ' + || ' AND $1::integer <= greatest_hn(b.fromhn,b.tohn) ' + || ' AND ($1 % 2)::numeric::integer = (to_number(b.fromhn,''99999999'') % 2)' + || ' as exact_address, b.name, b.prequalabr, b.pretypabrv, b.tfidr, b.tfidl, b.the_geom, b.place ' + || ' FROM + (SELECT a.tlid, a.fullname, a.name, a.predirabrv, a.suftypabrv, a.sufdirabrv, a.prequalabr, a.pretypabrv, + b.the_geom, tfidr, tfidl, + a.side , + a.fromhn, + a.tohn, + a.zip, + p.name as place + + FROM a INNER JOIN edges As b ON (a.statefp = b.statefp AND a.tlid = b.tlid ' + || ') + INNER JOIN faces AS f ON ($10 = f.statefp AND ( (b.tfidl = f.tfid AND a.side = ''L'') OR (b.tfidr = f.tfid AND a.side = ''R'' ) )) + INNER JOIN place p ON ($10 = p.statefp AND f.placefp = p.placefp ' + || CASE WHEN parsed.location > '' AND zip_info.zip IS NULL THEN ' AND ( lower(p.name) LIKE (lower($3::text) || ''%'') ) ' ELSE '' END + || ') + WHERE a.statefp = $10 AND b.statefp = $10 ' + || CASE WHEN var_restrict_geom IS NOT NULL THEN ' AND ST_Intersects(b.the_geom, $8::geometry) ' ELSE '' END + || ' + + ) As b + ORDER BY 10 , 11 DESC + LIMIT 20 + ) AS sub + JOIN state s ON ($10 = s.statefp) + ORDER BY 1,2,3,4,5,6,7,9 + LIMIT 20) As foo ORDER BY sub_rating, exact_address DESC LIMIT ' || max_results ; + + IF var_debug THEN + RAISE NOTICE 'stmt: %', + replace(replace( replace( + replace( + replace(replace( replace(replace(replace(replace(stmt, '$10', quote_nullable(in_statefp) ), '$2',quote_nullable(parsed.streetName)),'$3', + quote_nullable(parsed.location)), '$4', quote_nullable(parsed.streetTypeAbbrev) ), + '$5', quote_nullable(parsed.preDirAbbrev) ), + '$6', quote_nullable(parsed.postDirAbbrev) ), + '$7', quote_nullable(parsed.zip) ), + '$8', quote_nullable(var_restrict_geom::text) ), + '$9', quote_nullable(zip_info.zip) ), '$1', quote_nullable(parsed.address) ); + --RAISE NOTICE 'PREPARE query_base_geo(integer, varchar,varchar,varchar,varchar,varchar,varchar,geometry,varchar[]) As %', stmt; + --RAISE NOTICE 'EXECUTE query_base_geo(%,%,%,%,%,%,%,%,%); ', parsed.address,quote_nullable(parsed.streetName), quote_nullable(parsed.location), quote_nullable(parsed.streetTypeAbbrev), quote_nullable(parsed.preDirAbbrev), quote_nullable(parsed.postDirAbbrev), quote_nullable(parsed.zip), quote_nullable(var_restrict_geom::text), quote_nullable(zip_info.zip); + --RAISE NOTICE 'DEALLOCATE query_base_geo;'; + END IF; + FOR results IN EXECUTE stmt USING parsed.address,parsed.streetName, parsed.location, parsed.streetTypeAbbrev, parsed.preDirAbbrev, parsed.postDirAbbrev, parsed.zip, var_restrict_geom, zip_info.zip, in_statefp LOOP + + -- If we found a match with an exact street, then don't bother + -- trying to do non-exact matches + + exact_street := true; + + IF results.exact_address THEN + ADDY.address := parsed.address; + ELSE + ADDY.address := CASE WHEN parsed.address > to_number(results.tohn,'99999999') AND parsed.address > to_number(results.fromhn, '99999999') THEN greatest_hn(results.fromhn, results.tohn)::integer + ELSE least_hn(results.fromhn, results.tohn)::integer END ; + END IF; + + ADDY.preDirAbbrev := results.fedirp; + ADDY.streetName := results.fename; + ADDY.streetTypeAbbrev := results.fetype; + ADDY.postDirAbbrev := results.fedirs; + ADDY.location := results.place; + ADDY.stateAbbrev := results.state; + ADDY.zip := results.zip; + ADDY.parsed := TRUE; + + GEOMOUT := results.address_geom; + RATING := results.sub_rating; + var_n := var_n + 1; + + IF var_bestrating IS NULL THEN + var_bestrating := RATING; /** the first record to come is our best rating we will ever get **/ + END IF; + + -- Only consider matches with decent ratings + IF RATING < 90 THEN + RETURN NEXT; + END IF; + + -- If we get an exact match, then just return that + IF RATING = 0 THEN + RETURN; + END IF; + + IF var_n >= max_results THEN --we have exceeded our desired limit + RETURN; + END IF; + + END LOOP; + + IF var_bestrating < 30 THEN --if we already have a match with a rating of 30 or less, its unlikely we can do any better + RETURN; + END IF; + + +-- There are a couple of different things to try, from the highest preference and falling back + -- to lower-preference options. + -- We start out with zip-code matching, where the zip code could possibly be in more than one + -- state. We loop through each state its in. + -- Next, we try to find the location in our side-table, which is based off of the 'place' data exact first then sounds like + -- Next, we look up the location/city and use the zip code which is returned from that + -- Finally, if we didn't get a zip code or a city match, we fall back to just a location/street + -- lookup to try and find *something* useful. + -- In the end, we *have* to find a statefp, one way or another. + var_sql := + ' SELECT statefp,location,a.zip,exact,min(pref) FROM + (SELECT zip_state.statefp as statefp,$1 as location, true As exact, ARRAY[zip_state.zip] as zip,1 as pref + FROM zip_state WHERE zip_state.zip = $2 + AND (' || quote_nullable(in_statefp) || ' IS NULL OR zip_state.statefp = ' || quote_nullable(in_statefp) || ') + ' || COALESCE(' AND zip_state.zip IN(' || var_bfilter || ')', '') || + ' UNION SELECT zip_state_loc.statefp,zip_state_loc.place As location,false As exact, array_agg(zip_state_loc.zip) AS zip,1 + abs(COALESCE(diff_zip(max(zip), $2),0) - COALESCE(diff_zip(min(zip), $2),0)) As pref + FROM zip_state_loc + WHERE zip_state_loc.statefp = ' || quote_nullable(in_statefp) || ' + AND lower($1) = lower(zip_state_loc.place) ' || COALESCE(' AND zip_state_loc.zip IN(' || var_bfilter || ')', '') || + ' GROUP BY zip_state_loc.statefp,zip_state_loc.place + UNION SELECT zip_state_loc.statefp,zip_state_loc.place As location,false As exact, array_agg(zip_state_loc.zip),3 + FROM zip_state_loc + WHERE zip_state_loc.statefp = ' || quote_nullable(in_statefp) || ' + AND soundex($1) = soundex(zip_state_loc.place) + GROUP BY zip_state_loc.statefp,zip_state_loc.place + UNION SELECT zip_lookup_base.statefp,zip_lookup_base.city As location,false As exact, array_agg(zip_lookup_base.zip),4 + FROM zip_lookup_base + WHERE zip_lookup_base.statefp = ' || quote_nullable(in_statefp) || ' + AND (soundex($1) = soundex(zip_lookup_base.city) OR soundex($1) = soundex(zip_lookup_base.county)) + GROUP BY zip_lookup_base.statefp,zip_lookup_base.city + UNION SELECT ' || quote_nullable(in_statefp) || ' As statefp,$1 As location,false As exact,NULL, 5) as a ' + ' WHERE a.statefp IS NOT NULL + GROUP BY statefp,location,a.zip,exact, pref ORDER BY exact desc, pref, zip'; + /** FOR zip_info IN SELECT statefp,location,zip,exact,min(pref) FROM + (SELECT zip_state.statefp as statefp,parsed.location as location, true As exact, ARRAY[zip_state.zip] as zip,1 as pref + FROM zip_state WHERE zip_state.zip = parsed.zip + AND (in_statefp IS NULL OR zip_state.statefp = in_statefp) + UNION SELECT zip_state_loc.statefp,parsed.location,false As exact, array_agg(zip_state_loc.zip),2 + diff_zip(zip[1], parsed.zip) + FROM zip_state_loc + WHERE zip_state_loc.statefp = in_statefp + AND lower(parsed.location) = lower(zip_state_loc.place) + GROUP BY zip_state_loc.statefp,parsed.location + UNION SELECT zip_state_loc.statefp,parsed.location,false As exact, array_agg(zip_state_loc.zip),3 + FROM zip_state_loc + WHERE zip_state_loc.statefp = in_statefp + AND soundex(parsed.location) = soundex(zip_state_loc.place) + GROUP BY zip_state_loc.statefp,parsed.location + UNION SELECT zip_lookup_base.statefp,parsed.location,false As exact, array_agg(zip_lookup_base.zip),4 + FROM zip_lookup_base + WHERE zip_lookup_base.statefp = in_statefp + AND (soundex(parsed.location) = soundex(zip_lookup_base.city) OR soundex(parsed.location) = soundex(zip_lookup_base.county)) + GROUP BY zip_lookup_base.statefp,parsed.location + UNION SELECT in_statefp,parsed.location,false As exact,NULL, 5) as a + --JOIN (VALUES (true),(false)) as b(exact) on TRUE + WHERE statefp IS NOT NULL + GROUP BY statefp,location,zip,exact, pref ORDER BY exact desc, pref, zip **/ + FOR zip_info IN EXECUTE var_sql USING parsed.location, parsed.zip LOOP + -- For zip distance metric we consider both the distance of zip based on numeric as well aa levenshtein + -- We use the prequalabr (these are like Old, that may or may not appear in front of the street name) + -- We also treat pretypabr as fetype since in normalize we treat these as streetypes and highways usually have the type here + -- In pprint_addy we changed to put it in front if it is a is_hw type + stmt := 'SELECT DISTINCT ON (sub.predirabrv,sub.fename,COALESCE(sub.suftypabrv, sub.pretypabrv) ,sub.sufdirabrv,coalesce(p.name,zip.city,cs.name,co.name),s.stusps,sub.zip)' + || ' sub.predirabrv as fedirp,' + || ' sub.fename,' + || ' COALESCE(sub.suftypabrv, sub.pretypabrv) as fetype,' + || ' sub.sufdirabrv as fedirs,' + || ' coalesce(p.name,zip.city,cs.name,co.name)::varchar as place,' + || ' s.stusps as state,' + || ' sub.zip as zip,' + || ' interpolate_from_address($1, sub.fromhn,' + || ' sub.tohn, e.the_geom, sub.side) as address_geom,' + || ' sub.sub_rating + ' + || CASE WHEN parsed.zip > '' THEN ' least((coalesce(diff_zip($7 , sub.zip),0) *1.00/2)::integer, coalesce(levenshtein_ignore_case($7, sub.zip),0) ) ' + ELSE '3' END::text + || ' + coalesce(least(levenshtein_ignore_case($3, coalesce(p.name,zip.city,cs.name,co.name)), levenshtein_ignore_case($3, coalesce(cs.name,co.name))),5)' + || ' as sub_rating,' + || ' sub.exact_address as exact_address ' + || ' FROM (' + || ' SELECT a.tlid, predirabrv, COALESCE(a.prequalabr || '' '','''' ) || a.name As fename, suftypabrv, sufdirabrv, fromhn, tohn, + side, a.statefp, zip, rate_attributes($5, a.predirabrv,' + || ' $2, a.name , $4,' + || ' a.suftypabrv , $6,' + || ' a.sufdirabrv, a.prequalabr) + ' + || ' CASE ' + || ' WHEN $1::integer IS NULL OR b.fromhn IS NULL THEN 20' + || ' WHEN $1::integer >= least_hn(b.fromhn, b.tohn) ' + || ' AND $1::integer <= greatest_hn(b.fromhn,b.tohn)' + || ' AND ($1::integer % 2) = (to_number(b.fromhn,''99999999'') % 2)::integer' + || ' THEN 0' + || ' WHEN $1::integer >= least_hn(b.fromhn,b.tohn)' + || ' AND $1::integer <= greatest_hn(b.fromhn,b.tohn)' + || ' THEN 2' + || ' ELSE' + || ' ((1.0 - ' + || '(least_hn($1::text,least_hn(b.fromhn,b.tohn)::text)::numeric /' + || ' greatest(1,greatest_hn($1::text,greatest_hn(b.fromhn,b.tohn)::text)))' + || ') * 5)::integer + 5' + || ' END' + || ' as sub_rating,$1::integer >= least_hn(b.fromhn,b.tohn) ' + || ' AND $1::integer <= greatest_hn(b.fromhn,b.tohn) ' + || ' AND ($1 % 2)::numeric::integer = (to_number(b.fromhn,''99999999'') % 2)' + || ' as exact_address, a.name, a.prequalabr, a.pretypabrv ' + || ' FROM featnames a join addr b ON (a.tlid = b.tlid AND a.statefp = b.statefp )' + || ' WHERE' + || ' a.statefp = ' || quote_literal(zip_info.statefp) || ' AND a.mtfcc LIKE ''S%'' ' + || coalesce(' AND b.zip IN (''' || array_to_string(zip_info.zip,''',''') || ''') ','') + || CASE WHEN zip_info.exact + THEN ' AND ( lower($2) = lower(a.name) OR ( a.prequalabr > '''' AND trim(lower($2), lower(a.prequalabr) || '' '') = lower(a.name) ) OR numeric_streets_equal($2, a.name) ) ' + ELSE ' AND ( soundex($2) = soundex(a.name) OR ( (length($2) > 15 or (length($2) > 7 AND a.prequalabr > '''') ) AND lower(a.fullname) LIKE lower(substring($2,1,15)) || ''%'' ) OR numeric_streets_equal($2, a.name) ) ' + END + || ' ORDER BY 11' + || ' LIMIT 20' + || ' ) AS sub' + || ' JOIN edges e ON (' || quote_literal(zip_info.statefp) || ' = e.statefp AND sub.tlid = e.tlid AND e.mtfcc LIKE ''S%'' ' + || CASE WHEN var_restrict_geom IS NOT NULL THEN ' AND ST_Intersects(e.the_geom, $8) ' ELSE '' END || ') ' + || ' JOIN state s ON (' || quote_literal(zip_info.statefp) || ' = s.statefp)' + || ' JOIN faces f ON (' || quote_literal(zip_info.statefp) || ' = f.statefp AND (e.tfidl = f.tfid OR e.tfidr = f.tfid))' + || ' LEFT JOIN zip_lookup_base zip ON (sub.zip = zip.zip AND zip.statefp=' || quote_literal(zip_info.statefp) || ')' + || ' LEFT JOIN place p ON (' || quote_literal(zip_info.statefp) || ' = p.statefp AND f.placefp = p.placefp)' + || ' LEFT JOIN county co ON (' || quote_literal(zip_info.statefp) || ' = co.statefp AND f.countyfp = co.countyfp)' + || ' LEFT JOIN cousub cs ON (' || quote_literal(zip_info.statefp) || ' = cs.statefp AND cs.cosbidfp = sub.statefp || co.countyfp || f.cousubfp)' + || ' WHERE' + || ' ( (sub.side = ''L'' and e.tfidl = f.tfid) OR (sub.side = ''R'' and e.tfidr = f.tfid) ) ' + || ' ORDER BY 1,2,3,4,5,6,7,9' + || ' LIMIT 10' + ; + IF var_debug THEN + RAISE NOTICE '%', stmt; + RAISE NOTICE 'PREPARE query_base_geo(integer, varchar,varchar,varchar,varchar,varchar,varchar,geometry) As %', stmt; + RAISE NOTICE 'EXECUTE query_base_geo(%,%,%,%,%,%,%,%); ', parsed.address,quote_nullable(parsed.streetName), quote_nullable(parsed.location), quote_nullable(parsed.streetTypeAbbrev), quote_nullable(parsed.preDirAbbrev), quote_nullable(parsed.postDirAbbrev), quote_nullable(parsed.zip), quote_nullable(var_restrict_geom::text); + RAISE NOTICE 'DEALLOCATE query_base_geo;'; + END IF; + -- If we got an exact street match then when we hit the non-exact + -- set of tests, just drop out. + IF NOT zip_info.exact AND exact_street THEN + RETURN; + END IF; + + FOR results IN EXECUTE stmt USING parsed.address,parsed.streetName, parsed.location, parsed.streetTypeAbbrev, parsed.preDirAbbrev, parsed.postDirAbbrev, parsed.zip, var_restrict_geom LOOP + + -- If we found a match with an exact street, then don't bother + -- trying to do non-exact matches + IF zip_info.exact THEN + exact_street := true; + END IF; + + IF results.exact_address THEN + ADDY.address := parsed.address; + ELSE + ADDY.address := NULL; + END IF; + + ADDY.preDirAbbrev := results.fedirp; + ADDY.streetName := results.fename; + ADDY.streetTypeAbbrev := results.fetype; + ADDY.postDirAbbrev := results.fedirs; + ADDY.location := results.place; + ADDY.stateAbbrev := results.state; + ADDY.zip := results.zip; + ADDY.parsed := TRUE; + + GEOMOUT := results.address_geom; + RATING := results.sub_rating; + var_n := var_n + 1; + + -- If our ratings go above 99 exit because its a really bad match + IF RATING > 99 THEN + RETURN; + END IF; + + RETURN NEXT; + + -- If we get an exact match, then just return that + IF RATING = 0 THEN + RETURN; + END IF; + + END LOOP; + IF var_n > max_results THEN --we have exceeded our desired limit + RETURN; + END IF; + END LOOP; + + RETURN; +END; +$$ + LANGUAGE 'plpgsql' STABLE COST 1000 ROWS 50; +--ALTER FUNCTION geocode_address(IN norm_addy, IN integer , IN geometry) SET enable_mergejoin='off'; + + diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2010/geocode/geocode_intersection.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2010/geocode/geocode_intersection.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2010/geocode/geocode_intersection.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2010/geocode/geocode_intersection.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,148 @@ +--$Id: geocode_intersection.sql 9324 2012-02-27 22:08:12Z pramsey $ + /*** + * + * Copyright (C) 2011 Regina Obe and Leo Hsu (Paragon Corporation) + **/ +-- This function given two roadways, state and optional city, zip +-- Will return addresses that are at the intersecton of those roadways +-- The address returned will be the address on the first road way +-- Use case example an address at the intersection of 2 streets: +-- SELECT pprint_addy(addy), st_astext(geomout),rating FROM geocode_intersection('School St', 'Washington St', 'MA', 'Boston','02117'); +--DROP FUNCTION tiger.geocode_intersection(text,text,text,text,text,integer); +CREATE OR REPLACE FUNCTION geocode_intersection(IN roadway1 text, IN roadway2 text, IN in_state text, IN in_city text DEFAULT '', IN in_zip text DEFAULT '', +IN num_results integer DEFAULT 10, OUT ADDY NORM_ADDY, + OUT GEOMOUT GEOMETRY, + OUT RATING INTEGER) RETURNS SETOF record AS +$$ +DECLARE + var_na_road norm_addy; + var_na_inter1 norm_addy; + var_sql text := ''; + var_zip varchar(5)[]; + in_statefp varchar(2) ; + var_debug boolean := false; + results record; +BEGIN + IF COALESCE(roadway1,'') = '' OR COALESCE(roadway2,'') = '' THEN + -- not enough to give a result just return + RETURN ; + ELSE + var_na_road := normalize_address('0 ' || roadway1 || ', ' || COALESCE(in_city,'') || ', ' || in_state || ' ' || in_zip); + var_na_inter1 := normalize_address('0 ' || roadway2 || ', ' || COALESCE(in_city,'') || ', ' || in_state || ' ' || in_zip); + END IF; + in_statefp := statefp FROM state_lookup As s WHERE s.abbrev = upper(in_state); + IF COALESCE(in_zip,'') > '' THEN -- limit search to 2 plus or minus the input zip + var_zip := zip_range(in_zip, -2,2); + END IF; + + IF var_zip IS NULL AND in_city > '' THEN + var_zip := array_agg(zip) FROM zip_lookup_base WHERE statefp = in_statefp AND lower(city) = lower(in_city); + END IF; + + -- if we don't have a city or zip, don't bother doing the zip check, just keep as null + IF var_zip IS NULL AND in_city > '' THEN + var_zip := array_agg(zip) FROM zip_lookup_base WHERE statefp = in_statefp AND lower(city) LIKE lower(in_city) || '%' ; + END IF; + IF var_debug THEN + RAISE NOTICE 'var_zip: %, city: %', quote_nullable(var_zip), quote_nullable(in_city); + END IF; + var_sql := ' + WITH + a1 AS (SELECT f.*, addr.fromhn, addr.tohn, addr.side , addr.zip + FROM (SELECT * FROM featnames + WHERE statefp = $1 AND ( lower(name) = $2 ' || + CASE WHEN length(var_na_road.streetName) > 5 THEN ' or lower(fullname) LIKE $6 || ''%'' ' ELSE '' END || ')' + || ') AS f LEFT JOIN (SELECT * FROM addr WHERE addr.statefp = $1) As addr ON (addr.tlid = f.tlid AND addr.statefp = f.statefp) + WHERE $5::text[] IS NULL OR addr.zip = ANY($5::text[]) OR addr.zip IS NULL + ORDER BY CASE WHEN lower(f.fullname) = $6 THEN 0 ELSE 1 END + LIMIT 5000 + ), + a2 AS (SELECT f.*, addr.fromhn, addr.tohn, addr.side , addr.zip + FROM (SELECT * FROM featnames + WHERE statefp = $1 AND ( lower(name) = $4 ' || + CASE WHEN length(var_na_inter1.streetName) > 5 THEN ' or lower(fullname) LIKE $7 || ''%'' ' ELSE '' END || ')' + || ' ) AS f LEFT JOIN (SELECT * FROM addr WHERE addr.statefp = $1) AS addr ON (addr.tlid = f.tlid AND addr.statefp = f.statefp) + WHERE $5::text[] IS NULL OR addr.zip = ANY($5::text[]) or addr.zip IS NULL + ORDER BY CASE WHEN lower(f.fullname) = $7 THEN 0 ELSE 1 END + LIMIT 5000 + ), + e1 AS (SELECT e.the_geom, e.tnidf, e.tnidt, a.*, + CASE WHEN a.side = ''L'' THEN e.tfidl ELSE e.tfidr END AS tfid + FROM a1 As a + INNER JOIN edges AS e ON (e.statefp = a.statefp AND a.tlid = e.tlid) + WHERE e.statefp = $1 + ORDER BY CASE WHEN lower(a.name) = $4 THEN 0 ELSE 1 END + CASE WHEN lower(e.fullname) = $7 THEN 0 ELSE 1 END + LIMIT 1000) , + e2 AS (SELECT e.the_geom, e.tnidf, e.tnidt, a.*, + CASE WHEN a.side = ''L'' THEN e.tfidl ELSE e.tfidr END AS tfid + FROM (SELECT * FROM edges WHERE statefp = $1) AS e INNER JOIN a2 AS a ON (e.statefp = a.statefp AND a.tlid = e.tlid) + INNER JOIN e1 ON (e.statefp = e1.statefp AND ST_Intersects(e.the_geom, e1.the_geom) + AND ARRAY[e.tnidf, e.tnidt] && ARRAY[e1.tnidf, e1.tnidt] ) + + WHERE (lower(e.fullname) = $7 or lower(a.name) LIKE $4 || ''%'') + ORDER BY CASE WHEN lower(a.name) = $4 THEN 0 ELSE 1 END + CASE WHEN lower(e.fullname) = $7 THEN 0 ELSE 1 END + LIMIT 100 + ), + segs AS (SELECT DISTINCT ON(e1.tlid, e1.side) + CASE WHEN e1.tnidf = e2.tnidf OR e1.tnidf = e2.tnidt THEN + e1.fromhn + ELSE + e1.tohn END As address, e1.predirabrv As fedirp, COALESCE(e1.prequalabr || '' '','''' ) || e1.name As fename, + COALESCE(e1.suftypabrv,e1.pretypabrv) As fetype, e1.sufdirabrv AS fedirs, + p.name As place, e1.zip, + CASE WHEN e1.tnidf = e2.tnidf OR e1.tnidf = e2.tnidt THEN + ST_StartPoint(ST_GeometryN(ST_Multi(e1.the_geom),1)) + ELSE ST_EndPoint(ST_GeometryN(ST_Multi(e1.the_geom),1)) END AS geom , + CASE WHEN lower(p.name) = $3 THEN 0 ELSE 1 END + + levenshtein_ignore_case(p.name, $3) + + levenshtein_ignore_case(e1.name || COALESCE('' '' || e1.sufqualabr, ''''),$2) + + CASE WHEN e1.fullname = $6 THEN 0 ELSE levenshtein_ignore_case(e1.fullname, $6) END + + + levenshtein_ignore_case(e2.name || COALESCE('' '' || e2.sufqualabr, ''''),$4) + AS a_rating + FROM e1 + INNER JOIN e2 ON ( + ST_Intersects(e1.the_geom, e2.the_geom) ) + INNER JOIN (SELECT * FROM faces WHERE statefp = $1) As fa1 ON (e1.tfid = fa1.tfid ) + LEFT JOIN place AS p ON (fa1.placefp = p.placefp AND p.statefp = $1 ) + ORDER BY e1.tlid, e1.side, a_rating LIMIT $9*4 ) + SELECT address, fedirp , fename, fetype,fedirs,place, zip , geom, a_rating + FROM segs ORDER BY a_rating LIMIT $9'; + + IF var_debug THEN + RAISE NOTICE 'sql: %', replace(replace(replace( + replace(replace(replace( + replace( + replace( + replace(var_sql, '$1', quote_nullable(in_statefp)), + '$2', quote_nullable(lower(var_na_road.streetName) ) ), + '$3', quote_nullable(lower(in_city)) ), + '$4', quote_nullable(lower(var_na_inter1.streetName) ) ), + '$5', quote_nullable(var_zip) ), + '$6', quote_nullable(lower(var_na_road.streetName || ' ' || COALESCE(var_na_road.streetTypeAbbrev,'') )) ) , + '$7', quote_nullable(trim(lower(var_na_inter1.streetName || ' ' || COALESCE(var_na_inter1.streetTypeAbbrev,'') )) ) ) , + '$8', quote_nullable(in_state ) ), '$9', num_results::text ); + END IF; + + FOR results IN EXECUTE var_sql USING in_statefp, trim(lower(var_na_road.streetName)), lower(in_city), lower(var_na_inter1.streetName), var_zip, + trim(lower(var_na_road.streetName || ' ' || COALESCE(var_na_road.streetTypeAbbrev,''))), + trim(lower(var_na_inter1.streetName || ' ' || COALESCE(var_na_inter1.streetTypeAbbrev,''))), in_state, num_results LOOP + ADDY.preDirAbbrev := results.fedirp; + ADDY.streetName := results.fename; + ADDY.streetTypeAbbrev := results.fetype; + ADDY.postDirAbbrev := results.fedirs; + ADDY.location := results.place; + ADDY.stateAbbrev := in_state; + ADDY.zip := results.zip; + ADDY.parsed := TRUE; + ADDY.address := results.address; + + GEOMOUT := results.geom; + RATING := results.a_rating; + RETURN NEXT; + END LOOP; + RETURN; +END; +$$ + LANGUAGE plpgsql IMMUTABLE + COST 1000 + ROWS 10; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2010/geocode/geocode_location.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2010/geocode/geocode_location.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2010/geocode/geocode_location.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2010/geocode/geocode_location.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,99 @@ +--$Id: geocode_location.sql 9324 2012-02-27 22:08:12Z pramsey $ +CREATE OR REPLACE FUNCTION geocode_location( + parsed NORM_ADDY, + restrict_geom geometry DEFAULT null, + OUT ADDY NORM_ADDY, + OUT GEOMOUT GEOMETRY, + OUT RATING INTEGER +) RETURNS SETOF RECORD +AS $_$ +DECLARE + result RECORD; + in_statefp VARCHAR; + stmt VARCHAR; + var_debug boolean := false; +BEGIN + + in_statefp := statefp FROM state WHERE state.stusps = parsed.stateAbbrev; + + IF var_debug THEN + RAISE NOTICE 'geocode_location starting: %', clock_timestamp(); + END IF; + FOR result IN + SELECT + coalesce(zip.city)::varchar as place, + zip.zip as zip, + ST_Centroid(zcta5.the_geom) as address_geom, + stusps as state, + 100::integer + coalesce(levenshtein_ignore_case(coalesce(zip.city), parsed.location),0) as in_rating + FROM + zip_lookup_base zip + JOIN zcta5 ON (zip.zip = zcta5.zcta5ce AND zip.statefp = zcta5.statefp) + JOIN state ON (state.statefp=zip.statefp) + WHERE + parsed.zip = zip.zip OR + (soundex(zip.city) = soundex(parsed.location) and zip.statefp = in_statefp) + ORDER BY levenshtein_ignore_case(coalesce(zip.city), parsed.location), zip.zip + LOOP + ADDY.location := result.place; + ADDY.stateAbbrev := result.state; + ADDY.zip := result.zip; + ADDY.parsed := true; + GEOMOUT := result.address_geom; + RATING := result.in_rating; + + RETURN NEXT; + + IF RATING = 100 THEN + RETURN; + END IF; + + END LOOP; + + IF parsed.location IS NULL THEN + parsed.location := city FROM zip_lookup_base WHERE zip_lookup_base.zip = parsed.zip ORDER BY zip_lookup_base.zip LIMIT 1; + in_statefp := statefp FROM zip_lookup_base WHERE zip_lookup_base.zip = parsed.zip ORDER BY zip_lookup_base.zip LIMIT 1; + END IF; + + stmt := 'SELECT ' + || ' pl.name as place, ' + || ' state.stusps as stateAbbrev, ' + || ' ST_Centroid(pl.the_geom) as address_geom, ' + || ' 100::integer + levenshtein_ignore_case(coalesce(pl.name), ' || quote_literal(coalesce(parsed.location,'')) || ') as in_rating ' + || ' FROM (SELECT * FROM place WHERE statefp = ' || quote_literal(coalesce(in_statefp,'')) || ' ' || COALESCE(' AND ST_Intersects(' || quote_literal(restrict_geom::text) || '::geometry, the_geom)', '') || ') AS pl ' + || ' INNER JOIN state ON(pl.statefp = state.statefp)' + || ' WHERE soundex(pl.name) = soundex(' || quote_literal(coalesce(parsed.location,'')) || ') and pl.statefp = ' || quote_literal(COALESCE(in_statefp,'')) + || ' ORDER BY levenshtein_ignore_case(coalesce(pl.name), ' || quote_literal(coalesce(parsed.location,'')) || ');' + ; + + IF var_debug THEN + RAISE NOTICE 'geocode_location stmt: %', stmt; + END IF; + FOR result IN EXECUTE stmt + LOOP + + ADDY.location := result.place; + ADDY.stateAbbrev := result.stateAbbrev; + ADDY.zip = parsed.zip; + ADDY.parsed := true; + GEOMOUT := result.address_geom; + RATING := result.in_rating; + + RETURN NEXT; + + IF RATING = 100 THEN + RETURN; + IF var_debug THEN + RAISE NOTICE 'geocode_location ending hit 100 rating result: %', clock_timestamp(); + END IF; + END IF; + END LOOP; + + IF var_debug THEN + RAISE NOTICE 'geocode_location ending: %', clock_timestamp(); + END IF; + + RETURN; + +END; +$_$ LANGUAGE plpgsql STABLE COST 100; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2010/geocode/includes_address.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2010/geocode/includes_address.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2010/geocode/includes_address.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2010/geocode/includes_address.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,94 @@ +--$Id: includes_address.sql 9324 2012-02-27 22:08:12Z pramsey $ +-- This function requires the addresses to be grouped, such that the second and +-- third arguments are from one side of the street, and the fourth and fifth +-- from the other. +CREATE OR REPLACE FUNCTION includes_address( + given_address INTEGER, + addr1 INTEGER, + addr2 INTEGER, + addr3 INTEGER, + addr4 INTEGER +) RETURNS BOOLEAN +AS $_$ +DECLARE + lmaxaddr INTEGER := -1; + rmaxaddr INTEGER := -1; + lminaddr INTEGER := -1; + rminaddr INTEGER := -1; + maxaddr INTEGER := -1; + minaddr INTEGER := -1; + verbose BOOLEAN := false; +BEGIN + IF addr1 IS NOT NULL THEN + maxaddr := addr1; + minaddr := addr1; + lmaxaddr := addr1; + lminaddr := addr1; + END IF; + + IF addr2 IS NOT NULL THEN + IF addr2 < minaddr OR minaddr = -1 THEN + minaddr := addr2; + END IF; + IF addr2 > maxaddr OR maxaddr = -1 THEN + maxaddr := addr2; + END IF; + IF addr2 > lmaxaddr OR lmaxaddr = -1 THEN + lmaxaddr := addr2; + END IF; + IF addr2 < lminaddr OR lminaddr = -1 THEN + lminaddr := addr2; + END IF; + END IF; + + IF addr3 IS NOT NULL THEN + IF addr3 < minaddr OR minaddr = -1 THEN + minaddr := addr3; + END IF; + IF addr3 > maxaddr OR maxaddr = -1 THEN + maxaddr := addr3; + END IF; + rmaxaddr := addr3; + rminaddr := addr3; + END IF; + + IF addr4 IS NOT NULL THEN + IF addr4 < minaddr OR minaddr = -1 THEN + minaddr := addr4; + END IF; + IF addr4 > maxaddr OR maxaddr = -1 THEN + maxaddr := addr4; + END IF; + IF addr4 > rmaxaddr OR rmaxaddr = -1 THEN + rmaxaddr := addr4; + END IF; + IF addr4 < rminaddr OR rminaddr = -1 THEN + rminaddr := addr4; + END IF; + END IF; + + IF minaddr = -1 OR maxaddr = -1 THEN + -- No addresses were non-null, return FALSE (arbitrary) + RETURN FALSE; + ELSIF given_address >= minaddr AND given_address <= maxaddr THEN + -- The address is within the given range + IF given_address >= lminaddr AND given_address <= lmaxaddr THEN + -- This checks to see if the address is on this side of the + -- road, ie if the address is even, the street range must be even + IF (given_address % 2) = (lminaddr % 2) + OR (given_address % 2) = (lmaxaddr % 2) THEN + RETURN TRUE; + END IF; + END IF; + IF given_address >= rminaddr AND given_address <= rmaxaddr THEN + -- See above + IF (given_address % 2) = (rminaddr % 2) + OR (given_address % 2) = (rmaxaddr % 2) THEN + RETURN TRUE; + END IF; + END IF; + END IF; + -- The address is not within the range + RETURN FALSE; +END; +$_$ LANGUAGE plpgsql IMMUTABLE COST 100; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2010/geocode/interpolate_from_address.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2010/geocode/interpolate_from_address.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2010/geocode/interpolate_from_address.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2010/geocode/interpolate_from_address.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,94 @@ +-- interpolate_from_address(local_address, from_address_l, to_address_l, from_address_r, to_address_r, local_road) +-- This function returns a point along the given geometry (must be linestring) +-- corresponding to the given address. If the given address is not within +-- the address range of the road, null is returned. +-- This function requires that the address be grouped, such that the second and +-- third arguments are from one side of the street, while the fourth and +-- fifth are from the other. +-- in_side Side of street -- either 'L', 'R' or if blank ignores side of road +-- in_offset_m -- number of meters offset to the side +CREATE OR REPLACE FUNCTION interpolate_from_address(given_address INTEGER, in_addr1 VARCHAR, in_addr2 VARCHAR, in_road GEOMETRY, + in_side VARCHAR DEFAULT '',in_offset_m float DEFAULT 10) RETURNS GEOMETRY +AS $_$ +DECLARE + addrwidth INTEGER; + part DOUBLE PRECISION; + road GEOMETRY; + result GEOMETRY; + var_addr1 INTEGER; var_addr2 INTEGER; + center_pt GEOMETRY; cl_pt GEOMETRY; + npos integer; + delx float; dely float; x0 float; y0 float; x1 float; y1 float; az float; + var_dist float; dir integer; +BEGIN + IF in_road IS NULL THEN + RETURN NULL; + END IF; + + var_addr1 := to_number(in_addr1, '999999'); + var_addr2 := to_number(in_addr2, '999999'); + + IF geometrytype(in_road) = 'LINESTRING' THEN + road := ST_Transform(in_road, utmzone(ST_StartPoint(in_road)) ); + ELSIF geometrytype(in_road) = 'MULTILINESTRING' THEN + road := ST_GeometryN(in_road,1); + road := ST_Transform(road, utmzone(ST_StartPoint(road)) ); + ELSE + RETURN NULL; + END IF; + + addrwidth := greatest(var_addr1,var_addr2) - least(var_addr1,var_addr2); + IF addrwidth = 0 or addrwidth IS NULL THEN + addrwidth = 1; + END IF; + part := (given_address - least(var_addr1,var_addr2)) / trunc(addrwidth, 1); + + IF var_addr1 > var_addr2 THEN + part := 1 - part; + END IF; + + IF part < 0 OR part > 1 OR part IS NULL THEN + part := 0.5; + END IF; + + center_pt = ST_Line_Interpolate_Point(road, part); + IF in_side > '' AND in_offset_m > 0 THEN + /** Compute point the point to the in_side of the geometry **/ + /**Take into consideration non-straight so we consider azimuth + of the 2 points that straddle the center location**/ + IF part = 0 THEN + az := ST_Azimuth (ST_StartPoint(road), ST_PointN(road,2)); + ELSIF part = 1 THEN + az := ST_Azimuth (ST_PointN(road,ST_NPoints(road) - 1), ST_EndPoint(road)); + ELSE + /** Find the largest nth point position that is before the center point + This will be the start of our azimuth calc **/ + SELECT i INTO npos + FROM generate_series(1,ST_NPoints(road)) As i + WHERE part > ST_Line_Locate_Point(road,ST_PointN(road,i)) + ORDER BY i DESC; + IF npos < ST_NPoints(road) THEN + az := ST_Azimuth (ST_PointN(road,npos), ST_PointN(road, npos + 1)); + ELSE + az := ST_Azimuth (center_pt, ST_PointN(road, npos)); + END IF; + END IF; + + dir := CASE WHEN az < pi() THEN -1 ELSE 1 END; + --dir := 1; + var_dist := in_offset_m*CASE WHEN in_side = 'L' THEN -1 ELSE 1 END; + delx := ABS(COS(az)) * var_dist * dir; + dely := ABS(SIN(az)) * var_dist * dir; + IF az > pi()/2 AND az < pi() OR az > 3 * pi()/2 THEN + result := ST_Translate(center_pt, delx, dely) ; + ELSE + result := ST_Translate(center_pt, -delx, dely); + END IF; + ELSE + result := center_pt; + END IF; + result := ST_Transform(result, ST_SRID(in_road)); + --RAISE NOTICE 'start: %, center: %, new: %, side: %, offset: %, az: %', ST_AsText(ST_Transform(ST_StartPoint(road),ST_SRID(in_road))), ST_AsText(ST_Transform(center_pt,ST_SRID(in_road))),ST_AsText(result), in_side, in_offset_m, az; + RETURN result; +END; +$_$ LANGUAGE plpgsql IMMUTABLE COST 10; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2010/geocode/other_helper_functions.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2010/geocode/other_helper_functions.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2010/geocode/other_helper_functions.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2010/geocode/other_helper_functions.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,252 @@ +--$Id: other_helper_functions.sql 9324 2012-02-27 22:08:12Z pramsey $ + /*** + * + * Copyright (C) 2011 Regina Obe and Leo Hsu (Paragon Corporation) + **/ +-- Note we are wrapping this in a function so we can make it immutable and thus useable in an index +-- It also allows us to shorten and possibly better cache the repetitive pattern in the code +-- greatest(to_number(b.fromhn,''99999999''),to_number(b.tohn,''99999999'')) +-- and least(to_number(b.fromhn,''99999999''),to_number(b.tohn,''99999999'')) +CREATE OR REPLACE FUNCTION least_hn(fromhn varchar, tohn varchar) + RETURNS integer AS +$$ SELECT least(to_number( CASE WHEN trim($1) ~ '^[0-9]+$' THEN $1 ELSE '0' END,'9999999'),to_number(CASE WHEN trim($2) ~ '^[0-9]+$' THEN $2 ELSE '0' END,'9999999') )::integer; $$ + LANGUAGE sql IMMUTABLE + COST 200; + +-- Note we are wrapping this in a function so we can make it immutable (for some reason least and greatest aren't considered immutable) +-- and thu useable in an index or cacheable for multiple calls +CREATE OR REPLACE FUNCTION greatest_hn(fromhn varchar, tohn varchar) + RETURNS integer AS +$$ SELECT greatest(to_number( CASE WHEN trim($1) ~ '^[0-9]+$' THEN $1 ELSE '0' END,'99999999'),to_number(CASE WHEN trim($2) ~ '^[0-9]+$' THEN $2 ELSE '0' END,'99999999') )::integer; $$ + LANGUAGE sql IMMUTABLE + COST 200; + +-- Returns an absolute difference between two zips +-- This is generally more efficient than doing levenshtein +-- Since when people get the wrong zip, its usually off by one or 2 numeric distance +-- We only consider the first 5 digits +CREATE OR REPLACE FUNCTION diff_zip(zip1 varchar, zip2 varchar) + RETURNS integer AS +$$ SELECT abs(to_number( CASE WHEN trim(substring($1,1,5)) ~ '^[0-9]+$' THEN $1 ELSE '0' END,'99999')::integer - to_number( CASE WHEN trim(substring($2,1,5)) ~ '^[0-9]+$' THEN $2 ELSE '0' END,'99999')::integer )::integer; $$ + LANGUAGE sql IMMUTABLE STRICT + COST 200; + +-- function return true or false if 2 numeric streets are equal such as 15th St, 23rd st +-- it compares just the numeric part of the street for equality +-- PURPOSE: handle bad formats such as 23th St so 23th St = 23rd St +-- as described in: http://trac.osgeo.org/postgis/ticket/1068 +-- This will always return false if one of the streets is not a numeric street +-- By numeric it must start with numbers (allow fractions such as 1/2 and spaces such as 12 1/2th) and be less than 10 characters +CREATE OR REPLACE FUNCTION numeric_streets_equal(input_street varchar, output_street varchar) + RETURNS boolean AS +$$ + SELECT COALESCE(length($1) < 10 AND length($2) < 10 + AND $1 ~ E'^[0-9\/\s]+' AND $2 ~ E'^[0-9\/\s]+' + AND trim(substring($1, E'^[0-9\/\s]+')) = trim(substring($2, E'^[0-9\/\s]+')), false); +$$ +LANGUAGE sql IMMUTABLE +COST 5; + + +-- Generate script to drop all non-primary unique indexes on tiger and tiger_data tables +CREATE OR REPLACE FUNCTION drop_indexes_generate_script(tiger_data_schema text DEFAULT 'tiger_data') +RETURNS text AS +$$ +SELECT array_to_string(ARRAY(SELECT 'DROP INDEX ' || schemaname || '.' || indexname || ';' +FROM pg_catalog.pg_indexes where schemaname IN('tiger',$1) AND indexname NOT LIKE 'uidx%' AND indexname NOT LIKE 'pk_%' AND indexname NOT LIKE '%key'), E'\n'); +$$ +LANGUAGE sql STABLE; +-- Generate script to create missing indexes in tiger tables. +-- This will generate sql you can run to index commonly used join columns in geocoder for tiger and tiger_data schemas -- +CREATE OR REPLACE FUNCTION missing_indexes_generate_script() +RETURNS text AS +$$ +SELECT array_to_string(ARRAY( +-- create unique index on faces for tfid seems to perform better -- +SELECT 'CREATE UNIQUE INDEX uidx_' || c.table_schema || '_' || c.table_name || '_' || c.column_name || ' ON ' || c.table_schema || '.' || c.table_name || ' USING btree(' || c.column_name || ');' As index +FROM (SELECT table_name, table_schema FROM + information_schema.tables WHERE table_type = 'BASE TABLE') As t INNER JOIN + (SELECT * FROM information_schema.columns WHERE column_name IN('tfid') ) AS c + ON (t.table_name = c.table_name AND t.table_schema = c.table_schema) + LEFT JOIN pg_catalog.pg_indexes i ON + (i.tablename = c.table_name AND i.schemaname = c.table_schema + AND indexname LIKE 'uidx%' || c.column_name || '%' ) +WHERE i.tablename IS NULL AND c.table_schema IN('tiger','tiger_data') AND c.table_name LIKE '%faces' +UNION ALL +-- basic btree regular indexes +SELECT 'CREATE INDEX idx_' || c.table_schema || '_' || c.table_name || '_' || c.column_name || ' ON ' || c.table_schema || '.' || c.table_name || ' USING btree(' || c.column_name || ');' As index +FROM (SELECT table_name, table_schema FROM + information_schema.tables WHERE table_type = 'BASE TABLE') As t INNER JOIN + (SELECT * FROM information_schema.columns WHERE column_name IN('countyfp', 'tlid', 'tfidl', 'tfidr', 'tfid', 'zip', 'placefp', 'cousubfp') ) AS c + ON (t.table_name = c.table_name AND t.table_schema = c.table_schema) + LEFT JOIN pg_catalog.pg_indexes i ON + (i.tablename = c.table_name AND i.schemaname = c.table_schema + AND indexdef LIKE '%' || c.column_name || '%' ) +WHERE i.tablename IS NULL AND c.table_schema IN('tiger','tiger_data') AND (NOT c.table_name LIKE '%faces') +-- Gist spatial indexes -- +UNION ALL +SELECT 'CREATE INDEX idx_' || c.table_schema || '_' || c.table_name || '_' || c.column_name || '_gist ON ' || c.table_schema || '.' || c.table_name || ' USING gist(' || c.column_name || ');' As index +FROM (SELECT table_name, table_schema FROM + information_schema.tables WHERE table_type = 'BASE TABLE') As t INNER JOIN + (SELECT * FROM information_schema.columns WHERE column_name IN('the_geom', 'geom') ) AS c + ON (t.table_name = c.table_name AND t.table_schema = c.table_schema) + LEFT JOIN pg_catalog.pg_indexes i ON + (i.tablename = c.table_name AND i.schemaname = c.table_schema + AND indexdef LIKE '%' || c.column_name || '%') +WHERE i.tablename IS NULL AND c.table_schema IN('tiger','tiger_data') +-- Soundex indexes -- +UNION ALL +SELECT 'CREATE INDEX idx_' || c.table_schema || '_' || c.table_name || '_snd_' || c.column_name || ' ON ' || c.table_schema || '.' || c.table_name || ' USING btree(soundex(' || c.column_name || '));' As index +FROM (SELECT table_name, table_schema FROM + information_schema.tables WHERE table_type = 'BASE TABLE') As t INNER JOIN + (SELECT * FROM information_schema.columns WHERE column_name IN('name', 'place', 'city') ) AS c + ON (t.table_name = c.table_name AND t.table_schema = c.table_schema) + LEFT JOIN pg_catalog.pg_indexes i ON + (i.tablename = c.table_name AND i.schemaname = c.table_schema + AND indexdef LIKE '%soundex(%' || c.column_name || '%' AND indexdef LIKE '%_snd_' || c.column_name || '%' ) +WHERE i.tablename IS NULL AND c.table_schema IN('tiger','tiger_data') + AND (c.table_name LIKE '%county%' OR c.table_name LIKE '%featnames' + OR c.table_name LIKE '%place' or c.table_name LIKE '%zip%' or c.table_name LIKE '%cousub') +-- Lower indexes -- +UNION ALL +SELECT 'CREATE INDEX idx_' || c.table_schema || '_' || c.table_name || '_lower_' || c.column_name || ' ON ' || c.table_schema || '.' || c.table_name || ' USING btree(lower(' || c.column_name || '));' As index +FROM (SELECT table_name, table_schema FROM + information_schema.tables WHERE table_type = 'BASE TABLE') As t INNER JOIN + (SELECT * FROM information_schema.columns WHERE column_name IN('name', 'place', 'city') ) AS c + ON (t.table_name = c.table_name AND t.table_schema = c.table_schema) + LEFT JOIN pg_catalog.pg_indexes i ON + (i.tablename = c.table_name AND i.schemaname = c.table_schema + AND indexdef LIKE '%btree%(%lower(%' || c.column_name || '%') +WHERE i.tablename IS NULL AND c.table_schema IN('tiger','tiger_data') + AND (c.table_name LIKE '%county%' OR c.table_name LIKE '%featnames' OR c.table_name LIKE '%place' or c.table_name LIKE '%zip%' or c.table_name LIKE '%cousub') +-- Least address index btree least_hn(fromhn, tohn) +UNION ALL +SELECT 'CREATE INDEX idx_' || c.table_schema || '_' || c.table_name || '_least_address' || ' ON ' || c.table_schema || '.' || c.table_name || ' USING btree(least_hn(fromhn, tohn));' As index +FROM (SELECT table_name, table_schema FROM + information_schema.tables WHERE table_type = 'BASE TABLE' AND table_name LIKE '%addr' AND table_schema IN('tiger','tiger_data')) As t INNER JOIN + (SELECT * FROM information_schema.columns WHERE column_name IN('fromhn') ) AS c + ON (t.table_name = c.table_name AND t.table_schema = c.table_schema) + LEFT JOIN pg_catalog.pg_indexes i ON + (i.tablename = c.table_name AND i.schemaname = c.table_schema + AND indexdef LIKE '%least_hn(%' || c.column_name || '%') +WHERE i.tablename IS NULL +-- var_ops lower -- +UNION ALL +SELECT 'CREATE INDEX idx_' || c.table_schema || '_' || c.table_name || '_l' || c.column_name || '_var_ops' || ' ON ' || c.table_schema || '.' || c.table_name || ' USING btree(lower(' || c.column_name || ') varchar_pattern_ops);' As index +FROM (SELECT table_name, table_schema FROM + information_schema.tables WHERE table_type = 'BASE TABLE' AND (table_name LIKE '%featnames' or table_name LIKE '%place' or table_name LIKE '%zip_lookup_base' or table_name LIKE '%zip_state_loc') AND table_schema IN('tiger','tiger_data')) As t INNER JOIN + (SELECT * FROM information_schema.columns WHERE column_name IN('name', 'city', 'place', 'fullname') ) AS c + ON (t.table_name = c.table_name AND t.table_schema = c.table_schema) + LEFT JOIN pg_catalog.pg_indexes i ON + (i.tablename = c.table_name AND i.schemaname = c.table_schema + AND indexdef LIKE '%btree%(%lower%' || c.column_name || ')%varchar_pattern_ops%') +WHERE i.tablename IS NULL +-- var_ops mtfcc -- +/** UNION ALL +SELECT 'CREATE INDEX idx_' || c.table_schema || '_' || c.table_name || '_' || c.column_name || '_var_ops' || ' ON ' || c.table_schema || '.' || c.table_name || ' USING btree(' || c.column_name || ' varchar_pattern_ops);' As index +FROM (SELECT table_name, table_schema FROM + information_schema.tables WHERE table_type = 'BASE TABLE' AND (table_name LIKE '%featnames' or table_name LIKE '%edges') AND table_schema IN('tiger','tiger_data')) As t INNER JOIN + (SELECT * FROM information_schema.columns WHERE column_name IN('mtfcc') ) AS c + ON (t.table_name = c.table_name AND t.table_schema = c.table_schema) + LEFT JOIN pg_catalog.pg_indexes i ON + (i.tablename = c.table_name AND i.schemaname = c.table_schema + AND indexdef LIKE '%btree%(' || c.column_name || '%varchar_pattern_ops%') +WHERE i.tablename IS NULL **/ +-- zipl zipr on edges -- +UNION ALL +SELECT 'CREATE INDEX idx_' || c.table_schema || '_' || c.table_name || '_' || c.column_name || ' ON ' || c.table_schema || '.' || c.table_name || ' USING btree(' || c.column_name || ' );' As index +FROM (SELECT table_name, table_schema FROM + information_schema.tables WHERE table_type = 'BASE TABLE' AND table_name LIKE '%edges' AND table_schema IN('tiger','tiger_data')) As t INNER JOIN + (SELECT * FROM information_schema.columns WHERE column_name IN('zipl', 'zipr') ) AS c + ON (t.table_name = c.table_name AND t.table_schema = c.table_schema) + LEFT JOIN pg_catalog.pg_indexes i ON + (i.tablename = c.table_name AND i.schemaname = c.table_schema + AND indexdef LIKE '%btree%(' || c.column_name || '%)%') +WHERE i.tablename IS NULL + +-- unique index on tlid state county -- +/*UNION ALL +SELECT 'CREATE UNIQUE INDEX uidx_' || t.table_schema || '_' || t.table_name || '_tlid_statefp_countyfp ON ' || t.table_schema || '.' || t.table_name || ' USING btree(tlid,statefp,countyfp);' As index +FROM (SELECT table_name, table_schema FROM + information_schema.tables WHERE table_type = 'BASE TABLE' AND table_name LIKE '%edges' AND table_schema IN('tiger','tiger_data')) As t + LEFT JOIN pg_catalog.pg_indexes i ON + (i.tablename = t.table_name AND i.schemaname = t.table_schema + AND indexdef LIKE '%btree%(%tlid,%statefp%countyfp%)%') +WHERE i.tablename IS NULL*/ +--full text indexes on name field-- +/**UNION ALL +SELECT 'CREATE INDEX idx_' || c.table_schema || '_' || c.table_name || '_fullname_ft_gist' || ' ON ' || c.table_schema || '.' || c.table_name || ' USING gist(to_tsvector(''english'',fullname))' As index +FROM (SELECT table_name, table_schema FROM + information_schema.tables WHERE table_type = 'BASE TABLE' AND table_name LIKE '%featnames' AND table_schema IN('tiger','tiger_data')) As t INNER JOIN + (SELECT * FROM information_schema.columns WHERE column_name IN('fullname') ) AS c + ON (t.table_name = c.table_name AND t.table_schema = c.table_schema) + LEFT JOIN pg_catalog.pg_indexes i ON + (i.tablename = c.table_name AND i.schemaname = c.table_schema + AND indexdef LIKE '%to_tsvector(%' || c.column_name || '%') +WHERE i.tablename IS NULL **/ + +-- trigram index -- +/**UNION ALL +SELECT 'CREATE INDEX idx_' || c.table_schema || '_' || c.table_name || '_' || c.column_name || '_trgm_gist' || ' ON ' || c.table_schema || '.' || c.table_name || ' USING gist(' || c.column_name || ' gist_trgm_ops);' As index +FROM (SELECT table_name, table_schema FROM + information_schema.tables WHERE table_type = 'BASE TABLE' AND table_name LIKE '%featnames' AND table_schema IN('tiger','tiger_data')) As t INNER JOIN + (SELECT * FROM information_schema.columns WHERE column_name IN('fullname', 'name') ) AS c + ON (t.table_name = c.table_name AND t.table_schema = c.table_schema) + LEFT JOIN pg_catalog.pg_indexes i ON + (i.tablename = c.table_name AND i.schemaname = c.table_schema + AND indexdef LIKE '%gist%(' || c.column_name || '%gist_trgm_ops%') +WHERE i.tablename IS NULL **/ +ORDER BY 1), E'\r'); +$$ +LANGUAGE sql VOLATILE; + + +CREATE OR REPLACE FUNCTION install_missing_indexes() RETURNS boolean +AS +$$ +DECLARE var_sql text = missing_indexes_generate_script(); +BEGIN + EXECUTE(var_sql); + RETURN true; +END +$$ +language plpgsql; + + +CREATE OR REPLACE FUNCTION drop_dupe_featnames_generate_script() RETURNS text +AS +$$ + +SELECT array_to_string(ARRAY(SELECT 'CREATE TEMPORARY TABLE dup AS +SELECT min(f.gid) As min_gid, f.tlid, lower(f.fullname) As fname + FROM ONLY ' || t.table_schema || '.' || t.table_name || ' As f + GROUP BY f.tlid, lower(f.fullname) + HAVING count(*) > 1; + +DELETE FROM ' || t.table_schema || '.' || t.table_name || ' AS feat +WHERE EXISTS (SELECT tlid FROM dup WHERE feat.tlid = dup.tlid AND lower(feat.fullname) = dup.fname + AND feat.gid > dup.min_gid); +DROP TABLE dup; +CREATE INDEX idx_' || t.table_schema || '_' || t.table_name || '_tlid ' || ' ON ' || t.table_schema || '.' || t.table_name || ' USING btree(tlid); +' As drop_sql_create_index +FROM (SELECT table_name, table_schema FROM + information_schema.tables WHERE table_type = 'BASE TABLE' AND (table_name LIKE '%featnames' ) AND table_schema IN('tiger','tiger_data')) As t + LEFT JOIN pg_catalog.pg_indexes i ON + (i.tablename = t.table_name AND i.schemaname = t.table_schema + AND indexdef LIKE '%btree%(%tlid%') +WHERE i.tablename IS NULL) ,E'\r'); + +$$ +LANGUAGE sql VOLATILE; + +--DROP FUNCTION IF EXISTS zip_range(text,integer,integer); +-- Helper function that useful for catch slight mistakes in zip position given a 5 digit zip code +-- will return a range of zip codes that are between zip - num_before and zip - num_after +-- e.g. usage -> zip_range('02109', -1,+1) -> {'02108', '02109', '02110'} +CREATE OR REPLACE FUNCTION zip_range(zip text, range_start integer, range_end integer) RETURNS varchar[] AS +$$ + SELECT ARRAY( + SELECT lpad((to_number( CASE WHEN trim(substring($1,1,5)) ~ '^[0-9]+$' THEN $1 ELSE '0' END,'99999')::integer + i)::text, 5, '0')::varchar + FROM generate_series($2, $3) As i ); +$$ +LANGUAGE sql IMMUTABLE STRICT; \ No newline at end of file diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2010/geocode/rate_attributes.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2010/geocode/rate_attributes.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2010/geocode/rate_attributes.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2010/geocode/rate_attributes.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,80 @@ +--$Id: rate_attributes.sql 9324 2012-02-27 22:08:12Z pramsey $ +-- rate_attributes(dirpA, dirpB, streetNameA, streetNameB, streetTypeA, +-- streetTypeB, dirsA, dirsB, locationA, locationB) +-- Rates the street based on the given attributes. The locations must be +-- non-null. The other eight values are handled by the other rate_attributes +-- function, so it's requirements must also be met. +-- changed: 2010-10-18 Regina Obe - all references to verbose to var_verbose since causes compile errors in 9.0 +-- changed: 2011-06-25 revise to use real named args and fix direction rating typo +CREATE OR REPLACE FUNCTION rate_attributes(dirpA VARCHAR, dirpB VARCHAR, streetNameA VARCHAR, streetNameB VARCHAR, + streetTypeA VARCHAR, streetTypeB VARCHAR, dirsA VARCHAR, dirsB VARCHAR, locationA VARCHAR, locationB VARCHAR, prequalabr VARCHAR) RETURNS INTEGER +AS $_$ +DECLARE +--$Id: rate_attributes.sql 9324 2012-02-27 22:08:12Z pramsey $ + result INTEGER := 0; + locationWeight INTEGER := 14; + var_verbose BOOLEAN := FALSE; +BEGIN + IF locationA IS NOT NULL AND locationB IS NOT NULL THEN + result := levenshtein_ignore_case(locationA, locationB); + ELSE + IF var_verbose THEN + RAISE NOTICE 'rate_attributes() - Location names cannot be null!'; + END IF; + RETURN NULL; + END IF; + result := result + rate_attributes($1, $2, streetNameA, streetNameB, $5, $6, $7, $8,prequalabr); + RETURN result; +END; +$_$ LANGUAGE plpgsql IMMUTABLE; + +-- rate_attributes(dirpA, dirpB, streetNameA, streetNameB, streetTypeA, +-- streetTypeB, dirsA, dirsB) +-- Rates the street based on the given attributes. Only streetNames are +-- required. If any others are null (either A or B) they are treated as +-- empty strings. +CREATE OR REPLACE FUNCTION rate_attributes(dirpA VARCHAR, dirpB VARCHAR, streetNameA VARCHAR, streetNameB VARCHAR, + streetTypeA VARCHAR, streetTypeB VARCHAR, dirsA VARCHAR, dirsB VARCHAR, prequalabr VARCHAR) RETURNS INTEGER +AS $_$ +DECLARE + result INTEGER := 0; + directionWeight INTEGER := 2; + nameWeight INTEGER := 10; + typeWeight INTEGER := 5; + var_verbose BOOLEAN := false; +BEGIN + result := result + levenshtein_ignore_case(cull_null($1), cull_null($2)) * directionWeight; + IF var_verbose THEN + RAISE NOTICE 'streetNameA: %, streetNameB: %', streetNameA, streetNameB; + END IF; + IF streetNameA IS NOT NULL AND streetNameB IS NOT NULL THEN + -- We want to treat numeric streets that have numerics as equal + -- and not penalize if they are spelled different e.g. have ND instead of TH + IF NOT numeric_streets_equal(streetNameA, streetNameB) THEN + IF prequalabr IS NOT NULL THEN + -- If the reference address (streetNameB) has a prequalabr streetNameA (prequalabr) - note: streetNameB usually comes thru without prequalabr + -- and the input street (streetNameA) is lacking the prequal -- only penalize a little + result := (result + levenshtein_ignore_case( trim( trim( lower(streetNameA),lower(prequalabr) ) ), trim( trim( lower(streetNameB),lower(prequalabr) ) ) )*nameWeight*0.75 + levenshtein_ignore_case(trim(streetNameA),prequalabr || ' ' || streetNameB) * nameWeight*0.25)::integer; + ELSE + result := result + levenshtein_ignore_case(streetNameA, streetNameB) * nameWeight; + END IF; + ELSE + -- Penalize for numeric streets if one is completely numeric and the other is not + -- This is to minimize on highways like 3A being matched with numbered streets since streets are usually number followed by 2 characters e.g nth ave and highways are just number with optional letter for name + IF (streetNameB ~ E'[a-zA-Z]{2,10}' AND NOT (streetNameA ~ E'[a-zA-Z]{2,10}') ) OR (streetNameA ~ E'[a-zA-Z]{2,10}' AND NOT (streetNameB ~ E'[a-zA-Z]{2,10}') ) THEN + result := result + levenshtein_ignore_case(streetNameA, streetNameB) * nameWeight; + END IF; + END IF; + ELSE + IF var_verbose THEN + RAISE NOTICE 'rate_attributes() - Street names cannot be null!'; + END IF; + RETURN NULL; + END IF; + result := result + levenshtein_ignore_case(cull_null(streetTypeA), cull_null(streetTypeB)) * + typeWeight; + result := result + levenshtein_ignore_case(cull_null(dirsA), cull_null(dirsB)) * + directionWeight; + return result; +END; +$_$ LANGUAGE plpgsql IMMUTABLE; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2010/geocode/reverse_geocode.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2010/geocode/reverse_geocode.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2010/geocode/reverse_geocode.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2010/geocode/reverse_geocode.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,222 @@ +--$Id: reverse_geocode.sql 9324 2012-02-27 22:08:12Z pramsey $ + /*** + * + * Copyright (C) 2011 Regina Obe and Leo Hsu (Paragon Corporation) + **/ +-- This function given a point try to determine the approximate street address (norm_addy form) +-- and array of cross streets, as well as interpolated points along the streets +-- Use case example an address at the intersection of 3 streets: SELECT pprint_addy(r.addy[1]) As st1, pprint_addy(r.addy[2]) As st2, pprint_addy(r.addy[3]) As st3, array_to_string(r.street, ',') FROM reverse_geocode(ST_GeomFromText('POINT(-71.057811 42.358274)',4269)) As r; +--set search_path=tiger,public; + +CREATE OR REPLACE FUNCTION reverse_geocode(IN pt geometry, IN include_strnum_range boolean DEFAULT false, OUT intpt geometry[], OUT addy norm_addy[], OUT street character varying[]) + RETURNS record AS +$$ +DECLARE + var_redge RECORD; + var_state text := NULL; + var_stusps text := NULL; + var_countyfp text := NULL; + var_addy NORM_ADDY; + var_addy_alt NORM_ADDY; + var_nstrnum numeric(10); + var_primary_line geometry := NULL; + var_primary_dist numeric(10,2) ; + var_pt geometry; + var_place varchar; + var_county varchar; + var_stmt text; + var_debug boolean = false; + var_zip varchar := NULL; + var_primary_fullname varchar := ''; +BEGIN + --$Id: reverse_geocode.sql 9324 2012-02-27 22:08:12Z pramsey $ + IF pt IS NULL THEN + RETURN; + ELSE + IF ST_SRID(pt) = 4269 THEN + var_pt := pt; + ELSIF ST_SRID(pt) > 0 THEN + var_pt := ST_Transform(pt, 4269); + ELSE --If srid is unknown, assume its 4269 + var_pt := ST_SetSRID(pt, 4269); + END IF; + var_pt := ST_SnapToGrid(var_pt, 0.00005); /** Get rid of floating point junk that would prevent intersections **/ + END IF; + -- Determine state tables to check + -- this is needed to take advantage of constraint exclusion + IF var_debug THEN + RAISE NOTICE 'Get matching states start: %', clock_timestamp(); + END IF; + SELECT statefp, stusps INTO var_state, var_stusps FROM state WHERE ST_Intersects(the_geom, var_pt) LIMIT 1; + IF var_debug THEN + RAISE NOTICE 'Get matching states end: % - %', var_state, clock_timestamp(); + END IF; + IF var_state IS NULL THEN + -- We don't have any data for this state + RETURN; + END IF; + IF var_debug THEN + RAISE NOTICE 'Get matching counties start: %', clock_timestamp(); + END IF; + -- locate county + var_stmt := 'SELECT countyfp, name FROM county WHERE statefp = $1 AND ST_Intersects(the_geom, $2) LIMIT 1;'; + EXECUTE var_stmt INTO var_countyfp, var_county USING var_state, var_pt ; + + --locate zip + var_stmt := 'SELECT zcta5ce FROM zcta5 WHERE statefp = $1 AND ST_Intersects(the_geom, $2) LIMIT 1;'; + EXECUTE var_stmt INTO var_zip USING var_state, var_pt; + -- locate city + IF var_zip > '' THEN + var_addy.zip := var_zip ; + END IF; + + var_stmt := 'SELECT z.name FROM place As z WHERE z.statefp = $1 AND ST_Intersects(the_geom, $2) LIMIT 1;'; + EXECUTE var_stmt INTO var_place USING var_state, var_pt ; + IF var_place > '' THEN + var_addy.location := var_place; + ELSE + var_stmt := 'SELECT z.name FROM cousub As z WHERE z.statefp = $1 AND ST_Intersects(the_geom, $2) LIMIT 1;'; + EXECUTE var_stmt INTO var_place USING var_state, var_pt ; + IF var_place > '' THEN + var_addy.location := var_place; + -- ELSIF var_zip > '' THEN + -- SELECT z.city INTO var_place FROM zip_lookup_base As z WHERE z.statefp = var_state AND z.county = var_county AND z.zip = var_zip LIMIT 1; + -- var_addy.location := var_place; + END IF; + END IF; + + IF var_debug THEN + RAISE NOTICE 'Get matching counties end: % - %',var_countyfp, clock_timestamp(); + END IF; + IF var_countyfp IS NULL THEN + -- We don't have any data for this county + RETURN; + END IF; + + var_addy.stateAbbrev = var_stusps; + + -- Find the street edges that this point is closest to with tolerance of 0.005 but only consider the edge if the point is contained in the right or left face + -- Then order addresses by proximity to road + IF var_debug THEN + RAISE NOTICE 'Get matching edges start: %', clock_timestamp(); + END IF; + + var_stmt := ' + WITH ref AS ( + SELECT ' || quote_literal(var_pt::text) || '::geometry As ref_geom ) , + f AS + ( SELECT faces.* FROM faces CROSS JOIN ref + WHERE faces.statefp = ' || quote_literal(var_state) || ' AND faces.countyfp = ' || quote_literal(var_countyfp) || ' + AND ST_Intersects(faces.the_geom, ref_geom) + ), + e AS + ( SELECT edges.tlid , edges.statefp, edges.the_geom, CASE WHEN edges.tfidr = f.tfid THEN ''R'' WHEN edges.tfidl = f.tfid THEN ''L'' ELSE NULL END::varchar As eside, + ST_ClosestPoint(edges.the_geom,ref_geom) As center_pt, ref_geom + FROM edges INNER JOIN f ON (f.statefp = edges.statefp AND (edges.tfidr = f.tfid OR edges.tfidl = f.tfid)) + CROSS JOIN ref + WHERE edges.statefp = ' || quote_literal(var_state) || ' AND edges.countyfp = ' || quote_literal(var_countyfp) || ' + AND ST_DWithin(edges.the_geom, ref.ref_geom, 0.01) AND (edges.mtfcc LIKE ''S%'') --only consider streets and roads + ) , + ea AS + (SELECT e.statefp, e.tlid, a.fromhn, a.tohn, e.center_pt, ref_geom, a.zip, a.side, e.the_geom + FROM e LEFT JOIN addr As a ON (a.statefp = ' || quote_literal(var_state) || ' AND e.tlid = a.tlid and e.eside = a.side) + ) + SELECT * + FROM (SELECT DISTINCT ON(tlid,side) foo.fullname, foo.streetname, foo.streettypeabbrev, foo.zip, foo.center_pt, + side, to_number(fromhn, ''999999'') As fromhn, to_number(tohn, ''999999'') As tohn, ST_GeometryN(ST_Multi(line),1) As line, + dist + FROM + (SELECT e.tlid, e.the_geom As line, n.fullname, COALESCE(n.prequalabr || '' '','''') || n.name AS streetname, n.predirabrv, COALESCE(suftypabrv, pretypabrv) As streettypeabbrev, + n.sufdirabrv, e.zip, e.side, e.fromhn, e.tohn , e.center_pt, + ST_Distance_Sphere(ST_SetSRID(e.center_pt,4326),ST_SetSRID(ref_geom,4326)) As dist + FROM ea AS e + LEFT JOIN (SELECT featnames.* FROM featnames + WHERE featnames.statefp = ' || quote_literal(var_state) ||' ) AS n ON (n.statefp = e.statefp AND n.tlid = e.tlid) + ORDER BY dist LIMIT 50 ) As foo + ORDER BY foo.tlid, foo.side, foo.fullname ASC NULLS LAST, dist LIMIT 50) As f ORDER BY f.dist '; + + IF var_debug = true THEN + RAISE NOTICE 'Statement 1: %', var_stmt; + END IF; + + FOR var_redge IN EXECUTE var_stmt LOOP + IF var_debug THEN + RAISE NOTICE 'Start Get matching edges loop: %,%', var_primary_line, clock_timestamp(); + END IF; + IF var_primary_line IS NULL THEN --this is the first time in the loop and our primary guess + var_primary_line := var_redge.line; + var_primary_dist := var_redge.dist; + END IF; + + IF var_redge.fullname IS NOT NULL AND COALESCE(var_primary_fullname,'') = '' THEN -- this is the first non-blank name we are hitting grab info + var_primary_fullname := var_redge.fullname; + var_addy.streetname = var_redge.streetname; + var_addy.streettypeabbrev := var_redge.streettypeabbrev; + END IF; + + IF ST_Intersects(var_redge.line, var_primary_line) THEN + var_addy.streetname := var_redge.streetname; + + var_addy.streettypeabbrev := var_redge.streettypeabbrev; + var_addy.address := var_nstrnum; + IF var_redge.fromhn IS NOT NULL THEN + --interpolate the number -- note that if fromhn > tohn we will be subtracting which is what we want + var_nstrnum := (var_redge.fromhn + ST_Line_Locate_Point(var_redge.line, var_pt)*(var_redge.tohn - var_redge.fromhn))::numeric(10); + -- The odd even street number side of street rule + IF (var_nstrnum % 2) != (var_redge.tohn % 2) THEN + var_nstrnum := CASE WHEN var_nstrnum + 1 NOT BETWEEN var_redge.fromhn AND var_redge.tohn THEN var_nstrnum - 1 ELSE var_nstrnum + 1 END; + END IF; + var_addy.address := var_nstrnum; + END IF; + IF var_redge.zip > '' THEN + var_addy.zip := var_redge.zip; + ELSE + var_addy.zip := var_zip; + END IF; + -- IF var_redge.location > '' THEN + -- var_addy.location := var_redge.location; + -- ELSE + -- var_addy.location := var_place; + -- END IF; + + -- This is a cross streets - only add if not the primary adress street + IF var_redge.fullname > '' AND var_redge.fullname <> var_primary_fullname THEN + street := array_append(street, (CASE WHEN include_strnum_range THEN COALESCE(var_redge.fromhn::varchar, '')::varchar || COALESCE(' - ' || var_redge.tohn::varchar,'')::varchar || ' '::varchar ELSE '' END::varchar || COALESCE(var_redge.fullname::varchar,''))::varchar); + END IF; + + -- consider this a potential address + IF (var_redge.dist < var_primary_dist*1.1 OR var_redge.dist < 20) THEN + -- We only consider this a possible address if it is really close to our point + + intpt := array_append(intpt,var_redge.center_pt); + addy := array_append(addy, var_addy); + -- note that ramps don't have names or addresses but they connect at the edge of a range + -- so for ramps the address of connecting is still useful + + -- Determine city if zip is different from previous + + END IF; + END IF; + END LOOP; + + -- not matching roads or streets, just return basic info + IF NOT FOUND THEN + addy := array_append(addy,var_addy); + END IF; + + IF var_addy.streetname > '' AND addy[1].streetname IS NULL THEN + --there were no intersecting addresses with names, just pick the best candidate - the match is proably an offshoot of some sort + var_addy_alt := addy[1]; + var_addy_alt.streetname := var_addy.streetname; + var_addy_alt.streettypeabbrev := var_addy.streettypeabbrev; + addy[1] := var_addy_alt; + END IF; + IF var_debug THEN + RAISE NOTICE 'End Get matching edges loop: %', clock_timestamp(); + END IF; + + RETURN; +END; +$$ + LANGUAGE plpgsql STABLE + COST 1000; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2010/legacy_import/tiger2008/import_tiger_shps.sh postgis-2.0.1/extras/tiger_geocoder/tiger_2010/legacy_import/tiger2008/import_tiger_shps.sh --- postgis-1.5.3/extras/tiger_geocoder/tiger_2010/legacy_import/tiger2008/import_tiger_shps.sh 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2010/legacy_import/tiger2008/import_tiger_shps.sh 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,486 @@ +#!/bin/bash + +shopt -s nullglob + +# This is the root directory of the TIGER data. +BASE="TIGER2008" + +# This is the set base specified by Census +SETBASE="tl_2008" + +# This is the schema prefix, all schemas will be created using this prefix. +SCHEMA_PREFIX="tiger" + +# Skip Census 2000 data if there is current data? +SKIP00="false" + +# First, handle the national data +TMPDIR=`mktemp -d tiger_tmpXXXX` + +# SRID to load the data with +SRID=4269 +DEFAULT_SRID=4269 +# Host to connect to + +if [ -z "${PGHOST}" ]; then + HOST="localhost" +else + HOST=${PGHOST} +fi +# Database to use +if [ -z "${PGDATABASE}" ];then + DB="tiger" +else + DB=${PGDATABASE} +fi + +# postgres username +if [ -z ${PGUSER} ]; then + DBUSER=`whoami` +else + DBUSER=${PGUSER} +fi + +# postgres port +if [ -z ${PGPORT} ]; then + DBPORT=5432 +else + DBPORT=${PGPORT} +fi + +# rm command +RM="/bin/rm" + +# PSQL location +PSQL="psql" + +# Encoding to use +ENCODING="LATIN1" + +# If we are processing national-level data +NATIONAL="false" + +# If we are processing state-level data +STATELVL="true" + +# If we are processing a specific state +STATES='' + +# If we are processing county-level data +COUNTYLVL="true" + +# If we are processing a specific county +COUNTIES='*' + +# If we are dropping tables before loading them +DROP="false" + +# If we are dropping the schema before loading +DROP_SCHEMA="false" + +# how verbose +DEBUG='false' +QUIET='false' + +function table_from_filename () { + local FILE="$1" + TBL=`basename $FILE .shp` + TBL=`basename ${TBL} .dbf` + TBL=`echo ${TBL} | cut -d_ -f4` + +} + +function error () { + echo '' >&2 + echo "$1" >&2 + echo '' >&2 +} + +function debug () { + if [ ${DEBUG} = "true" ]; then + echo "\* $@" >&2 + fi +} +function note () { + if [ ! ${QUIET} = 'true' ]; then + echo "$@" + fi +} +function unzip_files_matching () { + local PAT=$1 + local ZIPFILES="${PAT}*.zip" + if [ -z "${ZIPFILES}" ]; then + error "$BASE/${FILEBASE}_${NATLAYERS}.zip did not match anything!" + else + for zipfile in ${ZIPFILES}; do + local BASENAME=`basename $zipfile .zip` + if [ ${SKIP00} = 'true' ]; then + echo ${BASENAME}| egrep -q '00$' + if [ $? -eq 0 ]; then + continue + fi + fi + note "Unzipping $BASENAME..." + unzip -q -d $TMPDIR $zipfile + done + fi +} + +function reproject () { + FILE="$1" + local DIRNAME=`dirname ${FILE}` + local BASE=`basename ${FILE}` + SRID="$2" + which ogr2ogr > /dev/null 2>&1 + if [ $? -ne 0 ]; then + error "ogr2ogr not found. You may not specify -r" + exit 1 + fi + NEWFILE="${DIRNAME}/${SRID}_${BASE}" + ogr2ogr \ + -overwrite -t_srs "EPSG:${SRID}" \ + -f 'ESRI Shapefile' \ + "${NEWFILE}" "${FILE}" + if [ $? -ne 0 ]; then + error "error reprojecting file ${FILE} into ${NEWFILE}" + exit 1; + fi +} + +function addcols () { + local SCHEMA=$1 + local TABLE=$2 + local FIPS=`echo ${SCHEMA} | awk -F_ '/_[0-9][0-9]$/ {print $NF}'` + + if [ -z "${FIPS}" ]; then + error "cannot find fips code for ${SCHEMA} - that is probably not good" + return 1 + fi + echo ${TABLE}| egrep -q '00$' + if [ $? -eq 0 ]; then + STATEFP='statefp00' + else + STATEFP='statefp' + fi + # add statefp where needed + ${PSQL_CMD} -t -c "\d ${SCHEMA}.${TABLE}"| egrep -q "^ +${STATEFP} " + if [ $? -eq 1 ]; then + ${PSQL_CMD_NULL} -c "ALTER TABLE ${SCHEMA}.${TABLE} ADD COLUMN ${STATEFP} varchar(2) not null DEFAULT ('${FIPS}');" + fi + # add statefp check everywhere + ${PSQL_CMD_NULL} -c "ALTER TABLE ${SCHEMA}.${TABLE} ADD CHECK (${STATEFP} = '${FIPS}');" + #${PSQL_CMD_NULL} -c "CREATE INDEX ${TABLE}_${STATEFP}_idx ON ${SCHEMA}.${TABLE} USING btree($STATEFP);" + +} + +function loadshp () { + local FILE="$1" + local TABLE="$2" + local BASESHP=`basename $FILE .shp` + local DROPTBL="" + local CMD_EXTRAS='' + local NEWFILE='' + + if [ "$DROP" = "true" ]; then + DROPTBL="-d" + fi + note Loading ${FILE} into ${SCHEMA}.${TABLE} + if [ "${DEBUG}" = 'true' ]; then + : + else + CMD_EXTRAS='' + fi + + if [ ${DEFAULT_SRID} = ${SRID} ]; then + NEWFILE=${FILE} + else + reproject "${FILE}" ${SRID} + note "using reprojected file: ${NEWFILE}" + fi + shp2pgsql \ + $DROPTBL \ + -I \ + -s $SRID \ + -W ${ENCODING} \ + "${NEWFILE}" \ + "${SCHEMA}.${TABLE}"\ + ${CMD_EXTRAS} \ + | (echo set client_min_messages=fatal\; ;cat -) \ + | ${PSQL_CMD_NULL} \ + | egrep -v '^(INSERT INTO|BEGIN;|END;)' # you really don't want to see a zillion insert statements + addcols "$SCHEMA" "$TABLE" +} + +function loaddbf () { + local FILE="$1" + local TABLE="$2" + local BASESHP=`basename $FILE .dbf` + local DROPTBL="" + if [ "$DROP" = "true" ]; then + DROPTBL="-d" + fi + note Loading ${FILE} into ${SCHEMA}.${TABLE} + shp2pgsql \ + $DROPTBL \ + -W ${ENCODING} \ + -n \ + "${FILE}" \ + "${SCHEMA}.${TABLE}" \ + | (echo set client_min_messages=fatal\; ;cat -) \ + | ${PSQL_CMD_NULL} \ + | egrep -v '^(INSERT INTO|BEGIN;|END;)' # you really don't want to see a zillion insert statements + addcols "$SCHEMA" "$TABLE" +} + +function create_schema () { + local SCHEMA="$1" + local EXT='' + if [ "${DROP_SCHEMA}" = "true" ]; then + EXT="drop schema if exists $SCHEMA cascade;" + fi + cat<&2 < /dev/null + cat<= best THEN + location := tempString; + best := rec.rating; + END IF; + + tempString := ' ' || tempString; + END LOOP; + + location := replace(location,' ',ws || '+'); + location := substring(fullStreet,'(?i)' || location || '$'); + + RETURN location; +END; +$_$ LANGUAGE plpgsql STABLE COST 100; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2010/normalize/location_extract_countysub_exact.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2010/normalize/location_extract_countysub_exact.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2010/normalize/location_extract_countysub_exact.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2010/normalize/location_extract_countysub_exact.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,56 @@ +-- location_extract_countysub_exact(string, stateAbbrev) +-- This function checks the place_lookup table to find a potential match to +-- the location described at the end of the given string. If an exact match +-- fails, a fuzzy match is performed. The location as found in the given +-- string is returned. +CREATE OR REPLACE FUNCTION location_extract_countysub_exact( + fullStreet VARCHAR, + stateAbbrev VARCHAR +) RETURNS VARCHAR +AS $_$ +DECLARE + ws VARCHAR; + location VARCHAR; + tempInt INTEGER; + lstate VARCHAR; + rec RECORD; +BEGIN + ws := E'[ ,.\n\f\t]'; + + -- No hope of determining the location from place. Try countysub. + IF stateAbbrev IS NOT NULL THEN + lstate := statefp FROM state WHERE stusps = stateAbbrev; + SELECT INTO tempInt count(*) FROM cousub + WHERE cousub.statefp = lstate + AND texticregexeq(fullStreet, '(?i)' || name || '$'); + ELSE + SELECT INTO tempInt count(*) FROM cousub + WHERE texticregexeq(fullStreet, '(?i)' || name || '$'); + END IF; + + IF tempInt > 0 THEN + IF stateAbbrev IS NOT NULL THEN + FOR rec IN SELECT substring(fullStreet, '(?i)(' + || name || ')$') AS value, name FROM cousub + WHERE cousub.statefp = lstate + AND texticregexeq(fullStreet, '(?i)' || ws || name || + '$') ORDER BY length(name) DESC LOOP + -- Only the first result is needed. + location := rec.value; + EXIT; + END LOOP; + ELSE + FOR rec IN SELECT substring(fullStreet, '(?i)(' + || name || ')$') AS value, name FROM cousub + WHERE texticregexeq(fullStreet, '(?i)' || ws || name || + '$') ORDER BY length(name) DESC LOOP + -- again, only the first is needed. + location := rec.value; + EXIT; + END LOOP; + END IF; + END IF; + + RETURN location; +END; +$_$ LANGUAGE plpgsql STABLE COST 10; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2010/normalize/location_extract_countysub_fuzzy.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2010/normalize/location_extract_countysub_fuzzy.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2010/normalize/location_extract_countysub_fuzzy.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2010/normalize/location_extract_countysub_fuzzy.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,89 @@ +-- location_extract_countysub_fuzzy(string, stateAbbrev) +-- This function checks the place_lookup table to find a potential match to +-- the location described at the end of the given string. If an exact match +-- fails, a fuzzy match is performed. The location as found in the given +-- string is returned. +CREATE OR REPLACE FUNCTION location_extract_countysub_fuzzy( + fullStreet VARCHAR, + stateAbbrev VARCHAR +) RETURNS VARCHAR +AS $_$ +DECLARE + ws VARCHAR; + tempString VARCHAR; + location VARCHAR; + tempInt INTEGER; + word_count INTEGER; + rec RECORD; + test BOOLEAN; + lstate VARCHAR; +BEGIN + ws := E'[ ,.\n\f\t]'; + + -- Fuzzy matching. + tempString := substring(fullStreet, '(?i)' || ws || + '([a-zA-Z0-9]+)$'); + IF tempString IS NULL THEN + tempString := fullStreet; + END IF; + + IF stateAbbrev IS NOT NULL THEN + lstate := statefp FROM state WHERE stusps = stateAbbrev; + SELECT INTO tempInt count(*) FROM cousub + WHERE cousub.statefp = lstate + AND soundex(tempString) = end_soundex(name); + ELSE + SELECT INTO tempInt count(*) FROM cousub + WHERE soundex(tempString) = end_soundex(name); + END IF; + + IF tempInt > 0 THEN + tempInt := 50; + -- Some potentials were found. Begin a word-by-word soundex on each. + IF stateAbbrev IS NOT NULL THEN + FOR rec IN SELECT name FROM cousub + WHERE cousub.statefp = lstate + AND soundex(tempString) = end_soundex(name) LOOP + word_count := count_words(rec.name); + test := TRUE; + tempString := get_last_words(fullStreet, word_count); + FOR i IN 1..word_count LOOP + IF soundex(split_part(tempString, ' ', i)) != + soundex(split_part(rec.name, ' ', i)) THEN + test := FALSE; + END IF; + END LOOP; + IF test THEN + -- The soundex matched, determine if the distance is better. + IF levenshtein_ignore_case(rec.name, tempString) < tempInt THEN + location := tempString; + tempInt := levenshtein_ignore_case(rec.name, tempString); + END IF; + END IF; + END LOOP; + ELSE + FOR rec IN SELECT name FROM cousub + WHERE soundex(tempString) = end_soundex(name) LOOP + word_count := count_words(rec.name); + test := TRUE; + tempString := get_last_words(fullStreet, word_count); + FOR i IN 1..word_count LOOP + IF soundex(split_part(tempString, ' ', i)) != + soundex(split_part(rec.name, ' ', i)) THEN + test := FALSE; + END IF; + END LOOP; + IF test THEN + -- The soundex matched, determine if the distance is better. + IF levenshtein_ignore_case(rec.name, tempString) < tempInt THEN + location := tempString; + tempInt := levenshtein_ignore_case(rec.name, tempString); + END IF; + END IF; + END LOOP; + END IF; + END IF; -- If no fuzzys were found, leave location null. + + RETURN location; +END; +$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2010/normalize/location_extract_place_exact.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2010/normalize/location_extract_place_exact.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2010/normalize/location_extract_place_exact.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2010/normalize/location_extract_place_exact.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,62 @@ +--$Id: location_extract_place_exact.sql 9324 2012-02-27 22:08:12Z pramsey $- +-- location_extract_place_exact(string, stateAbbrev) +-- This function checks the place_lookup table to find a potential match to +-- the location described at the end of the given string. If an exact match +-- fails, a fuzzy match is performed. The location as found in the given +-- string is returned. +CREATE OR REPLACE FUNCTION location_extract_place_exact( + fullStreet VARCHAR, + stateAbbrev VARCHAR +) RETURNS VARCHAR +AS $_$ +DECLARE + ws VARCHAR; + location VARCHAR; + tempInt INTEGER; + lstate VARCHAR; + rec RECORD; +BEGIN +--$Id: location_extract_place_exact.sql 9324 2012-02-27 22:08:12Z pramsey $- + ws := E'[ ,.\n\f\t]'; + + -- Try for an exact match against places + IF stateAbbrev IS NOT NULL THEN + lstate := statefp FROM state WHERE stusps = stateAbbrev; + SELECT INTO tempInt count(*) FROM place + WHERE place.statefp = lstate AND fullStreet ILIKE '%' || name || '%' + AND texticregexeq(fullStreet, '(?i)' || name || '$'); + ELSE + SELECT INTO tempInt count(*) FROM place + WHERE fullStreet ILIKE '%' || name || '%' AND + texticregexeq(fullStreet, '(?i)' || name || '$'); + END IF; + + IF tempInt > 0 THEN + -- Some matches were found. Look for the last one in the string. + IF stateAbbrev IS NOT NULL THEN + FOR rec IN SELECT substring(fullStreet, '(?i)(' + || name || ')$') AS value, name FROM place + WHERE place.statefp = lstate AND fullStreet ILIKE '%' || name || '%' + AND texticregexeq(fullStreet, '(?i)' + || name || '$') ORDER BY length(name) DESC LOOP + -- Since the regex is end of string, only the longest (first) result + -- is useful. + location := rec.value; + EXIT; + END LOOP; + ELSE + FOR rec IN SELECT substring(fullStreet, '(?i)(' + || name || ')$') AS value, name FROM place + WHERE fullStreet ILIKE '%' || name || '%' AND texticregexeq(fullStreet, '(?i)' + || name || '$') ORDER BY length(name) DESC LOOP + -- Since the regex is end of string, only the longest (first) result + -- is useful. + location := rec.value; + EXIT; + END LOOP; + END IF; + END IF; + + RETURN location; +END; +$_$ LANGUAGE plpgsql STABLE COST 100; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2010/normalize/location_extract_place_fuzzy.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2010/normalize/location_extract_place_fuzzy.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2010/normalize/location_extract_place_fuzzy.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2010/normalize/location_extract_place_fuzzy.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,90 @@ +--$Id: location_extract_place_fuzzy.sql 9324 2012-02-27 22:08:12Z pramsey $- +-- location_extract_place_fuzzy(string, stateAbbrev) +-- This function checks the place_lookup table to find a potential match to +-- the location described at the end of the given string. If an exact match +-- fails, a fuzzy match is performed. The location as found in the given +-- string is returned. +CREATE OR REPLACE FUNCTION location_extract_place_fuzzy( + fullStreet VARCHAR, + stateAbbrev VARCHAR +) RETURNS VARCHAR +AS $_$ +DECLARE + ws VARCHAR; + tempString VARCHAR; + location VARCHAR; + tempInt INTEGER; + word_count INTEGER; + rec RECORD; + test BOOLEAN; + lstate VARCHAR; +BEGIN +--$Id: location_extract_place_fuzzy.sql 9324 2012-02-27 22:08:12Z pramsey $- + ws := E'[ ,.\n\f\t]'; + + tempString := substring(fullStreet, '(?i)' || ws + || '([a-zA-Z0-9]+)$'); + IF tempString IS NULL THEN + tempString := fullStreet; + END IF; + + IF stateAbbrev IS NOT NULL THEN + lstate := statefp FROM state WHERE stusps = stateAbbrev; + SELECT into tempInt count(*) FROM place + WHERE place.statefp = lstate + AND soundex(tempString) = end_soundex(name); + ELSE + SELECT into tempInt count(*) FROM place + WHERE soundex(tempString) = end_soundex(name); + END IF; + + IF tempInt > 0 THEN + -- Some potentials were found. Begin a word-by-word soundex on each. + tempInt := 50; + IF stateAbbrev IS NOT NULL THEN + FOR rec IN SELECT name FROM place + WHERE place.statefp = lstate + AND soundex(tempString) = end_soundex(name) LOOP + word_count := count_words(rec.name); + test := TRUE; + tempString := get_last_words(fullStreet, word_count); + FOR i IN 1..word_count LOOP + IF soundex(split_part(tempString, ' ', i)) != + soundex(split_part(rec.name, ' ', i)) THEN + test := FALSE; + END IF; + END LOOP; + IF test THEN + -- The soundex matched, determine if the distance is better. + IF levenshtein_ignore_case(rec.name, tempString) < tempInt THEN + location := tempString; + tempInt := levenshtein_ignore_case(rec.name, tempString); + END IF; + END IF; + END LOOP; + ELSE + FOR rec IN SELECT name FROM place + WHERE soundex(tempString) = end_soundex(name) LOOP + word_count := count_words(rec.name); + test := TRUE; + tempString := get_last_words(fullStreet, word_count); + FOR i IN 1..word_count LOOP + IF soundex(split_part(tempString, ' ', i)) != + soundex(split_part(rec.name, ' ', i)) THEN + test := FALSE; + END IF; + END LOOP; + IF test THEN + -- The soundex matched, determine if the distance is better. + IF levenshtein_ignore_case(rec.name, tempString) < tempInt THEN + location := tempString; + tempInt := levenshtein_ignore_case(rec.name, tempString); + END IF; + END IF; + END LOOP; + END IF; + END IF; + + RETURN location; +END; +$_$ LANGUAGE plpgsql STABLE; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2010/normalize/normalize_address.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2010/normalize/normalize_address.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2010/normalize/normalize_address.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2010/normalize/normalize_address.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,708 @@ +--$Id: normalize_address.sql 9324 2012-02-27 22:08:12Z pramsey $- +-- normalize_address(addressString) +-- This takes an address string and parses it into address (internal/street) +-- street name, type, direction prefix and suffix, location, state and +-- zip code, depending on what can be found in the string. +-- +-- The US postal address standard is used: +-- +-- +-- +-- State is assumed to be included in the string, and MUST be matchable to +-- something in the state_lookup table. Fuzzy matching is used if no direct +-- match is found. +-- +-- Two formats of zip code are acceptable: five digit, and five + 4. +-- +-- The internal addressing indicators are looked up from the +-- secondary_unit_lookup table. A following identifier is accepted +-- but it must start with a digit. +-- +-- The location is parsed from the string using other indicators, such +-- as street type, direction suffix or internal address, if available. +-- If these are not, the location is extracted using comparisons against +-- the places_lookup table, then the countysub_lookup table to determine +-- what, in the original string, is intended to be the location. In both +-- cases, an exact match is first pursued, then a word-by-word fuzzy match. +-- The result is not the name of the location from the tables, but the +-- section of the given string that corresponds to the name from the tables. +-- +-- Zip codes and street names are not validated. +-- +-- Direction indicators are extracted by comparison with the direction_lookup +-- table. +-- +-- Street addresses are assumed to be a single word, starting with a number. +-- Address is manditory; if no address is given, and the street is numbered, +-- the resulting address will be the street name, and the street name +-- will be an empty string. +-- +-- In some cases, the street type is part of the street name. +-- eg State Hwy 22a. As long as the word following the type starts with a +-- number (this is usually the case) this will be caught. Some street names +-- include a type name, and have a street type that differs. This will be +-- handled properly, so long as both are given. If the street type is +-- omitted, the street names included type will be parsed as the street type. +-- +-- The output is currently a colon seperated list of values: +-- InternalAddress:StreetAddress:DirectionPrefix:StreetName:StreetType: +-- DirectionSuffix:Location:State:ZipCode +-- This returns each element as entered. It's mainly meant for debugging. +-- There is also another option that returns: +-- StreetAddress:DirectionPrefixAbbreviation:StreetName:StreetTypeAbbreviation: +-- DirectionSuffixAbbreviation:Location:StateAbbreviation:ZipCode +-- This is more standardized and better for use with a geocoder. +CREATE OR REPLACE FUNCTION normalize_address(in_rawinput character varying) + RETURNS norm_addy AS +$$ +DECLARE + debug_flag boolean := false; + result norm_addy; + addressString VARCHAR; + zipString VARCHAR; + preDir VARCHAR; + postDir VARCHAR; + fullStreet VARCHAR; + reducedStreet VARCHAR; + streetType VARCHAR; + state VARCHAR; + tempString VARCHAR; + tempInt INTEGER; + rec RECORD; + ws VARCHAR; + rawInput VARCHAR; + -- is this a highway + -- (we treat these differently since the road name often comes after the streetType) + isHighway boolean := false; +BEGIN +--$Id: normalize_address.sql 9324 2012-02-27 22:08:12Z pramsey $- + result.parsed := FALSE; + + rawInput := trim(in_rawInput); + + IF rawInput IS NULL THEN + RETURN result; + END IF; + + ws := E'[ ,.\t\n\f\r]'; + + IF debug_flag THEN + raise notice '% input: %', clock_timestamp(), rawInput; + END IF; + + -- Assume that the address begins with a digit, and extract it from + -- the input string. + addressString := substring(rawInput from E'^([0-9].*?)[ ,/.]'); + + IF debug_flag THEN + raise notice '% addressString: %', clock_timestamp(), addressString; + END IF; + + -- There are two formats for zip code, the normal 5 digit , and + -- the nine digit zip-4. It may also not exist. + + zipString := substring(rawInput from ws || E'([0-9]{5})$'); + IF zipString IS NULL THEN + -- Check if the zip is just a partial or a one with -s + -- or one that just has more than 5 digits + zipString := COALESCE(substring(rawInput from ws || '([0-9]{5})-[0-9]{0,4}$'), + substring(rawInput from ws || '([0-9]{2,5})$'), + substring(rawInput from ws || '([0-9]{6,14})$')); + + -- Check if all we got was a zipcode, of either form + IF zipString IS NULL THEN + zipString := substring(rawInput from '^([0-9]{5})$'); + IF zipString IS NULL THEN + zipString := substring(rawInput from '^([0-9]{5})-[0-9]{4}$'); + END IF; + -- If it was only a zipcode, then just return it. + IF zipString IS NOT NULL THEN + result.zip := zipString; + result.parsed := TRUE; + RETURN result; + END IF; + END IF; + END IF; + + IF debug_flag THEN + raise notice '% zipString: %', clock_timestamp(), zipString; + END IF; + + IF zipString IS NOT NULL THEN + fullStreet := substring(rawInput from '(.*)' + || ws || '+' || cull_null(zipString) || '[- ]?([0-9]{4})?$'); + /** strip off any trailing spaces or ,**/ + fullStreet := btrim(fullStreet, ' ,'); + + ELSE + fullStreet := rawInput; + END IF; + + IF debug_flag THEN + raise notice '% fullStreet: %', clock_timestamp(), fullStreet; + END IF; + + -- FIXME: state_extract should probably be returning a record so we can + -- avoid having to parse the result from it. + tempString := state_extract(fullStreet); + IF tempString IS NOT NULL THEN + state := split_part(tempString, ':', 1); + result.stateAbbrev := split_part(tempString, ':', 2); + END IF; + + IF debug_flag THEN + raise notice '% stateAbbrev: %', clock_timestamp(), result.stateAbbrev; + END IF; + + -- The easiest case is if the address is comma delimited. There are some + -- likely cases: + -- street level, location, state + -- street level, location state + -- street level, location + -- street level, internal address, location, state + -- street level, internal address, location state + -- street level, internal address location state + -- street level, internal address, location + -- street level, internal address location + -- The first three are useful. + + tempString := substring(fullStreet, '(?i),' || ws || '+(.*?)(,?' || ws || + '*' || cull_null(state) || '$)'); + IF tempString = '' THEN tempString := NULL; END IF; + IF tempString IS NOT NULL THEN + IF tempString LIKE '%,%' THEN -- if it has a comma probably has suite, strip it from location + result.location := trim(split_part(tempString,',',2)); + ELSE + result.location := tempString; + END IF; + IF addressString IS NOT NULL THEN + fullStreet := substring(fullStreet, '(?i)' || addressString || ws || + '+(.*),' || ws || '+' || result.location); + ELSE + fullStreet := substring(fullStreet, '(?i)(.*),' || ws || '+' || + result.location); + END IF; + END IF; + + IF debug_flag THEN + raise notice '% fullStreet: %', clock_timestamp(), fullStreet; + raise notice '% location: %', clock_timestamp(), result.location; + END IF; + + -- Pull out the full street information, defined as everything between the + -- address and the state. This includes the location. + -- This doesnt need to be done if location has already been found. + IF result.location IS NULL THEN + IF addressString IS NOT NULL THEN + IF state IS NOT NULL THEN + fullStreet := substring(fullStreet, '(?i)' || addressString || + ws || '+(.*?)' || ws || '+' || state); + ELSE + fullStreet := substring(fullStreet, '(?i)' || addressString || + ws || '+(.*?)'); + END IF; + ELSE + IF state IS NOT NULL THEN + fullStreet := substring(fullStreet, '(?i)(.*?)' || ws || + '+' || state); + ELSE + fullStreet := substring(fullStreet, '(?i)(.*?)'); + END IF; + END IF; + + IF debug_flag THEN + raise notice '% fullStreet: %', clock_timestamp(),fullStreet; + END IF; + + IF debug_flag THEN + raise notice '% start location extract', clock_timestamp(); + END IF; + result.location := location_extract(fullStreet, result.stateAbbrev); + + IF debug_flag THEN + raise notice '% end location extract', clock_timestamp(); + END IF; + + -- A location can't be a street type, sorry. + IF lower(result.location) IN (SELECT lower(name) FROM street_type_lookup) THEN + result.location := NULL; + END IF; + + -- If the location was found, remove it from fullStreet + IF result.location IS NOT NULL THEN + fullStreet := substring(fullStreet, '(?i)(.*)' || ws || '+' || + result.location); + END IF; + END IF; + + IF debug_flag THEN + raise notice 'fullStreet: %', fullStreet; + raise notice 'location: %', result.location; + END IF; + + -- Determine if any internal address is included, such as apartment + -- or suite number. + -- this count is surprisingly slow by itself but much faster if you add an ILIKE AND clause + SELECT INTO tempInt count(*) FROM secondary_unit_lookup + WHERE fullStreet ILIKE '%' || name || '%' AND texticregexeq(fullStreet, '(?i)' || ws || name || '(' + || ws || '|$)'); + IF tempInt = 1 THEN + result.internal := substring(fullStreet, '(?i)' || ws || '(' + || name || ws || '*#?' || ws + || '*(?:[0-9][-0-9a-zA-Z]*)?' || ')(?:' || ws || '|$)') + FROM secondary_unit_lookup + WHERE fullStreet ILIKE '%' || name || '%' AND texticregexeq(fullStreet, '(?i)' || ws || name || '(' + || ws || '|$)'); + ELSIF tempInt > 1 THEN + -- In the event of multiple matches to a secondary unit designation, we + -- will assume that the last one is the true one. + tempInt := 0; + FOR rec in SELECT trim(substring(fullStreet, '(?i)' || ws || '(' + || name || '(?:' || ws || '*#?' || ws + || '*(?:[0-9][-0-9a-zA-Z]*)?)' || ws || '?|$)')) as value + FROM secondary_unit_lookup + WHERE fullStreet ILIKE '%' || name || '%' AND texticregexeq(fullStreet, '(?i)' || ws || name || '(' + || ws || '|$)') LOOP + IF tempInt < position(rec.value in fullStreet) THEN + tempInt := position(rec.value in fullStreet); + result.internal := rec.value; + END IF; + END LOOP; + END IF; + + IF debug_flag THEN + raise notice 'internal: %', result.internal; + END IF; + + IF result.location IS NULL THEN + -- If the internal address is given, the location is everything after it. + result.location := trim(substring(fullStreet, result.internal || ws || '+(.*)$')); + END IF; + + IF debug_flag THEN + raise notice 'location: %', result.location; + END IF; + + -- Pull potential street types from the full street information + -- this count is surprisingly slow by itself but much faster if you add an ILIKE AND clause + -- difference of 98ms vs 16 ms for example + -- Put a space in front to make regex easier can always count on it starting with space + -- Reject all street types where the fullstreet name is equal to the name + fullStreet := ' ' || trim(fullStreet); + tempInt := count(*) FROM street_type_lookup + WHERE fullStreet ILIKE '%' || name || '%' AND + trim(upper(fullStreet)) != name AND + texticregexeq(fullStreet, '(?i)' || ws || '(' || name + || ')(?:' || ws || '|$)'); + IF tempInt = 1 THEN + SELECT INTO rec abbrev, substring(fullStreet, '(?i)' || ws || '(' + || name || ')(?:' || ws || '|$)') AS given, is_hw FROM street_type_lookup + WHERE fullStreet ILIKE '%' || name || '%' AND + trim(upper(fullStreet)) != name AND + texticregexeq(fullStreet, '(?i)' || ws || '(' || name + || ')(?:' || ws || '|$)') ; + streetType := rec.given; + result.streetTypeAbbrev := rec.abbrev; + isHighway := rec.is_hw; + IF debug_flag THEN + RAISE NOTICE 'street Type: %, street Type abbrev: %', rec.given, rec.abbrev; + END IF; + ELSIF tempInt > 1 THEN + tempInt := 0; + -- the last matching abbrev in the string is the most likely one + FOR rec IN SELECT * FROM + (SELECT abbrev, name, substring(fullStreet, '(?i)' || ws || '?(' + || name || ')(?:' || ws || '|$)') AS given, is_hw , + RANK() OVER( ORDER BY position(name IN upper(trim(fullStreet))) ) As n_start, + RANK() OVER( ORDER BY position(name IN upper(trim(fullStreet))) + length(name) ) As n_end, + COUNT(*) OVER() As nrecs, position(name IN upper(trim(fullStreet))) + FROM street_type_lookup + WHERE fullStreet ILIKE '%' || name || '%' AND + trim(upper(fullStreet)) != name AND + (texticregexeq(fullStreet, '(?i)' || ws || '(' || name + -- we only consider street types that are regular and not at beginning of name or are highways (since those can be at beg or end) + -- we take the one that is the longest e.g Country Road would be more correct than Road + || ')(?:' || ws || '|$)') OR (is_hw AND fullstreet ILIKE name || ' %') ) + AND ((NOT is_hw AND position(name IN upper(trim(fullStreet))) > 1 OR is_hw) ) + ) As foo + -- N_start - N_end - ensure we first get the one with the most overlapping sub types + -- Then of those get the one that ends last and then starts first + ORDER BY n_start - n_end, n_end DESC, n_start LIMIT 1 LOOP + -- If we have found an internal address, make sure the type + -- precedes it. + /** TODO: I don't think we need a loop anymore since we are just returning one and the one in the last position + * I'll leave for now though **/ + IF result.internal IS NOT NULL THEN + IF position(rec.given IN fullStreet) < position(result.internal IN fullStreet) THEN + IF tempInt < position(rec.given IN fullStreet) THEN + streetType := rec.given; + result.streetTypeAbbrev := rec.abbrev; + isHighway := rec.is_hw; + tempInt := position(rec.given IN fullStreet); + END IF; + END IF; + ELSIF tempInt < position(rec.given IN fullStreet) THEN + streetType := rec.given; + result.streetTypeAbbrev := rec.abbrev; + isHighway := rec.is_hw; + tempInt := position(rec.given IN fullStreet); + IF debug_flag THEN + RAISE NOTICE 'street Type: %, street Type abbrev: %', rec.given, rec.abbrev; + END IF; + END IF; + END LOOP; + END IF; + + IF debug_flag THEN + raise notice '% streetTypeAbbrev: %', clock_timestamp(), result.streetTypeAbbrev; + END IF; + + -- There is a little more processing required now. If the word after the + -- street type begins with a number, then its most likely a highway like State Route 225a. If + -- In Tiger 2010+ the reduced Street name just has the number + -- the next word starts with a char, then everything after the street type + -- will be considered location. If there is no street type, then I'm sad. + IF streetType IS NOT NULL THEN + -- Check if the fullStreet contains the streetType and ends in just numbers + -- If it does its a road number like a country road or state route or other highway + -- Just set the number to be the name of street + + tempString := NULL; + IF isHighway THEN + tempString := substring(fullStreet, streetType || ws || '+' || E'([0-9a-zA-Z]+)' || ws || '*'); + END IF; + IF tempString > '' AND result.location IS NOT NULL THEN + reducedStreet := tempString; + result.streetName := reducedStreet; + IF debug_flag THEN + RAISE NOTICE 'reduced Street: %', result.streetName; + END IF; + -- the post direction might be portion of fullStreet after reducedStreet and type + -- reducedStreet: 24 fullStreet: Country Road 24, N or fullStreet: Country Road 24 N + tempString := regexp_replace(fullStreet, streetType || ws || '+' || reducedStreet,''); + IF tempString > '' THEN + IF debug_flag THEN + RAISE NOTICE 'remove reduced street: % + streetType: % from fullstreet: %', reducedStreet, streetType, fullStreet; + END IF; + tempString := abbrev FROM direction_lookup WHERE + tempString ILIKE '%' || name || '%' AND texticregexeq(reducedStreet || ws || '+' || streetType, '(?i)(' || name || ')' || ws || '+|$') + ORDER BY length(name) DESC LIMIT 1; + IF tempString IS NOT NULL THEN + result.postDirAbbrev = trim(tempString); + IF debug_flag THEN + RAISE NOTICE 'postDirAbbre of highway: %', result.postDirAbbrev; + END IF; + END IF; + END IF; + ELSE + tempString := substring(fullStreet, streetType || ws || + E'+([0-9][^ ,.\t\r\n\f]*?)' || ws); + IF tempString IS NOT NULL THEN + IF result.location IS NULL THEN + result.location := substring(fullStreet, streetType || ws || '+' + || tempString || ws || '+(.*)$'); + END IF; + reducedStreet := substring(fullStreet, '(.*)' || ws || '+' + || result.location || '$'); + streetType := NULL; + result.streetTypeAbbrev := NULL; + ELSE + IF result.location IS NULL THEN + result.location := substring(fullStreet, streetType || ws || '+(.*)$'); + END IF; + reducedStreet := substring(fullStreet, '^(.*)' || ws || '+' + || streetType); + IF COALESCE(trim(reducedStreet),'') = '' THEN --reduced street can't be blank + reducedStreet := fullStreet; + streetType := NULL; + result.streetTypeAbbrev := NULL; + END IF; + END IF; + -- the post direction might be portion of fullStreet after reducedStreet + -- reducedStreet: Main fullStreet: Main St, N or fullStreet: Main St N + tempString := trim(regexp_replace(fullStreet, reducedStreet || ws || '+' || streetType,'')); + IF tempString > '' THEN + tempString := abbrev FROM direction_lookup WHERE + tempString ILIKE '%' || name || '%' + AND texticregexeq(fullStreet || ' ', '(?i)' || reducedStreet || ws || '+' || streetType || ws || '+(' || name || ')' || ws || '+') + ORDER BY length(name) DESC LIMIT 1; + IF tempString IS NOT NULL THEN + result.postDirAbbrev = trim(tempString); + END IF; + END IF; + + + IF debug_flag THEN + raise notice '% reduced street: %', clock_timestamp(), reducedStreet; + END IF; + + -- The pre direction should be at the beginning of the fullStreet string. + -- The post direction should be at the beginning of the location string + -- if there is no internal address + reducedStreet := trim(reducedStreet); + tempString := trim(regexp_replace(fullStreet, ws || '+' || reducedStreet || ws || '+','')); + IF tempString > '' THEN + tempString := substring(reducedStreet, '(?i)(^' || name + || ')' || ws) FROM direction_lookup WHERE + reducedStreet ILIKE '%' || name || '%' AND texticregexeq(reducedStreet, '(?i)(^' || name || ')' || ws) + ORDER BY length(name) DESC LIMIT 1; + END IF; + IF tempString > '' THEN + preDir := tempString; + result.preDirAbbrev := abbrev FROM direction_lookup + where reducedStreet ILIKE '%' || name '%' AND texticregexeq(reducedStreet, '(?i)(^' || name || ')' || ws) + ORDER BY length(name) DESC LIMIT 1; + result.streetName := trim(substring(reducedStreet, '^' || preDir || ws || '(.*)')); + ELSE + result.streetName := trim(reducedStreet); + END IF; + END IF; + IF texticregexeq(result.location, '(?i)' || result.internal || '$') THEN + -- If the internal address is at the end of the location, then no + -- location was given. We still need to look for post direction. + SELECT INTO rec abbrev, + substring(result.location, '(?i)^(' || name || ')' || ws) as value + FROM direction_lookup + WHERE result.location ILIKE '%' || name || '%' AND texticregexeq(result.location, '(?i)^' + || name || ws) ORDER BY length(name) desc LIMIT 1; + IF rec.value IS NOT NULL THEN + postDir := rec.value; + result.postDirAbbrev := rec.abbrev; + END IF; + result.location := null; + ELSIF result.internal IS NULL THEN + -- If no location is given, the location string will be the post direction + SELECT INTO tempInt count(*) FROM direction_lookup WHERE + upper(result.location) = upper(name); + IF tempInt != 0 THEN + postDir := result.location; + SELECT INTO result.postDirAbbrev abbrev FROM direction_lookup WHERE + upper(postDir) = upper(name); + result.location := NULL; + + IF debug_flag THEN + RAISE NOTICE '% postDir exact match: %', clock_timestamp(), result.postDirAbbrev; + END IF; + ELSE + -- postDirection is not equal location, but may be contained in it + -- It is only considered a postDirection if it is not preceded by a , + SELECT INTO tempString substring(result.location, '(?i)(^' || name + || ')' || ws) FROM direction_lookup WHERE + result.location ILIKE '%' || name || '%' AND texticregexeq(result.location, '(?i)(^' || name || ')' || ws) + AND NOT texticregexeq(rawInput, '(?i)(,' || ws || '+' || result.location || ')' || ws) + ORDER BY length(name) desc LIMIT 1; + + IF debug_flag THEN + RAISE NOTICE '% location trying to extract postdir: %, tempstring: %, rawInput: %', clock_timestamp(), result.location, tempString, rawInput; + END IF; + IF tempString IS NOT NULL THEN + postDir := tempString; + SELECT INTO result.postDirAbbrev abbrev FROM direction_lookup + WHERE result.location ILIKE '%' || name || '%' AND texticregexeq(result.location, '(?i)(^' || name || ')' || ws) ORDER BY length(name) DESC LIMIT 1; + result.location := substring(result.location, '^' || postDir || ws || '+(.*)'); + IF debug_flag THEN + RAISE NOTICE '% postDir: %', clock_timestamp(), result.postDirAbbrev; + END IF; + END IF; + + END IF; + ELSE + -- internal is not null, but is not at the end of the location string + -- look for post direction before the internal address + IF debug_flag THEN + RAISE NOTICE '%fullstreet before extract postdir: %', clock_timestamp(), fullStreet; + END IF; + SELECT INTO tempString substring(fullStreet, '(?i)' || streetType + || ws || '+(' || name || ')' || ws || '+' || result.internal) + FROM direction_lookup + WHERE fullStreet ILIKE '%' || name || '%' AND texticregexeq(fullStreet, '(?i)' + || ws || name || ws || '+' || result.internal) ORDER BY length(name) desc LIMIT 1; + IF tempString IS NOT NULL THEN + postDir := tempString; + SELECT INTO result.postDirAbbrev abbrev FROM direction_lookup + WHERE texticregexeq(fullStreet, '(?i)' || ws || name || ws); + END IF; + END IF; + ELSE + -- No street type was found + + -- If an internal address was given, then the split becomes easy, and the + -- street name is everything before it, without directions. + IF result.internal IS NOT NULL THEN + reducedStreet := substring(fullStreet, '(?i)^(.*?)' || ws || '+' + || result.internal); + tempInt := count(*) FROM direction_lookup WHERE + reducedStreet ILIKE '%' || name || '%' AND texticregexeq(reducedStreet, '(?i)' || ws || name || '$'); + IF tempInt > 0 THEN + postDir := substring(reducedStreet, '(?i)' || ws || '(' + || name || ')' || '$') FROM direction_lookup + WHERE reducedStreet ILIKE '%' || name || '%' AND texticregexeq(reducedStreet, '(?i)' || ws || name || '$'); + result.postDirAbbrev := abbrev FROM direction_lookup + WHERE texticregexeq(reducedStreet, '(?i)' || ws || name || '$'); + END IF; + tempString := substring(reducedStreet, '(?i)^(' || name + || ')' || ws) FROM direction_lookup WHERE + reducedStreet ILIKE '%' || name || '%' AND texticregexeq(reducedStreet, '(?i)^(' || name || ')' || ws) + ORDER BY length(name) DESC; + IF tempString IS NOT NULL THEN + preDir := tempString; + result.preDirAbbrev := abbrev FROM direction_lookup WHERE + reducedStreet ILIKE '%' || name || '%' AND texticregexeq(reducedStreet, '(?i)(^' || name || ')' || ws) + ORDER BY length(name) DESC; + result.streetName := substring(reducedStreet, '(?i)^' || preDir || ws + || '+(.*?)(?:' || ws || '+' || cull_null(postDir) || '|$)'); + ELSE + result.streetName := substring(reducedStreet, '(?i)^(.*?)(?:' || ws + || '+' || cull_null(postDir) || '|$)'); + END IF; + ELSE + + -- If a post direction is given, then the location is everything after, + -- the street name is everything before, less any pre direction. + fullStreet := trim(fullStreet); + tempInt := count(*) FROM direction_lookup + WHERE fullStreet ILIKE '%' || name || '%' AND texticregexeq(fullStreet, '(?i)' || ws || name || '(?:' + || ws || '|$)'); + + IF tempInt = 1 THEN + -- A single postDir candidate was found. This makes it easier. + postDir := substring(fullStreet, '(?i)' || ws || '(' + || name || ')(?:' || ws || '|$)') FROM direction_lookup WHERE + fullStreet ILIKE '%' || name || '%' AND texticregexeq(fullStreet, '(?i)' || ws || name || '(?:' + || ws || '|$)'); + result.postDirAbbrev := abbrev FROM direction_lookup + WHERE fullStreet ILIKE '%' || name || '%' AND texticregexeq(fullStreet, '(?i)' || ws || name + || '(?:' || ws || '|$)'); + IF result.location IS NULL THEN + result.location := substring(fullStreet, '(?i)' || ws || postDir + || ws || '+(.*?)$'); + END IF; + reducedStreet := substring(fullStreet, '^(.*?)' || ws || '+' + || postDir); + tempString := substring(reducedStreet, '(?i)(^' || name + || ')' || ws) FROM direction_lookup + WHERE + reducedStreet ILIKE '%' || name || '%' AND texticregexeq(reducedStreet, '(?i)(^' || name || ')' || ws) + ORDER BY length(name) DESC; + IF tempString IS NOT NULL THEN + preDir := tempString; + result.preDirAbbrev := abbrev FROM direction_lookup WHERE + reducedStreet ILIKE '%' || name || '%' AND texticregexeq(reducedStreet, '(?i)(^' || name || ')' || ws) + ORDER BY length(name) DESC; + result.streetName := trim(substring(reducedStreet, '^' || preDir || ws + || '+(.*)')); + ELSE + result.streetName := trim(reducedStreet); + END IF; + ELSIF tempInt > 1 THEN + -- Multiple postDir candidates were found. We need to find the last + -- incident of a direction, but avoid getting the last word from + -- a two word direction. eg extracting "East" from "North East" + -- We do this by sorting by length, and taking the last direction + -- in the results that is not included in an earlier one. + -- This wont be a problem it preDir is North East and postDir is + -- East as the regex requires a space before the direction. Only + -- the East will return from the preDir. + tempInt := 0; + FOR rec IN SELECT abbrev, substring(fullStreet, '(?i)' || ws || '(' + || name || ')(?:' || ws || '|$)') AS value + FROM direction_lookup + WHERE fullStreet ILIKE '%' || name || '%' AND texticregexeq(fullStreet, '(?i)' || ws || name + || '(?:' || ws || '|$)') + ORDER BY length(name) desc LOOP + tempInt := 0; + IF tempInt < position(rec.value in fullStreet) THEN + IF postDir IS NULL THEN + tempInt := position(rec.value in fullStreet); + postDir := rec.value; + result.postDirAbbrev := rec.abbrev; + ELSIF NOT texticregexeq(postDir, '(?i)' || rec.value) THEN + tempInt := position(rec.value in fullStreet); + postDir := rec.value; + result.postDirAbbrev := rec.abbrev; + END IF; + END IF; + END LOOP; + IF result.location IS NULL THEN + result.location := substring(fullStreet, '(?i)' || ws || postDir || ws + || '+(.*?)$'); + END IF; + reducedStreet := substring(fullStreet, '(?i)^(.*?)' || ws || '+' + || postDir); + SELECT INTO tempString substring(reducedStreet, '(?i)(^' || name + || ')' || ws) FROM direction_lookup WHERE + reducedStreet ILIKE '%' || name || '%' AND texticregexeq(reducedStreet, '(?i)(^' || name || ')' || ws) + ORDER BY length(name) DESC; + IF tempString IS NOT NULL THEN + preDir := tempString; + SELECT INTO result.preDirAbbrev abbrev FROM direction_lookup WHERE + reducedStreet ILIKE '%' || name || '%' AND texticregexeq(reducedStreet, '(?i)(^' || name || ')' || ws) + ORDER BY length(name) DESC; + result.streetName := substring(reducedStreet, '^' || preDir || ws + || '+(.*)'); + ELSE + result.streetName := reducedStreet; + END IF; + ELSE + + -- There is no street type, directional suffix or internal address + -- to allow distinction between street name and location. + IF result.location IS NULL THEN + IF debug_flag THEN + raise notice 'fullStreet: %', fullStreet; + END IF; + + result.location := location_extract(fullStreet, result.stateAbbrev); + -- If the location was found, remove it from fullStreet + IF result.location IS NOT NULL THEN + fullStreet := substring(fullStreet, '(?i)(.*),' || ws || '+' || + result.location); + END IF; + END IF; + + -- Check for a direction prefix. + SELECT INTO tempString substring(fullStreet, '(?i)(^' || name + || ')' || ws) FROM direction_lookup WHERE + texticregexeq(fullStreet, '(?i)(^' || name || ')' || ws) + ORDER BY length(name); + IF tempString IS NOT NULL THEN + preDir := tempString; + SELECT INTO result.preDirAbbrev abbrev FROM direction_lookup WHERE + texticregexeq(fullStreet, '(?i)(^' || name || ')' || ws) + ORDER BY length(name) DESC; + IF result.location IS NOT NULL THEN + -- The location may still be in the fullStreet, or may + -- have been removed already + result.streetName := substring(fullStreet, '^' || preDir || ws + || '+(.*?)(' || ws || '+' || result.location || '|$)'); + ELSE + result.streetName := substring(fullStreet, '^' || preDir || ws + || '+(.*?)' || ws || '*'); + END IF; + ELSE + IF result.location IS NOT NULL THEN + -- The location may still be in the fullStreet, or may + -- have been removed already + result.streetName := substring(fullStreet, '^(.*?)(' || ws + || '+' || result.location || '|$)'); + ELSE + result.streetName := fullStreet; + END IF; + END IF; + END IF; + END IF; + END IF; + + -- For address number only put numbers and stop if reach a non-number e.g. 123-456 will return 123 + result.address := to_number(substring(addressString, '[0-9]+'), '99999999999'); + --get rid of extraneous spaces before we return + result.zip := trim(zipString); + result.streetName := trim(result.streetName); + result.location := trim(result.location); + result.postDirAbbrev := trim(result.postDirAbbrev); + result.parsed := TRUE; + RETURN result; +END +$$ + LANGUAGE plpgsql STABLE + COST 100; \ No newline at end of file diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2010/normalize/pprint_addy.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2010/normalize/pprint_addy.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2010/normalize/pprint_addy.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2010/normalize/pprint_addy.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,43 @@ +-- helper function to determine if street type +-- should be put before or after the street name +-- note in streettype lookup this is misnamed as is_hw +-- because I originally thought only highways had that behavior +-- it applies to foreign influenced roads like Camino (for road) +CREATE OR REPLACE FUNCTION is_pretype(text) RETURNS boolean AS +$$ + SELECT EXISTS(SELECT name FROM street_type_lookup WHERE name = upper($1) AND is_hw ); +$$ +LANGUAGE sql IMMUTABLE STRICT; /** I know this should be stable but it's practically immutable :) **/ + +CREATE OR REPLACE FUNCTION pprint_addy( + input NORM_ADDY +) RETURNS VARCHAR +AS $_$ +DECLARE + result VARCHAR; +BEGIN + IF NOT input.parsed THEN + RETURN NULL; + END IF; + + result := cull_null(input.address::text) + || COALESCE(' ' || input.preDirAbbrev, '') + || CASE WHEN is_pretype(input.streetTypeAbbrev) THEN ' ' || input.streetTypeAbbrev ELSE '' END + || COALESCE(' ' || input.streetName, '') + || CASE WHEN NOT is_pretype(input.streetTypeAbbrev) THEN ' ' || input.streetTypeAbbrev ELSE '' END + || COALESCE(' ' || input.postDirAbbrev, '') + || CASE WHEN + input.address IS NOT NULL OR + input.streetName IS NOT NULL + THEN ', ' ELSE '' END + || cull_null(input.internal) + || CASE WHEN input.internal IS NOT NULL THEN ', ' ELSE '' END + || cull_null(input.location) + || CASE WHEN input.location IS NOT NULL THEN ', ' ELSE '' END + || COALESCE(input.stateAbbrev || ' ' , '') + || cull_null(input.zip); + + RETURN trim(result); + +END; +$_$ LANGUAGE plpgsql IMMUTABLE; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2010/normalize/state_extract.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2010/normalize/state_extract.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2010/normalize/state_extract.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2010/normalize/state_extract.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,90 @@ +-- state_extract(addressStringLessZipCode) +-- Extracts the state from end of the given string. +-- +-- This function uses the state_lookup table to determine which state +-- the input string is indicating. First, an exact match is pursued, +-- and in the event of failure, a word-by-word fuzzy match is attempted. +-- +-- The result is the state as given in the input string, and the approved +-- state abbreviation, seperated by a colon. +CREATE OR REPLACE FUNCTION state_extract(rawInput VARCHAR) RETURNS VARCHAR +AS $_$ +DECLARE + tempInt INTEGER; + tempString VARCHAR; + state VARCHAR; + stateAbbrev VARCHAR; + result VARCHAR; + rec RECORD; + test BOOLEAN; + ws VARCHAR; + var_verbose boolean := false; +BEGIN + ws := E'[ ,.\t\n\f\r]'; + + -- If there is a trailing space or , get rid of it + -- this is to handle case where people use , instead of space to separate state and zip + -- such as '2450 N COLORADO ST, PHILADELPHIA, PA, 19132' instead of '2450 N COLORADO ST, PHILADELPHIA, PA 19132' + + --tempString := regexp_replace(rawInput, E'(.*)' || ws || '+', E'\\1'); + tempString := btrim(rawInput, ', '); + -- Separate out the last word of the state, and use it to compare to + -- the state lookup table to determine the entire name, as well as the + -- abbreviation associated with it. The zip code may or may not have + -- been found. + tempString := substring(tempString from ws || E'+([^ ,.\t\n\f\r0-9]*?)$'); + IF var_verbose THEN RAISE NOTICE 'state_extract rawInput: % tempString: %', rawInput, tempString; END IF; + SELECT INTO tempInt count(*) FROM (select distinct abbrev from state_lookup + WHERE upper(abbrev) = upper(tempString)) as blah; + IF tempInt = 1 THEN + state := tempString; + SELECT INTO stateAbbrev abbrev FROM (select distinct abbrev from + state_lookup WHERE upper(abbrev) = upper(tempString)) as blah; + ELSE + SELECT INTO tempInt count(*) FROM state_lookup WHERE upper(name) + like upper('%' || tempString); + IF tempInt >= 1 THEN + FOR rec IN SELECT name from state_lookup WHERE upper(name) + like upper('%' || tempString) LOOP + SELECT INTO test texticregexeq(rawInput, name) FROM state_lookup + WHERE rec.name = name; + IF test THEN + SELECT INTO stateAbbrev abbrev FROM state_lookup + WHERE rec.name = name; + state := substring(rawInput, '(?i)' || rec.name); + EXIT; + END IF; + END LOOP; + ELSE + -- No direct match for state, so perform fuzzy match. + SELECT INTO tempInt count(*) FROM state_lookup + WHERE soundex(tempString) = end_soundex(name); + IF tempInt >= 1 THEN + FOR rec IN SELECT name, abbrev FROM state_lookup + WHERE soundex(tempString) = end_soundex(name) LOOP + tempInt := count_words(rec.name); + tempString := get_last_words(rawInput, tempInt); + test := TRUE; + FOR i IN 1..tempInt LOOP + IF soundex(split_part(tempString, ' ', i)) != + soundex(split_part(rec.name, ' ', i)) THEN + test := FALSE; + END IF; + END LOOP; + IF test THEN + state := tempString; + stateAbbrev := rec.abbrev; + EXIT; + END IF; + END LOOP; + END IF; + END IF; + END IF; + + IF state IS NOT NULL AND stateAbbrev IS NOT NULL THEN + result := state || ':' || stateAbbrev; + END IF; + + RETURN result; +END; +$_$ LANGUAGE plpgsql STABLE; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2010/regress/geocode_regress postgis-2.0.1/extras/tiger_geocoder/tiger_2010/regress/geocode_regress --- postgis-1.5.3/extras/tiger_geocoder/tiger_2010/regress/geocode_regress 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2010/regress/geocode_regress 2012-01-09 14:56:09.000000000 +0000 @@ -0,0 +1,82 @@ +T1|529 Main St, Boston, MA 02129|POINT(-71.07187 42.38351)|0 +T2|75 State St, Boston, MA 02109|POINT(-71.0557 42.35908)|0 +T3|100 Federal St, Boston, MA 02110|POINT(-71.05631 42.35477)|1 +T4|529 Main St, Boston, MA 02129|POINT(-71.07187 42.38351)|0 +T5|75 State St, Boston, MA 02109|POINT(-71.0557 42.35908)|0 +T6|100 Federal St, Boston, MA 02110|POINT(-71.05631 42.35477)|1 +T6|98 Federal Ct, Boston, MA 02110|POINT(-71.05672 42.35413)|14 +T7|529 Main St, Boston, MA 02129|POINT(-71.07187 42.38351)|0 +T8|75 State St, Boston, MA 02109|POINT(-71.0557 42.35908)|0 +T9|100 Federal St, Boston, MA 02110|POINT(-71.05631 42.35477)|1 +T9|98 Federal Ct, Boston, MA 02110|POINT(-71.05672 42.35413)|14 +T10|530 Main St, Boston, MA 02129|POINT(-71.07173 42.38345)|0 +T11|76 State St, Boston, MA 02109|POINT(-71.05615 42.359)|0 +T12|101 Federal St, Boston, MA 02110|POINT(-71.0563 42.35469)|1 +T12|99 Federal Ct, Boston, MA 02110|POINT(-71.05672 42.35413)|14 +T12|98 Federal Ln, Dedham, MA 02026|POINT(-71.18356 42.2383)|27 +#TB1|24 School St, Boston, MA 02108|24 School Street, Boston, MA 02108|POINT(-71.05888 42.35762)|0 +#TB1|20 School St, Boston, MA 02108|20 School Street, Boston, MA 02109|POINT(-71.05876 42.35758)|1 +T13|101 Federal St, Boston, MA 02110|POINT(-71.0563 42.35469)|1 +T13|99 Federal Ct, Boston, MA 02110|POINT(-71.05672 42.35413)|14 +T13|98 Federal Ln, Dedham, MA 02026|POINT(-71.18356 42.2383)|27 +T14|101 Federal St, Boston, MA 02110|POINT(-71.0563 42.35469)|1 +T15|101 Federal St, Boston, MA 02110|POINT(-71.0563 42.35469)|11 +T16|101 Federal St, Boston, MA 02110|POINT(-71.0563 42.35469)|11 +T16|99 Federal Ct, Boston, MA 02110|POINT(-71.05672 42.35413)|24 +T16|98 Federal Ln, Dedham, MA 02026|POINT(-71.18356 42.2383)|37 +T17|77 Massachusetts Ave, Cambridge, MA 02139|POINT(-71.09436 42.35981)|0 +T18a|26 Court St, Boston, MA 02108|POINT(-71.05885 42.35911)|6 +T18b|26 Court St, Boston, MA 02108|POINT(-71.05885 42.35911)|1 +#1087a|75 State St, Boston, MA 02109|POINT(-71.0557 42.35908)|1 +#1087b|75 State St, Boston, MA 02109|POINT(-71.0557 42.35908)|1 +#1087b|75 State St, Milton, MA 02186|POINT(-71.04091 42.25635)|4 +#1087c|75 State St, Boston, MA 02109|POINT(-71.0557 42.35908)|0 +#1073a|212 3rd Ave N, Minneapolis, MN 55401|212 3rd Ave N, MINNEAPOLIS, MN 553404|POINT(-93.27181 44.98502)|10 +#1073a|212 3rd Ave S, Minneapolis, MN 55401|212 3rd Ave N, MINNEAPOLIS, MN 553404|POINT(-93.26334 44.98087)|12 +#1073b|212 3rd Ave N, Minneapolis, MN 55401|POINT(-93.27181 44.98502)|0 +#1076a|16725 Co Rd 24, Plymouth, MN 55447|16725 Co Rd 24, Plymouth, MN 55447|POINT(-93.49328 45.02184)|25 +#1076a|15898 Co Rd 24, Plymouth, MN 55446|16725 Co Rd 24, Plymouth, MN 55447|POINT(-93.48125 45.02691)|31 +#1076b|16725 Co Rd 24, Plymouth, MN 55447|16725 County Road 24, Plymouth, MN 55447|POINT(-93.49328 45.02184)|25 +#1076c|13800 Co Hwy 9, Andover, MN 55304|13800 County Hwy 9, Andover, MN 55304|POINT(-93.35733 45.22052)|30 +#1076d|13800 Co Hwy 9, Andover, MN 55304|13800 9, Andover, MN 55304|POINT(-93.35733 45.22052)|0 +#1076e|3877 US Hwy 6, North Eastham, MA 02642|3900 Route 6, Eastham, Massachusetts 02642|POINT(-69.98698 41.84775)|23 +#1076f|1940 Co Rd C W, Roseville, MN 55113|1940 County Road C W, Roseville, MN 55113|POINT(-93.18492 45.02058)|25 +#1076f|1940 W Co Rd C, Roseville, MN 55113|1940 County Road C W, Roseville, MN 55113|POINT(-93.18492 45.02058)|29 +#1076f|138 Co Rd C W, Little Canada, MN 55113|1940 County Road C W, Roseville, MN 55113|POINT(-93.10518 45.02074)|47 +#1076g|15709 Rockford Rd, Plymouth, MN 55447|15709 Rockford Road, Plymouth, MN 55447|POINT(-93.47897 45.02726)|0 +#1076h|300 State Hwy 3, Hingham, MA 02043|300 Rt 3A, Hingham, MA|POINT(-70.91448 42.24915)|18 +#1076h|300 State Hwy 3, Burlington, MA 01803|300 Rt 3A, Hingham, MA|POINT(-71.20674 42.51586)|25 +#1076h|300 State Hwy 3, Boston, MA 02114|300 Rt 3A, Hingham, MA|POINT(-71.07011 42.36428)|25 +#1074a|8525 Cottagewood Ter NE, Blaine, MN 55434|8525 COTTAGE WOOD TERR, Blaine, MN 55434|POINT(-93.24462 45.1248)|14 +#1074a|8499 Cottagewood Ter NE, Spring Lake Park, MN 55432|8525 COTTAGE WOOD TERR, Blaine, MN 55434|POINT(-93.24464 45.1237)|34 +#1074b|8525 Cottagewood Ter NE, Blaine, MN 55434|8525 COTTAGEWOOD TERR, Blaine, MN 55434|POINT(-93.24462 45.1248)|4 +#1074b|8499 Cottagewood Ter NE, Spring Lake Park, MN 55432|8525 COTTAGEWOOD TERR, Blaine, MN 55434|POINT(-93.24464 45.1237)|24 +#1070a|100 Federal St, Lynn, MA 01905|POINT(-70.96783 42.4659)|8 +#1070b|100 Federal St, Lynn, MA 01905|POINT(-70.96783 42.4659)|8 +#1112a|8401 W 35W Svc Rd NE, Blaine, MN 55449|8401 W 35W Service Dr NE, Blaine, MN 55449|POINT(-93.19083 45.12389)|10 +#1112b|8401 W 35W Svc Rd NE, Blaine, MN 55449|8401 35W, Blaine, MN 55449|POINT(-93.19083 45.12389)|36 +#1112c|8401 W 35W Svc Rd NE, Blaine, MN 55449|8401 35W West, Blaine, MN 55449|POINT(-93.19083 45.12389)|36 +#1112d|8401 W 35W Svc Rd NE, Blaine, MN 55449|8401 West 35W, Blaine, MN 55449|POINT(-93.19083 45.12389)|34 +#1112e|8401 W 35W Svc Rd NE, Blaine, MN 55449|8401 W 35W, Blaine, MN 55449|POINT(-93.19083 45.12389)|34 +#1113a|8040 Old Cedar Ave S, Bloomington, MN 55425|8040 OLD CEDAR AVE S, BLOOMINGTON, MN 55425|POINT(-93.24792 44.85708)|0 +#1113b|8040 Old Cedar Ave S, Bloomington, MN 55425|8040 CEDAR AVE S, BLOOMINGTON, MN 55425|POINT(-93.24792 44.85708)|10 +#1113c|17405 Old Rockford Rd, Plymouth, MN 55446|17405 Old Rockford Rd, Plymouth, MN 55446|POINT(-93.50121 45.0345)|0 +#1113d|12898 Rockford Rd, Plymouth, MN 55446|17405 Rockford Rd, Plymouth, MN 55446|POINT(-93.4401 45.0308)|6 +#1113d|15801 Rockford Rd, Plymouth, MN 55447|17405 Rockford Rd, Plymouth, MN 55446|POINT(-93.47975 45.02701)|6 +#1113e|198 Old Constance Blvd NW, Andover, MN 55304|198 OLD CONSTANCE BLVD, ANDOVER, MN 55304|POINT(-93.27027 45.26203)|4 +#1113f|198 Constance Blvd NW, Andover, MN 55304|198 CONSTANCE BLVD, ANDOVER, MN 55304|POINT(-93.26833 45.26231)|4 +#1113f|198 Constance Blvd NE, Ham Lake, MN 55304|198 CONSTANCE BLVD, ANDOVER, MN 55304|POINT(-93.26114 45.2657)|11 +#1145a|4051 27th Ave S, Minneapolis, MN 55406|4051 27th Ave S Minneapolis MN 55405|POINT(-93.23339 44.92959)|1 +#1145b|3625 18th Ave S, Minneapolis, MN 55407|3625 18th Ave S Minneapolis MN 55406|POINT(-93.24863 44.9373)|1 +#1145c|4057 10th Ave S, Minneapolis, MN 55407|4057 10th Ave S Minneapolis MN 55406|POINT(-93.25997 44.92951)|1 +#1145d|8498 141st Ct, Apple Valley, MN 55124|8512 141 St Ct Apple Valley MN 55124|POINT(-93.23693 44.74478)|15 +#1145d|4898 141st St W, Apple Valley, MN 55124|8512 141 St Ct Apple Valley MN 55124|POINT(-93.1625 44.74471)|24 +#1145e|103 E 36th St, Minneapolis, MN 55408|103 36th St W Minneapolis MN 55409|POINT(-93.2766 44.93774)|5 +#1145e|103 W 36th St, Minneapolis, MN 55408|103 36th St W Minneapolis MN 55409|POINT(-93.27979 44.93773)|5 +#1333a|98 Weld Ave, Boston, MA 02119|POINT(-71.099 42.314234)|3 +#1333a|99 Weld Ave, Boston, MA 02119|POINT(-71.099 42.314234)|3 +#1333b|98 Haverford St, Boston, MA 02130|POINT(-71.101375 42.31376)|0 +#1392a|State Hwy 121, Coppell, TX|POINT(-96.993416 32.987025)|8 +#1392a|State Hwy 121, Coppell, TX|POINT(-96.993397 32.985954)|8 +#1392b|State Hwy 121, Coppell, TX|POINT(-96.993416 32.987025)|18 +#1392b|State Hwy 121, Coppell, TX|POINT(-96.993397 32.985954)|18 diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2010/regress/geocode_regress.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2010/regress/geocode_regress.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2010/regress/geocode_regress.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2010/regress/geocode_regress.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,106 @@ +--$Id: geocode_regress.sql 9324 2012-02-27 22:08:12Z pramsey $ +\timing +-- Limit 1 +SELECT 'T1', pprint_addy(addy) As address, ST_AsText(ST_SnapToGrid(geomout,0.00001)) As pt, rating FROM geocode('529 Main Street, Boston, MA 02129',1); +SELECT 'T2', pprint_addy(addy) As address, ST_AsText(ST_SnapToGrid(geomout,0.00001)) As pt, rating FROM geocode('75 State Street, Boston, MA 02109',1); +SELECT 'T3', pprint_addy(addy) As address, ST_AsText(ST_SnapToGrid(geomout,0.00001)) As pt, rating FROM geocode('100 Federal Street, Boston, MA 02109',1); +-- default +SELECT 'T4', pprint_addy(addy) As address, ST_AsText(ST_SnapToGrid(geomout,0.00001)) As pt, rating FROM geocode('529 Main Street, Boston, MA 02129'); +SELECT 'T5', pprint_addy(addy) As address, ST_AsText(ST_SnapToGrid(geomout,0.00001)) As pt, rating FROM geocode('75 State Street, Boston, MA 02109'); +SELECT 'T6', pprint_addy(addy) As address, ST_AsText(ST_SnapToGrid(geomout,0.00001)) As pt, rating FROM geocode('100 Federal Street, Boston,MA 02109'); + +-- 20 +SELECT 'T7', pprint_addy(addy) As address, ST_AsText(ST_SnapToGrid(geomout,0.00001)) As pt, rating FROM geocode('529 Main Street, Boston, MA 02129',20); +SELECT 'T8', pprint_addy(addy) As address, ST_AsText(ST_SnapToGrid(geomout,0.00001)) As pt, rating FROM geocode('75 State Street, Boston, MA 02109',20); +SELECT 'T9', pprint_addy(addy) As address, ST_AsText(ST_SnapToGrid(geomout,0.00001)) As pt, rating FROM geocode('100 Federal Street, Boston, MA 02109',20); + +-- Limit 1 - Test caching effects +SELECT 'T10', pprint_addy(addy) As address, ST_AsText(ST_SnapToGrid(geomout,0.00001)) As pt, rating FROM geocode('530 Main Street, Boston MA, 02129',1); +SELECT 'T11', pprint_addy(addy) As address, ST_AsText(ST_SnapToGrid(geomout,0.00001)) As pt, rating FROM geocode('76 State Street, Boston MA, 02109',1); +SELECT 'T12', pprint_addy(addy) As address, ST_AsText(ST_SnapToGrid(geomout,0.00001)) As pt, rating FROM geocode('101 Federal Street, Boston, MA',20); + +-- Test batch geocoding along a street +SELECT '#TB1' As ticket, pprint_addy((g).addy) As address, target, ST_AsText(ST_SnapToGrid((g).geomout, 0.00001)) As pt, (g).rating FROM (SELECT geocode(target::text,1) As g, target FROM (VALUES ('24 School Street, Boston, MA 02108'), ('20 School Street, Boston, MA 02109')) As f(target) ) As foo; + +-- Partial address +SELECT 'T13', pprint_addy(addy) As address, ST_AsText(ST_SnapToGrid(geomout,0.00001)) As pt, rating FROM geocode('101 Federal Street, Boston MA',20); +SELECT 'T14', pprint_addy(addy) As address, ST_AsText(ST_SnapToGrid(geomout,0.00001)) As pt, rating FROM geocode('101 Federal Street, Boston MA',1); + +--Test misspellings and missing zip -- +SELECT 'T15', pprint_addy(addy) As address, ST_AsText(ST_SnapToGrid(geomout,0.00001)) As pt, rating FROM geocode('101 Fedaral Street, Boston, MA',1); +SELECT 'T16', pprint_addy(addy) As address, ST_AsText(ST_SnapToGrid(geomout,0.00001)) As pt, rating FROM geocode('101 Fedaral Street, Boston, MA',50); + +-- needs addr these ones have more than 2 sides +-- my alma mater doesn't geocode right without addr check -- +SELECT 'T17', pprint_addy(addy) As address, ST_AsText(ST_SnapToGrid(geomout,0.00001)) As pt, rating FROM geocode('77 Massachusetts Avenue, Cambridge, MA 02139',1); + +-- zip provided but no state - should still be fast under 250ms +SELECT 'T18a', pprint_addy(addy) As address, ST_AsText(ST_SnapToGrid(geomout,0.00001)) As pt, rating FROM geocode('26 Court Street, 02109',1); +SELECT 'T18b', pprint_addy(addy) As address, ST_AsText(ST_SnapToGrid(geomout,0.00001)) As pt, rating FROM geocode('26 Court Street,Boston,02109',1); + +-- Ratings wrong for missing or wrong local zips +SELECT '#1087a' As ticket, pprint_addy(addy) As address, ST_AsText(ST_SnapToGrid(geomout,0.00001)) As pt, rating FROM geocode('75 State Street, Boston, MA 02110',3); +SELECT '#1087b' As ticket, pprint_addy(addy) As address, ST_AsText(ST_SnapToGrid(geomout,0.00001)) As pt, rating FROM geocode('75 State Street, Boston, MA',3); +--right zip +SELECT '#1087c' As ticket, pprint_addy(addy) As address, ST_AsText(ST_SnapToGrid(geomout,0.00001)) As pt, rating FROM geocode('75 State Street, Boston, MA 02109',1); + +--Geocoding mangled zipcodes +SELECT '#1073a' As ticket, pprint_addy((g).addy) As address, target, ST_AsText(ST_SnapToGrid((g).geomout, 0.00001)) As pt, (g).rating FROM (SELECT geocode(target,2) As g, target FROM (SELECT '212 3rd Ave N, MINNEAPOLIS, MN 553404'::text As target) AS f) As foo; +SELECT '#1073b' As ticket, pprint_addy(addy) As address, ST_AsText(ST_SnapToGrid(geomout,0.00001)) As pt, rating FROM geocode('212 3rd Ave N, MINNEAPOLIS, MN 55401-',2); + +-- country roads and highways with spaces in street type +SELECT '#1076a' As ticket, pprint_addy((g).addy) As address, target, ST_AsText(ST_SnapToGrid((g).geomout, 0.00001)) As pt, (g).rating FROM (SELECT geocode(target) As g, target FROM (SELECT '16725 Co Rd 24, Plymouth, MN 55447'::text As target) As f) As foo; +SELECT '#1076b' As ticket, pprint_addy((g).addy) As address, target, ST_AsText(ST_SnapToGrid((g).geomout, 0.00001)) As pt, (g).rating FROM (SELECT geocode(target,1) As g, target FROM (SELECT '16725 County Road 24, Plymouth, MN 55447'::text As target) As f) As foo; +SELECT '#1076c' As ticket, pprint_addy((g).addy) As address, target, ST_AsText(ST_SnapToGrid((g).geomout, 0.00001)) As pt, (g).rating FROM (SELECT geocode(target,1) As g, target FROM (SELECT '13800 County Hwy 9, Andover, MN 55304'::text As target) AS f) As foo; +SELECT '#1076d' As ticket, pprint_addy((g).addy) As address, target, ST_AsText(ST_SnapToGrid((g).geomout, 0.00001)) As pt, (g).rating FROM (SELECT geocode(target,1) As g, target FROM (SELECT '13800 9, Andover, MN 55304'::text As target) AS f) As foo; +SELECT '#1076e' As ticket, pprint_addy((g).addy) As address, target, ST_AsText(ST_SnapToGrid((g).geomout, 0.00001)) As pt, (g).rating FROM (SELECT geocode(target,4) As g, target FROM (SELECT '3900 Route 6, Eastham, Massachusetts 02642'::text As target) AS f) As foo; + +-- country road that starts with a letter +SELECT '#1076f' As ticket, pprint_addy((g).addy) As address, target, ST_AsText(ST_SnapToGrid((g).geomout, 0.00001)) As pt, (g).rating FROM (SELECT geocode(target,3) As g, target FROM (SELECT '1940 County Road C W, Roseville, MN 55113'::text As target) AS f) As foo; + +-- ad road that in some sections no street range recorded -- +SELECT '#1076g' As ticket, pprint_addy((g).addy) As address, target, ST_AsText(ST_SnapToGrid((g).geomout, 0.00001)) As pt, (g).rating FROM (SELECT geocode(target) As g, target FROM (SELECT '15709 Rockford Road, Plymouth, MN 55447'::text As target) As f) AS foo; + +-- testing RT common abbreviation for route, ensure asking for 1 gives most probable -- +SELECT '#1076h' As ticket, pprint_addy((g).addy) As address, target, ST_AsText(ST_SnapToGrid((g).geomout, 0.00001)) As pt, (g).rating FROM (SELECT geocode(target,3) As g, target FROM (SELECT '300 Rt 3A, Hingham, MA'::text As target) As f) As foo; + +-- alternate spellings +SELECT '#1074a' As ticket, pprint_addy((g).addy) As address, target, ST_AsText(ST_SnapToGrid((g).geomout, 0.00001)) As pt, (g).rating FROM (SELECT geocode(target) As g, target FROM (SELECT '8525 COTTAGE WOOD TERR, Blaine, MN 55434'::text As target) As f) AS foo; +SELECT '#1074b' As ticket, pprint_addy((g).addy) As address, target, ST_AsText(ST_SnapToGrid((g).geomout, 0.00001)) As pt, (g).rating FROM (SELECT geocode(target) As g, target FROM (SELECT '8525 COTTAGEWOOD TERR, Blaine, MN 55434'::text As target) As f) AS foo; + +-- testing region -- +SELECT '#1070a' As ticket, pprint_addy(addy) As address, ST_AsText(ST_SnapToGrid(geomout,0.00001)) As pt, rating FROM geocode('100 Federal Street, Boston, MA 02109',3, (SELECT ST_Union(the_geom) FROM place WHERE statefp = '25' AND name = 'Lynn')::geometry); +SELECT '#1070b' As ticket, pprint_addy(addy) As address, ST_AsText(ST_SnapToGrid(geomout,0.00001)) As pt, rating FROM geocode('100 Federal Street, MA',3, (SELECT ST_Union(the_geom) FROM place WHERE statefp = '25' AND name = 'Lynn')::geometry); + + +-- service roads and interstates +SELECT '#1112a' As ticket, pprint_addy((g).addy) As address, target, ST_AsText(ST_SnapToGrid((g).geomout, 0.00001)) As pt, (g).rating FROM (SELECT geocode(target,2) As g, target FROM (SELECT '8401 W 35W Service Dr NE, Blaine, MN 55449'::text As target) As f) As foo; +SELECT '#1112b' As ticket, pprint_addy((g).addy) As address, target, ST_AsText(ST_SnapToGrid((g).geomout, 0.00001)) As pt, (g).rating FROM (SELECT geocode(target,1) As g, target FROM (SELECT '8401 35W, Blaine, MN 55449'::text As target) As f) As foo; +SELECT '#1112c' As ticket, pprint_addy((g).addy) As address, target, ST_AsText(ST_SnapToGrid((g).geomout, 0.00001)) As pt, (g).rating FROM (SELECT geocode(target,1) As g, target FROM (SELECT '8401 35W West, Blaine, MN 55449'::text As target) As f) As foo; +SELECT '#1112d' As ticket, pprint_addy((g).addy) As address, target, ST_AsText(ST_SnapToGrid((g).geomout, 0.00001)) As pt, (g).rating FROM (SELECT geocode(target,1) As g, target FROM (SELECT '8401 West 35W, Blaine, MN 55449'::text As target) As f) As foo; +SELECT '#1112e' As ticket, pprint_addy((g).addy) As address, target, ST_AsText(ST_SnapToGrid((g).geomout, 0.00001)) As pt, (g).rating FROM (SELECT geocode(target,1) As g, target FROM (SELECT '8401 W 35W, Blaine, MN 55449'::text As target) As f) As foo; + +-- working with prequalabrv such as Old .. something or other +SELECT '#1113a' As ticket, pprint_addy((g).addy) As address, target, ST_AsText(ST_SnapToGrid((g).geomout, 0.00001)) As pt, (g).rating FROM (SELECT geocode(target,2) As g, target FROM (SELECT '8040 OLD CEDAR AVE S, BLOOMINGTON, MN 55425'::text As target) As f) As foo; +SELECT '#1113b' As ticket, pprint_addy((g).addy) As address, target, ST_AsText(ST_SnapToGrid((g).geomout, 0.00001)) As pt, (g).rating FROM (SELECT geocode(target,2) As g, target FROM (SELECT '8040 CEDAR AVE S, BLOOMINGTON, MN 55425'::text As target) As f) As foo; +SELECT '#1113c' As ticket, pprint_addy((g).addy) As address, target, ST_AsText(ST_SnapToGrid((g).geomout, 0.00001)) As pt, (g).rating FROM (SELECT geocode(target,2) As g, target FROM (SELECT '17405 Old Rockford Rd, Plymouth, MN 55446'::text As target) As f) As foo; +SELECT '#1113d' As ticket, pprint_addy((g).addy) As address, target, ST_AsText(ST_SnapToGrid((g).geomout, 0.00001)) As pt, (g).rating FROM (SELECT geocode(target,2) As g, target FROM (SELECT '17405 Rockford Rd, Plymouth, MN 55446'::text As target) As f) As foo; +SELECT '#1113e' As ticket, pprint_addy((g).addy) As address, target, ST_AsText(ST_SnapToGrid((g).geomout, 0.00001)) As pt, (g).rating FROM (SELECT geocode(target,2) As g, target FROM (SELECT '198 OLD CONSTANCE BLVD, ANDOVER, MN 55304'::text As target) As f) As foo; +SELECT '#1113f' As ticket, pprint_addy((g).addy) As address, target, ST_AsText(ST_SnapToGrid((g).geomout, 0.00001)) As pt, (g).rating FROM (SELECT geocode(target,2) As g, target FROM (SELECT '198 CONSTANCE BLVD, ANDOVER, MN 55304'::text As target) As f) As foo; + +-- #1145 addresses used to be slow to geocode took minutes +SELECT '#1145a' As ticket, pprint_addy((g).addy) As address, target, ST_AsText(ST_SnapToGrid((g).geomout, 0.00001)) As pt, (g).rating FROM (SELECT geocode(target,2) As g, target FROM (SELECT '4051 27th Ave S Minneapolis MN 55405'::text As target) As f) As foo; +SELECT '#1145b' As ticket, pprint_addy((g).addy) As address, target, ST_AsText(ST_SnapToGrid((g).geomout, 0.00001)) As pt, (g).rating FROM (SELECT geocode(target,2) As g, target FROM (SELECT '3625 18th Ave S Minneapolis MN 55406'::text As target) As f) As foo; +SELECT '#1145c' As ticket, pprint_addy((g).addy) As address, target, ST_AsText(ST_SnapToGrid((g).geomout, 0.00001)) As pt, (g).rating FROM (SELECT geocode(target,2) As g, target FROM (SELECT '4057 10th Ave S Minneapolis MN 55406'::text As target) As f) As foo; +SELECT '#1145d' As ticket, pprint_addy((g).addy) As address, target, ST_AsText(ST_SnapToGrid((g).geomout, 0.00001)) As pt, (g).rating FROM (SELECT geocode(target,2) As g, target FROM (SELECT '8512 141 St Ct Apple Valley MN 55124'::text As target) As f) As foo; +SELECT '#1145e' As ticket, pprint_addy((g).addy) As address, target, ST_AsText(ST_SnapToGrid((g).geomout, 0.00001)) As pt, (g).rating FROM (SELECT geocode(target) As g, target FROM (SELECT '103 36th St W Minneapolis MN 55409'::text As target) As f) As foo; + +-- cross street intersection +SELECT '#1333a' AS ticket, pprint_addy(addy), st_astext(geomout),rating FROM geocode_intersection('Weld', 'School', 'MA', 'Boston'); +SELECT '#1333b' AS ticket, pprint_addy(addy), st_astext(geomout),rating FROM geocode_intersection('Haverford St','Germania St', 'MA', 'Boston', '02130',1); + +-- crossing highways fails -- zip check +SELECT '#1392a' AS ticket, pprint_addy(addy), st_astext(geomout),rating FROM geocode_intersection('State Hwy 121', 'N Denton Tap Rd', 'TX', 'Coppell', '', 2); +SELECT '#1392b' AS ticket, pprint_addy(addy), st_astext(geomout),rating FROM geocode_intersection('State Hwy 121', 'N Denton Tap Rd', 'TX','', '', 2); +-- +\timing diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2010/regress/normalize_address_regress postgis-2.0.1/extras/tiger_geocoder/tiger_2010/regress/normalize_address_regress --- postgis-1.5.3/extras/tiger_geocoder/tiger_2010/regress/normalize_address_regress 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2010/regress/normalize_address_regress 2011-11-29 08:49:06.000000000 +0000 @@ -0,0 +1,42 @@ +#887|2450|N|COLORADO|St|||PHILADELPHIA|PA|19132|t +#1051a|212||3rd|Ave|N|Suite 560|Minneapolis|MN|55401|t +#1051b|3937||43RD|Ave|S||MINNEAPOLIS|MN|55406|t +#1051c|212|N|3rd|Ave|||Minneapolis|MN|55401|t +#1051d|212||3rd|Ave|N||Minneapolis|MN|55401|t +529||Main|St|||Boston|MA|02129|t +529||Main|St|||Boston|MA|02129|t +529||Main|St|||Boston|MA||t +529||Main|St||Apt 201|Boston|MA|02129|t +529||Main|St||Apt 201|Boston|MA|02129|t +529||Main|St||Apt 201|Boston|MA||t +#1108a|529||Main|St||Suite 201|Boston|MA|02129|t +#1073a|212||3rd|Ave|N||MINNEAPOLIS|MN|553404|t +#1073b|212||3rd|Ave|N||MINNEAPOLIS|MN|55401|t +#1073c|529||Main|St|||Boston|MA|021|t +#1086a|949|N|3rd|St|||New Hyde Park|NY|11040|t +#1086b|949|N|3rd|St|||New Hyde Park|NY|11040|t +#1076a|16725||24|Co Rd|||Plymouth|MN|55447|t +#1076b|16725||24|Co Rd|||Plymouth|MN|55447|t +#1076c|13800||9|Co Hwy|||Andover|MN|55304|t +#1076d|13800||9||||Andover|MN|55304|t +#1076e|14||Forest|Rd|||Acton|MA||t +#1076f|1940||C|Co Rd|W||Roseville|MN|55113|t +#1076g|3900||6|Rte|||Eastham|MA|02642|t +#1076h|4533||PARK|Ave|S||MINNEAPOLIS|MN|55407|t +#1076i|4533||33|Co Rd|||MINNEAPOLIS|MN|55407|t +#1109a|4373||LAKE|Dr|||ROBBINSDALE|MN|55422|t +#1109b|4373||LAKE|Dr|||ROBBINSDALE|MN|55422|t +#1074a|3420||RHODE ISLAND|Ave|S||ST. LOUIS PARK|MN|55426|t +#1074b|26||Court|St|||Boston|MA|02109|t +#1112a|8401|W|35W|Svc Dr|NE||Blaine|MN|55449|t +#1112b|8401||35W||||Blaine|MN|55449|t +#1112c|8401||35W||W||Blaine|MN|55449|t +#1112d|8401|W|35W||||Blaine|MN|55449|t +#1112e|8401|W|35W||||Blaine|MN|55449|t +#1125a|19596 Co Rd 480, COLCORD, OK 74338 +#1125b|4345 Rte 353, SALAMANCA, NY 14779|4345||353|Rte|||SALAMANCA|NY|14779|t +#1125c|19799 State Rte O, COSBY, MO 64436|19799||O|State Rte|||COSBY|MO|64436|t +#1125d|I- 90, Boston, MA|||90|I-|||Boston|MA||t +#1125e|I-90, Boston, MA|||I-90||||Boston|MA||t +#1125f|I- 90, Boston, MA|||90|I-|||Boston|MA||t +#1310a|1110 W CAPITOL Ave, WEST SACRAMENTO, CA|1110|W|CAPITOL|Ave|||WEST SACRAMENTO|CA||t \ No newline at end of file diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2010/regress/normalize_address_regress.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2010/regress/normalize_address_regress.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2010/regress/normalize_address_regress.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2010/regress/normalize_address_regress.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,91 @@ +--$Id: normalize_address_regress.sql 9324 2012-02-27 22:08:12Z pramsey $ +\timing +SELECT '#887' As ticket, * FROM normalize_address('2450 N COLORADO ST, PHILADELPHIA, PA, 19132'); +SELECT '#1051a' As ticket, * FROM normalize_address('212 3rd Ave N Suite 560, Minneapolis, MN 55401'); +SELECT '#1051b' As ticket, * FROM normalize_address('3937 43RD AVE S, MINNEAPOLIS, MN 55406'); +SELECT '#1051c' As ticket, * FROM normalize_address('212 N 3rd Ave, Minneapolis, MN 55401'); +-- City missing , -- NOTE this one won't normalize right if you don't have MN data loaded +SELECT '#1051d' As ticket, * FROM normalize_address('212 3rd Ave N Minneapolis, MN 55401'); +-- comma in wrong spot +SELECT * FROM normalize_address('529 Main Street, Boston MA, 02129'); +-- comma in right spot +SELECT * FROM normalize_address('529 Main Street, Boston,MA 02129'); +-- partial address +SELECT * FROM normalize_address('529 Main Street, Boston, MA'); +-- Full address with suite using , +SELECT * FROM normalize_address('529 Main Street, Apt 201, Boston, MA 02129'); +-- Full address with apart using space +SELECT * FROM normalize_address('529 Main Street Apt 201, Boston, MA 02129'); +-- Partial address with apartment +SELECT * FROM normalize_address('529 Main Street, Apt 201, Boston, MA'); + +--This one fails so lead out for now +SELECT '#1108a' As ticket, * FROM normalize_address('529 Main Street, Suite 201, Boston, MA 02129'); + +-- Partial and Mangled zipcodes +SELECT '#1073a' As ticket, * FROM normalize_address('212 3rd Ave N, MINNEAPOLIS, MN 553404'); +SELECT '#1073b' As ticket, * FROM normalize_address('212 3rd Ave N, MINNEAPOLIS, MN 55401-'); +SELECT '#1073c' As ticket, * FROM normalize_address('529 Main Street, Boston, MA 021'); + +-- comma in wrong position +SELECT '#1086a' As ticket, * FROM normalize_address('949 N 3rd St, New Hyde Park, NY, 11040'); + +-- comma in right position -- +SELECT '#1086b' As ticket, * FROM normalize_address('949 N 3rd St, New Hyde Park, NY 11040'); + +-- country roads and highways with spaces in street type +SELECT '#1076a' As ticket, * FROM normalize_address('16725 Co Rd 24, Plymouth, MN 55447'); +SELECT '#1076b' As ticket, * FROM normalize_address('16725 County Road 24, Plymouth, MN 55447'); +SELECT '#1076c' As ticket, * FROM normalize_address('13800 County Hwy 9, Andover, MN 55304'); +SELECT '#1076d' As ticket, * FROM normalize_address('13800 9, Andover, MN 55304'); +-- this one is a regular street that happens to have a street type as the name +SELECT '#1076e' As ticket, * FROM normalize_address('14 Forest Road, Acton, MA'); + +-- A country road with a letter name and direction +-- NOTE this doesn't completely normalize right since the direction W is being cut off -- +SELECT '#1076f' As ticket, * FROM normalize_address('1940 County Road C W, Roseville, MN 55113'); + +-- Route with a name that sounds like a direction -- +SELECT '#1076g' As ticket, * FROM normalize_address('3900 Route 6, Eastham, Massachusetts 02642'); + +-- Street that has same name as type -- +SELECT '#1076h' As ticket, * FROM normalize_address('4533 PARK AVE S, MINNEAPOLIS, MN 55407'); +-- same street with alternate county name +SELECT '#1076i' As ticket, * FROM normalize_address('4533 County Road 33, MINNEAPOLIS, MN 55407'); + +-- Same case of street type that has name as a type -- +-- this matches - +SELECT '#1109a' As ticket, * from normalize_address('4373 LAKE DRIVE, ROBBINSDALE, MN 55422'); + +-- this failed -- +SELECT '#1109b' As ticket, * from normalize_address('4373 LAKE DR, ROBBINSDALE, MN 55422'); + +-- another type (Is) that is part of street name but a compound street name +SELECT '#1074a' As ticket, * FROM normalize_address('3420 RHODE ISLAND AVE S, ST. LOUIS PARK, MN 55426'); + +-- another type that is part of street name -- +SELECT '#1074b' As ticket, * FROM normalize_address('26 Court Street, Boston,MA 02109'); + +-- service roads and interstates +SELECT '#1112a' As ticket, * FROM normalize_address('8401 W 35W Service Dr NE, Blaine, MN 55449'); +SELECT '#1112b' As ticket, * FROM normalize_address('8401 35W, Blaine, MN 55449'); +SELECT '#1112c' As ticket, * FROM normalize_address('8401 35W West, Blaine, MN 55449'); +SELECT '#1112d' As ticket, * FROM normalize_address('8401 West 35W, Blaine, MN 55449'); +SELECT '#1112e' As ticket, * FROM normalize_address('8401 W 35W, Blaine, MN 55449'); + +-- Testing pretty print of highway addresses +-- These tests excerpted from Brian Hamlin's CASS failures +-- in #1077 +SELECT '#1125a' As ticket, pprint_addy(normalize_address('19596 COUNTY ROAD 480, COLCORD, OK 74338')); +SELECT '#1125b' As ticket, pprint_addy(addy), addy.* FROM normalize_address('4345 353 Rte, SALAMANCA, NY 14779') AS addy; +SELECT '#1125c' As ticket, pprint_addy(addy), addy.* FROM normalize_address('19799 STATE ROUTE O, COSBY, MO 64436') AS addy; + +-- some more to test interstate permutations +SELECT '#1125d' As ticket, pprint_addy(addy), addy.* FROM normalize_address('Interstate 90,Boston, MA') As addy; +-- this one is wrong (because the lack of space trips it up) but will fix later +SELECT '#1125e' As ticket, pprint_addy(addy), addy.* FROM normalize_address('I-90,Boston, MA') As addy; +SELECT '#1125f' As ticket, pprint_addy(addy), addy.* FROM normalize_address('I 90,Boston, MA') As addy; + +-- location with prefixes getting caught in post prefix +SELECT '#1310a' As ticket, pprint_addy(addy), addy.* FROM normalize_address('1110 W CAPITOL AVE, WEST SACRAMENTO, CA') As addy; +\timing diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2010/regress/regress.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2010/regress/regress.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2010/regress/regress.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2010/regress/regress.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,8 @@ +\a +--SET seq_page_cost='1000'; +\o normalize_address_regress.out +\i normalize_address_regress.sql +\o geocode_regress.out +\i geocode_regress.sql +\o reverse_geocode_regress.out +\i reverse_geocode_regress.sql \ No newline at end of file diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2010/regress/reverse_geocode_regress postgis-2.0.1/extras/tiger_geocoder/tiger_2010/regress/reverse_geocode_regress --- postgis-1.5.3/extras/tiger_geocoder/tiger_2010/regress/reverse_geocode_regress 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2010/regress/reverse_geocode_regress 2011-08-11 16:35:13.000000000 +0000 @@ -0,0 +1,5 @@ +I- 90, Weston, MA 02493|{"(,,90,I-,,,Weston,MA,02493,)"} +I- 90, Auburn, MA 01501|{"(,,90,I-,,,Auburn,MA,01501,)"} +158 Washington St, Boston, MA 02108|{"(158,,Washington,St,,,Boston,MA,02108,)"} +32 Capen St, Medford, MA 02155|{"(32,,Capen,St,,,Medford,MA,02155,)","(3,,Edison,Ave,,,Medford,MA,02155,)"} +58 Massachusetts Ave, Cambridge, MA 02139|{"(58,,Massachusetts,Ave,,,Cambridge,MA,02139,)","(7,,Wellesley,St,,,Cambridge,MA,02139,)","(7,,Massachusetts,Ave,,,Cambridge,MA,02139,)"} diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2010/regress/reverse_geocode_regress.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2010/regress/reverse_geocode_regress.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2010/regress/reverse_geocode_regress.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2010/regress/reverse_geocode_regress.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,7 @@ +\timing +SELECT pprint_addy(addy[1]), addy FROM reverse_geocode(ST_Point(-71.27593,42.33891)); -- I 90 Exit 14, Weston MA +SELECT pprint_addy(addy[1]), addy FROM reverse_geocode(ST_Point(-71.85335,42.19262)); -- I 90 Exit 10, Auburn, MA 01501 +SELECT pprint_addy(addy[1]), addy FROM reverse_geocode(ST_Point(-71.057811,42.358274)); -- 1 Devonshire Place (washington st area) +SELECT pprint_addy(addy[1]), addy FROM reverse_geocode(ST_Point(-71.123848,42.41115)); -- 30 capen, Medford, MA 02155 +SELECT pprint_addy(addy[1]), addy FROM reverse_geocode(ST_Point(-71.09436,42.35981)); -- 77 Massachusetts Ave, Cambridge, MA 02139 +\timing \ No newline at end of file diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2010/tables/lookup_tables_2010.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2010/tables/lookup_tables_2010.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2010/tables/lookup_tables_2010.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2010/tables/lookup_tables_2010.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,1297 @@ +--$Id: lookup_tables_2010.sql 9324 2012-02-27 22:08:12Z pramsey $ +SET search_path TO tiger, public; +-- Create direction lookup table +DROP TABLE IF EXISTS direction_lookup; +CREATE TABLE direction_lookup (name VARCHAR(20) PRIMARY KEY, abbrev VARCHAR(3)); +INSERT INTO direction_lookup (name, abbrev) VALUES('WEST', 'W'); +INSERT INTO direction_lookup (name, abbrev) VALUES('W', 'W'); +INSERT INTO direction_lookup (name, abbrev) VALUES('SW', 'SW'); +INSERT INTO direction_lookup (name, abbrev) VALUES('SOUTH-WEST', 'SW'); +INSERT INTO direction_lookup (name, abbrev) VALUES('SOUTHWEST', 'SW'); +INSERT INTO direction_lookup (name, abbrev) VALUES('SOUTH-EAST', 'SE'); +INSERT INTO direction_lookup (name, abbrev) VALUES('SOUTHEAST', 'SE'); +INSERT INTO direction_lookup (name, abbrev) VALUES('SOUTH_WEST', 'SW'); +INSERT INTO direction_lookup (name, abbrev) VALUES('SOUTH_EAST', 'SE'); +INSERT INTO direction_lookup (name, abbrev) VALUES('SOUTH', 'S'); +INSERT INTO direction_lookup (name, abbrev) VALUES('SOUTH WEST', 'SW'); +INSERT INTO direction_lookup (name, abbrev) VALUES('SOUTH EAST', 'SE'); +INSERT INTO direction_lookup (name, abbrev) VALUES('SE', 'SE'); +INSERT INTO direction_lookup (name, abbrev) VALUES('S', 'S'); +INSERT INTO direction_lookup (name, abbrev) VALUES('NW', 'NW'); +INSERT INTO direction_lookup (name, abbrev) VALUES('NORTH-WEST', 'NW'); +INSERT INTO direction_lookup (name, abbrev) VALUES('NORTHWEST', 'NW'); +INSERT INTO direction_lookup (name, abbrev) VALUES('NORTH-EAST', 'NE'); +INSERT INTO direction_lookup (name, abbrev) VALUES('NORTHEAST', 'NE'); +INSERT INTO direction_lookup (name, abbrev) VALUES('NORTH_WEST', 'NW'); +INSERT INTO direction_lookup (name, abbrev) VALUES('NORTH_EAST', 'NE'); +INSERT INTO direction_lookup (name, abbrev) VALUES('NORTH', 'N'); +INSERT INTO direction_lookup (name, abbrev) VALUES('NORTH WEST', 'NW'); +INSERT INTO direction_lookup (name, abbrev) VALUES('NORTH EAST', 'NE'); +INSERT INTO direction_lookup (name, abbrev) VALUES('NE', 'NE'); +INSERT INTO direction_lookup (name, abbrev) VALUES('N', 'N'); +INSERT INTO direction_lookup (name, abbrev) VALUES('EAST', 'E'); +INSERT INTO direction_lookup (name, abbrev) VALUES('E', 'E'); +CREATE INDEX direction_lookup_abbrev_idx ON direction_lookup (abbrev); + + + +-- Create secondary unit lookup table +DROP TABLE IF EXISTS secondary_unit_lookup; +CREATE TABLE secondary_unit_lookup (name VARCHAR(20) PRIMARY KEY, abbrev VARCHAR(5)); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('APARTMENT', 'APT'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('APT', 'APT'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('BASEMENT', 'BSMT'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('BSMT', 'BSMT'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('BUILDING', 'BLDG'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('BLDG', 'BLDG'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('DEPARTMENT', 'DEPT'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('DEPT', 'DEPT'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('FLOOR', 'FL'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('FL', 'FL'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('FRONT', 'FRNT'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('FRNT', 'FRNT'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('HANGAR', 'HNGR'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('HNGR', 'HNGR'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('LOBBY', 'LBBY'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('LBBY', 'LBBY'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('LOT', 'LOT'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('LOWER', 'LOWR'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('LOWR', 'LOWR'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('OFFICE', 'OFC'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('OFC', 'OFC'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('PENTHOUSE', 'PH'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('PH', 'PH'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('PIER', 'PIER'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('REAR', 'REAR'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('ROOM', 'RM'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('RM', 'RM'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('SIDE', 'SIDE'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('SLIP', 'SLIP'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('SPACE', 'SPC'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('SPC', 'SPC'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('STOP', 'STOP'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('SUITE', 'STE'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('STE', 'STE'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('TRAILER', 'TRLR'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('TRLR', 'TRLR'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('UNIT', 'UNIT'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('UPPER', 'UPPR'); +INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('UPPR', 'UPPR'); +CREATE INDEX secondary_unit_lookup_abbrev_idx ON secondary_unit_lookup (abbrev); + + + +-- Create state lookup table +DROP TABLE IF EXISTS state_lookup; +CREATE TABLE state_lookup (st_code INTEGER PRIMARY KEY, name VARCHAR(40) UNIQUE, abbrev VARCHAR(3) UNIQUE, statefp char(2) UNIQUE); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Alabama', 'AL', '01'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Alaska', 'AK', '02'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('American Samoa', 'AS', '60'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Arizona', 'AZ', '04'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Arkansas', 'AR', '05'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('California', 'CA', '06'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Colorado', 'CO', '08'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Connecticut', 'CT', '09'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Delaware', 'DE', '10'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('District of Columbia', 'DC', '11'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Federated States of Micronesia', 'FM', '64'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Florida', 'FL', '12'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Georgia', 'GA', '13'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Guam', 'GU', '66'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Hawaii', 'HI', '15'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Idaho', 'ID', '16'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Illinois', 'IL', '17'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Indiana', 'IN', '18'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Iowa', 'IA', '19'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Kansas', 'KS', '20'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Kentucky', 'KY', '21'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Louisiana', 'LA', '22'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Maine', 'ME', '23'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Marshall Islands', 'MH', '68'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Maryland', 'MD', '24'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Massachusetts', 'MA', '25'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Michigan', 'MI', '26'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Minnesota', 'MN', '27'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Mississippi', 'MS', '28'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Missouri', 'MO', '29'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Montana', 'MT', '30'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Nebraska', 'NE', '31'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Nevada', 'NV', '32'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('New Hampshire', 'NH', '33'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('New Jersey', 'NJ', '34'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('New Mexico', 'NM', '35'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('New York', 'NY', '36'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('North Carolina', 'NC', '37'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('North Dakota', 'ND', '38'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Northern Mariana Islands', 'MP', '69'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Ohio', 'OH', '39'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Oklahoma', 'OK', '40'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Oregon', 'OR', '41'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Palau', 'PW', '70'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Pennsylvania', 'PA', '42'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Puerto Rico', 'PR', '72'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Rhode Island', 'RI', '44'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('South Carolina', 'SC', '45'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('South Dakota', 'SD', '46'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Tennessee', 'TN', '47'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Texas', 'TX', '48'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Utah', 'UT', '49'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Vermont', 'VT', '50'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Virgin Islands', 'VI', '78'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Virginia', 'VA', '51'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Washington', 'WA', '53'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('West Virginia', 'WV', '54'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Wisconsin', 'WI', '55'); +INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Wyoming', 'WY', '56'); +-- NOTE: fix later -- this is wrong for those - state code ones +UPDATE state_lookup SET statefp = lpad(st_code::text,2,'0'); + + +-- Create street type lookup table +DROP TABLE IF EXISTS street_type_lookup; +CREATE TABLE street_type_lookup (name VARCHAR(50) PRIMARY KEY, abbrev VARCHAR(50), is_hw boolean NOT NULL DEFAULT false); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ALLEE', 'Aly'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ALLEY', 'Aly'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ALLY', 'Aly'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ALY', 'Aly'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ANEX', 'Anx'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ANNEX', 'Anx'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ANNX', 'Anx'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ANX', 'Anx'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ARC', 'Arc'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ARCADE', 'Arc'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('AV', 'Ave'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('AVE', 'Ave'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('AVEN', 'Ave'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('AVENU', 'Ave'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('AVENUE', 'Ave'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('AVN', 'Ave'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('AVNUE', 'Ave'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BAYOO', 'Byu'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BAYOU', 'Byu'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BCH', 'Bch'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BEACH', 'Bch'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BEND', 'Bnd'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BND', 'Bnd'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BLF', 'Blf'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BLUF', 'Blf'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BLUFF', 'Blf'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BLUFFS', 'Blfs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BOT', 'Btm'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BOTTM', 'Btm'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BOTTOM', 'Btm'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BTM', 'Btm'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BLVD', 'Blvd'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BOUL', 'Blvd'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BOULEVARD', 'Blvd'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BOULV', 'Blvd'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BR', 'Br'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BRANCH', 'Br'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BRNCH', 'Br'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BRDGE', 'Brg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BRG', 'Brg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BRIDGE', 'Brg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BRK', 'Brk'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BROOK', 'Brk'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BROOKS', 'Brks'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BURG', 'Bg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BURGS', 'Bgs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BYP', 'Byp'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BYPA', 'Byp'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BYPAS', 'Byp'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BYPASS', 'ByP'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BYPS', 'Byp'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CAMP', 'Cp'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CMP', 'Cp'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CP', 'Cp'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CANYN', 'Cyn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CANYON', 'Cyn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CNYN', 'Cyn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CYN', 'Cyn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CAPE', 'Cpe'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CPE', 'Cpe'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CAUSEWAY', 'Cswy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CAUSWAY', 'Cswy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CSWY', 'Cswy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CEN', 'Ctr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CENT', 'Ctr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CENTER', 'Ctr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CENTR', 'Ctr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CENTRE', 'Ctr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CNTER', 'Ctr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CNTR', 'Ctr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CTR', 'Ctr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CENTERS', 'Ctrs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CIR', 'Cir'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CIRC', 'Cir'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CIRCL', 'Cir'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CIRCLE', 'Cir'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRCL', 'Cir'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRCLE', 'Cir'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CIRCLES', 'Cirs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CLF', 'Clf'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CLIFF', 'Clf'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CLFS', 'Clfs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CLIFFS', 'Clfs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CLB', 'Clb'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CLUB', 'Clb'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('COMMON', 'Cmn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('COR', 'Cor'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CORNER', 'Cor'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CORNERS', 'Cors'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CORS', 'Cors'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('COURSE', 'Crse'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRSE', 'Crse'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('COURT', 'Ct'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRT', 'Ct'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CT', 'Ct'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('COURTS', 'Cts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('COVE', 'Cv'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CV', 'Cv'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('COVES', 'Cvs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CK', 'Crk'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CR', 'Crk'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CREEK', 'Crk'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRK', 'Crk'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRECENT', 'Cres'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRES', 'Cres'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRESCENT', 'Cres'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRESENT', 'Cres'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRSCNT', 'Cres'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRSENT', 'Cres'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRSNT', 'Cres'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CREST', 'Crst'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CROSSING', 'Xing'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRSSING', 'Xing'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRSSNG', 'Xing'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('XING', 'Xing'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CROSSROAD', 'Xrd'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CURVE', 'Curv'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('DALE', 'Dl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('DL', 'Dl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('DAM', 'Dm'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('DM', 'Dm'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('DIV', 'Dv'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('DIVIDE', 'Dv'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('DV', 'Dv'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('DVD', 'Dv'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('DR', 'Dr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('DRIV', 'Dr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('DRIVE', 'Dr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('DRV', 'Dr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('DRIVES', 'Drs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('EST', 'Est'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ESTATE', 'Est'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ESTATES', 'Ests'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ESTS', 'Ests'); +--INSERT INTO street_type_lookup (name, abbrev) VALUES ('EXP', 'Expy'); +--INSERT INTO street_type_lookup (name, abbrev) VALUES ('EXPR', 'Expy'); +--INSERT INTO street_type_lookup (name, abbrev) VALUES ('EXPRESS', 'Expy'); +--INSERT INTO street_type_lookup (name, abbrev) VALUES ('EXPRESSWAY', 'Expy'); +--INSERT INTO street_type_lookup (name, abbrev) VALUES ('EXPW', 'Expy'); +--INSERT INTO street_type_lookup (name, abbrev) VALUES ('EXPY', 'Expy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('EXT', 'Ext'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('EXTENSION', 'Ext'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('EXTN', 'Ext'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('EXTNSN', 'Ext'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('EXTENSIONS', 'Exts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('EXTS', 'Exts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FALL', 'Fall'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FALLS', 'Fls'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FLS', 'Fls'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FERRY', 'Fry'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FRRY', 'Fry'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FRY', 'Fry'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FIELD', 'Fld'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FLD', 'Fld'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FIELDS', 'Flds'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FLDS', 'Flds'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FLAT', 'Flt'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FLT', 'Flt'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FLATS', 'Flts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FLTS', 'Flts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FORD', 'Frd'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FRD', 'Frd'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FORDS', 'Frds'); +--INSERT INTO street_type_lookup (name, abbrev) VALUES ('FOREST', 'Frst'); +--INSERT INTO street_type_lookup (name, abbrev) VALUES ('FORESTS', 'Frst'); +--INSERT INTO street_type_lookup (name, abbrev) VALUES ('FRST', 'Frst'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FORG', 'Frg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FORGE', 'Frg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FRG', 'Frg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FORGES', 'Frgs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FORK', 'Frk'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FRK', 'Frk'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FORKS', 'Frks'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FRKS', 'Frks'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FORT', 'Ft'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FRT', 'Ft'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FT', 'Ft'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GARDEN', 'Gdn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GARDN', 'Gdn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GDN', 'Gdn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GRDEN', 'Gdn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GRDN', 'Gdn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GARDENS', 'Gdns'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GDNS', 'Gdns'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GRDNS', 'Gdns'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GATEWAY', 'Gtwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GATEWY', 'Gtwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GATWAY', 'Gtwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GTWAY', 'Gtwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GTWY', 'Gtwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GLEN', 'Gln'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GLN', 'Gln'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GLENS', 'Glns'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GREEN', 'Grn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GRN', 'Grn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GREENS', 'Grns'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GROV', 'Grv'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GROVE', 'Grv'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GRV', 'Grv'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GROVES', 'Grvs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HARB', 'Hbr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HARBOR', 'Hbr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HARBR', 'Hbr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HBR', 'Hbr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HRBOR', 'Hbr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HARBORS', 'Hbrs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HAVEN', 'Hvn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HAVN', 'Hvn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HVN', 'Hvn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HEIGHT', 'Hts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HEIGHTS', 'Hts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HGTS', 'Hts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HT', 'Hts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HTS', 'Hts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HILL', 'Hl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HL', 'Hl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HILLS', 'Hls'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HLS', 'Hls'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HLLW', 'Holw'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HOLLOW', 'Holw'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HOLLOWS', 'Holw'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HOLW', 'Holw'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HOLWS', 'Holw'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('INLET', 'Inlt'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('INLT', 'Inlt'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('IS', 'Is'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ISLAND', 'Is'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ISLND', 'Is'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ISLANDS', 'Iss'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ISLNDS', 'Iss'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ISS', 'Iss'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ISLE', 'Isle'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ISLES', 'Isle'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('JCT', 'Jct'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('JCTION', 'Jct'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('JCTN', 'Jct'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('JUNCTION', 'Jct'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('JUNCTN', 'Jct'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('JUNCTON', 'Jct'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('JCTNS', 'Jcts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('JCTS', 'Jcts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('JUNCTIONS', 'Jcts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('KEY', 'Ky'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('KY', 'Ky'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('KEYS', 'Kys'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('KYS', 'Kys'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('KNL', 'Knl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('KNOL', 'Knl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('KNOLL', 'Knl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('KNLS', 'Knls'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('KNOLLS', 'Knls'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LAKE', 'Lk'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LK', 'Lk'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LAKES', 'Lks'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LKS', 'Lks'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LAND', 'Land'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LANDING', 'Lndg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LNDG', 'Lndg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LNDNG', 'Lndg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LA', 'Ln'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LANE', 'Ln'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LANES', 'Ln'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LN', 'Ln'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LGT', 'Lgt'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LIGHT', 'Lgt'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LIGHTS', 'Lgts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LF', 'Lf'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LOAF', 'Lf'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LCK', 'Lck'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LOCK', 'Lck'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LCKS', 'Lcks'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LOCKS', 'Lcks'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LDG', 'Ldg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LDGE', 'Ldg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LODG', 'Ldg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LODGE', 'Ldg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LOOP', 'Loop'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LOOPS', 'Loop'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MALL', 'Mall'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MANOR', 'Mnr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MNR', 'Mnr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MANORS', 'Mnrs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MNRS', 'Mnrs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MDW', 'Mdw'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MEADOW', 'Mdw'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MDWS', 'Mdws'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MEADOWS', 'Mdws'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MEDOWS', 'Mdws'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MEWS', 'Mews'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MILL', 'Ml'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ML', 'Ml'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MILLS', 'Mls'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MLS', 'Mls'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MISSION', 'Msn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MISSN', 'Msn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MSN', 'Msn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MSSN', 'Msn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MOTORWAY', 'Mtwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MNT', 'Mt'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MOUNT', 'Mt'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MT', 'Mt'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MNTAIN', 'Mtn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MNTN', 'Mtn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MOUNTAIN', 'Mtn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MOUNTIN', 'Mtn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MTIN', 'Mtn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MTN', 'Mtn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MNTNS', 'Mtns'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MOUNTAINS', 'Mtns'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('NCK', 'Nck'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('NECK', 'Nck'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ORCH', 'Orch'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ORCHARD', 'Orch'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ORCHRD', 'Orch'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('OVAL', 'Oval'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('OVL', 'Oval'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('OVERPASS', 'Opas'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PARK', 'Park'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PK', 'Park'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PRK', 'Park'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PARKS', 'Park'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PARKWAY', 'Pkwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PARKWY', 'Pkwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PKWAY', 'Pkwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PKWY', 'Pkwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PKY', 'Pkwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PARKWAYS', 'Pkwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PKWYS', 'Pkwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PASS', 'Pass'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PASSAGE', 'Psge'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PATH', 'Path'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PATHS', 'Path'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PIKE', 'Pike'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PIKES', 'Pike'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PINE', 'Pne'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PINES', 'Pnes'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PNES', 'Pnes'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PL', 'Pl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PLACE', 'Pl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PLAIN', 'Pln'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PLN', 'Pln'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PLAINES', 'Plns'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PLAINS', 'Plns'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PLNS', 'Plns'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PLAZA', 'Plz'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PLZ', 'Plz'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PLZA', 'Plz'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('POINT', 'Pt'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PT', 'Pt'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('POINTS', 'Pts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PTS', 'Pts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PORT', 'Prt'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PRT', 'Prt'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PORTS', 'Prts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PRTS', 'Prts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PR', 'Pr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PRAIRIE', 'Pr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PRARIE', 'Pr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PRR', 'Pr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RAD', 'Radl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RADIAL', 'Radl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RADIEL', 'Radl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RADL', 'Radl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RAMP', 'Ramp'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RANCH', 'Rnch'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RANCHES', 'Rnch'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RNCH', 'Rnch'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RNCHS', 'Rnch'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RAPID', 'Rpd'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RPD', 'Rpd'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RAPIDS', 'Rpds'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RPDS', 'Rpds'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('REST', 'Rst'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RST', 'Rst'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RDG', 'Rdg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RDGE', 'Rdg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RIDGE', 'Rdg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RDGS', 'Rdgs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RIDGES', 'Rdgs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RIV', 'Riv'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RIVER', 'Riv'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RIVR', 'Riv'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RVR', 'Riv'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RD', 'Rd'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ROAD', 'Rd'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RDS', 'Rds'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ROADS', 'Rds'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ROW', 'Row'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RUE', 'Rue'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RUN', 'Run'); +-- Start newly added 2011-7-12 -- +INSERT INTO street_type_lookup (name, abbrev) + VALUES + ('SERVICE DRIVE', 'Svc Dr'), + ('SERVICE DR', 'Svc Dr'), + ('SERVICE ROAD', 'Svc Rd'), + ('SERVICE RD', 'Svc Rd') ; +-- end newly added 2011-07-12 -- +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SHL', 'Shl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SHOAL', 'Shl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SHLS', 'Shls'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SHOALS', 'Shls'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SHOAR', 'Shr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SHORE', 'Shr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SHR', 'Shr'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SHOARS', 'Shrs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SHORES', 'Shrs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SHRS', 'Shrs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SKYWAY', 'Skwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SPG', 'Spg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SPNG', 'Spg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SPRING', 'Spg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SPRNG', 'Spg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SPGS', 'Spgs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SPNGS', 'Spgs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SPRINGS', 'Spgs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SPRNGS', 'Spgs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SPUR', 'Spur'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SPURS', 'Spur'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SQ', 'Sq'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SQR', 'Sq'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SQRE', 'Sq'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SQU', 'Sq'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SQUARE', 'Sq'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SQRS', 'Sqs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SQUARES', 'Sqs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('STA', 'Sta'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('STATION', 'Sta'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('STATN', 'Sta'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('STN', 'Sta'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('STRA', 'Stra'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('STRAV', 'Stra'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('STRAVE', 'Stra'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('STRAVEN', 'Stra'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('STRAVENUE', 'Stra'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('STRAVN', 'Stra'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('STRVN', 'Stra'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('STRVNUE', 'Stra'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('STREAM', 'Strm'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('STREME', 'Strm'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('STRM', 'Strm'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('ST', 'St'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('STR', 'St'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('STREET', 'St'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('STRT', 'St'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('STREETS', 'Sts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SMT', 'Smt'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SUMIT', 'Smt'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SUMITT', 'Smt'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SUMMIT', 'Smt'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TER', 'Ter'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TERR', 'Ter'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TERRACE', 'Ter'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('THROUGHWAY', 'Trwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRACE', 'Trce'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRACES', 'Trce'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRCE', 'Trce'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRACK', 'Trak'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRACKS', 'Trak'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRAK', 'Trak'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRK', 'Trak'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRKS', 'Trak'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRAFFICWAY', 'Trfy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRFY', 'Trfy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TR', 'Trl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRAIL', 'Trl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRAILS', 'Trl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRL', 'Trl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRLS', 'Trl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TUNEL', 'Tunl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TUNL', 'Tunl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TUNLS', 'Tunl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TUNNEL', 'Tunl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TUNNELS', 'Tunl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TUNNL', 'Tunl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('UNDERPASS', 'Upas'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('UN', 'Un'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('UNION', 'Un'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('UNIONS', 'Uns'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VALLEY', 'Vly'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VALLY', 'Vly'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VLLY', 'Vly'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VLY', 'Vly'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VALLEYS', 'Vlys'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VLYS', 'Vlys'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VDCT', 'Via'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VIA', 'Via'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VIADCT', 'Via'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VIADUCT', 'Via'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VIEW', 'Vw'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VW', 'Vw'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VIEWS', 'Vws'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VWS', 'Vws'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VILL', 'Vlg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VILLAG', 'Vlg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VILLAGE', 'Vlg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VILLG', 'Vlg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VILLIAGE', 'Vlg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VLG', 'Vlg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VILLAGES', 'Vlgs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VLGS', 'Vlgs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VILLE', 'Vl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VL', 'Vl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VIS', 'Vis'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VIST', 'Vis'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VISTA', 'Vis'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VST', 'Vis'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('VSTA', 'Vis'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('WALK', 'Walk'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('WALKS', 'Walk'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('WALL', 'Wall'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('WAY', 'Way'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('WY', 'Way'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('WAYS', 'Ways'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('WELL', 'Wl'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('WELLS', 'Wls'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('WLS', 'Wls'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BYU', 'Byu'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BLFS', 'Blfs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BRKS', 'Brks'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BG', 'Bg'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('BGS', 'Bgs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CTRS', 'Ctrs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CIRS', 'Cirs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CMN', 'Cmn'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CTS', 'Cts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CVS', 'Cvs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CRST', 'Crst'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('XRD', 'Xrd'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('CURV', 'Curv'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('DRS', 'Drs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FRDS', 'Frds'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('FRGS', 'Frgs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GLNS', 'Glns'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GRNS', 'Grns'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('GRVS', 'Grvs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('HBRS', 'Hbrs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('LGTS', 'Lgts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MTWY', 'Mtwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('MTNS', 'Mtns'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('OPAS', 'Opas'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PSGE', 'Psge'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('PNE', 'Pne'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('RTE', 'Rte'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SKWY', 'Skwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('SQS', 'Sqs'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('STS', 'Sts'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('TRWY', 'Trwy'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('UPAS', 'Upas'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('UNS', 'Uns'); +INSERT INTO street_type_lookup (name, abbrev) VALUES ('WL', 'Wl'); + +-- prefix and suffix street names for highways and foreign named roads +-- where street type is at front of streetname instead of after +-- these usually have numbers for street names and often have spaces in type +INSERT INTO street_type_lookup (name, abbrev, is_hw) +SELECT name, abbrev, true + FROM (VALUES + ('CAM', 'Cam'), + ('CAM.', 'Cam'), + ('CAMINO', 'Cam'), + ('CO HWY', 'Co Hwy'), + ('COUNTY HWY', 'Co Hwy'), + ('COUNTY HIGHWAY', 'Co Hwy'), + ('COUNTY HIGH WAY', 'Co Hwy'), + ('COUNTY ROAD', 'Co Rd'), + ('CO RD', 'Co Rd'), + ('CORD', 'Co Rd'), + ('CO RTE', 'Co Rte'), + ('COUNTY ROUTE', 'Co Rte'), + ('CO ST AID HWY', 'Co St Aid Hwy'), + ('EXP', 'Expy'), + ('EXPR', 'Expy'), + ('EXPRESS', 'Expy'), + ('EXPRESSWAY', 'Expy'), + ('EXPW', 'Expy'), + ('EXPY', 'Expy'), + ('FARM RD', 'Farm Rd'), + ('FIRE RD', 'Fire Rd'), + ('FOREST RD', 'Forest Rd'), + ('FOREST ROAD', 'Forest Rd'), + ('FOREST RTE', 'Forest Rte'), + ('FOREST ROUTE', 'Forest Rte'), + ('FREEWAY', 'Fwy'), + ('FREEWY', 'Fwy'), + ('FRWAY', 'Fwy'), + ('FRWY', 'Fwy'), + ('FWY', 'Fwy'), + ('HIGHWAY', 'Hwy'), + ('HIGHWY', 'Hwy'), + ('HIWAY', 'Hwy'), + ('HIWY', 'Hwy'), + ('HWAY', 'Hwy'), + ('HWY', 'Hwy'), + ('I', 'I-'), + ('I-', 'I-'), + ('INTERSTATE', 'I-'), + ('INTERSTATE ROUTE', 'I-'), + ('INTERSTATE RTE', 'I-'), + ('INTERSTATE RTE.', 'I-'), + ('INTERSTATE RT', 'I-'), + ('LOOP', 'Loop'), + ('ROUTE', 'Rte'), + ('RTE', 'Rte'), + ('RT', 'Rte'), + ('STATE HWY', 'State Hwy'), + ('STATE HIGHWAY', 'State Hwy'), + ('STATE HIGH WAY', 'State Hwy'), + ('STATE RD', 'State Rd'), + ('STATE ROAD', 'State Rd'), + ('STATE ROUTE', 'State Rte'), + ('STATE RTE', 'State Rte'), + ('TPK', 'Tpke'), + ('TPKE', 'Tpke'), + ('TRNPK', 'Tpke'), + ('TRPK', 'Tpke'), + ('TURNPIKE', 'Tpke'), + ('TURNPK', 'Tpke'), + ('US HWY', 'US Hwy'), + ('US HIGHWAY', 'US Hwy'), + ('US HIGH WAY', 'US Hwy'), + ('US RTE', 'US Rte'), + ('US ROUTE', 'US Rte'), + ('US RT', 'US Rte'), + ('USFS HWY', 'USFS Hwy'), + ('USFS HIGHWAY', 'USFS Hwy'), + ('USFS HIGH WAY', 'USFS Hwy'), + ('USFS RD', 'USFS Rd'), + ('USFS ROAD', 'USFS Rd') + ) t(name, abbrev) + WHERE t.name NOT IN(SELECT name FROM street_type_lookup); +CREATE INDEX street_type_lookup_abbrev_idx ON street_type_lookup (abbrev); + +-- Create place and countysub lookup tables +DROP TABLE IF EXISTS place_lookup; +CREATE TABLE place_lookup ( + st_code INTEGER, + state VARCHAR(2), + pl_code INTEGER, + name VARCHAR(90), + PRIMARY KEY (st_code,pl_code) +); + +/** +INSERT INTO place_lookup + SELECT + pl.state::integer as st_code, + sl.abbrev as state, + pl.placefp::integer as pl_code, + pl.name as name + FROM + pl99_d00 pl + JOIN state_lookup sl ON (pl.state = lpad(sl.st_code,2,'0')) + GROUP BY pl.state, sl.abbrev, pl.placefp, pl.name; +**/ +CREATE INDEX place_lookup_name_idx ON place_lookup (soundex(name)); +CREATE INDEX place_lookup_state_idx ON place_lookup (state); + +DROP TABLE IF EXISTS county_lookup; +CREATE TABLE county_lookup ( + st_code INTEGER, + state VARCHAR(2), + co_code INTEGER, + name VARCHAR(90), + PRIMARY KEY (st_code, co_code) +); + +/** +INSERT INTO county_lookup + SELECT + co.state::integer as st_code, + sl.abbrev as state, + co.county::integer as co_code, + co.name as name + FROM + co99_d00 co + JOIN state_lookup sl ON (co.state = lpad(sl.st_code,2,'0')) + GROUP BY co.state, sl.abbrev, co.county, co.name; +**/ +CREATE INDEX county_lookup_name_idx ON county_lookup (soundex(name)); +CREATE INDEX county_lookup_state_idx ON county_lookup (state); + +DROP TABLE IF EXISTS countysub_lookup; +CREATE TABLE countysub_lookup ( + st_code INTEGER, + state VARCHAR(2), + co_code INTEGER, + county VARCHAR(90), + cs_code INTEGER, + name VARCHAR(90), + PRIMARY KEY (st_code, co_code, cs_code) +); + +/** +INSERT INTO countysub_lookup + SELECT + cs.state::integer as st_code, + sl.abbrev as state, + cs.county::integer as co_code, + cl.name as county, + cs.cousubfp::integer as cs_code, + cs.name as name + FROM + cs99_d00 cs + JOIN state_lookup sl ON (cs.state = lpad(sl.st_code,2,'0')) + JOIN county_lookup cl ON (cs.state = lpad(cl.st_code,2,'0') AND cs.county = cl.co_code) + GROUP BY cs.state, sl.abbrev, cs.county, cl.name, cs.cousubfp, cs.name; +**/ +CREATE INDEX countysub_lookup_name_idx ON countysub_lookup (soundex(name)); +CREATE INDEX countysub_lookup_state_idx ON countysub_lookup (state); + +DROP TABLE IF EXISTS zip_lookup_all; +CREATE TABLE zip_lookup_all ( + zip INTEGER, + st_code INTEGER, + state VARCHAR(2), + co_code INTEGER, + county VARCHAR(90), + cs_code INTEGER, + cousub VARCHAR(90), + pl_code INTEGER, + place VARCHAR(90), + cnt INTEGER +); + +/** SET work_mem = '2GB'; + +INSERT INTO zip_lookup_all + SELECT *,count(*) as cnt FROM + (SELECT + zipl as zip, + rl.statel as st_code, + sl.abbrev as state, + rl.countyl as co_code, + cl.name as county, + rl.cousubl as cs_code, + cs.name as countysub, + rl.placel as pl_code, + pl.name as place + FROM + roads_local rl + JOIN state_lookup sl ON (rl.statel = lpad(sl.st_code,2,'0')) + LEFT JOIN county_lookup cl ON (rl.statel = lpad(cl.st_code,2,'0') AND rl.countyl = cl.co_code) + LEFT JOIN countysub_lookup cs ON (rl.statel = lpad(cs.st_code,2,'0') AND rl.countyl = cs.co_code AND rl.cousubl = cs.cs_code) + LEFT JOIN place_lookup pl ON (rl.statel = lpad(pl.st_code,2,'0') AND rl.placel = pl.pl_code) + WHERE zipl IS NOT NULL + UNION ALL + SELECT + zipr as zip, + rl.stater as st_code, + sl.abbrev as state, + rl.countyr as co_code, + cl.name as county, + rl.cousubr as cs_code, + cs.name as countysub, + rl.placer as pl_code, + pl.name as place + FROM + roads_local rl + JOIN state_lookup sl ON (rl.stater = lpad(sl.st_code,2,'0')) + LEFT JOIN county_lookup cl ON (rl.stater = lpad(cl.st_code,2,'0') AND rl.countyr = cl.co_code) + LEFT JOIN countysub_lookup cs ON (rl.stater = lpad(cs.st_code,2,'0') AND rl.countyr = cs.co_code AND rl.cousubr = cs.cs_code) + LEFT JOIN place_lookup pl ON (rl.stater = lpad(pl.st_code,2,'0') AND rl.placer = pl.pl_code) + WHERE zipr IS NOT NULL + ) as subquery + GROUP BY zip, st_code, state, co_code, county, cs_code, countysub, pl_code, place; +**/ +DROP TABLE IF EXISTS zip_lookup_base; +CREATE TABLE zip_lookup_base ( + zip varchar(5), + state VARCHAR(40), + county VARCHAR(90), + city VARCHAR(90), + statefp varchar(2), + PRIMARY KEY (zip) +); + +-- INSERT INTO zip_lookup_base +-- Populate through magic +-- If anyone knows of a good, public, free, place to pull this information from, that'd be awesome to have... + +DROP TABLE IF EXISTS zip_lookup; +CREATE TABLE zip_lookup ( + zip INTEGER, + st_code INTEGER, + state VARCHAR(2), + co_code INTEGER, + county VARCHAR(90), + cs_code INTEGER, + cousub VARCHAR(90), + pl_code INTEGER, + place VARCHAR(90), + cnt INTEGER, + PRIMARY KEY (zip) +); + +DROP TABLE IF EXISTS zcta500; +/** +INSERT INTO zip_lookup + SELECT + DISTINCT ON (zip) + zip, + st_code, + state, + co_code, + county, + cs_code, + cousub, + pl_code, + place, + cnt + FROM zip_lookup_all + ORDER BY zip,cnt desc; + **/ +DROP TABLE IF EXISTS county; +CREATE TABLE county +( + gid SERIAL NOT NULL, + statefp character varying(2), + countyfp character varying(3), + countyns character varying(8), + cntyidfp character varying(5) PRIMARY KEY NOT NULL, + "name" character varying(100), + namelsad character varying(100), + lsad character varying(2), + classfp character varying(2), + mtfcc character varying(5), + csafp character varying(3), + cbsafp character varying(5), + metdivfp character varying(5), + funcstat character varying(1), + aland bigint, + awater double precision, + intptlat character varying(11), + intptlon character varying(12), + the_geom geometry, + CONSTRAINT uidx_county_gid UNIQUE (gid), + CONSTRAINT enforce_dims_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269) +); +CREATE INDEX idx_tiger_county ON county USING btree (countyfp); + +DROP TABLE IF EXISTS state; +CREATE TABLE state +( + gid serial NOT NULL, + region character varying(2), + division character varying(2), + statefp character varying(2), + statens character varying(8), + stusps character varying(2) NOT NULL, + "name" character varying(100), + lsad character varying(2), + mtfcc character varying(5), + funcstat character varying(1), + aland bigint, + awater bigint, + intptlat character varying(11), + intptlon character varying(12), + the_geom geometry, + CONSTRAINT state_pkey PRIMARY KEY (stusps), + CONSTRAINT uidx_tiger_state_gid UNIQUE (gid), + CONSTRAINT enforce_dims_the_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 4269) +); +CREATE INDEX tiger_state_the_geom_gist ON state USING gist(the_geom); + +DROP TABLE IF EXISTS place; +CREATE TABLE place +( + gid serial NOT NULL, + statefp character varying(2), + placefp character varying(5), + placens character varying(8), + plcidfp character varying(7) PRIMARY KEY, + "name" character varying(100), + namelsad character varying(100), + lsad character varying(2), + classfp character varying(2), + cpi character varying(1), + pcicbsa character varying(1), + pcinecta character varying(1), + mtfcc character varying(5), + funcstat character varying(1), + aland bigint, + awater bigint, + intptlat character varying(11), + intptlon character varying(12), + the_geom geometry, + CONSTRAINT uidx_tiger_place_gid UNIQUE (gid), + CONSTRAINT enforce_dims_the_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 4269) +); +CREATE INDEX tiger_place_the_geom_gist ON place USING gist(the_geom); + +DROP TABLE IF EXISTS zip_state; +CREATE TABLE zip_state +( + zip character varying(5) NOT NULL, + stusps character varying(2) NOT NULL, + statefp character varying(2), + CONSTRAINT zip_state_pkey PRIMARY KEY (zip, stusps) +); + +DROP TABLE IF EXISTS zip_state_loc; +CREATE TABLE zip_state_loc +( + zip character varying(5) NOT NULL, + stusps character varying(2) NOT NULL, + statefp character varying(2), + place varchar(100), + CONSTRAINT zip_state_loc_pkey PRIMARY KEY (zip, stusps, place) +); + +DROP TABLE IF EXISTS cousub; +CREATE TABLE cousub +( + gid serial NOT NULL, + statefp character varying(2), + countyfp character varying(3), + cousubfp character varying(5), + cousubns character varying(8), + cosbidfp character varying(10) NOT NULL PRIMARY KEY, + "name" character varying(100), + namelsad character varying(100), + lsad character varying(2), + classfp character varying(2), + mtfcc character varying(5), + cnectafp character varying(3), + nectafp character varying(5), + nctadvfp character varying(5), + funcstat character varying(1), + aland numeric(14), + awater numeric(14), + intptlat character varying(11), + intptlon character varying(12), + the_geom geometry, + CONSTRAINT uidx_cousub_gid UNIQUE (gid), + CONSTRAINT enforce_dims_the_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 4269) +); + +CREATE INDEX tige_cousub_the_geom_gist ON cousub USING gist(the_geom); + +DROP TABLE IF EXISTS edges; +CREATE TABLE edges +( + gid SERIAL NOT NULL PRIMARY KEY, + statefp character varying(2), + countyfp character varying(3), + tlid bigint, + tfidl numeric(10), + tfidr numeric(10), + mtfcc character varying(5), + fullname character varying(100), + smid character varying(22), + lfromadd character varying(12), + ltoadd character varying(12), + rfromadd character varying(12), + rtoadd character varying(12), + zipl character varying(5), + zipr character varying(5), + featcat character varying(1), + hydroflg character varying(1), + railflg character varying(1), + roadflg character varying(1), + olfflg character varying(1), + passflg character varying(1), + divroad character varying(1), + exttyp character varying(1), + ttyp character varying(1), + deckedroad character varying(1), + artpath character varying(1), + persist character varying(1), + gcseflg character varying(1), + offsetl character varying(1), + offsetr character varying(1), + tnidf numeric(10), + tnidt numeric(10), + the_geom geometry, + CONSTRAINT enforce_dims_the_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'MULTILINESTRING'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 4269) +); +CREATE INDEX idx_edges_tlid ON edges USING btree(tlid); +CREATE INDEX idx_tiger_edges_countyfp ON edges USING btree(countyfp); +CREATE INDEX tiger_edges_the_geom_gist ON edges USING gist(the_geom); + +DROP TABLE IF EXISTS faces; +CREATE TABLE faces +( +gid serial NOT NULL PRIMARY KEY, + tfid numeric(10,0), + statefp00 varchar(2), + countyfp00 varchar(3), + tractce00 varchar(6), + blkgrpce00 varchar(1), + blockce00 varchar(4), + cousubfp00 varchar(5), + submcdfp00 varchar(5), + conctyfp00 varchar(5), + placefp00 varchar(5), + aiannhfp00 varchar(5), + aiannhce00 varchar(4), + comptyp00 varchar(1), + trsubfp00 varchar(5), + trsubce00 varchar(3), + anrcfp00 varchar(5), + elsdlea00 varchar(5), + scsdlea00 varchar(5), + unsdlea00 varchar(5), + uace00 varchar(5), + cd108fp varchar(2), + sldust00 varchar(3), + sldlst00 varchar(3), + vtdst00 varchar(6), + zcta5ce00 varchar(5), + tazce00 varchar(6), + ugace00 varchar(5), + puma5ce00 varchar(5), + statefp varchar(2), + countyfp varchar(3), + tractce varchar(6), + blkgrpce varchar(1), + blockce varchar(4), + cousubfp varchar(5), + submcdfp varchar(5), + conctyfp varchar(5), + placefp varchar(5), + aiannhfp varchar(5), + aiannhce varchar(4), + comptyp varchar(1), + trsubfp varchar(5), + trsubce varchar(3), + anrcfp varchar(5), + ttractce varchar(6), + tblkgpce varchar(1), + elsdlea varchar(5), + scsdlea varchar(5), + unsdlea varchar(5), + uace varchar(5), + cd111fp varchar(2), + sldust varchar(3), + sldlst varchar(3), + vtdst varchar(6), + zcta5ce varchar(5), + tazce varchar(6), + ugace varchar(5), + puma5ce varchar(5), + csafp varchar(3), + cbsafp varchar(5), + metdivfp varchar(5), + cnectafp varchar(3), + nectafp varchar(5), + nctadvfp varchar(5), + lwflag varchar(1), + "offset" varchar(1), + atotal double precision, + intptlat varchar(11), + intptlon varchar(12), + the_geom geometry, + CONSTRAINT enforce_dims_the_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 4269) +); +CREATE INDEX idx_tiger_faces_tfid ON faces USING btree (tfid); +CREATE INDEX idx_tiger_faces_countyfp ON faces USING btree(countyfp); +CREATE INDEX tiger_faces_the_geom_gist ON faces USING gist(the_geom); + +DROP TABLE IF EXISTS featnames; +CREATE TABLE featnames +( + gid SERIAL NOT NULL, + tlid bigint, + fullname character varying(100), + "name" character varying(100), + predirabrv character varying(15), + pretypabrv character varying(50), + prequalabr character varying(15), + sufdirabrv character varying(15), + suftypabrv character varying(50), + sufqualabr character varying(15), + predir character varying(2), + pretyp character varying(3), + prequal character varying(2), + sufdir character varying(2), + suftyp character varying(3), + sufqual character varying(2), + linearid character varying(22), + mtfcc character varying(5), + paflag character varying(1), + CONSTRAINT featnames_pkey PRIMARY KEY (gid) +); +ALTER TABLE featnames ADD COLUMN statefp character varying(2); +CREATE INDEX idx_tiger_featnames_snd_name ON featnames USING btree (soundex(name)); +CREATE INDEX idx_tiger_featnames_lname ON featnames USING btree (lower(name)); +CREATE INDEX idx_tiger_featnames_tlid_statefp ON featnames USING btree (tlid,statefp); + +CREATE TABLE addr +( + gid SERIAL NOT NULL, + tlid bigint, + fromhn character varying(12), + tohn character varying(12), + side character varying(1), + zip character varying(5), + plus4 character varying(4), + fromtyp character varying(1), + totyp character varying(1), + fromarmid integer, + toarmid integer, + arid character varying(22), + mtfcc character varying(5), + CONSTRAINT addr_pkey PRIMARY KEY (gid) +); +ALTER TABLE addr ADD COLUMN statefp character varying(2); + +CREATE INDEX idx_tiger_addr_tlid_statefp ON addr USING btree(tlid,statefp); +CREATE INDEX idx_tiger_addr_zip ON addr USING btree (zip); + +--DROP TABLE IF EXISTS zcta5; +CREATE TABLE zcta5 +( + gid serial NOT NULL, + statefp character varying(2), + zcta5ce character varying(5), + classfp character varying(2), + mtfcc character varying(5), + funcstat character varying(1), + aland double precision, + awater double precision, + intptlat character varying(11), + intptlon character varying(12), + partflg character varying(1), + the_geom geometry, + CONSTRAINT uidx_tiger_zcta5_gid UNIQUE (gid), + CONSTRAINT enforce_dims_the_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 4269), + CONSTRAINT pk_tiger_zcta5_zcta5ce PRIMARY KEY (zcta5ce,statefp) + ); diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2010/tiger_loader.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2010/tiger_loader.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2010/tiger_loader.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2010/tiger_loader.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,302 @@ +--$Id: tiger_loader.sql 9324 2012-02-27 22:08:12Z pramsey $ +-- +-- PostGIS - Spatial Types for PostgreSQL +-- http://www.postgis.org +-- +-- Copyright (C) 2010, 2011 Regina Obe and Leo Hsu +-- Paragon Corporation +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +-- +-- Author: Regina Obe and Leo Hsu +-- +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +SET search_path TO tiger,public; +BEGIN; +CREATE OR REPLACE FUNCTION loader_macro_replace(param_input text, param_keys text[],param_values text[]) +RETURNS text AS +$$ + DECLARE var_result text = param_input; + DECLARE var_count integer = array_upper(param_keys,1); + BEGIN + FOR i IN 1..var_count LOOP + var_result := replace(var_result, '${' || param_keys[i] || '}', param_values[i]); + END LOOP; + return var_result; + END; +$$ + LANGUAGE 'plpgsql' IMMUTABLE + COST 100; + +-- Helper function that generates script to drop all tables in a particular schema for a particular table +-- This is useful in case you need to reload a state +CREATE OR REPLACE FUNCTION drop_state_tables_generate_script(param_state text, param_schema text DEFAULT 'tiger_data') + RETURNS text AS +$$ +SELECT array_to_string(array_agg('DROP TABLE ' || quote_ident(table_schema) || '.' || quote_ident(table_name) || ';'),E'\n') + FROM (SELECT * FROM information_schema.tables + WHERE table_schema = $2 AND table_name like lower($1) || '_%' ORDER BY table_name) AS foo; +; +$$ + LANGUAGE sql VOLATILE; + +DROP TABLE IF EXISTS loader_platform; +CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text); +INSERT INTO loader_platform(os, wget, pgbin, declare_sect, unzip_command, psql,path_sep,loader, environ_set_command, county_process_command) +VALUES('windows', '%WGETTOOL%', '%PGBIN%', +E'set STATEDIR="${staging_fold}\\${website_root}\\${state_fold}" +set TMPDIR=${staging_fold}\\temp\\ +set UNZIPTOOL="C:\\Program Files\\7-Zip\\7z.exe" +set WGETTOOL="C:\\wget\\wget.exe" +set PGBIN=C:\\Program Files\\PostgreSQL\\8.4\\bin\\ +set PGPORT=5432 +set PGHOST=localhost +set PGUSER=postgres +set PGPASSWORD=yourpasswordhere +set PGDATABASE=geocoder +set PSQL="%PGBIN%psql" +set SHP2PGSQL="%PGBIN%shp2pgsql" +cd ${staging_fold} +', E'del %TMPDIR%\\*.* /Q +%PSQL% -c "DROP SCHEMA ${staging_schema} CASCADE;" +%PSQL% -c "CREATE SCHEMA ${staging_schema};" +cd %STATEDIR% +for /r %%z in (*.zip) do %UNZIPTOOL% e %%z -o%TMPDIR% +cd %TMPDIR%', E'%PSQL%', E'\\', E'%SHP2PGSQL%', 'set ', +'for /r %%z in (*${table_name}.dbf) do (${loader} -s 4269 -g the_geom -W "latin1" %%z tiger_staging.${state_abbrev}_${table_name} | ${psql} & ${psql} -c "SELECT loader_load_staged_data(lower(''${state_abbrev}_${table_name}''), lower(''${state_abbrev}_${lookup_name}''));")' +); + + +INSERT INTO loader_platform(os, wget, pgbin, declare_sect, unzip_command, psql, path_sep, loader, environ_set_command, county_process_command) +VALUES('sh', 'wget', '', +E'STATEDIR="${staging_fold}/${website_root}/${state_fold}" +TMPDIR="${staging_fold}/temp/" +UNZIPTOOL=unzip +WGETTOOL="/usr/bin/wget" +export PGBIN=/usr/pgsql-9.0/bin +export PGPORT=5432 +export PGHOST=localhost +export PGUSER=postgres +export PGPASSWORD=yourpasswordhere +export PGDATABASE=geocoder +PSQL=${PGBIN}/psql +SHP2PGSQL=${PGBIN}/shp2pgsql +cd ${staging_fold} +', E'rm -f ${TMPDIR}/*.* +${PSQL} -c "DROP SCHEMA tiger_staging CASCADE;" +${PSQL} -c "CREATE SCHEMA tiger_staging;" +cd $STATEDIR +for z in *.zip; do $UNZIPTOOL -o -d $TMPDIR $z; done +for z in */*.zip; do $UNZIPTOOL -o -d $TMPDIR $z; done +cd $TMPDIR;\n', '${PSQL}', '/', '${SHP2PGSQL}', 'export ', +'for z in *${table_name}.dbf; do +${loader} -s 4269 -g the_geom -W "latin1" $z ${staging_schema}.${state_abbrev}_${table_name} | ${psql} +${PSQL} -c "SELECT loader_load_staged_data(lower(''${state_abbrev}_${table_name}''), lower(''${state_abbrev}_${lookup_name}''));" +done'); +-- variables table +DROP TABLE IF EXISTS loader_variables; +CREATE TABLE loader_variables(tiger_year varchar(4) PRIMARY KEY, website_root text, staging_fold text, data_schema text, staging_schema text); +INSERT INTO loader_variables(tiger_year, website_root , staging_fold, data_schema, staging_schema) + VALUES('2010', 'www2.census.gov/geo/pvs/tiger2010st', '/gisdata', 'tiger_data', 'tiger_staging'); + +DROP TABLE IF EXISTS loader_lookuptables; +CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000, + lookup_name text primary key, + table_name text, single_mode boolean NOT NULL DEFAULT true, + load boolean NOT NULL DEFAULT true, + level_county boolean NOT NULL DEFAULT false, + level_state boolean NOT NULL DEFAULT false, + post_load_process text, single_geom_mode boolean DEFAULT false, + insert_mode char(1) NOT NULL DEFAULT 'c', + pre_load_process text,columns_exclude text[]); + +-- put in explanatory comments of what each column is for +COMMENT ON COLUMN loader_lookuptables.lookup_name IS 'This is the table name to inherit from and suffix of resulting output table -- how the table will be named -- edges where would mean -- ma_edges , pa_edges etc.'; +COMMENT ON COLUMN loader_lookuptables.table_name IS 'suffix of the tables to load e.g. edges would load all tables like *edges.dbf(shp) -- so tl_2010_42129_edges.dbf . '; +COMMENT ON COLUMN loader_lookuptables.load IS 'Whether or not to load the table. For states and zcta5 (you may just want to download states10, zcta510 nationwide file manually) load your own into a single table that inherits from tiger.states, tiger.zcta5. You''ll get improved performance for some geocoding cases.'; +COMMENT ON COLUMN loader_lookuptables.columns_exclude IS 'List of columns to exclude as an array. This is excluded from both input table and output table and rest of columns remaining are assumed to be in same order in both tables. gid, geoid10,cpi,suffix1ce are excluded if no columns are specified.'; + +INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, pre_load_process, post_load_process) +VALUES(2, 'county', 'county10', true, false, true, + false, '${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${lookup_name}(CONSTRAINT pk_${state_abbrev}_${lookup_name} PRIMARY KEY (gid) ) INHERITS(county); " ', + '${psql} -c "ALTER TABLE ${staging_schema}.${state_abbrev}_${table_name} RENAME geoid10 TO cntyidfp; SELECT loader_load_staged_data(lower(''${state_abbrev}_${table_name}''), lower(''${state_abbrev}_${lookup_name}'')); ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD CONSTRAINT uidx_${state_abbrev}_${lookup_name}_cntyidfp UNIQUE (cntyidfp);" + ${psql} -c "CREATE INDEX ${data_schema}_${state_abbrev}_${lookup_name}_the_geom_gist ON ${data_schema}.${state_abbrev}_${lookup_name} USING gist(the_geom);" + ${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_${lookup_name}_countyfp ON ${data_schema}.${state_abbrev}_${lookup_name} USING btree(countyfp);" + ${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_county_lookup ( CONSTRAINT pk_${state_abbrev}_county_lookup PRIMARY KEY (st_code, co_code)) INHERITS (county_lookup);" + ${psql} -c "VACUUM ANALYZE ${data_schema}.${state_abbrev}_${lookup_name};" + ${psql} -c "INSERT INTO ${data_schema}.${state_abbrev}_${lookup_name}_lookup(st_code, state, co_code, name) SELECT CAST(statefp as integer), ''${state_abbrev}'', CAST(countyfp as integer), name FROM ${data_schema}.${state_abbrev}_${lookup_name};" + ${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');" + ${psql} -c "VACUUM ANALYZE ${data_schema}.${state_abbrev}_${lookup_name}_lookup;" '); + +INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process ) +VALUES(1, 'state', 'state10', true, false, true,false, 'c', + '${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_state(CONSTRAINT pk_${state_abbrev}_${lookup_name} PRIMARY KEY (gid) ) INHERITS(state); "', + '${psql} -c "SELECT loader_load_staged_data(lower(''${state_abbrev}_${table_name}''), lower(''${state_abbrev}_${lookup_name}'')); ALTER TABLE ${data_schema}.${state_abbrev}_state ADD CONSTRAINT uidx_${state_abbrev}_${lookup_name}_stusps UNIQUE (stusps);" + ${psql} -c "CREATE INDEX ${data_schema}_${state_abbrev}_state_the_geom_gist ON ${data_schema}.${state_abbrev}_${lookup_name} USING gist(the_geom);" + ${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');" + ${psql} -c "VACUUM ANALYZE ${data_schema}.${state_abbrev}_${lookup_name}"' ); + +INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process ) +VALUES(3, 'place', 'place10', true, false, true,false, 'c', + '${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${lookup_name}(CONSTRAINT pk_${state_abbrev}_${table_name} PRIMARY KEY (plcidfp) ) INHERITS(place);" ', + '${psql} -c "ALTER TABLE ${staging_schema}.${state_abbrev}_${table_name} RENAME geoid10 TO plcidfp;SELECT loader_load_staged_data(lower(''${state_abbrev}_${table_name}''), lower(''${state_abbrev}_${lookup_name}'')); ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD CONSTRAINT uidx_${state_abbrev}_${lookup_name}_gid UNIQUE (gid);" +${psql} -c "CREATE INDEX idx_${state_abbrev}_${lookup_name}_soundex_name ON ${data_schema}.${state_abbrev}_${lookup_name} USING btree (soundex(name));" +${psql} -c "CREATE INDEX ${data_schema}_${state_abbrev}_${lookup_name}_the_geom_gist ON ${data_schema}.${state_abbrev}_${lookup_name} USING gist(the_geom);" +${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');"' + ); + +INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process ) +VALUES(4, 'cousub', 'cousub10', true, false, true,false, 'c', + '${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${lookup_name}(CONSTRAINT pk_${state_abbrev}_${lookup_name} PRIMARY KEY (cosbidfp), CONSTRAINT uidx_${state_abbrev}_${lookup_name}_gid UNIQUE (gid)) INHERITS(${lookup_name});" ', + '${psql} -c "ALTER TABLE ${staging_schema}.${state_abbrev}_${table_name} RENAME geoid10 TO cosbidfp;SELECT loader_load_staged_data(lower(''${state_abbrev}_${table_name}''), lower(''${state_abbrev}_${lookup_name}'')); ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');" +${psql} -c "CREATE INDEX ${data_schema}_${state_abbrev}_${lookup_name}_the_geom_gist ON ${data_schema}.${state_abbrev}_${lookup_name} USING gist(the_geom);" +${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_${lookup_name}_countyfp ON ${data_schema}.${state_abbrev}_${lookup_name} USING btree(countyfp);"'); + +INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process ) +VALUES(4, 'zcta5', 'zcta510', true, false, true,false, 'c', + '${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${lookup_name}(CONSTRAINT pk_${state_abbrev}_${lookup_name} PRIMARY KEY (zcta5ce,statefp), CONSTRAINT uidx_${state_abbrev}_${lookup_name}_gid UNIQUE (gid)) INHERITS(${lookup_name});" ', + '${psql} -c "SELECT loader_load_staged_data(lower(''${state_abbrev}_${table_name}''), lower(''${state_abbrev}_${lookup_name}''));ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');" +${psql} -c "CREATE INDEX ${data_schema}_${state_abbrev}_${lookup_name}_the_geom_gist ON ${data_schema}.${state_abbrev}_${lookup_name} USING gist(the_geom);"'); + + +INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process ) +VALUES(6, 'faces', 'faces', true, true, false,false, 'c', + '${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${table_name}(CONSTRAINT pk_${state_abbrev}_${lookup_name} PRIMARY KEY (gid)) INHERITS(${lookup_name});" ', + '${psql} -c "CREATE INDEX ${data_schema}_${state_abbrev}_${table_name}_the_geom_gist ON ${data_schema}.${state_abbrev}_${lookup_name} USING gist(the_geom);" + ${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_${lookup_name}_tfid ON ${data_schema}.${state_abbrev}_${lookup_name} USING btree (tfid);" + ${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_${table_name}_countyfp ON ${data_schema}.${state_abbrev}_${table_name} USING btree (countyfp);" + ${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');" + ${psql} -c "vacuum analyze ${data_schema}.${state_abbrev}_${lookup_name};" '); + +INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process, columns_exclude ) +VALUES(7, 'featnames', 'featnames', true, true, false,false, 'a', +'${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${table_name}(CONSTRAINT pk_${state_abbrev}_${table_name} PRIMARY KEY (gid)) INHERITS(${table_name});" ', +'${psql} -c "UPDATE ${data_schema}.${state_abbrev}_${table_name} SET statefp = ''${state_fips}'' WHERE statefp IS NULL;" +${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_${lookup_name}_snd_name ON ${data_schema}.${state_abbrev}_${table_name} USING btree (soundex(name));" +${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_${lookup_name}_lname ON ${data_schema}.${state_abbrev}_${table_name} USING btree (lower(name));" +${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_${lookup_name}_tlid_statefp ON ${data_schema}.${state_abbrev}_${table_name} USING btree (tlid,statefp);" +${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');" +${psql} -c "vacuum analyze ${data_schema}.${state_abbrev}_${lookup_name};"', ARRAY['gid','statefp']); + +INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process ) +VALUES(8, 'edges', 'edges', true, true, false,false, 'a', +'${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${table_name}(CONSTRAINT pk_${state_abbrev}_${table_name} PRIMARY KEY (gid)) INHERITS(${table_name});" ', +'${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_${table_name} ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');" +${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_${table_name}_tlid ON ${data_schema}.${state_abbrev}_${table_name} USING btree (tlid);" +${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_${table_name}_tfidr ON ${data_schema}.${state_abbrev}_${table_name} USING btree (tfidr);" +${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_${table_name}_tfidl ON ${data_schema}.${state_abbrev}_${table_name} USING btree (tfidl);" +${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_${table_name}_countyfp ON ${data_schema}.${state_abbrev}_${table_name} USING btree (countyfp);" +${psql} -c "CREATE INDEX ${data_schema}_${state_abbrev}_${table_name}_the_geom_gist ON ${data_schema}.${state_abbrev}_${table_name} USING gist(the_geom);" +${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_${lookup_name}_zipl ON ${data_schema}.${state_abbrev}_${lookup_name} USING btree (zipl);" +${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_zip_state_loc(CONSTRAINT pk_${state_abbrev}_zip_state_loc PRIMARY KEY(zip,stusps,place)) INHERITS(zip_state_loc);" +${psql} -c "INSERT INTO ${data_schema}.${state_abbrev}_zip_state_loc(zip,stusps,statefp,place) SELECT DISTINCT e.zipl, ''${state_abbrev}'', ''${state_fips}'', p.name FROM ${data_schema}.${state_abbrev}_edges AS e INNER JOIN ${data_schema}.${state_abbrev}_faces AS f ON (e.tfidl = f.tfid OR e.tfidr = f.tfid) INNER JOIN ${data_schema}.${state_abbrev}_place As p ON(f.statefp = p.statefp AND f.placefp = p.placefp ) WHERE e.zipl IS NOT NULL;" +${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_zip_state_loc_place ON ${data_schema}.${state_abbrev}_zip_state_loc USING btree(soundex(place));" +${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_zip_state_loc ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');" +${psql} -c "vacuum analyze ${data_schema}.${state_abbrev}_${lookup_name};" +${psql} -c "vacuum analyze ${data_schema}.${state_abbrev}_zip_state_loc;" +${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_zip_lookup_base(CONSTRAINT pk_${state_abbrev}_zip_state_loc_city PRIMARY KEY(zip,state, county, city, statefp)) INHERITS(zip_lookup_base);" +${psql} -c "INSERT INTO ${data_schema}.${state_abbrev}_zip_lookup_base(zip,state,county,city, statefp) SELECT DISTINCT e.zipl, ''${state_abbrev}'', c.name,p.name,''${state_fips}'' FROM ${data_schema}.${state_abbrev}_edges AS e INNER JOIN ${data_schema}.${state_abbrev}_county As c ON (e.countyfp = c.countyfp AND e.statefp = c.statefp AND e.statefp = ''${state_fips}'') INNER JOIN ${data_schema}.${state_abbrev}_faces AS f ON (e.tfidl = f.tfid OR e.tfidr = f.tfid) INNER JOIN ${data_schema}.${state_abbrev}_place As p ON(f.statefp = p.statefp AND f.placefp = p.placefp ) WHERE e.zipl IS NOT NULL;" +${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_zip_lookup_base ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');" +${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_zip_lookup_base_citysnd ON ${data_schema}.${state_abbrev}_zip_lookup_base USING btree(soundex(city));" '); + +INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process,columns_exclude ) +VALUES(9, 'addr', 'addr', true, true, false,false, 'a', + '${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${lookup_name}(CONSTRAINT pk_${state_abbrev}_${table_name} PRIMARY KEY (gid)) INHERITS(${table_name});" ', + '${psql} -c "UPDATE ${data_schema}.${state_abbrev}_${lookup_name} SET statefp = ''${state_fips}'' WHERE statefp IS NULL;" + ${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');" + ${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_${lookup_name}_least_address ON tiger_data.${state_abbrev}_addr USING btree (least_hn(fromhn,tohn) );" + ${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_${table_name}_tlid_statefp ON ${data_schema}.${state_abbrev}_${table_name} USING btree (tlid, statefp);" + ${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_${table_name}_zip ON ${data_schema}.${state_abbrev}_${table_name} USING btree (zip);" + ${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_zip_state(CONSTRAINT pk_${state_abbrev}_zip_state PRIMARY KEY(zip,stusps)) INHERITS(zip_state); " + ${psql} -c "INSERT INTO ${data_schema}.${state_abbrev}_zip_state(zip,stusps,statefp) SELECT DISTINCT zip, ''${state_abbrev}'', ''${state_fips}'' FROM ${data_schema}.${state_abbrev}_${lookup_name} WHERE zip is not null;" + ${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_zip_state ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');" + ${psql} -c "vacuum analyze ${data_schema}.${state_abbrev}_${lookup_name};"', ARRAY['gid','statefp','fromarmid', 'toarmid']); + + +CREATE OR REPLACE FUNCTION loader_generate_script(param_states text[], os text) + RETURNS SETOF text AS +$BODY$ +SELECT + loader_macro_replace( + replace( + loader_macro_replace(declare_sect + , ARRAY['staging_fold', 'state_fold','website_root', 'psql', 'state_abbrev', 'data_schema', 'staging_schema', 'state_fips'], + ARRAY[variables.staging_fold, s.state_fold, variables.website_root, platform.psql, s.state_abbrev, variables.data_schema, variables.staging_schema, s.state_fips::text] + ), '/', platform.path_sep) || ' + ' || platform.wget || ' http://' || variables.website_root || '/' + || state_fold || + '/ --no-parent --relative --recursive --level=2 --accept=zip,txt --mirror --reject=html + ' || platform.unzip_command || + ' + ' || + -- State level files + array_to_string( ARRAY(SELECT loader_macro_replace(COALESCE(lu.pre_load_process || E'\n', '') || platform.loader || ' -' || lu.insert_mode || ' -s 4269 -g the_geom ' + || CASE WHEN lu.single_geom_mode THEN ' -S ' ELSE ' ' END::text || ' -W "latin1" tl_' || variables.tiger_year || '_' || s.state_fips + || '_' || lu.table_name || '.dbf tiger_staging.' || lower(s.state_abbrev) || '_' || lu.table_name || ' | '::text || platform.psql + || COALESCE(E'\n' || + lu.post_load_process , '') , ARRAY['loader','table_name', 'lookup_name'], ARRAY[platform.loader, lu.table_name, lu.lookup_name ]) + FROM loader_lookuptables AS lu + WHERE level_state = true AND load = true + ORDER BY process_order, lookup_name), E'\n') ::text + -- County Level files + || E'\n' || + array_to_string( ARRAY(SELECT loader_macro_replace(COALESCE(lu.pre_load_process || E'\n', '') || COALESCE(county_process_command || E'\n','') + || COALESCE(E'\n' ||lu.post_load_process , '') , ARRAY['loader','table_name','lookup_name'], ARRAY[platform.loader, lu.table_name, lu.lookup_name ]) + FROM loader_lookuptables AS lu + WHERE level_county = true AND load = true + ORDER BY process_order, lookup_name), E'\n') ::text + , ARRAY['psql', 'data_schema','staging_schema', 'staging_fold', 'state_fold', 'website_root', 'state_abbrev','state_fips'], + ARRAY[platform.psql, variables.data_schema, variables.staging_schema, variables.staging_fold, s.state_fold,variables.website_root, s.state_abbrev, s.state_fips::text]) + AS shell_code +FROM loader_variables As variables + CROSS JOIN (SELECT name As state, abbrev As state_abbrev, lpad(st_code::text,2,'0') As state_fips, + lpad(st_code::text,2,'0') || '_' + || replace(name, ' ', '_') As state_fold +FROM state_lookup) As s CROSS JOIN loader_platform As platform +WHERE $1 @> ARRAY[state_abbrev::text] -- If state is contained in list of states input generate script for it +AND platform.os = $2 -- generate script for selected platform +; +$BODY$ + LANGUAGE sql VOLATILE; + +CREATE OR REPLACE FUNCTION loader_load_staged_data(param_staging_table text, param_target_table text, param_columns_exclude text[]) RETURNS integer +AS +$$ +DECLARE + var_sql text; + var_staging_schema text; var_data_schema text; + var_temp text; + var_num_records bigint; +BEGIN +-- Add all the fields except geoid and gid +-- Assume all the columns are in same order as target + SELECT staging_schema, data_schema INTO var_staging_schema, var_data_schema FROM loader_variables; + var_sql := 'INSERT INTO ' || var_data_schema || '.' || quote_ident(param_target_table) || '(' || + array_to_string(ARRAY(SELECT quote_ident(column_name::text) + FROM information_schema.columns + WHERE table_name = param_target_table + AND table_schema = var_data_schema + AND column_name <> ALL(param_columns_exclude) ), ',') || ') SELECT ' + || array_to_string(ARRAY(SELECT quote_ident(column_name::text) + FROM information_schema.columns + WHERE table_name = param_staging_table + AND table_schema = var_staging_schema + AND column_name <> ALL( param_columns_exclude) ), ',') ||' FROM ' + || var_staging_schema || '.' || param_staging_table || ';'; + RAISE NOTICE '%', var_sql; + EXECUTE (var_sql); + GET DIAGNOSTICS var_num_records = ROW_COUNT; + SELECT DropGeometryTable(var_staging_schema,param_staging_table) INTO var_temp; + RETURN var_num_records; +END; +$$ +LANGUAGE 'plpgsql' VOLATILE; + +CREATE OR REPLACE FUNCTION loader_load_staged_data(param_staging_table text, param_target_table text) +RETURNS integer AS +$$ + SELECT loader_load_staged_data($1, $2,(SELECT COALESCE(columns_exclude,ARRAY['gid', 'geoid10','cpi','suffix1ce']) FROM loader_lookuptables WHERE $2 LIKE '%' || lookup_name)) +$$ +language 'sql' VOLATILE; +COMMIT; \ No newline at end of file diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2010/topology/README postgis-2.0.1/extras/tiger_geocoder/tiger_2010/topology/README --- postgis-1.5.3/extras/tiger_geocoder/tiger_2010/topology/README 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2010/topology/README 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,4 @@ +$Id: README 9324 2012-02-27 22:08:12Z pramsey $ +This folder will contain functions for converting tiger data to +PostGIS topology format. It assumes tiger data has already been loaded using +the tiger loader. \ No newline at end of file diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2010/topology/tiger_topology_loader.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2010/topology/tiger_topology_loader.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2010/topology/tiger_topology_loader.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2010/topology/tiger_topology_loader.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,188 @@ +/******************************************************************* + * $Id: tiger_topology_loader.sql 9324 2012-02-27 22:08:12Z pramsey $ + * + * PostGIS - Spatial Types for PostgreSQL + * Copyright 2011 Leo Hsu and Regina Obe + * Paragon Corporation + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + * This file contains helper functions for loading tiger data + * into postgis topology structure + **********************************************************************/ + + /** topology_load_tiger: Will load all edges, faces, nodes into + * topology named toponame + * that intersect the specified region + * region_type: 'place', 'county' + * region_id: the respective fully qualified geoid + * place - plcidfp + * county - cntyidfp + * USE CASE: + * The following will create a topology called topo_boston + * in Mass State Plane feet and load Boston, MA tiger data + * with tolerance of 1 foot + * SELECT topology.DropTopology('topo_boston'); + * SELECT topology.CreateTopology('topo_boston', 2249,0.25); + * SELECT tiger.topology_load_tiger('topo_boston', 'place', '2507000'); + * SELECT topology.TopologySummary('topo_boston'); + * SELECT topology.ValidateTopology('topo_boston'); + ****/ +CREATE OR REPLACE FUNCTION tiger.topology_load_tiger(IN toponame varchar, + region_type varchar, region_id varchar) + RETURNS text AS +$$ +DECLARE + var_sql text; + var_rgeom geometry; + var_statefp text; + var_rcnt bigint; + var_result text := ''; + var_srid int := 4269; + var_precision double precision := 0; +BEGIN + --$Id: tiger_topology_loader.sql 9324 2012-02-27 22:08:12Z pramsey $ + CASE region_type + WHEN 'place' THEN + SELECT the_geom , statefp FROM place INTO var_rgeom, var_statefp WHERE plcidfp = region_id; + WHEN 'county' THEN + SELECT the_geom, statefp FROM county INTO var_rgeom, var_statefp WHERE cntyidfp = region_id; + ELSE + RAISE EXCEPTION 'Region type % IS NOT SUPPORTED', region_type; + END CASE; + SELECT srid, precision FROM topology.topology into var_srid, var_precision + WHERE name = toponame; + var_sql := ' + CREATE TEMPORARY TABLE tmp_edge + AS + WITH te AS + (SELECT tlid, ST_GeometryN(ST_SnapToGrid(ST_Transform(ST_LineMerge(the_geom),$3),$4),1) As geom, tnidf, tnidt, tfidl, tfidr , the_geom As orig_geom + FROM tiger.edges + WHERE statefp = $1 AND ST_Covers($2, the_geom) + ) + SELECT DISTINCT ON (t.tlid) t.tlid As edge_id,t.geom + , t.tnidf As start_node, t.tnidt As end_node, COALESCE(t.tfidl,0) As left_face + , COALESCE(t.tfidr,0) As right_face, COALESCE(tl.tlid, t.tlid) AS next_left_edge, COALESCE(tr.tlid, t.tlid) As next_right_edge, t.orig_geom + FROM + te AS t LEFT JOIN te As tl ON (t.tnidf = tl.tnidt AND t.tfidl = tl.tfidl) + LEFT JOIN te As tr ON (t.tnidt = tr.tnidf AND t.tfidr = tr.tfidr) + '; + EXECUTE var_sql USING var_statefp, var_rgeom, var_srid, var_precision; + GET DIAGNOSTICS var_rcnt = ROW_COUNT; + var_result := var_rcnt::text || ' edges holding in temporary. '; + var_sql := 'ALTER TABLE tmp_edge ADD CONSTRAINT pk_tmp_edge PRIMARY KEY(edge_id );'; + EXECUTE var_sql; + -- CREATE node indexes on temporary edges + var_sql := 'CREATE INDEX idx_tmp_edge_start_node ON tmp_edge USING btree (start_node ); CREATE INDEX idx_tmp_edge_end_node ON tmp_edge USING btree (end_node );'; + + EXECUTE var_sql; + + -- CREATE face indexes on temporary edges + var_sql := 'CREATE INDEX idx_tmp_edge_left_face ON tmp_edge USING btree (left_face ); CREATE INDEX idx_tmp_edge_right_face ON tmp_edge USING btree (right_face );'; + + EXECUTE var_sql; + + -- CREATE edge indexes on temporary edges + var_sql := 'CREATE INDEX idx_tmp_edge_next_left_edge ON tmp_edge USING btree (next_left_edge ); CREATE INDEX idx_tmp_edge_next_right_edge ON tmp_edge USING btree (next_right_edge);'; + + EXECUTE var_sql; + + -- start load in faces + var_sql := 'INSERT INTO ' || quote_ident(toponame) || '.face(face_id, mbr) + SELECT f.tfid, ST_Envelope(ST_Transform(f.the_geom,$3)) As mbr + FROM tiger.faces AS f + WHERE statefp = $1 AND + ( tfid IN(SELECT left_face FROM tmp_edge) + OR tfid IN(SELECT right_face FROM tmp_edge) OR ST_Covers($2, the_geom) ) + AND tfid NOT IN(SELECT face_id FROM ' || quote_ident(toponame) || '.face) '; + EXECUTE var_sql USING var_statefp, var_rgeom, var_srid; + GET DIAGNOSTICS var_rcnt = ROW_COUNT; + var_result := var_result || var_rcnt::text || ' faces added. '; + -- end load in faces + + -- add remaining missing edges of present faces -- + var_sql := 'INSERT INTO tmp_edge(edge_id, geom, start_node, end_node, left_face, right_face, next_left_edge, next_right_edge, orig_geom) + WITH te AS + (SELECT tlid, ST_GeometryN(ST_SnapToGrid(ST_Transform(ST_LineMerge(the_geom),$2),$3),1) As geom, tnidf, tnidt, tfidl, tfidr, the_geom As orig_geom + FROM tiger.edges + WHERE statefp = $1 AND + (tfidl IN(SELECT face_id FROM ' || quote_ident(toponame) || '.face) + OR tfidr IN(SELECT face_id FROM ' || quote_ident(toponame) || '.face) ) + AND tlid NOT IN(SELECT edge_id FROM tmp_edge) + ) + + SELECT DISTINCT ON (t.tlid) t.tlid As edge_id,t.geom + , t.tnidf As start_node, t.tnidt As end_node, t.tfidl As left_face + , t.tfidr As right_face, tl.tlid AS next_left_edge, tr.tlid As next_right_edge, t.orig_geom + FROM + te AS t LEFT JOIN te As tl + ON (t.tnidf = tl.tnidt AND t.tfidl = tl.tfidl) + LEFT JOIN te As tr ON (t.tnidt = tr.tnidf AND t.tfidr = tr.tfidr) + '; + EXECUTE var_sql USING var_statefp, var_srid, var_precision; + GET DIAGNOSTICS var_rcnt = ROW_COUNT; + var_result := var_result || var_rcnt::text || ' edges of faces added. '; + -- start load in nodes + var_sql := 'INSERT INTO ' || quote_ident(toponame) || '.node(node_id, geom) + SELECT DISTINCT ON(tnid) tnid, geom + FROM + ( + SELECT start_node AS tnid, ST_StartPoint(e.geom) As geom + FROM tmp_edge As e LEFT JOIN ' || quote_ident(toponame) || '.node AS n ON e.start_node = n.node_id + UNION ALL + SELECT end_node AS tnid, ST_EndPoint(e.geom) As geom + FROM tmp_edge As e LEFT JOIN ' || quote_ident(toponame) || '.node AS n ON e.end_node = n.node_id + WHERE n.node_id IS NULL) As f + WHERE tnid NOT IN(SELECT node_id FROM ' || quote_ident(toponame) || '.node) + '; + EXECUTE var_sql USING var_statefp, var_rgeom; + GET DIAGNOSTICS var_rcnt = ROW_COUNT; + var_result := var_result || ' ' || var_rcnt::text || ' nodes added. '; + + -- end load in nodes + -- start Mark which nodes are contained in faces + var_sql := 'UPDATE ' || quote_ident(toponame) || '.node AS n + SET containing_face = f.tfid + FROM (SELECT tfid, the_geom + FROM tiger.faces WHERE statefp = $1 + AND tfid IN(SELECT face_id FROM ' || quote_ident(toponame) || '.face) + ) As f + WHERE ST_ContainsProperly(f.the_geom, ST_Transform(n.geom,4269)) '; + EXECUTE var_sql USING var_statefp, var_rgeom; + GET DIAGNOSTICS var_rcnt = ROW_COUNT; + var_result := var_result || ' ' || var_rcnt::text || ' nodes contained in a face. '; + -- end Mark nodes contained in faces + + -- Set orphan left right to itself and set edges with missing faces to world face + var_sql := 'UPDATE tmp_edge SET next_left_edge = -1*edge_id WHERE next_left_edge IS NULL OR next_left_edge NOT IN(SELECT edge_id FROM tmp_edge); + UPDATE tmp_edge SET next_right_edge = -1*edge_id WHERE next_right_edge IS NULL OR next_right_edge NOT IN(SELECT edge_id FROM tmp_edge); + UPDATE tmp_edge SET left_face = 0 WHERE left_face NOT IN(SELECT face_id FROM ' || quote_ident(toponame) || '.face); + UPDATE tmp_edge SET right_face = 0 WHERE right_face NOT IN(SELECT face_id FROM ' || quote_ident(toponame) || '.face);'; + EXECUTE var_sql; + + -- force edges start and end points to match the start and end nodes -- + var_sql := 'UPDATE tmp_edge SET geom = ST_SetPoint(ST_SetPoint(tmp_edge.geom, 0, s.geom), ST_NPoints(tmp_edge.geom) - 1,e.geom) + FROM ' || quote_ident(toponame) || '.node AS s, ' || quote_ident(toponame) || '.node As e + WHERE s.node_id = tmp_edge.start_node AND e.node_id = tmp_edge.end_node AND + ( NOT ST_Equals(s.geom, ST_StartPoint(tmp_edge.geom) ) OR NOT ST_Equals(e.geom, ST_EndPoint(tmp_edge.geom) ) ) ' ; + EXECUTE var_sql; + GET DIAGNOSTICS var_rcnt = ROW_COUNT; + var_result := var_result || ' ' || var_rcnt::text || ' edge start end corrected. '; + -- TODO: Load in edges -- + var_sql := ' + INSERT INTO ' || quote_ident(toponame) || '.edge(edge_id, geom, start_node, end_node, left_face, right_face, next_left_edge, next_right_edge) + SELECT t.edge_id, t.geom, t.start_node, t.end_node, COALESCE(t.left_face,0) As left_face, COALESCE(t.right_face,0) As right_face, t.next_left_edge, t.next_right_edge + FROM + tmp_edge AS t + WHERE t.edge_id NOT IN(SELECT edge_id FROM ' || quote_ident(toponame) || '.edge) + '; + EXECUTE var_sql USING var_statefp, var_rgeom; + GET DIAGNOSTICS var_rcnt = ROW_COUNT; + var_result := var_result || ' ' || var_rcnt::text || ' edges added. '; + var_sql = 'DROP TABLE tmp_edge;'; + EXECUTE var_sql; + RETURN var_result; +END +$$ + LANGUAGE plpgsql VOLATILE + COST 1000; \ No newline at end of file diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2010/upgrade_geocode.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2010/upgrade_geocode.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2010/upgrade_geocode.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2010/upgrade_geocode.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,239 @@ +--$Id: upgrade_geocode.sql 9324 2012-02-27 22:08:12Z pramsey $ +-- +-- PostGIS - Spatial Types for PostgreSQL +-- http://www.postgis.org +-- +-- Copyright (C) 2010, 2011 Regina Obe and Leo Hsu +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +-- +-- Author: Regina Obe and Leo Hsu +-- +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- Tiger is where we're going to create the functions, but we need +-- the PostGIS functions/types which are in public. +SET search_path TO tiger,public; +--this will fail if the column already exists which is fine +ALTER TABLE state_lookup ADD COLUMN statefp char(2); +UPDATE state_lookup SET statefp = lpad(st_code::text,2,'0') WHERE statefp IS NULL; +ALTER TABLE state_lookup ADD CONSTRAINT state_lookup_statefp_key UNIQUE(statefp); +CREATE INDEX idx_tiger_edges_countyfp ON edges USING btree(countyfp); +CREATE INDEX idx_tiger_faces_countyfp ON faces USING btree(countyfp); +CREATE INDEX tiger_place_the_geom_gist ON place USING gist(the_geom); +CREATE INDEX tiger_edges_the_geom_gist ON edges USING gist(the_geom); +CREATE INDEX tiger_state_the_geom_gist ON faces USING gist(the_geom); +DROP FUNCTION IF EXISTS reverse_geocode(geometry); /** changed to use default parameters **/ +DROP FUNCTION IF EXISTS geocode_location(norm_addy); /** changed to include default parameter for restrict_geom**/ +DROP FUNCTION IF EXISTS geocode(varchar); /** changed to include default parameter for max_results and restrict_geom**/ +DROP FUNCTION IF EXISTS geocode(norm_addy); /** changed to include default parameter for max_results and restrict_geom **/ +DROP FUNCTION IF EXISTS geocode(varchar, integer); /** changed to include default parameter for max_results and restrict_geom **/ +DROP FUNCTION IF EXISTS geocode(norm_addy,integer); /** changed to include default parameter for max_results and restrict_geom **/ +DROP FUNCTION IF EXISTS geocode_address(norm_addy); /** changed to include default parameter for max_results **/ +DROP FUNCTION IF EXISTS geocode_address(norm_addy,integer); /** changed to include default parameter for max_results and restrict_geom **/ +DROP FUNCTION IF EXISTS interpolate_from_address(integer, character varying, character varying, geometry); /** changed to use default args and added offset and side **/ +DROP FUNCTION IF EXISTS interpolate_from_address(integer, integer, integer, geometry); /**don't need this since got collapes into varchar version **/ + +-- TODO: Put in logic to update lookup tables as they change. street_type_lookup has changed since initial release -- +CREATE TABLE zcta5 +( + gid serial NOT NULL, + statefp character varying(2), + zcta5ce character varying(5), + classfp character varying(2), + mtfcc character varying(5), + funcstat character varying(1), + aland double precision, + awater double precision, + intptlat character varying(11), + intptlon character varying(12), + partflg character varying(1), + the_geom geometry, + CONSTRAINT uidx_tiger_zcta5_gid UNIQUE (gid), + CONSTRAINT enforce_dims_the_geom CHECK (st_ndims(the_geom) = 2), + CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL), + CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 4269), + CONSTRAINT pk_tiger_zcta5_zcta5ce PRIMARY KEY (zcta5ce,statefp) + ); + +ALTER TABLE street_type_lookup ALTER COLUMN abbrev TYPE varchar(50); +ALTER TABLE street_type_lookup ALTER COLUMN name TYPE varchar(50); +ALTER TABLE street_type_lookup ADD COLUMN is_hw boolean NOT NULL DEFAULT false; +DROP FUNCTION IF EXISTS rate_attributes(character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying); +DROP FUNCTION IF EXISTS rate_attributes(character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying); + +--ALTER TABLE tiger.addr ALTER tlid TYPE bigint; +ALTER TABLE featnames ALTER COLUMN tlid SET NOT NULL; +ALTER TABLE edges ALTER COLUMN tlid SET NOT NULL; +ALTER TABLE addr ALTER COLUMN tlid SET NOT NULL; +BEGIN; +-- Type used to pass around a normalized address between functions +-- This is s bit dangerous since it could potentially drop peoples tables +-- TODO: put in logic to check if any tables have norm_addy and don't drop if they do +-- Remarking this out for now since we aren't changing norm_addy anyway +/*DROP TYPE IF EXISTS norm_addy CASCADE; +CREATE TYPE norm_addy AS ( + address INTEGER, + preDirAbbrev VARCHAR, + streetName VARCHAR, + streetTypeAbbrev VARCHAR, + postDirAbbrev VARCHAR, + internal VARCHAR, + location VARCHAR, + stateAbbrev VARCHAR, + zip VARCHAR, + parsed BOOLEAN); */ +-- prefix and suffix street names for numbered highways +CREATE TEMPORARY TABLE temp_types AS +SELECT name, abbrev + FROM ( VALUES + ('CAM', 'Cam'), + ('CAM.', 'Cam'), + ('CAMINO', 'Cam'), + ('CO HWY', 'Co Hwy'), + ('COUNTY HWY', 'Co Hwy'), + ('COUNTY HIGHWAY', 'Co Hwy'), + ('COUNTY HIGH WAY', 'Co Hwy'), + ('COUNTY ROAD', 'Co Rd'), + ('CO RD', 'Co Rd'), + ('CORD', 'Co Rd'), + ('CO RTE', 'Co Rte'), + ('COUNTY ROUTE', 'Co Rte'), + ('CO ST AID HWY', 'Co St Aid Hwy'), + ('EXP', 'Expy'), + ('EXPR', 'Expy'), + ('EXPRESS', 'Expy'), + ('EXPRESSWAY', 'Expy'), + ('EXPW', 'Expy'), + ('EXPY', 'Expy'), + ('FARM RD', 'Farm Rd'), + ('FIRE RD', 'Fire Rd'), + ('FOREST RD', 'Forest Rd'), + ('FOREST ROAD', 'Forest Rd'), + ('FOREST RTE', 'Forest Rte'), + ('FOREST ROUTE', 'Forest Rte'), + ('FREEWAY', 'Fwy'), + ('FREEWY', 'Fwy'), + ('FRWAY', 'Fwy'), + ('FRWY', 'Fwy'), + ('FWY', 'Fwy'), + ('HIGHWAY', 'Hwy'), + ('HIGHWY', 'Hwy'), + ('HIWAY', 'Hwy'), + ('HIWY', 'Hwy'), + ('HWAY', 'Hwy'), + ('HWY', 'Hwy'), + ('I', 'I-'), + ('I-', 'I-'), + ('INTERSTATE', 'I-'), + ('ROUTE', 'Rte'), + ('RTE', 'Rte'), + ('RT', 'Rte'), + ('STATE HWY', 'State Hwy'), + ('STATE HIGHWAY', 'State Hwy'), + ('STATE HIGH WAY', 'State Hwy'), + ('STATE RD', 'State Rd'), + ('STATE ROAD', 'State Rd'), + ('STATE ROUTE', 'State Rte'), + ('STATE RTE', 'State Rte'), + ('TPK', 'Tpke'), + ('TPKE', 'Tpke'), + ('TRNPK', 'Tpke'), + ('TRPK', 'Tpke'), + ('TURNPIKE', 'Tpke'), + ('TURNPK', 'Tpke'), + ('US HWY', 'US Hwy'), + ('US HIGHWAY', 'US Hwy'), + ('US HIGH WAY', 'US Hwy'), + ('US RTE', 'US Rte'), + ('US ROUTE', 'US Rte'), + ('US RT', 'US Rte'), + ('USFS HWY', 'USFS Hwy'), + ('USFS HIGHWAY', 'USFS Hwy'), + ('USFS HIGH WAY', 'USFS Hwy'), + ('USFS RD', 'USFS Rd'), + ('USFS ROAD', 'USFS Rd') + ) t(name, abbrev); + +DELETE FROM street_type_lookup WHERE name IN(SELECT name FROM temp_types); +INSERT INTO street_type_lookup (name, abbrev, is_hw) +SELECT name, abbrev, true + FROM temp_types As t + WHERE t.name NOT IN(SELECT name FROM street_type_lookup); +DROP TABLE temp_types; +DELETE FROM street_type_lookup WHERE name = 'FOREST'; +UPDATE street_type_lookup SET is_hw = false WHERE abbrev = 'Loop'; + +CREATE TEMPORARY TABLE temp_types AS +SELECT name, abbrev + FROM (VALUES + ('LOOP', 'Loop'), + ('SERVICE DRIVE', 'Svc Dr'), + ('SERVICE DR', 'Svc Dr'), + ('SERVICE ROAD', 'Svc Rd'), + ('SERVICE RD', 'Svc Rd') + ) t(name, abbrev); + +DELETE FROM street_type_lookup WHERE name IN(SELECT name FROM temp_types); +INSERT INTO street_type_lookup (name, abbrev, is_hw) +SELECT name, abbrev, false + FROM temp_types As t + WHERE t.name NOT IN(SELECT name FROM street_type_lookup); + +-- new census loader +\i census_loader.sql +--create parent tables for census +-- if they do not exist +SELECT create_census_base_tables(); +-- System/General helper functions +\i utility/utmzone.sql +\i utility/cull_null.sql +\i utility/nullable_levenshtein.sql +\i utility/levenshtein_ignore_case.sql + +---- Address normalizer +-- General helpers +\i normalize/end_soundex.sql +\i normalize/count_words.sql +\i normalize/state_extract.sql +\i normalize/get_last_words.sql +-- Location extraction/normalization helpers +\i normalize/location_extract_countysub_exact.sql +\i normalize/location_extract_countysub_fuzzy.sql +\i normalize/location_extract_place_exact.sql +\i normalize/location_extract_place_fuzzy.sql +\i normalize/location_extract.sql +-- Normalization API, called by geocode mainly. +\i normalize/normalize_address.sql +\i normalize/pprint_addy.sql + +---- Geocoder functions +-- General helpers +\i geocode/other_helper_functions.sql +\i geocode/rate_attributes.sql +\i geocode/includes_address.sql +\i geocode/interpolate_from_address.sql +-- Actual lookups/geocoder helpers +\i geocode/geocode_address.sql +\i geocode/geocode_location.sql +-- Geocode API, called by user +\i geocode/geocode.sql + +-- Reverse Geocode API, called by user +\i geocode/geocode_intersection.sql +\i geocode/reverse_geocode.sql +\i geocode/census_tracts_functions.sql +COMMIT; +-- Tiger to PostGIS Topology +-- only useable if you have topology installed +\i topology/tiger_topology_loader.sql + +-- install missing indexes +\echo 'Installing missing indexes - this might take a while so be patient ..' +SELECT install_missing_indexes(); +\a +--\o 'drop_dup_feat_create_index.sql' +--\i generate_drop_dupe_featnames.sql +\o +--\i drop_dup_feat_create_index.sql +\echo 'Missing index Install completed' \ No newline at end of file diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2010/upgrade_geocoder.bat postgis-2.0.1/extras/tiger_geocoder/tiger_2010/upgrade_geocoder.bat --- postgis-1.5.3/extras/tiger_geocoder/tiger_2010/upgrade_geocoder.bat 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2010/upgrade_geocoder.bat 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,14 @@ +REM $Id: upgrade_geocoder.bat 9324 2012-02-27 22:08:12Z pramsey $ +set PGPORT=5432 +set PGHOST=localhost +set PGUSER=postgres +set PGPASSWORD=yourpasswordhere +set THEDB=geocoder +set PGBIN=C:\Program Files\PostgreSQL\8.4\bin +set PGCONTRIB=C:\Program Files\PostgreSQL\8.4\share\contrib +REM "%PGBIN%\psql" -d "%THEDB%" -f "tiger_loader.sql" +"%PGBIN%\psql" -d "%THEDB%" -f "upgrade_geocode.sql" +cd regress +"%PGBIN%\psql" -t -f regress.sql +pause + diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2010/upgrade_geocoder.sh postgis-2.0.1/extras/tiger_geocoder/tiger_2010/upgrade_geocoder.sh --- postgis-1.5.3/extras/tiger_geocoder/tiger_2010/upgrade_geocoder.sh 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2010/upgrade_geocoder.sh 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,11 @@ +#!/bin/bash +# $Id: upgrade_geocoder.sh 9324 2012-02-27 22:08:12Z pramsey $ +export PGPORT=5432 +export PGHOST=localhost +export PGUSER=postgres +export PGPASSWORD=yourpasswordhere +THEDB=geocoder +PSQL_CMD=/usr/bin/psql +PGCONTRIB=/usr/share/postgresql/contrib +${PSQL_CMD} -d "${THEDB}" -f "tiger_loader.sql" +${PSQL_CMD} -d "${THEDB}" -f "upgrade_geocode.sql" \ No newline at end of file diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2010/utility/cull_null.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2010/utility/cull_null.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2010/utility/cull_null.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2010/utility/cull_null.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,6 @@ +-- Returns the value passed, or an empty string if null. +-- This is used to concatinate values that may be null. +CREATE OR REPLACE FUNCTION cull_null(VARCHAR) RETURNS VARCHAR +AS $_$ + SELECT coalesce($1,''); +$_$ LANGUAGE sql IMMUTABLE; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2010/utility/levenshtein_ignore_case.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2010/utility/levenshtein_ignore_case.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2010/utility/levenshtein_ignore_case.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2010/utility/levenshtein_ignore_case.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,5 @@ +-- This function determines the levenshtein distance irespective of case. +CREATE OR REPLACE FUNCTION levenshtein_ignore_case(VARCHAR, VARCHAR) RETURNS INTEGER +AS $_$ + SELECT levenshtein(upper($1), upper($2)); +$_$ LANGUAGE sql IMMUTABLE; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2010/utility/nullable_levenshtein.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2010/utility/nullable_levenshtein.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2010/utility/nullable_levenshtein.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2010/utility/nullable_levenshtein.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,28 @@ +-- This function take two arguements. The first is the "given string" and +-- must not be null. The second arguement is the "compare string" and may +-- or may not be null. If the second string is null, the value returned is +-- 3, otherwise it is the levenshtein difference between the two. +-- Change 2010-10-18 Regina Obe - name verbose to var_verbose since get compile error in PostgreSQL 9.0 +CREATE OR REPLACE FUNCTION nullable_levenshtein(VARCHAR, VARCHAR) RETURNS INTEGER +AS $_$ +DECLARE + given_string VARCHAR; + result INTEGER := 3; + var_verbose BOOLEAN := FALSE; /**change from verbose to param_verbose since its a keyword and get compile error in 9.0 **/ +BEGIN + IF $1 IS NULL THEN + IF var_verbose THEN + RAISE NOTICE 'nullable_levenshtein - given string is NULL!'; + END IF; + RETURN NULL; + ELSE + given_string := $1; + END IF; + + IF $2 IS NOT NULL AND $2 != '' THEN + result := levenshtein_ignore_case(given_string, $2); + END IF; + + RETURN result; +END +$_$ LANGUAGE plpgsql IMMUTABLE COST 10; diff -Nru postgis-1.5.3/extras/tiger_geocoder/tiger_2010/utility/utmzone.sql postgis-2.0.1/extras/tiger_geocoder/tiger_2010/utility/utmzone.sql --- postgis-1.5.3/extras/tiger_geocoder/tiger_2010/utility/utmzone.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/tiger_2010/utility/utmzone.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,17 @@ +CREATE OR REPLACE FUNCTION utmzone(geometry) RETURNS integer AS +$BODY$ +DECLARE + geomgeog geometry; + zone int; + pref int; +BEGIN + geomgeog:=ST_Transform($1,4326); + IF (ST_Y(geomgeog))>0 THEN + pref:=32600; + ELSE + pref:=32700; + END IF; + zone:=floor((ST_X(geomgeog)+180)/6)+1; + RETURN zone+pref; +END; +$BODY$ LANGUAGE 'plpgsql' immutable; diff -Nru postgis-1.5.3/extras/tiger_geocoder/utility/cull_null.sql postgis-2.0.1/extras/tiger_geocoder/utility/cull_null.sql --- postgis-1.5.3/extras/tiger_geocoder/utility/cull_null.sql 2007-07-03 21:22:29.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/utility/cull_null.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ --- Returns the value passed, or an empty string if null. --- This is used to concatinate values that may be null. -CREATE OR REPLACE FUNCTION cull_null(VARCHAR) RETURNS VARCHAR -AS $_$ -BEGIN - RETURN coalesce($1,''); -END; -$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/utility/levenshtein_ignore_case.sql postgis-2.0.1/extras/tiger_geocoder/utility/levenshtein_ignore_case.sql --- postgis-1.5.3/extras/tiger_geocoder/utility/levenshtein_ignore_case.sql 2007-07-03 21:22:29.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/utility/levenshtein_ignore_case.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ --- This function determines the levenshtein distance irespective of case. -CREATE OR REPLACE FUNCTION levenshtein_ignore_case(VARCHAR, VARCHAR) RETURNS INTEGER -AS $_$ -DECLARE - result INTEGER; -BEGIN - result := levenshtein(upper($1), upper($2)); - RETURN result; -END -$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/utility/nullable_levenshtein.sql postgis-2.0.1/extras/tiger_geocoder/utility/nullable_levenshtein.sql --- postgis-1.5.3/extras/tiger_geocoder/utility/nullable_levenshtein.sql 2007-07-03 21:22:29.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/utility/nullable_levenshtein.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ --- This function take two arguements. The first is the "given string" and --- must not be null. The second arguement is the "compare string" and may --- or may not be null. If the second string is null, the value returned is --- 3, otherwise it is the levenshtein difference between the two. -CREATE OR REPLACE FUNCTION nullable_levenshtein(VARCHAR, VARCHAR) RETURNS INTEGER -AS $_$ -DECLARE - given_string VARCHAR; - result INTEGER := 3; - verbose BOOLEAN := FALSE; -BEGIN - IF $1 IS NULL THEN - IF verbose THEN - RAISE NOTICE 'nullable_levenshtein - given string is NULL!'; - END IF; - RETURN NULL; - ELSE - given_string := $1; - END IF; - - IF $2 IS NOT NULL AND $2 != '' THEN - result := levenshtein_ignore_case(given_string, $2); - END IF; - - RETURN result; -END -$_$ LANGUAGE plpgsql; diff -Nru postgis-1.5.3/extras/tiger_geocoder/utility/utmzone.sql postgis-2.0.1/extras/tiger_geocoder/utility/utmzone.sql --- postgis-1.5.3/extras/tiger_geocoder/utility/utmzone.sql 2007-07-03 21:22:29.000000000 +0000 +++ postgis-2.0.1/extras/tiger_geocoder/utility/utmzone.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -CREATE OR REPLACE FUNCTION utmzone(geometry) RETURNS integer AS -$BODY$ -DECLARE - geomgeog geometry; - zone int; - pref int; -BEGIN - geomgeog:=transform($1,4326); - IF (y(geomgeog))>0 THEN - pref:=32600; - ELSE - pref:=32700; - END IF; - zone:=floor((x(geomgeog)+180)/6)+1; - RETURN zone+pref; -END; -$BODY$ LANGUAGE 'plpgsql' immutable; diff -Nru postgis-1.5.3/install-sh postgis-2.0.1/install-sh --- postgis-1.5.3/install-sh 2011-06-25 16:29:36.000000000 +0000 +++ postgis-2.0.1/install-sh 2012-06-22 21:04:13.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2010-02-06.18; # UTC +scriptversion=2011-01-19.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -156,6 +156,10 @@ -s) stripcmd=$stripprog;; -t) dst_arg=$2 + # Protect names problematic for `test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac shift;; -T) no_target_directory=true;; @@ -186,6 +190,10 @@ fi shift # arg dst_arg=$arg + # Protect names problematic for `test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac done fi @@ -232,9 +240,9 @@ for src do - # Protect names starting with `-'. + # Protect names problematic for `test' and other utilities. case $src in - -*) src=./$src;; + -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then @@ -256,12 +264,7 @@ echo "$0: no destination specified." >&2 exit 1 fi - dst=$dst_arg - # Protect names starting with `-'. - case $dst in - -*) dst=./$dst;; - esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. @@ -389,7 +392,7 @@ case $dstdir in /*) prefix='/';; - -*) prefix='./';; + [-=\(\)!]*) prefix='./';; *) prefix='';; esac @@ -407,7 +410,7 @@ for d do - test -z "$d" && continue + test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then diff -Nru postgis-1.5.3/java/Makefile postgis-2.0.1/java/Makefile --- postgis-1.5.3/java/Makefile 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/java/Makefile 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,20 @@ +# ********************************************************************** +# * +# * PostGIS - Spatial Types for PostgreSQL +# * http://postgis.refractions.net +# * +# * Copyright (C) 2012 Sandro Santilli +# * +# * This is free software; you can redistribute and/or modify it under +# * the terms of the GNU General Public Licence. See the COPYING file. +# * +# ********************************************************************** + +# TODO: add all subdirs +SUBDIRS = jdbc + +all install uninstall clean distclean check maintainer-clean: + for s in $(SUBDIRS); do \ + echo "---- Making $@ in $${s}"; \ + $(MAKE) -C $${s} $@ || exit 1; \ + done; diff -Nru postgis-1.5.3/java/ejb2/README postgis-2.0.1/java/ejb2/README --- postgis-1.5.3/java/ejb2/README 2006-08-30 08:46:32.000000000 +0000 +++ postgis-2.0.1/java/ejb2/README 2012-02-27 22:08:12.000000000 +0000 @@ -1,177 +1,177 @@ -Using PostGIS Geometry Types with EJB2 -- Proof of Concept ----------------------------------------------------------- -Copyright (C) 2006 by the Geodetix s.r.l. Company. See -http://www.geodetix.it/ for further information. - -Version 1.0.0 (2006/08/29) - -Table of Contents ------------------ - -0. Licensing -1. Introduction -2. Directory Contents -3. Software Requirements -4. Installation -5. Running -6. Code Details - - -0. Licensing ------------- -The "Using PostGIS Geometry Types with EJB2 -- Proof of Concept" software is -a short collection of examples related to the use of PostGIS Java API with -the EJB 2.x technology. -Copyright (C) 2006 by the Geodetix s.r.l. Company. See -http://www.geodetix.it/ for further information. - -This library is free software; you can redistribute it and/or -modify it under the terms of the GNU Lesser General Public -License as published by the Free Software Foundation; either -version 2.1 of the License, or (at your option) any later version. - -This library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public -License along with this library; if not, write to the Free Software -Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -1. Introduction ---------------- -Our software is a simple proof-of-concept application illustrating how the -PostGIS provided Java geometric types could be integrated with a set of -Enterprise Java Bean 2.x components. - -To achieve such a goal, an attribute of type org.postgis.Geometry has been -added to a BMP (Bean managed Persistence) Entity Bean. Furthermore, by using -the DAO (Data Access Object) Pattern, the persistence code has been clearly -separated from the business logic. - -Not to add further complexity, some proper programming behaviours were omitted. -For example the use of PostGIS geometric types directly inside the Entity Bean -code could be avoided by using a WKT compliant string attribute. Another issue -is about security: table creational methods exposed in the -com.geodetix.geo.ejb.GeometryBean home interface should be protected by -a proper role-base security policy, to avoid normal users deleting database -tables. - -Nevertheless our application, even if quite simple, still holds a lot of -generality and some of the implemented patterns or components are readily -usable in real-world applications. - - -2. Directory Contents ---------------------- - - ./ Build scripts (build.*), README and licensing information - ./src Java source packages and files - ./resources EJB specific configuration files - ./lib JAR libraries needed to compile and run - - -3. Software Requirements ------------------------- -We here list all third-party libraries with their versions tested to work -with the application. - -PostGIS JDBC driver version 1.1.3 -http://www.postgis.org/ - -PostgreSQL JDBC driver version 8.1-404 jdbc3 -http://jdbc.postgresql.org/ - -XDoclet lib version 1.2.3 -http://xdoclet.sourceforge.net - -Apache ANT version 1.6.5 -http://ant.apache.org/ - -JBOSS Application Server version 4.0.4.GA-Patch1 -http://www.jboss.org/ - -Note that our tool is application server agnostic and could be easily ported -to any EJB 2.x compliant Container by modifying the provided deployment -ant file which is, in turn, written for the JBoss Application Server. - - -4. Installation ---------------- -After downloading (and compiling, if necessary) all of the required software, -follow these steps: - -- copy the PostGIS driver (postgis_1.1.3.jar) into the ./lib/commonlib -directory - -- copy the PostgreSQL driver (postgresql-8.1-404.jdbc3.jar) into the -./lib/compiletimelib directory - -- copy the XDoclet libraries (contained in xdoclet-lib-1.2.3.tgz) into the -./lib/xdocletlib directory - -- install Apache ANT (follow the installation istructions provided -with the tool) - -- install the JBoss Application Server - -- make sure that your JBOSS_HOME environment variable correctly points to -the JBoss installation directory (i.e. /opt/jboss-4.0.4.GA) - -- create a new PostGIS database according to what specified in the -./resources/build.properties with the "database.name", "database.login", -"database.password" properties (eventually change them to fit your needs). - - -5. Running ----------- -Start the JBoss application server with the provided scripts -(run.bat or run.sh). - -From the main application directory (./) execute these commands: - -> ant install-JDBC-driver -This command installs the PostgreSQL driver into JBoss - -> ant install-DataSource -This command installs the DataSource Connector into JBoss - -> ant javadoc -This command generates the application API documentation into the ./javadoc -directory (use index.html to start). - -> ant deploy -Installs the application into JBoss - -> ant run-client -Allows to test the installed application - - -6. Code Details ---------------- -The main components made available in the application are: - -- GeometryBean.java -It is an entity bean containing a geometrical attribute of org.postgis.Geometry -type which could contain every geometrical type (i.e. POINT, LINESTRING, etc.). -The user can choose wether to create a NON-OpenGIS or an OpenGIS-compliant -bean. The first ones can contain different geometric types in the same table -with undefined SRID (-1), while the second ones can only contain object of the -same type and SRID in one table; - -- PostgisGeometryDaoIml.java -A DAO (Data Access Object) implementing persistence operations for the -GeometryBean EJB in a PostGIS database; - -- GeometryFacadeBean.java -A stateless session bean implementing the interface between the geometric -entity beans and the client applications; - -- Client.java -It is a simple client executing some tests thus illustrating the use of the -provided API. - -Further informations could be gathered from the source code and by reading the -javadoc API documentation. +Using PostGIS Geometry Types with EJB2 -- Proof of Concept +---------------------------------------------------------- +Copyright (C) 2006 by the Geodetix s.r.l. Company. See +http://www.geodetix.it/ for further information. + +Version 1.0.0 (2006/08/29) + +Table of Contents +----------------- + +0. Licensing +1. Introduction +2. Directory Contents +3. Software Requirements +4. Installation +5. Running +6. Code Details + + +0. Licensing +------------ +The "Using PostGIS Geometry Types with EJB2 -- Proof of Concept" software is +a short collection of examples related to the use of PostGIS Java API with +the EJB 2.x technology. +Copyright (C) 2006 by the Geodetix s.r.l. Company. See +http://www.geodetix.it/ for further information. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +1. Introduction +--------------- +Our software is a simple proof-of-concept application illustrating how the +PostGIS provided Java geometric types could be integrated with a set of +Enterprise Java Bean 2.x components. + +To achieve such a goal, an attribute of type org.postgis.Geometry has been +added to a BMP (Bean managed Persistence) Entity Bean. Furthermore, by using +the DAO (Data Access Object) Pattern, the persistence code has been clearly +separated from the business logic. + +Not to add further complexity, some proper programming behaviours were omitted. +For example the use of PostGIS geometric types directly inside the Entity Bean +code could be avoided by using a WKT compliant string attribute. Another issue +is about security: table creational methods exposed in the +com.geodetix.geo.ejb.GeometryBean home interface should be protected by +a proper role-base security policy, to avoid normal users deleting database +tables. + +Nevertheless our application, even if quite simple, still holds a lot of +generality and some of the implemented patterns or components are readily +usable in real-world applications. + + +2. Directory Contents +--------------------- + + ./ Build scripts (build.*), README and licensing information + ./src Java source packages and files + ./resources EJB specific configuration files + ./lib JAR libraries needed to compile and run + + +3. Software Requirements +------------------------ +We here list all third-party libraries with their versions tested to work +with the application. + +PostGIS JDBC driver version 1.1.3 +http://www.postgis.org/ + +PostgreSQL JDBC driver version 8.1-404 jdbc3 +http://jdbc.postgresql.org/ + +XDoclet lib version 1.2.3 +http://xdoclet.sourceforge.net + +Apache ANT version 1.6.5 +http://ant.apache.org/ + +JBOSS Application Server version 4.0.4.GA-Patch1 +http://www.jboss.org/ + +Note that our tool is application server agnostic and could be easily ported +to any EJB 2.x compliant Container by modifying the provided deployment +ant file which is, in turn, written for the JBoss Application Server. + + +4. Installation +--------------- +After downloading (and compiling, if necessary) all of the required software, +follow these steps: + +- copy the PostGIS driver (postgis_1.1.3.jar) into the ./lib/commonlib +directory + +- copy the PostgreSQL driver (postgresql-8.1-404.jdbc3.jar) into the +./lib/compiletimelib directory + +- copy the XDoclet libraries (contained in xdoclet-lib-1.2.3.tgz) into the +./lib/xdocletlib directory + +- install Apache ANT (follow the installation istructions provided +with the tool) + +- install the JBoss Application Server + +- make sure that your JBOSS_HOME environment variable correctly points to +the JBoss installation directory (i.e. /opt/jboss-4.0.4.GA) + +- create a new PostGIS database according to what specified in the +./resources/build.properties with the "database.name", "database.login", +"database.password" properties (eventually change them to fit your needs). + + +5. Running +---------- +Start the JBoss application server with the provided scripts +(run.bat or run.sh). + +From the main application directory (./) execute these commands: + +> ant install-JDBC-driver +This command installs the PostgreSQL driver into JBoss + +> ant install-DataSource +This command installs the DataSource Connector into JBoss + +> ant javadoc +This command generates the application API documentation into the ./javadoc +directory (use index.html to start). + +> ant deploy +Installs the application into JBoss + +> ant run-client +Allows to test the installed application + + +6. Code Details +--------------- +The main components made available in the application are: + +- GeometryBean.java +It is an entity bean containing a geometrical attribute of org.postgis.Geometry +type which could contain every geometrical type (i.e. POINT, LINESTRING, etc.). +The user can choose wether to create a NON-OpenGIS or an OpenGIS-compliant +bean. The first ones can contain different geometric types in the same table +with undefined SRID (-1), while the second ones can only contain object of the +same type and SRID in one table; + +- PostgisGeometryDaoIml.java +A DAO (Data Access Object) implementing persistence operations for the +GeometryBean EJB in a PostGIS database; + +- GeometryFacadeBean.java +A stateless session bean implementing the interface between the geometric +entity beans and the client applications; + +- Client.java +It is a simple client executing some tests thus illustrating the use of the +provided API. + +Further informations could be gathered from the source code and by reading the +javadoc API documentation. diff -Nru postgis-1.5.3/java/ejb2/build.xml postgis-2.0.1/java/ejb2/build.xml --- postgis-1.5.3/java/ejb2/build.xml 2009-02-04 00:28:37.000000000 +0000 +++ postgis-2.0.1/java/ejb2/build.xml 2012-02-27 22:08:12.000000000 +0000 @@ -1,272 +1,272 @@ - - - - Using PostGIS Geometry Types with EJB2 - Proof of Concept - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Using PostGIS Geometry Types with EJB2
Proof of Concept]]>
- Copyright © 2006 Geodetix S.r.l. All Rights Reserved.]]> -
-
- -
+ + + + Using PostGIS Geometry Types with EJB2 - Proof of Concept + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Using PostGIS Geometry Types with EJB2
Proof of Concept]]>
+ Copyright © 2006 Geodetix S.r.l. All Rights Reserved.]]> +
+
+ +
diff -Nru postgis-1.5.3/java/ejb2/prepare-jboss.xml postgis-2.0.1/java/ejb2/prepare-jboss.xml --- postgis-1.5.3/java/ejb2/prepare-jboss.xml 2009-02-04 00:28:37.000000000 +0000 +++ postgis-2.0.1/java/ejb2/prepare-jboss.xml 2012-02-27 22:08:12.000000000 +0000 @@ -1,39 +1,39 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru postgis-1.5.3/java/ejb2/resources/application.xml postgis-2.0.1/java/ejb2/resources/application.xml --- postgis-1.5.3/java/ejb2/resources/application.xml 2009-02-04 00:28:37.000000000 +0000 +++ postgis-2.0.1/java/ejb2/resources/application.xml 2012-02-27 22:08:12.000000000 +0000 @@ -1,19 +1,19 @@ - - - - - - postgis-ejb2-poc - - Using PostGIS Geometry Types with EJB2 - Proof of Concept - - - ejb.jar - - - - common.jar - - - + + + + + + postgis-ejb2-poc + + Using PostGIS Geometry Types with EJB2 - Proof of Concept + + + ejb.jar + + + + common.jar + + + diff -Nru postgis-1.5.3/java/ejb2/resources/build.properties postgis-2.0.1/java/ejb2/resources/build.properties --- postgis-1.5.3/java/ejb2/resources/build.properties 2006-08-30 08:46:32.000000000 +0000 +++ postgis-2.0.1/java/ejb2/resources/build.properties 2012-02-27 22:08:12.000000000 +0000 @@ -1,12 +1,12 @@ -# You can change these properties to fit your environment. -# This should be the only file to modify. -# Note that you should NOT leave spaces after a property value - -# Name of the created database -database.name=ejb2poc -# User owner of the database tables -database.login=CHANGEIT -# Password for the db user -database.password=CHANGEIT -# IP or hostname of the machine running the database server -database.host=127.0.0.1 +# You can change these properties to fit your environment. +# This should be the only file to modify. +# Note that you should NOT leave spaces after a property value + +# Name of the created database +database.name=ejb2poc +# User owner of the database tables +database.login=CHANGEIT +# Password for the db user +database.password=CHANGEIT +# IP or hostname of the machine running the database server +database.host=127.0.0.1 diff -Nru postgis-1.5.3/java/ejb2/resources/jndi/jndi.properties postgis-2.0.1/java/ejb2/resources/jndi/jndi.properties --- postgis-1.5.3/java/ejb2/resources/jndi/jndi.properties 2006-08-30 08:46:32.000000000 +0000 +++ postgis-2.0.1/java/ejb2/resources/jndi/jndi.properties 2012-02-27 22:08:12.000000000 +0000 @@ -1,3 +1,3 @@ -java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory -java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces -java.naming.provider.url=localhost +java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory +java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces +java.naming.provider.url=localhost diff -Nru postgis-1.5.3/java/ejb2/resources/postgis-ejb2-ds.xml postgis-2.0.1/java/ejb2/resources/postgis-ejb2-ds.xml --- postgis-1.5.3/java/ejb2/resources/postgis-ejb2-ds.xml 2009-02-04 00:28:37.000000000 +0000 +++ postgis-2.0.1/java/ejb2/resources/postgis-ejb2-ds.xml 2012-02-27 22:08:12.000000000 +0000 @@ -1,17 +1,17 @@ - - - - - - - - - - - @datasource.name@ - @database.connection.url@ - @database.driver@ - @database.login@ - @database.password@ - + + + + + + + + + + + @datasource.name@ + @database.connection.url@ + @database.driver@ + @database.login@ + @database.password@ + \ No newline at end of file diff -Nru postgis-1.5.3/java/ejb3/.settings/org.eclipse.jdt.core.prefs postgis-2.0.1/java/ejb3/.settings/org.eclipse.jdt.core.prefs --- postgis-1.5.3/java/ejb3/.settings/org.eclipse.jdt.core.prefs 2006-09-20 09:03:12.000000000 +0000 +++ postgis-2.0.1/java/ejb3/.settings/org.eclipse.jdt.core.prefs 2012-02-27 22:08:12.000000000 +0000 @@ -1,7 +1,7 @@ -#Mon Sep 18 15:14:48 BST 2006 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.5 +#Mon Sep 18 15:14:48 BST 2006 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.5 diff -Nru postgis-1.5.3/java/ejb3/README.txt postgis-2.0.1/java/ejb3/README.txt --- postgis-1.5.3/java/ejb3/README.txt 2006-10-11 10:45:28.000000000 +0000 +++ postgis-2.0.1/java/ejb3/README.txt 2012-02-27 22:08:12.000000000 +0000 @@ -1,4 +1,4 @@ -$Id: README.txt 2505 2006-10-11 10:45:28Z mschaber $ +$Id: README.txt 9324 2012-02-27 22:08:12Z pramsey $ (This code was contributed by Norman Barker ) Spatial EJB3 diff -Nru postgis-1.5.3/java/ejb3/build.xml postgis-2.0.1/java/ejb3/build.xml --- postgis-1.5.3/java/ejb3/build.xml 2009-02-04 00:28:37.000000000 +0000 +++ postgis-2.0.1/java/ejb3/build.xml 2012-02-27 22:08:12.000000000 +0000 @@ -1,71 +1,71 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru postgis-1.5.3/java/ejb3/jboss/geodata-ds.xml postgis-2.0.1/java/ejb3/jboss/geodata-ds.xml --- postgis-1.5.3/java/ejb3/jboss/geodata-ds.xml 2009-02-04 00:28:37.000000000 +0000 +++ postgis-2.0.1/java/ejb3/jboss/geodata-ds.xml 2012-02-27 22:08:12.000000000 +0000 @@ -1,13 +1,13 @@ - - - - GeoDataDS - jdbc:postgresql://127.0.0.1:5432/geotest - org.postgis.DriverWrapper - geo - geo - - PostgreSQL 8.1 - - - + + + + GeoDataDS + jdbc:postgresql://127.0.0.1:5432/geotest + org.postgis.DriverWrapper + geo + geo + + PostgreSQL 8.1 + + + diff -Nru postgis-1.5.3/java/ejb3/jboss/ingest-service.xml postgis-2.0.1/java/ejb3/jboss/ingest-service.xml --- postgis-1.5.3/java/ejb3/jboss/ingest-service.xml 2009-02-04 00:28:37.000000000 +0000 +++ postgis-2.0.1/java/ejb3/jboss/ingest-service.xml 2012-02-27 22:08:12.000000000 +0000 @@ -1,7 +1,7 @@ - - - - jboss.mq:service=DestinationManager - + + + + jboss.mq:service=DestinationManager + \ No newline at end of file diff -Nru postgis-1.5.3/java/ejb3/src/META-INF/persistence.xml postgis-2.0.1/java/ejb3/src/META-INF/persistence.xml --- postgis-1.5.3/java/ejb3/src/META-INF/persistence.xml 2009-02-04 00:28:37.000000000 +0000 +++ postgis-2.0.1/java/ejb3/src/META-INF/persistence.xml 2012-02-27 22:08:12.000000000 +0000 @@ -1,5 +1,5 @@ - - - java:/GeoDataDS - + + + java:/GeoDataDS + \ No newline at end of file diff -Nru postgis-1.5.3/java/ejb3/src/org/postgis/ejb/PersonEntity.java postgis-2.0.1/java/ejb3/src/org/postgis/ejb/PersonEntity.java --- postgis-1.5.3/java/ejb3/src/org/postgis/ejb/PersonEntity.java 2009-02-04 00:28:37.000000000 +0000 +++ postgis-2.0.1/java/ejb3/src/org/postgis/ejb/PersonEntity.java 2012-02-27 22:08:12.000000000 +0000 @@ -19,7 +19,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: PersonEntity.java 3639 2009-02-04 00:28:37Z pramsey $ + * $Id: PersonEntity.java 9324 2012-02-27 22:08:12Z pramsey $ */ package org.postgis.ejb; diff -Nru postgis-1.5.3/java/ejb3/src/org/postgis/ejb/UserBean.java postgis-2.0.1/java/ejb3/src/org/postgis/ejb/UserBean.java --- postgis-1.5.3/java/ejb3/src/org/postgis/ejb/UserBean.java 2009-02-04 00:28:37.000000000 +0000 +++ postgis-2.0.1/java/ejb3/src/org/postgis/ejb/UserBean.java 2012-02-27 22:08:12.000000000 +0000 @@ -19,7 +19,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: UserBean.java 3639 2009-02-04 00:28:37Z pramsey $ + * $Id: UserBean.java 9324 2012-02-27 22:08:12Z pramsey $ */ package org.postgis.ejb; diff -Nru postgis-1.5.3/java/ejb3/src/org/postgis/ejb/UserBeanRemote.java postgis-2.0.1/java/ejb3/src/org/postgis/ejb/UserBeanRemote.java --- postgis-1.5.3/java/ejb3/src/org/postgis/ejb/UserBeanRemote.java 2009-02-04 00:28:37.000000000 +0000 +++ postgis-2.0.1/java/ejb3/src/org/postgis/ejb/UserBeanRemote.java 2012-02-27 22:08:12.000000000 +0000 @@ -19,7 +19,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: UserBeanRemote.java 3639 2009-02-04 00:28:37Z pramsey $ + * $Id: UserBeanRemote.java 9324 2012-02-27 22:08:12Z pramsey $ */ package org.postgis.ejb; diff -Nru postgis-1.5.3/java/ejb3/src/org/postgis/ejb/mdb/IngestMDB.java postgis-2.0.1/java/ejb3/src/org/postgis/ejb/mdb/IngestMDB.java --- postgis-1.5.3/java/ejb3/src/org/postgis/ejb/mdb/IngestMDB.java 2009-02-04 00:28:37.000000000 +0000 +++ postgis-2.0.1/java/ejb3/src/org/postgis/ejb/mdb/IngestMDB.java 2012-02-27 22:08:12.000000000 +0000 @@ -19,7 +19,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: IngestMDB.java 3639 2009-02-04 00:28:37Z pramsey $ + * $Id: IngestMDB.java 9324 2012-02-27 22:08:12Z pramsey $ */ package org.postgis.ejb.mdb; diff -Nru postgis-1.5.3/java/ejb3/src/org/postgis/hibernate/ContainsExpression.java postgis-2.0.1/java/ejb3/src/org/postgis/hibernate/ContainsExpression.java --- postgis-1.5.3/java/ejb3/src/org/postgis/hibernate/ContainsExpression.java 2009-02-04 00:28:37.000000000 +0000 +++ postgis-2.0.1/java/ejb3/src/org/postgis/hibernate/ContainsExpression.java 2012-02-27 22:08:12.000000000 +0000 @@ -1,83 +1,83 @@ -/* - * ContainsExpression.java - * - * PostGIS extension for PostgreSQL JDBC driver - EJB3 Tutorial - * - * (C) 2006 Norman Barker - * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation, either version 2.1 of the License. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at - * http://www.gnu.org. - * - * $Id: ContainsExpression.java 3639 2009-02-04 00:28:37Z pramsey $ - */ -package org.postgis.hibernate; - -import java.util.ArrayList; -import java.util.List; - -import org.hibernate.Criteria; -import org.hibernate.EntityMode; -import org.hibernate.Hibernate; -import org.hibernate.HibernateException; -import org.hibernate.criterion.CriteriaQuery; -import org.hibernate.criterion.Criterion; -import org.hibernate.dialect.Dialect; -import org.hibernate.dialect.function.StandardSQLFunction; -import org.hibernate.engine.TypedValue; -import org.postgis.Geometry; - -/** - * @author nbarker - * - */ -public class ContainsExpression implements Criterion{ - private static final long serialVersionUID = 1L; - private String propertyName; - private Geometry geom; - - public ContainsExpression(String propertyName, Geometry geom) - { - this.propertyName = propertyName; - this.geom = geom; - } - - public TypedValue[] getTypedValues(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException { - return new TypedValue[]{new TypedValue(Hibernate.custom(GeometryType.class), geom, EntityMode.POJO)}; - } - - public String toSqlString(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException { - Dialect dialect = criteriaQuery.getFactory().getDialect(); - String[] columns = criteriaQuery.getColumnsUsingProjection(criteria, propertyName); - - if (columns.length != 1) throw new HibernateException("\"contains\" may only be used with single-column properties"); - if ( dialect instanceof PostGISDialect) { - StandardSQLFunction function = (StandardSQLFunction)dialect.getFunctions().get(PostGISDialect.NAMESPACE + "contains"); - List args = new ArrayList(); - args.add(columns[0]); - args.add("?"); - - return function.render(args, criteriaQuery.getFactory()); - } - else - { - throw new HibernateException("\"contains\" may only be used with a spatial hibernate dialect"); - } - } - - public String toString() - { - return propertyName + " contains " + geom; - } - -} +/* + * ContainsExpression.java + * + * PostGIS extension for PostgreSQL JDBC driver - EJB3 Tutorial + * + * (C) 2006 Norman Barker + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation, either version 2.1 of the License. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at + * http://www.gnu.org. + * + * $Id: ContainsExpression.java 9324 2012-02-27 22:08:12Z pramsey $ + */ +package org.postgis.hibernate; + +import java.util.ArrayList; +import java.util.List; + +import org.hibernate.Criteria; +import org.hibernate.EntityMode; +import org.hibernate.Hibernate; +import org.hibernate.HibernateException; +import org.hibernate.criterion.CriteriaQuery; +import org.hibernate.criterion.Criterion; +import org.hibernate.dialect.Dialect; +import org.hibernate.dialect.function.StandardSQLFunction; +import org.hibernate.engine.TypedValue; +import org.postgis.Geometry; + +/** + * @author nbarker + * + */ +public class ContainsExpression implements Criterion{ + private static final long serialVersionUID = 1L; + private String propertyName; + private Geometry geom; + + public ContainsExpression(String propertyName, Geometry geom) + { + this.propertyName = propertyName; + this.geom = geom; + } + + public TypedValue[] getTypedValues(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException { + return new TypedValue[]{new TypedValue(Hibernate.custom(GeometryType.class), geom, EntityMode.POJO)}; + } + + public String toSqlString(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException { + Dialect dialect = criteriaQuery.getFactory().getDialect(); + String[] columns = criteriaQuery.getColumnsUsingProjection(criteria, propertyName); + + if (columns.length != 1) throw new HibernateException("\"contains\" may only be used with single-column properties"); + if ( dialect instanceof PostGISDialect) { + StandardSQLFunction function = (StandardSQLFunction)dialect.getFunctions().get(PostGISDialect.NAMESPACE + "contains"); + List args = new ArrayList(); + args.add(columns[0]); + args.add("?"); + + return function.render(args, criteriaQuery.getFactory()); + } + else + { + throw new HibernateException("\"contains\" may only be used with a spatial hibernate dialect"); + } + } + + public String toString() + { + return propertyName + " contains " + geom; + } + +} diff -Nru postgis-1.5.3/java/ejb3/src/org/postgis/hibernate/GeometryType.java postgis-2.0.1/java/ejb3/src/org/postgis/hibernate/GeometryType.java --- postgis-1.5.3/java/ejb3/src/org/postgis/hibernate/GeometryType.java 2009-02-04 00:28:37.000000000 +0000 +++ postgis-2.0.1/java/ejb3/src/org/postgis/hibernate/GeometryType.java 2012-02-27 22:08:12.000000000 +0000 @@ -19,7 +19,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: GeometryType.java 3639 2009-02-04 00:28:37Z pramsey $ + * $Id: GeometryType.java 9324 2012-02-27 22:08:12Z pramsey $ */ package org.postgis.hibernate; diff -Nru postgis-1.5.3/java/ejb3/src/org/postgis/hibernate/IntersectsExpression.java postgis-2.0.1/java/ejb3/src/org/postgis/hibernate/IntersectsExpression.java --- postgis-1.5.3/java/ejb3/src/org/postgis/hibernate/IntersectsExpression.java 2009-02-04 00:28:37.000000000 +0000 +++ postgis-2.0.1/java/ejb3/src/org/postgis/hibernate/IntersectsExpression.java 2012-02-27 22:08:12.000000000 +0000 @@ -1,83 +1,83 @@ -/* - * IntersectsExpression.java - * - * PostGIS extension for PostgreSQL JDBC driver - EJB3 Tutorial - * - * (C) 2006 Norman Barker - * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation, either version 2.1 of the License. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at - * http://www.gnu.org. - * - * $Id: IntersectsExpression.java 3639 2009-02-04 00:28:37Z pramsey $ - */ -package org.postgis.hibernate; - -import java.util.ArrayList; -import java.util.List; - -import org.hibernate.Criteria; -import org.hibernate.EntityMode; -import org.hibernate.Hibernate; -import org.hibernate.HibernateException; -import org.hibernate.criterion.CriteriaQuery; -import org.hibernate.criterion.Criterion; -import org.hibernate.dialect.Dialect; -import org.hibernate.dialect.function.StandardSQLFunction; -import org.hibernate.engine.TypedValue; -import org.postgis.Geometry; - -/** - * @author nbarker - * - */ -public class IntersectsExpression implements Criterion{ - private static final long serialVersionUID = 1L; - private String propertyName; - private Geometry geom; - - public IntersectsExpression(String propertyName, Geometry geom) - { - this.propertyName = propertyName; - this.geom = geom; - } - - public TypedValue[] getTypedValues(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException { - return new TypedValue[]{new TypedValue(Hibernate.custom(GeometryType.class), geom, EntityMode.POJO)}; - } - - public String toSqlString(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException { - Dialect dialect = criteriaQuery.getFactory().getDialect(); - String[] columns = criteriaQuery.getColumnsUsingProjection(criteria, propertyName); - - if (columns.length != 1) throw new HibernateException("\"intersects\" may only be used with single-column properties"); - if ( dialect instanceof PostGISDialect) { - StandardSQLFunction function = (StandardSQLFunction)dialect.getFunctions().get(PostGISDialect.NAMESPACE + "intersects"); - List args = new ArrayList(); - args.add(columns[0]); - args.add("?"); - - return function.render(args, criteriaQuery.getFactory()); - } - else - { - throw new HibernateException("\"intersects\" may only be used with a spatial hibernate dialect"); - } - } - - public String toString() - { - return propertyName + " intersects " + geom; - } - -} +/* + * IntersectsExpression.java + * + * PostGIS extension for PostgreSQL JDBC driver - EJB3 Tutorial + * + * (C) 2006 Norman Barker + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation, either version 2.1 of the License. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at + * http://www.gnu.org. + * + * $Id: IntersectsExpression.java 9324 2012-02-27 22:08:12Z pramsey $ + */ +package org.postgis.hibernate; + +import java.util.ArrayList; +import java.util.List; + +import org.hibernate.Criteria; +import org.hibernate.EntityMode; +import org.hibernate.Hibernate; +import org.hibernate.HibernateException; +import org.hibernate.criterion.CriteriaQuery; +import org.hibernate.criterion.Criterion; +import org.hibernate.dialect.Dialect; +import org.hibernate.dialect.function.StandardSQLFunction; +import org.hibernate.engine.TypedValue; +import org.postgis.Geometry; + +/** + * @author nbarker + * + */ +public class IntersectsExpression implements Criterion{ + private static final long serialVersionUID = 1L; + private String propertyName; + private Geometry geom; + + public IntersectsExpression(String propertyName, Geometry geom) + { + this.propertyName = propertyName; + this.geom = geom; + } + + public TypedValue[] getTypedValues(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException { + return new TypedValue[]{new TypedValue(Hibernate.custom(GeometryType.class), geom, EntityMode.POJO)}; + } + + public String toSqlString(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException { + Dialect dialect = criteriaQuery.getFactory().getDialect(); + String[] columns = criteriaQuery.getColumnsUsingProjection(criteria, propertyName); + + if (columns.length != 1) throw new HibernateException("\"intersects\" may only be used with single-column properties"); + if ( dialect instanceof PostGISDialect) { + StandardSQLFunction function = (StandardSQLFunction)dialect.getFunctions().get(PostGISDialect.NAMESPACE + "intersects"); + List args = new ArrayList(); + args.add(columns[0]); + args.add("?"); + + return function.render(args, criteriaQuery.getFactory()); + } + else + { + throw new HibernateException("\"intersects\" may only be used with a spatial hibernate dialect"); + } + } + + public String toString() + { + return propertyName + " intersects " + geom; + } + +} diff -Nru postgis-1.5.3/java/ejb3/src/org/postgis/hibernate/PostGISDialect.java postgis-2.0.1/java/ejb3/src/org/postgis/hibernate/PostGISDialect.java --- postgis-1.5.3/java/ejb3/src/org/postgis/hibernate/PostGISDialect.java 2009-02-04 00:28:37.000000000 +0000 +++ postgis-2.0.1/java/ejb3/src/org/postgis/hibernate/PostGISDialect.java 2012-02-27 22:08:12.000000000 +0000 @@ -1,76 +1,76 @@ -/* - * PostGISDialect.java - * - * PostGIS extension for PostgreSQL JDBC driver - EJB3 Tutorial - * - * (C) 2006 Norman Barker - * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation, either version 2.1 of the License. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at - * http://www.gnu.org. - * - * $Id: PostGISDialect.java 3639 2009-02-04 00:28:37Z pramsey $ - */ -package org.postgis.hibernate; - -import java.sql.Types; - -import org.hibernate.Hibernate; -import org.hibernate.dialect.PostgreSQLDialect; -import org.hibernate.dialect.function.StandardSQLFunction; -import org.postgis.hibernate.GeometryType; - -/** - * @author nbarker - * - */ -public class PostGISDialect extends PostgreSQLDialect{ - public static String NAMESPACE = "spatial."; - - - public PostGISDialect() - { - super(); - registerColumnType(Types.BLOB, "geometry"); - registerFunction( PostGISDialect.NAMESPACE + "dimension", new StandardSQLFunction("dimension", Hibernate.INTEGER)); - registerFunction( PostGISDialect.NAMESPACE + "geometrytype", new StandardSQLFunction("geometrytype", Hibernate.STRING)); - registerFunction( PostGISDialect.NAMESPACE + "srid", new StandardSQLFunction("srid", Hibernate.INTEGER)); - registerFunction( PostGISDialect.NAMESPACE + "envelope", new StandardSQLFunction("envelope", Hibernate.custom(GeometryType.class))); - registerFunction( PostGISDialect.NAMESPACE + "astext", new StandardSQLFunction("astext", Hibernate.STRING)); - registerFunction( PostGISDialect.NAMESPACE + "asbinary", new StandardSQLFunction("asbinary", Hibernate.BINARY)); - registerFunction( PostGISDialect.NAMESPACE + "isempty", new StandardSQLFunction("isempty", Hibernate.STRING)); - registerFunction( PostGISDialect.NAMESPACE + "issimple", new StandardSQLFunction("issimple", Hibernate.STRING)); - registerFunction( PostGISDialect.NAMESPACE + "boundary", new StandardSQLFunction("boundary", Hibernate.custom(GeometryType.class))); - registerFunction( PostGISDialect.NAMESPACE + "equals", new StandardSQLFunction("equals", Hibernate.STRING)); - registerFunction( PostGISDialect.NAMESPACE + "disjoint", new StandardSQLFunction("disjoint", Hibernate.STRING)); - registerFunction( PostGISDialect.NAMESPACE + "intersects", new StandardSQLFunction("intersects", Hibernate.STRING)); - registerFunction( PostGISDialect.NAMESPACE + "touches", new StandardSQLFunction("touches", Hibernate.STRING)); - registerFunction( PostGISDialect.NAMESPACE + "crosses", new StandardSQLFunction("crosses", Hibernate.STRING)); - registerFunction( PostGISDialect.NAMESPACE + "within", new StandardSQLFunction("within", Hibernate.BOOLEAN)); - registerFunction( PostGISDialect.NAMESPACE + "contains", new StandardSQLFunction("contains", Hibernate.STRING)); - registerFunction( PostGISDialect.NAMESPACE + "overlaps", new StandardSQLFunction("overlaps", Hibernate.STRING)); - registerFunction( PostGISDialect.NAMESPACE + "relate", new StandardSQLFunction("relate", Hibernate.STRING)); - registerFunction( PostGISDialect.NAMESPACE + "distance", new StandardSQLFunction("distance", Hibernate.DOUBLE)); - registerFunction( PostGISDialect.NAMESPACE + "buffer", new StandardSQLFunction("buffer", Hibernate.custom(GeometryType.class))); - registerFunction( PostGISDialect.NAMESPACE + "convexhull", new StandardSQLFunction("convexhull", Hibernate.custom(GeometryType.class))); - registerFunction( PostGISDialect.NAMESPACE + "intersection", new StandardSQLFunction("intersection", Hibernate.custom(GeometryType.class))); - registerFunction( PostGISDialect.NAMESPACE + "union", new StandardSQLFunction("geomunion", Hibernate.custom(GeometryType.class))); - registerFunction( PostGISDialect.NAMESPACE + "difference", new StandardSQLFunction("difference", Hibernate.custom(GeometryType.class))); - registerFunction( PostGISDialect.NAMESPACE + "symdifference", new StandardSQLFunction("symdifference", Hibernate.custom(GeometryType.class))); - registerFunction( PostGISDialect.NAMESPACE + "numgeometries", new StandardSQLFunction("numgeometries", Hibernate.custom(GeometryType.class))); - registerFunction( PostGISDialect.NAMESPACE + "geometryn", new StandardSQLFunction("geometryn", Hibernate.INTEGER)); - registerFunction( PostGISDialect.NAMESPACE + "x", new StandardSQLFunction("x", Hibernate.DOUBLE)); - registerFunction( PostGISDialect.NAMESPACE + "y", new StandardSQLFunction("y", Hibernate.DOUBLE)); - registerFunction( PostGISDialect.NAMESPACE + "geometryfromewtk", new StandardSQLFunction("geometryfromewtk", Hibernate.custom(GeometryType.class))); - } -} +/* + * PostGISDialect.java + * + * PostGIS extension for PostgreSQL JDBC driver - EJB3 Tutorial + * + * (C) 2006 Norman Barker + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation, either version 2.1 of the License. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at + * http://www.gnu.org. + * + * $Id: PostGISDialect.java 9324 2012-02-27 22:08:12Z pramsey $ + */ +package org.postgis.hibernate; + +import java.sql.Types; + +import org.hibernate.Hibernate; +import org.hibernate.dialect.PostgreSQLDialect; +import org.hibernate.dialect.function.StandardSQLFunction; +import org.postgis.hibernate.GeometryType; + +/** + * @author nbarker + * + */ +public class PostGISDialect extends PostgreSQLDialect{ + public static String NAMESPACE = "spatial."; + + + public PostGISDialect() + { + super(); + registerColumnType(Types.BLOB, "geometry"); + registerFunction( PostGISDialect.NAMESPACE + "dimension", new StandardSQLFunction("dimension", Hibernate.INTEGER)); + registerFunction( PostGISDialect.NAMESPACE + "geometrytype", new StandardSQLFunction("geometrytype", Hibernate.STRING)); + registerFunction( PostGISDialect.NAMESPACE + "srid", new StandardSQLFunction("srid", Hibernate.INTEGER)); + registerFunction( PostGISDialect.NAMESPACE + "envelope", new StandardSQLFunction("envelope", Hibernate.custom(GeometryType.class))); + registerFunction( PostGISDialect.NAMESPACE + "astext", new StandardSQLFunction("astext", Hibernate.STRING)); + registerFunction( PostGISDialect.NAMESPACE + "asbinary", new StandardSQLFunction("asbinary", Hibernate.BINARY)); + registerFunction( PostGISDialect.NAMESPACE + "isempty", new StandardSQLFunction("isempty", Hibernate.STRING)); + registerFunction( PostGISDialect.NAMESPACE + "issimple", new StandardSQLFunction("issimple", Hibernate.STRING)); + registerFunction( PostGISDialect.NAMESPACE + "boundary", new StandardSQLFunction("boundary", Hibernate.custom(GeometryType.class))); + registerFunction( PostGISDialect.NAMESPACE + "equals", new StandardSQLFunction("equals", Hibernate.STRING)); + registerFunction( PostGISDialect.NAMESPACE + "disjoint", new StandardSQLFunction("disjoint", Hibernate.STRING)); + registerFunction( PostGISDialect.NAMESPACE + "intersects", new StandardSQLFunction("intersects", Hibernate.STRING)); + registerFunction( PostGISDialect.NAMESPACE + "touches", new StandardSQLFunction("touches", Hibernate.STRING)); + registerFunction( PostGISDialect.NAMESPACE + "crosses", new StandardSQLFunction("crosses", Hibernate.STRING)); + registerFunction( PostGISDialect.NAMESPACE + "within", new StandardSQLFunction("within", Hibernate.BOOLEAN)); + registerFunction( PostGISDialect.NAMESPACE + "contains", new StandardSQLFunction("contains", Hibernate.STRING)); + registerFunction( PostGISDialect.NAMESPACE + "overlaps", new StandardSQLFunction("overlaps", Hibernate.STRING)); + registerFunction( PostGISDialect.NAMESPACE + "relate", new StandardSQLFunction("relate", Hibernate.STRING)); + registerFunction( PostGISDialect.NAMESPACE + "distance", new StandardSQLFunction("distance", Hibernate.DOUBLE)); + registerFunction( PostGISDialect.NAMESPACE + "buffer", new StandardSQLFunction("buffer", Hibernate.custom(GeometryType.class))); + registerFunction( PostGISDialect.NAMESPACE + "convexhull", new StandardSQLFunction("convexhull", Hibernate.custom(GeometryType.class))); + registerFunction( PostGISDialect.NAMESPACE + "intersection", new StandardSQLFunction("intersection", Hibernate.custom(GeometryType.class))); + registerFunction( PostGISDialect.NAMESPACE + "union", new StandardSQLFunction("geomunion", Hibernate.custom(GeometryType.class))); + registerFunction( PostGISDialect.NAMESPACE + "difference", new StandardSQLFunction("difference", Hibernate.custom(GeometryType.class))); + registerFunction( PostGISDialect.NAMESPACE + "symdifference", new StandardSQLFunction("symdifference", Hibernate.custom(GeometryType.class))); + registerFunction( PostGISDialect.NAMESPACE + "numgeometries", new StandardSQLFunction("numgeometries", Hibernate.custom(GeometryType.class))); + registerFunction( PostGISDialect.NAMESPACE + "geometryn", new StandardSQLFunction("geometryn", Hibernate.INTEGER)); + registerFunction( PostGISDialect.NAMESPACE + "x", new StandardSQLFunction("x", Hibernate.DOUBLE)); + registerFunction( PostGISDialect.NAMESPACE + "y", new StandardSQLFunction("y", Hibernate.DOUBLE)); + registerFunction( PostGISDialect.NAMESPACE + "geometryfromewtk", new StandardSQLFunction("geometryfromewtk", Hibernate.custom(GeometryType.class))); + } +} diff -Nru postgis-1.5.3/java/ejb3/src/org/postgis/hibernate/WithinExpression.java postgis-2.0.1/java/ejb3/src/org/postgis/hibernate/WithinExpression.java --- postgis-1.5.3/java/ejb3/src/org/postgis/hibernate/WithinExpression.java 2009-02-04 00:28:37.000000000 +0000 +++ postgis-2.0.1/java/ejb3/src/org/postgis/hibernate/WithinExpression.java 2012-02-27 22:08:12.000000000 +0000 @@ -1,83 +1,83 @@ -/* - * WithinExpression.java - * - * PostGIS extension for PostgreSQL JDBC driver - EJB3 Tutorial - * - * (C) 2006 Norman Barker - * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation, either version 2.1 of the License. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at - * http://www.gnu.org. - * - * $Id: WithinExpression.java 3639 2009-02-04 00:28:37Z pramsey $ - */ -package org.postgis.hibernate; - -import java.util.ArrayList; -import java.util.List; - -import org.hibernate.Criteria; -import org.hibernate.EntityMode; -import org.hibernate.Hibernate; -import org.hibernate.HibernateException; -import org.hibernate.criterion.CriteriaQuery; -import org.hibernate.criterion.Criterion; -import org.hibernate.dialect.Dialect; -import org.hibernate.dialect.function.StandardSQLFunction; -import org.hibernate.engine.TypedValue; -import org.postgis.Geometry; - -/** - * @author nbarker - * - */ -public class WithinExpression implements Criterion{ - private static final long serialVersionUID = 1L; - private String propertyName; - private Geometry geom; - - public WithinExpression(String propertyName, Geometry geom) - { - this.propertyName = propertyName; - this.geom = geom; - } - - public TypedValue[] getTypedValues(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException { - return new TypedValue[]{new TypedValue(Hibernate.custom(GeometryType.class), geom, EntityMode.POJO)}; - } - - public String toSqlString(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException { - Dialect dialect = criteriaQuery.getFactory().getDialect(); - String[] columns = criteriaQuery.getColumnsUsingProjection(criteria, propertyName); - - if (columns.length != 1) throw new HibernateException("\"within\" may only be used with single-column properties"); - if ( dialect instanceof PostGISDialect) { - StandardSQLFunction function = (StandardSQLFunction)dialect.getFunctions().get(PostGISDialect.NAMESPACE + "within"); - List args = new ArrayList(); - args.add(columns[0]); - args.add("?"); - - return function.render(args, criteriaQuery.getFactory()); - } - else - { - throw new HibernateException("\"within\" may only be used with a spatial hibernate dialect"); - } - } - - public String toString() - { - return propertyName + " within " + geom; - } - -} +/* + * WithinExpression.java + * + * PostGIS extension for PostgreSQL JDBC driver - EJB3 Tutorial + * + * (C) 2006 Norman Barker + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation, either version 2.1 of the License. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at + * http://www.gnu.org. + * + * $Id: WithinExpression.java 9324 2012-02-27 22:08:12Z pramsey $ + */ +package org.postgis.hibernate; + +import java.util.ArrayList; +import java.util.List; + +import org.hibernate.Criteria; +import org.hibernate.EntityMode; +import org.hibernate.Hibernate; +import org.hibernate.HibernateException; +import org.hibernate.criterion.CriteriaQuery; +import org.hibernate.criterion.Criterion; +import org.hibernate.dialect.Dialect; +import org.hibernate.dialect.function.StandardSQLFunction; +import org.hibernate.engine.TypedValue; +import org.postgis.Geometry; + +/** + * @author nbarker + * + */ +public class WithinExpression implements Criterion{ + private static final long serialVersionUID = 1L; + private String propertyName; + private Geometry geom; + + public WithinExpression(String propertyName, Geometry geom) + { + this.propertyName = propertyName; + this.geom = geom; + } + + public TypedValue[] getTypedValues(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException { + return new TypedValue[]{new TypedValue(Hibernate.custom(GeometryType.class), geom, EntityMode.POJO)}; + } + + public String toSqlString(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException { + Dialect dialect = criteriaQuery.getFactory().getDialect(); + String[] columns = criteriaQuery.getColumnsUsingProjection(criteria, propertyName); + + if (columns.length != 1) throw new HibernateException("\"within\" may only be used with single-column properties"); + if ( dialect instanceof PostGISDialect) { + StandardSQLFunction function = (StandardSQLFunction)dialect.getFunctions().get(PostGISDialect.NAMESPACE + "within"); + List args = new ArrayList(); + args.add(columns[0]); + args.add("?"); + + return function.render(args, criteriaQuery.getFactory()); + } + else + { + throw new HibernateException("\"within\" may only be used with a spatial hibernate dialect"); + } + } + + public String toString() + { + return propertyName + " within " + geom; + } + +} diff -Nru postgis-1.5.3/java/jdbc/Makefile postgis-2.0.1/java/jdbc/Makefile --- postgis-1.5.3/java/jdbc/Makefile 2008-07-03 17:08:49.000000000 +0000 +++ postgis-2.0.1/java/jdbc/Makefile 2012-06-22 21:04:32.000000000 +0000 @@ -1,293 +1,24 @@ -# PostGIS Makefile +# ********************************************************************** +# * +# * PostGIS - Spatial Types for PostgreSQL +# * http://postgis.refractions.net +# * +# * Copyright (C) 2012 Sandro Santilli +# * +# * This is free software; you can redistribute and/or modify it under +# * the terms of the GNU General Public Licence. See the COPYING file. +# * +# ********************************************************************** + +ANT=/usr/bin/ant + +all: build -# (C) 2004 Paul Ramsey, pramsey@refractions.net -# (C) 2005 Markus Schaber, markus.schaber@logix-tt.com -# (C) 2005 Sandro Santilli, strk@refractions.net -# (C) 2005 Alex Bodnaru, alexbodn@012.net.il +build clean distclean check: + $(ANT) $@ -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -# Following are some variable definitions that may have to be changed -# according to your build environment. This can be done either by editing -# this Makefile, or setting them via shell environment prior to calling make. - -### Config variable section starts ### - -# Configure the helper executables used during build. - -JAVAC?=javac -target 1.2 -source 1.2 -JAVA?=java -JAR?=jar -MKDIR?=mkdir -p -DELETE?=rm -rvf -CP?=cp - -# If you happen to be stuck with ancient jar implementations that do not -# know about the -u option, but does not complain about duplicate directorys -# with the same name (e. G. debian woody fastjar), set the DEBUGJAR below -# variable to postgis_debug.fastjar and JAR (above) to fastjar. -DEBUGJAR?=postgis_debug.jar - -# Make sure our classpath includes your postgresql.jar. This is somehow -# difficult because some JREs (e. G. those on debian woody or sablevm) seem -# to forget their own system classes (aka bootclasspath) as soon as _any_ -# classpath is set, either via environment or via command line. They do not -# implement the concept of distinct classpath and bootclasspath settings, -# as most current java implementations do. This makes it necessary to either -# explicitly include the system classes in the set classpath, or use -# non-standard options line --addclasspath to add both the postgresql.jar -# and our own classes. We also cannot set an unset CLASSPATH variable here -# for this reason. Current (Jan 2005) implementations from SUN, IBM, -# Blackdown, gij and kaffe are known to work fine. - -# If you set POSTGIS_BUILD_CLASSPATH via Environment (even to an empty string), we -# simply use it and do not try to guess anything. If POSTGIS_CLASSPATH is -# not set, we use the contents of CLASSPATH. If CLASSPATH is empty or not -# set, we try to guess a default location that works on most unixoid systems. - -ifeq (${CLASSPATH},) - POSTGIS_BUILD_CLASSPATH?=/usr/share/java/postgresql.jar -else - POSTGIS_BUILD_CLASSPATH?=${CLASSPATH} -endif - -# Set those to --addclasspath for sablevm, to avoid overriding the -# BOOTCLASSPATH, the first one is for the compiler, the second one for JRE. -COMP_ADDCP?=-classpath -EXEC_ADDCP?=-classpath - -# Class path entry separator, this is : on Linux/Unix and ; on Windows -CPSEP?=: - -# This are used for the online regression tests, override via environment -# as applicable. The jtest needs table creation privilege in current_schema(), -# the others only call self contained SELECTs that do not access any tables. -PGHOST?=localhost -PGPORT?=5432 -PGDATABASE?=jdbc_test -PGUSER?=psql -PGPASS?=guess -PGURL?=//$(PGHOST):$(PGPORT)/$(PGDATABASE) - -# Where to put the output from regression tests. If you want to have it on -# stdout, set TESTRD to the empty string. If you want to have it in another -# file, set TESTOUTPUT to the file path. -# Be careful - that file will be deleted by "make clean". -TESTOUTPUT?=test.log -# Output redirect for tests -TESTRD?= >>$(TESTOUTPUT) - -### Config variable section ends ### - -# build internal constants follow: -SRCDIR=./src -EXAMPLES=examples -BUILD=./bin -RUNCP=$(POSTGIS_BUILD_CLASSPATH)$(CPSEP)./postgis.jar -BUILDCP=$(STUBBUILD)$(CPSEP)$(POSTGIS_BUILD_CLASSPATH)$(CPSEP)$(SRCDIR) - -# The pgjdbc 7.2/7.4/8.0 compatibility stub stuff -STUBDIR=stubs -STUBBUILD=./stubbin/ - -# What to put into the JAR files: -JARCONTENTS=-C $(BUILD) org \ - -C $(BUILD) examples \ - -C $(SRCDIR) org/postgresql/driverconfig.properties \ - -C . README COPYING_LGPL \ - -C ../.. COPYING - -DEBUGJARCONTENTS=-C $(SRCDIR) org \ - -C $(SRCDIR) examples - -# include version numbers -include ../../Version.config - -# include configuration from central repository, only needed for install -# and installdirs targets, not for building itsself. --include ../../Makefile.config - -VERSION=$(POSTGIS_MAJOR_VERSION).$(POSTGIS_MINOR_VERSION).$(POSTGIS_MICRO_VERSION) - -# We copy the ../Version.config into the jar to have it read at runtime. -VERSIONPATH=$(BUILD)/org/postgis -VERSIONTARGET=$(VERSIONPATH)/version.properties - - -# Preliminary jts support - not stable yet! -JTSDIR=jtssrc -JTSBUILD=jtsbin/ - -JTSPATH=$(JTSBUILD)$(CPSEP)$(BUILD)$(CPSEP)$(RUNCP) - -# Get the list of all source files - -SRC = $(SRCDIR)/org/postgis/*.java $(SRCDIR)/org/postgis/*/*.java $(SRCDIR)/examples/*.java - -STUBSRC = $(STUBDIR)/org/postgresql/*.java - -JTSSRC = $(JTSDIR)/org/postgis/jts/*.java $(JTSDIR)/examples/*.java - - -# Now the makefile targets that do the work: -# The default target: -all: deprecation-warning \ - jar \ - postgis-jdbc-javadoc.zip \ - offlinetests - -# This Makefile is deprecated for build.xml (build with Ant) -deprecation-warning: - @echo "***" - @echo "*** WARNING: This Makefile is deprecated for a build using Ant (build.xml)" - @echo "***" - @echo "*** If you wish to build a standard PostGIS JDBC driver, please use the Ant build" - @echo "*** If you wish to build a JTS-enabled PostGIS JDBC driver, or run the online" - @echo "*** regression tests, you will currently still need to use this Makefile" - @echo "***" - -# Packing the archives - -jar: compile postgis.jar $(DEBUGJAR) - $(CP) postgis.jar postgis_$(VERSION).jar - $(CP) postgis_debug.jar postgis_debug_$(VERSION).jar - -postgis.jar: compile $(SRCDIR)/org/postgresql/driverconfig.properties - $(JAR) -cf postgis.jar $(JARCONTENTS) - -postgis_debug.jar: postgis.jar $(SRC) - $(CP) postgis.jar postgis_debug.jar - $(JAR) -uf postgis_debug.jar $(DEBUGJARCONTENTS) - -# See comment for DEBUGJAR above for this rule. -postgis_debug.fastjar: compile $(SRC) $(SRCDIR)/org/postgresql/driverconfig.properties - $(JAR) -cf postgis_debug.jar $(JARCONTENTS) $(DEBUGJARCONTENTS) - -$(BUILD): - $(MKDIR) $(BUILD) - -$(STUBBUILD): - $(MKDIR) $(STUBBUILD) - -$(VERSIONPATH): $(BUILD) - $(MKDIR) $(VERSIONPATH) - -$(VERSIONTARGET): $(SRC) ../../Version.config $(VERSIONPATH) - $(CP) ../../Version.config $(VERSIONTARGET) - -stubcompile: $(STUBBUILD) $(SRCCONF) $(STUBSRC) - $(JAVAC) -d $(STUBBUILD) $(STUBSRC) - touch stubcompile - -compile: stubcompile $(BUILD) $(SRCCONF) $(SRC) $(VERSIONTARGET) - $(JAVAC) $(COMP_ADDCP) "$(BUILDCP)" -d $(BUILD) $(SRC) - touch compile - -test: postgis.jar - $(JAVA) $(EXEC_ADDCP) "$(RUNCP)" $(EXAMPLES)/Test $(TESTRD) - -jtest: postgis.jar - $(JAVA) $(EXEC_ADDCP) "$(RUNCP)" $(EXAMPLES)/TestServer $(TESTRD) \ - jdbc:postgresql:$(PGURL) $(PGUSER) $(PGPASS) - -ptestoffline: postgis.jar - $(JAVA) $(EXEC_ADDCP) "$(RUNCP)" $(EXAMPLES)/TestParser $(TESTRD) offline - -ptest: postgis.jar - $(JAVA) $(EXEC_ADDCP) "$(RUNCP)" $(EXAMPLES)/TestParser $(TESTRD) \ - "jdbc:postgresql_postGIS:$(PGURL);jdbc:postgresql_autogis:$(PGURL)" \ - $(PGUSER) $(PGPASS) - -boxtestoffline: postgis.jar - $(JAVA) $(EXEC_ADDCP) "$(RUNCP)" $(EXAMPLES)/TestBoxes $(TESTRD) offline - -boxtest: postgis.jar - $(JAVA) $(EXEC_ADDCP) "$(RUNCP)" $(EXAMPLES)/TestBoxes $(TESTRD) \ - jdbc:postgresql_postGIS:$(PGURL) $(PGUSER) $(PGPASS) - -autoregistertest: postgis.jar - $(JAVA) $(EXEC_ADDCP) "$(RUNCP)" $(EXAMPLES)/TestAutoregister $(TESTRD) \ - jdbc:postgresql:$(PGURL) $(PGUSER) $(PGPASS) - -# Print all available versions -versions: postgis.jar - $(JAVA) $(EXEC_ADDCP) "$(RUNCP)" $(EXAMPLES)/VersionPrinter jdbc:postgresql://$(PGHOST):$(PGPORT)/$(PGDATABASE) $(PGUSER) $(PGPASS) - -offlinetests: boxtestoffline ptestoffline test - -onlinetests: boxtest ptest jtest autoregistertest - -# boxtest and ptest include boxtestoffline and ptestoffline, so we only need -# to run test in addition to the onlinetests -alltests: onlinetests test - -# Cleaning -clean: - echo cleaning... - $(DELETE) $(BUILD) bin stubbin postgis.jar postgis_debug.jar \ - compile stubcompile jtscompile $(JTSBUILD) postgis_jts.jar \ - javadoc-build postgis-jdbc-javadoc.zip \ - $(TESTOUTPUT) \ - postgis_$(VERSION).jar \ - postgis_debug_$(VERSION).jar \ - postgis_jts_$(VERSION).jar - -maintainer-clean: clean - $(DELETE) $(SRCCONF) - - -install: jar installdirs - @echo Testing for successful inclusion of ../Makefile.config - test ../Makefile.config - $(INSTALL_DATA) postgis.jar $(DESTDIR) - $(INSTALL_DATA) postgis_debug.jar $(DESTDIR) - -installdirs: - @mkdir -p $(DESTDIR) - -postgis-jdbc-javadoc.zip: javadoc-build - $(JAR) -cf postgis-jdbc-javadoc.zip -C javadoc-build . - -javadoc-build: - $(MKDIR) javadoc-build - # We use an ugly trick to build on windows and unix - - # javadoc command line options are not portable wr/t path separators - javadoc -d javadoc-build -sourcepath "src:jtssrc:;src;jtssrc" \ - org.postgis org.postgis.jts org.postgis.binary org.postgis.java2d examples - -# Preliminary JTS support - -postgis_jts: postgis_jts.jar jtstestoffline - @echo "Warning! This is beta code. Use at your own risk." - -$(JTSBUILD): - $(MKDIR) $(JTSBUILD) - -jtscompile: compile stubcompile $(JTSBUILD) $(SRCCONF) $(JTSSRC) - $(JAVAC) $(COMP_ADDCP) "$(BUILD)$(CPSEP)$(BUILDCP)" -d $(JTSBUILD) $(JTSSRC) - touch jtscompile - -jtstestoffline: jtscompile - $(JAVA) $(EXEC_ADDCP) "$(JTSPATH)" $(EXAMPLES)/JtsTestParser $(TESTRD) offline - -jtstest: jtscompile - $(JAVA) $(EXEC_ADDCP) "$(JTSPATH)" $(EXAMPLES)/JtsTestParser $(TESTRD) \ - jdbc:postgres_jts:$(PGURL) $(PGUSER) $(PGPASS) - -postgis_jts.jar: postgis.jar jtscompile $(SRCDIR)/org/postgresql/driverconfig.properties - $(CP) postgis.jar postgis_jts.jar - $(JAR) -uf postgis_jts.jar -C $(JTSBUILD) . - $(CP) postgis_jts.jar postgis_jts_$(VERSION).jar +maintainer-clean: distclean + : nothing to do +install uninstall: + : TODO ! diff -Nru postgis-1.5.3/java/jdbc/Makefile.in postgis-2.0.1/java/jdbc/Makefile.in --- postgis-1.5.3/java/jdbc/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/java/jdbc/Makefile.in 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,24 @@ +# ********************************************************************** +# * +# * PostGIS - Spatial Types for PostgreSQL +# * http://postgis.refractions.net +# * +# * Copyright (C) 2012 Sandro Santilli +# * +# * This is free software; you can redistribute and/or modify it under +# * the terms of the GNU General Public Licence. See the COPYING file. +# * +# ********************************************************************** + +ANT=@ANT@ + +all: build + +build clean distclean check: + $(ANT) $@ + +maintainer-clean: distclean + : nothing to do + +install uninstall: + : TODO ! diff -Nru postgis-1.5.3/java/jdbc/README postgis-2.0.1/java/jdbc/README --- postgis-1.5.3/java/jdbc/README 2006-08-30 08:39:01.000000000 +0000 +++ postgis-2.0.1/java/jdbc/README 2012-02-27 22:08:12.000000000 +0000 @@ -68,17 +68,18 @@ * How do I build it? * -You need a recent pgjdbc driver jar, see the download link from above. -It is currently tested and supported with 7.2, 7.3, 7.4, 8.0 and 8.1 pgjdbc -releases. Those are the same PostgreSQL releases that are supported by the -PostGIS server-side C code, and apart from 7.2, the same as currently -supported by PostgreSQL server developers. - -The current PostGIS jdbc release is also reported to run (but not compile) -against the postgresql jdbc7.1-1.2.jar, but this is not supported, as well as -current PostGIS backend itsself does not support 7.1 servers any more. +There are older make files with which you can try to build, but maven is recommended, +as it handles dependencies on a better and cleaner way. -Note that your pgjdbc driver version does not constrain the PostgreSQL +You have to install maven on your computer to build it. To install maven you can try +to search on your software repositories or read the documentation: +http://maven.apache.org/download.html + +To compile your postgis driver, go to the jdbc folder and execute the console +command "mvn package". This should create a postgis jar on the target folder +inside the jdbc folder. + +Note that your postgis driver version does not constrain the PostgreSQL server version. As the JDBC drivers are downwards compatible against older servers, and PostgreSQL servers typically accept older clients, you can easily use e. G. a pgjdbc 8.0 against a PostgreSQL 7.3 server. To benefit @@ -86,16 +87,6 @@ newest stable pgjdbc build that is documented to work against your server release. -Make shure the pgjdbc driver is available in your Java CLASSPATH, -either by setting the environment variable, or by editing the -Makefile. - -A "make jar" then compiles the code and creates two jar files. The -"postgis.jar" is for normal usage and deployment, the -"postgis_debug.jar" additionally includes the source code, for -debugging purposes. - - * It is called jdbc2 - does it work with jdbc3, too? * To make it short: The naming does not refer to SUN jdbc standard releases diff -Nru postgis-1.5.3/java/jdbc/build.xml postgis-2.0.1/java/jdbc/build.xml --- postgis-1.5.3/java/jdbc/build.xml 2009-04-28 17:04:30.000000000 +0000 +++ postgis-2.0.1/java/jdbc/build.xml 2012-02-27 22:08:12.000000000 +0000 @@ -4,7 +4,8 @@ * * PostGIS JDBC driver * - * (C) 2007 Mark Cave-Ayland + * (C) 2007 Mark Cave-Ayland + * Rewritten on 2012 by Maria Arias de Reyna * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free @@ -21,10 +22,12 @@ * http://www.gnu.org. * - Usage: ant -Dclasspath=/path/to/postgresql-jdbc.jar + Usage: ant build --> - + + + @@ -44,14 +47,6 @@ - - - - - - - - @@ -59,79 +54,41 @@ - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + @@ -179,8 +136,9 @@ + - + @@ -196,4 +154,3 @@ - diff -Nru postgis-1.5.3/java/jdbc/jtssrc/examples/JtsTestParser.java postgis-2.0.1/java/jdbc/jtssrc/examples/JtsTestParser.java --- postgis-1.5.3/java/jdbc/jtssrc/examples/JtsTestParser.java 2006-12-18 14:12:20.000000000 +0000 +++ postgis-2.0.1/java/jdbc/jtssrc/examples/JtsTestParser.java 2012-02-27 22:08:12.000000000 +0000 @@ -21,7 +21,7 @@ * Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: JtsTestParser.java 2557 2006-12-18 14:12:20Z mschaber $ + * $Id: JtsTestParser.java 9324 2012-02-27 22:08:12Z pramsey $ */ package examples; diff -Nru postgis-1.5.3/java/jdbc/jtssrc/org/postgis/jts/JtsBinaryParser.java postgis-2.0.1/java/jdbc/jtssrc/org/postgis/jts/JtsBinaryParser.java --- postgis-1.5.3/java/jdbc/jtssrc/org/postgis/jts/JtsBinaryParser.java 2006-10-02 14:30:47.000000000 +0000 +++ postgis-2.0.1/java/jdbc/jtssrc/org/postgis/jts/JtsBinaryParser.java 2012-02-27 22:08:12.000000000 +0000 @@ -19,7 +19,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: JtsBinaryParser.java 2493 2006-10-02 14:30:47Z mschaber $ + * $Id: JtsBinaryParser.java 9324 2012-02-27 22:08:12Z pramsey $ */ package org.postgis.jts; @@ -102,14 +102,14 @@ boolean haveS = (typeword & 0x20000000) != 0; if (haveS) { - int newsrid = data.getInt(); + int newsrid = org.postgis.Geometry.parseSRID(data.getInt()); if (inheritSrid && newsrid != srid) { throw new IllegalArgumentException("Inconsistent srids in complex geometry: " + srid + ", " + newsrid); } else { srid = newsrid; } } else if (!inheritSrid) { - srid = -1; + srid = org.postgis.Geometry.UNKNOWN_SRID; } Geometry result; diff -Nru postgis-1.5.3/java/jdbc/jtssrc/org/postgis/jts/JtsBinaryWriter.java postgis-2.0.1/java/jdbc/jtssrc/org/postgis/jts/JtsBinaryWriter.java --- postgis-1.5.3/java/jdbc/jtssrc/org/postgis/jts/JtsBinaryWriter.java 2006-12-18 12:58:49.000000000 +0000 +++ postgis-2.0.1/java/jdbc/jtssrc/org/postgis/jts/JtsBinaryWriter.java 2012-02-27 22:08:12.000000000 +0000 @@ -19,7 +19,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: JtsBinaryWriter.java 2555 2006-12-18 12:58:49Z mschaber $ + * $Id: JtsBinaryWriter.java 9324 2012-02-27 22:08:12Z pramsey $ */ package org.postgis.jts; @@ -297,8 +297,7 @@ private boolean checkSrid(Geometry geom) { final int srid = geom.getSRID(); - // SRID is default 0 with jts geometries - return (srid != -1) && (srid != 0); + return (srid > 0); } private int estimatePoint(Point geom) { diff -Nru postgis-1.5.3/java/jdbc/jtssrc/org/postgis/jts/JtsGeometry.java postgis-2.0.1/java/jdbc/jtssrc/org/postgis/jts/JtsGeometry.java --- postgis-1.5.3/java/jdbc/jtssrc/org/postgis/jts/JtsGeometry.java 2006-07-19 09:45:53.000000000 +0000 +++ postgis-2.0.1/java/jdbc/jtssrc/org/postgis/jts/JtsGeometry.java 2012-02-27 22:08:12.000000000 +0000 @@ -20,7 +20,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: JtsGeometry.java 2409 2006-07-19 09:45:53Z mschaber $ + * $Id: JtsGeometry.java 9324 2012-02-27 22:08:12Z pramsey $ */ package org.postgis.jts; diff -Nru postgis-1.5.3/java/jdbc/jtssrc/org/postgis/jts/JtsGisWrapper.java postgis-2.0.1/java/jdbc/jtssrc/org/postgis/jts/JtsGisWrapper.java --- postgis-1.5.3/java/jdbc/jtssrc/org/postgis/jts/JtsGisWrapper.java 2005-10-20 15:58:52.000000000 +0000 +++ postgis-2.0.1/java/jdbc/jtssrc/org/postgis/jts/JtsGisWrapper.java 2012-02-27 22:08:12.000000000 +0000 @@ -20,7 +20,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: JtsGisWrapper.java 1977 2005-10-20 15:58:52Z mschaber $ + * $Id: JtsGisWrapper.java 9324 2012-02-27 22:08:12Z pramsey $ */ package org.postgis.jts; @@ -50,7 +50,7 @@ private static final String POSTGRES_PROTOCOL = "jdbc:postgresql:"; private static final String POSTGIS_PROTOCOL = "jdbc:postgresql_JTS:"; - public static final String REVISION = "$Revision: 1977 $"; + public static final String REVISION = "$Revision: 9324 $"; public JtsGisWrapper() { super(); diff -Nru postgis-1.5.3/java/jdbc/jtssrc/org/postgis/jts/JtsWrapper.java postgis-2.0.1/java/jdbc/jtssrc/org/postgis/jts/JtsWrapper.java --- postgis-1.5.3/java/jdbc/jtssrc/org/postgis/jts/JtsWrapper.java 2007-01-08 10:48:31.000000000 +0000 +++ postgis-2.0.1/java/jdbc/jtssrc/org/postgis/jts/JtsWrapper.java 2012-02-27 22:08:12.000000000 +0000 @@ -20,7 +20,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: JtsWrapper.java 2570 2007-01-08 10:48:31Z mschaber $ + * $Id: JtsWrapper.java 9324 2012-02-27 22:08:12Z pramsey $ */ package org.postgis.jts; @@ -61,7 +61,7 @@ private static final String POSTGRES_PROTOCOL = "jdbc:postgresql:"; private static final String POSTGIS_PROTOCOL = "jdbc:postgres_jts:"; - public static final String REVISION = "$Revision: 2570 $"; + public static final String REVISION = "$Revision: 9324 $"; public JtsWrapper() { super(); diff -Nru postgis-1.5.3/java/jdbc/jtssrc/pom.xml postgis-2.0.1/java/jdbc/jtssrc/pom.xml --- postgis-1.5.3/java/jdbc/jtssrc/pom.xml 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/java/jdbc/jtssrc/pom.xml 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,165 @@ + + + 4.0.0 + + org.postgis + postgis-jdbc-jtsparser + 2.0.0 + jar + + Postgis JDBC Driver JTS Parser + http://www.postgis.org + Parser between JTS and PostGIS geometry formats. + + + + GNU Lesser General Public License + http://www.gnu.org/licenses/lgpl-2.1.txt + repo + + + + + + Postgis Development Team + + + María Arias de Reyna + delawen en gmail.com + + + + + Hakan Tandogan + hakan@gurkensalat.com + http://www.gurkensalat.com/ + + Maven Packager + + + + + + User List + postgis-users-subscribe@postgis.refractions.net + postgis-users-unsubscribe@postgis.refractions.net + postgis-users@postgis.refractions.net + http://postgis.refractions.net/pipermail/postgis-users/ + + + Developer List + postgis-devel-subscribe@postgis.refractions.net + postgis-devel-unsubscribe@postgis.refractions.net + postgis-devel@postgis.refractions.net + http://postgis.refractions.net/pipermail/postgis-devel/ + + + + Trac + http://trac.osgeo.org/postgis/ + + + http://trac.osgeo.org/postgis/browser/tags/2.0.0 + scm:svn:http://svn.osgeo.org/postgis/tags/2.0.0/ + scm:svn:http://svn.osgeo.org/postgis/tags/2.0.0/ + + + + ${basedir}/org + + + + org.apache.maven.plugins + maven-source-plugin + + + attach-sources + verify + + jar + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + + + attach-javadocs + verify + + jar + + + + + + + + + + + org.postgis + postgis-jdbc + 2.0.0 + + + com.vividsolutions + jts + 1.12 + + + + + + + maven-javadoc-plugin + + + maven-dependency-plugin + + + maven-project-info-reports-plugin + + + maven-surefire-report-plugin + + + org.codehaus.mojo + findbugs-maven-plugin + + + org.codehaus.mojo + javancss-maven-plugin + + + org.codehaus.mojo + jdepend-maven-plugin + + + org.codehaus.mojo + jxr-maven-plugin + + + org.codehaus.mojo + taglist-maven-plugin + + + org.codehaus.mojo + versions-maven-plugin + + + + + + + + sonatype-postgis-releases + Sonatype Postgis Releases Repo + http://oss.sonatype.org/content/repositories/postgis-releases + + + diff -Nru postgis-1.5.3/java/jdbc/pom.xml postgis-2.0.1/java/jdbc/pom.xml --- postgis-1.5.3/java/jdbc/pom.xml 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/java/jdbc/pom.xml 2012-04-05 18:35:47.000000000 +0000 @@ -0,0 +1,182 @@ + + + 4.0.0 + + org.postgis + postgis-jdbc + ${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}.${POSTGIS_MICRO_VERSION} + jar + + Postgis JDBC Driver + http://www.postgis.org + PostGIS adds support for geographic objects to the PostgreSQL object-relational database. + + + + GNU Lesser General Public License + http://www.gnu.org/licenses/lgpl-2.1.txt + repo + + + + + + Postgis Development Team + + + María Arias de Reyna + delawen en gmail.com + + + + + Hakan Tandogan + hakan@gurkensalat.com + http://www.gurkensalat.com/ + + Maven Packager + + + + + + User List + postgis-users-subscribe@postgis.refractions.net + postgis-users-unsubscribe@postgis.refractions.net + postgis-users@postgis.refractions.net + http://postgis.refractions.net/pipermail/postgis-users/ + + + Developer List + postgis-devel-subscribe@postgis.refractions.net + postgis-devel-unsubscribe@postgis.refractions.net + postgis-devel@postgis.refractions.net + http://postgis.refractions.net/pipermail/postgis-devel/ + + + + Trac + http://trac.osgeo.org/postgis/ + + + http://trac.osgeo.org/postgis/browser/tags/2.0.0 + scm:svn:http://svn.osgeo.org/postgis/tags/2.0.0/ + scm:svn:http://svn.osgeo.org/postgis/tags/2.0.0/ + + + + + ${basedir}/src + + + + src + true + + **/*.properties + + + **/*.java + + + + + + + + + + + + postgresql + postgresql + 9.1-901.jdbc3 + + + + + + maven-javadoc-plugin + + + maven-dependency-plugin + + + maven-project-info-reports-plugin + + + maven-surefire-report-plugin + + + org.codehaus.mojo + findbugs-maven-plugin + + + org.codehaus.mojo + javancss-maven-plugin + + + org.codehaus.mojo + jdepend-maven-plugin + + + org.codehaus.mojo + jxr-maven-plugin + + + org.codehaus.mojo + taglist-maven-plugin + + + org.codehaus.mojo + versions-maven-plugin + + + + + + + + sonatype-postgis-releases + Sonatype Postgis Releases Repo + http://oss.sonatype.org/content/repositories/postgis-releases + + + + + + 2 + 0 + 1SVN + + + diff -Nru postgis-1.5.3/java/jdbc/src/examples/Test.java postgis-2.0.1/java/jdbc/src/examples/Test.java --- postgis-1.5.3/java/jdbc/src/examples/Test.java 2005-04-15 14:04:34.000000000 +0000 +++ postgis-2.0.1/java/jdbc/src/examples/Test.java 2012-02-27 22:08:12.000000000 +0000 @@ -21,7 +21,7 @@ * Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: Test.java 1622 2005-04-15 14:04:34Z mschaber $ + * $Id: Test.java 9324 2012-02-27 22:08:12Z pramsey $ */ package examples; diff -Nru postgis-1.5.3/java/jdbc/src/examples/TestAutoregister.java postgis-2.0.1/java/jdbc/src/examples/TestAutoregister.java --- postgis-1.5.3/java/jdbc/src/examples/TestAutoregister.java 2006-10-02 23:26:34.000000000 +0000 +++ postgis-2.0.1/java/jdbc/src/examples/TestAutoregister.java 2012-02-27 22:08:12.000000000 +0000 @@ -19,7 +19,7 @@ * Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: TestAutoregister.java 2497 2006-10-02 23:26:34Z mschaber $ + * $Id: TestAutoregister.java 9324 2012-02-27 22:08:12Z pramsey $ */ package examples; diff -Nru postgis-1.5.3/java/jdbc/src/examples/TestBoxes.java postgis-2.0.1/java/jdbc/src/examples/TestBoxes.java --- postgis-1.5.3/java/jdbc/src/examples/TestBoxes.java 2005-04-15 14:04:34.000000000 +0000 +++ postgis-2.0.1/java/jdbc/src/examples/TestBoxes.java 2012-02-27 22:08:12.000000000 +0000 @@ -21,7 +21,7 @@ * Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: TestBoxes.java 1622 2005-04-15 14:04:34Z mschaber $ + * $Id: TestBoxes.java 9324 2012-02-27 22:08:12Z pramsey $ */ package examples; diff -Nru postgis-1.5.3/java/jdbc/src/examples/TestJava2d.java postgis-2.0.1/java/jdbc/src/examples/TestJava2d.java --- postgis-1.5.3/java/jdbc/src/examples/TestJava2d.java 2006-07-18 18:13:57.000000000 +0000 +++ postgis-2.0.1/java/jdbc/src/examples/TestJava2d.java 2012-02-27 22:08:12.000000000 +0000 @@ -21,7 +21,7 @@ * Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: TestJava2d.java 2408 2006-07-18 18:13:57Z mschaber $ + * $Id: TestJava2d.java 9324 2012-02-27 22:08:12Z pramsey $ */ package examples; diff -Nru postgis-1.5.3/java/jdbc/src/examples/TestParser.java postgis-2.0.1/java/jdbc/src/examples/TestParser.java --- postgis-1.5.3/java/jdbc/src/examples/TestParser.java 2006-05-03 08:30:25.000000000 +0000 +++ postgis-2.0.1/java/jdbc/src/examples/TestParser.java 2012-02-27 22:08:12.000000000 +0000 @@ -21,7 +21,7 @@ * Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: TestParser.java 2340 2006-05-03 08:30:25Z mschaber $ + * $Id: TestParser.java 9324 2012-02-27 22:08:12Z pramsey $ */ package examples; diff -Nru postgis-1.5.3/java/jdbc/src/examples/TestServer.java postgis-2.0.1/java/jdbc/src/examples/TestServer.java --- postgis-1.5.3/java/jdbc/src/examples/TestServer.java 2005-04-15 14:04:34.000000000 +0000 +++ postgis-2.0.1/java/jdbc/src/examples/TestServer.java 2012-02-27 22:08:12.000000000 +0000 @@ -21,7 +21,7 @@ * Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: TestServer.java 1622 2005-04-15 14:04:34Z mschaber $ + * $Id: TestServer.java 9324 2012-02-27 22:08:12Z pramsey $ */ package examples; @@ -33,84 +33,76 @@ public class TestServer { - public static void main(String[] args) { - if (args.length != 4 && args.length != 3) { - System.err.println("Usage: java examples/TestServer dburl user pass [tablename]"); - System.err.println(); - System.err.println("dburl has the following format:"); - System.err.println("jdbc:postgresql://HOST:PORT/DATABASENAME"); - System.err.println("tablename is 'jdbc_test' by default."); - System.exit(1); - } - - Connection conn; - - String dburl = args[0]; - String dbuser = args[1]; - String dbpass = args[2]; - - String dbtable = "jdbc_test"; - - String dropSQL = "drop table " + dbtable; - String createSQL = "create table " + dbtable + " (geom geometry, id int4)"; - String insertPointSQL = "insert into " + dbtable + " values ('POINT (10 10 10)',1)"; - String insertPolygonSQL = "insert into " + dbtable - + " values ('POLYGON ((0 0 0,0 10 0,10 10 0,10 0 0,0 0 0))',2)"; - - try { - - System.out.println("Creating JDBC connection..."); - Class.forName("org.postgresql.Driver"); - conn = DriverManager.getConnection(dburl, dbuser, dbpass); - System.out.println("Adding geometric type entries..."); - /* - * magic trickery to be pgjdbc 7.2 compatible - * - * This works due to the late binding of data types in most java - * VMs. As this is more a demo source than a real-world app, we can - * risk breaking on exotic VMs here. Real-world apps usually do not - * suffer from this problem as they do not have to support such a - * wide range of different pgjdbc releases, or they can use the - * approach from org.postgis.DriverWrapper (which we do not use here - * intentionally to have a test for the other ways to do it). - */ - if (conn.getClass().getName().equals("org.postgresql.jdbc2.Connection")) { - ((org.postgresql.Connection) conn).addDataType("geometry", "org.postgis.PGgeometry"); - ((org.postgresql.Connection) conn).addDataType("box3d", "org.postgis.PGbox3d"); - } else { - ((org.postgresql.PGConnection) conn).addDataType("geometry", - "org.postgis.PGgeometry"); - ((org.postgresql.PGConnection) conn).addDataType("box3d", "org.postgis.PGbox3d"); - } - Statement s = conn.createStatement(); - System.out.println("Creating table with geometric types..."); - // table might not yet exist - try { - s.execute(dropSQL); - } catch (Exception e) { - System.out.println("Error dropping old table: " + e.getMessage()); - } - s.execute(createSQL); - System.out.println("Inserting point..."); - s.execute(insertPointSQL); - System.out.println("Inserting polygon..."); - s.execute(insertPolygonSQL); - System.out.println("Done."); - s = conn.createStatement(); - System.out.println("Querying table..."); - ResultSet r = s.executeQuery("select asText(geom),id from " + dbtable); - while (r.next()) { - Object obj = r.getObject(1); - int id = r.getInt(2); - System.out.println("Row " + id + ":"); - System.out.println(obj.toString()); - } - s.close(); - conn.close(); - } catch (Exception e) { - System.err.println("Aborted due to error:"); - e.printStackTrace(); - System.exit(1); - } - } + public static void main(String[] args) { + if (args.length != 4 && args.length != 3) { + System.err + .println("Usage: java examples/TestServer dburl user pass [tablename]"); + System.err.println(); + System.err.println("dburl has the following format:"); + System.err.println("jdbc:postgresql://HOST:PORT/DATABASENAME"); + System.err.println("tablename is 'jdbc_test' by default."); + System.exit(1); + } + + Connection conn; + + String dburl = args[0]; + String dbuser = args[1]; + String dbpass = args[2]; + + String dbtable = "jdbc_test"; + + String dropSQL = "drop table " + dbtable; + String createSQL = "create table " + dbtable + + " (geom geometry, id int4)"; + String insertPointSQL = "insert into " + dbtable + + " values ('POINT (10 10 10)',1)"; + String insertPolygonSQL = "insert into " + dbtable + + " values ('POLYGON ((0 0 0,0 10 0,10 10 0,10 0 0,0 0 0))',2)"; + + try { + + System.out.println("Creating JDBC connection..."); + Class.forName("org.postgresql.Driver"); + conn = DriverManager.getConnection(dburl, dbuser, dbpass); + System.out.println("Adding geometric type entries..."); + + ((org.postgresql.PGConnection) conn).addDataType("geometry", + org.postgis.PGgeometry.class); + ((org.postgresql.PGConnection) conn).addDataType("box3d", + org.postgis.PGbox3d.class); + + Statement s = conn.createStatement(); + System.out.println("Creating table with geometric types..."); + // table might not yet exist + try { + s.execute(dropSQL); + } catch (Exception e) { + System.out.println("Error dropping old table: " + + e.getMessage()); + } + s.execute(createSQL); + System.out.println("Inserting point..."); + s.execute(insertPointSQL); + System.out.println("Inserting polygon..."); + s.execute(insertPolygonSQL); + System.out.println("Done."); + s = conn.createStatement(); + System.out.println("Querying table..."); + ResultSet r = s.executeQuery("select asText(geom),id from " + + dbtable); + while (r.next()) { + Object obj = r.getObject(1); + int id = r.getInt(2); + System.out.println("Row " + id + ":"); + System.out.println(obj.toString()); + } + s.close(); + conn.close(); + } catch (Exception e) { + System.err.println("Aborted due to error:"); + e.printStackTrace(); + System.exit(1); + } + } } diff -Nru postgis-1.5.3/java/jdbc/src/examples/VersionPrinter.java postgis-2.0.1/java/jdbc/src/examples/VersionPrinter.java --- postgis-1.5.3/java/jdbc/src/examples/VersionPrinter.java 2005-04-26 07:01:29.000000000 +0000 +++ postgis-2.0.1/java/jdbc/src/examples/VersionPrinter.java 2012-02-27 22:08:12.000000000 +0000 @@ -19,7 +19,7 @@ * Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: VersionPrinter.java 1672 2005-04-26 07:01:29Z mschaber $ + * $Id: VersionPrinter.java 9324 2012-02-27 22:08:12Z pramsey $ */ package examples; diff -Nru postgis-1.5.3/java/jdbc/src/org/postgis/ComposedGeom.java postgis-2.0.1/java/jdbc/src/org/postgis/ComposedGeom.java --- postgis-1.5.3/java/jdbc/src/org/postgis/ComposedGeom.java 2006-11-02 09:03:30.000000000 +0000 +++ postgis-2.0.1/java/jdbc/src/org/postgis/ComposedGeom.java 2012-02-27 22:08:12.000000000 +0000 @@ -21,7 +21,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: ComposedGeom.java 2523 2006-11-02 09:03:30Z mschaber $ + * $Id: ComposedGeom.java 9324 2012-02-27 22:08:12Z pramsey $ */ package org.postgis; diff -Nru postgis-1.5.3/java/jdbc/src/org/postgis/DriverWrapper.java postgis-2.0.1/java/jdbc/src/org/postgis/DriverWrapper.java --- postgis-1.5.3/java/jdbc/src/org/postgis/DriverWrapper.java 2007-01-08 10:48:31.000000000 +0000 +++ postgis-2.0.1/java/jdbc/src/org/postgis/DriverWrapper.java 2012-02-27 22:08:12.000000000 +0000 @@ -19,7 +19,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: DriverWrapper.java 2570 2007-01-08 10:48:31Z mschaber $ + * $Id: DriverWrapper.java 9324 2012-02-27 22:08:12Z pramsey $ */ package org.postgis; @@ -75,7 +75,7 @@ public static final String POSTGRES_PROTOCOL = "jdbc:postgresql:"; public static final String POSTGIS_PROTOCOL = "jdbc:postgresql_postGIS:"; - public static final String REVISION = "$Revision: 2570 $"; + public static final String REVISION = "$Revision: 9324 $"; protected static TypesAdder ta72 = null; protected static TypesAdder ta74 = null; protected static TypesAdder ta80 = null; @@ -224,7 +224,7 @@ * * @throws SQLException */ - public static void addGISTypes72(org.postgresql.Connection pgconn) throws SQLException { + public static void addGISTypes72(org.postgresql.PGConnection pgconn) throws SQLException { loadTypesAdder("72").addGT((Connection) pgconn, false); } @@ -264,39 +264,39 @@ /** addGISTypes for V7.3 and V7.4 pgjdbc */ protected static final class TypesAdder74 extends TypesAdder { - public void addGeometries(Connection conn) { + public void addGeometries(Connection conn) throws SQLException { PGConnection pgconn = (PGConnection) conn; - pgconn.addDataType("geometry", "org.postgis.PGgeometry"); + pgconn.addDataType("geometry", org.postgis.PGgeometry.class); } - public void addBoxen(Connection conn) { + public void addBoxen(Connection conn) throws SQLException { PGConnection pgconn = (PGConnection) conn; - pgconn.addDataType("box3d", "org.postgis.PGbox3d"); - pgconn.addDataType("box2d", "org.postgis.PGbox2d"); + pgconn.addDataType("box3d", org.postgis.PGbox3d.class); + pgconn.addDataType("box2d", org.postgis.PGbox2d.class); } - public void addBinaryGeometries(Connection conn) { + public void addBinaryGeometries(Connection conn) throws SQLException { PGConnection pgconn = (PGConnection) conn; - pgconn.addDataType("geometry", "org.postgis.PGgeometryLW"); + pgconn.addDataType("geometry", org.postgis.PGgeometryLW.class); } } /** addGISTypes for V7.2 pgjdbc */ protected static class TypesAdder72 extends TypesAdder { - public void addGeometries(Connection conn) { - org.postgresql.Connection pgconn = (org.postgresql.Connection) conn; - pgconn.addDataType("geometry", "org.postgis.PGgeometry"); + public void addGeometries(Connection conn) throws SQLException { + org.postgresql.PGConnection pgconn = (org.postgresql.PGConnection) conn; + pgconn.addDataType("geometry", org.postgis.PGgeometry.class); } - public void addBoxen(Connection conn) { - org.postgresql.Connection pgconn = (org.postgresql.Connection) conn; - pgconn.addDataType("box3d", "org.postgis.PGbox3d"); - pgconn.addDataType("box2d", "org.postgis.PGbox2d"); + public void addBoxen(Connection conn) throws SQLException { + org.postgresql.PGConnection pgconn = (org.postgresql.PGConnection) conn; + pgconn.addDataType("box3d", org.postgis.PGbox3d.class); + pgconn.addDataType("box2d", org.postgis.PGbox2d.class); } - public void addBinaryGeometries(Connection conn) { - org.postgresql.Connection pgconn = (org.postgresql.Connection) conn; - pgconn.addDataType("geometry", "org.postgis.PGgeometryLW"); + public void addBinaryGeometries(Connection conn) throws SQLException { + org.postgresql.PGConnection pgconn = (org.postgresql.PGConnection) conn; + pgconn.addDataType("geometry", org.postgis.PGgeometryLW.class); } } diff -Nru postgis-1.5.3/java/jdbc/src/org/postgis/DriverWrapperAutoprobe.java postgis-2.0.1/java/jdbc/src/org/postgis/DriverWrapperAutoprobe.java --- postgis-1.5.3/java/jdbc/src/org/postgis/DriverWrapperAutoprobe.java 2007-01-08 10:48:31.000000000 +0000 +++ postgis-2.0.1/java/jdbc/src/org/postgis/DriverWrapperAutoprobe.java 2012-02-27 22:08:12.000000000 +0000 @@ -19,7 +19,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: DriverWrapperAutoprobe.java 2570 2007-01-08 10:48:31Z mschaber $ + * $Id: DriverWrapperAutoprobe.java 9324 2012-02-27 22:08:12Z pramsey $ */ package org.postgis; @@ -54,7 +54,7 @@ public class DriverWrapperAutoprobe extends DriverWrapper { public static final String POSTGIS_AUTOPROTOCOL = "jdbc:postgresql_autogis:"; - public static final String REVISIONAUTO = "$Revision: 2570 $"; + public static final String REVISIONAUTO = "$Revision: 9324 $"; /** * Default constructor. diff -Nru postgis-1.5.3/java/jdbc/src/org/postgis/DriverWrapperLW.java postgis-2.0.1/java/jdbc/src/org/postgis/DriverWrapperLW.java --- postgis-1.5.3/java/jdbc/src/org/postgis/DriverWrapperLW.java 2007-01-08 10:48:31.000000000 +0000 +++ postgis-2.0.1/java/jdbc/src/org/postgis/DriverWrapperLW.java 2012-02-27 22:08:12.000000000 +0000 @@ -19,7 +19,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: DriverWrapperLW.java 2570 2007-01-08 10:48:31Z mschaber $ + * $Id: DriverWrapperLW.java 9324 2012-02-27 22:08:12Z pramsey $ */ package org.postgis; @@ -49,7 +49,7 @@ public class DriverWrapperLW extends DriverWrapper { public static final String POSTGIS_LWPROTOCOL = "jdbc:postgresql_lwgis:"; - public static final String REVISIONLW = "$Revision: 2570 $"; + public static final String REVISIONLW = "$Revision: 9324 $"; /** * Default constructor. diff -Nru postgis-1.5.3/java/jdbc/src/org/postgis/Geometry.java postgis-2.0.1/java/jdbc/src/org/postgis/Geometry.java --- postgis-1.5.3/java/jdbc/src/org/postgis/Geometry.java 2009-04-28 17:04:30.000000000 +0000 +++ postgis-2.0.1/java/jdbc/src/org/postgis/Geometry.java 2012-02-27 22:08:12.000000000 +0000 @@ -21,7 +21,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: Geometry.java 4038 2009-04-28 17:04:30Z kneufeld $ + * $Id: Geometry.java 9324 2012-02-27 22:08:12Z pramsey $ */ package org.postgis; @@ -30,294 +30,307 @@ /** The base class of all geometries */ public abstract class Geometry implements Serializable { - /* JDK 1.5 Serialization */ - private static final long serialVersionUID = 0x100; + /* JDK 1.5 Serialization */ + private static final long serialVersionUID = 0x100; - // OpenGIS Geometry types as defined in the OGC WKB Spec - // (May we replace this with an ENUM as soon as JDK 1.5 - // has gained widespread usage?) - - /** Fake type for linear ring */ - public static final int LINEARRING = 0; - /** - * The OGIS geometry type number for points. - */ - public static final int POINT = 1; - - /** - * The OGIS geometry type number for lines. - */ - public static final int LINESTRING = 2; - - /** - * The OGIS geometry type number for polygons. - */ - public static final int POLYGON = 3; - - /** - * The OGIS geometry type number for aggregate points. - */ - public static final int MULTIPOINT = 4; - - /** - * The OGIS geometry type number for aggregate lines. - */ - public static final int MULTILINESTRING = 5; - - /** - * The OGIS geometry type number for aggregate polygons. - */ - public static final int MULTIPOLYGON = 6; - - /** - * The OGIS geometry type number for feature collections. - */ - public static final int GEOMETRYCOLLECTION = 7; - - public static final String[] ALLTYPES = new String[]{ - "", // internally used LinearRing does not have any text in front of it - "POINT", - "LINESTRING", - "POLYGON", - "MULTIPOINT", - "MULTILINESTRING", - "MULTIPOLYGON", - "GEOMETRYCOLLECTION"}; - - /** - * The Text representations of the geometry types - */ - public static String getTypeString(int type) { - if (type >= 0 && type <= 7) { - return ALLTYPES[type]; - } else { - throw new IllegalArgumentException("Unknown Geometry type" + type); - } - } - - // Properties common to all geometries - /** - * The dimensionality of this feature (2,3) - */ - public int dimension; - - /** - * Do we have a measure (4th dimension) - */ - public boolean haveMeasure = false; - - /** - * The OGIS geometry type of this feature. this is final as it never - * changes, it is bound to the subclass of the instance. - */ - public final int type; - - /** - * The spacial reference system id of this geometry, default (no srid) is -1 - */ - public int srid = -1; - - /** - * Constructor for subclasses - * - * @param type has to be given by all subclasses. - */ - protected Geometry(int type) { - this.type = type; - } - - /** - * java.lang.Object hashCode implementation - */ - public int hashCode() { - return dimension | (type * 4) | (srid * 32); - } - - /** - * java.lang.Object equals implementation - */ - public boolean equals(Object other) { - return (other != null) && (other instanceof Geometry) && equals((Geometry) other); - } - - /** - * geometry specific equals implementation - only defined for non-null - * values - */ - public boolean equals(Geometry other) { - return (other != null) - && (this.dimension == other.dimension) - && (this.type == other.type) - && (this.srid == other.srid) - && (this.haveMeasure == other.haveMeasure) - && other.getClass().equals(this.getClass()) - && this.equalsintern(other); - } - - /** - * Whether test coordinates for geometry - subclass specific code - * - * Implementors can assume that dimensin, type, srid and haveMeasure are - * equal, other != null and other is the same subclass. - */ - protected abstract boolean equalsintern(Geometry other); - - /** - * Return the number of Points of the geometry - */ - public abstract int numPoints(); - - /** - * Get the nth Point of the geometry - * - * @param n the index of the point, from 0 to numPoints()-1; - * @throws ArrayIndexOutOfBoundsException in case of an emtpy geometry or - * bad index. - */ - public abstract Point getPoint(int n); - - /** - * Same as getPoint(0); - */ - public abstract Point getFirstPoint(); - - /** - * Same as getPoint(numPoints()-1); - */ - public abstract Point getLastPoint(); - - /** - * The OGIS geometry type number of this geometry. - */ - public int getType() { - return this.type; - } - - /** - * Return the Type as String - */ - public String getTypeString() { - return getTypeString(this.type); - } - - /** Returns whether we have a measure */ - public boolean isMeasured() { - return haveMeasure; - } - - /** - * Queries the number of geometric dimensions of this geometry. This does - * not include measures, as opposed to the server. - * - * @return The dimensionality (eg, 2D or 3D) of this geometry. - */ - public int getDimension() { - return this.dimension; - } - - /** - * The OGIS geometry type number of this geometry. - */ - public int getSrid() { - return this.srid; - } - - /** - * Recursively sets the srid on this geometry and all contained - * subgeometries - */ - public void setSrid(int srid) { - this.srid = srid; - } - - public String toString() { - StringBuffer sb = new StringBuffer(); - if (srid != -1) { - sb.append("SRID="); - sb.append(srid); - sb.append(';'); - } - outerWKT(sb, true); - return sb.toString(); - } - - /** - * Render the WKT version of this Geometry (without SRID) into the given - * StringBuffer. - */ - public void outerWKT(StringBuffer sb, boolean putM) { - sb.append(getTypeString()); - if (putM && haveMeasure && dimension == 2) { - sb.append('M'); - } - mediumWKT(sb); - } - - public final void outerWKT(StringBuffer sb) { - outerWKT(sb, true); - } - - /** - * Render the WKT without the type name, but including the brackets into the - * StringBuffer - */ - protected void mediumWKT(StringBuffer sb) { - sb.append('('); - innerWKT(sb); - sb.append(')'); - } - - /** - * Render the "inner" part of the WKT (inside the brackets) into the - * StringBuffer. - */ - protected abstract void innerWKT(StringBuffer SB); - - /** - * backwards compatibility method - */ - public String getValue() { - StringBuffer sb = new StringBuffer(); - mediumWKT(sb); - return sb.toString(); - } - - /** - * Do some internal consistency checks on the geometry. - * - * Currently, all Geometries must have a valid dimension (2 or 3) and a - * valid type. 2-dimensional Points must have Z=0.0, as well as non-measured - * Points must have m=0.0. Composed geometries must have all equal SRID, - * dimensionality and measures, as well as that they do not contain NULL or - * inconsistent subgeometries. - * - * BinaryParser and WKTParser should only generate consistent geometries. - * BinaryWriter may produce invalid results on inconsistent geometries. - * - * @return true if all checks are passed. - */ - public boolean checkConsistency() { - return (dimension >= 2 && dimension <= 3) && (type >= 0 && type <= 7); - } - - /** - * Splits the SRID=4711; part of a EWKT rep if present and sets the srid. - * - * @return value without the SRID=4711; part - */ - protected String initSRID(String value) { - value = value.trim(); - if (value.startsWith("SRID=")) { - int index = value.indexOf(';', 5); // sridprefix length is 5 - if (index == -1) { - throw new IllegalArgumentException( - "Error parsing Geometry - SRID not delimited with ';' "); - } else { - this.srid = Integer.parseInt(value.substring(5, index)); - return value.substring(index + 1).trim(); - } - } else { - return value; - } - } + // OpenGIS Geometry types as defined in the OGC WKB Spec + // (May we replace this with an ENUM as soon as JDK 1.5 + // has gained widespread usage?) + + /** Fake type for linear ring */ + public static final int LINEARRING = 0; + /** + * The OGIS geometry type number for points. + */ + public static final int POINT = 1; + + /** + * The OGIS geometry type number for lines. + */ + public static final int LINESTRING = 2; + + /** + * The OGIS geometry type number for polygons. + */ + public static final int POLYGON = 3; + + /** + * The OGIS geometry type number for aggregate points. + */ + public static final int MULTIPOINT = 4; + + /** + * The OGIS geometry type number for aggregate lines. + */ + public static final int MULTILINESTRING = 5; + + /** + * The OGIS geometry type number for aggregate polygons. + */ + public static final int MULTIPOLYGON = 6; + + /** + * The OGIS geometry type number for feature collections. + */ + public static final int GEOMETRYCOLLECTION = 7; + + public static final String[] ALLTYPES = new String[] { + "", // internally used LinearRing does not have any text in front of + // it + "POINT", "LINESTRING", "POLYGON", "MULTIPOINT", "MULTILINESTRING", + "MULTIPOLYGON", "GEOMETRYCOLLECTION" }; + + /** + * The Text representations of the geometry types + */ + public static String getTypeString(int type) { + if (type >= 0 && type <= 7) { + return ALLTYPES[type]; + } else { + throw new IllegalArgumentException("Unknown Geometry type" + type); + } + } + + // Properties common to all geometries + /** + * The dimensionality of this feature (2,3) + */ + public int dimension; + + /** + * Do we have a measure (4th dimension) + */ + public boolean haveMeasure = false; + + /** + * The OGIS geometry type of this feature. this is final as it never + * changes, it is bound to the subclass of the instance. + */ + public final int type; + + /** + * Official UNKNOWN srid value + */ + public final static int UNKNOWN_SRID = 0; + + /** + * The spacial reference system id of this geometry, default is no srid + */ + public int srid = UNKNOWN_SRID; + + /** + * Parse a SRID value, anything <= 0 is unknown + */ + public static int parseSRID(int srid) { + if (srid < 0) { + /* TODO: raise a warning ? */ + srid = 0; + } + return srid; + } + + /** + * Constructor for subclasses + * + * @param type + * has to be given by all subclasses. + */ + protected Geometry(int type) { + this.type = type; + } + + /** + * java.lang.Object hashCode implementation + */ + public int hashCode() { + return dimension | (type * 4) | (srid * 32); + } + + /** + * java.lang.Object equals implementation + */ + public boolean equals(Object other) { + return (other != null) && (other instanceof Geometry) + && equals((Geometry) other); + } + + /** + * geometry specific equals implementation - only defined for non-null + * values + */ + public boolean equals(Geometry other) { + return (other != null) && (this.dimension == other.dimension) + && (this.type == other.type) && (this.srid == other.srid) + && (this.haveMeasure == other.haveMeasure) + && other.getClass().equals(this.getClass()) + && this.equalsintern(other); + } + + /** + * Whether test coordinates for geometry - subclass specific code + * + * Implementors can assume that dimensin, type, srid and haveMeasure are + * equal, other != null and other is the same subclass. + */ + protected abstract boolean equalsintern(Geometry other); + + /** + * Return the number of Points of the geometry + */ + public abstract int numPoints(); + + /** + * Get the nth Point of the geometry + * + * @param n + * the index of the point, from 0 to numPoints()-1; + * @throws ArrayIndexOutOfBoundsException + * in case of an emtpy geometry or bad index. + */ + public abstract Point getPoint(int n); + + /** + * Same as getPoint(0); + */ + public abstract Point getFirstPoint(); + + /** + * Same as getPoint(numPoints()-1); + */ + public abstract Point getLastPoint(); + + /** + * The OGIS geometry type number of this geometry. + */ + public int getType() { + return this.type; + } + + /** + * Return the Type as String + */ + public String getTypeString() { + return getTypeString(this.type); + } + + /** Returns whether we have a measure */ + public boolean isMeasured() { + return haveMeasure; + } + + /** + * Queries the number of geometric dimensions of this geometry. This does + * not include measures, as opposed to the server. + * + * @return The dimensionality (eg, 2D or 3D) of this geometry. + */ + public int getDimension() { + return this.dimension; + } + + /** + * The OGIS geometry type number of this geometry. + */ + public int getSrid() { + return this.srid; + } + + /** + * Recursively sets the srid on this geometry and all contained + * subgeometries + */ + public void setSrid(int srid) { + this.srid = srid; + } + + public String toString() { + StringBuffer sb = new StringBuffer(); + if (srid != UNKNOWN_SRID) { + sb.append("SRID="); + sb.append(srid); + sb.append(';'); + } + outerWKT(sb, true); + return sb.toString(); + } + + /** + * Render the WKT version of this Geometry (without SRID) into the given + * StringBuffer. + */ + public void outerWKT(StringBuffer sb, boolean putM) { + sb.append(getTypeString()); + if (putM && haveMeasure && dimension == 2) { + sb.append('M'); + } + mediumWKT(sb); + } + + public final void outerWKT(StringBuffer sb) { + outerWKT(sb, true); + } + + /** + * Render the WKT without the type name, but including the brackets into the + * StringBuffer + */ + protected void mediumWKT(StringBuffer sb) { + sb.append('('); + innerWKT(sb); + sb.append(')'); + } + + /** + * Render the "inner" part of the WKT (inside the brackets) into the + * StringBuffer. + */ + protected abstract void innerWKT(StringBuffer SB); + + /** + * backwards compatibility method + */ + public String getValue() { + StringBuffer sb = new StringBuffer(); + mediumWKT(sb); + return sb.toString(); + } + + /** + * Do some internal consistency checks on the geometry. + * + * Currently, all Geometries must have a valid dimension (2 or 3) and a + * valid type. 2-dimensional Points must have Z=0.0, as well as non-measured + * Points must have m=0.0. Composed geometries must have all equal SRID, + * dimensionality and measures, as well as that they do not contain NULL or + * inconsistent subgeometries. + * + * BinaryParser and WKTParser should only generate consistent geometries. + * BinaryWriter may produce invalid results on inconsistent geometries. + * + * @return true if all checks are passed. + */ + public boolean checkConsistency() { + return (dimension >= 2 && dimension <= 3) && (type >= 0 && type <= 7); + } + + /** + * Splits the SRID=4711; part of a EWKT rep if present and sets the srid. + * + * @return value without the SRID=4711; part + */ + protected String initSRID(String value) { + value = value.trim(); + if (value.startsWith("SRID=")) { + int index = value.indexOf(';', 5); // sridprefix length is 5 + if (index == -1) { + throw new IllegalArgumentException( + "Error parsing Geometry - SRID not delimited with ';' "); + } else { + this.srid = Integer.parseInt(value.substring(5, index)); + return value.substring(index + 1).trim(); + } + } else { + return value; + } + } } diff -Nru postgis-1.5.3/java/jdbc/src/org/postgis/GeometryCollection.java postgis-2.0.1/java/jdbc/src/org/postgis/GeometryCollection.java --- postgis-1.5.3/java/jdbc/src/org/postgis/GeometryCollection.java 2005-04-15 14:04:34.000000000 +0000 +++ postgis-2.0.1/java/jdbc/src/org/postgis/GeometryCollection.java 2012-02-27 22:08:12.000000000 +0000 @@ -21,7 +21,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: GeometryCollection.java 1622 2005-04-15 14:04:34Z mschaber $ + * $Id: GeometryCollection.java 9324 2012-02-27 22:08:12Z pramsey $ */ package org.postgis; @@ -34,7 +34,7 @@ * * @author markus.schaber@logix-tt.com * - * $Id: GeometryCollection.java 1622 2005-04-15 14:04:34Z mschaber $ + * $Id: GeometryCollection.java 9324 2012-02-27 22:08:12Z pramsey $ */ public class GeometryCollection extends ComposedGeom { diff -Nru postgis-1.5.3/java/jdbc/src/org/postgis/LineString.java postgis-2.0.1/java/jdbc/src/org/postgis/LineString.java --- postgis-1.5.3/java/jdbc/src/org/postgis/LineString.java 2005-04-15 14:04:34.000000000 +0000 +++ postgis-2.0.1/java/jdbc/src/org/postgis/LineString.java 2012-02-27 22:08:12.000000000 +0000 @@ -21,7 +21,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: LineString.java 1622 2005-04-15 14:04:34Z mschaber $ + * $Id: LineString.java 9324 2012-02-27 22:08:12Z pramsey $ */ package org.postgis; @@ -67,7 +67,7 @@ boolean cutPoint = this.getLastPoint() == null || this.getLastPoint().equals(other.getFirstPoint()); - int count = points.length + points.length - (cutPoint ? 1 : 0); + int count = points.length + opoints.length - (cutPoint ? 1 : 0); Point[] p = new Point[count]; // Maybe we should use System.arrayCopy here? diff -Nru postgis-1.5.3/java/jdbc/src/org/postgis/LinearRing.java postgis-2.0.1/java/jdbc/src/org/postgis/LinearRing.java --- postgis-1.5.3/java/jdbc/src/org/postgis/LinearRing.java 2005-04-15 14:04:34.000000000 +0000 +++ postgis-2.0.1/java/jdbc/src/org/postgis/LinearRing.java 2012-02-27 22:08:12.000000000 +0000 @@ -21,7 +21,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: LinearRing.java 1622 2005-04-15 14:04:34Z mschaber $ + * $Id: LinearRing.java 9324 2012-02-27 22:08:12Z pramsey $ */ package org.postgis; diff -Nru postgis-1.5.3/java/jdbc/src/org/postgis/MultiLineString.java postgis-2.0.1/java/jdbc/src/org/postgis/MultiLineString.java --- postgis-1.5.3/java/jdbc/src/org/postgis/MultiLineString.java 2005-04-15 14:04:34.000000000 +0000 +++ postgis-2.0.1/java/jdbc/src/org/postgis/MultiLineString.java 2012-02-27 22:08:12.000000000 +0000 @@ -21,7 +21,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: MultiLineString.java 1622 2005-04-15 14:04:34Z mschaber $ + * $Id: MultiLineString.java 9324 2012-02-27 22:08:12Z pramsey $ */ package org.postgis; diff -Nru postgis-1.5.3/java/jdbc/src/org/postgis/MultiPoint.java postgis-2.0.1/java/jdbc/src/org/postgis/MultiPoint.java --- postgis-1.5.3/java/jdbc/src/org/postgis/MultiPoint.java 2005-04-15 14:04:34.000000000 +0000 +++ postgis-2.0.1/java/jdbc/src/org/postgis/MultiPoint.java 2012-02-27 22:08:12.000000000 +0000 @@ -21,7 +21,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: MultiPoint.java 1622 2005-04-15 14:04:34Z mschaber $ + * $Id: MultiPoint.java 9324 2012-02-27 22:08:12Z pramsey $ */ package org.postgis; diff -Nru postgis-1.5.3/java/jdbc/src/org/postgis/MultiPolygon.java postgis-2.0.1/java/jdbc/src/org/postgis/MultiPolygon.java --- postgis-1.5.3/java/jdbc/src/org/postgis/MultiPolygon.java 2005-04-15 14:04:34.000000000 +0000 +++ postgis-2.0.1/java/jdbc/src/org/postgis/MultiPolygon.java 2012-02-27 22:08:12.000000000 +0000 @@ -21,7 +21,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: MultiPolygon.java 1622 2005-04-15 14:04:34Z mschaber $ + * $Id: MultiPolygon.java 9324 2012-02-27 22:08:12Z pramsey $ */ package org.postgis; diff -Nru postgis-1.5.3/java/jdbc/src/org/postgis/PGbox2d.java postgis-2.0.1/java/jdbc/src/org/postgis/PGbox2d.java --- postgis-1.5.3/java/jdbc/src/org/postgis/PGbox2d.java 2005-04-15 14:04:34.000000000 +0000 +++ postgis-2.0.1/java/jdbc/src/org/postgis/PGbox2d.java 2012-02-27 22:08:12.000000000 +0000 @@ -21,7 +21,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: PGbox2d.java 1622 2005-04-15 14:04:34Z mschaber $ + * $Id: PGbox2d.java 9324 2012-02-27 22:08:12Z pramsey $ */ package org.postgis; diff -Nru postgis-1.5.3/java/jdbc/src/org/postgis/PGbox3d.java postgis-2.0.1/java/jdbc/src/org/postgis/PGbox3d.java --- postgis-1.5.3/java/jdbc/src/org/postgis/PGbox3d.java 2005-04-15 14:04:34.000000000 +0000 +++ postgis-2.0.1/java/jdbc/src/org/postgis/PGbox3d.java 2012-02-27 22:08:12.000000000 +0000 @@ -22,7 +22,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: PGbox3d.java 1622 2005-04-15 14:04:34Z mschaber $ + * $Id: PGbox3d.java 9324 2012-02-27 22:08:12Z pramsey $ */ package org.postgis; diff -Nru postgis-1.5.3/java/jdbc/src/org/postgis/PGboxbase.java postgis-2.0.1/java/jdbc/src/org/postgis/PGboxbase.java --- postgis-1.5.3/java/jdbc/src/org/postgis/PGboxbase.java 2005-04-15 14:04:34.000000000 +0000 +++ postgis-2.0.1/java/jdbc/src/org/postgis/PGboxbase.java 2012-02-27 22:08:12.000000000 +0000 @@ -22,7 +22,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: PGboxbase.java 1622 2005-04-15 14:04:34Z mschaber $ + * $Id: PGboxbase.java 9324 2012-02-27 22:08:12Z pramsey $ */ package org.postgis; @@ -81,12 +81,12 @@ } public void setValue(String value) throws SQLException { - int srid = -1; + int srid = Geometry.UNKNOWN_SRID; value = value.trim(); if (value.startsWith("SRID=")) { String[] temp = PGgeometry.splitSRID(value); value = temp[1].trim(); - srid = Integer.parseInt(temp[0].substring(5)); + srid = Geometry.parseSRID(Integer.parseInt(temp[0].substring(5))); } String myPrefix = getPrefix(); if (value.startsWith(myPrefix)) { @@ -95,7 +95,7 @@ PGtokenizer t = new PGtokenizer(PGtokenizer.removePara(value), ','); llb = new Point(t.getToken(0)); urt = new Point(t.getToken(1)); - if (srid != -1) { + if (srid != Geometry.UNKNOWN_SRID) { llb.setSrid(srid); urt.setSrid(srid); } diff -Nru postgis-1.5.3/java/jdbc/src/org/postgis/PGgeometry.java postgis-2.0.1/java/jdbc/src/org/postgis/PGgeometry.java --- postgis-1.5.3/java/jdbc/src/org/postgis/PGgeometry.java 2005-04-15 14:04:34.000000000 +0000 +++ postgis-2.0.1/java/jdbc/src/org/postgis/PGgeometry.java 2012-02-27 22:08:12.000000000 +0000 @@ -21,7 +21,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: PGgeometry.java 1622 2005-04-15 14:04:34Z mschaber $ + * $Id: PGgeometry.java 9324 2012-02-27 22:08:12Z pramsey $ */ package org.postgis; @@ -77,13 +77,13 @@ throws SQLException { value = value.trim(); - int srid = -1; + int srid = Geometry.UNKNOWN_SRID; if (value.startsWith(SRIDPREFIX)) { // break up geometry into srid and wkt String[] parts = PGgeometry.splitSRID(value); value = parts[1].trim(); - srid = Integer.parseInt(parts[0].substring(5)); + srid = Geometry.parseSRID(Integer.parseInt(parts[0].substring(5))); } Geometry result; @@ -111,7 +111,7 @@ throw new SQLException("Unknown type: " + value); } - if (srid != -1) { + if (srid != Geometry.UNKNOWN_SRID) { result.srid = srid; } diff -Nru postgis-1.5.3/java/jdbc/src/org/postgis/PGgeometryLW.java postgis-2.0.1/java/jdbc/src/org/postgis/PGgeometryLW.java --- postgis-1.5.3/java/jdbc/src/org/postgis/PGgeometryLW.java 2005-04-15 14:04:34.000000000 +0000 +++ postgis-2.0.1/java/jdbc/src/org/postgis/PGgeometryLW.java 2012-02-27 22:08:12.000000000 +0000 @@ -19,7 +19,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: PGgeometryLW.java 1622 2005-04-15 14:04:34Z mschaber $ + * $Id: PGgeometryLW.java 9324 2012-02-27 22:08:12Z pramsey $ */ package org.postgis; diff -Nru postgis-1.5.3/java/jdbc/src/org/postgis/Point.java postgis-2.0.1/java/jdbc/src/org/postgis/Point.java --- postgis-1.5.3/java/jdbc/src/org/postgis/Point.java 2006-05-10 10:47:35.000000000 +0000 +++ postgis-2.0.1/java/jdbc/src/org/postgis/Point.java 2012-02-27 22:08:12.000000000 +0000 @@ -21,7 +21,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: Point.java 2345 2006-05-10 10:47:35Z mschaber $ + * $Id: Point.java 9324 2012-02-27 22:08:12Z pramsey $ */ package org.postgis; @@ -50,11 +50,20 @@ return equals(other); } + public static boolean double_equals(double a, double b) { + if ( Double.isNaN(a) && Double.isNaN(b) ) { + return true; + } + else { + return (a == b); + } + } + public final boolean equals(Point other) { - boolean xequals = x == other.x; - boolean yequals = y == other.y; - boolean zequals = ((dimension == 2) || (z == other.z)); - boolean mequals = ((haveMeasure == false) || (m == other.m)); + boolean xequals = double_equals(x, other.x); + boolean yequals = double_equals(y, other.y); + boolean zequals = ((dimension == 2) || double_equals(z, other.z)); + boolean mequals = ((haveMeasure == false) || double_equals(m,other.m)); boolean result = xequals && yequals && zequals && mequals; return result; } diff -Nru postgis-1.5.3/java/jdbc/src/org/postgis/PointComposedGeom.java postgis-2.0.1/java/jdbc/src/org/postgis/PointComposedGeom.java --- postgis-1.5.3/java/jdbc/src/org/postgis/PointComposedGeom.java 2005-04-15 14:04:34.000000000 +0000 +++ postgis-2.0.1/java/jdbc/src/org/postgis/PointComposedGeom.java 2012-02-27 22:08:12.000000000 +0000 @@ -21,7 +21,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: PointComposedGeom.java 1622 2005-04-15 14:04:34Z mschaber $ + * $Id: PointComposedGeom.java 9324 2012-02-27 22:08:12Z pramsey $ */ package org.postgis; diff -Nru postgis-1.5.3/java/jdbc/src/org/postgis/Polygon.java postgis-2.0.1/java/jdbc/src/org/postgis/Polygon.java --- postgis-1.5.3/java/jdbc/src/org/postgis/Polygon.java 2005-04-15 14:04:34.000000000 +0000 +++ postgis-2.0.1/java/jdbc/src/org/postgis/Polygon.java 2012-02-27 22:08:12.000000000 +0000 @@ -21,7 +21,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: Polygon.java 1622 2005-04-15 14:04:34Z mschaber $ + * $Id: Polygon.java 9324 2012-02-27 22:08:12Z pramsey $ */ package org.postgis; diff -Nru postgis-1.5.3/java/jdbc/src/org/postgis/Version.java postgis-2.0.1/java/jdbc/src/org/postgis/Version.java --- postgis-1.5.3/java/jdbc/src/org/postgis/Version.java 2006-10-14 09:26:13.000000000 +0000 +++ postgis-2.0.1/java/jdbc/src/org/postgis/Version.java 2012-02-27 22:08:12.000000000 +0000 @@ -19,7 +19,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: Version.java 2512 2006-10-14 09:26:13Z mschaber $ + * $Id: Version.java 9324 2012-02-27 22:08:12Z pramsey $ */ package org.postgis; @@ -29,7 +29,7 @@ /** Corresponds to the appropriate PostGIS that carried this source */ public class Version { - /** We read our version information from this ressource... */ + /** We read our version information from this resource... */ private static final String RESSOURCENAME = "org/postgis/version.properties"; /** The major version */ diff -Nru postgis-1.5.3/java/jdbc/src/org/postgis/binary/BinaryParser.java postgis-2.0.1/java/jdbc/src/org/postgis/binary/BinaryParser.java --- postgis-1.5.3/java/jdbc/src/org/postgis/binary/BinaryParser.java 2005-04-15 14:04:34.000000000 +0000 +++ postgis-2.0.1/java/jdbc/src/org/postgis/binary/BinaryParser.java 2012-02-27 22:08:12.000000000 +0000 @@ -19,7 +19,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: BinaryParser.java 1622 2005-04-15 14:04:34Z mschaber $ + * $Id: BinaryParser.java 9324 2012-02-27 22:08:12Z pramsey $ */ package org.postgis.binary; @@ -104,10 +104,10 @@ boolean haveM = (typeword & 0x40000000) != 0; boolean haveS = (typeword & 0x20000000) != 0; - int srid = -1; + int srid = Geometry.UNKNOWN_SRID; if (haveS) { - srid = data.getInt(); + srid = Geometry.parseSRID(data.getInt()); } Geometry result1; switch (realtype) { @@ -138,7 +138,7 @@ Geometry result = result1; - if (haveS) { + if (srid != Geometry.UNKNOWN_SRID) { result.setSrid(srid); } return result; diff -Nru postgis-1.5.3/java/jdbc/src/org/postgis/binary/BinaryWriter.java postgis-2.0.1/java/jdbc/src/org/postgis/binary/BinaryWriter.java --- postgis-1.5.3/java/jdbc/src/org/postgis/binary/BinaryWriter.java 2006-10-02 23:26:34.000000000 +0000 +++ postgis-2.0.1/java/jdbc/src/org/postgis/binary/BinaryWriter.java 2012-02-27 22:08:12.000000000 +0000 @@ -19,7 +19,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: BinaryWriter.java 2497 2006-10-02 23:26:34Z mschaber $ + * $Id: BinaryWriter.java 9324 2012-02-27 22:08:12Z pramsey $ */ package org.postgis.binary; @@ -126,13 +126,13 @@ if (geom.haveMeasure) { typeword |= 0x40000000; } - if (geom.srid != -1) { + if (geom.srid != Geometry.UNKNOWN_SRID) { typeword |= 0x20000000; } dest.setInt(typeword); - if (geom.srid != -1) { + if (geom.srid != Geometry.UNKNOWN_SRID) { dest.setInt(geom.srid); } @@ -244,7 +244,7 @@ // write typeword result += 4; - if (geom.srid != -1) { + if (geom.srid != Geometry.UNKNOWN_SRID) { result += 4; } diff -Nru postgis-1.5.3/java/jdbc/src/org/postgis/binary/ByteGetter.java postgis-2.0.1/java/jdbc/src/org/postgis/binary/ByteGetter.java --- postgis-1.5.3/java/jdbc/src/org/postgis/binary/ByteGetter.java 2005-04-15 14:04:34.000000000 +0000 +++ postgis-2.0.1/java/jdbc/src/org/postgis/binary/ByteGetter.java 2012-02-27 22:08:12.000000000 +0000 @@ -19,7 +19,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: ByteGetter.java 1622 2005-04-15 14:04:34Z mschaber $ + * $Id: ByteGetter.java 9324 2012-02-27 22:08:12Z pramsey $ */ package org.postgis.binary; diff -Nru postgis-1.5.3/java/jdbc/src/org/postgis/binary/ByteSetter.java postgis-2.0.1/java/jdbc/src/org/postgis/binary/ByteSetter.java --- postgis-1.5.3/java/jdbc/src/org/postgis/binary/ByteSetter.java 2005-05-25 10:08:56.000000000 +0000 +++ postgis-2.0.1/java/jdbc/src/org/postgis/binary/ByteSetter.java 2012-02-27 22:08:12.000000000 +0000 @@ -19,7 +19,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: ByteSetter.java 1729 2005-05-25 10:08:56Z mschaber $ + * $Id: ByteSetter.java 9324 2012-02-27 22:08:12Z pramsey $ */ package org.postgis.binary; diff -Nru postgis-1.5.3/java/jdbc/src/org/postgis/binary/ValueGetter.java postgis-2.0.1/java/jdbc/src/org/postgis/binary/ValueGetter.java --- postgis-1.5.3/java/jdbc/src/org/postgis/binary/ValueGetter.java 2005-04-15 14:04:34.000000000 +0000 +++ postgis-2.0.1/java/jdbc/src/org/postgis/binary/ValueGetter.java 2012-02-27 22:08:12.000000000 +0000 @@ -19,7 +19,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: ValueGetter.java 1622 2005-04-15 14:04:34Z mschaber $ + * $Id: ValueGetter.java 9324 2012-02-27 22:08:12Z pramsey $ */ package org.postgis.binary; diff -Nru postgis-1.5.3/java/jdbc/src/org/postgis/binary/ValueSetter.java postgis-2.0.1/java/jdbc/src/org/postgis/binary/ValueSetter.java --- postgis-1.5.3/java/jdbc/src/org/postgis/binary/ValueSetter.java 2005-06-28 08:12:45.000000000 +0000 +++ postgis-2.0.1/java/jdbc/src/org/postgis/binary/ValueSetter.java 2012-02-27 22:08:12.000000000 +0000 @@ -19,7 +19,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: ValueSetter.java 1774 2005-06-28 08:12:45Z mschaber $ + * $Id: ValueSetter.java 9324 2012-02-27 22:08:12Z pramsey $ */ package org.postgis.binary; diff -Nru postgis-1.5.3/java/jdbc/src/org/postgis/java2d/Java2DWrapper.java postgis-2.0.1/java/jdbc/src/org/postgis/java2d/Java2DWrapper.java --- postgis-1.5.3/java/jdbc/src/org/postgis/java2d/Java2DWrapper.java 2005-10-20 18:07:37.000000000 +0000 +++ postgis-2.0.1/java/jdbc/src/org/postgis/java2d/Java2DWrapper.java 2012-02-27 22:08:12.000000000 +0000 @@ -20,7 +20,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: Java2DWrapper.java 1980 2005-10-20 18:07:37Z mschaber $ + * $Id: Java2DWrapper.java 9324 2012-02-27 22:08:12Z pramsey $ */ package org.postgis.java2d; @@ -51,7 +51,7 @@ private static final String POSTGRES_PROTOCOL = "jdbc:postgresql:"; public static final String POSTGIS_PROTOCOL = "jdbc:postgis_j2d:"; - public static final String REVISION = "$Revision: 1980 $"; + public static final String REVISION = "$Revision: 9324 $"; public Java2DWrapper() { super(); diff -Nru postgis-1.5.3/java/jdbc/src/org/postgis/java2d/PGShapeGeometry.java postgis-2.0.1/java/jdbc/src/org/postgis/java2d/PGShapeGeometry.java --- postgis-1.5.3/java/jdbc/src/org/postgis/java2d/PGShapeGeometry.java 2005-11-25 17:22:34.000000000 +0000 +++ postgis-2.0.1/java/jdbc/src/org/postgis/java2d/PGShapeGeometry.java 2012-02-27 22:08:12.000000000 +0000 @@ -19,7 +19,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: PGShapeGeometry.java 2077 2005-11-25 17:22:34Z mschaber $ + * $Id: PGShapeGeometry.java 9324 2012-02-27 22:08:12Z pramsey $ */ package org.postgis.java2d; @@ -118,7 +118,7 @@ return false; } - /** Return the SRID or -1 if none was available */ + /** Return the SRID or Geometry.UNKNOWN_SRID if none was available */ public int getSRID() { return srid; } diff -Nru postgis-1.5.3/java/jdbc/src/org/postgis/java2d/ShapeBinaryParser.java postgis-2.0.1/java/jdbc/src/org/postgis/java2d/ShapeBinaryParser.java --- postgis-1.5.3/java/jdbc/src/org/postgis/java2d/ShapeBinaryParser.java 2009-04-28 17:04:30.000000000 +0000 +++ postgis-2.0.1/java/jdbc/src/org/postgis/java2d/ShapeBinaryParser.java 2012-02-27 22:08:12.000000000 +0000 @@ -19,12 +19,13 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit the web at * http://www.gnu.org. * - * $Id: ShapeBinaryParser.java 4038 2009-04-28 17:04:30Z kneufeld $ + * $Id: ShapeBinaryParser.java 9324 2012-02-27 22:08:12Z pramsey $ */ package org.postgis.java2d; import java.awt.geom.GeneralPath; +import org.postgis.Geometry; import org.postgis.binary.ByteGetter; import org.postgis.binary.ValueGetter; import org.postgis.binary.ByteGetter.BinaryByteGetter; @@ -70,7 +71,7 @@ * Is synchronized to protect offset counter. (Unfortunately, Java does not * have neither call by reference nor multiple return values.) * - * @return a potential SRID or -1 if not present + * @return a potential SRID or Geometry.UNKNOWN_SRID if not present */ public synchronized int parse(String value, GeneralPath path) { StringByteGetter bytes = new ByteGetter.StringByteGetter(value); @@ -83,7 +84,7 @@ * Is synchronized to protect offset counter. (Unfortunately, Java does not * have neither call by reference nor multiple return values.) * - * @return a potential SRID or -1 if not present + * @return a potential SRID or Geometry.UNKNOWN_SRID if not present */ public synchronized int parse(byte[] value, GeneralPath path) { BinaryByteGetter bytes = new ByteGetter.BinaryByteGetter(value); @@ -108,10 +109,10 @@ boolean haveM = (typeword & 0x40000000) != 0; boolean haveS = (typeword & 0x20000000) != 0; - int srid = -1; + int srid = Geometry.UNKNOWN_SRID; if (haveS) { - srid = data.getInt(); + srid = Geometry.parseSRID(data.getInt()); } switch (realtype) { diff -Nru postgis-1.5.3/java/jdbc/src/org/postgis/version.properties postgis-2.0.1/java/jdbc/src/org/postgis/version.properties --- postgis-1.5.3/java/jdbc/src/org/postgis/version.properties 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/java/jdbc/src/org/postgis/version.properties 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,3 @@ +REL_MAJOR_VERSION=2 +REL_MINOR_VERSION=0 +REL_MICRO_VERSION=0 \ No newline at end of file diff -Nru postgis-1.5.3/java/jdbc/todo.txt postgis-2.0.1/java/jdbc/todo.txt --- postgis-1.5.3/java/jdbc/todo.txt 2006-09-27 15:50:33.000000000 +0000 +++ postgis-2.0.1/java/jdbc/todo.txt 2012-02-27 22:08:12.000000000 +0000 @@ -1,8 +1,12 @@ Todo for PostGIS 1.0 compatible JDBC classes -$Id: todo.txt 2491 2006-09-27 15:50:33Z mschaber $ +$Id: todo.txt 9324 2012-02-27 22:08:12Z pramsey $ - even more Testing, especialy against different postgis, pgjdbc and postgresql releases. + +- Use JUnit for testing (maven) + +- Unify the build of app java projects -> maven - Handling of length() - esp. with modifying the geometries @@ -22,5 +26,3 @@ - Rework the BinaryParser/BinaryWriter to work on SQLInput/SQLOutput instances, as well as reworking ValueGetter/ValueSetter to implment those interfaces. - -- Unify the build of app java projects diff -Nru postgis-1.5.3/java/pljava/README.txt postgis-2.0.1/java/pljava/README.txt --- postgis-1.5.3/java/pljava/README.txt 2006-10-02 23:16:47.000000000 +0000 +++ postgis-2.0.1/java/pljava/README.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -Pre-Alpha support for PLJava. - -!!! This code will not work against any released pljava version. See pljava developer list -archive for discussion of the changes needed in pljava for this code to work. Let's hope all -the fixes get into the next pljava release. - -Put pljava.jar and jts-1.7.1.jar into lib/ directory, then run ant. diff -Nru postgis-1.5.3/java/pljava/build.xml postgis-2.0.1/java/pljava/build.xml --- postgis-1.5.3/java/pljava/build.xml 2009-02-04 00:28:37.000000000 +0000 +++ postgis-2.0.1/java/pljava/build.xml 1970-01-01 00:00:00.000000000 +0000 @@ -1,69 +0,0 @@ - - - - - - Build the api jar and JNI headers for the navi java api - - $Id: build.xml 3639 2009-02-04 00:28:37Z pramsey $ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru postgis-1.5.3/java/pljava/functions.sql postgis-2.0.1/java/pljava/functions.sql --- postgis-1.5.3/java/pljava/functions.sql 2006-10-02 23:26:34.000000000 +0000 +++ postgis-2.0.1/java/pljava/functions.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ - --- Create a function to call the java function -CREATE OR REPLACE FUNCTION public.helloworld() - RETURNS "varchar" AS - 'org.postgis.pljava.HelloWorld.helloWorld' - LANGUAGE 'java' VOLATILE; - -SELECT sqlj.drop_type_mapping('public.geometry'); - -SELECT sqlj.add_type_mapping('geometry', 'org.postgis.pljava.PLJGeometry'); - -CREATE OR REPLACE FUNCTION public.getSize(geometry) - RETURNS "int4" AS - 'org.postgis.pljava.HelloWorld.getSize' - LANGUAGE 'java' IMMUTABLE STRICT; - -CREATE OR REPLACE FUNCTION public.getString(geometry) - RETURNS "text" AS - 'org.postgis.pljava.HelloWorld.getString' - LANGUAGE 'java' IMMUTABLE STRICT; - \ No newline at end of file diff -Nru postgis-1.5.3/java/pljava/install.sh postgis-2.0.1/java/pljava/install.sh --- postgis-1.5.3/java/pljava/install.sh 2006-10-02 23:16:47.000000000 +0000 +++ postgis-2.0.1/java/pljava/install.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -#!/bin/sh - -cat < 4) { - throw new IllegalArgumentException("Unsupported geometry dimensionality: " + dimension); - } - - // write typeword - final int plaintype = getWKBType(geom); - byte typeword = (byte)plaintype; - if (dimension == 3 || dimension == 4) { - typeword |= 0x20; - } - if (dimension == 4) { - typeword |= 0x10; - } - if (checkSrid(geom)) { - typeword |= 0x40; - } - - dest.writeByte(typeword); - - if (checkSrid(geom)) { - dest.writeInt(geom.getSRID()); - } - - switch (plaintype) { - case org.postgis.Geometry.POINT: - writePoint((Point) geom, dest); - break; - case org.postgis.Geometry.LINESTRING: - writeLineString((LineString) geom, dest); - break; - case org.postgis.Geometry.POLYGON: - writePolygon((Polygon) geom, dest); - break; - case org.postgis.Geometry.MULTIPOINT: - writeMultiPoint((MultiPoint) geom, dest); - break; - case org.postgis.Geometry.MULTILINESTRING: - writeMultiLineString((MultiLineString) geom, dest); - break; - case org.postgis.Geometry.MULTIPOLYGON: - writeMultiPolygon((MultiPolygon) geom, dest); - break; - case org.postgis.Geometry.GEOMETRYCOLLECTION: - writeCollection((GeometryCollection) geom, dest); - break; - default: - throw new IllegalArgumentException("Unknown Geometry Type: " + plaintype); - } - } - - public static int getWKBType(Geometry geom) { - if (geom instanceof Point) { - return org.postgis.Geometry.POINT; - } else if (geom instanceof com.vividsolutions.jts.geom.LineString) { - return org.postgis.Geometry.LINESTRING; - } else if (geom instanceof com.vividsolutions.jts.geom.Polygon) { - return org.postgis.Geometry.POLYGON; - } else if (geom instanceof MultiPoint) { - return org.postgis.Geometry.MULTIPOINT; - } else if (geom instanceof MultiLineString) { - return org.postgis.Geometry.MULTILINESTRING; - } else if (geom instanceof com.vividsolutions.jts.geom.MultiPolygon) { - return org.postgis.Geometry.MULTIPOLYGON; - } else if (geom instanceof com.vividsolutions.jts.geom.GeometryCollection) { - return org.postgis.Geometry.GEOMETRYCOLLECTION; - } else { - throw new IllegalArgumentException("Unknown Geometry Type: " + geom.getClass().getName()); - } - } - - /** - * Writes a "slim" Point (without endiannes, srid ant type, only the - * ordinates and measure. Used by writeGeometry. - * @throws SQLException - */ - private void writePoint(Point geom, SQLOutput dest) throws SQLException { - writeCoordinates(geom.getCoordinateSequence(), getCoordDim(geom), dest); - } - - /** - * Write a Coordinatesequence, part of LinearRing and Linestring, but not - * MultiPoint! - * @throws SQLException - */ - private void writeCoordinates(CoordinateSequence seq, int dims, SQLOutput dest) throws SQLException { - for (int i = 0; i < seq.size(); i++) { - for (int d = 0; d < dims; d++) { - dest.writeDouble(seq.getOrdinate(i, d)); - } - } - } - - private void writeMultiPoint(MultiPoint geom, SQLOutput dest) throws SQLException { - dest.writeInt(geom.getNumPoints()); - for (int i = 0; i < geom.getNumPoints(); i++) { - writeGeometry(geom.getGeometryN(i), dest); - } - } - - private void writeLineString(LineString geom, SQLOutput dest) throws SQLException { - dest.writeInt(geom.getNumPoints()); - writeCoordinates(geom.getCoordinateSequence(), getCoordDim(geom), dest); - } - - private void writePolygon(Polygon geom, SQLOutput dest) throws SQLException { - dest.writeInt(geom.getNumInteriorRing() + 1); - writeLineString(geom.getExteriorRing(), dest); - for (int i = 0; i < geom.getNumInteriorRing(); i++) { - writeLineString(geom.getInteriorRingN(i), dest); - } - } - - private void writeMultiLineString(MultiLineString geom, SQLOutput dest) throws SQLException { - writeGeometryArray(geom, dest); - } - - private void writeMultiPolygon(MultiPolygon geom, SQLOutput dest) throws SQLException { - writeGeometryArray(geom, dest); - } - - private void writeCollection(GeometryCollection geom, SQLOutput dest) throws SQLException { - writeGeometryArray(geom, dest); - } - - private void writeGeometryArray(Geometry geom, SQLOutput dest) throws SQLException { - dest.writeInt(geom.getNumGeometries()); - for (int i = 0; i < geom.getNumGeometries(); i++) { - writeGeometry(geom.getGeometryN(i), dest); - } - } - - /** Estimate how much bytes a geometry will need in WKB. */ - protected int estimateBytes(Geometry geom) { - // Todo: include bbox - int result = 0; - - // write type byte - result += 1; - - if (checkSrid(geom)) { - result += 4; - } - - switch (getWKBType(geom)) { - case org.postgis.Geometry.POINT: - result += estimatePoint((Point) geom); - break; - case org.postgis.Geometry.LINESTRING: - result += estimateLineString((LineString) geom); - break; - case org.postgis.Geometry.POLYGON: - result += estimatePolygon((Polygon) geom); - break; - case org.postgis.Geometry.MULTIPOINT: - result += estimateMultiPoint((MultiPoint) geom); - break; - case org.postgis.Geometry.MULTILINESTRING: - result += estimateMultiLineString((MultiLineString) geom); - break; - case org.postgis.Geometry.MULTIPOLYGON: - result += estimateMultiPolygon((MultiPolygon) geom); - break; - case org.postgis.Geometry.GEOMETRYCOLLECTION: - result += estimateCollection((GeometryCollection) geom); - break; - default: - throw new IllegalArgumentException("Unknown Geometry Type: " + getWKBType(geom)); - } - return result; - } - - private boolean checkSrid(Geometry geom) { - final int srid = geom.getSRID(); - // SRID is default 0 with jts geometries - return (srid != -1) && (srid != 0); - } - - private int estimatePoint(Point geom) { - return 8 * getCoordDim(geom); - } - - /** Write an Array of "full" Geometries */ - private int estimateGeometryArray(Geometry container) { - int result = 0; - for (int i = 0; i < container.getNumGeometries(); i++) { - result += estimateBytes(container.getGeometryN(i)); - } - return result; - } - - /** - * Estimate an Array of "slim" Points (without endianness and type, part of - * LinearRing and Linestring, but not MultiPoint! - */ - private int estimatePointArray(int length, Point example) { - // number of points - int result = 4; - - // And the amount of the points itsself, in consistent geometries - // all points have equal size. - if (length > 0) { - result += length * estimatePoint(example); - } - return result; - } - - /** Estimate an array of "fat" Points */ - private int estimateMultiPoint(MultiPoint geom) { - // int size - int result = 4; - if (geom.getNumGeometries() > 0) { - // We can shortcut here, compared to estimateGeometryArray, as all - // subgeoms have the same fixed size - result += geom.getNumGeometries() * estimateBytes(geom.getGeometryN(0)); - } - return result; - } - - private int estimateLineString(LineString geom) { - if (geom == null || geom.getNumGeometries() == 0) { - return 0; - } else { - return estimatePointArray(geom.getNumPoints(), geom.getStartPoint()); - } - } - - private int estimatePolygon(Polygon geom) { - // int length - int result = 4; - result += estimateLineString(geom.getExteriorRing()); - for (int i = 0; i < geom.getNumInteriorRing(); i++) { - result += estimateLineString(geom.getInteriorRingN(i)); - } - return result; - } - - private int estimateMultiLineString(MultiLineString geom) { - // 4-byte count + subgeometries - return 4 + estimateGeometryArray(geom); - } - - private int estimateMultiPolygon(MultiPolygon geom) { - // 4-byte count + subgeometries - return 4 + estimateGeometryArray(geom); - } - - private int estimateCollection(GeometryCollection geom) { - // 4-byte count + subgeometries - return 4 + estimateGeometryArray(geom); - } - - public static final int getCoordDim(Geometry geom) { - // TODO: Fix geometries with more dimensions - // geom.getFactory().getCoordinateSequenceFactory() - if (geom == null) { - return 0; - } else { - return 2; - } - } -} diff -Nru postgis-1.5.3/java/pljava/update.sh postgis-2.0.1/java/pljava/update.sh --- postgis-1.5.3/java/pljava/update.sh 2006-10-02 23:16:47.000000000 +0000 +++ postgis-2.0.1/java/pljava/update.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -#!/bin/sh - -ant 1>&2 - -cat < #include #include -#include -#include "liblwgeom.h" +#include "liblwgeom_internal.h" #ifndef EPSILON #define EPSILON 1.0E-06 @@ -13,42 +12,11 @@ #endif -/* Expand given box of 'd' units in all directions */ -void -expand_box2d(BOX2DFLOAT4 *box, double d) -{ - box->xmin -= d; - box->ymin -= d; - - box->xmax += d; - box->ymax += d; -} - - -/* - * This has been changed in PostGIS 1.1.2 to - * check exact equality of values (rather then using - * the FPeq macro taking into account coordinate drifts). - */ -char -box2d_same(BOX2DFLOAT4 *box1, BOX2DFLOAT4 *box2) -{ - return( (box1->xmax==box2->xmax) && - (box1->xmin==box2->xmin) && - (box1->ymax==box2->ymax) && - (box1->ymin==box2->ymin)); -#if 0 - return(FPeq(box1->xmax, box2->xmax) && - FPeq(box1->xmin, box2->xmin) && - FPeq(box1->ymax, box2->ymax) && - FPeq(box1->ymin, box2->ymin)); -#endif -} -BOX2DFLOAT4 * -box2d_clone(const BOX2DFLOAT4 *in) +GBOX * +box2d_clone(const GBOX *in) { - BOX2DFLOAT4 *ret = lwalloc(sizeof(BOX2DFLOAT4)); - memcpy(ret, in, sizeof(BOX2DFLOAT4)); + GBOX *ret = lwalloc(sizeof(GBOX)); + memcpy(ret, in, sizeof(GBOX)); return ret; } diff -Nru postgis-1.5.3/liblwgeom/cunit/Makefile postgis-2.0.1/liblwgeom/cunit/Makefile --- postgis-1.5.3/liblwgeom/cunit/Makefile 2011-06-25 16:29:50.000000000 +0000 +++ postgis-2.0.1/liblwgeom/cunit/Makefile 1970-01-01 00:00:00.000000000 +0000 @@ -1,61 +0,0 @@ -# ********************************************************************** -# * $Id: Makefile.in -# * -# * PostGIS - Spatial Types for PostgreSQL -# * http://postgis.refractions.net -# * Copyright 2008 Paul Ramsey, Mark Cave-Ayland -# * -# * This is free software; you can redistribute and/or modify it under -# * the terms of the GNU General Public Licence. See the COPYING file. -# * -# ********************************************************************** - -CC=gcc -CFLAGS=-g -O2 -Wall -Wmissing-prototypes - -CUNIT_LDFLAGS= -lcunit -CUNIT_CPPFLAGS= -I.. - -OBJS= \ - cu_algorithm.o \ - cu_geodetic.o \ - cu_measures.o \ - cu_libgeom.o \ - cu_tester.o - -# If we couldn't find the cunit library then display a helpful message -ifeq ($(CUNIT_LDFLAGS),) -all: requirements_not_met_cunit -check: requirements_not_met_cunit -else - -# Build the unit tester -all: cu_tester - -# Build and run the unit tester -check: cu_tester - @./cu_tester - -endif - -# Build the main unit test executable -cu_tester: ../liblwgeom.a $(OBJS) - $(CC) -o $@ $(OBJS) ../liblwgeom.a -lm $(CUNIT_LDFLAGS) - -# Command to build each of the .o files -$(OBJS): %.o: %.c - $(CC) $(CFLAGS) $(CUNIT_CPPFLAGS) -c -o $@ $< - -# Clean target -clean: - @rm $(OBJS) - @rm cu_tester - -# Requirements message -requirements_not_met_cunit: - @echo - @echo "WARNING:" - @echo - @echo "configure was unable to find CUnit which is required for unit testing." - @echo "In order to enable unit testing, you must install CUnit and then re-run configure." - @echo diff -Nru postgis-1.5.3/liblwgeom/cunit/Makefile.in postgis-2.0.1/liblwgeom/cunit/Makefile.in --- postgis-1.5.3/liblwgeom/cunit/Makefile.in 2009-09-22 11:13:33.000000000 +0000 +++ postgis-2.0.1/liblwgeom/cunit/Makefile.in 2012-05-09 12:08:06.000000000 +0000 @@ -11,16 +11,41 @@ # ********************************************************************** CC=@CC@ -CFLAGS=@CFLAGS@ @WARNFLAGS@ +CFLAGS=@CFLAGS@ @WARNFLAGS@ @GEOS_CPPFLAGS@ @PROJ_CPPFLAGS@ +LDFLAGS = @GEOS_LDFLAGS@ -lgeos_c +top_builddir = @top_builddir@ +SHELL = @SHELL@ +LIBTOOL = @LIBTOOL@ CUNIT_LDFLAGS=@CUNIT_LDFLAGS@ CUNIT_CPPFLAGS=@CUNIT_CPPFLAGS@ -I.. +# ADD YOUR NEW TEST FILE HERE (1/1) OBJS= \ cu_algorithm.o \ + cu_buildarea.o \ + cu_clean.o \ + cu_print.o \ + cu_misc.o \ + cu_ptarray.o \ cu_geodetic.o \ + cu_geos.o \ cu_measures.o \ + cu_node.o \ cu_libgeom.o \ + cu_split.o \ + cu_stringbuffer.o \ + cu_homogenize.o \ + cu_out_wkt.o \ + cu_out_wkb.o \ + cu_out_gml.o \ + cu_out_kml.o \ + cu_out_geojson.o \ + cu_out_svg.o \ + cu_surface.o \ + cu_out_x3d.o \ + cu_in_wkb.o \ + cu_in_wkt.o \ cu_tester.o # If we couldn't find the cunit library then display a helpful message @@ -39,8 +64,9 @@ endif # Build the main unit test executable -cu_tester: ../liblwgeom.a $(OBJS) - $(CC) -o $@ $(OBJS) ../liblwgeom.a -lm $(CUNIT_LDFLAGS) +cu_tester: ../liblwgeom.la $(OBJS) + $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -o $@ $(OBJS) ../liblwgeom.la $(CUNIT_LDFLAGS) + #$(CC) -o $@ $(OBJS) ../.libs/liblwgeom.a -lm $(CUNIT_LDFLAGS) $(LDFLAGS) # Command to build each of the .o files $(OBJS): %.o: %.c @@ -48,8 +74,11 @@ # Clean target clean: - @rm $(OBJS) - @rm cu_tester + rm -f $(OBJS) + rm -f cu_tester + +distclean: clean + rm -f Makefile # Requirements message requirements_not_met_cunit: diff -Nru postgis-1.5.3/liblwgeom/cunit/README postgis-2.0.1/liblwgeom/cunit/README --- postgis-1.5.3/liblwgeom/cunit/README 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/cunit/README 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,201 @@ +TABLE OF CONTENTS + 1. HOW TO RUN LIBLWGEOM UNIT TESTS + 2. HOW TO ADD A SINGLE TEST + 3. HOW TO ADD AN ENTIRE TEST SUITE + 4. ABOUT TEST OUTPUT + 5. HOW TO ASSERT A FAILURE + + +1. HOW TO RUN LIBLWGEOM UNIT TESTS + +NOTE: We use the CUnit test framework, so you will need to have + this installed before you will be able to build and run the + unit tests. + +If you have already built the rest of the code, then from the +postgis/liblwgeom/cunit directory, run: + +make +./cu_tester + +This will run all the tests. To run just one suite: + +./cu_tester + +To run just one test: + +./cu_tester + +To run selected suites or tests (will be run in the order you specify): + +./cu_tester + +Unit tests for the entire system (including both these unit tests and others +that require postgresql to be running) can be done by running the following +command from the top of the directory tree (postgis directory): + +make check + + +2. HOW TO ADD A SINGLE TEST + +To add a test to an existing suite, follow these steps: + +2.1 Create the test: + +Open the cu_.c file, and add your +new test function. Test functions must have the following signature: + +static void (void) + + must be unique among all tests. A useful naming convention is: + +static void test__(void) + +Although not all existing tests follow that convention. + +For information on the various ASSERT macros you can use, see the CUnit +documentation: + +http://cunit.sourceforge.net/doc/writing_tests.html + +2.2 Add the test to the suite: + +At the bottom of the cu_.c file, below all the test functions, you +will find a block that looks like this (this example is from cu_print.c): + +/* +** Used by the test harness to register the tests in this file. +*/ +CU_TestInfo print_tests[] = { + PG_TEST(test_lwprint_default_format), + PG_TEST(test_lwprint_format_orders), + PG_TEST(test_lwprint_optional_format), + PG_TEST(test_lwprint_oddball_formats), + PG_TEST(test_lwprint_bad_formats), + CU_TEST_INFO_NULL +}; + +Add a new line for your test: + + PG_TEST(), + +The tests will be run in the order they appear in the list. +CU_TEST_INFO_NULL must always be the last entry. + +2.3 Add any necessary init / cleanup code. + +If your test needs global data created or any other kind of init done +before it runs, or cleanup done after it runs, add the appropriate code +to the init_ or clean_ functions. If the test +suite does not seem to have these functions (they are optional), see +below (3.3) for how to create them. + +Save your changes, run make, and run ./cu_tester, and your test +should be executed. + + + +3. HOW TO ADD AN ENTIRE TEST SUITE + +Do the following steps to create a whole new test suite (new .c file). + +3.1 Create the file. + +Create the new file (remember to add to svn as well). The naming convention +is cu_.c. + +Make sure to import: + +#include "CUnit/Basic.h" +#include "cu_tester.h" + +Now add the file to Makefile.in. Look for "ADD YOUR NEW TEST FILE HERE". +Remember that you'll have to re-run "configure" (from the top directory) +after modifying a .in file. + +3.2 Write the tests. + +Write the test functions as described in section 2. Then at the bottom +of the file, construct the array of tests (example taken from cu_print.c): + +/* +** Used by the test harness to register the tests in this file. +*/ +CU_TestInfo print_tests[] = { + PG_TEST(test_lwprint_default_format), + PG_TEST(test_lwprint_format_orders), + PG_TEST(test_lwprint_optional_format), + PG_TEST(test_lwprint_oddball_formats), + PG_TEST(test_lwprint_bad_formats), + CU_TEST_INFO_NULL +}; + +Note that each test function must be wrapped with the PG_TEST macro, and +the last entry must be CU_TEST_INFO_NULL. The naming convention is +generally _tests. + +3.3 Construct the init / clean functions and the suite struct. + +Test suites can have initialization and cleanup functions to setup and +dispose of any common or global data. They must have the following +signature: + +static int (void) + +The naming convention is generally: + +static int init_(void) +static int clean_(void) + +The very last line of the file (after all the functions and the tests +array) should look like this: + +CU_SuiteInfo = {"", , , }; + +The naming convention is generally _suite. If you do not have +an init function, you may pass "NULL" instead. Same with the clean function. + +3.4 Add your suite to cu_tester.c. + +Edit cu_tester.c. Search for "ADD YOUR SUITE HERE" and add new lines in +the appropriate places, using the suite info name you used in the last step. + +Now run make (remember to run configure first), then ./cu_tester and your +new suite should run. + + + +4. ABOUT TEST OUTPUT + +CUnit does not print much about asserts that fail, just the line number +within the appropriate file. If you need any more detailed output, it +is up to you to printf it. If you discover that all the test suites +are full of individual hacks to do this, please consolidate them into +cu_tester.h / .c, and/or enter a trac issue suggesting an improvement. + + +5. HOW TO ASSERT A FAILURE + +Often you may want to assert that lwerror was called, possibly verifying +that a specific error message was generated. There is now a way to do +this. The global char array "cu_error_msg" will always contain the most +recent error from an lwerror call. You can check it in your test function +(either asserting its length is greater than zero, or looking for a +specific string). Then call cu_error_msg_reset() to clear it when you're +done. It is a good idea to call cu_error_msg_reset prior to your test, +in case a previous test has generated an error that was not cleared. + +Example: + +cu_error_msg_reset(); + +if (strlen(cu_error_msg) > 0) +{ + printf("\nError: generated an error: %s\n", cu_error_msg); + CU_FAIL(); + /* be nice and clean it up for the next test. */ + cu_error_msg_reset(); +} + + diff -Nru postgis-1.5.3/liblwgeom/cunit/cu_algorithm.c postgis-2.0.1/liblwgeom/cunit/cu_algorithm.c --- postgis-1.5.3/liblwgeom/cunit/cu_algorithm.c 2010-02-01 17:35:55.000000000 +0000 +++ postgis-2.0.1/liblwgeom/cunit/cu_algorithm.c 2012-02-27 22:08:12.000000000 +0000 @@ -1,5 +1,5 @@ /********************************************************************** - * $Id: cu_algorithm.c 5181 2010-02-01 17:35:55Z pramsey $ + * $Id: cu_algorithm.c 9324 2012-02-27 22:08:12Z pramsey $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net @@ -10,44 +10,13 @@ * **********************************************************************/ -#include "cu_algorithm.h" - -/* -** Called from test harness to register the tests in this file. -*/ -CU_pSuite register_cg_suite(void) -{ - CU_pSuite pSuite; - pSuite = CU_add_suite("PostGIS Computational Geometry Suite", init_cg_suite, clean_cg_suite); - if (NULL == pSuite) - { - CU_cleanup_registry(); - return NULL; - } - - if ( - (NULL == CU_add_test(pSuite, "test_lw_segment_side()", test_lw_segment_side)) || - (NULL == CU_add_test(pSuite, "test_lw_segment_intersects()", test_lw_segment_intersects)) || - (NULL == CU_add_test(pSuite, "test_lwline_crossing_short_lines()", test_lwline_crossing_short_lines)) || - (NULL == CU_add_test(pSuite, "test_lwline_crossing_long_lines()", test_lwline_crossing_long_lines)) || - (NULL == CU_add_test(pSuite, "test_lwline_crossing_bugs()", test_lwline_crossing_bugs)) || - (NULL == CU_add_test(pSuite, "test_lwpoint_set_ordinate()", test_lwpoint_set_ordinate)) || - (NULL == CU_add_test(pSuite, "test_lwpoint_get_ordinate()", test_lwpoint_get_ordinate)) || - (NULL == CU_add_test(pSuite, "test_lwpoint_interpolate()", test_lwpoint_interpolate)) || - (NULL == CU_add_test(pSuite, "test_lwline_clip()", test_lwline_clip)) || - (NULL == CU_add_test(pSuite, "test_lwline_clip_big()", test_lwline_clip_big)) || - (NULL == CU_add_test(pSuite, "test_lwmline_clip()", test_lwmline_clip)) || - (NULL == CU_add_test(pSuite, "test_geohash_point()", test_geohash_point)) || - (NULL == CU_add_test(pSuite, "test_geohash_precision()", test_geohash_precision)) || - (NULL == CU_add_test(pSuite, "test_geohash()", test_geohash)) - ) - { - CU_cleanup_registry(); - return NULL; - } - return pSuite; -} +#include +#include +#include +#include "CUnit/Basic.h" +#include "liblwgeom_internal.h" +#include "cu_tester.h" /* ** Global variables used by tests below @@ -66,12 +35,12 @@ ** The suite initialization function. ** Create any re-used objects. */ -int init_cg_suite(void) +static int init_cg_suite(void) { pa21 = ptarray_construct(0, 0, 2); pa22 = ptarray_construct(0, 0, 2); - l21 = lwline_construct(-1, NULL, pa21); - l22 = lwline_construct(-1, NULL, pa22); + l21 = lwline_construct(SRID_UNKNOWN, NULL, pa21); + l22 = lwline_construct(SRID_UNKNOWN, NULL, pa22); return 0; } @@ -80,7 +49,7 @@ ** The suite cleanup function. ** Frees any global objects. */ -int clean_cg_suite(void) +static int clean_cg_suite(void) { if ( l21 ) lwline_free(l21); if ( l22 ) lwline_free(l22); @@ -90,7 +59,7 @@ /* ** Test left/right side. */ -void test_lw_segment_side(void) +static void test_lw_segment_side(void) { double rv = 0.0; POINT2D p1, p2, q; @@ -125,7 +94,7 @@ /* ** Test crossings side. */ -void test_lw_segment_intersects(void) +static void test_lw_segment_intersects(void) { #define setpoint(p, x1, y1) {(p).x = (x1); (p).y = (y1);} @@ -267,7 +236,7 @@ } -void test_lwline_crossing_short_lines(void) +static void test_lwline_crossing_short_lines(void) { POINT4D p; @@ -279,58 +248,58 @@ /* Vertical line from 0,0 to 1,1 */ p.x = 0.0; p.y = 0.0; - setPoint4d(pa21, 0, &p); + ptarray_set_point4d(pa21, 0, &p); p.y = 1.0; - setPoint4d(pa21, 1, &p); + ptarray_set_point4d(pa21, 1, &p); /* Horizontal, crossing mid-segment */ p.x = -0.5; p.y = 0.5; - setPoint4d(pa22, 0, &p); + ptarray_set_point4d(pa22, 0, &p); p.x = 0.5; - setPoint4d(pa22, 1, &p); + ptarray_set_point4d(pa22, 1, &p); CU_ASSERT( lwline_crossing_direction(l21, l22) == LINE_CROSS_RIGHT ); /* Horizontal, crossing at top end vertex (end crossings don't count) */ p.x = -0.5; p.y = 1.0; - setPoint4d(pa22, 0, &p); + ptarray_set_point4d(pa22, 0, &p); p.x = 0.5; - setPoint4d(pa22, 1, &p); + ptarray_set_point4d(pa22, 1, &p); CU_ASSERT( lwline_crossing_direction(l21, l22) == LINE_NO_CROSS ); /* Horizontal, crossing at bottom end vertex */ p.x = -0.5; p.y = 0.0; - setPoint4d(pa22, 0, &p); + ptarray_set_point4d(pa22, 0, &p); p.x = 0.5; - setPoint4d(pa22, 1, &p); + ptarray_set_point4d(pa22, 1, &p); CU_ASSERT( lwline_crossing_direction(l21, l22) == LINE_CROSS_RIGHT ); /* Horizontal, no crossing */ p.x = -0.5; p.y = 2.0; - setPoint4d(pa22, 0, &p); + ptarray_set_point4d(pa22, 0, &p); p.x = 0.5; - setPoint4d(pa22, 1, &p); + ptarray_set_point4d(pa22, 1, &p); CU_ASSERT( lwline_crossing_direction(l21, l22) == LINE_NO_CROSS ); /* Vertical, no crossing */ p.x = -0.5; p.y = 0.0; - setPoint4d(pa22, 0, &p); + ptarray_set_point4d(pa22, 0, &p); p.y = 1.0; - setPoint4d(pa22, 1, &p); + ptarray_set_point4d(pa22, 1, &p); CU_ASSERT( lwline_crossing_direction(l21, l22) == LINE_NO_CROSS ); } -void test_lwline_crossing_long_lines(void) +static void test_lwline_crossing_long_lines(void) { LWLINE *l51; LWLINE *l52; @@ -338,50 +307,50 @@ ** More complex test, longer lines and multiple crossings */ /* Vertical line with vertices at y integers */ - l51 = (LWLINE*)lwgeom_from_ewkt("LINESTRING(0 0, 0 1, 0 2, 0 3, 0 4)", PARSER_CHECK_NONE); + l51 = (LWLINE*)lwgeom_from_wkt("LINESTRING(0 0, 0 1, 0 2, 0 3, 0 4)", LW_PARSER_CHECK_NONE); /* Two crossings at segment midpoints */ - l52 = (LWLINE*)lwgeom_from_ewkt("LINESTRING(1 1, -1 1.5, 1 3, 1 4, 1 5)", PARSER_CHECK_NONE); + l52 = (LWLINE*)lwgeom_from_wkt("LINESTRING(1 1, -1 1.5, 1 3, 1 4, 1 5)", LW_PARSER_CHECK_NONE); CU_ASSERT( lwline_crossing_direction(l51, l52) == LINE_MULTICROSS_END_SAME_FIRST_LEFT ); lwline_free(l52); /* One crossing at interior vertex */ - l52 = (LWLINE*)lwgeom_from_ewkt("LINESTRING(1 1, 0 1, -1 1, -1 2, -1 3)", PARSER_CHECK_NONE); + l52 = (LWLINE*)lwgeom_from_wkt("LINESTRING(1 1, 0 1, -1 1, -1 2, -1 3)", LW_PARSER_CHECK_NONE); CU_ASSERT( lwline_crossing_direction(l51, l52) == LINE_CROSS_LEFT ); lwline_free(l52); /* Two crossings at interior vertices */ - l52 = (LWLINE*)lwgeom_from_ewkt("LINESTRING(1 1, 0 1, -1 1, 0 3, 1 3)", PARSER_CHECK_NONE); + l52 = (LWLINE*)lwgeom_from_wkt("LINESTRING(1 1, 0 1, -1 1, 0 3, 1 3)", LW_PARSER_CHECK_NONE); CU_ASSERT( lwline_crossing_direction(l51, l52) == LINE_MULTICROSS_END_SAME_FIRST_LEFT ); lwline_free(l52); /* Two crossings, one at the first vertex on at interior vertex */ - l52 = (LWLINE*)lwgeom_from_ewkt("LINESTRING(1 0, 0 0, -1 1, 0 3, 1 3)", PARSER_CHECK_NONE); + l52 = (LWLINE*)lwgeom_from_wkt("LINESTRING(1 0, 0 0, -1 1, 0 3, 1 3)", LW_PARSER_CHECK_NONE); CU_ASSERT( lwline_crossing_direction(l51, l52) == LINE_MULTICROSS_END_SAME_FIRST_LEFT ); lwline_free(l52); /* Two crossings, one at the first vertex on the next interior vertex */ - l52 = (LWLINE*)lwgeom_from_ewkt("LINESTRING(1 0, 0 0, -1 1, 0 1, 1 2)", PARSER_CHECK_NONE); + l52 = (LWLINE*)lwgeom_from_wkt("LINESTRING(1 0, 0 0, -1 1, 0 1, 1 2)", LW_PARSER_CHECK_NONE); CU_ASSERT( lwline_crossing_direction(l51, l52) == LINE_MULTICROSS_END_SAME_FIRST_LEFT ); lwline_free(l52); /* Three crossings, two at midpoints, one at vertex */ - l52 = (LWLINE*)lwgeom_from_ewkt("LINESTRING(0.5 1, -1 0.5, 1 2, -1 2, -1 3)", PARSER_CHECK_NONE); + l52 = (LWLINE*)lwgeom_from_wkt("LINESTRING(0.5 1, -1 0.5, 1 2, -1 2, -1 3)", LW_PARSER_CHECK_NONE); CU_ASSERT( lwline_crossing_direction(l51, l52) == LINE_MULTICROSS_END_LEFT ); lwline_free(l52); /* One mid-point co-linear crossing */ - l52 = (LWLINE*)lwgeom_from_ewkt("LINESTRING(1 1, 0 1.5, 0 2.5, -1 3, -1 4)", PARSER_CHECK_NONE); + l52 = (LWLINE*)lwgeom_from_wkt("LINESTRING(1 1, 0 1.5, 0 2.5, -1 3, -1 4)", LW_PARSER_CHECK_NONE); CU_ASSERT( lwline_crossing_direction(l51, l52) == LINE_CROSS_LEFT ); lwline_free(l52); /* One on-vertices co-linear crossing */ - l52 = (LWLINE*)lwgeom_from_ewkt("LINESTRING(1 1, 0 1, 0 2, -1 4, -1 4)", PARSER_CHECK_NONE); + l52 = (LWLINE*)lwgeom_from_wkt("LINESTRING(1 1, 0 1, 0 2, -1 4, -1 4)", LW_PARSER_CHECK_NONE); CU_ASSERT( lwline_crossing_direction(l51, l52) == LINE_CROSS_LEFT ); lwline_free(l52); /* No crossing, but end on a co-linearity. */ - l52 = (LWLINE*)lwgeom_from_ewkt("LINESTRING(1 1, 1 2, 1 3, 0 3, 0 4)", PARSER_CHECK_NONE); + l52 = (LWLINE*)lwgeom_from_wkt("LINESTRING(1 1, 1 2, 1 3, 0 3, 0 4)", LW_PARSER_CHECK_NONE); CU_ASSERT( lwline_crossing_direction(l51, l52) == LINE_NO_CROSS ); lwline_free(l52); @@ -390,13 +359,13 @@ } -void test_lwline_crossing_bugs(void) +static void test_lwline_crossing_bugs(void) { LWLINE *l1; LWLINE *l2; - l1 = (LWLINE*)lwgeom_from_ewkt("LINESTRING(2.99 90.16,71 74,20 140,171 154)", PARSER_CHECK_NONE); - l2 = (LWLINE*)lwgeom_from_ewkt("LINESTRING(25 169,89 114,40 70,86 43)", PARSER_CHECK_NONE); + l1 = (LWLINE*)lwgeom_from_wkt("LINESTRING(2.99 90.16,71 74,20 140,171 154)", LW_PARSER_CHECK_NONE); + l2 = (LWLINE*)lwgeom_from_wkt("LINESTRING(25 169,89 114,40 70,86 43)", LW_PARSER_CHECK_NONE); CU_ASSERT( lwline_crossing_direction(l1, l2) == LINE_MULTICROSS_END_RIGHT ); lwline_free(l1); @@ -404,7 +373,7 @@ } -void test_lwpoint_set_ordinate(void) +static void test_lwpoint_set_ordinate(void) { POINT4D p; @@ -413,18 +382,18 @@ p.z = 0.0; p.m = 0.0; - lwpoint_set_ordinate(&p, 0, 1.5); + lwpoint_set_ordinate(&p, 'X', 1.5); CU_ASSERT_EQUAL( p.x, 1.5 ); - lwpoint_set_ordinate(&p, 3, 2.5); + lwpoint_set_ordinate(&p, 'M', 2.5); CU_ASSERT_EQUAL( p.m, 2.5 ); - lwpoint_set_ordinate(&p, 2, 3.5); + lwpoint_set_ordinate(&p, 'Z', 3.5); CU_ASSERT_EQUAL( p.z, 3.5 ); } -void test_lwpoint_get_ordinate(void) +static void test_lwpoint_get_ordinate(void) { POINT4D p; @@ -433,14 +402,14 @@ p.z = 30.0; p.m = 40.0; - CU_ASSERT_EQUAL( lwpoint_get_ordinate(&p, 0), 10.0 ); - CU_ASSERT_EQUAL( lwpoint_get_ordinate(&p, 1), 20.0 ); - CU_ASSERT_EQUAL( lwpoint_get_ordinate(&p, 2), 30.0 ); - CU_ASSERT_EQUAL( lwpoint_get_ordinate(&p, 3), 40.0 ); + CU_ASSERT_EQUAL( lwpoint_get_ordinate(&p, 'X'), 10.0 ); + CU_ASSERT_EQUAL( lwpoint_get_ordinate(&p, 'Y'), 20.0 ); + CU_ASSERT_EQUAL( lwpoint_get_ordinate(&p, 'Z'), 30.0 ); + CU_ASSERT_EQUAL( lwpoint_get_ordinate(&p, 'M'), 40.0 ); } -void test_lwpoint_interpolate(void) +static void test_point_interpolate(void) { POINT4D p, q, r; int rv = 0; @@ -455,21 +424,21 @@ q.z = 40.0; q.m = 50.0; - rv = lwpoint_interpolate(&p, &q, &r, 4, 2, 35.0); + rv = point_interpolate(&p, &q, &r, 1, 1, 'Z', 35.0); CU_ASSERT_EQUAL( r.x, 15.0); - rv = lwpoint_interpolate(&p, &q, &r, 4, 3, 41.0); + rv = point_interpolate(&p, &q, &r, 1, 1, 'M', 41.0); CU_ASSERT_EQUAL( r.y, 21.0); - rv = lwpoint_interpolate(&p, &q, &r, 4, 3, 50.0); + rv = point_interpolate(&p, &q, &r, 1, 1, 'M', 50.0); CU_ASSERT_EQUAL( r.y, 30.0); - rv = lwpoint_interpolate(&p, &q, &r, 4, 3, 40.0); + rv = point_interpolate(&p, &q, &r, 1, 1, 'M', 40.0); CU_ASSERT_EQUAL( r.y, 20.0); } -void test_lwline_clip(void) +static void test_lwline_clip(void) { LWCOLLECTION *c; LWLINE *line = NULL; @@ -477,78 +446,77 @@ char *ewkt; /* Vertical line with vertices at y integers */ - l51 = (LWLINE*)lwgeom_from_ewkt("LINESTRING(0 0, 0 1, 0 2, 0 3, 0 4)", PARSER_CHECK_NONE); + l51 = (LWLINE*)lwgeom_from_wkt("LINESTRING(0 0, 0 1, 0 2, 0 3, 0 4)", LW_PARSER_CHECK_NONE); /* Clip in the middle, mid-range. */ - c = lwline_clip_to_ordinate_range(l51, 1, 1.5, 2.5); - ewkt = lwgeom_to_ewkt((LWGEOM*)c, PARSER_CHECK_NONE); + c = lwline_clip_to_ordinate_range(l51, 'Y', 1.5, 2.5); + ewkt = lwgeom_to_ewkt((LWGEOM*)c); //printf("c = %s\n", ewkt); CU_ASSERT_STRING_EQUAL(ewkt, "MULTILINESTRING((0 1.5,0 2,0 2.5))"); lwfree(ewkt); lwcollection_free(c); /* Clip off the top. */ - c = lwline_clip_to_ordinate_range(l51, 1, 3.5, 5.5); - ewkt = lwgeom_to_ewkt((LWGEOM*)c, PARSER_CHECK_NONE); + c = lwline_clip_to_ordinate_range(l51, 'Y', 3.5, 5.5); + ewkt = lwgeom_to_ewkt((LWGEOM*)c); //printf("c = %s\n", ewkt); CU_ASSERT_STRING_EQUAL(ewkt, "MULTILINESTRING((0 3.5,0 4))"); lwfree(ewkt); lwcollection_free(c); /* Clip off the bottom. */ - c = lwline_clip_to_ordinate_range(l51, 1, -1.5, 2.5); - ewkt = lwgeom_to_ewkt((LWGEOM*)c, PARSER_CHECK_NONE); + c = lwline_clip_to_ordinate_range(l51, 'Y', -1.5, 2.5); + ewkt = lwgeom_to_ewkt((LWGEOM*)c); //printf("c = %s\n", ewkt); CU_ASSERT_STRING_EQUAL(ewkt, "MULTILINESTRING((0 0,0 1,0 2,0 2.5))" ); lwfree(ewkt); lwcollection_free(c); /* Range holds entire object. */ - c = lwline_clip_to_ordinate_range(l51, 1, -1.5, 5.5); - ewkt = lwgeom_to_ewkt((LWGEOM*)c, PARSER_CHECK_NONE); + c = lwline_clip_to_ordinate_range(l51, 'Y', -1.5, 5.5); + ewkt = lwgeom_to_ewkt((LWGEOM*)c); //printf("c = %s\n", ewkt); CU_ASSERT_STRING_EQUAL(ewkt, "MULTILINESTRING((0 0,0 1,0 2,0 3,0 4))" ); lwfree(ewkt); lwcollection_free(c); /* Clip on vertices. */ - c = lwline_clip_to_ordinate_range(l51, 1, 1.0, 2.0); - ewkt = lwgeom_to_ewkt((LWGEOM*)c, PARSER_CHECK_NONE); + c = lwline_clip_to_ordinate_range(l51, 'Y', 1.0, 2.0); + ewkt = lwgeom_to_ewkt((LWGEOM*)c); //printf("c = %s\n", ewkt); CU_ASSERT_STRING_EQUAL(ewkt, "MULTILINESTRING((0 1,0 2))" ); lwfree(ewkt); lwcollection_free(c); /* Clip on vertices off the bottom. */ - c = lwline_clip_to_ordinate_range(l51, 1, -1.0, 2.0); - ewkt = lwgeom_to_ewkt((LWGEOM*)c, PARSER_CHECK_NONE); + c = lwline_clip_to_ordinate_range(l51, 'Y', -1.0, 2.0); + ewkt = lwgeom_to_ewkt((LWGEOM*)c); //printf("c = %s\n", ewkt); CU_ASSERT_STRING_EQUAL(ewkt, "MULTILINESTRING((0 0,0 1,0 2))" ); lwfree(ewkt); lwcollection_free(c); /* Clip on top. */ - c = lwline_clip_to_ordinate_range(l51, 1, -1.0, 0.0); - ewkt = lwgeom_to_ewkt((LWGEOM*)c, PARSER_CHECK_NONE); + c = lwline_clip_to_ordinate_range(l51, 'Y', -1.0, 0.0); + ewkt = lwgeom_to_ewkt((LWGEOM*)c); //printf("c = %s\n", ewkt); CU_ASSERT_STRING_EQUAL(ewkt, "GEOMETRYCOLLECTION(POINT(0 0))" ); lwfree(ewkt); lwcollection_free(c); /* ST_LocateBetweenElevations(ST_GeomFromEWKT('LINESTRING(1 2 3, 4 5 6, 6 6 6, 1 1 1)'), 1, 2)) */ - line = (LWLINE*)lwgeom_from_ewkt("LINESTRING(1 2 3, 4 5 6, 6 6 6, 1 1 1)", PARSER_CHECK_NONE); - c = lwline_clip_to_ordinate_range(line, 2, 1.0, 2.0); - ewkt = lwgeom_to_ewkt((LWGEOM*)c, PARSER_CHECK_NONE); - //printf("a = %s\n", ewkt); + line = (LWLINE*)lwgeom_from_wkt("LINESTRING(1 2 3, 4 5 6, 6 6 6, 1 1 1)", LW_PARSER_CHECK_NONE); + c = lwline_clip_to_ordinate_range(line, 'Z', 1.0, 2.0); + ewkt = lwgeom_to_ewkt((LWGEOM*)c); CU_ASSERT_STRING_EQUAL(ewkt, "MULTILINESTRING((2 2 2,1 1 1))" ); lwfree(ewkt); lwcollection_free(c); lwline_free(line); /* ST_LocateBetweenElevations('LINESTRING(1 2 3, 4 5 6, 6 6 6, 1 1 1)', 1, 2)) */ - line = (LWLINE*)lwgeom_from_ewkt("LINESTRING(1 2 3, 4 5 6, 6 6 6, 1 1 1)", PARSER_CHECK_NONE); - c = lwline_clip_to_ordinate_range(line, 2, 1.0, 2.0); - ewkt = lwgeom_to_ewkt((LWGEOM*)c, PARSER_CHECK_NONE); + line = (LWLINE*)lwgeom_from_wkt("LINESTRING(1 2 3, 4 5 6, 6 6 6, 1 1 1)", LW_PARSER_CHECK_NONE); + c = lwline_clip_to_ordinate_range(line, 'Z', 1.0, 2.0); + ewkt = lwgeom_to_ewkt((LWGEOM*)c); //printf("a = %s\n", ewkt); CU_ASSERT_STRING_EQUAL(ewkt, "MULTILINESTRING((2 2 2,1 1 1))" ); lwfree(ewkt); @@ -556,9 +524,9 @@ lwline_free(line); /* ST_LocateBetweenElevations('LINESTRING(1 2 3, 4 5 6, 6 6 6, 1 1 1)', 1, 1)) */ - line = (LWLINE*)lwgeom_from_ewkt("LINESTRING(1 2 3, 4 5 6, 6 6 6, 1 1 1)", PARSER_CHECK_NONE); - c = lwline_clip_to_ordinate_range(line, 2, 1.0, 1.0); - ewkt = lwgeom_to_ewkt((LWGEOM*)c, PARSER_CHECK_NONE); + line = (LWLINE*)lwgeom_from_wkt("LINESTRING(1 2 3, 4 5 6, 6 6 6, 1 1 1)", LW_PARSER_CHECK_NONE); + c = lwline_clip_to_ordinate_range(line, 'Z', 1.0, 1.0); + ewkt = lwgeom_to_ewkt((LWGEOM*)c); //printf("b = %s\n", ewkt); CU_ASSERT_STRING_EQUAL(ewkt, "GEOMETRYCOLLECTION(POINT(1 1 1))" ); lwfree(ewkt); @@ -566,9 +534,9 @@ lwline_free(line); /* ST_LocateBetweenElevations('LINESTRING(1 1 1, 1 2 2)', 1,1) */ - line = (LWLINE*)lwgeom_from_ewkt("LINESTRING(1 1 1, 1 2 2)", PARSER_CHECK_NONE); - c = lwline_clip_to_ordinate_range(line, 2, 1.0, 1.0); - ewkt = lwgeom_to_ewkt((LWGEOM*)c, PARSER_CHECK_NONE); + line = (LWLINE*)lwgeom_from_wkt("LINESTRING(1 1 1, 1 2 2)", LW_PARSER_CHECK_NONE); + c = lwline_clip_to_ordinate_range(line, 'Z', 1.0, 1.0); + ewkt = lwgeom_to_ewkt((LWGEOM*)c); //printf("c = %s\n", ewkt); CU_ASSERT_STRING_EQUAL(ewkt, "GEOMETRYCOLLECTION(POINT(1 1 1))" ); lwfree(ewkt); @@ -579,7 +547,7 @@ } -void test_lwmline_clip(void) +static void test_lwmline_clip(void) { LWCOLLECTION *c; char *ewkt; @@ -589,11 +557,11 @@ /* ** Set up the input line. Trivial one-member case. */ - mline = (LWMLINE*)lwgeom_from_ewkt("MULTILINESTRING((0 0,0 1,0 2,0 3,0 4))", PARSER_CHECK_NONE); + mline = (LWMLINE*)lwgeom_from_wkt("MULTILINESTRING((0 0,0 1,0 2,0 3,0 4))", LW_PARSER_CHECK_NONE); /* Clip in the middle, mid-range. */ - c = lwmline_clip_to_ordinate_range(mline, 1, 1.5, 2.5); - ewkt = lwgeom_to_ewkt((LWGEOM*)c,0); + c = lwmline_clip_to_ordinate_range(mline, 'Y', 1.5, 2.5); + ewkt = lwgeom_to_ewkt((LWGEOM*)c); //printf("c = %s\n", ewkt); CU_ASSERT_STRING_EQUAL(ewkt, "MULTILINESTRING((0 1.5,0 2,0 2.5))"); lwfree(ewkt); @@ -604,11 +572,11 @@ /* ** Set up the input line. Two-member case. */ - mline = (LWMLINE*)lwgeom_from_ewkt("MULTILINESTRING((1 0,1 1,1 2,1 3,1 4), (0 0,0 1,0 2,0 3,0 4))", PARSER_CHECK_NONE); + mline = (LWMLINE*)lwgeom_from_wkt("MULTILINESTRING((1 0,1 1,1 2,1 3,1 4), (0 0,0 1,0 2,0 3,0 4))", LW_PARSER_CHECK_NONE); /* Clip off the top. */ - c = lwmline_clip_to_ordinate_range(mline, 1, 3.5, 5.5); - ewkt = lwgeom_to_ewkt((LWGEOM*)c, PARSER_CHECK_NONE); + c = lwmline_clip_to_ordinate_range(mline, 'Y', 3.5, 5.5); + ewkt = lwgeom_to_ewkt((LWGEOM*)c); //printf("c = %s\n", ewkt); CU_ASSERT_STRING_EQUAL(ewkt, "MULTILINESTRING((1 3.5,1 4),(0 3.5,0 4))"); lwfree(ewkt); @@ -619,11 +587,11 @@ /* ** Set up staggered input line to create multi-type output. */ - mline = (LWMLINE*)lwgeom_from_ewkt("MULTILINESTRING((1 0,1 -1,1 -2,1 -3,1 -4), (0 0,0 1,0 2,0 3,0 4))", PARSER_CHECK_NONE); + mline = (LWMLINE*)lwgeom_from_wkt("MULTILINESTRING((1 0,1 -1,1 -2,1 -3,1 -4), (0 0,0 1,0 2,0 3,0 4))", LW_PARSER_CHECK_NONE); /* Clip from 0 upwards.. */ - c = lwmline_clip_to_ordinate_range(mline, 1, 0.0, 2.5); - ewkt = lwgeom_to_ewkt((LWGEOM*)c, PARSER_CHECK_NONE); + c = lwmline_clip_to_ordinate_range(mline, 'Y', 0.0, 2.5); + ewkt = lwgeom_to_ewkt((LWGEOM*)c); //printf("c = %s\n", ewkt); CU_ASSERT_STRING_EQUAL(ewkt, "GEOMETRYCOLLECTION(POINT(1 0),LINESTRING(0 0,0 1,0 2,0 2.5))"); lwfree(ewkt); @@ -634,35 +602,35 @@ /* ** Set up input line from MAC */ - line = (LWLINE*)lwgeom_from_ewkt("LINESTRING(0 0 0 0,1 1 1 1,2 2 2 2,3 3 3 3,4 4 4 4,3 3 3 5,2 2 2 6,1 1 1 7,0 0 0 8)", PARSER_CHECK_NONE); + line = (LWLINE*)lwgeom_from_wkt("LINESTRING(0 0 0 0,1 1 1 1,2 2 2 2,3 3 3 3,4 4 4 4,3 3 3 5,2 2 2 6,1 1 1 7,0 0 0 8)", LW_PARSER_CHECK_NONE); /* Clip from 3 to 3.5 */ - c = lwline_clip_to_ordinate_range(line, 2, 3.0, 3.5); - ewkt = lwgeom_to_ewkt((LWGEOM*)c, PARSER_CHECK_NONE); + c = lwline_clip_to_ordinate_range(line, 'Z', 3.0, 3.5); + ewkt = lwgeom_to_ewkt((LWGEOM*)c); //printf("c = %s\n", ewkt); CU_ASSERT_STRING_EQUAL(ewkt, "MULTILINESTRING((3 3 3 3,3.5 3.5 3.5 3.5),(3.5 3.5 3.5 4.5,3 3 3 5))"); lwfree(ewkt); lwcollection_free(c); /* Clip from 2 to 3.5 */ - c = lwline_clip_to_ordinate_range(line, 2, 2.0, 3.5); - ewkt = lwgeom_to_ewkt((LWGEOM*)c, PARSER_CHECK_NONE); + c = lwline_clip_to_ordinate_range(line, 'Z', 2.0, 3.5); + ewkt = lwgeom_to_ewkt((LWGEOM*)c); //printf("c = %s\n", ewkt); CU_ASSERT_STRING_EQUAL(ewkt, "MULTILINESTRING((2 2 2 2,3 3 3 3,3.5 3.5 3.5 3.5),(3.5 3.5 3.5 4.5,3 3 3 5,2 2 2 6))"); lwfree(ewkt); lwcollection_free(c); /* Clip from 3 to 4 */ - c = lwline_clip_to_ordinate_range(line, 2, 3.0, 4.0); - ewkt = lwgeom_to_ewkt((LWGEOM*)c, PARSER_CHECK_NONE); + c = lwline_clip_to_ordinate_range(line, 'Z', 3.0, 4.0); + ewkt = lwgeom_to_ewkt((LWGEOM*)c); //printf("c = %s\n", ewkt); CU_ASSERT_STRING_EQUAL(ewkt, "MULTILINESTRING((3 3 3 3,4 4 4 4,3 3 3 5))"); lwfree(ewkt); lwcollection_free(c); /* Clip from 2 to 3 */ - c = lwline_clip_to_ordinate_range(line, 2, 2.0, 3.0); - ewkt = lwgeom_to_ewkt((LWGEOM*)c, PARSER_CHECK_NONE); + c = lwline_clip_to_ordinate_range(line, 'Z', 2.0, 3.0); + ewkt = lwgeom_to_ewkt((LWGEOM*)c); //printf("c = %s\n", ewkt); CU_ASSERT_STRING_EQUAL(ewkt, "MULTILINESTRING((2 2 2 2,3 3 3 3),(3 3 3 5,2 2 2 6))"); lwfree(ewkt); @@ -675,10 +643,10 @@ -void test_lwline_clip_big(void) +static void test_lwline_clip_big(void) { POINTARRAY *pa = ptarray_construct(1, 0, 3); - LWLINE *line = lwline_construct(-1, NULL, pa); + LWLINE *line = lwline_construct(SRID_UNKNOWN, NULL, pa); LWCOLLECTION *c; char *ewkt; POINT4D p; @@ -686,20 +654,20 @@ p.x = 0.0; p.y = 0.0; p.z = 0.0; - setPoint4d(pa, 0, &p); + ptarray_set_point4d(pa, 0, &p); p.x = 1.0; p.y = 1.0; p.z = 1.0; - setPoint4d(pa, 1, &p); + ptarray_set_point4d(pa, 1, &p); p.x = 2.0; p.y = 2.0; p.z = 2.0; - setPoint4d(pa, 2, &p); + ptarray_set_point4d(pa, 2, &p); - c = lwline_clip_to_ordinate_range(line, 2, 0.5, 1.5); - ewkt = lwgeom_to_ewkt((LWGEOM*)c, PARSER_CHECK_NONE); + c = lwline_clip_to_ordinate_range(line, 'Z', 0.5, 1.5); + ewkt = lwgeom_to_ewkt((LWGEOM*)c); //printf("c = %s\n", ewkt); CU_ASSERT_STRING_EQUAL(ewkt, "MULTILINESTRING((0.5 0.5 0.5,1 1 1,1.5 1.5 1.5))" ); @@ -708,11 +676,13 @@ lwline_free(line); } -void test_geohash_precision(void) +static void test_geohash_precision(void) { - BOX3D bbox; - BOX3D bounds; + GBOX bbox; + GBOX bounds; int precision = 0; + gbox_init(&bbox); + gbox_init(&bounds); bbox.xmin = 23.0; bbox.xmax = 23.0; @@ -740,7 +710,7 @@ } -void test_geohash_point(void) +static void test_geohash_point(void) { char *geohash; @@ -761,47 +731,173 @@ } -void test_geohash(void) +static void test_geohash(void) { LWPOINT *lwpoint = NULL; LWLINE *lwline = NULL; LWMLINE *lwmline = NULL; char *geohash = NULL; - lwpoint = (LWPOINT*)lwgeom_from_ewkt("POINT(23.0 25.2)", PARSER_CHECK_NONE); + lwpoint = (LWPOINT*)lwgeom_from_wkt("POINT(23.0 25.2)", LW_PARSER_CHECK_NONE); geohash = lwgeom_geohash((LWGEOM*)lwpoint,0); //printf("\ngeohash %s\n",geohash); CU_ASSERT_STRING_EQUAL(geohash, "ss2r77s0du7p2ewb8hmx"); - lwfree(lwpoint); + lwpoint_free(lwpoint); lwfree(geohash); - lwpoint = (LWPOINT*)lwgeom_from_ewkt("POINT(23.0 25.2 2.0)", PARSER_CHECK_NONE); + lwpoint = (LWPOINT*)lwgeom_from_wkt("POINT(23.0 25.2 2.0)", LW_PARSER_CHECK_NONE); geohash = lwgeom_geohash((LWGEOM*)lwpoint,0); //printf("geohash %s\n",geohash); CU_ASSERT_STRING_EQUAL(geohash, "ss2r77s0du7p2ewb8hmx"); - lwfree(lwpoint); + lwpoint_free(lwpoint); lwfree(geohash); - lwline = (LWLINE*)lwgeom_from_ewkt("LINESTRING(23.0 23.0,23.1 23.1)", PARSER_CHECK_NONE); + lwline = (LWLINE*)lwgeom_from_wkt("LINESTRING(23.0 23.0,23.1 23.1)", LW_PARSER_CHECK_NONE); geohash = lwgeom_geohash((LWGEOM*)lwline,0); //printf("geohash %s\n",geohash); CU_ASSERT_STRING_EQUAL(geohash, "ss0"); - lwfree(lwline); + lwline_free(lwline); lwfree(geohash); - lwline = (LWLINE*)lwgeom_from_ewkt("LINESTRING(23.0 23.0,23.001 23.001)", PARSER_CHECK_NONE); + lwline = (LWLINE*)lwgeom_from_wkt("LINESTRING(23.0 23.0,23.001 23.001)", LW_PARSER_CHECK_NONE); geohash = lwgeom_geohash((LWGEOM*)lwline,0); //printf("geohash %s\n",geohash); CU_ASSERT_STRING_EQUAL(geohash, "ss06g7"); - lwfree(lwline); + lwline_free(lwline); lwfree(geohash); - lwmline = (LWMLINE*)lwgeom_from_ewkt("MULTILINESTRING((23.0 23.0,23.1 23.1),(23.0 23.0,23.1 23.1))", PARSER_CHECK_NONE); + lwmline = (LWMLINE*)lwgeom_from_wkt("MULTILINESTRING((23.0 23.0,23.1 23.1),(23.0 23.0,23.1 23.1))", LW_PARSER_CHECK_NONE); geohash = lwgeom_geohash((LWGEOM*)lwmline,0); //printf("geohash %s\n",geohash); CU_ASSERT_STRING_EQUAL(geohash, "ss0"); - lwfree(lwmline); + lwmline_free(lwmline); lwfree(geohash); } +static void test_isclosed(void) +{ + LWGEOM *geom; + /* LINESTRING */ + + /* Not Closed on 2D */ + geom = lwgeom_from_wkt("LINESTRING(1 2,3 4)", LW_PARSER_CHECK_NONE); + CU_ASSERT(!lwline_is_closed((LWLINE *) geom)); + lwgeom_free(geom); + + /* Closed on 2D */ + geom = lwgeom_from_wkt("LINESTRING(1 2,3 4,1 2)", LW_PARSER_CHECK_NONE); + CU_ASSERT(lwline_is_closed((LWLINE *) geom)); + lwgeom_free(geom); + + /* Not closed on 3D */ + geom = lwgeom_from_wkt("LINESTRING(1 2 3,4 5 6)", LW_PARSER_CHECK_NONE); + CU_ASSERT(!lwline_is_closed((LWLINE *) geom)); + lwgeom_free(geom); + + /* Closed on 3D */ + geom = lwgeom_from_wkt("LINESTRING(1 2 3,4 5 6,1 2 3)", LW_PARSER_CHECK_NONE); + CU_ASSERT(lwline_is_closed((LWLINE *) geom)); + lwgeom_free(geom); + + /* Closed on 4D, even if M is not the same */ + geom = lwgeom_from_wkt("LINESTRING(1 2 3 4,5 6 7 8,1 2 3 0)", LW_PARSER_CHECK_NONE); + CU_ASSERT(lwline_is_closed((LWLINE *) geom)); + lwgeom_free(geom); + + + /* CIRCULARSTRING */ + + /* Not Closed on 2D */ + geom = lwgeom_from_wkt("CIRCULARSTRING(1 2,3 4,5 6)", LW_PARSER_CHECK_NONE); + CU_ASSERT(!lwcircstring_is_closed((LWCIRCSTRING *) geom)); + lwgeom_free(geom); + + /* Closed on 2D */ + geom = lwgeom_from_wkt("CIRCULARSTRING(1 2,3 4,1 2)", LW_PARSER_CHECK_NONE); + CU_ASSERT(lwcircstring_is_closed((LWCIRCSTRING *) geom)); + lwgeom_free(geom); + + /* Not closed on 3D */ + geom = lwgeom_from_wkt("CIRCULARSTRING(1 2 3,4 5 6,7 8 9)", LW_PARSER_CHECK_NONE); + CU_ASSERT(!lwcircstring_is_closed((LWCIRCSTRING *) geom)); + lwgeom_free(geom); + + /* Closed on 3D */ + geom = lwgeom_from_wkt("CIRCULARSTRING(1 2 3,4 5 6,1 2 3)", LW_PARSER_CHECK_NONE); + CU_ASSERT(lwcircstring_is_closed((LWCIRCSTRING *) geom)); + lwgeom_free(geom); + + /* Closed on 4D, even if M is not the same */ + geom = lwgeom_from_wkt("CIRCULARSTRING(1 2 3 4,5 6 7 8,1 2 3 0)", LW_PARSER_CHECK_NONE); + CU_ASSERT(lwcircstring_is_closed((LWCIRCSTRING *) geom)); + lwgeom_free(geom); + + + /* COMPOUNDCURVE */ + + /* Not Closed on 2D */ + geom = lwgeom_from_wkt("COMPOUNDCURVE(CIRCULARSTRING(1 2,3 4,1 2),(1 2,7 8,5 6))", LW_PARSER_CHECK_NONE); + CU_ASSERT(!lwcompound_is_closed((LWCOMPOUND *) geom)); + lwgeom_free(geom); + + geom = lwgeom_from_wkt("COMPOUNDCURVE((1 2,3 4,1 2),CIRCULARSTRING(1 2,7 8,5 6))", LW_PARSER_CHECK_NONE); + CU_ASSERT(!lwcompound_is_closed((LWCOMPOUND *) geom)); + lwgeom_free(geom); + + /* Closed on 2D */ + geom = lwgeom_from_wkt("COMPOUNDCURVE(CIRCULARSTRING(1 2,3 4,5 6), (5 6,7 8,1 2))", LW_PARSER_CHECK_NONE); + CU_ASSERT(lwcompound_is_closed((LWCOMPOUND *) geom)); + lwgeom_free(geom); + + geom = lwgeom_from_wkt("COMPOUNDCURVE((1 2,3 4,5 6),CIRCULARSTRING(5 6,7 8,1 2))", LW_PARSER_CHECK_NONE); + CU_ASSERT(lwcompound_is_closed((LWCOMPOUND *) geom)); + lwgeom_free(geom); + + /* Not Closed on 3D */ + geom = lwgeom_from_wkt("COMPOUNDCURVE(CIRCULARSTRING(1 2 3,4 5 6,1 2 3),(1 2 3,7 8 9,10 11 12))", LW_PARSER_CHECK_NONE); + CU_ASSERT(!lwcompound_is_closed((LWCOMPOUND *) geom)); + lwgeom_free(geom); + + geom = lwgeom_from_wkt("COMPOUNDCURVE((1 2 3,4 5 6,1 2 3),CIRCULARSTRING(1 2 3,7 8 9,10 11 12))", LW_PARSER_CHECK_NONE); + CU_ASSERT(!lwcompound_is_closed((LWCOMPOUND *) geom)); + lwgeom_free(geom); + + /* Closed on 3D */ + geom = lwgeom_from_wkt("COMPOUNDCURVE(CIRCULARSTRING(1 2 3,4 5 6,7 8 9),(7 8 9,10 11 12,1 2 3))", LW_PARSER_CHECK_NONE); + CU_ASSERT(lwcompound_is_closed((LWCOMPOUND *) geom)); + lwgeom_free(geom); + + geom = lwgeom_from_wkt("COMPOUNDCURVE((1 2 3,4 5 6,7 8 9),CIRCULARSTRING(7 8 9,10 11 12,1 2 3))", LW_PARSER_CHECK_NONE); + CU_ASSERT(lwcompound_is_closed((LWCOMPOUND *) geom)); + lwgeom_free(geom); + + /* Closed on 4D, even if M is not the same */ + geom = lwgeom_from_wkt("COMPOUNDCURVE((1 2 3 4,5 6 7 8,9 10 11 12),CIRCULARSTRING(9 10 11 12,13 14 15 16,1 2 3 0))", LW_PARSER_CHECK_NONE); + CU_ASSERT(lwcompound_is_closed((LWCOMPOUND *) geom)); + lwgeom_free(geom); +} + +/* +** Used by test harness to register the tests in this file. +*/ +CU_TestInfo algorithms_tests[] = +{ + PG_TEST(test_lw_segment_side), + PG_TEST(test_lw_segment_intersects), + PG_TEST(test_lwline_crossing_short_lines), + PG_TEST(test_lwline_crossing_long_lines), + PG_TEST(test_lwline_crossing_bugs), + PG_TEST(test_lwpoint_set_ordinate), + PG_TEST(test_lwpoint_get_ordinate), + PG_TEST(test_point_interpolate), + PG_TEST(test_lwline_clip), + PG_TEST(test_lwline_clip_big), + PG_TEST(test_lwmline_clip), + PG_TEST(test_geohash_point), + PG_TEST(test_geohash_precision), + PG_TEST(test_geohash), + PG_TEST(test_isclosed), + CU_TEST_INFO_NULL +}; +CU_SuiteInfo algorithms_suite = {"PostGIS Computational Geometry Suite", init_cg_suite, clean_cg_suite, algorithms_tests}; diff -Nru postgis-1.5.3/liblwgeom/cunit/cu_algorithm.h postgis-2.0.1/liblwgeom/cunit/cu_algorithm.h --- postgis-1.5.3/liblwgeom/cunit/cu_algorithm.h 2009-11-11 19:02:19.000000000 +0000 +++ postgis-2.0.1/liblwgeom/cunit/cu_algorithm.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -/********************************************************************** - * $Id: cu_algorithm.h 4786 2009-11-11 19:02:19Z pramsey $ - * - * PostGIS - Spatial Types for PostgreSQL - * http://postgis.refractions.net - * Copyright 2008 Paul Ramsey - * - * This is free software; you can redistribute and/or modify it under - * the terms of the GNU General Public Licence. See the COPYING file. - * - **********************************************************************/ - -#include -#include -#include -#include "CUnit/Basic.h" - -#include "lwalgorithm.h" -#include "cu_tester.h" - -/*********************************************************************** -** for Computational Geometry Suite -*/ - -/* Test functions */ -void test_lw_segment_side(void); -void test_lw_segment_intersects(void); -void test_lwline_crossing_short_lines(void); -void test_lwline_crossing_long_lines(void); -void test_lwpoint_set_ordinate(void); -void test_lwpoint_get_ordinate(void); -void test_lwpoint_interpolate(void); -void test_lwline_clip(void); -void test_lwline_clip_big(void); -void test_lwmline_clip(void); -void test_geohash_precision(void); -void test_geohash_point(void); -void test_geohash(void); -void test_lwline_crossing_bugs(void); diff -Nru postgis-1.5.3/liblwgeom/cunit/cu_buildarea.c postgis-2.0.1/liblwgeom/cunit/cu_buildarea.c --- postgis-1.5.3/liblwgeom/cunit/cu_buildarea.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/cunit/cu_buildarea.c 2012-05-17 11:45:26.000000000 +0000 @@ -0,0 +1,341 @@ +/********************************************************************** + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * + * Copyright (C) 2012 Sandro Santilli + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include "CUnit/Basic.h" +#include "cu_tester.h" + +#include "liblwgeom.h" +#include "liblwgeom_internal.h" + +/* + * TODO: change lwgeom_same to lwgeom_equals + * (requires porting predicates to liblwgeom) + */ +#define check_geom_equal(gobt, gexp) do { \ + char *obt, *exp; \ + LWGEOM *ngobt, *ngexp; \ + ngobt = lwgeom_normalize(gobt); \ + ngexp = lwgeom_normalize(gexp); \ + if ( ! lwgeom_same((ngobt), (ngexp)) ) { \ + obt = lwgeom_to_wkt((ngobt), WKT_ISO, 8, NULL); \ + exp = lwgeom_to_wkt((ngexp), WKT_ISO, 8, NULL); \ + printf(" Failure at %s:%d\n", __FILE__, __LINE__); \ + printf(" Exp: %s\n", exp); \ + printf(" Obt: %s\n", obt); \ + free(obt); free(exp); \ + lwgeom_free(ngobt); lwgeom_free(ngexp); \ + CU_ASSERT(0); \ + } else { \ + lwgeom_free(ngobt); lwgeom_free(ngexp); \ + CU_ASSERT(1); \ + } \ +} while (0) + +/* + +-----+ + | | + +-----+-----+ + | | + +-----+ +*/ +static void buildarea1(void) +{ + LWGEOM *gin, *gout, *gexp; + + cu_error_msg_reset(); + + gin = lwgeom_from_wkt( +"MULTILINESTRING((0 0, 10 0, 10 10, 0 10, 0 0),(10 10, 20 10, 20 20, 10 20, 10 10))", + LW_PARSER_CHECK_NONE); + CU_ASSERT( gin != NULL ); + + gexp = lwgeom_from_wkt( +"MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)),((10 10,10 20,20 20,20 10,10 10)))", + LW_PARSER_CHECK_NONE); + CU_ASSERT( gexp != NULL ); + + gout = lwgeom_buildarea(gin); + CU_ASSERT(gout != NULL); + + check_geom_equal(gout, gexp); + + lwgeom_free(gout); + lwgeom_free(gexp); + lwgeom_free(gin); +} + +/* + +-----+-----+ + | | | + +-----+-----+ +*/ +static void buildarea2(void) +{ + LWGEOM *gin, *gout, *gexp; + + /* because i don't trust that much prior tests... ;) */ + cu_error_msg_reset(); + + gin = lwgeom_from_wkt( +"MULTILINESTRING((0 0, 10 0, 10 10, 0 10, 0 0),(10 10, 20 10, 20 0, 10 0, 10 10))", + LW_PARSER_CHECK_NONE); + CU_ASSERT(gin != NULL); + + gexp = lwgeom_from_wkt( +"POLYGON((0 0,0 10,10 10,20 10,20 0,10 0,0 0))", + LW_PARSER_CHECK_NONE); + CU_ASSERT(gexp != NULL); + + gout = lwgeom_buildarea(gin); + CU_ASSERT(gout != NULL); + + check_geom_equal(gout, gexp); + + lwgeom_free(gout); + lwgeom_free(gexp); + lwgeom_free(gin); + +} + +/* + +-----------+ + | +-----+ | + | | | | + | +-----+ | + +-----------+ +*/ +static void buildarea3(void) +{ + LWGEOM *gin, *gout, *gexp; + + cu_error_msg_reset(); + + gin = lwgeom_from_wkt( +"MULTILINESTRING((0 0, 20 0, 20 20, 0 20, 0 0),(2 2, 18 2, 18 18, 2 18, 2 2))", + LW_PARSER_CHECK_NONE); + CU_ASSERT(gin != NULL); + + gexp = lwgeom_from_wkt( +"POLYGON((0 0,0 20,20 20,20 0,0 0),(2 2,18 2,18 18,2 18,2 2))", + LW_PARSER_CHECK_NONE); + CU_ASSERT(gexp != NULL); + + gout = lwgeom_buildarea(gin); + CU_ASSERT(gout != NULL); + + check_geom_equal(gout, gexp); + + lwgeom_free(gout); + lwgeom_free(gexp); + lwgeom_free(gin); + +} + +/* + +-----------+ + | +-----+ | + | | +-+ | | + | | | | | | + | | +-+ | | + | +-----+ | + +-----------+ +*/ +static void buildarea4(void) +{ + LWGEOM *gin, *gout, *gexp; + + cu_error_msg_reset(); + + gin = lwgeom_from_wkt( +"MULTILINESTRING((0 0, 20 0, 20 20, 0 20, 0 0),(2 2, 18 2, 18 18, 2 18, 2 2),(8 8, 8 12, 12 12, 12 8, 8 8))", + LW_PARSER_CHECK_NONE); + CU_ASSERT(gin != NULL); + + gexp = lwgeom_from_wkt( +"MULTIPOLYGON(((0 0,0 20,20 20,20 0,0 0),(2 2,18 2,18 18,2 18,2 2)),((8 8,8 12,12 12,12 8,8 8)))", + LW_PARSER_CHECK_NONE); + CU_ASSERT(gexp != NULL); + + gout = lwgeom_buildarea(gin); + CU_ASSERT(gout != NULL); + + check_geom_equal(gout, gexp); + + lwgeom_free(gout); + lwgeom_free(gexp); + lwgeom_free(gin); + +} + +/* + +-----------+ + | +-----+ | This time the innermost ring has + | | +-+ | | more points than the other (outer) two. + | | | | | | + | | +-+ | | + | +-----+ | + +-----------+ +*/ +static void buildarea4b(void) +{ + LWGEOM *gin, *gout, *gexp; + + cu_error_msg_reset(); + + gin = lwgeom_from_wkt( +"MULTILINESTRING((0 0, 20 0, 20 20, 0 20, 0 0),(2 2, 18 2, 18 18, 2 18, 2 2), (8 8, 8 9, 8 10, 8 11, 8 12, 9 12, 10 12, 11 12, 12 12, 12 11, 12 10, 12 9, 12 8, 11 8, 10 8, 9 8, 8 8))", + LW_PARSER_CHECK_NONE); + CU_ASSERT(gin != NULL); + + gexp = lwgeom_from_wkt( +"MULTIPOLYGON(((0 0,0 20,20 20,20 0,0 0),(2 2,18 2,18 18,2 18,2 2)),((8 8,8 9,8 10,8 11,8 12,9 12,10 12,11 12,12 12,12 11,12 10,12 9,12 8,11 8,10 8,9 8,8 8)))", + LW_PARSER_CHECK_NONE); + CU_ASSERT(gexp != NULL); + + gout = lwgeom_buildarea(gin); + CU_ASSERT(gout != NULL); + + check_geom_equal(gout, gexp); + + lwgeom_free(gout); + lwgeom_free(gexp); + lwgeom_free(gin); + +} + +/* + +---------------+ + | +---------+ | + | | +--+--+ | | + | | | | | | | + | | +--+--+ | | + | +---------+ | + +---------------+ +*/ +static void buildarea5(void) +{ + LWGEOM *gin, *gout, *gexp; + + cu_error_msg_reset(); + + gin = lwgeom_from_wkt( +"MULTILINESTRING((0 0, 20 0, 20 20, 0 20, 0 0),(2 2, 18 2, 18 18, 2 18, 2 2),(8 8, 8 12, 12 12, 12 8, 8 8),(10 8, 10 12))", + LW_PARSER_CHECK_NONE); + CU_ASSERT(gin != NULL); + + gexp = lwgeom_from_wkt( +"MULTIPOLYGON(((0 0,0 20,20 20,20 0,0 0),(2 2,18 2,18 18,2 18,2 2)),((8 8,8 12,12 12,12 8,8 8)))", + LW_PARSER_CHECK_NONE); + CU_ASSERT(gexp != NULL); + + gout = lwgeom_buildarea(gin); + CU_ASSERT(gout != NULL); + + check_geom_equal(gout, gexp); + + lwgeom_free(gout); + lwgeom_free(gexp); + lwgeom_free(gin); + +} + +/* + +---------------+ + | +----+----+ | + | | | | | + | | | | | + | | | | | + | +----+----+ | + +---------------+ +*/ +static void buildarea6(void) +{ + LWGEOM *gin, *gout, *gexp; + + cu_error_msg_reset(); + + gin = lwgeom_from_wkt( +"MULTILINESTRING((0 0, 20 0, 20 20, 0 20, 0 0),(2 2, 18 2, 18 18, 2 18, 2 2),(10 2, 10 18))", + LW_PARSER_CHECK_NONE); + CU_ASSERT(gin != NULL); + + gexp = lwgeom_from_wkt( +"POLYGON((0 0,0 20,20 20,20 0,0 0),(2 2,18 2,18 18,2 18,2 2))", + LW_PARSER_CHECK_NONE); + CU_ASSERT(gexp != NULL); + + gout = lwgeom_buildarea(gin); + CU_ASSERT(gout != NULL); + + check_geom_equal(gout, gexp); + + lwgeom_free(gout); + lwgeom_free(gexp); + lwgeom_free(gin); + +} + +/* + +--------------------+ +-------+ + | +-----+ +----+ | | +---+ | + | | +-+ | | | | | | | | + | | | | | +----+ | | +---+ | + | | +-+ | | | | | | + | | | | | | | | | | + | | +-+ | | | | | | + | +-----+ +----+ | | | + +--------------------+ +-------+ +*/ +static void buildarea7(void) +{ + LWGEOM *gin, *gout, *gexp; + + cu_error_msg_reset(); + + gin = lwgeom_from_wkt( +"MULTILINESTRING( (0 0, 70 0, 70 70, 0 70, 0 0), (10 10, 10 60, 40 60, 40 10, 10 10), (20 20, 20 30, 30 30, 30 20, 20 20), (20 30, 30 30, 30 50, 20 50, 20 30), (50 20, 60 20, 60 40, 50 40, 50 20), (50 40, 60 40, 60 60, 50 60, 50 40), (80 0, 110 0, 110 70, 80 70, 80 0), (90 60, 100 60, 100 50, 90 50, 90 60))", + LW_PARSER_CHECK_NONE); + CU_ASSERT(gin != NULL); + + gexp = lwgeom_from_wkt( +"MULTIPOLYGON(((80 0,80 70,110 70,110 0,80 0),(90 60,90 50,100 50,100 60,90 60)),((20 20,20 30,20 50,30 50,30 30,30 20,20 20)),((0 0,0 70,70 70,70 0,0 0),(10 10,40 10,40 60,10 60,10 10),(50 20,60 20,60 40,60 60,50 60,50 40,50 20)))", + LW_PARSER_CHECK_NONE); + CU_ASSERT(gexp != NULL); + + gout = lwgeom_buildarea(gin); + CU_ASSERT(gout != NULL); + + check_geom_equal(gout, gexp); + + lwgeom_free(gout); + lwgeom_free(gexp); + lwgeom_free(gin); + +} + + +/* +** Used by test harness to register the tests in this file. +*/ +static CU_TestInfo buildarea_tests[] = +{ + PG_TEST(buildarea1), + PG_TEST(buildarea2), + PG_TEST(buildarea3), + PG_TEST(buildarea4), + PG_TEST(buildarea4b), + PG_TEST(buildarea5), + PG_TEST(buildarea6), + PG_TEST(buildarea7), + CU_TEST_INFO_NULL +}; +CU_SuiteInfo buildarea_suite = {"buildarea", NULL, NULL, buildarea_tests}; diff -Nru postgis-1.5.3/liblwgeom/cunit/cu_clean.c postgis-2.0.1/liblwgeom/cunit/cu_clean.c --- postgis-1.5.3/liblwgeom/cunit/cu_clean.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/cunit/cu_clean.c 2012-03-30 08:36:17.000000000 +0000 @@ -0,0 +1,59 @@ +/********************************************************************** + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * + * Copyright (C) 2012 Sandro Santilli + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include "CUnit/Basic.h" +#include "cu_tester.h" + +#include "liblwgeom.h" +#include "liblwgeom_internal.h" + +static void test_lwgeom_make_valid(void) +{ +#if POSTGIS_GEOS_VERSION >= 33 + LWGEOM *gin, *gout; + int ret; + + /* Because i don't trust that much prior tests... ;) */ + cu_error_msg_reset(); + + gin = lwgeom_from_wkt( +"MULTIPOLYGON(((1725063 4819121, 1725104 4819067, 1725060 4819087, 1725064.14183882 4819094.70208557,1725064.13656044 4819094.70235069,1725064.14210359 4819094.70227252,1725064.14210362 4819094.70227252,1725064.13656043 4819094.70235069,1725055. 4819094, 1725055 4819094, 1725055 4819094, 1725063 4819121)))", + LW_PARSER_CHECK_NONE); + CU_ASSERT(gin); + + gout = lwgeom_make_valid(gin); + + /* We're really only interested in avoiding a crash in here. + * See http://trac.osgeo.org/postgis/ticket/1738 + * TODO: enhance the test if we find a workaround + * to the excepion: + * See http://trac.osgeo.org/postgis/ticket/1735 + */ + + lwgeom_free(gout); + lwgeom_free(gin); + +#endif /* POSTGIS_GEOS_VERSION >= 33 */ +} + +/* TODO: add more tests ! */ + + +/* +** Used by test harness to register the tests in this file. +*/ +static CU_TestInfo clean_tests[] = +{ + PG_TEST(test_lwgeom_make_valid), + CU_TEST_INFO_NULL +}; +CU_SuiteInfo clean_suite = {"clean", NULL, NULL, clean_tests}; diff -Nru postgis-1.5.3/liblwgeom/cunit/cu_geodetic.c postgis-2.0.1/liblwgeom/cunit/cu_geodetic.c --- postgis-1.5.3/liblwgeom/cunit/cu_geodetic.c 2010-08-10 19:35:57.000000000 +0000 +++ postgis-2.0.1/liblwgeom/cunit/cu_geodetic.c 2012-02-27 22:08:12.000000000 +0000 @@ -1,5 +1,5 @@ /********************************************************************** - * $Id: cu_geodetic.c 5804 2010-08-10 19:35:57Z pramsey $ + * $Id: cu_geodetic.c 9324 2012-02-27 22:08:12Z pramsey $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net @@ -10,65 +10,15 @@ * **********************************************************************/ -#include "cu_geodetic.h" +#include +#include +#include +#include "CUnit/Basic.h" -#define RANDOM_TEST 0 - -/* -** Called from test harness to register the tests in this file. -*/ -CU_pSuite register_geodetic_suite(void) -{ - CU_pSuite pSuite; - pSuite = CU_add_suite("Geodetic Suite", init_geodetic_suite, clean_geodetic_suite); - if (NULL == pSuite) - { - CU_cleanup_registry(); - return NULL; - } - - if ( - (NULL == CU_add_test(pSuite, "test_signum()", test_signum)) || - (NULL == CU_add_test(pSuite, "test_gbox_from_spherical_coordinates()", test_gbox_from_spherical_coordinates)) || - (NULL == CU_add_test(pSuite, "test_gserialized_get_gbox_geocentric()", test_gserialized_get_gbox_geocentric)) || - (NULL == CU_add_test(pSuite, "test_clairaut()", test_clairaut)) || - (NULL == CU_add_test(pSuite, "test_edge_intersection()", test_edge_intersection)) || - (NULL == CU_add_test(pSuite, "test_edge_distance_to_point()", test_edge_distance_to_point)) || - (NULL == CU_add_test(pSuite, "test_edge_distance_to_edge()", test_edge_distance_to_edge)) || - (NULL == CU_add_test(pSuite, "test_lwgeom_distance_sphere()", test_lwgeom_distance_sphere)) || - (NULL == CU_add_test(pSuite, "test_lwgeom_check_geodetic()", test_lwgeom_check_geodetic)) || - (NULL == CU_add_test(pSuite, "test_gbox_calculation()", test_gbox_calculation)) || - (NULL == CU_add_test(pSuite, "test_gserialized_from_lwgeom()", test_gserialized_from_lwgeom)) || - (NULL == CU_add_test(pSuite, "test_spheroid_distance()", test_spheroid_distance)) || - (NULL == CU_add_test(pSuite, "test_spheroid_area()", test_spheroid_area)) || - (NULL == CU_add_test(pSuite, "test_ptarray_point_in_ring()", test_ptarray_point_in_ring)) || - (NULL == CU_add_test(pSuite, "test_lwpoly_covers_point2d()", test_lwpoly_covers_point2d)) - ) - { - CU_cleanup_registry(); - return NULL; - } - return pSuite; -} - -/* -** The suite initialization function. -** Create any re-used objects. -*/ -int init_geodetic_suite(void) -{ - return 0; -} - -/* -** The suite cleanup function. -** Frees any global objects. -*/ -int clean_geodetic_suite(void) -{ - return 0; -} +#include "lwgeodetic.h" +#include "cu_tester.h" +#define RANDOM_TEST 0 /** * Convert an edge from degrees to radians. @@ -110,36 +60,37 @@ p->lon = rad2deg(p->lon); } -void test_signum(void) +static void test_signum(void) { CU_ASSERT_EQUAL(signum(-5.0),-1); CU_ASSERT_EQUAL(signum(5.0),1); } -void test_gbox_from_spherical_coordinates(void) +static void test_gbox_from_spherical_coordinates(void) { #if RANDOM_TEST const double gtolerance = 0.000001; const int loops = RANDOM_TEST; int i; double ll[64]; - GBOX *gbox; - GBOX *gbox_slow; + GBOX gbox; + GBOX gbox_slow; int rndlat; int rndlon; POINTARRAY *pa; - LWLINE *lwline; - GSERIALIZED *g; + LWGEOM *lwline; ll[0] = -3.083333333333333333333333333333333; ll[1] = 9.83333333333333333333333333333333; ll[2] = 15.5; ll[3] = -5.25; - pa = pointArray_construct((uchar*)ll, 0, 0, 2); - lwline = lwline_construct(-1, 0, pa); + pa = ptarray_construct_reference_data(0, 0, 2, (uint8_t*)ll); + + lwline = lwline_as_lwgeom(lwline_construct(SRID_UNKNOWN, 0, pa)); + FLAGS_SET_GEODETIC(lwline->flags, 1); srandomdev(); @@ -155,22 +106,19 @@ ll[2] = (double)rndlon; ll[3] = (double)rndlat; - g = gserialized_from_lwgeom((LWGEOM*)lwline, 1, 0); - FLAGS_SET_GEODETIC(g->flags, 1); gbox_geocentric_slow = LW_FALSE; - gbox = gserialized_calculate_gbox_geocentric(g); + lwgeom_calculate_gbox_geocentric(lwline, gbox); gbox_geocentric_slow = LW_TRUE; - gbox_slow = gserialized_calculate_gbox_geocentric(g); + lwgeom_calculate_gbox_geocentric(lwline, gbox_slow); gbox_geocentric_slow = LW_FALSE; - lwfree(g); if ( - ( fabs( gbox->xmin - gbox_slow->xmin ) > gtolerance ) || - ( fabs( gbox->xmax - gbox_slow->xmax ) > gtolerance ) || - ( fabs( gbox->ymin - gbox_slow->ymin ) > gtolerance ) || - ( fabs( gbox->ymax - gbox_slow->ymax ) > gtolerance ) || - ( fabs( gbox->zmin - gbox_slow->zmin ) > gtolerance ) || - ( fabs( gbox->zmax - gbox_slow->zmax ) > gtolerance ) ) + ( fabs( gbox.xmin - gbox_slow.xmin ) > gtolerance ) || + ( fabs( gbox.xmax - gbox_slow.xmax ) > gtolerance ) || + ( fabs( gbox.ymin - gbox_slow.ymin ) > gtolerance ) || + ( fabs( gbox.ymax - gbox_slow.ymax ) > gtolerance ) || + ( fabs( gbox.zmin - gbox_slow.zmin ) > gtolerance ) || + ( fabs( gbox.zmax - gbox_slow.zmax ) > gtolerance ) ) { printf("\n-------\n"); printf("If you are seeing this, cut and paste it, it is a randomly generated test case!\n"); @@ -182,22 +130,18 @@ CU_FAIL_FATAL(Slow (GOOD) and fast (CALC) box calculations returned different values!!); } - lwfree(gbox); - lwfree(gbox_slow); } - lwfree(lwline); - lwfree(pa); + lwgeom_free(lwline); #endif /* RANDOM_TEST */ } #include "cu_geodetic_data.h" -void test_gserialized_get_gbox_geocentric(void) +static void test_gserialized_get_gbox_geocentric(void) { LWGEOM *lwg; - GSERIALIZED *g; - GBOX *gbox, *gbox_slow; + GBOX gbox, gbox_slow; int i; for ( i = 0; i < gbox_data_length; i++ ) @@ -207,30 +151,26 @@ printf("\n\n------------\n"); printf("%s\n", gbox_data[i]); #endif - lwg = lwgeom_from_ewkt(gbox_data[i], PARSER_CHECK_NONE); - g = gserialized_from_lwgeom(lwg, 1, 0); - FLAGS_SET_GEODETIC(g->flags, 1); - lwgeom_free(lwg); + lwg = lwgeom_from_wkt(gbox_data[i], LW_PARSER_CHECK_NONE); + FLAGS_SET_GEODETIC(lwg->flags, 1); gbox_geocentric_slow = LW_FALSE; - gbox = gserialized_calculate_gbox_geocentric(g); + lwgeom_calculate_gbox(lwg, &gbox); gbox_geocentric_slow = LW_TRUE; - gbox_slow = gserialized_calculate_gbox_geocentric(g); + lwgeom_calculate_gbox(lwg, &gbox_slow); gbox_geocentric_slow = LW_FALSE; + lwgeom_free(lwg); #if 0 - printf("\nCALC: %s\n", gbox_to_string(gbox)); - printf("GOOD: %s\n", gbox_to_string(gbox_slow)); - printf("line %d: diff %.9g\n", i, fabs(gbox->xmin - gbox_slow->xmin)+fabs(gbox->ymin - gbox_slow->ymin)+fabs(gbox->zmin - gbox_slow->zmin)); + printf("\nCALC: %s\n", gbox_to_string(&gbox)); + printf("GOOD: %s\n", gbox_to_string(&gbox_slow)); + printf("line %d: diff %.9g\n", i, fabs(gbox.xmin - gbox_slow.xmin)+fabs(gbox.ymin - gbox_slow.ymin)+fabs(gbox.zmin - gbox_slow.zmin)); printf("------------\n"); #endif - CU_ASSERT_DOUBLE_EQUAL(gbox->xmin, gbox_slow->xmin, 0.000001); - CU_ASSERT_DOUBLE_EQUAL(gbox->ymin, gbox_slow->ymin, 0.000001); - CU_ASSERT_DOUBLE_EQUAL(gbox->zmin, gbox_slow->zmin, 0.000001); - CU_ASSERT_DOUBLE_EQUAL(gbox->xmax, gbox_slow->xmax, 0.000001); - CU_ASSERT_DOUBLE_EQUAL(gbox->ymax, gbox_slow->ymax, 0.000001); - CU_ASSERT_DOUBLE_EQUAL(gbox->zmax, gbox_slow->zmax, 0.000001); - lwfree(g); - lwfree(gbox); - lwfree(gbox_slow); + CU_ASSERT_DOUBLE_EQUAL(gbox.xmin, gbox_slow.xmin, 0.000001); + CU_ASSERT_DOUBLE_EQUAL(gbox.ymin, gbox_slow.ymin, 0.000001); + CU_ASSERT_DOUBLE_EQUAL(gbox.zmin, gbox_slow.zmin, 0.000001); + CU_ASSERT_DOUBLE_EQUAL(gbox.xmax, gbox_slow.xmax, 0.000001); + CU_ASSERT_DOUBLE_EQUAL(gbox.ymax, gbox_slow.ymax, 0.000001); + CU_ASSERT_DOUBLE_EQUAL(gbox.zmax, gbox_slow.zmax, 0.000001); } } @@ -243,7 +183,7 @@ LWGEOM *lwg; GSERIALIZED *g; - lwg = lwgeom_from_ewkt(wkt, PARSER_CHECK_NONE); + lwg = lwgeom_from_wkt(wkt, LW_PARSER_CHECK_NONE); g = gserialized_from_lwgeom(lwg, 1, 0); lwgeom_free(lwg); return lwgeom_from_gserialized(g); @@ -266,7 +206,7 @@ point_deg2rad(p); } -void test_clairaut(void) +static void test_clairaut(void) { GEOGRAPHIC_POINT gs, ge; @@ -304,7 +244,7 @@ CU_ASSERT_DOUBLE_EQUAL(v_out_bottom.lon, g_out_bottom.lon, 0.000001); } -void test_edge_intersection(void) +static void test_edge_intersection(void) { GEOGRAPHIC_EDGE e1, e2; GEOGRAPHIC_POINT g; @@ -464,7 +404,7 @@ } -void test_edge_distance_to_point(void) +static void test_edge_distance_to_point(void) { GEOGRAPHIC_EDGE e; GEOGRAPHIC_POINT g; @@ -492,7 +432,7 @@ } -void test_edge_distance_to_edge(void) +static void test_edge_distance_to_edge(void) { GEOGRAPHIC_EDGE e1, e2; GEOGRAPHIC_POINT c1, c2; @@ -520,18 +460,18 @@ * Build LWGEOM on top of *aligned* structure so we can use the read-only * point access methods on them. */ -static LWGEOM* lwgeom_over_gserialized(char *wkt) +static LWGEOM* lwgeom_over_gserialized(char *wkt, GSERIALIZED **g) { LWGEOM *lwg; - GSERIALIZED *g; - lwg = lwgeom_from_ewkt(wkt, PARSER_CHECK_NONE); - g = gserialized_from_lwgeom(lwg, 1, 0); + lwg = lwgeom_from_wkt(wkt, LW_PARSER_CHECK_NONE); + FLAGS_SET_GEODETIC(lwg->flags, 1); + *g = gserialized_from_lwgeom(lwg, 1, 0); lwgeom_free(lwg); - return lwgeom_from_gserialized(g); + return lwgeom_from_gserialized(*g); } -void test_lwgeom_check_geodetic(void) +static void test_lwgeom_check_geodetic(void) { LWGEOM *geom; int i = 0; @@ -554,25 +494,29 @@ for ( i = 0; i < 6; i++ ) { - geom = lwgeom_over_gserialized(ewkt[i]); + GSERIALIZED *g; + geom = lwgeom_over_gserialized(ewkt[i], &g); CU_ASSERT_EQUAL(lwgeom_check_geodetic(geom), LW_TRUE); lwgeom_free(geom); + lwfree(g); } for ( i = 6; i < 12; i++ ) { + GSERIALIZED *g; //char *out_ewkt; - geom = lwgeom_over_gserialized(ewkt[i]); + geom = lwgeom_over_gserialized(ewkt[i], &g); CU_ASSERT_EQUAL(lwgeom_check_geodetic(geom), LW_FALSE); - //out_ewkt = lwgeom_to_ewkt(geom, PARSER_CHECK_NONE); + //out_ewkt = lwgeom_to_ewkt(geom); //printf("%s\n", out_ewkt); lwgeom_free(geom); + lwfree(g); } } - -void test_gbox_calculation(void) +/* +static void test_gbox_calculation(void) { LWGEOM *geom; @@ -598,27 +542,32 @@ for ( i = 0; i < 6; i++ ) { - geom = lwgeom_over_gserialized(ewkt[i]); - lwgeom_calculate_gbox(geom, gbox); + GSERIALIZED *g; + geom = lwgeom_over_gserialized(ewkt[i], &g); + lwgeom_calculate_gbox_cartesian(geom, gbox); box3d = lwgeom_compute_box3d(geom); //printf("%g %g\n", gbox->xmin, box3d->xmin); CU_ASSERT_EQUAL(gbox->xmin, box3d->xmin); CU_ASSERT_EQUAL(gbox->xmax, box3d->xmax); CU_ASSERT_EQUAL(gbox->ymin, box3d->ymin); CU_ASSERT_EQUAL(gbox->ymax, box3d->ymax); + lwgeom_free(geom); lwfree(box3d); + lwfree(g); } lwfree(gbox); } +*/ -void test_gserialized_from_lwgeom(void) +static void test_gserialized_from_lwgeom(void) { LWGEOM *geom; GSERIALIZED *g; - uint32 type; + uint32_t type; double *inspect; /* To poke right into the blob. */ - geom = lwgeom_from_ewkt("POINT(0 0.2)", PARSER_CHECK_NONE); + geom = lwgeom_from_wkt("POINT(0 0.2)", LW_PARSER_CHECK_NONE); + FLAGS_SET_GEODETIC(geom->flags, 1); g = gserialized_from_lwgeom(geom, 1, 0); type = gserialized_get_type(g); CU_ASSERT_EQUAL( type, POINTTYPE ); @@ -627,7 +576,8 @@ lwgeom_free(geom); lwfree(g); - geom = lwgeom_from_ewkt("POLYGON((-1 -1, -1 2.5, 2 2, 2 -1, -1 -1), (0 0, 0 1, 1 1, 1 0, 0 0))", PARSER_CHECK_NONE); + geom = lwgeom_from_wkt("POLYGON((-1 -1, -1 2.5, 2 2, 2 -1, -1 -1), (0 0, 0 1, 1 1, 1 0, 0 0))", LW_PARSER_CHECK_NONE); + FLAGS_SET_GEODETIC(geom->flags, 1); g = gserialized_from_lwgeom(geom, 1, 0); type = gserialized_get_type(g); CU_ASSERT_EQUAL( type, POLYGONTYPE ); @@ -636,7 +586,8 @@ lwgeom_free(geom); lwfree(g); - geom = lwgeom_from_ewkt("MULTILINESTRING((0 0, 1 1),(0 0.1, 1 1))", PARSER_CHECK_NONE); + geom = lwgeom_from_wkt("MULTILINESTRING((0 0, 1 1),(0 0.1, 1 1))", LW_PARSER_CHECK_NONE); + FLAGS_SET_GEODETIC(geom->flags, 1); g = gserialized_from_lwgeom(geom, 1, 0); type = gserialized_get_type(g); CU_ASSERT_EQUAL( type, MULTILINETYPE ); @@ -647,7 +598,7 @@ } -void test_ptarray_point_in_ring(void) +static void test_ptarray_point_in_ring(void) { LWGEOM *lwg; LWPOLY *poly; @@ -656,7 +607,7 @@ int result; /* Simple containment case */ - lwg = lwgeom_from_ewkt("POLYGON((1.0 1.0, 1.0 1.1, 1.1 1.1, 1.1 1.0, 1.0 1.0))", PARSER_CHECK_NONE); + lwg = lwgeom_from_wkt("POLYGON((1.0 1.0, 1.0 1.1, 1.1 1.1, 1.1 1.0, 1.0 1.0))", LW_PARSER_CHECK_NONE); poly = (LWPOLY*)lwg; pt_to_test.x = 1.05; pt_to_test.y = 1.05; @@ -667,7 +618,7 @@ lwgeom_free(lwg); /* Simple noncontainment case */ - lwg = lwgeom_from_ewkt("POLYGON((1.0 1.0, 1.0 1.1, 1.1 1.1, 1.1 1.0, 1.0 1.0))", PARSER_CHECK_NONE); + lwg = lwgeom_from_wkt("POLYGON((1.0 1.0, 1.0 1.1, 1.1 1.1, 1.1 1.0, 1.0 1.0))", LW_PARSER_CHECK_NONE); poly = (LWPOLY*)lwg; pt_to_test.x = 1.05; pt_to_test.y = 1.15; @@ -678,7 +629,7 @@ lwgeom_free(lwg); /* Harder noncontainment case */ - lwg = lwgeom_from_ewkt("POLYGON((1.0 1.0, 1.0 1.1, 1.1 1.1, 1.1 1.0, 1.0 1.0))", PARSER_CHECK_NONE); + lwg = lwgeom_from_wkt("POLYGON((1.0 1.0, 1.0 1.1, 1.1 1.1, 1.1 1.0, 1.0 1.0))", LW_PARSER_CHECK_NONE); poly = (LWPOLY*)lwg; pt_to_test.x = 1.05; pt_to_test.y = 0.9; @@ -689,7 +640,7 @@ lwgeom_free(lwg); /* Harder containment case */ - lwg = lwgeom_from_ewkt("POLYGON((0 0, 0 2, 1 2, 0 3, 2 3, 0 4, 3 5, 0 6, 6 10, 6 1, 0 0))", PARSER_CHECK_NONE); + lwg = lwgeom_from_wkt("POLYGON((0 0, 0 2, 1 2, 0 3, 2 3, 0 4, 3 5, 0 6, 6 10, 6 1, 0 0))", LW_PARSER_CHECK_NONE); poly = (LWPOLY*)lwg; pt_to_test.x = 1.0; pt_to_test.y = 1.0; @@ -700,7 +651,7 @@ lwgeom_free(lwg); /* Point on ring at vertex case */ - lwg = lwgeom_from_ewkt("POLYGON((1.0 1.0, 1.0 1.1, 1.1 1.1, 1.1 1.0, 1.0 1.0))", PARSER_CHECK_NONE); + lwg = lwgeom_from_wkt("POLYGON((1.0 1.0, 1.0 1.1, 1.1 1.1, 1.1 1.0, 1.0 1.0))", LW_PARSER_CHECK_NONE); poly = (LWPOLY*)lwg; pt_to_test.x = 1.1; pt_to_test.y = 1.05; @@ -711,7 +662,7 @@ lwgeom_free(lwg); /* Point on ring at first vertex case */ - lwg = lwgeom_from_ewkt("POLYGON((1.0 1.0, 1.0 1.1, 1.1 1.1, 1.1 1.0, 1.0 1.0))", PARSER_CHECK_NONE); + lwg = lwgeom_from_wkt("POLYGON((1.0 1.0, 1.0 1.1, 1.1 1.1, 1.1 1.0, 1.0 1.0))", LW_PARSER_CHECK_NONE); poly = (LWPOLY*)lwg; pt_to_test.x = 1.0; pt_to_test.y = 1.0; @@ -722,7 +673,7 @@ lwgeom_free(lwg); /* Point on ring between vertexes case */ - lwg = lwgeom_from_ewkt("POLYGON((1.0 1.0, 1.0 1.1, 1.1 1.1, 1.1 1.0, 1.0 1.0))", PARSER_CHECK_NONE); + lwg = lwgeom_from_wkt("POLYGON((1.0 1.0, 1.0 1.1, 1.1 1.1, 1.1 1.0, 1.0 1.0))", LW_PARSER_CHECK_NONE); poly = (LWPOLY*)lwg; pt_to_test.x = 1.0; pt_to_test.y = 1.1; @@ -733,7 +684,7 @@ lwgeom_free(lwg); /* Co-linear crossing case for point-in-polygon test, should return LW_TRUE */ - lwg = lwgeom_from_ewkt("POLYGON((1.0 1.0, 1.0 1.1, 1.1 1.1, 1.1 1.2, 1.2 1.2, 1.2 1.0, 1.0 1.0))", PARSER_CHECK_NONE); + lwg = lwgeom_from_wkt("POLYGON((1.0 1.0, 1.0 1.1, 1.1 1.1, 1.1 1.2, 1.2 1.2, 1.2 1.0, 1.0 1.0))", LW_PARSER_CHECK_NONE); poly = (LWPOLY*)lwg; pt_to_test.x = 1.1; pt_to_test.y = 1.05; @@ -744,8 +695,8 @@ lwgeom_free(lwg); /* Grazing case for point-in-polygon test, should return LW_FALSE */ - lwg = lwgeom_from_ewkt("POLYGON((2.0 3.0, 2.0 0.0, 1.0 1.0, 2.0 3.0))", PARSER_CHECK_NONE); - lwg = lwgeom_from_ewkt("POLYGON((1.0 1.0, 1.0 2.0, 1.5 1.5, 1.0 1.0))", PARSER_CHECK_NONE); + /* lwg = lwgeom_from_wkt("POLYGON((2.0 3.0, 2.0 0.0, 1.0 1.0, 2.0 3.0))", LW_PARSER_CHECK_NONE); */ + lwg = lwgeom_from_wkt("POLYGON((1.0 1.0, 1.0 2.0, 1.5 1.5, 1.0 1.0))", LW_PARSER_CHECK_NONE); poly = (LWPOLY*)lwg; pt_to_test.x = 1.5; pt_to_test.y = 1.0; @@ -756,7 +707,7 @@ lwgeom_free(lwg); /* Grazing case at first point for point-in-polygon test, should return LW_FALSE */ - lwg = lwgeom_from_ewkt("POLYGON((1.0 1.0, 2.0 3.0, 2.0 0.0, 1.0 1.0))", PARSER_CHECK_NONE); + lwg = lwgeom_from_wkt("POLYGON((1.0 1.0, 2.0 3.0, 2.0 0.0, 1.0 1.0))", LW_PARSER_CHECK_NONE); poly = (LWPOLY*)lwg; pt_to_test.x = 1.0; pt_to_test.y = 0.0; @@ -767,7 +718,7 @@ lwgeom_free(lwg); /* Point on vertex of ring */ - lwg = lwgeom_from_ewkt("POLYGON((-9 50,51 -11,-10 50,-9 50))", PARSER_CHECK_NONE); + lwg = lwgeom_from_wkt("POLYGON((-9 50,51 -11,-10 50,-9 50))", LW_PARSER_CHECK_NONE); poly = (LWPOLY*)lwg; pt_to_test.x = -10.0; pt_to_test.y = 50.0; @@ -777,20 +728,9 @@ CU_ASSERT_EQUAL(result, LW_TRUE); lwgeom_free(lwg); - /* Great big ring, correct in and out */ - lwg = lwgeom_from_ewkt("POLYGON((-40.0 52.0, 102.0 -6.0, -67.0 -29.0, -40.0 52.0))", PARSER_CHECK_NONE); - poly = (LWPOLY*)lwg; - pt_to_test.x = 4.0; - pt_to_test.y = 11.0; - pt_outside.x = 81.0; - pt_outside.y = 59.0; - result = ptarray_point_in_ring(poly->rings[0], &pt_outside, &pt_to_test); - CU_ASSERT_EQUAL(result, LW_TRUE); - lwgeom_free(lwg); - #if 0 /* Small polygon and huge distance between outside point and close-but-not-quite-inside point. Should return LW_FALSE. Pretty degenerate case. */ - lwg = lwgeom_from_ewkt("0103000020E61000000100000025000000ACAD6F91DDB65EC03F84A86D57264540CCABC279DDB65EC0FCE6926B57264540B6DEAA62DDB65EC0A79F6B63572645402E0BE84CDDB65EC065677155572645405D0B1D39DDB65EC0316310425726454082B5DB27DDB65EC060A4E12957264540798BB619DDB65EC0C393A10D57264540D4BC160FDDB65EC0BD0320EE56264540D7AC4E08DDB65EC096C862CC56264540AFD29205DDB65EC02A1F68A956264540363AFA06DDB65EC0722E418656264540B63A780CDDB65EC06E9B0064562645409614E215DDB65EC0E09DA84356264540FF71EF22DDB65EC0B48145265626454036033F33DDB65EC081B8A60C5626454066FB4546DDB65EC08A47A6F7552645409061785BDDB65EC0F05AE0E755264540D4B63772DDB65EC05C86CEDD55264540D2E4C689DDB65EC09B6EBFD95526454082E573A1DDB65EC0C90BD5DB552645401ABE85B8DDB65EC06692FCE35526454039844ECEDDB65EC04D8AF6F155264540928319E2DDB65EC0AD8D570556264540D31055F3DDB65EC02D618F1D56264540343B7A01DEB65EC0EB70CF3956264540920A1A0CDEB65EC03B00515956264540911BE212DEB65EC0E43A0E7B56264540E3F69D15DEB65EC017E4089E562645408D903614DEB65EC0F0D42FC1562645402191B80EDEB65EC0586870E35626454012B84E05DEB65EC09166C80357264540215B41F8DDB65EC08F832B21572645408392F7E7DDB65EC01138C13A57264540F999F0D4DDB65EC0E4A9C14F57264540AC3FB8BFDDB65EC0EED6875F57264540D3DCFEA8DDB65EC04F6C996957264540ACAD6F91DDB65EC03F84A86D57264540", PARSER_CHECK_NONE); + lwg = lwgeom_from_wkt("0103000020E61000000100000025000000ACAD6F91DDB65EC03F84A86D57264540CCABC279DDB65EC0FCE6926B57264540B6DEAA62DDB65EC0A79F6B63572645402E0BE84CDDB65EC065677155572645405D0B1D39DDB65EC0316310425726454082B5DB27DDB65EC060A4E12957264540798BB619DDB65EC0C393A10D57264540D4BC160FDDB65EC0BD0320EE56264540D7AC4E08DDB65EC096C862CC56264540AFD29205DDB65EC02A1F68A956264540363AFA06DDB65EC0722E418656264540B63A780CDDB65EC06E9B0064562645409614E215DDB65EC0E09DA84356264540FF71EF22DDB65EC0B48145265626454036033F33DDB65EC081B8A60C5626454066FB4546DDB65EC08A47A6F7552645409061785BDDB65EC0F05AE0E755264540D4B63772DDB65EC05C86CEDD55264540D2E4C689DDB65EC09B6EBFD95526454082E573A1DDB65EC0C90BD5DB552645401ABE85B8DDB65EC06692FCE35526454039844ECEDDB65EC04D8AF6F155264540928319E2DDB65EC0AD8D570556264540D31055F3DDB65EC02D618F1D56264540343B7A01DEB65EC0EB70CF3956264540920A1A0CDEB65EC03B00515956264540911BE212DEB65EC0E43A0E7B56264540E3F69D15DEB65EC017E4089E562645408D903614DEB65EC0F0D42FC1562645402191B80EDEB65EC0586870E35626454012B84E05DEB65EC09166C80357264540215B41F8DDB65EC08F832B21572645408392F7E7DDB65EC01138C13A57264540F999F0D4DDB65EC0E4A9C14F57264540AC3FB8BFDDB65EC0EED6875F57264540D3DCFEA8DDB65EC04F6C996957264540ACAD6F91DDB65EC03F84A86D57264540", LW_PARSER_CHECK_NONE); poly = (LWPOLY*)lwg; pt_to_test.x = -122.819436560680316; pt_to_test.y = 42.2702301207017328; @@ -803,44 +743,34 @@ } -void test_lwpoly_covers_point2d(void) +static void test_lwpoly_covers_point2d(void) { LWPOLY *poly; LWGEOM *lwg; POINT2D pt_to_test; -// POINT2D pt_outside; - GBOX gbox; int result; - gbox.flags = gflags(0, 0, 1); - - /* Simple ring */ - lwg = lwgeom_from_ewkt("POLYGON((-9 50,51 -11,-10 50,-9 50))", PARSER_CHECK_NONE); - lwgeom_calculate_gbox_geodetic(lwg, &gbox); + lwg = lwgeom_from_wkt("POLYGON((-9 50,51 -11,-10 50,-9 50))", LW_PARSER_CHECK_NONE); poly = (LWPOLY*)lwg; pt_to_test.x = -10.0; pt_to_test.y = 50.0; - result = lwpoly_covers_point2d(poly, &gbox, &pt_to_test); + result = lwpoly_covers_point2d(poly, &pt_to_test); CU_ASSERT_EQUAL(result, LW_TRUE); lwgeom_free(lwg); - /* Great big ring */ - lwg = lwgeom_from_ewkt("POLYGON((-40.0 52.0, 102.0 -6.0, -67.0 -29.0, -40.0 52.0))", PARSER_CHECK_NONE); - lwgeom_calculate_gbox_geodetic(lwg, &gbox); -/* gbox_pt_outside(&gbox, &pt_outside); */ -/* printf("POINT(%.9g %.9g)\n", pt_outside.x, pt_outside.y); */ + lwg = lwgeom_from_wkt("POLYGON((-40.0 52.0, 102.0 -6.0, -67.0 -29.0, -40.0 52.0))", LW_PARSER_CHECK_NONE); poly = (LWPOLY*)lwg; pt_to_test.x = 4.0; pt_to_test.y = 11.0; - result = lwpoly_covers_point2d(poly, &gbox, &pt_to_test); + result = lwpoly_covers_point2d(poly, &pt_to_test); CU_ASSERT_EQUAL(result, LW_TRUE); lwgeom_free(lwg); - + } -void test_lwgeom_distance_sphere(void) +static void test_lwgeom_distance_sphere(void) { LWGEOM *lwg1, *lwg2; GBOX gbox1, gbox2; @@ -855,87 +785,71 @@ gbox2.flags = gflags(0, 0, 1); /* Line/line distance, 1 degree apart */ - lwg1 = lwgeom_from_ewkt("LINESTRING(-30 10, -20 5, -10 3, 0 1)", PARSER_CHECK_NONE); - lwg2 = lwgeom_from_ewkt("LINESTRING(-10 -5, -5 0, 5 0, 10 -5)", PARSER_CHECK_NONE); - lwgeom_calculate_gbox_geodetic(lwg1, &gbox1); - lwgeom_calculate_gbox_geodetic(lwg2, &gbox2); - d = lwgeom_distance_spheroid(lwg1, lwg2, &gbox1, &gbox2, &s, 0.0); + lwg1 = lwgeom_from_wkt("LINESTRING(-30 10, -20 5, -10 3, 0 1)", LW_PARSER_CHECK_NONE); + lwg2 = lwgeom_from_wkt("LINESTRING(-10 -5, -5 0, 5 0, 10 -5)", LW_PARSER_CHECK_NONE); + d = lwgeom_distance_spheroid(lwg1, lwg2, &s, 0.0); CU_ASSERT_DOUBLE_EQUAL(d, s.radius * M_PI / 180.0, 0.00001); lwgeom_free(lwg1); lwgeom_free(lwg2); /* Line/line distance, crossing, 0.0 apart */ - lwg1 = lwgeom_from_ewkt("LINESTRING(-30 10, -20 5, -10 3, 0 1)", PARSER_CHECK_NONE); - lwg2 = lwgeom_from_ewkt("LINESTRING(-10 -5, -5 20, 5 0, 10 -5)", PARSER_CHECK_NONE); - lwgeom_calculate_gbox_geodetic(lwg1, &gbox1); - lwgeom_calculate_gbox_geodetic(lwg2, &gbox2); - d = lwgeom_distance_spheroid(lwg1, lwg2, &gbox1, &gbox2, &s, 0.0); + lwg1 = lwgeom_from_wkt("LINESTRING(-30 10, -20 5, -10 3, 0 1)", LW_PARSER_CHECK_NONE); + lwg2 = lwgeom_from_wkt("LINESTRING(-10 -5, -5 20, 5 0, 10 -5)", LW_PARSER_CHECK_NONE); + d = lwgeom_distance_spheroid(lwg1, lwg2, &s, 0.0); CU_ASSERT_DOUBLE_EQUAL(d, 0.0, 0.00001); lwgeom_free(lwg1); lwgeom_free(lwg2); /* Line/point distance, 1 degree apart */ - lwg1 = lwgeom_from_ewkt("POINT(-4 1)", PARSER_CHECK_NONE); - lwg2 = lwgeom_from_ewkt("LINESTRING(-10 -5, -5 0, 5 0, 10 -5)", PARSER_CHECK_NONE); - lwgeom_calculate_gbox_geodetic(lwg1, &gbox1); - lwgeom_calculate_gbox_geodetic(lwg2, &gbox2); - d = lwgeom_distance_spheroid(lwg1, lwg2, &gbox1, &gbox2, &s, 0.0); + lwg1 = lwgeom_from_wkt("POINT(-4 1)", LW_PARSER_CHECK_NONE); + lwg2 = lwgeom_from_wkt("LINESTRING(-10 -5, -5 0, 5 0, 10 -5)", LW_PARSER_CHECK_NONE); + d = lwgeom_distance_spheroid(lwg1, lwg2, &s, 0.0); CU_ASSERT_DOUBLE_EQUAL(d, s.radius * M_PI / 180.0, 0.00001); lwgeom_free(lwg1); lwgeom_free(lwg2); - lwg1 = lwgeom_from_ewkt("POINT(-4 1)", PARSER_CHECK_NONE); - lwg2 = lwgeom_from_ewkt("POINT(-4 -1)", PARSER_CHECK_NONE); - lwgeom_calculate_gbox_geodetic(lwg1, &gbox1); - lwgeom_calculate_gbox_geodetic(lwg2, &gbox2); - d = lwgeom_distance_spheroid(lwg1, lwg2, &gbox1, &gbox2, &s, 0.0); + lwg1 = lwgeom_from_wkt("POINT(-4 1)", LW_PARSER_CHECK_NONE); + lwg2 = lwgeom_from_wkt("POINT(-4 -1)", LW_PARSER_CHECK_NONE); + d = lwgeom_distance_spheroid(lwg1, lwg2, &s, 0.0); CU_ASSERT_DOUBLE_EQUAL(d, s.radius * M_PI / 90.0, 0.00001); lwgeom_free(lwg1); lwgeom_free(lwg2); /* Poly/point distance, point inside polygon, 0.0 apart */ - lwg1 = lwgeom_from_ewkt("POLYGON((-4 1, -3 5, 1 2, 1.5 -5, -4 1))", PARSER_CHECK_NONE); - lwg2 = lwgeom_from_ewkt("POINT(-1 -1)", PARSER_CHECK_NONE); - lwgeom_calculate_gbox_geodetic(lwg1, &gbox1); - lwgeom_calculate_gbox_geodetic(lwg2, &gbox2); - d = lwgeom_distance_spheroid(lwg1, lwg2, &gbox1, &gbox2, &s, 0.0); + lwg1 = lwgeom_from_wkt("POLYGON((-4 1, -3 5, 1 2, 1.5 -5, -4 1))", LW_PARSER_CHECK_NONE); + lwg2 = lwgeom_from_wkt("POINT(-1 -1)", LW_PARSER_CHECK_NONE); + d = lwgeom_distance_spheroid(lwg1, lwg2, &s, 0.0); CU_ASSERT_DOUBLE_EQUAL(d, 0.0, 0.00001); lwgeom_free(lwg1); lwgeom_free(lwg2); /* Poly/point distance, point inside polygon hole, 1 degree apart */ - lwg1 = lwgeom_from_ewkt("POLYGON((-4 -4, -4 4, 4 4, 4 -4, -4 -4), (-2 -2, -2 2, 2 2, 2 -2, -2 -2))", PARSER_CHECK_NONE); - lwg2 = lwgeom_from_ewkt("POINT(-1 -1)", PARSER_CHECK_NONE); - lwgeom_calculate_gbox_geodetic(lwg1, &gbox1); - lwgeom_calculate_gbox_geodetic(lwg2, &gbox2); - d = lwgeom_distance_spheroid(lwg1, lwg2, &gbox1, &gbox2, &s, 0.0); + lwg1 = lwgeom_from_wkt("POLYGON((-4 -4, -4 4, 4 4, 4 -4, -4 -4), (-2 -2, -2 2, 2 2, 2 -2, -2 -2))", LW_PARSER_CHECK_NONE); + lwg2 = lwgeom_from_wkt("POINT(-1 -1)", LW_PARSER_CHECK_NONE); + d = lwgeom_distance_spheroid(lwg1, lwg2, &s, 0.0); CU_ASSERT_DOUBLE_EQUAL(d, 111178.142466, 0.1); lwgeom_free(lwg1); lwgeom_free(lwg2); /* Poly/point distance, point on hole boundary, 0.0 apart */ - lwg1 = lwgeom_from_ewkt("POLYGON((-4 -4, -4 4, 4 4, 4 -4, -4 -4), (-2 -2, -2 2, 2 2, 2 -2, -2 -2))", PARSER_CHECK_NONE); - lwg2 = lwgeom_from_ewkt("POINT(2 2)", PARSER_CHECK_NONE); - lwgeom_calculate_gbox_geodetic(lwg1, &gbox1); - lwgeom_calculate_gbox_geodetic(lwg2, &gbox2); - d = lwgeom_distance_spheroid(lwg1, lwg2, &gbox1, &gbox2, &s, 0.0); + lwg1 = lwgeom_from_wkt("POLYGON((-4 -4, -4 4, 4 4, 4 -4, -4 -4), (-2 -2, -2 2, 2 2, 2 -2, -2 -2))", LW_PARSER_CHECK_NONE); + lwg2 = lwgeom_from_wkt("POINT(2 2)", LW_PARSER_CHECK_NONE); + d = lwgeom_distance_spheroid(lwg1, lwg2, &s, 0.0); CU_ASSERT_DOUBLE_EQUAL(d, 0.0, 0.00001); lwgeom_free(lwg1); lwgeom_free(lwg2); /* Medford test case #1 */ - lwg1 = lwgeom_from_ewkt("0105000020E610000001000000010200000002000000EF7B8779C7BD5EC0FD20D94B852845400E539C62B9BD5EC0F0A5BE767C284540", PARSER_CHECK_NONE); - lwg2 = lwgeom_from_ewkt("0106000020E61000000100000001030000000100000007000000280EC3FB8CCA5EC0A5CDC747233C45402787C8F58CCA5EC0659EA2761E3C45400CED58DF8FCA5EC0C37FAE6E1E3C4540AE97B8E08FCA5EC00346F58B1F3C4540250359FD8ECA5EC05460628E1F3C45403738F4018FCA5EC05DC84042233C4540280EC3FB8CCA5EC0A5CDC747233C4540", PARSER_CHECK_NONE); - lwgeom_calculate_gbox_geodetic(lwg1, &gbox1); - lwgeom_calculate_gbox_geodetic(lwg2, &gbox2); - d = lwgeom_distance_spheroid(lwg1, lwg2, &gbox1, &gbox2, &s, 0.0); + lwg1 = lwgeom_from_hexwkb("0105000020E610000001000000010200000002000000EF7B8779C7BD5EC0FD20D94B852845400E539C62B9BD5EC0F0A5BE767C284540", LW_PARSER_CHECK_NONE); + lwg2 = lwgeom_from_hexwkb("0106000020E61000000100000001030000000100000007000000280EC3FB8CCA5EC0A5CDC747233C45402787C8F58CCA5EC0659EA2761E3C45400CED58DF8FCA5EC0C37FAE6E1E3C4540AE97B8E08FCA5EC00346F58B1F3C4540250359FD8ECA5EC05460628E1F3C45403738F4018FCA5EC05DC84042233C4540280EC3FB8CCA5EC0A5CDC747233C4540", LW_PARSER_CHECK_NONE); + d = lwgeom_distance_spheroid(lwg1, lwg2, &s, 0.0); CU_ASSERT_DOUBLE_EQUAL(d, 23630.8003, 0.1); lwgeom_free(lwg1); lwgeom_free(lwg2); } -void test_spheroid_distance(void) +static void test_spheroid_distance(void) { GEOGRAPHIC_POINT g1, g2; double d; @@ -976,7 +890,7 @@ } -void test_spheroid_area(void) +static void test_spheroid_area(void) { LWGEOM *lwg; GBOX gbox; @@ -989,48 +903,76 @@ gbox.flags = gflags(0, 0, 1); /* Medford lot test polygon */ - lwg = lwgeom_from_ewkt("POLYGON((-122.848227067007 42.5007249610493,-122.848309475585 42.5007179884263,-122.848327688675 42.500835880696,-122.848245279942 42.5008428533324,-122.848227067007 42.5007249610493))", PARSER_CHECK_NONE); + lwg = lwgeom_from_wkt("POLYGON((-122.848227067007 42.5007249610493,-122.848309475585 42.5007179884263,-122.848327688675 42.500835880696,-122.848245279942 42.5008428533324,-122.848227067007 42.5007249610493))", LW_PARSER_CHECK_NONE); lwgeom_calculate_gbox_geodetic(lwg, &gbox); - a1 = lwgeom_area_sphere(lwg, &gbox, &s); - a2 = lwgeom_area_spheroid(lwg, &gbox, &s); + a1 = lwgeom_area_sphere(lwg, &s); + a2 = lwgeom_area_spheroid(lwg, &s); //printf("\nsphere: %.12g\nspheroid: %.12g\n", a1, a2); CU_ASSERT_DOUBLE_EQUAL(a1, 89.7211470368, 0.0001); /* sphere */ CU_ASSERT_DOUBLE_EQUAL(a2, 89.8684316032, 0.0001); /* spheroid */ + lwgeom_free(lwg); /* Big-ass polygon */ - lwg = lwgeom_from_ewkt("POLYGON((-2 3, -2 4, -1 4, -1 3, -2 3))", PARSER_CHECK_NONE); + lwg = lwgeom_from_wkt("POLYGON((-2 3, -2 4, -1 4, -1 3, -2 3))", LW_PARSER_CHECK_NONE); lwgeom_calculate_gbox_geodetic(lwg, &gbox); - a1 = lwgeom_area_sphere(lwg, &gbox, &s); - a2 = lwgeom_area_spheroid(lwg, &gbox, &s); + a1 = lwgeom_area_sphere(lwg, &s); + a2 = lwgeom_area_spheroid(lwg, &s); //printf("\nsphere: %.12g\nspheroid: %.12g\n", a1, a2); CU_ASSERT_DOUBLE_EQUAL(a1, 12341436880.1, 10.0); /* sphere */ CU_ASSERT_DOUBLE_EQUAL(a2, 12286574431.9, 10.0); /* spheroid */ + lwgeom_free(lwg); /* One-degree square */ - lwg = lwgeom_from_ewkt("POLYGON((8.5 2,8.5 1,9.5 1,9.5 2,8.5 2))", PARSER_CHECK_NONE); + lwg = lwgeom_from_wkt("POLYGON((8.5 2,8.5 1,9.5 1,9.5 2,8.5 2))", LW_PARSER_CHECK_NONE); lwgeom_calculate_gbox_geodetic(lwg, &gbox); - a1 = lwgeom_area_sphere(lwg, &gbox, &s); - a2 = lwgeom_area_spheroid(lwg, &gbox, &s); + a1 = lwgeom_area_sphere(lwg, &s); + a2 = lwgeom_area_spheroid(lwg, &s); //printf("\nsphere: %.12g\nspheroid: %.12g\n", a1, a2); CU_ASSERT_DOUBLE_EQUAL(a1, 12360265021.1, 10.0); /* sphere */ CU_ASSERT_DOUBLE_EQUAL(a2, 12304814950.073, 100.0); /* spheroid */ + lwgeom_free(lwg); /* One-degree square *near* dateline */ - lwg = lwgeom_from_ewkt("POLYGON((179.5 2,179.5 1,178.5 1,178.5 2,179.5 2))", PARSER_CHECK_NONE); + lwg = lwgeom_from_wkt("POLYGON((179.5 2,179.5 1,178.5 1,178.5 2,179.5 2))", LW_PARSER_CHECK_NONE); lwgeom_calculate_gbox_geodetic(lwg, &gbox); - a1 = lwgeom_area_sphere(lwg, &gbox, &s); - a2 = lwgeom_area_spheroid(lwg, &gbox, &s); + a1 = lwgeom_area_sphere(lwg, &s); + a2 = lwgeom_area_spheroid(lwg, &s); //printf("\nsphere: %.12g\nspheroid: %.12g\n", a1, a2); CU_ASSERT_DOUBLE_EQUAL(a1, 12360265021.1, 10.0); /* sphere */ CU_ASSERT_DOUBLE_EQUAL(a2, 12304814950.073, 100.0); /* spheroid */ + lwgeom_free(lwg); /* One-degree square *across* dateline */ - lwg = lwgeom_from_ewkt("POLYGON((179.5 2,179.5 1,-179.5 1,-179.5 2,179.5 2))", PARSER_CHECK_NONE); + lwg = lwgeom_from_wkt("POLYGON((179.5 2,179.5 1,-179.5 1,-179.5 2,179.5 2))", LW_PARSER_CHECK_NONE); lwgeom_calculate_gbox_geodetic(lwg, &gbox); - a1 = lwgeom_area_sphere(lwg, &gbox, &s); - a2 = lwgeom_area_spheroid(lwg, &gbox, &s); + a1 = lwgeom_area_sphere(lwg, &s); + a2 = lwgeom_area_spheroid(lwg, &s); //printf("\nsphere: %.12g\nspheroid: %.12g\n", a1, a2); CU_ASSERT_DOUBLE_EQUAL(a1, 12360265021.3679, 10.0); /* sphere */ CU_ASSERT_DOUBLE_EQUAL(a2, 12304814950.073, 100.0); /* spheroid */ + lwgeom_free(lwg); } + +/* +** Used by test harness to register the tests in this file. +*/ +CU_TestInfo geodetic_tests[] = +{ + PG_TEST(test_signum), + PG_TEST(test_gbox_from_spherical_coordinates), + PG_TEST(test_gserialized_get_gbox_geocentric), + PG_TEST(test_clairaut), + PG_TEST(test_edge_intersection), + PG_TEST(test_edge_distance_to_point), + PG_TEST(test_edge_distance_to_edge), + PG_TEST(test_lwgeom_distance_sphere), + PG_TEST(test_lwgeom_check_geodetic), + PG_TEST(test_gserialized_from_lwgeom), + PG_TEST(test_spheroid_distance), + PG_TEST(test_spheroid_area), + PG_TEST(test_lwpoly_covers_point2d), + PG_TEST(test_ptarray_point_in_ring), + CU_TEST_INFO_NULL +}; +CU_SuiteInfo geodetic_suite = {"Geodetic Suite", NULL, NULL, geodetic_tests}; diff -Nru postgis-1.5.3/liblwgeom/cunit/cu_geodetic.h postgis-2.0.1/liblwgeom/cunit/cu_geodetic.h --- postgis-1.5.3/liblwgeom/cunit/cu_geodetic.h 2009-11-30 20:50:57.000000000 +0000 +++ postgis-2.0.1/liblwgeom/cunit/cu_geodetic.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,43 +0,0 @@ -/********************************************************************** - * $Id: cu_geodetic.h 4947 2009-11-30 20:50:57Z pramsey $ - * - * PostGIS - Spatial Types for PostgreSQL - * http://postgis.refractions.net - * Copyright 2009 Paul Ramsey - * - * This is free software; you can redistribute and/or modify it under - * the terms of the GNU General Public Licence. See the COPYING file. - * - **********************************************************************/ - -#include -#include -#include -#include "CUnit/Basic.h" - -#include "lwgeodetic.h" -#include "cu_tester.h" - -/*********************************************************************** -** For new geography library lwgeodetic.h -*/ - - -/* Test functions */ -void test_signum(void); -void test_gbox_from_spherical_coordinates(void); -void test_gserialized_get_gbox_geocentric(void); -void test_clairaut(void); -void test_gbox_calculation(void); -void test_edge_intersection(void); -void test_edge_distance_to_point(void); -void test_edge_distance_to_edge(void); -void test_ptarray_point_in_ring_winding(void); -void test_lwgeom_distance_sphere(void); -void test_ptarray_point_in_ring(void); -void test_spheroid_distance(void); -void test_spheroid_area(void); -void test_lwpoly_covers_point2d(void); -void test_gbox_calculation(void); -void test_lwgeom_check_geodetic(void); -void test_gserialized_from_lwgeom(void); diff -Nru postgis-1.5.3/liblwgeom/cunit/cu_geodetic_data.h postgis-2.0.1/liblwgeom/cunit/cu_geodetic_data.h --- postgis-1.5.3/liblwgeom/cunit/cu_geodetic_data.h 2010-08-10 19:35:57.000000000 +0000 +++ postgis-2.0.1/liblwgeom/cunit/cu_geodetic_data.h 2012-02-27 22:08:12.000000000 +0000 @@ -1,10 +1,22 @@ +/********************************************************************** + * $Id: cu_geodetic_data.h 9324 2012-02-27 22:08:12Z pramsey $ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * Copyright 2008 Paul Ramsey + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + int gbox_data_length = 55; char gbox_data[][512] = { "LINESTRING(-0 40,0 -30)", "LINESTRING(-180 90,180 -80)", - "LINESTRING(-0 90,0 -90)", - "LINESTRING(0 90,80 -90)", + "LINESTRING(-0 90,0 -89)", + "LINESTRING(0 90,80 -89)", "LINESTRING(0 -5,0 -5)", "LINESTRING(180 -35,180 45)", "LINESTRING(158 -85,-57 86)", @@ -15,7 +27,7 @@ "LINESTRING(-3.083333333333333333333333333333333 9.83333333333333333333333333333333,15.5 -5.25)", "LINESTRING(86.85 9.85,105.5 -5.25)", "LINESTRING(-120.0 62.55,-120.0 62.55)", - "LINESTRING(-135.0 40.0,45.0 -40.0)", + "LINESTRING(-135.0 40.0,45.0 -39.0)", "LINESTRING(-120.0 62.55,60.0 73.25)", "LINESTRING(-120.0 -62.55,60.0 -73.25)", "LINESTRING(-120.0 20.0,-120.5 20.0)", @@ -55,6 +67,6 @@ "LINESTRING(-77.90029319006709 -20.61989357708765,-29.776541043747443 88.24497900223159)", "LINESTRING(12.21419896647646 -2.2758177391540926,149.7713684095024 13.210117902931728)", "LINESTRING(-49.891199414628915 66.72545480471234,-39.418865490450656 -89.97504625275525)", - "POLYGON((-40.0 52.0, 102.0 -6.0, -67.0 -29.0, -40.0 52.0))", + "POLYGON((-40.0 52.0, 102.0 -6.0, -67.0 -29.0, -40.0 52.0))" }; diff -Nru postgis-1.5.3/liblwgeom/cunit/cu_geos.c postgis-2.0.1/liblwgeom/cunit/cu_geos.c --- postgis-1.5.3/liblwgeom/cunit/cu_geos.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/cunit/cu_geos.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,77 @@ +/********************************************************************** + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * + * Copyright 2011 Sandro Santilli + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include +#include +#include +#include "CUnit/Basic.h" + +#include "lwgeom_geos.h" +#include "cu_tester.h" + +static void test_geos_noop(void) +{ + int i; + + char *ewkt[] = + { + "POINT(0 0.2)", + "LINESTRING(-1 -1,-1 2.5,2 2,2 -1)", + "MULTIPOINT(0.9 0.9,0.9 0.9,0.9 0.9,0.9 0.9,0.9 0.9,0.9 0.9)", + "SRID=1;MULTILINESTRING((-1 -1,-1 2.5,2 2,2 -1),(-1 -1,-1 2.5,2 2,2 -1),(-1 -1,-1 2.5,2 2,2 -1),(-1 -1,-1 2.5,2 2,2 -1))", + "SRID=1;MULTILINESTRING((-1 -1,-1 2.5,2 2,2 -1),(-1 -1,-1 2.5,2 2,2 -1),(-1 -1,-1 2.5,2 2,2 -1),(-1 -1,-1 2.5,2 2,2 -1))", + "POLYGON((-1 -1,-1 2.5,2 2,2 -1,-1 -1),(0 0,0 1,1 1,1 0,0 0))", + "SRID=4326;POLYGON((-1 -1,-1 2.5,2 2,2 -1,-1 -1),(0 0,0 1,1 1,1 0,0 0))", + "SRID=4326;POLYGON((-1 -1,-1 2.5,2 2,2 -1,-1 -1),(0 0,0 1,1 1,1 0,0 0),(-0.5 -0.5,-0.5 -0.4,-0.4 -0.4,-0.4 -0.5,-0.5 -0.5))", + "SRID=100000;POLYGON((-1 -1 3,-1 2.5 3,2 2 3,2 -1 3,-1 -1 3),(0 0 3,0 1 3,1 1 3,1 0 3,0 0 3),(-0.5 -0.5 3,-0.5 -0.4 3,-0.4 -0.4 3,-0.4 -0.5 3,-0.5 -0.5 3))", + "SRID=4326;MULTIPOLYGON(((-1 -1,-1 2.5,2 2,2 -1,-1 -1),(0 0,0 1,1 1,1 0,0 0),(-0.5 -0.5,-0.5 -0.4,-0.4 -0.4,-0.4 -0.5,-0.5 -0.5)),((-1 -1,-1 2.5,2 2,2 -1,-1 -1),(0 0,0 1,1 1,1 0,0 0),(-0.5 -0.5,-0.5 -0.4,-0.4 -0.4,-0.4 -0.5,-0.5 -0.5)))", + "SRID=4326;GEOMETRYCOLLECTION(POINT(0 1),POLYGON((-1 -1,-1 2.5,2 2,2 -1,-1 -1),(0 0,0 1,1 1,1 0,0 0)),MULTIPOLYGON(((-1 -1,-1 2.5,2 2,2 -1,-1 -1),(0 0,0 1,1 1,1 0,0 0),(-0.5 -0.5,-0.5 -0.4,-0.4 -0.4,-0.4 -0.5,-0.5 -0.5))))", + }; + + + for ( i = 0; i < (sizeof ewkt/sizeof(char *)); i++ ) + { + LWGEOM *geom_in, *geom_out; + char *in_ewkt; + char *out_ewkt; + + in_ewkt = ewkt[i]; + geom_in = lwgeom_from_wkt(in_ewkt, LW_PARSER_CHECK_NONE); + geom_out = lwgeom_geos_noop(geom_in); + if ( ! geom_out ) { + fprintf(stderr, "\nNull return from lwgeom_geos_noop with wkt: %s\n", in_ewkt); + lwgeom_free(geom_in); + continue; + } + out_ewkt = lwgeom_to_ewkt(geom_out); + if (strcmp(in_ewkt, out_ewkt)) + fprintf(stderr, "\nExp: %s\nObt: %s\n", in_ewkt, out_ewkt); + CU_ASSERT_STRING_EQUAL(in_ewkt, out_ewkt); + lwfree(out_ewkt); + lwgeom_free(geom_out); + lwgeom_free(geom_in); + } + + +} + + +/* +** Used by test harness to register the tests in this file. +*/ +CU_TestInfo geos_tests[] = +{ + PG_TEST(test_geos_noop), + CU_TEST_INFO_NULL +}; +CU_SuiteInfo geos_suite = {"GEOS", NULL, NULL, geos_tests}; + diff -Nru postgis-1.5.3/liblwgeom/cunit/cu_homogenize.c postgis-2.0.1/liblwgeom/cunit/cu_homogenize.c --- postgis-1.5.3/liblwgeom/cunit/cu_homogenize.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/cunit/cu_homogenize.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,252 @@ +/********************************************************************** + * $Id: cu_homogenize.c 9324 2012-02-27 22:08:12Z pramsey $ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * Copyright 2009 Olivier Courtin + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include +#include +#include +#include "CUnit/Basic.h" + +#include "liblwgeom_internal.h" +#include "cu_tester.h" + +static void do_geom_test(char * in, char * out) +{ + LWGEOM *g, *h; + char *tmp; + + g = lwgeom_from_wkt(in, LW_PARSER_CHECK_NONE); + h = lwgeom_homogenize(g); + tmp = lwgeom_to_ewkt(h); + if (strcmp(tmp, out)) + fprintf(stderr, "\nIn: %s\nOut: %s\nExp: %s\n", + in, tmp, out); + CU_ASSERT_STRING_EQUAL(tmp, out); + lwfree(tmp); + lwgeom_free(g); + /* See http://trac.osgeo.org/postgis/ticket/1104 */ + lwgeom_free(h); +} + + +static void test_coll_point(void) +{ + do_geom_test("GEOMETRYCOLLECTION(POINT(1 2))", + "POINT(1 2)"); + + do_geom_test("GEOMETRYCOLLECTION(POINT(1 2),POINT(3 4))", + "MULTIPOINT(1 2,3 4)"); + + do_geom_test("GEOMETRYCOLLECTION(POINT(1 2),POINT(3 4),POINT(5 6))", + "MULTIPOINT(1 2,3 4,5 6)"); + + do_geom_test("GEOMETRYCOLLECTION(MULTIPOINT(1 2,3 4),POINT(5 6))", + "MULTIPOINT(1 2,3 4,5 6)"); + + do_geom_test("GEOMETRYCOLLECTION(POINT(1 2),MULTIPOINT(3 4,5 6))", + "MULTIPOINT(1 2,3 4,5 6)"); + + do_geom_test("GEOMETRYCOLLECTION(MULTIPOINT(1 2,3 4),MULTIPOINT(5 6,7 8))", + "MULTIPOINT(1 2,3 4,5 6,7 8)"); +} + + +static void test_coll_line(void) +{ + do_geom_test("GEOMETRYCOLLECTION(LINESTRING(1 2,3 4))", + "LINESTRING(1 2,3 4)"); + + do_geom_test("GEOMETRYCOLLECTION(LINESTRING(1 2,3 4),LINESTRING(5 6,7 8))", + "MULTILINESTRING((1 2,3 4),(5 6,7 8))"); + + do_geom_test("GEOMETRYCOLLECTION(LINESTRING(1 2,3 4),LINESTRING(5 6,7 8),LINESTRING(9 10,11 12))", + "MULTILINESTRING((1 2,3 4),(5 6,7 8),(9 10,11 12))"); + + do_geom_test("GEOMETRYCOLLECTION(MULTILINESTRING((1 2,3 4),(5 6,7 8)),LINESTRING(9 10,11 12))", + "MULTILINESTRING((1 2,3 4),(5 6,7 8),(9 10,11 12))"); + + do_geom_test("GEOMETRYCOLLECTION(LINESTRING(1 2,3 4),MULTILINESTRING((5 6,7 8),(9 10,11 12)))", + "MULTILINESTRING((1 2,3 4),(5 6,7 8),(9 10,11 12))"); + + do_geom_test("GEOMETRYCOLLECTION(MULTILINESTRING((1 2,3 4),(5 6,7 8)),MULTILINESTRING((9 10,11 12),(13 14,15 16)))", + "MULTILINESTRING((1 2,3 4),(5 6,7 8),(9 10,11 12),(13 14,15 16))"); +} + + +static void test_coll_poly(void) +{ + do_geom_test("GEOMETRYCOLLECTION(POLYGON((1 2,3 4,5 6,1 2)))", + "POLYGON((1 2,3 4,5 6,1 2))"); + + do_geom_test("GEOMETRYCOLLECTION(POLYGON((1 2,3 4,5 6,1 2)),POLYGON((7 8,9 10,11 12,7 8)))", + "MULTIPOLYGON(((1 2,3 4,5 6,1 2)),((7 8,9 10,11 12,7 8)))"); + + do_geom_test("GEOMETRYCOLLECTION(POLYGON((1 2,3 4,5 6,1 2)),POLYGON((7 8,9 10,11 12,7 8)),POLYGON((13 14,15 16,17 18,13 14)))", + "MULTIPOLYGON(((1 2,3 4,5 6,1 2)),((7 8,9 10,11 12,7 8)),((13 14,15 16,17 18,13 14)))"); + + do_geom_test("GEOMETRYCOLLECTION(MULTIPOLYGON(((1 2,3 4,5 6,1 2)),((7 8,9 10,11 12,7 8))),POLYGON((13 14,15 16,17 18,13 14)))", + "MULTIPOLYGON(((1 2,3 4,5 6,1 2)),((7 8,9 10,11 12,7 8)),((13 14,15 16,17 18,13 14)))"); + + do_geom_test("GEOMETRYCOLLECTION(POLYGON((1 2,3 4,5 6,1 2)),MULTIPOLYGON(((7 8,9 10,11 12,7 8)),((13 14,15 16,17 18,13 14))))", + "MULTIPOLYGON(((1 2,3 4,5 6,1 2)),((7 8,9 10,11 12,7 8)),((13 14,15 16,17 18,13 14)))"); + + do_geom_test("GEOMETRYCOLLECTION(MULTIPOLYGON(((1 2,3 4,5 6,1 2)),((7 8,9 10,11 12,7 8))),MULTIPOLYGON(((13 14,15 16,17 18,13 14)),((19 20,21 22,23 24,19 20))))", + "MULTIPOLYGON(((1 2,3 4,5 6,1 2)),((7 8,9 10,11 12,7 8)),((13 14,15 16,17 18,13 14)),((19 20,21 22,23 24,19 20)))"); +} + + +static void test_coll_coll(void) +{ + /* Two different types together must produce a Collection as output */ + do_geom_test("GEOMETRYCOLLECTION(POINT(1 2),LINESTRING(3 4,5 6))", + "GEOMETRYCOLLECTION(POINT(1 2),LINESTRING(3 4,5 6))"); + + do_geom_test("GEOMETRYCOLLECTION(LINESTRING(1 2,3 4),POLYGON((5 6,7 8,9 10,5 6)))", + "GEOMETRYCOLLECTION(LINESTRING(1 2,3 4),POLYGON((5 6,7 8,9 10,5 6)))"); + + + /* Ability to produce a single MULTI with same type */ + do_geom_test("GEOMETRYCOLLECTION(POINT(1 2),LINESTRING(3 4,5 6),POINT(7 8))", + "GEOMETRYCOLLECTION(MULTIPOINT(1 2,7 8),LINESTRING(3 4,5 6))"); + + do_geom_test("GEOMETRYCOLLECTION(POINT(1 2),LINESTRING(3 4,5 6),MULTIPOINT(7 8,9 10))", + "GEOMETRYCOLLECTION(MULTIPOINT(1 2,7 8,9 10),LINESTRING(3 4,5 6))"); + + + /* Recursive Collection handle */ + do_geom_test("GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POINT(1 2))))", + "POINT(1 2)"); + + do_geom_test("GEOMETRYCOLLECTION(POINT(1 2),GEOMETRYCOLLECTION(LINESTRING(3 4,5 6)))", + "GEOMETRYCOLLECTION(POINT(1 2),LINESTRING(3 4,5 6))"); + + + /* EMPTY Collection */ + do_geom_test("GEOMETRYCOLLECTION EMPTY", + "GEOMETRYCOLLECTION EMPTY"); + + + /* Recursive EMPTY Collection */ + do_geom_test("GEOMETRYCOLLECTION(GEOMETRYCOLLECTION EMPTY)", + "GEOMETRYCOLLECTION EMPTY"); + + do_geom_test("GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(GEOMETRYCOLLECTION EMPTY))", + "GEOMETRYCOLLECTION EMPTY"); +} + +static void test_coll_curve(void) +{ + /* Two different types together must produce a Collection as output */ + do_geom_test("GEOMETRYCOLLECTION(CIRCULARSTRING(0 0,1 1,2 2))", + "CIRCULARSTRING(0 0,1 1,2 2)"); + + do_geom_test("GEOMETRYCOLLECTION(CIRCULARSTRING(0 0,1 1,2 2),CIRCULARSTRING(0 0,1 1,2 2))", + "MULTICURVE(CIRCULARSTRING(0 0,1 1,2 2),CIRCULARSTRING(0 0,1 1,2 2))"); +} + +static void test_geom(void) +{ + /* Already simple geometry */ + do_geom_test("POINT(1 2)", + "POINT(1 2)"); + + do_geom_test("LINESTRING(1 2,3 4)", + "LINESTRING(1 2,3 4)"); + + do_geom_test("POLYGON((1 2,3 4,5 6,1 2))", + "POLYGON((1 2,3 4,5 6,1 2))"); + + do_geom_test("POLYGON((1 2,3 4,5 6,1 2),(7 8,9 10,11 12,7 8))", + "POLYGON((1 2,3 4,5 6,1 2),(7 8,9 10,11 12,7 8))"); + + + /* Empty geometry */ + do_geom_test("GEOMETRYCOLLECTION EMPTY", + "GEOMETRYCOLLECTION EMPTY"); + + + /* A MULTI with a single geometry inside */ + do_geom_test("MULTIPOINT(1 2)", + "POINT(1 2)"); + + do_geom_test("MULTILINESTRING((1 2,3 4))", + "LINESTRING(1 2,3 4)"); + + do_geom_test("MULTIPOLYGON(((1 2,3 4,5 6,1 2)))", + "POLYGON((1 2,3 4,5 6,1 2))"); + + do_geom_test("MULTIPOLYGON(((1 2,3 4,5 6,1 2),(7 8,9 10,11 12,7 8)))", + "POLYGON((1 2,3 4,5 6,1 2),(7 8,9 10,11 12,7 8))"); + + + /* A real MULTI */ + do_geom_test("MULTIPOINT(1 2,3 4)", + "MULTIPOINT(1 2,3 4)"); + + do_geom_test("MULTILINESTRING((1 2,3 4),(5 6,7 8))", + "MULTILINESTRING((1 2,3 4),(5 6,7 8))"); + + do_geom_test("MULTIPOLYGON(((1 2,3 4,5 6,1 2)),((7 8,9 10,11 12,7 8)))", + "MULTIPOLYGON(((1 2,3 4,5 6,1 2)),((7 8,9 10,11 12,7 8)))"); + + do_geom_test("MULTIPOLYGON(((1 2,3 4,5 6,1 2),(7 8,9 10,11 12,7 8)),((13 14,15 16,17 18,13 14)))", + "MULTIPOLYGON(((1 2,3 4,5 6,1 2),(7 8,9 10,11 12,7 8)),((13 14,15 16,17 18,13 14)))"); + + + /* A Collection */ + do_geom_test("GEOMETRYCOLLECTION(POINT(1 2),LINESTRING(3 4,5 6))", + "GEOMETRYCOLLECTION(POINT(1 2),LINESTRING(3 4,5 6))"); + + + /* SRID */ + do_geom_test("SRID=4326;GEOMETRYCOLLECTION EMPTY", + "SRID=4326;GEOMETRYCOLLECTION EMPTY"); + + do_geom_test("SRID=4326;POINT(1 2)", + "SRID=4326;POINT(1 2)"); + + do_geom_test("SRID=4326;MULTIPOINT(1 2)", + "SRID=4326;POINT(1 2)"); + + do_geom_test("SRID=4326;MULTIPOINT(1 2,3 4)", + "SRID=4326;MULTIPOINT(1 2,3 4)"); + + do_geom_test("SRID=4326;MULTILINESTRING((1 2,3 4))", + "SRID=4326;LINESTRING(1 2,3 4)"); + + do_geom_test("SRID=4326;MULTILINESTRING((1 2,3 4),(5 6,7 8))", + "SRID=4326;MULTILINESTRING((1 2,3 4),(5 6,7 8))"); + + /* 3D and 4D */ + do_geom_test("POINT(1 2 3)", + "POINT(1 2 3)"); + + do_geom_test("POINTM(1 2 3)", + "POINTM(1 2 3)"); + + do_geom_test("POINT(1 2 3 4)", + "POINT(1 2 3 4)"); +} + +/* +** Used by test harness to register the tests in this file. +*/ +CU_TestInfo homogenize_tests[] = +{ + PG_TEST(test_coll_point), + PG_TEST(test_coll_line), + PG_TEST(test_coll_poly), + PG_TEST(test_coll_coll), + PG_TEST(test_geom), + PG_TEST(test_coll_curve), + CU_TEST_INFO_NULL +}; +CU_SuiteInfo homogenize_suite = {"Homogenize Suite", NULL, NULL, homogenize_tests}; diff -Nru postgis-1.5.3/liblwgeom/cunit/cu_in_wkb.c postgis-2.0.1/liblwgeom/cunit/cu_in_wkb.c --- postgis-1.5.3/liblwgeom/cunit/cu_in_wkb.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/cunit/cu_in_wkb.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,234 @@ +/********************************************************************** + * $Id: cu_out_wkb.c 6036 2010-10-03 18:14:35Z pramsey $ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * Copyright 2010 Paul Ramsey + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include +#include +#include +#include "CUnit/Basic.h" + +#include "liblwgeom_internal.h" +#include "cu_tester.h" + +/* +** Global variable to hold WKB strings +*/ +char *hex_a; +char *hex_b; + +/* +** The suite initialization function. +** Create any re-used objects. +*/ +static int init_wkb_in_suite(void) +{ + hex_a = NULL; + hex_b = NULL; + return 0; +} + +/* +** The suite cleanup function. +** Frees any global objects. +*/ +static int clean_wkb_in_suite(void) +{ + if (hex_a) free(hex_a); + if (hex_b) free(hex_b); + hex_a = NULL; + hex_b = NULL; + return 0; +} + +static void cu_wkb_malformed_in(char *hex) +{ + LWGEOM_PARSER_RESULT p; + int rv = 0; + + rv = lwgeom_parse_wkt(&p, hex, 0); + CU_ASSERT( LW_FAILURE == rv ); + CU_ASSERT( p.errcode ); + CU_ASSERT( ! p.geom ); + lwgeom_parser_result_free(&p); +} + +static void cu_wkb_in(char *wkt) +{ + LWGEOM_PARSER_RESULT pr; + LWGEOM *g_a, *g_b; + uint8_t *wkb_a, *wkb_b; + size_t wkb_size_a, wkb_size_b; + /* int i; char *hex; */ + + if ( hex_a ) free(hex_a); + if ( hex_b ) free(hex_b); + + /* Turn WKT into geom */ + lwgeom_parse_wkt(&pr, wkt, LW_PARSER_CHECK_NONE); + if ( pr.errcode ) + { + printf("ERROR: %s\n", pr.message); + printf("POSITION: %d\n", pr.errlocation); + exit(0); + } + + /* Get the geom */ + g_a = pr.geom; + + /* Turn geom into WKB */ + wkb_a = lwgeom_to_wkb(g_a, WKB_NDR | WKB_EXTENDED, &wkb_size_a); + + /* Turn WKB back into geom */ + g_b = lwgeom_from_wkb(wkb_a, wkb_size_a, LW_PARSER_CHECK_NONE); + + /* Turn geom to WKB again */ + wkb_b = lwgeom_to_wkb(g_b, WKB_NDR | WKB_EXTENDED, &wkb_size_b); + + /* Turn geoms into WKB for comparisons */ + hex_a = hexbytes_from_bytes(wkb_a, wkb_size_a); + hex_b = hexbytes_from_bytes(wkb_b, wkb_size_b); + + /* Clean up */ + lwfree(wkb_a); + lwfree(wkb_b); + lwgeom_parser_result_free(&pr); + lwgeom_free(g_b); +} + +static void test_wkb_in_point(void) +{ + cu_wkb_in("POINT(0 0 0 0)"); +// printf("old: %s\nnew: %s\n",hex_a, hex_b); + CU_ASSERT_STRING_EQUAL(hex_a, hex_b); + + cu_wkb_in("SRID=4;POINTM(1 1 1)"); +// printf("old: %s\nnew: %s\n",hex_a, hex_b); + CU_ASSERT_STRING_EQUAL(hex_a, hex_b); +} + +static void test_wkb_in_linestring(void) +{ + cu_wkb_in("LINESTRING(0 0,1 1)"); + CU_ASSERT_STRING_EQUAL(hex_a, hex_b); + + cu_wkb_in("LINESTRING(0 0 1,1 1 2,2 2 3)"); + CU_ASSERT_STRING_EQUAL(hex_a, hex_b); +} + +static void test_wkb_in_polygon(void) +{ + cu_wkb_in("SRID=4;POLYGON((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0))"); + CU_ASSERT_STRING_EQUAL(hex_a, hex_b); + + cu_wkb_in("SRID=14;POLYGON((0 0 0 1,0 1 0 2,1 1 0 3,1 0 0 4,0 0 0 5))"); + CU_ASSERT_STRING_EQUAL(hex_a, hex_b); + + cu_wkb_in("SRID=4;POLYGON((0 0 0 1,0 1 0 2,1 1 0 3,1 0 0 4,0 0 0 5))"); + CU_ASSERT_STRING_EQUAL(hex_a, hex_b); + + cu_wkb_in("POLYGON EMPTY"); + CU_ASSERT_STRING_EQUAL(hex_a, hex_b); +} + +static void test_wkb_in_multipoint(void) +{ + cu_wkb_in("SRID=4;MULTIPOINT(0 0 0,0 1 0,1 1 0,1 0 0,0 0 1)"); + CU_ASSERT_STRING_EQUAL(hex_a, hex_b); + + cu_wkb_in("MULTIPOINT(0 0 0, 0.26794919243112270647255365849413 1 3)"); + CU_ASSERT_STRING_EQUAL(hex_a, hex_b); +} + +static void test_wkb_in_multilinestring(void) {} + +static void test_wkb_in_multipolygon(void) +{ + cu_wkb_in("SRID=14;MULTIPOLYGON(((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)),((-1 -1 0,-1 2 0,2 2 0,2 -1 0,-1 -1 0),(0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)))"); + CU_ASSERT_STRING_EQUAL(hex_a, hex_b); + //printf("old: %s\nnew: %s\n",hex_a, hex_b); +} + +static void test_wkb_in_collection(void) +{ + cu_wkb_in("SRID=14;GEOMETRYCOLLECTION(POLYGON((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)),POINT(1 1 1))"); + CU_ASSERT_STRING_EQUAL(hex_a, hex_b); + + cu_wkb_in("GEOMETRYCOLLECTION EMPTY"); + CU_ASSERT_STRING_EQUAL(hex_a, hex_b); + + cu_wkb_in("SRID=14;GEOMETRYCOLLECTION(MULTIPOLYGON(((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0))),POLYGON((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)),POINT(1 1 1),LINESTRING(0 0 0, 1 1 1))"); + CU_ASSERT_STRING_EQUAL(hex_a, hex_b); + +} + +static void test_wkb_in_circularstring(void) +{ + cu_wkb_in("CIRCULARSTRING(0 -2,-2 0,0 2,2 0,0 -2)"); + CU_ASSERT_STRING_EQUAL(hex_a, hex_b); + + cu_wkb_in("CIRCULARSTRING(-5 0 0 4, 0 5 1 3, 5 0 2 2, 10 -5 3 1, 15 0 4 0)"); + CU_ASSERT_STRING_EQUAL(hex_a, hex_b); + + cu_wkb_in("SRID=43;CIRCULARSTRING(-5 0 0 4, 0 5 1 3, 5 0 2 2, 10 -5 3 1, 15 0 4 0)"); + CU_ASSERT_STRING_EQUAL(hex_a, hex_b); +} + +static void test_wkb_in_compoundcurve(void) +{ + cu_wkb_in("COMPOUNDCURVE(CIRCULARSTRING(0 0 0, 0.26794919243112270647255365849413 1 3, 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1),(0.5857864376269049511983112757903 1.4142135623730950488016887242097 1,2 0 0,0 0 0))"); + CU_ASSERT_STRING_EQUAL(hex_a, hex_b); +} + +static void test_wkb_in_curvpolygon(void) +{ + cu_wkb_in("CURVEPOLYGON(CIRCULARSTRING(-2 0 0 0,-1 -1 1 2,0 0 2 4,1 -1 3 6,2 0 4 8,0 2 2 4,-2 0 0 0),(-1 0 1 2,0 0.5 2 4,1 0 3 6,0 1 3 4,-1 0 1 2))"); + CU_ASSERT_STRING_EQUAL(hex_a, hex_b); +} + +static void test_wkb_in_multicurve(void) {} + +static void test_wkb_in_multisurface(void) {} + +static void test_wkb_in_malformed(void) +{ + /* See http://trac.osgeo.org/postgis/ticket/1445 */ + cu_wkb_malformed_in("01060000400200000001040000400100000001010000400000000000000000000000000000000000000000000000000101000040000000000000F03F000000000000F03F000000000000F03F"); + cu_wkb_malformed_in("01050000400200000001040000400100000001010000400000000000000000000000000000000000000000000000000101000040000000000000F03F000000000000F03F000000000000F03F"); + cu_wkb_malformed_in("01040000400200000001040000400100000001010000400000000000000000000000000000000000000000000000000101000040000000000000F03F000000000000F03F000000000000F03F"); + cu_wkb_malformed_in("01030000400200000001040000400100000001010000400000000000000000000000000000000000000000000000000101000040000000000000F03F000000000000F03F000000000000F03F"); + + /* See http://trac.osgeo.org/postgis/ticket/168 */ + cu_wkb_malformed_in("01060000C00100000001030000C00100000003000000E3D9107E234F5041A3DB66BC97A30F4122ACEF440DAF9440FFFFFFFFFFFFEFFFE3D9107E234F5041A3DB66BC97A30F4122ACEF440DAF9440FFFFFFFFFFFFEFFFE3D9107E234F5041A3DB66BC97A30F4122ACEF440DAF9440FFFFFFFFFFFFEFFF"); +} + + +/* +** Used by test harness to register the tests in this file. +*/ + +CU_TestInfo wkb_in_tests[] = +{ + PG_TEST(test_wkb_in_point), + PG_TEST(test_wkb_in_linestring), + PG_TEST(test_wkb_in_polygon), + PG_TEST(test_wkb_in_multipoint), + PG_TEST(test_wkb_in_multilinestring), + PG_TEST(test_wkb_in_multipolygon), + PG_TEST(test_wkb_in_collection), + PG_TEST(test_wkb_in_circularstring), + PG_TEST(test_wkb_in_compoundcurve), + PG_TEST(test_wkb_in_curvpolygon), + PG_TEST(test_wkb_in_multicurve), + PG_TEST(test_wkb_in_multisurface), + PG_TEST(test_wkb_in_malformed), + CU_TEST_INFO_NULL +}; +CU_SuiteInfo wkb_in_suite = {"WKB In Suite", init_wkb_in_suite, clean_wkb_in_suite, wkb_in_tests}; diff -Nru postgis-1.5.3/liblwgeom/cunit/cu_in_wkt.c postgis-2.0.1/liblwgeom/cunit/cu_in_wkt.c --- postgis-1.5.3/liblwgeom/cunit/cu_in_wkt.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/cunit/cu_in_wkt.c 2012-04-05 09:11:51.000000000 +0000 @@ -0,0 +1,370 @@ +/********************************************************************** + * $Id: cu_out_wkt.c 6036 2010-10-03 18:14:35Z pramsey $ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * Copyright 2010 Paul Ramsey + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include +#include +#include +#include "CUnit/Basic.h" + +#include "liblwgeom_internal.h" +#include "cu_tester.h" + +/* +** Globals used by tests +*/ +char *s; +char *r; + +/* +** The suite initialization function. +** Create any re-used objects. +*/ +static int init_wkt_in_suite(void) +{ + return 0; +} + +/* +** The suite cleanup function. +** Frees any global objects. +*/ +static int clean_wkt_in_suite(void) +{ + return 0; +} + +/* +* Return a char* that results from taking the input +* WKT, creating an LWGEOM, then writing it back out +* as an output WKT using the supplied variant. +* If there is an error, return that. +*/ +static char* cu_wkt_in(char *wkt, uint8_t variant) +{ + LWGEOM_PARSER_RESULT p; + int rv = 0; + char *s = 0; + + rv = lwgeom_parse_wkt(&p, wkt, 0); + if( p.errcode ) { + return strdup(p.message); + } + s = lwgeom_to_wkt(p.geom, variant, 8, NULL); + lwgeom_parser_result_free(&p); + return s; +} + + +static void test_wkt_in_point(void) +{ + s = "POINT(1e700 0)"; + r = cu_wkt_in(s, WKT_SFSQL); + CU_TEST ( ! strcmp(r, "POINT(inf 0)") || ! strcmp(r, "POINT(1.#INF 0)") ); + lwfree(r); + + s = "POINT(0 0)"; + r = cu_wkt_in(s, WKT_SFSQL); + CU_ASSERT_STRING_EQUAL(r,s); + lwfree(r); + + s = "POINT EMPTY"; + r = cu_wkt_in(s, WKT_SFSQL); + CU_ASSERT_STRING_EQUAL(r,s); + lwfree(r); + + s = "POINT M EMPTY"; + r = cu_wkt_in(s, WKT_ISO); + CU_ASSERT_STRING_EQUAL(r,s); + lwfree(r); + + //printf("\nIN: %s\nOUT: %s\n",s,r); +} + +static void test_wkt_in_linestring(void) +{ + s = "LINESTRING EMPTY"; + r = cu_wkt_in(s, WKT_SFSQL); + CU_ASSERT_STRING_EQUAL(r,s); + lwfree(r); + + s = "LINESTRING(0 0,1 1)"; + r = cu_wkt_in(s, WKT_SFSQL); + CU_ASSERT_STRING_EQUAL(r,s); + lwfree(r); + + s = "LINESTRING(0 0 0,1 1 1)"; + r = cu_wkt_in(s, WKT_EXTENDED); + CU_ASSERT_STRING_EQUAL(r,s); + lwfree(r); + + s = "LINESTRING M (0 0 0,1 1 1)"; + r = cu_wkt_in(s, WKT_ISO); + CU_ASSERT_STRING_EQUAL(r,s); + lwfree(r); + + s = "LINESTRING ZM (0 0 0 1,1 1 1 1,2 2 2 2,0.141231 4 5 4)"; + r = cu_wkt_in(s, WKT_ISO); + CU_ASSERT_STRING_EQUAL(r,s); + lwfree(r); + + s = "LINESTRINGM(0 0 0,1 1 1)"; + r = cu_wkt_in(s, WKT_EXTENDED); + CU_ASSERT_STRING_EQUAL(r,s); + lwfree(r); + + s = "LINESTRING ZM EMPTY"; + r = cu_wkt_in(s, WKT_ISO); + CU_ASSERT_STRING_EQUAL(r,s); + lwfree(r); + + s = "LINESTRING Z (0 0 0 1, 0 1 0 1)"; + r = cu_wkt_in(s, WKT_EXTENDED); + CU_ASSERT_STRING_EQUAL(r,"can not mix dimensionality in a geometry"); + //printf("\nIN: %s\nOUT: %s\n",s,r); + lwfree(r); + +} + +static void test_wkt_in_polygon(void) +{ + s = "POLYGON((0 0,0 1,1 1,0 0))"; + r = cu_wkt_in(s, WKT_SFSQL); + CU_ASSERT_STRING_EQUAL(r,s); + lwfree(r); + + s = "POLYGON Z ((0 0,0 10,10 10,10 0,0 0),(1 1 1,1 2 1,2 2 1,2 1 1,1 1 1))"; + r = cu_wkt_in(s, WKT_SFSQL); + CU_ASSERT_STRING_EQUAL(r,"can not mix dimensionality in a geometry"); + lwfree(r); + + s = "POLYGON Z ((0 0,0 10,10 10,10 0,0 0),(1 1,1 2,2 2,2 1,1 1))"; + r = cu_wkt_in(s, WKT_SFSQL); + CU_ASSERT_STRING_EQUAL(r,"can not mix dimensionality in a geometry"); + //printf("\nIN: %s\nOUT: %s\n",s,r); + lwfree(r); +} + +static void test_wkt_in_multipoint(void) +{ + /**I'm remarking this out since it fails on windows because windows returns + MULTIPOINT(-1 -2 -3,5.4 6.6 7.77,-5.4 -6.6 -7.77,1000000 1e-006 -1000000,-1.3e-006 -1.4e-005 0) **/ + /** @todo TODO: Paul put back in if you care after you do replace mumbo jumbo to replace the extra 0s in Windows + */ + // s = "MULTIPOINT(-1 -2 -3,5.4 6.6 7.77,-5.4 -6.6 -7.77,1000000 1e-06 -1000000,-1.3e-06 -1.4e-05 0)"; + // r = cu_wkt_in(s, WKT_EXTENDED); + // CU_ASSERT_STRING_EQUAL(r,s); + // printf("\nIN: %s\nOUT: %s\n",s,r); + // lwfree(r); + + s = "MULTIPOINT(0 0)"; + r = cu_wkt_in(s, WKT_SFSQL); + CU_ASSERT_STRING_EQUAL(r,s); + //printf("\nIN: %s\nOUT: %s\n",s,r); + lwfree(r); + + s = "MULTIPOINT(0 0,1 1)"; + r = cu_wkt_in(s, WKT_SFSQL); + CU_ASSERT_STRING_EQUAL(r,s); + //printf("\nIN: %s\nOUT: %s\n",s,r); + lwfree(r); +} + +static void test_wkt_in_multilinestring(void) +{ + s = "MULTILINESTRING((0 0,1 1),(1 1,2 2),(3 3,3 3,3 3,2 2,2 1))"; + r = cu_wkt_in(s, WKT_SFSQL); + CU_ASSERT_STRING_EQUAL(r,s); + //printf("\nIN: %s\nOUT: %s\n",s,r); + lwfree(r); + +} + +static void test_wkt_in_multipolygon(void) +{ + s = "MULTIPOLYGON(((0 0,0 1,1 1,0 0)))"; + r = cu_wkt_in(s, WKT_SFSQL); + CU_ASSERT_STRING_EQUAL(r,s); + //printf("\nIN: %s\nOUT: %s\n",s,r); + lwfree(r); + + s = "MULTIPOLYGON(((0 0,0 10,10 10,0 0),(1 1,1 2,2 2,1 1)),((-10 -10,-10 -5,-5 -5,-10 -10)))"; + r = cu_wkt_in(s, WKT_SFSQL); + CU_ASSERT_STRING_EQUAL(r,s); + //printf("\nIN: %s\nOUT: %s\n",s,r); + lwfree(r); + + s = "SRID=4;MULTIPOLYGON(((0 0,0 1,1 1,0 0)))"; + r = cu_wkt_in(s, WKT_EXTENDED); + CU_ASSERT_STRING_EQUAL(r,s); + //printf("\nIN: %s\nOUT: %s\n",s,r); + lwfree(r); + +} + +static void test_wkt_in_collection(void) +{ + s = "SRID=5;GEOMETRYCOLLECTION(POINT(0 0),LINESTRING(1 0,0 0),CIRCULARSTRING(0 0,0 1,1 1,0 1,2 2))"; + r = cu_wkt_in(s, WKT_EXTENDED); + //printf("\nIN: %s\nOUT: %s\n",s,r); + CU_ASSERT_STRING_EQUAL(r,s); + lwfree(r); + + s = "GEOMETRYCOLLECTION(POINT(0 0),POINT EMPTY,LINESTRING(1 0,0 0),POLYGON EMPTY,CIRCULARSTRING(0 0,0 1,1 1,0 1,2 2))"; + r = cu_wkt_in(s, WKT_SFSQL); + //printf("\nIN: %s\nOUT: %s\n",s,r); + CU_ASSERT_STRING_EQUAL(r,s); + lwfree(r); + + s = "GEOMETRYCOLLECTION Z (POINT Z (0 0 0))"; + r = cu_wkt_in(s, WKT_ISO); + //printf("\nIN: %s\nOUT: %s\n",s,r); + CU_ASSERT_STRING_EQUAL(r,s); + lwfree(r); + + s = "GEOMETRYCOLLECTION M (MULTILINESTRING M ((0 0 5,2 0 5),(1 1 5,2 2 5)))"; + r = cu_wkt_in(s, WKT_ISO); + //printf("\nIN: %s\nOUT: %s\n",s,r); + CU_ASSERT_STRING_EQUAL(r,s); + lwfree(r); + + /* See http://trac.osgeo.org/postgis/ticket/1455#comment:3 */ + s = "GEOMETRYCOLLECTION Z (MULTILINESTRING Z ((0 0 5,2 0 5),(1 1 5,2 2 5)))"; + r = cu_wkt_in(s, WKT_ISO); + //printf("\nIN: %s\nOUT: %s\n",s,r); + CU_ASSERT_STRING_EQUAL(r,s); + lwfree(r); +} + +static void test_wkt_in_circularstring(void) +{ + s = "CIRCULARSTRING(0 0,0 1,1 1,0 1,2 2)"; + r = cu_wkt_in(s, WKT_SFSQL); + //printf("\nIN: %s\nOUT: %s\n",s,r); + CU_ASSERT_STRING_EQUAL(r,s); + lwfree(r); +} + +static void test_wkt_in_compoundcurve(void) +{ + s = "SRID=4326;COMPOUNDCURVEM(CIRCULARSTRINGM(0 0 2,1 1 2,1 0 2),(1 0 2,0 1 2))"; + r = cu_wkt_in(s, WKT_EXTENDED); + CU_ASSERT_STRING_EQUAL(r,s); + //printf("\nIN: %s\nOUT: %s\n",s,r); + lwfree(r); + + s = "COMPOUNDCURVE Z (CIRCULARSTRING Z (0 0 0,0 1 0,1 1 0,0 0 0,2 2 0),(2 2 0,0 0 1,1 1 1,2 2 1))"; + r = cu_wkt_in(s, WKT_ISO); + CU_ASSERT_STRING_EQUAL(r,s); + //printf("\nIN: %s\nOUT: %s\n",s,r); + lwfree(r); +} + +static void test_wkt_in_curvpolygon(void) +{ + s = "CURVEPOLYGON(COMPOUNDCURVE(CIRCULARSTRING(0 0,0 1,1 1,2 2,0 0),(0 0,1 1,2 2)),CIRCULARSTRING(0 0,0 1,1 1,0 0,2 2),(0 0,1 1,2 1))"; + r = cu_wkt_in(s, WKT_ISO); + CU_ASSERT_STRING_EQUAL(r,s); + //printf("\nIN: %s\nOUT: %s\n",s,r); + lwfree(r); +} + +static void test_wkt_in_multicurve(void) +{ + s = "SRID=4326;MULTICURVE(COMPOUNDCURVE(CIRCULARSTRING(0 0,1 1,1 0),(1 0,0 1)))"; + r = cu_wkt_in(s, WKT_EXTENDED); + CU_ASSERT_STRING_EQUAL(r,s); + //printf("\nIN: %s\nOUT: %s\n",s,r); + lwfree(r); +} + +static void test_wkt_in_multisurface(void) +{ + s = "SRID=4326;MULTICURVE(COMPOUNDCURVE(CIRCULARSTRING(0 0,1 1,1 0),(1 0,0 1)))"; + r = cu_wkt_in(s, WKT_EXTENDED); + CU_ASSERT_STRING_EQUAL(r,s); + //printf("\nIN: %s\nOUT: %s\n",s,r); + lwfree(r); +} + +static void test_wkt_in_tin(void) +{ + s = "TIN(((0 1 2,3 4 5,6 7 8,0 1 2)),((0 1 2,3 4 5,6 7 8,9 10 11,0 1 2)))"; + r = cu_wkt_in(s, WKT_EXTENDED); + CU_ASSERT_STRING_EQUAL(r,"triangle must have exactly 4 points"); + //printf("\nIN: %s\nOUT: %s\n",s,r); + lwfree(r); +} + +static void test_wkt_in_polyhedralsurface(void) +{ + s = "POLYHEDRALSURFACE(((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))"; + r = cu_wkt_in(s, WKT_EXTENDED); + CU_ASSERT_STRING_EQUAL(r,s); + //printf("\nIN: %s\nOUT: %s\n",s,r); + lwfree(r); + + s = "POLYHEDRALSURFACE Z (((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))"; + r = cu_wkt_in(s, WKT_ISO); + CU_ASSERT_STRING_EQUAL(r,s); + //printf("\nIN: %s\nOUT: %s\n",s,r); + lwfree(r); + + s = "POLYHEDRALSURFACE(((0 1 2,3 4 5,6 7,0 1 2)))"; + r = cu_wkt_in(s, WKT_ISO); + CU_ASSERT_STRING_EQUAL(r,"can not mix dimensionality in a geometry"); + //printf("\nIN: %s\nOUT: %s\n",s,r); + lwfree(r); + +} + +static void test_wkt_in_errlocation(void) +{ + LWGEOM_PARSER_RESULT p; + int rv = 0; + char *wkt = 0; + + wkt = "LINESTRING((0 0 0,1 1)"; + lwgeom_parser_result_init(&p); + rv = lwgeom_parse_wkt(&p, wkt, LW_PARSER_CHECK_ALL); + CU_ASSERT(fabs(12 - p.errlocation) < 1.5); + +// printf("errlocation %d\n", p.errlocation); +// printf("message %s\n", p.message); + + lwgeom_parser_result_free(&p); + +} + +/* +** Used by test harness to register the tests in this file. +*/ + +CU_TestInfo wkt_in_tests[] = +{ + PG_TEST(test_wkt_in_point), + PG_TEST(test_wkt_in_linestring), + PG_TEST(test_wkt_in_polygon), + PG_TEST(test_wkt_in_multipoint), + PG_TEST(test_wkt_in_multilinestring), + PG_TEST(test_wkt_in_multipolygon), + PG_TEST(test_wkt_in_collection), + PG_TEST(test_wkt_in_circularstring), + PG_TEST(test_wkt_in_compoundcurve), + PG_TEST(test_wkt_in_curvpolygon), + PG_TEST(test_wkt_in_multicurve), + PG_TEST(test_wkt_in_multisurface), + PG_TEST(test_wkt_in_tin), + PG_TEST(test_wkt_in_polyhedralsurface), + PG_TEST(test_wkt_in_errlocation), + CU_TEST_INFO_NULL +}; +CU_SuiteInfo wkt_in_suite = {"WKT In Suite", init_wkt_in_suite, clean_wkt_in_suite, wkt_in_tests}; diff -Nru postgis-1.5.3/liblwgeom/cunit/cu_libgeom.c postgis-2.0.1/liblwgeom/cunit/cu_libgeom.c --- postgis-1.5.3/liblwgeom/cunit/cu_libgeom.c 2010-02-01 17:35:55.000000000 +0000 +++ postgis-2.0.1/liblwgeom/cunit/cu_libgeom.c 2012-02-27 22:08:12.000000000 +0000 @@ -1,5 +1,5 @@ /********************************************************************** - * $Id: cu_libgeom.c 5181 2010-02-01 17:35:55Z pramsey $ + * $Id: cu_libgeom.c 9324 2012-02-27 22:08:12Z pramsey $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net @@ -10,63 +10,17 @@ * **********************************************************************/ -#include "cu_libgeom.h" +#include +#include +#include +#include "CUnit/Basic.h" -/* -** Called from test harness to register the tests in this file. -*/ -CU_pSuite register_libgeom_suite(void) -{ - CU_pSuite pSuite; - pSuite = CU_add_suite("LibGeom Suite", init_libgeom_suite, clean_libgeom_suite); - if (NULL == pSuite) - { - CU_cleanup_registry(); - return NULL; - } - - if ( - (NULL == CU_add_test(pSuite, "test_typmod_macros()", test_typmod_macros)) || - (NULL == CU_add_test(pSuite, "test_flags_macros()", test_flags_macros)) || - (NULL == CU_add_test(pSuite, "test_serialized_srid()", test_serialized_srid)) || - (NULL == CU_add_test(pSuite, "test_gserialized_from_lwgeom_size()", test_gserialized_from_lwgeom_size)) || - (NULL == CU_add_test(pSuite, "test_gbox_serialized_size()", test_gbox_serialized_size)) || - (NULL == CU_add_test(pSuite, "test_lwgeom_from_gserialized()", test_lwgeom_from_gserialized)) || - (NULL == CU_add_test(pSuite, "test_lwgeom_count_vertices()", test_lwgeom_count_vertices)) || - (NULL == CU_add_test(pSuite, "test_on_gser_lwgeom_count_vertices()", test_on_gser_lwgeom_count_vertices)) || - (NULL == CU_add_test(pSuite, "test_geometry_type_from_string()", test_geometry_type_from_string)) || - (NULL == CU_add_test(pSuite, "test_lwcollection_extract()", test_lwcollection_extract)) || - (NULL == CU_add_test(pSuite, "test_lwgeom_free()", test_lwgeom_free)) - - ) - { - CU_cleanup_registry(); - return NULL; - } - return pSuite; -} - -/* -** The suite initialization function. -** Create any re-used objects. -*/ -int init_libgeom_suite(void) -{ - return 0; -} - -/* -** The suite cleanup function. -** Frees any global objects. -*/ -int clean_libgeom_suite(void) -{ - return 0; -} +#include "liblwgeom_internal.h" +#include "cu_tester.h" -void test_typmod_macros(void) +static void test_typmod_macros(void) { - uint32 typmod = 0; + int32_t typmod = 0; int srid = 4326; int type = 6; int z = 1; @@ -76,6 +30,26 @@ rv = TYPMOD_GET_SRID(typmod); CU_ASSERT_EQUAL(rv, srid); + srid = -5005; + TYPMOD_SET_SRID(typmod,srid); + rv = TYPMOD_GET_SRID(typmod); + CU_ASSERT_EQUAL(rv, srid); + + srid = SRID_UNKNOWN; + TYPMOD_SET_SRID(typmod,srid); + rv = TYPMOD_GET_SRID(typmod); + CU_ASSERT_EQUAL(rv, srid); + + srid = 0; + TYPMOD_SET_SRID(typmod,srid); + rv = TYPMOD_GET_SRID(typmod); + CU_ASSERT_EQUAL(rv, srid); + + srid = 1; + TYPMOD_SET_SRID(typmod,srid); + rv = TYPMOD_GET_SRID(typmod); + CU_ASSERT_EQUAL(rv, srid); + TYPMOD_SET_TYPE(typmod,type); rv = TYPMOD_GET_TYPE(typmod); CU_ASSERT_EQUAL(rv,type); @@ -89,9 +63,9 @@ } -void test_flags_macros(void) +static void test_flags_macros(void) { - uchar flags = 0; + uint8_t flags = 0; CU_ASSERT_EQUAL(0, FLAGS_GET_Z(flags)); FLAGS_SET_Z(flags, 1); @@ -107,86 +81,153 @@ CU_ASSERT_EQUAL(0, FLAGS_GET_BBOX(flags)); FLAGS_SET_BBOX(flags, 1); CU_ASSERT_EQUAL(1, FLAGS_GET_BBOX(flags)); + CU_ASSERT_EQUAL(0, FLAGS_GET_READONLY(flags)); + + FLAGS_SET_READONLY(flags, 1); + CU_ASSERT_EQUAL(1, FLAGS_GET_READONLY(flags)); + FLAGS_SET_READONLY(flags, 0); + CU_ASSERT_EQUAL(0, FLAGS_GET_READONLY(flags)); CU_ASSERT_EQUAL(0, FLAGS_GET_GEODETIC(flags)); FLAGS_SET_GEODETIC(flags, 1); CU_ASSERT_EQUAL(1, FLAGS_GET_GEODETIC(flags)); - flags = 0; flags = gflags(1, 0, 1); /* z=1, m=0, geodetic=1 */ CU_ASSERT_EQUAL(1, FLAGS_GET_GEODETIC(flags)); CU_ASSERT_EQUAL(1, FLAGS_GET_Z(flags)); CU_ASSERT_EQUAL(0, FLAGS_GET_M(flags)); + CU_ASSERT_EQUAL(2, FLAGS_GET_ZM(flags)); + + flags = gflags(1, 1, 1); /* z=1, m=1, geodetic=1 */ + + CU_ASSERT_EQUAL(1, FLAGS_GET_GEODETIC(flags)); + CU_ASSERT_EQUAL(1, FLAGS_GET_Z(flags)); + CU_ASSERT_EQUAL(1, FLAGS_GET_M(flags)); + CU_ASSERT_EQUAL(3, FLAGS_GET_ZM(flags)); + + flags = gflags(0, 1, 0); /* z=0, m=1, geodetic=0 */ + + CU_ASSERT_EQUAL(0, FLAGS_GET_GEODETIC(flags)); + CU_ASSERT_EQUAL(0, FLAGS_GET_Z(flags)); + CU_ASSERT_EQUAL(1, FLAGS_GET_M(flags)); + CU_ASSERT_EQUAL(1, FLAGS_GET_ZM(flags)); } -void test_serialized_srid(void) +static void test_serialized_srid(void) { GSERIALIZED s; - uint32 srid = 4326; - uint32 rv; + int32_t srid, rv; + srid = 4326; gserialized_set_srid(&s, srid); rv = gserialized_get_srid(&s); CU_ASSERT_EQUAL(rv, srid); - srid = 0; + srid = -3005; + gserialized_set_srid(&s, srid); + rv = gserialized_get_srid(&s); + //printf("srid=%d rv=%d\n",srid,rv); + CU_ASSERT_EQUAL(rv, SRID_UNKNOWN); + + srid = SRID_UNKNOWN; gserialized_set_srid(&s, srid); rv = gserialized_get_srid(&s); CU_ASSERT_EQUAL(rv, srid); - srid = 1000000; + srid = SRID_UNKNOWN; + gserialized_set_srid(&s, srid); + rv = gserialized_get_srid(&s); + CU_ASSERT_EQUAL(rv, srid); + + srid = 100000; gserialized_set_srid(&s, srid); rv = gserialized_get_srid(&s); CU_ASSERT_EQUAL(rv, srid); } -void test_gserialized_from_lwgeom_size(void) +static void test_gserialized_from_lwgeom_size(void) { LWGEOM *g; size_t size = 0; - g = lwgeom_from_ewkt("POINT(0 0)", PARSER_CHECK_NONE); + g = lwgeom_from_wkt("POINT(0 0)", LW_PARSER_CHECK_NONE); size = gserialized_from_lwgeom_size(g); CU_ASSERT_EQUAL( size, 32 ); lwgeom_free(g); - g = lwgeom_from_ewkt("POINT(0 0 0)", PARSER_CHECK_NONE); + g = lwgeom_from_wkt("POINT(0 0 0)", LW_PARSER_CHECK_NONE); size = gserialized_from_lwgeom_size(g); CU_ASSERT_EQUAL( size, 40 ); lwgeom_free(g); - g = lwgeom_from_ewkt("MULTIPOINT(0 0 0, 1 1 1)", PARSER_CHECK_NONE); + g = lwgeom_from_wkt("MULTIPOINT(0 0 0, 1 1 1)", LW_PARSER_CHECK_NONE); size = gserialized_from_lwgeom_size(g); CU_ASSERT_EQUAL( size, 80 ); lwgeom_free(g); - g = lwgeom_from_ewkt("LINESTRING(0 0, 1 1)", PARSER_CHECK_NONE); + g = lwgeom_from_wkt("LINESTRING(0 0, 1 1)", LW_PARSER_CHECK_NONE); size = gserialized_from_lwgeom_size(g); CU_ASSERT_EQUAL( size, 48 ); lwgeom_free(g); - g = lwgeom_from_ewkt("MULTILINESTRING((0 0, 1 1),(0 0, 1 1))", PARSER_CHECK_NONE); + g = lwgeom_from_wkt("MULTILINESTRING((0 0, 1 1),(0 0, 1 1))", LW_PARSER_CHECK_NONE); size = gserialized_from_lwgeom_size(g); CU_ASSERT_EQUAL( size, 96 ); lwgeom_free(g); - g = lwgeom_from_ewkt("POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))", PARSER_CHECK_NONE); + g = lwgeom_from_wkt("POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))", LW_PARSER_CHECK_NONE); size = gserialized_from_lwgeom_size(g); CU_ASSERT_EQUAL( size, 104 ); lwgeom_free(g); - g = lwgeom_from_ewkt("POLYGON((-1 -1, -1 2, 2 2, 2 -1, -1 -1), (0 0, 0 1, 1 1, 1 0, 0 0))", PARSER_CHECK_NONE); + g = lwgeom_from_wkt("POLYGON((-1 -1, -1 2, 2 2, 2 -1, -1 -1), (0 0, 0 1, 1 1, 1 0, 0 0))", LW_PARSER_CHECK_NONE); size = gserialized_from_lwgeom_size(g); CU_ASSERT_EQUAL( size, 184 ); lwgeom_free(g); } -void test_gbox_serialized_size(void) +static void test_lwgeom_calculate_gbox(void) +{ + LWGEOM *g; + GBOX b; + + g = lwgeom_from_wkt("POINT(0 0)", LW_PARSER_CHECK_NONE); + lwgeom_calculate_gbox_cartesian(g, &b); + CU_ASSERT_DOUBLE_EQUAL(b.xmin, 0.0, 0.0000001); + lwgeom_free(g); + + /* Inf = 0x7FF0000000000000 */ + /* POINT(0 0) = 00 00000001 0000000000000000 0000000000000000 */ + /* POINT(0 Inf) = 00 00000001 0000000000000000 7FF0000000000000 */ + g = lwgeom_from_hexwkb("000000000100000000000000007FF0000000000000", LW_PARSER_CHECK_NONE); + lwgeom_calculate_gbox_cartesian(g, &b); + CU_ASSERT_DOUBLE_EQUAL(b.xmin, 0.0, 0.0000001); + CU_ASSERT(isinf(b.ymax)); + lwgeom_free(g); + + /* LINESTRING(0 0, 0 Inf) = 00 00000002 00000002 0000000000000000 7FF0000000000000 0000000000000000 0000000000000000 */ + /* Inf should show up in bbox */ + g = lwgeom_from_hexwkb("00000000020000000200000000000000007FF000000000000000000000000000000000000000000000", LW_PARSER_CHECK_NONE); + lwgeom_calculate_gbox_cartesian(g, &b); + CU_ASSERT_DOUBLE_EQUAL(b.xmin, 0.0, 0.0000001); + CU_ASSERT(isinf(b.ymax)); + lwgeom_free(g); + + /* Geometry with NaN 0101000020E8640000000000000000F8FF000000000000F8FF */ + /* NaN should show up in bbox */ + g = lwgeom_from_hexwkb("0101000020E8640000000000000000F8FF000000000000F8FF", LW_PARSER_CHECK_NONE); + lwgeom_calculate_gbox_cartesian(g, &b); + CU_ASSERT(isnan(b.ymax)); + lwgeom_free(g); + +} + +static void test_gbox_serialized_size(void) { - uchar flags = gflags(0, 0, 0); - CU_ASSERT_EQUAL(gbox_serialized_size(flags),0); + uint8_t flags = gflags(0, 0, 0); + CU_ASSERT_EQUAL(gbox_serialized_size(flags),16); FLAGS_SET_BBOX(flags, 1); CU_ASSERT_EQUAL(gbox_serialized_size(flags),16); FLAGS_SET_Z(flags, 1); @@ -201,7 +242,7 @@ -void test_lwgeom_from_gserialized(void) +static void test_lwgeom_from_gserialized(void) { LWGEOM *geom; GSERIALIZED *g; @@ -211,48 +252,72 @@ char ewkt[][512] = { + "POINT EMPTY", "POINT(0 0.2)", + "LINESTRING EMPTY", "LINESTRING(-1 -1,-1 2.5,2 2,2 -1)", + "MULTIPOINT EMPTY", "MULTIPOINT(0.9 0.9,0.9 0.9,0.9 0.9,0.9 0.9,0.9 0.9,0.9 0.9)", + "SRID=1;MULTILINESTRING EMPTY", "SRID=1;MULTILINESTRING((-1 -1,-1 2.5,2 2,2 -1),(-1 -1,-1 2.5,2 2,2 -1),(-1 -1,-1 2.5,2 2,2 -1),(-1 -1,-1 2.5,2 2,2 -1))", "SRID=1;MULTILINESTRING((-1 -1,-1 2.5,2 2,2 -1),(-1 -1,-1 2.5,2 2,2 -1),(-1 -1,-1 2.5,2 2,2 -1),(-1 -1,-1 2.5,2 2,2 -1))", "POLYGON((-1 -1,-1 2.5,2 2,2 -1,-1 -1),(0 0,0 1,1 1,1 0,0 0))", + "POLYGON EMPTY", "SRID=4326;POLYGON((-1 -1,-1 2.5,2 2,2 -1,-1 -1),(0 0,0 1,1 1,1 0,0 0))", + "SRID=4326;POLYGON EMPTY", "SRID=4326;POLYGON((-1 -1,-1 2.5,2 2,2 -1,-1 -1),(0 0,0 1,1 1,1 0,0 0),(-0.5 -0.5,-0.5 -0.4,-0.4 -0.4,-0.4 -0.5,-0.5 -0.5))", "SRID=100000;POLYGON((-1 -1 3,-1 2.5 3,2 2 3,2 -1 3,-1 -1 3),(0 0 3,0 1 3,1 1 3,1 0 3,0 0 3),(-0.5 -0.5 3,-0.5 -0.4 3,-0.4 -0.4 3,-0.4 -0.5 3,-0.5 -0.5 3))", "SRID=4326;MULTIPOLYGON(((-1 -1,-1 2.5,2 2,2 -1,-1 -1),(0 0,0 1,1 1,1 0,0 0),(-0.5 -0.5,-0.5 -0.4,-0.4 -0.4,-0.4 -0.5,-0.5 -0.5)),((-1 -1,-1 2.5,2 2,2 -1,-1 -1),(0 0,0 1,1 1,1 0,0 0),(-0.5 -0.5,-0.5 -0.4,-0.4 -0.4,-0.4 -0.5,-0.5 -0.5)))", + "SRID=4326;MULTIPOLYGON EMPTY", "SRID=4326;GEOMETRYCOLLECTION(POINT(0 1),POLYGON((-1 -1,-1 2.5,2 2,2 -1,-1 -1),(0 0,0 1,1 1,1 0,0 0)),MULTIPOLYGON(((-1 -1,-1 2.5,2 2,2 -1,-1 -1),(0 0,0 1,1 1,1 0,0 0),(-0.5 -0.5,-0.5 -0.4,-0.4 -0.4,-0.4 -0.5,-0.5 -0.5))))", + "SRID=4326;GEOMETRYCOLLECTION EMPTY", + "SRID=4326;GEOMETRYCOLLECTION(POINT EMPTY, MULTIPOLYGON EMPTY)", "MULTICURVE((5 5 1 3,3 5 2 2,3 3 3 1,0 3 1 1),CIRCULARSTRING(0 0 0 0,0.26794 1 3 -2,0.5857864 1.414213 1 2))", "MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)),((7 8,10 10,6 14,4 11,7 8)))", + "MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING EMPTY))", }; for ( i = 0; i < 13; i++ ) { + LWGEOM* geom2; + in_ewkt = ewkt[i]; - geom = lwgeom_from_ewkt(in_ewkt, PARSER_CHECK_NONE); + geom = lwgeom_from_wkt(in_ewkt, LW_PARSER_CHECK_NONE); + lwgeom_add_bbox(geom); + if ( geom->bbox ) gbox_float_round(geom->bbox); g = gserialized_from_lwgeom(geom, 0, 0); - lwgeom_free(geom); - geom = lwgeom_from_gserialized(g); - out_ewkt = lwgeom_to_ewkt(geom, PARSER_CHECK_NONE); - //printf("\n in = %s\nout = %s\n", in_ewkt, out_ewkt); + + geom2 = lwgeom_from_gserialized(g); + out_ewkt = lwgeom_to_ewkt(geom2); + + /* printf("\n in = %s\nout = %s\n", in_ewkt, out_ewkt); */ CU_ASSERT_STRING_EQUAL(in_ewkt, out_ewkt); - lwgeom_release(geom); + + /* either both or none of the bboxes are null */ + CU_ASSERT( (geom->bbox != NULL) || (geom2->bbox == NULL) ); + + /* either both are null or they are the same */ + CU_ASSERT(geom->bbox == NULL || gbox_same(geom->bbox, geom2->bbox)); + + lwgeom_free(geom); + lwgeom_free(geom2); lwfree(g); lwfree(out_ewkt); } } -void test_geometry_type_from_string(void) +static void test_geometry_type_from_string(void) { int rv; - int type = 0, z = 0, m = 0; + uint8_t type = 0; + int z = 0, m = 0; char *str; str = " POINTZ"; rv = geometry_type_from_string(str, &type, &z, &m); //printf("\n in type: %s\nout type: %d\n out z: %d\n out m: %d", str, type, z, m); - CU_ASSERT_EQUAL(rv, G_SUCCESS); + CU_ASSERT_EQUAL(rv, LW_SUCCESS); CU_ASSERT_EQUAL(type, POINTTYPE); CU_ASSERT_EQUAL(z, 1); CU_ASSERT_EQUAL(m, 0); @@ -260,7 +325,7 @@ str = "LINESTRINGM "; rv = geometry_type_from_string(str, &type, &z, &m); //printf("\n in type: %s\nout type: %d\n out z: %d\n out m: %d", str, type, z, m); - CU_ASSERT_EQUAL(rv, G_SUCCESS); + CU_ASSERT_EQUAL(rv, LW_SUCCESS); CU_ASSERT_EQUAL(type, LINETYPE); CU_ASSERT_EQUAL(z, 0); CU_ASSERT_EQUAL(m, 1); @@ -268,7 +333,7 @@ str = "MULTIPOLYGONZM"; rv = geometry_type_from_string(str, &type, &z, &m); //printf("\n in type: %s\nout type: %d\n out z: %d\n out m: %d", str, type, z, m); - CU_ASSERT_EQUAL(rv, G_SUCCESS); + CU_ASSERT_EQUAL(rv, LW_SUCCESS); CU_ASSERT_EQUAL(type, MULTIPOLYGONTYPE); CU_ASSERT_EQUAL(z, 1); CU_ASSERT_EQUAL(m, 1); @@ -276,7 +341,7 @@ str = " GEOMETRYCOLLECTIONZM "; rv = geometry_type_from_string(str, &type, &z, &m); //printf("\n in type: %s\nout type: %d\n out z: %d\n out m: %d", str, type, z, m); - CU_ASSERT_EQUAL(rv, G_SUCCESS); + CU_ASSERT_EQUAL(rv, LW_SUCCESS); CU_ASSERT_EQUAL(type, COLLECTIONTYPE); CU_ASSERT_EQUAL(z, 1); CU_ASSERT_EQUAL(m, 1); @@ -284,90 +349,554 @@ str = " GEOMERYCOLLECTIONZM "; rv = geometry_type_from_string(str, &type, &z, &m); //printf("\n in type: %s\nout type: %d\n out z: %d\n out m: %d", str, type, z, m); - CU_ASSERT_EQUAL(rv, G_FAILURE); + CU_ASSERT_EQUAL(rv, LW_FAILURE); } -void test_lwgeom_count_vertices(void) +static void test_lwgeom_count_vertices(void) { LWGEOM *geom; - geom = lwgeom_from_ewkt("MULTIPOINT(-1 -1,-1 2.5,2 2,2 -1)", PARSER_CHECK_NONE); + geom = lwgeom_from_wkt("MULTIPOINT(-1 -1,-1 2.5,2 2,2 -1)", LW_PARSER_CHECK_NONE); CU_ASSERT_EQUAL(lwgeom_count_vertices(geom),4); lwgeom_free(geom); - geom = lwgeom_from_ewkt("SRID=1;MULTILINESTRING((-1 -131,-1 2.5,2 2,2 -1),(-1 -1,-1 2.5,2 2,2 -1),(-1 -1,-1 2.5,2 2,2 -1),(-1 -1,-1 2.5,2 2,2 -1))", PARSER_CHECK_NONE); + geom = lwgeom_from_wkt("SRID=1;MULTILINESTRING((-1 -131,-1 2.5,2 2,2 -1),(-1 -1,-1 2.5,2 2,2 -1),(-1 -1,-1 2.5,2 2,2 -1),(-1 -1,-1 2.5,2 2,2 -1))", LW_PARSER_CHECK_NONE); CU_ASSERT_EQUAL(lwgeom_count_vertices(geom),16); lwgeom_free(geom); - geom = lwgeom_from_ewkt("SRID=4326;MULTIPOLYGON(((-1 -1,-1 2.5,211 2,2 -1,-1 -1),(0 0,0 1,1 1,1 0,0 0),(-0.5 -0.5,-0.5 -0.4,-0.4 -0.4,-0.4 -0.5,-0.5 -0.5)),((-1 -1,-1 2.5,2 2,2 -1,-1 -1),(0 0,0 1,1 1,1 0,0 0),(-0.5 -0.5,-0.5 -0.4,-0.4 -0.4,-0.4 -0.5,-0.5 -0.5)))", PARSER_CHECK_NONE); + geom = lwgeom_from_wkt("SRID=4326;MULTIPOLYGON(((-1 -1,-1 2.5,211 2,2 -1,-1 -1),(0 0,0 1,1 1,1 0,0 0),(-0.5 -0.5,-0.5 -0.4,-0.4 -0.4,-0.4 -0.5,-0.5 -0.5)),((-1 -1,-1 2.5,2 2,2 -1,-1 -1),(0 0,0 1,1 1,1 0,0 0),(-0.5 -0.5,-0.5 -0.4,-0.4 -0.4,-0.4 -0.5,-0.5 -0.5)))", LW_PARSER_CHECK_NONE); CU_ASSERT_EQUAL(lwgeom_count_vertices(geom),30); lwgeom_free(geom); } -void test_on_gser_lwgeom_count_vertices(void) +static void test_on_gser_lwgeom_count_vertices(void) { LWGEOM *lwgeom; GSERIALIZED *g_ser1; size_t ret_size; - lwgeom = lwgeom_from_ewkt("MULTIPOINT(-1 -1,-1 2.5,2 2,2 -1,1 1,2 2,4 5)", PARSER_CHECK_NONE); + lwgeom = lwgeom_from_wkt("MULTIPOINT(-1 -1,-1 2.5,2 2,2 -1,1 1,2 2,4 5)", LW_PARSER_CHECK_NONE); CU_ASSERT_EQUAL(lwgeom_count_vertices(lwgeom),7); g_ser1 = gserialized_from_lwgeom(lwgeom, 1, &ret_size); - FLAGS_SET_GEODETIC(g_ser1->flags, 1); lwgeom_free(lwgeom); lwgeom = lwgeom_from_gserialized(g_ser1); CU_ASSERT_EQUAL(lwgeom_count_vertices(lwgeom),7); - lwgeom_release(lwgeom); + lwgeom_free(lwgeom); lwgeom = lwgeom_from_gserialized(g_ser1); CU_ASSERT_EQUAL(lwgeom_count_vertices(lwgeom),7); - lwgeom_release(lwgeom); + lwgeom_free(lwgeom); lwfree(g_ser1); } -void test_lwcollection_extract(void) +static void test_lwcollection_extract(void) { LWGEOM *geom; LWCOLLECTION *col; - geom = lwgeom_from_ewkt("GEOMETRYCOLLECTION(POINT(0 0))", PARSER_CHECK_NONE); + geom = lwgeom_from_wkt("GEOMETRYCOLLECTION(POINT(0 0))", LW_PARSER_CHECK_NONE); + col = lwcollection_extract((LWCOLLECTION*)geom, 1); - CU_ASSERT_EQUAL(TYPE_GETTYPE(col->type), MULTIPOINTTYPE); + CU_ASSERT_EQUAL(col->type, MULTIPOINTTYPE); + lwcollection_free(col); + + col = lwcollection_extract((LWCOLLECTION*)geom, 2); + CU_ASSERT_EQUAL(col->type, MULTILINETYPE); + lwcollection_free(col); + + col = lwcollection_extract((LWCOLLECTION*)geom, 3); + CU_ASSERT_EQUAL(col->type, MULTIPOLYGONTYPE); + lwcollection_free(col); - lwfree(col); lwgeom_free(geom); + geom = lwgeom_from_wkt("GEOMETRYCOLLECTION EMPTY", LW_PARSER_CHECK_NONE); + + col = lwcollection_extract((LWCOLLECTION*)geom, 1); + CU_ASSERT_EQUAL(col->type, MULTIPOINTTYPE); + lwcollection_free(col); + + col = lwcollection_extract((LWCOLLECTION*)geom, 2); + CU_ASSERT_EQUAL(col->type, MULTILINETYPE); + lwcollection_free(col); + + col = lwcollection_extract((LWCOLLECTION*)geom, 3); + CU_ASSERT_EQUAL(col->type, MULTIPOLYGONTYPE); + lwcollection_free(col); + + lwgeom_free(geom); } -void test_lwgeom_free(void) +static void test_lwgeom_free(void) { LWGEOM *geom; /* Empty geometries don't seem to free properly (#370) */ - geom = lwgeom_from_ewkt("GEOMETRYCOLLECTION EMPTY", PARSER_CHECK_NONE); - CU_ASSERT_EQUAL(TYPE_GETTYPE(geom->type), COLLECTIONTYPE); + geom = lwgeom_from_wkt("GEOMETRYCOLLECTION EMPTY", LW_PARSER_CHECK_NONE); + CU_ASSERT_EQUAL(geom->type, COLLECTIONTYPE); lwgeom_free(geom); /* Empty geometries don't seem to free properly (#370) */ - geom = lwgeom_from_ewkt("POLYGON EMPTY", PARSER_CHECK_NONE); - CU_ASSERT_EQUAL(TYPE_GETTYPE(geom->type), COLLECTIONTYPE); + geom = lwgeom_from_wkt("POLYGON EMPTY", LW_PARSER_CHECK_NONE); + CU_ASSERT_EQUAL(geom->type, POLYGONTYPE); lwgeom_free(geom); /* Empty geometries don't seem to free properly (#370) */ - geom = lwgeom_from_ewkt("LINESTRING EMPTY", PARSER_CHECK_NONE); - CU_ASSERT_EQUAL(TYPE_GETTYPE(geom->type), COLLECTIONTYPE); + geom = lwgeom_from_wkt("LINESTRING EMPTY", LW_PARSER_CHECK_NONE); + CU_ASSERT_EQUAL(geom->type, LINETYPE); lwgeom_free(geom); /* Empty geometries don't seem to free properly (#370) */ - geom = lwgeom_from_ewkt("POINT EMPTY", PARSER_CHECK_NONE); - CU_ASSERT_EQUAL(TYPE_GETTYPE(geom->type), COLLECTIONTYPE); + geom = lwgeom_from_wkt("POINT EMPTY", LW_PARSER_CHECK_NONE); + CU_ASSERT_EQUAL(geom->type, POINTTYPE); + lwgeom_free(geom); + +} + +static void do_lwgeom_flip_coordinates(char *in, char *out) +{ + LWGEOM *g,*h; + char * t; + + g = lwgeom_from_wkt(in, LW_PARSER_CHECK_NONE); + h = lwgeom_flip_coordinates(g); + + t = lwgeom_to_wkt(g, WKT_EXTENDED, 8, NULL); + if (t == NULL) fprintf(stderr, "In:%s", in); + if (strcmp(t, out)) + fprintf(stderr, "\nIn: %s\nOut: %s\nTheo: %s\n", in, t, out); + + CU_ASSERT_STRING_EQUAL(t, out) + + lwgeom_free(g); + lwfree(t); +} + +static void test_lwgeom_flip_coordinates(void) +{ + /* + * 2D geometries types + */ + do_lwgeom_flip_coordinates( + "POINT(1 2)", + "POINT(2 1)" + ); + + do_lwgeom_flip_coordinates( + "LINESTRING(1 2,3 4)", + "LINESTRING(2 1,4 3)" + ); + + do_lwgeom_flip_coordinates( + "POLYGON((1 2,3 4,5 6,1 2))", + "POLYGON((2 1,4 3,6 5,2 1))" + ); + + do_lwgeom_flip_coordinates( + "POLYGON((1 2,3 4,5 6,1 2),(7 8,9 10,11 12,7 8))", + "POLYGON((2 1,4 3,6 5,2 1),(8 7,10 9,12 11,8 7))" + ); + + do_lwgeom_flip_coordinates( + "MULTIPOINT(1 2,3 4)", + "MULTIPOINT(2 1,4 3)" + ); + + do_lwgeom_flip_coordinates( + "MULTILINESTRING((1 2,3 4),(5 6,7 8))", + "MULTILINESTRING((2 1,4 3),(6 5,8 7))" + ); + + do_lwgeom_flip_coordinates( + "MULTIPOLYGON(((1 2,3 4,5 6,7 8)),((9 10,11 12,13 14,10 9)))", + "MULTIPOLYGON(((2 1,4 3,6 5,8 7)),((10 9,12 11,14 13,9 10)))" + ); + + do_lwgeom_flip_coordinates( + "GEOMETRYCOLLECTION EMPTY", + "GEOMETRYCOLLECTION EMPTY" + ); + + do_lwgeom_flip_coordinates( + "GEOMETRYCOLLECTION(POINT(1 2),LINESTRING(3 4,5 6))", + "GEOMETRYCOLLECTION(POINT(2 1),LINESTRING(4 3,6 5))" + ); + + do_lwgeom_flip_coordinates( + "GEOMETRYCOLLECTION(POINT(1 2),GEOMETRYCOLLECTION(LINESTRING(3 4,5 6)))", + "GEOMETRYCOLLECTION(POINT(2 1),GEOMETRYCOLLECTION(LINESTRING(4 3,6 5)))" + ); + + do_lwgeom_flip_coordinates( + "CIRCULARSTRING(-2 0,0 2,2 0,0 2,2 4)", + "CIRCULARSTRING(0 -2,2 0,0 2,2 0,4 2)" + ); + + do_lwgeom_flip_coordinates( + "COMPOUNDCURVE(CIRCULARSTRING(0 1,1 1,1 0),(1 0,0 1))", + "COMPOUNDCURVE(CIRCULARSTRING(1 0,1 1,0 1),(0 1,1 0))" + ); + + do_lwgeom_flip_coordinates( + "CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0))", + "CURVEPOLYGON(CIRCULARSTRING(0 -2,-1 -1,0 0,-1 1,0 2,2 0,0 -2),(0 -1,0.5 0,0 1,1 0,0 -1))" + ); + + do_lwgeom_flip_coordinates( + "MULTICURVE((5 5,3 5,3 3,0 3),CIRCULARSTRING(0 0,2 1,2 3))", + "MULTICURVE((5 5,5 3,3 3,3 0),CIRCULARSTRING(0 0,1 2,3 2))" + ); + + do_lwgeom_flip_coordinates( + "MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)),((7 8,10 10,6 14,4 11,7 8)))", + "MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(0 -2,-1 -1,0 0,-1 1,0 2,2 0,0 -2),(0 -1,0.5 0,0 1,1 0,0 -1)),((8 7,10 10,14 6,11 4,8 7)))" + ); + + + /* + * Ndims + */ + + do_lwgeom_flip_coordinates( + "POINT(1 2 3)", + "POINT(2 1 3)" + ); + + do_lwgeom_flip_coordinates( + "POINTM(1 2 3)", + "POINTM(2 1 3)" + ); + + do_lwgeom_flip_coordinates( + "POINT(1 2 3 4)", + "POINT(2 1 3 4)" + ); + + + /* + * Srid + */ + + do_lwgeom_flip_coordinates( + "SRID=4326;POINT(1 2)", + "SRID=4326;POINT(2 1)" + ); + + do_lwgeom_flip_coordinates( + "SRID=0;POINT(1 2)", + "POINT(2 1)" + ); +} + +static void test_f2d(void) +{ + double d = 1000000.123456789123456789; + float f; + double e; + + f = next_float_down(d); + d = next_float_down(f); + CU_ASSERT_DOUBLE_EQUAL(f,d, 0.0000001); + + e = (double)f; + CU_ASSERT_DOUBLE_EQUAL(f,e, 0.0000001); + + f = next_float_down(d); + d = next_float_down(f); + CU_ASSERT_DOUBLE_EQUAL(f,d, 0.0000001); + + f = next_float_up(d); + d = next_float_up(f); + CU_ASSERT_DOUBLE_EQUAL(f,d, 0.0000001); + + f = next_float_up(d); + d = next_float_up(f); + CU_ASSERT_DOUBLE_EQUAL(f,d, 0.0000001); +} + +/* + * This is a test for memory leaks, can't really test + * w/out checking with a leak detector (ie: valgrind) + * + * See http://trac.osgeo.org/postgis/ticket/1102 + */ +static void test_lwgeom_clone(void) +{ + int i; + + char *ewkt[] = + { + "POINT(0 0.2)", + "LINESTRING(-1 -1,-1 2.5,2 2,2 -1)", + "MULTIPOINT(0.9 0.9,0.9 0.9,0.9 0.9,0.9 0.9,0.9 0.9,0.9 0.9)", + "SRID=1;MULTILINESTRING((-1 -1,-1 2.5,2 2,2 -1),(-1 -1,-1 2.5,2 2,2 -1),(-1 -1,-1 2.5,2 2,2 -1),(-1 -1,-1 2.5,2 2,2 -1))", + "SRID=1;MULTILINESTRING((-1 -1,-1 2.5,2 2,2 -1),(-1 -1,-1 2.5,2 2,2 -1),(-1 -1,-1 2.5,2 2,2 -1),(-1 -1,-1 2.5,2 2,2 -1))", + "POLYGON((-1 -1,-1 2.5,2 2,2 -1,-1 -1),(0 0,0 1,1 1,1 0,0 0))", + "SRID=4326;POLYGON((-1 -1,-1 2.5,2 2,2 -1,-1 -1),(0 0,0 1,1 1,1 0,0 0))", + "SRID=4326;POLYGON((-1 -1,-1 2.5,2 2,2 -1,-1 -1),(0 0,0 1,1 1,1 0,0 0),(-0.5 -0.5,-0.5 -0.4,-0.4 -0.4,-0.4 -0.5,-0.5 -0.5))", + "SRID=100000;POLYGON((-1 -1 3,-1 2.5 3,2 2 3,2 -1 3,-1 -1 3),(0 0 3,0 1 3,1 1 3,1 0 3,0 0 3),(-0.5 -0.5 3,-0.5 -0.4 3,-0.4 -0.4 3,-0.4 -0.5 3,-0.5 -0.5 3))", + "SRID=4326;MULTIPOLYGON(((-1 -1,-1 2.5,2 2,2 -1,-1 -1),(0 0,0 1,1 1,1 0,0 0),(-0.5 -0.5,-0.5 -0.4,-0.4 -0.4,-0.4 -0.5,-0.5 -0.5)),((-1 -1,-1 2.5,2 2,2 -1,-1 -1),(0 0,0 1,1 1,1 0,0 0),(-0.5 -0.5,-0.5 -0.4,-0.4 -0.4,-0.4 -0.5,-0.5 -0.5)))", + "SRID=4326;GEOMETRYCOLLECTION(POINT(0 1),POLYGON((-1 -1,-1 2.5,2 2,2 -1,-1 -1),(0 0,0 1,1 1,1 0,0 0)),MULTIPOLYGON(((-1 -1,-1 2.5,2 2,2 -1,-1 -1),(0 0,0 1,1 1,1 0,0 0),(-0.5 -0.5,-0.5 -0.4,-0.4 -0.4,-0.4 -0.5,-0.5 -0.5))))", + "MULTICURVE((5 5 1 3,3 5 2 2,3 3 3 1,0 3 1 1),CIRCULARSTRING(0 0 0 0,0.26794 1 3 -2,0.5857864 1.414213 1 2))", + "MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)),((7 8,10 10,6 14,4 11,7 8)))", + "TIN(((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))" + }; + + + for ( i = 0; i < (sizeof ewkt/sizeof(char *)); i++ ) + { + LWGEOM *geom, *cloned; + char *in_ewkt; + char *out_ewkt; + + in_ewkt = ewkt[i]; + geom = lwgeom_from_wkt(in_ewkt, LW_PARSER_CHECK_NONE); + cloned = lwgeom_clone(geom); + out_ewkt = lwgeom_to_ewkt(cloned); + if (strcmp(in_ewkt, out_ewkt)) + fprintf(stderr, "\nExp: %s\nObt: %s\n", in_ewkt, out_ewkt); + CU_ASSERT_STRING_EQUAL(in_ewkt, out_ewkt); + lwfree(out_ewkt); + lwgeom_free(cloned); + lwgeom_free(geom); + } + + +} + +/* + * Test lwgeom_force_clockwise + */ +static void test_lwgeom_force_clockwise(void) +{ + LWGEOM *geom; + char *in_ewkt, *out_ewkt; + + /* counterclockwise, must be reversed */ + geom = lwgeom_from_wkt("POLYGON((0 0, 10 0, 10 10, 0 10, 0 0))", LW_PARSER_CHECK_NONE); + lwgeom_force_clockwise(geom); + in_ewkt = "POLYGON((0 0,0 10,10 10,10 0,0 0))"; + out_ewkt = lwgeom_to_ewkt(geom); + if (strcmp(in_ewkt, out_ewkt)) + fprintf(stderr, "\nExp: %s\nObt: %s\n", in_ewkt, out_ewkt); + CU_ASSERT_STRING_EQUAL(in_ewkt, out_ewkt); + lwfree(out_ewkt); + lwgeom_free(geom); + + /* clockwise, fine as is */ + geom = lwgeom_from_wkt("POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))", LW_PARSER_CHECK_NONE); + lwgeom_force_clockwise(geom); + in_ewkt = "POLYGON((0 0,0 10,10 10,10 0,0 0))"; + out_ewkt = lwgeom_to_ewkt(geom); + if (strcmp(in_ewkt, out_ewkt)) + fprintf(stderr, "\nExp: %s\nObt: %s\n", in_ewkt, out_ewkt); + CU_ASSERT_STRING_EQUAL(in_ewkt, out_ewkt); + lwfree(out_ewkt); + lwgeom_free(geom); + + /* counterclockwise shell (must be reversed), mixed-wise holes */ + geom = lwgeom_from_wkt("POLYGON((0 0,10 0,10 10,0 10,0 0),(2 2,2 4,4 2,2 2),(6 2,8 2,8 4,6 2))", LW_PARSER_CHECK_NONE); + lwgeom_force_clockwise(geom); + in_ewkt = "POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,4 2,2 4,2 2),(6 2,8 2,8 4,6 2))"; + out_ewkt = lwgeom_to_ewkt(geom); + if (strcmp(in_ewkt, out_ewkt)) + fprintf(stderr, "\nExp: %s\nObt: %s\n", in_ewkt, out_ewkt); + CU_ASSERT_STRING_EQUAL(in_ewkt, out_ewkt); + lwfree(out_ewkt); + lwgeom_free(geom); + + /* clockwise shell (fine), mixed-wise holes */ + geom = lwgeom_from_wkt("POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,4 2,2 4,2 2),(6 2,8 4,8 2,6 2))", LW_PARSER_CHECK_NONE); + lwgeom_force_clockwise(geom); + in_ewkt = "POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,4 2,2 4,2 2),(6 2,8 2,8 4,6 2))"; + out_ewkt = lwgeom_to_ewkt(geom); + if (strcmp(in_ewkt, out_ewkt)) + fprintf(stderr, "\nExp: %s\nObt: %s\n", in_ewkt, out_ewkt); + CU_ASSERT_STRING_EQUAL(in_ewkt, out_ewkt); + lwfree(out_ewkt); + lwgeom_free(geom); + + /* clockwise narrow ring, fine as-is */ + /* NOTE: this is a narrow ring, see ticket #1302 */ + in_ewkt = "0103000000010000000500000000917E9BA468294100917E9B8AEA2841C976BE1FA4682941C976BE9F8AEA2841B39ABE1FA46829415ACCC29F8AEA284137894120A4682941C976BE9F8AEA284100917E9BA468294100917E9B8AEA2841"; + geom = lwgeom_from_hexwkb(in_ewkt, LW_PARSER_CHECK_NONE); + lwgeom_force_clockwise(geom); + out_ewkt = lwgeom_to_hexwkb(geom, WKB_ISO, NULL); + if (strcmp(in_ewkt, out_ewkt)) + fprintf(stderr, "\nExp: %s\nObt: %s\n", in_ewkt, out_ewkt); + CU_ASSERT_STRING_EQUAL(in_ewkt, out_ewkt); + lwfree(out_ewkt); + lwgeom_free(geom); +} + +/* + * Test lwgeom_is_empty + */ +static void test_lwgeom_is_empty(void) +{ + LWGEOM *geom; + + geom = lwgeom_from_wkt("POLYGON((0 0, 10 0, 10 10, 0 10, 0 0))", LW_PARSER_CHECK_NONE); + CU_ASSERT( !lwgeom_is_empty(geom) ); + lwgeom_free(geom); + + geom = lwgeom_from_wkt("POINT EMPTY", LW_PARSER_CHECK_NONE); + CU_ASSERT( lwgeom_is_empty(geom) ); + lwgeom_free(geom); + + geom = lwgeom_from_wkt("LINESTRING EMPTY", LW_PARSER_CHECK_NONE); + CU_ASSERT( lwgeom_is_empty(geom) ); + lwgeom_free(geom); + + geom = lwgeom_from_wkt("POLYGON EMPTY", LW_PARSER_CHECK_NONE); + CU_ASSERT( lwgeom_is_empty(geom) ); + lwgeom_free(geom); + + geom = lwgeom_from_wkt("MULTIPOINT EMPTY", LW_PARSER_CHECK_NONE); + CU_ASSERT( lwgeom_is_empty(geom) ); + lwgeom_free(geom); + + geom = lwgeom_from_wkt("MULTILINESTRING EMPTY", LW_PARSER_CHECK_NONE); + CU_ASSERT( lwgeom_is_empty(geom) ); + lwgeom_free(geom); + + geom = lwgeom_from_wkt("MULTIPOLYGON EMPTY", LW_PARSER_CHECK_NONE); + CU_ASSERT( lwgeom_is_empty(geom) ); + lwgeom_free(geom); + + geom = lwgeom_from_wkt("GEOMETRYCOLLECTION(GEOMETRYCOLLECTION EMPTY, POINT EMPTY, LINESTRING EMPTY, POLYGON EMPTY, MULTIPOINT EMPTY, MULTILINESTRING EMPTY, MULTIPOLYGON EMPTY, GEOMETRYCOLLECTION(MULTIPOLYGON EMPTY))", LW_PARSER_CHECK_NONE); + CU_ASSERT( lwgeom_is_empty(geom) ); lwgeom_free(geom); } + +/* + * Test lwgeom_same + */ +static void test_lwgeom_same(void) +{ + LWGEOM *geom, *geom2; + + geom = lwgeom_from_wkt("POLYGON((0 0, 10 0, 10 10, 0 10, 0 0))", LW_PARSER_CHECK_NONE); + CU_ASSERT( lwgeom_same(geom, geom) ); + lwgeom_add_bbox(geom); + CU_ASSERT( lwgeom_same(geom, geom) ); + lwgeom_free(geom); + + geom = lwgeom_from_wkt("MULTIPOLYGON(((0 0, 10 0, 10 10, 0 10, 0 0)))", LW_PARSER_CHECK_NONE); + CU_ASSERT( lwgeom_same(geom, geom) ); + lwgeom_add_bbox(geom); + CU_ASSERT( lwgeom_same(geom, geom) ); + lwgeom_free(geom); + + geom = lwgeom_from_wkt("LINESTRING(0 0, 2 0)", LW_PARSER_CHECK_NONE); + CU_ASSERT( lwgeom_same(geom, geom) ); + lwgeom_add_bbox(geom); + CU_ASSERT( lwgeom_same(geom, geom) ); + lwgeom_free(geom); + + geom = lwgeom_from_wkt("MULTILINESTRING((0 0, 2 0))", LW_PARSER_CHECK_NONE); + CU_ASSERT( lwgeom_same(geom, geom) ); + lwgeom_add_bbox(geom); + CU_ASSERT( lwgeom_same(geom, geom) ); + lwgeom_free(geom); + + geom = lwgeom_from_wkt("POINT(0 0)", LW_PARSER_CHECK_NONE); + CU_ASSERT( lwgeom_same(geom, geom) ); + lwgeom_add_bbox(geom); + CU_ASSERT( lwgeom_same(geom, geom) ); + lwgeom_free(geom); + + geom = lwgeom_from_wkt("MULTIPOINT((0 0),(4 5))", LW_PARSER_CHECK_NONE); + CU_ASSERT( lwgeom_same(geom, geom) ); + lwgeom_add_bbox(geom); + CU_ASSERT( lwgeom_same(geom, geom) ); + lwgeom_free(geom); + + geom = lwgeom_from_wkt("POINT EMPTY", LW_PARSER_CHECK_NONE); + CU_ASSERT( lwgeom_same(geom, geom) ); + lwgeom_add_bbox(geom); + CU_ASSERT( lwgeom_same(geom, geom) ); + lwgeom_free(geom); + + geom = lwgeom_from_wkt("LINESTRING EMPTY", LW_PARSER_CHECK_NONE); + CU_ASSERT( lwgeom_same(geom, geom) ); + lwgeom_add_bbox(geom); + CU_ASSERT( lwgeom_same(geom, geom) ); + lwgeom_free(geom); + + geom = lwgeom_from_wkt("POLYGON EMPTY", LW_PARSER_CHECK_NONE); + CU_ASSERT( lwgeom_same(geom, geom) ); + lwgeom_free(geom); + + geom = lwgeom_from_wkt("MULTIPOINT EMPTY", LW_PARSER_CHECK_NONE); + CU_ASSERT( lwgeom_same(geom, geom) ); + lwgeom_free(geom); + + geom = lwgeom_from_wkt("MULTILINESTRING EMPTY", LW_PARSER_CHECK_NONE); + CU_ASSERT( lwgeom_same(geom, geom) ); + lwgeom_free(geom); + + geom = lwgeom_from_wkt("MULTIPOLYGON EMPTY", LW_PARSER_CHECK_NONE); + CU_ASSERT( lwgeom_same(geom, geom) ); + lwgeom_free(geom); + + geom = lwgeom_from_wkt("GEOMETRYCOLLECTION(GEOMETRYCOLLECTION EMPTY, POINT EMPTY, LINESTRING EMPTY, POLYGON EMPTY, MULTIPOINT EMPTY, MULTILINESTRING EMPTY, MULTIPOLYGON EMPTY, GEOMETRYCOLLECTION(MULTIPOLYGON EMPTY))", LW_PARSER_CHECK_NONE); + CU_ASSERT( lwgeom_same(geom, geom) ); + lwgeom_free(geom); + + geom = lwgeom_from_wkt("POLYGON((0 0, 10 0, 10 10, 0 10, 0 0))", LW_PARSER_CHECK_NONE); + geom2 = lwgeom_from_wkt("GEOMETRYCOLLECTION(GEOMETRYCOLLECTION EMPTY, POINT EMPTY, LINESTRING EMPTY, POLYGON EMPTY, MULTIPOINT EMPTY, MULTILINESTRING EMPTY, MULTIPOLYGON EMPTY, GEOMETRYCOLLECTION(MULTIPOLYGON EMPTY))", LW_PARSER_CHECK_NONE); + CU_ASSERT( ! lwgeom_same(geom, geom2) ); + lwgeom_free(geom); + lwgeom_free(geom2); + + geom = lwgeom_from_wkt("POINT(0 0)", LW_PARSER_CHECK_NONE); + geom2 = lwgeom_from_wkt("MULTIPOINT((0 0))", LW_PARSER_CHECK_NONE); + CU_ASSERT( ! lwgeom_same(geom, geom2) ); + lwgeom_free(geom); + lwgeom_free(geom2); + + geom = lwgeom_from_wkt("POINT EMPTY", LW_PARSER_CHECK_NONE); + geom2 = lwgeom_from_wkt("POINT Z EMPTY", LW_PARSER_CHECK_NONE); + CU_ASSERT( ! lwgeom_same(geom, geom2) ); + lwgeom_free(geom); + lwgeom_free(geom2); + +} + + +/* +** Used by test harness to register the tests in this file. +*/ +CU_TestInfo libgeom_tests[] = +{ + PG_TEST(test_typmod_macros), + PG_TEST(test_flags_macros), + PG_TEST(test_serialized_srid), + PG_TEST(test_gserialized_from_lwgeom_size), + PG_TEST(test_gbox_serialized_size), + PG_TEST(test_lwgeom_from_gserialized), + PG_TEST(test_lwgeom_count_vertices), + PG_TEST(test_on_gser_lwgeom_count_vertices), + PG_TEST(test_geometry_type_from_string), + PG_TEST(test_lwcollection_extract), + PG_TEST(test_lwgeom_free), + PG_TEST(test_lwgeom_flip_coordinates), + PG_TEST(test_f2d), + PG_TEST(test_lwgeom_clone), + PG_TEST(test_lwgeom_force_clockwise), + PG_TEST(test_lwgeom_calculate_gbox), + PG_TEST(test_lwgeom_is_empty), + PG_TEST(test_lwgeom_same), + CU_TEST_INFO_NULL +}; +CU_SuiteInfo libgeom_suite = {"libgeom", NULL, NULL, libgeom_tests}; + diff -Nru postgis-1.5.3/liblwgeom/cunit/cu_libgeom.h postgis-2.0.1/liblwgeom/cunit/cu_libgeom.h --- postgis-1.5.3/liblwgeom/cunit/cu_libgeom.h 2010-01-04 17:55:14.000000000 +0000 +++ postgis-2.0.1/liblwgeom/cunit/cu_libgeom.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -/********************************************************************** - * $Id: cu_libgeom.h 5099 2010-01-04 17:55:14Z pramsey $ - * - * PostGIS - Spatial Types for PostgreSQL - * http://postgis.refractions.net - * Copyright 2009 Paul Ramsey - * - * This is free software; you can redistribute and/or modify it under - * the terms of the GNU General Public Licence. See the COPYING file. - * - **********************************************************************/ - -#include -#include -#include -#include "CUnit/Basic.h" - -#include "libgeom.h" -#include "cu_tester.h" - -/*********************************************************************** -** For new geometry library libgeom.h -*/ - - -/* Test functions */ -void test_typmod_macros(void); -void test_flags_macros(void); -void test_serialized_srid(void); -void test_gserialized_from_lwgeom_size(void); -void test_lwgeom_from_gserialized(void); -void test_geometry_type_from_string(void); -void test_gbox_serialized_size(void); -void test_lwcollection_extract(void); -void test_lwgeom_count_vertices(void); -void test_on_gser_lwgeom_count_vertices(void); -void test_lwgeom_free(void); diff -Nru postgis-1.5.3/liblwgeom/cunit/cu_measures.c postgis-2.0.1/liblwgeom/cunit/cu_measures.c --- postgis-1.5.3/liblwgeom/cunit/cu_measures.c 2010-02-01 17:35:55.000000000 +0000 +++ postgis-2.0.1/liblwgeom/cunit/cu_measures.c 2012-06-20 03:02:07.000000000 +0000 @@ -1,5 +1,5 @@ /********************************************************************** - * $Id: cu_measures.c 5181 2010-02-01 17:35:55Z pramsey $ + * $Id: cu_measures.c 9959 2012-06-20 03:02:07Z pramsey $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net @@ -10,149 +10,96 @@ * **********************************************************************/ -#include "cu_measures.h" +#include +#include +#include +#include "CUnit/Basic.h" + +#include "liblwgeom_internal.h" +#include "cu_tester.h" +#include "measures.h" +#include "lwtree.h" -/* -** Called from test harness to register the tests in this file. -*/ -CU_pSuite register_measures_suite(void) +static void do_test_mindistance2d_tolerance(char *in1, char *in2, double expected_res) { - CU_pSuite pSuite; - pSuite = CU_add_suite("PostGIS Measures Suite", init_measures_suite, clean_measures_suite); - if (NULL == pSuite) - { - CU_cleanup_registry(); - return NULL; - } - - if ( - (NULL == CU_add_test(pSuite, "test_mindistance2d_tolerance()", test_mindistance2d_tolerance)) || - (NULL == CU_add_test(pSuite, "test_rect_tree_contains_point()", test_rect_tree_contains_point)) || - (NULL == CU_add_test(pSuite, "test_rect_tree_intersects_tree()", test_rect_tree_intersects_tree)) - ) - { - CU_cleanup_registry(); - return NULL; - } - return pSuite; -} + LWGEOM *lw1; + LWGEOM *lw2; + double distance; -/* -** The suite initialization function. -** Create any re-used objects. -*/ -int init_measures_suite(void) -{ - return 0; -} + lw1 = lwgeom_from_wkt(in1, LW_PARSER_CHECK_NONE); + lw2 = lwgeom_from_wkt(in2, LW_PARSER_CHECK_NONE); -/* -** The suite cleanup function. -** Frees any global objects. -*/ -int clean_measures_suite(void) -{ - return 0; -} + distance = lwgeom_mindistance2d_tolerance(lw1, lw2, 0.0); + CU_ASSERT_EQUAL(distance, expected_res); + lwgeom_free(lw1); + lwgeom_free(lw2); -void test_mindistance2d_tolerance(void) +} +static void test_mindistance2d_tolerance(void) { - LWGEOM_PARSER_RESULT gp1; - LWGEOM_PARSER_RESULT gp2; - double distance; - int result1, result2; - /* ** Simple case. */ - result1 = serialized_lwgeom_from_ewkt(&gp1, "POINT(0 0)", PARSER_CHECK_NONE); - result2 = serialized_lwgeom_from_ewkt(&gp2, "MULTIPOINT(0 1.5,0 2,0 2.5)", PARSER_CHECK_NONE); - distance = lwgeom_mindistance2d_tolerance(gp1.serialized_lwgeom, gp2.serialized_lwgeom, 0.0); - //printf("\ndistance #1 = %g\n",distance); - CU_ASSERT_EQUAL(distance, 1.5); - free(gp1.serialized_lwgeom); - free(gp2.serialized_lwgeom); + do_test_mindistance2d_tolerance("POINT(0 0)", "MULTIPOINT(0 1.5,0 2,0 2.5)", 1.5); /* ** Point vs Geometry Collection. */ - result1 = serialized_lwgeom_from_ewkt(&gp1, "POINT(0 0)", PARSER_CHECK_NONE); - result2 = serialized_lwgeom_from_ewkt(&gp2, "GEOMETRYCOLLECTION(POINT(3 4))", PARSER_CHECK_NONE); - distance = lwgeom_mindistance2d_tolerance(gp1.serialized_lwgeom, gp2.serialized_lwgeom, 0.0); - //printf("distance #2 = %g\n",distance); - CU_ASSERT_EQUAL(distance, 5.0); - free(gp1.serialized_lwgeom); - free(gp2.serialized_lwgeom); + do_test_mindistance2d_tolerance("POINT(0 0)", "GEOMETRYCOLLECTION(POINT(3 4))", 5.0); /* ** Point vs Geometry Collection Collection. */ - result1 = serialized_lwgeom_from_ewkt(&gp1, "POINT(0 0)", PARSER_CHECK_NONE); - result2 = serialized_lwgeom_from_ewkt(&gp2, "GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POINT(3 4)))", PARSER_CHECK_NONE); - distance = lwgeom_mindistance2d_tolerance(gp1.serialized_lwgeom, gp2.serialized_lwgeom, 0.0); - //printf("distance #3 = %g\n",distance); - CU_ASSERT_EQUAL(distance, 5.0); - free(gp1.serialized_lwgeom); - free(gp2.serialized_lwgeom); + do_test_mindistance2d_tolerance("POINT(0 0)", "GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POINT(3 4)))", 5.0); /* ** Point vs Geometry Collection Collection Collection. */ - result1 = serialized_lwgeom_from_ewkt(&gp1, "POINT(0 0)", PARSER_CHECK_NONE); - result2 = serialized_lwgeom_from_ewkt(&gp2, "GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POINT(3 4))))", PARSER_CHECK_NONE); - distance = lwgeom_mindistance2d_tolerance(gp1.serialized_lwgeom, gp2.serialized_lwgeom, 0.0); - //printf("distance #4 = %g\n",distance); - CU_ASSERT_EQUAL(distance, 5.0); - free(gp1.serialized_lwgeom); - free(gp2.serialized_lwgeom); + do_test_mindistance2d_tolerance("POINT(0 0)", "GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POINT(3 4))))", 5.0); /* ** Point vs Geometry Collection Collection Collection Multipoint. */ - result1 = serialized_lwgeom_from_ewkt(&gp1, "POINT(0 0)", PARSER_CHECK_NONE); - result2 = serialized_lwgeom_from_ewkt(&gp2, "GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(MULTIPOINT(3 4))))", PARSER_CHECK_NONE); - distance = lwgeom_mindistance2d_tolerance(gp1.serialized_lwgeom, gp2.serialized_lwgeom, 0.0); - //printf("distance #5 = %g\n",distance); - CU_ASSERT_EQUAL(distance, 5.0); - free(gp1.serialized_lwgeom); - free(gp2.serialized_lwgeom); + do_test_mindistance2d_tolerance("POINT(0 0)", "GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(MULTIPOINT(3 4))))", 5.0); /* ** Geometry Collection vs Geometry Collection */ - result1 = serialized_lwgeom_from_ewkt(&gp1, "GEOMETRYCOLLECTION(POINT(0 0))", PARSER_CHECK_NONE); - result2 = serialized_lwgeom_from_ewkt(&gp2, "GEOMETRYCOLLECTION(POINT(3 4))", PARSER_CHECK_NONE); - distance = lwgeom_mindistance2d_tolerance(gp1.serialized_lwgeom, gp2.serialized_lwgeom, 0.0); - //printf("distance #6 = %g\n",distance); - CU_ASSERT_EQUAL(distance, 5.0); - free(gp1.serialized_lwgeom); - free(gp2.serialized_lwgeom); + do_test_mindistance2d_tolerance("GEOMETRYCOLLECTION(POINT(0 0))", "GEOMETRYCOLLECTION(POINT(3 4))", 5.0); /* ** Geometry Collection Collection vs Geometry Collection Collection */ - result1 = serialized_lwgeom_from_ewkt(&gp1, "GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POINT(0 0)))", PARSER_CHECK_NONE); - result2 = serialized_lwgeom_from_ewkt(&gp2, "GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POINT(3 4)))", PARSER_CHECK_NONE); - distance = lwgeom_mindistance2d_tolerance(gp1.serialized_lwgeom, gp2.serialized_lwgeom, 0.0); - //printf("distance #7 = %g\n",distance); - CU_ASSERT_EQUAL(distance, 5.0); - free(gp1.serialized_lwgeom); - free(gp2.serialized_lwgeom); + do_test_mindistance2d_tolerance("GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POINT(0 0)))", "GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POINT(3 4)))", 5.0); /* ** Geometry Collection Collection Multipoint vs Geometry Collection Collection Multipoint */ - result1 = serialized_lwgeom_from_ewkt(&gp1, "GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(MULTIPOINT(0 0)))", PARSER_CHECK_NONE); - result2 = serialized_lwgeom_from_ewkt(&gp2, "GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(MULTIPOINT(3 4)))", PARSER_CHECK_NONE); - distance = lwgeom_mindistance2d_tolerance(gp1.serialized_lwgeom, gp2.serialized_lwgeom, 0.0); - //printf("distance #8 = %g\n",distance); - CU_ASSERT_EQUAL(distance, 5.0); - free(gp1.serialized_lwgeom); - free(gp2.serialized_lwgeom); + do_test_mindistance2d_tolerance("GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(MULTIPOINT(0 0)))", "GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(MULTIPOINT(3 4)))", 5.0); + + /* + ** Linestring vs its start point + */ + do_test_mindistance2d_tolerance("LINESTRING(-2 0, -0.2 0)", "POINT(-2 0)", 0); + + /* + ** Linestring vs its end point + */ + do_test_mindistance2d_tolerance("LINESTRING(-0.2 0, -2 0)", "POINT(-2 0)", 0); + + /* + ** Linestring vs its start point (tricky number, see #1459) + */ + do_test_mindistance2d_tolerance("LINESTRING(-1e-8 0, -0.2 0)", "POINT(-1e-8 0)", 0); + + /* + ** Linestring vs its end point (tricky number, see #1459) + */ + do_test_mindistance2d_tolerance("LINESTRING(-0.2 0, -1e-8 0)", "POINT(-1e-8 0)", 0); } -void test_rect_tree_contains_point(void) +static void test_rect_tree_contains_point(void) { LWPOLY *poly; POINT2D p; @@ -161,7 +108,7 @@ int boundary = 0; /* square */ - poly = (LWPOLY*)lwgeom_from_ewkt("POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))", PARSER_CHECK_NONE); + poly = (LWPOLY*)lwgeom_from_wkt("POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))", LW_PARSER_CHECK_NONE); tree = rect_tree_new(poly->rings[0]); /* inside square */ @@ -182,7 +129,7 @@ lwpoly_free(poly); /* ziggy zaggy horizontal saw tooth polygon */ - poly = (LWPOLY*)lwgeom_from_ewkt("POLYGON((0 0, 1 3, 2 0, 3 3, 4 0, 4 5, 0 5, 0 0))", PARSER_CHECK_NONE); + poly = (LWPOLY*)lwgeom_from_wkt("POLYGON((0 0, 1 3, 2 0, 3 3, 4 0, 4 5, 0 5, 0 0))", LW_PARSER_CHECK_NONE); tree = rect_tree_new(poly->rings[0]); /* not in, left side */ @@ -238,7 +185,7 @@ lwpoly_free(poly); /* ziggy zaggy vertical saw tooth polygon */ - poly = (LWPOLY*)lwgeom_from_ewkt("POLYGON((0 0, 3 1, 0 2, 3 3, 0 4, 3 5, 0 6, 5 6, 5 0, 0 0))", PARSER_CHECK_NONE); + poly = (LWPOLY*)lwgeom_from_wkt("POLYGON((0 0, 3 1, 0 2, 3 3, 0 4, 3 5, 0 6, 5 6, 5 0, 0 0))", LW_PARSER_CHECK_NONE); tree = rect_tree_new(poly->rings[0]); /* not in, left side */ @@ -302,15 +249,15 @@ } -void test_rect_tree_intersects_tree(void) +static void test_rect_tree_intersects_tree(void) { LWPOLY *poly1, *poly2; RECT_NODE *tree1, *tree2; int result; /* total overlap, A == B */ - poly1 = (LWPOLY*)lwgeom_from_ewkt("POLYGON((0 0, 3 1, 0 2, 3 3, 0 4, 3 5, 0 6, 5 6, 5 0, 0 0))", PARSER_CHECK_NONE); - poly2 = (LWPOLY*)lwgeom_from_ewkt("POLYGON((0 0, 3 1, 0 2, 3 3, 0 4, 3 5, 0 6, 5 6, 5 0, 0 0))", PARSER_CHECK_NONE); + poly1 = (LWPOLY*)lwgeom_from_wkt("POLYGON((0 0, 3 1, 0 2, 3 3, 0 4, 3 5, 0 6, 5 6, 5 0, 0 0))", LW_PARSER_CHECK_NONE); + poly2 = (LWPOLY*)lwgeom_from_wkt("POLYGON((0 0, 3 1, 0 2, 3 3, 0 4, 3 5, 0 6, 5 6, 5 0, 0 0))", LW_PARSER_CHECK_NONE); tree1 = rect_tree_new(poly1->rings[0]); tree2 = rect_tree_new(poly2->rings[0]); result = rect_tree_intersects_tree(tree1, tree2); @@ -321,8 +268,8 @@ rect_tree_free(tree2); /* hiding between the tines of the comb */ - poly1 = (LWPOLY*)lwgeom_from_ewkt("POLYGON((0 0, 3 1, 0 2, 3 3, 0 4, 3 5, 0 6, 5 6, 5 0, 0 0))", PARSER_CHECK_NONE); - poly2 = (LWPOLY*)lwgeom_from_ewkt("POLYGON((0.3 0.7, 0.3 0.8, 0.4 0.8, 0.4 0.7, 0.3 0.7))", PARSER_CHECK_NONE); + poly1 = (LWPOLY*)lwgeom_from_wkt("POLYGON((0 0, 3 1, 0 2, 3 3, 0 4, 3 5, 0 6, 5 6, 5 0, 0 0))", LW_PARSER_CHECK_NONE); + poly2 = (LWPOLY*)lwgeom_from_wkt("POLYGON((0.3 0.7, 0.3 0.8, 0.4 0.8, 0.4 0.7, 0.3 0.7))", LW_PARSER_CHECK_NONE); tree1 = rect_tree_new(poly1->rings[0]); tree2 = rect_tree_new(poly2->rings[0]); result = rect_tree_intersects_tree(tree1, tree2); @@ -333,8 +280,8 @@ rect_tree_free(tree2); /* between the tines, but with a corner overlapping */ - poly1 = (LWPOLY*)lwgeom_from_ewkt("POLYGON((0 0, 3 1, 0 2, 3 3, 0 4, 3 5, 0 6, 5 6, 5 0, 0 0))", PARSER_CHECK_NONE); - poly2 = (LWPOLY*)lwgeom_from_ewkt("POLYGON((0.3 0.7, 0.3 0.8, 0.4 0.8, 1.3 0.3, 0.3 0.7))", PARSER_CHECK_NONE); + poly1 = (LWPOLY*)lwgeom_from_wkt("POLYGON((0 0, 3 1, 0 2, 3 3, 0 4, 3 5, 0 6, 5 6, 5 0, 0 0))", LW_PARSER_CHECK_NONE); + poly2 = (LWPOLY*)lwgeom_from_wkt("POLYGON((0.3 0.7, 0.3 0.8, 0.4 0.8, 1.3 0.3, 0.3 0.7))", LW_PARSER_CHECK_NONE); tree1 = rect_tree_new(poly1->rings[0]); tree2 = rect_tree_new(poly2->rings[0]); result = rect_tree_intersects_tree(tree1, tree2); @@ -345,8 +292,8 @@ rect_tree_free(tree2); /* Just touching the top left corner of the comb */ - poly1 = (LWPOLY*)lwgeom_from_ewkt("POLYGON((0 0, 3 1, 0 2, 3 3, 0 4, 3 5, 0 6, 5 6, 5 0, 0 0))", PARSER_CHECK_NONE); - poly2 = (LWPOLY*)lwgeom_from_ewkt("POLYGON((-1 5, 0 5, 0 7, -1 7, -1 5))", PARSER_CHECK_NONE); + poly1 = (LWPOLY*)lwgeom_from_wkt("POLYGON((0 0, 3 1, 0 2, 3 3, 0 4, 3 5, 0 6, 5 6, 5 0, 0 0))", LW_PARSER_CHECK_NONE); + poly2 = (LWPOLY*)lwgeom_from_wkt("POLYGON((-1 5, 0 5, 0 7, -1 7, -1 5))", LW_PARSER_CHECK_NONE); tree1 = rect_tree_new(poly1->rings[0]); tree2 = rect_tree_new(poly2->rings[0]); result = rect_tree_intersects_tree(tree1, tree2); @@ -359,3 +306,55 @@ } +static void +test_lwgeom_segmentize2d(void) +{ + LWGEOM *linein = lwgeom_from_wkt("LINESTRING(0 0,10 0)", LW_PARSER_CHECK_NONE); + LWGEOM *lineout = lwgeom_segmentize2d(linein, 5); + char *strout = lwgeom_to_ewkt(lineout); + CU_ASSERT_STRING_EQUAL(strout, "LINESTRING(0 0,5 0,10 0)"); + lwfree(strout); + lwgeom_free(linein); + lwgeom_free(lineout); +} + +static void +test_lwgeom_locate_along(void) +{ + LWGEOM *geom = NULL; + LWGEOM *out = NULL; + double measure = 105.0; + char *str; + + /* ST_Locatealong(ST_GeomFromText('MULTILINESTRING M ((1 2 3, 5 4 5), (50 50 1, 60 60 200))'), 105) */ + geom = lwgeom_from_wkt("MULTILINESTRING M ((1 2 3, 5 4 5), (50 50 1, 60 60 200))", LW_PARSER_CHECK_NONE); + out = lwgeom_locate_along(geom, measure, 0.0); + str = lwgeom_to_wkt(out, WKT_ISO, 8, NULL); + lwgeom_free(geom); + lwgeom_free(out); + CU_ASSERT_STRING_EQUAL("MULTIPOINT M (55.226131 55.226131 105)", str); + lwfree(str); + + /* ST_Locatealong(ST_GeomFromText('MULTILINESTRING M ((1 2 3, 5 4 5), (50 50 1, 60 60 200))'), 105) */ + geom = lwgeom_from_wkt("MULTILINESTRING M ((1 2 3, 3 4 2, 9 4 3), (1 2 3, 5 4 5), (50 50 1, 60 60 200))", LW_PARSER_CHECK_NONE); + out = lwgeom_locate_along(geom, measure, 0.0); + str = lwgeom_to_wkt(out, WKT_ISO, 8, NULL); + lwgeom_free(geom); + lwgeom_free(out); + CU_ASSERT_STRING_EQUAL("MULTIPOINT M (55.226131 55.226131 105)", str); + lwfree(str); +} + +/* +** Used by test harness to register the tests in this file. +*/ +CU_TestInfo measures_tests[] = +{ + PG_TEST(test_mindistance2d_tolerance), + PG_TEST(test_rect_tree_contains_point), + PG_TEST(test_rect_tree_intersects_tree), + PG_TEST(test_lwgeom_segmentize2d), + PG_TEST(test_lwgeom_locate_along), + CU_TEST_INFO_NULL +}; +CU_SuiteInfo measures_suite = {"PostGIS Measures Suite", NULL, NULL, measures_tests}; diff -Nru postgis-1.5.3/liblwgeom/cunit/cu_measures.h postgis-2.0.1/liblwgeom/cunit/cu_measures.h --- postgis-1.5.3/liblwgeom/cunit/cu_measures.h 2009-11-30 20:50:57.000000000 +0000 +++ postgis-2.0.1/liblwgeom/cunit/cu_measures.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ -/********************************************************************** - * $Id: cu_measures.h 4947 2009-11-30 20:50:57Z pramsey $ - * - * PostGIS - Spatial Types for PostgreSQL - * http://postgis.refractions.net - * Copyright 2009 Paul Ramsey - * - * This is free software; you can redistribute and/or modify it under - * the terms of the GNU General Public Licence. See the COPYING file. - * - **********************************************************************/ - -#include -#include -#include -#include "CUnit/Basic.h" - -#include "liblwgeom.h" -#include "cu_tester.h" -#include "measures.h" -#include "lwtree.h" - -/*********************************************************************** -** for Computational Geometry Suite -*/ - - - -/* Test functions */ -void test_mindistance2d_tolerance(void); -void test_rect_tree_contains_point(void); -void test_rect_tree_intersects_tree(void); - diff -Nru postgis-1.5.3/liblwgeom/cunit/cu_misc.c postgis-2.0.1/liblwgeom/cunit/cu_misc.c --- postgis-1.5.3/liblwgeom/cunit/cu_misc.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/cunit/cu_misc.c 2012-03-13 17:08:48.000000000 +0000 @@ -0,0 +1,134 @@ +/********************************************************************** + * $Id: cu_print.c 6160 2010-11-01 01:28:12Z pramsey $ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * Copyright 2008 Paul Ramsey + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include +#include +#include +#include "CUnit/Basic.h" + +#include "liblwgeom_internal.h" +#include "cu_tester.h" + + +static void test_misc_force_2d(void) +{ + LWGEOM *geom; + LWGEOM *geom2d; + char *wkt_out; + + geom = lwgeom_from_wkt("CIRCULARSTRINGM(-5 0 4,0 5 3,5 0 2,10 -5 1,15 0 0)", LW_PARSER_CHECK_NONE); + geom2d = lwgeom_force_2d(geom); + wkt_out = lwgeom_to_ewkt(geom2d); + CU_ASSERT_STRING_EQUAL("CIRCULARSTRING(-5 0,0 5,5 0,10 -5,15 0)",wkt_out); + lwgeom_free(geom); + lwgeom_free(geom2d); + lwfree(wkt_out); + + geom = lwgeom_from_wkt("GEOMETRYCOLLECTION(POINT(0 0 0),LINESTRING(1 1 1,2 2 2),POLYGON((0 0 1,0 1 1,1 1 1,1 0 1,0 0 1)),CURVEPOLYGON(CIRCULARSTRING(0 0 0,1 1 1,2 2 2,1 1 1,0 0 0)))", LW_PARSER_CHECK_NONE); + geom2d = lwgeom_force_2d(geom); + wkt_out = lwgeom_to_ewkt(geom2d); + CU_ASSERT_STRING_EQUAL("GEOMETRYCOLLECTION(POINT(0 0),LINESTRING(1 1,2 2),POLYGON((0 0,0 1,1 1,1 0,0 0)),CURVEPOLYGON(CIRCULARSTRING(0 0,1 1,2 2,1 1,0 0)))",wkt_out); + lwgeom_free(geom); + lwgeom_free(geom2d); + lwfree(wkt_out); +} + +static void test_misc_simplify(void) +{ + LWGEOM *geom; + LWGEOM *geom2d; + char *wkt_out; + + geom = lwgeom_from_wkt("LINESTRING(0 0,0 10,0 51,50 20,30 20,7 32)", LW_PARSER_CHECK_NONE); + geom2d = lwgeom_simplify(geom,2); + wkt_out = lwgeom_to_ewkt(geom2d); + CU_ASSERT_STRING_EQUAL("LINESTRING(0 0,0 51,50 20,30 20,7 32)",wkt_out); + lwgeom_free(geom); + lwgeom_free(geom2d); + lwfree(wkt_out); + + geom = lwgeom_from_wkt("MULTILINESTRING((0 0,0 10,0 51,50 20,30 20,7 32))", LW_PARSER_CHECK_NONE); + geom2d = lwgeom_simplify(geom,2); + wkt_out = lwgeom_to_ewkt(geom2d); + CU_ASSERT_STRING_EQUAL("MULTILINESTRING((0 0,0 51,50 20,30 20,7 32))",wkt_out); + lwgeom_free(geom); + lwgeom_free(geom2d); + lwfree(wkt_out); +} + +static void test_misc_count_vertices(void) +{ + LWGEOM *geom; + int count; + + geom = lwgeom_from_wkt("GEOMETRYCOLLECTION(POINT(0 0),LINESTRING(0 0,1 1),POLYGON((0 0,0 1,1 0,0 0)),CIRCULARSTRING(0 0,0 1,1 1),CURVEPOLYGON(CIRCULARSTRING(0 0,0 1,1 1)))", LW_PARSER_CHECK_NONE); + count = lwgeom_count_vertices(geom); + CU_ASSERT_EQUAL(count,13); + lwgeom_free(geom); + + geom = lwgeom_from_wkt("GEOMETRYCOLLECTION(CIRCULARSTRING(0 0,0 1,1 1),POINT(0 0),CURVEPOLYGON(CIRCULARSTRING(0 0,0 1,1 1,1 0,0 0)))", LW_PARSER_CHECK_NONE); + count = lwgeom_count_vertices(geom); + CU_ASSERT_EQUAL(count,9); + lwgeom_free(geom); + + geom = lwgeom_from_wkt("CURVEPOLYGON((0 0,1 0,0 1,0 0),CIRCULARSTRING(0 0,1 0,1 1,1 0,0 0))", LW_PARSER_CHECK_NONE); + count = lwgeom_count_vertices(geom); + CU_ASSERT_EQUAL(count,9); + lwgeom_free(geom); + + + geom = lwgeom_from_wkt("POLYGON((0 0,1 0,0 1,0 0))", LW_PARSER_CHECK_NONE); + count = lwgeom_count_vertices(geom); + CU_ASSERT_EQUAL(count,4); + lwgeom_free(geom); + + geom = lwgeom_from_wkt("CURVEPOLYGON((0 0,1 0,0 1,0 0),CIRCULARSTRING(0 0,1 0,1 1,1 0,0 0))", LW_PARSER_CHECK_NONE); + count = lwgeom_count_vertices(geom); + CU_ASSERT_EQUAL(count,9); + lwgeom_free(geom); +} + +static void test_misc_area(void) +{ + LWGEOM *geom; + double area; + + geom = lwgeom_from_wkt("LINESTRING EMPTY", LW_PARSER_CHECK_ALL); + area = lwgeom_area(geom); + CU_ASSERT_DOUBLE_EQUAL(area, 0.0, 0.0001); + lwgeom_free(geom); +} + +static void test_misc_wkb(void) +{ + static char *wkb = "010A0000000200000001080000000700000000000000000000C00000000000000000000000000000F0BF000000000000F0BF00000000000000000000000000000000000000000000F03F000000000000F0BF000000000000004000000000000000000000000000000000000000000000004000000000000000C00000000000000000010200000005000000000000000000F0BF00000000000000000000000000000000000000000000E03F000000000000F03F00000000000000000000000000000000000000000000F03F000000000000F0BF0000000000000000"; + LWGEOM *geom = lwgeom_from_hexwkb(wkb, LW_PARSER_CHECK_ALL); + char *str = lwgeom_to_wkt(geom, WKB_ISO, 8, 0); + CU_ASSERT_STRING_EQUAL(str, "CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0))"); + lwfree(str); + lwgeom_free(geom); + +} + +/* +** Used by the test harness to register the tests in this file. +*/ +CU_TestInfo misc_tests[] = +{ + PG_TEST(test_misc_force_2d), + PG_TEST(test_misc_simplify), + PG_TEST(test_misc_count_vertices), + PG_TEST(test_misc_area), + PG_TEST(test_misc_wkb), + CU_TEST_INFO_NULL +}; +CU_SuiteInfo misc_suite = {"misc", NULL, NULL, misc_tests }; diff -Nru postgis-1.5.3/liblwgeom/cunit/cu_node.c postgis-2.0.1/liblwgeom/cunit/cu_node.c --- postgis-1.5.3/liblwgeom/cunit/cu_node.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/cunit/cu_node.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,74 @@ +/********************************************************************** + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * + * Copyright (C) 2011 Sandro Santilli + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include "CUnit/Basic.h" +#include "cu_tester.h" + +#include "liblwgeom.h" +#include "liblwgeom_internal.h" + +static void test_lwgeom_node(void) +{ +#if POSTGIS_GEOS_VERSION >= 33 + LWGEOM *in, *out; + const char *wkt; + char *tmp; + + /* Because i don't trust that much prior tests... ;) */ + cu_error_msg_reset(); + + wkt = "LINESTRING(0 0,5 5, 10 0)"; + in = lwgeom_from_wkt(wkt, LW_PARSER_CHECK_NONE); + out = lwgeom_node(in); + /* printf("%s\n", lwgeom_to_ewkt(out)); */ + CU_ASSERT(lwgeom_same(in, out)); + lwgeom_free(out); lwgeom_free(in); + + wkt = "MULTILINESTRING((0 0,0 5),(10 0, -10 5))"; + in = lwgeom_from_wkt(wkt, LW_PARSER_CHECK_NONE); + out = lwgeom_node(in); + tmp = lwgeom_to_ewkt(out); + CU_ASSERT_STRING_EQUAL("MULTILINESTRING((0 2.5,-10 5),(0 0,0 2.5),(0 2.5,0 5),(10 0,0 2.5))", tmp) + lwfree(tmp); lwgeom_free(out); lwgeom_free(in); + + wkt = "MULTILINESTRING((0 0,5 5,10 0, 11 0, 20 0),(10 0, 12 0, 22 0))"; + in = lwgeom_from_wkt(wkt, LW_PARSER_CHECK_NONE); + out = lwgeom_node(in); + tmp = lwgeom_to_ewkt(out); + /* printf("%s\n", tmp); */ + CU_ASSERT_STRING_EQUAL("MULTILINESTRING((0 0,5 5,10 0),(10 0,11 0,12 0,20 0),(20 0,22 0))", tmp); + lwfree(tmp); lwgeom_free(out); lwgeom_free(in); + + wkt = "MULTILINESTRING((0 0,5 5,10 0, 11 0, 20 0),(22 0, 12 0, 10 0),(0 5, 5 0))"; + in = lwgeom_from_wkt(wkt, LW_PARSER_CHECK_NONE); + out = lwgeom_node(in); + tmp = lwgeom_to_ewkt(out); + /* printf("%s\n", tmp); */ + CU_ASSERT_STRING_EQUAL( +"MULTILINESTRING((0 0,2.5 2.5),(0 5,2.5 2.5),(22 0,20 0),(20 0,12 0,11 0,10 0),(10 0,5 5,2.5 2.5),(2.5 2.5,5 0))", + tmp); + lwfree(tmp); lwgeom_free(out); lwgeom_free(in); +#endif /* POSTGIS_GEOS_VERSION >= 33 */ +} + +/* +** Used by test harness to register the tests in this file. +*/ +/* +** Used by test harness to register the tests in this file. +*/ +CU_TestInfo node_tests[] = +{ + PG_TEST(test_lwgeom_node), + CU_TEST_INFO_NULL +}; +CU_SuiteInfo node_suite = {"node", NULL, NULL, node_tests}; diff -Nru postgis-1.5.3/liblwgeom/cunit/cu_out_geojson.c postgis-2.0.1/liblwgeom/cunit/cu_out_geojson.c --- postgis-1.5.3/liblwgeom/cunit/cu_out_geojson.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/cunit/cu_out_geojson.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,286 @@ +/********************************************************************** + * $Id: cu_out_geojson.c 9324 2012-02-27 22:08:12Z pramsey $ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * Copyright 2010 Olivier Courtin + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include +#include +#include +#include "CUnit/Basic.h" + +#include "liblwgeom_internal.h" +#include "cu_tester.h" + +static void do_geojson_test(char * in, char * out, char * srs, int precision, int has_bbox) +{ + LWGEOM *g; + char * h; + + g = lwgeom_from_wkt(in, LW_PARSER_CHECK_NONE); + h = lwgeom_to_geojson(g, srs, precision, has_bbox); + + if (strcmp(h, out)) + fprintf(stderr, "\nIn: %s\nOut: %s\nTheo: %s\n", in, h, out); + + CU_ASSERT_STRING_EQUAL(h, out); + + lwgeom_free(g); + lwfree(h); +} + + +static void do_geojson_unsupported(char * in, char * out) +{ + LWGEOM *g; + char *h; + + g = lwgeom_from_wkt(in, LW_PARSER_CHECK_NONE); + h = lwgeom_to_geojson(g, NULL, 0, 0); + + if (strcmp(cu_error_msg, out)) + fprintf(stderr, "\nIn: %s\nOut: %s\nTheo: %s\n", + in, cu_error_msg, out); + + CU_ASSERT_STRING_EQUAL(out, cu_error_msg); + cu_error_msg_reset(); + + lwfree(h); + lwgeom_free(g); +} + + +static void out_geojson_test_precision(void) +{ + /* 0 precision, i.e a round */ + do_geojson_test( + "POINT(1.1111111111111 1.1111111111111)", + "{\"type\":\"Point\",\"coordinates\":[1,1]}", + NULL, 0, 0); + + /* 3 digits precision */ + do_geojson_test( + "POINT(1.1111111111111 1.1111111111111)", + "{\"type\":\"Point\",\"coordinates\":[1.111,1.111]}", + NULL, 3, 0); + + /* 9 digits precision */ + do_geojson_test( + "POINT(1.2345678901234 1.2345678901234)", + "{\"type\":\"Point\",\"coordinates\":[1.23456789,1.23456789]}", + NULL, 9, 0); + + /* huge data */ + do_geojson_test( + "POINT(1E300 -1E300)", + "{\"type\":\"Point\",\"coordinates\":[1e+300,-1e+300]}", + NULL, 0, 0); +} + + +static void out_geojson_test_dims(void) +{ + /* 3D */ + do_geojson_test( + "POINT(0 1 2)", + "{\"type\":\"Point\",\"coordinates\":[0,1,2]}", + NULL, 0, 0); + + /* 3DM */ + do_geojson_test( + "POINTM(0 1 2)", + "{\"type\":\"Point\",\"coordinates\":[0,1]}", + NULL, 0, 0); + + /* 4D */ + do_geojson_test( + "POINT(0 1 2 3)", + "{\"type\":\"Point\",\"coordinates\":[0,1,2]}", + NULL, 0, 0); +} + + +static void out_geojson_test_srid(void) +{ + /* Linestring */ + do_geojson_test( + "LINESTRING(0 1,2 3,4 5)", + "{\"type\":\"LineString\",\"crs\":{\"type\":\"name\",\"properties\":{\"name\":\"EPSG:4326\"}},\"coordinates\":[[0,1],[2,3],[4,5]]}", + "EPSG:4326", 0, 0); + + /* Polygon */ + do_geojson_test( + "POLYGON((0 1,2 3,4 5,0 1))", + "{\"type\":\"Polygon\",\"crs\":{\"type\":\"name\",\"properties\":{\"name\":\"EPSG:4326\"}},\"coordinates\":[[[0,1],[2,3],[4,5],[0,1]]]}", + "EPSG:4326", 0, 0); + + /* Polygon - with internal ring */ + do_geojson_test( + "POLYGON((0 1,2 3,4 5,0 1),(6 7,8 9,10 11,6 7))", + "{\"type\":\"Polygon\",\"crs\":{\"type\":\"name\",\"properties\":{\"name\":\"EPSG:4326\"}},\"coordinates\":[[[0,1],[2,3],[4,5],[0,1]],[[6,7],[8,9],[10,11],[6,7]]]}", + "EPSG:4326", 0, 0); + + /* Multiline */ + do_geojson_test( + "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))", + "{\"type\":\"MultiLineString\",\"crs\":{\"type\":\"name\",\"properties\":{\"name\":\"EPSG:4326\"}},\"coordinates\":[[[0,1],[2,3],[4,5]],[[6,7],[8,9],[10,11]]]}", + "EPSG:4326", 0, 0); + + /* MultiPolygon */ + do_geojson_test( + "MULTIPOLYGON(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))", + "{\"type\":\"MultiPolygon\",\"crs\":{\"type\":\"name\",\"properties\":{\"name\":\"EPSG:4326\"}},\"coordinates\":[[[[0,1],[2,3],[4,5],[0,1]]],[[[6,7],[8,9],[10,11],[6,7]]]]}", + "EPSG:4326", 0, 0); + + /* GeometryCollection */ + do_geojson_test( + "GEOMETRYCOLLECTION(POINT(0 1),LINESTRING(2 3,4 5))", + "{\"type\":\"GeometryCollection\",\"crs\":{\"type\":\"name\",\"properties\":{\"name\":\"EPSG:4326\"}},\"geometries\":[{\"type\":\"Point\",\"coordinates\":[0,1]},{\"type\":\"LineString\",\"coordinates\":[[2,3],[4,5]]}]}", + "EPSG:4326", 0, 0); + + /* Empty GeometryCollection */ + do_geojson_test( + "GEOMETRYCOLLECTION EMPTY", + "{\"type\":\"GeometryCollection\",\"crs\":{\"type\":\"name\",\"properties\":{\"name\":\"EPSG:4326\"}},\"geometries\":[]}", + "EPSG:4326", 0, 0); +} + +static void out_geojson_test_bbox(void) +{ + /* Linestring */ + do_geojson_test( + "LINESTRING(0 1,2 3,4 5)", + "{\"type\":\"LineString\",\"bbox\":[0,1,4,5],\"coordinates\":[[0,1],[2,3],[4,5]]}", + NULL, 0, 1); + + /* Polygon */ + do_geojson_test( + "POLYGON((0 1,2 3,4 5,0 1))", + "{\"type\":\"Polygon\",\"bbox\":[0,1,4,5],\"coordinates\":[[[0,1],[2,3],[4,5],[0,1]]]}", + NULL, 0, 1); + + /* Polygon - with internal ring */ + do_geojson_test( + "POLYGON((0 1,2 3,4 5,0 1),(6 7,8 9,10 11,6 7))", + "{\"type\":\"Polygon\",\"bbox\":[0,1,4,5],\"coordinates\":[[[0,1],[2,3],[4,5],[0,1]],[[6,7],[8,9],[10,11],[6,7]]]}", + NULL, 0, 1); + + /* Multiline */ + do_geojson_test( + "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))", + "{\"type\":\"MultiLineString\",\"bbox\":[0,1,10,11],\"coordinates\":[[[0,1],[2,3],[4,5]],[[6,7],[8,9],[10,11]]]}", + NULL, 0, 1); + + /* MultiPolygon */ + do_geojson_test( + "MULTIPOLYGON(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))", + "{\"type\":\"MultiPolygon\",\"bbox\":[0,1,10,11],\"coordinates\":[[[[0,1],[2,3],[4,5],[0,1]]],[[[6,7],[8,9],[10,11],[6,7]]]]}", + NULL, 0, 1); + + /* GeometryCollection */ + do_geojson_test( + "GEOMETRYCOLLECTION(LINESTRING(0 1,-1 3),LINESTRING(2 3,4 5))", + "{\"type\":\"GeometryCollection\",\"bbox\":[-1,1,4,5],\"geometries\":[{\"type\":\"LineString\",\"coordinates\":[[0,1],[-1,3]]},{\"type\":\"LineString\",\"coordinates\":[[2,3],[4,5]]}]}", + NULL, 0, 1); + + /* Empty GeometryCollection */ + do_geojson_test( + "GEOMETRYCOLLECTION EMPTY", + "{\"type\":\"GeometryCollection\",\"geometries\":[]}", + NULL, 0, 1); +} + +static void out_geojson_test_geoms(void) +{ + /* Linestring */ + do_geojson_test( + "LINESTRING(0 1,2 3,4 5)", + "{\"type\":\"LineString\",\"coordinates\":[[0,1],[2,3],[4,5]]}", + NULL, 0, 0); + + /* Polygon */ + do_geojson_test( + "POLYGON((0 1,2 3,4 5,0 1))", + "{\"type\":\"Polygon\",\"coordinates\":[[[0,1],[2,3],[4,5],[0,1]]]}", + NULL, 0, 0); + + /* Polygon - with internal ring */ + do_geojson_test( + "POLYGON((0 1,2 3,4 5,0 1),(6 7,8 9,10 11,6 7))", + "{\"type\":\"Polygon\",\"coordinates\":[[[0,1],[2,3],[4,5],[0,1]],[[6,7],[8,9],[10,11],[6,7]]]}", + NULL, 0, 0); + + /* Multiline */ + do_geojson_test( + "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))", + "{\"type\":\"MultiLineString\",\"coordinates\":[[[0,1],[2,3],[4,5]],[[6,7],[8,9],[10,11]]]}", + NULL, 0, 0); + + /* MultiPolygon */ + do_geojson_test( + "MULTIPOLYGON(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))", + "{\"type\":\"MultiPolygon\",\"coordinates\":[[[[0,1],[2,3],[4,5],[0,1]]],[[[6,7],[8,9],[10,11],[6,7]]]]}", + NULL, 0, 0); + + /* GeometryCollection */ + do_geojson_test( + "GEOMETRYCOLLECTION(POINT(0 1),LINESTRING(2 3,4 5))", + "{\"type\":\"GeometryCollection\",\"geometries\":[{\"type\":\"Point\",\"coordinates\":[0,1]},{\"type\":\"LineString\",\"coordinates\":[[2,3],[4,5]]}]}", + NULL, 0, 0); + + /* Empty GeometryCollection */ + do_geojson_test( + "GEOMETRYCOLLECTION EMPTY", + "{\"type\":\"GeometryCollection\",\"geometries\":[]}", + NULL, 0, 0); + + /* Nested GeometryCollection */ + do_geojson_unsupported( + "GEOMETRYCOLLECTION(POINT(0 1),GEOMETRYCOLLECTION(LINESTRING(2 3,4 5)))", + "GeoJson: geometry not supported."); + + /* CircularString */ + do_geojson_unsupported( + "CIRCULARSTRING(-2 0,0 2,2 0,0 2,2 4)", + "lwgeom_to_geojson: 'CircularString' geometry type not supported"); + + /* CompoundCurve */ + do_geojson_unsupported( + "COMPOUNDCURVE(CIRCULARSTRING(0 0,1 1,1 0),(1 0,0 1))", + "lwgeom_to_geojson: 'CompoundCurve' geometry type not supported"); + + /* CurvePolygon */ + do_geojson_unsupported( + "CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0))", + "lwgeom_to_geojson: 'CurvePolygon' geometry type not supported"); + + /* MultiCurve */ + do_geojson_unsupported( + "MULTICURVE((5 5,3 5,3 3,0 3),CIRCULARSTRING(0 0,2 1,2 2))", + "lwgeom_to_geojson: 'MultiCurve' geometry type not supported"); + + /* MultiSurface */ + do_geojson_unsupported( + "MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)),((7 8,10 10,6 14,4 11,7 8)))", + "lwgeom_to_geojson: 'MultiSurface' geometry type not supported"); +} + +/* +** Used by test harness to register the tests in this file. +*/ +CU_TestInfo out_geojson_tests[] = +{ + PG_TEST(out_geojson_test_precision), + PG_TEST(out_geojson_test_dims), + PG_TEST(out_geojson_test_srid), + PG_TEST(out_geojson_test_bbox), + PG_TEST(out_geojson_test_geoms), + CU_TEST_INFO_NULL +}; +CU_SuiteInfo out_geojson_suite = {"GeoJson Out Suite", NULL, NULL, out_geojson_tests}; diff -Nru postgis-1.5.3/liblwgeom/cunit/cu_out_gml.c postgis-2.0.1/liblwgeom/cunit/cu_out_gml.c --- postgis-1.5.3/liblwgeom/cunit/cu_out_gml.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/cunit/cu_out_gml.c 2012-02-28 18:29:57.000000000 +0000 @@ -0,0 +1,1096 @@ +/********************************************************************** + * $Id: cu_out_gml.c 9332 2012-02-28 18:29:57Z pramsey $ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * + * Copyright 2010 Olivier Courtin + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include +#include +#include +#include "CUnit/Basic.h" + +#include "liblwgeom_internal.h" +#include "cu_tester.h" + +static void do_gml2_test(char * in, char * out, char * srs, int precision) +{ + LWGEOM *g; + char *h; + + g = lwgeom_from_wkt(in, LW_PARSER_CHECK_NONE); + h = lwgeom_to_gml2(g, srs, precision, "gml:"); + + if (strcmp(h, out)) + fprintf(stderr, "\nIn: %s\nOut: %s\nTheo: %s\n", in, h, out); + + CU_ASSERT_STRING_EQUAL(h, out); + + lwgeom_free(g); + lwfree(h); +} + +static void do_gml2_test_prefix(char * in, char * out, char * srs, int precision, const char *prefix) +{ + LWGEOM *g; + char *h; + + g = lwgeom_from_wkt(in, LW_PARSER_CHECK_NONE); + h = lwgeom_to_gml2(g, srs, precision, prefix); + + if (strcmp(h, out)) + fprintf(stderr, "\nIn: %s\nOut: %s\nTheo: %s\n", in, h, out); + + CU_ASSERT_STRING_EQUAL(h, out); + + lwgeom_free(g); + lwfree(h); +} + +static void do_gml3_test_opts(char * in, char * out, char * srs, int precision, int opts) +{ + LWGEOM *g; + char *h; + + g = lwgeom_from_wkt(in, LW_PARSER_CHECK_NONE); + h = lwgeom_to_gml3(g, srs, precision, opts, "gml:"); + + if (strcmp(h, out)) + fprintf(stderr, "\nIn: %s\nOut: %s\nTheo: %s\n", in, h, out); + + CU_ASSERT_STRING_EQUAL(h, out); + + lwgeom_free(g); + lwfree(h); +} + +static void do_gml3_test(char * in, char * out, char * srs, int precision, int is_geodetic) +{ + LWGEOM *g; + char *h; + int opts = LW_GML_IS_DIMS; + if ( is_geodetic ) opts |= LW_GML_IS_DEGREE; + + g = lwgeom_from_wkt(in, LW_PARSER_CHECK_NONE); + h = lwgeom_to_gml3(g, srs, precision, opts, "gml:"); + + if (strcmp(h, out)) + fprintf(stderr, "\nIn: %s\nOut: %s\nTheo: %s\n", in, h, out); + + CU_ASSERT_STRING_EQUAL(h, out); + + lwgeom_free(g); + lwfree(h); +} + +static void do_gml3_test_prefix(char * in, char * out, char * srs, int precision, int is_geodetic, const char *prefix) +{ + LWGEOM *g; + char *h; + int opts = LW_GML_IS_DIMS; + + if ( is_geodetic ) opts |= LW_GML_IS_DEGREE; + + g = lwgeom_from_wkt(in, LW_PARSER_CHECK_NONE); + h = lwgeom_to_gml3(g, srs, precision, opts, prefix); + + if (strcmp(h, out)) + fprintf(stderr, "\nIn: %s\nOut: %s\nTheo: %s\n", in, h, out); + + CU_ASSERT_STRING_EQUAL(h, out); + + lwgeom_free(g); + lwfree(h); +} + +static void do_gml3_test_nodims(char * in, char * out, char * srs, int precision, int is_geodetic, int is_dims, const char *prefix) +{ + LWGEOM *g; + char *h; + int opts = 0; + + if ( is_geodetic ) opts |= LW_GML_IS_DEGREE; + if ( is_dims ) opts |= LW_GML_IS_DIMS; + + g = lwgeom_from_wkt(in, LW_PARSER_CHECK_NONE); + h = lwgeom_to_gml3(g, srs, precision, opts, prefix); + + if (strcmp(h, out)) + fprintf(stderr, "\nIn: %s\nOut: %s\nTheo: %s\n", in, h, out); + + CU_ASSERT_STRING_EQUAL(h, out); + + lwgeom_free(g); + lwfree(h); +} + +static void do_gml2_unsupported(char * in, char * out) +{ + LWGEOM *g; + char *h; + + g = lwgeom_from_wkt(in, LW_PARSER_CHECK_NONE); + h = lwgeom_to_gml2(g, NULL, 0, ""); + + if (strcmp(cu_error_msg, out)) + fprintf(stderr, "\nGML 2 - In: %s\nOut: %s\nTheo: %s\n", + in, cu_error_msg, out); + CU_ASSERT_STRING_EQUAL(out, cu_error_msg); + cu_error_msg_reset(); + + lwfree(h); + lwgeom_free(g); +} + +static void do_gml3_unsupported(char * in, char * out) +{ + LWGEOM *g; + char *h; + int opts = LW_GML_IS_DIMS; + + g = lwgeom_from_wkt(in, LW_PARSER_CHECK_NONE); + h = lwgeom_to_gml3(g, NULL, 0, opts, ""); + + if (strcmp(cu_error_msg, out)) + fprintf(stderr, "\nGML 3 - In: %s\nOut: %s\nTheo: %s\n", + in, cu_error_msg, out); + + CU_ASSERT_STRING_EQUAL(out, cu_error_msg); + cu_error_msg_reset(); + + lwfree(h); + lwgeom_free(g); +} + +static void do_gml2_extent_test(char * in, char * out, char * srs, + double precision, char * prefix) +{ + LWGEOM *g; + char *h; + + g = lwgeom_from_wkt(in, LW_PARSER_CHECK_NONE); + h = lwgeom_extent_to_gml2(g, srs, precision, prefix); + if ( ! h ) h = strdup(cu_error_msg); + + if (strcmp(h, out)) + fprintf(stderr, "\nEXT GML 2 - In: %s\nObt: %s\nExp: %s\n", + in, h, out); + CU_ASSERT_STRING_EQUAL(out, h); + cu_error_msg_reset(); + + lwfree(h); + lwgeom_free(g); +} + +static void do_gml3_extent_test(char * in, char * out, char * srs, + double precision, int opts, char* prefix) +{ + LWGEOM *g; + char *h; + + g = lwgeom_from_wkt(in, LW_PARSER_CHECK_NONE); + h = lwgeom_extent_to_gml3(g, srs, precision, opts, prefix); + if ( ! h ) h = strdup(cu_error_msg); + + if (strcmp(h, out)) + fprintf(stderr, "\nEXT GML 3 - In: %s\nObt: %s\nExp: %s\n", + in, h, out); + CU_ASSERT_STRING_EQUAL(out, h); + cu_error_msg_reset(); + + lwfree(h); + lwgeom_free(g); +} + +static void out_gml_test_precision(void) +{ + /* GML2 - 0 precision, i.e a round */ + do_gml2_test( + "POINT(1.1111111111111 1.1111111111111)", + "1,1", + NULL, 0); + + /* GML3 - 0 precision, i.e a round */ + do_gml3_test( + "POINT(1.1111111111111 1.1111111111111)", + "1 1", + NULL, 0, 0); + + + /* GML2 - 3 digits precision */ + do_gml2_test( + "POINT(1.1111111111111 1.1111111111111)", + "1.111,1.111", + NULL, 3); + + /* GML3 - 3 digits precision */ + do_gml3_test( + "POINT(1.1111111111111 1.1111111111111)", + "1.111 1.111", + NULL, 3, 0); + + + /* GML2 - 9 digits precision */ + do_gml2_test( + "POINT(1.2345678901234 1.2345678901234)", + "1.23456789,1.23456789", + NULL, 9); + + /* GML3 - 9 digits precision */ + do_gml3_test( + "POINT(1.2345678901234 1.2345678901234)", + "1.23456789 1.23456789", + NULL, 9, 0); + + + /* GML2 - huge data */ + do_gml2_test( + "POINT(1E300 -1E300)", + "1e+300,-1e+300", + NULL, 0); + + /* GML3 - huge data */ + do_gml3_test( + "POINT(1E300 -1E300)", + "1e+300 -1e+300", + NULL, 0, 0); +} + +static void out_gml_test_srid(void) +{ + /* GML2 - Point with SRID */ + do_gml2_test( + "POINT(0 1)", + "0,1", + "EPSG:4326", 0); + + /* GML3 - Point with SRID */ + do_gml3_test( + "POINT(0 1)", + "0 1", + "EPSG:4326", 0, 0); + + + /* GML2 - Linestring with SRID */ + do_gml2_test( + "LINESTRING(0 1,2 3,4 5)", + "0,1 2,3 4,5", + "EPSG:4326", 0); + + /* GML3 - Linestring with SRID */ + do_gml3_test( + "LINESTRING(0 1,2 3,4 5)", + "0 1 2 3 4 5", + "EPSG:4326", 0, 0); + + /* GML3 - Linestring with SRID and short tag*/ + do_gml3_test_opts( + "LINESTRING(0 1,2 3,4 5)", + "0 1 2 3 4 5", + "EPSG:4326", 0, LW_GML_SHORTLINE); + + + /* GML2 Polygon with SRID */ + do_gml2_test( + "POLYGON((0 1,2 3,4 5,0 1))", + "0,1 2,3 4,5 0,1", + "EPSG:4326", 0); + + /* GML3 Polygon with SRID */ + do_gml3_test( + "POLYGON((0 1,2 3,4 5,0 1))", + "0 1 2 3 4 5 0 1", + "EPSG:4326", 0, 0); + + + /* GML2 MultiPoint with SRID */ + do_gml2_test( + "MULTIPOINT(0 1,2 3)", + "0,12,3", + "EPSG:4326", 0); + + /* GML3 MultiPoint with SRID */ + do_gml3_test( + "MULTIPOINT(0 1,2 3)", + "0 12 3", + "EPSG:4326", 0, 0); + + + /* GML2 Multiline with SRID */ + do_gml2_test( + "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))", + "0,1 2,3 4,56,7 8,9 10,11", + "EPSG:4326", 0); + + + /* GML3 Multiline with SRID */ + do_gml3_test( + "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))", + "0 1 2 3 4 56 7 8 9 10 11", + "EPSG:4326", 0, 0); + + /* GML3 Multiline with SRID and LineString tag */ + do_gml3_test_opts( + "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))", + "0 1 2 3 4 56 7 8 9 10 11", + "EPSG:4326", 0, LW_GML_SHORTLINE); + + + /* GML2 MultiPolygon with SRID */ + do_gml2_test( + "MULTIPOLYGON(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))", + "0,1 2,3 4,5 0,16,7 8,9 10,11 6,7", + "EPSG:4326", 0); + + /* GML3 MultiPolygon with SRID */ + do_gml3_test( + "MULTIPOLYGON(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))", + "0 1 2 3 4 5 0 16 7 8 9 10 11 6 7", + "EPSG:4326", 0, 0); + + /* GML3 PolyhedralSurface with SRID */ + do_gml3_test( + "POLYHEDRALSURFACE(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))", + "0 1 2 3 4 5 0 16 7 8 9 10 11 6 7", + "EPSG:4326", 0, 0); + + /* GML3 Tin with SRID */ + do_gml3_test( + "TIN(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))", + "0 1 2 3 4 5 0 16 7 8 9 10 11 6 7", + "EPSG:4326", 0, 0); + + + /* GML2 GeometryCollection with SRID */ + do_gml2_test( + "GEOMETRYCOLLECTION(POINT(0 1),LINESTRING(2 3,4 5))", + "0,12,3 4,5", + "EPSG:4326", 0); + + /* GML3 GeometryCollection with SRID */ + do_gml3_test( + "GEOMETRYCOLLECTION(POINT(0 1),LINESTRING(2 3,4 5))", + "0 12 3 4 5", + "EPSG:4326", 0, 0); +} + + +static void out_gml_test_geodetic(void) +{ + /* GML3 - Geodetic Point */ + do_gml3_test( + "POINT(0 1)", + "1 0", + "urn:ogc:def:crs:EPSG::4326", 0, 1); + + /* GML3 - 3D Geodetic Point */ + do_gml3_test( + "POINT(0 1 2)", + "1 0 2", + "urn:ogc:def:crs:EPSG::4326", 0, 1); +} + + +static void out_gml_test_dims(void) +{ + /* GML2 - 3D */ + do_gml2_test( + "POINT(0 1 2)", + "0,1,2", + NULL, 0); + + /* GML3 - 3D */ + do_gml3_test( + "POINT(0 1 2)", + "0 1 2", + NULL, 0, 0); + + + /* GML2 - 3DM */ + do_gml2_test( + "POINTM(0 1 2)", + "0,1", + NULL, 0); + + /* GML3 - 3DM */ + do_gml3_test( + "POINTM(0 1 2)", + "0 1", + NULL, 0, 0); + + + /* GML2 - 4D */ + do_gml2_test( + "POINT(0 1 2 3)", + "0,1,2", + NULL, 0); + + /* GML3 - 4D */ + do_gml3_test( + "POINT(0 1 2 3)", + "0 1 2", + NULL, 0, 0); +} + + +static void out_gml_test_geoms(void) +{ + /* GML2 - Linestring */ + do_gml2_test( + "LINESTRING(0 1,2 3,4 5)", + "0,1 2,3 4,5", + NULL, 0); + + /* GML3 - Linestring */ + do_gml3_test( + "LINESTRING(0 1,2 3,4 5)", + "0 1 2 3 4 5", + NULL, 0, 0); + + + /* GML2 Polygon */ + do_gml2_test( + "POLYGON((0 1,2 3,4 5,0 1))", + "0,1 2,3 4,5 0,1", + NULL, 0); + + /* GML3 Polygon */ + do_gml3_test( + "POLYGON((0 1,2 3,4 5,0 1))", + "0 1 2 3 4 5 0 1", + NULL, 0, 0); + + /* GML2 Polygon - with internal ring */ + do_gml2_test( + "POLYGON((0 1,2 3,4 5,0 1),(6 7,8 9,10 11,6 7))", + "0,1 2,3 4,5 0,16,7 8,9 10,11 6,7", + NULL, 0); + + /* GML3 Polygon - with internal ring */ + do_gml3_test( + "POLYGON((0 1,2 3,4 5,0 1),(6 7,8 9,10 11,6 7))", + "0 1 2 3 4 5 0 16 7 8 9 10 11 6 7", + NULL, 0, 0); + + + /* GML3 Triangle */ + do_gml3_test( + "TRIANGLE((0 1,2 3,4 5,0 1))", + "0 1 2 3 4 5 0 1", + NULL, 0, 0); + + + /* GML2 MultiPoint */ + do_gml2_test( + "MULTIPOINT(0 1,2 3)", + "0,12,3", + NULL, 0); + + /* GML3 MultiPoint */ + do_gml3_test( + "MULTIPOINT(0 1,2 3)", + "0 12 3", + NULL, 0, 0); + + + /* GML2 Multiline */ + do_gml2_test( + "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))", + "0,1 2,3 4,56,7 8,9 10,11", + NULL, 0); + + /* GML3 Multiline */ + do_gml3_test( + "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))", + "0 1 2 3 4 56 7 8 9 10 11", + NULL, 0, 0); + + + /* GML2 MultiPolygon */ + do_gml2_test( + "MULTIPOLYGON(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))", + "0,1 2,3 4,5 0,16,7 8,9 10,11 6,7", + NULL, 0); + + /* GML3 MultiPolygon */ + do_gml3_test( + "MULTIPOLYGON(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))", + "0 1 2 3 4 5 0 16 7 8 9 10 11 6 7", + NULL, 0, 0); + + + /* GML2 - GeometryCollection */ + do_gml2_test( + "GEOMETRYCOLLECTION(POINT(0 1),LINESTRING(2 3,4 5))", + "0,12,3 4,5", + NULL, 0); + + /* GML3 - GeometryCollection */ + do_gml3_test( + "GEOMETRYCOLLECTION(POINT(0 1),LINESTRING(2 3,4 5))", + "0 12 3 4 5", + NULL, 0, 0); + + + /* GML2 - Nested GeometryCollection */ + do_gml2_test( + "GEOMETRYCOLLECTION(POINT(0 1),GEOMETRYCOLLECTION(LINESTRING(2 3,4 5)))", + "0,12,3 4,5", + NULL, 0); + + /* GML3 - Nested GeometryCollection */ + do_gml3_test( + "GEOMETRYCOLLECTION(POINT(0 1),GEOMETRYCOLLECTION(LINESTRING(2 3,4 5)))", + "0 12 3 4 5", + NULL, 0, 0); + + + + /* GML2 - CircularString */ + do_gml2_unsupported( + "CIRCULARSTRING(-2 0,0 2,2 0,0 2,2 4)", + "lwgeom_to_gml2: 'CircularString' geometry type not supported"); + /* GML3 - CircularString */ + do_gml3_unsupported( + "CIRCULARSTRING(-2 0,0 2,2 0,0 2,2 4)", + "lwgeom_to_gml3: 'CircularString' geometry type not supported"); + + /* GML2 - CompoundCurve */ + do_gml2_unsupported( + "COMPOUNDCURVE(CIRCULARSTRING(0 0,1 1,1 0),(1 0,0 1))", + "lwgeom_to_gml2: 'CompoundCurve' geometry type not supported"); + /* GML3 - CompoundCurve */ + do_gml3_unsupported( + "COMPOUNDCURVE(CIRCULARSTRING(0 0,1 1,1 0),(1 0,0 1))", + "lwgeom_to_gml3: 'CompoundCurve' geometry type not supported"); + + /* GML2 - CurvePolygon */ + do_gml2_unsupported( + "CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0))", + "lwgeom_to_gml2: 'CurvePolygon' geometry type not supported"); + + /* GML3 - CurvePolygon */ + do_gml3_unsupported( + "CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0))", + "lwgeom_to_gml3: 'CurvePolygon' geometry type not supported"); + + + /* GML2 - MultiCurve */ + do_gml2_unsupported( + "MULTICURVE((5 5,3 5,3 3,0 3),CIRCULARSTRING(0 0,2 1,2 2))", + "lwgeom_to_gml2: 'MultiCurve' geometry type not supported"); + + /* GML3 - MultiCurve */ + do_gml3_unsupported( + "MULTICURVE((5 5,3 5,3 3,0 3),CIRCULARSTRING(0 0,2 1,2 2))", + "lwgeom_to_gml3: 'MultiCurve' geometry type not supported"); + + /* GML2 - MultiSurface */ + do_gml2_unsupported( + "MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)),((7 8,10 10,6 14,4 11,7 8)))", + "lwgeom_to_gml2: 'MultiSurface' geometry type not supported"); + + /* GML3 - MultiSurface */ + do_gml3_unsupported( + "MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)),((7 8,10 10,6 14,4 11,7 8)))", + "lwgeom_to_gml3: 'MultiSurface' geometry type not supported"); + + /* GML2 - PolyhedralSurface */ + do_gml2_unsupported( + "POLYHEDRALSURFACE(((0 1,2 3,4 5,0 1)))", + "Cannot convert PolyhedralSurface to GML2. Try ST_AsGML(3, ) to generate GML3."); + + /* GML2 - Tin */ + do_gml2_unsupported( + "TIN(((0 1,2 3,4 5,0 1)))", + "Cannot convert Tin to GML2. Try ST_AsGML(3, ) to generate GML3."); +} + +static void out_gml_test_geoms_prefix(void) +{ + /* GML2 - Linestring */ + do_gml2_test_prefix( + "LINESTRING(0 1,2 3,4 5)", + "0,1 2,3 4,5", + NULL, 0, "custom:"); + + /* GML3 - Linestring */ + do_gml3_test_prefix( + "LINESTRING(0 1,2 3,4 5)", + "0 1 2 3 4 5", + NULL, 0, 0, "custom:"); + + + /* GML2 Polygon */ + do_gml2_test_prefix( + "POLYGON((0 1,2 3,4 5,0 1))", + "0,1 2,3 4,5 0,1", + NULL, 0, "custom:"); + + /* GML3 Polygon */ + do_gml3_test_prefix( + "POLYGON((0 1,2 3,4 5,0 1))", + "0 1 2 3 4 5 0 1", + NULL, 0, 0, "custom:"); + + + /* GML2 Polygon - with internal ring */ + do_gml2_test_prefix( + "POLYGON((0 1,2 3,4 5,0 1),(6 7,8 9,10 11,6 7))", + "0,1 2,3 4,5 0,16,7 8,9 10,11 6,7", + NULL, 0, "custom:"); + + /* GML3 Polygon - with internal ring */ + do_gml3_test_prefix( + "POLYGON((0 1,2 3,4 5,0 1),(6 7,8 9,10 11,6 7))", + "0 1 2 3 4 5 0 16 7 8 9 10 11 6 7", + NULL, 0, 0, "custom:"); + + /* GML3 Triangle */ + do_gml3_test_prefix( + "TRIANGLE((0 1,2 3,4 5,0 1))", + "0 1 2 3 4 5 0 1", + NULL, 0, 0, "custom:"); + + + /* GML2 MultiPoint */ + do_gml2_test_prefix( + "MULTIPOINT(0 1,2 3)", + "0,12,3", + NULL, 0, "custom:"); + + /* GML3 MultiPoint */ + do_gml3_test_prefix( + "MULTIPOINT(0 1,2 3)", + "0 12 3", + NULL, 0, 0, "custom:"); + + + /* GML2 Multiline */ + do_gml2_test_prefix( + "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))", + "0,1 2,3 4,56,7 8,9 10,11", + NULL, 0, "custom:"); + + /* GML3 Multiline */ + do_gml3_test_prefix( + "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))", + "0 1 2 3 4 56 7 8 9 10 11", + NULL, 0, 0, "custom:"); + + + /* GML2 MultiPolygon */ + do_gml2_test_prefix( + "MULTIPOLYGON(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))", + "0,1 2,3 4,5 0,16,7 8,9 10,11 6,7", + NULL, 0, "custom:"); + + /* GML3 MultiPolygon */ + do_gml3_test_prefix( + "MULTIPOLYGON(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))", + "0 1 2 3 4 5 0 16 7 8 9 10 11 6 7", + NULL, 0, 0, "custom:"); + + /* GML3 PolyhedralSurface */ + do_gml3_test_prefix( + "POLYHEDRALSURFACE(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))", + "0 1 2 3 4 5 0 16 7 8 9 10 11 6 7", + NULL, 0, 0, "custom:"); + + /* GML3 Tin */ + do_gml3_test_prefix( + "TIN(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))", + "0 1 2 3 4 5 0 16 7 8 9 10 11 6 7", + NULL, 0, 0, "custom:"); + + /* GML2 - GeometryCollection */ + do_gml2_test_prefix( + "GEOMETRYCOLLECTION(POINT(0 1),LINESTRING(2 3,4 5))", + "0,12,3 4,5", + NULL, 0, "custom:"); + + /* GML3 - GeometryCollection */ + do_gml3_test_prefix( + "GEOMETRYCOLLECTION(POINT(0 1),LINESTRING(2 3,4 5))", + "0 12 3 4 5", + NULL, 0, 0, "custom:"); + + /* GML2 - Nested GeometryCollection */ + do_gml2_test_prefix( + "GEOMETRYCOLLECTION(POINT(0 1),GEOMETRYCOLLECTION(LINESTRING(2 3,4 5)))", + "0,12,3 4,5", + NULL, 0, "custom:"); + + /* GML3 - Nested GeometryCollection */ + do_gml3_test_prefix( + "GEOMETRYCOLLECTION(POINT(0 1),GEOMETRYCOLLECTION(LINESTRING(2 3,4 5)))", + "0 12 3 4 5", + NULL, 0, 0, "custom:"); + + /*------------- empty prefixes below ------------------------ */ + + /* GML2 - Linestring */ + do_gml2_test_prefix( + "LINESTRING(0 1,2 3,4 5)", + "0,1 2,3 4,5", + NULL, 0, ""); + + /* GML3 - Linestring */ + do_gml3_test_prefix( + "LINESTRING(0 1,2 3,4 5)", + "0 1 2 3 4 5", + NULL, 0, 0, ""); + + + /* GML2 Polygon */ + do_gml2_test_prefix( + "POLYGON((0 1,2 3,4 5,0 1))", + "0,1 2,3 4,5 0,1", + NULL, 0, ""); + + /* GML3 Polygon */ + do_gml3_test_prefix( + "POLYGON((0 1,2 3,4 5,0 1))", + "0 1 2 3 4 5 0 1", + NULL, 0, 0, ""); + + + /* GML2 Polygon - with internal ring */ + do_gml2_test_prefix( + "POLYGON((0 1,2 3,4 5,0 1),(6 7,8 9,10 11,6 7))", + "0,1 2,3 4,5 0,16,7 8,9 10,11 6,7", + NULL, 0, ""); + + /* GML3 Polygon - with internal ring */ + do_gml3_test_prefix( + "POLYGON((0 1,2 3,4 5,0 1),(6 7,8 9,10 11,6 7))", + "0 1 2 3 4 5 0 16 7 8 9 10 11 6 7", + NULL, 0, 0, ""); + + /* GML3 Triangle */ + do_gml3_test_prefix( + "TRIANGLE((0 1,2 3,4 5,0 1))", + "0 1 2 3 4 5 0 1", + NULL, 0, 0, ""); + + + /* GML2 MultiPoint */ + do_gml2_test_prefix( + "MULTIPOINT(0 1,2 3)", + "0,12,3", + NULL, 0, ""); + + /* GML3 MultiPoint */ + do_gml3_test_prefix( + "MULTIPOINT(0 1,2 3)", + "0 12 3", + NULL, 0, 0, ""); + + + /* GML2 Multiline */ + do_gml2_test_prefix( + "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))", + "0,1 2,3 4,56,7 8,9 10,11", + NULL, 0, ""); + + /* GML3 Multiline */ + do_gml3_test_prefix( + "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))", + "0 1 2 3 4 56 7 8 9 10 11", + NULL, 0, 0, ""); + + + /* GML2 MultiPolygon */ + do_gml2_test_prefix( + "MULTIPOLYGON(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))", + "0,1 2,3 4,5 0,16,7 8,9 10,11 6,7", + NULL, 0, ""); + + /* GML3 MultiPolygon */ + do_gml3_test_prefix( + "MULTIPOLYGON(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))", + "0 1 2 3 4 5 0 16 7 8 9 10 11 6 7", + NULL, 0, 0, ""); + + /* GML3 PolyhedralSurface */ + do_gml3_test_prefix( + "POLYHEDRALSURFACE(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))", + "0 1 2 3 4 5 0 16 7 8 9 10 11 6 7", + NULL, 0, 0, ""); + + /* GML3 PolyhedralSurface */ + do_gml3_test_prefix( + "TIN(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))", + "0 1 2 3 4 5 0 16 7 8 9 10 11 6 7", + NULL, 0, 0, ""); + + /* GML2 - GeometryCollection */ + do_gml2_test_prefix( + "GEOMETRYCOLLECTION(POINT(0 1),LINESTRING(2 3,4 5))", + "0,12,3 4,5", + NULL, 0, ""); + + /* GML3 - GeometryCollection */ + do_gml3_test_prefix( + "GEOMETRYCOLLECTION(POINT(0 1),LINESTRING(2 3,4 5))", + "0 12 3 4 5", + NULL, 0, 0, ""); + + /* GML2 - Nested GeometryCollection */ + do_gml2_test_prefix( + "GEOMETRYCOLLECTION(POINT(0 1),GEOMETRYCOLLECTION(LINESTRING(2 3,4 5)))", + "0,12,3 4,5", + NULL, 0, ""); + + /* GML3 - Nested GeometryCollection */ + do_gml3_test_prefix( + "GEOMETRYCOLLECTION(POINT(0 1),GEOMETRYCOLLECTION(LINESTRING(2 3,4 5)))", + "0 12 3 4 5", + NULL, 0, 0, ""); + + + +} + + +static void out_gml_test_geoms_nodims(void) +{ + /* GML3 - Linestring */ + do_gml3_test_nodims( + "LINESTRING(0 1,2 3,4 5)", + "0 1 2 3 4 5", + NULL, 0, 0, 0, ""); + + + /* GML3 Polygon */ + do_gml3_test_nodims( + "POLYGON((0 1,2 3,4 5,0 1))", + "0 1 2 3 4 5 0 1", + NULL, 0, 0, 0, ""); + + + /* GML3 Polygon - with internal ring */ + do_gml3_test_nodims( + "POLYGON((0 1,2 3,4 5,0 1),(6 7,8 9,10 11,6 7))", + "0 1 2 3 4 5 0 16 7 8 9 10 11 6 7", + NULL, 0, 0, 0, ""); + + /* GML3 Triangle */ + do_gml3_test_nodims( + "TRIANGLE((0 1,2 3,4 5,0 1))", + "0 1 2 3 4 5 0 1", + NULL, 0, 0, 0, ""); + + + /* GML3 MultiPoint */ + do_gml3_test_nodims( + "MULTIPOINT(0 1,2 3)", + "0 12 3", + NULL, 0, 0, 0, ""); + + + /* GML3 Multiline */ + do_gml3_test_nodims( + "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))", + "0 1 2 3 4 56 7 8 9 10 11", + NULL, 0, 0, 0, ""); + + + /* GML3 MultiPolygon */ + do_gml3_test_nodims( + "MULTIPOLYGON(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))", + "0 1 2 3 4 5 0 16 7 8 9 10 11 6 7", + NULL, 0, 0, 0, ""); + + /* GML3 PolyhedralSurface */ + do_gml3_test_nodims( + "POLYHEDRALSURFACE(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))", + "0 1 2 3 4 5 0 16 7 8 9 10 11 6 7", + NULL, 0, 0, 0, ""); + + /* GML3 Tin */ + do_gml3_test_nodims( + "TIN(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))", + "0 1 2 3 4 5 0 16 7 8 9 10 11 6 7", + NULL, 0, 0, 0, ""); + + /* GML3 - GeometryCollection */ + do_gml3_test_nodims( + "GEOMETRYCOLLECTION(POINT(0 1),LINESTRING(2 3,4 5))", + "0 12 3 4 5", + NULL, 0, 0, 0, ""); + + /* GML3 - Nested GeometryCollection */ + do_gml3_test_nodims( + "GEOMETRYCOLLECTION(POINT(0 1),GEOMETRYCOLLECTION(LINESTRING(2 3,4 5)))", + "0 12 3 4 5", + NULL, 0, 0, 0, ""); +} + +static void out_gml2_extent(void) +{ + /* GML2: Point */ + do_gml2_extent_test( + "POINT(-15 60)", + "-15,60 -15,60", + NULL, 15, ""); + do_gml2_extent_test( + "POINT(-15 60)", + "-15,60 -15,60", + NULL, 15, "gml:"); + do_gml2_extent_test( + "POINT(-15 60)", + "-15,60 -15,60", + "urn:ogc:def:crs:EPSG::4326", 15, ""); + + /* GML2: Multipoint */ + do_gml2_extent_test( + "MULTIPOINT(2 3, -5 -6)", + "-5,-6 2,3", + NULL, 15, ""); + + /* GML2: Linestring */ + do_gml2_extent_test( + "LINESTRING(0 1,2 3,4 5)", + "0,1 4,5", + NULL, 15, ""); + + /* GML2: MultiLinestring */ + do_gml2_extent_test( + "MULTILINESTRING((0 1,2 3),(4 5, 10 6))", + "0,1 10,6", + NULL, 15, ""); + + /* GML2: Polygon */ + do_gml2_extent_test( + "POLYGON((1 7,7 14, 14 7, 1 7))", + "1,7 14,14", + NULL, 15, ""); + + /* GML2: MultiPolygon */ + do_gml2_extent_test( + "MULTIPOLYGON(((1 7,7 14, 14 7, 1 7)),((-4 -6, -15 3, 0 0, -4 -6))))", + "-15,-6 14,14", + NULL, 15, ""); + + /* GML2: MultiSurface */ + do_gml2_extent_test( + "MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)),((7 8,10 10,6 14,4 11,7 8)))", + "-2,-1 10,14", + NULL, 15, ""); + + /* GML2: empty */ + do_gml2_extent_test( + "GEOMETRYCOLLECTION EMPTY", + "", + NULL, 15, ""); + + /* GML2: empty with srsName */ + do_gml2_extent_test( + "GEOMETRYCOLLECTION EMPTY", + "", + "urn:ogc:def:crs:EPSG::4326", 15, ""); + +} + +static void out_gml3_extent(void) +{ + /* GML3: Point */ + do_gml3_extent_test( + "POINT(-15 60)", + "-15 60-15 60", + NULL, 15, 0, ""); + do_gml3_extent_test( + "POINT(-15 60)", + "-15 60-15 60", + NULL, 15, 0, "gml:"); + do_gml3_extent_test( + "POINT(-15 60)", + "-15 60-15 60", + "urn:ogc:def:crs:EPSG::4326", 15, 0, ""); + + /* GML3: Multipoint */ + do_gml3_extent_test( + "MULTIPOINT(2 3, -5 -6)", + "-5 -62 3", + NULL, 15, 0, ""); + + /* GML3: Linestring */ + do_gml3_extent_test( + "LINESTRING(0 1,2 3,4 5)", + "0 14 5", + NULL, 15, 0, ""); + + /* GML3: MultiLinestring */ + do_gml3_extent_test( + "MULTILINESTRING((0 1,2 3),(4 5, 10 6))", + "0 110 6", + NULL, 15, 0, ""); + do_gml3_extent_test( + "MULTILINESTRING((0 1,2 3),(4 5, 10 6))", + "1 06 10", + NULL, 15, LW_GML_IS_DEGREE, ""); + do_gml3_extent_test( + "MULTILINESTRING((0 1,2 3),(4 5, 10 6))", + "1 06 10", + NULL, 15, LW_GML_IS_DEGREE|LW_GML_IS_DIMS, ""); + do_gml3_extent_test( + "MULTILINESTRING((0 1 10,2 3 30),(4 5 50, 10 6 -70))", + "1 0 -706 10 50", + NULL, 15, LW_GML_IS_DEGREE|LW_GML_IS_DIMS, ""); + + /* GML3: Polygon */ + do_gml3_extent_test( + "POLYGON((1 7,7 14, 14 7, 1 7))", + "1 714 14", + NULL, 15, 0, ""); + + /* GML3: MultiPolygon */ + do_gml3_extent_test( + "MULTIPOLYGON(((1 7,7 14, 14 7, 1 7)),((-4 -6, -15 3, 0 0, -4 -6))))", + "-15 -614 14", + NULL, 15, 0, ""); + + /* GML3: MultiSurface */ + do_gml3_extent_test( + "MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)),((7 8,10 10,6 14,4 11,7 8)))", + "-2 -110 14", + NULL, 15, 0, ""); + + /* GML3: empty */ + do_gml3_extent_test( + "GEOMETRYCOLLECTION EMPTY", + "", + NULL, 15, 0, ""); + + /* GML3: empty with srsName */ + do_gml3_extent_test( + "GEOMETRYCOLLECTION EMPTY", + "", + "urn:ogc:def:crs:EPSG::4326", 15, 0, ""); + +} + +/* +** Used by test harness to register the tests in this file. +*/ +CU_TestInfo out_gml_tests[] = +{ + PG_TEST(out_gml_test_precision), + PG_TEST(out_gml_test_srid), + PG_TEST(out_gml_test_dims), + PG_TEST(out_gml_test_geodetic), + PG_TEST(out_gml_test_geoms), + PG_TEST(out_gml_test_geoms_prefix), + PG_TEST(out_gml_test_geoms_nodims), + PG_TEST(out_gml2_extent), + PG_TEST(out_gml3_extent), + CU_TEST_INFO_NULL +}; +CU_SuiteInfo out_gml_suite = {"out_gml", NULL, NULL, out_gml_tests}; diff -Nru postgis-1.5.3/liblwgeom/cunit/cu_out_kml.c postgis-2.0.1/liblwgeom/cunit/cu_out_kml.c --- postgis-1.5.3/liblwgeom/cunit/cu_out_kml.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/cunit/cu_out_kml.c 2012-03-13 16:23:38.000000000 +0000 @@ -0,0 +1,247 @@ +/********************************************************************** + * $Id: cu_out_kml.c 9485 2012-03-13 16:23:38Z pramsey $ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * Copyright 2010 Olivier Courtin + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include +#include +#include +#include "CUnit/Basic.h" + +#include "liblwgeom_internal.h" +#include "cu_tester.h" + +static void do_kml_test(char * in, char * out, int precision) +{ + LWGEOM *g; + char * h; + + g = lwgeom_from_wkt(in, LW_PARSER_CHECK_NONE); + h = lwgeom_to_kml2(g, precision, ""); + + if (strcmp(h, out)) + fprintf(stderr, "\nIn: %s\nOut: %s\nTheo: %s\n", in, h, out); + + CU_ASSERT_STRING_EQUAL(h, out); + + lwgeom_free(g); + lwfree(h); +} + + +static void do_kml_unsupported(char * in, char * out) +{ + LWGEOM *g; + char *h; + + g = lwgeom_from_wkt(in, LW_PARSER_CHECK_NONE); + h = lwgeom_to_kml2(g, 0, ""); + + if (strcmp(cu_error_msg, out)) + fprintf(stderr, "\nIn: %s\nOut: %s\nTheo: %s\n", + in, cu_error_msg, out); + + CU_ASSERT_STRING_EQUAL(out, cu_error_msg); + cu_error_msg_reset(); + + lwfree(h); + lwgeom_free(g); +} + + +static void do_kml_test_prefix(char * in, char * out, int precision, const char *prefix) +{ + LWGEOM *g; + char * h; + + g = lwgeom_from_wkt(in, LW_PARSER_CHECK_NONE); + h = lwgeom_to_kml2(g, precision, prefix); + + if (strcmp(h, out)) + fprintf(stderr, "\nPrefix: %s\nIn: %s\nOut: %s\nTheo: %s\n", + prefix, in, h, out); + + CU_ASSERT_STRING_EQUAL(h, out); + + lwgeom_free(g); + lwfree(h); +} + + +static void out_kml_test_precision(void) +{ + /* 0 precision, i.e a round */ + do_kml_test( + "POINT(1.1111111111111 1.1111111111111)", + "1,1", + 0); + + /* 3 digits precision */ + do_kml_test( + "POINT(1.1111111111111 1.1111111111111)", + "1.111,1.111", + 3); + + /* 9 digits precision */ + do_kml_test( + "POINT(1.2345678901234 1.2345678901234)", + "1.23456789,1.23456789", + 8); + + /* huge data */ + do_kml_test( + "POINT(1E300 -1E300)", + "1e+300,-1e+300", + 0); +} + + +static void out_kml_test_dims(void) +{ + /* 3D */ + do_kml_test( + "POINT(0 1 2)", + "0,1,2", + 0); + + /* 3DM */ + do_kml_test( + "POINTM(0 1 2)", + "0,1", + 0); + + /* 4D */ + do_kml_test( + "POINT(0 1 2 3)", + "0,1,2", + 0); +} + + +static void out_kml_test_geoms(void) +{ + /* Linestring */ + do_kml_test( + "LINESTRING(0 1,2 3,4 5)", + "0,1 2,3 4,5", + 0); + + /* Polygon */ + do_kml_test( + "POLYGON((0 1,2 3,4 5,0 1))", + "0,1 2,3 4,5 0,1", + 0); + + /* Polygon - with internal ring */ + do_kml_test( + "POLYGON((0 1,2 3,4 5,0 1),(6 7,8 9,10 11,6 7))", + "0,1 2,3 4,5 0,16,7 8,9 10,11 6,7", + 0); + + /* MultiPoint */ + do_kml_test( + "MULTIPOINT(0 1,2 3)", + "0,12,3", + 0); + + /* MultiLine */ + do_kml_test( + "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))", + "0,1 2,3 4,56,7 8,9 10,11", + 0); + + /* MultiPolygon */ + do_kml_test( + "MULTIPOLYGON(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))", + "0,1 2,3 4,5 0,16,7 8,9 10,11 6,7", + 0); + + /* GeometryCollection */ + do_kml_unsupported( + "GEOMETRYCOLLECTION(POINT(0 1))", + "lwgeom_to_kml2: 'GeometryCollection' geometry type not supported"); + + /* CircularString */ + do_kml_unsupported( + "CIRCULARSTRING(-2 0,0 2,2 0,0 2,2 4)", + "lwgeom_to_kml2: 'CircularString' geometry type not supported"); + + /* CompoundCurve */ + do_kml_unsupported( + "COMPOUNDCURVE(CIRCULARSTRING(0 0,1 1,1 0),(1 0,0 1))", + "lwgeom_to_kml2: 'CompoundCurve' geometry type not supported"); + + /* CurvePolygon */ + do_kml_unsupported( + "CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0))", + "lwgeom_to_kml2: 'CurvePolygon' geometry type not supported"); + + /* MultiCurve */ + do_kml_unsupported( + "MULTICURVE((5 5,3 5,3 3,0 3),CIRCULARSTRING(0 0,2 1,2 2))", + "lwgeom_to_kml2: 'MultiCurve' geometry type not supported"); + + /* MultiSurface */ + do_kml_unsupported( + "MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)),((7 8,10 10,6 14,4 11,7 8)))", + "lwgeom_to_kml2: 'MultiSurface' geometry type not supported"); +} + +static void out_kml_test_prefix(void) +{ + /* Linestring */ + do_kml_test_prefix( + "LINESTRING(0 1,2 3,4 5)", + "0,1 2,3 4,5", + 0, "kml:"); + + /* Polygon */ + do_kml_test_prefix( + "POLYGON((0 1,2 3,4 5,0 1))", + "0,1 2,3 4,5 0,1", + 0, "kml:"); + + /* Polygon - with internal ring */ + do_kml_test_prefix( + "POLYGON((0 1,2 3,4 5,0 1),(6 7,8 9,10 11,6 7))", + "0,1 2,3 4,5 0,16,7 8,9 10,11 6,7", + 0, "kml:"); + + /* MultiPoint */ + do_kml_test_prefix( + "MULTIPOINT(0 1,2 3)", + "0,12,3", + 0, "kml:"); + + /* MultiLine */ + do_kml_test_prefix( + "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))", + "0,1 2,3 4,56,7 8,9 10,11", + 0, "kml:"); + + /* MultiPolygon */ + do_kml_test_prefix( + "MULTIPOLYGON(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))", + "0,1 2,3 4,5 0,16,7 8,9 10,11 6,7", + 0, "kml:"); + +} +/* +** Used by test harness to register the tests in this file. +*/ +CU_TestInfo out_kml_tests[] = +{ + PG_TEST(out_kml_test_precision), + PG_TEST(out_kml_test_dims), + PG_TEST(out_kml_test_geoms), + PG_TEST(out_kml_test_prefix), + CU_TEST_INFO_NULL +}; +CU_SuiteInfo out_kml_suite = {"KML Out Suite", NULL, NULL, out_kml_tests}; diff -Nru postgis-1.5.3/liblwgeom/cunit/cu_out_svg.c postgis-2.0.1/liblwgeom/cunit/cu_out_svg.c --- postgis-1.5.3/liblwgeom/cunit/cu_out_svg.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/cunit/cu_out_svg.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,330 @@ +/********************************************************************** + * $Id: cu_out_svg.c 9324 2012-02-27 22:08:12Z pramsey $ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * Copyright 2010 Olivier Courtin + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include +#include +#include +#include "CUnit/Basic.h" + +#include "liblwgeom_internal.h" +#include "cu_tester.h" + +static void do_svg_test(char * in, char * out, int precision, int relative) +{ + LWGEOM *g; + char * h; + + g = lwgeom_from_wkt(in, LW_PARSER_CHECK_NONE); + h = lwgeom_to_svg(g, precision, relative); + + if (strcmp(h, out)) + fprintf(stderr, "\nIn: %s\nOut: %s\nTheo: %s\n", in, h, out); + + CU_ASSERT_STRING_EQUAL(h, out); + + lwgeom_free(g); + lwfree(h); +} + + +static void do_svg_unsupported(char * in, char * out) +{ + LWGEOM *g; + char *h; + + g = lwgeom_from_wkt(in, LW_PARSER_CHECK_NONE); + h = lwgeom_to_svg(g, 0, 0); + + if (strcmp(cu_error_msg, out)) + fprintf(stderr, "\nIn: %s\nOut: %s\nTheo: %s\n", + in, cu_error_msg, out); + + CU_ASSERT_STRING_EQUAL(out, cu_error_msg); + cu_error_msg_reset(); + + lwfree(h); + lwgeom_free(g); +} + + +static void out_svg_test_precision(void) +{ + /* 0 precision, i.e a round - with Circle point */ + do_svg_test( + "POINT(1.1111111111111 1.1111111111111)", + "cx=\"1\" cy=\"-1\"", + 0, 0); + + /* 0 precision, i.e a round - with Point */ + do_svg_test( + "POINT(1.1111111111111 1.1111111111111)", + "x=\"1\" y=\"-1\"", + 0, 1); + + /* 0 precision, i.e a round - with PointArray */ + do_svg_test( + "LINESTRING(1.1111111111111 1.1111111111111,1.1111111111111 1.1111111111111)", + "M 1 -1 L 1 -1", + 0, 0); + + /* 0 precision, i.e a round - with relative PointArray */ + do_svg_test( + "LINESTRING(1.1111111111111 1.1111111111111,1.1111111111111 1.1111111111111)", + "M 1 -1 l 0 0", + 0, 1); + + + /* 9 digits precision - with Circle point */ + do_svg_test( + "POINT(1.2345678901234 1.2345678901234)", + "cx=\"1.23456789\" cy=\"-1.23456789\"", + 9, 0); + + /* 9 digits precision - with Point */ + do_svg_test( + "POINT(1.2345678901234 1.2345678901234)", + "x=\"1.23456789\" y=\"-1.23456789\"", + 9, 1); + + /* 9 digits precision - with PointArray */ + do_svg_test( + "LINESTRING(1.2345678901234 1.2345678901234,2.3456789012345 2.3456789012345)", + "M 1.23456789 -1.23456789 L 2.345678901 -2.345678901", + 9, 0); + + /* 9 digits precision - with relative PointArray */ + do_svg_test( + "LINESTRING(1.2345678901234 1.2345678901234,2.3456789012345 2.3456789012345)", + "M 1.23456789 -1.23456789 l 1.111111011 -1.111111011", + 9, 1); + + + /* huge data - with Circle point */ + do_svg_test( + "POINT(1E300 -1E300)", + "cx=\"1e+300\" cy=\"1e+300\"", + 0, 0); + + /* huge data - with Point */ + do_svg_test( + "POINT(1E300 -1E300)", + "x=\"1e+300\" y=\"1e+300\"", + 0, 1); + + /* huge data - with PointArray */ + do_svg_test( + "LINESTRING(1E300 -1E300,1E301 -1E301)", + "M 1e+300 1e+300 L 1e+301 1e+301", + 0, 0); + + /* huge data - with relative PointArray */ + do_svg_test( + "LINESTRING(1E300 -1E300,1E301 -1E301)", + "M 1e+300 1e+300 l 9e+300 9e+300", + 0, 1); +} + + +static void out_svg_test_dims(void) +{ + /* 4D - with Circle point */ + do_svg_test( + "POINT(0 1 2 3)", + "cx=\"0\" cy=\"-1\"", + 0, 0); + + /* 4D - with Point */ + do_svg_test( + "POINT(0 1 2 3)", + "x=\"0\" y=\"-1\"", + 0, 1); + + /* 4D - with PointArray */ + do_svg_test( + "LINESTRING(0 1 2 3,4 5 6 7)", + "M 0 -1 L 4 -5", + 0, 0); + + /* 4D - with relative PointArray */ + do_svg_test( + "LINESTRING(0 1 2 3,4 5 6 7)", + "M 0 -1 l 4 -4", + 0, 1); +} + + +static void out_svg_test_geoms(void) +{ + /* Linestring */ + do_svg_test( + "LINESTRING(0 1,2 3,4 5)", + "M 0 -1 L 2 -3 4 -5", + 0, 0); + + /* Polygon */ + do_svg_test( + "POLYGON((0 1,2 3,4 5,0 1))", + "M 0 -1 L 2 -3 4 -5 Z", + 0, 0); + + /* Polygon - with internal ring */ + do_svg_test( + "POLYGON((0 1,2 3,4 5,0 1),(6 7,8 9,10 11,6 7))", + "M 0 -1 L 2 -3 4 -5 Z M 6 -7 L 8 -9 10 -11 Z", + 0, 0); + + /* MultiPoint */ + do_svg_test( + "MULTIPOINT(0 1,2 3)", + "cx=\"0\" cy=\"-1\",cx=\"2\" cy=\"-3\"", + 0, 0); + + /* MultiLine */ + do_svg_test( + "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))", + "M 0 -1 L 2 -3 4 -5 M 6 -7 L 8 -9 10 -11", + 0, 0); + + /* MultiPolygon */ + do_svg_test( + "MULTIPOLYGON(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))", + "M 0 -1 L 2 -3 4 -5 Z M 6 -7 L 8 -9 10 -11 Z", + 0, 0); + + /* GeometryCollection */ + do_svg_test( + "GEOMETRYCOLLECTION(POINT(0 1),LINESTRING(2 3,4 5))", + "cx=\"0\" cy=\"-1\";M 2 -3 L 4 -5", + 0, 0); + + /* Empty GeometryCollection */ + do_svg_test( + "GEOMETRYCOLLECTION EMPTY", + "", + 0, 0); + + /* Nested GeometryCollection */ + do_svg_unsupported( + "GEOMETRYCOLLECTION(POINT(0 1),GEOMETRYCOLLECTION(LINESTRING(2 3,4 5)))", + "assvg_geom_buf: 'GeometryCollection' geometry type not supported."); + + /* CircularString */ + do_svg_unsupported( + "CIRCULARSTRING(-2 0,0 2,2 0,0 2,2 4)", + "lwgeom_to_svg: 'CircularString' geometry type not supported"); + + /* CompoundCurve */ + do_svg_unsupported( + "COMPOUNDCURVE(CIRCULARSTRING(0 0,1 1,1 0),(1 0,0 1))", + "lwgeom_to_svg: 'CompoundCurve' geometry type not supported"); + + /* CurvePolygon */ + do_svg_unsupported( + "CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0))", + "lwgeom_to_svg: 'CurvePolygon' geometry type not supported"); + + /* MultiCurve */ + do_svg_unsupported( + "MULTICURVE((5 5,3 5,3 3,0 3),CIRCULARSTRING(0 0,2 1,2 2))", + "lwgeom_to_svg: 'MultiCurve' geometry type not supported"); + + /* MultiSurface */ + do_svg_unsupported( + "MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)),((7 8,10 10,6 14,4 11,7 8)))", + "lwgeom_to_svg: 'MultiSurface' geometry type not supported"); +} + +static void out_svg_test_relative(void) +{ + /* Linestring */ + do_svg_test( + "LINESTRING(0 1,2 3,4 5)", + "M 0 -1 l 2 -2 2 -2", + 0, 1); + + /* Polygon */ + do_svg_test( + "POLYGON((0 1,2 3,4 5,0 1))", + "M 0 -1 l 2 -2 2 -2 z", + 0, 1); + + /* Polygon - with internal ring */ + do_svg_test( + "POLYGON((0 1,2 3,4 5,0 1),(6 7,8 9,10 11,6 7))", + "M 0 -1 l 2 -2 2 -2 z M 6 -7 l 2 -2 2 -2 z", + 0, 1); + + /* MultiPoint */ + do_svg_test( + "MULTIPOINT(0 1,2 3)", + "x=\"0\" y=\"-1\",x=\"2\" y=\"-3\"", + 0, 1); + + /* MultiLine */ + do_svg_test( + "MULTILINESTRING((0 1,2 3,4 5),(6 7,8 9,10 11))", + "M 0 -1 l 2 -2 2 -2 M 6 -7 l 2 -2 2 -2", + 0, 1); + + /* MultiPolygon */ + do_svg_test( + "MULTIPOLYGON(((0 1,2 3,4 5,0 1)),((6 7,8 9,10 11,6 7)))", + "M 0 -1 l 2 -2 2 -2 z M 6 -7 l 2 -2 2 -2 z", + 0, 1); + + /* GeometryCollection */ + do_svg_test( + "GEOMETRYCOLLECTION(POINT(0 1),LINESTRING(2 3,4 5))", + "x=\"0\" y=\"-1\";M 2 -3 l 2 -2", + 0, 1); +} + +static void out_svg_test_srid(void) +{ + /* SRID - with Circle point */ + do_svg_test( + "SRID=4326;POINT(0 1)", + "cx=\"0\" cy=\"-1\"", + 0, 0); + + /* SRID - with Point */ + do_svg_test( + "SRID=4326;POINT(0 1)", + "x=\"0\" y=\"-1\"", + 0, 1); + + /* SRID - with PointArray */ + do_svg_test( + "SRID=4326;LINESTRING(0 1,2 3)", + "M 0 -1 L 2 -3", + 0, 0); + + /* SRID - with relative PointArray */ + do_svg_test( + "SRID=4326;LINESTRING(0 1,2 3)", + "M 0 -1 l 2 -2", + 0, 1); +} + +/* +** Used by test harness to register the tests in this file. +*/ +CU_TestInfo out_svg_tests[] = +{ + PG_TEST(out_svg_test_precision), + PG_TEST(out_svg_test_dims), + PG_TEST(out_svg_test_relative), + PG_TEST(out_svg_test_geoms), + PG_TEST(out_svg_test_srid), + CU_TEST_INFO_NULL +}; +CU_SuiteInfo out_svg_suite = {"SVG Out Suite", NULL, NULL, out_svg_tests}; diff -Nru postgis-1.5.3/liblwgeom/cunit/cu_out_wkb.c postgis-2.0.1/liblwgeom/cunit/cu_out_wkb.c --- postgis-1.5.3/liblwgeom/cunit/cu_out_wkb.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/cunit/cu_out_wkb.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,196 @@ +/********************************************************************** + * $Id: cu_out_wkb.c 9324 2012-02-27 22:08:12Z pramsey $ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * Copyright 2010 Paul Ramsey + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include +#include +#include +#include "CUnit/Basic.h" + +#include "liblwgeom_internal.h" +#include "cu_tester.h" + +/* +** Global variable to hold hex WKB strings +*/ +char *s; + +/* +** The suite initialization function. +** Create any re-used objects. +*/ +static int init_wkb_out_suite(void) +{ + s = NULL; + return 0; +} + +/* +** The suite cleanup function. +** Frees any global objects. +*/ +static int clean_wkb_out_suite(void) +{ + if (s) free(s); + s = NULL; + return 0; +} + +/* +** Creating an input from a hexwkb +*/ +static void cu_wkb_from_hexwkb(char *hexwkb) +{ + LWGEOM *g = lwgeom_from_hexwkb(hexwkb, LW_PARSER_CHECK_NONE); + if ( s ) free(s); + s = (char*)lwgeom_to_wkb(g, WKB_HEX | WKB_XDR | WKB_EXTENDED, 0); + lwgeom_free(g); +} + +/* +** Creating an input WKB from a wkb string +*/ +static void cu_wkb(char *wkt) +{ + LWGEOM *g = lwgeom_from_wkt(wkt, LW_PARSER_CHECK_NONE); + if ( s ) free(s); + s = (char*)lwgeom_to_wkb(g, WKB_HEX | WKB_XDR | WKB_EXTENDED, NULL); + lwgeom_free(g); +} + + +static void test_wkb_out_point(void) +{ + cu_wkb("POINT(0 0 0 0)"); + CU_ASSERT_STRING_EQUAL(s,"00C00000010000000000000000000000000000000000000000000000000000000000000000"); + + cu_wkb("SRID=4;POINTM(1 1 1)"); + CU_ASSERT_STRING_EQUAL(s,"0060000001000000043FF00000000000003FF00000000000003FF0000000000000"); +} + +static void test_wkb_out_linestring(void) +{ + cu_wkb("LINESTRING(0 0,1 1)"); + CU_ASSERT_STRING_EQUAL(s,"000000000200000002000000000000000000000000000000003FF00000000000003FF0000000000000"); + + cu_wkb("LINESTRING(0 0 1,1 1 2,2 2 3)"); + CU_ASSERT_STRING_EQUAL(s,"008000000200000003000000000000000000000000000000003FF00000000000003FF00000000000003FF00000000000004000000000000000400000000000000040000000000000004008000000000000"); + + cu_wkb("LINESTRING EMPTY"); + CU_ASSERT_STRING_EQUAL(s,"000000000200000000"); +} + +static void test_wkb_out_polygon(void) +{ + cu_wkb("SRID=4;POLYGON((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0))"); + CU_ASSERT_STRING_EQUAL(s,"00A000000300000004000000010000000500000000000000000000000000000000000000000000000000000000000000003FF000000000000000000000000000003FF00000000000003FF000000000000000000000000000003FF000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"); + + cu_wkb("SRID=14;POLYGON((0 0 0 1,0 1 0 2,1 1 0 3,1 0 0 4,0 0 0 5))"); + CU_ASSERT_STRING_EQUAL(s,"00E00000030000000E00000001000000050000000000000000000000000000000000000000000000003FF000000000000000000000000000003FF0000000000000000000000000000040000000000000003FF00000000000003FF0000000000000000000000000000040080000000000003FF00000000000000000000000000000000000000000000040100000000000000000000000000000000000000000000000000000000000004014000000000000"); + + cu_wkb("SRID=4;POLYGON((0 0 0 1,0 1 0 2,1 1 0 3,1 0 0 4,0 0 0 5))"); + CU_ASSERT_STRING_EQUAL(s,"00E00000030000000400000001000000050000000000000000000000000000000000000000000000003FF000000000000000000000000000003FF0000000000000000000000000000040000000000000003FF00000000000003FF0000000000000000000000000000040080000000000003FF00000000000000000000000000000000000000000000040100000000000000000000000000000000000000000000000000000000000004014000000000000"); + + cu_wkb("POLYGON EMPTY"); + CU_ASSERT_STRING_EQUAL(s,"000000000300000000"); + + /* + * POLYGON with EMPTY shell + * See http://http://trac.osgeo.org/postgis/ticket/937 + */ + cu_wkb_from_hexwkb("01030000000100000000000000"); + CU_ASSERT_STRING_EQUAL(s,"00000000030000000100000000"); +} + +static void test_wkb_out_multipoint(void) +{ + cu_wkb("SRID=4;MULTIPOINT(0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)"); + CU_ASSERT_STRING_EQUAL(s,"00A000000400000004000000050080000001000000000000000000000000000000000000000000000000008000000100000000000000003FF0000000000000000000000000000000800000013FF00000000000003FF0000000000000000000000000000000800000013FF0000000000000000000000000000000000000000000000080000001000000000000000000000000000000000000000000000000"); + + cu_wkb("MULTIPOINT(0 0 0, 0.26794919243112270647255365849413 1 3)"); + //printf("WKB: %s",s); + CU_ASSERT_STRING_EQUAL(s,"008000000400000002008000000100000000000000000000000000000000000000000000000000800000013FD126145E9ECD563FF00000000000004008000000000000"); +} + +static void test_wkb_out_multilinestring(void) {} + +static void test_wkb_out_multipolygon(void) +{ + cu_wkb("SRID=14;MULTIPOLYGON(((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)),((-1 -1 0,-1 2 0,2 2 0,2 -1 0,-1 -1 0),(0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)))"); + CU_ASSERT_STRING_EQUAL(s,"00A00000060000000E000000020080000003000000010000000500000000000000000000000000000000000000000000000000000000000000003FF000000000000000000000000000003FF00000000000003FF000000000000000000000000000003FF00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000030000000200000005BFF0000000000000BFF00000000000000000000000000000BFF0000000000000400000000000000000000000000000004000000000000000400000000000000000000000000000004000000000000000BFF00000000000000000000000000000BFF0000000000000BFF000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000003FF000000000000000000000000000003FF00000000000003FF000000000000000000000000000003FF000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"); +} + +static void test_wkb_out_collection(void) +{ + cu_wkb("SRID=14;GEOMETRYCOLLECTION(POLYGON((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)),POINT(1 1 1))"); + CU_ASSERT_STRING_EQUAL(s,"00A00000070000000E000000020080000003000000010000000500000000000000000000000000000000000000000000000000000000000000003FF000000000000000000000000000003FF00000000000003FF000000000000000000000000000003FF00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000013FF00000000000003FF00000000000003FF0000000000000"); + + cu_wkb("GEOMETRYCOLLECTION EMPTY"); + CU_ASSERT_STRING_EQUAL(s,"000000000700000000"); +} + +static void test_wkb_out_circularstring(void) +{ + cu_wkb("CIRCULARSTRING(0 -2,-2 0,0 2,2 0,0 -2)"); + CU_ASSERT_STRING_EQUAL(s,"0000000008000000050000000000000000C000000000000000C000000000000000000000000000000000000000000000004000000000000000400000000000000000000000000000000000000000000000C000000000000000"); + + cu_wkb("CIRCULARSTRING(-5 0 0 4, 0 5 1 3, 5 0 2 2, 10 -5 3 1, 15 0 4 0)"); + CU_ASSERT_STRING_EQUAL(s,"00C000000800000005C014000000000000000000000000000000000000000000004010000000000000000000000000000040140000000000003FF0000000000000400800000000000040140000000000000000000000000000400000000000000040000000000000004024000000000000C01400000000000040080000000000003FF0000000000000402E000000000000000000000000000040100000000000000000000000000000"); + + cu_wkb("SRID=43;CIRCULARSTRING(-5 0 0 4, 0 5 1 3, 5 0 2 2, 10 -5 3 1, 15 0 4 0)"); + CU_ASSERT_STRING_EQUAL(s,"00E00000080000002B00000005C014000000000000000000000000000000000000000000004010000000000000000000000000000040140000000000003FF0000000000000400800000000000040140000000000000000000000000000400000000000000040000000000000004024000000000000C01400000000000040080000000000003FF0000000000000402E000000000000000000000000000040100000000000000000000000000000"); +} + +static void test_wkb_out_compoundcurve(void) +{ + cu_wkb("COMPOUNDCURVE(CIRCULARSTRING(0 0 0, 0.26794919243112270647255365849413 1 3, 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1),(0.5857864376269049511983112757903 1.4142135623730950488016887242097 1,2 0 0,0 0 0))"); + CU_ASSERT_STRING_EQUAL(s,"0080000009000000020080000008000000030000000000000000000000000000000000000000000000003FD126145E9ECD563FF000000000000040080000000000003FE2BEC3330188673FF6A09E667F3BCD3FF00000000000000080000002000000033FE2BEC3330188673FF6A09E667F3BCD3FF0000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"); +} + +static void test_wkb_out_curvpolygon(void) +{ + cu_wkb("CURVEPOLYGON(CIRCULARSTRING(-2 0 0 0,-1 -1 1 2,0 0 2 4,1 -1 3 6,2 0 4 8,0 2 2 4,-2 0 0 0),(-1 0 1 2,0 0.5 2 4,1 0 3 6,0 1 3 4,-1 0 1 2))"); + CU_ASSERT_STRING_EQUAL(s,"00C000000A0000000200C000000800000007C000000000000000000000000000000000000000000000000000000000000000BFF0000000000000BFF00000000000003FF0000000000000400000000000000000000000000000000000000000000000400000000000000040100000000000003FF0000000000000BFF00000000000004008000000000000401800000000000040000000000000000000000000000000401000000000000040200000000000000000000000000000400000000000000040000000000000004010000000000000C00000000000000000000000000000000000000000000000000000000000000000C000000200000005BFF000000000000000000000000000003FF0000000000000400000000000000000000000000000003FE0000000000000400000000000000040100000000000003FF000000000000000000000000000004008000000000000401800000000000000000000000000003FF000000000000040080000000000004010000000000000BFF000000000000000000000000000003FF00000000000004000000000000000"); +} + +static void test_wkb_out_multicurve(void) {} + +static void test_wkb_out_multisurface(void) {} + +static void test_wkb_out_polyhedralsurface(void) +{ +// cu_wkb("POLYHEDRALSURFACE(((0 0 0 0,0 0 1 0,0 1 0 2,0 0 0 0)),((0 0 0 0,0 1 0 0,1 0 0 4,0 0 0 0)),((0 0 0 0,1 0 0 0,0 0 1 6,0 0 0 0)),((1 0 0 0,0 1 0 0,0 0 1 0,1 0 0 0)))"); +// CU_ASSERT_STRING_EQUAL(s, t); +// printf("\nnew: %s\nold: %s\n",s,t); +} + +/* +** Used by test harness to register the tests in this file. +*/ + +CU_TestInfo wkb_out_tests[] = +{ + PG_TEST(test_wkb_out_point), + PG_TEST(test_wkb_out_linestring), + PG_TEST(test_wkb_out_polygon), + PG_TEST(test_wkb_out_multipoint), + PG_TEST(test_wkb_out_multilinestring), + PG_TEST(test_wkb_out_multipolygon), + PG_TEST(test_wkb_out_collection), + PG_TEST(test_wkb_out_circularstring), + PG_TEST(test_wkb_out_compoundcurve), + PG_TEST(test_wkb_out_curvpolygon), + PG_TEST(test_wkb_out_multicurve), + PG_TEST(test_wkb_out_multisurface), + PG_TEST(test_wkb_out_polyhedralsurface), + CU_TEST_INFO_NULL +}; +CU_SuiteInfo wkb_out_suite = {"WKB Out Suite", init_wkb_out_suite, clean_wkb_out_suite, wkb_out_tests}; diff -Nru postgis-1.5.3/liblwgeom/cunit/cu_out_wkt.c postgis-2.0.1/liblwgeom/cunit/cu_out_wkt.c --- postgis-1.5.3/liblwgeom/cunit/cu_out_wkt.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/cunit/cu_out_wkt.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,228 @@ +/********************************************************************** + * $Id: cu_out_wkt.c 9324 2012-02-27 22:08:12Z pramsey $ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * Copyright 2010 Paul Ramsey + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include +#include +#include +#include "CUnit/Basic.h" + +#include "liblwgeom_internal.h" +#include "cu_tester.h" + +/* +** Global variable to hold WKT strings +*/ +char *s = NULL; + +/* +** The suite initialization function. +** Create any re-used objects. +*/ +static int init_wkt_out_suite(void) +{ + s = NULL; + return 0; +} + +/* +** The suite cleanup function. +** Frees any global objects. +*/ +static int clean_wkt_out_suite(void) +{ + if ( s ) free(s); + s = NULL; + return 0; +} + +static char* cu_wkt(char *wkt, uint8_t variant) +{ + LWGEOM *g = lwgeom_from_wkt(wkt, LW_PARSER_CHECK_NONE); + if ( s ) free(s); + if ( ! g ) + { + printf("error converting '%s' to lwgeom\n", wkt); + exit(0); + } + s = lwgeom_to_wkt(g, variant, 8, NULL); + lwgeom_free(g); + return s; +} + +static void test_wkt_out_point(void) +{ + CU_ASSERT_STRING_EQUAL(cu_wkt("POINT(0.1111 0.1111 0.1111 0)",WKT_ISO), "POINT ZM (0.1111 0.1111 0.1111 0)"); + CU_ASSERT_STRING_EQUAL(cu_wkt("POINT(0 0 0 0)",WKT_EXTENDED), "POINT(0 0 0 0)"); + CU_ASSERT_STRING_EQUAL(cu_wkt("POINT(0 0 0 0)",WKT_SFSQL), "POINT(0 0)"); + + CU_ASSERT_STRING_EQUAL(cu_wkt("POINTM(0 0 0)",WKT_ISO), "POINT M (0 0 0)"); + CU_ASSERT_STRING_EQUAL(cu_wkt("POINTM(0 0 0)",WKT_EXTENDED), "POINTM(0 0 0)"); + CU_ASSERT_STRING_EQUAL(cu_wkt("POINTM(0 0 0)",WKT_SFSQL), "POINT(0 0)"); + + CU_ASSERT_STRING_EQUAL(cu_wkt("POINT(100 100)",WKT_ISO), "POINT(100 100)"); + CU_ASSERT_STRING_EQUAL(cu_wkt("POINT(100 100)",WKT_EXTENDED), "POINT(100 100)"); + CU_ASSERT_STRING_EQUAL(cu_wkt("POINT(100 100)",WKT_SFSQL), "POINT(100 100)"); + + CU_ASSERT_STRING_EQUAL(cu_wkt("POINT(100.1 100 12 12)",WKT_ISO), "POINT ZM (100.1 100 12 12)"); + CU_ASSERT_STRING_EQUAL(cu_wkt("POINT(100.1 100 12 12)",WKT_EXTENDED), "POINT(100.1 100 12 12)"); + CU_ASSERT_STRING_EQUAL(cu_wkt("POINT(100.1 100 12 12)",WKT_SFSQL), "POINT(100.1 100)"); + + CU_ASSERT_STRING_EQUAL(cu_wkt("SRID=100;POINT(100.1 100 12 12)",WKT_SFSQL), "POINT(100.1 100)"); + CU_ASSERT_STRING_EQUAL(cu_wkt("SRID=100;POINT(100.1 100 12 12)",WKT_EXTENDED), "SRID=100;POINT(100.1 100 12 12)"); +// printf("%s\n",cu_wkt("SRID=100;POINT(100.1 100 12 12)",WKT_EXTENDED)); + +} + +static void test_wkt_out_linestring(void) +{ + CU_ASSERT_STRING_EQUAL(cu_wkt("LINESTRING(1 2 3 4,5 6 7 8)",WKT_ISO), "LINESTRING ZM (1 2 3 4,5 6 7 8)"); + CU_ASSERT_STRING_EQUAL(cu_wkt("LINESTRING(1 2 3,5 6 7)",WKT_ISO), "LINESTRING Z (1 2 3,5 6 7)"); + CU_ASSERT_STRING_EQUAL(cu_wkt("LINESTRINGM(1 2 3,5 6 7)",WKT_ISO), "LINESTRING M (1 2 3,5 6 7)"); +} + +static void test_wkt_out_polygon(void) +{ + CU_ASSERT_STRING_EQUAL( + cu_wkt("POLYGON((100 100 2, 100 200 2, 200 200 2, 200 100 2, 100 100 2))",WKT_ISO), + "POLYGON Z ((100 100 2,100 200 2,200 200 2,200 100 2,100 100 2))" + ); + CU_ASSERT_STRING_EQUAL( + cu_wkt("POLYGON((100 100 2, 100 200 2, 200 200 2, 200 100 2, 100 100 2))",WKT_EXTENDED), + "POLYGON((100 100 2,100 200 2,200 200 2,200 100 2,100 100 2))" + ); +} +static void test_wkt_out_multipoint(void) +{ + CU_ASSERT_STRING_EQUAL(cu_wkt("MULTIPOINT(1 2 3 4,5 6 7 8)",WKT_ISO), "MULTIPOINT ZM (1 2 3 4,5 6 7 8)"); + CU_ASSERT_STRING_EQUAL(cu_wkt("MULTIPOINT(1 2 3,5 6 7)",WKT_ISO), "MULTIPOINT Z (1 2 3,5 6 7)"); + CU_ASSERT_STRING_EQUAL(cu_wkt("MULTIPOINTM(1 2 3,5 6 7)",WKT_ISO), "MULTIPOINT M (1 2 3,5 6 7)"); + +} + +static void test_wkt_out_multilinestring(void) +{ + CU_ASSERT_STRING_EQUAL( + cu_wkt("MULTILINESTRING((1 2 3 4,5 6 7 8))",WKT_ISO), + "MULTILINESTRING ZM ((1 2 3 4,5 6 7 8))" + ); + CU_ASSERT_STRING_EQUAL( + cu_wkt("MULTILINESTRING((1 2 3,5 6 7))",WKT_ISO), + "MULTILINESTRING Z ((1 2 3,5 6 7))" + ); + CU_ASSERT_STRING_EQUAL( + cu_wkt("MULTILINESTRINGM((1 2 3,5 6 7))",WKT_ISO), + "MULTILINESTRING M ((1 2 3,5 6 7))" + ); +} + +static void test_wkt_out_multipolygon(void) +{ + CU_ASSERT_STRING_EQUAL( + cu_wkt("MULTIPOLYGON(((100 100 2, 100 200 2, 200 200 2, 200 100 2, 100 100 2)))",WKT_ISO), + "MULTIPOLYGON Z (((100 100 2,100 200 2,200 200 2,200 100 2,100 100 2)))" + ); + CU_ASSERT_STRING_EQUAL( + cu_wkt("MULTIPOLYGON(((100 100 2, 100 200 2, 200 200 2, 200 100 2, 100 100 2)))",WKT_EXTENDED), + "MULTIPOLYGON(((100 100 2,100 200 2,200 200 2,200 100 2,100 100 2)))" + ); +} + +static void test_wkt_out_collection(void) +{ + //printf("%s\n",cu_wkt("GEOMETRYCOLLECTION(MULTIPOLYGON(((100 100 2, 100 200 2, 200 200 2, 200 100 2, 100 100 2))),MULTIPOINT(.5 .5 .5,1 1 1),CURVEPOLYGON((.8 .8 .8,.8 .8 .8,.8 .8 .8)))",WKT_ISO)); + CU_ASSERT_STRING_EQUAL( + cu_wkt("GEOMETRYCOLLECTION(POLYGON((100 100 2, 100 200 2, 200 200 2, 200 100 2, 100 100 2)),POINT(.5 .5 .5),CIRCULARSTRING(.8 .8 .8,.8 .8 .8,.8 .8 .8))",WKT_ISO), + "GEOMETRYCOLLECTION Z (POLYGON Z ((100 100 2,100 200 2,200 200 2,200 100 2,100 100 2)),POINT Z (0.5 0.5 0.5),CIRCULARSTRING Z (0.8 0.8 0.8,0.8 0.8 0.8,0.8 0.8 0.8))" + ); + CU_ASSERT_STRING_EQUAL( + cu_wkt("GEOMETRYCOLLECTION(MULTIPOLYGON(((100 100 2, 100 200 2, 200 200 2, 200 100 2, 100 100 2))),MULTIPOINT(.5 .5 .5,1 1 1),CURVEPOLYGON((.8 .8 .8,.8 .8 .8,.8 .8 .8)))",WKT_ISO), + "GEOMETRYCOLLECTION Z (MULTIPOLYGON Z (((100 100 2,100 200 2,200 200 2,200 100 2,100 100 2))),MULTIPOINT Z (0.5 0.5 0.5,1 1 1),CURVEPOLYGON Z ((0.8 0.8 0.8,0.8 0.8 0.8,0.8 0.8 0.8)))" + ); + + /* See http://trac.osgeo.org/postgis/ticket/724 */ + CU_ASSERT_STRING_EQUAL( + cu_wkt("GEOMETRYCOLLECTIONM(MULTIPOINTM(0 0 0), POINTM(1 1 1))", WKT_EXTENDED), + "GEOMETRYCOLLECTIONM(MULTIPOINTM(0 0 0),POINTM(1 1 1))" + ); +} + +static void test_wkt_out_circularstring(void) +{ + CU_ASSERT_STRING_EQUAL( + cu_wkt("CIRCULARSTRING(1 2 3 4,4 5 6 7,7 8 9 0)",WKT_ISO), + "CIRCULARSTRING ZM (1 2 3 4,4 5 6 7,7 8 9 0)" + ); + CU_ASSERT_STRING_EQUAL( + cu_wkt("CIRCULARSTRING(1 2 3 4,4 5 6 7,7 8 9 0)",WKT_EXTENDED), + "CIRCULARSTRING(1 2 3 4,4 5 6 7,7 8 9 0)" + ); + //printf("%s\n",cu_wkt("GEOMETRYCOLLECTION(MULTIPOLYGON(((100 100 2, 100 200 2, 200 200 2, 200 100 2, 100 100 2))),MULTIPOINT(.5 .5 .5,1 1 1),CURVEPOLYGON((.8 .8 .8,.8 .8 .8,.8 .8 .8)))",WKT_ISO)); +} + +static void test_wkt_out_compoundcurve(void) +{ + CU_ASSERT_STRING_EQUAL( + cu_wkt("COMPOUNDCURVE((1 2 3 4,4 5 6 7,7 8 9 0),CIRCULARSTRING(7 8 9 0,4 3 2 1,1 2 3 4,4 5 6 7,7 8 9 0))",WKT_ISO), + "COMPOUNDCURVE ZM ((1 2 3 4,4 5 6 7,7 8 9 0),CIRCULARSTRING ZM (7 8 9 0,4 3 2 1,1 2 3 4,4 5 6 7,7 8 9 0))" + ); +} + +static void test_wkt_out_curvpolygon(void) +{ + CU_ASSERT_STRING_EQUAL( + cu_wkt("CURVEPOLYGON((1 2 3 4,4 5 6 7,7 8 9 0),CIRCULARSTRING(7 8 9 0,1 2 1 1,1 2 3 4,4 5 6 7,7 8 9 0))",WKT_ISO), + "CURVEPOLYGON ZM ((1 2 3 4,4 5 6 7,7 8 9 0),CIRCULARSTRING ZM (7 8 9 0,1 2 1 1,1 2 3 4,4 5 6 7,7 8 9 0))" + ); +} + +static void test_wkt_out_multicurve(void) +{ + CU_ASSERT_STRING_EQUAL( + cu_wkt("MULTICURVE((1 2 3 4,4 5 6 7,7 8 9 0),CIRCULARSTRING(1 2 3 4,4 5 6 7,7 8 9 0))",WKT_ISO), + "MULTICURVE ZM ((1 2 3 4,4 5 6 7,7 8 9 0),CIRCULARSTRING ZM (1 2 3 4,4 5 6 7,7 8 9 0))" + ); + CU_ASSERT_STRING_EQUAL( + cu_wkt("MULTICURVE(COMPOUNDCURVE((1 2 3 4,4 5 6 7,7 8 9 0),CIRCULARSTRING(7 8 9 0,8 9 0 0,1 2 3 4,4 5 6 7,7 8 9 0)),(1 2 3 4,4 5 6 7,7 8 9 0),CIRCULARSTRING(1 2 3 4,4 5 6 7,7 8 9 0))",WKT_ISO), + "MULTICURVE ZM (COMPOUNDCURVE ZM ((1 2 3 4,4 5 6 7,7 8 9 0),CIRCULARSTRING ZM (7 8 9 0,8 9 0 0,1 2 3 4,4 5 6 7,7 8 9 0)),(1 2 3 4,4 5 6 7,7 8 9 0),CIRCULARSTRING ZM (1 2 3 4,4 5 6 7,7 8 9 0))" + ); +} + +static void test_wkt_out_multisurface(void) +{ + CU_ASSERT_STRING_EQUAL( + cu_wkt("MULTISURFACE(((1 2 3 4,4 5 6 7,7 8 9 0)),CURVEPOLYGON((1 2 3 4,4 5 6 7,7 8 9 0)))",WKT_ISO), + "MULTISURFACE ZM (((1 2 3 4,4 5 6 7,7 8 9 0)),CURVEPOLYGON ZM ((1 2 3 4,4 5 6 7,7 8 9 0)))" + ); + +} + +/* +** Used by test harness to register the tests in this file. +*/ + +CU_TestInfo wkt_out_tests[] = +{ + PG_TEST(test_wkt_out_point), + PG_TEST(test_wkt_out_linestring), + PG_TEST(test_wkt_out_polygon), + PG_TEST(test_wkt_out_multipoint), + PG_TEST(test_wkt_out_multilinestring), + PG_TEST(test_wkt_out_multipolygon), + PG_TEST(test_wkt_out_collection), + PG_TEST(test_wkt_out_circularstring), + PG_TEST(test_wkt_out_compoundcurve), + PG_TEST(test_wkt_out_curvpolygon), + PG_TEST(test_wkt_out_multicurve), + PG_TEST(test_wkt_out_multisurface), + CU_TEST_INFO_NULL +}; +CU_SuiteInfo wkt_out_suite = {"WKT Out Suite", init_wkt_out_suite, clean_wkt_out_suite, wkt_out_tests}; diff -Nru postgis-1.5.3/liblwgeom/cunit/cu_out_x3d.c postgis-2.0.1/liblwgeom/cunit/cu_out_x3d.c --- postgis-1.5.3/liblwgeom/cunit/cu_out_x3d.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/cunit/cu_out_x3d.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,168 @@ +/********************************************************************** + * $Id: cu_out_x3d.c 9324 2012-02-27 22:08:12Z pramsey $ + * + * PostGIS - Spatial Types for PostgreSQL + * http://www.postgis.org + * Copyright 2011 Regina Obe + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include +#include +#include +#include "CUnit/Basic.h" + +#include "liblwgeom_internal.h" +#include "cu_tester.h" + +static void do_x3d3_test(char * in, char * out, char * srs, int precision) +{ + LWGEOM *g; + char * h; + + g = lwgeom_from_wkt(in, LW_PARSER_CHECK_NONE); + h = lwgeom_to_x3d3(g, srs, precision, 0, ""); + + if (strcmp(h, out)) + fprintf(stderr, "\nIn: %s\nOut: %s\nTheo: %s\n", in, h, out); + + CU_ASSERT_STRING_EQUAL(h, out); + + lwgeom_free(g); + lwfree(h); +} + + +static void do_x3d3_unsupported(char * in, char * out) +{ + LWGEOM *g; + char *h; + + g = lwgeom_from_wkt(in, LW_PARSER_CHECK_NONE); + h = lwgeom_to_x3d3(g, NULL, 0, 0, ""); + + if (strcmp(cu_error_msg, out)) + fprintf(stderr, "\nIn: %s\nOut: %s\nTheo: %s\n", + in, cu_error_msg, out); + + CU_ASSERT_STRING_EQUAL(out, cu_error_msg); + cu_error_msg_reset(); + + lwfree(h); + lwgeom_free(g); +} + + +static void out_x3d3_test_precision(void) +{ + /* 0 precision, i.e a round */ + do_x3d3_test( + "POINT(1.1111111111111 1.1111111111111 2.11111111111111)", + "1 1 2", + NULL, 0); + + /* 3 digits precision */ + do_x3d3_test( + "POINT(1.1111111111111 1.1111111111111 2.11111111111111)", + "1.111 1.111 2.111", + NULL, 3); + + /* 9 digits precision */ + do_x3d3_test( + "POINT(1.2345678901234 1.2345678901234 4.123456789001)", + "1.23456789 1.23456789 4.123456789", + NULL, 9); + + /* huge data */ + do_x3d3_test( + "POINT(1E300 -105E-153 4E300)'", + "1e+300 -0 4e+300", + NULL, 0); +} + +static void out_x3d3_test_geoms(void) +{ + /* Linestring */ + do_x3d3_test( + "LINESTRING(0 1 5,2 3 6,4 5 7)", + "", + NULL, 0); + + /* Polygon **/ + do_x3d3_test( + "POLYGON((15 10 3,13.536 6.464 3,10 5 3,6.464 6.464 3,5 10 3,6.464 13.536 3,10 15 3,13.536 13.536 3,15 10 3))", + "", + NULL, 3); + + /* TODO: Polygon - with internal ring - the answer is clearly wrong */ + /** do_x3d3_test( + "POLYGON((0 1 3,2 3 3,4 5 3,0 1 3),(6 7 3,8 9 3,10 11 3,6 7 3))", + "", + NULL, 0); **/ + + /* 2D MultiPoint */ + do_x3d3_test( + "MULTIPOINT(0 1,2 3,4 5)", + "", + NULL, 0); + + /* 3D MultiPoint */ + do_x3d3_test( + "MULTIPOINT Z(0 1 1,2 3 4,4 5 5)", + "", + NULL, 0); + /* 3D Multiline */ + do_x3d3_test( + "MULTILINESTRING Z((0 1 1,2 3 4,4 5 5),(6 7 5,8 9 8,10 11 5))", + "", + NULL, 0); + + /* MultiPolygon */ + do_x3d3_test( + "MULTIPOLYGON(((0 1 1,2 3 1,4 5 1,0 1 1)),((6 7 1,8 9 1,10 11 1,6 7 1)))", + "", + NULL, 0); + + /* PolyhedralSurface */ + do_x3d3_test( + "POLYHEDRALSURFACE( ((0 0 0, 0 0 1, 0 1 1, 0 1 0, 0 0 0)), ((0 0 0, 0 1 0, 1 1 0, 1 0 0, 0 0 0)), ((0 0 0, 1 0 0, 1 0 1, 0 0 1, 0 0 0)), ((1 1 0, 1 1 1, 1 0 1, 1 0 0, 1 1 0)), ((0 1 0, 0 1 1, 1 1 1, 1 1 0, 0 1 0)), ((0 0 1, 1 0 1, 1 1 1, 0 1 1, 0 0 1)) )", + "", + NULL, 0); + + /* TODO: returns garbage at moment correctly implement GeometryCollection -- */ + /** do_x3d3_test( + "GEOMETRYCOLLECTION(POINT(0 1 3),LINESTRING(2 3 3,4 5 3))", + "", + NULL, 0); **/ + + /* TODO: Implement Empty GeometryCollection correctly or throw a not-implemented */ + /** do_x3d3_test( + "GEOMETRYCOLLECTION EMPTY", + "", + NULL, 0); **/ + + /* CircularString */ + do_x3d3_unsupported( + "CIRCULARSTRING(-2 0 1,0 2 1,2 0 1,0 2 1,2 4 1)", + "lwgeom_to_x3d3: 'CircularString' geometry type not supported"); + + /* CompoundCurve */ + do_x3d3_unsupported( + "COMPOUNDCURVE(CIRCULARSTRING(0 0 1,1 1 1,1 0 1),(1 0 1,0 1 1))", + "lwgeom_to_x3d3: 'CompoundCurve' geometry type not supported"); + +} + +/* +** Used by test harness to register the tests in this file. +*/ +CU_TestInfo out_x3d_tests[] = +{ + PG_TEST(out_x3d3_test_precision), + PG_TEST(out_x3d3_test_geoms), + CU_TEST_INFO_NULL +}; +CU_SuiteInfo out_x3d_suite = {"X3D Out Suite", NULL, NULL, out_x3d_tests}; diff -Nru postgis-1.5.3/liblwgeom/cunit/cu_print.c postgis-2.0.1/liblwgeom/cunit/cu_print.c --- postgis-1.5.3/liblwgeom/cunit/cu_print.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/cunit/cu_print.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,174 @@ +/********************************************************************** + * $Id: cu_print.c 9324 2012-02-27 22:08:12Z pramsey $ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * Copyright 2008 Paul Ramsey + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include +#include +#include +#include "CUnit/Basic.h" + +#include "liblwgeom_internal.h" +#include "cu_tester.h" + + +static void test_lwprint_assert_format(char * point_wkt, const char * format, const char * expected) +{ + LWPOINT * test_point = (LWPOINT*)lwgeom_from_wkt(point_wkt, LW_PARSER_CHECK_NONE); + int num_old_failures, num_new_failures; + char * actual; + cu_error_msg_reset(); + actual = lwpoint_to_latlon(test_point, format); + if (0 != strlen(cu_error_msg)) + { + printf("\nAssert failed:\n\tFormat [%s] generated an error: %s\n", format, cu_error_msg); + CU_FAIL(); + } + num_old_failures = CU_get_number_of_failures(); + CU_ASSERT_STRING_EQUAL(actual, expected); + num_new_failures = CU_get_number_of_failures(); + if (num_new_failures > num_old_failures) + { + printf("\nAssert failed:\n\t%s\t(actual)\n\t%s\t(expected)\n", actual, expected); + } + lwfree(actual); + lwpoint_free(test_point); +} +static void test_lwprint_assert_error(char * point_wkt, const char * format) +{ + LWPOINT * test_point = (LWPOINT*)lwgeom_from_wkt(point_wkt, LW_PARSER_CHECK_NONE); + cu_error_msg_reset(); + char* tmp = lwpoint_to_latlon(test_point, format); + lwfree(tmp); + if (0 == strlen(cu_error_msg)) + { + printf("\nAssert failed:\n\tFormat [%s] did not generate an error.\n", format); + CU_FAIL(); + } + else + { + cu_error_msg_reset(); + } + lwpoint_free(test_point); +} + +/* +** Test points around the globe using the default format. Null and empty string both mean use the default. +*/ +static void test_lwprint_default_format(void) +{ + test_lwprint_assert_format("POINT(0 0)", NULL, "0\xC2\xB0""0'0.000\"N 0\xC2\xB0""0'0.000\"E"); + test_lwprint_assert_format("POINT(45.4545 12.34567)", "" , "12\xC2\xB0""20'44.412\"N 45\xC2\xB0""27'16.200\"E"); + test_lwprint_assert_format("POINT(180 90)", NULL, "90\xC2\xB0""0'0.000\"N 180\xC2\xB0""0'0.000\"E"); + test_lwprint_assert_format("POINT(181 91)", "" , "89\xC2\xB0""0'0.000\"N 1\xC2\xB0""0'0.000\"E"); + test_lwprint_assert_format("POINT(180.0001 90.0001)", NULL, "89\xC2\xB0""59'59.640\"N 0\xC2\xB0""0'0.360\"E"); + test_lwprint_assert_format("POINT(45.4545 -12.34567)", "" , "12\xC2\xB0""20'44.412\"S 45\xC2\xB0""27'16.200\"E"); + test_lwprint_assert_format("POINT(180 -90)", NULL, "90\xC2\xB0""0'0.000\"S 180\xC2\xB0""0'0.000\"E"); + test_lwprint_assert_format("POINT(181 -91)", "" , "89\xC2\xB0""0'0.000\"S 1\xC2\xB0""0'0.000\"E"); + test_lwprint_assert_format("POINT(180.0001 -90.0001)", NULL, "89\xC2\xB0""59'59.640\"S 0\xC2\xB0""0'0.360\"E"); + test_lwprint_assert_format("POINT(-45.4545 12.34567)", "" , "12\xC2\xB0""20'44.412\"N 45\xC2\xB0""27'16.200\"W"); + test_lwprint_assert_format("POINT(-180 90)", NULL, "90\xC2\xB0""0'0.000\"N 180\xC2\xB0""0'0.000\"W"); + test_lwprint_assert_format("POINT(-181 91)", "" , "89\xC2\xB0""0'0.000\"N 1\xC2\xB0""0'0.000\"W"); + test_lwprint_assert_format("POINT(-180.0001 90.0001)", NULL, "89\xC2\xB0""59'59.640\"N 0\xC2\xB0""0'0.360\"W"); + test_lwprint_assert_format("POINT(-45.4545 -12.34567)", "" , "12\xC2\xB0""20'44.412\"S 45\xC2\xB0""27'16.200\"W"); + test_lwprint_assert_format("POINT(-180 -90)", NULL, "90\xC2\xB0""0'0.000\"S 180\xC2\xB0""0'0.000\"W"); + test_lwprint_assert_format("POINT(-181 -91)", "" , "89\xC2\xB0""0'0.000\"S 1\xC2\xB0""0'0.000\"W"); + test_lwprint_assert_format("POINT(-180.0001 -90.0001)", NULL, "89\xC2\xB0""59'59.640\"S 0\xC2\xB0""0'0.360\"W"); + test_lwprint_assert_format("POINT(-2348982391.123456 -238749827.34879)", "" , "12\xC2\xB0""39'4.356\"N 31\xC2\xB0""7'24.442\"W"); +} + +/* + * Test all possible combinations of the orders of the parameters. + */ +static void test_lwprint_format_orders(void) +{ + test_lwprint_assert_format("POINT(-45.4545 -12.34567)", "C DD MM SS", "S 12 20 44 W 45 27 16"); + test_lwprint_assert_format("POINT(-45.4545 -12.34567)", "C DD SS MM", "S 12 44 20 W 45 16 27"); + test_lwprint_assert_format("POINT(-45.4545 -12.34567)", "C MM DD SS", "S 20 12 44 W 27 45 16"); + test_lwprint_assert_format("POINT(-45.4545 -12.34567)", "C MM SS DD", "S 20 44 12 W 27 16 45"); + test_lwprint_assert_format("POINT(-45.4545 -12.34567)", "C SS DD MM", "S 44 12 20 W 16 45 27"); + test_lwprint_assert_format("POINT(-45.4545 -12.34567)", "C SS MM DD", "S 44 20 12 W 16 27 45"); + + test_lwprint_assert_format("POINT(-45.4545 -12.34567)", "DD C MM SS", "12 S 20 44 45 W 27 16"); + test_lwprint_assert_format("POINT(-45.4545 -12.34567)", "DD C SS MM", "12 S 44 20 45 W 16 27"); + test_lwprint_assert_format("POINT(-45.4545 -12.34567)", "MM C DD SS", "20 S 12 44 27 W 45 16"); + test_lwprint_assert_format("POINT(-45.4545 -12.34567)", "MM C SS DD", "20 S 44 12 27 W 16 45"); + test_lwprint_assert_format("POINT(-45.4545 -12.34567)", "SS C DD MM", "44 S 12 20 16 W 45 27"); + test_lwprint_assert_format("POINT(-45.4545 -12.34567)", "SS C MM DD", "44 S 20 12 16 W 27 45"); + + test_lwprint_assert_format("POINT(-45.4545 -12.34567)", "DD MM C SS", "12 20 S 44 45 27 W 16"); + test_lwprint_assert_format("POINT(-45.4545 -12.34567)", "DD SS C MM", "12 44 S 20 45 16 W 27"); + test_lwprint_assert_format("POINT(-45.4545 -12.34567)", "MM DD C SS", "20 12 S 44 27 45 W 16"); + test_lwprint_assert_format("POINT(-45.4545 -12.34567)", "MM SS C DD", "20 44 S 12 27 16 W 45"); + test_lwprint_assert_format("POINT(-45.4545 -12.34567)", "SS DD C MM", "44 12 S 20 16 45 W 27"); + test_lwprint_assert_format("POINT(-45.4545 -12.34567)", "SS MM C DD", "44 20 S 12 16 27 W 45"); + + test_lwprint_assert_format("POINT(-45.4545 -12.34567)", "DD MM SS C", "12 20 44 S 45 27 16 W"); + test_lwprint_assert_format("POINT(-45.4545 -12.34567)", "DD SS MM C", "12 44 20 S 45 16 27 W"); + test_lwprint_assert_format("POINT(-45.4545 -12.34567)", "MM DD SS C", "20 12 44 S 27 45 16 W"); + test_lwprint_assert_format("POINT(-45.4545 -12.34567)", "MM SS DD C", "20 44 12 S 27 16 45 W"); + test_lwprint_assert_format("POINT(-45.4545 -12.34567)", "SS DD MM C", "44 12 20 S 16 45 27 W"); + test_lwprint_assert_format("POINT(-45.4545 -12.34567)", "SS MM DD C", "44 20 12 S 16 27 45 W"); +} + +/* + * Test with and without the optional parameters. + */ +static void test_lwprint_optional_format(void) +{ + test_lwprint_assert_format("POINT(-45.4545 -12.34567)", "DD.DDD", "-12.346 -45.455"); + test_lwprint_assert_format("POINT(-45.4545 -12.34567)", "DD.DDD C", "12.346 S 45.455 W"); + test_lwprint_assert_format("POINT(-45.4545 -12.34567)", "DD.DDD MM.MMM", "-12.000 20.740 -45.000 27.270"); + test_lwprint_assert_format("POINT(-45.4545 -12.34567)", "DD.DDD MM.MMM C", "12.000 20.740 S 45.000 27.270 W"); + test_lwprint_assert_format("POINT(-45.4545 -12.34567)", "DD.DDD MM.MMM SS.SSS", "-12.000 20.000 44.412 -45.000 27.000 16.200"); + test_lwprint_assert_format("POINT(-45.4545 -12.34567)", "DD.DDD MM.MMM SS.SSS C", "12.000 20.000 44.412 S 45.000 27.000 16.200 W"); +} + +static void test_lwprint_oddball_formats(void) +{ + test_lwprint_assert_format("POINT(-45.4545 -12.34567)", "DD.DDDMM.MMMSS.SSSC", "12.00020.00044.412S 45.00027.00016.200W"); + test_lwprint_assert_format("POINT(-45.4545 -12.34567)", "DDMM.MMM", "-1220.740 -4527.270"); + /* "##." will be printed as "##" */ + test_lwprint_assert_format("POINT(-45.4545 -12.34567)", "DD.MM.MMM", "-1220.740 -4527.270"); +} + +/* + * Test using formats that should produce errors. + */ +static void test_lwprint_bad_formats(void) +{ + test_lwprint_assert_error("POINT(1.23456 7.89012)", "DD.DDD SS.SSS"); + test_lwprint_assert_error("POINT(1.23456 7.89012)", "MM.MMM SS.SSS"); + test_lwprint_assert_error("POINT(1.23456 7.89012)", "DD.DDD SS.SSS DD"); + test_lwprint_assert_error("POINT(1.23456 7.89012)", "DD MM SS MM"); + test_lwprint_assert_error("POINT(1.23456 7.89012)", "DD MM SS SS"); + test_lwprint_assert_error("POINT(1.23456 7.89012)", "C DD.DDD C"); + test_lwprint_assert_error("POINT(1.23456 7.89012)", "C \xC2""DD.DDD"); + test_lwprint_assert_error("POINT(1.23456 7.89012)", "C DD.DDD \xC2"); + test_lwprint_assert_error("POINT(1.23456 7.89012)", "C DD\x80""MM "); + test_lwprint_assert_error("POINT(1.23456 7.89012)", "C DD \xFF""MM"); + test_lwprint_assert_error("POINT(1.23456 7.89012)", "C DD \xB0""MM"); + test_lwprint_assert_error("POINT(1.23456 7.89012)", "DD.DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD"); + test_lwprint_assert_error("POINT(1.23456 7.89012)", "DD.DDD jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj"); +} + +/* +** Used by the test harness to register the tests in this file. +*/ +CU_TestInfo print_tests[] = +{ + PG_TEST(test_lwprint_default_format), + PG_TEST(test_lwprint_format_orders), + PG_TEST(test_lwprint_optional_format), + PG_TEST(test_lwprint_oddball_formats), + PG_TEST(test_lwprint_bad_formats), + CU_TEST_INFO_NULL +}; +CU_SuiteInfo print_suite = {"print_suite", NULL, NULL, print_tests }; diff -Nru postgis-1.5.3/liblwgeom/cunit/cu_ptarray.c postgis-2.0.1/liblwgeom/cunit/cu_ptarray.c --- postgis-1.5.3/liblwgeom/cunit/cu_ptarray.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/cunit/cu_ptarray.c 2012-06-19 20:46:58.000000000 +0000 @@ -0,0 +1,390 @@ +/********************************************************************** + * $Id: cu_print.c 6160 2010-11-01 01:28:12Z pramsey $ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * + * Copyright (C) 2011 Sandro Santilli + * Copyright (C) 2008 Paul Ramsey + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include +#include +#include +#include "CUnit/Basic.h" +#include "CUnit/CUnit.h" + +#include "liblwgeom_internal.h" +#include "cu_tester.h" + + +static LWGEOM* lwgeom_from_text(const char *str) +{ + LWGEOM_PARSER_RESULT r; + if( LW_FAILURE == lwgeom_parse_wkt(&r, (char*)str, LW_PARSER_CHECK_NONE) ) + return NULL; + return r.geom; +} + +static char* lwgeom_to_text(const LWGEOM *geom) +{ + return lwgeom_to_wkt(geom, WKT_ISO, 8, NULL); +} + +static void test_ptarray_append_point(void) +{ + LWLINE *line; + char *wkt; + POINT4D p; + + line = lwgeom_as_lwline(lwgeom_from_text("LINESTRING(0 0,1 1)")); + p.x = 1; + p.y = 1; + ptarray_append_point(line->points, &p, LW_TRUE); + wkt = lwgeom_to_text(lwline_as_lwgeom(line)); + CU_ASSERT_STRING_EQUAL(wkt,"LINESTRING(0 0,1 1,1 1)"); + lwfree(wkt); + + ptarray_append_point(line->points, &p, LW_FALSE); + wkt = lwgeom_to_text(lwline_as_lwgeom(line)); + CU_ASSERT_STRING_EQUAL(wkt,"LINESTRING(0 0,1 1,1 1)"); + lwfree(wkt); + + lwline_free(line); +} + +static void test_ptarray_insert_point(void) +{ + LWLINE *line; + char *wkt; + POINT4D p; + + line = lwgeom_as_lwline(lwgeom_from_text("LINESTRING EMPTY")); + p.x = 1; + p.y = 1; + ptarray_insert_point(line->points, &p, 0); + wkt = lwgeom_to_text(lwline_as_lwgeom(line)); + CU_ASSERT_STRING_EQUAL(wkt,"LINESTRING(1 1)"); + lwfree(wkt); + + p.x = 2; + p.y = 20; + ptarray_insert_point(line->points, &p, 0); + wkt = lwgeom_to_text(lwline_as_lwgeom(line)); + CU_ASSERT_STRING_EQUAL(wkt,"LINESTRING(2 20,1 1)"); + lwfree(wkt); + + p.x = 3; + p.y = 30; + ptarray_insert_point(line->points, &p, 1); + wkt = lwgeom_to_text(lwline_as_lwgeom(line)); + CU_ASSERT_STRING_EQUAL(wkt,"LINESTRING(2 20,3 30,1 1)"); + lwfree(wkt); + + p.x = 4; + p.y = 40; + ptarray_insert_point(line->points, &p, 0); + wkt = lwgeom_to_text(lwline_as_lwgeom(line)); + CU_ASSERT_STRING_EQUAL(wkt,"LINESTRING(4 40,2 20,3 30,1 1)"); + lwfree(wkt); + + p.x = 5; + p.y = 50; + ptarray_insert_point(line->points, &p, 4); + wkt = lwgeom_to_text(lwline_as_lwgeom(line)); + CU_ASSERT_STRING_EQUAL(wkt,"LINESTRING(4 40,2 20,3 30,1 1,5 50)"); + lwfree(wkt); + + lwline_free(line); +} + +static void test_ptarray_append_ptarray(void) +{ + LWLINE *line1, *line2; + int ret; + char *wkt; + + /* Empty first line */ + line1 = lwgeom_as_lwline(lwgeom_from_text("LINESTRING EMPTY")); + line2 = lwgeom_as_lwline(lwgeom_from_text("LINESTRING(0 0,0 10,5 5)")); + ret = ptarray_append_ptarray(line1->points, line2->points, -1); + CU_ASSERT(ret == LW_SUCCESS); + wkt = lwgeom_to_text(lwline_as_lwgeom(line1)); + CU_ASSERT_STRING_EQUAL(wkt, "LINESTRING(0 0,0 10,5 5)"); + lwfree(wkt); + lwline_free(line2); + lwline_free(line1); + + /* Empty second line */ + line1 = lwgeom_as_lwline(lwgeom_from_text("LINESTRING(0 0, 5 5, 6 3)")); + line2 = lwgeom_as_lwline(lwgeom_from_text("LINESTRING EMPTY")); + ret = ptarray_append_ptarray(line1->points, line2->points, -1); + CU_ASSERT(ret == LW_SUCCESS); + wkt = lwgeom_to_text(lwline_as_lwgeom(line1)); + CU_ASSERT_STRING_EQUAL(wkt, "LINESTRING(0 0,5 5,6 3)"); + lwfree(wkt); + lwline_free(line2); + lwline_free(line1); + + /* Both lines empty */ + line1 = lwgeom_as_lwline(lwgeom_from_text("LINESTRING EMPTY")); + line2 = lwgeom_as_lwline(lwgeom_from_text("LINESTRING EMPTY")); + ret = ptarray_append_ptarray(line1->points, line2->points, -1); + CU_ASSERT(ret == LW_SUCCESS); + wkt = lwgeom_to_text(lwline_as_lwgeom(line1)); + CU_ASSERT_STRING_EQUAL(wkt, "LINESTRING EMPTY"); + lwfree(wkt); + lwline_free(line2); + lwline_free(line1); + + /* Sane sewing */ + line1 = lwgeom_as_lwline(lwgeom_from_text("LINESTRING(10 4, 0 0,5 7)")); + line2 = lwgeom_as_lwline(lwgeom_from_text("LINESTRING(5 7,12 43, 42 15)")); + ret = ptarray_append_ptarray(line1->points, line2->points, 0); + CU_ASSERT(ret == LW_SUCCESS); + wkt = lwgeom_to_text(lwline_as_lwgeom(line1)); + CU_ASSERT_STRING_EQUAL(wkt, "LINESTRING(10 4,0 0,5 7,12 43,42 15)"); + lwfree(wkt); + lwline_free(line2); + lwline_free(line1); + + /* Untolerated sewing */ + line1 = lwgeom_as_lwline(lwgeom_from_text("LINESTRING(10 4, 0 0,5 7)")); + line2 = lwgeom_as_lwline(lwgeom_from_text("LINESTRING(5.5 7,12 43, 42 15)")); + ret = ptarray_append_ptarray(line1->points, line2->points, 0); + CU_ASSERT(ret == LW_FAILURE); + lwline_free(line2); + lwline_free(line1); + + /* Tolerated sewing */ + line1 = lwgeom_as_lwline(lwgeom_from_text("LINESTRING(10 4, 0 0,5 7)")); + line2 = lwgeom_as_lwline(lwgeom_from_text("LINESTRING(5.5 7,12 43, 42 15)")); + ret = ptarray_append_ptarray(line1->points, line2->points, .7); + CU_ASSERT(ret == LW_SUCCESS); + wkt = lwgeom_to_text(lwline_as_lwgeom(line1)); + CU_ASSERT_STRING_EQUAL(wkt, "LINESTRING(10 4,0 0,5 7,5.5 7,12 43,42 15)"); + lwfree(wkt); + lwline_free(line2); + lwline_free(line1); + + /* Check user input trust (creates non-simple line */ + line1 = lwgeom_as_lwline(lwgeom_from_text("LINESTRING(0 0,0 10)")); + line2 = lwgeom_as_lwline(lwgeom_from_text("LINESTRING(0 0,0 10)")); + ret = ptarray_append_ptarray(line1->points, line2->points, -1); + CU_ASSERT(ret == LW_SUCCESS); + wkt = lwgeom_to_text(lwline_as_lwgeom(line1)); + CU_ASSERT_STRING_EQUAL(wkt, "LINESTRING(0 0,0 10,0 0,0 10)"); + lwfree(wkt); + lwline_free(line2); + lwline_free(line1); + + /* Mixed dimensionality is not allowed */ + line1 = lwgeom_as_lwline(lwgeom_from_text("LINESTRING(0 10 0, 10 0 0)")); + line2 = lwgeom_as_lwline(lwgeom_from_text("LINESTRING(10 0,11 0)")); + ret = ptarray_append_ptarray(line1->points, line2->points, -1); + CU_ASSERT(ret == LW_FAILURE); + lwline_free(line2); + lwline_free(line1); + + /* Appending a read-only pointarray is allowed */ + line1 = lwgeom_as_lwline(lwgeom_from_text("LINESTRING(0 10, 10 0)")); + line2 = lwgeom_as_lwline(lwgeom_from_text("LINESTRING(10 0,11 0)")); + FLAGS_SET_READONLY(line2->points->flags, 1); + ret = ptarray_append_ptarray(line1->points, line2->points, -1); + CU_ASSERT(ret == LW_SUCCESS); + wkt = lwgeom_to_text(lwline_as_lwgeom(line1)); + CU_ASSERT_STRING_EQUAL(wkt, "LINESTRING(0 10,10 0,11 0)"); + lwfree(wkt); + lwline_free(line2); + lwline_free(line1); + + /* Appending to a read-only pointarray is forbidden */ + line1 = lwgeom_as_lwline(lwgeom_from_text("LINESTRING(0 10, 10 0)")); + line2 = lwgeom_as_lwline(lwgeom_from_text("LINESTRING(10 0,11 0)")); + FLAGS_SET_READONLY(line1->points->flags, 1); + ret = ptarray_append_ptarray(line1->points, line2->points, -1); + CU_ASSERT(ret == LW_FAILURE); + lwline_free(line2); + lwline_free(line1); + +} + +static void test_ptarray_locate_point(void) +{ + LWLINE *line; + double loc, dist; + POINT4D p, l; + + line = lwgeom_as_lwline(lwgeom_from_text("LINESTRING(0 3,20 4)")); + + p = getPoint4d(line->points, 0); + loc = ptarray_locate_point(line->points, &p, &dist, &l); + CU_ASSERT_EQUAL(loc, 0); + CU_ASSERT_EQUAL(dist, 0.0); + + p = getPoint4d(line->points, 1); + loc = ptarray_locate_point(line->points, &p, &dist, &l); + CU_ASSERT_EQUAL(loc, 1); + CU_ASSERT_EQUAL(dist, 0.0); + + p.x = 21; p.y = 4; + loc = ptarray_locate_point(line->points, &p, &dist, NULL); + CU_ASSERT_EQUAL(loc, 1); + CU_ASSERT_EQUAL(dist, 1.0); + + p.x = 0; p.y = 2; + loc = ptarray_locate_point(line->points, &p, &dist, &l); + CU_ASSERT_EQUAL(loc, 0); + CU_ASSERT_EQUAL(dist, 1.0); + + lwline_free(line); + line = lwgeom_as_lwline(lwgeom_from_text("LINESTRING(0 0,20 0,40 0)")); + + p.x = 20; p.y = 0; + loc = ptarray_locate_point(line->points, &p, &dist, &l); + CU_ASSERT_EQUAL(loc, 0.5); + CU_ASSERT_EQUAL(dist, 0.0); + + lwline_free(line); + line = lwgeom_as_lwline(lwgeom_from_text("LINESTRING(-40 0,0 0,20 0,40 0)")); + + p.x = 20; p.y = 0; + loc = ptarray_locate_point(line->points, &p, &dist, &l); + CU_ASSERT_EQUAL(loc, 0.75); + CU_ASSERT_EQUAL(dist, 0.0); + + lwline_free(line); + line = lwgeom_as_lwline(lwgeom_from_text("LINESTRING M (0 0 0, 10 0 20)")); + + p.x = 5; p.y = 0; + loc = ptarray_locate_point(line->points, &p, &dist, &l); + CU_ASSERT_EQUAL(loc, 0.5); + CU_ASSERT_EQUAL(dist, 0.0); + CU_ASSERT_EQUAL(l.m, 10.0); + + lwline_free(line); + +} + +static void test_ptarray_isccw(void) +{ + LWLINE *line; + LWPOLY* poly; + int ccw; + + /* clockwise rectangle */ + line = lwgeom_as_lwline(lwgeom_from_text("LINESTRING(0 0,0 10,10 10,10 0, 0 0)")); + ccw = ptarray_isccw(line->points); + CU_ASSERT_EQUAL(ccw, 0); + lwline_free(line); + + /* clockwise triangle */ + line = lwgeom_as_lwline(lwgeom_from_text("LINESTRING(0 3,20 4,20 3, 0 3)")); + ccw = ptarray_isccw(line->points); + CU_ASSERT_EQUAL(ccw, 0); + lwline_free(line); + + /* counterclockwise triangle */ + line = lwgeom_as_lwline(lwgeom_from_text("LINESTRING(0 3,20 3,20 4, 0 3)")); + ccw = ptarray_isccw(line->points); + CU_ASSERT_EQUAL(ccw, 1); + lwline_free(line); + + /* counterclockwise narrow ring (see ticket #1302) */ + line = lwgeom_as_lwline(lwgeom_from_hexwkb("01020000000500000000917E9BA468294100917E9B8AEA284137894120A4682941C976BE9F8AEA2841B39ABE1FA46829415ACCC29F8AEA2841C976BE1FA4682941C976BE9F8AEA284100917E9BA468294100917E9B8AEA2841", LW_PARSER_CHECK_NONE)); + ccw = ptarray_isccw(line->points); + CU_ASSERT_EQUAL(ccw, 1); + lwline_free(line); + + /* clockwise narrow ring (see ticket #1302) */ + line = lwgeom_as_lwline(lwgeom_from_hexwkb("01020000000500000000917E9BA468294100917E9B8AEA2841C976BE1FA4682941C976BE9F8AEA2841B39ABE1FA46829415ACCC29F8AEA284137894120A4682941C976BE9F8AEA284100917E9BA468294100917E9B8AEA2841", LW_PARSER_CHECK_NONE)); + ccw = ptarray_isccw(line->points); + CU_ASSERT_EQUAL(ccw, 0); + lwline_free(line); + + /* Clockwise narrow ring (see ticket #1302) */ + poly = lwgeom_as_lwpoly(lwgeom_from_hexwkb("0103000000010000000500000000917E9BA468294100917E9B8AEA2841C976BE1FA4682941C976BE9F8AEA2841B39ABE1FA46829415ACCC29F8AEA284137894120A4682941C976BE9F8AEA284100917E9BA468294100917E9B8AEA2841", LW_PARSER_CHECK_NONE)); + ccw = ptarray_isccw(poly->rings[0]); + CU_ASSERT_EQUAL(ccw, 0); + lwpoly_free(poly); +} + +static void test_ptarray_desegmentize() +{ + LWGEOM *in, *out; + char *str; + + /* It would be nice if this example returned two arcs (it's the intersection of two circles) + but it looks like the intersection itself is too sloppy in generating the derived point + to accurately reconstruct the circles. + in = lwgeom_from_text("POLYGON((0.5 0,0.471177920604846 -0.292635483024192,0.38581929876693 -0.574025148547634,0.247204418453818 -0.833355349529403,0.0606601717798223 -1.06066017177982,-5.44089437167602e-17 -1.11044268820754,-0.0606601717798188 -1.06066017177982,-0.247204418453816 -0.833355349529406,-0.385819298766929 -0.574025148547639,-0.471177920604845 -0.292635483024197,-0.5 -4.84663372329776e-15,-0.471177920604847 0.292635483024187,-0.385819298766932 0.57402514854763,-0.247204418453821 0.833355349529398,-0.0606601717798256 1.06066017177982,3.45538806345173e-16 1.11044268820754,0.0606601717798183 1.06066017177982,0.247204418453816 0.833355349529407,0.385819298766929 0.574025148547638,0.471177920604845 0.292635483024196,0.5 0))"); + out = lwgeom_desegmentize(in); + str = lwgeom_to_wkt(out, WKT_ISO, 8, NULL); + printf("%s\n", str); + CU_ASSERT_STRING_EQUAL(str, "CIRCULARSTRING(-1 0,0 1,0 -1)"); + lwgeom_free(in); + lwgeom_free(out); + lwfree(str); + */ + + in = lwgeom_from_text("LINESTRING(-1 0, 0 1, 1 0, 0 -1)"); + out = lwgeom_desegmentize(in); + str = lwgeom_to_wkt(out, WKT_ISO, 8, NULL); + CU_ASSERT_STRING_EQUAL(str, "CIRCULARSTRING(-1 0,0 1,0 -1)"); + lwgeom_free(in); + lwgeom_free(out); + lwfree(str); + + in = lwgeom_from_text("LINESTRING(-1 0, 0 1, 1 0, 0 -1, -1 -1)"); + out = lwgeom_desegmentize(in); + str = lwgeom_to_wkt(out, WKT_ISO, 8, NULL); + CU_ASSERT_STRING_EQUAL(str, "COMPOUNDCURVE(CIRCULARSTRING(-1 0,0 1,0 -1),(0 -1,-1 -1))"); + lwgeom_free(in); + lwgeom_free(out); + lwfree(str); + + in = lwgeom_from_text("LINESTRING(-3 -3,-1 0, 0 1, 1 0, 0 -1, 0 -1.5, 0 -2, -1 -3, 0 -4, 1 -3,5 5)"); + out = lwgeom_desegmentize(in); + str = lwgeom_to_wkt(out, WKT_ISO, 8, NULL); + CU_ASSERT_STRING_EQUAL(str, "COMPOUNDCURVE((-3 -3,-1 0),CIRCULARSTRING(-1 0,0 1,0 -1),(0 -1,0 -1.5,0 -2),CIRCULARSTRING(0 -2,-1 -3,1 -3),(1 -3,5 5))"); + lwgeom_free(in); + lwgeom_free(out); + lwfree(str); + + in = lwgeom_from_text("LINESTRING(-1 0, 0 1, 1 0, 0 -1, -1 -2, 0 -3, 1 -2)"); + out = lwgeom_desegmentize(in); + str = lwgeom_to_wkt(out, WKT_ISO, 8, NULL); + CU_ASSERT_STRING_EQUAL(str, "COMPOUNDCURVE(CIRCULARSTRING(-1 0,0 1,0 -1),CIRCULARSTRING(0 -1,-1 -2,1 -2))"); + lwgeom_free(in); + lwgeom_free(out); + lwfree(str); + + in = lwgeom_segmentize(lwgeom_from_text("COMPOUNDCURVE((0 0, 1 1), CIRCULARSTRING(1 1, 2 2, 3 1), (3 1, 4 4))"),8); + out = lwgeom_desegmentize(in); + str = lwgeom_to_wkt(out, WKT_ISO, 8, NULL); + CU_ASSERT_STRING_EQUAL(str, "COMPOUNDCURVE((0 0,1 1,1 1),CIRCULARSTRING(1 1,1.8049097 1.9807853,3 1),(3 1,4 4))"); + lwgeom_free(in); + lwgeom_free(out); +// printf("%s\n", str); + lwfree(str); + +} + +/* +** Used by the test harness to register the tests in this file. +*/ +CU_TestInfo ptarray_tests[] = +{ + PG_TEST(test_ptarray_append_point), + PG_TEST(test_ptarray_append_ptarray), + PG_TEST(test_ptarray_locate_point), + PG_TEST(test_ptarray_isccw), + PG_TEST(test_ptarray_desegmentize), + PG_TEST(test_ptarray_insert_point), + CU_TEST_INFO_NULL +}; +CU_SuiteInfo ptarray_suite = {"ptarray", NULL, NULL, ptarray_tests }; diff -Nru postgis-1.5.3/liblwgeom/cunit/cu_split.c postgis-2.0.1/liblwgeom/cunit/cu_split.c --- postgis-1.5.3/liblwgeom/cunit/cu_split.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/cunit/cu_split.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,137 @@ +/********************************************************************** + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * + * Copyright (C) 2011 Sandro Santilli + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include "CUnit/Basic.h" +#include "cu_tester.h" + +#include "liblwgeom.h" +#include "liblwgeom_internal.h" + +static void test_lwline_split_by_point_to(void) +{ +#if POSTGIS_GEOS_VERSION >= 33 + LWLINE *line; + LWPOINT *point; + LWMLINE *coll; + int ret; + + /* Because i don't trust that much prior tests... ;) */ + cu_error_msg_reset(); + + coll = lwmline_construct_empty(SRID_UNKNOWN, 0, 0); + CU_ASSERT_EQUAL(coll->ngeoms, 0); + + line = lwgeom_as_lwline(lwgeom_from_wkt("LINESTRING(0 0,5 5, 10 0))", + LW_PARSER_CHECK_NONE)); + CU_ASSERT(line != NULL); + + point = lwgeom_as_lwpoint(lwgeom_from_wkt( + "POINT(0 0)", + LW_PARSER_CHECK_NONE)); + ret = lwline_split_by_point_to(line, point, coll); + CU_ASSERT_EQUAL(ret, 1); + CU_ASSERT_EQUAL(coll->ngeoms, 0); + lwpoint_free(point); + + point = lwgeom_as_lwpoint(lwgeom_from_wkt( + "POINT(10 0)", + LW_PARSER_CHECK_NONE)); + ret = lwline_split_by_point_to(line, point, coll); + CU_ASSERT_EQUAL(ret, 1); + CU_ASSERT_EQUAL(coll->ngeoms, 0); + lwpoint_free(point); + + point = lwgeom_as_lwpoint(lwgeom_from_wkt( + "POINT(5 0)", + LW_PARSER_CHECK_NONE)); + ret = lwline_split_by_point_to(line, point, coll); + CU_ASSERT_EQUAL(ret, 0); + CU_ASSERT_EQUAL(coll->ngeoms, 0); + lwpoint_free(point); + + point = lwgeom_as_lwpoint(lwgeom_from_wkt( + "POINT(5 5)", + LW_PARSER_CHECK_NONE)); + ret = lwline_split_by_point_to(line, point, coll); + CU_ASSERT_EQUAL(ret, 2); + CU_ASSERT_EQUAL(coll->ngeoms, 2); + lwpoint_free(point); + + point = lwgeom_as_lwpoint(lwgeom_from_wkt( + "POINT(2 2)", + LW_PARSER_CHECK_NONE)); + ret = lwline_split_by_point_to(line, point, coll); + CU_ASSERT_EQUAL(ret, 2); + CU_ASSERT_EQUAL(coll->ngeoms, 4); + lwpoint_free(point); + + lwcollection_free((LWCOLLECTION*)coll); + lwline_free(line); + +#endif /* POSTGIS_GEOS_VERSION >= 33 */ +} + +static void test_lwgeom_split(void) +{ + LWGEOM *geom, *blade, *ret; + char *wkt, *in_wkt; + + geom = lwgeom_from_wkt( +"MULTILINESTRING((-5 -2,0 0),(0 0,10 10))", + LW_PARSER_CHECK_NONE); + CU_ASSERT(geom != NULL); + blade = lwgeom_from_wkt( + "POINT(0 0)", + LW_PARSER_CHECK_NONE); + CU_ASSERT(blade != NULL); + ret = lwgeom_split(geom, blade); + CU_ASSERT(ret != NULL); + wkt = lwgeom_to_ewkt(ret); + in_wkt = "GEOMETRYCOLLECTION(LINESTRING(-5 -2,0 0),LINESTRING(0 0,10 10))"; + if (strcmp(in_wkt, wkt)) + fprintf(stderr, "\nExp: %s\nObt: %s\n", in_wkt, wkt); + CU_ASSERT_STRING_EQUAL(wkt, in_wkt); + lwfree(wkt); + lwgeom_free(ret); + lwgeom_free(geom); + lwgeom_free(blade); + + /* See #1311 */ + geom = lwgeom_from_wkt( + "LINESTRING(0 0,10 0,20 4,0 3)", + LW_PARSER_CHECK_NONE); + CU_ASSERT(geom != NULL); + blade = lwgeom_from_wkt("POINT(10 0)", LW_PARSER_CHECK_NONE); + ret = lwgeom_split(geom, blade); + CU_ASSERT(ret != NULL); + wkt = lwgeom_to_ewkt(ret); + in_wkt = "GEOMETRYCOLLECTION(LINESTRING(0 0,10 0),LINESTRING(10 0,20 4,0 3))"; + if (strcmp(in_wkt, wkt)) + fprintf(stderr, "\nExp: %s\nObt: %s\n", in_wkt, wkt); + CU_ASSERT_STRING_EQUAL(wkt, in_wkt); + lwfree(wkt); + lwgeom_free(ret); + lwgeom_free(geom); + lwgeom_free(blade); +} + + +/* +** Used by test harness to register the tests in this file. +*/ +CU_TestInfo split_tests[] = +{ + PG_TEST(test_lwline_split_by_point_to), + PG_TEST(test_lwgeom_split), + CU_TEST_INFO_NULL +}; +CU_SuiteInfo split_suite = {"split", NULL, NULL, split_tests}; diff -Nru postgis-1.5.3/liblwgeom/cunit/cu_stringbuffer.c postgis-2.0.1/liblwgeom/cunit/cu_stringbuffer.c --- postgis-1.5.3/liblwgeom/cunit/cu_stringbuffer.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/cunit/cu_stringbuffer.c 2012-03-13 17:08:59.000000000 +0000 @@ -0,0 +1,59 @@ +/********************************************************************** + * $Id$ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * + * Copyright 2012 Sandro Santilli + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include +#include +#include +#include "CUnit/Basic.h" + +#include "stringbuffer.h" +#include "cu_tester.h" + + +static void test_stringbuffer_append(void) +{ + stringbuffer_t *sb; + const char *str; + + sb = stringbuffer_create_with_size(2); + stringbuffer_append(sb, "hello world"); + str = stringbuffer_getstring(sb); + + CU_ASSERT_STRING_EQUAL("hello world", str); +} + +static void test_stringbuffer_aprintf(void) +{ + stringbuffer_t *sb; + const char *str; + + sb = stringbuffer_create_with_size(2); + stringbuffer_aprintf(sb, "hello %dth world", 14); + str = stringbuffer_getstring(sb); + + CU_ASSERT_STRING_EQUAL("hello 14th world", str); +} + + +/* TODO: add more... */ + +/* +** Used by the test harness to register the tests in this file. +*/ +CU_TestInfo stringbuffer_tests[] = +{ + PG_TEST(test_stringbuffer_append), + PG_TEST(test_stringbuffer_aprintf), + CU_TEST_INFO_NULL +}; +CU_SuiteInfo stringbuffer_suite = {"stringbuffer", NULL, NULL, stringbuffer_tests }; diff -Nru postgis-1.5.3/liblwgeom/cunit/cu_surface.c postgis-2.0.1/liblwgeom/cunit/cu_surface.c --- postgis-1.5.3/liblwgeom/cunit/cu_surface.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/cunit/cu_surface.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,576 @@ +/********************************************************************** + * $Id:$ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * Copyright 2010-2012 Olivier Courtin + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include "cu_surface.h" + +static void check_tgeom(char *ewkt, int type, uint32_t srid, int is_solid); + +void triangle_parse(void) +{ + LWGEOM *geom; + GSERIALIZED *g; + char *tmp; + + cu_error_msg_reset(); /* Because i don't trust that much prior tests... ;) */ + + /* 2 dims */ + geom = lwgeom_from_wkt("TRIANGLE((0 1,2 3,4 5,0 1))", LW_PARSER_CHECK_NONE); + CU_ASSERT_EQUAL(strlen(cu_error_msg), 0); + CU_ASSERT_EQUAL(geom->type, TRIANGLETYPE); + tmp = lwgeom_to_ewkt(geom); + CU_ASSERT_STRING_EQUAL("TRIANGLE((0 1,2 3,4 5,0 1))", tmp); + lwfree(tmp); + lwgeom_free(geom); + /* 3DM */ + geom = lwgeom_from_wkt("TRIANGLEM((0 1 2,3 4 5,6 7 8,0 1 2))", LW_PARSER_CHECK_NONE); + CU_ASSERT_EQUAL(strlen(cu_error_msg), 0); + CU_ASSERT_EQUAL(geom->type, TRIANGLETYPE); + tmp = lwgeom_to_ewkt(geom); + CU_ASSERT_STRING_EQUAL("TRIANGLEM((0 1 2,3 4 5,6 7 8,0 1 2))", tmp); + lwfree(tmp); + lwgeom_free(geom); + + /* ERROR: a missing Z values */ + geom = lwgeom_from_wkt("TRIANGLE((0 1 2,3 4 5,6 7,0 1 2))", LW_PARSER_CHECK_NONE); + CU_ASSERT_STRING_EQUAL("can not mix dimensionality in a geometry", cu_error_msg); + cu_error_msg_reset(); + lwgeom_free(geom); + + /* ERROR: non closed rings */ + geom = lwgeom_from_wkt("TRIANGLE((0 1 2,3 4 5,6 7 8,0 0 2))", LW_PARSER_CHECK_NONE); + CU_ASSERT_STRING_EQUAL("geometry contains non-closed rings", cu_error_msg); + cu_error_msg_reset(); + lwgeom_free(geom); + + /* ERROR: non closed face in Z dim */ + geom = lwgeom_from_wkt("TRIANGLE((0 1 2,3 4 5,6 7 8,0 1 3))", LW_PARSER_CHECK_NONE); + CU_ASSERT_STRING_EQUAL("geometry contains non-closed rings", cu_error_msg); + cu_error_msg_reset(); + lwgeom_free(geom); + + /* ERROR: non closed face in Z dim, with a 4D geom */ + geom = lwgeom_from_wkt("TRIANGLE((0 1 2 3,4 5 6 7,8 9 10 11,0 1 3 3))", LW_PARSER_CHECK_NONE); + CU_ASSERT_STRING_EQUAL("geometry contains non-closed rings", cu_error_msg); + cu_error_msg_reset(); + lwgeom_free(geom); + + /* ERROR: only 3 points in a face */ + geom = lwgeom_from_wkt("TRIANGLE((0 1 2,3 4 5,0 1 2))", LW_PARSER_CHECK_NONE); + CU_ASSERT_STRING_EQUAL("triangle must have exactly 4 points", cu_error_msg); + cu_error_msg_reset(); + lwgeom_free(geom); + + /* ERROR: more than 4 points in a face */ + geom = lwgeom_from_wkt("TRIANGLE((0 1 2,3 4 5,6 7 8,9 10 11,0 1 2))", LW_PARSER_CHECK_NONE); + CU_ASSERT_STRING_EQUAL("triangle must have exactly 4 points", cu_error_msg); + cu_error_msg_reset(); + lwgeom_free(geom); + + /* ERROR: no interior rings allowed */ + geom = lwgeom_from_wkt("TRIANGLE((0 1 2,3 4 5,6 7 8,0 1 2),(9 10 11,12 13 14,15 16 17,9 10 11)", LW_PARSER_CHECK_NONE); + CU_ASSERT_STRING_EQUAL("parse error - invalid geometry", cu_error_msg); + cu_error_msg_reset(); + lwgeom_free(geom); + + /* EMPTY face */ + geom = lwgeom_from_wkt("TRIANGLE EMPTY", LW_PARSER_CHECK_NONE); + CU_ASSERT_EQUAL(strlen(cu_error_msg), 0); + CU_ASSERT_EQUAL(geom->type, TRIANGLETYPE); + CU_ASSERT_STRING_EQUAL("TRIANGLE EMPTY", lwgeom_to_wkt(geom, LW_PARSER_CHECK_NONE, 0, 0)); + lwgeom_free(geom); + + /* explicit SRID */ + geom = lwgeom_from_wkt("SRID=4326;TRIANGLE((0 1 2,3 4 5,6 7 8,0 1 2))", LW_PARSER_CHECK_NONE); + CU_ASSERT_EQUAL(strlen(cu_error_msg), 0); + CU_ASSERT_EQUAL(geom->type, TRIANGLETYPE); + CU_ASSERT_EQUAL(geom->srid, 4326); + tmp = lwgeom_to_ewkt(geom); + CU_ASSERT_STRING_EQUAL("SRID=4326;TRIANGLE((0 1 2,3 4 5,6 7 8,0 1 2))", tmp); + lwfree(tmp); + lwgeom_free(geom); + + /* geography support */ + geom = lwgeom_from_wkt("TRIANGLE((0 1 2,3 4 5,6 7 8,0 1 2))", LW_PARSER_CHECK_NONE); + g = gserialized_from_lwgeom(geom, 1, 0); + CU_ASSERT_EQUAL(gserialized_get_type(g), TRIANGLETYPE); + lwgeom_free(geom); + lwfree(g); +} + + +void tin_parse(void) +{ + LWGEOM *geom; + GSERIALIZED *g; + char *tmp; + + cu_error_msg_reset(); /* Because i don't trust that much prior tests... ;) */ + + /* empty */ + geom = lwgeom_from_wkt("TIN EMPTY", LW_PARSER_CHECK_NONE); + CU_ASSERT_EQUAL(strlen(cu_error_msg), 0); + CU_ASSERT_EQUAL(geom->type, TINTYPE); + tmp = lwgeom_to_ewkt(geom); + CU_ASSERT_STRING_EQUAL("TIN EMPTY", tmp); + lwgeom_free(geom); + + /* 2 dims */ + geom = lwgeom_from_wkt("TIN(((0 1,2 3,4 5,0 1)))", LW_PARSER_CHECK_NONE); + CU_ASSERT_EQUAL(strlen(cu_error_msg), 0); + CU_ASSERT_EQUAL(geom->type, TINTYPE); + tmp = lwgeom_to_ewkt(geom); + CU_ASSERT_STRING_EQUAL("TIN(((0 1,2 3,4 5,0 1)))", tmp); + lwfree(tmp); + lwgeom_free(geom); + + /* 3DM */ + geom = lwgeom_from_wkt("TINM(((0 1 2,3 4 5,6 7 8,0 1 2)))", LW_PARSER_CHECK_NONE); + CU_ASSERT_EQUAL(strlen(cu_error_msg), 0); + CU_ASSERT_EQUAL(geom->type, TINTYPE); + tmp = lwgeom_to_ewkt(geom); + CU_ASSERT_STRING_EQUAL("TINM(((0 1 2,3 4 5,6 7 8,0 1 2)))", tmp); + lwfree(tmp); + lwgeom_free(geom); + + /* ERROR: a missing Z values */ + geom = lwgeom_from_wkt("TIN(((0 1 2,3 4 5,6 7,0 1 2)))", LW_PARSER_CHECK_NONE); + CU_ASSERT_STRING_EQUAL("can not mix dimensionality in a geometry", cu_error_msg); + cu_error_msg_reset(); + lwgeom_free(geom); + + /* ERROR: non closed rings */ + geom = lwgeom_from_wkt("TIN(((0 1 2,3 4 5,6 7 8,0 0 2)))", LW_PARSER_CHECK_NONE); + CU_ASSERT_STRING_EQUAL("geometry contains non-closed rings", cu_error_msg); + cu_error_msg_reset(); + lwgeom_free(geom); + + /* ERROR: non closed face in Z dim */ + geom = lwgeom_from_wkt("TIN(((0 1 2,3 4 5,6 7 8,0 1 3)))", LW_PARSER_CHECK_NONE); + CU_ASSERT_STRING_EQUAL("geometry contains non-closed rings", cu_error_msg); + cu_error_msg_reset(); + lwgeom_free(geom); + + /* ERROR: non closed face in Z dim, with a 4D geom */ + geom = lwgeom_from_wkt("TIN(((0 1 2 3,4 5 6 7,8 9 10 11,0 1 3 3)))", LW_PARSER_CHECK_NONE); + CU_ASSERT_STRING_EQUAL("geometry contains non-closed rings", cu_error_msg); + cu_error_msg_reset(); + lwgeom_free(geom); + + /* ERROR: only 3 points in a face */ + geom = lwgeom_from_wkt("TIN(((0 1 2,3 4 5,0 1 2)))", LW_PARSER_CHECK_NONE); + CU_ASSERT_STRING_EQUAL("triangle must have exactly 4 points", cu_error_msg); + cu_error_msg_reset(); + lwgeom_free(geom); + + /* ERROR: more than 3 points in a face */ + geom = lwgeom_from_wkt("TIN(((0 1 2,3 4 5,6 7 8,9 10 11,0 1 2)))", LW_PARSER_CHECK_NONE); + CU_ASSERT_STRING_EQUAL("triangle must have exactly 4 points", cu_error_msg); + cu_error_msg_reset(); + lwgeom_free(geom); + + /* ERROR: use ring for triangle */ + geom = lwgeom_from_wkt("TIN(((0 1 2,3 4 5,6 7 8,0 1 2),(9 10 11,12 13 14,15 16 17,9 10 11)))", LW_PARSER_CHECK_NONE); + CU_ASSERT_STRING_EQUAL("parse error - invalid geometry", cu_error_msg); + cu_error_msg_reset(); + lwgeom_free(geom); + + /* EMPTY face */ + geom = lwgeom_from_wkt("TIN EMPTY", LW_PARSER_CHECK_NONE); + CU_ASSERT_EQUAL(strlen(cu_error_msg), 0); + CU_ASSERT_EQUAL(geom->type, TINTYPE); + CU_ASSERT_STRING_EQUAL("TIN EMPTY", lwgeom_to_ewkt(geom)); + lwgeom_free(geom); + + /* A simple tetrahedron */ + geom = lwgeom_from_wkt("TIN(((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))", LW_PARSER_CHECK_NONE); + CU_ASSERT_EQUAL(strlen(cu_error_msg), 0); + CU_ASSERT_EQUAL(geom->type, TINTYPE); + CU_ASSERT_EQUAL(geom->srid, SRID_UNKNOWN); + tmp = lwgeom_to_ewkt(geom); + CU_ASSERT_STRING_EQUAL("TIN(((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))", tmp); + lwfree(tmp); + lwgeom_free(geom); + + /* A 4D tetrahedron */ + geom = lwgeom_from_wkt("TIN(((0 0 0 0,0 0 1 0,0 1 0 2,0 0 0 0)),((0 0 0 0,0 1 0 0,1 0 0 4,0 0 0 0)),((0 0 0 0,1 0 0 0,0 0 1 6,0 0 0 0)),((1 0 0 0,0 1 0 0,0 0 1 0,1 0 0 0)))", LW_PARSER_CHECK_NONE); + CU_ASSERT_EQUAL(strlen(cu_error_msg), 0); + CU_ASSERT_EQUAL(geom->type, TINTYPE); + CU_ASSERT_EQUAL(FLAGS_GET_M(geom->flags), 1); + CU_ASSERT_EQUAL(geom->srid, SRID_UNKNOWN); + tmp = lwgeom_to_ewkt(geom); + CU_ASSERT_STRING_EQUAL("TIN(((0 0 0 0,0 0 1 0,0 1 0 2,0 0 0 0)),((0 0 0 0,0 1 0 0,1 0 0 4,0 0 0 0)),((0 0 0 0,1 0 0 0,0 0 1 6,0 0 0 0)),((1 0 0 0,0 1 0 0,0 0 1 0,1 0 0 0)))", tmp); + lwfree(tmp); + lwgeom_free(geom); + + /* explicit SRID */ + geom = lwgeom_from_wkt("SRID=4326;TIN(((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))", LW_PARSER_CHECK_NONE); + CU_ASSERT_EQUAL(strlen(cu_error_msg), 0); + CU_ASSERT_EQUAL(geom->type, TINTYPE); + CU_ASSERT_EQUAL(geom->srid, 4326); + tmp = lwgeom_to_ewkt(geom); + CU_ASSERT_STRING_EQUAL("SRID=4326;TIN(((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))", tmp); + lwfree(tmp); + lwgeom_free(geom); + + /* geography support */ + geom = lwgeom_from_wkt("TIN(((0 1 2,3 4 5,6 7 8,0 1 2)))", LW_PARSER_CHECK_NONE); + g = gserialized_from_lwgeom(geom, 1, 0); + CU_ASSERT_EQUAL(gserialized_get_type(g), TINTYPE); + lwgeom_free(geom); + lwfree(g); +} + + +static void +check_tgeom(char *ewkt, int type, uint32_t srid, int is_solid) +{ + LWGEOM *g1, *g2; + TGEOM *tgeom, *tgeom2; + TSERIALIZED *tser; + + g1 = lwgeom_from_wkt(ewkt, LW_PARSER_CHECK_NONE); + if (strlen(cu_error_msg)) printf("\n[%s], %s\n", ewkt, cu_error_msg); + CU_ASSERT_EQUAL(strlen(cu_error_msg), 0); + + if (g1->type != type) + printf("\n[%s], TYPE %s\n", ewkt, lwtype_name(g1->type)); + CU_ASSERT_EQUAL(g1->type, type); + tgeom = tgeom_from_lwgeom(g1); + + if (srid != tgeom->srid) + printf("\n[%s], srid %i / %i\n", ewkt, srid, tgeom->srid); + CU_ASSERT_EQUAL(srid, tgeom->srid); + + if (FLAGS_GET_SOLID(tgeom->flags) != is_solid) + printf("\n[%s], solid %i / %i\n", ewkt, + FLAGS_GET_SOLID(tgeom->flags), is_solid); + CU_ASSERT_EQUAL(FLAGS_GET_SOLID(tgeom->flags), is_solid); + + g2 = lwgeom_from_tgeom(tgeom); + if (!lwgeom_same(g1, g2)) + { + printf("\n[%s]\nlwgeom_same I\n", ewkt); + printTGEOM(tgeom); + if (type == TINTYPE) + { + printLWTIN((LWTIN *)g1); + printLWTIN((LWTIN *)g2); + } + else + { + printLWPSURFACE((LWPSURFACE *)g1); + printLWPSURFACE((LWPSURFACE *)g2); + } + } + CU_ASSERT(lwgeom_same(g1, g2)); + + lwgeom_free(g2); + tser = tgeom_serialize(tgeom); + tgeom2 = tgeom_deserialize(tser); + lwfree(tser); + g2 = lwgeom_from_tgeom(tgeom2); + tgeom_free(tgeom2); + + if (!lwgeom_same(g1, g2)) + { + printf("\n[%s]\n, lwgeom_same II\n", ewkt); + printTGEOM(tgeom); + printTGEOM(tgeom2); + if (type == TINTYPE) + { + printLWTIN((LWTIN *)g1); + printLWTIN((LWTIN *)g2); + } + else + { + printLWPSURFACE((LWPSURFACE *)g1); + printLWPSURFACE((LWPSURFACE *)g2); + } + } + CU_ASSERT(lwgeom_same(g1, g2)); + + lwgeom_free(g1); + lwgeom_free(g2); + tgeom_free(tgeom); +} + + +void polyhedralsurface_parse(void) +{ + LWGEOM *geom; + GSERIALIZED *g; + char *tmp; + + cu_error_msg_reset(); /* Because i don't trust that much prior tests... ;) */ + + /* 2 dims */ + geom = lwgeom_from_wkt("POLYHEDRALSURFACE(((0 1,2 3,4 5,0 1)))", LW_PARSER_CHECK_NONE); + CU_ASSERT_EQUAL(strlen(cu_error_msg), 0); + CU_ASSERT_EQUAL(geom->type, POLYHEDRALSURFACETYPE); + tmp = lwgeom_to_hexwkb(geom, WKB_NDR | WKB_EXTENDED, 0); + CU_ASSERT_STRING_EQUAL("010F00000001000000010300000001000000040000000000000000000000000000000000F03F00000000000000400000000000000840000000000000104000000000000014400000000000000000000000000000F03F", tmp); + lwfree(tmp); + tmp = lwgeom_to_ewkt(geom); + CU_ASSERT_STRING_EQUAL("POLYHEDRALSURFACE(((0 1,2 3,4 5,0 1)))", tmp); + lwfree(tmp); + lwgeom_free(geom); + + /* 3DM */ + geom = lwgeom_from_wkt("POLYHEDRALSURFACEM(((0 1 2,3 4 5,6 7 8,0 1 2)))", LW_PARSER_CHECK_NONE); + CU_ASSERT_EQUAL(strlen(cu_error_msg), 0); + CU_ASSERT_EQUAL(geom->type, POLYHEDRALSURFACETYPE); + tmp = lwgeom_to_ewkt(geom); + CU_ASSERT_STRING_EQUAL("POLYHEDRALSURFACEM(((0 1 2,3 4 5,6 7 8,0 1 2)))", tmp); + lwfree(tmp); + tmp = lwgeom_to_hexwkb(geom, WKB_NDR | WKB_EXTENDED, 0); + CU_ASSERT_STRING_EQUAL("010F00004001000000010300004001000000040000000000000000000000000000000000F03F000000000000004000000000000008400000000000001040000000000000144000000000000018400000000000001C4000000000000020400000000000000000000000000000F03F0000000000000040", tmp); + lwfree(tmp); + lwgeom_free(geom); + + /* ERROR: a missing Z values */ + geom = lwgeom_from_wkt("POLYHEDRALSURFACE(((0 1 2,3 4 5,6 7,0 1 2)))", LW_PARSER_CHECK_NONE); + CU_ASSERT_STRING_EQUAL("can not mix dimensionality in a geometry", cu_error_msg); + cu_error_msg_reset(); + lwgeom_free(geom); + + /* 1 face with 1 interior ring */ + geom = lwgeom_from_wkt("POLYHEDRALSURFACE(((0 1 2,3 4 5,6 7 8,0 1 2),(9 10 11,12 13 14,15 16 17,9 10 11)))", LW_PARSER_CHECK_NONE); + CU_ASSERT_EQUAL(strlen(cu_error_msg), 0); + CU_ASSERT_EQUAL(geom->type, POLYHEDRALSURFACETYPE); + tmp = lwgeom_to_ewkt(geom); + CU_ASSERT_STRING_EQUAL("POLYHEDRALSURFACE(((0 1 2,3 4 5,6 7 8,0 1 2),(9 10 11,12 13 14,15 16 17,9 10 11)))", tmp); + lwfree(tmp); + tmp = lwgeom_to_hexwkb(geom, WKB_NDR | WKB_EXTENDED, 0); + CU_ASSERT_STRING_EQUAL("010F00008001000000010300008002000000040000000000000000000000000000000000F03F000000000000004000000000000008400000000000001040000000000000144000000000000018400000000000001C4000000000000020400000000000000000000000000000F03F00000000000000400400000000000000000022400000000000002440000000000000264000000000000028400000000000002A400000000000002C400000000000002E4000000000000030400000000000003140000000000000224000000000000024400000000000002640", tmp); + lwfree(tmp); + lwgeom_free(geom); + + /* ERROR: non closed rings */ + geom = lwgeom_from_wkt("POLYHEDRALSURFACE(((0 1 2,3 4 5,6 7 8,0 0 2)))", LW_PARSER_CHECK_ALL); + CU_ASSERT_STRING_EQUAL("geometry contains non-closed rings", cu_error_msg); + cu_error_msg_reset(); + lwgeom_free(geom); + + /* ERROR: non closed face in Z dim */ + geom = lwgeom_from_wkt("POLYHEDRALSURFACE(((0 1 2,3 4 5,6 7 8,0 1 3)))", LW_PARSER_CHECK_ALL); + CU_ASSERT_STRING_EQUAL("geometry contains non-closed rings", cu_error_msg); + cu_error_msg_reset(); + lwgeom_free(geom); + + /* ERROR: non closed face in Z dim, with a 4D geom */ + geom = lwgeom_from_wkt("POLYHEDRALSURFACE(((0 1 2 3,4 5 6 7,8 9 10 11,0 1 3 3)))", LW_PARSER_CHECK_ALL); + CU_ASSERT_STRING_EQUAL("geometry contains non-closed rings", cu_error_msg); + cu_error_msg_reset(); + lwgeom_free(geom); + + /* ERROR: only 3 points in a face */ + geom = lwgeom_from_wkt("POLYHEDRALSURFACE(((0 1 2,3 4 5,0 1 2)))", LW_PARSER_CHECK_ALL); + CU_ASSERT_STRING_EQUAL("geometry requires more points", cu_error_msg); + cu_error_msg_reset(); + lwgeom_free(geom); + + /* EMPTY face */ + geom = lwgeom_from_wkt("POLYHEDRALSURFACE EMPTY", LW_PARSER_CHECK_NONE); + CU_ASSERT_EQUAL(strlen(cu_error_msg), 0); + CU_ASSERT_EQUAL(geom->type, POLYHEDRALSURFACETYPE); + CU_ASSERT_STRING_EQUAL("010F00000000000000", lwgeom_to_wkb(geom, WKB_HEX | WKB_ISO | WKB_NDR, 0)); + CU_ASSERT_STRING_EQUAL("POLYHEDRALSURFACE EMPTY", lwgeom_to_ewkt(geom)); + lwgeom_free(geom); + + /* A simple tetrahedron */ + geom = lwgeom_from_wkt("POLYHEDRALSURFACE(((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))", LW_PARSER_CHECK_NONE); + CU_ASSERT_EQUAL(strlen(cu_error_msg), 0); + CU_ASSERT_EQUAL(geom->type, POLYHEDRALSURFACETYPE); + CU_ASSERT_EQUAL(geom->srid, SRID_UNKNOWN); + tmp = lwgeom_to_ewkt(geom); + CU_ASSERT_STRING_EQUAL("POLYHEDRALSURFACE(((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))", tmp); + lwfree(tmp); + tmp = lwgeom_to_hexwkb(geom, WKB_NDR | WKB_EXTENDED, 0); + CU_ASSERT_STRING_EQUAL("010F000080040000000103000080010000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000F03F0000000000000000000000000000F03F0000000000000000000000000000000000000000000000000000000000000000010300008001000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000F03F0000000000000000000000000000F03F0000000000000000000000000000000000000000000000000000000000000000000000000000000001030000800100000004000000000000000000000000000000000000000000000000000000000000000000F03F0000000000000000000000000000000000000000000000000000000000000000000000000000F03F00000000000000000000000000000000000000000000000001030000800100000004000000000000000000F03F000000000000000000000000000000000000000000000000000000000000F03F000000000000000000000000000000000000000000000000000000000000F03F000000000000F03F00000000000000000000000000000000", tmp); + lwfree(tmp); + lwgeom_free(geom); + + /* A 4D tetrahedron */ + geom = lwgeom_from_wkt("POLYHEDRALSURFACE(((0 0 0 0,0 0 1 0,0 1 0 2,0 0 0 0)),((0 0 0 0,0 1 0 0,1 0 0 4,0 0 0 0)),((0 0 0 0,1 0 0 0,0 0 1 6,0 0 0 0)),((1 0 0 0,0 1 0 0,0 0 1 0,1 0 0 0)))", LW_PARSER_CHECK_NONE); + CU_ASSERT_EQUAL(strlen(cu_error_msg), 0); + CU_ASSERT_EQUAL(geom->type, POLYHEDRALSURFACETYPE); + CU_ASSERT_EQUAL(FLAGS_GET_M(geom->flags), 1); + CU_ASSERT_EQUAL(geom->srid, SRID_UNKNOWN); + tmp = lwgeom_to_ewkt(geom); + CU_ASSERT_STRING_EQUAL("POLYHEDRALSURFACE(((0 0 0 0,0 0 1 0,0 1 0 2,0 0 0 0)),((0 0 0 0,0 1 0 0,1 0 0 4,0 0 0 0)),((0 0 0 0,1 0 0 0,0 0 1 6,0 0 0 0)),((1 0 0 0,0 1 0 0,0 0 1 0,1 0 0 0)))", tmp); + lwfree(tmp); + tmp = lwgeom_to_hexwkb(geom, WKB_NDR | WKB_EXTENDED, 0); + CU_ASSERT_STRING_EQUAL("010F0000C00400000001030000C00100000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000F03F00000000000000000000000000000000000000000000F03F00000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000001030000C0010000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000F03F00000000000000000000000000000000000000000000F03F000000000000000000000000000000000000000000001040000000000000000000000000000000000000000000000000000000000000000001030000C001000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000F03F00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000F03F0000000000001840000000000000000000000000000000000000000000000000000000000000000001030000C00100000004000000000000000000F03F0000000000000000000000000000000000000000000000000000000000000000000000000000F03F0000000000000000000000000000000000000000000000000000000000000000000000000000F03F0000000000000000000000000000F03F000000000000000000000000000000000000000000000000", tmp); + lwfree(tmp); + lwgeom_free(geom); + + + /* explicit SRID */ + geom = lwgeom_from_wkt("SRID=4326;POLYHEDRALSURFACE(((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))", LW_PARSER_CHECK_NONE); + CU_ASSERT_EQUAL(strlen(cu_error_msg), 0); + CU_ASSERT_EQUAL(geom->type, POLYHEDRALSURFACETYPE); + CU_ASSERT_EQUAL(geom->srid, 4326); + tmp = lwgeom_to_ewkt(geom); + CU_ASSERT_STRING_EQUAL("SRID=4326;POLYHEDRALSURFACE(((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))", tmp); + lwfree(tmp); + tmp = lwgeom_to_hexwkb(geom, WKB_NDR | WKB_EXTENDED, 0); + CU_ASSERT_STRING_EQUAL("010F0000A0E6100000040000000103000080010000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000F03F0000000000000000000000000000F03F0000000000000000000000000000000000000000000000000000000000000000010300008001000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000F03F0000000000000000000000000000F03F0000000000000000000000000000000000000000000000000000000000000000000000000000000001030000800100000004000000000000000000000000000000000000000000000000000000000000000000F03F0000000000000000000000000000000000000000000000000000000000000000000000000000F03F00000000000000000000000000000000000000000000000001030000800100000004000000000000000000F03F000000000000000000000000000000000000000000000000000000000000F03F000000000000000000000000000000000000000000000000000000000000F03F000000000000F03F00000000000000000000000000000000", tmp); + lwfree(tmp); + lwgeom_free(geom); + + + /* geography support */ + geom = lwgeom_from_wkt("POLYHEDRALSURFACE(((0 1 2,3 4 5,6 7 8,0 1 2)))", LW_PARSER_CHECK_NONE); + g = gserialized_from_lwgeom(geom, 1, 0); + CU_ASSERT_EQUAL(gserialized_get_type(g), POLYHEDRALSURFACETYPE); + lwgeom_free(geom); + lwfree(g); +} + +void +tin_tgeom(void) +{ + /* EMPTY TIN */ + check_tgeom("TIN EMPTY", TINTYPE, 0, 0); + + /* 2D a single face */ + check_tgeom("TIN(((0 0,0 1,1 1,0 0)))", TINTYPE, 0, 0); + + /* 3DM a single face */ + check_tgeom("TINM(((0 1 2,3 4 5,6 7 8,0 1 2)))", TINTYPE, 0, 0); + + /* 4D a single face */ + check_tgeom("TIN(((0 1 2 3,4 5 6 7,8 9 10 11,0 1 2 3)))", TINTYPE, 0, 0); + + /* 3D a simple polyhedron */ + check_tgeom("TIN(((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))", TINTYPE, 0, 1); + + /* 3D a simple polyhedron with SRID */ + check_tgeom("SRID=4326;TIN(((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))", TINTYPE, 4326, 1); +} + + +void +psurface_tgeom(void) +{ + /* EMPTY POLYHEDRALSURFACE */ + check_tgeom("POLYHEDRALSURFACE EMPTY", POLYHEDRALSURFACETYPE, 0, 0); + + /* 2D a single face */ + check_tgeom("POLYHEDRALSURFACE(((0 0,0 1,1 1,0 0)))", POLYHEDRALSURFACETYPE, 0, 0); + + /* 3DM a single face */ + check_tgeom("POLYHEDRALSURFACEM(((0 1 2,3 4 5,6 7 8,0 1 2)))", POLYHEDRALSURFACETYPE, 0, 0); + + /* 4D a single face */ + check_tgeom("POLYHEDRALSURFACE(((0 1 2 3,4 5 6 7,8 9 10 11,0 1 2 3)))", POLYHEDRALSURFACETYPE, 0, 0); + + /* 3D a simple polyhedron */ + check_tgeom("POLYHEDRALSURFACE(((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))", POLYHEDRALSURFACETYPE, 0, 1); + + /* 3D a simple polyhedron with SRID */ + check_tgeom("SRID=4326;POLYHEDRALSURFACE(((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))", POLYHEDRALSURFACETYPE, 4326, 1); + + /* 4D a simple polyhedron */ + check_tgeom("POLYHEDRALSURFACE(((0 0 0 1,0 0 1 2,0 1 0 3,0 0 0 1)),((0 0 0 4,0 1 0 5,1 0 0 6,0 0 0 4)),((0 0 0 7,1 0 0 8,0 0 1 9,0 0 0 7)),((1 0 0 10,0 1 0 11,0 0 1 12,1 0 0 10)))", POLYHEDRALSURFACETYPE, 0, 0); + + /* 2D single face with one internal ring */ + check_tgeom("POLYHEDRALSURFACE(((0 1,2 3,4 5,0 1),(6 7,8 9,10 11,6 7)))", POLYHEDRALSURFACETYPE, 0, 0); + + /* 2D single face with two internal rings */ + check_tgeom("POLYHEDRALSURFACE(((0 1,2 3,4 5,0 1),(6 7,8 9,10 11,6 7),(12 13,14 15,16 17,12 13)))", POLYHEDRALSURFACETYPE, 0, 0); + + /* 4D single face with two internal rings */ + check_tgeom("POLYHEDRALSURFACE(((0 1 2 3,4 5 6 7,8 9 10 11,0 1 2 3),(12 13 14 15,16 17 18 19,20 21 22 23,12 13 14 15),(16 17 18 19,20 21 22 23,24 25 26 27,16 17 18 19)))", POLYHEDRALSURFACETYPE, 0, 0); +} + + +static void +check_dimension(char *ewkt, int dim) +{ + LWGEOM *geom; + + geom = lwgeom_from_wkt(ewkt, LW_PARSER_CHECK_NONE); + CU_ASSERT_EQUAL(strlen(cu_error_msg), 0); + CU_ASSERT_EQUAL(lwgeom_dimensionality(geom), dim); + lwgeom_free(geom); +} + +void +surface_dimension(void) +{ + /* 2D */ + check_dimension("POLYHEDRALSURFACE(((0 0,0 1,1 1,0 0)))", 2); + check_dimension("TIN(((0 0,0 1,1 1,0 0)))", 2); + + /* 3D single face */ + check_dimension("POLYHEDRALSURFACE(((0 0 0,0 0 1,0 1 0,0 0 0)))", 2); + check_dimension("TIN(((0 0 0,0 0 1,0 1 0,0 0 0)))", 2); + + /* Tetrahedron */ + check_dimension("POLYHEDRALSURFACE(((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))", 3); + check_dimension("TIN(((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))", 3); +} + + +static void +check_perimeter(char *ewkt, int dim, double p) +{ + LWGEOM *geom; + TGEOM *tgeom; + + geom = lwgeom_from_wkt(ewkt, LW_PARSER_CHECK_NONE); + CU_ASSERT_EQUAL(strlen(cu_error_msg), 0); + tgeom = tgeom_from_lwgeom(geom); + + if (dim == 2) CU_ASSERT_DOUBLE_EQUAL(tgeom_perimeter2d(tgeom), p, 0.01); + if (dim == 3) CU_ASSERT_DOUBLE_EQUAL(tgeom_perimeter(tgeom), p, 0.01); + + tgeom_free(tgeom); + lwgeom_free(geom); +} + +void +surface_perimeter(void) +{ + /* 2D single face */ + check_perimeter("POLYHEDRALSURFACE(((0 0,0 1,1 1,0 0)))", 2, 3.4142); + check_perimeter("TIN(((0 0,0 1,1 1,0 0)))", 2, 3.4142); + + /* 3D single face */ + check_perimeter("POLYHEDRALSURFACE(((0 0 0,0 0 1,0 1 0,0 0 0)))", 3, 3.4142); + check_perimeter("TIN(((0 0 0,0 0 1,0 1 0,0 0 0)))", 3, 3.4142); + + /* 3D Tetrahedron */ + check_perimeter("POLYHEDRALSURFACE(((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))", 3, 0.0); + check_perimeter("TIN(((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))", 3, 0.0); +} + + +/* +** Used by test harness to register the tests in this file. +*/ +/* +** Used by test harness to register the tests in this file. +*/ +CU_TestInfo surface_tests[] = +{ + PG_TEST(triangle_parse), + PG_TEST(tin_parse), + PG_TEST(polyhedralsurface_parse), + PG_TEST(tin_tgeom), + PG_TEST(psurface_tgeom), + PG_TEST(surface_dimension), + PG_TEST(surface_perimeter), + CU_TEST_INFO_NULL +}; +CU_SuiteInfo surface_suite = {"surface", NULL, NULL, surface_tests}; diff -Nru postgis-1.5.3/liblwgeom/cunit/cu_surface.h postgis-2.0.1/liblwgeom/cunit/cu_surface.h --- postgis-1.5.3/liblwgeom/cunit/cu_surface.h 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/cunit/cu_surface.h 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,29 @@ +/********************************************************************** + * $Id:$ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * Copyright 2010 Olivier Courtin + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include +#include +#include +#include "CUnit/Basic.h" + +#include "liblwgeom_internal.h" +#include "libtgeom.h" +#include "cu_tester.h" + +/* Test functions */ +void triangle_parse(void); +void tin_parse(void); +void polyhedralsurface_parse(void); +void tin_tgeom(void); +void psurface_tgeom(void); +void surface_dimension(void); +void surface_perimeter(void); diff -Nru postgis-1.5.3/liblwgeom/cunit/cu_tester.c postgis-2.0.1/liblwgeom/cunit/cu_tester.c --- postgis-1.5.3/liblwgeom/cunit/cu_tester.c 2009-09-17 05:33:35.000000000 +0000 +++ postgis-2.0.1/liblwgeom/cunit/cu_tester.c 2012-05-09 12:08:06.000000000 +0000 @@ -1,9 +1,9 @@ /********************************************************************** - * $Id: cu_tester.c 4508 2009-09-17 05:33:35Z pramsey $ + * $Id: cu_tester.c 9730 2012-05-09 12:08:06Z strk $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net - * Copyright 2008 Paul Ramsey + * Copyright 2008 Paul Ramsey * * This is free software; you can redistribute and/or modify it under * the terms of the GNU General Public Licence. See the COPYING file. @@ -13,65 +13,232 @@ #include #include #include "CUnit/Basic.h" -#include "liblwgeom.h" +#include "liblwgeom_internal.h" #include "cu_tester.h" - -/* -** Set up liblwgeom to run in stand-alone mode using the -** usual system memory handling functions. -*/ -void lwgeom_init_allocators(void) -{ - /* liblwgeom callback - install default handlers */ - lwgeom_install_default_allocators(); -} +/* ADD YOUR SUITE HERE (1 of 2) */ +extern CU_SuiteInfo print_suite; +extern CU_SuiteInfo algorithms_suite; +extern CU_SuiteInfo buildarea_suite; +extern CU_SuiteInfo clean_suite; +extern CU_SuiteInfo misc_suite; +extern CU_SuiteInfo ptarray_suite; +extern CU_SuiteInfo measures_suite; +extern CU_SuiteInfo node_suite; +extern CU_SuiteInfo wkt_out_suite; +extern CU_SuiteInfo wkt_in_suite; +extern CU_SuiteInfo wkb_out_suite; +extern CU_SuiteInfo wkb_in_suite; +extern CU_SuiteInfo libgeom_suite; +extern CU_SuiteInfo split_suite; +extern CU_SuiteInfo geodetic_suite; +extern CU_SuiteInfo geos_suite; +extern CU_SuiteInfo homogenize_suite; +extern CU_SuiteInfo stringbuffer_suite; +extern CU_SuiteInfo surface_suite; +extern CU_SuiteInfo out_gml_suite; +extern CU_SuiteInfo out_kml_suite; +extern CU_SuiteInfo out_geojson_suite; +extern CU_SuiteInfo out_svg_suite; +extern CU_SuiteInfo out_x3d_suite; /* ** The main() function for setting up and running the tests. ** Returns a CUE_SUCCESS on successful running, another ** CUnit error code on failure. */ -int main() +int main(int argc, char *argv[]) { + /* ADD YOUR SUITE HERE (2 of 2) */ + CU_SuiteInfo suites[] = + { + print_suite, + misc_suite, + ptarray_suite, + algorithms_suite, + buildarea_suite, + clean_suite, + measures_suite, + node_suite, + wkt_out_suite, + wkt_in_suite, + wkb_out_suite, + wkb_in_suite, + libgeom_suite, + split_suite, + geodetic_suite, + geos_suite, + stringbuffer_suite, + surface_suite, + homogenize_suite, + out_gml_suite, + out_kml_suite, + out_geojson_suite, + out_svg_suite, + out_x3d_suite, + CU_SUITE_INFO_NULL + }; + + int index; + char *suite_name; + CU_pSuite suite_to_run; + char *test_name; + CU_pTest test_to_run; + CU_ErrorCode errCode = 0; + CU_pTestRegistry registry; + int num_run; + int num_failed; /* initialize the CUnit test registry */ if (CUE_SUCCESS != CU_initialize_registry()) - return CU_get_error(); - - /* Add the algorithms suite to the registry */ - if (NULL == register_cg_suite()) { - CU_cleanup_registry(); - return CU_get_error(); + errCode = CU_get_error(); + printf(" Error attempting to initialize registry: %d. See CUError.h for error code list.\n", errCode); + return errCode; } - /* Add the measures suite to the registry */ - if (NULL == register_measures_suite()) + /* Register all the test suites. */ + if (CUE_SUCCESS != CU_register_suites(suites)) { - CU_cleanup_registry(); - return CU_get_error(); + errCode = CU_get_error(); + printf(" Error attempting to register test suites: %d. See CUError.h for error code list.\n", errCode); + return errCode; } - /* Add the libgeom suite to the registry */ - if (NULL == register_libgeom_suite()) + /* Run all tests using the CUnit Basic interface */ + CU_basic_set_mode(CU_BRM_VERBOSE); + if (argc <= 1) { - CU_cleanup_registry(); - return CU_get_error(); + errCode = CU_basic_run_tests(); } + else + { + /* NOTE: The cunit functions used here (CU_get_registry, CU_get_suite_by_name, and CU_get_test_by_name) are + * listed with the following warning: "Internal CUnit system functions. Should not be routinely called by users." + * However, there didn't seem to be any other way to get tests by name, so we're calling them. */ + registry = CU_get_registry(); + for (index = 1; index < argc; index++) + { + suite_name = argv[index]; + test_name = NULL; + suite_to_run = CU_get_suite_by_name(suite_name, registry); + if (NULL == suite_to_run) + { + /* See if it's a test name instead of a suite name. */ + suite_to_run = registry->pSuite; + while (suite_to_run != NULL) + { + test_to_run = CU_get_test_by_name(suite_name, suite_to_run); + if (test_to_run != NULL) + { + /* It was a test name. */ + test_name = suite_name; + suite_name = suite_to_run->pName; + break; + } + suite_to_run = suite_to_run->pNext; + } + } + if (suite_to_run == NULL) + { + printf("\n'%s' does not appear to be either a suite name or a test name.\n\n", suite_name); + } + else + { + if (test_name != NULL) + { + /* Run only this test. */ + printf("\nRunning test '%s' in suite '%s'.\n", test_name, suite_name); + /* This should be CU_basic_run_test, but that method is broken, see: + * https://sourceforge.net/tracker/?func=detail&aid=2851925&group_id=32992&atid=407088 + * This one doesn't output anything for success, so we have to do it manually. */ + errCode = CU_run_test(suite_to_run, test_to_run); + if (errCode != CUE_SUCCESS) + { + printf(" Error attempting to run tests: %d. See CUError.h for error code list.\n", errCode); + } + else + { + num_run = CU_get_number_of_asserts(); + num_failed = CU_get_number_of_failures(); + printf("\n %s - asserts - %3d passed, %3d failed, %3d total.\n\n", + (0 == num_failed ? "PASSED" : "FAILED"), (num_run - num_failed), num_failed, num_run); + } + } + else + { + /* Run all the tests in the suite. */ + printf("\nRunning all tests in suite '%s'.\n", suite_name); + /* This should be CU_basic_run_suite, but that method is broken, see: + * https://sourceforge.net/tracker/?func=detail&aid=2851925&group_id=32992&atid=407088 + * This one doesn't output anything for success, so we have to do it manually. */ + errCode = CU_run_suite(suite_to_run); + if (errCode != CUE_SUCCESS) + { + printf(" Error attempting to run tests: %d. See CUError.h for error code list.\n", errCode); + } + else + { + num_run = CU_get_number_of_tests_run(); + num_failed = CU_get_number_of_tests_failed(); + printf("\n %s - tests - %3d passed, %3d failed, %3d total.\n", + (0 == num_failed ? "PASSED" : "FAILED"), (num_run - num_failed), num_failed, num_run); + num_run = CU_get_number_of_asserts(); + num_failed = CU_get_number_of_failures(); + printf(" - asserts - %3d passed, %3d failed, %3d total.\n\n", + (num_run - num_failed), num_failed, num_run); + } + } + } + } + /* Presumably if the CU_basic_run_[test|suite] functions worked, we wouldn't have to do this. */ + CU_basic_show_failures(CU_get_failure_list()); + printf("\n\n"); /* basic_show_failures leaves off line breaks. */ + } + num_failed = CU_get_number_of_failures(); + CU_cleanup_registry(); + return num_failed; +} +/** + * CUnit error handler + * Log message in a global var instead of printing in stderr + * + * CAUTION: Not stop execution on lwerror case !!! + */ +static void +cu_errorreporter(const char *fmt, va_list ap) +{ + char *msg; - /* Add the geodetic suite to the registry */ - if (NULL == register_geodetic_suite()) + /** This is a GNU extension. + * Dunno how to handle errors here. + */ + if (!lw_vasprintf (&msg, fmt, ap)) { - CU_cleanup_registry(); - return CU_get_error(); + va_end (ap); + return; } - /* Run all tests using the CUnit Basic interface */ - CU_basic_set_mode(CU_BRM_VERBOSE); - CU_basic_run_tests(); - CU_cleanup_registry(); + strncpy(cu_error_msg, msg, MAX_CUNIT_ERROR_LENGTH); + lwfree(msg); +} - return CU_get_error(); +void +cu_error_msg_reset() +{ + memset(cu_error_msg, '\0', MAX_CUNIT_ERROR_LENGTH); +} +/* +** Set up liblwgeom to run in stand-alone mode using the +** usual system memory handling functions. +*/ +void lwgeom_init_allocators(void) +{ + lwalloc_var = default_allocator; + lwrealloc_var = default_reallocator; + lwfree_var = default_freeor; + lwnotice_var = default_noticereporter; + lwerror_var = cu_errorreporter; } + diff -Nru postgis-1.5.3/liblwgeom/cunit/cu_tester.h postgis-2.0.1/liblwgeom/cunit/cu_tester.h --- postgis-1.5.3/liblwgeom/cunit/cu_tester.h 2009-11-30 20:50:57.000000000 +0000 +++ postgis-2.0.1/liblwgeom/cunit/cu_tester.h 2012-02-27 22:08:12.000000000 +0000 @@ -1,16 +1,20 @@ +/********************************************************************** + * $Id: cu_tester.h 9324 2012-02-27 22:08:12Z pramsey $ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ -CU_pSuite register_measures_suite(void); -CU_pSuite register_geodetic_suite(void); -CU_pSuite register_libgeom_suite(void); -CU_pSuite register_cg_suite(void); +#define PG_TEST(test_func) { #test_func, test_func } +#define MAX_CUNIT_ERROR_LENGTH 512 -int init_measures_suite(void); -int init_geodetic_suite(void); -int init_libgeom_suite(void); -int init_cg_suite(void); +/* Contains the most recent error message generated by lwerror. */ +char cu_error_msg[MAX_CUNIT_ERROR_LENGTH+1]; -int clean_measures_suite(void); -int clean_geodetic_suite(void); -int clean_libgeom_suite(void); -int clean_cg_suite(void); +/* Resets cu_error_msg back to blank. */ +void cu_error_msg_reset(void); diff -Nru postgis-1.5.3/liblwgeom/examples/Makefile postgis-2.0.1/liblwgeom/examples/Makefile --- postgis-1.5.3/liblwgeom/examples/Makefile 2008-09-16 22:29:54.000000000 +0000 +++ postgis-2.0.1/liblwgeom/examples/Makefile 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -# -# liblwgeom examples Makefile -# - -all: - gcc -I../ -o unparser unparser.c ../liblwgeom.a -lm - -clean: - rm -f unparser diff -Nru postgis-1.5.3/liblwgeom/examples/README postgis-2.0.1/liblwgeom/examples/README --- postgis-1.5.3/liblwgeom/examples/README 2008-09-16 22:29:54.000000000 +0000 +++ postgis-2.0.1/liblwgeom/examples/README 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -liblwgeom API examples -====================== - -This directory contains examples of how to use the liblwgeom API from other C programs. Since liblwgeom is a static library, it is currently limited to tools within the PostGIS source tree. However, it is envisaged that programmers may make use of this interface to produce other geometry processing tools that can input and output WKT and WKB (which is, of course, easily loadable into PostGIS). - - -Mark. diff -Nru postgis-1.5.3/liblwgeom/examples/unparser.c postgis-2.0.1/liblwgeom/examples/unparser.c --- postgis-1.5.3/liblwgeom/examples/unparser.c 2010-02-01 17:35:55.000000000 +0000 +++ postgis-2.0.1/liblwgeom/examples/unparser.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,196 +0,0 @@ -/********************************************************************** - * $Id: unparser.c 5181 2010-02-01 17:35:55Z pramsey $ - * - * PostGIS - Spatial Types for PostgreSQL - * http://postgis.refractions.net - * Copyright 2001-2006 Refractions Research Inc. - * - * This is free software; you can redistribute and/or modify it under - * the terms of the GNU General Public Licence. See the COPYING file. - * - **********************************************************************/ - -#include -#include - -#include "liblwgeom.h" - - -void lwgeom_init_allocators() -{ - /* - * Any program linked into liblwgeom *MUST* have a function called lwgeom_init_allocators() - * defined. The first time that a memory allocation is required, liblwgeom calls this function - * to enable the user to setup their own functions for lwalloc/lwfree. Hence when being called - * from PostGIS we can ensure we use palloc/pfree for all memory requests rather than the - * system memory management calls. - * - * Since using the standard malloc/free is likely to be a common option, liblwgeom contains a - * function called lwgeom_install_default_allocators() which sets this up for you. Hence most - * people will only ever need this line within their lwgeom_init_allocations() function. - */ - - lwgeom_install_default_allocators(); -} - - -int main() -{ - /* - * An example to show how to call the WKT/WKB unparsers in liblwgeom - */ - LWGEOM_UNPARSER_RESULT lwg_unparser_result; - int result; - - LWGEOM *lwgeom; - uchar *serialized_lwgeom; - - DYNPTARRAY *dpa; - POINT4D point4d; - POINTARRAY **rings; - - LWPOINT *testpoint; - LWLINE *testline; - LWPOLY *testpoly; - - - /* - * Construct a geometry equivalent to POINT(0 51) - */ - - dpa = dynptarray_create(10, 2); - point4d.x = 0; - point4d.y = 51; - - dynptarray_addPoint4d(dpa, &point4d, 0); - - testpoint = lwpoint_construct(-1, NULL, dpa->pa); - - /* Generate the LWGEOM from LWPOINT, then serialize it ready for the parser */ - lwgeom = lwpoint_as_lwgeom(testpoint); - serialized_lwgeom = lwgeom_serialize(lwgeom); - - /* Output the geometry in WKT and WKB */ - result = serialized_lwgeom_to_ewkt(&lwg_unparser_result, serialized_lwgeom, PARSER_CHECK_ALL); - printf("WKT format : %s\n", lwg_unparser_result.wkoutput); - result = serialized_lwgeom_to_hexwkb(&lwg_unparser_result, serialized_lwgeom, PARSER_CHECK_ALL, NDR); - printf("HEXWKB format : %s\n\n", lwg_unparser_result.wkoutput); - - /* Free all of the allocated items */ - lwfree(lwg_unparser_result.wkoutput); - lwfree(serialized_lwgeom); - lwpoint_free(testpoint); - lwfree(dpa); - - - /* - * Construct a geometry equivalent to LINESTRING(0 0, 2 2, 4 1) - */ - - dpa = dynptarray_create(10, 2); - point4d.x = 0; - point4d.y = 0; - dynptarray_addPoint4d(dpa, &point4d, 0); - - point4d.x = 2; - point4d.y = 2; - dynptarray_addPoint4d(dpa, &point4d, 0); - - point4d.x = 4; - point4d.y = 1; - dynptarray_addPoint4d(dpa, &point4d, 0); - - testline = lwline_construct(-1, NULL, dpa->pa); - - /* Generate the LWGEOM from LWLINE, then serialize it ready for the parser */ - lwgeom = lwline_as_lwgeom(testline); - serialized_lwgeom = lwgeom_serialize(lwgeom); - - /* Output the geometry in WKT and WKB */ - result = serialized_lwgeom_to_ewkt(&lwg_unparser_result, serialized_lwgeom, PARSER_CHECK_ALL); - printf("WKT format : %s\n", lwg_unparser_result.wkoutput); - result = serialized_lwgeom_to_hexwkb(&lwg_unparser_result, serialized_lwgeom, PARSER_CHECK_ALL, NDR); - printf("HEXWKB format : %s\n\n", lwg_unparser_result.wkoutput); - - /* Free all of the allocated items */ - lwfree(lwg_unparser_result.wkoutput); - lwfree(serialized_lwgeom); - lwline_free(testline); - lwfree(dpa); - - - /* - * Construct a geometry equivalent to POLYGON((0 0, 0 10, 10 10, 10 0, 0 0)(3 3, 3 6, 6 6, 6 3, 3 3)) - */ - - /* Allocate memory for the rings */ - rings = lwalloc(sizeof(POINTARRAY) * 2); - - /* Construct the first ring */ - dpa = dynptarray_create(10, 2); - point4d.x = 0; - point4d.y = 0; - dynptarray_addPoint4d(dpa, &point4d, 0); - - point4d.x = 0; - point4d.y = 10; - dynptarray_addPoint4d(dpa, &point4d, 0); - - point4d.x = 10; - point4d.y = 10; - dynptarray_addPoint4d(dpa, &point4d, 0); - - point4d.x = 10; - point4d.y = 0; - dynptarray_addPoint4d(dpa, &point4d, 0); - - point4d.x = 0; - point4d.y = 0; - dynptarray_addPoint4d(dpa, &point4d, 0); - - rings[0] = dpa->pa; - lwfree(dpa); - - /* Construct the second ring */ - dpa = dynptarray_create(10, 2); - point4d.x = 3; - point4d.y = 3; - dynptarray_addPoint4d(dpa, &point4d, 0); - - point4d.x = 3; - point4d.y = 6; - dynptarray_addPoint4d(dpa, &point4d, 0); - - point4d.x = 6; - point4d.y = 6; - dynptarray_addPoint4d(dpa, &point4d, 0); - - point4d.x = 6; - point4d.y = 3; - dynptarray_addPoint4d(dpa, &point4d, 0); - - point4d.x = 3; - point4d.y = 3; - dynptarray_addPoint4d(dpa, &point4d, 0); - - rings[1] = dpa->pa; - lwfree(dpa); - - testpoly = lwpoly_construct(-1, NULL, 2, rings); - - /* Generate the LWGEOM from LWPOLY, then serialize it ready for the parser */ - lwgeom = lwpoly_as_lwgeom(testpoly); - serialized_lwgeom = lwgeom_serialize(lwgeom); - - /* Output the geometry in WKT and WKB */ - result = serialized_lwgeom_to_ewkt(&lwg_unparser_result, serialized_lwgeom, PARSER_CHECK_NONE); - printf("WKT format : %s\n", lwg_unparser_result.wkoutput); - result = serialized_lwgeom_to_hexwkb(&lwg_unparser_result, serialized_lwgeom, PARSER_CHECK_NONE, NDR); - printf("HEXWKB format : %s\n\n", lwg_unparser_result.wkoutput); - - /* Free all of the allocated items */ - lwfree(lwg_unparser_result.wkoutput); - lwfree(serialized_lwgeom); - lwpoly_free(testpoly); - -} diff -Nru postgis-1.5.3/liblwgeom/g_box.c postgis-2.0.1/liblwgeom/g_box.c --- postgis-1.5.3/liblwgeom/g_box.c 2011-06-20 17:01:12.000000000 +0000 +++ postgis-2.0.1/liblwgeom/g_box.c 2012-03-02 23:35:32.000000000 +0000 @@ -1,5 +1,5 @@ /********************************************************************** - * $Id: g_box.c 7434 2011-06-20 17:01:12Z pramsey $ + * $Id: g_box.c 9390 2012-03-02 23:35:32Z pramsey $ * * PostGIS - Spatial Types for PostgreSQL * Copyright 2009 Paul Ramsey @@ -9,17 +9,134 @@ * **********************************************************************/ -#include "libgeom.h" -#include +#include "liblwgeom_internal.h" +#include "lwgeom_log.h" #include -GBOX* gbox_new(uchar flags) +GBOX* gbox_new(uint8_t flags) { GBOX *g = (GBOX*)lwalloc(sizeof(GBOX)); + gbox_init(g); g->flags = flags; return g; } +void gbox_init(GBOX *gbox) +{ + memset(gbox, 0, sizeof(GBOX)); +} + + +/* TODO to be removed */ +BOX3D* box3d_from_gbox(const GBOX *gbox) +{ + BOX3D *b; + assert(gbox); + + b = lwalloc(sizeof(BOX3D)); + + b->xmin = gbox->xmin; + b->xmax = gbox->xmax; + b->ymin = gbox->ymin; + b->ymax = gbox->ymax; + + if ( FLAGS_GET_Z(gbox->flags) ) + { + b->zmin = gbox->zmin; + b->zmax = gbox->zmax; + } + else + { + b->zmin = b->zmax = 0.0; + } + + b->srid = SRID_UNKNOWN; + return b; +} + +/* TODO to be removed */ +GBOX* box3d_to_gbox(const BOX3D *b3d) +{ + GBOX *b; + assert(b3d); + + b = lwalloc(sizeof(GBOX)); + + b->xmin = b3d->xmin; + b->xmax = b3d->xmax; + b->ymin = b3d->ymin; + b->ymax = b3d->ymax; + b->zmin = b3d->zmin; + b->zmax = b3d->zmax; + + return b; +} + +void gbox_expand(GBOX *g, double d) +{ + g->xmin -= d; + g->xmax += d; + g->ymin -= d; + g->ymax += d; + if ( FLAGS_GET_Z(g->flags) ) + { + g->zmin -= d; + g->zmax += d; + } + if ( FLAGS_GET_M(g->flags) ) + { + g->mmin -= d; + g->mmax += d; + } +} + +int gbox_union(const GBOX *g1, const GBOX *g2, GBOX *gout) +{ + if ( (g1 == NULL) && (g2 == NULL) ) + return LW_FALSE; + + if (g1 == NULL) + { + memcpy(gout, g2, sizeof(GBOX)); + return LW_TRUE; + } + if (g2 == NULL) + { + memcpy(gout, g1, sizeof(GBOX)); + return LW_TRUE; + } + + if (g1->xmin < g2->xmin) gout->xmin = g1->xmin; + else gout->xmin = g2->xmin; + + if (g1->ymin < g2->ymin) gout->ymin = g1->ymin; + else gout->ymin = g2->ymin; + + if (g1->xmax > g2->xmax) gout->xmax = g1->xmax; + else gout->xmax = g2->xmax; + + if (g1->ymax > g2->ymax) gout->ymax = g1->ymax; + else gout->ymax = g2->ymax; + + return LW_TRUE; +} + +int gbox_same(const GBOX *g1, const GBOX *g2) +{ + if (FLAGS_GET_ZM(g1->flags) != FLAGS_GET_ZM(g2->flags)) + return LW_FALSE; + + if ( g1->xmin != g2->xmin || g1->ymin != g2->ymin || + g1->xmax != g2->xmax || g1->ymax != g2->ymax ) return LW_FALSE; + + if (FLAGS_GET_Z(g1->flags) && (g1->zmin != g2->zmin || g1->zmax != g2->zmax)) + return LW_FALSE; + if (FLAGS_GET_M(g1->flags) && (g1->mmin != g2->mmin || g1->mmax != g2->mmax)) + return LW_FALSE; + + return LW_TRUE; +} + int gbox_merge_point3d(const POINT3D *p, GBOX *gbox) { if ( gbox->xmin > p->x ) gbox->xmin = p->x; @@ -28,7 +145,7 @@ if ( gbox->xmax < p->x ) gbox->xmax = p->x; if ( gbox->ymax < p->y ) gbox->ymax = p->y; if ( gbox->zmax < p->z ) gbox->zmax = p->z; - return G_SUCCESS; + return LW_SUCCESS; } int gbox_contains_point3d(const GBOX *gbox, const POINT3D *pt) @@ -45,8 +162,8 @@ { assert(merge_box); - if ( merge_box->flags != new_box->flags ) - return G_FAILURE; + if ( FLAGS_GET_ZM(merge_box->flags) != FLAGS_GET_ZM(new_box->flags) ) + return LW_FAILURE; if ( new_box->xmin < merge_box->xmin) merge_box->xmin = new_box->xmin; if ( new_box->ymin < merge_box->ymin) merge_box->ymin = new_box->ymin; @@ -64,7 +181,7 @@ if ( new_box->mmax > merge_box->mmax) merge_box->mmax = new_box->mmax; } - return G_SUCCESS; + return LW_SUCCESS; } int gbox_overlaps(const GBOX *g1, const GBOX *g2) @@ -97,6 +214,21 @@ return LW_TRUE; } +int gbox_overlaps_2d(const GBOX *g1, const GBOX *g2) +{ + + /* Make sure our boxes are consistent */ + if ( FLAGS_GET_GEODETIC(g1->flags) != FLAGS_GET_GEODETIC(g2->flags) ) + lwerror("gbox_overlaps: cannot compare geodetic and non-geodetic boxes"); + + /* Check X/Y first */ + if ( g1->xmax < g2->xmin || g1->ymax < g2->ymin || + g1->xmin > g2->xmax || g1->ymin > g2->ymax ) + return LW_FALSE; + + return LW_TRUE; +} + /** * Warning, this function is only good for x/y/z boxes, used * in unit testing of geodetic box generation. @@ -173,292 +305,115 @@ void gbox_duplicate(const GBOX *original, GBOX *duplicate) { assert(duplicate); - - if ( original->flags != duplicate->flags ) - lwerror("gbox_duplicate: geometries have inconsistent dimensionality"); - - duplicate->xmin = original->xmin; - duplicate->ymin = original->ymin; - duplicate->xmax = original->xmax; - duplicate->ymax = original->ymax; - - if ( FLAGS_GET_GEODETIC(original->flags) || FLAGS_GET_Z(original->flags) ) - { - duplicate->zmin = original->zmin; - duplicate->zmax = original->zmax; - } - if ( FLAGS_GET_M(original->flags) ) - { - duplicate->mmin = original->mmin; - duplicate->mmax = original->mmax; - } - return; + memcpy(duplicate, original, sizeof(GBOX)); } -size_t gbox_serialized_size(uchar flags) +size_t gbox_serialized_size(uint8_t flags) { - if ( ! FLAGS_GET_BBOX(flags) ) return 0; if ( FLAGS_GET_GEODETIC(flags) ) return 6 * sizeof(float); else return 2 * FLAGS_NDIMS(flags) * sizeof(float); } -int gbox_from_gserialized(const GSERIALIZED *g, GBOX *gbox) -{ - - /* Null input! */ - if ( ! g ) return G_FAILURE; - - /* Initialize the flags on the box */ - gbox->flags = g->flags; - - if ( FLAGS_GET_BBOX(g->flags) ) - { - int i = 0; - float *fbox = (float*)(g->data); - gbox->xmin = fbox[i]; - i++; - gbox->xmax = fbox[i]; - i++; - gbox->ymin = fbox[i]; - i++; - gbox->ymax = fbox[i]; - i++; - if ( FLAGS_GET_GEODETIC(g->flags) ) - { - gbox->zmin = fbox[i]; - i++; - gbox->zmax = fbox[i]; - i++; - return G_SUCCESS; - } - if ( FLAGS_GET_Z(g->flags) ) - { - gbox->zmin = fbox[i]; - i++; - gbox->zmax = fbox[i]; - i++; - } - if ( FLAGS_GET_M(g->flags) ) - { - gbox->mmin = fbox[i]; - i++; - gbox->mmax = fbox[i]; - i++; - } - return G_SUCCESS; - } - - LWDEBUG(4, "calculating new box from scratch"); - if ( gserialized_calculate_gbox_geocentric_p(g, gbox) == G_FAILURE ) - { - LWDEBUG(4, "calculated null bbox, returning failure"); - return G_FAILURE; - } - return G_SUCCESS; -} - /* ******************************************************************************** ** Compute cartesian bounding GBOX boxes from LWGEOM. */ -static int lwcircle_calculate_gbox(POINT4D p1, POINT4D p2, POINT4D p3, GBOX *gbox) +static int lwcircle_calculate_gbox_cartesian(const POINT4D *p1, const POINT4D *p2, const POINT4D *p3, GBOX *gbox) { - double x1, x2, y1, y2, z1, z2, m1, m2; - double angle, radius, sweep; - /* angles from center */ - double a1, a2, a3; - /* angles from center once a1 is rotated to zero */ - double r2, r3; - double xe = 0.0, ye = 0.0; - POINT4D *center; - int i; + POINT2D xmin, ymin, xmax, ymax; + POINT4D center; + int p2_side; + double radius; LWDEBUG(2, "lwcircle_calculate_gbox called."); - radius = lwcircle_center(&p1, &p2, &p3, ¢er); - if (radius < 0.0) return G_FAILURE; - - x1 = MAXFLOAT; - x2 = -1 * MAXFLOAT; - y1 = MAXFLOAT; - y2 = -1 * MAXFLOAT; - - a1 = atan2(p1.y - center->y, p1.x - center->x); - a2 = atan2(p2.y - center->y, p2.x - center->x); - a3 = atan2(p3.y - center->y, p3.x - center->x); - - /* Rotate a2 and a3 such that a1 = 0 */ - r2 = a2 - a1; - r3 = a3 - a1; - - /* - * There are six cases here I'm interested in - * Clockwise: - * 1. a1-a2 < 180 == r2 < 0 && (r3 > 0 || r3 < r2) - * 2. a1-a2 > 180 == r2 > 0 && (r3 > 0 && r3 < r2) - * 3. a1-a2 > 180 == r2 > 0 && (r3 > r2 || r3 < 0) - * Counter-clockwise: - * 4. a1-a2 < 180 == r2 > 0 && (r3 < 0 || r3 > r2) - * 5. a1-a2 > 180 == r2 < 0 && (r3 < 0 && r3 > r2) - * 6. a1-a2 > 180 == r2 < 0 && (r3 < r2 || r3 > 0) - * 3 and 6 are invalid cases where a3 is the midpoint. - * BBOX is fundamental, so these cannot error out and will instead - * calculate the sweep using a3 as the middle point. - */ - - /* clockwise 1 */ - if (FP_LT(r2, 0) && (FP_GT(r3, 0) || FP_LT(r3, r2))) - { - sweep = (FP_GT(r3, 0)) ? (r3 - 2 * M_PI) : r3; - } - /* clockwise 2 */ - else if (FP_GT(r2, 0) && FP_GT(r3, 0) && FP_LT(r3, r2)) - { - sweep = (FP_GT(r3, 0)) ? (r3 - 2 * M_PI) : r3; - } - /* counter-clockwise 4 */ - else if (FP_GT(r2, 0) && (FP_LT(r3, 0) || FP_GT(r3, r2))) - { - sweep = (FP_LT(r3, 0)) ? (r3 + 2 * M_PI) : r3; - } - /* counter-clockwise 5 */ - else if (FP_LT(r2, 0) && FP_LT(r3, 0) && FP_GT(r3, r2)) - { - sweep = (FP_LT(r3, 0)) ? (r3 + 2 * M_PI) : r3; - } - /* clockwise invalid 3 */ - else if (FP_GT(r2, 0) && (FP_GT(r3, r2) || FP_LT(r3, 0))) + radius = lwcircle_center(p1, p2, p3, ¢er); + + /* Negative radius signals straight line, p1/p2/p3 are colinear */ + if (radius < 0.0) { - sweep = (FP_GT(r2, 0)) ? (r2 - 2 * M_PI) : r2; + gbox->xmin = FP_MIN(p1->x, p3->x); + gbox->ymin = FP_MIN(p1->y, p3->y); + gbox->zmin = FP_MIN(p1->z, p3->z); + gbox->xmax = FP_MAX(p1->x, p3->x); + gbox->ymax = FP_MAX(p1->y, p3->y); + gbox->zmax = FP_MAX(p1->z, p3->z); + return LW_SUCCESS; } - /* clockwise invalid 6 */ - else + + /* Matched start/end points imply circle */ + if ( p1->x == p3->x && p1->y == p3->y ) { - sweep = (FP_LT(r2, 0)) ? (r2 + 2 * M_PI) : r2; - } - - LWDEBUGF(3, "a1 %.16f, a2 %.16f, a3 %.16f, sweep %.16f", a1, a2, a3, sweep); + gbox->xmin = center.x - radius; + gbox->ymin = center.y - radius; + gbox->zmin = FP_MIN(p1->z,p2->z); + gbox->mmin = FP_MIN(p1->m,p2->m); + gbox->xmax = center.x + radius; + gbox->ymax = center.y + radius; + gbox->zmax = FP_MAX(p1->z,p2->z); + gbox->mmax = FP_MAX(p1->m,p2->m); + return LW_SUCCESS; + } + + /* First approximation, bounds of start/end points */ + gbox->xmin = FP_MIN(p1->x, p3->x); + gbox->ymin = FP_MIN(p1->y, p3->y); + gbox->zmin = FP_MIN(p1->z, p3->z); + gbox->mmin = FP_MIN(p1->m, p3->m); + gbox->xmax = FP_MAX(p1->x, p3->x); + gbox->ymax = FP_MAX(p1->y, p3->y); + gbox->zmax = FP_MAX(p1->z, p3->z); + gbox->mmax = FP_MAX(p1->m, p3->m); + + /* Create points for the possible extrema */ + xmin.x = center.x - radius; + xmin.y = center.y; + ymin.x = center.x; + ymin.y = center.y - radius; + xmax.x = center.x + radius; + xmax.y = center.y; + ymax.x = center.x; + ymax.y = center.y + radius; + + + /* Divide the circle into two parts, one on each side of a line + joining p1 and p3. The circle extrema on the same side of that line + as p2 is on, are also the extrema of the bbox. */ + + p2_side = signum(lw_segment_side((POINT2D*)p1, (POINT2D*)p3, (POINT2D*)p2)); - angle = 0.0; - for (i=0; i < 6; i++) - { - switch (i) - { - /* right extent */ - case 0: - angle = 0.0; - xe = center->x + radius; - ye = center->y; - break; - /* top extent */ - case 1: - angle = M_PI_2; - xe = center->x; - ye = center->y + radius; - break; - /* left extent */ - case 2: - angle = M_PI; - xe = center->x - radius; - ye = center->y; - break; - /* bottom extent */ - case 3: - angle = -1 * M_PI_2; - xe = center->x; - ye = center->y - radius; - break; - /* first point */ - case 4: - angle = a1; - xe = p1.x; - ye = p1.y; - break; - /* last point */ - case 5: - angle = a3; - xe = p3.x; - ye = p3.y; - break; - } - /* determine if the extents are outside the arc */ - if (i < 4) - { - if (FP_GT(sweep, 0.0)) - { - if (FP_LT(a3, a1)) - { - if (FP_GT(angle, (a3 + 2 * M_PI)) || FP_LT(angle, a1)) continue; - } - else - { - if (FP_GT(angle, a3) || FP_LT(angle, a1)) continue; - } - } - else - { - if (FP_GT(a3, a1)) - { - if (FP_LT(angle, (a3 - 2 * M_PI)) || FP_GT(angle, a1)) continue; - } - else - { - if (FP_LT(angle, a3) || FP_GT(angle, a1)) continue; - } - } - } + if ( p2_side == signum(lw_segment_side((POINT2D*)p1, (POINT2D*)p3, &xmin)) ) + gbox->xmin = xmin.x; - LWDEBUGF(3, "lwcircle_calculate_gbox: potential extreame %d (%.16f, %.16f)", i, xe, ye); + if ( p2_side == signum(lw_segment_side((POINT2D*)p1, (POINT2D*)p3, &ymin)) ) + gbox->ymin = ymin.y; - x1 = (FP_LT(x1, xe)) ? x1 : xe; - y1 = (FP_LT(y1, ye)) ? y1 : ye; - x2 = (FP_GT(x2, xe)) ? x2 : xe; - y2 = (FP_GT(y2, ye)) ? y2 : ye; - } - - LWDEBUGF(3, "lwcircle_calculate_gbox: extreames found (%.16f %.16f, %.16f %.16f)", x1, y1, x2, y2); - - z1 = FP_MIN(p1.z, p2.z); - z1 = FP_MIN(z1, p3.z); - z2 = FP_MAX(p1.z, p2.z); - z2 = FP_MAX(z2, p3.z); - - m1 = FP_MIN(p1.m, p2.m); - m1 = FP_MIN(m1, p3.m); - m2 = FP_MAX(p1.m, p2.m); - m2 = FP_MAX(m2, p3.m); - - gbox->xmin = x1; - gbox->xmax = x2; - gbox->ymin = y1; - gbox->ymax = y2; + if ( p2_side == signum(lw_segment_side((POINT2D*)p1, (POINT2D*)p3, &xmax)) ) + gbox->xmax = xmax.x; - if ( FLAGS_GET_Z(gbox->flags) ) - { - gbox->zmin = z1; - gbox->zmax = z2; - } - if ( FLAGS_GET_M(gbox->flags) ) - { - gbox->mmin = m1; - gbox->mmax = m2; - } + if ( p2_side == signum(lw_segment_side((POINT2D*)p1, (POINT2D*)p3, &ymax)) ) + gbox->ymax = ymax.y; - return G_SUCCESS; + return LW_SUCCESS; } -int ptarray_calculate_gbox(const POINTARRAY *pa, GBOX *gbox ) +int ptarray_calculate_gbox_cartesian(const POINTARRAY *pa, GBOX *gbox ) { int i; POINT4D p; - int has_z = FLAGS_GET_Z(gbox->flags); - int has_m = FLAGS_GET_M(gbox->flags); + int has_z, has_m; - if ( ! pa ) return G_FAILURE; - if ( pa->npoints < 1 ) return G_FAILURE; + if ( ! pa ) return LW_FAILURE; + if ( ! gbox ) return LW_FAILURE; + if ( pa->npoints < 1 ) return LW_FAILURE; + + has_z = FLAGS_GET_Z(pa->flags); + has_m = FLAGS_GET_M(pa->flags); + gbox->flags = gflags(has_z, has_m, 0); + LWDEBUGF(4, "ptarray_calculate_gbox Z: %d M: %d", has_z, has_m); getPoint4d_p(pa, 0, &p); gbox->xmin = gbox->xmax = p.x; @@ -486,18 +441,18 @@ gbox->mmax = FP_MAX(gbox->mmax, p.m); } } - return G_SUCCESS; + return LW_SUCCESS; } -static int lwcircstring_calculate_gbox(LWCIRCSTRING *curve, GBOX *gbox) +static int lwcircstring_calculate_gbox_cartesian(LWCIRCSTRING *curve, GBOX *gbox) { - uchar flags = gflags(TYPE_HASZ(curve->type), TYPE_HASM(curve->type), 0); + uint8_t flags = gflags(FLAGS_GET_Z(curve->flags), FLAGS_GET_M(curve->flags), 0); GBOX tmp; POINT4D p1, p2, p3; int i; - if ( ! curve ) return G_FAILURE; - if ( curve->points->npoints < 3 ) return G_FAILURE; + if ( ! curve ) return LW_FAILURE; + if ( curve->points->npoints < 3 ) return LW_FAILURE; tmp.flags = flags; @@ -511,55 +466,61 @@ getPoint4d_p(curve->points, i-1, &p2); getPoint4d_p(curve->points, i, &p3); - if (lwcircle_calculate_gbox(p1, p2, p3, &tmp) == G_FAILURE) + if (lwcircle_calculate_gbox_cartesian(&p1, &p2, &p3, &tmp) == LW_FAILURE) continue; gbox_merge(&tmp, gbox); } - return G_SUCCESS; + return LW_SUCCESS; } -static int lwpoint_calculate_gbox(LWPOINT *point, GBOX *gbox) +static int lwpoint_calculate_gbox_cartesian(LWPOINT *point, GBOX *gbox) { - if ( ! point ) return G_FAILURE; - return ptarray_calculate_gbox( point->point, gbox ); + if ( ! point ) return LW_FAILURE; + return ptarray_calculate_gbox_cartesian( point->point, gbox ); } -static int lwline_calculate_gbox(LWLINE *line, GBOX *gbox) +static int lwline_calculate_gbox_cartesian(LWLINE *line, GBOX *gbox) { - if ( ! line ) return G_FAILURE; - return ptarray_calculate_gbox( line->points, gbox ); + if ( ! line ) return LW_FAILURE; + return ptarray_calculate_gbox_cartesian( line->points, gbox ); } -static int lwpoly_calculate_gbox(LWPOLY *poly, GBOX *gbox) +static int lwtriangle_calculate_gbox_cartesian(LWTRIANGLE *triangle, GBOX *gbox) { - if ( ! poly ) return G_FAILURE; - if ( poly->nrings == 0 ) return G_FAILURE; + if ( ! triangle ) return LW_FAILURE; + return ptarray_calculate_gbox_cartesian( triangle->points, gbox ); +} + +static int lwpoly_calculate_gbox_cartesian(LWPOLY *poly, GBOX *gbox) +{ + if ( ! poly ) return LW_FAILURE; + if ( poly->nrings == 0 ) return LW_FAILURE; /* Just need to check outer ring */ - return ptarray_calculate_gbox( poly->rings[0], gbox ); + return ptarray_calculate_gbox_cartesian( poly->rings[0], gbox ); } -static int lwcollection_calculate_gbox(LWCOLLECTION *coll, GBOX *gbox) +static int lwcollection_calculate_gbox_cartesian(LWCOLLECTION *coll, GBOX *gbox) { GBOX subbox; int i; - int result = G_FAILURE; + int result = LW_FAILURE; int first = LW_TRUE; assert(coll); - if ( coll->ngeoms == 0 ) - return G_FAILURE; + if ( (coll->ngeoms == 0) || !gbox) + return LW_FAILURE; - subbox.flags = gbox->flags; + subbox.flags = coll->flags; for ( i = 0; i < coll->ngeoms; i++ ) { - if ( lwgeom_calculate_gbox((LWGEOM*)(coll->geoms[i]), &subbox) == G_FAILURE ) - { - continue; - } - else + if ( lwgeom_calculate_gbox_cartesian((LWGEOM*)(coll->geoms[i]), &subbox) == LW_SUCCESS ) { + /* Keep a copy of the sub-bounding box for later + if ( coll->geoms[i]->bbox ) + lwfree(coll->geoms[i]->bbox); + coll->geoms[i]->bbox = gbox_copy(&subbox); */ if ( first ) { gbox_duplicate(&subbox, gbox); @@ -569,26 +530,29 @@ { gbox_merge(&subbox, gbox); } - result = G_SUCCESS; + result = LW_SUCCESS; } } return result; } -int lwgeom_calculate_gbox(const LWGEOM *lwgeom, GBOX *gbox) +int lwgeom_calculate_gbox_cartesian(const LWGEOM *lwgeom, GBOX *gbox) { - if ( ! lwgeom ) return G_FAILURE; + if ( ! lwgeom ) return LW_FAILURE; + LWDEBUGF(4, "lwgeom_calculate_gbox got type (%d) - %s", lwgeom->type, lwtype_name(lwgeom->type)); - switch (TYPE_GETTYPE(lwgeom->type)) + switch (lwgeom->type) { case POINTTYPE: - return lwpoint_calculate_gbox((LWPOINT *)lwgeom, gbox); + return lwpoint_calculate_gbox_cartesian((LWPOINT *)lwgeom, gbox); case LINETYPE: - return lwline_calculate_gbox((LWLINE *)lwgeom, gbox); + return lwline_calculate_gbox_cartesian((LWLINE *)lwgeom, gbox); case CIRCSTRINGTYPE: - return lwcircstring_calculate_gbox((LWCIRCSTRING *)lwgeom, gbox); + return lwcircstring_calculate_gbox_cartesian((LWCIRCSTRING *)lwgeom, gbox); case POLYGONTYPE: - return lwpoly_calculate_gbox((LWPOLY *)lwgeom, gbox); + return lwpoly_calculate_gbox_cartesian((LWPOLY *)lwgeom, gbox); + case TRIANGLETYPE: + return lwtriangle_calculate_gbox_cartesian((LWTRIANGLE *)lwgeom, gbox); case COMPOUNDTYPE: case CURVEPOLYTYPE: case MULTIPOINTTYPE: @@ -596,10 +560,34 @@ case MULTICURVETYPE: case MULTIPOLYGONTYPE: case MULTISURFACETYPE: + case POLYHEDRALSURFACETYPE: + case TINTYPE: case COLLECTIONTYPE: - return lwcollection_calculate_gbox((LWCOLLECTION *)lwgeom, gbox); + return lwcollection_calculate_gbox_cartesian((LWCOLLECTION *)lwgeom, gbox); } /* Never get here, please. */ - lwerror("unsupported type (%d)", TYPE_GETTYPE(lwgeom->type)); - return G_FAILURE; + lwerror("unsupported type (%d) - %s", lwgeom->type, lwtype_name(lwgeom->type)); + return LW_FAILURE; +} + +void gbox_float_round(GBOX *gbox) +{ + gbox->xmin = next_float_down(gbox->xmin); + gbox->xmax = next_float_up(gbox->xmax); + + gbox->ymin = next_float_down(gbox->ymin); + gbox->ymax = next_float_up(gbox->ymax); + + if ( FLAGS_GET_M(gbox->flags) ) + { + gbox->mmin = next_float_down(gbox->mmin); + gbox->mmax = next_float_up(gbox->mmax); + } + + if ( FLAGS_GET_Z(gbox->flags) ) + { + gbox->zmin = next_float_down(gbox->zmin); + gbox->zmax = next_float_up(gbox->zmax); + } } + diff -Nru postgis-1.5.3/liblwgeom/g_coord.c postgis-2.0.1/liblwgeom/g_coord.c --- postgis-1.5.3/liblwgeom/g_coord.c 2010-02-01 17:35:55.000000000 +0000 +++ postgis-2.0.1/liblwgeom/g_coord.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,184 +0,0 @@ -/********************************************************************** - * $Id: g_coord.c 5181 2010-02-01 17:35:55Z pramsey $ - * - * PostGIS - Spatial Types for PostgreSQL - * Copyright 2009 Paul Ramsey - * - * This is free software; you can redistribute and/or modify it under - * the terms of the GNU General Public Licence. See the COPYING file. - * - **********************************************************************/ - -#include "libgeom.h" - -GCOORDINATE* gcoord_new(int ndims) -{ - GCOORDINATE *coord = (GCOORDINATE*)lwalloc(sizeof(GCOORDINATE)); - assert(ndims >= 2); - assert(ndims <= 4); - if ( ! coord ) - { - lwerror("Out of memory!"); - return NULL; - } - coord->ordinates = (double*)lwalloc(sizeof(double) * ndims); - if ( ! coord->ordinates ) - { - lwerror("Out of memory!"); - return NULL; - } - /* We'll determine extra dimension is Z or M later. */ - if ( ndims == 3 ) - { - coord->flags = gflags(1, 0, 0); - } - if ( ndims == 4 ) - { - coord->flags = gflags(1, 1, 0); - } - return coord; -} - -GCOORDINATE* gcoord_new_with_flags(uchar flags) -{ - GCOORDINATE *coord = (GCOORDINATE*)lwalloc(sizeof(GCOORDINATE)); - if ( ! coord ) - { - lwerror("Out of memory!"); - return NULL; - } - coord->ordinates = (double*)lwalloc(sizeof(double) * FLAGS_NDIMS(flags)); - if ( ! coord->ordinates ) - { - lwerror("Out of memory!"); - return NULL; - } - coord->flags = flags; - return coord; -} - -GCOORDINATE* gcoord_new_with_flags_and_ordinates(uchar flags, double *ordinates) -{ - GCOORDINATE *coord = (GCOORDINATE*)lwalloc(sizeof(GCOORDINATE)); - assert(ordinates); - if ( ! coord ) - { - lwerror("Out of memory!"); - return NULL; - } - coord->ordinates = ordinates; - if ( ! coord->ordinates ) - { - lwerror("Out of memory!"); - return NULL; - } - coord->flags = flags; - FLAGS_SET_READONLY(coord->flags, 1); - return coord; -} - -GCOORDINATE* gcoord_copy(GCOORDINATE *coord) -{ - GCOORDINATE *copy = NULL; - - assert(coord); - assert(coord->ordinates); - - copy = (GCOORDINATE*)lwalloc(sizeof(GCOORDINATE)); - if ( ! copy ) return NULL; - copy->flags = coord->flags; - FLAGS_SET_READONLY(copy->flags, 1); - copy->ordinates = (double*)lwalloc(sizeof(double) * FLAGS_NDIMS(copy->flags)); - if ( ! copy->ordinates ) return NULL; - memcpy(copy->ordinates, coord->ordinates, FLAGS_NDIMS(copy->flags) * sizeof(double)); - return copy; -} - -void gcoord_free(GCOORDINATE *coord) -{ - if ( ! coord ) return; - if ( ! FLAGS_GET_READONLY(coord->flags) && coord->ordinates ) - lwfree(coord->ordinates); - lwfree(coord); -} - -void gcoord_set_x(GCOORDINATE *coord, double x) -{ - assert(coord); - *(coord->ordinates) = x; -} - -void gcoord_set_y(GCOORDINATE *coord, double y) -{ - assert(coord); - *(coord->ordinates + 1) = y; -} - -void gcoord_set_z(GCOORDINATE *coord, double z) -{ - assert(coord); - assert(FLAGS_GET_Z(coord->flags)); - *(coord->ordinates + 2) = z; -} - -void gcoord_set_m(GCOORDINATE *coord, double m) -{ - assert(coord); - assert(FLAGS_GET_M(coord->flags)); - if (FLAGS_GET_Z(coord->flags)) - { - *(coord->ordinates + 3) = m; - } - else - { - *(coord->ordinates + 2) = m; - } -} - -void gcoord_set_ordinates(GCOORDINATE *coord, double *ordinates) -{ - assert(coord); - assert(ordinates); - coord->ordinates = ordinates; -} - -void gcoord_set_ordinate(GCOORDINATE *coord, double ordinate, int index) -{ - assert(coord); - assert(FLAGS_NDIMS(coord->flags)>index); - assert(index>=0); - *(coord->ordinates + index) = ordinate; -} - -double gcoord_get_x(GCOORDINATE *coord) -{ - assert(coord); - return *(coord->ordinates); -} - -double gcoord_get_y(GCOORDINATE *coord) -{ - assert(coord); - return *(coord->ordinates + 1); -} - -double gcoord_get_z(GCOORDINATE *coord) -{ - assert(coord); - assert(FLAGS_GET_Z(coord->flags)); - return *(coord->ordinates + 2); -} - -double gcoord_get_m(GCOORDINATE *coord) -{ - assert(coord); - assert(FLAGS_GET_M(coord->flags)); - if (FLAGS_GET_Z(coord->flags)) - { - return *(coord->ordinates + 3); - } - else - { - return *(coord->ordinates + 2); - } -} diff -Nru postgis-1.5.3/liblwgeom/g_geometry.c postgis-2.0.1/liblwgeom/g_geometry.c --- postgis-1.5.3/liblwgeom/g_geometry.c 2009-09-14 10:54:33.000000000 +0000 +++ postgis-2.0.1/liblwgeom/g_geometry.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -/********************************************************************** - * $Id: g_geometry.c 4494 2009-09-14 10:54:33Z mcayland $ - * - * PostGIS - Spatial Types for PostgreSQL - * Copyright 2009 Paul Ramsey - * - * This is free software; you can redistribute and/or modify it under - * the terms of the GNU General Public Licence. See the COPYING file. - * - **********************************************************************/ - -#include "libgeom.h" - -G_LINESTRING* glinestring_new_from_gptarray(GPTARRAY *ptarray) -{ - G_LINESTRING *gline = NULL; - assert(ptarray); - gline = (G_LINESTRING*)lwalloc(sizeof(G_LINESTRING)); - gline->flags = ptarray->flags; - gline->type = LINETYPE; - gline->bbox = NULL; - gline->srid = 0; - gline->points = ptarray; - return gline; -} - -G_LINESTRING* glinestring_new(uchar flags) -{ - G_LINESTRING *gline = NULL; - gline = (G_LINESTRING*)lwalloc(sizeof(G_LINESTRING)); - gline->flags = flags; - gline->type = LINETYPE; - gline->bbox = NULL; - gline->srid = 0; - gline->points = gptarray_new(gline->flags); - return gline; -} diff -Nru postgis-1.5.3/liblwgeom/g_ptarray.c postgis-2.0.1/liblwgeom/g_ptarray.c --- postgis-1.5.3/liblwgeom/g_ptarray.c 2010-02-01 17:35:55.000000000 +0000 +++ postgis-2.0.1/liblwgeom/g_ptarray.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,201 +0,0 @@ -/********************************************************************** - * $Id: g_ptarray.c 5181 2010-02-01 17:35:55Z pramsey $ - * - * PostGIS - Spatial Types for PostgreSQL - * Copyright 2009 Paul Ramsey - * - * This is free software; you can redistribute and/or modify it under - * the terms of the GNU General Public Licence. See the COPYING file. - * - **********************************************************************/ - -#include "libgeom.h" - -GPTARRAY* gptarray_new(uchar flags) -{ - GPTARRAY *ptarr = (GPTARRAY*)lwalloc(sizeof(GPTARRAY)); - ptarr->flags = flags; - ptarr->capacity = G_PT_ARRAY_DEFAULT_POINTS * FLAGS_NDIMS(flags) * sizeof(double); - ptarr->npoints = 0; - ptarr->ordinates = (double*)lwalloc(ptarr->capacity); - return ptarr; -} - -GPTARRAY* gptarray_copy(GPTARRAY *ptarray) -{ - GPTARRAY *copy = NULL; - assert(ptarray); - copy = (GPTARRAY*)lwalloc(sizeof(GPTARRAY)); - copy->flags = ptarray->flags; - copy->capacity = ptarray->npoints * FLAGS_NDIMS(ptarray->flags) * sizeof(double); - copy->npoints = ptarray->npoints; - copy->ordinates = (double*)lwalloc(copy->capacity); - if ( ! copy->ordinates ) return NULL; - memcpy(copy->ordinates, ptarray->ordinates, copy->capacity); - return copy; -} - -GPTARRAY* gptarray_new_with_size(uchar flags, int npoints) -{ - GPTARRAY *ptarray = (GPTARRAY*)lwalloc(sizeof(GPTARRAY)); - ptarray->flags = flags; - ptarray->capacity = FLAGS_NDIMS(flags) * npoints * sizeof(double); - ptarray->npoints = npoints; - ptarray->ordinates = (double*)lwalloc(ptarray->capacity); - return ptarray; -} - -GPTARRAY* gptarray_new_with_ordinates(uchar flags, int npoints, double *ordinates) -{ - GPTARRAY *ptarray = (GPTARRAY*)lwalloc(sizeof(GPTARRAY)); - assert(ordinates); - ptarray->flags = flags; - ptarray->capacity = 0; /* We aren't managing this memory, watch out. */ - ptarray->npoints = npoints; - ptarray->ordinates = ordinates; - return ptarray; -} - -void gptarray_free(GPTARRAY *ptarray) -{ - assert(ptarray); - assert(ptarray->ordinates); - if ( ptarray->capacity > 0 ) /* Only free the ordinates if we are managing them. */ - lwfree(ptarray->ordinates); - lwfree(ptarray); -} - -void gptarray_add_coord(GPTARRAY *ptarray, GCOORDINATE *coord) -{ - assert(ptarray); - assert(ptarray->flags == coord->flags); - if ( FLAGS_NDIMS(ptarray->flags) * (ptarray->npoints + 1) * sizeof(double) > ptarray->capacity ) - { - ptarray->capacity *= 2; - ptarray->ordinates = lwrealloc(ptarray->ordinates, ptarray->capacity); - if ( ! ptarray->ordinates ) - { - lwerror("Out of memory!"); - return; - } - } - memcpy(ptarray->ordinates + FLAGS_NDIMS(ptarray->flags) * ptarray->npoints * sizeof(double), - coord->ordinates, - FLAGS_NDIMS(coord->flags) * sizeof(double)); - - ptarray->npoints++; -} - -GCOORDINATE* gptarray_get_coord_ro(GPTARRAY *ptarray, int i) -{ - GCOORDINATE *coord; - assert(ptarray); - coord = gcoord_new(ptarray->flags); - - coord->ordinates = ptarray->ordinates + FLAGS_NDIMS(ptarray->flags) * i; - - return coord; -} - -GCOORDINATE* gptarray_get_coord_new(GPTARRAY *ptarray, int i) -{ - GCOORDINATE *coord; - assert(ptarray); - coord = gcoord_new(ptarray->flags); - - memcpy(coord->ordinates, - ptarray->ordinates + FLAGS_NDIMS(ptarray->flags) * i, - FLAGS_NDIMS(ptarray->flags) * sizeof(double)); - - return coord; -} - - -void gptarray_set_coord(GPTARRAY *ptarray, int i, GCOORDINATE *coord) -{ - int dim = 0; - int ndims = 0; - - assert(ptarray); - assert(coord->flags == ptarray->flags); - - ndims = FLAGS_NDIMS(ptarray->flags); - - for ( dim = 0; dim < ndims; dim++ ) - { - *(ptarray->ordinates + i * ndims + dim) = *(coord->ordinates + dim); - } - -} - -void gptarray_set_x(GPTARRAY *ptarray, int i, double x) -{ - assert(ptarray); - - *(ptarray->ordinates + i * FLAGS_NDIMS(ptarray->flags) + 0) = x; -} - -void gptarray_set_y(GPTARRAY *ptarray, int i, double y) -{ - assert(ptarray); - - *(ptarray->ordinates + i * FLAGS_NDIMS(ptarray->flags) + 1) = y; -} - -void gptarray_set_z(GPTARRAY *ptarray, int i, double z) -{ - assert(ptarray); - assert(FLAGS_GET_Z(ptarray->flags)); - - *(ptarray->ordinates + i * FLAGS_NDIMS(ptarray->flags) + 2) = z; -} - -void gptarray_set_m(GPTARRAY *ptarray, int i, double m) -{ - assert(ptarray); - assert(FLAGS_GET_M(ptarray->flags)); - - if ( FLAGS_GET_Z(ptarray->flags)) - { /* Four coordinates */ - *(ptarray->ordinates + i * FLAGS_NDIMS(ptarray->flags) + 3) = m; - } - else - { /* Three coordinates */ - *(ptarray->ordinates + i * FLAGS_NDIMS(ptarray->flags) + 2) = m; - } -} - -double gptarray_get_x(GPTARRAY *ptarray, int i) -{ - assert(ptarray); - return *(ptarray->ordinates + i * FLAGS_NDIMS(ptarray->flags) + 0); -} - -double gptarray_get_y(GPTARRAY *ptarray, int i) -{ - assert(ptarray); - return *(ptarray->ordinates + i * FLAGS_NDIMS(ptarray->flags) + 1); -} - -double gptarray_get_z(GPTARRAY *ptarray, int i) -{ - assert(ptarray); - assert(FLAGS_GET_Z(ptarray->flags)); - return *(ptarray->ordinates + i * FLAGS_NDIMS(ptarray->flags) + 2); -} - -double gptarray_get_m(GPTARRAY *ptarray, int i) -{ - assert(ptarray); - assert(FLAGS_GET_M(ptarray->flags)); - - if ( FLAGS_GET_Z(ptarray->flags)) - { /* Four coordinates */ - return *(ptarray->ordinates + i * FLAGS_NDIMS(ptarray->flags) + 3); - } - else - { /* Three coordinates */ - return *(ptarray->ordinates + i * FLAGS_NDIMS(ptarray->flags) + 2); - } -} - diff -Nru postgis-1.5.3/liblwgeom/g_serialized.c postgis-2.0.1/liblwgeom/g_serialized.c --- postgis-1.5.3/liblwgeom/g_serialized.c 2010-02-01 17:35:55.000000000 +0000 +++ postgis-2.0.1/liblwgeom/g_serialized.c 2012-02-27 22:08:12.000000000 +0000 @@ -1,7 +1,8 @@ /********************************************************************** - * $Id: g_serialized.c 5181 2010-02-01 17:35:55Z pramsey $ + * $Id: g_serialized.c 9324 2012-02-27 22:08:12Z pramsey $ * * PostGIS - Spatial Types for PostgreSQL + * * Copyright 2009 Paul Ramsey * * This is free software; you can redistribute and/or modify it under @@ -9,38 +10,261 @@ * **********************************************************************/ -#include "libgeom.h" +#include "liblwgeom_internal.h" +#include "lwgeom_log.h" /*********************************************************************** * GSERIALIZED metadata utility functions. */ -uint32 gserialized_get_type(const GSERIALIZED *s) +int gserialized_has_bbox(const GSERIALIZED *gser) +{ + return FLAGS_GET_BBOX(gser->flags); +} + +int gserialized_has_z(const GSERIALIZED *gser) +{ + return FLAGS_GET_Z(gser->flags); +} + +int gserialized_has_m(const GSERIALIZED *gser) +{ + return FLAGS_GET_M(gser->flags); +} + +int gserialized_get_zm(const GSERIALIZED *gser) { - uint32 *ptr; + return 2 * FLAGS_GET_Z(gser->flags) + FLAGS_GET_M(gser->flags); +} + +int gserialized_ndims(const GSERIALIZED *gser) +{ + return FLAGS_NDIMS(gser->flags); +} + +uint32_t gserialized_get_type(const GSERIALIZED *s) +{ + uint32_t *ptr; assert(s); - ptr = (uint32*)(s->data); - ptr += (gbox_serialized_size(s->flags) / sizeof(uint32)); + ptr = (uint32_t*)(s->data); + LWDEBUG(4,"entered"); + if ( FLAGS_GET_BBOX(s->flags) ) + { + LWDEBUGF(4,"skipping forward past bbox (%d bytes)",gbox_serialized_size(s->flags)); + ptr += (gbox_serialized_size(s->flags) / sizeof(uint32_t)); + } return *ptr; } -uint32 gserialized_get_srid(const GSERIALIZED *s) +int32_t gserialized_get_srid(const GSERIALIZED *s) { - uint32 srid = 0; + int32_t srid = 0; srid = srid | (s->srid[0] << 16); srid = srid | (s->srid[1] << 8); srid = srid | s->srid[2]; - return srid; + /* Only the first 21 bits are set. Slide up and back to pull + the negative bits down, if we need them. */ + srid = (srid<<11)>>11; + + /* 0 is our internal unknown value. We'll map back and forth here for now */ + if ( srid == 0 ) + return SRID_UNKNOWN; + else + return clamp_srid(srid); } -void gserialized_set_srid(GSERIALIZED *s, uint32 srid) +void gserialized_set_srid(GSERIALIZED *s, int32_t srid) { LWDEBUGF(3, "Called with srid = %d", srid); - s->srid[0] = (srid & 0x000F0000) >> 16; + + srid = clamp_srid(srid); + + /* 0 is our internal unknown value. + * We'll map back and forth here for now */ + if ( srid == SRID_UNKNOWN ) + srid = 0; + + s->srid[0] = (srid & 0x001F0000) >> 16; s->srid[1] = (srid & 0x0000FF00) >> 8; s->srid[2] = (srid & 0x000000FF); } +GSERIALIZED* gserialized_copy(const GSERIALIZED *g) +{ + GSERIALIZED *g_out = NULL; + assert(g); + g_out = (GSERIALIZED*)lwalloc(SIZE_GET(g->size)); + memcpy((uint8_t*)g_out,(uint8_t*)g,SIZE_GET(g->size)); + return g_out; +} + +int gserialized_is_empty(const GSERIALIZED *g) +{ + uint8_t *p = (uint8_t*)g; + int i; + assert(g); + + p += 8; /* Skip varhdr and srid/flags */ + if( FLAGS_GET_BBOX(g->flags) ) + p += gbox_serialized_size(g->flags); /* Skip the box */ + p += 4; /* Skip type number */ + + /* For point/line/circstring this is npoints */ + /* For polygons this is nrings */ + /* For collections this is ngeoms */ + memcpy(&i, p, sizeof(int)); + + /* If it is non-zero, it's not empty */ + if ( i > 0 ) + return LW_FALSE; + else + return LW_TRUE; +} + +char* gserialized_to_string(const GSERIALIZED *g) +{ + return lwgeom_to_wkt(lwgeom_from_gserialized(g), WKT_ISO, 12, 0); +} + +int gserialized_read_gbox_p(const GSERIALIZED *g, GBOX *gbox) +{ + + /* Null input! */ + if ( ! ( g && gbox ) ) return LW_FAILURE; + + /* Initialize the flags on the box */ + gbox->flags = g->flags; + + /* Has pre-calculated box */ + if ( FLAGS_GET_BBOX(g->flags) ) + { + int i = 0; + float *fbox = (float*)(g->data); + gbox->xmin = fbox[i++]; + gbox->xmax = fbox[i++]; + gbox->ymin = fbox[i++]; + gbox->ymax = fbox[i++]; + + /* Geodetic? Read next dimension (geocentric Z) and return */ + if ( FLAGS_GET_GEODETIC(g->flags) ) + { + gbox->zmin = fbox[i++]; + gbox->zmax = fbox[i++]; + return LW_SUCCESS; + } + /* Cartesian? Read extra dimensions (if there) and return */ + if ( FLAGS_GET_Z(g->flags) ) + { + gbox->zmin = fbox[i++]; + gbox->zmax = fbox[i++]; + } + if ( FLAGS_GET_M(g->flags) ) + { + gbox->mmin = fbox[i++]; + gbox->mmax = fbox[i++]; + } + return LW_SUCCESS; + } + + /* No pre-calculated box, but for cartesian entries we can do some magic */ + if ( ! FLAGS_GET_GEODETIC(g->flags) ) + { + uint32_t type = gserialized_get_type(g); + /* Boxes of points are easy peasy */ + if ( type == POINTTYPE ) + { + int i = 1; /* Start past */ + double *dptr = (double*)(g->data); + + /* Read the empty flag */ + int *iptr = (int*)(g->data); + int isempty = (iptr[1] == 0); + + /* EMPTY point has no box */ + if ( isempty ) return LW_FAILURE; + + gbox->xmin = gbox->xmax = dptr[i++]; + gbox->ymin = gbox->ymax = dptr[i++]; + if ( FLAGS_GET_Z(g->flags) ) + { + gbox->zmin = gbox->zmax = dptr[i++]; + } + if ( FLAGS_GET_M(g->flags) ) + { + gbox->mmin = gbox->mmax = dptr[i++]; + } + gbox_float_round(gbox); + return LW_SUCCESS; + } + /* We can calculate the box of a two-point cartesian line trivially */ + else if ( type == LINETYPE ) + { + int ndims = FLAGS_NDIMS(g->flags); + int i = 0; /* Start past */ + double *dptr = (double*)(g->data); + int *iptr = (int*)(g->data); + int npoints = iptr[1]; /* Read the npoints */ + + /* This only works with 2-point lines */ + if ( npoints != 2 ) + return LW_FAILURE; + + /* Advance to X */ + i++; + gbox->xmin = FP_MIN(dptr[i], dptr[i+ndims]); + gbox->xmax = FP_MAX(dptr[i], dptr[i+ndims]); + + /* Advance to Y */ + i++; + gbox->ymin = FP_MIN(dptr[i], dptr[i+ndims]); + gbox->ymax = FP_MAX(dptr[i], dptr[i+ndims]); + + if ( FLAGS_GET_Z(g->flags) ) + { + /* Advance to Z */ + i++; + gbox->zmin = FP_MIN(dptr[i], dptr[i+ndims]); + gbox->zmax = FP_MAX(dptr[i], dptr[i+ndims]); + } + if ( FLAGS_GET_M(g->flags) ) + { + /* Advance to M */ + i++; + gbox->zmin = FP_MIN(dptr[i], dptr[i+ndims]); + gbox->zmax = FP_MAX(dptr[i], dptr[i+ndims]); + } + gbox_float_round(gbox); + return LW_SUCCESS; + } + /* We could also do single-entry multi-points */ + else if ( type == MULTIPOINTTYPE ) + { + /* TODO: Make this actually happen */ + return LW_FAILURE; + } + } + return LW_FAILURE; +} + + +/** +* Read the bounding box off a serialization and calculate one if +* it is not already there. +*/ +int gserialized_get_gbox_p(const GSERIALIZED *geom, GBOX *box) +{ + LWGEOM *lwgeom; + int ret = gserialized_read_gbox_p(geom, box); + if ( LW_FAILURE == ret ) { + /* See http://trac.osgeo.org/postgis/ticket/1023 */ + lwgeom = lwgeom_from_gserialized(geom); + ret = lwgeom_calculate_gbox(lwgeom, box); + gbox_float_round(box); + lwgeom_free(lwgeom); + } + return ret; +} + /*********************************************************************** * Calculate the GSERIALIZED size for an LWGEOM. @@ -57,7 +281,7 @@ assert(point); size += 4; /* Number of points (one or zero (empty)). */ - size += point->point->npoints * TYPE_NDIMS(point->type) * sizeof(double); + size += point->point->npoints * FLAGS_NDIMS(point->flags) * sizeof(double); LWDEBUGF(3, "point size = %d", size); @@ -71,13 +295,27 @@ assert(line); size += 4; /* Number of points (zero => empty). */ - size += line->points->npoints * TYPE_NDIMS(line->type) * sizeof(double); + size += line->points->npoints * FLAGS_NDIMS(line->flags) * sizeof(double); LWDEBUGF(3, "linestring size = %d", size); return size; } +static size_t gserialized_from_lwtriangle_size(const LWTRIANGLE *triangle) +{ + size_t size = 4; /* Type number. */ + + assert(triangle); + + size += 4; /* Number of points (zero => empty). */ + size += triangle->points->npoints * FLAGS_NDIMS(triangle->flags) * sizeof(double); + + LWDEBUGF(3, "triangle size = %d", size); + + return size; +} + static size_t gserialized_from_lwpoly_size(const LWPOLY *poly) { size_t size = 4; /* Type number. */ @@ -92,7 +330,7 @@ for ( i = 0; i < poly->nrings; i++ ) { size += 4; /* Number of points in ring. */ - size += poly->rings[i]->npoints * TYPE_NDIMS(poly->type) * sizeof(double); + size += poly->rings[i]->npoints * FLAGS_NDIMS(poly->flags) * sizeof(double); } LWDEBUGF(3, "polygon size = %d", size); @@ -107,7 +345,7 @@ assert(curve); size += 4; /* Number of points (zero => empty). */ - size += curve->points->npoints * TYPE_NDIMS(curve->type) * sizeof(double); + size += curve->points->npoints * FLAGS_NDIMS(curve->flags) * sizeof(double); LWDEBUGF(3, "circstring size = %d", size); @@ -137,11 +375,9 @@ static size_t gserialized_from_any_size(const LWGEOM *geom) { - int type = TYPE_GETTYPE(geom->type); + LWDEBUGF(2, "Input type: %s", lwtype_name(geom->type)); - LWDEBUGF(2, "Input type: %s", lwgeom_typename(type)); - - switch (type) + switch (geom->type) { case POINTTYPE: return gserialized_from_lwpoint_size((LWPOINT *)geom); @@ -149,6 +385,8 @@ return gserialized_from_lwline_size((LWLINE *)geom); case POLYGONTYPE: return gserialized_from_lwpoly_size((LWPOLY *)geom); + case TRIANGLETYPE: + return gserialized_from_lwtriangle_size((LWTRIANGLE *)geom); case CIRCSTRINGTYPE: return gserialized_from_lwcircstring_size((LWCIRCSTRING *)geom); case CURVEPOLYTYPE: @@ -158,10 +396,12 @@ case MULTICURVETYPE: case MULTIPOLYGONTYPE: case MULTISURFACETYPE: + case POLYHEDRALSURFACETYPE: + case TINTYPE: case COLLECTIONTYPE: return gserialized_from_lwcollection_size((LWCOLLECTION *)geom); default: - lwerror("Unknown geometry type: %d", type); + lwerror("Unknown geometry type: %d - %s", geom->type, lwtype_name(geom->type)); return 0; } } @@ -172,8 +412,13 @@ { size_t size = 8; /* Header overhead. */ assert(geom); + + if ( geom->bbox ) + size += gbox_serialized_size(geom->flags); + size += gserialized_from_any_size(geom); LWDEBUGF(3, "g_serialize size = %d", size); + return size; } @@ -183,18 +428,18 @@ /* Private functions */ -static size_t gserialized_from_lwgeom_any(const LWGEOM *geom, uchar *buf); +static size_t gserialized_from_lwgeom_any(const LWGEOM *geom, uint8_t *buf); -static size_t gserialized_from_lwpoint(const LWPOINT *point, uchar *buf) +static size_t gserialized_from_lwpoint(const LWPOINT *point, uint8_t *buf) { - uchar *loc; - int ptsize = pointArray_ptsize(point->point); + uint8_t *loc; + int ptsize = ptarray_point_size(point->point); int type = POINTTYPE; assert(point); assert(buf); - if ( TYPE_GETZM(point->type) != TYPE_GETZM(point->point->dims) ) + if ( FLAGS_GET_ZM(point->flags) != FLAGS_GET_ZM(point->point->flags) ) lwerror("Dimensions mismatch in lwpoint"); LWDEBUGF(2, "lwpoint_to_gserialized(%p, %p) called", point, buf); @@ -202,11 +447,11 @@ loc = buf; /* Write in the type. */ - memcpy(loc, &type, sizeof(uint32)); - loc += sizeof(uint32); + memcpy(loc, &type, sizeof(uint32_t)); + loc += sizeof(uint32_t); /* Write in the number of points (0 => empty). */ - memcpy(loc, &(point->point->npoints), sizeof(uint32)); - loc += sizeof(uint32); + memcpy(loc, &(point->point->npoints), sizeof(uint32_t)); + loc += sizeof(uint32_t); /* Copy in the ordinates. */ if ( point->point->npoints > 0 ) @@ -218,9 +463,9 @@ return (size_t)(loc - buf); } -static size_t gserialized_from_lwline(const LWLINE *line, uchar *buf) +static size_t gserialized_from_lwline(const LWLINE *line, uint8_t *buf) { - uchar *loc; + uint8_t *loc; int ptsize; size_t size; int type = LINETYPE; @@ -230,20 +475,20 @@ LWDEBUGF(2, "lwline_to_gserialized(%p, %p) called", line, buf); - if ( TYPE_GETZM(line->type) != TYPE_GETZM(line->points->dims) ) + if ( FLAGS_GET_Z(line->flags) != FLAGS_GET_Z(line->points->flags) ) lwerror("Dimensions mismatch in lwline"); - ptsize = pointArray_ptsize(line->points); + ptsize = ptarray_point_size(line->points); loc = buf; /* Write in the type. */ - memcpy(loc, &type, sizeof(uint32)); - loc += sizeof(uint32); + memcpy(loc, &type, sizeof(uint32_t)); + loc += sizeof(uint32_t); /* Write in the npoints. */ - memcpy(loc, &(line->points->npoints), sizeof(uint32)); - loc += sizeof(uint32); + memcpy(loc, &(line->points->npoints), sizeof(uint32_t)); + loc += sizeof(uint32_t); LWDEBUGF(3, "lwline_to_gserialized added npoints (%d)", line->points->npoints); @@ -259,10 +504,10 @@ return (size_t)(loc - buf); } -static size_t gserialized_from_lwpoly(const LWPOLY *poly, uchar *buf) +static size_t gserialized_from_lwpoly(const LWPOLY *poly, uint8_t *buf) { int i; - uchar *loc; + uint8_t *loc; int ptsize; int type = POLYGONTYPE; @@ -271,28 +516,29 @@ LWDEBUG(2, "lwpoly_to_gserialized called"); - ptsize = sizeof(double) * TYPE_NDIMS(poly->type); + ptsize = sizeof(double) * FLAGS_NDIMS(poly->flags); loc = buf; /* Write in the type. */ - memcpy(loc, &type, sizeof(uint32)); - loc += sizeof(uint32); + memcpy(loc, &type, sizeof(uint32_t)); + loc += sizeof(uint32_t); /* Write in the nrings. */ - memcpy(loc, &(poly->nrings), sizeof(uint32)); - loc += sizeof(uint32); + memcpy(loc, &(poly->nrings), sizeof(uint32_t)); + loc += sizeof(uint32_t); /* Write in the npoints per ring. */ for ( i = 0; i < poly->nrings; i++ ) { - memcpy(loc, &(poly->rings[i]->npoints), sizeof(uint32)); - loc += sizeof(uint32); + memcpy(loc, &(poly->rings[i]->npoints), sizeof(uint32_t)); + loc += sizeof(uint32_t); } /* Add in padding if necessary to remain double aligned. */ if ( poly->nrings % 2 ) { - loc += sizeof(uint32); + memset(loc, 0, sizeof(uint32_t)); + loc += sizeof(uint32_t); } /* Copy in the ordinates. */ @@ -301,7 +547,7 @@ POINTARRAY *pa = poly->rings[i]; size_t pasize; - if ( TYPE_GETZM(poly->type) != TYPE_GETZM(pa->dims) ) + if ( FLAGS_GET_ZM(poly->flags) != FLAGS_GET_ZM(pa->flags) ) lwerror("Dimensions mismatch in lwpoly"); pasize = pa->npoints * ptsize; @@ -311,9 +557,50 @@ return (size_t)(loc - buf); } -static size_t gserialized_from_lwcircstring(const LWCIRCSTRING *curve, uchar *buf) +static size_t gserialized_from_lwtriangle(const LWTRIANGLE *triangle, uint8_t *buf) +{ + uint8_t *loc; + int ptsize; + size_t size; + int type = TRIANGLETYPE; + + assert(triangle); + assert(buf); + + LWDEBUGF(2, "lwtriangle_to_gserialized(%p, %p) called", triangle, buf); + + if ( FLAGS_GET_ZM(triangle->flags) != FLAGS_GET_ZM(triangle->points->flags) ) + lwerror("Dimensions mismatch in lwtriangle"); + + ptsize = ptarray_point_size(triangle->points); + + loc = buf; + + /* Write in the type. */ + memcpy(loc, &type, sizeof(uint32_t)); + loc += sizeof(uint32_t); + + /* Write in the npoints. */ + memcpy(loc, &(triangle->points->npoints), sizeof(uint32_t)); + loc += sizeof(uint32_t); + + LWDEBUGF(3, "lwtriangle_to_gserialized added npoints (%d)", triangle->points->npoints); + + /* Copy in the ordinates. */ + if ( triangle->points->npoints > 0 ) + { + size = triangle->points->npoints * ptsize; + memcpy(loc, getPoint_internal(triangle->points, 0), size); + loc += size; + } + LWDEBUGF(3, "lwtriangle_to_gserialized copied serialized_pointlist (%d bytes)", ptsize * triangle->points->npoints); + + return (size_t)(loc - buf); +} + +static size_t gserialized_from_lwcircstring(const LWCIRCSTRING *curve, uint8_t *buf) { - uchar *loc; + uint8_t *loc; int ptsize; size_t size; int type = CIRCSTRINGTYPE; @@ -321,20 +608,20 @@ assert(curve); assert(buf); - if (TYPE_GETZM(curve->type) != TYPE_GETZM(curve->points->dims)) + if (FLAGS_GET_ZM(curve->flags) != FLAGS_GET_ZM(curve->points->flags)) lwerror("Dimensions mismatch in lwcircstring"); - ptsize = pointArray_ptsize(curve->points); + ptsize = ptarray_point_size(curve->points); loc = buf; /* Write in the type. */ - memcpy(loc, &type, sizeof(uint32)); - loc += sizeof(uint32); + memcpy(loc, &type, sizeof(uint32_t)); + loc += sizeof(uint32_t); /* Write in the npoints. */ - memcpy(loc, &curve->points->npoints, sizeof(uint32)); - loc += sizeof(uint32); + memcpy(loc, &curve->points->npoints, sizeof(uint32_t)); + loc += sizeof(uint32_t); /* Copy in the ordinates. */ if ( curve->points->npoints > 0 ) @@ -347,31 +634,31 @@ return (size_t)(loc - buf); } -static size_t gserialized_from_lwcollection(const LWCOLLECTION *coll, uchar *buf) +static size_t gserialized_from_lwcollection(const LWCOLLECTION *coll, uint8_t *buf) { size_t subsize = 0; - uchar *loc; + uint8_t *loc; int i; int type; assert(coll); assert(buf); - type = TYPE_GETTYPE(coll->type); + type = coll->type; loc = buf; /* Write in the type. */ - memcpy(loc, &type, sizeof(uint32)); - loc += sizeof(uint32); + memcpy(loc, &type, sizeof(uint32_t)); + loc += sizeof(uint32_t); /* Write in the number of subgeoms. */ - memcpy(loc, &coll->ngeoms, sizeof(uint32)); - loc += sizeof(uint32); + memcpy(loc, &coll->ngeoms, sizeof(uint32_t)); + loc += sizeof(uint32_t); /* Serialize subgeoms. */ for ( i=0; ingeoms; i++ ) { - if (TYPE_GETZM(coll->type) != TYPE_GETZM(coll->geoms[i]->type)) + if (FLAGS_GET_ZM(coll->flags) != FLAGS_GET_ZM(coll->geoms[i]->flags)) lwerror("Dimensions mismatch in lwcollection"); subsize = gserialized_from_lwgeom_any(coll->geoms[i], loc); loc += subsize; @@ -380,19 +667,17 @@ return (size_t)(loc - buf); } -static size_t gserialized_from_lwgeom_any(const LWGEOM *geom, uchar *buf) +static size_t gserialized_from_lwgeom_any(const LWGEOM *geom, uint8_t *buf) { - int type = 0; - assert(geom); assert(buf); - type = TYPE_GETTYPE(geom->type); - - LWDEBUGF(2, "Input type (%d) %s", type, lwgeom_typename(type)); - LWDEBUGF(2, "LWGEOM(%p) uchar(%p)", geom, buf); + LWDEBUGF(2, "Input type (%d) %s, hasz: %d hasm: %d", + geom->type, lwtype_name(geom->type), + FLAGS_GET_Z(geom->flags), FLAGS_GET_M(geom->flags)); + LWDEBUGF(2, "LWGEOM(%p) uint8_t(%p)", geom, buf); - switch (type) + switch (geom->type) { case POINTTYPE: return gserialized_from_lwpoint((LWPOINT *)geom, buf); @@ -400,6 +685,8 @@ return gserialized_from_lwline((LWLINE *)geom, buf); case POLYGONTYPE: return gserialized_from_lwpoly((LWPOLY *)geom, buf); + case TRIANGLETYPE: + return gserialized_from_lwtriangle((LWTRIANGLE *)geom, buf); case CIRCSTRINGTYPE: return gserialized_from_lwcircstring((LWCIRCSTRING *)geom, buf); case CURVEPOLYTYPE: @@ -409,48 +696,48 @@ case MULTICURVETYPE: case MULTIPOLYGONTYPE: case MULTISURFACETYPE: + case POLYHEDRALSURFACETYPE: + case TINTYPE: case COLLECTIONTYPE: return gserialized_from_lwcollection((LWCOLLECTION *)geom, buf); default: - lwerror("Unknown geometry type: %d", geom->type); + lwerror("Unknown geometry type: %d - %s", geom->type, lwtype_name(geom->type)); return 0; } return 0; } -static size_t gserialized_from_gbox(const GBOX *gbox, uchar *buf) +static size_t gserialized_from_gbox(const GBOX *gbox, uint8_t *buf) { - uchar *loc; + uint8_t *loc = buf; float f; size_t return_size; assert(buf); - loc = buf; - - f = nextDown_f(gbox->xmin); + f = next_float_down(gbox->xmin); memcpy(loc, &f, sizeof(float)); loc += sizeof(float); - f = nextUp_f(gbox->xmax); + f = next_float_up(gbox->xmax); memcpy(loc, &f, sizeof(float)); loc += sizeof(float); - f = nextDown_f(gbox->ymin); + f = next_float_down(gbox->ymin); memcpy(loc, &f, sizeof(float)); loc += sizeof(float); - f = nextUp_f(gbox->ymax); + f = next_float_up(gbox->ymax); memcpy(loc, &f, sizeof(float)); loc += sizeof(float); if ( FLAGS_GET_GEODETIC(gbox->flags) ) { - f = nextDown_f(gbox->zmin); + f = next_float_down(gbox->zmin); memcpy(loc, &f, sizeof(float)); loc += sizeof(float); - f = nextUp_f(gbox->zmax); + f = next_float_up(gbox->zmax); memcpy(loc, &f, sizeof(float)); loc += sizeof(float); @@ -461,11 +748,11 @@ if ( FLAGS_GET_Z(gbox->flags) ) { - f = nextDown_f(gbox->zmin); + f = next_float_down(gbox->zmin); memcpy(loc, &f, sizeof(float)); loc += sizeof(float); - f = nextUp_f(gbox->zmax); + f = next_float_up(gbox->zmax); memcpy(loc, &f, sizeof(float)); loc += sizeof(float); @@ -473,11 +760,11 @@ if ( FLAGS_GET_M(gbox->flags) ) { - f = nextDown_f(gbox->mmin); + f = next_float_down(gbox->mmin); memcpy(loc, &f, sizeof(float)); loc += sizeof(float); - f = nextUp_f(gbox->mmax); + f = next_float_up(gbox->mmax); memcpy(loc, &f, sizeof(float)); loc += sizeof(float); } @@ -488,40 +775,31 @@ /* Public function */ -GSERIALIZED* gserialized_from_lwgeom(const LWGEOM *geom, int is_geodetic, size_t *size) +GSERIALIZED* gserialized_from_lwgeom(LWGEOM *geom, int is_geodetic, size_t *size) { - size_t expected_box_size = 0; size_t expected_size = 0; size_t return_size = 0; - uchar *serialized = NULL; - uchar *ptr = NULL; + uint8_t *serialized = NULL; + uint8_t *ptr = NULL; GSERIALIZED *g = NULL; - GBOX gbox; assert(geom); - gbox.flags = gflags(TYPE_HASZ(geom->type), TYPE_HASM(geom->type), is_geodetic); - /* - ** We need room for a bounding box in the serialized form. - ** Calculate the box and allocate enough size for it. + ** See if we need a bounding box, add one if we don't have one. */ - if ( ! lwgeom_is_empty(geom) && lwgeom_needs_bbox(geom) ) + if ( (! geom->bbox) && lwgeom_needs_bbox(geom) && (!lwgeom_is_empty(geom)) ) { - int result = G_SUCCESS; - LWDEBUG(3, "calculating bbox"); - if ( is_geodetic ) - result = lwgeom_calculate_gbox_geodetic(geom, &gbox); - else - result = lwgeom_calculate_gbox(geom, &gbox); - if ( result == G_SUCCESS ) - { - FLAGS_SET_BBOX(gbox.flags, 1); - expected_box_size = gbox_serialized_size(gbox.flags); - } + lwgeom_add_bbox(geom); } + + /* + ** Harmonize the flags to the state of the lwgeom + */ + if ( geom->bbox ) + FLAGS_SET_BBOX(geom->flags, 1); - /* Set up the uchar buffer into which we are going to write the serialized geometry. */ - expected_size = gserialized_from_lwgeom_size(geom) + expected_box_size; + /* Set up the uint8_t buffer into which we are going to write the serialized geometry. */ + expected_size = gserialized_from_lwgeom_size(geom); serialized = lwalloc(expected_size); ptr = serialized; @@ -529,8 +807,8 @@ ptr += 8; /* Write in the serialized form of the gbox, if necessary. */ - if ( FLAGS_GET_BBOX(gbox.flags) ) - ptr += gserialized_from_gbox(&gbox, ptr); + if ( geom->bbox ) + ptr += gserialized_from_gbox(geom->bbox, ptr); /* Write in the serialized form of the geometry. */ ptr += gserialized_from_lwgeom_any(geom, ptr); @@ -555,12 +833,10 @@ */ g->size = return_size << 2; - if ( geom->SRID == 0 || geom->SRID == (uint32)(-1) ) /* Zero is the no-SRID value now. */ - gserialized_set_srid(g, 0); - else - gserialized_set_srid(g, geom->SRID); + /* Set the SRID! */ + gserialized_set_srid(g, geom->srid); - g->flags = gbox.flags; + g->flags = geom->flags; return g; } @@ -569,28 +845,28 @@ * De-serialize GSERIALIZED into an LWGEOM. */ -static LWGEOM* lwgeom_from_gserialized_buffer(uchar *data_ptr, uchar g_flags, size_t *g_size); +static LWGEOM* lwgeom_from_gserialized_buffer(uint8_t *data_ptr, uint8_t g_flags, size_t *g_size); -static LWPOINT* lwpoint_from_gserialized_buffer(uchar *data_ptr, uchar g_flags, size_t *g_size) +static LWPOINT* lwpoint_from_gserialized_buffer(uint8_t *data_ptr, uint8_t g_flags, size_t *g_size) { - static uint32 type = POINTTYPE; - uchar *start_ptr = data_ptr; + uint8_t *start_ptr = data_ptr; LWPOINT *point; - uint32 npoints = 0; + uint32_t npoints = 0; assert(data_ptr); point = (LWPOINT*)lwalloc(sizeof(LWPOINT)); - point->SRID = -1; /* Default */ + point->srid = SRID_UNKNOWN; /* Default */ point->bbox = NULL; - point->type = lwgeom_makeType_full(FLAGS_GET_Z(g_flags), FLAGS_GET_M(g_flags), 0, type, 0); + point->type = POINTTYPE; + point->flags = g_flags; data_ptr += 4; /* Skip past the type. */ - npoints = lw_get_uint32(data_ptr); /* Zero => empty geometry */ + npoints = lw_get_uint32_t(data_ptr); /* Zero => empty geometry */ data_ptr += 4; /* Skip past the npoints. */ if ( npoints > 0 ) - point->point = pointArray_construct(data_ptr, FLAGS_GET_Z(g_flags), FLAGS_GET_M(g_flags), 1); + point->point = ptarray_construct_reference_data(FLAGS_GET_Z(g_flags), FLAGS_GET_M(g_flags), 1, data_ptr); else point->point = ptarray_construct(FLAGS_GET_Z(g_flags), FLAGS_GET_M(g_flags), 0); /* Empty point */ @@ -602,26 +878,27 @@ return point; } -static LWLINE* lwline_from_gserialized_buffer(uchar *data_ptr, uchar g_flags, size_t *g_size) +static LWLINE* lwline_from_gserialized_buffer(uint8_t *data_ptr, uint8_t g_flags, size_t *g_size) { - static uint32 type = LINETYPE; - uchar *start_ptr = data_ptr; + uint8_t *start_ptr = data_ptr; LWLINE *line; - uint32 npoints = 0; + uint32_t npoints = 0; assert(data_ptr); line = (LWLINE*)lwalloc(sizeof(LWLINE)); - line->SRID = -1; /* Default */ + line->srid = SRID_UNKNOWN; /* Default */ line->bbox = NULL; - line->type = lwgeom_makeType_full(FLAGS_GET_Z(g_flags), FLAGS_GET_M(g_flags), 0, type, 0); + line->type = LINETYPE; + line->flags = g_flags; data_ptr += 4; /* Skip past the type. */ - npoints = lw_get_uint32(data_ptr); /* Zero => empty geometry */ + npoints = lw_get_uint32_t(data_ptr); /* Zero => empty geometry */ data_ptr += 4; /* Skip past the npoints. */ if ( npoints > 0 ) - line->points = pointArray_construct(data_ptr, FLAGS_GET_Z(g_flags), FLAGS_GET_M(g_flags), npoints); + line->points = ptarray_construct_reference_data(FLAGS_GET_Z(g_flags), FLAGS_GET_M(g_flags), npoints, data_ptr); + else line->points = ptarray_construct(FLAGS_GET_Z(g_flags), FLAGS_GET_M(g_flags), 0); /* Empty linestring */ @@ -633,24 +910,24 @@ return line; } -static LWPOLY* lwpoly_from_gserialized_buffer(uchar *data_ptr, uchar g_flags, size_t *g_size) +static LWPOLY* lwpoly_from_gserialized_buffer(uint8_t *data_ptr, uint8_t g_flags, size_t *g_size) { - static uint32 type = POLYGONTYPE; - uchar *start_ptr = data_ptr; + uint8_t *start_ptr = data_ptr; LWPOLY *poly; - uchar *ordinate_ptr; - uint32 nrings = 0; + uint8_t *ordinate_ptr; + uint32_t nrings = 0; int i = 0; assert(data_ptr); poly = (LWPOLY*)lwalloc(sizeof(LWPOLY)); - poly->SRID = -1; /* Default */ + poly->srid = SRID_UNKNOWN; /* Default */ poly->bbox = NULL; - poly->type = lwgeom_makeType_full(FLAGS_GET_Z(g_flags), FLAGS_GET_M(g_flags), 0, type, 0); + poly->type = POLYGONTYPE; + poly->flags = g_flags; data_ptr += 4; /* Skip past the polygontype. */ - nrings = lw_get_uint32(data_ptr); /* Zero => empty geometry */ + nrings = lw_get_uint32_t(data_ptr); /* Zero => empty geometry */ poly->nrings = nrings; LWDEBUGF(4, "nrings = %d", nrings); data_ptr += 4; /* Skip past the nrings. */ @@ -670,14 +947,15 @@ for ( i = 0; i < nrings; i++ ) { - uint32 npoints = 0; + uint32_t npoints = 0; /* Read in the number of points. */ - npoints = lw_get_uint32(data_ptr); + npoints = lw_get_uint32_t(data_ptr); data_ptr += 4; /* Make a point array for the ring, and move the ordinate pointer past the ring ordinates. */ - poly->rings[i] = pointArray_construct(ordinate_ptr, FLAGS_GET_Z(g_flags), FLAGS_GET_M(g_flags), npoints); + poly->rings[i] = ptarray_construct_reference_data(FLAGS_GET_Z(g_flags), FLAGS_GET_M(g_flags), npoints, ordinate_ptr); + ordinate_ptr += sizeof(double) * FLAGS_NDIMS(g_flags) * npoints; } @@ -687,26 +965,57 @@ return poly; } -static LWCIRCSTRING* lwcircstring_from_gserialized_buffer(uchar *data_ptr, uchar g_flags, size_t *g_size) +static LWTRIANGLE* lwtriangle_from_gserialized_buffer(uint8_t *data_ptr, uint8_t g_flags, size_t *g_size) { - static uint32 type = CIRCSTRINGTYPE; - uchar *start_ptr = data_ptr; + uint8_t *start_ptr = data_ptr; + LWTRIANGLE *triangle; + uint32_t npoints = 0; + + assert(data_ptr); + + triangle = (LWTRIANGLE*)lwalloc(sizeof(LWTRIANGLE)); + triangle->srid = SRID_UNKNOWN; /* Default */ + triangle->bbox = NULL; + triangle->type = TRIANGLETYPE; + triangle->flags = g_flags; + + data_ptr += 4; /* Skip past the type. */ + npoints = lw_get_uint32_t(data_ptr); /* Zero => empty geometry */ + data_ptr += 4; /* Skip past the npoints. */ + + if ( npoints > 0 ) + triangle->points = ptarray_construct_reference_data(FLAGS_GET_Z(g_flags), FLAGS_GET_M(g_flags), npoints, data_ptr); + else + triangle->points = ptarray_construct(FLAGS_GET_Z(g_flags), FLAGS_GET_M(g_flags), 0); /* Empty triangle */ + + data_ptr += FLAGS_NDIMS(g_flags) * npoints * sizeof(double); + + if ( g_size ) + *g_size = data_ptr - start_ptr; + + return triangle; +} + +static LWCIRCSTRING* lwcircstring_from_gserialized_buffer(uint8_t *data_ptr, uint8_t g_flags, size_t *g_size) +{ + uint8_t *start_ptr = data_ptr; LWCIRCSTRING *circstring; - uint32 npoints = 0; + uint32_t npoints = 0; assert(data_ptr); circstring = (LWCIRCSTRING*)lwalloc(sizeof(LWCIRCSTRING)); - circstring->SRID = -1; /* Default */ + circstring->srid = SRID_UNKNOWN; /* Default */ circstring->bbox = NULL; - circstring->type = lwgeom_makeType_full(FLAGS_GET_Z(g_flags), FLAGS_GET_M(g_flags), 0, type, 0); + circstring->type = CIRCSTRINGTYPE; + circstring->flags = g_flags; data_ptr += 4; /* Skip past the circstringtype. */ - npoints = lw_get_uint32(data_ptr); /* Zero => empty geometry */ + npoints = lw_get_uint32_t(data_ptr); /* Zero => empty geometry */ data_ptr += 4; /* Skip past the npoints. */ if ( npoints > 0 ) - circstring->points = pointArray_construct(data_ptr, FLAGS_GET_Z(g_flags), FLAGS_GET_M(g_flags), npoints); + circstring->points = ptarray_construct_reference_data(FLAGS_GET_Z(g_flags), FLAGS_GET_M(g_flags), npoints, data_ptr); else circstring->points = ptarray_construct(FLAGS_GET_Z(g_flags), FLAGS_GET_M(g_flags), 0); /* Empty circularstring */ @@ -718,55 +1027,26 @@ return circstring; } -static int lwcollection_from_gserialized_allowed_types(int collectiontype, int subtype) +static LWCOLLECTION* lwcollection_from_gserialized_buffer(uint8_t *data_ptr, uint8_t g_flags, size_t *g_size) { - if ( collectiontype == COLLECTIONTYPE ) - return LW_TRUE; - if ( collectiontype == MULTIPOINTTYPE && - subtype == POINTTYPE ) - return LW_TRUE; - if ( collectiontype == MULTILINETYPE && - subtype == LINETYPE ) - return LW_TRUE; - if ( collectiontype == MULTIPOLYGONTYPE && - subtype == POLYGONTYPE ) - return LW_TRUE; - if ( collectiontype == COMPOUNDTYPE && - (subtype == LINETYPE || subtype == CIRCSTRINGTYPE) ) - return LW_TRUE; - if ( collectiontype == CURVEPOLYTYPE && - (subtype == CIRCSTRINGTYPE || subtype == LINETYPE || subtype == COMPOUNDTYPE) ) - return LW_TRUE; - if ( collectiontype == MULTICURVETYPE && - (subtype == CIRCSTRINGTYPE || subtype == LINETYPE || subtype == COMPOUNDTYPE) ) - return LW_TRUE; - if ( collectiontype == MULTISURFACETYPE && - (subtype == POLYGONTYPE || subtype == CURVEPOLYTYPE) ) - return LW_TRUE; - - /* Must be a bad combination! */ - return LW_FALSE; -} - -static LWCOLLECTION* lwcollection_from_gserialized_buffer(uchar *data_ptr, uchar g_flags, size_t *g_size) -{ - uint32 type; - uchar *start_ptr = data_ptr; + uint32_t type; + uint8_t *start_ptr = data_ptr; LWCOLLECTION *collection; - uint32 ngeoms = 0; + uint32_t ngeoms = 0; int i = 0; assert(data_ptr); - type = lw_get_uint32(data_ptr); + type = lw_get_uint32_t(data_ptr); data_ptr += 4; /* Skip past the type. */ collection = (LWCOLLECTION*)lwalloc(sizeof(LWCOLLECTION)); - collection->SRID = -1; /* Default */ + collection->srid = SRID_UNKNOWN; /* Default */ collection->bbox = NULL; - collection->type = lwgeom_makeType_full(FLAGS_GET_Z(g_flags), FLAGS_GET_M(g_flags), 0, type, 0); + collection->type = type; + collection->flags = g_flags; - ngeoms = lw_get_uint32(data_ptr); + ngeoms = lw_get_uint32_t(data_ptr); collection->ngeoms = ngeoms; /* Zero => empty geometry */ data_ptr += 4; /* Skip past the ngeoms. */ @@ -775,14 +1055,17 @@ else collection->geoms = NULL; + /* Sub-geometries are never de-serialized with boxes (#1254) */ + FLAGS_SET_BBOX(g_flags, 0); + for ( i = 0; i < ngeoms; i++ ) { - uint32 subtype = lw_get_uint32(data_ptr); + uint32_t subtype = lw_get_uint32_t(data_ptr); size_t subsize = 0; - if ( ! lwcollection_from_gserialized_allowed_types(type, subtype) ) + if ( ! lwcollection_allows_subtype(type, subtype) ) { - lwerror("Invalid subtype (%s) for collection type (%s)", lwgeom_typename(subtype), lwgeom_typename(type)); + lwerror("Invalid subtype (%s) for collection type (%s)", lwtype_name(subtype), lwtype_name(type)); lwfree(collection); return NULL; } @@ -796,16 +1079,16 @@ return collection; } - -LWGEOM* lwgeom_from_gserialized_buffer(uchar *data_ptr, uchar g_flags, size_t *g_size) +LWGEOM* lwgeom_from_gserialized_buffer(uint8_t *data_ptr, uint8_t g_flags, size_t *g_size) { - uint32 type; + uint32_t type; assert(data_ptr); - type = lw_get_uint32(data_ptr); + type = lw_get_uint32_t(data_ptr); - LWDEBUGF(2, "Got type %d (%s)", type, lwgeom_typename(type)); + LWDEBUGF(2, "Got type %d (%s), hasz=%d hasm=%d geodetic=%d hasbox=%d", type, lwtype_name(type), + FLAGS_GET_Z(g_flags), FLAGS_GET_M(g_flags), FLAGS_GET_GEODETIC(g_flags), FLAGS_GET_BBOX(g_flags)); switch (type) { @@ -817,6 +1100,8 @@ return (LWGEOM *)lwcircstring_from_gserialized_buffer(data_ptr, g_flags, g_size); case POLYGONTYPE: return (LWGEOM *)lwpoly_from_gserialized_buffer(data_ptr, g_flags, g_size); + case TRIANGLETYPE: + return (LWGEOM *)lwtriangle_from_gserialized_buffer(data_ptr, g_flags, g_size); case MULTIPOINTTYPE: case MULTILINETYPE: case MULTIPOLYGONTYPE: @@ -824,361 +1109,60 @@ case CURVEPOLYTYPE: case MULTICURVETYPE: case MULTISURFACETYPE: + case POLYHEDRALSURFACETYPE: + case TINTYPE: case COLLECTIONTYPE: return (LWGEOM *)lwcollection_from_gserialized_buffer(data_ptr, g_flags, g_size); default: - lwerror("Unknown geometry type: %d", type); + lwerror("Unknown geometry type: %d - %s", type, lwtype_name(type)); return NULL; } } - LWGEOM* lwgeom_from_gserialized(const GSERIALIZED *g) { - uchar g_flags = 0; - uchar has_srid = 0; - uchar *data_ptr = NULL; - uint32 g_srid = 0; - uint32 g_type = 0; + uint8_t g_flags = 0; + int32_t g_srid = 0; + uint32_t g_type = 0; + uint8_t *data_ptr = NULL; LWGEOM *lwgeom = NULL; + GBOX bbox; size_t g_size = 0; assert(g); g_srid = gserialized_get_srid(g); - LWDEBUGF(4, "Got srid %d", g_srid); g_flags = g->flags; - if ( g_srid > 0 ) - has_srid = 1; g_type = gserialized_get_type(g); - LWDEBUGF(4, "Got type %d", g_type); + LWDEBUGF(4, "Got type %d (%s), srid=%d", g_type, lwtype_name(g_type), g_srid); - data_ptr = (uchar*)g->data; + data_ptr = (uint8_t*)g->data; if ( FLAGS_GET_BBOX(g_flags) ) data_ptr += gbox_serialized_size(g_flags); lwgeom = lwgeom_from_gserialized_buffer(data_ptr, g_flags, &g_size); - if ( ! lwgeom ) return NULL; /* Ooops! */ + if ( ! lwgeom ) + lwerror("lwgeom_from_gserialized: unable create geometry"); /* Ooops! */ - lwgeom->type = lwgeom_makeType_full(FLAGS_GET_Z(g_flags), FLAGS_GET_M(g_flags), has_srid, g_type, FLAGS_GET_BBOX(g_flags)); + lwgeom->type = g_type; + lwgeom->flags = g_flags; - if ( FLAGS_GET_BBOX(g_flags) && ! FLAGS_GET_GEODETIC(g_flags) ) + if ( gserialized_read_gbox_p(g, &bbox) == LW_SUCCESS ) { - float *fptr = (float*)g->data; - BOX2DFLOAT4 *bbox = lwalloc(sizeof(BOX2DFLOAT4)); - bbox->xmin = fptr[0]; - bbox->xmax = fptr[1]; - bbox->ymin = fptr[2]; - bbox->ymax = fptr[3]; - lwgeom->bbox = bbox; + lwgeom->bbox = gbox_copy(&bbox); } - else + else if ( lwgeom_needs_bbox(lwgeom) && (lwgeom_calculate_gbox(lwgeom, &bbox) == LW_SUCCESS) ) { - lwgeom->bbox = NULL; + lwgeom->bbox = gbox_copy(&bbox); } - - if ( has_srid ) - lwgeom->SRID = g_srid; else - lwgeom->SRID = -1; - - return lwgeom; -} - -/*********************************************************************** -* Calculate geocentric bounding box from geodetic coordinates -* of GSERIALIZED. To be used in index calculations to get the box -* of smaller features on the fly, and in feature creation, to -* calculate the box that will be added to the feature. -*/ - -static int gserialized_calculate_gbox_geocentric_from_any(uchar *data_ptr, size_t *g_size, GBOX *gbox); - -static int gserialized_calculate_gbox_geocentric_from_point(uchar *data_ptr, size_t *g_size, GBOX *gbox) -{ - uchar *start_ptr = data_ptr; - int npoints = 0; - POINTARRAY *pa; - - assert(data_ptr); - - data_ptr += 4; /* Move past type integer. */ - npoints = lw_get_uint32(data_ptr); - data_ptr += 4; /* Move past npoints. */ - - if ( npoints == 0 ) /* Empty point */ - { - if (g_size) *g_size = data_ptr - start_ptr; - return G_FAILURE; - } - - pa = pointArray_construct(data_ptr, FLAGS_GET_Z(gbox->flags), FLAGS_GET_M(gbox->flags), npoints); - - if ( ptarray_calculate_gbox_geodetic(pa, gbox) == G_FAILURE ) - return G_FAILURE; - - /* Move past all the double ordinates. */ - data_ptr += sizeof(double) * FLAGS_NDIMS(gbox->flags); - - if (g_size) - *g_size = data_ptr - start_ptr; - - lwfree(pa); - - return G_SUCCESS; -} - -static int gserialized_calculate_gbox_geocentric_from_line(uchar *data_ptr, size_t *g_size, GBOX *gbox) -{ - uchar *start_ptr = data_ptr; - int npoints = 0; - POINTARRAY *pa; - - assert(data_ptr); - - data_ptr += 4; /* Move past type integer. */ - npoints = lw_get_uint32(data_ptr); - data_ptr += 4; /* Move past npoints. */ - - if ( npoints == 0 ) /* Empty linestring */ - { - if (g_size) *g_size = data_ptr - start_ptr; - return G_FAILURE; - } - - pa = pointArray_construct(data_ptr, FLAGS_GET_Z(gbox->flags), FLAGS_GET_M(gbox->flags), npoints); - - if ( ptarray_calculate_gbox_geodetic(pa, gbox) == G_FAILURE ) - return G_FAILURE; - - /* Move past all the double ordinates. */ - data_ptr += sizeof(double) * FLAGS_NDIMS(gbox->flags) * npoints; - - if (g_size) - *g_size = data_ptr - start_ptr; - - lwfree(pa); - - return G_SUCCESS; -} - -static int gserialized_calculate_gbox_geocentric_from_polygon(uchar *data_ptr, size_t *g_size, GBOX *gbox) -{ - uchar *start_ptr = data_ptr; - int npoints0 = 0; /* Points in exterior ring. */ - int npoints = 0; /* Points in all rings. */ - int nrings = 0; - POINTARRAY *pa; - int i; - - assert(data_ptr); - - data_ptr += 4; /* Move past type integer. */ - - nrings = lw_get_uint32(data_ptr); - data_ptr += 4; /* Move past nrings. */ - - if ( nrings <= 0 ) - { - if (g_size) *g_size = data_ptr - start_ptr; - return G_FAILURE; /* Empty polygon */ - } - - npoints0 = lw_get_uint32(data_ptr); /* NPoints in first (exterior) ring. */ - - for ( i = 0; i < nrings; i++ ) - { - npoints += lw_get_uint32(data_ptr); - data_ptr += 4; /* Move past this npoints value. */ - } - - if ( nrings % 2 ) /* Move past optional padding. */ - data_ptr += 4; - - pa = pointArray_construct(data_ptr, FLAGS_GET_Z(gbox->flags), FLAGS_GET_M(gbox->flags), npoints); - - /* Bounds of exterior ring is bounds of whole polygon. */ - if ( ptarray_calculate_gbox_geodetic(pa, gbox) == G_FAILURE ) - return G_FAILURE; - - /* Move past all the double ordinates. */ - data_ptr += sizeof(double) * FLAGS_NDIMS(gbox->flags) * npoints; - - if (g_size) - *g_size = data_ptr - start_ptr; - - lwfree(pa); - - return G_SUCCESS; -} - -static int gserialized_calculate_gbox_geocentric_from_collection(uchar *data_ptr, size_t *g_size, GBOX *gbox) -{ - uchar *start_ptr = data_ptr; - int ngeoms = 0; - int i; - int first = LW_TRUE; - int result = G_FAILURE; - - assert(data_ptr); - - data_ptr += 4; /* Move past type integer. */ - ngeoms = lw_get_uint32(data_ptr); - data_ptr += 4; /* Move past ngeoms. */ - - if ( ngeoms <= 0 ) return G_FAILURE; /* Empty collection */ - - for ( i = 0; i < ngeoms; i++ ) - { - size_t subgeom_size = 0; - GBOX subbox; - subbox.flags = gbox->flags; - if ( gserialized_calculate_gbox_geocentric_from_any(data_ptr, &subgeom_size, &subbox) != G_FAILURE ) - { - if ( first ) - { - gbox_duplicate(&subbox, gbox); - first = LW_FALSE; - } - else - { - gbox_merge(&subbox, gbox); - } - result = G_SUCCESS; - } - data_ptr += subgeom_size; - } - - if (g_size) - *g_size = data_ptr - start_ptr; - - return result; -} - -static int gserialized_calculate_gbox_geocentric_from_any(uchar *data_ptr, size_t *g_size, GBOX *gbox) -{ - - uint32 type; - - assert(data_ptr); - - type = lw_get_uint32(data_ptr); - - LWDEBUGF(2, "Got type %d (%s)", type, lwgeom_typename(type)); - LWDEBUGF(3, "Got gbox pointer (%p)", gbox); - - switch (type) - { - case POINTTYPE: - return gserialized_calculate_gbox_geocentric_from_point(data_ptr, g_size, gbox); - case LINETYPE: - return gserialized_calculate_gbox_geocentric_from_line(data_ptr, g_size, gbox); - case POLYGONTYPE: - return gserialized_calculate_gbox_geocentric_from_polygon(data_ptr, g_size, gbox); - case MULTIPOINTTYPE: - case MULTILINETYPE: - case MULTIPOLYGONTYPE: - case COMPOUNDTYPE: - case CURVEPOLYTYPE: - case MULTICURVETYPE: - case MULTISURFACETYPE: - case COLLECTIONTYPE: - return gserialized_calculate_gbox_geocentric_from_collection(data_ptr, g_size, gbox); - default: - lwerror("Unsupported geometry type: %d", type); - return G_FAILURE; - } -} - -int gserialized_calculate_gbox_geocentric_p(const GSERIALIZED *g, GBOX *g_box) -{ - uchar *data_ptr = NULL; - size_t g_size = 0; - int result = G_SUCCESS; - - assert(g); - - /* This function only works for geodetics. */ - if ( ! FLAGS_GET_GEODETIC(g->flags) ) - { - lwerror("Function only accepts geodetic inputs."); - return G_FAILURE; - } - - LWDEBUGF(4, "Got input %s", gserialized_to_string(g)); - - data_ptr = (uchar*)g->data; - g_box->flags = g->flags; - - /* If the serialized form already has a box, skip past it. */ - if ( FLAGS_GET_BBOX(g->flags) ) { - int ndims = FLAGS_GET_GEODETIC(g->flags) ? 3 : FLAGS_NDIMS(g->flags); - data_ptr += 2 * ndims * sizeof(float); /* Copy the bounding box and return. */ - LWDEBUG(3,"Serialized form has box already, skipping past..."); - } - - LWDEBUG(3,"Calculating box..."); - /* Calculate the bounding box from the geometry. */ - result = gserialized_calculate_gbox_geocentric_from_any(data_ptr, &g_size, g_box); - - if ( result == G_FAILURE ) - { - LWDEBUG(3,"Unable to calculate geocentric bounding box."); - return G_FAILURE; /* Ooops! */ - } - - LWDEBUGF(3,"Returning box: %s", gbox_to_string(g_box)); - return result; -} - -GBOX* gserialized_calculate_gbox_geocentric(const GSERIALIZED *g) -{ - GBOX g_box; - int result = G_SUCCESS; - - result = gserialized_calculate_gbox_geocentric_p(g, &g_box); - - if ( result == G_FAILURE ) - return NULL; /* Ooops! */ - - LWDEBUGF(3,"Returning box: %s", gbox_to_string(&g_box)); - return gbox_copy(&g_box); -} - - -GSERIALIZED* gserialized_copy(const GSERIALIZED *g) -{ - GSERIALIZED *g_out = NULL; - assert(g); - g_out = (GSERIALIZED*)lwalloc(SIZE_GET(g->size)); - memcpy((uchar*)g_out,(uchar*)g,SIZE_GET(g->size)); - return g_out; -} - -char* gserialized_to_string(const GSERIALIZED *g) -{ - LWGEOM_UNPARSER_RESULT lwg_unparser_result; - LWGEOM *lwgeom = lwgeom_from_gserialized(g); - uchar *serialized_lwgeom; - int result; - - assert(g); - - if ( ! lwgeom ) - { - lwerror("Unable to create lwgeom from gserialized"); - return NULL; + lwgeom->bbox = NULL; } - serialized_lwgeom = lwgeom_serialize(lwgeom); - lwgeom_release(lwgeom); - - result = serialized_lwgeom_to_ewkt(&lwg_unparser_result, serialized_lwgeom, PARSER_CHECK_NONE); - lwfree(serialized_lwgeom); - - return lwg_unparser_result.wkoutput; + lwgeom_set_srid(lwgeom, g_srid); + return lwgeom; } diff -Nru postgis-1.5.3/liblwgeom/g_serialized.txt postgis-2.0.1/liblwgeom/g_serialized.txt --- postgis-1.5.3/liblwgeom/g_serialized.txt 2009-09-14 10:54:33.000000000 +0000 +++ postgis-2.0.1/liblwgeom/g_serialized.txt 2012-02-27 22:08:12.000000000 +0000 @@ -2,29 +2,52 @@ GSERIALIZED FORM ================= -The new serialized form, used by GEOGRAPHY, attempts to learn from the lessons of the SERIALIZED_LWGEOM, making slightly different trade-offs between alignment and overall compactness. - -* It is understood that GSERIALIZED is be used primarily (only) by PostGIS. Other users of the geometry library (for example, the loaders and dumpers) will serialize to WKB or EWKB or various text representations. Therefore, GSERIALIZED includes the uint32 "size" field at the top used by PostgreSQL for varlena types. -* Like SERIALIZED_LWGEOM, GSERIALIZED is built to be read and written recursively, so that nested collections of collections (of ...) are possible without restrictions on depth. -* GSERIALIZED preserves double alignment of ordinate arrays. This will allow coordinate access without memcpy. -* GSERIALIZED includes a mandatory SRID, in recognition of the fact that most production use of PostGIS does actually use an SRID. In SERIALIZED_LWGEOM the SRID is optional. -* GSERIALIZED places the dimensionality information, the SRID information and the bounding boxes at the front of the structure, and all sub-components inherit from those parent values. -* GSERIALIZED retains the idea of optional bounding boxes, so that small features do not carry the extra storage overhead of a largely redundant bounding box. +The new serialized form, used by GEOGRAPHY, attempts to learn from the +lessons of the SERIALIZED_LWGEOM, making slightly different trade-offs +between alignment and overall compactness. + +* It is understood that GSERIALIZED is be used primarily (only) + by PostGIS. Other users of the geometry library (for example, the + loaders and dumpers) will serialize to WKB or EWKB or various text + representations. Therefore, GSERIALIZED includes the uint32 "size" + field at the top used by PostgreSQL for varlena types. +* Like SERIALIZED_LWGEOM, GSERIALIZED is built to be read and written + recursively, so that nested collections of collections (of ...) are + possible without restrictions on depth. +* GSERIALIZED preserves double alignment of ordinate arrays. This will + allow coordinate access without memcpy. +* GSERIALIZED includes a mandatory SRID, in recognition of the fact + that most production use of PostGIS does actually use an SRID. In + SERIALIZED_LWGEOM the SRID is optional. +* GSERIALIZED places the dimensionality information, the SRID + information and the bounding boxes at the front of the structure, + and all sub-components inherit from those parent values. +* GSERIALIZED retains the idea of optional bounding boxes, so that small + features do not carry the extra storage overhead of a largely redundant + bounding box. STRUCTURE --------- -Most of the internals of GSERIALIZED are anonymous. One thing that differs from SERIALIZED_LWGEOM is that the geometry type is no longer directly accessible from the structure (it was inside the one byte "type" at the top of the SERIALIZED_LWGEOM). To access the type in GSERIALIZED, you first have to figure out whether there is a an bounding box, how many dimensions that bounding box has, and move the data pointer appropriately before dereferencing. The gserialized_get_type(GSERIALIZED *s) function carries out this operation. +Most of the internals of GSERIALIZED are anonymous. One thing that +differs from SERIALIZED_LWGEOM is that the geometry type is no longer +directly accessible from the structure (it was inside the one byte "type" +at the top of the SERIALIZED_LWGEOM). To access the type in GSERIALIZED, +you first have to figure out whether there is a an bounding box, how many +dimensions that bounding box has, and move the data pointer appropriately +before dereferencing. The gserialized_get_type(GSERIALIZED *s) function +carries out this operation. typedef struct { uint32 size; /* For PgSQL use, use VAR* macros to manipulate. */ - uchar srid[3]; /* 24 bits of SRID */ + uchar srid[3]; /* 21 bits of SRID (and 3 spare bits) */ uchar flags; /* HasZ, HasM, HasBBox, IsGeodetic */ uchar data[1]; /* See gserialized.txt */ } GSERIALIZED; -The standard header is as follows (using <> to denote 4-byte fields and [] to denote 8-byte fields): +The standard header is as follows (using <> to denote 4-byte fields and +[] to denote 8-byte fields): size /* Used by PgSQL */ -After the header comes the recursively searchable geometry representations. Each type is double aligned, so any combination is double aligned, and we start after a double aligned standard header, so we are golden: +After the header comes the recursively searchable geometry +representations. Each type is double aligned, so any combination is +double aligned, and we start after a double aligned standard header, +so we are golden: /* 0 if empty, 1 otherwise */ diff -Nru postgis-1.5.3/liblwgeom/g_util.c postgis-2.0.1/liblwgeom/g_util.c --- postgis-1.5.3/liblwgeom/g_util.c 2010-02-01 17:35:55.000000000 +0000 +++ postgis-2.0.1/liblwgeom/g_util.c 2012-02-27 22:08:12.000000000 +0000 @@ -1,5 +1,5 @@ /********************************************************************** - * $Id: g_util.c 5181 2010-02-01 17:35:55Z pramsey $ + * $Id: g_util.c 9324 2012-02-27 22:08:12Z pramsey $ * * PostGIS - Spatial Types for PostgreSQL * Copyright 2009 Paul Ramsey @@ -11,7 +11,7 @@ #include -#include "libgeom.h" +#include "liblwgeom_internal.h" /* Structure for the type array */ struct geomtype_struct @@ -27,46 +27,95 @@ before it. Otherwise if we search for "POINT" at the top of the list we would also match MULTIPOINT, for example. */ -struct geomtype_struct geomtype_struct_array[32] = +struct geomtype_struct geomtype_struct_array[] = { { "GEOMETRYCOLLECTIONZM", COLLECTIONTYPE, 1, 1 }, { "GEOMETRYCOLLECTIONZ", COLLECTIONTYPE, 1, 0 }, { "GEOMETRYCOLLECTIONM", COLLECTIONTYPE, 0, 1 }, { "GEOMETRYCOLLECTION", COLLECTIONTYPE, 0, 0 }, + { "GEOMETRYZM", 0, 1, 1 }, { "GEOMETRYZ", 0, 1, 0 }, { "GEOMETRYM", 0, 0, 1 }, { "GEOMETRY", 0, 0, 0 }, + + { "POLYHEDRALSURFACEZM", POLYHEDRALSURFACETYPE, 1, 1 }, + { "POLYHEDRALSURFACEZ", POLYHEDRALSURFACETYPE, 1, 0 }, + { "POLYHEDRALSURFACEM", POLYHEDRALSURFACETYPE, 0, 1 }, + { "POLYHEDRALSURFACE", POLYHEDRALSURFACETYPE, 0, 0 }, + + { "TINZM", TINTYPE, 1, 1 }, + { "TINZ", TINTYPE, 1, 0 }, + { "TINM", TINTYPE, 0, 1 }, + { "TIN", TINTYPE, 0, 0 }, + + { "CIRCULARSTRINGZM", CIRCSTRINGTYPE, 1, 1 }, + { "CIRCULARSTRINGZ", CIRCSTRINGTYPE, 1, 0 }, + { "CIRCULARSTRINGM", CIRCSTRINGTYPE, 0, 1 }, + { "CIRCULARSTRING", CIRCSTRINGTYPE, 0, 0 }, + + { "COMPOUNDCURVEZM", COMPOUNDTYPE, 1, 1 }, + { "COMPOUNDCURVEZ", COMPOUNDTYPE, 1, 0 }, + { "COMPOUNDCURVEM", COMPOUNDTYPE, 0, 1 }, + { "COMPOUNDCURVE", COMPOUNDTYPE, 0, 0 }, + + { "CURVEPOLYGONZM", CURVEPOLYTYPE, 1, 1 }, + { "CURVEPOLYGONZ", CURVEPOLYTYPE, 1, 0 }, + { "CURVEPOLYGONM", CURVEPOLYTYPE, 0, 1 }, + { "CURVEPOLYGON", CURVEPOLYTYPE, 0, 0 }, + + { "MULTICURVEZM", MULTICURVETYPE, 1, 1 }, + { "MULTICURVEZ", MULTICURVETYPE, 1, 0 }, + { "MULTICURVEM", MULTICURVETYPE, 0, 1 }, + { "MULTICURVE", MULTICURVETYPE, 0, 0 }, + + { "MULTISURFACEZM", MULTISURFACETYPE, 1, 1 }, + { "MULTISURFACEZ", MULTISURFACETYPE, 1, 0 }, + { "MULTISURFACEM", MULTISURFACETYPE, 0, 1 }, + { "MULTISURFACE", MULTISURFACETYPE, 0, 0 }, + { "MULTILINESTRINGZM", MULTILINETYPE, 1, 1 }, { "MULTILINESTRINGZ", MULTILINETYPE, 1, 0 }, { "MULTILINESTRINGM", MULTILINETYPE, 0, 1 }, { "MULTILINESTRING", MULTILINETYPE, 0, 0 }, + { "MULTIPOLYGONZM", MULTIPOLYGONTYPE, 1, 1 }, { "MULTIPOLYGONZ", MULTIPOLYGONTYPE, 1, 0 }, { "MULTIPOLYGONM", MULTIPOLYGONTYPE, 0, 1 }, { "MULTIPOLYGON", MULTIPOLYGONTYPE, 0, 0 }, + { "MULTIPOINTZM", MULTIPOINTTYPE, 1, 1 }, { "MULTIPOINTZ", MULTIPOINTTYPE, 1, 0 }, { "MULTIPOINTM", MULTIPOINTTYPE, 0, 1 }, { "MULTIPOINT", MULTIPOINTTYPE, 0, 0 }, + { "LINESTRINGZM", LINETYPE, 1, 1 }, { "LINESTRINGZ", LINETYPE, 1, 0 }, { "LINESTRINGM", LINETYPE, 0, 1 }, { "LINESTRING", LINETYPE, 0, 0 }, + + { "TRIANGLEZM", TRIANGLETYPE, 1, 1 }, + { "TRIANGLEZ", TRIANGLETYPE, 1, 0 }, + { "TRIANGLEM", TRIANGLETYPE, 0, 1 }, + { "TRIANGLE", TRIANGLETYPE, 0, 0 }, + { "POLYGONZM", POLYGONTYPE, 1, 1 }, { "POLYGONZ", POLYGONTYPE, 1, 0 }, { "POLYGONM", POLYGONTYPE, 0, 1 }, { "POLYGON", POLYGONTYPE, 0, 0 }, + { "POINTZM", POINTTYPE, 1, 1 }, { "POINTZ", POINTTYPE, 1, 0 }, { "POINTM", POINTTYPE, 0, 1 }, { "POINT", POINTTYPE, 0, 0 } + }; +#define GEOMTYPE_STRUCT_ARRAY_LEN (sizeof geomtype_struct_array/sizeof(struct geomtype_struct)) -uchar gflags(int hasz, int hasm, int geodetic) +uint8_t gflags(int hasz, int hasm, int geodetic) { - unsigned char flags = 0; + uint8_t flags = 0; if ( hasz ) FLAGS_SET_Z(flags, 1); if ( hasm ) @@ -80,9 +129,9 @@ * Calculate type integer and dimensional flags from string input. * Case insensitive, and insensitive to spaces at front and back. * Type == 0 in the case of the string "GEOMETRY" or "GEOGRAPHY". -* Return G_SUCCESS for success. +* Return LW_SUCCESS for success. */ -int geometry_type_from_string(const char *str, int *type, int *z, int *m) +int geometry_type_from_string(const char *str, uint8_t *type, int *z, int *m) { char *tmpstr; int tmpstartpos, tmpendpos; @@ -128,7 +177,7 @@ tmpstr[i - tmpstartpos] = '\0'; /* Now check for the type */ - for (i = 0; i < 32; i++) + for (i = 0; i < GEOMTYPE_STRUCT_ARRAY_LEN; i++) { if (!strcmp(tmpstr, geomtype_struct_array[i].typename)) { @@ -138,14 +187,14 @@ lwfree(tmpstr); - return G_SUCCESS; + return LW_SUCCESS; } } lwfree(tmpstr); - return G_FAILURE; + return LW_FAILURE; } diff -Nru postgis-1.5.3/liblwgeom/lex.yy.c postgis-2.0.1/liblwgeom/lex.yy.c --- postgis-1.5.3/liblwgeom/lex.yy.c 2011-06-25 16:29:57.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lex.yy.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,4813 +0,0 @@ -#line 2 "lex.yy.c" - -#line 4 "lex.yy.c" - -#define YY_INT_ALIGNED short int - -/* A lexical scanner generated by flex */ - -#define yy_create_buffer lwg_parse_yy_create_buffer -#define yy_delete_buffer lwg_parse_yy_delete_buffer -#define yy_flex_debug lwg_parse_yy_flex_debug -#define yy_init_buffer lwg_parse_yy_init_buffer -#define yy_flush_buffer lwg_parse_yy_flush_buffer -#define yy_load_buffer_state lwg_parse_yy_load_buffer_state -#define yy_switch_to_buffer lwg_parse_yy_switch_to_buffer -#define yyin lwg_parse_yyin -#define yyleng lwg_parse_yyleng -#define yylex lwg_parse_yylex -#define yylineno lwg_parse_yylineno -#define yyout lwg_parse_yyout -#define yyrestart lwg_parse_yyrestart -#define yytext lwg_parse_yytext -#define yywrap lwg_parse_yywrap -#define yyalloc lwg_parse_yyalloc -#define yyrealloc lwg_parse_yyrealloc -#define yyfree lwg_parse_yyfree - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 35 -#if YY_FLEX_SUBMINOR_VERSION > 0 -#define FLEX_BETA -#endif - -/* First, we deal with platform-specific or compiler-specific issues. */ - -/* begin standard C headers. */ -#include -#include -#include -#include - -/* end standard C headers. */ - -/* flex integer type definitions */ - -#ifndef FLEXINT_H -#define FLEXINT_H - -/* C99 systems have . Non-C99 systems may or may not. */ - -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. - */ -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS 1 -#endif - -#include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; -typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; -typedef uint32_t flex_uint32_t; -#else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; -typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; -#endif /* ! C99 */ - -/* Limits of integral types. */ -#ifndef INT8_MIN -#define INT8_MIN (-128) -#endif -#ifndef INT16_MIN -#define INT16_MIN (-32767-1) -#endif -#ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) -#endif -#ifndef INT8_MAX -#define INT8_MAX (127) -#endif -#ifndef INT16_MAX -#define INT16_MAX (32767) -#endif -#ifndef INT32_MAX -#define INT32_MAX (2147483647) -#endif -#ifndef UINT8_MAX -#define UINT8_MAX (255U) -#endif -#ifndef UINT16_MAX -#define UINT16_MAX (65535U) -#endif -#ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) -#endif - -#endif /* ! FLEXINT_H */ - -#ifdef __cplusplus - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -/* C99 requires __STDC__ to be defined as 1. */ -#if defined (__STDC__) - -#define YY_USE_CONST - -#endif /* defined (__STDC__) */ -#endif /* ! __cplusplus */ - -#ifdef YY_USE_CONST -#define yyconst const -#else -#define yyconst -#endif - -/* Returned upon end-of-file. */ -#define YY_NULL 0 - -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. - */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN (yy_start) = 1 + 2 * - -/* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The YYSTATE alias is for lex - * compatibility. - */ -#define YY_START (((yy_start) - 1) / 2) -#define YYSTATE YY_START - -/* Action number for EOF rule of a given start state. */ -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - -/* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE lwg_parse_yyrestart(lwg_parse_yyin ) - -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#ifndef YY_BUF_SIZE -#define YY_BUF_SIZE 16384 -#endif - -/* The state buf must be large enough to hold one state per character in the main buffer. - */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) - -#ifndef YY_TYPEDEF_YY_BUFFER_STATE -#define YY_TYPEDEF_YY_BUFFER_STATE -typedef struct yy_buffer_state *YY_BUFFER_STATE; -#endif - -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - -extern yy_size_t lwg_parse_yyleng; - -extern FILE *lwg_parse_yyin, *lwg_parse_yyout; - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - - #define YY_LESS_LINENO(n) - -/* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up lwg_parse_yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = (yy_hold_char); \ - YY_RESTORE_YY_MORE_OFFSET \ - (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up lwg_parse_yytext again */ \ - } \ - while ( 0 ) - -#define unput(c) yyunput( c, (yytext_ptr) ) - -#ifndef YY_STRUCT_YY_BUFFER_STATE -#define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - yy_size_t yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - -#define YY_BUFFER_NEW 0 -#define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via lwg_parse_yyrestart()), so that the user can continue scanning by - * just pointing lwg_parse_yyin at a new input file. - */ -#define YY_BUFFER_EOF_PENDING 2 - - }; -#endif /* !YY_STRUCT_YY_BUFFER_STATE */ - -/* Stack of input buffers. */ -static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ -static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ -static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ - -/* We provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state". - * - * Returns the top of the stack, or NULL. - */ -#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ - ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ - : NULL) - -/* Same as previous macro, but useful when we know that the buffer stack is not - * NULL or when we need an lvalue. For internal use only. - */ -#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] - -/* yy_hold_char holds the character lost when lwg_parse_yytext is formed. */ -static char yy_hold_char; -static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ -yy_size_t lwg_parse_yyleng; - -/* Points to current character in buffer. */ -static char *yy_c_buf_p = (char *) 0; -static int yy_init = 0; /* whether we need to initialize */ -static int yy_start = 0; /* start state number */ - -/* Flag which is used to allow lwg_parse_yywrap()'s to do buffer switches - * instead of setting up a fresh lwg_parse_yyin. A bit of a hack ... - */ -static int yy_did_buffer_switch_on_eof; - -void lwg_parse_yyrestart (FILE *input_file ); -void lwg_parse_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); -YY_BUFFER_STATE lwg_parse_yy_create_buffer (FILE *file,int size ); -void lwg_parse_yy_delete_buffer (YY_BUFFER_STATE b ); -void lwg_parse_yy_flush_buffer (YY_BUFFER_STATE b ); -void lwg_parse_yypush_buffer_state (YY_BUFFER_STATE new_buffer ); -void lwg_parse_yypop_buffer_state (void ); - -static void lwg_parse_yyensure_buffer_stack (void ); -static void lwg_parse_yy_load_buffer_state (void ); -static void lwg_parse_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); - -#define YY_FLUSH_BUFFER lwg_parse_yy_flush_buffer(YY_CURRENT_BUFFER ) - -YY_BUFFER_STATE lwg_parse_yy_scan_buffer (char *base,yy_size_t size ); -YY_BUFFER_STATE lwg_parse_yy_scan_string (yyconst char *yy_str ); -YY_BUFFER_STATE lwg_parse_yy_scan_bytes (yyconst char *bytes,yy_size_t len ); - -void *lwg_parse_yyalloc (yy_size_t ); -void *lwg_parse_yyrealloc (void *,yy_size_t ); -void lwg_parse_yyfree (void * ); - -#define yy_new_buffer lwg_parse_yy_create_buffer - -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - lwg_parse_yyensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - lwg_parse_yy_create_buffer(lwg_parse_yyin,YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } - -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - lwg_parse_yyensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - lwg_parse_yy_create_buffer(lwg_parse_yyin,YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } - -#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) - -/* Begin user sect3 */ - -typedef char YY_CHAR; - -FILE *lwg_parse_yyin = (FILE *) 0, *lwg_parse_yyout = (FILE *) 0; - -typedef int yy_state_type; - -extern int lwg_parse_yylineno; - -int lwg_parse_yylineno = 1; - -extern char *lwg_parse_yytext; -#define yytext_ptr lwg_parse_yytext -static yyconst flex_int16_t yy_nxt[][128] = - { - { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 - }, - - { - 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, - 8, 6, 6, 7, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 7, 6, 6, 6, 6, 6, 6, 6, - 9, 10, 6, 6, 11, 6, 6, 6, 12, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 13, - 6, 14, 6, 6, 6, 6, 6, 15, 6, 16, - - 6, 17, 6, 6, 6, 6, 18, 19, 6, 6, - 20, 6, 6, 21, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 15, - 6, 16, 6, 17, 6, 6, 6, 6, 18, 19, - 6, 6, 20, 6, 6, 21, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6 - }, - - { - 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, - 8, 6, 6, 7, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 7, 6, 6, 6, 6, 6, 6, 6, - - 9, 10, 6, 6, 11, 6, 6, 6, 12, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 13, - 6, 14, 6, 6, 6, 6, 6, 15, 6, 16, - 6, 17, 6, 6, 6, 6, 18, 19, 6, 6, - 20, 6, 6, 21, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 15, - 6, 16, 6, 17, 6, 6, 6, 6, 18, 19, - 6, 6, 20, 6, 6, 21, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6 - }, - - { - 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, - - 8, 6, 6, 7, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 7, 6, 6, 6, 6, 6, 6, 6, - 9, 10, 6, 22, 11, 22, 23, 6, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, 6, 13, - 6, 14, 6, 6, 6, 6, 6, 15, 6, 16, - 6, 17, 6, 6, 6, 6, 18, 19, 6, 6, - 20, 6, 6, 21, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 15, - 6, 16, 6, 17, 6, 6, 6, 6, 18, 19, - - 6, 6, 20, 6, 6, 21, 6, 6, 6, 6, - 6, 6, 6, 6, 22, 6, 6, 6 - }, - - { - 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, - 8, 6, 6, 7, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 7, 6, 6, 6, 6, 6, 6, 6, - 9, 10, 6, 22, 11, 22, 23, 6, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, 6, 13, - 6, 14, 6, 6, 6, 6, 6, 15, 6, 16, - 6, 17, 6, 6, 6, 6, 18, 19, 6, 6, - - 20, 6, 6, 21, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 15, - 6, 16, 6, 17, 6, 6, 6, 6, 18, 19, - 6, 6, 20, 6, 6, 21, 6, 6, 6, 6, - 6, 6, 6, 6, 22, 6, 6, 6 - }, - - { - -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, - -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, - -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, - -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, - -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, - - -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, - -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, - -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, - -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, - -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, - -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, - -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, - -5, -5, -5, -5, -5, -5, -5, -5 - }, - - { - 5, -6, -6, -6, -6, -6, -6, -6, -6, -6, - -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, - - -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, - -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, - -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, - -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, - -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, - -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, - -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, - -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, - -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, - -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, - - -6, -6, -6, -6, -6, -6, -6, -6 - }, - - { - 5, -7, -7, -7, -7, -7, -7, -7, -7, 25, - 25, -7, -7, 25, -7, -7, -7, -7, -7, -7, - -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, - -7, -7, 25, -7, -7, -7, -7, -7, -7, -7, - -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, - -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, - -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, - -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, - -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, - - -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, - -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, - -7, -7, -7, -7, -7, -7, -7, -7, -7, -7, - -7, -7, -7, -7, -7, -7, -7, -7 - }, - - { - 5, -8, -8, -8, -8, -8, -8, -8, -8, 25, - 25, -8, -8, 25, -8, -8, -8, -8, -8, -8, - -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, - -8, -8, 25, -8, -8, -8, -8, -8, -8, -8, - -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, - -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, - - -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, - -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, - -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, - -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, - -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, - -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, - -8, -8, -8, -8, -8, -8, -8, -8 - }, - - { - 5, -9, -9, -9, -9, -9, -9, -9, -9, -9, - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, - - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, - -9, -9, -9, -9, -9, -9, -9, -9 - - }, - - { - 5, -10, -10, -10, -10, -10, -10, -10, -10, -10, - -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, - -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, - -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, - -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, - -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, - -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, - -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, - -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, - -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, - - -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, - -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, - -10, -10, -10, -10, -10, -10, -10, -10 - }, - - { - 5, -11, -11, -11, -11, -11, -11, -11, -11, -11, - -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, - -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, - -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, - -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, - -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, - -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, - - -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, - -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, - -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, - -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, - -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, - -11, -11, -11, -11, -11, -11, -11, -11 - }, - - { - 5, -12, -12, -12, -12, -12, -12, -12, -12, -12, - -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, - -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, - -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, - - -12, -12, -12, -12, -12, -12, -12, -12, 26, 27, - -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, - -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, - -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, - -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, - -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, - -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, - -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, - -12, -12, -12, -12, -12, -12, -12, -12 - }, - - { - 5, -13, -13, -13, -13, -13, -13, -13, -13, -13, - - -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, - -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, - -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, - -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, - -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, - -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, - -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, - -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, - -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, - -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, - - -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, - -13, -13, -13, -13, -13, -13, -13, -13 - }, - - { - 5, -14, -14, -14, -14, -14, -14, -14, -14, -14, - -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, - -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, - -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, - -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, - -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, - -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, - -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, - - -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, - -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, - -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, - -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, - -14, -14, -14, -14, -14, -14, -14, -14 - }, - - { - 5, -15, -15, -15, -15, -15, -15, -15, -15, -15, - -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, - -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, - -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, - -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, - - -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, - -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, - -15, -15, -15, 28, -15, -15, -15, -15, -15, 29, - -15, -15, -15, -15, -15, 30, -15, -15, -15, -15, - -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, - -15, -15, -15, -15, -15, 28, -15, -15, -15, -15, - -15, 29, -15, -15, -15, -15, -15, 30, -15, -15, - -15, -15, -15, -15, -15, -15, -15, -15 - }, - - { - 5, -16, -16, -16, -16, -16, -16, -16, -16, -16, - -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, - - -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, - -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, - -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, - -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, - -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, - -16, -16, -16, -16, -16, -16, -16, 31, -16, -16, - -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, - -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, - -16, -16, -16, -16, -16, -16, -16, -16, -16, 31, - -16, -16, -16, -16, -16, -16, -16, -16, -16, -16, - - -16, -16, -16, -16, -16, -16, -16, -16 - }, - - { - 5, -17, -17, -17, -17, -17, -17, -17, -17, -17, - -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, - -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, - -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, - -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, - -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, - -17, -17, -17, -17, -17, -17, -17, -17, -17, 32, - -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, - -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, - - -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, - -17, 32, -17, -17, -17, -17, -17, -17, -17, -17, - -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, - -17, -17, -17, -17, -17, -17, -17, -17 - }, - - { - 5, -18, -18, -18, -18, -18, -18, -18, -18, -18, - -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, - -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, - -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, - -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, - -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, - - -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, - -18, -18, -18, 33, -18, -18, -18, -18, -18, -18, - -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, - -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, - -18, -18, -18, -18, -18, 33, -18, -18, -18, -18, - -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, - -18, -18, -18, -18, -18, -18, -18, -18 - }, - - { - 5, -19, -19, -19, -19, -19, -19, -19, -19, -19, - -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, - -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, - - -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, - -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, - -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, - -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, - -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, - -19, -19, -19, -19, -19, 34, -19, -19, -19, -19, - -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, - -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, - -19, -19, -19, -19, -19, -19, -19, 34, -19, -19, - -19, -19, -19, -19, -19, -19, -19, -19 - - }, - - { - 5, -20, -20, -20, -20, -20, -20, -20, -20, -20, - -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, - -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, - -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, - -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, - -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, - -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, - -20, -20, -20, -20, -20, -20, -20, -20, -20, 35, - -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, - -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, - - -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, - -20, 35, -20, -20, -20, -20, -20, -20, -20, -20, - -20, -20, -20, -20, -20, -20, -20, -20 - }, - - { - 5, -21, -21, -21, -21, -21, -21, -21, -21, -21, - -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, - -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, - -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, - -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, - -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, - -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, - - -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, - -21, -21, 36, -21, -21, -21, -21, -21, -21, -21, - -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, - -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, - -21, -21, -21, -21, 36, -21, -21, -21, -21, -21, - -21, -21, -21, -21, -21, -21, -21, -21 - }, - - { - 5, -22, -22, -22, -22, -22, -22, -22, -22, -22, - -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, - -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, - -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, - - -22, -22, -22, -22, -22, -22, 37, -22, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, -22, -22, - -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, - -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, - -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, - -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, - -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, - -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, - -22, -22, -22, -22, -22, -22, -22, -22 - }, - - { - 5, -23, -23, -23, -23, -23, -23, -23, -23, -23, - - -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, - -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, - -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, - -23, -23, -23, -23, -23, -23, -23, -23, 39, 39, - 39, 39, 39, 39, 39, 39, 39, 39, -23, -23, - -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, - -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, - -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, - -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, - -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, - - -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, - -23, -23, -23, -23, -23, -23, -23, -23 - }, - - { - 5, -24, -24, -24, -24, -24, -24, -24, -24, -24, - -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, - -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, - -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, - -24, -24, -24, -24, -24, -24, 40, -24, 41, 41, - 41, 41, 41, 41, 41, 41, 41, 41, -24, -24, - -24, -24, -24, -24, -24, -24, -24, -24, -24, 42, - -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, - - -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, - -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, - -24, 42, -24, -24, -24, -24, -24, -24, -24, -24, - -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, - -24, -24, -24, -24, -24, -24, -24, -24 - }, - - { - 5, -25, -25, -25, -25, -25, -25, -25, -25, 25, - 25, -25, -25, 25, -25, -25, -25, -25, -25, -25, - -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, - -25, -25, 25, -25, -25, -25, -25, -25, -25, -25, - -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, - - -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, - -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, - -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, - -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, - -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, - -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, - -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, - -25, -25, -25, -25, -25, -25, -25, -25 - }, - - { - 5, -26, -26, -26, -26, -26, -26, -26, -26, -26, - -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, - - -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, - -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, - -26, -26, -26, -26, -26, -26, -26, -26, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, -26, -26, - -26, -26, -26, -26, -26, 43, 43, 43, 43, 43, - 43, -26, -26, -26, -26, -26, -26, -26, -26, -26, - -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, - -26, -26, -26, -26, -26, -26, -26, 43, 43, 43, - 43, 43, 43, -26, -26, -26, -26, -26, -26, -26, - -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, - - -26, -26, -26, -26, -26, -26, -26, -26 - }, - - { - 5, -27, -27, -27, -27, -27, -27, -27, -27, -27, - -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, - -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, - -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, - -27, -27, -27, -27, -27, -27, -27, -27, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, -27, -27, - -27, -27, -27, -27, -27, 44, 44, 44, 44, 44, - 44, -27, -27, -27, -27, -27, -27, -27, -27, -27, - -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, - - -27, -27, -27, -27, -27, -27, -27, 44, 44, 44, - 44, 44, 44, -27, -27, -27, -27, -27, -27, -27, - -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, - -27, -27, -27, -27, -27, -27, -27, -27 - }, - - { - 5, -28, -28, -28, -28, -28, -28, -28, -28, -28, - -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, - -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, - -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, - -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, - -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, - - -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, - -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, - -28, -28, 45, -28, -28, -28, -28, -28, -28, -28, - -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, - -28, -28, -28, -28, -28, -28, -28, -28, -28, -28, - -28, -28, -28, -28, 45, -28, -28, -28, -28, -28, - -28, -28, -28, -28, -28, -28, -28, -28 - }, - - { - 5, -29, -29, -29, -29, -29, -29, -29, -29, -29, - -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, - -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, - - -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, - -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, - -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, - -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, - -29, -29, -29, -29, -29, -29, -29, 46, -29, -29, - -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, - -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, - -29, -29, -29, -29, -29, -29, -29, -29, -29, 46, - -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, - -29, -29, -29, -29, -29, -29, -29, -29 - - }, - - { - 5, -30, -30, -30, -30, -30, -30, -30, -30, -30, - -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, - -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, - -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, - -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, - -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, - -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, - -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, - -30, -30, 47, -30, -30, -30, -30, -30, -30, -30, - -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, - - -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, - -30, -30, -30, -30, 47, -30, -30, -30, -30, -30, - -30, -30, -30, -30, -30, -30, -30, -30 - }, - - { - 5, -31, -31, -31, -31, -31, -31, -31, -31, -31, - -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, - -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, - -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, - -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, - -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, - -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, - - -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, - 48, -31, -31, -31, -31, -31, -31, -31, -31, -31, - -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, - -31, -31, -31, -31, -31, -31, -31, -31, -31, -31, - -31, -31, 48, -31, -31, -31, -31, -31, -31, -31, - -31, -31, -31, -31, -31, -31, -31, -31 - }, - - { - 5, -32, -32, -32, -32, -32, -32, -32, -32, -32, - -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, - -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, - -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, - - -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, - -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, - -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, - -32, -32, -32, -32, -32, -32, -32, -32, -32, 49, - -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, - -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, - -32, -32, -32, -32, -32, -32, -32, -32, -32, -32, - -32, 49, -32, -32, -32, -32, -32, -32, -32, -32, - -32, -32, -32, -32, -32, -32, -32, -32 - }, - - { - 5, -33, -33, -33, -33, -33, -33, -33, -33, -33, - - -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, - -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, - -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, - -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, - -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, - -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, - -33, -33, -33, -33, -33, -33, -33, -33, 50, -33, - -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, - -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, - -33, -33, -33, -33, -33, -33, -33, -33, -33, -33, - - 50, -33, -33, -33, -33, -33, -33, -33, -33, -33, - -33, -33, -33, -33, -33, -33, -33, -33 - }, - - { - 5, -34, -34, -34, -34, -34, -34, -34, -34, -34, - -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, - -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, - -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, - -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, - -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, - -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, - -34, -34, -34, -34, -34, -34, 51, -34, -34, -34, - - -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, - -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, - -34, -34, -34, -34, -34, -34, -34, -34, 51, -34, - -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, - -34, -34, -34, -34, -34, -34, -34, -34 - }, - - { - 5, -35, -35, -35, -35, -35, -35, -35, -35, -35, - -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, - -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, - -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, - -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, - - -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, - -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, - -35, -35, -35, 52, -35, -35, 53, -35, -35, -35, - -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, - -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, - -35, -35, -35, -35, -35, 52, -35, -35, 53, -35, - -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, - -35, -35, -35, -35, -35, -35, -35, -35 - }, - - { - 5, -36, -36, -36, -36, -36, -36, -36, -36, -36, - -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, - - -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, - -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, - -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, - -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, - -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, - -36, -36, -36, 54, -36, -36, -36, -36, -36, -36, - -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, - -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, - -36, -36, -36, -36, -36, 54, -36, -36, -36, -36, - -36, -36, -36, -36, -36, -36, -36, -36, -36, -36, - - -36, -36, -36, -36, -36, -36, -36, -36 - }, - - { - 5, -37, -37, -37, -37, -37, -37, -37, -37, -37, - -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, - -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, - -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, - -37, -37, -37, -37, -37, -37, -37, -37, 39, 39, - 39, 39, 39, 39, 39, 39, 39, 39, -37, -37, - -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, - -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, - -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, - - -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, - -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, - -37, -37, -37, -37, -37, -37, -37, -37, -37, -37, - -37, -37, -37, -37, -37, -37, -37, -37 - }, - - { - 5, -38, -38, -38, -38, -38, -38, -38, -38, -38, - -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, - -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, - -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, - -38, -38, -38, -38, -38, -38, 40, -38, 41, 41, - 41, 41, 41, 41, 41, 41, 41, 41, -38, -38, - - -38, -38, -38, -38, -38, -38, -38, -38, -38, 42, - -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, - -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, - -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, - -38, 42, -38, -38, -38, -38, -38, -38, -38, -38, - -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, - -38, -38, -38, -38, -38, -38, -38, -38 - }, - - { - 5, -39, -39, -39, -39, -39, -39, -39, -39, -39, - -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, - -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, - - -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, - -39, -39, -39, -39, -39, -39, -39, -39, 39, 39, - 39, 39, 39, 39, 39, 39, 39, 39, -39, -39, - -39, -39, -39, -39, -39, -39, -39, -39, -39, 55, - -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, - -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, - -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, - -39, 55, -39, -39, -39, -39, -39, -39, -39, -39, - -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, - -39, -39, -39, -39, -39, -39, -39, -39 - - }, - - { - 5, -40, -40, -40, -40, -40, -40, -40, -40, -40, - -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, - -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, - -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, - -40, -40, -40, -40, -40, -40, -40, -40, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, -40, -40, - -40, -40, -40, -40, -40, -40, -40, -40, -40, 42, - -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, - -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, - -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, - - -40, 42, -40, -40, -40, -40, -40, -40, -40, -40, - -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, - -40, -40, -40, -40, -40, -40, -40, -40 - }, - - { - 5, -41, -41, -41, -41, -41, -41, -41, -41, -41, - -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, - -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, - -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, - -41, -41, -41, -41, -41, -41, 40, -41, 41, 41, - 41, 41, 41, 41, 41, 41, 41, 41, -41, -41, - -41, -41, -41, -41, -41, -41, -41, -41, -41, 42, - - -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, - -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, - -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, - -41, 42, -41, -41, -41, -41, -41, -41, -41, -41, - -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, - -41, -41, -41, -41, -41, -41, -41, -41 - }, - - { - 5, -42, -42, -42, -42, -42, -42, -42, -42, -42, - -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, - -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, - -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, - - -42, -42, -42, 57, -42, 57, -42, -42, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, -42, -42, - -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, - -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, - -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, - -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, - -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, - -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, - -42, -42, -42, -42, -42, -42, -42, -42 - }, - - { - 5, -43, -43, -43, -43, -43, -43, -43, -43, -43, - - -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, - -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, - -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, - -43, -43, -43, -43, -43, -43, -43, -43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, -43, -43, - -43, -43, -43, -43, -43, 43, 43, 43, 43, 43, - 43, -43, -43, -43, -43, -43, -43, -43, -43, -43, - -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, - -43, -43, -43, -43, -43, -43, -43, 43, 43, 43, - 43, 43, 43, -43, -43, -43, -43, -43, -43, -43, - - -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, - -43, -43, -43, -43, -43, -43, -43, -43 - }, - - { - 5, -44, -44, -44, -44, -44, -44, -44, -44, -44, - -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, - -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, - -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, - -44, -44, -44, -44, -44, -44, -44, -44, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, -44, -44, - -44, -44, -44, -44, -44, 44, 44, 44, 44, 44, - 44, -44, -44, -44, -44, -44, -44, -44, -44, -44, - - -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, - -44, -44, -44, -44, -44, -44, -44, 44, 44, 44, - 44, 44, 44, -44, -44, -44, -44, -44, -44, -44, - -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, - -44, -44, -44, -44, -44, -44, -44, -44 - }, - - { - 5, -45, -45, -45, -45, -45, -45, -45, -45, -45, - -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, - -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, - -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, - -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, - - -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, - -45, -45, -45, -45, -45, -45, -45, 59, -45, -45, - -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, - -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, - -45, -45, -45, -45, -45, -45, -45, -45, -45, 59, - -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, - -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, - -45, -45, -45, -45, -45, -45, -45, -45 - }, - - { - 5, -46, -46, -46, -46, -46, -46, -46, -46, -46, - -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, - - -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, - -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, - -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, - -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, - -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, - -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, - 60, -46, -46, -46, -46, -46, -46, -46, -46, -46, - -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, - -46, -46, -46, -46, -46, -46, -46, -46, -46, -46, - -46, -46, 60, -46, -46, -46, -46, -46, -46, -46, - - -46, -46, -46, -46, -46, -46, -46, -46 - }, - - { - 5, -47, -47, -47, -47, -47, -47, -47, -47, -47, - -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, - -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, - -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, - -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, - -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, - -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, - -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, - -47, -47, -47, -47, -47, -47, 61, -47, -47, -47, - - -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, - -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, - -47, -47, -47, -47, -47, -47, -47, -47, 61, -47, - -47, -47, -47, -47, -47, -47, -47, -47 - }, - - { - 5, -48, -48, -48, -48, -48, -48, -48, -48, -48, - -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, - -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, - -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, - -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, - -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, - - -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, - -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, - -48, -48, -48, -48, 62, -48, -48, -48, -48, -48, - -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, - -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, - -48, -48, -48, -48, -48, -48, 62, -48, -48, -48, - -48, -48, -48, -48, -48, -48, -48, -48 - }, - - { - 5, -49, -49, -49, -49, -49, -49, -49, -49, -49, - -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, - -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, - - -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, - -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, - -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, - -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, - -49, -49, -49, -49, -49, -49, -49, 63, -49, -49, - -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, - -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, - -49, -49, -49, -49, -49, -49, -49, -49, -49, 63, - -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, - -49, -49, -49, -49, -49, -49, -49, -49 - - }, - - { - 5, -50, -50, -50, -50, -50, -50, -50, -50, -50, - -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, - -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, - -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, - -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, - -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, - -50, -50, -50, -50, -50, -50, -50, -50, -50, 64, - -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, - -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, - -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, - - -50, 64, -50, -50, -50, -50, -50, -50, -50, -50, - -50, -50, -50, -50, -50, -50, -50, -50, -50, -50, - -50, -50, -50, -50, -50, -50, -50, -50 - }, - - { - 5, -51, -51, -51, -51, -51, -51, -51, -51, -51, - -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, - -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, - -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, - -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, - -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, - -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, - - -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, - -51, -51, -51, -51, 65, -51, -51, -51, -51, -51, - -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, - -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, - -51, -51, -51, -51, -51, -51, 65, -51, -51, -51, - -51, -51, -51, -51, -51, -51, -51, -51 - }, - - { - 5, -52, -52, -52, -52, -52, -52, -52, -52, -52, - -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, - -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, - -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, - - -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, - -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, - -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, - -52, -52, -52, -52, -52, -52, -52, -52, 66, -52, - -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, - -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, - -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, - 66, -52, -52, -52, -52, -52, -52, -52, -52, -52, - -52, -52, -52, -52, -52, -52, -52, -52 - }, - - { - 5, -53, -53, -53, -53, -53, -53, -53, -53, -53, - - -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, - -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, - -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, - -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, - -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, - -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, - -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, - -53, -53, -53, -53, -53, -53, -53, -53, -53, 67, - -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, - -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, - - -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, - -53, 67, -53, -53, -53, -53, -53, -53 - }, - - { - 5, -54, -54, -54, -54, -54, -54, -54, -54, -54, - -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, - -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, - -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, - -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, - -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, - -54, -54, -54, -54, -54, -54, -54, -54, 68, -54, - -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, - - -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, - -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, - 68, -54, -54, -54, -54, -54, -54, -54, -54, -54, - -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, - -54, -54, -54, -54, -54, -54, -54, -54 - }, - - { - 5, -55, -55, -55, -55, -55, -55, -55, -55, -55, - -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, - -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, - -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, - -55, -55, -55, 69, -55, 69, -55, -55, 70, 70, - - 70, 70, 70, 70, 70, 70, 70, 70, -55, -55, - -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, - -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, - -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, - -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, - -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, - -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, - -55, -55, -55, -55, -55, -55, -55, -55 - }, - - { - 5, -56, -56, -56, -56, -56, -56, -56, -56, -56, - -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, - - -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, - -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, - -56, -56, -56, -56, -56, -56, -56, -56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, -56, -56, - -56, -56, -56, -56, -56, -56, -56, -56, -56, 42, - -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, - -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, - -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, - -56, 42, -56, -56, -56, -56, -56, -56, -56, -56, - -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, - - -56, -56, -56, -56, -56, -56, -56, -56 - }, - - { - 5, -57, -57, -57, -57, -57, -57, -57, -57, -57, - -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, - -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, - -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, - -57, -57, -57, -57, -57, -57, -57, -57, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, -57, -57, - -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, - -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, - -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, - - -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, - -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, - -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, - -57, -57, -57, -57, -57, -57, -57, -57 - }, - - { - 5, -58, -58, -58, -58, -58, -58, -58, -58, -58, - -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, - -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, - -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, - -58, -58, -58, -58, -58, -58, -58, -58, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, -58, -58, - - -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, - -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, - -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, - -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, - -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, - -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, - -58, -58, -58, -58, -58, -58, -58, -58 - }, - - { - 5, -59, -59, -59, -59, -59, -59, -59, -59, -59, - -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, - -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, - - -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, - -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, - -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, - -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, - -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, - -59, -59, -59, -59, -59, 71, -59, -59, -59, -59, - -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, - -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, - -59, -59, -59, -59, -59, -59, -59, 71, -59, -59, - -59, -59, -59, -59, -59, -59, -59, -59 - - }, - - { - 5, -60, -60, -60, -60, -60, -60, -60, -60, -60, - -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, - -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, - -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, - -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, - -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, - -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, - -60, -60, -60, -60, -60, -60, -60, -60, -60, 72, - -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, - -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, - - -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, - -60, 72, -60, -60, -60, -60, -60, -60, -60, -60, - -60, -60, -60, -60, -60, -60, -60, -60 - }, - - { - 5, -61, -61, -61, -61, -61, -61, -61, -61, -61, - -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, - -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, - -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, - -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, - -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, - -61, -61, -61, -61, -61, -61, -61, -61, -61, 73, - - -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, - -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, - -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, - -61, 73, -61, -61, -61, -61, -61, -61, -61, -61, - -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, - -61, -61, -61, -61, -61, -61, -61, -61 - }, - - { - 5, -62, -62, -62, -62, -62, -62, -62, -62, -62, - -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, - -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, - -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, - - -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, - -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, - -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, - -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, - -62, -62, -62, -62, -62, -62, -62, -62, -62, 74, - -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, - -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, - -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, - -62, 74, -62, -62, -62, -62, -62, -62 - }, - - { - 5, -63, -63, -63, -63, -63, -63, -63, -63, -63, - - -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, - -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, - -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, - -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, - -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, - -63, -63, -63, -63, -63, -63, -63, -63, -63, 75, - -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, - -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, - -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, - -63, 75, -63, -63, -63, -63, -63, -63, -63, -63, - - -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, - -63, -63, -63, -63, -63, -63, -63, -63 - }, - - { - 5, -64, -64, -64, -64, -64, -64, -64, -64, -64, - -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, - -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, - -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, - -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, - -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, - -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, - -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, - - -64, -64, -64, 76, -64, -64, -64, -64, -64, -64, - -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, - -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, - -64, -64, -64, -64, -64, 76, -64, -64, -64, -64, - -64, -64, -64, -64, -64, -64, -64, -64 - }, - - { - 5, -65, -65, -65, -65, -65, -65, -65, -65, -65, - -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, - -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, - -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, - -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, - - -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, - -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, - -65, -65, -65, 77, -65, -65, -65, -65, -65, -65, - -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, - -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, - -65, -65, -65, -65, -65, 77, -65, -65, -65, -65, - -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, - -65, -65, -65, -65, -65, -65, -65, -65 - }, - - { - 5, -66, -66, -66, -66, -66, -66, -66, -66, -66, - -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, - - -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, - -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, - -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, - -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, - -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, - -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, - -66, -66, -66, -66, 78, -66, -66, -66, -66, -66, - -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, - -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, - -66, -66, -66, -66, -66, -66, 78, -66, -66, -66, - - -66, -66, -66, -66, -66, -66, -66, -66 - }, - - { - 5, -67, -67, -67, -67, -67, -67, -67, -67, -67, - -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, - -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, - -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, - -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, - -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, - -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, - -67, 79, -67, -67, -67, -67, -67, -67, -67, -67, - -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, - - -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, - -67, -67, -67, 79, -67, -67, -67, -67, -67, -67, - -67, -67, -67, -67, -67, -67, -67, -67, -67, -67, - -67, -67, -67, -67, -67, -67, -67, -67 - }, - - { - 5, -68, -68, -68, -68, -68, -68, -68, -68, -68, - -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, - -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, - -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, - -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, - -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, - - -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, - -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, - -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, - -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, - -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, - -68, -68, -68, -68, -68, -68, -68, -68, -68, -68, - -68, -68, -68, -68, -68, -68, -68, -68 - }, - - { - 5, -69, -69, -69, -69, -69, -69, -69, -69, -69, - -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, - -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, - - -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, - -69, -69, -69, -69, -69, -69, -69, -69, 70, 70, - 70, 70, 70, 70, 70, 70, 70, 70, -69, -69, - -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, - -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, - -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, - -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, - -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, - -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, - -69, -69, -69, -69, -69, -69, -69, -69 - - }, - - { - 5, -70, -70, -70, -70, -70, -70, -70, -70, -70, - -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, - -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, - -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, - -70, -70, -70, -70, -70, -70, -70, -70, 70, 70, - 70, 70, 70, 70, 70, 70, 70, 70, -70, -70, - -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, - -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, - -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, - -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, - - -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, - -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, - -70, -70, -70, -70, -70, -70, -70, -70 - }, - - { - 5, -71, -71, -71, -71, -71, -71, -71, -71, -71, - -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, - -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, - -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, - -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, - -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, - -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, - - -71, -71, -71, -71, -71, -71, 80, -71, -71, -71, - -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, - -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, - -71, -71, -71, -71, -71, -71, -71, -71, 80, -71, - -71, -71, -71, -71, -71, -71, -71, -71, -71, -71, - -71, -71, -71, -71, -71, -71, -71, -71 - }, - - { - 5, -72, -72, -72, -72, -72, -72, -72, -72, -72, - -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, - -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, - -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, - - -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, - -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, - -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, - -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, - -72, -72, -72, -72, -72, 81, -72, -72, -72, -72, - -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, - -72, -72, -72, -72, -72, -72, -72, -72, -72, -72, - -72, -72, -72, -72, -72, -72, -72, 81, -72, -72, - -72, -72, -72, -72, -72, -72, -72, -72 - }, - - { - 5, -73, -73, -73, -73, -73, -73, -73, -73, -73, - - -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, - -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, - -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, - -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, - -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, - -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, - -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, - 82, -73, -73, -73, -73, -73, -73, -73, -73, -73, - -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, - -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, - - -73, -73, 82, -73, -73, -73, -73, -73, -73, -73, - -73, -73, -73, -73, -73, -73, -73, -73 - }, - - { - 5, -74, -74, -74, -74, -74, -74, -74, -74, -74, - -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, - -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, - -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, - -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, - -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, - -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, - -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, - - -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, - -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, - -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, - -74, -74, -74, -74, -74, -74, -74, -74, -74, -74, - -74, -74, -74, -74, -74, -74, -74, -74 - }, - - { - 5, -75, -75, -75, -75, -75, -75, -75, -75, -75, - -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, - -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, - -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, - -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, - - -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, - -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, - -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, - -75, -75, -75, -75, 83, -75, -75, -75, -75, -75, - -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, - -75, -75, -75, -75, -75, -75, -75, -75, -75, -75, - -75, -75, -75, -75, -75, -75, 83, -75, -75, -75, - -75, -75, -75, -75, -75, -75, -75, -75 - }, - - { - 5, -76, -76, -76, -76, -76, -76, -76, -76, -76, - -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, - - -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, - -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, - -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, - -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, - -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, - -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, - -76, -76, -76, -76, 84, -76, -76, -76, -76, -76, - -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, - -76, -76, -76, -76, -76, -76, -76, -76, -76, -76, - -76, -76, -76, -76, -76, -76, 84, -76, -76, -76, - - -76, -76, -76, -76, -76, -76, -76, -76 - }, - - { - 5, -77, -77, -77, -77, -77, -77, -77, -77, -77, - -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, - -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, - -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, - -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, - -77, -77, -77, -77, -77, -77, -77, -77, -77, -77, - -77, -77, -77, -77, -77, -77, -77, 85, -77, -77, - -77, -77, -77, -77, -77, -77, 86, -77, -77, -77, - 87, -77, -77, 88, -77, -77, -77, -77, -77, -77, - - -77, -77, -77, -77, -77, -77, -77, -77, -77, 85, - -77, -77, -77, -77, -77, -77, -77, -77, 86, -77, - -77, -77, 87, -77, -77, 88, -77, -77, -77, -77, - -77, -77, -77, -77, -77, -77, -77, -77 - }, - - { - 5, -78, -78, -78, -78, -78, -78, -78, -78, -78, - -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, - -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, - -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, - -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, - -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, - - -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, - -78, -78, -78, -78, -78, -78, -78, 89, -78, -78, - -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, - -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, - -78, -78, -78, -78, -78, -78, -78, -78, -78, 89, - -78, -78, -78, -78, -78, -78, -78, -78, -78, -78, - -78, -78, -78, -78, -78, -78, -78, -78 - }, - - { - 5, -79, -79, -79, -79, -79, -79, -79, -79, -79, - -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, - -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, - - -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, - -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, - -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, - -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, - -79, -79, -79, -79, -79, -79, -79, -79, -79, 90, - -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, - -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, - -79, -79, -79, -79, -79, -79, -79, -79, -79, -79, - -79, 90, -79, -79, -79, -79, -79, -79, -79, -79, - -79, -79, -79, -79, -79, -79, -79, -79 - - }, - - { - 5, -80, -80, -80, -80, -80, -80, -80, -80, -80, - -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, - -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, - -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, - -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, - -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, - -80, -80, -80, -80, -80, 91, -80, -80, -80, -80, - -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, - -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, - -80, -80, -80, -80, -80, -80, -80, 91, -80, -80, - - -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, - -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, - -80, -80, -80, -80, -80, -80, -80, -80 - }, - - { - 5, -81, -81, -81, -81, -81, -81, -81, -81, -81, - -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, - -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, - -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, - -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, - -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, - -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, - - -81, -81, -81, -81, -81, -81, -81, -81, 92, -81, - -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, - -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, - -81, -81, -81, -81, -81, -81, -81, -81, -81, -81, - 92, -81, -81, -81, -81, -81, -81, -81, -81, -81, - -81, -81, -81, -81, -81, -81, -81, -81 - }, - - { - 5, -82, -82, -82, -82, -82, -82, -82, -82, -82, - -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, - -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, - -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, - - -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, - -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, - -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, - -82, -82, -82, -82, -82, -82, -82, -82, -82, 93, - -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, - -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, - -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, - -82, 93, -82, -82, -82, -82, -82, -82, -82, -82, - -82, -82, -82, -82, -82, -82, -82, -82 - }, - - { - 5, -83, -83, -83, -83, -83, -83, -83, -83, -83, - - -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, - -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, - -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, - -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, - -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, - -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, - -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, - -83, -83, 94, -83, -83, -83, -83, -83, -83, -83, - -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, - -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, - - -83, -83, -83, -83, 94, -83, -83, -83, -83, -83, - -83, -83, -83, -83, -83, -83, -83, -83 - }, - - { - 5, -84, -84, -84, -84, -84, -84, -84, -84, -84, - -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, - -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, - -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, - -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, - -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, - -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, - -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, - - -84, -84, 95, -84, -84, -84, -84, -84, -84, -84, - -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, - -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, - -84, -84, -84, -84, 95, -84, -84, -84, -84, -84, - -84, -84, -84, -84, -84, -84, -84, -84 - }, - - { - 5, -85, -85, -85, -85, -85, -85, -85, -85, -85, - -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, - -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, - -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, - -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, - - -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, - -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, - -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, - -85, -85, -85, -85, -85, 96, -85, -85, -85, -85, - -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, - -85, -85, -85, -85, -85, -85, -85, -85, -85, -85, - -85, -85, -85, -85, -85, -85, -85, 96, -85, -85, - -85, -85, -85, -85, -85, -85, -85, -85 - }, - - { - 5, -86, -86, -86, -86, -86, -86, -86, -86, -86, - -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, - - -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, - -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, - -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, - -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, - -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, - -86, -86, -86, 97, -86, -86, -86, -86, -86, -86, - -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, - -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, - -86, -86, -86, -86, -86, 97, -86, -86, -86, -86, - -86, -86, -86, -86, -86, -86, -86, -86, -86, -86, - - -86, -86, -86, -86, -86, -86, -86, -86 - }, - - { - 5, -87, -87, -87, -87, -87, -87, -87, -87, -87, - -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, - -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, - -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, - -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, - -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, - -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, - -87, -87, -87, -87, -87, -87, -87, -87, -87, 98, - -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, - - -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, - -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, - -87, 98, -87, -87, -87, -87, -87, -87, -87, -87, - -87, -87, -87, -87, -87, -87, -87, -87 - }, - - { - 5, -88, -88, -88, -88, -88, -88, -88, -88, -88, - -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, - -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, - -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, - -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, - -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, - - -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, - -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, - -88, -88, -88, -88, -88, 99, -88, -88, -88, -88, - -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, - -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, - -88, -88, -88, -88, -88, -88, -88, 99, -88, -88, - -88, -88, -88, -88, -88, -88, -88, -88 - }, - - { - 5, -89, -89, -89, -89, -89, -89, -89, -89, -89, - -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, - -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, - - -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, - -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, - -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, - -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, - -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, - -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, - -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, - -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, - -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, - -89, -89, -89, -89, -89, -89, -89, -89 - - }, - - { - 5, -90, -90, -90, -90, -90, -90, -90, -90, -90, - -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, - -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, - -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, - -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, - -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, - -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, - -90, -90, -90, -90, -90, -90, -90, -90, 100, -90, - -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, - -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, - - -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, - 100, -90, -90, -90, -90, -90, -90, -90, -90, -90, - -90, -90, -90, -90, -90, -90, -90, -90 - }, - - { - 5, -91, -91, -91, -91, -91, -91, -91, -91, -91, - -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, - -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, - -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, - -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, - -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, - -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, - - -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, - -91, -91, 101, -91, -91, -91, -91, -91, -91, -91, - -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, - -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, - -91, -91, -91, -91, 101, -91, -91, -91, -91, -91, - -91, -91, -91, -91, -91, -91, -91, -91 - }, - - { - 5, -92, -92, -92, -92, -92, -92, -92, -92, -92, - -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, - -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, - -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, - - -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, - -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, - -92, -92, -92, -92, -92, -92, -92, -92, 102, -92, - -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, - -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, - -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, - 102, -92, -92, -92, -92, -92, -92, -92, -92, -92, - -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, - -92, -92, -92, -92, -92, -92, -92, -92 - }, - - { - 5, -93, -93, -93, -93, -93, -93, -93, -93, -93, - - -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, - -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, - -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, - -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, - -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, - -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, - -93, -93, -93, -93, -93, -93, 103, -93, -93, -93, - -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, - -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, - -93, -93, -93, -93, -93, -93, -93, -93, 103, -93, - - -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, - -93, -93, -93, -93, -93, -93, -93, -93 - }, - - { - 5, -94, -94, -94, -94, -94, -94, -94, -94, -94, - -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, - -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, - -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, - -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, - -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, - -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, - -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, - - -94, -94, -94, -94, -94, -94, -94, -94, -94, 104, - -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, - -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, - -94, -94, -94, -94, -94, -94, -94, -94, -94, -94, - -94, 104, -94, -94, -94, -94, -94, -94 - }, - - { - 5, -95, -95, -95, -95, -95, -95, -95, -95, -95, - -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, - -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, - -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, - -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, - - -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, - -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, - -95, -95, -95, 105, -95, -95, -95, -95, -95, -95, - -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, - -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, - -95, -95, -95, -95, -95, 105, -95, -95, -95, -95, - -95, -95, -95, -95, -95, -95, -95, -95, -95, -95, - -95, -95, -95, -95, -95, -95, -95, -95 - }, - - { - 5, -96, -96, -96, -96, -96, -96, -96, -96, -96, - -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, - - -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, - -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, - -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, - -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, - -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, - -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, - -96, -96, 106, -96, -96, -96, -96, -96, -96, -96, - -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, - -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, - -96, -96, -96, -96, 106, -96, -96, -96, -96, -96, - - -96, -96, -96, -96, -96, -96, -96, -96 - }, - - { - 5, -97, -97, -97, -97, -97, -97, -97, -97, -97, - -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, - -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, - -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, - -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, - -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, - -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, - -97, -97, -97, -97, -97, -97, -97, -97, 107, -97, - -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, - - -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, - -97, -97, -97, -97, -97, -97, -97, -97, -97, -97, - 107, -97, -97, -97, -97, -97, -97, -97, -97, -97, - -97, -97, -97, -97, -97, -97, -97, -97 - }, - - { - 5, -98, -98, -98, -98, -98, -98, -98, -98, -98, - -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, - -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, - -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, - -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, - -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, - - -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, - -98, -98, -98, 108, -98, -98, 109, -98, -98, -98, - -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, - -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, - -98, -98, -98, -98, -98, 108, -98, -98, 109, -98, - -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, - -98, -98, -98, -98, -98, -98, -98, -98 - }, - - { - 5, -99, -99, -99, -99, -99, -99, -99, -99, -99, - -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, - -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, - - -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, - -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, - -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, - -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, - -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, - -99, -99, 110, -99, -99, -99, -99, -99, -99, -99, - -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, - -99, -99, -99, -99, -99, -99, -99, -99, -99, -99, - -99, -99, -99, -99, 110, -99, -99, -99, -99, -99, - -99, -99, -99, -99, -99, -99, -99, -99 - - }, - - { - 5, -100, -100, -100, -100, -100, -100, -100, -100, -100, - -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, - -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, - -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, - -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, - -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, - -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, - -100, -100, -100, -100, -100, -100, -100, 111, -100, -100, - -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, - -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, - - -100, -100, -100, -100, -100, -100, -100, -100, -100, 111, - -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, - -100, -100, -100, -100, -100, -100, -100, -100 - }, - - { - 5, -101, -101, -101, -101, -101, -101, -101, -101, -101, - -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, - -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, - -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, - -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, - -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, - -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, - - -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, - -101, -101, -101, 112, -101, -101, -101, -101, -101, -101, - -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, - -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, - -101, -101, -101, -101, -101, 112, -101, -101, -101, -101, - -101, -101, -101, -101, -101, -101, -101, -101 - }, - - { - 5, -102, -102, -102, -102, -102, -102, -102, -102, -102, - -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, - -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, - -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, - - -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, - -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, - -102, -102, -102, -102, -102, -102, -102, 113, -102, -102, - -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, - -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, - -102, -102, -102, -102, -102, -102, -102, -102, -102, 113, - -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, - -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, - -102, -102, -102, -102, -102, -102, -102, -102 - }, - - { - 5, -103, -103, -103, -103, -103, -103, -103, -103, -103, - - -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, - -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, - -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, - -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, - -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, - -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, - -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, - -103, -103, -103, -103, -103, -103, -103, -103, -103, 114, - -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, - -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, - - -103, -103, -103, -103, -103, -103, -103, -103, -103, -103, - -103, 114, -103, -103, -103, -103, -103, -103 - }, - - { - 5, -104, -104, -104, -104, -104, -104, -104, -104, -104, - -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, - -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, - -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, - -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, - -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, - -104, -104, -104, -104, -104, -104, -104, 115, -104, -104, - -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, - - -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, - -104, -104, -104, -104, -104, -104, -104, -104, -104, 115, - -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, - -104, -104, -104, -104, -104, -104, -104, -104, -104, -104, - -104, -104, -104, -104, -104, -104, -104, -104 - }, - - { - 5, -105, -105, -105, -105, -105, -105, -105, -105, -105, - -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, - -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, - -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, - -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, - - -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, - -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, - -105, -105, -105, -105, -105, -105, -105, -105, 116, -105, - -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, - -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, - -105, -105, -105, -105, -105, -105, -105, -105, -105, -105, - 116, -105, -105, -105, -105, -105, -105, -105, -105, -105, - -105, -105, -105, -105, -105, -105, -105, -105 - }, - - { - 5, -106, -106, -106, -106, -106, -106, -106, -106, -106, - -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, - - -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, - -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, - -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, - -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, - -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, - -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, - -106, -106, -106, -106, -106, -106, 117, -106, -106, -106, - -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, - -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, - -106, -106, -106, -106, -106, -106, -106, -106, 117, -106, - - -106, -106, -106, -106, -106, -106, -106, -106 - }, - - { - 5, -107, -107, -107, -107, -107, -107, -107, -107, -107, - -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, - -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, - -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, - -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, - -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, - -107, -107, -107, -107, -107, -107, -107, -107, -107, 118, - -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, - -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, - - -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, - -107, 118, -107, -107, -107, -107, -107, -107, -107, -107, - -107, -107, -107, -107, -107, -107, -107, -107, -107, -107, - -107, -107, -107, -107, -107, -107, -107, -107 - }, - - { - 5, -108, -108, -108, -108, -108, -108, -108, -108, -108, - -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, - -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, - -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, - -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, - -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, - - -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, - -108, -108, -108, -108, -108, -108, -108, -108, 119, -108, - -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, - -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, - -108, -108, -108, -108, -108, -108, -108, -108, -108, -108, - 119, -108, -108, -108, -108, -108, -108, -108, -108, -108, - -108, -108, -108, -108, -108, -108, -108, -108 - }, - - { - 5, -109, -109, -109, -109, -109, -109, -109, -109, -109, - -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, - -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, - - -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, - -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, - -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, - -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, - -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, - -109, -109, -109, -109, -109, -109, -109, -109, -109, 120, - -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, - -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, - -109, -109, -109, -109, -109, -109, -109, -109, -109, -109, - -109, 120, -109, -109, -109, -109, -109, -109 - - }, - - { - 5, -110, -110, -110, -110, -110, -110, -110, -110, -110, - -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, - -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, - -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, - -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, - -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, - -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, - 121, -110, -110, -110, -110, -110, -110, -110, -110, -110, - -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, - -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, - - -110, -110, 121, -110, -110, -110, -110, -110, -110, -110, - -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, - -110, -110, -110, -110, -110, -110, -110, -110 - }, - - { - 5, -111, -111, -111, -111, -111, -111, -111, -111, -111, - -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, - -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, - -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, - -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, - -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, - -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, - - -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, - -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, - -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, - -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, - -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, - -111, -111, -111, -111, -111, -111, -111, -111 - }, - - { - 5, -112, -112, -112, -112, -112, -112, -112, -112, -112, - -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, - -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, - -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, - - -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, - -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, - -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, - -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, - -112, -112, -112, -112, 122, -112, -112, -112, -112, -112, - -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, - -112, -112, -112, -112, -112, -112, -112, -112, -112, -112, - -112, -112, -112, -112, -112, -112, 122, -112, -112, -112, - -112, -112, -112, -112, -112, -112, -112, -112 - }, - - { - 5, -113, -113, -113, -113, -113, -113, -113, -113, -113, - - -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, - -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, - -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, - -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, - -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, - -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, - -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, - -113, -113, -113, -113, -113, 123, -113, -113, -113, -113, - -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, - -113, -113, -113, -113, -113, -113, -113, -113, -113, -113, - - -113, -113, -113, -113, -113, -113, -113, 123, -113, -113, - -113, -113, -113, -113, -113, -113, -113, -113 - }, - - { - 5, -114, -114, -114, -114, -114, -114, -114, -114, -114, - -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, - -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, - -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, - -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, - -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, - -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, - -114, 124, -114, -114, -114, -114, -114, -114, -114, -114, - - -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, - -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, - -114, -114, -114, 124, -114, -114, -114, -114, -114, -114, - -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, - -114, -114, -114, -114, -114, -114, -114, -114 - }, - - { - 5, -115, -115, -115, -115, -115, -115, -115, -115, -115, - -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, - -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, - -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, - -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, - - -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, - -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, - -115, -115, -115, -115, -115, -115, -115, -115, -115, 125, - -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, - -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, - -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, - -115, 125, -115, -115, -115, -115, -115, -115, -115, -115, - -115, -115, -115, -115, -115, -115, -115, -115 - }, - - { - 5, -116, -116, -116, -116, -116, -116, -116, -116, -116, - -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, - - -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, - -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, - -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, - -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, - -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, - -116, 126, -116, -116, -116, -116, -116, -116, -116, -116, - -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, - -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, - -116, -116, -116, 126, -116, -116, -116, -116, -116, -116, - -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, - - -116, -116, -116, -116, -116, -116, -116, -116 - }, - - { - 5, -117, -117, -117, -117, -117, -117, -117, -117, -117, - -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, - -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, - -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, - -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, - -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, - -117, -117, -117, -117, -117, -117, -117, -117, -117, 127, - -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, - -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, - - -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, - -117, 127, -117, -117, -117, -117, -117, -117, -117, -117, - -117, -117, -117, -117, -117, -117, -117, -117, -117, -117, - -117, -117, -117, -117, -117, -117, -117, -117 - }, - - { - 5, -118, -118, -118, -118, -118, -118, -118, -118, -118, - -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, - -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, - -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, - -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, - -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, - - -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, - -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, - -118, -118, -118, 128, -118, -118, -118, -118, -118, -118, - -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, - -118, -118, -118, -118, -118, -118, -118, -118, -118, -118, - -118, -118, -118, -118, -118, 128, -118, -118, -118, -118, - -118, -118, -118, -118, -118, -118, -118, -118 - }, - - { - 5, -119, -119, -119, -119, -119, -119, -119, -119, -119, - -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, - -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, - - -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, - -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, - -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, - -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, - -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, - -119, -119, -119, -119, 129, -119, -119, -119, -119, -119, - -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, - -119, -119, -119, -119, -119, -119, -119, -119, -119, -119, - -119, -119, -119, -119, -119, -119, 129, -119, -119, -119, - -119, -119, -119, -119, -119, -119, -119, -119 - - }, - - { - 5, -120, -120, -120, -120, -120, -120, -120, -120, -120, - -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, - -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, - -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, - -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, - -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, - -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, - -120, 130, -120, -120, -120, -120, -120, -120, -120, -120, - -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, - -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, - - -120, -120, -120, 130, -120, -120, -120, -120, -120, -120, - -120, -120, -120, -120, -120, -120, -120, -120, -120, -120, - -120, -120, -120, -120, -120, -120, -120, -120 - }, - - { - 5, -121, -121, -121, -121, -121, -121, -121, -121, -121, - -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, - -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, - -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, - -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, - -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, - -121, -121, -121, -121, -121, 131, -121, -121, -121, -121, - - -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, - -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, - -121, -121, -121, -121, -121, -121, -121, 131, -121, -121, - -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, - -121, -121, -121, -121, -121, -121, -121, -121, -121, -121, - -121, -121, -121, -121, -121, -121, -121, -121 - }, - - { - 5, -122, -122, -122, -122, -122, -122, -122, -122, -122, - -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, - -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, - -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, - - -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, - -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, - -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, - -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, - -122, -122, 132, -122, -122, -122, -122, -122, -122, -122, - -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, - -122, -122, -122, -122, -122, -122, -122, -122, -122, -122, - -122, -122, -122, -122, 132, -122, -122, -122, -122, -122, - -122, -122, -122, -122, -122, -122, -122, -122 - }, - - { - 5, -123, -123, -123, -123, -123, -123, -123, -123, -123, - - -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, - -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, - -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, - -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, - -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, - -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, - -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, - -123, -123, 133, -123, -123, -123, -123, -123, -123, -123, - -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, - -123, -123, -123, -123, -123, -123, -123, -123, -123, -123, - - -123, -123, -123, -123, 133, -123, -123, -123, -123, -123, - -123, -123, -123, -123, -123, -123, -123, -123 - }, - - { - 5, -124, -124, -124, -124, -124, -124, -124, -124, -124, - -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, - -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, - -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, - -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, - -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, - -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, - -124, -124, -124, -124, -124, -124, -124, -124, -124, 134, - - -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, - -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, - -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, - -124, 134, -124, -124, -124, -124, -124, -124, -124, -124, - -124, -124, -124, -124, -124, -124, -124, -124 - }, - - { - 5, -125, -125, -125, -125, -125, -125, -125, -125, -125, - -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, - -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, - -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, - -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, - - -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, - -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, - -125, -125, -125, -125, -125, -125, 135, -125, -125, -125, - -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, - -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, - -125, -125, -125, -125, -125, -125, -125, -125, 135, -125, - -125, -125, -125, -125, -125, -125, -125, -125, -125, -125, - -125, -125, -125, -125, -125, -125, -125, -125 - }, - - { - 5, -126, -126, -126, -126, -126, -126, -126, -126, -126, - -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, - - -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, - -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, - -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, - -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, - -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, - -126, -126, -126, -126, -126, -126, -126, 136, -126, -126, - -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, - -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, - -126, -126, -126, -126, -126, -126, -126, -126, -126, 136, - -126, -126, -126, -126, -126, -126, -126, -126, -126, -126, - - -126, -126, -126, -126, -126, -126, -126, -126 - }, - - { - 5, -127, -127, -127, -127, -127, -127, -127, -127, -127, - -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, - -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, - -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, - -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, - -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, - -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, - -127, -127, -127, -127, -127, -127, -127, 137, -127, -127, - -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, - - -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, - -127, -127, -127, -127, -127, -127, -127, -127, -127, 137, - -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, - -127, -127, -127, -127, -127, -127, -127, -127 - }, - - { - 5, -128, -128, -128, -128, -128, -128, -128, -128, -128, - -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, - -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, - -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, - -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, - -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, - - -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, - -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, - -128, -128, -128, -128, 138, -128, -128, -128, -128, -128, - -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, - -128, -128, -128, -128, -128, -128, -128, -128, -128, -128, - -128, -128, -128, -128, -128, -128, 138, -128, -128, -128, - -128, -128, -128, -128, -128, -128, -128, -128 - }, - - { - 5, -129, -129, -129, -129, -129, -129, -129, -129, -129, - -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, - -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, - - -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, - -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, - -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, - -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, - -129, -129, -129, -129, -129, -129, -129, 139, -129, -129, - -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, - -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, - -129, -129, -129, -129, -129, -129, -129, -129, -129, 139, - -129, -129, -129, -129, -129, -129, -129, -129, -129, -129, - -129, -129, -129, -129, -129, -129, -129, -129 - - }, - - { - 5, -130, -130, -130, -130, -130, -130, -130, -130, -130, - -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, - -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, - -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, - -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, - -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, - -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, - -130, -130, -130, -130, -130, -130, -130, -130, -130, 140, - -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, - -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, - - -130, -130, -130, -130, -130, -130, -130, -130, -130, -130, - -130, 140, -130, -130, -130, -130, -130, -130, -130, -130, - -130, -130, -130, -130, -130, -130, -130, -130 - }, - - { - 5, -131, -131, -131, -131, -131, -131, -131, -131, -131, - -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, - -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, - -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, - -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, - -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, - -131, -131, -131, -131, -131, -131, -131, 141, -131, -131, - - -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, - -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, - -131, -131, -131, -131, -131, -131, -131, -131, -131, 141, - -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, - -131, -131, -131, -131, -131, -131, -131, -131, -131, -131, - -131, -131, -131, -131, -131, -131, -131, -131 - }, - - { - 5, -132, -132, -132, -132, -132, -132, -132, -132, -132, - -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, - -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, - -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, - - -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, - -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, - -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, - -132, -132, -132, 142, -132, -132, -132, -132, -132, -132, - -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, - -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, - -132, -132, -132, -132, -132, 142, -132, -132, -132, -132, - -132, -132, -132, -132, -132, -132, -132, -132, -132, -132, - -132, -132, -132, -132, -132, -132, -132, -132 - }, - - { - 5, -133, -133, -133, -133, -133, -133, -133, -133, -133, - - -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, - -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, - -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, - -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, - -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, - -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, - -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, - -133, -133, -133, -133, -133, -133, 143, -133, -133, -133, - -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, - -133, -133, -133, -133, -133, -133, -133, -133, -133, -133, - - -133, -133, -133, -133, -133, -133, -133, -133, 143, -133, - -133, -133, -133, -133, -133, -133, -133, -133 - }, - - { - 5, -134, -134, -134, -134, -134, -134, -134, -134, -134, - -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, - -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, - -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, - -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, - -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, - -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, - -134, -134, -134, -134, -134, -134, -134, -134, 144, -134, - - -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, - -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, - -134, -134, -134, -134, -134, -134, -134, -134, -134, -134, - 144, -134, -134, -134, -134, -134, -134, -134, -134, -134, - -134, -134, -134, -134, -134, -134, -134, -134 - }, - - { - 5, -135, -135, -135, -135, -135, -135, -135, -135, -135, - -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, - -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, - -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, - -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, - - -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, - -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, - -135, -135, -135, -135, -135, -135, 145, -135, -135, -135, - -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, - -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, - -135, -135, -135, -135, -135, -135, -135, -135, 145, -135, - -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, - -135, -135, -135, -135, -135, -135, -135, -135 - }, - - { - 5, -136, -136, -136, -136, -136, -136, -136, -136, -136, - -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, - - -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, - -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, - -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, - -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, - -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, - -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, - -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, - -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, - -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, - -136, -136, -136, -136, -136, -136, -136, -136, -136, -136, - - -136, -136, -136, -136, -136, -136, -136, -136 - }, - - { - 5, -137, -137, -137, -137, -137, -137, -137, -137, -137, - -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, - -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, - -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, - -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, - -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, - -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, - -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, - -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, - - -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, - -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, - -137, -137, -137, -137, -137, -137, -137, -137, -137, -137, - -137, -137, -137, -137, -137, -137, -137, -137 - }, - - { - 5, -138, -138, -138, -138, -138, -138, -138, -138, -138, - -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, - -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, - -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, - -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, - -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, - - -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, - -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, - -138, -138, 146, -138, -138, -138, -138, -138, -138, -138, - -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, - -138, -138, -138, -138, -138, -138, -138, -138, -138, -138, - -138, -138, -138, -138, 146, -138, -138, -138, -138, -138, - -138, -138, -138, -138, -138, -138, -138, -138 - }, - - { - 5, -139, -139, -139, -139, -139, -139, -139, -139, -139, - -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, - -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, - - -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, - -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, - -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, - -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, - -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, - -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, - -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, - -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, - -139, -139, -139, -139, -139, -139, -139, -139, -139, -139, - -139, -139, -139, -139, -139, -139, -139, -139 - - }, - - { - 5, -140, -140, -140, -140, -140, -140, -140, -140, -140, - -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, - -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, - -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, - -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, - -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, - -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, - -140, -140, -140, -140, -140, -140, -140, -140, 147, -140, - -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, - -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, - - -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, - 147, -140, -140, -140, -140, -140, -140, -140, -140, -140, - -140, -140, -140, -140, -140, -140, -140, -140 - }, - - { - 5, -141, -141, -141, -141, -141, -141, -141, -141, -141, - -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, - -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, - -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, - -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, - -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, - -141, -141, -141, -141, -141, -141, -141, -141, -141, 148, - - -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, - -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, - -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, - -141, 148, -141, -141, -141, -141, -141, -141, -141, -141, - -141, -141, -141, -141, -141, -141, -141, -141, -141, -141, - -141, -141, -141, -141, -141, -141, -141, -141 - }, - - { - 5, -142, -142, -142, -142, -142, -142, -142, -142, -142, - -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, - -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, - -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, - - -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, - -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, - -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, - -142, -142, -142, -142, -142, -142, -142, -142, 149, -142, - -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, - -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, - -142, -142, -142, -142, -142, -142, -142, -142, -142, -142, - 149, -142, -142, -142, -142, -142, -142, -142, -142, -142, - -142, -142, -142, -142, -142, -142, -142, -142 - }, - - { - 5, -143, -143, -143, -143, -143, -143, -143, -143, -143, - - -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, - -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, - -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, - -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, - -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, - -143, -143, -143, -143, -143, -143, -143, -143, -143, 150, - -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, - -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, - -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, - -143, 150, -143, -143, -143, -143, -143, -143, -143, -143, - - -143, -143, -143, -143, -143, -143, -143, -143, -143, -143, - -143, -143, -143, -143, -143, -143, -143, -143 - }, - - { - 5, -144, -144, -144, -144, -144, -144, -144, -144, -144, - -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, - -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, - -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, - -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, - -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, - -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, - -144, -144, -144, -144, -144, -144, -144, 151, -144, -144, - - -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, - -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, - -144, -144, -144, -144, -144, -144, -144, -144, -144, 151, - -144, -144, -144, -144, -144, -144, -144, -144, -144, -144, - -144, -144, -144, -144, -144, -144, -144, -144 - }, - - { - 5, -145, -145, -145, -145, -145, -145, -145, -145, -145, - -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, - -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, - -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, - -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, - - -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, - -145, -145, -145, -145, -145, -145, -145, -145, -145, 152, - -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, - -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, - -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, - -145, 152, -145, -145, -145, -145, -145, -145, -145, -145, - -145, -145, -145, -145, -145, -145, -145, -145, -145, -145, - -145, -145, -145, -145, -145, -145, -145, -145 - }, - - { - 5, -146, -146, -146, -146, -146, -146, -146, -146, -146, - -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, - - -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, - -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, - -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, - -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, - -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, - -146, -146, -146, 153, -146, -146, -146, -146, -146, -146, - -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, - -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, - -146, -146, -146, -146, -146, 153, -146, -146, -146, -146, - -146, -146, -146, -146, -146, -146, -146, -146, -146, -146, - - -146, -146, -146, -146, -146, -146, -146, -146 - }, - - { - 5, -147, -147, -147, -147, -147, -147, -147, -147, -147, - -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, - -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, - -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, - -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, - -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, - -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, - -147, -147, -147, -147, -147, -147, -147, 154, -147, -147, - -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, - - -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, - -147, -147, -147, -147, -147, -147, -147, -147, -147, 154, - -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, - -147, -147, -147, -147, -147, -147, -147, -147 - }, - - { - 5, -148, -148, -148, -148, -148, -148, -148, -148, -148, - -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, - -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, - -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, - -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, - -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, - - -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, - -148, -148, -148, -148, -148, -148, -148, 155, -148, -148, - -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, - -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, - -148, -148, -148, -148, -148, -148, -148, -148, -148, 155, - -148, -148, -148, -148, -148, -148, -148, -148, -148, -148, - -148, -148, -148, -148, -148, -148, -148, -148 - }, - - { - 5, -149, -149, -149, -149, -149, -149, -149, -149, -149, - -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, - -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, - - -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, - -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, - -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, - -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, - -149, 156, -149, -149, -149, -149, -149, -149, -149, -149, - -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, - -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, - -149, -149, -149, 156, -149, -149, -149, -149, -149, -149, - -149, -149, -149, -149, -149, -149, -149, -149, -149, -149, - -149, -149, -149, -149, -149, -149, -149, -149 - - }, - - { - 5, -150, -150, -150, -150, -150, -150, -150, -150, -150, - -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, - -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, - -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, - -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, - -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, - -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, - -150, -150, -150, -150, -150, -150, -150, 157, -150, -150, - -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, - -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, - - -150, -150, -150, -150, -150, -150, -150, -150, -150, 157, - -150, -150, -150, -150, -150, -150, -150, -150, -150, -150, - -150, -150, -150, -150, -150, -150, -150, -150 - }, - - { - 5, -151, -151, -151, -151, -151, -151, -151, -151, -151, - -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, - -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, - -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, - -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, - -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, - -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, - - -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, - -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, - -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, - -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, - -151, -151, -151, -151, -151, -151, -151, -151, -151, -151, - -151, -151, -151, -151, -151, -151, -151, -151 - }, - - { - 5, -152, -152, -152, -152, -152, -152, -152, -152, -152, - -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, - -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, - -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, - - -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, - -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, - -152, -152, -152, -152, -152, -152, -152, 158, -152, -152, - -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, - -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, - -152, -152, -152, -152, -152, -152, -152, -152, -152, 158, - -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, - -152, -152, -152, -152, -152, -152, -152, -152, -152, -152, - -152, -152, -152, -152, -152, -152, -152, -152 - }, - - { - 5, -153, -153, -153, -153, -153, -153, -153, -153, -153, - - -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, - -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, - -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, - -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, - -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, - -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, - -153, -153, -153, -153, -153, -153, -153, -153, 159, -153, - -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, - -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, - -153, -153, -153, -153, -153, -153, -153, -153, -153, -153, - - 159, -153, -153, -153, -153, -153, -153, -153, -153, -153, - -153, -153, -153, -153, -153, -153, -153, -153 - }, - - { - 5, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154, -154, -154, - -154, -154, -154, -154, -154, -154, -154, -154 - }, - - { - 5, -155, -155, -155, -155, -155, -155, -155, -155, -155, - -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, - -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, - -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, - -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, - - -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, - -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, - -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, - -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, - -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, - -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, - -155, -155, -155, -155, -155, -155, -155, -155, -155, -155, - -155, -155, -155, -155, -155, -155, -155, -155 - }, - - { - 5, -156, -156, -156, -156, -156, -156, -156, -156, -156, - -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, - - -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, - -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, - -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, - -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, - -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, - -156, -156, -156, -156, -156, -156, -156, 160, -156, -156, - -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, - -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, - -156, -156, -156, -156, -156, -156, -156, -156, -156, 160, - -156, -156, -156, -156, -156, -156, -156, -156, -156, -156, - - -156, -156, -156, -156, -156, -156, -156, -156 - }, - - { - 5, -157, -157, -157, -157, -157, -157, -157, -157, -157, - -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, - -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, - -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, - -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, - -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, - -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, - -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, - -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, - - -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, - -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, - -157, -157, -157, -157, -157, -157, -157, -157, -157, -157, - -157, -157, -157, -157, -157, -157, -157, -157 - }, - - { - 5, -158, -158, -158, -158, -158, -158, -158, -158, -158, - -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, - -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, - -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, - -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, - -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, - - -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, - -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, - -158, -158, -158, -158, 161, -158, -158, -158, -158, -158, - -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, - -158, -158, -158, -158, -158, -158, -158, -158, -158, -158, - -158, -158, -158, -158, -158, -158, 161, -158, -158, -158, - -158, -158, -158, -158, -158, -158, -158, -158 - }, - - { - 5, -159, -159, -159, -159, -159, -159, -159, -159, -159, - -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, - -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, - - -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, - -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, - -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, - -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, - -159, 162, -159, -159, -159, -159, -159, -159, -159, -159, - -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, - -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, - -159, -159, -159, 162, -159, -159, -159, -159, -159, -159, - -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, - -159, -159, -159, -159, -159, -159, -159, -159 - - }, - - { - 5, -160, -160, -160, -160, -160, -160, -160, -160, -160, - -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, - -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, - -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, - -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, - -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, - -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, - -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, - -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, - -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, - - -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, - -160, -160, -160, -160, -160, -160, -160, -160, -160, -160, - -160, -160, -160, -160, -160, -160, -160, -160 - }, - - { - 5, -161, -161, -161, -161, -161, -161, -161, -161, -161, - -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, - -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, - -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, - -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, - -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, - -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, - - -161, -161, -161, 163, -161, -161, -161, -161, -161, -161, - -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, - -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, - -161, -161, -161, -161, -161, 163, -161, -161, -161, -161, - -161, -161, -161, -161, -161, -161, -161, -161, -161, -161, - -161, -161, -161, -161, -161, -161, -161, -161 - }, - - { - 5, -162, -162, -162, -162, -162, -162, -162, -162, -162, - -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, - -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, - -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, - - -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, - -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, - -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, - -162, -162, -162, -162, -162, -162, -162, 164, -162, -162, - -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, - -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, - -162, -162, -162, -162, -162, -162, -162, -162, -162, 164, - -162, -162, -162, -162, -162, -162, -162, -162, -162, -162, - -162, -162, -162, -162, -162, -162, -162, -162 - }, - - { - 5, -163, -163, -163, -163, -163, -163, -163, -163, -163, - - -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, - -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, - -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, - -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, - -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, - -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, - -163, -163, -163, -163, -163, -163, -163, -163, -163, 165, - -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, - -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, - -163, -163, -163, -163, -163, -163, -163, -163, -163, -163, - - -163, 165, -163, -163, -163, -163, -163, -163, -163, -163, - -163, -163, -163, -163, -163, -163, -163, -163 - }, - - { - 5, -164, -164, -164, -164, -164, -164, -164, -164, -164, - -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, - -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, - -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, - -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, - -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, - -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, - -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, - - -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, - -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, - -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, - -164, -164, -164, -164, -164, -164, -164, -164, -164, -164, - -164, -164, -164, -164, -164, -164, -164, -164 - }, - - { - 5, -165, -165, -165, -165, -165, -165, -165, -165, -165, - -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, - -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, - -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, - -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, - - -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, - -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, - -165, -165, -165, -165, -165, -165, -165, -165, 166, -165, - -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, - -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, - -165, -165, -165, -165, -165, -165, -165, -165, -165, -165, - 166, -165, -165, -165, -165, -165, -165, -165, -165, -165, - -165, -165, -165, -165, -165, -165, -165, -165 - }, - - { - 5, -166, -166, -166, -166, -166, -166, -166, -166, -166, - -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, - - -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, - -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, - -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, - -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, - -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, - -166, -166, -166, -166, -166, -166, -166, 167, -166, -166, - -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, - -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, - -166, -166, -166, -166, -166, -166, -166, -166, -166, 167, - -166, -166, -166, -166, -166, -166, -166, -166, -166, -166, - - -166, -166, -166, -166, -166, -166, -166, -166 - }, - - { - 5, -167, -167, -167, -167, -167, -167, -167, -167, -167, - -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, - -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, - -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, - -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, - -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, - -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, - -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, - -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, - - -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, - -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, - -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, - -167, -167, -167, -167, -167, -167, -167, -167 - }, - - } ; - -static yy_state_type yy_get_previous_state (void ); -static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); -static int yy_get_next_buffer (void ); -static void yy_fatal_error (yyconst char msg[] ); - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up lwg_parse_yytext. - */ -#define YY_DO_BEFORE_ACTION \ - (yytext_ptr) = yy_bp; \ - lwg_parse_yyleng = (size_t) (yy_cp - yy_bp); \ - (yy_hold_char) = *yy_cp; \ - *yy_cp = '\0'; \ - (yy_c_buf_p) = yy_cp; - -#define YY_NUM_RULES 38 -#define YY_END_OF_BUFFER 39 -/* This struct is not used in this scanner, - but its presence is necessary. */ -struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static yyconst flex_int16_t yy_accept[168] = - { 0, - 0, 0, 0, 0, 39, 37, 36, 36, 31, 32, - 33, 37, 35, 34, 37, 37, 37, 37, 37, 37, - 37, 37, 37, 1, 36, 3, 4, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 1, 2, 1, - 1, 0, 3, 4, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 29, 0, 2, - 0, 0, 0, 30, 0, 0, 0, 5, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, - - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 7, 21, 0, 17, 0, - 0, 0, 0, 0, 0, 8, 22, 0, 18, 0, - 0, 0, 0, 15, 0, 0, 23, 25, 0, 13, - 16, 0, 0, 24, 26, 9, 14, 0, 0, 10, - 0, 19, 0, 20, 0, 27, 28 - } ; - -static yy_state_type yy_last_accepting_state; -static char *yy_last_accepting_cpos; - -static yyconst yy_state_type yy_NUL_trans[168] = - { 0, - 6, 6, 6, 6, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0 - } ; - -extern int lwg_parse_yy_flex_debug; -int lwg_parse_yy_flex_debug = 0; - -/* The intent behind this definition is that it'll catch - * any uses of REJECT which flex missed. - */ -#define REJECT reject_used_but_not_detected -#define yymore() yymore_used_but_not_detected -#define YY_MORE_ADJ 0 -#define YY_RESTORE_YY_MORE_OFFSET -char *lwg_parse_yytext; -#line 1 "wktparse.lex" -/* - * Written by Ralph Mason ralph.masontelogis.com - * - * Copyright Telogis 2004 - * www.telogis.com - * - */ - -#line 11 "wktparse.lex" -#include "wktparse.tab.h" -#include /* need stdlib for atof() definition */ - -void init_parser(const char *src); -void close_parser(void); -int lwg_parse_yywrap(void); -int lwg_parse_yylex(void); - -static YY_BUFFER_STATE buf_state; - void init_parser(const char *src) { BEGIN(0);buf_state = lwg_parse_yy_scan_string(src); } - void close_parser() { lwg_parse_yy_delete_buffer(buf_state); } - int lwg_parse_yywrap(void){ return 1; } - -/* Macro to keep track of the current parse position */ -#define UPDATE_YYLLOC() (lwg_parse_yylloc.last_column += lwg_parse_yyleng) - -#line 3385 "lex.yy.c" - -#define INITIAL 0 -#define vals_ok 1 - -#ifndef YY_NO_UNISTD_H -/* Special case for "unistd.h", since it is non-ANSI. We include it way - * down here because we want the user's section 1 to have been scanned first. - * The user has a chance to override it with an option. - */ -#include -#endif - -#ifndef YY_EXTRA_TYPE -#define YY_EXTRA_TYPE void * -#endif - -static int yy_init_globals (void ); - -/* Accessor methods to globals. - These are made visible to non-reentrant scanners for convenience. */ - -int lwg_parse_yylex_destroy (void ); - -int lwg_parse_yyget_debug (void ); - -void lwg_parse_yyset_debug (int debug_flag ); - -YY_EXTRA_TYPE lwg_parse_yyget_extra (void ); - -void lwg_parse_yyset_extra (YY_EXTRA_TYPE user_defined ); - -FILE *lwg_parse_yyget_in (void ); - -void lwg_parse_yyset_in (FILE * in_str ); - -FILE *lwg_parse_yyget_out (void ); - -void lwg_parse_yyset_out (FILE * out_str ); - -yy_size_t lwg_parse_yyget_leng (void ); - -char *lwg_parse_yyget_text (void ); - -int lwg_parse_yyget_lineno (void ); - -void lwg_parse_yyset_lineno (int line_number ); - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int lwg_parse_yywrap (void ); -#else -extern int lwg_parse_yywrap (void ); -#endif -#endif - - static void yyunput (int c,char *buf_ptr ); - -#ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ); -#endif - -#ifndef YY_NO_INPUT - -#ifdef __cplusplus -static int yyinput (void ); -#else -static int input (void ); -#endif - -#endif - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#define YY_READ_BUF_SIZE 8192 -#endif - -/* Copy whatever the last rule matched to the standard output. */ -#ifndef ECHO -/* This used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ -#define ECHO fwrite( lwg_parse_yytext, lwg_parse_yyleng, 1, lwg_parse_yyout ) -#endif - -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, - * is returned in "result". - */ -#ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - errno=0; \ - while ( (result = read( fileno(lwg_parse_yyin), (char *) buf, max_size )) < 0 ) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(lwg_parse_yyin); \ - }\ -\ - -#endif - -/* No semi-colon after return; correct usage is to write "yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#ifndef yyterminate -#define yyterminate() return YY_NULL -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Report a fatal error. */ -#ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) -#endif - -/* end tables serialization structures and prototypes */ - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL_IS_OURS 1 - -extern int lwg_parse_yylex (void); - -#define YY_DECL int lwg_parse_yylex (void) -#endif /* !YY_DECL */ - -/* Code executed at the beginning of each rule, after lwg_parse_yytext and lwg_parse_yyleng - * have been set up. - */ -#ifndef YY_USER_ACTION -#define YY_USER_ACTION -#endif - -/* Code executed at the end of each rule. */ -#ifndef YY_BREAK -#define YY_BREAK break; -#endif - -#define YY_RULE_SETUP \ - YY_USER_ACTION - -/** The main scanner function which does all the work. - */ -YY_DECL -{ - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; - -#line 29 "wktparse.lex" - - -#line 3555 "lex.yy.c" - - if ( !(yy_init) ) - { - (yy_init) = 1; - -#ifdef YY_USER_INIT - YY_USER_INIT; -#endif - - if ( ! (yy_start) ) - (yy_start) = 1; /* first start state */ - - if ( ! lwg_parse_yyin ) - lwg_parse_yyin = stdin; - - if ( ! lwg_parse_yyout ) - lwg_parse_yyout = stdout; - - if ( ! YY_CURRENT_BUFFER ) { - lwg_parse_yyensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - lwg_parse_yy_create_buffer(lwg_parse_yyin,YY_BUF_SIZE ); - } - - lwg_parse_yy_load_buffer_state( ); - } - - while ( 1 ) /* loops until end-of-file is reached */ - { - yy_cp = (yy_c_buf_p); - - /* Support of lwg_parse_yytext. */ - *yy_cp = (yy_hold_char); - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = (yy_start); -yy_match: - while ( (yy_current_state = yy_nxt[yy_current_state][ YY_SC_TO_UI(*yy_cp) ]) > 0 ) - { - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - - ++yy_cp; - } - - yy_current_state = -yy_current_state; - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - - YY_DO_BEFORE_ACTION; - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = (yy_hold_char); - yy_cp = (yy_last_accepting_cpos) + 1; - yy_current_state = (yy_last_accepting_state); - goto yy_find_action; - -case 1: -YY_RULE_SETUP -#line 31 "wktparse.lex" -{ lwg_parse_yylval.value=atof(lwg_parse_yytext); UPDATE_YYLLOC(); return VALUE; } - YY_BREAK -case 2: -YY_RULE_SETUP -#line 32 "wktparse.lex" -{ lwg_parse_yylval.value=atof(lwg_parse_yytext); UPDATE_YYLLOC(); return VALUE; } - YY_BREAK -case 3: -YY_RULE_SETUP -#line 34 "wktparse.lex" -{ lwg_parse_yylval.wkb=lwg_parse_yytext; return WKB;} - YY_BREAK -case 4: -YY_RULE_SETUP -#line 35 "wktparse.lex" -{ lwg_parse_yylval.wkb=lwg_parse_yytext; return WKB;} - YY_BREAK -case 5: -YY_RULE_SETUP -#line 37 "wktparse.lex" -{ UPDATE_YYLLOC(); return POINT; } - YY_BREAK -case 6: -YY_RULE_SETUP -#line 38 "wktparse.lex" -{ UPDATE_YYLLOC(); return POINTM; } - YY_BREAK -case 7: -YY_RULE_SETUP -#line 39 "wktparse.lex" -{ UPDATE_YYLLOC(); return LINESTRING; } - YY_BREAK -case 8: -YY_RULE_SETUP -#line 40 "wktparse.lex" -{ UPDATE_YYLLOC(); return LINESTRINGM; } - YY_BREAK -case 9: -YY_RULE_SETUP -#line 41 "wktparse.lex" -{ UPDATE_YYLLOC(); return CIRCULARSTRING; } - YY_BREAK -case 10: -YY_RULE_SETUP -#line 42 "wktparse.lex" -{ UPDATE_YYLLOC(); return CIRCULARSTRINGM; } - YY_BREAK -case 11: -YY_RULE_SETUP -#line 43 "wktparse.lex" -{ UPDATE_YYLLOC(); return POLYGON; } - YY_BREAK -case 12: -YY_RULE_SETUP -#line 44 "wktparse.lex" -{ UPDATE_YYLLOC(); return POLYGONM; } - YY_BREAK -case 13: -YY_RULE_SETUP -#line 45 "wktparse.lex" -{ UPDATE_YYLLOC(); return COMPOUNDCURVE; } - YY_BREAK -case 14: -YY_RULE_SETUP -#line 46 "wktparse.lex" -{ UPDATE_YYLLOC(); return COMPOUNDCURVEM; } - YY_BREAK -case 15: -YY_RULE_SETUP -#line 47 "wktparse.lex" -{ UPDATE_YYLLOC(); return CURVEPOLYGON; } - YY_BREAK -case 16: -YY_RULE_SETUP -#line 48 "wktparse.lex" -{ UPDATE_YYLLOC(); return CURVEPOLYGONM; } - YY_BREAK -case 17: -YY_RULE_SETUP -#line 49 "wktparse.lex" -{ UPDATE_YYLLOC(); return MULTIPOINT; } - YY_BREAK -case 18: -YY_RULE_SETUP -#line 50 "wktparse.lex" -{ UPDATE_YYLLOC(); return MULTIPOINTM; } - YY_BREAK -case 19: -YY_RULE_SETUP -#line 51 "wktparse.lex" -{ UPDATE_YYLLOC(); return MULTILINESTRING; } - YY_BREAK -case 20: -YY_RULE_SETUP -#line 52 "wktparse.lex" -{ UPDATE_YYLLOC(); return MULTILINESTRINGM; } - YY_BREAK -case 21: -YY_RULE_SETUP -#line 53 "wktparse.lex" -{ UPDATE_YYLLOC(); return MULTICURVE; } - YY_BREAK -case 22: -YY_RULE_SETUP -#line 54 "wktparse.lex" -{ UPDATE_YYLLOC(); return MULTICURVEM; } - YY_BREAK -case 23: -YY_RULE_SETUP -#line 55 "wktparse.lex" -{ UPDATE_YYLLOC(); return MULTIPOLYGON; } - YY_BREAK -case 24: -YY_RULE_SETUP -#line 56 "wktparse.lex" -{ UPDATE_YYLLOC(); return MULTIPOLYGONM; } - YY_BREAK -case 25: -YY_RULE_SETUP -#line 57 "wktparse.lex" -{ UPDATE_YYLLOC(); return MULTISURFACE; } - YY_BREAK -case 26: -YY_RULE_SETUP -#line 58 "wktparse.lex" -{ UPDATE_YYLLOC(); return MULTISURFACEM; } - YY_BREAK -case 27: -YY_RULE_SETUP -#line 59 "wktparse.lex" -{ UPDATE_YYLLOC(); return GEOMETRYCOLLECTION; } - YY_BREAK -case 28: -YY_RULE_SETUP -#line 60 "wktparse.lex" -{ UPDATE_YYLLOC(); return GEOMETRYCOLLECTIONM; } - YY_BREAK -case 29: -YY_RULE_SETUP -#line 61 "wktparse.lex" -{ BEGIN(vals_ok); UPDATE_YYLLOC(); return SRID; } - YY_BREAK -case 30: -YY_RULE_SETUP -#line 62 "wktparse.lex" -{ UPDATE_YYLLOC(); return EMPTY; } - YY_BREAK -case 31: -YY_RULE_SETUP -#line 64 "wktparse.lex" -{ BEGIN(vals_ok); UPDATE_YYLLOC(); return LPAREN; } - YY_BREAK -case 32: -YY_RULE_SETUP -#line 65 "wktparse.lex" -{ UPDATE_YYLLOC(); return RPAREN; } - YY_BREAK -case 33: -YY_RULE_SETUP -#line 66 "wktparse.lex" -{ UPDATE_YYLLOC(); return COMMA ; } - YY_BREAK -case 34: -YY_RULE_SETUP -#line 67 "wktparse.lex" -{ UPDATE_YYLLOC(); return EQUALS ; } - YY_BREAK -case 35: -YY_RULE_SETUP -#line 68 "wktparse.lex" -{ BEGIN(0); UPDATE_YYLLOC(); return SEMICOLON; } - YY_BREAK -case 36: -/* rule 36 can match eol */ -YY_RULE_SETUP -#line 69 "wktparse.lex" -/*eat whitespace*/ { UPDATE_YYLLOC(); } - YY_BREAK -case 37: -YY_RULE_SETUP -#line 70 "wktparse.lex" -{ return lwg_parse_yytext[0]; } - YY_BREAK -case 38: -YY_RULE_SETUP -#line 72 "wktparse.lex" -ECHO; - YY_BREAK -#line 3817 "lex.yy.c" -case YY_STATE_EOF(INITIAL): -case YY_STATE_EOF(vals_ok): - yyterminate(); - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = (yy_hold_char); - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed lwg_parse_yyin at a new source and called - * lwg_parse_yylex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = lwg_parse_yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state ); - - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++(yy_c_buf_p); - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = (yy_c_buf_p); - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( ) ) - { - case EOB_ACT_END_OF_FILE: - { - (yy_did_buffer_switch_on_eof) = 0; - - if ( lwg_parse_yywrap( ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * lwg_parse_yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! (yy_did_buffer_switch_on_eof) ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = - (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( ); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - (yy_c_buf_p) = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; - - yy_current_state = yy_get_previous_state( ); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ -} /* end of lwg_parse_yylex */ - -/* yy_get_next_buffer - try to read in a new buffer - * - * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file - */ -static int yy_get_next_buffer (void) -{ - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - register char *source = (yytext_ptr); - register int number_to_move, i; - int ret_val; - - if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; - - else - { - yy_size_t num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER; - - int yy_c_buf_p_offset = - (int) ((yy_c_buf_p) - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - yy_size_t new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - lwg_parse_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1; - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - (yy_n_chars), num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - if ( (yy_n_chars) == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - lwg_parse_yyrestart(lwg_parse_yyin ); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) lwg_parse_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - } - - (yy_n_chars) += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; - - (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; -} - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - - static yy_state_type yy_get_previous_state (void) -{ - register yy_state_type yy_current_state; - register char *yy_cp; - - yy_current_state = (yy_start); - - for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) - { - if ( *yy_cp ) - { - yy_current_state = yy_nxt[yy_current_state][YY_SC_TO_UI(*yy_cp)]; - } - else - yy_current_state = yy_NUL_trans[yy_current_state]; - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - } - - return yy_current_state; -} - -/* yy_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = yy_try_NUL_trans( current_state ); - */ - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) -{ - register int yy_is_jam; - register char *yy_cp = (yy_c_buf_p); - - yy_current_state = yy_NUL_trans[yy_current_state]; - yy_is_jam = (yy_current_state == 0); - - if ( ! yy_is_jam ) - { - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - } - - return yy_is_jam ? 0 : yy_current_state; -} - - static void yyunput (int c, register char * yy_bp ) -{ - register char *yy_cp; - - yy_cp = (yy_c_buf_p); - - /* undo effects of setting up lwg_parse_yytext */ - *yy_cp = (yy_hold_char); - - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - { /* need to shift things up to make room */ - /* +2 for EOB chars. */ - register yy_size_t number_to_move = (yy_n_chars) + 2; - register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; - register char *source = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; - - while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - *--dest = *--source; - - yy_cp += (int) (dest - source); - yy_bp += (int) (dest - source); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; - - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - YY_FATAL_ERROR( "flex scanner push-back overflow" ); - } - - *--yy_cp = (char) c; - - (yytext_ptr) = yy_bp; - (yy_hold_char) = *yy_cp; - (yy_c_buf_p) = yy_cp; -} - -#ifndef YY_NO_INPUT -#ifdef __cplusplus - static int yyinput (void) -#else - static int input (void) -#endif - -{ - int c; - - *(yy_c_buf_p) = (yy_hold_char); - - if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) - /* This was really a NUL. */ - *(yy_c_buf_p) = '\0'; - - else - { /* need more input */ - yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); - ++(yy_c_buf_p); - - switch ( yy_get_next_buffer( ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - lwg_parse_yyrestart(lwg_parse_yyin ); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( lwg_parse_yywrap( ) ) - return 0; - - if ( ! (yy_did_buffer_switch_on_eof) ) - YY_NEW_FILE; -#ifdef __cplusplus - return yyinput(); -#else - return input(); -#endif - } - - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = (yytext_ptr) + offset; - break; - } - } - } - - c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ - *(yy_c_buf_p) = '\0'; /* preserve lwg_parse_yytext */ - (yy_hold_char) = *++(yy_c_buf_p); - - return c; -} -#endif /* ifndef YY_NO_INPUT */ - -/** Immediately switch to a different input stream. - * @param input_file A readable stream. - * - * @note This function does not reset the start condition to @c INITIAL . - */ - void lwg_parse_yyrestart (FILE * input_file ) -{ - - if ( ! YY_CURRENT_BUFFER ){ - lwg_parse_yyensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - lwg_parse_yy_create_buffer(lwg_parse_yyin,YY_BUF_SIZE ); - } - - lwg_parse_yy_init_buffer(YY_CURRENT_BUFFER,input_file ); - lwg_parse_yy_load_buffer_state( ); -} - -/** Switch to a different input buffer. - * @param new_buffer The new input buffer. - * - */ - void lwg_parse_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) -{ - - /* TODO. We should be able to replace this entire function body - * with - * lwg_parse_yypop_buffer_state(); - * lwg_parse_yypush_buffer_state(new_buffer); - */ - lwg_parse_yyensure_buffer_stack (); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - lwg_parse_yy_load_buffer_state( ); - - /* We don't actually know whether we did this switch during - * EOF (lwg_parse_yywrap()) processing, but the only time this flag - * is looked at is after lwg_parse_yywrap() is called, so it's safe - * to go ahead and always set it. - */ - (yy_did_buffer_switch_on_eof) = 1; -} - -static void lwg_parse_yy_load_buffer_state (void) -{ - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - lwg_parse_yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - (yy_hold_char) = *(yy_c_buf_p); -} - -/** Allocate and initialize an input buffer state. - * @param file A readable stream. - * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * - * @return the allocated buffer state. - */ - YY_BUFFER_STATE lwg_parse_yy_create_buffer (FILE * file, int size ) -{ - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) lwg_parse_yyalloc(sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in lwg_parse_yy_create_buffer()" ); - - b->yy_buf_size = size; - - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) lwg_parse_yyalloc(b->yy_buf_size + 2 ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in lwg_parse_yy_create_buffer()" ); - - b->yy_is_our_buffer = 1; - - lwg_parse_yy_init_buffer(b,file ); - - return b; -} - -/** Destroy the buffer. - * @param b a buffer created with lwg_parse_yy_create_buffer() - * - */ - void lwg_parse_yy_delete_buffer (YY_BUFFER_STATE b ) -{ - - if ( ! b ) - return; - - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - - if ( b->yy_is_our_buffer ) - lwg_parse_yyfree((void *) b->yy_ch_buf ); - - lwg_parse_yyfree((void *) b ); -} - -#ifndef __cplusplus -extern int isatty (int ); -#endif /* __cplusplus */ - -/* Initializes or reinitializes a buffer. - * This function is sometimes called more than once on the same buffer, - * such as during a lwg_parse_yyrestart() or at EOF. - */ - static void lwg_parse_yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) - -{ - int oerrno = errno; - - lwg_parse_yy_flush_buffer(b ); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - - /* If b is the current buffer, then lwg_parse_yy_init_buffer was _probably_ - * called from lwg_parse_yyrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } - - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; - - errno = oerrno; -} - -/** Discard all buffered characters. On the next scan, YY_INPUT will be called. - * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * - */ - void lwg_parse_yy_flush_buffer (YY_BUFFER_STATE b ) -{ - if ( ! b ) - return; - - b->yy_n_chars = 0; - - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - - b->yy_buf_pos = &b->yy_ch_buf[0]; - - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; - - if ( b == YY_CURRENT_BUFFER ) - lwg_parse_yy_load_buffer_state( ); -} - -/** Pushes the new state onto the stack. The new state becomes - * the current state. This function will allocate the stack - * if necessary. - * @param new_buffer The new state. - * - */ -void lwg_parse_yypush_buffer_state (YY_BUFFER_STATE new_buffer ) -{ - if (new_buffer == NULL) - return; - - lwg_parse_yyensure_buffer_stack(); - - /* This block is copied from lwg_parse_yy_switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - (yy_buffer_stack_top)++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from lwg_parse_yy_switch_to_buffer. */ - lwg_parse_yy_load_buffer_state( ); - (yy_did_buffer_switch_on_eof) = 1; -} - -/** Removes and deletes the top of the stack, if present. - * The next element becomes the new top. - * - */ -void lwg_parse_yypop_buffer_state (void) -{ - if (!YY_CURRENT_BUFFER) - return; - - lwg_parse_yy_delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - if ((yy_buffer_stack_top) > 0) - --(yy_buffer_stack_top); - - if (YY_CURRENT_BUFFER) { - lwg_parse_yy_load_buffer_state( ); - (yy_did_buffer_switch_on_eof) = 1; - } -} - -/* Allocates the stack if it does not exist. - * Guarantees space for at least one push. - */ -static void lwg_parse_yyensure_buffer_stack (void) -{ - yy_size_t num_to_alloc; - - if (!(yy_buffer_stack)) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; - (yy_buffer_stack) = (struct yy_buffer_state**)lwg_parse_yyalloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - ); - if ( ! (yy_buffer_stack) ) - YY_FATAL_ERROR( "out of dynamic memory in lwg_parse_yyensure_buffer_stack()" ); - - memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - (yy_buffer_stack_max) = num_to_alloc; - (yy_buffer_stack_top) = 0; - return; - } - - if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - int grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = (yy_buffer_stack_max) + grow_size; - (yy_buffer_stack) = (struct yy_buffer_state**)lwg_parse_yyrealloc - ((yy_buffer_stack), - num_to_alloc * sizeof(struct yy_buffer_state*) - ); - if ( ! (yy_buffer_stack) ) - YY_FATAL_ERROR( "out of dynamic memory in lwg_parse_yyensure_buffer_stack()" ); - - /* zero only the new slots.*/ - memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); - (yy_buffer_stack_max) = num_to_alloc; - } -} - -/** Setup the input buffer state to scan directly from a user-specified character buffer. - * @param base the character buffer - * @param size the size in bytes of the character buffer - * - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE lwg_parse_yy_scan_buffer (char * base, yy_size_t size ) -{ - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return 0; - - b = (YY_BUFFER_STATE) lwg_parse_yyalloc(sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in lwg_parse_yy_scan_buffer()" ); - - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = 0; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - lwg_parse_yy_switch_to_buffer(b ); - - return b; -} - -/** Setup the input buffer state to scan a string. The next call to lwg_parse_yylex() will - * scan from a @e copy of @a str. - * @param yystr a NUL-terminated string to scan - * - * @return the newly allocated buffer state object. - * @note If you want to scan bytes that may contain NUL values, then use - * lwg_parse_yy_scan_bytes() instead. - */ -YY_BUFFER_STATE lwg_parse_yy_scan_string (yyconst char * yystr ) -{ - - return lwg_parse_yy_scan_bytes(yystr,strlen(yystr) ); -} - -/** Setup the input buffer state to scan the given bytes. The next call to lwg_parse_yylex() will - * scan from a @e copy of @a bytes. - * @param bytes the byte buffer to scan - * @param len the number of bytes in the buffer pointed to by @a bytes. - * - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE lwg_parse_yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) -{ - YY_BUFFER_STATE b; - char *buf; - yy_size_t n, i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; - buf = (char *) lwg_parse_yyalloc(n ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in lwg_parse_yy_scan_bytes()" ); - - for ( i = 0; i < _yybytes_len; ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - - b = lwg_parse_yy_scan_buffer(buf,n ); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in lwg_parse_yy_scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; -} - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif - -static void yy_fatal_error (yyconst char* msg ) -{ - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); -} - -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up lwg_parse_yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - lwg_parse_yytext[lwg_parse_yyleng] = (yy_hold_char); \ - (yy_c_buf_p) = lwg_parse_yytext + yyless_macro_arg; \ - (yy_hold_char) = *(yy_c_buf_p); \ - *(yy_c_buf_p) = '\0'; \ - lwg_parse_yyleng = yyless_macro_arg; \ - } \ - while ( 0 ) - -/* Accessor methods (get/set functions) to struct members. */ - -/** Get the current line number. - * - */ -int lwg_parse_yyget_lineno (void) -{ - - return lwg_parse_yylineno; -} - -/** Get the input stream. - * - */ -FILE *lwg_parse_yyget_in (void) -{ - return lwg_parse_yyin; -} - -/** Get the output stream. - * - */ -FILE *lwg_parse_yyget_out (void) -{ - return lwg_parse_yyout; -} - -/** Get the length of the current token. - * - */ -yy_size_t lwg_parse_yyget_leng (void) -{ - return lwg_parse_yyleng; -} - -/** Get the current token. - * - */ - -char *lwg_parse_yyget_text (void) -{ - return lwg_parse_yytext; -} - -/** Set the current line number. - * @param line_number - * - */ -void lwg_parse_yyset_lineno (int line_number ) -{ - - lwg_parse_yylineno = line_number; -} - -/** Set the input stream. This does not discard the current - * input buffer. - * @param in_str A readable stream. - * - * @see lwg_parse_yy_switch_to_buffer - */ -void lwg_parse_yyset_in (FILE * in_str ) -{ - lwg_parse_yyin = in_str ; -} - -void lwg_parse_yyset_out (FILE * out_str ) -{ - lwg_parse_yyout = out_str ; -} - -int lwg_parse_yyget_debug (void) -{ - return lwg_parse_yy_flex_debug; -} - -void lwg_parse_yyset_debug (int bdebug ) -{ - lwg_parse_yy_flex_debug = bdebug ; -} - -static int yy_init_globals (void) -{ - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from lwg_parse_yylex_destroy(), so don't allocate here. - */ - - (yy_buffer_stack) = 0; - (yy_buffer_stack_top) = 0; - (yy_buffer_stack_max) = 0; - (yy_c_buf_p) = (char *) 0; - (yy_init) = 0; - (yy_start) = 0; - -/* Defined in main.c */ -#ifdef YY_STDINIT - lwg_parse_yyin = stdin; - lwg_parse_yyout = stdout; -#else - lwg_parse_yyin = (FILE *) 0; - lwg_parse_yyout = (FILE *) 0; -#endif - - /* For future reference: Set errno on error, since we are called by - * lwg_parse_yylex_init() - */ - return 0; -} - -/* lwg_parse_yylex_destroy is for both reentrant and non-reentrant scanners. */ -int lwg_parse_yylex_destroy (void) -{ - - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - lwg_parse_yy_delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - lwg_parse_yypop_buffer_state(); - } - - /* Destroy the stack itself. */ - lwg_parse_yyfree((yy_buffer_stack) ); - (yy_buffer_stack) = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * lwg_parse_yylex() is called, initialization will occur. */ - yy_init_globals( ); - - return 0; -} - -/* - * Internal utility routines. - */ - -#ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) -{ - register int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; -} -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s ) -{ - register int n; - for ( n = 0; s[n]; ++n ) - ; - - return n; -} -#endif - -void *lwg_parse_yyalloc (yy_size_t size ) -{ - return (void *) malloc( size ); -} - -void *lwg_parse_yyrealloc (void * ptr, yy_size_t size ) -{ - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return (void *) realloc( (char *) ptr, size ); -} - -void lwg_parse_yyfree (void * ptr ) -{ - free( (char *) ptr ); /* see lwg_parse_yyrealloc() for (char *) cast */ -} - -#define YYTABLES_NAME "yytables" - -#line 72 "wktparse.lex" - - - - diff -Nru postgis-1.5.3/liblwgeom/libgeom.h postgis-2.0.1/liblwgeom/libgeom.h --- postgis-1.5.3/liblwgeom/libgeom.h 2009-12-16 17:00:26.000000000 +0000 +++ postgis-2.0.1/liblwgeom/libgeom.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,526 +0,0 @@ -/********************************************************************** - * $Id: libgeom.h 5012 2009-12-16 17:00:26Z pramsey $ - * - * PostGIS - Spatial Types for PostgreSQL - * http://postgis.refractions.net - * Copyright 2001-2006 Refractions Research Inc. - * Copyright 2007-2008 Mark Cave-Ayland - * Copyright 2008 Paul Ramsey - * - * This is free software; you can redistribute and/or modify it under - * the terms of the GNU General Public Licence. See the COPYING file. - * - **********************************************************************/ - -#include "liblwgeom.h" -#include -#include -#include -#if HAVE_IEEEFP_H -#include -#endif - - -/** -* PI -*/ -#define PI 3.1415926535897932384626433832795 - -/** -* Return types for functions with status returns. -*/ - -#define G_FAILURE 0 -#define G_SUCCESS 1 -#define LW_TRUE 1 -#define LW_FALSE 0 - -/** -* Maximum allowed SRID value. -* Currently we are using 20 bits (1048575) of storage for SRID. -*/ -#define SRID_MAXIMUM 999999 - -/** -* Macros for manipulating the 'flags' byte. A uchar used as follows: -* ---RGBMZ -* Three unused bits, followed by ReadOnly, Geodetic, HasBBox, HasM and HasZ flags. -*/ -#define FLAGS_GET_Z(flags) ((flags) & 0x01) -#define FLAGS_GET_M(flags) (((flags) & 0x02)>>1) -#define FLAGS_GET_BBOX(flags) (((flags) & 0x4)>>2) -#define FLAGS_GET_GEODETIC(flags) (((flags) & 0x08)>>3) -#define FLAGS_GET_READONLY(flags) (((flags) & 0x10)>>4) -#define FLAGS_SET_Z(flags, value) ((flags) = (value) ? ((flags) | 0x01) : ((flags) & 0xFE)) -#define FLAGS_SET_M(flags, value) ((flags) = (value) ? ((flags) | 0x02) : ((flags) & 0xFD)) -#define FLAGS_SET_BBOX(flags, value) ((flags) = (value) ? ((flags) | 0x04) : ((flags) & 0xFB)) -#define FLAGS_SET_GEODETIC(flags, value) ((flags) = (value) ? ((flags) | 0x08) : ((flags) & 0xF7)) -#define FLAGS_SET_READONLY(flags, value) ((flags) = (value) ? ((flags) | 0x10) : ((flags) & 0xEF)) -#define FLAGS_NDIMS(flags) (2 + FLAGS_GET_Z(flags) + FLAGS_GET_M(flags)) - -/** -* Macro for reading the size from the GSERIALIZED size attribute. -* Cribbed from PgSQL, top 30 bits are size. Use VARSIZE() when working -* internally with PgSQL. -*/ -#define SIZE_GET(varsize) (((varsize) >> 2) & 0x3FFFFFFF) -#define SIZE_SET(varsize, size) (((varsize) & 0x00000003)|(((size) & 0x3FFFFFFF) << 2 )) - -/** -* Macros for manipulating the 'typemod' int. An int32 used as follows: -* Plus/minus = Top bit. -* Spare bits = Next 3 bits. -* SRID = Next 20 bits. -* TYPE = Next 6 bits. -* ZM Flags = Bottom 2 bits. -*/ -#define TYPMOD_GET_SRID(typmod) ((typmod & 0x0FFFFF00)>>8) -#define TYPMOD_SET_SRID(typmod, srid) ((typmod) = (typmod & 0x000000FF) | ((srid & 0x000FFFFF)<<8)) -#define TYPMOD_GET_TYPE(typmod) ((typmod & 0x000000FC)>>2) -#define TYPMOD_SET_TYPE(typmod, type) ((typmod) = (typmod & 0xFFFFFF03) | ((type & 0x0000003F)<<2)) -#define TYPMOD_GET_Z(typmod) ((typmod & 0x00000002)>>1) -#define TYPMOD_SET_Z(typmod) ((typmod) = typmod | 0x00000002) -#define TYPMOD_GET_M(typmod) (typmod & 0x00000001) -#define TYPMOD_SET_M(typmod) ((typmod) = typmod | 0x00000001) -#define TYPMOD_GET_NDIMS(typmod) (2+TYPMOD_GET_Z(typmod)+TYPMOD_GET_M(typmod)) - - - -/** -* GBOX structure. -* Include the flags, so we don't have to constantly pass them -* into the functions. -*/ -typedef struct -{ - uchar flags; - double xmin; - double xmax; - double ymin; - double ymax; - double zmin; - double zmax; - double mmin; - double mmax; -} GBOX; - - - -/** -* Coordinate structure. This will be created on demand from GPTARRAY when -* needed by algorithms and whatnot. -*/ -typedef struct -{ - uchar flags; - double *ordinates; -} GCOORDINATE; - - - -/* Start with space for 16 points */ -#define G_PT_ARRAY_DEFAULT_POINTS 16 - -/** -* GPTARRAY structure. Holder of our ordinates. Dynamically sized -* container for coordinate arrays. -*/ -typedef struct -{ - uchar flags; - size_t capacity; - uint32 npoints; - double *ordinates; -} GPTARRAY; - - -/** -* GSERIALIZED -*/ -typedef struct -{ - uint32 size; /* For PgSQL use only, use VAR* macros to manipulate. */ - uchar srid[3]; /* 24 bits of SRID */ - uchar flags; /* HasZ, HasM, HasBBox, IsGeodetic, IsReadOnly */ - uchar data[1]; /* See gserialized.txt */ -} GSERIALIZED; - -/** -* G_GEOMETRY -* -* flags = bit flags, see FLAGS_HAS_* defines -* type = enumerated OGC geometry type number -*/ -typedef struct -{ - uchar flags; - uint32 type; - GBOX *bbox; /* NULL == unneeded */ - uint32 srid; /* 0 == unknown */ - void *data; -} G_GEOMETRY; - -/* POINTTYPE */ -typedef struct -{ - uchar flags; - uint32 type; - GBOX *bbox; /* NULL == unneeded */ - uint32 srid; /* 0 == unknown */ - GPTARRAY *point; -} G_POINT; - -/* LINETYPE */ -/* CIRCSTRINGTYPE */ -typedef struct -{ - uchar flags; - uint32 type; - GBOX *bbox; /* NULL == unneeded */ - uint32 srid; /* 0 == unknown */ - GPTARRAY *points; -} G_LINESTRING; - -typedef G_LINESTRING G_CIRCULARSTRING; - -/* POLYGONTYPE */ -typedef struct -{ - uchar flags; - uint32 type; - GBOX *bbox; /* NULL == unneeded */ - uint32 srid; /* 0 == unknown */ - size_t capacity; /* How much space is allocated for *rings? */ - uint32 nrings; - GPTARRAY **rings; /* rings[0] is the exterior ring */ -} G_POLYGON; - -/* MULTIPOINTTYPE */ -/* MULTILINETYPE */ -/* MULTIPOINTTYPE */ -/* COMPOUNDTYPE */ -/* CURVEPOLYTYPE */ -/* MULTICURVETYPE */ -/* MULTISURFACETYPE */ -/* COLLECTIONTYPE */ -typedef struct -{ - uchar flags; - uint32 type; - GBOX *bbox; /* NULL == unneeded */ - uint32 srid; /* 0 == unknown */ - size_t capacity; /* How much space is allocated for *geoms? */ - uint32 ngeoms; - G_GEOMETRY **geoms; -} G_COLLECTION; - -/* -** All the collection types share the same physical structure as the -** generic geometry collection. We add type aliases so we can be more -** explicit in our functions later. -*/ -typedef G_COLLECTION G_MPOINT; -typedef G_COLLECTION G_MLINESTRING; -typedef G_COLLECTION G_MPOLYGON; -typedef G_COLLECTION G_MSURFACE; -typedef G_COLLECTION G_MCURVE; -typedef G_COLLECTION G_COMPOUNDCURVE; -typedef G_COLLECTION G_CURVEPOLYGON; - -/* -* Utility casts from GEOMETRY to concrete type. -* Return NULL if cast is illegal. -extern G_POINT* g_geometry_as_point(G_GEOMETRY *g); -extern G_LINESTRING* g_geometry_as_linestring(G_GEOMETRY *g); -extern G_POLYGON* g_geometry_as_polygon(G_GEOMETRY *g); -extern G_MPOINT* g_geometry_as_mpoint(G_GEOMETRY *g); -extern G_MLINESTRING* g_geometry_as_mlinestring(G_GEOMETRY *g); -extern G_MPOLYGON* g_geometry_as_mpolygon(G_GEOMETRY *g); -*/ - -/* -* Utility casts from concrete type to GEOMETRY. -* Return NULL if cast is illegal. -extern G_GEOMETRY* g_point_as_geometry(G_POINT *g); -extern G_GEOMETRY* g_linestring_as_geometry(G_LINESTRING *g); -extern G_GEOMETRY* g_polygon_as_geometry(G_POLYGON *g); -extern G_GEOMETRY* g_mpoint_as_geometry(G_MPOINT *g); -extern G_GEOMETRY* g_mlinestring_as_geometry(G_MLINESTRING *g); -extern G_GEOMETRY* g_mpolygon_as_geometry(G_POLYGON *g); -extern G_GEOMETRY* g_collection_as_geometry(G_COLLECTION *g); -*/ - -/*********************************************************************** -* Coordinate creator, set, get and destroy. -*/ -extern GCOORDINATE* gcoord_new(int ndims); -extern GCOORDINATE* gcoord_new_with_flags(uchar flags); -extern GCOORDINATE* gcoord_new_with_flags_and_ordinates(uchar flags, double *ordinates); -extern GCOORDINATE* gcoord_copy(GCOORDINATE *coord); -extern void gcoord_free(GCOORDINATE *coord); -extern void gcoord_set_x(GCOORDINATE *coord, double x); -extern void gcoord_set_y(GCOORDINATE *coord, double y); -extern void gcoord_set_z(GCOORDINATE *coord, double z); -extern void gcoord_set_m(GCOORDINATE *coord, double m); -extern void gcoord_set_ordinates(GCOORDINATE *coord, double *ordinates); -extern void gcoord_set_ordinate(GCOORDINATE *coord, double ordinate, int index); -extern double gcoord_get_x(GCOORDINATE *coord); -extern double gcoord_get_y(GCOORDINATE *coord); -extern double gcoord_get_z(GCOORDINATE *coord); -extern double gcoord_get_m(GCOORDINATE *coord); - -/*********************************************************************** -* Point arrays, set, get and destroy. -*/ -extern GPTARRAY* gptarray_new(uchar flags); -extern GPTARRAY* gptarray_new_with_size(uchar flags, int npoints); -extern GPTARRAY* gptarray_new_with_ordinates(uchar flags, int npoints, double *ordinates); -extern GPTARRAY* gptarray_copy(GPTARRAY *ptarray); -extern void gptarray_free(GPTARRAY *ptarray); -extern void gptarray_add_coord(GPTARRAY *ptarray, GCOORDINATE *coord); -extern GCOORDINATE* gptarray_get_coord_ro(GPTARRAY *ptarray, int i); -extern GCOORDINATE* gptarray_get_coord_new(GPTARRAY *ptarray, int i); -extern void gptarray_set_coord(GPTARRAY *ptarray, int i, GCOORDINATE *coord); -extern void gptarray_set_x(GPTARRAY *ptarray, int i, double x); -extern void gptarray_set_y(GPTARRAY *ptarray, int i, double y); -extern void gptarray_set_z(GPTARRAY *ptarray, int i, double z); -extern void gptarray_set_m(GPTARRAY *ptarray, int i, double m); -extern double gptarray_get_x(GPTARRAY *ptarray, int i); -extern double gptarray_get_y(GPTARRAY *ptarray, int i); -extern double gptarray_get_z(GPTARRAY *ptarray, int i); -extern double gptarray_get_m(GPTARRAY *ptarray, int i); - - -/*********************************************************************** -** Linestrings -*/ -extern G_LINESTRING* glinestring_new_from_gptarray(GPTARRAY *ptarray); -extern G_LINESTRING* glinestring_new(uchar flags); - - -/*********************************************************************** -** Utility functions for flag byte and srid_flag integer. -*/ - -/** -* Construct a new flags char. -*/ -extern uchar gflags(int hasz, int hasm, int geodetic); - -/** -* Extract the geometry type from the serialized form (it hides in -* the anonymous data area, so this is a handy function). -*/ -extern uint32 gserialized_get_type(const GSERIALIZED *g); - -/** -* Extract the SRID from the serialized form (it is packed into -* three bytes so this is a handy function). -*/ -extern uint32 gserialized_get_srid(const GSERIALIZED *g); - -/** -* Write the SRID into the serialized form (it is packed into -* three bytes so this is a handy function). -*/ -extern void gserialized_set_srid(GSERIALIZED *g, uint32 srid); - - -/*********************************************************************** -** Functions for managing serialized forms and bounding boxes. -*/ - -/** -* Calculate the geocentric bounding box directly from the serialized -* form of the geodetic coordinates. Only accepts serialized geographies -* flagged as geodetic. Caller is responsible for disposing of the GBOX. -*/ -extern GBOX* gserialized_calculate_gbox_geocentric(const GSERIALIZED *g); - -/** -* Calculate the geocentric bounding box directly from the serialized -* form of the geodetic coordinates. Only accepts serialized geographies -* flagged as geodetic. -*/ -int gserialized_calculate_gbox_geocentric_p(const GSERIALIZED *g, GBOX *g_box); - -/** -* Return a WKT representation of the gserialized geometry. -* Caller is responsible for disposing of the char*. -*/ -extern char* gserialized_to_string(const GSERIALIZED *g); - -/** -* Return a copy of the input serialized geometry. -*/ -extern GSERIALIZED* gserialized_copy(const GSERIALIZED *g); - -/** -* Check that coordinates of LWGEOM are all within the geodetic range. -*/ -extern int lwgeom_check_geodetic(const LWGEOM *geom); - -/** -* Calculate the geodetic bounding box for an LWGEOM. Z/M coordinates are -* ignored for this calculation. Pass in non-null, geodetic bounding box for function -* to fill out. LWGEOM must have been built from a GSERIALIZED to provide -* double aligned point arrays. -*/ -extern int lwgeom_calculate_gbox_geodetic(const LWGEOM *geom, GBOX *gbox); - -/** -* Calculate the 2-4D bounding box of a geometry. Z/M coordinates are honored -* for this calculation, though for curves they are not included in calculations -* of curvature. -*/ -extern int lwgeom_calculate_gbox(const LWGEOM *lwgeom, GBOX *gbox); - -/** -* Initialize a spheroid object for use in geodetic functions. -*/ -extern void spheroid_init(SPHEROID *s, double a, double b); - -/** -* Calculate the geodetic distance from lwgeom1 to lwgeom2 on the spheroid. -* A spheroid with major axis == minor axis will be treated as a sphere. -* Pass in a tolerance in spheroid units. -*/ -extern double lwgeom_distance_spheroid(const LWGEOM *lwgeom1, const LWGEOM *lwgeom2, const GBOX *gbox1, const GBOX *gbox2, const SPHEROID *spheroid, double tolerance); - -/** -* Calculate the geodetic area of a lwgeom on the sphere. The result -* will be multiplied by the average radius of the supplied spheroid. -*/ -extern double lwgeom_area_sphere(const LWGEOM *lwgeom, const GBOX *gbox, const SPHEROID *spheroid); - -/** -* Calculate the geodetic area of a lwgeom on the spheroid. The result -* will have the squared units of the spheroid axes. -*/ -extern double lwgeom_area_spheroid(const LWGEOM *lwgeom, const GBOX *gbox, const SPHEROID *spheroid); - -/** -* Calculate the geodetic length of a lwgeom on the unit sphere. The result -* will have to by multiplied by the real radius to get the real length. -*/ -extern double lwgeom_length_spheroid(const LWGEOM *geom, const SPHEROID *s); - -/** -* Calculate covers predicate for two lwgeoms on the sphere. Currently -* only handles point-in-polygon. -*/ -extern int lwgeom_covers_lwgeom_sphere(const LWGEOM *lwgeom1, const LWGEOM *lwgeom2, const GBOX *gbox1, const GBOX *gbox2); - -/** -* New function to read doubles directly from the double* coordinate array -* of an aligned lwgeom #POINTARRAY (built by de-serializing a #GSERIALIZED). -*/ -extern int getPoint2d_p_ro(const POINTARRAY *pa, int n, POINT2D **point); - -/** -* Calculate geodetic (x/y/z) box and add values to gbox. Return #G_SUCCESS on success. -*/ -extern int ptarray_calculate_gbox_geodetic(const POINTARRAY *pa, GBOX *gbox); - -/** -* Calculate box (x/y) and add values to gbox. Return #G_SUCCESS on success. -*/ -extern int ptarray_calculate_gbox(const POINTARRAY *pa, GBOX *gbox ); - -/** -* Calculate a spherical point that falls outside the geocentric gbox -*/ -void gbox_pt_outside(const GBOX *gbox, POINT2D *pt_outside); - -/** -* Create a new gbox with the dimensionality indicated by the flags. Caller -* is responsible for freeing. -*/ -extern GBOX* gbox_new(uchar flags); - -/** -* Update the merged #GBOX to be large enough to include itself and the new box. -*/ -extern int gbox_merge(const GBOX *new_box, GBOX *merged_box); - -/** -* Update the #GBOX to be large enough to include itself and the new point. -*/ -extern int gbox_merge_point3d(const POINT3D *p, GBOX *gbox); - -/** -* Return true if the point is inside the gbox -*/ -extern int gbox_contains_point3d(const GBOX *gbox, const POINT3D *pt); - -/** -* Allocate a string representation of the #GBOX, based on dimensionality of flags. -*/ -extern char* gbox_to_string(const GBOX *gbox); - -/** -* Return a copy of the #GBOX, based on dimensionality of flags. -*/ -extern GBOX* gbox_copy(const GBOX *gbox); - -/** -* Warning, do not use this function, it is very particular about inputs. -*/ -extern GBOX* gbox_from_string(const char *str); - -/** -* Given a serialized form, extract the box if it exists, calculate it if it does not. -*/ -extern int gbox_from_gserialized(const GSERIALIZED *g, GBOX *gbox); - -/** -* Return #LW_TRUE if the #GBOX overlaps, #LW_FALSE otherwise. -*/ -extern int gbox_overlaps(const GBOX *g1, const GBOX *g2); - -/** -* Copy the values of original #GBOX into duplicate. -*/ -extern void gbox_duplicate(const GBOX *original, GBOX *duplicate); - -/** -* Return the number of bytes necessary to hold a #GBOX of this dimension in -* serialized form. -*/ -extern size_t gbox_serialized_size(uchar flags); - -/** -* Utility function to get type number from string. For example, a string 'POINTZ' -* would return type of 1 and z of 1 and m of 0. Valid -*/ -extern int geometry_type_from_string(const char *str, int *type, int *z, int *m); - -/** -* Calculate required memory segment to contain a serialized form of the LWGEOM. -* Primarily used internally by the serialization code. Exposed to allow the cunit -* tests to exercise it. -*/ -extern size_t gserialized_from_lwgeom_size(const LWGEOM *geom); - -/** -* Allocate a new #GSERIALIZED from an #LWGEOM. For all non-point types, a bounding -* box will be calculated and embedded in the serialization. The geodetic flag is used -* to control the box calculation (cartesian or geocentric). If set, the size pointer -* will contain the size of the final output, which is useful for setting the PgSQL -* VARSIZE information. -*/ -extern GSERIALIZED* gserialized_from_lwgeom(const LWGEOM *geom, int is_geodetic, size_t *size); - -/** -* Allocate a new #LWGEOM from a #GSERIALIZED. The resulting #LWGEOM will have coordinates -* that are double aligned and suitable for direct reading using getPoint2d_p_ro -*/ -extern LWGEOM* lwgeom_from_gserialized(const GSERIALIZED *g); - -/** -* Serialize/deserialize from/to #G_GEOMETRY into #GSERIALIZED -extern size_t gserialized_from_ggeometry_size(G_GEOMETRY *geom); -extern GSERIALIZED* gserialized_from_ggeometry(G_GEOMETRY *geom); -extern G_GEOMETRY* ggeometry_from_gserialized(GSERIALIZED *g); -*/ - diff -Nru postgis-1.5.3/liblwgeom/liblwgeom.h postgis-2.0.1/liblwgeom/liblwgeom.h --- postgis-1.5.3/liblwgeom/liblwgeom.h 2011-06-24 03:51:11.000000000 +0000 +++ postgis-2.0.1/liblwgeom/liblwgeom.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,1492 +0,0 @@ -/********************************************************************** - * $Id: liblwgeom.h 7464 2011-06-24 03:51:11Z pramsey $ - * - * PostGIS - Spatial Types for PostgreSQL - * http://postgis.refractions.net - * Copyright 2001-2006 Refractions Research Inc. - * Copyright 2007-2008 Mark Cave-Ayland - * Copyright 2008 Paul Ramsey - * - * This is free software; you can redistribute and/or modify it under - * the terms of the GNU General Public Licence. See the COPYING file. - * - **********************************************************************/ - -#ifndef _LIBLWGEOM_H -#define _LIBLWGEOM_H 1 - -#include "../postgis_config.h" -#include -#include - -/** -* @file liblwgeom.h -* -* This library is the generic geometry handling section of PostGIS. The geometry -* objects, constructors, destructors, and a set of spatial processing functions, -* are implemented here. -* -* The library is designed for use in non-PostGIS applications if necessary. The -* units tests at cunit/cu_tester.c and the loader/dumper programs at -* ../loader/shp2pgsql.c are examples of non-PostGIS applications using liblwgeom. -* -* Programs using this library should set up the default memory managers and error -* handlers by implementing an lwgeom_init_allocators() function, which can be as -* a wrapper around the lwgeom_install_default_allocators() function if you want -* no special handling for memory management and error reporting. -*/ - -#define INTEGRITY_CHECKS 1 - -/* -** Floating point comparitors. -*/ -#define FP_TOLERANCE 1e-12 -#define FP_IS_ZERO(A) (fabs(A) <= FP_TOLERANCE) -#define FP_MAX(A, B) (((A) > (B)) ? (A) : (B)) -#define FP_MIN(A, B) (((A) < (B)) ? (A) : (B)) -#define FP_EQUALS(A, B) (fabs((A)-(B)) <= FP_TOLERANCE) -#define FP_NEQUALS(A, B) (fabs((A)-(B)) > FP_TOLERANCE) -#define FP_LT(A, B) (((A) + FP_TOLERANCE) < (B)) -#define FP_LTEQ(A, B) (((A) - FP_TOLERANCE) <= (B)) -#define FP_GT(A, B) (((A) - FP_TOLERANCE) > (B)) -#define FP_GTEQ(A, B) (((A) + FP_TOLERANCE) >= (B)) -#define FP_CONTAINS_TOP(A, X, B) (FP_LT(A, X) && FP_LTEQ(X, B)) -#define FP_CONTAINS_BOTTOM(A, X, B) (FP_LTEQ(A, X) && FP_LT(X, B)) -#define FP_CONTAINS_INCL(A, X, B) (FP_LTEQ(A, X) && FP_LTEQ(X, B)) -#define FP_CONTAINS_EXCL(A, X, B) (FP_LT(A, X) && FP_LT(X, B)) -#define FP_CONTAINS(A, X, B) FP_CONTAINS_EXCL(A, X, B) - -/* -** Utility true and false defines. -*/ -#define LW_TRUE 1 -#define LW_FALSE 0 - -/* -* this will change to NaN when I figure out how to -* get NaN in a platform-independent way -*/ -#define NO_VALUE 0.0 -#define NO_Z_VALUE NO_VALUE -#define NO_M_VALUE NO_VALUE - -#ifndef MAXFLOAT -#define MAXFLOAT 3.402823466e+38F -#endif - -#ifndef C_H - -typedef unsigned int uint32; -typedef int int32; - -#endif - -/** -* Global functions for memory/logging handlers. -*/ -typedef void* (*lwallocator)(size_t size); -typedef void* (*lwreallocator)(void *mem, size_t size); -typedef void (*lwfreeor)(void* mem); -typedef void (*lwreporter)(const char* fmt, va_list ap); -extern lwreallocator lwrealloc_var; -extern lwallocator lwalloc_var; -extern lwfreeor lwfree_var; -extern lwreporter lwerror_var; -extern lwreporter lwnotice_var; - -/** -* Supply the memory management and error handling functions you want your -* application to use. -* @ingroup system -*/ -extern void lwgeom_init_allocators(void); - -/** -* Apply the default memory management (malloc() and free()) and error handlers. -* Called inside lwgeom_init_allocators() generally. -* @ingroup system -*/ -extern void lwgeom_install_default_allocators(void); - -/** -* Write a notice out to the notice handler. Uses standard printf() substitutions. -* Use for messages you always want output. For debugging, use LWDEBUG() or LWDEBUGF(). -* @ingroup logging -*/ -void lwnotice(const char *fmt, ...); - -/** -* Write a notice out to the error handler. Uses standard printf() substitutions. -* Use for errors you always want output. For debugging, use LWDEBUG() or LWDEBUGF(). -* @ingroup logging -*/ -void lwerror(const char *fmt, ...); - -/** -* The default memory/logging handlers installed by lwgeom_install_default_allocators() -*/ -void *default_allocator(size_t size); -void *default_reallocator(void *mem, size_t size); -void default_freeor(void *ptr); -void default_errorreporter(const char *fmt, va_list ap); -void default_noticereporter(const char *fmt, va_list ap); - -extern int lw_vasprintf (char **result, const char *format, va_list args); -extern int lw_asprintf -#if __STDC__ -(char **result, const char *format, ...); -#else -(result, va_alist); -char **result; -va_dcl -#endif - - -/* Debug macros */ -#if POSTGIS_DEBUG_LEVEL > 0 - -/* Display a notice at the given debug level */ -#define LWDEBUG(level, msg) \ - do { \ - if (POSTGIS_DEBUG_LEVEL >= level) \ - lwnotice("[%s:%s:%d] " msg, __FILE__, __func__, __LINE__); \ - } while (0); - -/* Display a formatted notice at the given debug level (like printf, with variadic arguments) */ -#define LWDEBUGF(level, msg, ...) \ - do { \ - if (POSTGIS_DEBUG_LEVEL >= level) \ - lwnotice("[%s:%s:%d] " msg, __FILE__, __func__, __LINE__, __VA_ARGS__); \ - } while (0); - -#else - -/* Empty prototype that can be optimised away by the compiler for non-debug builds */ -#define LWDEBUG(level, msg) \ - ((void) 0) - -/* Empty prototype that can be optimised away by the compiler for non-debug builds */ -#define LWDEBUGF(level, msg, ...) \ - ((void) 0) - -#endif - -/******************************************************************/ - -typedef unsigned char uchar; - -typedef struct -{ - float xmin; - float ymin; - float xmax; - float ymax; -} -BOX2DFLOAT4; - -typedef struct -{ - double xmin, ymin, zmin; - double xmax, ymax, zmax; -} -BOX3D; - -typedef struct chiptag -{ - int size; /* unused (for use by postgresql) */ - - int endian_hint; /* the number 1 in the endian of this datastruct */ - - BOX3D bvol; - int SRID; - char future[4]; - float factor; /* Usually 1.0. - * Integer values are multiplied by this number - * to get the actual height value - * (for sub-meter accuracy height data). - */ - - int datatype; /* 1 = float32, - * 5 = 24bit integer, - * 6 = 16bit integer (short) - * 7 = 16bit ??? - * 8 = 8bit ??? - * 101 = float32 (NDR), - * 105 = 24bit integer (NDR), - * 106 = 16bit int (NDR) - * 107 = 16bit ??? (NDR) - * 108 = 8bit ??? (NDR) (this doesn't make sense) - */ - int height; - int width; - int compression; /* 0 = no compression, 1 = differencer - * 0x80 = new value - * 0x7F = nodata - */ - - /* - * this is provided for convenience, it should be set to - * sizeof(chip) bytes into the struct because the serialized form is: - *
- * NULL when serialized - */ - void *data; /* data[0] = bottm left, - * data[width] = 1st pixel, 2nd row (uncompressed) - */ - -} -CHIP; - -/* - * standard definition of an ellipsoid (what wkt calls a spheroid) - * f = (a-b)/a - * e_sq = (a*a - b*b)/(a*a) - * b = a - fa - */ -typedef struct -{ - double a; /* semimajor axis */ - double b; /* semiminor axis */ - double f; /* flattening */ - double e; /* eccentricity (first) */ - double e_sq; /* eccentricity (first), squared */ - double radius; /* (2*a+b)/3 spherical average radius */ - char name[20]; /* name of ellipse */ -} -SPHEROID; - - -/* - * ALL LWGEOM structures will use POINT3D as an abstract point. - * This means a 2d geometry will be stored as (x,y) in its serialized - * form, but all functions will work on (x,y,0). This keeps all the - * analysis functions simple. - * NOTE: for GEOS integration, we'll probably set z=NaN - * so look out - z might be NaN for 2d geometries! - */ -typedef struct -{ - double x,y,z; -} -POINT3DZ; -typedef struct -{ - double x,y,z; -} -POINT3D; /* alias for POINT3DZ */ -typedef struct -{ - double x,y,m; -} -POINT3DM; - - -/* - * type for 2d points. When you convert this to 3d, the - * z component will be either 0 or NaN. - */ -typedef struct -{ - double x; - double y; -} -POINT2D; - -typedef struct -{ - double x; - double y; - double z; - double m; -} -POINT4D; - -/******************************************************************/ - -/* - * Point array abstracts a lot of the complexity of points and point lists. - * It handles miss-alignment in the serialized form, 2d/3d translation - * (2d points converted to 3d will have z=0 or NaN) - * DONT MIX 2D and 3D POINTS! *EVERYTHING* is either one or the other - */ -typedef struct -{ - /* array of POINT 2D, 3D or 4D. probably missaligned. */ - uchar *serialized_pointlist; - - /* use TYPE_* macros to handle */ - uchar dims; - - uint32 npoints; -} -POINTARRAY; - - -/* - * Use the following to build pointarrays - * when number of points in output is not - * known in advance - */ -typedef struct -{ - POINTARRAY *pa; - size_t ptsize; - size_t capacity; /* given in points */ -} -DYNPTARRAY; - -/* Create a new dynamic pointarray */ -extern DYNPTARRAY *dynptarray_create(size_t initial_capacity, int dims); - -/* - * Add a POINT4D to the dynamic pointarray. - * - * The dynamic pointarray may be of any dimension, only - * accepted dimensions will be copied. - * - * If allow_duplicates is set to 0 (false) a check - * is performed to see if last point in array is equal to the - * provided one. NOTE that the check is 4d based, with missing - * ordinates in the pointarray set to NO_Z_VALUE and NO_M_VALUE - * respectively. - */ -extern int dynptarray_addPoint4d(DYNPTARRAY *dpa, POINT4D *p4d, - int allow_duplicates); - -/****************************************************************** - * - * LWGEOM (any type) - * - ******************************************************************/ - -typedef struct -{ - uchar type; - BOX2DFLOAT4 *bbox; - uint32 SRID; /* -1 == unneeded */ - void *data; -} -LWGEOM; - -/* POINTYPE */ -typedef struct -{ - uchar type; /* POINTTYPE */ - BOX2DFLOAT4 *bbox; - uint32 SRID; - POINTARRAY *point; /* hide 2d/3d (this will be an array of 1 point) */ -} -LWPOINT; /* "light-weight point" */ - -/* LINETYPE */ -typedef struct -{ - uchar type; /* LINETYPE */ - BOX2DFLOAT4 *bbox; - uint32 SRID; - POINTARRAY *points; /* array of POINT3D */ -} -LWLINE; /* "light-weight line" */ - -/* POLYGONTYPE */ -typedef struct -{ - uchar type; /* POLYGONTYPE */ - BOX2DFLOAT4 *bbox; - uint32 SRID; - int nrings; - POINTARRAY **rings; /* list of rings (list of points) */ -} -LWPOLY; /* "light-weight polygon" */ - -/* MULTIPOINTTYPE */ -typedef struct -{ - uchar type; - BOX2DFLOAT4 *bbox; - uint32 SRID; - int ngeoms; - LWPOINT **geoms; -} -LWMPOINT; - -/* MULTILINETYPE */ -typedef struct -{ - uchar type; - BOX2DFLOAT4 *bbox; - uint32 SRID; - int ngeoms; - LWLINE **geoms; -} -LWMLINE; - -/* MULTIPOLYGONTYPE */ -typedef struct -{ - uchar type; - BOX2DFLOAT4 *bbox; - uint32 SRID; - int ngeoms; - LWPOLY **geoms; -} -LWMPOLY; - -/* COLLECTIONTYPE */ -typedef struct -{ - uchar type; - BOX2DFLOAT4 *bbox; - uint32 SRID; - int ngeoms; - LWGEOM **geoms; -} -LWCOLLECTION; - -/* CIRCSTRINGTYPE */ -typedef struct -{ - uchar type; /* CIRCSTRINGTYPE */ - BOX2DFLOAT4 *bbox; - uint32 SRID; - POINTARRAY *points; /* array of POINT(3D/3DM) */ -} -LWCIRCSTRING; /* "light-weight circularstring" */ - -/* COMPOUNDTYPE */ -typedef struct -{ - uchar type; /* COMPOUNDTYPE */ - BOX2DFLOAT4 *bbox; - uint32 SRID; - int ngeoms; - LWGEOM **geoms; -} -LWCOMPOUND; /* "light-weight compound line" */ - -/* CURVEPOLYTYPE */ -typedef struct -{ - uchar type; /* CURVEPOLYTYPE */ - BOX2DFLOAT4 *bbox; - uint32 SRID; - int nrings; - LWGEOM **rings; /* list of rings (list of points) */ -} -LWCURVEPOLY; /* "light-weight polygon" */ - -/* MULTICURVE */ -typedef struct -{ - uchar type; - BOX2DFLOAT4 *bbox; - uint32 SRID; - int ngeoms; - LWGEOM **geoms; -} -LWMCURVE; - -/* MULTISURFACETYPE */ -typedef struct -{ - uchar type; - BOX2DFLOAT4 *bbox; - uint32 SRID; - int ngeoms; - LWGEOM **geoms; -} -LWMSURFACE; - -/* Casts LWGEOM->LW* (return NULL if cast is illegal) */ -extern LWMPOLY *lwgeom_as_lwmpoly(LWGEOM *lwgeom); -extern LWMLINE *lwgeom_as_lwmline(LWGEOM *lwgeom); -extern LWMPOINT *lwgeom_as_lwmpoint(LWGEOM *lwgeom); -extern LWCOLLECTION *lwgeom_as_lwcollection(LWGEOM *lwgeom); -extern LWPOLY *lwgeom_as_lwpoly(LWGEOM *lwgeom); -extern LWLINE *lwgeom_as_lwline(LWGEOM *lwgeom); -extern LWPOINT *lwgeom_as_lwpoint(LWGEOM *lwgeom); -extern LWCIRCSTRING *lwgeom_as_lwcircstring(LWGEOM *lwgeom); -extern LWGEOM *lwgeom_as_multi(LWGEOM *lwgeom); - -/* Casts LW*->LWGEOM (always cast) */ -extern LWGEOM *lwmpoly_as_lwgeom(LWMPOLY *obj); -extern LWGEOM *lwmline_as_lwgeom(LWMLINE *obj); -extern LWGEOM *lwmpoint_as_lwgeom(LWMPOINT *obj); -extern LWGEOM *lwcollection_as_lwgeom(LWCOLLECTION *obj); -extern LWGEOM *lwcircstring_as_lwgeom(LWCIRCSTRING *obj); -extern LWGEOM *lwpoly_as_lwgeom(LWPOLY *obj); -extern LWGEOM *lwline_as_lwgeom(LWLINE *obj); -extern LWGEOM *lwpoint_as_lwgeom(LWPOINT *obj); - -/* - * Call this function everytime LWGEOM coordinates - * change so to invalidate bounding box - */ -extern void lwgeom_changed(LWGEOM *lwgeom); - -/* - * Call this function to drop BBOX and SRID - * from LWGEOM. If LWGEOM type is *not* flagged - * with the HASBBOX flag and has a bbox, it - * will be released. - */ -extern void lwgeom_drop_bbox(LWGEOM *lwgeom); - -/* Compute a bbox if not already computed */ -extern void lwgeom_add_bbox(LWGEOM *lwgeom); - -extern void lwgeom_dropSRID(LWGEOM *lwgeom); - -/* Determine whether a LWGEOM can contain sub-geometries or not */ -extern int lwgeom_is_collection(int type); - -/******************************************************************/ - -/* - * copies a point from the point array into the parameter point - * will set point's z=0 (or NaN) if pa is 2d - * will set point's m=0 (or NaN) if pa is 3d or 2d - * NOTE: point is a real POINT3D *not* a pointer - */ -extern POINT4D getPoint4d(const POINTARRAY *pa, int n); - -/* - * copies a point from the point array into the parameter point - * will set point's z=0 (or NaN) if pa is 2d - * will set point's m=0 (or NaN) if pa is 3d or 2d - * NOTE: this will modify the point4d pointed to by 'point'. - */ -extern int getPoint4d_p(const POINTARRAY *pa, int n, POINT4D *point); - -/* - * copies a point from the point array into the parameter point - * will set point's z=0 (or NaN) if pa is 2d - * NOTE: point is a real POINT3D *not* a pointer - */ -extern POINT3DZ getPoint3dz(const POINTARRAY *pa, int n); -extern POINT3DM getPoint3dm(const POINTARRAY *pa, int n); - -/* - * copies a point from the point array into the parameter point - * will set point's z=0 (or NaN) if pa is 2d - * NOTE: this will modify the point3d pointed to by 'point'. - */ -extern int getPoint3dz_p(const POINTARRAY *pa, int n, POINT3DZ *point); -extern int getPoint3dm_p(const POINTARRAY *pa, int n, POINT3DM *point); - - -/* - * copies a point from the point array into the parameter point - * z value (if present is not returned) - * NOTE: point is a real POINT3D *not* a pointer - */ -extern POINT2D getPoint2d(const POINTARRAY *pa, int n); - -/* - * copies a point from the point array into the parameter point - * z value (if present is not returned) - * NOTE: this will modify the point2d pointed to by 'point'. - */ -extern int getPoint2d_p(const POINTARRAY *pa, int n, POINT2D *point); - -/* - * set point N to the given value - * NOTE that the pointarray can be of any - * dimension, the appropriate ordinate values - * will be extracted from it - * - */ -extern void setPoint4d(POINTARRAY *pa, int n, POINT4D *p4d); - -/* - * get a pointer to nth point of a POINTARRAY - * You'll need to cast it to appropriate dimensioned point. - * Note that if you cast to a higher dimensional point you'll - * possibly corrupt the POINTARRAY. - * - * WARNING: Don't cast this to a POINT ! - * it would not be reliable due to memory alignment constraints - */ -extern uchar *getPoint_internal(const POINTARRAY *pa, int n); - -/* --- here is a macro equivalent, for speed... */ -/* #define getPoint(x,n) &( (x)->serialized_pointlist[((x)->ndims*8)*(n)] ) */ - - -/* - * constructs a POINTARRAY. - * NOTE: points is *not* copied, so be careful about modification - * (can be aligned/missaligned) - * NOTE: hasz and hasm are descriptive - it describes what type of data - * 'points' points to. No data conversion is done. - */ -extern POINTARRAY *pointArray_construct(uchar *points, char hasz, char hasm, - uint32 npoints); - -/* - * Calculate the (BOX3D) bounding box of a set of points. - * Returns an alloced BOX3D or NULL (for empty geom) in the first form. - * Write result in user-provided BOX3D in second form (return 0 if untouched). - * If pa is 2d, then box3d's zmin/zmax will be set to NO_Z_VALUE - */ -extern BOX3D *ptarray_compute_box3d(const POINTARRAY *pa); -extern int ptarray_compute_box3d_p(const POINTARRAY *pa, BOX3D *out); - - - -/* - * size of point represeneted in the POINTARRAY - * 16 for 2d, 24 for 3d, 32 for 4d - */ -extern int pointArray_ptsize(const POINTARRAY *pa); - -#define POINTTYPE 1 -#define LINETYPE 2 -#define POLYGONTYPE 3 -#define MULTIPOINTTYPE 4 -#define MULTILINETYPE 5 -#define MULTIPOLYGONTYPE 6 -#define COLLECTIONTYPE 7 -#define CIRCSTRINGTYPE 8 -#define COMPOUNDTYPE 9 -#define CURVEPOLYTYPE 13 -#define MULTICURVETYPE 14 -#define MULTISURFACETYPE 15 - -#define WKBZOFFSET 0x80000000 -#define WKBMOFFSET 0x40000000 -#define WKBSRIDFLAG 0x20000000 -#define WKBBBOXFLAG 0x10000000 - - -/* These macros work on PG_LWGEOM.type, LWGEOM.type and all its subclasses */ - -#define TYPE_SETTYPE(c,t) ((c)=(((c)&0xF0)|(t))) -#define TYPE_SETZM(t,z,m) ((t)=(((t)&0xCF)|((z)<<5)|((m)<<4))) -#define TYPE_SETHASBBOX(t,b) ((t)=(((t)&0x7F)|((b)<<7))) -#define TYPE_SETHASSRID(t,s) ((t)=(((t)&0xBF)|((s)<<6))) - -#define TYPE_HASZ(t) ( ((t)&0x20)>>5 ) -#define TYPE_HASM(t) ( ((t)&0x10)>>4 ) -#define TYPE_HASBBOX(t) ( ((t)&0x80)>>7 ) -#define TYPE_HASSRID(t) ( (((t)&0x40))>>6 ) -#define TYPE_NDIMS(t) ((((t)&0x20)>>5)+(((t)&0x10)>>4)+2) -#define TYPE_GETTYPE(t) ((t)&0x0F) - -/* 0x02==Z 0x01==M */ -#define TYPE_GETZM(t) (((t)&0x30)>>4) - -extern char lwgeom_hasBBOX(uchar type); /* true iff B bit set */ -extern int lwgeom_ndims(uchar type); /* returns 2,3 or 4 */ -extern int lwgeom_hasZ(uchar type); /* has Z ? */ -extern int lwgeom_hasM(uchar type); /* has M ? */ -extern int lwgeom_getType(uchar type); /* returns the tttt value */ - -extern uchar lwgeom_makeType(char hasZ, char hasM, char hasSRID, int type); -extern uchar lwgeom_makeType_full(char hasZ, char hasM, char hasSRID, int type, char hasBBOX); -extern char lwgeom_hasSRID(uchar type); /* true iff S bit is set */ -extern char lwgeom_hasBBOX(uchar type); /* true iff B bit set */ - - - -/* - * This is the binary representation of lwgeom compatible - * with postgresql varlena struct - */ -typedef struct -{ - uint32 size; /* varlena header (do not touch directly!) */ - uchar type; /* encodes ndims, type, bbox presence, - srid presence */ - uchar data[1]; -} -PG_LWGEOM; - -/* - * Construct a full PG_LWGEOM type (including size header) - * from a serialized form. - * The constructed PG_LWGEOM object will be allocated using palloc - * and the serialized form will be copied. - * If you specify a SRID other then -1 it will be set. - * If you request bbox (wantbbox=1) it will be extracted or computed - * from the serialized form. - */ -extern PG_LWGEOM *PG_LWGEOM_construct(uchar *serialized, int SRID, - int wantbbox); - -/* - * Compute bbox of serialized geom - */ -extern int compute_serialized_box2d_p(uchar *serialized_form, BOX2DFLOAT4 *box); -extern BOX3D *compute_serialized_box3d(uchar *serialized_form); -extern int compute_serialized_box3d_p(uchar *serialized_form, BOX3D *box); - - -/* - * Evaluate with an heuristic if the provided PG_LWGEOM is worth - * caching a bbox - */ -char is_worth_caching_pglwgeom_bbox(const PG_LWGEOM *); -char is_worth_caching_serialized_bbox(const uchar *); -char is_worth_caching_lwgeom_bbox(const LWGEOM *); - - -/* - * This function computes the size in bytes - * of the serialized geometries. - */ -extern size_t lwgeom_size(const uchar *serialized_form); -extern size_t lwgeom_size_subgeom(const uchar *serialized_form, int geom_number); -extern size_t lwgeom_size_line(const uchar *serialized_line); -extern size_t lwgeom_size_circstring(const uchar *serialized_curve); -extern size_t lwgeom_size_point(const uchar *serialized_point); -extern size_t lwgeom_size_poly(const uchar *serialized_line); - - -/*-------------------------------------------------------- - * all the base types (point/line/polygon) will have a - * basic constructor, basic de-serializer, basic serializer, - * bounding box finder and (TODO) serialized form size finder. - *--------------------------------------------------------*/ - -/* - * given the LWPOINT serialized form (or a pointer into a muli* one) - * construct a proper LWPOINT. - * serialized_form should point to the 8bit type format (with type = 1) - * Returns NULL if serialized form is not a point. - * See serialized form doc - */ -extern LWPOINT *lwpoint_deserialize(uchar *serialized_form); - -/* - * Find size this point would get when serialized (no BBOX) - */ -extern size_t lwpoint_serialize_size(LWPOINT *point); - -/* - * convert this point into its serialize form - * result's first char will be the 8bit type. - * See serialized form doc - */ -extern uchar *lwpoint_serialize(LWPOINT *point); - -/* same as above, writes to buf */ -extern void lwpoint_serialize_buf(LWPOINT *point, uchar *buf, size_t *size); - -/* - * find bounding box (standard one) - * zmin=zmax=0 if 2d (might change to NaN) - */ -extern BOX3D *lwpoint_compute_box3d(LWPOINT *point); - -/* - * convenience functions to hide the POINTARRAY - */ -extern int lwpoint_getPoint2d_p(const LWPOINT *point, POINT2D *out); -extern int lwpoint_getPoint3dz_p(const LWPOINT *point, POINT3DZ *out); -extern int lwpoint_getPoint3dm_p(const LWPOINT *point, POINT3DM *out); -extern int lwpoint_getPoint4d_p(const LWPOINT *point, POINT4D *out); - -/****************************************************************** - * LWLINE functions - ******************************************************************/ - -/* - * given the LWGEOM serialized form (or a pointer into a muli* one) - * construct a proper LWLINE. - * serialized_form should point to the 8bit type format (with type = 2) - * See SERIALIZED_FORM doc - */ -extern LWLINE *lwline_deserialize(uchar *serialized_form); - -/* find the size this line would get when serialized */ -extern size_t lwline_serialize_size(LWLINE *line); - -/* - * convert this line into its serialize form - * result's first char will be the 8bit type. See serialized form doc - * copies data. - */ -extern uchar *lwline_serialize(LWLINE *line); - -/* same as above, writes to buf */ -extern void lwline_serialize_buf(LWLINE *line, uchar *buf, size_t *size); - -/* - * find bounding box (standard one) zmin=zmax=0 if 2d (might change to NaN) - */ -extern BOX3D *lwline_compute_box3d(LWLINE *line); - -/****************************************************************** - * LWPOLY functions - ******************************************************************/ - -/* - * given the LWPOLY serialized form (or a pointer into a muli* one) - * construct a proper LWPOLY. - * serialized_form should point to the 8bit type format (with type = 3) - * See SERIALIZED_FORM doc - */ -extern LWPOLY *lwpoly_deserialize(uchar *serialized_form); - -/* find the size this polygon would get when serialized */ -extern size_t lwpoly_serialize_size(LWPOLY *poly); - -/* - * create the serialized form of the polygon - * result's first char will be the 8bit type. See serialized form doc - * points copied - */ -extern uchar *lwpoly_serialize(LWPOLY *poly); - -/* same as above, writes to buf */ -extern void lwpoly_serialize_buf(LWPOLY *poly, uchar *buf, size_t *size); - -/* - * find bounding box (standard one) zmin=zmax=0 if 2d (might change to NaN) - */ -extern BOX3D *lwpoly_compute_box3d(LWPOLY *poly); - -/****************************************************************** - * LWCIRCSTRING functions - ******************************************************************/ - -/* - * given the LWGEOM serialized form (or a pointer into a muli* one) - * construct a proper LWCIRCSTRING. - * serialized_form should point to the 8bit type format (with type = 2) - * See SERIALIZED_FORM doc - */ -extern LWCIRCSTRING *lwcircstring_deserialize(uchar *serialized_form); - -/* find the size this curve would get when serialized */ -extern size_t lwcircstring_serialize_size(LWCIRCSTRING *curve); - -/* - * convert this circularstring into its serialize form - * result's first char will be the 8bit type. See serialized form doc - * copies data. - */ -extern uchar *lwcircstring_serialize(LWCIRCSTRING *curve); - -/* same as above, writes to buf */ -extern void lwcircstring_serialize_buf(LWCIRCSTRING *curve, uchar *buf, size_t *size); - -/* - * find bounding box (standard one) zmin=zmax=0 if 2d (might change to NaN) - */ -extern BOX3D *lwcircstring_compute_box3d(LWCIRCSTRING *curve); - - - -/****************************************************************** - * LWGEOM functions - ******************************************************************/ - -extern size_t lwgeom_serialize_size(LWGEOM *geom); -extern size_t lwcollection_serialize_size(LWCOLLECTION *coll); -extern void lwgeom_serialize_buf(LWGEOM *geom, uchar *buf, size_t *size); -extern uchar *lwgeom_serialize(LWGEOM *geom); -extern void lwcollection_serialize_buf(LWCOLLECTION *mcoll, uchar *buf, size_t *size); -extern int lwcollection_ngeoms(const LWCOLLECTION *col); - -/* - * Deserialize an lwgeom serialized form. - * The deserialized (recursive) structure will store - * pointers to the serialized form (POINTARRAYs). - */ -LWGEOM *lwgeom_deserialize(uchar *serializedform); -BOX3D *lwgeom_compute_box3d(const LWGEOM *geom); - - -/****************************************************************** - * LWMULTIx and LWCOLLECTION functions - ******************************************************************/ - -LWMPOINT *lwmpoint_deserialize(uchar *serializedform); -LWMLINE *lwmline_deserialize(uchar *serializedform); -LWMPOLY *lwmpoly_deserialize(uchar *serializedform); -LWCOLLECTION *lwcollection_deserialize(uchar *serializedform); -LWCOMPOUND *lwcompound_deserialize(uchar *serialized_form); -LWCURVEPOLY *lwcurvepoly_deserialize(uchar *serialized_form); -LWMCURVE *lwmcurve_deserialize(uchar *serialized_form); -LWMSURFACE *lwmsurface_deserialize(uchar *serialized_form); - -LWGEOM *lwcollection_getsubgeom(LWCOLLECTION *col, int gnum); -BOX3D *lwcollection_compute_box3d(LWCOLLECTION *col); -LWCOLLECTION* lwcollection_extract(LWCOLLECTION *col, int type); - -/****************************************************************** - * SERIALIZED FORM functions - ******************************************************************/ - - -/****************************************************************** - * Multi-geometries - * - * These are all handled equivelently so its easy to write iterator code. - * NOTE NOTE: you can hand in a non-multigeometry to most of these functions - * and get usual behavior (ie. get geometry 0 on a POINT - * will return the point). - * This makes coding even easier since you dont have to necessarily - * differenciate between the multi* and non-multi geometries. - * - * NOTE: these usually work directly off the serialized form, so - * they're a little more difficult to handle (and slower) - * NOTE NOTE: the get functions maybe slow, so we may want to have an - * "analysed" lwgeom that would just have pointer to the start - * of each sub-geometry. - * - ******************************************************************/ - -/* use this version for speed. READ-ONLY! */ -typedef struct -{ - int SRID; - const uchar *serialized_form; /* orginal structure */ - uchar type; /* 8-bit type for the LWGEOM */ - int ngeometries; /* number of sub-geometries */ - uchar **sub_geoms; /* list of pointers (into serialized_form) - of the sub-geoms */ -} -LWGEOM_INSPECTED; - -extern int lwgeom_size_inspected(const LWGEOM_INSPECTED *inspected, int geom_number); - -/* - * note - for a simple type (ie. point), this will have - * sub_geom[0] = serialized_form. - * for multi-geomtries sub_geom[0] will be a few bytes into the - * serialized form. - * This function just computes the length of each sub-object and - * pre-caches this info. - * For a geometry collection of multi* geometries, you can inspect - * the sub-components as well. - */ -extern LWGEOM_INSPECTED *lwgeom_inspect(const uchar *serialized_form); - - -/* - * 1st geometry has geom_number = 0 - * if the actual sub-geometry isnt a POINT, null is returned (see _gettype()). - * if there arent enough geometries, return null. - * this is fine to call on a point (with geom_num=0), multipoint - * or geometrycollection - */ -extern LWPOINT *lwgeom_getpoint(uchar *serialized_form, int geom_number); -extern LWPOINT *lwgeom_getpoint_inspected(LWGEOM_INSPECTED *inspected, int geom_number); - -/* - * 1st geometry has geom_number = 0 - * if the actual geometry isnt a LINE, null is returned (see _gettype()). - * if there arent enough geometries, return null. - * this is fine to call on a line, multiline or geometrycollection - */ -extern LWLINE *lwgeom_getline(uchar *serialized_form, int geom_number); -extern LWLINE *lwgeom_getline_inspected(LWGEOM_INSPECTED *inspected, int geom_number); - -/* - * 1st geometry has geom_number = 0 - * if the actual geometry isnt a POLYGON, null is returned (see _gettype()). - * if there arent enough geometries, return null. - * this is fine to call on a polygon, multipolygon or geometrycollection - */ -extern LWPOLY *lwgeom_getpoly(uchar *serialized_form, int geom_number); -extern LWPOLY *lwgeom_getpoly_inspected(LWGEOM_INSPECTED *inspected, int geom_number); - -/* - * 1st geometry has geom_number = 0 - * if the actual geometry isnt a POLYGON, null is returned (see _gettype()). - * if there arent enough geometries, return null. - * this is fine to call on a polygon, multipolygon or geometrycollection - */ -extern LWCIRCSTRING *lwgeom_getcircstring_inspected(LWGEOM_INSPECTED *inspected, int geom_number); - -extern LWGEOM *lwgeom_getgeom_inspected(LWGEOM_INSPECTED *inspected, int geom_number); - - - -/* - * this gets the serialized form of a sub-geometry - * 1st geometry has geom_number = 0 - * if this isnt a multi* geometry, and geom_number ==0 then it returns - * itself - * returns null on problems. - * in the future this is how you would access a muli* portion of a - * geometry collection. - * GEOMETRYCOLLECTION(MULTIPOINT(0 0, 1 1), LINESTRING(0 0, 1 1)) - * ie. lwgeom_getpoint( lwgeom_getsubgeometry( serialized, 0), 1) - * --> POINT(1 1) - * you can inspect the sub-geometry as well if you wish. - */ -extern uchar *lwgeom_getsubgeometry(const uchar *serialized_form, int geom_number); -extern uchar *lwgeom_getsubgeometry_inspected(LWGEOM_INSPECTED *inspected, int geom_number); - - -/* - * 1st geometry has geom_number = 0 - * use geom_number = -1 to find the actual type of the serialized form. - * ie lwgeom_gettype( <'MULTIPOINT(0 0, 1 1)'>, -1) - * --> multipoint - * ie lwgeom_gettype( <'MULTIPOINT(0 0, 1 1)'>, 0) - * --> point - * gets the 8bit type of the geometry at location geom_number - */ -extern uchar lwgeom_getsubtype(uchar *serialized_form, int geom_number); -extern uchar lwgeom_getsubtype_inspected(LWGEOM_INSPECTED *inspected, int geom_number); - - -/* - * how many sub-geometries are there? - * for point,line,polygon will return 1. - */ -extern int lwgeom_getnumgeometries(uchar *serialized_form); -extern int lwgeom_getnumgeometries_inspected(LWGEOM_INSPECTED *inspected); - - - -/* - * set finalType to COLLECTIONTYPE or 0 (0 means choose a best type) - * (ie. give it 2 points and ask it to be a multipoint) - * use SRID=-1 for unknown SRID (will have 8bit type's S = 0) - * all subgeometries must have the same SRID - * if you want to construct an inspected, call this then inspect the result... - */ -extern uchar *lwgeom_serialized_construct(int SRID, int finalType, char hasz, char hasm, int nsubgeometries, uchar **serialized_subs); - - -/* construct the empty geometry (GEOMETRYCOLLECTION(EMPTY)) */ -extern uchar *lwgeom_constructempty(int SRID, char hasz, char hasm); -extern void lwgeom_constructempty_buf(int SRID, char hasz, char hasm, uchar *buf, size_t *size); -size_t lwgeom_empty_length(int SRID); - -/* - * get the SRID from the LWGEOM - * none present => -1 - */ -extern int lwgeom_getsrid(uchar *serialized); - - -/*------------------------------------------------------ - * other stuff - * - * handle the double-to-float conversion. The results of this - * will usually be a slightly bigger box because of the difference - * between float8 and float4 representations. - */ - -extern BOX2DFLOAT4 *box3d_to_box2df(BOX3D *box); -extern int box3d_to_box2df_p(BOX3D *box, BOX2DFLOAT4 *res); - -extern BOX3D box2df_to_box3d(BOX2DFLOAT4 *box); -extern void box2df_to_box3d_p(BOX2DFLOAT4 *box, BOX3D *box3d); - -extern BOX3D *box3d_union(BOX3D *b1, BOX3D *b2); -extern int box3d_union_p(BOX3D *b1, BOX3D *b2, BOX3D *ubox); - -/* - * Returns a pointer to the BBOX internal to the serialized form. - * READ-ONLY! - * Or NULL if serialized form does not have a BBOX - * OBSOLETED to avoid memory alignment problems. - */ -/*extern BOX2DFLOAT4 *getbox2d_internal(uchar *serialized_form);*/ - -/* - * this function writes to 'box' and returns 0 if serialized_form - * does not have a bounding box (empty geom) - */ -extern int getbox2d_p(uchar *serialized_form, BOX2DFLOAT4 *box); - -/* Expand given box of 'd' units in all directions */ -void expand_box2d(BOX2DFLOAT4 *box, double d); -void expand_box3d(BOX3D *box, double d); - -/* Check if to boxes are equal (considering FLOAT approximations) */ -char box2d_same(BOX2DFLOAT4 *box1, BOX2DFLOAT4 *box2); - - - -/**************************************************************** - * MEMORY MANAGEMENT - ****************************************************************/ - -/* - * The lwfree_* family of functions frees *all* memory associated - * with the pointer, including the serialized__pointlist in the - * point arrays. Do not use these on LWGEOMs de-serialized from - * PG_LWGEOMs or they will try to free an underlying structure - * managed by PgSQL. Only use these on LWGEOMs you have - * constructed yourself. - */ - -extern void ptarray_free(POINTARRAY *pa); -extern void lwpoint_free(LWPOINT *pt); -extern void lwline_free(LWLINE *line); -extern void lwpoly_free(LWPOLY *poly); -extern void lwmpoint_free(LWMPOINT *mpt); -extern void lwmline_free(LWMLINE *mline); -extern void lwmpoly_free(LWMPOLY *mpoly); -extern void lwcollection_free(LWCOLLECTION *col); -extern void lwcircstring_free(LWCIRCSTRING *curve); -extern void lwgeom_free(LWGEOM *geom); - -extern void lwinspected_release(LWGEOM_INSPECTED *inspected); /* TODO: make this deep free... */ - -/* - * The *_release family of functions frees the LWGEOM structures - * surrounding the POINTARRAYs but leaves the POINTARRAYs - * intact. Use these on LWGEOMs that have been de-serialized - * from PG_LWGEOMs. Do not use these on LWGEOMs you have - * constructed yourself, or you will leak lots of memory. - */ - -extern void lwpoint_release(LWPOINT *lwpoint); -extern void lwline_release(LWLINE *lwline); -extern void lwpoly_release(LWPOLY *lwpoly); -extern void lwcircstring_release(LWCIRCSTRING *lwcirc); -extern void lwmpoint_release(LWMPOINT *lwpoint); -extern void lwmline_release(LWMLINE *lwline); -extern void lwmpoly_release(LWMPOLY *lwpoly); -extern void lwcollection_release(LWCOLLECTION *lwcollection); -extern void lwgeom_release(LWGEOM *lwgeom); - - -/**************************************************************** - * utility - ****************************************************************/ - -extern uint32 lw_get_uint32(const uchar *loc); -extern int32 lw_get_int32(const uchar *loc); -extern void printBOX3D(BOX3D *b); -extern void printPA(POINTARRAY *pa); -extern void printLWPOINT(LWPOINT *point); -extern void printLWLINE(LWLINE *line); -extern void printLWPOLY(LWPOLY *poly); -extern void printBYTES(uchar *a, int n); -extern void printMULTI(uchar *serialized); -extern void printType(uchar str); - - -extern float LWGEOM_Minf(float a, float b); -extern float LWGEOM_Maxf(float a, float b); -extern double LWGEOM_Mind(double a, double b); -extern double LWGEOM_Maxd(double a, double b); - -extern float nextDown_f(double d); -extern float nextUp_f(double d); -extern double nextDown_d(float d); -extern double nextUp_d(float d); - -extern float nextafterf_custom(float x, float y); - - -#define LW_MAX(a,b) ((a) > (b) ? (a) : (b)) -#define LW_MIN(a,b) ((a) <= (b) ? (a) : (b)) -#define LW_ABS(a) ((a) < (0) ? -(a) : (a)) - -/* for the measure functions*/ -#define DIST2D_MAX -1 -#define DIST2D_MIN 1 - -/* general utilities */ -extern double distance2d_pt_pt(POINT2D *p1, POINT2D *p2); -extern double distance2d_pt_seg(POINT2D *p, POINT2D *A, POINT2D *B); -extern LWGEOM *lw_dist2d_distancepoint(uchar *lw1, uchar *lw2,int srid,int mode); -extern LWGEOM *lw_dist2d_distanceline(uchar *lw1, uchar *lw2,int srid,int mode); -extern double lwgeom_mindistance2d(uchar *lw1, uchar *lw2); -extern double lwgeom_mindistance2d_tolerance(uchar *lw1, uchar *lw2, double tolerance); -extern double lwgeom_maxdistance2d(uchar *lw1, uchar *lw2); -extern double lwgeom_maxdistance2d_tolerance(uchar *lw1, uchar *lw2, double tolerance); -extern double lwgeom_polygon_area(LWPOLY *poly); -extern double lwgeom_polygon_perimeter(LWPOLY *poly); -extern double lwgeom_polygon_perimeter2d(LWPOLY *poly); -extern double lwgeom_pointarray_length2d(POINTARRAY *pts); -extern double lwgeom_pointarray_length(POINTARRAY *pts); -extern void lwgeom_force2d_recursive(uchar *serialized, uchar *optr, size_t *retsize); -extern void lwgeom_force3dz_recursive(uchar *serialized, uchar *optr, size_t *retsize); -extern void lwgeom_force3dm_recursive(uchar *serialized, uchar *optr, size_t *retsize); -extern void lwgeom_force4d_recursive(uchar *serialized, uchar *optr, size_t *retsize); -extern int pt_in_ring_2d(POINT2D *p, POINTARRAY *ring); -extern int pt_in_poly_2d(POINT2D *p, LWPOLY *poly); -extern int azimuth_pt_pt(POINT2D *p1, POINT2D *p2, double *ret); -extern int lwgeom_pt_inside_circle(POINT2D *p, double cx, double cy, double rad); -extern char ptarray_isccw(const POINTARRAY *pa); -extern void lwgeom_reverse(LWGEOM *lwgeom); -extern void lwline_reverse(LWLINE *line); -extern void lwpoly_reverse(LWPOLY *poly); -extern void lwpoly_forceRHR(LWPOLY *poly); -extern void lwgeom_force_rhr(LWGEOM *lwgeom); -extern char *lwgeom_summary(LWGEOM *lwgeom, int offset); -extern const char *lwgeom_typename(int type); -extern int ptarray_compute_box2d_p(const POINTARRAY *pa, BOX2DFLOAT4 *result); -extern BOX2DFLOAT4 *ptarray_compute_box2d(const POINTARRAY *pa); -extern int lwpoint_compute_box2d_p(LWPOINT *point, BOX2DFLOAT4 *box); -extern int lwline_compute_box2d_p(LWLINE *line, BOX2DFLOAT4 *box); -extern int lwpoly_compute_box2d_p(LWPOLY *poly, BOX2DFLOAT4 *box); -extern int lwcollection_compute_box2d_p(LWCOLLECTION *col, BOX2DFLOAT4 *box); -extern int lwcircstring_compute_box2d_p(LWCIRCSTRING *curve, BOX2DFLOAT4 *box); -extern BOX2DFLOAT4 *lwgeom_compute_box2d(LWGEOM *lwgeom); - -extern void interpolate_point4d(POINT4D *A, POINT4D *B, POINT4D *I, double F); - -/* return alloced memory */ -extern BOX2DFLOAT4 *box2d_union(BOX2DFLOAT4 *b1, BOX2DFLOAT4 *b2); - -/* args may overlap ! */ -extern int box2d_union_p(BOX2DFLOAT4 *b1, BOX2DFLOAT4 *b2, BOX2DFLOAT4 *ubox); -extern int lwgeom_compute_box2d_p(LWGEOM *lwgeom, BOX2DFLOAT4 *box); -void lwgeom_longitude_shift(LWGEOM *lwgeom); - - -/** -* @brief Check whether or not a lwgeom is big enough to warrant a bounding box. -* -* Check whether or not a lwgeom is big enough to warrant a bounding box -* when stored in the serialized form on disk. Currently only points are -* considered small enough to not require a bounding box, because the -* index operations can generate a large number of box-retrieval operations -* when scanning keys. -*/ -extern int lwgeom_needs_bbox(const LWGEOM *geom); - -/** -* Count the total number of vertices in any #LWGEOM. -*/ -extern int lwgeom_count_vertices(LWGEOM *geom); -extern int32 lwgeom_npoints(uchar *serialized); - -/** -* Return true of false depending on whether a geometry is an "empty" -* geometry (no vertices members) -*/ -extern int lwgeom_is_empty(const LWGEOM *geom); - -/** -* Return the dimensionality (relating to point/line/poly) of an lwgeom -*/ -extern int lwgeom_dimensionality(LWGEOM *geom); - -/* Is lwgeom1 geometrically equal to lwgeom2 ? */ -char lwgeom_same(const LWGEOM *lwgeom1, const LWGEOM *lwgeom2); -char ptarray_same(const POINTARRAY *pa1, const POINTARRAY *pa2); -char lwpoint_same(const LWPOINT *p1, const LWPOINT *p2); -char lwline_same(const LWLINE *p1, const LWLINE *p2); -char lwpoly_same(const LWPOLY *p1, const LWPOLY *p2); -char lwcollection_same(const LWCOLLECTION *p1, const LWCOLLECTION *p2); - -/* - * Add 'what' to 'to' at position 'where'. - * where=0 == prepend - * where=-1 == append - * Mix of dimensions is not allowed (TODO: allow it?). - * Returns a newly allocated LWGEOM (with NO BBOX) - */ -extern LWGEOM *lwgeom_add(const LWGEOM *to, uint32 where, const LWGEOM *what); - -LWGEOM *lwpoint_add(const LWPOINT *to, uint32 where, const LWGEOM *what); -LWGEOM *lwline_add(const LWLINE *to, uint32 where, const LWGEOM *what); -LWGEOM *lwpoly_add(const LWPOLY *to, uint32 where, const LWGEOM *what); -LWGEOM *lwmpoly_add(const LWMPOLY *to, uint32 where, const LWGEOM *what); -LWGEOM *lwmline_add(const LWMLINE *to, uint32 where, const LWGEOM *what); -LWGEOM *lwmpoint_add(const LWMPOINT *to, uint32 where, const LWGEOM *what); -LWGEOM *lwcollection_add(const LWCOLLECTION *to, uint32 where, const LWGEOM *what); -LWGEOM *lwcompound_add(const LWCOMPOUND *to, uint32 where, const LWGEOM *what); -LWGEOM *lwcurvepoly_add(const LWCURVEPOLY *to, uint32 where, const LWGEOM *what); -LWGEOM *lwmcurve_add(const LWMCURVE *to, uint32 where, const LWGEOM *what); -LWGEOM *lwmsurface_add(const LWMSURFACE *to, uint32 where, const LWGEOM *what); -LWGEOM *lwcircstring_add(const LWCIRCSTRING *to, uint32 where, const LWGEOM *what); - -/* - * Clone an LWGEOM - * pointarray are not copied. - * BBOXes are copied - */ -extern LWGEOM *lwgeom_clone(const LWGEOM *lwgeom); -extern LWPOINT *lwpoint_clone(const LWPOINT *lwgeom); -extern LWLINE *lwline_clone(const LWLINE *lwgeom); -extern LWPOLY *lwpoly_clone(const LWPOLY *lwgeom); -extern LWCOLLECTION *lwcollection_clone(const LWCOLLECTION *lwgeom); -extern LWCIRCSTRING *lwcircstring_clone(const LWCIRCSTRING *curve); -extern BOX2DFLOAT4 *box2d_clone(const BOX2DFLOAT4 *lwgeom); -extern POINTARRAY *ptarray_clone(const POINTARRAY *ptarray); - -/* - * Geometry constructors - * Take ownership of arguments - */ -extern LWPOINT *lwpoint_construct(int SRID, BOX2DFLOAT4 *bbox, - POINTARRAY *point); -extern LWLINE *lwline_construct(int SRID, BOX2DFLOAT4 *bbox, - POINTARRAY *points); - -/* - * Construct a new LWPOLY. arrays (points/points per ring) will NOT be copied - * use SRID=-1 for unknown SRID (will have 8bit type's S = 0) - */ -extern LWPOLY *lwpoly_construct(int SRID, BOX2DFLOAT4 *bbox, - unsigned int nrings, POINTARRAY **points); - -extern LWCOLLECTION *lwcollection_construct(unsigned int type, int SRID, - BOX2DFLOAT4 *bbox, unsigned int ngeoms, LWGEOM **geoms); -extern LWCOLLECTION *lwcollection_construct_empty(int SRID, - char hasZ, char hasM); - -/* - * Construct a new LWCIRCSTRING. arrays (points/points per ring) will NOT be copied - * use SRID=-1 for unknown SRID (will have 8bit type's S = 0) - */ -extern LWCIRCSTRING *lwcircstring_construct(int SRID, BOX2DFLOAT4 *bbox, POINTARRAY *points); - -/* Other constructors */ -extern LWPOINT *make_lwpoint2d(int SRID, double x, double y); -extern LWPOINT *make_lwpoint3dz(int SRID, double x, double y, double z); -extern LWPOINT *make_lwpoint3dm(int SRID, double x, double y, double m); -extern LWPOINT *make_lwpoint4d(int SRID, double x, double y, double z, double m); -extern LWLINE *lwline_from_lwpointarray(int SRID, unsigned int npoints, LWPOINT **points); -extern LWLINE *lwline_from_lwmpoint(int SRID, LWMPOINT *mpoint); -extern LWLINE *lwline_addpoint(LWLINE *line, LWPOINT *point, unsigned int where); -extern LWLINE *lwline_removepoint(LWLINE *line, unsigned int which); -extern void lwline_setPoint4d(LWLINE *line, unsigned int which, POINT4D *newpoint); -extern LWPOLY *lwpoly_from_lwlines(const LWLINE *shell, unsigned int nholes, const LWLINE **holes); - -/* Return a char string with ASCII versionf of type flags */ -extern const char *lwgeom_typeflags(uchar type); - -/* Construct an empty pointarray */ -extern POINTARRAY *ptarray_construct(char hasz, char hasm, unsigned int npoints); - -/* - * extern POINTARRAY *ptarray_construct2d(uint32 npoints, const POINT2D *pts); - * extern POINTARRAY *ptarray_construct3dz(uint32 npoints, const POINT3DZ *pts); - * extern POINTARRAY *ptarray_construct3dm(uint32 npoints, const POINT3DM *pts); - * extern POINTARRAY *ptarray_construct4d(uint32 npoints, const POINT4D *pts); - */ - -extern POINTARRAY *ptarray_addPoint(POINTARRAY *pa, uchar *p, size_t pdims, - unsigned int where); -extern POINTARRAY *ptarray_removePoint(POINTARRAY *pa, unsigned int where); -extern POINTARRAY *ptarray_merge(POINTARRAY *pa1, POINTARRAY *pa2); - -extern int ptarray_isclosed2d(const POINTARRAY *pa); -extern int ptarray_isclosed3d(const POINTARRAY *pa); - -extern void ptarray_longitude_shift(POINTARRAY *pa); - -extern int32 lwgeom_nrings_recursive(uchar *serialized); -extern void ptarray_reverse(POINTARRAY *pa); -extern POINTARRAY *ptarray_substring(POINTARRAY *, double, double); -extern double ptarray_locate_point(POINTARRAY *, POINT2D *); -extern void closest_point_on_segment(POINT2D *p, POINT2D *A, POINT2D *B, POINT2D *ret); -extern LWLINE *lwline_measured_from_lwline(const LWLINE *lwline, double m_start, double m_end); -extern LWMLINE* lwmline_measured_from_lwmline(const LWMLINE *lwmline, double m_start, double m_end); - -/* - * Ensure every segment is at most 'dist' long. - * Returned LWGEOM might is unchanged if a POINT. - */ -extern LWGEOM *lwgeom_segmentize2d(LWGEOM *line, double dist); -extern POINTARRAY *ptarray_segmentize2d(POINTARRAY *ipa, double dist); -extern LWLINE *lwline_segmentize2d(LWLINE *line, double dist); -extern LWPOLY *lwpoly_segmentize2d(LWPOLY *line, double dist); -extern LWCOLLECTION *lwcollection_segmentize2d(LWCOLLECTION *coll, double dist); - -extern uchar parse_hex(char *str); -extern void deparse_hex(uchar str, char *result); - -/* Parser check flags */ -#define PARSER_CHECK_MINPOINTS 1 -#define PARSER_CHECK_ODD 2 -#define PARSER_CHECK_CLOSURE 4 - -#define PARSER_CHECK_NONE 0 -#define PARSER_CHECK_ALL (PARSER_CHECK_MINPOINTS | PARSER_CHECK_ODD | PARSER_CHECK_CLOSURE) - -/* - * Parser result structure: returns the result of attempting to convert (E)WKT/(E)WKB to LWGEOM - */ -typedef struct struct_lwgeom_parser_result -{ - const char *wkinput; /* Copy of pointer to input WKT/WKB */ - uchar *serialized_lwgeom; /* Pointer to serialized LWGEOM */ - int size; /* Size of serialized LWGEOM in bytes */ - const char *message; /* Error/warning message */ - int errlocation; /* Location of error */ -} -LWGEOM_PARSER_RESULT; - -/* - * Parser error messages (these must match the message array in lwgparse.c) - */ -#define PARSER_ERROR_MOREPOINTS 1 -#define PARSER_ERROR_ODDPOINTS 2 -#define PARSER_ERROR_UNCLOSED 3 -#define PARSER_ERROR_MIXDIMS 4 -#define PARSER_ERROR_INVALIDGEOM 5 -#define PARSER_ERROR_INVALIDWKBTYPE 6 -#define PARSER_ERROR_INCONTINUOUS 7 - - -/* - * Unparser result structure: returns the result of attempting to convert LWGEOM to (E)WKT/(E)WKB - */ -typedef struct struct_lwgeom_unparser_result -{ - uchar *serialized_lwgeom; /* Copy of pointer to input serialized LWGEOM */ - char *wkoutput; /* Pointer to WKT or WKB output */ - int size; /* Size of serialized LWGEOM in bytes */ - const char *message; /* Error/warning message */ - int errlocation; /* Location of error */ -} -LWGEOM_UNPARSER_RESULT; - -/* - * Unparser error messages (these must match the message array in lwgunparse.c) - */ -#define UNPARSER_ERROR_MOREPOINTS 1 -#define UNPARSER_ERROR_ODDPOINTS 2 -#define UNPARSER_ERROR_UNCLOSED 3 - - -/* Parser access routines */ -extern char *lwgeom_to_ewkt(LWGEOM *lwgeom, int flags); -extern char *lwgeom_to_hexwkb(LWGEOM *lwgeom, int flags, unsigned int byteorder); -extern LWGEOM *lwgeom_from_ewkb(uchar *ewkb, int flags, size_t ewkblen); -extern LWGEOM *lwgeom_from_ewkt(char *ewkt, int flags); -extern uchar *lwgeom_to_ewkb(LWGEOM *lwgeom, int flags, char byteorder, size_t *ewkblen); - -extern int serialized_lwgeom_to_ewkt(LWGEOM_UNPARSER_RESULT *lwg_unparser_result, uchar *serialized, int flags); -extern int serialized_lwgeom_from_ewkt(LWGEOM_PARSER_RESULT *lwg_parser_result, char *wkt_input, int flags); -extern int serialized_lwgeom_to_hexwkb(LWGEOM_UNPARSER_RESULT *lwg_unparser_result, uchar *serialized, int flags, unsigned int byteorder); -extern int serialized_lwgeom_from_hexwkb(LWGEOM_PARSER_RESULT *lwg_parser_result, char *hexwkb_input, int flags); -extern int serialized_lwgeom_to_ewkb(LWGEOM_UNPARSER_RESULT *lwg_unparser_result, uchar *serialized, int flags, unsigned int byteorder); - -extern void *lwalloc(size_t size); -extern void *lwrealloc(void *mem, size_t size); -extern void lwfree(void *mem); - -/* Utilities */ -extern void trim_trailing_zeros(char *num); -extern char *lwmessage_truncate(char *str, int startpos, int endpos, int maxlength, int truncdirection); - -/* Machine endianness */ -#define XDR 0 -#define NDR 1 -extern char getMachineEndian(void); - -void errorIfSRIDMismatch(int srid1, int srid2); - - -/******************************************************************************* - * SQLMM internal functions - TODO: Move into separate header files - ******************************************************************************/ - -uint32 has_arc(LWGEOM *geom); -double lwcircle_center(POINT4D *p1, POINT4D *p2, POINT4D *p3, POINT4D **result); -LWGEOM *lwgeom_segmentize(LWGEOM *geom, uint32 perQuad); -LWGEOM *lwgeom_desegmentize(LWGEOM *geom); -extern double lwgeom_curvepolygon_area(LWCURVEPOLY *curvepoly); - -#endif /* !defined _LIBLWGEOM_H */ - diff -Nru postgis-1.5.3/liblwgeom/liblwgeom.h.in postgis-2.0.1/liblwgeom/liblwgeom.h.in --- postgis-1.5.3/liblwgeom/liblwgeom.h.in 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/liblwgeom.h.in 2012-05-17 11:45:26.000000000 +0000 @@ -0,0 +1,1917 @@ +/********************************************************************** + * $Id: liblwgeom.h.in 9742 2012-05-17 11:45:26Z strk $ + * + * PostGIS - Spatial Types for PostgreSQL + * + * Copyright 2011 Sandro Santilli + * Copyright 2011 Paul Ramsey + * Copyright 2007-2008 Mark Cave-Ayland + * Copyright 2001-2006 Refractions Research Inc. + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#ifndef _LIBLWGEOM_H +#define _LIBLWGEOM_H 1 + +#include +#include +#include +#include "proj_api.h" + +/** +* @file liblwgeom.h +* +* This library is the generic geometry handling section of PostGIS. The geometry +* objects, constructors, destructors, and a set of spatial processing functions, +* are implemented here. +* +* The library is designed for use in non-PostGIS applications if necessary. The +* units tests at cunit/cu_tester.c and the loader/dumper programs at +* ../loader/shp2pgsql.c are examples of non-PostGIS applications using liblwgeom. +* +* Programs using this library should set up the default memory managers and error +* handlers by implementing an lwgeom_init_allocators() function, which can be as +* a wrapper around the lwgeom_install_default_allocators() function if you want +* no special handling for memory management and error reporting. +*/ + +/** + * liblwgeom versions + */ +#define LIBLWGEOM_VERSION "@POSTGIS_LIB_VERSION@" +#define LIBLWGEOM_VERSION_MAJOR "@POSTGIS_MAJOR_VERSION@" +#define LIBLWGEOM_VERSION_MINOR "@POSTGIS_MINOR_VERSION@" +#define LIBLWGEOM_GEOS_VERSION "@POSTGIS_GEOS_VERSION@" + +/** +* Return types for functions with status returns. +*/ +#define LW_TRUE 1 +#define LW_FALSE 0 +#define LW_UNKNOWN 2 +#define LW_FAILURE 0 +#define LW_SUCCESS 1 + +/** +* LWTYPE numbers, used internally by PostGIS +*/ +#define POINTTYPE 1 +#define LINETYPE 2 +#define POLYGONTYPE 3 +#define MULTIPOINTTYPE 4 +#define MULTILINETYPE 5 +#define MULTIPOLYGONTYPE 6 +#define COLLECTIONTYPE 7 +#define CIRCSTRINGTYPE 8 +#define COMPOUNDTYPE 9 +#define CURVEPOLYTYPE 10 +#define MULTICURVETYPE 11 +#define MULTISURFACETYPE 12 +#define POLYHEDRALSURFACETYPE 13 +#define TRIANGLETYPE 14 +#define TINTYPE 15 + +#define NUMTYPES 16 + +/** +* Flags applied in EWKB to indicate Z/M dimensions and +* presence/absence of SRID and bounding boxes +*/ +#define WKBZOFFSET 0x80000000 +#define WKBMOFFSET 0x40000000 +#define WKBSRIDFLAG 0x20000000 +#define WKBBBOXFLAG 0x10000000 + +/********************************************************************** +** Spherical radius. +** Moritz, H. (1980). Geodetic Reference System 1980, by resolution of +** the XVII General Assembly of the IUGG in Canberra. +** http://en.wikipedia.org/wiki/Earth_radius +** http://en.wikipedia.org/wiki/World_Geodetic_System +*/ + +#define WGS84_MAJOR_AXIS 6378137.0 +#define WGS84_INVERSE_FLATTENING 298.257223563 +#define WGS84_MINOR_AXIS (WGS84_MAJOR_AXIS - WGS84_MAJOR_AXIS / WGS84_INVERSE_FLATTENING) +#define WGS84_RADIUS ((2.0 * WGS84_MAJOR_AXIS + WGS84_MINOR_AXIS ) / 3.0) + + +/** +* Macros for manipulating the 'flags' byte. A uint8_t used as follows: +* ---RGBMZ +* Three unused bits, followed by ReadOnly, Geodetic, HasBBox, HasM and HasZ flags. +*/ +#define FLAGS_GET_Z(flags) ((flags) & 0x01) +#define FLAGS_GET_M(flags) (((flags) & 0x02)>>1) +#define FLAGS_GET_BBOX(flags) (((flags) & 0x04)>>2) +#define FLAGS_GET_GEODETIC(flags) (((flags) & 0x08)>>3) +#define FLAGS_GET_READONLY(flags) (((flags) & 0x10)>>4) +#define FLAGS_GET_SOLID(flags) (((flags) & 0x20)>>5) +#define FLAGS_SET_Z(flags, value) ((flags) = (value) ? ((flags) | 0x01) : ((flags) & 0xFE)) +#define FLAGS_SET_M(flags, value) ((flags) = (value) ? ((flags) | 0x02) : ((flags) & 0xFD)) +#define FLAGS_SET_BBOX(flags, value) ((flags) = (value) ? ((flags) | 0x04) : ((flags) & 0xFB)) +#define FLAGS_SET_GEODETIC(flags, value) ((flags) = (value) ? ((flags) | 0x08) : ((flags) & 0xF7)) +#define FLAGS_SET_READONLY(flags, value) ((flags) = (value) ? ((flags) | 0x10) : ((flags) & 0xEF)) +#define FLAGS_SET_SOLID(flags, value) ((flags) = (value) ? ((flags) | 0x20) : ((flags) & 0xDF)) +#define FLAGS_NDIMS(flags) (2 + FLAGS_GET_Z(flags) + FLAGS_GET_M(flags)) +#define FLAGS_GET_ZM(flags) (FLAGS_GET_M(flags) + FLAGS_GET_Z(flags) * 2) +#define FLAGS_NDIMS_BOX(flags) (FLAGS_GET_GEODETIC(flags) ? 3 : FLAGS_NDIMS(flags)) + +/** +* Macros for manipulating the 'typemod' int. An int32_t used as follows: +* Plus/minus = Top bit. +* Spare bits = Next 2 bits. +* SRID = Next 21 bits. +* TYPE = Next 6 bits. +* ZM Flags = Bottom 2 bits. +*/ + +#define TYPMOD_GET_SRID(typmod) ((((typmod) & 0x1FFFFF00)<<3)>>11) +#define TYPMOD_SET_SRID(typmod, srid) ((typmod) = (((typmod) & 0xE00000FF) | ((srid & 0x001FFFFF)<<8))) +#define TYPMOD_GET_TYPE(typmod) ((typmod & 0x000000FC)>>2) +#define TYPMOD_SET_TYPE(typmod, type) ((typmod) = (typmod & 0xFFFFFF03) | ((type & 0x0000003F)<<2)) +#define TYPMOD_GET_Z(typmod) ((typmod & 0x00000002)>>1) +#define TYPMOD_SET_Z(typmod) ((typmod) = typmod | 0x00000002) +#define TYPMOD_GET_M(typmod) (typmod & 0x00000001) +#define TYPMOD_SET_M(typmod) ((typmod) = typmod | 0x00000001) +#define TYPMOD_GET_NDIMS(typmod) (2+TYPMOD_GET_Z(typmod)+TYPMOD_GET_M(typmod)) + +/** +* Maximum allowed SRID value in serialized geometry. +* Currently we are using 21 bits (2097152) of storage for SRID. +*/ +#define SRID_MAXIMUM @SRID_MAX@ + +/** + * Maximum valid SRID value for the user + * We reserve 1000 values for internal use + */ +#define SRID_USER_MAXIMUM @SRID_USR_MAX@ + +/** Unknown SRID value */ +#define SRID_UNKNOWN 0 +#define SRID_IS_UNKNOWN(x) ((int)x<=0) + +/* +** EPSG WGS84 geographics, OGC standard default SRS, better be in +** the SPATIAL_REF_SYS table! +*/ +#define SRID_DEFAULT 4326 + +/** +* Return a valid SRID from an arbitrary integer +* Raises a notice if what comes out is different from +* what went in. +* Raises an error if SRID value is out of bounds. +*/ +extern int clamp_srid(int srid); + + +/** + * Global functions for memory/logging handlers. + */ +typedef void* (*lwallocator)(size_t size); +typedef void* (*lwreallocator)(void *mem, size_t size); +typedef void (*lwfreeor)(void* mem); +typedef void (*lwreporter)(const char* fmt, va_list ap); +extern lwreallocator lwrealloc_var; +extern lwallocator lwalloc_var; +extern lwfreeor lwfree_var; +extern lwreporter lwerror_var; +extern lwreporter lwnotice_var; + +/** +* Supply the memory management and error handling functions you want your +* application to use. +* @ingroup system +*/ +extern void lwgeom_init_allocators(void); + +/** +* Apply the default memory management (malloc() and free()) and error handlers. +* Called inside lwgeom_init_allocators() generally. +* @ingroup system +*/ +extern void lwgeom_install_default_allocators(void); + +/** + * Write a notice out to the notice handler. + * + * Uses standard printf() substitutions. + * Use for messages you always want output. + * For debugging, use LWDEBUG() or LWDEBUGF(). + * @ingroup logging + */ +void lwnotice(const char *fmt, ...); + +/** + * Write a notice out to the error handler. + * + * Uses standard printf() substitutions. + * Use for errors you always want output. + * For debugging, use LWDEBUG() or LWDEBUGF(). + * @ingroup logging + */ +void lwerror(const char *fmt, ...); + +/** + * The default memory/logging handlers installed by + * lwgeom_install_default_allocators() + */ +void *default_allocator(size_t size); +void *default_reallocator(void *mem, size_t size); +void default_freeor(void *ptr); +void default_errorreporter(const char *fmt, va_list ap); +void default_noticereporter(const char *fmt, va_list ap); + +extern int lw_vasprintf (char **result, const char *format, va_list args); +extern int lw_asprintf +#if __STDC__ +(char **result, const char *format, ...); +#else +(result, va_alist); +char **result; +va_dcl +#endif + + +/******************************************************************/ + +typedef struct { + double afac, bfac, cfac, dfac, efac, ffac, gfac, hfac, ifac, xoff, yoff, zoff; +} AFFINE; + +/******************************************************************/ + +typedef struct +{ + double xmin, ymin, zmin; + double xmax, ymax, zmax; + int32_t srid; +} +BOX3D; + +/****************************************************************** +* GBOX structure. +* We include the flags (information about dimensinality), +* so we don't have to constantly pass them +* into functions that use the GBOX. +*/ +typedef struct +{ + uint8_t flags; + double xmin; + double xmax; + double ymin; + double ymax; + double zmin; + double zmax; + double mmin; + double mmax; +} GBOX; + + +/****************************************************************** +* SPHEROID +* +* Standard definition of an ellipsoid (what wkt calls a spheroid) +* f = (a-b)/a +* e_sq = (a*a - b*b)/(a*a) +* b = a - fa +*/ +typedef struct +{ + double a; /* semimajor axis */ + double b; /* semiminor axis b = (a - fa) */ + double f; /* flattening f = (a-b)/a */ + double e; /* eccentricity (first) */ + double e_sq; /* eccentricity squared (first) e_sq = (a*a-b*b)/(a*a) */ + double radius; /* spherical average radius = (2*a+b)/3 */ + char name[20]; /* name of ellipse */ +} +SPHEROID; + +/****************************************************************** +* POINT2D, POINT3D, POINT3DM, POINT4D +*/ +typedef struct +{ + double x, y; +} +POINT2D; + +typedef struct +{ + double x, y, z; +} +POINT3DZ; + +typedef struct +{ + double x, y, z; +} +POINT3D; + +typedef struct +{ + double x, y, m; +} +POINT3DM; + +typedef struct +{ + double x, y, z, m; +} +POINT4D; + +/****************************************************************** +* POINTARRAY +* Point array abstracts a lot of the complexity of points and point lists. +* It handles 2d/3d translation +* (2d points converted to 3d will have z=0 or NaN) +* DO NOT MIX 2D and 3D POINTS! EVERYTHING* is either one or the other +*/ +typedef struct +{ + /* Array of POINT 2D, 3D or 4D, possibly missaligned. */ + uint8_t *serialized_pointlist; + + /* Use FLAGS_* macros to handle */ + uint8_t flags; + + int npoints; /* how many points we are currently storing */ + int maxpoints; /* how many points we have space for in serialized_pointlist */ +} +POINTARRAY; + +/****************************************************************** +* GSERIALIZED +*/ +typedef struct +{ + uint32_t size; /* For PgSQL use only, use VAR* macros to manipulate. */ + uint8_t srid[3]; /* 24 bits of SRID */ + uint8_t flags; /* HasZ, HasM, HasBBox, IsGeodetic, IsReadOnly */ + uint8_t data[1]; /* See gserialized.txt */ +} GSERIALIZED; + + +/****************************************************************** +* LWGEOM (any geometry type) +* +* Abstract type, note that 'type', 'bbox' and 'srid' are available in +* all geometry variants. +*/ +typedef struct +{ + uint8_t type; + uint8_t flags; + GBOX *bbox; + int32_t srid; + void *data; +} +LWGEOM; + +/* POINTYPE */ +typedef struct +{ + uint8_t type; /* POINTTYPE */ + uint8_t flags; + GBOX *bbox; + int32_t srid; + POINTARRAY *point; /* hide 2d/3d (this will be an array of 1 point) */ +} +LWPOINT; /* "light-weight point" */ + +/* LINETYPE */ +typedef struct +{ + uint8_t type; /* LINETYPE */ + uint8_t flags; + GBOX *bbox; + int32_t srid; + POINTARRAY *points; /* array of POINT3D */ +} +LWLINE; /* "light-weight line" */ + +/* TRIANGLE */ +typedef struct +{ + uint8_t type; + uint8_t flags; + GBOX *bbox; + int32_t srid; + POINTARRAY *points; +} +LWTRIANGLE; + +/* CIRCSTRINGTYPE */ +typedef struct +{ + uint8_t type; /* CIRCSTRINGTYPE */ + uint8_t flags; + GBOX *bbox; + int32_t srid; + POINTARRAY *points; /* array of POINT(3D/3DM) */ +} +LWCIRCSTRING; /* "light-weight circularstring" */ + +/* POLYGONTYPE */ +typedef struct +{ + uint8_t type; /* POLYGONTYPE */ + uint8_t flags; + GBOX *bbox; + int32_t srid; + int nrings; /* how many rings we are currently storing */ + int maxrings; /* how many rings we have space for in **rings */ + POINTARRAY **rings; /* list of rings (list of points) */ +} +LWPOLY; /* "light-weight polygon" */ + +/* MULTIPOINTTYPE */ +typedef struct +{ + uint8_t type; + uint8_t flags; + GBOX *bbox; + int32_t srid; + int ngeoms; /* how many geometries we are currently storing */ + int maxgeoms; /* how many geometries we have space for in **geoms */ + LWPOINT **geoms; +} +LWMPOINT; + +/* MULTILINETYPE */ +typedef struct +{ + uint8_t type; + uint8_t flags; + GBOX *bbox; + int32_t srid; + int ngeoms; /* how many geometries we are currently storing */ + int maxgeoms; /* how many geometries we have space for in **geoms */ + LWLINE **geoms; +} +LWMLINE; + +/* MULTIPOLYGONTYPE */ +typedef struct +{ + uint8_t type; + uint8_t flags; + GBOX *bbox; + int32_t srid; + int ngeoms; /* how many geometries we are currently storing */ + int maxgeoms; /* how many geometries we have space for in **geoms */ + LWPOLY **geoms; +} +LWMPOLY; + +/* COLLECTIONTYPE */ +typedef struct +{ + uint8_t type; + uint8_t flags; + GBOX *bbox; + int32_t srid; + int ngeoms; /* how many geometries we are currently storing */ + int maxgeoms; /* how many geometries we have space for in **geoms */ + LWGEOM **geoms; +} +LWCOLLECTION; + +/* COMPOUNDTYPE */ +typedef struct +{ + uint8_t type; /* COMPOUNDTYPE */ + uint8_t flags; + GBOX *bbox; + int32_t srid; + int ngeoms; /* how many geometries we are currently storing */ + int maxgeoms; /* how many geometries we have space for in **geoms */ + LWGEOM **geoms; +} +LWCOMPOUND; /* "light-weight compound line" */ + +/* CURVEPOLYTYPE */ +typedef struct +{ + uint8_t type; /* CURVEPOLYTYPE */ + uint8_t flags; + GBOX *bbox; + int32_t srid; + int nrings; /* how many rings we are currently storing */ + int maxrings; /* how many rings we have space for in **rings */ + LWGEOM **rings; /* list of rings (list of points) */ +} +LWCURVEPOLY; /* "light-weight polygon" */ + +/* MULTICURVE */ +typedef struct +{ + uint8_t type; + uint8_t flags; + GBOX *bbox; + int32_t srid; + int ngeoms; /* how many geometries we are currently storing */ + int maxgeoms; /* how many geometries we have space for in **geoms */ + LWGEOM **geoms; +} +LWMCURVE; + +/* MULTISURFACETYPE */ +typedef struct +{ + uint8_t type; + uint8_t flags; + GBOX *bbox; + int32_t srid; + int ngeoms; /* how many geometries we are currently storing */ + int maxgeoms; /* how many geometries we have space for in **geoms */ + LWGEOM **geoms; +} +LWMSURFACE; + +/* POLYHEDRALSURFACETYPE */ +typedef struct +{ + uint8_t type; + uint8_t flags; + GBOX *bbox; + int32_t srid; + int ngeoms; /* how many geometries we are currently storing */ + int maxgeoms; /* how many geometries we have space for in **geoms */ + LWPOLY **geoms; +} +LWPSURFACE; + +/* TINTYPE */ +typedef struct +{ + uint8_t type; + uint8_t flags; + GBOX *bbox; + int32_t srid; + int ngeoms; /* how many geometries we are currently storing */ + int maxgeoms; /* how many geometries we have space for in **geoms */ + LWTRIANGLE **geoms; +} +LWTIN; + +/* Casts LWGEOM->LW* (return NULL if cast is illegal) */ +extern LWMPOLY *lwgeom_as_lwmpoly(const LWGEOM *lwgeom); +extern LWMLINE *lwgeom_as_lwmline(const LWGEOM *lwgeom); +extern LWMPOINT *lwgeom_as_lwmpoint(const LWGEOM *lwgeom); +extern LWCOLLECTION *lwgeom_as_lwcollection(const LWGEOM *lwgeom); +extern LWPOLY *lwgeom_as_lwpoly(const LWGEOM *lwgeom); +extern LWLINE *lwgeom_as_lwline(const LWGEOM *lwgeom); +extern LWPOINT *lwgeom_as_lwpoint(const LWGEOM *lwgeom); +extern LWCIRCSTRING *lwgeom_as_lwcircstring(const LWGEOM *lwgeom); +extern LWCURVEPOLY *lwgeom_as_lwcurvepoly(const LWGEOM *lwgeom); +extern LWCOMPOUND *lwgeom_as_lwcompound(const LWGEOM *lwgeom); +extern LWPSURFACE *lwgeom_as_lwpsurface(const LWGEOM *lwgeom); +extern LWTRIANGLE *lwgeom_as_lwtriangle(const LWGEOM *lwgeom); +extern LWTIN *lwgeom_as_lwtin(const LWGEOM *lwgeom); +extern LWGEOM *lwgeom_as_multi(const LWGEOM *lwgeom); + +/* Casts LW*->LWGEOM (always cast) */ +extern LWGEOM *lwtin_as_lwgeom(const LWTIN *obj); +extern LWGEOM *lwtriangle_as_lwgeom(const LWTRIANGLE *obj); +extern LWGEOM *lwpsurface_as_lwgeom(const LWPSURFACE *obj); +extern LWGEOM *lwmpoly_as_lwgeom(const LWMPOLY *obj); +extern LWGEOM *lwmline_as_lwgeom(const LWMLINE *obj); +extern LWGEOM *lwmpoint_as_lwgeom(const LWMPOINT *obj); +extern LWGEOM *lwcollection_as_lwgeom(const LWCOLLECTION *obj); +extern LWGEOM *lwcircstring_as_lwgeom(const LWCIRCSTRING *obj); +extern LWGEOM *lwcompound_as_lwgeom(const LWCOMPOUND *obj); +extern LWGEOM *lwcurvepoly_as_lwgeom(const LWCURVEPOLY *obj); +extern LWGEOM *lwpoly_as_lwgeom(const LWPOLY *obj); +extern LWGEOM *lwline_as_lwgeom(const LWLINE *obj); +extern LWGEOM *lwpoint_as_lwgeom(const LWPOINT *obj); + + +extern LWCOLLECTION* lwcollection_add_lwgeom(LWCOLLECTION *col, const LWGEOM *geom); +extern LWMPOINT* lwmpoint_add_lwpoint(LWMPOINT *mobj, const LWPOINT *obj); +extern LWMLINE* lwmline_add_lwline(LWMLINE *mobj, const LWLINE *obj); +extern LWMPOLY* lwmpoly_add_lwpoly(LWMPOLY *mobj, const LWPOLY *obj); +extern LWPSURFACE* lwpsurface_add_lwpoly(LWPSURFACE *mobj, const LWPOLY *obj); +extern LWTIN* lwtin_add_lwtriangle(LWTIN *mobj, const LWTRIANGLE *obj); + + + +/*********************************************************************** +** Utility functions for flag byte and srid_flag integer. +*/ + +/** +* Construct a new flags char. +*/ +extern uint8_t gflags(int hasz, int hasm, int geodetic); + +/** +* Extract the geometry type from the serialized form (it hides in +* the anonymous data area, so this is a handy function). +*/ +extern uint32_t gserialized_get_type(const GSERIALIZED *g); + +/** +* Extract the SRID from the serialized form (it is packed into +* three bytes so this is a handy function). +*/ +extern int32_t gserialized_get_srid(const GSERIALIZED *g); + +/** +* Write the SRID into the serialized form (it is packed into +* three bytes so this is a handy function). +*/ +extern void gserialized_set_srid(GSERIALIZED *g, int32_t srid); + +/** +* Check if a #GSERIALIZED is empty without deserializing first. +* Only checks if the number of elements of the parent geometry +* is zero, will not catch collections of empty, eg: +* GEOMETRYCOLLECTION(POINT EMPTY) +*/ +extern int gserialized_is_empty(const GSERIALIZED *g); + +/** +* Check if a #GSERIALIZED has a bounding box without deserializing first. +*/ +extern int gserialized_has_bbox(const GSERIALIZED *gser); + +/** +* Check if a #GSERIALIZED has a Z ordinate. +*/ +extern int gserialized_has_z(const GSERIALIZED *gser); + +/** +* Check if a #GSERIALIZED has an M ordinate. +*/ +extern int gserialized_has_m(const GSERIALIZED *gser); + +/** +* Return a number indicating presence of Z and M coordinates. +* 0 = None, 1 = M, 2 = Z, 3 = ZM +*/ +extern int gserialized_get_zm(const GSERIALIZED *gser); + +/** +* Return the number of dimensions (2, 3, 4) in a geometry +*/ +extern int gserialized_ndims(const GSERIALIZED *gser); + + +/** +* Call this function to drop BBOX and SRID +* from LWGEOM. If LWGEOM type is *not* flagged +* with the HASBBOX flag and has a bbox, it +* will be released. +*/ +extern void lwgeom_drop_bbox(LWGEOM *lwgeom); +extern void lwgeom_drop_srid(LWGEOM *lwgeom); + +/** + * Compute a bbox if not already computed + * + * After calling this function lwgeom->bbox is only + * NULL if the geometry is empty. + */ +extern void lwgeom_add_bbox(LWGEOM *lwgeom); + +/** + * Get a non-empty geometry bounding box, computing and + * caching it if not already there + * + * NOTE: empty geometries don't have a bounding box so + * you'd still get a NULL for them. + */ +extern const GBOX *lwgeom_get_bbox(const LWGEOM *lwgeom); + +/** +* Determine whether a LWGEOM can contain sub-geometries or not +*/ +extern int lwgeom_is_collection(const LWGEOM *lwgeom); + +/******************************************************************/ +/* Functions that work on type numbers */ + +/** +* Determine whether a type number is a collection or not +*/ +extern int lwtype_is_collection(uint8_t type); + +/** +* Given an lwtype number, what homogeneous collection can hold it? +*/ +extern int lwtype_get_collectiontype(uint8_t type); + +/** +* Return the type name string associated with a type number +* (e.g. Point, LineString, Polygon) +*/ +extern const char *lwtype_name(uint8_t type); + + +/******************************************************************/ + +/* + * copies a point from the point array into the parameter point + * will set point's z=0 (or NaN) if pa is 2d + * will set point's m=0 (or NaN) if pa is 3d or 2d + * NOTE: point is a real POINT3D *not* a pointer + */ +extern POINT4D getPoint4d(const POINTARRAY *pa, int n); + +/* + * copies a point from the point array into the parameter point + * will set point's z=0 (or NaN) if pa is 2d + * will set point's m=0 (or NaN) if pa is 3d or 2d + * NOTE: this will modify the point4d pointed to by 'point'. + */ +extern int getPoint4d_p(const POINTARRAY *pa, int n, POINT4D *point); + +/* + * copies a point from the point array into the parameter point + * will set point's z=0 (or NaN) if pa is 2d + * NOTE: point is a real POINT3D *not* a pointer + */ +extern POINT3DZ getPoint3dz(const POINTARRAY *pa, int n); +extern POINT3DM getPoint3dm(const POINTARRAY *pa, int n); + +/* + * copies a point from the point array into the parameter point + * will set point's z=0 (or NaN) if pa is 2d + * NOTE: this will modify the point3d pointed to by 'point'. + */ +extern int getPoint3dz_p(const POINTARRAY *pa, int n, POINT3DZ *point); +extern int getPoint3dm_p(const POINTARRAY *pa, int n, POINT3DM *point); + + +/* + * copies a point from the point array into the parameter point + * z value (if present is not returned) + * NOTE: point is a real POINT3D *not* a pointer + */ +extern POINT2D getPoint2d(const POINTARRAY *pa, int n); + +/* + * copies a point from the point array into the parameter point + * z value (if present is not returned) + * NOTE: this will modify the point2d pointed to by 'point'. + */ +extern int getPoint2d_p(const POINTARRAY *pa, int n, POINT2D *point); + +/* + * set point N to the given value + * NOTE that the pointarray can be of any + * dimension, the appropriate ordinate values + * will be extracted from it + * + * N must be a valid point index + */ +extern void ptarray_set_point4d(POINTARRAY *pa, int n, const POINT4D *p4d); + +/* + * get a pointer to nth point of a POINTARRAY + * You'll need to cast it to appropriate dimensioned point. + * Note that if you cast to a higher dimensional point you'll + * possibly corrupt the POINTARRAY. + * + * WARNING: Don't cast this to a POINT ! + * it would not be reliable due to memory alignment constraints + */ +extern uint8_t *getPoint_internal(const POINTARRAY *pa, int n); + +/* + * size of point represeneted in the POINTARRAY + * 16 for 2d, 24 for 3d, 32 for 4d + */ +extern int ptarray_point_size(const POINTARRAY *pa); + + +/** +* Construct an empty pointarray, allocating storage and setting +* the npoints, but not filling in any information. Should be used in conjunction +* with ptarray_set_point4d to fill in the information in the array. +*/ +extern POINTARRAY* ptarray_construct(char hasz, char hasm, uint32_t npoints); + +/** +* Construct a new #POINTARRAY, copying in the data from ptlist +*/ +extern POINTARRAY* ptarray_construct_copy_data(char hasz, char hasm, uint32_t npoints, const uint8_t *ptlist); + +/** +* Construct a new #POINTARRAY, referencing to the data from ptlist +*/ +extern POINTARRAY* ptarray_construct_reference_data(char hasz, char hasm, uint32_t npoints, uint8_t *ptlist); + +/** +* Create a new #POINTARRAY with no points. Allocate enough storage +* to hold maxpoints vertices before having to reallocate the storage +* area. +*/ +extern POINTARRAY* ptarray_construct_empty(char hasz, char hasm, uint32_t maxpoints); + +/** +* Append a point to the end of an existing #POINTARRAY +* If allow_duplicate is LW_TRUE, then a duplicate point will +* not be added. +*/ +extern int ptarray_append_point(POINTARRAY *pa, const POINT4D *pt, int allow_duplicates); + +/** + * Append a #POINTARRAY, pa2 to the end of an existing #POINTARRAY, pa1. + * + * If gap_tolerance is >= 0 then the end point of pa1 will be checked for + * being within gap_tolerance 2d distance from start point of pa2 or an + * error will be raised and LW_FAILURE returned. + * A gap_tolerance < 0 disables the check. + * + * If end point of pa1 and start point of pa2 are 2d-equal, then pa2 first + * point will not be appended. + */ +extern int ptarray_append_ptarray(POINTARRAY *pa1, POINTARRAY *pa2, double gap_tolerance); + +/** +* Insert a point into an existing #POINTARRAY. Zero +* is the index of the start of the array. +*/ +extern int ptarray_insert_point(POINTARRAY *pa, const POINT4D *p, int where); + +/** +* Remove a point from an existing #POINTARRAY. Zero +* is the index of the start of the array. +*/ +extern int ptarray_remove_point(POINTARRAY *pa, int where); + +extern POINTARRAY *ptarray_addPoint(const POINTARRAY *pa, uint8_t *p, size_t pdims, uint32_t where); +extern POINTARRAY *ptarray_removePoint(POINTARRAY *pa, uint32_t where); +extern POINTARRAY *ptarray_merge(POINTARRAY *pa1, POINTARRAY *pa2); +extern int ptarray_isclosed(const POINTARRAY *pa); +extern int ptarray_isclosed2d(const POINTARRAY *pa); +extern int ptarray_isclosed3d(const POINTARRAY *pa); +extern int ptarray_isclosedz(const POINTARRAY *pa); +extern void ptarray_longitude_shift(POINTARRAY *pa); +extern void ptarray_reverse(POINTARRAY *pa); +extern POINTARRAY* ptarray_flip_coordinates(POINTARRAY *pa); + +/** + * @d1 start location (distance from start / total distance) + * @d2 end location (distance from start / total distance) + * @param tolerance snap to vertices at locations < tolerance away from given ones + */ +extern POINTARRAY *ptarray_substring(POINTARRAY *pa, double d1, double d2, + double tolerance); + + +/** +* Strip out the Z/M components of an #LWGEOM +*/ +extern LWGEOM* lwgeom_force_2d(const LWGEOM *geom); +extern LWGEOM* lwgeom_force_3dz(const LWGEOM *geom); +extern LWGEOM* lwgeom_force_3dm(const LWGEOM *geom); +extern LWGEOM* lwgeom_force_4d(const LWGEOM *geom); + +extern LWGEOM* lwgeom_simplify(const LWGEOM *igeom, double dist); + + +/*-------------------------------------------------------- + * all the base types (point/line/polygon) will have a + * basic constructor, basic de-serializer, basic serializer, + * bounding box finder and (TODO) serialized form size finder. + *--------------------------------------------------------*/ + +/* + * convenience functions to hide the POINTARRAY + */ +extern int lwpoint_getPoint2d_p(const LWPOINT *point, POINT2D *out); +extern int lwpoint_getPoint3dz_p(const LWPOINT *point, POINT3DZ *out); +extern int lwpoint_getPoint3dm_p(const LWPOINT *point, POINT3DM *out); +extern int lwpoint_getPoint4d_p(const LWPOINT *point, POINT4D *out); + +/****************************************************************** + * LWLINE functions + ******************************************************************/ + +/** + * Add a LWPOINT to an LWLINE + */ +extern int lwline_add_lwpoint(LWLINE *line, LWPOINT *point, int where); + +/****************************************************************** + * LWPOLY functions + ******************************************************************/ + +/** +* Add a ring, allocating extra space if necessary. The polygon takes +* ownership of the passed point array. +*/ +extern int lwpoly_add_ring(LWPOLY *poly, POINTARRAY *pa); + +/** +* Add a ring, allocating extra space if necessary. The curvepolygon takes +* ownership of the passed point array. +*/ +extern int lwcurvepoly_add_ring(LWCURVEPOLY *poly, LWGEOM *ring); + +/** +* Add a component, allocating extra space if necessary. The compoundcurve +* takes owership of the passed geometry. +*/ +extern int lwcompound_add_lwgeom(LWCOMPOUND *comp, LWGEOM *geom); + + + + + + +/****************************************************************** + * LWGEOM functions + ******************************************************************/ + +extern int lwcollection_ngeoms(const LWCOLLECTION *col); + +/* Given a generic geometry/collection, return the "simplest" form. */ +extern LWGEOM *lwgeom_homogenize(const LWGEOM *geom); + + +/****************************************************************** + * LWMULTIx and LWCOLLECTION functions + ******************************************************************/ + +LWGEOM *lwcollection_getsubgeom(LWCOLLECTION *col, int gnum); +LWCOLLECTION* lwcollection_extract(LWCOLLECTION *col, int type); + + +/****************************************************************** + * SERIALIZED FORM functions + ******************************************************************/ + +/** +* Set the SRID on an LWGEOM +* For collections, only the parent gets an SRID, all +* the children get SRID_UNKNOWN. +*/ +extern void lwgeom_set_srid(LWGEOM *geom, int srid); + +/*------------------------------------------------------ + * other stuff + * + * handle the double-to-float conversion. The results of this + * will usually be a slightly bigger box because of the difference + * between float8 and float4 representations. + */ + +extern BOX3D* box3d_from_gbox(const GBOX *gbox); +extern GBOX* box3d_to_gbox(const BOX3D *b3d); + +void expand_box3d(BOX3D *box, double d); + + +/**************************************************************** + * MEMORY MANAGEMENT + ****************************************************************/ + +/* +* The *_free family of functions frees *all* memory associated +* with the pointer. When the recursion gets to the level of the +* POINTARRAY, the POINTARRAY is only freed if it is not flagged +* as "read only". LWGEOMs constructed on top of GSERIALIZED +* from PgSQL use read only point arrays. +*/ + +extern void ptarray_free(POINTARRAY *pa); +extern void lwpoint_free(LWPOINT *pt); +extern void lwline_free(LWLINE *line); +extern void lwpoly_free(LWPOLY *poly); +extern void lwtriangle_free(LWTRIANGLE *triangle); +extern void lwmpoint_free(LWMPOINT *mpt); +extern void lwmline_free(LWMLINE *mline); +extern void lwmpoly_free(LWMPOLY *mpoly); +extern void lwpsurface_free(LWPSURFACE *psurf); +extern void lwtin_free(LWTIN *tin); +extern void lwcollection_free(LWCOLLECTION *col); +extern void lwcircstring_free(LWCIRCSTRING *curve); +extern void lwgeom_free(LWGEOM *geom); + +/* +* The *_release family of functions frees the LWGEOM structures +* surrounding the POINTARRAYs but leaves the POINTARRAYs +* intact. Useful when re-shaping geometries between types, +* or splicing geometries together. +*/ + +extern void lwpoint_release(LWPOINT *lwpoint); +extern void lwline_release(LWLINE *lwline); +extern void lwpoly_release(LWPOLY *lwpoly); +extern void lwtriangle_release(LWTRIANGLE *lwtriangle); +extern void lwcircstring_release(LWCIRCSTRING *lwcirc); +extern void lwmpoint_release(LWMPOINT *lwpoint); +extern void lwmline_release(LWMLINE *lwline); +extern void lwmpoly_release(LWMPOLY *lwpoly); +extern void lwpsurface_release(LWPSURFACE *lwpsurface); +extern void lwtin_release(LWTIN *lwtin); +extern void lwcollection_release(LWCOLLECTION *lwcollection); +extern void lwgeom_release(LWGEOM *lwgeom); + + +/**************************************************************** +* Utility +****************************************************************/ + +extern void printBOX3D(BOX3D *b); +extern void printPA(POINTARRAY *pa); +extern void printLWPOINT(LWPOINT *point); +extern void printLWLINE(LWLINE *line); +extern void printLWPOLY(LWPOLY *poly); +extern void printLWTRIANGLE(LWTRIANGLE *triangle); +extern void printLWPSURFACE(LWPSURFACE *psurf); +extern void printLWTIN(LWTIN *tin); + +extern float next_float_down(double d); +extern float next_float_up(double d); +extern double next_double_down(float d); +extern double next_double_up(float d); + +/* general utilities + 2D*/ +extern double distance2d_pt_pt(const POINT2D *p1, const POINT2D *p2); +extern double distance2d_pt_seg(const POINT2D *p, const POINT2D *A, const POINT2D *B); +extern LWGEOM *lw_dist2d_distancepoint(LWGEOM *lw1, LWGEOM *lw2,int srid,int mode); +extern LWGEOM *lw_dist2d_distanceline(LWGEOM *lw1, LWGEOM *lw2,int srid,int mode); +extern double lwgeom_mindistance2d(LWGEOM *lw1, LWGEOM *lw2); +extern double lwgeom_mindistance2d_tolerance(LWGEOM *lw1, LWGEOM *lw2, double tolerance); +extern double lwgeom_maxdistance2d(LWGEOM *lw1, LWGEOM *lw2); +extern double lwgeom_maxdistance2d_tolerance(LWGEOM *lw1, LWGEOM *lw2, double tolerance); +/* + 3D*/ +extern double distance3d_pt_pt(const POINT3D *p1, const POINT3D *p2); +extern double distance3d_pt_seg(const POINT3D *p, const POINT3D *A, const POINT3D *B); +extern LWGEOM *lw_dist3d_distancepoint(LWGEOM *lw1, LWGEOM *lw2,int srid,int mode); +extern LWGEOM *lw_dist3d_distanceline(LWGEOM *lw1, LWGEOM *lw2,int srid,int mode); +extern double lwgeom_mindistance3d(LWGEOM *lw1, LWGEOM *lw2); +extern double lwgeom_mindistance3d_tolerance(LWGEOM *lw1, LWGEOM *lw2, double tolerance); +extern double lwgeom_maxdistance3d(LWGEOM *lw1, LWGEOM *lw2); +extern double lwgeom_maxdistance3d_tolerance(LWGEOM *lw1, LWGEOM *lw2, double tolerance); + + +extern double lwgeom_area(const LWGEOM *geom); +extern double lwgeom_length(const LWGEOM *geom); +extern double lwgeom_length_2d(const LWGEOM *geom); +extern double lwgeom_perimeter(const LWGEOM *geom); +extern double lwgeom_perimeter_2d(const LWGEOM *geom); +extern void lwgeom_affine(LWGEOM *geom, const AFFINE *affine); +extern int lwgeom_dimension(const LWGEOM *geom); + +extern LWPOINT* lwline_get_lwpoint(LWLINE *line, int where); + +extern double ptarray_length_2d(const POINTARRAY *pts); +extern double ptarray_length(const POINTARRAY *pts); + + +extern int pt_in_ring_2d(const POINT2D *p, const POINTARRAY *ring); +extern int pt_in_poly_2d(const POINT2D *p, const LWPOLY *poly); +extern int azimuth_pt_pt(const POINT2D *p1, const POINT2D *p2, double *ret); +extern int lwgeom_pt_inside_circle(POINT2D *p, double cx, double cy, double rad); +extern void lwgeom_reverse(LWGEOM *lwgeom); +extern void lwline_reverse(LWLINE *line); +extern void lwpoly_reverse(LWPOLY *poly); +extern void lwtriangle_reverse(LWTRIANGLE *triangle); +extern char* lwgeom_summary(const LWGEOM *lwgeom, int offset); +extern char* lwpoint_to_latlon(const LWPOINT *p, const char *format); + +/** +* Ensure the outer ring is clockwise oriented and all inner rings +* are counter-clockwise. +*/ +extern void lwgeom_force_clockwise(LWGEOM *lwgeom); +extern void lwpoly_force_clockwise(LWPOLY *poly); +extern void lwtriangle_force_clockwise(LWTRIANGLE *triangle); + + +extern void interpolate_point4d(POINT4D *A, POINT4D *B, POINT4D *I, double F); + +void lwgeom_longitude_shift(LWGEOM *lwgeom); + + +/** +* @brief Check whether or not a lwgeom is big enough to warrant a bounding box. +* +* Check whether or not a lwgeom is big enough to warrant a bounding box +* when stored in the serialized form on disk. Currently only points are +* considered small enough to not require a bounding box, because the +* index operations can generate a large number of box-retrieval operations +* when scanning keys. +*/ +extern int lwgeom_needs_bbox(const LWGEOM *geom); + +/** +* Count the total number of vertices in any #LWGEOM. +*/ +extern int lwgeom_count_vertices(const LWGEOM *geom); +extern int lwgeom_npoints(uint8_t *serialized); + +/** +* Count the total number of rings in any #LWGEOM. Multipolygons +* and other collections get counted, not the same as OGC st_numrings. +*/ +extern int lwgeom_count_rings(const LWGEOM *geom); + +/** +* Return true or false depending on whether a geometry has +* a valid SRID set. +*/ +extern int lwgeom_has_srid(const LWGEOM *geom); + +/** +* Return true or false depending on whether a geometry is an "empty" +* geometry (no vertices members) +*/ +extern int lwgeom_is_empty(const LWGEOM *geom); + +/** +* Return true or false depending on whether a geometry is a linear +* feature that closes on itself. +*/ +extern int lwgeom_is_closed(const LWGEOM *geom); + +/** +* Return the dimensionality (relating to point/line/poly) of an lwgeom +*/ +extern int lwgeom_dimensionality(LWGEOM *geom); + +/* Is lwgeom1 geometrically equal to lwgeom2 ? */ +char lwgeom_same(const LWGEOM *lwgeom1, const LWGEOM *lwgeom2); +char ptarray_same(const POINTARRAY *pa1, const POINTARRAY *pa2); +char lwpoint_same(const LWPOINT *p1, const LWPOINT *p2); +char lwline_same(const LWLINE *p1, const LWLINE *p2); +char lwpoly_same(const LWPOLY *p1, const LWPOLY *p2); +char lwtriangle_same(const LWTRIANGLE *p1, const LWTRIANGLE *p2); +char lwcollection_same(const LWCOLLECTION *p1, const LWCOLLECTION *p2); +char lwcircstring_same(const LWCIRCSTRING *p1, const LWCIRCSTRING *p2); + + +/** + * @brief Clone LWGEOM object. Serialized point lists are not copied. + * + * #GBOX are copied + * + * @see ptarray_clone + */ +extern LWGEOM *lwgeom_clone(const LWGEOM *lwgeom); + +/** +* Deep clone an LWGEOM, everything is copied +*/ +extern LWGEOM *lwgeom_clone_deep(const LWGEOM *lwgeom); + +/* TODO Move to Internal */ +LWPOINT *lwpoint_clone(const LWPOINT *lwgeom); +POINTARRAY *ptarray_clone_deep(const POINTARRAY *ptarray); + + +/* +* Geometry constructors. These constructors to not copy the point arrays +* passed to them, they just take references, so do not free them out +* from underneath the geometries. +*/ +extern LWPOINT* lwpoint_construct(int srid, GBOX *bbox, POINTARRAY *point); +extern LWMPOINT *lwmpoint_construct(int srid, const POINTARRAY *pa); +extern LWLINE* lwline_construct(int srid, GBOX *bbox, POINTARRAY *points); +extern LWCIRCSTRING* lwcircstring_construct(int srid, GBOX *bbox, POINTARRAY *points); +extern LWPOLY* lwpoly_construct(int srid, GBOX *bbox, uint32_t nrings, POINTARRAY **points); +extern LWCURVEPOLY* lwcurvepoly_construct(int srid, GBOX *bbox, uint32_t nrings, LWGEOM **geoms); +extern LWTRIANGLE* lwtriangle_construct(int srid, GBOX *bbox, POINTARRAY *points); +extern LWCOLLECTION* lwcollection_construct(uint8_t type, int srid, GBOX *bbox, uint32_t ngeoms, LWGEOM **geoms); +/* +* Empty geometry constructors. +*/ +extern LWGEOM* lwgeom_construct_empty(uint8_t type, int srid, char hasz, char hasm); +extern LWPOINT* lwpoint_construct_empty(int srid, char hasz, char hasm); +extern LWLINE* lwline_construct_empty(int srid, char hasz, char hasm); +extern LWPOLY* lwpoly_construct_empty(int srid, char hasz, char hasm); +extern LWCURVEPOLY* lwcurvepoly_construct_empty(int srid, char hasz, char hasm); +extern LWCIRCSTRING* lwcircstring_construct_empty(int srid, char hasz, char hasm); +extern LWCOMPOUND* lwcompound_construct_empty(int srid, char hasz, char hasm); +extern LWTRIANGLE* lwtriangle_construct_empty(int srid, char hasz, char hasm); +extern LWMPOINT* lwmpoint_construct_empty(int srid, char hasz, char hasm); +extern LWMLINE* lwmline_construct_empty(int srid, char hasz, char hasm); +extern LWMPOLY* lwmpoly_construct_empty(int srid, char hasz, char hasm); +extern LWCOLLECTION* lwcollection_construct_empty(uint8_t type, int srid, char hasz, char hasm); + + +/* Other constructors */ +extern LWPOINT *lwpoint_make2d(int srid, double x, double y); +extern LWPOINT *lwpoint_make3dz(int srid, double x, double y, double z); +extern LWPOINT *lwpoint_make3dm(int srid, double x, double y, double m); +extern LWPOINT *lwpoint_make4d(int srid, double x, double y, double z, double m); +extern LWPOINT *lwpoint_make(int srid, int hasz, int hasm, const POINT4D *p); +extern LWLINE *lwline_from_lwgeom_array(int srid, uint32_t ngeoms, LWGEOM **geoms); +extern LWLINE *lwline_from_ptarray(int srid, uint32_t npoints, LWPOINT **points); /* TODO: deprecate */ +extern LWLINE *lwline_from_lwmpoint(int srid, LWMPOINT *mpoint); +extern LWLINE *lwline_addpoint(LWLINE *line, LWPOINT *point, uint32_t where); +extern LWLINE *lwline_removepoint(LWLINE *line, uint32_t which); +extern void lwline_setPoint4d(LWLINE *line, uint32_t which, POINT4D *newpoint); +extern LWPOLY *lwpoly_from_lwlines(const LWLINE *shell, uint32_t nholes, const LWLINE **holes); +extern LWTRIANGLE *lwtriangle_from_lwline(const LWLINE *shell); + + +/* Some point accessors */ +extern double lwpoint_get_x(const LWPOINT *point); +extern double lwpoint_get_y(const LWPOINT *point); +extern double lwpoint_get_z(const LWPOINT *point); +extern double lwpoint_get_m(const LWPOINT *point); + +/** +* Return SRID number +*/ +extern int32_t lwgeom_get_srid(const LWGEOM *geom); + +/** +* Return #LW_TRUE if geometry has Z ordinates +*/ +extern int lwgeom_has_z(const LWGEOM *geom); + +/** +* Return #LW_TRUE if geometry has M ordinates. +*/ +extern int lwgeom_has_m(const LWGEOM *geom); + +/** +* Return the number of dimensions (2, 3, 4) in a geometry +*/ +extern int lwgeom_ndims(const LWGEOM *geom); + +/* + * Given a point, returns the location of closest point on pointarray + * as a fraction of total length (0: first point -- 1: last point). + * + * If not-null, the third argument will be set to the actual distance + * of the point from the pointarray. + */ +extern double ptarray_locate_point(const POINTARRAY *pa, const POINT4D *pt, double *dist, POINT4D *p_located); + +/** +* Add a measure dimension to a line, interpolating linearly from the start +* to the end value. +*/ +extern LWLINE *lwline_measured_from_lwline(const LWLINE *lwline, double m_start, double m_end); +extern LWMLINE* lwmline_measured_from_lwmline(const LWMLINE *lwmline, double m_start, double m_end); + +/** +* Determine the location(s) along a measured line where m occurs and +* return as a multipoint. Offset to left (positive) or right (negative). +*/ +extern LWGEOM* lwgeom_locate_along(const LWGEOM *lwin, double m, double offset); + +/** +* Determine the segments along a measured line that fall within the m-range +* given. Return as a multiline or geometrycollection. +* Offset to left (positive) or right (negative). +*/ +extern LWCOLLECTION* lwgeom_locate_between(const LWGEOM *lwin, double from, double to, double offset); + +/** +* Find the measure value at the location on the line closest to the point. +*/ +extern double lwgeom_interpolate_point(const LWGEOM *lwin, const LWPOINT *lwpt); + +/* + * Ensure every segment is at most 'dist' long. + * Returned LWGEOM might is unchanged if a POINT. + */ +extern LWGEOM *lwgeom_segmentize2d(LWGEOM *line, double dist); +extern POINTARRAY *ptarray_segmentize2d(const POINTARRAY *ipa, double dist); +extern LWLINE *lwline_segmentize2d(LWLINE *line, double dist); +extern LWPOLY *lwpoly_segmentize2d(LWPOLY *line, double dist); +extern LWCOLLECTION *lwcollection_segmentize2d(LWCOLLECTION *coll, double dist); + +/** +* Calculate the GeoHash (http://geohash.org) string for a geometry. Caller must free. +*/ +char *lwgeom_geohash(const LWGEOM *lwgeom, int precision); + + +/** +* The return values of lwline_crossing_direction() +*/ +enum CG_LINE_CROSS_TYPE { + LINE_NO_CROSS = 0, + LINE_CROSS_LEFT = -1, + LINE_CROSS_RIGHT = 1, + LINE_MULTICROSS_END_LEFT = -2, + LINE_MULTICROSS_END_RIGHT = 2, + LINE_MULTICROSS_END_SAME_FIRST_LEFT = -3, + LINE_MULTICROSS_END_SAME_FIRST_RIGHT = 3 +}; + +/** +* Given two lines, characterize how (and if) they cross each other +*/ +int lwline_crossing_direction(const LWLINE *l1, const LWLINE *l2); + +/** +* Given a geometry clip based on the from/to range of one of its ordinates (x, y, z, m). Use for m- and z- clipping. +*/ +LWCOLLECTION* lwgeom_clip_to_ordinate_range(const LWGEOM *lwin, char ordinate, double from, double to, double offset); + +/* + * Export functions + */ +#define OUT_MAX_DOUBLE 1E15 +#define OUT_SHOW_DIGS_DOUBLE 20 +#define OUT_MAX_DOUBLE_PRECISION 15 +#define OUT_MAX_DIGS_DOUBLE (OUT_SHOW_DIGS_DOUBLE + 2) /* +2 mean add dot and sign */ + +/** + * Macros for specifying GML options. + * @{ + */ +/** For GML3 only, include srsDimension attribute in output */ +#define LW_GML_IS_DIMS (1<<0) +/** For GML3 only, declare that datas are lat/lon. Swaps axis order */ +#define LW_GML_IS_DEGREE (1<<1) +/** For GML3, use rather than for lines */ +#define LW_GML_SHORTLINE (1<<2) +/** For GML2 and GML3, output only extent of geometry */ +#define LW_GML_EXTENT (1<<4) + + +#define IS_DIMS(x) ((x) & LW_GML_IS_DIMS) +#define IS_DEGREE(x) ((x) & LW_GML_IS_DEGREE) +/** @} */ + +extern char* lwgeom_to_gml2(const LWGEOM *geom, const char *srs, int precision, const char *prefix); +extern char* lwgeom_extent_to_gml2(const LWGEOM *geom, const char *srs, int precision, const char *prefix); +/** + * @param opts output options bitfield, see LW_GML macros for meaning + */ +extern char* lwgeom_extent_to_gml3(const LWGEOM *geom, const char *srs, int precision, int opts, const char *prefix); +extern char* lwgeom_to_gml3(const LWGEOM *geom, const char *srs, int precision, int opts, const char *prefix); +extern char* lwgeom_to_kml2(const LWGEOM *geom, int precision, const char *prefix); +extern char* lwgeom_to_geojson(const LWGEOM *geo, char *srs, int precision, int has_bbox); +extern char* lwgeom_to_svg(const LWGEOM *geom, int precision, int relative); +extern char* lwgeom_to_x3d3(const LWGEOM *geom, char *srs, int precision, int opts, const char *defid); + +/** +* Initialize a spheroid object for use in geodetic functions. +*/ +extern void spheroid_init(SPHEROID *s, double a, double b); + +/** +* Calculate the geodetic distance from lwgeom1 to lwgeom2 on the spheroid. +* A spheroid with major axis == minor axis will be treated as a sphere. +* Pass in a tolerance in spheroid units. +*/ +extern double lwgeom_distance_spheroid(const LWGEOM *lwgeom1, const LWGEOM *lwgeom2, const SPHEROID *spheroid, double tolerance); + +/** +* Calculate the location of a point on a spheroid, give a start point, bearing and distance. +*/ +extern LWPOINT* lwgeom_project_spheroid(const LWPOINT *r, const SPHEROID *spheroid, double distance, double azimuth); + +/** +* Calculate the bearing between two points on a spheroid. +*/ +extern double lwgeom_azumith_spheroid(const LWPOINT *r, const LWPOINT *s, const SPHEROID *spheroid); + +/** +* Calculate the geodetic area of a lwgeom on the sphere. The result +* will be multiplied by the average radius of the supplied spheroid. +*/ +extern double lwgeom_area_sphere(const LWGEOM *lwgeom, const SPHEROID *spheroid); + +/** +* Calculate the geodetic area of a lwgeom on the spheroid. The result +* will have the squared units of the spheroid axes. +*/ +extern double lwgeom_area_spheroid(const LWGEOM *lwgeom, const SPHEROID *spheroid); + +/** +* Calculate the geodetic length of a lwgeom on the unit sphere. The result +* will have to by multiplied by the real radius to get the real length. +*/ +extern double lwgeom_length_spheroid(const LWGEOM *geom, const SPHEROID *s); + +/** +* Calculate covers predicate for two lwgeoms on the sphere. Currently +* only handles point-in-polygon. +*/ +extern int lwgeom_covers_lwgeom_sphere(const LWGEOM *lwgeom1, const LWGEOM *lwgeom2); + +/** +* Remove repeated points! +*/ +extern LWGEOM* lwgeom_remove_repeated_points(LWGEOM *in); + +extern char lwtriangle_is_repeated_points(LWTRIANGLE *triangle); + +/** +* Reverse the X and Y coordinate order. Useful for geometries in lat/lon order +* than need to be converted to lon/lat order. +*/ +extern LWGEOM* lwgeom_flip_coordinates(LWGEOM *in); + +/** +* Convert a single hex digit into the corresponding char +*/ +extern uint8_t parse_hex(char *str); + +/** +* Convert a char into a human readable hex digit +*/ +extern void deparse_hex(uint8_t str, char *result); + + + +/*********************************************************************** +** Functions for managing serialized forms and bounding boxes. +*/ + +/** +* Calculate the geocentric bounding box directly from the serialized +* form of the geodetic coordinates. Only accepts serialized geographies +* flagged as geodetic. Caller is responsible for disposing of the GBOX. +*/ +extern GBOX* gserialized_calculate_gbox_geocentric(const GSERIALIZED *g); + +/** +* Calculate the geocentric bounding box directly from the serialized +* form of the geodetic coordinates. Only accepts serialized geographies +* flagged as geodetic. +*/ +int gserialized_calculate_gbox_geocentric_p(const GSERIALIZED *g, GBOX *g_box); + +/** +* Return a WKT representation of the gserialized geometry. +* Caller is responsible for disposing of the char*. +*/ +extern char* gserialized_to_string(const GSERIALIZED *g); + +/** +* Return a copy of the input serialized geometry. +*/ +extern GSERIALIZED* gserialized_copy(const GSERIALIZED *g); + +/** +* Check that coordinates of LWGEOM are all within the geodetic range. +*/ +extern int lwgeom_check_geodetic(const LWGEOM *geom); + +/** +* Check that coordinates of LWGEOM are all within the geodetic range. +*/ +extern int lwgeom_nudge_geodetic(LWGEOM *geom); + +/** +* Set the FLAGS geodetic bit on geometry an all sub-geometries and pointlists +*/ +extern void lwgeom_set_geodetic(LWGEOM *geom, int value); + +/** +* Calculate the geodetic bounding box for an LWGEOM. Z/M coordinates are +* ignored for this calculation. Pass in non-null, geodetic bounding box for function +* to fill out. LWGEOM must have been built from a GSERIALIZED to provide +* double aligned point arrays. +*/ +extern int lwgeom_calculate_gbox_geodetic(const LWGEOM *geom, GBOX *gbox); + +/** +* Calculate the 2-4D bounding box of a geometry. Z/M coordinates are honored +* for this calculation, though for curves they are not included in calculations +* of curvature. +*/ +extern int lwgeom_calculate_gbox_cartesian(const LWGEOM *lwgeom, GBOX *gbox); + +/** +* Calculate bounding box of a geometry, automatically taking into account +* whether it is cartesian or geodetic. +*/ +extern int lwgeom_calculate_gbox(const LWGEOM *lwgeom, GBOX *gbox); + +/** +* New function to read doubles directly from the double* coordinate array +* of an aligned lwgeom #POINTARRAY (built by de-serializing a #GSERIALIZED). +*/ +extern int getPoint2d_p_ro(const POINTARRAY *pa, int n, POINT2D **point); + +/** +* Calculate geodetic (x/y/z) box and add values to gbox. Return #LW_SUCCESS on success. +*/ +extern int ptarray_calculate_gbox_geodetic(const POINTARRAY *pa, GBOX *gbox); + +/** +* Calculate box (x/y) and add values to gbox. Return #LW_SUCCESS on success. +*/ +extern int ptarray_calculate_gbox_cartesian(const POINTARRAY *pa, GBOX *gbox ); + +/** +* Calculate a spherical point that falls outside the geocentric gbox +*/ +void gbox_pt_outside(const GBOX *gbox, POINT2D *pt_outside); + +/** +* Create a new gbox with the dimensionality indicated by the flags. Caller +* is responsible for freeing. +*/ +extern GBOX* gbox_new(uint8_t flags); + +/** +* Zero out all the entries in the #GBOX. Useful for cleaning +* statically allocated gboxes. +*/ +extern void gbox_init(GBOX *gbox); + +/** +* Update the merged #GBOX to be large enough to include itself and the new box. +*/ +extern int gbox_merge(const GBOX *new_box, GBOX *merged_box); + +/** +* Update the output #GBOX to be large enough to include both inputs. +*/ +extern int gbox_union(const GBOX *g1, const GBOX *g2, GBOX *gout); + +/** +* Move the box minimums down and the maximums up by the distance provided. +*/ +extern void gbox_expand(GBOX *g, double d); + +/** +* Update the #GBOX to be large enough to include itself and the new point. +*/ +extern int gbox_merge_point3d(const POINT3D *p, GBOX *gbox); + +/** +* Return true if the point is inside the gbox +*/ +extern int gbox_contains_point3d(const GBOX *gbox, const POINT3D *pt); + +/** +* Allocate a string representation of the #GBOX, based on dimensionality of flags. +*/ +extern char* gbox_to_string(const GBOX *gbox); + +/** +* Return a copy of the #GBOX, based on dimensionality of flags. +*/ +extern GBOX* gbox_copy(const GBOX *gbox); + +/** +* Warning, do not use this function, it is very particular about inputs. +*/ +extern GBOX* gbox_from_string(const char *str); + +/** +* Return #LW_TRUE if the #GBOX overlaps, #LW_FALSE otherwise. +*/ +extern int gbox_overlaps(const GBOX *g1, const GBOX *g2); + +/** +* Return #LW_TRUE if the #GBOX overlaps on the 2d plane, #LW_FALSE otherwise. +*/ +extern int gbox_overlaps_2d(const GBOX *g1, const GBOX *g2); + +/** +* Copy the values of original #GBOX into duplicate. +*/ +extern void gbox_duplicate(const GBOX *original, GBOX *duplicate); + +/** +* Return the number of bytes necessary to hold a #GBOX of this dimension in +* serialized form. +*/ +extern size_t gbox_serialized_size(uint8_t flags); + +/** +* Check if 2 given Gbox are the same +*/ +extern int gbox_same(const GBOX *g1, const GBOX *g2); + +/** + * Round given GBOX to float boundaries + * + * This turns a GBOX into the version it would become + * after a serialize/deserialize round trip. + */ +extern void gbox_float_round(GBOX *gbox); + +/** +* Utility function to get type number from string. For example, a string 'POINTZ' +* would return type of 1 and z of 1 and m of 0. Valid +*/ +extern int geometry_type_from_string(const char *str, uint8_t *type, int *z, int *m); + +/** +* Calculate required memory segment to contain a serialized form of the LWGEOM. +* Primarily used internally by the serialization code. Exposed to allow the cunit +* tests to exercise it. +*/ +extern size_t gserialized_from_lwgeom_size(const LWGEOM *geom); + +/** +* Allocate a new #GSERIALIZED from an #LWGEOM. For all non-point types, a bounding +* box will be calculated and embedded in the serialization. The geodetic flag is used +* to control the box calculation (cartesian or geocentric). If set, the size pointer +* will contain the size of the final output, which is useful for setting the PgSQL +* VARSIZE information. +*/ +extern GSERIALIZED* gserialized_from_lwgeom(LWGEOM *geom, int is_geodetic, size_t *size); + +/** +* Allocate a new #LWGEOM from a #GSERIALIZED. The resulting #LWGEOM will have coordinates +* that are double aligned and suitable for direct reading using getPoint2d_p_ro +*/ +extern LWGEOM* lwgeom_from_gserialized(const GSERIALIZED *g); + +/** +* Pull a #GBOX from the header of a #GSERIALIZED, if one is available. If +* it is not, return LW_FAILURE. +*/ +extern int gserialized_get_gbox_p(const GSERIALIZED *g, GBOX *gbox); + + +/** + * Parser check flags + * + * @see lwgeom_from_wkb + * @see lwgeom_from_hexwkb + * @see lwgeom_parse_wkt + */ +#define LW_PARSER_CHECK_MINPOINTS 1 +#define LW_PARSER_CHECK_ODD 2 +#define LW_PARSER_CHECK_CLOSURE 4 +#define LW_PARSER_CHECK_ZCLOSURE 8 + +#define LW_PARSER_CHECK_NONE 0 +#define LW_PARSER_CHECK_ALL (LW_PARSER_CHECK_MINPOINTS | LW_PARSER_CHECK_ODD | LW_PARSER_CHECK_CLOSURE) + +/** + * Parser result structure: returns the result of attempting to convert + * (E)WKT/(E)WKB to LWGEOM + */ +typedef struct struct_lwgeom_parser_result +{ + const char *wkinput; /* Copy of pointer to input WKT/WKB */ + uint8_t *serialized_lwgeom; /* Pointer to serialized LWGEOM */ + int size; /* Size of serialized LWGEOM in bytes */ + LWGEOM *geom; /* Pointer to LWGEOM struct */ + const char *message; /* Error/warning message */ + int errcode; /* Error/warning number */ + int errlocation; /* Location of error */ + int parser_check_flags; /* Bitmask of validity checks run during this parse */ +} +LWGEOM_PARSER_RESULT; + +/* + * Parser error messages (these must match the message array in lwgparse.c) + */ +#define PARSER_ERROR_MOREPOINTS 1 +#define PARSER_ERROR_ODDPOINTS 2 +#define PARSER_ERROR_UNCLOSED 3 +#define PARSER_ERROR_MIXDIMS 4 +#define PARSER_ERROR_INVALIDGEOM 5 +#define PARSER_ERROR_INVALIDWKBTYPE 6 +#define PARSER_ERROR_INCONTINUOUS 7 +#define PARSER_ERROR_TRIANGLEPOINTS 8 +#define PARSER_ERROR_LESSPOINTS 9 +#define PARSER_ERROR_OTHER 10 + + + +/* + * Unparser result structure: returns the result of attempting to convert LWGEOM to (E)WKT/(E)WKB + */ +typedef struct struct_lwgeom_unparser_result +{ + uint8_t *serialized_lwgeom; /* Copy of pointer to input serialized LWGEOM */ + char *wkoutput; /* Pointer to WKT or WKB output */ + int size; /* Size of serialized LWGEOM in bytes */ + const char *message; /* Error/warning message */ + int errlocation; /* Location of error */ +} +LWGEOM_UNPARSER_RESULT; + +/* + * Unparser error messages (these must match the message array in lwgunparse.c) + */ +#define UNPARSER_ERROR_MOREPOINTS 1 +#define UNPARSER_ERROR_ODDPOINTS 2 +#define UNPARSER_ERROR_UNCLOSED 3 + + +/* +** Variants available for WKB and WKT output types +*/ + +#define WKB_ISO 0x01 +#define WKB_SFSQL 0x02 +#define WKB_EXTENDED 0x04 +#define WKB_NDR 0x08 +#define WKB_XDR 0x10 +#define WKB_HEX 0x20 +#define WKB_NO_NPOINTS 0x40 /* Internal use only */ +#define WKB_NO_SRID 0x80 /* Internal use only */ + +#define WKT_ISO 0x01 +#define WKT_SFSQL 0x02 +#define WKT_EXTENDED 0x04 + +/* +** New parsing and unparsing functions. +*/ + +/** +* @param lwgeom geometry to convert to WKT +* @param variant output format to use (WKT_ISO, WKT_SFSQL, WKT_EXTENDED) +*/ +extern char* lwgeom_to_wkt(const LWGEOM *geom, uint8_t variant, int precision, size_t *size_out); + +/** +* @param lwgeom geometry to convert to WKT +* @param variant output format to use +* (WKB_ISO, WKB_SFSQL, WKB_EXTENDED, WKB_NDR, WKB_XDR) +*/ +extern uint8_t* lwgeom_to_wkb(const LWGEOM *geom, uint8_t variant, size_t *size_out); + +/** +* @param lwgeom geometry to convert to HEXWKB +* @param variant output format to use +* (WKB_ISO, WKB_SFSQL, WKB_EXTENDED, WKB_NDR, WKB_XDR) +*/ +extern char* lwgeom_to_hexwkb(const LWGEOM *geom, uint8_t variant, size_t *size_out); + + +/** +* @param lwgeom geometry to convert to EWKT +*/ +extern char *lwgeom_to_ewkt(const LWGEOM *lwgeom); + +/** + * @param check parser check flags, see LW_PARSER_CHECK_* macros + */ +extern LWGEOM* lwgeom_from_wkb(const uint8_t *wkb, const size_t wkb_size, const char check); + +/** + * @param check parser check flags, see LW_PARSER_CHECK_* macros + */ +extern LWGEOM* lwgeom_from_wkt(const char *wkt, const char check); + +/** + * @param check parser check flags, see LW_PARSER_CHECK_* macros + */ +extern LWGEOM* lwgeom_from_hexwkb(const char *hexwkb, const char check); + +extern uint8_t* bytes_from_hexbytes(const char *hexbuf, size_t hexsize); + +extern char* hexbytes_from_bytes(uint8_t *bytes, size_t size); + +/* +* WKT detailed parsing support +*/ +extern int lwgeom_parse_wkt(LWGEOM_PARSER_RESULT *parser_result, char *wktstr, int parse_flags); +void lwgeom_parser_result_init(LWGEOM_PARSER_RESULT *parser_result); +void lwgeom_parser_result_free(LWGEOM_PARSER_RESULT *parser_result); + + +/* Memory management */ +extern void *lwalloc(size_t size); +extern void *lwrealloc(void *mem, size_t size); +extern void lwfree(void *mem); + +/* Utilities */ +extern void trim_trailing_zeros(char *num); +extern char *lwmessage_truncate(char *str, int startpos, int endpos, int maxlength, int truncdirection); + + +/******************************************************************************* + * SQLMM internal functions - TODO: Move into separate header files + ******************************************************************************/ + +int lwgeom_has_arc(const LWGEOM *geom); +double lwcircle_center(const POINT4D *p1, const POINT4D *p2, const POINT4D *p3, POINT4D *result); +LWGEOM *lwgeom_segmentize(LWGEOM *geom, uint32_t perQuad); +LWGEOM *lwgeom_desegmentize(LWGEOM *geom); + +/******************************************************************************* + * GEOS proxy functions on LWGEOM + ******************************************************************************/ + +/** Return GEOS version string (not to be freed) */ +const char* lwgeom_geos_version(void); + +/** Convert an LWGEOM to a GEOS Geometry and convert back -- for debug only */ +LWGEOM* lwgeom_geos_noop(const LWGEOM *geom) ; + +LWGEOM *lwgeom_normalize(const LWGEOM *geom); +LWGEOM *lwgeom_intersection(const LWGEOM *geom1, const LWGEOM *geom2); +LWGEOM *lwgeom_difference(const LWGEOM *geom1, const LWGEOM *geom2); +LWGEOM *lwgeom_symdifference(const LWGEOM* geom1, const LWGEOM* geom2); +LWGEOM *lwgeom_union(const LWGEOM *geom1, const LWGEOM *geom2); + +/** + * Snap vertices and segments of a geometry to another using a given tolerance. + * + * @param geom1 the geometry to snap + * @param geom2 the geometry to snap to + * @param tolerance the distance under which vertices and segments are snapped + * + * Requires GEOS-3.3.0+ + */ +LWGEOM* lwgeom_snap(const LWGEOM* geom1, const LWGEOM* geom2, double tolerance); + +/* + * Return the set of paths shared between two linear geometries, + * and their direction (same or opposite). + * + * @param geom1 a lineal geometry + * @param geom2 another lineal geometry + * + * Requires GEOS-3.3.0+ + */ +LWGEOM* lwgeom_sharedpaths(const LWGEOM* geom1, const LWGEOM* geom2); + +/* + * An offset curve against the input line. + * + * @param lwline a lineal geometry + * @param size offset distance. Offset left if negative and right if positive + * @param quadsegs number of quadrature segments in curves (try 8) + * @param joinStyle (1 = round, 2 = mitre, 3 = bevel) + * @param mitreLimit (try 5.0) + * @return derived geometry (linestring or multilinestring) + * + * Requires GEOS-3.2.0+ + */ +LWGEOM* lwgeom_offsetcurve(const LWLINE *lwline, double size, int quadsegs, int joinStyle, double mitreLimit); + + +/******************************************************************************* + * PROJ4-dependent extra functions on LWGEOM + ******************************************************************************/ + +/** + * Get a projection from a string representation + * + * Eg: "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs" + */ +projPJ lwproj_from_string(const char* txt); + +/** + * Transform (reproject) a geometry in-place. + * @param geom the geometry to transform + * @param inpj the input (or current, or source) projection + * @param outpj the output (or destination) projection + */ +int lwgeom_transform(LWGEOM *geom, projPJ inpj, projPJ outpj) ; +int ptarray_transform(POINTARRAY *geom, projPJ inpj, projPJ outpj) ; +int point4d_transform(POINT4D *pt, projPJ srcpj, projPJ dstpj) ; + + +/******************************************************************************* + * GEOS-dependent extra functions on LWGEOM + ******************************************************************************/ + +/** + * Take a geometry and return an areal geometry + * (Polygon or MultiPolygon). + * Actually a wrapper around GEOSpolygonize, + * transforming the resulting collection into + * a valid polygon Geometry. + */ +LWGEOM* lwgeom_buildarea(const LWGEOM *geom) ; + + +/** + * Attempts to make an invalid geometries valid w/out losing points. + */ +LWGEOM* lwgeom_make_valid(LWGEOM* geom); + +/* + * Split polygon by line, line by line, line by point. + * + * Returns all components as a collection. + * First element of the collection is always the part which + * remains after the cut, while the second element is the + * part which has been cut out. We arbitrarely take the part + * on the *right* of cut lines as the part which has been cut out. + * For a line cut by a point the part which remains is the one + * from start of the line to the cut point. + */ +LWGEOM* lwgeom_split(const LWGEOM* lwgeom_in, const LWGEOM* blade_in); + +/* + * Fully node a set of linestrings, using the least nodes preserving + * all the input ones. + * + * Requires GEOS-3.3.0 or higher + */ +LWGEOM* lwgeom_node(const LWGEOM* lwgeom_in); + +#endif /* !defined _LIBLWGEOM_H */ + diff -Nru postgis-1.5.3/liblwgeom/liblwgeom_internal.h postgis-2.0.1/liblwgeom/liblwgeom_internal.h --- postgis-1.5.3/liblwgeom/liblwgeom_internal.h 2009-09-14 20:30:35.000000000 +0000 +++ postgis-2.0.1/liblwgeom/liblwgeom_internal.h 2012-04-20 03:23:47.000000000 +0000 @@ -1,19 +1,367 @@ /********************************************************************** - * $Id: liblwgeom.h 4497 2009-09-14 18:33:54Z pramsey $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net - * Copyright 2001-2006 Refractions Research Inc. - * Copyright 2007-2008 Mark Cave-Ayland - * Copyright 2008 Paul Ramsey + * + * Copyright (C) 2011-2012 Sandro Santilli + * Copyright (C) 2011 Paul Ramsey + * Copyright (C) 2007-2008 Mark Cave-Ayland + * Copyright (C) 2001-2006 Refractions Research Inc. * * This is free software; you can redistribute and/or modify it under * the terms of the GNU General Public Licence. See the COPYING file. * **********************************************************************/ +#ifndef _LIBLWGEOM_INTERNAL_H +#define _LIBLWGEOM_INTERNAL_H 1 + +#include "../postgis_config.h" + #include +#include +#include +#include +#include + +#if HAVE_IEEEFP_H +#include +#endif #include "liblwgeom.h" +/** +* PI +*/ +#define PI 3.1415926535897932384626433832795 + + +/** +* Floating point comparitors. +*/ +#define FP_TOLERANCE 1e-12 +#define FP_IS_ZERO(A) (fabs(A) <= FP_TOLERANCE) +#define FP_MAX(A, B) (((A) > (B)) ? (A) : (B)) +#define FP_MIN(A, B) (((A) < (B)) ? (A) : (B)) +#define FP_ABS(a) ((a) < (0) ? -(a) : (a)) +#define FP_EQUALS(A, B) (fabs((A)-(B)) <= FP_TOLERANCE) +#define FP_NEQUALS(A, B) (fabs((A)-(B)) > FP_TOLERANCE) +#define FP_LT(A, B) (((A) + FP_TOLERANCE) < (B)) +#define FP_LTEQ(A, B) (((A) - FP_TOLERANCE) <= (B)) +#define FP_GT(A, B) (((A) - FP_TOLERANCE) > (B)) +#define FP_GTEQ(A, B) (((A) + FP_TOLERANCE) >= (B)) +#define FP_CONTAINS_TOP(A, X, B) (FP_LT(A, X) && FP_LTEQ(X, B)) +#define FP_CONTAINS_BOTTOM(A, X, B) (FP_LTEQ(A, X) && FP_LT(X, B)) +#define FP_CONTAINS_INCL(A, X, B) (FP_LTEQ(A, X) && FP_LTEQ(X, B)) +#define FP_CONTAINS_EXCL(A, X, B) (FP_LT(A, X) && FP_LT(X, B)) +#define FP_CONTAINS(A, X, B) FP_CONTAINS_EXCL(A, X, B) + +/** +* Largest float value. Should this be from math.h instead? +*/ +#ifndef MAXFLOAT +#define MAXFLOAT 3.402823466e+38F +#endif + +/* for the measure functions*/ +#define DIST_MAX -1 +#define DIST_MIN 1 + +/* +* this will change to NaN when I figure out how to +* get NaN in a platform-independent way +*/ +#define NO_VALUE 0.0 +#define NO_Z_VALUE NO_VALUE +#define NO_M_VALUE NO_VALUE + + +/** +* Well-Known Text (WKT) Output Variant Types +*/ +#define WKT_NO_TYPE 0x08 /* Internal use only */ +#define WKT_NO_PARENS 0x10 /* Internal use only */ +#define WKT_IS_CHILD 0x20 /* Internal use only */ + +/** +* Well-Known Binary (WKB) Output Variant Types +*/ + +#define WKB_DOUBLE_SIZE 8 /* Internal use only */ +#define WKB_INT_SIZE 4 /* Internal use only */ +#define WKB_BYTE_SIZE 1 /* Internal use only */ + +/** +* Well-Known Binary (WKB) Geometry Types +*/ +#define WKB_POINT_TYPE 1 +#define WKB_LINESTRING_TYPE 2 +#define WKB_POLYGON_TYPE 3 +#define WKB_MULTIPOINT_TYPE 4 +#define WKB_MULTILINESTRING_TYPE 5 +#define WKB_MULTIPOLYGON_TYPE 6 +#define WKB_GEOMETRYCOLLECTION_TYPE 7 +#define WKB_CIRCULARSTRING_TYPE 8 +#define WKB_COMPOUNDCURVE_TYPE 9 +#define WKB_CURVEPOLYGON_TYPE 10 +#define WKB_MULTICURVE_TYPE 11 +#define WKB_MULTISURFACE_TYPE 12 +#define WKB_CURVE_TYPE 13 /* from ISO draft, not sure is real */ +#define WKB_SURFACE_TYPE 14 /* from ISO draft, not sure is real */ +#define WKB_POLYHEDRALSURFACE_TYPE 15 +#define WKB_TIN_TYPE 16 +#define WKB_TRIANGLE_TYPE 17 + +/** +* Macro for reading the size from the GSERIALIZED size attribute. +* Cribbed from PgSQL, top 30 bits are size. Use VARSIZE() when working +* internally with PgSQL. +*/ +#define SIZE_GET(varsize) (((varsize) >> 2) & 0x3FFFFFFF) +#define SIZE_SET(varsize, size) (((varsize) & 0x00000003)|(((size) & 0x3FFFFFFF) << 2 )) + + +/* +* Internal prototypes +*/ + +/* Machine endianness */ +#define XDR 0 /* big endian */ +#define NDR 1 /* little endian */ +extern char getMachineEndian(void); + +/* Raise an lwerror if srids do not match */ +void error_if_srid_mismatch(int srid1, int srid2); + + +/* +* Force dims +*/ +LWGEOM* lwgeom_force_dims(const LWGEOM *lwgeom, int hasz, int hasm); +LWPOINT* lwpoint_force_dims(const LWPOINT *lwpoint, int hasz, int hasm); +LWLINE* lwline_force_dims(const LWLINE *lwline, int hasz, int hasm); +LWPOLY* lwpoly_force_dims(const LWPOLY *lwpoly, int hasz, int hasm); +LWCOLLECTION* lwcollection_force_dims(const LWCOLLECTION *lwcol, int hasz, int hasm); +POINTARRAY* ptarray_force_dims(const POINTARRAY *pa, int hasz, int hasm); + +/* +* Is Empty? +*/ +int lwpoly_is_empty(const LWPOLY *poly); +int lwcollection_is_empty(const LWCOLLECTION *col); +int lwcircstring_is_empty(const LWCIRCSTRING *circ); +int lwtriangle_is_empty(const LWTRIANGLE *triangle); +int lwline_is_empty(const LWLINE *line); +int lwpoint_is_empty(const LWPOINT *point); + +/* +* Number of vertices? +*/ +int lwline_count_vertices(LWLINE *line); +int lwpoly_count_vertices(LWPOLY *poly); +int lwcollection_count_vertices(LWCOLLECTION *col); + +/* +* Read from byte buffer +*/ +extern uint32_t lw_get_uint32_t(const uint8_t *loc); +extern int32_t lw_get_int32_t(const uint8_t *loc); + +/* +* DP simplification +*/ + +/** + * @param minpts minimun number of points to retain, if possible. + */ +POINTARRAY* ptarray_simplify(POINTARRAY *inpts, double epsilon, unsigned int minpts); +LWLINE* lwline_simplify(const LWLINE *iline, double dist); +LWPOLY* lwpoly_simplify(const LWPOLY *ipoly, double dist); +LWCOLLECTION* lwcollection_simplify(const LWCOLLECTION *igeom, double dist); + +/* +* Computational geometry +*/ +int signum(double n); + +/* +* The possible ways a pair of segments can interact. Returned by lw_segment_intersects +*/ +enum CG_SEGMENT_INTERSECTION_TYPE { + SEG_ERROR = -1, + SEG_NO_INTERSECTION = 0, + SEG_COLINEAR = 1, + SEG_CROSS_LEFT = 2, + SEG_CROSS_RIGHT = 3, + SEG_TOUCH_LEFT = 4, + SEG_TOUCH_RIGHT = 5 +}; + +/* +* Do the segments intersect? How? +*/ +int lw_segment_intersects(const POINT2D *p1, const POINT2D *p2, const POINT2D *q1, const POINT2D *q2); + +/* +* What side of the line formed by p1 and p2 does q fall? +* Returns < 0 for left and > 0 for right and 0 for co-linearity +*/ +double lw_segment_side(const POINT2D *p1, const POINT2D *p2, const POINT2D *q); + +/* +* Do the envelopes of the the segments intersect? +*/ +int lw_segment_envelope_intersects(const POINT2D *p1, const POINT2D *p2, const POINT2D *q1, const POINT2D *q2); + +/* +* Get/Set an enumeratoed ordinate. (x,y,z,m) +*/ +double lwpoint_get_ordinate(const POINT4D *p, char ordinate); +void lwpoint_set_ordinate(POINT4D *p, char ordinate, double value); + +/* +* Generate an interpolated coordinate p given an interpolation value and ordinate to apply it to +*/ +int point_interpolate(const POINT4D *p1, const POINT4D *p2, POINT4D *p, int hasz, int hasm, char ordinate, double interpolation_value); + + +/** +* Clip a line based on the from/to range of one of its ordinates. Use for m- and z- clipping +*/ +LWCOLLECTION *lwline_clip_to_ordinate_range(const LWLINE *line, char ordinate, double from, double to); + +/** +* Clip a multi-line based on the from/to range of one of its ordinates. Use for m- and z- clipping +*/ +LWCOLLECTION *lwmline_clip_to_ordinate_range(const LWMLINE *mline, char ordinate, double from, double to); + +/** +* Clip a multi-point based on the from/to range of one of its ordinates. Use for m- and z- clipping +*/ +LWCOLLECTION *lwmpoint_clip_to_ordinate_range(const LWMPOINT *mpoint, char ordinate, double from, double to); + +/** +* Clip a point based on the from/to range of one of its ordinates. Use for m- and z- clipping +*/ +LWCOLLECTION *lwpoint_clip_to_ordinate_range(const LWPOINT *mpoint, char ordinate, double from, double to); + +/* +* Geohash +*/ +int lwgeom_geohash_precision(GBOX bbox, GBOX *bounds); +char *geohash_point(double longitude, double latitude, int precision); + +/* +* Point comparisons +*/ +int p4d_same(const POINT4D *p1, const POINT4D *p2); +int p2d_same(const POINT2D *p1, const POINT2D *p2); + +/* +* Area calculations +*/ +double lwpoly_area(const LWPOLY *poly); +double lwcurvepoly_area(const LWCURVEPOLY *curvepoly); +double lwtriangle_area(const LWTRIANGLE *triangle); + +/** +* Pull a #GBOX from the header of a #GSERIALIZED, if one is available. If +* it is not, return LW_FAILURE. +*/ +extern int gserialized_read_gbox_p(const GSERIALIZED *g, GBOX *gbox); + +/* +* Length calculations +*/ +double lwcompound_length(const LWCOMPOUND *comp); +double lwcompound_length_2d(const LWCOMPOUND *comp); +double lwline_length(const LWLINE *line); +double lwline_length_2d(const LWLINE *line); +double lwcircstring_length(const LWCIRCSTRING *circ); +double lwcircstring_length_2d(const LWCIRCSTRING *circ); +double lwpoly_perimeter(const LWPOLY *poly); +double lwpoly_perimeter_2d(const LWPOLY *poly); +double lwcurvepoly_perimeter(const LWCURVEPOLY *poly); +double lwcurvepoly_perimeter_2d(const LWCURVEPOLY *poly); +double lwtriangle_perimeter(const LWTRIANGLE *triangle); +double lwtriangle_perimeter_2d(const LWTRIANGLE *triangle); + +/* +* Segmentization +*/ +LWLINE *lwcircstring_segmentize(const LWCIRCSTRING *icurve, uint32_t perQuad); +LWLINE *lwcompound_segmentize(const LWCOMPOUND *icompound, uint32_t perQuad); +LWPOLY *lwcurvepoly_segmentize(const LWCURVEPOLY *curvepoly, uint32_t perQuad); + +/* +* Affine +*/ +void ptarray_affine(POINTARRAY *pa, const AFFINE *affine); + +/* +* PointArray +*/ +char ptarray_isccw(const POINTARRAY *pa); +int ptarray_has_z(const POINTARRAY *pa); +int ptarray_has_m(const POINTARRAY *pa); + +/* +* Clone support +*/ +LWLINE *lwline_clone(const LWLINE *lwgeom); +LWPOLY *lwpoly_clone(const LWPOLY *lwgeom); +LWTRIANGLE *lwtriangle_clone(const LWTRIANGLE *lwgeom); +LWCOLLECTION *lwcollection_clone(const LWCOLLECTION *lwgeom); +LWCIRCSTRING *lwcircstring_clone(const LWCIRCSTRING *curve); +POINTARRAY *ptarray_clone(const POINTARRAY *ptarray); +GBOX *box2d_clone(const GBOX *lwgeom); +LWLINE *lwline_clone_deep(const LWLINE *lwgeom); +LWPOLY *lwpoly_clone_deep(const LWPOLY *lwgeom); +LWCOLLECTION *lwcollection_clone_deep(const LWCOLLECTION *lwgeom); + +/* + * Write into *ret the coordinates of the closest point on + * segment A-B to the reference input point R + */ +void closest_point_on_segment(const POINT4D *R, const POINT4D *A, const POINT4D *B, POINT4D *ret); + +/* +* Repeated points +*/ +POINTARRAY *ptarray_remove_repeated_points(POINTARRAY *in); +LWGEOM* lwmpoint_remove_repeated_points(LWMPOINT *in); +LWGEOM* lwline_remove_repeated_points(LWLINE *in); +LWGEOM* lwcollection_remove_repeated_points(LWCOLLECTION *in); +LWGEOM* lwpoly_remove_repeated_points(LWPOLY *in); + +/* +* Closure test +*/ +int lwline_is_closed(const LWLINE *line); +int lwpoly_is_closed(const LWPOLY *poly); +int lwcircstring_is_closed(const LWCIRCSTRING *curve); +int lwcompound_is_closed(const LWCOMPOUND *curve); +int lwpsurface_is_closed(const LWPSURFACE *psurface); +int lwtin_is_closed(const LWTIN *tin); + + +/* + * Split a line by a point and push components to the provided multiline. + * If the point doesn't split the line, push nothing to the container. + * Returns 0 if the point is off the line. + * Returns 1 if the point is on the line boundary (endpoints). + * Return 2 if the point is on the interior of the line (only case in which + * a split happens). + * + * NOTE: the components pushed to the output vector have their SRID stripped + */ +int lwline_split_by_point_to(const LWLINE* ln, const LWPOINT* pt, LWMLINE* to); + +/** Ensure the collection can hold at least up to ngeoms geometries */ +void lwcollection_reserve(LWCOLLECTION *col, int ngeoms); + +/** Check if subtype is allowed in collectiontype */ +extern int lwcollection_allows_subtype(int collectiontype, int subtype); + +#endif /* _LIBLWGEOM_INTERNAL_H */ diff -Nru postgis-1.5.3/liblwgeom/libtgeom.c postgis-2.0.1/liblwgeom/libtgeom.c --- postgis-1.5.3/liblwgeom/libtgeom.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/libtgeom.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,1179 @@ +/********************************************************************** + * $Id:$ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * Copyright 2010-2012 Olivier Courtin + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include +#include +#include + +#include "liblwgeom_internal.h" +#include "lwgeom_log.h" +#include "libtgeom.h" + + +/* + * Create a new empty tgeom struct + * Return a pointer on the newly allocated struct + */ +TGEOM* +tgeom_new(uint8_t type, int hasz, int hasm) +{ + TGEOM *tgeom; + + tgeom = lwalloc(sizeof(TGEOM)); + tgeom->type = type; + FLAGS_SET_Z(tgeom->flags, hasz); + FLAGS_SET_M(tgeom->flags, hasm); + tgeom->bbox=NULL; + tgeom->srid=0; + tgeom->nedges=0; + tgeom->maxedges=0; + tgeom->edges=NULL; + tgeom->maxfaces=0; + tgeom->nfaces=0; + tgeom->faces=NULL; + + return tgeom; +} + + +/* + * Check if a edge (start and end points) are or not already + * in a given tgeom. + * Return 0 if not in. + * Return positive index edge number if the edge is well oriented + * Return negative index edge number if the edge is reversed + */ +static int +tgeom_is_edge(const TGEOM *tgeom, const POINT4D *s, const POINT4D *e) +{ + int i, hasz, hasm; + POINT4D *p1, *p2; + + assert(tgeom); + assert(s); + assert(e); + + hasz = FLAGS_GET_Z(tgeom->flags); + hasm = FLAGS_GET_M(tgeom->flags); + + LWDEBUGF(3, "To check [%lf,%lf,%lf,%lf] -> [%lf,%lf,%lf,%lf]\n", + s->x, s->y, s->z, s->m, e->x, e->y, e->z, e->m); + + for (i=1 ; i <= tgeom->nedges ; i++) /* edges are 1 based */ + { + p1 = tgeom->edges[i]->s; + p2 = tgeom->edges[i]->e; + + LWDEBUGF(3, "[%i]/[%i] (%lf,%lf,%lf,%lf) -> (%lf,%lf,%lf,%lf)\n", + i, tgeom->nedges, + p1->x, p1->y, p1->z, p1->m, + p2->x, p2->y, p2->z, p2->m); + + /* X,Y,Z,M */ + if (hasz && hasm) + { + if ( p1->x == e->x && p1->y == e->y && p1->z == e->z && p1->m == e->m && + p2->x == s->x && p2->y == s->y && p2->z == s->z && p2->m == s->m) + return -i; + + if ( p1->x == s->x && p1->y == s->y && p1->z == s->z && p1->m == s->m && + p2->x == e->x && p2->y == e->y && p2->z == e->z && p2->m == e->m) + return i; + } + /* X,Y,Z */ + else if (hasz && !hasm) + { + if ( p1->x == e->x && p1->y == e->y && p1->z == e->z && + p2->x == s->x && p2->y == s->y && p2->z == s->z ) + return -i; + + if ( p1->x == s->x && p1->y == s->y && p1->z == s->z && + p2->x == e->x && p2->y == e->y && p2->z == e->z ) + return i; + } + /* X,Y,M */ + else if (!hasz && hasm) + { + if ( p1->x == e->x && p1->y == e->y && p1->m == e->m && + p2->x == s->x && p2->y == s->y && p2->m == s->m ) + return -i; + + if ( p1->x == s->x && p1->y == s->y && p1->m == s->m && + p2->x == e->x && p2->y == e->y && p2->m == e->m ) + return i; + } + else /*X,Y */ + { + if ( p1->x == e->x && p1->y == e->y && + p2->x == s->x && p2->y == s->y) + return -i; + + if ( p1->x == s->x && p1->y == s->y && + p2->x == e->x && p2->y == e->y) + return i; + } + } + + LWDEBUG(3, "Edge not found in array"); + + return 0; +} + + +/* + * Add an edge to a face in a tgeom + * Edge is describded as a starting and an ending point + * Points are really copied + * Return the new tgeom pointer + */ +static TGEOM* +tgeom_add_face_edge(TGEOM *tgeom, int face_id, POINT4D *s, POINT4D *e) +{ + int nedges, edge_id; + + assert(tgeom); + assert(s); + assert(e); + + edge_id = tgeom_is_edge(tgeom, s, e); + + if (edge_id) + { + tgeom->edges[abs(edge_id)]->count++; + LWDEBUGF(3, "face [%i] Founded Edge: %i\n", face_id, edge_id); + } + else + { + if ((tgeom->nedges + 1) == INT_MAX) + lwerror("tgeom_add_face_edge: Unable to alloc more than %i edges", INT_MAX); + + /* alloc edges array */ + if (tgeom->maxedges == 0) + { + tgeom->edges = (TEDGE**) lwalloc(sizeof(TEDGE*) * 4); + tgeom->maxedges = 4; + } + if (tgeom->maxedges <= (tgeom->nedges + 1)) + { + tgeom->edges = (TEDGE **) lwrealloc(tgeom->edges, + sizeof(TEDGE*) * tgeom->maxedges * 2); + tgeom->maxedges *= 2; + } + + edge_id = ++tgeom->nedges; /* edge_id is 1 based */ + tgeom->edges[edge_id] = (TEDGE*) lwalloc(sizeof(TEDGE)); + tgeom->edges[edge_id]->s = lwalloc(sizeof(POINT4D)); + tgeom->edges[edge_id]->e = lwalloc(sizeof(POINT4D)); + memcpy(tgeom->edges[edge_id]->s, s, sizeof(POINT4D)); + memcpy(tgeom->edges[edge_id]->e, e, sizeof(POINT4D)); + tgeom->edges[edge_id]->count = 1; + + LWDEBUGF(3, "face [%i] adding edge [%i] (%lf, %lf, %lf, %lf) -> (%lf, %lf, %lf, %lf)\n", + face_id, edge_id, s->x, s->y, s->z, s->m, e->x, e->y, e->z, e->m); + } + + nedges = tgeom->faces[face_id]->nedges; + if (tgeom->faces[face_id]->maxedges == 0) + { + tgeom->faces[face_id]->edges = (int *) lwalloc(sizeof(int) * 4); + tgeom->faces[face_id]->maxedges = 4; + } + if (tgeom->faces[face_id]->maxedges <= nedges +1) + { + tgeom->faces[face_id]->edges = (int *) lwrealloc(tgeom->faces[face_id]->edges, + sizeof(int) * tgeom->faces[face_id]->maxedges * 2); + tgeom->faces[face_id]->maxedges *= 2; + } + + LWDEBUGF(3, "face [%i] add %i in edge array in %i pos\n", face_id, edge_id, tgeom->faces[face_id]->nedges); + + + tgeom->faces[face_id]->edges[nedges]= edge_id; + tgeom->faces[face_id]->nedges++; + + return tgeom; +} + + +/* + * Add a LWPOLY inside a tgeom + * Copy geometries from LWPOLY + */ +static TGEOM* +tgeom_add_polygon(TGEOM *tgeom, LWPOLY *poly) +{ + int i; + + assert(tgeom); + assert(poly); + + if ((tgeom->nfaces + 1) == INT_MAX) + lwerror("tgeom_add_polygon: Unable to alloc more than %i faces", INT_MAX); + + /* Integrity checks on subgeom, dims and srid */ + if (tgeom->type != POLYHEDRALSURFACETYPE) + lwerror("tgeom_add_polygon: Unable to handle %s - %s type", + tgeom->type, lwtype_name(tgeom->type)); + + if (FLAGS_NDIMS(tgeom->flags) != FLAGS_NDIMS(poly->flags)) + lwerror("tgeom_add_polygon: Mixed dimension"); + + if (tgeom->srid != poly->srid && (tgeom->srid != 0 && poly->srid != SRID_UNKNOWN)) + lwerror("tgeom_add_polygon: Mixed srid. Tgeom: %i / Polygon: %i", + tgeom->srid, poly->srid); + + /* handle face array allocation */ + if (tgeom->maxfaces == 0) + { + tgeom->faces = lwalloc(sizeof(TFACE*) * 2); + tgeom->maxfaces = 2; + } + if ((tgeom->maxfaces - 1) == tgeom->nfaces) + { + tgeom->faces = lwrealloc(tgeom->faces, + sizeof(TFACE*) * tgeom->maxfaces * 2); + tgeom->maxfaces *= 2; + } + + /* add an empty face */ + tgeom->faces[tgeom->nfaces] = lwalloc(sizeof(TFACE)); + tgeom->faces[tgeom->nfaces]->rings = NULL; + tgeom->faces[tgeom->nfaces]->nrings = 0; + tgeom->faces[tgeom->nfaces]->nedges = 0; + tgeom->faces[tgeom->nfaces]->maxedges = 0; + + /* Compute edge on poly external ring */ + for (i=1 ; i < poly->rings[0]->npoints ; i++) + { + POINT4D p1, p2; + + getPoint4d_p(poly->rings[0], i-1, &p1); + getPoint4d_p(poly->rings[0], i, &p2); + tgeom_add_face_edge(tgeom, tgeom->nfaces, &p1, &p2); + } + + /* External ring is already handled by edges */ + tgeom->faces[tgeom->nfaces]->nrings = poly->nrings - 1; + + /* handle rings array allocation */ + if (tgeom->faces[tgeom->nfaces]->nrings >= 1) + tgeom->faces[tgeom->nfaces]->rings = lwalloc(sizeof(POINTARRAY*) + * tgeom->faces[tgeom->nfaces]->nrings); + + /* clone internal rings */ + for (i=0 ; i < tgeom->faces[tgeom->nfaces]->nrings ; i++) + tgeom->faces[tgeom->nfaces]->rings[i] = ptarray_clone_deep(poly->rings[i+1]); + + tgeom->nfaces++; + + return tgeom; +} + + +/* + * Add a LWTRIANGLE inside a tgeom + * Copy geometries from LWTRIANGLE + */ +static TGEOM* +tgeom_add_triangle(TGEOM *tgeom, LWTRIANGLE *triangle) +{ + int i; + + assert(tgeom); + assert(triangle); + + if ((tgeom->nfaces + 1) == INT_MAX) + lwerror("tgeom_add_triangle: Unable to alloc more than %i faces", INT_MAX); + + /* Integrity checks on subgeom, dims and srid */ + if (tgeom->type != TINTYPE) + lwerror("tgeom_add_triangle: Unable to handle %s - %s type", + tgeom->type, lwtype_name(tgeom->type)); + + if (FLAGS_NDIMS(tgeom->flags) != FLAGS_NDIMS(triangle->flags)) + lwerror("tgeom_add_triangle: Mixed dimension"); + + if (tgeom->srid != triangle->srid + && (tgeom->srid != 0 && triangle->srid != SRID_UNKNOWN)) + lwerror("tgeom_add_triangle: Mixed srid. Tgeom: %i / Triangle: %i", + tgeom->srid, triangle->srid); + + /* handle face array allocation */ + if (tgeom->maxfaces == 0) + { + tgeom->faces = lwalloc(sizeof(TFACE*) * 2); + tgeom->maxfaces = 2; + } + if ((tgeom->maxfaces - 1) <= tgeom->nfaces) + { + tgeom->faces = lwrealloc(tgeom->faces, + sizeof(TFACE*) * tgeom->maxfaces * 2); + tgeom->maxfaces *= 2; + } + + /* add an empty face */ + tgeom->faces[tgeom->nfaces] = lwalloc(sizeof(TFACE)); + tgeom->faces[tgeom->nfaces]->rings = NULL; + tgeom->faces[tgeom->nfaces]->nrings = 0; + tgeom->faces[tgeom->nfaces]->nedges = 0; + tgeom->faces[tgeom->nfaces]->maxedges = 0; + + /* Compute edge on triangle */ + for (i=1 ; i < triangle->points->npoints ; i++) + { + POINT4D p1, p2; + + getPoint4d_p(triangle->points, i-1, &p1); + getPoint4d_p(triangle->points, i, &p2); + + tgeom_add_face_edge(tgeom, tgeom->nfaces, &p1, &p2); + } + + tgeom->nfaces++; + + return tgeom; +} + + +/* + * Free a tgeom struct + * and even the geometries inside + */ +void +tgeom_free(TGEOM *tgeom) +{ + int i, j; + + assert(tgeom); + + /* bbox */ + if (tgeom->bbox) lwfree(tgeom->bbox); + + /* edges */ + for (i=1 ; i <= tgeom->nedges ; i++) + { + if (tgeom->edges[i]->e) lwfree(tgeom->edges[i]->e); + if (tgeom->edges[i]->s) lwfree(tgeom->edges[i]->s); + if (tgeom->edges[i]) lwfree(tgeom->edges[i]); + } + if (tgeom->edges) lwfree(tgeom->edges); + + /* faces */ + for (i=0 ; i < tgeom->nfaces ; i++) + { + /* edges array */ + if (tgeom->faces[i]->edges) + lwfree(tgeom->faces[i]->edges); + + /* rings */ + for (j=0 ; j < tgeom->faces[i]->nrings ; j++) + ptarray_free(tgeom->faces[i]->rings[j]); + if (tgeom->faces[i]->nrings) + lwfree(tgeom->faces[i]->rings); + + lwfree(tgeom->faces[i]); + } + if (tgeom->nfaces) lwfree(tgeom->faces); + + lwfree(tgeom); +} + + +/* + * Return a TSERIALIZED pointer from an LWGEOM + */ +TSERIALIZED* +tserialized_from_lwgeom(LWGEOM *lwgeom) +{ + assert(lwgeom); + + return tgeom_serialize(tgeom_from_lwgeom(lwgeom)); +} + + +/* + * Return a TGEOM pointer from an LWGEOM + * Caution: Geometries from LWGEOM are copied + */ +TGEOM* +tgeom_from_lwgeom(const LWGEOM *lwgeom) +{ + int i, solid; + LWTIN *tin; + LWPSURFACE *psurf; + TGEOM *tgeom = NULL; + + tgeom = tgeom_new(0, FLAGS_GET_Z(lwgeom->flags), FLAGS_GET_M(lwgeom->flags)); + + if (lwgeom->srid < 1) tgeom->srid = SRID_UNKNOWN; + else tgeom->srid = lwgeom->srid; + + + switch (lwgeom->type) + { + case TINTYPE: + tgeom->type = TINTYPE; + tin = (LWTIN *) lwgeom; + + for (i=0 ; i < tin->ngeoms ; i++) + tgeom = tgeom_add_triangle(tgeom, (LWTRIANGLE *) tin->geoms[i]); + + break; + + case POLYHEDRALSURFACETYPE: + tgeom->type = POLYHEDRALSURFACETYPE; + psurf = (LWPSURFACE *) lwgeom; + for (i=0 ; i < psurf->ngeoms ; i++) + tgeom = tgeom_add_polygon(tgeom, (LWPOLY *) psurf->geoms[i]); + + break; + + /* TODO handle COLLECTIONTYPE */ + + default: + lwerror("tgeom_from_lwgeom: unknown geometry type %i - %s", + tgeom->type, lwtype_name(tgeom->type)); + } + + if (tgeom->nedges == 0) { + FLAGS_SET_SOLID(tgeom->flags, 0); + FLAGS_SET_BBOX(tgeom->flags, 0); + return tgeom; /* empty is not a solid, neither need BBOX */ + } + + for (solid=1, i=1 ; i <= tgeom->nedges ; i++) + { + if (tgeom->edges[i]->count != 2) + { + LWDEBUGF(3, "no solid, edges: [%i], count: [%i] (%lf,%lf,%lf,%lf)->(%lf,%lf,%lf,%lf)\n", + i, tgeom->edges[i]->count, + tgeom->edges[i]->s->x, tgeom->edges[i]->s->y, + tgeom->edges[i]->s->z, tgeom->edges[i]->s->m, + tgeom->edges[i]->e->x, tgeom->edges[i]->e->y, + tgeom->edges[i]->e->z, tgeom->edges[i]->e->m); + + solid = 0; + break; + } + } + if (solid) FLAGS_SET_SOLID(tgeom->flags, 1); + else FLAGS_SET_SOLID(tgeom->flags, 0); + + /* compute bbox */ + tgeom->bbox = lwalloc(sizeof(BOX3D)); + for (i=1 ; i <= tgeom->nedges ; i++) { + + if (i == 1 || tgeom->edges[i]->s->x < tgeom->bbox->xmin) tgeom->bbox->xmin = tgeom->edges[i]->s->x; + if (tgeom->edges[i]->e->x < tgeom->bbox->xmin) tgeom->bbox->xmin = tgeom->edges[i]->e->x; + + if (i == 1 || tgeom->edges[i]->s->y < tgeom->bbox->ymin) tgeom->bbox->ymin = tgeom->edges[i]->s->y; + if (tgeom->edges[i]->e->y < tgeom->bbox->ymin) tgeom->bbox->ymin = tgeom->edges[i]->e->y; + + if (i == 1 || tgeom->edges[i]->s->z < tgeom->bbox->zmin) tgeom->bbox->zmin = tgeom->edges[i]->s->z; + if (tgeom->edges[i]->e->z < tgeom->bbox->zmin) tgeom->bbox->zmin = tgeom->edges[i]->e->z; + + if (i == 1 || tgeom->edges[i]->s->x > tgeom->bbox->xmax) tgeom->bbox->xmax = tgeom->edges[i]->s->x; + if (tgeom->edges[i]->e->x > tgeom->bbox->xmax) tgeom->bbox->xmax = tgeom->edges[i]->e->x; + + if (i == 1 || tgeom->edges[i]->s->y > tgeom->bbox->ymax) tgeom->bbox->ymax = tgeom->edges[i]->s->y; + if (tgeom->edges[i]->e->y > tgeom->bbox->ymax) tgeom->bbox->ymax = tgeom->edges[i]->e->y; + + if (i == 1 || tgeom->edges[i]->s->z > tgeom->bbox->zmax) tgeom->bbox->zmax = tgeom->edges[i]->s->z; + if (tgeom->edges[i]->e->z > tgeom->bbox->zmax) tgeom->bbox->zmax = tgeom->edges[i]->e->z; + } + + return tgeom; +} + + +/* + * Return a LWGEOM pointer from an TSERIALIZED struct + */ +LWGEOM* +lwgeom_from_tserialized(TSERIALIZED *t) +{ + assert(t); + + return lwgeom_from_tgeom(tgeom_deserialize(t)); +} + + +/* + * Return a LWGEOM pointer from an TGEOM struct + * Geometries are NOT copied + */ +LWGEOM* +lwgeom_from_tgeom(TGEOM *tgeom) +{ + int i, j, k; + LWGEOM *geom; + POINTARRAY *dpa; + POINTARRAY **ppa; + int hasz, hasm, edge_id; + int dims=0; + + assert(tgeom); + + hasz=FLAGS_GET_Z(tgeom->flags); + hasm=FLAGS_GET_M(tgeom->flags); + + geom = (LWGEOM *)lwcollection_construct_empty(COLLECTIONTYPE, tgeom->srid, hasz, hasm); + + switch (tgeom->type) + { + case TINTYPE: + geom->type = TINTYPE; + for (i=0 ; i < tgeom->nfaces ; i++) + { + FLAGS_SET_Z(dims, hasz?1:0); + FLAGS_SET_M(dims, hasm?1:0); + dpa = ptarray_construct_empty(hasz, hasm, 4); + FLAGS_SET_READONLY(dpa->flags, 0); + + for (j=0 ; j < tgeom->faces[i]->nedges ; j++) + { + edge_id = tgeom->faces[i]->edges[j]; + LWDEBUGF(3, "TIN edge_id: %i\n", edge_id); + + assert(edge_id); + if (edge_id > 0) + ptarray_append_point(dpa, tgeom->edges[edge_id]->s, LW_TRUE); + else + ptarray_append_point(dpa, tgeom->edges[-edge_id]->e, LW_TRUE); + } + + edge_id = tgeom->faces[i]->edges[0]; + LWDEBUGF(3, "TIN edge_id: %i\n", edge_id); + if (edge_id > 0) + ptarray_append_point(dpa, tgeom->edges[edge_id]->s, LW_TRUE); + else + ptarray_append_point(dpa, tgeom->edges[-edge_id]->e, LW_TRUE); + + geom = (LWGEOM *) lwtin_add_lwtriangle((LWTIN *) geom, + lwtriangle_construct(tgeom->srid, NULL, dpa)); + } + break; + + case POLYHEDRALSURFACETYPE: + geom->type = POLYHEDRALSURFACETYPE; + for (i=0 ; i < tgeom->nfaces ; i++) + { + FLAGS_SET_Z(dims, hasz?1:0); + FLAGS_SET_M(dims, hasm?1:0);; + dpa = ptarray_construct_empty(hasz, hasm, 4); + + for (j=0 ; j < tgeom->faces[i]->nedges ; j++) + { + edge_id = tgeom->faces[i]->edges[j]; + assert(edge_id); + LWDEBUGF(3, "POLYHEDRALSURFACE edge_id: %i\n", edge_id); + if (edge_id > 0) + ptarray_append_point(dpa, tgeom->edges[edge_id]->s, LW_TRUE); + else + ptarray_append_point(dpa, tgeom->edges[-edge_id]->e, LW_TRUE); + } + + edge_id = tgeom->faces[i]->edges[0]; + LWDEBUGF(3, "POLYHEDRALSURFACE edge_id: %i\n", edge_id); + if (edge_id > 0) + ptarray_append_point(dpa, tgeom->edges[edge_id]->s, LW_TRUE); + else + ptarray_append_point(dpa, tgeom->edges[-edge_id]->e, LW_TRUE); + + ppa = lwalloc(sizeof(POINTARRAY*) + * (tgeom->faces[i]->nrings + 1)); + ppa[0] = dpa; + for (k=0; k < tgeom->faces[i]->nrings ; k++) + ppa[k+1] = ptarray_clone_deep(tgeom->faces[i]->rings[k]); + + geom = (LWGEOM *) lwpsurface_add_lwpoly((LWPSURFACE *) geom, + lwpoly_construct(tgeom->srid, NULL, k + 1, ppa)); + } + break; + + default: + lwerror("lwgeom_from_tgeom: Unkwnown type %i - %s\n", + tgeom->type, lwtype_name(tgeom->type)); + } + + if (geom->srid == 0) geom->srid = SRID_UNKNOWN; + + return geom; +} + + +/* + * Compute the memory size needed to serialize + * a TGEOM struct + */ +static size_t +tgeom_serialize_size(const TGEOM *tgeom) +{ + int i,j; + size_t size; + int dims = FLAGS_NDIMS(tgeom->flags); + + size = sizeof(uint8_t); /* type */ + size += sizeof(uint8_t); /* flags */ + size += sizeof(uint32_t); /* srid */ + if (tgeom->bbox) size += sizeof(float) * 6; /* bbox */ + + size += sizeof(uint32_t); /* nedges */ + size += (sizeof(double) * dims * 2 + 4) * tgeom->nedges; /* edges */ + + size += sizeof(uint32_t); /* nfaces */ + for (i=0 ; i < tgeom->nfaces ; i++) + { + size += sizeof(uint32_t); /* nedges */ + size += sizeof(uint32_t) * tgeom->faces[i]->nedges; /* edges */ + + size += sizeof(uint32_t); /* nrings */ + for (j=0 ; j < tgeom->faces[i]->nrings ; j++) + { + size += sizeof(uint32_t); /* npoints */ + size += sizeof(double) * dims /* rings */ + * tgeom->faces[i]->rings[j]->npoints; + } + } + + return size; +} + + +/* + * Serialize a TGEOM to a buf + * retsize return by reference the allocated buf size + */ +static size_t +tgeom_serialize_buf(const TGEOM *tgeom, uint8_t *buf, size_t *retsize) +{ + int i,j; + float f; + size_t size=0; + uint8_t *loc=buf; + int dims = FLAGS_NDIMS(tgeom->flags); + uint8_t flags = tgeom->flags; + + assert(tgeom); + assert(buf); + + FLAGS_SET_BBOX(flags, tgeom->bbox?1:0); + + /* Write in the type. */ + memcpy(loc, &tgeom->type, sizeof(uint8_t)); + loc += 1; + size += 1; + + /* Write in the flags. */ + memcpy(loc, &flags, sizeof(uint8_t)); + loc += 1; + size += 1; + + /* Write in the srid. */ + memcpy(loc, &tgeom->srid, sizeof(uint32_t)); + loc += 4; + size += 4; + + /* Write in the bbox. */ + if (tgeom->bbox) + { + f = next_float_down(tgeom->bbox->xmin); + memcpy(loc, &f, sizeof(float)); + loc += sizeof(float); + + f = next_float_down(tgeom->bbox->ymin); + memcpy(loc, &f, sizeof(float)); + loc += sizeof(float); + + f = next_float_down(tgeom->bbox->zmin); + memcpy(loc, &f, sizeof(float)); + loc += sizeof(float); + + f = next_float_up(tgeom->bbox->xmax); + memcpy(loc, &f, sizeof(float)); + loc += sizeof(float); + + f = next_float_up(tgeom->bbox->ymax); + memcpy(loc, &f, sizeof(float)); + loc += sizeof(float); + + f = next_float_up(tgeom->bbox->zmax); + memcpy(loc, &f, sizeof(float)); + loc += sizeof(float); + + size += sizeof(float) * 6; + } + + /* Write in the number of edges (0 means EMPTY) */ + memcpy(loc, &tgeom->nedges, sizeof(uint32_t)); + loc += 4; + size += 4; + + /* Edges */ + for (i=1 ; i <= tgeom->nedges ; i++) + { + /* 3DM specific handle */ + if (!FLAGS_GET_Z(tgeom->flags) && FLAGS_GET_M(tgeom->flags)) + { + memcpy(loc, tgeom->edges[i]->s, 2 * sizeof(double)); + loc += sizeof(double) * 2; + memcpy(loc, &(tgeom->edges[i]->s->m), sizeof(double)); + loc += sizeof(double); + + memcpy(loc, tgeom->edges[i]->e, 2 * sizeof(double)); + loc += sizeof(double) * 2; + memcpy(loc, &(tgeom->edges[i]->e->m), sizeof(double)); + loc += sizeof(double); + } + else /* 2D, 3DZ && 4D */ + { + memcpy(loc, tgeom->edges[i]->s, dims * sizeof(double)); + loc += sizeof(double) * dims; + memcpy(loc, tgeom->edges[i]->e, dims * sizeof(double)); + loc += sizeof(double) * dims; + } + memcpy(loc, &tgeom->edges[i]->count, sizeof(uint32_t)); + loc += 4; + + size += sizeof(double) * dims * 2 + 4; + } + + /* Write in the number of faces */ + memcpy(loc, &tgeom->nfaces, sizeof(uint32_t)); + loc += 4; + size += 4; + + /* Faces */ + for (i=0 ; i < tgeom->nfaces ; i++) + { + /* Write in the number of edges */ + memcpy(loc, &tgeom->faces[i]->nedges, sizeof(uint32_t)); + loc += 4; + size += 4; + + /* Write in the edges array */ + memcpy(loc, tgeom->faces[i]->edges, + sizeof(uint32_t) * tgeom->faces[i]->nedges); + loc += 4 * tgeom->faces[i]->nedges; + size += 4 * tgeom->faces[i]->nedges; + + /* Write the number of rings */ + memcpy(loc, &tgeom->faces[i]->nrings, sizeof(uint32_t)); + loc += 4; + size += 4; + + for (j=0 ; j < tgeom->faces[i]->nrings ; j++) + { + /* Write the number of points */ + memcpy(loc, &tgeom->faces[i]->rings[j]->npoints, sizeof(uint32_t)); + loc += 4; + size += 4; + + /* Write the points */ + memcpy(loc, getPoint_internal(tgeom->faces[i]->rings[j], 0), + sizeof(double) * dims * tgeom->faces[i]->rings[j]->npoints); + loc += sizeof(double) * dims * tgeom->faces[i]->rings[j]->npoints; + size += sizeof(double) * dims * tgeom->faces[i]->rings[j]->npoints; + } + } + + if (retsize) *retsize = size; + + return (size_t) (loc - buf); +} + + +/* + * Serialize a tgeom struct and return a + * TSERIALIZED pointer + */ +TSERIALIZED * +tgeom_serialize(const TGEOM *tgeom) +{ + size_t size, retsize; + TSERIALIZED * t; + uint8_t *data; + size = tgeom_serialize_size(tgeom); + data = lwalloc(size); + tgeom_serialize_buf(tgeom, data, &retsize); + + if ( retsize != size ) + { + lwerror("tgeom_serialize_size returned %d, ..serialize_buf returned %d", + size, retsize); + } + + t = lwalloc(sizeof(TSERIALIZED)); + t->flags = tgeom->flags; + t->srid = tgeom->srid; + t->data = data; + + /* + * We are aping PgSQL code here, PostGIS code should use + * VARSIZE to set this for real. + */ + t->size = retsize << 2; + + return t; +} + + + +/* + * Deserialize a TSERIALIZED struct and + * return a TGEOM pointer + */ +TGEOM * +tgeom_deserialize(TSERIALIZED *serialized_form) +{ + uint8_t type, flags; + TGEOM *result; + uint8_t *loc, *data; + int i, j; + + assert(serialized_form); + assert(serialized_form->data); + + data = serialized_form->data; + + /* type and flags */ + type = data[0]; + flags = data[1]; + result = tgeom_new(type, FLAGS_GET_Z(flags), FLAGS_GET_M(flags)); + loc = data + 2; + + /* srid */ + result->srid = lw_get_int32_t(loc); + loc += 4; + + /* bbox */ + if (FLAGS_GET_BBOX(flags)) + { + result->bbox = lwalloc(sizeof(BOX3D)); + memcpy(&(result->bbox->xmin), loc, sizeof(float)); + loc += sizeof(float); + memcpy(&(result->bbox->ymin), loc, sizeof(float)); + loc += sizeof(float); + memcpy(&(result->bbox->zmin), loc, sizeof(float)); + loc += sizeof(float); + memcpy(&(result->bbox->xmax), loc, sizeof(float)); + loc += sizeof(float); + memcpy(&(result->bbox->ymax), loc, sizeof(float)); + loc += sizeof(float); + memcpy(&(result->bbox->zmax), loc, sizeof(float)); + loc += sizeof(float); + } + else result->bbox = NULL; + + /* edges number (0 means EMPTY) */ + result->nedges = lw_get_uint32_t(loc); + loc += 4; + + /* edges */ + result->edges = lwalloc(sizeof(TEDGE*) * (result->nedges + 1)); + for (i=1 ; i <= result->nedges ; i++) + { + result->edges[i] = lwalloc(sizeof(TEDGE)); + result->edges[i]->s = lwalloc(sizeof(POINT4D)); + result->edges[i]->e = lwalloc(sizeof(POINT4D)); + + /* 3DM specific handle */ + if (!FLAGS_GET_Z(result->flags) && FLAGS_GET_M(result->flags)) + { + memcpy(result->edges[i]->s, loc, sizeof(double) * 2); + loc += sizeof(double) * 2; + memcpy(&(result->edges[i]->s->m), loc, sizeof(double)); + loc += sizeof(double); + + memcpy(result->edges[i]->e, loc, sizeof(double) * 2); + loc += sizeof(double) * 2; + memcpy(&(result->edges[i]->e->m), loc, sizeof(double)); + loc += sizeof(double); + } + else /* 2D,3DZ && 4D */ + { + memcpy(result->edges[i]->s, loc, + sizeof(double) * FLAGS_NDIMS(flags)); + loc += sizeof(double) * FLAGS_NDIMS(flags); + + result->edges[i]->e = lwalloc(sizeof(POINT4D)); + memcpy(result->edges[i]->e, loc, + sizeof(double) * FLAGS_NDIMS(flags)); + loc += sizeof(double) * FLAGS_NDIMS(flags); + } + + result->edges[i]->count = lw_get_uint32_t(loc); + loc += 4; + } + + /* faces number */ + result->nfaces = lw_get_uint32_t(loc); + loc += 4; + + /* faces */ + result->faces = lwalloc(sizeof(TFACE*) * result->nfaces); + for (i=0 ; i < result->nfaces ; i++) + { + result->faces[i] = lwalloc(sizeof(TFACE)); + + /* number of edges */ + result->faces[i]->nedges = lw_get_uint32_t(loc); + loc += 4; + + /* edges array */ + result->faces[i]->edges = lwalloc(sizeof(TEDGE*) + * result->faces[i]->nedges); + memcpy(result->faces[i]->edges, loc, sizeof(int32_t) + * result->faces[i]->nedges); + loc += 4 * result->faces[i]->nedges; + + /* number of rings */ + result->faces[i]->nrings = lw_get_uint32_t(loc); + loc += 4; + + if (result->faces[i]->nrings) + result->faces[i]->rings = lwalloc(sizeof(POINTARRAY*) + * result->faces[i]->nrings); + + for (j=0 ; j < result->faces[i]->nrings ; j++) + { + int npoints; + + /* number of points */ + npoints = lw_get_uint32_t(loc); + loc += 4; + + /* pointarray */ + result->faces[i]->rings[j] = ptarray_construct_copy_data(FLAGS_GET_Z(flags), FLAGS_GET_M(flags), npoints, loc); + + loc += sizeof(double)* FLAGS_NDIMS(flags) * npoints; + } + } + + return result; +} + + +/* + * Indicate if an given LWGEOM is or not a solid + */ +int +lwgeom_is_solid(LWGEOM *lwgeom) +{ + int solid=0; + TGEOM *tgeom; + + assert(lwgeom); + + /* Obvious case who could'nt be solid */ + if (lwgeom->type != POLYHEDRALSURFACETYPE && lwgeom->type != TINTYPE) return 0; + if (!FLAGS_GET_Z(lwgeom->flags)) return 0; + + /* Use TGEOM convert to know */ + tgeom = tgeom_from_lwgeom(lwgeom); + solid = FLAGS_GET_SOLID(tgeom->flags); + tgeom_free(tgeom); + + return solid; +} + + +/* + * Compute 2D perimeter of a TGEOM + */ +double +tgeom_perimeter2d(TGEOM* tgeom) +{ + int i; + double hz, vt, bdy = 0.0; + + assert(tgeom); + + if (tgeom->type != POLYHEDRALSURFACETYPE && tgeom->type != TINTYPE) + lwerror("tgeom_perimeter2d called with wrong type: %i - %s", + tgeom->type, lwtype_name(tgeom->type)); + + /* Solid have a 0.0 length perimeter */ + if (FLAGS_GET_SOLID(tgeom->flags)) return bdy; + + for (i=1 ; i <= tgeom->nedges ; i++) + { + if (tgeom->edges[i]->count == 1) + { + hz = tgeom->edges[i]->s->x - tgeom->edges[i]->e->x; + vt = tgeom->edges[i]->s->y - tgeom->edges[i]->e->y; + bdy += sqrt(hz*hz + vt*vt); + } + } + + return bdy; +} + + +/* + * Compute 2D/3D perimeter of a TGEOM + */ +double +tgeom_perimeter(TGEOM* tgeom) +{ + int i; + double hz, vt, ht, bdy = 0.0; + + assert(tgeom); + + if (tgeom->type != POLYHEDRALSURFACETYPE && tgeom->type != TINTYPE) + lwerror("tgeom_perimeter called with wrong type: %i - %s", + tgeom->type, lwtype_name(tgeom->type)); + + /* Solid have a 0.0 length perimeter */ + if (FLAGS_GET_SOLID(tgeom->flags)) return bdy; + + /* If no Z use 2d function instead */ + if (!FLAGS_GET_Z(tgeom->flags)) return tgeom_perimeter2d(tgeom); + + for (i=1 ; i <= tgeom->nedges ; i++) + { + if (tgeom->edges[i]->count == 1) + { + hz = tgeom->edges[i]->s->x - tgeom->edges[i]->e->x; + vt = tgeom->edges[i]->s->y - tgeom->edges[i]->e->y; + ht = tgeom->edges[i]->s->z - tgeom->edges[i]->e->z; + bdy += sqrt(hz*hz + vt*vt + ht*ht); + } + } + + return bdy; +} + + +/* + * Print a TGEOM struct + * Debug purpose only + */ +void +printTGEOM(TGEOM *tgeom) +{ + int i,j; + + assert(tgeom); + + printf("TGEOM:\n"); + printf(" - type %i, %s\n", tgeom->type, lwtype_name(tgeom->type)); + printf(" - srid %i\n", tgeom->srid); + printf(" - nedges %i (max:%i)\n", tgeom->nedges, tgeom->maxedges); + printf(" - nfaces %i (max:%i)\n", tgeom->nfaces, tgeom->maxfaces); + printf(" => EDGES:\n"); + + for (i=1 ; i <= tgeom->nedges ; i++) + { + if (FLAGS_NDIMS(tgeom->flags) == 2) + printf(" [%i] (%lf,%lf) -> (%lf,%lf)\n", i, + tgeom->edges[i]->s->x, + tgeom->edges[i]->s->y, + tgeom->edges[i]->e->x, + tgeom->edges[i]->e->y); + else if (FLAGS_NDIMS(tgeom->flags) == 3) + printf(" [%i] (%lf,%lf,%lf) -> (%lf,%lf,%lf)\n", i, + tgeom->edges[i]->s->x, + tgeom->edges[i]->s->y, + tgeom->edges[i]->s->z, + tgeom->edges[i]->e->x, + tgeom->edges[i]->e->y, + tgeom->edges[i]->e->z); + else + printf(" [%i] (%lf,%lf,%lf,%lf) -> (%lf,%lf,%lf,%lf)\n", i, + tgeom->edges[i]->s->x, + tgeom->edges[i]->s->y, + tgeom->edges[i]->s->z, + tgeom->edges[i]->s->m, + tgeom->edges[i]->e->x, + tgeom->edges[i]->e->y, + tgeom->edges[i]->e->z, + tgeom->edges[i]->e->m); + } + + for (i=0 ; i < tgeom->nfaces ; i++) + { + printf(" => FACE [%i] nedges:%i nrings:%i\n", i, + tgeom->faces[i]->nedges, tgeom->faces[i]->nrings); + + for (j=0 ; j < tgeom->faces[i]->nedges ; j++) + { + int edge = tgeom->faces[i]->edges[j]; + printf(" -> EDGES [%i]{%i} ", j, edge); + + if (FLAGS_NDIMS(tgeom->flags) == 2) + { + if (tgeom->faces[i]->edges[j] > 0) + printf("(%lf,%lf) -> (%lf,%lf)\n", + tgeom->edges[edge]->s->x, + tgeom->edges[edge]->s->y, + tgeom->edges[edge]->e->x, + tgeom->edges[edge]->e->y); + else + printf("(%lf,%lf) -> (%lf,%lf)\n", + tgeom->edges[-edge]->e->x, + tgeom->edges[-edge]->e->y, + tgeom->edges[-edge]->s->x, + tgeom->edges[-edge]->s->y); + } + else if (FLAGS_NDIMS(tgeom->flags) == 3) + { + if (tgeom->faces[i]->edges[j] > 0) + printf("(%lf,%lf,%lf -> %lf,%lf,%lf)\n", + tgeom->edges[edge]->s->x, + tgeom->edges[edge]->s->y, + tgeom->edges[edge]->s->z, + tgeom->edges[edge]->e->x, + tgeom->edges[edge]->e->y, + tgeom->edges[edge]->e->z); + else + printf("(%lf,%lf,%lf -> %lf,%lf,%lf)\n", + tgeom->edges[-edge]->e->x, + tgeom->edges[-edge]->e->y, + tgeom->edges[-edge]->e->z, + tgeom->edges[-edge]->s->x, + tgeom->edges[-edge]->s->y, + tgeom->edges[-edge]->s->z); + } + else if (FLAGS_NDIMS(tgeom->flags) == 4) + { + if (tgeom->faces[i]->edges[j] > 0) + printf("(%lf,%lf,%lf,%lf -> %lf,%lf,%lf,%lf)\n", + tgeom->edges[edge]->s->x, + tgeom->edges[edge]->s->y, + tgeom->edges[edge]->s->z, + tgeom->edges[edge]->s->m, + tgeom->edges[edge]->e->x, + tgeom->edges[edge]->e->y, + tgeom->edges[edge]->e->z, + tgeom->edges[edge]->e->m); + else + printf("(%lf,%lf,%lf,%lf -> %lf,%lf,%lf,%lf)\n", + tgeom->edges[-edge]->e->x, + tgeom->edges[-edge]->e->y, + tgeom->edges[-edge]->e->z, + tgeom->edges[-edge]->e->m, + tgeom->edges[-edge]->s->x, + tgeom->edges[-edge]->s->y, + tgeom->edges[-edge]->s->z, + tgeom->edges[-edge]->s->m); + } + } + + for (j=0 ; j < tgeom->faces[i]->nrings ; j++) + { + printf(" - Ring[%i/%i]", j+1, tgeom->faces[i]->nrings); + printPA(tgeom->faces[i]->rings[j]); + } + } +} diff -Nru postgis-1.5.3/liblwgeom/libtgeom.h postgis-2.0.1/liblwgeom/libtgeom.h --- postgis-1.5.3/liblwgeom/libtgeom.h 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/libtgeom.h 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,76 @@ +/********************************************************************** + * $Id:$ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * Copyright 2010 Olivier Courtin + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#ifndef _LIBTGEOM_H +#define _LIBTGEOM_H 1 + +#include + +/** +* TSERIALIZED (mostly inspired by GSERIALIZED struct) +*/ +typedef struct +{ + uint32_t size; /* For PgSQL use only, use VAR* macros to manipulate. */ + uint32_t srid; /* SRID */ + uint8_t flags; /* HasZ, HasM, HasBBox, IsGeodetic, IsReadOnly, IsSolid */ + uint8_t *data; /* See tserialized.txt */ +} TSERIALIZED; + + + +typedef struct +{ + POINT4D *s; /* Edge starting point */ + POINT4D *e; /* Edge ending point */ + int count; /* Count how many time this edge is used in the TGEOM. + Caution: We don't care about edge orientation ! */ +} TEDGE; + +typedef struct +{ + uint32_t nedges; + uint32_t maxedges; + int32_t *edges; /* Array of edge index, a negative value + means that the edge is reversed */ + int32_t nrings; + POINTARRAY **rings; /* Internal rings array */ +} TFACE; + +typedef struct +{ + uint8_t type; + uint8_t flags; + uint32_t srid; /* 0 == unknown */ + BOX3D *bbox; /* NULL == unneeded */ + uint32_t nedges; + uint32_t maxedges; + TEDGE **edges; + uint32_t nfaces; + uint32_t maxfaces; + TFACE **faces; +} TGEOM; + +extern TGEOM* tgeom_new(uint8_t type, int hasz, int hasm); +extern void tgeom_free(TGEOM *tgeom); +extern TSERIALIZED* tserialized_from_lwgeom(LWGEOM *lwgeom); +extern TGEOM* tgeom_from_lwgeom(const LWGEOM *lwgeom); +extern LWGEOM* lwgeom_from_tserialized(TSERIALIZED *t); +extern LWGEOM* lwgeom_from_tgeom(TGEOM *tgeom); +extern int lwgeom_is_solid(LWGEOM *lwgeom); +TSERIALIZED * tgeom_serialize(const TGEOM *tgeom); +TGEOM * tgeom_deserialize(TSERIALIZED *serialized_form); +double tgeom_perimeter2d(TGEOM* tgeom); +double tgeom_perimeter(TGEOM* tgeom); +extern void printTGEOM(TGEOM *tgeom); + +#endif /* !defined _LIBTGEOM_H */ diff -Nru postgis-1.5.3/liblwgeom/lwalgorithm.c postgis-2.0.1/liblwgeom/lwalgorithm.c --- postgis-1.5.3/liblwgeom/lwalgorithm.c 2010-02-01 17:35:55.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwalgorithm.c 2012-02-27 22:08:12.000000000 +0000 @@ -1,5 +1,5 @@ /********************************************************************** - * $Id: lwalgorithm.c 5181 2010-02-01 17:35:55Z pramsey $ + * $Id: lwalgorithm.c 9324 2012-02-27 22:08:12Z pramsey $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net @@ -10,9 +10,19 @@ * **********************************************************************/ -#include "lwalgorithm.h" +#include "liblwgeom_internal.h" +#include "lwgeom_log.h" +/** +* Returns -1 if n < 0.0 and 1 if n > 0.0 +*/ +int signum(double n) +{ + if( n < 0 ) return -1; + if( n > 0 ) return 1; + return 0; +} /** ** lw_segment_side() @@ -33,18 +43,18 @@ int lw_segment_envelope_intersects(const POINT2D *p1, const POINT2D *p2, const POINT2D *q1, const POINT2D *q2) { - double minq=LW_MIN(q1->x,q2->x); - double maxq=LW_MAX(q1->x,q2->x); - double minp=LW_MIN(p1->x,p2->x); - double maxp=LW_MAX(p1->x,p2->x); + double minq=FP_MIN(q1->x,q2->x); + double maxq=FP_MAX(q1->x,q2->x); + double minp=FP_MIN(p1->x,p2->x); + double maxp=FP_MAX(p1->x,p2->x); if (FP_GT(minp,maxq) || FP_LT(maxp,minq)) return LW_FALSE; - minq=LW_MIN(q1->y,q2->y); - maxq=LW_MAX(q1->y,q2->y); - minp=LW_MIN(p1->y,p2->y); - maxp=LW_MAX(p1->y,p2->y); + minq=FP_MIN(q1->y,q2->y); + maxq=FP_MAX(q1->y,q2->y); + minp=FP_MIN(p1->y,p2->y); + maxp=FP_MAX(p1->y,p2->y); if (FP_GT(minp,maxq) || FP_LT(maxp,minq)) return LW_FALSE; @@ -155,7 +165,7 @@ ** LINE_MULTICROSS_END_SAME_FIRST_RIGHT = 3 ** */ -int lwline_crossing_direction(LWLINE *l1, LWLINE *l2) +int lwline_crossing_direction(const LWLINE *l1, const LWLINE *l2) { int i = 0, j = 0, rv = 0; POINT2D p1, p2, q1, q2; @@ -172,8 +182,8 @@ if ( pa1->npoints < 2 || pa2->npoints < 2 ) return LINE_NO_CROSS; - LWDEBUGF(4, "l1 = %s", lwgeom_to_ewkt((LWGEOM*)l1,0)); - LWDEBUGF(4, "l2 = %s", lwgeom_to_ewkt((LWGEOM*)l2,0)); + LWDEBUGF(4, "l1 = %s", lwgeom_to_ewkt((LWGEOM*)l1)); + LWDEBUGF(4, "l2 = %s", lwgeom_to_ewkt((LWGEOM*)l2)); /* Initialize first point of q */ rv = getPoint2d_p(pa2, 0, &q1); @@ -267,445 +277,7 @@ -/* -** lwpoint_get_ordinate(point, ordinate) => double -*/ -double lwpoint_get_ordinate(const POINT4D *p, int ordinate) -{ - if ( ! p ) - { - lwerror("Null input geometry."); - return 0.0; - } - - if ( ordinate > 3 || ordinate < 0 ) - { - lwerror("Cannot extract ordinate %d.", ordinate); - return 0.0; - } - - if ( ordinate == 3 ) - return p->m; - if ( ordinate == 2 ) - return p->z; - if ( ordinate == 1 ) - return p->y; - - return p->x; - -} -void lwpoint_set_ordinate(POINT4D *p, int ordinate, double value) -{ - if ( ! p ) - { - lwerror("Null input geometry."); - return; - } - - if ( ordinate > 3 || ordinate < 0 ) - { - lwerror("Cannot extract ordinate %d.", ordinate); - return; - } - - LWDEBUGF(4, " setting ordinate %d to %g", ordinate, value); - - switch ( ordinate ) - { - case 3: - p->m = value; - return; - case 2: - p->z = value; - return; - case 1: - p->y = value; - return; - case 0: - p->x = value; - return; - } -} - -int lwpoint_interpolate(const POINT4D *p1, const POINT4D *p2, POINT4D *p, int ndims, int ordinate, double interpolation_value) -{ - double p1_value = lwpoint_get_ordinate(p1, ordinate); - double p2_value = lwpoint_get_ordinate(p2, ordinate); - double proportion; - int i = 0; - - if ( ordinate < 0 || ordinate >= ndims ) - { - lwerror("Ordinate (%d) is not within ndims (%d).", ordinate, ndims); - return 0; - } - - if ( FP_MIN(p1_value, p2_value) > interpolation_value || - FP_MAX(p1_value, p2_value) < interpolation_value ) - { - lwerror("Cannot interpolate to a value (%g) not between the input points (%g, %g).", interpolation_value, p1_value, p2_value); - return 0; - } - - proportion = fabs((interpolation_value - p1_value) / (p2_value - p1_value)); - - for ( i = 0; i < ndims; i++ ) - { - double newordinate = 0.0; - p1_value = lwpoint_get_ordinate(p1, i); - p2_value = lwpoint_get_ordinate(p2, i); - newordinate = p1_value + proportion * (p2_value - p1_value); - lwpoint_set_ordinate(p, i, newordinate); - LWDEBUGF(4, " clip ordinate(%d) p1_value(%g) p2_value(%g) proportion(%g) newordinate(%g) ", i, p1_value, p2_value, proportion, newordinate ); - } - - return 1; -} - -LWCOLLECTION *lwmline_clip_to_ordinate_range(LWMLINE *mline, int ordinate, double from, double to) -{ - LWCOLLECTION *lwgeom_out = NULL; - - if ( ! mline ) - { - lwerror("Null input geometry."); - return NULL; - } - - if ( mline->ngeoms == 1) - { - lwgeom_out = lwline_clip_to_ordinate_range(mline->geoms[0], ordinate, from, to); - } - else - { - LWCOLLECTION *col; - char hasz = TYPE_HASZ(mline->type); - char hasm = TYPE_HASM(mline->type); - char hassrid = TYPE_HASSRID(mline->type); - int i, j; - char homogeneous = 1; - size_t geoms_size = 0; - lwgeom_out = lwcollection_construct_empty(mline->SRID, hasz, hasm); - lwgeom_out->type = lwgeom_makeType(hasz, hasm, hassrid, MULTILINETYPE); - for ( i = 0; i < mline->ngeoms; i ++ ) - { - col = lwline_clip_to_ordinate_range(mline->geoms[i], ordinate, from, to); - if ( col ) - { /* Something was left after the clip. */ - if ( lwgeom_out->ngeoms + col->ngeoms > geoms_size ) - { - geoms_size += 16; - if ( lwgeom_out->geoms ) - { - lwgeom_out->geoms = lwrealloc(lwgeom_out->geoms, geoms_size * sizeof(LWGEOM*)); - } - else - { - lwgeom_out->geoms = lwalloc(geoms_size * sizeof(LWGEOM*)); - } - } - for ( j = 0; j < col->ngeoms; j++ ) - { - lwgeom_out->geoms[lwgeom_out->ngeoms] = col->geoms[j]; - lwgeom_out->ngeoms++; - } - if ( TYPE_GETTYPE(col->type) != TYPE_GETTYPE(mline->type) ) - { - homogeneous = 0; - } - /* Shallow free the struct, leaving the geoms behind. */ - if ( col->bbox ) lwfree(col->bbox); - lwfree(col); - } - } - lwgeom_drop_bbox((LWGEOM*)lwgeom_out); - lwgeom_add_bbox((LWGEOM*)lwgeom_out); - if ( ! homogeneous ) - { - lwgeom_out->type = lwgeom_makeType(hasz, hasm, hassrid, COLLECTIONTYPE); - } - } - - if ( ! lwgeom_out || lwgeom_out->ngeoms == 0 ) /* Nothing left after clip. */ - { - return NULL; - } - - return lwgeom_out; - -} - - -/* -** lwline_clip_to_ordinate_range(line, ordinate, from, to) => lwmline -** -** Take in a LINESTRING and return a MULTILINESTRING of those portions of the -** LINESTRING between the from/to range for the specified ordinate (XYZM) -*/ -LWCOLLECTION *lwline_clip_to_ordinate_range(LWLINE *line, int ordinate, double from, double to) -{ - - POINTARRAY *pa_in = NULL; - LWCOLLECTION *lwgeom_out = NULL; - POINTARRAY *pa_out = NULL; - DYNPTARRAY *dp = NULL; - int i, rv; - int added_last_point = 0; - POINT4D *p = NULL, *q = NULL, *r = NULL; - double ordinate_value_p = 0.0, ordinate_value_q = 0.0; - char hasz = TYPE_HASZ(line->type); - char hasm = TYPE_HASM(line->type); - char dims = TYPE_NDIMS(line->type); - char hassrid = TYPE_HASSRID(line->type); - - LWDEBUGF(4, "hassrid = %d", hassrid); - - /* Null input, nothing we can do. */ - if ( ! line ) - { - lwerror("Null input geometry."); - return NULL; - } - - /* Ensure 'from' is less than 'to'. */ - if ( to < from ) - { - double t = from; - from = to; - to = t; - } - - LWDEBUGF(4, "from = %g, to = %g, ordinate = %d", from, to, ordinate); - LWDEBUGF(4, "%s", lwgeom_to_ewkt((LWGEOM*)line, PARSER_CHECK_NONE)); - - /* Asking for an ordinate we don't have. Error. */ - if ( ordinate >= dims ) - { - lwerror("Cannot clip on ordinate %d in a %d-d geometry.", ordinate, dims); - return NULL; - } - - /* Prepare our working point objects. */ - p = lwalloc(sizeof(POINT4D)); - q = lwalloc(sizeof(POINT4D)); - r = lwalloc(sizeof(POINT4D)); - - /* Construct a collection to hold our outputs. */ - lwgeom_out = lwalloc(sizeof(LWCOLLECTION)); - lwgeom_out->type = lwgeom_makeType(hasz, hasm, hassrid, MULTILINETYPE); - if (hassrid) - lwgeom_out->SRID = line->SRID; - else - lwgeom_out->SRID = -1; - lwgeom_out->bbox = NULL; - lwgeom_out->ngeoms = 0; - lwgeom_out->geoms = NULL; - - pa_in = (POINTARRAY*)line->points; - - for ( i = 0; i < pa_in->npoints; i++ ) - { - LWDEBUGF(4, "Point #%d", i); - if ( i > 0 ) - { - q->x = p->x; - q->y = p->y; - q->z = p->z; - q->m = p->m; - ordinate_value_q = ordinate_value_p; - } - rv = getPoint4d_p(pa_in, i, p); - ordinate_value_p = lwpoint_get_ordinate(p, ordinate); - LWDEBUGF(4, " ordinate_value_p %g (current)", ordinate_value_p); - LWDEBUGF(4, " ordinate_value_q %g (previous)", ordinate_value_q); - - /* Is this point inside the ordinate range? Yes. */ - if ( ordinate_value_p >= from && ordinate_value_p <= to ) - { - LWDEBUGF(4, " inside ordinate range (%g, %g)", from, to); - - if ( ! added_last_point ) - { - LWDEBUG(4," new ptarray required"); - /* We didn't add the previous point, so this is a new segment. - * Make a new point array. */ - if ( dp ) lwfree(dp); - dp = dynptarray_create(64, line->type); - - /* We're transiting into the range so add an interpolated - * point at the range boundary. - * If we're on a boundary and crossing from the far side, - * we also need an interpolated point. */ - if ( i > 0 && ( /* Don't try to interpolate if this is the first point */ - ( ordinate_value_p > from && ordinate_value_p < to ) || /* Inside */ - ( ordinate_value_p == from && ordinate_value_q > to ) || /* Hopping from above */ - ( ordinate_value_p == to && ordinate_value_q < from ) ) ) /* Hopping from below */ - { - double interpolation_value; - (ordinate_value_q > to) ? (interpolation_value = to) : (interpolation_value = from); - rv = lwpoint_interpolate(q, p, r, dims, ordinate, interpolation_value); - rv = dynptarray_addPoint4d(dp, r, 0); - LWDEBUGF(4, " interpolating between (%g, %g) with interpolation point (%g)", ordinate_value_q, ordinate_value_p, interpolation_value); - } - } - /* Add the current vertex to the point array. */ - rv = dynptarray_addPoint4d(dp, p, 0); - if ( ordinate_value_p == from || ordinate_value_p == to ) - { - added_last_point = 2; /* Added on boundary. */ - } - else - { - added_last_point = 1; /* Added inside range. */ - } - } - /* Is this point inside the ordinate range? No. */ - else - { - LWDEBUGF(4, " added_last_point (%d)", added_last_point); - if ( added_last_point == 1 ) - { - /* We're transiting out of the range, so add an interpolated point - * to the point array at the range boundary. */ - double interpolation_value; - (ordinate_value_p > to) ? (interpolation_value = to) : (interpolation_value = from); - rv = lwpoint_interpolate(q, p, r, dims, ordinate, interpolation_value); - rv = dynptarray_addPoint4d(dp, r, 0); - LWDEBUGF(4, " interpolating between (%g, %g) with interpolation point (%g)", ordinate_value_q, ordinate_value_p, interpolation_value); - } - else if ( added_last_point == 2 ) - { - /* We're out and the last point was on the boundary. - * If the last point was the near boundary, nothing to do. - * If it was the far boundary, we need an interpolated point. */ - if ( from != to && ( - (ordinate_value_q == from && ordinate_value_p > from) || - (ordinate_value_q == to && ordinate_value_p < to) ) ) - { - double interpolation_value; - (ordinate_value_p > to) ? (interpolation_value = to) : (interpolation_value = from); - rv = lwpoint_interpolate(q, p, r, dims, ordinate, interpolation_value); - rv = dynptarray_addPoint4d(dp, r, 0); - LWDEBUGF(4, " interpolating between (%g, %g) with interpolation point (%g)", ordinate_value_q, ordinate_value_p, interpolation_value); - } - } - else if ( i && ordinate_value_q < from && ordinate_value_p > to ) - { - /* We just hopped over the whole range, from bottom to top, - * so we need to add *two* interpolated points! */ - pa_out = ptarray_construct(hasz, hasm, 2); - /* Interpolate lower point. */ - rv = lwpoint_interpolate(p, q, r, dims, ordinate, from); - setPoint4d(pa_out, 0, r); - /* Interpolate upper point. */ - rv = lwpoint_interpolate(p, q, r, dims, ordinate, to); - setPoint4d(pa_out, 1, r); - } - else if ( i && ordinate_value_q > to && ordinate_value_p < from ) - { - /* We just hopped over the whole range, from top to bottom, - * so we need to add *two* interpolated points! */ - pa_out = ptarray_construct(hasz, hasm, 2); - /* Interpolate upper point. */ - rv = lwpoint_interpolate(p, q, r, dims, ordinate, to); - setPoint4d(pa_out, 0, r); - /* Interpolate lower point. */ - rv = lwpoint_interpolate(p, q, r, dims, ordinate, from); - setPoint4d(pa_out, 1, r); - } - /* We have an extant point-array, save it out to a multi-line. */ - if ( dp || pa_out ) - { - LWGEOM *oline; - LWDEBUG(4, "saving pointarray to multi-line (1)"); - if ( dp ) - { - /* Only one point, so we have to make an lwpoint to hold this - * and set the overall output type to a generic collection. */ - if ( dp->pa->npoints == 1 ) - { - oline = (LWGEOM*)lwpoint_construct(line->SRID, NULL, dp->pa); - oline->type = lwgeom_makeType(hasz, hasm, hassrid, POINTTYPE); - lwgeom_out->type = lwgeom_makeType(hasz, hasm, hassrid, COLLECTIONTYPE); - } - else - { - oline = (LWGEOM*)lwline_construct(line->SRID, NULL, dp->pa); - oline->type = lwgeom_makeType(hasz, hasm, hassrid, LINETYPE); - } - } - else - { - oline = (LWGEOM*)lwline_construct(line->SRID, NULL, pa_out); - } - lwgeom_out->ngeoms++; - if ( lwgeom_out->geoms ) /* We can't just realloc, since repalloc chokes on a starting null ptr. */ - { - lwgeom_out->geoms = lwrealloc(lwgeom_out->geoms, sizeof(LWGEOM*) * lwgeom_out->ngeoms); - } - else - { - lwgeom_out->geoms = lwalloc(sizeof(LWGEOM*) * lwgeom_out->ngeoms); - } - lwgeom_out->geoms[lwgeom_out->ngeoms - 1] = oline; - lwgeom_drop_bbox((LWGEOM*)lwgeom_out); - lwgeom_add_bbox((LWGEOM*)lwgeom_out); - if ( dp ) lwfree(dp); - dp = NULL; - if ( pa_out ) pa_out = NULL; - } - added_last_point = 0; - - } - } - - /* Still some points left to be saved out. */ - if ( dp && dp->pa->npoints > 0 ) - { - LWGEOM *oline; - LWDEBUG(4, "saving pointarray to multi-line (2)"); - LWDEBUGF(4, "dp->pa->npoints == %d", dp->pa->npoints); - LWDEBUGF(4, "lwgeom_out->ngeoms == %d", lwgeom_out->ngeoms); - - if ( dp->pa->npoints == 1 ) - { - oline = (LWGEOM*)lwpoint_construct(line->SRID, NULL, dp->pa); - oline->type = lwgeom_makeType(hasz, hasm, hassrid, POINTTYPE); - lwgeom_out->type = lwgeom_makeType(hasz, hasm, hassrid, COLLECTIONTYPE); - } - else - { - oline = (LWGEOM*)lwline_construct(line->SRID, NULL, dp->pa); - oline->type = lwgeom_makeType(hasz, hasm, hassrid, LINETYPE); - } - - lwgeom_out->ngeoms++; - if ( lwgeom_out->geoms ) /* We can't just realloc, since repalloc chokes on a starting null ptr. */ - { - lwgeom_out->geoms = lwrealloc(lwgeom_out->geoms, sizeof(LWGEOM*) * lwgeom_out->ngeoms); - } - else - { - lwgeom_out->geoms = lwalloc(sizeof(LWGEOM*) * lwgeom_out->ngeoms); - } - lwgeom_out->geoms[lwgeom_out->ngeoms - 1] = oline; - lwgeom_drop_bbox((LWGEOM*)lwgeom_out); - lwgeom_add_bbox((LWGEOM*)lwgeom_out); - if ( dp ) lwfree(dp); - dp = NULL; - } - - lwfree(p); - lwfree(q); - lwfree(r); - - if ( lwgeom_out->ngeoms > 0 ) - return lwgeom_out; - - return NULL; - -} static char *base32 = "0123456789bcdefghjkmnpqrstuvwxyz"; @@ -774,7 +346,7 @@ return geohash; } -int lwgeom_geohash_precision(BOX3D bbox, BOX3D *bounds) +int lwgeom_geohash_precision(GBOX bbox, GBOX *bounds) { double minx, miny, maxx, maxy; double latmax, latmin, lonmax, lonmin; @@ -861,33 +433,34 @@ */ char *lwgeom_geohash(const LWGEOM *lwgeom, int precision) { - BOX3D *bbox = NULL; - BOX3D precision_bounds; + GBOX gbox; + GBOX gbox_bounds; double lat, lon; + int result; - bbox = lwgeom_compute_box3d(lwgeom); - if ( ! bbox ) return NULL; + gbox_init(&gbox); + gbox_init(&gbox_bounds); + + result = lwgeom_calculate_gbox(lwgeom, &gbox); + if ( result == LW_FAILURE ) return NULL; /* Return error if we are being fed something outside our working bounds */ - if ( bbox->xmin < -180 || bbox->ymin < -90 || bbox->xmax > 180 || bbox->ymax > 90 ) + if ( gbox.xmin < -180 || gbox.ymin < -90 || gbox.xmax > 180 || gbox.ymax > 90 ) { lwerror("Geohash requires inputs in decimal degrees."); - lwfree(bbox); return NULL; } /* What is the center of our geometry bounds? We'll use that to ** approximate location. */ - lon = bbox->xmin + (bbox->xmax - bbox->xmin) / 2; - lat = bbox->ymin + (bbox->ymax - bbox->ymin) / 2; + lon = gbox.xmin + (gbox.xmax - gbox.xmin) / 2; + lat = gbox.ymin + (gbox.ymax - gbox.ymin) / 2; if ( precision <= 0 ) { - precision = lwgeom_geohash_precision(*bbox, &precision_bounds); + precision = lwgeom_geohash_precision(gbox, &gbox_bounds); } - lwfree(bbox); - /* ** Return the geohash of the center, with a precision determined by the ** extent of the bounds. diff -Nru postgis-1.5.3/liblwgeom/lwalgorithm.h postgis-2.0.1/liblwgeom/lwalgorithm.h --- postgis-1.5.3/liblwgeom/lwalgorithm.h 2009-11-30 20:52:16.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwalgorithm.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,52 +0,0 @@ -/********************************************************************** - * $Id: lwalgorithm.h 4948 2009-11-30 20:52:16Z pramsey $ - * - * PostGIS - Spatial Types for PostgreSQL - * http://postgis.refractions.net - * Copyright 2008 Paul Ramsey - * - * This is free software; you can redistribute and/or modify it under - * the terms of the GNU General Public Licence. See the COPYING file. - * - **********************************************************************/ - -#include -#include "liblwgeom_internal.h" - -enum CG_SEGMENT_INTERSECTION_TYPE { - SEG_ERROR = -1, - SEG_NO_INTERSECTION = 0, - SEG_COLINEAR = 1, - SEG_CROSS_LEFT = 2, - SEG_CROSS_RIGHT = 3, - SEG_TOUCH_LEFT = 4, - SEG_TOUCH_RIGHT = 5 -}; - -double lw_segment_side(const POINT2D *p1, const POINT2D *p2, const POINT2D *q); -int lw_segment_intersects(const POINT2D *p1, const POINT2D *p2, const POINT2D *q1, const POINT2D *q2); -int lw_segment_envelope_intersects(const POINT2D *p1, const POINT2D *p2, const POINT2D *q1, const POINT2D *q2); - - -enum CG_LINE_CROSS_TYPE { - LINE_NO_CROSS = 0, - LINE_CROSS_LEFT = -1, - LINE_CROSS_RIGHT = 1, - LINE_MULTICROSS_END_LEFT = -2, - LINE_MULTICROSS_END_RIGHT = 2, - LINE_MULTICROSS_END_SAME_FIRST_LEFT = -3, - LINE_MULTICROSS_END_SAME_FIRST_RIGHT = 3 -}; - -int lwline_crossing_direction(LWLINE *l1, LWLINE *l2); - -double lwpoint_get_ordinate(const POINT4D *p, int ordinate); -void lwpoint_set_ordinate(POINT4D *p, int ordinate, double value); -int lwpoint_interpolate(const POINT4D *p1, const POINT4D *p2, POINT4D *p, int ndims, int ordinate, double interpolation_value); -LWCOLLECTION *lwline_clip_to_ordinate_range(LWLINE *line, int ordinate, double from, double to); -LWCOLLECTION *lwmline_clip_to_ordinate_range(LWMLINE *mline, int ordinate, double from, double to); - -int lwgeom_geohash_precision(BOX3D bbox, BOX3D *bounds); -char *lwgeom_geohash(const LWGEOM *lwgeom, int precision); -char *geohash_point(double longitude, double latitude, int precision); - diff -Nru postgis-1.5.3/liblwgeom/lwcircstring.c postgis-2.0.1/liblwgeom/lwcircstring.c --- postgis-1.5.3/liblwgeom/lwcircstring.c 2011-06-24 03:51:11.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwcircstring.c 2012-02-27 22:08:12.000000000 +0000 @@ -1,9 +1,9 @@ /********************************************************************** - * $Id: lwcircstring.c 7464 2011-06-24 03:51:11Z pramsey $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net - * Copyright 2001-2006 Refractions Research Inc. + * + * Copyright (C) 2001-2006 Refractions Research Inc. * * This is free software; you can redistribute and/or modify it under * the terms of the GNU General Public Licence. See the COPYING file. @@ -15,30 +15,27 @@ #include #include #include -#include -#include "liblwgeom.h" -#include "lwalgorithm.h" +#include "liblwgeom_internal.h" +#include "lwgeom_log.h" -BOX3D *lwcircle_compute_box3d(POINT4D *p1, POINT4D *p2, POINT4D *p3); void printLWCIRCSTRING(LWCIRCSTRING *curve); void lwcircstring_reverse(LWCIRCSTRING *curve); void lwcircstring_release(LWCIRCSTRING *lwcirc); -LWCIRCSTRING *lwcircstring_segmentize2d(LWCIRCSTRING *curve, double dist); char lwcircstring_same(const LWCIRCSTRING *me, const LWCIRCSTRING *you); -LWCIRCSTRING *lwcircstring_from_lwpointarray(int SRID, unsigned int npoints, LWPOINT **points); -LWCIRCSTRING *lwcircstring_from_lwmpoint(int SRID, LWMPOINT *mpoint); -LWCIRCSTRING *lwcircstring_addpoint(LWCIRCSTRING *curve, LWPOINT *point, unsigned int where); -LWCIRCSTRING *lwcircstring_removepoint(LWCIRCSTRING *curve, unsigned int index); -void lwcircstring_setPoint4d(LWCIRCSTRING *curve, unsigned int index, POINT4D *newpoint); +LWCIRCSTRING *lwcircstring_from_lwpointarray(int srid, uint32_t npoints, LWPOINT **points); +LWCIRCSTRING *lwcircstring_from_lwmpoint(int srid, LWMPOINT *mpoint); +LWCIRCSTRING *lwcircstring_addpoint(LWCIRCSTRING *curve, LWPOINT *point, uint32_t where); +LWCIRCSTRING *lwcircstring_removepoint(LWCIRCSTRING *curve, uint32_t index); +void lwcircstring_setPoint4d(LWCIRCSTRING *curve, uint32_t index, POINT4D *newpoint); /* * Construct a new LWCIRCSTRING. points will *NOT* be copied - * use SRID=-1 for unknown SRID (will have 8bit type's S = 0) + * use SRID=SRID_UNKNOWN for unknown SRID (will have 8bit type's S = 0) */ LWCIRCSTRING * -lwcircstring_construct(int SRID, BOX2DFLOAT4 *bbox, POINTARRAY *points) +lwcircstring_construct(int srid, GBOX *bbox, POINTARRAY *points) { LWCIRCSTRING *result; @@ -49,716 +46,80 @@ */ if (points->npoints % 2 != 1 || points->npoints < 3) { - lwerror("lwcircstring_construct: invalid point count %d", points->npoints); - return NULL; + lwnotice("lwcircstring_construct: invalid point count %d", points->npoints); } result = (LWCIRCSTRING*) lwalloc(sizeof(LWCIRCSTRING)); - result->type = lwgeom_makeType_full( - TYPE_HASZ(points->dims), - TYPE_HASM(points->dims), - (SRID!=-1), CIRCSTRINGTYPE, 0); - result->SRID = SRID; + result->type = CIRCSTRINGTYPE; + + result->flags = points->flags; + FLAGS_SET_BBOX(result->flags, bbox?1:0); + + result->srid = srid; result->points = points; result->bbox = bbox; return result; } -void -lwcircstring_release(LWCIRCSTRING *lwcirc) -{ - lwgeom_release(lwcircstring_as_lwgeom(lwcirc)); -} - -/* - * given the LWGEOM serialized form (or a point into a multi* one) - * construct a proper LWCIRCSTRING. - * serialized_form should point to the 8bit type format (with type = 8) - * See serialized form doc - */ LWCIRCSTRING * -lwcircstring_deserialize(uchar *serialized_form) -{ - uchar type; - LWCIRCSTRING *result; - uchar *loc=NULL; - uint32 npoints; - POINTARRAY *pa; - - type = (uchar)serialized_form[0]; - if (lwgeom_getType(type) != CIRCSTRINGTYPE) - { - lwerror("lwcircstring_deserialize: attempt to deserialize a circularstring which is really a %s", lwgeom_typename(type)); - return NULL; - } - - result = (LWCIRCSTRING*) lwalloc(sizeof(LWCIRCSTRING)); - result->type = type; - - loc = serialized_form + 1; - - if (lwgeom_hasBBOX(type)) - { - LWDEBUG(3, "lwcircstring_deserialize: input has bbox"); - - result->bbox = lwalloc(sizeof(BOX2DFLOAT4)); - memcpy(result->bbox, loc, sizeof(BOX2DFLOAT4)); - loc += sizeof(BOX2DFLOAT4); - } - else - { - LWDEBUG(3, "lwcircstring_deserialize: input lacks bbox"); - - result->bbox = NULL; - } - - if (lwgeom_hasSRID(type)) - { - LWDEBUG(3, "lwcircstring_deserialize: input has srid"); - - result->SRID = lw_get_int32(loc); - loc += 4; /* type + SRID */ - } - else - { - LWDEBUG(3, "lwcircstring_deserialize: input lacks srid"); - - result->SRID = -1; - } - - /* we've read the type (1 byte) and SRID (4 bytes, if present) */ - - npoints = lw_get_uint32(loc); - - LWDEBUGF(3, "circstring npoints = %d", npoints); - - loc += 4; - pa = pointArray_construct(loc, TYPE_HASZ(type), TYPE_HASM(type), npoints); - result->points = pa; - return result; -} - -/* - * convert this circularstring into its serialized form - * result's first char will be the 8bit type. See serialized form doc - */ -uchar * -lwcircstring_serialize(LWCIRCSTRING *curve) +lwcircstring_construct_empty(int srid, char hasz, char hasm) { - size_t size, retsize; - uchar * result; - - if (curve == NULL) - { - lwerror("lwcircstring_serialize:: given null curve"); - return NULL; - } - - size = lwcircstring_serialize_size(curve); - result = lwalloc(size); - lwcircstring_serialize_buf(curve, result, &retsize); - if (retsize != size) - lwerror("lwcircstring_serialize_size returned %d, ..serialize_buf returned %d", size, retsize); + LWCIRCSTRING *result = lwalloc(sizeof(LWCIRCSTRING)); + result->type = CIRCSTRINGTYPE; + result->flags = gflags(hasz,hasm,0); + result->srid = srid; + result->points = ptarray_construct_empty(hasz, hasm, 1); + result->bbox = NULL; return result; } -/* - * convert this circularstring into its serialized form writing it into - * the given buffer, and returning number of bytes written into - * the given int pointer. - * result's first char will be the 8bit type. See serialized form doc - */ -void lwcircstring_serialize_buf(LWCIRCSTRING *curve, uchar *buf, size_t *retsize) -{ - char hasSRID; - uchar *loc; - int ptsize; - size_t size; - - LWDEBUGF(2, "lwcircstring_serialize_buf(%p, %p, %p) called", - curve, buf, retsize); - - if (curve == NULL) - { - lwerror("lwcircstring_serialize:: given null curve"); - return; - } - - if (TYPE_GETZM(curve->type) != TYPE_GETZM(curve->points->dims)) - { - lwerror("Dimensions mismatch in lwcircstring"); - return; - } - - ptsize = pointArray_ptsize(curve->points); - - hasSRID = (curve->SRID != -1); - - buf[0] = (uchar)lwgeom_makeType_full( - TYPE_HASZ(curve->type), TYPE_HASM(curve->type), - hasSRID, CIRCSTRINGTYPE, curve->bbox ? 1 : 0); - loc = buf+1; - - LWDEBUGF(3, "lwcircstring_serialize_buf added type (%d)", curve->type); - - if (curve->bbox) - { - memcpy(loc, curve->bbox, sizeof(BOX2DFLOAT4)); - loc += sizeof(BOX2DFLOAT4); - - LWDEBUG(3, "lwcircstring_serialize_buf added BBOX"); - } - - if (hasSRID) - { - memcpy(loc, &curve->SRID, sizeof(int32)); - loc += sizeof(int32); - - LWDEBUG(3, "lwcircstring_serialize_buf added SRID"); - } - - memcpy(loc, &curve->points->npoints, sizeof(uint32)); - loc += sizeof(uint32); - - LWDEBUGF(3, "lwcircstring_serialize_buf added npoints (%d)", - curve->points->npoints); - - /* copy in points */ - size = curve->points->npoints * ptsize; - memcpy(loc, getPoint_internal(curve->points, 0), size); - loc += size; - - LWDEBUGF(3, "lwcircstring_serialize_buf copied serialized_pointlist (%d bytes)", - ptsize * curve->points->npoints); - - if (retsize) *retsize = loc-buf; - - LWDEBUGF(3, "lwcircstring_serialize_buf returning (loc: %p, size: %d)", - loc, loc-buf); -} - -/* find length of this deserialized circularstring */ -size_t -lwcircstring_serialize_size(LWCIRCSTRING *curve) -{ - size_t size = 1; /* type */ - - LWDEBUG(2, "lwcircstring_serialize_size called"); - - if (curve->SRID != -1) size += 4; /* SRID */ - if (curve->bbox) size += sizeof(BOX2DFLOAT4); - - size += 4; /* npoints */ - size += pointArray_ptsize(curve->points) * curve->points->npoints; - - LWDEBUGF(3, "lwcircstring_serialize_size returning %d", size); - - return size; -} - - -static inline int signum(double n) -{ - if( n < 0 ) return -1; - if( n > 0 ) return 1; - return 0; -} - -/* -static int lwcircle_calculate_gbox_cartesian(const POINT4D *p1, const POINT4D *p2, const POINT4D *p3, GBOX *gbox) -*/ -BOX3D * -lwcircle_compute_box3d(POINT4D *p1, POINT4D *p2, POINT4D *p3) -{ - POINT2D xmin, ymin, xmax, ymax; - POINT4D *center = NULL; - int p2_side = 0; - double radius = 0.0; - - LWDEBUG(2, "lwcircle_compute_box3d called."); - - radius = lwcircle_center(p1, p2, p3, ¢er); - BOX3D *box = lwalloc(sizeof(BOX3D)); - - /* Negative radius signals straight line, p1/p2/p3 are colinear */ - if (radius < 0.0) - { - if ( center ) lwfree(center); - box->xmin = FP_MIN(p1->x, p3->x); - box->ymin = FP_MIN(p1->y, p3->y); - box->zmin = FP_MIN(p1->z, p3->z); - box->xmax = FP_MAX(p1->x, p3->x); - box->ymax = FP_MAX(p1->y, p3->y); - box->zmax = FP_MAX(p1->z, p3->z); - return box; - } - - /* Matched start/end points imply circle */ - if ( p1->x == p3->x && p1->y == p3->y ) - { - box->xmin = center->x - radius; - box->ymin = center->y - radius; - box->zmin = FP_MIN(p1->z,p2->z); - box->xmax = center->x + radius; - box->ymax = center->y + radius; - box->zmax = FP_MAX(p1->z,p2->z); - lwfree(center); - return box; - } - - /* First approximation, bounds of start/end points */ - box->xmin = FP_MIN(p1->x, p3->x); - box->ymin = FP_MIN(p1->y, p3->y); - box->zmin = FP_MIN(p1->z, p3->z); - box->xmax = FP_MAX(p1->x, p3->x); - box->ymax = FP_MAX(p1->y, p3->y); - box->zmax = FP_MAX(p1->z, p3->z); - - /* Create points for the possible extrema */ - xmin.x = center->x - radius; - xmin.y = center->y; - ymin.x = center->x; - ymin.y = center->y - radius; - xmax.x = center->x + radius; - xmax.y = center->y; - ymax.x = center->x; - ymax.y = center->y + radius; - - /* Divide the circle into two parts, one on each side of a line - joining p1 and p3. The circle extrema on the same side of that line - as p2 is on, are also the extrema of the bbox. */ - - p2_side = signum(lw_segment_side((POINT2D*)p1, (POINT2D*)p3, (POINT2D*)p2)); - - if ( p2_side == signum(lw_segment_side((POINT2D*)p1, (POINT2D*)p3, &xmin)) ) - box->xmin = xmin.x; - - if ( p2_side == signum(lw_segment_side((POINT2D*)p1, (POINT2D*)p3, &ymin)) ) - box->ymin = ymin.y; - - if ( p2_side == signum(lw_segment_side((POINT2D*)p1, (POINT2D*)p3, &xmax)) ) - box->xmax = xmax.x; - - if ( p2_side == signum(lw_segment_side((POINT2D*)p1, (POINT2D*)p3, &ymax)) ) - box->ymax = ymax.y; - - lwfree(center); - return box; -} - -#if 0 -BOX3D * -lwcircle_compute_box3d(POINT4D *p1, POINT4D *p2, POINT4D *p3) -{ - double x1, x2, y1, y2, z1, z2; - double angle, radius, sweep; - /* angles from center */ - double a1, a2, a3; - /* angles from center once a1 is rotated to zero */ - double r2, r3; - double xe = 0.0, ye = 0.0; - POINT4D *center; - int i; - BOX3D *box; - - LWDEBUG(2, "lwcircle_compute_box3d called."); - - radius = lwcircle_center(p1, p2, p3, ¢er); - if (radius < 0.0) - { - LWDEBUG(3, "lwcircle_compute_box3d: zero radius"); - - /* - * We've got a straight line here. Look to the end points for extents. - * It's worth noting that when lwcircle_center returns < 0, center hasn't been allocated. - */ - - x1 = (FP_LT(p1->x, p3->x)) ? p1->x : p3->x; - x2 = (FP_GT(p1->x, p3->x)) ? p1->x : p3->x; - y1 = (FP_LT(p1->y, p3->y)) ? p1->y : p3->y; - y2 = (FP_GT(p1->y, p3->y)) ? p1->y : p3->y; - z1 = (FP_LT(p1->z, p2->z)) ? p1->z : p2->z; - z1 = (FP_LT(z1, p3->z)) ? z1 : p3->z; - z2 = (FP_GT(p1->z, p2->z)) ? p1->z : p2->z; - z2 = (FP_GT(z2, p3->z)) ? z2 : p3->z; - - box = lwalloc(sizeof(BOX3D)); - box->xmin = x1; - box->xmax = x2; - box->ymin = y1; - box->ymax = y2; - box->zmin = z1; - box->zmax = z2; - - LWDEBUGF(3, "lwcircle_compute_box3d: extents %.16f %.16f %.16f, %.16f %.16f %.16f", x1, y1, z1, x2, y2, z2); - - return box; - } - - /* - top = center->y + radius; - left = center->x - radius; - - LWDEBUGF(3, "lwcircle_compute_box3d: center (%.16f, %.16f)", center->x, center->y); - */ - - x1 = MAXFLOAT; - x2 = -1 * MAXFLOAT; - y1 = MAXFLOAT; - y2 = -1 * MAXFLOAT; - - a1 = atan2(p1->y - center->y, p1->x - center->x); - a2 = atan2(p2->y - center->y, p2->x - center->x); - a3 = atan2(p3->y - center->y, p3->x - center->x); - - /* Rotate a2 and a3 such that a1 = 0 */ - r2 = a2 - a1; - r3 = a3 - a1; - - LWDEBUGF(4, "a1 %.16f, a2 %.16f, a3 %.16f", a1, a2, a3); - LWDEBUGF(4, "r2 %.16f, r3 %.16f", r2, r3); - - /* - * There are six cases here I'm interested in - * Clockwise: - * 1. a1-a2 < 180 == r2 < 0 && (r3 > 0 || r3 < r2) - * 2. a1-a2 > 180 == r2 > 0 && (r3 > 0 && r3 < r2) - * 3. a1-a2 > 180 == r2 > 0 && (r3 > r2 || r3 < 0) - * Counter-clockwise: - * 4. a1-a2 < 180 == r2 > 0 && (r3 < 0 || r3 > r2) - * 5. a1-a2 > 180 == r2 < 0 && (r3 < 0 && r3 > r2) - * 6. a1-a2 > 180 == r2 < 0 && (r3 < r2 || r3 > 0) - * 3 and 6 are invalid cases where a3 is the midpoint. - * BBOX is fundamental, so these cannot error out and will instead - * calculate the sweep using a3 as the middle point. - */ - - /* clockwise 1 */ - if (FP_LT(r2, 0) && (FP_GT(r3, 0) || FP_LT(r3, r2))) - { - sweep = (FP_GT(r3, 0)) ? (r3 - 2 * M_PI) : r3; - } - /* clockwise 2 */ - else if (FP_GT(r2, 0) && FP_GT(r3, 0) && FP_LT(r3, r2)) - { - sweep = (FP_GT(r3, 0)) ? (r3 - 2 * M_PI) : r3; - } - /* counter-clockwise 4 */ - else if (FP_GT(r2, 0) && (FP_LT(r3, 0) || FP_GT(r3, r2))) - { - sweep = (FP_LT(r3, 0)) ? (r3 + 2 * M_PI) : r3; - } - /* counter-clockwise 5 */ - else if (FP_LT(r2, 0) && FP_LT(r3, 0) && FP_GT(r3, r2)) - { - sweep = (FP_LT(r3, 0)) ? (r3 + 2 * M_PI) : r3; - } - /* clockwise invalid 3 */ - else if (FP_GT(r2, 0) && (FP_GT(r3, r2) || FP_LT(r3, 0))) - { - sweep = (FP_GT(r2, 0)) ? (r2 - 2 * M_PI) : r2; - } - /* clockwise invalid 6 */ - else - { - sweep = (FP_LT(r2, 0)) ? (r2 + 2 * M_PI) : r2; - } - - LWDEBUGF(3, "a1 %.16f, a2 %.16f, a3 %.16f, sweep %.16f", a1, a2, a3, sweep); - - angle = 0.0; - for (i=0; i < 6; i++) - { - switch (i) - { - /* right extent */ - case 0: - angle = 0.0; - xe = center->x + radius; - ye = center->y; - break; - /* top extent */ - case 1: - angle = M_PI_2; - xe = center->x; - ye = center->y + radius; - break; - /* left extent */ - case 2: - angle = M_PI; - xe = center->x - radius; - ye = center->y; - break; - /* bottom extent */ - case 3: - angle = -1 * M_PI_2; - xe = center->x; - ye = center->y - radius; - break; - /* first point */ - case 4: - angle = a1; - xe = p1->x; - ye = p1->y; - break; - /* last point */ - case 5: - angle = a3; - xe = p3->x; - ye = p3->y; - break; - } - /* determine if the extents are outside the arc */ - if (i < 4) - { - if (FP_GT(sweep, 0.0)) - { - if (FP_LT(a3, a1)) - { - if (FP_GT(angle, (a3 + 2 * M_PI)) || FP_LT(angle, a1)) continue; - } - else - { - if (FP_GT(angle, a3) || FP_LT(angle, a1)) continue; - } - } - else - { - if (FP_GT(a3, a1)) - { - if (FP_LT(angle, (a3 - 2 * M_PI)) || FP_GT(angle, a1)) continue; - } - else - { - if (FP_LT(angle, a3) || FP_GT(angle, a1)) continue; - } - } - } - - LWDEBUGF(3, "lwcircle_compute_box3d: potential extreame %d (%.16f, %.16f)", i, xe, ye); - - x1 = (FP_LT(x1, xe)) ? x1 : xe; - y1 = (FP_LT(y1, ye)) ? y1 : ye; - x2 = (FP_GT(x2, xe)) ? x2 : xe; - y2 = (FP_GT(y2, ye)) ? y2 : ye; - } - - LWDEBUGF(3, "lwcircle_compute_box3d: extreames found (%.16f %.16f, %.16f %.16f)", x1, y1, x2, y2); - - /* - x1 = center->x + x1 * radius; - x2 = center->x + x2 * radius; - y1 = center->y + y1 * radius; - y2 = center->y + y2 * radius; - */ - z1 = (FP_LT(p1->z, p2->z)) ? p1->z : p2->z; - z1 = (FP_LT(z1, p3->z)) ? z1 : p3->z; - z2 = (FP_GT(p1->z, p2->z)) ? p1->z : p2->z; - z2 = (FP_GT(z2, p3->z)) ? z2 : p3->z; - - box = lwalloc(sizeof(BOX3D)); - box->xmin = x1; - box->xmax = x2; - box->ymin = y1; - box->ymax = y2; - box->zmin = z1; - box->zmax = z2; - - lwfree(center); - - return box; -} -#endif - -/* - * Find bounding box (standard one) - * zmin=zmax=NO_Z_VALUE if 2d - * TODO: This ignores curvature, which should be taken into account. - */ -BOX3D * -lwcircstring_compute_box3d(LWCIRCSTRING *curve) +void +lwcircstring_release(LWCIRCSTRING *lwcirc) { - BOX3D *box, *tmp; - int i; - POINT4D *p1 = lwalloc(sizeof(POINT4D)); - POINT4D *p2 = lwalloc(sizeof(POINT4D)); - POINT4D *p3 = lwalloc(sizeof(POINT4D)); - - LWDEBUG(2, "lwcircstring_compute_box3d called."); - - /* initialize box values */ - box = lwalloc(sizeof(BOX3D)); - box->xmin = MAXFLOAT; - box->xmax = -1 * MAXFLOAT; - box->ymin = MAXFLOAT; - box->ymax = -1 * MAXFLOAT; - box->zmin = MAXFLOAT; - box->zmax = -1 * MAXFLOAT; - - for (i = 2; i < curve->points->npoints; i+=2) - { - getPoint4d_p(curve->points, i-2, p1); - getPoint4d_p(curve->points, i-1, p2); - getPoint4d_p(curve->points, i, p3); - tmp = lwcircle_compute_box3d(p1, p2, p3); - if (tmp == NULL) continue; - box->xmin = (box->xmin < tmp->xmin) ? box->xmin : tmp->xmin; - box->xmax = (box->xmax > tmp->xmax) ? box->xmax : tmp->xmax; - box->ymin = (box->ymin < tmp->ymin) ? box->ymin : tmp->ymin; - box->ymax = (box->ymax > tmp->ymax) ? box->ymax : tmp->ymax; - box->zmin = (box->zmin < tmp->zmin) ? box->zmin : tmp->zmin; - box->zmax = (box->zmax > tmp->zmax) ? box->zmax : tmp->zmax; - - LWDEBUGF(4, "circularstring %d x=(%.16f,%.16f) y=(%.16f,%.16f) z=(%.16f,%.16f)", i/2, box->xmin, box->xmax, box->ymin, box->ymax, box->zmin, box->zmax); - } - - return box; + lwgeom_release(lwcircstring_as_lwgeom(lwcirc)); } -int -lwcircstring_compute_box2d_p(LWCIRCSTRING *curve, BOX2DFLOAT4 *result) -{ - BOX3D *box = lwcircstring_compute_box3d(curve); - LWDEBUG(2, "lwcircstring_compute_box2d_p called."); - - if (box == NULL) return 0; - box3d_to_box2df_p(box, result); - return 1; -} - void lwcircstring_free(LWCIRCSTRING *curve) { - lwfree(curve->points); + if ( ! curve ) return; + + if ( curve->bbox ) + lwfree(curve->bbox); + if ( curve->points ) + ptarray_free(curve->points); lwfree(curve); } -/* find length of this serialized curve */ -size_t -lwgeom_size_circstring(const uchar *serialized_curve) -{ - int type = (uchar)serialized_curve[0]; - uint32 result = 1; /* type */ - const uchar *loc; - uint32 npoints; - - LWDEBUG(2, "lwgeom_size_circstring called"); - - if (lwgeom_getType(type) != CIRCSTRINGTYPE) - lwerror("lwgeom_size_circstring::attempt to find the length of a non-circularstring"); - - loc = serialized_curve + 1; - if (lwgeom_hasBBOX(type)) - { - loc += sizeof(BOX2DFLOAT4); - result += sizeof(BOX2DFLOAT4); - } - - if (lwgeom_hasSRID(type)) - { - loc += 4; /* type + SRID */ - result += 4; - } - - /* we've read the type (1 byte) and SRID (4 bytes, if present) */ - npoints = lw_get_uint32(loc); - result += sizeof(uint32); /* npoints */ - result += TYPE_NDIMS(type) * sizeof(double) * npoints; - - LWDEBUGF(3, "lwgeom_size_circstring returning %d", result); - - return result; -} void printLWCIRCSTRING(LWCIRCSTRING *curve) { lwnotice("LWCIRCSTRING {"); - lwnotice(" ndims = %i", (int)TYPE_NDIMS(curve->type)); - lwnotice(" SRID = %i", (int)curve->SRID); + lwnotice(" ndims = %i", (int)FLAGS_NDIMS(curve->flags)); + lwnotice(" srid = %i", (int)curve->srid); printPA(curve->points); lwnotice("}"); } -/* Clone LWCIRCSTRING object. POINTARRAY is not copied. */ +/* @brief Clone LWCIRCSTRING object. Serialized point lists are not copied. + * + * @see ptarray_clone + */ LWCIRCSTRING * lwcircstring_clone(const LWCIRCSTRING *g) { - LWCIRCSTRING *ret = lwalloc(sizeof(LWCIRCSTRING)); - memcpy(ret, g, sizeof(LWCIRCSTRING)); - if (g->bbox) ret->bbox = box2d_clone(g->bbox); - return ret; + return (LWCIRCSTRING *)lwline_clone((LWLINE *)g); } -/* - * Add 'what' to this curve at position 'where'. - * where=0 == prepend - * where=-1 == append - * Returns a MULTICURVE or a GEOMETRYCOLLECTION - */ -LWGEOM * -lwcircstring_add(const LWCIRCSTRING *to, uint32 where, const LWGEOM *what) -{ - LWCOLLECTION *col; - LWGEOM **geoms; - int newtype; - - if (where != -1 && where != 0) - { - lwerror("lwcurve_add only supports 0 or -1 as second argument %d", where); - return NULL; - } - - /* dimensions compatibility are checked by caller */ - - /* Construct geoms array */ - geoms = lwalloc(sizeof(LWGEOM *)*2); - if (where == -1) /* append */ - { - geoms[0] = lwgeom_clone((LWGEOM *)to); - geoms[1] = lwgeom_clone(what); - } - else /* prepend */ - { - geoms[0] = lwgeom_clone(what); - geoms[1] = lwgeom_clone((LWGEOM *)to); - } - - /* reset SRID and wantbbox flag from component types */ - geoms[0]->SRID = geoms[1]->SRID = -1; - TYPE_SETHASSRID(geoms[0]->type, 0); - TYPE_SETHASSRID(geoms[1]->type, 0); - TYPE_SETHASBBOX(geoms[0]->type, 0); - TYPE_SETHASBBOX(geoms[1]->type, 0); - - /* Find appropriate geom type */ - if (TYPE_GETTYPE(what->type) == CIRCSTRINGTYPE || TYPE_GETTYPE(what->type) == LINETYPE) newtype = MULTICURVETYPE; - else newtype = COLLECTIONTYPE; - - col = lwcollection_construct(newtype, - to->SRID, NULL, - 2, geoms); - - return (LWGEOM *)col; -} void lwcircstring_reverse(LWCIRCSTRING *curve) { ptarray_reverse(curve->points); } -/* - * TODO: Invalid segmentization. This should accomodate the curvature. - */ -LWCIRCSTRING * -lwcircstring_segmentize2d(LWCIRCSTRING *curve, double dist) -{ - return lwcircstring_construct(curve->SRID, NULL, - ptarray_segmentize2d(curve->points, dist)); -} - /* check coordinate equality */ char lwcircstring_same(const LWCIRCSTRING *me, const LWCIRCSTRING *you) @@ -771,12 +132,12 @@ * LWCIRCSTRING dimensions are large enough to host all input dimensions. */ LWCIRCSTRING * -lwcircstring_from_lwpointarray(int SRID, unsigned int npoints, LWPOINT **points) +lwcircstring_from_lwpointarray(int srid, uint32_t npoints, LWPOINT **points) { int zmflag=0; - unsigned int i; + uint32_t i; POINTARRAY *pa; - uchar *newpoints, *ptr; + uint8_t *newpoints, *ptr; size_t ptsize, size; /* @@ -784,14 +145,14 @@ */ for (i = 0; i < npoints; i++) { - if (TYPE_GETTYPE(points[i]->type) != POINTTYPE) + if (points[i]->type != POINTTYPE) { lwerror("lwcurve_from_lwpointarray: invalid input type: %s", - lwgeom_typename(TYPE_GETTYPE(points[i]->type))); + lwtype_name(points[i]->type)); return NULL; } - if (TYPE_HASZ(points[i]->type)) zmflag |= 2; - if (TYPE_HASM(points[i]->type)) zmflag |=1; + if (FLAGS_GET_Z(points[i]->flags)) zmflag |= 2; + if (FLAGS_GET_M(points[i]->flags)) zmflag |= 1; if (zmflag == 3) break; } @@ -809,26 +170,26 @@ ptr = newpoints; for (i = 0; i < npoints; i++) { - size = pointArray_ptsize(points[i]->point); + size = ptarray_point_size(points[i]->point); memcpy(ptr, getPoint_internal(points[i]->point, 0), size); ptr += ptsize; } - pa = pointArray_construct(newpoints, zmflag&2, zmflag&1, npoints); - - return lwcircstring_construct(SRID, NULL, pa); + pa = ptarray_construct_reference_data(zmflag&2, zmflag&1, npoints, newpoints); + + return lwcircstring_construct(srid, NULL, pa); } /* * Construct a LWCIRCSTRING from a LWMPOINT */ LWCIRCSTRING * -lwcircstring_from_lwmpoint(int SRID, LWMPOINT *mpoint) +lwcircstring_from_lwmpoint(int srid, LWMPOINT *mpoint) { - unsigned int i; + uint32_t i; POINTARRAY *pa; - char zmflag = TYPE_GETZM(mpoint->type); + char zmflag = FLAGS_GET_ZM(mpoint->flags); size_t ptsize, size; - uchar *newpoints, *ptr; + uint8_t *newpoints, *ptr; if (zmflag == 0) ptsize = 2 * sizeof(double); else if (zmflag == 3) ptsize = 4 * sizeof(double); @@ -848,36 +209,35 @@ ptr += ptsize; } - pa = pointArray_construct(newpoints, zmflag&2, zmflag&1, - mpoint->ngeoms); - + pa = ptarray_construct_reference_data(zmflag&2, zmflag&1, mpoint->ngeoms, newpoints); + LWDEBUGF(3, "lwcurve_from_lwmpoint: constructed pointarray for %d points, %d zmflag", mpoint->ngeoms, zmflag); - return lwcircstring_construct(SRID, NULL, pa); + return lwcircstring_construct(srid, NULL, pa); } LWCIRCSTRING * -lwcircstring_addpoint(LWCIRCSTRING *curve, LWPOINT *point, unsigned int where) +lwcircstring_addpoint(LWCIRCSTRING *curve, LWPOINT *point, uint32_t where) { POINTARRAY *newpa; LWCIRCSTRING *ret; newpa = ptarray_addPoint(curve->points, getPoint_internal(point->point, 0), - TYPE_NDIMS(point->type), where); - ret = lwcircstring_construct(curve->SRID, NULL, newpa); + FLAGS_NDIMS(point->flags), where); + ret = lwcircstring_construct(curve->srid, NULL, newpa); return ret; } LWCIRCSTRING * -lwcircstring_removepoint(LWCIRCSTRING *curve, unsigned int index) +lwcircstring_removepoint(LWCIRCSTRING *curve, uint32_t index) { POINTARRAY *newpa; LWCIRCSTRING *ret; newpa = ptarray_removePoint(curve->points, index); - ret = lwcircstring_construct(curve->SRID, NULL, newpa); + ret = lwcircstring_construct(curve->srid, NULL, newpa); return ret; } @@ -886,9 +246,47 @@ * Note: input will be changed, make sure you have permissions for this. * */ void -lwcircstring_setPoint4d(LWCIRCSTRING *curve, unsigned int index, POINT4D *newpoint) +lwcircstring_setPoint4d(LWCIRCSTRING *curve, uint32_t index, POINT4D *newpoint) { - setPoint4d(curve->points, index, newpoint); + ptarray_set_point4d(curve->points, index, newpoint); } +int +lwcircstring_is_closed(const LWCIRCSTRING *curve) +{ + if (FLAGS_GET_Z(curve->flags)) + return ptarray_isclosed3d(curve->points); + return ptarray_isclosed2d(curve->points); +} + +int lwcircstring_is_empty(const LWCIRCSTRING *circ) +{ + if ( !circ->points || circ->points->npoints == 0 ) + return LW_TRUE; + return LW_FALSE; +} + +double lwcircstring_length(const LWCIRCSTRING *circ) +{ + double length = 0.0; + LWLINE *line; + if ( lwcircstring_is_empty(circ) ) + return 0.0; + line = lwcircstring_segmentize(circ, 32); + length = lwline_length(line); + lwline_free(line); + return length; +} + +double lwcircstring_length_2d(const LWCIRCSTRING *circ) +{ + double length = 0.0; + LWLINE *line; + if ( lwcircstring_is_empty(circ) ) + return 0.0; + line = lwcircstring_segmentize(circ, 32); + length = lwline_length_2d(line); + lwline_free(line); + return length; +} diff -Nru postgis-1.5.3/liblwgeom/lwcollection.c postgis-2.0.1/liblwgeom/lwcollection.c --- postgis-1.5.3/liblwgeom/lwcollection.c 2010-02-01 17:35:55.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwcollection.c 2012-02-27 22:08:12.000000000 +0000 @@ -1,9 +1,9 @@ /********************************************************************** - * $Id: lwcollection.c 5181 2010-02-01 17:35:55Z pramsey $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net - * Copyright 2001-2006 Refractions Research Inc. + * + * Copyright (C) 2001-2006 Refractions Research Inc. * * This is free software; you can redistribute and/or modify it under * the terms of the GNU General Public Licence. See the COPYING file. @@ -13,7 +13,8 @@ #include #include #include -#include "liblwgeom.h" +#include "liblwgeom_internal.h" +#include "lwgeom_log.h" #define CHECK_LWGEOM_ZM 1 @@ -26,26 +27,29 @@ LWCOLLECTION * -lwcollection_construct(unsigned int type, int SRID, BOX2DFLOAT4 *bbox, - unsigned int ngeoms, LWGEOM **geoms) +lwcollection_construct(uint8_t type, int srid, GBOX *bbox, + uint32_t ngeoms, LWGEOM **geoms) { LWCOLLECTION *ret; int hasz, hasm; #ifdef CHECK_LWGEOM_ZM char zm; - unsigned int i; + uint32_t i; #endif - LWDEBUGF(2, "lwcollection_construct called with %d, %d, %p, %d, %p.", type, SRID, bbox, ngeoms, geoms); + LWDEBUGF(2, "lwcollection_construct called with %d, %d, %p, %d, %p.", type, srid, bbox, ngeoms, geoms); + + if( ! lwtype_is_collection(type) ) + lwerror("Non-collection type specified in collection constructor!"); hasz = 0; hasm = 0; if ( ngeoms > 0 ) { - hasz = TYPE_HASZ(geoms[0]->type); - hasm = TYPE_HASM(geoms[0]->type); + hasz = FLAGS_GET_Z(geoms[0]->flags); + hasm = FLAGS_GET_M(geoms[0]->flags); #ifdef CHECK_LWGEOM_ZM - zm = TYPE_GETZM(geoms[0]->type); + zm = FLAGS_GET_ZM(geoms[0]->flags); LWDEBUGF(3, "lwcollection_construct type[0]=%d", geoms[0]->type); @@ -53,18 +57,20 @@ { LWDEBUGF(3, "lwcollection_construct type=[%d]=%d", i, geoms[i]->type); - if ( zm != TYPE_GETZM(geoms[i]->type) ) - lwerror("lwcollection_construct: mixed dimension geometries: %d/%d", zm, TYPE_GETZM(geoms[i]->type)); + if ( zm != FLAGS_GET_ZM(geoms[i]->flags) ) + lwerror("lwcollection_construct: mixed dimension geometries: %d/%d", zm, FLAGS_GET_ZM(geoms[i]->flags)); } #endif } ret = lwalloc(sizeof(LWCOLLECTION)); - ret->type = lwgeom_makeType_full(hasz, hasm, (SRID!=-1), - type, 0); - ret->SRID = SRID; + ret->type = type; + ret->flags = gflags(hasz,hasm,0); + FLAGS_SET_BBOX(ret->flags, bbox?1:0); + ret->srid = srid; ret->ngeoms = ngeoms; + ret->maxgeoms = ngeoms; ret->geoms = geoms; ret->bbox = bbox; @@ -72,71 +78,24 @@ } LWCOLLECTION * -lwcollection_construct_empty(int SRID, char hasz, char hasm) +lwcollection_construct_empty(uint8_t type, int srid, char hasz, char hasm) { LWCOLLECTION *ret; + if( ! lwtype_is_collection(type) ) + lwerror("Non-collection type specified in collection constructor!"); ret = lwalloc(sizeof(LWCOLLECTION)); - ret->type = lwgeom_makeType_full(hasz, hasm, (SRID!=-1), - COLLECTIONTYPE, 0); - ret->SRID = SRID; + ret->type = type; + ret->flags = gflags(hasz,hasm,0); + ret->srid = srid; ret->ngeoms = 0; - ret->geoms = NULL; + ret->maxgeoms = 1; /* Allocate room for sub-members, just in case. */ + ret->geoms = lwalloc(ret->maxgeoms * sizeof(LWGEOM*)); ret->bbox = NULL; return ret; } - -LWCOLLECTION * -lwcollection_deserialize(uchar *srl) -{ - LWCOLLECTION *result; - LWGEOM_INSPECTED *insp; - char typefl = srl[0]; - int type = lwgeom_getType(typefl); - int i; - - if ( type != COLLECTIONTYPE ) - { - lwerror("lwcollection_deserialize called on NON geometrycollection: %d", type); - return NULL; - } - - insp = lwgeom_inspect(srl); - - result = lwalloc(sizeof(LWCOLLECTION)); - result->type = typefl; - result->SRID = insp->SRID; - result->ngeoms = insp->ngeometries; - - if (lwgeom_hasBBOX(srl[0])) - { - result->bbox = lwalloc(sizeof(BOX2DFLOAT4)); - memcpy(result->bbox, srl+1, sizeof(BOX2DFLOAT4)); - } - else - { - result->bbox = NULL; - } - - - if ( insp->ngeometries ) - { - result->geoms = lwalloc(sizeof(LWGEOM *)*insp->ngeometries); - for (i=0; ingeometries; i++) - { - result->geoms[i] = lwgeom_deserialize(insp->sub_geoms[i]); - } - } - else - { - result->geoms = NULL; - } - - return result; -} - LWGEOM * lwcollection_getsubgeom(LWCOLLECTION *col, int gnum) { @@ -144,118 +103,39 @@ } /** - * @brief find serialized size of this collection - * @param col #LWCOLLECTION to find serialized size of - */ -size_t -lwcollection_serialize_size(LWCOLLECTION *col) -{ - size_t size = 5; /* type + nsubgeoms */ - int i; - - if ( col->SRID != -1 ) size += 4; /* SRID */ - if ( col->bbox ) size += sizeof(BOX2DFLOAT4); - - LWDEBUGF(2, "lwcollection_serialize_size[%p]: start size: %d", col, size); - - - for (i=0; ingeoms; i++) - { - size += lwgeom_serialize_size(col->geoms[i]); - - LWDEBUGF(3, "lwcollection_serialize_size[%p]: with geom%d: %d", col, i, size); - } - - LWDEBUGF(3, "lwcollection_serialize_size[%p]: returning %d", col, size); - - return size; -} - -/** @brief convert an #LWCOLLECTION into its serialized form writing it into - * the given buffer, and returning number of bytes written into - * the given int pointer. + * @brief Clone #LWCOLLECTION object. #POINTARRAY are not copied. + * Bbox is cloned if present in input. */ -void -lwcollection_serialize_buf(LWCOLLECTION *coll, uchar *buf, size_t *retsize) +LWCOLLECTION * +lwcollection_clone(const LWCOLLECTION *g) { - size_t size=1; /* type */ - size_t subsize=0; - char hasSRID; - uchar *loc; - int i; - - LWDEBUGF(2, "lwcollection_serialize_buf called (%s with %d elems)", - lwgeom_typename(TYPE_GETTYPE(coll->type)), coll->ngeoms); - - hasSRID = (coll->SRID != -1); - - buf[0] = lwgeom_makeType_full(TYPE_HASZ(coll->type), - TYPE_HASM(coll->type), - hasSRID, - TYPE_GETTYPE(coll->type), - coll->bbox ? 1 : 0 ); - loc = buf+1; - - /* Add BBOX if requested */ - if ( coll->bbox ) - { - memcpy(loc, coll->bbox, sizeof(BOX2DFLOAT4)); - size += sizeof(BOX2DFLOAT4); - loc += sizeof(BOX2DFLOAT4); - } - - /* Add SRID if requested */ - if (hasSRID) - { - memcpy(loc, &coll->SRID, 4); - size += 4; - loc += 4; - } - - /* Write number of subgeoms */ - memcpy(loc, &coll->ngeoms, 4); - size += 4; - loc += 4; - - /* Serialize subgeoms */ - for (i=0; ingeoms; i++) + uint32_t i; + LWCOLLECTION *ret = lwalloc(sizeof(LWCOLLECTION)); + memcpy(ret, g, sizeof(LWCOLLECTION)); + if ( g->ngeoms > 0 ) { - lwgeom_serialize_buf(coll->geoms[i], loc, &subsize); - size += subsize; - loc += subsize; + ret->geoms = lwalloc(sizeof(LWGEOM *)*g->ngeoms); + for (i=0; ingeoms; i++) + { + ret->geoms[i] = lwgeom_clone(g->geoms[i]); + } + if ( g->bbox ) ret->bbox = gbox_copy(g->bbox); } - - if (retsize) *retsize = size; - - LWDEBUG(3, "lwcollection_serialize_buf returning"); -} - -int -lwcollection_compute_box2d_p(LWCOLLECTION *col, BOX2DFLOAT4 *box) -{ - BOX2DFLOAT4 boxbuf; - uint32 i; - - if ( ! col->ngeoms ) return 0; - if ( ! lwgeom_compute_box2d_p(col->geoms[0], box) ) return 0; - for (i=1; ingeoms; i++) + else { - if ( ! lwgeom_compute_box2d_p(col->geoms[i], &boxbuf) ) - return 0; - if ( ! box2d_union_p(box, &boxbuf, box) ) - return 0; + ret->bbox = NULL; /* empty collection */ + ret->geoms = NULL; } - return 1; + return ret; } /** - * @brief Clone #LWCOLLECTION object. #POINTARRAY are not copied. - * Bbox is cloned if present in input. - */ +* @brief Deep clone #LWCOLLECTION object. #POINTARRAY are copied. +*/ LWCOLLECTION * -lwcollection_clone(const LWCOLLECTION *g) +lwcollection_clone_deep(const LWCOLLECTION *g) { - uint32 i; + uint32_t i; LWCOLLECTION *ret = lwalloc(sizeof(LWCOLLECTION)); memcpy(ret, g, sizeof(LWCOLLECTION)); if ( g->ngeoms > 0 ) @@ -263,9 +143,9 @@ ret->geoms = lwalloc(sizeof(LWGEOM *)*g->ngeoms); for (i=0; ingeoms; i++) { - ret->geoms[i] = lwgeom_clone(g->geoms[i]); + ret->geoms[i] = lwgeom_clone_deep(g->geoms[i]); } - if ( g->bbox ) ret->bbox = box2d_clone(g->bbox); + if ( g->bbox ) ret->bbox = gbox_copy(g->bbox); } else { @@ -275,57 +155,71 @@ return ret; } -/** @brief Add 'what' to this to #LWCOLLECTION at position 'where'. - * where=0 then prepend - * where=-1 then append - * Returns a GEOMETRYCOLLECTION +/** + * Ensure the collection can hold up at least ngeoms */ -LWGEOM * -lwcollection_add(const LWCOLLECTION *to, uint32 where, const LWGEOM *what) +void lwcollection_reserve(LWCOLLECTION *col, int ngeoms) { - LWCOLLECTION *col; - LWGEOM **geoms; - uint32 i; + if ( ngeoms <= col->maxgeoms ) return; - if ( where == -1 ) where = to->ngeoms; - else if ( where < -1 || where > to->ngeoms ) - { - lwerror("lwcollection_add: add position out of range %d..%d", -1, to->ngeoms); + /* Allocate more space if we need it */ + do { col->maxgeoms *= 2; } while ( col->maxgeoms < ngeoms ); + col->geoms = lwrealloc(col->geoms, sizeof(LWGEOM*) * col->maxgeoms); +} + +/** +* Appends geom to the collection managed by col. Does not copy or +* clone, simply takes a reference on the passed geom. +*/ +LWCOLLECTION* lwcollection_add_lwgeom(LWCOLLECTION *col, const LWGEOM *geom) +{ + int i = 0; + + if ( col == NULL || geom == NULL ) return NULL; + + if ( col->geoms == NULL && (col->ngeoms || col->maxgeoms) ) { + lwerror("Collection is in inconsistent state. Null memory but non-zero collection counts."); return NULL; } - /* dimensions compatibility are checked by caller */ - - /* Construct geoms array */ - geoms = lwalloc(sizeof(LWGEOM *)*(to->ngeoms+1)); - for (i=0; igeoms[i]); - lwgeom_dropSRID(geoms[i]); - lwgeom_drop_bbox(geoms[i]); + /* Check type compatibility */ + if ( ! lwcollection_allows_subtype(col->type, geom->type) ) { + lwerror("%s cannot contain %s element", lwtype_name(col->type), lwtype_name(geom->type)); + return NULL; } - geoms[where] = lwgeom_clone(what); - lwgeom_dropSRID(geoms[where]); - lwgeom_drop_bbox(geoms[where]); - for (i=where; ingeoms; i++) + + /* In case this is a truly empty, make some initial space */ + if ( col->geoms == NULL ) { - geoms[i+1] = lwgeom_clone(to->geoms[i]); - lwgeom_dropSRID(geoms[i+1]); - lwgeom_drop_bbox(geoms[i+1]); + col->maxgeoms = 2; + col->ngeoms = 0; + col->geoms = lwalloc(col->maxgeoms * sizeof(LWGEOM*)); } - col = lwcollection_construct(COLLECTIONTYPE, - to->SRID, NULL, - to->ngeoms+1, geoms); + /* Allocate more space if we need it */ + lwcollection_reserve(col, col->ngeoms + 1); - return (LWGEOM *)col; + /* Make sure we don't already have a reference to this geom */ + /* TODO: drop this check ... */ + for ( i = 0; i < col->ngeoms; i++ ) + { + if ( col->geoms[i] == geom ) + { + LWDEBUGF(4, "Found duplicate geometry in collection %p == %p", col->geoms[i], geom); + return col; + } + } + col->geoms[col->ngeoms] = (LWGEOM*)geom; + col->ngeoms++; + return col; } + LWCOLLECTION * lwcollection_segmentize2d(LWCOLLECTION *col, double dist) { - unsigned int i; + uint32_t i; LWGEOM **newgeoms; if ( ! col->ngeoms ) return lwcollection_clone(col); @@ -334,7 +228,7 @@ for (i=0; ingeoms; i++) newgeoms[i] = lwgeom_segmentize2d(col->geoms[i], dist); - return lwcollection_construct(col->type, col->SRID, NULL, col->ngeoms, newgeoms); + return lwcollection_construct(col->type, col->srid, NULL, col->ngeoms, newgeoms); } /** @brief check for same geometry composition @@ -343,11 +237,11 @@ char lwcollection_same(const LWCOLLECTION *c1, const LWCOLLECTION *c2) { - unsigned int i; + uint32_t i; LWDEBUG(2, "lwcollection_same called"); - if ( TYPE_GETTYPE(c1->type) != TYPE_GETTYPE(c2->type) ) return LW_FALSE; + if ( c1->type != c2->type ) return LW_FALSE; if ( c1->ngeoms != c2->ngeoms ) return LW_FALSE; for ( i = 0; i < c1->ngeoms; i++ ) @@ -358,8 +252,8 @@ /* Former method allowed out-of-order equality between collections - hit = lwalloc(sizeof(unsigned int)*c1->ngeoms); - memset(hit, 0, sizeof(unsigned int)*c1->ngeoms); + hit = lwalloc(sizeof(uint32_t)*c1->ngeoms); + memset(hit, 0, sizeof(uint32_t)*c1->ngeoms); for (i=0; ingeoms; i++) { @@ -396,7 +290,7 @@ { if ( col->geoms[i]) { - switch (TYPE_GETTYPE(col->geoms[i]->type)) + switch (col->geoms[i]->type) { case POINTTYPE: case LINETYPE: @@ -419,89 +313,20 @@ return ngeoms; } -/* -** Given a generic collection, return the "simplest" form. -** eg: GEOMETRYCOLLECTION(MULTILINESTRING()) => MULTELINESTRING() -** GEOMETRYCOLLECTION(MULTILINESTRING(), MULTILINESTRING(), POINT()) => GEOMETRYCOLLECTION(MULTILINESTRING(), MULTIPOINT()) -** -** In general, if the subcomponents are homogeneous, return a properly typed collection. -** Otherwise, return a generic collection, with the subtypes in minimal typed collections. -LWCOLLECTION *lwcollection_homogenize(const LWCOLLECTION *c1) -{ -TODO: pramsey -} -*/ - -/* -** Given a generic collection, extract and return just the desired types. -LWGEOM *lwcollection_extract(const LWCOLLECTION *col, char type) -{ - LWGEOM **extracted_geoms; - extracted_geoms = lwalloc(sizeof(void*)*col->ngeoms); - extracted_curgeom = 0; - char reqtype = TYPE_GETTYPE(type); - for ( i = 0; i < col->ngeoms; i++ ) - { - if( col->geoms[i] ) - char geomtype = TYPE_GETTYPE(col->geoms[i]->type); - if ( geomtype == reqtype ) { - extracted_geoms[extracted_curgeom] = col->geoms[i]; - extracted_curgeom++; - continue; - } - else { - if ( geomtype == COLLECTIONTYPE ) { - LWGEOM *colgeom; - colgeom = lwcollection_extract(col->geoms[i], type); - extracted_geoms[extracted_curgeom] = colgeom->geoms; - extracted_curgeom++; - if( colgeom->bbox ) lwfree(colgeom->bbox); - lwfree(colgeom); - continue; - } - } -TODO: pramsey -} -*/ - - - void lwcollection_free(LWCOLLECTION *col) { int i; + if ( ! col ) return; + if ( col->bbox ) { lwfree(col->bbox); } for ( i = 0; i < col->ngeoms; i++ ) { - if ( col->geoms[i] ) - { - switch ( TYPE_GETTYPE(col->geoms[i]->type) ) - { - case POINTTYPE: - lwpoint_free((LWPOINT*)col->geoms[i]); - break; - case LINETYPE: - lwline_free((LWLINE*)col->geoms[i]); - break; - case POLYGONTYPE: - lwpoly_free((LWPOLY*)col->geoms[i]); - break; - case MULTIPOINTTYPE: - lwmpoint_free((LWMPOINT*)col->geoms[i]); - break; - case MULTILINETYPE: - lwmline_free((LWMLINE*)col->geoms[i]); - break; - case MULTIPOLYGONTYPE: - lwmpoly_free((LWMPOLY*)col->geoms[i]); - break; - case COLLECTIONTYPE: - lwcollection_free((LWCOLLECTION*)col->geoms[i]); - break; - } - } + LWDEBUGF(4,"freeing geom[%d]", i); + if ( col->geoms && col->geoms[i] ) + lwgeom_free(col->geoms[i]); } if ( col->geoms ) { @@ -510,58 +335,6 @@ lwfree(col); } -BOX3D *lwcollection_compute_box3d(LWCOLLECTION *col) -{ - int i; - BOX3D *boxfinal = NULL; - BOX3D *boxtmp1 = NULL; - BOX3D *boxtmp2 = NULL; - for ( i = 0; i < col->ngeoms; i++ ) - { - if ( col->geoms[i] ) - { - switch ( TYPE_GETTYPE(col->geoms[i]->type) ) - { - case POINTTYPE: - boxtmp1 = lwpoint_compute_box3d((LWPOINT*)(col->geoms[i])); - break; - case LINETYPE: - boxtmp1 = lwline_compute_box3d((LWLINE*)(col->geoms[i])); - break; - case POLYGONTYPE: - boxtmp1 = lwpoly_compute_box3d((LWPOLY*)(col->geoms[i])); - break; - case CIRCSTRINGTYPE: - boxtmp1 = lwcircstring_compute_box3d((LWCIRCSTRING *)(col->geoms[i])); - break; - case COMPOUNDTYPE: - case CURVEPOLYTYPE: - case MULTIPOINTTYPE: - case MULTILINETYPE: - case MULTIPOLYGONTYPE: - case MULTICURVETYPE: - case MULTISURFACETYPE: - case COLLECTIONTYPE: - boxtmp1 = lwcollection_compute_box3d((LWCOLLECTION*)(col->geoms[i])); - boxfinal = box3d_union(boxtmp1, boxtmp2); - break; - } - boxtmp2 = boxfinal; - boxfinal = box3d_union(boxtmp1, boxtmp2); - if ( boxtmp1 && boxtmp1 != boxfinal ) - { - lwfree(boxtmp1); - boxtmp1 = NULL; - } - if ( boxtmp2 && boxtmp2 != boxfinal ) - { - lwfree(boxtmp2); - boxtmp2 = NULL; - } - } - } - return boxfinal; -} /** * Takes a potentially heterogeneous collection and returns a homogeneous @@ -571,11 +344,10 @@ { int i = 0; LWGEOM **geomlist; - BOX3D *b3d; LWCOLLECTION *outcol; int geomlistsize = 16; int geomlistlen = 0; - uchar outtype; + uint8_t outtype; if ( ! col ) return NULL; @@ -591,7 +363,7 @@ outtype = MULTIPOLYGONTYPE; break; default: - lwerror("Only POLYGON, LINESTRING and POINT are supported by lwcollection_extract. %s requested.", lwgeom_typename(type)); + lwerror("Only POLYGON, LINESTRING and POINT are supported by lwcollection_extract. %s requested.", lwtype_name(type)); return NULL; } @@ -600,7 +372,7 @@ /* Process each sub-geometry */ for ( i = 0; i < col->ngeoms; i++ ) { - int subtype = TYPE_GETTYPE(col->geoms[i]->type); + int subtype = col->geoms[i]->type; /* Don't bother adding empty sub-geometries */ if ( lwgeom_is_empty(col->geoms[i]) ) { @@ -615,11 +387,11 @@ geomlistsize *= 2; geomlist = lwrealloc(geomlist, sizeof(LWGEOM*) * geomlistsize); } - geomlist[geomlistlen] = col->geoms[i]; + geomlist[geomlistlen] = lwgeom_clone(col->geoms[i]); geomlistlen++; } /* Recurse into sub-collections */ - if ( lwgeom_is_collection( subtype ) ) + if ( lwtype_is_collection( subtype ) ) { int j = 0; LWCOLLECTION *tmpcol = lwcollection_extract((LWCOLLECTION*)col->geoms[i], type); @@ -640,15 +412,137 @@ if ( geomlistlen > 0 ) { - outcol = lwcollection_construct(outtype, col->SRID, NULL, geomlistlen, geomlist); - b3d = lwcollection_compute_box3d(outcol); - outcol->bbox = box3d_to_box2df(b3d); + GBOX gbox; + outcol = lwcollection_construct(outtype, col->srid, NULL, geomlistlen, geomlist); + lwgeom_calculate_gbox((LWGEOM *) outcol, &gbox); + outcol->bbox = gbox_copy(&gbox); } else { - outcol = lwcollection_construct_empty(col->SRID, TYPE_HASZ(col->type), TYPE_HASM(col->type)); + lwfree(geomlist); + outcol = lwcollection_construct_empty(outtype, col->srid, FLAGS_GET_Z(col->flags), FLAGS_GET_M(col->flags)); } return outcol; } +LWGEOM* +lwcollection_remove_repeated_points(LWCOLLECTION *coll) +{ + uint32_t i; + LWGEOM **newgeoms; + + newgeoms = lwalloc(sizeof(LWGEOM *)*coll->ngeoms); + for (i=0; ingeoms; i++) + { + newgeoms[i] = lwgeom_remove_repeated_points(coll->geoms[i]); + } + + return (LWGEOM*)lwcollection_construct(coll->type, + coll->srid, coll->bbox ? gbox_copy(coll->bbox) : NULL, + coll->ngeoms, newgeoms); +} + + +LWCOLLECTION* +lwcollection_force_dims(const LWCOLLECTION *col, int hasz, int hasm) +{ + LWCOLLECTION *colout; + + /* Return 2D empty */ + if( lwcollection_is_empty(col) ) + { + colout = lwcollection_construct_empty(col->type, col->srid, hasz, hasm); + } + else + { + int i; + LWGEOM **geoms = NULL; + geoms = lwalloc(sizeof(LWGEOM*) * col->ngeoms); + for( i = 0; i < col->ngeoms; i++ ) + { + geoms[i] = lwgeom_force_dims(col->geoms[i], hasz, hasm); + } + colout = lwcollection_construct(col->type, col->srid, NULL, col->ngeoms, geoms); + } + return colout; +} + +int lwcollection_is_empty(const LWCOLLECTION *col) +{ + int i; + if ( (col->ngeoms == 0) || (!col->geoms) ) + return LW_TRUE; + for( i = 0; i < col->ngeoms; i++ ) + { + if ( ! lwgeom_is_empty(col->geoms[i]) ) return LW_FALSE; + } + return LW_TRUE; +} + + +int lwcollection_count_vertices(LWCOLLECTION *col) +{ + int i = 0; + int v = 0; /* vertices */ + assert(col); + for ( i = 0; i < col->ngeoms; i++ ) + { + v += lwgeom_count_vertices(col->geoms[i]); + } + return v; +} + +LWCOLLECTION* lwcollection_simplify(const LWCOLLECTION *igeom, double dist) +{ + int i; + LWCOLLECTION *out = lwcollection_construct_empty(igeom->type, igeom->srid, FLAGS_GET_Z(igeom->flags), FLAGS_GET_M(igeom->flags)); + + if( lwcollection_is_empty(igeom) ) + return out; + + for( i = 0; i < igeom->ngeoms; i++ ) + { + LWGEOM *ngeom = lwgeom_simplify(igeom->geoms[i], dist); + out = lwcollection_add_lwgeom(out, ngeom); + } + + return out; +} + +int lwcollection_allows_subtype(int collectiontype, int subtype) +{ + if ( collectiontype == COLLECTIONTYPE ) + return LW_TRUE; + if ( collectiontype == MULTIPOINTTYPE && + subtype == POINTTYPE ) + return LW_TRUE; + if ( collectiontype == MULTILINETYPE && + subtype == LINETYPE ) + return LW_TRUE; + if ( collectiontype == MULTIPOLYGONTYPE && + subtype == POLYGONTYPE ) + return LW_TRUE; + if ( collectiontype == COMPOUNDTYPE && + (subtype == LINETYPE || subtype == CIRCSTRINGTYPE) ) + return LW_TRUE; + if ( collectiontype == CURVEPOLYTYPE && + (subtype == CIRCSTRINGTYPE || subtype == LINETYPE || subtype == COMPOUNDTYPE) ) + return LW_TRUE; + if ( collectiontype == MULTICURVETYPE && + (subtype == CIRCSTRINGTYPE || subtype == LINETYPE || subtype == COMPOUNDTYPE) ) + return LW_TRUE; + if ( collectiontype == MULTISURFACETYPE && + (subtype == POLYGONTYPE || subtype == CURVEPOLYTYPE) ) + return LW_TRUE; + if ( collectiontype == POLYHEDRALSURFACETYPE && + subtype == POLYGONTYPE ) + return LW_TRUE; + if ( collectiontype == TINTYPE && + subtype == TRIANGLETYPE ) + return LW_TRUE; + + /* Must be a bad combination! */ + return LW_FALSE; +} + diff -Nru postgis-1.5.3/liblwgeom/lwcompound.c postgis-2.0.1/liblwgeom/lwcompound.c --- postgis-1.5.3/liblwgeom/lwcompound.c 2009-06-11 16:44:03.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwcompound.c 2012-02-27 22:08:12.000000000 +0000 @@ -1,9 +1,9 @@ /********************************************************************** - * $Id: lwcompound.c 4168 2009-06-11 16:44:03Z pramsey $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net - * Copyright 2001-2006 Refractions Research Inc. + * + * Copyright (C) 2001-2006 Refractions Research Inc. * * This is free software; you can redistribute and/or modify it under * the terms of the GNU General Public Licence. See the COPYING file. @@ -13,106 +13,96 @@ #include #include #include -#include "liblwgeom.h" +#include "liblwgeom_internal.h" +#include "lwgeom_log.h" -LWCOMPOUND * -lwcompound_deserialize(uchar *serialized) + + +int +lwcompound_is_closed(const LWCOMPOUND *compound) { - LWCOMPOUND *result; - LWGEOM_INSPECTED *insp; - int type = lwgeom_getType(serialized[0]); - int i; + size_t size; + int npoints=0; - if (type != COMPOUNDTYPE) - { - lwerror("lwcompound_deserialize called on non compound: %d", type); - return NULL; - } + if (!FLAGS_GET_Z(compound->flags)) + size = sizeof(POINT2D); + else size = sizeof(POINT3D); + + if (compound->geoms[compound->ngeoms - 1]->type == CIRCSTRINGTYPE) + npoints = ((LWCIRCSTRING *)compound->geoms[compound->ngeoms - 1])->points->npoints; + else if (compound->geoms[compound->ngeoms - 1]->type == LINETYPE) + npoints = ((LWLINE *)compound->geoms[compound->ngeoms - 1])->points->npoints; + + if ( memcmp(getPoint_internal( (POINTARRAY *)compound->geoms[0]->data, 0), + getPoint_internal( (POINTARRAY *)compound->geoms[compound->ngeoms - 1]->data, + npoints - 1), + size) ) return LW_FALSE; - insp = lwgeom_inspect(serialized); + return LW_TRUE; +} - result = lwalloc(sizeof(LWCOMPOUND)); - result->type = insp->type; - result->SRID = insp->SRID; - result->ngeoms = insp->ngeometries; - result->geoms = lwalloc(sizeof(LWGEOM *)*insp->ngeometries); +double lwcompound_length(const LWCOMPOUND *comp) +{ + double length = 0.0; + LWLINE *line; + if ( lwgeom_is_empty((LWGEOM*)comp) ) + return 0.0; + line = lwcompound_segmentize(comp, 32); + length = lwline_length(line); + lwline_free(line); + return length; +} - if (lwgeom_hasBBOX(serialized[0])) - { - result->bbox = lwalloc(sizeof(BOX2DFLOAT4)); - memcpy(result->bbox, serialized + 1, sizeof(BOX2DFLOAT4)); - } - else result->bbox = NULL; +double lwcompound_length_2d(const LWCOMPOUND *comp) +{ + double length = 0.0; + LWLINE *line; + if ( lwgeom_is_empty((LWGEOM*)comp) ) + return 0.0; + line = lwcompound_segmentize(comp, 32); + length = lwline_length_2d(line); + lwline_free(line); + return length; +} - for (i = 0; i < insp->ngeometries; i++) - { - if (lwgeom_getType(insp->sub_geoms[i][0]) == LINETYPE) - result->geoms[i] = (LWGEOM *)lwline_deserialize(insp->sub_geoms[i]); - else - result->geoms[i] = (LWGEOM *)lwcircstring_deserialize(insp->sub_geoms[i]); - if (TYPE_NDIMS(result->geoms[i]->type) != TYPE_NDIMS(result->type)) +int lwcompound_add_lwgeom(LWCOMPOUND *comp, LWGEOM *geom) +{ + LWCOLLECTION *col = (LWCOLLECTION*)comp; + + /* Empty things can't continuously join up with other things */ + if ( lwgeom_is_empty(geom) ) + { + LWDEBUG(4, "Got an empty component for a compound curve!"); + return LW_FAILURE; + } + + if( col->ngeoms > 0 ) + { + POINT4D last, first; + /* First point of the component we are adding */ + LWLINE *newline = (LWLINE*)geom; + /* Last point of the previous component */ + LWLINE *prevline = (LWLINE*)(col->geoms[col->ngeoms-1]); + + getPoint4d_p(newline->points, 0, &first); + getPoint4d_p(prevline->points, prevline->points->npoints-1, &last); + + if ( !(FP_EQUALS(first.x,last.x) && FP_EQUALS(first.y,last.y)) ) { - lwerror("Mixed dimensions (compound: %d, line/circularstring %d:%d)", - TYPE_NDIMS(result->type), i, - TYPE_NDIMS(result->geoms[i]->type) - ); - lwfree(result); - return NULL; + LWDEBUG(4, "Components don't join up end-to-end!"); + LWDEBUGF(4, "first pt (%g %g %g %g) last pt (%g %g %g %g)", first.x, first.y, first.z, first.m, last.x, last.y, last.z, last.m); + return LW_FAILURE; } } - return result; + + col = lwcollection_add_lwgeom(col, geom); + return LW_SUCCESS; } -/** - * Add 'what' to this string at position 'where' - * @param where if = 0 then prepend, if -1 then append - * @param what an #LWGEOM object - * @return a {@link #LWCOMPOUND} or a {@link #GEOMETRYCOLLECTION} - */ -LWGEOM * -lwcompound_add(const LWCOMPOUND *to, uint32 where, const LWGEOM *what) +LWCOMPOUND * +lwcompound_construct_empty(int srid, char hasz, char hasm) { - LWCOLLECTION *col; - LWGEOM **geoms; - int newtype; - - LWDEBUG(2, "lwcompound_add called."); - - if (where != -1 && where != 0) - { - lwerror("lwcompound_add only supports 0 or -1 as a second argument, not %d", where); - return NULL; - } - - /* dimensions compatibility are checked by caller */ - - /* Construct geoms array */ - geoms = lwalloc(sizeof(LWGEOM *)*2); - if (where == -1) /* append */ - { - geoms[0] = lwgeom_clone((LWGEOM *)to); - geoms[1] = lwgeom_clone(what); - } - else /* prepend */ - { - geoms[0] = lwgeom_clone(what); - geoms[1] = lwgeom_clone((LWGEOM *)to); - } - - /* reset SRID and wantbbox flag from component types */ - geoms[0]->SRID = geoms[1]->SRID = -1; - TYPE_SETHASSRID(geoms[0]->type, 0); - TYPE_SETHASSRID(geoms[1]->type, 0); - TYPE_SETHASBBOX(geoms[0]->type, 0); - TYPE_SETHASBBOX(geoms[1]->type, 0); - - /* Find appropriate geom type */ - if (TYPE_GETTYPE(what->type) == LINETYPE || TYPE_GETTYPE(what->type) == CIRCSTRINGTYPE) newtype = COMPOUNDTYPE; - else newtype = COLLECTIONTYPE; - - col = lwcollection_construct(newtype, - to->SRID, NULL, 2, geoms); - - return (LWGEOM *)col; + LWCOMPOUND *ret = (LWCOMPOUND*)lwcollection_construct_empty(COMPOUNDTYPE, srid, hasz, hasm); + return ret; } diff -Nru postgis-1.5.3/liblwgeom/lwcurvepoly.c postgis-2.0.1/liblwgeom/lwcurvepoly.c --- postgis-1.5.3/liblwgeom/lwcurvepoly.c 2009-06-11 16:44:03.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwcurvepoly.c 2012-02-27 22:08:12.000000000 +0000 @@ -1,9 +1,9 @@ /********************************************************************** - * $Id: lwcurvepoly.c 4168 2009-06-11 16:44:03Z pramsey $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net - * Copyright 2001-2006 Refractions Research Inc. + * + * Copyright (C) 2001-2006 Refractions Research Inc. * * This is free software; you can redistribute and/or modify it under * the terms of the GNU General Public Licence. See the COPYING file. @@ -15,73 +15,121 @@ #include #include #include -#include "liblwgeom.h" +#include "liblwgeom_internal.h" +#include "lwgeom_log.h" LWCURVEPOLY * -lwcurvepoly_deserialize(uchar *srl) +lwcurvepoly_construct_empty(int srid, char hasz, char hasm) { - LWCURVEPOLY *result; - LWGEOM_INSPECTED *insp; - int type = lwgeom_getType(srl[0]); - int i; + LWCURVEPOLY *ret; - LWDEBUG(3, "lwcurvepoly_deserialize called."); + ret = lwalloc(sizeof(LWCURVEPOLY)); + ret->type = CURVEPOLYTYPE; + ret->flags = gflags(hasz, hasm, 0); + ret->srid = srid; + ret->nrings = 0; + ret->maxrings = 1; /* Allocate room for sub-members, just in case. */ + ret->rings = lwalloc(ret->maxrings * sizeof(LWGEOM*)); + ret->bbox = NULL; + + return ret; +} - if (type != CURVEPOLYTYPE) +int lwcurvepoly_add_ring(LWCURVEPOLY *poly, LWGEOM *ring) +{ + int i; + + /* Can't do anything with NULLs */ + if( ! poly || ! ring ) { - lwerror("lwcurvepoly_deserialize called on NON curvepoly: %d", - type); - return NULL; + LWDEBUG(4,"NULL inputs!!! quitting"); + return LW_FAILURE; } - insp = lwgeom_inspect(srl); + /* Check that we're not working with garbage */ + if ( poly->rings == NULL && (poly->nrings || poly->maxrings) ) + { + LWDEBUG(4,"mismatched nrings/maxrings"); + lwerror("Curvepolygon is in inconsistent state. Null memory but non-zero collection counts."); + } - result = lwalloc(sizeof(LWCURVEPOLY)); - result->type = insp->type; - result->SRID = insp->SRID; - result->nrings = insp->ngeometries; - result->rings = lwalloc(sizeof(LWGEOM *)*insp->ngeometries); + /* Check that we're adding an allowed ring type */ + if ( ! ( ring->type == LINETYPE || ring->type == CIRCSTRINGTYPE || ring->type == COMPOUNDTYPE ) ) + { + LWDEBUGF(4,"got incorrect ring type: %s",lwtype_name(ring->type)); + return LW_FAILURE; + } - if (lwgeom_hasBBOX(srl[0])) + + /* In case this is a truly empty, make some initial space */ + if ( poly->rings == NULL ) { - result->bbox = lwalloc(sizeof(BOX2DFLOAT4)); - memcpy(result->bbox, srl + 1, sizeof(BOX2DFLOAT4)); + poly->maxrings = 2; + poly->nrings = 0; + poly->rings = lwalloc(poly->maxrings * sizeof(LWGEOM*)); } - else result->bbox = NULL; - for (i = 0; i < insp->ngeometries; i++) + /* Allocate more space if we need it */ + if ( poly->nrings == poly->maxrings ) { - result->rings[i] = lwgeom_deserialize(insp->sub_geoms[i]); - if (lwgeom_getType(result->rings[i]->type) != CIRCSTRINGTYPE - && lwgeom_getType(result->rings[i]->type) != LINETYPE - && lwgeom_getType(result->rings[i]->type) != COMPOUNDTYPE) - { - lwerror("Only Circular curves, Linestrings and Compound curves are supported as rings, not %s (%d)", lwgeom_typename(result->rings[i]->type), result->rings[i]->type); - lwfree(result); - lwfree(insp); - return NULL; - } - if (TYPE_NDIMS(result->rings[i]->type) != TYPE_NDIMS(result->type)) + poly->maxrings *= 2; + poly->rings = lwrealloc(poly->rings, sizeof(LWGEOM*) * poly->maxrings); + } + + /* Make sure we don't already have a reference to this geom */ + for ( i = 0; i < poly->nrings; i++ ) + { + if ( poly->rings[i] == ring ) { - lwerror("Mixed dimensions (curvepoly %d, ring %d)", - TYPE_NDIMS(result->type), i, - TYPE_NDIMS(result->rings[i]->type)); - lwfree(result); - lwfree(insp); - return NULL; + LWDEBUGF(4, "Found duplicate geometry in collection %p == %p", poly->rings[i], ring); + return LW_SUCCESS; } } - return result; + + /* Add the ring and increment the ring count */ + poly->rings[poly->nrings] = (LWGEOM*)ring; + poly->nrings++; + return LW_SUCCESS; } -LWGEOM * -lwcurvepoly_add(const LWCURVEPOLY *to, uint32 where, const LWGEOM *what) +/** + * This should be rewritten to make use of the curve itself. + */ +double +lwcurvepoly_area(const LWCURVEPOLY *curvepoly) { - /* TODO */ - lwerror("lwcurvepoly_add not yet implemented."); - return NULL; + double area = 0.0; + LWPOLY *poly; + if( lwgeom_is_empty((LWGEOM*)curvepoly) ) + return 0.0; + poly = lwcurvepoly_segmentize(curvepoly, 32); + area = lwpoly_area(poly); + lwpoly_free(poly); + return area; +} + + +double +lwcurvepoly_perimeter(const LWCURVEPOLY *poly) +{ + double result=0.0; + int i; + + for (i=0; inrings; i++) + result += lwgeom_length(poly->rings[i]); + + return result; } +double +lwcurvepoly_perimeter_2d(const LWCURVEPOLY *poly) +{ + double result=0.0; + int i; + for (i=0; inrings; i++) + result += lwgeom_length_2d(poly->rings[i]); + return result; +} diff -Nru postgis-1.5.3/liblwgeom/lwgeodetic.c postgis-2.0.1/liblwgeom/lwgeodetic.c --- postgis-1.5.3/liblwgeom/lwgeodetic.c 2010-08-19 19:48:52.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwgeodetic.c 2012-05-17 11:54:43.000000000 +0000 @@ -1,5 +1,5 @@ /********************************************************************** - * $Id: lwgeodetic.c 5851 2010-08-19 19:48:52Z pramsey $ + * $Id: lwgeodetic.c 9744 2012-05-17 11:54:43Z pramsey $ * * PostGIS - Spatial Types for PostgreSQL * Copyright 2009 Paul Ramsey @@ -11,6 +11,7 @@ **********************************************************************/ #include "lwgeodetic.h" +#include "lwgeom_log.h" /** * For testing geodetic bounding box, we have a magic global variable. @@ -73,6 +74,7 @@ /** * Convert a longitude to the range of -180,180 +* @param lon longitude in degrees */ double longitude_degrees_normalize(double lon) { @@ -98,6 +100,7 @@ /** * Convert a latitude to the range of -90,90 +* @param lat latitude in degrees */ double latitude_degrees_normalize(double lat) { @@ -141,6 +144,11 @@ return FP_EQUALS(g1->lat, g2->lat) && FP_EQUALS(g1->lon, g2->lon); } +/** +* Initialize a geographic point +* @param lon longitude in degrees +* @param lat latitude in degrees +*/ void geographic_point_init(double lon, double lat, GEOGRAPHIC_POINT *g) { g->lat = latitude_radians_normalize(deg2rad(lat)); @@ -153,8 +161,8 @@ * the box is generated from external edges and there's an "interior" which * contains the pole. * -* WARNING: There might be degenerate cases that contain multiple poles but are not -* caught, this is not a 100% function. +* This function is overdetermined, for very large polygons it might add an +* unwarranted pole. STILL NEEDS WORK! */ static int gbox_check_poles(GBOX *gbox) { @@ -163,7 +171,7 @@ LWDEBUGF(4, "gbox %s", gbox_to_string(gbox)); /* Z axis */ if ( gbox->xmin < 0.0 && gbox->xmax > 0.0 && - gbox->ymin < 0.0 && gbox->ymax > 0.0 ) + gbox->ymin < 0.0 && gbox->ymax > 0.0 ) { if ( (gbox->zmin + gbox->zmax) > 0.0 ) { @@ -180,9 +188,9 @@ /* Y axis */ if ( gbox->xmin < 0.0 && gbox->xmax > 0.0 && - gbox->zmin < 0.0 && gbox->zmax > 0.0 ) + gbox->zmin < 0.0 && gbox->zmax > 0.0 ) { - if ( (gbox->ymin + gbox->ymax) > 0.0 ) + if ( gbox->ymin + gbox->ymax > 0.0 ) { LWDEBUG(4, "enclosed positive y axis"); gbox->ymax = 1.0; @@ -197,9 +205,9 @@ /* X axis */ if ( gbox->ymin < 0.0 && gbox->ymax > 0.0 && - gbox->zmin < 0.0 && gbox->zmax > 0.0 ) + gbox->zmin < 0.0 && gbox->zmax > 0.0 ) { - if ( (gbox->xmin + gbox->xmax) > 0.0 ) + if ( gbox->xmin + gbox->xmax > 0.0 ) { LWDEBUG(4, "enclosed positive x axis"); gbox->xmax = 1.0; @@ -216,6 +224,7 @@ } + /** * Convert spherical coordinates to cartesion coordinates on unit sphere */ @@ -694,7 +703,7 @@ g_bottom->lon = vN1.lon; LWDEBUGF(4, "clairaut top == GPOINT(%.6g %.6g)", g_top->lat, g_top->lon); LWDEBUGF(4, "clairaut bottom == GPOINT(%.6g %.6g)", g_bottom->lat, g_bottom->lon); - return G_SUCCESS; + return LW_SUCCESS; } /** @@ -721,7 +730,7 @@ g_bottom->lon = vN1.lon; LWDEBUGF(4, "clairaut top == GPOINT(%.6g %.6g)", g_top->lat, g_top->lon); LWDEBUGF(4, "clairaut bottom == GPOINT(%.6g %.6g)", g_bottom->lat, g_bottom->lon); - return G_SUCCESS; + return LW_SUCCESS; } /** @@ -807,8 +816,6 @@ LWDEBUG(4, "flipping point to other side of sphere"); g->lat = -1.0 * g->lat; g->lon = g->lon + M_PI; - LWDEBUGF(4, "g == GPOINT(%.12g %.12g)", g->lat, g->lon); - LWDEBUGF(4, "g == POINT(%.12g %.12g)", rad2deg(g->lon), rad2deg(g->lat)); if ( g->lon > M_PI ) { g->lon = -1.0 * (2.0 * M_PI - g->lon); @@ -917,7 +924,7 @@ n->lat = asin(sin(lat1) * cos(d) + cos(lat1) * sin(d) * cos(azimuth)); n->lon = atan(b/a) + r->lon; - return G_SUCCESS; + return LW_SUCCESS; } @@ -941,7 +948,7 @@ gbox->xmax = FP_MAX(start.x, end.x); gbox->ymax = FP_MAX(start.y, end.y); gbox->zmax = FP_MAX(start.z, end.z); - return G_SUCCESS; + return LW_SUCCESS; } /* Edge is antipodal (one point on each side of the globe), @@ -951,7 +958,7 @@ LWDEBUG(4, "edge is antipodal. setting to maximum size box, and returning"); gbox->xmin = gbox->ymin = gbox->zmin = -1.0; gbox->xmax = gbox->ymax = gbox->zmax = 1.0; - return G_SUCCESS; + return LW_SUCCESS; } /* Walk along the chord between start and end incrementally, @@ -974,7 +981,7 @@ normalize(&pn); gbox_merge_point3d(&pn, gbox); } - return G_SUCCESS; + return LW_SUCCESS; } /** @@ -1019,17 +1026,22 @@ gbox->xmax = FP_MAX(start.x, end.x); gbox->ymax = FP_MAX(start.y, end.y); gbox->zmax = FP_MAX(start.z, end.z); - return G_SUCCESS; + return LW_SUCCESS; } /* Edge is antipodal (one point on each side of the globe), set the box to contain the whole world and return */ if ( FP_EQUALS(distance, M_PI) ) { - LWDEBUG(4, "edge is antipodal. setting to maximum size box, and returning"); + lwerror("Invalid geography. Antipodal (180 degrees long) edge (%g %g,%g %g) detected, add a point between to make two edges that span less than 180 degrees.", + rad2deg(e->start.lon),rad2deg(e->start.lat),rad2deg(e->end.lon),rad2deg(e->end.lat) ); + return LW_FAILURE; + +/* LWDEBUG(4, "edge is antipodal. setting to maximum size box, and returning"); gbox->xmin = gbox->ymin = gbox->zmin = -1.0; gbox->xmax = gbox->ymax = gbox->zmax = 1.0; - return G_SUCCESS; + + return LW_SUCCESS; */ } /* Calculate the difference in longitude between the two points. */ @@ -1262,7 +1274,7 @@ } LWDEBUGF(4, "final gbox: %s", gbox_to_string(gbox)); - return G_SUCCESS; + return LW_SUCCESS; } /** @@ -1278,7 +1290,7 @@ POINT3D pt; GEOGRAPHIC_POINT g; - while( grow < M_PI ) + while ( grow < M_PI ) { /* Assign our box and expand it slightly. */ ge = *gbox; @@ -1339,7 +1351,7 @@ return; } } - + /* Try a wider growth to push the corners outside the original box. */ grow *= 2.0; } @@ -1396,7 +1408,7 @@ LWDEBUGF(4, "after shift a1(%.8g %.8g) b1(%.8g %.8g) c1(%.8g %.8g)", a1.lat, a1.lon, b1.lat, b1.lon, c1.lat, c1.lon); excess = sphere_excess(&a1, &b1, &c1); } - else if( crosses_dateline(&a, &c) ) + else if ( crosses_dateline(&a, &c) ) { GEOGRAPHIC_POINT a1 = a, b1 = b, c1 = c; double shift; @@ -1411,7 +1423,7 @@ point_shift(&c1, shift); excess = sphere_excess(&a1, &b1, &c1); } - else + else { excess = sphere_excess(&a, &b, &c); } @@ -1426,8 +1438,8 @@ /** -* This routine returns LW_TRUE if the stabline joining the pt_outside and pt_to_test -* crosses the ring an odd number of times, or if the pt_to_test is on the ring boundary itself, +* This routine returns LW_TRUE if the stabline joining the pt_outside and pt_to_test +* crosses the ring an odd number of times, or if the pt_to_test is on the ring boundary itself, * returning LW_FALSE otherwise. * The pt_outside must be guaranteed to be outside the ring (use the geography_pt_outside() function * to derive one in postgis, or the gbox_pt_outside() function if you don't mind burning CPU cycles @@ -1536,7 +1548,7 @@ distance = MAXFLOAT; /* Empty point arrays? Return negative */ - if ( pa1->npoints == 0 || pa1->npoints == 0 ) + if ( pa1->npoints == 0 || pa2->npoints == 0 ) return -1.0; /* Handle point/point case here */ @@ -1709,11 +1721,13 @@ * calculate external ring area and subtract internal ring area. A GBOX is * required to calculate an outside point. */ -double lwgeom_area_sphere(const LWGEOM *lwgeom, const GBOX *gbox, const SPHEROID *spheroid) +double lwgeom_area_sphere(const LWGEOM *lwgeom, const SPHEROID *spheroid) { int type; POINT2D pt_outside; double radius2 = spheroid->radius * spheroid->radius; + GBOX gbox; + gbox.flags = 0; assert(lwgeom); @@ -1722,13 +1736,19 @@ return 0.0; /* Read the geometry type number */ - type = TYPE_GETTYPE(lwgeom->type); + type = lwgeom->type; /* Anything but polygons and collections returns zero */ if ( ! ( type == POLYGONTYPE || type == MULTIPOLYGONTYPE || type == COLLECTIONTYPE ) ) return 0.0; - gbox_pt_outside(gbox, &pt_outside); + /* Make sure we have boxes */ + if ( lwgeom->bbox ) + gbox = *(lwgeom->bbox); + else + lwgeom_calculate_gbox_geodetic(lwgeom, &gbox); + + gbox_pt_outside(&gbox, &pt_outside); LWDEBUGF(2, "pt_outside = POINT(%.20g %.20g)", pt_outside.x, pt_outside.y); @@ -1763,7 +1783,7 @@ for ( i = 0; i < col->ngeoms; i++ ) { - area += lwgeom_area_sphere(col->geoms[i], gbox, spheroid); + area += lwgeom_area_sphere(col->geoms[i], spheroid); } return area; } @@ -1774,19 +1794,112 @@ /** +* Calculate a projected point given a source point, a distance and a bearing. +* @param r - location of first point. +* @param spheroid - spheroid definition. +* @param distance - distance, in units of the spheroid def'n. +* @param azimuth - azimuth in radians. +* @return s - location of projected point. +* +*/ +LWPOINT* lwgeom_project_spheroid(const LWPOINT *r, const SPHEROID *spheroid, double distance, double azimuth) +{ + GEOGRAPHIC_POINT geo_source, geo_dest; + POINT4D pt_dest; + double x, y; + POINTARRAY *pa; + LWPOINT *lwp; + + /* Check the azimuth validity, convert to radians */ + if ( azimuth < -2.0 * M_PI || azimuth > 2.0 * M_PI ) + { + lwerror("Azimuth must be between -2PI and 2PI"); + return NULL; + } + + /* Check the distance validity */ + if ( distance < 0.0 || distance > (M_PI * spheroid->radius) ) + { + lwerror("Distance must be between 0 and %g", M_PI * spheroid->radius); + return NULL; + } + + /* Convert to ta geodetic point */ + x = lwpoint_get_x(r); + y = lwpoint_get_y(r); + geographic_point_init(x, y, &geo_source); + + /* Try the projection */ + if( spheroid_project(&geo_source, spheroid, distance, azimuth, &geo_dest) == LW_FAILURE ) + { + LWDEBUGF(3, "Unable to project from (%g %g) with azimuth %g and distance %g", x, y, azimuth, distance); + lwerror("Unable to project from (%g %g) with azimuth %g and distance %g", x, y, azimuth, distance); + return NULL; + } + + /* Build the output LWPOINT */ + pa = ptarray_construct(0, 0, 1); + pt_dest.x = rad2deg(longitude_radians_normalize(geo_dest.lon)); + pt_dest.y = rad2deg(latitude_radians_normalize(geo_dest.lat)); + pt_dest.z = pt_dest.m = 0.0; + ptarray_set_point4d(pa, 0, &pt_dest); + lwp = lwpoint_construct(r->srid, NULL, pa); + lwgeom_set_geodetic(lwpoint_as_lwgeom(lwp), LW_TRUE); + return lwp; +} + + +/** +* Calculate a bearing (azimuth) given a source and destination point. +* @param r - location of first point. +* @param s - location of second point. +* @param spheroid - spheroid definition. +* @return azimuth - azimuth in radians. +* +*/ +double lwgeom_azumith_spheroid(const LWPOINT *r, const LWPOINT *s, const SPHEROID *spheroid) +{ + GEOGRAPHIC_POINT g1, g2; + double x1, y1, x2, y2; + + /* Convert r to a geodetic point */ + x1 = lwpoint_get_x(r); + y1 = lwpoint_get_y(r); + geographic_point_init(x1, y1, &g1); + + /* Convert s to a geodetic point */ + x2 = lwpoint_get_x(s); + y2 = lwpoint_get_y(s); + geographic_point_init(x2, y2, &g2); + + /* Same point, return NaN */ + if ( FP_EQUALS(x1, x2) && FP_EQUALS(y1, y2) ) + { + return NAN; + } + + /* Do the direction calculation */ + return spheroid_direction(&g1, &g2, spheroid); +} + +/** * Calculate the distance between two LWGEOMs, using the coordinates are * longitude and latitude. Return immediately when the calulated distance drops * below the tolerance (useful for dwithin calculations). * Return a negative distance for incalculable cases. */ -double lwgeom_distance_spheroid(const LWGEOM *lwgeom1, const LWGEOM *lwgeom2, const GBOX *gbox1, const GBOX *gbox2, const SPHEROID *spheroid, double tolerance) +double lwgeom_distance_spheroid(const LWGEOM *lwgeom1, const LWGEOM *lwgeom2, const SPHEROID *spheroid, double tolerance) { - int type1, type2; + uint8_t type1, type2; int check_intersection = LW_FALSE; + GBOX gbox1, gbox2; + gbox_init(&gbox1); + gbox_init(&gbox2); + assert(lwgeom1); assert(lwgeom2); - + LWDEBUGF(4, "entered function, tolerance %.8g", tolerance); /* What's the distance to an empty geometry? We don't know. @@ -1796,12 +1909,23 @@ return -1.0; } - type1 = TYPE_GETTYPE(lwgeom1->type); - type2 = TYPE_GETTYPE(lwgeom2->type); + type1 = lwgeom1->type; + type2 = lwgeom2->type; + /* Make sure we have boxes */ + if ( lwgeom1->bbox ) + gbox1 = *(lwgeom1->bbox); + else + lwgeom_calculate_gbox_geodetic(lwgeom1, &gbox1); + + /* Make sure we have boxes */ + if ( lwgeom2->bbox ) + gbox2 = *(lwgeom2->bbox); + else + lwgeom_calculate_gbox_geodetic(lwgeom2, &gbox2); /* If the boxes aren't disjoint, we have to check for edge intersections */ - if ( gbox_overlaps(gbox1, gbox2) ) + if ( gbox_overlaps(&gbox1, &gbox2) ) check_intersection = LW_TRUE; /* Point/line combinations can all be handled with simple point array iterations */ @@ -1830,7 +1954,6 @@ POINT2D p; LWPOLY *lwpoly; LWPOINT *lwpt; - const GBOX *gbox; double distance = MAXFLOAT; int i; @@ -1838,20 +1961,20 @@ { lwpt = (LWPOINT*)lwgeom1; lwpoly = (LWPOLY*)lwgeom2; - gbox = gbox2; } else { lwpt = (LWPOINT*)lwgeom2; lwpoly = (LWPOLY*)lwgeom1; - gbox = gbox1; } getPoint2d_p(lwpt->point, 0, &p); /* Point in polygon implies zero distance */ - if ( lwpoly_covers_point2d(lwpoly, gbox, &p) ) + if ( lwpoly_covers_point2d(lwpoly, &p) ) + { return 0.0; - + } + /* Not inside, so what's the actual distance? */ for ( i = 0; i < lwpoly->nrings; i++ ) { @@ -1871,7 +1994,6 @@ POINT2D p; LWPOLY *lwpoly; LWLINE *lwline; - const GBOX *gbox; double distance = MAXFLOAT; int i; @@ -1879,20 +2001,18 @@ { lwline = (LWLINE*)lwgeom1; lwpoly = (LWPOLY*)lwgeom2; - gbox = gbox2; } else { lwline = (LWLINE*)lwgeom2; lwpoly = (LWPOLY*)lwgeom1; - gbox = gbox1; } getPoint2d_p(lwline->points, 0, &p); LWDEBUG(4, "checking if a point of line is in polygon"); /* Point in polygon implies zero distance */ - if ( lwpoly_covers_point2d(lwpoly, gbox, &p) ) + if ( lwpoly_covers_point2d(lwpoly, &p) ) return 0.0; LWDEBUG(4, "checking ring distances"); @@ -1924,12 +2044,12 @@ /* Point of 2 in polygon 1 implies zero distance */ getPoint2d_p(lwpoly1->rings[0], 0, &p); - if ( lwpoly_covers_point2d(lwpoly2, gbox2, &p) ) + if ( lwpoly_covers_point2d(lwpoly2, &p) ) return 0.0; /* Point of 1 in polygon 2 implies zero distance */ getPoint2d_p(lwpoly2->rings[0], 0, &p); - if ( lwpoly_covers_point2d(lwpoly1, gbox1, &p) ) + if ( lwpoly_covers_point2d(lwpoly1, &p) ) return 0.0; /* Not contained, so what's the actual distance? */ @@ -1948,7 +2068,7 @@ } /* Recurse into collections */ - if ( lwgeom_is_collection(type1) ) + if ( lwtype_is_collection(type1) ) { int i; double distance = MAXFLOAT; @@ -1956,7 +2076,7 @@ for ( i = 0; i < col->ngeoms; i++ ) { - double geom_distance = lwgeom_distance_spheroid(col->geoms[i], lwgeom2, gbox1, gbox2, spheroid, tolerance); + double geom_distance = lwgeom_distance_spheroid(col->geoms[i], lwgeom2, spheroid, tolerance); if ( geom_distance < distance ) distance = geom_distance; if ( distance < tolerance ) @@ -1966,7 +2086,7 @@ } /* Recurse into collections */ - if ( lwgeom_is_collection(type2) ) + if ( lwtype_is_collection(type2) ) { int i; double distance = MAXFLOAT; @@ -1974,7 +2094,7 @@ for ( i = 0; i < col->ngeoms; i++ ) { - double geom_distance = lwgeom_distance_spheroid(lwgeom1, col->geoms[i], gbox1, gbox2, spheroid, tolerance); + double geom_distance = lwgeom_distance_spheroid(lwgeom1, col->geoms[i], spheroid, tolerance); if ( geom_distance < distance ) distance = geom_distance; if ( distance < tolerance ) @@ -1984,21 +2104,23 @@ } - lwerror("arguments include unsupported geometry type (%s, %s)", lwgeom_typename(type1), lwgeom_typename(type1)); + lwerror("arguments include unsupported geometry type (%s, %s)", lwtype_name(type1), lwtype_name(type1)); return -1.0; } -int lwgeom_covers_lwgeom_sphere(const LWGEOM *lwgeom1, const LWGEOM *lwgeom2, const GBOX *gbox1, const GBOX *gbox2) +int lwgeom_covers_lwgeom_sphere(const LWGEOM *lwgeom1, const LWGEOM *lwgeom2) { int type1, type2; - + GBOX gbox1, gbox2; + gbox1.flags = gbox2.flags = 0; + assert(lwgeom1); assert(lwgeom2); - type1 = TYPE_GETTYPE(lwgeom1->type); - type2 = TYPE_GETTYPE(lwgeom2->type); + type1 = lwgeom1->type; + type2 = lwgeom2->type; /* Currently a restricted implementation */ if ( ! ( (type1 == POLYGONTYPE || type1 == MULTIPOLYGONTYPE || type1 == COLLECTIONTYPE) && @@ -2008,23 +2130,36 @@ return LW_FALSE; } + /* Make sure we have boxes */ + if ( lwgeom1->bbox ) + gbox1 = *(lwgeom1->bbox); + else + lwgeom_calculate_gbox_geodetic(lwgeom1, &gbox1); + + /* Make sure we have boxes */ + if ( lwgeom2->bbox ) + gbox2 = *(lwgeom2->bbox); + else + lwgeom_calculate_gbox_geodetic(lwgeom2, &gbox2); + + /* Handle the polygon/point case */ if ( type1 == POLYGONTYPE && type2 == POINTTYPE ) { POINT2D pt_to_test; getPoint2d_p(((LWPOINT*)lwgeom2)->point, 0, &pt_to_test); - return lwpoly_covers_point2d((LWPOLY*)lwgeom1, gbox1, &pt_to_test); + return lwpoly_covers_point2d((LWPOLY*)lwgeom1, &pt_to_test); } /* If any of the first argument parts covers the second argument, it's true */ - if ( lwgeom_is_collection( type1 ) ) + if ( lwtype_is_collection( type1 ) ) { int i; LWCOLLECTION *col = (LWCOLLECTION*)lwgeom1; for ( i = 0; i < col->ngeoms; i++ ) { - if ( lwgeom_covers_lwgeom_sphere(col->geoms[i], lwgeom2, gbox1, gbox2) ) + if ( lwgeom_covers_lwgeom_sphere(col->geoms[i], lwgeom2) ) { return LW_TRUE; } @@ -2033,14 +2168,14 @@ } /* Only if all of the second arguments are covered by the first argument is the condition true */ - if ( lwgeom_is_collection( type2 ) ) + if ( lwtype_is_collection( type2 ) ) { int i; LWCOLLECTION *col = (LWCOLLECTION*)lwgeom2; for ( i = 0; i < col->ngeoms; i++ ) { - if ( ! lwgeom_covers_lwgeom_sphere(lwgeom1, col->geoms[i], gbox1, gbox2) ) + if ( ! lwgeom_covers_lwgeom_sphere(lwgeom1, col->geoms[i]) ) { return LW_FALSE; } @@ -2059,13 +2194,15 @@ * a guaranteed outside point (lon/lat decimal degrees) (calculate with gbox_pt_outside()) * return LW_TRUE if point is inside or on edge of polygon. */ -int lwpoly_covers_point2d(const LWPOLY *poly, const GBOX *gbox, const POINT2D *pt_to_test) +int lwpoly_covers_point2d(const LWPOLY *poly, const POINT2D *pt_to_test) { int i; int in_hole_count = 0; POINT3D p; GEOGRAPHIC_POINT gpt_to_test; POINT2D pt_outside; + GBOX gbox; + gbox.flags = 0; /* Nulls and empties don't contain anything! */ if ( ! poly || lwgeom_is_empty((LWGEOM*)poly) ) @@ -2074,24 +2211,28 @@ return LW_FALSE; } - LWDEBUGF(4, "pt_to_test POINT(%.18g %.18g)", pt_to_test->x, pt_to_test->y); - LWDEBUGF(4, "gbox %s", gbox_to_string(gbox)); + /* Make sure we have boxes */ + if ( poly->bbox ) + gbox = *(poly->bbox); + else + lwgeom_calculate_gbox_geodetic((LWGEOM*)poly, &gbox); /* Point not in box? Done! */ geographic_point_init(pt_to_test->x, pt_to_test->y, &gpt_to_test); geog2cart(&gpt_to_test, &p); - LWDEBUGF(4, "p POINT(%.18g %.18g %.18g)", p.x, p.y, p.z); - if ( ! gbox_contains_point3d(gbox, &p) ) + if ( ! gbox_contains_point3d(&gbox, &p) ) { LWDEBUG(4, "the point is not in the box!"); return LW_FALSE; } /* Calculate our outside point from the gbox */ - gbox_pt_outside(gbox, &pt_outside); + gbox_pt_outside(&gbox, &pt_outside); LWDEBUGF(4, "pt_outside POINT(%.18g %.18g)", pt_outside.x, pt_outside.y); - LWDEBUGF(4, "polygon %s", lwgeom_to_ewkt((LWGEOM*)poly, PARSER_CHECK_NONE)); + LWDEBUGF(4, "pt_to_test POINT(%.18g %.18g)", pt_to_test->x, pt_to_test->y); + LWDEBUGF(4, "polygon %s", lwgeom_to_ewkt((LWGEOM*)poly)); + LWDEBUGF(4, "gbox %s", gbox_to_string(&gbox)); /* Not in outer ring? We're done! */ if ( ! ptarray_point_in_ring(poly->rings[0], &pt_outside, pt_to_test) ) @@ -2130,7 +2271,7 @@ */ int getPoint2d_p_ro(const POINTARRAY *pa, int n, POINT2D **point) { - uchar *pa_ptr = NULL; + uint8_t *pa_ptr = NULL; assert(pa); assert(n >= 0); assert(n < pa->npoints); @@ -2139,7 +2280,7 @@ /* printf( "pa_ptr[0]: %g\n", *((double*)pa_ptr)); */ *point = (POINT2D*)pa_ptr; - return G_SUCCESS; + return LW_SUCCESS; } int ptarray_calculate_gbox_geodetic(const POINTARRAY *pa, GBOX *gbox) @@ -2156,7 +2297,7 @@ edge_gbox.flags = gbox->flags; - if ( pa->npoints == 0 ) return G_FAILURE; + if ( pa->npoints == 0 ) return LW_FAILURE; if ( pa->npoints == 1 ) { @@ -2169,7 +2310,7 @@ gbox->xmin = gbox->xmax = out_pt.x; gbox->ymin = gbox->ymax = out_pt.y; gbox->zmin = gbox->zmax = out_pt.z; - return G_SUCCESS; + return LW_SUCCESS; } for ( i = 1; i < pa->npoints; i++ ) @@ -2200,24 +2341,20 @@ } - return G_SUCCESS; + return LW_SUCCESS; } static int lwpoint_calculate_gbox_geodetic(const LWPOINT *point, GBOX *gbox) { assert(point); - if ( ptarray_calculate_gbox_geodetic(point->point, gbox) == G_FAILURE ) - return G_FAILURE; - return G_SUCCESS; + return ptarray_calculate_gbox_geodetic(point->point, gbox); } static int lwline_calculate_gbox_geodetic(const LWLINE *line, GBOX *gbox) { assert(line); - if ( ptarray_calculate_gbox_geodetic(line->points, gbox) == G_FAILURE ) - return G_FAILURE; - return G_SUCCESS; + return ptarray_calculate_gbox_geodetic(line->points, gbox); } static int lwpolygon_calculate_gbox_geodetic(const LWPOLY *poly, GBOX *gbox) @@ -2227,12 +2364,12 @@ int first = LW_TRUE; assert(poly); if ( poly->nrings == 0 ) - return G_FAILURE; + return LW_FAILURE; ringbox.flags = gbox->flags; for ( i = 0; i < poly->nrings; i++ ) { - if ( ptarray_calculate_gbox_geodetic(poly->rings[i], &ringbox) == G_FAILURE ) - return G_FAILURE; + if ( ptarray_calculate_gbox_geodetic(poly->rings[i], &ringbox) == LW_FAILURE ) + return LW_FAILURE; if ( first ) { gbox_duplicate(&ringbox, gbox); @@ -2247,29 +2384,36 @@ /* If the box wraps a poly, push that axis to the absolute min/max as appropriate */ gbox_check_poles(gbox); - return G_SUCCESS; + return LW_SUCCESS; +} + +static int lwtriangle_calculate_gbox_geodetic(const LWTRIANGLE *triangle, GBOX *gbox) +{ + assert(triangle); + return ptarray_calculate_gbox_geodetic(triangle->points, gbox); } + static int lwcollection_calculate_gbox_geodetic(const LWCOLLECTION *coll, GBOX *gbox) { GBOX subbox; int i; - int result = G_FAILURE; + int result = LW_FAILURE; int first = LW_TRUE; assert(coll); if ( coll->ngeoms == 0 ) - return G_FAILURE; + return LW_FAILURE; subbox.flags = gbox->flags; for ( i = 0; i < coll->ngeoms; i++ ) { - if ( lwgeom_calculate_gbox_geodetic((LWGEOM*)(coll->geoms[i]), &subbox) == G_FAILURE ) - { - continue; - } - else + if ( lwgeom_calculate_gbox_geodetic((LWGEOM*)(coll->geoms[i]), &subbox) == LW_SUCCESS ) { + /* Keep a copy of the sub-bounding box for later */ + if ( coll->geoms[i]->bbox ) + lwfree(coll->geoms[i]->bbox); + coll->geoms[i]->bbox = gbox_copy(&subbox); if ( first ) { gbox_duplicate(&subbox, gbox); @@ -2279,7 +2423,7 @@ { gbox_merge(&subbox, gbox); } - result = G_SUCCESS; + result = LW_SUCCESS; } } return result; @@ -2287,13 +2431,13 @@ int lwgeom_calculate_gbox_geodetic(const LWGEOM *geom, GBOX *gbox) { - int result = G_FAILURE; - LWDEBUGF(4, "got type %d", TYPE_GETTYPE(geom->type)); - if ( ! FLAGS_GET_GEODETIC(gbox->flags) ) - { - lwerror("lwgeom_get_gbox_geodetic: non-geodetic gbox provided"); - } - switch (TYPE_GETTYPE(geom->type)) + int result = LW_FAILURE; + LWDEBUGF(4, "got type %d", geom->type); + + /* Add a geodetic flag to the incoming gbox */ + gbox->flags = gflags(FLAGS_GET_Z(geom->flags),FLAGS_GET_M(geom->flags),1); + + switch (geom->type) { case POINTTYPE: result = lwpoint_calculate_gbox_geodetic((LWPOINT*)geom, gbox); @@ -2304,14 +2448,20 @@ case POLYGONTYPE: result = lwpolygon_calculate_gbox_geodetic((LWPOLY *)geom, gbox); break; + case TRIANGLETYPE: + result = lwtriangle_calculate_gbox_geodetic((LWTRIANGLE *)geom, gbox); + break; case MULTIPOINTTYPE: case MULTILINETYPE: case MULTIPOLYGONTYPE: + case POLYHEDRALSURFACETYPE: + case TINTYPE: case COLLECTIONTYPE: result = lwcollection_calculate_gbox_geodetic((LWCOLLECTION *)geom, gbox); break; default: - lwerror("unsupported input geometry type: %d", TYPE_GETTYPE(geom->type)); + lwerror("lwgeom_calculate_gbox_geodetic: unsupported input geometry type: %d - %s", + geom->type, lwtype_name(geom->type)); break; } return result; @@ -2362,6 +2512,13 @@ return LW_TRUE; } +static int lwtriangle_check_geodetic(const LWTRIANGLE *triangle) +{ + assert(triangle); + return ptarray_check_geodetic(triangle->points); +} + + static int lwcollection_check_geodetic(const LWCOLLECTION *col) { int i = 0; @@ -2377,7 +2534,10 @@ int lwgeom_check_geodetic(const LWGEOM *geom) { - switch (TYPE_GETTYPE(geom->type)) + if ( lwgeom_is_empty(geom) ) + return LW_TRUE; + + switch (geom->type) { case POINTTYPE: return lwpoint_check_geodetic((LWPOINT *)geom); @@ -2385,13 +2545,18 @@ return lwline_check_geodetic((LWLINE *)geom); case POLYGONTYPE: return lwpoly_check_geodetic((LWPOLY *)geom); + case TRIANGLETYPE: + return lwtriangle_check_geodetic((LWTRIANGLE *)geom); case MULTIPOINTTYPE: case MULTILINETYPE: case MULTIPOLYGONTYPE: + case POLYHEDRALSURFACETYPE: + case TINTYPE: case COLLECTIONTYPE: return lwcollection_check_geodetic((LWCOLLECTION *)geom); default: - lwerror("unsupported input geometry type: %d", TYPE_GETTYPE(geom->type)); + lwerror("lwgeom_check_geodetic: unsupported input geometry type: %d - %s", + geom->type, lwtype_name(geom->type)); } return LW_FALSE; } @@ -2399,32 +2564,52 @@ double ptarray_length_spheroid(const POINTARRAY *pa, const SPHEROID *s) { GEOGRAPHIC_POINT a, b; - POINT2D p; + double za = 0.0, zb = 0.0; + POINT4D p; int i; + int hasz = LW_FALSE; double length = 0.0; + double seglength = 0.0; /* Return zero on non-sensical inputs */ if ( ! pa || pa->npoints < 2 ) return 0.0; + /* See if we have a third dimension */ + hasz = FLAGS_GET_Z(pa->flags); + /* Initialize first point */ - getPoint2d_p(pa, 0, &p); + getPoint4d_p(pa, 0, &p); geographic_point_init(p.x, p.y, &a); + if ( hasz ) + za = p.z; + /* Loop and sum the length for each segment */ for ( i = 1; i < pa->npoints; i++ ) { - getPoint2d_p(pa, i, &p); + seglength = 0.0; + getPoint4d_p(pa, i, &p); geographic_point_init(p.x, p.y, &b); + if ( hasz ) + zb = p.z; /* Special sphere case */ if ( s->a == s->b ) - length += s->radius * sphere_distance(&a, &b); + seglength = s->radius * sphere_distance(&a, &b); /* Spheroid case */ else - length += spheroid_distance(&a, &b, s); + seglength = spheroid_distance(&a, &b, s); + + /* Add in the vertical displacement if we're in 3D */ + if ( hasz ) + seglength = sqrt( (zb-za)*(zb-za) + seglength*seglength ); + + /* Add this segment length to the total */ + length += seglength; /* B gets incremented in the next loop, so we save the value here */ a = b; + za = zb; } return length; } @@ -2441,7 +2626,7 @@ if ( lwgeom_is_empty(geom) ) return 0.0; - type = TYPE_GETTYPE(geom->type); + type = geom->type; if ( type == POINTTYPE || type == MULTIPOINTTYPE ) return 0.0; @@ -2459,7 +2644,10 @@ return length; } - if ( lwgeom_is_collection( type ) ) + if ( type == TRIANGLETYPE ) + return ptarray_length_spheroid(((LWTRIANGLE*)geom)->points, s); + + if ( lwtype_is_collection( type ) ) { LWCOLLECTION *col = (LWCOLLECTION*)geom; @@ -2473,3 +2661,112 @@ lwerror("unsupported type passed to lwgeom_length_sphere"); return 0.0; } + +/** +* When features are snapped or sometimes they are just this way, they are very close to +* the geodetic bounds but slightly over. This routine nudges those points, and only +* those points, back over to the bounds. +* http://trac.osgeo.org/postgis/ticket/1292 +*/ +static int +ptarray_nudge_geodetic(POINTARRAY *pa) +{ + + int i; + POINT4D p; + int altered = LW_FALSE; + int rv = LW_FALSE; + static double tolerance = 1e-10; + + if ( ! pa ) + lwerror("ptarray_nudge_geodetic called with null input"); + + for(i = 0; i < pa->npoints; i++ ) + { + getPoint4d_p(pa, i, &p); + if ( p.x < -180.0 && (-180.0 - p.x < tolerance) ) + { + p.x = -180.0; + altered = LW_TRUE; + } + if ( p.x > 180.0 && (p.x - 180.0 < tolerance) ) + { + p.x = 180.0; + altered = LW_TRUE; + } + if ( p.y < -90.0 && (-90.0 - p.y < tolerance) ) + { + p.y = -90.0; + altered = LW_TRUE; + } + if ( p.y > 90.0 && (p.y - 90.0 < tolerance) ) + { + p.y = 90.0; + altered = LW_TRUE; + } + if ( altered == LW_TRUE ) + { + ptarray_set_point4d(pa, i, &p); + altered = LW_FALSE; + rv = LW_TRUE; + } + } + return rv; +} + +/** +* When features are snapped or sometimes they are just this way, they are very close to +* the geodetic bounds but slightly over. This routine nudges those points, and only +* those points, back over to the bounds. +* http://trac.osgeo.org/postgis/ticket/1292 +*/ +int +lwgeom_nudge_geodetic(LWGEOM *geom) +{ + int type; + int i = 0; + int rv = LW_FALSE; + + assert(geom); + + /* No points in nothing */ + if ( lwgeom_is_empty(geom) ) + return LW_FALSE; + + type = geom->type; + + if ( type == POINTTYPE ) + return ptarray_nudge_geodetic(((LWPOINT*)geom)->point); + + if ( type == LINETYPE ) + return ptarray_nudge_geodetic(((LWLINE*)geom)->points); + + if ( type == POLYGONTYPE ) + { + LWPOLY *poly = (LWPOLY*)geom; + for ( i = 0; i < poly->nrings; i++ ) + { + int n = ptarray_nudge_geodetic(poly->rings[i]); + rv = (rv == LW_TRUE ? rv : n); + } + return rv; + } + + if ( type == TRIANGLETYPE ) + return ptarray_nudge_geodetic(((LWTRIANGLE*)geom)->points); + + if ( lwtype_is_collection( type ) ) + { + LWCOLLECTION *col = (LWCOLLECTION*)geom; + + for ( i = 0; i < col->ngeoms; i++ ) + { + int n = lwgeom_nudge_geodetic(col->geoms[i]); + rv = (rv == LW_TRUE ? rv : n); + } + return rv; + } + + lwerror("unsupported type (%s) passed to lwgeom_nudge_geodetic", lwtype_name(type)); + return rv; +} \ No newline at end of file diff -Nru postgis-1.5.3/liblwgeom/lwgeodetic.h postgis-2.0.1/liblwgeom/lwgeodetic.h --- postgis-1.5.3/liblwgeom/lwgeodetic.h 2009-11-30 20:52:16.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwgeodetic.h 2012-02-27 22:08:12.000000000 +0000 @@ -1,5 +1,5 @@ /********************************************************************** - * $Id: lwgeodetic.h 4948 2009-11-30 20:52:16Z pramsey $ + * $Id: lwgeodetic.h 9324 2012-02-27 22:08:12Z pramsey $ * * PostGIS - Spatial Types for PostgreSQL * Copyright 2009 Paul Ramsey @@ -9,8 +9,15 @@ * **********************************************************************/ +#include "liblwgeom_internal.h" + +/* For NAN */ +#define _GNU_SOURCE #include -#include "libgeom.h" + +#ifndef NAN +#define NAN 0.0/0.0 +#endif extern int gbox_geocentric_slow; @@ -40,7 +47,7 @@ typedef struct { double measure; - uint32 index; + uint32_t index; } DISTANCE_ORDER; /** @@ -55,9 +62,8 @@ #define signum(a) ((a) < 0 ? -1 : ((a) > 0 ? 1 : (a))) /* -** Prototypes for internal functions. +* Geodetic calculations */ - void geog2cart(const GEOGRAPHIC_POINT *g, POINT3D *p); void cart2geog(const POINT3D *p, GEOGRAPHIC_POINT *g); void robust_cross_product(const GEOGRAPHIC_POINT *p, const GEOGRAPHIC_POINT *q, POINT3D *a); @@ -80,7 +86,7 @@ double edge_distance_to_edge(const GEOGRAPHIC_EDGE *e1, const GEOGRAPHIC_EDGE *e2, GEOGRAPHIC_POINT *closest1, GEOGRAPHIC_POINT *closest2); void geographic_point_init(double lon, double lat, GEOGRAPHIC_POINT *g); int ptarray_point_in_ring_winding(const POINTARRAY *pa, const POINT2D *pt_to_test); -int lwpoly_covers_point2d(const LWPOLY *poly, const GBOX *gbox, const POINT2D *pt_to_test); +int lwpoly_covers_point2d(const LWPOLY *poly, const POINT2D *pt_to_test); int ptarray_point_in_ring(const POINTARRAY *pa, const POINT2D *pt_outside, const POINT2D *pt_to_test); double ptarray_area_sphere(const POINTARRAY *pa, const POINT2D *pt_outside); double latitude_degrees_normalize(double lat); diff -Nru postgis-1.5.3/liblwgeom/lwgeom.c postgis-2.0.1/liblwgeom/lwgeom.c --- postgis-1.5.3/liblwgeom/lwgeom.c 2010-02-01 17:35:55.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwgeom.c 2012-04-20 03:23:47.000000000 +0000 @@ -1,9 +1,9 @@ /********************************************************************** - * $Id: lwgeom.c 5181 2010-02-01 17:35:55Z pramsey $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net - * Copyright 2001-2006 Refractions Research Inc. + * + * Copyright (C) 2001-2006 Refractions Research Inc. * * This is free software; you can redistribute and/or modify it under * the terms of the GNU General Public Licence. See the COPYING file. @@ -15,161 +15,34 @@ #include #include "liblwgeom_internal.h" -#include "wktparse.h" - - -LWGEOM * -lwgeom_deserialize(uchar *srl) -{ - int type = lwgeom_getType(srl[0]); - - LWDEBUGF(2, "lwgeom_deserialize got %d - %s", type, lwgeom_typename(type)); - - switch (type) - { - case POINTTYPE: - return (LWGEOM *)lwpoint_deserialize(srl); - case LINETYPE: - return (LWGEOM *)lwline_deserialize(srl); - case CIRCSTRINGTYPE: - return (LWGEOM *)lwcircstring_deserialize(srl); - case POLYGONTYPE: - return (LWGEOM *)lwpoly_deserialize(srl); - case MULTIPOINTTYPE: - return (LWGEOM *)lwmpoint_deserialize(srl); - case MULTILINETYPE: - return (LWGEOM *)lwmline_deserialize(srl); - case MULTIPOLYGONTYPE: - return (LWGEOM *)lwmpoly_deserialize(srl); - case COLLECTIONTYPE: - return (LWGEOM *)lwcollection_deserialize(srl); - case COMPOUNDTYPE: - return (LWGEOM *)lwcompound_deserialize(srl); - case CURVEPOLYTYPE: - return (LWGEOM *)lwcurvepoly_deserialize(srl); - case MULTICURVETYPE: - return (LWGEOM *)lwmcurve_deserialize(srl); - case MULTISURFACETYPE: - return (LWGEOM *)lwmsurface_deserialize(srl); - default: - lwerror("Unknown geometry type: %d", type); - - return NULL; - } - -} - -size_t -lwgeom_serialize_size(LWGEOM *lwgeom) -{ - int type = TYPE_GETTYPE(lwgeom->type); - - LWDEBUGF(2, "lwgeom_serialize_size(%s) called", lwgeom_typename(type)); - - switch (type) - { - case POINTTYPE: - return lwpoint_serialize_size((LWPOINT *)lwgeom); - case LINETYPE: - return lwline_serialize_size((LWLINE *)lwgeom); - case POLYGONTYPE: - return lwpoly_serialize_size((LWPOLY *)lwgeom); - case CIRCSTRINGTYPE: - return lwcircstring_serialize_size((LWCIRCSTRING *)lwgeom); - case CURVEPOLYTYPE: - case COMPOUNDTYPE: - case MULTIPOINTTYPE: - case MULTILINETYPE: - case MULTICURVETYPE: - case MULTIPOLYGONTYPE: - case MULTISURFACETYPE: - case COLLECTIONTYPE: - return lwcollection_serialize_size((LWCOLLECTION *)lwgeom); - default: - lwerror("Unknown geometry type: %d", type); - - return 0; - } -} - -void -lwgeom_serialize_buf(LWGEOM *lwgeom, uchar *buf, size_t *retsize) -{ - int type = TYPE_GETTYPE(lwgeom->type); - - LWDEBUGF(2, "lwgeom_serialize_buf called with a %s", - lwgeom_typename(type)); - - switch (type) - { - case POINTTYPE: - lwpoint_serialize_buf((LWPOINT *)lwgeom, buf, retsize); - break; - case LINETYPE: - lwline_serialize_buf((LWLINE *)lwgeom, buf, retsize); - break; - case POLYGONTYPE: - lwpoly_serialize_buf((LWPOLY *)lwgeom, buf, retsize); - break; - case CIRCSTRINGTYPE: - lwcircstring_serialize_buf((LWCIRCSTRING *)lwgeom, buf, retsize); - break; - case CURVEPOLYTYPE: - case COMPOUNDTYPE: - case MULTIPOINTTYPE: - case MULTILINETYPE: - case MULTICURVETYPE: - case MULTIPOLYGONTYPE: - case MULTISURFACETYPE: - case COLLECTIONTYPE: - lwcollection_serialize_buf((LWCOLLECTION *)lwgeom, buf, - retsize); - break; - default: - lwerror("Unknown geometry type: %d", type); - return; - } - return; -} - -uchar * -lwgeom_serialize(LWGEOM *lwgeom) -{ - size_t size = lwgeom_serialize_size(lwgeom); - size_t retsize; - uchar *serialized = lwalloc(size); - - lwgeom_serialize_buf(lwgeom, serialized, &retsize); - -#if POSTGIS_DEBUG_LEVEL > 0 - if ( retsize != size ) - { - lwerror("lwgeom_serialize: computed size %d, returned size %d", - size, retsize); - } -#endif +#include "lwgeom_log.h" +#include "libtgeom.h" - return serialized; -} /** Force Right-hand-rule on LWGEOM polygons **/ void -lwgeom_force_rhr(LWGEOM *lwgeom) +lwgeom_force_clockwise(LWGEOM *lwgeom) { LWCOLLECTION *coll; int i; - switch (TYPE_GETTYPE(lwgeom->type)) + switch (lwgeom->type) { case POLYGONTYPE: - lwpoly_forceRHR((LWPOLY *)lwgeom); + lwpoly_force_clockwise((LWPOLY *)lwgeom); + return; + + case TRIANGLETYPE: + lwtriangle_force_clockwise((LWTRIANGLE *)lwgeom); return; + /* Not handle POLYHEDRALSURFACE and TIN + as they are supposed to be well oriented */ case MULTIPOLYGONTYPE: case COLLECTIONTYPE: coll = (LWCOLLECTION *)lwgeom; for (i=0; ingeoms; i++) - lwgeom_force_rhr(coll->geoms[i]); + lwgeom_force_clockwise(coll->geoms[i]); return; } } @@ -181,7 +54,7 @@ int i; LWCOLLECTION *col; - switch (TYPE_GETTYPE(lwgeom->type)) + switch (lwgeom->type) { case LINETYPE: lwline_reverse((LWLINE *)lwgeom); @@ -189,8 +62,13 @@ case POLYGONTYPE: lwpoly_reverse((LWPOLY *)lwgeom); return; + case TRIANGLETYPE: + lwtriangle_reverse((LWTRIANGLE *)lwgeom); + return; case MULTILINETYPE: case MULTIPOLYGONTYPE: + case POLYHEDRALSURFACETYPE: + case TINTYPE: case COLLECTIONTYPE: col = (LWCOLLECTION *)lwgeom; for (i=0; ingeoms; i++) @@ -199,173 +77,184 @@ } } -BOX3D *lwgeom_compute_box3d(const LWGEOM *lwgeom) +LWPOINT * +lwgeom_as_lwpoint(const LWGEOM *lwgeom) { - if ( ! lwgeom ) return NULL; - - switch (TYPE_GETTYPE(lwgeom->type)) - { - case POINTTYPE: - return lwpoint_compute_box3d((LWPOINT *)lwgeom); - case LINETYPE: - return lwline_compute_box3d((LWLINE *)lwgeom); - case CIRCSTRINGTYPE: - return lwcircstring_compute_box3d((LWCIRCSTRING *)lwgeom); - case POLYGONTYPE: - return lwpoly_compute_box3d((LWPOLY *)lwgeom); - case COMPOUNDTYPE: - case CURVEPOLYTYPE: - case MULTIPOINTTYPE: - case MULTILINETYPE: - case MULTICURVETYPE: - case MULTIPOLYGONTYPE: - case MULTISURFACETYPE: - case COLLECTIONTYPE: - return lwcollection_compute_box3d((LWCOLLECTION *)lwgeom); - } - /* Never get here, please. */ - return NULL; + if ( lwgeom == NULL ) return NULL; + if ( lwgeom->type == POINTTYPE ) + return (LWPOINT *)lwgeom; + else return NULL; } - -int -lwgeom_compute_box2d_p(LWGEOM *lwgeom, BOX2DFLOAT4 *buf) +LWLINE * +lwgeom_as_lwline(const LWGEOM *lwgeom) { - LWDEBUGF(2, "lwgeom_compute_box2d_p called of %p of type %d.", lwgeom, TYPE_GETTYPE(lwgeom->type)); - - switch (TYPE_GETTYPE(lwgeom->type)) - { - case POINTTYPE: - return lwpoint_compute_box2d_p((LWPOINT *)lwgeom, buf); - case LINETYPE: - return lwline_compute_box2d_p((LWLINE *)lwgeom, buf); - case CIRCSTRINGTYPE: - return lwcircstring_compute_box2d_p((LWCIRCSTRING *)lwgeom, buf); - case POLYGONTYPE: - return lwpoly_compute_box2d_p((LWPOLY *)lwgeom, buf); - case COMPOUNDTYPE: - case CURVEPOLYTYPE: - case MULTIPOINTTYPE: - case MULTILINETYPE: - case MULTICURVETYPE: - case MULTIPOLYGONTYPE: - case MULTISURFACETYPE: - case COLLECTIONTYPE: - return lwcollection_compute_box2d_p((LWCOLLECTION *)lwgeom, buf); - } - return 0; + if ( lwgeom == NULL ) return NULL; + if ( lwgeom->type == LINETYPE ) + return (LWLINE *)lwgeom; + else return NULL; } -/** - * do not forget to lwfree() result - */ -BOX2DFLOAT4 * -lwgeom_compute_box2d(LWGEOM *lwgeom) +LWCIRCSTRING * +lwgeom_as_lwcircstring(const LWGEOM *lwgeom) { - BOX2DFLOAT4 *result = lwalloc(sizeof(BOX2DFLOAT4)); - if ( lwgeom_compute_box2d_p(lwgeom, result) ) return result; - else - { - lwfree(result); - return NULL; - } + if ( lwgeom == NULL ) return NULL; + if ( lwgeom->type == CIRCSTRINGTYPE ) + return (LWCIRCSTRING *)lwgeom; + else return NULL; } -LWPOINT * -lwgeom_as_lwpoint(LWGEOM *lwgeom) +LWCOMPOUND * +lwgeom_as_lwcompound(const LWGEOM *lwgeom) { - if ( TYPE_GETTYPE(lwgeom->type) == POINTTYPE ) - return (LWPOINT *)lwgeom; + if ( lwgeom == NULL ) return NULL; + if ( lwgeom->type == COMPOUNDTYPE ) + return (LWCOMPOUND *)lwgeom; else return NULL; } -LWLINE * -lwgeom_as_lwline(LWGEOM *lwgeom) +LWCURVEPOLY * +lwgeom_as_lwcurvepoly(const LWGEOM *lwgeom) { - if ( TYPE_GETTYPE(lwgeom->type) == LINETYPE ) - return (LWLINE *)lwgeom; + if ( lwgeom == NULL ) return NULL; + if ( lwgeom->type == CURVEPOLYTYPE ) + return (LWCURVEPOLY *)lwgeom; else return NULL; } -LWCIRCSTRING * -lwgeom_as_lwcircstring(LWGEOM *lwgeom) +LWPOLY * +lwgeom_as_lwpoly(const LWGEOM *lwgeom) { - if ( TYPE_GETTYPE(lwgeom->type) == CIRCSTRINGTYPE ) - return (LWCIRCSTRING *)lwgeom; + if ( lwgeom == NULL ) return NULL; + if ( lwgeom->type == POLYGONTYPE ) + return (LWPOLY *)lwgeom; else return NULL; } -LWPOLY * -lwgeom_as_lwpoly(LWGEOM *lwgeom) +LWTRIANGLE * +lwgeom_as_lwtriangle(const LWGEOM *lwgeom) { - if ( TYPE_GETTYPE(lwgeom->type) == POLYGONTYPE ) - return (LWPOLY *)lwgeom; + if ( lwgeom == NULL ) return NULL; + if ( lwgeom->type == TRIANGLETYPE ) + return (LWTRIANGLE *)lwgeom; else return NULL; } LWCOLLECTION * -lwgeom_as_lwcollection(LWGEOM *lwgeom) +lwgeom_as_lwcollection(const LWGEOM *lwgeom) { - if ( TYPE_GETTYPE(lwgeom->type) >= MULTIPOINTTYPE - && TYPE_GETTYPE(lwgeom->type) <= COLLECTIONTYPE) - return (LWCOLLECTION *)lwgeom; + if ( lwgeom == NULL ) return NULL; + if ( lwgeom_is_collection(lwgeom) ) + return (LWCOLLECTION*)lwgeom; else return NULL; } LWMPOINT * -lwgeom_as_lwmpoint(LWGEOM *lwgeom) +lwgeom_as_lwmpoint(const LWGEOM *lwgeom) { - if ( TYPE_GETTYPE(lwgeom->type) == MULTIPOINTTYPE ) + if ( lwgeom == NULL ) return NULL; + if ( lwgeom->type == MULTIPOINTTYPE ) return (LWMPOINT *)lwgeom; else return NULL; } LWMLINE * -lwgeom_as_lwmline(LWGEOM *lwgeom) +lwgeom_as_lwmline(const LWGEOM *lwgeom) { - if ( TYPE_GETTYPE(lwgeom->type) == MULTILINETYPE ) + if ( lwgeom == NULL ) return NULL; + if ( lwgeom->type == MULTILINETYPE ) return (LWMLINE *)lwgeom; else return NULL; } LWMPOLY * -lwgeom_as_lwmpoly(LWGEOM *lwgeom) +lwgeom_as_lwmpoly(const LWGEOM *lwgeom) { - if ( TYPE_GETTYPE(lwgeom->type) == MULTIPOLYGONTYPE ) + if ( lwgeom == NULL ) return NULL; + if ( lwgeom->type == MULTIPOLYGONTYPE ) return (LWMPOLY *)lwgeom; else return NULL; } -LWGEOM *lwmpoly_as_lwgeom(LWMPOLY *obj) +LWPSURFACE * +lwgeom_as_lwpsurface(const LWGEOM *lwgeom) +{ + if ( lwgeom->type == POLYHEDRALSURFACETYPE ) + return (LWPSURFACE *)lwgeom; + else return NULL; +} + +LWTIN * +lwgeom_as_lwtin(const LWGEOM *lwgeom) +{ + if ( lwgeom->type == TINTYPE ) + return (LWTIN *)lwgeom; + else return NULL; +} + +LWGEOM *lwtin_as_lwgeom(const LWTIN *obj) +{ + return (LWGEOM *)obj; +} + +LWGEOM *lwpsurface_as_lwgeom(const LWPSURFACE *obj) { return (LWGEOM *)obj; } -LWGEOM *lwmline_as_lwgeom(LWMLINE *obj) + +LWGEOM *lwmpoly_as_lwgeom(const LWMPOLY *obj) +{ + if ( obj == NULL ) return NULL; + return (LWGEOM *)obj; +} +LWGEOM *lwmline_as_lwgeom(const LWMLINE *obj) +{ + if ( obj == NULL ) return NULL; + return (LWGEOM *)obj; +} +LWGEOM *lwmpoint_as_lwgeom(const LWMPOINT *obj) +{ + if ( obj == NULL ) return NULL; + return (LWGEOM *)obj; +} +LWGEOM *lwcollection_as_lwgeom(const LWCOLLECTION *obj) +{ + if ( obj == NULL ) return NULL; + return (LWGEOM *)obj; +} +LWGEOM *lwcircstring_as_lwgeom(const LWCIRCSTRING *obj) { + if ( obj == NULL ) return NULL; return (LWGEOM *)obj; } -LWGEOM *lwmpoint_as_lwgeom(LWMPOINT *obj) +LWGEOM *lwcurvepoly_as_lwgeom(const LWCURVEPOLY *obj) { + if ( obj == NULL ) return NULL; return (LWGEOM *)obj; } -LWGEOM *lwcollection_as_lwgeom(LWCOLLECTION *obj) +LWGEOM *lwcompound_as_lwgeom(const LWCOMPOUND *obj) { + if ( obj == NULL ) return NULL; return (LWGEOM *)obj; } -LWGEOM *lwcircstring_as_lwgeom(LWCIRCSTRING *obj) +LWGEOM *lwpoly_as_lwgeom(const LWPOLY *obj) { + if ( obj == NULL ) return NULL; return (LWGEOM *)obj; } -LWGEOM *lwpoly_as_lwgeom(LWPOLY *obj) +LWGEOM *lwtriangle_as_lwgeom(const LWTRIANGLE *obj) { + if ( obj == NULL ) return NULL; return (LWGEOM *)obj; } -LWGEOM *lwline_as_lwgeom(LWLINE *obj) +LWGEOM *lwline_as_lwgeom(const LWLINE *obj) { + if ( obj == NULL ) return NULL; return (LWGEOM *)obj; } -LWGEOM *lwpoint_as_lwgeom(LWPOINT *obj) +LWGEOM *lwpoint_as_lwgeom(const LWPOINT *obj) { + if ( obj == NULL ) return NULL; return (LWGEOM *)obj; } @@ -373,7 +262,7 @@ /** ** Look-up for the correct MULTI* type promotion for singleton types. */ -static unsigned char MULTITYPE[16] = +static uint8_t MULTITYPE[16] = { 0, MULTIPOINTTYPE, @@ -382,8 +271,10 @@ 0,0,0,0, MULTICURVETYPE, MULTICURVETYPE, - 0,0,0, MULTISURFACETYPE, + POLYHEDRALSURFACETYPE, + 0, + TINTYPE, 0,0 }; @@ -391,89 +282,88 @@ * Create a new LWGEOM of the appropriate MULTI* type. */ LWGEOM * -lwgeom_as_multi(LWGEOM *lwgeom) +lwgeom_as_multi(const LWGEOM *lwgeom) { LWGEOM **ogeoms; LWGEOM *ogeom = NULL; - BOX2DFLOAT4 *box = NULL; + GBOX *box = NULL; int type; - ogeoms = lwalloc(sizeof(LWGEOM*)); - /* ** This funx is a no-op only if a bbox cache is already present ** in input. */ - if ( lwgeom_is_collection(TYPE_GETTYPE(lwgeom->type)) ) + if ( lwgeom_is_collection(lwgeom) ) { return lwgeom_clone(lwgeom); } - type = TYPE_GETTYPE(lwgeom->type); + type = lwgeom->type; + + if ( ! MULTITYPE[type] ) return lwgeom_clone(lwgeom); - if ( MULTITYPE[type] ) + if( lwgeom_is_empty(lwgeom) ) { + ogeom = (LWGEOM *)lwcollection_construct_empty( + MULTITYPE[type], + lwgeom->srid, + FLAGS_GET_Z(lwgeom->flags), + FLAGS_GET_M(lwgeom->flags) + ); + } + else + { + ogeoms = lwalloc(sizeof(LWGEOM*)); ogeoms[0] = lwgeom_clone(lwgeom); /* Sub-geometries are not allowed to have bboxes or SRIDs, move the bbox to the collection */ box = ogeoms[0]->bbox; ogeoms[0]->bbox = NULL; - ogeoms[0]->SRID = -1; + ogeoms[0]->srid = SRID_UNKNOWN; - ogeom = (LWGEOM *)lwcollection_construct(MULTITYPE[type], lwgeom->SRID, box, 1, ogeoms); - } - else - { - return lwgeom_clone(lwgeom); + ogeom = (LWGEOM *)lwcollection_construct(MULTITYPE[type], lwgeom->srid, box, 1, ogeoms); } return ogeom; } + +/** +* Free the containing LWGEOM and the associated BOX. Leave the underlying +* geoms/points/point objects intact. Useful for functions that are stripping +* out subcomponents of complex objects, or building up new temporary objects +* on top of subcomponents. +*/ void lwgeom_release(LWGEOM *lwgeom) { - uint32 i; - LWCOLLECTION *col; - -#ifdef INTEGRITY_CHECKS if ( ! lwgeom ) lwerror("lwgeom_release: someone called on 0x0"); -#endif + + LWDEBUGF(3, "releasing type %s", lwtype_name(lwgeom->type)); /* Drop bounding box (always a copy) */ if ( lwgeom->bbox ) { - LWDEBUG(3, "lwgeom_release: releasing bbox."); - + LWDEBUGF(3, "lwgeom_release: releasing bbox. %p", lwgeom->bbox); lwfree(lwgeom->bbox); } - - /* Collection */ - if ( (col=lwgeom_as_lwcollection(lwgeom)) ) - { - LWDEBUG(3, "lwgeom_release: Releasing collection."); - - for (i=0; ingeoms; i++) - { - lwgeom_release(col->geoms[i]); - } - lwfree(lwgeom); - } - - /* Single element */ - else lwfree(lwgeom); + lwfree(lwgeom); } -/** Clone an LWGEOM object. POINTARRAY are not copied. **/ +/* @brief Clone LWGEOM object. Serialized point lists are not copied. + * + * @see ptarray_clone + */ LWGEOM * lwgeom_clone(const LWGEOM *lwgeom) { - LWDEBUGF(2, "lwgeom_clone called with %p, %d", lwgeom, TYPE_GETTYPE(lwgeom->type)); + LWDEBUGF(2, "lwgeom_clone called with %p, %s", + lwgeom, lwtype_name(lwgeom->type)); - switch (TYPE_GETTYPE(lwgeom->type)) + switch (lwgeom->type) { case POINTTYPE: return (LWGEOM *)lwpoint_clone((LWPOINT *)lwgeom); @@ -483,89 +373,56 @@ return (LWGEOM *)lwcircstring_clone((LWCIRCSTRING *)lwgeom); case POLYGONTYPE: return (LWGEOM *)lwpoly_clone((LWPOLY *)lwgeom); + case TRIANGLETYPE: + return (LWGEOM *)lwtriangle_clone((LWTRIANGLE *)lwgeom); case COMPOUNDTYPE: case CURVEPOLYTYPE: + case MULTICURVETYPE: + case MULTISURFACETYPE: case MULTIPOINTTYPE: case MULTILINETYPE: - case MULTICURVETYPE: case MULTIPOLYGONTYPE: - case MULTISURFACETYPE: + case POLYHEDRALSURFACETYPE: + case TINTYPE: case COLLECTIONTYPE: return (LWGEOM *)lwcollection_clone((LWCOLLECTION *)lwgeom); default: + lwerror("lwgeom_clone: Unknown geometry type: %s", lwtype_name(lwgeom->type)); return NULL; } } -/** - * Add 'what' to 'to' at position 'where' - * - * @param where =0 == prepend if -1 == append - * - * Appended-to LWGEOM gets a new type based on new condition. - * Mix of dimensions is not allowed. - * @todo TODO: allow mix of dimensions? - */ +/** +* Deep-clone an #LWGEOM object. #POINTARRAY are copied. +*/ LWGEOM * -lwgeom_add(const LWGEOM *to, uint32 where, const LWGEOM *what) +lwgeom_clone_deep(const LWGEOM *lwgeom) { - if ( TYPE_NDIMS(what->type) != TYPE_NDIMS(to->type) ) - { - lwerror("lwgeom_add: mixed dimensions not supported"); - return NULL; - } + LWDEBUGF(2, "lwgeom_clone called with %p, %s", + lwgeom, lwtype_name(lwgeom->type)); - LWDEBUGF(2, "lwgeom_add(%s, %d, %s) called", - lwgeom_typename(TYPE_GETTYPE(to->type)), - where, - lwgeom_typename(TYPE_GETTYPE(what->type))); - - switch (TYPE_GETTYPE(to->type)) + switch (lwgeom->type) { case POINTTYPE: - return (LWGEOM *)lwpoint_add((const LWPOINT *)to, where, what); case LINETYPE: - return (LWGEOM *)lwline_add((const LWLINE *)to, where, what); - case CIRCSTRINGTYPE: - return (LWGEOM *)lwcircstring_add((const LWCIRCSTRING *)to, where, what); - + case TRIANGLETYPE: + return (LWGEOM *)lwline_clone_deep((LWLINE *)lwgeom); case POLYGONTYPE: - return (LWGEOM *)lwpoly_add((const LWPOLY *)to, where, what); - + return (LWGEOM *)lwpoly_clone_deep((LWPOLY *)lwgeom); case COMPOUNDTYPE: - return (LWGEOM *)lwcompound_add((const LWCOMPOUND *)to, where, what); - case CURVEPOLYTYPE: - return (LWGEOM *)lwcurvepoly_add((const LWCURVEPOLY *)to, where, what); - + case MULTICURVETYPE: + case MULTISURFACETYPE: case MULTIPOINTTYPE: - return (LWGEOM *)lwmpoint_add((const LWMPOINT *)to, - where, what); - case MULTILINETYPE: - return (LWGEOM *)lwmline_add((const LWMLINE *)to, - where, what); - - case MULTICURVETYPE: - return (LWGEOM *)lwmcurve_add((const LWMCURVE *)to, - where, what); - case MULTIPOLYGONTYPE: - return (LWGEOM *)lwmpoly_add((const LWMPOLY *)to, - where, what); - - case MULTISURFACETYPE: - return (LWGEOM *)lwmsurface_add((const LWMSURFACE *)to, - where, what); - + case POLYHEDRALSURFACETYPE: + case TINTYPE: case COLLECTIONTYPE: - return (LWGEOM *)lwcollection_add( - (const LWCOLLECTION *)to, where, what); - + return (LWGEOM *)lwcollection_clone_deep((LWCOLLECTION *)lwgeom); default: - lwerror("lwgeom_add: unknown geometry type: %d", - TYPE_GETTYPE(to->type)); + lwerror("lwgeom_clone_deep: Unknown geometry type: %s", lwtype_name(lwgeom->type)); return NULL; } } @@ -574,228 +431,58 @@ /** * Return an alloced string */ -char * -lwgeom_to_ewkt(LWGEOM *lwgeom, int flags) +char* +lwgeom_to_ewkt(const LWGEOM *lwgeom) { - LWGEOM_UNPARSER_RESULT lwg_unparser_result; - uchar *serialized = lwgeom_serialize(lwgeom); - int result; + char* wkt = NULL; + size_t wkt_size = 0; + + wkt = lwgeom_to_wkt(lwgeom, WKT_EXTENDED, 12, &wkt_size); - if ( ! serialized ) + if ( ! wkt ) { - lwerror("Error serializing geom %p", lwgeom); + lwerror("Error writing geom %p to WKT", lwgeom); } - result = unparse_WKT(&lwg_unparser_result, serialized, lwalloc, lwfree, flags); - lwfree(serialized); - - return lwg_unparser_result.wkoutput; + return wkt; } /** - * Return an alloced string + * @brief geom1 same as geom2 + * iff + * + have same type + * + have same # objects + * + have same bvol + * + each object in geom1 has a corresponding object in geom2 (see above) + * @param lwgeom1 + * @param lwgeom2 */ -char * -lwgeom_to_hexwkb(LWGEOM *lwgeom, int flags, unsigned int byteorder) +char +lwgeom_same(const LWGEOM *lwgeom1, const LWGEOM *lwgeom2) { - LWGEOM_UNPARSER_RESULT lwg_unparser_result; - uchar *serialized = lwgeom_serialize(lwgeom); - int result; + LWDEBUGF(2, "lwgeom_same(%s, %s) called", + lwtype_name(lwgeom1->type), + lwtype_name(lwgeom2->type)); - result = unparse_WKB(&lwg_unparser_result, serialized, lwalloc, lwfree, flags, byteorder,1); + if ( lwgeom1->type != lwgeom2->type ) + { + LWDEBUG(3, " type differ"); - lwfree(serialized); - return lwg_unparser_result.wkoutput; -} + return LW_FALSE; + } -/** - * Return an alloced string - */ -uchar * -lwgeom_to_ewkb(LWGEOM *lwgeom, int flags, char byteorder, size_t *outsize) -{ - LWGEOM_UNPARSER_RESULT lwg_unparser_result; - uchar *serialized = lwgeom_serialize(lwgeom); - int result; + if ( FLAGS_GET_ZM(lwgeom1->flags) != FLAGS_GET_ZM(lwgeom2->flags) ) + { + LWDEBUG(3, " ZM flags differ"); - /* - * We cast return to "unsigned" char as we are - * requesting a "binary" output, not HEX - * (last argument set to 0) - */ - result = unparse_WKB(&lwg_unparser_result, serialized, lwalloc, lwfree, - flags, byteorder, 0); - lwfree(serialized); - return (uchar *)lwg_unparser_result.wkoutput; -} - -/** - * Make an LWGEOM object from a EWKB binary representation. - * Currently highly unoptimized as it: - * - convert EWKB to HEXEWKB - * - construct PG_LWGEOM - * - deserialize it - */ -LWGEOM * -lwgeom_from_ewkb(uchar *ewkb, int flags, size_t size) -{ - size_t hexewkblen = size*2; - char *hexewkb; - long int i; - int result; - LWGEOM *ret; - LWGEOM_PARSER_RESULT lwg_parser_result; - - /* "HEXify" the EWKB */ - hexewkb = lwalloc(hexewkblen+1); - for (i=0; itype)), - lwgeom_typename(TYPE_GETTYPE(lwgeom2->type))); - - if ( TYPE_GETTYPE(lwgeom1->type) != TYPE_GETTYPE(lwgeom2->type) ) - { - LWDEBUG(3, " type differ"); - - return LW_FALSE; - } - - if ( TYPE_GETZM(lwgeom1->type) != TYPE_GETZM(lwgeom2->type) ) - { - LWDEBUG(3, " ZM flags differ"); - - return LW_FALSE; - } + return LW_FALSE; + } /* Check boxes if both already computed */ if ( lwgeom1->bbox && lwgeom2->bbox ) { /*lwnotice("bbox1:%p, bbox2:%p", lwgeom1->bbox, lwgeom2->bbox);*/ - if ( ! box2d_same(lwgeom1->bbox, lwgeom2->bbox) ) + if ( ! gbox_same(lwgeom1->bbox, lwgeom2->bbox) ) { LWDEBUG(3, " bounding boxes differ"); @@ -804,7 +491,7 @@ } /* geoms have same type, invoke type-specific function */ - switch (TYPE_GETTYPE(lwgeom1->type)) + switch (lwgeom1->type) { case POINTTYPE: return lwpoint_same((LWPOINT *)lwgeom1, @@ -815,34 +502,38 @@ case POLYGONTYPE: return lwpoly_same((LWPOLY *)lwgeom1, (LWPOLY *)lwgeom2); + case TRIANGLETYPE: + return lwtriangle_same((LWTRIANGLE *)lwgeom1, + (LWTRIANGLE *)lwgeom2); + case CIRCSTRINGTYPE: + return lwcircstring_same((LWCIRCSTRING *)lwgeom1, + (LWCIRCSTRING *)lwgeom2); case MULTIPOINTTYPE: case MULTILINETYPE: case MULTIPOLYGONTYPE: + case MULTICURVETYPE: + case MULTISURFACETYPE: + case COMPOUNDTYPE: + case CURVEPOLYTYPE: + case POLYHEDRALSURFACETYPE: + case TINTYPE: case COLLECTIONTYPE: return lwcollection_same((LWCOLLECTION *)lwgeom1, (LWCOLLECTION *)lwgeom2); default: lwerror("lwgeom_same: unsupported geometry type: %s", - lwgeom_typename(TYPE_GETTYPE(lwgeom1->type))); + lwtype_name(lwgeom1->type)); return LW_FALSE; } } void -lwgeom_changed(LWGEOM *lwgeom) -{ - if ( lwgeom->bbox ) lwfree(lwgeom->bbox); - lwgeom->bbox = NULL; - TYPE_SETHASBBOX(lwgeom->type, 0); -} - -void lwgeom_drop_bbox(LWGEOM *lwgeom) { if ( lwgeom->bbox ) lwfree(lwgeom->bbox); lwgeom->bbox = NULL; - TYPE_SETHASBBOX(lwgeom->type, 0); + FLAGS_SET_BBOX(lwgeom->flags, 0); } /** @@ -853,22 +544,47 @@ void lwgeom_add_bbox(LWGEOM *lwgeom) { + /* an empty LWGEOM has no bbox */ + if( lwgeom_is_empty(lwgeom) ) return; + if ( lwgeom->bbox ) return; - lwgeom->bbox = lwgeom_compute_box2d(lwgeom); - TYPE_SETHASBBOX(lwgeom->type, 1); + FLAGS_SET_BBOX(lwgeom->flags, 1); + lwgeom->bbox = gbox_new(lwgeom->flags); + lwgeom_calculate_gbox(lwgeom, lwgeom->bbox); +} + +const GBOX * +lwgeom_get_bbox(const LWGEOM *lwg) +{ + /* add it if not already there */ + lwgeom_add_bbox((LWGEOM *)lwg); + return lwg->bbox; +} + + +/** +* Calculate the gbox for this goemetry, a cartesian box or +* geodetic box, depending on how it is flagged. +*/ +int lwgeom_calculate_gbox(const LWGEOM *lwgeom, GBOX *gbox) +{ + gbox->flags = lwgeom->flags; + if( FLAGS_GET_GEODETIC(lwgeom->flags) ) + return lwgeom_calculate_gbox_geodetic(lwgeom, gbox); + else + return lwgeom_calculate_gbox_cartesian(lwgeom, gbox); } void -lwgeom_dropSRID(LWGEOM *lwgeom) +lwgeom_drop_srid(LWGEOM *lwgeom) { - TYPE_SETHASSRID(lwgeom->type, 0); - lwgeom->SRID = -1; + lwgeom->srid = SRID_UNKNOWN; /* TODO: To be changed to SRID_UNKNOWN */ } LWGEOM * lwgeom_segmentize2d(LWGEOM *lwgeom, double dist) { - switch (TYPE_GETTYPE(lwgeom->type)) + switch (lwgeom->type) { case LINETYPE: return (LWGEOM *)lwline_segmentize2d((LWLINE *)lwgeom, @@ -887,15 +603,143 @@ } } +LWGEOM* +lwgeom_force_2d(const LWGEOM *geom) +{ + return lwgeom_force_dims(geom, 0, 0); +} + +LWGEOM* +lwgeom_force_3dz(const LWGEOM *geom) +{ + return lwgeom_force_dims(geom, 1, 0); +} + +LWGEOM* +lwgeom_force_3dm(const LWGEOM *geom) +{ + return lwgeom_force_dims(geom, 0, 1); +} + +LWGEOM* +lwgeom_force_4d(const LWGEOM *geom) +{ + return lwgeom_force_dims(geom, 1, 1); +} + +LWGEOM* +lwgeom_force_dims(const LWGEOM *geom, int hasz, int hasm) +{ + switch(geom->type) + { + case POINTTYPE: + return lwpoint_as_lwgeom(lwpoint_force_dims((LWPOINT*)geom, hasz, hasm)); + case CIRCSTRINGTYPE: + case LINETYPE: + case TRIANGLETYPE: + return lwline_as_lwgeom(lwline_force_dims((LWLINE*)geom, hasz, hasm)); + case POLYGONTYPE: + return lwpoly_as_lwgeom(lwpoly_force_dims((LWPOLY*)geom, hasz, hasm)); + case COMPOUNDTYPE: + case CURVEPOLYTYPE: + case MULTICURVETYPE: + case MULTISURFACETYPE: + case MULTIPOINTTYPE: + case MULTILINETYPE: + case MULTIPOLYGONTYPE: + case POLYHEDRALSURFACETYPE: + case TINTYPE: + case COLLECTIONTYPE: + return lwcollection_as_lwgeom(lwcollection_force_dims((LWCOLLECTION*)geom, hasz, hasm)); + default: + lwerror("lwgeom_force_2d: unsupported geom type: %s", lwtype_name(geom->type)); + return NULL; + } +} + +int32_t +lwgeom_get_srid(const LWGEOM *geom) +{ + if ( ! geom ) return SRID_UNKNOWN; + return geom->srid; +} + +int +lwgeom_has_z(const LWGEOM *geom) +{ + if ( ! geom ) return LW_FALSE; + return FLAGS_GET_Z(geom->flags); +} + +int +lwgeom_has_m(const LWGEOM *geom) +{ + if ( ! geom ) return LW_FALSE; + return FLAGS_GET_M(geom->flags); +} + +int +lwgeom_ndims(const LWGEOM *geom) +{ + if ( ! geom ) return 0; + return FLAGS_NDIMS(geom->flags); +} + + +void +lwgeom_set_geodetic(LWGEOM *geom, int value) +{ + LWPOINT *pt; + LWLINE *ln; + LWPOLY *ply; + LWCOLLECTION *col; + int i; + + FLAGS_SET_GEODETIC(geom->flags, value); + if ( geom->bbox ) + FLAGS_SET_GEODETIC(geom->bbox->flags, value); + + switch(geom->type) + { + case POINTTYPE: + pt = (LWPOINT*)geom; + if ( pt->point ) + FLAGS_SET_GEODETIC(pt->point->flags, value); + break; + case LINETYPE: + ln = (LWLINE*)geom; + if ( ln->points ) + FLAGS_SET_GEODETIC(ln->points->flags, value); + break; + case POLYGONTYPE: + ply = (LWPOLY*)geom; + for ( i = 0; i < ply->nrings; i++ ) + FLAGS_SET_GEODETIC(ply->rings[i]->flags, value); + break; + case MULTIPOINTTYPE: + case MULTILINETYPE: + case MULTIPOLYGONTYPE: + case COLLECTIONTYPE: + col = (LWCOLLECTION*)geom; + for ( i = 0; i < col->ngeoms; i++ ) + lwgeom_set_geodetic(col->geoms[i], value); + break; + default: + lwerror("lwgeom_set_geodetic: unsupported geom type: %s", lwtype_name(geom->type)); + return; + } +} + void lwgeom_longitude_shift(LWGEOM *lwgeom) { int i; - switch (TYPE_GETTYPE(lwgeom->type)) + switch (lwgeom->type) { LWPOINT *point; LWLINE *line; LWPOLY *poly; + LWTRIANGLE *triangle; LWCOLLECTION *coll; case POINTTYPE: @@ -911,24 +755,80 @@ for (i=0; inrings; i++) ptarray_longitude_shift(poly->rings[i]); return; + case TRIANGLETYPE: + triangle = (LWTRIANGLE *)lwgeom; + ptarray_longitude_shift(triangle->points); + return; case MULTIPOINTTYPE: case MULTILINETYPE: case MULTIPOLYGONTYPE: + case POLYHEDRALSURFACETYPE: + case TINTYPE: case COLLECTIONTYPE: coll = (LWCOLLECTION *)lwgeom; for (i=0; ingeoms; i++) lwgeom_longitude_shift(coll->geoms[i]); return; default: - lwerror("%s:%d: unsupported geom type: %s", - __FILE__, __LINE__, - lwgeom_typename(TYPE_GETTYPE(lwgeom->type))); + lwerror("lwgeom_longitude_shift: unsupported geom type: %s", + lwtype_name(lwgeom->type)); + } +} + +int +lwgeom_is_closed(const LWGEOM *geom) +{ + int type = geom->type; + + if( lwgeom_is_empty(geom) ) + return LW_FALSE; + + /* Test linear types for closure */ + switch (type) + { + case LINETYPE: + return lwline_is_closed((LWLINE*)geom); + case POLYGONTYPE: + return lwpoly_is_closed((LWPOLY*)geom); + case CIRCSTRINGTYPE: + return lwcircstring_is_closed((LWCIRCSTRING*)geom); + case COMPOUNDTYPE: + return lwcompound_is_closed((LWCOMPOUND*)geom); + case TINTYPE: + return lwtin_is_closed((LWTIN*)geom); + case POLYHEDRALSURFACETYPE: + return lwpsurface_is_closed((LWPSURFACE*)geom); + } + + /* Recurse into collections and see if anything is not closed */ + if ( lwgeom_is_collection(geom) ) + { + LWCOLLECTION *col = lwgeom_as_lwcollection(geom); + int i; + int closed; + for ( i = 0; i < col->ngeoms; i++ ) + { + closed = lwgeom_is_closed(col->geoms[i]); + if ( ! closed ) + return LW_FALSE; + } + return LW_TRUE; } + + /* All non-linear non-collection types we will call closed */ + return LW_TRUE; +} + +int +lwgeom_is_collection(const LWGEOM *geom) +{ + if( ! geom ) return LW_FALSE; + return lwtype_is_collection(geom->type); } /** Return TRUE if the geometry may contain sub-geometries, i.e. it is a MULTI* or COMPOUNDCURVE */ int -lwgeom_is_collection(int type) +lwtype_is_collection(uint8_t type) { switch (type) @@ -937,21 +837,57 @@ case MULTILINETYPE: case MULTIPOLYGONTYPE: case COLLECTIONTYPE: + case CURVEPOLYTYPE: case COMPOUNDTYPE: case MULTICURVETYPE: case MULTISURFACETYPE: - return -1; + case POLYHEDRALSURFACETYPE: + case TINTYPE: + return LW_TRUE; break; default: - return 0; + return LW_FALSE; + } +} + +/** +* Given an lwtype number, what homogeneous collection can hold it? +*/ +int +lwtype_get_collectiontype(uint8_t type) +{ + switch (type) + { + case POINTTYPE: + return MULTIPOINTTYPE; + case LINETYPE: + return MULTILINETYPE; + case POLYGONTYPE: + return MULTIPOLYGONTYPE; + case CIRCSTRINGTYPE: + return MULTICURVETYPE; + case COMPOUNDTYPE: + return MULTICURVETYPE; + case CURVEPOLYTYPE: + return MULTISURFACETYPE; + case TRIANGLETYPE: + return TINTYPE; + default: + return COLLECTIONTYPE; } } + void lwgeom_free(LWGEOM *lwgeom) { - switch (TYPE_GETTYPE(lwgeom->type)) + /* There's nothing here to free... */ + if( ! lwgeom ) return; + + LWDEBUGF(5,"freeing a %s",lwtype_name(lwgeom->type)); + + switch (lwgeom->type) { case POINTTYPE: lwpoint_free((LWPOINT *)lwgeom); @@ -962,6 +898,12 @@ case POLYGONTYPE: lwpoly_free((LWPOLY *)lwgeom); break; + case CIRCSTRINGTYPE: + lwcircstring_free((LWCIRCSTRING *)lwgeom); + break; + case TRIANGLETYPE: + lwtriangle_free((LWTRIANGLE *)lwgeom); + break; case MULTIPOINTTYPE: lwmpoint_free((LWMPOINT *)lwgeom); break; @@ -971,139 +913,202 @@ case MULTIPOLYGONTYPE: lwmpoly_free((LWMPOLY *)lwgeom); break; + case POLYHEDRALSURFACETYPE: + lwpsurface_free((LWPSURFACE *)lwgeom); + break; + case TINTYPE: + lwtin_free((LWTIN *)lwgeom); + break; + case CURVEPOLYTYPE: + case COMPOUNDTYPE: + case MULTICURVETYPE: + case MULTISURFACETYPE: case COLLECTIONTYPE: lwcollection_free((LWCOLLECTION *)lwgeom); break; + default: + lwerror("lwgeom_free called with unknown type (%d) %s", lwgeom->type, lwtype_name(lwgeom->type)); } return; - } - int lwgeom_needs_bbox(const LWGEOM *geom) { assert(geom); - if ( TYPE_GETTYPE(geom->type) == POINTTYPE ) + if ( geom->type == POINTTYPE ) { return LW_FALSE; } return LW_TRUE; } - -/* -** Count points in an LWGEOM. +/** +* Count points in an #LWGEOM. */ - -static int lwcollection_count_vertices(LWCOLLECTION *col) -{ - int i = 0; - int v = 0; /* vertices */ - assert(col); - for ( i = 0; i < col->ngeoms; i++ ) - { - v += lwgeom_count_vertices(col->geoms[i]); - } - return v; -} - -static int lwpolygon_count_vertices(LWPOLY *poly) +int lwgeom_count_vertices(const LWGEOM *geom) { - int i = 0; - int v = 0; /* vertices */ - assert(poly); - for ( i = 0; i < poly->nrings; i ++ ) - { - v += poly->rings[i]->npoints; - } - return v; -} + int result = 0; + + /* Null? Zero. */ + if( ! geom ) return 0; + + LWDEBUGF(4, "lwgeom_count_vertices got type %s", + lwtype_name(geom->type)); -static int lwline_count_vertices(LWLINE *line) -{ - assert(line); - if ( ! line->points ) - return 0; - return line->points->npoints; -} + /* Empty? Zero. */ + if( lwgeom_is_empty(geom) ) return 0; -static int lwpoint_count_vertices(LWPOINT *point) -{ - assert(point); - if ( ! point->point ) - return 0; - return 1; -} - -int lwgeom_count_vertices(LWGEOM *geom) -{ - int result = 0; - LWDEBUGF(4, "got type %d", TYPE_GETTYPE(geom->type)); - switch (TYPE_GETTYPE(geom->type)) + switch (geom->type) { case POINTTYPE: - result = lwpoint_count_vertices((LWPOINT *)geom);; + result = 1; break; + case TRIANGLETYPE: + case CIRCSTRINGTYPE: case LINETYPE: result = lwline_count_vertices((LWLINE *)geom); break; case POLYGONTYPE: - result = lwpolygon_count_vertices((LWPOLY *)geom); + result = lwpoly_count_vertices((LWPOLY *)geom); break; + case COMPOUNDTYPE: + case CURVEPOLYTYPE: + case MULTICURVETYPE: + case MULTISURFACETYPE: case MULTIPOINTTYPE: case MULTILINETYPE: case MULTIPOLYGONTYPE: + case POLYHEDRALSURFACETYPE: + case TINTYPE: case COLLECTIONTYPE: result = lwcollection_count_vertices((LWCOLLECTION *)geom); break; default: - lwerror("unsupported input geometry type: %d", TYPE_GETTYPE(geom->type)); + lwerror("lwgeom_count_vertices: unsupported input geometry type: %s", + lwtype_name(geom->type)); break; } LWDEBUGF(3, "counted %d vertices", result); return result; } -static int lwpoint_is_empty(const LWPOINT *point) +/** +* For an #LWGEOM, returns 0 for points, 1 for lines, +* 2 for polygons, 3 for volume, and the max dimension +* of a collection. +*/ +int lwgeom_dimension(const LWGEOM *geom) { - if ( ! point->point || point->point->npoints == 0 ) - return LW_TRUE; - return LW_FALSE; -} -static int lwline_is_empty(const LWLINE *line) -{ - if ( !line->points || line->points->npoints == 0 ) - return LW_TRUE; - return LW_FALSE; -} + /* Null? Zero. */ + if( ! geom ) return -1; + + LWDEBUGF(4, "lwgeom_dimension got type %s", + lwtype_name(geom->type)); -static int lwpoly_is_empty(const LWPOLY *poly) -{ - if ( !poly->rings || poly->nrings == 0 ) - return LW_TRUE; - return LW_FALSE; -} + /* Empty? Zero. */ + /* if( lwgeom_is_empty(geom) ) return 0; */ -static int lwcircstring_is_empty(const LWCIRCSTRING *circ) -{ - if ( !circ->points || circ->points->npoints == 0 ) - return LW_TRUE; - return LW_FALSE; + switch (geom->type) + { + case POINTTYPE: + case MULTIPOINTTYPE: + return 0; + case CIRCSTRINGTYPE: + case LINETYPE: + case COMPOUNDTYPE: + case MULTICURVETYPE: + case MULTILINETYPE: + return 1; + case TRIANGLETYPE: + case POLYGONTYPE: + case CURVEPOLYTYPE: + case MULTISURFACETYPE: + case MULTIPOLYGONTYPE: + case TINTYPE: + return 2; + case POLYHEDRALSURFACETYPE: + { + /* A closed polyhedral surface contains a volume. */ + int closed = lwpsurface_is_closed((LWPSURFACE*)geom); + return ( closed ? 3 : 2 ); + } + case COLLECTIONTYPE: + { + int maxdim = 0, i; + LWCOLLECTION *col = (LWCOLLECTION*)geom; + for( i = 0; i < col->ngeoms; i++ ) + { + int dim = lwgeom_dimension(col->geoms[i]); + maxdim = ( dim > maxdim ? dim : maxdim ); + } + return maxdim; + } + default: + lwerror("lwgeom_dimension: unsupported input geometry type: %s", + lwtype_name(geom->type)); + } + return -1; } -static int lwcollection_is_empty(const LWCOLLECTION *col) +/** +* Count rings in an #LWGEOM. +*/ +int lwgeom_count_rings(const LWGEOM *geom) { - if ( !col->geoms || col->ngeoms == 0 ) - return LW_TRUE; - return LW_FALSE; + int result = 0; + + /* Null? Empty? Zero. */ + if( ! geom || lwgeom_is_empty(geom) ) + return 0; + + switch (geom->type) + { + case POINTTYPE: + case CIRCSTRINGTYPE: + case COMPOUNDTYPE: + case MULTICURVETYPE: + case MULTIPOINTTYPE: + case MULTILINETYPE: + case LINETYPE: + result = 0; + break; + case TRIANGLETYPE: + result = 1; + break; + case POLYGONTYPE: + result = ((LWPOLY *)geom)->nrings; + break; + case CURVEPOLYTYPE: + result = ((LWCURVEPOLY *)geom)->nrings; + break; + case MULTISURFACETYPE: + case MULTIPOLYGONTYPE: + case POLYHEDRALSURFACETYPE: + case TINTYPE: + case COLLECTIONTYPE: + { + LWCOLLECTION *col = (LWCOLLECTION*)geom; + int i = 0; + for( i = 0; i < col->ngeoms; i++ ) + result += lwgeom_count_rings(col->geoms[i]); + break; + } + default: + lwerror("lwgeom_count_rings: unsupported input geometry type: %s", lwtype_name(geom->type)); + break; + } + LWDEBUGF(3, "counted %d rings", result); + return result; } int lwgeom_is_empty(const LWGEOM *geom) { int result = LW_FALSE; - LWDEBUGF(4, "got type %d", TYPE_GETTYPE(geom->type)); - switch (TYPE_GETTYPE(geom->type)) + LWDEBUGF(4, "lwgeom_is_empty: got type %s", + lwtype_name(geom->type)); + + switch (geom->type) { case POINTTYPE: return lwpoint_is_empty((LWPOINT*)geom); @@ -1117,22 +1122,38 @@ case POLYGONTYPE: return lwpoly_is_empty((LWPOLY*)geom); break; + case TRIANGLETYPE: + return lwtriangle_is_empty((LWTRIANGLE*)geom); + break; case MULTIPOINTTYPE: case MULTILINETYPE: case MULTIPOLYGONTYPE: case COMPOUNDTYPE: + case CURVEPOLYTYPE: case MULTICURVETYPE: case MULTISURFACETYPE: + case POLYHEDRALSURFACETYPE: + case TINTYPE: case COLLECTIONTYPE: return lwcollection_is_empty((LWCOLLECTION *)geom); break; default: - lwerror("unsupported input geometry type: %d", TYPE_GETTYPE(geom->type)); + lwerror("lwgeom_is_empty: unsupported input geometry type: %s", + lwtype_name(geom->type)); break; } return result; } +int lwgeom_has_srid(const LWGEOM *geom) +{ + if ( geom->srid != SRID_UNKNOWN ) + return LW_TRUE; + + return LW_FALSE; +} + + static int lwcollection_dimensionality(LWCOLLECTION *col) { int i; @@ -1148,8 +1169,12 @@ extern int lwgeom_dimensionality(LWGEOM *geom) { - LWDEBUGF(4, "got type %d", TYPE_GETTYPE(geom->type)); - switch (TYPE_GETTYPE(geom->type)) + int dim; + + LWDEBUGF(3, "lwgeom_dimensionality got type %s", + lwtype_name(geom->type)); + + switch (geom->type) { case POINTTYPE: case MULTIPOINTTYPE: @@ -1163,17 +1188,370 @@ return 1; break; case POLYGONTYPE: + case TRIANGLETYPE: case CURVEPOLYTYPE: case MULTIPOLYGONTYPE: case MULTISURFACETYPE: return 2; break; + + case POLYHEDRALSURFACETYPE: + case TINTYPE: + dim = lwgeom_is_solid(geom)?3:2; + return dim; + break; + case COLLECTIONTYPE: return lwcollection_dimensionality((LWCOLLECTION *)geom); break; default: - lwerror("unsupported input geometry type: %d", TYPE_GETTYPE(geom->type)); + lwerror("lwgeom_dimensionality: unsupported input geometry type: %s", + lwtype_name(geom->type)); + break; + } + return 0; +} + +extern LWGEOM* lwgeom_remove_repeated_points(LWGEOM *in) +{ + LWDEBUGF(4, "lwgeom_remove_repeated_points got type %s", + lwtype_name(in->type)); + + switch (in->type) + { + case MULTIPOINTTYPE: + return lwmpoint_remove_repeated_points((LWMPOINT*)in); + break; + case LINETYPE: + return lwline_remove_repeated_points((LWLINE*)in); + + case MULTILINETYPE: + case COLLECTIONTYPE: + case MULTIPOLYGONTYPE: + case POLYHEDRALSURFACETYPE: + return lwcollection_remove_repeated_points((LWCOLLECTION *)in); + + case POLYGONTYPE: + return lwpoly_remove_repeated_points((LWPOLY *)in); + break; + + case POINTTYPE: + case TRIANGLETYPE: + case TINTYPE: + /* No point is repeated for a single point, or for Triangle or TIN */ + return in; + + case CIRCSTRINGTYPE: + case COMPOUNDTYPE: + case MULTICURVETYPE: + case CURVEPOLYTYPE: + case MULTISURFACETYPE: + /* Dunno how to handle these, will return untouched */ + return in; + + default: + lwnotice("lwgeom_remove_repeated_points: unsupported geometry type: %s", + lwtype_name(in->type)); + return in; break; } return 0; } + +LWGEOM* lwgeom_flip_coordinates(LWGEOM *in) +{ + LWCOLLECTION *col; + LWPOLY *poly; + int i; + + LWDEBUGF(4, "lwgeom_flip_coordinates, got type: %s", + lwtype_name(in->type)); + + switch (in->type) + { + case POINTTYPE: + ptarray_flip_coordinates(lwgeom_as_lwpoint(in)->point); + return in; + + case LINETYPE: + ptarray_flip_coordinates(lwgeom_as_lwline(in)->points); + return in; + + case CIRCSTRINGTYPE: + ptarray_flip_coordinates(lwgeom_as_lwcircstring(in)->points); + return in; + + case POLYGONTYPE: + poly = (LWPOLY *) in; + for (i=0; inrings; i++) + ptarray_flip_coordinates(poly->rings[i]); + return in; + + case TRIANGLETYPE: + ptarray_flip_coordinates(lwgeom_as_lwtriangle(in)->points); + return in; + + case MULTIPOINTTYPE: + case MULTILINETYPE: + case MULTIPOLYGONTYPE: + case COLLECTIONTYPE: + case COMPOUNDTYPE: + case CURVEPOLYTYPE: + case MULTISURFACETYPE: + case MULTICURVETYPE: + case POLYHEDRALSURFACETYPE: + case TINTYPE: + col = (LWCOLLECTION *) in; + for (i=0; ingeoms; i++) + lwgeom_flip_coordinates(col->geoms[i]); + return in; + + default: + lwerror("lwgeom_flip_coordinates: unsupported geometry type: %s", + lwtype_name(in->type)); + } + return NULL; +} + +void lwgeom_set_srid(LWGEOM *geom, int32_t srid) +{ + int i; + + LWDEBUGF(4,"entered with srid=%d",srid); + + geom->srid = srid; + + if ( lwgeom_is_collection(geom) ) + { + /* All the children are set to the unknown SRID value + TODO: change this so the children have a known SRID? */ + LWCOLLECTION *col = lwgeom_as_lwcollection(geom); + for ( i = 0; i < col->ngeoms; i++ ) + { + lwgeom_set_srid(col->geoms[i], SRID_UNKNOWN); + } + } +} + +LWGEOM* lwgeom_simplify(const LWGEOM *igeom, double dist) +{ + switch (igeom->type) + { + case POINTTYPE: + case MULTIPOINTTYPE: + return lwgeom_clone(igeom); + case LINETYPE: + return (LWGEOM*)lwline_simplify((LWLINE*)igeom, dist); + case POLYGONTYPE: + return (LWGEOM*)lwpoly_simplify((LWPOLY*)igeom, dist); + case MULTILINETYPE: + case MULTIPOLYGONTYPE: + case COLLECTIONTYPE: + return (LWGEOM*)lwcollection_simplify((LWCOLLECTION *)igeom, dist); + default: + lwerror("lwgeom_simplify: unsupported geometry type: %s",lwtype_name(igeom->type)); + } + return NULL; +} + +double lwgeom_area(const LWGEOM *geom) +{ + int type = geom->type; + + if ( type == POLYGONTYPE ) + return lwpoly_area((LWPOLY*)geom); + else if ( type == CURVEPOLYTYPE ) + return lwcurvepoly_area((LWCURVEPOLY*)geom); + else if (type == TRIANGLETYPE ) + return lwtriangle_area((LWTRIANGLE*)geom); + else if ( lwgeom_is_collection(geom) ) + { + double area = 0.0; + int i; + LWCOLLECTION *col = (LWCOLLECTION*)geom; + for ( i = 0; i < col->ngeoms; i++ ) + area += lwgeom_area(col->geoms[i]); + return area; + } + else + return 0.0; +} + +double lwgeom_perimeter(const LWGEOM *geom) +{ + int type = geom->type; + if ( type == POLYGONTYPE ) + return lwpoly_perimeter((LWPOLY*)geom); + else if ( type == CURVEPOLYTYPE ) + return lwcurvepoly_perimeter((LWCURVEPOLY*)geom); + else if ( type == TRIANGLETYPE ) + return lwtriangle_perimeter((LWTRIANGLE*)geom); + else if ( type == POLYHEDRALSURFACETYPE || type == TINTYPE ) + { + return tgeom_perimeter(tgeom_from_lwgeom(geom)); + } + else if ( lwgeom_is_collection(geom) ) + { + double perimeter = 0.0; + int i; + LWCOLLECTION *col = (LWCOLLECTION*)geom; + for ( i = 0; i < col->ngeoms; i++ ) + perimeter += lwgeom_perimeter(col->geoms[i]); + return perimeter; + } + else + return 0.0; +} + +double lwgeom_perimeter_2d(const LWGEOM *geom) +{ + int type = geom->type; + if ( type == POLYGONTYPE ) + return lwpoly_perimeter_2d((LWPOLY*)geom); + else if ( type == CURVEPOLYTYPE ) + return lwcurvepoly_perimeter_2d((LWCURVEPOLY*)geom); + else if ( type == TRIANGLETYPE ) + return lwtriangle_perimeter_2d((LWTRIANGLE*)geom); + else if ( type == POLYHEDRALSURFACETYPE || type == TINTYPE ) + { + return tgeom_perimeter(tgeom_from_lwgeom(geom)); + } + else if ( lwgeom_is_collection(geom) ) + { + double perimeter = 0.0; + int i; + LWCOLLECTION *col = (LWCOLLECTION*)geom; + for ( i = 0; i < col->ngeoms; i++ ) + perimeter += lwgeom_perimeter_2d(col->geoms[i]); + return perimeter; + } + else + return 0.0; +} + +double lwgeom_length(const LWGEOM *geom) +{ + int type = geom->type; + if ( type == LINETYPE ) + return lwline_length((LWLINE*)geom); + else if ( type == CIRCSTRINGTYPE ) + return lwcircstring_length((LWCIRCSTRING*)geom); + else if ( type == COMPOUNDTYPE ) + return lwcompound_length((LWCOMPOUND*)geom); + else if ( lwgeom_is_collection(geom) ) + { + double length = 0.0; + int i; + LWCOLLECTION *col = (LWCOLLECTION*)geom; + for ( i = 0; i < col->ngeoms; i++ ) + length += lwgeom_length(col->geoms[i]); + return length; + } + else + return 0.0; +} + +double lwgeom_length_2d(const LWGEOM *geom) +{ + int type = geom->type; + if ( type == LINETYPE ) + return lwline_length_2d((LWLINE*)geom); + else if ( type == CIRCSTRINGTYPE ) + return lwcircstring_length_2d((LWCIRCSTRING*)geom); + else if ( type == COMPOUNDTYPE ) + return lwcompound_length_2d((LWCOMPOUND*)geom); + else if ( lwgeom_is_collection(geom) ) + { + double length = 0.0; + int i; + LWCOLLECTION *col = (LWCOLLECTION*)geom; + for ( i = 0; i < col->ngeoms; i++ ) + length += lwgeom_length_2d(col->geoms[i]); + return length; + } + else + return 0.0; +} + +void +lwgeom_affine(LWGEOM *geom, const AFFINE *affine) +{ + int type = geom->type; + int i; + + switch(type) + { + /* Take advantage of fact tht pt/ln/circ/tri have same memory structure */ + case POINTTYPE: + case LINETYPE: + case CIRCSTRINGTYPE: + case TRIANGLETYPE: + { + LWLINE *l = (LWLINE*)geom; + ptarray_affine(l->points, affine); + break; + } + case POLYGONTYPE: + { + LWPOLY *p = (LWPOLY*)geom; + for( i = 0; i < p->nrings; i++ ) + ptarray_affine(p->rings[i], affine); + break; + } + case CURVEPOLYTYPE: + { + LWCURVEPOLY *c = (LWCURVEPOLY*)geom; + for( i = 0; i < c->nrings; i++ ) + lwgeom_affine(c->rings[i], affine); + break; + } + default: + { + if( lwgeom_is_collection(geom) ) + { + LWCOLLECTION *c = (LWCOLLECTION*)geom; + for( i = 0; i < c->ngeoms; i++ ) + { + lwgeom_affine(c->geoms[i], affine); + } + } + else + { + lwerror("lwgeom_affine: unable to handle type '%s'", lwtype_name(type)); + } + } + } + +} + +LWGEOM * +lwgeom_construct_empty(uint8_t type, int srid, char hasz, char hasm) +{ + switch(type) + { + case POINTTYPE: + return lwpoint_as_lwgeom(lwpoint_construct_empty(srid, hasz, hasm)); + case LINETYPE: + return lwline_as_lwgeom(lwline_construct_empty(srid, hasz, hasm)); + case POLYGONTYPE: + return lwpoly_as_lwgeom(lwpoly_construct_empty(srid, hasz, hasm)); + case CURVEPOLYTYPE: + return lwcurvepoly_as_lwgeom(lwcurvepoly_construct_empty(srid, hasz, hasm)); + case CIRCSTRINGTYPE: + return lwcircstring_as_lwgeom(lwcircstring_construct_empty(srid, hasz, hasm)); + case TRIANGLETYPE: + return lwtriangle_as_lwgeom(lwtriangle_construct_empty(srid, hasz, hasm)); + case COMPOUNDTYPE: + case MULTIPOINTTYPE: + case MULTILINETYPE: + case MULTIPOLYGONTYPE: + case COLLECTIONTYPE: + return lwcollection_as_lwgeom(lwcollection_construct_empty(type, srid, hasz, hasm)); + default: + lwerror("lwgeom_construct_empty: unsupported geometry type: %s", + lwtype_name(type)); + return NULL; + } +} + + diff -Nru postgis-1.5.3/liblwgeom/lwgeom_api.c postgis-2.0.1/liblwgeom/lwgeom_api.c --- postgis-1.5.3/liblwgeom/lwgeom_api.c 2010-02-01 17:35:55.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwgeom_api.c 2012-03-01 12:25:50.000000000 +0000 @@ -1,12 +1,23 @@ +/********************************************************************** + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * + * Copyright 2001-2006 Refractions Research Inc. + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + + +#include "liblwgeom_internal.h" +#include "lwgeom_log.h" -#include #include -#include #include #include - -#include "liblwgeom.h" -#include "wktparse.h" +#include /* * Lower this to reduce integrity checks @@ -14,7 +25,6 @@ #define PARANOIA_LEVEL 1 - /********************************************************************** * BOX routines * @@ -22,19 +32,10 @@ * handles the funny differences in float4 and float8 reps. **********************************************************************/ - -/* - * These are taken from glibc - * some machines do *not* have these functions defined, so we give - * an implementation of them here. - */ -typedef int int32_tt; -typedef unsigned int u_int32_tt; - typedef union { float value; - u_int32_tt word; + uint32_t word; } ieee_float_shape_type; #define GET_FLOAT_WORD(i,d) \ @@ -57,10 +58,10 @@ * Returns the next smaller or next larger float * from x (in direction of y). */ -float +static float nextafterf_custom(float x, float y) { - int32_tt hx,hy,ix,iy; + int hx,hy,ix,iy; GET_FLOAT_WORD(hx,x); GET_FLOAT_WORD(hy,y); @@ -72,41 +73,50 @@ return x+y; if (x==y) return y; /* x=y, return y */ if (ix==0) - { /* x == 0 */ + { + /* x == 0 */ SET_FLOAT_WORD(x,(hy&0x80000000)|1);/* return +-minsubnormal */ y = x*x; if (y==x) return y; else return x; /* raise underflow flag */ } if (hx>=0) - { /* x > 0 */ + { + /* x > 0 */ if (hx>hy) - { /* x > y, x -= ulp */ + { + /* x > y, x -= ulp */ hx -= 1; } else - { /* x < y, x += ulp */ + { + /* x < y, x += ulp */ hx += 1; } } else - { /* x < 0 */ + { + /* x < 0 */ if (hy>=0||hx>hy) - { /* x < y, x -= ulp */ + { + /* x < y, x -= ulp */ hx -= 1; } else - { /* x > y, x += ulp */ + { + /* x > y, x += ulp */ hx += 1; } } hy = hx&0x7f800000; if (hy>=0x7f800000) return x+x; /* overflow */ if (hy<0x00800000) - { /* underflow */ + { + /* underflow */ y = x*x; if (y!=x) - { /* raise underflow flag */ + { + /* raise underflow flag */ SET_FLOAT_WORD(y,hx); return y; } @@ -116,7 +126,7 @@ } -float nextDown_f(double d) +float next_float_down(double d) { float result = d; @@ -132,7 +142,7 @@ * handles the funny differences in float4 and float8 reps. */ float -nextUp_f(double d) +next_float_up(double d) { float result = d; @@ -148,7 +158,7 @@ * handles the funny differences in float4 and float8 reps. */ double -nextDown_d(float d) +next_double_down(float d) { double result = d; @@ -163,7 +173,7 @@ * handles the funny differences in float4 and float8 reps. */ double -nextUp_d(float d) +next_double_up(float d) { double result = d; @@ -174,278 +184,6 @@ } - -/* - * Convert BOX3D to BOX2D - * returned box2d is allocated with 'lwalloc' - */ -BOX2DFLOAT4 * -box3d_to_box2df(BOX3D *box) -{ - BOX2DFLOAT4 *result = (BOX2DFLOAT4*) lwalloc(sizeof(BOX2DFLOAT4)); - -#if PARANOIA_LEVEL > 0 - if (box == NULL) - { - lwerror("box3d_to_box2df got NUL box"); - return NULL; - } -#endif - - result->xmin = nextDown_f(box->xmin); - result->ymin = nextDown_f(box->ymin); - - result->xmax = nextUp_f(box->xmax); - result->ymax = nextUp_f(box->ymax); - - return result; -} - -/* - * Convert BOX3D to BOX2D using pre-allocated BOX2D - * returned box2d is allocated with 'lwalloc' - * return 0 on error (NULL input box) - */ -int -box3d_to_box2df_p(BOX3D *box, BOX2DFLOAT4 *result) -{ -#if PARANOIA_LEVEL > 0 - if (box == NULL) - { - lwerror("box3d_to_box2df got NUL box"); - return 0; - } -#endif - - result->xmin = nextDown_f(box->xmin); - result->ymin = nextDown_f(box->ymin); - - result->xmax = nextUp_f(box->xmax); - result->ymax = nextUp_f(box->ymax); - - return 1; -} - - - -/* - * Convert BOX2D to BOX3D - * zmin and zmax are set to NO_Z_VALUE - */ -BOX3D -box2df_to_box3d(BOX2DFLOAT4 *box) -{ - BOX3D result; - -#if PARANOIA_LEVEL > 0 - if (box == NULL) - lwerror("box2df_to_box3d got NULL box"); -#endif - - result.xmin = box->xmin; - result.ymin = box->ymin; - - result.xmax = box->xmax; - result.ymax = box->ymax; - - result.zmin = result.zmax = NO_Z_VALUE; - - return result; -} - -/* - * Convert BOX2D to BOX3D, using pre-allocated BOX3D as output - * Z values are set to NO_Z_VALUE. - */ -void -box2df_to_box3d_p(BOX2DFLOAT4 *box, BOX3D *out) -{ - if (box == NULL) return; - - out->xmin = box->xmin; - out->ymin = box->ymin; - - out->xmax = box->xmax; - out->ymax = box->ymax; - - out->zmin = out->zmax = NO_Z_VALUE; -} - - - -/* - * Returns a BOX3D that encloses b1 and b2 - * box3d_union(NULL,A) --> A - * box3d_union(A,NULL) --> A - * box3d_union(A,B) --> A union B - */ -BOX3D * -box3d_union(BOX3D *b1, BOX3D *b2) -{ - BOX3D *result; - - result = lwalloc(sizeof(BOX3D)); - - if ( (b1 == NULL) && (b2 == NULL) ) - { - return NULL; - } - - if (b1 == NULL) - { - /*return b2 */ - memcpy(result, b2, sizeof(BOX3D)); - return result; - } - if (b2 == NULL) - { - /*return b1 */ - memcpy(result, b1, sizeof(BOX3D)); - return result; - } - - if (b1->xmin < b2->xmin) - result->xmin = b1->xmin; - else - result->xmin = b2->xmin; - - if (b1->ymin < b2->ymin) - result->ymin = b1->ymin; - else - result->ymin = b2->ymin; - - - if (b1->xmax > b2->xmax) - result->xmax = b1->xmax; - else - result->xmax = b2->xmax; - - if (b1->ymax > b2->ymax) - result->ymax = b1->ymax; - else - result->ymax = b2->ymax; - - if (b1->zmax > b2->zmax) - result->zmax = b1->zmax; - else - result->zmax = b2->zmax; - - if (b1->zmin > b2->zmin) - result->zmin = b1->zmin; - else - result->zmin = b2->zmin; - - return result; -} - -/* Make given ubox a union of b1 and b2 */ -int -box3d_union_p(BOX3D *b1, BOX3D *b2, BOX3D *ubox) -{ - - LWDEBUG(2, "box3d_union_p called: (xmin, xmax), (ymin, ymax), (zmin, zmax)"); - LWDEBUGF(4, "b1: (%.16f, %.16f),(%.16f, %.16f),(%.16f, %.16f)", b1->xmin, b1->xmax, b1->ymin, b1->ymax, b1->zmin, b1->zmax); - LWDEBUGF(4, "b2: (%.16f, %.16f),(%.16f, %.16f),(%.16f, %.16f)", b2->xmin, b2->xmax, b2->ymin, b2->ymax, b2->zmin, b2->zmax); - - if ( (b1 == NULL) && (b2 == NULL) ) - { - return 0; - } - - if (b1 == NULL) - { - memcpy(ubox, b2, sizeof(BOX3D)); - return 1; - } - if (b2 == NULL) - { - memcpy(ubox, b1, sizeof(BOX3D)); - return 1; - } - - if (b1->xmin < b2->xmin) - ubox->xmin = b1->xmin; - else - ubox->xmin = b2->xmin; - - if (b1->ymin < b2->ymin) - ubox->ymin = b1->ymin; - else - ubox->ymin = b2->ymin; - - - if (b1->xmax > b2->xmax) - ubox->xmax = b1->xmax; - else - ubox->xmax = b2->xmax; - - if (b1->ymax > b2->ymax) - ubox->ymax = b1->ymax; - else - ubox->ymax = b2->ymax; - - if (b1->zmax > b2->zmax) - ubox->zmax = b1->zmax; - else - ubox->zmax = b2->zmax; - - if (b1->zmin < b2->zmin) - ubox->zmin = b1->zmin; - else - ubox->zmin = b2->zmin; - - return 1; -} - -#if 0 /* UNUSED */ -/* - * Returns a pointer to internal storage, or NULL - * if the serialized form does not have a BBOX. - */ -BOX2DFLOAT4 * -getbox2d_internal(uchar *srl) -{ - if (TYPE_HASBBOX(srl[0])) return (BOX2DFLOAT4 *)(srl+1); - else return NULL; -} -#endif /* UNUSED */ - -/* - * Same as getbox2d, but modifies box instead of returning result on the stack - */ -int -getbox2d_p(uchar *srl, BOX2DFLOAT4 *box) -{ - uchar type = srl[0]; - uchar *loc; - BOX3D box3d; - - LWDEBUG(2, "getbox2d_p call"); - - loc = srl+1; - - if (lwgeom_hasBBOX(type)) - { - /*woot - this is easy */ - LWDEBUG(4, "getbox2d_p: has box"); - memcpy(box, loc, sizeof(BOX2DFLOAT4)); - return 1; - } - - LWDEBUG(4, "getbox2d_p: has no box - computing"); - - /* We have to actually compute it! */ - if ( ! compute_serialized_box3d_p(srl, &box3d) ) return 0; - - LWDEBUGF(4, "getbox2d_p: compute_serialized_box3d returned %p", box3d); - - if ( ! box3d_to_box2df_p(&box3d, box) ) return 0; - - LWDEBUG(4, "getbox2d_p: box3d converted to box2d"); - - return 1; -} - /************************************************************************ * POINTARRAY support functions * @@ -478,7 +216,7 @@ int getPoint4d_p(const POINTARRAY *pa, int n, POINT4D *op) { - uchar *ptr; + uint8_t *ptr; int zmflag; #if PARANOIA_LEVEL > 0 @@ -494,7 +232,7 @@ /* Get a pointer to nth point offset and zmflag */ ptr=getPoint_internal(pa, n); - zmflag=TYPE_GETZM(pa->dims); + zmflag=FLAGS_GET_ZM(pa->flags); LWDEBUGF(4, "ptr %p, zmflag %d", ptr, zmflag); @@ -566,7 +304,7 @@ int getPoint3dz_p(const POINTARRAY *pa, int n, POINT3DZ *op) { - uchar *ptr; + uint8_t *ptr; #if PARANOIA_LEVEL > 0 if ( ! pa ) return 0; @@ -579,7 +317,7 @@ #endif LWDEBUGF(2, "getPoint3dz_p called on array of %d-dimensions / %u pts", - TYPE_NDIMS(pa->dims), pa->npoints); + FLAGS_NDIMS(pa->flags), pa->npoints); /* Get a pointer to nth point offset */ ptr=getPoint_internal(pa, n); @@ -588,7 +326,7 @@ * if input POINTARRAY has the Z, it is always * at third position so make a single copy */ - if ( TYPE_HASZ(pa->dims) ) + if ( FLAGS_GET_Z(pa->flags) ) { memcpy(op, ptr, sizeof(POINT3DZ)); } @@ -616,7 +354,7 @@ int getPoint3dm_p(const POINTARRAY *pa, int n, POINT3DM *op) { - uchar *ptr; + uint8_t *ptr; int zmflag; #if PARANOIA_LEVEL > 0 @@ -630,12 +368,12 @@ #endif LWDEBUGF(2, "getPoint3dm_p(%d) called on array of %d-dimensions / %u pts", - n, TYPE_NDIMS(pa->dims), pa->npoints); + n, FLAGS_NDIMS(pa->flags), pa->npoints); /* Get a pointer to nth point offset and zmflag */ ptr=getPoint_internal(pa, n); - zmflag=TYPE_GETZM(pa->dims); + zmflag=FLAGS_GET_ZM(pa->flags); /* * if input POINTARRAY has the M and NO Z, @@ -718,10 +456,11 @@ * */ void -setPoint4d(POINTARRAY *pa, int n, POINT4D *p4d) +ptarray_set_point4d(POINTARRAY *pa, int n, const POINT4D *p4d) { - uchar *ptr=getPoint_internal(pa, n); - switch ( TYPE_GETZM(pa->dims) ) + assert(n >= 0 && n < pa->npoints); + uint8_t *ptr=getPoint_internal(pa, n); + switch ( FLAGS_GET_ZM(pa->flags) ) { case 3: memcpy(ptr, p4d, sizeof(POINT4D)); @@ -741,1308 +480,114 @@ } -/* - * Get a pointer to nth point of a POINTARRAY. - * You cannot safely cast this to a real POINT, due to memory alignment - * constraints. Use getPoint*_p for that. - */ -uchar * -getPoint_internal(const POINTARRAY *pa, int n) -{ - int size; - -#if PARANOIA_LEVEL > 0 - if ( pa == NULL ) - { - lwerror("getPoint got NULL pointarray"); - return NULL; - } - - if ( (n<0) || (n>=pa->npoints)) - { - return NULL; /*error */ - } -#endif - - size = pointArray_ptsize(pa); - - return &(pa->serialized_pointlist[size*n]); -} +/***************************************************************************** + * Basic sub-geometry types + *****************************************************************************/ -/* - * Constructs a POINTARRAY. - * - * NOTE: points is *not* copied, so be careful about modification - * (can be aligned/missaligned). - * - * NOTE: ndims is descriptive - it describes what type of data 'points' - * points to. No data conversion is done. - */ -POINTARRAY * -pointArray_construct(uchar *points, char hasz, char hasm, uint32 npoints) +/* handle missaligned uint32_t32 data */ +uint32_t +lw_get_uint32_t(const uint8_t *loc) { - POINTARRAY *pa; - - LWDEBUG(2, "pointArray_construct called."); - - pa = (POINTARRAY*)lwalloc(sizeof(POINTARRAY)); + uint32_t result; - pa->dims = 0; - TYPE_SETZM(pa->dims, hasz?1:0, hasm?1:0); - pa->npoints = npoints; - - pa->serialized_pointlist = points; - - LWDEBUGF(4, "pointArray_construct returning %p", pa); - - return pa; + memcpy(&result, loc, sizeof(uint32_t)); + return result; } - -/* - * Size of point represeneted in the POINTARRAY - * 16 for 2d, 24 for 3d, 32 for 4d - */ -int -pointArray_ptsize(const POINTARRAY *pa) +/* handle missaligned signed int32_t data */ +int32_t +lw_get_int32_t(const uint8_t *loc) { - LWDEBUGF(2, "pointArray_ptsize: TYPE_NDIMS(pa->dims)=%x",TYPE_NDIMS(pa->dims)); + int32_t result; - return sizeof(double)*TYPE_NDIMS(pa->dims); + memcpy(&result,loc, sizeof(int32_t)); + return result; } -/*************************************************************************** - * Basic type handling - ***************************************************************************/ - +/************************************************ + * debugging routines + ************************************************/ -/* Returns true if this type says it has an SRID (S bit set) */ -char -lwgeom_hasSRID(uchar type) +void printBOX3D(BOX3D *box) { - return TYPE_HASSRID(type); + lwnotice("BOX3D: %g %g, %g %g", box->xmin, box->ymin, + box->xmax, box->ymax); } -/* Returns either 2,3, or 4 -- 2=2D, 3=3D, 4=4D */ -int -lwgeom_ndims(uchar type) +void printPA(POINTARRAY *pa) { - return TYPE_NDIMS(type); -} + int t; + POINT4D pt; + char *mflag; -/* has M ? */ -int lwgeom_hasM(uchar type) -{ - return ( (type & 0x10) >>4); -} -/* has Z ? */ -int lwgeom_hasZ(uchar type) -{ - return ( (type & 0x20) >>5); -} + if ( FLAGS_GET_M(pa->flags) ) mflag = "M"; + else mflag = ""; + lwnotice(" POINTARRAY%s{", mflag); + lwnotice(" ndims=%i, ptsize=%i", + FLAGS_NDIMS(pa->flags), ptarray_point_size(pa)); + lwnotice(" npoints = %i", pa->npoints); -/* get base type (ie. POLYGONTYPE) */ -int -lwgeom_getType(uchar type) -{ - LWDEBUGF(2, "lwgeom_getType %d", type); + for (t =0; tnpoints; t++) + { + getPoint4d_p(pa, t, &pt); + if (FLAGS_NDIMS(pa->flags) == 2) + { + lwnotice(" %i : %lf,%lf",t,pt.x,pt.y); + } + if (FLAGS_NDIMS(pa->flags) == 3) + { + lwnotice(" %i : %lf,%lf,%lf",t,pt.x,pt.y,pt.z); + } + if (FLAGS_NDIMS(pa->flags) == 4) + { + lwnotice(" %i : %lf,%lf,%lf,%lf",t,pt.x,pt.y,pt.z,pt.m); + } + } - return (type & 0x0F); + lwnotice(" }"); } -/* Construct a type (hasBOX=false) */ -uchar -lwgeom_makeType(char hasz, char hasm, char hasSRID, int type) +char +ptarray_isccw(const POINTARRAY *pa) { - return lwgeom_makeType_full(hasz, hasm, hasSRID, type, 0); + int i; + double area = 0; + POINT2D p1, p2, p0; + + if ( pa->npoints == 0 ) return 0; + + getPoint2d_p(pa, 0, &p1); + p0 = p1; + p1.x -= p0.x; p1.y -= p0.y; + for (i=0; inpoints-1; i++) + { + getPoint2d_p(pa, i+1, &p2); + p2.x -= p0.x; p2.y -= p0.y; + area += (p1.y * p2.x) - (p1.x * p2.y); + p1 = p2; + } + /* lwnotice("Signed area: %.16g", area); */ + if ( area > 0 ) return 0; + else return 1; } -/* - * Construct a type - * TODO: needs to be expanded to accept explicit MZ type +/** + * Given a string with at least 2 chars in it, convert them to + * a byte value. No error checking done! */ -uchar -lwgeom_makeType_full(char hasz, char hasm, char hasSRID, int type, char hasBBOX) +uint8_t +parse_hex(char *str) { - uchar result = (char)type; + /* do this a little brute force to make it faster */ - TYPE_SETZM(result, hasz, hasm); - TYPE_SETHASSRID(result, hasSRID); - TYPE_SETHASBBOX(result, hasBBOX); - - return result; -} - -/* Returns true if there's a bbox in this LWGEOM (B bit set) */ -char -lwgeom_hasBBOX(uchar type) -{ - return TYPE_HASBBOX(type); -} - -/***************************************************************************** - * Basic sub-geometry types - *****************************************************************************/ - -/* handle missaligned unsigned int32 data */ -uint32 -lw_get_uint32(const uchar *loc) -{ - uint32 result; - - memcpy(&result, loc, sizeof(uint32)); - return result; -} - -/* handle missaligned signed int32 data */ -int32 -lw_get_int32(const uchar *loc) -{ - int32 result; - - memcpy(&result,loc, sizeof(int32)); - return result; -} - - -/************************************************************************* - * - * Multi-geometry support - * - * Note - for a simple type (ie. point), this will have - * sub_geom[0] = serialized_form. - * - * For multi-geomtries sub_geom[0] will be a few bytes - * into the serialized form. - * - * This function just computes the length of each sub-object and - * pre-caches this info. - * - * For a geometry collection of multi* geometries, you can inspect - * the sub-components - * as well. - */ -LWGEOM_INSPECTED * -lwgeom_inspect(const uchar *serialized_form) -{ - LWGEOM_INSPECTED *result = lwalloc(sizeof(LWGEOM_INSPECTED)); - uchar typefl = (uchar)serialized_form[0]; - uchar type; - uchar **sub_geoms; - const uchar *loc; - int t; - - LWDEBUGF(2, "lwgeom_inspect: serialized@%p", serialized_form); - - if (serialized_form == NULL) - return NULL; - - result->serialized_form = serialized_form; - result->type = (uchar) serialized_form[0]; - result->SRID = -1; /* assume */ - - type = lwgeom_getType(typefl); - - loc = serialized_form+1; - - if ( lwgeom_hasBBOX(typefl) ) - { - loc += sizeof(BOX2DFLOAT4); - } - - if ( lwgeom_hasSRID(typefl) ) - { - result->SRID = lw_get_int32(loc); - loc += 4; - } - - if ( (type==POINTTYPE) || (type==LINETYPE) || (type==POLYGONTYPE) || (type == CIRCSTRINGTYPE)) - { - /* simple geometry (point/line/polygon/circstring)-- not multi! */ - result->ngeometries = 1; - sub_geoms = (uchar**) lwalloc(sizeof(char*)); - sub_geoms[0] = (uchar *)serialized_form; - result->sub_geoms = (uchar **)sub_geoms; - return result; - } - - /* its a GeometryCollection or multi* geometry */ - - result->ngeometries = lw_get_uint32(loc); - loc +=4; - - LWDEBUGF(3, "lwgeom_inspect: geometry is a collection of %d elements", - result->ngeometries); - - if ( ! result->ngeometries ) return result; - - sub_geoms = lwalloc(sizeof(uchar*) * result->ngeometries ); - result->sub_geoms = sub_geoms; - sub_geoms[0] = (uchar *)loc; - - LWDEBUGF(3, "subgeom[0] @ %p (+%d)", sub_geoms[0], sub_geoms[0]-serialized_form); - - for (t=1; tngeometries; t++) - { - /* -1 = entire object */ - int sub_length = lwgeom_size_subgeom(sub_geoms[t-1], -1); - sub_geoms[t] = sub_geoms[t-1] + sub_length; - - LWDEBUGF(3, "subgeom[%d] @ %p (+%d)", - t, sub_geoms[t], sub_geoms[0]-serialized_form); - } - - return result; - -} - - -/* - * 1st geometry has geom_number = 0 - * if the actual sub-geometry isnt a POINT, null is returned (see _gettype()). - * if there arent enough geometries, return null. - * this is fine to call on a point (with geom_num=0), - * multipoint or geometrycollection - */ -LWPOINT * -lwgeom_getpoint(uchar *serialized_form, int geom_number) -{ - int type = lwgeom_getType((uchar)serialized_form[0]); - uchar *sub_geom; - - if ((type == POINTTYPE) && (geom_number == 0)) - { - /* Be nice and do as they want instead of what they say */ - return lwpoint_deserialize(serialized_form); - } - - if ((type != MULTIPOINTTYPE) && (type != COLLECTIONTYPE) ) - return NULL; - - sub_geom = lwgeom_getsubgeometry(serialized_form, geom_number); - if (sub_geom == NULL) - return NULL; - - type = lwgeom_getType(sub_geom[0]); - if (type != POINTTYPE) - return NULL; - - return lwpoint_deserialize(sub_geom); -} - -/* - * 1st geometry has geom_number = 0 - * if the actual sub-geometry isnt a POINT, null is returned (see _gettype()). - * if there arent enough geometries, return null. - * this is fine to call on a point (with geom_num=0), multipoint - * or geometrycollection - */ -LWPOINT *lwgeom_getpoint_inspected(LWGEOM_INSPECTED *inspected, int geom_number) -{ - uchar *sub_geom; - uchar type; - - sub_geom = lwgeom_getsubgeometry_inspected(inspected, geom_number); - - if (sub_geom == NULL) return NULL; - - type = lwgeom_getType(sub_geom[0]); - if (type != POINTTYPE) return NULL; - - return lwpoint_deserialize(sub_geom); -} - - -/* - * 1st geometry has geom_number = 0 - * if the actual geometry isnt a LINE, null is returned (see _gettype()). - * if there arent enough geometries, return null. - * this is fine to call on a line, multiline or geometrycollection - */ -LWLINE * -lwgeom_getline(uchar *serialized_form, int geom_number) -{ - uchar type = lwgeom_getType( (uchar) serialized_form[0]); - uchar *sub_geom; - - if ((type == LINETYPE) && (geom_number == 0)) - { - /* be nice and do as they want instead of what they say */ - return lwline_deserialize(serialized_form); - } - - if ((type != MULTILINETYPE) && (type != COLLECTIONTYPE) ) - return NULL; - - sub_geom = lwgeom_getsubgeometry(serialized_form, geom_number); - if (sub_geom == NULL) return NULL; - - type = lwgeom_getType((uchar) sub_geom[0]); - if (type != LINETYPE) return NULL; - - return lwline_deserialize(sub_geom); -} - -/* - * 1st geometry has geom_number = 0 - * if the actual geometry isnt a LINE, null is returned (see _gettype()). - * if there arent enough geometries, return null. - * this is fine to call on a line, multiline or geometrycollection - */ -LWLINE * -lwgeom_getline_inspected(LWGEOM_INSPECTED *inspected, int geom_number) -{ - uchar *sub_geom; - uchar type; - - sub_geom = lwgeom_getsubgeometry_inspected(inspected, geom_number); - - if (sub_geom == NULL) return NULL; - - type = lwgeom_getType((uchar) sub_geom[0]); - if (type != LINETYPE) return NULL; - - return lwline_deserialize(sub_geom); -} - -/* - * 1st geometry has geom_number = 0 - * if the actual geometry isnt a POLYGON, null is returned (see _gettype()). - * if there arent enough geometries, return null. - * this is fine to call on a polygon, multipolygon or geometrycollection - */ -LWPOLY * -lwgeom_getpoly(uchar *serialized_form, int geom_number) -{ - uchar type = lwgeom_getType((uchar)serialized_form[0]); - uchar *sub_geom; - - if ((type == POLYGONTYPE) && (geom_number == 0)) - { - /* Be nice and do as they want instead of what they say */ - return lwpoly_deserialize(serialized_form); - } - - if ((type != MULTIPOLYGONTYPE) && (type != COLLECTIONTYPE) ) - return NULL; - - sub_geom = lwgeom_getsubgeometry(serialized_form, geom_number); - if (sub_geom == NULL) return NULL; - - type = lwgeom_getType(sub_geom[0]); - if (type != POLYGONTYPE) return NULL; - - return lwpoly_deserialize(sub_geom); -} - -/* - * 1st geometry has geom_number = 0 - * if the actual geometry isnt a POLYGON, null is returned (see _gettype()). - * if there arent enough geometries, return null. - * this is fine to call on a polygon, multipolygon or geometrycollection - */ -LWPOLY * -lwgeom_getpoly_inspected(LWGEOM_INSPECTED *inspected, int geom_number) -{ - uchar *sub_geom; - uchar type; - - sub_geom = lwgeom_getsubgeometry_inspected(inspected, geom_number); - - if (sub_geom == NULL) return NULL; - - type = lwgeom_getType(sub_geom[0]); - if (type != POLYGONTYPE) return NULL; - - return lwpoly_deserialize(sub_geom); -} - -/* - * 1st geometry has geom_number = 0 - * if the actual geometry isnt a CIRCULARSTRING, null is returned (see _gettype()). - * if there arent enough geometries, return null. - * this is fine to call on a circularstring - */ -LWCIRCSTRING * -lwgeom_getcircstring_inspected(LWGEOM_INSPECTED *inspected, int geom_number) -{ - uchar *sub_geom; - uchar type; - - sub_geom = lwgeom_getsubgeometry_inspected(inspected, geom_number); - - if (sub_geom == NULL) return NULL; - - type = lwgeom_getType(sub_geom[0]); - if (type != CIRCSTRINGTYPE) return NULL; - - return lwcircstring_deserialize(sub_geom); -} - -/* - * 1st geometry has geom_number = 0 - * if there arent enough geometries, return null. - */ -LWGEOM *lwgeom_getgeom_inspected(LWGEOM_INSPECTED *inspected, int geom_number) -{ - uchar *sub_geom; - uchar type; - - sub_geom = lwgeom_getsubgeometry_inspected(inspected, geom_number); - - if (sub_geom == NULL) return NULL; - - type = lwgeom_getType(sub_geom[0]); - - return lwgeom_deserialize(sub_geom); -} - - -/* - * This gets the serialized form of a sub-geometry - * - * 1st geometry has geom_number = 0 - * if this isnt a multi* geometry, and geom_number ==0 then it returns - * itself. - * - * Returns null on problems. - * - * In the future this is how you would access a muli* portion of a - * geometry collection. - * GEOMETRYCOLLECTION(MULTIPOINT(0 0, 1 1), LINESTRING(0 0, 1 1)) - * ie. lwgeom_getpoint( lwgeom_getsubgeometry( serialized, 0), 1) - * --> POINT(1 1) - * - * You can inspect the sub-geometry as well if you wish. - * - */ -uchar * -lwgeom_getsubgeometry(const uchar *serialized_form, int geom_number) -{ - uchar *result; - /*major cheat!! */ - LWGEOM_INSPECTED *inspected = lwgeom_inspect(serialized_form); - - result = lwgeom_getsubgeometry_inspected(inspected, geom_number); - lwinspected_release(inspected); - return result; -} - -uchar * -lwgeom_getsubgeometry_inspected(LWGEOM_INSPECTED *inspected, int geom_number) -{ - if ((geom_number <0) || (geom_number >= inspected->ngeometries) ) - { - lwerror("lwgeom_getsubgeometry_inspected: geom_number out of range"); - return NULL; - } - - return inspected->sub_geoms[geom_number]; -} - - -/* - * 1st geometry has geom_number = 0 - * use geom_number = -1 to find the actual type of the serialized form. - * ie lwgeom_gettype( <'MULTIPOINT(0 0, 1 1)'>, -1) - * --> multipoint - * ie lwgeom_gettype( <'MULTIPOINT(0 0, 1 1)'>, 0) - * --> point - * gets the 8bit type of the geometry at location geom_number - */ -uchar -lwgeom_getsubtype(uchar *serialized_form, int geom_number) -{ - char result; - /*major cheat!! */ - LWGEOM_INSPECTED *inspected = lwgeom_inspect(serialized_form); - - result = lwgeom_getsubtype_inspected(inspected, geom_number); - lwinspected_release(inspected); - return result; -} - -uchar -lwgeom_getsubtype_inspected(LWGEOM_INSPECTED *inspected, int geom_number) -{ - if ((geom_number <0) || (geom_number >= inspected->ngeometries) ) - return 99; - - return inspected->sub_geoms[geom_number][0]; /* 1st byte is type */ -} - - -/* - * How many sub-geometries are there? - * for point,line,polygon will return 1. - */ -int -lwgeom_getnumgeometries(uchar *serialized_form) -{ - uchar type = lwgeom_getType((uchar)serialized_form[0]); - uchar *loc; - - if ( (type==POINTTYPE) || (type==LINETYPE) || (type==POLYGONTYPE) || - (type==CIRCSTRINGTYPE) || (type==COMPOUNDTYPE) || (type==CURVEPOLYTYPE) ) - { - return 1; - } - - loc = serialized_form+1; - - if (lwgeom_hasBBOX((uchar) serialized_form[0])) - { - loc += sizeof(BOX2DFLOAT4); - } - - if (lwgeom_hasSRID((uchar) serialized_form[0]) ) - { - loc += 4; - } - /* its a GeometryCollection or multi* geometry */ - return lw_get_uint32(loc); -} - -/* - * How many sub-geometries are there? - * for point,line,polygon will return 1. - */ -int -lwgeom_getnumgeometries_inspected(LWGEOM_INSPECTED *inspected) -{ - return inspected->ngeometries; -} - - -/* - * Set finalType to COLLECTIONTYPE or 0 (0 means choose a best type) - * (ie. give it 2 points and ask it to be a multipoint) - * use SRID=-1 for unknown SRID (will have 8bit type's S = 0) - * all subgeometries must have the same SRID - * if you want to construct an inspected, call this then inspect the result... - */ -uchar * -lwgeom_serialized_construct(int SRID, int finalType, char hasz, char hasm, - int nsubgeometries, uchar **serialized_subs) -{ - uint32 *lengths; - int t; - int total_length = 0; - char type = (char)-1; - char this_type = -1; - uchar *result; - uchar *loc; - - if (nsubgeometries == 0) - return lwgeom_constructempty(SRID, hasz, hasm); - - lengths = lwalloc(sizeof(int32) * nsubgeometries); - - for (t=0; t, -1) - * --> size of the multipoint - * ie lwgeom_gettype( <'MULTIPOINT(0 0, 1 1)'>, 0) - * --> size of the point - * take a geometry, and find its length - */ -size_t -lwgeom_size(const uchar *serialized_form) -{ - uchar type = lwgeom_getType((uchar) serialized_form[0]); - int t; - const uchar *loc; - uint32 ngeoms; - int sub_size; - int result = 1; /* type */ - - LWDEBUG(2, "lwgeom_size called"); - - if (type == POINTTYPE) - { - LWDEBUG(3, "lwgeom_size: is a point"); - - return lwgeom_size_point(serialized_form); - } - else if (type == LINETYPE) - { - LWDEBUG(3, "lwgeom_size: is a line"); - - return lwgeom_size_line(serialized_form); - } - else if (type == CIRCSTRINGTYPE) - { - LWDEBUG(3, "lwgeom_size: is a circularstring"); - - return lwgeom_size_circstring(serialized_form); - } - else if (type == POLYGONTYPE) - { - LWDEBUG(3, "lwgeom_size: is a polygon"); - - return lwgeom_size_poly(serialized_form); - } - else if (type == COMPOUNDTYPE) - { - LWDEBUG(3, "lwgeom_size: is a compound curve"); - } - - if ( type == 0 ) - { - lwerror("lwgeom_size called with unknown-typed serialized geometry"); - return 0; - } - - /* - * Handle all the multi* and geometrycollections the same - * - * NOTE: for a geometry collection of GC of GC of GC we will - * be recursing... - */ - - LWDEBUGF(3, "lwgeom_size called on a geoemtry with type %d", type); - - loc = serialized_form+1; - - if (lwgeom_hasBBOX((uchar) serialized_form[0])) - { - LWDEBUG(3, "lwgeom_size: has bbox"); - - loc += sizeof(BOX2DFLOAT4); - result +=sizeof(BOX2DFLOAT4); - } - - if (lwgeom_hasSRID( (uchar) serialized_form[0]) ) - { - LWDEBUG(3, "lwgeom_size: has srid"); - - result +=4; - loc +=4; - } - - - ngeoms = lw_get_uint32(loc); - loc +=4; - result += 4; /* numgeoms */ - - LWDEBUGF(3, "lwgeom_size called on a geoemtry with %d elems (result so far: %d)", ngeoms, result); - - for (t=0; tsub_geoms[geom_number]); -} - -int -compute_serialized_box3d_p(uchar *srl, BOX3D *out) -{ - BOX3D *box = compute_serialized_box3d(srl); - if ( ! box ) return 0; - out->xmin = box->xmin; - out->ymin = box->ymin; - out->zmin = box->zmin; - out->xmax = box->xmax; - out->ymax = box->ymax; - out->zmax = box->zmax; - lwfree(box); - - return 1; -} - -/** - * Compute bounding box of a serialized LWGEOM, even if it is - * already cached. The computed BOX2DFLOAT4 is stored at - * the given location, the function returns 0 is the geometry - * does not have a bounding box (EMPTY GEOM) - */ -int -compute_serialized_box2d_p(uchar *srl, BOX2DFLOAT4 *out) -{ - BOX3D *result = compute_serialized_box3d(srl); - if ( ! result ) return 0; - out->xmin = result->xmin; - out->xmax = result->xmax; - out->ymin = result->ymin; - out->ymax = result->ymax; - lwfree(result); - - return 1; -} - -/** - * Don't forget to lwfree() result ! - */ -BOX3D * -compute_serialized_box3d(uchar *srl) -{ - int type = lwgeom_getType(srl[0]); - int t; - uchar *loc = srl; - uint32 nelems; - BOX3D *result; - BOX3D b1; - int sub_size; - char nboxes=0; - - LWDEBUGF(2, "compute_serialized_box3d called on type %d", type); - - loc += 1; /* Move past the 'type' byte. */ - - if (lwgeom_hasBBOX(srl[0])) - { - loc += sizeof(BOX2DFLOAT4); /* Move past the bbox */ - } - - if (lwgeom_hasSRID(srl[0]) ) - { - loc +=4; /* Move past the SRID */ - } - - if (type == POINTTYPE) - { - LWPOINT *pt = lwpoint_deserialize(srl); - - LWDEBUG(3, "compute_serialized_box3d: lwpoint deserialized"); - - result = lwpoint_compute_box3d(pt); - - LWDEBUG(3, "compute_serialized_box3d: bbox found"); - - lwpoint_free(pt); - return result; - } - - /* - ** For items that have elements (everything except points), - ** nelems == 0 => EMPTY geometry - */ - nelems = lw_get_uint32(loc); - if ( nelems == 0 ) return NULL; - - if (type == LINETYPE) - { - LWLINE *line = lwline_deserialize(srl); - result = lwline_compute_box3d(line); - lwline_free(line); - return result; - - } - else if (type == CIRCSTRINGTYPE) - { - LWCIRCSTRING *curve = lwcircstring_deserialize(srl); - result = lwcircstring_compute_box3d(curve); - lwcircstring_free(curve); - return result; - } - else if (type == POLYGONTYPE) - { - LWPOLY *poly = lwpoly_deserialize(srl); - result = lwpoly_compute_box3d(poly); - lwpoly_free(poly); - return result; - } - - if ( ! ( type == MULTIPOINTTYPE || type == MULTILINETYPE || - type == MULTIPOLYGONTYPE || type == COLLECTIONTYPE || - type == COMPOUNDTYPE || type == CURVEPOLYTYPE || - type == MULTICURVETYPE || type == MULTISURFACETYPE) ) - { - lwnotice("compute_serialized_box3d called on unknown type %d", type); - return NULL; - } - - loc += 4; - - /* each sub-type */ - result = NULL; - for (t=0; t= 3 - printBOX3D(&b1); -#endif - - if (result) - { - nboxes += box3d_union_p(result, &b1, result); - } - else - { - result = lwalloc(sizeof(BOX3D)); - memcpy(result, &b1, sizeof(BOX3D)); - } - } - - sub_size = lwgeom_size(loc); - loc += sub_size; - } - - return result; - -} - -/**************************************************************** - * memory management - * - * these only delete the memory associated - * directly with the structure - NOT the stuff pointing into - * the original de-serialized info - * - ****************************************************************/ - -void -lwinspected_release(LWGEOM_INSPECTED *inspected) -{ - if ( inspected->ngeometries ) - lwfree(inspected->sub_geoms); - lwfree(inspected); -} - - - - - - -/************************************************ - * debugging routines - ************************************************/ - - -void printBOX3D(BOX3D *box) -{ - lwnotice("BOX3D: %g %g, %g %g", box->xmin, box->ymin, - box->xmax, box->ymax); -} - -void printPA(POINTARRAY *pa) -{ - int t; - POINT4D pt; - char *mflag; - - - if ( TYPE_HASM(pa->dims) ) mflag = "M"; - else mflag = ""; - - lwnotice(" POINTARRAY%s{", mflag); - lwnotice(" ndims=%i, ptsize=%i", - TYPE_NDIMS(pa->dims), pointArray_ptsize(pa)); - lwnotice(" npoints = %i", pa->npoints); - - for (t =0; tnpoints; t++) - { - getPoint4d_p(pa, t, &pt); - if (TYPE_NDIMS(pa->dims) == 2) - { - lwnotice(" %i : %lf,%lf",t,pt.x,pt.y); - } - if (TYPE_NDIMS(pa->dims) == 3) - { - lwnotice(" %i : %lf,%lf,%lf",t,pt.x,pt.y,pt.z); - } - if (TYPE_NDIMS(pa->dims) == 4) - { - lwnotice(" %i : %lf,%lf,%lf,%lf",t,pt.x,pt.y,pt.z,pt.m); - } - } - - lwnotice(" }"); -} - -void printBYTES(uchar *a, int n) -{ - int t; - char buff[3]; - - buff[2] = 0; /* null terminate */ - - lwnotice(" BYTE ARRAY (n=%i) IN HEX: {", n); - for (t=0; tngeometries); - - for (t=0; tngeometries; t++) - { - lwnotice(" sub-geometry %i:", t); - line = NULL; - point = NULL; - poly = NULL; - - line = lwgeom_getline_inspected(inspected,t); - if (line !=NULL) - { - printLWLINE(line); - } - poly = lwgeom_getpoly_inspected(inspected,t); - if (poly !=NULL) - { - printLWPOLY(poly); - } - point = lwgeom_getpoint_inspected(inspected,t); - if (point !=NULL) - { - printPA(point->point); - } - } - - lwnotice("end multi*"); - - lwinspected_release(inspected); -} - -void -printType(uchar type) -{ - lwnotice("type 0x%x ==> hasBBOX=%i, hasSRID=%i, ndims=%i, type=%i",(unsigned int) type, lwgeom_hasBBOX(type), lwgeom_hasSRID(type),lwgeom_ndims(type), lwgeom_getType(type)); -} - -/** - * Get the SRID from the LWGEOM. - * None present => -1 - */ -int -lwgeom_getsrid(uchar *serialized) -{ - uchar type = serialized[0]; - uchar *loc = serialized+1; - - if ( ! lwgeom_hasSRID(type)) return -1; - - if (lwgeom_hasBBOX(type)) - { - loc += sizeof(BOX2DFLOAT4); - } - - return lw_get_int32(loc); -} - -char -ptarray_isccw(const POINTARRAY *pa) -{ - int i; - double area = 0; - POINT2D p1, p2; - - for (i=0; inpoints-1; i++) - { - getPoint2d_p(pa, i, &p1); - getPoint2d_p(pa, i+1, &p2); - area += (p1.y * p2.x) - (p1.x * p2.y); - } - if ( area > 0 ) return 0; - else return 1; -} - -/** - * Returns a BOX2DFLOAT4 that encloses b1 and b2 - * - * box2d_union(NULL,A) --> A - * box2d_union(A,NULL) --> A - * box2d_union(A,B) --> A union B - */ -BOX2DFLOAT4 * -box2d_union(BOX2DFLOAT4 *b1, BOX2DFLOAT4 *b2) -{ - BOX2DFLOAT4 *result; - - if ( (b1 == NULL) && (b2 == NULL) ) - { - return NULL; - } - - result = lwalloc(sizeof(BOX2DFLOAT4)); - - if (b1 == NULL) - { - memcpy(result, b2, sizeof(BOX2DFLOAT4)); - return result; - } - if (b2 == NULL) - { - memcpy(result, b1, sizeof(BOX2DFLOAT4)); - return result; - } - - if (b1->xmin < b2->xmin) result->xmin = b1->xmin; - else result->xmin = b2->xmin; - - if (b1->ymin < b2->ymin) result->ymin = b1->ymin; - else result->ymin = b2->ymin; - - if (b1->xmax > b2->xmax) result->xmax = b1->xmax; - else result->xmax = b2->xmax; - - if (b1->ymax > b2->ymax) result->ymax = b1->ymax; - else result->ymax = b2->ymax; - - return result; -} - -/** - * ubox may be one of the two args... - * return 1 if done something to ubox, 0 otherwise. - */ -int -box2d_union_p(BOX2DFLOAT4 *b1, BOX2DFLOAT4 *b2, BOX2DFLOAT4 *ubox) -{ - if ( (b1 == NULL) && (b2 == NULL) ) - { - return 0; - } - - if (b1 == NULL) - { - memcpy(ubox, b2, sizeof(BOX2DFLOAT4)); - return 1; - } - if (b2 == NULL) - { - memcpy(ubox, b1, sizeof(BOX2DFLOAT4)); - return 1; - } - - if (b1->xmin < b2->xmin) ubox->xmin = b1->xmin; - else ubox->xmin = b2->xmin; - - if (b1->ymin < b2->ymin) ubox->ymin = b1->ymin; - else ubox->ymin = b2->ymin; - - if (b1->xmax > b2->xmax) ubox->xmax = b1->xmax; - else ubox->xmax = b2->xmax; - - if (b1->ymax > b2->ymax) ubox->ymax = b1->ymax; - else ubox->ymax = b2->ymax; - - return 1; -} - -const char * -lwgeom_typeflags(uchar type) -{ - static char flags[5]; - int flagno=0; - if ( TYPE_HASZ(type) ) flags[flagno++] = 'Z'; - if ( TYPE_HASM(type) ) flags[flagno++] = 'M'; - if ( TYPE_HASBBOX(type) ) flags[flagno++] = 'B'; - if ( TYPE_HASSRID(type) ) flags[flagno++] = 'S'; - flags[flagno] = '\0'; - - LWDEBUGF(4, "Flags: %s - returning %p", flags, flags); - - return flags; -} - -/** - * Given a string with at least 2 chars in it, convert them to - * a byte value. No error checking done! - */ -uchar -parse_hex(char *str) -{ - /* do this a little brute force to make it faster */ - - uchar result_high = 0; - uchar result_low = 0; + uint8_t result_high = 0; + uint8_t result_low = 0; switch (str[0]) { @@ -2158,7 +703,7 @@ result_low = 15; break; } - return (uchar) ((result_high<<4) + result_low); + return (uint8_t) ((result_high<<4) + result_low); } @@ -2172,13 +717,14 @@ * No error checking done */ void -deparse_hex(uchar str, char *result) +deparse_hex(uint8_t str, char *result) { int input_high; int input_low; static char outchr[]= - {"0123456789ABCDEF" - }; + { + "0123456789ABCDEF" + }; input_high = (str>>4); input_low = (str & 0x0F); @@ -2217,3 +763,6 @@ I->z=A->z+((B->z-A->z)*F); I->m=A->m+((B->m-A->m)*F); } + + + diff -Nru postgis-1.5.3/liblwgeom/lwgeom_debug.c postgis-2.0.1/liblwgeom/lwgeom_debug.c --- postgis-1.5.3/liblwgeom/lwgeom_debug.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwgeom_debug.c 2012-03-07 17:40:39.000000000 +0000 @@ -0,0 +1,172 @@ +/********************************************************************** + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * + * Copyright (C) 2004 Refractions Research Inc. + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include "lwgeom_log.h" +#include "liblwgeom.h" + +#include +#include + +/* Place to hold the ZM string used in other summaries */ +static char tflags[5]; + +static char * +lwtype_flagchars(uint8_t flags) +{ + int flagno = 0; + if ( FLAGS_GET_Z(flags) ) tflags[flagno++] = 'Z'; + if ( FLAGS_GET_M(flags) ) tflags[flagno++] = 'M'; + if ( FLAGS_GET_BBOX(flags) ) tflags[flagno++] = 'B'; + if ( FLAGS_GET_GEODETIC(flags) ) tflags[flagno++] = 'G'; + tflags[flagno] = '\0'; + + LWDEBUGF(4, "Flags: %s - returning %p", flags, tflags); + + return tflags; +} + +/* + * Returns an alloced string containing summary for the LWGEOM object + */ +static char * +lwpoint_summary(LWPOINT *point, int offset) +{ + char *result; + char *pad=""; + char *zmflags = lwtype_flagchars(point->flags); + + result = (char *)lwalloc(128+offset); + + sprintf(result, "%*.s%s[%s]", + offset, pad, lwtype_name(point->type), + zmflags); + return result; +} + +static char * +lwline_summary(LWLINE *line, int offset) +{ + char *result; + char *pad=""; + char *zmflags = lwtype_flagchars(line->flags); + + result = (char *)lwalloc(128+offset); + + sprintf(result, "%*.s%s[%s] with %d points", + offset, pad, lwtype_name(line->type), + zmflags, + line->points->npoints); + return result; +} + + +static char * +lwcollection_summary(LWCOLLECTION *col, int offset) +{ + size_t size = 128; + char *result; + char *tmp; + int i; + static char *nl = "\n"; + char *pad=""; + char *zmflags = lwtype_flagchars(col->flags); + + LWDEBUG(2, "lwcollection_summary called"); + + result = (char *)lwalloc(size); + + sprintf(result, "%*.s%s[%s] with %d elements\n", + offset, pad, lwtype_name(col->type), + zmflags, + col->ngeoms); + + for (i=0; ingeoms; i++) + { + tmp = lwgeom_summary(col->geoms[i], offset+2); + size += strlen(tmp)+1; + result = lwrealloc(result, size); + + LWDEBUGF(4, "Reallocated %d bytes for result", size); + if ( i > 0 ) strcat(result,nl); + + strcat(result, tmp); + lwfree(tmp); + } + + LWDEBUG(3, "lwcollection_summary returning"); + + return result; +} + +static char * +lwpoly_summary(LWPOLY *poly, int offset) +{ + char tmp[256]; + size_t size = 64*(poly->nrings+1)+128; + char *result; + int i; + char *pad=""; + static char *nl = "\n"; + char *zmflags = lwtype_flagchars(poly->flags); + + LWDEBUG(2, "lwpoly_summary called"); + + result = (char *)lwalloc(size); + + sprintf(result, "%*.s%s[%s] with %i rings\n", + offset, pad, lwtype_name(poly->type), + zmflags, + poly->nrings); + + for (i=0; inrings; i++) + { + sprintf(tmp,"%s ring %i has %i points", + pad, i, poly->rings[i]->npoints); + if ( i > 0 ) strcat(result,nl); + strcat(result,tmp); + } + + LWDEBUG(3, "lwpoly_summary returning"); + + return result; +} + +char * +lwgeom_summary(const LWGEOM *lwgeom, int offset) +{ + char *result; + + switch (lwgeom->type) + { + case POINTTYPE: + return lwpoint_summary((LWPOINT *)lwgeom, offset); + + case LINETYPE: + return lwline_summary((LWLINE *)lwgeom, offset); + + case POLYGONTYPE: + return lwpoly_summary((LWPOLY *)lwgeom, offset); + + case MULTIPOINTTYPE: + case MULTILINETYPE: + case MULTIPOLYGONTYPE: + case COLLECTIONTYPE: + return lwcollection_summary((LWCOLLECTION *)lwgeom, offset); + default: + result = (char *)lwalloc(256); + sprintf(result, "Object is of unknown type: %d", + lwgeom->type); + return result; + } + + return NULL; +} diff -Nru postgis-1.5.3/liblwgeom/lwgeom_geos.c postgis-2.0.1/liblwgeom/lwgeom_geos.c --- postgis-1.5.3/liblwgeom/lwgeom_geos.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwgeom_geos.c 2012-05-25 15:20:01.000000000 +0000 @@ -0,0 +1,1301 @@ +/********************************************************************** + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * + * Copyright 2011 Sandro Santilli + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include "lwgeom_geos.h" +#include "liblwgeom.h" +#include "liblwgeom_internal.h" +#include "lwgeom_log.h" + +#include + +#undef LWGEOM_PROFILE_BUILDAREA + +#define LWGEOM_GEOS_ERRMSG_MAXSIZE 256 +char lwgeom_geos_errmsg[LWGEOM_GEOS_ERRMSG_MAXSIZE]; + +extern void +lwgeom_geos_error(const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + + /* Call the supplied function */ + if ( LWGEOM_GEOS_ERRMSG_MAXSIZE-1 < vsnprintf(lwgeom_geos_errmsg, LWGEOM_GEOS_ERRMSG_MAXSIZE-1, fmt, ap) ) + { + lwgeom_geos_errmsg[LWGEOM_GEOS_ERRMSG_MAXSIZE-1] = '\0'; + } + + va_end(ap); +} + + +/* +** GEOS <==> PostGIS conversion functions +** +** Default conversion creates a GEOS point array, then iterates through the +** PostGIS points, setting each value in the GEOS array one at a time. +** +*/ + +/* Return a POINTARRAY from a GEOSCoordSeq */ +POINTARRAY * +ptarray_from_GEOSCoordSeq(const GEOSCoordSequence *cs, char want3d) +{ + uint32_t dims=2; + uint32_t size, i, ptsize; + POINTARRAY *pa; + POINT4D point; + + LWDEBUG(2, "ptarray_fromGEOSCoordSeq called"); + + if ( ! GEOSCoordSeq_getSize(cs, &size) ) + lwerror("Exception thrown"); + + LWDEBUGF(4, " GEOSCoordSeq size: %d", size); + + if ( want3d ) + { + if ( ! GEOSCoordSeq_getDimensions(cs, &dims) ) + lwerror("Exception thrown"); + + LWDEBUGF(4, " GEOSCoordSeq dimensions: %d", dims); + + /* forget higher dimensions (if any) */ + if ( dims > 3 ) dims = 3; + } + + LWDEBUGF(4, " output dimensions: %d", dims); + + ptsize = sizeof(double)*dims; + + pa = ptarray_construct((dims==3), 0, size); + + for (i=0; i= 3 ) GEOSCoordSeq_getZ(cs, i, &(point.z)); + ptarray_set_point4d(pa,i,&point); + } + + return pa; +} + +/* Return an LWGEOM from a Geometry */ +LWGEOM * +GEOS2LWGEOM(const GEOSGeometry *geom, char want3d) +{ + int type = GEOSGeomTypeId(geom) ; + int hasZ; + int SRID = GEOSGetSRID(geom); + + /* GEOS's 0 is equivalent to our unknown as for SRID values */ + if ( SRID == 0 ) SRID = SRID_UNKNOWN; + + if ( want3d ) + { + hasZ = GEOSHasZ(geom); + if ( ! hasZ ) + { + LWDEBUG(3, "Geometry has no Z, won't provide one"); + + want3d = 0; + } + } + +/* + if ( GEOSisEmpty(geom) ) + { + return (LWGEOM*)lwcollection_construct_empty(COLLECTIONTYPE, SRID, want3d, 0); + } +*/ + + switch (type) + { + const GEOSCoordSequence *cs; + POINTARRAY *pa, **ppaa; + const GEOSGeometry *g; + LWGEOM **geoms; + uint32_t i, ngeoms; + + case GEOS_POINT: + LWDEBUG(4, "lwgeom_from_geometry: it's a Point"); + cs = GEOSGeom_getCoordSeq(geom); + if ( GEOSisEmpty(geom) ) + return (LWGEOM*)lwpoint_construct_empty(SRID, want3d, 0); + pa = ptarray_from_GEOSCoordSeq(cs, want3d); + return (LWGEOM *)lwpoint_construct(SRID, NULL, pa); + + case GEOS_LINESTRING: + case GEOS_LINEARRING: + LWDEBUG(4, "lwgeom_from_geometry: it's a LineString or LinearRing"); + if ( GEOSisEmpty(geom) ) + return (LWGEOM*)lwline_construct_empty(SRID, want3d, 0); + + cs = GEOSGeom_getCoordSeq(geom); + pa = ptarray_from_GEOSCoordSeq(cs, want3d); + return (LWGEOM *)lwline_construct(SRID, NULL, pa); + + case GEOS_POLYGON: + LWDEBUG(4, "lwgeom_from_geometry: it's a Polygon"); + if ( GEOSisEmpty(geom) ) + return (LWGEOM*)lwpoly_construct_empty(SRID, want3d, 0); + ngeoms = GEOSGetNumInteriorRings(geom); + ppaa = lwalloc(sizeof(POINTARRAY *)*(ngeoms+1)); + g = GEOSGetExteriorRing(geom); + cs = GEOSGeom_getCoordSeq(g); + ppaa[0] = ptarray_from_GEOSCoordSeq(cs, want3d); + for (i=0; iflags) ) dims = 3; + size = pa->npoints; + + sq = GEOSCoordSeq_create(size, dims); + if ( ! sq ) lwerror("Error creating GEOS Coordinate Sequence"); + + for (i=0; i= 4 + char *wkt; +#endif + + LWDEBUGF(4, "LWGEOM2GEOS got a %s", lwtype_name(lwgeom->type)); + + if (lwgeom_has_arc(lwgeom)) + { + LWDEBUG(3, "LWGEOM2GEOS: arced geometry found."); + + lwerror("Exception in LWGEOM2GEOS: curved geometry not supported."); + return NULL; + } + + switch (lwgeom->type) + { + LWPOINT *lwp = NULL; + LWPOLY *lwpoly = NULL; + LWLINE *lwl = NULL; + LWCOLLECTION *lwc = NULL; +#if POSTGIS_GEOS_VERSION < 33 + POINTARRAY *pa = NULL; +#endif + + case POINTTYPE: + lwp = (LWPOINT *)lwgeom; + + if ( lwgeom_is_empty(lwgeom) ) + { +#if POSTGIS_GEOS_VERSION < 33 + pa = ptarray_construct_empty(lwgeom_has_z(lwgeom), lwgeom_has_m(lwgeom), 2); + sq = ptarray_to_GEOSCoordSeq(pa); + shell = GEOSGeom_createLinearRing(sq); + g = GEOSGeom_createPolygon(shell, NULL, 0); +#else + g = GEOSGeom_createEmptyPolygon(); +#endif + } + else + { + sq = ptarray_to_GEOSCoordSeq(lwp->point); + g = GEOSGeom_createPoint(sq); + } + if ( ! g ) + { + /* lwnotice("Exception in LWGEOM2GEOS"); */ + return NULL; + } + break; + case LINETYPE: + lwl = (LWLINE *)lwgeom; + if ( lwl->points->npoints == 1 ) { + /* Duplicate point, to make geos-friendly */ + lwl->points = ptarray_addPoint(lwl->points, + getPoint_internal(lwl->points, 0), + FLAGS_NDIMS(lwl->points->flags), + lwl->points->npoints); + } + sq = ptarray_to_GEOSCoordSeq(lwl->points); + g = GEOSGeom_createLineString(sq); + if ( ! g ) + { + /* lwnotice("Exception in LWGEOM2GEOS"); */ + return NULL; + } + break; + + case POLYGONTYPE: + lwpoly = (LWPOLY *)lwgeom; + if ( lwgeom_is_empty(lwgeom) ) + { +#if POSTGIS_GEOS_VERSION < 33 + POINTARRAY *pa = ptarray_construct_empty(lwgeom_has_z(lwgeom), lwgeom_has_m(lwgeom), 2); + sq = ptarray_to_GEOSCoordSeq(pa); + shell = GEOSGeom_createLinearRing(sq); + g = GEOSGeom_createPolygon(shell, NULL, 0); +#else + g = GEOSGeom_createEmptyPolygon(); +#endif + } + else + { + sq = ptarray_to_GEOSCoordSeq(lwpoly->rings[0]); + /* TODO: check ring for being closed and fix if not */ + shell = GEOSGeom_createLinearRing(sq); + if ( ! shell ) return NULL; + /*lwerror("LWGEOM2GEOS: exception during polygon shell conversion"); */ + ngeoms = lwpoly->nrings-1; + if ( ngeoms > 0 ) + geoms = malloc(sizeof(GEOSGeom)*ngeoms); + + for (i=1; inrings; ++i) + { + sq = ptarray_to_GEOSCoordSeq(lwpoly->rings[i]); + geoms[i-1] = GEOSGeom_createLinearRing(sq); + if ( ! geoms[i-1] ) + { + --i; + while (i) GEOSGeom_destroy(geoms[--i]); + free(geoms); + GEOSGeom_destroy(shell); + return NULL; + } + /*lwerror("LWGEOM2GEOS: exception during polygon hole conversion"); */ + } + g = GEOSGeom_createPolygon(shell, geoms, ngeoms); + if (geoms) free(geoms); + } + if ( ! g ) return NULL; + break; + case MULTIPOINTTYPE: + case MULTILINETYPE: + case MULTIPOLYGONTYPE: + case COLLECTIONTYPE: + if ( lwgeom->type == MULTIPOINTTYPE ) + geostype = GEOS_MULTIPOINT; + else if ( lwgeom->type == MULTILINETYPE ) + geostype = GEOS_MULTILINESTRING; + else if ( lwgeom->type == MULTIPOLYGONTYPE ) + geostype = GEOS_MULTIPOLYGON; + else + geostype = GEOS_GEOMETRYCOLLECTION; + + lwc = (LWCOLLECTION *)lwgeom; + + ngeoms = lwc->ngeoms; + if ( ngeoms > 0 ) + geoms = malloc(sizeof(GEOSGeom)*ngeoms); + + for (i=0; igeoms[i]); + if ( ! g ) + { + while (i) GEOSGeom_destroy(geoms[--i]); + free(geoms); + return NULL; + } + geoms[i] = g; + } + g = GEOSGeom_createCollection(geostype, geoms, ngeoms); + if ( geoms ) free(geoms); + if ( ! g ) return NULL; + break; + + default: + lwerror("Unknown geometry type: %d - %s", lwgeom->type, lwtype_name(lwgeom->type)); + return NULL; + } + + GEOSSetSRID(g, lwgeom->srid); + +#if LWDEBUG_LEVEL >= 4 + wkt = GEOSGeomToWKT(g); + LWDEBUGF(4, "LWGEOM2GEOS: GEOSGeom: %s", wkt); + free(wkt); +#endif + + return g; +} + +const char* +lwgeom_geos_version() +{ + const char *ver = GEOSversion(); + return ver; +} + +LWGEOM * +lwgeom_normalize(const LWGEOM *geom1) +{ + LWGEOM *result ; + GEOSGeometry *g1; + int is3d ; + int srid ; + + srid = (int)(geom1->srid); + is3d = FLAGS_GET_Z(geom1->flags); + + initGEOS(lwnotice, lwgeom_geos_error); + + g1 = LWGEOM2GEOS(geom1); + if ( 0 == g1 ) /* exception thrown at construction */ + { + lwerror("First argument geometry could not be converted to GEOS."); + return NULL ; + } + + if ( -1 == GEOSNormalize(g1) ) + { + lwerror("Error in GEOSNormalize: %s", lwgeom_geos_errmsg); + return NULL; /* never get here */ + } + + GEOSSetSRID(g1, srid); /* needed ? */ + result = GEOS2LWGEOM(g1, is3d); + GEOSGeom_destroy(g1); + + if (result == NULL) + { + lwerror("Error performing intersection: GEOS2LWGEOM: %s", + lwgeom_geos_errmsg); + return NULL ; /* never get here */ + } + + return result ; +} + +LWGEOM * +lwgeom_intersection(const LWGEOM *geom1, const LWGEOM *geom2) +{ + LWGEOM *result ; + GEOSGeometry *g1, *g2, *g3 ; + int is3d ; + int srid ; + + /* A.Intersection(Empty) == Empty */ + if ( lwgeom_is_empty(geom2) ) + return lwgeom_clone(geom2); + + /* Empty.Intersection(A) == Empty */ + if ( lwgeom_is_empty(geom1) ) + return lwgeom_clone(geom1); + + /* ensure srids are identical */ + srid = (int)(geom1->srid); + error_if_srid_mismatch(srid, (int)(geom2->srid)); + + is3d = (FLAGS_GET_Z(geom1->flags) || FLAGS_GET_Z(geom2->flags)) ; + + initGEOS(lwnotice, lwgeom_geos_error); + + LWDEBUG(3, "intersection() START"); + + g1 = LWGEOM2GEOS(geom1); + if ( 0 == g1 ) /* exception thrown at construction */ + { + lwerror("First argument geometry could not be converted to GEOS."); + return NULL ; + } + + g2 = LWGEOM2GEOS(geom2); + if ( 0 == g2 ) /* exception thrown at construction */ + { + lwerror("Second argument geometry could not be converted to GEOS."); + GEOSGeom_destroy(g1); + return NULL ; + } + + LWDEBUG(3, " constructed geometrys - calling geos"); + LWDEBUGF(3, " g1 = %s", GEOSGeomToWKT(g1)); + LWDEBUGF(3, " g2 = %s", GEOSGeomToWKT(g2)); + /*LWDEBUGF(3, "g2 is valid = %i",GEOSisvalid(g2)); */ + /*LWDEBUGF(3, "g1 is valid = %i",GEOSisvalid(g1)); */ + + g3 = GEOSIntersection(g1,g2); + + LWDEBUG(3, " intersection finished"); + + if (g3 == NULL) + { + GEOSGeom_destroy(g1); + GEOSGeom_destroy(g2); + lwerror("Error performing intersection: %s", + lwgeom_geos_errmsg); + return NULL; /* never get here */ + } + + LWDEBUGF(3, "result: %s", GEOSGeomToWKT(g3) ) ; + + GEOSSetSRID(g3, srid); + + result = GEOS2LWGEOM(g3, is3d); + + if (result == NULL) + { + GEOSGeom_destroy(g1); + GEOSGeom_destroy(g2); + GEOSGeom_destroy(g3); + lwerror("Error performing intersection: GEOS2LWGEOM: %s", + lwgeom_geos_errmsg); + return NULL ; /* never get here */ + } + + GEOSGeom_destroy(g1); + GEOSGeom_destroy(g2); + GEOSGeom_destroy(g3); + + return result ; +} + +LWGEOM * +lwgeom_difference(const LWGEOM *geom1, const LWGEOM *geom2) +{ + GEOSGeometry *g1, *g2, *g3; + LWGEOM *result; + int is3d; + int srid; + + /* A.Difference(Empty) == A */ + if ( lwgeom_is_empty(geom2) ) + return lwgeom_clone(geom1); + + /* Empty.Intersection(A) == Empty */ + if ( lwgeom_is_empty(geom1) ) + return lwgeom_clone(geom1); + + /* ensure srids are identical */ + srid = (int)(geom1->srid); + error_if_srid_mismatch(srid, (int)(geom2->srid)); + + is3d = (FLAGS_GET_Z(geom1->flags) || FLAGS_GET_Z(geom2->flags)) ; + + initGEOS(lwnotice, lwgeom_geos_error); + + g1 = LWGEOM2GEOS(geom1); + if ( 0 == g1 ) /* exception thrown at construction */ + { + lwerror("First argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + return NULL; + } + + g2 = LWGEOM2GEOS(geom2); + if ( 0 == g2 ) /* exception thrown at construction */ + { + GEOSGeom_destroy(g1); + lwerror("Second argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + return NULL; + } + + g3 = GEOSDifference(g1,g2); + + if (g3 == NULL) + { + GEOSGeom_destroy(g1); + GEOSGeom_destroy(g2); + lwerror("GEOSDifference: %s", lwgeom_geos_errmsg); + return NULL ; /* never get here */ + } + + LWDEBUGF(3, "result: %s", GEOSGeomToWKT(g3) ) ; + + GEOSSetSRID(g3, srid); + + result = GEOS2LWGEOM(g3, is3d); + + if (result == NULL) + { + GEOSGeom_destroy(g1); + GEOSGeom_destroy(g2); + GEOSGeom_destroy(g3); + lwerror("Error performing difference: GEOS2LWGEOM: %s", + lwgeom_geos_errmsg); + return NULL; /* never get here */ + } + + GEOSGeom_destroy(g1); + GEOSGeom_destroy(g2); + GEOSGeom_destroy(g3); + + /* compressType(result); */ + + return result; +} + +LWGEOM * +lwgeom_symdifference(const LWGEOM* geom1, const LWGEOM* geom2) +{ + GEOSGeometry *g1, *g2, *g3; + LWGEOM *result; + int is3d; + int srid; + + /* A.SymDifference(Empty) == A */ + if ( lwgeom_is_empty(geom2) ) + return lwgeom_clone(geom1); + + /* Empty.DymDifference(B) == B */ + if ( lwgeom_is_empty(geom1) ) + return lwgeom_clone(geom2); + + /* ensure srids are identical */ + srid = (int)(geom1->srid); + error_if_srid_mismatch(srid, (int)(geom2->srid)); + + is3d = (FLAGS_GET_Z(geom1->flags) || FLAGS_GET_Z(geom2->flags)) ; + + initGEOS(lwnotice, lwgeom_geos_error); + + g1 = LWGEOM2GEOS(geom1); + + if ( 0 == g1 ) /* exception thrown at construction */ + { + lwerror("First argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + return NULL; + } + + g2 = LWGEOM2GEOS(geom2); + + if ( 0 == g2 ) /* exception thrown at construction */ + { + lwerror("Second argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + GEOSGeom_destroy(g1); + return NULL; + } + + g3 = GEOSSymDifference(g1,g2); + + if (g3 == NULL) + { + GEOSGeom_destroy(g1); + GEOSGeom_destroy(g2); + lwerror("GEOSSymDifference: %s", lwgeom_geos_errmsg); + return NULL; /*never get here */ + } + + LWDEBUGF(3, "result: %s", GEOSGeomToWKT(g3)); + + GEOSSetSRID(g3, srid); + + result = GEOS2LWGEOM(g3, is3d); + + if (result == NULL) + { + GEOSGeom_destroy(g1); + GEOSGeom_destroy(g2); + GEOSGeom_destroy(g3); + lwerror("GEOS symdifference() threw an error (result postgis geometry formation)!"); + return NULL ; /*never get here */ + } + + GEOSGeom_destroy(g1); + GEOSGeom_destroy(g2); + GEOSGeom_destroy(g3); + + return result; +} + +LWGEOM* +lwgeom_union(const LWGEOM *geom1, const LWGEOM *geom2) +{ + int is3d; + int srid; + GEOSGeometry *g1, *g2, *g3; + LWGEOM *result; + + LWDEBUG(2, "in geomunion"); + + /* A.Union(empty) == A */ + if ( lwgeom_is_empty(geom1) ) + return lwgeom_clone(geom2); + + /* B.Union(empty) == B */ + if ( lwgeom_is_empty(geom2) ) + return lwgeom_clone(geom1); + + + /* ensure srids are identical */ + srid = (int)(geom1->srid); + error_if_srid_mismatch(srid, (int)(geom2->srid)); + + is3d = (FLAGS_GET_Z(geom1->flags) || FLAGS_GET_Z(geom2->flags)) ; + + initGEOS(lwnotice, lwgeom_geos_error); + + g1 = LWGEOM2GEOS(geom1); + + if ( 0 == g1 ) /* exception thrown at construction */ + { + lwerror("First argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + return NULL; + } + + g2 = LWGEOM2GEOS(geom2); + + if ( 0 == g2 ) /* exception thrown at construction */ + { + GEOSGeom_destroy(g1); + lwerror("Second argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + return NULL; + } + + LWDEBUGF(3, "g1=%s", GEOSGeomToWKT(g1)); + LWDEBUGF(3, "g2=%s", GEOSGeomToWKT(g2)); + + g3 = GEOSUnion(g1,g2); + + LWDEBUGF(3, "g3=%s", GEOSGeomToWKT(g3)); + + GEOSGeom_destroy(g1); + GEOSGeom_destroy(g2); + + if (g3 == NULL) + { + lwerror("GEOSUnion: %s", lwgeom_geos_errmsg); + return NULL; /* never get here */ + } + + + GEOSSetSRID(g3, srid); + + result = GEOS2LWGEOM(g3, is3d); + + GEOSGeom_destroy(g3); + + if (result == NULL) + { + lwerror("Error performing union: GEOS2LWGEOM: %s", + lwgeom_geos_errmsg); + return NULL; /*never get here */ + } + + return result; +} + +/* ------------ BuildArea stuff ---------------------------------------------------------------------{ */ + +typedef struct Face_t { + const GEOSGeometry* geom; + GEOSGeometry* env; + double envarea; + struct Face_t* parent; /* if this face is an hole of another one, or NULL */ +} Face; + +static Face* newFace(const GEOSGeometry* g); +static void delFace(Face* f); +static unsigned int countParens(const Face* f); +static void findFaceHoles(Face** faces, int nfaces); + +static Face* +newFace(const GEOSGeometry* g) +{ + Face* f = lwalloc(sizeof(Face)); + f->geom = g; + f->env = GEOSEnvelope(f->geom); + GEOSArea(f->env, &f->envarea); + f->parent = NULL; + /* lwnotice("Built Face with area %g and %d holes", f->envarea, GEOSGetNumInteriorRings(f->geom)); */ + return f; +} + +static unsigned int +countParens(const Face* f) +{ + unsigned int pcount = 0; + while ( f->parent ) { + ++pcount; + f = f->parent; + } + return pcount; +} + +/* Destroy the face and release memory associated with it */ +static void +delFace(Face* f) +{ + GEOSGeom_destroy(f->env); + lwfree(f); +} + + +static int +compare_by_envarea(const void* g1, const void* g2) +{ + Face* f1 = *(Face**)g1; + Face* f2 = *(Face**)g2; + double n1 = f1->envarea; + double n2 = f2->envarea; + + if ( n1 < n2 ) return 1; + if ( n1 > n2 ) return -1; + return 0; +} + +/* Find holes of each face */ +static void +findFaceHoles(Face** faces, int nfaces) +{ + int i, j, h; + + /* We sort by envelope area so that we know holes are only + * after their shells */ + qsort(faces, nfaces, sizeof(Face*), compare_by_envarea); + for (i=0; igeom); + LWDEBUGF(2, "Scanning face %d with env area %g and %d holes", i, f->envarea, nholes); + for (h=0; hgeom, h); + LWDEBUGF(2, "Looking for hole %d/%d of face %d among %d other faces", h+1, nholes, i, nfaces-i-1); + for (j=i+1; jparent ) continue; /* hole already assigned */ + const GEOSGeometry *f2er = GEOSGetExteriorRing(f2->geom); + /* TODO: can be optimized as the ring would have the + * same vertices, possibly in different order. + * maybe comparing number of points could already be + * useful. + */ + if ( GEOSEquals(f2er, hole) ) { + LWDEBUGF(2, "Hole %d/%d of face %d is face %d", h+1, nholes, i, j); + f2->parent = f; + break; + } + } + } + } +} + +static GEOSGeometry* +collectFacesWithEvenAncestors(Face** faces, int nfaces) +{ + GEOSGeometry **geoms = lwalloc(sizeof(GEOSGeometry*)*nfaces); + GEOSGeometry *ret; + unsigned int ngeoms = 0; + int i; + + for (i=0; igeom); + } + + ret = GEOSGeom_createCollection(GEOS_MULTIPOLYGON, geoms, ngeoms); + lwfree(geoms); + return ret; +} + +GEOSGeometry* +LWGEOM_GEOS_buildArea(const GEOSGeometry* geom_in) +{ + GEOSGeometry *tmp; + GEOSGeometry *geos_result, *shp; + GEOSGeometry const *vgeoms[1]; + uint32_t i, ngeoms; + int srid = GEOSGetSRID(geom_in); + Face ** geoms; + + vgeoms[0] = geom_in; +#ifdef LWGEOM_PROFILE_BUILDAREA + lwnotice("Polygonizing"); +#endif + geos_result = GEOSPolygonize(vgeoms, 1); + + LWDEBUGF(3, "GEOSpolygonize returned @ %p", geos_result); + + /* Null return from GEOSpolygonize (an exception) */ + if ( ! geos_result ) return 0; + + /* + * We should now have a collection + */ +#if PARANOIA_LEVEL > 0 + if ( GEOSGeometryTypeId(geos_result) != COLLECTIONTYPE ) + { + GEOSGeom_destroy(geos_result); + lwerror("Unexpected return from GEOSpolygonize"); + return 0; + } +#endif + + ngeoms = GEOSGetNumGeometries(geos_result); +#ifdef LWGEOM_PROFILE_BUILDAREA + lwnotice("Num geometries from polygonizer: %d", ngeoms); +#endif + + + LWDEBUGF(3, "GEOSpolygonize: ngeoms in polygonize output: %d", ngeoms); + LWDEBUGF(3, "GEOSpolygonize: polygonized:%s", + lwgeom_to_ewkt(GEOS2LWGEOM(geos_result, 0))); + + /* + * No geometries in collection, early out + */ + if ( ngeoms == 0 ) + { + GEOSSetSRID(geos_result, srid); + return geos_result; + } + + /* + * Return first geometry if we only have one in collection, + * to avoid the unnecessary Geometry clone below. + */ + if ( ngeoms == 1 ) + { + tmp = (GEOSGeometry *)GEOSGetGeometryN(geos_result, 0); + if ( ! tmp ) + { + GEOSGeom_destroy(geos_result); + return 0; /* exception */ + } + shp = GEOSGeom_clone(tmp); + GEOSGeom_destroy(geos_result); /* only safe after the clone above */ + GEOSSetSRID(shp, srid); + return shp; + } + + LWDEBUGF(2, "Polygonize returned %d geoms", ngeoms); + + /* + * Polygonizer returns a polygon for each face in the built topology. + * + * This means that for any face with holes we'll have other faces + * representing each hole. We can imagine a parent-child relationship + * between these faces. + * + * In order to maximize the number of visible rings in output we + * only use those faces which have an even number of parents. + * + * Example: + * + * +---------------+ + * | L0 | L0 has no parents + * | +---------+ | + * | | L1 | | L1 is an hole of L0 + * | | +---+ | | + * | | |L2 | | | L2 is an hole of L1 (which is an hole of L0) + * | | | | | | + * | | +---+ | | + * | +---------+ | + * | | + * +---------------+ + * + * See http://trac.osgeo.org/postgis/ticket/1806 + * + */ + +#ifdef LWGEOM_PROFILE_BUILDAREA + lwnotice("Preparing face structures"); +#endif + + /* Prepare face structures for later analysis */ + geoms = lwalloc(sizeof(Face**)*ngeoms); + for (i=0; isrid); + int is3d = FLAGS_GET_Z(geom->flags); + + /* Can't build an area from an empty! */ + if ( lwgeom_is_empty(geom) ) + { + return (LWGEOM*)lwpoly_construct_empty(SRID, is3d, 0); + } + + LWDEBUG(3, "buildarea called"); + + LWDEBUGF(3, "ST_BuildArea got geom @ %p", geom); + + initGEOS(lwnotice, lwgeom_geos_error); + + geos_in = LWGEOM2GEOS(geom); + + if ( 0 == geos_in ) /* exception thrown at construction */ + { + lwerror("First argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + return NULL; + } + geos_out = LWGEOM_GEOS_buildArea(geos_in); + GEOSGeom_destroy(geos_in); + + if ( ! geos_out ) /* exception thrown.. */ + { + lwerror("LWGEOM_GEOS_buildArea: %s", lwgeom_geos_errmsg); + return NULL; + } + + /* If no geometries are in result collection, return NULL */ + if ( GEOSGetNumGeometries(geos_out) == 0 ) + { + GEOSGeom_destroy(geos_out); + return NULL; + } + + geom_out = GEOS2LWGEOM(geos_out, is3d); + GEOSGeom_destroy(geos_out); + +#if PARANOIA_LEVEL > 0 + if ( geom_out == NULL ) + { + lwerror("serialization error"); + return NULL; + } + +#endif + + return geom_out; +} + +/* ------------ end of BuildArea stuff ---------------------------------------------------------------------} */ + +LWGEOM* +lwgeom_geos_noop(const LWGEOM* geom_in) +{ + GEOSGeometry *geosgeom; + LWGEOM* geom_out; + + int is3d = FLAGS_GET_Z(geom_in->flags); + + initGEOS(lwnotice, lwgeom_geos_error); + geosgeom = LWGEOM2GEOS(geom_in); + if ( ! geosgeom ) { + lwerror("Geometry could not be converted to GEOS: %s", + lwgeom_geos_errmsg); + return NULL; + } + geom_out = GEOS2LWGEOM(geosgeom, is3d); + GEOSGeom_destroy(geosgeom); + if ( ! geom_out ) { + lwerror("GEOS Geometry could not be converted to LWGEOM: %s", + lwgeom_geos_errmsg); + } + return geom_out; + +} + +LWGEOM* +lwgeom_snap(const LWGEOM* geom1, const LWGEOM* geom2, double tolerance) +{ +#if POSTGIS_GEOS_VERSION < 33 + lwerror("The GEOS version this lwgeom library " + "was compiled against (%d) doesn't support " + "'Snap' function (3.3.0+ required)", + POSTGIS_GEOS_VERSION); + return NULL; +#else /* POSTGIS_GEOS_VERSION >= 33 */ + + int srid, is3d; + GEOSGeometry *g1, *g2, *g3; + LWGEOM* out; + + srid = geom1->srid; + error_if_srid_mismatch(srid, (int)(geom2->srid)); + + is3d = (FLAGS_GET_Z(geom1->flags) || FLAGS_GET_Z(geom2->flags)) ; + + initGEOS(lwnotice, lwgeom_geos_error); + + g1 = (GEOSGeometry *)LWGEOM2GEOS(geom1); + if ( 0 == g1 ) /* exception thrown at construction */ + { + lwerror("First argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + return NULL; + } + + g2 = (GEOSGeometry *)LWGEOM2GEOS(geom2); + if ( 0 == g2 ) /* exception thrown at construction */ + { + lwerror("Second argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + GEOSGeom_destroy(g1); + return NULL; + } + + g3 = GEOSSnap(g1, g2, tolerance); + if (g3 == NULL) + { + GEOSGeom_destroy(g1); + GEOSGeom_destroy(g2); + lwerror("GEOSSnap: %s", lwgeom_geos_errmsg); + return NULL; + } + + GEOSGeom_destroy(g1); + GEOSGeom_destroy(g2); + + GEOSSetSRID(g3, srid); + out = GEOS2LWGEOM(g3, is3d); + if (out == NULL) + { + GEOSGeom_destroy(g3); + lwerror("GEOSSnap() threw an error (result LWGEOM geometry formation)!"); + return NULL; + } + GEOSGeom_destroy(g3); + + return out; + +#endif /* POSTGIS_GEOS_VERSION >= 33 */ +} + +LWGEOM* +lwgeom_sharedpaths(const LWGEOM* geom1, const LWGEOM* geom2) +{ +#if POSTGIS_GEOS_VERSION < 33 + lwerror("The GEOS version this postgis binary " + "was compiled against (%d) doesn't support " + "'SharedPaths' function (3.3.0+ required)", + POSTGIS_GEOS_VERSION); + return NULL; +#else /* POSTGIS_GEOS_VERSION >= 33 */ + GEOSGeometry *g1, *g2, *g3; + LWGEOM *out; + int is3d, srid; + + srid = geom1->srid; + error_if_srid_mismatch(srid, (int)(geom2->srid)); + + is3d = (FLAGS_GET_Z(geom1->flags) || FLAGS_GET_Z(geom2->flags)) ; + + initGEOS(lwnotice, lwgeom_geos_error); + + g1 = (GEOSGeometry *)LWGEOM2GEOS(geom1); + if ( 0 == g1 ) /* exception thrown at construction */ + { + lwerror("First argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + return NULL; + } + + g2 = (GEOSGeometry *)LWGEOM2GEOS(geom2); + if ( 0 == g2 ) /* exception thrown at construction */ + { + lwerror("Second argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + GEOSGeom_destroy(g1); + return NULL; + } + + g3 = GEOSSharedPaths(g1,g2); + + GEOSGeom_destroy(g1); + GEOSGeom_destroy(g2); + + if (g3 == NULL) + { + lwerror("GEOSSharedPaths: %s", lwgeom_geos_errmsg); + return NULL; + } + + GEOSSetSRID(g3, srid); + out = GEOS2LWGEOM(g3, is3d); + GEOSGeom_destroy(g3); + + if (out == NULL) + { + lwerror("GEOS2LWGEOM threw an error"); + return NULL; + } + + return out; +#endif /* POSTGIS_GEOS_VERSION >= 33 */ +} + +LWGEOM* +lwgeom_offsetcurve(const LWLINE *lwline, double size, int quadsegs, int joinStyle, double mitreLimit) +{ +#if POSTGIS_GEOS_VERSION < 32 + lwerror("lwgeom_offsetcurve: GEOS 3.2 or higher required"); +#else + GEOSGeometry *g1, *g3; + LWGEOM *lwgeom_result; + LWGEOM *lwgeom_in = lwline_as_lwgeom(lwline); + + initGEOS(lwnotice, lwgeom_geos_error); + + g1 = (GEOSGeometry *)LWGEOM2GEOS(lwgeom_in); + if ( ! g1 ) + { + lwerror("lwgeom_offsetcurve: Geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + return NULL; + } + +#if POSTGIS_GEOS_VERSION < 33 + /* Size is always positive for GEOSSingleSidedBuffer, and a flag determines left/right */ + g3 = GEOSSingleSidedBuffer(g1, size < 0 ? -size : size, + quadsegs, joinStyle, mitreLimit, + size < 0 ? 0 : 1); +#else + g3 = GEOSOffsetCurve(g1, size, quadsegs, joinStyle, mitreLimit); +#endif + /* Don't need input geometry anymore */ + GEOSGeom_destroy(g1); + + if (g3 == NULL) + { + GEOSGeom_destroy(g1); + lwerror("GEOSOffsetCurve: %s", lwgeom_geos_errmsg); + return NULL; + } + + LWDEBUGF(3, "result: %s", GEOSGeomToWKT(g3)); + + GEOSSetSRID(g3, lwgeom_get_srid(lwgeom_in)); + lwgeom_result = GEOS2LWGEOM(g3, lwgeom_has_z(lwgeom_in)); + GEOSGeom_destroy(g3); + + if (lwgeom_result == NULL) + { + lwerror("lwgeom_offsetcurve: GEOS2LWGEOM returned null"); + return NULL; + } + + return lwgeom_result; + +#endif /* POSTGIS_GEOS_VERSION < 32 */ +} diff -Nru postgis-1.5.3/liblwgeom/lwgeom_geos.h postgis-2.0.1/liblwgeom/lwgeom_geos.h --- postgis-1.5.3/liblwgeom/lwgeom_geos.h 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwgeom_geos.h 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,36 @@ +/********************************************************************** + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * + * Copyright 2011 Sandro Santilli + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +/* Workaround for GEOS 2.2 compatibility: old geos_c.h does not contain + header guards to protect from multiple inclusion */ +#ifndef GEOS_C_INCLUDED +#define GEOS_C_INCLUDED +#include "geos_c.h" +#endif + +#include "liblwgeom.h" + + +/* +** Public prototypes for GEOS utility functions. +*/ +LWGEOM *GEOS2LWGEOM(const GEOSGeometry *geom, char want3d); +GEOSGeometry * LWGEOM2GEOS(const LWGEOM *g); +GEOSGeometry * LWGEOM_GEOS_buildArea(const GEOSGeometry* geom_in); + + +POINTARRAY *ptarray_from_GEOSCoordSeq(const GEOSCoordSequence *cs, char want3d); + + +extern char lwgeom_geos_errmsg[]; +extern void lwgeom_geos_error(const char *fmt, ...); + diff -Nru postgis-1.5.3/liblwgeom/lwgeom_geos_clean.c postgis-2.0.1/liblwgeom/lwgeom_geos_clean.c --- postgis-1.5.3/liblwgeom/lwgeom_geos_clean.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwgeom_geos_clean.c 2012-05-10 07:24:08.000000000 +0000 @@ -0,0 +1,995 @@ +/********************************************************************** + * $Id: lwgeom_geos.c 5258 2010-02-17 21:02:49Z strk $ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * + * Copyright 2009-2010 Sandro Santilli + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + ********************************************************************** + * + * ST_MakeValid + * + * Attempts to make an invalid geometries valid w/out losing + * points. + * + * Polygons may become lines or points or a collection of + * polygons lines and points (collapsed ring cases). + * + * Author: Sandro Santilli + * + * Work done for Faunalia (http://www.faunalia.it) with fundings + * from Regione Toscana - Sistema Informativo per il Governo + * del Territorio e dell'Ambiente (RT-SIGTA). + * + * Thanks to Dr. Horst Duester for previous work on a plpgsql version + * of the cleanup logic [1] + * + * Thanks to Andrea Peri for recommandations on constraints. + * + * [1] http://www.sogis1.so.ch/sogis/dl/postgis/cleanGeometry.sql + * + * + **********************************************************************/ + +#include "liblwgeom.h" +#include "lwgeom_geos.h" +#include "liblwgeom_internal.h" +#include "lwgeom_log.h" + +#include +#include +#include + +/* #define POSTGIS_DEBUG_LEVEL 4 */ +#undef LWGEOM_PROFILE_MAKEVALID + + +/* + * Return Nth vertex in GEOSGeometry as a POINT. + * May return NULL if the geometry has NO vertexex. + */ +GEOSGeometry* LWGEOM_GEOS_getPointN(const GEOSGeometry*, uint32_t); +GEOSGeometry* +LWGEOM_GEOS_getPointN(const GEOSGeometry* g_in, uint32_t n) +{ + uint32_t dims; + const GEOSCoordSequence* seq_in; + GEOSCoordSeq seq_out; + double val; + uint32_t sz; + int gn; + GEOSGeometry* ret; + + switch ( GEOSGeomTypeId(g_in) ) + { + case GEOS_MULTIPOINT: + case GEOS_MULTILINESTRING: + case GEOS_MULTIPOLYGON: + case GEOS_GEOMETRYCOLLECTION: + { + for (gn=0; gn 2 ) + { + if ( ! GEOSCoordSeq_getZ(seq_in, n, &val) ) return NULL; + if ( ! GEOSCoordSeq_setZ(seq_out, n, val) ) return NULL; + } + + return GEOSGeom_createPoint(seq_out); +} + + + +LWGEOM * lwcollection_make_geos_friendly(LWCOLLECTION *g); +LWGEOM * lwline_make_geos_friendly(LWLINE *line); +LWGEOM * lwpoly_make_geos_friendly(LWPOLY *poly); +POINTARRAY* ring_make_geos_friendly(POINTARRAY* ring); + +/* + * Ensure the geometry is "structurally" valid + * (enough for GEOS to accept it) + * May return the input untouched (if already valid). + * May return geometries of lower dimension (on collapses) + */ +static LWGEOM * +lwgeom_make_geos_friendly(LWGEOM *geom) +{ + LWDEBUGF(2, "lwgeom_make_geos_friendly enter (type %d)", geom->type); + switch (geom->type) + { + case POINTTYPE: + case MULTIPOINTTYPE: + /* a point is always valid */ + return geom; + break; + + case LINETYPE: + /* lines need at least 2 points */ + return lwline_make_geos_friendly((LWLINE *)geom); + break; + + case POLYGONTYPE: + /* polygons need all rings closed and with npoints > 3 */ + return lwpoly_make_geos_friendly((LWPOLY *)geom); + break; + + case MULTILINETYPE: + case MULTIPOLYGONTYPE: + case COLLECTIONTYPE: + return lwcollection_make_geos_friendly((LWCOLLECTION *)geom); + break; + + case CIRCSTRINGTYPE: + case COMPOUNDTYPE: + case CURVEPOLYTYPE: + case MULTISURFACETYPE: + case MULTICURVETYPE: + default: + lwerror("lwgeom_make_geos_friendly: unsupported input geometry type: %s (%d)", lwtype_name(geom->type), geom->type); + break; + } + return 0; +} + +/* + * Close the point array, if not already closed in 2d. + * Returns the input if already closed in 2d, or a newly + * constructed POINTARRAY. + * TODO: move in ptarray.c + */ +POINTARRAY* ptarray_close2d(POINTARRAY* ring); +POINTARRAY* +ptarray_close2d(POINTARRAY* ring) +{ + POINTARRAY* newring; + + /* close the ring if not already closed (2d only) */ + if ( ! ptarray_isclosed2d(ring) ) + { + /* close it up */ + newring = ptarray_addPoint(ring, + getPoint_internal(ring, 0), + FLAGS_NDIMS(ring->flags), + ring->npoints); + ring = newring; + } + return ring; +} + +/* May return the same input or a new one (never zero) */ +POINTARRAY* +ring_make_geos_friendly(POINTARRAY* ring) +{ + POINTARRAY* closedring; + + /* close the ring if not already closed (2d only) */ + closedring = ptarray_close2d(ring); + if (closedring != ring ) + { + ptarray_free(ring); /* should we do this ? */ + ring = closedring; + } + + /* return 0 for collapsed ring (after closeup) */ + + while ( ring->npoints < 4 ) + { + LWDEBUGF(4, "ring has %d points, adding another", ring->npoints); + /* let's add another... */ + ring = ptarray_addPoint(ring, + getPoint_internal(ring, 0), + FLAGS_NDIMS(ring->flags), + ring->npoints); + } + + + return ring; +} + +/* Make sure all rings are closed and have > 3 points. + * May return the input untouched. + */ +LWGEOM * +lwpoly_make_geos_friendly(LWPOLY *poly) +{ + LWGEOM* ret; + POINTARRAY **new_rings; + int i; + + /* If the polygon has no rings there's nothing to do */ + if ( ! poly->nrings ) return (LWGEOM*)poly; + + /* Allocate enough pointers for all rings */ + new_rings = lwalloc(sizeof(POINTARRAY*)*poly->nrings); + + /* All rings must be closed and have > 3 points */ + for (i=0; inrings; i++) + { + POINTARRAY* ring_in = poly->rings[i]; + POINTARRAY* ring_out = ring_make_geos_friendly(ring_in); + + if ( ring_in != ring_out ) + { + LWDEBUGF(3, "lwpoly_make_geos_friendly: ring %d cleaned, now has %d points", i, ring_out->npoints); + /* this may come right from + * the binary representation lands + */ + /*ptarray_free(ring_in); */ + } + else + { + LWDEBUGF(3, "lwpoly_make_geos_friendly: ring %d untouched", i); + } + + assert ( ring_out ); + new_rings[i] = ring_out; + } + + lwfree(poly->rings); + poly->rings = new_rings; + ret = (LWGEOM*)poly; + + return ret; +} + +/* Need NO or >1 points. Duplicate first if only one. */ +LWGEOM * +lwline_make_geos_friendly(LWLINE *line) +{ + LWGEOM *ret; + + if (line->points->npoints == 1) /* 0 is fine, 2 is fine */ + { +#if 1 + /* Duplicate point */ + line->points = ptarray_addPoint(line->points, + getPoint_internal(line->points, 0), + FLAGS_NDIMS(line->points->flags), + line->points->npoints); + ret = (LWGEOM*)line; +#else + /* Turn into a point */ + ret = (LWGEOM*)lwpoint_construct(line->srid, 0, line->points); +#endif + return ret; + } + else + { + return (LWGEOM*)line; + /* return lwline_clone(line); */ + } +} + +LWGEOM * +lwcollection_make_geos_friendly(LWCOLLECTION *g) +{ + LWGEOM **new_geoms; + uint32_t i, new_ngeoms=0; + LWCOLLECTION *ret; + + /* enough space for all components */ + new_geoms = lwalloc(sizeof(LWGEOM *)*g->ngeoms); + + ret = lwalloc(sizeof(LWCOLLECTION)); + memcpy(ret, g, sizeof(LWCOLLECTION)); + + for (i=0; ingeoms; i++) + { + LWGEOM* newg = lwgeom_make_geos_friendly(g->geoms[i]); + if ( newg ) new_geoms[new_ngeoms++] = newg; + } + + ret->bbox = 0; /* recompute later... */ + + ret->ngeoms = new_ngeoms; + if ( new_ngeoms ) + { + ret->geoms = new_geoms; + } + else + { + free(new_geoms); + ret->geoms = 0; + } + + return (LWGEOM*)ret; +} + +/* + * Fully node given linework + */ +static GEOSGeometry* +LWGEOM_GEOS_nodeLines(const GEOSGeometry* lines) +{ + GEOSGeometry* noded; + GEOSGeometry* point; + + /* + * Union with first geometry point, obtaining full noding + * and dissolving of duplicated repeated points + * + * TODO: substitute this with UnaryUnion? + */ + + point = LWGEOM_GEOS_getPointN(lines, 0); + if ( ! point ) return NULL; + + LWDEBUGF(3, + "Boundary point: %s", + lwgeom_to_ewkt(GEOS2LWGEOM(point, 0))); + + noded = GEOSUnion(lines, point); + if ( NULL == noded ) + { + GEOSGeom_destroy(point); + return NULL; + } + + GEOSGeom_destroy(point); + + LWDEBUGF(3, + "LWGEOM_GEOS_nodeLines: in[%s] out[%s]", + lwgeom_to_ewkt(GEOS2LWGEOM(lines, 0)), + lwgeom_to_ewkt(GEOS2LWGEOM(noded, 0))); + + return noded; +} + +#if POSTGIS_GEOS_VERSION >= 33 +/* + * We expect initGEOS being called already. + * Will return NULL on error (expect error handler being called by then) + * + */ +static GEOSGeometry* +LWGEOM_GEOS_makeValidPolygon(const GEOSGeometry* gin) +{ + GEOSGeom gout; + GEOSGeom geos_bound; + GEOSGeom geos_cut_edges, geos_area, collapse_points; + GEOSGeometry *vgeoms[3]; /* One for area, one for cut-edges */ + unsigned int nvgeoms=0; + + assert (GEOSGeomTypeId(gin) == GEOS_POLYGON || + GEOSGeomTypeId(gin) == GEOS_MULTIPOLYGON); + + geos_bound = GEOSBoundary(gin); + if ( NULL == geos_bound ) + { + return NULL; + } + + LWDEBUGF(3, + "Boundaries: %s", + lwgeom_to_ewkt(GEOS2LWGEOM(geos_bound, 0))); + + /* Use noded boundaries as initial "cut" edges */ + +#ifdef LWGEOM_PROFILE_MAKEVALID + lwnotice("ST_MakeValid: noding lines"); +#endif + + + geos_cut_edges = LWGEOM_GEOS_nodeLines(geos_bound); + if ( NULL == geos_cut_edges ) + { + GEOSGeom_destroy(geos_bound); + lwnotice("LWGEOM_GEOS_nodeLines(): %s", lwgeom_geos_errmsg); + return NULL; + } + + /* NOTE: the noding process may drop lines collapsing to points. + * We want to retrive any of those */ + { + GEOSGeometry* pi; + GEOSGeometry* po; + +#ifdef LWGEOM_PROFILE_MAKEVALID + lwnotice("ST_MakeValid: extracting unique points from bounds"); +#endif + + pi = GEOSGeom_extractUniquePoints(geos_bound); + if ( NULL == pi ) + { + GEOSGeom_destroy(geos_bound); + lwnotice("GEOSGeom_extractUniquePoints(): %s", + lwgeom_geos_errmsg); + return NULL; + } + + LWDEBUGF(3, + "Boundaries input points %s", + lwgeom_to_ewkt(GEOS2LWGEOM(pi, 0))); + +#ifdef LWGEOM_PROFILE_MAKEVALID + lwnotice("ST_MakeValid: extracting unique points from cut_edges"); +#endif + + po = GEOSGeom_extractUniquePoints(geos_cut_edges); + if ( NULL == po ) + { + GEOSGeom_destroy(geos_bound); + GEOSGeom_destroy(pi); + lwnotice("GEOSGeom_extractUniquePoints(): %s", + lwgeom_geos_errmsg); + return NULL; + } + + LWDEBUGF(3, + "Boundaries output points %s", + lwgeom_to_ewkt(GEOS2LWGEOM(po, 0))); + +#ifdef LWGEOM_PROFILE_MAKEVALID + lwnotice("ST_MakeValid: find collapse points"); +#endif + + collapse_points = GEOSDifference(pi, po); + if ( NULL == collapse_points ) + { + GEOSGeom_destroy(geos_bound); + GEOSGeom_destroy(pi); + GEOSGeom_destroy(po); + lwnotice("GEOSDifference(): %s", lwgeom_geos_errmsg); + return NULL; + } + + LWDEBUGF(3, + "Collapse points: %s", + lwgeom_to_ewkt(GEOS2LWGEOM(collapse_points, 0))); + +#ifdef LWGEOM_PROFILE_MAKEVALID + lwnotice("ST_MakeValid: cleanup(1)"); +#endif + + GEOSGeom_destroy(pi); + GEOSGeom_destroy(po); + } + GEOSGeom_destroy(geos_bound); + + LWDEBUGF(3, + "Noded Boundaries: %s", + lwgeom_to_ewkt(GEOS2LWGEOM(geos_cut_edges, 0))); + + /* And use an empty geometry as initial "area" */ + geos_area = GEOSGeom_createEmptyPolygon(); + if ( ! geos_area ) + { + lwnotice("GEOSGeom_createEmptyPolygon(): %s", lwgeom_geos_errmsg); + GEOSGeom_destroy(geos_cut_edges); + return NULL; + } + + /* + * See if an area can be build with the remaining edges + * and if it can, symdifference with the original area. + * Iterate this until no more polygons can be created + * with left-over edges. + */ + while (GEOSGetNumGeometries(geos_cut_edges)) + { + GEOSGeometry* new_area=0; + GEOSGeometry* new_area_bound=0; + GEOSGeometry* symdif=0; + GEOSGeometry* new_cut_edges=0; + +#ifdef LWGEOM_PROFILE_MAKEVALID + lwnotice("ST_MakeValid: building area from %d edges", GEOSGetNumGeometries(geos_cut_edges)); +#endif + + /* + * ASSUMPTION: cut_edges should already be fully noded + */ + + new_area = LWGEOM_GEOS_buildArea(geos_cut_edges); + if ( ! new_area ) /* must be an exception */ + { + GEOSGeom_destroy(geos_cut_edges); + GEOSGeom_destroy(geos_area); + lwnotice("LWGEOM_GEOS_buildArea() threw an error: %s", + lwgeom_geos_errmsg); + return NULL; + } + + if ( GEOSisEmpty(new_area) ) + { + /* no more rings can be build with thes edges */ + GEOSGeom_destroy(new_area); + break; + } + + /* + * We succeeded in building a ring ! + */ + +#ifdef LWGEOM_PROFILE_MAKEVALID + lwnotice("ST_MakeValid: ring built with %d cut edges, saving boundaries", GEOSGetNumGeometries(geos_cut_edges)); +#endif + + /* + * Save the new ring boundaries first (to compute + * further cut edges later) + */ + new_area_bound = GEOSBoundary(new_area); + if ( ! new_area_bound ) + { + /* We did check for empty area already so + * this must be some other error */ + lwnotice("GEOSBoundary('%s') threw an error: %s", + lwgeom_to_ewkt(GEOS2LWGEOM(new_area, 0)), + lwgeom_geos_errmsg); + GEOSGeom_destroy(new_area); + GEOSGeom_destroy(geos_area); + return NULL; + } + +#ifdef LWGEOM_PROFILE_MAKEVALID + lwnotice("ST_MakeValid: running SymDifference with new area"); +#endif + + /* + * Now symdif new and old area + */ + symdif = GEOSSymDifference(geos_area, new_area); + if ( ! symdif ) /* must be an exception */ + { + GEOSGeom_destroy(geos_cut_edges); + GEOSGeom_destroy(new_area); + GEOSGeom_destroy(new_area_bound); + GEOSGeom_destroy(geos_area); + lwnotice("GEOSSymDifference() threw an error: %s", + lwgeom_geos_errmsg); + return NULL; + } + + GEOSGeom_destroy(geos_area); + GEOSGeom_destroy(new_area); + geos_area = symdif; + symdif = 0; + + /* + * Now let's re-set geos_cut_edges with what's left + * from the original boundary. + * ASSUMPTION: only the previous cut-edges can be + * left, so we don't need to reconsider + * the whole original boundaries + * + * NOTE: this is an expensive operation. + * + */ + +#ifdef LWGEOM_PROFILE_MAKEVALID + lwnotice("ST_MakeValid: computing new cut_edges (GEOSDifference)"); +#endif + + new_cut_edges = GEOSDifference(geos_cut_edges, new_area_bound); + GEOSGeom_destroy(new_area_bound); + if ( ! new_cut_edges ) /* an exception ? */ + { + /* cleanup and throw */ + GEOSGeom_destroy(geos_cut_edges); + GEOSGeom_destroy(geos_area); + lwnotice("GEOSDifference() threw an error: %s", + lwgeom_geos_errmsg); + return NULL; + } + GEOSGeom_destroy(geos_cut_edges); + geos_cut_edges = new_cut_edges; + } + +#ifdef LWGEOM_PROFILE_MAKEVALID + lwnotice("ST_MakeValid: final checks"); +#endif + + if ( ! GEOSisEmpty(geos_area) ) + { + vgeoms[nvgeoms++] = geos_area; + } + else + { + GEOSGeom_destroy(geos_area); + } + + if ( ! GEOSisEmpty(geos_cut_edges) ) + { + vgeoms[nvgeoms++] = geos_cut_edges; + } + else + { + GEOSGeom_destroy(geos_cut_edges); + } + + if ( ! GEOSisEmpty(collapse_points) ) + { + vgeoms[nvgeoms++] = collapse_points; + } + else + { + GEOSGeom_destroy(collapse_points); + } + + if ( 1 == nvgeoms ) + { + /* Return cut edges */ + gout = vgeoms[0]; + } + else + { + /* Collect areas and lines (if any line) */ + gout = GEOSGeom_createCollection(GEOS_GEOMETRYCOLLECTION, vgeoms, nvgeoms); + if ( ! gout ) /* an exception again */ + { + /* cleanup and throw */ + lwnotice("GEOSGeom_createCollection() threw an error: %s", + lwgeom_geos_errmsg); + /* TODO: cleanup! */ + return NULL; + } + } + + return gout; + +} + +static GEOSGeometry* +LWGEOM_GEOS_makeValidLine(const GEOSGeometry* gin) +{ + GEOSGeometry* noded; + noded = LWGEOM_GEOS_nodeLines(gin); + return noded; +} + +static GEOSGeometry* +LWGEOM_GEOS_makeValidMultiLine(const GEOSGeometry* gin) +{ + GEOSGeometry** lines; + GEOSGeometry** points; + GEOSGeometry* mline_out=0; + GEOSGeometry* mpoint_out=0; + GEOSGeometry* gout=0; + uint32_t nlines=0, nlines_alloc; + uint32_t npoints=0; + uint32_t ngeoms=0, nsubgeoms; + uint32_t i, j; + + ngeoms = GEOSGetNumGeometries(gin); + + nlines_alloc = ngeoms; + lines = lwalloc(sizeof(GEOSGeometry*)*nlines_alloc); + points = lwalloc(sizeof(GEOSGeometry*)*ngeoms); + + for (i=0; i 1 ) + { + mpoint_out = GEOSGeom_createCollection(GEOS_MULTIPOINT, + points, npoints); + } + else + { + mpoint_out = points[0]; + } + } + + if ( nlines ) + { + if ( nlines > 1 ) + { + mline_out = GEOSGeom_createCollection( + GEOS_MULTILINESTRING, lines, nlines); + } + else + { + mline_out = lines[0]; + } + } + + lwfree(lines); + + if ( mline_out && mpoint_out ) + { + points[0] = mline_out; + points[1] = mpoint_out; + gout = GEOSGeom_createCollection(GEOS_GEOMETRYCOLLECTION, + points, 2); + } + else if ( mline_out ) + { + gout = mline_out; + } + else if ( mpoint_out ) + { + gout = mpoint_out; + } + + lwfree(points); + + return gout; +} + + +static GEOSGeometry* +LWGEOM_GEOS_makeValid(const GEOSGeometry* gin) +{ + GEOSGeometry* gout; + char ret_char; + + /* + * Step 2: return what we got so far if already valid + */ + + ret_char = GEOSisValid(gin); + if ( ret_char == 2 ) + { + /* I don't think should ever happen */ + lwerror("GEOSisValid(): %s", lwgeom_geos_errmsg); + return NULL; + } + else if ( ret_char ) + { + LWDEBUGF(3, + "Geometry [%s] is valid. ", + lwgeom_to_ewkt(GEOS2LWGEOM(gin, 0))); + + /* It's valid at this step, return what we have */ + return GEOSGeom_clone(gin); + } + + LWDEBUGF(3, + "Geometry [%s] is still not valid: %s. " + "Will try to clean up further.", + lwgeom_to_ewkt(GEOS2LWGEOM(gin, 0)), lwgeom_geos_errmsg); + + + + /* + * Step 3 : make what we got valid + */ + + switch (GEOSGeomTypeId(gin)) + { + case GEOS_MULTIPOINT: + case GEOS_POINT: + /* points are always valid, but we might have invalid ordinate values */ + lwnotice("PUNTUAL geometry resulted invalid to GEOS -- dunno how to clean that up"); + return NULL; + break; + + case GEOS_LINESTRING: + gout = LWGEOM_GEOS_makeValidLine(gin); + if ( ! gout ) /* an exception or something */ + { + /* cleanup and throw */ + lwerror("%s", lwgeom_geos_errmsg); + return NULL; + } + break; /* we've done */ + + case GEOS_MULTILINESTRING: + gout = LWGEOM_GEOS_makeValidMultiLine(gin); + if ( ! gout ) /* an exception or something */ + { + /* cleanup and throw */ + lwerror("%s", lwgeom_geos_errmsg); + return NULL; + } + break; /* we've done */ + + case GEOS_POLYGON: + case GEOS_MULTIPOLYGON: + { + gout = LWGEOM_GEOS_makeValidPolygon(gin); + if ( ! gout ) /* an exception or something */ + { + /* cleanup and throw */ + lwerror("%s", lwgeom_geos_errmsg); + return NULL; + } + break; /* we've done */ + } + + default: + { + char* typname = GEOSGeomType(gin); + lwnotice("ST_MakeValid: doesn't support geometry type: %s", + typname); + GEOSFree(typname); + return NULL; + break; + } + } + + /* + * Now check if every point of input is also found + * in output, or abort by returning NULL + * + * Input geometry was lwgeom_in + */ + { + const int paranoia = 2; + /* TODO: check if the result is valid */ + if (paranoia) + { + int loss; + GEOSGeometry *pi, *po, *pd; + + /* TODO: handle some errors here... + * Lack of exceptions is annoying indeed, + * I'm getting old --strk; + */ + pi = GEOSGeom_extractUniquePoints(gin); + po = GEOSGeom_extractUniquePoints(gout); + pd = GEOSDifference(pi, po); /* input points - output points */ + GEOSGeom_destroy(pi); + GEOSGeom_destroy(po); + loss = !GEOSisEmpty(pd); + GEOSGeom_destroy(pd); + if ( loss ) + { + lwnotice("Vertices lost in LWGEOM_GEOS_makeValid"); + /* return NULL */ + } + } + } + + + return gout; +} + +/* Exported. Uses GEOS internally */ +LWGEOM* +lwgeom_make_valid(LWGEOM* lwgeom_in) +{ + int is3d; + GEOSGeom geosgeom; + GEOSGeometry* geosout; + LWGEOM *lwgeom_out; + + is3d = FLAGS_GET_Z(lwgeom_in->flags); + + /* + * Step 1 : try to convert to GEOS, if impossible, clean that up first + * otherwise (adding only duplicates of existing points) + */ + + initGEOS(lwgeom_geos_error, lwgeom_geos_error); + + lwgeom_out = lwgeom_in; + geosgeom = LWGEOM2GEOS(lwgeom_out); + if ( ! geosgeom ) + { + LWDEBUGF(4, + "Original geom can't be converted to GEOS (%s)" + " - will try cleaning that up first", + lwgeom_geos_errmsg); + + + lwgeom_out = lwgeom_make_geos_friendly(lwgeom_out); + if ( ! lwgeom_out ) + { + lwerror("Could not make a valid geometry out of input"); + } + + /* try again as we did cleanup now */ + geosgeom = LWGEOM2GEOS(lwgeom_out); + if ( ! geosgeom ) + { + lwerror("Couldn't convert POSTGIS geom to GEOS: %s", + lwgeom_geos_errmsg); + return NULL; + } + + } + else + { + LWDEBUG(4, "original geom converted to GEOS"); + lwgeom_out = lwgeom_in; + } + + geosout = LWGEOM_GEOS_makeValid(geosgeom); + GEOSGeom_destroy(geosgeom); + if ( ! geosout ) + { + return NULL; + } + + lwgeom_out = GEOS2LWGEOM(geosout, is3d); + if ( lwgeom_is_collection(lwgeom_in) && ! lwgeom_is_collection(lwgeom_out) ) + { + LWDEBUG(3, "lwgeom_make_valid: forcing multi"); + lwgeom_out = lwgeom_as_multi(lwgeom_out); + } + + GEOSGeom_destroy(geosout); + + lwgeom_out->srid = lwgeom_in->srid; + return lwgeom_out; +} + +#endif /* POSTGIS_GEOS_VERSION >= 33 */ + diff -Nru postgis-1.5.3/liblwgeom/lwgeom_geos_node.c postgis-2.0.1/liblwgeom/lwgeom_geos_node.c --- postgis-1.5.3/liblwgeom/lwgeom_geos_node.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwgeom_geos_node.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,259 @@ +/********************************************************************** + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * + * Copyright (C) 2011 Sandro Santilli + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + ********************************************************************** + * + * Node a set of linestrings + * + **********************************************************************/ + +#include "lwgeom_geos.h" +#include "liblwgeom_internal.h" + +#include +#include + +static int +lwgeom_ngeoms(const LWGEOM* n) +{ + const LWCOLLECTION* c = lwgeom_as_lwcollection(n); + if ( c ) return c->ngeoms; + else return 1; +} + +static const LWGEOM* +lwgeom_subgeom(const LWGEOM* g, int n) +{ + const LWCOLLECTION* c = lwgeom_as_lwcollection(g); + if ( c ) return lwcollection_getsubgeom((LWCOLLECTION*)c, n); + else return g; +} + + +static void +lwgeom_collect_endpoints(const LWGEOM* lwg, LWMPOINT* col) +{ + int i, n; + LWLINE* l; + + switch (lwg->type) + { + case MULTILINETYPE: + for ( i = 0, + n = lwgeom_ngeoms(lwg); + i < n; ++i ) + { + lwgeom_collect_endpoints( + lwgeom_subgeom(lwg, i), + col); + } + break; + case LINETYPE: + l = (LWLINE*)lwg; + col = lwmpoint_add_lwpoint(col, + lwline_get_lwpoint(l, 0)); + col = lwmpoint_add_lwpoint(col, + lwline_get_lwpoint(l, l->points->npoints-1)); + break; + default: + lwerror("lwgeom_collect_endpoints: invalid type %s", + lwtype_name(lwg->type)); + break; + } +} + +static LWMPOINT* +lwgeom_extract_endpoints(const LWGEOM* lwg) +{ + LWMPOINT* col = lwmpoint_construct_empty(SRID_UNKNOWN, + FLAGS_GET_Z(lwg->flags), + FLAGS_GET_M(lwg->flags)); + lwgeom_collect_endpoints(lwg, col); + + return col; +} + +/* Assumes initGEOS was called already */ +/* May return LWPOINT or LWMPOINT */ +static LWGEOM* +lwgeom_extract_unique_endpoints(const LWGEOM* lwg) +{ +#if POSTGIS_GEOS_VERSION < 33 + lwerror("The GEOS version this postgis binary " + "was compiled against (%d) doesn't support " + "'GEOSUnaryUnion' function (3.3.0+ required)", + POSTGIS_GEOS_VERSION); + return NULL; +#else /* POSTGIS_GEOS_VERSION >= 33 */ + LWGEOM* ret; + GEOSGeometry *gepu; + LWMPOINT *epall = lwgeom_extract_endpoints(lwg); + GEOSGeometry *gepall = LWGEOM2GEOS((LWGEOM*)epall); + lwmpoint_free(epall); + if ( ! gepall ) { + lwerror("LWGEOM2GEOS: %s", lwgeom_geos_errmsg); + return NULL; + } + + /* UnaryUnion to remove duplicates */ + /* TODO: do it all within pgis using indices */ + gepu = GEOSUnaryUnion(gepall); + if ( ! gepu ) { + GEOSGeom_destroy(gepall); + lwerror("GEOSUnaryUnion: %s", lwgeom_geos_errmsg); + return NULL; + } + GEOSGeom_destroy(gepall); + + ret = GEOS2LWGEOM(gepu, FLAGS_GET_Z(lwg->flags)); + GEOSGeom_destroy(gepu); + if ( ! ret ) { + lwerror("Error during GEOS2LWGEOM"); + return NULL; + } + + return ret; +#endif /* POSTGIS_GEOS_VERSION >= 33 */ +} + +/* exported */ +extern LWGEOM* lwgeom_node(const LWGEOM* lwgeom_in); +LWGEOM* +lwgeom_node(const LWGEOM* lwgeom_in) +{ +#if POSTGIS_GEOS_VERSION < 33 + lwerror("The GEOS version this postgis binary " + "was compiled against (%d) doesn't support " + "'GEOSUnaryUnion' function (3.3.0+ required)", + POSTGIS_GEOS_VERSION); + return NULL; +#else /* POSTGIS_GEOS_VERSION >= 33 */ + GEOSGeometry *g1, *gu, *gm; + LWGEOM *ep, *lines; + LWCOLLECTION *col, *tc; + int pn, ln, np, nl; + + if ( lwgeom_dimension(lwgeom_in) != 1 ) { + lwerror("Noding geometries of dimension != 1 is unsupported"); + return NULL; + } + + initGEOS(lwgeom_geos_error, lwgeom_geos_error); + g1 = LWGEOM2GEOS(lwgeom_in); + if ( ! g1 ) { + lwerror("LWGEOM2GEOS: %s", lwgeom_geos_errmsg); + return NULL; + } + + ep = lwgeom_extract_unique_endpoints(lwgeom_in); + if ( ! ep ) { + GEOSGeom_destroy(g1); + lwerror("Error extracting unique endpoints from input"); + return NULL; + } + + /* Unary union input to fully node */ + gu = GEOSUnaryUnion(g1); + GEOSGeom_destroy(g1); + if ( ! gu ) { + lwgeom_free(ep); + lwerror("GEOSUnaryUnion: %s", lwgeom_geos_errmsg); + return NULL; + } + + /* Linemerge (in case of overlaps) */ + gm = GEOSLineMerge(gu); + GEOSGeom_destroy(gu); + if ( ! gm ) { + lwgeom_free(ep); + lwerror("GEOSLineMerge: %s", lwgeom_geos_errmsg); + return NULL; + } + + lines = GEOS2LWGEOM(gm, FLAGS_GET_Z(lwgeom_in->flags)); + GEOSGeom_destroy(gm); + if ( ! lines ) { + lwgeom_free(ep); + lwerror("Error during GEOS2LWGEOM"); + return NULL; + } + + /* + * Reintroduce endpoints from input, using split-line-by-point. + * Note that by now we can be sure that each point splits at + * most _one_ segment as any point shared by multiple segments + * would already be a node. Also we can be sure that any of + * the segments endpoints won't split any other segment. + * We can use the above 2 assertions to early exit the loop. + */ + + col = lwcollection_construct_empty(MULTILINETYPE, lwgeom_in->srid, + FLAGS_GET_Z(lwgeom_in->flags), + FLAGS_GET_M(lwgeom_in->flags)); + + np = lwgeom_ngeoms(ep); + for (pn=0; pn ln+1) { + tc->geoms[nl] = tc->geoms[nl-1]; + --nl; + } + lwgeom_free(tc->geoms[ln]); + tc->geoms[ln] = col->geoms[0]; + tc->geoms[ln+1] = col->geoms[1]; + tc->ngeoms++; + } else { + lwgeom_free(lines); + /* transfer ownership rather than cloning */ + lines = (LWGEOM*)lwcollection_clone_deep(col); + assert(col->ngeoms == 2); + lwgeom_free(col->geoms[0]); + lwgeom_free(col->geoms[1]); + } + + /* reset the vector */ + assert(col->ngeoms == 2); + col->ngeoms = 0; + + break; + } + + } + + lwgeom_free(ep); + lwcollection_free(col); + + lines->srid = lwgeom_in->srid; + return (LWGEOM*)lines; +#endif /* POSTGIS_GEOS_VERSION >= 33 */ +} + diff -Nru postgis-1.5.3/liblwgeom/lwgeom_geos_split.c postgis-2.0.1/liblwgeom/lwgeom_geos_split.c --- postgis-1.5.3/liblwgeom/lwgeom_geos_split.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwgeom_geos_split.c 2012-04-12 07:21:23.000000000 +0000 @@ -0,0 +1,488 @@ +/********************************************************************** + * $Id: lwgeom_geos.c 5258 2010-02-17 21:02:49Z strk $ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * + * Copyright 2009-2010 Sandro Santilli + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + ********************************************************************** + * + * Split polygon by line, line by line, line by point. + * Returns at most components as a collection. + * First element of the collection is always the part which + * remains after the cut, while the second element is the + * part which has been cut out. We arbitrarely take the part + * on the *right* of cut lines as the part which has been cut out. + * For a line cut by a point the part which remains is the one + * from start of the line to the cut point. + * + * + * Author: Sandro Santilli + * + * Work done for Faunalia (http://www.faunalia.it) with fundings + * from Regione Toscana - Sistema Informativo per il Governo + * del Territorio e dell'Ambiente (RT-SIGTA). + * + * Thanks to the PostGIS community for sharing poly/line ideas [1] + * + * [1] http://trac.osgeo.org/postgis/wiki/UsersWikiSplitPolygonWithLineString + * + * + **********************************************************************/ + +#include "lwgeom_geos.h" +#include "liblwgeom_internal.h" + +#include +#include + +static LWGEOM* lwline_split_by_line(const LWLINE* lwgeom_in, const LWLINE* blade_in); +static LWGEOM* lwline_split_by_point(const LWLINE* lwgeom_in, const LWPOINT* blade_in); +static LWGEOM* lwline_split(const LWLINE* lwgeom_in, const LWGEOM* blade_in); +static LWGEOM* lwpoly_split_by_line(const LWPOLY* lwgeom_in, const LWLINE* blade_in); +static LWGEOM* lwcollection_split(const LWCOLLECTION* lwcoll_in, const LWGEOM* blade_in); +static LWGEOM* lwpoly_split(const LWPOLY* lwpoly_in, const LWGEOM* blade_in); + +/* Initializes and uses GEOS internally */ +static LWGEOM* +lwline_split_by_line(const LWLINE* lwline_in, const LWLINE* blade_in) +{ + LWGEOM** components; + LWGEOM* diff; + LWCOLLECTION* out; + GEOSGeometry* gdiff; /* difference */ + GEOSGeometry* g1; + GEOSGeometry* g2; + int ret; + + /* Possible outcomes: + * + * 1. The lines do not cross or overlap + * -> Return a collection with single element + * 2. The lines cross + * -> Return a collection of all elements resulting from the split + */ + + initGEOS(lwgeom_geos_error, lwgeom_geos_error); + + g1 = LWGEOM2GEOS((LWGEOM*)lwline_in); + if ( ! g1 ) + { + lwerror("LWGEOM2GEOS: %s", lwgeom_geos_errmsg); + return NULL; + } + g2 = LWGEOM2GEOS((LWGEOM*)blade_in); + if ( ! g2 ) + { + GEOSGeom_destroy(g1); + lwerror("LWGEOM2GEOS: %s", lwgeom_geos_errmsg); + return NULL; + } + + /* If interior intersecton is linear we can't split */ + ret = GEOSRelatePattern(g1, g2, "1********"); + if ( 2 == ret ) + { + lwerror("GEOSRelatePattern: %s", lwgeom_geos_errmsg); + GEOSGeom_destroy(g1); + GEOSGeom_destroy(g2); + return NULL; + } + if ( ret ) + { + GEOSGeom_destroy(g1); + GEOSGeom_destroy(g2); + lwerror("Splitter line has linear intersection with input"); + return NULL; + } + + + gdiff = GEOSDifference(g1,g2); + GEOSGeom_destroy(g1); + GEOSGeom_destroy(g2); + if (gdiff == NULL) + { + lwerror("GEOSDifference: %s", lwgeom_geos_errmsg); + return NULL; + } + + diff = GEOS2LWGEOM(gdiff, FLAGS_GET_Z(lwline_in->flags)); + GEOSGeom_destroy(gdiff); + if (NULL == diff) + { + lwerror("GEOS2LWGEOM: %s", lwgeom_geos_errmsg); + return NULL; + } + + if ( ! lwtype_is_collection(diff->type) ) + { + components = lwalloc(sizeof(LWGEOM*)*1); + components[0] = diff; + out = lwcollection_construct(COLLECTIONTYPE, lwline_in->srid, + NULL, 1, components); + } + else + { + out = lwcollection_construct(COLLECTIONTYPE, lwline_in->srid, + NULL, ((LWCOLLECTION*)diff)->ngeoms, + ((LWCOLLECTION*)diff)->geoms); + } + + + return (LWGEOM*)out; +} + +static LWGEOM* +lwline_split_by_point(const LWLINE* lwline_in, const LWPOINT* blade_in) +{ + LWMLINE* out; + + out = lwmline_construct_empty(lwline_in->srid, + FLAGS_GET_Z(lwline_in->flags), + FLAGS_GET_M(lwline_in->flags)); + if ( lwline_split_by_point_to(lwline_in, blade_in, out) < 2 ) + { + lwmline_add_lwline(out, lwline_clone(lwline_in)); + } + + /* Turn multiline into collection */ + out->type = COLLECTIONTYPE; + + return (LWGEOM*)out; +} + +int +lwline_split_by_point_to(const LWLINE* lwline_in, const LWPOINT* blade_in, + LWMLINE* v) +{ + double loc, dist; + POINT4D pt, pt_projected; + POINTARRAY* pa1; + POINTARRAY* pa2; + double vstol; /* vertex snap tolerance */ + + /* Possible outcomes: + * + * 1. The point is not on the line or on the boundary + * -> Leave collection untouched, return 0 + * 2. The point is on the boundary + * -> Push 1 element on the collection: + * o the original line + * -> Return 1 + * 3. The point is in the line + * -> Push 2 elements on the collection: + * o start_point - cut_point + * o cut_point - last_point + * -> Return 2 + */ + + getPoint4d_p(blade_in->point, 0, &pt); + loc = ptarray_locate_point(lwline_in->points, &pt, &dist, &pt_projected); + + /* lwnotice("Location: %g -- Distance: %g", loc, dist); */ + + if ( dist > 0 ) /* TODO: accept a tolerance ? */ + { + /* No intersection */ + return 0; + } + + if ( loc == 0 || loc == 1 ) + { + /* Intersection is on the boundary */ + return 1; + } + + /* There is a real intersection, let's get two substrings */ + vstol = 1e-14; /* TODO: take this as parameter ? */ + pa1 = ptarray_substring(lwline_in->points, 0, loc, vstol); + pa2 = ptarray_substring(lwline_in->points, loc, 1, vstol); + + /* NOTE: I've seen empty pointarrays with loc != 0 and loc != 1 */ + if ( pa1->npoints == 0 || pa2->npoints == 0 ) { + ptarray_free(pa1); + ptarray_free(pa2); + /* Intersection is on the boundary */ + return 1; + } + + lwmline_add_lwline(v, lwline_construct(SRID_UNKNOWN, NULL, pa1)); + lwmline_add_lwline(v, lwline_construct(SRID_UNKNOWN, NULL, pa2)); + return 2; +} + +static LWGEOM* +lwline_split(const LWLINE* lwline_in, const LWGEOM* blade_in) +{ + switch (blade_in->type) + { + case POINTTYPE: + return lwline_split_by_point(lwline_in, (LWPOINT*)blade_in); + + case LINETYPE: + return lwline_split_by_line(lwline_in, (LWLINE*)blade_in); + + default: + lwerror("Splitting a Line by a %s is unsupported", + lwtype_name(blade_in->type)); + return NULL; + } + return NULL; +} + +/* Initializes and uses GEOS internally */ +static LWGEOM* +lwpoly_split_by_line(const LWPOLY* lwpoly_in, const LWLINE* blade_in) +{ + LWCOLLECTION* out; + GEOSGeometry* g1; + GEOSGeometry* g2; + GEOSGeometry* g1_bounds; + GEOSGeometry* polygons; + const GEOSGeometry *vgeoms[1]; + int i,n; + int hasZ = FLAGS_GET_Z(lwpoly_in->flags); + + + /* Possible outcomes: + * + * 1. The line does not split the polygon + * -> Return a collection with single element + * 2. The line does split the polygon + * -> Return a collection of all elements resulting from the split + */ + + initGEOS(lwgeom_geos_error, lwgeom_geos_error); + + g1 = LWGEOM2GEOS((LWGEOM*)lwpoly_in); + if ( NULL == g1 ) + { + lwerror("LWGEOM2GEOS: %s", lwgeom_geos_errmsg); + return NULL; + } + g1_bounds = GEOSBoundary(g1); + if ( NULL == g1_bounds ) + { + GEOSGeom_destroy(g1); + lwerror("GEOSBoundary: %s", lwgeom_geos_errmsg); + return NULL; + } + + g2 = LWGEOM2GEOS((LWGEOM*)blade_in); + if ( NULL == g2 ) + { + GEOSGeom_destroy(g1); + GEOSGeom_destroy(g1_bounds); + lwerror("LWGEOM2GEOS: %s", lwgeom_geos_errmsg); + return NULL; + } + + vgeoms[0] = GEOSUnion(g1_bounds, g2); + if ( NULL == vgeoms[0] ) + { + GEOSGeom_destroy(g1); + GEOSGeom_destroy(g2); + GEOSGeom_destroy(g1_bounds); + lwerror("GEOSUnion: %s", lwgeom_geos_errmsg); + return NULL; + } + + /* debugging.. + lwnotice("Bounds poly: %s", + lwgeom_to_ewkt(GEOS2LWGEOM(g1_bounds, hasZ))); + lwnotice("Line: %s", + lwgeom_to_ewkt(GEOS2LWGEOM(g2, hasZ))); + + lwnotice("Noded bounds: %s", + lwgeom_to_ewkt(GEOS2LWGEOM(vgeoms[0], hasZ))); + */ + + polygons = GEOSPolygonize(vgeoms, 1); + if ( NULL == polygons ) + { + GEOSGeom_destroy(g1); + GEOSGeom_destroy(g2); + GEOSGeom_destroy(g1_bounds); + GEOSGeom_destroy((GEOSGeometry*)vgeoms[0]); + lwerror("GEOSPolygonize: %s", lwgeom_geos_errmsg); + return NULL; + } + +#if PARANOIA_LEVEL > 0 + if ( GEOSGeometryTypeId(polygons) != COLLECTIONTYPE ) + { + GEOSGeom_destroy(g1); + GEOSGeom_destroy(g2); + GEOSGeom_destroy(g1_bounds); + GEOSGeom_destroy((GEOSGeometry*)vgeoms[0]); + GEOSGeom_destroy(polygons); + lwerror("Unexpected return from GEOSpolygonize"); + return 0; + } +#endif + + /* We should now have all polygons, just skip + * the ones which are in holes of the original + * geometries and return the rest in a collection + */ + n = GEOSGetNumGeometries(polygons); + out = lwcollection_construct_empty(COLLECTIONTYPE, lwpoly_in->srid, + hasZ, 0); + /* Allocate space for all polys */ + out->geoms = lwalloc(sizeof(LWGEOM*)*n); + assert(0 == out->ngeoms); + for (i=0; igeoms[out->ngeoms++] = GEOS2LWGEOM(p, hasZ); + } + + GEOSGeom_destroy(g1); + GEOSGeom_destroy(g2); + GEOSGeom_destroy(g1_bounds); + GEOSGeom_destroy((GEOSGeometry*)vgeoms[0]); + GEOSGeom_destroy(polygons); + + return (LWGEOM*)out; +} + +static LWGEOM* +lwcollection_split(const LWCOLLECTION* lwcoll_in, const LWGEOM* blade_in) +{ + LWGEOM** split_vector=NULL; + LWCOLLECTION* out; + size_t split_vector_capacity; + size_t split_vector_size=0; + size_t i,j; + + split_vector_capacity=8; + split_vector = lwalloc(split_vector_capacity * sizeof(LWGEOM*)); + if ( ! split_vector ) + { + lwerror("Out of virtual memory"); + return NULL; + } + + for (i=0; ingeoms; ++i) + { + LWCOLLECTION* col; + LWGEOM* split = lwgeom_split(lwcoll_in->geoms[i], blade_in); + /* an exception should prevent this from ever returning NULL */ + if ( ! split ) return NULL; + + col = lwgeom_as_lwcollection(split); + /* Output, if any, will always be a collection */ + assert(col); + + /* Reallocate split_vector if needed */ + if ( split_vector_size + col->ngeoms > split_vector_capacity ) + { + /* NOTE: we could be smarter on reallocations here */ + split_vector_capacity += col->ngeoms; + split_vector = lwrealloc(split_vector, + split_vector_capacity * sizeof(LWGEOM*)); + if ( ! split_vector ) + { + lwerror("Out of virtual memory"); + return NULL; + } + } + + for (j=0; jngeoms; ++j) + { + col->geoms[j]->srid = SRID_UNKNOWN; /* strip srid */ + split_vector[split_vector_size++] = col->geoms[j]; + } + lwfree(col->geoms); + lwfree(col); + } + + /* Now split_vector has split_vector_size geometries */ + out = lwcollection_construct(COLLECTIONTYPE, lwcoll_in->srid, + NULL, split_vector_size, split_vector); + + return (LWGEOM*)out; +} + +static LWGEOM* +lwpoly_split(const LWPOLY* lwpoly_in, const LWGEOM* blade_in) +{ + switch (blade_in->type) + { + case LINETYPE: + return lwpoly_split_by_line(lwpoly_in, (LWLINE*)blade_in); + default: + lwerror("Splitting a Polygon by a %s is unsupported", + lwtype_name(blade_in->type)); + return NULL; + } + return NULL; +} + +/* exported */ +LWGEOM* +lwgeom_split(const LWGEOM* lwgeom_in, const LWGEOM* blade_in) +{ + switch (lwgeom_in->type) + { + case LINETYPE: + return lwline_split((const LWLINE*)lwgeom_in, blade_in); + + case POLYGONTYPE: + return lwpoly_split((const LWPOLY*)lwgeom_in, blade_in); + + case MULTIPOLYGONTYPE: + case MULTILINETYPE: + case COLLECTIONTYPE: + return lwcollection_split((const LWCOLLECTION*)lwgeom_in, blade_in); + + default: + lwerror("Splitting of %s geometries is unsupported", + lwtype_name(lwgeom_in->type)); + return NULL; + } + +} + diff -Nru postgis-1.5.3/liblwgeom/lwgeom_log.h postgis-2.0.1/liblwgeom/lwgeom_log.h --- postgis-1.5.3/liblwgeom/lwgeom_log.h 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwgeom_log.h 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,60 @@ +/********************************************************************** + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * + * Copyright 2011 Sandro Santilli + * Copyright 2008 Paul Ramsey + * Copyright 2007-2008 Mark Cave-Ayland + * Copyright 2001-2006 Refractions Research Inc. + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + ********************************************************************** + * + * Internal logging routines + * + **********************************************************************/ + +#ifndef LWGEOM_LOG_H +#define LWGEOM_LOG_H 1 + +#include + +/* + * Debug macros + */ +#if POSTGIS_DEBUG_LEVEL > 0 + +/* Display a notice at the given debug level */ +#define LWDEBUG(level, msg) \ + do { \ + if (POSTGIS_DEBUG_LEVEL >= level) \ + lwnotice("[%s:%s:%d] " msg, __FILE__, __func__, __LINE__); \ + } while (0); + +/* Display a formatted notice at the given debug level + * (like printf, with variadic arguments) */ +#define LWDEBUGF(level, msg, ...) \ + do { \ + if (POSTGIS_DEBUG_LEVEL >= level) \ + lwnotice("[%s:%s:%d] " msg, \ + __FILE__, __func__, __LINE__, __VA_ARGS__); \ + } while (0); + +#else /* POSTGIS_DEBUG_LEVEL <= 0 */ + +/* Empty prototype that can be optimised away by the compiler + * for non-debug builds */ +#define LWDEBUG(level, msg) \ + ((void) 0) + +/* Empty prototype that can be optimised away by the compiler + * for non-debug builds */ +#define LWDEBUGF(level, msg, ...) \ + ((void) 0) + +#endif /* POSTGIS_DEBUG_LEVEL <= 0 */ + +#endif /* LWGEOM_LOG_H */ diff -Nru postgis-1.5.3/liblwgeom/lwgeom_transform.c postgis-2.0.1/liblwgeom/lwgeom_transform.c --- postgis-1.5.3/liblwgeom/lwgeom_transform.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwgeom_transform.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,210 @@ +/********************************************************************** + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * + * Copyright (C) 2001-2003 Refractions Research Inc. + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include "../postgis_config.h" +#include "liblwgeom.h" +#include "lwgeom_log.h" +#include + + +/** convert decimal degress to radians */ +static void +to_rad(POINT4D *pt) +{ + pt->x *= M_PI/180.0; + pt->y *= M_PI/180.0; +} + +/** convert radians to decimal degress */ +static void +to_dec(POINT4D *pt) +{ + pt->x *= 180.0/M_PI; + pt->y *= 180.0/M_PI; +} + +/** + * Transform given POINTARRAY + * from inpj projection to outpj projection + */ +int +ptarray_transform(POINTARRAY *pa, projPJ inpj, projPJ outpj) +{ + int i; + POINT4D p; + + for ( i = 0; i < pa->npoints; i++ ) + { + getPoint4d_p(pa, i, &p); + if ( ! point4d_transform(&p, inpj, outpj) ) return LW_FAILURE; + ptarray_set_point4d(pa, i, &p); + } + + return LW_SUCCESS; +} + + +/** + * Transform given SERIALIZED geometry + * from inpj projection to outpj projection + */ +int +lwgeom_transform(LWGEOM *geom, projPJ inpj, projPJ outpj) +{ + int i; + + /* No points to transform in an empty! */ + if ( lwgeom_is_empty(geom) ) + return LW_SUCCESS; + + switch(geom->type) + { + case POINTTYPE: + case LINETYPE: + case CIRCSTRINGTYPE: + case TRIANGLETYPE: + { + LWLINE *g = (LWLINE*)geom; + if ( ! ptarray_transform(g->points, inpj, outpj) ) return LW_FAILURE; + break; + } + case POLYGONTYPE: + { + LWPOLY *g = (LWPOLY*)geom; + for ( i = 0; i < g->nrings; i++ ) + { + if ( ! ptarray_transform(g->rings[i], inpj, outpj) ) return LW_FAILURE; + } + break; + } + case MULTIPOINTTYPE: + case MULTILINETYPE: + case MULTIPOLYGONTYPE: + case COLLECTIONTYPE: + case COMPOUNDTYPE: + case CURVEPOLYTYPE: + case MULTICURVETYPE: + case MULTISURFACETYPE: + case POLYHEDRALSURFACETYPE: + case TINTYPE: + { + LWCOLLECTION *g = (LWCOLLECTION*)geom; + for ( i = 0; i < g->ngeoms; i++ ) + { + if ( ! lwgeom_transform(g->geoms[i], inpj, outpj) ) return LW_FAILURE; + } + break; + } + default: + { + lwerror("lwgeom_transform: Cannot handle type '%s'", + lwtype_name(geom->type)); + return LW_FAILURE; + } + } + return LW_SUCCESS; +} + +int +point4d_transform(POINT4D *pt, projPJ srcpj, projPJ dstpj) +{ + int* pj_errno_ref; + POINT4D orig_pt; + + /* Make a copy of the input point so we can report the original should an error occur */ + orig_pt.x = pt->x; + orig_pt.y = pt->y; + orig_pt.z = pt->z; + + if (pj_is_latlong(srcpj)) to_rad(pt) ; + + LWDEBUGF(4, "transforming POINT(%f %f) from '%s' to '%s'", orig_pt.x, orig_pt.y, pj_get_def(srcpj,0), pj_get_def(dstpj,0)); + + /* Perform the transform */ + pj_transform(srcpj, dstpj, 1, 0, &(pt->x), &(pt->y), &(pt->z)); + + /* For NAD grid-shift errors, display an error message with an additional hint */ + pj_errno_ref = pj_get_errno_ref(); + + if (*pj_errno_ref != 0) + { + if (*pj_errno_ref == -38) + { + lwnotice("PostGIS was unable to transform the point because either no grid shift files were found, or the point does not lie within the range for which the grid shift is defined. Refer to the ST_Transform() section of the PostGIS manual for details on how to configure PostGIS to alter this behaviour."); + lwerror("transform: couldn't project point (%g %g %g): %s (%d)", + orig_pt.x, orig_pt.y, orig_pt.z, pj_strerrno(*pj_errno_ref), *pj_errno_ref); + return 0; + } + else + { + lwerror("transform: couldn't project point (%g %g %g): %s (%d)", + orig_pt.x, orig_pt.y, orig_pt.z, pj_strerrno(*pj_errno_ref), *pj_errno_ref); + return 0; + } + } + + if (pj_is_latlong(dstpj)) to_dec(pt); + return 1; +} + +projPJ +lwproj_from_string(const char *str1) +{ + int t; + char *params[1024]; /* one for each parameter */ + char *loc; + char *str; + size_t slen; + projPJ result; + + + if (str1 == NULL) return NULL; + + slen = strlen(str1); + + if (slen == 0) return NULL; + + str = lwalloc(slen+1); + strcpy(str, str1); + + /* + * first we split the string into a bunch of smaller strings, + * based on the " " separator + */ + + params[0] = str; /* 1st param, we'll null terminate at the " " soon */ + + loc = str; + t = 1; + while ((loc != NULL) && (*loc != 0) ) + { + loc = strchr(loc, ' '); + if (loc != NULL) + { + *loc = 0; /* null terminate */ + params[t] = loc+1; + loc++; /* next char */ + t++; /*next param */ + } + } + + if (!(result=pj_init(t, params))) + { + lwfree(str); + return NULL; + } + lwfree(str); + return result; +} + + + diff -Nru postgis-1.5.3/liblwgeom/lwgparse.c postgis-2.0.1/liblwgeom/lwgparse.c --- postgis-1.5.3/liblwgeom/lwgparse.c 2010-02-01 17:35:55.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwgparse.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,1718 +0,0 @@ -/* - * Written by Ralph Mason ralph.masontelogis.com - * - * Copyright Telogis 2004 - * www.telogis.com - * - */ -#include -#include -/* Solaris9 does not provide stdint.h */ -/* #include */ -#include - -#include "liblwgeom.h" -#include "wktparse.h" -#include "wktparse.tab.h" - -/* - * To get byte order -#include -#include -#include -#include -*/ - -void set_zm(char z, char m); -void close_parser(void); - -typedef uint32_t int4; - -typedef struct tag_tuple tuple; - -struct tag_outputstate -{ - uchar* pos; -}; - -typedef struct tag_outputstate output_state; -typedef void (*output_func)(tuple* this, output_state* out); -typedef void (*read_col_func)(const char **f); - - - -/* Globals */ - -int srid=-1; - -static int parser_ferror_occured; -static allocator local_malloc; -static report_error error_func; - -struct tag_tuple -{ - output_func of; - union union_tag - { - double points[4]; - int4 pointsi[4]; - - struct struct_tag - { - tuple* stack_next; - int type; - int num; - int size_here; - int parse_location; - } - nn; - - } uu; - struct tag_tuple *next; -}; - -struct -{ - int type; - int flags; - int srid; - int ndims; - int hasZ; - int hasM; - /* create integer version */ - int lwgi; - /* input is integer (wkb only)*/ - int from_lwgi; - - int4 alloc_size; - - /* - linked list of all tuples - */ - tuple* first; - tuple* last; - - /* - stack of open geometries - */ - tuple* stack; - -} -the_geom; - -tuple* free_list=0; - - -/* - * Parser current instance check flags - a bitmap of flags that determine which checks are enabled during the current parse - * (see liblwgeom.h for the related PARSER_CHECK constants) - */ -int current_parser_check_flags; - -/* - * Parser current instance result structure - the result structure being used for the current parse - */ -LWGEOM_PARSER_RESULT *current_lwg_parser_result; - - -/* - * This indicates if the number of points in the geometry is required to - * be odd (one) or even (zero, currently not enforced) or whatever (-one) - */ -double *first_point=NULL; -double *last_point=NULL; - - -/* - * Parser error messages - * - * IMPORTANT: Make sure the order of these messages matches the PARSER_ERROR constants in liblwgeom.h! - * The 0th element should always be empty since it is unused (error constants start from -1) - */ - -const char *parser_error_messages[] = -{ - "", - "geometry requires more points", - "geometry must have an odd number of points", - "geometry contains non-closed rings", - "can not mix dimensionality in a geometry", - "parse error - invalid geometry", - "invalid WKB type", - "incontinuous compound curve" -}; - -/* Macro to return the error message and the current position within WKT */ -#define LWGEOM_WKT_VALIDATION_ERROR(errcode, parse_location) \ - do { \ - if (!parser_ferror_occured) { \ - parser_ferror_occured = -1 * errcode; \ - current_lwg_parser_result->message = parser_error_messages[errcode]; \ - current_lwg_parser_result->errlocation = parse_location; \ - } \ - } while (0); - - -/* Macro to return the error message and the current position within WKT */ -#define LWGEOM_WKT_PARSER_ERROR(errcode) \ - do { \ - if (!parser_ferror_occured) { \ - parser_ferror_occured = -1 * errcode; \ - current_lwg_parser_result->message = parser_error_messages[errcode]; \ - current_lwg_parser_result->errlocation = lwg_parse_yylloc.last_column; \ - } \ - } while (0); - - -/* Macro to return the error message and the current position within WKB - NOTE: the position is handled automatically by strhex_readbyte */ -#define LWGEOM_WKB_PARSER_ERROR(errcode) \ - do { \ - if (!parser_ferror_occured) { \ - parser_ferror_occured = -1 * errcode; \ - current_lwg_parser_result->message = parser_error_messages[errcode]; \ - } \ - } while (0); - - -/* External functions */ -extern void init_parser(const char *); - -/* Prototypes */ -tuple* alloc_tuple(output_func of,size_t size); -void free_tuple(tuple* to_free); -void inc_num(void); -void alloc_stack_tuple(int type,output_func of,size_t size); -void check_dims(int num); -void WRITE_DOUBLES(output_state* out,double* points, int cnt); -#ifdef SHRINK_INTS -void WRITE_INT4(output_state * out,int4 val); -#endif -void empty_stack(tuple* this,output_state* out); -void alloc_lwgeom(int srid); -void write_point_2(tuple* this,output_state* out); -void write_point_3(tuple* this,output_state* out); -void write_point_4(tuple* this,output_state* out); -void write_point_2i(tuple* this,output_state* out); -void write_point_3i(tuple* this,output_state* out); -void write_point_4i(tuple* this,output_state* out); -void alloc_point_2d(double x,double y); -void alloc_point_3d(double x,double y,double z); -void alloc_point_4d(double x,double y,double z,double m); -void write_type(tuple* this,output_state* out); -void write_count(tuple* this,output_state* out); -void write_type_count(tuple* this,output_state* out); -void alloc_point(void); -void alloc_linestring(void); -void alloc_linestring_closed(void); -void alloc_circularstring(void); -void alloc_circularstring_closed(void); -void alloc_compoundcurve(void); -void alloc_compoundcurve_closed(void); -void alloc_curvepolygon(void); -void alloc_polygon(void); -void alloc_multipoint(void); -void alloc_multilinestring(void); -void alloc_multicurve(void); -void alloc_multipolygon(void); -void alloc_multisurface(void); -void alloc_geomertycollection(void); -void alloc_counter(void); -void alloc_empty(void); -void check_compoundcurve(void); -void check_closed_compoundcurve(void); -void check_linestring(void); -void check_closed_linestring(void); -void check_circularstring(void); -void check_closed_circularstring(void); -void check_polygon(void); -void check_curvepolygon(void); -void check_compoundcurve_continuity(void); -void check_compoundcurve_closed(void); -void check_linestring_closed(void); -void check_circularstring_closed(void); -void check_polygon_closed(void); -void check_polygon_minpoints(void); -void check_curvepolygon_minpoints(void); -void check_compoundcurve_minpoints(void); -void check_linestring_minpoints(void); -void check_circularstring_minpoints(void); -void check_circularstring_isodd(void); -void make_serialized_lwgeom(LWGEOM_PARSER_RESULT *lwg_parser_result); -uchar strhex_readbyte(const char *in); -uchar read_wkb_byte(const char **in); -void read_wkb_bytes(const char **in, uchar* out, int cnt); -int4 read_wkb_int(const char **in); -double read_wkb_double(const char **in, int convert_from_int); -void read_wkb_point(const char **b); -void read_wkb_polygon(const char **b); -void read_wkb_linestring(const char **b); -void read_wkb_circstring(const char **b); -void read_wkb_ordinate_array(const char **b); -void read_collection(const char **b, read_col_func f); -void parse_wkb(const char **b); -void alloc_wkb(const char *parser); -int parse_it(LWGEOM_PARSER_RESULT *lwg_parser_result, const char* geometry, int flags, allocator allocfunc, report_error errfunc); -int parse_lwg(LWGEOM_PARSER_RESULT *lwg_parser_result, const char* geometry, int flags, allocator allocfunc, report_error errfunc); -int parse_lwgi(LWGEOM_PARSER_RESULT *lwg_parser_result, const char* geometry, int flags, allocator allocfunc, report_error errfunc); - -void -set_srid(double d_srid) -{ - if ( d_srid >= 0 ) - d_srid+=0.1; - else - d_srid-=0.1; - - - srid=(int)(d_srid+0.1); -} - -/* - * Begin alloc / free functions - */ - - -tuple * -alloc_tuple(output_func of,size_t size) -{ - tuple* ret = free_list; - - if ( ! ret ) - { - int toalloc = (ALLOC_CHUNKS /sizeof(tuple)); - ret = malloc( toalloc *sizeof(tuple) ); - - free_list = ret; - - while (--toalloc) - { - ret->next = ret+1; - ret++; - } - - ret->next = NULL; - - return alloc_tuple(of,size); - } - - free_list = ret->next; - ret->of = of; - ret->next = NULL; - - if ( the_geom.last ) - { - the_geom.last->next = ret; - the_geom.last = ret; - } - else - { - the_geom.first = the_geom.last = ret; - } - - LWDEBUGF(5, "alloc_tuple %p: parse_location = %d", - ret, lwg_parse_yylloc.last_column); - - ret->uu.nn.parse_location = lwg_parse_yylloc.last_column; - - the_geom.alloc_size += size; - return ret; -} - -void -free_tuple(tuple* to_free) -{ - - tuple* list_end = to_free; - - if ( !to_free) - return; - - while (list_end->next) - { - list_end=list_end->next; - } - - list_end->next = free_list; - free_list = to_free; -} - -void -alloc_lwgeom(int srid) -{ - LWDEBUGF(3, "alloc_lwgeom %d", srid); - - the_geom.srid=srid; - the_geom.alloc_size=0; - the_geom.stack=NULL; - the_geom.ndims=0; - the_geom.hasZ=0; - the_geom.hasM=0; - - /* Free if used already */ - if ( the_geom.first ) - { - free_tuple(the_geom.first); - the_geom.first=the_geom.last=NULL; - } - - if ( srid != -1 ) - { - the_geom.alloc_size+=4; - } - - /* Setup up an empty tuple as the stack base */ - the_geom.stack = alloc_tuple(empty_stack, 0); -} - -void -alloc_point_2d(double x,double y) -{ - tuple* p = alloc_tuple(write_point_2,the_geom.lwgi?8:16); - p->uu.points[0] = x; - p->uu.points[1] = y; - - LWDEBUGF(3, "alloc_point_2d %f,%f", x, y); - LWDEBUGF(5, " * %p", p); - - /* keep track of point */ - - inc_num(); - check_dims(2); -} - -void -alloc_point_3d(double x,double y,double z) -{ - tuple* p = alloc_tuple(write_point_3,the_geom.lwgi?12:24); - p->uu.points[0] = x; - p->uu.points[1] = y; - p->uu.points[2] = z; - - LWDEBUGF(3, "alloc_point_3d %f, %f, %f", x, y, z); - LWDEBUGF(5, " * %p", p); - - inc_num(); - check_dims(3); -} - -void -alloc_point_4d(double x,double y,double z,double m) -{ - tuple* p = alloc_tuple(write_point_4,the_geom.lwgi?16:32); - p->uu.points[0] = x; - p->uu.points[1] = y; - p->uu.points[2] = z; - p->uu.points[3] = m; - - LWDEBUGF(3, "alloc_point_4d %f, %f, %f, %f", x, y, z, m); - LWDEBUGF(5, " * %p", p); - - inc_num(); - check_dims(4); -} - - - -void -inc_num(void) -{ - the_geom.stack->uu.nn.num++; -} - -/* - Allocate a 'counting' tuple -*/ -void -alloc_stack_tuple(int type,output_func of,size_t size) -{ - tuple* p; - inc_num(); - - LWDEBUGF(3, "alloc_stack_tuple: type = %d, size = %d", type, size); - - p = alloc_tuple(of,size); - p->uu.nn.stack_next = the_geom.stack; - p->uu.nn.type = type; - p->uu.nn.size_here = the_geom.alloc_size; - p->uu.nn.num = 0; - p->uu.nn.parse_location = lwg_parse_yylloc.last_column; - - the_geom.stack = p; - - LWDEBUGF(4, "alloc_stack_tuple complete: %p", the_geom.stack); -} - -/* - * Begin Check functions - */ - -void check_compoundcurve(void) -{ - check_compoundcurve_minpoints(); - check_compoundcurve_continuity(); -} - -void check_closed_compoundcurve(void) -{ - check_compoundcurve_closed(); - check_compoundcurve(); -} - -void check_linestring(void) -{ - check_linestring_minpoints(); -} - -void check_closed_linestring(void) -{ - check_linestring_closed(); - check_linestring(); -} - -void check_circularstring(void) -{ - check_circularstring_minpoints(); - check_circularstring_isodd(); -} - -void check_closed_circularstring(void) -{ - check_linestring_closed(); - check_circularstring(); -} - -void check_polygon(void) -{ - check_polygon_minpoints(); - check_polygon_closed(); -} - -void check_curvepolygon(void) -{ - check_curvepolygon_minpoints(); -} - -void -check_compoundcurve_continuity(void) -{ - tuple* tp = the_geom.stack->next; /* Current tuple on the stack. */ - int i, j; /* Loop counters */ - int num, mum= 0; /* sub-geom and point counts */ - tuple *last=NULL, *first=NULL; /* point tuples */ - - LWDEBUG(3, "compound_continuity_check"); - num = tp->uu.nn.num; - for (i = 0; i < num; i++) - { - tp = tp->next->next; - mum = tp->uu.nn.num; - LWDEBUGF(5, "sub-geom %d of %d (%d points) at %p", i, num, mum, tp); - - first = tp->next; - LWDEBUGF(5, "First point identified: %p", first); - if (i > 0) - { - if (the_geom.ndims > 3) - { - LWDEBUGF(5, "comparing points (%f,%f,%f,%f), (%f,%f,%f,%f)", - first->uu.points[0], first->uu.points[1], - first->uu.points[2], first->uu.points[3], - last->uu.points[0], last->uu.points[1], - last->uu.points[2], last->uu.points[3]); - } - else if (the_geom.ndims > 2) - { - LWDEBUGF(5, "comparing points (%f,%f,%f), (%f,%f,%f)", - first->uu.points[0], first->uu.points[1], - first->uu.points[2], last->uu.points[0], - last->uu.points[1], last->uu.points[2]); - } - else - { - LWDEBUGF(5, "comparing points (%f,%f), (%f,%f)", - first->uu.points[0], first->uu.points[1], - last->uu.points[0], last->uu.points[1]); - } - - if (first->uu.points[0] != last->uu.points[0]) - { - LWDEBUG(5, "x value mismatch"); - LWGEOM_WKT_VALIDATION_ERROR(PARSER_ERROR_INCONTINUOUS, last->uu.nn.parse_location); - } - else if (first->uu.points[1] != last->uu.points[1]) - { - LWDEBUG(5, "y value mismatch"); - LWGEOM_WKT_VALIDATION_ERROR(PARSER_ERROR_INCONTINUOUS, last->uu.nn.parse_location); - } - else if (the_geom.ndims > 2 && - first->uu.points[2] != last->uu.points[2]) - { - LWDEBUG(5, "z/m value mismatch"); - LWGEOM_WKT_VALIDATION_ERROR(PARSER_ERROR_INCONTINUOUS, last->uu.nn.parse_location); - } - else if (the_geom.ndims > 3 && - first->uu.points[3] != last->uu.points[3]) - { - LWDEBUG(5, "m value mismatch"); - LWGEOM_WKT_VALIDATION_ERROR(PARSER_ERROR_INCONTINUOUS, last->uu.nn.parse_location); - } - } - for (j = 0; j < mum; j++) - { - tp = tp->next; - } - last = tp; - LWDEBUGF(5, "Last point identified: %p", last); - } -} - -void check_circularstring_isodd(void) -{ - tuple *tp = the_geom.stack->next; - int i, num; - - LWDEBUG(3, "check_circularstring_isodd"); - if (tp->uu.nn.num % 2 == 0) - { - num = tp->uu.nn.num; - LWDEBUGF(5, "Odd check failed: pointcount = %d", num); - for (i = 0; i < num; i++) - { - tp = tp->next; - } - LWGEOM_WKT_VALIDATION_ERROR(PARSER_ERROR_ODDPOINTS, the_geom.stack->next->uu.nn.parse_location); - } -} - -/* - * Determines if the compound curve is closed or not. This is done by finding - * the first point tuple of the first sub-geometry then marching through the - * tuple list until the last point tuple of the last sub-geometry is found. - * The 2d values of these tuples are then compared. - */ -void -check_compoundcurve_closed(void) -{ - tuple *tp = the_geom.stack; /* Current tuple */ - int i, j; /* Loop counters */ - int num, mum; /* sub-unit counts */ - tuple *first, *last; /* First and last tuple of the compount curve */ - - LWDEBUG(3, "check_compount_closed"); - /* tuple counting subgeometries */ - tp = tp->next; - num = tp->uu.nn.num; - - LWDEBUGF(5, "Found %d subgeoms.", num); - - /* counting tuple -> subgeom tuple -> counting tuple -> first point*/ - first = tp->next->next->next; - for (i = 0; i < num; i++) - { - /* Advance to the next subgeometry's counting tuple */ - tp = tp->next->next; - mum = tp->uu.nn.num; - - LWDEBUGF(5, "Subgeom %d at %p has %d points.", i, tp, mum); - for (j = 0; j < mum; j++) - { - tp = tp->next; - } - } - last = tp; - if (first->uu.points[0] != last->uu.points[0] || - first->uu.points[1] != last->uu.points[1]) - { - LWDEBUGF(4, "Unclosed geometry: (%f, %f) != (%f, %f)", - first->uu.points[0], first->uu.points[1], - last->uu.points[0], last->uu.points[1]); - LWDEBUGF(5, "First %p, last %p", first, last); - LWGEOM_WKT_VALIDATION_ERROR(PARSER_ERROR_UNCLOSED, the_geom.stack->next->uu.nn.parse_location); - } - else - { - LWDEBUG(5, "Compound Curve found closed."); - } -} - -/* - * Determines if the current linestring is closed and raises an error if it - * is not. - * This is done by walking through the tuple list and identifying the first - * and last point tuples, then comparing their 2d values. - */ -void -check_linestring_closed(void) -{ - tuple *tp = the_geom.stack; /* Current tuple */ - int i; /* Loop counter */ - int num; /* point count */ - tuple *first, *last; /* First and last tuple of the compount curve */ - - /* tuple counting points */ - tp = tp->next; - if (tp->uu.nn.num > 0) - { - first = tp->next; - num = tp->uu.nn.num; - for (i = 0; i < num; i++) - { - tp = tp->next; - } - last = tp; - if (first->uu.points[0] != last->uu.points[0] || - first->uu.points[1] != last->uu.points[1]) - { - LWDEBUGF(4, "Unclosed geometry: (%f, %f) != (%f, %f)", - first->uu.points[0], first->uu.points[1], - last->uu.points[0], last->uu.points[1]); - LWDEBUGF(5, "First %p, last %p", first, last); - LWGEOM_WKT_VALIDATION_ERROR(PARSER_ERROR_UNCLOSED, the_geom.stack->next->uu.nn.parse_location); - } - else - { - LWDEBUG(5, "Geometry found closed."); - } - } -} - -/* - * Determines if all rings of the current polygon are closed. This is done - * by marching through the tuple list finding the first and last point tuples - * of each ring and comparing their 2d values. - */ -void -check_polygon_closed(void) -{ - tuple *tp = the_geom.stack; /* Current tuple */ - int i, j; /* Loop counters */ - int num, mum; /* sub-unit counts */ - tuple *first, *last; /* First and last tuple of the current ring. */ - - LWDEBUG(3, "check_polygon_closed"); - /* tuple counting rings */ - tp = tp->next; - num = tp->uu.nn.num; - for (i = 0; i < num; i++) - { - /* ring tuple counting points */ - tp = tp->next; - mum = tp->uu.nn.num; - first = tp->next; - for (j = 0; j < mum; j++) - { - tp = tp->next; - } - last = tp; - if (first->uu.points[0] != last->uu.points[0] || - first->uu.points[1] != last->uu.points[1]) - { - LWDEBUGF(4, "Unclosed geometry: (%f, %f) != (%f, %f)", - first->uu.points[0], first->uu.points[1], - last->uu.points[0], last->uu.points[1]); - LWDEBUGF(5, "First %p, last %p", first, last); - LWGEOM_WKT_VALIDATION_ERROR(PARSER_ERROR_UNCLOSED, the_geom.stack->next->uu.nn.parse_location); - } - else - { - LWDEBUGF(5, "Ring %d found closed.", i); - } - } -} - -/* - * Checks to ensure that each ring of the current polygon contains the - * given number of points. The given number should be four, but - * lets keep things generic here for now. - */ -void -check_polygon_minpoints(void) -{ - tuple *tp = the_geom.stack->next; /* Current tuple */ - int i, j; /* Loop counters */ - int num, mum; /* ring / point count */ - int minpoints = 4; - - LWDEBUG(3, "check_polygon_minpoints"); - - num = tp->uu.nn.num; - - /* Check each ring for minpoints */ - for (i = 0; i < num; i++) - { - /* Step into the point counter tuple */ - tp = tp->next; - mum = tp->uu.nn.num; - - /* Skip the point tuples */ - for (j = 0; j < mum; j++) - { - tp = tp->next; - } - - if (mum < minpoints) - { - LWDEBUGF(5, "Minpoint check failed: needed %d, got %d", - minpoints, mum); - LWDEBUGF(5, "tuple = %p; parse_location = %d; parser reported column = %d", - tp, tp->uu.nn.parse_location, lwg_parse_yylloc.last_column); - LWGEOM_WKT_VALIDATION_ERROR(PARSER_ERROR_MOREPOINTS, the_geom.stack->next->uu.nn.parse_location); - } - - } -} - -/* - * Checks to ensure that each ring of the curved polygon (itself a proper - * geometry) contains the minimum number of points. - */ -void -check_curvepolygon_minpoints() -{ - tuple *tp = the_geom.stack->next; /* Current tuple */ - int i, j, k; /* Loop counters */ - int num, mum, lum; /* subgeom, point counts */ - int minpoints; - int count = 0; /* Running counter for compound curve */ - num = tp->uu.nn.num; - - LWDEBUG(3, "check_curvepolygon_minpoints"); - - /* Check each sub-geom for minpoints */ - for (i = 0; i < num; i++) - { - minpoints = 3; - tp = tp->next; - LWDEBUGF(5, "Subgeom type %d: %p", tp->uu.nn.type, tp); - switch (TYPE_GETTYPE(tp->uu.nn.type)) - { - case COMPOUNDTYPE: - /* sub-geom counter */ - tp = tp->next; - mum = tp->uu.nn.num; - - /* sub-geom loop */ - for (j = 0; j < mum; j++) - { - tp = tp->next->next; - lum = tp->uu.nn.num; - if (j == 0) count += lum; - else count += lum - 1; - for (k = 0; k < lum; k++) - { - tp = tp->next; - } - } - if (count < minpoints) - { - LWDEBUGF(5, "Minpoint check failed: needed %d, got %d", - minpoints, count); - LWGEOM_WKT_VALIDATION_ERROR(PARSER_ERROR_MOREPOINTS, the_geom.stack->next->uu.nn.parse_location); - } - break; - case LINETYPE: - minpoints = 4; - case CIRCSTRINGTYPE: - tp = tp->next; - mum = tp->uu.nn.num; - for (j = 0; j < mum; j++) - { - tp = tp->next; - } - if (mum < minpoints) - { - LWDEBUGF(5, "Minpoint check failed: needed %d, got %d", - minpoints, mum); - LWGEOM_WKT_VALIDATION_ERROR(PARSER_ERROR_MOREPOINTS, the_geom.stack->next->uu.nn.parse_location); - } - break; - } - } -} - -/* - * Determines if the compound curve contains the required minimum number of - * points. This cannot push off to sub-geometries, as it isn't just a matter - * counting their points. The first point of all but the first geometry are - * redundant and shall not be counted. - */ -void -check_compoundcurve_minpoints() -{ - tuple *tp = the_geom.stack->next; /* Current tuple */ - int i, j; /* Loop counters */ - int num, mum; /* sub-geom / point count */ - int count = 0; /* Running count of points */ - int minpoints = 2; - - LWDEBUG(3, "check_compoundcurve_minpoints"); - num = tp->uu.nn.num; - LWDEBUGF(5, "subgeom count %d: %p", num, tp); - - for (i = 0; i < num; i++) - { - LWDEBUG(5, "loop start"); - /* Step into the sub-geometry's counting tuple */ - tp = tp->next->next; - mum = tp->uu.nn.num; - LWDEBUGF(5, "subgeom %d of %d type %d, point count %d: %p", i, num, tp->uu.nn.type, mum, tp); - if (i == 0) count += mum; - else count += mum - 1; - - /* Skip the sub-geoms point tuples */ - for (j = 0; j < mum; j++) - { - tp = tp->next; - LWDEBUGF(5, "skipping point tuple %p", tp); - } - } - LWDEBUG(5, "loop exit"); - LWDEBUGF(5, "comparison %d", minpoints); - LWDEBUGF(5, "comparison %d", count); - - if (count < minpoints) - { - LWDEBUGF(5, "Minpoint check failed: needed %d, got %d", - minpoints, count); - LWGEOM_WKT_VALIDATION_ERROR(PARSER_ERROR_MOREPOINTS, the_geom.stack->next->uu.nn.parse_location); - } - LWDEBUG(4, "check_compoundcurve_minpoints complete"); -} - -void -check_linestring_minpoints() -{ - tuple *tp = the_geom.stack->next; /* Current counting tuple */ - int i, num; - int minpoints = 2; - - LWDEBUG(3, "check_linestring_minpoints"); - if (tp->uu.nn.num < minpoints) - { - num = tp->uu.nn.num; - for (i = 0; i < num; i++) - { - tp = tp->next; - } - LWDEBUGF(5, "Minpoint check failed: needed %d, got %d", - minpoints, tp->uu.nn.num); - LWGEOM_WKT_VALIDATION_ERROR(PARSER_ERROR_MOREPOINTS, the_geom.stack->next->uu.nn.parse_location); - } -} - -void check_circularstring_minpoints() -{ - check_linestring_minpoints(); -} - -void -pop(void) -{ - LWDEBUGF(3, "pop: type= %d, tuple= %p", the_geom.stack->uu.nn.type, - the_geom.stack); - - /* If popping a counting tuple or an empty tuple, update the parse_location to give - give better location context */ - if (the_geom.stack->uu.nn.type == 0 || the_geom.stack->uu.nn.type == 0xff) - the_geom.stack->uu.nn.parse_location = lwg_parse_yylloc.last_column; - - the_geom.stack = the_geom.stack->uu.nn.stack_next; -} - -void -check_dims(int num) -{ - LWDEBUGF(3, "check_dims the_geom.ndims = %d, num = %d", the_geom.ndims, num); - - if ( the_geom.ndims != num) - { - if (the_geom.ndims) - { - LWGEOM_WKT_PARSER_ERROR(PARSER_ERROR_MIXDIMS); - } - else - { - - LWDEBUGF(3, "check_dims: setting dim %d", num); - - the_geom.ndims = num; - if ( num > 2 ) the_geom.hasZ = 1; - if ( num > 3 ) the_geom.hasM = 1; - } - } -} - -#define WRITE_INT4_REAL(x,y) { memcpy(x->pos,&y,4); x->pos+=4;} -#define WRITE_INT4_REAL_MULTIPLE(x,y,z) { memcpy(x->pos,&y,z*4); x->pos+=(z*4);} - -/* - we can shrink ints to one byte if they are less than 127 - by setting the extra bit. Because if the different byte - ordering possibilities we need to set the lsb on little - endian to show a packed one and the msb on a big endian - machine -*/ -#ifdef SHRINK_INTS -void -WRITE_INT4(output_state * out,int4 val) -{ - if ( val <= 0x7f ) - { - if ( getMachineEndian() == NDR ) - { - val = (val<<1) | 1; - } - else - { - val |=0x80; - } - - *out->pos++ = (uchar)val; - the_geom.alloc_size-=3; - } - else - { - if ( getMachineEndian() == NDR ) - { - val <<=1; - } - WRITE_INT4_REAL(out,val); - } -} -#else -#define WRITE_INT4 WRITE_INT4_REAL -#endif - - -void -WRITE_DOUBLES(output_state* out,double* points, int cnt) -{ - if ( the_geom.lwgi) - { - int4 vals[4]; - int i; - - for (i=0; ipos,vals,sizeof(int4)*cnt); - out->pos+=sizeof(int4)*cnt; - } - else - { - memcpy(out->pos,points,sizeof(double)*cnt); - out->pos+=sizeof(double)*cnt; - } - -} - -void -empty_stack(tuple *this,output_state* out) -{ - /* Do nothing but provide an empty base for the geometry stack */ -} -void -write_point_2(tuple* this,output_state* out) -{ - WRITE_DOUBLES(out,this->uu.points,2); -} - -void -write_point_3(tuple* this,output_state* out) -{ - WRITE_DOUBLES(out,this->uu.points,3); -} - -void -write_point_4(tuple* this,output_state* out) -{ - WRITE_DOUBLES(out,this->uu.points,4); -} - -void -write_point_2i(tuple* this,output_state* out) -{ - WRITE_INT4_REAL_MULTIPLE(out,this->uu.points,2); -} - -void -write_point_3i(tuple* this,output_state* out) -{ - WRITE_INT4_REAL_MULTIPLE(out,this->uu.points,3); -} - -void -write_point_4i(tuple* this,output_state* out) -{ - WRITE_INT4_REAL_MULTIPLE(out,this->uu.points,4); -} -void -write_type(tuple* this,output_state* out) -{ - uchar type=0; - - /* Empty handler - switch back */ - if ( this->uu.nn.type == 0xff ) - this->uu.nn.type = COLLECTIONTYPE; - - type |= this->uu.nn.type; - - if (the_geom.ndims) /* Support empty */ - { - TYPE_SETZM(type, the_geom.hasZ, the_geom.hasM); - } - - if ( the_geom.srid != -1 ) - { - type |= 0x40; - } - - *(out->pos)=type; - out->pos++; - - if ( the_geom.srid != -1 ) - { - /* Only the first geometry will have a srid attached */ - WRITE_INT4(out,the_geom.srid); - the_geom.srid = -1; - } -} - -void -write_count(tuple* this,output_state* out) -{ - int num = this->uu.nn.num; - WRITE_INT4(out,num); -} - -void -write_type_count(tuple* this,output_state* out) -{ - write_type(this,out); - write_count(this,out); -} - -void -alloc_point(void) -{ - LWDEBUG(3, "alloc_point"); - - if ( the_geom.lwgi) - alloc_stack_tuple(POINTTYPEI,write_type,1); - else - alloc_stack_tuple(POINTTYPE,write_type,1); - -} - -void -alloc_linestring(void) -{ - LWDEBUG(3, "alloc_linestring"); - - if ( the_geom.lwgi) - alloc_stack_tuple(LINETYPEI,write_type,1); - else - alloc_stack_tuple(LINETYPE,write_type,1); - -} - -void alloc_linestring_closed(void) -{ - LWDEBUG(3, "alloc_linestring_closed called."); - - alloc_linestring(); -} - -void -alloc_circularstring(void) -{ - LWDEBUG(3, "alloc_circularstring"); - - alloc_stack_tuple(CIRCSTRINGTYPE,write_type,1); -} - -void alloc_circularstring_closed(void) -{ - LWDEBUG(3, "alloc_circularstring_closed"); - - alloc_circularstring(); -} - -void -alloc_polygon(void) -{ - LWDEBUG(3, "alloc_polygon"); - - if ( the_geom.lwgi) - alloc_stack_tuple(POLYGONTYPEI, write_type,1); - else - alloc_stack_tuple(POLYGONTYPE, write_type,1); -} - -void -alloc_curvepolygon(void) -{ - LWDEBUG(3, "alloc_curvepolygon called."); - - alloc_stack_tuple(CURVEPOLYTYPE, write_type, 1); -} - -void -alloc_compoundcurve(void) -{ - LWDEBUG(3, "alloc_compoundcurve called."); - - alloc_stack_tuple(COMPOUNDTYPE, write_type, 1); -} - -void -alloc_compoundcurve_closed(void) -{ - LWDEBUG(3, "alloc_compoundcurve called."); - - alloc_stack_tuple(COMPOUNDTYPE, write_type, 1); -} - -void -alloc_multipoint(void) -{ - LWDEBUG(3, "alloc_multipoint"); - - alloc_stack_tuple(MULTIPOINTTYPE,write_type,1); -} - -void -alloc_multilinestring(void) -{ - LWDEBUG(3, "alloc_multilinestring"); - - alloc_stack_tuple(MULTILINETYPE,write_type,1); -} - -void -alloc_multicurve(void) -{ - LWDEBUG(3, "alloc_multicurve"); - - alloc_stack_tuple(MULTICURVETYPE,write_type,1); -} - -void -alloc_multipolygon(void) -{ - LWDEBUG(3, "alloc_multipolygon"); - - alloc_stack_tuple(MULTIPOLYGONTYPE,write_type,1); -} - -void -alloc_multisurface(void) -{ - LWDEBUG(3, "alloc_multisurface called"); - - alloc_stack_tuple(MULTISURFACETYPE,write_type,1); -} - -void -alloc_geomertycollection(void) -{ - LWDEBUG(3, "alloc_geometrycollection"); - - alloc_stack_tuple(COLLECTIONTYPE,write_type,1); -} - -void -alloc_counter(void) -{ - LWDEBUG(3, "alloc_counter"); - - alloc_stack_tuple(0,write_count,4); -} - -void -alloc_empty(void) -{ - tuple* st = the_geom.stack; - - LWDEBUG(3, "alloc_empty"); - - /* Find the last geometry */ - while (st->uu.nn.type == 0) - { - st =st->uu.nn.stack_next; - } - - /* Reclaim memory */ - free_tuple(st->next); - - /* Put an empty geometry collection on the top of the stack */ - st->next=NULL; - the_geom.stack=st; - the_geom.alloc_size=st->uu.nn.size_here; - - /* Mark as a empty stop */ - if (st->uu.nn.type != 0xFF) - { - st->uu.nn.type=0xFF; - st->of = write_type_count; - the_geom.alloc_size+=4; - st->uu.nn.size_here=the_geom.alloc_size; - } - - st->uu.nn.num=0; -} - -void -make_serialized_lwgeom(LWGEOM_PARSER_RESULT *lwg_parser_result) -{ - uchar* out_c; - output_state out; - tuple* cur; - - LWDEBUG(3, "make_serialized_lwgeom"); - - /* Allocate the LWGEOM itself */ - out_c = (uchar*)local_malloc(the_geom.alloc_size); - out.pos = out_c; - cur = the_geom.first ; - - while (cur) - { - cur->of(cur,&out); - cur=cur->next; - } - - /* Setup the LWGEOM_PARSER_RESULT structure */ - lwg_parser_result->serialized_lwgeom = out_c; - lwg_parser_result->size = the_geom.alloc_size; - - return; -} - -void -lwg_parse_yynotice(char* s) -{ - lwnotice(s); -} - -int -lwg_parse_yyerror(char* s) -{ - LWGEOM_WKT_PARSER_ERROR(PARSER_ERROR_INVALIDGEOM); - return 1; -} - -/* - Table below generated using this ruby. - - a=(0..0xff).to_a.collect{|x|0xff};('0'..'9').each{|x|a[x[0]]=x[0]-'0'[0]} - ('a'..'f').each{|x|v=x[0]-'a'[0]+10;a[x[0]]=a[x.upcase[0]]=v} - puts '{'+a.join(",")+'}' - - */ -static const uchar to_hex[] = -{ - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, - 0,1,2,3,4,5,6,7,8,9,255,255,255,255,255,255,255,10,11,12,13,14, - 15,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, - 255,255,255,255,255,255,255,255,255,255,255,10,11,12,13,14,15,255, - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, - 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, - 255,255,255,255,255,255,255,255 -}; - -uchar -strhex_readbyte(const char* in) -{ - if ( *in == 0 ) - { - if ( ! parser_ferror_occured) - { - LWGEOM_WKB_PARSER_ERROR(PARSER_ERROR_INVALIDGEOM); - } - return 0; - } - - if (!parser_ferror_occured) - { - lwg_parse_yylloc.last_column++; - return to_hex[(int)*in]<<4 | to_hex[(int)*(in+1)]; - } - else - { - return 0; - } -} - -uchar -read_wkb_byte(const char** in) -{ - uchar ret = strhex_readbyte(*in); - (*in)+=2; - return ret; -} - -int swap_order; - -void -read_wkb_bytes(const char** in, uchar* out, int cnt) -{ - if ( ! swap_order ) - { - while (cnt--) *out++ = read_wkb_byte(in); - } - else - { - out += (cnt-1); - while (cnt--) *out-- = read_wkb_byte(in); - } -} - -int4 -read_wkb_int(const char** in) -{ - int4 ret=0; - read_wkb_bytes(in,(uchar*)&ret,4); - return ret; -} - -double -read_wkb_double(const char** in, int convert_from_int) -{ - double ret=0; - - if ( ! convert_from_int) - { - read_wkb_bytes(in,(uchar*)&ret,8); - return ret; - } - else - { - ret = read_wkb_int(in); - ret /= 0xb60b60; - return ret-180.0; - } -} - -void -read_wkb_point(const char **b) -{ - int i; - tuple* p = NULL; - - - if (the_geom.lwgi && the_geom.from_lwgi ) - { - /* - * Special case - reading from lwgi to lwgi - * we don't want to go via doubles in the middle. - */ - switch (the_geom.ndims) - { - case 2: - p=alloc_tuple(write_point_2i,8); - break; - case 3: - p=alloc_tuple(write_point_3i,12); - break; - case 4: - p=alloc_tuple(write_point_4i,16); - break; - } - - for (i=0; iuu.pointsi[i]=read_wkb_int(b); - } - } - else - { - int mul = the_geom.lwgi ? 1 : 2; - - switch (the_geom.ndims) - { - case 2: - p=alloc_tuple(write_point_2,8*mul); - break; - case 3: - p=alloc_tuple(write_point_3,12*mul); - break; - case 4: - p=alloc_tuple(write_point_4,16*mul); - break; - } - - for (i=0; iuu.points[i]=read_wkb_double(b,the_geom.from_lwgi); - } - } - - inc_num(); - check_dims(the_geom.ndims); -} - -void -read_wkb_polygon(const char **b) -{ - /* Stack the number of ORDINATE_ARRAYs (rings) */ - int4 cnt=read_wkb_int(b); - alloc_counter(); - - /* Read through each ORDINATE_ARRAY in turn */ - while (cnt--) - { - if ( parser_ferror_occured ) return; - - read_wkb_ordinate_array(b); - } - - pop(); -} - -void -read_wkb_linestring(const char **b) -{ - - read_wkb_ordinate_array(b); -} - - -void -read_wkb_circstring(const char **b) -{ - - read_wkb_ordinate_array(b); -} - -void -read_wkb_ordinate_array(const char **b) -{ - /* Read through a WKB ordinate array */ - int4 cnt=read_wkb_int(b); - alloc_counter(); - - while (cnt--) - { - if ( parser_ferror_occured ) return; - read_wkb_point(b); - } - - /* Perform a check of the ordinate array */ - pop(); -} - -void -read_collection(const char **b, read_col_func f) -{ - /* Read through a COLLECTION or an EWKB */ - int4 cnt=read_wkb_int(b); - alloc_counter(); - - while (cnt--) - { - if ( parser_ferror_occured ) return; - f(b); - } - - pop(); -} - -void -parse_wkb(const char **b) -{ - int4 type; - uchar xdr = read_wkb_byte(b); - int4 localsrid; - - LWDEBUG(3, "parse_wkb"); - - swap_order=0; - - if ( xdr != getMachineEndian() ) - { - swap_order=1; - } - - type = read_wkb_int(b); - - /* quick exit on error */ - if ( parser_ferror_occured ) return; - - the_geom.ndims=2; - if (type & WKBZOFFSET) - { - the_geom.hasZ = 1; - the_geom.ndims++; - } - else the_geom.hasZ = 0; - if (type & WKBMOFFSET) - { - the_geom.hasM = 1; - the_geom.ndims++; - } - else the_geom.hasM = 0; - - if (type & WKBSRIDFLAG ) - { - /* local (in-EWKB) srid spec overrides SRID=#; */ - localsrid = read_wkb_int(b); - if ( localsrid != -1 ) - { - if ( the_geom.srid == -1 ) the_geom.alloc_size += 4; - the_geom.srid = localsrid; - } - } - - type &=0x0f; - - if ( the_geom.lwgi ) - { - - if ( type<= POLYGONTYPE ) - alloc_stack_tuple(type +9,write_type,1); - else - alloc_stack_tuple(type,write_type,1); - } - else - { - /* If we are writing lwg and are reading wbki */ - int4 towrite=type; - if (towrite >= POINTTYPEI && towrite <= POLYGONTYPEI) - { - towrite-=9; - } - alloc_stack_tuple(towrite,write_type,1); - } - - switch (type ) - { - case POINTTYPE: - read_wkb_point(b); - break; - case LINETYPE: - read_wkb_linestring(b); - break; - case CIRCSTRINGTYPE: - read_wkb_circstring(b); - break; - case POLYGONTYPE: - read_wkb_polygon(b); - break; - - case COMPOUNDTYPE: - read_collection(b,parse_wkb); - break; - - case CURVEPOLYTYPE: - read_collection(b,parse_wkb); - break; - case MULTIPOINTTYPE: - case MULTILINETYPE: - case MULTICURVETYPE: - case MULTIPOLYGONTYPE: - case MULTISURFACETYPE: - case COLLECTIONTYPE: - read_collection(b,parse_wkb); - break; - - case POINTTYPEI: - the_geom.from_lwgi=1; - read_wkb_point(b); - break; - - case LINETYPEI: - the_geom.from_lwgi=1; - read_wkb_linestring(b); - break; - - case POLYGONTYPEI: - the_geom.from_lwgi=1; - read_wkb_polygon(b); - break; - - default: - LWGEOM_WKB_PARSER_ERROR(PARSER_ERROR_INVALIDWKBTYPE); - } - - the_geom.from_lwgi=0; - - pop(); -} - - -void -alloc_wkb(const char *parser) -{ - LWDEBUG(3, "alloc_wkb"); - - parse_wkb(&parser); -} - -/* - Parse a string and return a LW_GEOM -*/ -int -parse_it(LWGEOM_PARSER_RESULT *lwg_parser_result, const char *geometry, int flags, allocator allocfunc, report_error errfunc) -{ - LWDEBUGF(3, "parse_it: %s with parser flags %d", geometry, flags); - - local_malloc = allocfunc; - error_func=errfunc; - - parser_ferror_occured = 0; - - /* Setup the inital parser flags and empty the return struct */ - current_lwg_parser_result = lwg_parser_result; - current_parser_check_flags = flags; - lwg_parser_result->serialized_lwgeom = NULL; - lwg_parser_result->size = 0; - lwg_parser_result->wkinput = geometry; - - init_parser(geometry); - - lwg_parse_yyparse(); - - close_parser(); - - /* Return the parsed geometry */ - make_serialized_lwgeom(lwg_parser_result); - - return parser_ferror_occured; -} - -int -parse_lwg(LWGEOM_PARSER_RESULT *lwg_parser_result, const char* geometry, int flags, allocator allocfunc, report_error errfunc) -{ - the_geom.lwgi=0; - return parse_it(lwg_parser_result, geometry, flags, allocfunc, errfunc); -} - -int -parse_lwgi(LWGEOM_PARSER_RESULT *lwg_parser_result, const char* geometry, int flags, allocator allocfunc, report_error errfunc) -{ - the_geom.lwgi=1; - return parse_it(lwg_parser_result, geometry, flags, allocfunc, errfunc); -} - -void -set_zm(char z, char m) -{ - LWDEBUGF(4, "set_zm %d, %d", z, m); - - the_geom.hasZ = z; - the_geom.hasM = m; - the_geom.ndims = 2+z+m; -} - diff -Nru postgis-1.5.3/liblwgeom/lwgunparse.c postgis-2.0.1/liblwgeom/lwgunparse.c --- postgis-1.5.3/liblwgeom/lwgunparse.c 2010-02-01 17:35:55.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwgunparse.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,1167 +0,0 @@ -/* - * Written by Ralph Mason ralph.masontelogis.com - * - * Copyright Telogis 2004 - * www.telogis.com - * - * $Id: lwgunparse.c 5181 2010-02-01 17:35:55Z pramsey $ - */ - - -#include -#include -#include -/* Solaris9 does not provide stdint.h */ -/* #include */ -#include - -#include "liblwgeom.h" -#include "wktparse.h" - - -/*-- Typedefs ---------------------------------------------- */ - -typedef uint32_t int4; -typedef uchar* (*outfunc)(uchar*,int); -typedef uchar* (*outwkbfunc)(uchar*); - -/*-- Prototypes -------------------------------------------- */ - -void ensure(int chars); -void to_end(void); -void write_str(const char* str); -void write_double(double val); -void write_int(int i); -int4 read_int(uchar** geom); -double read_double(uchar** geom); -uchar* output_point(uchar* geom,int supress); -uchar* output_single(uchar* geom,int supress); -uchar* output_collection(uchar* geom,outfunc func,int supress); -uchar* output_line_collection(uchar* geom,outfunc func,int supress); -uchar* output_polygon_collection(uchar* geom,int suppress); -uchar* output_polygon_ring_collection(uchar* geom,outfunc func,int supress); -uchar* output_circstring_collection(uchar* geom,outfunc func,int supress); -uchar* output_curvepoly(uchar* geom, int supress); -uchar* output_multipoint(uchar* geom,int suppress); -uchar* output_compound(uchar* geom, int suppress); -uchar* output_multisurface(uchar* geom, int suppress); - -void write_wkb_hex_bytes(uchar* ptr, unsigned int cnt, size_t size); -void write_wkb_bin_bytes(uchar* ptr, unsigned int cnt, size_t size); -void write_wkb_bin_flip_bytes(uchar* ptr, unsigned int cnt, size_t size); -void write_wkb_hex_flip_bytes(uchar* ptr, unsigned int cnt, size_t size); - -void write_wkb_int(int i); -uchar* output_wkb_collection(uchar* geom,outwkbfunc func); -uchar* output_wkb_polygon_collection(uchar* geom); -uchar* output_wkb_polygon_ring_collection(uchar* geom,outwkbfunc func); -uchar* output_wkb_line_collection(uchar* geom,outwkbfunc func); -uchar* output_wkb_circstring_collection(uchar* geom,outwkbfunc func); -uchar* output_wkb_point(uchar* geom); -uchar* output_wkb(uchar* geom); - -/*-- Globals ----------------------------------------------- */ - -static int unparser_ferror_occured; -static int dims; -static allocator local_malloc; -static freeor local_free; -static char* out_start; -static char* out_pos; -static int len; -static int lwgi; -static uchar endianbyte; -void (*write_wkb_bytes)(uchar* ptr,unsigned int cnt,size_t size); - -/* - * Unparser current instance check flags - a bitmap of flags that determine which checks are enabled during the current unparse - * (see liblwgeom.h for the related PARSER_CHECK constants) - */ -int current_unparser_check_flags; - -/* - * Unparser current instance result structure - the result structure being used for the current unparse - */ -LWGEOM_UNPARSER_RESULT *current_lwg_unparser_result; - -/* - * Unparser error messages - * - * IMPORTANT: Make sure the order of these messages matches the UNPARSER_ERROR constants in liblwgeom.h! - * The 0th element should always be empty since it is unused (error constants start from -1) - */ - -const char *unparser_error_messages[] = -{ - "", - "geometry requires more points", - "geometry must have an odd number of points", - "geometry contains non-closed rings" -}; - -/* Macro to return the error message and the current position within WKT */ -#define LWGEOM_WKT_UNPARSER_ERROR(errcode) \ - do { \ - if (!unparser_ferror_occured) { \ - unparser_ferror_occured = -1 * errcode; \ - current_lwg_unparser_result->message = unparser_error_messages[errcode]; \ - current_lwg_unparser_result->errlocation = (out_pos - out_start); \ - } \ - } while (0); - -/* Macro to return the error message and the current position within WKB */ -#define LWGEOM_WKB_UNPARSER_ERROR(errcode) \ - do { \ - if (!unparser_ferror_occured) { \ - unparser_ferror_occured = -1 * errcode; \ - current_lwg_unparser_result->message = unparser_error_messages[errcode]; \ - current_lwg_unparser_result->errlocation = (out_pos - out_start); \ - } \ - } while (0); - -/*---------------------------------------------------------- */ - - - - - - -/* - * Ensure there is enough space for chars bytes. - * Reallocate memory is this is not the case. - */ -void -ensure(int chars) -{ - - int pos = out_pos - out_start; - - if ( (pos + chars) >= len ) - { - char* newp =(char*)local_malloc(len*2); - memcpy(newp,out_start,len); - local_free(out_start); - out_start = newp; - out_pos = newp + pos; - len *=2; - } -} - -void -to_end(void) -{ - while (*out_pos) - { - out_pos++; - } -} - -void -write_str(const char* str) -{ - ensure(32); - strcpy(out_pos,str); - to_end(); -} - -void -write_double(double val) -{ - ensure(32); - if (lwgi) - sprintf(out_pos,"%.8g",val); - else - sprintf(out_pos,"%.15g",val); - to_end(); -} - -void -write_int(int i) -{ - ensure(32); - sprintf(out_pos,"%i",i); - to_end(); -} - -int4 -read_int(uchar** geom) -{ - int4 ret; -#ifdef SHRINK_INTS - if ( getMachineEndian() == NDR ) - { - if ( (**geom)& 0x01) - { - ret = **geom >>1; - (*geom)++; - return ret; - } - } - else - { - if ( (**geom)& 0x80) - { - ret = **geom & ~0x80; - (*geom)++; - return ret; - } - } -#endif - memcpy(&ret,*geom,4); - -#ifdef SHRINK_INTS - if ( getMachineEndian() == NDR ) - { - ret >>= 1; - } -#endif - - (*geom)+=4; - return ret; -} - -double round(double); - -double read_double(uchar** geom) -{ - if (lwgi) - { - double ret = *((int4*)*geom); - ret /= 0xb60b60; - (*geom)+=4; - return ret-180.0; - } - else - { - double ret; - memcpy(&ret, *geom, 8); - (*geom)+=8; - return ret; - } -} - -uchar * -output_point(uchar* geom,int supress) -{ - int i; - - for ( i = 0 ; i < dims ; i++ ) - { - write_double(read_double(&geom)); - if (i +1 < dims ) - write_str(" "); - } - return geom; -} - -uchar * -output_single(uchar* geom,int supress) -{ - write_str("("); - geom=output_point(geom,supress); - write_str(")"); - return geom; -} - -/* Output a standard collection */ -uchar * -output_collection(uchar* geom,outfunc func,int supress) -{ - int cnt = read_int(&geom); - if ( cnt == 0 ) - { - write_str(" EMPTY"); - } - else - { - write_str("("); - while (cnt--) - { - geom=func(geom,supress); - if ( cnt ) - { - write_str(","); - } - } - write_str(")"); - } - return geom; -} - -/* Output a set of LINESTRING points */ -uchar * -output_line_collection(uchar* geom,outfunc func,int supress) -{ - int cnt = read_int(&geom); - int orig_cnt = cnt; - - if ( cnt == 0 ) - { - write_str(" EMPTY"); - } - else - { - write_str("("); - while (cnt--) - { - geom=func(geom,supress); - if ( cnt ) - { - write_str(","); - } - } - write_str(")"); - } - - /* Ensure that LINESTRING has a minimum of 2 points */ - if ((current_unparser_check_flags & PARSER_CHECK_MINPOINTS) && orig_cnt < 2) - LWGEOM_WKT_UNPARSER_ERROR(UNPARSER_ERROR_MOREPOINTS); - - return geom; -} - -/* Output an individual ring from a POLYGON */ -uchar * -output_polygon_ring_collection(uchar* geom,outfunc func,int supress) -{ - uchar *temp; - int dimcount; - double *first_point; - double *last_point; - int cnt; - int orig_cnt; - - first_point = lwalloc(dims * sizeof(double)); - last_point = lwalloc(dims * sizeof(double)); - - cnt = read_int(&geom); - orig_cnt = cnt; - if ( cnt == 0 ) - { - write_str(" EMPTY"); - } - else - { - write_str("("); - - /* Store the first point of the ring (use a temp var since read_double alters - the pointer after use) */ - temp = geom; - dimcount = 0; - while (dimcount < dims) - { - first_point[dimcount] = read_double(&temp); - dimcount++; - } - - while (cnt--) - { - geom=func(geom,supress); - if ( cnt ) - { - write_str(","); - } - } - write_str(")"); - - /* Store the last point of the ring (note: we will have moved past it, so we - need to count backwards) */ - temp = geom - sizeof(double) * dims; - dimcount = 0; - while (dimcount < dims) - { - last_point[dimcount] = read_double(&temp); - dimcount++; - } - - /* Check if they are the same... - - WARNING: due to various GEOS bugs related to producing rings with incorrect - 3rd dimensions, the closure check here for outgoing geometries only checks on 2 - dimensions. This is currently different to the parser! */ - - if ( - (first_point[0] != last_point[0] || first_point[1] != last_point[1] ) && - (current_unparser_check_flags & PARSER_CHECK_CLOSURE)) - { - LWGEOM_WKT_UNPARSER_ERROR(UNPARSER_ERROR_UNCLOSED); - } - - - /* Ensure that POLYGON has a minimum of 4 points */ - if ((current_unparser_check_flags & PARSER_CHECK_MINPOINTS) && orig_cnt < 4) - { - LWGEOM_WKT_UNPARSER_ERROR(UNPARSER_ERROR_MOREPOINTS); - } - } - - lwfree(first_point); - lwfree(last_point); - - return geom; -} - -/* Ouput the points from a CIRCULARSTRING */ -uchar * -output_circstring_collection(uchar* geom,outfunc func,int supress) -{ - int cnt = read_int(&geom); - int orig_cnt = cnt; - - if ( cnt == 0 ) - { - write_str(" EMPTY"); - } - else - { - write_str("("); - while (cnt--) - { - geom=func(geom,supress); - if ( cnt ) - { - write_str(","); - } - } - write_str(")"); - } - - /* Ensure that a CIRCULARSTRING has a minimum of 3 points */ - if ((current_unparser_check_flags & PARSER_CHECK_MINPOINTS) && orig_cnt < 3) - { - LWGEOM_WKT_UNPARSER_ERROR(UNPARSER_ERROR_MOREPOINTS); - } - - /* Ensure that a CIRCULARSTRING has an odd number of points */ - if ((current_unparser_check_flags & PARSER_CHECK_ODD) && orig_cnt % 2 != 1) - { - LWGEOM_WKT_UNPARSER_ERROR(UNPARSER_ERROR_ODDPOINTS); - } - - return geom; -} - -/* Output a POLYGON consisting of a number of rings */ -uchar * -output_polygon_collection(uchar* geom,int suppress) -{ - return output_polygon_ring_collection(geom,output_point,suppress); -} - -uchar *output_wkt(uchar* geom, int supress); - -/* special case for multipoint to supress extra brackets */ -uchar *output_multipoint(uchar* geom,int suppress) -{ - unsigned char type = *geom & 0x0f; - - if ( type == POINTTYPE ) - return output_point(++geom,suppress); - else if ( type == POINTTYPEI ) - { - lwgi++; - geom=output_point(++geom,0); - lwgi--; - return geom; - } - - return output_wkt(geom,suppress); -} - -/* Special case for compound curves: suppress the LINESTRING prefix from a curve if it appears as - a component of a COMPOUNDCURVE, but not CIRCULARSTRING */ -uchar *output_compound(uchar* geom, int suppress) -{ - unsigned char type; - - LWDEBUG(2, "output_compound called."); - - type=*geom; - switch (TYPE_GETTYPE(type)) - { - case LINETYPE: - geom = output_wkt(geom,2); - break; - case CIRCSTRINGTYPE: - geom = output_wkt(geom,1); - break; - } - return geom; -} - -/* - * Supress linestring but not circularstring and correctly handle compoundcurve - */ -uchar *output_curvepoly(uchar* geom, int supress) -{ - unsigned type; - type = *geom++; - - LWDEBUG(2, "output_curvepoly."); - - switch (TYPE_GETTYPE(type)) - { - case LINETYPE: - geom = output_collection(geom,output_point,0); - break; - case CIRCSTRINGTYPE: - write_str("CIRCULARSTRING"); - geom = output_circstring_collection(geom,output_point,1); - break; - case COMPOUNDTYPE: - write_str("COMPOUNDCURVE"); - geom = output_collection(geom,output_compound,1); - break; - } - return geom; -} - -/* Special case for multisurfaces: suppress the POLYGON prefix from a surface if it appears as - a component of a MULTISURFACE, but not CURVEPOLYGON */ -uchar *output_multisurface(uchar* geom, int suppress) -{ - unsigned char type; - - LWDEBUG(2, "output_multisurface called."); - - type=*geom; - switch (TYPE_GETTYPE(type)) - { - case POLYGONTYPE: - geom = output_wkt(geom,2); - break; - case CURVEPOLYTYPE: - geom = output_wkt(geom,1); - break; - } - return geom; -} - -/* - * Suppress=0 -- write TYPE, M, coords - * Suppress=1 -- write TYPE, coords - * Suppress=2 -- write only coords - */ -uchar * -output_wkt(uchar* geom, int supress) -{ - - unsigned char type=*geom++; - char writeM=0; - dims = TYPE_NDIMS(type); /* ((type & 0x30) >> 4)+2; */ - - LWDEBUG(2, "output_wkt called."); - - if ( ! supress && !TYPE_HASZ(type) && TYPE_HASM(type) ) writeM=1; - - - /* Skip the bounding box if there is one */ - if ( TYPE_HASBBOX(type) ) - { - geom+=16; - } - - if ( TYPE_HASSRID(type) ) - { - write_str("SRID="); - write_int(read_int(&geom)); - write_str(";"); - } - - switch (TYPE_GETTYPE(type)) - { - case POINTTYPE: - if ( supress < 2 ) - { - if (writeM) write_str("POINTM"); - else write_str("POINT"); - } - geom=output_single(geom,0); - break; - case LINETYPE: - if ( supress < 2 ) - { - if (writeM) write_str("LINESTRINGM"); - else write_str("LINESTRING"); - } - geom = output_line_collection(geom,output_point,0); - break; - case CIRCSTRINGTYPE: - if ( supress < 2 ) - { - if (writeM) write_str("CIRCULARSTRINGM"); - else write_str("CIRCULARSTRING"); - } - geom = output_circstring_collection(geom,output_point,0); - break; - case POLYGONTYPE: - if ( supress < 2 ) - { - if (writeM) write_str("POLYGONM"); - else write_str("POLYGON"); - } - geom = output_collection(geom,output_polygon_collection,0); - break; - case COMPOUNDTYPE: - if ( supress < 2 ) - { - if (writeM) write_str("COMPOUNDCURVEM"); - else write_str("COMPOUNDCURVE"); - } - geom = output_collection(geom, output_compound,1); - break; - case CURVEPOLYTYPE: - if (supress < 2) - { - if (writeM) write_str("CURVEPOLYGONM"); - else write_str("CURVEPOLYGON"); - } - geom = output_collection(geom, output_curvepoly,0); - break; - case MULTIPOINTTYPE: - if ( supress < 2 ) - { - if (writeM) write_str("MULTIPOINTM"); - else write_str("MULTIPOINT"); - } - geom = output_collection(geom,output_multipoint,2); - break; - case MULTILINETYPE: - if ( supress < 2 ) - { - if (writeM) write_str("MULTILINESTRINGM"); - else write_str("MULTILINESTRING"); - } - geom = output_collection(geom,output_wkt,2); - break; - case MULTICURVETYPE: - if ( supress < 2 ) - { - if (writeM) write_str("MULTICURVEM"); - else write_str("MULTICURVE"); - } - geom = output_collection(geom,output_compound,2); - break; - case MULTIPOLYGONTYPE: - if ( supress < 2 ) - { - if (writeM) write_str("MULTIPOLYGONM"); - else write_str("MULTIPOLYGON"); - } - geom = output_collection(geom,output_wkt,2); - break; - case MULTISURFACETYPE: - if ( supress < 2) - { - if (writeM) write_str("MULTISURFACEM"); - else write_str("MULTISURFACE"); - } - geom = output_collection(geom,output_multisurface,2); - break; - case COLLECTIONTYPE: - if ( supress < 2 ) - { - if (writeM) write_str("GEOMETRYCOLLECTIONM"); - else write_str("GEOMETRYCOLLECTION"); - } - geom = output_collection(geom,output_wkt,1); - break; - - case POINTTYPEI: - if ( supress < 2 ) - { - if (writeM) write_str("POINTM"); - else write_str("POINT"); - } - lwgi++; - geom=output_single(geom,0); - lwgi--; - break; - case LINETYPEI: - if ( supress < 2 ) - { - if (writeM) write_str("LINESTRINGM"); - else write_str("LINESTRING"); - } - lwgi++; - geom = output_collection(geom,output_point,0); - lwgi--; - break; - case POLYGONTYPEI: - if ( supress < 2 ) - { - if (writeM) write_str("POLYGONM"); - else write_str("POLYGON"); - } - lwgi++; - geom = output_collection(geom,output_polygon_collection,0); - lwgi--; - break; - } - return geom; -} - -int -unparse_WKT(LWGEOM_UNPARSER_RESULT *lwg_unparser_result, uchar* serialized, allocator alloc, freeor free, int flags) -{ - - LWDEBUGF(2, "unparse_WKT called with parser flags %d.", flags); - - if (serialized==NULL) - return 0; - - /* Setup the inital parser flags and empty the return struct */ - current_lwg_unparser_result = lwg_unparser_result; - current_unparser_check_flags = flags; - lwg_unparser_result->wkoutput = NULL; - lwg_unparser_result->size = 0; - lwg_unparser_result->serialized_lwgeom = serialized; - - unparser_ferror_occured = 0; - local_malloc=alloc; - local_free=free; - len = 128; - out_start = out_pos = alloc(len); - lwgi=0; - - output_wkt(serialized, 0); - - /* Store the result in the struct */ - lwg_unparser_result->wkoutput = out_start; - lwg_unparser_result->size = strlen(out_start); - - return unparser_ferror_occured; -} - -static char outchr[]= - {"0123456789ABCDEF" - }; - -/* Write HEX bytes flipping */ -void -write_wkb_hex_flip_bytes(uchar* ptr, unsigned int cnt, size_t size) -{ - unsigned int bc; /* byte count */ - - ensure(cnt*2*size); - - while (cnt--) - { - for (bc=size; bc; bc--) - { - *out_pos++ = outchr[ptr[bc-1]>>4]; - *out_pos++ = outchr[ptr[bc-1]&0x0F]; - } - ptr+=size; - } -} - -/* Write HEX bytes w/out flipping */ -void -write_wkb_hex_bytes(uchar* ptr, unsigned int cnt, size_t size) -{ - unsigned int bc; /* byte count */ - - ensure(cnt*2*size); - - while (cnt--) - { - for (bc=0; bc>4]; - *out_pos++ = outchr[ptr[bc]&0x0F]; - } - ptr+=size; - } -} - -/* Write BIN bytes flipping */ -void -write_wkb_bin_flip_bytes(uchar* ptr, unsigned int cnt, size_t size) -{ - unsigned int bc; /* byte count */ - - ensure(cnt*size); - - while (cnt--) - { - for (bc=size; bc; bc--) - *out_pos++ = ptr[bc-1]; - ptr+=size; - } -} - - -/* Write BIN bytes w/out flipping */ -void -write_wkb_bin_bytes(uchar* ptr, unsigned int cnt, size_t size) -{ - unsigned int bc; /* byte count */ - - ensure(cnt*size); - - /* Could just use a memcpy here ... */ - while (cnt--) - { - for (bc=0; bcwkoutput = NULL; - lwg_unparser_result->size = 0; - lwg_unparser_result->serialized_lwgeom = serialized; - - unparser_ferror_occured = 0; - local_malloc=alloc; - local_free=free; - len = 128; - out_start = out_pos = alloc(len); - lwgi=0; - - if ( endian == (char)-1 ) - { - endianbyte = getMachineEndian(); - if ( hex ) write_wkb_bytes = write_wkb_hex_bytes; - else write_wkb_bytes = write_wkb_bin_bytes; - } - else - { - endianbyte = endian; - if ( endianbyte != getMachineEndian() ) - { - if ( hex ) write_wkb_bytes = write_wkb_hex_flip_bytes; - else write_wkb_bytes = write_wkb_bin_flip_bytes; - } - else - { - if ( hex ) write_wkb_bytes = write_wkb_hex_bytes; - else write_wkb_bytes = write_wkb_bin_bytes; - } - } - - output_wkb(serialized); - - if ( hex ) - { - ensure(1); - *out_pos=0; - } - - /* Store the result in the struct */ - lwg_unparser_result->wkoutput = out_start; - lwg_unparser_result->size = (out_pos-out_start); - - return unparser_ferror_occured; -} - - -/****************************************************************** - * $Log$ - * Revision 1.23 2006/02/06 11:12:22 strk - * uint32_t typedef moved back from wktparse.h to lwgparse.c and wktunparse.c - * - * Revision 1.22 2006/02/03 20:53:37 strk - * Swapped stdint.h (unavailable on Solaris9) with inttypes.h - * - * Revision 1.21 2006/02/03 09:52:14 strk - * Changed int4 typedefs to use POSIX uint32_t - * - * Revision 1.20 2006/01/09 15:12:02 strk - * ISO C90 comments - * - * Revision 1.19 2005/03/10 18:19:16 strk - * Made void args explicit to make newer compilers happy - * - * Revision 1.18 2005/02/21 16:16:14 strk - * Changed byte to uchar to avoid clashes with win32 headers. - * - * Revision 1.17 2005/02/07 13:21:10 strk - * Replaced DEBUG* macros with PGIS_DEBUG*, to avoid clashes with postgresql DEBUG - * - * Revision 1.16 2005/01/18 09:32:03 strk - * Changed unparse_WKB interface to take an output size pointer and an HEXFORM - * specifier. Reworked code in wktunparse to use function pointers. - * - * Revision 1.15 2004/12/21 15:19:01 strk - * Canonical binary reverted back to EWKB, now supporting SRID inclusion. - * - * Revision 1.14 2004/12/17 11:08:53 strk - * Moved getMachineEndian from parser to liblwgeom.{h,c}. - * Added XDR and NDR defines. - * Fixed all usage of them. - * - * Revision 1.13 2004/10/25 12:27:33 strk - * Removed useless network type includes, - * Added param.h include for BYTE_ORDER defines under win32. - * - * Revision 1.12 2004/10/21 19:48:34 strk - * Stricter syntax fixes. Reported by Sébastien NICAISE - * - * Revision 1.11 2004/10/15 07:35:41 strk - * Fixed a bug introduced by me (byteorder skipped for inner geoms in WKB) - * - * Revision 1.10 2004/10/11 14:03:33 strk - * Added endiannes specification to unparse_WKB, AsBinary, lwgeom_to_wkb. - * - ******************************************************************/ diff -Nru postgis-1.5.3/liblwgeom/lwhomogenize.c postgis-2.0.1/liblwgeom/lwhomogenize.c --- postgis-1.5.3/liblwgeom/lwhomogenize.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwhomogenize.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,258 @@ +/********************************************************************** + * $Id: lwhomogenize.c 9324 2012-02-27 22:08:12Z pramsey $ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * Copyright 2010 Olivier Courtin + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include +#include "liblwgeom_internal.h" +#include "lwgeom_log.h" + + +typedef struct { + int cnt[NUMTYPES]; + LWCOLLECTION* buf[NUMTYPES]; +} HomogenizeBuffer; + +static void +init_homogenizebuffer(HomogenizeBuffer *buffer) +{ + int i; + for ( i = 0; i < NUMTYPES; i++ ) + { + buffer->cnt[i] = 0; + buffer->buf[i] = NULL; + } +} + +/* +static void +free_homogenizebuffer(HomogenizeBuffer *buffer) +{ + int i; + for ( i = 0; i < NUMTYPES; i++ ) + { + if ( buffer->buf[i] ) + { + lwcollection_free(buffer->buf[i]); + } + } +} +*/ + +/* +** Given a generic collection, return the "simplest" form. +** +** eg: GEOMETRYCOLLECTION(MULTILINESTRING()) => MULTILINESTRING() +** +** GEOMETRYCOLLECTION(MULTILINESTRING(), MULTILINESTRING(), POINT()) +** => GEOMETRYCOLLECTION(MULTILINESTRING(), POINT()) +** +** In general, if the subcomponents are homogeneous, return a properly +** typed collection. +** Otherwise, return a generic collection, with the subtypes in minimal +** typed collections. +*/ +static void +lwcollection_build_buffer(const LWCOLLECTION *col, HomogenizeBuffer *buffer) +{ + int i; + + if ( ! col ) return; + if ( lwgeom_is_empty(lwcollection_as_lwgeom(col)) ) return; + for ( i = 0; i < col->ngeoms; i++ ) + { + LWGEOM *geom = col->geoms[i]; + switch(geom->type) + { + case POINTTYPE: + case LINETYPE: + case CIRCSTRINGTYPE: + case COMPOUNDTYPE: + case TRIANGLETYPE: + case CURVEPOLYTYPE: + case POLYGONTYPE: + { + /* Init if necessary */ + if ( ! buffer->buf[geom->type] ) + { + LWCOLLECTION *bufcol = lwcollection_construct_empty(COLLECTIONTYPE, col->srid, FLAGS_GET_Z(col->flags), FLAGS_GET_M(col->flags)); + bufcol->type = lwtype_get_collectiontype(geom->type); + buffer->buf[geom->type] = bufcol; + } + /* Add sub-geom to buffer */ + lwcollection_add_lwgeom(buffer->buf[geom->type], lwgeom_clone(geom)); + /* Increment count for this singleton type */ + buffer->cnt[geom->type] = buffer->cnt[geom->type] + 1; + } + default: + { + lwcollection_build_buffer(lwgeom_as_lwcollection(geom), buffer); + } + } + } + return; +} + +static LWGEOM* +lwcollection_homogenize(const LWCOLLECTION *col) +{ + int i; + int ntypes = 0; + int type = 0; + LWGEOM *outgeom = NULL; + + HomogenizeBuffer buffer; + + /* Sort all the parts into a buffer */ + init_homogenizebuffer(&buffer); + lwcollection_build_buffer(col, &buffer); + + /* Check for homogeneity */ + for ( i = 0; i < NUMTYPES; i++ ) + { + if ( buffer.cnt[i] > 0 ) + { + ntypes++; + type = i; + } + } + + /* No types? Huh. Return empty. */ + if ( ntypes == 0 ) + { + LWCOLLECTION *outcol; + outcol = lwcollection_construct_empty(COLLECTIONTYPE, col->srid, FLAGS_GET_Z(col->flags), FLAGS_GET_M(col->flags)); + outgeom = lwcollection_as_lwgeom(outcol); + } + /* One type, return homogeneous collection */ + else if ( ntypes == 1 ) + { + LWCOLLECTION *outcol; + outcol = buffer.buf[type]; + if ( outcol->ngeoms == 1 ) + { + outgeom = outcol->geoms[0]; + lwfree(outcol); + } + else + { + outgeom = lwcollection_as_lwgeom(outcol); + } + } + /* Bah, more than out type, return anonymous collection */ + else if ( ntypes > 1 ) + { + int j; + LWCOLLECTION *outcol; + outcol = lwcollection_construct_empty(COLLECTIONTYPE, col->srid, FLAGS_GET_Z(col->flags), FLAGS_GET_M(col->flags)); + for ( j = 0; j < NUMTYPES; j++ ) + { + if ( buffer.buf[j] ) + { + LWCOLLECTION *bcol = buffer.buf[j]; + if ( bcol->ngeoms == 1 ) + { + lwcollection_add_lwgeom(outcol, bcol->geoms[0]); + lwfree(bcol); + } + else + { + lwcollection_add_lwgeom(outcol, lwcollection_as_lwgeom(bcol)); + } + } + } + outgeom = lwcollection_as_lwgeom(outcol); + } + + return outgeom; +} + + + + + +/* +** Given a generic geometry, return the "simplest" form. +** +** eg: +** LINESTRING() => LINESTRING() +** +** MULTILINESTRING(with a single line) => LINESTRING() +** +** GEOMETRYCOLLECTION(MULTILINESTRING()) => MULTILINESTRING() +** +** GEOMETRYCOLLECTION(MULTILINESTRING(), MULTILINESTRING(), POINT()) +** => GEOMETRYCOLLECTION(MULTILINESTRING(), POINT()) +*/ +LWGEOM * +lwgeom_homogenize(const LWGEOM *geom) +{ + LWGEOM *hgeom; + + /* EMPTY Geometry */ + if (lwgeom_is_empty(geom)) + { + if( lwgeom_is_collection(geom) ) + { + return lwcollection_as_lwgeom(lwcollection_construct_empty(geom->type, geom->srid, lwgeom_has_z(geom), lwgeom_has_m(geom))); + } + + return lwgeom_clone(geom); + } + + switch (geom->type) + { + + /* Return simple geometries untouched */ + case POINTTYPE: + case LINETYPE: + case CIRCSTRINGTYPE: + case COMPOUNDTYPE: + case TRIANGLETYPE: + case CURVEPOLYTYPE: + case POLYGONTYPE: + return lwgeom_clone(geom); + + /* Process homogeneous geometries lightly */ + case MULTIPOINTTYPE: + case MULTILINETYPE: + case MULTIPOLYGONTYPE: + case MULTICURVETYPE: + case MULTISURFACETYPE: + case POLYHEDRALSURFACETYPE: + case TINTYPE: + { + LWCOLLECTION *col = (LWCOLLECTION*)geom; + + /* Strip single-entry multi-geometries down to singletons */ + if ( col->ngeoms == 1 ) + { + hgeom = lwgeom_clone((LWGEOM*)(col->geoms[0])); + hgeom->srid = geom->srid; + if (geom->bbox) + hgeom->bbox = gbox_copy(geom->bbox); + return hgeom; + } + + /* Return proper multigeometry untouched */ + return lwgeom_clone(geom); + } + + /* Work on anonymous collections separately */ + case COLLECTIONTYPE: + return lwcollection_homogenize((LWCOLLECTION *) geom); + } + + /* Unknown type */ + lwerror("lwgeom_homogenize: Geometry Type not supported (%i)", + lwtype_name(geom->type)); + + return NULL; /* Never get here! */ +} diff -Nru postgis-1.5.3/liblwgeom/lwin_wkb.c postgis-2.0.1/liblwgeom/lwin_wkb.c --- postgis-1.5.3/liblwgeom/lwin_wkb.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwin_wkb.c 2012-05-21 09:36:02.000000000 +0000 @@ -0,0 +1,766 @@ +/********************************************************************** + * + * PostGIS - Spatial Types for PostgreSQL + * + * Copyright (C) 2009 Paul Ramsey + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include "liblwgeom_internal.h" +#include "lwgeom_log.h" + +/** +* Used for passing the parse state between the parsing functions. +*/ +typedef struct +{ + const uint8_t *wkb; /* Points to start of WKB */ + size_t wkb_size; /* Expected size of WKB */ + int swap_bytes; /* Do an endian flip? */ + int check; /* Simple validity checks on geometries */ + uint32_t lwtype; /* Current type we are handling */ + uint32_t srid; /* Current SRID we are handling */ + int has_z; /* Z? */ + int has_m; /* M? */ + int has_srid; /* SRID? */ + const uint8_t *pos; /* Current parse position */ +} wkb_parse_state; + + +/** +* Internal function declarations. +*/ +LWGEOM* lwgeom_from_wkb_state(wkb_parse_state *s); + + + +/**********************************************************************/ + +/* Our static character->number map. Anything > 15 is invalid */ +static uint8_t hex2char[256] = { + /* not Hex characters */ + 20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20, + 20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20, + 20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20, + /* 0-9 */ + 0,1,2,3,4,5,6,7,8,9,20,20,20,20,20,20, + /* A-F */ + 20,10,11,12,13,14,15,20,20,20,20,20,20,20,20,20, + /* not Hex characters */ + 20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20, + /* a-f */ + 20,10,11,12,13,14,15,20,20,20,20,20,20,20,20,20, + 20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20, + /* not Hex characters (upper 128 characters) */ + 20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20, + 20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20, + 20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20, + 20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20, + 20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20, + 20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20, + 20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20, + 20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20 + }; + + +uint8_t* bytes_from_hexbytes(const char *hexbuf, size_t hexsize) +{ + uint8_t *buf = NULL; + register uint8_t h1, h2; + int i; + + if( hexsize % 2 ) + lwerror("Invalid hex string, length (%d) has to be a multiple of two!", hexsize); + + buf = lwalloc(hexsize/2); + + if( ! buf ) + lwerror("Unable to allocate memory buffer."); + + for( i = 0; i < hexsize/2; i++ ) + { + h1 = hex2char[(int)hexbuf[2*i]]; + h2 = hex2char[(int)hexbuf[2*i+1]]; + if( h1 > 15 ) + lwerror("Invalid hex character (%c) encountered", hexbuf[2*i]); + if( h2 > 15 ) + lwerror("Invalid hex character (%c) encountered", hexbuf[2*i+1]); + /* First character is high bits, second is low bits */ + buf[i] = ((h1 & 0x0F) << 4) | (h2 & 0x0F); + } + return buf; +} + + +/**********************************************************************/ + + + + + +/** +* Check that we are not about to read off the end of the WKB +* array. +*/ +static inline void wkb_parse_state_check(wkb_parse_state *s, size_t next) +{ + if( (s->pos + next) > (s->wkb + s->wkb_size) ) + lwerror("WKB structure does not match expected size!"); +} + +/** +* Take in an unknown kind of wkb type number and ensure it comes out +* as an extended WKB type number (with Z/M/SRID flags masked onto the +* high bits). +*/ +static void lwtype_from_wkb_state(wkb_parse_state *s, uint32_t wkb_type) +{ + uint32_t wkb_simple_type; + + LWDEBUG(4, "Entered function"); + + s->has_z = LW_FALSE; + s->has_m = LW_FALSE; + s->has_srid = LW_FALSE; + + /* If any of the higher bits are set, this is probably an extended type. */ + if( wkb_type & 0xF0000000 ) + { + if( wkb_type & WKBZOFFSET ) s->has_z = LW_TRUE; + if( wkb_type & WKBMOFFSET ) s->has_m = LW_TRUE; + if( wkb_type & WKBSRIDFLAG ) s->has_srid = LW_TRUE; + LWDEBUGF(4, "Extended type: has_z=%d has_m=%d has_srid=%d", s->has_z, s->has_m, s->has_srid); + } + + /* Mask off the flags */ + wkb_type = wkb_type & 0x0FFFFFFF; + /* Strip out just the type number (1-12) from the ISO number (eg 3001-3012) */ + wkb_simple_type = wkb_type % 1000; + + /* Extract the Z/M information from ISO style numbers */ + if( wkb_type >= 3000 && wkb_type < 4000 ) + { + s->has_z = LW_TRUE; + s->has_m = LW_TRUE; + } + else if ( wkb_type >= 2000 && wkb_type < 3000 ) + { + s->has_m = LW_TRUE; + } + else if ( wkb_type >= 1000 && wkb_type < 2000 ) + { + s->has_z = LW_TRUE; + } + + switch (wkb_simple_type) + { + case WKB_POINT_TYPE: + s->lwtype = POINTTYPE; + break; + case WKB_LINESTRING_TYPE: + s->lwtype = LINETYPE; + break; + case WKB_POLYGON_TYPE: + s->lwtype = POLYGONTYPE; + break; + case WKB_MULTIPOINT_TYPE: + s->lwtype = MULTIPOINTTYPE; + break; + case WKB_MULTILINESTRING_TYPE: + s->lwtype = MULTILINETYPE; + break; + case WKB_MULTIPOLYGON_TYPE: + s->lwtype = MULTIPOLYGONTYPE; + break; + case WKB_GEOMETRYCOLLECTION_TYPE: + s->lwtype = COLLECTIONTYPE; + break; + case WKB_CIRCULARSTRING_TYPE: + s->lwtype = CIRCSTRINGTYPE; + break; + case WKB_COMPOUNDCURVE_TYPE: + s->lwtype = COMPOUNDTYPE; + break; + case WKB_CURVEPOLYGON_TYPE: + s->lwtype = CURVEPOLYTYPE; + break; + case WKB_MULTICURVE_TYPE: + s->lwtype = MULTICURVETYPE; + break; + case WKB_MULTISURFACE_TYPE: + s->lwtype = MULTISURFACETYPE; + break; + case WKB_POLYHEDRALSURFACE_TYPE: + s->lwtype = POLYHEDRALSURFACETYPE; + break; + case WKB_TIN_TYPE: + s->lwtype = TINTYPE; + break; + case WKB_TRIANGLE_TYPE: + s->lwtype = TRIANGLETYPE; + break; + + /* PostGIS 1.5 emits 13, 14 for CurvePolygon, MultiCurve */ + /* These numbers aren't SQL/MM (numbers currently only */ + /* go up to 12. We can handle the old data here (for now??) */ + /* converting them into the lwtypes that are intended. */ + case WKB_CURVE_TYPE: + s->lwtype = CURVEPOLYTYPE; + break; + case WKB_SURFACE_TYPE: + s->lwtype = MULTICURVETYPE; + break; + + default: /* Error! */ + lwerror("Unknown WKB type (%d)! Full WKB type number was (%d).", wkb_simple_type, wkb_type); + break; + } + + LWDEBUGF(4,"Got lwtype %s (%u)", lwtype_name(s->lwtype), s->lwtype); + + return; +} + +/** +* Byte +* Read a byte and advance the parse state forward. +*/ +static char byte_from_wkb_state(wkb_parse_state *s) +{ + char char_value = 0; + LWDEBUG(4, "Entered function"); + + wkb_parse_state_check(s, WKB_BYTE_SIZE); + LWDEBUG(4, "Passed state check"); + + char_value = s->pos[0]; + LWDEBUGF(4, "Read byte value: %x", char_value); + s->pos += WKB_BYTE_SIZE; + + return char_value; +} + +/** +* Int32 +* Read 4-byte integer and advance the parse state forward. +*/ +static uint32_t integer_from_wkb_state(wkb_parse_state *s) +{ + uint32_t i = 0; + + wkb_parse_state_check(s, WKB_INT_SIZE); + + memcpy(&i, s->pos, WKB_INT_SIZE); + + /* Swap? Copy into a stack-allocated integer. */ + if( s->swap_bytes ) + { + int j = 0; + uint8_t tmp; + + for( j = 0; j < WKB_INT_SIZE/2; j++ ) + { + tmp = ((uint8_t*)(&i))[j]; + ((uint8_t*)(&i))[j] = ((uint8_t*)(&i))[WKB_INT_SIZE - j - 1]; + ((uint8_t*)(&i))[WKB_INT_SIZE - j - 1] = tmp; + } + } + + s->pos += WKB_INT_SIZE; + return i; +} + +/** +* Double +* Read an 8-byte double and advance the parse state forward. +*/ +static double double_from_wkb_state(wkb_parse_state *s) +{ + double d = 0; + + wkb_parse_state_check(s, WKB_DOUBLE_SIZE); + + memcpy(&d, s->pos, WKB_DOUBLE_SIZE); + + /* Swap? Copy into a stack-allocated integer. */ + if( s->swap_bytes ) + { + int i = 0; + uint8_t tmp; + + for( i = 0; i < WKB_DOUBLE_SIZE/2; i++ ) + { + tmp = ((uint8_t*)(&d))[i]; + ((uint8_t*)(&d))[i] = ((uint8_t*)(&d))[WKB_DOUBLE_SIZE - i - 1]; + ((uint8_t*)(&d))[WKB_DOUBLE_SIZE - i - 1] = tmp; + } + + } + + s->pos += WKB_DOUBLE_SIZE; + return d; +} + +/** +* POINTARRAY +* Read a dynamically sized point array and advance the parse state forward. +* First read the number of points, then read the points. +*/ +static POINTARRAY* ptarray_from_wkb_state(wkb_parse_state *s) +{ + POINTARRAY *pa = NULL; + size_t pa_size; + uint32_t ndims = 2; + uint32_t npoints = 0; + + /* Calculate the size of this point array. */ + npoints = integer_from_wkb_state(s); + if( s->has_z ) ndims++; + if( s->has_m ) ndims++; + pa_size = npoints * ndims * WKB_DOUBLE_SIZE; + + /* Empty! */ + if( npoints == 0 ) + return ptarray_construct(s->has_z, s->has_m, npoints); + + /* Does the data we want to read exist? */ + wkb_parse_state_check(s, pa_size); + + /* If we're in a native endianness, we can just copy the data directly! */ + if( ! s->swap_bytes ) + { + pa = ptarray_construct_copy_data(s->has_z, s->has_m, npoints, (uint8_t*)s->pos); + s->pos += pa_size; + } + /* Otherwise we have to read each double, separately. */ + else + { + int i = 0; + double *dlist; + pa = ptarray_construct(s->has_z, s->has_m, npoints); + dlist = (double*)(pa->serialized_pointlist); + for( i = 0; i < npoints * ndims; i++ ) + { + dlist[i] = double_from_wkb_state(s); + } + } + + return pa; +} + +/** +* POINT +* Read a WKB point, starting just after the endian byte, +* type number and optional srid number. +* Advance the parse state forward appropriately. +* WKB point has just a set of doubles, with the quantity depending on the +* dimension of the point, so this looks like a special case of the above +* with only one point. +*/ +static LWPOINT* lwpoint_from_wkb_state(wkb_parse_state *s) +{ + static uint32_t npoints = 1; + POINTARRAY *pa = NULL; + size_t pa_size; + uint32_t ndims = 2; + + /* Count the dimensions. */ + if( s->has_z ) ndims++; + if( s->has_m ) ndims++; + pa_size = ndims * WKB_DOUBLE_SIZE; + + /* Does the data we want to read exist? */ + wkb_parse_state_check(s, pa_size); + + /* If we're in a native endianness, we can just copy the data directly! */ + if( ! s->swap_bytes ) + { + pa = ptarray_construct_copy_data(s->has_z, s->has_m, npoints, (uint8_t*)s->pos); + s->pos += pa_size; + } + /* Otherwise we have to read each double, separately */ + else + { + int i = 0; + double *dlist; + pa = ptarray_construct(s->has_z, s->has_m, npoints); + dlist = (double*)(pa->serialized_pointlist); + for( i = 0; i < ndims; i++ ) + { + dlist[i] = double_from_wkb_state(s); + } + } + + return lwpoint_construct(s->srid, NULL, pa); +} + +/** +* LINESTRING +* Read a WKB linestring, starting just after the endian byte, +* type number and optional srid number. Advance the parse state +* forward appropriately. +* There is only one pointarray in a linestring. Optionally +* check for minimal following of rules (two point minimum). +*/ +static LWLINE* lwline_from_wkb_state(wkb_parse_state *s) +{ + POINTARRAY *pa = ptarray_from_wkb_state(s); + + if( pa == NULL || pa->npoints == 0 ) + return lwline_construct_empty(s->srid, s->has_z, s->has_m); + + if( s->check & LW_PARSER_CHECK_MINPOINTS && pa->npoints < 2 ) + { + lwerror("%s must have at least two points", lwtype_name(s->lwtype)); + return NULL; + } + + return lwline_construct(s->srid, NULL, pa); +} + +/** +* CIRCULARSTRING +* Read a WKB circularstring, starting just after the endian byte, +* type number and optional srid number. Advance the parse state +* forward appropriately. +* There is only one pointarray in a linestring. Optionally +* check for minimal following of rules (three point minimum, +* odd number of points). +*/ +static LWCIRCSTRING* lwcircstring_from_wkb_state(wkb_parse_state *s) +{ + POINTARRAY *pa = ptarray_from_wkb_state(s); + + if( pa == NULL || pa->npoints == 0 ) + return lwcircstring_construct_empty(s->srid, s->has_z, s->has_m); + + if( s->check & LW_PARSER_CHECK_MINPOINTS && pa->npoints < 3 ) + { + lwerror("%s must have at least three points", lwtype_name(s->lwtype)); + return NULL; + } + + if( s->check & LW_PARSER_CHECK_ODD && ! (pa->npoints % 2) ) + { + lwerror("%s must have an odd number of points", lwtype_name(s->lwtype)); + return NULL; + } + + return lwcircstring_construct(s->srid, NULL, pa); +} + +/** +* POLYGON +* Read a WKB polygon, starting just after the endian byte, +* type number and optional srid number. Advance the parse state +* forward appropriately. +* First read the number of rings, then read each ring +* (which are structured as point arrays) +*/ +static LWPOLY* lwpoly_from_wkb_state(wkb_parse_state *s) +{ + uint32_t nrings = integer_from_wkb_state(s); + int i = 0; + LWPOLY *poly = lwpoly_construct_empty(s->srid, s->has_z, s->has_m); + + /* Empty polygon? */ + if( nrings == 0 ) + return poly; + + for( i = 0; i < nrings; i++ ) + { + POINTARRAY *pa = ptarray_from_wkb_state(s); + if( pa == NULL ) + continue; + + /* Check for at least four points. */ + if( s->check & LW_PARSER_CHECK_MINPOINTS && pa->npoints < 4 ) + { + LWDEBUGF(2, "%s must have at least four points in each ring", lwtype_name(s->lwtype)); + lwerror("%s must have at least four points in each ring", lwtype_name(s->lwtype)); + return NULL; + } + + /* Check that first and last points are the same. */ + if( s->check & LW_PARSER_CHECK_CLOSURE && ! ptarray_isclosed2d(pa) ) + { + LWDEBUGF(2, "%s must have closed rings", lwtype_name(s->lwtype)); + lwerror("%s must have closed rings", lwtype_name(s->lwtype)); + return NULL; + } + + /* Add ring to polygon */ + if ( lwpoly_add_ring(poly, pa) == LW_FAILURE ) + { + LWDEBUG(2, "Unable to add ring to polygon"); + lwerror("Unable to add ring to polygon"); + } + + } + return poly; +} + +/** +* TRIANGLE +* Read a WKB triangle, starting just after the endian byte, +* type number and optional srid number. Advance the parse state +* forward appropriately. +* Triangles are encoded like polygons in WKB, but more like linestrings +* as lwgeometries. +*/ +static LWTRIANGLE* lwtriangle_from_wkb_state(wkb_parse_state *s) +{ + uint32_t nrings = integer_from_wkb_state(s); + LWTRIANGLE *tri = lwtriangle_construct_empty(s->srid, s->has_z, s->has_m); + POINTARRAY *pa = NULL; + + /* Empty triangle? */ + if( nrings == 0 ) + return tri; + + /* Should be only one ring. */ + if ( nrings != 1 ) + lwerror("Triangle has wrong number of rings: %d", nrings); + + /* There's only one ring, we hope? */ + pa = ptarray_from_wkb_state(s); + + /* If there's no points, return an empty triangle. */ + if( pa == NULL ) + return tri; + + /* Check for at least four points. */ + if( s->check & LW_PARSER_CHECK_MINPOINTS && pa->npoints < 4 ) + { + LWDEBUGF(2, "%s must have at least four points", lwtype_name(s->lwtype)); + lwerror("%s must have at least four points", lwtype_name(s->lwtype)); + return NULL; + } + + if( s->check & LW_PARSER_CHECK_CLOSURE && ! ptarray_isclosed(pa) ) + { + lwerror("%s must have closed rings", lwtype_name(s->lwtype)); + return NULL; + } + + if( s->check & LW_PARSER_CHECK_ZCLOSURE && ! ptarray_isclosedz(pa) ) + { + lwerror("%s must have closed rings", lwtype_name(s->lwtype)); + return NULL; + } + + tri->points = pa; + return tri; +} + +/** +* CURVEPOLYTYPE +*/ +static LWCURVEPOLY* lwcurvepoly_from_wkb_state(wkb_parse_state *s) +{ + uint32_t ngeoms = integer_from_wkb_state(s); + LWCURVEPOLY *cp = lwcurvepoly_construct_empty(s->srid, s->has_z, s->has_m); + LWGEOM *geom = NULL; + int i; + + /* Empty collection? */ + if ( ngeoms == 0 ) + return cp; + + for ( i = 0; i < ngeoms; i++ ) + { + geom = lwgeom_from_wkb_state(s); + if ( lwcurvepoly_add_ring(cp, geom) == LW_FAILURE ) + lwerror("Unable to add geometry (%p) to curvepoly (%p)", geom, cp); + } + + return cp; +} + +/** +* POLYHEDRALSURFACETYPE +*/ + +/** +* COLLECTION, MULTIPOINTTYPE, MULTILINETYPE, MULTIPOLYGONTYPE, COMPOUNDTYPE, +* MULTICURVETYPE, MULTISURFACETYPE, +* TINTYPE +*/ +static LWCOLLECTION* lwcollection_from_wkb_state(wkb_parse_state *s) +{ + uint32_t ngeoms = integer_from_wkb_state(s); + LWCOLLECTION *col = lwcollection_construct_empty(s->lwtype, s->srid, s->has_z, s->has_m); + LWGEOM *geom = NULL; + int i; + + /* Empty collection? */ + if ( ngeoms == 0 ) + return col; + + /* Be strict in polyhedral surface closures */ + if ( s->lwtype == POLYHEDRALSURFACETYPE ) + s->check |= LW_PARSER_CHECK_ZCLOSURE; + + for ( i = 0; i < ngeoms; i++ ) + { + geom = lwgeom_from_wkb_state(s); + if ( lwcollection_add_lwgeom(col, geom) == NULL ) + { + lwerror("Unable to add geometry (%p) to collection (%p)", geom, col); + return NULL; + } + } + + return col; +} + + +/** +* GEOMETRY +* Generic handling for WKB geometries. The front of every WKB geometry +* (including those embedded in collections) is an endian byte, a type +* number and an optional srid number. We handle all those here, then pass +* to the appropriate handler for the specific type. +*/ +LWGEOM* lwgeom_from_wkb_state(wkb_parse_state *s) +{ + char wkb_little_endian; + uint32_t wkb_type; + + LWDEBUG(4,"Entered function"); + + /* Fail when handed incorrect starting byte */ + wkb_little_endian = byte_from_wkb_state(s); + if( wkb_little_endian != 1 && wkb_little_endian != 0 ) + { + LWDEBUG(4,"Leaving due to bad first byte!"); + lwerror("Invalid endian flag value encountered."); + return NULL; + } + + /* Check the endianness of our input */ + s->swap_bytes = LW_FALSE; + if( getMachineEndian() == NDR ) /* Machine arch is little */ + { + if ( ! wkb_little_endian ) /* Data is big! */ + s->swap_bytes = LW_TRUE; + } + else /* Machine arch is big */ + { + if ( wkb_little_endian ) /* Data is little! */ + s->swap_bytes = LW_TRUE; + } + + /* Read the type number */ + wkb_type = integer_from_wkb_state(s); + LWDEBUGF(4,"Got WKB type number: 0x%X", wkb_type); + lwtype_from_wkb_state(s, wkb_type); + + /* Read the SRID, if necessary */ + if( s->has_srid ) + { + s->srid = clamp_srid(integer_from_wkb_state(s)); + /* TODO: warn on explicit UNKNOWN srid ? */ + LWDEBUGF(4,"Got SRID: %u", s->srid); + } + + /* Do the right thing */ + switch( s->lwtype ) + { + case POINTTYPE: + return (LWGEOM*)lwpoint_from_wkb_state(s); + break; + case LINETYPE: + return (LWGEOM*)lwline_from_wkb_state(s); + break; + case CIRCSTRINGTYPE: + return (LWGEOM*)lwcircstring_from_wkb_state(s); + break; + case POLYGONTYPE: + return (LWGEOM*)lwpoly_from_wkb_state(s); + break; + case TRIANGLETYPE: + return (LWGEOM*)lwtriangle_from_wkb_state(s); + break; + case CURVEPOLYTYPE: + return (LWGEOM*)lwcurvepoly_from_wkb_state(s); + break; + case MULTIPOINTTYPE: + case MULTILINETYPE: + case MULTIPOLYGONTYPE: + case COMPOUNDTYPE: + case MULTICURVETYPE: + case MULTISURFACETYPE: + case POLYHEDRALSURFACETYPE: + case TINTYPE: + case COLLECTIONTYPE: + return (LWGEOM*)lwcollection_from_wkb_state(s); + break; + + /* Unknown type! */ + default: + lwerror("Unsupported geometry type: %s [%d]", lwtype_name(s->lwtype), s->lwtype); + } + + /* Return value to keep compiler happy. */ + return NULL; + +} + +/* TODO add check for SRID consistency */ + +/** +* WKB inputs *must* have a declared size, to prevent malformed WKB from reading +* off the end of the memory segment (this stops a malevolent user from declaring +* a one-ring polygon to have 10 rings, causing the WKB reader to walk off the +* end of the memory). +* +* Check is a bitmask of: LW_PARSER_CHECK_MINPOINTS, LW_PARSER_CHECK_ODD, +* LW_PARSER_CHECK_CLOSURE, LW_PARSER_CHECK_NONE, LW_PARSER_CHECK_ALL +*/ +LWGEOM* lwgeom_from_wkb(const uint8_t *wkb, const size_t wkb_size, const char check) +{ + wkb_parse_state s; + + /* Initialize the state appropriately */ + s.wkb = wkb; + s.wkb_size = wkb_size; + s.swap_bytes = LW_FALSE; + s.check = check; + s.lwtype = 0; + s.srid = SRID_UNKNOWN; + s.has_z = LW_FALSE; + s.has_m = LW_FALSE; + s.has_srid = LW_FALSE; + s.pos = wkb; + + /* Hand the check catch-all values */ + if ( check & LW_PARSER_CHECK_NONE ) + s.check = 0; + else + s.check = check; + + return lwgeom_from_wkb_state(&s); +} + +LWGEOM* lwgeom_from_hexwkb(const char *hexwkb, const char check) +{ + int hexwkb_len; + uint8_t *wkb; + LWGEOM *lwgeom; + + if ( ! hexwkb ) + { + lwerror("lwgeom_from_hexwkb: null input"); + return NULL; + } + + hexwkb_len = strlen(hexwkb); + wkb = bytes_from_hexbytes(hexwkb, hexwkb_len); + lwgeom = lwgeom_from_wkb(wkb, hexwkb_len/2, check); + lwfree(wkb); + return lwgeom; +} diff -Nru postgis-1.5.3/liblwgeom/lwin_wkt.c postgis-2.0.1/liblwgeom/lwin_wkt.c --- postgis-1.5.3/liblwgeom/lwin_wkt.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwin_wkt.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,848 @@ +/********************************************************************** + * + * PostGIS - Spatial Types for PostgreSQL + * + * Copyright (C) 2010 Paul Ramsey + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include +#include /* for isspace */ + +#include "lwin_wkt.h" +#include "lwin_wkt_parse.h" +#include "lwgeom_log.h" + + +/* +* Error messages for failures in the parser. +*/ +const char *parser_error_messages[] = +{ + "", + "geometry requires more points", + "geometry must have an odd number of points", + "geometry contains non-closed rings", + "can not mix dimensionality in a geometry", + "parse error - invalid geometry", + "invalid WKB type", + "incontinuous compound curve", + "triangle must have exactly 4 points", + "geometry has too many points", + "parse error - invalid geometry" +}; + +#define SET_PARSER_ERROR(errno) { \ + global_parser_result.message = parser_error_messages[(errno)]; \ + global_parser_result.errcode = (errno); \ + global_parser_result.errlocation = wkt_yylloc.last_column; \ + } + +/** +* Read the SRID number from an SRID=<> string +*/ +int wkt_lexer_read_srid(char *str) +{ + char *c = str; + long i = 0; + int srid; + + if( ! str ) return SRID_UNKNOWN; + c += 5; /* Advance past "SRID=" */ + i = strtol(c, NULL, 10); + srid = clamp_srid((int)i); + /* TODO: warn on explicit UNKNOWN srid ? */ + return srid; +}; + +static uint8_t wkt_dimensionality(char *dimensionality) +{ + int i = 0; + uint8_t flags = 0; + + if( ! dimensionality ) + return flags; + + /* If there's an explicit dimensionality, we use that */ + for( i = 0; i < strlen(dimensionality); i++ ) + { + if( (dimensionality[i] == 'Z') || (dimensionality[i] == 'z') ) + FLAGS_SET_Z(flags,1); + else if( (dimensionality[i] == 'M') || (dimensionality[i] == 'm') ) + FLAGS_SET_M(flags,1); + /* only a space is accepted in between */ + else if( ! isspace(dimensionality[i]) ) break; + } + return flags; +} + + +/** +* Force the dimensionality of a geometry to match the dimensionality +* of a set of flags (usually derived from a ZM WKT tag). +*/ +static int wkt_parser_set_dims(LWGEOM *geom, uint8_t flags) +{ + int hasz = FLAGS_GET_Z(flags); + int hasm = FLAGS_GET_M(flags); + int i = 0; + + /* Error on junk */ + if( ! geom ) + return LW_FAILURE; + + FLAGS_SET_Z(geom->flags, hasz); + FLAGS_SET_M(geom->flags, hasm); + + if( ! lwgeom_is_empty(geom) ) + { + if( geom->type == POINTTYPE ) + { + LWPOINT *pt = (LWPOINT*)geom; + FLAGS_SET_Z(pt->point->flags, hasz); + FLAGS_SET_M(pt->point->flags, hasm); + return LW_SUCCESS; + } + else if ( (geom->type == TRIANGLETYPE) || + (geom->type == CIRCSTRINGTYPE) || + (geom->type == LINETYPE) ) + { + LWLINE *ln = (LWLINE*)geom; + FLAGS_SET_Z(ln->points->flags, hasz); + FLAGS_SET_M(ln->points->flags, hasm); + return LW_SUCCESS; + } + else if ( geom->type == POLYGONTYPE ) + { + LWPOLY *poly = (LWPOLY*)geom; + for ( i = 0; i < poly->nrings; i++ ) + { + FLAGS_SET_Z(poly->rings[i]->flags, hasz); + FLAGS_SET_M(poly->rings[i]->flags, hasm); + } + return LW_SUCCESS; + } + else if ( geom->type == CURVEPOLYTYPE ) + { + LWCURVEPOLY *poly = (LWCURVEPOLY*)geom; + for ( i = 0; i < poly->nrings; i++ ) + wkt_parser_set_dims(poly->rings[i], flags); + return LW_SUCCESS; + } + else if ( lwtype_is_collection(geom->type) ) + { + LWCOLLECTION *col = (LWCOLLECTION*)geom; + for ( i = 0; i < col->ngeoms; i++ ) + wkt_parser_set_dims(col->geoms[i], flags); + return LW_SUCCESS; + } + else + { + LWDEBUGF(2,"Unknown geometry type: %d", geom->type); + return LW_FAILURE; + } + } + return LW_SUCCESS; +} + +/** +* Read the dimensionality from a flag, if provided. Then check that the +* dimensionality matches that of the pointarray. If the dimension counts +* match, ensure the pointarray is using the right "Z" or "M". +*/ +static int wkt_pointarray_dimensionality(POINTARRAY *pa, uint8_t flags) +{ + int hasz = FLAGS_GET_Z(flags); + int hasm = FLAGS_GET_M(flags); + int ndims = 2 + hasz + hasm; + + /* No dimensionality or array means we go with what we have */ + if( ! (flags && pa) ) + return LW_TRUE; + + LWDEBUGF(5,"dimensionality ndims == %d", ndims); + LWDEBUGF(5,"FLAGS_NDIMS(pa->flags) == %d", FLAGS_NDIMS(pa->flags)); + + /* + * ndims > 2 implies that the flags have something useful to add, + * that there is a 'Z' or an 'M' or both. + */ + if( ndims > 2 ) + { + /* Mismatch implies a problem */ + if ( FLAGS_NDIMS(pa->flags) != ndims ) + return LW_FALSE; + /* Match means use the explicit dimensionality */ + else + { + FLAGS_SET_Z(pa->flags, hasz); + FLAGS_SET_M(pa->flags, hasm); + } + } + + return LW_TRUE; +} + + + +/** +* Build a 2d coordinate. +*/ +POINT wkt_parser_coord_2(double c1, double c2) +{ + POINT p; + p.flags = 0; + p.x = c1; + p.y = c2; + p.z = p.m = 0.0; + FLAGS_SET_Z(p.flags, 0); + FLAGS_SET_M(p.flags, 0); + return p; +}; + +/** +* Note, if this is an XYM coordinate we'll have to fix it later when we build +* the object itself and have access to the dimensionality token. +*/ +POINT wkt_parser_coord_3(double c1, double c2, double c3) +{ + POINT p; + p.flags = 0; + p.x = c1; + p.y = c2; + p.z = c3; + p.m = 0; + FLAGS_SET_Z(p.flags, 1); + FLAGS_SET_M(p.flags, 0); + return p; +}; + +/** +*/ +POINT wkt_parser_coord_4(double c1, double c2, double c3, double c4) +{ + POINT p; + p.flags = 0; + p.x = c1; + p.y = c2; + p.z = c3; + p.m = c4; + FLAGS_SET_Z(p.flags, 1); + FLAGS_SET_M(p.flags, 1); + return p; +}; + +POINTARRAY* wkt_parser_ptarray_add_coord(POINTARRAY *pa, POINT p) +{ + POINT4D pt; + LWDEBUG(4,"entered"); + + /* Error on trouble */ + if( ! pa ) + { + SET_PARSER_ERROR(PARSER_ERROR_OTHER); + return NULL; + } + + /* Check that the coordinate has the same dimesionality as the array */ + if( FLAGS_NDIMS(p.flags) != FLAGS_NDIMS(pa->flags) ) + { + ptarray_free(pa); + SET_PARSER_ERROR(PARSER_ERROR_MIXDIMS); + return NULL; + } + + /* While parsing the point arrays, XYM and XMZ points are both treated as XYZ */ + pt.x = p.x; + pt.y = p.y; + if( FLAGS_GET_Z(pa->flags) ) + pt.z = p.z; + if( FLAGS_GET_M(pa->flags) ) + pt.m = p.m; + /* If the destination is XYM, we'll write the third coordinate to m */ + if( FLAGS_GET_M(pa->flags) && ! FLAGS_GET_Z(pa->flags) ) + pt.m = p.z; + + ptarray_append_point(pa, &pt, LW_TRUE); /* Allow duplicate points in array */ + return pa; +} + +/** +* Start a point array from the first coordinate. +*/ +POINTARRAY* wkt_parser_ptarray_new(POINT p) +{ + int ndims = FLAGS_NDIMS(p.flags); + LWDEBUG(4,"entered"); + POINTARRAY *pa = ptarray_construct_empty((ndims>2), (ndims>3), 4); + if ( ! pa ) + { + SET_PARSER_ERROR(PARSER_ERROR_OTHER); + return NULL; + } + return wkt_parser_ptarray_add_coord(pa, p); +} + +/** +* Create a new point. Null point array implies empty. Null dimensionality +* implies no specified dimensionality in the WKT. +*/ +LWGEOM* wkt_parser_point_new(POINTARRAY *pa, char *dimensionality) +{ + uint8_t flags = wkt_dimensionality(dimensionality); + LWDEBUG(4,"entered"); + + /* No pointarray means it is empty */ + if( ! pa ) + return lwpoint_as_lwgeom(lwpoint_construct_empty(SRID_UNKNOWN, FLAGS_GET_Z(flags), FLAGS_GET_M(flags))); + + /* If the number of dimensions is not consistent, we have a problem. */ + if( wkt_pointarray_dimensionality(pa, flags) == LW_FALSE ) + { + ptarray_free(pa); + SET_PARSER_ERROR(PARSER_ERROR_MIXDIMS); + return NULL; + } + + /* Only one point allowed in our point array! */ + if( pa->npoints != 1 ) + { + ptarray_free(pa); + SET_PARSER_ERROR(PARSER_ERROR_LESSPOINTS); + return NULL; + } + + return lwpoint_as_lwgeom(lwpoint_construct(SRID_UNKNOWN, NULL, pa)); +} + + +/** +* Create a new linestring. Null point array implies empty. Null dimensionality +* implies no specified dimensionality in the WKT. Check for numpoints >= 2 if +* requested. +*/ +LWGEOM* wkt_parser_linestring_new(POINTARRAY *pa, char *dimensionality) +{ + uint8_t flags = wkt_dimensionality(dimensionality); + LWDEBUG(4,"entered"); + + /* No pointarray means it is empty */ + if( ! pa ) + return lwline_as_lwgeom(lwline_construct_empty(SRID_UNKNOWN, FLAGS_GET_Z(flags), FLAGS_GET_M(flags))); + + /* If the number of dimensions is not consistent, we have a problem. */ + if( wkt_pointarray_dimensionality(pa, flags) == LW_FALSE ) + { + ptarray_free(pa); + SET_PARSER_ERROR(PARSER_ERROR_MIXDIMS); + return NULL; + } + + /* Apply check for not enough points, if requested. */ + if( (global_parser_result.parser_check_flags & LW_PARSER_CHECK_MINPOINTS) && (pa->npoints < 2) ) + { + ptarray_free(pa); + SET_PARSER_ERROR(PARSER_ERROR_MOREPOINTS); + return NULL; + } + + return lwline_as_lwgeom(lwline_construct(SRID_UNKNOWN, NULL, pa)); +} + +/** +* Create a new circularstring. Null point array implies empty. Null dimensionality +* implies no specified dimensionality in the WKT. +* Circular strings are just like linestrings, except with slighty different +* validity rules (minpoint == 3, numpoints % 2 == 1). +*/ +LWGEOM* wkt_parser_circularstring_new(POINTARRAY *pa, char *dimensionality) +{ + uint8_t flags = wkt_dimensionality(dimensionality); + LWDEBUG(4,"entered"); + + /* No pointarray means it is empty */ + if( ! pa ) + return lwcircstring_as_lwgeom(lwcircstring_construct_empty(SRID_UNKNOWN, FLAGS_GET_Z(flags), FLAGS_GET_M(flags))); + + /* If the number of dimensions is not consistent, we have a problem. */ + if( wkt_pointarray_dimensionality(pa, flags) == LW_FALSE ) + { + ptarray_free(pa); + SET_PARSER_ERROR(PARSER_ERROR_MIXDIMS); + return NULL; + } + + /* Apply check for not enough points, if requested. */ + if( (global_parser_result.parser_check_flags & LW_PARSER_CHECK_MINPOINTS) && (pa->npoints < 3) ) + { + ptarray_free(pa); + SET_PARSER_ERROR(PARSER_ERROR_MOREPOINTS); + return NULL; + } + + /* Apply check for odd number of points, if requested. */ + if( (global_parser_result.parser_check_flags & LW_PARSER_CHECK_ODD) && ((pa->npoints % 2) == 0) ) + { + ptarray_free(pa); + SET_PARSER_ERROR(PARSER_ERROR_ODDPOINTS); + return NULL; + } + + return lwcircstring_as_lwgeom(lwcircstring_construct(SRID_UNKNOWN, NULL, pa)); +} + +LWGEOM* wkt_parser_triangle_new(POINTARRAY *pa, char *dimensionality) +{ + uint8_t flags = wkt_dimensionality(dimensionality); + LWDEBUG(4,"entered"); + + /* No pointarray means it is empty */ + if( ! pa ) + return lwtriangle_as_lwgeom(lwtriangle_construct_empty(SRID_UNKNOWN, FLAGS_GET_Z(flags), FLAGS_GET_M(flags))); + + /* If the number of dimensions is not consistent, we have a problem. */ + if( wkt_pointarray_dimensionality(pa, flags) == LW_FALSE ) + { + ptarray_free(pa); + SET_PARSER_ERROR(PARSER_ERROR_MIXDIMS); + return NULL; + } + + /* Triangles need four points. */ + if( (pa->npoints != 4) ) + { + ptarray_free(pa); + SET_PARSER_ERROR(PARSER_ERROR_TRIANGLEPOINTS); + return NULL; + } + + /* Triangles need closure. */ + if( ! ptarray_isclosed(pa) ) + { + ptarray_free(pa); + SET_PARSER_ERROR(PARSER_ERROR_UNCLOSED); + return NULL; + } + + return lwtriangle_as_lwgeom(lwtriangle_construct(SRID_UNKNOWN, NULL, pa)); +} + +LWGEOM* wkt_parser_polygon_new(POINTARRAY *pa, char dimcheck) +{ + LWPOLY *poly = NULL; + LWDEBUG(4,"entered"); + + /* No pointarray is a problem */ + if( ! pa ) + { + SET_PARSER_ERROR(PARSER_ERROR_OTHER); + return NULL; + } + + poly = lwpoly_construct_empty(SRID_UNKNOWN, FLAGS_GET_Z(pa->flags), FLAGS_GET_M(pa->flags)); + + /* Error out if we can't build this polygon. */ + if( ! poly ) + { + SET_PARSER_ERROR(PARSER_ERROR_OTHER); + return NULL; + } + + wkt_parser_polygon_add_ring(lwpoly_as_lwgeom(poly), pa, dimcheck); + return lwpoly_as_lwgeom(poly); +} + +LWGEOM* wkt_parser_polygon_add_ring(LWGEOM *poly, POINTARRAY *pa, char dimcheck) +{ + LWDEBUG(4,"entered"); + + /* Bad inputs are a problem */ + if( ! (pa && poly) ) + { + SET_PARSER_ERROR(PARSER_ERROR_OTHER); + return NULL; + } + + /* Rings must agree on dimensionality */ + if( FLAGS_NDIMS(poly->flags) != FLAGS_NDIMS(pa->flags) ) + { + ptarray_free(pa); + lwgeom_free(poly); + SET_PARSER_ERROR(PARSER_ERROR_MIXDIMS); + return NULL; + } + + /* Apply check for minimum number of points, if requested. */ + if( (global_parser_result.parser_check_flags & LW_PARSER_CHECK_MINPOINTS) && (pa->npoints < 4) ) + { + ptarray_free(pa); + lwgeom_free(poly); + SET_PARSER_ERROR(PARSER_ERROR_MOREPOINTS); + return NULL; + } + + /* Apply check for not closed rings, if requested. */ + if( (global_parser_result.parser_check_flags & LW_PARSER_CHECK_CLOSURE) && + ! (dimcheck == 'Z' ? ptarray_isclosedz(pa) : ptarray_isclosed2d(pa)) ) + { + ptarray_free(pa); + lwgeom_free(poly); + SET_PARSER_ERROR(PARSER_ERROR_UNCLOSED); + return NULL; + } + + /* If something goes wrong adding a ring, error out. */ + if ( LW_FAILURE == lwpoly_add_ring(lwgeom_as_lwpoly(poly), pa) ) + { + ptarray_free(pa); + lwgeom_free(poly); + SET_PARSER_ERROR(PARSER_ERROR_OTHER); + return NULL; + } + return poly; +} + +LWGEOM* wkt_parser_polygon_finalize(LWGEOM *poly, char *dimensionality) +{ + uint8_t flags = wkt_dimensionality(dimensionality); + int flagdims = FLAGS_NDIMS(flags); + LWDEBUG(4,"entered"); + + /* Null input implies empty return */ + if( ! poly ) + return lwpoly_as_lwgeom(lwpoly_construct_empty(SRID_UNKNOWN, FLAGS_GET_Z(flags), FLAGS_GET_M(flags))); + + /* If the number of dimensions are not consistent, we have a problem. */ + if( flagdims > 2 ) + { + if ( flagdims != FLAGS_NDIMS(poly->flags) ) + { + lwgeom_free(poly); + SET_PARSER_ERROR(PARSER_ERROR_MIXDIMS); + return NULL; + } + + /* Harmonize the flags in the sub-components with the wkt flags */ + if( LW_FAILURE == wkt_parser_set_dims(poly, flags) ) + { + lwgeom_free(poly); + SET_PARSER_ERROR(PARSER_ERROR_OTHER); + return NULL; + } + } + + return poly; +} + +LWGEOM* wkt_parser_curvepolygon_new(LWGEOM *ring) +{ + LWGEOM *poly; + LWDEBUG(4,"entered"); + + /* Toss error on null geometry input */ + if( ! ring ) + { + SET_PARSER_ERROR(PARSER_ERROR_OTHER); + return NULL; + } + + /* Construct poly and add the ring. */ + poly = lwcurvepoly_as_lwgeom(lwcurvepoly_construct_empty(SRID_UNKNOWN, FLAGS_GET_Z(ring->flags), FLAGS_GET_M(ring->flags))); + /* Return the result. */ + return wkt_parser_curvepolygon_add_ring(poly,ring); +} + +LWGEOM* wkt_parser_curvepolygon_add_ring(LWGEOM *poly, LWGEOM *ring) +{ + LWDEBUG(4,"entered"); + + /* Toss error on null input */ + if( ! (ring && poly) ) + { + SET_PARSER_ERROR(PARSER_ERROR_OTHER); + LWDEBUG(4,"inputs are null"); + return NULL; + } + + /* All the elements must agree on dimensionality */ + if( FLAGS_NDIMS(poly->flags) != FLAGS_NDIMS(ring->flags) ) + { + LWDEBUG(4,"dimensionality does not match"); + lwgeom_free(ring); + lwgeom_free(poly); + SET_PARSER_ERROR(PARSER_ERROR_MIXDIMS); + return NULL; + } + + /* Apply check for minimum number of points, if requested. */ + if( (global_parser_result.parser_check_flags & LW_PARSER_CHECK_MINPOINTS) ) + { + int vertices_needed = 3; + + if ( ring->type == LINETYPE ) + vertices_needed = 4; + + if (lwgeom_count_vertices(ring) < vertices_needed) + { + LWDEBUG(4,"number of points is incorrect"); + lwgeom_free(ring); + lwgeom_free(poly); + SET_PARSER_ERROR(PARSER_ERROR_MOREPOINTS); + return NULL; + } + } + + /* Apply check for not closed rings, if requested. */ + if( (global_parser_result.parser_check_flags & LW_PARSER_CHECK_CLOSURE) ) + { + int is_closed = 1; + LWDEBUG(4,"checking ring closure"); + switch ( ring->type ) + { + case LINETYPE: + is_closed = lwline_is_closed(lwgeom_as_lwline(ring)); + break; + + case CIRCSTRINGTYPE: + is_closed = lwcircstring_is_closed(lwgeom_as_lwcircstring(ring)); + break; + + case COMPOUNDTYPE: + is_closed = lwcompound_is_closed(lwgeom_as_lwcompound(ring)); + break; + } + if ( ! is_closed ) + { + LWDEBUG(4,"ring is not closed"); + lwgeom_free(ring); + lwgeom_free(poly); + SET_PARSER_ERROR(PARSER_ERROR_UNCLOSED); + return NULL; + } + } + + if( LW_FAILURE == lwcurvepoly_add_ring(lwgeom_as_lwcurvepoly(poly), ring) ) + { + LWDEBUG(4,"failed to add ring"); + lwgeom_free(ring); + lwgeom_free(poly); + SET_PARSER_ERROR(PARSER_ERROR_OTHER); + return NULL; + } + + return poly; +} + +LWGEOM* wkt_parser_curvepolygon_finalize(LWGEOM *poly, char *dimensionality) +{ + uint8_t flags = wkt_dimensionality(dimensionality); + int flagdims = FLAGS_NDIMS(flags); + LWDEBUG(4,"entered"); + + /* Null input implies empty return */ + if( ! poly ) + return lwcurvepoly_as_lwgeom(lwcurvepoly_construct_empty(SRID_UNKNOWN, FLAGS_GET_Z(flags), FLAGS_GET_M(flags))); + + if ( flagdims > 2 ) + { + /* If the number of dimensions are not consistent, we have a problem. */ + if( flagdims != FLAGS_NDIMS(poly->flags) ) + { + lwgeom_free(poly); + SET_PARSER_ERROR(PARSER_ERROR_MIXDIMS); + return NULL; + } + + /* Harmonize the flags in the sub-components with the wkt flags */ + if( LW_FAILURE == wkt_parser_set_dims(poly, flags) ) + { + lwgeom_free(poly); + SET_PARSER_ERROR(PARSER_ERROR_OTHER); + return NULL; + } + } + + return poly; +} + +LWGEOM* wkt_parser_collection_new(LWGEOM *geom) +{ + LWCOLLECTION *col; + LWGEOM **geoms; + static int ngeoms = 1; + LWDEBUG(4,"entered"); + + /* Toss error on null geometry input */ + if( ! geom ) + { + SET_PARSER_ERROR(PARSER_ERROR_OTHER); + return NULL; + } + + /* Create our geometry array */ + geoms = lwalloc(sizeof(LWGEOM*) * ngeoms); + geoms[0] = geom; + + /* Make a new collection */ + col = lwcollection_construct(COLLECTIONTYPE, SRID_UNKNOWN, NULL, ngeoms, geoms); + + /* Return the result. */ + return lwcollection_as_lwgeom(col); +} + + +LWGEOM* wkt_parser_compound_add_geom(LWGEOM *col, LWGEOM *geom) +{ + LWDEBUG(4,"entered"); + + /* Toss error on null geometry input */ + if( ! (geom && col) ) + { + SET_PARSER_ERROR(PARSER_ERROR_OTHER); + return NULL; + } + + /* All the elements must agree on dimensionality */ + if( FLAGS_NDIMS(col->flags) != FLAGS_NDIMS(geom->flags) ) + { + lwgeom_free(col); + lwgeom_free(geom); + SET_PARSER_ERROR(PARSER_ERROR_MIXDIMS); + return NULL; + } + + if( LW_FAILURE == lwcompound_add_lwgeom((LWCOMPOUND*)col, geom) ) + { + lwgeom_free(col); + lwgeom_free(geom); + SET_PARSER_ERROR(PARSER_ERROR_INCONTINUOUS); + return NULL; + } + + return col; +} + + +LWGEOM* wkt_parser_collection_add_geom(LWGEOM *col, LWGEOM *geom) +{ + LWDEBUG(4,"entered"); + + /* Toss error on null geometry input */ + if( ! (geom && col) ) + { + SET_PARSER_ERROR(PARSER_ERROR_OTHER); + return NULL; + } + + /* All the elements must agree on dimensionality */ + if( FLAGS_NDIMS(col->flags) != FLAGS_NDIMS(geom->flags) ) + { + lwgeom_free(col); + lwgeom_free(geom); + SET_PARSER_ERROR(PARSER_ERROR_MIXDIMS); + return NULL; + } + + return lwcollection_as_lwgeom(lwcollection_add_lwgeom(lwgeom_as_lwcollection(col), geom)); +} + +LWGEOM* wkt_parser_collection_finalize(int lwtype, LWGEOM *col, char *dimensionality) +{ + uint8_t flags = wkt_dimensionality(dimensionality); + int flagdims = FLAGS_NDIMS(flags); + + /* No geometry means it is empty */ + if( ! col ) + { + return lwcollection_as_lwgeom(lwcollection_construct_empty(lwtype, SRID_UNKNOWN, FLAGS_GET_Z(flags), FLAGS_GET_M(flags))); + } + + /* There are 'Z' or 'M' tokens in the signature */ + if ( flagdims > 2 ) + { + /* If the number of dimensions are not consistent, we have a problem. */ + if( flagdims != FLAGS_NDIMS(col->flags) ) + { + lwgeom_free(col); + SET_PARSER_ERROR(PARSER_ERROR_MIXDIMS); + return NULL; + } + + /* For GEOMETRYCOLLECTION, the exact type of the dimensions must match too */ + if( lwtype == COLLECTIONTYPE && + ( (FLAGS_GET_Z(flags) != FLAGS_GET_Z(col->flags)) || + (FLAGS_GET_M(flags) != FLAGS_GET_M(col->flags)) ) ) + { + lwgeom_free(col); + SET_PARSER_ERROR(PARSER_ERROR_MIXDIMS); + return NULL; + } + + /* Harmonize the collection dimensionality */ + if( LW_FAILURE == wkt_parser_set_dims(col, flags) ) + { + lwgeom_free(col); + SET_PARSER_ERROR(PARSER_ERROR_OTHER); + return NULL; + } + } + + /* Set the collection type */ + col->type=lwtype; + + return col; +} + +void wkt_parser_geometry_new(LWGEOM *geom, int srid) +{ + LWDEBUG(4,"entered"); + LWDEBUGF(4,"geom %p",geom); + LWDEBUGF(4,"srid %d",srid); + + if ( geom == NULL ) + { + lwerror("Parsed geometry is null!"); + return; + } + + if ( srid != SRID_UNKNOWN && srid < SRID_MAXIMUM ) + lwgeom_set_srid(geom, srid); + else + lwgeom_set_srid(geom, SRID_UNKNOWN); + + global_parser_result.geom = geom; +} + +void lwgeom_parser_result_init(LWGEOM_PARSER_RESULT *parser_result) +{ + memset(parser_result, 0, sizeof(LWGEOM_PARSER_RESULT)); +} + + +void lwgeom_parser_result_free(LWGEOM_PARSER_RESULT *parser_result) +{ + if ( parser_result->geom ) + lwgeom_free(parser_result->geom); + if ( parser_result->serialized_lwgeom ) + lwfree(parser_result->serialized_lwgeom ); + /* We don't free parser_result->message because + it is a const *char */ +} + +/* +* Public function used for easy access to the parser. +*/ +LWGEOM *lwgeom_from_wkt(const char *wkt, const char check) +{ + LWGEOM_PARSER_RESULT r; + + if( LW_FAILURE == lwgeom_parse_wkt(&r, (char*)wkt, check) ) + lwerror(r.message); + + return r.geom; +} + + diff -Nru postgis-1.5.3/liblwgeom/lwin_wkt.h postgis-2.0.1/liblwgeom/lwin_wkt.h --- postgis-1.5.3/liblwgeom/lwin_wkt.h 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwin_wkt.h 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,56 @@ +#include "liblwgeom_internal.h" + + + +/* +* Coordinate object to hold information about last coordinate temporarily. +* We need to know how many dimensions there are at any given time. +*/ +typedef struct +{ + uint8_t flags; + double x; + double y; + double z; + double m; +} +POINT; + +/* +* Global that holds the final output geometry for the WKT parser. +*/ +extern LWGEOM_PARSER_RESULT global_parser_result; +extern const char *parser_error_messages[]; + +/* +* Prototypes for the lexer +*/ +extern void wkt_lexer_init(char *str); +extern void wkt_lexer_close(void); + + +/* +* Functions called from within the bison parser to construct geometries. +*/ +int wkt_lexer_read_srid(char *str); +POINT wkt_parser_coord_2(double c1, double c2); +POINT wkt_parser_coord_3(double c1, double c2, double c3); +POINT wkt_parser_coord_4(double c1, double c2, double c3, double c4); +POINTARRAY* wkt_parser_ptarray_add_coord(POINTARRAY *pa, POINT p); +POINTARRAY* wkt_parser_ptarray_new(POINT p); +LWGEOM* wkt_parser_point_new(POINTARRAY *pa, char *dimensionality); +LWGEOM* wkt_parser_linestring_new(POINTARRAY *pa, char *dimensionality); +LWGEOM* wkt_parser_circularstring_new(POINTARRAY *pa, char *dimensionality); +LWGEOM* wkt_parser_triangle_new(POINTARRAY *pa, char *dimensionality); +LWGEOM* wkt_parser_polygon_new(POINTARRAY *pa, char dimcheck); +LWGEOM* wkt_parser_polygon_add_ring(LWGEOM *poly, POINTARRAY *pa, char dimcheck); +LWGEOM* wkt_parser_polygon_finalize(LWGEOM *poly, char *dimensionality); +LWGEOM* wkt_parser_curvepolygon_new(LWGEOM *ring); +LWGEOM* wkt_parser_curvepolygon_add_ring(LWGEOM *poly, LWGEOM *ring); +LWGEOM* wkt_parser_curvepolygon_finalize(LWGEOM *poly, char *dimensionality); +LWGEOM* wkt_parser_compound_add_geom(LWGEOM *col, LWGEOM *geom); +LWGEOM* wkt_parser_collection_new(LWGEOM *geom); +LWGEOM* wkt_parser_collection_add_geom(LWGEOM *col, LWGEOM *geom); +LWGEOM* wkt_parser_collection_finalize(int lwtype, LWGEOM *col, char *dimensionality); +void wkt_parser_geometry_new(LWGEOM *geom, int srid); + diff -Nru postgis-1.5.3/liblwgeom/lwin_wkt_lex.c postgis-2.0.1/liblwgeom/lwin_wkt_lex.c --- postgis-1.5.3/liblwgeom/lwin_wkt_lex.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwin_wkt_lex.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2044 @@ +#line 2 "lwin_wkt_lex.c" + +#line 4 "lwin_wkt_lex.c" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define yy_create_buffer wkt_yy_create_buffer +#define yy_delete_buffer wkt_yy_delete_buffer +#define yy_flex_debug wkt_yy_flex_debug +#define yy_init_buffer wkt_yy_init_buffer +#define yy_flush_buffer wkt_yy_flush_buffer +#define yy_load_buffer_state wkt_yy_load_buffer_state +#define yy_switch_to_buffer wkt_yy_switch_to_buffer +#define yyin wkt_yyin +#define yyleng wkt_yyleng +#define yylex wkt_yylex +#define yylineno wkt_yylineno +#define yyout wkt_yyout +#define yyrestart wkt_yyrestart +#define yytext wkt_yytext +#define yywrap wkt_yywrap +#define yyalloc wkt_yyalloc +#define yyrealloc wkt_yyrealloc +#define yyfree wkt_yyfree + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 35 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include +#include +#include +#include + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; +#endif /* ! C99 */ + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! FLEXINT_H */ + +#ifdef __cplusplus + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +/* C99 requires __STDC__ to be defined as 1. */ +#if defined (__STDC__) + +#define YY_USE_CONST + +#endif /* defined (__STDC__) */ +#endif /* ! __cplusplus */ + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN (yy_start) = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START (((yy_start) - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE wkt_yyrestart(wkt_yyin ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#define YY_BUF_SIZE 16384 +#endif + +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +extern yy_size_t wkt_yyleng; + +extern FILE *wkt_yyin, *wkt_yyout; + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + #define YY_LESS_LINENO(n) + +/* Return all but the first "n" matched characters back to the input stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up wkt_yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = (yy_hold_char); \ + YY_RESTORE_YY_MORE_OFFSET \ + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up wkt_yytext again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, (yytext_ptr) ) + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + yy_size_t yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via wkt_yyrestart()), so that the user can continue scanning by + * just pointing wkt_yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* Stack of input buffers. */ +static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ +static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ +static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + * + * Returns the top of the stack, or NULL. + */ +#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ + ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ + : NULL) + +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] + +/* yy_hold_char holds the character lost when wkt_yytext is formed. */ +static char yy_hold_char; +static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ +yy_size_t wkt_yyleng; + +/* Points to current character in buffer. */ +static char *yy_c_buf_p = (char *) 0; +static int yy_init = 0; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ + +/* Flag which is used to allow wkt_yywrap()'s to do buffer switches + * instead of setting up a fresh wkt_yyin. A bit of a hack ... + */ +static int yy_did_buffer_switch_on_eof; + +void wkt_yyrestart (FILE *input_file ); +void wkt_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); +YY_BUFFER_STATE wkt_yy_create_buffer (FILE *file,int size ); +void wkt_yy_delete_buffer (YY_BUFFER_STATE b ); +void wkt_yy_flush_buffer (YY_BUFFER_STATE b ); +void wkt_yypush_buffer_state (YY_BUFFER_STATE new_buffer ); +void wkt_yypop_buffer_state (void ); + +static void wkt_yyensure_buffer_stack (void ); +static void wkt_yy_load_buffer_state (void ); +static void wkt_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); + +#define YY_FLUSH_BUFFER wkt_yy_flush_buffer(YY_CURRENT_BUFFER ) + +YY_BUFFER_STATE wkt_yy_scan_buffer (char *base,yy_size_t size ); +YY_BUFFER_STATE wkt_yy_scan_string (yyconst char *yy_str ); +YY_BUFFER_STATE wkt_yy_scan_bytes (yyconst char *bytes,yy_size_t len ); + +void *wkt_yyalloc (yy_size_t ); +void *wkt_yyrealloc (void *,yy_size_t ); +void wkt_yyfree (void * ); + +#define yy_new_buffer wkt_yy_create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + wkt_yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + wkt_yy_create_buffer(wkt_yyin,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + wkt_yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + wkt_yy_create_buffer(wkt_yyin,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* Begin user sect3 */ + +#define wkt_yywrap(n) 1 +#define YY_SKIP_YYWRAP + +typedef unsigned char YY_CHAR; + +FILE *wkt_yyin = (FILE *) 0, *wkt_yyout = (FILE *) 0; + +typedef int yy_state_type; + +extern int wkt_yylineno; + +int wkt_yylineno = 1; + +extern char *wkt_yytext; +#define yytext_ptr wkt_yytext + +static yy_state_type yy_get_previous_state (void ); +static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); +static int yy_get_next_buffer (void ); +static void yy_fatal_error (yyconst char msg[] ); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up wkt_yytext. + */ +#define YY_DO_BEFORE_ACTION \ + (yytext_ptr) = yy_bp; \ + wkt_yyleng = (size_t) (yy_cp - yy_bp); \ + (yy_hold_char) = *yy_cp; \ + *yy_cp = '\0'; \ + (yy_c_buf_p) = yy_cp; + +#define YY_NUM_RULES 26 +#define YY_END_OF_BUFFER 27 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static yyconst flex_int16_t yy_accept[172] = + { 0, + 0, 0, 27, 25, 24, 24, 20, 21, 22, 25, + 25, 1, 23, 25, 25, 25, 25, 19, 25, 25, + 25, 19, 24, 0, 1, 1, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, + 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, + 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 13, 6, 0, 8, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, + 5, 4, 0, 0, 11, 0, 0, 0, 12, 0, + 0, 0, 0, 7, 0, 0, 0, 0, 14, 3, + 0 + } ; + +static yyconst flex_int32_t yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 1, 1, 1, 1, 1, 1, 1, 4, + 5, 1, 6, 7, 8, 9, 1, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 1, 11, 1, + 12, 1, 1, 1, 13, 1, 14, 15, 16, 17, + 18, 19, 20, 1, 1, 21, 22, 23, 24, 25, + 1, 26, 27, 28, 29, 30, 1, 1, 31, 32, + 1, 1, 1, 1, 1, 1, 33, 1, 34, 35, + + 36, 37, 38, 39, 40, 1, 1, 41, 42, 43, + 44, 45, 1, 46, 47, 48, 49, 50, 1, 1, + 51, 52, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst flex_int32_t yy_meta[53] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1 + } ; + +static yyconst flex_int16_t yy_base[172] = + { 0, + 0, 0, 353, 366, 51, 53, 366, 366, 366, 48, + 342, 50, 366, 41, 40, 47, 44, 38, 44, 43, + 51, 50, 71, 341, 84, 85, 340, 70, 53, 74, + 72, 77, 79, 81, 84, 86, 88, 86, 90, 366, + 339, 338, 97, 87, 83, 86, 93, 101, 91, 113, + 107, 125, 366, 128, 113, 119, 128, 114, 130, 120, + 128, 121, 132, 335, 129, 132, 125, 130, 366, 129, + 131, 166, 366, 152, 162, 173, 164, 171, 162, 162, + 162, 163, 161, 172, 170, 166, 174, 184, 336, 65, + 180, 177, 201, 197, 189, 202, 198, 202, 206, 202, + + 366, 203, 214, 204, 218, 202, 220, 212, 207, 223, + 218, 212, 239, 245, 366, 232, 233, 246, 241, 248, + 251, 241, 241, 252, 258, 251, 247, 248, 251, 256, + 366, 366, 251, 366, 257, 269, 269, 278, 270, 279, + 283, 279, 283, 291, 279, 286, 294, 366, 295, 292, + 366, 366, 287, 296, 366, 301, 294, 302, 366, 293, + 305, 323, 318, 366, 326, 318, 328, 322, 366, 366, + 366 + } ; + +static yyconst flex_int16_t yy_def[172] = + { 0, + 171, 1, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + 0 + } ; + +static yyconst flex_int16_t yy_nxt[419] = + { 0, + 4, 5, 6, 7, 8, 4, 9, 10, 11, 12, + 13, 4, 4, 14, 4, 15, 4, 16, 4, 4, + 17, 18, 4, 4, 19, 4, 20, 21, 4, 4, + 4, 22, 4, 14, 4, 15, 4, 16, 4, 4, + 17, 18, 4, 4, 19, 4, 20, 21, 4, 4, + 4, 22, 23, 23, 23, 23, 24, 25, 27, 25, + 29, 32, 33, 34, 30, 28, 35, 36, 37, 31, + 38, 40, 23, 23, 90, 41, 39, 41, 43, 42, + 29, 32, 33, 34, 30, 28, 35, 36, 37, 31, + 38, 40, 27, 25, 26, 44, 39, 45, 43, 28, + + 28, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 44, 60, 45, 61, 28, + 28, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 62, 60, 63, 61, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 77, 78, 79, 80, 62, 81, 63, 82, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 77, 78, 79, 80, 87, 81, 88, 82, 83, + 89, 91, 90, 92, 93, 94, 84, 95, 96, 97, + 85, 98, 86, 99, 100, 87, 101, 88, 102, 83, + + 103, 91, 104, 92, 93, 94, 84, 95, 96, 97, + 85, 98, 86, 99, 100, 105, 101, 106, 102, 107, + 103, 108, 104, 109, 110, 111, 112, 113, 114, 115, + 116, 117, 118, 119, 120, 105, 121, 106, 122, 107, + 123, 108, 124, 109, 110, 111, 112, 113, 114, 115, + 116, 117, 118, 119, 120, 125, 121, 126, 122, 127, + 123, 128, 124, 129, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 125, 141, 126, 142, 127, + 143, 128, 144, 129, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 145, 141, 146, 142, 147, + + 143, 148, 144, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 145, 161, 146, 162, 147, + 163, 148, 164, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 165, 161, 166, 162, 167, + 163, 168, 164, 169, 170, 90, 76, 42, 42, 26, + 26, 26, 171, 171, 171, 165, 171, 166, 171, 167, + 171, 168, 171, 169, 170, 3, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171 + } ; + +static yyconst flex_int16_t yy_chk[419] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 5, 5, 6, 6, 10, 10, 12, 12, + 14, 15, 16, 17, 14, 12, 18, 19, 20, 14, + 21, 22, 23, 23, 90, 28, 21, 28, 29, 28, + 14, 15, 16, 17, 14, 12, 18, 19, 20, 14, + 21, 22, 25, 25, 26, 30, 21, 31, 29, 25, + + 26, 32, 33, 34, 35, 36, 36, 37, 38, 39, + 43, 44, 45, 46, 47, 30, 48, 31, 49, 25, + 26, 32, 33, 34, 35, 36, 36, 37, 38, 39, + 43, 44, 45, 46, 47, 50, 48, 51, 49, 52, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 63, 65, 66, 67, 68, 50, 70, 51, 71, 52, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 63, 65, 66, 67, 68, 74, 70, 75, 71, 72, + 76, 77, 76, 78, 79, 80, 72, 81, 82, 83, + 72, 84, 72, 85, 86, 74, 87, 75, 88, 72, + + 91, 77, 92, 78, 79, 80, 72, 81, 82, 83, + 72, 84, 72, 85, 86, 93, 87, 94, 88, 95, + 91, 96, 92, 97, 98, 99, 99, 100, 102, 103, + 104, 105, 106, 107, 108, 93, 109, 94, 110, 95, + 111, 96, 112, 97, 98, 99, 99, 100, 102, 103, + 104, 105, 106, 107, 108, 113, 109, 114, 110, 116, + 111, 117, 112, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 113, 130, 114, 133, 116, + 135, 117, 136, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 137, 130, 138, 133, 139, + + 135, 140, 136, 141, 142, 143, 144, 145, 146, 147, + 149, 150, 153, 154, 156, 137, 157, 138, 158, 139, + 160, 140, 161, 141, 142, 143, 144, 145, 146, 147, + 149, 150, 153, 154, 156, 162, 157, 163, 158, 165, + 160, 166, 161, 167, 168, 89, 64, 42, 41, 27, + 24, 11, 3, 0, 0, 162, 0, 163, 0, 165, + 0, 166, 0, 167, 168, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171 + } ; + +static yy_state_type yy_last_accepting_state; +static char *yy_last_accepting_cpos; + +extern int wkt_yy_flex_debug; +int wkt_yy_flex_debug = 0; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +char *wkt_yytext; +#line 1 "lwin_wkt_lex.l" +#line 2 "lwin_wkt_lex.l" + +/* The lexer */ + +#include +#include +#include "lwin_wkt.h" +#include "lwin_wkt_parse.h" +#include "lwgeom_log.h" + +static YY_BUFFER_STATE wkt_yy_buf_state; + + +/* +* Set up the lexer! +*/ +void wkt_lexer_init(char *src) +{ + wkt_yy_buf_state = wkt_yy_scan_string(src); +} + +/* +* Clean up the lexer! +*/ +void wkt_lexer_close() +{ + wkt_yy_delete_buffer(wkt_yy_buf_state); +} + +/* +* Handle errors due to unexpected junk in WKT strings. +*/ +static void wkt_lexer_unknown() +{ + /* Set the global error state */ + global_parser_result.errcode = PARSER_ERROR_OTHER; + global_parser_result.message = parser_error_messages[PARSER_ERROR_OTHER]; + global_parser_result.errlocation = wkt_yylloc.last_column; +}; + + +/* +* This macro is magically run after a rule is found but before the main +* action is run. We use it to update the parse location information +* so we can report on where things fail. Also optionally to dump +* debugging info. +*/ +#define YY_USER_ACTION do { \ + wkt_yylloc.first_line = wkt_yylloc.last_line = wkt_yylineno; \ + wkt_yylloc.first_column = wkt_yylloc.last_column; \ + wkt_yylloc.last_column += wkt_yyleng; \ + LWDEBUGF(5,"lex: %s", wkt_yytext); \ + } while (0); + + +#line 675 "lwin_wkt_lex.c" + +#define INITIAL 0 + +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +#include +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +static int yy_init_globals (void ); + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int wkt_yylex_destroy (void ); + +int wkt_yyget_debug (void ); + +void wkt_yyset_debug (int debug_flag ); + +YY_EXTRA_TYPE wkt_yyget_extra (void ); + +void wkt_yyset_extra (YY_EXTRA_TYPE user_defined ); + +FILE *wkt_yyget_in (void ); + +void wkt_yyset_in (FILE * in_str ); + +FILE *wkt_yyget_out (void ); + +void wkt_yyset_out (FILE * out_str ); + +yy_size_t wkt_yyget_leng (void ); + +char *wkt_yyget_text (void ); + +int wkt_yyget_lineno (void ); + +void wkt_yyset_lineno (int line_number ); + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int wkt_yywrap (void ); +#else +extern int wkt_yywrap (void ); +#endif +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ); +#endif + +#ifndef YY_NO_INPUT + +#ifdef __cplusplus +static int yyinput (void ); +#else +static int input (void ); +#endif + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#define YY_READ_BUF_SIZE 8192 +#endif + +/* Copy whatever the last rule matched to the standard output. */ +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO fwrite( wkt_yytext, wkt_yyleng, 1, wkt_yyout ) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + yy_size_t n; \ + for ( n = 0; n < max_size && \ + (c = getc( wkt_yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( wkt_yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = fread(buf, 1, max_size, wkt_yyin))==0 && ferror(wkt_yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(wkt_yyin); \ + } \ + }\ +\ + +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) +#endif + +/* end tables serialization structures and prototypes */ + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int wkt_yylex (void); + +#define YY_DECL int wkt_yylex (void) +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after wkt_yytext and wkt_yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK break; +#endif + +#define YY_RULE_SETUP \ + YY_USER_ACTION + +/** The main scanner function which does all the work. + */ +YY_DECL +{ + register yy_state_type yy_current_state; + register char *yy_cp, *yy_bp; + register int yy_act; + +#line 63 "lwin_wkt_lex.l" + + +#line 858 "lwin_wkt_lex.c" + + if ( !(yy_init) ) + { + (yy_init) = 1; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! (yy_start) ) + (yy_start) = 1; /* first start state */ + + if ( ! wkt_yyin ) + wkt_yyin = stdin; + + if ( ! wkt_yyout ) + wkt_yyout = stdout; + + if ( ! YY_CURRENT_BUFFER ) { + wkt_yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + wkt_yy_create_buffer(wkt_yyin,YY_BUF_SIZE ); + } + + wkt_yy_load_buffer_state( ); + } + + while ( 1 ) /* loops until end-of-file is reached */ + { + yy_cp = (yy_c_buf_p); + + /* Support of wkt_yytext. */ + *yy_cp = (yy_hold_char); + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = (yy_start); +yy_match: + do + { + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 172 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + ++yy_cp; + } + while ( yy_current_state != 171 ); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = (yy_hold_char); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + goto yy_find_action; + +case 1: +YY_RULE_SETUP +#line 65 "lwin_wkt_lex.l" +{ + LWDEBUG(5,"DOUBLE"); + wkt_yylval.doublevalue = atof(wkt_yytext); + return DOUBLE_TOK; + } + YY_BREAK +case 2: +YY_RULE_SETUP +#line 71 "lwin_wkt_lex.l" +{ + LWDEBUG(5,"SRID"); + wkt_yylval.integervalue = wkt_lexer_read_srid(wkt_yytext); + return SRID_TOK; + } + YY_BREAK +case 3: +YY_RULE_SETUP +#line 77 "lwin_wkt_lex.l" +{ return COLLECTION_TOK; } + YY_BREAK +case 4: +YY_RULE_SETUP +#line 78 "lwin_wkt_lex.l" +{ return MSURFACE_TOK; } + YY_BREAK +case 5: +YY_RULE_SETUP +#line 79 "lwin_wkt_lex.l" +{ return MPOLYGON_TOK; } + YY_BREAK +case 6: +YY_RULE_SETUP +#line 80 "lwin_wkt_lex.l" +{ return MCURVE_TOK; } + YY_BREAK +case 7: +YY_RULE_SETUP +#line 81 "lwin_wkt_lex.l" +{ return MLINESTRING_TOK; } + YY_BREAK +case 8: +YY_RULE_SETUP +#line 82 "lwin_wkt_lex.l" +{ return MPOINT_TOK; } + YY_BREAK +case 9: +YY_RULE_SETUP +#line 83 "lwin_wkt_lex.l" +{ return CURVEPOLYGON_TOK; } + YY_BREAK +case 10: +YY_RULE_SETUP +#line 84 "lwin_wkt_lex.l" +{ return POLYGON_TOK; } + YY_BREAK +case 11: +YY_RULE_SETUP +#line 85 "lwin_wkt_lex.l" +{ return COMPOUNDCURVE_TOK; } + YY_BREAK +case 12: +YY_RULE_SETUP +#line 86 "lwin_wkt_lex.l" +{ return CIRCULARSTRING_TOK; } + YY_BREAK +case 13: +YY_RULE_SETUP +#line 87 "lwin_wkt_lex.l" +{ return LINESTRING_TOK; } + YY_BREAK +case 14: +YY_RULE_SETUP +#line 88 "lwin_wkt_lex.l" +{ return POLYHEDRALSURFACE_TOK; } + YY_BREAK +case 15: +YY_RULE_SETUP +#line 89 "lwin_wkt_lex.l" +{ return TRIANGLE_TOK; } + YY_BREAK +case 16: +YY_RULE_SETUP +#line 90 "lwin_wkt_lex.l" +{ return TIN_TOK; } + YY_BREAK +case 17: +YY_RULE_SETUP +#line 91 "lwin_wkt_lex.l" +{ return POINT_TOK; } + YY_BREAK +case 18: +YY_RULE_SETUP +#line 92 "lwin_wkt_lex.l" +{ return EMPTY_TOK; } + YY_BREAK +case 19: +YY_RULE_SETUP +#line 94 "lwin_wkt_lex.l" +{ + LWDEBUG(5,"DIMENSIONALITY"); + wkt_yylval.stringvalue = wkt_yytext; + return DIMENSIONALITY_TOK; + } + YY_BREAK +case 20: +YY_RULE_SETUP +#line 100 "lwin_wkt_lex.l" +{ LWDEBUG(5,"LBRACKET"); return LBRACKET_TOK; } + YY_BREAK +case 21: +YY_RULE_SETUP +#line 101 "lwin_wkt_lex.l" +{ LWDEBUG(5,"RBRACKET"); return RBRACKET_TOK; } + YY_BREAK +case 22: +YY_RULE_SETUP +#line 102 "lwin_wkt_lex.l" +{ LWDEBUG(5,"COMMA"); return COMMA_TOK; } + YY_BREAK +case 23: +YY_RULE_SETUP +#line 103 "lwin_wkt_lex.l" +{ LWDEBUG(5,"SEMICOLON"); return SEMICOLON_TOK; } + YY_BREAK +case 24: +/* rule 24 can match eol */ +YY_RULE_SETUP +#line 105 "lwin_wkt_lex.l" +{ /* ignore whitespace */ LWDEBUG(5,"WHITESPACE"); } + YY_BREAK +case 25: +YY_RULE_SETUP +#line 107 "lwin_wkt_lex.l" +{ /* Error out and stop parsing on unknown/unexpected characters */ + LWDEBUG(5,"UNKNOWN"); + wkt_lexer_unknown(); + yyterminate(); + } + YY_BREAK +case 26: +YY_RULE_SETUP +#line 113 "lwin_wkt_lex.l" +ECHO; + YY_BREAK +#line 1084 "lwin_wkt_lex.c" +case YY_STATE_EOF(INITIAL): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = (yy_hold_char); + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed wkt_yyin at a new source and called + * wkt_yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = wkt_yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++(yy_c_buf_p); + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_END_OF_FILE: + { + (yy_did_buffer_switch_on_eof) = 0; + + if ( wkt_yywrap( ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * wkt_yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = + (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + (yy_c_buf_p) = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ +} /* end of wkt_yylex */ + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ +static int yy_get_next_buffer (void) +{ + register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + register char *source = (yytext_ptr); + register int number_to_move, i; + int ret_val; + + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; + + else + { + yy_size_t num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER; + + int yy_c_buf_p_offset = + (int) ((yy_c_buf_p) - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + yy_size_t new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + wkt_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = 0; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + (yy_n_chars), num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + if ( (yy_n_chars) == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + wkt_yyrestart(wkt_yyin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) wkt_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + } + + (yy_n_chars) += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; + + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + + static yy_state_type yy_get_previous_state (void) +{ + register yy_state_type yy_current_state; + register char *yy_cp; + + yy_current_state = (yy_start); + + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) + { + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 172 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) +{ + register int yy_is_jam; + register char *yy_cp = (yy_c_buf_p); + + register YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 172 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_is_jam = (yy_current_state == 171); + + return yy_is_jam ? 0 : yy_current_state; +} + +#ifndef YY_NO_INPUT +#ifdef __cplusplus + static int yyinput (void) +#else + static int input (void) +#endif + +{ + int c; + + *(yy_c_buf_p) = (yy_hold_char); + + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + /* This was really a NUL. */ + *(yy_c_buf_p) = '\0'; + + else + { /* need more input */ + yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); + ++(yy_c_buf_p); + + switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + wkt_yyrestart(wkt_yyin ); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( wkt_yywrap( ) ) + return 0; + + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = (yytext_ptr) + offset; + break; + } + } + } + + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ + *(yy_c_buf_p) = '\0'; /* preserve wkt_yytext */ + (yy_hold_char) = *++(yy_c_buf_p); + + return c; +} +#endif /* ifndef YY_NO_INPUT */ + +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * + * @note This function does not reset the start condition to @c INITIAL . + */ + void wkt_yyrestart (FILE * input_file ) +{ + + if ( ! YY_CURRENT_BUFFER ){ + wkt_yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + wkt_yy_create_buffer(wkt_yyin,YY_BUF_SIZE ); + } + + wkt_yy_init_buffer(YY_CURRENT_BUFFER,input_file ); + wkt_yy_load_buffer_state( ); +} + +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * + */ + void wkt_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) +{ + + /* TODO. We should be able to replace this entire function body + * with + * wkt_yypop_buffer_state(); + * wkt_yypush_buffer_state(new_buffer); + */ + wkt_yyensure_buffer_stack (); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + wkt_yy_load_buffer_state( ); + + /* We don't actually know whether we did this switch during + * EOF (wkt_yywrap()) processing, but the only time this flag + * is looked at is after wkt_yywrap() is called, so it's safe + * to go ahead and always set it. + */ + (yy_did_buffer_switch_on_eof) = 1; +} + +static void wkt_yy_load_buffer_state (void) +{ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + wkt_yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + (yy_hold_char) = *(yy_c_buf_p); +} + +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * + * @return the allocated buffer state. + */ + YY_BUFFER_STATE wkt_yy_create_buffer (FILE * file, int size ) +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) wkt_yyalloc(sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in wkt_yy_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) wkt_yyalloc(b->yy_buf_size + 2 ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in wkt_yy_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + wkt_yy_init_buffer(b,file ); + + return b; +} + +/** Destroy the buffer. + * @param b a buffer created with wkt_yy_create_buffer() + * + */ + void wkt_yy_delete_buffer (YY_BUFFER_STATE b ) +{ + + if ( ! b ) + return; + + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + wkt_yyfree((void *) b->yy_ch_buf ); + + wkt_yyfree((void *) b ); +} + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a wkt_yyrestart() or at EOF. + */ + static void wkt_yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) + +{ + int oerrno = errno; + + wkt_yy_flush_buffer(b ); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + + /* If b is the current buffer, then wkt_yy_init_buffer was _probably_ + * called from wkt_yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = 0; + + errno = oerrno; +} + +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * + */ + void wkt_yy_flush_buffer (YY_BUFFER_STATE b ) +{ + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == YY_CURRENT_BUFFER ) + wkt_yy_load_buffer_state( ); +} + +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * + */ +void wkt_yypush_buffer_state (YY_BUFFER_STATE new_buffer ) +{ + if (new_buffer == NULL) + return; + + wkt_yyensure_buffer_stack(); + + /* This block is copied from wkt_yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + (yy_buffer_stack_top)++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from wkt_yy_switch_to_buffer. */ + wkt_yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; +} + +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * + */ +void wkt_yypop_buffer_state (void) +{ + if (!YY_CURRENT_BUFFER) + return; + + wkt_yy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + --(yy_buffer_stack_top); + + if (YY_CURRENT_BUFFER) { + wkt_yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; + } +} + +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +static void wkt_yyensure_buffer_stack (void) +{ + yy_size_t num_to_alloc; + + if (!(yy_buffer_stack)) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; + (yy_buffer_stack) = (struct yy_buffer_state**)wkt_yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in wkt_yyensure_buffer_stack()" ); + + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + (yy_buffer_stack_max) = num_to_alloc; + (yy_buffer_stack_top) = 0; + return; + } + + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + int grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = (yy_buffer_stack_max) + grow_size; + (yy_buffer_stack) = (struct yy_buffer_state**)wkt_yyrealloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in wkt_yyensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); + (yy_buffer_stack_max) = num_to_alloc; + } +} + +/** Setup the input buffer state to scan directly from a user-specified character buffer. + * @param base the character buffer + * @param size the size in bytes of the character buffer + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE wkt_yy_scan_buffer (char * base, yy_size_t size ) +{ + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return 0; + + b = (YY_BUFFER_STATE) wkt_yyalloc(sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in wkt_yy_scan_buffer()" ); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = 0; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + wkt_yy_switch_to_buffer(b ); + + return b; +} + +/** Setup the input buffer state to scan a string. The next call to wkt_yylex() will + * scan from a @e copy of @a str. + * @param yystr a NUL-terminated string to scan + * + * @return the newly allocated buffer state object. + * @note If you want to scan bytes that may contain NUL values, then use + * wkt_yy_scan_bytes() instead. + */ +YY_BUFFER_STATE wkt_yy_scan_string (yyconst char * yystr ) +{ + + return wkt_yy_scan_bytes(yystr,strlen(yystr) ); +} + +/** Setup the input buffer state to scan the given bytes. The next call to wkt_yylex() will + * scan from a @e copy of @a bytes. + * @param bytes the byte buffer to scan + * @param len the number of bytes in the buffer pointed to by @a bytes. + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE wkt_yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) +{ + YY_BUFFER_STATE b; + char *buf; + yy_size_t n, i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = _yybytes_len + 2; + buf = (char *) wkt_yyalloc(n ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in wkt_yy_scan_bytes()" ); + + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = wkt_yy_scan_buffer(buf,n ); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in wkt_yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; +} + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +static void yy_fatal_error (yyconst char* msg ) +{ + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); +} + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up wkt_yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + wkt_yytext[wkt_yyleng] = (yy_hold_char); \ + (yy_c_buf_p) = wkt_yytext + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + wkt_yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) + +/* Accessor methods (get/set functions) to struct members. */ + +/** Get the current line number. + * + */ +int wkt_yyget_lineno (void) +{ + + return wkt_yylineno; +} + +/** Get the input stream. + * + */ +FILE *wkt_yyget_in (void) +{ + return wkt_yyin; +} + +/** Get the output stream. + * + */ +FILE *wkt_yyget_out (void) +{ + return wkt_yyout; +} + +/** Get the length of the current token. + * + */ +yy_size_t wkt_yyget_leng (void) +{ + return wkt_yyleng; +} + +/** Get the current token. + * + */ + +char *wkt_yyget_text (void) +{ + return wkt_yytext; +} + +/** Set the current line number. + * @param line_number + * + */ +void wkt_yyset_lineno (int line_number ) +{ + + wkt_yylineno = line_number; +} + +/** Set the input stream. This does not discard the current + * input buffer. + * @param in_str A readable stream. + * + * @see wkt_yy_switch_to_buffer + */ +void wkt_yyset_in (FILE * in_str ) +{ + wkt_yyin = in_str ; +} + +void wkt_yyset_out (FILE * out_str ) +{ + wkt_yyout = out_str ; +} + +int wkt_yyget_debug (void) +{ + return wkt_yy_flex_debug; +} + +void wkt_yyset_debug (int bdebug ) +{ + wkt_yy_flex_debug = bdebug ; +} + +static int yy_init_globals (void) +{ + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from wkt_yylex_destroy(), so don't allocate here. + */ + + (yy_buffer_stack) = 0; + (yy_buffer_stack_top) = 0; + (yy_buffer_stack_max) = 0; + (yy_c_buf_p) = (char *) 0; + (yy_init) = 0; + (yy_start) = 0; + +/* Defined in main.c */ +#ifdef YY_STDINIT + wkt_yyin = stdin; + wkt_yyout = stdout; +#else + wkt_yyin = (FILE *) 0; + wkt_yyout = (FILE *) 0; +#endif + + /* For future reference: Set errno on error, since we are called by + * wkt_yylex_init() + */ + return 0; +} + +/* wkt_yylex_destroy is for both reentrant and non-reentrant scanners. */ +int wkt_yylex_destroy (void) +{ + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + wkt_yy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + wkt_yypop_buffer_state(); + } + + /* Destroy the stack itself. */ + wkt_yyfree((yy_buffer_stack) ); + (yy_buffer_stack) = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * wkt_yylex() is called, initialization will occur. */ + yy_init_globals( ); + + return 0; +} + +/* + * Internal utility routines. + */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) +{ + register int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * s ) +{ + register int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *wkt_yyalloc (yy_size_t size ) +{ + return (void *) malloc( size ); +} + +void *wkt_yyrealloc (void * ptr, yy_size_t size ) +{ + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); +} + +void wkt_yyfree (void * ptr ) +{ + free( (char *) ptr ); /* see wkt_yyrealloc() for (char *) cast */ +} + +#define YYTABLES_NAME "yytables" + +#line 113 "lwin_wkt_lex.l" + + + diff -Nru postgis-1.5.3/liblwgeom/lwin_wkt_lex.l postgis-2.0.1/liblwgeom/lwin_wkt_lex.l --- postgis-1.5.3/liblwgeom/lwin_wkt_lex.l 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwin_wkt_lex.l 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,114 @@ +%{ + +/* The lexer */ + +#include +#include +#include "lwin_wkt.h" +#include "lwin_wkt_parse.h" +#include "lwgeom_log.h" + +static YY_BUFFER_STATE wkt_yy_buf_state; + + +/* +* Set up the lexer! +*/ +void wkt_lexer_init(char *src) +{ + wkt_yy_buf_state = wkt_yy_scan_string(src); +} + +/* +* Clean up the lexer! +*/ +void wkt_lexer_close() +{ + wkt_yy_delete_buffer(wkt_yy_buf_state); +} + +/* +* Handle errors due to unexpected junk in WKT strings. +*/ +static void wkt_lexer_unknown() +{ + /* Set the global error state */ + global_parser_result.errcode = PARSER_ERROR_OTHER; + global_parser_result.message = parser_error_messages[PARSER_ERROR_OTHER]; + global_parser_result.errlocation = wkt_yylloc.last_column; +}; + + +/* +* This macro is magically run after a rule is found but before the main +* action is run. We use it to update the parse location information +* so we can report on where things fail. Also optionally to dump +* debugging info. +*/ +#define YY_USER_ACTION do { \ + wkt_yylloc.first_line = wkt_yylloc.last_line = yylineno; \ + wkt_yylloc.first_column = wkt_yylloc.last_column; \ + wkt_yylloc.last_column += yyleng; \ + LWDEBUGF(5,"lex: %s", wkt_yytext); \ + } while (0); + + +%} + +%option prefix="wkt_yy" +%option nounput +%option never-interactive +%option outfile="lwin_wkt_lex.c" +%option noyywrap + +%% + +-?(([0-9]+\.?)|([0-9]*\.?[0-9]+)([eE][-+]?[0-9]+)?) { + LWDEBUG(5,"DOUBLE"); + wkt_yylval.doublevalue = atof(wkt_yytext); + return DOUBLE_TOK; + } + +SRID=-?[0-9]+ { + LWDEBUG(5,"SRID"); + wkt_yylval.integervalue = wkt_lexer_read_srid(wkt_yytext); + return SRID_TOK; + } + +GEOMETRYCOLLECTION { return COLLECTION_TOK; } +MULTISURFACE { return MSURFACE_TOK; } +MULTIPOLYGON { return MPOLYGON_TOK; } +MULTICURVE { return MCURVE_TOK; } +MULTILINESTRING { return MLINESTRING_TOK; } +MULTIPOINT { return MPOINT_TOK; } +CURVEPOLYGON { return CURVEPOLYGON_TOK; } +POLYGON { return POLYGON_TOK; } +COMPOUNDCURVE { return COMPOUNDCURVE_TOK; } +CIRCULARSTRING { return CIRCULARSTRING_TOK; } +LINESTRING { return LINESTRING_TOK; } +POLYHEDRALSURFACE { return POLYHEDRALSURFACE_TOK; } +TRIANGLE { return TRIANGLE_TOK; } +TIN { return TIN_TOK; } +POINT { return POINT_TOK; } +EMPTY { return EMPTY_TOK; } + +Z|M|ZM { + LWDEBUG(5,"DIMENSIONALITY"); + wkt_yylval.stringvalue = wkt_yytext; + return DIMENSIONALITY_TOK; + } + +\( { LWDEBUG(5,"LBRACKET"); return LBRACKET_TOK; } +\) { LWDEBUG(5,"RBRACKET"); return RBRACKET_TOK; } +, { LWDEBUG(5,"COMMA"); return COMMA_TOK; } +\; { LWDEBUG(5,"SEMICOLON"); return SEMICOLON_TOK; } + +[ \t\n\r]+ { /* ignore whitespace */ LWDEBUG(5,"WHITESPACE"); } + +. { /* Error out and stop parsing on unknown/unexpected characters */ + LWDEBUG(5,"UNKNOWN"); + wkt_lexer_unknown(); + yyterminate(); + } + +%% diff -Nru postgis-1.5.3/liblwgeom/lwin_wkt_parse.c postgis-2.0.1/liblwgeom/lwin_wkt_parse.c --- postgis-1.5.3/liblwgeom/lwin_wkt_parse.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwin_wkt_parse.c 2012-03-22 16:55:18.000000000 +0000 @@ -0,0 +1,3326 @@ +/* A Bison parser, made by GNU Bison 2.5. */ + +/* Bison implementation for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Bison version. */ +#define YYBISON_VERSION "2.5" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 0 + +/* Push parsers. */ +#define YYPUSH 0 + +/* Pull parsers. */ +#define YYPULL 1 + +/* Using locations. */ +#define YYLSP_NEEDED 1 + +/* Substitute the variable and function names. */ +#define yyparse wkt_yyparse +#define yylex wkt_yylex +#define yyerror wkt_yyerror +#define yylval wkt_yylval +#define yychar wkt_yychar +#define yydebug wkt_yydebug +#define yynerrs wkt_yynerrs +#define yylloc wkt_yylloc + +/* Copy the first part of user declarations. */ + +/* Line 268 of yacc.c */ +#line 1 "lwin_wkt_parse.y" + + +/* WKT Parser */ +#include +#include +#include +#include "lwin_wkt.h" +#include "lwin_wkt_parse.h" +#include "lwgeom_log.h" + + +/* Prototypes to quiet the compiler */ +int wkt_yyparse(void); +void wkt_yyerror(const char *str); +int wkt_yylex(void); + + +/* Declare the global parser variable */ +LWGEOM_PARSER_RESULT global_parser_result; + +/* Turn on/off verbose parsing (turn off for production) */ +int wkt_yydebug = 0; + +/* +* Error handler called by the bison parser. Mostly we will be +* catching our own errors and filling out the message and errlocation +* from WKT_ERROR in the grammar, but we keep this one +* around just in case. +*/ +void wkt_yyerror(const char *str) +{ + /* If we haven't already set a message and location, let's set one now. */ + if ( ! global_parser_result.message ) + { + global_parser_result.message = parser_error_messages[PARSER_ERROR_OTHER]; + global_parser_result.errcode = PARSER_ERROR_OTHER; + global_parser_result.errlocation = wkt_yylloc.last_column; + } + LWDEBUGF(4,"%s", str); +} + +/** +* Parse a WKT geometry string into an LWGEOM structure. Note that this +* process uses globals and is not re-entrant, so don't call it within itself +* (eg, from within other functions in lwin_wkt.c) or from a threaded program. +* Note that parser_result.wkinput picks up a reference to wktstr. +*/ +int lwgeom_parse_wkt(LWGEOM_PARSER_RESULT *parser_result, char *wktstr, int parser_check_flags) +{ + int parse_rv = 0; + + /* Clean up our global parser result. */ + global_parser_result.geom = NULL; + global_parser_result.message = NULL; + global_parser_result.serialized_lwgeom = NULL; + global_parser_result.errcode = 0; + global_parser_result.errlocation = 0; + global_parser_result.size = 0; + + /* Set the input text string, and parse checks. */ + global_parser_result.wkinput = wktstr; + global_parser_result.parser_check_flags = parser_check_flags; + + wkt_lexer_init(wktstr); /* Lexer ready */ + parse_rv = wkt_yyparse(); /* Run the parse */ + LWDEBUGF(4,"wkt_yyparse returned %d", parse_rv); + wkt_lexer_close(); /* Clean up lexer */ + + /* A non-zero parser return is an error. */ + if ( parse_rv != 0 ) + { + if( ! global_parser_result.errcode ) + { + global_parser_result.errcode = PARSER_ERROR_OTHER; + global_parser_result.message = parser_error_messages[PARSER_ERROR_OTHER]; + global_parser_result.errlocation = wkt_yylloc.last_column; + } + + LWDEBUGF(5, "error returned by wkt_yyparse() @ %d: [%d] '%s'", + global_parser_result.errlocation, + global_parser_result.errcode, + global_parser_result.message); + + /* Copy the global values into the return pointer */ + *parser_result = global_parser_result; + return LW_FAILURE; + } + + /* Copy the global value into the return pointer */ + *parser_result = global_parser_result; + return LW_SUCCESS; +} + +#define WKT_ERROR() { if ( global_parser_result.errcode != 0 ) { YYERROR; } } + + + + +/* Line 268 of yacc.c */ +#line 178 "y.tab.c" + +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 1 +#endif + +/* Enabling the token table. */ +#ifndef YYTOKEN_TABLE +# define YYTOKEN_TABLE 0 +#endif + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + POINT_TOK = 258, + LINESTRING_TOK = 259, + POLYGON_TOK = 260, + MPOINT_TOK = 261, + MLINESTRING_TOK = 262, + MPOLYGON_TOK = 263, + MSURFACE_TOK = 264, + MCURVE_TOK = 265, + CURVEPOLYGON_TOK = 266, + COMPOUNDCURVE_TOK = 267, + CIRCULARSTRING_TOK = 268, + COLLECTION_TOK = 269, + RBRACKET_TOK = 270, + LBRACKET_TOK = 271, + COMMA_TOK = 272, + EMPTY_TOK = 273, + SEMICOLON_TOK = 274, + TRIANGLE_TOK = 275, + TIN_TOK = 276, + POLYHEDRALSURFACE_TOK = 277, + DOUBLE_TOK = 278, + DIMENSIONALITY_TOK = 279, + SRID_TOK = 280 + }; +#endif +/* Tokens. */ +#define POINT_TOK 258 +#define LINESTRING_TOK 259 +#define POLYGON_TOK 260 +#define MPOINT_TOK 261 +#define MLINESTRING_TOK 262 +#define MPOLYGON_TOK 263 +#define MSURFACE_TOK 264 +#define MCURVE_TOK 265 +#define CURVEPOLYGON_TOK 266 +#define COMPOUNDCURVE_TOK 267 +#define CIRCULARSTRING_TOK 268 +#define COLLECTION_TOK 269 +#define RBRACKET_TOK 270 +#define LBRACKET_TOK 271 +#define COMMA_TOK 272 +#define EMPTY_TOK 273 +#define SEMICOLON_TOK 274 +#define TRIANGLE_TOK 275 +#define TIN_TOK 276 +#define POLYHEDRALSURFACE_TOK 277 +#define DOUBLE_TOK 278 +#define DIMENSIONALITY_TOK 279 +#define SRID_TOK 280 + + + + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE +{ + +/* Line 293 of yacc.c */ +#line 103 "lwin_wkt_parse.y" + + int integervalue; + double doublevalue; + char *stringvalue; + LWGEOM *geometryvalue; + POINT coordinatevalue; + POINTARRAY *ptarrayvalue; + + + +/* Line 293 of yacc.c */ +#line 275 "y.tab.c" +} YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +#endif + +#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED +typedef struct YYLTYPE +{ + int first_line; + int first_column; + int last_line; + int last_column; +} YYLTYPE; +# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ +# define YYLTYPE_IS_DECLARED 1 +# define YYLTYPE_IS_TRIVIAL 1 +#endif + + +/* Copy the second part of user declarations. */ + + +/* Line 343 of yacc.c */ +#line 300 "y.tab.c" + +#ifdef short +# undef short +#endif + +#ifdef YYTYPE_UINT8 +typedef YYTYPE_UINT8 yytype_uint8; +#else +typedef unsigned char yytype_uint8; +#endif + +#ifdef YYTYPE_INT8 +typedef YYTYPE_INT8 yytype_int8; +#elif (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +typedef signed char yytype_int8; +#else +typedef short int yytype_int8; +#endif + +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; +#endif + +#ifdef YYTYPE_INT16 +typedef YYTYPE_INT16 yytype_int16; +#else +typedef short int yytype_int16; +#endif + +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned int +# endif +#endif + +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) + +#ifndef YY_ +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(msgid) dgettext ("bison-runtime", msgid) +# endif +# endif +# ifndef YY_ +# define YY_(msgid) msgid +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(e) ((void) (e)) +#else +# define YYUSE(e) /* empty */ +#endif + +/* Identity function, used to suppress warnings about constant conditions. */ +#ifndef lint +# define YYID(n) (n) +#else +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static int +YYID (int yyi) +#else +static int +YYID (yyi) + int yyi; +#endif +{ + return yyi; +} +#endif + +#if ! defined yyoverflow || YYERROR_VERBOSE + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ + + +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ + && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; + YYLTYPE yyls_alloc; +}; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ + + 2 * YYSTACK_GAP_MAXIMUM) + +# define YYCOPY_NEEDED 1 + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (YYID (0)) + +#endif + +#if defined YYCOPY_NEEDED && YYCOPY_NEEDED +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (YYID (0)) +# endif +# endif +#endif /* !YYCOPY_NEEDED */ + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 80 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 294 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 26 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 40 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 136 +/* YYNRULES -- Number of states. */ +#define YYNSTATES 264 + +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 280 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +static const yytype_uint8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25 +}; + +#if YYDEBUG +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in + YYRHS. */ +static const yytype_uint16 yyprhs[] = +{ + 0, 0, 3, 5, 9, 11, 13, 15, 17, 19, + 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, + 44, 50, 54, 57, 61, 63, 68, 74, 78, 81, + 85, 89, 93, 95, 97, 99, 104, 110, 114, 117, + 122, 128, 132, 135, 140, 146, 150, 153, 157, 159, + 163, 165, 170, 176, 180, 183, 187, 189, 193, 198, + 204, 208, 211, 215, 217, 219, 221, 223, 225, 229, + 231, 235, 237, 241, 245, 250, 256, 260, 263, 267, + 271, 275, 277, 279, 281, 286, 292, 296, 299, 303, + 307, 311, 315, 317, 319, 321, 323, 328, 334, 338, + 341, 345, 347, 352, 358, 362, 365, 370, 376, 380, + 383, 387, 389, 393, 395, 402, 410, 414, 417, 423, + 428, 434, 438, 441, 445, 447, 449, 453, 455, 460, + 466, 470, 473, 477, 479, 482, 486 +}; + +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yytype_int8 yyrhs[] = +{ + 27, 0, -1, 28, -1, 25, 19, 28, -1, 63, + -1, 55, -1, 54, -1, 48, -1, 38, -1, 41, + -1, 60, -1, 52, -1, 35, -1, 31, -1, 50, + -1, 33, -1, 34, -1, 58, -1, 29, -1, 14, + 16, 30, 15, -1, 14, 24, 16, 30, 15, -1, + 14, 24, 18, -1, 14, 18, -1, 30, 17, 28, + -1, 28, -1, 9, 16, 32, 15, -1, 9, 24, + 16, 32, 15, -1, 9, 24, 18, -1, 9, 18, + -1, 32, 17, 38, -1, 32, 17, 41, -1, 32, + 17, 39, -1, 38, -1, 41, -1, 39, -1, 21, + 16, 57, 15, -1, 21, 24, 16, 57, 15, -1, + 21, 24, 18, -1, 21, 18, -1, 22, 16, 37, + 15, -1, 22, 24, 16, 37, 15, -1, 22, 24, + 18, -1, 22, 18, -1, 8, 16, 36, 15, -1, + 8, 24, 16, 36, 15, -1, 8, 24, 18, -1, + 8, 18, -1, 36, 17, 39, -1, 39, -1, 37, + 17, 40, -1, 40, -1, 5, 16, 45, 15, -1, + 5, 24, 16, 45, 15, -1, 5, 24, 18, -1, + 5, 18, -1, 16, 45, 15, -1, 18, -1, 16, + 44, 15, -1, 11, 16, 42, 15, -1, 11, 24, + 16, 42, 15, -1, 11, 24, 18, -1, 11, 18, + -1, 42, 17, 43, -1, 43, -1, 56, -1, 55, + -1, 48, -1, 54, -1, 44, 17, 46, -1, 46, + -1, 45, 17, 47, -1, 47, -1, 16, 64, 15, + -1, 16, 64, 15, -1, 12, 16, 49, 15, -1, + 12, 24, 16, 49, 15, -1, 12, 24, 18, -1, + 12, 18, -1, 49, 17, 54, -1, 49, 17, 55, + -1, 49, 17, 56, -1, 54, -1, 55, -1, 56, + -1, 10, 16, 51, 15, -1, 10, 24, 16, 51, + 15, -1, 10, 24, 18, -1, 10, 18, -1, 51, + 17, 54, -1, 51, 17, 48, -1, 51, 17, 55, + -1, 51, 17, 56, -1, 54, -1, 48, -1, 55, + -1, 56, -1, 7, 16, 53, 15, -1, 7, 24, + 16, 53, 15, -1, 7, 24, 18, -1, 7, 18, + -1, 53, 17, 56, -1, 56, -1, 13, 16, 64, + 15, -1, 13, 24, 16, 64, 15, -1, 13, 24, + 18, -1, 13, 18, -1, 4, 16, 64, 15, -1, + 4, 24, 16, 64, 15, -1, 4, 24, 18, -1, + 4, 18, -1, 16, 64, 15, -1, 18, -1, 57, + 17, 59, -1, 59, -1, 20, 16, 16, 64, 15, + 15, -1, 20, 24, 16, 16, 64, 15, 15, -1, + 20, 24, 18, -1, 20, 18, -1, 16, 16, 64, + 15, 15, -1, 6, 16, 61, 15, -1, 6, 24, + 16, 61, 15, -1, 6, 24, 18, -1, 6, 18, + -1, 61, 17, 62, -1, 62, -1, 65, -1, 16, + 65, 15, -1, 18, -1, 3, 16, 64, 15, -1, + 3, 24, 16, 64, 15, -1, 3, 24, 18, -1, + 3, 18, -1, 64, 17, 65, -1, 65, -1, 23, + 23, -1, 23, 23, 23, -1, 23, 23, 23, 23, + -1 +}; + +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ +static const yytype_uint16 yyrline[] = +{ + 0, 207, 207, 209, 213, 214, 215, 216, 217, 218, + 219, 220, 221, 222, 223, 224, 225, 226, 227, 230, + 232, 234, 236, 240, 242, 246, 248, 250, 252, 256, + 258, 260, 262, 264, 266, 270, 272, 274, 276, 280, + 282, 284, 286, 290, 292, 294, 296, 300, 302, 306, + 308, 312, 314, 316, 318, 322, 324, 328, 331, 333, + 335, 337, 341, 343, 347, 348, 349, 350, 353, 355, + 359, 361, 365, 368, 371, 373, 375, 377, 381, 383, + 385, 387, 389, 391, 395, 397, 399, 401, 405, 407, + 409, 411, 413, 415, 417, 419, 423, 425, 427, 429, + 433, 435, 439, 441, 443, 445, 449, 451, 453, 455, + 459, 461, 465, 467, 471, 473, 475, 477, 481, 485, + 487, 489, 491, 495, 497, 501, 503, 505, 509, 511, + 513, 515, 519, 521, 525, 527, 529 +}; +#endif + +#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "$end", "error", "$undefined", "POINT_TOK", "LINESTRING_TOK", + "POLYGON_TOK", "MPOINT_TOK", "MLINESTRING_TOK", "MPOLYGON_TOK", + "MSURFACE_TOK", "MCURVE_TOK", "CURVEPOLYGON_TOK", "COMPOUNDCURVE_TOK", + "CIRCULARSTRING_TOK", "COLLECTION_TOK", "RBRACKET_TOK", "LBRACKET_TOK", + "COMMA_TOK", "EMPTY_TOK", "SEMICOLON_TOK", "TRIANGLE_TOK", "TIN_TOK", + "POLYHEDRALSURFACE_TOK", "DOUBLE_TOK", "DIMENSIONALITY_TOK", "SRID_TOK", + "$accept", "geometry", "geometry_no_srid", "geometrycollection", + "geometry_list", "multisurface", "surface_list", "tin", + "polyhedralsurface", "multipolygon", "polygon_list", "patch_list", + "polygon", "polygon_untagged", "patch", "curvepolygon", "curvering_list", + "curvering", "patchring_list", "ring_list", "patchring", "ring", + "compoundcurve", "compound_list", "multicurve", "curve_list", + "multilinestring", "linestring_list", "circularstring", "linestring", + "linestring_untagged", "triangle_list", "triangle", "triangle_untagged", + "multipoint", "point_list", "point_untagged", "point", "ptarray", + "coordinate", 0 +}; +#endif + +# ifdef YYPRINT +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to + token YYLEX-NUM. */ +static const yytype_uint16 yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280 +}; +# endif + +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 26, 27, 27, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, + 29, 29, 29, 30, 30, 31, 31, 31, 31, 32, + 32, 32, 32, 32, 32, 33, 33, 33, 33, 34, + 34, 34, 34, 35, 35, 35, 35, 36, 36, 37, + 37, 38, 38, 38, 38, 39, 39, 40, 41, 41, + 41, 41, 42, 42, 43, 43, 43, 43, 44, 44, + 45, 45, 46, 47, 48, 48, 48, 48, 49, 49, + 49, 49, 49, 49, 50, 50, 50, 50, 51, 51, + 51, 51, 51, 51, 51, 51, 52, 52, 52, 52, + 53, 53, 54, 54, 54, 54, 55, 55, 55, 55, + 56, 56, 57, 57, 58, 58, 58, 58, 59, 60, + 60, 60, 60, 61, 61, 62, 62, 62, 63, 63, + 63, 63, 64, 64, 65, 65, 65 +}; + +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 1, 3, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, + 5, 3, 2, 3, 1, 4, 5, 3, 2, 3, + 3, 3, 1, 1, 1, 4, 5, 3, 2, 4, + 5, 3, 2, 4, 5, 3, 2, 3, 1, 3, + 1, 4, 5, 3, 2, 3, 1, 3, 4, 5, + 3, 2, 3, 1, 1, 1, 1, 1, 3, 1, + 3, 1, 3, 3, 4, 5, 3, 2, 3, 3, + 3, 1, 1, 1, 4, 5, 3, 2, 3, 3, + 3, 3, 1, 1, 1, 1, 4, 5, 3, 2, + 3, 1, 4, 5, 3, 2, 4, 5, 3, 2, + 3, 1, 3, 1, 6, 7, 3, 2, 5, 4, + 5, 3, 2, 3, 1, 1, 3, 1, 4, 5, + 3, 2, 3, 1, 2, 3, 4 +}; + +/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE doesn't specify something else to do. Zero + means the default is an error. */ +static const yytype_uint8 yydefact[] = +{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 2, 18, + 13, 15, 16, 12, 8, 9, 7, 14, 11, 6, + 5, 17, 10, 4, 0, 131, 0, 0, 109, 0, + 0, 54, 0, 0, 122, 0, 0, 99, 0, 0, + 46, 0, 0, 28, 0, 0, 87, 0, 0, 61, + 0, 0, 77, 0, 0, 105, 0, 0, 22, 0, + 0, 117, 0, 0, 38, 0, 0, 42, 0, 0, + 1, 0, 0, 133, 0, 130, 0, 0, 108, 0, + 0, 71, 0, 53, 0, 127, 0, 124, 125, 0, + 121, 0, 111, 0, 101, 0, 98, 0, 56, 0, + 48, 0, 45, 0, 32, 34, 33, 0, 27, 93, + 0, 92, 94, 95, 0, 86, 0, 63, 66, 67, + 65, 64, 0, 60, 0, 81, 82, 83, 0, 76, + 0, 0, 104, 24, 0, 0, 21, 0, 0, 116, + 0, 0, 113, 0, 37, 0, 0, 50, 0, 41, + 3, 134, 128, 0, 0, 106, 0, 0, 51, 0, + 0, 0, 119, 0, 0, 0, 96, 0, 0, 0, + 43, 0, 0, 25, 0, 0, 84, 0, 0, 58, + 0, 0, 74, 0, 0, 102, 0, 19, 0, 0, + 0, 0, 0, 35, 0, 0, 0, 0, 69, 39, + 0, 0, 135, 132, 129, 107, 73, 70, 52, 126, + 123, 120, 110, 100, 97, 55, 47, 44, 29, 31, + 30, 26, 89, 88, 90, 91, 85, 62, 59, 78, + 79, 80, 75, 103, 23, 20, 0, 0, 0, 112, + 36, 0, 57, 0, 49, 40, 136, 114, 0, 0, + 72, 68, 115, 118 +}; + +/* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int16 yydefgoto[] = +{ + -1, 17, 143, 19, 144, 20, 113, 21, 22, 23, + 109, 156, 24, 110, 157, 25, 126, 127, 207, 90, + 208, 91, 26, 134, 27, 120, 28, 103, 29, 30, + 131, 151, 31, 152, 32, 96, 97, 33, 82, 83 +}; + +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +#define YYPACT_NINF -90 +static const yytype_int16 yypact[] = +{ + 109, -2, 16, 23, 26, 36, 39, 40, 52, 53, + 74, 79, 83, 84, 108, 137, 7, 46, -90, -90, + -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, + -90, -90, -90, -90, 43, -90, 27, 43, -90, 88, + 33, -90, 144, 140, -90, 167, 175, -90, 176, 179, + -90, 183, 20, -90, 184, 11, -90, 187, 11, -90, + 188, 17, -90, 191, 43, -90, 192, 168, -90, 195, + 51, -90, 196, 56, -90, 199, 70, -90, 200, 168, + -90, 68, 110, -90, 43, -90, 169, 43, -90, 43, + 204, -90, 33, -90, 43, -90, 205, -90, -90, 140, + -90, 43, -90, 208, -90, 175, -90, 33, -90, 209, + -90, 179, -90, 212, -90, -90, -90, 20, -90, -90, + 213, -90, -90, -90, 11, -90, 216, -90, -90, -90, + -90, -90, 11, -90, 217, -90, -90, -90, 17, -90, + 220, 43, -90, -90, 221, 168, -90, 43, 80, -90, + 93, 224, -90, 56, -90, 94, 225, -90, 70, -90, + -90, 105, -90, 43, 228, -90, 229, 232, -90, 33, + 233, 44, -90, 140, 236, 237, -90, 175, 240, 241, + -90, 179, 244, -90, 20, 245, -90, 11, 248, -90, + 11, 249, -90, 17, 252, -90, 253, -90, 168, 256, + 257, 43, 43, -90, 56, 260, 43, 261, -90, -90, + 70, 264, 112, -90, -90, -90, -90, -90, -90, -90, + -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, + -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, + -90, -90, -90, -90, -90, -90, 47, 265, 268, -90, + -90, 269, -90, 94, -90, -90, -90, -90, 131, 132, + -90, -90, -90, -90 +}; + +/* YYPGOTO[NTERM-NUM]. */ +static const yytype_int16 yypgoto[] = +{ + -90, -90, 0, -90, 5, -90, 37, -90, -90, -90, + 48, 6, -39, -33, -42, -32, 55, -21, -90, -89, + -57, 118, -50, 150, -90, 165, -90, 185, -51, -49, + -44, 138, -90, 89, -90, 193, 121, -90, -36, -6 +}; + +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule which + number is the opposite. If YYTABLE_NINF, syntax error. */ +#define YYTABLE_NINF -1 +static const yytype_uint16 yytable[] = +{ + 18, 86, 104, 170, 121, 119, 122, 129, 128, 130, + 135, 123, 136, 114, 34, 2, 35, 137, 179, 115, + 116, 2, 36, 10, 11, 3, 79, 101, 140, 102, + 11, 9, 37, 101, 38, 102, 107, 98, 108, 40, + 39, 41, 43, 84, 44, 85, 80, 42, 164, 89, + 45, 166, 46, 167, 47, 49, 52, 50, 53, 219, + 48, 104, 257, 51, 54, 175, 81, 147, 55, 58, + 56, 59, 150, 121, 119, 122, 57, 60, 114, 160, + 123, 129, 128, 130, 115, 116, 155, 135, 171, 136, + 61, 161, 62, 98, 137, 64, 201, 65, 63, 67, + 70, 68, 71, 66, 87, 196, 88, 69, 72, 202, + 206, 200, 1, 2, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 12, 73, 162, 74, 163, 212, 13, + 14, 15, 75, 223, 16, 256, 233, 232, 234, 129, + 128, 130, 239, 235, 240, 228, 262, 263, 226, 241, + 199, 229, 230, 76, 185, 77, 94, 213, 95, 182, + 92, 78, 93, 81, 211, 247, 248, 98, 254, 237, + 251, 1, 2, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 99, 165, 100, 163, 191, 13, 14, + 15, 101, 105, 102, 106, 107, 261, 108, 244, 111, + 117, 112, 118, 124, 132, 125, 133, 138, 141, 139, + 142, 145, 148, 146, 149, 153, 158, 154, 159, 168, + 172, 169, 173, 176, 180, 177, 181, 183, 186, 184, + 187, 189, 192, 190, 193, 195, 197, 163, 198, 203, + 209, 204, 210, 214, 215, 163, 163, 216, 218, 163, + 169, 221, 222, 173, 163, 224, 225, 177, 169, 227, + 231, 181, 184, 236, 238, 187, 190, 242, 243, 193, + 163, 245, 246, 198, 163, 250, 252, 204, 253, 255, + 258, 210, 163, 259, 260, 163, 163, 217, 194, 188, + 178, 205, 174, 249, 220 +}; + +#define yypact_value_is_default(yystate) \ + ((yystate) == (-90)) + +#define yytable_value_is_error(yytable_value) \ + YYID (0) + +static const yytype_uint8 yycheck[] = +{ + 0, 37, 46, 92, 55, 55, 55, 58, 58, 58, + 61, 55, 61, 52, 16, 4, 18, 61, 107, 52, + 52, 4, 24, 12, 13, 5, 19, 16, 64, 18, + 13, 11, 16, 16, 18, 18, 16, 43, 18, 16, + 24, 18, 16, 16, 18, 18, 0, 24, 84, 16, + 24, 87, 16, 89, 18, 16, 16, 18, 18, 15, + 24, 105, 15, 24, 24, 101, 23, 16, 16, 16, + 18, 18, 16, 124, 124, 124, 24, 24, 117, 79, + 124, 132, 132, 132, 117, 117, 16, 138, 94, 138, + 16, 23, 18, 99, 138, 16, 16, 18, 24, 16, + 16, 18, 18, 24, 16, 141, 18, 24, 24, 16, + 16, 147, 3, 4, 5, 6, 7, 8, 9, 10, + 11, 12, 13, 14, 16, 15, 18, 17, 23, 20, + 21, 22, 24, 177, 25, 23, 187, 187, 187, 190, + 190, 190, 193, 187, 193, 184, 15, 15, 181, 193, + 145, 184, 184, 16, 117, 18, 16, 163, 18, 111, + 16, 24, 18, 23, 158, 201, 202, 173, 210, 190, + 206, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 16, 15, 18, 17, 132, 20, 21, + 22, 16, 16, 18, 18, 16, 253, 18, 198, 16, + 16, 18, 18, 16, 16, 18, 18, 16, 16, 18, + 18, 16, 16, 18, 18, 16, 16, 18, 18, 15, + 15, 17, 17, 15, 15, 17, 17, 15, 15, 17, + 17, 15, 15, 17, 17, 15, 15, 17, 17, 15, + 15, 17, 17, 15, 15, 17, 17, 15, 15, 17, + 17, 15, 15, 17, 17, 15, 15, 17, 17, 15, + 15, 17, 17, 15, 15, 17, 17, 15, 15, 17, + 17, 15, 15, 17, 17, 15, 15, 17, 17, 15, + 15, 17, 17, 15, 15, 17, 17, 169, 138, 124, + 105, 153, 99, 204, 173 +}; + +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const yytype_uint8 yystos[] = +{ + 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 20, 21, 22, 25, 27, 28, 29, + 31, 33, 34, 35, 38, 41, 48, 50, 52, 54, + 55, 58, 60, 63, 16, 18, 24, 16, 18, 24, + 16, 18, 24, 16, 18, 24, 16, 18, 24, 16, + 18, 24, 16, 18, 24, 16, 18, 24, 16, 18, + 24, 16, 18, 24, 16, 18, 24, 16, 18, 24, + 16, 18, 24, 16, 18, 24, 16, 18, 24, 19, + 0, 23, 64, 65, 16, 18, 64, 16, 18, 16, + 45, 47, 16, 18, 16, 18, 61, 62, 65, 16, + 18, 16, 18, 53, 56, 16, 18, 16, 18, 36, + 39, 16, 18, 32, 38, 39, 41, 16, 18, 48, + 51, 54, 55, 56, 16, 18, 42, 43, 48, 54, + 55, 56, 16, 18, 49, 54, 55, 56, 16, 18, + 64, 16, 18, 28, 30, 16, 18, 16, 16, 18, + 16, 57, 59, 16, 18, 16, 37, 40, 16, 18, + 28, 23, 15, 17, 64, 15, 64, 64, 15, 17, + 45, 65, 15, 17, 61, 64, 15, 17, 53, 45, + 15, 17, 36, 15, 17, 32, 15, 17, 51, 15, + 17, 42, 15, 17, 49, 15, 64, 15, 17, 30, + 64, 16, 16, 15, 17, 57, 16, 44, 46, 15, + 17, 37, 23, 65, 15, 15, 15, 47, 15, 15, + 62, 15, 15, 56, 15, 15, 39, 15, 38, 39, + 41, 15, 48, 54, 55, 56, 15, 43, 15, 54, + 55, 56, 15, 15, 28, 15, 15, 64, 64, 59, + 15, 64, 15, 17, 40, 15, 23, 15, 15, 15, + 15, 46, 15, 15 +}; + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +/* Like YYERROR except do call yyerror. This remains here temporarily + to ease the transition to the new meaning of YYERROR, for GCC. + Once GCC version 2 has supplanted version 1, this can go. However, + YYFAIL appears to be in use. Nevertheless, it is formally deprecated + in Bison 2.4.2's NEWS entry, where a plan to phase it out is + discussed. */ + +#define YYFAIL goto yyerrlab +#if defined YYFAIL + /* This is here to suppress warnings from the GCC cpp's + -Wunused-macros. Normally we don't worry about that warning, but + some users do, and we want to make it easy for users to remove + YYFAIL uses, which will produce warnings from Bison 2.5. */ +#endif + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY && yylen == 1) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (1); \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ +while (YYID (0)) + + +#define YYTERROR 1 +#define YYERRCODE 256 + + +/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. + If N is 0, then set CURRENT to the empty location which ends + the previous symbol: RHS[0] (always defined). */ + +#define YYRHSLOC(Rhs, K) ((Rhs)[K]) +#ifndef YYLLOC_DEFAULT +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (YYID (N)) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (YYID (0)) +#endif + + +/* YY_LOCATION_PRINT -- Print the location on the stream. + This macro was not mandated originally: define only if we know + we won't break user code: when these are the locations we know. */ + +#ifndef YY_LOCATION_PRINT +# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL +# define YY_LOCATION_PRINT(File, Loc) \ + fprintf (File, "%d.%d-%d.%d", \ + (Loc).first_line, (Loc).first_column, \ + (Loc).last_line, (Loc).last_column) +# else +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif +#endif + + +/* YYLEX -- calling `yylex' with the right arguments. */ + +#ifdef YYLEX_PARAM +# define YYLEX yylex (YYLEX_PARAM) +#else +# define YYLEX yylex () +#endif + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (YYID (0)) + +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value, Location); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (YYID (0)) + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp) +#else +static void +yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; + YYLTYPE const * const yylocationp; +#endif +{ + if (!yyvaluep) + return; + YYUSE (yylocationp); +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# else + YYUSE (yyoutput); +# endif + switch (yytype) + { + default: + break; + } +} + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp) +#else +static void +yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; + YYLTYPE const * const yylocationp; +#endif +{ + if (yytype < YYNTOKENS) + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + + YY_LOCATION_PRINT (yyoutput, *yylocationp); + YYFPRINTF (yyoutput, ": "); + yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp); + YYFPRINTF (yyoutput, ")"); +} + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) +#else +static void +yy_stack_print (yybottom, yytop) + yytype_int16 *yybottom; + yytype_int16 *yytop; +#endif +{ + YYFPRINTF (stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (YYID (0)) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule) +#else +static void +yy_reduce_print (yyvsp, yylsp, yyrule) + YYSTYPE *yyvsp; + YYLTYPE *yylsp; + int yyrule; +#endif +{ + int yynrhs = yyr2[yyrule]; + int yyi; + unsigned long int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], + &(yyvsp[(yyi + 1) - (yynrhs)]) + , &(yylsp[(yyi + 1) - (yynrhs)]) ); + YYFPRINTF (stderr, "\n"); + } +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyvsp, yylsp, Rule); \ +} while (YYID (0)) + +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + +#if YYERROR_VERBOSE + +# ifndef yystrlen +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen strlen +# else +/* Return the length of YYSTR. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static YYSIZE_T +yystrlen (const char *yystr) +#else +static YYSIZE_T +yystrlen (yystr) + const char *yystr; +#endif +{ + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) + continue; + return yylen; +} +# endif +# endif + +# ifndef yystpcpy +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static char * +yystpcpy (char *yydest, const char *yysrc) +#else +static char * +yystpcpy (yydest, yysrc) + char *yydest; + const char *yysrc; +#endif +{ + char *yyd = yydest; + const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +# ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYSIZE_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYSIZE_T yyn = 0; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } + + if (! yyres) + return yystrlen (yystr); + + return yystpcpy (yyres, yystr) - yyres; +} +# endif + +/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message + about the unexpected token YYTOKEN for the state stack whose top is + YYSSP. + + Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is + not large enough to hold the message. In that case, also set + *YYMSG_ALLOC to the required number of bytes. Return 2 if the + required number of bytes is too large to store. */ +static int +yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + yytype_int16 *yyssp, int yytoken) +{ + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + /* Internationalized format string. */ + const char *yyformat = 0; + /* Arguments of yyformat. */ + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + /* Number of reported tokens (one for the "unexpected", one per + "expected"). */ + int yycount = 0; + + /* There are many possibilities here to consider: + - Assume YYFAIL is not used. It's too flawed to consider. See + + for details. YYERROR is fine as it does not invoke this + function. + - If this state is a consistent state with a default action, then + the only way this function was invoked is if the default action + is an error action. In that case, don't check for expected + tokens because there are none. + - The only way there can be no lookahead present (in yychar) is if + this state is a consistent state with a default action. Thus, + detecting the absence of a lookahead is sufficient to determine + that there is no unexpected or expected token to report. In that + case, just report a simple "syntax error". + - Don't assume there isn't a lookahead just because this state is a + consistent state with a default action. There might have been a + previous inconsistent state, consistent state with a non-default + action, or user semantic action that manipulated yychar. + - Of course, the expected token list depends on states to have + correct lookahead information, and it depends on the parser not + to perform extra reductions after fetching a lookahead from the + scanner and before detecting a syntax error. Thus, state merging + (from LALR or IELR) and default reductions corrupt the expected + token list. However, the list is correct for canonical LR with + one exception: it will still contain any token that will not be + accepted due to an error action in a later state. + */ + if (yytoken != YYEMPTY) + { + int yyn = yypact[*yyssp]; + yyarg[yycount++] = yytname[yytoken]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + } + } + + switch (yycount) + { +# define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break + YYCASE_(0, YY_("syntax error")); + YYCASE_(1, YY_("syntax error, unexpected %s")); + YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); + YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); + YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); + YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); +# undef YYCASE_ + } + + yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + + if (*yymsg_alloc < yysize) + { + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return 1; + } + + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + { + char *yyp = *yymsg; + int yyi = 0; + while ((*yyp = *yyformat) != '\0') + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyformat += 2; + } + else + { + yyp++; + yyformat++; + } + } + return 0; +} +#endif /* YYERROR_VERBOSE */ + +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp) +#else +static void +yydestruct (yymsg, yytype, yyvaluep, yylocationp) + const char *yymsg; + int yytype; + YYSTYPE *yyvaluep; + YYLTYPE *yylocationp; +#endif +{ + YYUSE (yyvaluep); + YYUSE (yylocationp); + + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + + switch (yytype) + { + case 28: /* "geometry_no_srid" */ + +/* Line 1391 of yacc.c */ +#line 185 "lwin_wkt_parse.y" + { lwgeom_free((yyvaluep->geometryvalue)); }; + +/* Line 1391 of yacc.c */ +#line 1496 "y.tab.c" + break; + case 29: /* "geometrycollection" */ + +/* Line 1391 of yacc.c */ +#line 186 "lwin_wkt_parse.y" + { lwgeom_free((yyvaluep->geometryvalue)); }; + +/* Line 1391 of yacc.c */ +#line 1505 "y.tab.c" + break; + case 31: /* "multisurface" */ + +/* Line 1391 of yacc.c */ +#line 193 "lwin_wkt_parse.y" + { lwgeom_free((yyvaluep->geometryvalue)); }; + +/* Line 1391 of yacc.c */ +#line 1514 "y.tab.c" + break; + case 32: /* "surface_list" */ + +/* Line 1391 of yacc.c */ +#line 172 "lwin_wkt_parse.y" + { lwgeom_free((yyvaluep->geometryvalue)); }; + +/* Line 1391 of yacc.c */ +#line 1523 "y.tab.c" + break; + case 33: /* "tin" */ + +/* Line 1391 of yacc.c */ +#line 200 "lwin_wkt_parse.y" + { lwgeom_free((yyvaluep->geometryvalue)); }; + +/* Line 1391 of yacc.c */ +#line 1532 "y.tab.c" + break; + case 34: /* "polyhedralsurface" */ + +/* Line 1391 of yacc.c */ +#line 199 "lwin_wkt_parse.y" + { lwgeom_free((yyvaluep->geometryvalue)); }; + +/* Line 1391 of yacc.c */ +#line 1541 "y.tab.c" + break; + case 35: /* "multipolygon" */ + +/* Line 1391 of yacc.c */ +#line 192 "lwin_wkt_parse.y" + { lwgeom_free((yyvaluep->geometryvalue)); }; + +/* Line 1391 of yacc.c */ +#line 1550 "y.tab.c" + break; + case 36: /* "polygon_list" */ + +/* Line 1391 of yacc.c */ +#line 173 "lwin_wkt_parse.y" + { lwgeom_free((yyvaluep->geometryvalue)); }; + +/* Line 1391 of yacc.c */ +#line 1559 "y.tab.c" + break; + case 37: /* "patch_list" */ + +/* Line 1391 of yacc.c */ +#line 174 "lwin_wkt_parse.y" + { lwgeom_free((yyvaluep->geometryvalue)); }; + +/* Line 1391 of yacc.c */ +#line 1568 "y.tab.c" + break; + case 38: /* "polygon" */ + +/* Line 1391 of yacc.c */ +#line 196 "lwin_wkt_parse.y" + { lwgeom_free((yyvaluep->geometryvalue)); }; + +/* Line 1391 of yacc.c */ +#line 1577 "y.tab.c" + break; + case 39: /* "polygon_untagged" */ + +/* Line 1391 of yacc.c */ +#line 198 "lwin_wkt_parse.y" + { lwgeom_free((yyvaluep->geometryvalue)); }; + +/* Line 1391 of yacc.c */ +#line 1586 "y.tab.c" + break; + case 40: /* "patch" */ + +/* Line 1391 of yacc.c */ +#line 197 "lwin_wkt_parse.y" + { lwgeom_free((yyvaluep->geometryvalue)); }; + +/* Line 1391 of yacc.c */ +#line 1595 "y.tab.c" + break; + case 41: /* "curvepolygon" */ + +/* Line 1391 of yacc.c */ +#line 183 "lwin_wkt_parse.y" + { lwgeom_free((yyvaluep->geometryvalue)); }; + +/* Line 1391 of yacc.c */ +#line 1604 "y.tab.c" + break; + case 42: /* "curvering_list" */ + +/* Line 1391 of yacc.c */ +#line 170 "lwin_wkt_parse.y" + { lwgeom_free((yyvaluep->geometryvalue)); }; + +/* Line 1391 of yacc.c */ +#line 1613 "y.tab.c" + break; + case 43: /* "curvering" */ + +/* Line 1391 of yacc.c */ +#line 184 "lwin_wkt_parse.y" + { lwgeom_free((yyvaluep->geometryvalue)); }; + +/* Line 1391 of yacc.c */ +#line 1622 "y.tab.c" + break; + case 44: /* "patchring_list" */ + +/* Line 1391 of yacc.c */ +#line 180 "lwin_wkt_parse.y" + { lwgeom_free((yyvaluep->geometryvalue)); }; + +/* Line 1391 of yacc.c */ +#line 1631 "y.tab.c" + break; + case 45: /* "ring_list" */ + +/* Line 1391 of yacc.c */ +#line 179 "lwin_wkt_parse.y" + { lwgeom_free((yyvaluep->geometryvalue)); }; + +/* Line 1391 of yacc.c */ +#line 1640 "y.tab.c" + break; + case 46: /* "patchring" */ + +/* Line 1391 of yacc.c */ +#line 169 "lwin_wkt_parse.y" + { ptarray_free((yyvaluep->ptarrayvalue)); }; + +/* Line 1391 of yacc.c */ +#line 1649 "y.tab.c" + break; + case 47: /* "ring" */ + +/* Line 1391 of yacc.c */ +#line 168 "lwin_wkt_parse.y" + { ptarray_free((yyvaluep->ptarrayvalue)); }; + +/* Line 1391 of yacc.c */ +#line 1658 "y.tab.c" + break; + case 48: /* "compoundcurve" */ + +/* Line 1391 of yacc.c */ +#line 182 "lwin_wkt_parse.y" + { lwgeom_free((yyvaluep->geometryvalue)); }; + +/* Line 1391 of yacc.c */ +#line 1667 "y.tab.c" + break; + case 49: /* "compound_list" */ + +/* Line 1391 of yacc.c */ +#line 178 "lwin_wkt_parse.y" + { lwgeom_free((yyvaluep->geometryvalue)); }; + +/* Line 1391 of yacc.c */ +#line 1676 "y.tab.c" + break; + case 50: /* "multicurve" */ + +/* Line 1391 of yacc.c */ +#line 189 "lwin_wkt_parse.y" + { lwgeom_free((yyvaluep->geometryvalue)); }; + +/* Line 1391 of yacc.c */ +#line 1685 "y.tab.c" + break; + case 51: /* "curve_list" */ + +/* Line 1391 of yacc.c */ +#line 177 "lwin_wkt_parse.y" + { lwgeom_free((yyvaluep->geometryvalue)); }; + +/* Line 1391 of yacc.c */ +#line 1694 "y.tab.c" + break; + case 52: /* "multilinestring" */ + +/* Line 1391 of yacc.c */ +#line 190 "lwin_wkt_parse.y" + { lwgeom_free((yyvaluep->geometryvalue)); }; + +/* Line 1391 of yacc.c */ +#line 1703 "y.tab.c" + break; + case 53: /* "linestring_list" */ + +/* Line 1391 of yacc.c */ +#line 176 "lwin_wkt_parse.y" + { lwgeom_free((yyvaluep->geometryvalue)); }; + +/* Line 1391 of yacc.c */ +#line 1712 "y.tab.c" + break; + case 54: /* "circularstring" */ + +/* Line 1391 of yacc.c */ +#line 181 "lwin_wkt_parse.y" + { lwgeom_free((yyvaluep->geometryvalue)); }; + +/* Line 1391 of yacc.c */ +#line 1721 "y.tab.c" + break; + case 55: /* "linestring" */ + +/* Line 1391 of yacc.c */ +#line 187 "lwin_wkt_parse.y" + { lwgeom_free((yyvaluep->geometryvalue)); }; + +/* Line 1391 of yacc.c */ +#line 1730 "y.tab.c" + break; + case 56: /* "linestring_untagged" */ + +/* Line 1391 of yacc.c */ +#line 188 "lwin_wkt_parse.y" + { lwgeom_free((yyvaluep->geometryvalue)); }; + +/* Line 1391 of yacc.c */ +#line 1739 "y.tab.c" + break; + case 57: /* "triangle_list" */ + +/* Line 1391 of yacc.c */ +#line 171 "lwin_wkt_parse.y" + { lwgeom_free((yyvaluep->geometryvalue)); }; + +/* Line 1391 of yacc.c */ +#line 1748 "y.tab.c" + break; + case 58: /* "triangle" */ + +/* Line 1391 of yacc.c */ +#line 201 "lwin_wkt_parse.y" + { lwgeom_free((yyvaluep->geometryvalue)); }; + +/* Line 1391 of yacc.c */ +#line 1757 "y.tab.c" + break; + case 59: /* "triangle_untagged" */ + +/* Line 1391 of yacc.c */ +#line 202 "lwin_wkt_parse.y" + { lwgeom_free((yyvaluep->geometryvalue)); }; + +/* Line 1391 of yacc.c */ +#line 1766 "y.tab.c" + break; + case 60: /* "multipoint" */ + +/* Line 1391 of yacc.c */ +#line 191 "lwin_wkt_parse.y" + { lwgeom_free((yyvaluep->geometryvalue)); }; + +/* Line 1391 of yacc.c */ +#line 1775 "y.tab.c" + break; + case 61: /* "point_list" */ + +/* Line 1391 of yacc.c */ +#line 175 "lwin_wkt_parse.y" + { lwgeom_free((yyvaluep->geometryvalue)); }; + +/* Line 1391 of yacc.c */ +#line 1784 "y.tab.c" + break; + case 62: /* "point_untagged" */ + +/* Line 1391 of yacc.c */ +#line 195 "lwin_wkt_parse.y" + { lwgeom_free((yyvaluep->geometryvalue)); }; + +/* Line 1391 of yacc.c */ +#line 1793 "y.tab.c" + break; + case 63: /* "point" */ + +/* Line 1391 of yacc.c */ +#line 194 "lwin_wkt_parse.y" + { lwgeom_free((yyvaluep->geometryvalue)); }; + +/* Line 1391 of yacc.c */ +#line 1802 "y.tab.c" + break; + case 64: /* "ptarray" */ + +/* Line 1391 of yacc.c */ +#line 167 "lwin_wkt_parse.y" + { ptarray_free((yyvaluep->ptarrayvalue)); }; + +/* Line 1391 of yacc.c */ +#line 1811 "y.tab.c" + break; + + default: + break; + } +} + + +/* Prevent warnings from -Wmissing-prototypes. */ +#ifdef YYPARSE_PARAM +#if defined __STDC__ || defined __cplusplus +int yyparse (void *YYPARSE_PARAM); +#else +int yyparse (); +#endif +#else /* ! YYPARSE_PARAM */ +#if defined __STDC__ || defined __cplusplus +int yyparse (void); +#else +int yyparse (); +#endif +#endif /* ! YYPARSE_PARAM */ + + +/* The lookahead symbol. */ +int yychar; + +/* The semantic value of the lookahead symbol. */ +YYSTYPE yylval; + +/* Location data for the lookahead symbol. */ +YYLTYPE yylloc; + +/* Number of syntax errors so far. */ +int yynerrs; + + +/*----------. +| yyparse. | +`----------*/ + +#ifdef YYPARSE_PARAM +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void *YYPARSE_PARAM) +#else +int +yyparse (YYPARSE_PARAM) + void *YYPARSE_PARAM; +#endif +#else /* ! YYPARSE_PARAM */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void) +#else +int +yyparse () + +#endif +#endif +{ + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + + /* The stacks and their tools: + `yyss': related to states. + `yyvs': related to semantic values. + `yyls': related to locations. + + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss; + yytype_int16 *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; + + /* The location stack. */ + YYLTYPE yylsa[YYINITDEPTH]; + YYLTYPE *yyls; + YYLTYPE *yylsp; + + /* The locations where the error started and ended. */ + YYLTYPE yyerror_range[3]; + + YYSIZE_T yystacksize; + + int yyn; + int yyresult; + /* Lookahead token as an internal (translated) token number. */ + int yytoken; + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + YYLTYPE yyloc; + +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) + + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; + + yytoken = 0; + yyss = yyssa; + yyvs = yyvsa; + yyls = yylsa; + yystacksize = YYINITDEPTH; + + YYDPRINTF ((stderr, "Starting parse\n")); + + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + + /* Initialize stack pointers. + Waste one element of value and location stack + so that they stay on the same level as the state stack. + The wasted elements are never initialized. */ + yyssp = yyss; + yyvsp = yyvs; + yylsp = yyls; + +#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL + /* Initialize the default location before parsing starts. */ + yylloc.first_line = yylloc.last_line = 1; + yylloc.first_column = yylloc.last_column = 1; +#endif + + goto yysetstate; + +/*------------------------------------------------------------. +| yynewstate -- Push a new state, which is found in yystate. | +`------------------------------------------------------------*/ + yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. So pushing a state here evens the stacks. */ + yyssp++; + + yysetstate: + *yyssp = yystate; + + if (yyss + yystacksize - 1 <= yyssp) + { + /* Get the current used size of the three stacks, in elements. */ + YYSIZE_T yysize = yyssp - yyss + 1; + +#ifdef yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + YYLTYPE *yyls1 = yyls; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yyls1, yysize * sizeof (*yylsp), + &yystacksize); + + yyls = yyls1; + yyss = yyss1; + yyvs = yyvs1; + } +#else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyexhaustedlab; +# else + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyexhaustedlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); + YYSTACK_RELOCATE (yyls_alloc, yyls); +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif +#endif /* no yyoverflow */ + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + yylsp = yyls + yysize - 1; + + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } + + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + + if (yystate == YYFINAL) + YYACCEPT; + + goto yybackup; + +/*-----------. +| yybackup. | +`-----------*/ +yybackup: + + /* Do appropriate processing given the current state. Read a + lookahead token if we need one and don't already have one. */ + + /* First try to decide what to do without reference to lookahead token. */ + yyn = yypact[yystate]; + if (yypact_value_is_default (yyn)) + goto yydefault; + + /* Not known => get a lookahead token if don't already have one. */ + + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token: ")); + yychar = YYLEX; + } + + if (yychar <= YYEOF) + { + yychar = yytoken = YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } + + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) + { + if (yytable_value_is_error (yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + /* Shift the lookahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + + /* Discard the shifted token. */ + yychar = YYEMPTY; + + yystate = yyn; + *++yyvsp = yylval; + *++yylsp = yylloc; + goto yynewstate; + + +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + +/*-----------------------------. +| yyreduce -- Do a reduction. | +`-----------------------------*/ +yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + `$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + /* Default location. */ + YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + case 2: + +/* Line 1806 of yacc.c */ +#line 208 "lwin_wkt_parse.y" + { wkt_parser_geometry_new((yyvsp[(1) - (1)].geometryvalue), SRID_UNKNOWN); WKT_ERROR(); } + break; + + case 3: + +/* Line 1806 of yacc.c */ +#line 210 "lwin_wkt_parse.y" + { wkt_parser_geometry_new((yyvsp[(3) - (3)].geometryvalue), (yyvsp[(1) - (3)].integervalue)); WKT_ERROR(); } + break; + + case 4: + +/* Line 1806 of yacc.c */ +#line 213 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); } + break; + + case 5: + +/* Line 1806 of yacc.c */ +#line 214 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); } + break; + + case 6: + +/* Line 1806 of yacc.c */ +#line 215 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); } + break; + + case 7: + +/* Line 1806 of yacc.c */ +#line 216 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); } + break; + + case 8: + +/* Line 1806 of yacc.c */ +#line 217 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); } + break; + + case 9: + +/* Line 1806 of yacc.c */ +#line 218 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); } + break; + + case 10: + +/* Line 1806 of yacc.c */ +#line 219 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); } + break; + + case 11: + +/* Line 1806 of yacc.c */ +#line 220 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); } + break; + + case 12: + +/* Line 1806 of yacc.c */ +#line 221 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); } + break; + + case 13: + +/* Line 1806 of yacc.c */ +#line 222 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); } + break; + + case 14: + +/* Line 1806 of yacc.c */ +#line 223 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); } + break; + + case 15: + +/* Line 1806 of yacc.c */ +#line 224 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); } + break; + + case 16: + +/* Line 1806 of yacc.c */ +#line 225 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); } + break; + + case 17: + +/* Line 1806 of yacc.c */ +#line 226 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); } + break; + + case 18: + +/* Line 1806 of yacc.c */ +#line 227 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); } + break; + + case 19: + +/* Line 1806 of yacc.c */ +#line 231 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_finalize(COLLECTIONTYPE, (yyvsp[(3) - (4)].geometryvalue), NULL); WKT_ERROR(); } + break; + + case 20: + +/* Line 1806 of yacc.c */ +#line 233 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_finalize(COLLECTIONTYPE, (yyvsp[(4) - (5)].geometryvalue), (yyvsp[(2) - (5)].stringvalue)); WKT_ERROR(); } + break; + + case 21: + +/* Line 1806 of yacc.c */ +#line 235 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_finalize(COLLECTIONTYPE, NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); } + break; + + case 22: + +/* Line 1806 of yacc.c */ +#line 237 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_finalize(COLLECTIONTYPE, NULL, NULL); WKT_ERROR(); } + break; + + case 23: + +/* Line 1806 of yacc.c */ +#line 241 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); } + break; + + case 24: + +/* Line 1806 of yacc.c */ +#line 243 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); } + break; + + case 25: + +/* Line 1806 of yacc.c */ +#line 247 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTISURFACETYPE, (yyvsp[(3) - (4)].geometryvalue), NULL); WKT_ERROR(); } + break; + + case 26: + +/* Line 1806 of yacc.c */ +#line 249 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTISURFACETYPE, (yyvsp[(4) - (5)].geometryvalue), (yyvsp[(2) - (5)].stringvalue)); WKT_ERROR(); } + break; + + case 27: + +/* Line 1806 of yacc.c */ +#line 251 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTISURFACETYPE, NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); } + break; + + case 28: + +/* Line 1806 of yacc.c */ +#line 253 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTISURFACETYPE, NULL, NULL); WKT_ERROR(); } + break; + + case 29: + +/* Line 1806 of yacc.c */ +#line 257 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); } + break; + + case 30: + +/* Line 1806 of yacc.c */ +#line 259 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); } + break; + + case 31: + +/* Line 1806 of yacc.c */ +#line 261 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); } + break; + + case 32: + +/* Line 1806 of yacc.c */ +#line 263 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); } + break; + + case 33: + +/* Line 1806 of yacc.c */ +#line 265 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); } + break; + + case 34: + +/* Line 1806 of yacc.c */ +#line 267 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); } + break; + + case 35: + +/* Line 1806 of yacc.c */ +#line 271 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_finalize(TINTYPE, (yyvsp[(3) - (4)].geometryvalue), NULL); WKT_ERROR(); } + break; + + case 36: + +/* Line 1806 of yacc.c */ +#line 273 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_finalize(TINTYPE, (yyvsp[(4) - (5)].geometryvalue), (yyvsp[(2) - (5)].stringvalue)); WKT_ERROR(); } + break; + + case 37: + +/* Line 1806 of yacc.c */ +#line 275 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_finalize(TINTYPE, NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); } + break; + + case 38: + +/* Line 1806 of yacc.c */ +#line 277 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_finalize(TINTYPE, NULL, NULL); WKT_ERROR(); } + break; + + case 39: + +/* Line 1806 of yacc.c */ +#line 281 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_finalize(POLYHEDRALSURFACETYPE, (yyvsp[(3) - (4)].geometryvalue), NULL); WKT_ERROR(); } + break; + + case 40: + +/* Line 1806 of yacc.c */ +#line 283 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_finalize(POLYHEDRALSURFACETYPE, (yyvsp[(4) - (5)].geometryvalue), (yyvsp[(2) - (5)].stringvalue)); WKT_ERROR(); } + break; + + case 41: + +/* Line 1806 of yacc.c */ +#line 285 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_finalize(POLYHEDRALSURFACETYPE, NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); } + break; + + case 42: + +/* Line 1806 of yacc.c */ +#line 287 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_finalize(POLYHEDRALSURFACETYPE, NULL, NULL); WKT_ERROR(); } + break; + + case 43: + +/* Line 1806 of yacc.c */ +#line 291 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOLYGONTYPE, (yyvsp[(3) - (4)].geometryvalue), NULL); WKT_ERROR(); } + break; + + case 44: + +/* Line 1806 of yacc.c */ +#line 293 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOLYGONTYPE, (yyvsp[(4) - (5)].geometryvalue), (yyvsp[(2) - (5)].stringvalue)); WKT_ERROR(); } + break; + + case 45: + +/* Line 1806 of yacc.c */ +#line 295 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOLYGONTYPE, NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); } + break; + + case 46: + +/* Line 1806 of yacc.c */ +#line 297 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOLYGONTYPE, NULL, NULL); WKT_ERROR(); } + break; + + case 47: + +/* Line 1806 of yacc.c */ +#line 301 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); } + break; + + case 48: + +/* Line 1806 of yacc.c */ +#line 303 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); } + break; + + case 49: + +/* Line 1806 of yacc.c */ +#line 307 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); } + break; + + case 50: + +/* Line 1806 of yacc.c */ +#line 309 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); } + break; + + case 51: + +/* Line 1806 of yacc.c */ +#line 313 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_polygon_finalize((yyvsp[(3) - (4)].geometryvalue), NULL); WKT_ERROR(); } + break; + + case 52: + +/* Line 1806 of yacc.c */ +#line 315 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_polygon_finalize((yyvsp[(4) - (5)].geometryvalue), (yyvsp[(2) - (5)].stringvalue)); WKT_ERROR(); } + break; + + case 53: + +/* Line 1806 of yacc.c */ +#line 317 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_polygon_finalize(NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); } + break; + + case 54: + +/* Line 1806 of yacc.c */ +#line 319 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_polygon_finalize(NULL, NULL); WKT_ERROR(); } + break; + + case 55: + +/* Line 1806 of yacc.c */ +#line 323 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = (yyvsp[(2) - (3)].geometryvalue); } + break; + + case 56: + +/* Line 1806 of yacc.c */ +#line 325 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_polygon_finalize(NULL, NULL); WKT_ERROR(); } + break; + + case 57: + +/* Line 1806 of yacc.c */ +#line 328 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = (yyvsp[(2) - (3)].geometryvalue); } + break; + + case 58: + +/* Line 1806 of yacc.c */ +#line 332 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_curvepolygon_finalize((yyvsp[(3) - (4)].geometryvalue), NULL); WKT_ERROR(); } + break; + + case 59: + +/* Line 1806 of yacc.c */ +#line 334 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_curvepolygon_finalize((yyvsp[(4) - (5)].geometryvalue), (yyvsp[(2) - (5)].stringvalue)); WKT_ERROR(); } + break; + + case 60: + +/* Line 1806 of yacc.c */ +#line 336 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_curvepolygon_finalize(NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); } + break; + + case 61: + +/* Line 1806 of yacc.c */ +#line 338 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_curvepolygon_finalize(NULL, NULL); WKT_ERROR(); } + break; + + case 62: + +/* Line 1806 of yacc.c */ +#line 342 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_curvepolygon_add_ring((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); } + break; + + case 63: + +/* Line 1806 of yacc.c */ +#line 344 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_curvepolygon_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); } + break; + + case 64: + +/* Line 1806 of yacc.c */ +#line 347 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); } + break; + + case 65: + +/* Line 1806 of yacc.c */ +#line 348 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); } + break; + + case 66: + +/* Line 1806 of yacc.c */ +#line 349 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); } + break; + + case 67: + +/* Line 1806 of yacc.c */ +#line 350 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = (yyvsp[(1) - (1)].geometryvalue); } + break; + + case 68: + +/* Line 1806 of yacc.c */ +#line 354 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_polygon_add_ring((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].ptarrayvalue),'Z'); WKT_ERROR(); } + break; + + case 69: + +/* Line 1806 of yacc.c */ +#line 356 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_polygon_new((yyvsp[(1) - (1)].ptarrayvalue),'Z'); WKT_ERROR(); } + break; + + case 70: + +/* Line 1806 of yacc.c */ +#line 360 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_polygon_add_ring((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].ptarrayvalue),'2'); WKT_ERROR(); } + break; + + case 71: + +/* Line 1806 of yacc.c */ +#line 362 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_polygon_new((yyvsp[(1) - (1)].ptarrayvalue),'2'); WKT_ERROR(); } + break; + + case 72: + +/* Line 1806 of yacc.c */ +#line 365 "lwin_wkt_parse.y" + { (yyval.ptarrayvalue) = (yyvsp[(2) - (3)].ptarrayvalue); } + break; + + case 73: + +/* Line 1806 of yacc.c */ +#line 368 "lwin_wkt_parse.y" + { (yyval.ptarrayvalue) = (yyvsp[(2) - (3)].ptarrayvalue); } + break; + + case 74: + +/* Line 1806 of yacc.c */ +#line 372 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_finalize(COMPOUNDTYPE, (yyvsp[(3) - (4)].geometryvalue), NULL); WKT_ERROR(); } + break; + + case 75: + +/* Line 1806 of yacc.c */ +#line 374 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_finalize(COMPOUNDTYPE, (yyvsp[(4) - (5)].geometryvalue), (yyvsp[(2) - (5)].stringvalue)); WKT_ERROR(); } + break; + + case 76: + +/* Line 1806 of yacc.c */ +#line 376 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_finalize(COMPOUNDTYPE, NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); } + break; + + case 77: + +/* Line 1806 of yacc.c */ +#line 378 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_finalize(COMPOUNDTYPE, NULL, NULL); WKT_ERROR(); } + break; + + case 78: + +/* Line 1806 of yacc.c */ +#line 382 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_compound_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); } + break; + + case 79: + +/* Line 1806 of yacc.c */ +#line 384 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_compound_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); } + break; + + case 80: + +/* Line 1806 of yacc.c */ +#line 386 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_compound_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); } + break; + + case 81: + +/* Line 1806 of yacc.c */ +#line 388 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); } + break; + + case 82: + +/* Line 1806 of yacc.c */ +#line 390 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); } + break; + + case 83: + +/* Line 1806 of yacc.c */ +#line 392 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); } + break; + + case 84: + +/* Line 1806 of yacc.c */ +#line 396 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTICURVETYPE, (yyvsp[(3) - (4)].geometryvalue), NULL); WKT_ERROR(); } + break; + + case 85: + +/* Line 1806 of yacc.c */ +#line 398 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTICURVETYPE, (yyvsp[(4) - (5)].geometryvalue), (yyvsp[(2) - (5)].stringvalue)); WKT_ERROR(); } + break; + + case 86: + +/* Line 1806 of yacc.c */ +#line 400 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTICURVETYPE, NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); } + break; + + case 87: + +/* Line 1806 of yacc.c */ +#line 402 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTICURVETYPE, NULL, NULL); WKT_ERROR(); } + break; + + case 88: + +/* Line 1806 of yacc.c */ +#line 406 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); } + break; + + case 89: + +/* Line 1806 of yacc.c */ +#line 408 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); } + break; + + case 90: + +/* Line 1806 of yacc.c */ +#line 410 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); } + break; + + case 91: + +/* Line 1806 of yacc.c */ +#line 412 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); } + break; + + case 92: + +/* Line 1806 of yacc.c */ +#line 414 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); } + break; + + case 93: + +/* Line 1806 of yacc.c */ +#line 416 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); } + break; + + case 94: + +/* Line 1806 of yacc.c */ +#line 418 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); } + break; + + case 95: + +/* Line 1806 of yacc.c */ +#line 420 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); } + break; + + case 96: + +/* Line 1806 of yacc.c */ +#line 424 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTILINETYPE, (yyvsp[(3) - (4)].geometryvalue), NULL); WKT_ERROR(); } + break; + + case 97: + +/* Line 1806 of yacc.c */ +#line 426 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTILINETYPE, (yyvsp[(4) - (5)].geometryvalue), (yyvsp[(2) - (5)].stringvalue)); WKT_ERROR(); } + break; + + case 98: + +/* Line 1806 of yacc.c */ +#line 428 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTILINETYPE, NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); } + break; + + case 99: + +/* Line 1806 of yacc.c */ +#line 430 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTILINETYPE, NULL, NULL); WKT_ERROR(); } + break; + + case 100: + +/* Line 1806 of yacc.c */ +#line 434 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); } + break; + + case 101: + +/* Line 1806 of yacc.c */ +#line 436 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); } + break; + + case 102: + +/* Line 1806 of yacc.c */ +#line 440 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_circularstring_new((yyvsp[(3) - (4)].ptarrayvalue), NULL); WKT_ERROR(); } + break; + + case 103: + +/* Line 1806 of yacc.c */ +#line 442 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_circularstring_new((yyvsp[(4) - (5)].ptarrayvalue), (yyvsp[(2) - (5)].stringvalue)); WKT_ERROR(); } + break; + + case 104: + +/* Line 1806 of yacc.c */ +#line 444 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_circularstring_new(NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); } + break; + + case 105: + +/* Line 1806 of yacc.c */ +#line 446 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_circularstring_new(NULL, NULL); WKT_ERROR(); } + break; + + case 106: + +/* Line 1806 of yacc.c */ +#line 450 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_linestring_new((yyvsp[(3) - (4)].ptarrayvalue), NULL); WKT_ERROR(); } + break; + + case 107: + +/* Line 1806 of yacc.c */ +#line 452 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_linestring_new((yyvsp[(4) - (5)].ptarrayvalue), (yyvsp[(2) - (5)].stringvalue)); WKT_ERROR(); } + break; + + case 108: + +/* Line 1806 of yacc.c */ +#line 454 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_linestring_new(NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); } + break; + + case 109: + +/* Line 1806 of yacc.c */ +#line 456 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_linestring_new(NULL, NULL); WKT_ERROR(); } + break; + + case 110: + +/* Line 1806 of yacc.c */ +#line 460 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_linestring_new((yyvsp[(2) - (3)].ptarrayvalue), NULL); WKT_ERROR(); } + break; + + case 111: + +/* Line 1806 of yacc.c */ +#line 462 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_linestring_new(NULL, NULL); WKT_ERROR(); } + break; + + case 112: + +/* Line 1806 of yacc.c */ +#line 466 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); } + break; + + case 113: + +/* Line 1806 of yacc.c */ +#line 468 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); } + break; + + case 114: + +/* Line 1806 of yacc.c */ +#line 472 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_triangle_new((yyvsp[(4) - (6)].ptarrayvalue), NULL); WKT_ERROR(); } + break; + + case 115: + +/* Line 1806 of yacc.c */ +#line 474 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_triangle_new((yyvsp[(5) - (7)].ptarrayvalue), (yyvsp[(2) - (7)].stringvalue)); WKT_ERROR(); } + break; + + case 116: + +/* Line 1806 of yacc.c */ +#line 476 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_triangle_new(NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); } + break; + + case 117: + +/* Line 1806 of yacc.c */ +#line 478 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_triangle_new(NULL, NULL); WKT_ERROR(); } + break; + + case 118: + +/* Line 1806 of yacc.c */ +#line 482 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_triangle_new((yyvsp[(3) - (5)].ptarrayvalue), NULL); WKT_ERROR(); } + break; + + case 119: + +/* Line 1806 of yacc.c */ +#line 486 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOINTTYPE, (yyvsp[(3) - (4)].geometryvalue), NULL); WKT_ERROR(); } + break; + + case 120: + +/* Line 1806 of yacc.c */ +#line 488 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOINTTYPE, (yyvsp[(4) - (5)].geometryvalue), (yyvsp[(2) - (5)].stringvalue)); WKT_ERROR(); } + break; + + case 121: + +/* Line 1806 of yacc.c */ +#line 490 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOINTTYPE, NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); } + break; + + case 122: + +/* Line 1806 of yacc.c */ +#line 492 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_finalize(MULTIPOINTTYPE, NULL, NULL); WKT_ERROR(); } + break; + + case 123: + +/* Line 1806 of yacc.c */ +#line 496 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_add_geom((yyvsp[(1) - (3)].geometryvalue),(yyvsp[(3) - (3)].geometryvalue)); WKT_ERROR(); } + break; + + case 124: + +/* Line 1806 of yacc.c */ +#line 498 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_collection_new((yyvsp[(1) - (1)].geometryvalue)); WKT_ERROR(); } + break; + + case 125: + +/* Line 1806 of yacc.c */ +#line 502 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_point_new(wkt_parser_ptarray_new((yyvsp[(1) - (1)].coordinatevalue)),NULL); WKT_ERROR(); } + break; + + case 126: + +/* Line 1806 of yacc.c */ +#line 504 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_point_new(wkt_parser_ptarray_new((yyvsp[(2) - (3)].coordinatevalue)),NULL); WKT_ERROR(); } + break; + + case 127: + +/* Line 1806 of yacc.c */ +#line 506 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_point_new(NULL, NULL); WKT_ERROR(); } + break; + + case 128: + +/* Line 1806 of yacc.c */ +#line 510 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_point_new((yyvsp[(3) - (4)].ptarrayvalue), NULL); WKT_ERROR(); } + break; + + case 129: + +/* Line 1806 of yacc.c */ +#line 512 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_point_new((yyvsp[(4) - (5)].ptarrayvalue), (yyvsp[(2) - (5)].stringvalue)); WKT_ERROR(); } + break; + + case 130: + +/* Line 1806 of yacc.c */ +#line 514 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_point_new(NULL, (yyvsp[(2) - (3)].stringvalue)); WKT_ERROR(); } + break; + + case 131: + +/* Line 1806 of yacc.c */ +#line 516 "lwin_wkt_parse.y" + { (yyval.geometryvalue) = wkt_parser_point_new(NULL,NULL); WKT_ERROR(); } + break; + + case 132: + +/* Line 1806 of yacc.c */ +#line 520 "lwin_wkt_parse.y" + { (yyval.ptarrayvalue) = wkt_parser_ptarray_add_coord((yyvsp[(1) - (3)].ptarrayvalue), (yyvsp[(3) - (3)].coordinatevalue)); WKT_ERROR(); } + break; + + case 133: + +/* Line 1806 of yacc.c */ +#line 522 "lwin_wkt_parse.y" + { (yyval.ptarrayvalue) = wkt_parser_ptarray_new((yyvsp[(1) - (1)].coordinatevalue)); WKT_ERROR(); } + break; + + case 134: + +/* Line 1806 of yacc.c */ +#line 526 "lwin_wkt_parse.y" + { (yyval.coordinatevalue) = wkt_parser_coord_2((yyvsp[(1) - (2)].doublevalue), (yyvsp[(2) - (2)].doublevalue)); WKT_ERROR(); } + break; + + case 135: + +/* Line 1806 of yacc.c */ +#line 528 "lwin_wkt_parse.y" + { (yyval.coordinatevalue) = wkt_parser_coord_3((yyvsp[(1) - (3)].doublevalue), (yyvsp[(2) - (3)].doublevalue), (yyvsp[(3) - (3)].doublevalue)); WKT_ERROR(); } + break; + + case 136: + +/* Line 1806 of yacc.c */ +#line 530 "lwin_wkt_parse.y" + { (yyval.coordinatevalue) = wkt_parser_coord_4((yyvsp[(1) - (4)].doublevalue), (yyvsp[(2) - (4)].doublevalue), (yyvsp[(3) - (4)].doublevalue), (yyvsp[(4) - (4)].doublevalue)); WKT_ERROR(); } + break; + + + +/* Line 1806 of yacc.c */ +#line 3086 "y.tab.c" + default: break; + } + /* User semantic actions sometimes alter yychar, and that requires + that yytoken be updated with the new translation. We take the + approach of translating immediately before every use of yytoken. + One alternative is translating here after every semantic action, + but that translation would be missed if the semantic action invokes + YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or + if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an + incorrect destructor might then be invoked immediately. In the + case of YYERROR or YYBACKUP, subsequent parser actions might lead + to an incorrect destructor call or verbose syntax error message + before the lookahead is translated. */ + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + + *++yyvsp = yyval; + *++yylsp = yyloc; + + /* Now `shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTOKENS]; + + goto yynewstate; + + +/*------------------------------------. +| yyerrlab -- here on detecting error | +`------------------------------------*/ +yyerrlab: + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); + + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) + { + ++yynerrs; +#if ! YYERROR_VERBOSE + yyerror (YY_("syntax error")); +#else +# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ + yyssp, yytoken) + { + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = YYSYNTAX_ERROR; + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == 1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); + if (!yymsg) + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = 2; + } + else + { + yysyntax_error_status = YYSYNTAX_ERROR; + yymsgp = yymsg; + } + } + yyerror (yymsgp); + if (yysyntax_error_status == 2) + goto yyexhaustedlab; + } +# undef YYSYNTAX_ERROR +#endif + } + + yyerror_range[1] = yylloc; + + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ + + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval, &yylloc); + yychar = YYEMPTY; + } + } + + /* Else will try to reuse lookahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (/*CONSTCOND*/ 0) + goto yyerrorlab; + + yyerror_range[1] = yylsp[1-yylen]; + /* Do not reclaim the symbols of the rule which action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) + { + yyn = yypact[yystate]; + if (!yypact_value_is_default (yyn)) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; + + yyerror_range[1] = *yylsp; + yydestruct ("Error: popping", + yystos[yystate], yyvsp, yylsp); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + + *++yyvsp = yylval; + + yyerror_range[2] = yylloc; + /* Using YYLLOC is tempting, but would change the location of + the lookahead. YYLOC is available though. */ + YYLLOC_DEFAULT (yyloc, yyerror_range, 2); + *++yylsp = yyloc; + + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + + yystate = yyn; + goto yynewstate; + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + +#if !defined(yyoverflow) || YYERROR_VERBOSE +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (YY_("memory exhausted")); + yyresult = 2; + /* Fall through. */ +#endif + +yyreturn: + if (yychar != YYEMPTY) + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval, &yylloc); + } + /* Do not reclaim the symbols of the rule which action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + yystos[*yyssp], yyvsp, yylsp); + YYPOPSTACK (1); + } +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif + /* Make sure YYID is used. */ + return YYID (yyresult); +} + + + +/* Line 2067 of yacc.c */ +#line 532 "lwin_wkt_parse.y" + + + diff -Nru postgis-1.5.3/liblwgeom/lwin_wkt_parse.h postgis-2.0.1/liblwgeom/lwin_wkt_parse.h --- postgis-1.5.3/liblwgeom/lwin_wkt_parse.h 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwin_wkt_parse.h 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,129 @@ +/* A Bison parser, made by GNU Bison 2.3. */ + +/* Skeleton interface for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + POINT_TOK = 258, + LINESTRING_TOK = 259, + POLYGON_TOK = 260, + MPOINT_TOK = 261, + MLINESTRING_TOK = 262, + MPOLYGON_TOK = 263, + MSURFACE_TOK = 264, + MCURVE_TOK = 265, + CURVEPOLYGON_TOK = 266, + COMPOUNDCURVE_TOK = 267, + CIRCULARSTRING_TOK = 268, + COLLECTION_TOK = 269, + RBRACKET_TOK = 270, + LBRACKET_TOK = 271, + COMMA_TOK = 272, + EMPTY_TOK = 273, + SEMICOLON_TOK = 274, + TRIANGLE_TOK = 275, + TIN_TOK = 276, + POLYHEDRALSURFACE_TOK = 277, + DOUBLE_TOK = 278, + DIMENSIONALITY_TOK = 279, + SRID_TOK = 280 + }; +#endif +/* Tokens. */ +#define POINT_TOK 258 +#define LINESTRING_TOK 259 +#define POLYGON_TOK 260 +#define MPOINT_TOK 261 +#define MLINESTRING_TOK 262 +#define MPOLYGON_TOK 263 +#define MSURFACE_TOK 264 +#define MCURVE_TOK 265 +#define CURVEPOLYGON_TOK 266 +#define COMPOUNDCURVE_TOK 267 +#define CIRCULARSTRING_TOK 268 +#define COLLECTION_TOK 269 +#define RBRACKET_TOK 270 +#define LBRACKET_TOK 271 +#define COMMA_TOK 272 +#define EMPTY_TOK 273 +#define SEMICOLON_TOK 274 +#define TRIANGLE_TOK 275 +#define TIN_TOK 276 +#define POLYHEDRALSURFACE_TOK 277 +#define DOUBLE_TOK 278 +#define DIMENSIONALITY_TOK 279 +#define SRID_TOK 280 + + + + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE +#line 102 "lwin_wkt_parse.y" +{ + int integervalue; + double doublevalue; + char *stringvalue; + LWGEOM *geometryvalue; + POINT coordinatevalue; + POINTARRAY *ptarrayvalue; +} +/* Line 1529 of yacc.c. */ +#line 108 "lwin_wkt_parse.h" + YYSTYPE; +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +#endif + +extern YYSTYPE wkt_yylval; + +#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED +typedef struct YYLTYPE +{ + int first_line; + int first_column; + int last_line; + int last_column; +} YYLTYPE; +# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ +# define YYLTYPE_IS_DECLARED 1 +# define YYLTYPE_IS_TRIVIAL 1 +#endif + +extern YYLTYPE wkt_yylloc; diff -Nru postgis-1.5.3/liblwgeom/lwin_wkt_parse.y postgis-2.0.1/liblwgeom/lwin_wkt_parse.y --- postgis-1.5.3/liblwgeom/lwin_wkt_parse.y 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwin_wkt_parse.y 2012-03-22 16:55:18.000000000 +0000 @@ -0,0 +1,533 @@ +%{ + +/* WKT Parser */ +#include +#include +#include +#include "lwin_wkt.h" +#include "lwin_wkt_parse.h" +#include "lwgeom_log.h" + + +/* Prototypes to quiet the compiler */ +int wkt_yyparse(void); +void wkt_yyerror(const char *str); +int wkt_yylex(void); + + +/* Declare the global parser variable */ +LWGEOM_PARSER_RESULT global_parser_result; + +/* Turn on/off verbose parsing (turn off for production) */ +int wkt_yydebug = 0; + +/* +* Error handler called by the bison parser. Mostly we will be +* catching our own errors and filling out the message and errlocation +* from WKT_ERROR in the grammar, but we keep this one +* around just in case. +*/ +void wkt_yyerror(const char *str) +{ + /* If we haven't already set a message and location, let's set one now. */ + if ( ! global_parser_result.message ) + { + global_parser_result.message = parser_error_messages[PARSER_ERROR_OTHER]; + global_parser_result.errcode = PARSER_ERROR_OTHER; + global_parser_result.errlocation = wkt_yylloc.last_column; + } + LWDEBUGF(4,"%s", str); +} + +/** +* Parse a WKT geometry string into an LWGEOM structure. Note that this +* process uses globals and is not re-entrant, so don't call it within itself +* (eg, from within other functions in lwin_wkt.c) or from a threaded program. +* Note that parser_result.wkinput picks up a reference to wktstr. +*/ +int lwgeom_parse_wkt(LWGEOM_PARSER_RESULT *parser_result, char *wktstr, int parser_check_flags) +{ + int parse_rv = 0; + + /* Clean up our global parser result. */ + global_parser_result.geom = NULL; + global_parser_result.message = NULL; + global_parser_result.serialized_lwgeom = NULL; + global_parser_result.errcode = 0; + global_parser_result.errlocation = 0; + global_parser_result.size = 0; + + /* Set the input text string, and parse checks. */ + global_parser_result.wkinput = wktstr; + global_parser_result.parser_check_flags = parser_check_flags; + + wkt_lexer_init(wktstr); /* Lexer ready */ + parse_rv = wkt_yyparse(); /* Run the parse */ + LWDEBUGF(4,"wkt_yyparse returned %d", parse_rv); + wkt_lexer_close(); /* Clean up lexer */ + + /* A non-zero parser return is an error. */ + if ( parse_rv != 0 ) + { + if( ! global_parser_result.errcode ) + { + global_parser_result.errcode = PARSER_ERROR_OTHER; + global_parser_result.message = parser_error_messages[PARSER_ERROR_OTHER]; + global_parser_result.errlocation = wkt_yylloc.last_column; + } + + LWDEBUGF(5, "error returned by wkt_yyparse() @ %d: [%d] '%s'", + global_parser_result.errlocation, + global_parser_result.errcode, + global_parser_result.message); + + /* Copy the global values into the return pointer */ + *parser_result = global_parser_result; + return LW_FAILURE; + } + + /* Copy the global value into the return pointer */ + *parser_result = global_parser_result; + return LW_SUCCESS; +} + +#define WKT_ERROR() { if ( global_parser_result.errcode != 0 ) { YYERROR; } } + + +%} + +%locations +%error-verbose +%name-prefix="wkt_yy" + +%union { + int integervalue; + double doublevalue; + char *stringvalue; + LWGEOM *geometryvalue; + POINT coordinatevalue; + POINTARRAY *ptarrayvalue; +} + +%token POINT_TOK LINESTRING_TOK POLYGON_TOK +%token MPOINT_TOK MLINESTRING_TOK MPOLYGON_TOK +%token MSURFACE_TOK MCURVE_TOK CURVEPOLYGON_TOK COMPOUNDCURVE_TOK CIRCULARSTRING_TOK +%token COLLECTION_TOK +%token RBRACKET_TOK LBRACKET_TOK COMMA_TOK EMPTY_TOK +%token SEMICOLON_TOK +%token TRIANGLE_TOK TIN_TOK +%token POLYHEDRALSURFACE_TOK + +%token DOUBLE_TOK +%token DIMENSIONALITY_TOK +%token SRID_TOK + +%type ring +%type patchring +%type ptarray +%type coordinate +%type circularstring +%type compoundcurve +%type compound_list +%type curve_list +%type curvepolygon +%type curvering +%type curvering_list +%type geometry +%type geometry_no_srid +%type geometry_list +%type geometrycollection +%type linestring +%type linestring_list +%type linestring_untagged +%type multicurve +%type multilinestring +%type multipoint +%type multipolygon +%type multisurface +%type patch +%type patch_list +%type patchring_list +%type point +%type point_list +%type point_untagged +%type polygon +%type polygon_list +%type polygon_untagged +%type polyhedralsurface +%type ring_list +%type surface_list +%type tin +%type triangle +%type triangle_list +%type triangle_untagged + + +/* These clean up memory on errors and parser aborts. */ +%destructor { ptarray_free($$); } ptarray +%destructor { ptarray_free($$); } ring +%destructor { ptarray_free($$); } patchring +%destructor { lwgeom_free($$); } curvering_list +%destructor { lwgeom_free($$); } triangle_list +%destructor { lwgeom_free($$); } surface_list +%destructor { lwgeom_free($$); } polygon_list +%destructor { lwgeom_free($$); } patch_list +%destructor { lwgeom_free($$); } point_list +%destructor { lwgeom_free($$); } linestring_list +%destructor { lwgeom_free($$); } curve_list +%destructor { lwgeom_free($$); } compound_list +%destructor { lwgeom_free($$); } ring_list +%destructor { lwgeom_free($$); } patchring_list +%destructor { lwgeom_free($$); } circularstring +%destructor { lwgeom_free($$); } compoundcurve +%destructor { lwgeom_free($$); } curvepolygon +%destructor { lwgeom_free($$); } curvering +%destructor { lwgeom_free($$); } geometry_no_srid +%destructor { lwgeom_free($$); } geometrycollection +%destructor { lwgeom_free($$); } linestring +%destructor { lwgeom_free($$); } linestring_untagged +%destructor { lwgeom_free($$); } multicurve +%destructor { lwgeom_free($$); } multilinestring +%destructor { lwgeom_free($$); } multipoint +%destructor { lwgeom_free($$); } multipolygon +%destructor { lwgeom_free($$); } multisurface +%destructor { lwgeom_free($$); } point +%destructor { lwgeom_free($$); } point_untagged +%destructor { lwgeom_free($$); } polygon +%destructor { lwgeom_free($$); } patch +%destructor { lwgeom_free($$); } polygon_untagged +%destructor { lwgeom_free($$); } polyhedralsurface +%destructor { lwgeom_free($$); } tin +%destructor { lwgeom_free($$); } triangle +%destructor { lwgeom_free($$); } triangle_untagged + +%% + +geometry: + geometry_no_srid + { wkt_parser_geometry_new($1, SRID_UNKNOWN); WKT_ERROR(); } | + SRID_TOK SEMICOLON_TOK geometry_no_srid + { wkt_parser_geometry_new($3, $1); WKT_ERROR(); } ; + +geometry_no_srid : + point { $$ = $1; } | + linestring { $$ = $1; } | + circularstring { $$ = $1; } | + compoundcurve { $$ = $1; } | + polygon { $$ = $1; } | + curvepolygon { $$ = $1; } | + multipoint { $$ = $1; } | + multilinestring { $$ = $1; } | + multipolygon { $$ = $1; } | + multisurface { $$ = $1; } | + multicurve { $$ = $1; } | + tin { $$ = $1; } | + polyhedralsurface { $$ = $1; } | + triangle { $$ = $1; } | + geometrycollection { $$ = $1; } ; + +geometrycollection : + COLLECTION_TOK LBRACKET_TOK geometry_list RBRACKET_TOK + { $$ = wkt_parser_collection_finalize(COLLECTIONTYPE, $3, NULL); WKT_ERROR(); } | + COLLECTION_TOK DIMENSIONALITY_TOK LBRACKET_TOK geometry_list RBRACKET_TOK + { $$ = wkt_parser_collection_finalize(COLLECTIONTYPE, $4, $2); WKT_ERROR(); } | + COLLECTION_TOK DIMENSIONALITY_TOK EMPTY_TOK + { $$ = wkt_parser_collection_finalize(COLLECTIONTYPE, NULL, $2); WKT_ERROR(); } | + COLLECTION_TOK EMPTY_TOK + { $$ = wkt_parser_collection_finalize(COLLECTIONTYPE, NULL, NULL); WKT_ERROR(); } ; + +geometry_list : + geometry_list COMMA_TOK geometry_no_srid + { $$ = wkt_parser_collection_add_geom($1,$3); WKT_ERROR(); } | + geometry_no_srid + { $$ = wkt_parser_collection_new($1); WKT_ERROR(); } ; + +multisurface : + MSURFACE_TOK LBRACKET_TOK surface_list RBRACKET_TOK + { $$ = wkt_parser_collection_finalize(MULTISURFACETYPE, $3, NULL); WKT_ERROR(); } | + MSURFACE_TOK DIMENSIONALITY_TOK LBRACKET_TOK surface_list RBRACKET_TOK + { $$ = wkt_parser_collection_finalize(MULTISURFACETYPE, $4, $2); WKT_ERROR(); } | + MSURFACE_TOK DIMENSIONALITY_TOK EMPTY_TOK + { $$ = wkt_parser_collection_finalize(MULTISURFACETYPE, NULL, $2); WKT_ERROR(); } | + MSURFACE_TOK EMPTY_TOK + { $$ = wkt_parser_collection_finalize(MULTISURFACETYPE, NULL, NULL); WKT_ERROR(); } ; + +surface_list : + surface_list COMMA_TOK polygon + { $$ = wkt_parser_collection_add_geom($1,$3); WKT_ERROR(); } | + surface_list COMMA_TOK curvepolygon + { $$ = wkt_parser_collection_add_geom($1,$3); WKT_ERROR(); } | + surface_list COMMA_TOK polygon_untagged + { $$ = wkt_parser_collection_add_geom($1,$3); WKT_ERROR(); } | + polygon + { $$ = wkt_parser_collection_new($1); WKT_ERROR(); } | + curvepolygon + { $$ = wkt_parser_collection_new($1); WKT_ERROR(); } | + polygon_untagged + { $$ = wkt_parser_collection_new($1); WKT_ERROR(); } ; + +tin : + TIN_TOK LBRACKET_TOK triangle_list RBRACKET_TOK + { $$ = wkt_parser_collection_finalize(TINTYPE, $3, NULL); WKT_ERROR(); } | + TIN_TOK DIMENSIONALITY_TOK LBRACKET_TOK triangle_list RBRACKET_TOK + { $$ = wkt_parser_collection_finalize(TINTYPE, $4, $2); WKT_ERROR(); } | + TIN_TOK DIMENSIONALITY_TOK EMPTY_TOK + { $$ = wkt_parser_collection_finalize(TINTYPE, NULL, $2); WKT_ERROR(); } | + TIN_TOK EMPTY_TOK + { $$ = wkt_parser_collection_finalize(TINTYPE, NULL, NULL); WKT_ERROR(); } ; + +polyhedralsurface : + POLYHEDRALSURFACE_TOK LBRACKET_TOK patch_list RBRACKET_TOK + { $$ = wkt_parser_collection_finalize(POLYHEDRALSURFACETYPE, $3, NULL); WKT_ERROR(); } | + POLYHEDRALSURFACE_TOK DIMENSIONALITY_TOK LBRACKET_TOK patch_list RBRACKET_TOK + { $$ = wkt_parser_collection_finalize(POLYHEDRALSURFACETYPE, $4, $2); WKT_ERROR(); } | + POLYHEDRALSURFACE_TOK DIMENSIONALITY_TOK EMPTY_TOK + { $$ = wkt_parser_collection_finalize(POLYHEDRALSURFACETYPE, NULL, $2); WKT_ERROR(); } | + POLYHEDRALSURFACE_TOK EMPTY_TOK + { $$ = wkt_parser_collection_finalize(POLYHEDRALSURFACETYPE, NULL, NULL); WKT_ERROR(); } ; + +multipolygon : + MPOLYGON_TOK LBRACKET_TOK polygon_list RBRACKET_TOK + { $$ = wkt_parser_collection_finalize(MULTIPOLYGONTYPE, $3, NULL); WKT_ERROR(); } | + MPOLYGON_TOK DIMENSIONALITY_TOK LBRACKET_TOK polygon_list RBRACKET_TOK + { $$ = wkt_parser_collection_finalize(MULTIPOLYGONTYPE, $4, $2); WKT_ERROR(); } | + MPOLYGON_TOK DIMENSIONALITY_TOK EMPTY_TOK + { $$ = wkt_parser_collection_finalize(MULTIPOLYGONTYPE, NULL, $2); WKT_ERROR(); } | + MPOLYGON_TOK EMPTY_TOK + { $$ = wkt_parser_collection_finalize(MULTIPOLYGONTYPE, NULL, NULL); WKT_ERROR(); } ; + +polygon_list : + polygon_list COMMA_TOK polygon_untagged + { $$ = wkt_parser_collection_add_geom($1,$3); WKT_ERROR(); } | + polygon_untagged + { $$ = wkt_parser_collection_new($1); WKT_ERROR(); } ; + +patch_list : + patch_list COMMA_TOK patch + { $$ = wkt_parser_collection_add_geom($1,$3); WKT_ERROR(); } | + patch + { $$ = wkt_parser_collection_new($1); WKT_ERROR(); } ; + +polygon : + POLYGON_TOK LBRACKET_TOK ring_list RBRACKET_TOK + { $$ = wkt_parser_polygon_finalize($3, NULL); WKT_ERROR(); } | + POLYGON_TOK DIMENSIONALITY_TOK LBRACKET_TOK ring_list RBRACKET_TOK + { $$ = wkt_parser_polygon_finalize($4, $2); WKT_ERROR(); } | + POLYGON_TOK DIMENSIONALITY_TOK EMPTY_TOK + { $$ = wkt_parser_polygon_finalize(NULL, $2); WKT_ERROR(); } | + POLYGON_TOK EMPTY_TOK + { $$ = wkt_parser_polygon_finalize(NULL, NULL); WKT_ERROR(); } ; + +polygon_untagged : + LBRACKET_TOK ring_list RBRACKET_TOK + { $$ = $2; } | + EMPTY_TOK + { $$ = wkt_parser_polygon_finalize(NULL, NULL); WKT_ERROR(); }; + +patch : + LBRACKET_TOK patchring_list RBRACKET_TOK { $$ = $2; } ; + +curvepolygon : + CURVEPOLYGON_TOK LBRACKET_TOK curvering_list RBRACKET_TOK + { $$ = wkt_parser_curvepolygon_finalize($3, NULL); WKT_ERROR(); } | + CURVEPOLYGON_TOK DIMENSIONALITY_TOK LBRACKET_TOK curvering_list RBRACKET_TOK + { $$ = wkt_parser_curvepolygon_finalize($4, $2); WKT_ERROR(); } | + CURVEPOLYGON_TOK DIMENSIONALITY_TOK EMPTY_TOK + { $$ = wkt_parser_curvepolygon_finalize(NULL, $2); WKT_ERROR(); } | + CURVEPOLYGON_TOK EMPTY_TOK + { $$ = wkt_parser_curvepolygon_finalize(NULL, NULL); WKT_ERROR(); } ; + +curvering_list : + curvering_list COMMA_TOK curvering + { $$ = wkt_parser_curvepolygon_add_ring($1,$3); WKT_ERROR(); } | + curvering + { $$ = wkt_parser_curvepolygon_new($1); WKT_ERROR(); } ; + +curvering : + linestring_untagged { $$ = $1; } | + linestring { $$ = $1; } | + compoundcurve { $$ = $1; } | + circularstring { $$ = $1; } ; + +patchring_list : + patchring_list COMMA_TOK patchring + { $$ = wkt_parser_polygon_add_ring($1,$3,'Z'); WKT_ERROR(); } | + patchring + { $$ = wkt_parser_polygon_new($1,'Z'); WKT_ERROR(); } ; + +ring_list : + ring_list COMMA_TOK ring + { $$ = wkt_parser_polygon_add_ring($1,$3,'2'); WKT_ERROR(); } | + ring + { $$ = wkt_parser_polygon_new($1,'2'); WKT_ERROR(); } ; + +patchring : + LBRACKET_TOK ptarray RBRACKET_TOK { $$ = $2; } ; + +ring : + LBRACKET_TOK ptarray RBRACKET_TOK { $$ = $2; } ; + +compoundcurve : + COMPOUNDCURVE_TOK LBRACKET_TOK compound_list RBRACKET_TOK + { $$ = wkt_parser_collection_finalize(COMPOUNDTYPE, $3, NULL); WKT_ERROR(); } | + COMPOUNDCURVE_TOK DIMENSIONALITY_TOK LBRACKET_TOK compound_list RBRACKET_TOK + { $$ = wkt_parser_collection_finalize(COMPOUNDTYPE, $4, $2); WKT_ERROR(); } | + COMPOUNDCURVE_TOK DIMENSIONALITY_TOK EMPTY_TOK + { $$ = wkt_parser_collection_finalize(COMPOUNDTYPE, NULL, $2); WKT_ERROR(); } | + COMPOUNDCURVE_TOK EMPTY_TOK + { $$ = wkt_parser_collection_finalize(COMPOUNDTYPE, NULL, NULL); WKT_ERROR(); } ; + +compound_list : + compound_list COMMA_TOK circularstring + { $$ = wkt_parser_compound_add_geom($1,$3); WKT_ERROR(); } | + compound_list COMMA_TOK linestring + { $$ = wkt_parser_compound_add_geom($1,$3); WKT_ERROR(); } | + compound_list COMMA_TOK linestring_untagged + { $$ = wkt_parser_compound_add_geom($1,$3); WKT_ERROR(); } | + circularstring + { $$ = wkt_parser_collection_new($1); WKT_ERROR(); } | + linestring + { $$ = wkt_parser_collection_new($1); WKT_ERROR(); } | + linestring_untagged + { $$ = wkt_parser_collection_new($1); WKT_ERROR(); } ; + +multicurve : + MCURVE_TOK LBRACKET_TOK curve_list RBRACKET_TOK + { $$ = wkt_parser_collection_finalize(MULTICURVETYPE, $3, NULL); WKT_ERROR(); } | + MCURVE_TOK DIMENSIONALITY_TOK LBRACKET_TOK curve_list RBRACKET_TOK + { $$ = wkt_parser_collection_finalize(MULTICURVETYPE, $4, $2); WKT_ERROR(); } | + MCURVE_TOK DIMENSIONALITY_TOK EMPTY_TOK + { $$ = wkt_parser_collection_finalize(MULTICURVETYPE, NULL, $2); WKT_ERROR(); } | + MCURVE_TOK EMPTY_TOK + { $$ = wkt_parser_collection_finalize(MULTICURVETYPE, NULL, NULL); WKT_ERROR(); } ; + +curve_list : + curve_list COMMA_TOK circularstring + { $$ = wkt_parser_collection_add_geom($1,$3); WKT_ERROR(); } | + curve_list COMMA_TOK compoundcurve + { $$ = wkt_parser_collection_add_geom($1,$3); WKT_ERROR(); } | + curve_list COMMA_TOK linestring + { $$ = wkt_parser_collection_add_geom($1,$3); WKT_ERROR(); } | + curve_list COMMA_TOK linestring_untagged + { $$ = wkt_parser_collection_add_geom($1,$3); WKT_ERROR(); } | + circularstring + { $$ = wkt_parser_collection_new($1); WKT_ERROR(); } | + compoundcurve + { $$ = wkt_parser_collection_new($1); WKT_ERROR(); } | + linestring + { $$ = wkt_parser_collection_new($1); WKT_ERROR(); } | + linestring_untagged + { $$ = wkt_parser_collection_new($1); WKT_ERROR(); } ; + +multilinestring : + MLINESTRING_TOK LBRACKET_TOK linestring_list RBRACKET_TOK + { $$ = wkt_parser_collection_finalize(MULTILINETYPE, $3, NULL); WKT_ERROR(); } | + MLINESTRING_TOK DIMENSIONALITY_TOK LBRACKET_TOK linestring_list RBRACKET_TOK + { $$ = wkt_parser_collection_finalize(MULTILINETYPE, $4, $2); WKT_ERROR(); } | + MLINESTRING_TOK DIMENSIONALITY_TOK EMPTY_TOK + { $$ = wkt_parser_collection_finalize(MULTILINETYPE, NULL, $2); WKT_ERROR(); } | + MLINESTRING_TOK EMPTY_TOK + { $$ = wkt_parser_collection_finalize(MULTILINETYPE, NULL, NULL); WKT_ERROR(); } ; + +linestring_list : + linestring_list COMMA_TOK linestring_untagged + { $$ = wkt_parser_collection_add_geom($1,$3); WKT_ERROR(); } | + linestring_untagged + { $$ = wkt_parser_collection_new($1); WKT_ERROR(); } ; + +circularstring : + CIRCULARSTRING_TOK LBRACKET_TOK ptarray RBRACKET_TOK + { $$ = wkt_parser_circularstring_new($3, NULL); WKT_ERROR(); } | + CIRCULARSTRING_TOK DIMENSIONALITY_TOK LBRACKET_TOK ptarray RBRACKET_TOK + { $$ = wkt_parser_circularstring_new($4, $2); WKT_ERROR(); } | + CIRCULARSTRING_TOK DIMENSIONALITY_TOK EMPTY_TOK + { $$ = wkt_parser_circularstring_new(NULL, $2); WKT_ERROR(); } | + CIRCULARSTRING_TOK EMPTY_TOK + { $$ = wkt_parser_circularstring_new(NULL, NULL); WKT_ERROR(); } ; + +linestring : + LINESTRING_TOK LBRACKET_TOK ptarray RBRACKET_TOK + { $$ = wkt_parser_linestring_new($3, NULL); WKT_ERROR(); } | + LINESTRING_TOK DIMENSIONALITY_TOK LBRACKET_TOK ptarray RBRACKET_TOK + { $$ = wkt_parser_linestring_new($4, $2); WKT_ERROR(); } | + LINESTRING_TOK DIMENSIONALITY_TOK EMPTY_TOK + { $$ = wkt_parser_linestring_new(NULL, $2); WKT_ERROR(); } | + LINESTRING_TOK EMPTY_TOK + { $$ = wkt_parser_linestring_new(NULL, NULL); WKT_ERROR(); } ; + +linestring_untagged : + LBRACKET_TOK ptarray RBRACKET_TOK + { $$ = wkt_parser_linestring_new($2, NULL); WKT_ERROR(); } | + EMPTY_TOK + { $$ = wkt_parser_linestring_new(NULL, NULL); WKT_ERROR(); }; + +triangle_list : + triangle_list COMMA_TOK triangle_untagged + { $$ = wkt_parser_collection_add_geom($1,$3); WKT_ERROR(); } | + triangle_untagged + { $$ = wkt_parser_collection_new($1); WKT_ERROR(); } ; + +triangle : + TRIANGLE_TOK LBRACKET_TOK LBRACKET_TOK ptarray RBRACKET_TOK RBRACKET_TOK + { $$ = wkt_parser_triangle_new($4, NULL); WKT_ERROR(); } | + TRIANGLE_TOK DIMENSIONALITY_TOK LBRACKET_TOK LBRACKET_TOK ptarray RBRACKET_TOK RBRACKET_TOK + { $$ = wkt_parser_triangle_new($5, $2); WKT_ERROR(); } | + TRIANGLE_TOK DIMENSIONALITY_TOK EMPTY_TOK + { $$ = wkt_parser_triangle_new(NULL, $2); WKT_ERROR(); } | + TRIANGLE_TOK EMPTY_TOK + { $$ = wkt_parser_triangle_new(NULL, NULL); WKT_ERROR(); } ; + +triangle_untagged : + LBRACKET_TOK LBRACKET_TOK ptarray RBRACKET_TOK RBRACKET_TOK + { $$ = wkt_parser_triangle_new($3, NULL); WKT_ERROR(); } ; + +multipoint : + MPOINT_TOK LBRACKET_TOK point_list RBRACKET_TOK + { $$ = wkt_parser_collection_finalize(MULTIPOINTTYPE, $3, NULL); WKT_ERROR(); } | + MPOINT_TOK DIMENSIONALITY_TOK LBRACKET_TOK point_list RBRACKET_TOK + { $$ = wkt_parser_collection_finalize(MULTIPOINTTYPE, $4, $2); WKT_ERROR(); } | + MPOINT_TOK DIMENSIONALITY_TOK EMPTY_TOK + { $$ = wkt_parser_collection_finalize(MULTIPOINTTYPE, NULL, $2); WKT_ERROR(); } | + MPOINT_TOK EMPTY_TOK + { $$ = wkt_parser_collection_finalize(MULTIPOINTTYPE, NULL, NULL); WKT_ERROR(); } ; + +point_list : + point_list COMMA_TOK point_untagged + { $$ = wkt_parser_collection_add_geom($1,$3); WKT_ERROR(); } | + point_untagged + { $$ = wkt_parser_collection_new($1); WKT_ERROR(); } ; + +point_untagged : + coordinate + { $$ = wkt_parser_point_new(wkt_parser_ptarray_new($1),NULL); WKT_ERROR(); } | + LBRACKET_TOK coordinate RBRACKET_TOK + { $$ = wkt_parser_point_new(wkt_parser_ptarray_new($2),NULL); WKT_ERROR(); } | + EMPTY_TOK + { $$ = wkt_parser_point_new(NULL, NULL); WKT_ERROR(); }; + +point : + POINT_TOK LBRACKET_TOK ptarray RBRACKET_TOK + { $$ = wkt_parser_point_new($3, NULL); WKT_ERROR(); } | + POINT_TOK DIMENSIONALITY_TOK LBRACKET_TOK ptarray RBRACKET_TOK + { $$ = wkt_parser_point_new($4, $2); WKT_ERROR(); } | + POINT_TOK DIMENSIONALITY_TOK EMPTY_TOK + { $$ = wkt_parser_point_new(NULL, $2); WKT_ERROR(); } | + POINT_TOK EMPTY_TOK + { $$ = wkt_parser_point_new(NULL,NULL); WKT_ERROR(); } ; + +ptarray : + ptarray COMMA_TOK coordinate + { $$ = wkt_parser_ptarray_add_coord($1, $3); WKT_ERROR(); } | + coordinate + { $$ = wkt_parser_ptarray_new($1); WKT_ERROR(); } ; + +coordinate : + DOUBLE_TOK DOUBLE_TOK + { $$ = wkt_parser_coord_2($1, $2); WKT_ERROR(); } | + DOUBLE_TOK DOUBLE_TOK DOUBLE_TOK + { $$ = wkt_parser_coord_3($1, $2, $3); WKT_ERROR(); } | + DOUBLE_TOK DOUBLE_TOK DOUBLE_TOK DOUBLE_TOK + { $$ = wkt_parser_coord_4($1, $2, $3, $4); WKT_ERROR(); } ; + +%% + diff -Nru postgis-1.5.3/liblwgeom/lwline.c postgis-2.0.1/liblwgeom/lwline.c --- postgis-1.5.3/liblwgeom/lwline.c 2010-03-08 23:28:10.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwline.c 2012-04-20 03:23:47.000000000 +0000 @@ -1,9 +1,10 @@ /********************************************************************** - * $Id: lwline.c 5383 2010-03-08 23:28:10Z pramsey $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net - * Copyright 2001-2006 Refractions Research Inc. + * + * Copyright (C) 2012 Sandro Santilli + * Copyright (C) 2001-2006 Refractions Research Inc. * * This is free software; you can redistribute and/or modify it under * the terms of the GNU General Public Licence. See the COPYING file. @@ -15,298 +16,75 @@ #include #include #include -#include "liblwgeom.h" +#include "liblwgeom_internal.h" +#include "lwgeom_log.h" /* * Construct a new LWLINE. points will *NOT* be copied - * use SRID=-1 for unknown SRID (will have 8bit type's S = 0) + * use SRID=SRID_UNKNOWN for unknown SRID (will have 8bit type's S = 0) */ LWLINE * -lwline_construct(int SRID, BOX2DFLOAT4 *bbox, POINTARRAY *points) +lwline_construct(int srid, GBOX *bbox, POINTARRAY *points) { LWLINE *result; result = (LWLINE*) lwalloc(sizeof(LWLINE)); LWDEBUG(2, "lwline_construct called."); - result->type = lwgeom_makeType_full( - TYPE_HASZ(points->dims), - TYPE_HASM(points->dims), - (SRID!=-1), LINETYPE, - 0); + result->type = LINETYPE; + + result->flags = points->flags; + FLAGS_SET_BBOX(result->flags, bbox?1:0); LWDEBUGF(3, "lwline_construct type=%d", result->type); - result->SRID = SRID; + result->srid = srid; result->points = points; result->bbox = bbox; return result; } -/* - * given the LWGEOM serialized form (or a pointer into a muli* one) - * construct a proper LWLINE. - * serialized_form should point to the 8bit type format (with type = 2) - * See serialized form doc - */ LWLINE * -lwline_deserialize(uchar *serialized_form) +lwline_construct_empty(int srid, char hasz, char hasm) { - uchar type; - LWLINE *result; - uchar *loc =NULL; - uint32 npoints; - POINTARRAY *pa; - - type = (uchar) serialized_form[0]; - - if ( lwgeom_getType(type) != LINETYPE) - { - lwerror("lwline_deserialize: attempt to deserialize a line which is really a %s", lwgeom_typename(type)); - return NULL; - } - - result = (LWLINE*) lwalloc(sizeof(LWLINE)) ; - result->type = type; - - loc = serialized_form+1; - - if (lwgeom_hasBBOX(type)) - { - LWDEBUG(3, "lwline_deserialize: input has bbox"); - - result->bbox = lwalloc(sizeof(BOX2DFLOAT4)); - memcpy(result->bbox, loc, sizeof(BOX2DFLOAT4)); - loc += sizeof(BOX2DFLOAT4); - } - else - { - result->bbox = NULL; - /*lwnotice("line has NO bbox"); */ - } - - if ( lwgeom_hasSRID(type)) - { - /*lwnotice("line has srid"); */ - result->SRID = lw_get_int32(loc); - loc +=4; /* type + SRID */ - } - else - { - /*lwnotice("line has NO srid"); */ - result->SRID = -1; - } - - /* we've read the type (1 byte) and SRID (4 bytes, if present) */ - - npoints = lw_get_uint32(loc); - /*lwnotice("line npoints = %d", npoints); */ - loc +=4; - pa = pointArray_construct(loc, TYPE_HASZ(type), TYPE_HASM(type), npoints); - result->points = pa; - + LWLINE *result = lwalloc(sizeof(LWLINE)); + result->type = LINETYPE; + result->flags = gflags(hasz,hasm,0); + result->srid = srid; + result->points = ptarray_construct_empty(hasz, hasm, 1); + result->bbox = NULL; return result; } -/* - * convert this line into its serialize form - * result's first char will be the 8bit type. See serialized form doc - */ -uchar * -lwline_serialize(LWLINE *line) -{ - size_t size, retsize; - uchar * result; - - if (line == NULL) lwerror("lwline_serialize:: given null line"); - - size = lwline_serialize_size(line); - result = lwalloc(size); - lwline_serialize_buf(line, result, &retsize); - - if ( retsize != size ) - { - lwerror("lwline_serialize_size returned %d, ..serialize_buf returned %d", size, retsize); - } - - return result; -} - -/* - * convert this line into its serialize form writing it into - * the given buffer, and returning number of bytes written into - * the given int pointer. - * result's first char will be the 8bit type. See serialized form doc - */ -void -lwline_serialize_buf(LWLINE *line, uchar *buf, size_t *retsize) -{ - char hasSRID; - uchar *loc; - int ptsize; - size_t size; - - LWDEBUGF(2, "lwline_serialize_buf(%p, %p, %p) called", - line, buf, retsize); - - if (line == NULL) - lwerror("lwline_serialize:: given null line"); - - if ( TYPE_GETZM(line->type) != TYPE_GETZM(line->points->dims) ) - lwerror("Dimensions mismatch in lwline"); - - ptsize = pointArray_ptsize(line->points); - - hasSRID = (line->SRID != -1); - - buf[0] = (uchar) lwgeom_makeType_full( - TYPE_HASZ(line->type), TYPE_HASM(line->type), - hasSRID, LINETYPE, line->bbox ? 1 : 0); - loc = buf+1; - - LWDEBUGF(3, "lwline_serialize_buf added type (%d)", line->type); - - if (line->bbox) - { - memcpy(loc, line->bbox, sizeof(BOX2DFLOAT4)); - loc += sizeof(BOX2DFLOAT4); - - LWDEBUG(3, "lwline_serialize_buf added BBOX"); - } - - if (hasSRID) - { - memcpy(loc, &line->SRID, sizeof(int32)); - loc += sizeof(int32); - - LWDEBUG(3, "lwline_serialize_buf added SRID"); - } - - memcpy(loc, &line->points->npoints, sizeof(uint32)); - loc += sizeof(uint32); - - LWDEBUGF(3, "lwline_serialize_buf added npoints (%d)", - line->points->npoints); - - /*copy in points */ - size = line->points->npoints*ptsize; - memcpy(loc, getPoint_internal(line->points, 0), size); - loc += size; - - LWDEBUGF(3, "lwline_serialize_buf copied serialized_pointlist (%d bytes)", - ptsize * line->points->npoints); - - if (retsize) *retsize = loc-buf; - - /*printBYTES((uchar *)result, loc-buf); */ - - LWDEBUGF(3, "lwline_serialize_buf returning (loc: %p, size: %d)", - loc, loc-buf); -} - -/* - * Find bounding box (standard one) - * zmin=zmax=NO_Z_VALUE if 2d - */ -BOX3D * -lwline_compute_box3d(LWLINE *line) -{ - BOX3D *ret; - - if (line == NULL) return NULL; - - ret = ptarray_compute_box3d(line->points); - return ret; -} - - -/* find length of this deserialized line */ -size_t -lwline_serialize_size(LWLINE *line) -{ - size_t size = 1; /* type */ - - LWDEBUG(2, "lwline_serialize_size called"); - - if ( line->SRID != -1 ) size += 4; /* SRID */ - if ( line->bbox ) size += sizeof(BOX2DFLOAT4); - - size += 4; /* npoints */ - size += pointArray_ptsize(line->points)*line->points->npoints; - - LWDEBUGF(3, "lwline_serialize_size returning %d", size); - - return size; -} void lwline_free (LWLINE *line) { + if ( ! line ) return; + if ( line->bbox ) lwfree(line->bbox); - - ptarray_free(line->points); + if ( line->points ) + ptarray_free(line->points); lwfree(line); } -/* find length of this serialized line */ -size_t -lwgeom_size_line(const uchar *serialized_line) -{ - int type = (uchar) serialized_line[0]; - uint32 result = 1; /*type */ - const uchar *loc; - uint32 npoints; - - LWDEBUG(2, "lwgeom_size_line called"); - - if ( lwgeom_getType(type) != LINETYPE) - lwerror("lwgeom_size_line::attempt to find the length of a non-line"); - - - loc = serialized_line+1; - - if (lwgeom_hasBBOX(type)) - { - loc += sizeof(BOX2DFLOAT4); - result +=sizeof(BOX2DFLOAT4); - } - - if ( lwgeom_hasSRID(type)) - { - loc += 4; /* type + SRID */ - result +=4; - } - - /* we've read the type (1 byte) and SRID (4 bytes, if present) */ - npoints = lw_get_uint32(loc); - result += sizeof(uint32); /* npoints */ - - result += TYPE_NDIMS(type) * sizeof(double) * npoints; - - LWDEBUGF(3, "lwgeom_size_line returning %d", result); - - return result; -} void printLWLINE(LWLINE *line) { lwnotice("LWLINE {"); - lwnotice(" ndims = %i", (int)TYPE_NDIMS(line->type)); - lwnotice(" SRID = %i", (int)line->SRID); + lwnotice(" ndims = %i", (int)FLAGS_NDIMS(line->flags)); + lwnotice(" srid = %i", (int)line->srid); printPA(line->points); lwnotice("}"); } -int -lwline_compute_box2d_p(LWLINE *line, BOX2DFLOAT4 *box) -{ - return ptarray_compute_box2d_p(line->points, box); -} - -/* Clone LWLINE object. POINTARRAY is not copied. */ +/* @brief Clone LWLINE object. Serialized point lists are not copied. + * + * @see ptarray_clone + */ LWLINE * lwline_clone(const LWLINE *g) { @@ -315,62 +93,30 @@ LWDEBUGF(2, "lwline_clone called with %p", g); memcpy(ret, g, sizeof(LWLINE)); - if ( g->bbox ) ret->bbox = box2d_clone(g->bbox); + + ret->points = ptarray_clone(g->points); + + if ( g->bbox ) ret->bbox = gbox_copy(g->bbox); return ret; } -/* - * Add 'what' to this line at position 'where'. - * where=0 == prepend - * where=-1 == append - * Returns a MULTILINE or a GEOMETRYCOLLECTION - */ -LWGEOM * -lwline_add(const LWLINE *to, uint32 where, const LWGEOM *what) +/* Deep clone LWLINE object. POINTARRAY *is* copied. */ +LWLINE * +lwline_clone_deep(const LWLINE *g) { - LWCOLLECTION *col; - LWGEOM **geoms; - int newtype; - - if ( where != -1 && where != 0 ) - { - lwerror("lwline_add only supports 0 or -1 as second argument, got %d", where); - return NULL; - } - - /* dimensions compatibility are checked by caller */ + LWLINE *ret = lwalloc(sizeof(LWLINE)); - /* Construct geoms array */ - geoms = lwalloc(sizeof(LWGEOM *)*2); - if ( where == -1 ) /* append */ - { - geoms[0] = lwgeom_clone((LWGEOM *)to); - geoms[1] = lwgeom_clone(what); - } - else /* prepend */ - { - geoms[0] = lwgeom_clone(what); - geoms[1] = lwgeom_clone((LWGEOM *)to); - } + LWDEBUGF(2, "lwline_clone_deep called with %p", g); + memcpy(ret, g, sizeof(LWLINE)); - /* reset SRID and wantbbox flag from component types */ - geoms[0]->SRID = geoms[1]->SRID = -1; - TYPE_SETHASSRID(geoms[0]->type, 0); - TYPE_SETHASSRID(geoms[1]->type, 0); - TYPE_SETHASBBOX(geoms[0]->type, 0); - TYPE_SETHASBBOX(geoms[1]->type, 0); - - /* Find appropriate geom type */ - if ( TYPE_GETTYPE(what->type) == LINETYPE ) newtype = MULTILINETYPE; - else newtype = COLLECTIONTYPE; - - col = lwcollection_construct(newtype, - to->SRID, NULL, - 2, geoms); + if ( g->bbox ) ret->bbox = gbox_copy(g->bbox); + if ( g->points ) ret->points = ptarray_clone_deep(g->points); + FLAGS_SET_READONLY(ret->flags,0); - return (LWGEOM *)col; + return ret; } + void lwline_release(LWLINE *lwline) { @@ -380,13 +126,14 @@ void lwline_reverse(LWLINE *line) { + if ( lwline_is_empty(line) ) return; ptarray_reverse(line->points); } LWLINE * lwline_segmentize2d(LWLINE *line, double dist) { - return lwline_construct(line->SRID, NULL, + return lwline_construct(line->srid, NULL, ptarray_segmentize2d(line->points, dist)); } @@ -398,69 +145,125 @@ } /* - * Construct a LWLINE from an array of LWPOINTs + * Construct a LWLINE from an array of point and line geometries * LWLINE dimensions are large enough to host all input dimensions. */ LWLINE * -lwline_from_lwpointarray(int SRID, unsigned int npoints, LWPOINT **points) +lwline_from_lwgeom_array(int srid, uint32_t ngeoms, LWGEOM **geoms) { - int zmflag=0; - unsigned int i; + int i; + int hasz = LW_FALSE; + int hasm = LW_FALSE; POINTARRAY *pa; - uchar *newpoints, *ptr; - size_t ptsize, size; + LWLINE *line; + POINT4D pt; /* * Find output dimensions, check integrity */ - for (i=0; iflags) ) hasz = LW_TRUE; + if ( FLAGS_GET_M(geoms[i]->flags) ) hasm = LW_TRUE; + if ( hasz && hasm ) break; /* Nothing more to learn! */ + } + + /* ngeoms should be a guess about how many points we have in input */ + pa = ptarray_construct_empty(hasz, hasm, ngeoms); + + for ( i=0; i < ngeoms; i++ ) { - if ( TYPE_GETTYPE(points[i]->type) != POINTTYPE ) + LWGEOM *g = geoms[i]; + + if ( lwgeom_is_empty(g) ) continue; + + if ( g->type == POINTTYPE ) { - lwerror("lwline_from_lwpointarray: invalid input type: %s", - lwgeom_typename(TYPE_GETTYPE(points[i]->type))); + lwpoint_getPoint4d_p((LWPOINT*)g, &pt); + ptarray_append_point(pa, &pt, LW_TRUE); + } + else if ( g->type == LINETYPE ) + { + ptarray_append_ptarray(pa, ((LWLINE*)g)->points, -1); + } + else + { + ptarray_free(pa); + lwerror("lwline_from_ptarray: invalid input type: %s", lwtype_name(g->type)); return NULL; } - if ( TYPE_HASZ(points[i]->type) ) zmflag |= 2; - if ( TYPE_HASM(points[i]->type) ) zmflag |= 1; - if ( zmflag == 3 ) break; } - if ( zmflag == 0 ) ptsize=2*sizeof(double); - else if ( zmflag == 3 ) ptsize=4*sizeof(double); - else ptsize=3*sizeof(double); + if ( pa->npoints > 0 ) + line = lwline_construct(srid, NULL, pa); + else { + /* Is this really any different from the above ? */ + ptarray_free(pa); + line = lwline_construct_empty(srid, hasz, hasm); + } + + return line; +} + +/* + * Construct a LWLINE from an array of LWPOINTs + * LWLINE dimensions are large enough to host all input dimensions. + */ +LWLINE * +lwline_from_ptarray(int srid, uint32_t npoints, LWPOINT **points) +{ + int i; + int hasz = LW_FALSE; + int hasm = LW_FALSE; + POINTARRAY *pa; + LWLINE *line; + POINT4D pt; /* - * Allocate output points array + * Find output dimensions, check integrity */ - size = ptsize*npoints; - newpoints = lwalloc(size); - memset(newpoints, 0, size); - - ptr=newpoints; for (i=0; ipoint); - memcpy(ptr, getPoint_internal(points[i]->point, 0), size); - ptr+=ptsize; + if ( points[i]->type != POINTTYPE ) + { + lwerror("lwline_from_ptarray: invalid input type: %s", lwtype_name(points[i]->type)); + return NULL; + } + if ( FLAGS_GET_Z(points[i]->flags) ) hasz = LW_TRUE; + if ( FLAGS_GET_M(points[i]->flags) ) hasm = LW_TRUE; + if ( hasz && hasm ) break; /* Nothing more to learn! */ } - pa = pointArray_construct(newpoints, zmflag&2, zmflag&1, npoints); + pa = ptarray_construct_empty(hasz, hasm, npoints); + + for ( i=0; i < npoints; i++ ) + { + if ( ! lwpoint_is_empty(points[i]) ) + { + lwpoint_getPoint4d_p(points[i], &pt); + ptarray_append_point(pa, &pt, LW_TRUE); + } + } - return lwline_construct(SRID, NULL, pa); + if ( pa->npoints > 0 ) + line = lwline_construct(srid, NULL, pa); + else + line = lwline_construct_empty(srid, hasz, hasm); + + return line; } /* * Construct a LWLINE from a LWMPOINT */ LWLINE * -lwline_from_lwmpoint(int SRID, LWMPOINT *mpoint) +lwline_from_lwmpoint(int srid, LWMPOINT *mpoint) { - unsigned int i; + uint32_t i; POINTARRAY *pa; - char zmflag = TYPE_GETZM(mpoint->type); + char zmflag = FLAGS_GET_ZM(mpoint->flags); size_t ptsize, size; - uchar *newpoints, *ptr; + uint8_t *newpoints, *ptr; if ( zmflag == 0 ) ptsize=2*sizeof(double); else if ( zmflag == 3 ) ptsize=4*sizeof(double); @@ -480,38 +283,55 @@ ptr+=ptsize; } - pa = pointArray_construct(newpoints, zmflag&2, zmflag&1, - mpoint->ngeoms); - + pa = ptarray_construct_reference_data(zmflag&2, zmflag&1, mpoint->ngeoms, newpoints); + LWDEBUGF(3, "lwline_from_lwmpoint: constructed pointarray for %d points, %d zmflag", mpoint->ngeoms, zmflag); - return lwline_construct(SRID, NULL, pa); + return lwline_construct(srid, NULL, pa); } -LWLINE * -lwline_addpoint(LWLINE *line, LWPOINT *point, unsigned int where) +/** +* Returns freshly allocated #LWPOINT that corresponds to the index where. +* Returns NULL if the geometry is empty or the index invalid. +*/ +LWPOINT* +lwline_get_lwpoint(LWLINE *line, int where) { - POINTARRAY *newpa; - LWLINE *ret; + POINT4D pt; + LWPOINT *lwpoint; + POINTARRAY *pa; - newpa = ptarray_addPoint(line->points, - getPoint_internal(point->point, 0), - TYPE_NDIMS(point->type), where); + if ( lwline_is_empty(line) || where < 0 || where >= line->points->npoints ) + return NULL; - ret = lwline_construct(line->SRID, ptarray_compute_box2d(newpa), newpa); + pa = ptarray_construct_empty(FLAGS_GET_Z(line->flags), FLAGS_GET_M(line->flags), 1); + pt = getPoint4d(line->points, where); + ptarray_append_point(pa, &pt, LW_TRUE); + lwpoint = lwpoint_construct(line->srid, NULL, pa); + return lwpoint; +} - return ret; + +int +lwline_add_lwpoint(LWLINE *line, LWPOINT *point, int where) +{ + POINT4D pt; + getPoint4d_p(point->point, 0, &pt); + return ptarray_insert_point(line->points, &pt, where); } + + LWLINE * -lwline_removepoint(LWLINE *line, unsigned int index) +lwline_removepoint(LWLINE *line, uint32_t index) { POINTARRAY *newpa; LWLINE *ret; newpa = ptarray_removePoint(line->points, index); - ret = lwline_construct(line->SRID, ptarray_compute_box2d(newpa), newpa); + ret = lwline_construct(line->srid, NULL, newpa); + lwgeom_add_bbox((LWGEOM *) ret); return ret; } @@ -520,11 +340,11 @@ * Note: input will be changed, make sure you have permissions for this. */ void -lwline_setPoint4d(LWLINE *line, unsigned int index, POINT4D *newpoint) +lwline_setPoint4d(LWLINE *line, uint32_t index, POINT4D *newpoint) { - setPoint4d(line->points, index, newpoint); + ptarray_set_point4d(line->points, index, newpoint); /* Update the box, if there is one to update */ - if( line->bbox ) + if ( line->bbox ) { lwgeom_drop_bbox((LWGEOM*)line); lwgeom_add_bbox((LWGEOM*)line); @@ -548,20 +368,20 @@ POINTARRAY *pa = NULL; POINT3DZ p1, p2; - if ( TYPE_GETTYPE(lwline->type) != LINETYPE ) + if ( lwline->type != LINETYPE ) { lwerror("lwline_construct_from_lwline: only line types supported"); return NULL; } - hasz = TYPE_HASZ(lwline->type); + hasz = FLAGS_GET_Z(lwline->flags); hasm = 1; /* Null points or npoints == 0 will result in empty return geometry */ if ( lwline->points ) { npoints = lwline->points->npoints; - length = lwgeom_pointarray_length2d(lwline->points); + length = ptarray_length_2d(lwline->points); getPoint3dz_p(lwline->points, 0, &p1); } @@ -585,9 +405,96 @@ q.y = p2.y; q.z = p2.z; q.m = m; - setPoint4d(pa, i, &q); + ptarray_set_point4d(pa, i, &q); p1 = p2; } - return lwline_construct(lwline->SRID, NULL, pa); + return lwline_construct(lwline->srid, NULL, pa); +} + +LWGEOM* +lwline_remove_repeated_points(LWLINE *lwline) +{ + POINTARRAY* npts = ptarray_remove_repeated_points(lwline->points); + + LWDEBUGF(3, "lwline_remove_repeated_points: npts %p", npts); + + return (LWGEOM*)lwline_construct(lwline->srid, + lwline->bbox ? gbox_copy(lwline->bbox) : 0, + npts); +} + +int +lwline_is_closed(const LWLINE *line) +{ + if (FLAGS_GET_Z(line->flags)) + return ptarray_isclosed3d(line->points); + + return ptarray_isclosed2d(line->points); +} + + +LWLINE* +lwline_force_dims(const LWLINE *line, int hasz, int hasm) +{ + POINTARRAY *pdims = NULL; + LWLINE *lineout; + + /* Return 2D empty */ + if( lwline_is_empty(line) ) + { + lineout = lwline_construct_empty(line->srid, hasz, hasm); + } + else + { + pdims = ptarray_force_dims(line->points, hasz, hasm); + lineout = lwline_construct(line->srid, NULL, pdims); + } + lineout->type = line->type; + return lineout; +} + +int lwline_is_empty(const LWLINE *line) +{ + if ( !line->points || line->points->npoints == 0 ) + return LW_TRUE; + return LW_FALSE; +} + + +int lwline_count_vertices(LWLINE *line) +{ + assert(line); + if ( ! line->points ) + return 0; + return line->points->npoints; +} + +LWLINE* lwline_simplify(const LWLINE *iline, double dist) +{ + LWLINE *oline; + + LWDEBUG(2, "function called"); + + /* Skip empty case */ + if( lwline_is_empty(iline) ) + return lwline_clone(iline); + + oline = lwline_construct(iline->srid, NULL, ptarray_simplify(iline->points, dist, 2)); + oline->type = iline->type; + return oline; +} + +double lwline_length(const LWLINE *line) +{ + if ( lwline_is_empty(line) ) + return 0.0; + return ptarray_length(line->points); +} + +double lwline_length_2d(const LWLINE *line) +{ + if ( lwline_is_empty(line) ) + return 0.0; + return ptarray_length_2d(line->points); } diff -Nru postgis-1.5.3/liblwgeom/lwlinearreferencing.c postgis-2.0.1/liblwgeom/lwlinearreferencing.c --- postgis-1.5.3/liblwgeom/lwlinearreferencing.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwlinearreferencing.c 2012-06-20 03:02:07.000000000 +0000 @@ -0,0 +1,850 @@ +/********************************************************************** + * $Id$ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * Copyright 2011 Paul Ramsey + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include "liblwgeom_internal.h" +#include "lwgeom_log.h" + + +static int +segment_locate_along(const POINT4D *p1, const POINT4D *p2, double m, double offset, POINT4D *pn) +{ + double m1 = p1->m; + double m2 = p2->m; + double mprop; + + /* M is out of range, no new point generated. */ + if ( (m < FP_MIN(m1,m2)) || (m > FP_MAX(m1,m2)) ) + { + return LW_FALSE; + } + + /* We'll just can out on this degenerate case for now. + Correct behavior is probably an mprop of 0.5? + Still would have to deal with case of true p1==p2. */ + if( m1 == m2 ) + { + lwerror("Zero measure-length line encountered!"); + } + + /* M is in range, new point to be generated. */ + mprop = (m - m1) / (m2 - m1); + pn->x = p1->x + (p2->x - p1->x) * mprop; + pn->y = p1->y + (p2->y - p1->y) * mprop; + pn->z = p1->z + (p2->z - p1->z) * mprop; + pn->m = m; + + /* Offset to the left or right, if necessary. */ + if ( offset != 0.0 ) + { + double theta = atan2(p2->y - p1->y, p2->x - p1->x); + pn->x -= sin(theta) * offset; + pn->y += cos(theta) * offset; + } + + return LW_TRUE; +} + + +static POINTARRAY* +ptarray_locate_along(const POINTARRAY *pa, double m, double offset) +{ + int i; + POINT4D p1, p2, pn; + POINTARRAY *dpa = NULL; + + /* Can't do anything with degenerate point arrays */ + if ( ! pa || pa->npoints < 2 ) return NULL; + + /* Walk through each segment in the point array */ + for ( i = 1; i < pa->npoints; i++ ) + { + getPoint4d_p(pa, i-1, &p1); + getPoint4d_p(pa, i, &p2); + + /* No derived point? Move to next segment. */ + if ( segment_locate_along(&p1, &p2, m, offset, &pn) == LW_FALSE ) + continue; + + /* No pointarray, make a fresh one */ + if ( dpa == NULL ) + dpa = ptarray_construct_empty(ptarray_has_z(pa), ptarray_has_m(pa), 8); + + /* Add our new point to the array */ + ptarray_append_point(dpa, &pn, 0); + } + + return dpa; +} + +static LWMPOINT* +lwline_locate_along(const LWLINE *lwline, double m, double offset) +{ + POINTARRAY *opa = NULL; + LWMPOINT *mp = NULL; + LWGEOM *lwg = lwline_as_lwgeom(lwline); + int hasz, hasm, srid; + + /* Return degenerates upwards */ + if ( ! lwline ) return NULL; + + /* Create empty return shell */ + srid = lwgeom_get_srid(lwg); + hasz = lwgeom_has_z(lwg); + hasm = lwgeom_has_m(lwg); + + if ( hasm ) + { + /* Find points along */ + opa = ptarray_locate_along(lwline->points, m, offset); + } + else + { + LWLINE *lwline_measured = lwline_measured_from_lwline(lwline, 0.0, 1.0); + opa = ptarray_locate_along(lwline_measured->points, m, offset); + lwline_free(lwline_measured); + } + + /* Return NULL as EMPTY */ + if ( ! opa ) + return lwmpoint_construct_empty(srid, hasz, hasm); + + /* Convert pointarray into a multipoint */ + mp = lwmpoint_construct(srid, opa); + ptarray_free(opa); + return mp; +} + +static LWMPOINT* +lwmline_locate_along(const LWMLINE *lwmline, double m, double offset) +{ + LWMPOINT *lwmpoint = NULL; + LWGEOM *lwg = lwmline_as_lwgeom(lwmline); + int i, j; + + /* Return degenerates upwards */ + if ( (!lwmline) || (lwmline->ngeoms < 1) ) return NULL; + + /* Construct return */ + lwmpoint = lwmpoint_construct_empty(lwgeom_get_srid(lwg), lwgeom_has_z(lwg), lwgeom_has_m(lwg)); + + /* Locate along each sub-line */ + for ( i = 0; i < lwmline->ngeoms; i++ ) + { + LWMPOINT *along = lwline_locate_along(lwmline->geoms[i], m, offset); + if ( along && ! lwgeom_is_empty((LWGEOM*)along) ) + { + for ( j = 0; j < along->ngeoms; j++ ) + { + lwmpoint_add_lwpoint(lwmpoint, along->geoms[j]); + } + /* Free the containing geometry, but leave the sub-geometries around */ + if ( along->bbox ) lwfree(along->bbox); + lwfree(along); + } + } + return lwmpoint; +} + +static LWMPOINT* +lwpoint_locate_along(const LWPOINT *lwpoint, double m, double offset) +{ + double point_m = lwpoint_get_m(lwpoint); + LWGEOM *lwg = lwpoint_as_lwgeom(lwpoint); + LWMPOINT *r = lwmpoint_construct_empty(lwgeom_get_srid(lwg), lwgeom_has_z(lwg), lwgeom_has_m(lwg)); + if ( FP_EQUALS(m, point_m) ) + { + lwmpoint_add_lwpoint(r, lwpoint_clone(lwpoint)); + } + return r; +} + +static LWMPOINT* +lwmpoint_locate_along(const LWMPOINT *lwin, double m, double offset) +{ + LWGEOM *lwg = lwmpoint_as_lwgeom(lwin); + LWMPOINT *lwout = NULL; + int i; + + /* Construct return */ + lwout = lwmpoint_construct_empty(lwgeom_get_srid(lwg), lwgeom_has_z(lwg), lwgeom_has_m(lwg)); + + for ( i = 0; i < lwin->ngeoms; i++ ) + { + double point_m = lwpoint_get_m(lwin->geoms[i]); + if ( FP_EQUALS(m, point_m) ) + { + lwmpoint_add_lwpoint(lwout, lwpoint_clone(lwin->geoms[i])); + } + } + + return lwout; +} + +LWGEOM* +lwgeom_locate_along(const LWGEOM *lwin, double m, double offset) +{ + if ( ! lwin ) return NULL; + + if ( ! lwgeom_has_m(lwin) ) + lwerror("Input geometry does not have a measure dimension"); + + switch (lwin->type) + { + case POINTTYPE: + return (LWGEOM*)lwpoint_locate_along((LWPOINT*)lwin, m, offset); + case MULTIPOINTTYPE: + return (LWGEOM*)lwmpoint_locate_along((LWMPOINT*)lwin, m, offset); + case LINETYPE: + return (LWGEOM*)lwline_locate_along((LWLINE*)lwin, m, offset); + case MULTILINETYPE: + return (LWGEOM*)lwmline_locate_along((LWMLINE*)lwin, m, offset); + /* Only line types supported right now */ + /* TO DO: CurveString, CompoundCurve, MultiCurve */ + /* TO DO: Point, MultiPoint */ + default: + lwerror("Only linear geometries are supported, %s provided.",lwtype_name(lwin->type)); + return NULL; + } + return NULL; +} + +/** +* Given a POINT4D and an ordinate number, return +* the value of the ordinate. +* @param p input point +* @param ordinate number (1=x, 2=y, 3=z, 4=m) +* @return d value at that ordinate +*/ +double lwpoint_get_ordinate(const POINT4D *p, char ordinate) +{ + if ( ! p ) + { + lwerror("Null input geometry."); + return 0.0; + } + + if ( ! ( ordinate == 'X' || ordinate == 'Y' || ordinate == 'Z' || ordinate == 'M' ) ) + { + lwerror("Cannot extract %c ordinate.", ordinate); + return 0.0; + } + + if ( ordinate == 'X' ) + return p->x; + if ( ordinate == 'Y' ) + return p->y; + if ( ordinate == 'Z' ) + return p->z; + if ( ordinate == 'M' ) + return p->m; + + /* X */ + return p->x; + +} + +/** +* Given a point, ordinate number and value, set that ordinate on the +* point. +*/ +void lwpoint_set_ordinate(POINT4D *p, char ordinate, double value) +{ + if ( ! p ) + { + lwerror("Null input geometry."); + return; + } + + if ( ! ( ordinate == 'X' || ordinate == 'Y' || ordinate == 'Z' || ordinate == 'M' ) ) + { + lwerror("Cannot set %c ordinate.", ordinate); + return; + } + + LWDEBUGF(4, " setting ordinate %c to %g", ordinate, value); + + switch ( ordinate ) + { + case 'X': + p->x = value; + return; + case 'Y': + p->y = value; + return; + case 'Z': + p->z = value; + return; + case 'M': + p->m = value; + return; + } +} + +/** +* Given two points, a dimensionality, an ordinate, and an interpolation value +* generate a new point that is proportionally between the input points, +* using the values in the provided dimension as the scaling factors. +*/ +int point_interpolate(const POINT4D *p1, const POINT4D *p2, POINT4D *p, int hasz, int hasm, char ordinate, double interpolation_value) +{ + static char* dims = "XYZM"; + double p1_value = lwpoint_get_ordinate(p1, ordinate); + double p2_value = lwpoint_get_ordinate(p2, ordinate); + double proportion; + int i = 0; + + if ( ! ( ordinate == 'X' || ordinate == 'Y' || ordinate == 'Z' || ordinate == 'M' ) ) + { + lwerror("Cannot set %c ordinate.", ordinate); + return 0; + } + + if ( FP_MIN(p1_value, p2_value) > interpolation_value || + FP_MAX(p1_value, p2_value) < interpolation_value ) + { + lwerror("Cannot interpolate to a value (%g) not between the input points (%g, %g).", interpolation_value, p1_value, p2_value); + return 0; + } + + proportion = fabs((interpolation_value - p1_value) / (p2_value - p1_value)); + + for ( i = 0; i < 4; i++ ) + { + double newordinate = 0.0; + if ( dims[i] == 'Z' && ! hasz ) continue; + if ( dims[i] == 'M' && ! hasm ) continue; + p1_value = lwpoint_get_ordinate(p1, dims[i]); + p2_value = lwpoint_get_ordinate(p2, dims[i]); + newordinate = p1_value + proportion * (p2_value - p1_value); + lwpoint_set_ordinate(p, dims[i], newordinate); + LWDEBUGF(4, " clip ordinate(%c) p1_value(%g) p2_value(%g) proportion(%g) newordinate(%g) ", dims[i], p1_value, p2_value, proportion, newordinate ); + } + + return 1; +} + + +/** +* Clip an input POINT between two values, on any ordinate input. +*/ +LWCOLLECTION* +lwpoint_clip_to_ordinate_range(const LWPOINT *point, char ordinate, double from, double to) +{ + LWCOLLECTION *lwgeom_out = NULL; + char hasz, hasm; + POINT4D p4d; + double ordinate_value; + + /* Nothing to do with NULL */ + if ( ! point ) + lwerror("Null input geometry."); + + /* Ensure 'from' is less than 'to'. */ + if ( to < from ) + { + double t = from; + from = to; + to = t; + } + + /* Read Z/M info */ + hasz = lwgeom_has_z(lwpoint_as_lwgeom(point)); + hasm = lwgeom_has_m(lwpoint_as_lwgeom(point)); + + /* Prepare return object */ + lwgeom_out = lwcollection_construct_empty(MULTIPOINTTYPE, point->srid, hasz, hasm); + + /* Test if ordinate is in range */ + lwpoint_getPoint4d_p(point, &p4d); + ordinate_value = lwpoint_get_ordinate(&p4d, ordinate); + if ( from <= ordinate_value && to >= ordinate_value ) + { + LWPOINT *lwp = lwpoint_clone(point); + lwcollection_add_lwgeom(lwgeom_out, lwpoint_as_lwgeom(lwp)); + } + + /* Set the bbox */ + lwgeom_drop_bbox((LWGEOM*)lwgeom_out); + lwgeom_add_bbox((LWGEOM*)lwgeom_out); + + return lwgeom_out; +} + + + +/** +* Clip an input MULTIPOINT between two values, on any ordinate input. +*/ +LWCOLLECTION* +lwmpoint_clip_to_ordinate_range(const LWMPOINT *mpoint, char ordinate, double from, double to) +{ + LWCOLLECTION *lwgeom_out = NULL; + char hasz, hasm; + int i; + + /* Nothing to do with NULL */ + if ( ! mpoint ) + lwerror("Null input geometry."); + + /* Ensure 'from' is less than 'to'. */ + if ( to < from ) + { + double t = from; + from = to; + to = t; + } + + /* Read Z/M info */ + hasz = lwgeom_has_z(lwmpoint_as_lwgeom(mpoint)); + hasm = lwgeom_has_m(lwmpoint_as_lwgeom(mpoint)); + + /* Prepare return object */ + lwgeom_out = lwcollection_construct_empty(MULTIPOINTTYPE, mpoint->srid, hasz, hasm); + + /* For each point, is its ordinate value between from and to? */ + for ( i = 0; i < mpoint->ngeoms; i ++ ) + { + POINT4D p4d; + double ordinate_value; + + lwpoint_getPoint4d_p(mpoint->geoms[i], &p4d); + ordinate_value = lwpoint_get_ordinate(&p4d, ordinate); + + if ( from <= ordinate_value && to >= ordinate_value ) + { + LWPOINT *lwp = lwpoint_clone(mpoint->geoms[i]); + lwcollection_add_lwgeom(lwgeom_out, lwpoint_as_lwgeom(lwp)); + } + } + + /* Set the bbox */ + lwgeom_drop_bbox((LWGEOM*)lwgeom_out); + lwgeom_add_bbox((LWGEOM*)lwgeom_out); + + return lwgeom_out; +} + +/** +* Clip an input MULTILINESTRING between two values, on any ordinate input. +*/ +LWCOLLECTION* +lwmline_clip_to_ordinate_range(const LWMLINE *mline, char ordinate, double from, double to) +{ + LWCOLLECTION *lwgeom_out = NULL; + + if ( ! mline ) + { + lwerror("Null input geometry."); + return NULL; + } + + if ( mline->ngeoms == 1) + { + lwgeom_out = lwline_clip_to_ordinate_range(mline->geoms[0], ordinate, from, to); + } + else + { + LWCOLLECTION *col; + char hasz = lwgeom_has_z(lwmline_as_lwgeom(mline)); + char hasm = lwgeom_has_m(lwmline_as_lwgeom(mline)); + int i, j; + char homogeneous = 1; + size_t geoms_size = 0; + lwgeom_out = lwcollection_construct_empty(MULTILINETYPE, mline->srid, hasz, hasm); + FLAGS_SET_Z(lwgeom_out->flags, hasz); + FLAGS_SET_M(lwgeom_out->flags, hasm); + for ( i = 0; i < mline->ngeoms; i ++ ) + { + col = lwline_clip_to_ordinate_range(mline->geoms[i], ordinate, from, to); + if ( col ) + { + /* Something was left after the clip. */ + if ( lwgeom_out->ngeoms + col->ngeoms > geoms_size ) + { + geoms_size += 16; + if ( lwgeom_out->geoms ) + { + lwgeom_out->geoms = lwrealloc(lwgeom_out->geoms, geoms_size * sizeof(LWGEOM*)); + } + else + { + lwgeom_out->geoms = lwalloc(geoms_size * sizeof(LWGEOM*)); + } + } + for ( j = 0; j < col->ngeoms; j++ ) + { + lwgeom_out->geoms[lwgeom_out->ngeoms] = col->geoms[j]; + lwgeom_out->ngeoms++; + } + if ( col->type != mline->type ) + { + homogeneous = 0; + } + /* Shallow free the struct, leaving the geoms behind. */ + if ( col->bbox ) lwfree(col->bbox); + lwfree(col->geoms); + lwfree(col); + } + } + lwgeom_drop_bbox((LWGEOM*)lwgeom_out); + lwgeom_add_bbox((LWGEOM*)lwgeom_out); + if ( ! homogeneous ) + { + lwgeom_out->type = COLLECTIONTYPE; + } + } + + if ( ! lwgeom_out || lwgeom_out->ngeoms == 0 ) /* Nothing left after clip. */ + { + return NULL; + } + + return lwgeom_out; + +} + + +/** +* Take in a LINESTRING and return a MULTILINESTRING of those portions of the +* LINESTRING between the from/to range for the specified ordinate (XYZM) +*/ +LWCOLLECTION* +lwline_clip_to_ordinate_range(const LWLINE *line, char ordinate, double from, double to) +{ + + POINTARRAY *pa_in = NULL; + LWCOLLECTION *lwgeom_out = NULL; + POINTARRAY *dp = NULL; + int i, rv; + int added_last_point = 0; + POINT4D *p = NULL, *q = NULL, *r = NULL; + double ordinate_value_p = 0.0, ordinate_value_q = 0.0; + char hasz = lwgeom_has_z(lwline_as_lwgeom(line)); + char hasm = lwgeom_has_m(lwline_as_lwgeom(line)); + char dims = FLAGS_NDIMS(line->flags); + + /* Null input, nothing we can do. */ + if ( ! line ) + { + lwerror("Null input geometry."); + return NULL; + } + + /* Ensure 'from' is less than 'to'. */ + if ( to < from ) + { + double t = from; + from = to; + to = t; + } + + LWDEBUGF(4, "from = %g, to = %g, ordinate = %c", from, to, ordinate); + LWDEBUGF(4, "%s", lwgeom_to_ewkt((LWGEOM*)line)); + + /* Asking for an ordinate we don't have. Error. */ + if ( (ordinate == 'Z' && ! hasz) || (ordinate == 'M' && ! hasm) ) + { + lwerror("Cannot clip on ordinate %d in a %d-d geometry.", ordinate, dims); + return NULL; + } + + /* Prepare our working point objects. */ + p = lwalloc(sizeof(POINT4D)); + q = lwalloc(sizeof(POINT4D)); + r = lwalloc(sizeof(POINT4D)); + + /* Construct a collection to hold our outputs. */ + lwgeom_out = lwcollection_construct_empty(MULTILINETYPE, line->srid, hasz, hasm); + + /* Get our input point array */ + pa_in = line->points; + + for ( i = 0; i < pa_in->npoints; i++ ) + { + LWDEBUGF(4, "Point #%d", i); + LWDEBUGF(4, "added_last_point %d", added_last_point); + if ( i > 0 ) + { + *q = *p; + ordinate_value_q = ordinate_value_p; + } + rv = getPoint4d_p(pa_in, i, p); + ordinate_value_p = lwpoint_get_ordinate(p, ordinate); + LWDEBUGF(4, " ordinate_value_p %g (current)", ordinate_value_p); + LWDEBUGF(4, " ordinate_value_q %g (previous)", ordinate_value_q); + + /* Is this point inside the ordinate range? Yes. */ + if ( ordinate_value_p >= from && ordinate_value_p <= to ) + { + LWDEBUGF(4, " inside ordinate range (%g, %g)", from, to); + + if ( ! added_last_point ) + { + LWDEBUG(4," new ptarray required"); + /* We didn't add the previous point, so this is a new segment. + * Make a new point array. */ + dp = ptarray_construct_empty(hasz, hasm, 32); + + /* We're transiting into the range so add an interpolated + * point at the range boundary. + * If we're on a boundary and crossing from the far side, + * we also need an interpolated point. */ + if ( i > 0 && ( /* Don't try to interpolate if this is the first point */ + ( ordinate_value_p > from && ordinate_value_p < to ) || /* Inside */ + ( ordinate_value_p == from && ordinate_value_q > to ) || /* Hopping from above */ + ( ordinate_value_p == to && ordinate_value_q < from ) ) ) /* Hopping from below */ + { + double interpolation_value; + (ordinate_value_q > to) ? (interpolation_value = to) : (interpolation_value = from); + rv = point_interpolate(q, p, r, hasz, hasm, ordinate, interpolation_value); + rv = ptarray_append_point(dp, r, LW_FALSE); + LWDEBUGF(4, "[0] interpolating between (%g, %g) with interpolation point (%g)", ordinate_value_q, ordinate_value_p, interpolation_value); + } + } + /* Add the current vertex to the point array. */ + rv = ptarray_append_point(dp, p, LW_FALSE); + if ( ordinate_value_p == from || ordinate_value_p == to ) + { + added_last_point = 2; /* Added on boundary. */ + } + else + { + added_last_point = 1; /* Added inside range. */ + } + } + /* Is this point inside the ordinate range? No. */ + else + { + LWDEBUGF(4, " added_last_point (%d)", added_last_point); + if ( added_last_point == 1 ) + { + /* We're transiting out of the range, so add an interpolated point + * to the point array at the range boundary. */ + double interpolation_value; + (ordinate_value_p > to) ? (interpolation_value = to) : (interpolation_value = from); + rv = point_interpolate(q, p, r, hasz, hasm, ordinate, interpolation_value); + rv = ptarray_append_point(dp, r, LW_FALSE); + LWDEBUGF(4, " [1] interpolating between (%g, %g) with interpolation point (%g)", ordinate_value_q, ordinate_value_p, interpolation_value); + } + else if ( added_last_point == 2 ) + { + /* We're out and the last point was on the boundary. + * If the last point was the near boundary, nothing to do. + * If it was the far boundary, we need an interpolated point. */ + if ( from != to && ( + (ordinate_value_q == from && ordinate_value_p > from) || + (ordinate_value_q == to && ordinate_value_p < to) ) ) + { + double interpolation_value; + (ordinate_value_p > to) ? (interpolation_value = to) : (interpolation_value = from); + rv = point_interpolate(q, p, r, hasz, hasm, ordinate, interpolation_value); + rv = ptarray_append_point(dp, r, LW_FALSE); + LWDEBUGF(4, " [2] interpolating between (%g, %g) with interpolation point (%g)", ordinate_value_q, ordinate_value_p, interpolation_value); + } + } + else if ( i && ordinate_value_q < from && ordinate_value_p > to ) + { + /* We just hopped over the whole range, from bottom to top, + * so we need to add *two* interpolated points! */ + dp = ptarray_construct(hasz, hasm, 2); + /* Interpolate lower point. */ + rv = point_interpolate(p, q, r, hasz, hasm, ordinate, from); + ptarray_set_point4d(dp, 0, r); + /* Interpolate upper point. */ + rv = point_interpolate(p, q, r, hasz, hasm, ordinate, to); + ptarray_set_point4d(dp, 1, r); + } + else if ( i && ordinate_value_q > to && ordinate_value_p < from ) + { + /* We just hopped over the whole range, from top to bottom, + * so we need to add *two* interpolated points! */ + dp = ptarray_construct(hasz, hasm, 2); + /* Interpolate upper point. */ + rv = point_interpolate(p, q, r, hasz, hasm, ordinate, to); + ptarray_set_point4d(dp, 0, r); + /* Interpolate lower point. */ + rv = point_interpolate(p, q, r, hasz, hasm, ordinate, from); + ptarray_set_point4d(dp, 1, r); + } + /* We have an extant point-array, save it out to a multi-line. */ + if ( dp ) + { + LWDEBUG(4, "saving pointarray to multi-line (1)"); + + /* Only one point, so we have to make an lwpoint to hold this + * and set the overall output type to a generic collection. */ + if ( dp->npoints == 1 ) + { + LWPOINT *opoint = lwpoint_construct(line->srid, NULL, dp); + lwgeom_out->type = COLLECTIONTYPE; + lwgeom_out = lwcollection_add_lwgeom(lwgeom_out, lwpoint_as_lwgeom(opoint)); + + } + else + { + LWLINE *oline = lwline_construct(line->srid, NULL, dp); + lwgeom_out = lwcollection_add_lwgeom(lwgeom_out, lwline_as_lwgeom(oline)); + } + + /* Pointarray is now owned by lwgeom_out, so drop reference to it */ + dp = NULL; + } + added_last_point = 0; + + } + } + + /* Still some points left to be saved out. */ + if ( dp && dp->npoints > 0 ) + { + LWDEBUG(4, "saving pointarray to multi-line (2)"); + LWDEBUGF(4, "dp->npoints == %d", dp->npoints); + LWDEBUGF(4, "lwgeom_out->ngeoms == %d", lwgeom_out->ngeoms); + + if ( dp->npoints == 1 ) + { + LWPOINT *opoint = lwpoint_construct(line->srid, NULL, dp); + lwgeom_out->type = COLLECTIONTYPE; + lwgeom_out = lwcollection_add_lwgeom(lwgeom_out, lwpoint_as_lwgeom(opoint)); + } + else + { + LWLINE *oline = lwline_construct(line->srid, NULL, dp); + lwgeom_out = lwcollection_add_lwgeom(lwgeom_out, lwline_as_lwgeom(oline)); + } + + /* Pointarray is now owned by lwgeom_out, so drop reference to it */ + dp = NULL; + } + + lwfree(p); + lwfree(q); + lwfree(r); + + if ( lwgeom_out->ngeoms > 0 ) + { + lwgeom_drop_bbox((LWGEOM*)lwgeom_out); + lwgeom_add_bbox((LWGEOM*)lwgeom_out); + } + + return lwgeom_out; + +} + +LWCOLLECTION* +lwgeom_clip_to_ordinate_range(const LWGEOM *lwin, char ordinate, double from, double to, double offset) +{ + LWCOLLECTION *out_col; + LWCOLLECTION *out_offset; + int i; + + if ( ! lwin ) + lwerror("lwgeom_clip_to_ordinate_range: null input geometry!"); + + switch ( lwin->type ) + { + case LINETYPE: + out_col = lwline_clip_to_ordinate_range((LWLINE*)lwin, ordinate, from, to); + break; + case MULTILINETYPE: + out_col = lwmline_clip_to_ordinate_range((LWMLINE*)lwin, ordinate, from, to); + break; + case MULTIPOINTTYPE: + out_col = lwmpoint_clip_to_ordinate_range((LWMPOINT*)lwin, ordinate, from, to); + break; + case POINTTYPE: + out_col = lwpoint_clip_to_ordinate_range((LWPOINT*)lwin, ordinate, from, to); + break; + default: + lwerror("This function does not accept %s geometries.", lwtype_name(lwin->type)); + return NULL;; + } + + /* Stop if result is NULL */ + if ( out_col == NULL ) + lwerror("lwgeom_clip_to_ordinate_range clipping routine returned NULL"); + + /* Return if we aren't going to offset the result */ + if ( FP_EQUALS(offset, 0.0) || lwgeom_is_empty(lwcollection_as_lwgeom(out_col)) ) + return out_col; + + /* Construct a collection to hold our outputs. */ + /* Things get ugly: GEOS offset drops Z's and M's so we have to drop ours */ + out_offset = lwcollection_construct_empty(MULTILINETYPE, lwin->srid, 0, 0); + + /* Try and offset the linear portions of the return value */ + for ( i = 0; i < out_col->ngeoms; i++ ) + { + int type = out_col->geoms[i]->type; + if ( type == POINTTYPE ) + { + lwnotice("lwgeom_clip_to_ordinate_range cannot offset a clipped point"); + continue; + } + else if ( type == LINETYPE ) + { + /* lwgeom_offsetcurve(line, offset, quadsegs, joinstyle (round), mitrelimit) */ + LWGEOM *lwoff = lwgeom_offsetcurve(lwgeom_as_lwline(out_col->geoms[i]), offset, 8, 1, 5.0); + if ( ! lwoff ) + { + lwerror("lwgeom_offsetcurve returned null"); + } + lwcollection_add_lwgeom(out_offset, lwoff); + } + else + { + lwerror("lwgeom_clip_to_ordinate_range found an unexpected type (%s) in the offset routine",lwtype_name(type)); + } + } + + return out_offset; +} + +LWCOLLECTION* +lwgeom_locate_between(const LWGEOM *lwin, double from, double to, double offset) +{ + if ( ! lwgeom_has_m(lwin) ) + lwerror("Input geometry does not have a measure dimension"); + + return lwgeom_clip_to_ordinate_range(lwin, 'M', from, to, offset); +} + +double +lwgeom_interpolate_point(const LWGEOM *lwin, const LWPOINT *lwpt) +{ + POINT4D p, p_proj; + double ret = 0.0; + + if ( ! lwin ) + lwerror("lwgeom_interpolate_point: null input geometry!"); + + if ( ! lwgeom_has_m(lwin) ) + lwerror("Input geometry does not have a measure dimension"); + + if ( lwgeom_is_empty(lwin) || lwpoint_is_empty(lwpt) ) + lwerror("Input geometry is empty"); + + switch ( lwin->type ) + { + case LINETYPE: + { + LWLINE *lwline = lwgeom_as_lwline(lwin); + lwpoint_getPoint4d_p(lwpt, &p); + ret = ptarray_locate_point(lwline->points, &p, NULL, &p_proj); + ret = p_proj.m; + break; + } + default: + lwerror("This function does not accept %s geometries.", lwtype_name(lwin->type)); + } + return ret; +} \ No newline at end of file diff -Nru postgis-1.5.3/liblwgeom/lwmcurve.c postgis-2.0.1/liblwgeom/lwmcurve.c --- postgis-1.5.3/liblwgeom/lwmcurve.c 2010-02-01 17:35:55.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwmcurve.c 2012-02-27 22:08:12.000000000 +0000 @@ -1,5 +1,5 @@ /********************************************************************** - * $Id: lwmcurve.c 5181 2010-02-01 17:35:55Z pramsey $ + * $Id: lwmcurve.c 9324 2012-02-27 22:08:12Z pramsey $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net @@ -13,126 +13,8 @@ #include #include #include -#include "liblwgeom.h" +#include "liblwgeom_internal.h" -LWMCURVE * -lwmcurve_deserialize(uchar *srl) -{ - LWMCURVE *result; - LWGEOM_INSPECTED *insp; - int stype; - int type = lwgeom_getType(srl[0]); - int i; - if (type != MULTICURVETYPE) - { - lwerror("lwmcurve_deserialize called on NON multicurve: %d", type); - return NULL; - } - insp = lwgeom_inspect(srl); - - result = lwalloc(sizeof(LWMCURVE)); - result->type = insp->type; - result->SRID = insp->SRID; - result->ngeoms = insp->ngeometries; - - if ( insp->ngeometries ) - { - result->geoms = lwalloc(sizeof(LWGEOM *)*insp->ngeometries); - } - else - { - result->geoms = NULL; - } - - if (lwgeom_hasBBOX(srl[0])) - { - result->bbox = lwalloc(sizeof(BOX2DFLOAT4)); - memcpy(result->bbox, srl+1, sizeof(BOX2DFLOAT4)); - } - else result->bbox = NULL; - - for (i = 0; i < insp->ngeometries; i++) - { - stype = lwgeom_getType(insp->sub_geoms[i][0]); - if (stype == CIRCSTRINGTYPE) - { - result->geoms[i] = (LWGEOM *)lwcircstring_deserialize(insp->sub_geoms[i]); - } - else if (stype == LINETYPE) - { - result->geoms[i] = (LWGEOM *)lwline_deserialize(insp->sub_geoms[i]); - } - else if (stype == COMPOUNDTYPE) - { - result->geoms[i] = (LWGEOM *)lwcompound_deserialize(insp->sub_geoms[i]); - } - else - { - lwerror("Only Circular strings, Line strings or Compound curves are permitted in a MultiCurve."); - - lwfree(result); - lwfree(insp); - return NULL; - } - - if (TYPE_NDIMS(result->geoms[i]->type) != TYPE_NDIMS(result->type)) - { - lwerror("Mixed dimensions (multicurve: %d, curve %d:%d)", - TYPE_NDIMS(result->type), i, - TYPE_NDIMS(result->geoms[i]->type)); - lwfree(result); - lwfree(insp); - return NULL; - } - } - return result; -} - -/* - * Add 'what' to this multicurve at position 'where'. - * where=0 == prepend - * where=-1 == append - * Returns a MULTICURVE or a COLLECTION - */ -LWGEOM * -lwmcurve_add(const LWMCURVE *to, uint32 where, const LWGEOM *what) -{ - LWCOLLECTION *col; - LWGEOM **geoms; - int newtype; - uint32 i; - - if (where == -1) where = to->ngeoms; - else if (where < -1 || where > to->ngeoms) - { - lwerror("lwmcurve_add: add position out of range %d..%d", - -1, to->ngeoms); - return NULL; - } - - /* dimensions compatibility are checked by caller */ - - /* Construct geoms array */ - geoms = lwalloc(sizeof(LWGEOM *)*(to->ngeoms+1)); - for (i = 0; i < where; i++) - { - geoms[i] = lwgeom_clone((LWGEOM *)to->geoms[i]); - } - geoms[where] = lwgeom_clone(what); - for (i = where; i < to->ngeoms; i++) - { - geoms[i+1] = lwgeom_clone((LWGEOM *)to->geoms[i]); - } - - if (TYPE_GETTYPE(what->type) == CIRCSTRINGTYPE) newtype = MULTICURVETYPE; - else newtype = COLLECTIONTYPE; - - col = lwcollection_construct(newtype, - to->SRID, NULL, - to->ngeoms + 1, geoms); - - return (LWGEOM *)col; -} diff -Nru postgis-1.5.3/liblwgeom/lwmline.c postgis-2.0.1/liblwgeom/lwmline.c --- postgis-1.5.3/liblwgeom/lwmline.c 2010-02-01 17:35:55.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwmline.c 2012-02-27 22:08:12.000000000 +0000 @@ -1,5 +1,5 @@ /********************************************************************** - * $Id: lwmline.c 5181 2010-02-01 17:35:55Z pramsey $ + * $Id: lwmline.c 9324 2012-02-27 22:08:12Z pramsey $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net @@ -13,7 +13,7 @@ #include #include #include -#include "liblwgeom.h" +#include "liblwgeom_internal.h" void lwmline_release(LWMLINE *lwmline) @@ -22,105 +22,17 @@ } LWMLINE * -lwmline_deserialize(uchar *srl) +lwmline_construct_empty(int srid, char hasz, char hasm) { - LWMLINE *result; - LWGEOM_INSPECTED *insp; - int type = lwgeom_getType(srl[0]); - int i; - - if ( type != MULTILINETYPE ) - { - lwerror("lwmline_deserialize called on NON multiline: %d", - type); - return NULL; - } - - insp = lwgeom_inspect(srl); - - result = lwalloc(sizeof(LWMLINE)); - result->type = insp->type; - result->SRID = insp->SRID; - result->ngeoms = insp->ngeometries; - - if ( insp->ngeometries ) - { - result->geoms = lwalloc(sizeof(LWLINE *)*insp->ngeometries); - } - else - { - result->geoms = NULL; - } - - if (lwgeom_hasBBOX(srl[0])) - { - result->bbox = lwalloc(sizeof(BOX2DFLOAT4)); - memcpy(result->bbox, srl+1, sizeof(BOX2DFLOAT4)); - } - else result->bbox = NULL; - - - for (i=0; ingeometries; i++) - { - result->geoms[i] = lwline_deserialize(insp->sub_geoms[i]); - if ( TYPE_NDIMS(result->geoms[i]->type) != TYPE_NDIMS(result->type) ) - { - lwerror("Mixed dimensions (multiline:%d, line%d:%d)", - TYPE_NDIMS(result->type), i, - TYPE_NDIMS(result->geoms[i]->type) - ); - return NULL; - } - } - - return result; + LWMLINE *ret = (LWMLINE*)lwcollection_construct_empty(MULTILINETYPE, srid, hasz, hasm); + return ret; } -/* - * Add 'what' to this multiline at position 'where'. - * where=0 == prepend - * where=-1 == append - * Returns a MULTILINE or a COLLECTION - */ -LWGEOM * -lwmline_add(const LWMLINE *to, uint32 where, const LWGEOM *what) -{ - LWCOLLECTION *col; - LWGEOM **geoms; - int newtype; - uint32 i; - - if ( where == -1 ) where = to->ngeoms; - else if ( where < -1 || where > to->ngeoms ) - { - lwerror("lwmline_add: add position out of range %d..%d", - -1, to->ngeoms); - return NULL; - } - - /* dimensions compatibility are checked by caller */ - - /* Construct geoms array */ - geoms = lwalloc(sizeof(LWGEOM *)*(to->ngeoms+1)); - for (i=0; igeoms[i]); - } - geoms[where] = lwgeom_clone(what); - for (i=where; ingeoms; i++) - { - geoms[i+1] = lwgeom_clone((LWGEOM *)to->geoms[i]); - } - if ( TYPE_GETTYPE(what->type) == LINETYPE ) newtype = MULTILINETYPE; - else newtype = COLLECTIONTYPE; - - col = lwcollection_construct(newtype, - to->SRID, NULL, - to->ngeoms+1, geoms); - - return (LWGEOM *)col; +LWMLINE* lwmline_add_lwline(LWMLINE *mobj, const LWLINE *obj) +{ + return (LWMLINE*)lwcollection_add_lwgeom((LWCOLLECTION*)mobj, (LWGEOM*)obj); } /** @@ -136,13 +48,13 @@ double m_range = m_end - m_start; LWGEOM **geoms = NULL; - if ( TYPE_GETTYPE(lwmline->type) != MULTILINETYPE ) + if ( lwmline->type != MULTILINETYPE ) { lwerror("lwmline_measured_from_lmwline: only multiline types supported"); return NULL; } - hasz = TYPE_HASZ(lwmline->type); + hasz = FLAGS_GET_Z(lwmline->flags); hasm = 1; /* Calculate the total length of the mline */ @@ -151,13 +63,13 @@ LWLINE *lwline = (LWLINE*)lwmline->geoms[i]; if ( lwline->points && lwline->points->npoints > 1 ) { - length += lwgeom_pointarray_length2d(lwline->points); + length += ptarray_length_2d(lwline->points); } } if ( lwgeom_is_empty((LWGEOM*)lwmline) ) { - return (LWMLINE*)lwcollection_construct_empty(lwmline->SRID, hasz, hasm); + return (LWMLINE*)lwcollection_construct_empty(MULTILINETYPE, lwmline->srid, hasz, hasm); } geoms = lwalloc(sizeof(LWGEOM*) * lwmline->ngeoms); @@ -170,7 +82,7 @@ if ( lwline->points && lwline->points->npoints > 1 ) { - sub_length = lwgeom_pointarray_length2d(lwline->points); + sub_length = ptarray_length_2d(lwline->points); } sub_m_start = (m_start + m_range * length_so_far / length); @@ -181,27 +93,23 @@ length_so_far += sub_length; } - return (LWMLINE*)lwcollection_construct(lwmline->type, lwmline->SRID, NULL, lwmline->ngeoms, geoms); + return (LWMLINE*)lwcollection_construct(lwmline->type, lwmline->srid, NULL, lwmline->ngeoms, geoms); } void lwmline_free(LWMLINE *mline) { int i; + if ( ! mline ) return; + if ( mline->bbox ) - { lwfree(mline->bbox); - } + for ( i = 0; i < mline->ngeoms; i++ ) - { - if ( mline->geoms[i] ) - { + if ( mline->geoms && mline->geoms[i] ) lwline_free(mline->geoms[i]); - } - } + if ( mline->geoms ) - { lwfree(mline->geoms); - } - lwfree(mline); + lwfree(mline); } diff -Nru postgis-1.5.3/liblwgeom/lwmpoint.c postgis-2.0.1/liblwgeom/lwmpoint.c --- postgis-1.5.3/liblwgeom/lwmpoint.c 2010-02-01 17:35:55.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwmpoint.c 2012-02-27 22:08:12.000000000 +0000 @@ -1,9 +1,9 @@ /********************************************************************** - * $Id: lwmpoint.c 5181 2010-02-01 17:35:55Z pramsey $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net - * Copyright 2001-2006 Refractions Research Inc. + * + * Copyright (C) 2001-2006 Refractions Research Inc. * * This is free software; you can redistribute and/or modify it under * the terms of the GNU General Public Licence. See the COPYING file. @@ -13,7 +13,8 @@ #include #include #include -#include "liblwgeom.h" +#include "liblwgeom_internal.h" +#include "lwgeom_log.h" void lwmpoint_release(LWMPOINT *lwmpoint) @@ -21,130 +22,88 @@ lwgeom_release(lwmpoint_as_lwgeom(lwmpoint)); } - LWMPOINT * -lwmpoint_deserialize(uchar *srl) +lwmpoint_construct_empty(int srid, char hasz, char hasm) { - LWMPOINT *result; - LWGEOM_INSPECTED *insp; - int type = lwgeom_getType(srl[0]); - int i; - - if ( type != MULTIPOINTTYPE ) - { - lwerror("lwmpoint_deserialize called on NON multipoint: %d", - type); - return NULL; - } - - insp = lwgeom_inspect(srl); - - result = lwalloc(sizeof(LWMPOINT)); - result->type = insp->type; - result->SRID = insp->SRID; - result->ngeoms = insp->ngeometries; - - if ( insp->ngeometries ) - { - result->geoms = lwalloc(sizeof(LWPOINT *)*insp->ngeometries); - } - else - { - result->geoms = NULL; - } - - if (lwgeom_hasBBOX(srl[0])) - { - result->bbox = lwalloc(sizeof(BOX2DFLOAT4)); - memcpy(result->bbox, srl+1, sizeof(BOX2DFLOAT4)); - } - else - { - result->bbox = NULL; - } - - for (i=0; ingeometries; i++) - { - result->geoms[i] = lwpoint_deserialize(insp->sub_geoms[i]); - if ( TYPE_NDIMS(result->geoms[i]->type) != TYPE_NDIMS(result->type) ) - { - lwerror("Mixed dimensions (multipoint:%d, point%d:%d)", - TYPE_NDIMS(result->type), i, - TYPE_NDIMS(result->geoms[i]->type) - ); - return NULL; - } - } - - return result; + LWMPOINT *ret = (LWMPOINT*)lwcollection_construct_empty(MULTIPOINTTYPE, srid, hasz, hasm); + return ret; } -/* - * Add 'what' to this multipoint at position 'where'. - * where=0 == prepend - * where=-1 == append - * Returns a MULTIPOINT or a COLLECTION - */ -LWGEOM * -lwmpoint_add(const LWMPOINT *to, uint32 where, const LWGEOM *what) -{ - LWCOLLECTION *col; - LWGEOM **geoms; - int newtype; - uint32 i; - - if ( where == -1 ) where = to->ngeoms; - else if ( where < -1 || where > to->ngeoms ) - { - lwerror("lwmpoint_add: add position out of range %d..%d", - -1, to->ngeoms); - return NULL; - } - - /* dimensions compatibility are checked by caller */ +LWMPOINT* lwmpoint_add_lwpoint(LWMPOINT *mobj, const LWPOINT *obj) +{ + LWDEBUG(4, "Called"); + return (LWMPOINT*)lwcollection_add_lwgeom((LWCOLLECTION*)mobj, (LWGEOM*)obj); +} - /* Construct geoms array */ - geoms = lwalloc(sizeof(LWGEOM *)*(to->ngeoms+1)); - for (i=0; igeoms[i]); - } - geoms[where] = lwgeom_clone(what); - for (i=where; ingeoms; i++) - { - geoms[i+1] = lwgeom_clone((LWGEOM *)to->geoms[i]); +LWMPOINT * +lwmpoint_construct(int srid, const POINTARRAY *pa) +{ + int i; + int hasz = ptarray_has_z(pa); + int hasm = ptarray_has_m(pa); + LWMPOINT *ret = (LWMPOINT*)lwcollection_construct_empty(MULTIPOINTTYPE, srid, hasz, hasm); + + for ( i = 0; i < pa->npoints; i++ ) + { + LWPOINT *lwp; + POINT4D p; + getPoint4d_p(pa, i, &p); + lwp = lwpoint_make(srid, hasz, hasm, &p); + lwmpoint_add_lwpoint(ret, lwp); } - - if ( TYPE_GETTYPE(what->type) == POINTTYPE ) newtype = MULTIPOINTTYPE; - else newtype = COLLECTIONTYPE; - - col = lwcollection_construct(newtype, - to->SRID, NULL, - to->ngeoms+1, geoms); - - return (LWGEOM *)col; - + + return ret; } + void lwmpoint_free(LWMPOINT *mpt) { int i; + + if ( ! mpt ) return; + if ( mpt->bbox ) - { lwfree(mpt->bbox); - } + for ( i = 0; i < mpt->ngeoms; i++ ) - { - if ( mpt->geoms[i] ) - { + if ( mpt->geoms && mpt->geoms[i] ) lwpoint_free(mpt->geoms[i]); - } - } + if ( mpt->geoms ) - { lwfree(mpt->geoms); - } + lwfree(mpt); +} + +LWGEOM* +lwmpoint_remove_repeated_points(LWMPOINT *mpoint) +{ + uint32_t nnewgeoms; + uint32_t i, j; + LWGEOM **newgeoms; + + newgeoms = lwalloc(sizeof(LWGEOM *)*mpoint->ngeoms); + nnewgeoms = 0; + for (i=0; ingeoms; ++i) + { + /* Brute force, may be optimized by building an index */ + int seen=0; + for (j=0; jgeoms[i]) ) + { + seen=1; + break; + } + } + if ( seen ) continue; + newgeoms[nnewgeoms++] = (LWGEOM*)lwpoint_clone(mpoint->geoms[i]); + } + + return (LWGEOM*)lwcollection_construct(mpoint->type, + mpoint->srid, mpoint->bbox ? gbox_copy(mpoint->bbox) : NULL, + nnewgeoms, newgeoms); } diff -Nru postgis-1.5.3/liblwgeom/lwmpoly.c postgis-2.0.1/liblwgeom/lwmpoly.c --- postgis-1.5.3/liblwgeom/lwmpoly.c 2010-02-01 17:35:55.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwmpoly.c 2012-02-27 22:08:12.000000000 +0000 @@ -1,9 +1,9 @@ /********************************************************************** - * $Id: lwmpoly.c 5181 2010-02-01 17:35:55Z pramsey $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net - * Copyright 2001-2006 Refractions Research Inc. + * + * Copyright (C) 2001-2006 Refractions Research Inc. * * This is free software; you can redistribute and/or modify it under * the terms of the GNU General Public Licence. See the COPYING file. @@ -13,7 +13,8 @@ #include #include #include -#include "liblwgeom.h" +#include "liblwgeom_internal.h" +#include "lwgeom_log.h" void @@ -22,128 +23,34 @@ lwgeom_release(lwmpoly_as_lwgeom(lwmpoly)); } - LWMPOLY * -lwmpoly_deserialize(uchar *srl) +lwmpoly_construct_empty(int srid, char hasz, char hasm) { - LWMPOLY *result; - LWGEOM_INSPECTED *insp; - int type = lwgeom_getType(srl[0]); - int i; - - LWDEBUG(2, "lwmpoly_deserialize called"); - - if ( type != MULTIPOLYGONTYPE ) - { - lwerror("lwmpoly_deserialize called on NON multipoly: %d", - type); - return NULL; - } - - insp = lwgeom_inspect(srl); - - result = lwalloc(sizeof(LWMPOLY)); - result->type = insp->type; - result->SRID = insp->SRID; - result->ngeoms = insp->ngeometries; - - if ( insp->ngeometries ) - { - result->geoms = lwalloc(sizeof(LWPOLY *)*insp->ngeometries); - } - else - { - result->geoms = NULL; - } - - if (lwgeom_hasBBOX(srl[0])) - { - result->bbox = lwalloc(sizeof(BOX2DFLOAT4)); - memcpy(result->bbox, srl+1, sizeof(BOX2DFLOAT4)); - } - else result->bbox = NULL; - - for (i=0; ingeometries; i++) - { - result->geoms[i] = lwpoly_deserialize(insp->sub_geoms[i]); - if ( TYPE_NDIMS(result->geoms[i]->type) != TYPE_NDIMS(result->type) ) - { - lwerror("Mixed dimensions (multipoly:%d, poly%d:%d)", - TYPE_NDIMS(result->type), i, - TYPE_NDIMS(result->geoms[i]->type) - ); - return NULL; - } - } - - return result; + LWMPOLY *ret = (LWMPOLY*)lwcollection_construct_empty(MULTIPOLYGONTYPE, srid, hasz, hasm); + return ret; } -/** - * Add 'what' to this multiline at position 'where'. - * @param where if 0 == prepend, if = -1 then append - * @return a {@link #MULTIPOLY} or a {@link #COLLECTION} - */ -LWGEOM * -lwmpoly_add(const LWMPOLY *to, uint32 where, const LWGEOM *what) -{ - LWCOLLECTION *col; - LWGEOM **geoms; - int newtype; - uint32 i; - - if ( where == -1 ) where = to->ngeoms; - else if ( where < -1 || where > to->ngeoms ) - { - lwerror("lwmline_add: add position out of range %d..%d", - -1, to->ngeoms); - return NULL; - } - - /* dimensions compatibility are checked by caller */ - - /* Construct geoms array */ - geoms = lwalloc(sizeof(LWGEOM *)*(to->ngeoms+1)); - for (i=0; igeoms[i]); - } - geoms[where] = lwgeom_clone(what); - for (i=where; ingeoms; i++) - { - geoms[i+1] = lwgeom_clone((LWGEOM *)to->geoms[i]); - } - - if ( TYPE_GETTYPE(what->type) == POLYGONTYPE ) newtype = MULTIPOLYGONTYPE; - else newtype = COLLECTIONTYPE; - - col = lwcollection_construct(newtype, - to->SRID, NULL, - to->ngeoms+1, geoms); - - return (LWGEOM *)col; +LWMPOLY* lwmpoly_add_lwpoly(LWMPOLY *mobj, const LWPOLY *obj) +{ + return (LWMPOLY*)lwcollection_add_lwgeom((LWCOLLECTION*)mobj, (LWGEOM*)obj); } + void lwmpoly_free(LWMPOLY *mpoly) { int i; + if ( ! mpoly ) return; if ( mpoly->bbox ) - { lwfree(mpoly->bbox); - } + for ( i = 0; i < mpoly->ngeoms; i++ ) - { - if ( mpoly->geoms[i] ) - { + if ( mpoly->geoms && mpoly->geoms[i] ) lwpoly_free(mpoly->geoms[i]); - } - } + if ( mpoly->geoms ) - { lwfree(mpoly->geoms); - } - lwfree(mpoly); + lwfree(mpoly); } diff -Nru postgis-1.5.3/liblwgeom/lwmsurface.c postgis-2.0.1/liblwgeom/lwmsurface.c --- postgis-1.5.3/liblwgeom/lwmsurface.c 2010-02-01 17:35:55.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwmsurface.c 2012-02-27 22:08:12.000000000 +0000 @@ -1,9 +1,9 @@ /********************************************************************** - * $Id: lwmsurface.c 5181 2010-02-01 17:35:55Z pramsey $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net - * Copyright 2001-2006 Refractions Research Inc. + * + * Copyright (C) 2001-2006 Refractions Research Inc. * * This is free software; you can redistribute and/or modify it under * the terms of the GNU General Public Licence. See the COPYING file. @@ -13,125 +13,8 @@ #include #include #include -#include "liblwgeom.h" - - -LWMSURFACE * -lwmsurface_deserialize(uchar *srl) -{ - LWMSURFACE *result; - LWGEOM_INSPECTED *insp; - int stype; - int type = lwgeom_getType(srl[0]); - int i; - - LWDEBUG(2, "lwmsurface_deserialize called"); - - if (type != MULTISURFACETYPE) - { - lwerror("lwmsurface_deserialize called on a non-multisurface: %d", type); - return NULL; - } - - insp = lwgeom_inspect(srl); - - result = lwalloc(sizeof(LWMSURFACE)); - result->type = insp->type; - result->SRID = insp->SRID; - result->ngeoms = insp->ngeometries; - - if ( insp->ngeometries ) - { - result->geoms = lwalloc(sizeof(LWPOLY *)*insp->ngeometries); - } - else - { - result->geoms = NULL; - } - - if (lwgeom_hasBBOX(srl[0])) - { - result->bbox = lwalloc(sizeof(BOX2DFLOAT4)); - memcpy(result->bbox, srl + 1, sizeof(BOX2DFLOAT4)); - } - else result->bbox = NULL; - - for (i = 0; i < insp->ngeometries; i++) - { - stype = lwgeom_getType(insp->sub_geoms[i][0]); - if (stype == POLYGONTYPE) - { - result->geoms[i] = (LWGEOM *)lwpoly_deserialize(insp->sub_geoms[i]); - } - else if (stype == CURVEPOLYTYPE) - { - result->geoms[i] = (LWGEOM *)lwcurvepoly_deserialize(insp->sub_geoms[i]); - } - else - { - lwerror("Only Polygons and Curved Polygons are supported in a MultiSurface."); - lwfree(result); - lwfree(insp); - return NULL; - } - - if (TYPE_NDIMS(result->geoms[i]->type) != TYPE_NDIMS(result->type)) - { - lwerror("Mixed dimensions (multisurface: %d, surface %d:%d", - TYPE_NDIMS(result->type), i, - TYPE_NDIMS(result->geoms[i]->type)); - lwfree(result); - lwfree(insp); - return NULL; - } - } - return result; -} - -/* - * Add 'what' to this multisurface at position 'where' - * where=0 == prepend - * where=-1 == append - * Returns a MULTISURFACE or a COLLECTION - */ -LWGEOM * -lwmsurface_add(const LWMSURFACE *to, uint32 where, const LWGEOM *what) -{ - LWCOLLECTION *col; - LWGEOM **geoms; - int newtype; - uint32 i; - - if (where == -1) where = to->ngeoms; - else if (where < -1 || where > to->ngeoms) - { - lwerror("lwmsurface_add: add position out of range %d..%d", - -1, to->ngeoms); - return NULL; - } - - /* dimensions compatibility are checked by caller */ - - /* Construct geoms array */ - geoms = lwalloc(sizeof(LWGEOM *)*(to->ngeoms+1)); - for (i = 0; i < where; i++) - { - geoms[i] = lwgeom_clone((LWGEOM *)to->geoms[i]); - } - geoms[where] = lwgeom_clone(what); - for (i = where; i < to->ngeoms; i++) - { - geoms[i+1] = lwgeom_clone((LWGEOM *)to->geoms[i]); - } - - if (TYPE_GETTYPE(what->type) == POLYGONTYPE || - TYPE_GETTYPE(what->type) == CURVEPOLYTYPE) - newtype = MULTISURFACETYPE; - else newtype = COLLECTIONTYPE; +#include "liblwgeom_internal.h" +#include "lwgeom_log.h" - col = lwcollection_construct(newtype, - to->SRID, NULL, to->ngeoms + 1, geoms); - return (LWGEOM *)col; -} diff -Nru postgis-1.5.3/liblwgeom/lwout_geojson.c postgis-2.0.1/liblwgeom/lwout_geojson.c --- postgis-1.5.3/liblwgeom/lwout_geojson.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwout_geojson.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,741 @@ +/********************************************************************** + * $Id: lwout_geojson.c 9324 2012-02-27 22:08:12Z pramsey $ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * Copyright 2001-2003 Refractions Research Inc. + * Copyright 2009-2010 Olivier Courtin + * + * This is free software; you can redistribute and/or modify it under + * the terms of hte GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include "liblwgeom_internal.h" +#include /* strlen */ + +static char *asgeojson_point(const LWPOINT *point, char *srs, GBOX *bbox, int precision); +static char *asgeojson_line(const LWLINE *line, char *srs, GBOX *bbox, int precision); +static char *asgeojson_poly(const LWPOLY *poly, char *srs, GBOX *bbox, int precision); +static char * asgeojson_multipoint(const LWMPOINT *mpoint, char *srs, GBOX *bbox, int precision); +static char * asgeojson_multiline(const LWMLINE *mline, char *srs, GBOX *bbox, int precision); +static char * asgeojson_multipolygon(const LWMPOLY *mpoly, char *srs, GBOX *bbox, int precision); +static char * asgeojson_collection(const LWCOLLECTION *col, char *srs, GBOX *bbox, int precision); +static size_t asgeojson_geom_size(const LWGEOM *geom, GBOX *bbox, int precision); +static size_t asgeojson_geom_buf(const LWGEOM *geom, char *output, GBOX *bbox, int precision); + +static size_t pointArray_to_geojson(POINTARRAY *pa, char *buf, int precision); +static size_t pointArray_geojson_size(POINTARRAY *pa, int precision); + +/** + * Takes a GEOMETRY and returns a GeoJson representation + */ +char * +lwgeom_to_geojson(const LWGEOM *geom, char *srs, int precision, int has_bbox) +{ + int type = geom->type; + GBOX *bbox = NULL; + GBOX tmp; + int rv; + + if (has_bbox) + { + /* Whether these are geography or geometry, + the GeoJSON expects a cartesian bounding box */ + rv = lwgeom_calculate_gbox_cartesian(geom, &tmp); + bbox = &tmp; + } + + switch (type) + { + case POINTTYPE: + return asgeojson_point((LWPOINT*)geom, srs, bbox, precision); + case LINETYPE: + return asgeojson_line((LWLINE*)geom, srs, bbox, precision); + case POLYGONTYPE: + return asgeojson_poly((LWPOLY*)geom, srs, bbox, precision); + case MULTIPOINTTYPE: + return asgeojson_multipoint((LWMPOINT*)geom, srs, bbox, precision); + case MULTILINETYPE: + return asgeojson_multiline((LWMLINE*)geom, srs, bbox, precision); + case MULTIPOLYGONTYPE: + return asgeojson_multipolygon((LWMPOLY*)geom, srs, bbox, precision); + case COLLECTIONTYPE: + return asgeojson_collection((LWCOLLECTION*)geom, srs, bbox, precision); + default: + lwerror("lwgeom_to_geojson: '%s' geometry type not supported", + lwtype_name(type)); + } + + /* Never get here */ + return NULL; +} + + + +/** + * Handle SRS + */ +static size_t +asgeojson_srs_size(char *srs) +{ + int size; + + size = sizeof("'crs':{'type':'name',"); + size += sizeof("'properties':{'name':''}},"); + size += strlen(srs) * sizeof(char); + + return size; +} + +static size_t +asgeojson_srs_buf(char *output, char *srs) +{ + char *ptr = output; + + ptr += sprintf(ptr, "\"crs\":{\"type\":\"name\","); + ptr += sprintf(ptr, "\"properties\":{\"name\":\"%s\"}},", srs); + + return (ptr-output); +} + + + +/** + * Handle Bbox + */ +static size_t +asgeojson_bbox_size(int hasz, int precision) +{ + int size; + + if (!hasz) + { + size = sizeof("\"bbox\":[,,,],"); + size += 2 * 2 * (OUT_MAX_DIGS_DOUBLE + precision); + } + else + { + size = sizeof("\"bbox\":[,,,,,],"); + size += 2 * 3 * (OUT_MAX_DIGS_DOUBLE + precision); + } + + return size; +} + +static size_t +asgeojson_bbox_buf(char *output, GBOX *bbox, int hasz, int precision) +{ + char *ptr = output; + + if (!hasz) + ptr += sprintf(ptr, "\"bbox\":[%.*f,%.*f,%.*f,%.*f],", + precision, bbox->xmin, precision, bbox->ymin, + precision, bbox->xmax, precision, bbox->ymax); + else + ptr += sprintf(ptr, "\"bbox\":[%.*f,%.*f,%.*f,%.*f,%.*f,%.*f],", + precision, bbox->xmin, precision, bbox->ymin, precision, bbox->zmin, + precision, bbox->xmax, precision, bbox->ymax, precision, bbox->zmax); + + return (ptr-output); +} + + + +/** + * Point Geometry + */ + +static size_t +asgeojson_point_size(const LWPOINT *point, char *srs, GBOX *bbox, int precision) +{ + int size; + + size = pointArray_geojson_size(point->point, precision); + size += sizeof("{'type':'Point',"); + size += sizeof("'coordinates':}"); + + if (srs) size += asgeojson_srs_size(srs); + if (bbox) size += asgeojson_bbox_size(FLAGS_GET_Z(point->flags), precision); + + return size; +} + +static size_t +asgeojson_point_buf(const LWPOINT *point, char *srs, char *output, GBOX *bbox, int precision) +{ + char *ptr = output; + + ptr += sprintf(ptr, "{\"type\":\"Point\","); + if (srs) ptr += asgeojson_srs_buf(ptr, srs); + if (bbox) ptr += asgeojson_bbox_buf(ptr, bbox, FLAGS_GET_Z(point->flags), precision); + + ptr += sprintf(ptr, "\"coordinates\":"); + ptr += pointArray_to_geojson(point->point, ptr, precision); + ptr += sprintf(ptr, "}"); + + return (ptr-output); +} + +static char * +asgeojson_point(const LWPOINT *point, char *srs, GBOX *bbox, int precision) +{ + char *output; + int size; + + size = asgeojson_point_size(point, srs, bbox, precision); + output = lwalloc(size); + asgeojson_point_buf(point, srs, output, bbox, precision); + return output; +} + + + +/** + * Line Geometry + */ + +static size_t +asgeojson_line_size(const LWLINE *line, char *srs, GBOX *bbox, int precision) +{ + int size; + + size = sizeof("{'type':'LineString',"); + if (srs) size += asgeojson_srs_size(srs); + if (bbox) size += asgeojson_bbox_size(FLAGS_GET_Z(line->flags), precision); + size += sizeof("'coordinates':[]}"); + size += pointArray_geojson_size(line->points, precision); + + return size; +} + +static size_t +asgeojson_line_buf(const LWLINE *line, char *srs, char *output, GBOX *bbox, int precision) +{ + char *ptr=output; + + ptr += sprintf(ptr, "{\"type\":\"LineString\","); + if (srs) ptr += asgeojson_srs_buf(ptr, srs); + if (bbox) ptr += asgeojson_bbox_buf(ptr, bbox, FLAGS_GET_Z(line->flags), precision); + ptr += sprintf(ptr, "\"coordinates\":["); + ptr += pointArray_to_geojson(line->points, ptr, precision); + ptr += sprintf(ptr, "]}"); + + return (ptr-output); +} + +static char * +asgeojson_line(const LWLINE *line, char *srs, GBOX *bbox, int precision) +{ + char *output; + int size; + + size = asgeojson_line_size(line, srs, bbox, precision); + output = lwalloc(size); + asgeojson_line_buf(line, srs, output, bbox, precision); + + return output; +} + + + +/** + * Polygon Geometry + */ + +static size_t +asgeojson_poly_size(const LWPOLY *poly, char *srs, GBOX *bbox, int precision) +{ + size_t size; + int i; + + size = sizeof("{\"type\":\"Polygon\","); + if (srs) size += asgeojson_srs_size(srs); + if (bbox) size += asgeojson_bbox_size(FLAGS_GET_Z(poly->flags), precision); + size += sizeof("\"coordinates\":["); + for (i=0, size=0; inrings; i++) + { + size += pointArray_geojson_size(poly->rings[i], precision); + size += sizeof("[]"); + } + size += sizeof(",") * i; + size += sizeof("]}"); + + return size; +} + +static size_t +asgeojson_poly_buf(const LWPOLY *poly, char *srs, char *output, GBOX *bbox, int precision) +{ + int i; + char *ptr=output; + + ptr += sprintf(ptr, "{\"type\":\"Polygon\","); + if (srs) ptr += asgeojson_srs_buf(ptr, srs); + if (bbox) ptr += asgeojson_bbox_buf(ptr, bbox, FLAGS_GET_Z(poly->flags), precision); + ptr += sprintf(ptr, "\"coordinates\":["); + for (i=0; inrings; i++) + { + if (i) ptr += sprintf(ptr, ","); + ptr += sprintf(ptr, "["); + ptr += pointArray_to_geojson(poly->rings[i], ptr, precision); + ptr += sprintf(ptr, "]"); + } + ptr += sprintf(ptr, "]}"); + + return (ptr-output); +} + +static char * +asgeojson_poly(const LWPOLY *poly, char *srs, GBOX *bbox, int precision) +{ + char *output; + int size; + + size = asgeojson_poly_size(poly, srs, bbox, precision); + output = lwalloc(size); + asgeojson_poly_buf(poly, srs, output, bbox, precision); + + return output; +} + + + +/** + * Multipoint Geometry + */ + +static size_t +asgeojson_multipoint_size(const LWMPOINT *mpoint, char *srs, GBOX *bbox, int precision) +{ + LWPOINT * point; + int size; + int i; + + size = sizeof("{'type':'MultiPoint',"); + if (srs) size += asgeojson_srs_size(srs); + if (bbox) size += asgeojson_bbox_size(FLAGS_GET_Z(mpoint->flags), precision); + size += sizeof("'coordinates':[]}"); + + for (i=0; ingeoms; i++) + { + point = mpoint->geoms[i]; + size += pointArray_geojson_size(point->point, precision); + } + size += sizeof(",") * i; + + return size; +} + +static size_t +asgeojson_multipoint_buf(const LWMPOINT *mpoint, char *srs, char *output, GBOX *bbox, int precision) +{ + LWPOINT *point; + int i; + char *ptr=output; + + ptr += sprintf(ptr, "{\"type\":\"MultiPoint\","); + if (srs) ptr += asgeojson_srs_buf(ptr, srs); + if (bbox) ptr += asgeojson_bbox_buf(ptr, bbox, FLAGS_GET_Z(mpoint->flags), precision); + ptr += sprintf(ptr, "\"coordinates\":["); + + for (i=0; ingeoms; i++) + { + if (i) ptr += sprintf(ptr, ","); + point = mpoint->geoms[i]; + ptr += pointArray_to_geojson(point->point, ptr, precision); + } + ptr += sprintf(ptr, "]}"); + + return (ptr - output); +} + +static char * +asgeojson_multipoint(const LWMPOINT *mpoint, char *srs, GBOX *bbox, int precision) +{ + char *output; + int size; + + size = asgeojson_multipoint_size(mpoint, srs, bbox, precision); + output = lwalloc(size); + asgeojson_multipoint_buf(mpoint, srs, output, bbox, precision); + + return output; +} + + + +/** + * Multiline Geometry + */ + +static size_t +asgeojson_multiline_size(const LWMLINE *mline, char *srs, GBOX *bbox, int precision) +{ + LWLINE * line; + int size; + int i; + + size = sizeof("{'type':'MultiLineString',"); + if (srs) size += asgeojson_srs_size(srs); + if (bbox) size += asgeojson_bbox_size(FLAGS_GET_Z(mline->flags), precision); + size += sizeof("'coordinates':[]}"); + + for (i=0 ; ingeoms; i++) + { + line = mline->geoms[i]; + size += pointArray_geojson_size(line->points, precision); + size += sizeof("[]"); + } + size += sizeof(",") * i; + + return size; +} + +static size_t +asgeojson_multiline_buf(const LWMLINE *mline, char *srs, char *output, GBOX *bbox, int precision) +{ + LWLINE *line; + int i; + char *ptr=output; + + ptr += sprintf(ptr, "{\"type\":\"MultiLineString\","); + if (srs) ptr += asgeojson_srs_buf(ptr, srs); + if (bbox) ptr += asgeojson_bbox_buf(ptr, bbox, FLAGS_GET_Z(mline->flags), precision); + ptr += sprintf(ptr, "\"coordinates\":["); + + for (i=0; ingeoms; i++) + { + if (i) ptr += sprintf(ptr, ","); + ptr += sprintf(ptr, "["); + line = mline->geoms[i]; + ptr += pointArray_to_geojson(line->points, ptr, precision); + ptr += sprintf(ptr, "]"); + } + + ptr += sprintf(ptr, "]}"); + + return (ptr - output); +} + +static char * +asgeojson_multiline(const LWMLINE *mline, char *srs, GBOX *bbox, int precision) +{ + char *output; + int size; + + size = asgeojson_multiline_size(mline, srs, bbox, precision); + output = lwalloc(size); + asgeojson_multiline_buf(mline, srs, output, bbox, precision); + + return output; +} + + + +/** + * MultiPolygon Geometry + */ + +static size_t +asgeojson_multipolygon_size(const LWMPOLY *mpoly, char *srs, GBOX *bbox, int precision) +{ + LWPOLY *poly; + int size; + int i, j; + + size = sizeof("{'type':'MultiPolygon',"); + if (srs) size += asgeojson_srs_size(srs); + if (bbox) size += asgeojson_bbox_size(FLAGS_GET_Z(mpoly->flags), precision); + size += sizeof("'coordinates':[]}"); + + for (i=0; i < mpoly->ngeoms; i++) + { + poly = mpoly->geoms[i]; + for (j=0 ; j nrings ; j++) + { + size += pointArray_geojson_size(poly->rings[j], precision); + size += sizeof("[]"); + } + size += sizeof("[]"); + } + size += sizeof(",") * i; + size += sizeof("]}"); + + return size; +} + +static size_t +asgeojson_multipolygon_buf(const LWMPOLY *mpoly, char *srs, char *output, GBOX *bbox, int precision) +{ + LWPOLY *poly; + int i, j; + char *ptr=output; + + ptr += sprintf(ptr, "{\"type\":\"MultiPolygon\","); + if (srs) ptr += asgeojson_srs_buf(ptr, srs); + if (bbox) ptr += asgeojson_bbox_buf(ptr, bbox, FLAGS_GET_Z(mpoly->flags), precision); + ptr += sprintf(ptr, "\"coordinates\":["); + for (i=0; ingeoms; i++) + { + if (i) ptr += sprintf(ptr, ","); + ptr += sprintf(ptr, "["); + poly = mpoly->geoms[i]; + for (j=0 ; j < poly->nrings ; j++) + { + if (j) ptr += sprintf(ptr, ","); + ptr += sprintf(ptr, "["); + ptr += pointArray_to_geojson(poly->rings[j], ptr, precision); + ptr += sprintf(ptr, "]"); + } + ptr += sprintf(ptr, "]"); + } + ptr += sprintf(ptr, "]}"); + + return (ptr - output); +} + +static char * +asgeojson_multipolygon(const LWMPOLY *mpoly, char *srs, GBOX *bbox, int precision) +{ + char *output; + int size; + + size = asgeojson_multipolygon_size(mpoly, srs, bbox, precision); + output = lwalloc(size); + asgeojson_multipolygon_buf(mpoly, srs, output, bbox, precision); + + return output; +} + + + +/** + * Collection Geometry + */ + +static size_t +asgeojson_collection_size(const LWCOLLECTION *col, char *srs, GBOX *bbox, int precision) +{ + int i; + int size; + LWGEOM *subgeom; + + size = sizeof("{'type':'GeometryCollection',"); + if (srs) size += asgeojson_srs_size(srs); + if (bbox) size += asgeojson_bbox_size(FLAGS_GET_Z(col->flags), precision); + size += sizeof("'geometries':"); + + for (i=0; ingeoms; i++) + { + subgeom = col->geoms[i]; + size += asgeojson_geom_size(subgeom, NULL, precision); + } + size += sizeof(",") * i; + size += sizeof("]}"); + + return size; +} + +static size_t +asgeojson_collection_buf(const LWCOLLECTION *col, char *srs, char *output, GBOX *bbox, int precision) +{ + int i; + char *ptr=output; + LWGEOM *subgeom; + + ptr += sprintf(ptr, "{\"type\":\"GeometryCollection\","); + if (srs) ptr += asgeojson_srs_buf(ptr, srs); + if (col->ngeoms && bbox) ptr += asgeojson_bbox_buf(ptr, bbox, FLAGS_GET_Z(col->flags), precision); + ptr += sprintf(ptr, "\"geometries\":["); + + for (i=0; ingeoms; i++) + { + if (i) ptr += sprintf(ptr, ","); + subgeom = col->geoms[i]; + ptr += asgeojson_geom_buf(subgeom, ptr, NULL, precision); + } + + ptr += sprintf(ptr, "]}"); + + return (ptr - output); +} + +static char * +asgeojson_collection(const LWCOLLECTION *col, char *srs, GBOX *bbox, int precision) +{ + char *output; + int size; + + size = asgeojson_collection_size(col, srs, bbox, precision); + output = lwalloc(size); + asgeojson_collection_buf(col, srs, output, bbox, precision); + + return output; +} + + + +static size_t +asgeojson_geom_size(const LWGEOM *geom, GBOX *bbox, int precision) +{ + int type = geom->type; + size_t size = 0; + + switch (type) + { + case POINTTYPE: + size = asgeojson_point_size((LWPOINT*)geom, NULL, bbox, precision); + break; + + case LINETYPE: + size = asgeojson_line_size((LWLINE*)geom, NULL, bbox, precision); + break; + + case POLYGONTYPE: + size = asgeojson_poly_size((LWPOLY*)geom, NULL, bbox, precision); + break; + + case MULTIPOINTTYPE: + size = asgeojson_multipoint_size((LWMPOINT*)geom, NULL, bbox, precision); + break; + + case MULTILINETYPE: + size = asgeojson_multiline_size((LWMLINE*)geom, NULL, bbox, precision); + break; + + case MULTIPOLYGONTYPE: + size = asgeojson_multipolygon_size((LWMPOLY*)geom, NULL, bbox, precision); + break; + + default: + lwerror("GeoJson: geometry not supported."); + } + + return size; +} + + +static size_t +asgeojson_geom_buf(const LWGEOM *geom, char *output, GBOX *bbox, int precision) +{ + int type = geom->type; + char *ptr=output; + + switch (type) + { + case POINTTYPE: + ptr += asgeojson_point_buf((LWPOINT*)geom, NULL, ptr, bbox, precision); + break; + + case LINETYPE: + ptr += asgeojson_line_buf((LWLINE*)geom, NULL, ptr, bbox, precision); + break; + + case POLYGONTYPE: + ptr += asgeojson_poly_buf((LWPOLY*)geom, NULL, ptr, bbox, precision); + break; + + case MULTIPOINTTYPE: + ptr += asgeojson_multipoint_buf((LWMPOINT*)geom, NULL, ptr, bbox, precision); + break; + + case MULTILINETYPE: + ptr += asgeojson_multiline_buf((LWMLINE*)geom, NULL, ptr, bbox, precision); + break; + + case MULTIPOLYGONTYPE: + ptr += asgeojson_multipolygon_buf((LWMPOLY*)geom, NULL, ptr, bbox, precision); + break; + + default: + if (bbox) lwfree(bbox); + lwerror("GeoJson: geometry not supported."); + } + + return (ptr-output); +} + + +static size_t +pointArray_to_geojson(POINTARRAY *pa, char *output, int precision) +{ + int i; + char *ptr; + char x[OUT_MAX_DIGS_DOUBLE+OUT_MAX_DOUBLE_PRECISION+1]; + char y[OUT_MAX_DIGS_DOUBLE+OUT_MAX_DOUBLE_PRECISION+1]; + char z[OUT_MAX_DIGS_DOUBLE+OUT_MAX_DOUBLE_PRECISION+1]; + + ptr = output; + + if (!FLAGS_GET_Z(pa->flags)) + { + for (i=0; inpoints; i++) + { + POINT2D pt; + getPoint2d_p(pa, i, &pt); + + if (fabs(pt.x) < OUT_MAX_DOUBLE) + sprintf(x, "%.*f", precision, pt.x); + else + sprintf(x, "%g", pt.x); + trim_trailing_zeros(x); + + if (fabs(pt.y) < OUT_MAX_DOUBLE) + sprintf(y, "%.*f", precision, pt.y); + else + sprintf(y, "%g", pt.y); + trim_trailing_zeros(y); + + if ( i ) ptr += sprintf(ptr, ","); + ptr += sprintf(ptr, "[%s,%s]", x, y); + } + } + else + { + for (i=0; inpoints; i++) + { + POINT4D pt; + getPoint4d_p(pa, i, &pt); + + if (fabs(pt.x) < OUT_MAX_DOUBLE) + sprintf(x, "%.*f", precision, pt.x); + else + sprintf(x, "%g", pt.x); + trim_trailing_zeros(x); + + if (fabs(pt.y) < OUT_MAX_DOUBLE) + sprintf(y, "%.*f", precision, pt.y); + else + sprintf(y, "%g", pt.y); + trim_trailing_zeros(y); + + if (fabs(pt.z) < OUT_MAX_DOUBLE) + sprintf(z, "%.*f", precision, pt.z); + else + sprintf(z, "%g", pt.z); + trim_trailing_zeros(z); + + if ( i ) ptr += sprintf(ptr, ","); + ptr += sprintf(ptr, "[%s,%s,%s]", x, y, z); + } + } + + return (ptr-output); +} + + + +/** + * Returns maximum size of rendered pointarray in bytes. + */ +static size_t +pointArray_geojson_size(POINTARRAY *pa, int precision) +{ + if (FLAGS_NDIMS(pa->flags) == 2) + return (OUT_MAX_DIGS_DOUBLE + precision + sizeof(",")) + * 2 * pa->npoints + sizeof(",[]"); + + return (OUT_MAX_DIGS_DOUBLE + precision + sizeof(",,")) + * 3 * pa->npoints + sizeof(",[]"); +} diff -Nru postgis-1.5.3/liblwgeom/lwout_gml.c postgis-2.0.1/liblwgeom/lwout_gml.c --- postgis-1.5.3/liblwgeom/lwout_gml.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwout_gml.c 2012-02-28 18:09:49.000000000 +0000 @@ -0,0 +1,1463 @@ +/********************************************************************** + * $Id: lwout_gml.c 9331 2012-02-28 18:09:49Z pramsey $ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * + * Copyright 2011 Sandro Santilli + * Copyright 2010-2011 Oslandia + * Copyright 2001-2003 Refractions Research Inc. + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +/** +* @file GML output routines. +* +**********************************************************************/ + + +#include +#include "liblwgeom_internal.h" + + +static size_t asgml2_point_size(const LWPOINT *point, const char *srs, int precision, const char *prefix); +static char *asgml2_point(const LWPOINT *point, const char *srs, int precision, const char *prefix); +static size_t asgml2_line_size(const LWLINE *line, const char *srs, int precision, const char *prefix); +static char *asgml2_line(const LWLINE *line, const char *srs, int precision, const char *prefix); +static size_t asgml2_poly_size(const LWPOLY *poly, const char *srs, int precision, const char *prefix); +static char *asgml2_poly(const LWPOLY *poly, const char *srs, int precision, const char *prefix); +static size_t asgml2_multi_size(const LWCOLLECTION *col, const char *srs, int precision, const char *prefix); +static char *asgml2_multi(const LWCOLLECTION *col, const char *srs, int precision, const char *prefix); +static size_t asgml2_collection_size(const LWCOLLECTION *col, const char *srs, int precision, const char *prefix); +static char *asgml2_collection(const LWCOLLECTION *col, const char *srs, int precision, const char *prefix); +static size_t pointArray_toGML2(POINTARRAY *pa, char *buf, int precision); + +static size_t asgml3_point_size(const LWPOINT *point, const char *srs, int precision, int opts, const char *prefix); +static char *asgml3_point(const LWPOINT *point, const char *srs, int precision, int opts, const char *prefix); +static size_t asgml3_line_size(const LWLINE *line, const char *srs, int precision, int opts, const char *prefix); +static char *asgml3_line(const LWLINE *line, const char *srs, int precision, int opts, const char *prefix); +static size_t asgml3_poly_size(const LWPOLY *poly, const char *srs, int precision, int opts, const char *prefix); +static char *asgml3_poly(const LWPOLY *poly, const char *srs, int precision, int opts, int is_patch, const char *prefix); +static size_t asgml3_triangle_size(const LWTRIANGLE *triangle, const char *srs, int precision, int opts, const char *prefix); +static char *asgml3_triangle(const LWTRIANGLE *triangle, const char *srs, int precision, int opts, const char *prefix); +static size_t asgml3_multi_size(const LWCOLLECTION *col, const char *srs, int precision, int opts, const char *prefix); +static char *asgml3_multi(const LWCOLLECTION *col, const char *srs, int precision, int opts, const char *prefix); +static char *asgml3_psurface(const LWPSURFACE *psur, const char *srs, int precision, int opts, const char *prefix); +static char *asgml3_tin(const LWTIN *tin, const char *srs, int precision, int opts, const char *prefix); +static size_t asgml3_collection_size(const LWCOLLECTION *col, const char *srs, int precision, int opts, const char *prefix); +static char *asgml3_collection(const LWCOLLECTION *col, const char *srs, int precision, int opts, const char *prefix); +static size_t pointArray_toGML3(POINTARRAY *pa, char *buf, int precision, int opts); + +static size_t pointArray_GMLsize(POINTARRAY *pa, int precision); + +static char * +gbox_to_gml2(const GBOX *bbox, const char *srs, int precision, const char *prefix) +{ + int size; + POINT4D pt; + POINTARRAY *pa; + char *ptr, *output; + size_t prefixlen = strlen(prefix); + + if ( ! bbox ) { + size = ( sizeof("/") + (prefixlen*2) ) * 2; + if ( srs ) size += strlen(srs) + sizeof(" srsName=.."); + + ptr = output = lwalloc(size); + + ptr += sprintf(ptr, "<%sBox", prefix); + + if ( srs ) ptr += sprintf(ptr, " srsName=\"%s\"", srs); + + ptr += sprintf(ptr, "/>"); + + return output; + } + + pa = ptarray_construct_empty(FLAGS_GET_Z(bbox->flags), 0, 2); + + pt.x = bbox->xmin; + pt.y = bbox->ymin; + if (FLAGS_GET_Z(bbox->flags)) pt.z = bbox->zmin; + ptarray_append_point(pa, &pt, LW_TRUE); + + pt.x = bbox->xmax; + pt.y = bbox->ymax; + if (FLAGS_GET_Z(bbox->flags)) pt.z = bbox->zmax; + ptarray_append_point(pa, &pt, LW_TRUE); + + size = pointArray_GMLsize(pa, precision); + size += ( sizeof("/") + (prefixlen*2) ) * 2; + if ( srs ) size += strlen(srs) + sizeof(" srsName=.."); + + ptr = output = lwalloc(size); + + if ( srs ) ptr += sprintf(ptr, "<%sBox srsName=\"%s\">", prefix, srs); + else ptr += sprintf(ptr, "<%sBox>", prefix); + + ptr += sprintf(ptr, "<%scoordinates>", prefix); + ptr += pointArray_toGML2(pa, ptr, precision); + ptr += sprintf(ptr, "", prefix, prefix); + + ptarray_free(pa); + + return output; +} + +static char * +gbox_to_gml3(const GBOX *bbox, const char *srs, int precision, int opts, const char *prefix) +{ + int size; + POINT4D pt; + POINTARRAY *pa; + char *ptr, *output; + size_t prefixlen = strlen(prefix); + int dimension = 2; + + if ( ! bbox ) { + size = ( sizeof("/") + (prefixlen*2) ) * 2; + if ( srs ) size += strlen(srs) + sizeof(" srsName=.."); + + ptr = output = lwalloc(size); + + ptr += sprintf(ptr, "<%sEnvelope", prefix); + if ( srs ) ptr += sprintf(ptr, " srsName=\"%s\"", srs); + + ptr += sprintf(ptr, "/>"); + + return output; + } + + if (FLAGS_GET_Z(bbox->flags)) dimension = 3; + + pa = ptarray_construct_empty(FLAGS_GET_Z(bbox->flags), 0, 1); + + pt.x = bbox->xmin; + pt.y = bbox->ymin; + if (FLAGS_GET_Z(bbox->flags)) pt.z = bbox->zmin; + ptarray_append_point(pa, &pt, LW_TRUE); + + size = pointArray_GMLsize(pa, precision) * 2; + size += ( sizeof("//") + (prefixlen*3) ) * 2; + if ( srs ) size += strlen(srs) + sizeof(" srsName=.."); + if ( IS_DIMS(opts) ) size += sizeof(" srsDimension=. ."); + + ptr = output = lwalloc(size); + + ptr += sprintf(ptr, "<%sEnvelope", prefix); + if ( srs ) ptr += sprintf(ptr, " srsName=\"%s\"", srs); + if ( IS_DIMS(opts) ) ptr += sprintf(ptr, " srsDimension=\"%d\"", dimension); + ptr += sprintf(ptr, ">"); + + ptr += sprintf(ptr, "<%slowerCorner>", prefix); + ptr += pointArray_toGML3(pa, ptr, precision, opts); + ptr += sprintf(ptr, "", prefix); + + ptarray_remove_point(pa, 0); + pt.x = bbox->xmax; + pt.y = bbox->ymax; + if (FLAGS_GET_Z(bbox->flags)) pt.z = bbox->zmax; + ptarray_append_point(pa, &pt, LW_TRUE); + + ptr += sprintf(ptr, "<%supperCorner>", prefix); + ptr += pointArray_toGML3(pa, ptr, precision, opts); + ptr += sprintf(ptr, "", prefix); + + ptr += sprintf(ptr, "", prefix); + + ptarray_free(pa); + + return output; +} + + +extern char * +lwgeom_extent_to_gml2(const LWGEOM *geom, const char *srs, int precision, const char *prefix) +{ + const GBOX* bbox = lwgeom_get_bbox(geom); +/* + if ( ! bbox ) { + lwerror("lwgeom_extent_to_gml2: empty geometry doesn't have a bounding box"); + return NULL; + } +*/ + char *ret = gbox_to_gml2(bbox, srs, precision, prefix); + return ret; +} + + +extern char * +lwgeom_extent_to_gml3(const LWGEOM *geom, const char *srs, int precision, int opts, const char *prefix) +{ + const GBOX* bbox = lwgeom_get_bbox(geom); +/* + if ( ! bbox ) { + lwerror("lwgeom_extent_to_gml3: empty geometry doesn't have a bounding box"); + return NULL; + } +*/ + return gbox_to_gml3(bbox, srs, precision, opts, prefix); +} + + +/** + * @brief VERSION GML 2 + * takes a GEOMETRY and returns a GML2 representation + */ +extern char * +lwgeom_to_gml2(const LWGEOM *geom, const char *srs, int precision, const char* prefix) +{ + int type = geom->type; + + /* Return null for empty (#1377) */ + if ( lwgeom_is_empty(geom) ) + return NULL; + + switch (type) + { + case POINTTYPE: + return asgml2_point((LWPOINT*)geom, srs, precision, prefix); + + case LINETYPE: + return asgml2_line((LWLINE*)geom, srs, precision, prefix); + + case POLYGONTYPE: + return asgml2_poly((LWPOLY*)geom, srs, precision, prefix); + + case MULTIPOINTTYPE: + case MULTILINETYPE: + case MULTIPOLYGONTYPE: + return asgml2_multi((LWCOLLECTION*)geom, srs, precision, prefix); + + case COLLECTIONTYPE: + return asgml2_collection((LWCOLLECTION*)geom, srs, precision, prefix); + + case TRIANGLETYPE: + case POLYHEDRALSURFACETYPE: + case TINTYPE: + lwerror("Cannot convert %s to GML2. Try ST_AsGML(3, ) to generate GML3.", lwtype_name(type)); + return NULL; + + default: + lwerror("lwgeom_to_gml2: '%s' geometry type not supported", lwtype_name(type)); + return NULL; + } +} + +static size_t +asgml2_point_size(const LWPOINT *point, const char *srs, int precision, const char* prefix) +{ + int size; + size_t prefixlen = strlen(prefix); + + size = pointArray_GMLsize(point->point, precision); + size += ( sizeof("/") + (prefixlen*2) ) * 2; + if ( srs ) size += strlen(srs) + sizeof(" srsName=.."); + return size; +} + +static size_t +asgml2_point_buf(const LWPOINT *point, const char *srs, char *output, int precision, const char* prefix) +{ + char *ptr = output; + + ptr += sprintf(ptr, "<%sPoint", prefix); + if ( srs ) ptr += sprintf(ptr, " srsName=\"%s\"", srs); + if ( lwpoint_is_empty(point) ) { + ptr += sprintf(ptr, "/>"); + return (ptr-output); + } + ptr += sprintf(ptr, ">"); + ptr += sprintf(ptr, "<%scoordinates>", prefix); + ptr += pointArray_toGML2(point->point, ptr, precision); + ptr += sprintf(ptr, "", prefix, prefix); + + return (ptr-output); +} + +static char * +asgml2_point(const LWPOINT *point, const char *srs, int precision, const char *prefix) +{ + char *output; + int size; + + size = asgml2_point_size(point, srs, precision, prefix); + output = lwalloc(size); + asgml2_point_buf(point, srs, output, precision, prefix); + return output; +} + +static size_t +asgml2_line_size(const LWLINE *line, const char *srs, int precision, const char *prefix) +{ + int size; + size_t prefixlen = strlen(prefix); + + size = pointArray_GMLsize(line->points, precision); + size += ( sizeof("/") + (prefixlen*2) ) * 2; + if ( srs ) size += strlen(srs) + sizeof(" srsName=.."); + return size; +} + +static size_t +asgml2_line_buf(const LWLINE *line, const char *srs, char *output, int precision, + const char *prefix) +{ + char *ptr=output; + + ptr += sprintf(ptr, "<%sLineString", prefix); + if ( srs ) ptr += sprintf(ptr, " srsName=\"%s\"", srs); + + if ( lwline_is_empty(line) ) { + ptr += sprintf(ptr, "/>"); + return (ptr-output); + } + ptr += sprintf(ptr, ">"); + + ptr += sprintf(ptr, "<%scoordinates>", prefix); + ptr += pointArray_toGML2(line->points, ptr, precision); + ptr += sprintf(ptr, "", prefix, prefix); + + return (ptr-output); +} + +static char * +asgml2_line(const LWLINE *line, const char *srs, int precision, const char *prefix) +{ + char *output; + int size; + + size = asgml2_line_size(line, srs, precision, prefix); + output = lwalloc(size); + asgml2_line_buf(line, srs, output, precision, prefix); + return output; +} + +static size_t +asgml2_poly_size(const LWPOLY *poly, const char *srs, int precision, const char *prefix) +{ + size_t size; + int i; + size_t prefixlen = strlen(prefix); + + size = sizeof("") + prefixlen*2; + if ( srs ) size += strlen(srs) + sizeof(" srsName=.."); + if ( lwpoly_is_empty(poly) ) + return size; + size += ( sizeof("/") + ( prefixlen*3) ) * 2; + size += ( sizeof("/") + ( prefixlen*2) ) * 2 * poly->nrings; + + for (i=0; inrings; i++) + size += pointArray_GMLsize(poly->rings[i], precision); + + return size; +} + +static size_t +asgml2_poly_buf(const LWPOLY *poly, const char *srs, char *output, int precision, + const char *prefix) +{ + int i; + char *ptr=output; + + ptr += sprintf(ptr, "<%sPolygon", prefix); + if ( srs ) ptr += sprintf(ptr, " srsName=\"%s\"", srs); + if ( lwpoly_is_empty(poly) ) { + ptr += sprintf(ptr, "/>"); + return (ptr-output); + } + ptr += sprintf(ptr, ">"); + ptr += sprintf(ptr, "<%souterBoundaryIs><%sLinearRing><%scoordinates>", + prefix, prefix, prefix); + ptr += pointArray_toGML2(poly->rings[0], ptr, precision); + ptr += sprintf(ptr, "", prefix, prefix, prefix); + for (i=1; inrings; i++) + { + ptr += sprintf(ptr, "<%sinnerBoundaryIs><%sLinearRing><%scoordinates>", prefix, prefix, prefix); + ptr += pointArray_toGML2(poly->rings[i], ptr, precision); + ptr += sprintf(ptr, "", prefix, prefix, prefix); + } + ptr += sprintf(ptr, "", prefix); + + return (ptr-output); +} + +static char * +asgml2_poly(const LWPOLY *poly, const char *srs, int precision, const char *prefix) +{ + char *output; + int size; + + size = asgml2_poly_size(poly, srs, precision, prefix); + output = lwalloc(size); + asgml2_poly_buf(poly, srs, output, precision, prefix); + return output; +} + +/* + * Compute max size required for GML version of this + * inspected geometry. Will recurse when needed. + * Don't call this with single-geoms inspected. + */ +static size_t +asgml2_multi_size(const LWCOLLECTION *col, const char *srs, int precision, + const char *prefix) +{ + int i; + size_t size; + size_t prefixlen = strlen(prefix); + LWGEOM *subgeom; + + /* the longest possible multi version */ + size = sizeof(""); + size += 2*prefixlen; + + if ( srs ) size += strlen(srs) + sizeof(" srsName=.."); + + for (i=0; ingeoms; i++) + { + subgeom = col->geoms[i]; + if (subgeom->type == POINTTYPE) + { + size += ( sizeof("/") + prefixlen ) * 2; + size += asgml2_point_size((LWPOINT*)subgeom, 0, precision, prefix); + } + else if (subgeom->type == LINETYPE) + { + size += ( sizeof("/") + prefixlen ) * 2; + size += asgml2_line_size((LWLINE*)subgeom, 0, precision, prefix); + } + else if (subgeom->type == POLYGONTYPE) + { + size += ( sizeof("/") + prefixlen ) * 2; + size += asgml2_poly_size((LWPOLY*)subgeom, 0, precision, prefix); + } + } + + return size; +} + +/* + * Don't call this with single-geoms inspected! + */ +static size_t +asgml2_multi_buf(const LWCOLLECTION *col, const char *srs, char *output, + int precision, const char *prefix) +{ + int type = col->type; + char *ptr, *gmltype; + int i; + LWGEOM *subgeom; + + ptr = output; + gmltype=""; + + if (type == MULTIPOINTTYPE) gmltype = "MultiPoint"; + else if (type == MULTILINETYPE) gmltype = "MultiLineString"; + else if (type == MULTIPOLYGONTYPE) gmltype = "MultiPolygon"; + + /* Open outmost tag */ + ptr += sprintf(ptr, "<%s%s", prefix, gmltype); + if ( srs ) ptr += sprintf(ptr, " srsName=\"%s\"", srs); + + if (!col->ngeoms) { + ptr += sprintf(ptr, "/>"); + return (ptr-output); + } + ptr += sprintf(ptr, ">"); + + for (i=0; ingeoms; i++) + { + subgeom = col->geoms[i]; + if (subgeom->type == POINTTYPE) + { + ptr += sprintf(ptr, "<%spointMember>", prefix); + ptr += asgml2_point_buf((LWPOINT*)subgeom, 0, ptr, precision, prefix); + ptr += sprintf(ptr, "", prefix); + } + else if (subgeom->type == LINETYPE) + { + ptr += sprintf(ptr, "<%slineStringMember>", prefix); + ptr += asgml2_line_buf((LWLINE*)subgeom, 0, ptr, precision, prefix); + ptr += sprintf(ptr, "", prefix); + } + else if (subgeom->type == POLYGONTYPE) + { + ptr += sprintf(ptr, "<%spolygonMember>", prefix); + ptr += asgml2_poly_buf((LWPOLY*)subgeom, 0, ptr, precision, prefix); + ptr += sprintf(ptr, "", prefix); + } + } + + /* Close outmost tag */ + ptr += sprintf(ptr, "", prefix, gmltype); + + return (ptr-output); +} + +/* + * Don't call this with single-geoms inspected! + */ +static char * +asgml2_multi(const LWCOLLECTION *col, const char *srs, int precision, + const char *prefix) +{ + char *gml; + size_t size; + + size = asgml2_multi_size(col, srs, precision, prefix); + gml = lwalloc(size); + asgml2_multi_buf(col, srs, gml, precision, prefix); + return gml; +} + + +/* + * Don't call this with single-geoms! + */ +static size_t +asgml2_collection_size(const LWCOLLECTION *col, const char *srs, int precision, + const char *prefix) +{ + int i; + size_t size; + size_t prefixlen = strlen(prefix); + LWGEOM *subgeom; + + size = sizeof(""); + size += (prefixlen * 2); + + if ( srs ) size += strlen(srs) + sizeof(" srsName=.."); + + for (i=0; ingeoms; i++) + { + subgeom = col->geoms[i]; + + size += ( sizeof("/") + prefixlen ) * 2; + if ( subgeom->type == POINTTYPE) + { + size += asgml2_point_size((LWPOINT*)subgeom, 0, precision, prefix); + } + else if ( subgeom->type == LINETYPE) + { + size += asgml2_line_size((LWLINE*)subgeom, 0, precision, prefix); + } + else if ( subgeom->type == POLYGONTYPE) + { + size += asgml2_poly_size((LWPOLY*)subgeom, 0, precision, prefix); + } + else if ( lwgeom_is_collection(subgeom) ) + { + size += asgml2_collection_size((LWCOLLECTION*)subgeom, 0, precision, prefix); + } + else + lwerror("asgml2_collection_size: Unable to process geometry type!"); + } + + + return size; +} + +/* + * Don't call this with single-geoms inspected! + */ +static size_t +asgml2_collection_buf(const LWCOLLECTION *col, const char *srs, char *output, int precision, const char *prefix) +{ + char *ptr; + int i; + LWGEOM *subgeom; + + ptr = output; + + /* Open outmost tag */ + ptr += sprintf(ptr, "<%sMultiGeometry", prefix); + if ( srs ) ptr += sprintf(ptr, " srsName=\"%s\"", srs); + + if (!col->ngeoms) { + ptr += sprintf(ptr, "/>"); + return (ptr-output); + } + ptr += sprintf(ptr, ">"); + + for (i=0; ingeoms; i++) + { + subgeom = col->geoms[i]; + + ptr += sprintf(ptr, "<%sgeometryMember>", prefix); + if (subgeom->type == POINTTYPE) + { + ptr += asgml2_point_buf((LWPOINT*)subgeom, 0, ptr, precision, prefix); + } + else if (subgeom->type == LINETYPE) + { + ptr += asgml2_line_buf((LWLINE*)subgeom, 0, ptr, precision, prefix); + } + else if (subgeom->type == POLYGONTYPE) + { + ptr += asgml2_poly_buf((LWPOLY*)subgeom, 0, ptr, precision, prefix); + } + else if (lwgeom_is_collection(subgeom)) + { + if (subgeom->type == COLLECTIONTYPE) + ptr += asgml2_collection_buf((LWCOLLECTION*)subgeom, 0, ptr, precision, prefix); + else + ptr += asgml2_multi_buf((LWCOLLECTION*)subgeom, 0, ptr, precision, prefix); + } + ptr += sprintf(ptr, "", prefix); + } + + /* Close outmost tag */ + ptr += sprintf(ptr, "", prefix); + + return (ptr-output); +} + +/* + * Don't call this with single-geoms inspected! + */ +static char * +asgml2_collection(const LWCOLLECTION *col, const char *srs, int precision, + const char *prefix) +{ + char *gml; + size_t size; + + size = asgml2_collection_size(col, srs, precision, prefix); + gml = lwalloc(size); + asgml2_collection_buf(col, srs, gml, precision, prefix); + return gml; +} + + +static size_t +pointArray_toGML2(POINTARRAY *pa, char *output, int precision) +{ + int i; + char *ptr; + char x[OUT_MAX_DIGS_DOUBLE+OUT_MAX_DOUBLE_PRECISION+1]; + char y[OUT_MAX_DIGS_DOUBLE+OUT_MAX_DOUBLE_PRECISION+1]; + char z[OUT_MAX_DIGS_DOUBLE+OUT_MAX_DOUBLE_PRECISION+1]; + + ptr = output; + + if ( ! FLAGS_GET_Z(pa->flags) ) + { + for (i=0; inpoints; i++) + { + POINT2D pt; + getPoint2d_p(pa, i, &pt); + + if (fabs(pt.x) < OUT_MAX_DOUBLE) + sprintf(x, "%.*f", precision, pt.x); + else + sprintf(x, "%g", pt.x); + trim_trailing_zeros(x); + + if (fabs(pt.y) < OUT_MAX_DOUBLE) + sprintf(y, "%.*f", precision, pt.y); + else + sprintf(y, "%g", pt.y); + trim_trailing_zeros(y); + + if ( i ) ptr += sprintf(ptr, " "); + ptr += sprintf(ptr, "%s,%s", x, y); + } + } + else + { + for (i=0; inpoints; i++) + { + POINT4D pt; + getPoint4d_p(pa, i, &pt); + + if (fabs(pt.x) < OUT_MAX_DOUBLE) + sprintf(x, "%.*f", precision, pt.x); + else + sprintf(x, "%g", pt.x); + trim_trailing_zeros(x); + + if (fabs(pt.y) < OUT_MAX_DOUBLE) + sprintf(y, "%.*f", precision, pt.y); + else + sprintf(y, "%g", pt.y); + trim_trailing_zeros(y); + + if (fabs(pt.z) < OUT_MAX_DOUBLE) + sprintf(z, "%.*f", precision, pt.z); + else + sprintf(z, "%g", pt.z); + trim_trailing_zeros(z); + + if ( i ) ptr += sprintf(ptr, " "); + ptr += sprintf(ptr, "%s,%s,%s", x, y, z); + } + } + + return ptr-output; +} + + +/* + * VERSION GML 3.1.1 + */ + + +/* takes a GEOMETRY and returns a GML representation */ +extern char * +lwgeom_to_gml3(const LWGEOM *geom, const char *srs, int precision, int opts, const char *prefix) +{ + int type = geom->type; + + /* Return null for empty (#1377) */ + if ( lwgeom_is_empty(geom) ) + return NULL; + + switch (type) + { + case POINTTYPE: + return asgml3_point((LWPOINT*)geom, srs, precision, opts, prefix); + + case LINETYPE: + return asgml3_line((LWLINE*)geom, srs, precision, opts, prefix); + + case POLYGONTYPE: + return asgml3_poly((LWPOLY*)geom, srs, precision, opts, 0, prefix); + + case TRIANGLETYPE: + return asgml3_triangle((LWTRIANGLE*)geom, srs, precision, opts, prefix); + + case MULTIPOINTTYPE: + case MULTILINETYPE: + case MULTIPOLYGONTYPE: + return asgml3_multi((LWCOLLECTION*)geom, srs, precision, opts, prefix); + + case POLYHEDRALSURFACETYPE: + return asgml3_psurface((LWPSURFACE*)geom, srs, precision, opts, prefix); + + case TINTYPE: + return asgml3_tin((LWTIN*)geom, srs, precision, opts, prefix); + + case COLLECTIONTYPE: + return asgml3_collection((LWCOLLECTION*)geom, srs, precision, opts, prefix); + + default: + lwerror("lwgeom_to_gml3: '%s' geometry type not supported", lwtype_name(type)); + return NULL; + } +} + +static size_t +asgml3_point_size(const LWPOINT *point, const char *srs, int precision, int opts, const char *prefix) +{ + int size; + size_t prefixlen = strlen(prefix); + + size = pointArray_GMLsize(point->point, precision); + size += ( sizeof("/") + (prefixlen*2) ) * 2; + if (srs) size += strlen(srs) + sizeof(" srsName=.."); + if (IS_DIMS(opts)) size += sizeof(" srsDimension='x'"); + return size; +} + +static size_t +asgml3_point_buf(const LWPOINT *point, const char *srs, char *output, int precision, int opts, const char *prefix) +{ + char *ptr = output; + int dimension=2; + + if (FLAGS_GET_Z(point->flags)) dimension = 3; + + ptr += sprintf(ptr, "<%sPoint", prefix); + if ( srs ) ptr += sprintf(ptr, " srsName=\"%s\"", srs); + if ( lwpoint_is_empty(point) ) { + ptr += sprintf(ptr, "/>"); + return (ptr-output); + } + + ptr += sprintf(ptr, ">"); + if (IS_DIMS(opts)) ptr += sprintf(ptr, "<%spos srsDimension=\"%d\">", prefix, dimension); + else ptr += sprintf(ptr, "<%spos>", prefix); + ptr += pointArray_toGML3(point->point, ptr, precision, opts); + ptr += sprintf(ptr, "", prefix, prefix); + + return (ptr-output); +} + +static char * +asgml3_point(const LWPOINT *point, const char *srs, int precision, int opts, const char *prefix) +{ + char *output; + int size; + + size = asgml3_point_size(point, srs, precision, opts, prefix); + output = lwalloc(size); + asgml3_point_buf(point, srs, output, precision, opts, prefix); + return output; +} + + +static size_t +asgml3_line_size(const LWLINE *line, const char *srs, int precision, int opts, const char *prefix) +{ + int size; + size_t prefixlen = strlen(prefix); + + size = pointArray_GMLsize(line->points, precision); + if ( opts & LW_GML_SHORTLINE ) + { + size += ( + sizeof("/") + + ( prefixlen * 2 ) + ) * 2; + } + else + { + size += ( + sizeof("/") + + ( prefixlen * 4 ) + ) * 2; + } + if (srs) size += strlen(srs) + sizeof(" srsName=.."); + if (IS_DIMS(opts)) size += sizeof(" srsDimension='x'"); + return size; +} + +static size_t +asgml3_line_buf(const LWLINE *line, const char *srs, char *output, int precision, int opts, const char *prefix) +{ + char *ptr=output; + int dimension=2; + int shortline = ( opts & LW_GML_SHORTLINE ); + + if (FLAGS_GET_Z(line->flags)) dimension = 3; + + if ( shortline ) { + ptr += sprintf(ptr, "<%sLineString", prefix); + } else { + ptr += sprintf(ptr, "<%sCurve", prefix); + } + + if ( srs ) { + ptr += sprintf(ptr, " srsName=\"%s\"", srs); + } + if ( lwline_is_empty(line) ) { + ptr += sprintf(ptr, "/>"); + return (ptr-output); + } + ptr += sprintf(ptr, ">"); + + if ( ! shortline ) { + ptr += sprintf(ptr, "<%ssegments>", prefix); + ptr += sprintf(ptr, "<%sLineStringSegment>", prefix); + } + + if (IS_DIMS(opts)) { + ptr += sprintf(ptr, "<%sposList srsDimension=\"%d\">", + prefix, dimension); + } else { + ptr += sprintf(ptr, "<%sposList>", prefix); + } + + ptr += pointArray_toGML3(line->points, ptr, precision, opts); + + ptr += sprintf(ptr, "", prefix); + + if ( shortline ) { + ptr += sprintf(ptr, "", prefix); + } else { + ptr += sprintf(ptr, "", prefix); + ptr += sprintf(ptr, "", prefix); + ptr += sprintf(ptr, "", prefix); + } + + return (ptr-output); +} + +static char * +asgml3_line(const LWLINE *line, const char *srs, int precision, int opts, const char *prefix) +{ + char *output; + int size; + + size = asgml3_line_size(line, srs, precision, opts, prefix); + output = lwalloc(size); + asgml3_line_buf(line, srs, output, precision, opts, prefix); + return output; +} + + +static size_t +asgml3_poly_size(const LWPOLY *poly, const char *srs, int precision, int opts, const char *prefix) +{ + size_t size; + size_t prefixlen = strlen(prefix); + int i; + + size = ( sizeof("///") + (prefixlen*3) ) * 2; + size += ( sizeof("//") + (prefixlen*2) ) * 2 * (poly->nrings - 1); + size += ( sizeof("") + (prefixlen*2) ) * poly->nrings; + if (srs) size += strlen(srs) + sizeof(" srsName=.."); + if (IS_DIMS(opts)) size += sizeof(" srsDimension='x'") * poly->nrings; + + for (i=0; inrings; i++) + size += pointArray_GMLsize(poly->rings[i], precision); + + return size; +} + +static size_t +asgml3_poly_buf(const LWPOLY *poly, const char *srs, char *output, int precision, int opts, int is_patch, const char *prefix) +{ + int i; + char *ptr=output; + int dimension=2; + + if (FLAGS_GET_Z(poly->flags)) dimension = 3; + if (is_patch) + { + ptr += sprintf(ptr, "<%sPolygonPatch", prefix); + + } + else + { + ptr += sprintf(ptr, "<%sPolygon", prefix); + } + + if (srs) ptr += sprintf(ptr, " srsName=\"%s\"", srs); + + if ( lwpoly_is_empty(poly) ) { + ptr += sprintf(ptr, "/>"); + return (ptr-output); + } + ptr += sprintf(ptr, ">"); + + ptr += sprintf(ptr, "<%sexterior><%sLinearRing>", prefix, prefix); + if (IS_DIMS(opts)) ptr += sprintf(ptr, "<%sposList srsDimension=\"%d\">", prefix, dimension); + else ptr += sprintf(ptr, "<%sposList>", prefix); + + ptr += pointArray_toGML3(poly->rings[0], ptr, precision, opts); + ptr += sprintf(ptr, "", + prefix, prefix, prefix); + for (i=1; inrings; i++) + { + ptr += sprintf(ptr, "<%sinterior><%sLinearRing>", prefix, prefix); + if (IS_DIMS(opts)) ptr += sprintf(ptr, "<%sposList srsDimension=\"%d\">", prefix, dimension); + else ptr += sprintf(ptr, "<%sposList>", prefix); + ptr += pointArray_toGML3(poly->rings[i], ptr, precision, opts); + ptr += sprintf(ptr, "", + prefix, prefix, prefix); + } + if (is_patch) ptr += sprintf(ptr, "", prefix); + else ptr += sprintf(ptr, "", prefix); + + return (ptr-output); +} + +static char * +asgml3_poly(const LWPOLY *poly, const char *srs, int precision, int opts, int is_patch, const char *prefix) +{ + char *output; + int size; + + size = asgml3_poly_size(poly, srs, precision, opts, prefix); + output = lwalloc(size); + asgml3_poly_buf(poly, srs, output, precision, opts, is_patch, prefix); + return output; +} + + +static size_t +asgml3_triangle_size(const LWTRIANGLE *triangle, const char *srs, int precision, int opts, const char *prefix) +{ + size_t size; + size_t prefixlen = strlen(prefix); + + size = ( sizeof("///") + (prefixlen*3) ) * 2; + size += sizeof("") + (prefixlen*2); + if (srs) size += strlen(srs) + sizeof(" srsName=.."); + if (IS_DIMS(opts)) size += sizeof(" srsDimension='x'"); + + size += pointArray_GMLsize(triangle->points, precision); + + return size; +} + +static size_t +asgml3_triangle_buf(const LWTRIANGLE *triangle, const char *srs, char *output, int precision, int opts, const char *prefix) +{ + char *ptr=output; + int dimension=2; + + if (FLAGS_GET_Z(triangle->flags)) dimension = 3; + if (srs) ptr += sprintf(ptr, "<%sTriangle srsName=\"%s\">", prefix, srs); + else ptr += sprintf(ptr, "<%sTriangle>", prefix); + + ptr += sprintf(ptr, "<%sexterior><%sLinearRing>", prefix, prefix); + if (IS_DIMS(opts)) ptr += sprintf(ptr, "<%sposList srsDimension=\"%d\">", prefix, dimension); + else ptr += sprintf(ptr, "<%sposList>", prefix); + + ptr += pointArray_toGML3(triangle->points, ptr, precision, opts); + ptr += sprintf(ptr, "", + prefix, prefix, prefix); + + ptr += sprintf(ptr, "", prefix); + + return (ptr-output); +} + +static char * +asgml3_triangle(const LWTRIANGLE *triangle, const char *srs, int precision, int opts, const char *prefix) +{ + char *output; + int size; + + size = asgml3_triangle_size(triangle, srs, precision, opts, prefix); + output = lwalloc(size); + asgml3_triangle_buf(triangle, srs, output, precision, opts, prefix); + return output; +} + + +/* + * Compute max size required for GML version of this + * inspected geometry. Will recurse when needed. + * Don't call this with single-geoms inspected. + */ +static size_t +asgml3_multi_size(const LWCOLLECTION *col, const char *srs, int precision, int opts, const char *prefix) +{ + int i; + size_t size; + size_t prefixlen = strlen(prefix); + LWGEOM *subgeom; + + /* the longest possible multi version */ + size = sizeof("") + prefixlen*2; + + if ( srs ) size += strlen(srs) + sizeof(" srsName=.."); + + for (i=0; ingeoms; i++) + { + subgeom = col->geoms[i]; + if (subgeom->type == POINTTYPE) + { + size += ( sizeof("/") + prefixlen ) * 2; + size += asgml3_point_size((LWPOINT*)subgeom, 0, precision, opts, prefix); + } + else if (subgeom->type == LINETYPE) + { + size += ( sizeof("/") + prefixlen ) * 2; + size += asgml3_line_size((LWLINE*)subgeom, 0, precision, opts, prefix); + } + else if (subgeom->type == POLYGONTYPE) + { + size += ( sizeof("/") + prefixlen ) * 2; + size += asgml3_poly_size((LWPOLY*)subgeom, 0, precision, opts, prefix); + } + } + + return size; +} + +/* + * Don't call this with single-geoms inspected! + */ +static size_t +asgml3_multi_buf(const LWCOLLECTION *col, const char *srs, char *output, int precision, int opts, const char *prefix) +{ + int type = col->type; + char *ptr, *gmltype; + int i; + LWGEOM *subgeom; + + ptr = output; + gmltype=""; + + if (type == MULTIPOINTTYPE) gmltype = "MultiPoint"; + else if (type == MULTILINETYPE) gmltype = "MultiCurve"; + else if (type == MULTIPOLYGONTYPE) gmltype = "MultiSurface"; + + /* Open outmost tag */ + ptr += sprintf(ptr, "<%s%s", prefix, gmltype); + if ( srs ) ptr += sprintf(ptr, " srsName=\"%s\"", srs); + + if (!col->ngeoms) { + ptr += sprintf(ptr, "/>"); + return (ptr-output); + } + ptr += sprintf(ptr, ">"); + + for (i=0; ingeoms; i++) + { + subgeom = col->geoms[i]; + if (subgeom->type == POINTTYPE) + { + ptr += sprintf(ptr, "<%spointMember>", prefix); + ptr += asgml3_point_buf((LWPOINT*)subgeom, 0, ptr, precision, opts, prefix); + ptr += sprintf(ptr, "", prefix); + } + else if (subgeom->type == LINETYPE) + { + ptr += sprintf(ptr, "<%scurveMember>", prefix); + ptr += asgml3_line_buf((LWLINE*)subgeom, 0, ptr, precision, opts, prefix); + ptr += sprintf(ptr, "", prefix); + } + else if (subgeom->type == POLYGONTYPE) + { + ptr += sprintf(ptr, "<%ssurfaceMember>", prefix); + ptr += asgml3_poly_buf((LWPOLY*)subgeom, 0, ptr, precision, opts, 0, prefix); + ptr += sprintf(ptr, "", prefix); + } + } + + /* Close outmost tag */ + ptr += sprintf(ptr, "", prefix, gmltype); + + return (ptr-output); +} + +/* + * Don't call this with single-geoms inspected! + */ +static char * +asgml3_multi(const LWCOLLECTION *col, const char *srs, int precision, int opts, const char *prefix) +{ + char *gml; + size_t size; + + size = asgml3_multi_size(col, srs, precision, opts, prefix); + gml = lwalloc(size); + asgml3_multi_buf(col, srs, gml, precision, opts, prefix); + return gml; +} + + +static size_t +asgml3_psurface_size(const LWPSURFACE *psur, const char *srs, int precision, int opts, const char *prefix) +{ + int i; + size_t size; + size_t prefixlen = strlen(prefix); + + size = (sizeof("/") + prefixlen*2) * 2; + if ( srs ) size += strlen(srs) + sizeof(" srsName=.."); + + for (i=0; ingeoms; i++) + { + size += asgml3_poly_size(psur->geoms[i], 0, precision, opts, prefix); + } + + return size; +} + + +/* + * Don't call this with single-geoms inspected! + */ +static size_t +asgml3_psurface_buf(const LWPSURFACE *psur, const char *srs, char *output, int precision, int opts, const char *prefix) +{ + char *ptr; + int i; + + ptr = output; + + /* Open outmost tag */ + if (srs) ptr += sprintf(ptr, "<%sPolyhedralSurface srsName=\"%s\"><%spolygonPatches>", + prefix, srs, prefix); + else ptr += sprintf(ptr, "<%sPolyhedralSurface><%spolygonPatches>", + prefix, prefix); + + for (i=0; ingeoms; i++) + { + ptr += asgml3_poly_buf(psur->geoms[i], 0, ptr, precision, opts, 1, prefix); + } + + /* Close outmost tag */ + ptr += sprintf(ptr, "", + prefix, prefix); + + return (ptr-output); +} + +/* + * Don't call this with single-geoms inspected! + */ +static char * +asgml3_psurface(const LWPSURFACE *psur, const char *srs, int precision, int opts, const char *prefix) +{ + char *gml; + size_t size; + + size = asgml3_psurface_size(psur, srs, precision, opts, prefix); + gml = lwalloc(size); + asgml3_psurface_buf(psur, srs, gml, precision, opts, prefix); + return gml; +} + + +static size_t +asgml3_tin_size(const LWTIN *tin, const char *srs, int precision, int opts, const char *prefix) +{ + int i; + size_t size; + size_t prefixlen = strlen(prefix); + + size = (sizeof("/") + prefixlen*2) * 2; + if ( srs ) size += strlen(srs) + sizeof(" srsName=.."); + + for (i=0; ingeoms; i++) + { + size += asgml3_triangle_size(tin->geoms[i], 0, precision, opts, prefix); + } + + return size; +} + + +/* + * Don't call this with single-geoms inspected! + */ +static size_t +asgml3_tin_buf(const LWTIN *tin, const char *srs, char *output, int precision, int opts, const char *prefix) +{ + char *ptr; + int i; + + ptr = output; + + /* Open outmost tag */ + if (srs) ptr += sprintf(ptr, "<%sTin srsName=\"%s\"><%strianglePatches>", + prefix, srs, prefix); + else ptr += sprintf(ptr, "<%sTin><%strianglePatches>", + prefix, prefix); + + for (i=0; ingeoms; i++) + { + ptr += asgml3_triangle_buf(tin->geoms[i], 0, ptr, precision, + opts, prefix); + } + + /* Close outmost tag */ + ptr += sprintf(ptr, "", prefix, prefix); + + return (ptr-output); +} + +/* + * Don't call this with single-geoms inspected! + */ +static char * +asgml3_tin(const LWTIN *tin, const char *srs, int precision, int opts, const char *prefix) +{ + char *gml; + size_t size; + + size = asgml3_tin_size(tin, srs, precision, opts, prefix); + gml = lwalloc(size); + asgml3_tin_buf(tin, srs, gml, precision, opts, prefix); + return gml; +} + +static size_t +asgml3_collection_size(const LWCOLLECTION *col, const char *srs, int precision, int opts, const char *prefix) +{ + int i; + size_t size; + size_t prefixlen = strlen(prefix); + LWGEOM *subgeom; + + size = sizeof("") + prefixlen*2; + + if ( srs ) size += strlen(srs) + sizeof(" srsName=.."); + + for (i=0; ingeoms; i++) + { + subgeom = col->geoms[i]; + size += ( sizeof("/") + prefixlen ) * 2; + if ( subgeom->type == POINTTYPE ) + { + size += asgml3_point_size((LWPOINT*)subgeom, 0, precision, opts, prefix); + } + else if ( subgeom->type == LINETYPE ) + { + size += asgml3_line_size((LWLINE*)subgeom, 0, precision, opts, prefix); + } + else if ( subgeom->type == POLYGONTYPE ) + { + size += asgml3_poly_size((LWPOLY*)subgeom, 0, precision, opts, prefix); + } + else if ( lwgeom_is_collection(subgeom) ) + { + size += asgml3_multi_size((LWCOLLECTION*)subgeom, 0, precision, opts, prefix); + } + else + lwerror("asgml3_collection_size: unknown geometry type"); + } + + return size; +} + +static size_t +asgml3_collection_buf(const LWCOLLECTION *col, const char *srs, char *output, int precision, int opts, const char *prefix) +{ + char *ptr; + int i; + LWGEOM *subgeom; + + ptr = output; + + /* Open outmost tag */ + ptr += sprintf(ptr, "<%sMultiGeometry", prefix); + if ( srs ) ptr += sprintf(ptr, " srsName=\"%s\"", srs); + + if (!col->ngeoms) { + ptr += sprintf(ptr, "/>"); + return (ptr-output); + } + ptr += sprintf(ptr, ">"); + + for (i=0; ingeoms; i++) + { + subgeom = col->geoms[i]; + ptr += sprintf(ptr, "<%sgeometryMember>", prefix); + if ( subgeom->type == POINTTYPE ) + { + ptr += asgml3_point_buf((LWPOINT*)subgeom, 0, ptr, precision, opts, prefix); + } + else if ( subgeom->type == LINETYPE ) + { + ptr += asgml3_line_buf((LWLINE*)subgeom, 0, ptr, precision, opts, prefix); + } + else if ( subgeom->type == POLYGONTYPE ) + { + ptr += asgml3_poly_buf((LWPOLY*)subgeom, 0, ptr, precision, opts, 0, prefix); + } + else if ( lwgeom_is_collection(subgeom) ) + { + if ( subgeom->type == COLLECTIONTYPE ) + ptr += asgml3_collection_buf((LWCOLLECTION*)subgeom, 0, ptr, precision, opts, prefix); + else + ptr += asgml3_multi_buf((LWCOLLECTION*)subgeom, 0, ptr, precision, opts, prefix); + } + else + lwerror("asgml3_collection_buf: unknown geometry type"); + + ptr += sprintf(ptr, "", prefix); + } + + /* Close outmost tag */ + ptr += sprintf(ptr, "", prefix); + + return (ptr-output); +} + +/* + * Don't call this with single-geoms inspected! + */ +static char * +asgml3_collection(const LWCOLLECTION *col, const char *srs, int precision, int opts, const char *prefix) +{ + char *gml; + size_t size; + + size = asgml3_collection_size(col, srs, precision, opts, prefix); + gml = lwalloc(size); + asgml3_collection_buf(col, srs, gml, precision, opts, prefix); + return gml; +} + + +/* In GML3, inside or , coordinates are separated by a space separator + * In GML3 also, lat/lon are reversed for geocentric data + */ +static size_t +pointArray_toGML3(POINTARRAY *pa, char *output, int precision, int opts) +{ + int i; + char *ptr; + char x[OUT_MAX_DIGS_DOUBLE+OUT_MAX_DOUBLE_PRECISION+1]; + char y[OUT_MAX_DIGS_DOUBLE+OUT_MAX_DOUBLE_PRECISION+1]; + char z[OUT_MAX_DIGS_DOUBLE+OUT_MAX_DOUBLE_PRECISION+1]; + + ptr = output; + + if ( ! FLAGS_GET_Z(pa->flags) ) + { + for (i=0; inpoints; i++) + { + POINT2D pt; + getPoint2d_p(pa, i, &pt); + + if (fabs(pt.x) < OUT_MAX_DOUBLE) + sprintf(x, "%.*f", precision, pt.x); + else + sprintf(x, "%g", pt.x); + trim_trailing_zeros(x); + + if (fabs(pt.y) < OUT_MAX_DOUBLE) + sprintf(y, "%.*f", precision, pt.y); + else + sprintf(y, "%g", pt.y); + trim_trailing_zeros(y); + + if ( i ) ptr += sprintf(ptr, " "); + if (IS_DEGREE(opts)) + ptr += sprintf(ptr, "%s %s", y, x); + else + ptr += sprintf(ptr, "%s %s", x, y); + } + } + else + { + for (i=0; inpoints; i++) + { + POINT4D pt; + getPoint4d_p(pa, i, &pt); + + if (fabs(pt.x) < OUT_MAX_DOUBLE) + sprintf(x, "%.*f", precision, pt.x); + else + sprintf(x, "%g", pt.x); + trim_trailing_zeros(x); + + if (fabs(pt.y) < OUT_MAX_DOUBLE) + sprintf(y, "%.*f", precision, pt.y); + else + sprintf(y, "%g", pt.y); + trim_trailing_zeros(y); + + if (fabs(pt.z) < OUT_MAX_DOUBLE) + sprintf(z, "%.*f", precision, pt.z); + else + sprintf(z, "%g", pt.z); + trim_trailing_zeros(z); + + if ( i ) ptr += sprintf(ptr, " "); + if (IS_DEGREE(opts)) + ptr += sprintf(ptr, "%s %s %s", y, x, z); + else + ptr += sprintf(ptr, "%s %s %s", x, y, z); + } + } + + return ptr-output; +} + + + +/* + * Returns maximum size of rendered pointarray in bytes. + */ +static size_t +pointArray_GMLsize(POINTARRAY *pa, int precision) +{ + if (FLAGS_NDIMS(pa->flags) == 2) + return (OUT_MAX_DIGS_DOUBLE + precision + sizeof(", ")) * 2 * pa->npoints; + + return (OUT_MAX_DIGS_DOUBLE + precision + sizeof(", ")) * 3 * pa->npoints; +} diff -Nru postgis-1.5.3/liblwgeom/lwout_kml.c postgis-2.0.1/liblwgeom/lwout_kml.c --- postgis-1.5.3/liblwgeom/lwout_kml.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwout_kml.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,186 @@ +/********************************************************************** + * $Id: lwout_kml.c 9324 2012-02-27 22:08:12Z pramsey $ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * + * Copyright 2006 Corporacion Autonoma Regional de Santander + * Eduin Carrillo + * Copyright 2010 Paul Ramsey + * + * This is free software; you can redistribute and/or modify it under + * the terms of hte GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include "liblwgeom_internal.h" +#include "stringbuffer.h" + +static int lwgeom_to_kml2_sb(const LWGEOM *geom, int precision, const char *prefix, stringbuffer_t *sb); +static int lwpoint_to_kml2_sb(const LWPOINT *point, int precision, const char *prefix, stringbuffer_t *sb); +static int lwline_to_kml2_sb(const LWLINE *line, int precision, const char *prefix, stringbuffer_t *sb); +static int lwpoly_to_kml2_sb(const LWPOLY *poly, int precision, const char *prefix, stringbuffer_t *sb); +static int lwcollection_to_kml2_sb(const LWCOLLECTION *col, int precision, const char *prefix, stringbuffer_t *sb); +static int ptarray_to_kml2_sb(const POINTARRAY *pa, int precision, stringbuffer_t *sb); + +/* +* KML 2.2.0 +*/ + +/* takes a GEOMETRY and returns a KML representation */ +char* +lwgeom_to_kml2(const LWGEOM *geom, int precision, const char *prefix) +{ + stringbuffer_t *sb; + int rv; + char *kml; + + /* Can't do anything with empty */ + if( lwgeom_is_empty(geom) ) + return NULL; + + sb = stringbuffer_create(); + rv = lwgeom_to_kml2_sb(geom, precision, prefix, sb); + + if ( rv == LW_FAILURE ) + { + stringbuffer_destroy(sb); + return NULL; + } + + kml = stringbuffer_getstringcopy(sb); + stringbuffer_destroy(sb); + + return kml; +} + +static int +lwgeom_to_kml2_sb(const LWGEOM *geom, int precision, const char *prefix, stringbuffer_t *sb) +{ + switch (geom->type) + { + case POINTTYPE: + return lwpoint_to_kml2_sb((LWPOINT*)geom, precision, prefix, sb); + + case LINETYPE: + return lwline_to_kml2_sb((LWLINE*)geom, precision, prefix, sb); + + case POLYGONTYPE: + return lwpoly_to_kml2_sb((LWPOLY*)geom, precision, prefix, sb); + + case MULTIPOINTTYPE: + case MULTILINETYPE: + case MULTIPOLYGONTYPE: + return lwcollection_to_kml2_sb((LWCOLLECTION*)geom, precision, prefix, sb); + + default: + lwerror("lwgeom_to_kml2: '%s' geometry type not supported", lwtype_name(geom->type)); + return LW_FAILURE; + } +} + +static int +ptarray_to_kml2_sb(const POINTARRAY *pa, int precision, stringbuffer_t *sb) +{ + int i, j; + int dims = FLAGS_GET_Z(pa->flags) ? 3 : 2; + POINT4D pt; + double *d; + + for ( i = 0; i < pa->npoints; i++ ) + { + getPoint4d_p(pa, i, &pt); + d = (double*)(&pt); + if ( i ) stringbuffer_append(sb," "); + for (j = 0; j < dims; j++) + { + if ( j ) stringbuffer_append(sb,","); + if( fabs(d[j]) < OUT_MAX_DOUBLE ) + { + if ( stringbuffer_aprintf(sb, "%.*f", precision, d[j]) < 0 ) return LW_FAILURE; + } + else + { + if ( stringbuffer_aprintf(sb, "%g", d[j]) < 0 ) return LW_FAILURE; + } + stringbuffer_trim_trailing_zeroes(sb); + } + } + return LW_SUCCESS; +} + + +static int +lwpoint_to_kml2_sb(const LWPOINT *point, int precision, const char *prefix, stringbuffer_t *sb) +{ + /* Open point */ + if ( stringbuffer_aprintf(sb, "<%sPoint><%scoordinates>", prefix, prefix) < 0 ) return LW_FAILURE; + /* Coordinate array */ + if ( ptarray_to_kml2_sb(point->point, precision, sb) == LW_FAILURE ) return LW_FAILURE; + /* Close point */ + if ( stringbuffer_aprintf(sb, "", prefix, prefix) < 0 ) return LW_FAILURE; + return LW_SUCCESS; +} + +static int +lwline_to_kml2_sb(const LWLINE *line, int precision, const char *prefix, stringbuffer_t *sb) +{ + /* Open linestring */ + if ( stringbuffer_aprintf(sb, "<%sLineString><%scoordinates>", prefix, prefix) < 0 ) return LW_FAILURE; + /* Coordinate array */ + if ( ptarray_to_kml2_sb(line->points, precision, sb) == LW_FAILURE ) return LW_FAILURE; + /* Close linestring */ + if ( stringbuffer_aprintf(sb, "", prefix, prefix) < 0 ) return LW_FAILURE; + + return LW_SUCCESS; +} + +static int +lwpoly_to_kml2_sb(const LWPOLY *poly, int precision, const char *prefix, stringbuffer_t *sb) +{ + int i, rv; + + /* Open polygon */ + if ( stringbuffer_aprintf(sb, "<%sPolygon>", prefix) < 0 ) return LW_FAILURE; + for ( i = 0; i < poly->nrings; i++ ) + { + /* Inner or outer ring opening tags */ + if( i ) + rv = stringbuffer_aprintf(sb, "<%sinnerBoundaryIs><%sLinearRing><%scoordinates>", prefix, prefix, prefix); + else + rv = stringbuffer_aprintf(sb, "<%souterBoundaryIs><%sLinearRing><%scoordinates>", prefix, prefix, prefix); + if ( rv < 0 ) return LW_FAILURE; + + /* Coordinate array */ + if ( ptarray_to_kml2_sb(poly->rings[i], precision, sb) == LW_FAILURE ) return LW_FAILURE; + + /* Inner or outer ring closing tags */ + if( i ) + rv = stringbuffer_aprintf(sb, "", prefix, prefix, prefix); + else + rv = stringbuffer_aprintf(sb, "", prefix, prefix, prefix); + if ( rv < 0 ) return LW_FAILURE; + } + /* Close polygon */ + if ( stringbuffer_aprintf(sb, "", prefix) < 0 ) return LW_FAILURE; + + return LW_SUCCESS; +} + +static int +lwcollection_to_kml2_sb(const LWCOLLECTION *col, int precision, const char *prefix, stringbuffer_t *sb) +{ + int i, rv; + + /* Open geometry */ + if ( stringbuffer_aprintf(sb, "<%sMultiGeometry>", prefix) < 0 ) return LW_FAILURE; + for ( i = 0; i < col->ngeoms; i++ ) + { + rv = lwgeom_to_kml2_sb(col->geoms[i], precision, prefix, sb); + if ( rv == LW_FAILURE ) return LW_FAILURE; + } + /* Close geometry */ + if ( stringbuffer_aprintf(sb, "", prefix) < 0 ) return LW_FAILURE; + + return LW_SUCCESS; +} diff -Nru postgis-1.5.3/liblwgeom/lwout_svg.c postgis-2.0.1/liblwgeom/lwout_svg.c --- postgis-1.5.3/liblwgeom/lwout_svg.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwout_svg.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,656 @@ +/********************************************************************** + * $Id: lwout_svg.c 9324 2012-02-27 22:08:12Z pramsey $ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * Copyright 2001-2003 Refractions Research Inc. + * + * This is free software; you can redistribute and/or modify it under + * the terms of hte GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +/** @file +* +* SVG output routines. +* Originally written by: Klaus Förster +* Refactored by: Olivier Courtin (Camptocamp) +* +* BNF SVG Path: +**********************************************************************/ + +#include "liblwgeom_internal.h" + +static char * assvg_point(const LWPOINT *point, int relative, int precision); +static char * assvg_line(const LWLINE *line, int relative, int precision); +static char * assvg_polygon(const LWPOLY *poly, int relative, int precision); +static char * assvg_multipoint(const LWMPOINT *mpoint, int relative, int precision); +static char * assvg_multiline(const LWMLINE *mline, int relative, int precision); +static char * assvg_multipolygon(const LWMPOLY *mpoly, int relative, int precision); +static char * assvg_collection(const LWCOLLECTION *col, int relative, int precision); + +static size_t assvg_geom_size(const LWGEOM *geom, int relative, int precision); +static size_t assvg_geom_buf(const LWGEOM *geom, char *output, int relative, int precision); +static size_t pointArray_svg_size(POINTARRAY *pa, int precision); +static size_t pointArray_svg_rel(POINTARRAY *pa, char * output, int close_ring, int precision); +static size_t pointArray_svg_abs(POINTARRAY *pa, char * output, int close_ring, int precision); + + +/** + * Takes a GEOMETRY and returns a SVG representation + */ +char * +lwgeom_to_svg(const LWGEOM *geom, int precision, int relative) +{ + char *ret = NULL; + int type = geom->type; + + /* Empty string for empties */ + if( lwgeom_is_empty(geom) ) + { + ret = lwalloc(1); + ret[0] = '\0'; + return ret; + } + + switch (type) + { + case POINTTYPE: + ret = assvg_point((LWPOINT*)geom, relative, precision); + break; + case LINETYPE: + ret = assvg_line((LWLINE*)geom, relative, precision); + break; + case POLYGONTYPE: + ret = assvg_polygon((LWPOLY*)geom, relative, precision); + break; + case MULTIPOINTTYPE: + ret = assvg_multipoint((LWMPOINT*)geom, relative, precision); + break; + case MULTILINETYPE: + ret = assvg_multiline((LWMLINE*)geom, relative, precision); + break; + case MULTIPOLYGONTYPE: + ret = assvg_multipolygon((LWMPOLY*)geom, relative, precision); + break; + case COLLECTIONTYPE: + ret = assvg_collection((LWCOLLECTION*)geom, relative, precision); + break; + + default: + lwerror("lwgeom_to_svg: '%s' geometry type not supported", + lwtype_name(type)); + } + + return ret; +} + + +/** + * Point Geometry + */ + +static size_t +assvg_point_size(const LWPOINT *point, int circle, int precision) +{ + size_t size; + + size = (OUT_MAX_DIGS_DOUBLE + precision) * 2; + if (circle) size += sizeof("cx='' cy=''"); + else size += sizeof("x='' y=''"); + + return size; +} + +static size_t +assvg_point_buf(const LWPOINT *point, char * output, int circle, int precision) +{ + char *ptr=output; + char x[OUT_MAX_DIGS_DOUBLE+OUT_MAX_DOUBLE_PRECISION+1]; + char y[OUT_MAX_DIGS_DOUBLE+OUT_MAX_DOUBLE_PRECISION+1]; + POINT2D pt; + + getPoint2d_p(point->point, 0, &pt); + + if (fabs(pt.x) < OUT_MAX_DOUBLE) + sprintf(x, "%.*f", precision, pt.x); + else + sprintf(x, "%g", pt.x); + trim_trailing_zeros(x); + + /* SVG Y axis is reversed, an no need to transform 0 into -0 */ + if (fabs(pt.y) < OUT_MAX_DOUBLE) + sprintf(y, "%.*f", precision, fabs(pt.y) ? pt.y * -1 : pt.y); + else + sprintf(y, "%g", fabs(pt.y) ? pt.y * -1 : pt.y); + trim_trailing_zeros(y); + + if (circle) ptr += sprintf(ptr, "x=\"%s\" y=\"%s\"", x, y); + else ptr += sprintf(ptr, "cx=\"%s\" cy=\"%s\"", x, y); + + return (ptr-output); +} + +static char * +assvg_point(const LWPOINT *point, int circle, int precision) +{ + char *output; + int size; + + size = assvg_point_size(point, circle, precision); + output = lwalloc(size); + assvg_point_buf(point, output, circle, precision); + + return output; +} + + +/** + * Line Geometry + */ + +static size_t +assvg_line_size(const LWLINE *line, int relative, int precision) +{ + size_t size; + + size = sizeof("M "); + size += pointArray_svg_size(line->points, precision); + + return size; +} + +static size_t +assvg_line_buf(const LWLINE *line, char * output, int relative, int precision) +{ + char *ptr=output; + + /* Start path with SVG MoveTo */ + ptr += sprintf(ptr, "M "); + if (relative) + ptr += pointArray_svg_rel(line->points, ptr, 1, precision); + else + ptr += pointArray_svg_abs(line->points, ptr, 1, precision); + + return (ptr-output); +} + +static char * +assvg_line(const LWLINE *line, int relative, int precision) +{ + char *output; + int size; + + size = assvg_line_size(line, relative, precision); + output = lwalloc(size); + assvg_line_buf(line, output, relative, precision); + + return output; +} + + +/** + * Polygon Geometry + */ + +static size_t +assvg_polygon_size(const LWPOLY *poly, int relative, int precision) +{ + int i; + size_t size=0; + + for (i=0; inrings; i++) + size += pointArray_svg_size(poly->rings[i], precision) + sizeof(" "); + size += sizeof("M Z") * poly->nrings; + + return size; +} + +static size_t +assvg_polygon_buf(const LWPOLY *poly, char * output, int relative, int precision) +{ + int i; + char *ptr=output; + + for (i=0; inrings; i++) + { + if (i) ptr += sprintf(ptr, " "); /* Space beetween each ring */ + ptr += sprintf(ptr, "M "); /* Start path with SVG MoveTo */ + + if (relative) + { + ptr += pointArray_svg_rel(poly->rings[i], ptr, 0, precision); + ptr += sprintf(ptr, " z"); /* SVG closepath */ + } + else + { + ptr += pointArray_svg_abs(poly->rings[i], ptr, 0, precision); + ptr += sprintf(ptr, " Z"); /* SVG closepath */ + } + } + + return (ptr-output); +} + +static char * +assvg_polygon(const LWPOLY *poly, int relative, int precision) +{ + char *output; + int size; + + size = assvg_polygon_size(poly, relative, precision); + output = lwalloc(size); + assvg_polygon_buf(poly, output, relative, precision); + + return output; +} + + +/** + * Multipoint Geometry + */ + +static size_t +assvg_multipoint_size(const LWMPOINT *mpoint, int relative, int precision) +{ + const LWPOINT *point; + size_t size=0; + int i; + + for (i=0 ; ingeoms ; i++) + { + point = mpoint->geoms[i]; + size += assvg_point_size(point, relative, precision); + } + size += sizeof(",") * --i; /* Arbitrary comma separator */ + + return size; +} + +static size_t +assvg_multipoint_buf(const LWMPOINT *mpoint, char *output, int relative, int precision) +{ + const LWPOINT *point; + int i; + char *ptr=output; + + for (i=0 ; ingeoms ; i++) + { + if (i) ptr += sprintf(ptr, ","); /* Arbitrary comma separator */ + point = mpoint->geoms[i]; + ptr += assvg_point_buf(point, ptr, relative, precision); + } + + return (ptr-output); +} + +static char * +assvg_multipoint(const LWMPOINT *mpoint, int relative, int precision) +{ + char *output; + int size; + + size = assvg_multipoint_size(mpoint, relative, precision); + output = lwalloc(size); + assvg_multipoint_buf(mpoint, output, relative, precision); + + return output; +} + + +/** + * Multiline Geometry + */ + +static size_t +assvg_multiline_size(const LWMLINE *mline, int relative, int precision) +{ + const LWLINE *line; + size_t size=0; + int i; + + for (i=0 ; ingeoms ; i++) + { + line = mline->geoms[i]; + size += assvg_line_size(line, relative, precision); + } + size += sizeof(" ") * --i; /* SVG whitespace Separator */ + + return size; +} + +static size_t +assvg_multiline_buf(const LWMLINE *mline, char *output, int relative, int precision) +{ + const LWLINE *line; + int i; + char *ptr=output; + + for (i=0 ; ingeoms ; i++) + { + if (i) ptr += sprintf(ptr, " "); /* SVG whitespace Separator */ + line = mline->geoms[i]; + ptr += assvg_line_buf(line, ptr, relative, precision); + } + + return (ptr-output); +} + +static char * +assvg_multiline(const LWMLINE *mline, int relative, int precision) +{ + char *output; + int size; + + size = assvg_multiline_size(mline, relative, precision); + output = lwalloc(size); + assvg_multiline_buf(mline, output, relative, precision); + + return output; +} + + +/* + * Multipolygon Geometry + */ + +static size_t +assvg_multipolygon_size(const LWMPOLY *mpoly, int relative, int precision) +{ + const LWPOLY *poly; + size_t size=0; + int i; + + for (i=0 ; ingeoms ; i++) + { + poly = mpoly->geoms[i]; + size += assvg_polygon_size(poly, relative, precision); + } + size += sizeof(" ") * --i; /* SVG whitespace Separator */ + + return size; +} + +static size_t +assvg_multipolygon_buf(const LWMPOLY *mpoly, char *output, int relative, int precision) +{ + const LWPOLY *poly; + int i; + char *ptr=output; + + for (i=0 ; ingeoms ; i++) + { + if (i) ptr += sprintf(ptr, " "); /* SVG whitespace Separator */ + poly = mpoly->geoms[i]; + ptr += assvg_polygon_buf(poly, ptr, relative, precision); + } + + return (ptr-output); +} + +static char * +assvg_multipolygon(const LWMPOLY *mpoly, int relative, int precision) +{ + char *output; + int size; + + size = assvg_multipolygon_size(mpoly, relative, precision); + output = lwalloc(size); + assvg_multipolygon_buf(mpoly, output, relative, precision); + + return output; +} + + +/** +* Collection Geometry +*/ + +static size_t +assvg_collection_size(const LWCOLLECTION *col, int relative, int precision) +{ + int i = 0; + size_t size=0; + const LWGEOM *subgeom; + + for (i=0; ingeoms; i++) + { + subgeom = col->geoms[i]; + size += assvg_geom_size(subgeom, relative, precision); + } + + if ( i ) /* We have some geometries, so add space for delimiters. */ + size += sizeof(";") * --i; + + if (size == 0) size++; /* GEOMETRYCOLLECTION EMPTY, space for null terminator */ + + return size; +} + +static size_t +assvg_collection_buf(const LWCOLLECTION *col, char *output, int relative, int precision) +{ + int i; + char *ptr=output; + const LWGEOM *subgeom; + + /* EMPTY GEOMETRYCOLLECTION */ + if (col->ngeoms == 0) *ptr = '\0'; + + for (i=0; ingeoms; i++) + { + if (i) ptr += sprintf(ptr, ";"); + subgeom = col->geoms[i]; + ptr += assvg_geom_buf(subgeom, ptr, relative, precision); + } + + return (ptr - output); +} + +static char * +assvg_collection(const LWCOLLECTION *col, int relative, int precision) +{ + char *output; + int size; + + size = assvg_collection_size(col, relative, precision); + output = lwalloc(size); + assvg_collection_buf(col, output, relative, precision); + + return output; +} + + +static size_t +assvg_geom_buf(const LWGEOM *geom, char *output, int relative, int precision) +{ + int type = geom->type; + char *ptr=output; + + switch (type) + { + case POINTTYPE: + ptr += assvg_point_buf((LWPOINT*)geom, ptr, relative, precision); + break; + + case LINETYPE: + ptr += assvg_line_buf((LWLINE*)geom, ptr, relative, precision); + break; + + case POLYGONTYPE: + ptr += assvg_polygon_buf((LWPOLY*)geom, ptr, relative, precision); + break; + + case MULTIPOINTTYPE: + ptr += assvg_multipoint_buf((LWMPOINT*)geom, ptr, relative, precision); + break; + + case MULTILINETYPE: + ptr += assvg_multiline_buf((LWMLINE*)geom, ptr, relative, precision); + break; + + case MULTIPOLYGONTYPE: + ptr += assvg_multipolygon_buf((LWMPOLY*)geom, ptr, relative, precision); + break; + + default: + lwerror("assvg_geom_buf: '%s' geometry type not supported.", + lwtype_name(type)); + } + + return (ptr-output); +} + + +static size_t +assvg_geom_size(const LWGEOM *geom, int relative, int precision) +{ + int type = geom->type; + size_t size = 0; + + switch (type) + { + case POINTTYPE: + size = assvg_point_size((LWPOINT*)geom, relative, precision); + break; + + case LINETYPE: + size = assvg_line_size((LWLINE*)geom, relative, precision); + break; + + case POLYGONTYPE: + size = assvg_polygon_size((LWPOLY*)geom, relative, precision); + break; + + case MULTIPOINTTYPE: + size = assvg_multipoint_size((LWMPOINT*)geom, relative, precision); + break; + + case MULTILINETYPE: + size = assvg_multiline_size((LWMLINE*)geom, relative, precision); + break; + + case MULTIPOLYGONTYPE: + size = assvg_multipolygon_size((LWMPOLY*)geom, relative, precision); + break; + + default: + lwerror("assvg_geom_size: '%s' geometry type not supported.", + lwtype_name(type)); + } + + return size; +} + + +static size_t +pointArray_svg_rel(POINTARRAY *pa, char *output, int close_ring, int precision) +{ + int i, end; + char *ptr; + char x[OUT_MAX_DIGS_DOUBLE+OUT_MAX_DOUBLE_PRECISION+1]; + char y[OUT_MAX_DIGS_DOUBLE+OUT_MAX_DOUBLE_PRECISION+1]; + POINT2D pt, lpt; + + ptr = output; + + if (close_ring) end = pa->npoints; + else end = pa->npoints - 1; + + /* Starting point */ + getPoint2d_p(pa, 0, &pt); + + if (fabs(pt.x) < OUT_MAX_DOUBLE) + sprintf(x, "%.*f", precision, pt.x); + else + sprintf(x, "%g", pt.x); + trim_trailing_zeros(x); + + if (fabs(pt.y) < OUT_MAX_DOUBLE) + sprintf(y, "%.*f", precision, fabs(pt.y) ? pt.y * -1 : pt.y); + else + sprintf(y, "%g", fabs(pt.y) ? pt.y * -1 : pt.y); + trim_trailing_zeros(y); + + ptr += sprintf(ptr,"%s %s l", x, y); + + /* All the following ones */ + for (i=1 ; i < end ; i++) + { + lpt = pt; + + getPoint2d_p(pa, i, &pt); + if (fabs(pt.x -lpt.x) < OUT_MAX_DOUBLE) + sprintf(x, "%.*f", precision, pt.x -lpt.x); + else + sprintf(x, "%g", pt.x -lpt.x); + trim_trailing_zeros(x); + + /* SVG Y axis is reversed, an no need to transform 0 into -0 */ + if (fabs(pt.y -lpt.y) < OUT_MAX_DOUBLE) + sprintf(y, "%.*f", precision, + fabs(pt.y -lpt.y) ? (pt.y - lpt.y) * -1: (pt.y - lpt.y)); + else + sprintf(y, "%g", + fabs(pt.y -lpt.y) ? (pt.y - lpt.y) * -1: (pt.y - lpt.y)); + trim_trailing_zeros(y); + + ptr += sprintf(ptr," %s %s", x, y); + } + + return (ptr-output); +} + + +/** + * Returns maximum size of rendered pointarray in bytes. + */ +static size_t +pointArray_svg_abs(POINTARRAY *pa, char *output, int close_ring, int precision) +{ + int i, end; + char *ptr; + char x[OUT_MAX_DIGS_DOUBLE+OUT_MAX_DOUBLE_PRECISION+1]; + char y[OUT_MAX_DIGS_DOUBLE+OUT_MAX_DOUBLE_PRECISION+1]; + POINT2D pt; + + ptr = output; + + if (close_ring) end = pa->npoints; + else end = pa->npoints - 1; + + for (i=0 ; i < end ; i++) + { + getPoint2d_p(pa, i, &pt); + + if (fabs(pt.x) < OUT_MAX_DOUBLE) + sprintf(x, "%.*f", precision, pt.x); + else + sprintf(x, "%g", pt.x); + trim_trailing_zeros(x); + + /* SVG Y axis is reversed, an no need to transform 0 into -0 */ + if (fabs(pt.y) < OUT_MAX_DOUBLE) + sprintf(y, "%.*f", precision, fabs(pt.y) ? pt.y * -1:pt.y); + else + sprintf(y, "%g", fabs(pt.y) ? pt.y * -1:pt.y); + trim_trailing_zeros(y); + + if (i == 1) ptr += sprintf(ptr, " L "); + else if (i) ptr += sprintf(ptr, " "); + ptr += sprintf(ptr,"%s %s", x, y); + } + + return (ptr-output); +} + + +/** + * Returns maximum size of rendered pointarray in bytes. + */ +static size_t +pointArray_svg_size(POINTARRAY *pa, int precision) +{ + return (OUT_MAX_DIGS_DOUBLE + precision + sizeof(" ")) + * 2 * pa->npoints + sizeof(" L "); +} diff -Nru postgis-1.5.3/liblwgeom/lwout_wkb.c postgis-2.0.1/liblwgeom/lwout_wkb.c --- postgis-1.5.3/liblwgeom/lwout_wkb.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwout_wkb.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,772 @@ +/********************************************************************** + * + * PostGIS - Spatial Types for PostgreSQL + * + * Copyright (C) 2009 Paul Ramsey + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include "liblwgeom_internal.h" +#include "lwgeom_log.h" + +static uint8_t* lwgeom_to_wkb_buf(const LWGEOM *geom, uint8_t *buf, uint8_t variant); +static size_t lwgeom_to_wkb_size(const LWGEOM *geom, uint8_t variant); + +/* +* Look-up table for hex writer +*/ +static char *hexchr = "0123456789ABCDEF"; + +char* hexbytes_from_bytes(uint8_t *bytes, size_t size) +{ + char *hex; + int i; + if ( ! bytes || ! size ) + { + lwerror("hexbutes_from_bytes: invalid input"); + return NULL; + } + hex = lwalloc(size * 2 + 1); + hex[2*size] = '\0'; + for( i = 0; i < size; i++ ) + { + /* Top four bits to 0-F */ + hex[2*i] = hexchr[bytes[i] >> 4]; + /* Bottom four bits to 0-F */ + hex[2*i+1] = hexchr[bytes[i] & 0x0F]; + } + return hex; +} + +/* +* Optional SRID +*/ +static int lwgeom_wkb_needs_srid(const LWGEOM *geom, uint8_t variant) +{ + /* Sub-components of collections inherit their SRID from the parent. + We force that behavior with the WKB_NO_SRID flag */ + if ( variant & WKB_NO_SRID ) + return LW_FALSE; + + /* We can only add an SRID if the geometry has one, and the + WKB form is extended */ + if ( (variant & WKB_EXTENDED) && lwgeom_has_srid(geom) ) + return LW_TRUE; + + /* Everything else doesn't get an SRID */ + return LW_FALSE; +} + +/* +* GeometryType +*/ +static uint32_t lwgeom_wkb_type(const LWGEOM *geom, uint8_t variant) +{ + uint32_t wkb_type = 0; + + switch ( geom->type ) + { + case POINTTYPE: + wkb_type = WKB_POINT_TYPE; + break; + case LINETYPE: + wkb_type = WKB_LINESTRING_TYPE; + break; + case POLYGONTYPE: + wkb_type = WKB_POLYGON_TYPE; + break; + case MULTIPOINTTYPE: + wkb_type = WKB_MULTIPOINT_TYPE; + break; + case MULTILINETYPE: + wkb_type = WKB_MULTILINESTRING_TYPE; + break; + case MULTIPOLYGONTYPE: + wkb_type = WKB_MULTIPOLYGON_TYPE; + break; + case COLLECTIONTYPE: + wkb_type = WKB_GEOMETRYCOLLECTION_TYPE; + break; + case CIRCSTRINGTYPE: + wkb_type = WKB_CIRCULARSTRING_TYPE; + break; + case COMPOUNDTYPE: + wkb_type = WKB_COMPOUNDCURVE_TYPE; + break; + case CURVEPOLYTYPE: + wkb_type = WKB_CURVEPOLYGON_TYPE; + break; + case MULTICURVETYPE: + wkb_type = WKB_MULTICURVE_TYPE; + break; + case MULTISURFACETYPE: + wkb_type = WKB_MULTISURFACE_TYPE; + break; + case POLYHEDRALSURFACETYPE: + wkb_type = WKB_POLYHEDRALSURFACE_TYPE; + break; + case TINTYPE: + wkb_type = WKB_TIN_TYPE; + break; + case TRIANGLETYPE: + wkb_type = WKB_TRIANGLE_TYPE; + break; + default: + lwerror("Unsupported geometry type: %s [%d]", + lwtype_name(geom->type), geom->type); + } + + if ( variant & WKB_EXTENDED ) + { + if ( FLAGS_GET_Z(geom->flags) ) + wkb_type |= WKBZOFFSET; + if ( FLAGS_GET_M(geom->flags) ) + wkb_type |= WKBMOFFSET; +/* if ( geom->srid != SRID_UNKNOWN && ! (variant & WKB_NO_SRID) ) */ + if ( lwgeom_wkb_needs_srid(geom, variant) ) + wkb_type |= WKBSRIDFLAG; + } + else if ( variant & WKB_ISO ) + { + /* Z types are in the 1000 range */ + if ( FLAGS_GET_Z(geom->flags) ) + wkb_type += 1000; + /* M types are in the 2000 range */ + if ( FLAGS_GET_M(geom->flags) ) + wkb_type += 2000; + /* ZM types are in the 1000 + 2000 = 3000 range, see above */ + } + return wkb_type; +} + +/* +* Endian +*/ +static uint8_t* endian_to_wkb_buf(uint8_t *buf, uint8_t variant) +{ + if ( variant & WKB_HEX ) + { + buf[0] = '0'; + buf[1] = ((variant & WKB_NDR) ? '1' : '0'); + return buf + 2; + } + else + { + buf[0] = ((variant & WKB_NDR) ? 1 : 0); + return buf + 1; + } +} + +/* +* SwapBytes? +*/ +static inline int wkb_swap_bytes(uint8_t variant) +{ + /* If requested variant matches machine arch, we don't have to swap! */ + if ( ((variant & WKB_NDR) && (getMachineEndian() == NDR)) || + ((! (variant & WKB_NDR)) && (getMachineEndian() == XDR)) ) + { + return LW_FALSE; + } + return LW_TRUE; +} + +/* +* Integer32 +*/ +static uint8_t* integer_to_wkb_buf(const int ival, uint8_t *buf, uint8_t variant) +{ + char *iptr = (char*)(&ival); + int i = 0; + + if ( sizeof(int) != WKB_INT_SIZE ) + { + lwerror("Machine int size is not %d bytes!", WKB_INT_SIZE); + } + LWDEBUGF(4, "Writing value '%u'", ival); + if ( variant & WKB_HEX ) + { + int swap = wkb_swap_bytes(variant); + /* Machine/request arch mismatch, so flip byte order */ + for ( i = 0; i < WKB_INT_SIZE; i++ ) + { + int j = (swap ? WKB_INT_SIZE - 1 - i : i); + uint8_t b = iptr[j]; + /* Top four bits to 0-F */ + buf[2*i] = hexchr[b >> 4]; + /* Bottom four bits to 0-F */ + buf[2*i+1] = hexchr[b & 0x0F]; + } + return buf + (2 * WKB_INT_SIZE); + } + else + { + /* Machine/request arch mismatch, so flip byte order */ + if ( wkb_swap_bytes(variant) ) + { + for ( i = 0; i < WKB_INT_SIZE; i++ ) + { + buf[i] = iptr[WKB_INT_SIZE - 1 - i]; + } + } + /* If machine arch and requested arch match, don't flip byte order */ + else + { + memcpy(buf, iptr, WKB_INT_SIZE); + } + return buf + WKB_INT_SIZE; + } +} + +/* +* Float64 +*/ +static uint8_t* double_to_wkb_buf(const double d, uint8_t *buf, uint8_t variant) +{ + char *dptr = (char*)(&d); + int i = 0; + + if ( sizeof(double) != WKB_DOUBLE_SIZE ) + { + lwerror("Machine double size is not %d bytes!", WKB_DOUBLE_SIZE); + } + + if ( variant & WKB_HEX ) + { + int swap = wkb_swap_bytes(variant); + /* Machine/request arch mismatch, so flip byte order */ + for ( i = 0; i < WKB_DOUBLE_SIZE; i++ ) + { + int j = (swap ? WKB_DOUBLE_SIZE - 1 - i : i); + uint8_t b = dptr[j]; + /* Top four bits to 0-F */ + buf[2*i] = hexchr[b >> 4]; + /* Bottom four bits to 0-F */ + buf[2*i+1] = hexchr[b & 0x0F]; + } + return buf + (2 * WKB_DOUBLE_SIZE); + } + else + { + /* Machine/request arch mismatch, so flip byte order */ + if ( wkb_swap_bytes(variant) ) + { + for ( i = 0; i < WKB_DOUBLE_SIZE; i++ ) + { + buf[i] = dptr[WKB_DOUBLE_SIZE - 1 - i]; + } + } + /* If machine arch and requested arch match, don't flip byte order */ + else + { + memcpy(buf, dptr, WKB_DOUBLE_SIZE); + } + return buf + WKB_DOUBLE_SIZE; + } +} + + +/* +* Empty +*/ +static size_t empty_to_wkb_size(const LWGEOM *geom, uint8_t variant) +{ + size_t size = WKB_BYTE_SIZE + WKB_INT_SIZE + WKB_INT_SIZE; + + if ( lwgeom_wkb_needs_srid(geom, variant) ) + size += WKB_INT_SIZE; + + return size; +} + +static uint8_t* empty_to_wkb_buf(const LWGEOM *geom, uint8_t *buf, uint8_t variant) +{ + uint32_t wkb_type = lwgeom_wkb_type(geom, variant); + + if ( geom->type == POINTTYPE ) + { + /* Change POINT to MULTIPOINT */ + wkb_type &= ~WKB_POINT_TYPE; /* clear POINT flag */ + wkb_type |= WKB_MULTIPOINT_TYPE; /* set MULTIPOINT flag */ + } + + /* Set the endian flag */ + buf = endian_to_wkb_buf(buf, variant); + + /* Set the geometry type */ + buf = integer_to_wkb_buf(wkb_type, buf, variant); + + /* Set the SRID if necessary */ + if ( lwgeom_wkb_needs_srid(geom, variant) ) + buf = integer_to_wkb_buf(geom->srid, buf, variant); + + /* Set nrings/npoints/ngeoms to zero */ + buf = integer_to_wkb_buf(0, buf, variant); + return buf; +} + +/* +* POINTARRAY +*/ +static size_t ptarray_to_wkb_size(const POINTARRAY *pa, uint8_t variant) +{ + int dims = 2; + size_t size = 0; + + if ( variant & (WKB_ISO | WKB_EXTENDED) ) + dims = FLAGS_NDIMS(pa->flags); + + /* Include the npoints if it's not a POINT type) */ + if ( ! ( variant & WKB_NO_NPOINTS ) ) + size += WKB_INT_SIZE; + + /* size of the double list */ + size += pa->npoints * dims * WKB_DOUBLE_SIZE; + + return size; +} + +static uint8_t* ptarray_to_wkb_buf(const POINTARRAY *pa, uint8_t *buf, uint8_t variant) +{ + int dims = 2; + int i, j; + double *dbl_ptr; + + /* SFSQL is always 2-d. Extended and ISO use all available dimensions */ + if ( (variant & WKB_ISO) || (variant & WKB_EXTENDED) ) + dims = FLAGS_NDIMS(pa->flags); + + /* Set the number of points (if it's not a POINT type) */ + if ( ! ( variant & WKB_NO_NPOINTS ) ) + buf = integer_to_wkb_buf(pa->npoints, buf, variant); + + /* Set the ordinates. */ + /* TODO: Ensure that getPoint_internal is always aligned so + this doesn't fail on RiSC architectures */ + /* TODO: Make this faster by bulk copying the coordinates when + the output endian/dims match the internal endian/dims */ + for ( i = 0; i < pa->npoints; i++ ) + { + LWDEBUGF(4, "Writing point #%d", i); + dbl_ptr = (double*)getPoint_internal(pa, i); + for ( j = 0; j < dims; j++ ) + { + LWDEBUGF(4, "Writing dimension #%d (buf = %p)", j, buf); + buf = double_to_wkb_buf(dbl_ptr[j], buf, variant); + } + } + LWDEBUGF(4, "Done (buf = %p)", buf); + return buf; +} + +/* +* POINT +*/ +static size_t lwpoint_to_wkb_size(const LWPOINT *pt, uint8_t variant) +{ + /* Endian flag + type number */ + size_t size = WKB_BYTE_SIZE + WKB_INT_SIZE; + + /* Extended WKB needs space for optional SRID integer */ + if ( lwgeom_wkb_needs_srid((LWGEOM*)pt, variant) ) + size += WKB_INT_SIZE; + + /* Points */ + size += ptarray_to_wkb_size(pt->point, variant | WKB_NO_NPOINTS); + return size; +} + +static uint8_t* lwpoint_to_wkb_buf(const LWPOINT *pt, uint8_t *buf, uint8_t variant) +{ + /* Set the endian flag */ + LWDEBUGF(4, "Entering function, buf = %p", buf); + buf = endian_to_wkb_buf(buf, variant); + LWDEBUGF(4, "Endian set, buf = %p", buf); + /* Set the geometry type */ + buf = integer_to_wkb_buf(lwgeom_wkb_type((LWGEOM*)pt, variant), buf, variant); + LWDEBUGF(4, "Type set, buf = %p", buf); + /* Set the optional SRID for extended variant */ + if ( lwgeom_wkb_needs_srid((LWGEOM*)pt, variant) ) + { + buf = integer_to_wkb_buf(pt->srid, buf, variant); + LWDEBUGF(4, "SRID set, buf = %p", buf); + } + /* Set the coordinates */ + buf = ptarray_to_wkb_buf(pt->point, buf, variant | WKB_NO_NPOINTS); + LWDEBUGF(4, "Pointarray set, buf = %p", buf); + return buf; +} + +/* +* LINESTRING, CIRCULARSTRING +*/ +static size_t lwline_to_wkb_size(const LWLINE *line, uint8_t variant) +{ + /* Endian flag + type number */ + size_t size = WKB_BYTE_SIZE + WKB_INT_SIZE; + + /* Extended WKB needs space for optional SRID integer */ + if ( lwgeom_wkb_needs_srid((LWGEOM*)line, variant) ) + size += WKB_INT_SIZE; + + /* Size of point array */ + size += ptarray_to_wkb_size(line->points, variant); + return size; +} + +static uint8_t* lwline_to_wkb_buf(const LWLINE *line, uint8_t *buf, uint8_t variant) +{ + /* Set the endian flag */ + buf = endian_to_wkb_buf(buf, variant); + /* Set the geometry type */ + buf = integer_to_wkb_buf(lwgeom_wkb_type((LWGEOM*)line, variant), buf, variant); + /* Set the optional SRID for extended variant */ + if ( lwgeom_wkb_needs_srid((LWGEOM*)line, variant) ) + buf = integer_to_wkb_buf(line->srid, buf, variant); + /* Set the coordinates */ + buf = ptarray_to_wkb_buf(line->points, buf, variant); + return buf; +} + +/* +* TRIANGLE +*/ +static size_t lwtriangle_to_wkb_size(const LWTRIANGLE *tri, uint8_t variant) +{ + /* endian flag + type number + number of rings */ + size_t size = WKB_BYTE_SIZE + WKB_INT_SIZE + WKB_INT_SIZE; + + /* Extended WKB needs space for optional SRID integer */ + if ( lwgeom_wkb_needs_srid((LWGEOM*)tri, variant) ) + size += WKB_INT_SIZE; + + /* How big is this point array? */ + size += ptarray_to_wkb_size(tri->points, variant); + + return size; +} + +static uint8_t* lwtriangle_to_wkb_buf(const LWTRIANGLE *tri, uint8_t *buf, uint8_t variant) +{ + /* Set the endian flag */ + buf = endian_to_wkb_buf(buf, variant); + + /* Set the geometry type */ + buf = integer_to_wkb_buf(lwgeom_wkb_type((LWGEOM*)tri, variant), buf, variant); + + /* Set the optional SRID for extended variant */ + if ( lwgeom_wkb_needs_srid((LWGEOM*)tri, variant) ) + buf = integer_to_wkb_buf(tri->srid, buf, variant); + + /* Set the number of rings (only one, it's a triangle, buddy) */ + buf = integer_to_wkb_buf(1, buf, variant); + + /* Write that ring */ + buf = ptarray_to_wkb_buf(tri->points, buf, variant); + + return buf; +} + +/* +* POLYGON +*/ +static size_t lwpoly_to_wkb_size(const LWPOLY *poly, uint8_t variant) +{ + /* endian flag + type number + number of rings */ + size_t size = WKB_BYTE_SIZE + WKB_INT_SIZE + WKB_INT_SIZE; + int i = 0; + + /* Extended WKB needs space for optional SRID integer */ + if ( lwgeom_wkb_needs_srid((LWGEOM*)poly, variant) ) + size += WKB_INT_SIZE; + + for ( i = 0; i < poly->nrings; i++ ) + { + /* Size of ring point array */ + size += ptarray_to_wkb_size(poly->rings[i], variant); + } + + return size; +} + +static uint8_t* lwpoly_to_wkb_buf(const LWPOLY *poly, uint8_t *buf, uint8_t variant) +{ + int i; + + /* Set the endian flag */ + buf = endian_to_wkb_buf(buf, variant); + /* Set the geometry type */ + buf = integer_to_wkb_buf(lwgeom_wkb_type((LWGEOM*)poly, variant), buf, variant); + /* Set the optional SRID for extended variant */ + if ( lwgeom_wkb_needs_srid((LWGEOM*)poly, variant) ) + buf = integer_to_wkb_buf(poly->srid, buf, variant); + /* Set the number of rings */ + buf = integer_to_wkb_buf(poly->nrings, buf, variant); + + for ( i = 0; i < poly->nrings; i++ ) + { + buf = ptarray_to_wkb_buf(poly->rings[i], buf, variant); + } + + return buf; +} + + +/* +* MULTIPOINT, MULTILINESTRING, MULTIPOLYGON, GEOMETRYCOLLECTION +* MULTICURVE, COMPOUNDCURVE, MULTISURFACE, CURVEPOLYGON, TIN, +* POLYHEDRALSURFACE +*/ +static size_t lwcollection_to_wkb_size(const LWCOLLECTION *col, uint8_t variant) +{ + /* Endian flag + type number + number of subgeoms */ + size_t size = WKB_BYTE_SIZE + WKB_INT_SIZE + WKB_INT_SIZE; + int i = 0; + + /* Extended WKB needs space for optional SRID integer */ + if ( lwgeom_wkb_needs_srid((LWGEOM*)col, variant) ) + size += WKB_INT_SIZE; + + for ( i = 0; i < col->ngeoms; i++ ) + { + /* size of subgeom */ + size += lwgeom_to_wkb_size((LWGEOM*)col->geoms[i], variant | WKB_NO_SRID); + } + + return size; +} + +static uint8_t* lwcollection_to_wkb_buf(const LWCOLLECTION *col, uint8_t *buf, uint8_t variant) +{ + int i; + + /* Set the endian flag */ + buf = endian_to_wkb_buf(buf, variant); + /* Set the geometry type */ + buf = integer_to_wkb_buf(lwgeom_wkb_type((LWGEOM*)col, variant), buf, variant); + /* Set the optional SRID for extended variant */ + if ( lwgeom_wkb_needs_srid((LWGEOM*)col, variant) ) + buf = integer_to_wkb_buf(col->srid, buf, variant); + /* Set the number of sub-geometries */ + buf = integer_to_wkb_buf(col->ngeoms, buf, variant); + + /* Write the sub-geometries. Sub-geometries do not get SRIDs, they + inherit from their parents. */ + for ( i = 0; i < col->ngeoms; i++ ) + { + buf = lwgeom_to_wkb_buf(col->geoms[i], buf, variant | WKB_NO_SRID); + } + + return buf; +} + +/* +* GEOMETRY +*/ +static size_t lwgeom_to_wkb_size(const LWGEOM *geom, uint8_t variant) +{ + size_t size = 0; + + if ( geom == NULL ) + return 0; + + /* Short circuit out empty geometries */ + if ( lwgeom_is_empty(geom) ) + { + return empty_to_wkb_size(geom, variant); + } + + switch ( geom->type ) + { + case POINTTYPE: + size += lwpoint_to_wkb_size((LWPOINT*)geom, variant); + break; + + /* LineString and CircularString both have points elements */ + case CIRCSTRINGTYPE: + case LINETYPE: + size += lwline_to_wkb_size((LWLINE*)geom, variant); + break; + + /* Polygon has nrings and rings elements */ + case POLYGONTYPE: + size += lwpoly_to_wkb_size((LWPOLY*)geom, variant); + break; + + /* Triangle has one ring of three points */ + case TRIANGLETYPE: + size += lwtriangle_to_wkb_size((LWTRIANGLE*)geom, variant); + break; + + /* All these Collection types have ngeoms and geoms elements */ + case MULTIPOINTTYPE: + case MULTILINETYPE: + case MULTIPOLYGONTYPE: + case COMPOUNDTYPE: + case CURVEPOLYTYPE: + case MULTICURVETYPE: + case MULTISURFACETYPE: + case COLLECTIONTYPE: + case POLYHEDRALSURFACETYPE: + case TINTYPE: + size += lwcollection_to_wkb_size((LWCOLLECTION*)geom, variant); + break; + + /* Unknown type! */ + default: + lwerror("Unsupported geometry type: %s [%d]", lwtype_name(geom->type), geom->type); + } + + return size; +} + +/* TODO handle the TRIANGLE type properly */ + +static uint8_t* lwgeom_to_wkb_buf(const LWGEOM *geom, uint8_t *buf, uint8_t variant) +{ + + if ( lwgeom_is_empty(geom) ) + return empty_to_wkb_buf(geom, buf, variant); + + switch ( geom->type ) + { + case POINTTYPE: + return lwpoint_to_wkb_buf((LWPOINT*)geom, buf, variant); + + /* LineString and CircularString both have 'points' elements */ + case CIRCSTRINGTYPE: + case LINETYPE: + return lwline_to_wkb_buf((LWLINE*)geom, buf, variant); + + /* Polygon has 'nrings' and 'rings' elements */ + case POLYGONTYPE: + return lwpoly_to_wkb_buf((LWPOLY*)geom, buf, variant); + + /* Triangle has one ring of three points */ + case TRIANGLETYPE: + return lwtriangle_to_wkb_buf((LWTRIANGLE*)geom, buf, variant); + + /* All these Collection types have 'ngeoms' and 'geoms' elements */ + case MULTIPOINTTYPE: + case MULTILINETYPE: + case MULTIPOLYGONTYPE: + case COMPOUNDTYPE: + case CURVEPOLYTYPE: + case MULTICURVETYPE: + case MULTISURFACETYPE: + case COLLECTIONTYPE: + case POLYHEDRALSURFACETYPE: + case TINTYPE: + return lwcollection_to_wkb_buf((LWCOLLECTION*)geom, buf, variant); + + /* Unknown type! */ + default: + lwerror("Unsupported geometry type: %s [%d]", lwtype_name(geom->type), geom->type); + } + /* Return value to keep compiler happy. */ + return 0; +} + +/** +* Convert LWGEOM to a char* in WKB format. Caller is responsible for freeing +* the returned array. +* +* @param variant. Unsigned bitmask value. Accepts one of: WKB_ISO, WKB_EXTENDED, WKB_SFSQL. +* Accepts any of: WKB_NDR, WKB_HEX. For example: Variant = ( WKB_ISO | WKB_NDR ) would +* return the little-endian ISO form of WKB. For Example: Variant = ( WKB_EXTENDED | WKB_HEX ) +* would return the big-endian extended form of WKB, as hex-encoded ASCII (the "canonical form"). +* @param size_out If supplied, will return the size of the returned memory segment, +* including the null terminator in the case of ASCII. +*/ +uint8_t* lwgeom_to_wkb(const LWGEOM *geom, uint8_t variant, size_t *size_out) +{ + size_t buf_size; + uint8_t *buf = NULL; + uint8_t *wkb_out = NULL; + + /* Initialize output size */ + if ( size_out ) *size_out = 0; + + if ( geom == NULL ) + { + LWDEBUG(4,"Cannot convert NULL into WKB."); + lwerror("Cannot convert NULL into WKB."); + return NULL; + } + + /* Calculate the required size of the output buffer */ + buf_size = lwgeom_to_wkb_size(geom, variant); + LWDEBUGF(4, "WKB output size: %d", buf_size); + + if ( buf_size == 0 ) + { + LWDEBUG(4,"Error calculating output WKB buffer size."); + lwerror("Error calculating output WKB buffer size."); + return NULL; + } + + /* Hex string takes twice as much space as binary + a null character */ + if ( variant & WKB_HEX ) + { + buf_size = 2 * buf_size + 1; + LWDEBUGF(4, "Hex WKB output size: %d", buf_size); + } + + /* If neither or both variants are specified, choose the native order */ + if ( ! (variant & WKB_NDR || variant & WKB_XDR) || + (variant & WKB_NDR && variant & WKB_XDR) ) + { + if ( getMachineEndian() == NDR ) + variant = variant | WKB_NDR; + else + variant = variant | WKB_XDR; + } + + /* Allocate the buffer */ + buf = lwalloc(buf_size); + + if ( buf == NULL ) + { + LWDEBUGF(4,"Unable to allocate %d bytes for WKB output buffer.", buf_size); + lwerror("Unable to allocate %d bytes for WKB output buffer.", buf_size); + return NULL; + } + + /* Retain a pointer to the front of the buffer for later */ + wkb_out = buf; + + /* Write the WKB into the output buffer */ + buf = lwgeom_to_wkb_buf(geom, buf, variant); + + /* Null the last byte if this is a hex output */ + if ( variant & WKB_HEX ) + { + *buf = '\0'; + buf++; + } + + LWDEBUGF(4,"buf (%p) - wkb_out (%p) = %d", buf, wkb_out, buf - wkb_out); + + /* The buffer pointer should now land at the end of the allocated buffer space. Let's check. */ + if ( buf_size != (buf - wkb_out) ) + { + LWDEBUG(4,"Output WKB is not the same size as the allocated buffer."); + lwerror("Output WKB is not the same size as the allocated buffer."); + lwfree(wkb_out); + return NULL; + } + + /* Report output size */ + if ( size_out ) *size_out = buf_size; + + return wkb_out; +} + +char* lwgeom_to_hexwkb(const LWGEOM *geom, uint8_t variant, size_t *size_out) +{ + return (char*)lwgeom_to_wkb(geom, variant | WKB_HEX, size_out); +} + diff -Nru postgis-1.5.3/liblwgeom/lwout_wkt.c postgis-2.0.1/liblwgeom/lwout_wkt.c --- postgis-1.5.3/liblwgeom/lwout_wkt.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwout_wkt.c 2012-03-22 16:55:18.000000000 +0000 @@ -0,0 +1,681 @@ +/********************************************************************** + * + * PostGIS - Spatial Types for PostgreSQL + * + * Copyright (C) 2009 Paul Ramsey + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include "liblwgeom_internal.h" +#include "lwgeom_log.h" +#include "stringbuffer.h" + +static void lwgeom_to_wkt_sb(const LWGEOM *geom, stringbuffer_t *sb, int precision, uint8_t variant); + + +/* +* ISO format uses both Z and M qualifiers. +* Extended format only uses an M qualifier for 3DM variants, where it is not +* clear what the third dimension represents. +* SFSQL format never has more than two dimensions, so no qualifiers. +*/ +static void dimension_qualifiers_to_wkt_sb(const LWGEOM *geom, stringbuffer_t *sb, uint8_t variant) +{ + + /* Extended WKT: POINTM(0 0 0) */ +#if 0 + if ( (variant & WKT_EXTENDED) && ! (variant & WKT_IS_CHILD) && FLAGS_GET_M(geom->flags) && (!FLAGS_GET_Z(geom->flags)) ) +#else + if ( (variant & WKT_EXTENDED) && FLAGS_GET_M(geom->flags) && (!FLAGS_GET_Z(geom->flags)) ) +#endif + { + stringbuffer_append(sb, "M"); /* "M" */ + return; + } + + /* ISO WKT: POINT ZM (0 0 0 0) */ + if ( (variant & WKT_ISO) && (FLAGS_NDIMS(geom->flags) > 2) ) + { + stringbuffer_append(sb, " "); + if ( FLAGS_GET_Z(geom->flags) ) + stringbuffer_append(sb, "Z"); + if ( FLAGS_GET_M(geom->flags) ) + stringbuffer_append(sb, "M"); + stringbuffer_append(sb, " "); + } +} + +/* +* Write an empty token out, padding with a space if +* necessary. +*/ +static void empty_to_wkt_sb(stringbuffer_t *sb) +{ + if ( ! strchr(" ,(", stringbuffer_lastchar(sb)) ) /* "EMPTY" */ + { + stringbuffer_append(sb, " "); + } + stringbuffer_append(sb, "EMPTY"); +} + +/* +* Point array is a list of coordinates. Depending on output mode, +* we may suppress some dimensions. ISO and Extended formats include +* all dimensions. Standard OGC output only includes X/Y coordinates. +*/ +static void ptarray_to_wkt_sb(const POINTARRAY *ptarray, stringbuffer_t *sb, int precision, uint8_t variant) +{ + /* OGC only includes X/Y */ + int dimensions = 2; + int i, j; + + /* ISO and extended formats include all dimensions */ + if ( variant & ( WKT_ISO | WKT_EXTENDED ) ) + dimensions = FLAGS_NDIMS(ptarray->flags); + + /* Opening paren? */ + if ( ! (variant & WKT_NO_PARENS) ) + stringbuffer_append(sb, "("); + + /* Digits and commas */ + for (i = 0; i < ptarray->npoints; i++) + { + uint8_t *p = getPoint_internal(ptarray, i); + double d; + + /* Commas before ever coord but the first */ + if ( i > 0 ) + stringbuffer_append(sb, ","); + + for (j = 0; j < dimensions; j++) + { + memcpy(&d, p + j * sizeof(double), sizeof(double)); + /* Spaces before every ordinate but the first */ + if ( j > 0 ) + stringbuffer_append(sb, " "); + stringbuffer_aprintf(sb, "%.*g", precision, d); + } + } + + /* Closing paren? */ + if ( ! (variant & WKT_NO_PARENS) ) + stringbuffer_append(sb, ")"); +} + +/* +* A four-dimensional point will have different outputs depending on variant. +* ISO: POINT ZM (0 0 0 0) +* Extended: POINT(0 0 0 0) +* OGC: POINT(0 0) +* A three-dimensional m-point will have different outputs too. +* ISO: POINT M (0 0 0) +* Extended: POINTM(0 0 0) +* OGC: POINT(0 0) +*/ +static void lwpoint_to_wkt_sb(const LWPOINT *pt, stringbuffer_t *sb, int precision, uint8_t variant) +{ + if ( ! (variant & WKT_NO_TYPE) ) + { + stringbuffer_append(sb, "POINT"); /* "POINT" */ + dimension_qualifiers_to_wkt_sb((LWGEOM*)pt, sb, variant); + } + + if ( (! pt->point) || (pt->point->npoints < 1) ) + { + empty_to_wkt_sb(sb); + return; + } + + ptarray_to_wkt_sb(pt->point, sb, precision, variant); +} + +/* +* LINESTRING(0 0 0, 1 1 1) +*/ +static void lwline_to_wkt_sb(const LWLINE *line, stringbuffer_t *sb, int precision, uint8_t variant) +{ + if ( ! (variant & WKT_NO_TYPE) ) + { + stringbuffer_append(sb, "LINESTRING"); /* "LINESTRING" */ + dimension_qualifiers_to_wkt_sb((LWGEOM*)line, sb, variant); + } + if ( (! line->points) || (line->points->npoints < 1) ) + { + empty_to_wkt_sb(sb); + return; + } + + ptarray_to_wkt_sb(line->points, sb, precision, variant); +} + +/* +* POLYGON(0 0 1, 1 0 1, 1 1 1, 0 1 1, 0 0 1) +*/ +static void lwpoly_to_wkt_sb(const LWPOLY *poly, stringbuffer_t *sb, int precision, uint8_t variant) +{ + int i = 0; + if ( ! (variant & WKT_NO_TYPE) ) + { + stringbuffer_append(sb, "POLYGON"); /* "POLYGON" */ + dimension_qualifiers_to_wkt_sb((LWGEOM*)poly, sb, variant); + } + if ( poly->nrings < 1 ) + { + empty_to_wkt_sb(sb); + return; + } + + stringbuffer_append(sb, "("); + for ( i = 0; i < poly->nrings; i++ ) + { + if ( i > 0 ) + stringbuffer_append(sb, ","); + ptarray_to_wkt_sb(poly->rings[i], sb, precision, variant); + } + stringbuffer_append(sb, ")"); +} + +/* +* CIRCULARSTRING +*/ +static void lwcircstring_to_wkt_sb(const LWCIRCSTRING *circ, stringbuffer_t *sb, int precision, uint8_t variant) +{ + if ( ! (variant & WKT_NO_TYPE) ) + { + stringbuffer_append(sb, "CIRCULARSTRING"); /* "CIRCULARSTRING" */ + dimension_qualifiers_to_wkt_sb((LWGEOM*)circ, sb, variant); + } + if ( (! circ->points) || (circ->points->npoints < 1) ) + { + empty_to_wkt_sb(sb); + return; + } + ptarray_to_wkt_sb(circ->points, sb, precision, variant); +} + + +/* +* Multi-points do not wrap their sub-members in parens, unlike other multi-geometries. +* MULTPOINT(0 0, 1 1) instead of MULTIPOINT((0 0),(1 1)) +*/ +static void lwmpoint_to_wkt_sb(const LWMPOINT *mpoint, stringbuffer_t *sb, int precision, uint8_t variant) +{ + int i = 0; + if ( ! (variant & WKT_NO_TYPE) ) + { + stringbuffer_append(sb, "MULTIPOINT"); /* "MULTIPOINT" */ + dimension_qualifiers_to_wkt_sb((LWGEOM*)mpoint, sb, variant); + } + if ( mpoint->ngeoms < 1 ) + { + empty_to_wkt_sb(sb); + return; + } + stringbuffer_append(sb, "("); + variant = variant | WKT_IS_CHILD; /* Inform the sub-geometries they are childre */ + for ( i = 0; i < mpoint->ngeoms; i++ ) + { + if ( i > 0 ) + stringbuffer_append(sb, ","); + /* We don't want type strings or parens on our subgeoms */ + lwpoint_to_wkt_sb(mpoint->geoms[i], sb, precision, variant | WKT_NO_PARENS | WKT_NO_TYPE ); + } + stringbuffer_append(sb, ")"); +} + +/* +* MULTILINESTRING +*/ +static void lwmline_to_wkt_sb(const LWMLINE *mline, stringbuffer_t *sb, int precision, uint8_t variant) +{ + int i = 0; + + if ( ! (variant & WKT_NO_TYPE) ) + { + stringbuffer_append(sb, "MULTILINESTRING"); /* "MULTILINESTRING" */ + dimension_qualifiers_to_wkt_sb((LWGEOM*)mline, sb, variant); + } + if ( mline->ngeoms < 1 ) + { + empty_to_wkt_sb(sb); + return; + } + + stringbuffer_append(sb, "("); + variant = variant | WKT_IS_CHILD; /* Inform the sub-geometries they are childre */ + for ( i = 0; i < mline->ngeoms; i++ ) + { + if ( i > 0 ) + stringbuffer_append(sb, ","); + /* We don't want type strings on our subgeoms */ + lwline_to_wkt_sb(mline->geoms[i], sb, precision, variant | WKT_NO_TYPE ); + } + stringbuffer_append(sb, ")"); +} + +/* +* MULTIPOLYGON +*/ +static void lwmpoly_to_wkt_sb(const LWMPOLY *mpoly, stringbuffer_t *sb, int precision, uint8_t variant) +{ + int i = 0; + + if ( ! (variant & WKT_NO_TYPE) ) + { + stringbuffer_append(sb, "MULTIPOLYGON"); /* "MULTIPOLYGON" */ + dimension_qualifiers_to_wkt_sb((LWGEOM*)mpoly, sb, variant); + } + if ( mpoly->ngeoms < 1 ) + { + empty_to_wkt_sb(sb); + return; + } + + stringbuffer_append(sb, "("); + variant = variant | WKT_IS_CHILD; /* Inform the sub-geometries they are childre */ + for ( i = 0; i < mpoly->ngeoms; i++ ) + { + if ( i > 0 ) + stringbuffer_append(sb, ","); + /* We don't want type strings on our subgeoms */ + lwpoly_to_wkt_sb(mpoly->geoms[i], sb, precision, variant | WKT_NO_TYPE ); + } + stringbuffer_append(sb, ")"); +} + +/* +* Compound curves provide type information for their curved sub-geometries +* but not their linestring sub-geometries. +* COMPOUNDCURVE((0 0, 1 1), CURVESTRING(1 1, 2 2, 3 3)) +*/ +static void lwcompound_to_wkt_sb(const LWCOMPOUND *comp, stringbuffer_t *sb, int precision, uint8_t variant) +{ + int i = 0; + + if ( ! (variant & WKT_NO_TYPE) ) + { + stringbuffer_append(sb, "COMPOUNDCURVE"); /* "COMPOUNDCURVE" */ + dimension_qualifiers_to_wkt_sb((LWGEOM*)comp, sb, variant); + } + if ( comp->ngeoms < 1 ) + { + empty_to_wkt_sb(sb); + return; + } + + stringbuffer_append(sb, "("); + variant = variant | WKT_IS_CHILD; /* Inform the sub-geometries they are childre */ + for ( i = 0; i < comp->ngeoms; i++ ) + { + int type = comp->geoms[i]->type; + if ( i > 0 ) + stringbuffer_append(sb, ","); + /* Linestring subgeoms don't get type identifiers */ + if ( type == LINETYPE ) + { + lwline_to_wkt_sb((LWLINE*)comp->geoms[i], sb, precision, variant | WKT_NO_TYPE ); + } + /* But circstring subgeoms *do* get type identifiers */ + else if ( type == CIRCSTRINGTYPE ) + { + lwcircstring_to_wkt_sb((LWCIRCSTRING*)comp->geoms[i], sb, precision, variant ); + } + else + { + lwerror("lwcompound_to_wkt_sb: Unknown type recieved %d - %s", type, lwtype_name(type)); + } + } + stringbuffer_append(sb, ")"); +} + +/* +* Curve polygons provide type information for their curved rings +* but not their linestring rings. +* CURVEPOLYGON((0 0, 1 1, 0 1, 0 0), CURVESTRING(0 0, 1 1, 0 1, 0.5 1, 0 0)) +*/ +static void lwcurvepoly_to_wkt_sb(const LWCURVEPOLY *cpoly, stringbuffer_t *sb, int precision, uint8_t variant) +{ + int i = 0; + + if ( ! (variant & WKT_NO_TYPE) ) + { + stringbuffer_append(sb, "CURVEPOLYGON"); /* "CURVEPOLYGON" */ + dimension_qualifiers_to_wkt_sb((LWGEOM*)cpoly, sb, variant); + } + if ( cpoly->nrings < 1 ) + { + empty_to_wkt_sb(sb); + return; + } + stringbuffer_append(sb, "("); + variant = variant | WKT_IS_CHILD; /* Inform the sub-geometries they are childre */ + for ( i = 0; i < cpoly->nrings; i++ ) + { + int type = cpoly->rings[i]->type; + if ( i > 0 ) + stringbuffer_append(sb, ","); + switch (type) + { + case LINETYPE: + /* Linestring subgeoms don't get type identifiers */ + lwline_to_wkt_sb((LWLINE*)cpoly->rings[i], sb, precision, variant | WKT_NO_TYPE ); + break; + case CIRCSTRINGTYPE: + /* But circstring subgeoms *do* get type identifiers */ + lwcircstring_to_wkt_sb((LWCIRCSTRING*)cpoly->rings[i], sb, precision, variant ); + break; + case COMPOUNDTYPE: + /* And compoundcurve subgeoms *do* get type identifiers */ + lwcompound_to_wkt_sb((LWCOMPOUND*)cpoly->rings[i], sb, precision, variant ); + break; + default: + lwerror("lwcurvepoly_to_wkt_sb: Unknown type recieved %d - %s", type, lwtype_name(type)); + } + } + stringbuffer_append(sb, ")"); +} + + +/* +* Multi-curves provide type information for their curved sub-geometries +* but not their linear sub-geometries. +* MULTICURVE((0 0, 1 1), CURVESTRING(0 0, 1 1, 2 2)) +*/ +static void lwmcurve_to_wkt_sb(const LWMCURVE *mcurv, stringbuffer_t *sb, int precision, uint8_t variant) +{ + int i = 0; + + if ( ! (variant & WKT_NO_TYPE) ) + { + stringbuffer_append(sb, "MULTICURVE"); /* "MULTICURVE" */ + dimension_qualifiers_to_wkt_sb((LWGEOM*)mcurv, sb, variant); + } + if ( mcurv->ngeoms < 1 ) + { + empty_to_wkt_sb(sb); + return; + } + stringbuffer_append(sb, "("); + variant = variant | WKT_IS_CHILD; /* Inform the sub-geometries they are childre */ + for ( i = 0; i < mcurv->ngeoms; i++ ) + { + int type = mcurv->geoms[i]->type; + if ( i > 0 ) + stringbuffer_append(sb, ","); + switch (type) + { + case LINETYPE: + /* Linestring subgeoms don't get type identifiers */ + lwline_to_wkt_sb((LWLINE*)mcurv->geoms[i], sb, precision, variant | WKT_NO_TYPE ); + break; + case CIRCSTRINGTYPE: + /* But circstring subgeoms *do* get type identifiers */ + lwcircstring_to_wkt_sb((LWCIRCSTRING*)mcurv->geoms[i], sb, precision, variant ); + break; + case COMPOUNDTYPE: + /* And compoundcurve subgeoms *do* get type identifiers */ + lwcompound_to_wkt_sb((LWCOMPOUND*)mcurv->geoms[i], sb, precision, variant ); + break; + default: + lwerror("lwmcurve_to_wkt_sb: Unknown type recieved %d - %s", type, lwtype_name(type)); + } + } + stringbuffer_append(sb, ")"); +} + + +/* +* Multi-surfaces provide type information for their curved sub-geometries +* but not their linear sub-geometries. +* MULTISURFACE(((0 0, 1 1, 1 0, 0 0)), CURVEPOLYGON(CURVESTRING(0 0, 1 1, 2 2, 0 1, 0 0))) +*/ +static void lwmsurface_to_wkt_sb(const LWMSURFACE *msurf, stringbuffer_t *sb, int precision, uint8_t variant) +{ + int i = 0; + + if ( ! (variant & WKT_NO_TYPE) ) + { + stringbuffer_append(sb, "MULTISURFACE"); /* "MULTISURFACE" */ + dimension_qualifiers_to_wkt_sb((LWGEOM*)msurf, sb, variant); + } + if ( msurf->ngeoms < 1 ) + { + empty_to_wkt_sb(sb); + return; + } + stringbuffer_append(sb, "("); + variant = variant | WKT_IS_CHILD; /* Inform the sub-geometries they are childre */ + for ( i = 0; i < msurf->ngeoms; i++ ) + { + int type = msurf->geoms[i]->type; + if ( i > 0 ) + stringbuffer_append(sb, ","); + switch (type) + { + case POLYGONTYPE: + /* Linestring subgeoms don't get type identifiers */ + lwpoly_to_wkt_sb((LWPOLY*)msurf->geoms[i], sb, precision, variant | WKT_NO_TYPE ); + break; + case CURVEPOLYTYPE: + /* But circstring subgeoms *do* get type identifiers */ + lwcurvepoly_to_wkt_sb((LWCURVEPOLY*)msurf->geoms[i], sb, precision, variant); + break; + default: + lwerror("lwmsurface_to_wkt_sb: Unknown type recieved %d - %s", type, lwtype_name(type)); + } + } + stringbuffer_append(sb, ")"); +} + +/* +* Geometry collections provide type information for all their curved sub-geometries +* but not their linear sub-geometries. +* GEOMETRYCOLLECTION(POLYGON((0 0, 1 1, 1 0, 0 0)), CURVEPOLYGON(CURVESTRING(0 0, 1 1, 2 2, 0 1, 0 0))) +*/ +static void lwcollection_to_wkt_sb(const LWCOLLECTION *collection, stringbuffer_t *sb, int precision, uint8_t variant) +{ + int i = 0; + + if ( ! (variant & WKT_NO_TYPE) ) + { + stringbuffer_append(sb, "GEOMETRYCOLLECTION"); /* "GEOMETRYCOLLECTION" */ + dimension_qualifiers_to_wkt_sb((LWGEOM*)collection, sb, variant); + } + if ( collection->ngeoms < 1 ) + { + empty_to_wkt_sb(sb); + return; + } + stringbuffer_append(sb, "("); + variant = variant | WKT_IS_CHILD; /* Inform the sub-geometries they are children */ + for ( i = 0; i < collection->ngeoms; i++ ) + { + if ( i > 0 ) + stringbuffer_append(sb, ","); + lwgeom_to_wkt_sb((LWGEOM*)collection->geoms[i], sb, precision, variant ); + } + stringbuffer_append(sb, ")"); +} + +/* +* TRIANGLE +*/ +static void lwtriangle_to_wkt_sb(const LWTRIANGLE *tri, stringbuffer_t *sb, int precision, uint8_t variant) +{ + if ( ! (variant & WKT_NO_TYPE) ) + { + stringbuffer_append(sb, "TRIANGLE"); /* "TRIANGLE" */ + dimension_qualifiers_to_wkt_sb((LWGEOM*)tri, sb, variant); + } + if ( (! tri->points) || (tri->points->npoints < 1) ) + { + empty_to_wkt_sb(sb); + return; + } + + stringbuffer_append(sb, "("); /* Triangles have extraneous brackets */ + ptarray_to_wkt_sb(tri->points, sb, precision, variant); + stringbuffer_append(sb, ")"); +} + +/* +* TIN +*/ +static void lwtin_to_wkt_sb(const LWTIN *tin, stringbuffer_t *sb, int precision, uint8_t variant) +{ + int i = 0; + + if ( ! (variant & WKT_NO_TYPE) ) + { + stringbuffer_append(sb, "TIN"); /* "TIN" */ + dimension_qualifiers_to_wkt_sb((LWGEOM*)tin, sb, variant); + } + if ( tin->ngeoms < 1 ) + { + empty_to_wkt_sb(sb); + return; + } + + stringbuffer_append(sb, "("); + for ( i = 0; i < tin->ngeoms; i++ ) + { + if ( i > 0 ) + stringbuffer_append(sb, ","); + /* We don't want type strings on our subgeoms */ + lwtriangle_to_wkt_sb(tin->geoms[i], sb, precision, variant | WKT_NO_TYPE ); + } + stringbuffer_append(sb, ")"); +} + +/* +* POLYHEDRALSURFACE +*/ +static void lwpsurface_to_wkt_sb(const LWPSURFACE *psurf, stringbuffer_t *sb, int precision, uint8_t variant) +{ + int i = 0; + + if ( ! (variant & WKT_NO_TYPE) ) + { + stringbuffer_append(sb, "POLYHEDRALSURFACE"); /* "POLYHEDRALSURFACE" */ + dimension_qualifiers_to_wkt_sb((LWGEOM*)psurf, sb, variant); + } + if ( psurf->ngeoms < 1 ) + { + empty_to_wkt_sb(sb); + return; + } + + variant = variant | WKT_IS_CHILD; /* Inform the sub-geometries they are childre */ + + stringbuffer_append(sb, "("); + for ( i = 0; i < psurf->ngeoms; i++ ) + { + if ( i > 0 ) + stringbuffer_append(sb, ","); + /* We don't want type strings on our subgeoms */ + lwpoly_to_wkt_sb(psurf->geoms[i], sb, precision, variant | WKT_NO_TYPE ); + } + stringbuffer_append(sb, ")"); +} + + +/* +* Generic GEOMETRY +*/ +static void lwgeom_to_wkt_sb(const LWGEOM *geom, stringbuffer_t *sb, int precision, uint8_t variant) +{ + LWDEBUGF(4, "lwgeom_to_wkt_sb: type %s, hasz %d, hasm %d", + lwtype_name(geom->type), (geom->type), + FLAGS_GET_Z(geom->flags)?1:0, FLAGS_GET_M(geom->flags)?1:0); + + switch (geom->type) + { + case POINTTYPE: + lwpoint_to_wkt_sb((LWPOINT*)geom, sb, precision, variant); + break; + case LINETYPE: + lwline_to_wkt_sb((LWLINE*)geom, sb, precision, variant); + break; + case POLYGONTYPE: + lwpoly_to_wkt_sb((LWPOLY*)geom, sb, precision, variant); + break; + case MULTIPOINTTYPE: + lwmpoint_to_wkt_sb((LWMPOINT*)geom, sb, precision, variant); + break; + case MULTILINETYPE: + lwmline_to_wkt_sb((LWMLINE*)geom, sb, precision, variant); + break; + case MULTIPOLYGONTYPE: + lwmpoly_to_wkt_sb((LWMPOLY*)geom, sb, precision, variant); + break; + case COLLECTIONTYPE: + lwcollection_to_wkt_sb((LWCOLLECTION*)geom, sb, precision, variant); + break; + case CIRCSTRINGTYPE: + lwcircstring_to_wkt_sb((LWCIRCSTRING*)geom, sb, precision, variant); + break; + case COMPOUNDTYPE: + lwcompound_to_wkt_sb((LWCOMPOUND*)geom, sb, precision, variant); + break; + case CURVEPOLYTYPE: + lwcurvepoly_to_wkt_sb((LWCURVEPOLY*)geom, sb, precision, variant); + break; + case MULTICURVETYPE: + lwmcurve_to_wkt_sb((LWMCURVE*)geom, sb, precision, variant); + break; + case MULTISURFACETYPE: + lwmsurface_to_wkt_sb((LWMSURFACE*)geom, sb, precision, variant); + break; + case TRIANGLETYPE: + lwtriangle_to_wkt_sb((LWTRIANGLE*)geom, sb, precision, variant); + break; + case TINTYPE: + lwtin_to_wkt_sb((LWTIN*)geom, sb, precision, variant); + break; + case POLYHEDRALSURFACETYPE: + lwpsurface_to_wkt_sb((LWPSURFACE*)geom, sb, precision, variant); + break; + default: + lwerror("lwgeom_to_wkt_sb: Type %d - %s unsupported.", + geom->type, lwtype_name(geom->type)); + } +} + +/** +* WKT emitter function. Allocates a new *char and fills it with the WKT +* representation. If size_out is not NULL, it will be set to the size of the +* allocated *char. +* +* @param variant Bitmasked value, accepts one of WKT_ISO, WKT_SFSQL, WKT_EXTENDED. +* @param precision Number of significant digits in the output doubles. +* @param size_out If supplied, will return the size of the returned string, +* including the null terminator. +*/ +char* lwgeom_to_wkt(const LWGEOM *geom, uint8_t variant, int precision, size_t *size_out) +{ + stringbuffer_t *sb; + char *str = NULL; + if ( geom == NULL ) + return NULL; + sb = stringbuffer_create(); + /* Extended mode starts with an "SRID=" section for geoms that have one */ + if ( (variant & WKT_EXTENDED) && lwgeom_has_srid(geom) ) + { + stringbuffer_aprintf(sb, "SRID=%d;", geom->srid); + } + lwgeom_to_wkt_sb(geom, sb, precision, variant); + if ( stringbuffer_getstring(sb) == NULL ) + { + lwerror("Uh oh"); + return NULL; + } + str = stringbuffer_getstringcopy(sb); + if ( size_out ) + *size_out = stringbuffer_getlength(sb) + 1; + stringbuffer_destroy(sb); + return str; +} + diff -Nru postgis-1.5.3/liblwgeom/lwout_x3d.c postgis-2.0.1/liblwgeom/lwout_x3d.c --- postgis-1.5.3/liblwgeom/lwout_x3d.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwout_x3d.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,868 @@ +/********************************************************************** + * $Id: lwout_x3d.c 9324 2012-02-27 22:08:12Z pramsey $ + * + * PostGIS - Spatial Types for PostgreSQL + * http://www.postgis.org + * adapted from lwout_asgml.c + * Copyright 2011 Arrival 3D + * Regina Obe with input from Dave Arendash + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ +/** +* @file X3D output routines. +* +**********************************************************************/ + + +#include +#include "liblwgeom_internal.h" + +/** defid is the id of the coordinate can be used to hold other elements DEF='abc' transform='' etc. **/ +static size_t asx3d3_point_size(const LWPOINT *point, char *srs, int precision, int opts, const char *defid); +static char *asx3d3_point(const LWPOINT *point, char *srs, int precision, int opts, const char *defid); +static size_t asx3d3_line_size(const LWLINE *line, char *srs, int precision, int opts, const char *defid); +static char *asx3d3_line(const LWLINE *line, char *srs, int precision, int opts, const char *defid); +static size_t asx3d3_poly_size(const LWPOLY *poly, char *srs, int precision, int opts, const char *defid); +static size_t asx3d3_triangle_size(const LWTRIANGLE *triangle, char *srs, int precision, int opts, const char *defid); +static char *asx3d3_triangle(const LWTRIANGLE *triangle, char *srs, int precision, int opts, const char *defid); +static size_t asx3d3_multi_size(const LWCOLLECTION *col, char *srs, int precision, int opts, const char *defid); +static char *asx3d3_multi(const LWCOLLECTION *col, char *srs, int precision, int opts, const char *defid); +static char *asx3d3_psurface(const LWPSURFACE *psur, char *srs, int precision, int opts, const char *defid); +static char *asx3d3_tin(const LWTIN *tin, char *srs, int precision, int opts, const char *defid); +static size_t asx3d3_collection_size(const LWCOLLECTION *col, char *srs, int precision, int opts, const char *defid); +static char *asx3d3_collection(const LWCOLLECTION *col, char *srs, int precision, int opts, const char *defid); +static size_t pointArray_toX3D3(POINTARRAY *pa, char *buf, int precision, int opts, int is_closed); + +static size_t pointArray_X3Dsize(POINTARRAY *pa, int precision); + + +/* + * VERSION X3D 3.0.2 http://www.web3d.org/specifications/x3d-3.0.dtd + */ + + +/* takes a GEOMETRY and returns an X3D representation */ +extern char * +lwgeom_to_x3d3(const LWGEOM *geom, char *srs, int precision, int opts, const char *defid) +{ + int type = geom->type; + + switch (type) + { + case POINTTYPE: + return asx3d3_point((LWPOINT*)geom, srs, precision, opts, defid); + + case LINETYPE: + return asx3d3_line((LWLINE*)geom, srs, precision, opts, defid); + + case POLYGONTYPE: + { + /** We might change this later, but putting a polygon in an indexed face set + * seems like the simplest way to go so treat just like a mulitpolygon + */ + LWCOLLECTION *tmp = (LWCOLLECTION*)lwgeom_as_multi(geom); + char *ret = asx3d3_multi(tmp, srs, precision, opts, defid); + lwcollection_free(tmp); + return ret; + } + + case TRIANGLETYPE: + return asx3d3_triangle((LWTRIANGLE*)geom, srs, precision, opts, defid); + + case MULTIPOINTTYPE: + case MULTILINETYPE: + case MULTIPOLYGONTYPE: + return asx3d3_multi((LWCOLLECTION*)geom, srs, precision, opts, defid); + + case POLYHEDRALSURFACETYPE: + return asx3d3_psurface((LWPSURFACE*)geom, srs, precision, opts, defid); + + case TINTYPE: + return asx3d3_tin((LWTIN*)geom, srs, precision, opts, defid); + + case COLLECTIONTYPE: + return asx3d3_collection((LWCOLLECTION*)geom, srs, precision, opts, defid); + + default: + lwerror("lwgeom_to_x3d3: '%s' geometry type not supported", lwtype_name(type)); + return NULL; + } +} + +static size_t +asx3d3_point_size(const LWPOINT *point, char *srs, int precision, int opts, const char *defid) +{ + int size; + //size_t defidlen = strlen(defid); + + size = pointArray_X3Dsize(point->point, precision); + //size += ( sizeof("/") + (defidlen*2) ) * 2; + //if (srs) size += strlen(srs) + sizeof(" srsName=.."); + return size; +} + +static size_t +asx3d3_point_buf(const LWPOINT *point, char *srs, char *output, int precision, int opts, const char *defid) +{ + char *ptr = output; + //int dimension=2; + + //if (FLAGS_GET_Z(point->flags)) dimension = 3; + /* if ( srs ) + { + ptr += sprintf(ptr, "<%sPoint srsName=\"%s\">", defid, srs); + } + else*/ + //ptr += sprintf(ptr, "%s", defid); + + //ptr += sprintf(ptr, "<%spos>", defid); + ptr += pointArray_toX3D3(point->point, ptr, precision, opts, 0); + //ptr += sprintf(ptr, "", defid, defid); + + return (ptr-output); +} + +static char * +asx3d3_point(const LWPOINT *point, char *srs, int precision, int opts, const char *defid) +{ + char *output; + int size; + + size = asx3d3_point_size(point, srs, precision, opts, defid); + output = lwalloc(size); + asx3d3_point_buf(point, srs, output, precision, opts, defid); + return output; +} + + +static size_t +asx3d3_line_size(const LWLINE *line, char *srs, int precision, int opts, const char *defid) +{ + int size; + size_t defidlen = strlen(defid); + + size = pointArray_X3Dsize(line->points, precision)*2; + + size += ( + sizeof("") + defidlen + ) * 2; + + //if (srs) size += strlen(srs) + sizeof(" srsName=.."); + return size; +} + +static size_t +asx3d3_line_buf(const LWLINE *line, char *srs, char *output, int precision, int opts, const char *defid) +{ + char *ptr=output; + //int dimension=2; + POINTARRAY *pa; + + + //if (FLAGS_GET_Z(line->flags)) dimension = 3; + + pa = line->points; + ptr += sprintf(ptr, "", defid, pa->npoints); + + + ptr += sprintf(ptr, ""); + + ptr += sprintf(ptr, ""); + return (ptr-output); +} + +static size_t +asx3d3_line_coords(const LWLINE *line, char *output, int precision, int opts) +{ + char *ptr=output; + //ptr += sprintf(ptr, ""); + ptr += pointArray_toX3D3(line->points, ptr, precision, opts, lwline_is_closed(line)); + return (ptr-output); +} + +/* Calculate the coordIndex property of the IndexedLineSet for the multilinestring */ +static size_t +asx3d3_mline_coordindex(const LWMLINE *mgeom, char *output) +{ + char *ptr=output; + LWLINE *geom; + int i, j, k, si; + POINTARRAY *pa; + int np; + + j = 0; + for (i=0; i < mgeom->ngeoms; i++) + { + geom = (LWLINE *) mgeom->geoms[i]; + pa = geom->points; + np = pa->npoints; + si = j; //start index of first point of linestring + for (k=0; k < np ; k++) + { + if (k) + { + ptr += sprintf(ptr, " "); + } + /** if the linestring is closed, we put the start point index + * for the last vertex to denote use first point + * and don't increment the index **/ + if (!lwline_is_closed(geom) || k < (np -1) ) + { + ptr += sprintf(ptr, "%d", j); + j += 1; + } + else + { + ptr += sprintf(ptr,"%d", si); + } + } + if (i < (mgeom->ngeoms - 1) ) + { + ptr += sprintf(ptr, " -1 "); //separator for each linestring + } + } + return (ptr-output); +} + +/* Calculate the coordIndex property of the IndexedLineSet for a multipolygon + This is not ideal -- would be really nice to just share this function with psurf, + but I'm not smart enough to do that yet*/ +static size_t +asx3d3_mpoly_coordindex(const LWMPOLY *psur, char *output) +{ + char *ptr=output; + LWPOLY *patch; + int i, j, k, l; + int np; + j = 0; + for (i=0; ingeoms; i++) + { + patch = (LWPOLY *) psur->geoms[i]; + for (l=0; l < patch->nrings; l++) + { + np = patch->rings[l]->npoints - 1; + for (k=0; k < np ; k++) + { + if (k) + { + ptr += sprintf(ptr, " "); + } + ptr += sprintf(ptr, "%d", (j + k)); + } + j += k; + if (l < (patch->nrings - 1) ) + { + /** @todo TODO: Decide the best way to render holes + * Evidentally according to my X3D expert the X3D consortium doesn't really + * support holes and it's an issue of argument among many that feel it should. He thinks CAD x3d extensions to spec might. + * What he has done and others developing X3D exports to simulate a hole is to cut around it. + * So if you have a donut, you would cut it into half and have 2 solid polygons. Not really sure the best way to handle this. + * For now will leave it as polygons stacked on top of each other -- which is what we are doing here and perhaps an option + * to color differently. It's not ideal but the alternative sounds complicated. + **/ + ptr += sprintf(ptr, " -1 "); //separator for each inner ring. Ideally we should probably triangulate and cut around as others do + } + } + if (i < (psur->ngeoms - 1) ) + { + ptr += sprintf(ptr, " -1 "); //separator for each subgeom + } + } + return (ptr-output); +} + +/** Return the linestring as an X3D LineSet */ +static char * +asx3d3_line(const LWLINE *line, char *srs, int precision, int opts, const char *defid) +{ + char *output; + int size; + + size = sizeof("") + asx3d3_line_size(line, srs, precision, opts, defid); + output = lwalloc(size); + asx3d3_line_buf(line, srs, output, precision, opts, defid); + return output; +} + +/** Compute the string space needed for the IndexedFaceSet representation of the polygon **/ +static size_t +asx3d3_poly_size(const LWPOLY *poly, char *srs, int precision, int opts, const char *defid) +{ + size_t size; + size_t defidlen = strlen(defid); + int i; + + size = ( sizeof("") + (defidlen*3) ) * 2 + 6 * (poly->nrings - 1); + + for (i=0; inrings; i++) + size += pointArray_X3Dsize(poly->rings[i], precision); + + return size; +} + +/** Compute the X3D coordinates of the polygon **/ +static size_t +asx3d3_poly_buf(const LWPOLY *poly, char *srs, char *output, int precision, int opts, int is_patch, const char *defid) +{ + int i; + char *ptr=output; + int dimension=2; + + if (FLAGS_GET_Z(poly->flags)) + dimension = 3; + ptr += pointArray_toX3D3(poly->rings[0], ptr, precision, opts, 1); + for (i=1; inrings; i++) + { + ptr += sprintf(ptr, " "); //inner ring points start + ptr += pointArray_toX3D3(poly->rings[i], ptr, precision, opts,1); + } + return (ptr-output); +} + +static size_t +asx3d3_triangle_size(const LWTRIANGLE *triangle, char *srs, int precision, int opts, const char *defid) +{ + size_t size; + size_t defidlen = strlen(defid); + + /** 6 for the 3 sides and space to separate each side **/ + size = sizeof("") + defidlen + 6; + size += pointArray_X3Dsize(triangle->points, precision); + + return size; +} + +static size_t +asx3d3_triangle_buf(const LWTRIANGLE *triangle, char *srs, char *output, int precision, int opts, const char *defid) +{ + char *ptr=output; + ptr += pointArray_toX3D3(triangle->points, ptr, precision, opts, 1); + + return (ptr-output); +} + +static char * +asx3d3_triangle(const LWTRIANGLE *triangle, char *srs, int precision, int opts, const char *defid) +{ + char *output; + int size; + + size = asx3d3_triangle_size(triangle, srs, precision, opts, defid); + output = lwalloc(size); + asx3d3_triangle_buf(triangle, srs, output, precision, opts, defid); + return output; +} + + +/** + * Compute max size required for X3D version of this + * inspected geometry. Will recurse when needed. + * Don't call this with single-geoms inspected. + */ +static size_t +asx3d3_multi_size(const LWCOLLECTION *col, char *srs, int precision, int opts, const char *defid) +{ + int i; + size_t size; + size_t defidlen = strlen(defid); + LWGEOM *subgeom; + + /* the longest possible multi version needs to hold DEF=defid and coordinate breakout */ + size = sizeof("") + defidlen; + + //if ( srs ) size += strlen(srs) + sizeof(" srsName=.."); + + for (i=0; ingeoms; i++) + { + subgeom = col->geoms[i]; + if (subgeom->type == POINTTYPE) + { + //size += ( sizeof("point=''") + defidlen ) * 2; + size += asx3d3_point_size((LWPOINT*)subgeom, 0, precision, opts, defid); + } + else if (subgeom->type == LINETYPE) + { + //size += ( sizeof("/") + defidlen ) * 2; + size += asx3d3_line_size((LWLINE*)subgeom, 0, precision, opts, defid); + } + else if (subgeom->type == POLYGONTYPE) + { + //size += ( sizeof("/") + defidlen ) * 2; + size += asx3d3_poly_size((LWPOLY*)subgeom, 0, precision, opts, defid); + } + } + + return size; +} + +/* + * Don't call this with single-geoms inspected! + */ +static size_t +asx3d3_multi_buf(const LWCOLLECTION *col, char *srs, char *output, int precision, int opts, const char *defid) +{ + char *ptr, *x3dtype; + int i; + int dimension=2; + + if (FLAGS_GET_Z(col->flags)) dimension = 3; + LWGEOM *subgeom; + ptr = output; + x3dtype=""; + + + switch (col->type) + { + case MULTIPOINTTYPE: + x3dtype = "PointSet"; + if ( dimension == 2 ){ /** Use Polypoint2D instead **/ + x3dtype = "Polypoint2D"; + ptr += sprintf(ptr, "<%s %s point='", x3dtype, defid); + } + else { + ptr += sprintf(ptr, "<%s %s>", x3dtype, defid); + } + break; + case MULTILINETYPE: + x3dtype = "IndexedLineSet"; + ptr += sprintf(ptr, "<%s %s coordIndex='", x3dtype, defid); + ptr += asx3d3_mline_coordindex((const LWMLINE *)col, ptr); + ptr += sprintf(ptr, "'>"); + break; + case MULTIPOLYGONTYPE: + x3dtype = "IndexedFaceSet"; + ptr += sprintf(ptr, "<%s %s coordIndex='", x3dtype, defid); + ptr += asx3d3_mpoly_coordindex((const LWMPOLY *)col, ptr); + ptr += sprintf(ptr, "'>"); + break; + default: + lwerror("asx3d3_multi_buf: '%s' geometry type not supported", lwtype_name(col->type)); + return 0; + } + if (dimension == 3){ + ptr += sprintf(ptr, "", x3dtype); + } + else { ptr += sprintf(ptr, "' />"); } + return (ptr-output); +} + +/* + * Don't call this with single-geoms inspected! + */ +static char * +asx3d3_multi(const LWCOLLECTION *col, char *srs, int precision, int opts, const char *defid) +{ + char *x3d; + size_t size; + + size = asx3d3_multi_size(col, srs, precision, opts, defid); + x3d = lwalloc(size); + asx3d3_multi_buf(col, srs, x3d, precision, opts, defid); + return x3d; +} + + +static size_t +asx3d3_psurface_size(const LWPSURFACE *psur, char *srs, int precision, int opts, const char *defid) +{ + int i; + size_t size; + size_t defidlen = strlen(defid); + + size = sizeof("") + defidlen; + + for (i=0; ingeoms; i++) + { + size += asx3d3_poly_size(psur->geoms[i], 0, precision, opts, defid)*5; /** need to make space for coordIndex values too including -1 separating each poly**/ + } + + return size; +} + + +/* + * Don't call this with single-geoms inspected! + */ +static size_t +asx3d3_psurface_buf(const LWPSURFACE *psur, char *srs, char *output, int precision, int opts, const char *defid) +{ + char *ptr; + int i; + int j; + int k; + int np; + LWPOLY *patch; + + ptr = output; + + /* Open outmost tag */ + ptr += sprintf(ptr, ""); + + return (ptr-output); +} + +/* + * Don't call this with single-geoms inspected! + */ +static char * +asx3d3_psurface(const LWPSURFACE *psur, char *srs, int precision, int opts, const char *defid) +{ + char *x3d; + size_t size; + + size = asx3d3_psurface_size(psur, srs, precision, opts, defid); + x3d = lwalloc(size); + asx3d3_psurface_buf(psur, srs, x3d, precision, opts, defid); + return x3d; +} + + +static size_t +asx3d3_tin_size(const LWTIN *tin, char *srs, int precision, int opts, const char *defid) +{ + int i; + size_t size; + size_t defidlen = strlen(defid); + //int dimension=2; + + /** Need to make space for size of additional attributes, + ** the coordIndex has a value for each edge for each triangle plus a space to separate so we need at least that much extra room ***/ + size = sizeof("") + defidlen + tin->ngeoms*12; + + for (i=0; ingeoms; i++) + { + size += (asx3d3_triangle_size(tin->geoms[i], 0, precision, opts, defid) * 20); /** 3 is to make space for coordIndex **/ + } + + return size; +} + + +/* + * Don't call this with single-geoms inspected! + */ +static size_t +asx3d3_tin_buf(const LWTIN *tin, char *srs, char *output, int precision, int opts, const char *defid) +{ + char *ptr; + int i; + int k; + //int dimension=2; + + ptr = output; + + ptr += sprintf(ptr, ""); + + return (ptr-output); +} + +/* + * Don't call this with single-geoms inspected! + */ +static char * +asx3d3_tin(const LWTIN *tin, char *srs, int precision, int opts, const char *defid) +{ + char *x3d; + size_t size; + + size = asx3d3_tin_size(tin, srs, precision, opts, defid); + x3d = lwalloc(size); + asx3d3_tin_buf(tin, srs, x3d, precision, opts, defid); + return x3d; +} + +static size_t +asx3d3_collection_size(const LWCOLLECTION *col, char *srs, int precision, int opts, const char *defid) +{ + int i; + size_t size; + size_t defidlen = strlen(defid); + LWGEOM *subgeom; + + size = sizeof("") + defidlen*2; + + if ( srs ) + size += strlen(srs) + sizeof(" srsName=.."); + + for (i=0; ingeoms; i++) + { + subgeom = col->geoms[i]; + size += ( sizeof("/") + defidlen ) * 2; + if ( subgeom->type == POINTTYPE ) + { + size += asx3d3_point_size((LWPOINT*)subgeom, 0, precision, opts, defid); + } + else if ( subgeom->type == LINETYPE ) + { + size += asx3d3_line_size((LWLINE*)subgeom, 0, precision, opts, defid); + } + else if ( subgeom->type == POLYGONTYPE ) + { + size += asx3d3_poly_size((LWPOLY*)subgeom, 0, precision, opts, defid); + } + else if ( lwgeom_is_collection(subgeom) ) + { + size += asx3d3_multi_size((LWCOLLECTION*)subgeom, 0, precision, opts, defid); + } + else + lwerror("asx3d3_collection_size: unknown geometry type"); + } + + return size; +} + +static size_t +asx3d3_collection_buf(const LWCOLLECTION *col, char *srs, char *output, int precision, int opts, const char *defid) +{ + char *ptr; + int i; + LWGEOM *subgeom; + + ptr = output; + + /* Open outmost tag */ + if ( srs ) + { + ptr += sprintf(ptr, "<%sMultiGeometry srsName=\"%s\">", defid, srs); + } + else + { + ptr += sprintf(ptr, "<%sMultiGeometry>", defid); + } + + for (i=0; ingeoms; i++) + { + subgeom = col->geoms[i]; + ptr += sprintf(ptr, "<%sgeometryMember>", defid); + if ( subgeom->type == POINTTYPE ) + { + ptr += asx3d3_point_buf((LWPOINT*)subgeom, 0, ptr, precision, opts, defid); + } + else if ( subgeom->type == LINETYPE ) + { + ptr += asx3d3_line_buf((LWLINE*)subgeom, 0, ptr, precision, opts, defid); + } + else if ( subgeom->type == POLYGONTYPE ) + { + ptr += asx3d3_poly_buf((LWPOLY*)subgeom, 0, ptr, precision, opts, 0, defid); + } + else if ( lwgeom_is_collection(subgeom) ) + { + if ( subgeom->type == COLLECTIONTYPE ) + ptr += asx3d3_collection_buf((LWCOLLECTION*)subgeom, 0, ptr, precision, opts, defid); + else + ptr += asx3d3_multi_buf((LWCOLLECTION*)subgeom, 0, ptr, precision, opts, defid); + } + else + lwerror("asx3d3_collection_buf: unknown geometry type"); + + ptr += sprintf(ptr, "", defid); + } + + /* Close outmost tag */ + ptr += sprintf(ptr, "", defid); + + return (ptr-output); +} + +/* + * Don't call this with single-geoms inspected! + */ +static char * +asx3d3_collection(const LWCOLLECTION *col, char *srs, int precision, int opts, const char *defid) +{ + char *x3d; + size_t size; + + size = asx3d3_collection_size(col, srs, precision, opts, defid); + x3d = lwalloc(size); + asx3d3_collection_buf(col, srs, x3d, precision, opts, defid); + return x3d; +} + + +/** In X3D3, coordinates are separated by a space separator + */ +static size_t +pointArray_toX3D3(POINTARRAY *pa, char *output, int precision, int opts, int is_closed) +{ + int i; + char *ptr; + char x[OUT_MAX_DIGS_DOUBLE+OUT_MAX_DOUBLE_PRECISION+1]; + char y[OUT_MAX_DIGS_DOUBLE+OUT_MAX_DOUBLE_PRECISION+1]; + char z[OUT_MAX_DIGS_DOUBLE+OUT_MAX_DOUBLE_PRECISION+1]; + + ptr = output; + + if ( ! FLAGS_GET_Z(pa->flags) ) + { + for (i=0; inpoints; i++) + { + /** Only output the point if it is not the last point of a closed object or it is a non-closed type **/ + if ( !is_closed || i < (pa->npoints - 1) ) + { + POINT2D pt; + getPoint2d_p(pa, i, &pt); + + if (fabs(pt.x) < OUT_MAX_DOUBLE) + sprintf(x, "%.*f", precision, pt.x); + else + sprintf(x, "%g", pt.x); + trim_trailing_zeros(x); + + if (fabs(pt.y) < OUT_MAX_DOUBLE) + sprintf(y, "%.*f", precision, pt.y); + else + sprintf(y, "%g", pt.y); + trim_trailing_zeros(y); + + if ( i ) + ptr += sprintf(ptr, " "); + ptr += sprintf(ptr, "%s %s", x, y); + } + } + } + else + { + for (i=0; inpoints; i++) + { + /** Only output the point if it is not the last point of a closed object or it is a non-closed type **/ + if ( !is_closed || i < (pa->npoints - 1) ) + { + POINT4D pt; + getPoint4d_p(pa, i, &pt); + + if (fabs(pt.x) < OUT_MAX_DOUBLE) + sprintf(x, "%.*f", precision, pt.x); + else + sprintf(x, "%g", pt.x); + trim_trailing_zeros(x); + + if (fabs(pt.y) < OUT_MAX_DOUBLE) + sprintf(y, "%.*f", precision, pt.y); + else + sprintf(y, "%g", pt.y); + trim_trailing_zeros(y); + + if (fabs(pt.z) < OUT_MAX_DOUBLE) + sprintf(z, "%.*f", precision, pt.z); + else + sprintf(z, "%g", pt.z); + trim_trailing_zeros(z); + + if ( i ) + ptr += sprintf(ptr, " "); + + ptr += sprintf(ptr, "%s %s %s", x, y, z); + } + } + } + + return ptr-output; +} + + + +/** + * Returns maximum size of rendered pointarray in bytes. + */ +static size_t +pointArray_X3Dsize(POINTARRAY *pa, int precision) +{ + if (FLAGS_NDIMS(pa->flags) == 2) + return (OUT_MAX_DIGS_DOUBLE + precision + sizeof(" ")) + * 2 * pa->npoints; + + return (OUT_MAX_DIGS_DOUBLE + precision + sizeof(" ")) * 3 * pa->npoints; +} diff -Nru postgis-1.5.3/liblwgeom/lwpoint.c postgis-2.0.1/liblwgeom/lwpoint.c --- postgis-1.5.3/liblwgeom/lwpoint.c 2009-09-14 10:54:33.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwpoint.c 2012-02-27 22:08:12.000000000 +0000 @@ -1,9 +1,9 @@ /********************************************************************** - * $Id: lwpoint.c 4494 2009-09-14 10:54:33Z mcayland $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net - * Copyright 2001-2006 Refractions Research Inc. + * + * Copyright (C) 2001-2006 Refractions Research Inc. * * This is free software; you can redistribute and/or modify it under * the terms of the GNU General Public Licence. See the COPYING file. @@ -13,102 +13,8 @@ #include #include #include -#include "liblwgeom.h" - - -/* - * Convert this point into its serialize form - * result's first char will be the 8bit type. See serialized form doc - */ -uchar * -lwpoint_serialize(LWPOINT *point) -{ - size_t size, retsize; - uchar *result; - - size = lwpoint_serialize_size(point); - result = lwalloc(size); - lwpoint_serialize_buf(point, result, &retsize); - - if ( retsize != size ) - { - lwerror("lwpoint_serialize_size returned %d, ..serialize_buf returned %d", size, retsize); - } - - return result; -} - -/* - * Convert this point into its serialize form writing it into - * the given buffer, and returning number of bytes written into - * the given int pointer. - * result's first char will be the 8bit type. See serialized form doc - */ -void -lwpoint_serialize_buf(LWPOINT *point, uchar *buf, size_t *retsize) -{ - int size=1; - char hasSRID; - uchar *loc; - int ptsize = pointArray_ptsize(point->point); - - if ( TYPE_GETZM(point->type) != TYPE_GETZM(point->point->dims) ) - lwerror("Dimensions mismatch in lwpoint"); - - LWDEBUGF(2, "lwpoint_serialize_buf(%p, %p) called", point, buf); - /*printLWPOINT(point); */ - - hasSRID = (point->SRID != -1); - - if (hasSRID) size +=4; /*4 byte SRID */ - if (point->bbox) size += sizeof(BOX2DFLOAT4); /* bvol */ - - size += sizeof(double)*TYPE_NDIMS(point->type); - - buf[0] = (uchar) lwgeom_makeType_full( - TYPE_HASZ(point->type), TYPE_HASM(point->type), - hasSRID, POINTTYPE, point->bbox?1:0); - loc = buf+1; - - if (point->bbox) - { - memcpy(loc, point->bbox, sizeof(BOX2DFLOAT4)); - loc += sizeof(BOX2DFLOAT4); - } - - if (hasSRID) - { - memcpy(loc, &point->SRID, sizeof(int32)); - loc += 4; - } - - /* copy in points */ - memcpy(loc, getPoint_internal(point->point, 0), ptsize); - - if (retsize) *retsize = size; -} - -/* - * Find bounding box (standard one) - * zmin=zmax=NO_Z_VALUE if 2d - */ -BOX3D * -lwpoint_compute_box3d(LWPOINT *point) -{ - LWDEBUGF(2, "lwpoint_compute_box3d called with point %p", point); - - if (point == NULL) - { - LWDEBUG(3, "lwpoint_compute_box3d returning NULL"); - - return NULL; - } - - LWDEBUG(3, "lwpoint_compute_box3d returning ptarray_compute_box3d return"); - - return ptarray_compute_box3d(point->point); -} - +#include "liblwgeom_internal.h" +#include "lwgeom_log.h" /* @@ -138,39 +44,70 @@ return getPoint4d_p(point->point,0,out); } -/* find length of this deserialized point */ -size_t -lwpoint_serialize_size(LWPOINT *point) +double +lwpoint_get_x(const LWPOINT *point) { - size_t size = 1; /* type */ - - LWDEBUG(2, "lwpoint_serialize_size called"); - - if ( point->SRID != -1 ) size += 4; /* SRID */ - if ( point->bbox ) size += sizeof(BOX2DFLOAT4); - - size += TYPE_NDIMS(point->type) * sizeof(double); /* point */ - - LWDEBUGF(3, "lwpoint_serialize_size returning %d", size); - - return size; + POINT4D pt; + if ( lwpoint_is_empty(point) ) + lwerror("lwpoint_get_x called with empty geometry"); + getPoint4d_p(point->point, 0, &pt); + return pt.x; +} + +double +lwpoint_get_y(const LWPOINT *point) +{ + POINT4D pt; + if ( lwpoint_is_empty(point) ) + lwerror("lwpoint_get_y called with empty geometry"); + getPoint4d_p(point->point, 0, &pt); + return pt.y; +} + +double +lwpoint_get_z(const LWPOINT *point) +{ + POINT4D pt; + if ( lwpoint_is_empty(point) ) + lwerror("lwpoint_get_z called with empty geometry"); + if ( ! FLAGS_GET_Z(point->flags) ) + lwerror("lwpoint_get_z called without z dimension"); + getPoint4d_p(point->point, 0, &pt); + return pt.z; +} + +double +lwpoint_get_m(const LWPOINT *point) +{ + POINT4D pt; + if ( lwpoint_is_empty(point) ) + lwerror("lwpoint_get_m called with empty geometry"); + if ( ! FLAGS_GET_M(point->flags) ) + lwerror("lwpoint_get_m called without m dimension"); + getPoint4d_p(point->point, 0, &pt); + return pt.m; } /* * Construct a new point. point will not be copied - * use SRID=-1 for unknown SRID (will have 8bit type's S = 0) + * use SRID=SRID_UNKNOWN for unknown SRID (will have 8bit type's S = 0) */ LWPOINT * -lwpoint_construct(int SRID, BOX2DFLOAT4 *bbox, POINTARRAY *point) +lwpoint_construct(int srid, GBOX *bbox, POINTARRAY *point) { - LWPOINT *result ; + LWPOINT *result; + uint8_t flags = 0; if (point == NULL) return NULL; /* error */ result = lwalloc(sizeof(LWPOINT)); - result->type = lwgeom_makeType_full(TYPE_HASZ(point->dims), TYPE_HASM(point->dims), (SRID!=-1), POINTTYPE, 0); - result->SRID = SRID; + result->type = POINTTYPE; + FLAGS_SET_Z(flags, FLAGS_GET_Z(point->flags)); + FLAGS_SET_M(flags, FLAGS_GET_M(point->flags)); + FLAGS_SET_BBOX(flags, bbox?1:0); + result->flags = flags; + result->srid = srid; result->point = point; result->bbox = bbox; @@ -178,133 +115,75 @@ } LWPOINT * -make_lwpoint2d(int SRID, double x, double y) +lwpoint_construct_empty(int srid, char hasz, char hasm) { - POINT2D p; - POINTARRAY *pa = ptarray_construct(0, 0, 1); - - p.x = x; - p.y = y; - - memcpy(getPoint_internal(pa, 0), &p, sizeof(POINT2D)); - - return lwpoint_construct(SRID, NULL, pa); + LWPOINT *result = lwalloc(sizeof(LWPOINT)); + result->type = POINTTYPE; + result->flags = gflags(hasz, hasm, 0); + result->srid = srid; + result->point = ptarray_construct(hasz, hasm, 0); + result->bbox = NULL; + return result; } LWPOINT * -make_lwpoint3dz(int SRID, double x, double y, double z) +lwpoint_make2d(int srid, double x, double y) { - POINT3DZ p; - POINTARRAY *pa = ptarray_construct(1, 0, 1); - - p.x = x; - p.y = y; - p.z = z; + POINT4D p = {x, y, 0.0, 0.0}; + POINTARRAY *pa = ptarray_construct_empty(0, 0, 1); - memcpy(getPoint_internal(pa, 0), &p, sizeof(POINT3DZ)); - - return lwpoint_construct(SRID, NULL, pa); + ptarray_append_point(pa, &p, LW_TRUE); + return lwpoint_construct(srid, NULL, pa); } LWPOINT * -make_lwpoint3dm(int SRID, double x, double y, double m) +lwpoint_make3dz(int srid, double x, double y, double z) { - POINTARRAY *pa = ptarray_construct(0, 1, 1); - POINT3DM p; - - p.x = x; - p.y = y; - p.m = m; + POINT4D p = {x, y, z, 0.0}; + POINTARRAY *pa = ptarray_construct_empty(1, 0, 1); - memcpy(getPoint_internal(pa, 0), &p, sizeof(POINT3DM)); + ptarray_append_point(pa, &p, LW_TRUE); - return lwpoint_construct(SRID, NULL, pa); + return lwpoint_construct(srid, NULL, pa); } LWPOINT * -make_lwpoint4d(int SRID, double x, double y, double z, double m) +lwpoint_make3dm(int srid, double x, double y, double m) { - POINTARRAY *pa = ptarray_construct(1, 1, 1); - POINT4D p; + POINT4D p = {x, y, 0.0, m}; + POINTARRAY *pa = ptarray_construct_empty(0, 1, 1); - p.x = x; - p.y = y; - p.z = z; - p.m = m; + ptarray_append_point(pa, &p, LW_TRUE); - memcpy(getPoint_internal(pa, 0), &p, sizeof(POINT4D)); - - return lwpoint_construct(SRID, NULL, pa); + return lwpoint_construct(srid, NULL, pa); } -/* - * Given the LWPOINT serialized form (or a pointer into a muli* one) - * construct a proper LWPOINT. - * serialized_form should point to the 8bit type format (with type = 1) - * See serialized form doc - */ LWPOINT * -lwpoint_deserialize(uchar *serialized_form) +lwpoint_make4d(int srid, double x, double y, double z, double m) { - uchar type; - int geom_type; - LWPOINT *result; - uchar *loc = NULL; - POINTARRAY *pa; - - LWDEBUG(2, "lwpoint_deserialize called"); - - result = (LWPOINT*) lwalloc(sizeof(LWPOINT)) ; - - type = serialized_form[0]; - geom_type = lwgeom_getType(type); - - if ( geom_type != POINTTYPE) - { - lwerror("lwpoint_deserialize: attempt to deserialize a point which is really a %s", lwgeom_typename(geom_type)); - return NULL; - } - result->type = type; - - loc = serialized_form+1; - - if (lwgeom_hasBBOX(type)) - { - LWDEBUG(3, "lwpoint_deserialize: input has bbox"); - - result->bbox = lwalloc(sizeof(BOX2DFLOAT4)); - memcpy(result->bbox, loc, sizeof(BOX2DFLOAT4)); - loc += sizeof(BOX2DFLOAT4); - } - else - { - result->bbox = NULL; - } - - if ( lwgeom_hasSRID(type)) - { - LWDEBUG(3, "lwpoint_deserialize: input has SRID"); - - result->SRID = lw_get_int32(loc); - loc += 4; /* type + SRID */ - } - else - { - result->SRID = -1; - } - - /* we've read the type (1 byte) and SRID (4 bytes, if present) */ + POINT4D p = {x, y, z, m}; + POINTARRAY *pa = ptarray_construct_empty(1, 1, 1); - pa = pointArray_construct(loc, TYPE_HASZ(type), TYPE_HASM(type), 1); + ptarray_append_point(pa, &p, LW_TRUE); - result->point = pa; + return lwpoint_construct(srid, NULL, pa); +} - return result; +LWPOINT * +lwpoint_make(int srid, int hasz, int hasm, const POINT4D *p) +{ + POINTARRAY *pa = ptarray_construct_empty(hasz, hasm, 1); + ptarray_append_point(pa, p, LW_TRUE); + return lwpoint_construct(srid, NULL, pa); } void lwpoint_free(LWPOINT *pt) { - if (pt->point) + if ( ! pt ) return; + + if ( pt->bbox ) + lwfree(pt->bbox); + if ( pt->point ) ptarray_free(pt->point); lwfree(pt); } @@ -312,20 +191,17 @@ void printLWPOINT(LWPOINT *point) { lwnotice("LWPOINT {"); - lwnotice(" ndims = %i", (int)TYPE_NDIMS(point->type)); - lwnotice(" BBOX = %i", TYPE_HASBBOX(point->type) ? 1 : 0 ); - lwnotice(" SRID = %i", (int)point->SRID); + lwnotice(" ndims = %i", (int)FLAGS_NDIMS(point->flags)); + lwnotice(" BBOX = %i", FLAGS_GET_BBOX(point->flags) ? 1 : 0 ); + lwnotice(" SRID = %i", (int)point->srid); printPA(point->point); lwnotice("}"); } -int -lwpoint_compute_box2d_p(LWPOINT *point, BOX2DFLOAT4 *box) -{ - return ptarray_compute_box2d_p(point->point, box); -} - -/* Clone LWPOINT object. POINTARRAY is not copied. */ +/* @brief Clone LWPOINT object. Serialized point lists are not copied. + * + * @see ptarray_clone + */ LWPOINT * lwpoint_clone(const LWPOINT *g) { @@ -334,97 +210,14 @@ LWDEBUG(2, "lwpoint_clone called"); memcpy(ret, g, sizeof(LWPOINT)); - if ( g->bbox ) ret->bbox = box2d_clone(g->bbox); - return ret; -} - -/* - * Add 'what' to this point at position 'where'. - * where=0 == prepend - * where=-1 == append - * Returns a MULTIPOINT or a GEOMETRYCOLLECTION - */ -LWGEOM * -lwpoint_add(const LWPOINT *to, uint32 where, const LWGEOM *what) -{ - LWCOLLECTION *col; - LWGEOM **geoms; - int newtype; - if ( where != -1 && where != 0 ) - { - lwerror("lwpoint_add only supports 0 or -1 as second argument, got %d", where); - return NULL; - } + ret->point = ptarray_clone(g->point); - /* dimensions compatibility are checked by caller */ - - - /* Construct geoms array */ - geoms = lwalloc(sizeof(LWGEOM *)*2); - if ( where == -1 ) /* append */ - { - geoms[0] = lwgeom_clone((LWGEOM *)to); - geoms[1] = lwgeom_clone(what); - } - else /* prepend */ - { - geoms[0] = lwgeom_clone(what); - geoms[1] = lwgeom_clone((LWGEOM *)to); - } - /* reset SRID and wantbbox flag from component types */ - lwgeom_dropSRID(geoms[0]); - lwgeom_drop_bbox(geoms[0]); - lwgeom_dropSRID(geoms[1]); - lwgeom_drop_bbox(geoms[1]); - - /* Find appropriate geom type */ - if ( TYPE_GETTYPE(what->type) == POINTTYPE ) newtype = MULTIPOINTTYPE; - else newtype = COLLECTIONTYPE; - - col = lwcollection_construct(newtype, - to->SRID, NULL, - 2, geoms); - - return (LWGEOM *)col; + if ( g->bbox ) ret->bbox = gbox_copy(g->bbox); + return ret; } -/* Find length of this serialized point */ -size_t -lwgeom_size_point(const uchar *serialized_point) -{ - uint32 result = 1; - uchar type; - const uchar *loc; - - type = serialized_point[0]; - - if ( lwgeom_getType(type) != POINTTYPE) return 0; - LWDEBUGF(2, "lwgeom_size_point called (%d)", result); - - loc = serialized_point+1; - - if (lwgeom_hasBBOX(type)) - { - loc += sizeof(BOX2DFLOAT4); - result +=sizeof(BOX2DFLOAT4); - - LWDEBUGF(3, "lwgeom_size_point: has bbox (%d)", result); - } - - if ( lwgeom_hasSRID(type)) - { - LWDEBUGF(3, "lwgeom_size_point: has srid (%d)", result); - - loc +=4; /* type + SRID */ - result +=4; - } - - result += lwgeom_ndims(type)*sizeof(double); - - return result; -} void lwpoint_release(LWPOINT *lwpoint) @@ -439,3 +232,33 @@ { return ptarray_same(p1->point, p2->point); } + + +LWPOINT* +lwpoint_force_dims(const LWPOINT *point, int hasz, int hasm) +{ + POINTARRAY *pdims = NULL; + LWPOINT *pointout; + + /* Return 2D empty */ + if( lwpoint_is_empty(point) ) + { + pointout = lwpoint_construct_empty(point->srid, hasz, hasm); + } + else + { + /* Always we duplicate the ptarray and return */ + pdims = ptarray_force_dims(point->point, hasz, hasm); + pointout = lwpoint_construct(point->srid, NULL, pdims); + } + pointout->type = point->type; + return pointout; +} + +int lwpoint_is_empty(const LWPOINT *point) +{ + if ( ! point->point || point->point->npoints == 0 ) + return LW_TRUE; + return LW_FALSE; +} + diff -Nru postgis-1.5.3/liblwgeom/lwpoly.c postgis-2.0.1/liblwgeom/lwpoly.c --- postgis-1.5.3/liblwgeom/lwpoly.c 2010-02-01 17:35:55.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwpoly.c 2012-04-20 03:23:47.000000000 +0000 @@ -1,9 +1,10 @@ /********************************************************************** - * $Id: lwpoly.c 5181 2010-02-01 17:35:55Z pramsey $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net - * Copyright 2001-2006 Refractions Research Inc. + * + * Copyright (C) 2012 Sandro Santilli + * Copyright (C) 2001-2006 Refractions Research Inc. * * This is free software; you can redistribute and/or modify it under * the terms of the GNU General Public Licence. See the COPYING file. @@ -15,362 +16,71 @@ #include #include #include -#include "liblwgeom.h" +#include "liblwgeom_internal.h" +#include "lwgeom_log.h" #define CHECK_POLY_RINGS_ZM 1 /* construct a new LWPOLY. arrays (points/points per ring) will NOT be copied - * use SRID=-1 for unknown SRID (will have 8bit type's S = 0) + * use SRID=SRID_UNKNOWN for unknown SRID (will have 8bit type's S = 0) */ -LWPOLY * -lwpoly_construct(int SRID, BOX2DFLOAT4 *bbox, unsigned int nrings, POINTARRAY **points) +LWPOLY* +lwpoly_construct(int srid, GBOX *bbox, uint32_t nrings, POINTARRAY **points) { LWPOLY *result; int hasz, hasm; #ifdef CHECK_POLY_RINGS_ZM char zm; - unsigned int i; + uint32_t i; #endif if ( nrings < 1 ) lwerror("lwpoly_construct: need at least 1 ring"); - hasz = TYPE_HASZ(points[0]->dims); - hasm = TYPE_HASM(points[0]->dims); + hasz = FLAGS_GET_Z(points[0]->flags); + hasm = FLAGS_GET_M(points[0]->flags); #ifdef CHECK_POLY_RINGS_ZM - zm = TYPE_GETZM(points[0]->dims); + zm = FLAGS_GET_ZM(points[0]->flags); for (i=1; idims) ) + if ( zm != FLAGS_GET_ZM(points[i]->flags) ) lwerror("lwpoly_construct: mixed dimensioned rings"); } #endif result = (LWPOLY*) lwalloc(sizeof(LWPOLY)); - result->type = lwgeom_makeType_full(hasz, hasm, (SRID!=-1), POLYGONTYPE, - 0); - result->SRID = SRID; + result->type = POLYGONTYPE; + result->flags = gflags(hasz, hasm, 0); + FLAGS_SET_BBOX(result->flags, bbox?1:0); + result->srid = srid; result->nrings = nrings; + result->maxrings = nrings; result->rings = points; result->bbox = bbox; return result; } - -/* - * given the LWPOLY serialized form (or a pointer into a muli* one) - * construct a proper LWPOLY. - * serialized_form should point to the 8bit type format (with type = 3) - * See serialized form doc - */ -LWPOLY * -lwpoly_deserialize(uchar *serialized_form) +LWPOLY* +lwpoly_construct_empty(int srid, char hasz, char hasm) { - - LWPOLY *result; - uint32 nrings; - int ndims, hasz, hasm; - uint32 npoints; - uchar type; - uchar *loc; - int t; - - if (serialized_form == NULL) - { - lwerror("lwpoly_deserialize called with NULL arg"); - return NULL; - } - - result = (LWPOLY*) lwalloc(sizeof(LWPOLY)); - - type = serialized_form[0]; - result->type = type; - - ndims = TYPE_NDIMS(type); - hasz = TYPE_HASZ(type); - hasm = TYPE_HASM(type); - loc = serialized_form; - - if ( TYPE_GETTYPE(type) != POLYGONTYPE) - { - lwerror("lwpoly_deserialize: attempt to deserialize a poly which is really a %s", lwgeom_typename(type)); - return NULL; - } - - - loc = serialized_form+1; - - if (lwgeom_hasBBOX(type)) - { - LWDEBUG(3, "lwpoly_deserialize: input has bbox"); - - result->bbox = lwalloc(sizeof(BOX2DFLOAT4)); - memcpy(result->bbox, loc, sizeof(BOX2DFLOAT4)); - loc += sizeof(BOX2DFLOAT4); - } - else - { - result->bbox = NULL; - } - - if ( lwgeom_hasSRID(type)) - { - result->SRID = lw_get_int32(loc); - loc +=4; /* type + SRID */ - } - else - { - result->SRID = -1; - } - - nrings = lw_get_uint32(loc); - result->nrings = nrings; - loc +=4; - if ( nrings ) - { - result->rings = (POINTARRAY**) lwalloc(nrings* sizeof(POINTARRAY*)); - } - else - { - result->rings = NULL; - } - - for (t =0; trings[t] = pointArray_construct(loc, hasz, hasm, npoints); - loc += sizeof(double)*ndims*npoints; - } - + LWPOLY *result = lwalloc(sizeof(LWPOLY)); + result->type = POLYGONTYPE; + result->flags = gflags(hasz,hasm,0); + result->srid = srid; + result->nrings = 0; + result->maxrings = 1; /* Allocate room for ring, just in case. */ + result->rings = lwalloc(result->maxrings * sizeof(POINTARRAY*)); + result->bbox = NULL; return result; } -/* - * create the serialized form of the polygon - * result's first char will be the 8bit type. See serialized form doc - * points copied - */ -uchar * -lwpoly_serialize(LWPOLY *poly) -{ - size_t size, retsize; - uchar *result; - - size = lwpoly_serialize_size(poly); - result = lwalloc(size); - lwpoly_serialize_buf(poly, result, &retsize); - - if ( retsize != size ) - { - lwerror("lwpoly_serialize_size returned %d, ..serialize_buf returned %d", size, retsize); - } - - return result; -} - -/* - * create the serialized form of the polygon writing it into the - * given buffer, and returning number of bytes written into - * the given int pointer. - * result's first char will be the 8bit type. See serialized form doc - * points copied - */ -void -lwpoly_serialize_buf(LWPOLY *poly, uchar *buf, size_t *retsize) -{ - size_t size=1; /* type byte */ - char hasSRID; - int t; - uchar *loc; - int ptsize; - - LWDEBUG(2, "lwpoly_serialize_buf called"); - - ptsize = sizeof(double)*TYPE_NDIMS(poly->type); - - hasSRID = (poly->SRID != -1); - - size += 4; /* nrings */ - size += 4*poly->nrings; /* npoints/ring */ - - buf[0] = (uchar) lwgeom_makeType_full( - TYPE_HASZ(poly->type), TYPE_HASM(poly->type), - hasSRID, POLYGONTYPE, poly->bbox ? 1 : 0); - loc = buf+1; - - if (poly->bbox) - { - memcpy(loc, poly->bbox, sizeof(BOX2DFLOAT4)); - size += sizeof(BOX2DFLOAT4); /* bvol */ - loc += sizeof(BOX2DFLOAT4); - } - - if (hasSRID) - { - memcpy(loc, &poly->SRID, sizeof(int32)); - loc += 4; - size +=4; /* 4 byte SRID */ - } - - memcpy(loc, &poly->nrings, sizeof(int32)); /* nrings */ - loc+=4; - - for (t=0; tnrings; t++) - { - POINTARRAY *pa = poly->rings[t]; - size_t pasize; - uint32 npoints; - - LWDEBUGF(4, "TYPE_GETZM(poly->type) == %d", TYPE_GETZM(poly->type)); - LWDEBUGF(4, "TYPE_GETZM(pa->dims) == %d", TYPE_GETZM(pa->dims)); - - if ( TYPE_GETZM(poly->type) != TYPE_GETZM(pa->dims) ) - lwerror("Dimensions mismatch in lwpoly"); - - npoints = pa->npoints; - - memcpy(loc, &npoints, sizeof(uint32)); /* npoints this ring */ - loc+=4; - - pasize = npoints*ptsize; - size += pasize; - - /* copy points */ - memcpy(loc, getPoint_internal(pa, 0), pasize); - loc += pasize; - - } - - if (retsize) *retsize = size; -} - - -/* find bounding box (standard one) zmin=zmax=0 if 2d (might change to NaN) */ -BOX3D * -lwpoly_compute_box3d(LWPOLY *poly) +void lwpoly_free(LWPOLY *poly) { - BOX3D *result; - - /* just need to check outer ring -- interior rings are inside */ - POINTARRAY *pa = poly->rings[0]; - result = ptarray_compute_box3d(pa); - - return result; -} - - -/* find length of this serialized polygon */ -size_t -lwgeom_size_poly(const uchar *serialized_poly) -{ - uint32 result = 1; /* char type */ - uint32 nrings; - int ndims; int t; - uchar type; - uint32 npoints; - const uchar *loc; - - if (serialized_poly == NULL) - return -9999; - - - type = (uchar) serialized_poly[0]; - ndims = lwgeom_ndims(type); - if ( lwgeom_getType(type) != POLYGONTYPE) - return -9999; - - - loc = serialized_poly+1; - - if (lwgeom_hasBBOX(type)) - { - LWDEBUG(3, "lwgeom_size_poly: has bbox"); - - loc += sizeof(BOX2DFLOAT4); - result +=sizeof(BOX2DFLOAT4); - } - - - if ( lwgeom_hasSRID(type)) - { - LWDEBUG(3, "lwgeom_size_poly: has srid"); - - loc +=4; /* type + SRID */ - result += 4; - } - - - nrings = lw_get_uint32(loc); - loc +=4; - result +=4; - - LWDEBUGF(3, "lwgeom_size_poly contains %d rings", nrings); - - for (t =0; tSRID != -1 ) size += 4; /* SRID */ - if ( poly->bbox ) size += sizeof(BOX2DFLOAT4); - - LWDEBUGF(2, "lwpoly_serialize_size called with poly[%p] (%d rings)", - poly, poly->nrings); - - size += 4; /* nrings */ - - for (i=0; inrings; i++) - { - size += 4; /* npoints */ - size += poly->rings[i]->npoints*TYPE_NDIMS(poly->type)*sizeof(double); - } - - LWDEBUGF(3, "lwpoly_serialize_size returning %d", size); - - return size; -} - -void lwpoly_free (LWPOLY *poly) -{ - int t; + if( ! poly ) return; if ( poly->bbox ) lwfree(poly->bbox); @@ -391,8 +101,8 @@ { int t; lwnotice("LWPOLY {"); - lwnotice(" ndims = %i", (int)TYPE_NDIMS(poly->type)); - lwnotice(" SRID = %i", (int)poly->SRID); + lwnotice(" ndims = %i", (int)FLAGS_NDIMS(poly->flags)); + lwnotice(" SRID = %i", (int)poly->srid); lwnotice(" nrings = %i", (int)poly->nrings); for (t=0; tnrings; t++) { @@ -402,105 +112,82 @@ lwnotice("}"); } -int -lwpoly_compute_box2d_p(LWPOLY *poly, BOX2DFLOAT4 *box) -{ - BOX2DFLOAT4 boxbuf; - uint32 i; - - if ( ! poly->nrings ) return 0; - if ( ! ptarray_compute_box2d_p(poly->rings[0], box) ) return 0; - for (i=1; inrings; i++) - { - if ( ! ptarray_compute_box2d_p(poly->rings[0], &boxbuf) ) - return 0; - if ( ! box2d_union_p(box, &boxbuf, box) ) - return 0; - } - return 1; -} - -/* Clone LWLINE object. POINTARRAY are not copied, it's ring array is. */ +/* @brief Clone LWLINE object. Serialized point lists are not copied. + * + * @see ptarray_clone + */ LWPOLY * lwpoly_clone(const LWPOLY *g) { + int i; LWPOLY *ret = lwalloc(sizeof(LWPOLY)); memcpy(ret, g, sizeof(LWPOLY)); ret->rings = lwalloc(sizeof(POINTARRAY *)*g->nrings); - memcpy(ret->rings, g->rings, sizeof(POINTARRAY *)*g->nrings); - if ( g->bbox ) ret->bbox = box2d_clone(g->bbox); + for ( i = 0; i < g->nrings; i++ ) { + ret->rings[i] = ptarray_clone(g->rings[i]); + } + if ( g->bbox ) ret->bbox = gbox_copy(g->bbox); return ret; } -/* - * Add 'what' to this poly at position 'where'. - * where=0 == prepend - * where=-1 == append - * Returns a MULTIPOLYGON or a GEOMETRYCOLLECTION - */ -LWGEOM * -lwpoly_add(const LWPOLY *to, uint32 where, const LWGEOM *what) +/* Deep clone LWPOLY object. POINTARRAY are copied, as is ring array */ +LWPOLY * +lwpoly_clone_deep(const LWPOLY *g) { - LWCOLLECTION *col; - LWGEOM **geoms; - int newtype; - - if ( where != -1 && where != 0 ) - { - lwerror("lwpoly_add only supports 0 or -1 as second argument, got %d", where); - return NULL; - } - - /* dimensions compatibility are checked by caller */ - - /* Construct geoms array */ - geoms = lwalloc(sizeof(LWGEOM *)*2); - if ( where == -1 ) /* append */ - { - geoms[0] = lwgeom_clone((LWGEOM *)to); - geoms[1] = lwgeom_clone(what); - } - else /* prepend */ + int i; + LWPOLY *ret = lwalloc(sizeof(LWPOLY)); + memcpy(ret, g, sizeof(LWPOLY)); + if ( g->bbox ) ret->bbox = gbox_copy(g->bbox); + ret->rings = lwalloc(sizeof(POINTARRAY *)*g->nrings); + for ( i = 0; i < ret->nrings; i++ ) { - geoms[0] = lwgeom_clone(what); - geoms[1] = lwgeom_clone((LWGEOM *)to); + ret->rings[i] = ptarray_clone_deep(g->rings[i]); } + FLAGS_SET_READONLY(ret->flags,0); + return ret; +} - /* reset SRID and wantbbox flag from component types */ - geoms[0]->SRID = geoms[1]->SRID = -1; - TYPE_SETHASSRID(geoms[0]->type, 0); - TYPE_SETHASSRID(geoms[1]->type, 0); - TYPE_SETHASBBOX(geoms[0]->type, 0); - TYPE_SETHASBBOX(geoms[1]->type, 0); - - /* Find appropriate geom type */ - if ( TYPE_GETTYPE(what->type) == POLYGONTYPE ) newtype = MULTIPOLYGONTYPE; - else newtype = COLLECTIONTYPE; - - col = lwcollection_construct(newtype, - to->SRID, NULL, - 2, geoms); - - return (LWGEOM *)col; +/** +* Add a ring to a polygon. Point array will be referenced, not copied. +*/ +int +lwpoly_add_ring(LWPOLY *poly, POINTARRAY *pa) +{ + if( ! poly || ! pa ) + return LW_FAILURE; + + /* We have used up our storage, add some more. */ + if( poly->nrings >= poly->maxrings ) + { + int new_maxrings = 2 * (poly->nrings + 1); + poly->rings = lwrealloc(poly->rings, new_maxrings * sizeof(POINTARRAY*)); + } + + /* Add the new ring entry. */ + poly->rings[poly->nrings] = pa; + poly->nrings++; + + return LW_SUCCESS; } void -lwpoly_forceRHR(LWPOLY *poly) +lwpoly_force_clockwise(LWPOLY *poly) { int i; + /* No-op empties */ + if ( lwpoly_is_empty(poly) ) + return; + + /* External ring */ if ( ptarray_isccw(poly->rings[0]) ) - { ptarray_reverse(poly->rings[0]); - } + /* Internal rings */ for (i=1; inrings; i++) - { if ( ! ptarray_isccw(poly->rings[i]) ) - { ptarray_reverse(poly->rings[i]); - } - } + } void @@ -513,7 +200,7 @@ lwpoly_reverse(LWPOLY *poly) { int i; - + if ( lwpoly_is_empty(poly) ) return; for (i=0; inrings; i++) ptarray_reverse(poly->rings[i]); } @@ -522,14 +209,14 @@ lwpoly_segmentize2d(LWPOLY *poly, double dist) { POINTARRAY **newrings; - unsigned int i; + uint32_t i; newrings = lwalloc(sizeof(POINTARRAY *)*poly->nrings); for (i=0; inrings; i++) { newrings[i] = ptarray_segmentize2d(poly->rings[i], dist); } - return lwpoly_construct(poly->SRID, NULL, + return lwpoly_construct(poly->srid, NULL, poly->nrings, newrings); } @@ -540,7 +227,7 @@ char lwpoly_same(const LWPOLY *p1, const LWPOLY *p2) { - unsigned int i; + uint32_t i; if ( p1->nrings != p2->nrings ) return 0; for (i=0; inrings; i++) @@ -560,24 +247,24 @@ */ LWPOLY * lwpoly_from_lwlines(const LWLINE *shell, - unsigned int nholes, const LWLINE **holes) + uint32_t nholes, const LWLINE **holes) { - unsigned int nrings; + uint32_t nrings; POINTARRAY **rings = lwalloc((nholes+1)*sizeof(POINTARRAY *)); - int SRID = shell->SRID; + int srid = shell->srid; LWPOLY *ret; if ( shell->points->npoints < 4 ) lwerror("lwpoly_from_lwlines: shell must have at least 4 points"); if ( ! ptarray_isclosed2d(shell->points) ) lwerror("lwpoly_from_lwlines: shell must be closed"); - rings[0] = ptarray_clone(shell->points); + rings[0] = ptarray_clone_deep(shell->points); for (nrings=1; nrings<=nholes; nrings++) { const LWLINE *hole = holes[nrings-1]; - if ( hole->SRID != SRID ) + if ( hole->srid != srid ) lwerror("lwpoly_from_lwlines: mixed SRIDs in input lines"); if ( hole->points->npoints < 4 ) @@ -585,9 +272,232 @@ if ( ! ptarray_isclosed2d(hole->points) ) lwerror("lwpoly_from_lwlines: holes must be closed"); - rings[nrings] = ptarray_clone(hole->points); + rings[nrings] = ptarray_clone_deep(hole->points); } - ret = lwpoly_construct(SRID, NULL, nrings, rings); + ret = lwpoly_construct(srid, NULL, nrings, rings); return ret; } + +LWGEOM* +lwpoly_remove_repeated_points(LWPOLY *poly) +{ + uint32_t i; + POINTARRAY **newrings; + + newrings = lwalloc(sizeof(POINTARRAY *)*poly->nrings); + for (i=0; inrings; i++) + { + newrings[i] = ptarray_remove_repeated_points(poly->rings[i]); + } + + return (LWGEOM*)lwpoly_construct(poly->srid, + poly->bbox ? gbox_copy(poly->bbox) : NULL, + poly->nrings, newrings); + +} + + +LWPOLY* +lwpoly_force_dims(const LWPOLY *poly, int hasz, int hasm) +{ + LWPOLY *polyout; + + /* Return 2D empty */ + if( lwpoly_is_empty(poly) ) + { + polyout = lwpoly_construct_empty(poly->srid, hasz, hasm); + } + else + { + POINTARRAY **rings = NULL; + int i; + rings = lwalloc(sizeof(POINTARRAY*) * poly->nrings); + for( i = 0; i < poly->nrings; i++ ) + { + rings[i] = ptarray_force_dims(poly->rings[i], hasz, hasm); + } + polyout = lwpoly_construct(poly->srid, NULL, poly->nrings, rings); + } + polyout->type = poly->type; + return polyout; +} + +int lwpoly_is_empty(const LWPOLY *poly) +{ + if ( (poly->nrings == 0) || (!poly->rings) ) + return LW_TRUE; + return LW_FALSE; +} + +int lwpoly_count_vertices(LWPOLY *poly) +{ + int i = 0; + int v = 0; /* vertices */ + assert(poly); + for ( i = 0; i < poly->nrings; i ++ ) + { + v += poly->rings[i]->npoints; + } + return v; +} + +LWPOLY* lwpoly_simplify(const LWPOLY *ipoly, double dist) +{ + int i; + LWPOLY *opoly = lwpoly_construct_empty(ipoly->srid, FLAGS_GET_Z(ipoly->flags), FLAGS_GET_M(ipoly->flags)); + + LWDEBUGF(2, "simplify_polygon3d: simplifying polygon with %d rings", ipoly->nrings); + + if( lwpoly_is_empty(ipoly) ) + return opoly; + + for (i = 0; i < ipoly->nrings; i++) + { + POINTARRAY *opts = ptarray_simplify(ipoly->rings[i], dist, 3); + + /* Less points than are needed to form a closed ring, we can't use this */ + if ( i && opts->npoints < 4 ) + { + LWDEBUGF(3, "ring%d skipped (% pts)", i, opts->npoints); + ptarray_free(opts); + continue; + } + + LWDEBUGF(3, "ring%d simplified from %d to %d points", i, ipoly->rings[i]->npoints, opts->npoints); + + /* Add ring to simplified polygon */ + if( lwpoly_add_ring(opoly, opts) == LW_FAILURE ) + return NULL; + + /* Don't scan holes if shell is collapsed */ + if ( !i && opts->npoints < 4 ) + { + LWDEBUG(3, "nothing more to do for collapsed shell"); + break; + } + } + + LWDEBUGF(3, "simplified polygon with %d rings", ipoly->nrings); + opoly->type = ipoly->type; + return opoly; +} + +/** + * Find the area of the outer ring - sum (area of inner rings). + * Could use a more numerically stable calculator... + */ +double +lwpoly_area(const LWPOLY *poly) +{ + double poly_area=0.0; + int i; + POINT2D pp; + POINT2D cp; + POINT2D np; + double x0 = cp.x; + + LWDEBUGF(2, "in lwpoly_area (%d rings)", poly->nrings); + + for (i=0; inrings; i++) + { + int j; + POINTARRAY *ring = poly->rings[i]; + double ringarea = 0.0; + + LWDEBUGF(4, " rings %d has %d points", i, ring->npoints); + + if ( ! ring->npoints ) continue; /* empty ring */ + + getPoint2d_p(ring, 0, &cp); + getPoint2d_p(ring, 1, &np); + x0 = cp.x; + np.x -= x0; + for (j=0; jnpoints-1; j++) + { + pp.y = cp.y; + cp.x = np.x; + cp.y = np.y; + getPoint2d_p(ring, j+1, &np); + np.x -= x0; + ringarea += cp.x * (np.y - pp.y); + } + + ringarea /= 2.0; + + LWDEBUGF(4, " ring 1 has area %lf",ringarea); + + ringarea = fabs(ringarea); + if (i != 0) /*outer */ + ringarea = -1.0*ringarea ; /* its a hole */ + + poly_area += ringarea; + } + + return poly_area; +} + + +/** + * Compute the sum of polygon rings length. + * Could use a more numerically stable calculator... + */ +double +lwpoly_perimeter(const LWPOLY *poly) +{ + double result=0.0; + int i; + + LWDEBUGF(2, "in lwgeom_polygon_perimeter (%d rings)", poly->nrings); + + for (i=0; inrings; i++) + result += ptarray_length(poly->rings[i]); + + return result; +} + +/** + * Compute the sum of polygon rings length (forcing 2d computation). + * Could use a more numerically stable calculator... + */ +double +lwpoly_perimeter_2d(const LWPOLY *poly) +{ + double result=0.0; + int i; + + LWDEBUGF(2, "in lwgeom_polygon_perimeter (%d rings)", poly->nrings); + + for (i=0; inrings; i++) + result += ptarray_length_2d(poly->rings[i]); + + return result; +} + +int +lwpoly_is_closed(const LWPOLY *poly) +{ + int i = 0; + + if ( poly->nrings == 0 ) + return LW_TRUE; + + for ( i = 0; i < poly->nrings; i++ ) + { + if (FLAGS_GET_Z(poly->flags)) + { + if ( ! ptarray_isclosed3d(poly->rings[i]) ) + return LW_FALSE; + } + else + { + if ( ! ptarray_isclosed2d(poly->rings[i]) ) + return LW_FALSE; + } + } + + return LW_TRUE; +} + + + diff -Nru postgis-1.5.3/liblwgeom/lwprint.c postgis-2.0.1/liblwgeom/lwprint.c --- postgis-1.5.3/liblwgeom/lwprint.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwprint.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,404 @@ +/********************************************************************** + * $Id: lwprint.c 9324 2012-02-27 22:08:12Z pramsey $ + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include +#include +#include "liblwgeom_internal.h" + +/* Ensures the given lat and lon are in the "normal" range: + * -90 to +90 for lat, -180 to +180 for lon. */ +static void lwprint_normalize_latlon(double *lat, double *lon) +{ + /* First remove all the truly excessive trips around the world via up or down. */ + while (*lat > 270) + { + *lat -= 360; + } + while (*lat < -270) + { + *lat += 360; + } + + /* Now see if latitude is past the top or bottom of the world. + * Past 90 or -90 puts us on the other side of the earth, + * so wrap latitude and add 180 to longitude to reflect that. */ + if (*lat > 90) + { + *lat = 180 - *lat; + *lon += 180; + } + if (*lat < -90) + { + *lat = -180 - *lat; + *lon += 180; + } + /* Now make sure lon is in the normal range. Wrapping longitude + * has no effect on latitude. */ + while (*lon > 180) + { + *lon -= 360; + } + while (*lon < -180) + { + *lon += 360; + } +} + +/* Converts a single double to DMS given the specified DMS format string. + * Symbols are specified since N/S or E/W are the only differences when printing + * lat vs. lon. They are only used if the "C" (compass dir) token appears in the + * format string. + * NOTE: Format string and symbols are required to be in UTF-8. */ +static char * lwdouble_to_dms(double val, const char *pos_dir_symbol, const char *neg_dir_symbol, const char * format) +{ + /* 3 numbers, 1 sign or compass dir, and 5 possible strings (degree signs, spaces, misc text, etc) between or around them.*/ + const int NUM_PIECES = 9; + const int WORK_SIZE = 1024; + char pieces[NUM_PIECES][WORK_SIZE]; + int current_piece = 0; + int is_negative = 0; + + double degrees = 0.0; + double minutes = 0.0; + double seconds = 0.0; + + int compass_dir_piece = -1; + + int reading_deg = 0; + int deg_digits = 0; + int deg_has_decpoint = 0; + int deg_dec_digits = 0; + int deg_piece = -1; + + int reading_min = 0; + int min_digits = 0; + int min_has_decpoint = 0; + int min_dec_digits = 0; + int min_piece = -1; + + int reading_sec = 0; + int sec_digits = 0; + int sec_has_decpoint = 0; + int sec_dec_digits = 0; + int sec_piece = -1; + + int format_length = ((NULL == format) ? 0 : strlen(format)); + + char * result; + + int index, following_byte_index; + int multibyte_char_width = 1; + + /* Initialize the working strs to blank. We may not populate all of them, and + * this allows us to concat them all at the end without worrying about how many + * we actually needed. */ + for (index = 0; index < NUM_PIECES; index++) + { + pieces[index][0] = '\0'; + } + + /* If no format is provided, use a default. */ + if (0 == format_length) + { + /* C2B0 is UTF-8 for the degree symbol. */ + format = "D\xC2\xB0""M'S.SSS\"C"; + format_length = strlen(format); + } + else if (format_length > WORK_SIZE) + { + /* Sanity check, we don't want to overwrite an entire piece of work and no one should need a 1K-sized + * format string anyway. */ + lwerror("Bad format, exceeds maximum length (%d).", WORK_SIZE); + } + + for (index = 0; index < format_length; index++) + { + char next_char = format[index]; + switch (next_char) + { + case 'D': + if (reading_deg) + { + /* If we're reading degrees, add another digit. */ + deg_has_decpoint ? deg_dec_digits++ : deg_digits++; + } + else + { + /* If we're not reading degrees, we are now. */ + current_piece++; + deg_piece = current_piece; + if (deg_digits > 0) + { + lwerror("Bad format, cannot include degrees (DD.DDD) more than once."); + } + reading_deg = 1; + reading_min = 0; + reading_sec = 0; + deg_digits++; + } + break; + case 'M': + if (reading_min) + { + /* If we're reading minutes, add another digit. */ + min_has_decpoint ? min_dec_digits++ : min_digits++; + } + else + { + /* If we're not reading minutes, we are now. */ + current_piece++; + min_piece = current_piece; + if (min_digits > 0) + { + lwerror("Bad format, cannot include minutes (MM.MMM) more than once."); + } + reading_deg = 0; + reading_min = 1; + reading_sec = 0; + min_digits++; + } + break; + case 'S': + if (reading_sec) + { + /* If we're reading seconds, add another digit. */ + sec_has_decpoint ? sec_dec_digits++ : sec_digits++; + } + else + { + /* If we're not reading seconds, we are now. */ + current_piece++; + sec_piece = current_piece; + if (sec_digits > 0) + { + lwerror("Bad format, cannot include seconds (SS.SSS) more than once."); + } + reading_deg = 0; + reading_min = 0; + reading_sec = 1; + sec_digits++; + } + break; + case 'C': + /* We're done reading anything else we might have been reading. */ + if (reading_deg || reading_min || reading_sec) + { + /* We were reading something, that means this is the next piece. */ + reading_deg = 0; + reading_min = 0; + reading_sec = 0; + } + current_piece++; + + if (compass_dir_piece >= 0) + { + lwerror("Bad format, cannot include compass dir (C) more than once."); + } + /* The compass dir is a piece all by itself. */ + compass_dir_piece = current_piece; + current_piece++; + break; + case '.': + /* If we're reading deg, min, or sec, we want a decimal point for it. */ + if (reading_deg) + { + deg_has_decpoint = 1; + } + else if (reading_min) + { + min_has_decpoint = 1; + } + else if (reading_sec) + { + sec_has_decpoint = 1; + } + else + { + /* Not reading anything, just pass through the '.' */ + strncat(pieces[current_piece], &next_char, 1); + } + break; + default: + /* Any other char is just passed through unchanged. But it does mean we are done reading D, M, or S.*/ + if (reading_deg || reading_min || reading_sec) + { + /* We were reading something, that means this is the next piece. */ + current_piece++; + reading_deg = 0; + reading_min = 0; + reading_sec = 0; + } + + /* Check if this is a multi-byte UTF-8 character. If so go ahead and read the rest of the bytes as well. */ + multibyte_char_width = 1; + if (next_char & 0x80) + { + if ((next_char & 0xF8) == 0xF0) + { + multibyte_char_width += 3; + } + else if ((next_char & 0xF0) == 0xE0) + { + multibyte_char_width += 2; + } + else if ((next_char & 0xE0) == 0xC0) + { + multibyte_char_width += 1; + } + else + { + lwerror("Bad format, invalid high-order byte found first, format string may not be UTF-8."); + } + } + if (multibyte_char_width > 1) + { + if (index + multibyte_char_width >= format_length) + { + lwerror("Bad format, UTF-8 character first byte found with insufficient following bytes, format string may not be UTF-8."); + } + for (following_byte_index = (index + 1); following_byte_index < (index + multibyte_char_width); following_byte_index++) + { + if ((format[following_byte_index] & 0xC0) != 0x80) + { + lwerror("Bad format, invalid byte found following leading byte of multibyte character, format string may not be UTF-8."); + } + } + } + /* Copy all the character's bytes into the current piece. */ + strncat(pieces[current_piece], &(format[index]), multibyte_char_width); + /* Now increment index past the rest of those bytes. */ + index += multibyte_char_width - 1; + break; + } + if (current_piece >= NUM_PIECES) + { + lwerror("Internal error, somehow needed more pieces than it should."); + } + } + if (deg_piece < 0) + { + lwerror("Bad format, degrees (DD.DDD) must be included."); + } + + /* Divvy the number up into D, DM, or DMS */ + if (val < 0) + { + val *= -1; + is_negative = 1; + } + degrees = val; + if (min_digits > 0) + { + degrees = (long)degrees; + minutes = (val - degrees) * 60; + } + if (sec_digits > 0) + { + if (0 == min_digits) + { + lwerror("Bad format, cannot include seconds (SS.SSS) without including minutes (MM.MMM)."); + } + minutes = (long)minutes; + seconds = (val - (degrees + (minutes / 60))) * 3600; + } + + /* Handle the compass direction. If not using compass dir, display degrees as a positive/negative number. */ + if (compass_dir_piece >= 0) + { + strcpy(pieces[compass_dir_piece], is_negative ? neg_dir_symbol : pos_dir_symbol); + } + else if (is_negative) + { + degrees *= -1; + } + + /* Format the degrees into their string piece. */ + if (deg_digits + deg_dec_digits + 2 > WORK_SIZE) + { + lwerror("Bad format, degrees (DD.DDD) number of digits was greater than our working limit."); + } + sprintf(pieces[deg_piece], "%*.*f", deg_digits, deg_dec_digits, degrees); + + if (min_piece >= 0) + { + /* Format the minutes into their string piece. */ + if (min_digits + min_dec_digits + 2 > WORK_SIZE) + { + lwerror("Bad format, minutes (MM.MMM) number of digits was greater than our working limit."); + } + sprintf(pieces[min_piece], "%*.*f", min_digits, min_dec_digits, minutes); + } + if (sec_piece >= 0) + { + /* Format the seconds into their string piece. */ + if (sec_digits + sec_dec_digits + 2 > WORK_SIZE) + { + lwerror("Bad format, seconds (SS.SSS) number of digits was greater than our working limit."); + } + sprintf(pieces[sec_piece], "%*.*f", sec_digits, sec_dec_digits, seconds); + } + + /* Allocate space for the result. Leave plenty of room for excess digits, negative sign, etc.*/ + result = (char*)lwalloc(format_length + WORK_SIZE); + /* Append all the pieces together. There may be less than 9, but in that case the rest will be blank. */ + strcpy(result, pieces[0]); + for (index = 1; index < NUM_PIECES; index++) + { + strcat(result, pieces[index]); + } + + return result; +} + +/* Print two doubles (lat and lon) in DMS form using the specified format. + * First normalizes them so they will display as -90 to 90 and -180 to 180. + * Format string may be null or 0-length, in which case a default format will be used. + * NOTE: Format string is required to be in UTF-8. + * NOTE2: returned string is lwalloc'ed, caller is responsible to lwfree it up + */ +static char * lwdoubles_to_latlon(double lat, double lon, const char * format) +{ + char * lat_text; + char * lon_text; + char * result; + + /* Normalize lat/lon to the normal (-90 to 90, -180 to 180) range. */ + lwprint_normalize_latlon(&lat, &lon); + /* This is somewhat inefficient as the format is parsed twice. */ + lat_text = lwdouble_to_dms(lat, "N", "S", format); + lon_text = lwdouble_to_dms(lon, "E", "W", format); + + /* lat + lon + a space between + the null terminator. */ + result = (char*)lwalloc(strlen(lat_text) + strlen(lon_text) + 2); + sprintf(result, "%s %s", lat_text, lon_text); + lwfree(lat_text); + lwfree(lon_text); + return result; +} + +/* Print the X (lon) and Y (lat) of the given point in DMS form using + * the specified format. + * First normalizes the values so they will display as -90 to 90 and -180 to 180. + * Format string may be null or 0-length, in which case a default format will be used. + * NOTE: Format string is required to be in UTF-8. + * NOTE2: returned string is lwalloc'ed, caller is responsible to lwfree it up + */ +char* lwpoint_to_latlon(const LWPOINT * pt, const char *format) +{ + POINT2D p; + if (NULL == pt) + { + lwerror("Cannot convert a null point into formatted text."); + } + if (lwgeom_is_empty((LWGEOM *)pt)) + { + lwerror("Cannot convert an empty point into formatted text."); + } + getPoint2d_p(pt->point, 0, &p); + return lwdoubles_to_latlon(p.y, p.x, format); +} diff -Nru postgis-1.5.3/liblwgeom/lwpsurface.c postgis-2.0.1/liblwgeom/lwpsurface.c --- postgis-1.5.3/liblwgeom/lwpsurface.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwpsurface.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,191 @@ +/********************************************************************** + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * + * Copyright (C) 2001-2006 Refractions Research Inc. + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include +#include +#include +#include "liblwgeom_internal.h" +#include "lwgeom_log.h" + + +LWPSURFACE* lwpsurface_add_lwpoly(LWPSURFACE *mobj, const LWPOLY *obj) +{ + return (LWPSURFACE*)lwcollection_add_lwgeom((LWCOLLECTION*)mobj, (LWGEOM*)obj); +} + + +void lwpsurface_free(LWPSURFACE *psurf) +{ + int i; + if ( ! psurf ) return; + if ( psurf->bbox ) + lwfree(psurf->bbox); + + for ( i = 0; i < psurf->ngeoms; i++ ) + if ( psurf->geoms && psurf->geoms[i] ) + lwpoly_free(psurf->geoms[i]); + + if ( psurf->geoms ) + lwfree(psurf->geoms); + + lwfree(psurf); +} + + +void printLWPSURFACE(LWPSURFACE *psurf) +{ + int i, j; + LWPOLY *patch; + + if (psurf->type != POLYHEDRALSURFACETYPE) + lwerror("printLWPSURFACE called with something else than a POLYHEDRALSURFACE"); + + lwnotice("LWPSURFACE {"); + lwnotice(" ndims = %i", (int)FLAGS_NDIMS(psurf->flags)); + lwnotice(" SRID = %i", (int)psurf->srid); + lwnotice(" ngeoms = %i", (int)psurf->ngeoms); + + for (i=0; ingeoms; i++) + { + patch = (LWPOLY *) psurf->geoms[i]; + for (j=0; jnrings; j++) + { + lwnotice(" RING # %i :",j); + printPA(patch->rings[j]); + } + } + lwnotice("}"); +} + + + + +/* + * TODO rewrite all this stuff to be based on a truly topological model + */ + +struct struct_psurface_arcs +{ + double ax, ay, az; + double bx, by, bz; + int cnt, face; +}; +typedef struct struct_psurface_arcs *psurface_arcs; + +/* We supposed that the geometry is valid + we could have wrong result if not */ +int lwpsurface_is_closed(const LWPSURFACE *psurface) +{ + int i, j, k; + int narcs, carc; + int found; + psurface_arcs arcs; + POINT4D pa, pb; + LWPOLY *patch; + + /* If surface is not 3D, it's can't be closed */ + if (!FLAGS_GET_Z(psurface->flags)) return 0; + + /* If surface is less than 4 faces hard to be closed too */ + if (psurface->ngeoms < 4) return 0; + + /* Max theorical arcs number if no one is shared ... */ + for (i=0, narcs=0 ; i < psurface->ngeoms ; i++) + { + patch = (LWPOLY *) psurface->geoms[i]; + narcs += patch->rings[0]->npoints - 1; + } + + arcs = lwalloc(sizeof(struct struct_psurface_arcs) * narcs); + for (i=0, carc=0; i < psurface->ngeoms ; i++) + { + + patch = (LWPOLY *) psurface->geoms[i]; + for (j=0; j < patch->rings[0]->npoints - 1; j++) + { + + getPoint4d_p(patch->rings[0], j, &pa); + getPoint4d_p(patch->rings[0], j+1, &pb); + + /* remove redundant points if any */ + if (pa.x == pb.x && pa.y == pb.y && pa.z == pb.z) continue; + + /* Make sure to order the 'lower' point first */ + if ( (pa.x > pb.x) || + (pa.x == pb.x && pa.y > pb.y) || + (pa.x == pb.x && pa.y == pb.y && pa.z > pb.z) ) + { + pa = pb; + getPoint4d_p(patch->rings[0], j, &pb); + } + + for (found=0, k=0; k < carc ; k++) + { + + if ( ( arcs[k].ax == pa.x && arcs[k].ay == pa.y && + arcs[k].az == pa.z && arcs[k].bx == pb.x && + arcs[k].by == pb.y && arcs[k].bz == pb.z && + arcs[k].face != i) ) + { + arcs[k].cnt++; + found = 1; + + /* Look like an invalid PolyhedralSurface + anyway not a closed one */ + if (arcs[k].cnt > 2) + { + lwfree(arcs); + return 0; + } + } + } + + if (!found) + { + arcs[carc].cnt=1; + arcs[carc].face=i; + arcs[carc].ax = pa.x; + arcs[carc].ay = pa.y; + arcs[carc].az = pa.z; + arcs[carc].bx = pb.x; + arcs[carc].by = pb.y; + arcs[carc].bz = pb.z; + carc++; + + /* Look like an invalid PolyhedralSurface + anyway not a closed one */ + if (carc > narcs) + { + lwfree(arcs); + return 0; + } + } + } + } + + /* A polyhedron is closed if each edge + is shared by exactly 2 faces */ + for (k=0; k < carc ; k++) + { + if (arcs[k].cnt != 2) + { + lwfree(arcs); + return 0; + } + } + lwfree(arcs); + + /* Invalid Polyhedral case */ + if (carc < psurface->ngeoms) return 0; + + return 1; +} diff -Nru postgis-1.5.3/liblwgeom/lwsegmentize.c postgis-2.0.1/liblwgeom/lwsegmentize.c --- postgis-1.5.3/liblwgeom/lwsegmentize.c 2010-02-01 17:35:55.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwsegmentize.c 2012-02-27 22:08:12.000000000 +0000 @@ -1,5 +1,5 @@ /********************************************************************** - * $Id: lwsegmentize.c 5181 2010-02-01 17:35:55Z pramsey $ + * $Id: lwsegmentize.c 9324 2012-02-27 22:08:12Z pramsey $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net @@ -14,21 +14,16 @@ #include #include #include -#include -#include "liblwgeom.h" +#include "liblwgeom_internal.h" +#include "lwgeom_log.h" -double interpolate_arc(double angle, double zm1, double a1, double zm2, double a2); -POINTARRAY *lwcircle_segmentize(POINT4D *p1, POINT4D *p2, POINT4D *p3, uint32 perQuad); -LWLINE *lwcurve_segmentize(LWCIRCSTRING *icurve, uint32 perQuad); -LWLINE *lwcompound_segmentize(LWCOMPOUND *icompound, uint32 perQuad); -LWPOLY *lwcurvepoly_segmentize(LWCURVEPOLY *curvepoly, uint32 perQuad); -LWMLINE *lwmcurve_segmentize(LWMCURVE *mcurve, uint32 perQuad); -LWMPOLY *lwmsurface_segmentize(LWMSURFACE *msurface, uint32 perQuad); -LWCOLLECTION *lwcollection_segmentize(LWCOLLECTION *collection, uint32 perQuad); -LWGEOM *append_segment(LWGEOM *geom, POINTARRAY *pts, int type, int SRID); -LWGEOM *pta_desegmentize(POINTARRAY *points, int type, int SRID); +LWMLINE *lwmcurve_segmentize(LWMCURVE *mcurve, uint32_t perQuad); +LWMPOLY *lwmsurface_segmentize(LWMSURFACE *msurface, uint32_t perQuad); +LWCOLLECTION *lwcollection_segmentize(LWCOLLECTION *collection, uint32_t perQuad); + +LWGEOM *pta_desegmentize(POINTARRAY *points, int type, int srid); LWGEOM *lwline_desegmentize(LWLINE *line); LWGEOM *lwpolygon_desegmentize(LWPOLY *poly); LWGEOM *lwmline_desegmentize(LWMLINE *mline); @@ -36,7 +31,6 @@ LWGEOM *lwgeom_desegmentize(LWGEOM *geom); - /* * Tolerance used to determine equality. */ @@ -46,33 +40,37 @@ * Determines (recursively in the case of collections) whether the geometry * contains at least on arc geometry or segment. */ -uint32 -has_arc(LWGEOM *geom) +int +lwgeom_has_arc(const LWGEOM *geom) { LWCOLLECTION *col; int i; - LWDEBUG(2, "has_arc called."); + LWDEBUG(2, "lwgeom_has_arc called."); - switch (lwgeom_getType(geom->type)) + switch (geom->type) { case POINTTYPE: case LINETYPE: case POLYGONTYPE: + case TRIANGLETYPE: case MULTIPOINTTYPE: case MULTILINETYPE: case MULTIPOLYGONTYPE: - return 0; + case POLYHEDRALSURFACETYPE: + case TINTYPE: + return LW_FALSE; case CIRCSTRINGTYPE: - return 1; - /* It's a collection that MAY contain an arc */ + return LW_TRUE; + /* It's a collection that MAY contain an arc */ default: col = (LWCOLLECTION *)geom; for (i=0; ingeoms; i++) { - if (has_arc(col->geoms[i]) == 1) return 1; + if (lwgeom_has_arc(col->geoms[i]) == LW_TRUE) + return LW_TRUE; } - return 0; + return LW_FALSE; } } @@ -84,25 +82,26 @@ * point is coincident with either end point, they are taken as colinear. */ double -lwcircle_center(POINT4D *p1, POINT4D *p2, POINT4D *p3, POINT4D **result) +lwcircle_center(const POINT4D *p1, const POINT4D *p2, const POINT4D *p3, POINT4D *result) { - POINT4D *c; + POINT4D c; double cx, cy, cr; double temp, bc, cd, det; - LWDEBUGF(2, "lwcircle_center called (%.16f, %.16f), (%.16f, %.16f), (%.16f, %.16f).", p1->x, p1->y, p2->x, p2->y, p3->x, p3->y); + c.x = c.y = c.z = c.m = 0.0; + + LWDEBUGF(2, "lwcircle_center called (%.16f,%.16f), (%.16f,%.16f), (%.16f,%.16f).", p1->x, p1->y, p2->x, p2->y, p3->x, p3->y); /* Closed circle */ - if (fabs(p1->x - p3->x) < EPSILON_SQLMM - && fabs(p1->y - p3->y) < EPSILON_SQLMM) + if (fabs(p1->x - p3->x) < EPSILON_SQLMM && + fabs(p1->y - p3->y) < EPSILON_SQLMM) { cx = p1->x + (p2->x - p1->x) / 2.0; cy = p1->y + (p2->y - p1->y) / 2.0; - c = lwalloc(sizeof(POINT2D)); - c->x = cx; - c->y = cy; + c.x = cx; + c.y = cy; *result = c; - cr = sqrt((cx-p1->x)*(cx-p1->x)+(cy-p1->y)*(cy-p1->y)); + cr = sqrt(pow(cx - p1->x, 2.0) + pow(cy - p1->y, 2.0)); return cr; } @@ -113,291 +112,234 @@ /* Check colinearity */ if (fabs(det) < EPSILON_SQLMM) - { - *result = NULL; return -1.0; - } + det = 1.0 / det; cx = (bc*(p2->y - p3->y)-cd*(p1->y - p2->y))*det; cy = ((p1->x - p2->x)*cd-(p2->x - p3->x)*bc)*det; - c = lwalloc(sizeof(POINT4D)); - c->x = cx; - c->y = cy; + c.x = cx; + c.y = cy; *result = c; cr = sqrt((cx-p1->x)*(cx-p1->x)+(cy-p1->y)*(cy-p1->y)); + + LWDEBUGF(2, "lwcircle_center center is (%.16f,%.16f)", result->x, result->y); + return cr; } -double -interpolate_arc(double angle, double zm1, double a1, double zm2, double a2) -{ - double frac = fabs((angle - a1) / (a2 - a1)); - double result = frac * (zm2 - zm1) + zm1; - - LWDEBUG(2, "interpolate_arc called."); - - LWDEBUGF(3, "interpolate_arc: angle=%.16f, a1=%.16f, a2=%.16f, z1=%.16f, z2=%.16f, frac=%.16f, result=%.16f", angle, a1, a2, zm1, zm2, frac, result); - - return result; -} /******************************************************************************* * Begin curve segmentize functions ******************************************************************************/ -POINTARRAY * -lwcircle_segmentize(POINT4D *p1, POINT4D *p2, POINT4D *p3, uint32 perQuad) +static double interpolate_arc(double angle, double a1, double a2, double a3, double zm1, double zm2, double zm3) { - POINTARRAY *result; - POINT4D pbuf; - size_t ptsize = sizeof(POINT4D); - unsigned int ptcount; - uchar *pt; - - POINT4D *center; - double radius = 0.0, - sweep = 0.0, - angle = 0.0, - increment = 0.0; - double a1, a2, a3, i; - - LWDEBUG(2, "lwcircle_segmentize called. "); - - radius = lwcircle_center(p1, p2, p3, ¢er); - if (radius < 0) - { - /* No center because points are colinear */ - LWDEBUGF(3, "lwcircle_segmentize, (NULL) radius=%.16f", radius); - - return NULL; - } - - LWDEBUGF(3, "lwcircle_segmentize, (%.16f, %.16f) radius=%.16f", center->x, center->y, radius); - - a1 = atan2(p1->y - center->y, p1->x - center->x); - a2 = atan2(p2->y - center->y, p2->x - center->x); - a3 = atan2(p3->y - center->y, p3->x - center->x); - - LWDEBUGF(3, "a1 = %.16f, a2 = %.16f, a3 = %.16f", a1, a2, a3); - - if (fabs(p1->x - p3->x) < EPSILON_SQLMM - && fabs(p1->y - p3->y) < EPSILON_SQLMM) - { - sweep = 2*M_PI; - } - /* Clockwise */ - else if (a1 > a2 && a2 > a3) + LWDEBUGF(4,"angle %.05g a1 %.05g a2 %.05g a3 %.05g zm1 %.05g zm2 %.05g zm3 %.05g",angle,a1,a2,a3,zm1,zm2,zm3); + /* Counter-clockwise sweep */ + if ( a1 < a2 ) { - sweep = a3 - a1; - } - /* Counter-clockwise */ - else if (a1 < a2 && a2 < a3) - { - sweep = a3 - a1; - } - /* Clockwise, wrap */ - else if ((a1 < a2 && a1 > a3) || (a2 < a3 && a1 > a3)) - { - sweep = a3 - a1 + 2*M_PI; - } - /* Counter-clockwise, wrap */ - else if ((a1 > a2 && a1 < a3) || (a2 > a3 && a1 < a3)) - { - sweep = a3 - a1 - 2*M_PI; + if ( angle <= a2 ) + return zm1 + (zm2-zm1) * (angle-a1) / (a2-a1); + else + return zm2 + (zm3-zm2) * (angle-a2) / (a3-a2); } + /* Clockwise sweep */ else { - sweep = 0.0; + if ( angle >= a2 ) + return zm1 + (zm2-zm1) * (a1-angle) / (a1-a2); + else + return zm2 + (zm3-zm2) * (a2-angle) / (a2-a3); } +} - ptcount = ceil(fabs(perQuad * sweep / M_PI_2)); - - result = ptarray_construct(1, 1, ptcount); +static POINTARRAY * +lwcircle_segmentize(POINT4D *p1, POINT4D *p2, POINT4D *p3, uint32_t perQuad) +{ + POINT4D center; + POINT4D pt; + int p2_side = 0; + int clockwise = LW_TRUE; + double radius; /* Arc radius */ + double increment; /* Angle per segment */ + double a1, a2, a3, angle; + POINTARRAY *pa; + int result; + int is_circle = LW_FALSE; - increment = M_PI_2 / perQuad; - if (sweep < 0) increment *= -1.0; - angle = a1; + LWDEBUG(2, "lwcircle_calculate_gbox called."); - LWDEBUGF(3, "ptcount: %d, perQuad: %d, sweep: %.16f, increment: %.16f", ptcount, perQuad, sweep, increment); + radius = lwcircle_center(p1, p2, p3, ¢er); + p2_side = signum(lw_segment_side((POINT2D*)p1, (POINT2D*)p3, (POINT2D*)p2)); - for (i = 0; i < ptcount - 1; i++) - { - pt = getPoint_internal(result, i); - angle += increment; - if (increment > 0.0 && angle > M_PI) angle -= 2*M_PI; - if (increment < 0.0 && angle < -1*M_PI) angle -= 2*M_PI; - pbuf.x = center->x + radius*cos(angle); - pbuf.y = center->y + radius*sin(angle); - if ((sweep > 0 && angle < a2) || (sweep < 0 && angle > a2)) - { - if ((sweep > 0 && a1 < a2) || (sweep < 0 && a1 > a2)) - { - pbuf.z = interpolate_arc(angle, p1->z, a1, p2->z, a2); - pbuf.m = interpolate_arc(angle, p1->m, a1, p2->m, a2); - } - else - { - if (sweep > 0) - { - pbuf.z = interpolate_arc(angle, p1->z, a1-(2*M_PI), p2->z, a2); - pbuf.m = interpolate_arc(angle, p1->m, a1-(2*M_PI), p2->m, a2); - } - else - { - pbuf.z = interpolate_arc(angle, p1->z, a1+(2*M_PI), p2->z, a2); - pbuf.m = interpolate_arc(angle, p1->m, a1+(2*M_PI), p2->m, a2); - } - } - } - else - { - if ((sweep > 0 && a2 < a3) || (sweep < 0 && a2 > a3)) - { - pbuf.z = interpolate_arc(angle, p2->z, a2, p3->z, a3); - pbuf.m = interpolate_arc(angle, p2->m, a2, p3->m, a3); - } - else - { - if (sweep > 0) - { - pbuf.z = interpolate_arc(angle, p2->z, a2-(2*M_PI), p3->z, a3); - pbuf.m = interpolate_arc(angle, p2->m, a2-(2*M_PI), p3->m, a3); - } - else - { - pbuf.z = interpolate_arc(angle, p2->z, a2+(2*M_PI), p3->z, a3); - pbuf.m = interpolate_arc(angle, p2->m, a2+(2*M_PI), p3->m, a3); - } - } - } - memcpy(pt, (uchar *)&pbuf, ptsize); + /* Matched start/end points imply circle */ + if ( p1->x == p3->x && p1->y == p3->y ) + is_circle = LW_TRUE; + + /* Negative radius signals straight line, p1/p2/p3 are colinear */ + if ( radius < 0.0 || p2_side == 0 ) + return NULL; + + /* The side of the p1/p3 line that p2 falls on dictates the sweep + direction from p1 to p3. */ + if ( p2_side == -1 ) + clockwise = LW_TRUE; + else + clockwise = LW_FALSE; + + increment = fabs(M_PI_2 / perQuad); + + /* Angles of each point that defines the arc section */ + a1 = atan2(p1->y - center.y, p1->x - center.x); + a2 = atan2(p2->y - center.y, p2->x - center.x); + a3 = atan2(p3->y - center.y, p3->x - center.x); + + /* p2 on left side => clockwise sweep */ + if ( clockwise ) + { + increment *= -1; + /* Adjust a3 down so we can decrement from a1 to a3 cleanly */ + if ( a3 > a1 ) + a3 -= 2.0 * M_PI; + if ( a2 > a1 ) + a2 -= 2.0 * M_PI; } - - pt = getPoint_internal(result, ptcount - 1); - memcpy(pt, (uchar *)p3, ptsize); - - lwfree(center); - - return result; + /* p2 on right side => counter-clockwise sweep */ + else + { + /* Adjust a3 up so we can increment from a1 to a3 cleanly */ + if ( a3 < a1 ) + a3 += 2.0 * M_PI; + if ( a2 < a1 ) + a2 += 2.0 * M_PI; + } + + /* Override angles for circle case */ + if( is_circle ) + { + a3 = a1 + 2.0 * M_PI; + a2 = a1 + M_PI; + increment = fabs(increment); + clockwise = LW_FALSE; + } + + /* Initialize point array */ + pa = ptarray_construct_empty(1, 1, 32); + + /* Sweep from a1 to a3 */ + for ( angle = a1; clockwise ? angle > a3 : angle < a3; angle += increment ) + { + pt.x = center.x + radius * cos(angle); + pt.y = center.y + radius * sin(angle); + pt.z = interpolate_arc(angle, a1, a2, a3, p1->z, p2->z, p3->z); + pt.m = interpolate_arc(angle, a1, a2, a3, p1->m, p2->m, p3->m); + result = ptarray_append_point(pa, &pt, LW_FALSE); + } + return pa; } LWLINE * -lwcurve_segmentize(LWCIRCSTRING *icurve, uint32 perQuad) +lwcircstring_segmentize(const LWCIRCSTRING *icurve, uint32_t perQuad) { LWLINE *oline; - DYNPTARRAY *ptarray; + POINTARRAY *ptarray; POINTARRAY *tmp; - uint32 i, j; - POINT4D *p1 = lwalloc(sizeof(POINT4D)); - POINT4D *p2 = lwalloc(sizeof(POINT4D)); - POINT4D *p3 = lwalloc(sizeof(POINT4D)); - POINT4D *p4 = lwalloc(sizeof(POINT4D)); + uint32_t i, j; + POINT4D p1, p2, p3, p4; + LWDEBUGF(2, "lwcircstring_segmentize called., dim = %d", icurve->points->flags); - LWDEBUGF(2, "lwcurve_segmentize called., dim = %d", icurve->points->dims); - - ptarray = dynptarray_create(icurve->points->npoints, icurve->points->dims); - if (!getPoint4d_p(icurve->points, 0, p4)) - { - lwerror("lwcurve_segmentize: Cannot extract point."); - } - dynptarray_addPoint4d(ptarray, p4, 1); + ptarray = ptarray_construct_empty(FLAGS_GET_Z(icurve->points->flags), FLAGS_GET_M(icurve->points->flags), 64); for (i = 2; i < icurve->points->npoints; i+=2) { - LWDEBUGF(3, "lwcurve_segmentize: arc ending at point %d", i); + LWDEBUGF(3, "lwcircstring_segmentize: arc ending at point %d", i); - getPoint4d_p(icurve->points, i - 2, p1); - getPoint4d_p(icurve->points, i - 1, p2); - getPoint4d_p(icurve->points, i, p3); - tmp = lwcircle_segmentize(p1, p2, p3, perQuad); + getPoint4d_p(icurve->points, i - 2, &p1); + getPoint4d_p(icurve->points, i - 1, &p2); + getPoint4d_p(icurve->points, i, &p3); + tmp = lwcircle_segmentize(&p1, &p2, &p3, perQuad); if (tmp) { - LWDEBUGF(3, "lwcurve_segmentize: generated %d points", tmp->npoints); + LWDEBUGF(3, "lwcircstring_segmentize: generated %d points", tmp->npoints); for (j = 0; j < tmp->npoints; j++) { - getPoint4d_p(tmp, j, p4); - dynptarray_addPoint4d(ptarray, p4, 1); + getPoint4d_p(tmp, j, &p4); + ptarray_append_point(ptarray, &p4, LW_TRUE); } - lwfree(tmp); + ptarray_free(tmp); } else { - LWDEBUG(3, "lwcurve_segmentize: points are colinear, returning curve points as line"); + LWDEBUG(3, "lwcircstring_segmentize: points are colinear, returning curve points as line"); for (j = i - 1 ; j <= i ; j++) { - getPoint4d_p(icurve->points, j, p4); - dynptarray_addPoint4d(ptarray, p4, 1); + getPoint4d_p(icurve->points, j, &p4); + ptarray_append_point(ptarray, &p4, LW_TRUE); } } } - oline = lwline_construct(icurve->SRID, NULL, ptarray_clone(ptarray->pa)); - - lwfree(p1); - lwfree(p2); - lwfree(p3); - lwfree(p4); - lwfree(ptarray); + getPoint4d_p(icurve->points, icurve->points->npoints-1, &p1); + ptarray_append_point(ptarray, &p1, LW_TRUE); + + oline = lwline_construct(icurve->srid, NULL, ptarray); return oline; } LWLINE * -lwcompound_segmentize(LWCOMPOUND *icompound, uint32 perQuad) +lwcompound_segmentize(const LWCOMPOUND *icompound, uint32_t perQuad) { - LWLINE *oline; LWGEOM *geom; - DYNPTARRAY *ptarray = NULL; + POINTARRAY *ptarray = NULL, *ptarray_out = NULL; LWLINE *tmp = NULL; - uint32 i, j; - POINT4D *p = NULL; + uint32_t i, j; + POINT4D p; LWDEBUG(2, "lwcompound_segmentize called."); - p = lwalloc(sizeof(POINT4D)); - - ptarray = dynptarray_create(2, ((POINTARRAY *)icompound->geoms[0]->data)->dims); + ptarray = ptarray_construct_empty(FLAGS_GET_Z(icompound->flags), FLAGS_GET_M(icompound->flags), 64); for (i = 0; i < icompound->ngeoms; i++) { geom = icompound->geoms[i]; - if (lwgeom_getType(geom->type) == CIRCSTRINGTYPE) + if (geom->type == CIRCSTRINGTYPE) { - tmp = lwcurve_segmentize((LWCIRCSTRING *)geom, perQuad); + tmp = lwcircstring_segmentize((LWCIRCSTRING *)geom, perQuad); for (j = 0; j < tmp->points->npoints; j++) { - getPoint4d_p(tmp->points, j, p); - dynptarray_addPoint4d(ptarray, p, 0); + getPoint4d_p(tmp->points, j, &p); + ptarray_append_point(ptarray, &p, LW_TRUE); } lwfree(tmp); } - else if (lwgeom_getType(geom->type) == LINETYPE) + else if (geom->type == LINETYPE) { tmp = (LWLINE *)geom; for (j = 0; j < tmp->points->npoints; j++) { - getPoint4d_p(tmp->points, j, p); - dynptarray_addPoint4d(ptarray, p, 0); + getPoint4d_p(tmp->points, j, &p); + ptarray_append_point(ptarray, &p, LW_TRUE); } } else { - lwerror("Unsupported geometry type %d found.", lwgeom_getType(geom->type)); + lwerror("Unsupported geometry type %d found.", + geom->type, lwtype_name(geom->type)); return NULL; } } - oline = lwline_construct(icompound->SRID, NULL, ptarray_clone(ptarray->pa)); - lwfree(ptarray); - lwfree(p); - return oline; + ptarray_out = ptarray_remove_repeated_points(ptarray); + ptarray_free(ptarray); + return lwline_construct(icompound->srid, NULL, ptarray_out); } LWPOLY * -lwcurvepoly_segmentize(LWCURVEPOLY *curvepoly, uint32 perQuad) +lwcurvepoly_segmentize(const LWCURVEPOLY *curvepoly, uint32_t perQuad) { LWPOLY *ogeom; LWGEOM *tmp; @@ -412,21 +354,21 @@ for (i = 0; i < curvepoly->nrings; i++) { tmp = curvepoly->rings[i]; - if (lwgeom_getType(tmp->type) == CIRCSTRINGTYPE) + if (tmp->type == CIRCSTRINGTYPE) { - line = lwcurve_segmentize((LWCIRCSTRING *)tmp, perQuad); - ptarray[i] = ptarray_clone(line->points); + line = lwcircstring_segmentize((LWCIRCSTRING *)tmp, perQuad); + ptarray[i] = ptarray_clone_deep(line->points); lwfree(line); } - else if (lwgeom_getType(tmp->type) == LINETYPE) + else if (tmp->type == LINETYPE) { line = (LWLINE *)tmp; - ptarray[i] = ptarray_clone(line->points); + ptarray[i] = ptarray_clone_deep(line->points); } - else if (lwgeom_getType(tmp->type) == COMPOUNDTYPE) + else if (tmp->type == COMPOUNDTYPE) { line = lwcompound_segmentize((LWCOMPOUND *)tmp, perQuad); - ptarray[i] = ptarray_clone(line->points); + ptarray[i] = ptarray_clone_deep(line->points); lwfree(line); } else @@ -436,32 +378,32 @@ } } - ogeom = lwpoly_construct(curvepoly->SRID, NULL, curvepoly->nrings, ptarray); + ogeom = lwpoly_construct(curvepoly->srid, NULL, curvepoly->nrings, ptarray); return ogeom; } LWMLINE * -lwmcurve_segmentize(LWMCURVE *mcurve, uint32 perQuad) +lwmcurve_segmentize(LWMCURVE *mcurve, uint32_t perQuad) { LWMLINE *ogeom; LWGEOM *tmp; LWGEOM **lines; int i; - LWDEBUGF(2, "lwmcurve_segmentize called, geoms=%d, dim=%d.", mcurve->ngeoms, TYPE_NDIMS(mcurve->type)); + LWDEBUGF(2, "lwmcurve_segmentize called, geoms=%d, dim=%d.", mcurve->ngeoms, FLAGS_NDIMS(mcurve->flags)); lines = lwalloc(sizeof(LWGEOM *)*mcurve->ngeoms); for (i = 0; i < mcurve->ngeoms; i++) { tmp = mcurve->geoms[i]; - if (lwgeom_getType(tmp->type) == CIRCSTRINGTYPE) + if (tmp->type == CIRCSTRINGTYPE) { - lines[i] = (LWGEOM *)lwcurve_segmentize((LWCIRCSTRING *)tmp, perQuad); + lines[i] = (LWGEOM *)lwcircstring_segmentize((LWCIRCSTRING *)tmp, perQuad); } - else if (lwgeom_getType(tmp->type) == LINETYPE) + else if (tmp->type == LINETYPE) { - lines[i] = (LWGEOM *)lwline_construct(mcurve->SRID, NULL, ptarray_clone(((LWLINE *)tmp)->points)); + lines[i] = (LWGEOM *)lwline_construct(mcurve->srid, NULL, ptarray_clone_deep(((LWLINE *)tmp)->points)); } else { @@ -470,12 +412,12 @@ } } - ogeom = (LWMLINE *)lwcollection_construct(MULTILINETYPE, mcurve->SRID, NULL, mcurve->ngeoms, lines); + ogeom = (LWMLINE *)lwcollection_construct(MULTILINETYPE, mcurve->srid, NULL, mcurve->ngeoms, lines); return ogeom; } LWMPOLY * -lwmsurface_segmentize(LWMSURFACE *msurface, uint32 perQuad) +lwmsurface_segmentize(LWMSURFACE *msurface, uint32_t perQuad) { LWMPOLY *ogeom; LWGEOM *tmp; @@ -491,27 +433,27 @@ for (i = 0; i < msurface->ngeoms; i++) { tmp = msurface->geoms[i]; - if (lwgeom_getType(tmp->type) == CURVEPOLYTYPE) + if (tmp->type == CURVEPOLYTYPE) { polys[i] = (LWGEOM *)lwcurvepoly_segmentize((LWCURVEPOLY *)tmp, perQuad); } - else if (lwgeom_getType(tmp->type) == POLYGONTYPE) + else if (tmp->type == POLYGONTYPE) { poly = (LWPOLY *)tmp; ptarray = lwalloc(sizeof(POINTARRAY *)*poly->nrings); for (j = 0; j < poly->nrings; j++) { - ptarray[j] = ptarray_clone(poly->rings[j]); + ptarray[j] = ptarray_clone_deep(poly->rings[j]); } - polys[i] = (LWGEOM *)lwpoly_construct(msurface->SRID, NULL, poly->nrings, ptarray); + polys[i] = (LWGEOM *)lwpoly_construct(msurface->srid, NULL, poly->nrings, ptarray); } } - ogeom = (LWMPOLY *)lwcollection_construct(MULTIPOLYGONTYPE, msurface->SRID, NULL, msurface->ngeoms, polys); + ogeom = (LWMPOLY *)lwcollection_construct(MULTIPOLYGONTYPE, msurface->srid, NULL, msurface->ngeoms, polys); return ogeom; } LWCOLLECTION * -lwcollection_segmentize(LWCOLLECTION *collection, uint32 perQuad) +lwcollection_segmentize(LWCOLLECTION *collection, uint32_t perQuad) { LWCOLLECTION *ocol; LWGEOM *tmp; @@ -525,10 +467,10 @@ for (i=0; ingeoms; i++) { tmp = collection->geoms[i]; - switch (lwgeom_getType(tmp->type)) + switch (tmp->type) { case CIRCSTRINGTYPE: - geoms[i] = (LWGEOM *)lwcurve_segmentize((LWCIRCSTRING *)tmp, perQuad); + geoms[i] = (LWGEOM *)lwcircstring_segmentize((LWCIRCSTRING *)tmp, perQuad); break; case COMPOUNDTYPE: geoms[i] = (LWGEOM *)lwcompound_segmentize((LWCOMPOUND *)tmp, perQuad); @@ -544,18 +486,18 @@ break; } } - ocol = lwcollection_construct(COLLECTIONTYPE, collection->SRID, NULL, collection->ngeoms, geoms); + ocol = lwcollection_construct(COLLECTIONTYPE, collection->srid, NULL, collection->ngeoms, geoms); return ocol; } LWGEOM * -lwgeom_segmentize(LWGEOM *geom, uint32 perQuad) +lwgeom_segmentize(LWGEOM *geom, uint32_t perQuad) { LWGEOM * ogeom = NULL; - switch (lwgeom_getType(geom->type)) + switch (geom->type) { case CIRCSTRINGTYPE: - ogeom = (LWGEOM *)lwcurve_segmentize((LWCIRCSTRING *)geom, perQuad); + ogeom = (LWGEOM *)lwcircstring_segmentize((LWCIRCSTRING *)geom, perQuad); break; case COMPOUNDTYPE: ogeom = (LWGEOM *)lwcompound_segmentize((LWCOMPOUND *)geom, perQuad); @@ -578,397 +520,207 @@ return ogeom; } -/******************************************************************************* - * End curve segmentize functions - ******************************************************************************/ -LWGEOM * -append_segment(LWGEOM *geom, POINTARRAY *pts, int type, int SRID) -{ - LWGEOM *result; - int currentType, i; - - LWDEBUGF(2, "append_segment called %p, %p, %d, %d", geom, pts, type, SRID); - if (geom == NULL) - { - if (type == LINETYPE) - { - LWDEBUG(3, "append_segment: line to NULL"); - - return (LWGEOM *)lwline_construct(SRID, NULL, pts); - } - else if (type == CIRCSTRINGTYPE) - { -#if POSTGIS_DEBUG_LEVEL >= 4 - POINT4D tmp; +/** +* Returns LW_TRUE if b is on the arc formed by a1/a2/a3, but not within +* that portion already described by a1/a2/a3 +*/ +static int pt_continues_arc(const POINT4D *a1, const POINT4D *a2, const POINT4D *a3, const POINT4D *b) +{ + POINT4D center; + POINT4D *centerptr=¢er; + double radius = lwcircle_center(a1, a2, a3, ¢er); + double b_distance, diff; + + /* Co-linear a1/a2/a3 */ + if ( radius < 0.0 ) + return LW_FALSE; + + b_distance = distance2d_pt_pt((POINT2D*)b, (POINT2D*)centerptr); + diff = fabs(radius - b_distance); + LWDEBUGF(4, "circle_radius=%g, b_distance=%g, diff=%g, percentage=%g", radius, b_distance, diff, diff/radius); + + /* Is the point b on the circle? */ + if ( diff < EPSILON_SQLMM ) + { + int a2_side = signum(lw_segment_side((POINT2D*)a1, (POINT2D*)a3, (POINT2D*)a2)); + int b_side = signum(lw_segment_side((POINT2D*)a1, (POINT2D*)a3, (POINT2D*)b)); + + /* Is the point b on the same side of a1/a3 as the mid-point a2 is? */ + /* If not, it's in the unbounded part of the circle, so it continues the arc, return true. */ + if ( b_side != a2_side ) + return LW_TRUE; + } + return LW_FALSE; +} + +static LWGEOM* +linestring_from_pa(const POINTARRAY *pa, int srid, int start, int end) +{ + int i = 0, j = 0; + POINT4D p; + POINTARRAY *pao = ptarray_construct(ptarray_has_z(pa), ptarray_has_m(pa), end-start+2); + LWDEBUGF(4, "srid=%d, start=%d, end=%d", srid, start, end); + for( i = start; i < end + 2; i++ ) + { + getPoint4d_p(pa, i, &p); + ptarray_set_point4d(pao, j++, &p); + } + return lwline_as_lwgeom(lwline_construct(srid, NULL, pao)); +} + +static LWGEOM* +circstring_from_pa(const POINTARRAY *pa, int srid, int start, int end) +{ + + POINT4D p0, p1, p2; + POINTARRAY *pao = ptarray_construct(ptarray_has_z(pa), ptarray_has_m(pa), 3); + LWDEBUGF(4, "srid=%d, start=%d, end=%d", srid, start, end); + getPoint4d_p(pa, start, &p0); + ptarray_set_point4d(pao, 0, &p0); + getPoint4d_p(pa, (start+end)/2, &p1); + ptarray_set_point4d(pao, 1, &p1); + getPoint4d_p(pa, end+1, &p2); + ptarray_set_point4d(pao, 2, &p2); + return lwcircstring_as_lwgeom(lwcircstring_construct(srid, NULL, pao)); +} + +static LWGEOM* +geom_from_pa(const POINTARRAY *pa, int srid, int is_arc, int start, int end) +{ + LWDEBUGF(4, "srid=%d, is_arc=%d, start=%d, end=%d", srid, is_arc, start, end); + if ( is_arc ) + return circstring_from_pa(pa, srid, start, end); + else + return linestring_from_pa(pa, srid, start, end); +} - LWDEBUGF(4, "append_segment: curve to NULL %d", pts->npoints); +LWGEOM* +pta_desegmentize(POINTARRAY *points, int type, int srid) +{ + int i = 0, j, k; + POINT4D a1, a2, a3, b; + char *edges_in_arcs; + int found_arc = LW_FALSE; + int current_arc = 1; + int num_edges; + int edge_type = -1; + int start, end; + LWCOLLECTION *outcol; + + /* Die on null input */ + if ( ! points ) + lwerror("pta_desegmentize called with null pointarray"); - for (i=0; inpoints; i++) + /* Null on empty input? */ + if ( points->npoints == 0 ) + return NULL; + + /* We can't desegmentize anything shorter than four points */ + if ( points->npoints < 4 ) + { + /* Return a linestring here*/ + lwerror("pta_desegmentize needs implementation for npoints < 4"); + } + + /* Allocate our result array of vertices that are part of arcs */ + num_edges = points->npoints - 1; + edges_in_arcs = lwalloc(num_edges); + memset(edges_in_arcs, 0, num_edges); + + /* We make a candidate arc of the first two edges, */ + /* And then see if the next edge follows it */ + while( i < num_edges-2 ) + { + found_arc = LW_FALSE; + /* Make candidate arc */ + getPoint4d_p(points, i , &a1); + getPoint4d_p(points, i+1, &a2); + getPoint4d_p(points, i+2, &a3); + for( j = i+3; j < num_edges+1; j++ ) + { + LWDEBUGF(4, "i=%d, j=%d", i, j); + getPoint4d_p(points, j, &b); + /* Does this point fall on our candidate arc? */ + if ( pt_continues_arc(&a1, &a2, &a3, &b) ) + { + /* Yes. Mark this edge and the two preceding it as arc components */ + LWDEBUGF(4, "pt_continues_arc #%d", current_arc); + found_arc = LW_TRUE; + for ( k = j-1; k > j-4; k-- ) + edges_in_arcs[k] = current_arc; + } + else { - getPoint4d_p(pts, i, &tmp); - LWDEBUGF(4, "new point: (%.16f,%.16f)",tmp.x,tmp.y); + /* No. So we're done with this candidate arc */ + LWDEBUG(4, "pt_continues_arc = false"); + current_arc++; + break; } -#endif - return (LWGEOM *)lwcircstring_construct(SRID, NULL, pts); - } - else - { - lwerror("Invalid segment type %d.", type); - } - } - - currentType = lwgeom_getType(geom->type); - if (currentType == LINETYPE && type == LINETYPE) - { - POINTARRAY *newPoints; - POINT4D pt; - LWLINE *line = (LWLINE *)geom; - - LWDEBUG(3, "append_segment: line to line"); - - newPoints = ptarray_construct(TYPE_HASZ(pts->dims), TYPE_HASM(pts->dims), pts->npoints + line->points->npoints - 1); - for (i=0; ipoints->npoints; i++) - { - getPoint4d_p(line->points, i, &pt); - LWDEBUGF(5, "copying to %p [%d]", newPoints, i); - setPoint4d(newPoints, i, &pt); - } - for (i=1; inpoints; i++) - { - getPoint4d_p(pts, i, &pt); - setPoint4d(newPoints, i + line->points->npoints - 1, &pt); - } - result = (LWGEOM *)lwline_construct(SRID, NULL, newPoints); - lwgeom_release(geom); - return result; - } - else if (currentType == CIRCSTRINGTYPE && type == CIRCSTRINGTYPE) - { - POINTARRAY *newPoints; - POINT4D pt; - LWCIRCSTRING *curve = (LWCIRCSTRING *)geom; - - LWDEBUG(3, "append_segment: circularstring to circularstring"); - - newPoints = ptarray_construct(TYPE_HASZ(pts->dims), TYPE_HASM(pts->dims), pts->npoints + curve->points->npoints - 1); - - LWDEBUGF(3, "New array length: %d", pts->npoints + curve->points->npoints - 1); - - for (i=0; ipoints->npoints; i++) - { - getPoint4d_p(curve->points, i, &pt); - - LWDEBUGF(3, "orig point %d: (%.16f,%.16f)", i, pt.x, pt.y); - - setPoint4d(newPoints, i, &pt); - } - for (i=1; inpoints; i++) - { - getPoint4d_p(pts, i, &pt); - - LWDEBUGF(3, "new point %d: (%.16f,%.16f)", i + curve->points->npoints - 1, pt.x, pt.y); - - setPoint4d(newPoints, i + curve->points->npoints - 1, &pt); } - result = (LWGEOM *)lwcircstring_construct(SRID, NULL, newPoints); - lwgeom_release(geom); - return result; - } - else if (currentType == CIRCSTRINGTYPE && type == LINETYPE) - { - LWLINE *line; - LWGEOM **geomArray; - - LWDEBUG(3, "append_segment: line to curve"); - - geomArray = lwalloc(sizeof(LWGEOM *)*2); - geomArray[0] = lwgeom_clone(geom); - - line = lwline_construct(SRID, NULL, pts); - geomArray[1] = lwgeom_clone((LWGEOM *)line); - - result = (LWGEOM *)lwcollection_construct(COMPOUNDTYPE, SRID, NULL, 2, geomArray); - lwfree((LWGEOM *)line); - lwgeom_release(geom); - return result; - } - else if (currentType == LINETYPE && type == CIRCSTRINGTYPE) - { - LWCIRCSTRING *curve; - LWGEOM **geomArray; - - LWDEBUG(3, "append_segment: circularstring to line"); - - geomArray = lwalloc(sizeof(LWGEOM *)*2); - geomArray[0] = lwgeom_clone(geom); - - curve = lwcircstring_construct(SRID, NULL, pts); - geomArray[1] = lwgeom_clone((LWGEOM *)curve); - - result = (LWGEOM *)lwcollection_construct(COMPOUNDTYPE, SRID, NULL, 2, geomArray); - lwfree((LWGEOM *)curve); - lwgeom_release(geom); - return result; - } - else if (currentType == COMPOUNDTYPE) - { - LWGEOM *newGeom; - LWCOMPOUND *compound; - int count; - LWGEOM **geomArray; - - compound = (LWCOMPOUND *)geom; - count = compound->ngeoms + 1; - geomArray = lwalloc(sizeof(LWGEOM *)*count); - for (i=0; ingeoms; i++) + /* Jump past all the edges that were added to the arc */ + if ( found_arc ) { - geomArray[i] = lwgeom_clone(compound->geoms[i]); - } - if (type == LINETYPE) - { - LWDEBUG(3, "append_segment: line to compound"); - - newGeom = (LWGEOM *)lwline_construct(SRID, NULL, pts); - } - else if (type == CIRCSTRINGTYPE) - { - LWDEBUG(3, "append_segment: circularstring to compound"); - - newGeom = (LWGEOM *)lwcircstring_construct(SRID, NULL, pts); + i = j-1; } else { - lwerror("Invalid segment type %d.", type); - return NULL; + /* Mark this edge as a linear edge */ + edges_in_arcs[i] = 0; + i = i+1; } - geomArray[compound->ngeoms] = lwgeom_clone(newGeom); - - result = (LWGEOM *)lwcollection_construct(COMPOUNDTYPE, SRID, NULL, count, geomArray); - lwfree(newGeom); - lwgeom_release(geom); - return result; } - lwerror("Invalid state %d-%d", currentType, type); - return NULL; -} - -LWGEOM * -pta_desegmentize(POINTARRAY *points, int type, int SRID) -{ - int i, j, commit, isline, count; - double last_angle, last_length; - double dxab, dyab, dxbc, dybc, theta, length; - POINT4D a, b, c, tmp; - POINTARRAY *pts; - LWGEOM *geom = NULL; - - LWDEBUG(2, "pta_desegmentize called."); - - getPoint4d_p(points, 0, &a); - getPoint4d_p(points, 1, &b); - getPoint4d_p(points, 2, &c); - - dxab = b.x - a.x; - dyab = b.y - a.y; - dxbc = c.x - b.x; - dybc = c.y - b.y; - - theta = atan2(dyab, dxab); - last_angle = theta - atan2(dybc, dxbc); - last_length = sqrt(dxbc*dxbc+dybc*dybc); - length = sqrt(dxab*dxab+dyab*dyab); - if ((last_length - length) < EPSILON_SQLMM) - { - isline = -1; - LWDEBUG(3, "Starting as unknown."); - } - else - { - isline = 1; - LWDEBUG(3, "Starting as line."); - } - - commit = 0; - for (i=3; inpoints; i++) + +#if POSTGIS_DEBUG_LEVEL > 3 { - getPoint4d_p(points, i-2, &a); - getPoint4d_p(points, i-1, &b); - getPoint4d_p(points, i, &c); - - dxab = b.x - a.x; - dyab = b.y - a.y; - dxbc = c.x - b.x; - dybc = c.y - b.y; - - LWDEBUGF(3, "(dxab, dyab, dxbc, dybc) (%.16f, %.16f, %.16f, %.16f)", dxab, dyab, dxbc, dybc); - - theta = atan2(dyab, dxab); - theta = theta - atan2(dybc, dxbc); - length = sqrt(dxbc*dxbc+dybc*dybc); - - LWDEBUGF(3, "Last/current length and angle %.16f/%.16f, %.16f/%.16f", last_angle, theta, last_length, length); - - /* Found a line segment */ - if (fabs(length - last_length) > EPSILON_SQLMM || - fabs(theta - last_angle) > EPSILON_SQLMM) - { - last_length = length; - last_angle = theta; - /* We are tracking a line, keep going */ - if (isline > 0) - {} - /* We were tracking a circularstring, commit it and start line*/ - else if (isline == 0) - { - LWDEBUGF(3, "Building circularstring, %d - %d", commit, i); - - count = i - commit; - pts = ptarray_construct( - TYPE_HASZ(type), - TYPE_HASM(type), - 3); - getPoint4d_p(points, commit, &tmp); - setPoint4d(pts, 0, &tmp); - getPoint4d_p(points, - commit + count/2, &tmp); - setPoint4d(pts, 1, &tmp); - getPoint4d_p(points, i - 1, &tmp); - setPoint4d(pts, 2, &tmp); - - commit = i-1; - geom = append_segment(geom, pts, CIRCSTRINGTYPE, SRID); - isline = -1; - - /* - * We now need to move ahead one point to - * determine if it's a potential new curve, - * since the last_angle value is corrupt. - * - * Note we can only look ahead one point if - * we are not already at the end of our - * set of points. - */ - if (i < points->npoints - 1) - { - i++; - - getPoint4d_p(points, i-2, &a); - getPoint4d_p(points, i-1, &b); - getPoint4d_p(points, i, &c); - - dxab = b.x - a.x; - dyab = b.y - a.y; - dxbc = c.x - b.x; - dybc = c.y - b.y; - - theta = atan2(dyab, dxab); - last_angle = theta - atan2(dybc, dxbc); - last_length = sqrt(dxbc*dxbc+dybc*dybc); - length = sqrt(dxab*dxab+dyab*dyab); - if ((last_length - length) < EPSILON_SQLMM) - { - isline = -1; - LWDEBUG(3, "Restarting as unknown."); - } - else - { - isline = 1; - LWDEBUG(3, "Restarting as line."); - } - } - else - { - /* Indicate that we have tracked a CIRCSTRING */ - isline = 0; - } - } - /* We didn't know what we were tracking, now we do. */ - else - { - LWDEBUG(3, "It's a line"); - isline = 1; - } - } - /* Found a circularstring segment */ - else + char *edgestr = lwalloc(num_edges+1); + for ( i = 0; i < num_edges; i++ ) { - /* We were tracking a circularstring, commit it and start line */ - if (isline > 0) - { - LWDEBUGF(3, "Building line, %d - %d", commit, i-2); - - count = i - commit - 2; - - pts = ptarray_construct( - TYPE_HASZ(type), - TYPE_HASM(type), - count); - for (j=commit; j 2) - { - LWDEBUGF(3, "Finishing circularstring %d,%d.", commit, i); - - pts = ptarray_construct( - TYPE_HASZ(type), - TYPE_HASM(type), - 3); - getPoint4d_p(points, commit, &tmp); - setPoint4d(pts, 0, &tmp); - getPoint4d_p(points, commit + count/2, &tmp); - setPoint4d(pts, 1, &tmp); - getPoint4d_p(points, i - 1, &tmp); - setPoint4d(pts, 2, &tmp); - - geom = append_segment(geom, pts, CIRCSTRINGTYPE, SRID); - } - else - { - LWDEBUGF(3, "Finishing line %d,%d.", commit, i); +#endif - pts = ptarray_construct( - TYPE_HASZ(type), - TYPE_HASM(type), - count); - for (j=commit; jngeoms == 1 ) + { + LWGEOM *outgeom = outcol->geoms[0]; + lwfree(outcol); + return outgeom; } - return geom; + return lwcollection_as_lwgeom(outcol); } + LWGEOM * lwline_desegmentize(LWLINE *line) { LWDEBUG(2, "lwline_desegmentize called."); - return pta_desegmentize(line->points, line->type, line->SRID); + return pta_desegmentize(line->points, line->flags, line->srid); } LWGEOM * @@ -982,9 +734,8 @@ geoms = lwalloc(sizeof(LWGEOM *)*poly->nrings); for (i=0; inrings; i++) { - geoms[i] = pta_desegmentize(poly->rings[i], poly->type, poly->SRID); - if (lwgeom_getType(geoms[i]->type) == CIRCSTRINGTYPE || - lwgeom_getType(geoms[i]->type) == COMPOUNDTYPE) + geoms[i] = pta_desegmentize(poly->rings[i], poly->flags, poly->srid); + if (geoms[i]->type == CIRCSTRINGTYPE || geoms[i]->type == COMPOUNDTYPE) { hascurve = 1; } @@ -998,7 +749,7 @@ return lwgeom_clone((LWGEOM *)poly); } - return (LWGEOM *)lwcollection_construct(CURVEPOLYTYPE, poly->SRID, NULL, poly->nrings, geoms); + return (LWGEOM *)lwcollection_construct(CURVEPOLYTYPE, poly->srid, NULL, poly->nrings, geoms); } LWGEOM * @@ -1013,8 +764,7 @@ for (i=0; ingeoms; i++) { geoms[i] = lwline_desegmentize((LWLINE *)mline->geoms[i]); - if (lwgeom_getType(geoms[i]->type) == CIRCSTRINGTYPE || - lwgeom_getType(geoms[i]->type) == COMPOUNDTYPE) + if (geoms[i]->type == CIRCSTRINGTYPE || geoms[i]->type == COMPOUNDTYPE) { hascurve = 1; } @@ -1027,7 +777,7 @@ } return lwgeom_clone((LWGEOM *)mline); } - return (LWGEOM *)lwcollection_construct(MULTICURVETYPE, mline->SRID, NULL, mline->ngeoms, geoms); + return (LWGEOM *)lwcollection_construct(MULTICURVETYPE, mline->srid, NULL, mline->ngeoms, geoms); } LWGEOM * @@ -1042,7 +792,7 @@ for (i=0; ingeoms; i++) { geoms[i] = lwpolygon_desegmentize((LWPOLY *)mpoly->geoms[i]); - if (lwgeom_getType(geoms[i]->type) == CURVEPOLYTYPE) + if (geoms[i]->type == CURVEPOLYTYPE) { hascurve = 1; } @@ -1055,17 +805,15 @@ } return lwgeom_clone((LWGEOM *)mpoly); } - return (LWGEOM *)lwcollection_construct(MULTISURFACETYPE, mpoly->SRID, NULL, mpoly->ngeoms, geoms); + return (LWGEOM *)lwcollection_construct(MULTISURFACETYPE, mpoly->srid, NULL, mpoly->ngeoms, geoms); } LWGEOM * lwgeom_desegmentize(LWGEOM *geom) { - int type = lwgeom_getType(geom->type); - LWDEBUG(2, "lwgeom_desegmentize called."); - switch (type) + switch (geom->type) { case LINETYPE: return lwline_desegmentize((LWLINE *)geom); diff -Nru postgis-1.5.3/liblwgeom/lwspheroid.c postgis-2.0.1/liblwgeom/lwspheroid.c --- postgis-1.5.3/liblwgeom/lwspheroid.c 2010-02-25 13:44:04.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwspheroid.c 2012-02-27 22:08:12.000000000 +0000 @@ -1,9 +1,9 @@ /********************************************************************** - * $Id: lwspheroid.c 5340 2010-02-25 13:44:04Z pramsey $ * * PostGIS - Spatial Types for PostgreSQL - * Copyright 2009 Paul Ramsey - * Copyright 2009 David Skea + * + * Copyright (C) 2009 Paul Ramsey + * Copyright (C) 2009 David Skea * * This is free software; you can redistribute and/or modify it under * the terms of the GNU General Public Licence. See the COPYING file. @@ -11,6 +11,7 @@ **********************************************************************/ #include "lwgeodetic.h" +#include "lwgeom_log.h" /** * Initialize spheroid object based on major and minor axis @@ -182,7 +183,6 @@ else alpha = asin(sin_alpha); - alpha = asin(sin_alpha); cos_alphasq = POW2(cos(alpha)); cos2_sigma_m = cos(sigma) - (2.0 * sin_u1 * sin_u2 / cos_alphasq); @@ -280,7 +280,7 @@ lambda2 = r->lon + omega; g->lat = lat2; g->lon = lambda2; - return G_SUCCESS; + return LW_SUCCESS; } @@ -381,7 +381,7 @@ return 0.0; /* Get the raw min/max values for the latitudes */ - ptarray_calculate_gbox(pa, &gbox2d); + ptarray_calculate_gbox_cartesian(pa, &gbox2d); if ( signum(gbox2d.ymin) != signum(gbox2d.ymax) ) lwerror("ptarray_area_spheroid: cannot handle ptarray that crosses equator"); @@ -446,7 +446,7 @@ point_shift(&a1, shift); point_shift(&b1, shift); LWDEBUGF(4, "after shift a1(%.8g %.8g) b1(%.8g %.8g)", a1.lat, a1.lon, b1.lat, b1.lon); - + } @@ -509,7 +509,7 @@ * required to check relationship to equator an outside point. * WARNING: Does NOT WORK for polygons over equator or pole. */ -double lwgeom_area_spheroid(const LWGEOM *lwgeom, const GBOX *gbox, const SPHEROID *spheroid) +double lwgeom_area_spheroid(const LWGEOM *lwgeom, const SPHEROID *spheroid) { int type; @@ -520,7 +520,7 @@ return 0.0; /* Read the geometry type number */ - type = TYPE_GETTYPE(lwgeom->type); + type = lwgeom->type; /* Anything but polygons and collections returns zero */ if ( ! ( type == POLYGONTYPE || type == MULTIPOLYGONTYPE || type == COLLECTIONTYPE ) ) @@ -557,7 +557,7 @@ for ( i = 0; i < col->ngeoms; i++ ) { - area += lwgeom_area_spheroid(col->geoms[i], gbox, spheroid); + area += lwgeom_area_spheroid(col->geoms[i], spheroid); } return area; } diff -Nru postgis-1.5.3/liblwgeom/lwtin.c postgis-2.0.1/liblwgeom/lwtin.c --- postgis-1.5.3/liblwgeom/lwtin.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwtin.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,176 @@ +/********************************************************************** + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * + * Copyright (C) 2001-2006 Refractions Research Inc. + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include +#include +#include +#include "liblwgeom_internal.h" +#include "lwgeom_log.h" + + + +LWTIN* lwtin_add_lwtriangle(LWTIN *mobj, const LWTRIANGLE *obj) +{ + return (LWTIN*)lwcollection_add_lwgeom((LWCOLLECTION*)mobj, (LWGEOM*)obj); +} + + +void lwtin_free(LWTIN *tin) +{ + int i; + if ( ! tin ) return; + if ( tin->bbox ) + lwfree(tin->bbox); + + for ( i = 0; i < tin->ngeoms; i++ ) + if ( tin->geoms && tin->geoms[i] ) + lwtriangle_free(tin->geoms[i]); + + if ( tin->geoms ) + lwfree(tin->geoms); + + lwfree(tin); +} + + +void printLWTIN(LWTIN *tin) +{ + int i; + LWTRIANGLE *triangle; + + if (tin->type != TINTYPE) + lwerror("printLWTIN called with something else than a TIN"); + + lwnotice("LWTIN {"); + lwnotice(" ndims = %i", (int)FLAGS_NDIMS(tin->flags)); + lwnotice(" SRID = %i", (int)tin->srid); + lwnotice(" ngeoms = %i", (int)tin->ngeoms); + + for (i=0; ingeoms; i++) + { + triangle = (LWTRIANGLE *) tin->geoms[i]; + printPA(triangle->points); + } + lwnotice("}"); +} + + +/* + * TODO rewrite all this stuff to be based on a truly topological model + */ + +struct struct_tin_arcs +{ + double ax, ay, az; + double bx, by, bz; + int cnt, face; +}; +typedef struct struct_tin_arcs *tin_arcs; + +/* We supposed that the geometry is valid + we could have wrong result if not */ +int lwtin_is_closed(const LWTIN *tin) +{ + int i, j, k; + int narcs, carc; + int found; + tin_arcs arcs; + POINT4D pa, pb; + LWTRIANGLE *patch; + + /* If surface is not 3D, it's can't be closed */ + if (!FLAGS_GET_Z(tin->flags)) return 0; + + /* Max theorical arcs number if no one is shared ... */ + narcs = 3 * tin->ngeoms; + + arcs = lwalloc(sizeof(struct struct_tin_arcs) * narcs); + for (i=0, carc=0; i < tin->ngeoms ; i++) + { + + patch = (LWTRIANGLE *) tin->geoms[i]; + for (j=0; j < 3 ; j++) + { + + getPoint4d_p(patch->points, j, &pa); + getPoint4d_p(patch->points, j+1, &pb); + + /* Make sure to order the 'lower' point first */ + if ( (pa.x > pb.x) || + (pa.x == pb.x && pa.y > pb.y) || + (pa.x == pb.x && pa.y == pb.y && pa.z > pb.z) ) + { + pa = pb; + getPoint4d_p(patch->points, j, &pb); + } + + for (found=0, k=0; k < carc ; k++) + { + + if ( ( arcs[k].ax == pa.x && arcs[k].ay == pa.y && + arcs[k].az == pa.z && arcs[k].bx == pb.x && + arcs[k].by == pb.y && arcs[k].bz == pb.z && + arcs[k].face != i) ) + { + arcs[k].cnt++; + found = 1; + + /* Look like an invalid TIN + anyway not a closed one */ + if (arcs[k].cnt > 2) + { + lwfree(arcs); + return 0; + } + } + } + + if (!found) + { + arcs[carc].cnt=1; + arcs[carc].face=i; + arcs[carc].ax = pa.x; + arcs[carc].ay = pa.y; + arcs[carc].az = pa.z; + arcs[carc].bx = pb.x; + arcs[carc].by = pb.y; + arcs[carc].bz = pb.z; + carc++; + + /* Look like an invalid TIN + anyway not a closed one */ + if (carc > narcs) + { + lwfree(arcs); + return 0; + } + } + } + } + + /* A TIN is closed if each edge + is shared by exactly 2 faces */ + for (k=0; k < carc ; k++) + { + if (arcs[k].cnt != 2) + { + lwfree(arcs); + return 0; + } + } + lwfree(arcs); + + /* Invalid TIN case */ + if (carc < tin->ngeoms) return 0; + + return 1; +} diff -Nru postgis-1.5.3/liblwgeom/lwtree.c postgis-2.0.1/liblwgeom/lwtree.c --- postgis-1.5.3/liblwgeom/lwtree.c 2010-02-01 17:35:55.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwtree.c 2012-02-27 22:08:12.000000000 +0000 @@ -1,4 +1,5 @@ -#include "lwalgorithm.h" +#include "liblwgeom_internal.h" +#include "lwgeom_log.h" #include "lwtree.h" diff -Nru postgis-1.5.3/liblwgeom/lwtree.h postgis-2.0.1/liblwgeom/lwtree.h --- postgis-1.5.3/liblwgeom/lwtree.h 2009-11-30 20:52:16.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwtree.h 2012-02-27 22:08:12.000000000 +0000 @@ -1,6 +1,3 @@ -#include "libgeom.h" - - /** * Note that p1 and p2 are pointers into an independent POINTARRAY, do not free them. */ diff -Nru postgis-1.5.3/liblwgeom/lwtriangle.c postgis-2.0.1/liblwgeom/lwtriangle.c --- postgis-1.5.3/liblwgeom/lwtriangle.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwtriangle.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,211 @@ +/********************************************************************** + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * + * Copyright (C) 2010 - Oslandia + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +/* basic LWTRIANGLE manipulation */ + +#include +#include +#include +#include "liblwgeom_internal.h" +#include "lwgeom_log.h" + + + +/* construct a new LWTRIANGLE. + * use SRID=SRID_UNKNOWN for unknown SRID (will have 8bit type's S = 0) + */ +LWTRIANGLE* +lwtriangle_construct(int srid, GBOX *bbox, POINTARRAY *points) +{ + LWTRIANGLE *result; + + result = (LWTRIANGLE*) lwalloc(sizeof(LWTRIANGLE)); + result->type = TRIANGLETYPE; + + result->flags = points->flags; + FLAGS_SET_BBOX(result->flags, bbox?1:0); + + result->srid = srid; + result->points = points; + result->bbox = bbox; + + return result; +} + +LWTRIANGLE* +lwtriangle_construct_empty(int srid, char hasz, char hasm) +{ + LWTRIANGLE *result = lwalloc(sizeof(LWTRIANGLE)); + result->type = TRIANGLETYPE; + result->flags = gflags(hasz,hasm,0); + result->srid = srid; + result->points = ptarray_construct_empty(hasz, hasm, 1); + result->bbox = NULL; + return result; +} + +void lwtriangle_free(LWTRIANGLE *triangle) +{ + if ( ! triangle ) return; + + if (triangle->bbox) + lwfree(triangle->bbox); + + if (triangle->points) + ptarray_free(triangle->points); + + lwfree(triangle); +} + +void printLWTRIANGLE(LWTRIANGLE *triangle) +{ + if (triangle->type != TRIANGLETYPE) + lwerror("printLWTRIANGLE called with something else than a Triangle"); + + lwnotice("LWTRIANGLE {"); + lwnotice(" ndims = %i", (int)FLAGS_NDIMS(triangle->flags)); + lwnotice(" SRID = %i", (int)triangle->srid); + printPA(triangle->points); + lwnotice("}"); +} + +/* @brief Clone LWTRIANGLE object. Serialized point lists are not copied. + * + * @see ptarray_clone + */ +LWTRIANGLE * +lwtriangle_clone(const LWTRIANGLE *g) +{ + LWDEBUGF(2, "lwtriangle_clone called with %p", g); + return (LWTRIANGLE *)lwline_clone((const LWLINE *)g); +} + +void +lwtriangle_force_clockwise(LWTRIANGLE *triangle) +{ + if ( ptarray_isccw(triangle->points) ) + ptarray_reverse(triangle->points); +} + +void +lwtriangle_reverse(LWTRIANGLE *triangle) +{ + if( lwtriangle_is_empty(triangle) ) return; + ptarray_reverse(triangle->points); +} + +void +lwtriangle_release(LWTRIANGLE *lwtriangle) +{ + lwgeom_release(lwtriangle_as_lwgeom(lwtriangle)); +} + +/* check coordinate equality */ +char +lwtriangle_same(const LWTRIANGLE *t1, const LWTRIANGLE *t2) +{ + char r = ptarray_same(t1->points, t2->points); + LWDEBUGF(5, "returning %d", r); + return r; +} + +/* + * Construct a triangle from a LWLINE being + * the shell + * Pointarray from intput geom are cloned. + * Input line must have 4 points, and be closed. + */ +LWTRIANGLE * +lwtriangle_from_lwline(const LWLINE *shell) +{ + LWTRIANGLE *ret; + POINTARRAY *pa; + + if ( shell->points->npoints != 4 ) + lwerror("lwtriangle_from_lwline: shell must have exactly 4 points"); + + if ( (!FLAGS_GET_Z(shell->flags) && !ptarray_isclosed2d(shell->points)) || + (FLAGS_GET_Z(shell->flags) && !ptarray_isclosed3d(shell->points)) ) + lwerror("lwtriangle_from_lwline: shell must be closed"); + + pa = ptarray_clone_deep(shell->points); + ret = lwtriangle_construct(shell->srid, NULL, pa); + + if (lwtriangle_is_repeated_points(ret)) + lwerror("lwtriangle_from_lwline: some points are repeated in triangle"); + + return ret; +} + +char +lwtriangle_is_repeated_points(LWTRIANGLE *triangle) +{ + char ret; + POINTARRAY *pa; + + pa = ptarray_remove_repeated_points(triangle->points); + ret = ptarray_same(pa, triangle->points); + ptarray_free(pa); + + return ret; +} + +int lwtriangle_is_empty(const LWTRIANGLE *triangle) +{ + if ( !triangle->points || triangle->points->npoints == 0 ) + return LW_TRUE; + return LW_FALSE; +} + +/** + * Find the area of the outer ring + */ +double +lwtriangle_area(const LWTRIANGLE *triangle) +{ + double area=0.0; + int i; + POINT2D p1; + POINT2D p2; + + if (! triangle->points->npoints) return area; /* empty triangle */ + + for (i=0; i < triangle->points->npoints-1; i++) + { + getPoint2d_p(triangle->points, i, &p1); + getPoint2d_p(triangle->points, i+1, &p2); + area += ( p1.x * p2.y ) - ( p1.y * p2.x ); + } + + area /= 2.0; + + return fabs(area); +} + + +double +lwtriangle_perimeter(const LWTRIANGLE *triangle) +{ + if( triangle->points ) + return ptarray_length(triangle->points); + else + return 0.0; +} + +double +lwtriangle_perimeter_2d(const LWTRIANGLE *triangle) +{ + if( triangle->points ) + return ptarray_length_2d(triangle->points); + else + return 0.0; +} diff -Nru postgis-1.5.3/liblwgeom/lwutil.c postgis-2.0.1/liblwgeom/lwutil.c --- postgis-1.5.3/liblwgeom/lwutil.c 2010-02-01 17:35:55.000000000 +0000 +++ postgis-2.0.1/liblwgeom/lwutil.c 2012-02-27 22:08:12.000000000 +0000 @@ -3,10 +3,10 @@ #include #include - /* Global variables */ #include "../postgis_config.h" -#include "liblwgeom.h" +#include "liblwgeom_internal.h" +#include "lwgeom_log.h" void *init_allocator(size_t size); void init_freeor(void *mem); @@ -31,16 +31,15 @@ "MultiPolygon", "GeometryCollection", "CircularString", - "CompoundString", - "Invalid Type", /* POINTTYPEI */ - "Invalid Type", /* LINETYPEI */ - "Invalid Type", /* POLYTYPEI */ + "CompoundCurve", "CurvePolygon", "MultiCurve", - "MultiSurface" + "MultiSurface", + "PolyhedralSurface", + "Triangle", + "Tin" }; - /* * lwnotice/lwerror handlers * @@ -207,15 +206,15 @@ } -const char* lwgeom_typename(int type) +const char* +lwtype_name(uint8_t type) { - /* something went wrong somewhere */ - if ( type < 0 || type > 15 ) + if ( type > 15 ) { /* assert(0); */ return "Invalid type"; } - return lwgeomTypeName[type]; + return lwgeomTypeName[(int ) type]; } void * @@ -356,16 +355,37 @@ static int endian_check_int = 1; /* dont modify this!!! */ return *((char *) &endian_check_int); /* 0 = big endian | xdr, - * 1 = little endian | ndr - */ + * 1 = little endian | ndr + */ } void -errorIfSRIDMismatch(int srid1, int srid2) +error_if_srid_mismatch(int srid1, int srid2) { if ( srid1 != srid2 ) { lwerror("Operation on mixed SRID geometries"); } } + +int +clamp_srid(int srid) +{ + int newsrid = srid; + + if ( newsrid <= 0 ) { + if ( newsrid != SRID_UNKNOWN ) { + newsrid = SRID_UNKNOWN; + lwnotice("SRID value %d converted to the officially unknown SRID value %d", srid, newsrid); + } + } else if ( srid > SRID_MAXIMUM ) { + newsrid = SRID_USER_MAXIMUM + 1 + + /* -1 is to reduce likelyhood of clashes */ + /* NOTE: must match implementation in postgis_restore.pl */ + ( srid % ( SRID_MAXIMUM - SRID_USER_MAXIMUM - 1 ) ); + lwnotice("SRID value %d > SRID_MAXIMUM converted to %d", srid, newsrid); + } + + return newsrid; +} diff -Nru postgis-1.5.3/liblwgeom/measures.c postgis-2.0.1/liblwgeom/measures.c --- postgis-1.5.3/liblwgeom/measures.c 2010-09-29 20:43:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/measures.c 2012-02-27 22:08:12.000000000 +0000 @@ -1,21 +1,20 @@ - /********************************************************************** - * $Id: measures.c 6031 2010-09-29 20:43:00Z nicklas $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net * Copyright 2001-2006 Refractions Research Inc. + * Copyright 2010 Nicklas Avén * * This is free software; you can redistribute and/or modify it under * the terms of the GNU General Public Licence. See the COPYING file. * **********************************************************************/ -#include #include #include #include "measures.h" +#include "lwgeom_log.h" /*------------------------------------------------------------------------------------------------------------ @@ -27,11 +26,11 @@ Function initializing shortestline and longestline calculations. */ LWGEOM * -lw_dist2d_distanceline(uchar *lw1, uchar *lw2,int srid,int mode) +lw_dist2d_distanceline(LWGEOM *lw1, LWGEOM *lw2,int srid,int mode) { double x1,x2,y1,y2; - LWPOINT *point1, *point2; - double initdistance = ( mode == DIST2D_MIN ? MAXFLOAT : -1.0); + + double initdistance = ( mode == DIST_MIN ? MAXFLOAT : -1.0); DISTPTS thedl; LWPOINT *lwpoints[2]; LWGEOM *result; @@ -46,14 +45,14 @@ { /*should never get here. all cases ought to be error handled earlier*/ lwerror("Some unspecified error."); - result =(LWGEOM *)lwcollection_construct_empty(srid, 0, 0); + result = (LWGEOM *)lwcollection_construct_empty(COLLECTIONTYPE, srid, 0, 0); } /*if thedl.distance is unchanged there where only empty geometries input*/ if (thedl.distance == initdistance) { LWDEBUG(3, "didn't find geometries to measure between, returning null"); - result =(LWGEOM *)lwcollection_construct_empty(srid, 0, 0); + result = (LWGEOM *)lwcollection_construct_empty(COLLECTIONTYPE, srid, 0, 0); } else { @@ -62,13 +61,10 @@ x2=thedl.p2.x; y2=thedl.p2.y; - point1 = make_lwpoint2d(srid, x1, y1); - point2 = make_lwpoint2d(srid, x2, y2); - - lwpoints[0] = make_lwpoint2d(srid, x1, y1); - lwpoints[1] = make_lwpoint2d(srid, x2, y2); + lwpoints[0] = lwpoint_make2d(srid, x1, y1); + lwpoints[1] = lwpoint_make2d(srid, x2, y2); - result = (LWGEOM *)lwline_from_lwpointarray(srid, 2, lwpoints); + result = (LWGEOM *)lwline_from_ptarray(srid, 2, lwpoints); } return result; } @@ -77,7 +73,7 @@ Function initializing closestpoint calculations. */ LWGEOM * -lw_dist2d_distancepoint(uchar *lw1, uchar *lw2,int srid,int mode) +lw_dist2d_distancepoint(LWGEOM *lw1, LWGEOM *lw2,int srid,int mode) { double x,y; DISTPTS thedl; @@ -94,18 +90,18 @@ { /*should never get here. all cases ought to be error handled earlier*/ lwerror("Some unspecified error."); - result =(LWGEOM *)lwcollection_construct_empty(srid, 0, 0); + result = (LWGEOM *)lwcollection_construct_empty(COLLECTIONTYPE, srid, 0, 0); } if (thedl.distance == initdistance) { LWDEBUG(3, "didn't find geometries to measure between, returning null"); - result =(LWGEOM *)lwcollection_construct_empty(srid, 0, 0); + result = (LWGEOM *)lwcollection_construct_empty(COLLECTIONTYPE, srid, 0, 0); } else { x=thedl.p1.x; y=thedl.p1.y; - result = (LWGEOM *)make_lwpoint2d(srid, x, y); + result = (LWGEOM *)lwpoint_make2d(srid, x, y); } return result; } @@ -115,7 +111,7 @@ Function initialazing max distance calculation */ double -lwgeom_maxdistance2d(uchar *lw1, uchar *lw2) +lwgeom_maxdistance2d(LWGEOM *lw1, LWGEOM *lw2) { LWDEBUG(2, "lwgeom_maxdistance2d is called"); @@ -127,12 +123,12 @@ The difference is just the tolerance. */ double -lwgeom_maxdistance2d_tolerance(uchar *lw1, uchar *lw2, double tolerance) +lwgeom_maxdistance2d_tolerance(LWGEOM *lw1, LWGEOM *lw2, double tolerance) { /*double thedist;*/ DISTPTS thedl; LWDEBUG(2, "lwgeom_maxdistance2d_tolerance is called"); - thedl.mode = DIST2D_MAX; + thedl.mode = DIST_MAX; thedl.distance= -1; thedl.tolerance = tolerance; if (lw_dist2d_comp( lw1,lw2,&thedl)) @@ -148,7 +144,7 @@ Function initialazing min distance calculation */ double -lwgeom_mindistance2d(uchar *lw1, uchar *lw2) +lwgeom_mindistance2d(LWGEOM *lw1, LWGEOM *lw2) { LWDEBUG(2, "lwgeom_mindistance2d is called"); return lwgeom_mindistance2d_tolerance( lw1, lw2, 0.0 ); @@ -159,11 +155,11 @@ The difference is just the tolerance. */ double -lwgeom_mindistance2d_tolerance(uchar *lw1, uchar *lw2, double tolerance) +lwgeom_mindistance2d_tolerance(LWGEOM *lw1, LWGEOM *lw2, double tolerance) { DISTPTS thedl; LWDEBUG(2, "lwgeom_mindistance2d_tolerance is called"); - thedl.mode = DIST2D_MIN; + thedl.mode = DIST_MIN; thedl.distance= MAXFLOAT; thedl.tolerance = tolerance; if (lw_dist2d_comp( lw1,lw2,&thedl)) @@ -191,91 +187,94 @@ bboxes we will use anyway. */ int -lw_dist2d_comp(uchar *lw1, uchar *lw2, DISTPTS *dl) +lw_dist2d_comp(LWGEOM *lw1, LWGEOM *lw2, DISTPTS *dl) { - - LWGEOM *lwg1 = lwgeom_deserialize(lw1); - LWGEOM *lwg2 = lwgeom_deserialize(lw2); LWDEBUG(2, "lw_dist2d_comp is called"); - return lw_dist2d_recursive ((LWCOLLECTION*) lwg1,(LWCOLLECTION*) lwg2, dl); + return lw_dist2d_recursive(lw1, lw2, dl); } /** This is a recursive function delivering every possible combinatin of subgeometries */ -int lw_dist2d_recursive(const LWCOLLECTION * lwg1,const LWCOLLECTION * lwg2,DISTPTS *dl) +int lw_dist2d_recursive(const LWGEOM *lwg1, const LWGEOM *lwg2, DISTPTS *dl) { int i, j; int n1=1; int n2=1; - LWGEOM *g1, *g2; + LWGEOM *g1 = NULL; + LWGEOM *g2 = NULL; + LWCOLLECTION *c1 = NULL; + LWCOLLECTION *c2 = NULL; - LWDEBUGF(2, "lw_dist2d_comp is called with type1=%d, type2=%d", TYPE_GETTYPE(lwg1->type), TYPE_GETTYPE(lwg2->type)); + LWDEBUGF(2, "lw_dist2d_comp is called with type1=%d, type2=%d", lwg1->type, lwg2->type); - if (lwgeom_is_collection(TYPE_GETTYPE(lwg1->type))) + if (lwgeom_is_collection(lwg1)) { LWDEBUG(3, "First geometry is collection"); - n1=lwg1->ngeoms; + c1 = lwgeom_as_lwcollection(lwg1); + n1 = c1->ngeoms; } - if (lwgeom_is_collection(TYPE_GETTYPE(lwg2->type))) + if (lwgeom_is_collection(lwg2)) { LWDEBUG(3, "Second geometry is collection"); - n2=lwg2->ngeoms; + c2 = lwgeom_as_lwcollection(lwg2); + n2 = c2->ngeoms; } for ( i = 0; i < n1; i++ ) { - if (lwgeom_is_collection(TYPE_GETTYPE(lwg1->type))) + if (lwgeom_is_collection(lwg1)) { - g1=lwg1->geoms[i]; + g1 = c1->geoms[i]; } else { - g1=(LWGEOM*)lwg1; + g1 = (LWGEOM*)lwg1; } if (lwgeom_is_empty(g1)) return LW_TRUE; - if (lwgeom_is_collection(TYPE_GETTYPE(g1->type))) + if (lwgeom_is_collection(g1)) { LWDEBUG(3, "Found collection inside first geometry collection, recursing"); - if (!lw_dist2d_recursive((LWCOLLECTION*)g1, (LWCOLLECTION*)lwg2, dl)) return LW_FALSE; + if (!lw_dist2d_recursive(g1, lwg2, dl)) return LW_FALSE; continue; } for ( j = 0; j < n2; j++ ) { - if (lwgeom_is_collection(TYPE_GETTYPE(lwg2->type))) + if (lwgeom_is_collection(lwg2)) { - g2=lwg2->geoms[j]; + g2 = c2->geoms[j]; } else { - g2=(LWGEOM*)lwg2; + g2 = (LWGEOM*)lwg2; } - if (lwgeom_is_collection(TYPE_GETTYPE(g2->type))) + if (lwgeom_is_collection(g2)) { LWDEBUG(3, "Found collection inside second geometry collection, recursing"); - if (!lw_dist2d_recursive((LWCOLLECTION*) g1, (LWCOLLECTION*)g2, dl)) return LW_FALSE; + if (!lw_dist2d_recursive(g1, g2, dl)) return LW_FALSE; continue; } if ( ! g1->bbox ) { - g1->bbox = lwgeom_compute_box2d(g1); + lwgeom_add_bbox(g1); } if ( ! g2->bbox ) { - g2->bbox = lwgeom_compute_box2d(g2); + lwgeom_add_bbox(g2); } + /*If one of geometries is empty, return. True here only means continue searching. False would have stoped the process*/ if (lwgeom_is_empty(g1)||lwgeom_is_empty(g2)) return LW_TRUE; - if ((dl->mode==DIST2D_MAX)||(TYPE_GETTYPE(g1->type)==POINTTYPE) ||(TYPE_GETTYPE(g2->type)==POINTTYPE)||lw_dist2d_check_overlap(g1, g2)) + if ((dl->mode==DIST_MAX)||(g1->type==POINTTYPE) ||(g2->type==POINTTYPE)||lw_dist2d_check_overlap(g1, g2)) { if (!lw_dist2d_distribute_bruteforce(g1, g2, dl)) return LW_FALSE; - if (dl->distance<=dl->tolerance && dl->mode == DIST2D_MIN) return LW_TRUE; /*just a check if the answer is already given*/ + if (dl->distance<=dl->tolerance && dl->mode == DIST_MIN) return LW_TRUE; /*just a check if the answer is already given*/ } else { @@ -296,10 +295,10 @@ lw_dist2d_distribute_bruteforce(LWGEOM *lwg1, LWGEOM *lwg2, DISTPTS *dl) { - int t1 = TYPE_GETTYPE(lwg1->type); - int t2 = TYPE_GETTYPE(lwg2->type); + int t1 = lwg1->type; + int t2 = lwg2->type; - LWDEBUGF(2, "lw_dist2d_distribute_bruteforce is called with typ1=%d, type2=%d", TYPE_GETTYPE(lwg1->type), TYPE_GETTYPE(lwg2->type)); + LWDEBUGF(2, "lw_dist2d_distribute_bruteforce is called with typ1=%d, type2=%d", lwg1->type, lwg2->type); if ( t1 == POINTTYPE ) { @@ -320,7 +319,7 @@ } else { - lwerror("Unsupported geometry type: %s", lwgeom_typename(t2)); + lwerror("Unsupported geometry type: %s", lwtype_name(t2)); return LW_FALSE; } } @@ -344,7 +343,7 @@ } else { - lwerror("Unsupported geometry type: %s", lwgeom_typename(t2)); + lwerror("Unsupported geometry type: %s", lwtype_name(t2)); return LW_FALSE; } } @@ -367,13 +366,13 @@ } else { - lwerror("Unsupported geometry type: %s", lwgeom_typename(t2)); + lwerror("Unsupported geometry type: %s", lwtype_name(t2)); return LW_FALSE; } } else { - lwerror("Unsupported geometry type: %s", lwgeom_typename(t1)); + lwerror("Unsupported geometry type: %s", lwtype_name(t1)); return LW_FALSE; } /*You shouldn't being able to get here*/ @@ -390,9 +389,9 @@ { LWDEBUG(2, "lw_dist2d_check_overlap is called"); if ( ! lwg1->bbox ) - lwg1->bbox = lwgeom_compute_box2d(lwg1); + lwgeom_calculate_gbox(lwg1, lwg1->bbox); if ( ! lwg2->bbox ) - lwg2->bbox = lwgeom_compute_box2d(lwg2); + lwgeom_calculate_gbox(lwg2, lwg2->bbox); /*Check if the geometries intersect. */ @@ -413,10 +412,10 @@ lw_dist2d_distribute_fast(LWGEOM *lwg1, LWGEOM *lwg2, DISTPTS *dl) { POINTARRAY *pa1, *pa2; - int type1 = TYPE_GETTYPE(lwg1->type); - int type2 = TYPE_GETTYPE(lwg2->type); + int type1 = lwg1->type; + int type2 = lwg2->type; - LWDEBUGF(2, "lw_dist2d_distribute_fast is called with typ1=%d, type2=%d", TYPE_GETTYPE(lwg1->type), TYPE_GETTYPE(lwg2->type)); + LWDEBUGF(2, "lw_dist2d_distribute_fast is called with typ1=%d, type2=%d", lwg1->type, lwg2->type); switch (type1) { @@ -427,7 +426,7 @@ pa1 = ((LWPOLY *)lwg1)->rings[0]; break; default: - lwerror("Unsupported geometry1 type: %s", lwgeom_typename(type1)); + lwerror("Unsupported geometry1 type: %s", lwtype_name(type1)); return LW_FALSE; } switch (type2) @@ -439,7 +438,7 @@ pa2 = ((LWPOLY *)lwg2)->rings[0]; break; default: - lwerror("Unsupported geometry2 type: %s", lwgeom_typename(type1)); + lwerror("Unsupported geometry2 type: %s", lwtype_name(type1)); return LW_FALSE; } dl->twisted=1; @@ -501,7 +500,7 @@ getPoint2d_p(point->point, 0, &p); - if (dl->mode == DIST2D_MAX) + if (dl->mode == DIST_MAX) { LWDEBUG(3, "looking for maxdistance"); return lw_dist2d_pt_ptarray(&p, poly->rings[0], dl); @@ -530,7 +529,7 @@ } LWDEBUG(3, " inside the polygon"); - if (dl->mode == DIST2D_MIN) + if (dl->mode == DIST_MIN) { dl->distance=0.0; dl->p1.x=p.x; @@ -582,7 +581,7 @@ LWDEBUG(2, "lw_dist2d_poly_poly called"); /*1 if we are looking for maxdistance, just check the outer rings.*/ - if (dl->mode == DIST2D_MAX) + if (dl->mode == DIST_MAX) { return lw_dist2d_ptarray_ptarray(poly1->rings[0], poly2->rings[0],dl); } @@ -673,7 +672,7 @@ getPoint2d_p(pa, t, &end); if (!lw_dist2d_pt_seg(p, &start, &end,dl)) return LW_FALSE; - if (dl->distance<=dl->tolerance && dl->mode == DIST2D_MIN) return LW_TRUE; /*just a check if the answer is already given*/ + if (dl->distance<=dl->tolerance && dl->mode == DIST_MIN) return LW_TRUE; /*just a check if the answer is already given*/ start = end; } @@ -711,7 +710,7 @@ LWDEBUGF(3, " distance from ring %d: %f, mindist: %f", i, dl->distance, dl->tolerance); - if (dl->distance<=dl->tolerance && dl->mode == DIST2D_MIN) return LW_TRUE; /*just a check if the answer is already given*/ + if (dl->distance<=dl->tolerance && dl->mode == DIST_MIN) return LW_TRUE; /*just a check if the answer is already given*/ } /* @@ -744,7 +743,7 @@ return LW_TRUE; } } - if (dl->mode == DIST2D_MIN) + if (dl->mode == DIST_MIN) { dl->distance=0.0; dl->p1.x=pt.x; @@ -771,7 +770,7 @@ LWDEBUGF(2, "lw_dist2d_ptarray_ptarray called (points: %d-%d)",l1->npoints, l2->npoints); - if (dl->mode == DIST2D_MAX)/*If we are searching for maxdistance we go straight to point-point calculation since the maxdistance have to be between two vertexes*/ + if (dl->mode == DIST_MAX)/*If we are searching for maxdistance we go straight to point-point calculation since the maxdistance have to be between two vertexes*/ { for (t=0; tnpoints; t++) /*for each segment in L1 */ { @@ -801,7 +800,7 @@ LWDEBUGF(4, "mindist_ptarray_ptarray; seg %i * seg %i, dist = %g\n",t,u,dl->distance); LWDEBUGF(3, " seg%d-seg%d dist: %f, mindist: %f", t, u, dl->distance, dl->tolerance); - if (dl->distance<=dl->tolerance && dl->mode == DIST2D_MIN) return LW_TRUE; /*just a check if the answer is already given*/ + if (dl->distance<=dl->tolerance && dl->mode == DIST_MIN) return LW_TRUE; /*just a check if the answer is already given*/ start2 = end2; } start = end; @@ -881,7 +880,7 @@ s = s_top/s_bot; r= r_top/r_bot; - if (((r<0) || (r>1) || (s<0) || (s>1)) || (dl->mode == DIST2D_MAX)) + if (((r<0) || (r>1) || (s<0) || (s>1)) || (dl->mode == DIST_MAX)) { if ((lw_dist2d_pt_seg(A,C,D,dl)) && (lw_dist2d_pt_seg(B,C,D,dl))) { @@ -895,7 +894,7 @@ } else { - if (dl->mode == DIST2D_MIN) /*If there is intersection we identify the intersection point and return it but only if we are looking for mindistance*/ + if (dl->mode == DIST_MIN) /*If there is intersection we identify the intersection point and return it but only if we are looking for mindistance*/ { POINT2D theP; @@ -943,7 +942,7 @@ chosen selection of the points not all of them */ int -lw_dist2d_fast_ptarray_ptarray(POINTARRAY *l1, POINTARRAY *l2,DISTPTS *dl, BOX2DFLOAT4 *box1, BOX2DFLOAT4 *box2) +lw_dist2d_fast_ptarray_ptarray(POINTARRAY *l1, POINTARRAY *l2,DISTPTS *dl, GBOX *box1, GBOX *box2) { /*here we define two lists to hold our calculated "z"-values and the order number in the geometry*/ @@ -958,7 +957,7 @@ LISTSTRUCT *list1, *list2; list1 = (LISTSTRUCT*)lwalloc(sizeof(LISTSTRUCT)*n1); list2 = (LISTSTRUCT*)lwalloc(sizeof(LISTSTRUCT)*n2); - + LWDEBUG(2, "lw_dist2d_fast_ptarray_ptarray is called"); max1X = box1->xmax; @@ -1206,13 +1205,12 @@ * */ int -pt_in_ring_2d(POINT2D *p, POINTARRAY *ring) +pt_in_ring_2d(const POINT2D *p, const POINTARRAY *ring) { int cn = 0; /* the crossing number counter */ int i; POINT2D v1, v2; -#if INTEGRITY_CHECKS POINT2D first, last; getPoint2d_p(ring, 0, &first); @@ -1224,7 +1222,6 @@ return LW_FALSE; } -#endif LWDEBUGF(2, "pt_in_ring_2d called with point: %g %g", p->x, p->y); /* printPA(ring); */ @@ -1286,9 +1283,9 @@ * otherwise, we use comp.graphics.algorithms * Frequently Asked Questions method * - * (1) AC dot AB - * r = --------- - * ||AB||^2 + * (1) AC dot AB + * r = --------- + * ||AB||^2 * r has the following meaning: * r=0 P = A * r=1 P = B @@ -1303,7 +1300,7 @@ the maxdistance have to be between two vertexes, compared to mindistance which can be between tvo vertexes vertex.*/ - if (dl->mode == DIST2D_MAX) + if (dl->mode == DIST_MAX) { if (r>=0.5) { @@ -1315,17 +1312,25 @@ } } - if (r<0) /*If the first vertex A is closest to the point p*/ + if (r<0) /*If p projected on the line is outside point A*/ { return lw_dist2d_pt_pt(p,A,dl); } - if (r>1) /*If the second vertex B is closest to the point p*/ + if (r>=1) /*If p projected on the line is outside point B or on point B*/ { return lw_dist2d_pt_pt(p,B,dl); } - - /*else if the point p is closer to some point between a and b - then we find that point and send it to lw_dist2d_pt_pt*/ + + /*If the point p is on the segment this is a more robust way to find out that*/ + if (( ((A->y-p->y)*(B->x-A->x)==(A->x-p->x)*(B->y-A->y) ) ) && (dl->mode == DIST_MIN)) + { + dl->distance = 0.0; + dl->p1 = *p; + dl->p2 = *p; + } + + /*If the projection of point p on the segment is between A and B + then we find that "point on segment" and send it to lw_dist2d_pt_pt*/ c.x=A->x + r * (B->x-A->x); c.y=A->y + r * (B->y-A->y); @@ -1383,7 +1388,7 @@ can be affectes in the world I don't dare removing it. */ int -pt_in_poly_2d(POINT2D *p, LWPOLY *poly) +pt_in_poly_2d(const POINT2D *p, const LWPOLY *poly) { int i; @@ -1405,7 +1410,7 @@ The old function nessecary for ptarray_segmentize2d in ptarray.c */ double -distance2d_pt_pt(POINT2D *p1, POINT2D *p2) +distance2d_pt_pt(const POINT2D *p1, const POINT2D *p2) { double hside = p2->x - p1->x; double vside = p2->y - p1->y; @@ -1425,7 +1430,7 @@ The old function nessecary for ptarray_segmentize2d in ptarray.c */ double -distance2d_pt_seg(POINT2D *p, POINT2D *A, POINT2D *B) +distance2d_pt_seg(const POINT2D *p, const POINT2D *A, const POINT2D *B) { double r,s; @@ -1467,158 +1472,13 @@ s = ( (A->y-p->y)*(B->x-A->x)- (A->x-p->x)*(B->y-A->y) ) / ( (B->x-A->x)*(B->x-A->x) +(B->y-A->y)*(B->y-A->y) ); - return LW_ABS(s) * sqrt( + return FP_ABS(s) * sqrt( (B->x-A->x)*(B->x-A->x) + (B->y-A->y)*(B->y-A->y) ); } - - - - -/** -find the 2d length of the given POINTARRAY (even if it's 3d) -*/ -double -lwgeom_pointarray_length2d(POINTARRAY *pts) -{ - double dist = 0.0; - int i; - POINT2D frm; - POINT2D to; - - if ( pts->npoints < 2 ) return 0.0; - for (i=0; inpoints-1; i++) - { - getPoint2d_p(pts, i, &frm); - getPoint2d_p(pts, i+1, &to); - dist += sqrt( ( (frm.x - to.x)*(frm.x - to.x) ) + - ((frm.y - to.y)*(frm.y - to.y) ) ); - } - return dist; -} - -/** - * Find the 3d/2d length of the given POINTARRAY - * (depending on its dimensions) - */ -double -lwgeom_pointarray_length(POINTARRAY *pts) -{ - double dist = 0.0; - int i; - POINT3DZ frm; - POINT3DZ to; - - if ( pts->npoints < 2 ) return 0.0; - - /* compute 2d length if 3d is not available */ - if ( ! TYPE_HASZ(pts->dims) ) return lwgeom_pointarray_length2d(pts); - - for (i=0; inpoints-1; i++) - { - getPoint3dz_p(pts, i, &frm); - getPoint3dz_p(pts, i+1, &to); - dist += sqrt( ( (frm.x - to.x)*(frm.x - to.x) ) + - ((frm.y - to.y)*(frm.y - to.y) ) + - ((frm.z - to.z)*(frm.z - to.z) ) ); - } - return dist; -} - -/** - * This should be rewritten to make use of the curve itself. - */ -double -lwgeom_curvepolygon_area(LWCURVEPOLY *curvepoly) -{ - LWPOLY *poly = (LWPOLY *)lwgeom_segmentize((LWGEOM *)curvepoly, 32); - return lwgeom_polygon_area(poly); -} - -/** - * Find the area of the outer ring - sum (area of inner rings). - * Could use a more numerically stable calculator... - */ -double -lwgeom_polygon_area(LWPOLY *poly) -{ - double poly_area=0.0; - int i; - POINT2D p1; - POINT2D p2; - - LWDEBUGF(2, "in lwgeom_polygon_area (%d rings)", poly->nrings); - - for (i=0; inrings; i++) - { - int j; - POINTARRAY *ring = poly->rings[i]; - double ringarea = 0.0; - - LWDEBUGF(4, " rings %d has %d points", i, ring->npoints); - - if ( ! ring->npoints ) continue; /* empty ring */ - for (j=0; jnpoints-1; j++) - { - getPoint2d_p(ring, j, &p1); - getPoint2d_p(ring, j+1, &p2); - ringarea += ( p1.x * p2.y ) - ( p1.y * p2.x ); - } - - ringarea /= 2.0; - - LWDEBUGF(4, " ring 1 has area %lf",ringarea); - - ringarea = fabs(ringarea); - if (i != 0) /*outer */ - ringarea = -1.0*ringarea ; /* its a hole */ - - poly_area += ringarea; - } - - return poly_area; -} - -/** - * Compute the sum of polygon rings length. - * Could use a more numerically stable calculator... - */ -double -lwgeom_polygon_perimeter(LWPOLY *poly) -{ - double result=0.0; - int i; - - LWDEBUGF(2, "in lwgeom_polygon_perimeter (%d rings)", poly->nrings); - - for (i=0; inrings; i++) - result += lwgeom_pointarray_length(poly->rings[i]); - - return result; -} - -/** - * Compute the sum of polygon rings length (forcing 2d computation). - * Could use a more numerically stable calculator... - */ -double -lwgeom_polygon_perimeter2d(LWPOLY *poly) -{ - double result=0.0; - int i; - - LWDEBUGF(2, "in lwgeom_polygon_perimeter (%d rings)", poly->nrings); - - for (i=0; inrings; i++) - result += lwgeom_pointarray_length2d(poly->rings[i]); - - return result; -} - - int lwgeom_pt_inside_circle(POINT2D *p, double cx, double cy, double rad) { @@ -1637,7 +1497,7 @@ * Return 0 on exception (same point), 1 otherwise. */ int -azimuth_pt_pt(POINT2D *A, POINT2D *B, double *d) +azimuth_pt_pt(const POINT2D *A, const POINT2D *B, double *d) { if ( A->x == B->x ) { diff -Nru postgis-1.5.3/liblwgeom/measures.h postgis-2.0.1/liblwgeom/measures.h --- postgis-1.5.3/liblwgeom/measures.h 2009-11-25 19:15:57.000000000 +0000 +++ postgis-2.0.1/liblwgeom/measures.h 2012-02-27 22:08:12.000000000 +0000 @@ -4,16 +4,14 @@ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net - * Copyright 2001-2006 Refractions Research Inc. - * Copyright 2007-2008 Mark Cave-Ayland - * Copyright 2008 Paul Ramsey + * Copyright 2010 Nicklas Avén * * This is free software; you can redistribute and/or modify it under * the terms of the GNU General Public Licence. See the COPYING file. * **********************************************************************/ -#include "liblwgeom.h" +#include "liblwgeom_internal.h" /** @@ -40,9 +38,9 @@ /* Preprocessing functions */ -int lw_dist2d_comp(uchar *lw1, uchar *lw2, DISTPTS *dl); +int lw_dist2d_comp(LWGEOM *lw1, LWGEOM *lw2, DISTPTS *dl); int lw_dist2d_distribute_bruteforce(LWGEOM *lwg1, LWGEOM *lwg2, DISTPTS *dl); -int lw_dist2d_recursive(const LWCOLLECTION * lwg1,const LWCOLLECTION * lwg2, DISTPTS *dl); +int lw_dist2d_recursive(const LWGEOM *lwg1, const LWGEOM *lwg2, DISTPTS *dl); int lw_dist2d_check_overlap(LWGEOM *lwg1,LWGEOM *lwg2); int lw_dist2d_distribute_fast(LWGEOM *lwg1, LWGEOM *lwg2, DISTPTS *dl); /* @@ -66,7 +64,7 @@ int lw_dist2d_pre_seg_seg(POINTARRAY *l1, POINTARRAY *l2,LISTSTRUCT *list1, LISTSTRUCT *list2,double k, DISTPTS *dl); int lw_dist2d_selected_seg_seg(POINT2D *A, POINT2D *B, POINT2D *C, POINT2D *D, DISTPTS *dl); int struct_cmp_by_measure(const void *a, const void *b); -int lw_dist2d_fast_ptarray_ptarray(POINTARRAY *l1,POINTARRAY *l2, DISTPTS *dl, BOX2DFLOAT4 *box1, BOX2DFLOAT4 *box2); +int lw_dist2d_fast_ptarray_ptarray(POINTARRAY *l1,POINTARRAY *l2, DISTPTS *dl, GBOX *box1, GBOX *box2); /* Functions in common for Brute force and new calculation */ diff -Nru postgis-1.5.3/liblwgeom/measures3d.c postgis-2.0.1/liblwgeom/measures3d.c --- postgis-1.5.3/liblwgeom/measures3d.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/measures3d.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,1151 @@ + +/********************************************************************** + * $Id: measures.c 5439 2010-03-16 03:13:33Z pramsey $ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * Copyright 2011 Nicklas Avén + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include +#include + +#include "measures3d.h" +#include "lwgeom_log.h" + + +/*------------------------------------------------------------------------------------------------------------ +Initializing functions +The functions starting the distance-calculation processses +--------------------------------------------------------------------------------------------------------------*/ + +/** +Function initializing 3dshortestline and 3dlongestline calculations. +*/ +LWGEOM * +lw_dist3d_distanceline(LWGEOM *lw1, LWGEOM *lw2,int srid,int mode) +{ + double x1,x2,y1,y2, z1, z2; + double initdistance = ( mode == DIST_MIN ? MAXFLOAT : -1.0); + DISTPTS3D thedl; + LWPOINT *lwpoints[2]; + LWGEOM *result; + + thedl.mode = mode; + thedl.distance = initdistance; + thedl.tolerance = 0.0; + + LWDEBUG(2, "lw_dist3d_distanceline is called"); + if (!lw_dist3d_recursive(lw1, lw2, &thedl)) + { + /*should never get here. all cases ought to be error handled earlier*/ + lwerror("Some unspecified error."); + result = (LWGEOM *)lwcollection_construct_empty(COLLECTIONTYPE, srid, 0, 0); + } + + /*if thedl.distance is unchanged there where only empty geometries input*/ + if (thedl.distance == initdistance) + { + LWDEBUG(3, "didn't find geometries to measure between, returning null"); + result = (LWGEOM *)lwcollection_construct_empty(COLLECTIONTYPE, srid, 0, 0); + } + else + { + x1=thedl.p1.x; + y1=thedl.p1.y; + z1=thedl.p1.z; + x2=thedl.p2.x; + y2=thedl.p2.y; + z2=thedl.p2.z; + + + lwpoints[0] = lwpoint_make3dz(srid, x1, y1, z1); + lwpoints[1] = lwpoint_make3dz(srid, x2, y2, z2); + + result = (LWGEOM *)lwline_from_ptarray(srid, 2, lwpoints); + } + + return result; +} + +/** +Function initializing 3dclosestpoint calculations. +*/ +LWGEOM * +lw_dist3d_distancepoint(LWGEOM *lw1, LWGEOM *lw2,int srid,int mode) +{ + double x,y,z; + DISTPTS3D thedl; + double initdistance = MAXFLOAT; + LWGEOM *result; + + thedl.mode = mode; + thedl.distance= initdistance; + thedl.tolerance = 0; + + LWDEBUG(2, "lw_dist3d_distancepoint is called"); + + if (!lw_dist3d_recursive(lw1, lw2, &thedl)) + { + /*should never get here. all cases ought to be error handled earlier*/ + lwerror("Some unspecified error."); + result = (LWGEOM *)lwcollection_construct_empty(COLLECTIONTYPE, srid, 0, 0); + } + + if (thedl.distance == initdistance) + { + LWDEBUG(3, "didn't find geometries to measure between, returning null"); + result = (LWGEOM *)lwcollection_construct_empty(COLLECTIONTYPE, srid, 0, 0); + } + else + { + x=thedl.p1.x; + y=thedl.p1.y; + z=thedl.p1.z; + result = (LWGEOM *)lwpoint_make3dz(srid, x, y, z); + } + + return result; +} + + +/** +Function initialazing 3d max distance calculation +*/ +double +lwgeom_maxdistance3d(LWGEOM *lw1, LWGEOM *lw2) +{ + LWDEBUG(2, "lwgeom_maxdistance3d is called"); + + return lwgeom_maxdistance3d_tolerance( lw1, lw2, 0.0 ); +} + +/** +Function handling 3d max distance calculations and dfyllywithin calculations. +The difference is just the tolerance. +*/ +double +lwgeom_maxdistance3d_tolerance(LWGEOM *lw1, LWGEOM *lw2, double tolerance) +{ + /*double thedist;*/ + DISTPTS3D thedl; + LWDEBUG(2, "lwgeom_maxdistance3d_tolerance is called"); + thedl.mode = DIST_MAX; + thedl.distance= -1; + thedl.tolerance = tolerance; + if (lw_dist3d_recursive(lw1, lw2, &thedl)) + { + return thedl.distance; + } + /*should never get here. all cases ought to be error handled earlier*/ + lwerror("Some unspecified error."); + return -1; +} + +/** + Function initialazing 3d min distance calculation +*/ +double +lwgeom_mindistance3d(LWGEOM *lw1, LWGEOM *lw2) +{ + LWDEBUG(2, "lwgeom_mindistance3d is called"); + return lwgeom_mindistance3d_tolerance( lw1, lw2, 0.0 ); +} + +/** + Function handling 3d min distance calculations and dwithin calculations. + The difference is just the tolerance. +*/ +double +lwgeom_mindistance3d_tolerance(LWGEOM *lw1, LWGEOM *lw2, double tolerance) +{ + DISTPTS3D thedl; + LWDEBUG(2, "lwgeom_mindistance3d_tolerance is called"); + thedl.mode = DIST_MIN; + thedl.distance= MAXFLOAT; + thedl.tolerance = tolerance; + if (lw_dist3d_recursive(lw1, lw2, &thedl)) + { + return thedl.distance; + } + /*should never get here. all cases ought to be error handled earlier*/ + lwerror("Some unspecified error."); + return MAXFLOAT; +} + + +/*------------------------------------------------------------------------------------------------------------ +End of Initializing functions +--------------------------------------------------------------------------------------------------------------*/ + +/*------------------------------------------------------------------------------------------------------------ +Preprocessing functions +Functions preparing geometries for distance-calculations +--------------------------------------------------------------------------------------------------------------*/ + + +/** +This is a recursive function delivering every possible combinatin of subgeometries +*/ +int lw_dist3d_recursive(const LWGEOM *lwg1,const LWGEOM *lwg2, DISTPTS3D *dl) +{ + int i, j; + int n1=1; + int n2=1; + LWGEOM *g1 = NULL; + LWGEOM *g2 = NULL; + LWCOLLECTION *c1 = NULL; + LWCOLLECTION *c2 = NULL; + + LWDEBUGF(2, "lw_dist3d_recursive is called with type1=%d, type2=%d", lwg1->type, lwg2->type); + + if (lwgeom_is_collection(lwg1)) + { + LWDEBUG(3, "First geometry is collection"); + c1 = lwgeom_as_lwcollection(lwg1); + n1 = c1->ngeoms; + } + if (lwgeom_is_collection(lwg2)) + { + LWDEBUG(3, "Second geometry is collection"); + c2 = lwgeom_as_lwcollection(lwg2); + n2 = c2->ngeoms; + } + + for ( i = 0; i < n1; i++ ) + { + + if (lwgeom_is_collection(lwg1)) + { + g1 = c1->geoms[i]; + } + else + { + g1 = (LWGEOM*)lwg1; + } + + if (lwgeom_is_empty(g1)) return LW_TRUE; + + if (lwgeom_is_collection(g1)) + { + LWDEBUG(3, "Found collection inside first geometry collection, recursing"); + if (!lw_dist3d_recursive(g1, lwg2, dl)) return LW_FALSE; + continue; + } + for ( j = 0; j < n2; j++ ) + { + if (lwgeom_is_collection(lwg2)) + { + g2 = c2->geoms[j]; + } + else + { + g2 = (LWGEOM*)lwg2; + } + if (lwgeom_is_collection(g2)) + { + LWDEBUG(3, "Found collection inside second geometry collection, recursing"); + if (!lw_dist3d_recursive(g1, g2, dl)) return LW_FALSE; + continue; + } + + + /*If one of geometries is empty, return. True here only means continue searching. False would have stoped the process*/ + if (lwgeom_is_empty(g1)||lwgeom_is_empty(g2)) return LW_TRUE; + + + if (!lw_dist3d_distribute_bruteforce(g1, g2, dl)) return LW_FALSE; + if (dl->distance<=dl->tolerance && dl->mode == DIST_MIN) return LW_TRUE; /*just a check if the answer is already given*/ + } + } + return LW_TRUE; +} + + + +/** + +This function distributes the brut-force for 3D so far the only type, tasks depending on type +*/ +int +lw_dist3d_distribute_bruteforce(LWGEOM *lwg1, LWGEOM *lwg2, DISTPTS3D *dl) +{ + + int t1 = lwg1->type; + int t2 = lwg2->type; + + LWDEBUGF(2, "lw_dist3d_distribute_bruteforce is called with typ1=%d, type2=%d", lwg1->type, lwg2->type); + + if ( t1 == POINTTYPE ) + { + if ( t2 == POINTTYPE ) + { + dl->twisted=1; + return lw_dist3d_point_point((LWPOINT *)lwg1, (LWPOINT *)lwg2, dl); + } + else if ( t2 == LINETYPE ) + { + dl->twisted=1; + return lw_dist3d_point_line((LWPOINT *)lwg1, (LWLINE *)lwg2, dl); + } + else if ( t2 == POLYGONTYPE ) + { + dl->twisted=1; + return lw_dist3d_point_poly((LWPOINT *)lwg1, (LWPOLY *)lwg2,dl); + } + else + { + lwerror("Unsupported geometry type: %s", lwtype_name(t2)); + return LW_FALSE; + } + } + else if ( t1 == LINETYPE ) + { + if ( t2 == POINTTYPE ) + { + dl->twisted=(-1); + return lw_dist3d_point_line((LWPOINT *)lwg2,(LWLINE *)lwg1,dl); + } + else if ( t2 == LINETYPE ) + { + dl->twisted=1; + return lw_dist3d_line_line((LWLINE *)lwg1,(LWLINE *)lwg2,dl); + } + else if ( t2 == POLYGONTYPE ) + { + dl->twisted=1; + return lw_dist3d_line_poly((LWLINE *)lwg1,(LWPOLY *)lwg2,dl); + } + else + { + lwerror("Unsupported geometry type: %s", lwtype_name(t2)); + return LW_FALSE; + } + } + else if ( t1 == POLYGONTYPE ) + { + if ( t2 == POLYGONTYPE ) + { + dl->twisted=1; + return lw_dist3d_poly_poly((LWPOLY *)lwg1, (LWPOLY *)lwg2,dl); + } + else if ( t2 == POINTTYPE ) + { + dl->twisted=-1; + return lw_dist3d_point_poly((LWPOINT *)lwg2, (LWPOLY *)lwg1,dl); + } + else if ( t2 == LINETYPE ) + { + dl->twisted=-1; + return lw_dist3d_line_poly((LWLINE *)lwg2,(LWPOLY *)lwg1,dl); + } + else + { + lwerror("Unsupported geometry type: %s", lwtype_name(t2)); + return LW_FALSE; + } + } + else + { + lwerror("Unsupported geometry type: %s", lwtype_name(t1)); + return LW_FALSE; + } + /*You shouldn't being able to get here*/ + lwerror("unspecified error in function lw_dist3d_distribute_bruteforce"); + return LW_FALSE; +} + + + +/*------------------------------------------------------------------------------------------------------------ +End of Preprocessing functions +--------------------------------------------------------------------------------------------------------------*/ + + +/*------------------------------------------------------------------------------------------------------------ +Brute force functions +So far the only way to do 3D-calculations +--------------------------------------------------------------------------------------------------------------*/ + +/** + +point to point calculation +*/ +int +lw_dist3d_point_point(LWPOINT *point1, LWPOINT *point2, DISTPTS3D *dl) +{ + LWDEBUG(2, "lw_dist3d_point_point is called"); + POINT3DZ p1; + POINT3DZ p2; + + getPoint3dz_p(point1->point, 0, &p1); + getPoint3dz_p(point2->point, 0, &p2); + + return lw_dist3d_pt_pt(&p1, &p2,dl); +} +/** + +point to line calculation +*/ +int +lw_dist3d_point_line(LWPOINT *point, LWLINE *line, DISTPTS3D *dl) +{ + LWDEBUG(2, "lw_dist3d_point_line is called"); + POINT3DZ p; + POINTARRAY *pa = line->points; + + getPoint3dz_p(point->point, 0, &p); + return lw_dist3d_pt_ptarray(&p, pa, dl); +} + +/** + +Computes point to polygon distance +For mindistance that means: +1)find the plane of the polygon +2)projecting the point to the plane of the polygon +3)finding if that projected point is inside the polygon, if so the distance is measured to that projected point +4) if not in polygon above, check the distance against the boundary of the polygon +for max distance it is always point against boundary + +*/ +int +lw_dist3d_point_poly(LWPOINT *point, LWPOLY *poly, DISTPTS3D *dl) +{ + LWDEBUG(2, "lw_dist3d_point_poly is called"); + POINT3DZ p, projp;/*projp is "point projected on plane"*/ + PLANE3D plane; + getPoint3dz_p(point->point, 0, &p); + + /*If we are lookig for max distance, longestline or dfullywithin*/ + if (dl->mode == DIST_MAX) + { + LWDEBUG(3, "looking for maxdistance"); + return lw_dist3d_pt_ptarray(&p, poly->rings[0], dl); + } + + /*Find the plane of the polygon, the "holes" have to be on the same plane. so we only care about the boudary*/ + if(!define_plane(poly->rings[0], &plane)) + return LW_FALSE; + + /*get our point projected on the plane of the polygon*/ + project_point_on_plane(&p, &plane, &projp); + + return lw_dist3d_pt_poly(&p, poly,&plane, &projp, dl); +} + + +/** + +line to line calculation +*/ +int +lw_dist3d_line_line(LWLINE *line1, LWLINE *line2, DISTPTS3D *dl) +{ + LWDEBUG(2, "lw_dist3d_line_line is called"); + POINTARRAY *pa1 = line1->points; + POINTARRAY *pa2 = line2->points; + + return lw_dist3d_ptarray_ptarray(pa1, pa2, dl); +} + +/** + +line to polygon calculation +*/ +int lw_dist3d_line_poly(LWLINE *line, LWPOLY *poly, DISTPTS3D *dl) +{ + LWDEBUG(2, "lw_dist3d_line_poly is called"); + PLANE3D plane; + + if (dl->mode == DIST_MAX) + { + return lw_dist3d_ptarray_ptarray(line->points, poly->rings[0], dl); + } + + if(!define_plane(poly->rings[0], &plane)) + return LW_FALSE; + + return lw_dist3d_ptarray_poly(line->points, poly,&plane, dl); +} + +/** + +polygon to polygon calculation +*/ +int lw_dist3d_poly_poly(LWPOLY *poly1, LWPOLY *poly2, DISTPTS3D *dl) +{ + LWDEBUG(2, "lw_dist3d_poly_poly is called"); + PLANE3D plane; + if (dl->mode == DIST_MAX) + { + return lw_dist3d_ptarray_ptarray(poly1->rings[0], poly2->rings[0], dl); + } + + if(!define_plane(poly2->rings[0], &plane)) + return LW_FALSE; + + /*What we do here is to compare the bondary of one polygon with the other polygon + and then take the second boudary comparing with the first polygon*/ + dl->twisted=1; + if(!lw_dist3d_ptarray_poly(poly1->rings[0], poly2,&plane, dl)) + return LW_FALSE; + if(dl->distance==0.0) /*Just check if the answer already is given*/ + return LW_TRUE; + + if(!define_plane(poly1->rings[0], &plane)) + return LW_FALSE; + dl->twisted=-1; /*because we swithc the order of geometries we swithch "twisted" to -1 which will give the right order of points in shortest line.*/ + return lw_dist3d_ptarray_poly(poly2->rings[0], poly1,&plane, dl); +} + +/** + + * search all the segments of pointarray to see which one is closest to p + * Returns distance between point and pointarray + */ +int +lw_dist3d_pt_ptarray(POINT3DZ *p, POINTARRAY *pa,DISTPTS3D *dl) +{ + int t; + POINT3DZ start, end; + int twist = dl->twisted; + + LWDEBUG(2, "lw_dist3d_pt_ptarray is called"); + + getPoint3dz_p(pa, 0, &start); + + for (t=1; tnpoints; t++) + { + dl->twisted=twist; + getPoint3dz_p(pa, t, &end); + if (!lw_dist3d_pt_seg(p, &start, &end,dl)) return LW_FALSE; + + if (dl->distance<=dl->tolerance && dl->mode == DIST_MIN) return LW_TRUE; /*just a check if the answer is already given*/ + start = end; + } + + return LW_TRUE; +} + + +/** + +If searching for min distance, this one finds the closest point on segment A-B from p. +if searching for max distance it just sends p-A and p-B to pt-pt calculation +*/ +int +lw_dist3d_pt_seg(POINT3DZ *p, POINT3DZ *A, POINT3DZ *B, DISTPTS3D *dl) +{ + POINT3DZ c; + double r; + /*if start==end, then use pt distance */ + if ( ( A->x == B->x) && (A->y == B->y) && (A->z == B->z) ) + { + return lw_dist3d_pt_pt(p,A,dl); + } + + + r = ( (p->x-A->x) * (B->x-A->x) + (p->y-A->y) * (B->y-A->y) + ( p->z-A->z) * (B->z-A->z) )/( (B->x-A->x)*(B->x-A->x) +(B->y-A->y)*(B->y-A->y)+(B->z-A->z)*(B->z-A->z) ); + + /*This is for finding the 3Dmaxdistance. + the maxdistance have to be between two vertexes, + compared to mindistance which can be between + tvo vertexes vertex.*/ + if (dl->mode == DIST_MAX) + { + if (r>=0.5) + { + return lw_dist3d_pt_pt(p,A,dl); + } + if (r<0.5) + { + return lw_dist3d_pt_pt(p,B,dl); + } + } + + if (r<0) /*If the first vertex A is closest to the point p*/ + { + return lw_dist3d_pt_pt(p,A,dl); + } + if (r>1) /*If the second vertex B is closest to the point p*/ + { + return lw_dist3d_pt_pt(p,B,dl); + } + + /*else if the point p is closer to some point between a and b + then we find that point and send it to lw_dist3d_pt_pt*/ + c.x=A->x + r * (B->x-A->x); + c.y=A->y + r * (B->y-A->y); + c.z=A->z + r * (B->z-A->z); + + return lw_dist3d_pt_pt(p,&c,dl); +} + + +/** + +Compares incomming points and +stores the points closest to each other +or most far away from each other +depending on dl->mode (max or min) +*/ +int +lw_dist3d_pt_pt(POINT3DZ *thep1, POINT3DZ *thep2,DISTPTS3D *dl) +{ + LWDEBUGF(2, "lw_dist3d_pt_pt called (with points: p1.x=%f, p1.y=%f,p1.z=%f,p2.x=%f, p2.y=%f,p2.z=%f)",thep1->x,thep1->y,thep1->z,thep2->x,thep2->y,thep2->z ); + double dx = thep2->x - thep1->x; + double dy = thep2->y - thep1->y; + double dz = thep2->z - thep1->z; + double dist = sqrt ( dx*dx + dy*dy + dz*dz); + + if (((dl->distance - dist)*(dl->mode))>0) /*multiplication with mode to handle mindistance (mode=1) and maxdistance (mode = (-1)*/ + { + dl->distance = dist; + + if (dl->twisted>0) /*To get the points in right order. twisted is updated between 1 and (-1) every time the order is changed earlier in the chain*/ + { + dl->p1 = *thep1; + dl->p2 = *thep2; + } + else + { + dl->p1 = *thep2; + dl->p2 = *thep1; + } + } + return LW_TRUE; +} + + +/** + +Finds all combinationes of segments between two pointarrays +*/ +int +lw_dist3d_ptarray_ptarray(POINTARRAY *l1, POINTARRAY *l2,DISTPTS3D *dl) +{ + LWDEBUGF(2, "lw_dist3d_ptarray_ptarray called (points: %d-%d)",l1->npoints, l2->npoints); + int t,u; + POINT3DZ start, end; + POINT3DZ start2, end2; + int twist = dl->twisted; + + + + if (dl->mode == DIST_MAX)/*If we are searching for maxdistance we go straight to point-point calculation since the maxdistance have to be between two vertexes*/ + { + for (t=0; tnpoints; t++) /*for each segment in L1 */ + { + getPoint3dz_p(l1, t, &start); + for (u=0; unpoints; u++) /*for each segment in L2 */ + { + getPoint3dz_p(l2, u, &start2); + lw_dist3d_pt_pt(&start,&start2,dl); + LWDEBUGF(4, "maxdist_ptarray_ptarray; seg %i * seg %i, dist = %g\n",t,u,dl->distance); + LWDEBUGF(3, " seg%d-seg%d dist: %f, mindist: %f", + t, u, dl->distance, dl->tolerance); + } + } + } + else + { + getPoint3dz_p(l1, 0, &start); + for (t=1; tnpoints; t++) /*for each segment in L1 */ + { + getPoint3dz_p(l1, t, &end); + getPoint3dz_p(l2, 0, &start2); + for (u=1; unpoints; u++) /*for each segment in L2 */ + { + getPoint3dz_p(l2, u, &end2); + dl->twisted=twist; + lw_dist3d_seg_seg(&start, &end, &start2, &end2,dl); + LWDEBUGF(4, "mindist_ptarray_ptarray; seg %i * seg %i, dist = %g\n",t,u,dl->distance); + LWDEBUGF(3, " seg%d-seg%d dist: %f, mindist: %f", + t, u, dl->distance, dl->tolerance); + if (dl->distance<=dl->tolerance && dl->mode == DIST_MIN) return LW_TRUE; /*just a check if the answer is already given*/ + start2 = end2; + } + start = end; + } + } + return LW_TRUE; +} + +/** + +Finds the two closest points on two linesegments +*/ +int +lw_dist3d_seg_seg(POINT3DZ *s1p1, POINT3DZ *s1p2, POINT3DZ *s2p1, POINT3DZ *s2p2, DISTPTS3D *dl) +{ + /*s1p1 and s1p2 are the same point */ + if ( ( s1p1->x == s1p2->x) && (s1p1->y == s1p2->y) && (s1p1->z == s1p2->y) ) + { + return lw_dist3d_pt_seg(s1p1,s2p1,s2p2,dl); + } + /*s2p1 and s2p2 are the same point */ + if ( ( s2p1->x == s2p2->x) && (s2p1->y == s2p2->y) && (s2p1->z == s2p2->y) ) + { + dl->twisted= ((dl->twisted) * (-1)); + return lw_dist3d_pt_seg(s2p1,s1p1,s1p2,dl); + } + + +/* + Here we use algorithm from softsurfer.com + that can be found here + http://softsurfer.com/Archive/algorithm_0106/algorithm_0106.htm +*/ + + + VECTOR3D v1, v2, vl; + double s1k, s2k; /*two variables representing where on Line 1 (s1k) and where on Line 2 (s2k) a connecting line between the two lines is perpendicular to both lines*/ + POINT3DZ p1, p2; + + if (!get_3dvector_from_points(s1p1, s1p2, &v1)) + return LW_FALSE; + + if (!get_3dvector_from_points(s2p1, s2p2, &v2)) + return LW_FALSE; + + if (!get_3dvector_from_points(s2p1, s1p1, &vl)) + return LW_FALSE; + + double a = DOT(v1,v1); + double b = DOT(v1,v2); + double c = DOT(v2,v2); + double d = DOT(v1,vl); + double e = DOT(v2,vl); + double D = a*c - b*b; + + + if (D <0.000000001) + { /* the lines are almost parallel*/ + s1k = 0.0; /*If the lines are paralell we try by using the startpoint of first segment. If that gives a projected point on the second line outside segment 2 it wil be found that s2k is >1 or <0.*/ + if(b>c) /* use the largest denominator*/ + { + s2k=d/b; + } + else + { + s2k =e/c; + } + } + else + { + s1k = (b*e - c*d) / D; + s2k = (a*e - b*d) / D; + } + + /* Now we check if the projected closest point on the infinite lines is outside our segments. If so the combinations with start and end points will be tested*/ + if(s1k<0.0||s1k>1.0||s2k<0.0||s2k>1.0) + { + if(s1k<0.0) + { + + if (!lw_dist3d_pt_seg(s1p1, s2p1, s2p2, dl)) + { + return LW_FALSE; + } + } + if(s1k>1.0) + { + + if (!lw_dist3d_pt_seg(s1p2, s2p1, s2p2, dl)) + { + return LW_FALSE; + } + } + if(s2k<0.0) + { + dl->twisted= ((dl->twisted) * (-1)); + if (!lw_dist3d_pt_seg(s2p1, s1p1, s1p2, dl)) + { + return LW_FALSE; + } + } + if(s2k>1.0) + { + dl->twisted= ((dl->twisted) * (-1)); + if (!lw_dist3d_pt_seg(s2p2, s1p1, s1p2, dl)) + { + return LW_FALSE; + } + } + } + else + {/*Find the closest point on the edges of both segments*/ + p1.x=s1p1->x+s1k*(s1p2->x-s1p1->x); + p1.y=s1p1->y+s1k*(s1p2->y-s1p1->y); + p1.z=s1p1->z+s1k*(s1p2->z-s1p1->z); + + p2.x=s2p1->x+s2k*(s2p2->x-s2p1->x); + p2.y=s2p1->y+s2k*(s2p2->y-s2p1->y); + p2.z=s2p1->z+s2k*(s2p2->z-s2p1->z); + + if (!lw_dist3d_pt_pt(&p1,&p2,dl))/* Send the closest points to point-point calculation*/ + { + return LW_FALSE; + } + } + return LW_TRUE; +} + +/** + +Checking if the point projected on the plane of the polygon actually is inside that polygon. +If so the mindistance is between that projected point and our original point. +If not we check from original point to the bounadary. +If the projected point is inside a hole of the polygon we check the distance to the boudary of that hole. +*/ +int +lw_dist3d_pt_poly(POINT3DZ *p, LWPOLY *poly, PLANE3D *plane,POINT3DZ *projp, DISTPTS3D *dl) +{ + int i; + + LWDEBUG(2, "lw_dist3d_point_poly called"); + + + if(pt_in_ring_3d(projp, poly->rings[0], plane)) + { + for (i=1; inrings; i++) + { + /* Inside a hole. Distance = pt -> ring */ + if ( pt_in_ring_3d(projp, poly->rings[i], plane )) + { + LWDEBUG(3, " inside an hole"); + return lw_dist3d_pt_ptarray(p, poly->rings[i], dl); + } + } + + return lw_dist3d_pt_pt(p,projp,dl);/* If the projected point is inside the polygon the shortest distance is between that point and the inputed point*/ + } + else + { + return lw_dist3d_pt_ptarray(p, poly->rings[0], dl); /*If the projected point is outside the polygon we search for the closest distance against the boundarry instead*/ + } + + return LW_TRUE; + +} + +/** + +Computes pointarray to polygon distance +*/ +int lw_dist3d_ptarray_poly(POINTARRAY *pa, LWPOLY *poly,PLANE3D *plane, DISTPTS3D *dl) +{ + + + int i,j,k; + double f, s1, s2; + VECTOR3D projp1_projp2; + POINT3DZ p1, p2,projp1, projp2, intersectionp; + + getPoint3dz_p(pa, 0, &p1); + + s1=project_point_on_plane(&p1, plane, &projp1); /*the sign of s1 tells us on which side of the plane the point is. */ + lw_dist3d_pt_poly(&p1, poly, plane,&projp1, dl); + + for (i=1;inpoints;i++) + { + getPoint3dz_p(pa, i, &p2); + s2=project_point_on_plane(&p2, plane, &projp2); + lw_dist3d_pt_poly(&p2, poly, plane,&projp2, dl); + + /*If s1and s2 has different signs that means they are on different sides of the plane of the polygon. + That means that the edge between the points crosses the plane and might intersect with the polygon*/ + if((s1*s2)<=0) + { + f=fabs(s1)/(fabs(s1)+fabs(s2)); /*The size of s1 and s2 is the distance from the point to the plane.*/ + get_3dvector_from_points(&projp1, &projp2,&projp1_projp2); + + /*get the point where the line segment crosses the plane*/ + intersectionp.x=projp1.x+f*projp1_projp2.x; + intersectionp.y=projp1.y+f*projp1_projp2.y; + intersectionp.z=projp1.z+f*projp1_projp2.z; + + int intersects = LW_TRUE; /*We set intersects to true until the opposite is proved*/ + + if(pt_in_ring_3d(&intersectionp, poly->rings[0], plane)) /*Inside outer ring*/ + { + for (k=1;knrings; k++) + { + /* Inside a hole, so no intersection with the polygon*/ + if ( pt_in_ring_3d(&intersectionp, poly->rings[k], plane )) + { + intersects=LW_FALSE; + break; + } + } + if(intersects) + { + dl->distance=0.0; + dl->p1.x=intersectionp.x; + dl->p1.y=intersectionp.y; + dl->p1.z=intersectionp.z; + + dl->p2.x=intersectionp.x; + dl->p2.y=intersectionp.y; + dl->p2.z=intersectionp.z; + return LW_TRUE; + + } + } + } + + projp2=projp1; + s2=s1; + p2=p1; + } + + /*check or pointarray against boundary and inner boundaries of the polygon*/ + for (j=0;jnrings;j++) + { + lw_dist3d_ptarray_ptarray(pa, poly->rings[j], dl); + } + +return LW_TRUE; +} + + +/** + +Here we define the plane of a polygon (boundary pointarray of a polygon) +the plane is stored as a pont in plane (plane.pop) and a normal vector (plane.pv) +*/ +int +define_plane(POINTARRAY *pa, PLANE3D *pl) +{ + int i,j, numberofvectors, pointsinslice; + POINT3DZ p, p1, p2; + + double sumx=0; + double sumy=0; + double sumz=0; + double vl; /*vector length*/ + + VECTOR3D v1, v2, v; + + if((pa->npoints-1)==3) /*Triangle is special case*/ + { + pointsinslice=1; + } + else + { + pointsinslice=(int) floor((pa->npoints-1)/4); /*divide the pointarray into 4 slices*/ + } + + /*find the avg point*/ + for (i=0;i<(pa->npoints-1);i++) + { + getPoint3dz_p(pa, i, &p); + sumx+=p.x; + sumy+=p.y; + sumz+=p.z; + } + pl->pop.x=(sumx/(pa->npoints-1)); + pl->pop.y=(sumy/(pa->npoints-1)); + pl->pop.z=(sumz/(pa->npoints-1)); + + sumx=0; + sumy=0; + sumz=0; + numberofvectors= floor((pa->npoints-1)/pointsinslice); /*the number of vectors we try can be 3, 4 or 5*/ + + getPoint3dz_p(pa, 0, &p1); + for (j=pointsinslice;jnpoints;j+=pointsinslice) + { + getPoint3dz_p(pa, j, &p2); + + if (!get_3dvector_from_points(&(pl->pop), &p1, &v1) || !get_3dvector_from_points(&(pl->pop), &p2, &v2)) + return LW_FALSE; + /*perpendicular vector is cross product of v1 and v2*/ + if (!get_3dcross_product(&v1,&v2, &v)) + return LW_FALSE; + vl=VECTORLENGTH(v); + sumx+=(v.x/vl); + sumy+=(v.y/vl); + sumz+=(v.z/vl); + p1=p2; + } + pl->pv.x=(sumx/numberofvectors); + pl->pv.y=(sumy/numberofvectors); + pl->pv.z=(sumz/numberofvectors); + + return 1; +} + +/** + +Finds a point on a plane from where the original point is perpendicular to the plane +*/ +double +project_point_on_plane(POINT3DZ *p, PLANE3D *pl, POINT3DZ *p0) +{ +/*In our plane definition we have a point on the plane and a normal vektor (pl.pv), perpendicular to the plane +this vector will be paralell to the line between our inputted point above the plane and the point we are searching for on the plane. +So, we already have a direction from p to find p0, but we don't know the distance. +*/ + + VECTOR3D v1; + double f; + + if (!get_3dvector_from_points(&(pl->pop), p, &v1)) + return LW_FALSE; + + f=-(DOT(pl->pv,v1)/DOT(pl->pv,pl->pv)); + + p0->x=p->x+pl->pv.x*f; + p0->y=p->y+pl->pv.y*f; + p0->z=p->z+pl->pv.z*f; + + return f; +} + + + + +/** + * pt_in_ring_3d(): crossing number test for a point in a polygon + * input: p = a point, + * pa = vertex points of a ring V[n+1] with V[n]=V[0] +* plane=the plane that the vertex points are lying on + * returns: 0 = outside, 1 = inside + * + * Our polygons have first and last point the same, + * +* The difference in 3D variant is that we exclude the dimension that faces the plane least. +* That is the dimension with the highest number in pv + */ +int +pt_in_ring_3d(const POINT3DZ *p, const POINTARRAY *ring,PLANE3D *plane) +{ + + int cn = 0; /* the crossing number counter */ + int i; + POINT3DZ v1, v2; + + POINT3DZ first, last; + + getPoint3dz_p(ring, 0, &first); + getPoint3dz_p(ring, ring->npoints-1, &last); + if ( memcmp(&first, &last, sizeof(POINT3DZ)) ) + { + lwerror("pt_in_ring_3d: V[n] != V[0] (%g %g %g!= %g %g %g)", + first.x, first.y, first.z, last.x, last.y, last.z); + return LW_FALSE; + } + + LWDEBUGF(2, "pt_in_ring_3d called with point: %g %g %g", p->x, p->y, p->z); + /* printPA(ring); */ + + /* loop through all edges of the polygon */ + getPoint3dz_p(ring, 0, &v1); + + + if(fabs(plane->pv.z)>=fabs(plane->pv.x)&&fabs(plane->pv.z)>=fabs(plane->pv.y)) /*If the z vector of the normal vector to the plane is larger than x and y vector we project the ring to the xy-plane*/ + { + for (i=0; inpoints-1; i++) + { + double vt; + getPoint3dz_p(ring, i+1, &v2); + + /* edge from vertex i to vertex i+1 */ + if + ( + /* an upward crossing */ + ((v1.y <= p->y) && (v2.y > p->y)) + /* a downward crossing */ + || ((v1.y > p->y) && (v2.y <= p->y)) + ) + { + + vt = (double)(p->y - v1.y) / (v2.y - v1.y); + + /* P.x x < v1.x + vt * (v2.x - v1.x)) + { + /* a valid crossing of y=p.y right of p.x */ + ++cn; + } + } + v1 = v2; + } + } + else if(fabs(plane->pv.y)>=fabs(plane->pv.x)&&fabs(plane->pv.y)>=fabs(plane->pv.z)) /*If the y vector of the normal vector to the plane is larger than x and z vector we project the ring to the xz-plane*/ + { + for (i=0; inpoints-1; i++) + { + double vt; + getPoint3dz_p(ring, i+1, &v2); + + /* edge from vertex i to vertex i+1 */ + if + ( + /* an upward crossing */ + ((v1.z <= p->z) && (v2.z > p->z)) + /* a downward crossing */ + || ((v1.z > p->z) && (v2.z <= p->z)) + ) + { + + vt = (double)(p->z - v1.z) / (v2.z - v1.z); + + /* P.x x < v1.x + vt * (v2.x - v1.x)) + { + /* a valid crossing of y=p.y right of p.x */ + ++cn; + } + } + v1 = v2; + } + } + else /*Hopefully we only have the cases where x part of the normal vector is largest left*/ + { + for (i=0; inpoints-1; i++) + { + double vt; + getPoint3dz_p(ring, i+1, &v2); + + /* edge from vertex i to vertex i+1 */ + if + ( + /* an upward crossing */ + ((v1.z <= p->z) && (v2.z > p->z)) + /* a downward crossing */ + || ((v1.z > p->z) && (v2.z <= p->z)) + ) + { + + vt = (double)(p->z - v1.z) / (v2.z - v1.z); + + /* P.x y < v1.y + vt * (v2.y - v1.y)) + { + /* a valid crossing of y=p.y right of p.x */ + ++cn; + } + } + v1 = v2; + } + } + LWDEBUGF(3, "pt_in_ring_3d returning %d", cn&1); + + return (cn&1); /* 0 if even (out), and 1 if odd (in) */ +} + + + +/*------------------------------------------------------------------------------------------------------------ +End of Brute force functions +--------------------------------------------------------------------------------------------------------------*/ + + + diff -Nru postgis-1.5.3/liblwgeom/measures3d.h postgis-2.0.1/liblwgeom/measures3d.h --- postgis-1.5.3/liblwgeom/measures3d.h 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/measures3d.h 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,102 @@ + +/********************************************************************** + * $Id: measures.h 4715 2009-11-01 17:58:42Z nicklas $ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * Copyright 2011 Nicklas Avén + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include "liblwgeom_internal.h" + +#define DOT(u,v) (u.x * v.x + u.y * v.y + u.z * v.z) +#define VECTORLENGTH(v) sqrt((v.x * v.x) + (v.y * v.y) + (v.z * v.z)) + + +/** + +Structure used in distance-calculations +*/ +typedef struct +{ + double distance; /*the distance between p1 and p2*/ + POINT3DZ p1; + POINT3DZ p2; + int mode; /*the direction of looking, if thedir = -1 then we look for 3dmaxdistance and if it is 1 then we look for 3dmindistance*/ + int twisted; /*To preserve the order of incoming points to match the first and second point in 3dshortest and 3dlongest line*/ + double tolerance; /*the tolerance for 3ddwithin and 3ddfullywithin*/ +} DISTPTS3D; + +typedef struct +{ + double x,y,z; +} +VECTOR3D; + +typedef struct +{ + POINT3DZ pop; /*Point On Plane*/ + VECTOR3D pv; /*Perpendicular normal vector*/ +} +PLANE3D; + + +/* +Preprocessing functions +*/ +int lw_dist3d_distribute_bruteforce(LWGEOM *lwg1, LWGEOM *lwg2, DISTPTS3D *dl); +int lw_dist3d_recursive(const LWGEOM *lwg1,const LWGEOM *lwg2, DISTPTS3D *dl); +int lw_dist3d_distribute_fast(LWGEOM *lwg1, LWGEOM *lwg2, DISTPTS3D *dl); + +/* +Brute force functions +*/ +int lw_dist3d_pt_ptarray(POINT3DZ *p, POINTARRAY *pa, DISTPTS3D *dl); +int lw_dist3d_point_point(LWPOINT *point1, LWPOINT *point2, DISTPTS3D *dl); +int lw_dist3d_point_line(LWPOINT *point, LWLINE *line, DISTPTS3D *dl); +int lw_dist3d_line_line(LWLINE *line1,LWLINE *line2 , DISTPTS3D *dl); +int lw_dist3d_point_poly(LWPOINT *point, LWPOLY *poly, DISTPTS3D *dl); +int lw_dist3d_line_poly(LWLINE *line, LWPOLY *poly, DISTPTS3D *dl); +int lw_dist3d_poly_poly(LWPOLY *poly1, LWPOLY *poly2, DISTPTS3D *dl); +int lw_dist3d_ptarray_ptarray(POINTARRAY *l1, POINTARRAY *l2,DISTPTS3D *dl); +int lw_dist3d_seg_seg(POINT3DZ *A, POINT3DZ *B, POINT3DZ *C, POINT3DZ *D, DISTPTS3D *dl); +int lw_dist3d_pt_pt(POINT3DZ *p1, POINT3DZ *p2, DISTPTS3D *dl); +int lw_dist3d_pt_seg(POINT3DZ *p, POINT3DZ *A, POINT3DZ *B, DISTPTS3D *dl); +int lw_dist3d_pt_poly(POINT3DZ *p, LWPOLY *poly, PLANE3D *plane,POINT3DZ *projp, DISTPTS3D *dl); +int lw_dist3d_ptarray_poly(POINTARRAY *pa, LWPOLY *poly, PLANE3D *plane, DISTPTS3D *dl); + + + +double project_point_on_plane(POINT3DZ *p, PLANE3D *pl, POINT3DZ *p0); +int define_plane(POINTARRAY *pa, PLANE3D *pl); +int pt_in_ring_3d(const POINT3DZ *p, const POINTARRAY *ring,PLANE3D *plane); +/* +Helper functions +*/ +int get_3dvector_from_points(POINT3DZ *p1,POINT3DZ *p2, VECTOR3D *v); +int get_3dcross_product(VECTOR3D *v1,VECTOR3D *v2, VECTOR3D *v); + + +int +get_3dvector_from_points(POINT3DZ *p1,POINT3DZ *p2, VECTOR3D *v) +{ + v->x=p2->x-p1->x; + v->y=p2->y-p1->y; + v->z=p2->z-p1->z; + + return LW_TRUE; +} + +int +get_3dcross_product(VECTOR3D *v1,VECTOR3D *v2, VECTOR3D *v) +{ + v->x=(v1->y*v2->z)-(v1->z*v2->y); + v->y=(v1->z*v2->x)-(v1->x*v2->z); + v->z=(v1->x*v2->y)-(v1->y*v2->x); + + return LW_TRUE; +} \ No newline at end of file diff -Nru postgis-1.5.3/liblwgeom/ptarray.c postgis-2.0.1/liblwgeom/ptarray.c --- postgis-1.5.3/liblwgeom/ptarray.c 2010-09-10 08:50:50.000000000 +0000 +++ postgis-2.0.1/liblwgeom/ptarray.c 2012-06-19 20:46:58.000000000 +0000 @@ -1,9 +1,10 @@ /********************************************************************** - * $Id: ptarray.c 5924 2010-09-10 08:50:50Z mcayland $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net - * Copyright 2001-2006 Refractions Research Inc. + * + * Copyright (C) 2012 Sandro Santilli + * Copyright (C) 2001-2006 Refractions Research Inc. * * This is free software; you can redistribute and/or modify it under * the terms of the GNU General Public Licence. See the COPYING file. @@ -13,113 +14,362 @@ #include #include -#include "liblwgeom.h" +#include "liblwgeom_internal.h" +/*#define POSTGIS_DEBUG_LEVEL 4*/ +#include "lwgeom_log.h" -POINTARRAY * -ptarray_construct(char hasz, char hasm, unsigned int npoints) +int +ptarray_has_z(const POINTARRAY *pa) { - uchar dims = 0; - size_t size; - uchar *ptlist; - POINTARRAY *pa; + if ( ! pa ) return LW_FALSE; + return FLAGS_GET_Z(pa->flags); +} - TYPE_SETZM(dims, hasz?1:0, hasm?1:0); - size = TYPE_NDIMS(dims)*npoints*sizeof(double); +int +ptarray_has_m(const POINTARRAY *pa) +{ + if ( ! pa ) return LW_FALSE; + return FLAGS_GET_M(pa->flags); +} - if ( size ) - ptlist = (uchar *)lwalloc(size); - else - ptlist = NULL; +/* + * Size of point represeneted in the POINTARRAY + * 16 for 2d, 24 for 3d, 32 for 4d + */ +int inline +ptarray_point_size(const POINTARRAY *pa) +{ + LWDEBUGF(5, "ptarray_point_size: FLAGS_NDIMS(pa->flags)=%x",FLAGS_NDIMS(pa->flags)); - pa = lwalloc(sizeof(POINTARRAY)); - pa->dims = dims; - pa->serialized_pointlist = ptlist; - pa->npoints = npoints; + return sizeof(double)*FLAGS_NDIMS(pa->flags); +} +POINTARRAY* +ptarray_construct(char hasz, char hasm, uint32_t npoints) +{ + POINTARRAY *pa = ptarray_construct_empty(hasz, hasm, npoints); + pa->npoints = npoints; return pa; +} + +POINTARRAY* +ptarray_construct_empty(char hasz, char hasm, uint32_t maxpoints) +{ + uint8_t dims = gflags(hasz, hasm, 0); + POINTARRAY *pa = lwalloc(sizeof(POINTARRAY)); + pa->serialized_pointlist = NULL; + + /* Set our dimsionality info on the bitmap */ + pa->flags = dims; + + /* We will be allocating a bit of room */ + pa->npoints = 0; + pa->maxpoints = maxpoints; + + /* Allocate the coordinate array */ + if ( maxpoints > 0 ) + pa->serialized_pointlist = lwalloc(maxpoints * ptarray_point_size(pa)); + else + pa->serialized_pointlist = NULL; + return pa; } -void ptarray_free(POINTARRAY *pa) +/* +* Add a point into a pointarray. Only adds as many dimensions as the +* pointarray supports. +*/ +int +ptarray_insert_point(POINTARRAY *pa, const POINT4D *p, int where) { - /** - * TODO: \todo Turn this on after retrofitting all calls to lwfree_ in /lwgeom - * if( pa->serialized_pointlist ) - * lwfree(pa->serialized_pointlist); - */ + size_t point_size = ptarray_point_size(pa); + LWDEBUGF(5,"pa = %p; p = %p; where = %d", pa, p, where); + LWDEBUGF(5,"pa->npoints = %d; pa->maxpoints = %d", pa->npoints, pa->maxpoints); + + if ( FLAGS_GET_READONLY(pa->flags) ) + { + lwerror("ptarray_insert_point: called on read-only point array"); + return LW_FAILURE; + } + + /* Error on invalid offset value */ + if ( where > pa->npoints || where < 0) + { + lwerror("ptarray_insert_point: offset out of range (%d)", where); + return LW_FAILURE; + } + + /* If we have no storage, let's allocate some */ + if( pa->maxpoints == 0 || ! pa->serialized_pointlist ) + { + pa->maxpoints = 32; + pa->npoints = 0; + pa->serialized_pointlist = lwalloc(ptarray_point_size(pa) * pa->maxpoints); + } - lwfree(pa); + /* Error out if we have a bad situation */ + if ( pa->npoints > pa->maxpoints ) + lwerror("npoints (%d) is greated than maxpoints (%d)", pa->npoints, pa->maxpoints); + + /* Check if we have enough storage, add more if necessary */ + if( pa->npoints == pa->maxpoints ) + { + pa->maxpoints *= 2; + pa->serialized_pointlist = lwrealloc(pa->serialized_pointlist, ptarray_point_size(pa) * pa->maxpoints); + } + + /* Make space to insert the new point */ + if( where < pa->npoints ) + { + size_t copy_size = point_size * (pa->npoints - where); + memmove(getPoint_internal(pa, where+1), getPoint_internal(pa, where), copy_size); + LWDEBUGF(5,"copying %d bytes to start vertex %d from start vertex %d", copy_size, where+1, where); + } + + /* We have one more point */ + ++pa->npoints; + + /* Copy the new point into the gap */ + ptarray_set_point4d(pa, where, p); + LWDEBUGF(5,"copying new point to start vertex %d", point_size, where); + + return LW_SUCCESS; } -void -ptarray_reverse(POINTARRAY *pa) +int +ptarray_append_point(POINTARRAY *pa, const POINT4D *pt, int repeated_points) { - POINT4D pbuf; - uint32 i; - int ptsize = pointArray_ptsize(pa); - int last = pa->npoints-1; - int mid = last/2; - for (i=0; i<=mid; i++) + /* Check for pathology */ + if( ! pa || ! pt ) { - uchar *from, *to; - from = getPoint_internal(pa, i); - to = getPoint_internal(pa, (last-i)); - memcpy((uchar *)&pbuf, to, ptsize); - memcpy(to, from, ptsize); - memcpy(from, (uchar *)&pbuf, ptsize); + lwerror("ptarray_append_point: null input"); + return LW_FAILURE; + } + + /* Check for duplicate end point */ + if ( repeated_points == LW_FALSE && pa->npoints > 0 ) + { + POINT4D tmp; + getPoint4d_p(pa, pa->npoints-1, &tmp); + LWDEBUGF(4,"checking for duplicate end point (pt = POINT(%g %g) pa->npoints-q = POINT(%g %g))",pt->x,pt->y,tmp.x,tmp.y); + + /* Return LW_SUCCESS and do nothing else if previous point in list is equal to this one */ + if ( (pt->x == tmp.x) && (pt->y == tmp.y) && + (FLAGS_GET_Z(pa->flags) ? pt->z == tmp.z : 1) && + (FLAGS_GET_M(pa->flags) ? pt->m == tmp.m : 1) ) + { + return LW_SUCCESS; + } } + /* Append is just a special case of insert */ + return ptarray_insert_point(pa, pt, pa->npoints); } -/** - * @brief calculate the 2d bounding box of a set of points - * write result to the provided BOX2DFLOAT4 - * Return 0 if bounding box is NULL (empty geom) - */ int -ptarray_compute_box2d_p(const POINTARRAY *pa, BOX2DFLOAT4 *result) +ptarray_append_ptarray(POINTARRAY *pa1, POINTARRAY *pa2, double gap_tolerance) { - BOX3D box3d; + unsigned int poff = 0; + unsigned int npoints; + unsigned int ncap; + unsigned int ptsize; + + /* Check for pathology */ + if( ! pa1 || ! pa2 ) + { + lwerror("ptarray_append_ptarray: null input"); + return LW_FAILURE; + } + + npoints = pa2->npoints; + + if ( ! npoints ) return LW_SUCCESS; /* nothing more to do */ + + if( FLAGS_GET_READONLY(pa1->flags) ) + { + lwerror("ptarray_append_ptarray: target pointarray is read-only"); + return LW_FAILURE; + } + + if( FLAGS_GET_ZM(pa1->flags) != FLAGS_GET_ZM(pa2->flags) ) + { + lwerror("ptarray_append_ptarray: appending mixed dimensionality is not allowed"); + return LW_FAILURE; + } + + ptsize = ptarray_point_size(pa1); - /* Note: we perform the calculation using BOX3D and then - convert to BOX2DFLOAT4 to prevent cumulative floating - point rounding errors when calculating using BOX2DFLOAT4 - directly. */ + /* Check for duplicate end point */ + if ( pa1->npoints ) + { + POINT2D tmp1, tmp2; + getPoint2d_p(pa1, pa1->npoints-1, &tmp1); + getPoint2d_p(pa2, 0, &tmp2); - if (pa->npoints == 0) return 0; + /* If the end point and start point are the same, then don't copy start point */ + if (p2d_same(&tmp1, &tmp2)) { + poff = 1; + --npoints; + } + else if ( gap_tolerance == 0 || ( gap_tolerance > 0 && + distance2d_pt_pt(&tmp1, &tmp2) > gap_tolerance ) ) + { + lwerror("Second line start point too far from first line end point"); + return LW_FAILURE; + } + } - ptarray_compute_box3d_p(pa, &box3d); + /* Check if we need extra space */ + ncap = pa1->npoints + npoints; + if ( pa1->maxpoints < ncap ) + { + pa1->maxpoints = ncap > pa1->maxpoints*2 ? + ncap : pa1->maxpoints*2; + pa1->serialized_pointlist = lwrealloc(pa1->serialized_pointlist, ptsize * pa1->maxpoints); + } - box3d_to_box2df_p(&box3d, result); + memcpy(getPoint_internal(pa1, pa1->npoints), + getPoint_internal(pa2, poff), ptsize * npoints); - return 1; + pa1->npoints = ncap; + + return LW_SUCCESS; +} + +/* +* Add a point into a pointarray. Only adds as many dimensions as the +* pointarray supports. +*/ +int +ptarray_remove_point(POINTARRAY *pa, int where) +{ + size_t ptsize = ptarray_point_size(pa); + + /* Check for pathology */ + if( ! pa ) + { + lwerror("ptarray_remove_point: null input"); + return LW_FAILURE; + } + + /* Error on invalid offset value */ + if ( where >= pa->npoints || where < 0) + { + lwerror("ptarray_remove_point: offset out of range (%d)", where); + return LW_FAILURE; + } + + /* If the point is any but the last, we need to copy the data back one point */ + if( where < pa->npoints - 1 ) + { + memmove(getPoint_internal(pa, where), getPoint_internal(pa, where+1), ptsize * (pa->npoints - where - 1)); + } + + /* We have one less point */ + pa->npoints--; + + return LW_SUCCESS; } /** - * @brief Calculate the 2d bounding box of a set of points. - * @return allocated #BOX2DFLOAT4 or NULL (for empty array). - */ -BOX2DFLOAT4 * -ptarray_compute_box2d(const POINTARRAY *pa) +* Build a new #POINTARRAY, but on top of someone else's ordinate array. +* Flag as read-only, so that ptarray_free() does not free the serialized_ptlist +*/ +POINTARRAY* ptarray_construct_reference_data(char hasz, char hasm, uint32_t npoints, uint8_t *ptlist) +{ + POINTARRAY *pa = lwalloc(sizeof(POINTARRAY)); + LWDEBUGF(5, "hasz = %d, hasm = %d, npoints = %d, ptlist = %p", hasz, hasm, npoints, ptlist); + pa->flags = gflags(hasz, hasm, 0); + FLAGS_SET_READONLY(pa->flags, 1); /* We don't own this memory, so we can't alter or free it. */ + pa->npoints = npoints; + pa->maxpoints = npoints; + pa->serialized_pointlist = ptlist; + return pa; +} + + +POINTARRAY* +ptarray_construct_copy_data(char hasz, char hasm, uint32_t npoints, const uint8_t *ptlist) +{ + POINTARRAY *pa = lwalloc(sizeof(POINTARRAY)); + + pa->flags = gflags(hasz, hasm, 0); + pa->npoints = npoints; + pa->maxpoints = npoints; + + if ( npoints > 0 ) + { + pa->serialized_pointlist = lwalloc(ptarray_point_size(pa) * npoints); + memcpy(pa->serialized_pointlist, ptlist, ptarray_point_size(pa) * npoints); + } + else + { + pa->serialized_pointlist = NULL; + } + + return pa; +} + +void ptarray_free(POINTARRAY *pa) { - BOX3D box3d; - BOX2DFLOAT4 *result; + if(pa) + { + if(pa->serialized_pointlist && ( ! FLAGS_GET_READONLY(pa->flags) ) ) + lwfree(pa->serialized_pointlist); + lwfree(pa); + LWDEBUG(5,"Freeing a PointArray"); + } +} - /* Note: we perform the calculation using BOX3D and then - convert to BOX2DFLOAT4 to prevent cumulative floating - point rounding errors when calculating using BOX2DFLOAT4 - directly. */ - result = lwalloc(sizeof(BOX2DFLOAT4)); +void +ptarray_reverse(POINTARRAY *pa) +{ + /* TODO change this to double array operations once point array is double aligned */ + POINT4D pbuf; + uint32_t i; + int ptsize = ptarray_point_size(pa); + int last = pa->npoints-1; + int mid = pa->npoints/2; - ptarray_compute_box3d_p(pa, &box3d); - box3d_to_box2df_p(&box3d, result); + for (i=0; inpoints ; i++) + { + getPoint4d_p(pa, i, &p); + d = p.y; + p.y = p.x; + p.x = d; + ptarray_set_point4d(pa, i, &p); + } + + return pa; +} + + /** * @brief Returns a modified #POINTARRAY so that no segment is * longer than the given distance (computed using 2d). @@ -128,30 +378,25 @@ * Z and M values for added points (if needed) are set to 0. */ POINTARRAY * -ptarray_segmentize2d(POINTARRAY *ipa, double dist) +ptarray_segmentize2d(const POINTARRAY *ipa, double dist) { double segdist; POINT4D p1, p2; - void *ip, *op; POINT4D pbuf; POINTARRAY *opa; - int maxpoints = ipa->npoints; - int ptsize = pointArray_ptsize(ipa); int ipoff=0; /* input point offset */ + int hasz = FLAGS_GET_Z(ipa->flags); + int hasm = FLAGS_GET_M(ipa->flags); pbuf.x = pbuf.y = pbuf.z = pbuf.m = 0; /* Initial storage */ - opa = (POINTARRAY *)lwalloc(ptsize * maxpoints); - opa->dims = ipa->dims; - opa->npoints = 0; - opa->serialized_pointlist = (uchar *)lwalloc(maxpoints*ptsize); - + opa = ptarray_construct_empty(hasz, hasm, ipa->npoints); + /* Add first point */ - opa->npoints++; getPoint4d_p(ipa, ipoff, &p1); - op = getPoint_internal(opa, opa->npoints-1); - memcpy(op, &p1, ptsize); + ptarray_append_point(opa, &p1, LW_FALSE); + ipoff++; while (ipoffnpoints) @@ -176,28 +421,19 @@ { pbuf.x = p1.x + (p2.x-p1.x)/segdist * dist; pbuf.y = p1.y + (p2.y-p1.y)/segdist * dist; - /* might also compute z and m if available... */ - ip = &pbuf; - memcpy(&p1, ip, ptsize); + if( hasz ) + pbuf.z = p1.z + (p2.z-p1.z)/segdist * dist; + if( hasm ) + pbuf.m = p1.m + (p2.m-p1.m)/segdist * dist; + ptarray_append_point(opa, &pbuf, LW_FALSE); + p1 = pbuf; } else /* copy second point */ { - ip = &p2; + ptarray_append_point(opa, &p2, (ipa->npoints==2)?LW_TRUE:LW_FALSE); p1 = p2; ipoff++; } - - /* Add point */ - if ( ++(opa->npoints) > maxpoints ) - { - maxpoints *= 1.5; - opa->serialized_pointlist = (uchar *)lwrealloc( - opa->serialized_pointlist, - maxpoints*ptsize - ); - } - op = getPoint_internal(opa, opa->npoints-1); - memcpy(op, ip, ptsize); } return opa; @@ -206,35 +442,47 @@ char ptarray_same(const POINTARRAY *pa1, const POINTARRAY *pa2) { - unsigned int i; + uint32_t i; size_t ptsize; - if ( TYPE_GETZM(pa1->dims) != TYPE_GETZM(pa2->dims) ) return 0; + if ( FLAGS_GET_ZM(pa1->flags) != FLAGS_GET_ZM(pa2->flags) ) return LW_FALSE; + LWDEBUG(5,"dimensions are the same"); + + if ( pa1->npoints != pa2->npoints ) return LW_FALSE; + LWDEBUG(5,"npoints are the same"); - if ( pa1->npoints != pa2->npoints ) return 0; - - ptsize = pointArray_ptsize(pa1); + ptsize = ptarray_point_size(pa1); + LWDEBUGF(5, "ptsize = %d", ptsize); for (i=0; inpoints; i++) { if ( memcmp(getPoint_internal(pa1, i), getPoint_internal(pa2, i), ptsize) ) - return 0; + return LW_FALSE; + LWDEBUGF(5,"point #%d is the same",i); } - return 1; + return LW_TRUE; } + + /** * @brief Add a point in a pointarray. - * 'where' is the offset (starting at 0) - * if 'where' == -1 append is required. + * + * @param pa the source POINTARRAY + * @param p the point to add + * @param pdims number of ordinates in p (2..4) + * @param where to insert the point. 0 prepends, pa->npoints appends + * + * @returns a newly constructed POINTARRAY using a newly allocated buffer + * for the actual points, or NULL on error. */ POINTARRAY * -ptarray_addPoint(POINTARRAY *pa, uchar *p, size_t pdims, unsigned int where) +ptarray_addPoint(const POINTARRAY *pa, uint8_t *p, size_t pdims, uint32_t where) { POINTARRAY *ret; POINT4D pbuf; - size_t ptsize = pointArray_ptsize(pa); + size_t ptsize = ptarray_point_size(pa); LWDEBUGF(3, "pa %x p %x size %d where %d", pa, p, pdims, where); @@ -256,12 +504,12 @@ LWDEBUG(3, "called with a %dD point"); pbuf.x = pbuf.y = pbuf.z = pbuf.m = 0.0; - memcpy((uchar *)&pbuf, p, pdims*sizeof(double)); + memcpy((uint8_t *)&pbuf, p, pdims*sizeof(double)); LWDEBUG(3, "initialized point buffer"); - ret = ptarray_construct(TYPE_HASZ(pa->dims), - TYPE_HASM(pa->dims), pa->npoints+1); + ret = ptarray_construct(FLAGS_GET_Z(pa->flags), + FLAGS_GET_M(pa->flags), pa->npoints+1); if ( where == -1 ) where = pa->npoints; @@ -270,7 +518,7 @@ memcpy(getPoint_internal(ret, 0), getPoint_internal(pa, 0), ptsize*where); } - memcpy(getPoint_internal(ret, where), (uchar *)&pbuf, ptsize); + memcpy(getPoint_internal(ret, where), (uint8_t *)&pbuf, ptsize); if ( where+1 != ret->npoints ) { @@ -289,10 +537,10 @@ * @return #POINTARRAY is newly allocated */ POINTARRAY * -ptarray_removePoint(POINTARRAY *pa, unsigned int which) +ptarray_removePoint(POINTARRAY *pa, uint32_t which) { POINTARRAY *ret; - size_t ptsize = pointArray_ptsize(pa); + size_t ptsize = ptarray_point_size(pa); LWDEBUGF(3, "pa %x which %d", pa, which); @@ -310,8 +558,8 @@ } #endif - ret = ptarray_construct(TYPE_HASZ(pa->dims), - TYPE_HASM(pa->dims), pa->npoints-1); + ret = ptarray_construct(FLAGS_GET_Z(pa->flags), + FLAGS_GET_M(pa->flags), pa->npoints-1); /* copy initial part */ if ( which ) @@ -340,13 +588,13 @@ ptarray_merge(POINTARRAY *pa1, POINTARRAY *pa2) { POINTARRAY *pa; - size_t ptsize = pointArray_ptsize(pa1); + size_t ptsize = ptarray_point_size(pa1); - if (TYPE_GETZM(pa1->dims) != TYPE_GETZM(pa2->dims)) + if (FLAGS_GET_ZM(pa1->flags) != FLAGS_GET_ZM(pa2->flags)) lwerror("ptarray_cat: Mixed dimension"); - pa = ptarray_construct( TYPE_HASZ(pa1->dims), - TYPE_HASM(pa1->dims), + pa = ptarray_construct( FLAGS_GET_Z(pa1->flags), + FLAGS_GET_M(pa1->flags), pa1->npoints + pa2->npoints); memcpy( getPoint_internal(pa, 0), @@ -365,125 +613,110 @@ /** - * @brief Clone a pointarray + * @brief Deep clone a pointarray (also clones serialized pointlist) */ POINTARRAY * -ptarray_clone(const POINTARRAY *in) +ptarray_clone_deep(const POINTARRAY *in) { POINTARRAY *out = lwalloc(sizeof(POINTARRAY)); size_t size; - LWDEBUG(3, "ptarray_clone called."); + LWDEBUG(3, "ptarray_clone_deep called."); - out->dims = in->dims; + out->flags = in->flags; out->npoints = in->npoints; + out->maxpoints = in->maxpoints; + + FLAGS_SET_READONLY(out->flags, 0); - size = in->npoints*sizeof(double)*TYPE_NDIMS(in->dims); + size = in->npoints * ptarray_point_size(in); out->serialized_pointlist = lwalloc(size); memcpy(out->serialized_pointlist, in->serialized_pointlist, size); return out; } -int -ptarray_isclosed2d(const POINTARRAY *in) -{ - if ( memcmp(getPoint_internal(in, 0), getPoint_internal(in, in->npoints-1), sizeof(POINT2D)) ) return 0; - return 1; -} - -int -ptarray_isclosed3d(const POINTARRAY *in) -{ - if ( memcmp(getPoint_internal(in, 0), getPoint_internal(in, in->npoints-1), sizeof(POINT3D)) ) return 0; - return 1; -} - /** - * @brief calculate the #BOX3D bounding box of a set of points - * @return a lwalloced #BOX3D, or NULL on empty array. - * #zmin / #zmax values are set to #NO_Z_VALUE if not available. + * @brief Clone a POINTARRAY object. Serialized pointlist is not copied. */ -BOX3D * -ptarray_compute_box3d(const POINTARRAY *pa) +POINTARRAY * +ptarray_clone(const POINTARRAY *in) { - BOX3D *result = lwalloc(sizeof(BOX3D)); + POINTARRAY *out = lwalloc(sizeof(POINTARRAY)); - if ( ! ptarray_compute_box3d_p(pa, result) ) - { - lwfree(result); - return NULL; - } + LWDEBUG(3, "ptarray_clone_deep called."); - return result; + out->flags = in->flags; + out->npoints = in->npoints; + out->maxpoints = in->maxpoints; + + FLAGS_SET_READONLY(out->flags, 1); + + out->serialized_pointlist = in->serialized_pointlist; + + return out; } /** - * @brief calculate the #BOX3D bounding box of a set of points - * zmin/zmax values are set to #NO_Z_VALUE if not available. - * write result to the provided #BOX3D - * @return 0 if bounding box is NULL (empty geom) and 1 otherwise - */ +* Check for ring closure using whatever dimensionality is declared on the +* pointarray. +*/ int -ptarray_compute_box3d_p(const POINTARRAY *pa, BOX3D *result) +ptarray_isclosed(const POINTARRAY *in) { - int t; - POINT3DZ pt; - - LWDEBUGF(3, "ptarray_compute_box3d call (array has %d points)", pa->npoints); - - if (pa->npoints == 0) return 0; + return 0 == memcmp(getPoint_internal(in, 0), getPoint_internal(in, in->npoints-1), ptarray_point_size(in)); +} - getPoint3dz_p(pa, 0, &pt); - LWDEBUG(3, "got point 0"); +int +ptarray_isclosed2d(const POINTARRAY *in) +{ + return 0 == memcmp(getPoint_internal(in, 0), getPoint_internal(in, in->npoints-1), sizeof(POINT2D)); +} - result->xmin = pt.x; - result->xmax = pt.x; - result->ymin = pt.y; - result->ymax = pt.y; +int +ptarray_isclosed3d(const POINTARRAY *in) +{ + return 0 == memcmp(getPoint_internal(in, 0), getPoint_internal(in, in->npoints-1), sizeof(POINT3D)); +} - if ( TYPE_HASZ(pa->dims) ) - { - result->zmin = pt.z; - result->zmax = pt.z; - } +int +ptarray_isclosedz(const POINTARRAY *in) +{ + if ( FLAGS_GET_Z(in->flags) ) + return ptarray_isclosed3d(in); else - { - result->zmin = NO_Z_VALUE; - result->zmax = NO_Z_VALUE; - } - - LWDEBUGF(3, "scanning other %d points", pa->npoints); + return ptarray_isclosed2d(in); +} - for (t=1; tnpoints; t++) - { - getPoint3dz_p(pa,t,&pt); - if (pt.x < result->xmin) result->xmin = pt.x; - if (pt.y < result->ymin) result->ymin = pt.y; - if (pt.x > result->xmax) result->xmax = pt.x; - if (pt.y > result->ymax) result->ymax = pt.y; - if ( TYPE_HASZ(pa->dims) ) - { - if (pt.z > result->zmax) result->zmax = pt.z; - if (pt.z < result->zmin) result->zmin = pt.z; - } - } - - LWDEBUG(3, "returning box"); +POINTARRAY* +ptarray_force_dims(const POINTARRAY *pa, int hasz, int hasm) +{ + /* TODO handle zero-length point arrays */ + int i; + int in_hasz = FLAGS_GET_Z(pa->flags); + int in_hasm = FLAGS_GET_M(pa->flags); + POINT4D pt; + POINTARRAY *pa_out = ptarray_construct_empty(hasz, hasm, pa->npoints); + + for( i = 0; i < pa->npoints; i++ ) + { + getPoint4d_p(pa, i, &pt); + if( hasz && ! in_hasz ) + pt.z = 0.0; + if( hasm && ! in_hasm ) + pt.m = 0.0; + ptarray_append_point(pa_out, &pt, LW_TRUE); + } - return 1; + return pa_out; } -/** - * TODO: \todo implement point interpolation - */ POINTARRAY * -ptarray_substring(POINTARRAY *ipa, double from, double to) +ptarray_substring(POINTARRAY *ipa, double from, double to, double tolerance) { - DYNPTARRAY *dpa; - POINTARRAY *opa; + POINTARRAY *dpa; POINT4D pt; POINT4D p1, p2; POINT4D *p1ptr=&p1; /* don't break strict-aliasing rule */ @@ -496,10 +729,10 @@ * Create a dynamic pointarray with an initial capacity * equal to full copy of input points */ - dpa = dynptarray_create(ipa->npoints, ipa->dims); + dpa = ptarray_construct_empty(FLAGS_GET_Z(ipa->flags), FLAGS_GET_M(ipa->flags), ipa->npoints); /* Compute total line length */ - length = lwgeom_pointarray_length2d(ipa); + length = ptarray_length_2d(ipa); LWDEBUGF(3, "Total length: %g", length); @@ -538,13 +771,7 @@ LWDEBUG(3, " Before start"); - /* - * Didn't reach the 'from' point, - * nothing to do - */ - if ( from > tlength + slength ) goto END; - - else if ( from == tlength + slength ) + if ( fabs ( from - ( tlength + slength ) ) <= tolerance ) { LWDEBUG(3, " Second point is our start"); @@ -552,12 +779,12 @@ /* * Second point is our start */ - dynptarray_addPoint4d(dpa, &p2, 1); + ptarray_append_point(dpa, &p2, LW_FALSE); state=1; /* we're inside now */ goto END; } - else if ( from == tlength ) + else if ( fabs(from - tlength) <= tolerance ) { LWDEBUG(3, " First point is our start"); @@ -565,7 +792,7 @@ /* * First point is our start */ - dynptarray_addPoint4d(dpa, &p1, 1); + ptarray_append_point(dpa, &p1, LW_FALSE); /* * We're inside now, but will check @@ -574,6 +801,12 @@ state=1; } + /* + * Didn't reach the 'from' point, + * nothing to do + */ + else if ( from > tlength + slength ) goto END; + else /* tlength < from < tlength+slength */ { @@ -584,9 +817,10 @@ * second point */ dseg = (from - tlength) / slength; + interpolate_point4d(&p1, &p2, &pt, dseg); - dynptarray_addPoint4d(dpa, &pt, 1); + ptarray_append_point(dpa, &pt, LW_FALSE); /* * We're inside now, but will check @@ -602,24 +836,14 @@ LWDEBUG(3, " Inside"); /* - * Didn't reach the 'end' point, - * just copy second point - */ - if ( to > tlength + slength ) - { - dynptarray_addPoint4d(dpa, &p2, 0); - goto END; - } - - /* * 'to' point is our second point. */ - else if ( to == tlength + slength ) + if ( fabs(to - ( tlength + slength ) ) <= tolerance ) { LWDEBUG(3, " Second point is our end"); - dynptarray_addPoint4d(dpa, &p2, 0); + ptarray_append_point(dpa, &p2, LW_FALSE); break; /* substring complete */ } @@ -627,17 +851,27 @@ * 'to' point is our first point. * (should only happen if 'to' is 0) */ - else if ( to == tlength ) + else if ( fabs(to - tlength) <= tolerance ) { LWDEBUG(3, " First point is our end"); - dynptarray_addPoint4d(dpa, &p1, 0); + ptarray_append_point(dpa, &p1, LW_FALSE); break; /* substring complete */ } /* + * Didn't reach the 'end' point, + * just copy second point + */ + else if ( to > tlength + slength ) + { + ptarray_append_point(dpa, &p2, LW_FALSE); + goto END; + } + + /* * 'to' point falls on this segment * Interpolate and break. */ @@ -649,7 +883,7 @@ dseg = (to - tlength) / slength; interpolate_point4d(&p1, &p2, &pt, dseg); - dynptarray_addPoint4d(dpa, &pt, 0); + ptarray_append_point(dpa, &pt, LW_FALSE); break; } @@ -667,15 +901,9 @@ memcpy(&p1, &p2, sizeof(POINT4D)); } - /* Get constructed pointarray and release memory associated - * with the dynamic pointarray - */ - opa = dpa->pa; - lwfree(dpa); + LWDEBUGF(3, "Out of loop, ptarray has %d points", dpa->npoints); - LWDEBUGF(3, "Out of loop, ptarray has %d points", opa->npoints); - - return opa; + return dpa; } /* @@ -683,11 +911,11 @@ * the given segment to the reference input point. */ void -closest_point_on_segment(POINT2D *p, POINT2D *A, POINT2D *B, POINT2D *ret) +closest_point_on_segment(const POINT4D *p, const POINT4D *A, const POINT4D *B, POINT4D *ret) { double r; - if ( ( A->x == B->x) && (A->y == B->y) ) + if ( FP_EQUALS(A->x, B->x) && FP_EQUALS(A->y, B->y) ) { *ret = *A; return; @@ -722,26 +950,35 @@ ret->x = A->x + ( (B->x - A->x) * r ); ret->y = A->y + ( (B->y - A->y) * r ); + ret->z = A->z + ( (B->z - A->z) * r ); + ret->m = A->m + ( (B->m - A->m) * r ); } /* * Given a point, returns the location of closest point on pointarray + * and, optionally, it's actual distance from the point array. */ double -ptarray_locate_point(POINTARRAY *pa, POINT2D *p) +ptarray_locate_point(const POINTARRAY *pa, const POINT4D *p4d, double *mindistout, POINT4D *proj4d) { double mindist=-1; double tlen, plen; int t, seg=-1; - POINT2D start, end; - POINT2D proj; + POINT4D start4d, end4d, projtmp; + POINT2D start, end, proj, p; + + /* Initialize our 2D copy of the input parameter */ + p.x = p4d->x; + p.y = p4d->y; + + if ( ! proj4d ) proj4d = &projtmp; getPoint2d_p(pa, 0, &start); for (t=1; tnpoints; t++) { double dist; getPoint2d_p(pa, t, &end); - dist = distance2d_pt_seg(p, &start, &end); + dist = distance2d_pt_seg(&p, &start, &end); if (t==1 || dist < mindist ) { @@ -749,34 +986,50 @@ seg=t-1; } - if ( mindist == 0 ) break; + if ( mindist == 0 ) + { + LWDEBUG(3, "Breaking on mindist=0"); + break; + } start = end; } + if ( mindistout ) *mindistout = mindist; + LWDEBUGF(3, "Closest segment: %d", seg); + LWDEBUGF(3, "mindist: %g", mindist); /* - * If mindist is not 0 we need to project the + * We need to project the * point on the closest segment. */ - if ( mindist > 0 ) - { - getPoint2d_p(pa, seg, &start); - getPoint2d_p(pa, seg+1, &end); - closest_point_on_segment(p, &start, &end, &proj); - } - else + getPoint4d_p(pa, seg, &start4d); + getPoint4d_p(pa, seg+1, &end4d); + closest_point_on_segment(p4d, &start4d, &end4d, proj4d); + + /* Copy 4D values into 2D holder */ + proj.x = proj4d->x; + proj.y = proj4d->y; + + LWDEBUGF(3, "Closest segment:%d, npoints:%d", seg, pa->npoints); + + /* For robustness, force 1 when closest point == endpoint */ + if ( (seg >= (pa->npoints-2)) && p2d_same(&proj, &end) ) { - proj = *p; + return 1.0; } LWDEBUGF(3, "Closest point on segment: %g,%g", proj.x, proj.y); - tlen = lwgeom_pointarray_length2d(pa); + tlen = ptarray_length_2d(pa); LWDEBUGF(3, "tlen %g", tlen); + /* Location of any point on a zero-length line is 0 */ + /* See http://trac.osgeo.org/postgis/ticket/1772#comment:2 */ + if ( tlen == 0 ) return 0; + plen=0; getPoint2d_p(pa, 0, &start); for (t=0; tnpoints < 3 ) return ptarray_clone_deep(in); - ret->pa=lwalloc(sizeof(POINTARRAY)); - ret->pa->dims=dims; - ret->ptsize=pointArray_ptsize(ret->pa); - ret->capacity=initial_capacity; - ret->pa->serialized_pointlist=lwalloc(ret->ptsize*ret->capacity); - ret->pa->npoints=0; + ptsize = ptarray_point_size(in); - return ret; + LWDEBUGF(3, "ptsize: %d", ptsize); + + /* Allocate enough space for all points */ + out = ptarray_construct(FLAGS_GET_Z(in->flags), + FLAGS_GET_M(in->flags), in->npoints); + + /* Now fill up the actual points (NOTE: could be optimized) */ + + opn=1; + memcpy(getPoint_internal(out, 0), getPoint_internal(in, 0), ptsize); + LWDEBUGF(3, " first point copied, out points: %d", opn); + for (ipn=1; ipnnpoints; ++ipn) + { + if ( (ipn==in->npoints-1 && opn==1) || memcmp(getPoint_internal(in, ipn-1), + getPoint_internal(in, ipn), ptsize) ) + { + /* The point is different from the previous, + * we add it to output */ + memcpy(getPoint_internal(out, opn++), + getPoint_internal(in, ipn), ptsize); + LWDEBUGF(3, " Point %d differs from point %d. Out points: %d", + ipn, ipn-1, opn); + } + } + + LWDEBUGF(3, " in:%d out:%d", out->npoints, opn); + out->npoints = opn; + + return out; } +static void +ptarray_dp_findsplit(POINTARRAY *pts, int p1, int p2, int *split, double *dist) +{ + int k; + POINT2D pa, pb, pk; + double tmp; + + LWDEBUG(4, "function called"); + + *dist = -1; + *split = p1; + + if (p1 + 1 < p2) + { + + getPoint2d_p(pts, p1, &pa); + getPoint2d_p(pts, p2, &pb); + + LWDEBUGF(4, "P%d(%f,%f) to P%d(%f,%f)", + p1, pa.x, pa.y, p2, pb.x, pb.y); + + for (k=p1+1; k *dist) + { + *dist = tmp; /* record the maximum */ + *split = k; + + LWDEBUGF(4, "P%d is farthest (%g)", k, *dist); + } + } + + } /* length---should be redone if can == 0 */ + else + { + LWDEBUG(3, "segment too short, no split/no dist"); + } + +} + +POINTARRAY * +ptarray_simplify(POINTARRAY *inpts, double epsilon, unsigned int minpts) +{ + int *stack; /* recursion stack */ + int sp=-1; /* recursion stack pointer */ + int p1, split; + double dist; + POINTARRAY *outpts; + POINT4D pt; + + /* Allocate recursion stack */ + stack = lwalloc(sizeof(int)*inpts->npoints); + + p1 = 0; + stack[++sp] = inpts->npoints-1; + + LWDEBUGF(2, "Input has %d pts and %d dims", inpts->npoints, + FLAGS_NDIMS(inpts->flags)); + + /* Allocate output POINTARRAY, and add first point. */ + outpts = ptarray_construct_empty(FLAGS_GET_Z(inpts->flags), FLAGS_GET_M(inpts->flags), inpts->npoints); + getPoint4d_p(inpts, 0, &pt); + ptarray_append_point(outpts, &pt, LW_FALSE); + + LWDEBUG(3, "Added P0 to simplified point array (size 1)"); + + do + { + + ptarray_dp_findsplit(inpts, p1, stack[sp], &split, &dist); + + LWDEBUGF(3, "Farthest point from P%d-P%d is P%d (dist. %g)", p1, stack[sp], split, dist); + + if (dist > epsilon || ( outpts->npoints+sp+1 < minpts && dist > 0 ) ) + { + LWDEBUGF(4, "Added P%d to stack (outpts:%d)", split, sp); + stack[++sp] = split; + } + else + { + getPoint4d_p(inpts, stack[sp], &pt); + ptarray_append_point(outpts, &pt, LW_FALSE); + + LWDEBUGF(4, "Added P%d to simplified point array (size: %d)", stack[sp], outpts->npoints); + + p1 = stack[sp--]; + } + + LWDEBUGF(4, "stack pointer = %d", sp); + } + while (! (sp<0) ); + + lwfree(stack); + return outpts; +} + + /** - * @brief Add a #POINT4D to the dynamic pointarray. - * - * The dynamic pointarray may be of any dimension, only - * accepted dimensions will be copied. - * - * If allow_duplicates is set to 0 (false) a check - * is performed to see if last point in array is equal to the - * provided one. NOTE that the check is 4d based, with missing - * ordinates in the pointarray set to #NO_Z_VALUE and #NO_M_VALUE - * respectively. - */ -int -dynptarray_addPoint4d(DYNPTARRAY *dpa, POINT4D *p4d, int allow_duplicates) +* Find the 2d length of the given #POINTARRAY (even if it's 3d) +*/ +double +ptarray_length_2d(const POINTARRAY *pts) +{ + double dist = 0.0; + int i; + POINT2D frm; + POINT2D to; + + if ( pts->npoints < 2 ) return 0.0; + for (i=0; inpoints-1; i++) + { + getPoint2d_p(pts, i, &frm); + getPoint2d_p(pts, i+1, &to); + dist += sqrt( ( (frm.x - to.x)*(frm.x - to.x) ) + + ((frm.y - to.y)*(frm.y - to.y) ) ); + } + return dist; +} + +/** +* Find the 3d/2d length of the given #POINTARRAY +* (depending on its dimensionality) +*/ +double +ptarray_length(const POINTARRAY *pts) { - POINTARRAY *pa=dpa->pa; - POINT4D tmp; + double dist = 0.0; + int i; + POINT3DZ frm; + POINT3DZ to; - LWDEBUG(3, "dynptarray_addPoint4d called."); + if ( pts->npoints < 2 ) return 0.0; - if ( ! allow_duplicates && pa->npoints > 0 ) + /* compute 2d length if 3d is not available */ + if ( ! FLAGS_GET_Z(pts->flags) ) return ptarray_length_2d(pts); + + for (i=0; inpoints-1; i++) { - getPoint4d_p(pa, pa->npoints-1, &tmp); + getPoint3dz_p(pts, i, &frm); + getPoint3dz_p(pts, i+1, &to); + dist += sqrt( ( (frm.x - to.x)*(frm.x - to.x) ) + + ((frm.y - to.y)*(frm.y - to.y) ) + + ((frm.z - to.z)*(frm.z - to.z) ) ); + } + return dist; +} - /* - * return 0 and do nothing else if previous point in list is - * equal to this one (4D equality) - */ - if (tmp.x == p4d->x && tmp.y == p4d->y && tmp.z == p4d->z && tmp.m == p4d->m) return 0; + +int +p4d_same(const POINT4D *p1, const POINT4D *p2) +{ + if( FP_EQUALS(p1->x,p2->x) && FP_EQUALS(p1->y,p2->y) && FP_EQUALS(p1->z,p2->z) && FP_EQUALS(p1->m,p2->m) ) + return LW_TRUE; + else + return LW_FALSE; +} + +int +p2d_same(const POINT2D *p1, const POINT2D *p2) +{ + if( FP_EQUALS(p1->x,p2->x) && FP_EQUALS(p1->y,p2->y) ) + return LW_TRUE; + else + return LW_FALSE; +} + +/* + * Get a pointer to nth point of a POINTARRAY. + * You cannot safely cast this to a real POINT, due to memory alignment + * constraints. Use getPoint*_p for that. + */ +uint8_t * +getPoint_internal(const POINTARRAY *pa, int n) +{ + size_t size; + uint8_t *ptr; + +#if PARANOIA_LEVEL > 0 + if ( pa == NULL ) + { + lwerror("getPoint got NULL pointarray"); + return NULL; } + + LWDEBUGF(5, "(n=%d, pa.npoints=%d, pa.maxpoints=%d)",n,pa->npoints,pa->maxpoints); - ++pa->npoints; - if ( pa->npoints > dpa->capacity ) + if ( ( n < 0 ) || + ( n > pa->npoints ) || + ( n >= pa->maxpoints ) ) { - dpa->capacity*=2; - pa->serialized_pointlist = lwrealloc( - pa->serialized_pointlist, - dpa->capacity*dpa->ptsize); + lwerror("getPoint_internal called outside of ptarray range (n=%d, pa.npoints=%d, pa.maxpoints=%d)",n,pa->npoints,pa->maxpoints); + return NULL; /*error */ } +#endif - setPoint4d(pa, pa->npoints-1, p4d); + size = ptarray_point_size(pa); + + ptr = pa->serialized_pointlist + size * n; + if ( FLAGS_NDIMS(pa->flags) == 2) + { + LWDEBUGF(5, "point = %g %g", *((double*)(ptr)), *((double*)(ptr+8))); + } + else if ( FLAGS_NDIMS(pa->flags) == 3) + { + LWDEBUGF(5, "point = %g %g %g", *((double*)(ptr)), *((double*)(ptr+8)), *((double*)(ptr+16))); + } + else if ( FLAGS_NDIMS(pa->flags) == 4) + { + LWDEBUGF(5, "point = %g %g %g %g", *((double*)(ptr)), *((double*)(ptr+8)), *((double*)(ptr+16)), *((double*)(ptr+24))); + } - return 1; + return ptr; } + +/** + * Affine transform a pointarray. + */ +void +ptarray_affine(POINTARRAY *pa, const AFFINE *a) +{ + int i; + double x,y,z; + POINT4D p4d; + + LWDEBUG(2, "lwgeom_affine_ptarray start"); + + if ( FLAGS_GET_Z(pa->flags) ) + { + LWDEBUG(3, " has z"); + + for (i=0; inpoints; i++) + { + getPoint4d_p(pa, i, &p4d); + x = p4d.x; + y = p4d.y; + z = p4d.z; + p4d.x = a->afac * x + a->bfac * y + a->cfac * z + a->xoff; + p4d.y = a->dfac * x + a->efac * y + a->ffac * z + a->yoff; + p4d.z = a->gfac * x + a->hfac * y + a->ifac * z + a->zoff; + ptarray_set_point4d(pa, i, &p4d); + + LWDEBUGF(3, " POINT %g %g %g => %g %g %g", x, y, x, p4d.x, p4d.y, p4d.z); + } + } + else + { + LWDEBUG(3, " doesn't have z"); + + for (i=0; inpoints; i++) + { + getPoint4d_p(pa, i, &p4d); + x = p4d.x; + y = p4d.y; + p4d.x = a->afac * x + a->bfac * y + a->xoff; + p4d.y = a->dfac * x + a->efac * y + a->yoff; + ptarray_set_point4d(pa, i, &p4d); + + LWDEBUGF(3, " POINT %g %g %g => %g %g %g", x, y, x, p4d.x, p4d.y, p4d.z); + } + } + + LWDEBUG(3, "lwgeom_affine_ptarray end"); + +} diff -Nru postgis-1.5.3/liblwgeom/stringbuffer.c postgis-2.0.1/liblwgeom/stringbuffer.c --- postgis-1.5.3/liblwgeom/stringbuffer.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/stringbuffer.c 2012-03-13 16:23:38.000000000 +0000 @@ -0,0 +1,350 @@ +/********************************************************************** + * $Id: stringbuffer.c 9485 2012-03-13 16:23:38Z pramsey $ + * + * PostGIS - Spatial Types for PostgreSQL + * Copyright 2002 Thamer Alharbash + * Copyright 2009 Paul Ramsey + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * + * The name of the author may not be used to endorse or promote + * products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + + +#include "liblwgeom_internal.h" +#include "stringbuffer.h" + +/** +* Allocate a new stringbuffer_t. Use stringbuffer_destroy to free. +*/ +stringbuffer_t* +stringbuffer_create(void) +{ + return stringbuffer_create_with_size(STRINGBUFFER_STARTSIZE); +} + +/** +* Allocate a new stringbuffer_t. Use stringbuffer_destroy to free. +*/ +stringbuffer_t* +stringbuffer_create_with_size(size_t size) +{ + stringbuffer_t *s; + + s = lwalloc(sizeof(stringbuffer_t)); + s->str_start = lwalloc(size); + s->str_end = s->str_start; + s->capacity = size; + memset(s->str_start,0,size); + return s; +} + +/** +* Free the stringbuffer_t and all memory managed within it. +*/ +void +stringbuffer_destroy(stringbuffer_t *s) +{ + if ( s->str_start ) lwfree(s->str_start); + if ( s ) lwfree(s); +} + +/** +* Reset the stringbuffer_t. Useful for starting a fresh string +* without the expense of freeing and re-allocating a new +* stringbuffer_t. +*/ +void +stringbuffer_clear(stringbuffer_t *s) +{ + s->str_start[0] = '\0'; + s->str_end = s->str_start; +} + +/** +* If necessary, expand the stringbuffer_t internal buffer to accomodate the +* specified additional size. +*/ +static inline void +stringbuffer_makeroom(stringbuffer_t *s, size_t size_to_add) +{ + size_t current_size = (s->str_end - s->str_start); + size_t capacity = s->capacity; + size_t required_size = current_size + size_to_add; + + while (capacity < required_size) + capacity *= 2; + + if ( capacity > s->capacity ) + { + s->str_start = lwrealloc(s->str_start, capacity); + s->capacity = capacity; + s->str_end = s->str_start + current_size; + } +} + +/** +* Return the last character in the buffer. +*/ +char +stringbuffer_lastchar(stringbuffer_t *s) +{ + if( s->str_end == s->str_start ) + return 0; + + return *(s->str_end - 1); +} + +/** +* Append the specified string to the stringbuffer_t. +*/ +void +stringbuffer_append(stringbuffer_t *s, const char *a) +{ + int alen = strlen(a); /* Length of string to append */ + int alen0 = alen + 1; /* Length including null terminator */ + stringbuffer_makeroom(s, alen0); + memcpy(s->str_end, a, alen0); + s->str_end += alen; +} + +/** +* Returns a reference to the internal string being managed by +* the stringbuffer. The current string will be null-terminated +* within the internal string. +*/ +const char* +stringbuffer_getstring(stringbuffer_t *s) +{ + return s->str_start; +} + +/** +* Returns a newly allocated string large enough to contain the +* current state of the string. Caller is responsible for +* freeing the return value. +*/ +char* +stringbuffer_getstringcopy(stringbuffer_t *s) +{ + size_t size = (s->str_end - s->str_start) + 1; + char *str = lwalloc(size); + memcpy(str, s->str_start, size); + str[size - 1] = '\0'; + return str; +} + +/** +* Returns the length of the current string, not including the +* null terminator (same behavior as strlen()). +*/ +int +stringbuffer_getlength(stringbuffer_t *s) +{ + return (s->str_end - s->str_start); +} + +/** +* Clear the stringbuffer_t and re-start it with the specified string. +*/ +void +stringbuffer_set(stringbuffer_t *s, const char *str) +{ + stringbuffer_clear(s); + stringbuffer_append(s, str); +} + +/** +* Copy the contents of src into dst. +*/ +void +stringbuffer_copy(stringbuffer_t *dst, stringbuffer_t *src) +{ + stringbuffer_set(dst, stringbuffer_getstring(src)); +} + +/** +* Appends a formatted string to the current string buffer, +* using the format and argument list provided. Returns -1 on error, +* check errno for reasons, documented in the printf man page. +*/ +static int +stringbuffer_avprintf(stringbuffer_t *s, const char *fmt, va_list ap) +{ + int maxlen = (s->capacity - (s->str_end - s->str_start)); + int len = 0; /* Length of the output */ + va_list ap2; + + /* Make a copy of the variadic arguments, in case we need to print twice */ + /* Print to our buffer */ + va_copy(ap2, ap); + len = vsnprintf(s->str_end, maxlen, fmt, ap2); + va_end(ap2); + + /* Propogate errors up */ + if ( len < 0 ) + return len; + + /* We didn't have enough space! */ + /* Either Unix vsnprint returned write length larger than our buffer */ + /* or Windows vsnprintf returned an error code. */ + if ( len >= maxlen ) + { + stringbuffer_makeroom(s, len + 1); + maxlen = (s->capacity - (s->str_end - s->str_start)); + + /* Try to print a second time */ + len = vsnprintf(s->str_end, maxlen, fmt, ap); + + /* Printing error? Error! */ + if ( len < 0 ) return len; + /* Too long still? Error! */ + if ( len >= maxlen ) return -1; + } + + /* Move end pointer forward and return. */ + s->str_end += len; + return len; +} + +/** +* Appends a formatted string to the current string buffer, +* using the format and argument list provided. +* Returns -1 on error, check errno for reasons, +* as documented in the printf man page. +*/ +int +stringbuffer_aprintf(stringbuffer_t *s, const char *fmt, ...) +{ + int r; + va_list ap; + va_start(ap, fmt); + r = stringbuffer_avprintf(s, fmt, ap); + va_end(ap); + return r; +} + +/** +* Trims whitespace off the end of the stringbuffer. Returns +* the number of characters trimmed. +*/ +int +stringbuffer_trim_trailing_white(stringbuffer_t *s) +{ + char *ptr = s->str_end; + int dist = 0; + + /* Roll backwards until we hit a non-space. */ + while( ptr > s->str_start ) + { + ptr--; + if( (*ptr == ' ') || (*ptr == '\t') ) + { + continue; + } + else + { + ptr++; + dist = s->str_end - ptr; + *ptr = '\0'; + s->str_end = ptr; + return dist; + } + } + return dist; +} + +/** +* Trims zeroes off the end of the last number in the stringbuffer. +* The number has to be the very last thing in the buffer. Only the +* last number will be trimmed. Returns the number of characters +* trimmed. +* +* eg: 1.22000 -> 1.22 +* 1.0 -> 1 +* 0.0 -> 0 +*/ +int +stringbuffer_trim_trailing_zeroes(stringbuffer_t *s) +{ + char *ptr = s->str_end; + char *decimal_ptr = NULL; + int dist; + + if ( s->str_end - s->str_start < 2) + return 0; + + /* Roll backwards to find the decimal for this number */ + while( ptr > s->str_start ) + { + ptr--; + if ( *ptr == '.' ) + { + decimal_ptr = ptr; + break; + } + if ( (*ptr >= '0') && (*ptr <= '9' ) ) + continue; + else + break; + } + + /* No decimal? Nothing to trim! */ + if ( ! decimal_ptr ) + return 0; + + ptr = s->str_end; + + /* Roll backwards again, with the decimal as stop point, trimming contiguous zeroes */ + while( ptr >= decimal_ptr ) + { + ptr--; + if ( *ptr == '0' ) + continue; + else + break; + } + + /* Huh, we get anywhere. Must not have trimmed anything. */ + if ( ptr == s->str_end ) + return 0; + + /* If we stopped at the decimal, we want to null that out. + It we stopped on a numeral, we want to preserve that, so push the + pointer forward one space. */ + if ( *ptr != '.' ) + ptr++; + + /* Add null terminator re-set the end of the stringbuffer. */ + *ptr = '\0'; + dist = s->str_end - ptr; + s->str_end = ptr; + return dist; +} + diff -Nru postgis-1.5.3/liblwgeom/stringbuffer.h postgis-2.0.1/liblwgeom/stringbuffer.h --- postgis-1.5.3/liblwgeom/stringbuffer.h 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/liblwgeom/stringbuffer.h 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,69 @@ +/********************************************************************** + * $Id: stringbuffer.h 9324 2012-02-27 22:08:12Z pramsey $ + * + * PostGIS - Spatial Types for PostgreSQL + * Copyright 2002 Thamer Alharbash + * Copyright 2009 Paul Ramsey + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * + * The name of the author may not be used to endorse or promote + * products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + + +#include +#include +#include +#include + +#define STRINGBUFFER_STARTSIZE 128 + +typedef struct +{ + size_t capacity; + char *str_end; + char *str_start; +} +stringbuffer_t; + +extern stringbuffer_t *stringbuffer_create_with_size(size_t size); +extern stringbuffer_t *stringbuffer_create(void); +extern void stringbuffer_destroy(stringbuffer_t *sb); +extern void stringbuffer_clear(stringbuffer_t *sb); +void stringbuffer_set(stringbuffer_t *sb, const char *s); +void stringbuffer_copy(stringbuffer_t *sb, stringbuffer_t *src); +extern void stringbuffer_append(stringbuffer_t *sb, const char *s); +extern int stringbuffer_aprintf(stringbuffer_t *sb, const char *fmt, ...); +extern const char *stringbuffer_getstring(stringbuffer_t *sb); +extern char *stringbuffer_getstringcopy(stringbuffer_t *sb); +extern int stringbuffer_getlength(stringbuffer_t *sb); +extern char stringbuffer_lastchar(stringbuffer_t *s); +extern int stringbuffer_trim_trailing_white(stringbuffer_t *s); +extern int stringbuffer_trim_trailing_zeroes(stringbuffer_t *s); + diff -Nru postgis-1.5.3/liblwgeom/vsprintf.c postgis-2.0.1/liblwgeom/vsprintf.c --- postgis-1.5.3/liblwgeom/vsprintf.c 2009-07-07 10:33:23.000000000 +0000 +++ postgis-2.0.1/liblwgeom/vsprintf.c 2012-03-13 16:23:38.000000000 +0000 @@ -30,8 +30,6 @@ # include #endif -#include - #ifdef TEST int global_total_width; #endif diff -Nru postgis-1.5.3/liblwgeom/wktparse.h postgis-2.0.1/liblwgeom/wktparse.h --- postgis-1.5.3/liblwgeom/wktparse.h 2009-06-11 16:44:03.000000000 +0000 +++ postgis-2.0.1/liblwgeom/wktparse.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,140 +0,0 @@ -/* - * Written by Ralph Mason ralph.masontelogis.com - * - * Copyright Telogis 2004 - * www.telogis.com - * - */ - -#ifndef _WKTPARSE_H -#define _WKTPARSE_H - -#include - - -#ifndef _LIBLWGEOM_H -typedef unsigned char uchar; - -typedef struct serialized_lwgeom -{ - uchar *lwgeom; - int size; -} -SERIALIZED_LWGEOM; - -typedef struct struct_lwgeom_parser_result -{ - const char *wkinput; - SERIALIZED_LWGEOM *serialized_lwgeom; - int size; - const char *message; - int errlocation; -} -LWGEOM_PARSER_RESULT; - -typedef struct struct_lwgeom_unparser_result -{ - uchar *serialized_lwgeom; - char *wkoutput; - int size; - const char *message; - int errlocation; -} -LWGEOM_UNPARSER_RESULT; -#endif -typedef void* (*allocator)(size_t size); -typedef void (*freeor)(void* mem); -typedef void (*report_error)(const char* string, ...); - -/*typedef unsigned long int4;*/ - -/* How much memory is allocated at a time(bytes) for tuples */ -#define ALLOC_CHUNKS 8192 - -/* to shrink ints less than 0x7f to 1 byte */ -/* #define SHRINK_INTS */ - -#define POINTTYPE 1 -#define LINETYPE 2 -#define POLYGONTYPE 3 -#define MULTIPOINTTYPE 4 -#define MULTILINETYPE 5 -#define MULTIPOLYGONTYPE 6 -#define COLLECTIONTYPE 7 - -/* Extended lwgeom integer types */ -#define POINTTYPEI 10 -#define LINETYPEI 11 -#define POLYGONTYPEI 12 - -#define CIRCSTRINGTYPE 8 -#define COMPOUNDTYPE 9 -#define CURVEPOLYTYPE 13 -#define MULTICURVETYPE 14 -#define MULTISURFACETYPE 15 - -extern int srid; - -/* - - These functions are used by the - generated parser and are not meant - for public use - -*/ - -void set_srid(double srid); -void alloc_lwgeom(int srid); - -void alloc_point_2d(double x,double y); -void alloc_point_3d(double x,double y,double z); -void alloc_point_4d(double x,double y,double z,double m); - -void alloc_point(void); -void alloc_linestring(void); -void alloc_linestring_closed(void); -void alloc_circularstring(void); -void alloc_circularstring_closed(void); -void alloc_polygon(void); -void alloc_polyring_counter(void); -void alloc_compoundcurve(void); -void alloc_compoundcurve_closed(void); -void alloc_curvepolygon(void); -void alloc_multipoint(void); -void alloc_multilinestring(void); -void alloc_multicurve(void); -void alloc_multipolygon(void); -void alloc_multisurface(void); -void alloc_geomertycollection(void); -void alloc_empty(); -void alloc_counter(void); - -void check_compoundcurve(void); -void check_linestring(void); -void check_polygon(void); -void check_curvepolygon(void); -void check_circularstring(void); -void check_closed_compoundcurve(void); -void check_closed_linestring(void); -void check_closed_circularstring(void); - -void pop(void); -void popc(void); - -void alloc_wkb(const char* parser); - -/** - @file Use these functions to parse and unparse lwgeoms - You are responsible for freeing the returned memory. -*/ - -int parse_lwg(LWGEOM_PARSER_RESULT *lwg_parser_result, const char* wkt, int flags, allocator allocfunc,report_error errfunc); -int parse_lwgi(LWGEOM_PARSER_RESULT *lwg_parser_result, const char* wkt, int flags, allocator allocfunc,report_error errfunc); -int unparse_WKT(LWGEOM_UNPARSER_RESULT *lwg_unparser_result, uchar* serialized, allocator alloc, freeor free, int flags); -int unparse_WKB(LWGEOM_UNPARSER_RESULT *lwg_unparser_result, uchar* serialized, allocator alloc, freeor free, int flags, char endian, uchar hexform); -int lwg_parse_yyparse(void); -int lwg_parse_yyerror(char* s); -void lwg_parse_yynotice(char* s); - - -#endif /* _WKTPARSE_H */ diff -Nru postgis-1.5.3/liblwgeom/wktparse.lex postgis-2.0.1/liblwgeom/wktparse.lex --- postgis-1.5.3/liblwgeom/wktparse.lex 2009-11-04 21:19:59.000000000 +0000 +++ postgis-2.0.1/liblwgeom/wktparse.lex 1970-01-01 00:00:00.000000000 +0000 @@ -1,73 +0,0 @@ -/* - * Written by Ralph Mason ralph.masontelogis.com - * - * Copyright Telogis 2004 - * www.telogis.com - * - */ - -%x vals_ok -%{ -#include "wktparse.tab.h" -#include /* need stdlib for atof() definition */ - -void init_parser(const char *src); -void close_parser(void); -int lwg_parse_yywrap(void); -int lwg_parse_yylex(void); - -static YY_BUFFER_STATE buf_state; - void init_parser(const char *src) { BEGIN(0);buf_state = lwg_parse_yy_scan_string(src); } - void close_parser() { lwg_parse_yy_delete_buffer(buf_state); } - int lwg_parse_yywrap(void){ return 1; } - -/* Macro to keep track of the current parse position */ -#define UPDATE_YYLLOC() (lwg_parse_yylloc.last_column += yyleng) - -%} - -%% - -[-|\+]?[0-9]+(\.)?([0-9]+)?([Ee](\+|-)?[0-9]+)? { lwg_parse_yylval.value=atof(lwg_parse_yytext); UPDATE_YYLLOC(); return VALUE; } -[-|\+]?(\.[0-9]+)([Ee](\+|-)?[0-9]+)? { lwg_parse_yylval.value=atof(lwg_parse_yytext); UPDATE_YYLLOC(); return VALUE; } - -00[0-9A-F]* { lwg_parse_yylval.wkb=lwg_parse_yytext; return WKB;} -01[0-9A-F]* { lwg_parse_yylval.wkb=lwg_parse_yytext; return WKB;} - -<*>POINT { UPDATE_YYLLOC(); return POINT; } -<*>POINTM { UPDATE_YYLLOC(); return POINTM; } -<*>LINESTRING { UPDATE_YYLLOC(); return LINESTRING; } -<*>LINESTRINGM { UPDATE_YYLLOC(); return LINESTRINGM; } -<*>CIRCULARSTRING { UPDATE_YYLLOC(); return CIRCULARSTRING; } -<*>CIRCULARSTRINGM { UPDATE_YYLLOC(); return CIRCULARSTRINGM; } -<*>POLYGON { UPDATE_YYLLOC(); return POLYGON; } -<*>POLYGONM { UPDATE_YYLLOC(); return POLYGONM; } -<*>COMPOUNDCURVE { UPDATE_YYLLOC(); return COMPOUNDCURVE; } -<*>COMPOUNDCURVEM { UPDATE_YYLLOC(); return COMPOUNDCURVEM; } -<*>CURVEPOLYGON { UPDATE_YYLLOC(); return CURVEPOLYGON; } -<*>CURVEPOLYGONM { UPDATE_YYLLOC(); return CURVEPOLYGONM; } -<*>MULTIPOINT { UPDATE_YYLLOC(); return MULTIPOINT; } -<*>MULTIPOINTM { UPDATE_YYLLOC(); return MULTIPOINTM; } -<*>MULTILINESTRING { UPDATE_YYLLOC(); return MULTILINESTRING; } -<*>MULTILINESTRINGM { UPDATE_YYLLOC(); return MULTILINESTRINGM; } -<*>MULTICURVE { UPDATE_YYLLOC(); return MULTICURVE; } -<*>MULTICURVEM { UPDATE_YYLLOC(); return MULTICURVEM; } -<*>MULTIPOLYGON { UPDATE_YYLLOC(); return MULTIPOLYGON; } -<*>MULTIPOLYGONM { UPDATE_YYLLOC(); return MULTIPOLYGONM; } -<*>MULTISURFACE { UPDATE_YYLLOC(); return MULTISURFACE; } -<*>MULTISURFACEM { UPDATE_YYLLOC(); return MULTISURFACEM; } -<*>GEOMETRYCOLLECTION { UPDATE_YYLLOC(); return GEOMETRYCOLLECTION; } -<*>GEOMETRYCOLLECTIONM { UPDATE_YYLLOC(); return GEOMETRYCOLLECTIONM; } -<*>SRID { BEGIN(vals_ok); UPDATE_YYLLOC(); return SRID; } -<*>EMPTY { UPDATE_YYLLOC(); return EMPTY; } - -<*>\( { BEGIN(vals_ok); UPDATE_YYLLOC(); return LPAREN; } -<*>\) { UPDATE_YYLLOC(); return RPAREN; } -<*>, { UPDATE_YYLLOC(); return COMMA ; } -<*>= { UPDATE_YYLLOC(); return EQUALS ; } -<*>; { BEGIN(0); UPDATE_YYLLOC(); return SEMICOLON; } -<*>[ \t\n\r]+ /*eat whitespace*/ { UPDATE_YYLLOC(); } -<*>. { return lwg_parse_yytext[0]; } - -%% - diff -Nru postgis-1.5.3/liblwgeom/wktparse.tab.c postgis-2.0.1/liblwgeom/wktparse.tab.c --- postgis-1.5.3/liblwgeom/wktparse.tab.c 2009-06-11 16:44:03.000000000 +0000 +++ postgis-2.0.1/liblwgeom/wktparse.tab.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,2619 +0,0 @@ -/* A Bison parser, made by GNU Bison 2.3. */ - -/* Skeleton implementation for Bison's Yacc-like parsers in C - - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 - Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -/* C LALR(1) parser skeleton written by Richard Stallman, by - simplifying the original so-called "semantic" parser. */ - -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - define necessary library symbols; they are noted "INFRINGES ON - USER NAME SPACE" below. */ - -/* Identify Bison output. */ -#define YYBISON 1 - -/* Bison version. */ -#define YYBISON_VERSION "2.3" - -/* Skeleton name. */ -#define YYSKELETON_NAME "yacc.c" - -/* Pure parsers. */ -#define YYPURE 0 - -/* Using locations. */ -#define YYLSP_NEEDED 1 - -/* Substitute the variable and function names. */ -#define yyparse lwg_parse_yyparse -#define yylex lwg_parse_yylex -#define yyerror lwg_parse_yyerror -#define yylval lwg_parse_yylval -#define yychar lwg_parse_yychar -#define yydebug lwg_parse_yydebug -#define yynerrs lwg_parse_yynerrs -#define yylloc lwg_parse_yylloc - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE -/* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ -enum yytokentype { - POINT = 258, - LINESTRING = 259, - POLYGON = 260, - MULTIPOINT = 261, - MULTILINESTRING = 262, - MULTIPOLYGON = 263, - GEOMETRYCOLLECTION = 264, - CIRCULARSTRING = 265, - COMPOUNDCURVE = 266, - CURVEPOLYGON = 267, - MULTICURVE = 268, - MULTISURFACE = 269, - POINTM = 270, - LINESTRINGM = 271, - POLYGONM = 272, - MULTIPOINTM = 273, - MULTILINESTRINGM = 274, - MULTIPOLYGONM = 275, - GEOMETRYCOLLECTIONM = 276, - CIRCULARSTRINGM = 277, - COMPOUNDCURVEM = 278, - CURVEPOLYGONM = 279, - MULTICURVEM = 280, - MULTISURFACEM = 281, - SRID = 282, - EMPTY = 283, - VALUE = 284, - LPAREN = 285, - RPAREN = 286, - COMMA = 287, - EQUALS = 288, - SEMICOLON = 289, - WKB = 290 -}; -#endif -/* Tokens. */ -#define POINT 258 -#define LINESTRING 259 -#define POLYGON 260 -#define MULTIPOINT 261 -#define MULTILINESTRING 262 -#define MULTIPOLYGON 263 -#define GEOMETRYCOLLECTION 264 -#define CIRCULARSTRING 265 -#define COMPOUNDCURVE 266 -#define CURVEPOLYGON 267 -#define MULTICURVE 268 -#define MULTISURFACE 269 -#define POINTM 270 -#define LINESTRINGM 271 -#define POLYGONM 272 -#define MULTIPOINTM 273 -#define MULTILINESTRINGM 274 -#define MULTIPOLYGONM 275 -#define GEOMETRYCOLLECTIONM 276 -#define CIRCULARSTRINGM 277 -#define COMPOUNDCURVEM 278 -#define CURVEPOLYGONM 279 -#define MULTICURVEM 280 -#define MULTISURFACEM 281 -#define SRID 282 -#define EMPTY 283 -#define VALUE 284 -#define LPAREN 285 -#define RPAREN 286 -#define COMMA 287 -#define EQUALS 288 -#define SEMICOLON 289 -#define WKB 290 - - - - -/* Copy the first part of user declarations. */ -#line 9 "wktparse.y" - -#include "wktparse.h" -#include -#include - -void set_zm(char z, char m); -int lwg_parse_yylex(void); - - -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 0 -#endif - -/* Enabling the token table. */ -#ifndef YYTOKEN_TABLE -# define YYTOKEN_TABLE 0 -#endif - -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE -#line 22 "wktparse.y" -{ - double value; - const char* wkb; -} -/* Line 187 of yacc.c. */ -#line 188 "y.tab.c" -YYSTYPE; -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 -#endif - -#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED -typedef struct YYLTYPE -{ - int first_line; - int first_column; - int last_line; - int last_column; -} -YYLTYPE; -# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ -# define YYLTYPE_IS_DECLARED 1 -# define YYLTYPE_IS_TRIVIAL 1 -#endif - - -/* Copy the second part of user declarations. */ - - -/* Line 216 of yacc.c. */ -#line 213 "y.tab.c" - -#ifdef short -# undef short -#endif - -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; -#endif - -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; -#else -typedef short int yytype_int8; -#endif - -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; -#else -typedef unsigned short int yytype_uint16; -#endif - -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; -#else -typedef short int yytype_int16; -#endif - -#ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned int -# endif -#endif - -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) - -#ifndef YY_ -# if YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(msgid) dgettext ("bison-runtime", msgid) -# endif -# endif -# ifndef YY_ -# define YY_(msgid) msgid -# endif -#endif - -/* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YYUSE(e) ((void) (e)) -#else -# define YYUSE(e) /* empty */ -#endif - -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(n) (n) -#else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int i) -#else -static int -YYID (i) -int i; -#endif -{ - return i; -} -#endif - -#if ! defined yyoverflow || YYERROR_VERBOSE - -/* The parser invokes alloca or malloc; define the necessary symbols. */ - -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 -# endif -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC -/* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) -# ifndef YYSTACK_ALLOC_MAXIMUM -/* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined _STDLIB_H \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - - -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ - && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) - -/* A type that is properly aligned for any stack member. */ -union yyalloc -{ - yytype_int16 yyss; - YYSTYPE yyvs; - YYLTYPE yyls; -}; - -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) - -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ - + 2 * YYSTACK_GAP_MAXIMUM) - -/* Copy COUNT objects from FROM to TO. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) -# else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (YYID (0)) -# endif -# endif - -/* Relocate STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack, Stack, yysize); \ - Stack = &yyptr->Stack; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (YYID (0)) - -#endif - -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL 6 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 203 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 36 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 118 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 184 -/* YYNRULES -- Number of states. */ -#define YYNSTATES 254 - -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ -#define YYUNDEFTOK 2 -#define YYMAXUTOK 290 - -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const yytype_uint8 yytranslate[] = - { - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35 - }; - -#if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const yytype_uint16 yyprhs[] = - { - 0, 0, 3, 4, 9, 10, 13, 15, 17, 19, - 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, - 43, 45, 48, 49, 53, 55, 57, 58, 61, 62, - 65, 69, 70, 74, 75, 79, 81, 82, 87, 89, - 93, 95, 96, 99, 102, 103, 107, 109, 111, 112, - 115, 116, 119, 120, 123, 124, 129, 131, 135, 138, - 139, 143, 146, 147, 151, 153, 155, 157, 159, 160, - 163, 164, 167, 168, 171, 172, 177, 179, 183, 186, - 187, 191, 194, 195, 199, 201, 203, 205, 207, 208, - 211, 212, 215, 216, 219, 220, 223, 224, 229, 231, - 233, 237, 241, 242, 246, 247, 251, 253, 254, 259, - 261, 265, 266, 270, 271, 275, 277, 278, 283, 285, - 287, 291, 295, 298, 299, 303, 305, 307, 308, 311, - 312, 315, 316, 321, 323, 327, 328, 332, 333, 337, - 339, 340, 345, 347, 349, 351, 355, 359, 363, 364, - 368, 369, 373, 375, 376, 381, 383, 387, 388, 392, - 393, 397, 399, 400, 405, 407, 409, 413, 417, 418, - 422, 423, 427, 429, 430, 435, 437, 439, 443, 445, - 447, 449, 452, 456, 461 - }; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int16 yyrhs[] = - { - 37, 0, -1, -1, 41, 34, 38, 40, -1, -1, - 39, 40, -1, 42, -1, 43, -1, 59, -1, 71, - -1, 115, -1, 86, -1, 125, -1, 51, -1, 103, - -1, 109, -1, 131, -1, 137, -1, 143, -1, 27, - 33, 29, -1, 35, -1, 3, 45, -1, -1, 15, - 44, 45, -1, 46, -1, 48, -1, -1, 47, 153, - -1, -1, 49, 50, -1, 30, 149, 31, -1, -1, - 6, 52, 54, -1, -1, 18, 53, 54, -1, 153, - -1, -1, 55, 30, 56, 31, -1, 57, -1, 56, - 32, 57, -1, 48, -1, -1, 58, 149, -1, 4, - 61, -1, -1, 16, 60, 61, -1, 62, -1, 64, - -1, -1, 63, 153, -1, -1, 65, 68, -1, -1, - 67, 68, -1, -1, 69, 30, 70, 31, -1, 149, - -1, 70, 32, 149, -1, 10, 75, -1, -1, 22, - 72, 75, -1, 10, 76, -1, -1, 22, 74, 76, - -1, 77, -1, 79, -1, 77, -1, 81, -1, -1, - 78, 153, -1, -1, 80, 83, -1, -1, 82, 83, - -1, -1, 84, 30, 85, 31, -1, 149, -1, 85, - 32, 149, -1, 11, 90, -1, -1, 23, 87, 90, - -1, 11, 91, -1, -1, 23, 89, 91, -1, 92, - -1, 96, -1, 94, -1, 98, -1, -1, 93, 153, - -1, -1, 95, 153, -1, -1, 97, 100, -1, -1, - 99, 100, -1, -1, 101, 30, 102, 31, -1, 64, - -1, 71, -1, 102, 32, 64, -1, 102, 32, 71, - -1, -1, 7, 104, 106, -1, -1, 19, 105, 106, - -1, 153, -1, -1, 107, 30, 108, 31, -1, 64, - -1, 108, 32, 64, -1, -1, 13, 110, 112, -1, - -1, 25, 111, 112, -1, 153, -1, -1, 113, 30, - 114, 31, -1, 64, -1, 71, -1, 114, 32, 64, - -1, 114, 32, 71, -1, 5, 117, -1, -1, 17, - 116, 117, -1, 118, -1, 120, -1, -1, 119, 153, - -1, -1, 121, 122, -1, -1, 123, 30, 124, 31, - -1, 68, -1, 124, 32, 68, -1, -1, 12, 126, - 128, -1, -1, 24, 127, 128, -1, 153, -1, -1, - 129, 30, 130, 31, -1, 66, -1, 73, -1, 88, - -1, 130, 32, 66, -1, 130, 32, 73, -1, 130, - 32, 88, -1, -1, 8, 132, 134, -1, -1, 20, - 133, 134, -1, 153, -1, -1, 135, 30, 136, 31, - -1, 120, -1, 136, 32, 120, -1, -1, 14, 138, - 140, -1, -1, 26, 139, 140, -1, 153, -1, -1, - 141, 30, 142, 31, -1, 120, -1, 125, -1, 142, - 32, 120, -1, 142, 32, 125, -1, -1, 9, 144, - 146, -1, -1, 21, 145, 146, -1, 153, -1, -1, - 147, 30, 148, 31, -1, 153, -1, 40, -1, 148, - 32, 40, -1, 150, -1, 151, -1, 152, -1, 29, - 29, -1, 29, 29, 29, -1, 29, 29, 29, 29, - -1, 28, -1 - }; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const yytype_uint16 yyrline[] = - { - 0, 38, 38, 38, 40, 40, 43, 45, 47, 49, - 51, 53, 55, 57, 59, 61, 63, 65, 67, 70, - 73, 79, 81, 81, 84, 86, 89, 89, 92, 92, - 95, 100, 100, 102, 102, 105, 107, 107, 110, 112, - 115, 118, 118, 124, 126, 126, 129, 131, 134, 134, - 137, 137, 140, 140, 143, 143, 146, 148, 153, 155, - 155, 158, 160, 160, 163, 165, 168, 170, 173, 173, - 176, 176, 179, 179, 182, 182, 185, 187, 192, 194, - 194, 197, 199, 199, 202, 204, 207, 209, 212, 212, - 215, 215, 218, 218, 221, 221, 224, 224, 227, 229, - 231, 233, 238, 238, 241, 241, 245, 247, 247, 250, - 252, 257, 257, 260, 260, 264, 266, 266, 269, 271, - 273, 275, 280, 282, 282, 285, 287, 290, 290, 293, - 293, 296, 296, 300, 303, 308, 308, 310, 310, 314, - 316, 316, 319, 321, 323, 325, 327, 329, 334, 334, - 336, 336, 340, 342, 342, 345, 347, 352, 352, 354, - 354, 358, 360, 360, 363, 365, 367, 369, 374, 374, - 377, 377, 381, 383, 383, 387, 389, 391, 395, 397, - 399, 402, 405, 408, 411 - }; -#endif - -#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = - { - "$end", "error", "$undefined", "POINT", "LINESTRING", "POLYGON", - "MULTIPOINT", "MULTILINESTRING", "MULTIPOLYGON", "GEOMETRYCOLLECTION", - "CIRCULARSTRING", "COMPOUNDCURVE", "CURVEPOLYGON", "MULTICURVE", - "MULTISURFACE", "POINTM", "LINESTRINGM", "POLYGONM", "MULTIPOINTM", - "MULTILINESTRINGM", "MULTIPOLYGONM", "GEOMETRYCOLLECTIONM", - "CIRCULARSTRINGM", "COMPOUNDCURVEM", "CURVEPOLYGONM", "MULTICURVEM", - "MULTISURFACEM", "SRID", "EMPTY", "VALUE", "LPAREN", "RPAREN", "COMMA", - "EQUALS", "SEMICOLON", "WKB", "$accept", "geometry", "@1", "@2", - "geometry_int", "srid", "geom_wkb", "geom_point", "@3", "point", - "empty_point", "@4", "nonempty_point", "@5", "point_int", - "geom_multipoint", "@6", "@7", "multipoint", "@8", "multipoint_int", - "mpoint_element", "@9", "geom_linestring", "@10", "linestring", - "empty_linestring", "@11", "nonempty_linestring", "@12", - "nonempty_linestring_closed", "@13", "linestring_1", "@14", - "linestring_int", "geom_circularstring", "@15", - "geom_circularstring_closed", "@16", "circularstring", - "circularstring_closed", "empty_circularstring", "@17", - "nonempty_circularstring", "@18", "nonempty_circularstring_closed", - "@19", "circularstring_1", "@20", "circularstring_int", - "geom_compoundcurve", "@21", "geom_compoundcurve_closed", "@22", - "compoundcurve", "compoundcurve_closed", "empty_compoundcurve", "@23", - "empty_compoundcurve_closed", "@24", "nonempty_compoundcurve", "@25", - "nonempty_compoundcurve_closed", "@26", "compoundcurve_1", "@27", - "compoundcurve_int", "geom_multilinestring", "@28", "@29", - "multilinestring", "@30", "multilinestring_int", "geom_multicurve", - "@31", "@32", "multicurve", "@33", "multicurve_int", "geom_polygon", - "@34", "polygon", "empty_polygon", "@35", "nonempty_polygon", "@36", - "polygon_1", "@37", "polygon_int", "geom_curvepolygon", "@38", "@39", - "curvepolygon", "@40", "curvepolygon_int", "geom_multipolygon", "@41", - "@42", "multipolygon", "@43", "multipolygon_int", "geom_multisurface", - "@44", "@45", "multisurface", "@46", "multisurface_int", - "geom_geometrycollection", "@47", "@48", "geometrycollection", "@49", - "geometrycollection_int", "a_point", "point_2d", "point_3d", "point_4d", - "empty", 0 - }; -#endif - -# ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ -static const yytype_uint16 yytoknum[] = - { - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290 - }; -# endif - -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = - { - 0, 36, 38, 37, 39, 37, 40, 40, 40, 40, - 40, 40, 40, 40, 40, 40, 40, 40, 40, 41, - 42, 43, 44, 43, 45, 45, 47, 46, 49, 48, - 50, 52, 51, 53, 51, 54, 55, 54, 56, 56, - 57, 58, 57, 59, 60, 59, 61, 61, 63, 62, - 65, 64, 67, 66, 69, 68, 70, 70, 71, 72, - 71, 73, 74, 73, 75, 75, 76, 76, 78, 77, - 80, 79, 82, 81, 84, 83, 85, 85, 86, 87, - 86, 88, 89, 88, 90, 90, 91, 91, 93, 92, - 95, 94, 97, 96, 99, 98, 101, 100, 102, 102, - 102, 102, 104, 103, 105, 103, 106, 107, 106, 108, - 108, 110, 109, 111, 109, 112, 113, 112, 114, 114, - 114, 114, 115, 116, 115, 117, 117, 119, 118, 121, - 120, 123, 122, 124, 124, 126, 125, 127, 125, 128, - 129, 128, 130, 130, 130, 130, 130, 130, 132, 131, - 133, 131, 134, 135, 134, 136, 136, 138, 137, 139, - 137, 140, 141, 140, 142, 142, 142, 142, 144, 143, - 145, 143, 146, 147, 146, 148, 148, 148, 149, 149, - 149, 150, 151, 152, 153 - }; - -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = - { - 0, 2, 0, 4, 0, 2, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, - 1, 2, 0, 3, 1, 1, 0, 2, 0, 2, - 3, 0, 3, 0, 3, 1, 0, 4, 1, 3, - 1, 0, 2, 2, 0, 3, 1, 1, 0, 2, - 0, 2, 0, 2, 0, 4, 1, 3, 2, 0, - 3, 2, 0, 3, 1, 1, 1, 1, 0, 2, - 0, 2, 0, 2, 0, 4, 1, 3, 2, 0, - 3, 2, 0, 3, 1, 1, 1, 1, 0, 2, - 0, 2, 0, 2, 0, 2, 0, 4, 1, 1, - 3, 3, 0, 3, 0, 3, 1, 0, 4, 1, - 3, 0, 3, 0, 3, 1, 0, 4, 1, 1, - 3, 3, 2, 0, 3, 1, 1, 0, 2, 0, - 2, 0, 4, 1, 3, 0, 3, 0, 3, 1, - 0, 4, 1, 1, 1, 3, 3, 3, 0, 3, - 0, 3, 1, 0, 4, 1, 3, 0, 3, 0, - 3, 1, 0, 4, 1, 1, 3, 3, 0, 3, - 0, 3, 1, 0, 4, 1, 1, 3, 1, 1, - 1, 2, 3, 4, 1 - }; - -/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state - STATE-NUM when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const yytype_uint8 yydefact[] = - { - 4, 0, 0, 0, 0, 0, 1, 26, 48, 127, - 31, 102, 148, 168, 68, 88, 135, 111, 157, 22, - 44, 123, 33, 104, 150, 170, 59, 79, 137, 113, - 159, 20, 5, 6, 7, 13, 8, 9, 11, 14, - 15, 10, 12, 16, 17, 18, 2, 19, 21, 24, - 0, 25, 0, 43, 46, 0, 47, 54, 122, 125, - 0, 126, 131, 36, 107, 153, 173, 58, 64, 0, - 65, 74, 78, 84, 0, 85, 96, 140, 116, 162, - 26, 48, 127, 36, 107, 153, 173, 68, 88, 140, - 116, 162, 0, 184, 27, 0, 29, 49, 51, 0, - 128, 130, 0, 32, 0, 35, 103, 0, 106, 149, - 0, 152, 169, 0, 172, 69, 71, 0, 89, 93, - 0, 136, 0, 139, 112, 0, 115, 158, 0, 161, - 23, 45, 124, 34, 105, 151, 171, 60, 80, 138, - 114, 160, 3, 0, 0, 178, 179, 180, 0, 54, - 28, 50, 129, 0, 0, 50, 52, 50, 129, 181, - 30, 0, 56, 133, 0, 40, 0, 38, 0, 109, - 0, 155, 0, 176, 0, 175, 0, 76, 98, 99, - 0, 68, 90, 62, 82, 142, 54, 143, 144, 0, - 118, 119, 0, 164, 165, 0, 182, 55, 0, 132, - 54, 37, 28, 42, 108, 50, 154, 129, 174, 0, - 75, 0, 97, 50, 61, 66, 67, 74, 81, 86, - 0, 87, 96, 68, 90, 53, 141, 52, 117, 50, - 163, 129, 183, 57, 134, 39, 110, 156, 177, 77, - 100, 101, 73, 91, 95, 63, 83, 145, 146, 147, - 120, 121, 166, 167 - }; - -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int16 yydefgoto[] = - { - -1, 2, 92, 3, 32, 4, 33, 34, 80, 48, - 49, 50, 51, 52, 96, 35, 63, 83, 103, 104, - 166, 167, 168, 36, 81, 53, 54, 55, 56, 57, - 185, 186, 98, 99, 161, 37, 87, 187, 223, 67, - 214, 68, 69, 70, 71, 216, 217, 116, 117, 176, - 38, 88, 188, 224, 72, 218, 73, 74, 219, 220, - 75, 76, 221, 222, 119, 120, 180, 39, 64, 84, - 106, 107, 170, 40, 78, 90, 124, 125, 192, 41, - 82, 58, 59, 60, 61, 62, 101, 102, 164, 42, - 77, 89, 121, 122, 189, 43, 65, 85, 109, 110, - 172, 44, 79, 91, 127, 128, 195, 45, 66, 86, - 112, 113, 174, 144, 145, 146, 147, 105 - }; - -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -176 -static const yytype_int16 yypact[] = - { - -5, 16, 52, 168, 13, 31, -176, 33, 35, 37, - -176, -176, -176, -176, 50, 54, -176, -176, -176, -176, - -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, - -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, - -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, - 58, -176, 57, -176, -176, 58, -176, -176, -176, -176, - 58, -176, -176, 58, 58, 58, 58, -176, -176, 58, - -176, -176, -176, -176, 58, -176, -176, 58, 58, 58, - 33, 35, 37, 58, 58, 58, 58, 50, 54, 58, - 58, 58, 168, -176, -176, 59, -176, -176, -176, 60, - -176, -176, 61, -176, 63, -176, -176, 64, -176, -176, - 65, -176, -176, 66, -176, -176, -176, 67, -176, -176, - 68, -176, 69, -176, -176, 70, -176, -176, 71, -176, - -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, - -176, -176, -176, 73, 74, -176, -176, -176, 59, -176, - 75, -176, -176, 116, 59, 11, 15, 11, 18, 77, - -176, 0, -176, -176, 12, -176, 14, -176, 59, -176, - 19, -176, 24, -176, 27, -176, 39, -176, -176, -176, - 41, 78, 79, -176, -176, -176, -176, -176, -176, 43, - -176, -176, 47, -176, -176, 51, 81, -176, 59, -176, - -176, -176, 75, -176, -176, -176, -176, -176, -176, 168, - -176, 59, -176, 11, -176, -176, -176, -176, -176, -176, - 58, -176, -176, 78, 79, -176, -176, 15, -176, 11, - -176, 18, -176, -176, -176, -176, -176, -176, -176, -176, - -176, -176, -176, -176, -176, -176, -176, -176, -176, -176, - -176, -176, -176, -176 - }; - -/* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = - { - -176, -176, -176, -176, -91, -176, -176, -176, -176, 9, - -176, -176, -138, -176, -176, -176, -176, -176, 28, -176, - -176, -95, -176, -176, -176, 32, -176, -176, -144, -176, - -115, -176, -132, -176, -176, -137, -176, -113, -176, 29, - -108, -175, -176, -176, -176, -176, -176, -100, -176, -176, - -176, -176, -84, -176, 62, -79, -176, -176, -176, -176, - -176, -176, -176, -176, -76, -176, -176, -176, -176, -176, - 72, -176, -176, -176, -176, -176, 76, -176, -176, -176, - -176, 80, -176, -176, -150, -176, -176, -176, -176, -154, - -176, -176, 106, -176, -176, -176, -176, -176, 82, -176, - -176, -176, -176, -176, 56, -176, -176, -176, -176, -176, - 83, -176, -176, -145, -176, -176, -176, -50 - }; - -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If zero, do what YYDEFACT says. - If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -130 -static const yytype_int16 yytable[] = - { - 94, 142, 171, 162, 194, 97, 215, 169, 193, 177, - 100, 178, 165, 190, 108, 111, 114, 163, 179, 115, - 191, 14, 1, 203, 118, 181, 182, 123, 126, 129, - 16, 197, 198, 26, 108, 111, 114, 183, 184, 123, - 126, 129, 28, 199, 200, 201, 202, 46, 215, 5, - 204, 205, 6, 233, 225, 206, 207, 237, 208, 209, - 47, 236, 173, -28, 165, -50, 239, -129, 234, 240, - 210, 211, 212, 213, 226, 227, 241, 253, 228, 229, - -70, 252, 230, 231, -92, 250, 93, 95, 143, 130, - 148, 149, 251, 150, 151, 152, 153, 154, 155, 156, - 157, 158, 159, 175, -41, 160, 196, 235, -72, -94, - 232, 133, 247, 131, 248, 245, 137, 242, 238, 7, - 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, - 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 249, 93, 246, 244, 141, 0, 0, - 138, 31, 0, 0, 0, 0, 134, 0, 0, 0, - 0, 0, 132, 0, 0, 0, 140, 135, 0, 136, - 243, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 139, 0, 0, 0, 0, - 0, 0, 0, 31 - }; - -static const yytype_int16 yycheck[] = - { - 50, 92, 152, 148, 158, 55, 181, 151, 158, 154, - 60, 155, 150, 157, 64, 65, 66, 149, 155, 69, - 157, 10, 27, 168, 74, 10, 11, 77, 78, 79, - 12, 31, 32, 22, 84, 85, 86, 22, 23, 89, - 90, 91, 24, 31, 32, 31, 32, 34, 223, 33, - 31, 32, 0, 198, 186, 31, 32, 207, 31, 32, - 29, 205, 153, 30, 202, 30, 211, 30, 200, 213, - 31, 32, 31, 32, 31, 32, 213, 231, 31, 32, - 30, 231, 31, 32, 30, 229, 28, 30, 29, 80, - 30, 30, 229, 30, 30, 30, 30, 30, 30, 30, - 30, 30, 29, 153, 29, 31, 29, 202, 30, 30, - 29, 83, 227, 81, 227, 223, 87, 217, 209, 3, - 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, - 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 227, 28, 224, 222, 91, -1, -1, - 88, 35, -1, -1, -1, -1, 84, -1, -1, -1, - -1, -1, 82, -1, -1, -1, 90, 85, -1, 86, - 220, 3, 4, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 89, -1, -1, -1, -1, - -1, -1, -1, 35 - }; - -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = - { - 0, 27, 37, 39, 41, 33, 0, 3, 4, 5, - 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 35, 40, 42, 43, 51, 59, 71, 86, 103, - 109, 115, 125, 131, 137, 143, 34, 29, 45, 46, - 47, 48, 49, 61, 62, 63, 64, 65, 117, 118, - 119, 120, 121, 52, 104, 132, 144, 75, 77, 78, - 79, 80, 90, 92, 93, 96, 97, 126, 110, 138, - 44, 60, 116, 53, 105, 133, 145, 72, 87, 127, - 111, 139, 38, 28, 153, 30, 50, 153, 68, 69, - 153, 122, 123, 54, 55, 153, 106, 107, 153, 134, - 135, 153, 146, 147, 153, 153, 83, 84, 153, 100, - 101, 128, 129, 153, 112, 113, 153, 140, 141, 153, - 45, 61, 117, 54, 106, 134, 146, 75, 90, 128, - 112, 140, 40, 29, 149, 150, 151, 152, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 30, 30, 29, - 31, 70, 149, 68, 124, 48, 56, 57, 58, 64, - 108, 120, 136, 40, 148, 153, 85, 149, 64, 71, - 102, 10, 11, 22, 23, 66, 67, 73, 88, 130, - 64, 71, 114, 120, 125, 142, 29, 31, 32, 31, - 32, 31, 32, 149, 31, 32, 31, 32, 31, 32, - 31, 32, 31, 32, 76, 77, 81, 82, 91, 94, - 95, 98, 99, 74, 89, 68, 31, 32, 31, 32, - 31, 32, 29, 149, 68, 57, 64, 120, 40, 149, - 64, 71, 83, 153, 100, 76, 91, 66, 73, 88, - 64, 71, 120, 125 - }; - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. */ - -#define YYFAIL goto yyerrlab - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - yytoken = YYTRANSLATE (yychar); \ - YYPOPSTACK (1); \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (YYID (0)) - - -#define YYTERROR 1 -#define YYERRCODE 256 - - -/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. - If N is 0, then set CURRENT to the empty location which ends - the previous symbol: RHS[0] (always defined). */ - -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (YYID (N)) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (YYID (0)) -#endif - - -/* YY_LOCATION_PRINT -- Print the location on the stream. - This macro was not mandated originally: define only if we know - we won't break user code: when these are the locations we know. */ - -#ifndef YY_LOCATION_PRINT -# if YYLTYPE_IS_TRIVIAL -# define YY_LOCATION_PRINT(File, Loc) \ - fprintf (File, "%d.%d-%d.%d", \ - (Loc).first_line, (Loc).first_column, \ - (Loc).last_line, (Loc).last_column) -# else -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif -#endif - - -/* YYLEX -- calling `yylex' with the right arguments. */ - -#ifdef YYLEX_PARAM -# define YYLEX yylex (YYLEX_PARAM) -#else -# define YYLEX yylex () -#endif - -/* Enable debugging if requested. */ -#if YYDEBUG - -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value, Location); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp) -FILE *yyoutput; -int yytype; -YYSTYPE const * const yyvaluep; -YYLTYPE const * const yylocationp; -#endif -{ - if (!yyvaluep) - return; - YYUSE (yylocationp); -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); -# endif - switch (yytype) - { - default: - break; - } -} - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp) -FILE *yyoutput; -int yytype; -YYSTYPE const * const yyvaluep; -YYLTYPE const * const yylocationp; -#endif -{ - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - - YY_LOCATION_PRINT (yyoutput, *yylocationp); - YYFPRINTF (yyoutput, ": "); - yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp); - YYFPRINTF (yyoutput, ")"); -} - -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (included). | -`------------------------------------------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) -#else -static void -yy_stack_print (bottom, top) -yytype_int16 *bottom; -yytype_int16 *top; -#endif -{ - YYFPRINTF (stderr, "Stack now"); - for (; bottom <= top; ++bottom) - YYFPRINTF (stderr, " %d", *bottom); - YYFPRINTF (stderr, "\n"); -} - -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) - - -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule) -#else -static void -yy_reduce_print (yyvsp, yylsp, yyrule) -YYSTYPE *yyvsp; -YYLTYPE *yylsp; -int yyrule; -#endif -{ - int yynrhs = yyr2[yyrule]; - int yyi; - unsigned long int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); - /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - fprintf (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - , &(yylsp[(yyi + 1) - (yynrhs)]) ); - fprintf (stderr, "\n"); - } -} - -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, yylsp, Rule); \ -} while (YYID (0)) - -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) -#endif /* !YYDEBUG */ - - -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ - -#ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 -#endif - - - -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static YYSIZE_T -yystrlen (const char *yystr) -#else -static YYSIZE_T -yystrlen (yystr) -const char *yystr; -#endif -{ - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -# endif - -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in -YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static char * -yystpcpy (char *yydest, const char *yysrc) -#else -static char * -yystpcpy (yydest, yysrc) -char *yydest; -const char *yysrc; -#endif -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYSIZE_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } -do_not_strip_quotes: - ; - } - - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif - -/* Copy into YYRESULT an error message about the unexpected token - YYCHAR while in state YYSTATE. Return the number of bytes copied, - including the terminating null byte. If YYRESULT is null, do not - copy anything; just return the number of bytes that would be - copied. As a special case, return 0 if an ordinary "syntax error" - message will do. Return YYSIZE_MAXIMUM if overflow occurs during - size calculation. */ -static YYSIZE_T -yysyntax_error (char *yyresult, int yystate, int yychar) -{ - int yyn = yypact[yystate]; - - if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) - return 0; - else - { - int yytype = YYTRANSLATE (yychar); - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); - YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; - int yysize_overflow = 0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - int yyx; - -# if 0 - /* This is so xgettext sees the translatable formats that are - constructed on the fly. */ - YY_("syntax error, unexpected %s"); - YY_("syntax error, unexpected %s, expecting %s"); - YY_("syntax error, unexpected %s, expecting %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); -# endif - char *yyfmt; - char const *yyf; - static char const yyunexpected[] = "syntax error, unexpected %s"; - static char const yyexpecting[] = ", expecting %s"; - static char const yyor[] = " or %s"; - char yyformat[sizeof yyunexpected - + sizeof yyexpecting - 1 - + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) - * (sizeof yyor - 1))]; - char const *yyprefix = yyexpecting; - - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yycount = 1; - - yyarg[0] = yytname[yytype]; - yyfmt = yystpcpy (yyformat, yyunexpected); - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - yyformat[sizeof yyunexpected - 1] = '\0'; - break; - } - yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - yyfmt = yystpcpy (yyfmt, yyprefix); - yyprefix = yyor; - } - - yyf = YY_(yyformat); - yysize1 = yysize + yystrlen (yyf); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - - if (yysize_overflow) - return YYSIZE_MAXIMUM; - - if (yyresult) - { - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - char *yyp = yyresult; - int yyi = 0; - while ((*yyp = *yyf) != '\0') - { - if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyf += 2; - } - else - { - yyp++; - yyf++; - } - } - } - return yysize; - } -} -#endif /* YYERROR_VERBOSE */ - - -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp) -#else -static void -yydestruct (yymsg, yytype, yyvaluep, yylocationp) -const char *yymsg; -int yytype; -YYSTYPE *yyvaluep; -YYLTYPE *yylocationp; -#endif -{ - YYUSE (yyvaluep); - YYUSE (yylocationp); - - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - - switch (yytype) - { - - default: - break; - } -} - - -/* Prevent warnings from -Wmissing-prototypes. */ - -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (void); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ - - - -/* The look-ahead symbol. */ -int yychar; - -/* The semantic value of the look-ahead symbol. */ -YYSTYPE yylval; - -/* Number of syntax errors so far. */ -int yynerrs; -/* Location data for the look-ahead symbol. */ -YYLTYPE yylloc; - - - -/*----------. -| yyparse. | -`----------*/ - -#ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) -void *YYPARSE_PARAM; -#endif -#else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void) -#else -int -yyparse () - -#endif -#endif -{ - - int yystate; - int yyn; - int yyresult; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - /* Look-ahead token as an internal (translated) token number. */ - int yytoken = 0; -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif - - /* Three stacks and their tools: - `yyss': related to states, - `yyvs': related to semantic values, - `yyls': related to locations. - - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss = yyssa; - yytype_int16 *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp; - - /* The location stack. */ - YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls = yylsa; - YYLTYPE *yylsp; - /* The locations where the error started and ended. */ - YYLTYPE yyerror_range[2]; - -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) - - YYSIZE_T yystacksize = YYINITDEPTH; - - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - YYLTYPE yyloc; - - /* The number of symbols on the RHS of the reduced rule. - Keep to zero when no symbol should be popped. */ - int yylen = 0; - - YYDPRINTF ((stderr, "Starting parse\n")); - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - - yyssp = yyss; - yyvsp = yyvs; - yylsp = yyls; -#if YYLTYPE_IS_TRIVIAL - /* Initialize the default location before parsing starts. */ - yylloc.first_line = yylloc.last_line = 1; - yylloc.first_column = yylloc.last_column = 0; -#endif - - goto yysetstate; - - /*------------------------------------------------------------. - | yynewstate -- Push a new state, which is found in yystate. | - `------------------------------------------------------------*/ -yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. So pushing a state here evens the stacks. */ - yyssp++; - -yysetstate: - *yyssp = yystate; - - if (yyss + yystacksize - 1 <= yyssp) - { - /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; - -#ifdef yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - YYLTYPE *yyls1 = yyls; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yyls1, yysize * sizeof (*yylsp), - &yystacksize); - yyls = yyls1; - yyss = yyss1; - yyvs = yyvs1; - } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss); - YYSTACK_RELOCATE (yyvs); - YYSTACK_RELOCATE (yyls); -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif -#endif /* no yyoverflow */ - - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - yylsp = yyls + yysize - 1; - - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); - - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } - - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - - goto yybackup; - - /*-----------. - | yybackup. | - `-----------*/ -yybackup: - - /* Do appropriate processing given the current state. Read a - look-ahead token if we need one and don't already have one. */ - - /* First try to decide what to do without reference to look-ahead token. */ - yyn = yypact[yystate]; - if (yyn == YYPACT_NINF) - goto yydefault; - - /* Not known => get a look-ahead token if don't already have one. */ - - /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; - } - - if (yychar <= YYEOF) - { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) - goto yydefault; - yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yyn == 0 || yyn == YYTABLE_NINF) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - - if (yyn == YYFINAL) - YYACCEPT; - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - /* Shift the look-ahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; - - yystate = yyn; - *++yyvsp = yylval; - *++yylsp = yylloc; - goto yynewstate; - - - /*-----------------------------------------------------------. - | yydefault -- do the default action for the current state. | - `-----------------------------------------------------------*/ -yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; - - - /*-----------------------------. - | yyreduce -- Do a reduction. | - `-----------------------------*/ -yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; - - /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; - - /* Default location. */ - YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 2: -#line 38 "wktparse.y" - { - alloc_lwgeom(srid); - } - break; - - case 4: -#line 40 "wktparse.y" - { - alloc_lwgeom(-1); - } - break; - - case 19: -#line 70 "wktparse.y" - { - set_srid((yyvsp[(3) - (3)].value)); - } - break; - - case 20: -#line 73 "wktparse.y" - { - alloc_wkb((yyvsp[(1) - (1)].wkb)); - } - break; - - case 22: -#line 81 "wktparse.y" - { - set_zm(0, 1); - } - break; - - case 26: -#line 89 "wktparse.y" - { - alloc_point(); - } - break; - - case 27: -#line 89 "wktparse.y" - { - pop(); - } - break; - - case 28: -#line 92 "wktparse.y" - { - alloc_point(); - } - break; - - case 29: -#line 92 "wktparse.y" - { - pop(); - } - break; - - case 31: -#line 100 "wktparse.y" - { - alloc_multipoint(); - } - break; - - case 32: -#line 100 "wktparse.y" - { - pop(); - } - break; - - case 33: -#line 102 "wktparse.y" - { - set_zm(0, 1); - alloc_multipoint(); - } - break; - - case 34: -#line 102 "wktparse.y" - { - pop(); - } - break; - - case 36: -#line 107 "wktparse.y" - { - alloc_counter(); - } - break; - - case 37: -#line 107 "wktparse.y" - { - pop(); - } - break; - - case 41: -#line 118 "wktparse.y" - { - alloc_point(); - } - break; - - case 42: -#line 118 "wktparse.y" - { - pop(); - } - break; - - case 44: -#line 126 "wktparse.y" - { - set_zm(0, 1); - } - break; - - case 48: -#line 134 "wktparse.y" - { - alloc_linestring(); - } - break; - - case 49: -#line 134 "wktparse.y" - { - pop(); - } - break; - - case 50: -#line 137 "wktparse.y" - { - alloc_linestring(); - } - break; - - case 51: -#line 137 "wktparse.y" - { - check_linestring(); - pop(); - } - break; - - case 52: -#line 140 "wktparse.y" - { - alloc_linestring_closed(); - } - break; - - case 53: -#line 140 "wktparse.y" - { - check_closed_linestring(); - pop(); - } - break; - - case 54: -#line 143 "wktparse.y" - { - alloc_counter(); - } - break; - - case 55: -#line 143 "wktparse.y" - { - pop(); - } - break; - - case 59: -#line 155 "wktparse.y" - { - set_zm(0, 1); - } - break; - - case 62: -#line 160 "wktparse.y" - { - set_zm(0, 1); - } - break; - - case 68: -#line 173 "wktparse.y" - { - alloc_circularstring(); - } - break; - - case 69: -#line 173 "wktparse.y" - { - pop(); - } - break; - - case 70: -#line 176 "wktparse.y" - { - alloc_circularstring(); - } - break; - - case 71: -#line 176 "wktparse.y" - { - check_circularstring(); - pop(); - } - break; - - case 72: -#line 179 "wktparse.y" - { - alloc_circularstring_closed(); - } - break; - - case 73: -#line 179 "wktparse.y" - { - check_closed_circularstring(); - pop(); - } - break; - - case 74: -#line 182 "wktparse.y" - { - alloc_counter(); - } - break; - - case 75: -#line 182 "wktparse.y" - { - pop(); - } - break; - - case 79: -#line 194 "wktparse.y" - { - set_zm(0, 1); - } - break; - - case 82: -#line 199 "wktparse.y" - { - set_zm(0, 1); - } - break; - - case 88: -#line 212 "wktparse.y" - { - alloc_compoundcurve(); - } - break; - - case 89: -#line 212 "wktparse.y" - { - pop(); - } - break; - - case 90: -#line 215 "wktparse.y" - { - alloc_compoundcurve_closed(); - } - break; - - case 91: -#line 215 "wktparse.y" - { - pop(); - } - break; - - case 92: -#line 218 "wktparse.y" - { - alloc_compoundcurve(); - } - break; - - case 93: -#line 218 "wktparse.y" - { - check_compoundcurve(); - pop(); - } - break; - - case 94: -#line 221 "wktparse.y" - { - alloc_compoundcurve_closed(); - } - break; - - case 95: -#line 221 "wktparse.y" - { - check_closed_compoundcurve(); - pop(); - } - break; - - case 96: -#line 224 "wktparse.y" - { - alloc_counter(); - } - break; - - case 97: -#line 224 "wktparse.y" - { - pop(); - } - break; - - case 102: -#line 238 "wktparse.y" - { - alloc_multilinestring(); - } - break; - - case 103: -#line 239 "wktparse.y" - { - pop(); - } - break; - - case 104: -#line 241 "wktparse.y" - { - set_zm(0, 1); - alloc_multilinestring(); - } - break; - - case 105: -#line 242 "wktparse.y" - { - pop(); - } - break; - - case 107: -#line 247 "wktparse.y" - { - alloc_counter(); - } - break; - - case 108: -#line 247 "wktparse.y" - { - pop(); - } - break; - - case 111: -#line 257 "wktparse.y" - { - alloc_multicurve(); - } - break; - - case 112: -#line 258 "wktparse.y" - { - pop(); - } - break; - - case 113: -#line 260 "wktparse.y" - { - set_zm(0, 1); - alloc_multicurve(); - } - break; - - case 114: -#line 261 "wktparse.y" - { - pop(); - } - break; - - case 116: -#line 266 "wktparse.y" - { - alloc_counter(); - } - break; - - case 117: -#line 266 "wktparse.y" - { - pop(); - } - break; - - case 123: -#line 282 "wktparse.y" - { - set_zm(0, 1); - } - break; - - case 127: -#line 290 "wktparse.y" - { - alloc_polygon(); - } - break; - - case 128: -#line 290 "wktparse.y" - { - pop(); - } - break; - - case 129: -#line 293 "wktparse.y" - { - alloc_polygon(); - } - break; - - case 130: -#line 293 "wktparse.y" - { - check_polygon(); - pop(); - } - break; - - case 131: -#line 296 "wktparse.y" - { - alloc_counter(); - } - break; - - case 132: -#line 296 "wktparse.y" - { - pop(); - } - break; - - case 135: -#line 308 "wktparse.y" - { - alloc_curvepolygon(); - } - break; - - case 136: -#line 308 "wktparse.y" - { - check_curvepolygon(); - pop(); - } - break; - - case 137: -#line 310 "wktparse.y" - { - set_zm(0, 1); - alloc_curvepolygon(); - } - break; - - case 138: -#line 311 "wktparse.y" - { - check_curvepolygon(); - pop(); - } - break; - - case 140: -#line 316 "wktparse.y" - { - alloc_counter(); - } - break; - - case 141: -#line 316 "wktparse.y" - { - pop(); - } - break; - - case 148: -#line 334 "wktparse.y" - { - alloc_multipolygon(); - } - break; - - case 149: -#line 334 "wktparse.y" - { - pop(); - } - break; - - case 150: -#line 336 "wktparse.y" - { - set_zm(0, 1); - alloc_multipolygon(); - } - break; - - case 151: -#line 337 "wktparse.y" - { - pop(); - } - break; - - case 153: -#line 342 "wktparse.y" - { - alloc_counter(); - } - break; - - case 154: -#line 342 "wktparse.y" - { - pop(); - } - break; - - case 157: -#line 352 "wktparse.y" - { - alloc_multisurface(); - } - break; - - case 158: -#line 352 "wktparse.y" - { - pop(); - } - break; - - case 159: -#line 354 "wktparse.y" - { - set_zm(0, 1); - alloc_multisurface(); - } - break; - - case 160: -#line 355 "wktparse.y" - { - pop(); - } - break; - - case 162: -#line 360 "wktparse.y" - { - alloc_counter(); - } - break; - - case 163: -#line 360 "wktparse.y" - { - pop(); - } - break; - - case 168: -#line 374 "wktparse.y" - { - alloc_geomertycollection(); - } - break; - - case 169: -#line 375 "wktparse.y" - { - pop(); - } - break; - - case 170: -#line 377 "wktparse.y" - { - set_zm(0, 1); - alloc_geomertycollection(); - } - break; - - case 171: -#line 378 "wktparse.y" - { - pop(); - } - break; - - case 173: -#line 383 "wktparse.y" - { - alloc_counter(); - } - break; - - case 174: -#line 383 "wktparse.y" - { - pop(); - } - break; - - case 181: -#line 402 "wktparse.y" - { - alloc_point_2d((yyvsp[(1) - (2)].value),(yyvsp[(2) - (2)].value)); - } - break; - - case 182: -#line 405 "wktparse.y" - { - alloc_point_3d((yyvsp[(1) - (3)].value),(yyvsp[(2) - (3)].value),(yyvsp[(3) - (3)].value)); - } - break; - - case 183: -#line 408 "wktparse.y" - { - alloc_point_4d((yyvsp[(1) - (4)].value),(yyvsp[(2) - (4)].value),(yyvsp[(3) - (4)].value),(yyvsp[(4) - (4)].value)); - } - break; - - case 184: -#line 411 "wktparse.y" - { - alloc_empty(); - } - break; - - - /* Line 1267 of yacc.c. */ -#line 2185 "y.tab.c" - default: - break; - } - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); - - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - - *++yyvsp = yyval; - *++yylsp = yyloc; - - /* Now `shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; - - goto yynewstate; - - - /*------------------------------------. - | yyerrlab -- here on detecting error | - `------------------------------------*/ -yyerrlab: - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; -#if ! YYERROR_VERBOSE - yyerror (YY_("syntax error")); -#else - { - YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); - if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) - { - YYSIZE_T yyalloc = 2 * yysize; - if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) - yyalloc = YYSTACK_ALLOC_MAXIMUM; - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yyalloc); - if (yymsg) - yymsg_alloc = yyalloc; - else - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - } - } - - if (0 < yysize && yysize <= yymsg_alloc) - { - (void) yysyntax_error (yymsg, yystate, yychar); - yyerror (yymsg); - } - else - { - yyerror (YY_("syntax error")); - if (yysize != 0) - goto yyexhaustedlab; - } - } -#endif - } - - yyerror_range[0] = yylloc; - - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse look-ahead token after an - error, discard it. */ - - if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval, &yylloc); - yychar = YYEMPTY; - } - } - - /* Else will try to reuse look-ahead token after shifting the error - token. */ - goto yyerrlab1; - - - /*---------------------------------------------------. - | yyerrorlab -- error raised explicitly by YYERROR. | - `---------------------------------------------------*/ -yyerrorlab: - - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ - if (/*CONSTCOND*/ 0) - goto yyerrorlab; - - yyerror_range[0] = yylsp[1-yylen]; - /* Do not reclaim the symbols of the rule which action triggered - this YYERROR. */ - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - yystate = *yyssp; - goto yyerrlab1; - - - /*-------------------------------------------------------------. - | yyerrlab1 -- common code for both syntax error and YYERROR. | - `-------------------------------------------------------------*/ -yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact[yystate]; - if (yyn != YYPACT_NINF) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; - - yyerror_range[0] = *yylsp; - yydestruct ("Error: popping", - yystos[yystate], yyvsp, yylsp); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } - - if (yyn == YYFINAL) - YYACCEPT; - - *++yyvsp = yylval; - - yyerror_range[1] = yylloc; - /* Using YYLLOC is tempting, but would change the location of - the look-ahead. YYLOC is available though. */ - YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2); - *++yylsp = yyloc; - - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); - - yystate = yyn; - goto yynewstate; - - - /*-------------------------------------. - | yyacceptlab -- YYACCEPT comes here. | - `-------------------------------------*/ -yyacceptlab: - yyresult = 0; - goto yyreturn; - - /*-----------------------------------. - | yyabortlab -- YYABORT comes here. | - `-----------------------------------*/ -yyabortlab: - yyresult = 1; - goto yyreturn; - -#ifndef yyoverflow - /*-------------------------------------------------. - | yyexhaustedlab -- memory exhaustion comes here. | - `-------------------------------------------------*/ -yyexhaustedlab: - yyerror (YY_("memory exhausted")); - yyresult = 2; - /* Fall through. */ -#endif - -yyreturn: - if (yychar != YYEOF && yychar != YYEMPTY) - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval, &yylloc); - /* Do not reclaim the symbols of the rule which action triggered - this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp, yylsp); - YYPOPSTACK (1); - } -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); -#endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif - /* Make sure YYID is used. */ - return YYID (yyresult); -} - - -#line 412 "wktparse.y" - - - - - - diff -Nru postgis-1.5.3/liblwgeom/wktparse.tab.h postgis-2.0.1/liblwgeom/wktparse.tab.h --- postgis-1.5.3/liblwgeom/wktparse.tab.h 2009-06-11 16:44:03.000000000 +0000 +++ postgis-2.0.1/liblwgeom/wktparse.tab.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,146 +0,0 @@ -/* A Bison parser, made by GNU Bison 2.3. */ - -/* Skeleton interface for Bison's Yacc-like parsers in C - - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 - Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE -/* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ -enum yytokentype { - POINT = 258, - LINESTRING = 259, - POLYGON = 260, - MULTIPOINT = 261, - MULTILINESTRING = 262, - MULTIPOLYGON = 263, - GEOMETRYCOLLECTION = 264, - CIRCULARSTRING = 265, - COMPOUNDCURVE = 266, - CURVEPOLYGON = 267, - MULTICURVE = 268, - MULTISURFACE = 269, - POINTM = 270, - LINESTRINGM = 271, - POLYGONM = 272, - MULTIPOINTM = 273, - MULTILINESTRINGM = 274, - MULTIPOLYGONM = 275, - GEOMETRYCOLLECTIONM = 276, - CIRCULARSTRINGM = 277, - COMPOUNDCURVEM = 278, - CURVEPOLYGONM = 279, - MULTICURVEM = 280, - MULTISURFACEM = 281, - SRID = 282, - EMPTY = 283, - VALUE = 284, - LPAREN = 285, - RPAREN = 286, - COMMA = 287, - EQUALS = 288, - SEMICOLON = 289, - WKB = 290 -}; -#endif -/* Tokens. */ -#define POINT 258 -#define LINESTRING 259 -#define POLYGON 260 -#define MULTIPOINT 261 -#define MULTILINESTRING 262 -#define MULTIPOLYGON 263 -#define GEOMETRYCOLLECTION 264 -#define CIRCULARSTRING 265 -#define COMPOUNDCURVE 266 -#define CURVEPOLYGON 267 -#define MULTICURVE 268 -#define MULTISURFACE 269 -#define POINTM 270 -#define LINESTRINGM 271 -#define POLYGONM 272 -#define MULTIPOINTM 273 -#define MULTILINESTRINGM 274 -#define MULTIPOLYGONM 275 -#define GEOMETRYCOLLECTIONM 276 -#define CIRCULARSTRINGM 277 -#define COMPOUNDCURVEM 278 -#define CURVEPOLYGONM 279 -#define MULTICURVEM 280 -#define MULTISURFACEM 281 -#define SRID 282 -#define EMPTY 283 -#define VALUE 284 -#define LPAREN 285 -#define RPAREN 286 -#define COMMA 287 -#define EQUALS 288 -#define SEMICOLON 289 -#define WKB 290 - - - - -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE -#line 22 "wktparse.y" -{ - double value; - const char* wkb; -} -/* Line 1489 of yacc.c. */ -#line 124 "y.tab.h" -YYSTYPE; -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 -#endif - -extern YYSTYPE lwg_parse_yylval; - -#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED -typedef struct YYLTYPE -{ - int first_line; - int first_column; - int last_line; - int last_column; -} -YYLTYPE; -# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ -# define YYLTYPE_IS_DECLARED 1 -# define YYLTYPE_IS_TRIVIAL 1 -#endif - -extern YYLTYPE lwg_parse_yylloc; diff -Nru postgis-1.5.3/liblwgeom/wktparse.y postgis-2.0.1/liblwgeom/wktparse.y --- postgis-1.5.3/liblwgeom/wktparse.y 2009-03-10 00:29:32.000000000 +0000 +++ postgis-2.0.1/liblwgeom/wktparse.y 1970-01-01 00:00:00.000000000 +0000 @@ -1,416 +0,0 @@ -/* - * Written by Ralph Mason ralph.masontelogis.com - * - * Copyright Telogis 2004 - * www.telogis.com - * - */ - -%{ -#include "wktparse.h" -#include -#include - -void set_zm(char z, char m); -int lwg_parse_yylex(void); -%} - -%start geometry - -%locations - -%union { - double value; - const char* wkb; -} - -%token POINT LINESTRING POLYGON MULTIPOINT MULTILINESTRING MULTIPOLYGON GEOMETRYCOLLECTION CIRCULARSTRING COMPOUNDCURVE CURVEPOLYGON MULTICURVE MULTISURFACE -%token POINTM LINESTRINGM POLYGONM MULTIPOINTM MULTILINESTRINGM MULTIPOLYGONM GEOMETRYCOLLECTIONM CIRCULARSTRINGM COMPOUNDCURVEM CURVEPOLYGONM MULTICURVEM MULTISURFACEM -%token SRID -%token EMPTY -%token VALUE -%token LPAREN RPAREN COMMA EQUALS SEMICOLON -%token WKB - -%% - -geometry : - srid SEMICOLON { alloc_lwgeom(srid); } geometry_int - | - { alloc_lwgeom(-1); } geometry_int - -geometry_int : - geom_wkb - | - geom_point - | - geom_linestring - | - geom_circularstring - | - geom_polygon - | - geom_compoundcurve - | - geom_curvepolygon - | - geom_multipoint - | - geom_multilinestring - | - geom_multicurve - | - geom_multipolygon - | - geom_multisurface - | - geom_geometrycollection - -srid : - SRID EQUALS VALUE { set_srid($3); } - -geom_wkb : - WKB { alloc_wkb($1); } - - -/* POINT */ - -geom_point : - POINT point - | - POINTM { set_zm(0, 1); } point - -point : - empty_point - | - nonempty_point - -empty_point : - { alloc_point(); } empty { pop(); } - -nonempty_point : - { alloc_point(); } point_int { pop(); } - -point_int : - LPAREN a_point RPAREN - -/* MULTIPOINT */ - -geom_multipoint : - MULTIPOINT { alloc_multipoint(); } multipoint { pop(); } - | - MULTIPOINTM { set_zm(0, 1); alloc_multipoint(); } multipoint {pop(); } - -multipoint : - empty - | - { alloc_counter(); } LPAREN multipoint_int RPAREN { pop(); } - -multipoint_int : - mpoint_element - | - multipoint_int COMMA mpoint_element - -mpoint_element : - nonempty_point - | - /* this is to allow MULTIPOINT(0 0, 1 1) */ - { alloc_point(); } a_point { pop(); } - - -/* LINESTRING */ - -geom_linestring : - LINESTRING linestring - | - LINESTRINGM { set_zm(0, 1); } linestring - -linestring : - empty_linestring - | - nonempty_linestring - -empty_linestring : - { alloc_linestring(); } empty { pop(); } - -nonempty_linestring : - { alloc_linestring(); } linestring_1 { check_linestring(); pop(); } - -nonempty_linestring_closed : - { alloc_linestring_closed(); } linestring_1 { check_closed_linestring(); pop(); } - -linestring_1 : - { alloc_counter(); } LPAREN linestring_int RPAREN { pop(); } - -linestring_int : - a_point - | - linestring_int COMMA a_point; - -/* CIRCULARSTRING */ - -geom_circularstring : - CIRCULARSTRING circularstring - | - CIRCULARSTRINGM {set_zm(0, 1); } circularstring - -geom_circularstring_closed : - CIRCULARSTRING circularstring_closed - | - CIRCULARSTRINGM {set_zm(0, 1); } circularstring_closed - -circularstring : - empty_circularstring - | - nonempty_circularstring - -circularstring_closed : - empty_circularstring - | - nonempty_circularstring_closed - -empty_circularstring : - { alloc_circularstring(); } empty { pop(); } - -nonempty_circularstring : - { alloc_circularstring(); } circularstring_1 { check_circularstring(); pop(); } - -nonempty_circularstring_closed : - { alloc_circularstring_closed(); } circularstring_1 { check_closed_circularstring(); pop(); } - -circularstring_1 : - { alloc_counter(); } LPAREN circularstring_int RPAREN { pop(); } - -circularstring_int : - a_point - | - circularstring_int COMMA a_point; - -/* COMPOUNDCURVE */ - -geom_compoundcurve: - COMPOUNDCURVE compoundcurve - | - COMPOUNDCURVEM { set_zm(0, 1); } compoundcurve - -geom_compoundcurve_closed: - COMPOUNDCURVE compoundcurve_closed - | - COMPOUNDCURVEM { set_zm(0, 1); } compoundcurve_closed - -compoundcurve: - empty_compoundcurve - | - nonempty_compoundcurve - -compoundcurve_closed: - empty_compoundcurve_closed - | - nonempty_compoundcurve_closed - -empty_compoundcurve: - { alloc_compoundcurve(); } empty { pop(); } - -empty_compoundcurve_closed: - { alloc_compoundcurve_closed(); } empty { pop(); } - -nonempty_compoundcurve: - { alloc_compoundcurve(); } compoundcurve_1 { check_compoundcurve(); pop(); } - -nonempty_compoundcurve_closed: - { alloc_compoundcurve_closed(); } compoundcurve_1 { check_closed_compoundcurve(); pop(); } - -compoundcurve_1: - { alloc_counter(); } LPAREN compoundcurve_int RPAREN {pop();} - -compoundcurve_int: - nonempty_linestring - | - geom_circularstring - | - compoundcurve_int COMMA nonempty_linestring - | - compoundcurve_int COMMA geom_circularstring - -/* MULTILINESTRING */ - -geom_multilinestring : - MULTILINESTRING { alloc_multilinestring(); } - multilinestring { pop(); } - | - MULTILINESTRINGM { set_zm(0, 1); alloc_multilinestring(); } - multilinestring { pop(); } - -multilinestring : - empty - | - { alloc_counter(); } LPAREN multilinestring_int RPAREN{ pop();} - -multilinestring_int : - nonempty_linestring - | - multilinestring_int COMMA nonempty_linestring - -/* MULTICURVESTRING */ - -geom_multicurve : - MULTICURVE { alloc_multicurve(); } - multicurve { pop(); } - | - MULTICURVEM { set_zm(0, 1); alloc_multicurve(); } - multicurve { pop(); } - -multicurve : - empty - | - { alloc_counter(); } LPAREN multicurve_int RPAREN { pop(); } - -multicurve_int : - nonempty_linestring - | - geom_circularstring - | - multicurve_int COMMA nonempty_linestring - | - multicurve_int COMMA geom_circularstring - -/* POLYGON */ - -geom_polygon : - POLYGON polygon - | - POLYGONM { set_zm(0, 1); } polygon - -polygon : - empty_polygon - | - nonempty_polygon - -empty_polygon : - { alloc_polygon(); } empty { pop(); } - -nonempty_polygon : - { alloc_polygon(); } polygon_1 { check_polygon(); pop(); } - -polygon_1 : - { alloc_counter(); } LPAREN polygon_int RPAREN { pop();} - -polygon_int : - /* nonempty_linestring_closed */ - linestring_1 - | - /* polygon_int COMMA nonempty_linestring_closed */ - polygon_int COMMA linestring_1 - -/* CURVEPOLYGON */ - -geom_curvepolygon : - CURVEPOLYGON { alloc_curvepolygon(); } curvepolygon { check_curvepolygon(); pop(); } - | - CURVEPOLYGONM { set_zm(0, 1); alloc_curvepolygon(); } - curvepolygon { check_curvepolygon(); pop(); } - -curvepolygon : - empty - | - { alloc_counter(); } LPAREN curvepolygon_int RPAREN { pop(); } - -curvepolygon_int : - nonempty_linestring_closed - | - geom_circularstring_closed - | - geom_compoundcurve_closed - | - curvepolygon_int COMMA nonempty_linestring_closed - | - curvepolygon_int COMMA geom_circularstring_closed - | - curvepolygon_int COMMA geom_compoundcurve_closed - -/* MULTIPOLYGON */ - -geom_multipolygon : - MULTIPOLYGON { alloc_multipolygon(); } multipolygon { pop(); } - | - MULTIPOLYGONM { set_zm(0, 1); alloc_multipolygon(); } - multipolygon { pop();} - -multipolygon : - empty - | - { alloc_counter(); } LPAREN multipolygon_int RPAREN { pop(); } - -multipolygon_int : - nonempty_polygon - | - multipolygon_int COMMA nonempty_polygon - -/* MULTISURFACE */ - -geom_multisurface : - MULTISURFACE {alloc_multisurface(); } multisurface { pop(); } - | - MULTISURFACEM { set_zm(0, 1); alloc_multisurface(); } - multisurface { pop(); } - -multisurface : - empty - | - { alloc_counter(); } LPAREN multisurface_int RPAREN { pop(); } - -multisurface_int : - nonempty_polygon - | - geom_curvepolygon - | - multisurface_int COMMA nonempty_polygon - | - multisurface_int COMMA geom_curvepolygon - -/* GEOMETRYCOLLECTION */ - -geom_geometrycollection : - GEOMETRYCOLLECTION { alloc_geomertycollection(); } - geometrycollection { pop(); } - | - GEOMETRYCOLLECTIONM { set_zm(0, 1); alloc_geomertycollection(); } - geometrycollection { pop();} - -geometrycollection : - empty - | - { alloc_counter(); } LPAREN geometrycollection_int RPAREN { pop(); } - -geometrycollection_int : - /* to support GEOMETRYCOLLECTION(EMPTY) for backward compatibility */ - empty - | - geometry_int - | - geometrycollection_int COMMA geometry_int - - -a_point : - point_2d - | - point_3d - | - point_4d - -point_2d : - VALUE VALUE {alloc_point_2d($1,$2); } - -point_3d : - VALUE VALUE VALUE {alloc_point_3d($1,$2,$3); } - -point_4d : - VALUE VALUE VALUE VALUE {alloc_point_4d($1,$2,$3,$4); } - -empty : - EMPTY { alloc_empty(); } -%% - - - - diff -Nru postgis-1.5.3/libpgcommon/Makefile.in postgis-2.0.1/libpgcommon/Makefile.in --- postgis-1.5.3/libpgcommon/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/libpgcommon/Makefile.in 2012-03-21 21:36:59.000000000 +0000 @@ -0,0 +1,63 @@ +# ********************************************************************** +# * $Id: Makefile.in +# * +# * PostGIS - Spatial Types for PostgreSQL +# * http://postgis.refractions.net +# * Copyright 2008 Mark Cave-Ayland +# * +# * This is free software; you can redistribute and/or modify it under +# * the terms of the GNU General Public Licence. See the COPYING file. +# * +# ********************************************************************** + +CC=@CC@ +CFLAGS=@CFLAGS@ -I../liblwgeom @PGSQL_BE_CPPFLAGS@ @PROJ_CPPFLAGS@ @PICFLAGS@ @WARNFLAGS@ @GETTEXT_CFLAGS@ +LDFLAGS=@GETTEXT_LDFLAGS@ @LIBINTL@ + +NUMERICFLAGS=@NUMERICFLAGS@ + +YACC=@YACC@ +LEX=@LEX@ + +# Standalone COMMON objects +SA_OBJS = \ + gserialized_gist.o \ + lwgeom_transform.o \ + lwgeom_pg.o + + +SA_HEADERS = \ + lwgeom_pg.h \ + lwgeom_transform.h \ + gserialized_gist.h \ + pgsql_compat.h + +all: libpgcommon.a + +# nothing to install or uninstall +install uninstall: + +libpgcommon.a: $(SA_OBJS) $(SA_HEADERS) + ar rs libpgcommon.a $(SA_OBJS) + +maintainer-clean: clean + +clean: + $(MAKE) -C cunit clean + rm -f $(SA_OBJS) + rm -f $(NM_OBJS) + rm -f libpgcommon.a + +distclean: clean + $(MAKE) -C cunit distclean + rm -f Makefile + +check: libpgcommon.a + $(MAKE) -C cunit check + +# Command to build each of the .o files +$(SA_OBJS): %.o: %.c + $(CC) $(CFLAGS) -c -o $@ $< + +$(SA_OBJS): ../postgis_config.h + diff -Nru postgis-1.5.3/libpgcommon/common.h postgis-2.0.1/libpgcommon/common.h --- postgis-1.5.3/libpgcommon/common.h 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/libpgcommon/common.h 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,20 @@ +/********************************************************************** + * $Id: common.h 9324 2012-02-27 22:08:12Z pramsey $ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * Copyright 2011 OSGeo + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#ifndef PG_LIBCOMMON_H +#define PG_LIBCOMMON_H + +#include "pgsql_compat.h" +#include "lwgeom_pg.h" +#include "lwgeom_transform.h" + +#endif /* PG_LIBCOMMON_H */ diff -Nru postgis-1.5.3/libpgcommon/cunit/Makefile.in postgis-2.0.1/libpgcommon/cunit/Makefile.in --- postgis-1.5.3/libpgcommon/cunit/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/libpgcommon/cunit/Makefile.in 2012-03-21 21:36:59.000000000 +0000 @@ -0,0 +1,16 @@ +# ********************************************************************** +# * $Id: Makefile.in +# * +# * PostGIS - Spatial Types for PostgreSQL +# * http://postgis.refractions.net +# * Copyright 2008 Mark Cave-Ayland +# * +# * This is free software; you can redistribute and/or modify it under +# * the terms of the GNU General Public Licence. See the COPYING file. +# * +# ********************************************************************** + +all check clean : + +distclean: clean + rm -f Makefile diff -Nru postgis-1.5.3/libpgcommon/gserialized_gist.c postgis-2.0.1/libpgcommon/gserialized_gist.c --- postgis-1.5.3/libpgcommon/gserialized_gist.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/libpgcommon/gserialized_gist.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,360 @@ +/********************************************************************** + * $Id$ + * + * PostGIS - Spatial Types for PostgreSQL + * Copyright 2009 Paul Ramsey + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + + +#include "postgres.h" +#include "access/gist.h" /* For GiST */ +#include "access/itup.h" +#include "access/skey.h" + +#include "../postgis_config.h" + +#include "liblwgeom.h" /* For standard geometry types. */ +#include "lwgeom_pg.h" /* For debugging macros. */ +#include "gserialized_gist.h" + + +/* Generate human readable form for GIDX. */ +#if POSTGIS_DEBUG_LEVEL > 0 +char* gidx_to_string(GIDX *a) +{ + char *str, *rv; + int i, ndims; + + if ( a == NULL ) + return pstrdup(""); + + str = (char*)palloc(128); + rv = str; + ndims = GIDX_NDIMS(a); + + str += sprintf(str, "GIDX("); + for ( i = 0; i < ndims; i++ ) + str += sprintf(str, " %.12g", GIDX_GET_MIN(a,i)); + str += sprintf(str, ","); + for ( i = 0; i < ndims; i++ ) + str += sprintf(str, " %.12g", GIDX_GET_MAX(a,i)); + str += sprintf(str, " )"); + + return rv; +} +#endif + + +/** +* Given a #GSERIALIZED datum, as quickly as possible (peaking into the top +* of the memory) return the gbox extents. Does not deserialize the geometry, +* but WARNING returns a slightly larger bounding box than actually +* encompasses the objects. For geography objects returns geocentric bounding +* box, for geometry objects returns cartesian bounding box. +*/ +int +gserialized_datum_get_gbox_p(Datum gsdatum, GBOX *gbox) +{ + char gboxmem[GIDX_MAX_SIZE]; + GIDX *gidx = (GIDX*)gboxmem; + + if( LW_FAILURE == gserialized_datum_get_gidx_p(gsdatum, gidx) ) + return LW_FAILURE; + + gbox_from_gidx(gidx, gbox); + return LW_SUCCESS; +} + + +/** +* Update the bounding box of a #GSERIALIZED, allocating a fresh one +* if there is not enough space to just write the new box in. +* WARNING if a new object needs to be created, the +* input pointer will have to be freed by the caller! Check +* to see if input == output. Returns null if there's a problem +* like mismatched dimensions. +*/ +GSERIALIZED* gserialized_set_gidx(GSERIALIZED *g, GIDX *gidx) +{ + int g_ndims = (FLAGS_GET_GEODETIC(g->flags) ? 3 : FLAGS_NDIMS(g->flags)); + int box_ndims = GIDX_NDIMS(gidx); + GSERIALIZED *g_out = NULL; + size_t box_size = 2 * g_ndims * sizeof(float); + + /* The dimensionality of the inputs has to match or we are SOL. */ + if ( g_ndims != box_ndims ) + { + return NULL; + } + + /* Serialized already has room for a box. */ + if ( FLAGS_GET_BBOX(g->flags) ) + { + g_out = g; + } + /* Serialized has no box. We need to allocate enough space for the old + data plus the box, and leave a gap in the memory segment to write + the new values into. + */ + else + { + size_t varsize_new = VARSIZE(g) + box_size; + uint8_t *ptr; + g_out = palloc(varsize_new); + /* Copy the head of g into place */ + memcpy(g_out, g, 8); + /* Copy the body of g into place after leaving space for the box */ + ptr = g_out->data; + ptr += box_size; + memcpy(ptr, g->data, VARSIZE(g) - 8); + FLAGS_SET_BBOX(g_out->flags, 1); + SET_VARSIZE(g_out, varsize_new); + } + + /* Now write the gidx values into the memory segement */ + memcpy(g_out->data, gidx->c, box_size); + + return g_out; +} + + +/** +* Remove the bounding box from a #GSERIALIZED. Returns a freshly +* allocated #GSERIALIZED every time. +*/ +GSERIALIZED* gserialized_drop_gidx(GSERIALIZED *g) +{ + int g_ndims = (FLAGS_GET_GEODETIC(g->flags) ? 3 : FLAGS_NDIMS(g->flags)); + size_t box_size = 2 * g_ndims * sizeof(float); + size_t g_out_size = VARSIZE(g) - box_size; + GSERIALIZED *g_out = palloc(g_out_size); + + /* Copy the contents while omitting the box */ + if ( FLAGS_GET_BBOX(g->flags) ) + { + uint8_t *outptr = (uint8_t*)g_out; + uint8_t *inptr = (uint8_t*)g; + /* Copy the header (size+type) of g into place */ + memcpy(outptr, inptr, 8); + outptr += 8; + inptr += 8 + box_size; + /* Copy parts after the box into place */ + memcpy(outptr, inptr, g_out_size - 8); + FLAGS_SET_BBOX(g_out->flags, 0); + SET_VARSIZE(g_out, g_out_size); + } + /* No box? Nothing to do but copy and return. */ + else + { + memcpy(g_out, g, g_out_size); + } + + return g_out; +} + + +/* Convert a double-based GBOX into a float-based GIDX, + ensuring the float box is larger than the double box */ +static int gidx_from_gbox_p(GBOX box, GIDX *a) +{ + int ndims; + + ndims = (FLAGS_GET_GEODETIC(box.flags) ? 3 : FLAGS_NDIMS(box.flags)); + SET_VARSIZE(a, VARHDRSZ + ndims * 2 * sizeof(float)); + + GIDX_SET_MIN(a,0,next_float_down(box.xmin)); + GIDX_SET_MAX(a,0,next_float_up(box.xmax)); + GIDX_SET_MIN(a,1,next_float_down(box.ymin)); + GIDX_SET_MAX(a,1,next_float_up(box.ymax)); + + /* Geodetic indexes are always 3d, geocentric x/y/z */ + if ( FLAGS_GET_GEODETIC(box.flags) ) + { + GIDX_SET_MIN(a,2,next_float_down(box.zmin)); + GIDX_SET_MAX(a,2,next_float_up(box.zmax)); + } + else + { + /* Cartesian with Z implies Z is third dimension */ + if ( FLAGS_GET_Z(box.flags) ) + { + GIDX_SET_MIN(a,2,next_float_down(box.zmin)); + GIDX_SET_MAX(a,2,next_float_up(box.zmax)); + if ( FLAGS_GET_M(box.flags) ) + { + GIDX_SET_MIN(a,3,next_float_down(box.mmin)); + GIDX_SET_MAX(a,3,next_float_up(box.mmax)); + } + } + /* Unless there's no Z, in which case M is third dimension */ + else if ( FLAGS_GET_M(box.flags) ) + { + GIDX_SET_MIN(a,2,next_float_down(box.mmin)); + GIDX_SET_MAX(a,2,next_float_up(box.mmax)); + } + } + + POSTGIS_DEBUGF(5, "converted %s to %s", gbox_to_string(&box), gidx_to_string(a)); + + return LW_SUCCESS; +} + + +GIDX* gidx_from_gbox(GBOX box) +{ + int ndims; + GIDX *a; + + ndims = (FLAGS_GET_GEODETIC(box.flags) ? 3 : FLAGS_NDIMS(box.flags)); + a = gidx_new(ndims); + gidx_from_gbox_p(box, a); + return a; +} + + +void gbox_from_gidx(GIDX *a, GBOX *gbox) +{ + gbox->xmin = (double)GIDX_GET_MIN(a,0); + gbox->ymin = (double)GIDX_GET_MIN(a,1); + gbox->zmin = (double)GIDX_GET_MIN(a,2); + gbox->xmax = (double)GIDX_GET_MAX(a,0); + gbox->ymax = (double)GIDX_GET_MAX(a,1); + gbox->zmax = (double)GIDX_GET_MAX(a,2); +} + +/** +* Peak into a #GSERIALIZED datum to find the bounding box. If the +* box is there, copy it out and return it. If not, calculate the box from the +* full object and return the box based on that. If no box is available, +* return #LW_FAILURE, otherwise #LW_SUCCESS. +*/ +int +gserialized_datum_get_gidx_p(Datum gsdatum, GIDX *gidx) +{ + GSERIALIZED *gpart; + int result = LW_SUCCESS; + + POSTGIS_DEBUG(4, "entered function"); + + /* + ** The most info we need is the 8 bytes of serialized header plus the 32 bytes + ** of floats necessary to hold the 8 floats of the largest XYZM index + ** bounding box, so 40 bytes. + */ + gpart = (GSERIALIZED*)PG_DETOAST_DATUM_SLICE(gsdatum, 0, 40); + + POSTGIS_DEBUGF(4, "got flags %d", gpart->flags); + + /* Do we even have a serialized bounding box? */ + if ( FLAGS_GET_BBOX(gpart->flags) ) + { + /* Yes! Copy it out into the GIDX! */ + const size_t size = gbox_serialized_size(gpart->flags); + POSTGIS_DEBUG(4, "copying box out of serialization"); + memcpy(gidx->c, gpart->data, size); + SET_VARSIZE(gidx, VARHDRSZ + size); + result = LW_SUCCESS; + } + else + { + /* No, we need to calculate it from the full object. */ + GSERIALIZED *g = (GSERIALIZED*)PG_DETOAST_DATUM(gsdatum); + LWGEOM *lwgeom = lwgeom_from_gserialized(g); + GBOX gbox; + if ( lwgeom_calculate_gbox(lwgeom, &gbox) == LW_FAILURE ) + { + POSTGIS_DEBUG(4, "could not calculate bbox, returning failure"); + lwgeom_free(lwgeom); + return LW_FAILURE; + } + lwgeom_free(lwgeom); + result = gidx_from_gbox_p(gbox, gidx); + } + + if ( result == LW_SUCCESS ) + { + POSTGIS_DEBUGF(4, "got gidx %s", gidx_to_string(gidx)); + } + + return result; +} + + +/* +** Peak into a geography to find the bounding box. If the +** box is there, copy it out and return it. If not, calculate the box from the +** full geography and return the box based on that. If no box is available, +** return LW_FAILURE, otherwise LW_SUCCESS. +*/ +int gserialized_get_gidx_p(GSERIALIZED *g, GIDX *gidx) +{ + int result = LW_SUCCESS; + + POSTGIS_DEBUG(4, "entered function"); + + POSTGIS_DEBUGF(4, "got flags %d", g->flags); + + if ( FLAGS_GET_BBOX(g->flags) ) + { + int ndims = FLAGS_NDIMS_BOX(g->flags); + const size_t size = 2 * ndims * sizeof(float); + POSTGIS_DEBUG(4, "copying box out of serialization"); + memcpy(gidx->c, g->data, size); + SET_VARSIZE(gidx, VARHDRSZ + size); + } + else + { + /* No, we need to calculate it from the full object. */ + LWGEOM *lwgeom = lwgeom_from_gserialized(g); + GBOX gbox; + if ( lwgeom_calculate_gbox(lwgeom, &gbox) == LW_FAILURE ) + { + POSTGIS_DEBUG(4, "could not calculate bbox, returning failure"); + lwgeom_free(lwgeom); + return LW_FAILURE; + } + lwgeom_free(lwgeom); + result = gidx_from_gbox_p(gbox, gidx); + } + if ( result == LW_SUCCESS ) + { + POSTGIS_DEBUGF(4, "got gidx %s", gidx_to_string(gidx)); + } + + return result; +} + + +/* +** GIDX expansion, make d units bigger in all dimensions. +*/ +void gidx_expand(GIDX *a, float d) +{ + int i; + + POSTGIS_DEBUG(5, "entered function"); + + if ( a == NULL ) return; + + for (i = 0; i < GIDX_NDIMS(a); i++) + { + GIDX_SET_MIN(a, i, GIDX_GET_MIN(a, i) - d); + GIDX_SET_MAX(a, i, GIDX_GET_MAX(a, i) + d); + } +} + + +/* Allocates a new GIDX on the heap of the requested dimensionality */ +GIDX* gidx_new(int ndims) +{ + size_t size = GIDX_SIZE(ndims); + GIDX *g = (GIDX*)palloc(size); + POSTGIS_DEBUGF(5,"created new gidx of %d dimensions, size %d", ndims, (int)size); + SET_VARSIZE(g, size); + return g; +} + diff -Nru postgis-1.5.3/libpgcommon/gserialized_gist.h postgis-2.0.1/libpgcommon/gserialized_gist.h --- postgis-1.5.3/libpgcommon/gserialized_gist.h 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/libpgcommon/gserialized_gist.h 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,103 @@ + +/********************************************************************** +** GIDX structure. +** +** This is an n-dimensional (practically, the +** implementation is 2-4 dimensions) box used for index keys. The +** coordinates are anonymous, so we can have any number of dimensions. +** The sizeof a GIDX is 1 + 2 * ndims * sizeof(float). +** The order of values in a GIDX is +** xmin,xmax,ymin,ymax,zmin,zmax... +*/ +typedef struct +{ + int32 varsize; + float c[1]; +} GIDX; + +/* +** For some GiST support functions, it is more efficient to allocate +** memory for our GIDX off the stack and cast that memory into a GIDX. +** But, GIDX is variable length, what to do? We'll bake in the assumption +** that no GIDX is more than 4-dimensional for now, and ensure that much +** space is available. +** 4 bytes varsize + 4 dimensions * 2 ordinates * 4 bytes float size = 36 bytes +*/ +#define GIDX_MAX_SIZE 36 + + +/********************************************************************** +** BOX2DF structure. +** +** This is a 2-dimensional key for simple cartesian indexes, +** with backwards compatible behavior to previous indexes in +** PostGIS +*/ + +typedef struct +{ + float xmin, xmax, ymin, ymax; +} BOX2DF; + + +/********************************************************************************* +** GIDX support functions. +** +** We put the GIDX support here rather than libgeom because it is a specialized +** type only used for indexing purposes. It also makes use of some PgSQL +** infrastructure like the VARSIZE() macros. +*/ + +/* allocate a new gidx object on the heap */ +GIDX* gidx_new(int ndims) ; + +/* Convert a gidx to a gbox */ +void gbox_from_gidx(GIDX *gidx, GBOX *gbox); +/* Convert a gbox to a new gidx */ +GIDX* gidx_from_gbox(GBOX box); +/* Increase the size of a GIDX */ +void gidx_expand(GIDX *a, float d); + + +/* Generate human readable form for GIDX. */ +#if POSTGIS_DEBUG_LEVEL > 0 +char* gidx_to_string(GIDX *a) ; +#endif + + +/* Returns number of dimensions for this GIDX */ +#define GIDX_NDIMS(gidx) ((VARSIZE((gidx)) - VARHDRSZ) / (2 * sizeof(float))) +/* Minimum accessor. */ +#define GIDX_GET_MIN(gidx, dimension) ((gidx)->c[2*(dimension)]) +/* Maximum accessor. */ +#define GIDX_GET_MAX(gidx, dimension) ((gidx)->c[2*(dimension)+1]) +/* Minimum setter. */ +#define GIDX_SET_MIN(gidx, dimension, value) ((gidx)->c[2*(dimension)] = (value)) +/* Maximum setter. */ +#define GIDX_SET_MAX(gidx, dimension, value) ((gidx)->c[2*(dimension)+1] = (value)) +/* Returns the size required to store a GIDX of requested dimension */ +#define GIDX_SIZE(dimensions) (sizeof(int32) + 2*(dimensions)*sizeof(float)) + +/********************************************************************************* +** GSERIALIZED support functions. +** +** Fast functions for pulling boxes out of serializations. +*/ + +/* Pull out the #GIDX bounding box with a absolute minimum system overhead */ +int gserialized_datum_get_gidx_p(Datum gserialized_datum, GIDX *gidx); + +/* Pull out the gidx bounding box from an already de-toasted geography */ +int gserialized_get_gidx_p(GSERIALIZED *g, GIDX *gidx); +/* Copy a new bounding box into an existing gserialized */ +GSERIALIZED* gserialized_set_gidx(GSERIALIZED *g, GIDX *gidx); + +/* Pull out a gbox bounding box as fast as possible. */ +int gserialized_datum_get_gbox_p(Datum gsdatum, GBOX *gbox); +/* Given two datums, do they overlap? Computed very fast using embedded boxes. */ +/* int gserialized_datum_overlaps(Datum gs1, Datum gs2); */ +/* Remove the box from a disk serialization */ +GSERIALIZED* gserialized_drop_gidx(GSERIALIZED *g); + + + diff -Nru postgis-1.5.3/libpgcommon/lwgeom_pg.c postgis-2.0.1/libpgcommon/lwgeom_pg.c --- postgis-1.5.3/libpgcommon/lwgeom_pg.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/libpgcommon/lwgeom_pg.c 2012-05-04 11:21:18.000000000 +0000 @@ -0,0 +1,236 @@ +/********************************************************************** + * + * PostGIS - Spatial Types for PostgreSQL + * + * http://postgis.refractions.net + * + * Copyright (C) 2011 Sandro Santilli + * Copyright (C) 2009-2011 Paul Ramsey + * Copyright (C) 2008 Mark Cave-Ayland + * Copyright (C) 2004-2007 Refractions Research Inc. + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include +#include +#include +#include + +#include "../postgis_config.h" +#include "liblwgeom.h" +#include "lwgeom_pg.h" + +#include +#include +#include + +#define PARANOIA_LEVEL 1 + +/* + * For win32, this can not be in a separate libary + * See ticket #1158 + */ +/* PG_MODULE_MAGIC; */ + +/** +* Utility to convert cstrings to textp pointers +*/ +text* +cstring2text(const char *cstring) +{ + text *output; + size_t sz; + + /* Guard against null input */ + if( !cstring ) + return NULL; + + sz = strlen(cstring); + output = palloc(sz + VARHDRSZ); + if ( ! output ) + return NULL; + SET_VARSIZE(output, sz + VARHDRSZ); + if ( sz ) + memcpy(VARDATA(output),cstring,sz); + return output; +} + +char* +text2cstring(const text *textptr) +{ + size_t size = VARSIZE(textptr) - VARHDRSZ; + char *str = lwalloc(size+1); + memcpy(str, VARDATA(textptr), size); + str[size]='\0'; + return str; +} + + +/* + * Error message parsing functions + * + * Produces nicely formatted messages for parser/unparser errors with optional HINT + */ + +void +pg_parser_errhint(LWGEOM_PARSER_RESULT *lwg_parser_result) +{ + char *hintbuffer; + + /* Only display the parser position if the location is > 0; this provides a nicer output when the first token + within the input stream cannot be matched */ + if (lwg_parser_result->errlocation > 0) + { + /* Return a copy of the input string start truncated + * at the error location */ + hintbuffer = lwmessage_truncate( + (char *)lwg_parser_result->wkinput, 0, + lwg_parser_result->errlocation - 1, 40, 0); + + ereport(ERROR, + (errmsg("%s", lwg_parser_result->message), + errhint("\"%s\" <-- parse error at position %d within geometry", hintbuffer, lwg_parser_result->errlocation)) + ); + } + else + { + ereport(ERROR, + (errmsg("%s", lwg_parser_result->message), + errhint("You must specify a valid OGC WKT geometry type such as POINT, LINESTRING or POLYGON")) + ); + } +} + +void +pg_unparser_errhint(LWGEOM_UNPARSER_RESULT *lwg_unparser_result) +{ + /* For the unparser simply output the error message without any associated HINT */ + elog(ERROR, "%s", lwg_unparser_result->message); +} + + +void * +pg_alloc(size_t size) +{ + void * result; + + CHECK_FOR_INTERRUPTS(); /* give interrupter a chance */ + + POSTGIS_DEBUGF(5, " pg_alloc(%d) called", (int)size); + + result = palloc(size); + + POSTGIS_DEBUGF(5, " pg_alloc(%d) returning %p", (int)size, result); + + if ( ! result ) + { + ereport(ERROR, (errmsg_internal("Out of virtual memory"))); + return NULL; + } + return result; +} + +void * +pg_realloc(void *mem, size_t size) +{ + void * result; + + CHECK_FOR_INTERRUPTS(); /* give interrupter a chance */ + + POSTGIS_DEBUGF(5, " pg_realloc(%p, %d) called", mem, (int)size); + + result = repalloc(mem, size); + + POSTGIS_DEBUGF(5, " pg_realloc(%p, %d) returning %p", mem, (int)size, result); + + return result; +} + +void +pg_free(void *ptr) +{ + pfree(ptr); +} + +void +pg_error(const char *fmt, va_list ap) +{ +#define ERRMSG_MAXLEN 256 + + char errmsg[ERRMSG_MAXLEN+1]; + + vsnprintf (errmsg, ERRMSG_MAXLEN, fmt, ap); + + errmsg[ERRMSG_MAXLEN]='\0'; + ereport(ERROR, (errmsg_internal("%s", errmsg))); +} + +void +pg_notice(const char *fmt, va_list ap) +{ + char *msg; + + /* + * This is a GNU extension. + * Dunno how to handle errors here. + */ + if (!lw_vasprintf (&msg, fmt, ap)) + { + va_end (ap); + return; + } + ereport(NOTICE, (errmsg_internal("%s", msg))); + free(msg); +} + +void +lwgeom_init_allocators(void) +{ + /* liblwgeom callback - install PostgreSQL handlers */ + lwalloc_var = pg_alloc; + lwrealloc_var = pg_realloc; + lwfree_var = pg_free; + lwerror_var = pg_error; + lwnotice_var = pg_notice; +} + +/** +* Utility method to call the serialization and then set the +* PgSQL varsize header appropriately with the serialized size. +*/ + +/** +* Utility method to call the serialization and then set the +* PgSQL varsize header appropriately with the serialized size. +*/ +GSERIALIZED* geography_serialize(LWGEOM *lwgeom) +{ + static int is_geodetic = 1; + size_t ret_size = 0; + GSERIALIZED *g = NULL; + + g = gserialized_from_lwgeom(lwgeom, is_geodetic, &ret_size); + if ( ! g ) lwerror("Unable to serialize lwgeom."); + SET_VARSIZE(g, ret_size); + return g; +} + + +/** +* Utility method to call the serialization and then set the +* PgSQL varsize header appropriately with the serialized size. +*/ +GSERIALIZED* geometry_serialize(LWGEOM *lwgeom) +{ + static int is_geodetic = 0; + size_t ret_size = 0; + GSERIALIZED *g = NULL; + + g = gserialized_from_lwgeom(lwgeom, is_geodetic, &ret_size); + if ( ! g ) lwerror("Unable to serialize lwgeom."); + SET_VARSIZE(g, ret_size); + return g; +} diff -Nru postgis-1.5.3/libpgcommon/lwgeom_pg.h postgis-2.0.1/libpgcommon/lwgeom_pg.h --- postgis-1.5.3/libpgcommon/lwgeom_pg.h 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/libpgcommon/lwgeom_pg.h 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,157 @@ +/********************************************************************** + * + * PostGIS - Spatial Types for PostgreSQL + * + * Copyright (C) 2011 Sandro Santilli + * Copyright (C) 2009-2011 Paul Ramsey + * Copyright (C) 2008 Mark Cave-Ayland + * Copyright (C) 2004-2007 Refractions Research Inc. + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#ifndef _LWGEOM_PG_H +#define _LWGEOM_PG_H 1 + +#include "postgres.h" +#include "utils/geo_decls.h" +#include "fmgr.h" + +#include "liblwgeom.h" +#include "pgsql_compat.h" + +void *pg_alloc(size_t size); +void *pg_realloc(void *ptr, size_t size); +void pg_free(void *ptr); +void pg_error(const char *msg, va_list vp); +void pg_notice(const char *msg, va_list vp); + + +/* Debugging macros */ +#if POSTGIS_DEBUG_LEVEL > 0 + +/* Display a simple message at NOTICE level */ +#define POSTGIS_DEBUG(level, msg) \ + do { \ + if (POSTGIS_DEBUG_LEVEL >= level) \ + ereport(NOTICE, (errmsg_internal("[%s:%s:%d] " msg, __FILE__, __func__, __LINE__))); \ + } while (0); + +/* Display a formatted message at NOTICE level (like printf, with variadic arguments) */ +#define POSTGIS_DEBUGF(level, msg, ...) \ + do { \ + if (POSTGIS_DEBUG_LEVEL >= level) \ + ereport(NOTICE, (errmsg_internal("[%s:%s:%d] " msg, __FILE__, __func__, __LINE__, __VA_ARGS__))); \ + } while (0); + +#else + +/* Empty prototype that can be optimised away by the compiler for non-debug builds */ +#define POSTGIS_DEBUG(level, msg) \ + ((void) 0) + +/* Empty prototype that can be optimised away by the compiler for non-debug builds */ +#define POSTGIS_DEBUGF(level, msg, ...) \ + ((void) 0) + +#endif + + +/* + * Standard macro for reporting parser errors to PostgreSQL + */ + +extern void pg_parser_errhint(LWGEOM_PARSER_RESULT *lwg_parser_result); +extern void pg_unparser_errhint(LWGEOM_UNPARSER_RESULT *lwg_unparser_result); + +#define PG_PARSER_ERROR(lwg_parser_result) \ + do { \ + pg_parser_errhint(&lwg_parser_result); \ + } while(0); + +/* + * Standard macro for reporting unparser errors to PostgreSQL + */ +#define PG_UNPARSER_ERROR(lwg_unparser_result) \ + do { \ + pg_unparser_errhint(&lwg_unparser_result); \ + } while(0); + + +/* +** GSERIALIED prototypes used outside the index functions +*/ + +/** +* Remove the embedded bounding box +*/ +GSERIALIZED* gserialized_drop_gidx(GSERIALIZED *g); + +/** +* Utility method to call the serialization and then set the +* PgSQL varsize header appropriately with the serialized size. +*/ +GSERIALIZED *geometry_serialize(LWGEOM *lwgeom); + +/** +* Utility method to call the serialization and then set the +* PgSQL varsize header appropriately with the serialized size. +*/ +GSERIALIZED* geography_serialize(LWGEOM *lwgeom); + +/** +* Convert cstrings (null-terminated byte array) to textp pointers +* (PgSQL varlena structure with VARSIZE header). +*/ +text* cstring2text(const char *cstring); + +/** +* Convert textp (PgSQL varlena structure with VARSIZE header) to +* cstrings (null-terminated byte array). +*/ +char* text2cstring(const text *textptr); + +/* + * For PostgreSQL >= 8.5 redefine the STATRELATT macro to its + * new value of STATRELATTINH + */ +#if POSTGIS_PGSQL_VERSION >= 85 + #define STATRELATT STATRELATTINH +#endif + +/* PG-exposed */ +Datum BOX2D_same(PG_FUNCTION_ARGS); +Datum BOX2D_overlap(PG_FUNCTION_ARGS); +Datum BOX2D_overleft(PG_FUNCTION_ARGS); +Datum BOX2D_left(PG_FUNCTION_ARGS); +Datum BOX2D_right(PG_FUNCTION_ARGS); +Datum BOX2D_overright(PG_FUNCTION_ARGS); +Datum BOX2D_overbelow(PG_FUNCTION_ARGS); +Datum BOX2D_below(PG_FUNCTION_ARGS); +Datum BOX2D_above(PG_FUNCTION_ARGS); +Datum BOX2D_overabove(PG_FUNCTION_ARGS); +Datum BOX2D_contained(PG_FUNCTION_ARGS); +Datum BOX2D_contain(PG_FUNCTION_ARGS); +Datum BOX2D_intersects(PG_FUNCTION_ARGS); +Datum BOX2D_union(PG_FUNCTION_ARGS); + +Datum LWGEOM_same(PG_FUNCTION_ARGS); +Datum BOX3D_construct(PG_FUNCTION_ARGS); + +Datum LWGEOM_force_2d(PG_FUNCTION_ARGS); +Datum LWGEOM_force_3dm(PG_FUNCTION_ARGS); +Datum LWGEOM_force_3dz(PG_FUNCTION_ARGS); +Datum LWGEOM_force_4d(PG_FUNCTION_ARGS); +Datum LWGEOM_force_collection(PG_FUNCTION_ARGS); +Datum LWGEOM_force_multi(PG_FUNCTION_ARGS); + +Datum LWGEOMFromWKB(PG_FUNCTION_ARGS); +Datum WKBFromLWGEOM(PG_FUNCTION_ARGS); + +Datum LWGEOM_getBBOX(PG_FUNCTION_ARGS); +Datum LWGEOM_addBBOX(PG_FUNCTION_ARGS); +Datum LWGEOM_dropBBOX(PG_FUNCTION_ARGS); + +#endif /* !defined _LWGEOM_PG_H 1 */ diff -Nru postgis-1.5.3/libpgcommon/lwgeom_transform.c postgis-2.0.1/libpgcommon/lwgeom_transform.c --- postgis-1.5.3/libpgcommon/lwgeom_transform.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/libpgcommon/lwgeom_transform.c 2012-03-12 17:45:48.000000000 +0000 @@ -0,0 +1,762 @@ +/********************************************************************** + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * + * Copyright (C) 2001-2003 Refractions Research Inc. + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + + +/* PostgreSQL headers */ +#include "postgres.h" +#include "fmgr.h" +#include "miscadmin.h" +#include "utils/memutils.h" +#include "executor/spi.h" +#include "access/hash.h" +#include "utils/hsearch.h" + +/* PostGIS headers */ +#include "../postgis_config.h" +#include "liblwgeom.h" +#include "lwgeom_pg.h" +#include "lwgeom_transform.h" + +/* C headers */ +#include +#include +#include +#include + + +/* Expose an internal Proj function */ +int pj_transform_nodatum(projPJ srcdefn, projPJ dstdefn, long point_count, int point_offset, double *x, double *y, double *z ); + + +/* PROJ 4 lookup transaction cache methods */ +#define PROJ4_CACHE_ITEMS 8 + +/* + * PROJ 4 backend hash table initial hash size + * (since 16 is the default portal hash table size, and we would + * typically have 2 entries per portal + * then we shall use a default size of 32) + */ +#define PROJ4_BACKEND_HASH_SIZE 32 + + +/* An entry in the PROJ4 SRS cache */ +typedef struct struct_PROJ4SRSCacheItem +{ + int srid; + projPJ projection; + MemoryContext projection_mcxt; +} +PROJ4SRSCacheItem; + +/** The portal cache: it's contents and cache context + */ +typedef struct struct_PROJ4PortalCache +{ + PROJ4SRSCacheItem PROJ4SRSCache[PROJ4_CACHE_ITEMS]; + int PROJ4SRSCacheCount; + MemoryContext PROJ4SRSCacheContext; +} +PROJ4PortalCache; + +/** + * Backend projPJ hash table + * + * This hash table stores a key/value pair of MemoryContext/projPJ objects. + * Whenever we create a projPJ object using pj_init(), we create a separate + * MemoryContext as a child context of the current executor context. + * The MemoryContext/projPJ object is stored in this hash table so + * that when PROJ4SRSCacheDelete() is called during query cleanup, we can + * lookup the projPJ object based upon the MemoryContext parameter and hence + * pj_free() it. + */ +static HTAB *PJHash = NULL; + +typedef struct struct_PJHashEntry +{ + MemoryContext ProjectionContext; + projPJ projection; +} +PJHashEntry; + + +/* PJ Hash API */ +uint32 mcxt_ptr_hash(const void *key, Size keysize); + +static HTAB *CreatePJHash(void); +static void AddPJHashEntry(MemoryContext mcxt, projPJ projection); +static projPJ GetPJHashEntry(MemoryContext mcxt); +static void DeletePJHashEntry(MemoryContext mcxt); + +/* Internal Cache API */ +static PROJ4PortalCache *GetPROJ4SRSCache(FunctionCallInfo fcinfo) ; +static bool IsInPROJ4SRSCache(PROJ4PortalCache *PROJ4Cache, int srid); +static projPJ GetProjectionFromPROJ4SRSCache(PROJ4PortalCache *PROJ4Cache, int srid); +static void AddToPROJ4SRSCache(PROJ4PortalCache *PROJ4Cache, int srid, int other_srid); +static void DeleteFromPROJ4SRSCache(PROJ4PortalCache *PROJ4Cache, int srid); + +/* Search path for PROJ.4 library */ +static bool IsPROJ4LibPathSet = false; +void SetPROJ4LibPath(void); + +/* Memory context cache functions */ +static void PROJ4SRSCacheInit(MemoryContext context); +static void PROJ4SRSCacheDelete(MemoryContext context); +static void PROJ4SRSCacheReset(MemoryContext context); +static bool PROJ4SRSCacheIsEmpty(MemoryContext context); +static void PROJ4SRSCacheStats(MemoryContext context, int level); +#ifdef MEMORY_CONTEXT_CHECKING +static void PROJ4SRSCacheCheck(MemoryContext context); +#endif + + +/* Memory context definition must match the current version of PostgreSQL */ +static MemoryContextMethods PROJ4SRSCacheContextMethods = +{ + NULL, + NULL, + NULL, + PROJ4SRSCacheInit, + PROJ4SRSCacheReset, + PROJ4SRSCacheDelete, + NULL, + PROJ4SRSCacheIsEmpty, + PROJ4SRSCacheStats +#ifdef MEMORY_CONTEXT_CHECKING + ,PROJ4SRSCacheCheck +#endif +}; + + +static void +PROJ4SRSCacheInit(MemoryContext context) +{ + /* + * Do nothing as the cache is initialised when the transform() + * function is first called + */ +} + +static void +PROJ4SRSCacheDelete(MemoryContext context) +{ + projPJ projection; + + /* Lookup the projPJ pointer in the global hash table so we can free it */ + projection = GetPJHashEntry(context); + + if (!projection) + elog(ERROR, "PROJ4SRSCacheDelete: Trying to delete non-existant projection object with MemoryContext key (%p)", (void *)context); + + POSTGIS_DEBUGF(3, "deleting projection object (%p) with MemoryContext key (%p)", projection, context); + + /* Free it */ + pj_free(projection); + + /* Remove the hash entry as it is no longer needed */ + DeletePJHashEntry(context); +} + +static void +PROJ4SRSCacheReset(MemoryContext context) +{ + /* + * Do nothing, but we must supply a function since this call is mandatory according to tgl + * (see postgis-devel archives July 2007) + */ +} + +static bool +PROJ4SRSCacheIsEmpty(MemoryContext context) +{ + /* + * Always return false since this call is mandatory according to tgl + * (see postgis-devel archives July 2007) + */ + return FALSE; +} + +static void +PROJ4SRSCacheStats(MemoryContext context, int level) +{ + /* + * Simple stats display function - we must supply a function since this call is mandatory according to tgl + * (see postgis-devel archives July 2007) + */ + + fprintf(stderr, "%s: PROJ4 context\n", context->name); +} + +#ifdef MEMORY_CONTEXT_CHECKING +static void +PROJ4SRSCacheCheck(MemoryContext context) +{ + /* + * Do nothing - stub required for when PostgreSQL is compiled + * with MEMORY_CONTEXT_CHECKING defined + */ +} +#endif + + +/* + * PROJ4 projPJ Hash Table functions + */ + + +/** + * A version of tag_hash - we specify this here as the implementation + * has changed over the years.... + */ + +uint32 mcxt_ptr_hash(const void *key, Size keysize) +{ + uint32 hashval; + + hashval = DatumGetUInt32(hash_any(key, keysize)); + + return hashval; +} + + +static HTAB *CreatePJHash(void) +{ + HASHCTL ctl; + + ctl.keysize = sizeof(MemoryContext); + ctl.entrysize = sizeof(PJHashEntry); + ctl.hash = mcxt_ptr_hash; + + return hash_create("PostGIS PROJ4 Backend projPJ MemoryContext Hash", PROJ4_BACKEND_HASH_SIZE, &ctl, (HASH_ELEM | HASH_FUNCTION)); +} + +static void AddPJHashEntry(MemoryContext mcxt, projPJ projection) +{ + bool found; + void **key; + PJHashEntry *he; + + /* The hash key is the MemoryContext pointer */ + key = (void *)&mcxt; + + he = (PJHashEntry *) hash_search(PJHash, key, HASH_ENTER, &found); + if (!found) + { + /* Insert the entry into the new hash element */ + he->ProjectionContext = mcxt; + he->projection = projection; + } + else + { + elog(ERROR, "AddPJHashEntry: PROJ4 projection object already exists for this MemoryContext (%p)", + (void *)mcxt); + } +} + +static projPJ GetPJHashEntry(MemoryContext mcxt) +{ + void **key; + PJHashEntry *he; + + /* The hash key is the MemoryContext pointer */ + key = (void *)&mcxt; + + /* Return the projection object from the hash */ + he = (PJHashEntry *) hash_search(PJHash, key, HASH_FIND, NULL); + + return he->projection; +} + + +static void DeletePJHashEntry(MemoryContext mcxt) +{ + void **key; + PJHashEntry *he; + + /* The hash key is the MemoryContext pointer */ + key = (void *)&mcxt; + + /* Delete the projection object from the hash */ + he = (PJHashEntry *) hash_search(PJHash, key, HASH_REMOVE, NULL); + + he->projection = NULL; + + if (!he) + elog(ERROR, "DeletePJHashEntry: There was an error removing the PROJ4 projection object from this MemoryContext (%p)", (void *)mcxt); +} + +bool +IsInPROJ4Cache(Proj4Cache PROJ4Cache, int srid) { + return IsInPROJ4SRSCache((PROJ4PortalCache *)PROJ4Cache, srid) ; +} + +/* + * Per-cache management functions + */ + +static bool +IsInPROJ4SRSCache(PROJ4PortalCache *PROJ4Cache, int srid) +{ + /* + * Return true/false depending upon whether the item + * is in the SRS cache. + */ + + int i; + + for (i = 0; i < PROJ4_CACHE_ITEMS; i++) + { + if (PROJ4Cache->PROJ4SRSCache[i].srid == srid) + return 1; + } + + /* Otherwise not found */ + return 0; +} + +projPJ GetProjectionFromPROJ4Cache(Proj4Cache cache, int srid) +{ + return GetProjectionFromPROJ4SRSCache((PROJ4PortalCache *)cache, srid) ; +} + +/** + * Return the projection object from the cache (we should + * already have checked it exists using IsInPROJ4SRSCache first) + */ +static projPJ +GetProjectionFromPROJ4SRSCache(PROJ4PortalCache *PROJ4Cache, int srid) +{ + int i; + + for (i = 0; i < PROJ4_CACHE_ITEMS; i++) + { + if (PROJ4Cache->PROJ4SRSCache[i].srid == srid) + return PROJ4Cache->PROJ4SRSCache[i].projection; + } + + return NULL; +} + +char* GetProj4StringSPI(int srid) +{ + static int maxproj4len = 512; + int spi_result; + char *proj_str = palloc(maxproj4len); + char proj4_spi_buffer[256]; + + /* Connect */ + spi_result = SPI_connect(); + if (spi_result != SPI_OK_CONNECT) + { + elog(ERROR, "GetProj4StringSPI: Could not connect to database using SPI"); + } + + /* Execute the lookup query */ + snprintf(proj4_spi_buffer, 255, "SELECT proj4text FROM spatial_ref_sys WHERE srid = %d LIMIT 1", srid); + spi_result = SPI_exec(proj4_spi_buffer, 1); + + /* Read back the PROJ4 text */ + if (spi_result == SPI_OK_SELECT && SPI_processed > 0) + { + /* Select the first (and only tuple) */ + TupleDesc tupdesc = SPI_tuptable->tupdesc; + SPITupleTable *tuptable = SPI_tuptable; + HeapTuple tuple = tuptable->vals[0]; + char *proj4text = SPI_getvalue(tuple, tupdesc, 1); + + if ( proj4text ) + { + /* Make a projection object out of it */ + strncpy(proj_str, proj4text, maxproj4len - 1); + } + else + { + proj_str[0] = 0; + } + } + else + { + elog(ERROR, "GetProj4StringSPI: Cannot find SRID (%d) in spatial_ref_sys", srid); + } + + spi_result = SPI_finish(); + if (spi_result != SPI_OK_FINISH) + { + elog(ERROR, "GetProj4StringSPI: Could not disconnect from database using SPI"); + } + + return proj_str; +} + + +/** + * Given an SRID, return the proj4 text. + * If the integer is one of the "well known" projections we support + * (WGS84 UTM N/S, Polar Stereographic N/S - see SRID_* macros), + * return the proj4text for those. + */ +static char* GetProj4String(int srid) +{ + static int maxproj4len = 512; + + /* SRIDs in SPATIAL_REF_SYS */ + if ( srid < SRID_RESERVE_OFFSET ) + { + return GetProj4StringSPI(srid); + } + /* Automagic SRIDs */ + else + { + char *proj_str = palloc(maxproj4len); + int id = srid; + /* UTM North */ + if ( id >= SRID_NORTH_UTM_START && id <= SRID_NORTH_UTM_END ) + { + snprintf(proj_str, maxproj4len, "+proj=utm +zone=%d +ellps=WGS84 +datum=WGS84 +units=m +no_defs", id - SRID_NORTH_UTM_START + 1); + } + /* UTM South */ + else if ( id >= SRID_SOUTH_UTM_START && id <= SRID_SOUTH_UTM_END ) + { + snprintf(proj_str, maxproj4len, "+proj=utm +zone=%d +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs", id - SRID_SOUTH_UTM_START + 1); + } + /* Lambert Azimuthal Equal Area South Pole */ + else if ( id == SRID_SOUTH_LAMBERT ) + { + strncpy(proj_str, "+proj=laea +lat_0=-90 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs", maxproj4len ); + } + /* Polar Sterographic South */ + else if ( id == SRID_SOUTH_STEREO ) + { + strncpy(proj_str, "+proj=stere +lat_0=-90 +lat_ts=-71 +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs", maxproj4len); + } + /* Lambert Azimuthal Equal Area North Pole */ + else if ( id == SRID_NORTH_LAMBERT ) + { + strncpy(proj_str, "+proj=laea +lat_0=90 +lon_0=-40 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs", maxproj4len ); + } + /* Polar Stereographic North */ + else if ( id == SRID_NORTH_STEREO ) + { + strncpy(proj_str, "+proj=stere +lat_0=90 +lat_ts=71 +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs", maxproj4len ); + } + /* World Mercator */ + else if ( id == SRID_WORLD_MERCATOR ) + { + strncpy(proj_str, "+proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs", maxproj4len ); + } + else + { + elog(ERROR, "Invalid reserved SRID (%d)", srid); + return NULL; + } + + POSTGIS_DEBUGF(3, "returning on SRID=%d: %s", srid, proj_str); + return proj_str; + } +} + +void AddToPROJ4Cache(Proj4Cache cache, int srid, int other_srid) { + AddToPROJ4SRSCache((PROJ4PortalCache *)cache, srid, other_srid) ; +} + + +/** + * Add an entry to the local PROJ4 SRS cache. If we need to wrap around then + * we must make sure the entry we choose to delete does not contain other_srid + * which is the definition for the other half of the transformation. + */ +static void +AddToPROJ4SRSCache(PROJ4PortalCache *PROJ4Cache, int srid, int other_srid) +{ + MemoryContext PJMemoryContext; + projPJ projection = NULL; + char *proj_str = NULL; + + /* + ** Turn the SRID number into a proj4 string, by reading from spatial_ref_sys + ** or instantiating a magical value from a negative srid. + */ + proj_str = GetProj4String(srid); + if ( ! proj_str ) + { + elog(ERROR, "GetProj4String returned NULL for SRID (%d)", srid); + } + + projection = lwproj_from_string(proj_str); + if ( projection == NULL ) + { + char *pj_errstr = pj_strerrno(*pj_get_errno_ref()); + if ( ! pj_errstr ) + pj_errstr = ""; + + elog(ERROR, + "AddToPROJ4SRSCache: could not parse proj4 string '%s' %s", + proj_str, pj_errstr); + } + + /* + * If the cache is already full then find the first entry + * that doesn't contain other_srid and use this as the + * subsequent value of PROJ4SRSCacheCount + */ + if (PROJ4Cache->PROJ4SRSCacheCount == PROJ4_CACHE_ITEMS) + { + bool found = false; + int i; + + for (i = 0; i < PROJ4_CACHE_ITEMS; i++) + { + if (PROJ4Cache->PROJ4SRSCache[i].srid != other_srid && found == false) + { + POSTGIS_DEBUGF(3, "choosing to remove item from query cache with SRID %d and index %d", PROJ4Cache->PROJ4SRSCache[i].srid, i); + + DeleteFromPROJ4SRSCache(PROJ4Cache, PROJ4Cache->PROJ4SRSCache[i].srid); + PROJ4Cache->PROJ4SRSCacheCount = i; + + found = true; + } + } + } + + /* + * Now create a memory context for this projection and + * store it in the backend hash + */ + POSTGIS_DEBUGF(3, "adding SRID %d with proj4text \"%s\" to query cache at index %d", srid, proj_str, PROJ4Cache->PROJ4SRSCacheCount); + + PJMemoryContext = MemoryContextCreate(T_AllocSetContext, 8192, + &PROJ4SRSCacheContextMethods, + PROJ4Cache->PROJ4SRSCacheContext, + "PostGIS PROJ4 PJ Memory Context"); + + /* Create the backend hash if it doesn't already exist */ + if (!PJHash) + PJHash = CreatePJHash(); + + /* + * Add the MemoryContext to the backend hash so we can + * clean up upon portal shutdown + */ + POSTGIS_DEBUGF(3, "adding projection object (%p) to hash table with MemoryContext key (%p)", projection, PJMemoryContext); + + AddPJHashEntry(PJMemoryContext, projection); + + PROJ4Cache->PROJ4SRSCache[PROJ4Cache->PROJ4SRSCacheCount].srid = srid; + PROJ4Cache->PROJ4SRSCache[PROJ4Cache->PROJ4SRSCacheCount].projection = projection; + PROJ4Cache->PROJ4SRSCache[PROJ4Cache->PROJ4SRSCacheCount].projection_mcxt = PJMemoryContext; + PROJ4Cache->PROJ4SRSCacheCount++; + + /* Free the projection string */ + pfree(proj_str); + +} + +void DeleteFromPROJ4Cache(Proj4Cache cache, int srid) { + DeleteFromPROJ4SRSCache((PROJ4PortalCache *)cache, srid) ; +} + + +static void DeleteFromPROJ4SRSCache(PROJ4PortalCache *PROJ4Cache, int srid) +{ + /* + * Delete the SRID entry from the cache + */ + + int i; + + for (i = 0; i < PROJ4_CACHE_ITEMS; i++) + { + if (PROJ4Cache->PROJ4SRSCache[i].srid == srid) + { + POSTGIS_DEBUGF(3, "removing query cache entry with SRID %d at index %d", srid, i); + + /* + * Zero out the entries and free the PROJ4 handle + * by deleting the memory context + */ + MemoryContextDelete(PROJ4Cache->PROJ4SRSCache[i].projection_mcxt); + PROJ4Cache->PROJ4SRSCache[i].projection = NULL; + PROJ4Cache->PROJ4SRSCache[i].projection_mcxt = NULL; + PROJ4Cache->PROJ4SRSCache[i].srid = SRID_UNKNOWN; + } + } +} + + +/** + * Specify an alternate directory for the PROJ.4 grid files + * (this should augment the PROJ.4 compile-time path) + * + * It's main purpose is to allow Win32 PROJ.4 installations + * to find a set grid shift files, although other platforms + * may find this useful too. + * + * Note that we currently ignore this on PostgreSQL < 8.0 + * since the method of determining the current installation + * path are different on older PostgreSQL versions. + */ +void SetPROJ4LibPath(void) +{ + char *path; + char *share_path; + const char **proj_lib_path; + + if (!IsPROJ4LibPathSet) { + + /* + * Get the sharepath and append /contrib/postgis/proj to form a suitable + * directory in which to store the grid shift files + */ + proj_lib_path = palloc(sizeof(char *)); + + share_path = palloc(MAXPGPATH); + get_share_path(my_exec_path, share_path); + + path = palloc(MAXPGPATH); + *proj_lib_path = path; + + snprintf(path, MAXPGPATH - 1, "%s/contrib/postgis-%s.%s/proj", share_path, POSTGIS_MAJOR_VERSION, POSTGIS_MINOR_VERSION); + + /* Set the search path for PROJ.4 */ + pj_set_searchpath(1, proj_lib_path); + + /* Ensure we only do this once... */ + IsPROJ4LibPathSet = true; + } +} + +Proj4Cache GetPROJ4Cache(FunctionCallInfo fcinfo) { + return (Proj4Cache)GetPROJ4SRSCache(fcinfo) ; +} + +static PROJ4PortalCache *GetPROJ4SRSCache(FunctionCallInfo fcinfo) +{ + PROJ4PortalCache *PROJ4Cache ; + + /* + * If we have not already created PROJ4 cache for this portal + * then create it + */ + if (fcinfo->flinfo->fn_extra == NULL) + { + MemoryContext old_context; + + old_context = MemoryContextSwitchTo(fcinfo->flinfo->fn_mcxt); + PROJ4Cache = palloc(sizeof(PROJ4PortalCache)); + MemoryContextSwitchTo(old_context); + + if (PROJ4Cache) + { + int i; + + POSTGIS_DEBUGF(3, "Allocating PROJ4Cache for portal with transform() MemoryContext %p", fcinfo->flinfo->fn_mcxt); + /* Put in any required defaults */ + for (i = 0; i < PROJ4_CACHE_ITEMS; i++) + { + PROJ4Cache->PROJ4SRSCache[i].srid = SRID_UNKNOWN; + PROJ4Cache->PROJ4SRSCache[i].projection = NULL; + PROJ4Cache->PROJ4SRSCache[i].projection_mcxt = NULL; + } + PROJ4Cache->PROJ4SRSCacheCount = 0; + PROJ4Cache->PROJ4SRSCacheContext = fcinfo->flinfo->fn_mcxt; + + /* Store the pointer in fcinfo->flinfo->fn_extra */ + fcinfo->flinfo->fn_extra = PROJ4Cache; + } + } + else + { + /* Use the existing cache */ + PROJ4Cache = fcinfo->flinfo->fn_extra; + } + + return PROJ4Cache ; +} + + +int +GetProjectionsUsingFCInfo(FunctionCallInfo fcinfo, int srid1, int srid2, projPJ *pj1, projPJ *pj2) +{ + Proj4Cache *proj_cache = NULL; + + /* Set the search path if we haven't already */ + SetPROJ4LibPath(); + + /* get or initialize the cache for this round */ + proj_cache = GetPROJ4Cache(fcinfo); + if ( !proj_cache ) + return LW_FAILURE; + + /* Add the output srid to the cache if it's not already there */ + if (!IsInPROJ4Cache(proj_cache, srid1)) + AddToPROJ4Cache(proj_cache, srid1, srid2); + + /* Add the input srid to the cache if it's not already there */ + if (!IsInPROJ4Cache(proj_cache, srid2)) + AddToPROJ4Cache(proj_cache, srid2, srid1); + + /* Get the projections */ + *pj1 = GetProjectionFromPROJ4Cache(proj_cache, srid1); + *pj2 = GetProjectionFromPROJ4Cache(proj_cache, srid2); + + return LW_SUCCESS; +} + +int +spheroid_init_from_srid(FunctionCallInfo fcinfo, int srid, SPHEROID *s) +{ + projPJ pj1, pj2; +#if POSTGIS_PROJ_VERSION >= 48 + double major_axis, minor_axis, eccentricity_squared; +#endif + + if ( GetProjectionsUsingFCInfo(fcinfo, srid, srid, &pj1, &pj2) == LW_FAILURE) + return LW_FAILURE; + + if ( ! pj_is_latlong(pj1) ) + return LW_FAILURE; + +#if POSTGIS_PROJ_VERSION >= 48 + /* For newer versions of Proj we can pull the spheroid paramaeters and initialize */ + /* using them */ + pj_get_spheroid_defn(pj1, &major_axis, &eccentricity_squared); + minor_axis = major_axis * sqrt(1-eccentricity_squared); + spheroid_init(s, major_axis, minor_axis); +#else + /* For old versions of Proj we cannot lookup the spheroid parameters from the API */ + /* So we use the WGS84 parameters (boo!) */ + spheroid_init(s, WGS84_MAJOR_AXIS, WGS84_MINOR_AXIS); +#endif + + return LW_SUCCESS; +} + +void srid_is_latlong(FunctionCallInfo fcinfo, int srid) +{ + projPJ pj1; + projPJ pj2; + + if ( srid == SRID_DEFAULT || srid == SRID_UNKNOWN ) + return; + + if ( GetProjectionsUsingFCInfo(fcinfo, srid, srid, &pj1, &pj2) == LW_FAILURE) + return; + + if ( pj_is_latlong(pj1) ) + return; + + ereport(ERROR, ( + errcode(ERRCODE_INVALID_PARAMETER_VALUE), + errmsg("Only lon/lat coordinate systems are supported in geography."))); +} + + diff -Nru postgis-1.5.3/libpgcommon/lwgeom_transform.h postgis-2.0.1/libpgcommon/lwgeom_transform.h --- postgis-1.5.3/libpgcommon/lwgeom_transform.h 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/libpgcommon/lwgeom_transform.h 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,74 @@ +/********************************************************************** + * $Id: lwgeom_transform.h -1M 2011-08-11 11:15:57Z (local) $ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * Copyright 2001-2003 Refractions Research Inc. + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include "postgres.h" +#include "liblwgeom.h" +#include "lwgeom_pg.h" + + + +char* GetProj4StringSPI(int srid); +void SetPROJ4LibPath(void) ; + + +/** + * Opaque type to use in the projection cache API. + */ +typedef void *Proj4Cache ; + +void SetPROJ4LibPath(void); +Proj4Cache GetPROJ4Cache(FunctionCallInfo fcinfo) ; +bool IsInPROJ4Cache(Proj4Cache cache, int srid) ; +void AddToPROJ4Cache(Proj4Cache cache, int srid, int other_srid); +void DeleteFromPROJ4Cache(Proj4Cache cache, int srid) ; +projPJ GetProjectionFromPROJ4Cache(Proj4Cache cache, int srid); +int GetProjectionsUsingFCInfo(FunctionCallInfo fcinfo, int srid1, int srid2, projPJ *pj1, projPJ *pj2); +int spheroid_init_from_srid(FunctionCallInfo fcinfo, int srid, SPHEROID *s); +void srid_is_latlong(FunctionCallInfo fcinfo, int srid); + +/** + * Builtin SRID values + * @{ + */ + +/** Start of the reserved offset */ +#define SRID_RESERVE_OFFSET 999000 + +/** World Mercator, equivalent to EPSG:3395 */ +#define SRID_WORLD_MERCATOR 999000 + +/** Start of UTM North zone, equivalent to EPSG:32601 */ +#define SRID_NORTH_UTM_START 999001 + +/** End of UTM North zone, equivalent to EPSG:32660 */ +#define SRID_NORTH_UTM_END 999060 + +/** Lambert Azimuthal Equal Area North Pole, equivalent to EPSG:3574 */ +#define SRID_NORTH_LAMBERT 999061 + +/** PolarSteregraphic North, equivalent to EPSG:3995 */ +#define SRID_NORTH_STEREO 999062 + +/** Start of UTM South zone, equivalent to EPSG:32701 */ +#define SRID_SOUTH_UTM_START 999101 + +/** Start of UTM South zone, equivalent to EPSG:32760 */ +#define SRID_SOUTH_UTM_END 999160 + +/** Lambert Azimuthal Equal Area South Pole, equivalent to EPSG:3409 */ +#define SRID_SOUTH_LAMBERT 999161 + +/** PolarSteregraphic South, equivalent to EPSG:3031 */ +#define SRID_SOUTH_STEREO 999162 + +/** @} */ + diff -Nru postgis-1.5.3/libpgcommon/pgsql_compat.h postgis-2.0.1/libpgcommon/pgsql_compat.h --- postgis-1.5.3/libpgcommon/pgsql_compat.h 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/libpgcommon/pgsql_compat.h 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,19 @@ +#ifndef _PGSQL_COMPAT_H +#define _PGSQL_COMPAT_H 1 + +/* Make sure PG_NARGS is defined for older PostgreSQL versions */ +#ifndef PG_NARGS +#define PG_NARGS() (fcinfo->nargs) +#endif + +/* Define ARR_OVERHEAD_NONULLS for PostgreSQL < 8.2 */ +#if POSTGIS_PGSQL_VERSION < 82 +#define ARR_OVERHEAD_NONULLS(x) ARR_OVERHEAD((x)) +#endif + +/* PostgreSQL < 8.3 uses VARATT_SIZEP rather than SET_VARSIZE for varlena types */ +#if POSTGIS_PGSQL_VERSION < 83 +#define SET_VARSIZE(var, size) VARATT_SIZEP(var) = size +#endif + +#endif /* _PGSQL_COMPAT_H */ diff -Nru postgis-1.5.3/libtool postgis-2.0.1/libtool --- postgis-1.5.3/libtool 2011-06-25 16:29:51.000000000 +0000 +++ postgis-2.0.1/libtool 2012-06-22 21:04:33.000000000 +0000 @@ -6,8 +6,8 @@ # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. @@ -40,8 +40,8 @@ # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? -macro_version=2.4 -macro_revision=1.3293 +macro_version=2.4.2 +macro_revision=1.3337 # Whether or not to build shared libraries. build_libtool_libs=yes @@ -61,6 +61,9 @@ # An echo program that protects backslashes. ECHO="printf %s\\n" +# The PATH separator for the build system. +PATH_SEPARATOR=":" + # The host system. host_alias= host=x86_64-apple-darwin10.8.0 @@ -72,7 +75,7 @@ build_os=darwin10.8.0 # A sed program that does not truncate output. -SED="/usr/bin/sed" +SED="/opt/local/bin/gsed" # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e 1s/^X//" @@ -151,7 +154,7 @@ # Commands used to install an old-style archive. RANLIB="ranlib" -old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib" +old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$tool_oldlib" old_postuninstall_cmds="" # Whether to use a lock for old archive extraction. @@ -296,7 +299,7 @@ reload_cmds="\$LTCC \$LTCFLAGS -nostdlib \${wl}-r -o \$output\$reload_objs" # Commands used to build an old-style archive. -old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$oldlib" +old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$tool_oldlib" # A language specific compiler. CC="gcc" @@ -362,10 +365,6 @@ # This must work even if $libdir does not exist hardcode_libdir_flag_spec="" -# If ld is used when linking, flag to hardcode $libdir into a binary -# during linking. This must work even if $libdir does not exist. -hardcode_libdir_flag_spec_ld="" - # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator="" @@ -440,11 +439,11 @@ # ### END LIBTOOL CONFIG -# libtool (GNU libtool) 2.4 +# libtool (GNU libtool) 2.4.2 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, -# 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -482,6 +481,7 @@ # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) +# --no-warn don't display warning messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages @@ -510,7 +510,7 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.4 +# $progname: (GNU libtool) 2.4.2 # automake: $automake_version # autoconf: $autoconf_version # @@ -520,9 +520,9 @@ PROGRAM=libtool PACKAGE=libtool -VERSION=2.4 +VERSION=2.4.2 TIMESTAMP="" -package_revision=1.3293 +package_revision=1.3337 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then @@ -577,15 +577,10 @@ : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} -: ${EGREP="grep -E"} -: ${FGREP="grep -F"} -: ${GREP="grep"} -: ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} -: ${SED="sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} @@ -824,7 +819,7 @@ ;; *) save_IFS="$IFS" - IFS=: + IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break @@ -1208,8 +1203,8 @@ s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ - s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ + s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ + s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ p d } @@ -1486,6 +1481,7 @@ opt_help=false opt_help_all=false opt_silent=: +opt_warning=: opt_verbose=: opt_silent=false opt_verbose=false @@ -1554,6 +1550,10 @@ opt_silent=false preserve_args+=" $opt" ;; + --no-warning|--no-warn) + opt_warning=false +preserve_args+=" $opt" + ;; --no-verbose) opt_verbose=false preserve_args+=" $opt" @@ -2493,7 +2493,7 @@ *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ - *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup) + *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; @@ -3635,11 +3635,13 @@ # Set up the ranlib parameters. oldlib="$destdir/$name" + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then - func_show_eval "$old_striplib $oldlib" 'exit $?' + func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. @@ -3904,7 +3906,7 @@ # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; @@ -4416,14 +4418,17 @@ # launches target application with the remaining arguments. func_exec_program () { - for lt_wr_arg - do - case \$lt_wr_arg in - --lt-*) ;; - *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; - esac - shift - done + case \" \$* \" in + *\\ --lt-*) + for lt_wr_arg + do + case \$lt_wr_arg in + --lt-*) ;; + *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; + esac + shift + done ;; + esac func_exec_program_core \${1+\"\$@\"} } @@ -5491,9 +5496,15 @@ { EOF func_emit_wrapper yes | - $SED -e 's/\([\\"]\)/\\\1/g' \ - -e 's/^/ fputs ("/' -e 's/$/\\n", f);/' - + $SED -n -e ' +s/^\(.\{79\}\)\(..*\)/\1\ +\2/ +h +s/\([\\"]\)/\\\1/g +s/$/\\n/ +s/\([^\n]*\).*/ fputs ("\1", f);/p +g +D' cat <<"EOF" } EOF @@ -6077,7 +6088,8 @@ continue ;; - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) compiler_flags+=" $arg" compile_command+=" $arg" finalize_command+=" $arg" @@ -6581,7 +6593,8 @@ lib= found=no case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" @@ -7265,7 +7278,7 @@ test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" + add_dir="-L$absdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in @@ -7750,6 +7763,7 @@ # which has an extra 1 added just for fun # case $version_type in + # correct linux to gnu/linux during the next big refactor darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result @@ -7866,7 +7880,7 @@ versuffix="$major.$revision" ;; - linux) + linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" @@ -8454,6 +8468,11 @@ # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then + # Remove ${wl} instances when linking with ld. + # FIXME: should test the right _cmds variable. + case $archive_cmds in + *\$LD\ *) wl= ;; + esac if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= @@ -8484,7 +8503,7 @@ elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; - *) func_apped perm_rpath " $libdir" ;; + *) perm_rpath+=" $libdir" ;; esac fi done @@ -8492,11 +8511,7 @@ if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" - if test -n "$hardcode_libdir_flag_spec_ld"; then - eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" - else - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi + eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. @@ -9586,6 +9601,8 @@ esac done fi + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" @@ -9695,7 +9712,8 @@ *.la) func_basename "$deplib" name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + func_resolve_sysroot "$deplib" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" newdependency_libs+=" ${lt_sysroot:+=}$libdir/$name" @@ -10079,7 +10097,7 @@ reload_cmds="\$LTCC \$LTCFLAGS -nostdlib \${wl}-r -o \$output\$reload_objs" # Commands used to build an old-style archive. -old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$oldlib" +old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$tool_oldlib" # A language specific compiler. CC="g++" @@ -10145,10 +10163,6 @@ # This must work even if $libdir does not exist hardcode_libdir_flag_spec="" -# If ld is used when linking, flag to hardcode $libdir into a binary -# during linking. This must work even if $libdir does not exist. -hardcode_libdir_flag_spec_ld="" - # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator="" diff -Nru postgis-1.5.3/loader/Makefile postgis-2.0.1/loader/Makefile --- postgis-1.5.3/loader/Makefile 2011-06-25 16:29:50.000000000 +0000 +++ postgis-2.0.1/loader/Makefile 1970-01-01 00:00:00.000000000 +0000 @@ -1,109 +0,0 @@ -# ********************************************************************** -# * $Id: Makefile.in -# * -# * PostGIS - Spatial Types for PostgreSQL -# * http://postgis.refractions.net -# * Copyright 2008 Mark Cave-Ayland -# * -# * This is free software; you can redistribute and/or modify it under -# * the terms of the GNU General Public Licence. See the COPYING file. -# * -# ********************************************************************** - -# PGXS information -# -# Note that PGXS currently doesn't handle building FE executables, but we need -# the INSTALL and DESTDIR variables so we can get the correct install paths. -# Hence we include the PGXS Makefile here, but ensure that we override the -# 'all' and 'install' targets with the ones we really want to use below. -PG_CONFIG = /usr/local/pgsql/9.1/bin/pg_config -PGXS := /usr/local/pgsql/9.1/lib/pgxs/src/makefiles/pgxs.mk -include $(PGXS) - -# Set CFLAGS afer PGXS, otherwise it will get overwritten with the PGXS -# version which is not what we want. -CC=gcc -CFLAGS=-g -O2 -fno-common -DPIC -Wall -Wmissing-prototypes - -# Filenames with extension as determined by the OS -PGSQL2SHP=pgsql2shp -SHP2PGSQL-CLI=shp2pgsql -SHP2PGSQL-GUI=shp2pgsql-gui - -# PostgreSQL frontend CPPFLAGS and LDFLAGS (for compiling and linking with libpq) -PGSQL_FE_CPPFLAGS=-I/usr/local/pgsql/9.1/include -PGSQL_FE_LDFLAGS=-L/usr/local/pgsql/9.1/lib -lpq - -# iconv flags -ICONV_LDFLAGS= -liconv -ICONV_CFLAGS= - -# liblwgeom -LIBLWGEOM=../liblwgeom/liblwgeom.a - -# GTK includes and libraries -GTK_CFLAGS = -GTK_LIBS = -GTK_WIN32_FLAGS = -GTK_WIN32_RES = - -# If REGRESS=1 passed as a parameter, change the default install paths -# so that no prefix is included. This allows us to relocate to a temporary -# directory for regression testing. -ifeq ($(REGRESS),1) - bindir=/bin - pkglibdir=/lib - datadir=/share -endif - -# We test this variable later to see if we're building the GUI -gtk_build = - -# The real parts of the Makefile -all: $(SHP2PGSQL-CLI) $(PGSQL2SHP) - -gui: $(SHP2PGSQL-GUI) $(SHP2PGSQL-CLI) - -shp2pgsql-gui.res: shp2pgsql-gui.rc shp2pgsql-gui.ico - windres $< -O coff -o $@ - -# liblwgeom.a dependency to allow "make install" in -# the loader/ subdirectory to work -$(LIBLWGEOM): - make -C ../liblwgeom - -shp2pgsql-core.o: shp2pgsql-core.c - $(CC) $(CFLAGS) $(ICONV_CFLAGS) -c $< - -pgsql2shp.o: pgsql2shp.c - $(CC) $(CFLAGS) $(ICONV_CFLAGS) $(PGSQL_FE_CPPFLAGS) -c $< - -$(PGSQL2SHP): shpopen.o dbfopen.o safileio.o getopt.o pgsql2shp.o $(LIBLWGEOM) - $(CC) $(CFLAGS) $^ $(ICONV_LDFLAGS) $(PGSQL_FE_LDFLAGS) -lm -o $@ - -$(SHP2PGSQL-CLI): stringbuffer.o shpopen.o dbfopen.o safileio.o getopt.o shp2pgsql-core.o shp2pgsql-cli.o $(LIBLWGEOM) - $(CC) $(CFLAGS) $^ -o $@ $(ICONV_LDFLAGS) -lm - -shp2pgsql-gui.o: shp2pgsql-gui.c - $(CC) $(CFLAGS) $(PGSQL_FE_CPPFLAGS) $(GTK_CFLAGS) -o $@ -c shp2pgsql-gui.c - -$(SHP2PGSQL-GUI): stringbuffer.o shpopen.o dbfopen.o safileio.o shp2pgsql-core.o shp2pgsql-gui.o getopt.o $(LIBLWGEOM) $(GTK_WIN32_RES) - $(CC) $(CFLAGS) $(GTK_WIN32_FLAGS) $^ -o $@ $(GTK_LIBS) $(ICONV_LDFLAGS) $(PGSQL_FE_LDFLAGS) -lm - -installdir: - @mkdir -p $(DESTDIR)$(bindir) - -install: installdir -ifdef gtk_build - $(INSTALL) $(SHP2PGSQL-GUI) $(DESTDIR)$(bindir) -endif - $(INSTALL) $(PGSQL2SHP) $(DESTDIR)$(bindir) - $(INSTALL) $(SHP2PGSQL-CLI) $(DESTDIR)$(bindir) - -uninstall: - @rm -f $(DESTDIR)$(bindir)/$(PGSQL2SHP) - @rm -f $(DESTDIR)$(bindir)/$(SHP2PGSQL-CLI) - -clean: - @rm -f *.o $(SHP2PGSQL-CLI) $(PGSQL2SHP) $(GTK_WIN32_RES) - diff -Nru postgis-1.5.3/loader/Makefile.in postgis-2.0.1/loader/Makefile.in --- postgis-1.5.3/loader/Makefile.in 2010-09-10 20:44:05.000000000 +0000 +++ postgis-2.0.1/loader/Makefile.in 2012-03-21 21:36:59.000000000 +0000 @@ -1,5 +1,4 @@ # ********************************************************************** -# * $Id: Makefile.in # * # * PostGIS - Spatial Types for PostgreSQL # * http://postgis.refractions.net @@ -13,7 +12,7 @@ # PGXS information # # Note that PGXS currently doesn't handle building FE executables, but we need -# the INSTALL and DESTDIR variables so we can get the correct install paths. +# the DESTDIR variable so we can get the correct install paths. # Hence we include the PGXS Makefile here, but ensure that we override the # 'all' and 'install' targets with the ones we really want to use below. PG_CONFIG = @PGCONFIG@ @@ -23,10 +22,14 @@ # Set CFLAGS afer PGXS, otherwise it will get overwritten with the PGXS # version which is not what we want. CC=@CC@ -CFLAGS=@CFLAGS@ @PICFLAGS@ @WARNFLAGS@ +CFLAGS=@CFLAGS@ @PICFLAGS@ @WARNFLAGS@ @PROJ_CPPFLAGS@ +top_builddir = @top_builddir@ +SHELL = @SHELL@ +INSTALL = $(SHELL) ../install-sh +LIBTOOL = @LIBTOOL@ # Filenames with extension as determined by the OS -PGSQL2SHP=pgsql2shp@EXESUFFIX@ +PGSQL2SHP-CLI=pgsql2shp@EXESUFFIX@ SHP2PGSQL-CLI=shp2pgsql@EXESUFFIX@ SHP2PGSQL-GUI=shp2pgsql-gui@EXESUFFIX@ @@ -39,7 +42,7 @@ ICONV_CFLAGS=@ICONV_CFLAGS@ # liblwgeom -LIBLWGEOM=../liblwgeom/liblwgeom.a +LIBLWGEOM=../liblwgeom/liblwgeom.la # GTK includes and libraries GTK_CFLAGS = @GTK_CFLAGS@ @IGE_MAC_CFLAGS@ @@ -47,6 +50,14 @@ GTK_WIN32_FLAGS = @GTK_WIN32_FLAGS@ GTK_WIN32_RES = @GTK_WIN32_RES@ +# GetText includes and libraries +GETTEXT_CFLAGS = @GETTEXT_CFLAGS@ +GETTEXT_LDFLAGS = @GETTEXT_LDFLAGS@ @LIBINTL@ +LANGUAGES = fr + +# Built out CFLAGS with ICONV and GETTEXT +CFLAGS += $(GETTEXT_CFLAGS) $(ICONV_CFLAGS) + # If REGRESS=1 passed as a parameter, change the default install paths # so that no prefix is included. This allows us to relocate to a temporary # directory for regression testing. @@ -59,8 +70,11 @@ # We test this variable later to see if we're building the GUI gtk_build = @GTK_BUILD@ +# Common object files +SHPLIB_OBJS = shpopen.o dbfopen.o getopt.o shpcommon.o safileio.o + # The real parts of the Makefile -all: $(SHP2PGSQL-CLI) $(PGSQL2SHP) @GTK_BUILD@ +all: $(SHP2PGSQL-CLI) $(PGSQL2SHP-CLI) @GTK_BUILD@ gui: $(SHP2PGSQL-GUI) $(SHP2PGSQL-CLI) @GTK_WIN32_RES@ @@ -72,38 +86,77 @@ $(LIBLWGEOM): make -C ../liblwgeom -shp2pgsql-core.o: shp2pgsql-core.c - $(CC) $(CFLAGS) $(ICONV_CFLAGS) -c $< +shp2pgsql-core.o: shp2pgsql-core.c shp2pgsql-core.h shpcommon.h + $(CC) $(CFLAGS) -c $< -pgsql2shp.o: pgsql2shp.c - $(CC) $(CFLAGS) $(ICONV_CFLAGS) $(PGSQL_FE_CPPFLAGS) -c $< +pgsql2shp-core.o: pgsql2shp-core.c pgsql2shp-core.h shpcommon.h + $(CC) $(CFLAGS) $(PGSQL_FE_CPPFLAGS) -c $< -$(PGSQL2SHP): shpopen.o dbfopen.o safileio.o getopt.o pgsql2shp.o $(LIBLWGEOM) - $(CC) $(CFLAGS) $^ $(ICONV_LDFLAGS) $(PGSQL_FE_LDFLAGS) -lm -o $@ +pgsql2shp-cli.o: pgsql2shp-cli.c pgsql2shp-core.h shpcommon.h + $(CC) $(CFLAGS) $(PGSQL_FE_CPPFLAGS) -c $< -$(SHP2PGSQL-CLI): stringbuffer.o shpopen.o dbfopen.o safileio.o getopt.o shp2pgsql-core.o shp2pgsql-cli.o $(LIBLWGEOM) - $(CC) $(CFLAGS) $^ -o $@ $(ICONV_LDFLAGS) -lm - -shp2pgsql-gui.o: shp2pgsql-gui.c - $(CC) $(CFLAGS) $(PGSQL_FE_CPPFLAGS) $(GTK_CFLAGS) -o $@ -c shp2pgsql-gui.c - -$(SHP2PGSQL-GUI): stringbuffer.o shpopen.o dbfopen.o safileio.o shp2pgsql-core.o shp2pgsql-gui.o getopt.o $(LIBLWGEOM) $(GTK_WIN32_RES) - $(CC) $(CFLAGS) $(GTK_WIN32_FLAGS) $^ -o $@ $(GTK_LIBS) $(ICONV_LDFLAGS) $(PGSQL_FE_LDFLAGS) -lm +$(PGSQL2SHP-CLI): $(SHPLIB_OBJS) pgsql2shp-core.o pgsql2shp-cli.o $(LIBLWGEOM) + $(LIBTOOL) --mode=link \ + $(CC) $(CFLAGS) $^ $(ICONV_LDFLAGS) $(PGSQL_FE_LDFLAGS) $(GETTEXT_LDFLAGS) -o $@ + +$(SHP2PGSQL-CLI): $(SHPLIB_OBJS) shp2pgsql-core.o shp2pgsql-cli.o $(LIBLWGEOM) + $(LIBTOOL) --mode=link \ + $(CC) $(CFLAGS) $^ -o $@ $(GETTEXT_LDFLAGS) $(ICONV_LDFLAGS) + +shp2pgsql-gui.o: shp2pgsql-gui.c shp2pgsql-core.h shpcommon.h + $(CC) $(CFLAGS) $(GTK_CFLAGS) $(PGSQL_FE_CPPFLAGS) -o $@ -c shp2pgsql-gui.c + +$(SHP2PGSQL-GUI): $(SHPLIB_OBJS) shp2pgsql-core.o shp2pgsql-gui.o pgsql2shp-core.o $(LIBLWGEOM) $(GTK_WIN32_RES) + $(LIBTOOL) --mode=link \ + $(CC) $(CFLAGS) $(GTK_WIN32_FLAGS) $^ -o $@ \ + $(GTK_LIBS) $(ICONV_LDFLAGS) $(PGSQL_FE_LDFLAGS) $(GETTEXT_LDFLAGS) installdir: @mkdir -p $(DESTDIR)$(bindir) install: installdir ifdef gtk_build - $(INSTALL) $(SHP2PGSQL-GUI) $(DESTDIR)$(bindir) + $(LIBTOOL) --mode=install $(INSTALL) $(SHP2PGSQL-GUI) "$(DESTDIR)$(bindir)/$(SHP2PGSQL-GUI)" endif - $(INSTALL) $(PGSQL2SHP) $(DESTDIR)$(bindir) - $(INSTALL) $(SHP2PGSQL-CLI) $(DESTDIR)$(bindir) + $(LIBTOOL) --mode=install $(INSTALL) $(PGSQL2SHP-CLI) "$(DESTDIR)$(bindir)/$(PGSQL2SHP-CLI)" + $(LIBTOOL) --mode=install $(INSTALL) $(SHP2PGSQL-CLI) "$(DESTDIR)$(bindir)/$(SHP2PGSQL-CLI)" uninstall: - @rm -f $(DESTDIR)$(bindir)/$(PGSQL2SHP) - @rm -f $(DESTDIR)$(bindir)/$(SHP2PGSQL-CLI) + $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(bindir)/$(PGSQL2SHP-CLI)" + $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(bindir)/$(SHP2PGSQL-CLI)" + $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(bindir)/$(SHP2PGSQL-GUI)" + +check: +ifdef gtk_build + make -C cunit check +endif clean: - @rm -f *.o $(SHP2PGSQL-CLI) $(PGSQL2SHP) $(GTK_WIN32_RES) + rm -rf .libs + rm -f *.o $(SHP2PGSQL-CLI) $(PGSQL2SHP-CLI) $(GTK_WIN32_RES) $(SHP2PGSQL-GUI) + $(MAKE) -C cunit clean + +distclean: + $(MAKE) -C cunit distclean + rm -f Makefile + +# +# Internationalization targets. These are going to need some work and +# love to land the files in the right places in all platforms. +# +pot: + xgettext -k_ shp2pgsql-core.c shp2pgsql-cli.c shp2pgsql-gui.c -o po/shp2pgsql.pot + xgettext -k_ pgsql2shp-core.c pgsql2shp-cli.c -o po/pgsql2shp.pot + +mo: + for lang in $(LANGUAGES); do \ + msgfmt -o po/shp2pgsql_$$lang.mo po/shp2pgsql_$$lang.po ; \ + done + +install-mo: +ifneq (,$(LANGUAGES)) + for lang in $(LANGUAGES); do \ + $(INSTALL_DATA) po/shp2pgsql_$$lang.mo '$(localedir)'/$$lang/LC_MESSAGES/shp2pgsql.mo || exit 1; \ + done +endif diff -Nru postgis-1.5.3/loader/README.i18n postgis-2.0.1/loader/README.i18n --- postgis-1.5.3/loader/README.i18n 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/loader/README.i18n 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,30 @@ +Translating these Applications +------------------------------ + +You will need the gettext utilities to work with the translation files. +Ensure you have the following utilities available: + + xgettext + msgfmt + +First, update the translation template ("pot") file + + make pot + +This will create fresh template files in "po/", "shp2pgsql.pot" and +"pgsql2shp.pot" + +Second, copy a template to a translation file, using the filename +pattern shp2pgsql_LANG.po. For example, for a French translation: + + cp shp2pgsql.pot shp2pgsql_fr.po + cp pgsql2shp.pot pgsql2shp_fr.po + +Finally, prepare your translations. There is header information in the +translation file to identify yourself as the translator -- fill it in. + +Important, set the CHARSET value in the header to the text character set +you are using for your text file. We'd prefer you use UTF-8, if you can. + +When your translation file is complete, commit your changes, or +mail it to the postgis-devel list, and we'll commit it for you. diff -Nru postgis-1.5.3/loader/README.txt postgis-2.0.1/loader/README.txt --- postgis-1.5.3/loader/README.txt 2006-10-11 09:43:29.000000000 +0000 +++ postgis-2.0.1/loader/README.txt 2012-02-27 22:08:12.000000000 +0000 @@ -1,12 +1,13 @@ This directory contains the loader and dumper utility programs. -The loader can convert shape files to an SQL dump suitable for loading into a PostGIS enabled -PostgreSQL database server. The dumper does the opposite, creates a shape file out of an PostGIS -table or arbitrary query. +The loader can convert shape files to an SQL dump suitable for loading into a +PostGIS enabled PostgreSQL database server. The dumper does the opposite, +creates a shape file out of an PostGIS table or arbitrary query. -To compile the program from source, simply run "make" in the source directory. Then copy the -binary into your command search path (or wherever you like). +To compile the program from source, simply run "make" in the source directory. +Then copy the binary into your command search path (or wherever you like). -For usage information, simply run the programs without any arguments, that will display a -help screen, and look into the ../doc/man/ directory, there are manpages ready for copying -into the manual search path on unixoid systems. +For usage information, simply run the programs without any arguments, that +will display a help screen, and look into the ../doc/man/ directory, +there are manpages ready for copying into the manual search path on +unixoid systems. diff -Nru postgis-1.5.3/loader/cunit/Makefile.in postgis-2.0.1/loader/cunit/Makefile.in --- postgis-1.5.3/loader/cunit/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/loader/cunit/Makefile.in 2012-03-21 21:36:59.000000000 +0000 @@ -0,0 +1,98 @@ +# ********************************************************************** +# * $Id: Makefile.in +# * +# * PostGIS - Spatial Types for PostgreSQL +# * http://postgis.refractions.net +# * Copyright 2008 Paul Ramsey, Mark Cave-Ayland +# * +# * This is free software; you can redistribute and/or modify it under +# * the terms of the GNU General Public Licence. See the COPYING file. +# * +# ********************************************************************** + +CC=@CC@ +CFLAGS=@CFLAGS@ @WARNFLAGS@ + +CUNIT_LDFLAGS=@CUNIT_LDFLAGS@ +CUNIT_CPPFLAGS=@CUNIT_CPPFLAGS@ -I.. + +# GTK includes and libraries +GTK_CFLAGS = @GTK_CFLAGS@ @IGE_MAC_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ @IGE_MAC_LIBS@ +GTK_WIN32_FLAGS = @GTK_WIN32_FLAGS@ + +# PostgreSQL frontend CPPFLAGS and LDFLAGS (for compiling and linking with libpq) +PGSQL_FE_CPPFLAGS=@PGSQL_FE_CPPFLAGS@ +PGSQL_FE_LDFLAGS=@PGSQL_FE_LDFLAGS@ + +# liblwgeom +LIBLWGEOM=../../liblwgeom/.libs/liblwgeom.a + +# iconv flags +ICONV_LDFLAGS=@ICONV_LDFLAGS@ +ICONV_CFLAGS=@ICONV_CFLAGS@ + +# GetText includes and libraries +GETTEXT_CFLAGS = @GETTEXT_CFLAGS@ +GETTEXT_LDFLAGS = @GETTEXT_LDFLAGS@ @LIBINTL@ + +# Build full linking line +LDFLAGS = -lm $(GETTEXT_LDFLAGS) $(PGSQL_FE_LDFLAGS) $(ICONV_LDFLAGS) $(CUNIT_LDFLAGS) + +# Object files +OBJS= \ + cu_pgsql2shp.o \ + cu_shp2pgsql.o \ + cu_tester.o + +LOADER_OBJS= \ + ../dbfopen.o \ + ../shpopen.o \ + ../getopt.o \ + ../shpcommon.o \ + ../safileio.o \ + ../pgsql2shp-core.o \ + ../shp2pgsql-core.o + +# If we couldn't find the cunit library then display a helpful message +ifeq ($(CUNIT_LDFLAGS),) +all: requirements_not_met_cunit +check: requirements_not_met_cunit +else + +$(LOADER_OBJS): + make -C .. + +# Build the unit tester +all: cu_tester + +# Build and run the unit tester +check: cu_tester + @./cu_tester + +endif + +# Build the main unit test executable +cu_tester: $(LOADER_OBJS) $(OBJS) + $(CC) $^ -o $@ $(LIBLWGEOM) $(LDFLAGS) + +# Command to build each of the .o files +$(OBJS): %.o: %.c + $(CC) $(CFLAGS) $(CUNIT_CPPFLAGS) $(GTK_CFLAGS) $(PGSQL_FE_CPPFLAGS) -c -o $@ $< + +# Clean target +clean: + rm -f $(OBJS) + rm -f cu_tester.exe + +distclean: clean + rm -f Makefile + +# Requirements message +requirements_not_met_cunit: + @echo + @echo "WARNING:" + @echo + @echo "configure was unable to find CUnit which is required for unit testing." + @echo "In order to enable unit testing, you must install CUnit and then re-run configure." + @echo diff -Nru postgis-1.5.3/loader/cunit/cu_pgsql2shp.c postgis-2.0.1/loader/cunit/cu_pgsql2shp.c --- postgis-1.5.3/loader/cunit/cu_pgsql2shp.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/loader/cunit/cu_pgsql2shp.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,78 @@ +/********************************************************************** + * $Id: cu_pgsql2shp.c 5674 2010-06-03 02:04:15Z mleslie $ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * Copyright 2010 LISAsoft Pty Ltd + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include "cu_pgsql2shp.h" +#include "cu_tester.h" +#include "../pgsql2shp-core.h" + +/* Test functions */ +void test_ShpDumperCreate(void); +void test_ShpDumperDestroy(void); + +SHPDUMPERCONFIG *dumper_config; +SHPDUMPERSTATE *dumper_state; + +/* +** Called from test harness to register the tests in this file. +*/ +CU_pSuite register_pgsql2shp_suite(void) +{ + CU_pSuite pSuite; + pSuite = CU_add_suite("Shapefile Loader File pgsql2shp Test", init_pgsql2shp_suite, clean_pgsql2shp_suite); + if (NULL == pSuite) + { + CU_cleanup_registry(); + return NULL; + } + + if ( + (NULL == CU_add_test(pSuite, "test_ShpDumperCreate()", test_ShpDumperCreate)) || + (NULL == CU_add_test(pSuite, "test_ShpDumperDestroy()", test_ShpDumperDestroy)) + ) + { + CU_cleanup_registry(); + return NULL; + } + return pSuite; +} + +/* +** The suite initialization function. +** Create any re-used objects. +*/ +int init_pgsql2shp_suite(void) +{ + return 0; +} + +/* +** The suite cleanup function. +** Frees any global objects. +*/ +int clean_pgsql2shp_suite(void) +{ + return 0; +} + +void test_ShpDumperCreate(void) +{ + dumper_config = (SHPDUMPERCONFIG*)calloc(1, sizeof(SHPDUMPERCONFIG)); + set_dumper_config_defaults(dumper_config); + dumper_state = ShpDumperCreate(dumper_config); + CU_ASSERT_PTR_NOT_NULL(dumper_state); + CU_ASSERT_EQUAL(dumper_state->config->fetchsize, 100); +} + +void test_ShpDumperDestroy(void) +{ + ShpDumperDestroy(dumper_state); +} diff -Nru postgis-1.5.3/loader/cunit/cu_pgsql2shp.h postgis-2.0.1/loader/cunit/cu_pgsql2shp.h --- postgis-1.5.3/loader/cunit/cu_pgsql2shp.h 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/loader/cunit/cu_pgsql2shp.h 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,28 @@ +/********************************************************************** + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * Copyright 2010 LISAsoft Pty Ltd + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#ifndef __cu_pgsql2shp_h__ +#define __cu_pgsql2shp_h__ + +#include +#include +#include +#include "CUnit/Basic.h" + +/*********************************************************************** +** for Computational Geometry Suite +*/ + +/* Admin functions */ +int init_pgsql2shp_suite(void); +int clean_pgsql2shp_suite(void); + +#endif /* __cu_pgsql2shp_h__ */ diff -Nru postgis-1.5.3/loader/cunit/cu_shp2pgsql.c postgis-2.0.1/loader/cunit/cu_shp2pgsql.c --- postgis-1.5.3/loader/cunit/cu_shp2pgsql.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/loader/cunit/cu_shp2pgsql.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,78 @@ +/********************************************************************** + * $Id: cu_shp2pgsql.c 5674 2010-06-03 02:04:15Z mleslie $ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * Copyright 2010 LISAsoft Pty Ltd + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include "cu_shp2pgsql.h" +#include "cu_tester.h" +#include "../shp2pgsql-core.h" + +/* Test functions */ +void test_ShpLoaderCreate(void); +void test_ShpLoaderDestroy(void); + +SHPLOADERCONFIG *loader_config; +SHPLOADERSTATE *loader_state; + +/* +** Called from test harness to register the tests in this file. +*/ +CU_pSuite register_shp2pgsql_suite(void) +{ + CU_pSuite pSuite; + pSuite = CU_add_suite("Shapefile Loader File shp2pgsql Test", init_shp2pgsql_suite, clean_shp2pgsql_suite); + if (NULL == pSuite) + { + CU_cleanup_registry(); + return NULL; + } + + if ( + (NULL == CU_add_test(pSuite, "test_ShpLoaderCreate()", test_ShpLoaderCreate)) || + (NULL == CU_add_test(pSuite, "test_ShpLoaderDestroy()", test_ShpLoaderDestroy)) + ) + { + CU_cleanup_registry(); + return NULL; + } + return pSuite; +} + +/* +** The suite initialization function. +** Create any re-used objects. +*/ +int init_shp2pgsql_suite(void) +{ + return 0; +} + +/* +** The suite cleanup function. +** Frees any global objects. +*/ +int clean_shp2pgsql_suite(void) +{ + return 0; +} + +void test_ShpLoaderCreate(void) +{ + loader_config = (SHPLOADERCONFIG*)calloc(1, sizeof(SHPLOADERCONFIG)); + set_loader_config_defaults(loader_config); + loader_state = ShpLoaderCreate(loader_config); + CU_ASSERT_PTR_NOT_NULL(loader_state); + CU_ASSERT_STRING_EQUAL(loader_state->config->encoding, ENCODING_DEFAULT); +} + +void test_ShpLoaderDestroy(void) +{ + ShpLoaderDestroy(loader_state); +} diff -Nru postgis-1.5.3/loader/cunit/cu_shp2pgsql.h postgis-2.0.1/loader/cunit/cu_shp2pgsql.h --- postgis-1.5.3/loader/cunit/cu_shp2pgsql.h 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/loader/cunit/cu_shp2pgsql.h 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,28 @@ +/********************************************************************** + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * Copyright 2010 LISAsoft Pty Ltd + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#ifndef __cu_shp2pgsql_h__ +#define __cu_shp2pgsql_h__ + +#include +#include +#include +#include "CUnit/Basic.h" + +/*********************************************************************** +** for Computational Geometry Suite +*/ + +/* Admin functions */ +int init_shp2pgsql_suite(void); +int clean_shp2pgsql_suite(void); + +#endif /* __cu_shp2pgsql_h__ */ diff -Nru postgis-1.5.3/loader/cunit/cu_tester.c postgis-2.0.1/loader/cunit/cu_tester.c --- postgis-1.5.3/loader/cunit/cu_tester.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/loader/cunit/cu_tester.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,51 @@ +/********************************************************************** + * $Id: cu_tester.c 5675 2010-06-03 07:35:41Z mleslie $ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * Copyright 2008 Paul Ramsey + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include +#include +#include "CUnit/Basic.h" +#include "cu_tester.h" + +/* +** The main() function for setting up and running the tests. +** Returns a CUE_SUCCESS on successful running, another +** CUnit error code on failure. +*/ +int main() +{ + + /* initialize the CUnit test registry */ + if (CUE_SUCCESS != CU_initialize_registry()) + return CU_get_error(); + + /* Add the shp2pgsql test suite */ + if (NULL == register_shp2pgsql_suite()) + { + CU_cleanup_registry(); + return CU_get_error(); + } + + /* Add the pgsql2shp test suite */ + if (NULL == register_pgsql2shp_suite()) + { + CU_cleanup_registry(); + return CU_get_error(); + } + + /* Run all tests using the CUnit Basic interface */ + CU_basic_set_mode(CU_BRM_VERBOSE); + CU_basic_run_tests(); + CU_cleanup_registry(); + + return CU_get_error(); + +} diff -Nru postgis-1.5.3/loader/cunit/cu_tester.h postgis-2.0.1/loader/cunit/cu_tester.h --- postgis-1.5.3/loader/cunit/cu_tester.h 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/loader/cunit/cu_tester.h 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,21 @@ +/********************************************************************** + * $Id: cu_tester.h 5674 2010-06-03 02:04:15Z mleslie $ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * Copyright 2010 Mark Leslie + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + + +#ifndef __cu_tester_h__ +#define __cu_tester_h__ + +CU_pSuite register_list_suite(void); +CU_pSuite register_shp2pgsql_suite(void); +CU_pSuite register_pgsql2shp_suite(void); + +#endif /* __cu_tester_h__ */ diff -Nru postgis-1.5.3/loader/cunit/map.txt postgis-2.0.1/loader/cunit/map.txt --- postgis-1.5.3/loader/cunit/map.txt 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/loader/cunit/map.txt 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,3 @@ +0123456789toolong0 0123456780 +0123456789toolong1 0123456781 +0123456789toolong2 0123456782 diff -Nru postgis-1.5.3/loader/dbfopen.c postgis-2.0.1/loader/dbfopen.c --- postgis-1.5.3/loader/dbfopen.c 2010-09-10 20:44:05.000000000 +0000 +++ postgis-2.0.1/loader/dbfopen.c 2012-02-27 22:08:12.000000000 +0000 @@ -1,5 +1,5 @@ /****************************************************************************** - * $Id: dbfopen.c 5957 2010-09-10 20:44:05Z pramsey $ + * $Id: dbfopen.c 9324 2012-02-27 22:08:12Z pramsey $ * * Project: Shapelib * Purpose: Implementation of .dbf access API documented in dbf_api.html. @@ -34,6 +34,21 @@ ****************************************************************************** * * $Log: dbfopen.c,v $ + * Revision 1.89 2011-07-24 05:59:25 fwarmerdam + * minimize use of CPLError in favor of SAHooks.Error() + * + * Revision 1.88 2011-05-13 17:35:17 fwarmerdam + * added DBFReorderFields() and DBFAlterFields() functions (from Even) + * + * Revision 1.87 2011-05-07 22:41:02 fwarmerdam + * ensure pending record is flushed when adding a native field (GDAL #4073) + * + * Revision 1.86 2011-04-17 15:15:29 fwarmerdam + * Removed unused variable. + * + * Revision 1.85 2010-12-06 16:09:34 fwarmerdam + * fix buffer read overrun fetching code page (bug 2276) + * * Revision 1.84 2009-10-29 19:59:48 fwarmerdam * avoid crash on truncated header (gdal #3093) * @@ -148,7 +163,7 @@ #include #include -SHP_CVSID("$Id: dbfopen.c 5957 2010-09-10 20:44:05Z pramsey $") +SHP_CVSID("$Id: dbfopen.c 9324 2012-02-27 22:08:12Z pramsey $") #ifndef FALSE # define FALSE 0 @@ -259,14 +274,10 @@ psDBF->nRecordLength, 1, psDBF->fp ) != 1 ) { -#ifdef USE_CPL - CPLError( CE_Failure, CPLE_FileIO, - "Failure writing DBF record %d.", - psDBF->nCurrentRecord ); -#else - fprintf( stderr, "Failure writing DBF record %d.", + char szMessage[128]; + sprintf( szMessage, "Failure writing DBF record %d.", psDBF->nCurrentRecord ); -#endif + psDBF->sHooks.Error( szMessage ); return FALSE; } } @@ -293,28 +304,20 @@ if( psDBF->sHooks.FSeek( psDBF->fp, nRecordOffset, SEEK_SET ) != 0 ) { -#ifdef USE_CPL - CPLError( CE_Failure, CPLE_FileIO, - "fseek(%ld) failed on DBF file.\n", - (long) nRecordOffset ); -#else - fprintf( stderr, "fseek(%ld) failed on DBF file.\n", + char szMessage[128]; + sprintf( szMessage, "fseek(%ld) failed on DBF file.\n", (long) nRecordOffset ); -#endif + psDBF->sHooks.Error( szMessage ); return FALSE; } if( psDBF->sHooks.FRead( psDBF->pszCurrentRecord, psDBF->nRecordLength, 1, psDBF->fp ) != 1 ) { -#ifdef USE_CPL - CPLError( CE_Failure, CPLE_FileIO, - "fread(%d) failed on DBF file.\n", - psDBF->nRecordLength ); -#else - fprintf( stderr, "fread(%d) failed on DBF file.\n", + char szMessage[128]; + sprintf( szMessage, "fread(%d) failed on DBF file.\n", psDBF->nRecordLength ); -#endif + psDBF->sHooks.Error( szMessage ); return FALSE; } @@ -491,8 +494,7 @@ if( pfCPG ) { size_t n; - char *buffer = (char *) pabyBuf; - buffer[0] = '\0'; + memset( pabyBuf, 0, nBufSize); psDBF->sHooks.FRead( pabyBuf, nBufSize - 1, 1, pfCPG ); n = strcspn( (char *) pabyBuf, "\n\r" ); if( n > 0 ) @@ -576,9 +578,6 @@ void SHPAPI_CALL DBFClose(DBFHandle psDBF) { - static char eof = 0x1a; - char eof_test; - if( psDBF == NULL ) return; @@ -597,19 +596,6 @@ if( psDBF->bUpdated ) DBFUpdateHeader( psDBF ); - -/* -------------------------------------------------------------------- */ -/* Add the DBF end-of-file marker after the last record. */ -/* -------------------------------------------------------------------- */ - - psDBF->sHooks.FSeek(psDBF->fp, -1, SEEK_END); - psDBF->sHooks.FRead(&eof_test, 1, 1, psDBF->fp); - if( eof_test != 0x1a ) /* no EOF exists, so write one */ - { - psDBF->sHooks.FSeek(psDBF->fp, 0, SEEK_END); - psDBF->sHooks.FWrite(&eof, 1, 1, psDBF->fp); - } - /* -------------------------------------------------------------------- */ /* Close, and free resources. */ /* -------------------------------------------------------------------- */ @@ -787,7 +773,7 @@ chNativeType = 'L'; else if( eType == FTString ) chNativeType = 'C'; - else if ( eType == FTDate ) + else if( eType == FTDate ) chNativeType = 'D'; else chNativeType = 'N'; @@ -797,6 +783,26 @@ } /************************************************************************/ +/* DBFGetNullCharacter() */ +/************************************************************************/ + +static char DBFGetNullCharacter(char chType) +{ + switch (chType) + { + case 'N': + case 'F': + return '*'; + case 'D': + return '0'; + case 'L': + return '?'; + default: + return ' '; + } +} + +/************************************************************************/ /* DBFAddField() */ /* */ /* Add a field to a newly created .dbf file before any records */ @@ -815,6 +821,10 @@ char chFieldFill; SAOffset nRecordOffset; + /* make sure that everything is written in .dbf */ + if( !DBFFlushRecord( psDBF ) ) + return -1; + /* -------------------------------------------------------------------- */ /* Do some checking to ensure we can add records to this file. */ /* -------------------------------------------------------------------- */ @@ -902,22 +912,7 @@ /* alloc record */ pszRecord = (char *) malloc(sizeof(char) * psDBF->nRecordLength); - switch (chType) - { - case 'N': - case 'F': - chFieldFill = '*'; - break; - case 'D': - chFieldFill = '0'; - break; - case 'L': - chFieldFill = '?'; - break; - default: - chFieldFill = ' '; - break; - } + chFieldFill = DBFGetNullCharacter(chType); for (i = psDBF->nRecords-1; i >= 0; --i) { @@ -944,76 +939,10 @@ psDBF->bNoHeader = TRUE; DBFUpdateHeader( psDBF ); - return( psDBF->nFields-1 ); -} - -/************************************************************************/ -/* DBFReadSetup() */ -/* */ -/* Prep a record for reading. */ -/************************************************************************/ - -int DBFReadSetup(DBFHandle psDBF, int hEntity) -{ - int nRecordOffset; - - /* -------------------------------------------------------------------- */ - /* Verify selection. */ - /* -------------------------------------------------------------------- */ - if ( hEntity < 0 || hEntity >= psDBF->nRecords ) - return( 0 ); - - /* -------------------------------------------------------------------- */ - /* Have we read the record? */ - /* -------------------------------------------------------------------- */ - if ( psDBF->nCurrentRecord != hEntity ) - { - DBFFlushRecord( psDBF ); - - nRecordOffset = psDBF->nRecordLength * hEntity + psDBF->nHeaderLength; - - if ( psDBF->sHooks.FSeek( psDBF->fp, nRecordOffset, 0 ) != 0 ) - { - fprintf( stderr, "fseek(%d) failed on DBF file.\n", - nRecordOffset ); - return 0; - } - - if ( psDBF->sHooks.FRead( psDBF->pszCurrentRecord, psDBF->nRecordLength, - 1, psDBF->fp ) != 1 ) - { - fprintf( stderr, "fread(%d) failed on DBF file.\n", - psDBF->nRecordLength ); - return 0; - } - - psDBF->nCurrentRecord = hEntity; - } - - return 1; - -} - - -/************************************************************************/ -/* DBFReadDeleted() */ -/* */ -/* Read whether a record is deleted. */ -/************************************************************************/ - -int DBFReadDeleted(DBFHandle psDBF, int hEntity) -{ - unsigned char *pabyRec; - - if ( ! DBFReadSetup( psDBF, hEntity) ) - return 0; - - /* get reference to current record */ - pabyRec = (unsigned char *) psDBF->pszCurrentRecord; - - /* 0x20 => not deleted, 0x24 => deleted */ - return *pabyRec == 0x20 ? 0 : 1; + psDBF->nCurrentRecord = -1; + psDBF->bCurrentRecordModified = FALSE; + return( psDBF->nFields-1 ); } /************************************************************************/ @@ -1169,34 +1098,28 @@ return( (const char *) DBFReadAttribute( psDBF, iRecord, iField, 'L' ) ); } + /************************************************************************/ -/* DBFIsAttributeNULL() */ +/* DBFIsValueNULL() */ /* */ -/* Return TRUE if value for field is NULL. */ -/* */ -/* Contributed by Jim Matthews. */ +/* Return TRUE if the passed string is NULL. */ /************************************************************************/ -int SHPAPI_CALL -DBFIsAttributeNULL( DBFHandle psDBF, int iRecord, int iField ) - +static int DBFIsValueNULL( char chType, const char* pszValue ) { - const char *pszValue; int i; - pszValue = DBFReadStringAttribute( psDBF, iRecord, iField ); - if( pszValue == NULL ) return TRUE; - switch(psDBF->pachFieldType[iField]) + switch(chType) { case 'N': case 'F': /* - ** We accept all asterisks or all blanks as NULL - ** though according to the spec I think it should be all - ** asterisks. + ** We accept all asterisks or all blanks as NULL + ** though according to the spec I think it should be all + ** asterisks. */ if( pszValue[0] == '*' ) return TRUE; @@ -1209,7 +1132,7 @@ return TRUE; case 'D': - /* NULL date fields have value "00000000" */ + /* NULL date fields have value "00000000" or blank or empty */ if (pszValue[0] == '\0' || // emtpy string strncmp(pszValue,"00000000",8) == 0 || strncmp(pszValue," ",8) == 0) { @@ -1220,14 +1143,12 @@ // return strncmp(pszValue,"00000000",8) == 0; case 'L': - // printf("Is [%s] NULL?", pszValue); - /* NULL boolean fields have value "?" */ - if (pszValue[0] == '\0' || pszValue[0] == '?') { - return 1; - } else { - return 0; - } - // return pszValue[0] == '?'; + /* NULL boolean fields have value "?" or empty */ + if (pszValue[0] == '\0' || pszValue[0] == '?') { + return 1; + } else { + return 0; + } default: /* empty string fields are considered NULL */ @@ -1236,6 +1157,28 @@ } /************************************************************************/ +/* DBFIsAttributeNULL() */ +/* */ +/* Return TRUE if value for field is NULL. */ +/* */ +/* Contributed by Jim Matthews. */ +/************************************************************************/ + +int SHPAPI_CALL +DBFIsAttributeNULL( DBFHandle psDBF, int iRecord, int iField ) + +{ + const char *pszValue; + + pszValue = DBFReadStringAttribute( psDBF, iRecord, iField ); + + if( pszValue == NULL ) + return TRUE; + + return DBFIsValueNULL( psDBF->pachFieldType[iField], pszValue ); +} + +/************************************************************************/ /* DBFGetFieldCount() */ /* */ /* Return the number of fields in this table. */ @@ -1295,8 +1238,7 @@ return( FTLogical); else if ( psDBF->pachFieldType[iField] == 'D' ) - return ( FTDate ); - + return ( FTDate ); else if( psDBF->pachFieldType[iField] == 'N' || psDBF->pachFieldType[iField] == 'F' ) @@ -1370,33 +1312,9 @@ /* -------------------------------------------------------------------- */ if( pValue == NULL ) { - switch(psDBF->pachFieldType[iField]) - { - case 'N': - case 'F': - /* NULL numeric fields have value "****************" */ - memset( (char *) (pabyRec+psDBF->panFieldOffset[iField]), '*', - psDBF->panFieldSize[iField] ); - break; - - case 'D': - /* NULL date fields have value "00000000" */ - memset( (char *) (pabyRec+psDBF->panFieldOffset[iField]), '0', - psDBF->panFieldSize[iField] ); - break; - - case 'L': - /* NULL boolean fields have value "?" */ - memset( (char *) (pabyRec+psDBF->panFieldOffset[iField]), '?', - psDBF->panFieldSize[iField] ); - break; - - default: - /* empty string fields are considered NULL */ - memset( (char *) (pabyRec+psDBF->panFieldOffset[iField]), ' ', - psDBF->panFieldSize[iField] ); - break; - } + memset( (char *) (pabyRec+psDBF->panFieldOffset[iField]), + DBFGetNullCharacter(psDBF->pachFieldType[iField]), + psDBF->panFieldSize[iField] ); return TRUE; } @@ -1483,7 +1401,7 @@ int SHPAPI_CALL DBFWriteAttributeDirectly(DBFHandle psDBF, int hEntity, int iField, - const void * pValue ) + void * pValue ) { int i, j; @@ -1935,7 +1853,7 @@ psDBF->nRecordLength -= nDeletedFieldSize; /* overwrite field information in header */ - memcpy(psDBF->pszHeader + iField*32, + memmove(psDBF->pszHeader + iField*32, psDBF->pszHeader + (iField+1)*32, sizeof(char) * (psDBF->nFields - iField)*32); @@ -1983,5 +1901,337 @@ /* free record */ free(pszRecord); + psDBF->nCurrentRecord = -1; + psDBF->bCurrentRecordModified = FALSE; + + return TRUE; +} + +/************************************************************************/ +/* DBFReorderFields() */ +/* */ +/* Reorder the fields of a .dbf file */ +/* */ +/* panMap must be exactly psDBF->nFields long and be a permutation */ +/* of [0, psDBF->nFields-1]. This assumption will not be asserted in the*/ +/* code of DBFReorderFields. */ +/************************************************************************/ + +int SHPAPI_CALL +DBFReorderFields( DBFHandle psDBF, int* panMap ) +{ + SAOffset nRecordOffset; + int i, iRecord; + int *panFieldOffsetNew; + int *panFieldSizeNew; + int *panFieldDecimalsNew; + char *pachFieldTypeNew; + char *pszHeaderNew; + char *pszRecord; + char *pszRecordNew; + + if ( psDBF->nFields == 0 ) + return TRUE; + + /* make sure that everything is written in .dbf */ + if( !DBFFlushRecord( psDBF ) ) + return FALSE; + + panFieldOffsetNew = (int *) malloc(sizeof(int) * psDBF->nFields); + panFieldSizeNew = (int *) malloc(sizeof(int) * psDBF->nFields); + panFieldDecimalsNew = (int *) malloc(sizeof(int) * psDBF->nFields); + pachFieldTypeNew = (char *) malloc(sizeof(char) * psDBF->nFields); + pszHeaderNew = (char*) malloc(sizeof(char) * 32 * psDBF->nFields); + + /* shuffle fields definitions */ + for(i=0; i < psDBF->nFields; i++) + { + panFieldSizeNew[i] = psDBF->panFieldSize[panMap[i]]; + panFieldDecimalsNew[i] = psDBF->panFieldDecimals[panMap[i]]; + pachFieldTypeNew[i] = psDBF->pachFieldType[panMap[i]]; + memcpy(pszHeaderNew + i * 32, + psDBF->pszHeader + panMap[i] * 32, 32); + } + panFieldOffsetNew[0] = 1; + for(i=1; i < psDBF->nFields; i++) + { + panFieldOffsetNew[i] = panFieldOffsetNew[i - 1] + panFieldSizeNew[i - 1]; + } + + free(psDBF->pszHeader); + psDBF->pszHeader = pszHeaderNew; + + /* we're done if we're dealing with not yet created .dbf */ + if ( !(psDBF->bNoHeader && psDBF->nRecords == 0) ) + { + /* force update of header with new header and record length */ + psDBF->bNoHeader = TRUE; + DBFUpdateHeader( psDBF ); + + /* alloc record */ + pszRecord = (char *) malloc(sizeof(char) * psDBF->nRecordLength); + pszRecordNew = (char *) malloc(sizeof(char) * psDBF->nRecordLength); + + /* shuffle fields in records */ + for (iRecord = 0; iRecord < psDBF->nRecords; iRecord++) + { + nRecordOffset = + psDBF->nRecordLength * (SAOffset) iRecord + psDBF->nHeaderLength; + + /* load record */ + psDBF->sHooks.FSeek( psDBF->fp, nRecordOffset, 0 ); + psDBF->sHooks.FRead( pszRecord, psDBF->nRecordLength, 1, psDBF->fp ); + + pszRecordNew[0] = pszRecord[0]; + + for(i=0; i < psDBF->nFields; i++) + { + memcpy(pszRecordNew + panFieldOffsetNew[i], + pszRecord + psDBF->panFieldOffset[panMap[i]], + psDBF->panFieldSize[panMap[i]]); + } + + /* write record */ + psDBF->sHooks.FSeek( psDBF->fp, nRecordOffset, 0 ); + psDBF->sHooks.FWrite( pszRecordNew, psDBF->nRecordLength, 1, psDBF->fp ); + } + + /* free record */ + free(pszRecord); + free(pszRecordNew); + } + + free(psDBF->panFieldOffset); + free(psDBF->panFieldSize); + free(psDBF->panFieldDecimals); + free(psDBF->pachFieldType); + + psDBF->panFieldOffset = panFieldOffsetNew; + psDBF->panFieldSize = panFieldSizeNew; + psDBF->panFieldDecimals =panFieldDecimalsNew; + psDBF->pachFieldType = pachFieldTypeNew; + + psDBF->nCurrentRecord = -1; + psDBF->bCurrentRecordModified = FALSE; + + return TRUE; +} + + +/************************************************************************/ +/* DBFAlterFieldDefn() */ +/* */ +/* Alter a field definition in a .dbf file */ +/************************************************************************/ + +int SHPAPI_CALL +DBFAlterFieldDefn( DBFHandle psDBF, int iField, const char * pszFieldName, + char chType, int nWidth, int nDecimals ) +{ + int i; + int iRecord; + int nOffset; + int nOldWidth; + int nOldRecordLength; + int nRecordOffset; + char* pszFInfo; + char chOldType; + int bIsNULL; + char chFieldFill; + + if (iField < 0 || iField >= psDBF->nFields) + return FALSE; + + /* make sure that everything is written in .dbf */ + if( !DBFFlushRecord( psDBF ) ) + return FALSE; + + chFieldFill = DBFGetNullCharacter(chType); + + chOldType = psDBF->pachFieldType[iField]; + nOffset = psDBF->panFieldOffset[iField]; + nOldWidth = psDBF->panFieldSize[iField]; + nOldRecordLength = psDBF->nRecordLength; + +/* -------------------------------------------------------------------- */ +/* Do some checking to ensure we can add records to this file. */ +/* -------------------------------------------------------------------- */ + if( nWidth < 1 ) + return -1; + + if( nWidth > 255 ) + nWidth = 255; + +/* -------------------------------------------------------------------- */ +/* Assign the new field information fields. */ +/* -------------------------------------------------------------------- */ + psDBF->panFieldSize[iField] = nWidth; + psDBF->panFieldDecimals[iField] = nDecimals; + psDBF->pachFieldType[iField] = chType; + +/* -------------------------------------------------------------------- */ +/* Update the header information. */ +/* -------------------------------------------------------------------- */ + pszFInfo = psDBF->pszHeader + 32 * iField; + + for( i = 0; i < 32; i++ ) + pszFInfo[i] = '\0'; + + if( (int) strlen(pszFieldName) < 10 ) + strncpy( pszFInfo, pszFieldName, strlen(pszFieldName)); + else + strncpy( pszFInfo, pszFieldName, 10); + + pszFInfo[11] = psDBF->pachFieldType[iField]; + + if( chType == 'C' ) + { + pszFInfo[16] = (unsigned char) (nWidth % 256); + pszFInfo[17] = (unsigned char) (nWidth / 256); + } + else + { + pszFInfo[16] = (unsigned char) nWidth; + pszFInfo[17] = (unsigned char) nDecimals; + } + +/* -------------------------------------------------------------------- */ +/* Update offsets */ +/* -------------------------------------------------------------------- */ + if (nWidth != nOldWidth) + { + for (i = iField + 1; i < psDBF->nFields; i++) + psDBF->panFieldOffset[i] += nWidth - nOldWidth; + psDBF->nRecordLength += nWidth - nOldWidth; + + psDBF->pszCurrentRecord = (char *) SfRealloc(psDBF->pszCurrentRecord, + psDBF->nRecordLength); + } + + /* we're done if we're dealing with not yet created .dbf */ + if ( psDBF->bNoHeader && psDBF->nRecords == 0 ) + return TRUE; + + /* force update of header with new header and record length */ + psDBF->bNoHeader = TRUE; + DBFUpdateHeader( psDBF ); + + if (nWidth < nOldWidth || (nWidth == nOldWidth && chType != chOldType)) + { + char* pszRecord = (char *) malloc(sizeof(char) * nOldRecordLength); + char* pszOldField = (char *) malloc(sizeof(char) * (nOldWidth + 1)); + + pszOldField[nOldWidth] = 0; + + /* move records to their new positions */ + for (iRecord = 0; iRecord < psDBF->nRecords; iRecord++) + { + nRecordOffset = + nOldRecordLength * (SAOffset) iRecord + psDBF->nHeaderLength; + + /* load record */ + psDBF->sHooks.FSeek( psDBF->fp, nRecordOffset, 0 ); + psDBF->sHooks.FRead( pszRecord, nOldRecordLength, 1, psDBF->fp ); + + memcpy(pszOldField, pszRecord + nOffset, nOldWidth); + bIsNULL = DBFIsValueNULL( chOldType, pszOldField ); + + if (nWidth != nOldWidth) + { + if ((chOldType == 'N' || chOldType == 'F') && pszOldField[0] == ' ') + { + /* Strip leading spaces when truncating a numeric field */ + memmove( pszRecord + nOffset, + pszRecord + nOffset + nOldWidth - nWidth, + nWidth ); + } + if (nOffset + nOldWidth < nOldRecordLength) + { + memmove( pszRecord + nOffset + nWidth, + pszRecord + nOffset + nOldWidth, + nOldRecordLength - (nOffset + nOldWidth)); + } + } + + /* Convert null value to the appropriate value of the new type */ + if (bIsNULL) + { + memset( pszRecord + nOffset, chFieldFill, nWidth); + } + + nRecordOffset = + psDBF->nRecordLength * (SAOffset) iRecord + psDBF->nHeaderLength; + + /* write record */ + psDBF->sHooks.FSeek( psDBF->fp, nRecordOffset, 0 ); + psDBF->sHooks.FWrite( pszRecord, psDBF->nRecordLength, 1, psDBF->fp ); + } + + free(pszRecord); + free(pszOldField); + } + else if (nWidth > nOldWidth) + { + char* pszRecord = (char *) malloc(sizeof(char) * psDBF->nRecordLength); + char* pszOldField = (char *) malloc(sizeof(char) * (nOldWidth + 1)); + + pszOldField[nOldWidth] = 0; + + /* move records to their new positions */ + for (iRecord = psDBF->nRecords - 1; iRecord >= 0; iRecord--) + { + nRecordOffset = + nOldRecordLength * (SAOffset) iRecord + psDBF->nHeaderLength; + + /* load record */ + psDBF->sHooks.FSeek( psDBF->fp, nRecordOffset, 0 ); + psDBF->sHooks.FRead( pszRecord, nOldRecordLength, 1, psDBF->fp ); + + memcpy(pszOldField, pszRecord + nOffset, nOldWidth); + bIsNULL = DBFIsValueNULL( chOldType, pszOldField ); + + if (nOffset + nOldWidth < nOldRecordLength) + { + memmove( pszRecord + nOffset + nWidth, + pszRecord + nOffset + nOldWidth, + nOldRecordLength - (nOffset + nOldWidth)); + } + + /* Convert null value to the appropriate value of the new type */ + if (bIsNULL) + { + memset( pszRecord + nOffset, chFieldFill, nWidth); + } + else + { + if ((chOldType == 'N' || chOldType == 'F')) + { + /* Add leading spaces when expanding a numeric field */ + memmove( pszRecord + nOffset + nWidth - nOldWidth, + pszRecord + nOffset, nOldWidth ); + memset( pszRecord + nOffset, ' ', nWidth - nOldWidth ); + } + else + { + /* Add trailing spaces */ + memset(pszRecord + nOffset + nOldWidth, ' ', nWidth - nOldWidth); + } + } + + nRecordOffset = + psDBF->nRecordLength * (SAOffset) iRecord + psDBF->nHeaderLength; + + /* write record */ + psDBF->sHooks.FSeek( psDBF->fp, nRecordOffset, 0 ); + psDBF->sHooks.FWrite( pszRecord, psDBF->nRecordLength, 1, psDBF->fp ); + } + + free(pszRecord); + free(pszOldField); + } + + psDBF->nCurrentRecord = -1; + psDBF->bCurrentRecordModified = FALSE; + return TRUE; } Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/loader/image/error.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/loader/image/error.png differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/loader/image/good.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/loader/image/good.png differ diff -Nru postgis-1.5.3/loader/image/icon_source.svg postgis-2.0.1/loader/image/icon_source.svg --- postgis-1.5.3/loader/image/icon_source.svg 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/loader/image/icon_source.svg 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,219 @@ + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + ! + + + + + + + Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/loader/image/warn.png and /tmp/0gD0VaZ8_r/postgis-2.0.1/loader/image/warn.png differ diff -Nru postgis-1.5.3/loader/pgsql2shp-cli.c postgis-2.0.1/loader/pgsql2shp-cli.c --- postgis-1.5.3/loader/pgsql2shp-cli.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/loader/pgsql2shp-cli.c 2012-03-27 10:51:20.000000000 +0000 @@ -0,0 +1,237 @@ +/********************************************************************** + * $Id: pgsql2shp-cli.c 5450 2010-03-22 19:38:14Z pramsey $ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * Copyright 2001-2003 Refractions Research Inc. + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + ********************************************************************** + * + * PostGIS to Shapefile converter + * + * Original Author: Jeff Lounsbury + * Maintainer: Sandro Santilli + * + **********************************************************************/ + +#include "pgsql2shp-core.h" +#include "../postgis_config.h" + + +static void +usage() +{ + printf(_( "RELEASE: %s (r%d)\n" ), POSTGIS_LIB_VERSION, POSTGIS_SVN_REVISION); + printf(_("USAGE: pgsql2shp [] [.]
A multipolygon shown with a linestring (before any snapping)A multipolygon snapped to linestring to tolerance: 1.01 of distance. + The new multipolygon is shown with reference linestringA multipolygon snapped to linestring to tolerance: 1.25 of distance. + The new multipolygon is shown with reference linestringThe linestring snapped to the original multipolygon at tolerance 1.01 of distance. + The new linestring is shown with reference multipolygonThe linestring snapped to the original multipolygon at tolerance 1.25 of distance. + The new linestring is shown with reference multipolygon degAz is path to travel (azimuth), horizontal line (which starts at the start point and ends where we want the end point to fall) + and points (start point: 25,45 is in green)degAzrev is azimuth curve shown, horizontal line (which starts at the start point and ends where we want the end point to fall) + and points (start point: 75,100 is in green) MULTIPOINT / MULTIPOINTLINESTRING / LINESTRINGPOLYGON / POLYGON ST_ConcaveHull of 2 polygons encased in target 100% shrink concave hull-- geometries overlaid with concavehull + at target 90% of convex hull areaL Shape points overlaid with convex hullST_ConcaveHull of L points at target 99% of convex hullConcave Hull of L points at target 80% convex hull areamultilinestring overlaid with Convex hullmultilinestring with overlaid with Concave hull + of linestrings at 99% target -- first hop 15, 'quad_segs=4 join=round' original line +and its offset 15 units.-15, 'quad_segs=4 join=round' original line + and its offset -15 units double-offset to get more curvy, note the first reverses direction, so -30 + 15 = -15double-offset to get more curvy,combined with regular offset 15 to get parallel lines. Overlaid with original.15, 'quad_segs=4 join=bevel' shown with original line15,-15 collected, join=mitre mitre_limit=2.1A multilinestring and a linestringThe shared path of multilinestring and linestring overlaid with original geometries. Before SplitAfter splitBefore SplitAfter split black circleexample from buffer rendered with just PostGISoriginal (column rast)dupe_bandsing_bandPixel Width: Pixel size in the i directionPixel Height: Pixel size in the j directionoriginal mass state plane meters (mass_stm)After transform to wgs 84 long lat (wgs_84)After transform to wgs 84 long lat with bilinear algorithm instead of NN default (wgs_84_bilin)Full raster tile before clippingAfter ClippingFull raster tile before clippingAfter Clipping - surrealFull raster tile before clippingAfter Clippingoriginal (column rast-view)rast_view_mamapalgebra intersectionmap algebra unionrast1rast2rast3final_rastThe blue lines are the boundaries of select parcelsoriginal (column rast-view)rast_view_mamap bands overlay (canvas) (R: small road, G: circle, B: big road)user defined with extra args and different bands from same rasterFirst band of our rasternew raster after averaging pixels withing 4x4 pixels of each other (o) (p)
]]> + +
]]>.html]]>]]>]]>1 ]]> + + 2 ]]> + mm ]]> + G ]]> + g3.3 ]]> + 3d ]]> + + + () + + + + + +
    ]]>]]>]]> + ]]> +
]]> + Examples + +
]]> + + +
]]>.html]]>]]>]]>1 ]]> + + 2 ]]> + mm ]]> + G ]]> + g3.3 ]]> + 3D ]]> + + + () + + + + + +
    ]]>]]>]]> + ]]> +
]]> + Examples + +
]]> + + +
]]>]]>1 ]]> + + 2 ]]> + mm ]]> + G ]]> + g3.3 ]]> + 3D ]]> + + + () + + + + + +
    ]]>]]>]]> + ]]> +
]]> + Examples + + + + +
]]> + + +
]]>.html]]>]]>]]>1 ]]> + + 2 ]]> + mm ]]> + G ]]> + g3.3 ]]> + 3D ]]> + + + () + + + + + +
    ]]>]]>]]> + ]]> +
]]> + Examples + + + +
\n" + " pgsql2shp [] \n" + "\n" + "OPTIONS:\n" )); + printf(_(" -f Use this option to specify the name of the file to create.\n" )); + printf(_(" -h Allows you to specify connection to a database on a\n" + " machine other than the default.\n" )); + printf(_(" -p Allows you to specify a database port other than the default.\n" )); + printf(_(" -P Connect to the database with the specified password.\n" )); + printf(_(" -u Connect to the database as the specified user.\n" )); + printf(_(" -g Specify the geometry column to be exported.\n" )); + printf(_(" -b Use a binary cursor.\n" )); + printf(_(" -r Raw mode. Do not assume table has been created by the loader. This would\n" + " not unescape attribute names and will not skip the 'gid' attribute.\n" )); + printf(_(" -k Keep PostgreSQL identifiers case.\n" )); + printf(_(" -m Specify a file containing a set of mappings of (long) column\n" + " names to 10 character DBF column names. The content of the file is one or\n" + " more lines of two names separated by white space and no trailing or\n" + " leading space. For example:\n" + " COLUMNNAME DBFFIELD1\n" + " AVERYLONGCOLUMNNAME DBFFIELD2\n" )); + printf(_(" -? Display this help screen.\n\n" )); +} + +int +main(int argc, char **argv) +{ + SHPDUMPERCONFIG *config; + SHPDUMPERSTATE *state; + + int ret, c, i; + + /* If no options are specified, display usage */ + if (argc == 1) + { + usage(); + exit(0); + } + + /* Parse command line options and set configuration */ + config = malloc(sizeof(SHPDUMPERCONFIG)); + set_dumper_config_defaults(config); + + while ((c = pgis_getopt(argc, argv, "bf:h:du:p:P:g:rkm:")) != EOF) + { + switch (c) + { + case 'b': + config->binary = 1; + break; + case 'f': + config->shp_file = pgis_optarg; + break; + case 'h': + config->conn->host = pgis_optarg; + break; + case 'd': + config->dswitchprovided = 1; + break; + case 'r': + config->includegid = 1; + config->unescapedattrs = 1; + break; + case 'u': + config->conn->username = pgis_optarg; + break; + case 'p': + config->conn->port = pgis_optarg; + break; + case 'P': + config->conn->password = pgis_optarg; + break; + case 'g': + config->geo_col_name = pgis_optarg; + break; + case 'm': + config->column_map_filename = pgis_optarg; + break; + case 'k': + config->keep_fieldname_case = 1; + break; + case '?': + usage(); + exit(0); + default: + usage(); + exit(0); + } + } + + + /* Determine the database name from the next argument, if no database, exit. */ + if (pgis_optind < argc) + { + config->conn->database = argv[pgis_optind]; + pgis_optind++; + } + else + { + usage(); + exit(0); + } + + + /* Determine the table and schema names from the next argument if supplied, otherwise if + it's a user-defined query then set that instead */ + if (pgis_optind < argc) + { + char *ptr; + + /* User-defined queries begin with SELECT */ + if (!strncmp(argv[pgis_optind], "SELECT ", 7) || + !strncmp(argv[pgis_optind], "select ", 7)) + { + config->usrquery = argv[pgis_optind]; + } + else + { + /* Schema qualified table name */ + ptr = strchr(argv[pgis_optind], '.'); + + if (ptr) + { + config->schema = malloc(strlen(argv[pgis_optind]) + 1); + snprintf(config->schema, ptr - argv[pgis_optind] + 1, "%s", argv[pgis_optind]); + + config->table = malloc(strlen(argv[pgis_optind])); + snprintf(config->table, strlen(argv[pgis_optind]) - strlen(config->schema), "%s", ptr + 1); + } + else + { + config->table = malloc(strlen(argv[pgis_optind]) + 1); + strcpy(config->table, argv[pgis_optind]); + } + } + } + + state = ShpDumperCreate(config); + + ret = ShpDumperConnectDatabase(state); + if (ret != SHPDUMPEROK) + { + fprintf(stderr, "%s\n", state->message); + fflush(stderr); + exit(1); + } + + /* Display a warning if the -d switch is used with PostGIS >= 1.0 */ + if (state->pgis_major_version > 0 && state->config->dswitchprovided) + { + fprintf(stderr, _("WARNING: -d switch is useless when dumping from postgis-1.0.0+\n")); + fflush(stderr); + } + + /* Open the table ready to return rows */ + fprintf(stdout, _("Initializing... \n")); + fflush(stdout); + + ret = ShpDumperOpenTable(state); + if (ret != SHPDUMPEROK) + { + fprintf(stderr, "%s\n", state->message); + fflush(stderr); + + if (ret == SHPDUMPERERR) + exit(1); + } + + fprintf(stdout, _("Done (postgis major version: %d).\n"), state->pgis_major_version); + fprintf(stdout, _("Output shape: %s\n"), shapetypename(state->outshptype)); + fprintf(stdout, _("Dumping: ")); + fflush(stdout); + + for (i = 0; i < ShpDumperGetRecordCount(state); i++) + { + /* Mimic existing behaviour */ + if (!(state->currow % state->config->fetchsize)) + { + fprintf(stdout, "X"); + fflush(stdout); + } + + ret = ShpLoaderGenerateShapeRow(state); + if (ret != SHPDUMPEROK) + { + fprintf(stderr, "%s\n", state->message); + fflush(stderr); + + if (ret == SHPDUMPERERR) + exit(1); + } + } + + fprintf(stdout, _(" [%d rows].\n"), ShpDumperGetRecordCount(state)); + fflush(stdout); + + ret = ShpDumperCloseTable(state); + if (ret != SHPDUMPEROK) + { + fprintf(stderr, "%s\n", state->message); + fflush(stderr); + + if (ret == SHPDUMPERERR) + exit(1); + } + + ShpDumperDestroy(state); + + return 0; +} diff -Nru postgis-1.5.3/loader/pgsql2shp-core.c postgis-2.0.1/loader/pgsql2shp-core.c --- postgis-1.5.3/loader/pgsql2shp-core.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/loader/pgsql2shp-core.c 2012-05-21 08:05:57.000000000 +0000 @@ -0,0 +1,2307 @@ +/********************************************************************** + * $Id: pgsql2shp.c 5450 2010-03-22 19:38:14Z pramsey $ + * + * PostGIS - Spatial Types for PostgreSQL + * http://www.postgis.org + * + * Copyright (C) 2001-2003 Refractions Research Inc. + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + ********************************************************************** + * + * PostGIS to Shapefile converter + * + * Original Author: Jeff Lounsbury + * Contributions by: Sandro Santilli + * Enhanced by: Mark Cave-Ayland + * + **********************************************************************/ + +#include "../postgis_config.h" + +#include "pgsql2shp-core.h" + +/* Solaris9 does not provide stdint.h */ +/* #include */ +#include + +#ifdef HAVE_UNISTD_H /* for getpid() and getopt */ +#include +#endif + +#ifdef __CYGWIN__ +#include +#endif + +#include "../liblwgeom/liblwgeom.h" /* for LWGEOM struct and funx */ +#include "../liblwgeom/lwgeom_log.h" /* for LWDEBUG macros */ + +/* Maximum DBF field width (according to ARCGIS) */ +#define MAX_DBF_FIELD_SIZE 254 + + +/* Prototypes */ +static int reverse_points(int num_points, double *x, double *y, double *z, double *m); +static int is_clockwise(int num_points,double *x,double *y,double *z); +static int is_bigendian(void); +static SHPObject *create_point(SHPDUMPERSTATE *state, LWPOINT *lwpoint); +static SHPObject *create_multipoint(SHPDUMPERSTATE *state, LWMPOINT *lwmultipoint); +static SHPObject *create_polygon(SHPDUMPERSTATE *state, LWPOLY *lwpolygon); +static SHPObject *create_multipolygon(SHPDUMPERSTATE *state, LWMPOLY *lwmultipolygon); +static SHPObject *create_linestring(SHPDUMPERSTATE *state, LWLINE *lwlinestring); +static SHPObject *create_multilinestring(SHPDUMPERSTATE *state, LWMLINE *lwmultilinestring); +static char *nullDBFValue(char fieldType); +static int getMaxFieldSize(PGconn *conn, char *schema, char *table, char *fname); +static int getTableInfo(SHPDUMPERSTATE *state); +static int projFileCreate(SHPDUMPERSTATE *state); + +/** + * @brief Make appropriate formatting of a DBF value based on type. + * Might return untouched input or pointer to static private + * buffer: use return value right away. + */ +static char * goodDBFValue(char *in, char fieldType); + +/** @brief Binary to hexewkb conversion function */ +char *convert_bytes_to_hex(uint8_t *ewkb, size_t size); + + +static SHPObject * +create_point(SHPDUMPERSTATE *state, LWPOINT *lwpoint) +{ + SHPObject *obj; + POINT4D p4d; + + double *xpts, *ypts, *zpts, *mpts; + + /* Allocate storage for points */ + xpts = malloc(sizeof(double)); + ypts = malloc(sizeof(double)); + zpts = malloc(sizeof(double)); + mpts = malloc(sizeof(double)); + + /* Grab the point: note getPoint4d will correctly handle + the case where the POINTs don't contain Z or M coordinates */ + p4d = getPoint4d(lwpoint->point, 0); + + xpts[0] = p4d.x; + ypts[0] = p4d.y; + zpts[0] = p4d.z; + mpts[0] = p4d.m; + + LWDEBUGF(4, "Point: %g %g %g %g", xpts[0], ypts[0], zpts[0], mpts[0]); + + obj = SHPCreateObject(state->outshptype, -1, 0, NULL, NULL, 1, xpts, ypts, zpts, mpts); + + free(xpts); + free(ypts); + free(zpts); + free(mpts); + + return obj; +} + +static SHPObject * +create_multipoint(SHPDUMPERSTATE *state, LWMPOINT *lwmultipoint) +{ + SHPObject *obj; + POINT4D p4d; + int i; + + double *xpts, *ypts, *zpts, *mpts; + + /* Allocate storage for points */ + xpts = malloc(sizeof(double) * lwmultipoint->ngeoms); + ypts = malloc(sizeof(double) * lwmultipoint->ngeoms); + zpts = malloc(sizeof(double) * lwmultipoint->ngeoms); + mpts = malloc(sizeof(double) * lwmultipoint->ngeoms); + + /* Grab the points: note getPoint4d will correctly handle + the case where the POINTs don't contain Z or M coordinates */ + for (i = 0; i < lwmultipoint->ngeoms; i++) + { + p4d = getPoint4d(lwmultipoint->geoms[i]->point, 0); + + xpts[i] = p4d.x; + ypts[i] = p4d.y; + zpts[i] = p4d.z; + mpts[i] = p4d.m; + + LWDEBUGF(4, "MultiPoint %d - Point: %g %g %g %g", i, xpts[i], ypts[i], zpts[i], mpts[i]); + } + + obj = SHPCreateObject(state->outshptype, -1, 0, NULL, NULL, lwmultipoint->ngeoms, xpts, ypts, zpts, mpts); + + free(xpts); + free(ypts); + free(zpts); + free(mpts); + + return obj; +} + +static SHPObject * +create_polygon(SHPDUMPERSTATE *state, LWPOLY *lwpolygon) +{ + SHPObject *obj; + POINT4D p4d; + int i, j; + + double *xpts, *ypts, *zpts, *mpts; + + int *shpparts, shppointtotal = 0, shppoint = 0; + + /* Allocate storage for ring pointers */ + shpparts = malloc(sizeof(int) * lwpolygon->nrings); + + /* First count through all the points in each ring so we now how much memory is required */ + for (i = 0; i < lwpolygon->nrings; i++) + shppointtotal += lwpolygon->rings[i]->npoints; + + /* Allocate storage for points */ + xpts = malloc(sizeof(double) * shppointtotal); + ypts = malloc(sizeof(double) * shppointtotal); + zpts = malloc(sizeof(double) * shppointtotal); + mpts = malloc(sizeof(double) * shppointtotal); + + LWDEBUGF(4, "Total number of points: %d", shppointtotal); + + /* Iterate through each ring setting up shpparts to point to the beginning of each ring */ + for (i = 0; i < lwpolygon->nrings; i++) + { + /* For each ring, store the integer coordinate offset for the start of each ring */ + shpparts[i] = shppoint; + + for (j = 0; j < lwpolygon->rings[i]->npoints; j++) + { + p4d = getPoint4d(lwpolygon->rings[i], j); + + xpts[shppoint] = p4d.x; + ypts[shppoint] = p4d.y; + zpts[shppoint] = p4d.z; + mpts[shppoint] = p4d.m; + + LWDEBUGF(4, "Polygon Ring %d - Point: %g %g %g %g", i, xpts[shppoint], ypts[shppoint], zpts[shppoint], mpts[shppoint]); + + /* Increment the point counter */ + shppoint++; + } + + /* + * First ring should be clockwise, + * other rings should be counter-clockwise + */ + if ( i == 0 ) + { + if ( ! is_clockwise(lwpolygon->rings[i]->npoints, + &xpts[shpparts[i]], &ypts[shpparts[i]], NULL) ) + { + LWDEBUG(4, "Outer ring not clockwise, forcing clockwise\n"); + + reverse_points(lwpolygon->rings[i]->npoints, + &xpts[shpparts[i]], &ypts[shpparts[i]], + &zpts[shpparts[i]], &mpts[shpparts[i]]); + } + } + else + { + if ( is_clockwise(lwpolygon->rings[i]->npoints, + &xpts[shpparts[i]], &ypts[shpparts[i]], NULL) ) + { + LWDEBUGF(4, "Inner ring %d not counter-clockwise, forcing counter-clockwise\n", i); + + reverse_points(lwpolygon->rings[i]->npoints, + &xpts[shpparts[i]], &ypts[shpparts[i]], + &zpts[shpparts[i]], &mpts[shpparts[i]]); + } + } + } + + obj = SHPCreateObject(state->outshptype, -1, lwpolygon->nrings, shpparts, NULL, shppointtotal, xpts, ypts, zpts, mpts); + + free(xpts); + free(ypts); + free(zpts); + free(mpts); + free(shpparts); + + return obj; +} + +static SHPObject * +create_multipolygon(SHPDUMPERSTATE *state, LWMPOLY *lwmultipolygon) +{ + SHPObject *obj; + POINT4D p4d; + int i, j, k; + + double *xpts, *ypts, *zpts, *mpts; + + int *shpparts, shppointtotal = 0, shppoint = 0, shpringtotal = 0, shpring = 0; + + /* NOTE: Multipolygons are stored in shapefiles as Polygon* shapes with multiple outer rings */ + + /* First count through each ring of each polygon so we now know much memory is required */ + for (i = 0; i < lwmultipolygon->ngeoms; i++) + { + for (j = 0; j < lwmultipolygon->geoms[i]->nrings; j++) + { + shpringtotal++; + shppointtotal += lwmultipolygon->geoms[i]->rings[j]->npoints; + } + } + + /* Allocate storage for ring pointers */ + shpparts = malloc(sizeof(int) * shpringtotal); + + /* Allocate storage for points */ + xpts = malloc(sizeof(double) * shppointtotal); + ypts = malloc(sizeof(double) * shppointtotal); + zpts = malloc(sizeof(double) * shppointtotal); + mpts = malloc(sizeof(double) * shppointtotal); + + LWDEBUGF(4, "Total number of rings: %d Total number of points: %d", shpringtotal, shppointtotal); + + /* Iterate through each ring of each polygon in turn */ + for (i = 0; i < lwmultipolygon->ngeoms; i++) + { + for (j = 0; j < lwmultipolygon->geoms[i]->nrings; j++) + { + /* For each ring, store the integer coordinate offset for the start of each ring */ + shpparts[shpring] = shppoint; + + LWDEBUGF(4, "Ring offset: %d", shpring); + + for (k = 0; k < lwmultipolygon->geoms[i]->rings[j]->npoints; k++) + { + p4d = getPoint4d(lwmultipolygon->geoms[i]->rings[j], k); + + xpts[shppoint] = p4d.x; + ypts[shppoint] = p4d.y; + zpts[shppoint] = p4d.z; + mpts[shppoint] = p4d.m; + + LWDEBUGF(4, "MultiPolygon %d Polygon Ring %d - Point: %g %g %g %g", i, j, xpts[shppoint], ypts[shppoint], zpts[shppoint], mpts[shppoint]); + + /* Increment the point counter */ + shppoint++; + } + + /* + * First ring should be clockwise, + * other rings should be counter-clockwise + */ + if ( j == 0 ) + { + if ( ! is_clockwise(lwmultipolygon->geoms[i]->rings[j]->npoints, + &xpts[shpparts[shpring]], &ypts[shpparts[shpring]], NULL) ) + { + LWDEBUG(4, "Outer ring not clockwise, forcing clockwise\n"); + + reverse_points(lwmultipolygon->geoms[i]->rings[j]->npoints, + &xpts[shpparts[shpring]], &ypts[shpparts[shpring]], + &zpts[shpparts[shpring]], &mpts[shpparts[shpring]]); + } + } + else + { + if ( is_clockwise(lwmultipolygon->geoms[i]->rings[j]->npoints, + &xpts[shpparts[shpring]], &ypts[shpparts[shpring]], NULL) ) + { + LWDEBUGF(4, "Inner ring %d not counter-clockwise, forcing counter-clockwise\n", i); + + reverse_points(lwmultipolygon->geoms[i]->rings[j]->npoints, + &xpts[shpparts[shpring]], &ypts[shpparts[shpring]], + &zpts[shpparts[shpring]], &mpts[shpparts[shpring]]); + } + } + + /* Increment the ring counter */ + shpring++; + } + } + + obj = SHPCreateObject(state->outshptype, -1, shpringtotal, shpparts, NULL, shppointtotal, xpts, ypts, zpts, mpts); + + free(xpts); + free(ypts); + free(zpts); + free(mpts); + free(shpparts); + + return obj; +} + +static SHPObject * +create_linestring(SHPDUMPERSTATE *state, LWLINE *lwlinestring) +{ + SHPObject *obj; + POINT4D p4d; + int i; + + double *xpts, *ypts, *zpts, *mpts; + + /* Allocate storage for points */ + xpts = malloc(sizeof(double) * lwlinestring->points->npoints); + ypts = malloc(sizeof(double) * lwlinestring->points->npoints); + zpts = malloc(sizeof(double) * lwlinestring->points->npoints); + mpts = malloc(sizeof(double) * lwlinestring->points->npoints); + + /* Grab the points: note getPoint4d will correctly handle + the case where the POINTs don't contain Z or M coordinates */ + for (i = 0; i < lwlinestring->points->npoints; i++) + { + p4d = getPoint4d(lwlinestring->points, i); + + xpts[i] = p4d.x; + ypts[i] = p4d.y; + zpts[i] = p4d.z; + mpts[i] = p4d.m; + + LWDEBUGF(4, "Linestring - Point: %g %g %g %g", i, xpts[i], ypts[i], zpts[i], mpts[i]); + } + + obj = SHPCreateObject(state->outshptype, -1, 0, NULL, NULL, lwlinestring->points->npoints, xpts, ypts, zpts, mpts); + + free(xpts); + free(ypts); + free(zpts); + free(mpts); + + return obj; +} + +static SHPObject * +create_multilinestring(SHPDUMPERSTATE *state, LWMLINE *lwmultilinestring) +{ + SHPObject *obj; + POINT4D p4d; + int i, j; + + double *xpts, *ypts, *zpts, *mpts; + + int *shpparts, shppointtotal = 0, shppoint = 0; + + /* Allocate storage for ring pointers */ + shpparts = malloc(sizeof(int) * lwmultilinestring->ngeoms); + + /* First count through all the points in each linestring so we now how much memory is required */ + for (i = 0; i < lwmultilinestring->ngeoms; i++) + shppointtotal += lwmultilinestring->geoms[i]->points->npoints; + + LWDEBUGF(3, "Total number of points: %d", shppointtotal); + + /* Allocate storage for points */ + xpts = malloc(sizeof(double) * shppointtotal); + ypts = malloc(sizeof(double) * shppointtotal); + zpts = malloc(sizeof(double) * shppointtotal); + mpts = malloc(sizeof(double) * shppointtotal); + + /* Iterate through each linestring setting up shpparts to point to the beginning of each line */ + for (i = 0; i < lwmultilinestring->ngeoms; i++) + { + /* For each linestring, store the integer coordinate offset for the start of each line */ + shpparts[i] = shppoint; + + for (j = 0; j < lwmultilinestring->geoms[i]->points->npoints; j++) + { + p4d = getPoint4d(lwmultilinestring->geoms[i]->points, j); + + xpts[shppoint] = p4d.x; + ypts[shppoint] = p4d.y; + zpts[shppoint] = p4d.z; + mpts[shppoint] = p4d.m; + + LWDEBUGF(4, "Linestring %d - Point: %g %g %g %g", i, xpts[shppoint], ypts[shppoint], zpts[shppoint], mpts[shppoint]); + + /* Increment the point counter */ + shppoint++; + } + } + + obj = SHPCreateObject(state->outshptype, -1, lwmultilinestring->ngeoms, shpparts, NULL, shppoint, xpts, ypts, zpts, mpts); + + free(xpts); + free(ypts); + free(zpts); + free(mpts); + + return obj; +} + + + +/*Reverse the clockwise-ness of the point list... */ +static int +reverse_points(int num_points, double *x, double *y, double *z, double *m) +{ + + int i,j; + double temp; + j = num_points -1; + for (i=0; i 0 ) + { + free(x_new); + free(y_new); + return 0; /*counter-clockwise */ + } + else + { + free(x_new); + free(y_new); + return 1; /*clockwise */ + } +} + + +/* + * Return the maximum octet_length from given table. + * Return -1 on error. + */ +static int +getMaxFieldSize(PGconn *conn, char *schema, char *table, char *fname) +{ + int size; + char *query; + PGresult *res; + + /*( this is ugly: don't forget counting the length */ + /* when changing the fixed query strings ) */ + + if ( schema ) + { + query = (char *)malloc(strlen(fname)+strlen(table)+ + strlen(schema)+46); + sprintf(query, + "select max(octet_length(\"%s\"::text)) from \"%s\".\"%s\"", + fname, schema, table); + } + else + { + query = (char *)malloc(strlen(fname)+strlen(table)+46); + sprintf(query, + "select max(octet_length(\"%s\"::text)) from \"%s\"", + fname, table); + } + + LWDEBUGF(4, "maxFieldLenQuery: %s\n", query); + + res = PQexec(conn, query); + free(query); + if ( ! res || PQresultStatus(res) != PGRES_TUPLES_OK ) + { + printf( _("Querying for maximum field length: %s"), + PQerrorMessage(conn)); + return -1; + } + + if (PQntuples(res) <= 0 ) + { + PQclear(res); + return -1; + } + size = atoi(PQgetvalue(res, 0, 0)); + PQclear(res); + return size; +} + +static int +is_bigendian(void) +{ + int test = 1; + + if ( (((char *)(&test))[0]) == 1) + { + return 0; /*NDR (little_endian) */ + } + else + { + return 1; /*XDR (big_endian) */ + } +} + +char * +shapetypename(int num) +{ + switch (num) + { + case SHPT_NULL: + return "Null Shape"; + case SHPT_POINT: + return "Point"; + case SHPT_ARC: + return "PolyLine"; + case SHPT_POLYGON: + return "Polygon"; + case SHPT_MULTIPOINT: + return "MultiPoint"; + case SHPT_POINTZ: + return "PointZ"; + case SHPT_ARCZ: + return "PolyLineZ"; + case SHPT_POLYGONZ: + return "PolygonZ"; + case SHPT_MULTIPOINTZ: + return "MultiPointZ"; + case SHPT_POINTM: + return "PointM"; + case SHPT_ARCM: + return "PolyLineM"; + case SHPT_POLYGONM: + return "PolygonM"; + case SHPT_MULTIPOINTM: + return "MultiPointM"; + case SHPT_MULTIPATCH: + return "MultiPatch"; + default: + return "Unknown"; + } +} + + +/* This is taken and adapted from dbfopen.c of shapelib */ +static char * +nullDBFValue(char fieldType) +{ + switch (fieldType) + { + case FTInteger: + case FTDouble: + /* NULL numeric fields have value "****************" */ + return "****************"; + + case FTDate: + /* NULL date fields have value "00000000" */ + return " "; + + case FTLogical: + /* NULL boolean fields have value "?" */ + return "?"; + + default: + /* empty string fields are considered NULL */ + return ""; + } +} + +/** + * @brief Make appropriate formatting of a DBF value based on type. + * Might return untouched input or pointer to static private + * buffer: use return value right away. + */ +static char * +goodDBFValue(char *in, char fieldType) +{ + /* + * We only work on FTLogical and FTDate. + * FTLogical is 1 byte, FTDate is 8 byte (YYYYMMDD) + * We allocate space for 9 bytes to take + * terminating null into account + */ + static char buf[9]; + + switch (fieldType) + { + case FTLogical: + buf[0] = toupper(in[0]); + buf[1]='\0'; + return buf; + case FTDate: + buf[0]=in[0]; /* Y */ + buf[1]=in[1]; /* Y */ + buf[2]=in[2]; /* Y */ + buf[3]=in[3]; /* Y */ + buf[4]=in[5]; /* M */ + buf[5]=in[6]; /* M */ + buf[6]=in[8]; /* D */ + buf[7]=in[9]; /* D */ + buf[8]='\0'; + return buf; + default: + return in; + } +} + +char *convert_bytes_to_hex(uint8_t *ewkb, size_t size) +{ + int i; + char *hexewkb; + + /* Convert the byte stream to a hex string using liblwgeom's deparse_hex function */ + hexewkb = malloc(size * 2 + 1); + for (i=0; ishp_file; + char *schema = state->schema; + char *table = state->table; + char *geo_col_name = state->geo_col_name; + + char *srtext; + char *query; + char *esc_schema; + char *esc_table; + char *esc_geo_col_name; + + int error; + PGresult *res; + int size; + + /*********** + *** I'm multiplying by 2 instead of 3 because I am too lazy to figure out how many characters to add + *** after escaping if any **/ + size = 1000; + if ( schema ) + { + size += 3 * strlen(schema); + } + size += 1000; + esc_table = (char *) malloc(3 * strlen(table) + 1); + esc_geo_col_name = (char *) malloc(3 * strlen(geo_col_name) + 1); + PQescapeStringConn(state->conn, esc_table, table, strlen(table), &error); + PQescapeStringConn(state->conn, esc_geo_col_name, geo_col_name, strlen(geo_col_name), &error); + + /** make our address space large enough to hold query with table/schema **/ + query = (char *) malloc(size); + if ( ! query ) return 0; /* out of virtual memory */ + + /************************************************** + * Get what kind of spatial ref is the selected geometry field + * We first check the geometry_columns table for a match and then if no match do a distinct against the table + * NOTE: COALESCE does a short-circuit check returning the faster query result and skipping the second if first returns something + * Escaping quotes in the schema and table in query may not be necessary except to prevent malicious attacks + * or should someone be crazy enough to have quotes or other weird character in their table, column or schema names + **************************************************/ + if ( schema ) + { + esc_schema = (char *) malloc(2 * strlen(schema) + 1); + PQescapeStringConn(state->conn, esc_schema, schema, strlen(schema), &error); + sprintf(query, "SELECT COALESCE((SELECT sr.srtext " + " FROM geometry_columns As gc INNER JOIN spatial_ref_sys sr ON sr.srid = gc.srid " + " WHERE gc.f_table_schema = '%s' AND gc.f_table_name = '%s' AND gc.f_geometry_column = '%s' LIMIT 1), " + " (SELECT CASE WHEN COUNT(DISTINCT sr.srid) > 1 THEN 'm' ELSE MAX(sr.srtext) END As srtext " + " FROM \"%s\".\"%s\" As g INNER JOIN spatial_ref_sys sr ON sr.srid = ST_SRID((g.\"%s\")::geometry)) , ' ') As srtext ", + esc_schema, esc_table,esc_geo_col_name, schema, table, geo_col_name); + free(esc_schema); + } + else + { + sprintf(query, "SELECT COALESCE((SELECT sr.srtext " + " FROM geometry_columns As gc INNER JOIN spatial_ref_sys sr ON sr.srid = gc.srid " + " WHERE gc.f_table_name = '%s' AND gc.f_geometry_column = '%s' AND pg_table_is_visible((gc.f_table_schema || '.' || gc.f_table_name)::regclass) LIMIT 1), " + " (SELECT CASE WHEN COUNT(DISTINCT sr.srid) > 1 THEN 'm' ELSE MAX(sr.srtext) END as srtext " + " FROM \"%s\" As g INNER JOIN spatial_ref_sys sr ON sr.srid = ST_SRID((g.\"%s\")::geometry)), ' ') As srtext ", + esc_table, esc_geo_col_name, table, geo_col_name); + } + + LWDEBUGF(3,"%s\n",query); + free(esc_table); + free(esc_geo_col_name); + + res = PQexec(state->conn, query); + + if ( ! res || PQresultStatus(res) != PGRES_TUPLES_OK ) + { + snprintf(state->message, SHPDUMPERMSGLEN, _("WARNING: Could not execute prj query: %s"), PQresultErrorMessage(res)); + PQclear(res); + free(query); + return SHPDUMPERWARN; + } + + for (i=0; i < PQntuples(res); i++) + { + srtext = PQgetvalue(res, i, 0); + if (strcmp(srtext,"m") == 0) + { + snprintf(state->message, SHPDUMPERMSGLEN, _("WARNING: Mixed set of spatial references. No prj file will be generated")); + PQclear(res); + free(query); + return SHPDUMPERWARN; + } + else + { + if (srtext[0] == ' ') + { + snprintf(state->message, SHPDUMPERMSGLEN, _("WARNING: Cannot determine spatial reference (empty table or unknown spatial ref). No prj file will be generated.")); + PQclear(res); + free(query); + return SHPDUMPERWARN; + } + else + { + /* -------------------------------------------------------------------- */ + /* Compute the base (layer) name. If there is any extension */ + /* on the passed in filename we will strip it off. */ + /* -------------------------------------------------------------------- */ + pszBasename = (char *) malloc(strlen(pszFilename)+5); + strcpy( pszBasename, pszFilename ); + for ( i = strlen(pszBasename)-1; + i > 0 && pszBasename[i] != '.' && pszBasename[i] != '/' + && pszBasename[i] != '\\'; + i-- ) {} + + if ( pszBasename[i] == '.' ) + pszBasename[i] = '\0'; + + pszFullname = (char *) malloc(strlen(pszBasename) + 5); + sprintf( pszFullname, "%s.prj", pszBasename ); + free( pszBasename ); + + + /* -------------------------------------------------------------------- */ + /* Create the file. */ + /* -------------------------------------------------------------------- */ + fp = fopen( pszFullname, "wb" ); + if ( fp == NULL ) + { + return 0; + } + result = fputs (srtext,fp); + LWDEBUGF(3, "\n result %d proj SRText is %s .\n", result, srtext); + fclose( fp ); + free( pszFullname ); + } + } + } + PQclear(res); + free(query); + return SHPDUMPEROK; +} + + +static int +getTableInfo(SHPDUMPERSTATE *state) +{ + + /* Get some more information from the table: + - count = total number of geometries/geographies in the table + + and if we have found a suitable geometry column: + + - max = maximum number of dimensions within the geometry/geography column + - geometrytype = string representing the geometry/geography type, e.g. POINT + + Since max/geometrytype already require a sequential scan of the table, we may as + well get the row count too. + */ + + PGresult *res; + char *query; + int tmpint; + + + if (state->geo_col_name) + { + /* Include geometry information */ + if (state->schema) + { + query = malloc(150 + 4 * strlen(state->geo_col_name) + strlen(state->schema) + strlen(state->table)); + + sprintf(query, "SELECT count(\"%s\"), max(ST_zmflag(\"%s\"::geometry)), geometrytype(\"%s\"::geometry) FROM \"%s\".\"%s\" GROUP BY geometrytype(\"%s\"::geometry)", + state->geo_col_name, state->geo_col_name, state->geo_col_name, state->schema, state->table, state->geo_col_name); + } + else + { + query = malloc(150 + 4 * strlen(state->geo_col_name) + strlen(state->table)); + + sprintf(query, "SELECT count(\"%s\"), max(ST_zmflag(\"%s\"::geometry)), geometrytype(\"%s\"::geometry) FROM \"%s\" GROUP BY geometrytype(\"%s\"::geometry)", + state->geo_col_name, state->geo_col_name, state->geo_col_name, state->table, state->geo_col_name); + } + } + else + { + /* Otherwise... just a row count will do */ + if (state->schema) + { + query = malloc(40 + strlen(state->schema) + strlen(state->table)); + + sprintf(query, "SELECT count(1) FROM \"%s\".\"%s\"", state->schema, state->table); + } + else + { + query = malloc(40 + strlen(state->table)); + + sprintf(query, "SELECT count(1) FROM \"%s\"", state->table); + } + } + + LWDEBUGF(3, "Table metadata query: %s\n", query); + + res = PQexec(state->conn, query); + free(query); + + if (PQresultStatus(res) != PGRES_TUPLES_OK) + { + snprintf(state->message, SHPDUMPERMSGLEN, _("ERROR: Could not execute table metadata query: %s"), PQresultErrorMessage(res)); + PQclear(res); + return SHPDUMPERERR; + } + + /* Make sure we error if the table is empty */ + if (PQntuples(res) == 0) + { + snprintf(state->message, SHPDUMPERMSGLEN, _("ERROR: Could not determine table metadata (empty table)")); + PQclear(res); + return SHPDUMPERERR; + } + + /* If we have a geo* column, get the dimension, type and count information */ + if (state->geo_col_name) + { + /* If a table has a geometry column containing mixed types then + the metadata query will return multiple rows. We need to cycle + through all rows to determine if the type combinations are valid. + + Note that if we find a combination of a MULTI and non-MULTI geometry + of the same type, we always choose MULTI to ensure that everything + gets output correctly. The create_* conversion functions are clever + enough to up-convert the non-MULTI geometry to a MULTI in this case. */ + + int dummy, i; + uint8_t type = 0; + int typefound = 0, typemismatch = 0; + + state->rowcount = 0; + + for (i = 0; i < PQntuples(res); i++) + { + geometry_type_from_string(PQgetvalue(res, i, 2), &type, &dummy, &dummy); + + /* We can always set typefound to that of the first column found */ + if (!typefound) + typefound = type; + + switch (type) + { + case MULTIPOINTTYPE: + if (typefound != MULTIPOINTTYPE && typefound != POINTTYPE) + typemismatch = 1; + else + typefound = MULTIPOINTTYPE; + break; + + case MULTILINETYPE: + if (typefound != MULTILINETYPE && typefound != LINETYPE) + typemismatch = 1; + else + typefound = MULTILINETYPE; + break; + + case MULTIPOLYGONTYPE: + if (typefound != MULTIPOLYGONTYPE && typefound != POLYGONTYPE) + typemismatch = 1; + else + typefound = MULTIPOLYGONTYPE; + break; + + case POINTTYPE: + if (typefound != POINTTYPE && typefound != MULTIPOINTTYPE) + typemismatch = 1; + else if (!lwtype_is_collection(type)) + typefound = POINTTYPE; + break; + + case LINETYPE: + if (typefound != LINETYPE && typefound != MULTILINETYPE) + typemismatch = 1; + else if (!lwtype_is_collection(type)) + typefound = LINETYPE; + break; + + case POLYGONTYPE: + if (typefound != POLYGONTYPE && typefound != MULTIPOLYGONTYPE) + typemismatch = 1; + else if (!lwtype_is_collection(type)) + typefound = POLYGONTYPE; + break; + } + + /* Update the rowcount for each type */ + state->rowcount += atoi(PQgetvalue(res, i, 0)); + } + + /* Flag an error if the table contains incompatible geometry combinations */ + if (typemismatch) + { + snprintf(state->message, SHPDUMPERMSGLEN, _("ERROR: Incompatible mixed geometry types in table")); + PQclear(res); + return SHPDUMPERERR; + } + + /* Set up the dimension output type (note: regardless of how many rows + the table metadata query returns, this value will be the same. But + we'll choose to use the first value anyway) */ + tmpint = atoi(PQgetvalue(res, 0, 1)); + switch (tmpint) + { + case 0: + state->outtype = 's'; + break; + case 1: + state->outtype = 'm'; + break; + default: + state->outtype = 'z'; + break; + } + + /* Set up the shapefile output type based upon the dimension information */ + switch (typefound) + { + case POINTTYPE: + switch(state->outtype) + { + case 'z': + state->outshptype = SHPT_POINTZ; + break; + + case 'm': + state->outshptype = SHPT_POINTM; + break; + + default: + state->outshptype = SHPT_POINT; + } + break; + + case MULTIPOINTTYPE: + switch(state->outtype) + { + case 'z': + state->outshptype = SHPT_MULTIPOINTZ; + break; + + case 'm': + state->outshptype = SHPT_MULTIPOINTM; + break; + + default: + state->outshptype = SHPT_MULTIPOINT; + } + break; + + case LINETYPE: + case MULTILINETYPE: + switch(state->outtype) + { + case 'z': + state->outshptype = SHPT_ARCZ; + break; + + case 'm': + state->outshptype = SHPT_ARCM; + break; + + default: + state->outshptype = SHPT_ARC; + } + break; + + case POLYGONTYPE: + case MULTIPOLYGONTYPE: + switch(state->outtype) + { + case 'z': + state->outshptype = SHPT_POLYGONZ; + break; + + case 'm': + state->outshptype = SHPT_POLYGONM; + break; + + default: + state->outshptype = SHPT_POLYGON; + } + break; + } + } + else + { + /* Without a geo* column the total is simply the first (COUNT) column */ + state->rowcount = atoi(PQgetvalue(res, 0, 0)); + } + + /* Dispose of the result set */ + PQclear(res); + + return SHPDUMPEROK; +} + + +/* Default configuration settings */ +void +set_dumper_config_defaults(SHPDUMPERCONFIG *config) +{ + config->conn = malloc(sizeof(SHPCONNECTIONCONFIG)); + config->conn->host = NULL; + config->conn->port = NULL; + config->conn->database = NULL; + config->conn->username = NULL; + config->conn->password = NULL; + + config->table = NULL; + config->schema = NULL; + config->usrquery = NULL; + config->binary = 0; + config->shp_file = NULL; + config->dswitchprovided = 0; + config->includegid = 0; + config->unescapedattrs = 0; + config->geo_col_name = NULL; + config->keep_fieldname_case = 0; + config->fetchsize = 100; + config->column_map_filename = NULL; +} + +/** + * Read the content of filename into a symbol map stored + * at state->column_map_filename. + * + * The content of the file is lines of two names separated by + * white space and no trailing or leading space: + * + * COLUMNNAME DBFFIELD1 + * AVERYLONGCOLUMNNAME DBFFIELD2 + * + * etc. + * + * It is the reponsibility of the caller to reclaim the allocated space + * as follows: + * + * free(state->column_map_pgfieldnames[]) to free the column names + * free(state->column_map_dbffieldnames[]) to free the dbf field names + * + * @param state : container of state->column_map where the malloc'd + * symbol map will be stored. + */ +static int +read_column_map(SHPDUMPERSTATE *state) +{ + FILE *fptr; + char linebuffer[1024]; + char *tmpstr, *tmpptr; + int curmapsize, fieldnamesize; + + /* Read column map file and load the column_map_dbffieldnames and column_map_pgfieldnames + arrays */ + fptr = fopen(state->config->column_map_filename, "r"); + if (!fptr) + { + /* Return an error */ + snprintf(state->message, SHPDUMPERMSGLEN, _("ERROR: Unable to open column map file %s"), state->config->column_map_filename); + return SHPDUMPERERR; + } + + /* First count how many columns we have... */ + while (fgets(linebuffer, 1024, fptr) != NULL) + state->column_map_size++; + + /* Now we know the final size, allocate the arrays and load the data */ + fseek(fptr, 0, SEEK_SET); + state->column_map_pgfieldnames = (char **)malloc(sizeof(char *) * state->column_map_size); + state->column_map_dbffieldnames = (char **)malloc(sizeof(char *) * state->column_map_size); + + /* Read in a line at a time... */ + curmapsize = 0; + while (fgets(linebuffer, 1024, fptr) != NULL) + { + /* Split into two separate strings - pgfieldname followed by dbffieldname */ + + /* First locate end of first column (pgfieldname) */ + for (tmpptr = tmpstr = linebuffer; *tmpptr != '\t' && *tmpptr != '\n' && *tmpptr != ' ' && *tmpptr != '\0'; tmpptr++); + fieldnamesize = tmpptr - tmpstr; + + /* Allocate memory and copy the string ensuring it is terminated */ + state->column_map_pgfieldnames[curmapsize] = malloc(fieldnamesize + 1); + strncpy(state->column_map_pgfieldnames[curmapsize], tmpstr, fieldnamesize); + state->column_map_pgfieldnames[curmapsize][fieldnamesize] = '\0'; + + /* Now swallow up any whitespace */ + for (tmpstr = tmpptr; *tmpptr == '\t' || *tmpptr == '\n' || *tmpptr == ' '; tmpptr++); + + /* Finally locate end of second column (dbffieldname) */ + for (tmpstr = tmpptr; *tmpptr != '\t' && *tmpptr != '\n' && *tmpptr != ' ' && *tmpptr != '\0'; tmpptr++); + fieldnamesize = tmpptr - tmpstr; + + /* Allocate memory and copy the string ensuring it is terminated */ + state->column_map_dbffieldnames[curmapsize] = malloc(fieldnamesize + 1); + strncpy(state->column_map_dbffieldnames[curmapsize], tmpstr, fieldnamesize); + state->column_map_dbffieldnames[curmapsize][fieldnamesize] = '\0'; + + /* Error out if the dbffieldname is > 10 chars */ + if (strlen(state->column_map_dbffieldnames[curmapsize]) > 10) + { + snprintf(state->message, SHPDUMPERMSGLEN, _("ERROR: column map file specifies a DBF field name \"%s\" which is longer than 10 characters"), state->column_map_dbffieldnames[curmapsize]); + return SHPDUMPERERR; + } + + curmapsize++; + } + + fclose(fptr); + + /* Done; return success */ + return SHPDUMPEROK; +} + + +/* Create a new shapefile state object */ +SHPDUMPERSTATE * +ShpDumperCreate(SHPDUMPERCONFIG *config) +{ + SHPDUMPERSTATE *state; + + /* Create a new state object and assign the config to it */ + state = malloc(sizeof(SHPDUMPERSTATE)); + state->config = config; + + /* Set any state defaults */ + state->conn = NULL; + state->outtype = 's'; + state->geom_oid = 0; + state->geog_oid = 0; + state->schema = NULL; + state->table = NULL; + state->geo_col_name = NULL; + state->fetch_query = NULL; + state->main_scan_query = NULL; + state->dbffieldnames = NULL; + state->dbffieldtypes = NULL; + state->pgfieldnames = NULL; + state->column_map_pgfieldnames = NULL; + state->column_map_dbffieldnames = NULL; + state->column_map_size = 0; + state->big_endian = is_bigendian(); + + return state; +} + +/* Generate the database connection string used by a state */ +char * +ShpDumperGetConnectionStringFromConn(SHPCONNECTIONCONFIG *conn) +{ + char *connstring; + int connlen; + + connlen = 64 + + (conn->host ? strlen(conn->host) : 0) + (conn->port ? strlen(conn->port) : 0) + + (conn->username ? strlen(conn->username) : 0) + (conn->password ? strlen(conn->password) : 0) + + (conn->database ? strlen(conn->database) : 0); + + connstring = malloc(connlen); + memset(connstring, 0, connlen); + + if (conn->host) + { + strcat(connstring, " host="); + strcat(connstring, conn->host); + } + + if (conn->port) + { + strcat(connstring, " port="); + strcat(connstring, conn->port); + } + + if (conn->username) + { + strcat(connstring, " user="); + strcat(connstring, conn->username); + } + + if (conn->password) + { + strcat(connstring, " password='"); + strcat(connstring, conn->password); + strcat(connstring, "'"); + } + + if (conn->database) + { + strcat(connstring, " dbname="); + strcat(connstring, conn->database); + } + + return connstring; +} + +/* Connect to the database and identify the version of PostGIS (and any other +capabilities required) */ +int +ShpDumperConnectDatabase(SHPDUMPERSTATE *state) +{ + PGresult *res; + + char *connstring, *tmpvalue; + + /* Generate the PostgreSQL connection string */ + connstring = ShpDumperGetConnectionStringFromConn(state->config->conn); + + /* Connect to the database */ + state->conn = PQconnectdb(connstring); + if (PQstatus(state->conn) == CONNECTION_BAD) + { + snprintf(state->message, SHPDUMPERMSGLEN, "%s", PQerrorMessage(state->conn)); + free(connstring); + return SHPDUMPERERR; + } + + /* Set datestyle to ISO */ + res = PQexec(state->conn, "SET DATESTYLE='ISO'"); + if (PQresultStatus(res) != PGRES_COMMAND_OK) + { + snprintf(state->message, SHPDUMPERMSGLEN, "%s", PQresultErrorMessage(res)); + PQclear(res); + free(connstring); + return SHPDUMPERERR; + } + + PQclear(res); + + /* Retrieve PostGIS major version */ + res = PQexec(state->conn, "SELECT postgis_version()"); + if (PQresultStatus(res) != PGRES_TUPLES_OK) + { + snprintf(state->message, SHPDUMPERMSGLEN, "%s", PQresultErrorMessage(res)); + PQclear(res); + free(connstring); + return SHPDUMPERERR; + } + + tmpvalue = PQgetvalue(res, 0, 0); + state->pgis_major_version = atoi(tmpvalue); + + PQclear(res); + + /* Find the OID for the geometry type */ + res = PQexec(state->conn, "SELECT oid FROM pg_type WHERE typname = 'geometry'"); + if (PQresultStatus(res) != PGRES_TUPLES_OK) + { + snprintf(state->message, SHPDUMPERMSGLEN, _("Error looking up geometry oid: %s"), PQresultErrorMessage(res)); + PQclear(res); + free(connstring); + return SHPDUMPERERR; + } + + if (PQntuples(res) > 0) + { + tmpvalue = PQgetvalue(res, 0, 0); + state->geom_oid = atoi(tmpvalue); + } + else + { + snprintf(state->message, SHPDUMPERMSGLEN, _("Geometry type unknown (have you enabled postgis?)")); + PQclear(res); + free(connstring); + return SHPDUMPERERR; + } + + PQclear(res); + + /* Find the OID for the geography type */ + res = PQexec(state->conn, "SELECT oid FROM pg_type WHERE typname = 'geography'"); + if (PQresultStatus(res) != PGRES_TUPLES_OK) + { + snprintf(state->message, SHPDUMPERMSGLEN, _("Error looking up geography oid: %s"), PQresultErrorMessage(res)); + PQclear(res); + free(connstring); + return SHPDUMPERERR; + } + + if (PQntuples(res) > 0) + { + /* Old databases don't have a geography type, so don't fail if we don't find it */ + tmpvalue = PQgetvalue(res, 0, 0); + state->geog_oid = atoi(tmpvalue); + } + + PQclear(res); + + free(connstring); + + return SHPDUMPEROK; +} + + +/* Open the specified table in preparation for extracting rows */ +int +ShpDumperOpenTable(SHPDUMPERSTATE *state) +{ + PGresult *res; + + char buf[256]; + char *query; + int gidfound = 0, i, j, ret, status; + + + /* Open the column map if one was specified */ + if (state->config->column_map_filename) + { + ret = read_column_map(state); + if (ret != SHPDUMPEROK) + return SHPDUMPERERR; + } + + /* If a user-defined query has been specified, create and point the state to our new table */ + if (state->config->usrquery) + { + state->table = malloc(20 + 20); // string + max long precision + sprintf(state->table, "__pgsql2shp%lu_tmp_table", (long)getpid()); + + query = malloc(32 + strlen(state->table) + strlen(state->config->usrquery)); + + sprintf(query, "CREATE TEMP TABLE \"%s\" AS %s", state->table, state->config->usrquery); + res = PQexec(state->conn, query); + free(query); + + /* Execute the code to create the table */ + if (PQresultStatus(res) != PGRES_COMMAND_OK) + { + snprintf(state->message, SHPDUMPERMSGLEN, _("Error executing user query: %s"), PQresultErrorMessage(res)); + PQclear(res); + return SHPDUMPERERR; + } + } + else + { + /* Simply point the state to copies of the supplied schema and table */ + state->table = strdup(state->config->table); + if (state->config->schema) + state->schema = strdup(state->config->schema); + } + + + /* Get the list of columns and their types for the selected table */ + if (state->schema) + { + query = malloc(250 + strlen(state->schema) + strlen(state->table)); + + sprintf(query, "SELECT a.attname, a.atttypid, " + "a.atttypmod, a.attlen FROM " + "pg_attribute a, pg_class c, pg_namespace n WHERE " + "n.nspname = '%s' AND a.attrelid = c.oid AND " + "n.oid = c.relnamespace AND " + "a.atttypid != 0 AND " + "a.attnum > 0 AND c.relname = '%s'", state->schema, state->table); + } + else + { + query = malloc(250 + strlen(state->table)); + + sprintf(query, "SELECT a.attname, a.atttypid, " + "a.atttypmod, a.attlen FROM " + "pg_attribute a, pg_class c WHERE " + "a.attrelid = c.oid and a.attnum > 0 AND " + "a.atttypid != 0 AND " + "c.relname = '%s' AND " + "pg_catalog.pg_table_is_visible(c.oid)", state->table); + } + + LWDEBUGF(3, "query is: %s\n", query); + + res = PQexec(state->conn, query); + free(query); + + if (PQresultStatus(res) != PGRES_TUPLES_OK) + { + snprintf(state->message, SHPDUMPERMSGLEN, _("Error querying for attributes: %s"), PQresultErrorMessage(res)); + PQclear(res); + return SHPDUMPERERR; + } + + if (!PQntuples(res)) + { + snprintf(state->message, SHPDUMPERMSGLEN, _("Table %s does not exist"), state->table); + PQclear(res); + return SHPDUMPERERR; + } + + /* If a shapefile name was specified, use it. Otherwise simply use the table name. */ + if (state->config->shp_file != NULL) + state->shp_file = state->config->shp_file; + else + state->shp_file = state->table; + + /* Create the dbf file */ + state->dbf = DBFCreate(state->shp_file); + if (!state->dbf) + { + snprintf(state->message, SHPDUMPERMSGLEN, _("Could not create dbf file %s"), state->shp_file); + return SHPDUMPERERR; + } + + /* + * Scan the result setting fields to be returned in mainscan + * query, filling the type_ary, and creating .dbf and .shp files. + */ + state->dbffieldnames = malloc(sizeof(char *) * PQntuples(res)); + state->dbffieldtypes = malloc(sizeof(int) * PQntuples(res)); + state->pgfieldnames = malloc(sizeof(char *) * PQntuples(res)); + state->pgfieldlens = malloc(sizeof(int) * PQntuples(res)); + state->pgfieldtypmods = malloc(sizeof(int) * PQntuples(res)); + state->fieldcount = 0; + int tmpint = 1; + + for (i = 0; i < PQntuples(res); i++) + { + char *ptr; + + int pgfieldtype, pgtypmod, pgfieldlen; + char *pgfieldname; + + int dbffieldtype, dbffieldsize, dbffielddecs; + char *dbffieldname; + + pgfieldname = PQgetvalue(res, i, 0); + pgfieldtype = atoi(PQgetvalue(res, i, 1)); + pgtypmod = atoi(PQgetvalue(res, i, 2)); + pgfieldlen = atoi(PQgetvalue(res, i, 3)); + dbffieldtype = -1; + dbffieldsize = 0; + dbffielddecs = 0; + + /* + * This is a geometry/geography column + */ + if (pgfieldtype == state->geom_oid || pgfieldtype == state->geog_oid) + { + /* If no geometry/geography column has been found yet... */ + if (!state->geo_col_name) + { + /* If either no geo* column name was provided (in which case this is + the first match) or we match the provided column name, we have + found our geo* column */ + if (!state->config->geo_col_name || !strcmp(state->config->geo_col_name, pgfieldname)) + { + dbffieldtype = 9; + + state->geo_col_name = strdup(pgfieldname); + } + } + } + + /* + * Everything else (non geometries) will be + * a DBF attribute. + */ + + /* Skip gid (if not asked to do otherwise */ + if (!strcmp(pgfieldname, "gid") ) + { + gidfound = 1; + + if (!state->config->includegid) + continue; + } + + /* Unescape any reserved column names */ + ptr = pgfieldname; + if (!state->config->unescapedattrs) + { + if (*ptr == '_') + ptr += 2; + } + + /* + * This needs special handling since both xmin and _xmin + * becomes __xmin when escaped + */ + + /* Limit dbf field name to 10-digits */ + dbffieldname = malloc(11); + strncpy(dbffieldname, ptr, 10); + dbffieldname[10] = '\0'; + + /* If a column map file has been passed in, use this to create the dbf field name from + the PostgreSQL column name */ + if (state->column_map_size > 0) + { + for (j = 0; j < state->column_map_size; j++) + { + if (!strcasecmp(state->column_map_pgfieldnames[j], dbffieldname)) + { + strncpy(dbffieldname, state->column_map_dbffieldnames[j], 10); + dbffieldname[10] = '\0'; + } + } + } + + /* + * make sure the fields all have unique names, + */ + tmpint = 1; + for (j = 0; j < state->fieldcount; j++) + { + if (!strncasecmp(dbffieldname, state->dbffieldnames[j], 10)) + { + sprintf(dbffieldname, "%.7s_%.2d", ptr, tmpint++); + continue; + } + } + + /* make UPPERCASE if keep_fieldname_case = 0 */ + if (!state->config->keep_fieldname_case) + for (j = 0; j < strlen(dbffieldname); j++) + dbffieldname[j] = toupper(dbffieldname[j]); + + /* Issue warning if column has been renamed */ + if (strcasecmp(dbffieldname, pgfieldname)) + { + /* Note: we concatenate all warnings from the main loop as this is useful information */ + snprintf(buf, 256, _("Warning, field %s renamed to %s\n"), pgfieldname, dbffieldname); + strncat(state->message, buf, SHPDUMPERMSGLEN - strlen(state->message)); + + ret = SHPDUMPERWARN; + } + + + /* + * Find appropriate type of dbf attributes + */ + + /* int2 type */ + if (pgfieldtype == 21) + { + /* + * Longest text representation for + * an int2 type (16bit) is 6 bytes + * (-32768) + */ + dbffieldtype = FTInteger; + dbffieldsize = 6; + dbffielddecs = 0; + } + + /* int4 type */ + else if (pgfieldtype == 23) + { + /* + * Longest text representation for + * an int4 type (32bit) is 11 bytes + * (-2147483648) + */ + dbffieldtype = FTInteger; + dbffieldsize = 11; + dbffielddecs = 0; + } + + /* int8 type */ + else if (pgfieldtype == 20) + { + /* + * Longest text representation for + * an int8 type (64bit) is 20 bytes + * (-9223372036854775808) + */ + dbffieldtype = FTInteger; + dbffieldsize = 19; + dbffielddecs = 0; + } + + /* + * double or numeric types: + * 700: float4 + * 701: float8 + * 1700: numeric + * + * + * TODO: stricter handling of sizes + */ + else if (pgfieldtype == 700 || pgfieldtype == 701 || pgfieldtype == 1700) + { + dbffieldtype = FTDouble; + dbffieldsize = 32; + dbffielddecs = 10; + } + + /* + * Boolean field, we use FTLogical + */ + else if (pgfieldtype == 16) + { + dbffieldtype = FTLogical; + dbffieldsize = 2; + dbffielddecs = 0; + } + + /* + * Date field + */ + else if (pgfieldtype == 1082) + { + dbffieldtype = FTDate; + dbffieldsize = 8; + dbffielddecs = 0; + } + + /* + * time, timetz, timestamp, or timestamptz field. + */ + else if (pgfieldtype == 1083 || pgfieldtype == 1266 || pgfieldtype == 1114 || pgfieldtype == 1184) + { + int secondsize; + + switch (pgtypmod) + { + case -1: + secondsize = 6 + 1; + break; + case 0: + secondsize = 0; + break; + default: + secondsize = pgtypmod + 1; + break; + } + + /* We assume the worst case scenario for all of these: + * date = '5874897-12-31' = 13 + * date = '294276-11-20' = 12 (with --enable-interger-datetimes) + * time = '00:00:00' = 8 + * zone = '+01:39:52' = 9 (see Europe/Helsinki around 1915) + */ + + /* time */ + if (pgfieldtype == 1083) + { + dbffieldsize = 8 + secondsize; + } + /* timetz */ + else if (pgfieldtype == 1266) + { + dbffieldsize = 8 + secondsize + 9; + } + /* timestamp */ + else if (pgfieldtype == 1114) + { + dbffieldsize = 13 + 1 + 8 + secondsize; + } + /* timestamptz */ + else if (pgfieldtype == 1184) + { + dbffieldsize = 13 + 1 + 8 + secondsize + 9; + } + + dbffieldtype = FTString; + dbffielddecs = 0; + } + + /* + * uuid type 36 bytes (12345678-9012-3456-7890-123456789012) + */ + else if (pgfieldtype == 2950) + { + dbffieldtype = FTString; + dbffieldsize = 36; + dbffielddecs = 0; + } + + /* + * For variable-sized fields we know about, we use + * the maximum allowed size. + * 1042 is bpchar, 1043 is varchar + */ + else if ((pgfieldtype == 1042 || pgfieldtype == 1043) && pgtypmod != -1) + { + /* + * mod is maximum allowed size, including + * header which contains *real* size. + */ + dbffieldtype = FTString; + dbffieldsize = pgtypmod - 4; /* 4 is header size */ + dbffielddecs = 0; + } + + /* For all other valid non-geometry/geography fields... */ + else if (dbffieldtype == -1) + { + /* + * For types we don't know anything about, all + * we can do is query the table for the maximum field + * size. + */ + dbffieldsize = getMaxFieldSize(state->conn, state->schema, state->table, pgfieldname); + if (dbffieldsize == -1) + return 0; + + if (!dbffieldsize) + dbffieldsize = 32; + + /* might 0 be a good size ? */ + + dbffieldtype = FTString; + dbffielddecs = 0; + + /* Check to make sure the final field size isn't too large */ + if (dbffieldsize > MAX_DBF_FIELD_SIZE) + { + /* Note: we concatenate all warnings from the main loop as this is useful information */ + snprintf(buf, 256, _("Warning: values of field '%s' exceeding maximum dbf field width (%d) " + "will be truncated.\n"), dbffieldname, MAX_DBF_FIELD_SIZE); + strncat(state->message, buf, SHPDUMPERMSGLEN - strlen(state->message)); + dbffieldsize = MAX_DBF_FIELD_SIZE; + + ret = SHPDUMPERWARN; + } + } + + LWDEBUGF(3, "DBF FIELD_NAME: %s, SIZE: %d\n", dbffieldname, dbffieldsize); + + if (dbffieldtype != 9) + { + /* Add the field to the DBF file */ + if (DBFAddField(state->dbf, dbffieldname, dbffieldtype, dbffieldsize, dbffielddecs) == -1) + { + snprintf(state->message, SHPDUMPERMSGLEN, _("Error: field %s of type %d could not be created."), dbffieldname, dbffieldtype); + + return SHPDUMPERERR; + } + + /* Add the field information to our field arrays */ + state->dbffieldnames[state->fieldcount] = dbffieldname; + state->dbffieldtypes[state->fieldcount] = dbffieldtype; + state->pgfieldnames[state->fieldcount] = pgfieldname; + state->pgfieldlens[state->fieldcount] = pgfieldlen; + state->pgfieldtypmods[state->fieldcount] = pgtypmod; + + state->fieldcount++; + } + } + + /* Now we have generated the field lists, grab some info about the table */ + status = getTableInfo(state); + if (status == SHPDUMPERERR) + return SHPDUMPERERR; + + LWDEBUGF(3, "rows: %d\n", state->rowcount); + LWDEBUGF(3, "shptype: %c\n", state->outtype); + LWDEBUGF(3, "shpouttype: %d\n", state->outshptype); + + /* If we didn't find a geometry/geography column... */ + if (!state->geo_col_name) + { + if (state->config->geo_col_name) + { + /* A geo* column was specified, but not found */ + snprintf(state->message, SHPDUMPERMSGLEN, _("%s: no such attribute in table %s"), state->config->geo_col_name, state->table); + + return SHPDUMPERERR; + } + else + { + /* No geo* column specified so we can only create the DBF section - + but let's issue a warning... */ + snprintf(buf, 256, _("No geometry column found.\nThe DBF file will be created but not the shx or shp files.\n")); + strncat(state->message, buf, SHPDUMPERMSGLEN - strlen(state->message)); + + state->shp = NULL; + + ret = SHPDUMPERWARN; + } + } + else + { + /* Since we have found a geo* column, open the shapefile */ + state->shp = SHPCreate(state->shp_file, state->outshptype); + if (!state->shp) + { + snprintf(state->message, SHPDUMPERMSGLEN, _("Could not open shapefile %s!"), state->shp_file); + + return SHPDUMPERERR; + } + } + + + /* Now we have the complete list of fieldnames, let's generate the SQL query. First let's make sure + we reserve enough space for tables with lots of columns */ + j = 0; + for (i = 0; i < state->fieldcount; i++) + j += strlen(state->pgfieldnames[i] + 2); /* Add 2 for leading and trailing quotes */ + + state->main_scan_query = malloc(1024 + j); + + sprintf(state->main_scan_query, "DECLARE cur "); + if (state->config->binary) + strcat(state->main_scan_query, "BINARY "); + + strcat(state->main_scan_query, "CURSOR FOR SELECT "); + + for (i = 0; i < state->fieldcount; i++) + { + /* Comma-separated column names */ + if (i > 0) + strcat(state->main_scan_query, ","); + + if (state->config->binary) + sprintf(buf, "\"%s\"::text", state->pgfieldnames[i]); + else + sprintf(buf, "\"%s\"", state->pgfieldnames[i]); + + strcat(state->main_scan_query, buf); + } + + /* If we found a valid geometry/geography column then use it */ + if (state->geo_col_name) + { + /* If this is the (only) column, no need for the initial comma */ + if (state->fieldcount > 0) + strcat(state->main_scan_query, ","); + + if (state->big_endian) + { + if (state->pgis_major_version > 0) + { + sprintf(buf, "ST_asEWKB(ST_SetSRID(\"%s\"::geometry, 0), 'XDR')", state->geo_col_name); + } + else + { + sprintf(buf, "asbinary(\"%s\"::geometry, 'XDR')", + state->geo_col_name); + } + } + else /* little_endian */ + { + if (state->pgis_major_version > 0) + { + sprintf(buf, "ST_AsEWKB(ST_SetSRID(\"%s\"::geometry, 0), 'NDR') AS _geoX", state->geo_col_name); + } + else + { + sprintf(buf, "asbinary(\"%s\"::geometry, 'NDR') AS _geoX", + state->geo_col_name); + } + } + + strcat(state->main_scan_query, buf); + } + + if (state->schema) + { + sprintf(buf, " FROM \"%s\".\"%s\"", state->schema, state->table); + } + else + { + sprintf(buf, " FROM \"%s\"", state->table); + } + + strcat(state->main_scan_query, buf); + + /* Order by 'gid' (if found) */ + if (gidfound) + { + sprintf(buf, " ORDER BY \"gid\""); + strcat(state->main_scan_query, buf); + } + + /* Now we've finished with the result set, we can dispose of it */ + PQclear(res); + + LWDEBUGF(3, "FINAL QUERY: %s\n", state->main_scan_query); + + /* + * Begin the transaction + * (a cursor can only be defined inside a transaction block) + */ + res = PQexec(state->conn, "BEGIN"); + if (!res || PQresultStatus(res) != PGRES_COMMAND_OK) + { + snprintf(state->message, SHPDUMPERMSGLEN, _("Error starting transaction: %s"), PQresultErrorMessage(res)); + PQclear(res); + return SHPDUMPERERR; + } + + PQclear(res); + + /* Execute the main scan query */ + res = PQexec(state->conn, state->main_scan_query); + if (!res || PQresultStatus(res) != PGRES_COMMAND_OK) + { + snprintf(state->message, SHPDUMPERMSGLEN, _("Error executing main scan query: %s"), PQresultErrorMessage(res)); + PQclear(res); + return SHPDUMPERERR; + } + + PQclear(res); + + /* Setup initial scan state */ + state->currow = 0; + state->curresrow = 0; + state->currescount = 0; + state->fetchres = NULL; + + /* Generate the fetch query */ + state->fetch_query = malloc(256); + sprintf(state->fetch_query, "FETCH %d FROM cur", state->config->fetchsize); + + return SHPDUMPEROK; +} + + +/* Append the next row to the output shapefile */ +int ShpLoaderGenerateShapeRow(SHPDUMPERSTATE *state) +{ + char *hexewkb = NULL; + unsigned char *hexewkb_binary = NULL; + size_t hexewkb_len; + char *val; + SHPObject *obj = NULL; + LWGEOM *lwgeom; + + int i, geocolnum = 0; + + /* If we try to go pass the end of the table, fail immediately */ + if (state->currow > state->rowcount) + { + snprintf(state->message, SHPDUMPERMSGLEN, _("Tried to read past end of table!")); + PQclear(state->fetchres); + return SHPDUMPERERR; + } + + /* If we have reached the end of the current batch, fetch a new one */ + if (state->curresrow == state->currescount && state->currow < state->rowcount) + { + /* Clear the previous batch results */ + if (state->fetchres) + PQclear(state->fetchres); + + state->fetchres = PQexec(state->conn, state->fetch_query); + if (PQresultStatus(state->fetchres) != PGRES_TUPLES_OK) + { + snprintf(state->message, SHPDUMPERMSGLEN, _("Error executing fetch query: %s"), PQresultErrorMessage(state->fetchres)); + PQclear(state->fetchres); + return SHPDUMPERERR; + } + + state->curresrow = 0; + state->currescount = PQntuples(state->fetchres); + } + + /* Grab the id of the geo column if we have one */ + if (state->geo_col_name) + geocolnum = PQfnumber(state->fetchres, "_geoX"); + + /* Process the next record within the batch. First write out all of + the non-geo fields */ + for (i = 0; i < state->fieldcount; i++) + { + /* + * Transform NULL numbers to '0' + * This is because the shapelib + * won't easly take care of setting + * nulls unless paying the acquisition + * of a bug in long integer values + */ + if (PQgetisnull(state->fetchres, state->curresrow, i)) + { + val = nullDBFValue(state->dbffieldtypes[i]); + } + else + { + val = PQgetvalue(state->fetchres, state->curresrow, i); + val = goodDBFValue(val, state->dbffieldtypes[i]); + } + + /* Write it to the DBF file */ + if (!DBFWriteAttributeDirectly(state->dbf, state->currow, i, val)) + { + snprintf(state->message, SHPDUMPERMSGLEN, _("Error: record %d could not be created"), state->currow); + PQclear(state->fetchres); + return SHPDUMPERERR; + } + } + + /* Now process the geo field, if present */ + if (state->geo_col_name) + { + /* Handle NULL shapes */ + if (PQgetisnull(state->fetchres, state->curresrow, geocolnum)) + { + obj = SHPCreateSimpleObject(SHPT_NULL, 0, NULL, NULL, NULL); + if (SHPWriteObject(state->shp, -1, obj) == -1) + { + snprintf(state->message, SHPDUMPERMSGLEN, _("Error writing NULL shape for record %d"), state->currow); + PQclear(state->fetchres); + SHPDestroyObject(obj); + return SHPDUMPERERR; + } + SHPDestroyObject(obj); + } + else + { + /* Get the value from the result set */ + val = PQgetvalue(state->fetchres, state->curresrow, geocolnum); + + if (!state->config->binary) + { + if (state->pgis_major_version > 0) + { + LWDEBUG(4, "PostGIS >= 1.0, non-binary cursor"); + + /* Input is bytea encoded text field, so it must be unescaped and + then converted to hexewkb string */ + hexewkb_binary = PQunescapeBytea((unsigned char *)val, &hexewkb_len); + hexewkb = convert_bytes_to_hex(hexewkb_binary, hexewkb_len); + } + else + { + LWDEBUG(4, "PostGIS < 1.0, non-binary cursor"); + + /* Input is already hexewkb string, so we can just + copy directly to hexewkb */ + hexewkb_len = PQgetlength(state->fetchres, state->curresrow, geocolnum); + hexewkb = malloc(hexewkb_len + 1); + strncpy(hexewkb, val, hexewkb_len + 1); + } + } + else /* binary */ + { + LWDEBUG(4, "PostGIS (any version) using binary cursor"); + + /* Input is binary field - must convert to hexewkb string */ + hexewkb_len = PQgetlength(state->fetchres, state->curresrow, geocolnum); + hexewkb = convert_bytes_to_hex((unsigned char *)val, hexewkb_len); + } + + LWDEBUGF(4, "HexEWKB - length: %d value: %s", strlen(hexewkb), hexewkb); + + /* Deserialize the LWGEOM */ + lwgeom = lwgeom_from_hexwkb(hexewkb, LW_PARSER_CHECK_NONE); + if (!lwgeom) + { + snprintf(state->message, SHPDUMPERMSGLEN, _("Error parsing HEXEWKB for record %d"), state->currow); + PQclear(state->fetchres); + return SHPDUMPERERR; + } + + /* Call the relevant method depending upon the geometry type */ + LWDEBUGF(4, "geomtype: %s\n", lwtype_name(lwgeom->type)); + + switch (lwgeom->type) + { + case POINTTYPE: + obj = create_point(state, lwgeom_as_lwpoint(lwgeom)); + break; + + case MULTIPOINTTYPE: + obj = create_multipoint(state, lwgeom_as_lwmpoint(lwgeom)); + break; + + case POLYGONTYPE: + obj = create_polygon(state, lwgeom_as_lwpoly(lwgeom)); + break; + + case MULTIPOLYGONTYPE: + obj = create_multipolygon(state, lwgeom_as_lwmpoly(lwgeom)); + break; + + case LINETYPE: + obj = create_linestring(state, lwgeom_as_lwline(lwgeom)); + break; + + case MULTILINETYPE: + obj = create_multilinestring(state, lwgeom_as_lwmline(lwgeom)); + break; + + default: + snprintf(state->message, SHPDUMPERMSGLEN, _("Unknown WKB type (%d) for record %d"), lwgeom->type, state->currow); + PQclear(state->fetchres); + SHPDestroyObject(obj); + return SHPDUMPERERR; + } + + /* Free both the original and geometries */ + lwgeom_free(lwgeom); + + /* Write the shape out to the file */ + if (SHPWriteObject(state->shp, -1, obj) == -1) + { + snprintf(state->message, SHPDUMPERMSGLEN, _("Error writing shape %d"), state->currow); + PQclear(state->fetchres); + SHPDestroyObject(obj); + return SHPDUMPERERR; + } + + SHPDestroyObject(obj); + + /* Free the hexewkb (and temporary bytea unescaped string if used) */ + if (hexewkb) free(hexewkb); + if (hexewkb_binary) PQfreemem(hexewkb_binary); + } + } + + /* Increment ready for next time */ + state->curresrow++; + state->currow++; + + return SHPDUMPEROK; +} + + +/* Return a count of the number of rows in the table being dumped */ +int +ShpDumperGetRecordCount(SHPDUMPERSTATE *state) +{ + return state->rowcount; +} + + +/* Close the specified table and flush all files to disk */ +int +ShpDumperCloseTable(SHPDUMPERSTATE *state) +{ + int ret = SHPDUMPEROK; + + /* Clear the current batch fetch resource */ + PQclear(state->fetchres); + + /* If a geo column is present, generate the projection file */ + if (state->geo_col_name) + ret = projFileCreate(state); + + /* Close the DBF and SHP files */ + if (state->dbf) + DBFClose(state->dbf); + if (state->shp) + SHPClose(state->shp); + + return ret; +} + + +void +ShpDumperDestroy(SHPDUMPERSTATE *state) +{ + /* Destroy a state object created with ShpDumperConnect */ + int i; + + if (state != NULL) + { + /* Disconnect from the database */ + if (state->conn) + PQfinish(state->conn); + + /* Free the query strings */ + if (state->fetch_query) + free(state->fetch_query); + if (state->main_scan_query) + free(state->main_scan_query); + + /* Free the DBF information fields */ + if (state->dbffieldnames) + { + for (i = 0; i < state->fieldcount; i++) + free(state->dbffieldnames[i]); + free(state->dbffieldnames); + } + + if (state->dbffieldtypes) + free(state->dbffieldtypes); + + if (state->pgfieldnames) + free(state->pgfieldnames); + + /* Free any column map fieldnames if specified */ + if (state->column_map_size > 0) + { + for (i = 0; i < state->column_map_size; i++) + { + if (state->column_map_pgfieldnames[i]) + free(state->column_map_pgfieldnames[i]); + + if (state->column_map_dbffieldnames[i]) + free(state->column_map_dbffieldnames[i]); + } + + free(state->column_map_pgfieldnames); + free(state->column_map_dbffieldnames); + } + + /* Free other names */ + if (state->table) + free(state->table); + if (state->schema) + free(state->schema); + if (state->geo_col_name) + free(state->geo_col_name); + + /* Free the state itself */ + free(state); + } +} diff -Nru postgis-1.5.3/loader/pgsql2shp-core.h postgis-2.0.1/loader/pgsql2shp-core.h --- postgis-1.5.3/loader/pgsql2shp-core.h 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/loader/pgsql2shp-core.h 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,210 @@ +/********************************************************************** + * $Id: pgsql2shp-core.h 9324 2012-02-27 22:08:12Z pramsey $ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * Copyright 2001-2003 Refractions Research Inc. + * Copyright 2009 Paul Ramsey + * Copyright 2009 Mark Cave-Ayland + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "../postgis_config.h" +#include "libpq-fe.h" +#include "shapefil.h" +#include "shpcommon.h" +#include "getopt.h" + +#define P2S_RCSID "$Id: pgsql2shp-core.h 9324 2012-02-27 22:08:12Z pramsey $" + + +/* + * Error message handling + */ + +#define SHPDUMPERMSGLEN 1024 + +#define SHPDUMPEROK -1 +#define SHPDUMPERERR 0 +#define SHPDUMPERWARN 1 + + +/* + * Structure to hold the dumper configuration options + */ + +typedef struct shp_dumper_config +{ + /* Parameters used to connect to the database */ + SHPCONNECTIONCONFIG *conn; + + /* table to load into */ + char *table; + + /* schema to load into */ + char *schema; + + /* user-specified query, if supplied */ + char *usrquery; + + /* 0=use normal cursor, 1=use binary cursor */ + int binary; + + /* Name of the output shapefile */ + char *shp_file; + + /* TODO: rename? 0=switch not provided, 1=switch provided */ + int dswitchprovided; + + /* TODO: replace and combine with below 0=do not include gid column in shapefile, 1=include gid column in shapefile */ + int includegid; + + /* TODO: 0=escape column names, 1=do not escape column names */ + int unescapedattrs; + + /* Name of geometry/geography database column */ + char *geo_col_name; + + /* 0=do not keep fieldname case, 1=keep fieldname case */ + int keep_fieldname_case; + + /* Number of rows to fetch in a cursor batch */ + int fetchsize; + + /* Name of the column map file if specified */ + char *column_map_filename; + +} SHPDUMPERCONFIG; + + +/* + * Structure to holder the current dumper state + */ + +typedef struct shp_dumper_state +{ + /* Configuration for this state */ + SHPDUMPERCONFIG *config; + + /* Database connection being used */ + PGconn *conn; + + /* Version of PostGIS being used */ + int pgis_major_version; + + /* 0=dumper running on little endian, 1=dumper running on big endian */ + int big_endian; + + /* OID for geometries */ + int geom_oid; + + /* OID for geographies */ + int geog_oid; + + /* Schema of current working table */ + char *schema; + + /* Name of current working table */ + char *table; + + /* Name of geography/geometry column in current working table */ + char *geo_col_name; + + /* DBF fieldnames for all non-spatial fields */ + char **dbffieldnames; + + /* DBF field types for all non-spatial fields */ + int *dbffieldtypes; + + /* PostgreSQL column names for all non-spatial fields */ + char **pgfieldnames; + + /* PostgreSQL column lengths for all non-spatial fields */ + int *pgfieldlens; + + /* PostgreSQL column typmods for all non-spatial fields */ + int *pgfieldtypmods; + + /* Number of non-spatial fields in DBF output file */ + int fieldcount; + + /* Number of rows in the database table */ + int num_records; + + /* Name of the current shapefile */ + char *shp_file; + + /* Handle of the current DBF file */ + DBFHandle dbf; + + /* Handle of the current SHP file */ + SHPHandle shp; + + /* Indicate output geometry type: s=2d, z=3dz or 4d, m=3dm */ + char outtype; + + /* Shapefile/DBF geometry type */ + int outshptype; + + /* Number of rows in source database table */ + int rowcount; + + /* The main query being used for the table scan */ + char *main_scan_query; + + /* The current row number */ + int currow; + + /* The result set for the current FETCH batch */ + PGresult *fetchres; + + /* The row number within the current FETCH batch */ + int curresrow; + + /* The number of rows within the current FETCH batch */ + int currescount; + + /* The query being used to fetch records from the table */ + char *fetch_query; + + /* Last (error) message */ + char message[SHPDUMPERMSGLEN]; + + /* Column map pgfieldnames */ + char **column_map_pgfieldnames; + + /* Column map dbffieldnames */ + char **column_map_dbffieldnames; + + /* Number of entries within column map */ + int column_map_size; + +} SHPDUMPERSTATE; + + +/* Externally accessible functions */ +void set_dumper_config_defaults(SHPDUMPERCONFIG *config); +char *shapetypename(int num); + +SHPDUMPERSTATE *ShpDumperCreate(SHPDUMPERCONFIG *config); +char *ShpDumperGetConnectionStringFromConn(SHPCONNECTIONCONFIG *config); +int ShpDumperConnectDatabase(SHPDUMPERSTATE *state); +int ShpDumperOpenTable(SHPDUMPERSTATE *state); +int ShpDumperGetRecordCount(SHPDUMPERSTATE *state); +int ShpLoaderGenerateShapeRow(SHPDUMPERSTATE *state); +int ShpDumperCloseTable(SHPDUMPERSTATE *state); +void ShpDumperDestroy(SHPDUMPERSTATE *state); diff -Nru postgis-1.5.3/loader/pgsql2shp.c postgis-2.0.1/loader/pgsql2shp.c --- postgis-1.5.3/loader/pgsql2shp.c 2010-03-22 19:38:40.000000000 +0000 +++ postgis-2.0.1/loader/pgsql2shp.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,2494 +0,0 @@ -/********************************************************************** - * $Id: pgsql2shp.c 5451 2010-03-22 19:38:40Z pramsey $ - * - * PostGIS - Spatial Types for PostgreSQL - * http://postgis.refractions.net - * Copyright 2001-2003 Refractions Research Inc. - * - * This is free software; you can redistribute and/or modify it under - * the terms of the GNU General Public Licence. See the COPYING file. - * - ********************************************************************** - * - * PostGIS to Shapefile converter - * - * Original Author: Jeff Lounsbury - * Maintainer: Sandro Santilli - * - **********************************************************************/ - -static char rcsid[] = "$Id: pgsql2shp.c 5451 2010-03-22 19:38:40Z pramsey $"; - -#include "../postgis_config.h" - -#include -#include -#include -#include -#include -#include -/* Solaris9 does not provide stdint.h */ -/* #include */ -#include -#include /* for getpid() */ - -#ifdef HAVE_UNISTD_H /* for getpid() and getopt */ -#include -#endif - -#ifdef __CYGWIN__ -#include -#endif - -#include "libpq-fe.h" -#include "shapefil.h" -#include "getopt.h" - -#include "../liblwgeom/liblwgeom.h" - -/* - * Verbosity: - * set to 1 to see record fetching progress - * set to 2 to see also shapefile creation progress - * set to 3 for debugging - */ -#define VERBOSE 1 - -/* Maximum DBF field width (according to ARCGIS) */ -#define MAX_DBF_FIELD_SIZE 254 - -typedef unsigned char byte; - -/* Global data */ -PGconn *conn; -char conn_string[2048]; -int rowbuflen; -char temptablename[256]; -char *geo_col_name, *table, *shp_file, *schema, *usrquery; -int type_ary[256]; -char *main_scan_query; -DBFHandle dbf; -SHPHandle shp; -int geotype; -int outshptype; -char outtype; -int dswitchprovided; -int includegid; -int unescapedattrs; -int binary; -int keep_fieldname_case; -int big_endian = 0; -int pgis_major_version; - -/* Prototypes */ -int getMaxFieldSize(PGconn *conn, char *schema, char *table, char *fname); -int parse_commandline(int ARGC, char **ARGV); -void usage(char* me, int exitstatus, FILE* out); -char *getTableOID(char *schema, char *table); -int addRecord(PGresult *res, int residx, int row); -int initShapefile(char *shp_file, PGresult *res); -int initialize(void); -int getGeometryOID(PGconn *conn); -int getGeographyOID(PGconn *conn); -int getGeometryType(char *schema, char *table, char *geo_col_name); -int getGeometryMaxDims(char *schema, char *table, char *geo_col_name); -char *shapetypename(int num); -int reverse_points(int num_points, double *x, double *y, double *z, double *m); -int is_clockwise(int num_points,double *x,double *y,double *z); -int is_bigendian(void); -SHPObject * shape_creator_wrapper_WKB(char *hexwkb, int idx); -SHPObject * create_point(LWPOINT *lwpoint); -SHPObject * create_multipoint(LWMPOINT *lwmultipoint); -SHPObject * create_polygon(LWPOLY *lwpolygon); -SHPObject * create_multipolygon(LWMPOLY *lwmultipolygon); -SHPObject * create_linestring(LWLINE *lwlinestring); -SHPObject * create_multilinestring(LWMLINE *lwmultilinestring); -int get_postgis_major_version(void); -static void parse_table(char *spec); -static int create_usrquerytable(void); -static const char *nullDBFValue(char fieldType); -int projFileCreate(const char * pszFilename, char *schema, char *table, char *geo_col_name); -/** - * @brief Make appropriate formatting of a DBF value based on type. - * Might return untouched input or pointer to static private - * buffer: use return value right away. - */ -static const char * goodDBFValue(const char *in, char fieldType); - -/** @brief Binary to hexewkb conversion function */ -char *convert_bytes_to_hex(uchar *ewkb, size_t size); - - -/* liblwgeom allocator callback - install the defaults (malloc/free/stdout/stderr) */ -void lwgeom_init_allocators() -{ - lwgeom_install_default_allocators(); -} - -static void exit_nicely(PGconn *conn, int code) -{ - PQfinish(conn); - exit(code); -} - -int -main(int ARGC, char **ARGV) -{ - char *query=NULL; - int row; - PGresult *res; - char fetchquery[256]; - - dbf=NULL; - shp=NULL; - geotype=-1; - table = NULL; - schema = NULL; - usrquery = NULL; - geo_col_name = NULL; - shp_file = NULL; - main_scan_query = NULL; - rowbuflen=100; - outtype = 's'; - dswitchprovided = 0; - includegid=0; - unescapedattrs=0; - binary = 0; - keep_fieldname_case = 0; - conn_string[0] = '\0'; -#ifdef DEBUG - FILE *debug; -#endif - - if ( getenv("ROWBUFLEN") ) rowbuflen=atoi(getenv("ROWBUFLEN")); - - /* - * Make sure dates are returned in ISO - * style (YYYY-MM-DD). - * This is to allow goodDBFValue() function - * to successfully extract YYYYMMDD format - * expected in shapefile's dbf file. - */ - putenv("PGDATESTYLE=ISO"); - - if ( ! parse_commandline(ARGC, ARGV) ) - { - printf("\n**ERROR** invalid option or command parameters\n\n"); - usage(ARGV[0], 2, stderr); - } - - /* Use table name as shapefile name */ - if (shp_file == NULL) shp_file = table; - - /* Make a connection to the specified database, and exit on failure */ - conn = PQconnectdb(conn_string); - if (PQstatus(conn) == CONNECTION_BAD) - { - printf( "%s", PQerrorMessage(conn)); - exit_nicely(conn, 1); - } - - /* Create temporary table for user query */ - if ( usrquery ) - { - if ( ! create_usrquerytable() ) - { - exit(2); - } - } - -#ifdef DEBUG - debug = fopen("/tmp/trace.out", "w"); - PQtrace(conn, debug); -#endif /* DEBUG */ - - - /* Initialize shapefile and database infos */ - fprintf(stdout, "Initializing... "); - fflush(stdout); - if ( ! initialize() ) exit_nicely(conn, 1); - fprintf(stdout, "Done (postgis major version: %d).\n", - pgis_major_version); - - if ( pgis_major_version > 0 && dswitchprovided ) - { - printf("WARNING: -d switch is useless when dumping from postgis-1.0.0+\n"); - } - - - printf("Output shape: %s\n", shapetypename(outshptype)); - - - /* - * Begin the transaction - * (a cursor can only be defined inside a transaction block) - */ - res=PQexec(conn, "BEGIN"); - if ( ! res || PQresultStatus(res) != PGRES_COMMAND_OK ) - { - printf( "%s", PQerrorMessage(conn)); - exit_nicely(conn, 1); - } - PQclear(res); - - /* - * Declare a cursor for the main scan query - * as set by the initializer function. - */ - query = (char *)malloc(strlen(main_scan_query)+256); - if ( binary ) - { - sprintf(query, "DECLARE cur BINARY CURSOR FOR %s", - main_scan_query); - } - else - { - sprintf(query, "DECLARE cur CURSOR FOR %s", main_scan_query); - } - - LWDEBUGF(4, "QUERY: %s\n", query); - - free(main_scan_query); - res = PQexec(conn, query); - free(query); - if ( ! res || PQresultStatus(res) != PGRES_COMMAND_OK ) - { - printf( "MainScanQuery: %s", PQerrorMessage(conn)); - exit_nicely(conn, 1); - } - PQclear(res); - - /* Set the fetch query */ - sprintf(fetchquery, "FETCH %d FROM cur", rowbuflen); - - fprintf(stdout, "Dumping: "); - fflush(stdout); - - /* - * Main scan - */ - row=0; - while (1) - { - int i; - - /* Fetch next record buffer from cursor */ - fprintf(stdout, "X"); - fflush(stdout); - - LWDEBUGF(4, "Fetch query: %s", fetchquery); - - res = PQexec(conn, fetchquery); - if ( ! res || PQresultStatus(res) != PGRES_TUPLES_OK ) - { - printf( "RecordFetch: %s", - PQerrorMessage(conn)); - exit_nicely(conn, 1); - } - - /* No more rows, break the loop */ - if ( ! PQntuples(res) ) - { - PQclear(res); - break; - } - - for (i=0; ipoint, 0); - - xpts[0] = p4d.x; - ypts[0] = p4d.y; - zpts[0] = p4d.z; - mpts[0] = p4d.m; - - LWDEBUGF(4, "Point: %g %g %g %g", xpts[0], ypts[0], zpts[0], mpts[0]); - - obj = SHPCreateObject(outshptype, -1, 0, NULL, NULL, 1, xpts, ypts, zpts, mpts); - - free(xpts); - free(ypts); - free(zpts); - free(mpts); - - return obj; -} - -SHPObject * -create_multipoint(LWMPOINT *lwmultipoint) -{ - SHPObject *obj; - POINT4D p4d; - int i; - - double *xpts, *ypts, *zpts, *mpts; - - /* Allocate storage for points */ - xpts = malloc(sizeof(double) * lwmultipoint->ngeoms); - ypts = malloc(sizeof(double) * lwmultipoint->ngeoms); - zpts = malloc(sizeof(double) * lwmultipoint->ngeoms); - mpts = malloc(sizeof(double) * lwmultipoint->ngeoms); - - /* Grab the points: note getPoint4d will correctly handle - the case where the POINTs don't contain Z or M coordinates */ - for (i = 0; i < lwmultipoint->ngeoms; i++) - { - p4d = getPoint4d(lwmultipoint->geoms[i]->point, 0); - - xpts[i] = p4d.x; - ypts[i] = p4d.y; - zpts[i] = p4d.z; - mpts[i] = p4d.m; - - LWDEBUGF(4, "MultiPoint %d - Point: %g %g %g %g", i, xpts[i], ypts[i], zpts[i], mpts[i]); - } - - obj = SHPCreateObject(outshptype, -1, 0, NULL, NULL, lwmultipoint->ngeoms, xpts, ypts, zpts, mpts); - - free(xpts); - free(ypts); - free(zpts); - free(mpts); - - return obj; -} - -SHPObject * -create_polygon(LWPOLY *lwpolygon) -{ - SHPObject *obj; - POINT4D p4d; - int i, j; - - double *xpts, *ypts, *zpts, *mpts; - - int *shpparts, shppointtotal = 0, shppoint = 0; - - /* Allocate storage for ring pointers */ - shpparts = malloc(sizeof(int) * lwpolygon->nrings); - - /* First count through all the points in each ring so we now how much memory is required */ - for (i = 0; i < lwpolygon->nrings; i++) - shppointtotal += lwpolygon->rings[i]->npoints; - - /* Allocate storage for points */ - xpts = malloc(sizeof(double) * shppointtotal); - ypts = malloc(sizeof(double) * shppointtotal); - zpts = malloc(sizeof(double) * shppointtotal); - mpts = malloc(sizeof(double) * shppointtotal); - - LWDEBUGF(4, "Total number of points: %d", shppointtotal); - - /* Iterate through each ring setting up shpparts to point to the beginning of each ring */ - for (i = 0; i < lwpolygon->nrings; i++) - { - /* For each ring, store the integer coordinate offset for the start of each ring */ - shpparts[i] = shppoint; - - for (j = 0; j < lwpolygon->rings[i]->npoints; j++) - { - p4d = getPoint4d(lwpolygon->rings[i], j); - - xpts[shppoint] = p4d.x; - ypts[shppoint] = p4d.y; - zpts[shppoint] = p4d.z; - mpts[shppoint] = p4d.m; - - LWDEBUGF(4, "Polygon Ring %d - Point: %g %g %g %g", i, xpts[shppoint], ypts[shppoint], zpts[shppoint], mpts[shppoint]); - - /* Increment the point counter */ - shppoint++; - } - - /* - * First ring should be clockwise, - * other rings should be counter-clockwise - */ - if ( i == 0 ) - { - if ( ! is_clockwise(lwpolygon->rings[i]->npoints, - &xpts[shpparts[i]], &ypts[shpparts[i]], NULL) ) - { - LWDEBUG(4, "Outer ring not clockwise, forcing clockwise\n"); - - reverse_points(lwpolygon->rings[i]->npoints, - &xpts[shpparts[i]], &ypts[shpparts[i]], - &zpts[shpparts[i]], &mpts[shpparts[i]]); - } - } - else - { - if ( is_clockwise(lwpolygon->rings[i]->npoints, - &xpts[shpparts[i]], &ypts[shpparts[i]], NULL) ) - { - LWDEBUGF(4, "Inner ring %d not counter-clockwise, forcing counter-clockwise\n", i); - - reverse_points(lwpolygon->rings[i]->npoints, - &xpts[shpparts[i]], &ypts[shpparts[i]], - &zpts[shpparts[i]], &mpts[shpparts[i]]); - } - } - } - - obj = SHPCreateObject(outshptype, -1, lwpolygon->nrings, shpparts, NULL, shppointtotal, xpts, ypts, zpts, mpts); - - free(xpts); - free(ypts); - free(zpts); - free(mpts); - free(shpparts); - - return obj; -} - -SHPObject * -create_multipolygon(LWMPOLY *lwmultipolygon) -{ - SHPObject *obj; - POINT4D p4d; - int i, j, k; - - double *xpts, *ypts, *zpts, *mpts; - - int *shpparts, shppointtotal = 0, shppoint = 0, shpringtotal = 0, shpring = 0; - - /* NOTE: Multipolygons are stored in shapefiles as Polygon* shapes with multiple outer rings */ - - /* First count through each ring of each polygon so we now know much memory is required */ - for (i = 0; i < lwmultipolygon->ngeoms; i++) - { - for (j = 0; j < lwmultipolygon->geoms[i]->nrings; j++) - { - shpringtotal++; - shppointtotal += lwmultipolygon->geoms[i]->rings[j]->npoints; - } - } - - /* Allocate storage for ring pointers */ - shpparts = malloc(sizeof(int) * shpringtotal); - - /* Allocate storage for points */ - xpts = malloc(sizeof(double) * shppointtotal); - ypts = malloc(sizeof(double) * shppointtotal); - zpts = malloc(sizeof(double) * shppointtotal); - mpts = malloc(sizeof(double) * shppointtotal); - - LWDEBUGF(4, "Total number of rings: %d Total number of points: %d", shpringtotal, shppointtotal); - - /* Iterate through each ring of each polygon in turn */ - for (i = 0; i < lwmultipolygon->ngeoms; i++) - { - for (j = 0; j < lwmultipolygon->geoms[i]->nrings; j++) - { - /* For each ring, store the integer coordinate offset for the start of each ring */ - shpparts[shpring] = shppoint; - - LWDEBUGF(4, "Ring offset: %d", shpring); - - for (k = 0; k < lwmultipolygon->geoms[i]->rings[j]->npoints; k++) - { - p4d = getPoint4d(lwmultipolygon->geoms[i]->rings[j], k); - - xpts[shppoint] = p4d.x; - ypts[shppoint] = p4d.y; - zpts[shppoint] = p4d.z; - mpts[shppoint] = p4d.m; - - LWDEBUGF(4, "MultiPolygon %d Polygon Ring %d - Point: %g %g %g %g", i, j, xpts[shppoint], ypts[shppoint], zpts[shppoint], mpts[shppoint]); - - /* Increment the point counter */ - shppoint++; - } - - /* - * First ring should be clockwise, - * other rings should be counter-clockwise - */ - if ( j == 0 ) - { - if ( ! is_clockwise(lwmultipolygon->geoms[i]->rings[j]->npoints, - &xpts[shpparts[shpring]], &ypts[shpparts[shpring]], NULL) ) - { - LWDEBUG(4, "Outer ring not clockwise, forcing clockwise\n"); - - reverse_points(lwmultipolygon->geoms[i]->rings[j]->npoints, - &xpts[shpparts[shpring]], &ypts[shpparts[shpring]], - &zpts[shpparts[shpring]], &mpts[shpparts[shpring]]); - } - } - else - { - if ( is_clockwise(lwmultipolygon->geoms[i]->rings[j]->npoints, - &xpts[shpparts[shpring]], &ypts[shpparts[shpring]], NULL) ) - { - LWDEBUGF(4, "Inner ring %d not counter-clockwise, forcing counter-clockwise\n", i); - - reverse_points(lwmultipolygon->geoms[i]->rings[j]->npoints, - &xpts[shpparts[shpring]], &ypts[shpparts[shpring]], - &zpts[shpparts[shpring]], &mpts[shpparts[shpring]]); - } - } - - /* Increment the ring counter */ - shpring++; - } - } - - obj = SHPCreateObject(outshptype, -1, shpringtotal, shpparts, NULL, shppointtotal, xpts, ypts, zpts, mpts); - - free(xpts); - free(ypts); - free(zpts); - free(mpts); - free(shpparts); - - return obj; -} - -SHPObject * -create_linestring(LWLINE *lwlinestring) -{ - SHPObject *obj; - POINT4D p4d; - int i; - - double *xpts, *ypts, *zpts, *mpts; - - /* Allocate storage for points */ - xpts = malloc(sizeof(double) * lwlinestring->points->npoints); - ypts = malloc(sizeof(double) * lwlinestring->points->npoints); - zpts = malloc(sizeof(double) * lwlinestring->points->npoints); - mpts = malloc(sizeof(double) * lwlinestring->points->npoints); - - /* Grab the points: note getPoint4d will correctly handle - the case where the POINTs don't contain Z or M coordinates */ - for (i = 0; i < lwlinestring->points->npoints; i++) - { - p4d = getPoint4d(lwlinestring->points, i); - - xpts[i] = p4d.x; - ypts[i] = p4d.y; - zpts[i] = p4d.z; - mpts[i] = p4d.m; - - LWDEBUGF(4, "Linestring - Point: %g %g %g %g", i, xpts[i], ypts[i], zpts[i], mpts[i]); - } - - obj = SHPCreateObject(outshptype, -1, 0, NULL, NULL, lwlinestring->points->npoints, xpts, ypts, zpts, mpts); - - free(xpts); - free(ypts); - free(zpts); - free(mpts); - - return obj; -} - -SHPObject * -create_multilinestring(LWMLINE *lwmultilinestring) -{ - SHPObject *obj; - POINT4D p4d; - int i, j; - - double *xpts, *ypts, *zpts, *mpts; - - int *shpparts, shppointtotal = 0, shppoint = 0; - - /* Allocate storage for ring pointers */ - shpparts = malloc(sizeof(int) * lwmultilinestring->ngeoms); - - /* First count through all the points in each linestring so we now how much memory is required */ - for (i = 0; i < lwmultilinestring->ngeoms; i++) - shppointtotal += lwmultilinestring->geoms[i]->points->npoints; - - LWDEBUGF(3, "Total number of points: %d", shppointtotal); - - /* Allocate storage for points */ - xpts = malloc(sizeof(double) * shppointtotal); - ypts = malloc(sizeof(double) * shppointtotal); - zpts = malloc(sizeof(double) * shppointtotal); - mpts = malloc(sizeof(double) * shppointtotal); - - /* Iterate through each linestring setting up shpparts to point to the beginning of each line */ - for (i = 0; i < lwmultilinestring->ngeoms; i++) - { - /* For each linestring, store the integer coordinate offset for the start of each line */ - shpparts[i] = shppoint; - - for (j = 0; j < lwmultilinestring->geoms[i]->points->npoints; j++) - { - p4d = getPoint4d(lwmultilinestring->geoms[i]->points, j); - - xpts[shppoint] = p4d.x; - ypts[shppoint] = p4d.y; - zpts[shppoint] = p4d.z; - mpts[shppoint] = p4d.m; - - LWDEBUGF(4, "Linestring %d - Point: %g %g %g %g", i, xpts[shppoint], ypts[shppoint], zpts[shppoint], mpts[shppoint]); - - /* Increment the point counter */ - shppoint++; - } - } - - obj = SHPCreateObject(outshptype, -1, lwmultilinestring->ngeoms, shpparts, NULL, shppoint, xpts, ypts, zpts, mpts); - - free(xpts); - free(ypts); - free(zpts); - free(mpts); - - return obj; -} - -SHPObject * -shape_creator_wrapper_WKB(char *hexwkb, int idx) -{ - int result; - LWGEOM_PARSER_RESULT lwg_parser_result; - LWGEOM *lwgeom; - - - /* Use the liblwgeom parser to convert from EWKB format to serialized LWGEOM */ - result = serialized_lwgeom_from_hexwkb(&lwg_parser_result, hexwkb, PARSER_CHECK_ALL); - if (result) - { - printf("ERROR: %s\n", lwg_parser_result.message); - exit(1); - } - - /* Deserialize the LWGEOM */ - lwgeom = lwgeom_deserialize(lwg_parser_result.serialized_lwgeom); - - /* Call the relevant method depending upon the geometry type */ - LWDEBUGF(4, "geomtype: %d\n", lwgeom_getType(lwgeom->type)); - - switch (lwgeom_getType(lwgeom->type)) - { - case POINTTYPE: - return create_point(lwgeom_as_lwpoint(lwgeom)); - break; - - case MULTIPOINTTYPE: - return create_multipoint(lwgeom_as_lwmpoint(lwgeom)); - break; - - case POLYGONTYPE: - return create_polygon(lwgeom_as_lwpoly(lwgeom)); - break; - - case MULTIPOLYGONTYPE: - return create_multipolygon(lwgeom_as_lwmpoly(lwgeom)); - break; - - case LINETYPE: - return create_linestring(lwgeom_as_lwline(lwgeom)); - break; - - case MULTILINETYPE: - return create_multilinestring(lwgeom_as_lwmline(lwgeom)); - break; - - default: - printf( "Unknown WKB type (%8.8x) - (%s:%d)\n", - lwgeom_getType(lwgeom->type), __FILE__, __LINE__); - return NULL; - } - - /* Free both the original and geometries */ - lwfree(lwg_parser_result.serialized_lwgeom); - lwfree(lwgeom); -} - - -/*Reverse the clockwise-ness of the point list... */ -int -reverse_points(int num_points, double *x, double *y, double *z, double *m) -{ - - int i,j; - double temp; - j = num_points -1; - for (i=0; i 0 ) - { - free(x_new); - free(y_new); - return 0; /*counter-clockwise */ - } - else - { - free(x_new); - free(y_new); - return 1; /*clockwise */ - } -} - -/* - * Returns OID integer on success - * Returns -1 on error. - */ -int -getGeometryOID(PGconn *conn) -{ - PGresult *res1; - char *temp_int; - int OID; - - res1=PQexec(conn, "select OID from pg_type where typname = 'geometry'"); - if ( ! res1 || PQresultStatus(res1) != PGRES_TUPLES_OK ) - { - printf( "OIDQuery: %s", PQerrorMessage(conn)); - return -1; - } - - if (PQntuples(res1) <= 0 ) - { - printf( "Geometry type unknown " - "(have you enabled postgis?)\n"); - return -1; - } - - temp_int = (char *)PQgetvalue(res1, 0, 0); - OID = atoi(temp_int); - PQclear(res1); - return OID; -} - -int -getGeographyOID(PGconn *conn) -{ - PGresult *res1; - char *temp_int; - int OID; - - res1=PQexec(conn, "select OID from pg_type where typname = 'geography'"); - if ( ! res1 || PQresultStatus(res1) != PGRES_TUPLES_OK ) - { - printf( "OIDQuery: %s", PQerrorMessage(conn)); - return -1; - } - - if (PQntuples(res1) <= 0 ) - { - printf( "Geometry type unknown " - "(have you enabled postgis?)\n"); - return 0; - } - - temp_int = (char *)PQgetvalue(res1, 0, 0); - OID = atoi(temp_int); - PQclear(res1); - return OID; -} - - - -/* - * Passed result is a 1 row result. - * Return 1 on success. - * Return 0 on failure. - */ -int -addRecord(PGresult *res, int residx, int row) -{ - int j; - int nFields = PQnfields(res); - int flds = 0; /* number of dbf field */ - char *hexewkb = NULL; - unsigned char *hexewkb_binary = NULL; - size_t hexewkb_len; - - for (j=0; j 0 ) - { - LWDEBUG(4, "PostGIS >= 1.0, non-binary cursor"); - - /* Input is bytea encoded text field, so it must be unescaped and - then converted to hexewkb string */ - hexewkb_binary = PQunescapeBytea((byte *)val, &hexewkb_len); - hexewkb = convert_bytes_to_hex(hexewkb_binary, hexewkb_len); - } - else - { - LWDEBUG(4, "PostGIS < 1.0, non-binary cursor"); - - /* Input is already hexewkb string, so we can just - copy directly to hexewkb */ - hexewkb_len = PQgetlength(res, residx, j); - hexewkb = malloc(hexewkb_len + 1); - strncpy(hexewkb, val, hexewkb_len + 1); - } - } - else /* binary */ - { - LWDEBUG(4, "PostGIS (any version) using binary cursor"); - - /* Input is binary field - must convert to hexewkb string */ - hexewkb_len = PQgetlength(res, residx, j); - hexewkb = convert_bytes_to_hex((unsigned char *)val, hexewkb_len); - } - - LWDEBUGF(4, "HexEWKB - length: %d value: %s", strlen(hexewkb), hexewkb); - - obj = shape_creator_wrapper_WKB(hexewkb, row); - if ( ! obj ) - { - printf( "Error creating shape for record %d " - "(geotype is %d)\n", row, geotype); - return 0; - } - if ( SHPWriteObject(shp,-1,obj) == -1) - { - printf( "Error writing shape %d\n", row); - SHPDestroyObject(obj); - return 0; - } - SHPDestroyObject(obj); - - /* Free the hexewkb (and temporary bytea unescaped string if used) */ - if (hexewkb) free(hexewkb); - if (hexewkb_binary) PQfreemem(hexewkb_binary); - } - - LWDEBUGF(4, "Finished adding record %d\n", row); - - return 1; -} - -/** - * @brief Return allocate memory. Free after use. - */ -char * -getTableOID(char *schema, char *table) -{ - PGresult *res3; - char *query; - char *ret; - size_t size; - - size = strlen(table)+256; - if ( schema ) size += strlen(schema)+1; - - query = (char *)malloc(size); - - if ( schema ) - { - sprintf(query, "SELECT oid FROM pg_class c, pg_namespace n WHERE c.relnamespace n.oid AND n.nspname = '%s' AND c.relname = '%s'", schema, table); - } - else - { - sprintf(query, "SELECT oid FROM pg_class WHERE relname = '%s'", table); - } - - res3 = PQexec(conn, query); - free(query); - if ( ! res3 || PQresultStatus(res3) != PGRES_TUPLES_OK ) - { - printf( "TableOID: %s", PQerrorMessage(conn)); - exit_nicely(conn, 1); - } - if (PQntuples(res3) == 1 ) - { - ret = strdup(PQgetvalue(res3, 0, 0)); - } - else if (PQntuples(res3) == 0 ) - { - printf( "Cannot find relation OID (does table exist?).\n"); - PQclear(res3); - return NULL; - } - else - { - ret = strdup(PQgetvalue(res3, 0, 0)); - printf( "Warning: Multiple relations detected, the program will only dump the first relation.\n"); - } - PQclear(res3); - return ret; -} - -/** @brief Return geometry type as defined at top file. - * @return -1 on error. - * 0 on unknown or unsupported geometry type. - * Set outtype to 'm' or 'z' depending on input type. - */ -int -getGeometryType(char *schema, char *table, char *geo_col_name) -{ - char query[1024]; - PGresult *res; - char *geo_str; /* the geometry type string */ - int multitype=0; - int basetype=0; - int foundmulti=0; - int foundsingle=0; - int i; - - /************************************************** - * Get what kind of Geometry type is in the table - **************************************************/ - - if ( schema ) - { - sprintf(query, "SELECT DISTINCT geometrytype(\"%s\"::geometry) " - "FROM \"%s\".\"%s\" WHERE NOT geometrytype(\"%s\"::geometry) " - "IS NULL", geo_col_name, schema, table, geo_col_name); - } - else - { - sprintf(query, "SELECT DISTINCT geometrytype(\"%s\"::geometry) " - "FROM \"%s\" WHERE NOT geometrytype(\"%s\"::geometry) IS NULL", - geo_col_name, table, geo_col_name); - } - -#if VERBOSE > 2 - printf( "%s\n",query); -#endif - res = PQexec(conn, query); - if ( ! res || PQresultStatus(res) != PGRES_TUPLES_OK ) - { - printf( "GeometryType: %s", PQerrorMessage(conn)); - return -1; - } - - if (PQntuples(res) == 0) - { - printf("ERROR: Cannot determine geometry type (empty table).\n"); - PQclear(res); - return -1; - } - - /* This will iterate max 2 times */ - for (i=0; i 0 ) - if ( -1 == getGeometryMaxDims(schema, table, geo_col_name) ) - return -1; - - if ( foundmulti ) - return multitype; - else - return basetype; - -} - -/** - * @brief Set global outtype variable to: - * 'm' for 3dm input - * 'z' for 3dz or 4d input - * 's' for 2d - * @return -1 on error, 0 on success. - * Call only on postgis >= 1.0.0 - */ -int -getGeometryMaxDims(char *schema, char *table, char *geo_col_name) -{ - char query[1024]; - PGresult *res; - int maxzmflag; - - if ( schema ) - { - sprintf(query, "SELECT max(zmflag(\"%s\"::geometry)) " - "FROM \"%s\".\"%s\"", - geo_col_name, schema, table); - } - else - { - sprintf(query, "SELECT max(zmflag(\"%s\"::geometry)) " - "FROM \"%s\"", - geo_col_name, table); - } - -#if VERBOSE > 2 - printf("%s\n",query); -#endif - res = PQexec(conn, query); - if ( ! res || PQresultStatus(res) != PGRES_TUPLES_OK ) - { - printf( "ZMflagQuery: %s", PQerrorMessage(conn)); - PQclear(res); - return -1; - } - - if (PQntuples(res) == 0) - { - printf("ERROR: Cannot determine geometry dimensions (empty table).\n"); - PQclear(res); - return -1; - } - - maxzmflag = atoi(PQgetvalue(res, 0, 0)); - PQclear(res); - - switch (maxzmflag) - { - case 0: - outtype = 's'; - break; - case 1: - outtype = 'm'; - break; - default: - outtype = 'z'; - break; - } - - - return 0; -} - -void -usage(char* me, int status, FILE* out) -{ - fprintf(out,"RCSID: %s RELEASE: %s\n", rcsid, POSTGIS_VERSION); - fprintf(out,"USAGE: %s [] [.]
\n", me); - fprintf(out," %s [] \n", me); - fprintf(out,"\n"); - fprintf(out,"OPTIONS:\n"); - fprintf(out," -f Use this option to specify the name of the file\n"); - fprintf(out," to create.\n"); - fprintf(out," -h Allows you to specify connection to a database on a\n"); - fprintf(out," machine other than the default.\n"); - fprintf(out," -p Allows you to specify a database port other than the default.\n"); - fprintf(out," -P Connect to the database with the specified password.\n"); - fprintf(out," -u Connect to the database as the specified user.\n"); - fprintf(out," -g Specify the geometry column to be exported.\n"); - fprintf(out," -b Use a binary cursor.\n"); - fprintf(out," -r Raw mode. Do not assume table has been created by \n"); - fprintf(out," the loader. This would not unescape attribute names\n"); - fprintf(out," and will not skip the 'gid' attribute.\n"); - fprintf(out," -k Keep postgresql identifiers case.\n"); - fprintf(out," -? Display this help screen.\n"); - fprintf(out,"\n"); - exit (status); -} - -/** @brief Parse command line parameters */ -int -parse_commandline(int ARGC, char **ARGV) -{ - int c, curindex; - char buf[2048]; - - if ( ARGC == 1 ) - { - usage(ARGV[0], 0, stdout); - } - - memset(buf, 0, 2048); /* just in case... */ - - /* Parse command line */ - while ((c = pgis_getopt(ARGC, ARGV, "bf:h:du:p:P:g:rk")) != EOF) - { - switch (c) - { - case 'b': - binary = 1; - break; - case 'f': - shp_file = pgis_optarg; - break; - case 'h': - snprintf(buf + strlen(buf), 255, "host=%s ", pgis_optarg); - break; - case 'd': - dswitchprovided = 1; - outtype = 'z'; - break; - case 'r': - includegid = 1; - unescapedattrs = 1; - break; - case 'u': - snprintf(buf + strlen(buf), 255, "user=%s ", pgis_optarg); - break; - case 'p': - snprintf(buf + strlen(buf), 255, "port=%s ", pgis_optarg); - break; - case 'P': - snprintf(buf + strlen(buf), 255, "password=%s ", pgis_optarg); - break; - case 'g': - geo_col_name = pgis_optarg; - break; - case 'k': - keep_fieldname_case = 1; - break; - case '?': - usage(ARGV[0], 0, stdout); - default: - return 0; - } - } - - curindex=0; - for (; pgis_optind 0 AND c.relname = '%s'", schema, table); - } - else - { - sprintf(query, "SELECT a.attname, a.atttypid, " - "a.atttypmod FROM " - "pg_attribute a, pg_class c WHERE " - "a.attrelid = c.oid and a.attnum > 0 AND " - "a.atttypid != 0 AND " - "c.relname = '%s'", table); - } - - - /* Exec query */ - LWDEBUGF(4, "Attribute query: %s\n", query); - - res = PQexec(conn, query); - free(query); - if ( ! res || PQresultStatus(res) != PGRES_TUPLES_OK ) - { - printf( "Querying for attributes: %s", - PQerrorMessage(conn)); - return 0; - } - if (! PQntuples(res)) - { - printf( "Table %s does not exist\n", table); - PQclear(res); - return 0; - } - - /* Create the dbf file */ - dbf = DBFCreate(shp_file); - if ( ! dbf ) - { - printf( "Could not create dbf file\n"); - return 0; - } - - /* Get geometry oid */ - geom_oid = getGeometryOID(conn); - if ( geom_oid == -1 ) - { - PQclear(res); - return 0; - } - /* Get geography oid */ - geog_oid = getGeographyOID(conn); - if ( geog_oid == -1 ) - { - PQclear(res); - return 0; - } - - /* - * Scan the result setting fields to be returned in mainscan - * query, filling the type_ary, and creating .dbf and .shp files. - */ - for (i=0; i MAX_DBF_FIELD_SIZE ) - { - fprintf(stderr, "Warning: values of field '%s' " - "exceeding maximum dbf field width (%d) " - "will be truncated.\n", - fname, MAX_DBF_FIELD_SIZE); - size = MAX_DBF_FIELD_SIZE; - } - - LWDEBUGF(3, "FIELD_NAME: %s, SIZE: %d\n", field_name, size); - - /* generic type (use string representation) */ - if (DBFAddField(dbf, field_name, FTString, size, 0) == -1) - { - fprintf(stderr, "Error - String field could not " - "be created.\n"); - return 0; - } - type_ary[mainscan_nflds]=FTString; - mainscan_flds[mainscan_nflds++] = fname; - } - - /* Release dbf field memory */ - for (i=0; i 0 ) - { - sprintf(buf, "asEWKB(setSRID(\"%s\"::geometry, -1), 'XDR')", mainscan_flds[i]); - } - else - { - sprintf(buf, "asbinary(\"%s\"::geometry, 'XDR')", - mainscan_flds[i]); - } - } - else /* little_endian */ - { - if ( pgis_major_version > 0 ) - { - sprintf(buf, "asEWKB(setSRID(\"%s\"::geometry, -1), 'NDR')", mainscan_flds[i]); - } - else - { - sprintf(buf, "asbinary(\"%s\"::geometry, 'NDR')", - mainscan_flds[i]); - } - } - } - else - { - if ( binary ) - sprintf(buf, "\"%s\"::text", mainscan_flds[i]); - else - sprintf(buf, "\"%s\"", mainscan_flds[i]); - } - - strcat(main_scan_query, buf); - } - - if ( schema ) - { - sprintf(buf, " FROM \"%s\".\"%s\"", schema, table); - } - else - { - sprintf(buf, " FROM \"%s\"", table); - } - - strcat(main_scan_query, buf); - - /* Order by 'gid' (if found) */ - if ( gidfound ) - { - sprintf(buf, " ORDER BY \"gid\""); - strcat(main_scan_query, buf); - } - - PQclear(res); - - return 1; -} - -/* - * Return the maximum octet_length from given table. - * Return -1 on error. - */ -int -getMaxFieldSize(PGconn *conn, char *schema, char *table, char *fname) -{ - int size; - char *query; - PGresult *res; - - /*( this is ugly: don't forget counting the length */ - /* when changing the fixed query strings ) */ - - if ( schema ) - { - query = (char *)malloc(strlen(fname)+strlen(table)+ - strlen(schema)+46); - sprintf(query, - "select max(octet_length(\"%s\"::text)) from \"%s\".\"%s\"", - fname, schema, table); - } - else - { - query = (char *)malloc(strlen(fname)+strlen(table)+46); - sprintf(query, - "select max(octet_length(\"%s\"::text)) from \"%s\"", - fname, table); - } -#if VERBOSE > 2 - printf( "maxFieldLenQuery: %s\n", query); -#endif - res = PQexec(conn, query); - free(query); - if ( ! res || PQresultStatus(res) != PGRES_TUPLES_OK ) - { - printf( "Querying for maximum field length: %s", - PQerrorMessage(conn)); - return -1; - } - - if (PQntuples(res) <= 0 ) - { - PQclear(res); - return -1; - } - size = atoi(PQgetvalue(res, 0, 0)); - PQclear(res); - return size; -} - -int -is_bigendian(void) -{ - int test = 1; - - if ( (((char *)(&test))[0]) == 1) - { - return 0; /*NDR (little_endian) */ - } - else - { - return 1; /*XDR (big_endian) */ - } -} - -char * -shapetypename(int num) -{ - switch (num) - { - case SHPT_NULL: - return "Null Shape"; - case SHPT_POINT: - return "Point"; - case SHPT_ARC: - return "PolyLine"; - case SHPT_POLYGON: - return "Polygon"; - case SHPT_MULTIPOINT: - return "MultiPoint"; - case SHPT_POINTZ: - return "PointZ"; - case SHPT_ARCZ: - return "PolyLineZ"; - case SHPT_POLYGONZ: - return "PolygonZ"; - case SHPT_MULTIPOINTZ: - return "MultiPointZ"; - case SHPT_POINTM: - return "PointM"; - case SHPT_ARCM: - return "PolyLineM"; - case SHPT_POLYGONM: - return "PolygonM"; - case SHPT_MULTIPOINTM: - return "MultiPointM"; - case SHPT_MULTIPATCH: - return "MultiPatch"; - default: - return "Unknown"; - } -} - -/** - * @brief Either get a table (and optionally a schema) - * or a query. - * A query starts with a "select" or "SELECT" string. - */ -static void -parse_table(char *spec) -{ - char *ptr; - - /* Spec is a query */ - if ( strstr(spec, "SELECT ") || strstr(spec, "select ") ) - { - usrquery = spec; - - /* - * encode pid in table name to reduce - * clashes probability (see bug#115) - */ - sprintf(temptablename, - "__pgsql2shp%lu_tmp_table", - (long)getpid()); - table = temptablename; - } - else - { - table = spec; - if ( (ptr=strchr(table, '.')) ) - { - *ptr = '\0'; - schema = table; - table = ptr+1; - } - } -} - -static int -create_usrquerytable(void) -{ - char *query; - PGresult *res; - - query = malloc(strlen(table)+strlen(usrquery)+32); - sprintf(query, "CREATE TEMP TABLE \"%s\" AS %s", table, usrquery); - - printf("Preparing table for user query... "); - fflush(stdout); - res = PQexec(conn, query); - free(query); - if ( ! res || PQresultStatus(res) != PGRES_COMMAND_OK ) - { - printf( "Failed: %s\n", - PQerrorMessage(conn)); - return 0; - } - PQclear(res); - printf("Done.\n"); - return 1; -} - -/* This is taken and adapted from dbfopen.c of shapelib */ -static const char * -nullDBFValue(char fieldType) -{ - switch (fieldType) - { - case FTInteger: - case FTDouble: - /* NULL numeric fields have value "****************" */ - return "****************"; - - case FTDate: - /* NULL date fields have value "00000000" */ - return " "; - - case FTLogical: - /* NULL boolean fields have value "?" */ - return "?"; - - default: - /* empty string fields are considered NULL */ - return ""; - } -} - -/** - * @brief Make appropriate formatting of a DBF value based on type. - * Might return untouched input or pointer to static private - * buffer: use return value right away. - */ -static const char * -goodDBFValue(const char *in, char fieldType) -{ - /* - * We only work on FTLogical and FTDate. - * FTLogical is 1 byte, FTDate is 8 byte (YYYYMMDD) - * We allocate space for 9 bytes to take - * terminating null into account - */ - static char buf[9]; - - switch (fieldType) - { - case FTLogical: - buf[0] = toupper(in[0]); - buf[1]='\0'; - return buf; - case FTDate: - buf[0]=in[0]; /* Y */ - buf[1]=in[1]; /* Y */ - buf[2]=in[2]; /* Y */ - buf[3]=in[3]; /* Y */ - buf[4]=in[5]; /* M */ - buf[5]=in[6]; /* M */ - buf[6]=in[8]; /* D */ - buf[7]=in[9]; /* D */ - buf[8]='\0'; - return buf; - default: - return in; - } -} - -char *convert_bytes_to_hex(uchar *ewkb, size_t size) -{ - int i; - char *hexewkb; - - /* Convert the byte stream to a hex string using liblwgeom's deparse_hex function */ - hexewkb = malloc(size * 2 + 1); - for (i=0; i 1 THEN 'm' ELSE MAX(sr.srtext) END As srtext " - " FROM \"%s\".\"%s\" As g INNER JOIN spatial_ref_sys sr ON sr.srid = ST_SRID((g.\"%s\")::geometry)) , ' ') As srtext ", - esc_schema, esc_table,esc_geo_col_name, schema, table, geo_col_name); - free(esc_schema); - } - else - { - sprintf(query, "SELECT COALESCE((SELECT sr.srtext " - " FROM geometry_columns As gc INNER JOIN spatial_ref_sys sr ON sr.srid = gc.srid " - " WHERE gc.f_table_name = '%s' AND gc.f_geometry_column = '%s' AND pg_table_is_visible((gc.f_table_schema || '.' || gc.f_table_name)::regclass) LIMIT 1), " - " (SELECT CASE WHEN COUNT(DISTINCT sr.srid) > 1 THEN 'm' ELSE MAX(sr.srtext) END as srtext " - " FROM \"%s\" As g INNER JOIN spatial_ref_sys sr ON sr.srid = ST_SRID((g.\"%s\")::geometry)), ' ') As srtext ", - esc_table, esc_geo_col_name, table, geo_col_name); - } - - LWDEBUGF(3,"%s\n",query); - free(esc_table); - free(esc_geo_col_name); - - res = PQexec(conn, query); - - if ( ! res || PQresultStatus(res) != PGRES_TUPLES_OK ) - { - printf( "Error: %s", PQerrorMessage(conn)); - return 0; - } - - for (i=0; i < PQntuples(res); i++) - { - srtext = PQgetvalue(res, i, 0); - if (strcmp(srtext,"m") == 0) - { - printf("ERROR: Mixed set of spatial references. No prj file will be generated.\n"); - PQclear(res); - return 0; - } - else - { - if (srtext[0] == ' ') - { - printf("WARNING: Cannot determine spatial reference (empty table or unknown spatial ref). No prj file will be generated.\n"); - PQclear(res); - return 0; - } - else - { - /* -------------------------------------------------------------------- */ - /* Compute the base (layer) name. If there is any extension */ - /* on the passed in filename we will strip it off. */ - /* -------------------------------------------------------------------- */ - pszBasename = (char *) malloc(strlen(pszFilename)+5); - strcpy( pszBasename, pszFilename ); - for ( i = strlen(pszBasename)-1; - i > 0 && pszBasename[i] != '.' && pszBasename[i] != '/' - && pszBasename[i] != '\\'; - i-- ) {} - - if ( pszBasename[i] == '.' ) - pszBasename[i] = '\0'; - - pszFullname = (char *) malloc(strlen(pszBasename) + 5); - sprintf( pszFullname, "%s.prj", pszBasename ); - free( pszBasename ); - - - /* -------------------------------------------------------------------- */ - /* Create the file. */ - /* -------------------------------------------------------------------- */ - fp = fopen( pszFullname, "wb" ); - if ( fp == NULL ) - { - return 0; - } - result = fputs (srtext,fp); - LWDEBUGF(3, "\n result %d proj SRText is %s .\n", result, srtext); - fclose( fp ); - free( pszFullname ); - } - } - } - PQclear(res); - free(query); - return 1; -} - -/********************************************************************** - * $Log$ - * Revision 1.85 2006/06/16 14:12:16 strk - * - BUGFIX in pgsql2shp successful return code. - * - BUGFIX in shp2pgsql handling of MultiLine WKT. - * - * Revision 1.84 2006/04/18 14:09:28 strk - * Limited text field size to 255 (bug #84) [will eventually provide a switch to support wider fields ] - * - * Revision 1.83 2006/02/03 20:53:36 strk - * Swapped stdint.h (unavailable on Solaris9) with inttypes.h - * - * Revision 1.82 2006/01/16 10:42:57 strk - * Added support for Bool and Date DBF<=>PGIS mapping - * - * Revision 1.81 2006/01/09 16:40:16 strk - * ISO C90 comments, signedness mismatch fixes - * - * Revision 1.80 2005/10/24 11:30:59 strk - * - * Fixed a bug in string attributes handling truncating values of maximum - * allowed length, curtesy of Lars Roessiger. - * Reworked integer attributes handling to be stricter in dbf->sql mapping - * and to allow for big int8 values in sql->dbf conversion - * - * Revision 1.79 2005/10/03 18:08:55 strk - * Stricter string attributes lenght handling. DBF header will be used - * to set varchar maxlenght, (var)char typmod will be used to set DBF header - * len. - * - * Revision 1.78 2005/07/22 19:15:28 strk - * Fixed bug in {get,pop}{int,double} for 64bit archs - * - * Revision 1.77 2005/07/12 16:19:35 strk - * Fixed bug in user query handling, reported by Andrew Seales - * - * Revision 1.76 2005/05/16 17:22:43 strk - * Fixed DBF field names handling as for clashes avoiding. - * pgsql field renames are warned. - * - * Revision 1.75 2005/05/13 14:06:24 strk - * Applied patch from Obe, Regina to keep identifiers case. - * - * Revision 1.74 2005/03/25 18:43:07 strk - * Fixed PQunescapeBytearea argument (might give problems on 64bit archs) - * - * Revision 1.73 2005/03/08 11:06:33 strk - * modernized old-style parameter declarations - * - * Revision 1.72 2005/03/04 14:54:03 strk - * Fixed bug in multiline handling. - * - * Revision 1.71 2005/01/31 22:15:22 strk - * Added maintainer notice, to reduce Jeff-strk mail bounces - * - * Revision 1.70 2004/12/22 10:29:09 strk - * Drop useless SRID from geometry when downloading EWKB format. - * - * Revision 1.69 2004/12/15 08:46:47 strk - * Fixed memory leaks depending on input size. - * - * Revision 1.68 2004/11/18 18:14:19 strk - * Added a copy of the PQunescapeBytea function found in libpq of PG>=73 - * - * Revision 1.67 2004/10/17 12:16:47 strk - * fixed prototype for user query table - * - * Revision 1.66 2004/10/17 12:15:10 strk - * Bug fixed in multipoint4D creation - * - * Revision 1.65 2004/10/15 08:26:03 strk - * Fixed handling of mixed dimensioned geometries in source table. - * - * Revision 1.64 2004/10/14 09:59:51 strk - * Added support for user query (replacing schema.table) - * - * Revision 1.63 2004/10/11 14:34:40 strk - * Added endiannes specification for postgis-1.0.0+ - * - * Revision 1.62 2004/10/07 21:51:05 strk - * Fixed a bug in 4d handling - * - * Revision 1.61 2004/10/07 17:15:28 strk - * Fixed TYPEM handling. - * - * Revision 1.60 2004/10/07 06:54:24 strk - * cleanups - * - * Revision 1.59 2004/10/06 17:04:38 strk - * ZM handling. Log trimmed. - * - * Revision 1.58 2004/09/23 16:14:19 strk - * Added -m / -z switches to control output type: XYM,XYMZ. - * - * Revision 1.57 2004/09/20 17:11:44 strk - * Added -d -d availability notice in help string. - * Added user notice about output shape type. - * - * Revision 1.56 2004/09/20 16:33:05 strk - * Added 4d geometries support. - * Changelog section moved at bottom file. - * - * Revision 1.55 2004/09/20 14:14:43 strk - * Fixed a bug in popbyte. Trapped WKB endiannes errors. - * - * Revision 1.54 2004/09/20 13:49:27 strk - * Postgis-1.x support (LWGEOM) added. - * postgis version detected at runtime. - * Endiannes unchecked ... TODO. - * - **********************************************************************/ diff -Nru postgis-1.5.3/loader/safileio.c postgis-2.0.1/loader/safileio.c --- postgis-1.5.3/loader/safileio.c 2010-09-10 20:44:05.000000000 +0000 +++ postgis-2.0.1/loader/safileio.c 2012-02-27 22:08:12.000000000 +0000 @@ -76,7 +76,7 @@ # endif #endif -/* Local Prototypes */ +/* Local prototypes */ SAFile SADFOpen( const char *pszFilename, const char *pszAccess ); SAOffset SADFRead( void *p, SAOffset size, SAOffset nmemb, SAFile file ); SAOffset SADFWrite( void *p, SAOffset size, SAOffset nmemb, SAFile file ); @@ -87,6 +87,7 @@ int SADRemove( const char *filename ); void SADError( const char *message ); + /************************************************************************/ /* SADFOpen() */ /************************************************************************/ @@ -126,7 +127,11 @@ SAOffset SADFSeek( SAFile file, SAOffset offset, int whence ) { +#ifdef HAVE_FSEEKO + return (SAOffset) fseeko( (FILE *) file, (off_t) offset, whence ); +#else return (SAOffset) fseek( (FILE *) file, (long) offset, whence ); +#endif } /************************************************************************/ @@ -136,7 +141,11 @@ SAOffset SADFTell( SAFile file ) { +#ifdef HAVE_FSEEKO + return (SAOffset) ftello( (FILE *) file ); +#else return (SAOffset) ftell( (FILE *) file ); +#endif } /************************************************************************/ diff -Nru postgis-1.5.3/loader/shapefil.h postgis-2.0.1/loader/shapefil.h --- postgis-1.5.3/loader/shapefil.h 2010-09-10 20:44:05.000000000 +0000 +++ postgis-2.0.1/loader/shapefil.h 2012-02-27 22:08:12.000000000 +0000 @@ -2,7 +2,7 @@ #define SHAPEFILE_H_INCLUDED /****************************************************************************** - * $Id: shapefil.h 5957 2010-09-10 20:44:05Z pramsey $ + * $Id: shapefil.h 9324 2012-02-27 22:08:12Z pramsey $ * * Project: Shapelib * Purpose: Primary include file for Shapelib. @@ -37,6 +37,18 @@ ****************************************************************************** * * $Log: shapefil.h,v $ + * Revision 1.51 2011-07-24 05:59:25 fwarmerdam + * minimize use of CPLError in favor of SAHooks.Error() + * + * Revision 1.50 2011-05-13 17:35:17 fwarmerdam + * added DBFReorderFields() and DBFAlterFields() functions (from Even) + * + * Revision 1.49 2011-04-16 14:38:21 fwarmerdam + * avoid warnings with gcc on SHP_CVSID + * + * Revision 1.48 2010-08-27 23:42:52 fwarmerdam + * add SHPAPI_CALL attribute in code + * * Revision 1.47 2010-01-28 11:34:34 fwarmerdam * handle the shape file length limits more gracefully (#3236) * @@ -125,17 +137,14 @@ * try to improve SHPAPI_CALL docs */ +#define _FILE_OFFSET_BITS 64 #include +#include #ifdef USE_DBMALLOC #include #endif -#ifdef USE_CPL -#include "cpl_error.h" -#include "cpl_vsi.h" -#endif - #ifdef __cplusplus extern "C" { #endif @@ -209,8 +218,12 @@ /* as unreferenced variables resulting in lots of warnings. */ /* -------------------------------------------------------------------- */ #ifndef DISABLE_CVSID -# define SHP_CVSID(string) static char cpl_cvsid[] = string; \ +# if defined(__GNUC__) && __GNUC__ >= 4 +# define SHP_CVSID(string) static char cpl_cvsid[] __attribute__((used)) = string; +# else +# define SHP_CVSID(string) static char cpl_cvsid[] = string; \ static char *cvsid_aw() { return( cvsid_aw() ? ((char *) NULL) : cpl_cvsid ); } +# endif #else # define SHP_CVSID(string) #endif @@ -227,12 +240,16 @@ /* -------------------------------------------------------------------- */ /* IO/Error hook functions. */ /* -------------------------------------------------------------------- */ -typedef FILE *SAFile; - +typedef int *SAFile; - -#ifndef SAOffset -typedef unsigned long SAOffset; +#ifdef HAVE_SEEKO +# ifndef SAOffset + typedef off_t SAOffset; +# endif +#else +# ifndef SAOffset + typedef unsigned long SAOffset; +# endif #endif typedef struct { @@ -446,8 +463,6 @@ int SHPAPI_CALL SHPWriteTree( SHPTree *hTree, const char * pszFilename ); -SHPTree SHPAPI_CALL - SHPReadTree( const char * pszFilename ); int SHPAPI_CALL SHPTreeAddObject( SHPTree * hTree, SHPObject * psObject ); @@ -550,6 +565,13 @@ int SHPAPI_CALL DBFDeleteField( DBFHandle hDBF, int iField ); +int SHPAPI_CALL + DBFReorderFields( DBFHandle psDBF, int* panMap ); + +int SHPAPI_CALL + DBFAlterFieldDefn( DBFHandle psDBF, int iField, const char * pszFieldName, + char chType, int nWidth, int nDecimals ); + DBFFieldType SHPAPI_CALL DBFGetFieldInfo( DBFHandle psDBF, int iField, char * pszFieldName, int * pnWidth, int * pnDecimals ); @@ -569,11 +591,6 @@ DBFIsAttributeNULL( DBFHandle hDBF, int iShape, int iField ); int SHPAPI_CALL - DBFReadSetup ( DBFHandle psDBF, int hEntity ); -int SHPAPI_CALL - DBFReadDeleted ( DBFHandle psDBF, int hEntity ); - -int SHPAPI_CALL DBFWriteIntegerAttribute( DBFHandle hDBF, int iShape, int iField, int nFieldValue ); int SHPAPI_CALL @@ -590,7 +607,7 @@ const char lFieldValue); int SHPAPI_CALL DBFWriteAttributeDirectly(DBFHandle psDBF, int hEntity, int iField, - const void * pValue ); + void * pValue ); const char SHPAPI_CALL1(*) DBFReadTuple(DBFHandle psDBF, int hEntity ); int SHPAPI_CALL diff -Nru postgis-1.5.3/loader/shp2pgsql-cli.c postgis-2.0.1/loader/shp2pgsql-cli.c --- postgis-1.5.3/loader/shp2pgsql-cli.c 2010-12-14 04:57:59.000000000 +0000 +++ postgis-2.0.1/loader/shp2pgsql-cli.c 2012-06-08 12:44:00.000000000 +0000 @@ -1,8 +1,8 @@ /********************************************************************** - * $Id: shp2pgsql-cli.c 6373 2010-12-14 04:57:59Z pramsey $ + * $Id: shp2pgsql-cli.c 9866 2012-06-08 12:44:00Z mcayland $ * * PostGIS - Spatial Types for PostgreSQL - * http://postgis.refractions.net + * http://www.postgis.org * Copyright 2008 OpenGeo.org * Copyright 2009 Mark Cave-Ayland * @@ -13,38 +13,52 @@ * **********************************************************************/ -#include "shp2pgsql-core.h" +#include "../postgis_config.h" +#include "shp2pgsql-core.h" +#include "../liblwgeom/liblwgeom.h" /* for SRID_UNKNOWN */ static void usage() { - printf("RCSID: %s RELEASE: %s\n", RCSID, POSTGIS_VERSION); - printf("USAGE: shp2pgsql [] [.]
\n"); - printf("OPTIONS:\n"); - printf(" -s Set the SRID field. Defaults to -1.\n"); - printf(" (-d|a|c|p) These are mutually exclusive options:\n"); - printf(" -d Drops the table, then recreates it and populates\n"); - printf(" it with current shape file data.\n"); - printf(" -a Appends shape file into current table, must be\n"); - printf(" exactly the same table schema.\n"); - printf(" -c Creates a new table and populates it, this is the\n"); - printf(" default if you do not specify any options.\n"); - printf(" -p Prepare mode, only creates the table.\n"); - printf(" -g Specify the name of the geometry/geography column.\n"); - printf(" (mostly useful in append mode).\n"); - printf(" -D Use postgresql dump format (defaults to SQL insert statments).\n"); - printf(" -G Use geography type (requires lon/lat data).\n"); - printf(" -k Keep postgresql identifiers case.\n"); - printf(" -i Use int4 type for all integer dbf fields.\n"); - printf(" -I Create a spatial index on the geocolumn.\n"); - printf(" -S Generate simple geometries instead of MULTI geometries.\n"); - printf(" -w Output WKT format (drops M and introduces coordinate drifts).\n"); - printf(" -W Specify the character encoding of Shape's\n"); - printf(" attribute column. (default : \"WINDOWS-1252\").\n"); - printf(" -N NULL geometries handling policy (insert*,skip,abort).\n"); - printf(" -n Only import DBF file.\n"); - printf(" -? Display this help screen.\n"); + printf(_( "RELEASE: %s (r%d)\n" ), POSTGIS_LIB_VERSION, POSTGIS_SVN_REVISION); + printf(_( "USAGE: shp2pgsql [] [[.]
]\n" + "OPTIONS:\n" )); + printf(_( " -s [:] Set the SRID field. Defaults to %d.\n" + " Optionally reprojects from given SRID (cannot be used with -D).\n"), + SRID_UNKNOWN); + printf(_( " (-d|a|c|p) These are mutually exclusive options:\n" + " -d Drops the table, then recreates it and populates\n" + " it with current shape file data.\n" + " -a Appends shape file into current table, must be\n" + " exactly the same table schema.\n" + " -c Creates a new table and populates it, this is the\n" + " default if you do not specify any options.\n" + " -p Prepare mode, only creates the table.\n" )); + printf(_( " -g Specify the name of the geometry/geography column\n" + " (mostly useful in append mode).\n" )); + printf(_( " -D Use postgresql dump format (defaults to SQL insert statements).\n" )); + printf(_( " -e Execute each statement individually, do not use a transaction.\n" + " Not compatible with -D.\n" )); + printf(_( " -G Use geography type (requires lon/lat data or -r to reproject).\n" )); + printf(_( " -k Keep postgresql identifiers case.\n" )); + printf(_( " -i Use int4 type for all integer dbf fields.\n" )); + printf(_( " -I Create a spatial index on the geocolumn.\n" )); + printf(_( " -S Generate simple geometries instead of MULTI geometries.\n" )); + printf(_( " -t Force geometry to be one of '2D', '3DZ', '3DM', or '4D'\n" )); + printf(_( " -w Output WKT instead of WKB. Note that this can result in\n" + " coordinate drift.\n" )); + printf(_( " -W Specify the character encoding of Shape's\n" + " attribute column. (default: \"UTF-8\")\n" )); + printf(_( " -N NULL geometries handling policy (insert*,skip,abort).\n" )); + printf(_( " -n Only import DBF file.\n" )); + printf(_( " -T Specify the tablespace for the new table.\n" + " Note that indexes will still use the default tablespace unless the\n" + " -X flag is also used.\n")); + printf(_( " -X Specify the tablespace for the table's indexes.\n" + " This applies to the primary key, and the spatial index if\n" + " the -I flag is used.\n" )); + printf(_( " -? Display this help screen.\n" )); } @@ -54,9 +68,14 @@ SHPLOADERCONFIG *config; SHPLOADERSTATE *state; char *header, *footer, *record; - char c; + int c; int ret, i; +#ifdef ENABLE_NLS + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, PGSQL_LOCALEDIR); + textdomain (PACKAGE); +#endif /* If no options are specified, display usage */ if (argc == 1) @@ -67,9 +86,10 @@ /* Parse command line options and set configuration */ config = malloc(sizeof(SHPLOADERCONFIG)); - set_config_defaults(config); + set_loader_config_defaults(config); - while ((c = pgis_getopt(argc, argv, "kcdapGDs:Sg:iW:wIN:n")) != EOF) + /* Keep the flag list alphabetic so it's easy to see what's left. */ + while ((c = pgis_getopt(argc, argv, "acdeg:iknps:t:wDGIN:ST:W:X:")) != EOF) { switch (c) { @@ -95,18 +115,28 @@ case 's': if (pgis_optarg) { - sscanf(pgis_optarg, "%d", &(config->sr_id)); + char *ptr = strchr(pgis_optarg, ':'); + if (ptr) + { + *ptr++ = '\0'; + sscanf(pgis_optarg, "%d", &config->shp_sr_id); + sscanf(ptr, "%d", &config->sr_id); + } + else + { + /* Only TO_SRID specified */ + sscanf(pgis_optarg, "%d", &config->sr_id); + } } else { - /* With -s, user must specify SRID */ - usage(); - exit(0); + /* With -s, user must specify TO_SRID or FROM_SRID:TO_SRID */ + fprintf(stderr, "The -s parameter must be specified in the form [FROM_SRID:]TO_SRID\n"); + exit(1); } break; - case 'g': - config->geom = pgis_optarg; + config->geo_col = pgis_optarg; break; case 'k': @@ -122,7 +152,7 @@ break; case 'w': - config->hwgeom = 1; + config->use_wkt = 1; break; case 'n': @@ -151,6 +181,42 @@ } break; + case 't': + if (strcasecmp(pgis_optarg, "2D") == 0) + { + config->force_output = FORCE_OUTPUT_2D; + } + else if (strcasecmp(pgis_optarg, "3DZ") == 0 ) + { + config->force_output = FORCE_OUTPUT_3DZ; + } + else if (strcasecmp(pgis_optarg, "3DM") == 0 ) + { + config->force_output = FORCE_OUTPUT_3DM; + } + else if (strcasecmp(pgis_optarg, "4D") == 0 ) + { + config->force_output = FORCE_OUTPUT_4D; + } + else + { + fprintf(stderr, "Unsupported output type: %s\nValid output types are 2D, 3DZ, 3DM and 4D\n", pgis_optarg); + exit(1); + } + break; + + case 'T': + config->tablespace = pgis_optarg; + break; + + case 'X': + config->idxtablespace = pgis_optarg; + break; + + case 'e': + config->usetransaction = 0; + break; + case '?': usage(); exit(0); @@ -161,6 +227,19 @@ } } + /* Once we have parsed the arguments, make sure certain combinations are valid */ + if (config->dump_format && !config->usetransaction) + { + fprintf(stderr, "Invalid argument combination - cannot use both -D and -e\n"); + exit(1); + } + + if (config->dump_format && config->shp_sr_id != SRID_UNKNOWN) + { + fprintf(stderr, "Invalid argument combination - cannot use -D with -s FROM_SRID:TO_SRID\n"); + exit(1); + } + /* Determine the shapefile name from the next argument, if no shape file, exit. */ if (pgis_optind < argc) { @@ -176,23 +255,27 @@ /* Determine the table and schema names from the next argument */ if (pgis_optind < argc) { - char *ptr; + char *strptr = argv[pgis_optind]; + char *chrptr = strchr(strptr, '.'); - ptr = strchr(argv[pgis_optind], '.'); - - /* Schema qualified table name */ - if (ptr) + /* OK, this is a schema-qualified table name... */ + if (chrptr) { - config->schema = malloc(strlen(argv[pgis_optind]) + 1); - snprintf(config->schema, ptr - argv[pgis_optind] + 1, "%s", argv[pgis_optind]); - - config->table = malloc(strlen(argv[pgis_optind])); - snprintf(config->table, strlen(argv[pgis_optind]) - strlen(config->schema), "%s", ptr + 1); + if ( chrptr == strptr ) + { + /* ".something" ??? */ + usage(); + exit(0); + } + /* Null terminate at the '.' */ + *chrptr = '\0'; + /* Copy in the parts */ + config->schema = strdup(strptr); + config->table = strdup(chrptr+1); } else { - config->table = malloc(strlen(argv[pgis_optind]) + 1); - strcpy(config->table, argv[pgis_optind]); + config->table = strdup(strptr); } } @@ -228,14 +311,6 @@ strtolower(config->schema); } - /* Make the geocolumn name consistent with the load type (geometry or geography) */ - if ( config->geography ) - { - if (config->geom) free(config->geom); - config->geom = strdup(GEOGRAPHY_DEFAULT); - } - - /* Create the shapefile state object */ state = ShpLoaderCreate(config); diff -Nru postgis-1.5.3/loader/shp2pgsql-core.c postgis-2.0.1/loader/shp2pgsql-core.c --- postgis-1.5.3/loader/shp2pgsql-core.c 2010-12-13 20:42:47.000000000 +0000 +++ postgis-2.0.1/loader/shp2pgsql-core.c 2012-06-21 11:02:13.000000000 +0000 @@ -1,10 +1,11 @@ /********************************************************************** - * $Id: shp2pgsql-core.c 6361 2010-12-13 20:42:47Z pramsey $ * * PostGIS - Spatial Types for PostgreSQL - * http://postgis.refractions.net - * Copyright 2008 OpenGeo.org - * Copyright 2009 Mark Cave-Ayland + * http://www.postgis.org + * + * Copyright (C) 2008 OpenGeo.org + * Copyright (C) 2009 Mark Cave-Ayland + * * This is free software; you can redistribute and/or modify it under * the terms of the GNU General Public Licence. See the COPYING file. * @@ -12,7 +13,12 @@ * **********************************************************************/ +#include "../postgis_config.h" + #include "shp2pgsql-core.h" +#include "../liblwgeom/liblwgeom.h" /* for lw_vasprintf */ +#include "../liblwgeom/lwgeom_log.h" /* for LWDEBUG macros */ + /* Internal ring/point structures */ typedef struct struct_point @@ -29,41 +35,25 @@ } Ring; -/* liblwgeom allocator callback - install the defaults (malloc/free/stdout/stderr) */ -void lwgeom_init_allocators() -{ - lwgeom_install_default_allocators(); -} - - /* -* Internal return values -*/ + * Internal functions + */ #define UTF8_GOOD_RESULT 0 #define UTF8_BAD_RESULT 1 #define UTF8_NO_RESULT 2 -/* -* Only turn this on if you want to skip bad UTF8 charaters. Not a good -* idea, generally, as "bad characters" usually indicate that the source -* encoding is *not* UTF8 -*/ -#define UTF8_DROP_BAD_CHARACTERS 0 - - int utf8(const char *fromcode, char *inputbuf, char **outputbuf); char *escape_copy_string(char *str); char *escape_insert_string(char *str); -int GeneratePointGeometry(SHPLOADERSTATE *state, SHPObject *obj, char **geometry); +int GeneratePointGeometry(SHPLOADERSTATE *state, SHPObject *obj, char **geometry, int force_multi); int GenerateLineStringGeometry(SHPLOADERSTATE *state, SHPObject *obj, char **geometry); int PIP(Point P, Point *V, int n); int FindPolygons(SHPObject *obj, Ring ***Out); void ReleasePolygons(Ring **polys, int npolys); int GeneratePolygonGeometry(SHPLOADERSTATE *state, SHPObject *obj, char **geometry); - /* Append variadic formatted string to a stringbuffer */ void vasbappend(stringbuffer_t *sb, char *fmt, ... ) @@ -101,45 +91,44 @@ return UTF8_NO_RESULT; outbytesleft = inbytesleft * 3 + 1; /* UTF8 string can be 3 times larger */ - + /* then local string */ *outputbuf = (char *)malloc(outbytesleft); - if (!(*outputbuf)) + if (!*outputbuf) return UTF8_NO_RESULT; - /* Clean out the buffer */ memset(*outputbuf, 0, outbytesleft); outputptr = *outputbuf; - /* Does this string convert cleanly? */ + /* Does this string convert cleanly? */ if ( iconv(cd, &inputbuf, &inbytesleft, &outputptr, &outbytesleft) == -1 ) { #ifdef HAVE_ICONVCTL - int on = 1; - /* No. Try to convert it while transliterating. */ - iconvctl(cd, ICONV_SET_TRANSLITERATE, &on); - if ( iconv(cd, &inputbuf, &inbytesleft, &outputptr, &outbytesleft) == -1 ) - { - /* No. Try to convert it while discarding errors. */ - iconvctl(cd, ICONV_SET_DISCARD_ILSEQ, &on); - if ( iconv(cd, &inputbuf, &inbytesleft, &outputptr, &outbytesleft) == -1 ) - { - /* Still no. Throw away the buffer and return. */ - free(*outputbuf); - iconv_close(cd); - return UTF8_NO_RESULT; - } - } - iconv_close(cd); - return UTF8_BAD_RESULT; + int on = 1; + /* No. Try to convert it while transliterating. */ + iconvctl(cd, ICONV_SET_TRANSLITERATE, &on); + if ( iconv(cd, &inputbuf, &inbytesleft, &outputptr, &outbytesleft) == -1 ) + { + /* No. Try to convert it while discarding errors. */ + iconvctl(cd, ICONV_SET_DISCARD_ILSEQ, &on); + if ( iconv(cd, &inputbuf, &inbytesleft, &outputptr, &outbytesleft) == -1 ) + { + /* Still no. Throw away the buffer and return. */ + free(*outputbuf); + iconv_close(cd); + return UTF8_NO_RESULT; + } + } + iconv_close(cd); + return UTF8_BAD_RESULT; #else - free(*outputbuf); - iconv_close(cd); - return UTF8_NO_RESULT; + free(*outputbuf); + iconv_close(cd); + return UTF8_NO_RESULT; #endif - } - /* Return a good result, converted string is in buffer. */ + } + /* Return a good result, converted string is in buffer. */ iconv_close(cd); - return UTF8_GOOD_RESULT; + return UTF8_GOOD_RESULT; } /** @@ -251,163 +240,81 @@ /** - * Escape strings that are to be used as part of a PostgreSQL connection string. If no - * characters require escaping, simply return the input pointer. Otherwise return a - * new allocated string. - */ -char * -escape_connection_string(char *str) -{ - /* - * Escape apostrophes and backslashes: - * ' -> \' - * \ -> \\ - * - * 1. find # of characters - * 2. make new string - */ - - char *result; - char *ptr, *optr; - int toescape = 0; - size_t size; - - ptr = str; - - /* Count how many characters we need to escape so we know the size of the string we need to return */ - while (*ptr) - { - if (*ptr == '\'' || *ptr == '\\') - toescape++; - - ptr++; - } - - /* If we don't have to escape anything, simply return the input pointer */ - if (toescape == 0) - return str; - - size = ptr - str + toescape + 1; - result = calloc(1, size); - optr = result; - ptr = str; - - while (*ptr) - { - if (*ptr == '\'' || *ptr == '\\') - *optr++ = '\\'; - - *optr++ = *ptr++; - } - - *optr = '\0'; - - return result; -} - - -/** * @brief Generate an allocated geometry string for shapefile object obj using the state parameters + * if "force_multi" is true, single points will instead be created as multipoints with a single vertice. */ int -GeneratePointGeometry(SHPLOADERSTATE *state, SHPObject *obj, char **geometry) +GeneratePointGeometry(SHPLOADERSTATE *state, SHPObject *obj, char **geometry, int force_multi) { - LWCOLLECTION *lwcollection; - LWGEOM **lwmultipoints; - uchar *serialized_lwgeom; - LWGEOM_UNPARSER_RESULT lwg_unparser_result; + LWGEOM *lwgeom = NULL; - DYNPTARRAY **dpas; POINT4D point4d; - int dims = 0, hasz = 0, hasm = 0; - int result; + int dims = 0; int u; char *mem; + size_t mem_length; - - /* Determine the correct dimensions: note that in hwgeom-compatible mode we cannot use - the M coordinate */ - if (state->wkbtype & WKBZOFFSET) - hasz = 1; - - if (!state->config->hwgeom) - if (state->wkbtype & WKBMOFFSET) - hasm = 1; - - TYPE_SETZM(dims, hasz, hasm); + FLAGS_SET_Z(dims, state->has_z); + FLAGS_SET_M(dims, state->has_m); /* Allocate memory for our array of LWPOINTs and our dynptarrays */ lwmultipoints = malloc(sizeof(LWPOINT *) * obj->nVertices); - dpas = malloc(sizeof(DYNPTARRAY *) * obj->nVertices); /* We need an array of pointers to each of our sub-geometries */ for (u = 0; u < obj->nVertices; u++) { + /* Create a ptarray containing a single point */ + POINTARRAY *pa = ptarray_construct_empty(state->has_z, state->has_m, 1); + /* Generate the point */ point4d.x = obj->padfX[u]; point4d.y = obj->padfY[u]; - if (state->wkbtype & WKBZOFFSET) + if (state->has_z) point4d.z = obj->padfZ[u]; - if (state->wkbtype & WKBMOFFSET) + if (state->has_m) point4d.m = obj->padfM[u]; - /* Create a dynptarray containing a single point */ - dpas[u] = dynptarray_create(1, dims); - dynptarray_addPoint4d(dpas[u], &point4d, 0); + /* Add in the point! */ + ptarray_append_point(pa, &point4d, LW_TRUE); /* Generate the LWPOINT */ - lwmultipoints[u] = lwpoint_as_lwgeom(lwpoint_construct(state->config->sr_id, NULL, dpas[u]->pa)); + lwmultipoints[u] = lwpoint_as_lwgeom(lwpoint_construct(state->from_srid, NULL, pa)); } /* If we have more than 1 vertex then we are working on a MULTIPOINT and so generate a MULTIPOINT rather than a POINT */ - if (obj->nVertices > 1) + if ((obj->nVertices > 1) || force_multi) { - lwcollection = lwcollection_construct(MULTIPOINTTYPE, state->config->sr_id, NULL, obj->nVertices, lwmultipoints); - serialized_lwgeom = lwgeom_serialize(lwcollection_as_lwgeom(lwcollection)); + lwgeom = lwcollection_as_lwgeom(lwcollection_construct(MULTIPOINTTYPE, state->from_srid, NULL, obj->nVertices, lwmultipoints)); } else { - serialized_lwgeom = lwgeom_serialize(lwmultipoints[0]); + lwgeom = lwmultipoints[0]; + lwfree(lwmultipoints); } - if (!state->config->hwgeom) - result = serialized_lwgeom_to_hexwkb(&lwg_unparser_result, serialized_lwgeom, PARSER_CHECK_NONE, -1); + if (state->config->use_wkt) + { + mem = lwgeom_to_wkt(lwgeom, WKT_EXTENDED, WKT_PRECISION, &mem_length); + } else - result = serialized_lwgeom_to_ewkt(&lwg_unparser_result, serialized_lwgeom, PARSER_CHECK_NONE); - - if (result) { - snprintf(state->message, SHPLOADERMSGLEN, "%s", lwg_unparser_result.message); - - return SHPLOADERERR; + mem = lwgeom_to_hexwkb(lwgeom, WKB_EXTENDED, &mem_length); } - /* Allocate a string containing the resulting geometry */ - mem = malloc(strlen(lwg_unparser_result.wkoutput) + 1); - strcpy(mem, lwg_unparser_result.wkoutput); - - /* Free all of the allocated items */ - lwfree(lwg_unparser_result.wkoutput); - lwfree(serialized_lwgeom); - - for (u = 0; u < obj->nVertices; u++) + if ( !mem ) { - if (dpas[u]->pa->serialized_pointlist) - lwfree(dpas[u]->pa->serialized_pointlist); - - lwpoint_free(lwgeom_as_lwpoint(lwmultipoints[u])); - - lwfree(dpas[u]); + snprintf(state->message, SHPLOADERMSGLEN, "unable to write geometry"); + return SHPLOADERERR; } - lwfree(dpas); - lwfree(lwmultipoints); - + /* Free all of the allocated items */ + lwgeom_free(lwgeom); + /* Return the string - everything ok */ *geometry = mem; @@ -421,49 +328,34 @@ int GenerateLineStringGeometry(SHPLOADERSTATE *state, SHPObject *obj, char **geometry) { - LWCOLLECTION *lwcollection = NULL; LWGEOM **lwmultilinestrings; - uchar *serialized_lwgeom; - LWGEOM_UNPARSER_RESULT lwg_unparser_result; - - DYNPTARRAY **dpas; + LWGEOM *lwgeom = NULL; POINT4D point4d; - - int dims = 0, hasz = 0, hasm = 0; - int result; + int dims = 0; int u, v, start_vertex, end_vertex; - char *mem; + size_t mem_length; - /* Determine the correct dimensions: note that in hwgeom-compatible mode we cannot use - the M coordinate */ - if (state->wkbtype & WKBZOFFSET) - hasz = 1; - - if (!state->config->hwgeom) - if (state->wkbtype & WKBMOFFSET) - hasm = 1; - - TYPE_SETZM(dims, hasz, hasm); + FLAGS_SET_Z(dims, state->has_z); + FLAGS_SET_M(dims, state->has_m); if (state->config->simple_geometries == 1 && obj->nParts > 1) { - snprintf(state->message, SHPLOADERMSGLEN, "We have a Multilinestring with %d parts, can't use -S switch!", obj->nParts); + snprintf(state->message, SHPLOADERMSGLEN, _("We have a Multilinestring with %d parts, can't use -S switch!"), obj->nParts); return SHPLOADERERR; } /* Allocate memory for our array of LWLINEs and our dynptarrays */ lwmultilinestrings = malloc(sizeof(LWPOINT *) * obj->nParts); - dpas = malloc(sizeof(DYNPTARRAY *) * obj->nParts); /* We need an array of pointers to each of our sub-geometries */ for (u = 0; u < obj->nParts; u++) { - /* Create a dynptarray containing the line points */ - dpas[u] = dynptarray_create(obj->nParts, dims); + /* Create a ptarray containing the line points */ + POINTARRAY *pa = ptarray_construct_empty(state->has_z, state->has_m, obj->nParts); /* Set the start/end vertices depending upon whether this is a MULTILINESTRING or not */ @@ -480,69 +372,42 @@ point4d.x = obj->padfX[v]; point4d.y = obj->padfY[v]; - if (state->wkbtype & WKBZOFFSET) + if (state->has_z) point4d.z = obj->padfZ[v]; - if (state->wkbtype & WKBMOFFSET) + if (state->has_m) point4d.m = obj->padfM[v]; - dynptarray_addPoint4d(dpas[u], &point4d, 0); + ptarray_append_point(pa, &point4d, LW_FALSE); } /* Generate the LWLINE */ - lwmultilinestrings[u] = lwline_as_lwgeom(lwline_construct(state->config->sr_id, NULL, dpas[u]->pa)); + lwmultilinestrings[u] = lwline_as_lwgeom(lwline_construct(state->from_srid, NULL, pa)); } /* If using MULTILINESTRINGs then generate the serialized collection, otherwise just a single LINESTRING */ if (state->config->simple_geometries == 0) { - lwcollection = lwcollection_construct(MULTILINETYPE, state->config->sr_id, NULL, obj->nParts, lwmultilinestrings); - - /* When outputting wkt rather than wkb, we need to remove the SRID from the inner geometries */ - if (state->config->hwgeom) - { - for (u = 0; u < obj->nParts; u++) - lwmultilinestrings[u]->SRID = -1; - } - - serialized_lwgeom = lwgeom_serialize(lwcollection_as_lwgeom(lwcollection)); + lwgeom = lwcollection_as_lwgeom(lwcollection_construct(MULTILINETYPE, state->from_srid, NULL, obj->nParts, lwmultilinestrings)); } else { - serialized_lwgeom = lwgeom_serialize(lwmultilinestrings[0]); + lwgeom = lwmultilinestrings[0]; + lwfree(lwmultilinestrings); } - if (!state->config->hwgeom) - result = serialized_lwgeom_to_hexwkb(&lwg_unparser_result, serialized_lwgeom, PARSER_CHECK_NONE, -1); + if (!state->config->use_wkt) + mem = lwgeom_to_hexwkb(lwgeom, WKB_EXTENDED, &mem_length); else - result = serialized_lwgeom_to_ewkt(&lwg_unparser_result, serialized_lwgeom, PARSER_CHECK_NONE); + mem = lwgeom_to_wkt(lwgeom, WKT_EXTENDED, WKT_PRECISION, &mem_length); - /* Return the error message if we failed */ - if (result) + if ( !mem ) { - snprintf(state->message, SHPLOADERMSGLEN, "%s", lwg_unparser_result.message); - + snprintf(state->message, SHPLOADERMSGLEN, "unable to write geometry"); return SHPLOADERERR; } - /* Allocate a string containing the resulting geometry */ - mem = malloc(strlen(lwg_unparser_result.wkoutput) + 1); - strcpy(mem, lwg_unparser_result.wkoutput); - /* Free all of the allocated items */ - lwfree(lwg_unparser_result.wkoutput); - lwfree(serialized_lwgeom); - - for (u = 0; u < obj->nParts; u++) - { - lwfree(dpas[u]->pa->serialized_pointlist); - lwline_free(lwgeom_as_lwline(lwmultilinestrings[u])); - lwfree(dpas[u]); - } - - lwfree(dpas); - lwfree(lwmultilinestrings); - if (lwcollection) - lwfree(lwcollection); + lwgeom_free(lwgeom); /* Return the string - everything ok */ *geometry = mem; @@ -754,41 +619,25 @@ Ring **Outer; int polygon_total, ring_total; int pi, vi; /* part index and vertex index */ - int u; - - LWCOLLECTION *lwcollection = NULL; LWGEOM **lwpolygons; - uchar *serialized_lwgeom; - LWGEOM_UNPARSER_RESULT lwg_unparser_result; + LWGEOM *lwgeom; - LWPOLY *lwpoly; - DYNPTARRAY *dpas; - POINTARRAY ***pas; POINT4D point4d; - int dims = 0, hasz = 0, hasm = 0; - int result; + int dims = 0; char *mem; + size_t mem_length; - - /* Determine the correct dimensions: note that in hwgeom-compatible mode we cannot use - the M coordinate */ - if (state->wkbtype & WKBZOFFSET) - hasz = 1; - - if (!state->config->hwgeom) - if (state->wkbtype & WKBMOFFSET) - hasm = 1; - - TYPE_SETZM(dims, hasz, hasm); + FLAGS_SET_Z(dims, state->has_z); + FLAGS_SET_M(dims, state->has_m); polygon_total = FindPolygons(obj, &Outer); if (state->config->simple_geometries == 1 && polygon_total != 1) /* We write Non-MULTI geometries, but have several parts: */ { - snprintf(state->message, SHPLOADERMSGLEN, "We have a Multipolygon with %d parts, can't use -S switch!", polygon_total); + snprintf(state->message, SHPLOADERMSGLEN, _("We have a Multipolygon with %d parts, can't use -S switch!"), polygon_total); return SHPLOADERERR; } @@ -796,12 +645,11 @@ /* Allocate memory for our array of LWPOLYs */ lwpolygons = malloc(sizeof(LWPOLY *) * polygon_total); - /* Allocate memory for our POINTARRAY pointers for each polygon */ - pas = malloc(sizeof(POINTARRAY **) * polygon_total); - /* Cycle through each individual polygon */ for (pi = 0; pi < polygon_total; pi++) { + LWPOLY *lwpoly = lwpoly_construct_empty(state->from_srid, state->has_z, state->has_m); + Ring *polyring; int ring_index = 0; @@ -814,16 +662,13 @@ polyring = polyring->next; } - /* Reserve memory for the POINTARRAYs representing each ring */ - pas[pi] = malloc(sizeof(POINTARRAY *) * ring_total); - /* Cycle through each ring within the polygon, starting with the outer */ polyring = Outer[pi]; while (polyring) { - /* Create a DYNPTARRAY containing the points making up the ring */ - dpas = dynptarray_create(polyring->n, dims); + /* Create a POINTARRAY containing the points making up the ring */ + POINTARRAY *pa = ptarray_construct_empty(state->has_z, state->has_m, polyring->n); for (vi = 0; vi < polyring->n; vi++) { @@ -831,96 +676,52 @@ point4d.x = polyring->list[vi].x; point4d.y = polyring->list[vi].y; - if (state->wkbtype & WKBZOFFSET) + if (state->has_z) point4d.z = polyring->list[vi].z; - if (state->wkbtype & WKBMOFFSET) + if (state->has_m) point4d.m = polyring->list[vi].m; - dynptarray_addPoint4d(dpas, &point4d, 0); + ptarray_append_point(pa, &point4d, LW_TRUE); } - /* Copy the POINTARRAY pointer from the DYNPTARRAY structure so we can - use the LWPOLY constructor */ - pas[pi][ring_index] = dpas->pa; - - /* Free the DYNPTARRAY structure (we don't need this part anymore as we - have the reference to the internal POINTARRAY) */ - lwfree(dpas); + /* Copy the POINTARRAY pointer so we can use the LWPOLY constructor */ + lwpoly_add_ring(lwpoly, pa); polyring = polyring->next; ring_index++; } /* Generate the LWGEOM */ - lwpoly = lwpoly_construct(state->config->sr_id, NULL, ring_total, pas[pi]); lwpolygons[pi] = lwpoly_as_lwgeom(lwpoly); } /* If using MULTIPOLYGONS then generate the serialized collection, otherwise just a single POLYGON */ if (state->config->simple_geometries == 0) { - lwcollection = lwcollection_construct(MULTIPOLYGONTYPE, state->config->sr_id, NULL, polygon_total, lwpolygons); - - /* When outputting wkt rather than wkb, we need to remove the SRID from the inner geometries */ - if (state->config->hwgeom) - { - for (u = 0; u < pi; u++) - lwpolygons[u]->SRID = -1; - } - - serialized_lwgeom = lwgeom_serialize(lwcollection_as_lwgeom(lwcollection)); + lwgeom = lwcollection_as_lwgeom(lwcollection_construct(MULTIPOLYGONTYPE, state->from_srid, NULL, polygon_total, lwpolygons)); } else { - serialized_lwgeom = lwgeom_serialize(lwpolygons[0]); + lwgeom = lwpolygons[0]; + lwfree(lwpolygons); } - /* Note: lwpoly_free() currently doesn't free its serialized pointlist, so do it manually */ - for (pi = 0; pi < polygon_total; pi++) - { - Ring *polyring = Outer[pi]; - int ring_index = 0; - while (polyring) - { - if (pas[pi][ring_index]->serialized_pointlist) - lwfree(pas[pi][ring_index]->serialized_pointlist); - - polyring = polyring->next; - ring_index++; - } - } - - ReleasePolygons(Outer, polygon_total); - - if (!state->config->hwgeom) - result = serialized_lwgeom_to_hexwkb(&lwg_unparser_result, serialized_lwgeom, PARSER_CHECK_NONE, -1); + if (!state->config->use_wkt) + mem = lwgeom_to_hexwkb(lwgeom, WKB_EXTENDED, &mem_length); else - result = serialized_lwgeom_to_ewkt(&lwg_unparser_result, serialized_lwgeom, PARSER_CHECK_NONE); + mem = lwgeom_to_wkt(lwgeom, WKT_EXTENDED, WKT_PRECISION, &mem_length); - if (result) + if ( !mem ) { - snprintf(state->message, SHPLOADERMSGLEN, "%s", lwg_unparser_result.message); - + snprintf(state->message, SHPLOADERMSGLEN, "unable to write geometry"); return SHPLOADERERR; } - /* Allocate a string containing the resulting geometry */ - mem = malloc(strlen(lwg_unparser_result.wkoutput) + 1); - strcpy(mem, lwg_unparser_result.wkoutput); - /* Free all of the allocated items */ - lwfree(lwg_unparser_result.wkoutput); - lwfree(serialized_lwgeom); + lwgeom_free(lwgeom); - /* Cycle through each polygon, freeing everything we need... */ - for (u = 0; u < polygon_total; u++) - lwpoly_free(lwgeom_as_lwpoly(lwpolygons[u])); - - /* Free the pointer arrays */ - lwfree(pas); - lwfree(lwpolygons); - if (lwcollection) - lwfree(lwcollection); + /* Free the linked list of rings */ + ReleasePolygons(Outer, polygon_total); /* Return the string - everything ok */ *geometry = mem; @@ -947,12 +748,12 @@ /* Default configuration settings */ void -set_config_defaults(SHPLOADERCONFIG *config) +set_loader_config_defaults(SHPLOADERCONFIG *config) { config->opt = 'c'; config->table = NULL; config->schema = NULL; - config->geom = strdup(GEOMETRY_DEFAULT); + config->geo_col = NULL; config->shp_file = NULL; config->dump_format = 0; config->simple_geometries = 0; @@ -961,10 +762,15 @@ config->forceint4 = 0; config->createindex = 0; config->readshape = 1; + config->force_output = FORCE_OUTPUT_DISABLE; config->encoding = strdup(ENCODING_DEFAULT); config->null_policy = POLICY_NULL_INSERT; - config->sr_id = -1; - config->hwgeom = 0; + config->sr_id = SRID_UNKNOWN; + config->shp_sr_id = SRID_UNKNOWN; + config->use_wkt = 0; + config->tablespace = NULL; + config->idxtablespace = NULL; + config->usetransaction = 1; } /* Create a new shapefile state object */ @@ -980,11 +786,41 @@ /* Set any state defaults */ state->hSHPHandle = NULL; state->hDBFHandle = NULL; - state->wkbtype = 0; - state->types = NULL; - state->widths = NULL; - state->precisions = NULL; - state->col_names = NULL; + state->has_z = 0; + state->has_m = 0; + state->types = NULL; + state->widths = NULL; + state->precisions = NULL; + state->col_names = NULL; + + state->from_srid = config->shp_sr_id; + state->to_srid = config->sr_id; + + /* If only one has a valid SRID, use it for both. */ + if (state->to_srid == SRID_UNKNOWN) + { + if (config->geography) + { + state->to_srid = 4326; + } + else + { + state->to_srid = state->from_srid; + } + } + + if (state->from_srid == SRID_UNKNOWN) + { + state->from_srid = state->to_srid; + } + + /* If the geo col name is not set, use one of the defaults. */ + state->geo_col = config->geo_col; + + if (!state->geo_col) + { + state->geo_col = strdup(config->geography ? GEOGRAPHY_DEFAULT : GEOMETRY_DEFAULT); + } return state; } @@ -1011,7 +847,7 @@ if (state->hSHPHandle == NULL) { - snprintf(state->message, SHPLOADERMSGLEN, "%s: shape (.shp) or index files (.shx) can not be opened, will just import attribute data.", state->config->shp_file); + snprintf(state->message, SHPLOADERMSGLEN, _("%s: shape (.shp) or index files (.shx) can not be opened, will just import attribute data."), state->config->shp_file); state->config->readshape = 0; ret = SHPLOADERWARN; @@ -1022,7 +858,7 @@ state->hDBFHandle = DBFOpen(state->config->shp_file, "rb"); if ((state->hSHPHandle == NULL && state->config->readshape == 1) || state->hDBFHandle == NULL) { - snprintf(state->message, SHPLOADERMSGLEN, "%s: dbf file (.dbf) can not be opened.", state->config->shp_file); + snprintf(state->message, SHPLOADERMSGLEN, _("%s: dbf file (.dbf) can not be opened."), state->config->shp_file); return SHPLOADERERR; } @@ -1042,13 +878,13 @@ if (!obj) { - snprintf(state->message, SHPLOADERMSGLEN, "Error reading shape object %d", j); + snprintf(state->message, SHPLOADERMSGLEN, _("Error reading shape object %d"), j); return SHPLOADERERR; } if (obj->nVertices == 0) { - snprintf(state->message, SHPLOADERMSGLEN, "Empty geometries found, aborted."); + snprintf(state->message, SHPLOADERMSGLEN, _("Empty geometries found, aborted.)")); return SHPLOADERERR; } @@ -1057,171 +893,157 @@ } /* Check the shapefile type */ + int geomtype = 0; switch (state->shpfiletype) { case SHPT_POINT: /* Point */ state->pgtype = "POINT"; - state->wkbtype = POINTTYPE; + geomtype = POINTTYPE; state->pgdims = 2; break; case SHPT_ARC: /* PolyLine */ state->pgtype = "MULTILINESTRING"; - state->wkbtype = MULTILINETYPE ; + geomtype = MULTILINETYPE ; state->pgdims = 2; break; case SHPT_POLYGON: /* Polygon */ state->pgtype = "MULTIPOLYGON"; - state->wkbtype = MULTIPOLYGONTYPE; + geomtype = MULTIPOLYGONTYPE; state->pgdims = 2; break; case SHPT_MULTIPOINT: /* MultiPoint */ state->pgtype = "MULTIPOINT"; - state->wkbtype = MULTIPOINTTYPE; + geomtype = MULTIPOINTTYPE; state->pgdims = 2; break; case SHPT_POINTM: /* PointM */ - state->wkbtype = POINTTYPE | WKBMOFFSET; - - if (!state->config->hwgeom) - { - state->pgtype = "POINTM"; - state->pgdims = 3; - state->istypeM = 1; - } - else - { - state->pgtype = "POINT"; - state->pgdims = 2; - } + geomtype = POINTTYPE; + state->has_m = 1; + state->pgtype = "POINTM"; + state->pgdims = 3; break; case SHPT_ARCM: /* PolyLineM */ - state->wkbtype = MULTILINETYPE | WKBMOFFSET; - - if (!state->config->hwgeom) - { - state->pgtype = "MULTILINESTRINGM"; - state->pgdims = 3; - state->istypeM = 1; - } - else - { - state->pgtype = "MULTILINESTRING"; - state->pgdims = 2; - } + geomtype = MULTILINETYPE; + state->has_m = 1; + state->pgtype = "MULTILINESTRINGM"; + state->pgdims = 3; break; case SHPT_POLYGONM: /* PolygonM */ - state->wkbtype = MULTIPOLYGONTYPE | WKBMOFFSET; - - if (!state->config->hwgeom) - { - state->pgtype = "MULTIPOLYGONM"; - state->pgdims = 3; - state->istypeM = 1; - } - else - { - state->pgtype = "MULTIPOLYGON"; - state->pgdims = 2; - } + geomtype = MULTIPOLYGONTYPE; + state->has_m = 1; + state->pgtype = "MULTIPOLYGONM"; + state->pgdims = 3; break; case SHPT_MULTIPOINTM: /* MultiPointM */ - state->wkbtype = MULTIPOINTTYPE | WKBMOFFSET; - - if (!state->config->hwgeom) - { - state->pgtype = "MULTIPOINTM"; - state->pgdims = 3; - state->istypeM = 1; - } - else - { - state->pgtype = "MULTIPOINT"; - state->pgdims = 2; - } + geomtype = MULTIPOINTTYPE; + state->has_m = 1; + state->pgtype = "MULTIPOINTM"; + state->pgdims = 3; break; case SHPT_POINTZ: /* PointZ */ - state->wkbtype = POINTTYPE | WKBMOFFSET | WKBZOFFSET; + geomtype = POINTTYPE; + state->has_m = 1; + state->has_z = 1; state->pgtype = "POINT"; - - if (!state->config->hwgeom) - state->pgdims = 4; - else - state->pgdims = 3; - + state->pgdims = 4; break; case SHPT_ARCZ: /* PolyLineZ */ state->pgtype = "MULTILINESTRING"; - state->wkbtype = MULTILINETYPE | WKBZOFFSET | WKBMOFFSET; - - if (!state->config->hwgeom) - state->pgdims = 4; - else - state->pgdims = 3; - + geomtype = MULTILINETYPE; + state->has_z = 1; + state->has_m = 1; + state->pgdims = 4; break; case SHPT_POLYGONZ: /* MultiPolygonZ */ state->pgtype = "MULTIPOLYGON"; - state->wkbtype = MULTIPOLYGONTYPE | WKBZOFFSET | WKBMOFFSET; - - if (!state->config->hwgeom) - state->pgdims = 4; - else - state->pgdims = 3; - + geomtype = MULTIPOLYGONTYPE; + state->has_z = 1; + state->has_m = 1; + state->pgdims = 4; break; case SHPT_MULTIPOINTZ: /* MultiPointZ */ state->pgtype = "MULTIPOINT"; - state->wkbtype = MULTIPOINTTYPE | WKBZOFFSET | WKBMOFFSET; - - if (!state->config->hwgeom) - state->pgdims = 4; - else - state->pgdims = 3; - + geomtype = MULTIPOINTTYPE; + state->has_z = 1; + state->has_m = 1; + state->pgdims = 4; break; default: state->pgtype = "GEOMETRY"; - state->wkbtype = COLLECTIONTYPE | WKBZOFFSET | WKBMOFFSET; + geomtype = COLLECTIONTYPE; + state->has_z = 1; + state->has_m = 1; state->pgdims = 4; - snprintf(state->message, SHPLOADERMSGLEN, "Unknown geometry type: %d\n", state->shpfiletype); + snprintf(state->message, SHPLOADERMSGLEN, _("Unknown geometry type: %d\n"), state->shpfiletype); return SHPLOADERERR; break; } + + /* Force Z/M-handling if configured to do so */ + switch(state->config->force_output) + { + case FORCE_OUTPUT_2D: + state->has_z = 0; + state->has_m = 0; + state->pgdims = 2; + break; + + case FORCE_OUTPUT_3DZ: + state->has_z = 1; + state->has_m = 0; + state->pgdims = 3; + break; + + case FORCE_OUTPUT_3DM: + state->has_z = 0; + state->has_m = 1; + state->pgdims = 3; + break; + + case FORCE_OUTPUT_4D: + state->has_z = 1; + state->has_m = 1; + state->pgdims = 4; + break; + default: + /* Simply use the auto-detected values above */ + break; + } /* If in simple geometry mode, alter names for CREATE TABLE by skipping MULTI */ if (state->config->simple_geometries) { - if ((state->wkbtype & 0x7) == MULTIPOLYGONTYPE) - state->pgtype += 5; - - if ((state->wkbtype & 0x7) == MULTILINETYPE) + if ((geomtype == MULTIPOLYGONTYPE) || (geomtype == MULTILINETYPE) || (geomtype == MULTIPOINTTYPE)) + { + /* Chop off the "MULTI" from the string. */ state->pgtype += 5; + } } } @@ -1241,6 +1063,7 @@ state->types = (DBFFieldType *)malloc(state->num_fields * sizeof(int)); state->widths = malloc(state->num_fields * sizeof(int)); state->precisions = malloc(state->num_fields * sizeof(int)); + state->pgfieldtypes = malloc(state->num_fields * sizeof(char *)); state->col_names = malloc((state->num_fields + 2) * sizeof(char) * MAXFIELDNAMELEN); /* Generate a string of comma separated column names of the form "(col1, col2 ... colN)" for the SQL @@ -1257,21 +1080,21 @@ if (state->config->encoding) { - static char *encoding_msg = "Try \"LATIN1\" (Western European), or one of the values described at http://www.postgresql.org/docs/current/static/multibyte.html."; + char *encoding_msg = _("Try \"LATIN1\" (Western European), or one of the values described at http://www.gnu.org/software/libiconv/."); + + int rv = utf8(state->config->encoding, name, &utf8str); - int rv = utf8(state->config->encoding, name, &utf8str); - if (rv != UTF8_GOOD_RESULT) { - if( rv == UTF8_BAD_RESULT ) - snprintf(state->message, SHPLOADERMSGLEN, "Unable to convert field name \"%s\" to UTF-8 (iconv reports \"%s\"). Current encoding is \"%s\". %s", utf8str, strerror(errno), state->config->encoding, encoding_msg); - else if( rv == UTF8_NO_RESULT ) - snprintf(state->message, SHPLOADERMSGLEN, "Unable to convert field name to UTF-8 (iconv reports \"%s\"). Current encoding is \"%s\". %s", strerror(errno), state->config->encoding, encoding_msg); - else - snprintf(state->message, SHPLOADERMSGLEN, "Unexpected return value from utf8()"); + if ( rv == UTF8_BAD_RESULT ) + snprintf(state->message, SHPLOADERMSGLEN, _("Unable to convert field name \"%s\" to UTF-8 (iconv reports \"%s\"). Current encoding is \"%s\". %s"), utf8str, strerror(errno), state->config->encoding, encoding_msg); + else if ( rv == UTF8_NO_RESULT ) + snprintf(state->message, SHPLOADERMSGLEN, _("Unable to convert field name to UTF-8 (iconv reports \"%s\"). Current encoding is \"%s\". %s"), strerror(errno), state->config->encoding, encoding_msg); + else + snprintf(state->message, SHPLOADERMSGLEN, _("Unexpected return value from utf8()")); - if( rv == UTF8_BAD_RESULT ) - free(utf8str); + if ( rv == UTF8_BAD_RESULT ) + free(utf8str); return SHPLOADERERR; } @@ -1294,8 +1117,11 @@ */ if (name[0] == '_' || ! strcmp(name, "gid") || ! strcmp(name, "tableoid") || - ! strcmp(name, "cmax") || ! strcmp(name, "xmax") || - ! strcmp(name, "cmin") || ! strcmp(name, "primary") || + ! strcmp(name, "cmin") || + ! strcmp(name, "cmax") || + ! strcmp(name, "xmin") || + ! strcmp(name, "xmax") || + ! strcmp(name, "primary") || ! strcmp(name, "oid") || ! strcmp(name, "ctid")) { strncpy(name2 + 2, name, MAXFIELDNAMELEN - 2); @@ -1318,6 +1144,62 @@ state->field_names[j] = malloc(strlen(name) + 1); strcpy(state->field_names[j], name); + /* Now generate the PostgreSQL type name string and width based upon the shapefile type */ + switch (state->types[j]) + { + case FTString: + state->pgfieldtypes[j] = malloc(strlen("varchar") + 1); + strcpy(state->pgfieldtypes[j], "varchar"); + break; + + case FTDate: + state->pgfieldtypes[j] = malloc(strlen("date") + 1); + strcpy(state->pgfieldtypes[j], "date"); + break; + + case FTInteger: + /* Determine exact type based upon field width */ + if (state->config->forceint4 || (state->widths[j] >=5 && state->widths[j] < 10)) + { + state->pgfieldtypes[j] = malloc(strlen("int4") + 1); + strcpy(state->pgfieldtypes[j], "int4"); + } + else if (state->widths[j] < 5) + { + state->pgfieldtypes[j] = malloc(strlen("int2") + 1); + strcpy(state->pgfieldtypes[j], "int2"); + } + else + { + state->pgfieldtypes[j] = malloc(strlen("numeric") + 1); + strcpy(state->pgfieldtypes[j], "numeric"); + } + break; + + case FTDouble: + /* Determine exact type based upon field width */ + if (state->widths[j] > 18) + { + state->pgfieldtypes[j] = malloc(strlen("numeric") + 1); + strcpy(state->pgfieldtypes[j], "numeric"); + } + else + { + state->pgfieldtypes[j] = malloc(strlen("float8") + 1); + strcpy(state->pgfieldtypes[j], "float8"); + } + break; + + case FTLogical: + state->pgfieldtypes[j] = malloc(strlen("boolean") + 1); + strcpy(state->pgfieldtypes[j], "boolean"); + break; + + default: + snprintf(state->message, SHPLOADERMSGLEN, _("Invalid type %x in DBF file"), state->types[j]); + return SHPLOADERERR; + } + strcat(state->col_names, "\""); strcat(state->col_names, name); @@ -1334,7 +1216,7 @@ /* Append the geometry column if required */ if (state->config->readshape == 1) - strcat(state->col_names, state->config->geom); + strcat(state->col_names, state->geo_col); strcat(state->col_names, ")"); @@ -1355,15 +1237,15 @@ for handling string resizing during append */ sb = stringbuffer_create(); stringbuffer_clear(sb); - + /* Set the client encoding if required */ if (state->config->encoding) { - vasbappend(sb, "SET CLIENT_ENCODING TO UTF8;\n"); + stringbuffer_aprintf(sb, "SET CLIENT_ENCODING TO UTF8;\n"); } - + /* Use SQL-standard string escaping rather than PostgreSQL standard */ - vasbappend(sb, "SET STANDARD_CONFORMING_STRINGS TO ON;\n"); + stringbuffer_aprintf(sb, "SET STANDARD_CONFORMING_STRINGS TO ON;\n"); /* Drop table if requested */ if (state->config->opt == 'd') @@ -1383,27 +1265,30 @@ { if (state->config->readshape == 1 && (! state->config->geography) ) { - vasbappend(sb, "SELECT DropGeometryColumn('%s','%s','%s');\n", - state->config->schema, state->config->table, state->config->geom); + stringbuffer_aprintf(sb, "SELECT DropGeometryColumn('%s','%s','%s');\n", + state->config->schema, state->config->table, state->geo_col); } - vasbappend(sb, "DROP TABLE \"%s\".\"%s\";\n", state->config->schema, - state->config->table); + stringbuffer_aprintf(sb, "DROP TABLE \"%s\".\"%s\";\n", state->config->schema, + state->config->table); } else { if (state->config->readshape == 1 && (! state->config->geography) ) { - vasbappend(sb, "SELECT DropGeometryColumn('','%s','%s');\n", - state->config->table, state->config->geom); + stringbuffer_aprintf(sb, "SELECT DropGeometryColumn('','%s','%s');\n", + state->config->table, state->geo_col); } - vasbappend(sb, "DROP TABLE \"%s\";\n", state->config->table); + stringbuffer_aprintf(sb, "DROP TABLE \"%s\";\n", state->config->table); } } - /* Start of transaction */ - vasbappend(sb, "BEGIN;\n"); + /* Start of transaction if we are using one */ + if (state->config->usetransaction) + { + stringbuffer_aprintf(sb, "BEGIN;\n"); + } /* If not in 'append' mode create the spatial table */ if (state->config->opt != 'a') @@ -1414,70 +1299,31 @@ */ if (state->config->schema) { - vasbappend(sb, "CREATE TABLE \"%s\".\"%s\" (gid serial PRIMARY KEY", - state->config->schema, state->config->table); + stringbuffer_aprintf(sb, "CREATE TABLE \"%s\".\"%s\" (gid serial", + state->config->schema, state->config->table); } else { - vasbappend(sb, "CREATE TABLE \"%s\" (gid serial PRIMARY KEY", state->config->table); + stringbuffer_aprintf(sb, "CREATE TABLE \"%s\" (gid serial", state->config->table); } /* Generate the field types based upon the shapefile information */ for (j = 0; j < state->num_fields; j++) { - vasbappend(sb, ",\n\"%s\" ", state->field_names[j]); + stringbuffer_aprintf(sb, ",\n\"%s\" ", state->field_names[j]); - switch (state->types[j]) - { - case FTString: - /* use DBF attribute size as maximum width */ - vasbappend(sb, "varchar(%d)", state->widths[j]); - break; - - case FTDate: - vasbappend(sb, "date"); - break; - - case FTInteger: - /* Determine exact type based upon field width */ - if (state->config->forceint4) - { - vasbappend(sb, "int4"); - } - else if (state->widths[j] < 5) - { - vasbappend(sb, "int2"); - } - else if (state->widths[j] < 10) - { - vasbappend(sb, "int4"); - } - else - { - vasbappend(sb, "numeric(%d,0)", state->widths[j]); - } - break; - - case FTDouble: - /* Determine exact type based upon field width */ - if (state->widths[j] > 18) - { - vasbappend(sb, "numeric"); - } - else - { - vasbappend(sb, "float8"); - } - break; - - case FTLogical: - vasbappend(sb, "boolean"); - break; - - default: - snprintf(state->message, SHPLOADERMSGLEN, "Invalid type %x in DBF file", state->types[j]); - stringbuffer_destroy(sb); - return SHPLOADERERR; + /* First output the raw field type string */ + stringbuffer_aprintf(sb, "%s", state->pgfieldtypes[j]); + + /* Some types do have typmods though... */ + if (!strcmp("varchar", state->pgfieldtypes[j])) + stringbuffer_aprintf(sb, "(%d)", state->widths[j]); + + if (!strcmp("numeric", state->pgfieldtypes[j])) + { + /* Doubles we just allow PostgreSQL to auto-detect the size */ + if (state->types[j] != FTDouble) + stringbuffer_aprintf(sb, "(%d,0)", state->widths[j]); } } @@ -1486,36 +1332,83 @@ if (state->config->readshape == 1 && state->config->geography) { char *dimschar; - if ( state->pgdims == 4 ) + + if (state->pgdims == 4) dimschar = "ZM"; else dimschar = ""; - if (state->config->sr_id != -1 && state->config->sr_id != 4326) + + if (state->to_srid != SRID_UNKNOWN && state->to_srid != 4326) { - snprintf(state->message, SHPLOADERMSGLEN, "Invalid SRID for geography type: %x", state->config->sr_id); + snprintf(state->message, SHPLOADERMSGLEN, _("Invalid SRID for geography type: %d"), state->to_srid); stringbuffer_destroy(sb); return SHPLOADERERR; } - vasbappend(sb, ",\n\"%s\" geography(%s%s,%d)", state->config->geom, state->pgtype, dimschar, 4326); + stringbuffer_aprintf(sb, ",\n\"%s\" geography(%s%s,%d)", state->geo_col, state->pgtype, dimschar, 4326); + } + stringbuffer_aprintf(sb, ")"); + + /* Tablespace is optional. */ + if (state->config->tablespace != NULL) + { + stringbuffer_aprintf(sb, " TABLESPACE \"%s\"", state->config->tablespace); } + stringbuffer_aprintf(sb, ";\n"); - vasbappend(sb, ");\n"); + /* Create the primary key. This is done separately because the index for the PK needs + * to be in the correct tablespace. */ + + /* TODO: Currently PostgreSQL does not allow specifying an index to use for a PK (so you get + * a default one called table_pkey) and it does not provide a way to create a PK index + * in a specific tablespace. So as a hacky solution we create the PK, then move the + * index to the correct tablespace. Eventually this should be: + * CREATE INDEX table_pkey on table(gid) TABLESPACE tblspc; + * ALTER TABLE table ADD PRIMARY KEY (gid) USING INDEX table_pkey; + * A patch has apparently been submitted to PostgreSQL to enable this syntax, see this thread: + * http://archives.postgresql.org/pgsql-hackers/2011-01/msg01405.php */ + stringbuffer_aprintf(sb, "ALTER TABLE "); + + /* Schema is optional, include if present. */ + if (state->config->schema) + { + stringbuffer_aprintf(sb, "\"%s\".",state->config->schema); + } + stringbuffer_aprintf(sb, "\"%s\" ADD PRIMARY KEY (gid);\n", state->config->table); + + /* Tablespace is optional for the index. */ + if (state->config->idxtablespace != NULL) + { + stringbuffer_aprintf(sb, "ALTER INDEX "); + if (state->config->schema) + { + stringbuffer_aprintf(sb, "\"%s\".",state->config->schema); + } + + /* WARNING: We're assuming the default "table_pkey" name for the primary + * key index. PostgreSQL may use "table_pkey1" or similar in the + * case of a name conflict, so you may need to edit the produced + * SQL in this rare case. */ + stringbuffer_aprintf(sb, "\"%s_pkey\" SET TABLESPACE \"%s\";\n", + state->config->table, state->config->idxtablespace); + } /* Create the geometry column with an addgeometry call */ if (state->config->readshape == 1 && (!state->config->geography)) { + /* If they didn't specify a target SRID, see if they specified a source SRID. */ + int srid = state->to_srid; if (state->config->schema) { - vasbappend(sb, "SELECT AddGeometryColumn('%s','%s','%s','%d',", - state->config->schema, state->config->table, state->config->geom, state->config->sr_id); + stringbuffer_aprintf(sb, "SELECT AddGeometryColumn('%s','%s','%s','%d',", + state->config->schema, state->config->table, state->geo_col, srid); } else { - vasbappend(sb, "SELECT AddGeometryColumn('','%s','%s','%d',", - state->config->table, state->config->geom, state->config->sr_id); + stringbuffer_aprintf(sb, "SELECT AddGeometryColumn('','%s','%s','%d',", + state->config->table, state->geo_col, srid); } - vasbappend(sb, "'%s',%d);\n", state->pgtype, state->pgdims); + stringbuffer_aprintf(sb, "'%s',%d);\n", state->pgtype, state->pgdims); } } @@ -1560,7 +1453,7 @@ else { /* Flag an error as something has gone horribly wrong */ - snprintf(state->message, SHPLOADERMSGLEN, "Internal error: attempt to generate a COPY statement for data that hasn't been requested in COPY format"); + snprintf(state->message, SHPLOADERMSGLEN, _("Internal error: attempt to generate a COPY statement for data that hasn't been requested in COPY format")); return SHPLOADERERR; } @@ -1596,7 +1489,7 @@ stringbuffer_clear(sb); /* If we are reading the DBF only and the record has been marked deleted, return deleted record status */ - if (state->config->readshape == 0 && DBFReadDeleted(state->hDBFHandle, item)) + if (state->config->readshape == 0 && DBFIsRecordDeleted(state->hDBFHandle, item)) { *strrecord = NULL; return SHPLOADERRECDELETED; @@ -1608,7 +1501,7 @@ obj = SHPReadObject(state->hSHPHandle, item); if (!obj) { - snprintf(state->message, SHPLOADERMSGLEN, "Error reading shape object %d", item); + snprintf(state->message, SHPLOADERMSGLEN, _("Error reading shape object %d"), item); return SHPLOADERERR; } @@ -1627,13 +1520,13 @@ { if (state->config->schema) { - vasbappend(sb, "INSERT INTO \"%s\".\"%s\" %s VALUES (", state->config->schema, - state->config->table, state->col_names); + stringbuffer_aprintf(sb, "INSERT INTO \"%s\".\"%s\" %s VALUES (", state->config->schema, + state->config->table, state->col_names); } else { - vasbappend(sb, "INSERT INTO \"%s\" %s VALUES (", state->config->table, - state->col_names); + stringbuffer_aprintf(sb, "INSERT INTO \"%s\" %s VALUES (", state->config->table, + state->col_names); } } @@ -1645,9 +1538,9 @@ if (DBFIsAttributeNULL(state->hDBFHandle, item, i)) { if (state->config->dump_format) - vasbappend(sb, "\\N"); + stringbuffer_aprintf(sb, "\\N"); else - vasbappend(sb, "NULL"); + stringbuffer_aprintf(sb, "NULL"); } else { @@ -1659,7 +1552,7 @@ rv = snprintf(val, MAXVALUELEN, "%s", DBFReadStringAttribute(state->hDBFHandle, item, i)); if (rv >= MAXVALUELEN || rv == -1) { - vasbappend(sbwarn, "Warning: field %d name truncated\n", i); + stringbuffer_aprintf(sbwarn, "Warning: field %d name truncated\n", i); val[MAXVALUELEN - 1] = '\0'; } @@ -1681,13 +1574,13 @@ rv = snprintf(val, MAXVALUELEN, "%s", DBFReadStringAttribute(state->hDBFHandle, item, i)); if (rv >= MAXVALUELEN || rv == -1) { - vasbappend(sbwarn, "Warning: field %d name truncated\n", i); + stringbuffer_aprintf(sbwarn, "Warning: field %d name truncated\n", i); val[MAXVALUELEN - 1] = '\0'; } break; default: - snprintf(state->message, SHPLOADERMSGLEN, "Error: field %d has invalid or unknown field type (%d)", i, state->types[i]); + snprintf(state->message, SHPLOADERMSGLEN, _("Error: field %d has invalid or unknown field type (%d)"), i, state->types[i]); SHPDestroyObject(obj); stringbuffer_destroy(sbwarn); @@ -1698,49 +1591,39 @@ if (state->config->encoding) { - static char *encoding_msg = "Try \"LATIN1\" (Western European), or one of the values described at http://www.postgresql.org/docs/current/static/multibyte.html."; - /* If we are converting from another encoding to UTF8, convert the field value to UTF8 */ - int rv = utf8(state->config->encoding, val, &utf8str); - if ( !UTF8_DROP_BAD_CHARACTERS && rv != UTF8_GOOD_RESULT ) - { - if( rv == UTF8_BAD_RESULT ) - snprintf(state->message, SHPLOADERMSGLEN, "Unable to convert data value \"%s\" to UTF-8 (iconv reports \"%s\"). Current encoding is \"%s\". %s", utf8str, strerror(errno), state->config->encoding, encoding_msg); - else if( rv == UTF8_NO_RESULT ) - snprintf(state->message, SHPLOADERMSGLEN, "Unable to convert data value to UTF-8 (iconv reports \"%s\"). Current encoding is \"%s\". %s", strerror(errno), state->config->encoding, encoding_msg); - else - snprintf(state->message, SHPLOADERMSGLEN, "Unexpected return value from utf8()"); - - if( rv == UTF8_BAD_RESULT ) - free(utf8str); - - return SHPLOADERERR; - } - /* Optionally (compile-time) suppress bad UTF8 values */ - if ( UTF8_DROP_BAD_CHARACTERS && rv != UTF8_GOOD_RESULT ) - { - val[0] = '.'; - val[1] = '\0'; - } + char *encoding_msg = _("Try \"LATIN1\" (Western European), or one of the values described at http://www.postgresql.org/docs/current/static/multibyte.html."); - - /* The utf8str buffer is only alloc'ed if the UTF8 conversion works */ - if ( rv == UTF8_GOOD_RESULT ) + rv = utf8(state->config->encoding, val, &utf8str); + + if (rv != UTF8_GOOD_RESULT) { - strncpy(val, utf8str, MAXVALUELEN); - free(utf8str); + if ( rv == UTF8_BAD_RESULT ) + snprintf(state->message, SHPLOADERMSGLEN, _("Unable to convert data value \"%s\" to UTF-8 (iconv reports \"%s\"). Current encoding is \"%s\". %s"), utf8str, strerror(errno), state->config->encoding, encoding_msg); + else if ( rv == UTF8_NO_RESULT ) + snprintf(state->message, SHPLOADERMSGLEN, _("Unable to convert data value to UTF-8 (iconv reports \"%s\"). Current encoding is \"%s\". %s"), strerror(errno), state->config->encoding, encoding_msg); + else + snprintf(state->message, SHPLOADERMSGLEN, _("Unexpected return value from utf8()")); + + if ( rv == UTF8_BAD_RESULT ) + free(utf8str); + + return SHPLOADERERR; } + strncpy(val, utf8str, MAXVALUELEN); + free(utf8str); + } /* Escape attribute correctly according to dump format */ if (state->config->dump_format) { escval = escape_copy_string(val); - vasbappend(sb, "%s", escval); + stringbuffer_aprintf(sb, "%s", escval); } else { escval = escape_insert_string(val); - vasbappend(sb, "'%s'", escval); + stringbuffer_aprintf(sb, "'%s'", escval); } /* Free the escaped version if required */ @@ -1752,9 +1635,9 @@ if (state->config->readshape == 1 || i < DBFGetFieldCount(state->hDBFHandle) - 1) { if (state->config->dump_format) - vasbappend(sb, "\t"); + stringbuffer_aprintf(sb, "\t"); else - vasbappend(sb, ","); + stringbuffer_aprintf(sb, ","); } /* End of DBF attribute loop */ @@ -1768,9 +1651,9 @@ if (obj->nVertices == 0) { if (state->config->dump_format) - vasbappend(sb, "\\N"); + stringbuffer_aprintf(sb, "\\N"); else - vasbappend(sb, "NULL"); + stringbuffer_aprintf(sb, "NULL"); } else { @@ -1781,98 +1664,75 @@ case SHPT_POLYGONM: case SHPT_POLYGONZ: res = GeneratePolygonGeometry(state, obj, &geometry); - if (res != SHPLOADEROK) - { - /* Error message has already been set */ - SHPDestroyObject(obj); - stringbuffer_destroy(sbwarn); - stringbuffer_destroy(sb); - - return SHPLOADERERR; - } break; case SHPT_POINT: case SHPT_POINTM: case SHPT_POINTZ: + res = GeneratePointGeometry(state, obj, &geometry, 0); + break; + case SHPT_MULTIPOINT: case SHPT_MULTIPOINTM: case SHPT_MULTIPOINTZ: - res = GeneratePointGeometry(state, obj, &geometry); - if (res != SHPLOADEROK) - { - /* Error message has already been set */ - SHPDestroyObject(obj); - stringbuffer_destroy(sbwarn); - stringbuffer_destroy(sb); - - return SHPLOADERERR; - } + /* Force it to multi unless using -S */ + res = GeneratePointGeometry(state, obj, &geometry, + state->config->simple_geometries ? 0 : 1); break; case SHPT_ARC: case SHPT_ARCM: case SHPT_ARCZ: res = GenerateLineStringGeometry(state, obj, &geometry); - if (res != SHPLOADEROK) - { - /* Error message has already been set */ - SHPDestroyObject(obj); - stringbuffer_destroy(sbwarn); - stringbuffer_destroy(sb); - - return SHPLOADERERR; - } break; default: - snprintf(state->message, SHPLOADERMSGLEN, "Shape type is NOT SUPPORTED, type id = %d", obj->nSHPType); - + snprintf(state->message, SHPLOADERMSGLEN, _("Shape type is not supported, type id = %d"), obj->nSHPType); SHPDestroyObject(obj); stringbuffer_destroy(sbwarn); stringbuffer_destroy(sb); return SHPLOADERERR; } + /* The default returns out of the function, so res will always have been set. */ + if (res != SHPLOADEROK) + { + /* Error message has already been set */ + SHPDestroyObject(obj); + stringbuffer_destroy(sbwarn); + stringbuffer_destroy(sb); + return SHPLOADERERR; + } /* Now generate the geometry string according to the current configuration */ - if (state->config->hwgeom) + if (!state->config->dump_format) { - /* Old-style hwgeom (WKT) */ - if (!state->config->dump_format) - vasbappend(sb, "GeomFromText('"); - else + if (state->to_srid != state->from_srid) { - /* Output SRID if relevant */ - if (state->config->sr_id != 0) - vasbappend(sb, "SRID=%d;", state->config->sr_id); + stringbuffer_aprintf(sb, "ST_Transform("); } + stringbuffer_aprintf(sb, "'"); + } - vasbappend(sb, "%s", geometry); + stringbuffer_aprintf(sb, "%s", geometry); - if (!state->config->dump_format) - { - vasbappend(sb, "'"); + if (!state->config->dump_format) + { + stringbuffer_aprintf(sb, "'"); - /* Output SRID if relevant */ - if (state->config->sr_id != 0) - vasbappend(sb, ", %d)", state->config->sr_id); + /* Close the ST_Transform if reprojecting. */ + if (state->to_srid != state->from_srid) + { + /* We need to add an explicit cast to geography/geometry to ensure that + PostgreSQL doesn't get confused with the ST_Transform() raster + function. */ + if (state->config->geography) + stringbuffer_aprintf(sb, "::geometry, %d)::geography", state->to_srid); else - vasbappend(sb, ")"); + stringbuffer_aprintf(sb, "::geometry, %d)", state->to_srid); } } - else - { - /* New style lwgeom (HEXEWKB) */ - if (!state->config->dump_format) - vasbappend(sb, "'"); - - vasbappend(sb, "%s", geometry); - - if (!state->config->dump_format) - vasbappend(sb, "'"); - } free(geometry); } @@ -1883,7 +1743,7 @@ /* Close the line correctly for dump/insert format */ if (!state->config->dump_format) - vasbappend(sb, ");"); + stringbuffer_aprintf(sb, ");"); /* Copy the string buffer into a new string, destroying the string buffer */ @@ -1917,12 +1777,6 @@ { stringbuffer_t *sb; char *ret; - char *ops; - - if ( state->config->geography ) - ops = "gist_geography_ops"; - else - ops = "gist_geometry_ops"; /* Create the stringbuffer containing the header; we use this API as it's easier for handling string resizing during append */ @@ -1932,19 +1786,26 @@ /* Create gist index if specified and not in "prepare" mode */ if (state->config->createindex) { + stringbuffer_aprintf(sb, "CREATE INDEX \"%s_%s_gist\" ON ", state->config->table, state->geo_col); + /* Schema is optional, include if present. */ if (state->config->schema) { - vasbappend(sb, "CREATE INDEX \"%s_%s_gist\" ON \"%s\".\"%s\" using gist (\"%s\" %s);\n", state->config->table, state->config->geom, - state->config->schema, state->config->table, state->config->geom, ops); + stringbuffer_aprintf(sb, "\"%s\".",state->config->schema); } - else + stringbuffer_aprintf(sb, "\"%s\" USING GIST (\"%s\")", state->config->table, state->geo_col); + /* Tablespace is also optional. */ + if (state->config->idxtablespace != NULL) { - vasbappend(sb, "CREATE INDEX \"%s_%s_gist\" ON \"%s\" using gist (\"%s\" %s);\n", state->config->table, state->config->geom, state->config->table, state->config->geom, ops); + stringbuffer_aprintf(sb, " TABLESPACE \"%s\"", state->config->idxtablespace); } + stringbuffer_aprintf(sb, ";\n"); } - /* End the transaction */ - vasbappend(sb, "COMMIT;\n"); + /* End the transaction if there is one. */ + if (state->config->usetransaction) + { + stringbuffer_aprintf(sb, "COMMIT;\n"); + } /* Copy the string buffer into a new string, destroying the string buffer */ ret = (char *)malloc(strlen((char *)stringbuffer_getstring(sb)) + 1); @@ -1961,7 +1822,8 @@ ShpLoaderDestroy(SHPLOADERSTATE *state) { /* Destroy a state object created with ShpLoaderOpenShape */ - + int i; + if (state != NULL) { if (state->hSHPHandle) @@ -1970,12 +1832,18 @@ DBFClose(state->hDBFHandle); if (state->field_names) { - int i; for (i = 0; i < state->num_fields; i++) free(state->field_names[i]); free(state->field_names); } + if (state->pgfieldtypes) + { + for (i = 0; i < state->num_fields; i++) + free(state->pgfieldtypes[i]); + + free(state->pgfieldtypes); + } if (state->types) free(state->types); if (state->widths) @@ -1989,6 +1857,3 @@ free(state); } } - - - diff -Nru postgis-1.5.3/loader/shp2pgsql-core.h postgis-2.0.1/loader/shp2pgsql-core.h --- postgis-1.5.3/loader/shp2pgsql-core.h 2010-09-19 11:27:05.000000000 +0000 +++ postgis-2.0.1/loader/shp2pgsql-core.h 2012-03-26 16:23:58.000000000 +0000 @@ -1,5 +1,5 @@ /********************************************************************** - * $Id: shp2pgsql-core.h 5983 2010-09-19 11:27:05Z mcayland $ + * $Id: shp2pgsql-core.h 9548 2012-03-26 16:23:58Z mcayland $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net @@ -12,6 +12,7 @@ * **********************************************************************/ +/* Standard headers */ #include #include #include @@ -23,34 +24,38 @@ #include #include "shapefil.h" +#include "shpcommon.h" #include "getopt.h" -#include "../liblwgeom/liblwgeom.h" +#include "../liblwgeom/stringbuffer.h" -#include "stringbuffer.h" +#define S2P_RCSID "$Id: shp2pgsql-core.h 9548 2012-03-26 16:23:58Z mcayland $" -#define RCSID "$Id: shp2pgsql-core.h 5983 2010-09-19 11:27:05Z mcayland $" +/* Number of digits of precision in WKT produced. */ +#define WKT_PRECISION 15 -/* - * Loader policy constants - */ - +/* Loader policy constants */ #define POLICY_NULL_ABORT 0x0 #define POLICY_NULL_INSERT 0x1 #define POLICY_NULL_SKIP 0x2 +/* Forced dimensionality constants */ +#define FORCE_OUTPUT_DISABLE 0x0 +#define FORCE_OUTPUT_2D 0x1 +#define FORCE_OUTPUT_3DZ 0x2 +#define FORCE_OUTPUT_3DM 0x3 +#define FORCE_OUTPUT_4D 0x4 -/* - * Error message handling - */ - +/* Error message handling */ #define SHPLOADERMSGLEN 1024 +/* Error status codes */ #define SHPLOADEROK -1 #define SHPLOADERERR 0 #define SHPLOADERWARN 1 +/* Record status codes */ #define SHPLOADERRECDELETED 2 #define SHPLOADERRECISNULL 3 @@ -64,7 +69,7 @@ /* * Default geometry column name */ -#define GEOMETRY_DEFAULT "the_geom" +#define GEOMETRY_DEFAULT "geom" #define GEOGRAPHY_DEFAULT "geog" /* @@ -75,7 +80,6 @@ /* * Structure to hold the loader configuration options */ - typedef struct shp_loader_config { /* load mode: c = create, d = delete, a = append, p = prepare */ @@ -87,8 +91,8 @@ /* schema to load into */ char *schema; - /* geometry column name to use */ - char *geom; + /* geometry/geography column name specified by the user, may be null. */ + char *geo_col; /* the shape file (without the .shp extension) */ char *shp_file; @@ -114,17 +118,32 @@ /* 0 = load DBF file only, 1 = load everything */ int readshape; + /* Override the output geometry type (a FORCE_OUTPUT_* constant) */ + int force_output; + /* iconv encoding name */ char *encoding; + /* tablespace name for the table */ + char *tablespace; + + /* tablespace name for the indexes */ + char *idxtablespace; + /* how to handle nulls */ int null_policy; /* SRID specified */ int sr_id; - /* 0 = new style (PostGIS 1.x) geometries, 1 = old style (PostGIS 0.9.x) geometries */ - int hwgeom; + /* SRID of the shape file */ + int shp_sr_id; + + /* 0 = WKB (more precise), 1 = WKT (may have coordinate drift). */ + int use_wkt; + + /* whether to do a single transaction or run each statement on its own */ + int usetransaction; } SHPLOADERCONFIG; @@ -132,7 +151,6 @@ /* * Structure to holder the current loader state */ - typedef struct shp_loader_state { /* Configuration for this state */ @@ -166,51 +184,44 @@ int *widths; int *precisions; + /* Pointer to an array of PostgreSQL field types */ + char **pgfieldtypes; + /* String containing colume name list in the form "(col1, col2, col3 ... , colN)" */ char *col_names; /* String containing the PostGIS geometry type, e.g. POINT, POLYGON etc. */ char *pgtype; - /* PostGIS geometry type (numeric version) */ - unsigned int wkbtype; + /* Flag for whether the output geometry has Z coordinates or not. */ + int has_z; + + /* Flag for whether the output geometry has M coordinates or not. */ + int has_m; /* Number of dimensions to output */ int pgdims; - /* 0 = simple geometry, 1 = multi geometry */ - int istypeM; - /* Last (error) message */ char message[SHPLOADERMSGLEN]; -} SHPLOADERSTATE; + /* SRID of the shape file. If not reprojecting, will be the same as to_srid. */ + int from_srid; + /* SRID of the table. If not reprojecting, will be the same as from_srid. */ + int to_srid; -typedef struct shp_connection_state -{ - /* PgSQL username to log in with */ - char *username; - - /* PgSQL password to log in with */ - char *password; - - /* PgSQL database to connect to */ - char *database; + /* geometry/geography column name to use. Will be set to the default if the config did + not specify a column name. */ + char *geo_col; - /* PgSQL port to connect to */ - char *port; - - /* PgSQL server to connect to */ - char *host; +} SHPLOADERSTATE; -} SHPCONNECTIONCONFIG; /* Externally accessible functions */ void strtolower(char *s); void vasbappend(stringbuffer_t *sb, char *fmt, ... ); -char *escape_connection_string(char *str); -void set_config_defaults(SHPLOADERCONFIG *config); +void set_loader_config_defaults(SHPLOADERCONFIG *config); SHPLOADERSTATE *ShpLoaderCreate(SHPLOADERCONFIG *config); int ShpLoaderOpenShape(SHPLOADERSTATE *state); diff -Nru postgis-1.5.3/loader/shp2pgsql-gui.c postgis-2.0.1/loader/shp2pgsql-gui.c --- postgis-1.5.3/loader/shp2pgsql-gui.c 2010-09-19 11:27:05.000000000 +0000 +++ postgis-2.0.1/loader/shp2pgsql-gui.c 2012-06-21 22:22:59.000000000 +0000 @@ -1,29 +1,48 @@ /********************************************************************** - * $Id: shp2pgsql-gui.c 5983 2010-09-19 11:27:05Z mcayland $ + * $Id: shp2pgsql-gui.c 9970 2012-06-21 22:22:59Z mcayland $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net * Copyright 2008 OpenGeo.org + * Copyright 2010 LISAsoft * * This is free software; you can redistribute and/or modify it under * the terms of the GNU General Public Licence. See the COPYING file. * * Maintainer: Paul Ramsey + * Mark Leslie * **********************************************************************/ +#include "../postgis_config.h" + #include #include #include #include #include -#ifdef MAC_INTEGRATION -#include -#endif +#include +#include #include "libpq-fe.h" #include "shp2pgsql-core.h" +#include "pgsql2shp-core.h" + +#include "../liblwgeom/liblwgeom.h" /* for lw_vasprintf */ + +#define GUI_RCSID "shp2pgsql-gui $Revision: 9970 $" +#define SHAPEFIELDMAXWIDTH 60 -#define GUI_RCSID "shp2pgsql-gui $Revision: 5983 $" +static void pgui_log_va(const char *fmt, va_list ap); +static void pgui_seterr_va(const char *fmt, va_list ap); + +static void update_conn_ui_from_conn_config(void); + +/* If GTK+ version is < 2.14.0, define gtk_dialog_get_content_area() */ +#if !GTK_CHECK_VERSION(2, 14, 0) + #if !defined(gtk_dialog_get_content_area) + #define gtk_dialog_get_content_area(dialog) GTK_DIALOG(dialog)->vbox + #endif +#endif /* ** Global variables for GUI only @@ -31,51 +50,182 @@ /* Main window */ static GtkWidget *window_main = NULL; + +static GtkWidget *textview_log = NULL; +static GtkTextBuffer *textbuffer_log = NULL; + +/* Main import window (listview) */ +GtkListStore *import_file_list_store; +GtkWidget *import_tree; +GtkCellRenderer *import_filename_renderer; +GtkCellRenderer *import_schema_renderer; +GtkCellRenderer *import_table_renderer; +GtkCellRenderer *import_geom_column_renderer; +GtkCellRenderer *import_srid_renderer; +GtkCellRenderer *import_mode_renderer; +GtkCellRenderer *import_remove_renderer; + +GtkTreeViewColumn *import_filename_column; +GtkTreeViewColumn *import_schema_column; +GtkTreeViewColumn *import_table_column; +GtkTreeViewColumn *import_geom_column; +GtkTreeViewColumn *import_srid_column; +GtkTreeViewColumn *import_mode_column; +GtkTreeViewColumn *import_remove_column; + +static GtkWidget *add_file_button = NULL; + +GtkWidget *loader_mode_combo = NULL; +GtkListStore *loader_mode_combo_list; + +/* Main export window (listview) */ +GtkListStore *export_table_list_store; +GtkWidget *export_tree; +GtkWidget *export_geom_column_combo; +GtkCellRenderer *export_schema_renderer; +GtkCellRenderer *export_table_renderer; +GtkCellRenderer *export_geom_column_renderer; +GtkCellRenderer *export_filename_renderer; +GtkCellRenderer *export_remove_renderer; + +GtkTreeViewColumn *export_schema_column; +GtkTreeViewColumn *export_table_column; +GtkTreeViewColumn *export_geom_column; +GtkTreeViewColumn *export_filename_column; +GtkTreeViewColumn *export_remove_column; + +static GtkWidget *add_table_button = NULL; + +/* PostgreSQL database connection window */ +static GtkWidget *window_conn = NULL; + static GtkWidget *entry_pg_user = NULL; static GtkWidget *entry_pg_pass = NULL; static GtkWidget *entry_pg_host = NULL; static GtkWidget *entry_pg_port = NULL; static GtkWidget *entry_pg_db = NULL; -static GtkWidget *entry_config_table = NULL; -static GtkWidget *entry_config_schema = NULL; -static GtkWidget *entry_config_srid = NULL; -static GtkWidget *entry_config_geocolumn = NULL; -static GtkWidget *label_pg_connection_test = NULL; -static GtkWidget *textview_log = NULL; -static GtkWidget *file_chooser_button_shape = NULL; -static GtkWidget *progress = NULL; -static GtkTextBuffer *textbuffer_log = NULL; -/* Options window */ +/* Loader options window */ +static GtkWidget *dialog_loader_options = NULL; static GtkWidget *entry_options_encoding = NULL; -static GtkWidget *checkbutton_options_preservecase = NULL; -static GtkWidget *checkbutton_options_forceint = NULL; -static GtkWidget *checkbutton_options_autoindex = NULL; -static GtkWidget *checkbutton_options_dbfonly = NULL; -static GtkWidget *checkbutton_options_dumpformat = NULL; -static GtkWidget *checkbutton_options_geography = NULL; +static GtkWidget *checkbutton_loader_options_preservecase = NULL; +static GtkWidget *checkbutton_loader_options_forceint = NULL; +static GtkWidget *checkbutton_loader_options_autoindex = NULL; +static GtkWidget *checkbutton_loader_options_dbfonly = NULL; +static GtkWidget *checkbutton_loader_options_dumpformat = NULL; +static GtkWidget *checkbutton_loader_options_geography = NULL; +static GtkWidget *checkbutton_loader_options_simplegeoms = NULL; + +/* Dumper options window */ +static GtkWidget *dialog_dumper_options = NULL; +static GtkWidget *checkbutton_dumper_options_includegid = NULL; +static GtkWidget *checkbutton_dumper_options_keep_fieldname_case = NULL; +static GtkWidget *checkbutton_dumper_options_unescapedattrs = NULL; + +/* About dialog */ +static GtkWidget *dialog_about = NULL; + +/* File chooser */ +static GtkWidget *dialog_filechooser = NULL; +static GtkWidget *dialog_folderchooser = NULL; + +/* Progress dialog */ +static GtkWidget *dialog_progress = NULL; +static GtkWidget *progress = NULL; +static GtkWidget *label_progress = NULL; + +/* Table chooser dialog */ +static GtkWidget *dialog_tablechooser = NULL; +GtkListStore *chooser_filtered_table_list_store; +GtkListStore *chooser_table_list_store; +GtkWidget *chooser_tree; +GtkCellRenderer *chooser_schema_renderer; +GtkCellRenderer *chooser_table_renderer; +GtkTreeViewColumn *chooser_schema_column; +GtkTreeViewColumn *chooser_table_column; +static GtkWidget *checkbutton_chooser_geoonly = NULL; + +/* Other items */ +static int valid_connection = 0; + +/* Constants for the list view etc. */ +enum +{ + IMPORT_POINTER_COLUMN, + IMPORT_FILENAME_COLUMN, + IMPORT_SCHEMA_COLUMN, + IMPORT_TABLE_COLUMN, + IMPORT_GEOMETRY_COLUMN, + IMPORT_SRID_COLUMN, + IMPORT_MODE_COLUMN, + IMPORT_REMOVE_COLUMN, + IMPORT_N_COLUMNS +}; + +enum +{ + LOADER_MODE_COMBO_TEXT, + LOADER_MODE_COMBO_OPTION_CHAR, + LOADER_MODE_COMBO_COLUMNS +}; + +enum +{ + CREATE_MODE, + APPEND_MODE, + DELETE_MODE, + PREPARE_MODE +}; + +enum +{ + EXPORT_POINTER_COLUMN, + EXPORT_SCHEMA_COLUMN, + EXPORT_TABLE_COLUMN, + EXPORT_GEOMETRY_COLUMN, + EXPORT_GEOMETRY_LISTSTORE_COLUMN, + EXPORT_FILENAME_COLUMN, + EXPORT_REMOVE_COLUMN, + EXPORT_N_COLUMNS +}; + +enum +{ + TABLECHOOSER_SCHEMA_COLUMN, + TABLECHOOSER_TABLE_COLUMN, + TABLECHOOSER_GEO_LISTSTORE_COLUMN, + TABLECHOOSER_GEO_COLUMN, + TABLECHOOSER_HASGEO_COLUMN, + TABLECHOOSER_N_COLUMNS +}; + +enum +{ + TABLECHOOSER_GEOCOL_COMBO_TEXT, + TABLECHOOSER_GEOCOL_COMBO_COLUMNS +}; /* Other */ static char *pgui_errmsg = NULL; static PGconn *pg_connection = NULL; -static SHPLOADERCONFIG *config = NULL; -static SHPLOADERSTATE *state = NULL; static SHPCONNECTIONCONFIG *conn = NULL; +static SHPLOADERCONFIG *global_loader_config = NULL; +static SHPDUMPERCONFIG *global_dumper_config = NULL; -static volatile int import_running = 0; +static volatile int is_running = FALSE; /* Local prototypes */ -static void pgui_create_options_dialogue(void); +static void pgui_sanitize_connection_string(char *connection_string); /* ** Write a message to the Import Log text area. */ -static void +void pgui_log_va(const char *fmt, va_list ap) { - GtkTextIter iter; char *msg; + GtkTextIter iter; if (!lw_vasprintf (&msg, fmt, ap)) return; @@ -85,7 +235,7 @@ gtk_text_buffer_insert(textbuffer_log, &iter, "\n", -1); gtk_text_view_scroll_to_iter(GTK_TEXT_VIEW(textview_log), &iter, 0.0, TRUE, 0.0, 1.0); - + /* Allow GTK to process events */ while (gtk_events_pending()) gtk_main_iteration(); @@ -109,14 +259,26 @@ return; } -static void -pgui_seterr(const char *errmsg) +/* Write an error message */ +void +pgui_seterr_va(const char *fmt, va_list ap) { - if ( pgui_errmsg ) - { + /* Free any existing message */ + if (pgui_errmsg) free(pgui_errmsg); - } - pgui_errmsg = strdup(errmsg); + + if (!lw_vasprintf (&pgui_errmsg, fmt, ap)) return; +} + +static void +pgui_seterr(const char *fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + + pgui_seterr_va(fmt, ap); + + va_end(ap); return; } @@ -127,192 +289,19 @@ gint result; label = gtk_label_new(pgui_errmsg); - dialog = gtk_dialog_new_with_buttons("Error", GTK_WINDOW(window_main), - GTK_DIALOG_MODAL & GTK_DIALOG_NO_SEPARATOR & GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); - gtk_dialog_set_has_separator ( GTK_DIALOG(dialog), FALSE ); - gtk_container_set_border_width (GTK_CONTAINER(dialog), 5); - gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), 15); - gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), label); - gtk_widget_show_all (dialog); + dialog = gtk_dialog_new_with_buttons(_("Error"), GTK_WINDOW(window_main), + GTK_DIALOG_MODAL & GTK_DIALOG_NO_SEPARATOR & GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); + gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE ); + gtk_container_set_border_width(GTK_CONTAINER(dialog), 5); + gtk_container_set_border_width(GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), 15); + gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), label); + gtk_widget_show_all(dialog); result = gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); return; } -/* Terminate the main loop and exit the application. */ -static void -pgui_quit (GtkWidget *widget, gpointer data) -{ - if ( pg_connection) PQfinish(pg_connection); - pg_connection = NULL; - gtk_main_quit (); -} - -/* Set the global config variables controlled by the options dialogue */ -static void -pgui_set_config_from_options_ui() -{ - const char *entry_encoding = gtk_entry_get_text(GTK_ENTRY(entry_options_encoding)); - gboolean preservecase = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkbutton_options_preservecase)); - gboolean forceint = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkbutton_options_forceint)); - gboolean createindex = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkbutton_options_autoindex)); - gboolean dbfonly = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkbutton_options_dbfonly)); - gboolean dumpformat = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkbutton_options_dumpformat)); - gboolean geography = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkbutton_options_geography)); - - if ( geography ) - { - config->geography = 1; - /* Flip the geometry column name to match the load type */ - if ( ! strcmp(gtk_entry_get_text(GTK_ENTRY(entry_config_geocolumn)), GEOMETRY_DEFAULT) ) - { - gtk_entry_set_text(GTK_ENTRY(entry_config_geocolumn), GEOGRAPHY_DEFAULT ); - free(config->geom); - config->geom = strdup(GEOGRAPHY_DEFAULT); - } - } - - /* Encoding */ - if ( entry_encoding && strlen(entry_encoding) > 0 ) - { - if (config->encoding) - free(config->encoding); - - config->encoding = strdup(entry_encoding); - } - - /* Preserve case */ - if ( preservecase ) - config->quoteidentifiers = 1; - else - config->quoteidentifiers = 0; - - /* No long integers in table */ - if ( forceint ) - config->forceint4 = 1; - else - config->forceint4 = 0; - - /* Create spatial index after load */ - if ( createindex ) - config->createindex = 1; - else - config->createindex = 0; - - /* Don't read the .shp file, just the .dbf */ - if ( dbfonly ) - { - config->readshape = 0; - /* There will be no spatial column so don't create a spatial index */ - config->createindex = 0; - } - else - config->readshape = 1; - - /* Use COPY rather than INSERT format */ - if ( dumpformat ) - config->dump_format = 1; - else - config->dump_format = 0; - - return; -} - -/* Set the global configuration based upon the current UI */ -static void -pgui_set_config_from_ui() -{ - const char *pg_table = gtk_entry_get_text(GTK_ENTRY(entry_config_table)); - const char *pg_schema = gtk_entry_get_text(GTK_ENTRY(entry_config_schema)); - const char *pg_geom = gtk_entry_get_text(GTK_ENTRY(entry_config_geocolumn)); - const char *source_file = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(file_chooser_button_shape)); - const char *entry_srid = gtk_entry_get_text(GTK_ENTRY(entry_config_srid)); - - char *c; - - /* Set the destination schema, table and column parameters */ - if (config->table) - free(config->table); - - config->table = strdup(pg_table); - - if (config->schema) - free(config->schema); - - if (strlen(pg_schema) == 0) - config->schema = strdup("public"); - else - config->schema = strdup(pg_schema); - - if (strlen(pg_geom) == 0) - config->geom = strdup(GEOMETRY_DEFAULT); - else - config->geom = strdup(pg_geom); - - /* Set the destination filename: note the shp2pgsql core engine simply wants the file - without the .shp extension */ - if (config->shp_file) - free(config->shp_file); - - /* Handle empty selection */ - if (source_file == NULL) - config->shp_file = strdup(""); - else - config->shp_file = strdup(source_file); - - /* NULL-terminate the file name before the .shp extension */ - for (c = config->shp_file + strlen(config->shp_file); c >= config->shp_file; c--) - { - if (*c == '.') - { - *c = '\0'; - break; - } - } - - /* SRID */ - if ( ! ( config->sr_id = atoi(entry_srid) ) ) - { - config->sr_id = -1; - } - - - return; -} - -/* Validate the configuration, returning true or false */ -static int -pgui_validate_config() -{ - /* Validate table parameters */ - if ( ! config->table || strlen(config->table) == 0 ) - { - pgui_seterr("Fill in the destination table."); - return 0; - } - - if ( ! config->schema || strlen(config->schema) == 0 ) - { - pgui_seterr("Fill in the destination schema."); - return 0; - } - - if ( ! config->geom || strlen(config->geom) == 0 ) - { - pgui_seterr("Fill in the destination column."); - return 0; - } - - if ( ! config->shp_file || strlen(config->shp_file) == 0 ) - { - pgui_seterr("Select a shape file to import."); - return 0; - } - - return 1; -} - /* ** Run a SQL command against the current connection. */ @@ -434,105 +423,58 @@ return 1; } -static char * -pgui_read_connection(void) -{ - const char *pg_host = gtk_entry_get_text(GTK_ENTRY(entry_pg_host)); - const char *pg_port = gtk_entry_get_text(GTK_ENTRY(entry_pg_port)); - const char *pg_user = gtk_entry_get_text(GTK_ENTRY(entry_pg_user)); - const char *pg_pass = gtk_entry_get_text(GTK_ENTRY(entry_pg_pass)); - const char *pg_db = gtk_entry_get_text(GTK_ENTRY(entry_pg_db)); - char *connection_string = NULL; - char *escape_pg_pass = NULL; - - stringbuffer_t *sb = stringbuffer_create(); - - /* Read the host */ - if ( pg_host && strlen(pg_host) > 0 ) - { - vasbappend(sb, "host=%s ", pg_host); - } - - /* Read the port */ - if ( pg_port && strlen(pg_port) > 0 ) - { - if ( ! atoi(pg_port) ) - { - pgui_seterr("Server port must be a number."); - stringbuffer_destroy(sb); - return NULL; - } - vasbappend(sb, "port=%s ", pg_port); - } - - /* Read the user name */ - if ( pg_user && strlen(pg_user) > 0 ) - { - vasbappend(sb, "user=%s ", pg_user); - } - - /* Read the database name */ - if ( pg_db && strlen(pg_db) > 0 ) - { - vasbappend(sb, "dbname=%s ", pg_db); - } - - /* Read the password */ - if ( pg_pass && strlen(pg_pass) > 0 ) - { - /* Escape the password in case it contains any special characters */ - escape_pg_pass = escape_connection_string((char *)pg_pass); - vasbappend(sb, "password='%s' ", escape_pg_pass); - - /* Free the escaped version */ - if (escape_pg_pass != pg_pass) - free(escape_pg_pass); - } - - /* Return the connection string */ - connection_string = strdup(stringbuffer_getstring(sb)); - stringbuffer_destroy(sb); - return connection_string; -} - -static void -pgui_action_cancel(GtkWidget *widget, gpointer data) -{ - if (!import_running) - pgui_quit(widget, data); /* quit if we're not running */ - else - import_running = FALSE; -} - +/* + * Ensures that the filename field width is within the stated bounds, and + * 'appropriately' sized, for some definition of 'appropriately'. + */ static void -pgui_sanitize_connection_string(char *connection_string) +update_filename_field_width(void) { - char *ptr = strstr(connection_string, "password"); - if ( ptr ) - { - ptr += 10; - while ( *ptr != '\'' && *ptr != '\0' ) - { - /* If we find a \, hide both it and the next character */ - if ( *ptr == '\\' ) - *ptr++ = '*'; + GtkTreeIter iter; + gboolean is_valid; + gchar *filename; + int max_width; + + /* Loop through the list store to find the maximum length of an entry */ + max_width = 0; + is_valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(import_file_list_store), &iter); + while (is_valid) + { + /* Grab the length of the filename entry in characters */ + gtk_tree_model_get(GTK_TREE_MODEL(import_file_list_store), &iter, IMPORT_FILENAME_COLUMN, &filename, -1); + if (strlen(filename) > max_width) + max_width = strlen(filename); - *ptr++ = '*'; - } + /* Get next entry */ + is_valid = gtk_tree_model_iter_next(GTK_TREE_MODEL(import_file_list_store), &iter); } + + /* Note the layout manager will handle the minimum size for us; we just need to be concerned with + making sure we don't exceed a maximum limit */ + if (max_width > SHAPEFIELDMAXWIDTH) + g_object_set(import_filename_renderer, "width-chars", SHAPEFIELDMAXWIDTH, NULL); + else + g_object_set(import_filename_renderer, "width-chars", -1, NULL); + return; } -static void -pgui_action_connection_test(GtkWidget *widget, gpointer data) +/* + * This will create a connection to the database, just to see if it can. + * It cleans up after itself like a good little function and maintains + * the status of the valid_connection parameter. + */ +static int +connection_test(void) { char *connection_string = NULL; char *connection_sanitized = NULL; - if ( ! (connection_string = pgui_read_connection()) ) + if (!(connection_string = ShpDumperGetConnectionStringFromConn(conn))) { pgui_raise_error_dialogue(); - return; + valid_connection = 0; + return 0; } connection_sanitized = strdup(connection_string); @@ -540,660 +482,2917 @@ pgui_logf("Connecting: %s", connection_sanitized); free(connection_sanitized); - if ( pg_connection ) - PQfinish(pg_connection); - pg_connection = PQconnectdb(connection_string); if (PQstatus(pg_connection) == CONNECTION_BAD) { - pgui_logf( "Connection failed: %s", PQerrorMessage(pg_connection)); - gtk_label_set_text(GTK_LABEL(label_pg_connection_test), "Connection failed."); + pgui_logf( _("Database connection failed: %s"), PQerrorMessage(pg_connection)); free(connection_string); PQfinish(pg_connection); pg_connection = NULL; - return; + valid_connection = 0; + return 0; } - gtk_label_set_text(GTK_LABEL(label_pg_connection_test), "Connection succeeded."); - pgui_logf( "Connection succeeded." ); - gtk_widget_show(label_pg_connection_test); PQfinish(pg_connection); pg_connection = NULL; free(connection_string); - return; + valid_connection = 1; + return 1; } -static void -pgui_action_options_open(GtkWidget *widget, gpointer data) + +/* === Generic window functions === */ + +/* Delete event handler for popups that simply returns TRUE to prevent GTK from + destroying the window and then hides it manually */ +static gint +pgui_event_popup_delete(GtkWidget *widget, GdkEvent *event, gpointer data) { - pgui_create_options_dialogue(); - return; + gtk_widget_hide(GTK_WIDGET(widget)); + return TRUE; } +/* === Progress window functions === */ + static void -pgui_action_options_close(GtkWidget *widget, gpointer data) +pgui_action_progress_cancel(GtkDialog *dialog, gint response_id, gpointer user_data) { - pgui_set_config_from_options_ui(); - gtk_widget_destroy(widget); + /* Stop the current import */ + is_running = FALSE; + return; } -static void -pgui_action_shape_file_set(GtkWidget *widget, gpointer data) +static gint +pgui_action_progress_delete(GtkWidget *widget, GdkEvent *event, gpointer data) { - char *shp_file; - int shp_file_len; - char *table_start; - char *table_end; - char *table; - const char *gtk_filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(widget)); + /* Stop the current import */ + is_running = FALSE; + + return TRUE; +} - if ( gtk_filename ) + +/* === Loader option Window functions === */ + +/* Update the specified SHPLOADERCONFIG with the global settings from the Options dialog */ +static void +update_loader_config_globals_from_options_ui(SHPLOADERCONFIG *config) +{ + const char *entry_encoding = gtk_entry_get_text(GTK_ENTRY(entry_options_encoding)); + gboolean preservecase = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkbutton_loader_options_preservecase)); + gboolean forceint = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkbutton_loader_options_forceint)); + gboolean createindex = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkbutton_loader_options_autoindex)); + gboolean dbfonly = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkbutton_loader_options_dbfonly)); + gboolean dumpformat = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkbutton_loader_options_dumpformat)); + gboolean geography = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkbutton_loader_options_geography)); + gboolean simplegeoms = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkbutton_loader_options_simplegeoms)); + + if (geography) { - shp_file = strdup(gtk_filename); - shp_file_len = strlen(shp_file); + config->geography = 1; + + if (config->geo_col) + free(config->geo_col); + + config->geo_col = strdup(GEOGRAPHY_DEFAULT); } else { - return; - } + config->geography = 0; - /* Roll back from end to first slash character. */ - table_start = shp_file + shp_file_len; - while ( *table_start != '/' && *table_start != '\\' && table_start > shp_file) - { - table_start--; + if (config->geo_col) + free(config->geo_col); + + config->geo_col = strdup(GEOMETRY_DEFAULT); } - table_start++; /* Forward one to start of actual characters. */ - /* Roll back from end to first . character. */ - table_end = shp_file + shp_file_len; - while ( *table_end != '.' && table_end > shp_file && table_end > table_start ) + /* Encoding */ + if (entry_encoding && strlen(entry_encoding) > 0) { - table_end--; - } + if (config->encoding) + free(config->encoding); - /* Copy the table name into a fresh memory slot. */ - table = malloc(table_end - table_start + 1); - memcpy(table, table_start, table_end - table_start); - table[table_end - table_start] = '\0'; + config->encoding = strdup(entry_encoding); + } - /* Set the table name into the configuration */ - config->table = table; + /* Preserve case */ + if (preservecase) + config->quoteidentifiers = 1; + else + config->quoteidentifiers = 0; - gtk_entry_set_text(GTK_ENTRY(entry_config_table), table); + /* No long integers in table */ + if (forceint) + config->forceint4 = 1; + else + config->forceint4 = 0; - free(shp_file); -} + /* Create spatial index after load */ + if (createindex) + config->createindex = 1; + else + config->createindex = 0; -static void -pgui_action_import(GtkWidget *widget, gpointer data) -{ - char *connection_string = NULL; - char *connection_sanitized = NULL; - char *dest_string = NULL; - int ret, record_count = 0, i = 0, progress_bar_update_frequency = 1; - char *header, *footer, *record; + /* Read the .shp file, don't ignore it */ + if (dbfonly) + { + config->readshape = 0; + + /* There will be no spatial column so don't create a spatial index */ + config->createindex = 0; + } + else + config->readshape = 1; + + /* Use COPY rather than INSERT format */ + if (dumpformat) + config->dump_format = 1; + else + config->dump_format = 0; + + /* Simple geometries only */ + if (simplegeoms) + config->simple_geometries = 1; + else + config->simple_geometries = 0; + + return; +} + +/* Update the loader options dialog with the current values from the global config */ +static void +update_options_ui_from_loader_config_globals(void) +{ + gtk_entry_set_text(GTK_ENTRY(entry_options_encoding), global_loader_config->encoding); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton_loader_options_preservecase), global_loader_config->quoteidentifiers ? TRUE : FALSE); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton_loader_options_forceint), global_loader_config->forceint4 ? TRUE : FALSE); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton_loader_options_autoindex), global_loader_config->createindex ? TRUE : FALSE); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton_loader_options_dbfonly), global_loader_config->readshape ? FALSE : TRUE); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton_loader_options_dumpformat), global_loader_config->dump_format ? TRUE : FALSE); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton_loader_options_geography), global_loader_config->geography ? TRUE : FALSE); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton_loader_options_simplegeoms), global_loader_config->simple_geometries ? TRUE : FALSE); + + return; +} + +/* Set the global config variables controlled by the options dialogue */ +static void +pgui_set_loader_configs_from_options_ui() +{ + GtkTreeIter iter; + gboolean is_valid; + gpointer gptr; + SHPLOADERCONFIG *loader_file_config; + + /* First update the global (template) configuration */ + update_loader_config_globals_from_options_ui(global_loader_config); + + /* Now also update the same settings for any existing files already added. We + do this by looping through all entries and updating their config too. */ + is_valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(import_file_list_store), &iter); + while (is_valid) + { + /* Get the SHPLOADERCONFIG for this file entry */ + gtk_tree_model_get(GTK_TREE_MODEL(import_file_list_store), &iter, IMPORT_POINTER_COLUMN, &gptr, -1); + loader_file_config = (SHPLOADERCONFIG *)gptr; + + /* Update it */ + update_loader_config_globals_from_options_ui(loader_file_config); + + /* Get next entry */ + is_valid = gtk_tree_model_iter_next(GTK_TREE_MODEL(import_file_list_store), &iter); + } + + return; +} + + +/* === Table selection dialog functions === */ + +/* Load the model with information from the database */ +static void +update_table_chooser_from_database() +{ + PGresult *result, *geocol_result; + GtkTreeIter iter, geocol_iter; + GtkListStore *dumper_geocol_combo_list; + char *connection_string, *sql_form, *query, *schema, *table, *geocol_query, *geocol_name; + int hasgeo, i, j; + + /* Open a connection to the database */ + connection_string = ShpDumperGetConnectionStringFromConn(conn); + pg_connection = PQconnectdb(connection_string); + + /* Here we find a list of all tables/views that not in a pg_* schema (or information_schema) and + we return the schema name, table name and whether or not the table/view contains any geo + columns */ + query = "SELECT tableoids.oid, n.nspname, tableoids.relname, COALESCE((SELECT 1 from pg_attribute WHERE attrelid = tableoids.oid AND atttypid IN (SELECT oid FROM pg_type WHERE typname in ('geometry', 'geography')) LIMIT 1), 0) hasgeo FROM (SELECT c.oid, c.relname, c.relnamespace FROM pg_class c WHERE c.relkind IN ('r', 'v') AND c.relnamespace IN (SELECT oid FROM pg_namespace WHERE nspname NOT ILIKE 'pg_%' AND nspname <> 'information_schema')) tableoids, pg_namespace n WHERE tableoids.relnamespace = n.oid ORDER BY n.nspname, tableoids.relname"; + + result = PQexec(pg_connection, query); + + /* Free any existing entries in the model */ + gtk_list_store_clear(chooser_table_list_store); + + /* Now insert one row for each query result */ + for (i = 0; i < PQntuples(result); i++) + { + gtk_list_store_insert_before(chooser_table_list_store, &iter, NULL); + + /* Look up the geo columns; if there are none then we set the field to (None). If we have just one + column then we set the column name directly. If we have more than one then we create a combo + dropdown containing the column names */ + schema = PQgetvalue(result, i, PQfnumber(result, "nspname")); + table = PQgetvalue(result, i, PQfnumber(result, "relname")); + + sql_form = "SELECT n.nspname, c.relname, a.attname FROM pg_class c, pg_namespace n, pg_attribute a WHERE c.relnamespace = n.oid AND n.nspname = '%s' AND c.relname = '%s' AND a.attrelid = c.oid AND a.atttypid IN (SELECT oid FROM pg_type WHERE typname in ('geometry', 'geography'))"; + + geocol_query = malloc(strlen(sql_form) + strlen(schema) + strlen(table) + 1); + sprintf(geocol_query, sql_form, schema, table); + + geocol_result = PQexec(pg_connection, geocol_query); + + /* Create a combo list loaded with the column names. Note that while we create the model and load + the data here, we don't actually display the geo column in this dialog. Instead we build the + list here so that we can pass to the export table list store when creating a new entry. This + is to ensure that the export table list model can directly represent a SHPDUMPERCONFIG. */ + dumper_geocol_combo_list = gtk_list_store_new(TABLECHOOSER_GEOCOL_COMBO_COLUMNS, G_TYPE_STRING); + + if (PQntuples(geocol_result) > 0) + { + /* Load the columns into the list store */ + for (j = 0; j < PQntuples(geocol_result); j++) + { + geocol_name = PQgetvalue(geocol_result, j, PQfnumber(geocol_result, "attname")); + + gtk_list_store_insert_before(dumper_geocol_combo_list, &geocol_iter, TABLECHOOSER_GEOCOL_COMBO_TEXT); + gtk_list_store_set(dumper_geocol_combo_list, &geocol_iter, + TABLECHOOSER_GEOCOL_COMBO_TEXT, geocol_name, + -1); + } + } + else + { + /* Add a "default" entry */ + geocol_name = NULL; + + gtk_list_store_insert_before(dumper_geocol_combo_list, &geocol_iter, TABLECHOOSER_GEOCOL_COMBO_TEXT); + gtk_list_store_set(dumper_geocol_combo_list, &geocol_iter, + TABLECHOOSER_GEOCOL_COMBO_TEXT, _("(None)"), + -1); + } + + /* Free the query result */ + PQclear(geocol_result); + + /* Free the query string */ + free(geocol_query); + + /* Set the list store data */ + hasgeo = atoi(PQgetvalue(result, i, PQfnumber(result, "hasgeo"))); + gtk_list_store_set(chooser_table_list_store, &iter, + TABLECHOOSER_SCHEMA_COLUMN, schema, + TABLECHOOSER_TABLE_COLUMN, table, + TABLECHOOSER_GEO_LISTSTORE_COLUMN, dumper_geocol_combo_list, + TABLECHOOSER_GEO_COLUMN, geocol_name, + TABLECHOOSER_HASGEO_COLUMN, hasgeo, + -1); + } + + /* Clear up the result set */ + PQclear(result); + + /* Close the existing connection */ + PQfinish(pg_connection); + pg_connection = NULL; + + return; +} + +/* GtkTreeModelFilter visibility function */ +static gboolean +table_chooser_visibility_func(GtkTreeModel *model, GtkTreeIter *iter, gpointer data) +{ + /* First determine whether the hasgeo tickbox is selected or not */ + gboolean geoonly = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkbutton_chooser_geoonly)); + int hasgeo; + + /* If unticked then we show all tables */ + if (!geoonly) + return TRUE; + else + { + /* Otherwise we only show the tables with geo columns */ + gtk_tree_model_get(GTK_TREE_MODEL(model), iter, TABLECHOOSER_HASGEO_COLUMN, &hasgeo, -1); + if (hasgeo) + return TRUE; + else + return FALSE; + } + + return FALSE; +} + +/* === Dumper option Window functions === */ + +/* Update the specified SHPDUMPERCONFIG with the global settings from the Options dialog */ +static void +update_dumper_config_globals_from_options_ui(SHPDUMPERCONFIG *config) +{ + gboolean includegid = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkbutton_dumper_options_includegid)); + gboolean keep_fieldname_case = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkbutton_dumper_options_keep_fieldname_case)); + gboolean unescapedattrs = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkbutton_dumper_options_unescapedattrs)); + + /* Include gid or not */ + if (includegid) + config->includegid = 1; + else + config->includegid = 0; + + /* Keep fieldname case */ + if (keep_fieldname_case) + config->keep_fieldname_case = 1; + else + config->keep_fieldname_case = 0; + + /* Escape column names or not */ + if (unescapedattrs) + config->unescapedattrs = 1; + else + config->unescapedattrs = 0; + + return; +} + +/* Update the options dialog with the current values from the global config */ +static void +update_options_ui_from_dumper_config_globals(void) +{ + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton_dumper_options_includegid), global_dumper_config->includegid ? TRUE : FALSE); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton_dumper_options_keep_fieldname_case), global_dumper_config->keep_fieldname_case ? TRUE : FALSE); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton_dumper_options_unescapedattrs), global_dumper_config->unescapedattrs ? TRUE : FALSE); + + return; +} + +/* Set the global config variables controlled by the options dialogue */ +static void +pgui_set_dumper_configs_from_options_ui() +{ + GtkTreeIter iter; + gboolean is_valid; + gpointer gptr; + SHPDUMPERCONFIG *dumper_table_config; + + /* First update the global (template) configuration */ + update_dumper_config_globals_from_options_ui(global_dumper_config); + + /* Now also update the same settings for any existing tables already added. We + do this by looping through all entries and updating their config too. */ + is_valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(export_table_list_store), &iter); + while (is_valid) + { + /* Get the SHPDUMPERCONFIG for this file entry */ + gtk_tree_model_get(GTK_TREE_MODEL(export_table_list_store), &iter, EXPORT_POINTER_COLUMN, &gptr, -1); + dumper_table_config = (SHPDUMPERCONFIG *)gptr; + + /* Update it */ + update_dumper_config_globals_from_options_ui(dumper_table_config); + + /* Get next entry */ + is_valid = gtk_tree_model_iter_next(GTK_TREE_MODEL(export_table_list_store), &iter); + } + + return; +} + +/* Signal handler for ticking/unticking the "only show geo columns" box */ +static void +pgui_action_chooser_toggle_show_geocolumn(GtkToggleButton *togglebutton, gpointer user_data) +{ + /* Simply update the listview filter */ + gtk_tree_model_filter_refilter(GTK_TREE_MODEL_FILTER(chooser_filtered_table_list_store)); + + return; +} + +static void +pgui_action_dumper_options_open(GtkWidget *widget, gpointer data) +{ + update_options_ui_from_dumper_config_globals(); + gtk_widget_show_all(dialog_dumper_options); + return; +} + +static void +pgui_action_dumper_options_close(GtkWidget *widget, gint response, gpointer data) +{ + /* Only update the configuration if the user hit OK */ + if (response == GTK_RESPONSE_OK) + pgui_set_dumper_configs_from_options_ui(); + + /* Hide the dialog */ + gtk_widget_hide(dialog_dumper_options); + + return; +} + +/* === Main window functions === */ + +/* Given a filename, generate a new loader configuration */ +static SHPLOADERCONFIG * +create_new_file_config(const char *filename) +{ + SHPLOADERCONFIG *loader_file_config; + char *table_start, *table_end; + int i; + + /* Generate a new configuration by copying the global options first and then + adding in the specific values for this file */ + loader_file_config = malloc(sizeof(SHPLOADERCONFIG)); + memcpy(loader_file_config, global_loader_config, sizeof(SHPLOADERCONFIG)); + + /* Note: we must copy the encoding here since it is the only pass-by-reference + type set in set_loader_config_defaults() and each config needs its own copy + of any referenced items */ + loader_file_config->encoding = strdup(global_loader_config->encoding); + + /* Copy the filename (we'll remove the .shp extension in a sec) */ + loader_file_config->shp_file = strdup(filename); + + /* Generate the default table name from the filename */ + table_start = loader_file_config->shp_file + strlen(loader_file_config->shp_file); + while (*table_start != '/' && *table_start != '\\' && table_start > loader_file_config->shp_file) + table_start--; + + /* Forward one to start of actual characters */ + table_start++; + + /* Roll back from end to first . character. */ + table_end = loader_file_config->shp_file + strlen(loader_file_config->shp_file); + while (*table_end != '.' && table_end > loader_file_config->shp_file && table_end > table_start ) + table_end--; + + /* Sneakily remove .shp from shp_file */ + *table_end = '\0'; + + /* Copy the table name */ + loader_file_config->table = malloc(table_end - table_start + 1); + memcpy(loader_file_config->table, table_start, table_end - table_start); + loader_file_config->table[table_end - table_start] = '\0'; + + /* Force the table name to lower case */ + for (i = 0; i < table_end - table_start; i++) + { + if (isupper(loader_file_config->table[i]) != 0) + loader_file_config->table[i] = tolower(loader_file_config->table[i]); + } + + /* Set the default schema to public */ + loader_file_config->schema = strdup("public"); + + /* Set the default geo column name */ + if (global_loader_config->geography) + loader_file_config->geo_col = strdup(GEOGRAPHY_DEFAULT); + else + loader_file_config->geo_col = strdup(GEOMETRY_DEFAULT); + + return loader_file_config; +} + +/* Given the loader configuration, add a new row representing this file to the listview */ +static void +add_loader_file_config_to_list(SHPLOADERCONFIG *loader_file_config) +{ + GtkTreeIter iter; + char *srid; + + /* Convert SRID into string */ + lw_asprintf(&srid, "%d", loader_file_config->sr_id); + + gtk_list_store_insert_before(import_file_list_store, &iter, NULL); + gtk_list_store_set(import_file_list_store, &iter, + IMPORT_POINTER_COLUMN, loader_file_config, + IMPORT_FILENAME_COLUMN, loader_file_config->shp_file, + IMPORT_SCHEMA_COLUMN, loader_file_config->schema, + IMPORT_TABLE_COLUMN, loader_file_config->table, + IMPORT_GEOMETRY_COLUMN, loader_file_config->geo_col, + IMPORT_SRID_COLUMN, srid, + IMPORT_MODE_COLUMN, _("Create"), + -1); + + /* Update the filename field width */ + update_filename_field_width(); + + return; +} + +/* Free up the specified SHPLOADERCONFIG */ +static void +free_loader_config(SHPLOADERCONFIG *config) +{ + + if (config->table) + free(config->table); + + if (config->schema) + free(config->schema); + + if (config->geo_col) + free(config->geo_col); + + if (config->shp_file) + free(config->shp_file); + + if (config->encoding) + free(config->encoding); + + if (config->tablespace) + free(config->tablespace); + + if (config->idxtablespace) + free(config->idxtablespace); + + /* Free the config itself */ + free(config); +} + +/* Given a table selection, generate a new configuration */ +static SHPDUMPERCONFIG * +create_new_table_config(GtkTreeIter *iter) +{ + SHPDUMPERCONFIG *dumper_table_config; + gchar *schema, *table, *geocol; + gint hasgeo; + + /* Generate a new configuration by copying the global options first and then + adding in the specific values for this table */ + dumper_table_config = malloc(sizeof(SHPDUMPERCONFIG)); + memcpy(dumper_table_config, global_dumper_config, sizeof(SHPDUMPERCONFIG)); + + /* Grab the values from the current iter */ + gtk_tree_model_get(GTK_TREE_MODEL(chooser_filtered_table_list_store), iter, + TABLECHOOSER_SCHEMA_COLUMN, &schema, + TABLECHOOSER_TABLE_COLUMN, &table, + TABLECHOOSER_GEO_COLUMN, &geocol, + TABLECHOOSER_HASGEO_COLUMN, &hasgeo, + -1); + + /* Set up the values in the SHPDUMPERCONFIG */ + dumper_table_config->schema = strdup(schema); + dumper_table_config->table = strdup(table); + + /* We also set the filename the same as the table name */ + dumper_table_config->shp_file = strdup(table); + + if (hasgeo && geocol) + dumper_table_config->geo_col_name = strdup(geocol); + else + dumper_table_config->geo_col_name = NULL; + + return dumper_table_config; +} + +/* Given the dumper configuration, add a new row representing this file to the listview. The liststore and iter arguments +are optional, and enable the user to specify additional information to the view, e.g. geo column multi-choice. */ +static void +add_dumper_table_config_to_list(SHPDUMPERCONFIG *dumper_table_config, GtkListStore *chooser_liststore, GtkTreeIter *chooser_iter) +{ + GtkTreeIter iter; + GtkListStore *geocol_liststore; + + gtk_list_store_insert_before(export_table_list_store, &iter, NULL); + gtk_list_store_set(export_table_list_store, &iter, + EXPORT_POINTER_COLUMN, dumper_table_config, + EXPORT_SCHEMA_COLUMN, dumper_table_config->schema, + EXPORT_TABLE_COLUMN, dumper_table_config->table, + EXPORT_GEOMETRY_COLUMN, dumper_table_config->geo_col_name, + EXPORT_FILENAME_COLUMN, dumper_table_config->shp_file, + -1); + + /* If we have supplied the table_chooser store for additional information, use it */ + if (chooser_liststore) + { + /* Let's add a multi-choice geometry column to the table */ + gtk_tree_model_get(GTK_TREE_MODEL(chooser_liststore), chooser_iter, + TABLECHOOSER_GEO_LISTSTORE_COLUMN, &geocol_liststore, + -1); + + gtk_list_store_set(export_table_list_store, &iter, + EXPORT_GEOMETRY_LISTSTORE_COLUMN, geocol_liststore, + -1); + } + + return; +} + +/* Free up the specified SHPDUMPERCONFIG */ +static void +free_dumper_config(SHPDUMPERCONFIG *config) +{ + + if (config->table) + free(config->table); + + if (config->schema) + free(config->schema); + + if (config->geo_col_name) + free(config->geo_col_name); + + if (config->shp_file) + free(config->shp_file); + + /* Free the config itself */ + free(config); +} + +/* Validate a single DBF column type against a PostgreSQL type: return either TRUE or FALSE depending + upon whether or not the type is (broadly) compatible */ +static int +validate_shape_column_against_pg_column(int dbf_fieldtype, char *pg_fieldtype) +{ + switch (dbf_fieldtype) + { + case FTString: + /* Only varchar */ + if (!strcmp(pg_fieldtype, "varchar")) + return -1; + break; + + case FTDate: + /* Only date */ + if (!strcmp(pg_fieldtype, "date")) + return -1; + break; + + case FTInteger: + /* Tentatively allow int2, int4 and numeric */ + if (!strcmp(pg_fieldtype, "int2") || !strcmp(pg_fieldtype, "int4") || !strcmp(pg_fieldtype, "numeric")) + return -1; + break; + + case FTDouble: + /* Only float8/numeric */ + if (!strcmp(pg_fieldtype, "float8") || !strcmp(pg_fieldtype, "numeric")) + return -1; + break; + + case FTLogical: + /* Only boolean */ + if (!strcmp(pg_fieldtype, "boolean")) + return -1; + break; + } + + /* Otherwise we can't guarantee this (but this is just a warning anyway) */ + return 0; +} + +/* Validate column compatibility for the given loader configuration against the table/column + list returned in result */ +static int +validate_remote_loader_columns(SHPLOADERCONFIG *config, PGresult *result) +{ + ExecStatusType status; + SHPLOADERSTATE *state; + int ntuples; + char *pg_fieldname, *pg_fieldtype; + int ret, i, j, found, response = SHPLOADEROK; + + /* Check the status of the result set */ + status = PQresultStatus(result); + if (status == PGRES_TUPLES_OK) + { + ntuples = PQntuples(result); + + switch (config->opt) + { + case 'c': + /* If we have a row matching the table given in the config, then it already exists */ + if (ntuples > 0) + { + pgui_seterr(_("ERROR: Create mode selected for existing table: %s.%s"), config->schema, config->table); + response = SHPLOADERERR; + } + break; + + case 'p': + /* If we have a row matching the table given in the config, then it already exists */ + if (ntuples > 0) + { + pgui_seterr(_("ERROR: Prepare mode selected for existing table: %s.%s"), config->schema, config->table); + response = SHPLOADERERR; + } + break; + + case 'a': + /* If we are trying to append to a table but it doesn't exist, emit a warning */ + if (ntuples == 0) + { + pgui_seterr(_("ERROR: Destination table %s.%s could not be found for appending"), config->schema, config->table); + response = SHPLOADERERR; + } + else + { + /* If we have a row then lets do some simple column validation... */ + state = ShpLoaderCreate(config); + ret = ShpLoaderOpenShape(state); + if (ret != SHPLOADEROK) + { + pgui_logf(_("Warning: Could not load shapefile %s"), config->shp_file); + ShpLoaderDestroy(state); + } + + /* Find each column based upon its name and then validate type separately... */ + for (i = 0; i < state->num_fields; i++) + { + /* Make sure we find a column */ + found = 0; + for (j = 0; j < ntuples; j++) + { + pg_fieldname = PQgetvalue(result, j, PQfnumber(result, "field")); + pg_fieldtype = PQgetvalue(result, j, PQfnumber(result, "type")); + + if (!strcmp(state->field_names[i], pg_fieldname)) + { + found = -1; + + ret = validate_shape_column_against_pg_column(state->types[i], pg_fieldtype); + if (!ret) + { + pgui_logf(_("Warning: DBF Field '%s' is not compatible with PostgreSQL column '%s' in %s.%s"), state->field_names[i], pg_fieldname, config->schema, config->table); + response = SHPLOADERWARN; + } + } + } + + /* Flag a warning if we can't find a match */ + if (!found) + { + pgui_logf(_("Warning: DBF Field '%s' within file %s could not be matched to a column within table %s.%s"), + state->field_names[i], config->shp_file, config->schema, config->table); + response = SHPLOADERWARN; + } + } + + ShpLoaderDestroy(state); + } + + break; + } + } + else + { + pgui_seterr(_("ERROR: unable to process validation response from remote server")); + response = SHPLOADERERR; + } + + return response; +} + +/* Terminate the main loop and exit the application. */ +static void +pgui_quit (GtkWidget *widget, gpointer data) +{ + gtk_main_quit(); +} + +static void +pgui_action_about_open() +{ + /* Display the dialog and hide it again upon exit */ + gtk_dialog_run(GTK_DIALOG(dialog_about)); + gtk_widget_hide(dialog_about); +} + +static void +pgui_action_cancel(GtkWidget *widget, gpointer data) +{ + if (!is_running) + pgui_quit(widget, data); /* quit if we're not running */ + else + is_running = FALSE; +} + +static void +pgui_action_loader_options_open(GtkWidget *widget, gpointer data) +{ + update_options_ui_from_loader_config_globals(); + gtk_widget_show_all(dialog_loader_options); + return; +} + +static void +pgui_action_loader_options_close(GtkWidget *widget, gint response, gpointer data) +{ + /* Only update the configuration if the user hit OK */ + if (response == GTK_RESPONSE_OK) + pgui_set_loader_configs_from_options_ui(); + + /* Hide the dialog */ + gtk_widget_hide(dialog_loader_options); + + return; +} + +static void +pgui_action_open_file_dialog(GtkWidget *widget, gpointer data) +{ + SHPLOADERCONFIG *loader_file_config; + GSList *filename_list, *filename_item; + gchar *filename; + + /* Make sure we deselect any files from the last time */ + gtk_file_chooser_unselect_all(GTK_FILE_CHOOSER(dialog_filechooser)); + + /* Run the dialog */ + if (gtk_dialog_run(GTK_DIALOG(dialog_filechooser)) == GTK_RESPONSE_ACCEPT) + { + /* Create the new file configuration based upon the each filename and add it to the listview */ + filename_list = gtk_file_chooser_get_filenames(GTK_FILE_CHOOSER(dialog_filechooser)); + + filename_item = g_slist_nth(filename_list, 0); + while (filename_item) + { + /* Add the configuration */ + filename = g_slist_nth_data(filename_item, 0); + + loader_file_config = create_new_file_config(filename); + add_loader_file_config_to_list(loader_file_config); + + /* Grab the next filename */ + filename_item = g_slist_next(filename_item); + } + + /* Free the list */ + g_slist_free(filename_list); + } + + gtk_widget_hide(dialog_filechooser); +} + +static void +pgui_action_open_table_dialog(GtkWidget *widget, gpointer data) +{ + SHPDUMPERCONFIG *dumper_table_config; + GtkTreeSelection *chooser_selection; + GtkTreeModel *model; + GList *selected_rows_list, *selected_row; + GtkTreeIter iter; + GtkTreePath *tree_path; + + /* Make sure we can connect to the database first */ + if (!connection_test()) + { + pgui_seterr(_("Unable to connect to the database - please check your connection settings")); + pgui_raise_error_dialogue(); + + /* Open the connections UI for the user */ + update_conn_ui_from_conn_config(); + + gtk_widget_show_all(GTK_WIDGET(window_conn)); + return; + } + + /* Setup the form */ + update_table_chooser_from_database(); + gtk_tree_model_filter_refilter(GTK_TREE_MODEL_FILTER(chooser_filtered_table_list_store)); + + /* Run the dialog */ + gtk_widget_show_all(dialog_tablechooser); + if (gtk_dialog_run(GTK_DIALOG(dialog_tablechooser)) == GTK_RESPONSE_OK) + { + /* Create the new dumper configuration based upon the selected iters and add them to the listview */ + chooser_selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(chooser_tree)); + + selected_rows_list = gtk_tree_selection_get_selected_rows(chooser_selection, &model); + selected_row = g_list_first(selected_rows_list); + while (selected_row) + { + /* Get the tree iter */ + tree_path = (GtkTreePath *)g_list_nth_data(selected_row, 0); + gtk_tree_model_get_iter(model, &iter, tree_path); + + /* Get the config and add it to the list */ + dumper_table_config = create_new_table_config(&iter); + add_dumper_table_config_to_list(dumper_table_config, chooser_filtered_table_list_store, &iter); + + /* Get the next row */ + selected_row = g_list_next(selected_row); + } + + /* Free the GList */ + g_list_foreach(selected_row, (GFunc)gtk_tree_path_free, NULL); + g_list_free(selected_row); + } + + gtk_widget_hide(dialog_tablechooser); +} + +/* + * Signal handler for the remove box. Performs no user interaction, simply + * removes the row from the table. + */ +static void +pgui_action_handle_table_remove(GtkCellRendererToggle *renderer, + gchar *path, + gpointer user_data) +{ + GtkTreeIter iter; + SHPDUMPERCONFIG *dumper_table_config; + gpointer gptr; + + /* Grab the SHPDUMPERCONFIG from the EXPORT_POINTER_COLUMN for the list store */ + gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(export_table_list_store), &iter, path); + gtk_tree_model_get(GTK_TREE_MODEL(export_table_list_store), &iter, EXPORT_POINTER_COLUMN, &gptr, -1); + dumper_table_config = (SHPDUMPERCONFIG *)gptr; + + /* Free the configuration from memory */ + free_dumper_config(dumper_table_config); + + /* Remove the row from the list */ + gtk_list_store_remove(export_table_list_store, &iter); +} + +static void +pgui_action_import(GtkWidget *widget, gpointer data) +{ + SHPLOADERCONFIG *loader_file_config; + SHPLOADERSTATE *state; + gint is_valid; + gpointer gptr; + GtkTreeIter iter; + char *sql_form, *query, *connection_string, *progress_text = NULL, *progress_shapefile = NULL; PGresult *result; + + int ret, success, i = 0; + char *header, *footer, *record; + + /* Get the first row of the import list */ + is_valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(import_file_list_store), &iter); + if (!is_valid) + { + pgui_seterr(_("ERROR: You haven't specified any files to import")); + pgui_raise_error_dialogue(); + + return; + } + + /* Firstly make sure that we can connect to the database - if we can't then there isn't much + point doing anything else... */ + if (!connection_test()) + { + pgui_seterr(_("Unable to connect to the database - please check your connection settings")); + pgui_raise_error_dialogue(); + + /* Open the connections UI for the user */ + update_conn_ui_from_conn_config(); + + gtk_widget_show_all(GTK_WIDGET(window_conn)); + return; + } + + /* Let's open a single connection to the remote DB for the duration of the validation pass; + note that we already know the connection string works, otherwise we would have bailed + out earlier in the function */ + connection_string = ShpDumperGetConnectionStringFromConn(conn); + pg_connection = PQconnectdb(connection_string); + + /* Setup the table/column type discovery query */ + sql_form = "SELECT a.attnum, a.attname AS field, t.typname AS type, a.attlen AS length, a.atttypmod AS precision FROM pg_class c, pg_attribute a, pg_type t, pg_namespace n WHERE c.relname = '%s' AND n.nspname = '%s' AND a.attnum > 0 AND a.attrelid = c.oid AND a.atttypid = t.oid AND c.relnamespace = n.oid ORDER BY a.attnum"; + + /* Validation: we loop through each of the files in order to validate them as a separate pass */ + while (is_valid) + { + /* Grab the SHPLOADERCONFIG for this row */ + gtk_tree_model_get(GTK_TREE_MODEL(import_file_list_store), &iter, IMPORT_POINTER_COLUMN, &gptr, -1); + loader_file_config = (SHPLOADERCONFIG *)gptr; + + /* For each entry, we execute a remote query in order to determine the column names + and types for the remote table if they actually exist */ + query = malloc(strlen(sql_form) + strlen(loader_file_config->schema) + strlen(loader_file_config->table) + 1); + sprintf(query, sql_form, loader_file_config->table, loader_file_config->schema); + result = PQexec(pg_connection, query); + + /* Call the validation function with the SHPLOADERCONFIG and the result set */ + ret = validate_remote_loader_columns(loader_file_config, result); + if (ret == SHPLOADERERR) + { + pgui_raise_error_dialogue(); + + PQclear(result); + free(query); + + return; + } + + /* Free the SQL query */ + PQclear(result); + free(query); + + /* Get next entry */ + is_valid = gtk_tree_model_iter_next(GTK_TREE_MODEL(import_file_list_store), &iter); + } + + /* Close our database connection */ + PQfinish(pg_connection); + + + /* Once we've done the validation pass, now let's load the shapefile */ + is_valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(import_file_list_store), &iter); + while (is_valid) + { + /* Grab the SHPLOADERCONFIG for this row */ + gtk_tree_model_get(GTK_TREE_MODEL(import_file_list_store), &iter, IMPORT_POINTER_COLUMN, &gptr, -1); + loader_file_config = (SHPLOADERCONFIG *)gptr; + + pgui_logf("\n=============================="); + pgui_logf("Importing with configuration: %s, %s, %s, %s, mode=%c, dump=%d, simple=%d, geography=%d, index=%d, shape=%d, srid=%d", loader_file_config->table, loader_file_config->schema, loader_file_config->geo_col, loader_file_config->shp_file, loader_file_config->opt, loader_file_config->dump_format, loader_file_config->simple_geometries, loader_file_config->geography, loader_file_config->createindex, loader_file_config->readshape, loader_file_config->sr_id); + + /* + * Loop through the items in the shapefile + */ + is_running = TRUE; + success = FALSE; + + /* One connection per file, otherwise error handling becomes tricky... */ + pg_connection = PQconnectdb(connection_string); + + /* Disable the button to prevent multiple imports running at the same time */ + gtk_widget_set_sensitive(widget, FALSE); + + /* Allow GTK events to get a look in */ + while (gtk_events_pending()) + gtk_main_iteration(); + + /* Create the shapefile state object */ + state = ShpLoaderCreate(loader_file_config); + + /* Open the shapefile */ + ret = ShpLoaderOpenShape(state); + if (ret != SHPLOADEROK) + { + pgui_logf("%s", state->message); + + if (ret == SHPLOADERERR) + goto import_cleanup; + } + + /* For progress display, only show the "core" filename */ + for (i = strlen(loader_file_config->shp_file); i >= 0 + && loader_file_config->shp_file[i - 1] != '\\' && loader_file_config->shp_file[i - 1] != '/'; i--); + + progress_shapefile = malloc(strlen(loader_file_config->shp_file)); + strcpy(progress_shapefile, &loader_file_config->shp_file[i]); + + /* Display the progress dialog */ + lw_asprintf(&progress_text, _("Importing shapefile %s (%d records)..."), progress_shapefile, ShpLoaderGetRecordCount(state)); + gtk_label_set_text(GTK_LABEL(label_progress), progress_text); + gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progress), 0.0); + gtk_widget_show_all(dialog_progress); + + /* If reading the whole shapefile, display its type */ + if (state->config->readshape) + { + pgui_logf("Shapefile type: %s", SHPTypeName(state->shpfiletype)); + pgui_logf("PostGIS type: %s[%d]", state->pgtype, state->pgdims); + } + + /* Get the header */ + ret = ShpLoaderGetSQLHeader(state, &header); + if (ret != SHPLOADEROK) + { + pgui_logf("%s", state->message); + + if (ret == SHPLOADERERR) + goto import_cleanup; + } + + /* Send the header to the remote server: if we are in COPY mode then the last + statement will be a COPY and so will change connection mode */ + ret = pgui_exec(header); + free(header); + + if (!ret) + goto import_cleanup; + + /* If we are in prepare mode, we need to skip the actual load. */ + if (state->config->opt != 'p') + { + /* If we are in COPY (dump format) mode, output the COPY statement and enter COPY mode */ + if (state->config->dump_format) + { + ret = ShpLoaderGetSQLCopyStatement(state, &header); + + if (ret != SHPLOADEROK) + { + pgui_logf("%s", state->message); + + if (ret == SHPLOADERERR) + goto import_cleanup; + } + + /* Send the result to the remote server: this should put us in COPY mode */ + ret = pgui_copy_start(header); + free(header); + + if (!ret) + goto import_cleanup; + } + + /* Main loop: iterate through all of the records and send them to stdout */ + for (i = 0; i < ShpLoaderGetRecordCount(state) && is_running; i++) + { + ret = ShpLoaderGenerateSQLRowStatement(state, i, &record); + + switch (ret) + { + case SHPLOADEROK: + /* Simply send the statement */ + if (state->config->dump_format) + ret = pgui_copy_write(record); + else + ret = pgui_exec(record); + + /* Display a record number if we failed */ + if (!ret) + pgui_logf(_("Import failed on record number %d"), i); + + free(record); + break; + + case SHPLOADERERR: + /* Display the error message then stop */ + pgui_logf("%s\n", state->message); + goto import_cleanup; + break; + + case SHPLOADERWARN: + /* Display the warning, but continue */ + pgui_logf("%s\n", state->message); + + if (state->config->dump_format) + ret = pgui_copy_write(record); + else + ret = pgui_exec(record); + + /* Display a record number if we failed */ + if (!ret) + pgui_logf(_("Import failed on record number %d"), i); + + free(record); + break; + + case SHPLOADERRECDELETED: + /* Record is marked as deleted - ignore */ + break; + + case SHPLOADERRECISNULL: + /* Record is NULL and should be ignored according to NULL policy */ + break; + } + + /* Update the progress bar */ + gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progress), (float)i / ShpLoaderGetRecordCount(state)); + + /* Allow GTK events to get a look in */ + while (gtk_events_pending()) + gtk_main_iteration(); + } + + /* If we are in COPY (dump format) mode, leave COPY mode */ + if (state->config->dump_format) + { + if (! pgui_copy_end(0) ) + goto import_cleanup; + + result = PQgetResult(pg_connection); + if (PQresultStatus(result) != PGRES_COMMAND_OK) + { + pgui_logf(_("COPY failed with the following error: %s"), PQerrorMessage(pg_connection)); + ret = SHPLOADERERR; + goto import_cleanup; + } + } + } /* if (state->config->opt != 'p') */ + + /* Only continue if we didn't abort part way through */ + if (is_running) + { + /* Get the footer */ + ret = ShpLoaderGetSQLFooter(state, &footer); + if (ret != SHPLOADEROK) + { + pgui_logf("%s\n", state->message); + + if (ret == SHPLOADERERR) + goto import_cleanup; + } + + /* Just in case index creation takes a long time, update the progress text */ + if (state->config->createindex) + { + gtk_label_set_text(GTK_LABEL(label_progress), _("Creating spatial index...")); + + /* Allow GTK events to get a look in */ + while (gtk_events_pending()) + gtk_main_iteration(); + } + + /* Send the footer to the server */ + ret = pgui_exec(footer); + free(footer); + + if (!ret) + goto import_cleanup; + } + + /* Indicate success */ + success = TRUE; + +import_cleanup: + /* Import has definitely stopped running */ + is_running = FALSE; + + /* Close the existing connection */ + PQfinish(pg_connection); + pg_connection = NULL; + + /* If we didn't finish inserting all of the items (and we expected to), an error occurred */ + if ((state->config->opt != 'p' && i != ShpLoaderGetRecordCount(state)) || !ret) + pgui_logf(_("Shapefile import failed.")); + else + pgui_logf(_("Shapefile import completed.")); + + /* Free the state object */ + ShpLoaderDestroy(state); + + /* Tidy up */ + if (progress_text) + free(progress_text); + + if (progress_shapefile) + free(progress_shapefile); + + /* Get next entry */ + is_valid = gtk_tree_model_iter_next(GTK_TREE_MODEL(import_file_list_store), &iter); + } + + /* Import has definitely finished */ + is_running = FALSE; + + /* Enable the button once again */ + gtk_widget_set_sensitive(widget, TRUE); + + /* Silly GTK bug means we have to hide and show the button for it to work again! */ + gtk_widget_hide(widget); + gtk_widget_show(widget); + + /* Hide the progress dialog */ + gtk_widget_hide(dialog_progress); + + /* Allow GTK events to get a look in */ + while (gtk_events_pending()) + gtk_main_iteration(); + + /* Tidy up */ + free(connection_string); + + return; +} + +static void +pgui_action_export(GtkWidget *widget, gpointer data) +{ + SHPDUMPERCONFIG *dumper_table_config; + SHPDUMPERSTATE *state; + gint is_valid; + gpointer gptr; + GtkTreeIter iter; + char *output_shapefile, *orig_shapefile, *progress_text = NULL; + gchar *folder_path; + + int ret, success = FALSE, i = 0; + + /* Get the first row of the import list */ + is_valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(export_table_list_store), &iter); + if (!is_valid) + { + pgui_seterr(_("ERROR: You haven't specified any tables to export")); + pgui_raise_error_dialogue(); + + return; + } + + /* Firstly make sure that we can connect to the database - if we can't then there isn't much + point doing anything else... */ + if (!connection_test()) + { + pgui_seterr(_("Unable to connect to the database - please check your connection settings")); + pgui_raise_error_dialogue(); + + /* Open the connections UI for the user */ + update_conn_ui_from_conn_config(); + + gtk_widget_show_all(GTK_WIDGET(window_conn)); + return; + } + + /* Now open the file selector dialog so the user can specify where they would like the output + files to reside */ + if (gtk_dialog_run(GTK_DIALOG(dialog_folderchooser)) != GTK_RESPONSE_ACCEPT) + { + gtk_widget_hide(dialog_folderchooser); + + return; + } + + gtk_widget_hide(dialog_folderchooser); + folder_path = gtk_file_chooser_get_current_folder(GTK_FILE_CHOOSER(dialog_folderchooser)); + + /* Now everything is set up, let's extract the tables */ + is_valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(export_table_list_store), &iter); + while (is_valid) + { + /* Grab the SHPDUMPERCONFIG for this row */ + gtk_tree_model_get(GTK_TREE_MODEL(export_table_list_store), &iter, EXPORT_POINTER_COLUMN, &gptr, -1); + dumper_table_config = (SHPDUMPERCONFIG *)gptr; + + pgui_logf("\n=============================="); + pgui_logf("Exporting with configuration: %s, %s, %s", dumper_table_config->table, dumper_table_config->schema, dumper_table_config->shp_file); + + /* Export is running */ + is_running = TRUE; + success = FALSE; + + /* Disable the button to prevent multiple imports running at the same time */ + gtk_widget_set_sensitive(widget, FALSE); + + /* Allow GTK events to get a look in */ + while (gtk_events_pending()) + gtk_main_iteration(); + + /* Create the state for each configuration */ + state = ShpDumperCreate(dumper_table_config); + state->config->conn = conn; + + /* Save the original shapefile name, then create a temporary version containing the full path */ + orig_shapefile = dumper_table_config->shp_file; + output_shapefile = malloc(strlen(folder_path) + strlen(dumper_table_config->shp_file) + 2); + strcpy(output_shapefile, folder_path); + strcat(output_shapefile, G_DIR_SEPARATOR_S); + strcat(output_shapefile, dumper_table_config->shp_file); + + dumper_table_config->shp_file = output_shapefile; + + /* Connect to the database */ + ret = ShpDumperConnectDatabase(state); + if (ret != SHPDUMPEROK) + { + pgui_seterr("%s", state->message); + pgui_raise_error_dialogue(); + + goto export_cleanup; + } + + /* Display the progress dialog */ + gtk_label_set_text(GTK_LABEL(label_progress), _("Initialising...")); + gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progress), 0.0); + gtk_widget_show_all(dialog_progress); + + ret = ShpDumperOpenTable(state); + if (ret != SHPDUMPEROK) + { + pgui_logf("%s", state->message); + + if (ret == SHPDUMPERERR) + { + gtk_widget_hide(dialog_progress); + + pgui_seterr("%s", state->message); + pgui_raise_error_dialogue(); + + goto export_cleanup; + } + } + + /* Update the text */ + lw_asprintf(&progress_text, _("Exporting table %s (%d records)..."), dumper_table_config->table, ShpDumperGetRecordCount(state)); + gtk_label_set_text(GTK_LABEL(label_progress), progress_text); + + /* Allow GTK events to get a look in */ + while (gtk_events_pending()) + gtk_main_iteration(); + + pgui_logf(_("Done (postgis major version: %d)"), state->pgis_major_version); + pgui_logf(_("Output shape: %s"), shapetypename(state->outshptype)); + + for (i = 0; i < ShpDumperGetRecordCount(state) && is_running == TRUE; i++) + { + ret = ShpLoaderGenerateShapeRow(state); + if (ret != SHPDUMPEROK) + { + pgui_logf("%s", state->message); + + if (ret == SHPDUMPERERR) + { + gtk_widget_hide(dialog_progress); + + pgui_seterr("%s", state->message); + pgui_raise_error_dialogue(); + + goto export_cleanup; + } + } + + /* Update the progress bar */ + gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progress), (float)i / ShpDumperGetRecordCount(state)); + + /* Allow GTK events to get a look in */ + while (gtk_events_pending()) + gtk_main_iteration(); + } + + /* Finish the dump */ + ret = ShpDumperCloseTable(state); + if (ret != SHPDUMPEROK) + { + pgui_logf("%s", state->message); + + if (ret == SHPDUMPERERR) + { + gtk_widget_hide(dialog_progress); + + pgui_seterr("%s", state->message); + pgui_raise_error_dialogue(); + } + } + + /* Indicate success */ + if (is_running) + success = TRUE; + +export_cleanup: + + /* Tidy up everything */ + ShpDumperDestroy(state); + + /* Reset shapefile back to original form (without full path) */ + dumper_table_config->shp_file = orig_shapefile; + + /* Get next entry */ + is_valid = gtk_tree_model_iter_next(GTK_TREE_MODEL(export_table_list_store), &iter); + } + + /* Export has definitely finished */ + is_running = FALSE; + if (!success) + pgui_logf(_("Table export failed.")); + else + pgui_logf(_("Table export completed.")); + + /* Enable the button once again */ + gtk_widget_set_sensitive(widget, TRUE); + + /* Silly GTK bug means we have to hide and show the button for it to work again! */ + gtk_widget_hide(widget); + gtk_widget_show(widget); + + /* Hide the progress dialog */ + gtk_widget_hide(dialog_progress); + + /* Allow GTK events to get a look in */ + while (gtk_events_pending()) + gtk_main_iteration(); + + return; +} + + +/* === Import ListView functions and signal handlers === */ +/* Creates a single file row in the list table given the URI of a file */ +static void +process_single_uri(char *uri) +{ + SHPLOADERCONFIG *loader_file_config; + char *filename = NULL; + char *hostname; + GError *error = NULL; - if ( ! (connection_string = pgui_read_connection() ) ) + if (uri == NULL) { - pgui_raise_error_dialogue(); + pgui_logf(_("Unable to process drag URI.")); return; } - /* - ** Set the configuration from the UI and validate - */ - pgui_set_config_from_ui(); - if (! pgui_validate_config() ) - { - pgui_raise_error_dialogue(); - free(connection_string); + filename = g_filename_from_uri(uri, &hostname, &error); + g_free(uri); + if (filename == NULL) + { + pgui_logf(_("Unable to process filename: %s\n"), error->message); + g_error_free(error); return; } - /* Log what we know so far */ - connection_sanitized = strdup(connection_string); - pgui_sanitize_connection_string(connection_sanitized); - pgui_logf("Connection: %s", connection_sanitized); - pgui_logf("Destination: %s.%s", config->schema, config->table); - pgui_logf("Source File: %s", config->shp_file); - free(connection_sanitized); + /* Create a new row in the listview */ + loader_file_config = create_new_file_config(filename); + add_loader_file_config_to_list(loader_file_config); - /* Connect to the database. */ - if ( pg_connection ) PQfinish(pg_connection); - pg_connection = PQconnectdb(connection_string); + g_free(filename); + g_free(hostname); - if (PQstatus(pg_connection) == CONNECTION_BAD) - { - pgui_logf( "Connection failed: %s", PQerrorMessage(pg_connection)); - gtk_label_set_text(GTK_LABEL(label_pg_connection_test), "Connection failed."); - free(connection_string); - free(dest_string); - PQfinish(pg_connection); - pg_connection = NULL; - return; - } +} - /* - * Loop through the items in the shapefile - */ +/* Update the SHPLOADERCONFIG to the values currently contained within the iter */ +static void +update_loader_file_config_from_listview_iter(GtkTreeIter *iter, SHPLOADERCONFIG *loader_file_config) +{ + gchar *schema, *table, *geo_col, *srid; + + /* Grab the main values for this file */ + gtk_tree_model_get(GTK_TREE_MODEL(import_file_list_store), iter, + IMPORT_SCHEMA_COLUMN, &schema, + IMPORT_TABLE_COLUMN, &table, + IMPORT_GEOMETRY_COLUMN, &geo_col, + IMPORT_SRID_COLUMN, &srid, + -1); + + /* Update the schema */ + if (loader_file_config->schema) + free(loader_file_config->schema); + + loader_file_config->schema = strdup(schema); - /* Disable the button to prevent multiple imports running at the same time */ - gtk_widget_set_sensitive(widget, FALSE); + /* Update the table */ + if (loader_file_config->table) + free(loader_file_config->table); + + loader_file_config->table = strdup(table); - /* Allow GTK events to get a look in */ - while (gtk_events_pending()) - gtk_main_iteration(); + /* Update the geo column */ + if (loader_file_config->geo_col) + free(loader_file_config->geo_col); + + loader_file_config->geo_col = strdup(geo_col); + + /* Update the SRID */ + loader_file_config->sr_id = atoi(srid); - /* Create the shapefile state object */ - state = ShpLoaderCreate(config); + /* Free the values */ + return; +} - /* Open the shapefile */ - ret = ShpLoaderOpenShape(state); - if (ret != SHPLOADEROK) - { - pgui_logf("%s", state->message); - if (ret == SHPLOADERERR) - goto import_cleanup; - } +/* + * Here lives the magic of the drag-n-drop of the app. We really don't care + * about much of the provided tidbits. We only actually user selection_data + * and extract a list of filenames from it. + */ +static void +pgui_action_handle_file_drop(GtkWidget *widget, + GdkDragContext *dc, + gint x, gint y, + GtkSelectionData *selection_data, + guint info, guint t, gpointer data) +{ + const gchar *p, *q; - /* If reading the whole shapefile, display its type */ - if (state->config->readshape) + if (selection_data->data == NULL) { - pgui_logf("Shapefile type: %s", SHPTypeName(state->shpfiletype)); - pgui_logf("Postgis type: %s[%d]", state->pgtype, state->pgdims); + pgui_logf(_("Unable to process drag data.")); + return; } - /* Get the header */ - ret = ShpLoaderGetSQLHeader(state, &header); - if (ret != SHPLOADEROK) + p = (char*)selection_data->data; + while (p) { - pgui_logf("%s", state->message); - - if (ret == SHPLOADERERR) - goto import_cleanup; + /* Only process non-comments */ + if (*p != '#') + { + /* Trim leading whitespace */ + while (g_ascii_isspace(*p)) + p++; + q = p; + /* Scan to the end of the string (null or newline) */ + while (*q && (*q != '\n') && (*q != '\r')) + q++; + if (q > p) + { + /* Ignore terminating character */ + q--; + /* Trim trailing whitespace */ + while (q > p && g_ascii_isspace(*q)) + q--; + if (q > p) + { + process_single_uri(g_strndup(p, q - p + 1)); + } + } + } + /* Skip to the next entry */ + p = strchr(p, '\n'); + if (p) + p++; } +} - /* Send the header to the remote server: if we are in COPY mode then the last - statement will be a COPY and so will change connection mode */ - ret = pgui_exec(header); - free(header); - if (!ret) - goto import_cleanup; +/* + * This function is a signal handler for the load mode combo boxes. + */ +static void +pgui_action_handle_tree_combo(GtkCellRendererCombo *combo, + gchar *path_string, + GtkTreeIter *new_iter, + gpointer user_data) +{ + GtkTreeIter iter; + SHPLOADERCONFIG *loader_file_config; + char opt; + gchar *combo_text; + gpointer gptr; + + /* Grab the SHPLOADERCONFIG from the IMPORT_POINTER_COLUMN for the list store */ + gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(import_file_list_store), &iter, path_string); + gtk_tree_model_get(GTK_TREE_MODEL(import_file_list_store), &iter, IMPORT_POINTER_COLUMN, &gptr, -1); + loader_file_config = (SHPLOADERCONFIG *)gptr; - /* If we are in COPY (dump format) mode, output the COPY statement and enter COPY mode */ - if (state->config->dump_format) + /* Now grab the row selected within the combo box */ + gtk_tree_model_get(GTK_TREE_MODEL(loader_mode_combo_list), new_iter, LOADER_MODE_COMBO_OPTION_CHAR, &opt, -1); + + /* Update the configuration */ + + /* Hack for index creation: we must disable it if we are appending, otherwise we + end up trying to generate the index again */ + loader_file_config->createindex = global_loader_config->createindex; + + switch (opt) { - ret = ShpLoaderGetSQLCopyStatement(state, &header); + case 'a': + loader_file_config->opt = 'a'; + + /* Other half of index creation hack */ + loader_file_config->createindex = 0; + + break; + + case 'd': + loader_file_config->opt = 'd'; + break; + + case 'p': + loader_file_config->opt = 'p'; + break; + + case 'c': + loader_file_config->opt = 'c'; + break; + } + + /* Update the selection in the listview with the text from the combo */ + gtk_tree_model_get(GTK_TREE_MODEL(loader_mode_combo_list), new_iter, LOADER_MODE_COMBO_TEXT, &combo_text, -1); + gtk_list_store_set(import_file_list_store, &iter, IMPORT_MODE_COLUMN, combo_text, -1); + + return; +} + - if (ret != SHPLOADEROK) - { - pgui_logf("%s", state->message); +/* + * This method is a signal listener for all text renderers in the file + * list table, including the empty ones. Edits of the empty table are + * passed to an appropriate function, while edits of existing file rows + * are applied and the various validations called. + */ +static void +pgui_action_handle_loader_edit(GtkCellRendererText *renderer, + gchar *path, + gchar *new_text, + gpointer column) +{ + GtkTreeIter iter; + gpointer gptr; + gint columnindex; + SHPLOADERCONFIG *loader_file_config; + char *srid; + + /* Empty doesn't fly */ + if (strlen(new_text) == 0) + return; + + /* Update the model with the current edit change */ + columnindex = *(gint *)column; + gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(import_file_list_store), &iter, path); + gtk_list_store_set(import_file_list_store, &iter, columnindex, new_text, -1); + + /* Grab the SHPLOADERCONFIG from the IMPORT_POINTER_COLUMN for the list store */ + gtk_tree_model_get(GTK_TREE_MODEL(import_file_list_store), &iter, IMPORT_POINTER_COLUMN, &gptr, -1); + loader_file_config = (SHPLOADERCONFIG *)gptr; + + /* Update the configuration from the current UI data */ + update_loader_file_config_from_listview_iter(&iter, loader_file_config); + + /* Now refresh the listview UI row with the new configuration */ + lw_asprintf(&srid, "%d", loader_file_config->sr_id); + + gtk_list_store_set(import_file_list_store, &iter, + IMPORT_SCHEMA_COLUMN, loader_file_config->schema, + IMPORT_TABLE_COLUMN, loader_file_config->table, + IMPORT_GEOMETRY_COLUMN, loader_file_config->geo_col, + IMPORT_SRID_COLUMN, srid, + -1); - if (ret == SHPLOADERERR) - goto import_cleanup; - } + return; +} - /* Send the result to the remote server: this should put us in COPY mode */ - ret = pgui_copy_start(header); - free(header); +/* + * Signal handler for the remove box. Performs no user interaction, simply + * removes the row from the table. + */ +static void +pgui_action_handle_file_remove(GtkCellRendererToggle *renderer, + gchar *path, + gpointer user_data) +{ + GtkTreeIter iter; + SHPLOADERCONFIG *loader_file_config; + gpointer gptr; + + /* Grab the SHPLOADERCONFIG from the IMPORT_POINTER_COLUMN for the list store */ + gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(import_file_list_store), &iter, path); + gtk_tree_model_get(GTK_TREE_MODEL(import_file_list_store), &iter, IMPORT_POINTER_COLUMN, &gptr, -1); + loader_file_config = (SHPLOADERCONFIG *)gptr; + + /* Free the configuration from memory */ + free_loader_config(loader_file_config); + + /* Remove the row from the list */ + gtk_list_store_remove(import_file_list_store, &iter); - if (!ret) - goto import_cleanup; - } + /* Update the filename field width */ + update_filename_field_width(); +} - /* Main loop: iterate through all of the records and send them to stdout */ - pgui_logf("Importing shapefile (%d records)...", ShpLoaderGetRecordCount(state)); - /* Number of records in this file */ - record_count = ShpLoaderGetRecordCount(state); - /* Assume a progress bar 1000 pixels across, how we only want to update it every N records */ - progress_bar_update_frequency = 1 + record_count / 1000; - - import_running = TRUE; - for (i = 0; (i < record_count) && import_running; i++) - { - ret = ShpLoaderGenerateSQLRowStatement(state, i, &record); +/* === Export ListView functions and signal handlers === */ - switch (ret) - { - case SHPLOADEROK: - /* Simply send the statement */ - if (state->config->dump_format) - ret = pgui_copy_write(record); - else - ret = pgui_exec(record); +/* Update the SHPDUMPERCONFIG to the values currently contained within the iter */ +static void +update_dumper_table_config_from_listview_iter(GtkTreeIter *iter, SHPDUMPERCONFIG *dumper_table_config) +{ + gchar *schema, *table, *geo_col, *filename; + + /* Grab the main values for this file */ + gtk_tree_model_get(GTK_TREE_MODEL(export_table_list_store), iter, + EXPORT_SCHEMA_COLUMN, &schema, + EXPORT_TABLE_COLUMN, &table, + EXPORT_GEOMETRY_COLUMN, &geo_col, + EXPORT_FILENAME_COLUMN, &filename, + -1); + + /* Update the schema */ + if (dumper_table_config->schema) + free(dumper_table_config->schema); + + dumper_table_config->schema = strdup(schema); + + /* Update the table */ + if (dumper_table_config->table) + free(dumper_table_config->table); + + dumper_table_config->table = strdup(table); + + /* Update the geometry column */ + if (dumper_table_config->geo_col_name) + free(dumper_table_config->geo_col_name); + + dumper_table_config->geo_col_name = strdup(geo_col); - /* Display a record number if we failed */ - if (!ret) - pgui_logf("Failed record number #%d", i); + /* Update the filename column (default to table name) */ + if (dumper_table_config->shp_file) + free(dumper_table_config->shp_file); + + dumper_table_config->shp_file = strdup(filename); - free(record); - break; + return; +} - case SHPLOADERERR: - /* Display the error message then stop */ - pgui_logf("%s\n", state->message); - goto import_cleanup; - break; +static void +pgui_action_handle_table_geocol_combo(GtkCellRendererCombo *combo, + gchar *path_string, + GtkTreeIter *new_iter, + gpointer user_data) +{ + SHPDUMPERCONFIG *dumper_table_config; + gchar *geocol_name; + GtkTreeIter iter; + GtkListStore *model; + gpointer gptr; + + /* Get the existing geo column name */ + gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(export_table_list_store), &iter, path_string); + gtk_tree_model_get(GTK_TREE_MODEL(export_table_list_store), &iter, + EXPORT_POINTER_COLUMN, &gptr, + EXPORT_GEOMETRY_COLUMN, &geocol_name, + EXPORT_GEOMETRY_LISTSTORE_COLUMN, &model, + -1); + + /* If the geocol_name is NULL then there was no geo column so exit */ + if (!geocol_name) + return; + + /* Otherwise update the geo column name in the config and the model */ + gtk_tree_model_get(GTK_TREE_MODEL(model), new_iter, TABLECHOOSER_GEOCOL_COMBO_TEXT, &geocol_name, -1); + dumper_table_config = (SHPDUMPERCONFIG *)gptr; + + if (dumper_table_config->geo_col_name) + { + free(dumper_table_config->geo_col_name); + + dumper_table_config->geo_col_name = strdup(geocol_name); + } + + gtk_list_store_set(export_table_list_store, &iter, + EXPORT_GEOMETRY_COLUMN, geocol_name, + -1); + + return; +} - case SHPLOADERWARN: - /* Display the warning, but continue */ - pgui_logf("%s\n", state->message); +static void +pgui_action_handle_dumper_edit(GtkCellRendererText *renderer, + gchar *path, + gchar *new_text, + gpointer column) +{ + GtkTreeIter iter; + gpointer gptr; + gint columnindex; + SHPDUMPERCONFIG *dumper_table_config; + + /* Empty doesn't fly */ + if (strlen(new_text) == 0) + return; + + /* Update the model with the current edit change */ + columnindex = *(gint *)column; + gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(export_table_list_store), &iter, path); + gtk_list_store_set(export_table_list_store, &iter, columnindex, new_text, -1); + + /* Grab the SHPDUMPERCONFIG from the EXPORT_POINTER_COLUMN for the list store */ + gtk_tree_model_get(GTK_TREE_MODEL(export_table_list_store), &iter, EXPORT_POINTER_COLUMN, &gptr, -1); + dumper_table_config = (SHPDUMPERCONFIG *)gptr; + + /* Update the configuration from the current UI data */ + update_dumper_table_config_from_listview_iter(&iter, dumper_table_config); + + /* Now refresh the listview UI row with the new configuration */ + gtk_list_store_set(export_table_list_store, &iter, + EXPORT_SCHEMA_COLUMN, dumper_table_config->schema, + EXPORT_TABLE_COLUMN, dumper_table_config->table, + EXPORT_GEOMETRY_COLUMN, dumper_table_config->geo_col_name, + EXPORT_FILENAME_COLUMN, dumper_table_config->shp_file, + -1); - if (state->config->dump_format) - ret = pgui_copy_write(record); - else - ret = pgui_exec(record); + return; +} - /* Display a record number if we failed */ - if (!ret) - pgui_logf("Failed record number #%d", i); +/* === Connection Window functions === */ - free(record); - break; +/* Set the connection details UI from the current configuration */ +static void +update_conn_ui_from_conn_config(void) +{ + if (conn->username) + gtk_entry_set_text(GTK_ENTRY(entry_pg_user), conn->username); + else + gtk_entry_set_text(GTK_ENTRY(entry_pg_user), ""); + + if (conn->password) + gtk_entry_set_text(GTK_ENTRY(entry_pg_pass), conn->password); + else + gtk_entry_set_text(GTK_ENTRY(entry_pg_pass), ""); + + if (conn->host) + gtk_entry_set_text(GTK_ENTRY(entry_pg_host), conn->host); + else + gtk_entry_set_text(GTK_ENTRY(entry_pg_host), ""); + + if (conn->port) + gtk_entry_set_text(GTK_ENTRY(entry_pg_port), conn->port); + else + gtk_entry_set_text(GTK_ENTRY(entry_pg_port), ""); + + if (conn->database) + gtk_entry_set_text(GTK_ENTRY(entry_pg_db), conn->database); + else + gtk_entry_set_text(GTK_ENTRY(entry_pg_db), ""); - case SHPLOADERRECDELETED: - /* Record is marked as deleted - ignore */ - break; + return; +} - case SHPLOADERRECISNULL: - /* Record is NULL and should be ignored according to NULL policy */ - break; - } +/* Set the current connection configuration from the connection details UI */ +static void +update_conn_config_from_conn_ui(void) +{ + const char *text; + + text = gtk_entry_get_text(GTK_ENTRY(entry_pg_user)); + if (conn->username) + free(conn->username); + + if (strlen(text)) + conn->username = strdup(text); + else + conn->username = NULL; + + text = gtk_entry_get_text(GTK_ENTRY(entry_pg_pass)); + if (conn->password) + free(conn->password); + + if (strlen(text)) + conn->password = strdup(text); + else + conn->password = NULL; + + text = gtk_entry_get_text(GTK_ENTRY(entry_pg_host)); + if (conn->host) + free(conn->host); + + if (strlen(text)) + conn->host = strdup(text); + else + conn->host = NULL; - /* Update the progress bar */ - if( i % progress_bar_update_frequency == 0 ) - { - gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progress), (float)i / record_count); - } + text = gtk_entry_get_text(GTK_ENTRY(entry_pg_port)); + if (conn->port) + free(conn->port); + + if (strlen(text)) + conn->port = strdup(text); + else + conn->port = NULL; - /* Allow GTK events to get a look in */ - while (gtk_events_pending()) - gtk_main_iteration(); - } + text = gtk_entry_get_text(GTK_ENTRY(entry_pg_db)); + if (conn->database) + free(conn->database); + + if (strlen(text)) + conn->database = strdup(text); + else + conn->database = NULL; - /* If we are in COPY (dump format) mode, leave COPY mode */ - if (state->config->dump_format) - { - if (! pgui_copy_end(0) ) - goto import_cleanup; + return; +} - result = PQgetResult(pg_connection); - if (PQresultStatus(result) != PGRES_COMMAND_OK) - { - pgui_logf("COPY failed with the following error: %s", PQerrorMessage(pg_connection)); - ret = SHPLOADERERR; - goto import_cleanup; - } - } +/* + * Open the connection details dialog + */ +static void +pgui_action_connection_details(GtkWidget *widget, gpointer data) +{ + /* Update the UI with the current options */ + update_conn_ui_from_conn_config(); + + gtk_widget_show_all(GTK_WIDGET(window_conn)); + return; +} - /* Only continue if we didn't abort part way through */ - if (import_running) +/* Validate the connection, returning true or false */ +static int +pgui_validate_connection() +{ + int i; + + if (conn->port && strlen(conn->port)) { - /* Get the footer */ - ret = ShpLoaderGetSQLFooter(state, &footer); - if (ret != SHPLOADEROK) + for (i = 0; i < strlen(conn->port); i++) { - pgui_logf("%s\n", state->message); - - if (ret == SHPLOADERERR) - goto import_cleanup; + if (!isdigit(conn->port[i])) + { + pgui_seterr(_("The connection port must be numeric!")); + return 0; + } } + } + + return 1; +} - if ( state->config->createindex ) +static void +pgui_sanitize_connection_string(char *connection_string) +{ + char *ptr = strstr(connection_string, "password"); + if ( ptr ) + { + ptr += 10; + while ( *ptr != '\'' && *ptr != '\0' ) { - pgui_logf("Creating spatial index...\n"); + /* If we find a \, hide both it and the next character */ + if ( *ptr == '\\' ) + *ptr++ = '*'; + + *ptr++ = '*'; } + } + return; +} - /* Send the footer to the server */ - ret = pgui_exec(footer); - free(footer); - - if (!ret) - goto import_cleanup; +/* + * We retain the ability to explicitly request a test of the connection + * parameters. This is the button signal handler to do so. + */ +static void +pgui_action_connection_okay(GtkWidget *widget, gpointer data) +{ + /* Update the configuration structure from the form */ + update_conn_config_from_conn_ui(); + + /* Make sure have a valid connection first */ + if (!pgui_validate_connection()) + { + pgui_raise_error_dialogue(); + return; } + + if (!connection_test()) + { + pgui_logf(_("Connection failed.")); + + /* If the connection failed, display a warning before closing */ + pgui_seterr(_("Unable to connect to the database - please check your connection settings")); + pgui_raise_error_dialogue(); + } + else + { + pgui_logf(_("Connection succeeded.")); + } + + + /* Hide the window after the test */ + gtk_widget_hide(GTK_WIDGET(window_conn)); +} -import_cleanup: - /* If we didn't finish inserting all of the items, an error occurred */ - if (i != ShpLoaderGetRecordCount(state) || !ret) - pgui_logf("Shapefile import failed."); - else - pgui_logf("Shapefile import completed."); +/* === Window creation functions === */ + +static void +pgui_create_about_dialog(void) +{ + const char *authors[] = + { + "Paul Ramsey ", + "Mark Cave-Ayland ", + "Mark Leslie ", + NULL + }; + + - /* Free the state object */ - ShpLoaderDestroy(state); + dialog_about = gtk_about_dialog_new(); + gtk_about_dialog_set_name(GTK_ABOUT_DIALOG(dialog_about), _("PostGIS Shapefile Import/Export Manager")); + gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(dialog_about), POSTGIS_LIB_VERSION); + gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(dialog_about), "http://postgis.org/"); + gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(dialog_about), authors); +} - /* Import has definitely finished */ - import_running = FALSE; +static void +pgui_create_filechooser_dialog(void) +{ + GtkFileFilter *file_filter_shape; + + /* Create the dialog */ + dialog_filechooser = gtk_file_chooser_dialog_new( _("Select a Shape File"), GTK_WINDOW (window_main), + GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CLOSE, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); - /* Enable the button once again */ - gtk_widget_set_sensitive(widget, TRUE); + /* Filter for .shp files */ + file_filter_shape = gtk_file_filter_new(); + gtk_file_filter_add_pattern(GTK_FILE_FILTER(file_filter_shape), "*.shp"); + gtk_file_filter_set_name(GTK_FILE_FILTER(file_filter_shape), _("Shape Files (*.shp)")); + gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog_filechooser), file_filter_shape); - /* Silly GTK bug means we have to hide and show the button for it to work again! */ - gtk_widget_hide(widget); - gtk_widget_show(widget); + /* Filter for .dbf files */ + file_filter_shape = gtk_file_filter_new(); + gtk_file_filter_add_pattern(GTK_FILE_FILTER(file_filter_shape), "*.dbf"); + gtk_file_filter_set_name(GTK_FILE_FILTER(file_filter_shape), _("DBF Files (*.dbf)")); + gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog_filechooser), file_filter_shape); - /* Reset the progress bar */ - gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progress), 0.0); + /* Allow multiple files to be selected */ + g_object_set(dialog_filechooser, "select-multiple", TRUE, NULL); + + return; +} - /* Allow GTK events to get a look in */ - while (gtk_events_pending()) - gtk_main_iteration(); +static void +pgui_create_folderchooser_dialog(void) +{ + GtkFileFilter *file_filter_shape; + + /* Create the dialog */ + dialog_folderchooser = gtk_file_chooser_dialog_new( _("Select an output folder"), GTK_WINDOW (window_main), + GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, GTK_STOCK_CANCEL, GTK_RESPONSE_CLOSE, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); - /* Tidy up */ - free(connection_string); - free(dest_string); - connection_string = dest_string = NULL; + /* Filter for .shp files */ + file_filter_shape = gtk_file_filter_new(); + gtk_file_filter_add_pattern(GTK_FILE_FILTER(file_filter_shape), "*.shp"); + gtk_file_filter_set_name(GTK_FILE_FILTER(file_filter_shape), _("Shape Files (*.shp)")); + gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog_folderchooser), file_filter_shape); - /* Disconnect from the database */ - PQfinish(pg_connection); - pg_connection = NULL; + /* Filter for .dbf files */ + file_filter_shape = gtk_file_filter_new(); + gtk_file_filter_add_pattern(GTK_FILE_FILTER(file_filter_shape), "*.dbf"); + gtk_file_filter_set_name(GTK_FILE_FILTER(file_filter_shape), _("DBF Files (*.dbf)")); + gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog_folderchooser), file_filter_shape); return; } static void -pgui_create_options_dialogue_add_label(GtkWidget *table, const char *str, gfloat alignment, int row) +pgui_create_progress_dialog() { - GtkWidget *align = gtk_alignment_new( alignment, 0.5, 0.0, 1.0 ); - GtkWidget *label = gtk_label_new( str ); - gtk_table_attach_defaults(GTK_TABLE(table), align, 1, 3, row, row+1 ); - gtk_container_add (GTK_CONTAINER (align), label); + GtkWidget *vbox_progress, *table_progress; + + dialog_progress = gtk_dialog_new_with_buttons(_("Working..."), GTK_WINDOW(window_main), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL); + + gtk_window_set_modal(GTK_WINDOW(dialog_progress), TRUE); + gtk_window_set_keep_above(GTK_WINDOW(dialog_progress), TRUE); + gtk_window_set_default_size(GTK_WINDOW(dialog_progress), 640, -1); + + /* Use a vbox as the base container */ + vbox_progress = gtk_dialog_get_content_area(GTK_DIALOG(dialog_progress)); + gtk_box_set_spacing(GTK_BOX(vbox_progress), 15); + + /* Create a table within the vbox */ + table_progress = gtk_table_new(2, 1, TRUE); + gtk_container_set_border_width (GTK_CONTAINER (table_progress), 12); + gtk_table_set_row_spacings(GTK_TABLE(table_progress), 5); + gtk_table_set_col_spacings(GTK_TABLE(table_progress), 10); + + /* Text for the progress bar */ + label_progress = gtk_label_new(""); + gtk_table_attach_defaults(GTK_TABLE(table_progress), label_progress, 0, 1, 0, 1); + + /* Progress bar for the import */ + progress = gtk_progress_bar_new(); + gtk_progress_bar_set_orientation(GTK_PROGRESS_BAR(progress), GTK_PROGRESS_LEFT_TO_RIGHT); + gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progress), 0.0); + gtk_table_attach_defaults(GTK_TABLE(table_progress), progress, 0, 1, 1, 2); + + /* Add the table to the vbox */ + gtk_box_pack_start(GTK_BOX(vbox_progress), table_progress, FALSE, FALSE, 0); + + /* Add signal for cancel button */ + g_signal_connect(dialog_progress, "response", G_CALLBACK(pgui_action_progress_cancel), dialog_progress); + + /* Make sure we catch a delete event too */ + gtk_signal_connect(GTK_OBJECT(dialog_progress), "delete_event", GTK_SIGNAL_FUNC(pgui_action_progress_delete), NULL); + + return; } static void -pgui_action_about_open() +pgui_create_options_dialog_add_label(GtkWidget *table, const char *str, gfloat alignment, int row) { - GtkWidget *dlg; - const char *authors[] = - { - "Paul Ramsey ", - "Mark Cave-Ayland ", - NULL - }; - - dlg = gtk_about_dialog_new (); - gtk_about_dialog_set_name (GTK_ABOUT_DIALOG(dlg), "Shape to PostGIS"); - gtk_about_dialog_set_comments (GTK_ABOUT_DIALOG(dlg), GUI_RCSID); - /* gtk_about_dialog_set_version (GTK_ABOUT_DIALOG(dlg), GUI_RCSID); */ - gtk_about_dialog_set_website (GTK_ABOUT_DIALOG(dlg), "http://postgis.org/"); - gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG(dlg), authors); - g_signal_connect_swapped(dlg, "response", G_CALLBACK(gtk_widget_destroy), dlg); - gtk_widget_show (dlg); + GtkWidget *align = gtk_alignment_new(alignment, 0.5, 0.0, 1.0); + GtkWidget *label = gtk_label_new(str); + gtk_table_attach_defaults(GTK_TABLE(table), align, 1, 3, row, row + 1); + gtk_container_add(GTK_CONTAINER (align), label); } static void -pgui_create_options_dialogue() +pgui_create_loader_options_dialog() { GtkWidget *table_options; GtkWidget *align_options_center; - GtkWidget *dialog_options; static int text_width = 12; - dialog_options = gtk_dialog_new_with_buttons ("Import Options", GTK_WINDOW(window_main), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_OK, GTK_RESPONSE_NONE, NULL); + dialog_loader_options = gtk_dialog_new_with_buttons(_("Import Options"), GTK_WINDOW(window_main), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); - gtk_window_set_modal (GTK_WINDOW(dialog_options), TRUE); - gtk_window_set_keep_above (GTK_WINDOW(dialog_options), TRUE); - gtk_window_set_default_size (GTK_WINDOW(dialog_options), 180, 200); + gtk_window_set_modal (GTK_WINDOW(dialog_loader_options), TRUE); + gtk_window_set_keep_above (GTK_WINDOW(dialog_loader_options), TRUE); + gtk_window_set_default_size (GTK_WINDOW(dialog_loader_options), 180, -1); table_options = gtk_table_new(7, 3, TRUE); gtk_container_set_border_width (GTK_CONTAINER (table_options), 12); gtk_table_set_row_spacings(GTK_TABLE(table_options), 5); gtk_table_set_col_spacings(GTK_TABLE(table_options), 10); - pgui_create_options_dialogue_add_label(table_options, "DBF file character encoding", 0.0, 0); + pgui_create_options_dialog_add_label(table_options, _("DBF file character encoding"), 0.0, 0); entry_options_encoding = gtk_entry_new(); gtk_entry_set_width_chars(GTK_ENTRY(entry_options_encoding), text_width); - gtk_entry_set_text(GTK_ENTRY(entry_options_encoding), config->encoding); gtk_table_attach_defaults(GTK_TABLE(table_options), entry_options_encoding, 0, 1, 0, 1 ); - pgui_create_options_dialogue_add_label(table_options, "Preserve case of column names", 0.0, 1); - checkbutton_options_preservecase = gtk_check_button_new(); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton_options_preservecase), config->quoteidentifiers ? TRUE : FALSE); + pgui_create_options_dialog_add_label(table_options, _("Preserve case of column names"), 0.0, 1); + checkbutton_loader_options_preservecase = gtk_check_button_new(); align_options_center = gtk_alignment_new( 0.5, 0.5, 0.0, 1.0 ); gtk_table_attach_defaults(GTK_TABLE(table_options), align_options_center, 0, 1, 1, 2 ); - gtk_container_add (GTK_CONTAINER (align_options_center), checkbutton_options_preservecase); + gtk_container_add (GTK_CONTAINER (align_options_center), checkbutton_loader_options_preservecase); - pgui_create_options_dialogue_add_label(table_options, "Do not create 'bigint' columns", 0.0, 2); - checkbutton_options_forceint = gtk_check_button_new(); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton_options_forceint), config->forceint4 ? TRUE : FALSE); + pgui_create_options_dialog_add_label(table_options, _("Do not create 'bigint' columns"), 0.0, 2); + checkbutton_loader_options_forceint = gtk_check_button_new(); align_options_center = gtk_alignment_new( 0.5, 0.5, 0.0, 1.0 ); gtk_table_attach_defaults(GTK_TABLE(table_options), align_options_center, 0, 1, 2, 3 ); - gtk_container_add (GTK_CONTAINER (align_options_center), checkbutton_options_forceint); + gtk_container_add (GTK_CONTAINER (align_options_center), checkbutton_loader_options_forceint); - pgui_create_options_dialogue_add_label(table_options, "Create spatial index automatically after load", 0.0, 3); - checkbutton_options_autoindex = gtk_check_button_new(); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton_options_autoindex), config->createindex ? TRUE : FALSE); + pgui_create_options_dialog_add_label(table_options, _("Create spatial index automatically after load"), 0.0, 3); + checkbutton_loader_options_autoindex = gtk_check_button_new(); align_options_center = gtk_alignment_new( 0.5, 0.5, 0.0, 1.0 ); gtk_table_attach_defaults(GTK_TABLE(table_options), align_options_center, 0, 1, 3, 4 ); - gtk_container_add (GTK_CONTAINER (align_options_center), checkbutton_options_autoindex); + gtk_container_add (GTK_CONTAINER (align_options_center), checkbutton_loader_options_autoindex); - pgui_create_options_dialogue_add_label(table_options, "Load only attribute (dbf) data", 0.0, 4); - checkbutton_options_dbfonly = gtk_check_button_new(); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (checkbutton_options_dbfonly), config->readshape ? FALSE : TRUE); + pgui_create_options_dialog_add_label(table_options, _("Load only attribute (dbf) data"), 0.0, 4); + checkbutton_loader_options_dbfonly = gtk_check_button_new(); align_options_center = gtk_alignment_new( 0.5, 0.5, 0.0, 1.0 ); gtk_table_attach_defaults(GTK_TABLE(table_options), align_options_center, 0, 1, 4, 5 ); - gtk_container_add (GTK_CONTAINER (align_options_center), checkbutton_options_dbfonly); + gtk_container_add (GTK_CONTAINER (align_options_center), checkbutton_loader_options_dbfonly); - pgui_create_options_dialogue_add_label(table_options, "Load data using COPY rather than INSERT", 0.0, 5); - checkbutton_options_dumpformat = gtk_check_button_new(); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (checkbutton_options_dumpformat), config->dump_format ? TRUE : FALSE); + pgui_create_options_dialog_add_label(table_options, _("Load data using COPY rather than INSERT"), 0.0, 5); + checkbutton_loader_options_dumpformat = gtk_check_button_new(); align_options_center = gtk_alignment_new( 0.5, 0.5, 0.0, 0.0 ); gtk_table_attach_defaults(GTK_TABLE(table_options), align_options_center, 0, 1, 5, 6 ); - gtk_container_add (GTK_CONTAINER (align_options_center), checkbutton_options_dumpformat); + gtk_container_add (GTK_CONTAINER (align_options_center), checkbutton_loader_options_dumpformat); - pgui_create_options_dialogue_add_label(table_options, "Load into GEOGRAPHY column", 0.0, 6); - checkbutton_options_geography = gtk_check_button_new(); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton_options_geography), config->geography ? TRUE : FALSE); + pgui_create_options_dialog_add_label(table_options, _("Load into GEOGRAPHY column"), 0.0, 6); + checkbutton_loader_options_geography = gtk_check_button_new(); align_options_center = gtk_alignment_new( 0.5, 0.5, 0.0, 1.0 ); gtk_table_attach_defaults(GTK_TABLE(table_options), align_options_center, 0, 1, 6, 7 ); - gtk_container_add (GTK_CONTAINER (align_options_center), checkbutton_options_geography); + gtk_container_add (GTK_CONTAINER (align_options_center), checkbutton_loader_options_geography); + + pgui_create_options_dialog_add_label(table_options, _("Generate simple geometries instead of MULTI geometries"), 0.0, 7); + checkbutton_loader_options_simplegeoms = gtk_check_button_new(); + align_options_center = gtk_alignment_new( 0.5, 0.5, 0.0, 1.0 ); + gtk_table_attach_defaults(GTK_TABLE(table_options), align_options_center, 0, 1, 7, 8 ); + gtk_container_add (GTK_CONTAINER (align_options_center), checkbutton_loader_options_simplegeoms); + + /* Catch the response from the dialog */ + g_signal_connect(dialog_loader_options, "response", G_CALLBACK(pgui_action_loader_options_close), dialog_loader_options); + gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog_loader_options)->vbox), table_options, FALSE, FALSE, 0); + + /* Hook the delete event so we don't destroy the dialog (just hide) if cancelled */ + gtk_signal_connect(GTK_OBJECT(dialog_loader_options), "delete_event", GTK_SIGNAL_FUNC(pgui_event_popup_delete), NULL); +} + +static void +pgui_create_dumper_options_dialog() +{ + GtkWidget *table_options; + GtkWidget *align_options_center; + + dialog_dumper_options = gtk_dialog_new_with_buttons(_("Export Options"), GTK_WINDOW(window_main), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); + + gtk_window_set_modal (GTK_WINDOW(dialog_dumper_options), TRUE); + gtk_window_set_keep_above (GTK_WINDOW(dialog_dumper_options), TRUE); + gtk_window_set_default_size (GTK_WINDOW(dialog_dumper_options), 180, -1); + + table_options = gtk_table_new(3, 3, TRUE); + gtk_container_set_border_width (GTK_CONTAINER (table_options), 12); + gtk_table_set_row_spacings(GTK_TABLE(table_options), 5); + gtk_table_set_col_spacings(GTK_TABLE(table_options), 10); + + pgui_create_options_dialog_add_label(table_options, _("Include gid column in the exported table"), 0.0, 0); + checkbutton_dumper_options_includegid = gtk_check_button_new(); + align_options_center = gtk_alignment_new( 0.5, 0.5, 0.0, 1.0 ); + gtk_table_attach_defaults(GTK_TABLE(table_options), align_options_center, 0, 1, 0, 1 ); + gtk_container_add (GTK_CONTAINER (align_options_center), checkbutton_dumper_options_includegid); + + pgui_create_options_dialog_add_label(table_options, _("Preserve case of column names"), 0.0, 1); + checkbutton_dumper_options_keep_fieldname_case = gtk_check_button_new(); + align_options_center = gtk_alignment_new( 0.5, 0.5, 0.0, 1.0 ); + gtk_table_attach_defaults(GTK_TABLE(table_options), align_options_center, 0, 1, 1, 2 ); + gtk_container_add (GTK_CONTAINER (align_options_center), checkbutton_dumper_options_keep_fieldname_case); - g_signal_connect(dialog_options, "response", G_CALLBACK(pgui_action_options_close), dialog_options); - gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog_options)->vbox), table_options, FALSE, FALSE, 0); + pgui_create_options_dialog_add_label(table_options, _("Escape column names"), 0.0, 2); + checkbutton_dumper_options_unescapedattrs = gtk_check_button_new(); + align_options_center = gtk_alignment_new( 0.5, 0.5, 0.0, 1.0 ); + gtk_table_attach_defaults(GTK_TABLE(table_options), align_options_center, 0, 1, 2, 3 ); + gtk_container_add (GTK_CONTAINER (align_options_center), checkbutton_dumper_options_unescapedattrs); - gtk_widget_show_all (dialog_options); + /* Catch the response from the dialog */ + g_signal_connect(dialog_dumper_options, "response", G_CALLBACK(pgui_action_dumper_options_close), dialog_dumper_options); + gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog_dumper_options)->vbox), table_options, FALSE, FALSE, 0); + + /* Hook the delete event so we don't destroy the dialog (just hide) if cancelled */ + gtk_signal_connect(GTK_OBJECT(dialog_dumper_options), "delete_event", GTK_SIGNAL_FUNC(pgui_event_popup_delete), NULL); } +/* + * This function creates the UI artefacts for the file list table and hooks + * up all the pretty signals. + */ static void -pgui_create_main_window(const SHPCONNECTIONCONFIG *conn) +pgui_create_tablechooser_dialog() { - static int text_width = 12; - /* Reusable label handle */ - GtkWidget *label; - /* Main widgets */ - GtkWidget *vbox_main; - /* Shape file section */ - GtkWidget *file_chooser_dialog_shape; - GtkFileFilter *file_filter_shape; - /* PgSQL section */ - GtkWidget *frame_pg, *frame_shape, *frame_log, *frame_config; - GtkWidget *table_pg, *table_config; - GtkWidget *button_pg_test; - /* Button section */ - GtkWidget *hbox_buttons, *button_options, *button_import, *button_cancel, *button_about; - /* Log section */ - GtkWidget *scrolledwindow_log; -#ifdef MAC_INTEGRATION - /* MacOSX Command-Quit menu item */ - GtkWidget *menu_item_quit; -#endif + GtkWidget *vbox_tree, *table_progress; + GtkWidget *sw, *label; + GtkTreeSelection *chooser_selection; + gint *column_indexes; + + /* Create the main top level window with a 10px border */ + dialog_tablechooser = gtk_dialog_new_with_buttons(_("Table selection"), GTK_WINDOW(window_main), + GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); + + gtk_container_set_border_width(GTK_CONTAINER(dialog_tablechooser), 10); + gtk_window_set_position(GTK_WINDOW(dialog_tablechooser), GTK_WIN_POS_CENTER); + + vbox_tree = gtk_dialog_get_content_area(GTK_DIALOG(dialog_tablechooser)); - /* create the main, top level, window */ - window_main = gtk_window_new (GTK_WINDOW_TOPLEVEL); + /* Setup a model */ + chooser_table_list_store = gtk_list_store_new(TABLECHOOSER_N_COLUMNS, + G_TYPE_STRING, + G_TYPE_STRING, + GTK_TYPE_TREE_MODEL, + G_TYPE_STRING, + G_TYPE_INT); + + /* Because we want to do selective filtering on the treeview content, we now implement a GtkTreeModel + filter on top of the original tree model */ + chooser_filtered_table_list_store = (GtkListStore *)gtk_tree_model_filter_new(GTK_TREE_MODEL(chooser_table_list_store), NULL); + gtk_tree_model_filter_set_visible_func(GTK_TREE_MODEL_FILTER(chooser_filtered_table_list_store), + (GtkTreeModelFilterVisibleFunc)table_chooser_visibility_func, NULL, NULL); + + /* Create the view and such */ + chooser_tree = gtk_tree_view_new_with_model(GTK_TREE_MODEL(chooser_filtered_table_list_store)); + chooser_selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(chooser_tree)); + gtk_tree_selection_set_mode(chooser_selection, GTK_SELECTION_MULTIPLE); + + /* GTK has a slightly brain-dead API in that you can't directly find + the column being used by a GtkCellRenderer when using the same + callback to handle multiple fields; hence we manually store this + information here and pass a pointer to the column index into + the signal handler */ + column_indexes = g_malloc(sizeof(gint) * TABLECHOOSER_N_COLUMNS); + + /* Make the tree view in a scrollable window */ + sw = gtk_scrolled_window_new(NULL, NULL); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); + gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); + gtk_widget_set_size_request(sw, 320, 240); - /* give the window a 10px wide border */ - gtk_container_set_border_width (GTK_CONTAINER (window_main), 10); + gtk_box_pack_start(GTK_BOX(vbox_tree), sw, FALSE, FALSE, 10); + gtk_container_add(GTK_CONTAINER(sw), chooser_tree); + + /* Schema Field */ + chooser_schema_renderer = gtk_cell_renderer_text_new(); + g_object_set(chooser_schema_renderer, "editable", TRUE, NULL); + g_signal_connect(G_OBJECT(chooser_schema_renderer), "edited", G_CALLBACK(pgui_action_handle_loader_edit), NULL); + chooser_schema_column = gtk_tree_view_column_new_with_attributes(_("Schema"), + chooser_schema_renderer, + "text", + TABLECHOOSER_SCHEMA_COLUMN, + NULL); + g_object_set(chooser_schema_column, "resizable", TRUE, "sizing", GTK_TREE_VIEW_COLUMN_AUTOSIZE, NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(chooser_tree), chooser_schema_column); + + /* Table Field */ + chooser_table_renderer = gtk_cell_renderer_text_new(); + g_object_set(chooser_table_renderer, "editable", FALSE, NULL); + g_signal_connect(G_OBJECT(chooser_table_renderer), "edited", G_CALLBACK(pgui_action_handle_loader_edit), NULL); + chooser_table_column = gtk_tree_view_column_new_with_attributes(_("Table"), + chooser_table_renderer, + "text", + TABLECHOOSER_TABLE_COLUMN, + NULL); + g_object_set(chooser_table_column, "resizable", TRUE, "sizing", GTK_TREE_VIEW_COLUMN_AUTOSIZE, NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(chooser_tree), chooser_table_column); + + /* Create table to hold the tick-box and text */ + table_progress = gtk_table_new(1, 2, FALSE); + gtk_container_set_border_width (GTK_CONTAINER (table_progress), 0); + gtk_table_set_row_spacings(GTK_TABLE(table_progress), 0); + gtk_table_set_col_spacings(GTK_TABLE(table_progress), 0); + + checkbutton_chooser_geoonly = gtk_check_button_new(); + gtk_table_attach(GTK_TABLE(table_progress), checkbutton_chooser_geoonly, 0, 1, 0, 1, GTK_SHRINK, GTK_FILL, 0, 0); + label = gtk_label_new(_("Only show tables with geo columns")); + gtk_table_attach(GTK_TABLE(table_progress), label, 1, 2, 0, 1, GTK_FILL, GTK_FILL, 5, 0); + g_signal_connect(G_OBJECT(checkbutton_chooser_geoonly), "toggled", G_CALLBACK(pgui_action_chooser_toggle_show_geocolumn), NULL); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton_chooser_geoonly), TRUE); + + /* Attach table to the vbox */ + gtk_box_pack_start(GTK_BOX(vbox_tree), table_progress, FALSE, FALSE, 10); + + return; +} - /* give it the title */ - gtk_window_set_title (GTK_WINDOW (window_main), "Shape File to PostGIS Importer"); - /* open it a bit wider so that both the label and title show up */ - gtk_window_set_default_size (GTK_WINDOW (window_main), 180, 500); +/* + * This function creates the UI artefacts for the file list table and hooks + * up all the pretty signals. + */ +static void +pgui_create_import_file_table(GtkWidget *import_list_frame) +{ + GtkWidget *vbox_tree; + GtkWidget *sw; + GtkTreeIter iter; + gint *column_indexes; + + gtk_container_set_border_width (GTK_CONTAINER (import_list_frame), 0); - /* Connect the destroy event of the window with our pgui_quit function - * When the window is about to be destroyed we get a notificaiton and - * stop the main GTK loop - */ - g_signal_connect (G_OBJECT (window_main), "destroy", G_CALLBACK (pgui_quit), NULL); + vbox_tree = gtk_vbox_new(FALSE, 15); + gtk_container_set_border_width(GTK_CONTAINER(vbox_tree), 5); + gtk_container_add(GTK_CONTAINER(import_list_frame), vbox_tree); + + /* Setup a model */ + import_file_list_store = gtk_list_store_new(IMPORT_N_COLUMNS, + G_TYPE_POINTER, + G_TYPE_STRING, + G_TYPE_STRING, + G_TYPE_STRING, + G_TYPE_STRING, + G_TYPE_STRING, + G_TYPE_STRING, + G_TYPE_BOOLEAN); + + /* Create the view and such */ + import_tree = gtk_tree_view_new_with_model(GTK_TREE_MODEL(import_file_list_store)); + + /* GTK has a slightly brain-dead API in that you can't directly find + the column being used by a GtkCellRenderer when using the same + callback to handle multiple fields; hence we manually store this + information here and pass a pointer to the column index into + the signal handler */ + column_indexes = g_malloc(sizeof(gint) * IMPORT_N_COLUMNS); + + /* Make the tree view in a scrollable window */ + sw = gtk_scrolled_window_new(NULL, NULL); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); + gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); + gtk_widget_set_size_request(sw, -1, 150); + + gtk_box_pack_start(GTK_BOX(vbox_tree), sw, TRUE, TRUE, 0); + gtk_container_add(GTK_CONTAINER (sw), import_tree); - /* - ** Shape file selector - */ - frame_shape = gtk_frame_new("Shape File"); - gtk_container_set_border_width (GTK_CONTAINER (frame_shape), 0); - file_chooser_dialog_shape = gtk_file_chooser_dialog_new( "Select a Shape File", GTK_WINDOW (window_main), GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); - file_chooser_button_shape = gtk_file_chooser_button_new_with_dialog( file_chooser_dialog_shape ); - gtk_container_set_border_width (GTK_CONTAINER (file_chooser_button_shape), 8); - /* Filter for .shp files */ - file_filter_shape = gtk_file_filter_new(); - gtk_file_filter_add_pattern(GTK_FILE_FILTER(file_filter_shape), "*.shp"); - gtk_file_filter_set_name(GTK_FILE_FILTER(file_filter_shape), "Shape Files (*.shp)"); - gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(file_chooser_button_shape), file_filter_shape); - /* Filter for .dbf files */ - file_filter_shape = gtk_file_filter_new(); - gtk_file_filter_add_pattern(GTK_FILE_FILTER(file_filter_shape), "*.dbf"); - gtk_file_filter_set_name(GTK_FILE_FILTER(file_filter_shape), "DBF Files (*.dbf)"); - gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(file_chooser_button_shape), file_filter_shape); + /* Place the "Add File" button below the list view */ + add_file_button = gtk_button_new_with_label(_("Add File")); + gtk_container_add (GTK_CONTAINER (vbox_tree), add_file_button); + + /* Filename Field */ + import_filename_renderer = gtk_cell_renderer_text_new(); + g_object_set(import_filename_renderer, "editable", FALSE, NULL); + column_indexes[IMPORT_FILENAME_COLUMN] = IMPORT_FILENAME_COLUMN; + g_signal_connect(G_OBJECT(import_filename_renderer), "edited", G_CALLBACK(pgui_action_handle_loader_edit), &column_indexes[IMPORT_FILENAME_COLUMN]); + import_filename_column = gtk_tree_view_column_new_with_attributes(_("Shapefile"), + import_filename_renderer, + "text", + IMPORT_FILENAME_COLUMN, + NULL); + g_object_set(import_filename_column, "resizable", TRUE, NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(import_tree), import_filename_column); + + /* Schema Field */ + import_schema_renderer = gtk_cell_renderer_text_new(); + g_object_set(import_schema_renderer, "editable", TRUE, NULL); + column_indexes[IMPORT_SCHEMA_COLUMN] = IMPORT_SCHEMA_COLUMN; + g_signal_connect(G_OBJECT(import_schema_renderer), "edited", G_CALLBACK(pgui_action_handle_loader_edit), &column_indexes[IMPORT_SCHEMA_COLUMN]); + import_schema_column = gtk_tree_view_column_new_with_attributes(_("Schema"), + import_schema_renderer, + "text", + IMPORT_SCHEMA_COLUMN, + NULL); + g_object_set(import_schema_column, "resizable", TRUE, "expand", TRUE, NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(import_tree), import_schema_column); + + /* Table Field */ + import_table_renderer = gtk_cell_renderer_text_new(); + g_object_set(import_table_renderer, "editable", TRUE, NULL); + column_indexes[IMPORT_TABLE_COLUMN] = IMPORT_TABLE_COLUMN; + g_signal_connect(G_OBJECT(import_table_renderer), "edited", G_CALLBACK(pgui_action_handle_loader_edit), &column_indexes[IMPORT_TABLE_COLUMN]); + import_table_column = gtk_tree_view_column_new_with_attributes(_("Table"), + import_table_renderer, + "text", + IMPORT_TABLE_COLUMN, + NULL); + g_object_set(import_table_column, "resizable", TRUE, "expand", TRUE, NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(import_tree), import_table_column); + + /* Geo column field */ + import_geom_column_renderer = gtk_cell_renderer_text_new(); + g_object_set(import_geom_column_renderer, "editable", TRUE, NULL); + column_indexes[IMPORT_GEOMETRY_COLUMN] = IMPORT_GEOMETRY_COLUMN; + g_signal_connect(G_OBJECT(import_geom_column_renderer), "edited", G_CALLBACK(pgui_action_handle_loader_edit), &column_indexes[IMPORT_GEOMETRY_COLUMN]); + import_geom_column = gtk_tree_view_column_new_with_attributes(_("Geo Column"), + import_geom_column_renderer, + "text", + IMPORT_GEOMETRY_COLUMN, + NULL); + g_object_set(import_geom_column, "resizable", TRUE, "expand", TRUE, NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(import_tree), import_geom_column); + + /* SRID Field */ + import_srid_renderer = gtk_cell_renderer_text_new(); + g_object_set(import_srid_renderer, "editable", TRUE, NULL); + column_indexes[IMPORT_SRID_COLUMN] = IMPORT_SRID_COLUMN; + g_signal_connect(G_OBJECT(import_srid_renderer), "edited", G_CALLBACK(pgui_action_handle_loader_edit), &column_indexes[IMPORT_SRID_COLUMN]); + import_srid_column = gtk_tree_view_column_new_with_attributes("SRID", + import_srid_renderer, + "text", + IMPORT_SRID_COLUMN, + NULL); + g_object_set(import_srid_column, "resizable", TRUE, "expand", TRUE, NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(import_tree), import_srid_column); + + /* Mode Combo Field */ + loader_mode_combo_list = gtk_list_store_new(LOADER_MODE_COMBO_COLUMNS, + G_TYPE_STRING, + G_TYPE_CHAR); + + gtk_list_store_insert(loader_mode_combo_list, &iter, CREATE_MODE); + gtk_list_store_set(loader_mode_combo_list, &iter, + LOADER_MODE_COMBO_TEXT, _("Create"), + LOADER_MODE_COMBO_OPTION_CHAR, 'c', + -1); + gtk_list_store_insert(loader_mode_combo_list, &iter, APPEND_MODE); + gtk_list_store_set(loader_mode_combo_list, &iter, + LOADER_MODE_COMBO_TEXT, _("Append"), + LOADER_MODE_COMBO_OPTION_CHAR, 'a', + -1); + gtk_list_store_insert(loader_mode_combo_list, &iter, DELETE_MODE); + gtk_list_store_set(loader_mode_combo_list, &iter, + LOADER_MODE_COMBO_TEXT, _("Delete"), + LOADER_MODE_COMBO_OPTION_CHAR, 'd', + -1); + gtk_list_store_insert(loader_mode_combo_list, &iter, PREPARE_MODE); + gtk_list_store_set(loader_mode_combo_list, &iter, + LOADER_MODE_COMBO_TEXT, _("Prepare"), + LOADER_MODE_COMBO_OPTION_CHAR, 'p', + -1); + loader_mode_combo = gtk_combo_box_new_with_model(GTK_TREE_MODEL(loader_mode_combo_list)); + import_mode_renderer = gtk_cell_renderer_combo_new(); + gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(loader_mode_combo), + import_mode_renderer, TRUE); + gtk_cell_layout_add_attribute(GTK_CELL_LAYOUT(loader_mode_combo), + import_mode_renderer, "text", 0); + g_object_set(import_mode_renderer, + "model", loader_mode_combo_list, + "editable", TRUE, + "has-entry", FALSE, + "text-column", LOADER_MODE_COMBO_TEXT, + NULL); + import_mode_column = gtk_tree_view_column_new_with_attributes(_("Mode"), + import_mode_renderer, + "text", + IMPORT_MODE_COLUMN, + NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(import_tree), import_mode_column); + gtk_combo_box_set_active(GTK_COMBO_BOX(loader_mode_combo), 1); + g_object_set(import_mode_column, "resizable", TRUE, "expand", TRUE, "sizing", GTK_TREE_VIEW_COLUMN_AUTOSIZE, NULL); + + g_signal_connect (G_OBJECT(import_mode_renderer), "changed", G_CALLBACK(pgui_action_handle_tree_combo), NULL); + + /* Remove Field */ + import_remove_renderer = gtk_cell_renderer_toggle_new(); + g_object_set(import_remove_renderer, "activatable", TRUE, NULL); + g_signal_connect(G_OBJECT(import_remove_renderer), "toggled", G_CALLBACK (pgui_action_handle_file_remove), NULL); + import_remove_column = gtk_tree_view_column_new_with_attributes("Rm", + import_remove_renderer, NULL); + g_object_set(import_remove_column, "resizable", TRUE, "expand", FALSE, "fixed-width", 64, "sizing", GTK_TREE_VIEW_COLUMN_FIXED, NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(import_tree), import_remove_column); + + g_signal_connect (G_OBJECT (add_file_button), "clicked", G_CALLBACK (pgui_action_open_file_dialog), NULL); + + /* Drag n Drop wiring */ + GtkTargetEntry drop_types[] = + { + { "text/uri-list", 0, 0} + }; + + gint n_drop_types = sizeof(drop_types)/sizeof(drop_types[0]); + gtk_drag_dest_set(GTK_WIDGET(import_tree), + GTK_DEST_DEFAULT_ALL, + drop_types, n_drop_types, + GDK_ACTION_COPY); + g_signal_connect(G_OBJECT(import_tree), "drag_data_received", + G_CALLBACK(pgui_action_handle_file_drop), NULL); +} + +/* + * This function creates the UI artefacts for the file list table and hooks + * up all the pretty signals. + */ +static void +pgui_create_export_table_table(GtkWidget *export_list_frame) +{ + GtkWidget *vbox_tree; + GtkWidget *sw; + gint *column_indexes; + + gtk_container_set_border_width (GTK_CONTAINER (export_list_frame), 0); + + vbox_tree = gtk_vbox_new(FALSE, 15); + gtk_container_set_border_width(GTK_CONTAINER(vbox_tree), 5); + gtk_container_add(GTK_CONTAINER(export_list_frame), vbox_tree); + + /* Setup a model */ + export_table_list_store = gtk_list_store_new(EXPORT_N_COLUMNS, + G_TYPE_POINTER, + G_TYPE_STRING, + G_TYPE_STRING, + G_TYPE_STRING, + GTK_TYPE_TREE_MODEL, + G_TYPE_STRING, + G_TYPE_BOOLEAN); + + /* Create the view and such */ + export_tree = gtk_tree_view_new_with_model(GTK_TREE_MODEL(export_table_list_store)); + + /* GTK has a slightly brain-dead API in that you can't directly find + the column being used by a GtkCellRenderer when using the same + callback to handle multiple fields; hence we manually store this + information here and pass a pointer to the column index into + the signal handler */ + column_indexes = g_malloc(sizeof(gint) * EXPORT_N_COLUMNS); + + /* Make the tree view in a scrollable window */ + sw = gtk_scrolled_window_new(NULL, NULL); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); + gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_ETCHED_IN); + gtk_widget_set_size_request(sw, -1, 150); + + gtk_box_pack_start(GTK_BOX(vbox_tree), sw, TRUE, TRUE, 0); + gtk_container_add(GTK_CONTAINER (sw), export_tree); + + /* Place the "Add Table" button below the list view */ + add_table_button = gtk_button_new_with_label(_("Add Table")); + gtk_container_add (GTK_CONTAINER (vbox_tree), add_table_button); + + /* Schema Field */ + export_schema_renderer = gtk_cell_renderer_text_new(); + g_object_set(export_schema_renderer, "editable", FALSE, NULL); + column_indexes[EXPORT_SCHEMA_COLUMN] = EXPORT_SCHEMA_COLUMN; + g_signal_connect(G_OBJECT(export_schema_renderer), "edited", G_CALLBACK(pgui_action_handle_loader_edit), &column_indexes[EXPORT_SCHEMA_COLUMN]); + export_schema_column = gtk_tree_view_column_new_with_attributes(_("Schema"), + export_schema_renderer, + "text", + EXPORT_SCHEMA_COLUMN, + NULL); + g_object_set(export_schema_column, "resizable", TRUE, "expand", TRUE, "sizing", GTK_TREE_VIEW_COLUMN_AUTOSIZE, NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(export_tree), export_schema_column); + + /* Table Field */ + export_table_renderer = gtk_cell_renderer_text_new(); + g_object_set(export_table_renderer, "editable", FALSE, NULL); + column_indexes[EXPORT_TABLE_COLUMN] = EXPORT_TABLE_COLUMN; + g_signal_connect(G_OBJECT(export_table_renderer), "edited", G_CALLBACK(pgui_action_handle_loader_edit), &column_indexes[EXPORT_TABLE_COLUMN]); + export_table_column = gtk_tree_view_column_new_with_attributes(_("Table"), + export_table_renderer, + "text", + EXPORT_TABLE_COLUMN, + NULL); + g_object_set(export_table_column, "resizable", TRUE, "expand", TRUE, "sizing", GTK_TREE_VIEW_COLUMN_AUTOSIZE, NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(export_tree), export_table_column); + + /* Geo column field */ + export_geom_column_combo = gtk_combo_box_new(); + export_geom_column_renderer = gtk_cell_renderer_combo_new(); + gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(export_geom_column_combo), + export_geom_column_renderer, TRUE); + g_object_set(export_geom_column_renderer, + "editable", TRUE, + "has-entry", FALSE, + "text-column", TABLECHOOSER_GEOCOL_COMBO_TEXT, + NULL); + export_geom_column = gtk_tree_view_column_new_with_attributes(_("Geo Column"), + export_geom_column_renderer, + "model", + EXPORT_GEOMETRY_LISTSTORE_COLUMN, + "text", + EXPORT_GEOMETRY_COLUMN, + NULL); + g_object_set(export_geom_column, "resizable", TRUE, "sizing", GTK_TREE_VIEW_COLUMN_AUTOSIZE, NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(export_tree), export_geom_column); + g_signal_connect (G_OBJECT(export_geom_column_renderer), "changed", G_CALLBACK(pgui_action_handle_table_geocol_combo), NULL); + + /* Filename Field */ + export_filename_renderer = gtk_cell_renderer_text_new(); + g_object_set(export_filename_renderer, "editable", TRUE, NULL); + column_indexes[EXPORT_FILENAME_COLUMN] = EXPORT_FILENAME_COLUMN; + g_signal_connect(G_OBJECT(export_filename_renderer), "edited", G_CALLBACK(pgui_action_handle_dumper_edit), &column_indexes[EXPORT_FILENAME_COLUMN]); + export_filename_column = gtk_tree_view_column_new_with_attributes(_("Filename"), + export_filename_renderer, + "text", + EXPORT_FILENAME_COLUMN, + NULL); + g_object_set(export_filename_column, "resizable", TRUE, "expand", TRUE, "sizing", GTK_TREE_VIEW_COLUMN_AUTOSIZE, NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(export_tree), export_filename_column); + + /* Remove Field */ + export_remove_renderer = gtk_cell_renderer_toggle_new(); + g_object_set(export_remove_renderer, "activatable", TRUE, NULL); + g_signal_connect(G_OBJECT(export_remove_renderer), "toggled", G_CALLBACK (pgui_action_handle_table_remove), NULL); + export_remove_column = gtk_tree_view_column_new_with_attributes("Rm", + export_remove_renderer, NULL); + g_object_set(export_remove_column, "resizable", TRUE, "expand", FALSE, "fixed-width", 64, "sizing", GTK_TREE_VIEW_COLUMN_FIXED, NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(export_tree), export_remove_column); + + g_signal_connect (G_OBJECT (add_table_button), "clicked", G_CALLBACK (pgui_action_open_table_dialog), NULL); +} + +static void +pgui_create_connection_window() +{ + /* Default text width */ + static int text_width = 12; + + /* Vbox container */ + GtkWidget *vbox; - gtk_container_add (GTK_CONTAINER (frame_shape), file_chooser_button_shape); - g_signal_connect (G_OBJECT (file_chooser_button_shape), "file-set", G_CALLBACK (pgui_action_shape_file_set), NULL); + /* Reusable label handle */ + GtkWidget *label; + /* PgSQL section */ + GtkWidget *frame_pg, *table_pg; + + /* OK button */ + GtkWidget *button_okay; + /* Create the main top level window with a 10px border */ + window_conn = gtk_window_new(GTK_WINDOW_TOPLEVEL); + gtk_container_set_border_width(GTK_CONTAINER(window_conn), 10); + gtk_window_set_title(GTK_WINDOW(window_conn), _("PostGIS connection")); + gtk_window_set_position(GTK_WINDOW(window_conn), GTK_WIN_POS_CENTER); + gtk_window_set_modal(GTK_WINDOW(window_conn), TRUE); + + /* Use a vbox as the base container */ + vbox = gtk_vbox_new(FALSE, 15); + /* ** PostGIS info in a table */ - frame_pg = gtk_frame_new("PostGIS Connection"); + frame_pg = gtk_frame_new(_("PostGIS Connection")); table_pg = gtk_table_new(5, 3, TRUE); gtk_container_set_border_width (GTK_CONTAINER (table_pg), 8); gtk_table_set_col_spacings(GTK_TABLE(table_pg), 7); gtk_table_set_row_spacings(GTK_TABLE(table_pg), 3); + /* User name row */ - label = gtk_label_new("Username:"); + label = gtk_label_new(_("Username:")); entry_pg_user = gtk_entry_new(); - if ( conn->username ) - gtk_entry_set_text(GTK_ENTRY(entry_pg_user), conn->username); gtk_table_attach_defaults(GTK_TABLE(table_pg), label, 0, 1, 0, 1 ); gtk_table_attach_defaults(GTK_TABLE(table_pg), entry_pg_user, 1, 3, 0, 1 ); + /* Password row */ - label = gtk_label_new("Password:"); + label = gtk_label_new(_("Password:")); entry_pg_pass = gtk_entry_new(); - if ( conn->password ) - gtk_entry_set_text(GTK_ENTRY(entry_pg_pass), conn->password); gtk_entry_set_visibility( GTK_ENTRY(entry_pg_pass), FALSE); gtk_table_attach_defaults(GTK_TABLE(table_pg), label, 0, 1, 1, 2 ); gtk_table_attach_defaults(GTK_TABLE(table_pg), entry_pg_pass, 1, 3, 1, 2 ); + /* Host and port row */ - label = gtk_label_new("Server Host:"); + label = gtk_label_new(_("Server Host:")); entry_pg_host = gtk_entry_new(); - if ( conn->host ) - gtk_entry_set_text(GTK_ENTRY(entry_pg_host), conn->host); - else - gtk_entry_set_text(GTK_ENTRY(entry_pg_host), "localhost"); gtk_entry_set_width_chars(GTK_ENTRY(entry_pg_host), text_width); gtk_table_attach_defaults(GTK_TABLE(table_pg), label, 0, 1, 2, 3 ); gtk_table_attach_defaults(GTK_TABLE(table_pg), entry_pg_host, 1, 2, 2, 3 ); + entry_pg_port = gtk_entry_new(); - if ( conn->port ) - gtk_entry_set_text(GTK_ENTRY(entry_pg_port), conn->port); - else - gtk_entry_set_text(GTK_ENTRY(entry_pg_port), "5432"); gtk_entry_set_width_chars(GTK_ENTRY(entry_pg_port), 8); gtk_table_attach_defaults(GTK_TABLE(table_pg), entry_pg_port, 2, 3, 2, 3 ); + /* Database row */ - label = gtk_label_new("Database:"); + label = gtk_label_new(_("Database:")); entry_pg_db = gtk_entry_new(); - if ( conn->database ) - gtk_entry_set_text(GTK_ENTRY(entry_pg_db), conn->database); gtk_table_attach_defaults(GTK_TABLE(table_pg), label, 0, 1, 3, 4 ); gtk_table_attach_defaults(GTK_TABLE(table_pg), entry_pg_db, 1, 3, 3, 4 ); - /* Test button row */ - button_pg_test = gtk_button_new_with_label("Test Connection..."); - gtk_table_attach_defaults(GTK_TABLE(table_pg), button_pg_test, 1, 2, 4, 5 ); - g_signal_connect (G_OBJECT (button_pg_test), "clicked", G_CALLBACK (pgui_action_connection_test), NULL); - label_pg_connection_test = gtk_label_new(""); - gtk_table_attach_defaults(GTK_TABLE(table_pg), label_pg_connection_test, 2, 3, 4, 5 ); + /* Add table into containing frame */ - gtk_container_add (GTK_CONTAINER (frame_pg), table_pg); + gtk_container_add(GTK_CONTAINER(frame_pg), table_pg); + + /* Add frame into containing vbox */ + gtk_container_add(GTK_CONTAINER(window_conn), vbox); + + /* Add the vbox into the window */ + gtk_container_add(GTK_CONTAINER(vbox), frame_pg); + + /* Create a simple "OK" button for the dialog */ + button_okay = gtk_button_new_with_label(_("OK")); + gtk_container_add(GTK_CONTAINER(vbox), button_okay); + g_signal_connect(G_OBJECT(button_okay), "clicked", G_CALLBACK(pgui_action_connection_okay), NULL); + + /* Hook the delete event so we don't destroy the dialog (only hide it) if cancelled */ + gtk_signal_connect(GTK_OBJECT(window_conn), "delete_event", GTK_SIGNAL_FUNC(pgui_event_popup_delete), NULL); + + return; +} + +static void +pgui_create_main_window(const SHPCONNECTIONCONFIG *conn) +{ + /* Main widgets */ + GtkWidget *vbox_main, *vbox_loader, *vbox_dumper; + + /* PgSQL section */ + GtkWidget *frame_pg, *import_list_frame, *export_list_frame, *frame_log; + GtkWidget *button_pg_conn; + + /* Notebook */ + GtkWidget *notebook; + + /* Button section */ + GtkWidget *loader_hbox_buttons, *loader_button_options, *loader_button_import, *loader_button_cancel, *loader_button_about; + GtkWidget *dumper_hbox_buttons, *dumper_button_options, *dumper_button_export, *dumper_button_cancel, *dumper_button_about; + + /* Log section */ + GtkWidget *scrolledwindow_log; + + /* Create the main top level window with a 10px border */ + window_main = gtk_window_new(GTK_WINDOW_TOPLEVEL); + gtk_container_set_border_width(GTK_CONTAINER(window_main), 10); + gtk_window_set_title(GTK_WINDOW(window_main), _("PostGIS Shapefile Import/Export Manager")); + gtk_window_set_position(GTK_WINDOW(window_main), GTK_WIN_POS_CENTER_ALWAYS); + gtk_window_set_resizable(GTK_WINDOW(window_main), FALSE); + + /* Open it a bit wider so that both the label and title show up */ + gtk_window_set_default_size(GTK_WINDOW(window_main), 180, 500); + + /* Connect the destroy event of the window with our pgui_quit function + * When the window is about to be destroyed we get a notificaiton and + * stop the main GTK loop + */ + g_signal_connect(G_OBJECT(window_main), "destroy", G_CALLBACK(pgui_quit), NULL); + + /* Connection row */ + frame_pg = gtk_frame_new(_("PostGIS Connection")); + + /* Test button row */ + button_pg_conn = gtk_button_new_with_label(_("View connection details...")); + g_signal_connect(G_OBJECT(button_pg_conn), "clicked", G_CALLBACK(pgui_action_connection_details), NULL); + gtk_container_set_border_width(GTK_CONTAINER(button_pg_conn), 10); + gtk_container_add(GTK_CONTAINER(frame_pg), button_pg_conn); + + /* + * GTK Notebook for selecting import/export + */ + notebook = gtk_notebook_new(); + + /* + ** Shape file selector + */ + import_list_frame = gtk_frame_new(_("Import List")); + pgui_create_import_file_table(import_list_frame); /* - ** Configuration in a table + ** Row of action buttons */ - frame_config = gtk_frame_new("Configuration"); - table_config = gtk_table_new(2, 4, TRUE); - gtk_table_set_col_spacings(GTK_TABLE(table_config), 7); - gtk_table_set_row_spacings(GTK_TABLE(table_config), 3); - gtk_container_set_border_width (GTK_CONTAINER (table_config), 8); - /* Destination schemea row */ - label = gtk_label_new("Destination Schema:"); - entry_config_schema = gtk_entry_new(); - gtk_entry_set_text(GTK_ENTRY(entry_config_schema), "public"); - gtk_entry_set_width_chars(GTK_ENTRY(entry_config_schema), text_width); - gtk_table_attach_defaults(GTK_TABLE(table_config), label, 0, 1, 0, 1 ); - gtk_table_attach_defaults(GTK_TABLE(table_config), entry_config_schema, 1, 2, 0, 1 ); - /* Destination table row */ - label = gtk_label_new("Destination Table:"); - entry_config_table = gtk_entry_new(); - gtk_entry_set_width_chars(GTK_ENTRY(entry_config_table), text_width); - gtk_table_attach_defaults(GTK_TABLE(table_config), label, 0, 1, 1, 2 ); - gtk_table_attach_defaults(GTK_TABLE(table_config), entry_config_table, 1, 2, 1, 2 ); - /* SRID row */ - label = gtk_label_new("SRID:"); - entry_config_srid = gtk_entry_new(); - gtk_entry_set_width_chars(GTK_ENTRY(entry_config_srid), text_width); - gtk_entry_set_text(GTK_ENTRY(entry_config_srid), "-1"); - gtk_table_attach_defaults(GTK_TABLE(table_config), label, 2, 3, 0, 1 ); - gtk_table_attach_defaults(GTK_TABLE(table_config), entry_config_srid, 3, 4, 0, 1 ); - /* Geom column row */ - label = gtk_label_new("Geometry Column:"); - entry_config_geocolumn = gtk_entry_new(); - gtk_entry_set_width_chars(GTK_ENTRY(entry_config_geocolumn), text_width); - gtk_entry_set_text(GTK_ENTRY(entry_config_geocolumn), GEOMETRY_DEFAULT); - gtk_table_attach_defaults(GTK_TABLE(table_config), label, 2, 3, 1, 2 ); - gtk_table_attach_defaults(GTK_TABLE(table_config), entry_config_geocolumn, 3, 4, 1, 2 ); + loader_hbox_buttons = gtk_hbox_new(TRUE, 15); + gtk_container_set_border_width (GTK_CONTAINER (loader_hbox_buttons), 0); - /* Add table into containing frame */ - gtk_container_add (GTK_CONTAINER (frame_config), table_config); + /* Create the buttons themselves */ + loader_button_options = gtk_button_new_with_label(_("Options...")); + loader_button_import = gtk_button_new_with_label(_("Import")); + loader_button_cancel = gtk_button_new_with_label(_("Cancel")); + loader_button_about = gtk_button_new_with_label(_("About")); - /* Progress bar for the import */ - progress = gtk_progress_bar_new(); - gtk_progress_bar_set_orientation(GTK_PROGRESS_BAR(progress), GTK_PROGRESS_LEFT_TO_RIGHT); - gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progress), 0.0); + /* Add actions to the buttons */ + g_signal_connect (G_OBJECT (loader_button_import), "clicked", G_CALLBACK (pgui_action_import), NULL); + g_signal_connect (G_OBJECT (loader_button_options), "clicked", G_CALLBACK (pgui_action_loader_options_open), NULL); + g_signal_connect (G_OBJECT (loader_button_cancel), "clicked", G_CALLBACK (pgui_action_cancel), NULL); + g_signal_connect (G_OBJECT (loader_button_about), "clicked", G_CALLBACK (pgui_action_about_open), NULL); + + /* And insert the buttons into the hbox */ + gtk_box_pack_start(GTK_BOX(loader_hbox_buttons), loader_button_options, TRUE, TRUE, 0); + gtk_box_pack_end(GTK_BOX(loader_hbox_buttons), loader_button_cancel, TRUE, TRUE, 0); + gtk_box_pack_end(GTK_BOX(loader_hbox_buttons), loader_button_about, TRUE, TRUE, 0); + gtk_box_pack_end(GTK_BOX(loader_hbox_buttons), loader_button_import, TRUE, TRUE, 0); + + /* + ** Table selector + */ + export_list_frame = gtk_frame_new(_("Export List")); + pgui_create_export_table_table(export_list_frame); /* ** Row of action buttons */ - hbox_buttons = gtk_hbox_new(TRUE, 15); - gtk_container_set_border_width (GTK_CONTAINER (hbox_buttons), 0); + dumper_hbox_buttons = gtk_hbox_new(TRUE, 15); + gtk_container_set_border_width (GTK_CONTAINER (dumper_hbox_buttons), 0); + /* Create the buttons themselves */ - button_options = gtk_button_new_with_label("Options..."); - button_import = gtk_button_new_with_label("Import"); - button_cancel = gtk_button_new_with_label("Cancel"); - button_about = gtk_button_new_with_label("About"); + dumper_button_options = gtk_button_new_with_label(_("Options...")); + dumper_button_export = gtk_button_new_with_label(_("Export")); + dumper_button_cancel = gtk_button_new_with_label(_("Cancel")); + dumper_button_about = gtk_button_new_with_label(_("About")); + /* Add actions to the buttons */ - g_signal_connect (G_OBJECT (button_import), "clicked", G_CALLBACK (pgui_action_import), NULL); - g_signal_connect (G_OBJECT (button_options), "clicked", G_CALLBACK (pgui_action_options_open), NULL); - g_signal_connect (G_OBJECT (button_cancel), "clicked", G_CALLBACK (pgui_action_cancel), NULL); - g_signal_connect (G_OBJECT (button_about), "clicked", G_CALLBACK (pgui_action_about_open), NULL); - /* And insert the buttons into the hbox */ - gtk_box_pack_start(GTK_BOX(hbox_buttons), button_options, TRUE, TRUE, 0); - gtk_box_pack_end(GTK_BOX(hbox_buttons), button_cancel, TRUE, TRUE, 0); - gtk_box_pack_end(GTK_BOX(hbox_buttons), button_about, TRUE, TRUE, 0); - gtk_box_pack_end(GTK_BOX(hbox_buttons), button_import, TRUE, TRUE, 0); + g_signal_connect (G_OBJECT (dumper_button_export), "clicked", G_CALLBACK (pgui_action_export), NULL); + g_signal_connect (G_OBJECT (dumper_button_options), "clicked", G_CALLBACK (pgui_action_dumper_options_open), NULL); + g_signal_connect (G_OBJECT (dumper_button_cancel), "clicked", G_CALLBACK (pgui_action_cancel), NULL); + g_signal_connect (G_OBJECT (dumper_button_about), "clicked", G_CALLBACK (pgui_action_about_open), NULL); + /* And insert the buttons into the hbox */ + gtk_box_pack_start(GTK_BOX(dumper_hbox_buttons), dumper_button_options, TRUE, TRUE, 0); + gtk_box_pack_end(GTK_BOX(dumper_hbox_buttons), dumper_button_cancel, TRUE, TRUE, 0); + gtk_box_pack_end(GTK_BOX(dumper_hbox_buttons), dumper_button_about, TRUE, TRUE, 0); + gtk_box_pack_end(GTK_BOX(dumper_hbox_buttons), dumper_button_export, TRUE, TRUE, 0); + /* ** Log window */ - frame_log = gtk_frame_new("Import Log"); + frame_log = gtk_frame_new(_("Log Window")); gtk_container_set_border_width (GTK_CONTAINER (frame_log), 0); + gtk_widget_set_size_request(frame_log, -1, 200); textview_log = gtk_text_view_new(); textbuffer_log = gtk_text_buffer_new(NULL); scrolledwindow_log = gtk_scrolled_window_new(NULL, NULL); @@ -1206,31 +3405,38 @@ gtk_container_add (GTK_CONTAINER (scrolledwindow_log), textview_log); gtk_container_add (GTK_CONTAINER (frame_log), scrolledwindow_log); -#ifdef MAC_INTEGRATION - /* - ** OS/X menu integration for command-Q - */ - menu_item_quit = gtk_menu_item_new(); - g_signal_connect (G_OBJECT (menu_item_quit), "activate", G_CALLBACK (pgui_action_cancel), NULL); - ige_mac_menu_set_quit_menu_item (GTK_MENU_ITEM (menu_item_quit)); -#endif - /* ** Main window */ vbox_main = gtk_vbox_new(FALSE, 10); gtk_container_set_border_width (GTK_CONTAINER (vbox_main), 0); + + /* Add the loader frames into the notebook page */ + vbox_loader = gtk_vbox_new(FALSE, 10); + gtk_container_set_border_width(GTK_CONTAINER(vbox_loader), 10); + + gtk_box_pack_start(GTK_BOX(vbox_loader), import_list_frame, FALSE, TRUE, 0); + gtk_box_pack_start(GTK_BOX(vbox_loader), loader_hbox_buttons, FALSE, FALSE, 0); + gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox_loader, gtk_label_new(_("Import"))); + + /* Add the dumper frames into the notebook page */ + vbox_dumper = gtk_vbox_new(FALSE, 10); + gtk_container_set_border_width(GTK_CONTAINER(vbox_dumper), 10); + + gtk_box_pack_start(GTK_BOX(vbox_dumper), export_list_frame, FALSE, TRUE, 0); + gtk_box_pack_start(GTK_BOX(vbox_dumper), dumper_hbox_buttons, FALSE, FALSE, 0); + gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox_dumper, gtk_label_new(_("Export"))); + /* Add the frames into the main vbox */ - gtk_box_pack_start(GTK_BOX(vbox_main), frame_shape, FALSE, TRUE, 0); gtk_box_pack_start(GTK_BOX(vbox_main), frame_pg, FALSE, TRUE, 0); - gtk_box_pack_start(GTK_BOX(vbox_main), frame_config, FALSE, TRUE, 0); - gtk_box_pack_start(GTK_BOX(vbox_main), hbox_buttons, FALSE, FALSE, 0); - gtk_box_pack_start(GTK_BOX(vbox_main), progress, FALSE, FALSE, 0); + gtk_box_pack_start(GTK_BOX(vbox_main), notebook, FALSE, TRUE, 0); gtk_box_pack_start(GTK_BOX(vbox_main), frame_log, TRUE, TRUE, 0); + /* and insert the vbox into the main window */ - gtk_container_add (GTK_CONTAINER (window_main), vbox_main); + gtk_container_add(GTK_CONTAINER(window_main), vbox_main); + /* make sure that everything, window and label, are visible */ - gtk_widget_show_all (window_main); + gtk_widget_show_all(window_main); return; } @@ -1238,7 +3444,7 @@ static void usage() { - printf("RCSID: %s RELEASE: %s\n", RCSID, POSTGIS_VERSION); + printf("RCSID: %s RELEASE: %s\n", S2P_RCSID, POSTGIS_VERSION); printf("USAGE: shp2pgsql-gui [options]\n"); printf("OPTIONS:\n"); printf(" -U \n"); @@ -1252,65 +3458,79 @@ int main(int argc, char *argv[]) { - char c; + int c; - /* Set default configuration */ - config = malloc(sizeof(SHPLOADERCONFIG)); - set_config_defaults(config); +#ifdef ENABLE_NLS + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, PGSQL_LOCALEDIR); + textdomain (PACKAGE); +#endif + /* Parse command line options and set configuration */ + global_loader_config = malloc(sizeof(SHPLOADERCONFIG)); + set_loader_config_defaults(global_loader_config); + global_dumper_config = malloc(sizeof(SHPDUMPERCONFIG)); + set_dumper_config_defaults(global_dumper_config); + /* Here we override any defaults for the GUI */ - config->createindex = 1; - - /* Prepare our shape connection */ + global_loader_config->createindex = 1; + global_loader_config->geo_col = strdup(GEOMETRY_DEFAULT); + global_loader_config->dump_format = 1; + conn = malloc(sizeof(SHPCONNECTIONCONFIG)); memset(conn, 0, sizeof(SHPCONNECTIONCONFIG)); + + /* Here we override any defaults for the connection */ + conn->host = strdup("localhost"); + conn->port = strdup("5432"); - /* Read any environment values */ - conn->port = getenv("PGPORT"); - conn->username = getenv("PGUSER"); - conn->database = getenv("PGDATABASE"); - conn->host = getenv("PGHOST"); - - /* Over-ride the environment with any command line options */ while ((c = pgis_getopt(argc, argv, "U:p:W:d:h:")) != -1) { switch (c) { case 'U': - conn->username = pgis_optarg; + conn->username = strdup(pgis_optarg); break; case 'p': - conn->port = pgis_optarg; + conn->port = strdup(pgis_optarg); break; case 'W': - conn->password = pgis_optarg; + conn->password = strdup(pgis_optarg); break; case 'd': - conn->database = pgis_optarg; + conn->database = strdup(pgis_optarg); break; case 'h': - conn->host = pgis_optarg; + conn->host = strdup(pgis_optarg); break; default: usage(); free(conn); - free(config); + free(global_loader_config); exit(0); } } /* initialize the GTK stack */ gtk_init(&argc, &argv); - + /* set up the user interface */ pgui_create_main_window(conn); - + pgui_create_connection_window(); + pgui_create_loader_options_dialog(); + pgui_create_dumper_options_dialog(); + pgui_create_about_dialog(); + pgui_create_filechooser_dialog(); + pgui_create_progress_dialog(); + pgui_create_tablechooser_dialog(); + pgui_create_folderchooser_dialog(); + /* start the main loop */ gtk_main(); /* Free the configuration */ free(conn); - free(config); + free(global_loader_config); return 0; } diff -Nru postgis-1.5.3/loader/shpcommon.c postgis-2.0.1/loader/shpcommon.c --- postgis-1.5.3/loader/shpcommon.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/loader/shpcommon.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,80 @@ +/********************************************************************** + * $Id: shpcommon.c 5646 2010-05-27 13:19:12Z pramsey $ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * Copyright 2010 Mark Cave-Ayland + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +/* This file contains functions that are shared between the loader and dumper */ + +#include +#include "shpcommon.h" +#include "../liblwgeom/liblwgeom.h" /* for lwgeom_install_default_allocators */ + + +/* liblwgeom allocator callback - install the defaults (malloc/free/stdout/stderr) */ +void lwgeom_init_allocators() +{ + lwgeom_install_default_allocators(); +} + + +/** + * Escape strings that are to be used as part of a PostgreSQL connection string. If no + * characters require escaping, simply return the input pointer. Otherwise return a + * new allocated string. + */ +char * +escape_connection_string(char *str) +{ + /* + * Escape apostrophes and backslashes: + * ' -> \' + * \ -> \\ + * + * 1. find # of characters + * 2. make new string + */ + + char *result; + char *ptr, *optr; + int toescape = 0; + size_t size; + + ptr = str; + + /* Count how many characters we need to escape so we know the size of the string we need to return */ + while (*ptr) + { + if (*ptr == '\'' || *ptr == '\\') + toescape++; + + ptr++; + } + + /* If we don't have to escape anything, simply return the input pointer */ + if (toescape == 0) + return str; + + size = ptr - str + toescape + 1; + result = calloc(1, size); + optr = result; + ptr = str; + + while (*ptr) + { + if (*ptr == '\'' || *ptr == '\\') + *optr++ = '\\'; + + *optr++ = *ptr++; + } + + *optr = '\0'; + + return result; +} diff -Nru postgis-1.5.3/loader/shpcommon.h postgis-2.0.1/loader/shpcommon.h --- postgis-1.5.3/loader/shpcommon.h 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/loader/shpcommon.h 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,48 @@ +/********************************************************************** + * $Id: shpcommon.h 5646 2010-05-27 13:19:12Z pramsey $ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * Copyright 2010 Mark Cave-Ayland + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#ifndef SHPCOMMON_H +#define SHPCOMMON_H + +/* For internationalization */ +#ifdef ENABLE_NLS +#include +#include +#define _(String) gettext(String) +#define PACKAGE "shp2pgsql" +#else +#define _(String) String +#endif + +typedef struct shp_connection_state +{ + /* PgSQL username to log in with */ + char *username; + + /* PgSQL password to log in with */ + char *password; + + /* PgSQL database to connect to */ + char *database; + + /* PgSQL port to connect to */ + char *port; + + /* PgSQL server to connect to */ + char *host; + +} SHPCONNECTIONCONFIG; + +/* External shared functions */ +char *escape_connection_string(char *str); + +#endif diff -Nru postgis-1.5.3/loader/shpopen.c postgis-2.0.1/loader/shpopen.c --- postgis-1.5.3/loader/shpopen.c 2010-09-10 20:44:05.000000000 +0000 +++ postgis-2.0.1/loader/shpopen.c 2012-02-27 22:08:12.000000000 +0000 @@ -1,5 +1,5 @@ /****************************************************************************** - * $Id: shpopen.c 5957 2010-09-10 20:44:05Z pramsey $ + * $Id: shpopen.c 9324 2012-02-27 22:08:12Z pramsey $ * * Project: Shapelib * Purpose: Implementation of core Shapefile read/write functions. @@ -34,6 +34,15 @@ ****************************************************************************** * * $Log: shpopen.c,v $ + * Revision 1.70 2011-07-24 05:59:25 fwarmerdam + * minimize use of CPLError in favor of SAHooks.Error() + * + * Revision 1.69 2011-07-24 03:24:22 fwarmerdam + * fix memory leaks in error cases creating shapefiles (#2061) + * + * Revision 1.68 2010-08-27 23:42:52 fwarmerdam + * add SHPAPI_CALL attribute in code + * * Revision 1.67 2010-07-01 08:15:48 fwarmerdam * do not error out on an object with zero vertices * @@ -255,7 +264,7 @@ #include #include -SHP_CVSID("$Id: shpopen.c 5957 2010-09-10 20:44:05Z pramsey $") +SHP_CVSID("$Id: shpopen.c 9324 2012-02-27 22:08:12Z pramsey $") typedef unsigned char uchar; @@ -328,7 +337,7 @@ /* contents of the index (.shx) file. */ /************************************************************************/ -void SHPWriteHeader( SHPHandle psSHP ) +void SHPAPI_CALL SHPWriteHeader( SHPHandle psSHP ) { uchar abyHeader[100]; @@ -480,7 +489,6 @@ uchar *pabyBuf; int i; double dValue; - int recordsInSHP; /* -------------------------------------------------------------------- */ /* Ensure the access string is one of the legal ones. We */ @@ -539,11 +547,11 @@ if( psSHP->fpSHP == NULL ) { -#ifdef USE_CPL - CPLError( CE_Failure, CPLE_OpenFailed, - "Unable to open %s.shp or %s.SHP.", + char *pszMessage = (char *) malloc(strlen(pszBasename)*2+256); + sprintf( pszMessage, "Unable to open %s.shp or %s.SHP.", pszBasename, pszBasename ); -#endif + psHooks->Error( pszMessage ); + free( pszMessage ); free( psSHP ); free( pszBasename ); free( pszFullname ); @@ -560,11 +568,12 @@ if( psSHP->fpSHX == NULL ) { -#ifdef USE_CPL - CPLError( CE_Failure, CPLE_OpenFailed, - "Unable to open %s.shx or %s.SHX.", + char *pszMessage = (char *) malloc(strlen(pszBasename)*2+256); + sprintf( pszMessage, "Unable to open %s.shx or %s.SHX.", pszBasename, pszBasename ); -#endif + psHooks->Error( pszMessage ); + free( pszMessage ); + psSHP->sHooks.FClose( psSHP->fpSHP ); free( psSHP ); free( pszBasename ); @@ -695,15 +704,14 @@ return( NULL ); } - recordsInSHP = (int) psSHP->sHooks.FRead( pabyBuf, 8, psSHP->nRecords, psSHP->fpSHX ); - if( recordsInSHP + if( (int) psSHP->sHooks.FRead( pabyBuf, 8, psSHP->nRecords, psSHP->fpSHX ) != psSHP->nRecords ) { char szError[200]; sprintf( szError, - "Failed to read all values for %d records in .shx file, %d expected.", - psSHP->nRecords, recordsInSHP ); + "Failed to read all values for %d records in .shx file.", + psSHP->nRecords ); psSHP->sHooks.Error( szError ); /* SHX is short or unreadable for some reason. */ @@ -839,9 +847,9 @@ SHPCreateLL( const char * pszLayer, int nShapeType, SAHooks *psHooks ) { - char *pszBasename, *pszFullname; + char *pszBasename = NULL, *pszFullname = NULL; int i; - SAFile fpSHP, fpSHX; + SAFile fpSHP = NULL, fpSHX = NULL; uchar abyHeader[100]; int32 i32; double dValue; @@ -878,7 +886,7 @@ if( fpSHP == NULL ) { psHooks->Error( "Failed to create file .shp file." ); - return( NULL ); + goto error; } sprintf( pszFullname, "%s.shx", pszBasename ); @@ -886,11 +894,11 @@ if( fpSHX == NULL ) { psHooks->Error( "Failed to create file .shx file." ); - return( NULL ); + goto error; } - free( pszFullname ); - free( pszBasename ); + free( pszFullname ); pszFullname = NULL; + free( pszBasename ); pszBasename = NULL; /* -------------------------------------------------------------------- */ /* Prepare header block for .shp file. */ @@ -925,7 +933,7 @@ if( psHooks->FWrite( abyHeader, 100, 1, fpSHP ) != 1 ) { psHooks->Error( "Failed to write .shp header." ); - return NULL; + goto error; } /* -------------------------------------------------------------------- */ @@ -938,7 +946,7 @@ if( psHooks->FWrite( abyHeader, 100, 1, fpSHX ) != 1 ) { psHooks->Error( "Failed to write .shx header." ); - return NULL; + goto error; } /* -------------------------------------------------------------------- */ @@ -948,6 +956,13 @@ psHooks->FClose( fpSHX ); return( SHPOpenLL( pszLayer, "r+b", psHooks ) ); + +error: + if (pszFullname) free(pszFullname); + if (pszBasename) free(pszBasename); + if (fpSHP) psHooks->FClose( fpSHP ); + if (fpSHX) psHooks->FClose( fpSHX ); + return NULL; } /************************************************************************/ diff -Nru postgis-1.5.3/loader/stringbuffer.c postgis-2.0.1/loader/stringbuffer.c --- postgis-1.5.3/loader/stringbuffer.c 2010-05-17 23:20:32.000000000 +0000 +++ postgis-2.0.1/loader/stringbuffer.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,570 +0,0 @@ -/* - * - * Copyright 2002 Thamer Alharbash - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. The names of the authors may not be used to endorse or promote - * products derived from this software without specific prior - * written permission. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Sringbuffer object: - * - * (*) allows printfing into a string, - * (*) fast string manipulation by keeping track of string length. - * (*) alignment of string against columns. - * - * Internally stringbuffer does not count the terminating null as the length. - * Therefore the raw string routines will always assume +1 when given length. - */ - -#include "stringbuffer.h" - -/* * * * * * * * * * * * * - * raw string routines. * - * * * * * * * * * * * * */ - -/* just malloc out a string. */ -static char *allocate_string(int len) -{ - char *s; - s = malloc(sizeof(char) * len + 1); /* add for null termination. */ - s[len] = 0; - return s; -} - -/* extend a string. */ -static char *extend_string(char *str, int cur_len, int ex_len) -{ - - str = realloc(str, (cur_len * sizeof(char)) + (ex_len * sizeof(char)) + (1 * sizeof(char))); - str[cur_len] = 0; /* make sure it's null terminated. */ - - return str; -} - -/* get a substring. */ -static char *substring(char *begin, int len) -{ - char *new_string; - - new_string = allocate_string(len); - memcpy(new_string, begin, len); - new_string[len] = 0; - - return new_string; -} - -/* FIXME: get rid of pesky strlen() */ -/* used in aligning -- we try to get words up to end. */ -static char *get_string_align(char *s, int end, int *len) -{ - char *cur_ptr; - - if (s == 0 || *s == 0) /* end of string or no string. */ - return NULL; - - /* if strlen is smaller than len go ahead and just return it. */ - if (strlen(s) < end) - { - *len = strlen(s); - return strdup(s); - } - - /* otherwise we need to hop to len */ - cur_ptr = &s[end - 1]; - - /* now check to see if we have a whitespace behind cur_ptr - * if we do return at that point. */ - - for (; cur_ptr != s; cur_ptr--) - { - if (*cur_ptr == ' ' || *cur_ptr == '\t') - { - /* copy here and return. */ - *len = (cur_ptr - s) + 1; - return (substring(s, *len)); - } - } - - /* keep walking till we find whitspace or end. */ - for (cur_ptr = &s[end - 1]; *cur_ptr != 0 && *cur_ptr != ' ' && *cur_ptr != '\t'; cur_ptr++); - - *len = (cur_ptr - s) + 1; - return (substring(s, *len)); -} - -/* zap newlines by placing spaces in their place. - * we use this before aligning. */ -static void stringbuffer_zap_newline(stringbuffer_t *sb) -{ - - stringbuffer_replace_c(sb, '\n', ' '); - stringbuffer_replace_c(sb, '\r', ' '); -} - -/* * * * * * * * * * * * * * * - * stringbuffer routines. * - * * * * * * * * * * * * * * */ - -/* create a new stringbuffer */ -stringbuffer_t *stringbuffer_create(void) -{ - stringbuffer_t *sb; - - sb = malloc(sizeof(stringbuffer_t)); - sb->len = 0; - sb->capacity = 0; - sb->buf = allocate_string(0); - - return sb; -} - -/* destroy the stringbuffer */ -void stringbuffer_destroy(stringbuffer_t *sb) -{ - free(sb->buf); - free(sb); -} - -/* clear a string. */ -void stringbuffer_clear(stringbuffer_t *sb) -{ - sb->len = 0; - sb->buf[0] = 0; -} - -/* append character to stringbuffer */ -void stringbuffer_append_c(stringbuffer_t *sb, char c) -{ - if (sb->capacity <= (sb->len)) - { - sb->buf = extend_string(sb->buf, sb->len, STRINGBUFFER_CHUNKSIZE); - sb->capacity += STRINGBUFFER_CHUNKSIZE; - } - - sb->buf[sb->len] = c; - sb->len++; - sb->buf[sb->len] = 0; -} - -/* append string to stringbuffer */ -void stringbuffer_append(stringbuffer_t *sb, const char *s) -{ - int len = strlen(s); - - /* increase capacity if needed. */ - if (sb->capacity <= (len + sb->len)) - { - - /* if we're bigger than the chunksize then allocate len. */ - if (len > STRINGBUFFER_CHUNKSIZE) - { - - sb->buf = extend_string(sb->buf, sb->capacity, len); - sb->capacity += len; - - } - else - { - - /* otherwise allocate chunksize. */ - sb->buf = extend_string(sb->buf, sb->capacity, STRINGBUFFER_CHUNKSIZE); - sb->capacity += STRINGBUFFER_CHUNKSIZE; - } - } - - /* copy new string into place: keep in mind we know all - * lengths so strcat() would be less effecient. */ - - memcpy(&sb->buf[sb->len], s, len); - - sb->len += len; - sb->buf[sb->len] = 0; - - return; -} - -/* remove whitespace (including tabs) */ -stringbuffer_t *stringbuffer_trim_whitespace(stringbuffer_t *sb) -{ - char *newbuf; - int new_len; - int i, j; - - if (sb->len == 0) /* empty string. */ - return sb; - - /* find beginning of string after tabs and whitespaces. */ - for (i = 0; i < sb->len && (sb->buf[i] == ' ' || sb->buf[i] == '\t'); i++); - - if (sb->buf[i] != '\0') - { - - /* we do have whitespace in the beginning so find the end. */ - for (j = (sb->len -1); (sb->buf[j] == ' ' || sb->buf[j] == '\t'); j--); - - /* increment j since it's on the non whitespace character. */ - j++; - - /* create a new string. */ - new_len = j - i; - newbuf = allocate_string(new_len); - - /* copy in. */ - memcpy(newbuf, &sb->buf[i], (j - i) * sizeof(char)); - newbuf[new_len] = 0; - - /* free up old. */ - free(sb->buf); - - /* set new. */ - sb->buf = newbuf; - sb->len = new_len; - sb->capacity = new_len; - - - } - else - { - - /* zap beginning of string. since its all whitespace. */ - sb->buf[0] = 0; - sb->len = 0; - } - - return sb; -} - -/* get the last occurance of a specific character. useful for slicing. */ -char *stringbuffer_get_last_occurance(stringbuffer_t *sb, char c) -{ - char *ptr, *ptrend = NULL; - int i; - - ptr = sb->buf; - for (i = 0; i < sb->len; i++) - { - - if (ptr[i] == c) - ptrend = &ptr[i]; - } - - return ptrend; -} - -/* remove the last newline character. */ -void stringbuffer_trim_newline(stringbuffer_t *sb) -{ - char *ptr; - - ptr = stringbuffer_get_last_occurance(sb, '\n'); - if (ptr != NULL) - *ptr = 0; - - - ptr = stringbuffer_get_last_occurance(sb, '\r'); - if (ptr != NULL) - *ptr = 0; - - - sb->len = strlen(sb->buf); - - return; -} - -/* return the C string from the buffer. */ -const char *stringbuffer_getstring(stringbuffer_t *sb) -{ - return sb->buf; -} - -/* set a string into a stringbuffer */ -void stringbuffer_set(stringbuffer_t *dest, const char *s) -{ - stringbuffer_clear(dest); /* zap */ - stringbuffer_append(dest, s); -} - -/* copy a stringbuffer into another stringbuffer */ -void stringbuffer_copy(stringbuffer_t *dest, stringbuffer_t *src) -{ - stringbuffer_set(dest, stringbuffer_getstring(src)); -} - -/* replace in stringbuffer occurances of c with replace */ -void stringbuffer_replace_c(stringbuffer_t *sb, char c, char replace) -{ - int i; - - for (i = 0; i < sb->len; i++) - { - if (sb->buf[i] == c) - sb->buf[i] = replace; - } - - return; -} - -/* replace in stringbuffer occurances of c with replace */ -void stringbuffer_replace(stringbuffer_t *sb, const char *string, const char *replace) -{ - char *ptr; - int i; - int str_len = strlen(string); - stringbuffer_t *sb_replace; - - if (string[0] == 0) - return; /* nothing to replace. */ - - sb_replace = stringbuffer_create(); - ptr = sb->buf; - - for (i = 0; i < sb->len; i++) - { - - if ((sb->len - i) < str_len) - { - - /* copy in. */ - stringbuffer_copy(sb, sb_replace); - - /* append what's left. */ - stringbuffer_append(sb, &ptr[i]); - - /* free up. */ - stringbuffer_destroy(sb_replace); - - /* we're done. */ - return; - } - - if (ptr[i] == string[0]) - { - - /* we know that we have at least enough to complete string. */ - if (!memcmp(&ptr[i], string, str_len)) - { - - /* we have a match, replace. */ - stringbuffer_append(sb_replace, replace); - i += (str_len - 1); - continue; - } - } - - stringbuffer_append_c(sb_replace, ptr[i]); - } - - /* we're done: we should only get here if the last string to - be replaced ended the string itself. */ - - /* copy in. */ - stringbuffer_copy(sb, sb_replace); - - /* free up. */ - stringbuffer_destroy(sb_replace); - - /* we're done. */ - return; - -} - -/* align a stringbuffer on begin and end columns. */ -void stringbuffer_align(stringbuffer_t *sb, int begin, int end) -{ - char *ptr, *word_string; - stringbuffer_t *aligned_string; - int len, i; - - stringbuffer_zap_newline(sb); - - aligned_string = stringbuffer_create(); - ptr = sb->buf; - - while (1) - { - - word_string = get_string_align(ptr, end, &len); - - if (word_string == NULL) - break; - - ptr += len; - - for (i = 0; i < begin; i++) - stringbuffer_append(aligned_string, " "); - - stringbuffer_append(aligned_string, word_string); - stringbuffer_append(aligned_string, "\n"); - free(word_string); - - } - - stringbuffer_copy(sb, aligned_string); - stringbuffer_destroy(aligned_string); - - return; -} - -/* stringbuffer_*printf* these all use snprintf/snvprintf internally */ - -/* append vprintf with alignment. */ -void stringbuffer_avprintf_align(stringbuffer_t *sb, int start, int end, const char *fmt, va_list ap) -{ - stringbuffer_t *tmp_sb; - char *str; - int total, len; - - /* our first malloc is bogus. */ - len = 1; - str = malloc(sizeof(char) * len); - total = vsnprintf(str, len, fmt, ap); - - /* total is the real length needed. */ - free(str); - len = total + 1; - str = malloc(sizeof(char) * len); - vsnprintf(str, len, fmt, ap); - - /* now align if we want to align. */ - if (start != 0 && end != 0) - { - - tmp_sb = stringbuffer_create(); - - stringbuffer_append(tmp_sb, str); - stringbuffer_align(tmp_sb, start, end); - stringbuffer_append(sb, stringbuffer_getstring(tmp_sb)); - - stringbuffer_destroy(tmp_sb); - - } - else - { - stringbuffer_append(sb, str); - } - - free(str); - - return; -} - -/* append printf. */ -void stringbuffer_aprintf(stringbuffer_t *sb, const char *fmt, ...) -{ - va_list ap; - - va_start(ap, fmt); - - stringbuffer_avprintf(sb, fmt, ap); - - va_end(ap); -} - -/* append printf with alignment. */ -void stringbuffer_aprintf_align(stringbuffer_t *sb, int start, int end, const char *fmt, ...) -{ - va_list ap; - - va_start(ap, fmt); - - stringbuffer_avprintf_align(sb, start, end, fmt, ap); - - va_end(ap); -} - -/* append vprintf. */ -void stringbuffer_avprintf(stringbuffer_t *sb, const char *fmt, va_list ap) -{ - stringbuffer_avprintf_align(sb, 0, 0, fmt, ap); -} - -/* newline marking and sweeping. this wrecks the string inside - * the stringbuffer. */ - -/* mark newlines to walk through. - * our sentinel is the null terminator. - * two null terminations marks the end of the string. - * we're guaranteed it is a unique sentinel since - * we never accept null terminators from outside sources - * and never build our own strings (obviously!) with - * null terminators inside of them. - */ -int stringbuffer_marknewlines(stringbuffer_t *sb) -{ - char *c; - int newline_count = 0; - - /* first append one null termination to the end - * to act as a proper terminator. */ - stringbuffer_append_c(sb, 0); - - - c = sb->buf; - while (1) - { - - if (*c == '\n') - { - newline_count++; - *c = 0; - } - - c++; - if (*c == 0) - break; - } - - return newline_count; /* return our line count. */ -} - -/* called _after_ newlines are marked. */ -const char *stringbuffer_getnextline(stringbuffer_t *sb, const char *cptr) -{ - const char *ptr; - - if (cptr == NULL) - { - - /* get first line. */ - cptr = sb->buf; - - } - else - { - - for (ptr = cptr; *ptr != 0; ptr++); - if (*ptr == 0 && *(ptr + 1) == 0) - { - return NULL; - - } - else - { - cptr = ptr + 1; - - } - } - - return cptr; -} - -int stringbuffer_getlen(stringbuffer_t *sb) -{ - return sb->len; -} - - diff -Nru postgis-1.5.3/loader/stringbuffer.h postgis-2.0.1/loader/stringbuffer.h --- postgis-1.5.3/loader/stringbuffer.h 2009-06-11 16:44:03.000000000 +0000 +++ postgis-2.0.1/loader/stringbuffer.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,68 +0,0 @@ -/* - * - * Copyright 2002 Thamer Alharbash - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. The names of the authors may not be used to endorse or promote - * products derived from this software without specific prior - * written permission. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Sringbuffer object: - * - * (*) allows printfing into a string, - * (*) fast string manipulation by keeping track of string length. - * (*) alignment of string against columns. - * - * Internally stringbuffer does not count the terminating null as the length. - * Therefore the raw string routines will always assume +1 when given length. - */ - -#include -#include -#include -#include - -#define STRINGBUFFER_CHUNKSIZE 16 - -typedef struct -{ - size_t len; - size_t capacity; - char *buf; -} -stringbuffer_t; - -extern stringbuffer_t *stringbuffer_create(void); -extern void stringbuffer_destroy(stringbuffer_t *sb); -extern void stringbuffer_clear(stringbuffer_t *sb); -extern void stringbuffer_append_c(stringbuffer_t *sb, char c); -extern void stringbuffer_append(stringbuffer_t *sb, const char *s); -extern stringbuffer_t *stringbuffer_trim_whitespace(stringbuffer_t *sb); -extern char *stringbuffer_get_last_occurance(stringbuffer_t *sb, char c); -extern void stringbuffer_trim_newline(stringbuffer_t *sb); -extern const char *stringbuffer_getstring(stringbuffer_t *sb); -extern void stringbuffer_set(stringbuffer_t *dest, const char *s); -extern void stringbuffer_copy(stringbuffer_t *dest, stringbuffer_t *src); -extern void stringbuffer_replace_c(stringbuffer_t *sb, char c, char replace); -extern void stringbuffer_replace(stringbuffer_t *sb, const char *string, const char *replace); -extern void stringbuffer_align(stringbuffer_t *sb, int begin, int end); -extern void stringbuffer_avprintf_align(stringbuffer_t *sb, int start, int end, const char *fmt, va_list ap); -extern void stringbuffer_aprintf(stringbuffer_t *sb, const char *fmt, ...); -extern void stringbuffer_aprintf_align(stringbuffer_t *sb, int start, int end, const char *fmt, ...); -extern void stringbuffer_avprintf(stringbuffer_t *sb, const char *fmt, va_list ap); -extern int stringbuffer_marknewlines(stringbuffer_t *sb); -extern const char *stringbuffer_getnextline(stringbuffer_t *sb, const char *cptr); -extern int stringbuffer_getlen(stringbuffer_t *sb); diff -Nru postgis-1.5.3/ltmain.sh postgis-2.0.1/ltmain.sh --- postgis-1.5.3/ltmain.sh 2011-06-25 16:29:36.000000000 +0000 +++ postgis-2.0.1/ltmain.sh 2012-06-22 21:04:13.000000000 +0000 @@ -1,9 +1,9 @@ -# libtool (GNU libtool) 2.4 +# libtool (GNU libtool) 2.4.2 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, -# 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -41,6 +41,7 @@ # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) +# --no-warn don't display warning messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages @@ -69,7 +70,7 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.4 +# $progname: (GNU libtool) 2.4.2 # automake: $automake_version # autoconf: $autoconf_version # @@ -79,9 +80,9 @@ PROGRAM=libtool PACKAGE=libtool -VERSION=2.4 +VERSION=2.4.2 TIMESTAMP="" -package_revision=1.3293 +package_revision=1.3337 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then @@ -136,15 +137,10 @@ : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} -: ${EGREP="grep -E"} -: ${FGREP="grep -F"} -: ${GREP="grep"} -: ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} -: ${SED="sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} @@ -387,7 +383,7 @@ ;; *) save_IFS="$IFS" - IFS=: + IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break @@ -771,8 +767,8 @@ s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ - s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ + s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ + s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ p d } @@ -1052,6 +1048,7 @@ opt_help=false opt_help_all=false opt_silent=: +opt_warning=: opt_verbose=: opt_silent=false opt_verbose=false @@ -1120,6 +1117,10 @@ opt_silent=false func_append preserve_args " $opt" ;; + --no-warning|--no-warn) + opt_warning=false +func_append preserve_args " $opt" + ;; --no-verbose) opt_verbose=false func_append preserve_args " $opt" @@ -2059,7 +2060,7 @@ *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ - *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup) + *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; @@ -3201,11 +3202,13 @@ # Set up the ranlib parameters. oldlib="$destdir/$name" + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then - func_show_eval "$old_striplib $oldlib" 'exit $?' + func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. @@ -3470,7 +3473,7 @@ # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; @@ -3982,14 +3985,17 @@ # launches target application with the remaining arguments. func_exec_program () { - for lt_wr_arg - do - case \$lt_wr_arg in - --lt-*) ;; - *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; - esac - shift - done + case \" \$* \" in + *\\ --lt-*) + for lt_wr_arg + do + case \$lt_wr_arg in + --lt-*) ;; + *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; + esac + shift + done ;; + esac func_exec_program_core \${1+\"\$@\"} } @@ -5057,9 +5063,15 @@ { EOF func_emit_wrapper yes | - $SED -e 's/\([\\"]\)/\\\1/g' \ - -e 's/^/ fputs ("/' -e 's/$/\\n", f);/' - + $SED -n -e ' +s/^\(.\{79\}\)\(..*\)/\1\ +\2/ +h +s/\([\\"]\)/\\\1/g +s/$/\\n/ +s/\([^\n]*\).*/ fputs ("\1", f);/p +g +D' cat <<"EOF" } EOF @@ -5643,7 +5655,8 @@ continue ;; - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" @@ -6147,7 +6160,8 @@ lib= found=no case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" @@ -6831,7 +6845,7 @@ test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" + add_dir="-L$absdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in @@ -7316,6 +7330,7 @@ # which has an extra 1 added just for fun # case $version_type in + # correct linux to gnu/linux during the next big refactor darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result @@ -7432,7 +7447,7 @@ versuffix="$major.$revision" ;; - linux) + linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" @@ -8020,6 +8035,11 @@ # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then + # Remove ${wl} instances when linking with ld. + # FIXME: should test the right _cmds variable. + case $archive_cmds in + *\$LD\ *) wl= ;; + esac if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= @@ -8050,7 +8070,7 @@ elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; - *) func_apped perm_rpath " $libdir" ;; + *) func_append perm_rpath " $libdir" ;; esac fi done @@ -8058,11 +8078,7 @@ if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" - if test -n "$hardcode_libdir_flag_spec_ld"; then - eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" - else - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi + eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. @@ -9152,6 +9168,8 @@ esac done fi + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" @@ -9261,7 +9279,8 @@ *.la) func_basename "$deplib" name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + func_resolve_sysroot "$deplib" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" diff -Nru postgis-1.5.3/macros/codeset.m4 postgis-2.0.1/macros/codeset.m4 --- postgis-1.5.3/macros/codeset.m4 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/macros/codeset.m4 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,21 @@ +# codeset.m4 serial 2 (gettext-0.16) +dnl Copyright (C) 2000-2002, 2006 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +AC_DEFUN([AM_LANGINFO_CODESET], +[ + AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, + [AC_TRY_LINK([#include ], + [char* cs = nl_langinfo(CODESET); return !cs;], + am_cv_langinfo_codeset=yes, + am_cv_langinfo_codeset=no) + ]) + if test $am_cv_langinfo_codeset = yes; then + AC_DEFINE(HAVE_LANGINFO_CODESET, 1, + [Define if you have and nl_langinfo(CODESET).]) + fi +]) diff -Nru postgis-1.5.3/macros/gettext.m4 postgis-2.0.1/macros/gettext.m4 --- postgis-1.5.3/macros/gettext.m4 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/macros/gettext.m4 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,384 @@ +# gettext.m4 serial 60 (gettext-0.17) +dnl Copyright (C) 1995-2007 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995-2000. +dnl Bruno Haible , 2000-2006. + +dnl Modified 20120114 to not insist on _nl_expand_alias, so that it +dnl will find and accept gettext 0.14, because postgis does not +dnl actually require any 0.17 features. + +dnl Macro to add for using GNU gettext. + +dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). +dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The +dnl default (if it is not specified or empty) is 'no-libtool'. +dnl INTLSYMBOL should be 'external' for packages with no intl directory, +dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. +dnl If INTLSYMBOL is 'use-libtool', then a libtool library +dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, +dnl depending on --{enable,disable}-{shared,static} and on the presence of +dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library +dnl $(top_builddir)/intl/libintl.a will be created. +dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext +dnl implementations (in libc or libintl) without the ngettext() function +dnl will be ignored. If NEEDSYMBOL is specified and is +dnl 'need-formatstring-macros', then GNU gettext implementations that don't +dnl support the ISO C 99 formatstring macros will be ignored. +dnl INTLDIR is used to find the intl libraries. If empty, +dnl the value `$(top_builddir)/intl/' is used. +dnl +dnl The result of the configuration is one of three cases: +dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled +dnl and used. +dnl Catalog format: GNU --> install in $(datadir) +dnl Catalog extension: .mo after installation, .gmo in source tree +dnl 2) GNU gettext has been found in the system's C library. +dnl Catalog format: GNU --> install in $(datadir) +dnl Catalog extension: .mo after installation, .gmo in source tree +dnl 3) No internationalization, always use English msgid. +dnl Catalog format: none +dnl Catalog extension: none +dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. +dnl The use of .gmo is historical (it was needed to avoid overwriting the +dnl GNU format catalogs when building on a platform with an X/Open gettext), +dnl but we keep it in order not to force irrelevant filename changes on the +dnl maintainers. +dnl +AC_DEFUN([AM_GNU_GETTEXT], +[ + dnl Argument checking. + ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , + [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT +])])])])]) + ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , + [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT +])])])]) + define([gt_included_intl], + ifelse([$1], [external], + ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]), + [yes])) + define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) + gt_NEEDS_INIT + AM_GNU_GETTEXT_NEED([$2]) + + AC_REQUIRE([AM_PO_SUBDIRS])dnl + ifelse(gt_included_intl, yes, [ + AC_REQUIRE([AM_INTL_SUBDIR])dnl + ]) + + dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + + dnl Sometimes libintl requires libiconv, so first search for libiconv. + dnl Ideally we would do this search only after the + dnl if test "$USE_NLS" = "yes"; then + dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then + dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT + dnl the configure script would need to contain the same shell code + dnl again, outside any 'if'. There are two solutions: + dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. + dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. + dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not + dnl documented, we avoid it. + ifelse(gt_included_intl, yes, , [ + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) + ]) + + dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation. + gt_INTL_MACOSX + + dnl Set USE_NLS. + AC_REQUIRE([AM_NLS]) + + ifelse(gt_included_intl, yes, [ + BUILD_INCLUDED_LIBINTL=no + USE_INCLUDED_LIBINTL=no + ]) + LIBINTL= + LTLIBINTL= + POSUB= + + dnl Add a version number to the cache macros. + case " $gt_needs " in + *" need-formatstring-macros "*) gt_api_version=3 ;; + *" need-ngettext "*) gt_api_version=2 ;; + *) gt_api_version=1 ;; + esac + gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" + gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" + + dnl If we use NLS figure out what method + if test "$USE_NLS" = "yes"; then + gt_use_preinstalled_gnugettext=no + ifelse(gt_included_intl, yes, [ + AC_MSG_CHECKING([whether included gettext is requested]) + AC_ARG_WITH(included-gettext, + [ --with-included-gettext use the GNU gettext library included here], + nls_cv_force_use_gnu_gettext=$withval, + nls_cv_force_use_gnu_gettext=no) + AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) + + nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" + if test "$nls_cv_force_use_gnu_gettext" != "yes"; then + ]) + dnl User does not insist on using GNU NLS library. Figure out what + dnl to use. If GNU gettext is available we use this. Else we have + dnl to fall back to GNU NLS library. + + if test $gt_api_version -ge 3; then + gt_revision_test_code=' +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) +#endif +changequote(,)dnl +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; +changequote([,])dnl +' + else + gt_revision_test_code= + fi + if test $gt_api_version -ge 2; then + gt_expression_test_code=' + * ngettext ("", "", 0)' + else + gt_expression_test_code= + fi + + AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc], + [AC_TRY_LINK([#include +$gt_revision_test_code +extern int _nl_msg_cat_cntr; +extern int *_nl_domain_bindings;], + [bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings], + [eval "$gt_func_gnugettext_libc=yes"], + [eval "$gt_func_gnugettext_libc=no"])]) + + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then + dnl Sometimes libintl requires libiconv, so first search for libiconv. + ifelse(gt_included_intl, yes, , [ + AM_ICONV_LINK + ]) + dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL + dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) + dnl because that would add "-liconv" to LIBINTL and LTLIBINTL + dnl even if libiconv doesn't exist. + AC_LIB_LINKFLAGS_BODY([intl]) + AC_CACHE_CHECK([for GNU gettext in libintl], + [$gt_func_gnugettext_libintl], + [gt_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $INCINTL" + gt_save_LIBS="$LIBS" + LIBS="$LIBS $LIBINTL" + dnl Now see whether libintl exists and does not depend on libiconv. + AC_TRY_LINK([#include +$gt_revision_test_code +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif], + [bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr], + [eval "$gt_func_gnugettext_libintl=yes"], + [eval "$gt_func_gnugettext_libintl=no"]) + dnl Now see whether libintl exists and depends on libiconv. + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then + LIBS="$LIBS $LIBICONV" + AC_TRY_LINK([#include +$gt_revision_test_code +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (const char *);], + [bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], + [LIBINTL="$LIBINTL $LIBICONV" + LTLIBINTL="$LTLIBINTL $LTLIBICONV" + eval "$gt_func_gnugettext_libintl=yes" + ]) + fi + CPPFLAGS="$gt_save_CPPFLAGS" + LIBS="$gt_save_LIBS"]) + fi + + dnl If an already present or preinstalled GNU gettext() is found, + dnl use it. But if this macro is used in GNU gettext, and GNU + dnl gettext is already preinstalled in libintl, we update this + dnl libintl. (Cf. the install rule in intl/Makefile.in.) + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ + || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ + && test "$PACKAGE" != gettext-runtime \ + && test "$PACKAGE" != gettext-tools; }; then + gt_use_preinstalled_gnugettext=yes + else + dnl Reset the values set by searching for libintl. + LIBINTL= + LTLIBINTL= + INCINTL= + fi + + ifelse(gt_included_intl, yes, [ + if test "$gt_use_preinstalled_gnugettext" != "yes"; then + dnl GNU gettext is not found in the C library. + dnl Fall back on included GNU gettext library. + nls_cv_use_gnu_gettext=yes + fi + fi + + if test "$nls_cv_use_gnu_gettext" = "yes"; then + dnl Mark actions used to generate GNU NLS library. + BUILD_INCLUDED_LIBINTL=yes + USE_INCLUDED_LIBINTL=yes + LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD" + LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD" + LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` + fi + + CATOBJEXT= + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + dnl Mark actions to use GNU gettext tools. + CATOBJEXT=.gmo + fi + ]) + + if test -n "$INTL_MACOSX_LIBS"; then + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + dnl Some extra flags are needed during linking. + LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" + LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" + fi + fi + + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + AC_DEFINE(ENABLE_NLS, 1, + [Define to 1 if translation of program messages to the user's native language + is requested.]) + else + USE_NLS=no + fi + fi + + AC_MSG_CHECKING([whether to use NLS]) + AC_MSG_RESULT([$USE_NLS]) + if test "$USE_NLS" = "yes"; then + AC_MSG_CHECKING([where the gettext function comes from]) + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then + gt_source="external libintl" + else + gt_source="libc" + fi + else + gt_source="included intl directory" + fi + AC_MSG_RESULT([$gt_source]) + fi + + if test "$USE_NLS" = "yes"; then + + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then + AC_MSG_CHECKING([how to link with libintl]) + AC_MSG_RESULT([$LIBINTL]) + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) + fi + + dnl For backward compatibility. Some packages may be using this. + AC_DEFINE(HAVE_GETTEXT, 1, + [Define if the GNU gettext() function is already present or preinstalled.]) + AC_DEFINE(HAVE_DCGETTEXT, 1, + [Define if the GNU dcgettext() function is already present or preinstalled.]) + fi + + dnl We need to process the po/ directory. + POSUB=po + fi + + ifelse(gt_included_intl, yes, [ + dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL + dnl to 'yes' because some of the testsuite requires it. + if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then + BUILD_INCLUDED_LIBINTL=yes + fi + + dnl Make all variables we use known to autoconf. + AC_SUBST(BUILD_INCLUDED_LIBINTL) + AC_SUBST(USE_INCLUDED_LIBINTL) + AC_SUBST(CATOBJEXT) + + dnl For backward compatibility. Some configure.ins may be using this. + nls_cv_header_intl= + nls_cv_header_libgt= + + dnl For backward compatibility. Some Makefiles may be using this. + DATADIRNAME=share + AC_SUBST(DATADIRNAME) + + dnl For backward compatibility. Some Makefiles may be using this. + INSTOBJEXT=.mo + AC_SUBST(INSTOBJEXT) + + dnl For backward compatibility. Some Makefiles may be using this. + GENCAT=gencat + AC_SUBST(GENCAT) + + dnl For backward compatibility. Some Makefiles may be using this. + INTLOBJS= + if test "$USE_INCLUDED_LIBINTL" = yes; then + INTLOBJS="\$(GETTOBJS)" + fi + AC_SUBST(INTLOBJS) + + dnl Enable libtool support if the surrounding package wishes it. + INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix + AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) + ]) + + dnl For backward compatibility. Some Makefiles may be using this. + INTLLIBS="$LIBINTL" + AC_SUBST(INTLLIBS) + + dnl Make all documented variables known to autoconf. + AC_SUBST(LIBINTL) + AC_SUBST(LTLIBINTL) + AC_SUBST(POSUB) +]) + + +dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized. +m4_define([gt_NEEDS_INIT], +[ + m4_divert_text([DEFAULTS], [gt_needs=]) + m4_define([gt_NEEDS_INIT], []) +]) + + +dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL]) +AC_DEFUN([AM_GNU_GETTEXT_NEED], +[ + m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"]) +]) + + +dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) +AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) diff -Nru postgis-1.5.3/macros/iconv.m4 postgis-2.0.1/macros/iconv.m4 --- postgis-1.5.3/macros/iconv.m4 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/macros/iconv.m4 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,180 @@ +# iconv.m4 serial AM6 (gettext-0.17) +dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], +[ + dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV + dnl accordingly. + AC_LIB_LINKFLAGS_BODY([iconv]) +]) + +AC_DEFUN([AM_ICONV_LINK], +[ + dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and + dnl those with the standalone portable GNU libiconv installed). + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV + dnl accordingly. + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) + + dnl Add $INCICONV to CPPFLAGS before performing the following checks, + dnl because if the user has installed libiconv and not disabled its use + dnl via --without-libiconv-prefix, he wants to use it. The first + dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. + am_save_CPPFLAGS="$CPPFLAGS" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) + + AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [ + am_cv_func_iconv="no, consider installing GNU libiconv" + am_cv_lib_iconv=no + AC_TRY_LINK([#include +#include ], + [iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);], + am_cv_func_iconv=yes) + if test "$am_cv_func_iconv" != yes; then + am_save_LIBS="$LIBS" + LIBS="$LIBS $LIBICONV" + AC_TRY_LINK([#include +#include ], + [iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);], + am_cv_lib_iconv=yes + am_cv_func_iconv=yes) + LIBS="$am_save_LIBS" + fi + ]) + if test "$am_cv_func_iconv" = yes; then + AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [ + dnl This tests against bugs in AIX 5.1 and HP-UX 11.11. + am_save_LIBS="$LIBS" + if test $am_cv_lib_iconv = yes; then + LIBS="$LIBS $LIBICONV" + fi + AC_TRY_RUN([ +#include +#include +int main () +{ + /* Test against AIX 5.1 bug: Failures are not distinguishable from successful + returns. */ + { + iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); + if (cd_utf8_to_88591 != (iconv_t)(-1)) + { + static const char input[] = "\342\202\254"; /* EURO SIGN */ + char buf[10]; + const char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_utf8_to_88591, + (char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res == 0) + return 1; + } + } +#if 0 /* This bug could be worked around by the caller. */ + /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ + { + iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); + if (cd_88591_to_utf8 != (iconv_t)(-1)) + { + static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; + char buf[50]; + const char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_88591_to_utf8, + (char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); + if ((int)res > 0) + return 1; + } + } +#endif + /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is + provided. */ + if (/* Try standardized names. */ + iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) + /* Try IRIX, OSF/1 names. */ + && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) + /* Try AIX names. */ + && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) + /* Try HP-UX names. */ + && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) + return 1; + return 0; +}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no], + [case "$host_os" in + aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; + *) am_cv_func_iconv_works="guessing yes" ;; + esac]) + LIBS="$am_save_LIBS" + ]) + case "$am_cv_func_iconv_works" in + *no) am_func_iconv=no am_cv_lib_iconv=no ;; + *) am_func_iconv=yes ;; + esac + else + am_func_iconv=no am_cv_lib_iconv=no + fi + if test "$am_func_iconv" = yes; then + AC_DEFINE(HAVE_ICONV, 1, + [Define if you have the iconv() function and it works.]) + fi + if test "$am_cv_lib_iconv" = yes; then + AC_MSG_CHECKING([how to link with libiconv]) + AC_MSG_RESULT([$LIBICONV]) + else + dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV + dnl either. + CPPFLAGS="$am_save_CPPFLAGS" + LIBICONV= + LTLIBICONV= + fi + AC_SUBST(LIBICONV) + AC_SUBST(LTLIBICONV) +]) + +AC_DEFUN([AM_ICONV], +[ + AM_ICONV_LINK + if test "$am_cv_func_iconv" = yes; then + AC_MSG_CHECKING([for iconv declaration]) + AC_CACHE_VAL(am_cv_proto_iconv, [ + AC_TRY_COMPILE([ +#include +#include +extern +#ifdef __cplusplus +"C" +#endif +#if defined(__STDC__) || defined(__cplusplus) +size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); +#else +size_t iconv(); +#endif +], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") + am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) + am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` + AC_MSG_RESULT([$]{ac_t:- + }[$]am_cv_proto_iconv) + AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, + [Define as const if the declaration of iconv() needs const.]) + fi +]) diff -Nru postgis-1.5.3/macros/intl.m4 postgis-2.0.1/macros/intl.m4 --- postgis-1.5.3/macros/intl.m4 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/macros/intl.m4 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,285 @@ +# intl.m4 serial 8 (gettext-0.17) +dnl Copyright (C) 1995-2007 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995-2000. +dnl Bruno Haible , 2000-2006. + +AC_PREREQ(2.52) + +dnl Checks for all prerequisites of the intl subdirectory, +dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, +dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL. +AC_DEFUN([AM_INTL_SUBDIR], +[ + AC_REQUIRE([AC_PROG_INSTALL])dnl + AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake + AC_REQUIRE([AC_PROG_CC])dnl + AC_REQUIRE([AC_CANONICAL_HOST])dnl + AC_REQUIRE([gt_GLIBC2])dnl + AC_REQUIRE([AC_PROG_RANLIB])dnl + AC_REQUIRE([gl_VISIBILITY])dnl + AC_REQUIRE([gt_INTL_SUBDIR_CORE])dnl + AC_REQUIRE([AC_TYPE_LONG_LONG_INT])dnl + AC_REQUIRE([gt_TYPE_WCHAR_T])dnl + AC_REQUIRE([gt_TYPE_WINT_T])dnl + AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) + AC_REQUIRE([gt_TYPE_INTMAX_T]) + AC_REQUIRE([gt_PRINTF_POSIX]) + AC_REQUIRE([gl_GLIBC21])dnl + AC_REQUIRE([gl_XSIZE])dnl + AC_REQUIRE([gt_INTL_MACOSX])dnl + + AC_CHECK_TYPE([ptrdiff_t], , + [AC_DEFINE([ptrdiff_t], [long], + [Define as the type of the result of subtracting two pointers, if the system doesn't define it.]) + ]) + AC_CHECK_HEADERS([stddef.h stdlib.h string.h]) + AC_CHECK_FUNCS([asprintf fwprintf putenv setenv setlocale snprintf wcslen]) + + dnl Use the _snprintf function only if it is declared (because on NetBSD it + dnl is defined as a weak alias of snprintf; we prefer to use the latter). + gt_CHECK_DECL(_snprintf, [#include ]) + gt_CHECK_DECL(_snwprintf, [#include ]) + + dnl Use the *_unlocked functions only if they are declared. + dnl (because some of them were defined without being declared in Solaris + dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built + dnl on Solaris 2.5.1 to run on Solaris 2.6). + dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13. + gt_CHECK_DECL(getc_unlocked, [#include ]) + + case $gt_cv_func_printf_posix in + *yes) HAVE_POSIX_PRINTF=1 ;; + *) HAVE_POSIX_PRINTF=0 ;; + esac + AC_SUBST([HAVE_POSIX_PRINTF]) + if test "$ac_cv_func_asprintf" = yes; then + HAVE_ASPRINTF=1 + else + HAVE_ASPRINTF=0 + fi + AC_SUBST([HAVE_ASPRINTF]) + if test "$ac_cv_func_snprintf" = yes; then + HAVE_SNPRINTF=1 + else + HAVE_SNPRINTF=0 + fi + AC_SUBST([HAVE_SNPRINTF]) + if test "$ac_cv_func_wprintf" = yes; then + HAVE_WPRINTF=1 + else + HAVE_WPRINTF=0 + fi + AC_SUBST([HAVE_WPRINTF]) + + AM_LANGINFO_CODESET + gt_LC_MESSAGES + + dnl Compilation on mingw and Cygwin needs special Makefile rules, because + dnl 1. when we install a shared library, we must arrange to export + dnl auxiliary pointer variables for every exported variable, + dnl 2. when we install a shared library and a static library simultaneously, + dnl the include file specifies __declspec(dllimport) and therefore we + dnl must arrange to define the auxiliary pointer variables for the + dnl exported variables _also_ in the static library. + if test "$enable_shared" = yes; then + case "$host_os" in + mingw* | cygwin*) is_woe32dll=yes ;; + *) is_woe32dll=no ;; + esac + else + is_woe32dll=no + fi + WOE32DLL=$is_woe32dll + AC_SUBST([WOE32DLL]) + + dnl On mingw and Cygwin, we can activate special Makefile rules which add + dnl version information to the shared libraries and executables. + case "$host_os" in + mingw* | cygwin*) is_woe32=yes ;; + *) is_woe32=no ;; + esac + WOE32=$is_woe32 + AC_SUBST([WOE32]) + if test $WOE32 = yes; then + dnl Check for a program that compiles Windows resource files. + AC_CHECK_TOOL([WINDRES], [windres]) + fi + + dnl Determine whether when creating a library, "-lc" should be passed to + dnl libtool or not. On many platforms, it is required for the libtool option + dnl -no-undefined to work. On HP-UX, however, the -lc - stored by libtool + dnl in the *.la files - makes it impossible to create multithreaded programs, + dnl because libtool also reorders the -lc to come before the -pthread, and + dnl this disables pthread_create() . + case "$host_os" in + hpux*) LTLIBC="" ;; + *) LTLIBC="-lc" ;; + esac + AC_SUBST([LTLIBC]) + + dnl Rename some macros and functions used for locking. + AH_BOTTOM([ +#define __libc_lock_t gl_lock_t +#define __libc_lock_define gl_lock_define +#define __libc_lock_define_initialized gl_lock_define_initialized +#define __libc_lock_init gl_lock_init +#define __libc_lock_lock gl_lock_lock +#define __libc_lock_unlock gl_lock_unlock +#define __libc_lock_recursive_t gl_recursive_lock_t +#define __libc_lock_define_recursive gl_recursive_lock_define +#define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized +#define __libc_lock_init_recursive gl_recursive_lock_init +#define __libc_lock_lock_recursive gl_recursive_lock_lock +#define __libc_lock_unlock_recursive gl_recursive_lock_unlock +#define glthread_in_use libintl_thread_in_use +#define glthread_lock_init libintl_lock_init +#define glthread_lock_lock libintl_lock_lock +#define glthread_lock_unlock libintl_lock_unlock +#define glthread_lock_destroy libintl_lock_destroy +#define glthread_rwlock_init libintl_rwlock_init +#define glthread_rwlock_rdlock libintl_rwlock_rdlock +#define glthread_rwlock_wrlock libintl_rwlock_wrlock +#define glthread_rwlock_unlock libintl_rwlock_unlock +#define glthread_rwlock_destroy libintl_rwlock_destroy +#define glthread_recursive_lock_init libintl_recursive_lock_init +#define glthread_recursive_lock_lock libintl_recursive_lock_lock +#define glthread_recursive_lock_unlock libintl_recursive_lock_unlock +#define glthread_recursive_lock_destroy libintl_recursive_lock_destroy +#define glthread_once libintl_once +#define glthread_once_call libintl_once_call +#define glthread_once_singlethreaded libintl_once_singlethreaded +]) +]) + + +dnl Checks for the core files of the intl subdirectory: +dnl dcigettext.c +dnl eval-plural.h +dnl explodename.c +dnl finddomain.c +dnl gettextP.h +dnl gmo.h +dnl hash-string.h hash-string.c +dnl l10nflist.c +dnl libgnuintl.h.in (except the *printf stuff) +dnl loadinfo.h +dnl loadmsgcat.c +dnl localealias.c +dnl log.c +dnl plural-exp.h plural-exp.c +dnl plural.y +dnl Used by libglocale. +AC_DEFUN([gt_INTL_SUBDIR_CORE], +[ + AC_REQUIRE([AC_C_INLINE])dnl + AC_REQUIRE([AC_TYPE_SIZE_T])dnl + AC_REQUIRE([gl_AC_HEADER_STDINT_H]) + AC_REQUIRE([AC_FUNC_ALLOCA])dnl + AC_REQUIRE([AC_FUNC_MMAP])dnl + AC_REQUIRE([gt_INTDIV0])dnl + AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl + AC_REQUIRE([gt_INTTYPES_PRI])dnl + AC_REQUIRE([gl_LOCK])dnl + + AC_TRY_LINK( + [int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; }], + [], + [AC_DEFINE([HAVE_BUILTIN_EXPECT], 1, + [Define to 1 if the compiler understands __builtin_expect.])]) + + AC_CHECK_HEADERS([argz.h inttypes.h limits.h unistd.h sys/param.h]) + AC_CHECK_FUNCS([getcwd getegid geteuid getgid getuid mempcpy munmap \ + stpcpy strcasecmp strdup strtoul tsearch argz_count argz_stringify \ + argz_next __fsetlocking]) + + dnl Use the *_unlocked functions only if they are declared. + dnl (because some of them were defined without being declared in Solaris + dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built + dnl on Solaris 2.5.1 to run on Solaris 2.6). + dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13. + gt_CHECK_DECL(feof_unlocked, [#include ]) + gt_CHECK_DECL(fgets_unlocked, [#include ]) + + AM_ICONV + + dnl glibc >= 2.4 has a NL_LOCALE_NAME macro when _GNU_SOURCE is defined, + dnl and a _NL_LOCALE_NAME macro always. + AC_CACHE_CHECK([for NL_LOCALE_NAME macro], gt_cv_nl_locale_name, + [AC_TRY_LINK([#include +#include ], + [char* cs = nl_langinfo(_NL_LOCALE_NAME(LC_MESSAGES)); + return !cs; + ], + gt_cv_nl_locale_name=yes, + gt_cv_nl_locale_name=no) + ]) + if test $gt_cv_nl_locale_name = yes; then + AC_DEFINE(HAVE_NL_LOCALE_NAME, 1, + [Define if you have and it defines the NL_LOCALE_NAME macro if _GNU_SOURCE is defined.]) + fi + + dnl intl/plural.c is generated from intl/plural.y. It requires bison, + dnl because plural.y uses bison specific features. It requires at least + dnl bison-1.26 because earlier versions generate a plural.c that doesn't + dnl compile. + dnl bison is only needed for the maintainer (who touches plural.y). But in + dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put + dnl the rule in general Makefile. Now, some people carelessly touch the + dnl files or have a broken "make" program, hence the plural.c rule will + dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not + dnl present or too old. + AC_CHECK_PROGS([INTLBISON], [bison]) + if test -z "$INTLBISON"; then + ac_verc_fail=yes + else + dnl Found it, now check the version. + AC_MSG_CHECKING([version of bison]) +changequote(<<,>>)dnl + ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; + 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) +changequote([,])dnl + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + esac + AC_MSG_RESULT([$ac_prog_version]) + fi + if test $ac_verc_fail = yes; then + INTLBISON=: + fi +]) + + +dnl gt_CHECK_DECL(FUNC, INCLUDES) +dnl Check whether a function is declared. +AC_DEFUN([gt_CHECK_DECL], +[ + AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1, + [AC_TRY_COMPILE([$2], [ +#ifndef $1 + char *p = (char *) $1; +#endif +], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)]) + if test $ac_cv_have_decl_$1 = yes; then + gt_value=1 + else + gt_value=0 + fi + AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value], + [Define to 1 if you have the declaration of `$1', and to 0 if you don't.]) +]) diff -Nru postgis-1.5.3/macros/intldir.m4 postgis-2.0.1/macros/intldir.m4 --- postgis-1.5.3/macros/intldir.m4 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/macros/intldir.m4 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,19 @@ +# intldir.m4 serial 1 (gettext-0.16) +dnl Copyright (C) 2006 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +AC_PREREQ(2.52) + +dnl Tells the AM_GNU_GETTEXT macro to consider an intl/ directory. +AC_DEFUN([AM_GNU_GETTEXT_INTL_SUBDIR], []) diff -Nru postgis-1.5.3/macros/intlmacosx.m4 postgis-2.0.1/macros/intlmacosx.m4 --- postgis-1.5.3/macros/intlmacosx.m4 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/macros/intlmacosx.m4 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,51 @@ +# intlmacosx.m4 serial 1 (gettext-0.17) +dnl Copyright (C) 2004-2007 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Checks for special options needed on MacOS X. +dnl Defines INTL_MACOSX_LIBS. +AC_DEFUN([gt_INTL_MACOSX], +[ + dnl Check for API introduced in MacOS X 10.2. + AC_CACHE_CHECK([for CFPreferencesCopyAppValue], + gt_cv_func_CFPreferencesCopyAppValue, + [gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + AC_TRY_LINK([#include ], + [CFPreferencesCopyAppValue(NULL, NULL)], + [gt_cv_func_CFPreferencesCopyAppValue=yes], + [gt_cv_func_CFPreferencesCopyAppValue=no]) + LIBS="$gt_save_LIBS"]) + if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then + AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1, + [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) + fi + dnl Check for API introduced in MacOS X 10.3. + AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent, + [gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + AC_TRY_LINK([#include ], [CFLocaleCopyCurrent();], + [gt_cv_func_CFLocaleCopyCurrent=yes], + [gt_cv_func_CFLocaleCopyCurrent=no]) + LIBS="$gt_save_LIBS"]) + if test $gt_cv_func_CFLocaleCopyCurrent = yes; then + AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1, + [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) + fi + INTL_MACOSX_LIBS= + if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then + INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" + fi + AC_SUBST([INTL_MACOSX_LIBS]) +]) diff -Nru postgis-1.5.3/macros/intltool.m4 postgis-2.0.1/macros/intltool.m4 --- postgis-1.5.3/macros/intltool.m4 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/macros/intltool.m4 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,216 @@ +## intltool.m4 - Configure intltool for the target system. -*-Shell-script-*- +## Copyright (C) 2001 Eazel, Inc. +## Author: Maciej Stachowiak +## Kenneth Christiansen +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +## +## As a special exception to the GNU General Public License, if you +## distribute this file as part of a program that contains a +## configuration script generated by Autoconf, you may include it under +## the same distribution terms that you use for the rest of that program. + +dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml]) +# serial 40 IT_PROG_INTLTOOL +AC_DEFUN([IT_PROG_INTLTOOL], [ +AC_PREREQ([2.50])dnl +AC_REQUIRE([AM_NLS])dnl + +case "$am__api_version" in + 1.[01234]) + AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool]) + ;; + *) + ;; +esac + +if test -n "$1"; then + AC_MSG_CHECKING([for intltool >= $1]) + + INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` + INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3` + [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` + ] + AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found]) + test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" || + AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.]) +fi + +AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update]) +AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge]) +AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract]) +if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then + AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.]) +fi + + INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' +INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@' + INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' +INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' + INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + +_IT_SUBST(INTLTOOL_DESKTOP_RULE) +_IT_SUBST(INTLTOOL_DIRECTORY_RULE) +_IT_SUBST(INTLTOOL_KEYS_RULE) +_IT_SUBST(INTLTOOL_PROP_RULE) +_IT_SUBST(INTLTOOL_OAF_RULE) +_IT_SUBST(INTLTOOL_PONG_RULE) +_IT_SUBST(INTLTOOL_SERVER_RULE) +_IT_SUBST(INTLTOOL_SHEET_RULE) +_IT_SUBST(INTLTOOL_SOUNDLIST_RULE) +_IT_SUBST(INTLTOOL_UI_RULE) +_IT_SUBST(INTLTOOL_XAM_RULE) +_IT_SUBST(INTLTOOL_KBD_RULE) +_IT_SUBST(INTLTOOL_XML_RULE) +_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE) +_IT_SUBST(INTLTOOL_CAVES_RULE) +_IT_SUBST(INTLTOOL_SCHEMAS_RULE) +_IT_SUBST(INTLTOOL_THEME_RULE) +_IT_SUBST(INTLTOOL_SERVICE_RULE) +_IT_SUBST(INTLTOOL_POLICY_RULE) + +# Check the gettext tools to make sure they are GNU +AC_PATH_PROG(XGETTEXT, xgettext) +AC_PATH_PROG(MSGMERGE, msgmerge) +AC_PATH_PROG(MSGFMT, msgfmt) +AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) +if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then + AC_MSG_ERROR([GNU gettext tools not found; required for intltool]) +fi +xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`" +mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`" +mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`" +if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then + AC_MSG_ERROR([GNU gettext tools not found; required for intltool]) +fi + +AC_PATH_PROG(INTLTOOL_PERL, perl) +if test -z "$INTLTOOL_PERL"; then + AC_MSG_ERROR([perl not found]) +fi +AC_MSG_CHECKING([for perl >= 5.8.1]) +$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1 +if test $? -ne 0; then + AC_MSG_ERROR([perl 5.8.1 is required for intltool]) +else + IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`" + AC_MSG_RESULT([$IT_PERL_VERSION]) +fi +if test "x$2" != "xno-xml"; then + AC_MSG_CHECKING([for XML::Parser]) + if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then + AC_MSG_RESULT([ok]) + else + AC_MSG_ERROR([XML::Parser perl module is required for intltool]) + fi +fi + +# Substitute ALL_LINGUAS so we can use it in po/Makefile +AC_SUBST(ALL_LINGUAS) + +# Set DATADIRNAME correctly if it is not set yet +# (copied from glib-gettext.m4) +if test -z "$DATADIRNAME"; then + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[]], + [[extern int _nl_msg_cat_cntr; + return _nl_msg_cat_cntr]])], + [DATADIRNAME=share], + [case $host in + *-*-solaris*) + dnl On Solaris, if bind_textdomain_codeset is in libc, + dnl GNU format message catalog is always supported, + dnl since both are added to the libc all together. + dnl Hence, we'd like to go with DATADIRNAME=share + dnl in this case. + AC_CHECK_FUNC(bind_textdomain_codeset, + [DATADIRNAME=share], [DATADIRNAME=lib]) + ;; + *) + [DATADIRNAME=lib] + ;; + esac]) +fi +AC_SUBST(DATADIRNAME) + +IT_PO_SUBDIR([po]) + +]) + + +# IT_PO_SUBDIR(DIRNAME) +# --------------------- +# All po subdirs have to be declared with this macro; the subdir "po" is +# declared by IT_PROG_INTLTOOL. +# +AC_DEFUN([IT_PO_SUBDIR], +[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS. +dnl +dnl The following CONFIG_COMMANDS should be exetuted at the very end +dnl of config.status. +AC_CONFIG_COMMANDS_PRE([ + AC_CONFIG_COMMANDS([$1/stamp-it], [ + if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then + AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.]) + fi + rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp" + >"$1/stamp-it.tmp" + [sed '/^#/d + s/^[[].*] *// + /^[ ]*$/d + '"s|^| $ac_top_srcdir/|" \ + "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES" + ] + [sed '/^POTFILES =/,/[^\\]$/ { + /^POTFILES =/!d + r $1/POTFILES + } + ' "$1/Makefile.in" >"$1/Makefile"] + rm -f "$1/Makefile.tmp" + mv "$1/stamp-it.tmp" "$1/stamp-it" + ]) +])dnl +]) + +# _IT_SUBST(VARIABLE) +# ------------------- +# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST +# +AC_DEFUN([_IT_SUBST], +[ +AC_SUBST([$1]) +m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])]) +] +) + +# deprecated macros +AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL]) +# A hint is needed for aclocal from Automake <= 1.9.4: +# AC_DEFUN([AC_PROG_INTLTOOL], ...) + diff -Nru postgis-1.5.3/macros/lib-ld.m4 postgis-2.0.1/macros/lib-ld.m4 --- postgis-1.5.3/macros/lib-ld.m4 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/macros/lib-ld.m4 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,110 @@ +# lib-ld.m4 serial 3 (gettext-0.13) +dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl Subroutines of libtool.m4, +dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision +dnl with libtool.m4. + +dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. +AC_DEFUN([AC_LIB_PROG_LD_GNU], +[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, +[# I'd rather use --version here, but apparently some GNU ld's only accept -v. +case `$LD -v 2>&1 conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by GCC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]* | [A-Za-z]:[\\/]*)] + [re_direlt='/[^/][^/]*/\.\./'] + # Canonicalize the path of ld + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(acl_cv_path_LD, +[if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in + *GNU* | *'with BFD'*) + test "$with_gnu_ld" != no && break ;; + *) + test "$with_gnu_ld" != yes && break ;; + esac + fi + done + IFS="$ac_save_ifs" +else + acl_cv_path_LD="$LD" # Let the user override the test with a path. +fi]) +LD="$acl_cv_path_LD" +if test -n "$LD"; then + AC_MSG_RESULT($LD) +else + AC_MSG_RESULT(no) +fi +test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) +AC_LIB_PROG_LD_GNU +]) diff -Nru postgis-1.5.3/macros/lib-link.m4 postgis-2.0.1/macros/lib-link.m4 --- postgis-1.5.3/macros/lib-link.m4 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/macros/lib-link.m4 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,709 @@ +# lib-link.m4 serial 13 (gettext-0.17) +dnl Copyright (C) 2001-2007 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +AC_PREREQ(2.54) + +dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and +dnl the libraries corresponding to explicit and implicit dependencies. +dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and +dnl augments the CPPFLAGS variable. +dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname +dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. +AC_DEFUN([AC_LIB_LINKFLAGS], +[ + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + define([Name],[translit([$1],[./-], [___])]) + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ + AC_LIB_LINKFLAGS_BODY([$1], [$2]) + ac_cv_lib[]Name[]_libs="$LIB[]NAME" + ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" + ac_cv_lib[]Name[]_cppflags="$INC[]NAME" + ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX" + ]) + LIB[]NAME="$ac_cv_lib[]Name[]_libs" + LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" + INC[]NAME="$ac_cv_lib[]Name[]_cppflags" + LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) + AC_SUBST([LIB]NAME) + AC_SUBST([LTLIB]NAME) + AC_SUBST([LIB]NAME[_PREFIX]) + dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the + dnl results of this search when this library appears as a dependency. + HAVE_LIB[]NAME=yes + undefine([Name]) + undefine([NAME]) +]) + +dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) +dnl searches for libname and the libraries corresponding to explicit and +dnl implicit dependencies, together with the specified include files and +dnl the ability to compile and link the specified testcode. If found, it +dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and +dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and +dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs +dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. +dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname +dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. +AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], +[ + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + define([Name],[translit([$1],[./-], [___])]) + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + + dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME + dnl accordingly. + AC_LIB_LINKFLAGS_BODY([$1], [$2]) + + dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, + dnl because if the user has installed lib[]Name and not disabled its use + dnl via --without-lib[]Name-prefix, he wants to use it. + ac_save_CPPFLAGS="$CPPFLAGS" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) + + AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ + ac_save_LIBS="$LIBS" + LIBS="$LIBS $LIB[]NAME" + AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) + LIBS="$ac_save_LIBS" + ]) + if test "$ac_cv_lib[]Name" = yes; then + HAVE_LIB[]NAME=yes + AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) + AC_MSG_CHECKING([how to link with lib[]$1]) + AC_MSG_RESULT([$LIB[]NAME]) + else + HAVE_LIB[]NAME=no + dnl If $LIB[]NAME didn't lead to a usable library, we don't need + dnl $INC[]NAME either. + CPPFLAGS="$ac_save_CPPFLAGS" + LIB[]NAME= + LTLIB[]NAME= + LIB[]NAME[]_PREFIX= + fi + AC_SUBST([HAVE_LIB]NAME) + AC_SUBST([LIB]NAME) + AC_SUBST([LTLIB]NAME) + AC_SUBST([LIB]NAME[_PREFIX]) + undefine([Name]) + undefine([NAME]) +]) + +dnl Determine the platform dependent parameters needed to use rpath: +dnl acl_libext, +dnl acl_shlibext, +dnl acl_hardcode_libdir_flag_spec, +dnl acl_hardcode_libdir_separator, +dnl acl_hardcode_direct, +dnl acl_hardcode_minus_L. +AC_DEFUN([AC_LIB_RPATH], +[ + dnl Tell automake >= 1.10 to complain if config.rpath is missing. + m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) + AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS + AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld + AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host + AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir + AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh + . ./conftest.sh + rm -f ./conftest.sh + acl_cv_rpath=done + ]) + wl="$acl_cv_wl" + acl_libext="$acl_cv_libext" + acl_shlibext="$acl_cv_shlibext" + acl_libname_spec="$acl_cv_libname_spec" + acl_library_names_spec="$acl_cv_library_names_spec" + acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + acl_hardcode_direct="$acl_cv_hardcode_direct" + acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" + dnl Determine whether the user wants rpath handling at all. + AC_ARG_ENABLE(rpath, + [ --disable-rpath do not hardcode runtime library paths], + :, enable_rpath=yes) +]) + +dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and +dnl the libraries corresponding to explicit and implicit dependencies. +dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. +dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found +dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. +AC_DEFUN([AC_LIB_LINKFLAGS_BODY], +[ + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + dnl Autoconf >= 2.61 supports dots in --with options. + define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])]) + dnl By default, look in $includedir and $libdir. + use_additional=yes + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix], +[ --with-lib]N_A_M_E[-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib + --without-lib]N_A_M_E[-prefix don't search for lib$1 in includedir and libdir], +[ + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + fi + fi +]) + dnl Search the library and its dependencies in $additional_libdir and + dnl $LDFLAGS. Using breadth-first-seach. + LIB[]NAME= + LTLIB[]NAME= + INC[]NAME= + LIB[]NAME[]_PREFIX= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='$1 $2' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + dnl See if it was already located by an earlier AC_LIB_LINKFLAGS + dnl or AC_LIB_HAVE_LINKFLAGS call. + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" + else + dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined + dnl that this library doesn't exist. So just drop it. + : + fi + else + dnl Search the library lib$name in $additional_libdir and $LDFLAGS + dnl and the already constructed $LIBNAME/$LTLIBNAME. + found_dir= + found_la= + found_so= + found_a= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + dir="$additional_libdir" + dnl The same code as in the loop below: + dnl First look for a shared library. + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + dnl Then look for a static library. + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + dnl First look for a shared library. + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + dnl Then look for a static library. + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + dnl Found the library. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + dnl Linking with a shared library. We attempt to hardcode its + dnl directory into the executable's runpath, unless it's the + dnl standard /usr/lib. + if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then + dnl No hardcoding is needed. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + dnl Use an explicit option to hardcode DIR into the resulting + dnl binary. + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + dnl The hardcoding into $LIBNAME is system dependent. + if test "$acl_hardcode_direct" = yes; then + dnl Using DIR/libNAME.so during linking hardcodes DIR into the + dnl resulting binary. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + dnl Use an explicit option to hardcode DIR into the resulting + dnl binary. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + dnl Rely on "-L$found_dir". + dnl But don't add it if it's already contained in the LDFLAGS + dnl or the already constructed $LIBNAME + haveit= + for x in $LDFLAGS $LIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" + fi + if test "$acl_hardcode_minus_L" != no; then + dnl FIXME: Not sure whether we should use + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" + dnl here. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH + dnl here, because this doesn't fit in flags passed to the + dnl compiler. So give up. No hardcoding. This affects only + dnl very old systems. + dnl FIXME: Not sure whether we should use + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" + dnl here. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + dnl Linking with a static library. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" + else + dnl We shouldn't come here, but anyway it's good to have a + dnl fallback. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" + fi + fi + dnl Assume the include files are nearby. + additional_includedir= + case "$found_dir" in + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + LIB[]NAME[]_PREFIX="$basedir" + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + dnl Potentially add $additional_includedir to $INCNAME. + dnl But don't add it + dnl 1. if it's the standard /usr/include, + dnl 2. if it's /usr/local/include and we are using GCC on Linux, + dnl 3. if it's already present in $CPPFLAGS or the already + dnl constructed $INCNAME, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INC[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + dnl Really add $additional_includedir to $INCNAME. + INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + dnl Look for dependencies. + if test -n "$found_la"; then + dnl Read the .la file. It defines the variables + dnl dlname, library_names, old_library, dependency_libs, current, + dnl age, revision, installed, dlopen, dlpreopen, libdir. + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + dnl We use only dependency_libs. + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. + dnl But don't add it + dnl 1. if it's the standard /usr/lib, + dnl 2. if it's /usr/local/lib and we are using GCC on Linux, + dnl 3. if it's already present in $LDFLAGS or the already + dnl constructed $LIBNAME, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LIBNAME. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LTLIBNAME. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + dnl Handle this in the next round. + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + dnl Handle this in the next round. Throw away the .la's + dnl directory; it is already contained in a preceding -L + dnl option. + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + dnl Most likely an immediate library name. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" + ;; + esac + done + fi + else + dnl Didn't find the library; assume it is in the system directories + dnl known to the linker and runtime loader. (All the system + dnl directories known to the linker should also be known to the + dnl runtime loader, otherwise the system is severely misconfigured.) + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$acl_hardcode_libdir_separator"; then + dnl Weird platform: only the last -rpath option counts, the user must + dnl pass all path elements in one option. We can arrange that for a + dnl single library, but not when more than one $LIBNAMEs are used. + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" + done + dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" + else + dnl The -rpath options are cumulative. + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + dnl When using libtool, the option that works for both libraries and + dnl executables is -R. The -R options are cumulative. + for found_dir in $ltrpathdirs; do + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" + done + fi +]) + +dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, +dnl unless already present in VAR. +dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes +dnl contains two or three consecutive elements that belong together. +AC_DEFUN([AC_LIB_APPENDTOVAR], +[ + for element in [$2]; do + haveit= + for x in $[$1]; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + [$1]="${[$1]}${[$1]:+ }$element" + fi + done +]) + +dnl For those cases where a variable contains several -L and -l options +dnl referring to unknown libraries and directories, this macro determines the +dnl necessary additional linker options for the runtime path. +dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) +dnl sets LDADDVAR to linker options needed together with LIBSVALUE. +dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, +dnl otherwise linking without libtool is assumed. +AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], +[ + AC_REQUIRE([AC_LIB_RPATH]) + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + $1= + if test "$enable_rpath" != no; then + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + dnl Use an explicit option to hardcode directories into the resulting + dnl binary. + rpathdirs= + next= + for opt in $2; do + if test -n "$next"; then + dir="$next" + dnl No need to hardcode the standard /usr/lib. + if test "X$dir" != "X/usr/$acl_libdirstem"; then + rpathdirs="$rpathdirs $dir" + fi + next= + else + case $opt in + -L) next=yes ;; + -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` + dnl No need to hardcode the standard /usr/lib. + if test "X$dir" != "X/usr/$acl_libdirstem"; then + rpathdirs="$rpathdirs $dir" + fi + next= ;; + *) next= ;; + esac + fi + done + if test "X$rpathdirs" != "X"; then + if test -n ""$3""; then + dnl libtool is used for linking. Use -R options. + for dir in $rpathdirs; do + $1="${$1}${$1:+ }-R$dir" + done + else + dnl The linker is used for linking directly. + if test -n "$acl_hardcode_libdir_separator"; then + dnl Weird platform: only the last -rpath option counts, the user + dnl must pass all path elements in one option. + alldirs= + for dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + $1="$flag" + else + dnl The -rpath options are cumulative. + for dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + $1="${$1}${$1:+ }$flag" + done + fi + fi + fi + fi + fi + AC_SUBST([$1]) +]) diff -Nru postgis-1.5.3/macros/lib-prefix.m4 postgis-2.0.1/macros/lib-prefix.m4 --- postgis-1.5.3/macros/lib-prefix.m4 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/macros/lib-prefix.m4 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,185 @@ +# lib-prefix.m4 serial 5 (gettext-0.15) +dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and +dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't +dnl require excessive bracketing. +ifdef([AC_HELP_STRING], +[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], +[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) + +dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed +dnl to access previously installed libraries. The basic assumption is that +dnl a user will want packages to use other packages he previously installed +dnl with the same --prefix option. +dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate +dnl libraries, but is otherwise very convenient. +AC_DEFUN([AC_LIB_PREFIX], +[ + AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + dnl By default, look in $includedir and $libdir. + use_additional=yes + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + AC_LIB_ARG_WITH([lib-prefix], +[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib + --without-lib-prefix don't search for libraries in includedir and libdir], +[ + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + fi + fi +]) + if test $use_additional = yes; then + dnl Potentially add $additional_includedir to $CPPFLAGS. + dnl But don't add it + dnl 1. if it's the standard /usr/include, + dnl 2. if it's already present in $CPPFLAGS, + dnl 3. if it's /usr/local/include and we are using GCC on Linux, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + for x in $CPPFLAGS; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + dnl Really add $additional_includedir to $CPPFLAGS. + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" + fi + fi + fi + fi + dnl Potentially add $additional_libdir to $LDFLAGS. + dnl But don't add it + dnl 1. if it's the standard /usr/lib, + dnl 2. if it's already present in $LDFLAGS, + dnl 3. if it's /usr/local/lib and we are using GCC on Linux, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then + haveit= + for x in $LDFLAGS; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LDFLAGS. + LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" + fi + fi + fi + fi + fi +]) + +dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, +dnl acl_final_exec_prefix, containing the values to which $prefix and +dnl $exec_prefix will expand at the end of the configure script. +AC_DEFUN([AC_LIB_PREPARE_PREFIX], +[ + dnl Unfortunately, prefix and exec_prefix get only finally determined + dnl at the end of configure. + if test "X$prefix" = "XNONE"; then + acl_final_prefix="$ac_default_prefix" + else + acl_final_prefix="$prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + acl_final_exec_prefix='${prefix}' + else + acl_final_exec_prefix="$exec_prefix" + fi + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" + prefix="$acl_save_prefix" +]) + +dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the +dnl variables prefix and exec_prefix bound to the values they will have +dnl at the end of the configure script. +AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], +[ + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + $1 + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" +]) + +dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing +dnl the basename of the libdir, either "lib" or "lib64". +AC_DEFUN([AC_LIB_PREPARE_MULTILIB], +[ + dnl There is no formal standard regarding lib and lib64. The current + dnl practice is that on a system supporting 32-bit and 64-bit instruction + dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit + dnl libraries go under $prefix/lib. We determine the compiler's default + dnl mode by looking at the compiler's library search path. If at least + dnl of its elements ends in /lib64 or points to a directory whose absolute + dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the + dnl default, namely "lib". + acl_libdirstem=lib + searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test -n "$searchpath"; then + acl_save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib64 ) acl_libdirstem=lib64 ;; + esac ;; + esac + fi + done + IFS="$acl_save_IFS" + fi +]) diff -Nru postgis-1.5.3/macros/libtool.m4 postgis-2.0.1/macros/libtool.m4 --- postgis-1.5.3/macros/libtool.m4 2011-06-25 16:29:36.000000000 +0000 +++ postgis-2.0.1/macros/libtool.m4 2012-06-22 21:04:13.000000000 +0000 @@ -1,8 +1,8 @@ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives @@ -11,8 +11,8 @@ m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. @@ -146,6 +146,8 @@ AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl +_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl +dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl @@ -637,7 +639,7 @@ m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." @@ -801,6 +803,7 @@ m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], + [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], @@ -822,6 +825,31 @@ ])# _LT_LANG +m4_ifndef([AC_PROG_GO], [ +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_GO. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ +m4_defun([AC_PROG_GO], +[AC_LANG_PUSH(Go)dnl +AC_ARG_VAR([GOC], [Go compiler command])dnl +AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl +_AC_ARG_VAR_LDFLAGS()dnl +AC_CHECK_TOOL(GOC, gccgo) +if test -z "$GOC"; then + if test -n "$ac_tool_prefix"; then + AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) + fi +fi +if test -z "$GOC"; then + AC_CHECK_PROG(GOC, gccgo, gccgo, false) +fi +])#m4_defun +])#m4_ifndef + + # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], @@ -852,6 +880,10 @@ m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) +AC_PROVIDE_IFELSE([AC_PROG_GO], + [LT_LANG(GO)], + [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) + AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) @@ -954,7 +986,13 @@ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD @@ -962,6 +1000,7 @@ rm -rf libconftest.dylib* rm -f conftest.* fi]) + AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no @@ -973,6 +1012,7 @@ [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) + AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF @@ -990,7 +1030,9 @@ echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? - if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD @@ -1035,8 +1077,8 @@ ]) -# _LT_DARWIN_LINKER_FEATURES -# -------------------------- +# _LT_DARWIN_LINKER_FEATURES([TAG]) +# --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ @@ -1047,6 +1089,8 @@ _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], + [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi @@ -1330,14 +1374,27 @@ CFLAGS="$SAVE_CFLAGS" fi ;; -sparc*-*solaris*) +*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" @@ -1414,13 +1471,13 @@ if test -n "$RANLIB"; then case $host_os in openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in @@ -1600,6 +1657,11 @@ lt_cv_sys_max_cmd_len=196608 ;; + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not @@ -1639,7 +1701,7 @@ # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do @@ -2185,7 +2247,7 @@ case $host_os in aix3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH @@ -2194,7 +2256,7 @@ ;; aix[[4-9]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes @@ -2259,7 +2321,7 @@ ;; bsdi[[45]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' @@ -2398,7 +2460,7 @@ ;; dgux*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' @@ -2406,10 +2468,6 @@ shlibpath_var=LD_LIBRARY_PATH ;; -freebsd1*) - dynamic_linker=no - ;; - freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -2417,7 +2475,7 @@ objformat=`/usr/bin/objformat` else case $host_os in - freebsd[[123]]*) objformat=aout ;; + freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -2435,7 +2493,7 @@ esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) @@ -2455,17 +2513,18 @@ ;; gnu*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" @@ -2526,7 +2585,7 @@ ;; interix[[3-9]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' @@ -2542,7 +2601,7 @@ nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; @@ -2579,9 +2638,9 @@ dynamic_linker=no ;; -# This must be Linux ELF. +# This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -2644,7 +2703,7 @@ ;; newsos6) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes @@ -2713,7 +2772,7 @@ ;; solaris*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -2738,7 +2797,7 @@ ;; sysv4 | sysv4.3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -2762,7 +2821,7 @@ sysv4*MP*) if test -d /usr/nec ;then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH @@ -2793,7 +2852,7 @@ tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -2803,7 +2862,7 @@ ;; uts4*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -3225,7 +3284,7 @@ lt_cv_deplibs_check_method=pass_all ;; -# This must be Linux ELF. +# This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; @@ -3645,6 +3704,7 @@ # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ @@ -4229,7 +4289,9 @@ case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' + if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" + fi ;; esac else @@ -4321,18 +4383,33 @@ ;; *) case `$CC -V 2>&1 | sed 5q` in - *Sun\ F* | *Sun*Fortran*) + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; + *Sun\ F* | *Sun*Fortran*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; + *Intel*\ [[CF]]*Compiler*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + *Portland\ Group*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; esac ;; esac @@ -4492,7 +4569,9 @@ ;; cygwin* | mingw* | cegcc*) case $cc_basename in - cl*) ;; + cl*) + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] @@ -4517,7 +4596,6 @@ _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported @@ -4768,8 +4846,7 @@ xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ @@ -5064,6 +5141,7 @@ # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' @@ -5110,10 +5188,6 @@ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; - freebsd1*) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little @@ -5126,7 +5200,7 @@ ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes @@ -5165,7 +5239,6 @@ fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes @@ -5607,9 +5680,6 @@ _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], - [[If ld is used when linking, flag to hardcode $libdir into a binary - during linking. This must work even if $libdir does not exist]]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], @@ -5767,7 +5837,6 @@ _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported @@ -6137,7 +6206,7 @@ esac ;; - freebsd[[12]]*) + freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no @@ -6898,12 +6967,18 @@ } }; _LT_EOF +], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF +package foo +func foo() { +} +_LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary @@ -7100,7 +7175,6 @@ _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no @@ -7233,7 +7307,6 @@ _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no @@ -7420,6 +7493,77 @@ ])# _LT_LANG_GCJ_CONFIG +# _LT_LANG_GO_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Go compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GO_CONFIG], +[AC_REQUIRE([LT_PROG_GO])dnl +AC_LANG_SAVE + +# Source file extension for Go test sources. +ac_ext=go + +# Object file extension for compiled Go test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="package main; func main() { }" + +# Code to be used in simple link tests +lt_simple_link_test_code='package main; func main() { }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC=yes +CC=${GOC-"gccgo"} +CFLAGS=$GOFLAGS +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# Go did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_GO_CONFIG + + # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler @@ -7489,6 +7633,13 @@ dnl AC_DEFUN([LT_AC_PROG_GCJ], []) +# LT_PROG_GO +# ---------- +AC_DEFUN([LT_PROG_GO], +[AC_CHECK_TOOL(GOC, gccgo,) +]) + + # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], diff -Nru postgis-1.5.3/macros/ltoptions.m4 postgis-2.0.1/macros/ltoptions.m4 --- postgis-1.5.3/macros/ltoptions.m4 2011-06-25 16:29:36.000000000 +0000 +++ postgis-2.0.1/macros/ltoptions.m4 2012-06-22 21:04:13.000000000 +0000 @@ -326,9 +326,24 @@ # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic], + [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], + [lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for lt_pkg in $withval; do + IFS="$lt_save_ifs" + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) diff -Nru postgis-1.5.3/macros/ltversion.m4 postgis-2.0.1/macros/ltversion.m4 --- postgis-1.5.3/macros/ltversion.m4 2011-06-25 16:29:36.000000000 +0000 +++ postgis-2.0.1/macros/ltversion.m4 2012-06-22 21:04:13.000000000 +0000 @@ -9,15 +9,15 @@ # @configure_input@ -# serial 3293 ltversion.m4 +# serial 3337 ltversion.m4 # This file is part of GNU Libtool -m4_define([LT_PACKAGE_VERSION], [2.4]) -m4_define([LT_PACKAGE_REVISION], [1.3293]) +m4_define([LT_PACKAGE_VERSION], [2.4.2]) +m4_define([LT_PACKAGE_REVISION], [1.3337]) AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.4' -macro_revision='1.3293' +[macro_version='2.4.2' +macro_revision='1.3337' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) diff -Nru postgis-1.5.3/macros/nls.m4 postgis-2.0.1/macros/nls.m4 --- postgis-1.5.3/macros/nls.m4 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/macros/nls.m4 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,31 @@ +# nls.m4 serial 3 (gettext-0.15) +dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995-2000. +dnl Bruno Haible , 2000-2003. + +AC_PREREQ(2.50) + +AC_DEFUN([AM_NLS], +[ + AC_MSG_CHECKING([whether NLS is requested]) + dnl Default is enabled NLS + AC_ARG_ENABLE(nls, + [ --disable-nls do not use Native Language Support], + USE_NLS=$enableval, USE_NLS=yes) + AC_MSG_RESULT($USE_NLS) + AC_SUBST(USE_NLS) +]) diff -Nru postgis-1.5.3/macros/po.m4 postgis-2.0.1/macros/po.m4 --- postgis-1.5.3/macros/po.m4 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/macros/po.m4 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,449 @@ +# po.m4 serial 15 (gettext-0.17) +dnl Copyright (C) 1995-2007 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995-2000. +dnl Bruno Haible , 2000-2003. + +AC_PREREQ(2.50) + +dnl Checks for all prerequisites of the po subdirectory. +AC_DEFUN([AM_PO_SUBDIRS], +[ + AC_REQUIRE([AC_PROG_MAKE_SET])dnl + AC_REQUIRE([AC_PROG_INSTALL])dnl + AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake + AC_REQUIRE([AM_NLS])dnl + + dnl Release version of the gettext macros. This is used to ensure that + dnl the gettext macros and po/Makefile.in.in are in sync. + AC_SUBST([GETTEXT_MACRO_VERSION], [0.17]) + + dnl Perform the following tests also if --disable-nls has been given, + dnl because they are needed for "make dist" to work. + + dnl Search for GNU msgfmt in the PATH. + dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. + dnl The second test excludes FreeBSD msgfmt. + AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, + [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && + (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], + :) + AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) + + dnl Test whether it is GNU msgfmt >= 0.15. +changequote(,)dnl + case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; + *) MSGFMT_015=$MSGFMT ;; + esac +changequote([,])dnl + AC_SUBST([MSGFMT_015]) +changequote(,)dnl + case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; + *) GMSGFMT_015=$GMSGFMT ;; + esac +changequote([,])dnl + AC_SUBST([GMSGFMT_015]) + + dnl Search for GNU xgettext 0.12 or newer in the PATH. + dnl The first test excludes Solaris xgettext and early GNU xgettext versions. + dnl The second test excludes FreeBSD xgettext. + AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, + [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && + (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], + :) + dnl Remove leftover from FreeBSD xgettext call. + rm -f messages.po + + dnl Test whether it is GNU xgettext >= 0.15. +changequote(,)dnl + case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; + *) XGETTEXT_015=$XGETTEXT ;; + esac +changequote([,])dnl + AC_SUBST([XGETTEXT_015]) + + dnl Search for GNU msgmerge 0.11 or newer in the PATH. + AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, + [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) + + dnl Installation directories. + dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we + dnl have to define it here, so that it can be used in po/Makefile. + test -n "$localedir" || localedir='${datadir}/locale' + AC_SUBST([localedir]) + + dnl Support for AM_XGETTEXT_OPTION. + test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= + AC_SUBST([XGETTEXT_EXTRA_OPTIONS]) + + AC_CONFIG_COMMANDS([po-directories], [[ + for ac_file in $CONFIG_FILES; do + # Support "outfile[:infile[:infile...]]" + case "$ac_file" in + *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + esac + # PO directories have a Makefile.in generated from Makefile.in.in. + case "$ac_file" in */Makefile.in) + # Adjust a relative srcdir. + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` + ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` + # In autoconf-2.13 it is called $ac_given_srcdir. + # In autoconf-2.50 it is called $srcdir. + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" + case "$ac_given_srcdir" in + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; + /*) top_srcdir="$ac_given_srcdir" ;; + *) top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + # Treat a directory as a PO directory if and only if it has a + # POTFILES.in file. This allows packages to have multiple PO + # directories under different names or in different locations. + if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then + rm -f "$ac_dir/POTFILES" + test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" + cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" + POMAKEFILEDEPS="POTFILES.in" + # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend + # on $ac_dir but don't depend on user-specified configuration + # parameters. + if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then + # The LINGUAS file contains the set of available languages. + if test -n "$OBSOLETE_ALL_LINGUAS"; then + test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" + fi + ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` + # Hide the ALL_LINGUAS assigment from automake < 1.5. + eval 'ALL_LINGUAS''=$ALL_LINGUAS_' + POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" + else + # The set of available languages was given in configure.in. + # Hide the ALL_LINGUAS assigment from automake < 1.5. + eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' + fi + # Compute POFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) + # Compute UPDATEPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) + # Compute DUMMYPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) + # Compute GMOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) + case "$ac_given_srcdir" in + .) srcdirpre= ;; + *) srcdirpre='$(srcdir)/' ;; + esac + POFILES= + UPDATEPOFILES= + DUMMYPOFILES= + GMOFILES= + for lang in $ALL_LINGUAS; do + POFILES="$POFILES $srcdirpre$lang.po" + UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" + DUMMYPOFILES="$DUMMYPOFILES $lang.nop" + GMOFILES="$GMOFILES $srcdirpre$lang.gmo" + done + # CATALOGS depends on both $ac_dir and the user's LINGUAS + # environment variable. + INST_LINGUAS= + if test -n "$ALL_LINGUAS"; then + for presentlang in $ALL_LINGUAS; do + useit=no + if test "%UNSET%" != "$LINGUAS"; then + desiredlanguages="$LINGUAS" + else + desiredlanguages="$ALL_LINGUAS" + fi + for desiredlang in $desiredlanguages; do + # Use the presentlang catalog if desiredlang is + # a. equal to presentlang, or + # b. a variant of presentlang (because in this case, + # presentlang can be used as a fallback for messages + # which are not translated in the desiredlang catalog). + case "$desiredlang" in + "$presentlang"*) useit=yes;; + esac + done + if test $useit = yes; then + INST_LINGUAS="$INST_LINGUAS $presentlang" + fi + done + fi + CATALOGS= + if test -n "$INST_LINGUAS"; then + for lang in $INST_LINGUAS; do + CATALOGS="$CATALOGS $lang.gmo" + done + fi + test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" + sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" + for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do + if test -f "$f"; then + case "$f" in + *.orig | *.bak | *~) ;; + *) cat "$f" >> "$ac_dir/Makefile" ;; + esac + fi + done + fi + ;; + esac + done]], + [# Capture the value of obsolete ALL_LINGUAS because we need it to compute + # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it + # from automake < 1.5. + eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' + # Capture the value of LINGUAS because we need it to compute CATALOGS. + LINGUAS="${LINGUAS-%UNSET%}" + ]) +]) + +dnl Postprocesses a Makefile in a directory containing PO files. +AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], +[ + # When this code is run, in config.status, two variables have already been + # set: + # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, + # - LINGUAS is the value of the environment variable LINGUAS at configure + # time. + +changequote(,)dnl + # Adjust a relative srcdir. + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` + ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` + # In autoconf-2.13 it is called $ac_given_srcdir. + # In autoconf-2.50 it is called $srcdir. + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" + case "$ac_given_srcdir" in + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; + /*) top_srcdir="$ac_given_srcdir" ;; + *) top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + # Find a way to echo strings without interpreting backslash. + if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then + gt_echo='echo' + else + if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then + gt_echo='printf %s\n' + else + echo_func () { + cat < "$ac_file.tmp" + if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then + # Add dependencies that cannot be formulated as a simple suffix rule. + for lang in $ALL_LINGUAS; do + frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` + cat >> "$ac_file.tmp" < /dev/null; then + # Add dependencies that cannot be formulated as a simple suffix rule. + for lang in $ALL_LINGUAS; do + frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` + cat >> "$ac_file.tmp" <> "$ac_file.tmp" <, 1996. + +AC_PREREQ(2.50) + +# Search path for a program which passes the given test. + +dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, +dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) +AC_DEFUN([AM_PATH_PROG_WITH_TEST], +[ +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" +else + ac_executable_p="test -f" +fi +rm -f conf$$.file + +# Extract the first word of "$2", so it can be a program name with args. +set dummy $2; ac_word=[$]2 +AC_MSG_CHECKING([for $ac_word]) +AC_CACHE_VAL(ac_cv_path_$1, +[case "[$]$1" in + [[\\/]]* | ?:[[\\/]]*) + ac_cv_path_$1="[$]$1" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in ifelse([$5], , $PATH, [$5]); do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD + if [$3]; then + ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" +dnl If no 4th arg is given, leave the cache variable unset, +dnl so AC_PATH_PROGS will keep looking. +ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" +])dnl + ;; +esac])dnl +$1="$ac_cv_path_$1" +if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then + AC_MSG_RESULT([$]$1) +else + AC_MSG_RESULT(no) +fi +AC_SUBST($1)dnl +]) diff -Nru postgis-1.5.3/postgis/BBOXCACHE_BEHAVIOURS postgis-2.0.1/postgis/BBOXCACHE_BEHAVIOURS --- postgis-1.5.3/postgis/BBOXCACHE_BEHAVIOURS 2006-02-06 11:09:02.000000000 +0000 +++ postgis-2.0.1/postgis/BBOXCACHE_BEHAVIOURS 1970-01-01 00:00:00.000000000 +0000 @@ -1,136 +0,0 @@ -Possible strategies: - - 1) compute bbox if geometry is complex. - - 2) compute bbox if it's a simple operation (some combination - of input bboxes - iff all available) - - 3) compute bbox if any input geoms have one - - 4) never compute bbox - - 5) always compute bbox - -We can express the strategies with these labels: - -COMPUTE_BBOX: - 1) FOR_COMPLEX_GEOMS, - 2) WHEN_SIMPLE, - 3) TAINTING, - 4) ALWAYS, - 5) NEVER - -Following is a list of geometry-returning functions with the bbox cache -strategy they use. Note that current condition matching -FOR_COMPLEX_GEOMS is that geometrytype(geom) != POINTTYPE. - -These marks show output creation methods (to find single entry -points where some BBOX caching strategies could be enforced). - - *SRL* Directly works on the serialized geometries, - uses PG_LWGEOM_construct() for final output - - **SRL** Directly works on the serialized geometries, - uses internal strategies to construct output. - - *EXP* Uses LWGEOM_EXPLODED, and lwexploded_serialize() - - *LWG* Uses LWGEOM, pglwgeom_serialize() - - -AUTOCACHE_BBOX is currently used by all functions using *LWG* -(pglwgeom_serialize entry point) and *SRL* (PG_LWGEOM_construct -entry point). Other functions explicitly listed in the AUTOCACHE_BBOX -section also use it. - - -[ explicit control ] - addBBOX(geometry) - dropBBOX(geometry) - -[ AUTOCACHE_BBOX==1 ? FOR_COMPLEX_GEOMS : NEVER ] - geometry_in(cstring) **SRL** - geometry_recv(internal) **SRL** - geometry(text) **SRL** - geometry(bytea) **SRL** - GeometryFromText(geometry, SRID) *SRL* - GeomFromWKB(bytea, SRID) **SRL** - GeomFromEWKB(bytea) **SRL** - GeomFromEWKT(text) **SRL** - - -- GEOS - polygonize_garray (geometry[]) *LWG* - intersection(geometry,geometry) *LWG* - buffer(geometry,float8,[integer]) *LWG* - difference(geometry,geometry) *LWG* - boundary(geometry) *LWG* - symdifference(geometry,geometry) *LWG* - symmetricdifference(geometry,geometry) *LWG* - GeomUnion(geometry,geometry) *LWG* - unite_garray (geometry[]) *LWG* - GEOSnoop(geometry) *LWG* - Centroid(geometry) *LWG* - PointOnSurface(geometry) *LWG* - -[ TAINING ] - GeometryN(geometry,integer) *LWG* - InteriorRingN(geometry,integer) *LWG* - simplify(geometry, float8) *LWG* - transform(geometry,integer) *SRL* - snaptogrid(*) *LWG* - -[ WHEN_SIMPLE (use input bbox if present) ] - noop(geometry) *LWG* - ExteriorRing(geometry) *LWG* - SetSRID(geometry,int4) *SRL* - - # WARNING! these don't change bbox cache status if input is already 2d - force_2d(geometry) *SRL* - force_3dz(geometry) *SRL* - force_3d(geometry) *SRL* - force_3dm(geometry) *SRL* - force_4d(geometry) *SRL* - - force_collection(geometry) *LWG* - multi(geometry) *LWG* - - envelope(geometry) *SRL* - - ### computes union of - ### input bbox (if all available) - collect(geometry, geometry) *LWG* - collect_garray (geometry[]) *LWG* - - ## transform eventually present box in input - apply_grid(geometry, float8, float8, float8, float8); *LWG* - translate(geometry,float8,float8,[float8]) *SRL* - scale(geometry,float8,float8,[float8]) *SRL* - - ## These use LWGEOM as a mean to access and modify SERIALIZED form - reverse(geometry) *LWG* - ForceRHR(geometry) *LWG* - - segmentize(geometry, float8) *LWG* - - convexhull(geometry) *LWG* - -[ NEVER ] - PointN(geometry,integer) *SRL* - StartPoint(geometry) *SRL* - EndPoint(geometry) *SRL* - - makePoint(float8, float8, [float8], [float8]) *LWG* - makePointM(float8, float8, float8) *LWG* - makeline_garray (geometry[]) *LWG* - LineFromMultiPoint(geometry) *LWG* - MakeLine(geometry, geometry) *LWG* - AddPoint(geometry, geometry, [integer]) *LWG* - geometry(box2d) *SRL* - geometry(box3d) *SRL* - geometry(chip) *SRL* - line_interpolate_point(geometry, float8) *SRL* - Centroid(geometry) [the version w/out GEOS] *SRL* - -[ ALWAYS ] - expand(geometry,float8) *LWG* - diff -Nru postgis-1.5.3/postgis/MISSING_OBJECTS postgis-2.0.1/postgis/MISSING_OBJECTS --- postgis-1.5.3/postgis/MISSING_OBJECTS 2004-11-11 09:42:26.000000000 +0000 +++ postgis-2.0.1/postgis/MISSING_OBJECTS 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -# This is a list of objects still missing lwgeom support ---- OBSOLETED ? -geometry_size(geometry, internal) -optimistic_overlap(geometry, geometry, double precision) - diff -Nru postgis-1.5.3/postgis/Makefile postgis-2.0.1/postgis/Makefile --- postgis-1.5.3/postgis/Makefile 2011-06-25 16:29:50.000000000 +0000 +++ postgis-2.0.1/postgis/Makefile 1970-01-01 00:00:00.000000000 +0000 @@ -1,120 +0,0 @@ -# ********************************************************************** -# * $Id$ -# * -# * PostGIS - Spatial Types for PostgreSQL -# * http://postgis.refractions.net -# * Copyright 2008 Mark Cave-Ayland -# * -# * This is free software; you can redistribute and/or modify it under -# * the terms of the GNU General Public Licence. See the COPYING file. -# * -# ********************************************************************** - -MODULE_big=postgis-1.5 -MODULEDIR=contrib/$(MODULE_big) - -# Files to be copied to the contrib/ directory -DATA_built=postgis.sql uninstall_postgis.sql postgis_upgrade_15_minor.sql postgis_upgrade_14_to_15.sql postgis_upgrade_13_to_15.sql -DATA=../spatial_ref_sys.sql - -# SQL objects (files requiring C pre-processing) -SQL_OBJS=postgis.sql.in uninstall_postgis.sql.in - -# PostgreSQL objects -PG_OBJS=lwgeom_pg.o \ - lwgeom_debug.o \ - lwgeom_accum.o \ - lwgeom_spheroid.o \ - lwgeom_ogc.o \ - lwgeom_functions_analytic.o \ - lwgeom_inout.o \ - lwgeom_estimate.o \ - lwgeom_functions_basic.o \ - lwgeom_gist.o \ - lwgeom_btree.o \ - lwgeom_transform.o \ - lwgeom_box.o \ - lwgeom_box3d.o \ - lwgeom_box2dfloat4.o \ - lwgeom_chip.o \ - lwgeom_geos.o \ - lwgeom_geos_prepared.o \ - lwgeom_export.o \ - lwgeom_svg.o \ - lwgeom_gml.o \ - lwgeom_kml.o \ - lwgeom_geojson.o \ - lwgeom_in_gml.o \ - lwgeom_in_kml.o \ - lwgeom_triggers.o \ - lwgeom_dump.o \ - lwgeom_functions_lrs.o \ - long_xact.o \ - lwgeom_sqlmm.o \ - lwgeom_rtree.o \ - geography_inout.o \ - geography_gist.o \ - geography_btree.o \ - geography_estimate.o \ - geography_measurement.o - -# Objects to build using PGXS -OBJS=$(PG_OBJS) - -# Libraries to link into the module (proj, geos) -# -# Note: we specify liblwgeom.a directly in SHLIB_LINK rather than using -# -L... -l options to prevent issues with some platforms trying to link -# to an existing liblwgeom.so in the PostgreSQL $libdir supplied by an -# older version of PostGIS, rather than with the static liblwgeom.a -# supplied with newer versions of PostGIS -PG_CPPFLAGS+= -I/usr/local/include -I/opt/local/include/libxml2 -I../liblwgeom -SHLIB_LINK+= -L/usr/local/lib -lgeos_c -lproj -L/opt/local/lib -lxml2 -lz -lpthread -liconv -lm ../liblwgeom/liblwgeom.a - -# Extra files to remove during 'make clean' -EXTRA_CLEAN=$(SQL_OBJS) - -# PGXS information -PG_CONFIG = /usr/local/pgsql/9.1/bin/pg_config -PGXS := /usr/local/pgsql/9.1/lib/pgxs/src/makefiles/pgxs.mk -include $(PGXS) - -# PGXS override feature. The ability to allow PostGIS to install itself -# in a versioned directory is only available in PostgreSQL >= 8.5. To -# do this by default on older PostgreSQL versions, we need to override -# the existing PGXS targets. -# -# Once PostgreSQL 8.5 becomes the minimum supported version, this entire -# section and its associated Makefile.pgxs should be removed. -PGXSOVERRIDE = 0 -ifeq ($(PGXSOVERRIDE),1) - include Makefile.pgxs -endif - -# If REGRESS=1 passed as a parameter, change the default install paths -# so that no prefix is included. This allows us to relocate to a temporary -# directory for regression testing. -ifeq ($(REGRESS),1) - bindir=/bin - pkglibdir=/lib - datadir=/share -endif - - -# Borrow the $libdir substitution from PGXS but customise by adding the version number -%.sql: %.sql.in - sed 's,MODULE_PATHNAME,$$libdir/postgis-1.5,g' $< >$@ - -postgis_upgrade_15_minor.sql: postgis.sql - $(PERL) ../utils/postgis_proc_upgrade.pl $< 1.5 > $@ - -postgis_upgrade_14_to_15.sql: postgis.sql - $(PERL) ../utils/postgis_proc_upgrade.pl $< 1.4 > $@ - -postgis_upgrade_13_to_15.sql: postgis.sql - $(PERL) ../utils/postgis_proc_upgrade.pl $< 1.3 > $@ - -# Generate any .sql.in files from .sql.in.c files by running them through the C pre-processor -$(SQL_OBJS): %.in: %.in.c - $(CPP) -traditional-cpp $< | grep -v '^#' > $@ - diff -Nru postgis-1.5.3/postgis/Makefile.in postgis-2.0.1/postgis/Makefile.in --- postgis-1.5.3/postgis/Makefile.in 2010-01-08 22:48:29.000000000 +0000 +++ postgis-2.0.1/postgis/Makefile.in 2012-04-24 09:16:09.000000000 +0000 @@ -10,53 +10,56 @@ # * # ********************************************************************** +POSTGIS_PGSQL_VERSION=@POSTGIS_PGSQL_VERSION@ MODULE_big=postgis-@POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@ MODULEDIR=contrib/$(MODULE_big) # Files to be copied to the contrib/ directory -DATA_built=postgis.sql uninstall_postgis.sql postgis_upgrade_15_minor.sql postgis_upgrade_14_to_15.sql postgis_upgrade_13_to_15.sql +DATA_built=postgis.sql uninstall_postgis.sql postgis_upgrade_20_minor.sql legacy.sql uninstall_legacy.sql legacy_minimal.sql DATA=../spatial_ref_sys.sql -# SQL objects (files requiring C pre-processing) -SQL_OBJS=postgis.sql.in uninstall_postgis.sql.in +# SQL preprocessor +SQLPP = @SQLPP@ + +# SQL objects (files requiring pre-processing) +SQL_OBJS=postgis.sql.in legacy.sql.in legacy_minimal.sql.in # PostgreSQL objects -PG_OBJS=lwgeom_pg.o \ - lwgeom_debug.o \ +PG_OBJS= \ + postgis_module.o \ lwgeom_accum.o \ lwgeom_spheroid.o \ lwgeom_ogc.o \ lwgeom_functions_analytic.o \ lwgeom_inout.o \ - lwgeom_estimate.o \ lwgeom_functions_basic.o \ - lwgeom_gist.o \ lwgeom_btree.o \ - lwgeom_transform.o \ lwgeom_box.o \ lwgeom_box3d.o \ - lwgeom_box2dfloat4.o \ - lwgeom_chip.o \ + lwgeom_cache.o \ lwgeom_geos.o \ lwgeom_geos_prepared.o \ + lwgeom_geos_clean.o \ + lwgeom_geos_relatematch.o \ lwgeom_export.o \ - lwgeom_svg.o \ - lwgeom_gml.o \ - lwgeom_kml.o \ - lwgeom_geojson.o \ lwgeom_in_gml.o \ lwgeom_in_kml.o \ + lwgeom_in_geojson.o \ lwgeom_triggers.o \ lwgeom_dump.o \ lwgeom_functions_lrs.o \ long_xact.o \ lwgeom_sqlmm.o \ lwgeom_rtree.o \ + lwgeom_transform.o \ + gserialized_typmod.o \ + gserialized_gist_2d.o \ + gserialized_gist_nd.o \ geography_inout.o \ - geography_gist.o \ geography_btree.o \ geography_estimate.o \ - geography_measurement.o + geography_measurement.o \ + geometry_estimate.o # Objects to build using PGXS OBJS=$(PG_OBJS) @@ -68,17 +71,24 @@ # to an existing liblwgeom.so in the PostgreSQL $libdir supplied by an # older version of PostGIS, rather than with the static liblwgeom.a # supplied with newer versions of PostGIS -PG_CPPFLAGS+=@CPPFLAGS@ -I../liblwgeom -SHLIB_LINK+=@SHLIB_LINK@ ../liblwgeom/liblwgeom.a +PG_CPPFLAGS += @CPPFLAGS@ -I../liblwgeom -I../libpgcommon +SHLIB_LINK_F = ../liblwgeom/.libs/liblwgeom.a ../libpgcommon/libpgcommon.a @SHLIB_LINK@ # Extra files to remove during 'make clean' -EXTRA_CLEAN=$(SQL_OBJS) +EXTRA_CLEAN=$(SQL_OBJS) legacy_uninstall.sql # PGXS information PG_CONFIG = @PGCONFIG@ PGXS := @PGXS@ include $(PGXS) +# Set PERL _after_ the include of PGXS +PERL=@PERL@ + +# This is to workaround a bug in PGXS 8.4 win32 link line, +# see http://trac.osgeo.org/postgis/ticket/1158#comment:57 +SHLIB_LINK := $(SHLIB_LINK_F) $(SHLIB_LINK) + # PGXS override feature. The ability to allow PostGIS to install itself # in a versioned directory is only available in PostgreSQL >= 8.5. To # do this by default on older PostgreSQL versions, we need to override @@ -98,23 +108,50 @@ bindir=/bin pkglibdir=/lib datadir=/share + datamoduledir=contrib/postgis endif +# Make all PostGIS objects depend upon liblwgeom, so that if an underlying +# change is made, a PostGIS rebuild is triggered. +# +# Also they are all dependent on postgis_config.h +# and thus postgis_svn_revision.h +# +$(PG_OBJS): ../liblwgeom/.libs/liblwgeom.a ../libpgcommon/libpgcommon.a ../postgis_config.h ../postgis_svn_revision.h + +../postgis_svn_revision.h: + $(MAKE) -C .. postgis_svn_revision.h + +../liblwgeom/.libs/liblwgeom.a: + make -C ../liblwgeom liblwgeom.la + +../libpgcommon/libpgcommon.a: + make -C ../libpgcommon libpgcommon.a # Borrow the $libdir substitution from PGXS but customise by adding the version number %.sql: %.sql.in sed 's,MODULE_PATHNAME,$$libdir/postgis-@POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@,g' $< >$@ -postgis_upgrade_15_minor.sql: postgis.sql - $(PERL) ../utils/postgis_proc_upgrade.pl $< 1.5 > $@ +postgis_upgrade_20_minor.sql.in: postgis_drop_before.sql postgis.sql postgis_drop_after.sql + cat $^ > $@ +postgis_upgrade_20_minor.sql: postgis_upgrade_20_minor.sql.in ../utils/postgis_proc_upgrade.pl + $(PERL) ../utils/postgis_proc_upgrade.pl $< 2.0 > $@ -postgis_upgrade_14_to_15.sql: postgis.sql - $(PERL) ../utils/postgis_proc_upgrade.pl $< 1.4 > $@ +# Generate any .sql.in files from .sql.in.c files by running them through the SQL pre-processor +$(SQL_OBJS): %.in: %.in.c + $(SQLPP) -I../libpgcommon $< | grep -v '^#' > $@ -postgis_upgrade_13_to_15.sql: postgis.sql - $(PERL) ../utils/postgis_proc_upgrade.pl $< 1.3 > $@ +# SQL objects are also dependent on postgis_config.h for PostgreSQL version +$(SQL_OBJS): ../postgis_config.h ../postgis_svn_revision.h -# Generate any .sql.in files from .sql.in.c files by running them through the C pre-processor -$(SQL_OBJS): %.in: %.in.c - $(CPP) -traditional-cpp $< | grep -v '^#' > $@ +postgis.sql.in: sqldefines.h long_xact.sql.in.c geography.sql.in.c + +#uninstall_postgis.sql.in: sqldefines.h uninstall_sqlmm.sql.in.c uninstall_long_xact.sql.in.c uninstall_geography.sql.in.c +uninstall_postgis.sql: postgis.sql ../utils/create_undef.pl + $(PERL) ../utils/create_undef.pl $< $(POSTGIS_PGSQL_VERSION) > $@ + +uninstall_legacy.sql: legacy.sql ../utils/create_undef.pl + $(PERL) ../utils/create_undef.pl $< $(POSTGIS_PGSQL_VERSION) > $@ +distclean: clean + rm -f Makefile diff -Nru postgis-1.5.3/postgis/SERIALIZED_FORM postgis-2.0.1/postgis/SERIALIZED_FORM --- postgis-1.5.3/postgis/SERIALIZED_FORM 2006-12-06 02:00:26.000000000 +0000 +++ postgis-2.0.1/postgis/SERIALIZED_FORM 1970-01-01 00:00:00.000000000 +0000 @@ -1,292 +0,0 @@ -===PostGIS Serialized Geometry Format=== - - -==Introduction== - - -This document describe the serialied form of -Geometries as implemented starting from version 1.x. - -Prior versions used a different format. - -The new format is aimed at reducing geometries size, for -this reason we refer to the old format as HWGEOM (High Weight GEOMetry) -and to the new one as LWGEOM (Light Weight GEOMetry). - - -==Serialized Form and PostgreSQL varlena objects== - - -PostGIS serialized form is a recursive structure, where -elements in a collection (multi* or geometrycollections) -are complete serialized forms themself. - -PostgreSQL requires to add an header to variable-lenght -user defined types, for this reason, the type actually -stored on disk is a SERIALIZED geometry wrapped in this -required header. We call the complete PostgreSQL type -``PG_LWGEOM''. - - -==Geometry Type byte== - - -All serialiezd geometries start with a single byte -encoding geometry type (lower nibble) and flags -(higher nibble). - -Geometry Type Byte: - - [BSZM] [TTTT] - -Flags values: - - B = 16 byte BOX2DFLOAT4 follows (probably not aligned) [before SRID] - S = 4 byte SRID attached (0= not attached (-1), 1= attached) - ZM = dimensionality (hasZ, hasM) - -Type values: - - wkbPoint = 1 - wkbLineString = 2 - wkbPolygon = 3 - wkbMultiPoint = 4 - wkbMultiLineString = 5 - wkbMultiPolygon = 6 - wkbGeometryCollection = 7 - -* Note that the following values do not correspond to wkb type values. - CircularString = 8 - CompoundCurve = 9 - CurvePolygon = 13 - MultiCurve = 14 - MultiSurface = 15 - -==Bounding box and SRID== - - -Following the Geometry type byte we find optional bounding box -and/or SRID values. Presence of them is encoded in the type byte. - -If both objects are present the bounding box come first. - -Bounding box is composed by 4 32-bit float: - - [FLOAT32] [FLOAT32] [FLOAT32] [FLOAT32] - xmin ymin xmax ymax - -SRID is composed by a 32-bit integer: - - [INT32] - SRID - - -==Ordinate Arrays== - - -When it comes to ordinate values all geometries use arrays of 64-bit -floats. Number and semantic of values depend on the dimension flags -on the geometry type byte: - - 2D (ZM=0x00) - [FLOAT64] [FLOAT64] - x y - - 3DM (ZM=0x01) - [FLOAT64] [FLOAT64] [FLOAT64] - x y m - - 3DZ (ZM=0x10) - [FLOAT64] [FLOAT64] [FLOAT64] - x y z - - 4D (ZM=0x11) - [FLOAT64] [FLOAT64] [FLOAT64] [FLOAT64] - x y z m - - -==Geometry types== - -What you find after the type byte and optional bbox and SRID -(COMMON_HEADER from now on) depends on actual geometry type. - -=Point= - -A Point geometry is as follows: - - - -- single element - -=LineString= - -A LineString geometry is as follows: - - - -- number of elements in following ORDINATE_ARRAY - - -=CircularString= - -A CircularString geometry is as follows: - - - -- number of elements in following ORDINATE_ARRAY - - -=CompoundString= - -A CompoundString geometry is as follows: - - - -- number of segments - One or more geometries as specified by previous uint32: - -- Must be some combination of - LineStrings and CircularStrings. - -=Polygon= - -A Polygon geometry is as follows: - - - - -- number of ORDINATE_ARRAYs (at least 1, the shell) - - One or more arrays (rings) as specified by previous uint32: - - -- number of elements in following ORDINATE_ARRAY - -- single element - -=CurvePolygon= - -A CurvePolygon geometry is as follows: - - - -- number of rings - One or more geometries as specified by previous uint32: - -- Must be some combination of - LineStrings and CircularStrings. - CompoundString are not yet supported. - -=Collections= - -All collection types (MultiPoint, MultiLineString, MultiPolygon, -GeometryCollection) have the same structure. Real type is just -an hint on what one should expect from element geometries. -Note that the GeometryCollection type is also used for EMPTY -Geometries (number_of_geometries is set to 0 in this case). - -A Collection geometry is as follows: - - - - -- number of GEOMETRIES - - Zero (EMPTY) or more geometries as specified by previous uint32: - - -- starting from type byte again - - -==Examples== - - -=3DZ point, no bounding box, no SRID= - - TYPE - flags:__Z_ type:1 - X - Y - Z - -=3DM point, bounding box, no SRID= - - TYPE - flags:B__M type:1 - XMIN - YMIN - XMAX - YMAX - X - Y - M - -=2D LineString, no bounding box, SRID= - - TYPE - flags:_S__ type:2 - - NPOINTS - 3 - - SRID - - X0 - Y0 - - X1 - Y1 - - X2 - Y2 - -=2D polygon, no bounding box, no SRID= - - TYPE - flags:____ type:3 - - NRINGS - 2 - - NPOINTS - 4 - X0 - Y0 - X1 - Y1 - X2 - Y2 - X3 - Y3 - - NPOINTS - 6 - X0 - Y0 - X1 - Y1 - X2 - Y2 - X3 - Y3 - X4 - Y4 - X5 - Y5 - -=2D Collection of a point and a line, SRID and bbox present= - - TYPE - flags:BS__ type:7 - - -- BBOX - XMIN - YMIN - XMAX - YMAX - - -- SRID - SRID - - NGEOMS - 2 - - TYPE - flags:____ type:1 ( the point ) - X0 - Y0 - - TYPE - flags:____ type:2 ( the line ) - NPOINTS - 3 - X0 - Y0 - X1 - Y1 - X2 - Y2 - -Note that in the inner geometries: - - - SRID value is inherited by parent geometry type. - - - BBOX value is not present (can be, however) - - - ZM flags must exactly match those in the outer geometry type byte - diff -Nru postgis-1.5.3/postgis/TODO postgis-2.0.1/postgis/TODO --- postgis-1.5.3/postgis/TODO 2005-04-15 14:04:34.000000000 +0000 +++ postgis-2.0.1/postgis/TODO 2012-02-27 22:08:12.000000000 +0000 @@ -22,5 +22,3 @@ - proj support functions might need 3d sometimes. -- Add -i command line for automatic geometry index creation. - diff -Nru postgis-1.5.3/postgis/compat.h postgis-2.0.1/postgis/compat.h --- postgis-1.5.3/postgis/compat.h 2005-11-28 15:06:06.000000000 +0000 +++ postgis-2.0.1/postgis/compat.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -#ifndef _COMPAT_H -#define _COMPAT_H 1 - -#include - -int vasprintf(char **strp, const char *format, va_list ap); -#endif /* _COMPAT_H */ diff -Nru postgis-1.5.3/postgis/geography.h postgis-2.0.1/postgis/geography.h --- postgis-1.5.3/postgis/geography.h 2009-12-15 20:08:36.000000000 +0000 +++ postgis-2.0.1/postgis/geography.h 2012-02-27 22:08:12.000000000 +0000 @@ -1,5 +1,5 @@ /********************************************************************** - * $Id: geography.h 5005 2009-12-15 20:08:36Z pramsey $ + * $Id: geography.h 9324 2012-02-27 22:08:12Z pramsey $ * * PostGIS - Spatial Types for PostgreSQL * Copyright 2009 Paul Ramsey @@ -11,96 +11,15 @@ /********************************************************************** -** Spherical radius. -** Moritz, H. (1980). Geodetic Reference System 1980, by resolution of -** the XVII General Assembly of the IUGG in Canberra. -** http://en.wikipedia.org/wiki/Earth_radius -** http://en.wikipedia.org/wiki/World_Geodetic_System +** Useful functions for all GSERIALIZED handlers. +** TODO: Move to common.h in pgcommon */ -#define WGS84_MAJOR_AXIS 6378137.0 -#define WGS84_INVERSE_FLATTENING 298.257223563 -#define WGS84_MINOR_AXIS (WGS84_MAJOR_AXIS - WGS84_MAJOR_AXIS / WGS84_INVERSE_FLATTENING) -#define WGS84_RADIUS ((2.0 * WGS84_MAJOR_AXIS + WGS84_MINOR_AXIS ) / 3.0) - -/* -** EPSG WGS84 geographics, OGC standard default SRS, better be in -** the SPATIAL_REF_SYS table! -*/ -#define SRID_DEFAULT 4326 - -/********************************************************************** -** Useful functions for all GEOGRAPHY handlers. -*/ - -/* Convert lwgeom to newly allocated gserialized */ -GSERIALIZED* geography_serialize(LWGEOM *lwgeom); /* Check that the typmod matches the flags on the lwgeom */ -void geography_valid_typmod(LWGEOM *lwgeom, int32 typmod); +void postgis_valid_typmod(const GSERIALIZED *gser, int32_t typmod); /* Check that the type is legal in geography (no curves please!) */ -void geography_valid_type(uchar type); - - - -/********************************************************************** -** GIDX structure. -** -** This is an n-dimensional (practically, the -** implementation is 2-4 dimensions) box used for index keys. The -** coordinates are anonymous, so we can have any number of dimensions. -** The sizeof a GIDX is 1 + 2 * ndims * sizeof(float). -** The order of values in a GIDX is -** xmin,xmax,ymin,ymax,zmin,zmax... -*/ -typedef struct -{ - int32 varsize; - float c[1]; -} GIDX; - -/* -** For some GiST support functions, it is more efficient to allocate -** memory for our GIDX off the stack and cast that memory into a GIDX. -** But, GIDX is variable length, what to do? We'll bake in the assumption -** that no GIDX is more than 4-dimensional for now, and ensure that much -** space is available. -** 4 bytes varsize + 4 dimensions * 2 ordinates * 4 bytes float size = 36 bytes -*/ -#define GIDX_MAX_SIZE 36 - -/********************************************************************************* -** GIDX support functions. -** -** We put the GIDX support here rather than libgeom because it is a specialized -** type only used for indexing purposes. It also makes use of some PgSQL -** infrastructure like the VARSIZE() macros. -*/ - -/* Returns number of dimensions for this GIDX */ -#define GIDX_NDIMS(gidx) ((VARSIZE((gidx)) - VARHDRSZ) / (2 * sizeof(float))) -/* Minimum accessor. */ -#define GIDX_GET_MIN(gidx, dimension) ((gidx)->c[2*(dimension)]) -/* Maximum accessor. */ -#define GIDX_GET_MAX(gidx, dimension) ((gidx)->c[2*(dimension)+1]) -/* Minimum setter. */ -#define GIDX_SET_MIN(gidx, dimension, value) ((gidx)->c[2*(dimension)] = (value)) -/* Maximum setter. */ -#define GIDX_SET_MAX(gidx, dimension, value) ((gidx)->c[2*(dimension)+1] = (value)) -/* Returns the size required to store a GIDX of requested dimension */ -#define GIDX_SIZE(dimensions) (sizeof(int32) + 2*(dimensions)*sizeof(float)) -/* Allocate a new gidx */ -GIDX* gidx_new(int ndims); -/* Pull out the gidx bounding box with a absolute minimum system overhead */ -int geography_datum_gidx(Datum geography_datum, GIDX *gidx); -/* Pull out the gidx bounding box from an already de-toasted geography */ -int geography_gidx(GSERIALIZED *g, GIDX *gidx); -/* Convert a gidx to a gbox */ -void gbox_from_gidx(GIDX *gidx, GBOX *gbox); -/* Convert a gbox to a new gidx */ -GIDX* gidx_from_gbox(GBOX box); -/* Copy a new bounding box into an existing gserialized */ -GSERIALIZED* gidx_insert_into_gserialized(GSERIALIZED *g, GIDX *gidx); - - +void geography_valid_type(uint8_t type); +/* Expand the embedded bounding box in a #GSERIALIZED */ +GSERIALIZED* gserialized_expand(GSERIALIZED *g, double distance); diff -Nru postgis-1.5.3/postgis/geography.sql.in.c postgis-2.0.1/postgis/geography.sql.in.c --- postgis-1.5.3/postgis/geography.sql.in.c 2010-09-18 18:01:17.000000000 +0000 +++ postgis-2.0.1/postgis/geography.sql.in.c 2012-06-12 13:04:49.000000000 +0000 @@ -1,5 +1,5 @@ --------------------------------------------------------------------------- --- $Id: geography.sql.in.c 5976 2010-09-18 18:01:17Z pramsey $ +-- $Id: geography.sql.in.c 9900 2012-06-12 13:04:49Z strk $ -- -- PostGIS - Spatial Types for PostgreSQL -- Copyright 2009 Paul Ramsey @@ -9,144 +9,142 @@ -- --------------------------------------------------------------------------- +----------------------------------------------------------------------------- +-- GEOGRAPHY TYPE +----------------------------------------------------------------------------- + -- Availability: 1.5.0 CREATE OR REPLACE FUNCTION geography_typmod_in(cstring[]) RETURNS integer AS 'MODULE_PATHNAME','geography_typmod_in' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.5.0 CREATE OR REPLACE FUNCTION geography_typmod_out(integer) RETURNS cstring - AS 'MODULE_PATHNAME','geography_typmod_out' - LANGUAGE 'C' IMMUTABLE STRICT; + AS 'MODULE_PATHNAME','postgis_typmod_out' + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.5.0 CREATE OR REPLACE FUNCTION geography_in(cstring, oid, integer) RETURNS geography AS 'MODULE_PATHNAME','geography_in' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.5.0 CREATE OR REPLACE FUNCTION geography_out(geography) RETURNS cstring AS 'MODULE_PATHNAME','geography_out' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION geography_recv(internal, oid, integer) + RETURNS geography + AS 'MODULE_PATHNAME','geography_recv' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION geography_send(geography) + RETURNS bytea + AS 'MODULE_PATHNAME','geography_send' + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.5.0 CREATE OR REPLACE FUNCTION geography_analyze(internal) RETURNS bool AS 'MODULE_PATHNAME','geography_analyze' - LANGUAGE 'C' VOLATILE STRICT; + LANGUAGE 'c' VOLATILE STRICT; -- Availability: 1.5.0 CREATE TYPE geography ( internallength = variable, input = geography_in, output = geography_out, + receive = geography_recv, + send = geography_send, typmod_in = geography_typmod_in, typmod_out = geography_typmod_out, + delimiter = ':', analyze = geography_analyze, storage = main, alignment = double ); --- --- GIDX type is used by the GiST index bindings. --- In/out functions are stubs, as all access should be internal. ---- --- Availability: 1.5.0 -CREATE OR REPLACE FUNCTION gidx_in(cstring) - RETURNS gidx - AS 'MODULE_PATHNAME','gidx_in' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Availability: 1.5.0 -CREATE OR REPLACE FUNCTION gidx_out(gidx) - RETURNS cstring - AS 'MODULE_PATHNAME','gidx_out' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Availability: 1.5.0 -CREATE TYPE gidx ( - internallength = variable, - input = gidx_in, - output = gidx_out, - storage = plain, - alignment = double -); -- Availability: 1.5.0 CREATE OR REPLACE FUNCTION geography(geography, integer, boolean) RETURNS geography AS 'MODULE_PATHNAME','geography_enforce_typmod' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.5.0 CREATE CAST (geography AS geography) WITH FUNCTION geography(geography, integer, boolean) AS IMPLICIT; +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION geography(bytea) + RETURNS geography + AS 'MODULE_PATHNAME','LWGEOM_from_bytea' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION bytea(geography) + RETURNS bytea + AS 'MODULE_PATHNAME','LWGEOM_to_bytea' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Availability: 2.0.0 +CREATE CAST (bytea AS geography) WITH FUNCTION geography(bytea) AS IMPLICIT; +-- Availability: 2.0.0 +CREATE CAST (geography AS bytea) WITH FUNCTION bytea(geography) AS IMPLICIT; + -- Availability: 1.5.0 CREATE OR REPLACE FUNCTION ST_AsText(geography) - RETURNS text - AS 'MODULE_PATHNAME','geography_as_text' - LANGUAGE 'C' IMMUTABLE STRICT; + RETURNS TEXT + AS 'MODULE_PATHNAME','LWGEOM_asText' + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography --- TODO Remove in 2.0 CREATE OR REPLACE FUNCTION ST_AsText(text) RETURNS text AS $$ SELECT ST_AsText($1::geometry); $$ - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -- Availability: 1.5.0 CREATE OR REPLACE FUNCTION ST_GeographyFromText(text) RETURNS geography AS 'MODULE_PATHNAME','geography_from_text' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.5.0 CREATE OR REPLACE FUNCTION ST_GeogFromText(text) RETURNS geography AS 'MODULE_PATHNAME','geography_from_text' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Availability: 1.5.0 -CREATE OR REPLACE FUNCTION ST_AsBinary(geography) - RETURNS bytea - AS 'MODULE_PATHNAME','geography_as_binary' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography --- TODO Remove in 2.0 -CREATE OR REPLACE FUNCTION ST_AsBinary(text) - RETURNS bytea AS - $$ SELECT ST_AsBinary($1::geometry); $$ - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.5.0 CREATE OR REPLACE FUNCTION ST_GeogFromWKB(bytea) RETURNS geography AS 'MODULE_PATHNAME','geography_from_binary' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.5.0 -CREATE OR REPLACE FUNCTION geography_typmod_dims(integer) +CREATE OR REPLACE FUNCTION postgis_typmod_dims(integer) RETURNS integer - AS 'MODULE_PATHNAME','geography_typmod_dims' - LANGUAGE 'C' IMMUTABLE STRICT; + AS 'MODULE_PATHNAME','postgis_typmod_dims' + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.5.0 -CREATE OR REPLACE FUNCTION geography_typmod_srid(integer) +CREATE OR REPLACE FUNCTION postgis_typmod_srid(integer) RETURNS integer - AS 'MODULE_PATHNAME','geography_typmod_srid' - LANGUAGE 'C' IMMUTABLE STRICT; + AS 'MODULE_PATHNAME','postgis_typmod_srid' + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.5.0 -CREATE OR REPLACE FUNCTION geography_typmod_type(integer) +CREATE OR REPLACE FUNCTION postgis_typmod_type(integer) RETURNS text - AS 'MODULE_PATHNAME','geography_typmod_type' - LANGUAGE 'C' IMMUTABLE STRICT; + AS 'MODULE_PATHNAME','postgis_typmod_type' + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.5.0 CREATE OR REPLACE VIEW geography_columns AS @@ -155,9 +153,9 @@ n.nspname AS f_table_schema, c.relname AS f_table_name, a.attname AS f_geography_column, - geography_typmod_dims(a.atttypmod) AS coord_dimension, - geography_typmod_srid(a.atttypmod) AS srid, - geography_typmod_type(a.atttypmod) AS type + postgis_typmod_dims(a.atttypmod) AS coord_dimension, + postgis_typmod_srid(a.atttypmod) AS srid, + postgis_typmod_type(a.atttypmod) AS type FROM pg_class c, pg_attribute a, @@ -168,13 +166,14 @@ AND a.atttypid = t.oid AND a.attrelid = c.oid AND c.relnamespace = n.oid - AND NOT pg_is_other_temp_schema(c.relnamespace); + AND NOT pg_is_other_temp_schema(c.relnamespace) + AND has_table_privilege( c.oid, 'SELECT'::text ); -- Availability: 1.5.0 CREATE OR REPLACE FUNCTION geography(geometry) RETURNS geography AS 'MODULE_PATHNAME','geography_from_geometry' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.5.0 CREATE CAST (geometry AS geography) WITH FUNCTION geography(geometry) AS IMPLICIT; @@ -183,7 +182,7 @@ CREATE OR REPLACE FUNCTION geometry(geography) RETURNS geometry AS 'MODULE_PATHNAME','geometry_from_geography' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.5.0 CREATE CAST (geography AS geometry) WITH FUNCTION geometry(geography) ; @@ -193,64 +192,64 @@ -- ---------- ---------- ---------- ---------- ---------- ---------- ---------- -- Availability: 1.5.0 -CREATE OR REPLACE FUNCTION geography_gist_consistent(internal,geometry,int4) +CREATE OR REPLACE FUNCTION geography_gist_consistent(internal,geography,int4) RETURNS bool - AS 'MODULE_PATHNAME' ,'geography_gist_consistent' - LANGUAGE 'C'; + AS 'MODULE_PATHNAME' ,'gserialized_gist_consistent' + LANGUAGE 'c'; -- Availability: 1.5.0 CREATE OR REPLACE FUNCTION geography_gist_compress(internal) RETURNS internal - AS 'MODULE_PATHNAME','geography_gist_compress' - LANGUAGE 'C'; + AS 'MODULE_PATHNAME','gserialized_gist_compress' + LANGUAGE 'c'; -- Availability: 1.5.0 CREATE OR REPLACE FUNCTION geography_gist_penalty(internal,internal,internal) RETURNS internal - AS 'MODULE_PATHNAME' ,'geography_gist_penalty' - LANGUAGE 'C'; + AS 'MODULE_PATHNAME' ,'gserialized_gist_penalty' + LANGUAGE 'c'; -- Availability: 1.5.0 CREATE OR REPLACE FUNCTION geography_gist_picksplit(internal, internal) RETURNS internal - AS 'MODULE_PATHNAME' ,'geography_gist_picksplit' - LANGUAGE 'C'; + AS 'MODULE_PATHNAME' ,'gserialized_gist_picksplit' + LANGUAGE 'c'; -- Availability: 1.5.0 CREATE OR REPLACE FUNCTION geography_gist_union(bytea, internal) RETURNS internal - AS 'MODULE_PATHNAME' ,'geography_gist_union' - LANGUAGE 'C'; + AS 'MODULE_PATHNAME' ,'gserialized_gist_union' + LANGUAGE 'c'; -- Availability: 1.5.0 CREATE OR REPLACE FUNCTION geography_gist_same(box2d, box2d, internal) RETURNS internal - AS 'MODULE_PATHNAME' ,'geography_gist_same' - LANGUAGE 'C'; + AS 'MODULE_PATHNAME' ,'gserialized_gist_same' + LANGUAGE 'c'; -- Availability: 1.5.0 CREATE OR REPLACE FUNCTION geography_gist_decompress(internal) RETURNS internal - AS 'MODULE_PATHNAME' ,'geography_gist_decompress' - LANGUAGE 'C'; + AS 'MODULE_PATHNAME' ,'gserialized_gist_decompress' + LANGUAGE 'c'; -- Availability: 1.5.0 CREATE OR REPLACE FUNCTION geography_gist_selectivity (internal, oid, internal, int4) RETURNS float8 AS 'MODULE_PATHNAME', 'geography_gist_selectivity' - LANGUAGE 'C'; + LANGUAGE 'c'; -- Availability: 1.5.0 CREATE OR REPLACE FUNCTION geography_gist_join_selectivity(internal, oid, internal, smallint) RETURNS float8 - AS 'MODULE_PATHNAME', 'geography_gist_join_selectivity' - LANGUAGE 'C'; + AS 'MODULE_PATHNAME', 'geography_gist_selectivity' + LANGUAGE 'c'; -- Availability: 1.5.0 CREATE OR REPLACE FUNCTION geography_overlaps(geography, geography) RETURNS boolean - AS 'MODULE_PATHNAME' ,'geography_overlaps' - LANGUAGE 'C' IMMUTABLE STRICT; + AS 'MODULE_PATHNAME' ,'gserialized_overlaps' + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.5.0 CREATE OPERATOR && ( @@ -269,7 +268,7 @@ -- OPERATOR 6 ~= , -- OPERATOR 7 ~ , -- OPERATOR 8 @ , - FUNCTION 1 geography_gist_consistent (internal, geometry, int4), + FUNCTION 1 geography_gist_consistent (internal, geography, int4), FUNCTION 2 geography_gist_union (bytea, internal), FUNCTION 3 geography_gist_compress (internal), FUNCTION 4 geography_gist_decompress (internal), @@ -287,32 +286,32 @@ CREATE OR REPLACE FUNCTION geography_lt(geography, geography) RETURNS bool AS 'MODULE_PATHNAME', 'geography_lt' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; CREATE OR REPLACE FUNCTION geography_le(geography, geography) RETURNS bool AS 'MODULE_PATHNAME', 'geography_le' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; CREATE OR REPLACE FUNCTION geography_gt(geography, geography) RETURNS bool AS 'MODULE_PATHNAME', 'geography_gt' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; CREATE OR REPLACE FUNCTION geography_ge(geography, geography) RETURNS bool AS 'MODULE_PATHNAME', 'geography_ge' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; CREATE OR REPLACE FUNCTION geography_eq(geography, geography) RETURNS bool AS 'MODULE_PATHNAME', 'geography_eq' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; CREATE OR REPLACE FUNCTION geography_cmp(geography, geography) RETURNS integer AS 'MODULE_PATHNAME', 'geography_cmp' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- -- Sorting operators for Btree @@ -366,129 +365,83 @@ -- SVG OUTPUT -- --- ST_AsSVG(geography, precision, rel) -CREATE OR REPLACE FUNCTION ST_AsSVG(geography,int4,int4) - RETURNS text - AS 'MODULE_PATHNAME','geography_as_svg' - LANGUAGE 'C' IMMUTABLE STRICT; - --- ST_AsSVG(geography, precision) / rel=0 -CREATE OR REPLACE FUNCTION ST_AsSVG(geography,int4) - RETURNS text - AS 'MODULE_PATHNAME','geography_as_svg' - LANGUAGE 'C' IMMUTABLE STRICT; - --- ST_AsSVG(geography) / precision=15, rel=0 -CREATE OR REPLACE FUNCTION ST_AsSVG(geography) +-- ST_AsSVG(geography, rel, precision) +-- rel int4 DEFAULT 0, maxdecimaldigits int4 DEFAULT 15 +-- Changed 2.0.0 to use default args and named args +CREATE OR REPLACE FUNCTION ST_AsSVG(geog geography,rel int4 DEFAULT 0,maxdecimaldigits int4 DEFAULT 15) RETURNS text AS 'MODULE_PATHNAME','geography_as_svg' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography --- TODO Remove in 2.0 CREATE OR REPLACE FUNCTION ST_AsSVG(text) RETURNS text AS - $$ SELECT ST_AsSVG($1::geometry); $$ - LANGUAGE 'SQL' IMMUTABLE STRICT; - + $$ SELECT ST_AsSVG($1::geometry,0,15); $$ + LANGUAGE 'sql' IMMUTABLE STRICT; -- -- GML OUTPUT -- -- _ST_AsGML(version, geography, precision, option) -CREATE OR REPLACE FUNCTION _ST_AsGML(int4, geography, int4, int4) +CREATE OR REPLACE FUNCTION _ST_AsGML(int4, geography, int4, int4, text) RETURNS text AS 'MODULE_PATHNAME','geography_as_gml' - LANGUAGE 'C' IMMUTABLE STRICT; - --- ST_AsGML(geography, precision) / version=2 options=0 -CREATE OR REPLACE FUNCTION ST_AsGML(geography, int4) - RETURNS text - AS 'SELECT _ST_AsGML(2, $1, $2, 0)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- ST_AsGML(geography) / precision=15 version=2 options=0 -CREATE OR REPLACE FUNCTION ST_AsGML(geography) - RETURNS text - AS 'SELECT _ST_AsGML(2, $1, 15, 0)' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE; -- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography --- TODO Remove in 2.0 +-- Change 2.0.0 to use base function CREATE OR REPLACE FUNCTION ST_AsGML(text) RETURNS text AS - $$ SELECT ST_AsGML($1::geometry); $$ - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- ST_AsGML(version, geography) / precision=15 version=2 options=0 -CREATE OR REPLACE FUNCTION ST_AsGML(int4, geography) - RETURNS text - AS 'SELECT _ST_AsGML($1, $2, 15, 0)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- ST_AsGML(version, geography, precision) / options = 0 -CREATE OR REPLACE FUNCTION ST_AsGML(int4, geography, int4) - RETURNS text - AS 'SELECT _ST_AsGML($1, $2, $3, 0)' - LANGUAGE 'SQL' IMMUTABLE STRICT; + $$ SELECT _ST_AsGML(2,$1::geometry,15,0, NULL); $$ + LANGUAGE 'sql' IMMUTABLE STRICT; -- ST_AsGML (geography, precision, option) / version=2 -CREATE OR REPLACE FUNCTION ST_AsGML(geography, int4, int4) +-- Availability: 1.5.0 +-- Changed: 2.0.0 to use default args +CREATE OR REPLACE FUNCTION ST_AsGML(geog geography, maxdecimaldigits int4 DEFAULT 15, options int4 DEFAULT 0) RETURNS text - AS 'SELECT _ST_AsGML(2, $1, $2, $3)' - LANGUAGE 'SQL' IMMUTABLE STRICT; + AS 'SELECT _ST_AsGML(2, $1, $2, $3, null)' + LANGUAGE 'sql' IMMUTABLE STRICT; --- ST_AsGML(version, geography, precision, option) -CREATE OR REPLACE FUNCTION ST_AsGML(int4, geography, int4, int4) +-- ST_AsGML(version, geography, precision, option, prefix) +-- Changed: 2.0.0 to use default args and allow named args +CREATE OR REPLACE FUNCTION ST_AsGML(version int4, geog geography, maxdecimaldigits int4 DEFAULT 15, options int4 DEFAULT 0, nprefix text DEFAULT NULL) RETURNS text - AS 'SELECT _ST_AsGML($1, $2, $3, $4)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - - + AS $$ SELECT _ST_AsGML($1, $2, $3, $4, $5);$$ + LANGUAGE 'sql' IMMUTABLE; -- -- KML OUTPUT -- -- _ST_AsKML(version, geography, precision) -CREATE OR REPLACE FUNCTION _ST_AsKML(int4, geography, int4) +CREATE OR REPLACE FUNCTION _ST_AsKML(int4, geography, int4, text) RETURNS text AS 'MODULE_PATHNAME','geography_as_kml' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE; -- AsKML(geography,precision) / version=2 -CREATE OR REPLACE FUNCTION ST_AsKML(geography, int4) +-- Changed: 2.0.0 to use default args and named args +CREATE OR REPLACE FUNCTION ST_AsKML(geog geography, maxdecimaldigits int4 DEFAULT 15) RETURNS text - AS 'SELECT _ST_AsKML(2, $1, $2)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- AsKML(geography) / precision=15 version=2 -CREATE OR REPLACE FUNCTION ST_AsKML(geography) - RETURNS text - AS 'SELECT _ST_AsKML(2, $1, 15)' - LANGUAGE 'SQL' IMMUTABLE STRICT; + AS 'SELECT _ST_AsKML(2, $1, $2, null)' + LANGUAGE 'sql' IMMUTABLE STRICT; -- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography --- TODO Remove in 2.0 +-- Deprecated 2.0.0 CREATE OR REPLACE FUNCTION ST_AsKML(text) RETURNS text AS - $$ SELECT ST_AsKML($1::geometry); $$ - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- ST_AsKML(version, geography) / precision=15 -CREATE OR REPLACE FUNCTION ST_AsKML(int4, geography) - RETURNS text - AS 'SELECT _ST_AsKML($1, $2, 15)' - LANGUAGE 'SQL' IMMUTABLE STRICT; + $$ SELECT _ST_AsKML(2, $1::geometry, 15, null); $$ + LANGUAGE 'sql' IMMUTABLE STRICT; --- ST_AsKML(version, geography, precision) -CREATE OR REPLACE FUNCTION ST_AsKML(int4, geography, int4) +-- ST_AsKML(version, geography, precision, prefix) +-- Availability: 2.0.0 nprefix added +-- Changed: 2.0.0 to use default args and named args +CREATE OR REPLACE FUNCTION ST_AsKML(version int4, geog geography, maxdecimaldigits int4 DEFAULT 15, nprefix text DEFAULT null) RETURNS text - AS 'SELECT _ST_AsKML($1, $2, $3)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - - + AS 'SELECT _ST_AsKML($1, $2, $3, $4)' + LANGUAGE 'sql' IMMUTABLE; -- -- GeoJson Output @@ -497,50 +450,28 @@ CREATE OR REPLACE FUNCTION _ST_AsGeoJson(int4, geography, int4, int4) RETURNS text AS 'MODULE_PATHNAME','geography_as_geojson' - LANGUAGE 'C' IMMUTABLE STRICT; - --- ST_AsGeoJson(geography, precision) / version=1 options=0 -CREATE OR REPLACE FUNCTION ST_AsGeoJson(geography, int4) - RETURNS text - AS 'SELECT _ST_AsGeoJson(1, $1, $2, 0)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- ST_AsGeoJson(geography) / precision=15 version=1 options=0 -CREATE OR REPLACE FUNCTION ST_AsGeoJson(geography) - RETURNS text - AS 'SELECT _ST_AsGeoJson(1, $1, 15, 0)' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography --- TODO Remove in 2.0 +-- Deprecated in 2.0.0 CREATE OR REPLACE FUNCTION ST_AsGeoJson(text) RETURNS text AS - $$ SELECT ST_AsGeoJson($1::geometry); $$ - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- ST_AsGeoJson(version, geography) / precision=15 options=0 -CREATE OR REPLACE FUNCTION ST_AsGeoJson(int4, geography) - RETURNS text - AS 'SELECT _ST_AsGeoJson($1, $2, 15, 0)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- ST_AsGeoJson(version, geography, precision) / options=0 -CREATE OR REPLACE FUNCTION ST_AsGeoJson(int4, geography, int4) - RETURNS text - AS 'SELECT _ST_AsGeoJson($1, $2, $3, 0)' - LANGUAGE 'SQL' IMMUTABLE STRICT; + $$ SELECT _ST_AsGeoJson(1, $1::geometry,15,0); $$ + LANGUAGE 'sql' IMMUTABLE STRICT; -- ST_AsGeoJson(geography, precision, options) / version=1 -CREATE OR REPLACE FUNCTION ST_AsGeoJson(geography, int4, int4) +-- Changed: 2.0.0 to use default args and named args +CREATE OR REPLACE FUNCTION ST_AsGeoJson(geog geography, maxdecimaldigits int4 DEFAULT 15, options int4 DEFAULT 0) RETURNS text - AS 'SELECT _ST_AsGeoJson(1, $1, $2, $3)' - LANGUAGE 'SQL' IMMUTABLE STRICT; + AS $$ SELECT _ST_AsGeoJson(1, $1, $2, $3); $$ + LANGUAGE 'sql' IMMUTABLE STRICT; -- ST_AsGeoJson(version, geography, precision,options) -CREATE OR REPLACE FUNCTION ST_AsGeoJson(int4, geography, int4, int4) +-- Changed: 2.0.0 to use default args and named args +CREATE OR REPLACE FUNCTION ST_AsGeoJson(gj_version int4, geog geography, maxdecimaldigits int4 DEFAULT 15, options int4 DEFAULT 0) RETURNS text - AS 'SELECT _ST_AsGeoJson($1, $2, $3, $4)' - LANGUAGE 'SQL' IMMUTABLE STRICT; + AS $$ SELECT _ST_AsGeoJson($1, $2, $3, $4); $$ + LANGUAGE 'sql' IMMUTABLE STRICT; -- ---------- ---------- ---------- ---------- ---------- ---------- ---------- -- Measurement Functions @@ -552,7 +483,7 @@ CREATE OR REPLACE FUNCTION _ST_Distance(geography, geography, float8, boolean) RETURNS float8 AS 'MODULE_PATHNAME','geography_distance' - LANGUAGE 'C' IMMUTABLE STRICT + LANGUAGE 'c' IMMUTABLE STRICT COST 100; -- Stop calculation and return immediately once distance is less than tolerance @@ -560,109 +491,113 @@ CREATE OR REPLACE FUNCTION _ST_DWithin(geography, geography, float8, boolean) RETURNS boolean AS 'MODULE_PATHNAME','geography_dwithin' - LANGUAGE 'C' IMMUTABLE STRICT + LANGUAGE 'c' IMMUTABLE STRICT COST 100; -- Availability: 1.5.0 CREATE OR REPLACE FUNCTION ST_Distance(geography, geography, boolean) RETURNS float8 AS 'SELECT _ST_Distance($1, $2, 0.0, $3)' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -- Currently defaulting to spheroid calculations -- Availability: 1.5.0 CREATE OR REPLACE FUNCTION ST_Distance(geography, geography) RETURNS float8 AS 'SELECT _ST_Distance($1, $2, 0.0, true)' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography --- TODO Remove in 2.0 CREATE OR REPLACE FUNCTION ST_Distance(text, text) RETURNS float8 AS $$ SELECT ST_Distance($1::geometry, $2::geometry); $$ - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -- Only expands the bounding box, the actual geometry will remain unchanged, use with care. -- Availability: 1.5.0 CREATE OR REPLACE FUNCTION _ST_Expand(geography, float8) RETURNS geography AS 'MODULE_PATHNAME','geography_expand' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.5.0 CREATE OR REPLACE FUNCTION ST_DWithin(geography, geography, float8, boolean) RETURNS boolean AS 'SELECT $1 && _ST_Expand($2,$3) AND $2 && _ST_Expand($1,$3) AND _ST_DWithin($1, $2, $3, $4)' - LANGUAGE 'SQL' IMMUTABLE; + LANGUAGE 'sql' IMMUTABLE; -- Currently defaulting to spheroid calculations -- Availability: 1.5.0 CREATE OR REPLACE FUNCTION ST_DWithin(geography, geography, float8) RETURNS boolean AS 'SELECT $1 && _ST_Expand($2,$3) AND $2 && _ST_Expand($1,$3) AND _ST_DWithin($1, $2, $3, true)' - LANGUAGE 'SQL' IMMUTABLE; + LANGUAGE 'sql' IMMUTABLE; -- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography --- TODO Remove in 2.0 CREATE OR REPLACE FUNCTION ST_DWithin(text, text, float8) RETURNS boolean AS $$ SELECT ST_DWithin($1::geometry, $2::geometry, $3); $$ - LANGUAGE 'SQL' IMMUTABLE ; + LANGUAGE 'sql' IMMUTABLE; -- Availability: 1.5.0 -CREATE OR REPLACE FUNCTION ST_Area(geography, boolean) +CREATE OR REPLACE FUNCTION ST_Area(geog geography, use_spheroid boolean DEFAULT true) RETURNS float8 AS 'MODULE_PATHNAME','geography_area' - LANGUAGE 'C' IMMUTABLE STRICT + LANGUAGE 'c' IMMUTABLE STRICT COST 100; --- Currently defaulting to spheroid calculations --- Availability: 1.5.0 -CREATE OR REPLACE FUNCTION ST_Area(geography) - RETURNS float8 - AS 'SELECT ST_Area($1, true)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - -- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography --- TODO Remove in 2.0 CREATE OR REPLACE FUNCTION ST_Area(text) RETURNS float8 AS $$ SELECT ST_Area($1::geometry); $$ - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -- Availability: 1.5.0 -CREATE OR REPLACE FUNCTION ST_Length(geography, boolean) +CREATE OR REPLACE FUNCTION ST_Length(geog geography, use_spheroid boolean DEFAULT true) RETURNS float8 AS 'MODULE_PATHNAME','geography_length' - LANGUAGE 'C' IMMUTABLE STRICT + LANGUAGE 'c' IMMUTABLE STRICT COST 100; --- Availability: 1.5.0 -CREATE OR REPLACE FUNCTION ST_Length(geography) - RETURNS float8 - AS 'SELECT ST_Length($1, true)' - LANGUAGE 'SQL' IMMUTABLE; - -- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography --- TODO Remove in 2.0 CREATE OR REPLACE FUNCTION ST_Length(text) RETURNS float8 AS $$ SELECT ST_Length($1::geometry); $$ - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION ST_Project(geog geography, distance float8, azimuth float8) + RETURNS geography + AS 'MODULE_PATHNAME','geography_project' + LANGUAGE 'c' IMMUTABLE + COST 100; + +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION ST_Azimuth(geog1 geography, geog2 geography) + RETURNS float8 + AS 'MODULE_PATHNAME','geography_azimuth' + LANGUAGE 'c' IMMUTABLE STRICT + COST 100; + +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION ST_Perimeter(geog geography, use_spheroid boolean DEFAULT true) + RETURNS float8 + AS 'MODULE_PATHNAME','geography_perimeter' + LANGUAGE 'c' IMMUTABLE STRICT + COST 100; -- Availability: 1.5.0 CREATE OR REPLACE FUNCTION _ST_PointOutside(geography) RETURNS geography AS 'MODULE_PATHNAME','geography_point_outside' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Only implemented for polygon-over-point -- Availability: 1.5.0 CREATE OR REPLACE FUNCTION _ST_Covers(geography, geography) RETURNS boolean AS 'MODULE_PATHNAME','geography_covers' - LANGUAGE 'C' IMMUTABLE STRICT + LANGUAGE 'c' IMMUTABLE STRICT COST 100; -- Only implemented for polygon-over-point @@ -670,78 +605,112 @@ CREATE OR REPLACE FUNCTION ST_Covers(geography, geography) RETURNS boolean AS 'SELECT $1 && $2 AND _ST_Covers($1, $2)' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE; -- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography --- TODO Remove in 2.0 CREATE OR REPLACE FUNCTION ST_Covers(text, text) RETURNS boolean AS $$ SELECT ST_Covers($1::geometry, $2::geometry); $$ - LANGUAGE 'SQL' IMMUTABLE ; + LANGUAGE 'sql' IMMUTABLE ; -- Only implemented for polygon-over-point -- Availability: 1.5.0 CREATE OR REPLACE FUNCTION ST_CoveredBy(geography, geography) RETURNS boolean AS 'SELECT $1 && $2 AND _ST_Covers($2, $1)' - LANGUAGE 'SQL' IMMUTABLE ; + LANGUAGE 'sql' IMMUTABLE ; -- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography --- TODO Remove in 2.0 CREATE OR REPLACE FUNCTION ST_CoveredBy(text, text) RETURNS boolean AS $$ SELECT ST_CoveredBy($1::geometry, $2::geometry); $$ - LANGUAGE 'SQL' IMMUTABLE ; + LANGUAGE 'sql' IMMUTABLE ; -- Availability: 1.5.0 CREATE OR REPLACE FUNCTION ST_Intersects(geography, geography) RETURNS boolean AS 'SELECT $1 && $2 AND _ST_Distance($1, $2, 0.0, false) < 0.00001' - LANGUAGE 'SQL' IMMUTABLE; + LANGUAGE 'sql' IMMUTABLE ; -- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography --- TODO Remove in 2.0 CREATE OR REPLACE FUNCTION ST_Intersects(text, text) RETURNS boolean AS $$ SELECT ST_Intersects($1::geometry, $2::geometry); $$ - LANGUAGE 'SQL' IMMUTABLE ; + LANGUAGE 'sql' IMMUTABLE ; -- Availability: 1.5.0 CREATE OR REPLACE FUNCTION _ST_BestSRID(geography, geography) RETURNS integer AS 'MODULE_PATHNAME','geography_bestsrid' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.5.0 CREATE OR REPLACE FUNCTION _ST_BestSRID(geography) RETURNS integer AS 'SELECT _ST_BestSRID($1,$1)' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -- Availability: 1.5.0 CREATE OR REPLACE FUNCTION ST_Buffer(geography, float8) RETURNS geography AS 'SELECT geography(ST_Transform(ST_Buffer(ST_Transform(geometry($1), _ST_BestSRID($1)), $2), 4326))' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography --- TODO Remove in 2.0 CREATE OR REPLACE FUNCTION ST_Buffer(text, float8) RETURNS geometry AS $$ SELECT ST_Buffer($1::geometry, $2); $$ - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -- Availability: 1.5.0 CREATE OR REPLACE FUNCTION ST_Intersection(geography, geography) RETURNS geography AS 'SELECT geography(ST_Transform(ST_Intersection(ST_Transform(geometry($1), _ST_BestSRID($1, $2)), ST_Transform(geometry($2), _ST_BestSRID($1, $2))), 4326))' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography --- TODO Remove in 2.0 CREATE OR REPLACE FUNCTION ST_Intersection(text, text) RETURNS geometry AS $$ SELECT ST_Intersection($1::geometry, $2::geometry); $$ - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Availability: 1.5.0 +CREATE OR REPLACE FUNCTION ST_AsBinary(geography) + RETURNS bytea + AS 'MODULE_PATHNAME','LWGEOM_asBinary' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION ST_AsBinary(geography,text) + RETURNS bytea AS + $$ SELECT ST_AsBinary($1::geometry, $2); $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION ST_AsEWKT(geography) + RETURNS TEXT + AS 'MODULE_PATHNAME','LWGEOM_asEWKT' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Availability: 2.0.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography +CREATE OR REPLACE FUNCTION ST_AsEWKT(text) + RETURNS text AS + $$ SELECT ST_AsEWKT($1::geometry); $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION GeometryType(geography) + RETURNS text + AS 'MODULE_PATHNAME', 'LWGEOM_getTYPE' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION ST_Summary(geography) + RETURNS text + AS 'MODULE_PATHNAME', 'LWGEOM_summary' + LANGUAGE 'c' IMMUTABLE STRICT; + + +----------------------------------------------------------------------------- + --- ---------- ---------- ---------- ---------- ---------- ---------- ---------- diff -Nru postgis-1.5.3/postgis/geography_btree.c postgis-2.0.1/postgis/geography_btree.c --- postgis-1.5.3/postgis/geography_btree.c 2010-02-01 18:24:09.000000000 +0000 +++ postgis-2.0.1/postgis/geography_btree.c 2012-02-27 22:08:12.000000000 +0000 @@ -1,5 +1,5 @@ /********************************************************************** - * $Id: geography_btree.c 5184 2010-02-01 18:24:09Z pramsey $ + * $Id: geography_btree.c 9324 2012-02-27 22:08:12Z pramsey $ * * PostGIS - Spatial Types for PostgreSQL * Copyright 2009 Paul Ramsey @@ -14,8 +14,10 @@ #include "../postgis_config.h" -#include "libgeom.h" /* For standard geometry types. */ +#include "liblwgeom.h" /* For standard geometry types. */ +#include "liblwgeom_internal.h" /* For FP comparators. */ #include "lwgeom_pg.h" /* For debugging macros. */ +#include "gserialized_gist.h" #include "geography.h" /* For utility functions. */ Datum geography_lt(PG_FUNCTION_ARGS); @@ -53,8 +55,8 @@ POINT3D p1, p2; /* Must be able to build box for each argument (ie, not empty geometry) */ - if ( ! geography_datum_gidx(PG_GETARG_DATUM(0), gbox1) || - ! geography_datum_gidx(PG_GETARG_DATUM(1), gbox2) ) + if ( ! gserialized_datum_get_gidx_p(PG_GETARG_DATUM(0), gbox1) || + ! gserialized_datum_get_gidx_p(PG_GETARG_DATUM(1), gbox2) ) { PG_RETURN_BOOL(FALSE); } @@ -83,8 +85,8 @@ POINT3D p1, p2; /* Must be able to build box for each argument (ie, not empty geometry) */ - if ( ! geography_datum_gidx(PG_GETARG_DATUM(0), gbox1) || - ! geography_datum_gidx(PG_GETARG_DATUM(1), gbox2) ) + if ( ! gserialized_datum_get_gidx_p(PG_GETARG_DATUM(0), gbox1) || + ! gserialized_datum_get_gidx_p(PG_GETARG_DATUM(1), gbox2) ) { PG_RETURN_BOOL(FALSE); } @@ -113,8 +115,8 @@ POINT3D p1, p2; /* Must be able to build box for each argument (ie, not empty geometry) */ - if ( ! geography_datum_gidx(PG_GETARG_DATUM(0), gbox1) || - ! geography_datum_gidx(PG_GETARG_DATUM(1), gbox2) ) + if ( ! gserialized_datum_get_gidx_p(PG_GETARG_DATUM(0), gbox1) || + ! gserialized_datum_get_gidx_p(PG_GETARG_DATUM(1), gbox2) ) { PG_RETURN_BOOL(FALSE); } @@ -143,8 +145,8 @@ POINT3D p1, p2; /* Must be able to build box for each argument (ie, not empty geometry) */ - if ( ! geography_datum_gidx(PG_GETARG_DATUM(0), gbox1) || - ! geography_datum_gidx(PG_GETARG_DATUM(1), gbox2) ) + if ( ! gserialized_datum_get_gidx_p(PG_GETARG_DATUM(0), gbox1) || + ! gserialized_datum_get_gidx_p(PG_GETARG_DATUM(1), gbox2) ) { PG_RETURN_BOOL(FALSE); } @@ -207,8 +209,8 @@ POINT3D p1, p2; /* Must be able to build box for each argument (ie, not empty geometry) */ - if ( ! geography_datum_gidx(PG_GETARG_DATUM(0), gbox1) || - ! geography_datum_gidx(PG_GETARG_DATUM(1), gbox2) ) + if ( ! gserialized_datum_get_gidx_p(PG_GETARG_DATUM(0), gbox1) || + ! gserialized_datum_get_gidx_p(PG_GETARG_DATUM(1), gbox2) ) { PG_RETURN_BOOL(FALSE); } @@ -238,8 +240,8 @@ POINT3D p1, p2; /* Must be able to build box for each argument (ie, not empty geometry) */ - if ( ! geography_datum_gidx(PG_GETARG_DATUM(0), gbox1) || - ! geography_datum_gidx(PG_GETARG_DATUM(1), gbox2) ) + if ( ! gserialized_datum_get_gidx_p(PG_GETARG_DATUM(0), gbox1) || + ! gserialized_datum_get_gidx_p(PG_GETARG_DATUM(1), gbox2) ) { PG_RETURN_BOOL(FALSE); } diff -Nru postgis-1.5.3/postgis/geography_estimate.c postgis-2.0.1/postgis/geography_estimate.c --- postgis-1.5.3/postgis/geography_estimate.c 2010-05-18 17:41:01.000000000 +0000 +++ postgis-2.0.1/postgis/geography_estimate.c 2012-02-27 22:08:12.000000000 +0000 @@ -19,7 +19,8 @@ #include "utils/lsyscache.h" #include "utils/syscache.h" -#include "libgeom.h" +#include "../postgis_config.h" +#include "liblwgeom.h" #include "lwgeom_pg.h" /* Prototypes */ @@ -301,9 +302,9 @@ * only the overlap fraction. */ - intersect_x = LW_MIN(box->xmax, geogstats->xmin + (x+1) * sizex / unitsx) - LW_MAX(box->xmin, geogstats->xmin + x * sizex / unitsx); - intersect_y = LW_MIN(box->ymax, geogstats->ymin + (y+1) * sizey / unitsy) - LW_MAX(box->ymin, geogstats->ymin + y * sizey / unitsy); - intersect_z = LW_MIN(box->zmax, geogstats->zmin + (z+1) * sizez / unitsz) - LW_MAX(box->zmin, geogstats->zmin + z * sizez / unitsz); + intersect_x = Min(box->xmax, geogstats->xmin + (x+1) * sizex / unitsx) - Max(box->xmin, geogstats->xmin + x * sizex / unitsx); + intersect_y = Min(box->ymax, geogstats->ymin + (y+1) * sizey / unitsy) - Max(box->ymin, geogstats->ymin + y * sizey / unitsy); + intersect_z = Min(box->zmax, geogstats->zmin + (z+1) * sizez / unitsz) - Max(box->zmin, geogstats->zmin + z * sizez / unitsz); switch ((int)geogstats->dims) @@ -404,7 +405,7 @@ return 0.0; } - gain = 1 / LW_MIN(overlapping_cells, avg_feat_cells); + gain = 1 / Min(overlapping_cells, avg_feat_cells); selectivity = value * gain; POSTGIS_DEBUGF(3, " SUM(ov_histo_cells)=%f", value); @@ -696,12 +697,12 @@ * Setup the search box - this is the intersection of the two column * extents. */ - search_box.xmin = LW_MAX(geogstats1->xmin, geogstats2->xmin); - search_box.ymin = LW_MAX(geogstats1->ymin, geogstats2->ymin); - search_box.zmin = LW_MAX(geogstats1->zmin, geogstats2->zmin); - search_box.xmax = LW_MIN(geogstats1->xmax, geogstats2->xmax); - search_box.ymax = LW_MIN(geogstats1->ymax, geogstats2->ymax); - search_box.zmax = LW_MIN(geogstats1->zmax, geogstats2->zmax); + search_box.xmin = Max(geogstats1->xmin, geogstats2->xmin); + search_box.ymin = Max(geogstats1->ymin, geogstats2->ymin); + search_box.zmin = Max(geogstats1->zmin, geogstats2->zmin); + search_box.xmax = Min(geogstats1->xmax, geogstats2->xmax); + search_box.ymax = Min(geogstats1->ymax, geogstats2->ymax); + search_box.zmax = Min(geogstats1->zmax, geogstats2->zmax); /* If the extents of the two columns don't intersect, return zero */ if (search_box.xmin > search_box.xmax || search_box.ymin > search_box.ymax || @@ -825,8 +826,6 @@ int i; POSTGIS_DEBUG(2, "compute_geography_stats called"); - POSTGIS_DEBUGF(3, " samplerows = %d", samplerows); - POSTGIS_DEBUGF(3, " totalrows = %f", totalrows); /* * We'll build an histogram having from 40 to 400 boxesPerSide @@ -904,12 +903,12 @@ } else { - sample_extent->xmax = LWGEOM_Maxf(sample_extent->xmax, gbox.xmax); - sample_extent->ymax = LWGEOM_Maxf(sample_extent->ymax, gbox.ymax); - sample_extent->zmax = LWGEOM_Maxf(sample_extent->zmax, gbox.zmax); - sample_extent->xmin = LWGEOM_Minf(sample_extent->xmin, gbox.xmin); - sample_extent->ymin = LWGEOM_Minf(sample_extent->ymin, gbox.ymin); - sample_extent->zmin = LWGEOM_Minf(sample_extent->zmin, gbox.zmin); + sample_extent->xmax = Max(sample_extent->xmax, gbox.xmax); + sample_extent->ymax = Max(sample_extent->ymax, gbox.ymax); + sample_extent->zmax = Max(sample_extent->zmax, gbox.zmax); + sample_extent->xmin = Min(sample_extent->xmin, gbox.xmin); + sample_extent->ymin = Min(sample_extent->ymin, gbox.ymin); + sample_extent->zmin = Min(sample_extent->zmin, gbox.zmin); } /** TODO: ask if we need geom or bvol size for stawidth */ @@ -989,12 +988,12 @@ POSTGIS_DEBUGF(3, " HIGy - avg:%f sd:%f", avgHIGy, sdHIGy); POSTGIS_DEBUGF(3, " HIGz - avg:%f sd:%f", avgHIGz, sdHIGz); - histobox.xmin = LW_MAX((avgLOWx - SDFACTOR * sdLOWx), sample_extent->xmin); - histobox.ymin = LW_MAX((avgLOWy - SDFACTOR * sdLOWy), sample_extent->ymin); - histobox.zmin = LW_MAX((avgLOWz - SDFACTOR * sdLOWz), sample_extent->zmin); - histobox.xmax = LW_MIN((avgHIGx + SDFACTOR * sdHIGx), sample_extent->xmax); - histobox.ymax = LW_MIN((avgHIGy + SDFACTOR * sdHIGy), sample_extent->ymax); - histobox.zmax = LW_MIN((avgHIGz + SDFACTOR * sdHIGz), sample_extent->zmax); + histobox.xmin = Max((avgLOWx - SDFACTOR * sdLOWx), sample_extent->xmin); + histobox.ymin = Max((avgLOWy - SDFACTOR * sdLOWy), sample_extent->ymin); + histobox.zmin = Max((avgLOWz - SDFACTOR * sdLOWz), sample_extent->zmin); + histobox.xmax = Min((avgHIGx + SDFACTOR * sdHIGx), sample_extent->xmax); + histobox.ymax = Min((avgHIGy + SDFACTOR * sdHIGy), sample_extent->ymax); + histobox.zmax = Min((avgHIGz + SDFACTOR * sdHIGz), sample_extent->zmax); POSTGIS_DEBUGF(3, " sd_extent: xmin, ymin, zmin: %f, %f, %f", histobox.xmin, histobox.ymin, histobox.zmin); @@ -1012,8 +1011,8 @@ box = (GBOX *)sampleboxes[i]; if ( box->xmin > histobox.xmax || box->xmax < histobox.xmin || - box->ymin > histobox.ymax || box->ymax < histobox.ymin || - box->zmin > histobox.zmax || box->zmax < histobox.zmin ) + box->ymin > histobox.ymax || box->ymax < histobox.ymin || + box->zmin > histobox.zmax || box->zmax < histobox.zmin) { POSTGIS_DEBUGF(4, " feat %d is an hard deviant, skipped", i); @@ -1181,8 +1180,8 @@ /* Sample data lies within 2D space: divide the total area by the total number of cells, and thus work out the edge size of the unit block */ edgelength = sqrt( - LW_ABS(histodims[0].max - histodims[0].min) * - LW_ABS(histodims[1].max - histodims[1].min) / (double)histocells + Abs(histodims[0].max - histodims[0].min) * + Abs(histodims[1].max - histodims[1].min) / (double)histocells ); /* The calculation is easy; the harder part is to work out which dimensions @@ -1190,44 +1189,44 @@ if (histodims[0].axis == 'X' && histodims[1].axis == 'Y') { /* X and Y */ - unitsx = LW_ABS(histodims[0].max - histodims[0].min) / edgelength; - unitsy = LW_ABS(histodims[1].max - histodims[1].min) / edgelength; + unitsx = Abs(histodims[0].max - histodims[0].min) / edgelength; + unitsy = Abs(histodims[1].max - histodims[1].min) / edgelength; unitsz = 1; } else if (histodims[0].axis == 'Y' && histodims[1].axis == 'X') { /* Y and X */ - unitsx = LW_ABS(histodims[1].max - histodims[1].min) / edgelength; - unitsy = LW_ABS(histodims[0].max - histodims[0].min) / edgelength; + unitsx = Abs(histodims[1].max - histodims[1].min) / edgelength; + unitsy = Abs(histodims[0].max - histodims[0].min) / edgelength; unitsz = 1; } else if (histodims[0].axis == 'X' && histodims[1].axis == 'Z') { /* X and Z */ - unitsx = LW_ABS(histodims[0].max - histodims[0].min) / edgelength; + unitsx = Abs(histodims[0].max - histodims[0].min) / edgelength; unitsy = 1; - unitsz = LW_ABS(histodims[1].max - histodims[1].min) / edgelength; + unitsz = Abs(histodims[1].max - histodims[1].min) / edgelength; } else if (histodims[0].axis == 'Z' && histodims[1].axis == 'X') { /* Z and X */ - unitsx = LW_ABS(histodims[0].max - histodims[0].min) / edgelength; + unitsx = Abs(histodims[0].max - histodims[0].min) / edgelength; unitsy = 1; - unitsz = LW_ABS(histodims[1].max - histodims[1].min) / edgelength; + unitsz = Abs(histodims[1].max - histodims[1].min) / edgelength; } else if (histodims[0].axis == 'Y' && histodims[1].axis == 'Z') { /* Y and Z */ unitsx = 1; - unitsy = LW_ABS(histodims[0].max - histodims[0].min) / edgelength; - unitsz = LW_ABS(histodims[1].max - histodims[1].min) / edgelength; + unitsy = Abs(histodims[0].max - histodims[0].min) / edgelength; + unitsz = Abs(histodims[1].max - histodims[1].min) / edgelength; } else if (histodims[0].axis == 'Z' && histodims[1].axis == 'Y') { /* Z and X */ unitsx = 1; - unitsy = LW_ABS(histodims[1].max - histodims[1].min) / edgelength; - unitsz = LW_ABS(histodims[0].max - histodims[0].min) / edgelength; + unitsy = Abs(histodims[1].max - histodims[1].min) / edgelength; + unitsz = Abs(histodims[0].max - histodims[0].min) / edgelength; } break; @@ -1236,15 +1235,15 @@ /* Sample data lies within 3D space: divide the total volume by the total number of cells, and thus work out the edge size of the unit block */ edgelength = pow( - LW_ABS(histodims[0].max - histodims[0].min) * - LW_ABS(histodims[1].max - histodims[1].min) * - LW_ABS(histodims[2].max - histodims[2].min) / (double)histocells, + Abs(histodims[0].max - histodims[0].min) * + Abs(histodims[1].max - histodims[1].min) * + Abs(histodims[2].max - histodims[2].min) / (double)histocells, (double)1/3); /* Units are simple in 3 dimensions */ - unitsx = LW_ABS(histodims[0].max - histodims[0].min) / edgelength; - unitsy = LW_ABS(histodims[1].max - histodims[1].min) / edgelength; - unitsz = LW_ABS(histodims[2].max - histodims[2].min) / edgelength; + unitsx = Abs(histodims[0].max - histodims[0].min) / edgelength; + unitsy = Abs(histodims[1].max - histodims[1].min) / edgelength; + unitsz = Abs(histodims[2].max - histodims[2].min) / edgelength; break; } diff -Nru postgis-1.5.3/postgis/geography_gist.c postgis-2.0.1/postgis/geography_gist.c --- postgis-1.5.3/postgis/geography_gist.c 2010-02-02 22:44:06.000000000 +0000 +++ postgis-2.0.1/postgis/geography_gist.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,1407 +0,0 @@ -/********************************************************************** - * $Id: geography_gist.c 5190 2010-02-02 22:44:06Z pramsey $ - * - * PostGIS - Spatial Types for PostgreSQL - * Copyright 2009 Paul Ramsey - * - * This is free software; you can redistribute and/or modify it under - * the terms of the GNU General Public Licence. See the COPYING file. - * - **********************************************************************/ - -/* -** R-Tree Bibliography -** -** [1] A. Guttman. R-tree: a dynamic index structure for spatial searching. -** Proceedings of the ACM SIGMOD Conference, pp 47-57, June 1984. -** [2] C.-H. Ang and T. C. Tan. New linear node splitting algorithm for -** R-Trees. Advances in Spatial Databases - 5th International Symposium, -** 1997 -** [3] N. Beckmann, H.-P. Kriegel, R. Schneider, B. Seeger. The R*tree: an -** efficient and robust access method for points and rectangles. -** Proceedings of the ACM SIGMOD Conference. June 1990. -*/ - -#include "postgres.h" -#include "access/gist.h" /* For GiST */ -#include "access/itup.h" -#include "access/skey.h" - -#include "../postgis_config.h" - -#include "libgeom.h" /* For standard geometry types. */ -#include "lwgeom_pg.h" /* For debugging macros. */ -#include "geography.h" /* For utility functions. */ - - - -/* -** When is a node split not so good? If more than 90% of the entries -** end up in one of the children. -*/ -#define LIMIT_RATIO 0.1 - -/* -** For debugging -*/ -#if POSTGIS_DEBUG_LEVEL > 0 -static int geog_counter_leaf = 0; -static int geog_counter_internal = 0; -#endif - -/* -** GiST prototypes -*/ -Datum geography_gist_consistent(PG_FUNCTION_ARGS); -Datum geography_gist_compress(PG_FUNCTION_ARGS); -Datum geography_gist_decompress(PG_FUNCTION_ARGS); -Datum geography_gist_penalty(PG_FUNCTION_ARGS); -Datum geography_gist_picksplit(PG_FUNCTION_ARGS); -Datum geography_gist_union(PG_FUNCTION_ARGS); -Datum geography_gist_same(PG_FUNCTION_ARGS); - -/* -** Index key type stub prototypes -*/ -Datum gidx_out(PG_FUNCTION_ARGS); -Datum gidx_in(PG_FUNCTION_ARGS); - -/* -** Operator prototypes -*/ -Datum geography_overlaps(PG_FUNCTION_ARGS); - - -/********************************************************************************* -** GIDX support functions. -** -** We put the GIDX support here rather than libgeom because it is a specialized -** type only used for indexing purposes. It also makes use of some PgSQL -** infrastructure like the VARSIZE() macros. -*/ - -/* -** Inline some of the most common and simplest utility functions. -*/ - -/* Returns number of dimensions for this GIDX */ -#define GIDX_NDIMS(gidx) ((VARSIZE((gidx)) - VARHDRSZ) / (2 * sizeof(float))) -/* Minimum accessor. */ -#define GIDX_GET_MIN(gidx, dimension) ((gidx)->c[2*(dimension)]) -/* Maximum accessor. */ -#define GIDX_GET_MAX(gidx, dimension) ((gidx)->c[2*(dimension)+1]) -/* Minimum setter. */ -#define GIDX_SET_MIN(gidx, dimension, value) ((gidx)->c[2*(dimension)] = (value)) -/* Maximum setter. */ -#define GIDX_SET_MAX(gidx, dimension, value) ((gidx)->c[2*(dimension)+1] = (value)) -/* Returns the size required to store a GIDX of requested dimension */ -#define GIDX_SIZE(dimensions) (sizeof(int32) + 2*(dimensions)*sizeof(float)) - - -/* Allocates a new GIDX on the heap of the requested dimensionality */ -GIDX* gidx_new(int ndims) -{ - size_t size = GIDX_SIZE(ndims); - GIDX *g = (GIDX*)palloc(size); - POSTGIS_DEBUGF(5,"created new gidx of %d dimensions, size %d", ndims, (int)size); - SET_VARSIZE(g, size); - return g; -} - -/* Generate human readable form for GIDX. */ -#if POSTGIS_DEBUG_LEVEL > 0 -static char* gidx_to_string(GIDX *a) -{ - char *str, *rv; - int i, ndims; - - if ( a == NULL ) - return pstrdup(""); - - str = (char*)palloc(128); - rv = str; - ndims = GIDX_NDIMS(a); - - str += sprintf(str, "GIDX("); - for ( i = 0; i < ndims; i++ ) - str += sprintf(str, " %.12g", GIDX_GET_MIN(a,i)); - str += sprintf(str, ","); - for ( i = 0; i < ndims; i++ ) - str += sprintf(str, " %.12g", GIDX_GET_MAX(a,i)); - str += sprintf(str, " )"); - - return rv; -} -#endif - -/* Allocate a new copy of GIDX */ -static GIDX* gidx_copy(GIDX *b) -{ - GIDX *c = (GIDX*)palloc(VARSIZE(b)); - POSTGIS_DEBUGF(5, "copied gidx (%p) to gidx (%p)", b, c); - memcpy((void*)c, (void*)b, VARSIZE(b)); - return c; -} - -/* Ensure all minimums are below maximums. */ -static inline void gidx_validate(GIDX *b) -{ - int i; - Assert(b); - POSTGIS_DEBUGF(5,"validating gidx (%s)", gidx_to_string(b)); - for ( i = 0; i < GIDX_NDIMS(b); i++ ) - { - if ( GIDX_GET_MIN(b,i) > GIDX_GET_MAX(b,i) ) - { - float tmp; - tmp = GIDX_GET_MIN(b,i); - GIDX_SET_MIN(b,i,GIDX_GET_MAX(b,i)); - GIDX_SET_MAX(b,i,tmp); - } - } - return; -} - -/* Enlarge b_union to contain b_new. If b_new contains more - dimensions than b_union, expand b_union to contain those dimensions. */ -static void gidx_merge(GIDX **b_union, GIDX *b_new) -{ - int i, dims_union, dims_new; - Assert(b_union); - Assert(*b_union); - Assert(b_new); - - dims_union = GIDX_NDIMS(*b_union); - dims_new = GIDX_NDIMS(b_new); - - POSTGIS_DEBUGF(4, "merging gidx (%s) into gidx (%s)", gidx_to_string(b_new), gidx_to_string(*b_union)); - - if ( dims_new > dims_union ) - { - POSTGIS_DEBUGF(5, "reallocating b_union from %d dims to %d dims", dims_union, dims_new); - *b_union = (GIDX*)repalloc(*b_union, GIDX_SIZE(dims_new)); - SET_VARSIZE(*b_union, VARSIZE(b_new)); - dims_union = dims_new; - } - - for ( i = 0; i < dims_new; i++ ) - { - /* Adjust minimums */ - GIDX_SET_MIN(*b_union, i, Min(GIDX_GET_MIN(*b_union,i),GIDX_GET_MIN(b_new,i))); - /* Adjust maximums */ - GIDX_SET_MAX(*b_union, i, Max(GIDX_GET_MAX(*b_union,i),GIDX_GET_MAX(b_new,i))); - } - - POSTGIS_DEBUGF(5, "merge complete (%s)", gidx_to_string(*b_union)); - return; -} - -/* Calculate the volume (in n-d units) of the GIDX */ -static float gidx_volume(GIDX *a) -{ - float result; - int i; - if ( a == NULL ) - { - /* elog(ERROR, "gidx_volume received a null argument"); */ - return 0.0; - } - result = GIDX_GET_MAX(a,0) - GIDX_GET_MIN(a,0); - for ( i = 1; i < GIDX_NDIMS(a); i++ ) - result *= (GIDX_GET_MAX(a,i) - GIDX_GET_MIN(a,i)); - POSTGIS_DEBUGF(5, "calculated volume of %s as %.12g", gidx_to_string(a), result); - return result; -} - -/* Ensure the first argument has the higher dimensionality. */ -static void gidx_dimensionality_check(GIDX **a, GIDX **b) -{ - if ( GIDX_NDIMS(*a) < GIDX_NDIMS(*b) ) - { - GIDX *tmp = *b; - *b = *a; - *a = tmp; - } -} - -/* Calculate the volume of the union of the boxes. Avoids creating an intermediate box. */ -static float gidx_union_volume(GIDX *a, GIDX *b) -{ - float result; - int i; - int ndims_a, ndims_b; - - POSTGIS_DEBUG(5,"entered function"); - - if ( a == NULL && b == NULL ) - { - elog(ERROR, "gidx_union_volume received two null arguments"); - return 0.0; - } - if ( a == NULL ) - return gidx_volume(b); - - if ( b == NULL ) - return gidx_volume(a); - - /* Ensure 'a' has the most dimensions. */ - gidx_dimensionality_check(&a, &b); - - ndims_a = GIDX_NDIMS(a); - ndims_b = GIDX_NDIMS(b); - - /* Initialize with maximal length of first dimension. */ - result = Max(GIDX_GET_MAX(a,0),GIDX_GET_MAX(b,0)) - Min(GIDX_GET_MIN(a,0),GIDX_GET_MIN(b,0)); - - /* Multiply by maximal length of remaining dimensions. */ - for ( i = 1; i < ndims_b; i++ ) - { - result *= (Max(GIDX_GET_MAX(a,i),GIDX_GET_MAX(b,i)) - Min(GIDX_GET_MIN(a,i),GIDX_GET_MIN(b,i))); - } - - /* Add in dimensions of higher dimensional box. */ - for ( i = ndims_b; i < ndims_a; i++ ) - { - result *= (GIDX_GET_MAX(a,i) - GIDX_GET_MIN(a,i)); - } - - POSTGIS_DEBUGF(5, "volume( %s union %s ) = %.12g", gidx_to_string(a), gidx_to_string(b), result); - - return result; -} - -/* Calculate the volume of the intersection of the boxes. */ -static float gidx_inter_volume(GIDX *a, GIDX *b) -{ - int i; - float result; - - POSTGIS_DEBUG(5,"entered function"); - - if ( a == NULL || b == NULL ) - { - elog(ERROR, "gidx_inter_volume received a null argument"); - return 0.0; - } - - /* Ensure 'a' has the most dimensions. */ - gidx_dimensionality_check(&a, &b); - - /* Initialize with minimal length of first dimension. */ - result = Min(GIDX_GET_MAX(a,0),GIDX_GET_MAX(b,0)) - Max(GIDX_GET_MIN(a,0),GIDX_GET_MIN(b,0)); - - /* If they are disjoint (max < min) then return zero. */ - if ( result < 0.0 ) return 0.0; - - /* Continue for remaining dimensions. */ - for ( i = 1; i < GIDX_NDIMS(b); i++ ) - { - float width = Min(GIDX_GET_MAX(a,i),GIDX_GET_MAX(b,i)) - Max(GIDX_GET_MIN(a,i),GIDX_GET_MIN(b,i)); - if ( width < 0.0 ) return 0.0; - /* Multiply by minimal length of remaining dimensions. */ - result *= width; - } - POSTGIS_DEBUGF(5, "volume( %s intersection %s ) = %.12g", gidx_to_string(a), gidx_to_string(b), result); - return result; -} - -/* Convert a double-based GBOX into a float-based GIDX, - ensuring the float box is larger than the double box */ -static int gidx_from_gbox_p(GBOX box, GIDX *a) -{ - int ndims; - - ndims = (FLAGS_GET_GEODETIC(box.flags) ? 3 : FLAGS_NDIMS(box.flags)); - SET_VARSIZE(a, VARHDRSZ + ndims * 2 * sizeof(float)); - - GIDX_SET_MIN(a,0,nextDown_f(box.xmin)); - GIDX_SET_MAX(a,0,nextUp_f(box.xmax)); - GIDX_SET_MIN(a,1,nextDown_f(box.ymin)); - GIDX_SET_MAX(a,1,nextUp_f(box.ymax)); - - /* Geodetic indexes are always 3d, geocentric x/y/z */ - if ( FLAGS_GET_GEODETIC(box.flags) ) - { - GIDX_SET_MIN(a,2,nextDown_f(box.zmin)); - GIDX_SET_MAX(a,2,nextUp_f(box.zmax)); - } - else - { - /* Cartesian with Z implies Z is third dimension */ - if ( FLAGS_GET_Z(box.flags) ) - { - GIDX_SET_MIN(a,2,nextDown_f(box.zmin)); - GIDX_SET_MAX(a,2,nextUp_f(box.zmax)); - if ( FLAGS_GET_M(box.flags) ) - { - GIDX_SET_MIN(a,3,nextDown_f(box.mmin)); - GIDX_SET_MAX(a,3,nextUp_f(box.mmax)); - } - } - /* Unless there's no Z, in which case M is third dimension */ - else if ( FLAGS_GET_M(box.flags) ) - { - GIDX_SET_MIN(a,2,nextDown_f(box.mmin)); - GIDX_SET_MAX(a,2,nextUp_f(box.mmax)); - } - } - - POSTGIS_DEBUGF(5, "converted %s to %s", gbox_to_string(&box), gidx_to_string(a)); - - return G_SUCCESS; -} - -GIDX* gidx_from_gbox(GBOX box) -{ - int ndims; - GIDX *a; - - ndims = (FLAGS_GET_GEODETIC(box.flags) ? 3 : FLAGS_NDIMS(box.flags)); - a = gidx_new(ndims); - gidx_from_gbox_p(box, a); - return a; -} - - -void gbox_from_gidx(GIDX *a, GBOX *gbox) -{ - gbox->xmin = (double)GIDX_GET_MIN(a,0); - gbox->ymin = (double)GIDX_GET_MIN(a,1); - gbox->zmin = (double)GIDX_GET_MIN(a,2); - gbox->xmax = (double)GIDX_GET_MAX(a,0); - gbox->ymax = (double)GIDX_GET_MAX(a,1); - gbox->zmax = (double)GIDX_GET_MAX(a,2); -} - -/* -** Make a copy of a GSERIALIZED, with a new bounding box value embedded. -*/ -GSERIALIZED* gidx_insert_into_gserialized(GSERIALIZED *g, GIDX *gidx) -{ - int g_ndims = (FLAGS_GET_GEODETIC(g->flags) ? 3 : FLAGS_NDIMS(g->flags)); - int box_ndims = GIDX_NDIMS(gidx); - GSERIALIZED *g_out = NULL; - size_t box_size = 2 * g_ndims * sizeof(float); - - /* The dimensionality of the inputs has to match or we are SOL. */ - if ( g_ndims != box_ndims ) - { - return NULL; - } - - /* Serialized already has room for a box. We just need to copy it and - write the new values into place. */ - if ( FLAGS_GET_BBOX(g->flags) ) - { - g_out = palloc(VARSIZE(g)); - memcpy(g_out, g, VARSIZE(g)); - } - /* Serialized has no box. We need to allocate enough space for the old - data plus the box, and leave a gap in the memory segment to write - the new values into. - */ - else - { - size_t varsize_new = VARSIZE(g) + box_size; - uchar *ptr; - g_out = palloc(varsize_new); - /* Copy the head of g into place */ - memcpy(g_out, g, 8); - /* Copy the body of g into place after leaving space for the box */ - ptr = g_out->data; - ptr += box_size; - memcpy(ptr, g->data, VARSIZE(g) - 8); - FLAGS_SET_BBOX(g_out->flags, 1); - SET_VARSIZE(g_out, varsize_new); - } - - /* Now write the gidx values into the memory segement */ - memcpy(g_out->data, gidx->c, box_size); - - return g_out; -} - - -/* -** Overlapping GIDX box test. -** -** Box(A) Overlap Box(B) IFF (pt(a)LL < pt(B)UR) && (pt(b)LL < pt(a)UR) -*/ -static bool gidx_overlaps(GIDX *a, GIDX *b) -{ - int i; - int ndims_b; - POSTGIS_DEBUG(5, "entered function"); - if ( (a == NULL) || (b == NULL) ) return FALSE; - - /* Ensure 'a' has the most dimensions. */ - gidx_dimensionality_check(&a, &b); - - ndims_b = GIDX_NDIMS(b); - - /* compare within the dimensions of (b) */ - for ( i = 0; i < ndims_b; i++ ) - { - if ( GIDX_GET_MIN(a,i) > GIDX_GET_MAX(b,i) ) - return FALSE; - if ( GIDX_GET_MIN(b,i) > GIDX_GET_MAX(a,i) ) - return FALSE; - } - - /* compare to zero those dimensions in (a) absent in (b) */ - for ( i = ndims_b; i < GIDX_NDIMS(a); i++ ) - { - if ( GIDX_GET_MIN(a,i) > 0.0 ) - return FALSE; - if ( GIDX_GET_MAX(a,i) < 0.0 ) - return FALSE; - } - return TRUE; -} - -/* -** Containment GIDX test. -** -** Box(A) CONTAINS Box(B) IFF (pt(A)LL < pt(B)LL) && (pt(A)UR > pt(B)UR) -*/ -static bool gidx_contains(GIDX *a, GIDX *b) -{ - int i, dims_a, dims_b; - - POSTGIS_DEBUG(5, "entered function"); - - if ( (a == NULL) || (b == NULL) ) return FALSE; - - dims_a = GIDX_NDIMS(a); - dims_b = GIDX_NDIMS(b); - - if ( dims_a < dims_b ) - { - /* - ** If (b) is of higher dimensionality than (a) it can only be contained - ** if those higher dimensions are zeroes. - */ - for (i = dims_a; i < dims_b; i++) - { - if ( GIDX_GET_MIN(b,i) != 0 ) - return FALSE; - if ( GIDX_GET_MAX(b,i) != 0 ) - return FALSE; - } - } - - /* Excess dimensions of (a), don't matter, it just has to contain (b) in (b)'s dimensions */ - for (i = 0; i < Min(dims_a, dims_b); i++) - { - if ( GIDX_GET_MIN(a,i) > GIDX_GET_MIN(b,i) ) - return FALSE; - if ( GIDX_GET_MAX(a,i) < GIDX_GET_MAX(b,i) ) - return FALSE; - } - - return TRUE; -} -/* -** Equality GIDX test. -** -** Box(A) EQUALS Box(B) IFF (pt(A)LL == pt(B)LL) && (pt(A)UR == pt(B)UR) -*/ -static bool gidx_equals(GIDX *a, GIDX *b) -{ - int i; - - POSTGIS_DEBUG(5, "entered function"); - - if ( (a == NULL) && (b == NULL) ) return TRUE; - if ( (a == NULL) || (b == NULL) ) return FALSE; - - /* Ensure 'a' has the most dimensions. */ - gidx_dimensionality_check(&a, &b); - - /* For all shared dimensions min(a) == min(b), max(a) == max(b) */ - for (i = 0; i < GIDX_NDIMS(b); i++) - { - if ( GIDX_GET_MIN(a,i) != GIDX_GET_MIN(b,i) ) - return FALSE; - if ( GIDX_GET_MAX(a,i) != GIDX_GET_MAX(b,i) ) - return FALSE; - } - /* For all unshared dimensions min(a) == 0.0, max(a) == 0.0 */ - for (i = GIDX_NDIMS(b); i < GIDX_NDIMS(a); i++) - { - if ( GIDX_GET_MIN(a,i) != 0.0 ) - return FALSE; - if ( GIDX_GET_MAX(a,i) != 0.0 ) - return FALSE; - } - return TRUE; -} - -/* -** Peak into a geography (gserialized) datum to find the bounding box. If the -** box is there, copy it out and return it. If not, calculate the box from the -** full geography and return the box based on that. If no box is available, -** return G_FAILURE, otherwise G_SUCCESS. -*/ -int geography_datum_gidx(Datum geography_datum, GIDX *gidx) -{ - GSERIALIZED *gpart; - int result = G_SUCCESS; - - POSTGIS_DEBUG(4, "entered function"); - - /* - ** The most info we need is the 8 bytes of serialized header plus the 24 bytes - ** of floats necessary to hold the 6 floats of the geocentric index - ** bounding box, so 32 bytes. - */ - gpart = (GSERIALIZED*)PG_DETOAST_DATUM_SLICE(geography_datum, 0, 32); - - POSTGIS_DEBUGF(4, "got flags %d", gpart->flags); - - if ( FLAGS_GET_BBOX(gpart->flags) && FLAGS_GET_GEODETIC(gpart->flags) ) - { - const size_t size = 2 * 3 * sizeof(float); - POSTGIS_DEBUG(4, "copying box out of serialization"); - memcpy(gidx->c, gpart->data, size); - SET_VARSIZE(gidx, VARHDRSZ + size); - } - else - { - GSERIALIZED *g = (GSERIALIZED*)PG_DETOAST_DATUM(geography_datum); - GBOX gbox; - POSTGIS_DEBUG(4, "calculating new box from scratch"); - if ( gserialized_calculate_gbox_geocentric_p(g, &gbox) == G_FAILURE ) - { - POSTGIS_DEBUG(4, "calculated null bbox, returning null"); - return G_FAILURE; - } - result = gidx_from_gbox_p(gbox, gidx); - } - if ( result == G_SUCCESS ) - { - POSTGIS_DEBUGF(4, "got gidx %s", gidx_to_string(gidx)); - } - - return result; -} - -/* -** Peak into a geography to find the bounding box. If the -** box is there, copy it out and return it. If not, calculate the box from the -** full geography and return the box based on that. If no box is available, -** return G_FAILURE, otherwise G_SUCCESS. -*/ -int geography_gidx(GSERIALIZED *g, GIDX *gidx) -{ - int result = G_SUCCESS; - - POSTGIS_DEBUG(4, "entered function"); - - POSTGIS_DEBUGF(4, "got flags %d", g->flags); - - if ( FLAGS_GET_BBOX(g->flags) && FLAGS_GET_GEODETIC(g->flags) ) - { - const size_t size = 2 * 3 * sizeof(float); - POSTGIS_DEBUG(4, "copying box out of serialization"); - memcpy(gidx->c, g->data, size); - SET_VARSIZE(gidx, VARHDRSZ + size); - } - else - { - GBOX gbox; - POSTGIS_DEBUG(4, "calculating new box from scratch"); - if ( gserialized_calculate_gbox_geocentric_p(g, &gbox) == G_FAILURE ) - { - POSTGIS_DEBUG(4, "calculated null bbox, returning null"); - return G_FAILURE; - } - result = gidx_from_gbox_p(gbox, gidx); - } - if ( result == G_SUCCESS ) - { - POSTGIS_DEBUGF(4, "got gidx %s", gidx_to_string(gidx)); - } - - return result; -} - -/*********************************************************************** -* GiST Support Functions -*/ - -/* -** GiST support function. Based on two geographies return true if -** they overlap and false otherwise. -*/ -PG_FUNCTION_INFO_V1(geography_overlaps); -Datum geography_overlaps(PG_FUNCTION_ARGS) -{ - /* Put aside some stack memory and use it for GIDX pointers. */ - char gboxmem1[GIDX_MAX_SIZE]; - char gboxmem2[GIDX_MAX_SIZE]; - GIDX *gbox1 = (GIDX*)gboxmem1; - GIDX *gbox2 = (GIDX*)gboxmem2; - - /* Must be able to build box for each arguement (ie, not empty geometry) - and overlap boxes to return true. */ - if ( geography_datum_gidx(PG_GETARG_DATUM(0), gbox1) && - geography_datum_gidx(PG_GETARG_DATUM(1), gbox2) && - gidx_overlaps(gbox1, gbox2) ) - { - PG_RETURN_BOOL(TRUE); - } - - PG_RETURN_BOOL(FALSE); -} - -/* -** GiST support function. Given a geography, return a "compressed" -** version. In this case, we convert the geography into a geocentric -** bounding box. If the geography already has the box embedded in it -** we pull that out and hand it back. -*/ -PG_FUNCTION_INFO_V1(geography_gist_compress); -Datum geography_gist_compress(PG_FUNCTION_ARGS) -{ - GISTENTRY *entry_in = (GISTENTRY*)PG_GETARG_POINTER(0); - GISTENTRY *entry_out = NULL; - char gidxmem[GIDX_MAX_SIZE]; - GIDX *bbox_out = (GIDX*)gidxmem; - int result = G_SUCCESS; - - int i; - - POSTGIS_DEBUG(4, "[GIST] 'compress' function called"); - - /* - ** Not a leaf key? There's nothing to do. - ** Return the input unchanged. - */ - if ( ! entry_in->leafkey ) - { - POSTGIS_DEBUG(4, "[GIST] non-leafkey entry, returning input unaltered"); - PG_RETURN_POINTER(entry_in); - } - - POSTGIS_DEBUG(4, "[GIST] processing leafkey input"); - entry_out = palloc(sizeof(GISTENTRY)); - - /* - ** Null key? Make a copy of the input entry and - ** return. - */ - if ( DatumGetPointer(entry_in->key) == NULL ) - { - POSTGIS_DEBUG(4, "[GIST] leafkey is null"); - gistentryinit(*entry_out, (Datum) 0, entry_in->rel, - entry_in->page, entry_in->offset, FALSE); - POSTGIS_DEBUG(4, "[GIST] returning copy of input"); - PG_RETURN_POINTER(entry_out); - } - - /* Extract our index key from the GiST entry. */ - result = geography_datum_gidx(entry_in->key, bbox_out); - - /* Is the bounding box valid (non-empty, non-infinite)? If not, return input uncompressed. */ - if ( result == G_FAILURE ) - { - POSTGIS_DEBUG(4, "[GIST] empty geometry!"); - PG_RETURN_POINTER(entry_in); - } - - POSTGIS_DEBUGF(4, "[GIST] got entry_in->key: %s", gidx_to_string(bbox_out)); - - /* Check all the dimensions for finite values */ - for ( i = 0; i < GIDX_NDIMS(bbox_out); i++ ) - { - if ( ! finite(GIDX_GET_MAX(bbox_out, i)) || ! finite(GIDX_GET_MIN(bbox_out, i)) ) - { - POSTGIS_DEBUG(4, "[GIST] infinite geometry!"); - PG_RETURN_POINTER(entry_in); - } - } - - /* Enure bounding box has minimums below maximums. */ - gidx_validate(bbox_out); - - /* Prepare GISTENTRY for return. */ - gistentryinit(*entry_out, PointerGetDatum(gidx_copy(bbox_out)), - entry_in->rel, entry_in->page, entry_in->offset, FALSE); - - /* Return GISTENTRY. */ - POSTGIS_DEBUG(4, "[GIST] 'compress' function complete"); - PG_RETURN_POINTER(entry_out); -} - - -/* -** GiST support function. -** Decompress an entry. Unused for geography, so we return. -*/ -PG_FUNCTION_INFO_V1(geography_gist_decompress); -Datum geography_gist_decompress(PG_FUNCTION_ARGS) -{ - POSTGIS_DEBUG(5, "[GIST] 'decompress' function called"); - /* We don't decompress. Just return the input. */ - PG_RETURN_POINTER(PG_GETARG_POINTER(0)); -} - -/* -** GiST support function. Called from geography_gist_consistent below. -*/ -static inline bool geography_gist_consistent_leaf(GIDX *key, GIDX *query, StrategyNumber strategy) -{ - bool retval; - - POSTGIS_DEBUGF(4, "[GIST] leaf consistent, strategy [%d], count[%i], bounds[%.12g %.12g %.12g, %.12g %.12g %.12g]", - strategy, geog_counter_leaf++, - GIDX_GET_MIN(query, 0), GIDX_GET_MIN(query, 1), GIDX_GET_MIN(query, 2), - GIDX_GET_MAX(query, 0), GIDX_GET_MAX(query, 1), GIDX_GET_MAX(query, 2) ); - - switch (strategy) - { - case RTOverlapStrategyNumber: - retval = (bool) gidx_overlaps(key, query); - break; - case RTSameStrategyNumber: - retval = (bool) gidx_equals(key, query); - break; - case RTContainsStrategyNumber: - case RTOldContainsStrategyNumber: - retval = (bool) gidx_contains(key, query); - break; - case RTContainedByStrategyNumber: - case RTOldContainedByStrategyNumber: - retval = (bool) gidx_contains(query, key); - break; - default: - retval = FALSE; - } - return (retval); -} - -/* -** GiST support function. Called from geography_gist_consistent below. -*/ -static inline bool geography_gist_consistent_internal(GIDX *key, GIDX *query, StrategyNumber strategy) -{ - bool retval; - - POSTGIS_DEBUGF(4, "[GIST] internal consistent, strategy [%d], count[%i], bounds[%.12g %.12g %.12g, %.12g %.12g %.12g]", - strategy, geog_counter_internal++, - GIDX_GET_MIN(query, 0), GIDX_GET_MIN(query, 1), GIDX_GET_MIN(query, 2), - GIDX_GET_MAX(query, 0), GIDX_GET_MAX(query, 1), GIDX_GET_MAX(query, 2) ); - - switch (strategy) - { - case RTOverlapStrategyNumber: - retval = (bool) gidx_overlaps(key, query); - break; - case RTSameStrategyNumber: - case RTContainsStrategyNumber: - case RTOldContainsStrategyNumber: - retval = (bool) gidx_contains(key, query); - break; - case RTContainedByStrategyNumber: - case RTOldContainedByStrategyNumber: - retval = (bool) gidx_overlaps(key, query); - break; - default: - retval = FALSE; - } - return (retval); -} - -/* -** GiST support function. Take in a query and an entry and see what the -** relationship is, based on the query strategy. -*/ -PG_FUNCTION_INFO_V1(geography_gist_consistent); -Datum geography_gist_consistent(PG_FUNCTION_ARGS) -{ - GISTENTRY *entry = (GISTENTRY*) PG_GETARG_POINTER(0); - StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2); - bool result; - char gidxmem[GIDX_MAX_SIZE]; - GIDX *query_gbox_index = (GIDX*)gidxmem; - -#if POSTGIS_PGSQL_VERSION >= 84 - /* PostgreSQL 8.4 and later require the RECHECK flag to be set here, - rather than being supplied as part of the operator class definition */ - bool *recheck = (bool *) PG_GETARG_POINTER(4); - - /* We set recheck to false to avoid repeatedly pulling every "possibly matched" geometry - out during index scans. For cases when the geometries are large, rechecking - can make things twice as slow. */ - *recheck = false; -#endif - - POSTGIS_DEBUG(4, "[GIST] 'consistent' function called"); - - /* Quick sanity check on query argument. */ - if ( DatumGetPointer(PG_GETARG_DATUM(1)) == NULL ) - { - POSTGIS_DEBUG(4, "[GIST] null query pointer (!?!), returning false"); - PG_RETURN_BOOL(FALSE); /* NULL query! This is screwy! */ - } - - /* Quick sanity check on entry key. */ - if ( DatumGetPointer(entry->key) == NULL ) - { - POSTGIS_DEBUG(4, "[GIST] null index entry, returning false"); - PG_RETURN_BOOL(FALSE); /* NULL entry! */ - } - - /* Null box should never make this far. */ - if ( geography_datum_gidx(PG_GETARG_DATUM(1), query_gbox_index) == G_FAILURE ) - { - POSTGIS_DEBUG(4, "[GIST] null query_gbox_index!"); - PG_RETURN_BOOL(FALSE); - } - - /* Treat leaf node tests different from internal nodes */ - if (GIST_LEAF(entry)) - { - result = geography_gist_consistent_leaf( - (GIDX*)DatumGetPointer(entry->key), - query_gbox_index, strategy); - } - else - { - result = geography_gist_consistent_internal( - (GIDX*)DatumGetPointer(entry->key), - query_gbox_index, strategy); - } - - PG_RETURN_BOOL(result); -} - - -/* -** GiST support function. Calculate the "penalty" cost of adding this entry into an existing entry. -** Calculate the change in volume of the old entry once the new entry is added. -** TODO: Re-evaluate this in light of R*Tree penalty approaches. -*/ -PG_FUNCTION_INFO_V1(geography_gist_penalty); -Datum geography_gist_penalty(PG_FUNCTION_ARGS) -{ - GISTENTRY *origentry = (GISTENTRY*) PG_GETARG_POINTER(0); - GISTENTRY *newentry = (GISTENTRY*) PG_GETARG_POINTER(1); - float *result = (float*) PG_GETARG_POINTER(2); - GIDX *gbox_index_orig, *gbox_index_new; - float size_union, size_orig; - - POSTGIS_DEBUG(4, "[GIST] 'penalty' function called"); - - gbox_index_orig = (GIDX*)DatumGetPointer(origentry->key); - gbox_index_new = (GIDX*)DatumGetPointer(newentry->key); - - /* Drop out if we're dealing with null inputs. Shouldn't happen. */ - if ( (gbox_index_orig == NULL) && (gbox_index_new == NULL) ) - { - POSTGIS_DEBUG(4, "[GIST] both inputs NULL! returning penalty of zero"); - *result = 0.0; - PG_RETURN_FLOAT8(*result); - } - - /* Calculate the size difference of the boxes (volume difference in this case). */ - size_union = gidx_union_volume(gbox_index_orig, gbox_index_new); - size_orig = gidx_volume(gbox_index_orig); - *result = size_union - size_orig; - - /* All things being equal, we prefer to expand small boxes rather than large boxes. - NOTE: This code seemed to be causing badly balanced trees to be built - and therefore has been commented out. Not sure why it didn't work, - but it didn't. - if( FP_IS_ZERO(*result) ) - if( FP_IS_ZERO(size_orig) ) - *result = 0.0; - else - *result = 1.0 - (1.0/(1.0 + size_orig)); - else - *result += 1.0; - */ - - POSTGIS_DEBUGF(4, "[GIST] union size (%.12f), original size (%.12f), penalty (%.12f)", size_union, size_orig, *result); - - PG_RETURN_POINTER(result); -} - -/* -** GiST support function. Merge all the boxes in a page into one master box. -*/ -PG_FUNCTION_INFO_V1(geography_gist_union); -Datum geography_gist_union(PG_FUNCTION_ARGS) -{ - GistEntryVector *entryvec = (GistEntryVector *) PG_GETARG_POINTER(0); - int *sizep = (int *) PG_GETARG_POINTER(1); /* Size of the return value */ - int numranges, i; - GIDX *box_cur, *box_union; - - POSTGIS_DEBUG(4, "[GIST] 'union' function called"); - - numranges = entryvec->n; - - box_cur = (GIDX*) DatumGetPointer(entryvec->vector[0].key); - - box_union = gidx_copy(box_cur); - - for ( i = 1; i < numranges; i++ ) - { - box_cur = (GIDX*) DatumGetPointer(entryvec->vector[i].key); - gidx_merge(&box_union, box_cur); - } - - *sizep = VARSIZE(box_union); - - POSTGIS_DEBUGF(4, "[GIST] union called, numranges(%i), pageunion %s", numranges, gidx_to_string(box_union)); - - PG_RETURN_POINTER(box_union); - -} - -/* -** GiST support function. Test equality of keys. -*/ -PG_FUNCTION_INFO_V1(geography_gist_same); -Datum geography_gist_same(PG_FUNCTION_ARGS) -{ - GIDX *b1 = (GIDX*)PG_GETARG_POINTER(0); - GIDX *b2 = (GIDX*)PG_GETARG_POINTER(1); - bool *result = (bool*)PG_GETARG_POINTER(2); - - POSTGIS_DEBUG(4, "[GIST] 'same' function called"); - - *result = gidx_equals(b1, b2); - - PG_RETURN_POINTER(result); -} - - -/* -** Utility function to add entries to the axis partition lists in the -** picksplit function. -*/ -static void geography_gist_picksplit_addlist(OffsetNumber *list, GIDX **box_union, GIDX *box_current, int *pos, int num) -{ - if ( *pos ) - gidx_merge(box_union, box_current); - else - memcpy((void*)(*box_union), (void*)box_current, VARSIZE(box_current)); - list[*pos] = num; - (*pos)++; -} - -/* -** Utility function check whether the number of entries two halves of the -** space constitute a "bad ratio" (poor balance). -*/ -static int geography_gist_picksplit_badratio(int x, int y) -{ - POSTGIS_DEBUGF(4, "[GIST] checking split ratio (%d, %d)", x, y); - if ( (y == 0) || (((float)x / (float)y) < LIMIT_RATIO) || - (x == 0) || (((float)y / (float)x) < LIMIT_RATIO) ) - return TRUE; - - return FALSE; -} - -static bool geography_gist_picksplit_badratios(int *pos, int dims) -{ - int i; - for ( i = 0; i < dims; i++ ) - { - if ( geography_gist_picksplit_badratio(pos[2*i],pos[2*i+1]) == FALSE ) - return FALSE; - } - return TRUE; -} - - -/* -** Where the picksplit algorithm cannot find any basis for splitting one way -** or another, we simply split the overflowing node in half. -*/ -static void geography_gist_picksplit_fallback(GistEntryVector *entryvec, GIST_SPLITVEC *v) -{ - OffsetNumber i, maxoff; - GIDX *unionL = NULL; - GIDX *unionR = NULL; - int nbytes; - - POSTGIS_DEBUG(4, "[GIST] in fallback picksplit function"); - - maxoff = entryvec->n - 1; - - nbytes = (maxoff + 2) * sizeof(OffsetNumber); - v->spl_left = (OffsetNumber*) palloc(nbytes); - v->spl_right = (OffsetNumber*) palloc(nbytes); - v->spl_nleft = v->spl_nright = 0; - - for (i = FirstOffsetNumber; i <= maxoff; i = OffsetNumberNext(i)) - { - GIDX *cur = (GIDX*)DatumGetPointer(entryvec->vector[i].key); - - if (i <= (maxoff - FirstOffsetNumber + 1) / 2) - { - v->spl_left[v->spl_nleft] = i; - if (unionL == NULL) - { - unionL = gidx_copy(cur); - } - else - { - gidx_merge(&unionL, cur); - } - v->spl_nleft++; - } - else - { - v->spl_right[v->spl_nright] = i; - if (unionR == NULL) - { - unionR = gidx_copy(cur); - } - else - { - gidx_merge(&unionR, cur); - } - v->spl_nright++; - } - } - - if (v->spl_ldatum_exists) - gidx_merge(&unionL, (GIDX*)DatumGetPointer(v->spl_ldatum)); - - v->spl_ldatum = PointerGetDatum(unionL); - - if (v->spl_rdatum_exists) - gidx_merge(&unionR, (GIDX*)DatumGetPointer(v->spl_rdatum)); - - v->spl_rdatum = PointerGetDatum(unionR); - v->spl_ldatum_exists = v->spl_rdatum_exists = false; -} - - - -static void geography_gist_picksplit_constructsplit(GIST_SPLITVEC *v, OffsetNumber *list1, int nlist1, GIDX **union1, OffsetNumber *list2, int nlist2, GIDX **union2) -{ - bool firstToLeft = true; - - POSTGIS_DEBUG(4, "[GIST] picksplit in constructsplit function"); - - if (v->spl_ldatum_exists || v->spl_rdatum_exists) - { - if (v->spl_ldatum_exists && v->spl_rdatum_exists) - { - GIDX *LRl = gidx_copy(*union1); - GIDX *LRr = gidx_copy(*union2); - GIDX *RLl = gidx_copy(*union2); - GIDX *RLr = gidx_copy(*union1); - double sizeLR, sizeRL; - - gidx_merge(&LRl, (GIDX*)DatumGetPointer(v->spl_ldatum)); - gidx_merge(&LRr, (GIDX*)DatumGetPointer(v->spl_rdatum)); - gidx_merge(&RLl, (GIDX*)DatumGetPointer(v->spl_ldatum)); - gidx_merge(&RLr, (GIDX*)DatumGetPointer(v->spl_rdatum)); - - sizeLR = gidx_inter_volume(LRl,LRr); - sizeRL = gidx_inter_volume(RLl,RLr); - - POSTGIS_DEBUGF(4, "[GIST] sizeLR / sizeRL == %.12g / %.12g", sizeLR, sizeRL); - - if (sizeLR > sizeRL) - firstToLeft = false; - - } - else - { - float p1, p2; - GISTENTRY oldUnion, addon; - - gistentryinit(oldUnion, (v->spl_ldatum_exists) ? v->spl_ldatum : v->spl_rdatum, - NULL, NULL, InvalidOffsetNumber, FALSE); - - gistentryinit(addon, PointerGetDatum(*union1), NULL, NULL, InvalidOffsetNumber, FALSE); - DirectFunctionCall3(geography_gist_penalty, PointerGetDatum(&oldUnion), PointerGetDatum(&addon), PointerGetDatum(&p1)); - gistentryinit(addon, PointerGetDatum(*union2), NULL, NULL, InvalidOffsetNumber, FALSE); - DirectFunctionCall3(geography_gist_penalty, PointerGetDatum(&oldUnion), PointerGetDatum(&addon), PointerGetDatum(&p2)); - - POSTGIS_DEBUGF(4, "[GIST] p1 / p2 == %.12g / %.12g", p1, p2); - - if ((v->spl_ldatum_exists && p1 > p2) || (v->spl_rdatum_exists && p1 < p2)) - firstToLeft = false; - } - } - - POSTGIS_DEBUGF(4, "[GIST] firstToLeft == %d", firstToLeft); - - if (firstToLeft) - { - v->spl_left = list1; - v->spl_right = list2; - v->spl_nleft = nlist1; - v->spl_nright = nlist2; - if (v->spl_ldatum_exists) - gidx_merge(union1, (GIDX*)DatumGetPointer(v->spl_ldatum)); - v->spl_ldatum = PointerGetDatum(*union1); - if (v->spl_rdatum_exists) - gidx_merge(union2, (GIDX*)DatumGetPointer(v->spl_rdatum)); - v->spl_rdatum = PointerGetDatum(*union2); - } - else - { - v->spl_left = list2; - v->spl_right = list1; - v->spl_nleft = nlist2; - v->spl_nright = nlist1; - if (v->spl_ldatum_exists) - gidx_merge(union2, (GIDX*)DatumGetPointer(v->spl_ldatum)); - v->spl_ldatum = PointerGetDatum(*union2); - if (v->spl_rdatum_exists) - gidx_merge(union1, (GIDX*)DatumGetPointer(v->spl_rdatum)); - v->spl_rdatum = PointerGetDatum(*union1); - } - - v->spl_ldatum_exists = v->spl_rdatum_exists = false; -} - - -#define BELOW(d) (2*(d)) -#define ABOVE(d) ((2*(d))+1) - -/* -** GiST support function. Split an overflowing node into two new nodes. -** Uses linear algorithm from Ang & Tan [2], dividing node extent into -** four quadrants, and splitting along the axis that most evenly distributes -** entries between the new nodes. -** TODO: Re-evaluate this in light of R*Tree picksplit approaches. -*/ -PG_FUNCTION_INFO_V1(geography_gist_picksplit); -Datum geography_gist_picksplit(PG_FUNCTION_ARGS) -{ - - GistEntryVector *entryvec = (GistEntryVector*) PG_GETARG_POINTER(0); - - GIST_SPLITVEC *v = (GIST_SPLITVEC*) PG_GETARG_POINTER(1); - OffsetNumber i; - /* One union box for each half of the space. */ - GIDX **box_union; - /* One offset number list for each half of the space. */ - OffsetNumber **list; - /* One position index for each half of the space. */ - int *pos; - GIDX *box_pageunion; - GIDX *box_current; - int direction = -1; - bool all_entries_equal = true; - OffsetNumber max_offset; - int nbytes, ndims_pageunion, d; - int posmax = -1; - - POSTGIS_DEBUG(4, "[GIST] 'picksplit' function called"); - - /* - ** First calculate the bounding box and maximum number of dimensions in this page. - */ - - max_offset = entryvec->n - 1; - box_current = (GIDX*) DatumGetPointer(entryvec->vector[FirstOffsetNumber].key); - box_pageunion = gidx_copy(box_current); - - /* Calculate the containing box (box_pageunion) for the whole page we are going to split. */ - for ( i = OffsetNumberNext(FirstOffsetNumber); i <= max_offset; i = OffsetNumberNext(i) ) - { - box_current = (GIDX*) DatumGetPointer(entryvec->vector[i].key); - - if ( all_entries_equal == true && ! gidx_equals (box_pageunion, box_current) ) - all_entries_equal = false; - - gidx_merge( &box_pageunion, box_current ); - } - - POSTGIS_DEBUGF(3, "[GIST] box_pageunion: %s", gidx_to_string(box_pageunion)); - - /* Every box in the page is the same! So, we split and just put half the boxes in each child. */ - if ( all_entries_equal ) - { - POSTGIS_DEBUG(4, "[GIST] picksplit finds all entries equal!"); - geography_gist_picksplit_fallback(entryvec, v); - PG_RETURN_POINTER(v); - } - - /* Initialize memory structures. */ - nbytes = (max_offset + 2) * sizeof(OffsetNumber); - ndims_pageunion = GIDX_NDIMS(box_pageunion); - POSTGIS_DEBUGF(4, "[GIST] ndims_pageunion == %d", ndims_pageunion); - pos = palloc(2*ndims_pageunion * sizeof(int)); - list = palloc(2*ndims_pageunion * sizeof(OffsetNumber*)); - box_union = palloc(2*ndims_pageunion * sizeof(GIDX*)); - for ( d = 0; d < ndims_pageunion; d++ ) - { - list[BELOW(d)] = (OffsetNumber*) palloc(nbytes); - list[ABOVE(d)] = (OffsetNumber*) palloc(nbytes); - box_union[BELOW(d)] = gidx_new(ndims_pageunion); - box_union[ABOVE(d)] = gidx_new(ndims_pageunion); - pos[BELOW(d)] = 0; - pos[ABOVE(d)] = 0; - } - - /* - ** Assign each entry in the node to the volume partitions it belongs to, - ** such as "above the x/y plane, left of the y/z plane, below the x/z plane". - ** Each entry thereby ends up in three of the six partitions. - */ - POSTGIS_DEBUG(4, "[GIST] 'picksplit' calculating best split axis"); - for ( i = FirstOffsetNumber; i <= max_offset; i = OffsetNumberNext(i) ) - { - box_current = (GIDX*) DatumGetPointer(entryvec->vector[i].key); - - for ( d = 0; d < ndims_pageunion; d++ ) - { - if ( GIDX_GET_MIN(box_current,d)-GIDX_GET_MIN(box_pageunion,d) < GIDX_GET_MAX(box_pageunion,d)-GIDX_GET_MAX(box_current,d) ) - { - geography_gist_picksplit_addlist(list[BELOW(d)], &(box_union[BELOW(d)]), box_current, &(pos[BELOW(d)]), i); - } - else - { - geography_gist_picksplit_addlist(list[ABOVE(d)], &(box_union[ABOVE(d)]), box_current, &(pos[ABOVE(d)]), i); - } - - } - - } - - /* - ** "Bad disposition", too many entries fell into one octant of the space, so no matter which - ** plane we choose to split on, we're going to end up with a mostly full node. Where the - ** data is pretty homogeneous (lots of duplicates) entries that are equidistant from the - ** sides of the page union box can occasionally all end up in one place, leading - ** to this condition. - */ - if ( geography_gist_picksplit_badratios(pos,ndims_pageunion) == TRUE ) - { - /* - ** Instead we split on center points and see if we do better. - ** First calculate the average center point for each axis. - */ - double *avgCenter = palloc(ndims_pageunion * sizeof(double)); - - for ( d = 0; d < ndims_pageunion; d++ ) - { - avgCenter[d] = 0.0; - } - - POSTGIS_DEBUG(4, "[GIST] picksplit can't find good split axis, trying center point method"); - - for ( i = FirstOffsetNumber; i <= max_offset; i = OffsetNumberNext(i) ) - { - box_current = (GIDX*) DatumGetPointer(entryvec->vector[i].key); - for ( d = 0; d < ndims_pageunion; d++ ) - { - avgCenter[d] += (GIDX_GET_MAX(box_current,d) + GIDX_GET_MIN(box_current,d)) / 2.0; - } - } - for ( d = 0; d < ndims_pageunion; d++ ) - { - avgCenter[d] /= max_offset; - pos[BELOW(d)] = pos[ABOVE(d)] = 0; /* Re-initialize our counters. */ - POSTGIS_DEBUGF(4, "[GIST] picksplit average center point[%d] = %.12g", d, avgCenter[d]); - } - - /* For each of our entries... */ - for ( i = FirstOffsetNumber; i <= max_offset; i = OffsetNumberNext(i) ) - { - double center; - box_current = (GIDX*) DatumGetPointer(entryvec->vector[i].key); - - for ( d = 0; d < ndims_pageunion; d++ ) - { - center = (GIDX_GET_MIN(box_current,d)+GIDX_GET_MAX(box_current,d))/2.0; - if ( center < avgCenter[d] ) - geography_gist_picksplit_addlist(list[BELOW(d)], &(box_union[BELOW(d)]), box_current, &(pos[BELOW(d)]), i); - else if ( FPeq(center, avgCenter[d]) ) - if ( pos[BELOW(d)] > pos[ABOVE(d)] ) - geography_gist_picksplit_addlist(list[ABOVE(d)], &(box_union[ABOVE(d)]), box_current, &(pos[ABOVE(d)]), i); - else - geography_gist_picksplit_addlist(list[BELOW(d)], &(box_union[BELOW(d)]), box_current, &(pos[BELOW(d)]), i); - else - geography_gist_picksplit_addlist(list[ABOVE(d)], &(box_union[ABOVE(d)]), box_current, &(pos[ABOVE(d)]), i); - } - - } - - /* Do we have a good disposition now? If not, screw it, just cut the node in half. */ - if ( geography_gist_picksplit_badratios(pos,ndims_pageunion) == TRUE ) - { - POSTGIS_DEBUG(4, "[GIST] picksplit still cannot find a good split! just cutting the node in half"); - geography_gist_picksplit_fallback(entryvec, v); - PG_RETURN_POINTER(v); - } - - } - - /* - ** Now, what splitting plane gives us the most even ratio of - ** entries in our child pages? Since each split region has been apportioned entries - ** against the same number of total entries, the axis that has the smallest maximum - ** number of entries in its regions is the most evenly distributed. - ** TODO: what if the distributions are equal in two or more axes? - */ - for ( d = 0; d < ndims_pageunion; d++ ) - { - int posd = Max(pos[ABOVE(d)],pos[BELOW(d)]); - if ( posd > posmax ) - { - direction = d; - posmax = posd; - } - } - if ( direction == -1 || posmax == -1 ) - { - /* ERROR OUT HERE */ - elog(ERROR, "Error in building split, unable to determine split direction."); - } - - POSTGIS_DEBUGF(3, "[GIST] 'picksplit' splitting on axis %d", direction); - - geography_gist_picksplit_constructsplit(v, list[BELOW(direction)], - pos[BELOW(direction)], - &(box_union[BELOW(direction)]), - list[ABOVE(direction)], - pos[ABOVE(direction)], - &(box_union[ABOVE(direction)]) ); - - POSTGIS_DEBUGF(4, "[GIST] spl_ldatum: %s", gidx_to_string((GIDX*)v->spl_ldatum)); - POSTGIS_DEBUGF(4, "[GIST] spl_rdatum: %s", gidx_to_string((GIDX*)v->spl_rdatum)); - - POSTGIS_DEBUGF(4, "[GIST] axis %d: parent range (%.12g, %.12g) left range (%.12g, %.12g), right range (%.12g, %.12g)", - direction, - GIDX_GET_MIN(box_pageunion, direction), GIDX_GET_MAX(box_pageunion, direction), - GIDX_GET_MIN((GIDX*)v->spl_ldatum, direction), GIDX_GET_MAX((GIDX*)v->spl_ldatum, direction), - GIDX_GET_MIN((GIDX*)v->spl_rdatum, direction), GIDX_GET_MAX((GIDX*)v->spl_rdatum, direction) ); - - PG_RETURN_POINTER(v); - -} - -/* -** The GIDX key must be defined as a PostgreSQL type, even though it is only -** ever used internally. These no-op stubs are used to bind the type. -*/ -PG_FUNCTION_INFO_V1(gidx_in); -Datum gidx_in(PG_FUNCTION_ARGS) -{ -// char *str = PG_GETARG_CSTRING(0); - PG_RETURN_POINTER(NULL); -} - -PG_FUNCTION_INFO_V1(gidx_out); -Datum gidx_out(PG_FUNCTION_ARGS) -{ - char *str = palloc(5); - SET_VARSIZE(str, 1); - str[4] = '\0'; - PG_RETURN_POINTER(str); -} diff -Nru postgis-1.5.3/postgis/geography_inout.c postgis-2.0.1/postgis/geography_inout.c --- postgis-1.5.3/postgis/geography_inout.c 2011-05-25 18:42:02.000000000 +0000 +++ postgis-2.0.1/postgis/geography_inout.c 2012-04-05 18:22:40.000000000 +0000 @@ -1,8 +1,8 @@ /********************************************************************** - * $Id: geography_inout.c 7247 2011-05-25 18:42:02Z pramsey $ + * $Id: geography_inout.c 9614 2012-04-05 18:22:40Z pramsey $ * * PostGIS - Spatial Types for PostgreSQL - * Copyright 2009 Paul Ramsey + * Copyright 2009-2011 Paul Ramsey * * This is free software; you can redistribute and/or modify it under * the terms of the GNU General Public Licence. See the COPYING file. @@ -25,59 +25,38 @@ #include "lib/stringinfo.h" /* For binary input */ #include "catalog/pg_type.h" /* for CSTRINGOID */ -#include "libgeom.h" /* For standard geometry types. */ +#include "liblwgeom.h" /* For standard geometry types. */ #include "lwgeom_pg.h" /* For debugging macros. */ #include "geography.h" /* For utility functions. */ -#include "lwgeom_export.h" /* For exports functions. */ +#include "lwgeom_export.h" /* For export functions. */ +#include "lwgeom_transform.h" Datum geography_in(PG_FUNCTION_ARGS); Datum geography_out(PG_FUNCTION_ARGS); -Datum geography_typmod_in(PG_FUNCTION_ARGS); -Datum geography_typmod_out(PG_FUNCTION_ARGS); -Datum geography_typmod_dims(PG_FUNCTION_ARGS); -Datum geography_typmod_srid(PG_FUNCTION_ARGS); -Datum geography_typmod_type(PG_FUNCTION_ARGS); -Datum geography_enforce_typmod(PG_FUNCTION_ARGS); Datum geography_as_text(PG_FUNCTION_ARGS); Datum geography_from_text(PG_FUNCTION_ARGS); Datum geography_as_geojson(PG_FUNCTION_ARGS); Datum geography_as_gml(PG_FUNCTION_ARGS); Datum geography_as_kml(PG_FUNCTION_ARGS); Datum geography_as_svg(PG_FUNCTION_ARGS); -Datum geography_as_binary(PG_FUNCTION_ARGS); Datum geography_from_binary(PG_FUNCTION_ARGS); Datum geography_from_geometry(PG_FUNCTION_ARGS); Datum geometry_from_geography(PG_FUNCTION_ARGS); +Datum geography_send(PG_FUNCTION_ARGS); +Datum geography_recv(PG_FUNCTION_ARGS); /* Datum geography_gist_selectivity(PG_FUNCTION_ARGS); TBD */ /* Datum geography_gist_join_selectivity(PG_FUNCTION_ARGS); TBD */ -/* Datum geography_send(PG_FUNCTION_ARGS); TBD */ -/* Datum geography_recv(PG_FUNCTION_ARGS); TBD */ - -/** -* Utility method to call the libgeom serialization and then set the -* PgSQL varsize header appropriately with the serialized size. -*/ -GSERIALIZED* geography_serialize(LWGEOM *lwgeom) -{ - static int is_geodetic = 1; - size_t ret_size = 0; - GSERIALIZED *g = NULL; - - g = gserialized_from_lwgeom(lwgeom, is_geodetic, &ret_size); - if ( ! g ) lwerror("Unable to serialize lwgeom."); - SET_VARSIZE(g, ret_size); - return g; -} +GSERIALIZED* gserialized_geography_from_lwgeom(LWGEOM *lwgeom, int32 geog_typmod); /** * The geography type only support POINT, LINESTRING, POLYGON, MULTI* variants * of same, and GEOMETRYCOLLECTION. If the input type is not one of those, shut * down the query. */ -void geography_valid_type(uchar type) +void geography_valid_type(uint8_t type) { if ( ! ( type == POINTTYPE || @@ -91,156 +70,107 @@ { ereport(ERROR, ( errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("Geography type does not support %s", lwgeom_typename(type) ))); + errmsg("Geography type does not support %s", lwtype_name(type) ))); } } -/** -* Check the consistency of the metadata we want to enforce in the typmod: -* srid, type and dimensionality. If things are inconsistent, shut down the query. -*/ -void geography_valid_typmod(LWGEOM *lwgeom, int32 typmod) +GSERIALIZED* gserialized_geography_from_lwgeom(LWGEOM *lwgeom, int32 geog_typmod) { - int32 lwgeom_srid; - int32 lwgeom_type; - int32 lwgeom_z; - int32 lwgeom_m; - int32 typmod_srid = TYPMOD_GET_SRID(typmod); - int32 typmod_type = TYPMOD_GET_TYPE(typmod); - int32 typmod_z = TYPMOD_GET_Z(typmod); - int32 typmod_m = TYPMOD_GET_M(typmod); - - assert(lwgeom); - - lwgeom_type = TYPE_GETTYPE(lwgeom->type); - lwgeom_srid = lwgeom->SRID; - lwgeom_z = TYPE_HASZ(lwgeom->type); - lwgeom_m = TYPE_HASM(lwgeom->type); - - POSTGIS_DEBUG(2, "Entered function"); + GSERIALIZED *g_ser = NULL; - /* No typmod (-1) => no preferences */ - if (typmod < 0) return; + /* Set geodetic flag */ + lwgeom_set_geodetic(lwgeom, true); - POSTGIS_DEBUGF(3, "Got lwgeom(type = %d, srid = %d, hasz = %d, hasm = %d)", lwgeom_type, lwgeom_srid, lwgeom_z, lwgeom_m); - POSTGIS_DEBUGF(3, "Got typmod(type = %d, srid = %d, hasz = %d, hasm = %d)", typmod_type, typmod_srid, typmod_z, typmod_m); + /* Check that this is a type we can handle */ + geography_valid_type(lwgeom->type); - /* Typmod has a preference for SRID and lwgeom has a non-default SRID? They had better match. */ - if ( typmod_srid > 0 && typmod_srid != lwgeom_srid ) + /* Check that the coordinates are in range */ + if ( lwgeom_check_geodetic(lwgeom) == LW_FALSE ) { - ereport(ERROR, ( - errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("Geography SRID (%d) does not match column SRID (%d)", lwgeom_srid, typmod_srid) )); + if ( (! lwgeom_nudge_geodetic(lwgeom)) || lwgeom_check_geodetic(lwgeom) == LW_FALSE ) + { + ereport(ERROR, ( + errcode(ERRCODE_INVALID_PARAMETER_VALUE), + errmsg("Coordinate values are out of range [-180 -90, 180 90] for GEOGRAPHY type" ))); + } } - /* Typmod has a preference for geometry type. */ - if ( typmod_type > 0 && - /* GEOMETRYCOLLECTION column can hold any kind of collection */ - ((typmod_type == COLLECTIONTYPE && ! (lwgeom_type == COLLECTIONTYPE || - lwgeom_type == MULTIPOLYGONTYPE || - lwgeom_type == MULTIPOINTTYPE || - lwgeom_type == MULTILINETYPE )) || - /* Other types must be strictly equal. */ - (typmod_type != lwgeom_type)) ) - { - ereport(ERROR, ( - errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("Geometry type (%s) does not match column type (%s)", lwgeom_typename(lwgeom_type), lwgeom_typename(typmod_type)) )); - } + /* Force default SRID to the default */ + if ( (int)lwgeom->srid <= 0 ) + lwgeom->srid = SRID_DEFAULT; - /* Mismatched Z dimensionality. */ - if ( typmod_z && ! lwgeom_z ) - { - ereport(ERROR, ( - errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("Column has Z dimension but geometry does not" ))); - } + /* + ** Serialize our lwgeom and set the geodetic flag so subsequent + ** functions do the right thing. + */ + g_ser = geography_serialize(lwgeom); - /* Mismatched Z dimensionality (other way). */ - if ( lwgeom_z && ! typmod_z ) + /* Check for typmod agreement */ + if ( geog_typmod >= 0 ) { - ereport(ERROR, ( - errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("Geometry has Z dimension but column does not" ))); + postgis_valid_typmod(g_ser, geog_typmod); + POSTGIS_DEBUG(3, "typmod and geometry were consistent"); } - - /* Mismatched M dimensionality. */ - if ( typmod_m && ! lwgeom_m ) + else { - ereport(ERROR, ( - errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("Column has M dimension but geometry does not" ))); + POSTGIS_DEBUG(3, "typmod was -1"); } - /* Mismatched M dimensionality (other way). */ - if ( lwgeom_m && ! typmod_m ) - { - ereport(ERROR, ( - errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("Geometry has M dimension but column does not" ))); - } + return g_ser; } + /* ** geography_in(cstring) returns *GSERIALIZED */ PG_FUNCTION_INFO_V1(geography_in); Datum geography_in(PG_FUNCTION_ARGS) { - char *geog_str = PG_GETARG_CSTRING(0); + char *str = PG_GETARG_CSTRING(0); /* Datum geog_oid = PG_GETARG_OID(1); Not needed. */ - int32 geog_typmod = PG_GETARG_INT32(2); + int32 geog_typmod = -1; LWGEOM_PARSER_RESULT lwg_parser_result; LWGEOM *lwgeom = NULL; GSERIALIZED *g_ser = NULL; - int result = 0; - /* Handles both HEXEWKB and EWKT */ - result = serialized_lwgeom_from_ewkt(&lwg_parser_result, geog_str, PARSER_CHECK_ALL); - if (result) - PG_PARSER_ERROR(lwg_parser_result); + if ( (PG_NARGS()>2) && (!PG_ARGISNULL(2)) ) { + geog_typmod = PG_GETARG_INT32(2); + } - lwgeom = lwgeom_deserialize(lwg_parser_result.serialized_lwgeom); + lwgeom_parser_result_init(&lwg_parser_result); - geography_valid_type(TYPE_GETTYPE(lwgeom->type)); + /* Empty string. */ + if ( str[0] == '\0' ) + ereport(ERROR,(errmsg("parse error - invalid geometry"))); - /* Force default SRID to the default */ - if ( (int)lwgeom->SRID <= 0 ) - { - lwgeom->SRID = SRID_DEFAULT; - } - - if ( geog_typmod >= 0 ) + /* WKB? Let's find out. */ + if ( str[0] == '0' ) { - geography_valid_typmod(lwgeom, geog_typmod); - POSTGIS_DEBUG(3, "typmod and geometry were consistent"); + /* TODO: 20101206: No parser checks! This is inline with current 1.5 behavior, but needs discussion */ + lwgeom = lwgeom_from_hexwkb(str, LW_PARSER_CHECK_NONE); + /* Error out if something went sideways */ + if ( ! lwgeom ) + ereport(ERROR,(errmsg("parse error - invalid geometry"))); } + /* WKT then. */ else { - POSTGIS_DEBUG(3, "typmod was -1"); + if ( lwgeom_parse_wkt(&lwg_parser_result, str, LW_PARSER_CHECK_ALL) == LW_FAILURE ) + PG_PARSER_ERROR(lwg_parser_result); + + lwgeom = lwg_parser_result.geom; } - /* - ** Serialize our lwgeom and set the geodetic flag so subsequent - ** functions do the right thing. - */ - g_ser = geography_serialize(lwgeom); - FLAGS_SET_GEODETIC(g_ser->flags, 1); + /* Error on any SRID != default */ + srid_is_latlong(fcinfo, lwgeom->srid); + + /* Convert to gserialized */ + g_ser = gserialized_geography_from_lwgeom(lwgeom, geog_typmod); - /* - ** Replace the unaligned lwgeom with a new aligned one based on GSERIALIZED. - */ - lwgeom_release(lwgeom); - lwgeom = lwgeom_from_gserialized(g_ser); + /* Clean up temporary object */ + lwgeom_free(lwgeom); - /* Check if the geography has valid coordinate range. */ - if ( lwgeom_check_geodetic(lwgeom) == LW_FALSE ) - { - ereport(ERROR, ( - errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("Coordinate values are out of range [-180 -90, 180 90] for GEOGRAPHY type" ))); - } PG_RETURN_POINTER(g_ser); } @@ -251,243 +181,16 @@ PG_FUNCTION_INFO_V1(geography_out); Datum geography_out(PG_FUNCTION_ARGS) { - LWGEOM_UNPARSER_RESULT lwg_unparser_result; - LWGEOM *lwgeom = NULL; - GSERIALIZED *g = NULL; - int result = 0; - - g = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - lwgeom = lwgeom_from_gserialized(g); - - result = serialized_lwgeom_to_hexwkb(&lwg_unparser_result, lwgeom_serialize(lwgeom), PARSER_CHECK_ALL, -1); - if (result) - PG_UNPARSER_ERROR(lwg_unparser_result); - - PG_RETURN_CSTRING(lwg_unparser_result.wkoutput); -} - -/* -** geography_enforce_typmod(*GSERIALIZED) returns *GSERIALIZED -*/ -PG_FUNCTION_INFO_V1(geography_enforce_typmod); -Datum geography_enforce_typmod(PG_FUNCTION_ARGS) -{ - GSERIALIZED *arg = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - LWGEOM *lwgeom = NULL; - int32 typmod = PG_GETARG_INT32(1); - /* We don't need to have different behavior based on explicitness. */ - /* bool isExplicit = PG_GETARG_BOOL(2); */ - - lwgeom = lwgeom_from_gserialized(arg); - - /* Check if geometry typmod is consistent with the supplied one. */ - geography_valid_typmod(lwgeom, typmod); - - PG_RETURN_POINTER(geography_serialize(lwgeom)); -} - -/* -** geography_typmod_in(cstring[]) returns int32 -** -** Modified from ArrayGetIntegerTypmods in PostgreSQL 8.3 -*/ -PG_FUNCTION_INFO_V1(geography_typmod_in); -Datum geography_typmod_in(PG_FUNCTION_ARGS) -{ - - ArrayType *arr = (ArrayType *) DatumGetPointer(PG_GETARG_DATUM(0)); - uint32 typmod = 0; - Datum *elem_values; - int n = 0; - int i = 0; - - if (ARR_ELEMTYPE(arr) != CSTRINGOID) - ereport(ERROR, - (errcode(ERRCODE_ARRAY_ELEMENT_ERROR), - errmsg("typmod array must be type cstring[]"))); - - if (ARR_NDIM(arr) != 1) - ereport(ERROR, - (errcode(ERRCODE_ARRAY_SUBSCRIPT_ERROR), - errmsg("typmod array must be one-dimensional"))); - - if (ARR_HASNULL(arr)) - ereport(ERROR, - (errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED), - errmsg("typmod array must not contain nulls"))); - - deconstruct_array(arr, - CSTRINGOID, -2, false, 'c', /* hardwire cstring representation details */ - &elem_values, NULL, &n); - - /* Set the SRID to the default value first */ - TYPMOD_SET_SRID(typmod, SRID_DEFAULT); - - for (i = 0; i < n; i++) - { - if ( i == 1 ) /* SRID */ - { - int srid = pg_atoi(DatumGetCString(elem_values[i]), sizeof(int32), '\0'); - if ( srid > 0 ) - { - POSTGIS_DEBUGF(3, "srid: %d", srid); - if ( srid > SRID_MAXIMUM ) - { - ereport(ERROR, - (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("SRID value may not exceed %d", - SRID_MAXIMUM))); - } - else - { - /* TODO: Check that the value provided is in fact a lonlat entry in spatial_ref_sys. */ - /* For now, we only accept SRID_DEFAULT. */ - if ( srid != SRID_DEFAULT ) - { - ereport(ERROR, - (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("Currently, only %d is accepted as an SRID for GEOGRAPHY", SRID_DEFAULT))); - } - else - { - TYPMOD_SET_SRID(typmod, srid); - } - } - } - else - { - } - } - if ( i == 0 ) /* TYPE */ - { - char *s = DatumGetCString(elem_values[i]); - int type = 0; - int z = 0; - int m = 0; - - if ( geometry_type_from_string(s, &type, &z, &m) == G_FAILURE ) - { - ereport(ERROR, - (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("Invalid geometry type modifier: %s", s))); - } - else - { - TYPMOD_SET_TYPE(typmod, type); - if ( z ) - TYPMOD_SET_Z(typmod); - if ( m ) - TYPMOD_SET_M(typmod); - } - } - } - - pfree(elem_values); - - PG_RETURN_INT32(typmod); - -} - - -/* -** geography_typmod_out(int) returns cstring -*/ -PG_FUNCTION_INFO_V1(geography_typmod_out); -Datum geography_typmod_out(PG_FUNCTION_ARGS) -{ - char *s = (char*)palloc(64); - char *str = s; - uint32 typmod = PG_GETARG_INT32(0); - uint32 srid = TYPMOD_GET_SRID(typmod); - uint32 type = TYPMOD_GET_TYPE(typmod); - uint32 hasz = TYPMOD_GET_Z(typmod); - uint32 hasm = TYPMOD_GET_M(typmod); - - POSTGIS_DEBUGF(3, "Got typmod(srid = %d, type = %d, hasz = %d, hasm = %d)", srid, type, hasz, hasm); - - /* No SRID or type or dimensionality? Then no typmod at all. Return empty string. */ - if ( ! ( srid || type || hasz || hasz ) ) - { - *str = '\0'; - PG_RETURN_CSTRING(str); - } - - /* Opening bracket. */ - str += sprintf(str, "("); - - /* Has type? */ - if ( type ) - str += sprintf(str, "%s", lwgeom_typename(type)); - else if ( (!type) && ( srid || hasz || hasm ) ) - str += sprintf(str, "Geometry"); - - /* Has Z? */ - if ( hasz ) - str += sprintf(str, "%s", "Z"); - - /* Has M? */ - if ( hasm ) - str += sprintf(str, "%s", "M"); - - /* Comma? */ - if ( srid ) - str += sprintf(str, ","); - - /* Has SRID? */ - if ( srid ) - str += sprintf(str, "%d", srid); - - /* Closing bracket. */ - str += sprintf(str, ")"); - - PG_RETURN_CSTRING(s); - -} - -/* -** geography_as_text(*GSERIALIZED) returns text -*/ -PG_FUNCTION_INFO_V1(geography_as_text); -Datum geography_as_text(PG_FUNCTION_ARGS) -{ LWGEOM *lwgeom = NULL; GSERIALIZED *g = NULL; - int result = 0; - char *semicolon_loc = NULL; - char *wkt = NULL; - uchar *lwgeom_serialized = NULL; - LWGEOM_UNPARSER_RESULT lwg_unparser_result; - size_t len = 0; + char *hexwkb; g = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - - /* Convert to lwgeom so we can run the old functions */ lwgeom = lwgeom_from_gserialized(g); - lwgeom_serialized = lwgeom_serialize(lwgeom); - - /* Generate WKT */ - result = serialized_lwgeom_to_ewkt(&lwg_unparser_result, lwgeom_serialized, PARSER_CHECK_ALL); - if (result) - PG_UNPARSER_ERROR(lwg_unparser_result); - - /* Strip SRID=NNNN;' off the front of the EWKT. */ - semicolon_loc = strchr(lwg_unparser_result.wkoutput,';'); - if (semicolon_loc == NULL) - semicolon_loc = lwg_unparser_result.wkoutput; - else - semicolon_loc = semicolon_loc + 1; - - len = strlen(semicolon_loc) + VARHDRSZ; - wkt = palloc(len); - SET_VARSIZE(wkt, len); + hexwkb = lwgeom_to_hexwkb(lwgeom, WKB_EXTENDED, 0); + lwgeom_free(lwgeom); - memcpy(VARDATA(wkt), semicolon_loc, len - VARHDRSZ); - - pfree(lwg_unparser_result.wkoutput); - pfree(lwgeom_serialized); - lwgeom_release(lwgeom); - - PG_RETURN_POINTER(wkt); + PG_RETURN_CSTRING(hexwkb); } @@ -501,13 +204,17 @@ GSERIALIZED *g = NULL; char *gml; text *result; - int len; int version; char *srs; - int SRID = SRID_DEFAULT; - int precision = MAX_DOUBLE_PRECISION; + int srid = SRID_DEFAULT; + int precision = OUT_MAX_DOUBLE_PRECISION; int option=0; - bool is_deegree=false; + int lwopts = LW_GML_IS_DIMS; + static const char *default_prefix = "gml:"; + char *prefixbuf; + const char* prefix = default_prefix; + text *prefix_text; + /* Get the version */ version = PG_GETARG_INT32(0); @@ -528,8 +235,8 @@ if (PG_NARGS() >2 && !PG_ARGISNULL(2)) { precision = PG_GETARG_INT32(2); - if ( precision > MAX_DOUBLE_PRECISION ) - precision = MAX_DOUBLE_PRECISION; + if ( precision > OUT_MAX_DOUBLE_PRECISION ) + precision = OUT_MAX_DOUBLE_PRECISION; else if ( precision < 0 ) precision = 0; } @@ -537,34 +244,57 @@ if (PG_NARGS() >3 && !PG_ARGISNULL(3)) option = PG_GETARG_INT32(3); - /* Revert lat/lon only with long SRS */ - if (option & 1) is_deegree = true; - if (option & 1) srs = getSRSbySRID(SRID, false); - else srs = getSRSbySRID(SRID, true); + /* retrieve prefix */ + if (PG_NARGS() >4 && !PG_ARGISNULL(4)) + { + prefix_text = PG_GETARG_TEXT_P(4); + if ( VARSIZE(prefix_text)-VARHDRSZ == 0 ) + { + prefix = ""; + } + else + { + /* +2 is one for the ':' and one for term null */ + prefixbuf = palloc(VARSIZE(prefix_text)-VARHDRSZ+2); + memcpy(prefixbuf, VARDATA(prefix_text), + VARSIZE(prefix_text)-VARHDRSZ); + /* add colon and null terminate */ + prefixbuf[VARSIZE(prefix_text)-VARHDRSZ] = ':'; + prefixbuf[VARSIZE(prefix_text)-VARHDRSZ+1] = '\0'; + prefix = prefixbuf; + } + } + + if (option & 1) srs = getSRSbySRID(srid, false); + else srs = getSRSbySRID(srid, true); if (!srs) { elog(ERROR, "SRID %d unknown in spatial_ref_sys table", SRID_DEFAULT); PG_RETURN_NULL(); } + /* Revert lat/lon only with long SRS */ + if (option & 1) lwopts |= LW_GML_IS_DEGREE; + if (option & 2) lwopts &= ~LW_GML_IS_DIMS; + if (version == 2) - gml = geometry_to_gml2(lwgeom_serialize(lwgeom), srs, precision); + gml = lwgeom_to_gml2(lwgeom, srs, precision, prefix); else - gml = geometry_to_gml3(lwgeom_serialize(lwgeom), srs, precision, is_deegree); - - PG_FREE_IF_COPY(lwgeom, 1); + gml = lwgeom_to_gml3(lwgeom, srs, precision, lwopts, prefix); - len = strlen(gml) + VARHDRSZ; + lwgeom_free(lwgeom); + PG_FREE_IF_COPY(g, 1); - result = palloc(len); - SET_VARSIZE(result, len); - - memcpy(VARDATA(result), gml, len-VARHDRSZ); + /* Return null on null */ + if ( ! gml ) + PG_RETURN_NULL(); - pfree(gml); + /* Turn string result into text for return */ + result = cstring2text(gml); + lwfree(gml); - PG_RETURN_POINTER(result); + PG_RETURN_TEXT_P(result); } @@ -578,9 +308,12 @@ LWGEOM *lwgeom = NULL; char *kml; text *result; - int len; int version; - int precision = MAX_DOUBLE_PRECISION; + int precision = OUT_MAX_DOUBLE_PRECISION; + static const char *default_prefix = ""; + char *prefixbuf; + const char* prefix = default_prefix; + text *prefix_text; /* Get the version */ @@ -602,25 +335,44 @@ if (PG_NARGS() >2 && !PG_ARGISNULL(2)) { precision = PG_GETARG_INT32(2); - if ( precision > MAX_DOUBLE_PRECISION ) - precision = MAX_DOUBLE_PRECISION; + if ( precision > OUT_MAX_DOUBLE_PRECISION ) + precision = OUT_MAX_DOUBLE_PRECISION; else if ( precision < 0 ) precision = 0; } - kml = geometry_to_kml2(lwgeom_serialize(lwgeom), precision); - - PG_FREE_IF_COPY(lwgeom, 1); + /* retrieve prefix */ + if (PG_NARGS() >3 && !PG_ARGISNULL(3)) + { + prefix_text = PG_GETARG_TEXT_P(3); + if ( VARSIZE(prefix_text)-VARHDRSZ == 0 ) + { + prefix = ""; + } + else + { + /* +2 is one for the ':' and one for term null */ + prefixbuf = palloc(VARSIZE(prefix_text)-VARHDRSZ+2); + memcpy(prefixbuf, VARDATA(prefix_text), + VARSIZE(prefix_text)-VARHDRSZ); + /* add colon and null terminate */ + prefixbuf[VARSIZE(prefix_text)-VARHDRSZ] = ':'; + prefixbuf[VARSIZE(prefix_text)-VARHDRSZ+1] = '\0'; + prefix = prefixbuf; + } + } - len = strlen(kml) + VARHDRSZ; + kml = lwgeom_to_kml2(lwgeom, precision, prefix); - result = palloc(len); - SET_VARSIZE(result, len); + lwgeom_free(lwgeom); + PG_FREE_IF_COPY(g, 1); - memcpy(VARDATA(result), kml, len-VARHDRSZ); + if ( ! kml ) + PG_RETURN_NULL(); - pfree(kml); + result = cstring2text(kml); + lwfree(kml); - PG_RETURN_POINTER(result); + PG_RETURN_TEXT_P(result); } @@ -634,9 +386,8 @@ LWGEOM *lwgeom = NULL; char *svg; text *result; - int len; - bool relative = false; - int precision=MAX_DOUBLE_PRECISION; + int relative = 0; + int precision=OUT_MAX_DOUBLE_PRECISION; if ( PG_ARGISNULL(0) ) PG_RETURN_NULL(); @@ -647,27 +398,25 @@ /* check for relative path notation */ if ( PG_NARGS() > 1 && ! PG_ARGISNULL(1) ) - relative = PG_GETARG_INT32(1) ? true:false; + relative = PG_GETARG_INT32(1) ? 1:0; if ( PG_NARGS() > 2 && ! PG_ARGISNULL(2) ) { precision = PG_GETARG_INT32(2); - if ( precision > MAX_DOUBLE_PRECISION ) - precision = MAX_DOUBLE_PRECISION; + if ( precision > OUT_MAX_DOUBLE_PRECISION ) + precision = OUT_MAX_DOUBLE_PRECISION; else if ( precision < 0 ) precision = 0; } - svg = geometry_to_svg(lwgeom_serialize(lwgeom), relative, precision); - PG_FREE_IF_COPY(lwgeom, 0); - - len = strlen(svg) + VARHDRSZ; - result = palloc(len); - SET_VARSIZE(result, len); - memcpy(VARDATA(result), svg, len-VARHDRSZ); + svg = lwgeom_to_svg(lwgeom, precision, relative); + + lwgeom_free(lwgeom); + PG_FREE_IF_COPY(g, 0); - pfree(svg); + result = cstring2text(svg); + lwfree(svg); - PG_RETURN_POINTER(result); + PG_RETURN_TEXT_P(result); } @@ -681,11 +430,10 @@ GSERIALIZED *g = NULL; char *geojson; text *result; - int len; int version; int option = 0; - bool has_bbox = 0; - int precision = MAX_DOUBLE_PRECISION; + int has_bbox = 0; + int precision = OUT_MAX_DOUBLE_PRECISION; char * srs = NULL; /* Get the version */ @@ -707,8 +455,8 @@ if (PG_NARGS() >2 && !PG_ARGISNULL(2)) { precision = PG_GETARG_INT32(2); - if ( precision > MAX_DOUBLE_PRECISION ) - precision = MAX_DOUBLE_PRECISION; + if ( precision > OUT_MAX_DOUBLE_PRECISION ) + precision = OUT_MAX_DOUBLE_PRECISION; else if ( precision < 0 ) precision = 0; } @@ -729,25 +477,22 @@ if (!srs) { - elog(ERROR, "SRID %d unknown in spatial_ref_sys table", SRID_DEFAULT); + elog(ERROR, "SRID SRID_DEFAULT unknown in spatial_ref_sys table"); PG_RETURN_NULL(); } } if (option & 1) has_bbox = 1; - geojson = geometry_to_geojson(lwgeom_serialize(lwgeom), srs, has_bbox, precision); - PG_FREE_IF_COPY(lwgeom, 1); + geojson = lwgeom_to_geojson(lwgeom, srs, precision, has_bbox); + lwgeom_free(lwgeom); + PG_FREE_IF_COPY(g, 1); if (srs) pfree(srs); - len = strlen(geojson) + VARHDRSZ; - result = palloc(len); - SET_VARSIZE(result, len); - memcpy(VARDATA(result), geojson, len-VARHDRSZ); - - pfree(geojson); + result = cstring2text(geojson); + lwfree(geojson); - PG_RETURN_POINTER(result); + PG_RETURN_TEXT_P(result); } @@ -759,67 +504,25 @@ PG_FUNCTION_INFO_V1(geography_from_text); Datum geography_from_text(PG_FUNCTION_ARGS) { - Datum r = 0; + LWGEOM_PARSER_RESULT lwg_parser_result; + GSERIALIZED *g_ser = NULL; text *wkt_text = PG_GETARG_TEXT_P(0); - size_t size = VARSIZE(wkt_text) - VARHDRSZ; + /* Extract the cstring from the varlena */ - char *wkt = palloc(size+1); - memcpy(wkt, VARDATA(wkt_text), size); - /* Null terminate it */ - wkt[size] = '\0'; - /* Pass the cstring to the input parser, and magic occurs! */ - r = DirectFunctionCall3(geography_in, PointerGetDatum(wkt), Int32GetDatum(0), Int32GetDatum(-1)); - /* Clean up and return */ - pfree(wkt); - PG_RETURN_DATUM(r); -} + char *wkt = text2cstring(wkt_text); -/* -** geography_as_binary(*GSERIALIZED) returns bytea -*/ -PG_FUNCTION_INFO_V1(geography_as_binary); -Datum geography_as_binary(PG_FUNCTION_ARGS) -{ - LWGEOM_UNPARSER_RESULT lwg_unparser_result; - LWGEOM *lwgeom = NULL; - uchar *lwgeom_serialized = NULL; - size_t lwgeom_serialized_size = 0; - uchar *lwgeom_serialized_2d = NULL; - int result = 0; - char *wkb = NULL; - size_t wkb_size = 0; - GSERIALIZED *g = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - - /* Drop SRID so that WKB does not contain SRID. */ - gserialized_set_srid(g, 0); + /* Pass the cstring to the input parser, and magic occurs! */ + if ( lwgeom_parse_wkt(&lwg_parser_result, wkt, LW_PARSER_CHECK_ALL) == LW_FAILURE ) + PG_PARSER_ERROR(lwg_parser_result); - /* Convert to lwgeom so we can run the old functions */ - lwgeom = lwgeom_from_gserialized(g); - lwgeom_serialized_size = lwgeom_serialize_size(lwgeom); - lwgeom_serialized = lwgeom_serialize(lwgeom); + /* Clean up string */ + pfree(wkt); + g_ser = gserialized_geography_from_lwgeom(lwg_parser_result.geom, -1); - /* Force to 2D */ - lwgeom_serialized_2d = lwalloc(lwgeom_serialized_size); - lwgeom_force2d_recursive(lwgeom_serialized, lwgeom_serialized_2d, &lwgeom_serialized_size); - - /* Create WKB */ - result = serialized_lwgeom_to_ewkb(&lwg_unparser_result, lwgeom_serialized_2d, PARSER_CHECK_ALL, NDR); - if (result) - PG_UNPARSER_ERROR(lwg_unparser_result); - - /* Copy to varlena pointer */ - wkb_size = lwg_unparser_result.size + VARHDRSZ; - wkb = palloc(wkb_size); - SET_VARSIZE(wkb, wkb_size); - memcpy(VARDATA(wkb), lwg_unparser_result.wkoutput, lwg_unparser_result.size); - - /* Clean up */ - pfree(lwg_unparser_result.wkoutput); - lwgeom_release(lwgeom); - lwfree(lwgeom_serialized); - lwfree(lwgeom_serialized_2d); + /* Clean up temporary object */ + lwgeom_free(lwg_parser_result.geom); - PG_RETURN_POINTER(wkb); + PG_RETURN_POINTER(g_ser); } /* @@ -828,128 +531,68 @@ PG_FUNCTION_INFO_V1(geography_from_binary); Datum geography_from_binary(PG_FUNCTION_ARGS) { - char *wkb_cstring = NULL; - char *wkb_hex = NULL; char *wkb_bytea = (char*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - char *hexarg = palloc(4 + VARHDRSZ); - size_t wkb_hex_size; - - /* Create our second argument to binary_encode */ - SET_VARSIZE(hexarg, 4 + VARHDRSZ); - memcpy(VARDATA(hexarg), "hex", 4); - - /* Convert the bytea into a hex representation cstring */ - wkb_hex = DatumGetPointer(DirectFunctionCall2(binary_encode, PointerGetDatum(wkb_bytea), PointerGetDatum(hexarg))); - wkb_hex_size = VARSIZE(wkb_hex) - VARHDRSZ; - wkb_cstring = palloc(wkb_hex_size + 1); - memcpy(wkb_cstring, VARDATA(wkb_hex), wkb_hex_size); - wkb_cstring[wkb_hex_size] = '\0'; /* Null terminate the cstring */ - pfree(hexarg); - - /* Pass the cstring to the input parser, and magic occurs! */ - PG_RETURN_DATUM(DirectFunctionCall3(geography_in, PointerGetDatum(wkb_cstring), Int32GetDatum(0), Int32GetDatum(-1))); -} - -PG_FUNCTION_INFO_V1(geography_typmod_dims); -Datum geography_typmod_dims(PG_FUNCTION_ARGS) -{ - int32 typmod = PG_GETARG_INT32(0); - int32 dims = 2; - if ( typmod < 0 ) - PG_RETURN_INT32(dims); - if ( TYPMOD_GET_Z(typmod) ) - dims++; - if ( TYPMOD_GET_M(typmod) ) - dims++; - PG_RETURN_INT32(dims); -} - -PG_FUNCTION_INFO_V1(geography_typmod_srid); -Datum geography_typmod_srid(PG_FUNCTION_ARGS) -{ - int32 typmod = PG_GETARG_INT32(0); - if ( typmod < 0 ) - PG_RETURN_INT32(0); - PG_RETURN_INT32(TYPMOD_GET_SRID(typmod)); -} - -PG_FUNCTION_INFO_V1(geography_typmod_type); -Datum geography_typmod_type(PG_FUNCTION_ARGS) -{ - int32 typmod = PG_GETARG_INT32(0); - int32 type = TYPMOD_GET_TYPE(typmod); - char *s = (char*)palloc(64); - char *str = s; - int slen = 0; - - /* Has type? */ - if ( typmod < 0 || type == 0 ) - str += sprintf(str, "Geometry"); - else - str += sprintf(str, "%s", lwgeom_typename(type)); - - /* Has Z? */ - if ( typmod >= 0 && TYPMOD_GET_Z(typmod) ) - str += sprintf(str, "%s", "Z"); - - /* Has M? */ - if ( typmod >= 0 && TYPMOD_GET_M(typmod) ) - str += sprintf(str, "%s", "M"); - - slen = strlen(s) + 1; - str = palloc(slen + VARHDRSZ); - SET_VARSIZE(str, slen + VARHDRSZ); - memcpy(VARDATA(str), s, slen); - pfree(s); - PG_RETURN_POINTER(str); + GSERIALIZED *gser = NULL; + size_t wkb_size = VARSIZE(wkb_bytea); + uint8_t *wkb = (uint8_t*)VARDATA(wkb_bytea); + LWGEOM *lwgeom = lwgeom_from_wkb(wkb, wkb_size, LW_PARSER_CHECK_NONE); + + if ( ! lwgeom ) + lwerror("Unable to parse WKB"); + + gser = gserialized_geography_from_lwgeom(lwgeom, 0); + lwgeom_free(lwgeom); + PG_RETURN_POINTER(gser); } + PG_FUNCTION_INFO_V1(geography_from_geometry); Datum geography_from_geometry(PG_FUNCTION_ARGS) { + GSERIALIZED *geom = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); LWGEOM *lwgeom = NULL; GSERIALIZED *g_ser = NULL; - uchar *lwgeom_serialized = (uchar*)VARDATA(PG_DETOAST_DATUM(PG_GETARG_DATUM(0))); - geography_valid_type(TYPE_GETTYPE(lwgeom_serialized[0])); + geography_valid_type(gserialized_get_type(geom)); - lwgeom = lwgeom_deserialize(lwgeom_serialized); + lwgeom = lwgeom_from_gserialized(geom); /* Force default SRID */ - if ( (int)lwgeom->SRID <= 0 ) + if ( (int)lwgeom->srid <= 0 ) { - lwgeom->SRID = SRID_DEFAULT; + lwgeom->srid = SRID_DEFAULT; } /* Error on any SRID != default */ - if ( lwgeom->SRID != SRID_DEFAULT ) + srid_is_latlong(fcinfo, lwgeom->srid); + + /* Check if the geography has valid coordinate range. */ + if ( lwgeom_check_geodetic(lwgeom) == LW_FALSE ) { - ereport(ERROR, ( - errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("Only SRID %d is currently supported in geography.", SRID_DEFAULT ))); + if ( (! lwgeom_nudge_geodetic(lwgeom)) || lwgeom_check_geodetic(lwgeom) == LW_FALSE ) + { + ereport(ERROR, ( + errcode(ERRCODE_INVALID_PARAMETER_VALUE), + errmsg("Coordinate values are out of range [-180 -90, 180 90] for GEOGRAPHY type" ))); + } } /* ** Serialize our lwgeom and set the geodetic flag so subsequent ** functions do the right thing. */ + lwgeom_set_geodetic(lwgeom, true); + /* Recalculate the boxes after re-setting the geodetic bit */ + lwgeom_drop_bbox(lwgeom); + lwgeom_add_bbox(lwgeom); g_ser = geography_serialize(lwgeom); - FLAGS_SET_GEODETIC(g_ser->flags, 1); /* ** Replace the unaligned lwgeom with a new aligned one based on GSERIALIZED. */ - lwgeom_release(lwgeom); - lwgeom = lwgeom_from_gserialized(g_ser); - - /* Check if the geography has valid coordinate range. */ - if ( lwgeom_check_geodetic(lwgeom) == LW_FALSE ) - { - ereport(ERROR, ( - errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("Coordinate values are out of range [-180 -90, 180 90] for GEOGRAPHY type" ))); - } + lwgeom_free(lwgeom); + PG_FREE_IF_COPY(geom, 0); PG_RETURN_POINTER(g_ser); } @@ -958,24 +601,74 @@ Datum geometry_from_geography(PG_FUNCTION_ARGS) { LWGEOM *lwgeom = NULL; - PG_LWGEOM *ret = NULL; + GSERIALIZED *ret = NULL; GSERIALIZED *g_ser = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); lwgeom = lwgeom_from_gserialized(g_ser); + /* Recalculate the boxes after re-setting the geodetic bit */ + lwgeom_set_geodetic(lwgeom, false); + lwgeom_drop_bbox(lwgeom); + lwgeom_add_bbox(lwgeom); + /* We want "geometry" to think all our "geography" has an SRID, and the implied SRID is the default, so we fill that in if our SRID is actually unknown. */ - if ( (int)lwgeom->SRID <= 0 ) - lwgeom->SRID = SRID_DEFAULT; + if ( (int)lwgeom->srid <= 0 ) + lwgeom->srid = SRID_DEFAULT; - ret = pglwgeom_serialize(lwgeom); - lwgeom_release(lwgeom); + ret = geometry_serialize(lwgeom); + lwgeom_free(lwgeom); - if ( is_worth_caching_pglwgeom_bbox(ret) ) - { - ret = (PG_LWGEOM *)DatumGetPointer(DirectFunctionCall1(LWGEOM_addBBOX, PointerGetDatum(ret))); + PG_RETURN_POINTER(ret); +} + +PG_FUNCTION_INFO_V1(geography_recv); +Datum geography_recv(PG_FUNCTION_ARGS) +{ + StringInfo buf = (StringInfo) PG_GETARG_POINTER(0); + int32 geog_typmod = -1; + LWGEOM *lwgeom = NULL; + GSERIALIZED *g_ser = NULL; + + if ( (PG_NARGS()>2) && (!PG_ARGISNULL(2)) ) { + geog_typmod = PG_GETARG_INT32(2); } - PG_RETURN_POINTER(ret); + lwgeom = lwgeom_from_wkb((uint8_t*)buf->data, buf->len, LW_PARSER_CHECK_ALL); + + /* Error on any SRID != default */ + srid_is_latlong(fcinfo, lwgeom->srid); + + g_ser = gserialized_geography_from_lwgeom(lwgeom, geog_typmod); + + /* Clean up temporary object */ + lwgeom_free(lwgeom); + + /* Set cursor to the end of buffer (so the backend is happy) */ + buf->cursor = buf->len; + + PG_RETURN_POINTER(g_ser); } + +PG_FUNCTION_INFO_V1(geography_send); +Datum geography_send(PG_FUNCTION_ARGS) +{ + LWGEOM *lwgeom = NULL; + GSERIALIZED *g = NULL; + size_t size_result; + uint8_t *wkb; + bytea *result; + + g = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + lwgeom = lwgeom_from_gserialized(g); + wkb = lwgeom_to_wkb(lwgeom, WKB_EXTENDED, &size_result); + lwgeom_free(lwgeom); + + result = palloc(size_result + VARHDRSZ); + SET_VARSIZE(result, size_result + VARHDRSZ); + memcpy(VARDATA(result), wkb, size_result); + pfree(wkb); + + PG_RETURN_POINTER(result); +} diff -Nru postgis-1.5.3/postgis/geography_measurement.c postgis-2.0.1/postgis/geography_measurement.c --- postgis-1.5.3/postgis/geography_measurement.c 2010-02-01 17:35:55.000000000 +0000 +++ postgis-2.0.1/postgis/geography_measurement.c 2012-04-25 18:49:42.000000000 +0000 @@ -2,7 +2,8 @@ * $Id: geography_inout.c 4535 2009-09-28 18:16:21Z colivier $ * * PostGIS - Spatial Types for PostgreSQL - * Copyright 2009 Paul Ramsey + * + * Copyright (C) 2009 Paul Ramsey * * This is free software; you can redistribute and/or modify it under * the terms of the GNU General Public Licence. See the COPYING file. @@ -19,9 +20,11 @@ #include #include -#include "libgeom.h" /* For standard geometry types. */ +#include "liblwgeom.h" /* For standard geometry types. */ +#include "liblwgeom_internal.h" /* For FP comparators. */ #include "lwgeom_pg.h" /* For debugging macros. */ #include "geography.h" /* For utility functions. */ +#include "lwgeom_transform.h" /* For SRID functions */ Datum geography_distance(PG_FUNCTION_ARGS); Datum geography_dwithin(PG_FUNCTION_ARGS); @@ -31,6 +34,9 @@ Datum geography_point_outside(PG_FUNCTION_ARGS); Datum geography_covers(PG_FUNCTION_ARGS); Datum geography_bestsrid(PG_FUNCTION_ARGS); +Datum geography_perimeter(PG_FUNCTION_ARGS); +Datum geography_project(PG_FUNCTION_ARGS); +Datum geography_azimuth(PG_FUNCTION_ARGS); /* ** geography_distance(GSERIALIZED *g1, GSERIALIZED *g2, double tolerance, boolean use_spheroid) @@ -41,8 +47,6 @@ { LWGEOM *lwgeom1 = NULL; LWGEOM *lwgeom2 = NULL; - GBOX gbox1; - GBOX gbox2; GSERIALIZED *g1 = NULL; GSERIALIZED *g2 = NULL; double distance; @@ -61,8 +65,8 @@ use_spheroid = PG_GETARG_BOOL(3); /* Initialize spheroid */ - spheroid_init(&s, WGS84_MAJOR_AXIS, WGS84_MINOR_AXIS); - + spheroid_init_from_srid(fcinfo, gserialized_get_srid(g1), &s); + /* Set to sphere if requested */ if ( ! use_spheroid ) s.a = s.b = s.radius; @@ -73,19 +77,18 @@ /* Return NULL on empty arguments. */ if ( lwgeom_is_empty(lwgeom1) || lwgeom_is_empty(lwgeom2) ) { + PG_FREE_IF_COPY(g1, 0); + PG_FREE_IF_COPY(g2, 1); PG_RETURN_NULL(); } - /* We need the bounding boxes in case of polygon calculations, - which requires them to generate a stab-line to test point-in-polygon. */ - if ( ! gbox_from_gserialized(g1, &gbox1) || - ! gbox_from_gserialized(g2, &gbox2) ) - { - elog(NOTICE, "gbox_from_gserialized unable to calculate bounding box!"); - PG_RETURN_NULL(); - } + distance = lwgeom_distance_spheroid(lwgeom1, lwgeom2, &s, FP_TOLERANCE); - distance = lwgeom_distance_spheroid(lwgeom1, lwgeom2, &gbox1, &gbox2, &s, FP_TOLERANCE); + /* Clean up */ + lwgeom_free(lwgeom1); + lwgeom_free(lwgeom2); + PG_FREE_IF_COPY(g1, 0); + PG_FREE_IF_COPY(g2, 1); /* Something went wrong, negative return... should already be eloged, return NULL */ if ( distance < 0.0 ) @@ -93,12 +96,7 @@ PG_RETURN_NULL(); } - /* Clean up, but not all the way to the point arrays */ - lwgeom_release(lwgeom1); - lwgeom_release(lwgeom2); - PG_RETURN_FLOAT8(distance); - } /* @@ -110,8 +108,6 @@ { LWGEOM *lwgeom1 = NULL; LWGEOM *lwgeom2 = NULL; - GBOX gbox1; - GBOX gbox2; GSERIALIZED *g1 = NULL; GSERIALIZED *g2 = NULL; double tolerance; @@ -130,7 +126,7 @@ use_spheroid = PG_GETARG_BOOL(3); /* Initialize spheroid */ - spheroid_init(&s, WGS84_MAJOR_AXIS, WGS84_MINOR_AXIS); + spheroid_init_from_srid(fcinfo, gserialized_get_srid(g1), &s); /* Set to sphere if requested */ if ( ! use_spheroid ) @@ -145,16 +141,13 @@ PG_RETURN_BOOL(FALSE); } - /* We need the bounding boxes in case of polygon calculations, - which requires them to generate a stab-line to test point-in-polygon. */ - if ( ! gbox_from_gserialized(g1, &gbox1) || - ! gbox_from_gserialized(g2, &gbox2) ) - { - elog(NOTICE, "gbox_from_gserialized unable to calculate bounding box!"); - PG_RETURN_BOOL(FALSE); - } + distance = lwgeom_distance_spheroid(lwgeom1, lwgeom2, &s, tolerance); - distance = lwgeom_distance_spheroid(lwgeom1, lwgeom2, &gbox1, &gbox2, &s, tolerance); + /* Clean up */ + lwgeom_free(lwgeom1); + lwgeom_free(lwgeom2); + PG_FREE_IF_COPY(g1, 0); + PG_FREE_IF_COPY(g2, 1); /* Something went wrong... should already be eloged, return FALSE */ if ( distance < 0.0 ) @@ -163,12 +156,7 @@ PG_RETURN_BOOL(FALSE); } - /* Clean up, but not all the way to the point arrays */ - lwgeom_release(lwgeom1); - lwgeom_release(lwgeom2); - - PG_RETURN_BOOL(distance < tolerance); - + PG_RETURN_BOOL(distance <= tolerance); } @@ -183,43 +171,28 @@ PG_FUNCTION_INFO_V1(geography_expand); Datum geography_expand(PG_FUNCTION_ARGS) { - GIDX *gidx = gidx_new(3); GSERIALIZED *g = NULL; GSERIALIZED *g_out = NULL; double distance; - float fdistance; - int i; - /* Get a pointer to the geography */ - g = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - - /* Get our bounding box out of the geography, return right away if - input is an EMPTY geometry. */ - if ( geography_gidx(g, gidx) == G_FAILURE ) - { - g_out = palloc(VARSIZE(g)); - memcpy(g_out, g, VARSIZE(g)); - pfree(gidx); - PG_RETURN_POINTER(g_out); - } + /* Get a wholly-owned pointer to the geography */ + g = (GSERIALIZED*)PG_DETOAST_DATUM_COPY(PG_GETARG_DATUM(0)); /* Read our distance value and normalize to unit-sphere. */ distance = PG_GETARG_FLOAT8(1) / WGS84_RADIUS; - fdistance = (float)distance; - for ( i = 0; i < 3; i++ ) - { - GIDX_SET_MIN(gidx, i, GIDX_GET_MIN(gidx, i) - fdistance); - GIDX_SET_MAX(gidx, i, GIDX_GET_MAX(gidx, i) + fdistance); - } - - g_out = gidx_insert_into_gserialized(g, gidx); - pfree(gidx); + /* Try the expansion */ + g_out = gserialized_expand(g, distance); + /* If the expansion fails, the return our input */ if ( g_out == NULL ) { - elog(ERROR, "gidx_insert_into_gserialized tried to insert mismatched dimensionality box into geography"); - PG_RETURN_NULL(); + PG_RETURN_POINTER(g); + } + + if ( g_out != g ) + { + pfree(g); } PG_RETURN_POINTER(g_out); @@ -233,8 +206,8 @@ Datum geography_area(PG_FUNCTION_ARGS) { LWGEOM *lwgeom = NULL; - GBOX gbox; GSERIALIZED *g = NULL; + GBOX gbox; double area; bool use_spheroid = LW_TRUE; SPHEROID s; @@ -246,27 +219,21 @@ use_spheroid = PG_GETARG_BOOL(1); /* Initialize spheroid */ - spheroid_init(&s, WGS84_MAJOR_AXIS, WGS84_MINOR_AXIS); - - /* User requests spherical calculation, turn our spheroid into a sphere */ - if ( ! use_spheroid ) - s.a = s.b = s.radius; + spheroid_init_from_srid(fcinfo, gserialized_get_srid(g), &s); lwgeom = lwgeom_from_gserialized(g); /* EMPTY things have no area */ if ( lwgeom_is_empty(lwgeom) ) { - lwgeom_release(lwgeom); + lwgeom_free(lwgeom); PG_RETURN_FLOAT8(0.0); } - - /* We need the bounding box to get an outside point for area algorithm */ - if ( ! gbox_from_gserialized(g, &gbox) ) - { - elog(ERROR, "Error in gbox_from_gserialized calculation."); - PG_RETURN_NULL(); - } + + if ( lwgeom->bbox ) + gbox = *(lwgeom->bbox); + else + lwgeom_calculate_gbox_geodetic(lwgeom, &gbox); /* Test for cases that are currently not handled by spheroid code */ if ( use_spheroid ) @@ -279,11 +246,19 @@ use_spheroid = LW_FALSE; } + /* User requests spherical calculation, turn our spheroid into a sphere */ + if ( ! use_spheroid ) + s.a = s.b = s.radius; + /* Calculate the area */ if ( use_spheroid ) - area = lwgeom_area_spheroid(lwgeom, &gbox, &s); + area = lwgeom_area_spheroid(lwgeom, &s); else - area = lwgeom_area_sphere(lwgeom, &gbox, &s); + area = lwgeom_area_sphere(lwgeom, &s); + + /* Clean up */ + lwgeom_free(lwgeom); + PG_FREE_IF_COPY(g, 0); /* Something went wrong... */ if ( area < 0.0 ) @@ -292,16 +267,71 @@ PG_RETURN_NULL(); } - /* Clean up, but not all the way to the point arrays */ - lwgeom_release(lwgeom); - PG_RETURN_FLOAT8(area); - } +/* +** geography_perimeter(GSERIALIZED *g) +** returns double perimeter in meters for area features +*/ +PG_FUNCTION_INFO_V1(geography_perimeter); +Datum geography_perimeter(PG_FUNCTION_ARGS) +{ + LWGEOM *lwgeom = NULL; + GSERIALIZED *g = NULL; + double length; + bool use_spheroid = LW_TRUE; + SPHEROID s; + int type; + + /* Get our geometry object loaded into memory. */ + g = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + + /* Only return for area features. */ + type = gserialized_get_type(g); + if ( ! (type == POLYGONTYPE || type == MULTIPOLYGONTYPE || type == COLLECTIONTYPE) ) + { + PG_RETURN_FLOAT8(0.0); + } + + lwgeom = lwgeom_from_gserialized(g); + + /* EMPTY things have no perimeter */ + if ( lwgeom_is_empty(lwgeom) ) + { + lwgeom_free(lwgeom); + PG_RETURN_FLOAT8(0.0); + } + + /* Read our calculation type */ + use_spheroid = PG_GETARG_BOOL(1); + + /* Initialize spheroid */ + spheroid_init_from_srid(fcinfo, gserialized_get_srid(g), &s); + + /* User requests spherical calculation, turn our spheroid into a sphere */ + if ( ! use_spheroid ) + s.a = s.b = s.radius; + + /* Calculate the length */ + length = lwgeom_length_spheroid(lwgeom, &s); + + /* Something went wrong... */ + if ( length < 0.0 ) + { + elog(ERROR, "lwgeom_length_spheroid returned length < 0.0"); + PG_RETURN_NULL(); + } + + /* Clean up, but not all the way to the point arrays */ + lwgeom_free(lwgeom); + + PG_FREE_IF_COPY(g, 0); + PG_RETURN_FLOAT8(length); +} /* -** geography_length_sphere(GSERIALIZED *g) +** geography_length(GSERIALIZED *g) ** returns double length in meters */ PG_FUNCTION_INFO_V1(geography_length); @@ -318,9 +348,9 @@ lwgeom = lwgeom_from_gserialized(g); /* EMPTY things have no length */ - if ( lwgeom_is_empty(lwgeom) ) + if ( lwgeom_is_empty(lwgeom) || lwgeom->type == POLYGONTYPE || lwgeom->type == MULTIPOLYGONTYPE ) { - lwgeom_release(lwgeom); + lwgeom_free(lwgeom); PG_RETURN_FLOAT8(0.0); } @@ -328,7 +358,7 @@ use_spheroid = PG_GETARG_BOOL(1); /* Initialize spheroid */ - spheroid_init(&s, WGS84_MAJOR_AXIS, WGS84_MINOR_AXIS); + spheroid_init_from_srid(fcinfo, gserialized_get_srid(g), &s); /* User requests spherical calculation, turn our spheroid into a sphere */ if ( ! use_spheroid ) @@ -340,13 +370,14 @@ /* Something went wrong... */ if ( length < 0.0 ) { - elog(ERROR, "geography_length_sphere returned length < 0.0"); + elog(ERROR, "lwgeom_length_spheroid returned length < 0.0"); PG_RETURN_NULL(); } - /* Clean up, but not all the way to the point arrays */ - lwgeom_release(lwgeom); + /* Clean up */ + lwgeom_free(lwgeom); + PG_FREE_IF_COPY(g, 0); PG_RETURN_FLOAT8(length); } @@ -366,22 +397,25 @@ /* Get our geometry object loaded into memory. */ g = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - + /* We need the bounding box to get an outside point for area algorithm */ - if ( ! gbox_from_gserialized(g, &gbox) ) + if ( gserialized_get_gbox_p(g, &gbox) == LW_FAILURE ) { - elog(ERROR, "Error in gbox_from_gserialized calculation."); + POSTGIS_DEBUG(4,"gserialized_get_gbox_p returned LW_FAILURE"); + elog(ERROR, "Error in gserialized_get_gbox_p calculation."); PG_RETURN_NULL(); } + POSTGIS_DEBUGF(4, "got gbox %s", gbox_to_string(&gbox)); /* Get an exterior point, based on this gbox */ gbox_pt_outside(&gbox, &pt); - lwpoint = make_lwpoint2d(4326, pt.x, pt.y); + lwpoint = lwpoint_make2d(4326, pt.x, pt.y); g_out = gserialized_from_lwgeom((LWGEOM*)lwpoint, 1, &g_out_size); SET_VARSIZE(g_out, g_out_size); + PG_FREE_IF_COPY(g, 0); PG_RETURN_POINTER(g_out); } @@ -398,8 +432,6 @@ { LWGEOM *lwgeom1 = NULL; LWGEOM *lwgeom2 = NULL; - GBOX gbox1; - GBOX gbox2; GSERIALIZED *g1 = NULL; GSERIALIZED *g2 = NULL; int type1, type2; @@ -427,26 +459,21 @@ /* EMPTY never intersects with another geometry */ if ( lwgeom_is_empty(lwgeom1) || lwgeom_is_empty(lwgeom2) ) { - lwgeom_release(lwgeom1); - lwgeom_release(lwgeom2); + lwgeom_free(lwgeom1); + lwgeom_free(lwgeom2); + PG_FREE_IF_COPY(g1, 0); + PG_FREE_IF_COPY(g2, 1); PG_RETURN_BOOL(false); } - /* We need the bounding boxes in case of polygon calculations, - which requires them to generate a stab-line to test point-in-polygon. */ - if ( ! gbox_from_gserialized(g1, &gbox1) || - ! gbox_from_gserialized(g2, &gbox2) ) - { - elog(ERROR, "geography_covers: error in gbox_from_gserialized calculation."); - PG_RETURN_NULL(); - } - /* Calculate answer */ - result = lwgeom_covers_lwgeom_sphere(lwgeom1, lwgeom2, &gbox1, &gbox2); + result = lwgeom_covers_lwgeom_sphere(lwgeom1, lwgeom2); - /* Clean up, but not all the way to the point arrays */ - lwgeom_release(lwgeom1); - lwgeom_release(lwgeom2); + /* Clean up */ + lwgeom_free(lwgeom1); + lwgeom_free(lwgeom2); + PG_FREE_IF_COPY(g1, 0); + PG_FREE_IF_COPY(g2, 1); PG_RETURN_BOOL(result); } @@ -486,9 +513,11 @@ /* Calculate if the geometry is empty. */ empty1 = lwgeom_is_empty(lwgeom1); /* Calculate a naive cartesian bounds for the objects */ - if ( ! empty1 && lwgeom_calculate_gbox(lwgeom1, &gbox1) == G_FAILURE ) + if ( ! empty1 && lwgeom_calculate_gbox_cartesian(lwgeom1, &gbox1) == LW_FAILURE ) elog(ERROR, "Error in geography_bestsrid calling lwgeom_calculate_gbox(lwgeom1, &gbox1)"); + POSTGIS_DEBUGF(4, "calculated gbox = %s", gbox_to_string(&gbox1)); + /* If we have a unique second argument, fill in all the necessarily variables. */ if ( d1 != d2 ) { @@ -497,7 +526,7 @@ gbox2.flags = g2->flags; lwgeom2 = lwgeom_from_gserialized(g2); empty2 = lwgeom_is_empty(lwgeom2); - if ( ! empty2 && lwgeom_calculate_gbox(lwgeom2, &gbox2) == G_FAILURE ) + if ( ! empty2 && lwgeom_calculate_gbox_cartesian(lwgeom2, &gbox2) == LW_FAILURE ) elog(ERROR, "Error in geography_bestsrid calling lwgeom_calculate_gbox(lwgeom2, &gbox2)"); } /* @@ -524,43 +553,185 @@ /* Are these data arctic? Lambert Azimuthal Equal Area North. */ if ( gbox1.ymin > 65.0 && gbox2.ymin > 65.0 ) { - PG_RETURN_INT32(-3574); + PG_RETURN_INT32(SRID_NORTH_LAMBERT); } /* Are these data antarctic? Lambert Azimuthal Equal Area South. */ if ( gbox1.ymin < -65.0 && gbox2.ymin < -65.0 ) { - PG_RETURN_INT32(-3409); + PG_RETURN_INT32(SRID_SOUTH_LAMBERT); } /* - ** Can we fit these data into one UTM zone? We will assume we can push things as - ** far as a half zone past a zone boundary. Note we have no handling for the - ** date line in here. + ** Can we fit these data into one UTM zone? + ** We will assume we can push things as + ** far as a half zone past a zone boundary. + ** Note we have no handling for the date line in here. */ if ( fabs(FP_MAX(gbox1.xmax, gbox2.xmax) - FP_MIN(gbox1.xmin, gbox2.xmin)) < 6.0 ) { /* Cheap hack to pick a zone. Average of the box center points. */ double dzone = (gbox1.xmin + gbox1.xmax + gbox2.xmin + gbox2.xmax) / 4.0; - int zone = floor(1.0 + ((dzone + 180.0) / 6.0)); + int zone = floor((dzone + 180.0) / 6.0); + if ( zone > 59 ) zone = 59; /* Are these data below the equator? UTM South. */ if ( gbox1.ymax < 0.0 && gbox2.ymax < 0.0 ) { - PG_RETURN_INT32( -32700 - zone ); + PG_RETURN_INT32( SRID_SOUTH_UTM_START + zone ); } /* Are these data above the equator? UTM North. */ else { - PG_RETURN_INT32( -32600 - zone ); + PG_RETURN_INT32( SRID_NORTH_UTM_START + zone ); } } /* - ** Running out of options... fall-back to Mercator and hope for the best. + ** Running out of options... fall-back to Mercator + ** and hope for the best. */ - PG_RETURN_INT32(-3395); + PG_RETURN_INT32(SRID_WORLD_MERCATOR); + +} + +/* +** geography_project(GSERIALIZED *g, distance, azimuth) +** returns point of projection given start point, +** azimuth in radians (bearing) and distance in meters +*/ +PG_FUNCTION_INFO_V1(geography_project); +Datum geography_project(PG_FUNCTION_ARGS) +{ + LWGEOM *lwgeom = NULL; + LWPOINT *lwp_projected; + GSERIALIZED *g = NULL; + GSERIALIZED *g_out = NULL; + double azimuth, distance; + SPHEROID s; + uint32_t type; + + /* Return NULL on NULL distance or geography */ + if ( PG_ARGISNULL(0) || PG_ARGISNULL(1) ) + PG_RETURN_NULL(); + + /* Get our geometry object loaded into memory. */ + g = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + + /* Only return for points. */ + type = gserialized_get_type(g); + if ( type != POINTTYPE ) + { + elog(ERROR, "ST_Project(geography) is only valid for point inputs"); + PG_RETURN_NULL(); + } + + distance = PG_GETARG_FLOAT8(1); /* Distance in Meters */ + lwgeom = lwgeom_from_gserialized(g); + + /* EMPTY things cannot be projected from */ + if ( lwgeom_is_empty(lwgeom) ) + { + lwgeom_free(lwgeom); + elog(ERROR, "ST_Project(geography) cannot project from an empty start point"); + PG_RETURN_NULL(); + } + + if ( PG_ARGISNULL(2) ) + azimuth = 0.0; + else + azimuth = PG_GETARG_FLOAT8(2); /* Azimuth in Radians */ + + /* Initialize spheroid */ + spheroid_init_from_srid(fcinfo, gserialized_get_srid(g), &s); + + /* Handle the zero distance case */ + if( FP_EQUALS(distance, 0.0) ) + { + PG_RETURN_POINTER(g); + } + + /* Calculate the length */ + lwp_projected = lwgeom_project_spheroid(lwgeom_as_lwpoint(lwgeom), &s, distance, azimuth); + + /* Something went wrong... */ + if ( lwp_projected == NULL ) + { + elog(ERROR, "lwgeom_project_spheroid returned null"); + PG_RETURN_NULL(); + } + + /* Clean up, but not all the way to the point arrays */ + lwgeom_free(lwgeom); + g_out = geography_serialize(lwpoint_as_lwgeom(lwp_projected)); + lwpoint_free(lwp_projected); + + PG_FREE_IF_COPY(g, 0); + PG_RETURN_POINTER(g_out); +} + + +/* +** geography_azimuth(GSERIALIZED *g1, GSERIALIZED *g2) +** returns direction between points (north = 0) +** azimuth (bearing) and distance +*/ +PG_FUNCTION_INFO_V1(geography_azimuth); +Datum geography_azimuth(PG_FUNCTION_ARGS) +{ + LWGEOM *lwgeom1 = NULL; + LWGEOM *lwgeom2 = NULL; + GSERIALIZED *g1 = NULL; + GSERIALIZED *g2 = NULL; + double azimuth; + SPHEROID s; + uint32_t type1, type2; + + /* Get our geometry object loaded into memory. */ + g1 = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + g2 = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + + /* Only return for points. */ + type1 = gserialized_get_type(g1); + type2 = gserialized_get_type(g2); + if ( type1 != POINTTYPE || type2 != POINTTYPE ) + { + elog(ERROR, "ST_Azimuth(geography, geography) is only valid for point inputs"); + PG_RETURN_NULL(); + } + + lwgeom1 = lwgeom_from_gserialized(g1); + lwgeom2 = lwgeom_from_gserialized(g2); + + /* EMPTY things cannot be used */ + if ( lwgeom_is_empty(lwgeom1) || lwgeom_is_empty(lwgeom2) ) + { + lwgeom_free(lwgeom1); + lwgeom_free(lwgeom2); + elog(ERROR, "ST_Azimuth(geography, geography) cannot work with empty points"); + PG_RETURN_NULL(); + } + + /* Initialize spheroid */ + spheroid_init_from_srid(fcinfo, gserialized_get_srid(g1), &s); + + /* Calculate the direction */ + azimuth = lwgeom_azumith_spheroid(lwgeom_as_lwpoint(lwgeom1), lwgeom_as_lwpoint(lwgeom2), &s); + + /* Clean up */ + lwgeom_free(lwgeom1); + lwgeom_free(lwgeom2); + + PG_FREE_IF_COPY(g1, 0); + PG_FREE_IF_COPY(g2, 1); + + /* Return NULL for unknown (same point) azimuth */ + if( isnan(azimuth) ) + { + PG_RETURN_NULL(); + } + PG_RETURN_FLOAT8(azimuth); } diff -Nru postgis-1.5.3/postgis/geometry_estimate.c postgis-2.0.1/postgis/geometry_estimate.c --- postgis-1.5.3/postgis/geometry_estimate.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/postgis/geometry_estimate.c 2012-05-16 08:29:14.000000000 +0000 @@ -0,0 +1,1559 @@ +/********************************************************************** + * $Id: geometry_gist_selectivity.c 6385 2010-12-15 00:57:35Z pramsey $ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * + * Copyright 2010 (C) Paul Ramsey + * Copyright 2004 (C) Sandro Santilli + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include "postgres.h" +#include "executor/spi.h" +#include "fmgr.h" +#include "commands/vacuum.h" +#include "nodes/relation.h" +#include "parser/parsetree.h" +#include "utils/array.h" +#include "utils/lsyscache.h" +#include "utils/syscache.h" +#include "utils/rel.h" + +#include "../postgis_config.h" +#include "liblwgeom.h" +#include "lwgeom_pg.h" /* For debugging macros. */ +#include "gserialized_gist.h" /* For index common functions */ + + +#include +#if HAVE_IEEEFP_H +#include +#endif +#include +#include +#include +#include +#include + +/** + * Assign a number to the postgis statistics kind + * + * tgl suggested: + * + * 1-100: reserved for assignment by the core Postgres project + * 100-199: reserved for assignment by PostGIS + * 200-9999: reserved for other globally-known stats kinds + * 10000-32767: reserved for private site-local use + * + */ +#define STATISTIC_KIND_GEOMETRY 100 + +/* + * Define this if you want to use standard deviation based + * histogram extent computation. If you do, you can also + * tweak the deviation factor used in computation with + * SDFACTOR. + */ +#define USE_STANDARD_DEVIATION 1 +#define SDFACTOR 3.25 + +typedef struct GEOM_STATS_T +{ + /* cols * rows = total boxes in grid */ + float4 cols; + float4 rows; + + /* average bounding box area of not-null features */ + float4 avgFeatureArea; + + /* + * average number of histogram cells + * covered by the sample not-null features + */ + float4 avgFeatureCells; + + /* BOX of area */ + float4 xmin,ymin, xmax, ymax; + + /* + * variable length # of floats for histogram + */ + float4 value[1]; +} +GEOM_STATS; + +static float8 estimate_selectivity(GBOX *box, GEOM_STATS *geomstats); + + +#define SHOW_DIGS_DOUBLE 15 +#define MAX_DIGS_DOUBLE (SHOW_DIGS_DOUBLE + 6 + 1 + 3 +1) + +/** + * Default geometry selectivity factor + */ +#define DEFAULT_GEOMETRY_SEL 0.000005 + +/** + * Default geometry join selectivity factor + */ +#define DEFAULT_GEOMETRY_JOINSEL 0.000005 + +/** + * Define this to actually DO join selectivity + * (as contrary to just return the default JOINSEL value) + * Note that this is only possible when compiling postgis + * against pgsql >= 800 + */ +#define REALLY_DO_JOINSEL 1 + +Datum geometry_gist_sel_2d(PG_FUNCTION_ARGS); +Datum geometry_gist_joinsel_2d(PG_FUNCTION_ARGS); +Datum geometry_analyze_2d(PG_FUNCTION_ARGS); +Datum geometry_estimated_extent(PG_FUNCTION_ARGS); + + +#if ! REALLY_DO_JOINSEL +/** + * JOIN selectivity in the GiST && operator + * for all PG versions + */ +PG_FUNCTION_INFO_V1(LWGEOM_gist_joinsel); +Datum geometry_gist_joinsel(PG_FUNCTION_ARGS) +{ + POSTGIS_DEBUGF(2, "geometry_gist_joinsel called (returning %f)", + DEFAULT_GEOMETRY_JOINSEL); + + PG_RETURN_FLOAT8(DEFAULT_GEOMETRY_JOINSEL); +} + +#else /* REALLY_DO_JOINSEL */ + +static int +calculate_column_intersection(GBOX *search_box, GEOM_STATS *geomstats1, GEOM_STATS *geomstats2) +{ + /** + * Calculate the intersection of two columns from their geomstats extents - return true + * if a valid intersection was found, false if there is no overlap + */ + + float8 i_xmin = Max(geomstats1->xmin, geomstats2->xmin); + float8 i_ymin = Max(geomstats1->ymin, geomstats2->ymin); + float8 i_xmax = Min(geomstats1->xmax, geomstats2->xmax); + float8 i_ymax = Min(geomstats1->ymax, geomstats2->ymax); + + /* If the rectangles don't intersect, return false */ + if (i_xmin > i_xmax || i_ymin > i_ymax) + return FALSE; + + /* Otherwise return the rectangle in search_box */ + search_box->xmin = i_xmin; + search_box->ymin = i_ymin; + search_box->xmax = i_xmax; + search_box->ymax = i_ymax; + + return TRUE; +} + +/** +* JOIN selectivity in the GiST && operator +* for all PG versions +*/ +PG_FUNCTION_INFO_V1(geometry_gist_joinsel_2d); +Datum geometry_gist_joinsel_2d(PG_FUNCTION_ARGS) +{ + PlannerInfo *root = (PlannerInfo *) PG_GETARG_POINTER(0); + + /* Oid operator = PG_GETARG_OID(1); */ + List *args = (List *) PG_GETARG_POINTER(2); + JoinType jointype = (JoinType) PG_GETARG_INT16(3); + + Node *arg1, *arg2; + Var *var1, *var2; + Oid relid1, relid2; + + HeapTuple stats1_tuple, stats2_tuple, class_tuple; + GEOM_STATS *geomstats1, *geomstats2; + /* + * These are to avoid casting the corresponding + * "type-punned" pointers, which would break + * "strict-aliasing rules". + */ + GEOM_STATS **gs1ptr=&geomstats1, **gs2ptr=&geomstats2; + int geomstats1_nvalues = 0, geomstats2_nvalues = 0; + float8 selectivity1 = 0.0, selectivity2 = 0.0; + float4 num1_tuples = 0.0, num2_tuples = 0.0; + float4 total_tuples = 0.0, rows_returned = 0.0; + GBOX search_box; + + + /** + * Join selectivity algorithm. To calculation the selectivity we + * calculate the intersection of the two column sample extents, + * sum the results, and then multiply by two since for each + * geometry in col 1 that intersects a geometry in col 2, the same + * will also be true. + */ + + + POSTGIS_DEBUGF(3, "geometry_gist_joinsel called with jointype %d", jointype); + + /* + * We'll only respond to an inner join/unknown context join + */ + if (jointype != JOIN_INNER) + { + elog(NOTICE, "geometry_gist_joinsel called with incorrect join type"); + PG_RETURN_FLOAT8(DEFAULT_GEOMETRY_JOINSEL); + } + + /* + * Determine the oids of the geometry columns we are working with + */ + arg1 = (Node *) linitial(args); + arg2 = (Node *) lsecond(args); + + if (!IsA(arg1, Var) || !IsA(arg2, Var)) + { + elog(DEBUG1, "geometry_gist_joinsel called with arguments that are not column references"); + PG_RETURN_FLOAT8(DEFAULT_GEOMETRY_JOINSEL); + } + + var1 = (Var *)arg1; + var2 = (Var *)arg2; + + relid1 = getrelid(var1->varno, root->parse->rtable); + relid2 = getrelid(var2->varno, root->parse->rtable); + + POSTGIS_DEBUGF(3, "Working with relations oids: %d %d", relid1, relid2); + + /* Read the stats tuple from the first column */ + stats1_tuple = SearchSysCache(STATRELATT, ObjectIdGetDatum(relid1), Int16GetDatum(var1->varattno), 0, 0); + if ( ! stats1_tuple ) + { + POSTGIS_DEBUG(3, " No statistics, returning default geometry join selectivity"); + + PG_RETURN_FLOAT8(DEFAULT_GEOMETRY_JOINSEL); + } + + + + if ( ! get_attstatsslot(stats1_tuple, 0, 0, STATISTIC_KIND_GEOMETRY, InvalidOid, NULL, NULL, +#if POSTGIS_PGSQL_VERSION > 84 + NULL, +#endif + (float4 **)gs1ptr, &geomstats1_nvalues) ) + { + POSTGIS_DEBUG(3, " STATISTIC_KIND_GEOMETRY stats not found - returning default geometry join selectivity"); + + ReleaseSysCache(stats1_tuple); + PG_RETURN_FLOAT8(DEFAULT_GEOMETRY_JOINSEL); + } + + + /* Read the stats tuple from the second column */ + stats2_tuple = SearchSysCache(STATRELATT, ObjectIdGetDatum(relid2), Int16GetDatum(var2->varattno), 0, 0); + if ( ! stats2_tuple ) + { + POSTGIS_DEBUG(3, " No statistics, returning default geometry join selectivity"); + + free_attstatsslot(0, NULL, 0, (float *)geomstats1, + geomstats1_nvalues); + ReleaseSysCache(stats1_tuple); + PG_RETURN_FLOAT8(DEFAULT_GEOMETRY_JOINSEL); + } + + + if ( ! get_attstatsslot(stats2_tuple, 0, 0, STATISTIC_KIND_GEOMETRY, InvalidOid, NULL, NULL, +#if POSTGIS_PGSQL_VERSION > 84 + NULL, +#endif + (float4 **)gs2ptr, &geomstats2_nvalues) ) + { + POSTGIS_DEBUG(3, " STATISTIC_KIND_GEOMETRY stats not found - returning default geometry join selectivity"); + + free_attstatsslot(0, NULL, 0, (float *)geomstats1, + geomstats1_nvalues); + ReleaseSysCache(stats2_tuple); + ReleaseSysCache(stats1_tuple); + PG_RETURN_FLOAT8(DEFAULT_GEOMETRY_JOINSEL); + } + + + /** + * Setup the search box - this is the intersection of the two column + * extents. + */ + calculate_column_intersection(&search_box, geomstats1, geomstats2); + + POSTGIS_DEBUGF(3, " -- geomstats1 box: %.15g %.15g, %.15g %.15g",geomstats1->xmin,geomstats1->ymin,geomstats1->xmax,geomstats1->ymax); + POSTGIS_DEBUGF(3, " -- geomstats2 box: %.15g %.15g, %.15g %.15g",geomstats2->xmin,geomstats2->ymin,geomstats2->xmax,geomstats2->ymax); + POSTGIS_DEBUGF(3, " -- calculated intersection box is : %.15g %.15g, %.15g %.15g",search_box.xmin,search_box.ymin,search_box.xmax,search_box.ymax); + + + /* Do the selectivity */ + selectivity1 = estimate_selectivity(&search_box, geomstats1); + selectivity2 = estimate_selectivity(&search_box, geomstats2); + + POSTGIS_DEBUGF(3, "selectivity1: %.15g selectivity2: %.15g", selectivity1, selectivity2); + + /* Free the statistic tuples */ + free_attstatsslot(0, NULL, 0, (float *)geomstats1, geomstats1_nvalues); + ReleaseSysCache(stats1_tuple); + + free_attstatsslot(0, NULL, 0, (float *)geomstats2, geomstats2_nvalues); + ReleaseSysCache(stats2_tuple); + + /* + * OK, so before we calculate the join selectivity we also need to + * know the number of tuples in each of the columns since + * estimate_selectivity returns the number of estimated tuples + * divided by the total number of tuples - hence we need to + * multiply out the returned selectivity by the total number of rows. + */ + class_tuple = SearchSysCache(RELOID, ObjectIdGetDatum(relid1), + 0, 0, 0); + + if (HeapTupleIsValid(class_tuple)) + { + Form_pg_class reltup = (Form_pg_class) GETSTRUCT(class_tuple); + num1_tuples = reltup->reltuples; + } + + ReleaseSysCache(class_tuple); + + + class_tuple = SearchSysCache(RELOID, ObjectIdGetDatum(relid2), + 0, 0, 0); + + if (HeapTupleIsValid(class_tuple)) + { + Form_pg_class reltup = (Form_pg_class) GETSTRUCT(class_tuple); + num2_tuples = reltup->reltuples; + } + + ReleaseSysCache(class_tuple); + + + /* + * Finally calculate the estimate of the number of rows returned + * + * = 2 * (nrows from col1 + nrows from col2) / + * total nrows in col1 x total nrows in col2 + * + * The factor of 2 accounts for the fact that for each tuple in + * col 1 matching col 2, + * there will be another match in col 2 matching col 1 + */ + + total_tuples = num1_tuples * num2_tuples; + rows_returned = 2 * ((num1_tuples * selectivity1) + + (num2_tuples * selectivity2)); + + POSTGIS_DEBUGF(3, "Rows from rel1: %g", num1_tuples * selectivity1); + POSTGIS_DEBUGF(3, "Rows from rel2: %g", num2_tuples * selectivity2); + POSTGIS_DEBUGF(3, "Estimated rows returned: %g", rows_returned); + + /* + * One (or both) tuple count is zero... + * We return default selectivity estimate. + * We could probably attempt at an estimate + * w/out looking at tables tuple count, with + * a function of selectivity1, selectivity2. + */ + if ( ! total_tuples ) + { + POSTGIS_DEBUG(3, "Total tuples == 0, returning default join selectivity"); + + PG_RETURN_FLOAT8(DEFAULT_GEOMETRY_JOINSEL); + } + + if ( rows_returned > total_tuples ) + PG_RETURN_FLOAT8(1.0); + + PG_RETURN_FLOAT8(rows_returned / total_tuples); +} + +#endif /* REALLY_DO_JOINSEL */ + +/**************************** FROM POSTGIS ****************/ + + +/** + * This function returns an estimate of the selectivity + * of a search_box looking at data in the GEOM_STATS + * structure. + * */ +/** +* TODO: handle box dimension collapses (probably should be handled +* by the statistic generator, avoiding GEOM_STATS with collapsed +* dimensions) +*/ +static float8 +estimate_selectivity(GBOX *box, GEOM_STATS *geomstats) +{ + int x, y; + int x_idx_min, x_idx_max, y_idx_min, y_idx_max; + double intersect_x, intersect_y, AOI; + double cell_area, box_area; + double geow, geoh; /* width and height of histogram */ + int histocols, historows; /* histogram grid size */ + double value; + float overlapping_cells; + float avg_feat_cells; + double gain; + float8 selectivity; + + + /* + * Search box completely miss histogram extent + */ + if ( box->xmax < geomstats->xmin || + box->xmin > geomstats->xmax || + box->ymax < geomstats->ymin || + box->ymin > geomstats->ymax ) + { + POSTGIS_DEBUG(3, " search_box does not overlaps histogram, returning 0"); + + return 0.0; + } + + /* + * Search box completely contains histogram extent + */ + if ( box->xmax >= geomstats->xmax && + box->xmin <= geomstats->xmin && + box->ymax >= geomstats->ymax && + box->ymin <= geomstats->ymin ) + { + POSTGIS_DEBUG(3, " search_box contains histogram, returning 1"); + + return 1.0; + } + + geow = geomstats->xmax-geomstats->xmin; + geoh = geomstats->ymax-geomstats->ymin; + + histocols = geomstats->cols; + historows = geomstats->rows; + + POSTGIS_DEBUGF(3, " histogram has %d cols, %d rows", histocols, historows); + POSTGIS_DEBUGF(3, " histogram geosize is %fx%f", geow, geoh); + + cell_area = (geow*geoh) / (histocols*historows); + box_area = (box->xmax-box->xmin)*(box->ymax-box->ymin); + value = 0; + + /* Find first overlapping column */ + x_idx_min = (box->xmin-geomstats->xmin) / geow * histocols; + if (x_idx_min < 0) + { + POSTGIS_DEBUGF(3, " search_box overlaps %d columns on the left of histogram grid", -x_idx_min); + + /* should increment the value somehow */ + x_idx_min = 0; + } + if (x_idx_min >= histocols) + { + POSTGIS_DEBUGF(3, " search_box overlaps %d columns on the right of histogram grid", x_idx_min-histocols+1); + + /* should increment the value somehow */ + x_idx_min = histocols-1; + } + + /* Find first overlapping row */ + y_idx_min = (box->ymin-geomstats->ymin) / geoh * historows; + if (y_idx_min <0) + { + POSTGIS_DEBUGF(3, " search_box overlaps %d columns on the bottom of histogram grid", -y_idx_min); + + /* should increment the value somehow */ + y_idx_min = 0; + } + if (y_idx_min >= historows) + { + POSTGIS_DEBUGF(3, " search_box overlaps %d columns on the top of histogram grid", y_idx_min-historows+1); + + /* should increment the value somehow */ + y_idx_min = historows-1; + } + + /* Find last overlapping column */ + x_idx_max = (box->xmax-geomstats->xmin) / geow * histocols; + if (x_idx_max <0) + { + /* should increment the value somehow */ + x_idx_max = 0; + } + if (x_idx_max >= histocols ) + { + /* should increment the value somehow */ + x_idx_max = histocols-1; + } + + /* Find last overlapping row */ + y_idx_max = (box->ymax-geomstats->ymin) / geoh * historows; + if (y_idx_max <0) + { + /* should increment the value somehow */ + y_idx_max = 0; + } + if (y_idx_max >= historows) + { + /* should increment the value somehow */ + y_idx_max = historows-1; + } + + /* + * the {x,y}_idx_{min,max} + * define the grid squares that the box intersects + */ + for (y=y_idx_min; y<=y_idx_max; y++) + { + for (x=x_idx_min; x<=x_idx_max; x++) + { + double val; + double gain; + + val = geomstats->value[x+y*histocols]; + + /* + * Of the cell value we get + * only the overlap fraction. + */ + + intersect_x = Min(box->xmax, geomstats->xmin + (x+1) * geow / histocols) - Max(box->xmin, geomstats->xmin + x * geow / histocols ); + intersect_y = Min(box->ymax, geomstats->ymin + (y+1) * geoh / historows) - Max(box->ymin, geomstats->ymin+ y * geoh / historows) ; + + AOI = intersect_x*intersect_y; + gain = AOI/cell_area; + + POSTGIS_DEBUGF(4, " [%d,%d] cell val %.15f", + x, y, val); + POSTGIS_DEBUGF(4, " [%d,%d] AOI %.15f", + x, y, AOI); + POSTGIS_DEBUGF(4, " [%d,%d] gain %.15f", + x, y, gain); + + val *= gain; + + POSTGIS_DEBUGF(4, " [%d,%d] adding %.15f to value", + x, y, val); + + value += val; + } + } + + + /* + * If the search_box is a point, it will + * overlap a single cell and thus get + * it's value, which is the fraction of + * samples (we can presume of row set also) + * which bumped to that cell. + * + * If the table features are points, each + * of them will overlap a single histogram cell. + * Our search_box value would then be correctly + * computed as the sum of the bumped cells values. + * + * If both our search_box AND the sample features + * overlap more then a single histogram cell we + * need to consider the fact that our sum computation + * will have many duplicated included. E.g. each + * single sample feature would have contributed to + * raise the search_box value by as many times as + * many cells in the histogram are commonly overlapped + * by both search_box and feature. We should then + * divide our value by the number of cells in the virtual + * 'intersection' between average feature cell occupation + * and occupation of the search_box. This is as + * fuzzy as you understand it :) + * + * Consistency check: whenever the number of cells is + * one of whichever part (search_box_occupation, + * avg_feature_occupation) the 'intersection' must be 1. + * If sounds that our 'intersaction' is actually the + * minimun number between search_box_occupation and + * avg_feat_occupation. + * + */ + overlapping_cells = (x_idx_max-x_idx_min+1) * + (y_idx_max-y_idx_min+1); + avg_feat_cells = geomstats->avgFeatureCells; + + POSTGIS_DEBUGF(3, " search_box overlaps %f cells", overlapping_cells); + POSTGIS_DEBUGF(3, " avg feat overlaps %f cells", avg_feat_cells); + + if ( ! overlapping_cells ) + { + POSTGIS_DEBUG(3, " no overlapping cells, returning 0.0"); + + return 0.0; + } + + gain = 1/Min(overlapping_cells, avg_feat_cells); + selectivity = value*gain; + + POSTGIS_DEBUGF(3, " SUM(ov_histo_cells)=%f", value); + POSTGIS_DEBUGF(3, " gain=%f", gain); + POSTGIS_DEBUGF(3, " selectivity=%f", selectivity); + + /* prevent rounding overflows */ + if (selectivity > 1.0) selectivity = 1.0; + else if (selectivity < 0) selectivity = 0.0; + + return selectivity; +} + +/** + * This function should return an estimation of the number of + * rows returned by a query involving an overlap check + * ( it's the restrict function for the && operator ) + * + * It can make use (if available) of the statistics collected + * by the geometry analyzer function. + * + * Note that the good work is done by estimate_selectivity() above. + * This function just tries to find the search_box, loads the statistics + * and invoke the work-horse. + * + * This is the one used for PG version >= 7.5 + * + */ +PG_FUNCTION_INFO_V1(geometry_gist_sel_2d); +Datum geometry_gist_sel_2d(PG_FUNCTION_ARGS) +{ + PlannerInfo *root = (PlannerInfo *) PG_GETARG_POINTER(0); + + /* Oid operator = PG_GETARG_OID(1); */ + List *args = (List *) PG_GETARG_POINTER(2); + /* int varRelid = PG_GETARG_INT32(3); */ + Oid relid; + HeapTuple stats_tuple; + GEOM_STATS *geomstats; + /* + * This is to avoid casting the corresponding + * "type-punned" pointer, which would break + * "strict-aliasing rules". + */ + GEOM_STATS **gsptr=&geomstats; + int geomstats_nvalues=0; + Node *other; + Var *self; + GBOX search_box; + float8 selectivity=0; + + POSTGIS_DEBUG(2, "geometry_gist_sel called"); + + /* Fail if not a binary opclause (probably shouldn't happen) */ + if (list_length(args) != 2) + { + POSTGIS_DEBUG(3, "geometry_gist_sel: not a binary opclause"); + + PG_RETURN_FLOAT8(DEFAULT_GEOMETRY_SEL); + } + + + /* + * Find the constant part + */ + other = (Node *) linitial(args); + if ( ! IsA(other, Const) ) + { + self = (Var *)other; + other = (Node *) lsecond(args); + } + else + { + self = (Var *) lsecond(args); + } + + if ( ! IsA(other, Const) ) + { + POSTGIS_DEBUG(3, " no constant arguments - returning default selectivity"); + + PG_RETURN_FLOAT8(DEFAULT_GEOMETRY_SEL); + } + + /* + * We are working on two constants.. + * TODO: check if expression is true, + * returned set would be either + * the whole or none. + */ + if ( ! IsA(self, Var) ) + { + POSTGIS_DEBUG(3, " no variable argument ? - returning default selectivity"); + + PG_RETURN_FLOAT8(DEFAULT_GEOMETRY_SEL); + } + + /* + * Convert the constant to a BOX + */ + + if( ! gserialized_datum_get_gbox_p(((Const*)other)->constvalue, &search_box) ) + { + POSTGIS_DEBUG(3, "search box is EMPTY"); + PG_RETURN_FLOAT8(0.0); + } + + POSTGIS_DEBUGF(4, " requested search box is : %.15g %.15g, %.15g %.15g",search_box.xmin,search_box.ymin,search_box.xmax,search_box.ymax); + + /* + * Get pg_statistic row + */ + + relid = getrelid(self->varno, root->parse->rtable); + + stats_tuple = SearchSysCache(STATRELATT, ObjectIdGetDatum(relid), Int16GetDatum(self->varattno), 0, 0); + if ( ! stats_tuple ) + { + POSTGIS_DEBUG(3, " No statistics, returning default estimate"); + + PG_RETURN_FLOAT8(DEFAULT_GEOMETRY_SEL); + } + + + if ( ! get_attstatsslot(stats_tuple, 0, 0, STATISTIC_KIND_GEOMETRY, InvalidOid, NULL, NULL, +#if POSTGIS_PGSQL_VERSION >= 85 + NULL, +#endif + (float4 **)gsptr, &geomstats_nvalues) ) + { + POSTGIS_DEBUG(3, " STATISTIC_KIND_GEOMETRY stats not found - returning default geometry selectivity"); + + ReleaseSysCache(stats_tuple); + PG_RETURN_FLOAT8(DEFAULT_GEOMETRY_SEL); + } + + POSTGIS_DEBUGF(4, " %d read from stats", geomstats_nvalues); + + POSTGIS_DEBUGF(4, " histo: xmin,ymin: %f,%f", + geomstats->xmin, geomstats->ymin); + POSTGIS_DEBUGF(4, " histo: xmax,ymax: %f,%f", + geomstats->xmax, geomstats->ymax); + POSTGIS_DEBUGF(4, " histo: cols: %f", geomstats->rows); + POSTGIS_DEBUGF(4, " histo: rows: %f", geomstats->cols); + POSTGIS_DEBUGF(4, " histo: avgFeatureArea: %f", geomstats->avgFeatureArea); + POSTGIS_DEBUGF(4, " histo: avgFeatureCells: %f", geomstats->avgFeatureCells); + + /* + * Do the estimation + */ + selectivity = estimate_selectivity(&search_box, geomstats); + + + POSTGIS_DEBUGF(3, " returning computed value: %f", selectivity); + + free_attstatsslot(0, NULL, 0, (float *)geomstats, geomstats_nvalues); + ReleaseSysCache(stats_tuple); + PG_RETURN_FLOAT8(selectivity); + +} + + +/** + * This function is called by the analyze function iff + * the geometry_analyze() function give it its pointer + * (this is always the case so far). + * The geometry_analyze() function is also responsible + * of deciding the number of "sample" rows we will receive + * here. It is able to give use other 'custom' data, but we + * won't use them so far. + * + * Our job is to build some statistics on the sample data + * for use by operator estimators. + * + * Currently we only need statistics to estimate the number of rows + * overlapping a given extent (estimation function bound + * to the && operator). + * + */ +static void +compute_geometry_stats(VacAttrStats *stats, AnalyzeAttrFetchFunc fetchfunc, + int samplerows, double totalrows) +{ + MemoryContext old_context; + int i; + int geom_stats_size; + GBOX **sampleboxes; + GEOM_STATS *geomstats; + bool isnull; + int null_cnt=0, notnull_cnt=0, examinedsamples=0; + GBOX *sample_extent=NULL; + double total_width=0; + double total_boxes_area=0; + int total_boxes_cells=0; + double cell_area; + double cell_width; + double cell_height; +#if USE_STANDARD_DEVIATION + /* for standard deviation */ + double avgLOWx, avgLOWy, avgHIGx, avgHIGy; + double sumLOWx=0, sumLOWy=0, sumHIGx=0, sumHIGy=0; + double sdLOWx=0, sdLOWy=0, sdHIGx=0, sdHIGy=0; + GBOX *newhistobox=NULL; +#endif + double geow, geoh; /* width and height of histogram */ + int histocells; + int cols, rows; /* histogram grid size */ + GBOX histobox; + + /* + * This is where geometry_analyze + * should put its' custom parameters. + */ + /* void *mystats = stats->extra_data; */ + + /* + * We'll build an histogram having from 40 to 400 boxesPerSide + * Total number of cells is determined by attribute stat + * target. It can go from 1600 to 160000 (stat target: 10,1000) + */ + histocells = 160*stats->attr->attstattarget; + + + POSTGIS_DEBUG(2, "compute_geometry_stats called"); + POSTGIS_DEBUGF(3, " samplerows: %d", samplerows); + POSTGIS_DEBUGF(3, " histogram cells: %d", histocells); + + /* + * We might need less space, but don't think + * its worth saving... + */ + sampleboxes = palloc(sizeof(GBOX *)*samplerows); + + /* + * First scan: + * o find extent of the sample rows + * o count null-infinite/not-null values + * o compute total_width + * o compute total features's box area (for avgFeatureArea) + * o sum features box coordinates (for standard deviation) + */ + for (i=0; ixmax = Max(sample_extent->xmax, + box.xmax); + sample_extent->ymax = Max(sample_extent->ymax, + box.ymax); + sample_extent->xmin = Min(sample_extent->xmin, + box.xmin); + sample_extent->ymin = Min(sample_extent->ymin, + box.ymin); + } + + /** TODO: ask if we need geom or bvol size for stawidth */ + total_width += geom->size; + total_boxes_area += (box.xmax-box.xmin)*(box.ymax-box.ymin); + +#if USE_STANDARD_DEVIATION + /* + * Add bvol coordinates to sum for standard deviation + * computation. + */ + sumLOWx += box.xmin; + sumLOWy += box.ymin; + sumHIGx += box.xmax; + sumHIGy += box.ymax; +#endif + + notnull_cnt++; + + /* give backend a chance of interrupting us */ + vacuum_delay_point(); + + } + + if ( ! notnull_cnt ) + { + elog(NOTICE, " no notnull values, invalid stats"); + stats->stats_valid = false; + return; + } + +#if USE_STANDARD_DEVIATION + + POSTGIS_DEBUGF(3, " sample_extent: xmin,ymin: %f,%f", + sample_extent->xmin, sample_extent->ymin); + POSTGIS_DEBUGF(3, " sample_extent: xmax,ymax: %f,%f", + sample_extent->xmax, sample_extent->ymax); + + /* + * Second scan: + * o compute standard deviation + */ + avgLOWx = sumLOWx/notnull_cnt; + avgLOWy = sumLOWy/notnull_cnt; + avgHIGx = sumHIGx/notnull_cnt; + avgHIGy = sumHIGy/notnull_cnt; + for (i=0; ixmin - avgLOWx) * (box->xmin - avgLOWx); + sdLOWy += (box->ymin - avgLOWy) * (box->ymin - avgLOWy); + sdHIGx += (box->xmax - avgHIGx) * (box->xmax - avgHIGx); + sdHIGy += (box->ymax - avgHIGy) * (box->ymax - avgHIGy); + } + sdLOWx = sqrt(sdLOWx/notnull_cnt); + sdLOWy = sqrt(sdLOWy/notnull_cnt); + sdHIGx = sqrt(sdHIGx/notnull_cnt); + sdHIGy = sqrt(sdHIGy/notnull_cnt); + + POSTGIS_DEBUG(3, " standard deviations:"); + POSTGIS_DEBUGF(3, " LOWx - avg:%f sd:%f", avgLOWx, sdLOWx); + POSTGIS_DEBUGF(3, " LOWy - avg:%f sd:%f", avgLOWy, sdLOWy); + POSTGIS_DEBUGF(3, " HIGx - avg:%f sd:%f", avgHIGx, sdHIGx); + POSTGIS_DEBUGF(3, " HIGy - avg:%f sd:%f", avgHIGy, sdHIGy); + + histobox.xmin = Max((avgLOWx - SDFACTOR * sdLOWx), + sample_extent->xmin); + histobox.ymin = Max((avgLOWy - SDFACTOR * sdLOWy), + sample_extent->ymin); + histobox.xmax = Min((avgHIGx + SDFACTOR * sdHIGx), + sample_extent->xmax); + histobox.ymax = Min((avgHIGy + SDFACTOR * sdHIGy), + sample_extent->ymax); + + POSTGIS_DEBUGF(3, " sd_extent: xmin,ymin: %f,%f", + histobox.xmin, histobox.ymin); + POSTGIS_DEBUGF(3, " sd_extent: xmax,ymax: %f,%f", + histobox.xmin, histobox.ymax); + + /* + * Third scan: + * o skip hard deviants + * o compute new histogram box + */ + for (i=0; ixmin > histobox.xmax || + box->xmax < histobox.xmin || + box->ymin > histobox.ymax || + box->ymax < histobox.ymin ) + { + POSTGIS_DEBUGF(4, " feat %d is an hard deviant, skipped", i); + + sampleboxes[i] = NULL; + continue; + } + if ( ! newhistobox ) + { + newhistobox = palloc(sizeof(GBOX)); + memcpy(newhistobox, box, sizeof(GBOX)); + } + else + { + if ( box->xmin < newhistobox->xmin ) + newhistobox->xmin = box->xmin; + if ( box->ymin < newhistobox->ymin ) + newhistobox->ymin = box->ymin; + if ( box->xmax > newhistobox->xmax ) + newhistobox->xmax = box->xmax; + if ( box->ymax > newhistobox->ymax ) + newhistobox->ymax = box->ymax; + } + } + + /* + * Set histogram extent as the intersection between + * standard deviation based histogram extent + * and computed sample extent after removal of + * hard deviants (there might be no hard deviants). + */ + if ( histobox.xmin < newhistobox->xmin ) + histobox.xmin = newhistobox->xmin; + if ( histobox.ymin < newhistobox->ymin ) + histobox.ymin = newhistobox->ymin; + if ( histobox.xmax > newhistobox->xmax ) + histobox.xmax = newhistobox->xmax; + if ( histobox.ymax > newhistobox->ymax ) + histobox.ymax = newhistobox->ymax; + + +#else /* ! USE_STANDARD_DEVIATION */ + + /* + * Set histogram extent box + */ + histobox.xmin = sample_extent->xmin; + histobox.ymin = sample_extent->ymin; + histobox.xmax = sample_extent->xmax; + histobox.ymax = sample_extent->ymax; +#endif /* USE_STANDARD_DEVIATION */ + + + POSTGIS_DEBUGF(3, " histogram_extent: xmin,ymin: %f,%f", + histobox.xmin, histobox.ymin); + POSTGIS_DEBUGF(3, " histogram_extent: xmax,ymax: %f,%f", + histobox.xmax, histobox.ymax); + + + geow = histobox.xmax - histobox.xmin; + geoh = histobox.ymax - histobox.ymin; + + /* + * Compute histogram cols and rows based on aspect ratio + * of histogram extent + */ + if ( ! geow && ! geoh ) + { + cols = 1; + rows = 1; + histocells = 1; + } + else if ( ! geow ) + { + cols = 1; + rows = histocells; + } + else if ( ! geoh ) + { + cols = histocells; + rows = 1; + } + else + { + if ( geowanl_context); + geom_stats_size=sizeof(GEOM_STATS)+(histocells-1)*sizeof(float4); + geomstats = palloc(geom_stats_size); + MemoryContextSwitchTo(old_context); + + geomstats->avgFeatureArea = total_boxes_area/notnull_cnt; + geomstats->xmin = histobox.xmin; + geomstats->ymin = histobox.ymin; + geomstats->xmax = histobox.xmax; + geomstats->ymax = histobox.ymax; + geomstats->cols = cols; + geomstats->rows = rows; + + /* Initialize all values to 0 */ + for (i=0; ivalue[i] = 0; + + cell_width = geow/cols; + cell_height = geoh/rows; + cell_area = cell_width*cell_height; + + POSTGIS_DEBUGF(4, "cell_width: %f", cell_width); + POSTGIS_DEBUGF(4, "cell_height: %f", cell_height); + + + /* + * Fourth scan: + * o fill histogram values with the number of + * features' bbox overlaps: a feature's bvol + * can fully overlap (1) or partially overlap + * (fraction of 1) an histogram cell. + * + * o compute total cells occupation + * + */ + for (i=0; ixmax, box->ymax, + box->xmin, box->ymin); + + /* Find first overlapping column */ + x_idx_min = (box->xmin-geomstats->xmin) / geow * cols; + if (x_idx_min <0) x_idx_min = 0; + if (x_idx_min >= cols) x_idx_min = cols-1; + + /* Find first overlapping row */ + y_idx_min = (box->ymin-geomstats->ymin) / geoh * rows; + if (y_idx_min <0) y_idx_min = 0; + if (y_idx_min >= rows) y_idx_min = rows-1; + + /* Find last overlapping column */ + x_idx_max = (box->xmax-geomstats->xmin) / geow * cols; + if (x_idx_max <0) x_idx_max = 0; + if (x_idx_max >= cols ) x_idx_max = cols-1; + + /* Find last overlapping row */ + y_idx_max = (box->ymax-geomstats->ymin) / geoh * rows; + if (y_idx_max <0) y_idx_max = 0; + if (y_idx_max >= rows) y_idx_max = rows-1; + + POSTGIS_DEBUGF(4, " feat %d overlaps columns %d-%d, rows %d-%d", + i, x_idx_min, x_idx_max, y_idx_min, y_idx_max); + + /* + * the {x,y}_idx_{min,max} + * define the grid squares that the box intersects + */ + for (y=y_idx_min; y<=y_idx_max; y++) + { + for (x=x_idx_min; x<=x_idx_max; x++) + { + geomstats->value[x+y*cols] += 1; + numcells++; + } + } + + /* + * before adding to the total cells + * we could decide if we really + * want this feature to count + */ + total_boxes_cells += numcells; + + examinedsamples++; + } + + POSTGIS_DEBUGF(3, " examined_samples: %d/%d", examinedsamples, samplerows); + + if ( ! examinedsamples ) + { + elog(NOTICE, " no examined values, invalid stats"); + stats->stats_valid = false; + + POSTGIS_DEBUG(3, " no stats have been gathered"); + + return; + } + + /** TODO: what about null features (TODO) */ + geomstats->avgFeatureCells = (float4)total_boxes_cells/examinedsamples; + + POSTGIS_DEBUGF(3, " histo: total_boxes_cells: %d", total_boxes_cells); + POSTGIS_DEBUGF(3, " histo: avgFeatureArea: %f", geomstats->avgFeatureArea); + POSTGIS_DEBUGF(3, " histo: avgFeatureCells: %f", geomstats->avgFeatureCells); + + + /* + * Normalize histogram + * + * We divide each histogram cell value + * by the number of samples examined. + * + */ + for (i=0; ivalue[i] /= examinedsamples; + + { + int x, y; + for (x=0; xvalue[x+y*cols]); + } + } + } + + + /* + * Write the statistics data + */ + stats->stakind[0] = STATISTIC_KIND_GEOMETRY; + stats->staop[0] = InvalidOid; + stats->stanumbers[0] = (float4 *)geomstats; + stats->numnumbers[0] = geom_stats_size/sizeof(float4); + + stats->stanullfrac = (float4)null_cnt/samplerows; + stats->stawidth = total_width/notnull_cnt; + stats->stadistinct = -1.0; + + POSTGIS_DEBUGF(3, " out: slot 0: kind %d (STATISTIC_KIND_GEOMETRY)", + stats->stakind[0]); + POSTGIS_DEBUGF(3, " out: slot 0: op %d (InvalidOid)", stats->staop[0]); + POSTGIS_DEBUGF(3, " out: slot 0: numnumbers %d", stats->numnumbers[0]); + POSTGIS_DEBUGF(3, " out: null fraction: %d/%d=%g", null_cnt, samplerows, stats->stanullfrac); + POSTGIS_DEBUGF(3, " out: average width: %d bytes", stats->stawidth); + POSTGIS_DEBUG(3, " out: distinct values: all (no check done)"); + + stats->stats_valid = true; +} + +/** + * This function will be called when the ANALYZE command is run + * on a column of the "geometry" type. + * + * It will need to return a stats builder function reference + * and a "minimum" sample rows to feed it. + * If we want analisys to be completely skipped we can return + * FALSE and leave output vals untouched. + * + * What we know from this call is: + * + * o The pg_attribute row referring to the specific column. + * Could be used to get reltuples from pg_class (which + * might quite inexact though...) and use them to set an + * appropriate minimum number of sample rows to feed to + * the stats builder. The stats builder will also receive + * a more accurate "estimation" of the number or rows. + * + * o The pg_type row for the specific column. + * Could be used to set stat builder / sample rows + * based on domain type (when postgis will be implemented + * that way). + * + * Being this experimental we'll stick to a static stat_builder/sample_rows + * value for now. + * + */ +PG_FUNCTION_INFO_V1(geometry_analyze_2d); +Datum geometry_analyze_2d(PG_FUNCTION_ARGS) +{ + VacAttrStats *stats = (VacAttrStats *)PG_GETARG_POINTER(0); + Form_pg_attribute attr = stats->attr; + + POSTGIS_DEBUG(2, "geometry_analyze called"); + + /* If the attstattarget column is negative, use the default value */ + /* NB: it is okay to scribble on stats->attr since it's a copy */ + if (attr->attstattarget < 0) + attr->attstattarget = default_statistics_target; + + POSTGIS_DEBUGF(3, " attribute stat target: %d", attr->attstattarget); + + /* Setup the minimum rows and the algorithm function */ + stats->minrows = 300 * stats->attr->attstattarget; + stats->compute_stats = compute_geometry_stats; + + POSTGIS_DEBUGF(3, " minrows: %d", stats->minrows); + + /* Indicate we are done successfully */ + PG_RETURN_BOOL(true); +} + +/** + * Return the estimated extent of the table + * looking at gathered statistics (or NULL if + * no statistics have been gathered). + */ +PG_FUNCTION_INFO_V1(geometry_estimated_extent); +Datum geometry_estimated_extent(PG_FUNCTION_ARGS) +{ + text *txnsp = NULL; + text *txtbl = NULL; + text *txcol = NULL; + char *nsp = NULL; + char *tbl = NULL; + char *col = NULL; + char *query; + ArrayType *array = NULL; + int SPIcode; + SPITupleTable *tuptable; + TupleDesc tupdesc ; + HeapTuple tuple ; + bool isnull; + GBOX *box; + size_t querysize; + GEOM_STATS geomstats; + float reltuples; + Datum binval; + + if ( PG_NARGS() == 3 ) + { + txnsp = PG_GETARG_TEXT_P(0); + txtbl = PG_GETARG_TEXT_P(1); + txcol = PG_GETARG_TEXT_P(2); + } + else if ( PG_NARGS() == 2 ) + { + txtbl = PG_GETARG_TEXT_P(0); + txcol = PG_GETARG_TEXT_P(1); + } + else + { + elog(ERROR, "estimated_extent() called with wrong number of arguments"); + PG_RETURN_NULL(); + } + + POSTGIS_DEBUG(2, "geomtery_estimated_extent called"); + + /* Connect to SPI manager */ + SPIcode = SPI_connect(); + if (SPIcode != SPI_OK_CONNECT) + { + elog(ERROR, "geometry_estimated_extent: couldnt open a connection to SPI"); + PG_RETURN_NULL() ; + } + + querysize = VARSIZE(txtbl)+VARSIZE(txcol)+516; + + if ( txnsp ) + { + nsp = text2cstring(txnsp); + querysize += VARSIZE(txnsp); + } + else + { + querysize += 32; /* current_schema() */ + } + + tbl = text2cstring(txtbl); + col = text2cstring(txcol); + +#if POSTGIS_DEBUG_LEVEL > 0 + if ( txnsp ) + { + POSTGIS_DEBUGF(3, " schema:%s table:%s column:%s", nsp, tbl, col); + } + else + { + POSTGIS_DEBUGF(3, " schema:current_schema() table:%s column:%s", + tbl, col); + } +#endif + + query = palloc(querysize); + + + /* Security check: because we access information in the pg_statistic table, we must run as the database + superuser (by marking the function as SECURITY DEFINER) and check permissions ourselves */ + if ( txnsp ) + { + sprintf(query, "SELECT has_table_privilege((SELECT usesysid FROM pg_user WHERE usename = session_user), '\"%s\".\"%s\"', 'select')", nsp, tbl); + } + else + { + sprintf(query, "SELECT has_table_privilege((SELECT usesysid FROM pg_user WHERE usename = session_user), '\"%s\"', 'select')", tbl); + } + + POSTGIS_DEBUGF(4, "permission check sql query is: %s", query); + + SPIcode = SPI_exec(query, 1); + if (SPIcode != SPI_OK_SELECT) + { + elog(ERROR, "geometry_estimated_extent: couldn't execute permission check sql via SPI"); + SPI_finish(); + PG_RETURN_NULL(); + } + + tuptable = SPI_tuptable; + tupdesc = SPI_tuptable->tupdesc; + tuple = tuptable->vals[0]; + + if (!DatumGetBool(SPI_getbinval(tuple, tupdesc, 1, &isnull))) + { + elog(ERROR, "geometry_estimated_extent: permission denied for relation %s", tbl); + SPI_finish(); + PG_RETURN_NULL(); + } + + + /* Return the stats data */ + if ( txnsp ) + { + sprintf(query, + "SELECT s.stanumbers1[5:8], c.reltuples FROM pg_class c" + " LEFT OUTER JOIN pg_namespace n ON (n.oid = c.relnamespace)" + " LEFT OUTER JOIN pg_attribute a ON (a.attrelid = c.oid )" + " LEFT OUTER JOIN pg_statistic s ON (s.starelid = c.oid AND " + "s.staattnum = a.attnum )" + " WHERE c.relname = '%s' AND a.attname = '%s' " + " AND n.nspname = '%s';", + tbl, col, nsp); + } + else + { + sprintf(query, + "SELECT s.stanumbers1[5:8], c.reltuples FROM pg_class c" + " LEFT OUTER JOIN pg_namespace n ON (n.oid = c.relnamespace)" + " LEFT OUTER JOIN pg_attribute a ON (a.attrelid = c.oid )" + " LEFT OUTER JOIN pg_statistic s ON (s.starelid = c.oid AND " + "s.staattnum = a.attnum )" + " WHERE c.relname = '%s' AND a.attname = '%s' " + " AND n.nspname = current_schema();", + tbl, col); + } + + POSTGIS_DEBUGF(4, " query: %s", query); + + SPIcode = SPI_exec(query, 1); + if (SPIcode != SPI_OK_SELECT ) + { + elog(ERROR,"geometry_estimated_extent: couldnt execute sql via SPI"); + SPI_finish(); + PG_RETURN_NULL(); + } + if (SPI_processed != 1) + { + + POSTGIS_DEBUGF(3, " %d stat rows", SPI_processed); + + elog(ERROR, "Unexistent field \"%s\".\"%s\".\"%s\"", + ( nsp ? nsp : "" ), tbl, col); + + SPI_finish(); + PG_RETURN_NULL() ; + } + + tuptable = SPI_tuptable; + tupdesc = SPI_tuptable->tupdesc; + tuple = tuptable->vals[0]; + + /* Check if the table has zero rows first */ + binval = SPI_getbinval(tuple, tupdesc, 2, &isnull); + if (isnull) + { + + POSTGIS_DEBUG(3, " reltuples is NULL"); + + elog(ERROR, "geometry_estimated_extent: null reltuples for table"); + + SPI_finish(); + PG_RETURN_NULL(); + } + reltuples = DatumGetFloat4(binval); + if ( ! reltuples ) + { + POSTGIS_DEBUG(3, "table has estimated zero rows"); + + /* + * TODO: distinguish between empty and not analyzed ? + */ + elog(NOTICE, "\"%s\".\"%s\".\"%s\" is empty or not analyzed", + ( nsp ? nsp : "" ), tbl, col); + + SPI_finish(); + PG_RETURN_NULL(); + } + + binval = SPI_getbinval(tuple, tupdesc, 1, &isnull); + if (isnull) + { + + POSTGIS_DEBUG(3, " stats are NULL"); + + elog(ERROR, "geometry_estimated_extent: null statistics for table"); + + SPI_finish(); + PG_RETURN_NULL(); + } + array = DatumGetArrayTypeP(binval); + if ( ArrayGetNItems(ARR_NDIM(array), ARR_DIMS(array)) != 4 ) + { + elog(ERROR, " corrupted histogram"); + PG_RETURN_NULL(); + } + + POSTGIS_DEBUGF(3, " stats array has %d elems", ArrayGetNItems(ARR_NDIM(array), ARR_DIMS(array))); + + /* + * Construct GBOX. + * Must allocate this in upper executor context + * to keep it alive after SPI_finish(). + */ + box = SPI_palloc(sizeof(GBOX)); + FLAGS_SET_GEODETIC(box->flags, 0); + FLAGS_SET_Z(box->flags, 0); + FLAGS_SET_M(box->flags, 0); + + /* Construct the box */ + memcpy(&(geomstats.xmin), ARR_DATA_PTR(array), sizeof(float)*4); + box->xmin = geomstats.xmin; + box->xmax = geomstats.xmax; + box->ymin = geomstats.ymin; + box->ymax = geomstats.ymax; + + POSTGIS_DEBUGF(3, " histogram extent = %g %g, %g %g", box->xmin, + box->ymin, box->xmax, box->ymax); + + SPIcode = SPI_finish(); + if (SPIcode != SPI_OK_FINISH ) + { + elog(ERROR, "geometry_estimated_extent: couldn't disconnect from SPI"); + } + + /* TODO: enlarge the box by some factor */ + + PG_RETURN_POINTER(box); +} diff -Nru postgis-1.5.3/postgis/gserialized_gist_2d.c postgis-2.0.1/postgis/gserialized_gist_2d.c --- postgis-1.5.3/postgis/gserialized_gist_2d.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/postgis/gserialized_gist_2d.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,1387 @@ +/********************************************************************** + * $Id: gserialized_gist_2d.c 6519 2010-12-28 00:54:19Z pramsey $ + * + * PostGIS - Spatial Types for PostgreSQL + * Copyright 2009 Paul Ramsey + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +/* +** R-Tree Bibliography +** +** [1] A. Guttman. R-tree: a dynamic index structure for spatial searching. +** Proceedings of the ACM SIGMOD Conference, pp 47-57, June 1984. +** [2] C.-H. Ang and T. C. Tan. New linear node splitting algorithm for +** R-Trees. Advances in Spatial Databases - 5th International Symposium, +** 1997 +** [3] N. Beckmann, H.-P. Kriegel, R. Schneider, B. Seeger. The R*tree: an +** efficient and robust access method for points and rectangles. +** Proceedings of the ACM SIGMOD Conference. June 1990. +*/ + +#include "postgres.h" +#include "access/gist.h" /* For GiST */ +#include "access/itup.h" +#include "access/skey.h" + +#include "../postgis_config.h" + +#include "liblwgeom.h" /* For standard geometry types. */ +#include "lwgeom_pg.h" /* For debugging macros. */ +#include "gserialized_gist.h" /* For utility functions. */ +#include "liblwgeom_internal.h" /* For MAXFLOAT */ + +/* +** When is a node split not so good? If more than 90% of the entries +** end up in one of the children. +*/ +#define LIMIT_RATIO 0.1 + +/* +** For debugging +*/ +#if POSTGIS_DEBUG_LEVEL > 0 +static int g2d_counter_leaf = 0; +static int g2d_counter_internal = 0; +#endif + +/* +** GiST 2D key stubs +*/ +Datum box2df_out(PG_FUNCTION_ARGS); +Datum box2df_in(PG_FUNCTION_ARGS); + +/* +** GiST 2D index function prototypes +*/ +Datum gserialized_gist_consistent_2d(PG_FUNCTION_ARGS); +Datum gserialized_gist_compress_2d(PG_FUNCTION_ARGS); +Datum gserialized_gist_decompress_2d(PG_FUNCTION_ARGS); +Datum gserialized_gist_penalty_2d(PG_FUNCTION_ARGS); +Datum gserialized_gist_picksplit_2d(PG_FUNCTION_ARGS); +Datum gserialized_gist_union_2d(PG_FUNCTION_ARGS); +Datum gserialized_gist_same_2d(PG_FUNCTION_ARGS); +Datum gserialized_gist_distance_2d(PG_FUNCTION_ARGS); + +/* +** GiST 2D operator prototypes +*/ +Datum gserialized_same_2d(PG_FUNCTION_ARGS); +Datum gserialized_within_2d(PG_FUNCTION_ARGS); +Datum gserialized_contains_2d(PG_FUNCTION_ARGS); +Datum gserialized_overlaps_2d(PG_FUNCTION_ARGS); +Datum gserialized_left_2d(PG_FUNCTION_ARGS); +Datum gserialized_right_2d(PG_FUNCTION_ARGS); +Datum gserialized_above_2d(PG_FUNCTION_ARGS); +Datum gserialized_below_2d(PG_FUNCTION_ARGS); +Datum gserialized_overleft_2d(PG_FUNCTION_ARGS); +Datum gserialized_overright_2d(PG_FUNCTION_ARGS); +Datum gserialized_overabove_2d(PG_FUNCTION_ARGS); +Datum gserialized_overbelow_2d(PG_FUNCTION_ARGS); +Datum gserialized_distance_box_2d(PG_FUNCTION_ARGS); +Datum gserialized_distance_centroid_2d(PG_FUNCTION_ARGS); + +/* +** true/false test function type +*/ +typedef bool (*box2df_predicate)(const BOX2DF *a, const BOX2DF *b); + + +#if POSTGIS_DEBUG_LEVEL > 0 +static char* box2df_to_string(const BOX2DF *a) +{ + char *rv = NULL; + + if ( a == NULL ) + return pstrdup(""); + + rv = palloc(128); + sprintf(rv, "BOX2DF(%.12g %.12g, %.12g %.12g)", a->xmin, a->ymin, a->xmax, a->ymax); + return rv; +} +#endif + + +/* Allocate a new copy of BOX2DF */ +static BOX2DF* box2df_copy(BOX2DF *b) +{ + BOX2DF *c = (BOX2DF*)palloc(sizeof(BOX2DF)); + memcpy((void*)c, (void*)b, sizeof(BOX2DF)); + POSTGIS_DEBUGF(5, "copied box2df (%p) to box2df (%p)", b, c); + return c; +} + + + +/* Enlarge b_union to contain b_new. If b_new contains more + dimensions than b_union, expand b_union to contain those dimensions. */ +static void box2df_merge(BOX2DF *b_union, BOX2DF *b_new) +{ + + POSTGIS_DEBUGF(5, "merging %s with %s", box2df_to_string(b_union), box2df_to_string(b_new)); + /* Adjust minimums */ + b_union->xmin = Min(b_union->xmin, b_new->xmin); + b_union->ymin = Min(b_union->ymin, b_new->ymin); + /* Adjust maximums */ + b_union->xmax = Max(b_union->xmax, b_new->xmax); + b_union->ymax = Max(b_union->ymax, b_new->ymax); + + POSTGIS_DEBUGF(5, "merge complete %s", box2df_to_string(b_union)); + return; +} + + + +static bool box2df_intersection(const BOX2DF *a, const BOX2DF *b, BOX2DF *n) +{ + POSTGIS_DEBUGF(5, "calculating intersection of %s with %s", box2df_to_string(a), box2df_to_string(b)); + + if( a == NULL || b == NULL || n == NULL ) + return FALSE; + + n->xmax = Min(a->xmax, b->xmax); + n->ymax = Min(a->ymax, b->ymax); + n->xmin = Max(a->xmin, b->xmin); + n->ymin = Max(a->ymin, b->ymin); + + POSTGIS_DEBUGF(5, "intersection is %s", box2df_to_string(n)); + + if ( (n->xmax < n->xmin) || (n->ymax < n->ymin) ) + return FALSE; + + return TRUE; +} + +static float box2df_size(const BOX2DF *a) +{ + float result; + + if ( a == NULL ) + return (float)0.0; + + if ( (a->xmax <= a->xmin) || (a->ymax <= a->ymin) ) + { + result = (float) 0.0; + } + else + { + result = (((double) a->xmax)-((double) a->xmin)) * (((double) a->ymax)-((double) a->ymin)); + } + + return result; +} + +static float box2df_union_size(const BOX2DF *a, const BOX2DF *b) +{ + float result; + + POSTGIS_DEBUG(5,"entered function"); + + if ( a == NULL && b == NULL ) + { + elog(ERROR, "box2df_union_size received two null arguments"); + return 0.0; + } + + if ( a == NULL ) + return box2df_size(b); + + if ( b == NULL ) + return box2df_size(a); + + result = ((double)Max(a->xmax,b->xmax) - (double)Min(a->xmin,b->xmin)) * + ((double)Max(a->ymax,b->ymax) - (double)Min(a->ymin,b->ymin)); + + POSTGIS_DEBUGF(5, "union size of %s and %s is %.8g", box2df_to_string(a), box2df_to_string(b), result); + + return result; +} + + +/* Convert a double-based GBOX into a float-based BOX2DF, + ensuring the float box is larger than the double box */ +static inline int box2df_from_gbox_p(GBOX *box, BOX2DF *a) +{ + a->xmin = next_float_down(box->xmin); + a->xmax = next_float_up(box->xmax); + a->ymin = next_float_down(box->ymin); + a->ymax = next_float_up(box->ymax); + return LW_SUCCESS; +} + +/*********************************************************************** +** BOX3DF tests for 2D index operators. +*/ + +/* Ensure all minimums are below maximums. */ +static inline void box2df_validate(BOX2DF *b) +{ + float tmp; + POSTGIS_DEBUGF(5,"validating box2df (%s)", box2df_to_string(b)); + if ( b->xmax < b->xmin ) + { + tmp = b->xmin; + b->xmin = b->xmax; + b->xmax = tmp; + } + if ( b->ymax < b->ymin ) + { + tmp = b->ymin; + b->ymin = b->ymax; + b->ymax = tmp; + } + return; +} + +static bool box2df_overlaps(const BOX2DF *a, const BOX2DF *b) +{ + if ( ! a || ! b ) return FALSE; /* TODO: might be smarter for EMPTY */ + + if ( (a->xmin > b->xmax) || (b->xmin > a->xmax) || + (a->ymin > b->ymax) || (b->ymin > a->ymax) ) + { + return FALSE; + } + + return TRUE; +} + +static bool box2df_contains(const BOX2DF *a, const BOX2DF *b) +{ + if ( ! a || ! b ) return FALSE; /* TODO: might be smarter for EMPTY */ + + if ( (a->xmin > b->xmin) || (a->xmax < b->xmax) || + (a->ymin > b->ymin) || (a->ymax < b->ymax) ) + { + return FALSE; + } + + return TRUE; +} + +static bool box2df_within(const BOX2DF *a, const BOX2DF *b) +{ + if ( ! a || ! b ) return FALSE; /* TODO: might be smarter for EMPTY */ + + POSTGIS_DEBUG(5, "entered function"); + return box2df_contains(b,a); +} + +static bool box2df_equals(const BOX2DF *a, const BOX2DF *b) +{ + if ( a && b ) { + if ( (a->xmin != b->xmin) || (a->xmax != b->xmax) || + (a->ymin != b->ymin) || (a->ymax != b->ymax) ) + { + return FALSE; + } + return TRUE; + } else if ( a || b ) { + /* one empty, one not */ + return FALSE; + } else { + /* both empty */ + return TRUE; + } +} + +static bool box2df_overleft(const BOX2DF *a, const BOX2DF *b) +{ + if ( ! a || ! b ) return FALSE; /* TODO: might be smarter for EMPTY */ + + /* a.xmax <= b.xmax */ + return a->xmax <= b->xmax; +} + +static bool box2df_left(const BOX2DF *a, const BOX2DF *b) +{ + if ( ! a || ! b ) return FALSE; /* TODO: might be smarter for EMPTY */ + + /* a.xmax < b.xmin */ + return a->xmax < b->xmin; +} + +static bool box2df_right(const BOX2DF *a, const BOX2DF *b) +{ + if ( ! a || ! b ) return FALSE; /* TODO: might be smarter for EMPTY */ + + /* a.xmin > b.xmax */ + return a->xmin > b->xmax; +} + +static bool box2df_overright(const BOX2DF *a, const BOX2DF *b) +{ + if ( ! a || ! b ) return FALSE; /* TODO: might be smarter for EMPTY */ + + /* a.xmin >= b.xmin */ + return a->xmin >= b->xmin; +} + +static bool box2df_overbelow(const BOX2DF *a, const BOX2DF *b) +{ + if ( ! a || ! b ) return FALSE; /* TODO: might be smarter for EMPTY */ + + /* a.ymax <= b.ymax */ + return a->ymax <= b->ymax; +} + +static bool box2df_below(const BOX2DF *a, const BOX2DF *b) +{ + if ( ! a || ! b ) return FALSE; /* TODO: might be smarter for EMPTY */ + + /* a.ymax < b.ymin */ + return a->ymax < b->ymin; +} + +static bool box2df_above(const BOX2DF *a, const BOX2DF *b) +{ + if ( ! a || ! b ) return FALSE; /* TODO: might be smarter for EMPTY */ + + /* a.ymin > b.ymax */ + return a->ymin > b->ymax; +} + +static bool box2df_overabove(const BOX2DF *a, const BOX2DF *b) +{ + if ( ! a || ! b ) return FALSE; /* TODO: might be smarter for EMPTY */ + + /* a.ymin >= b.ymin */ + return a->ymin >= b->ymin; +} + +/** +* Calculate the centroid->centroid distance between the boxes. +* We return the square distance to avoid a call to sqrt. +*/ +static double box2df_distance_leaf_centroid(const BOX2DF *a, const BOX2DF *b) +{ + /* The centroid->centroid distance between the boxes */ + double a_x = (a->xmax + a->xmin) / 2.0; + double a_y = (a->ymax + a->ymin) / 2.0; + double b_x = (b->xmax + b->xmin) / 2.0; + double b_y = (b->ymax + b->ymin) / 2.0; + + /* This "distance" is only used for comparisons, */ + /* so for speed we drop contants and skip the sqrt step. */ + return sqrt((a_x - b_x) * (a_x - b_x) + (a_y - b_y) * (a_y - b_y)); +} + +/** +* Calculate the The node_box_edge->query_centroid distance +* between the boxes. +*/ +static double box2df_distance_node_centroid(const BOX2DF *node, const BOX2DF *query) +{ + BOX2DF q; + double qx, qy; + double d = 0.0; + + /* Turn query into point */ + q.xmin = q.xmax = (query->xmin + query->xmax) / 2.0; + q.ymin = q.ymax = (query->ymin + query->ymax) / 2.0; + qx = q.xmin; + qy = q.ymin; + + /* Check for overlap */ + if ( box2df_overlaps(node, &q) == LW_TRUE ) + return 0.0; + + /* Above or below */ + if ( qx >= node->xmin && qx <= node->xmax ) + { + if( qy > node->ymax ) + d = qy - node->ymax; + else if ( qy < node->ymin ) + d = node->ymin - qy; + return d; + } + /* Left or right */ + else if ( qy >= node->ymin && qy <= node->ymax ) + { + if ( qx > node->xmax ) + d = qx - node->xmax; + else if ( qx < node->xmin ) + d = node->xmin - qx; + return d; + } + /* Corner quadrants */ + else + { + /* below/left of xmin/ymin */ + if ( qx < node->xmin && qy < node->ymin ) + { + d = (node->xmin - qx) * (node->xmin - qx) + + (node->ymin - qy) * (node->ymin - qy); + } + /* above/left of xmin/ymax */ + else if ( qx < node->xmin && qy > node->ymax ) + { + d = (node->xmin - qx) * (node->xmin - qx) + + (node->ymax - qy) * (node->ymax - qy); + } + /* above/right of xmax/ymax */ + else if ( qx > node->xmax && qy > node->ymax ) + { + d = (node->xmax - qx) * (node->xmax - qx) + + (node->ymax - qy) * (node->ymax - qy); + } + /* below/right of xmax/ymin */ + else if ( qx > node->xmin && qy < node->ymin ) + { + d = (node->xmax - qx) * (node->xmax - qx) + + (node->ymin - qy) * (node->ymin - qy); + } + else + { + /*ERROR*/ + } + } + + return sqrt(d); +} + +/* Quick distance function */ +static inline double pt_distance(double ax, double ay, double bx, double by) +{ + return sqrt((ax - bx) * (ax - bx) + (ay - by) * (ay - by)); +} + +/** +* Calculate the box->box distance. +*/ +static double box2df_distance(const BOX2DF *a, const BOX2DF *b) +{ + /* Check for overlap */ + if ( box2df_overlaps(a, b) ) + return 0.0; + + if ( box2df_left(a, b) ) + { + if ( box2df_above(a, b) ) + return pt_distance(a->xmax, a->ymin, b->xmin, b->ymax); + if ( box2df_below(a, b) ) + return pt_distance(a->xmax, a->ymax, b->xmin, b->ymin); + else + return b->xmin - a->xmax; + } + if ( box2df_right(a, b) ) + { + if ( box2df_above(a, b) ) + return pt_distance(a->xmin, a->ymin, b->xmax, b->ymax); + if ( box2df_below(a, b) ) + return pt_distance(a->xmin, a->ymax, b->xmax, b->ymin); + else + return a->xmin - b->xmax; + } + if ( box2df_above(a, b) ) + { + if ( box2df_left(a, b) ) + return pt_distance(a->xmax, a->ymin, b->xmin, b->ymax); + if ( box2df_right(a, b) ) + return pt_distance(a->xmin, a->ymin, b->xmax, b->ymax); + else + return a->ymin - b->ymax; + } + if ( box2df_below(a, b) ) + { + if ( box2df_left(a, b) ) + return pt_distance(a->xmax, a->ymax, b->xmin, b->ymin); + if ( box2df_right(a, b) ) + return pt_distance(a->xmin, a->ymax, b->xmax, b->ymin); + else + return b->ymin - a->ymax; + } + + return MAXFLOAT; +} + + +/** +* Peak into a #GSERIALIZED datum to find the bounding box. If the +* box is there, copy it out and return it. If not, calculate the box from the +* full object and return the box based on that. If no box is available, +* return #LW_FAILURE, otherwise #LW_SUCCESS. +*/ +static int +gserialized_datum_get_box2df_p(Datum gsdatum, BOX2DF *box2df) +{ + GSERIALIZED *gpart; + uint8_t flags; + int result = LW_SUCCESS; + + POSTGIS_DEBUG(4, "entered function"); + + /* + ** The most info we need is the 8 bytes of serialized header plus the + ** of floats necessary to hold the bounding box. + */ + gpart = (GSERIALIZED*)PG_DETOAST_DATUM_SLICE(gsdatum, 0, 8 + sizeof(BOX2DF)); + flags = gpart->flags; + + POSTGIS_DEBUGF(4, "got flags %d", gpart->flags); + + /* Do we even have a serialized bounding box? */ + if ( FLAGS_GET_BBOX(flags) ) + { + /* Yes! Copy it out into the box! */ + POSTGIS_DEBUG(4, "copying box out of serialization"); + memcpy(box2df, gpart->data, sizeof(BOX2DF)); + result = LW_SUCCESS; + } + else + { + /* No, we need to calculate it from the full object. */ + GBOX gbox; + GSERIALIZED *g = (GSERIALIZED*)PG_DETOAST_DATUM(gsdatum); + LWGEOM *lwgeom = lwgeom_from_gserialized(g); + if ( lwgeom_calculate_gbox(lwgeom, &gbox) == LW_FAILURE ) + { + POSTGIS_DEBUG(4, "could not calculate bbox, returning failure"); + lwgeom_free(lwgeom); + return LW_FAILURE; + } + lwgeom_free(lwgeom); + result = box2df_from_gbox_p(&gbox, box2df); + } + + if ( result == LW_SUCCESS ) + { + POSTGIS_DEBUGF(4, "got box2df %s", box2df_to_string(box2df)); + } + + return result; +} + + +/** +* Support function. Based on two datums return true if +* they satisfy the predicate and false otherwise. +*/ +static int +gserialized_datum_predicate_2d(Datum gs1, Datum gs2, box2df_predicate predicate) +{ + BOX2DF b1, b2, *br1=NULL, *br2=NULL; + POSTGIS_DEBUG(3, "entered function"); + + if (gserialized_datum_get_box2df_p(gs1, &b1) == LW_SUCCESS) br1 = &b1; + if (gserialized_datum_get_box2df_p(gs2, &b2) == LW_SUCCESS) br2 = &b2; + + if ( predicate(br1, br2) ) + { + POSTGIS_DEBUGF(3, "got boxes %s and %s", br1 ? box2df_to_string(&b1) : "(null)", br2 ? box2df_to_string(&b2) : "(null)"); + return LW_TRUE; + } + return LW_FALSE; +} + + + + +/*********************************************************************** +* GiST 2-D Index Operator Functions +*/ + +PG_FUNCTION_INFO_V1(gserialized_distance_centroid_2d); +Datum gserialized_distance_centroid_2d(PG_FUNCTION_ARGS) +{ + BOX2DF b1, b2; + Datum gs1 = PG_GETARG_DATUM(0); + Datum gs2 = PG_GETARG_DATUM(1); + + POSTGIS_DEBUG(3, "entered function"); + + /* Must be able to build box for each argument (ie, not empty geometry). */ + if ( (gserialized_datum_get_box2df_p(gs1, &b1) == LW_SUCCESS) && + (gserialized_datum_get_box2df_p(gs2, &b2) == LW_SUCCESS) ) + { + double distance = box2df_distance_leaf_centroid(&b1, &b2); + POSTGIS_DEBUGF(3, "got boxes %s and %s", box2df_to_string(&b1), box2df_to_string(&b2)); + PG_RETURN_FLOAT8(distance); + } + PG_RETURN_FLOAT8(MAXFLOAT); +} + +PG_FUNCTION_INFO_V1(gserialized_distance_box_2d); +Datum gserialized_distance_box_2d(PG_FUNCTION_ARGS) +{ + BOX2DF b1, b2; + Datum gs1 = PG_GETARG_DATUM(0); + Datum gs2 = PG_GETARG_DATUM(1); + + POSTGIS_DEBUG(3, "entered function"); + + /* Must be able to build box for each argument (ie, not empty geometry). */ + if ( (gserialized_datum_get_box2df_p(gs1, &b1) == LW_SUCCESS) && + (gserialized_datum_get_box2df_p(gs2, &b2) == LW_SUCCESS) ) + { + double distance = box2df_distance(&b1, &b2); + POSTGIS_DEBUGF(3, "got boxes %s and %s", box2df_to_string(&b1), box2df_to_string(&b2)); + PG_RETURN_FLOAT8(distance); + } + PG_RETURN_FLOAT8(MAXFLOAT); +} + +PG_FUNCTION_INFO_V1(gserialized_same_2d); +Datum gserialized_same_2d(PG_FUNCTION_ARGS) +{ + if ( gserialized_datum_predicate_2d(PG_GETARG_DATUM(0), PG_GETARG_DATUM(1), box2df_equals) == LW_TRUE ) + PG_RETURN_BOOL(TRUE); + + PG_RETURN_BOOL(FALSE); +} + +PG_FUNCTION_INFO_V1(gserialized_within_2d); +Datum gserialized_within_2d(PG_FUNCTION_ARGS) +{ + POSTGIS_DEBUG(3, "entered function"); + if ( gserialized_datum_predicate_2d(PG_GETARG_DATUM(0), PG_GETARG_DATUM(1), box2df_within) == LW_TRUE ) + PG_RETURN_BOOL(TRUE); + + PG_RETURN_BOOL(FALSE); +} + +PG_FUNCTION_INFO_V1(gserialized_contains_2d); +Datum gserialized_contains_2d(PG_FUNCTION_ARGS) +{ + POSTGIS_DEBUG(3, "entered function"); + if ( gserialized_datum_predicate_2d(PG_GETARG_DATUM(0), PG_GETARG_DATUM(1), box2df_contains) == LW_TRUE ) + PG_RETURN_BOOL(TRUE); + + PG_RETURN_BOOL(FALSE); +} + +PG_FUNCTION_INFO_V1(gserialized_overlaps_2d); +Datum gserialized_overlaps_2d(PG_FUNCTION_ARGS) +{ + if ( gserialized_datum_predicate_2d(PG_GETARG_DATUM(0), PG_GETARG_DATUM(1), box2df_overlaps) == LW_TRUE ) + PG_RETURN_BOOL(TRUE); + + PG_RETURN_BOOL(FALSE); +} + +PG_FUNCTION_INFO_V1(gserialized_left_2d); +Datum gserialized_left_2d(PG_FUNCTION_ARGS) +{ + if ( gserialized_datum_predicate_2d(PG_GETARG_DATUM(0), PG_GETARG_DATUM(1), box2df_left) == LW_TRUE ) + PG_RETURN_BOOL(TRUE); + + PG_RETURN_BOOL(FALSE); +} + +PG_FUNCTION_INFO_V1(gserialized_right_2d); +Datum gserialized_right_2d(PG_FUNCTION_ARGS) +{ + if ( gserialized_datum_predicate_2d(PG_GETARG_DATUM(0), PG_GETARG_DATUM(1), box2df_right) == LW_TRUE ) + PG_RETURN_BOOL(TRUE); + + PG_RETURN_BOOL(FALSE); +} + +PG_FUNCTION_INFO_V1(gserialized_above_2d); +Datum gserialized_above_2d(PG_FUNCTION_ARGS) +{ + if ( gserialized_datum_predicate_2d(PG_GETARG_DATUM(0), PG_GETARG_DATUM(1), box2df_above) == LW_TRUE ) + PG_RETURN_BOOL(TRUE); + + PG_RETURN_BOOL(FALSE); +} + +PG_FUNCTION_INFO_V1(gserialized_below_2d); +Datum gserialized_below_2d(PG_FUNCTION_ARGS) +{ + if ( gserialized_datum_predicate_2d(PG_GETARG_DATUM(0), PG_GETARG_DATUM(1), box2df_below) == LW_TRUE ) + PG_RETURN_BOOL(TRUE); + + PG_RETURN_BOOL(FALSE); +} + +PG_FUNCTION_INFO_V1(gserialized_overleft_2d); +Datum gserialized_overleft_2d(PG_FUNCTION_ARGS) +{ + if ( gserialized_datum_predicate_2d(PG_GETARG_DATUM(0), PG_GETARG_DATUM(1), box2df_overleft) == LW_TRUE ) + PG_RETURN_BOOL(TRUE); + + PG_RETURN_BOOL(FALSE); +} + +PG_FUNCTION_INFO_V1(gserialized_overright_2d); +Datum gserialized_overright_2d(PG_FUNCTION_ARGS) +{ + if ( gserialized_datum_predicate_2d(PG_GETARG_DATUM(0), PG_GETARG_DATUM(1), box2df_overright) == LW_TRUE ) + PG_RETURN_BOOL(TRUE); + + PG_RETURN_BOOL(FALSE); +} + +PG_FUNCTION_INFO_V1(gserialized_overabove_2d); +Datum gserialized_overabove_2d(PG_FUNCTION_ARGS) +{ + if ( gserialized_datum_predicate_2d(PG_GETARG_DATUM(0), PG_GETARG_DATUM(1), box2df_overabove) == LW_TRUE ) + PG_RETURN_BOOL(TRUE); + + PG_RETURN_BOOL(FALSE); +} + +PG_FUNCTION_INFO_V1(gserialized_overbelow_2d); +Datum gserialized_overbelow_2d(PG_FUNCTION_ARGS) +{ + if ( gserialized_datum_predicate_2d(PG_GETARG_DATUM(0), PG_GETARG_DATUM(1), box2df_overbelow) == LW_TRUE ) + PG_RETURN_BOOL(TRUE); + + PG_RETURN_BOOL(FALSE); +} + + +/*********************************************************************** +* GiST Index Support Functions +*/ + +/* +** GiST support function. Given a geography, return a "compressed" +** version. In this case, we convert the geography into a geocentric +** bounding box. If the geography already has the box embedded in it +** we pull that out and hand it back. +*/ +PG_FUNCTION_INFO_V1(gserialized_gist_compress_2d); +Datum gserialized_gist_compress_2d(PG_FUNCTION_ARGS) +{ + GISTENTRY *entry_in = (GISTENTRY*)PG_GETARG_POINTER(0); + GISTENTRY *entry_out = NULL; + BOX2DF bbox_out; + int result = LW_SUCCESS; + + POSTGIS_DEBUG(4, "[GIST] 'compress' function called"); + + /* + ** Not a leaf key? There's nothing to do. + ** Return the input unchanged. + */ + if ( ! entry_in->leafkey ) + { + POSTGIS_DEBUG(4, "[GIST] non-leafkey entry, returning input unaltered"); + PG_RETURN_POINTER(entry_in); + } + + POSTGIS_DEBUG(4, "[GIST] processing leafkey input"); + entry_out = palloc(sizeof(GISTENTRY)); + + /* + ** Null key? Make a copy of the input entry and + ** return. + */ + if ( DatumGetPointer(entry_in->key) == NULL ) + { + POSTGIS_DEBUG(4, "[GIST] leafkey is null"); + gistentryinit(*entry_out, (Datum) 0, entry_in->rel, + entry_in->page, entry_in->offset, FALSE); + POSTGIS_DEBUG(4, "[GIST] returning copy of input"); + PG_RETURN_POINTER(entry_out); + } + + /* Extract our index key from the GiST entry. */ + result = gserialized_datum_get_box2df_p(entry_in->key, &bbox_out); + + /* Is the bounding box valid (non-empty, non-infinite)? If not, return input uncompressed. */ + if ( result == LW_FAILURE ) + { + POSTGIS_DEBUG(4, "[GIST] empty geometry!"); + PG_RETURN_POINTER(entry_in); + } + + POSTGIS_DEBUGF(4, "[GIST] got entry_in->key: %s", box2df_to_string(&bbox_out)); + + /* Check all the dimensions for finite values */ + if ( ! finite(bbox_out.xmax) || ! finite(bbox_out.xmin) || + ! finite(bbox_out.ymax) || ! finite(bbox_out.ymin) ) + { + POSTGIS_DEBUG(4, "[GIST] infinite geometry!"); + PG_RETURN_POINTER(entry_in); + } + + /* Enure bounding box has minimums below maximums. */ + box2df_validate(&bbox_out); + + /* Prepare GISTENTRY for return. */ + gistentryinit(*entry_out, PointerGetDatum(box2df_copy(&bbox_out)), + entry_in->rel, entry_in->page, entry_in->offset, FALSE); + + /* Return GISTENTRY. */ + POSTGIS_DEBUG(4, "[GIST] 'compress' function complete"); + PG_RETURN_POINTER(entry_out); +} + + +/* +** GiST support function. +** Decompress an entry. Unused for geography, so we return. +*/ +PG_FUNCTION_INFO_V1(gserialized_gist_decompress_2d); +Datum gserialized_gist_decompress_2d(PG_FUNCTION_ARGS) +{ + POSTGIS_DEBUG(5, "[GIST] 'decompress' function called"); + /* We don't decompress. Just return the input. */ + PG_RETURN_POINTER(PG_GETARG_POINTER(0)); +} + + + +/* +** GiST support function. Called from gserialized_gist_consistent below. +*/ +static inline bool gserialized_gist_consistent_leaf_2d(BOX2DF *key, BOX2DF *query, StrategyNumber strategy) +{ + bool retval; + + POSTGIS_DEBUGF(4, "[GIST] leaf consistent, strategy [%d], count[%i]", + strategy, g2d_counter_leaf++); + + switch (strategy) + { + case RTOverlapStrategyNumber: + retval = (bool) box2df_overlaps(key, query); + break; + case RTSameStrategyNumber: + retval = (bool) box2df_equals(key, query); + break; + case RTContainsStrategyNumber: + case RTOldContainsStrategyNumber: + retval = (bool) box2df_contains(key, query); + break; + case RTContainedByStrategyNumber: + case RTOldContainedByStrategyNumber: + retval = (bool) box2df_contains(query, key); + break; + default: + retval = FALSE; + } + + return (retval); +} + +/* +** GiST support function. Called from gserialized_gist_consistent below. +*/ +static inline bool gserialized_gist_consistent_internal_2d(BOX2DF *key, BOX2DF *query, StrategyNumber strategy) +{ + bool retval; + + POSTGIS_DEBUGF(4, "[GIST] internal consistent, strategy [%d], count[%i], query[%s], key[%s]", + strategy, g2d_counter_internal++, box2df_to_string(query), box2df_to_string(key) ); + + switch (strategy) + { + case RTOverlapStrategyNumber: + retval = (bool) box2df_overlaps(key, query); + break; + case RTSameStrategyNumber: + case RTContainsStrategyNumber: + case RTOldContainsStrategyNumber: + retval = (bool) box2df_contains(key, query); + break; + case RTContainedByStrategyNumber: + case RTOldContainedByStrategyNumber: + retval = (bool) box2df_overlaps(key, query); + break; + default: + retval = FALSE; + } + + return (retval); +} + +/* +** GiST support function. Take in a query and an entry and see what the +** relationship is, based on the query strategy. +*/ +PG_FUNCTION_INFO_V1(gserialized_gist_consistent_2d); +Datum gserialized_gist_consistent_2d(PG_FUNCTION_ARGS) +{ + GISTENTRY *entry = (GISTENTRY*) PG_GETARG_POINTER(0); + StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2); + bool result; + BOX2DF query_gbox_index; + +#if POSTGIS_PGSQL_VERSION >= 84 + /* PostgreSQL 8.4 and later require the RECHECK flag to be set here, + rather than being supplied as part of the operator class definition */ + bool *recheck = (bool *) PG_GETARG_POINTER(4); + + /* We set recheck to false to avoid repeatedly pulling every "possibly matched" geometry + out during index scans. For cases when the geometries are large, rechecking + can make things twice as slow. */ + *recheck = false; +#endif + + POSTGIS_DEBUG(4, "[GIST] 'consistent' function called"); + + /* Quick sanity check on query argument. */ + if ( DatumGetPointer(PG_GETARG_DATUM(1)) == NULL ) + { + POSTGIS_DEBUG(4, "[GIST] null query pointer (!?!), returning false"); + PG_RETURN_BOOL(FALSE); /* NULL query! This is screwy! */ + } + + /* Quick sanity check on entry key. */ + if ( DatumGetPointer(entry->key) == NULL ) + { + POSTGIS_DEBUG(4, "[GIST] null index entry, returning false"); + PG_RETURN_BOOL(FALSE); /* NULL entry! */ + } + + /* Null box should never make this far. */ + if ( gserialized_datum_get_box2df_p(PG_GETARG_DATUM(1), &query_gbox_index) == LW_FAILURE ) + { + POSTGIS_DEBUG(4, "[GIST] null query_gbox_index!"); + PG_RETURN_BOOL(FALSE); + } + + /* Treat leaf node tests different from internal nodes */ + if (GIST_LEAF(entry)) + { + result = gserialized_gist_consistent_leaf_2d( + (BOX2DF*)DatumGetPointer(entry->key), + &query_gbox_index, strategy); + } + else + { + result = gserialized_gist_consistent_internal_2d( + (BOX2DF*)DatumGetPointer(entry->key), + &query_gbox_index, strategy); + } + + PG_RETURN_BOOL(result); +} + + +/* +** GiST support function. Take in a query and an entry and return the "distance" +** between them. +** +** Given an index entry p and a query value q, this function determines the +** index entry's "distance" from the query value. This function must be +** supplied if the operator class contains any ordering operators. A query +** using the ordering operator will be implemented by returning index entries +** with the smallest "distance" values first, so the results must be consistent +** with the operator's semantics. For a leaf index entry the result just +** represents the distance to the index entry; for an internal tree node, the +** result must be the smallest distance that any child entry could have. +** +** Strategy 13 = centroid-based distance tests +** Strategy 14 = box-based distance tests +*/ +PG_FUNCTION_INFO_V1(gserialized_gist_distance_2d); +Datum gserialized_gist_distance_2d(PG_FUNCTION_ARGS) +{ + GISTENTRY *entry = (GISTENTRY*) PG_GETARG_POINTER(0); + BOX2DF query_box; + BOX2DF *entry_box; + StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2); + double distance; + + POSTGIS_DEBUG(4, "[GIST] 'distance' function called"); + + /* We are using '13' as the gist distance-betweeen-centroids strategy number + * and '14' as the gist distance-between-boxes strategy number */ + if ( strategy != 13 && strategy != 14 ) { + elog(ERROR, "unrecognized strategy number: %d", strategy); + PG_RETURN_FLOAT8(MAXFLOAT); + } + + /* Null box should never make this far. */ + if ( gserialized_datum_get_box2df_p(PG_GETARG_DATUM(1), &query_box) == LW_FAILURE ) + { + POSTGIS_DEBUG(4, "[GIST] null query_gbox_index!"); + PG_RETURN_FLOAT8(MAXFLOAT); + } + + /* Get the entry box */ + entry_box = (BOX2DF*)DatumGetPointer(entry->key); + + /* Box-style distance test */ + if ( strategy == 14 ) + { + distance = (double)box2df_distance(entry_box, &query_box); + PG_RETURN_FLOAT8(distance); + } + + /* Treat leaf node tests different from internal nodes */ + if (GIST_LEAF(entry)) + { + /* Calculate distance to leaves */ + distance = (double)box2df_distance_leaf_centroid(entry_box, &query_box); + } + else + { + /* Calculate distance for internal nodes */ + distance = (double)box2df_distance_node_centroid(entry_box, &query_box); + } + + PG_RETURN_FLOAT8(distance); +} + +/* +** GiST support function. Calculate the "penalty" cost of adding this entry into an existing entry. +** Calculate the change in volume of the old entry once the new entry is added. +** TODO: Re-evaluate this in light of R*Tree penalty approaches. +*/ +PG_FUNCTION_INFO_V1(gserialized_gist_penalty_2d); +Datum gserialized_gist_penalty_2d(PG_FUNCTION_ARGS) +{ + GISTENTRY *origentry = (GISTENTRY*) PG_GETARG_POINTER(0); + GISTENTRY *newentry = (GISTENTRY*) PG_GETARG_POINTER(1); + float *result = (float*) PG_GETARG_POINTER(2); + BOX2DF *gbox_index_orig, *gbox_index_new; + float size_union, size_orig; + + POSTGIS_DEBUG(4, "[GIST] 'penalty' function called"); + + gbox_index_orig = (BOX2DF*)DatumGetPointer(origentry->key); + gbox_index_new = (BOX2DF*)DatumGetPointer(newentry->key); + + /* Drop out if we're dealing with null inputs. Shouldn't happen. */ + if ( (gbox_index_orig == NULL) && (gbox_index_new == NULL) ) + { + POSTGIS_DEBUG(4, "[GIST] both inputs NULL! returning penalty of zero"); + *result = 0.0; + PG_RETURN_FLOAT8(*result); + } + + /* Calculate the size difference of the boxes. */ + size_union = box2df_union_size(gbox_index_orig, gbox_index_new); + size_orig = box2df_size(gbox_index_orig); + *result = size_union - size_orig; + + POSTGIS_DEBUGF(4, "[GIST] 'penalty', union size (%.12f), original size (%.12f), penalty (%.12f)", size_union, size_orig, *result); + + PG_RETURN_POINTER(result); +} + +/* +** GiST support function. Merge all the boxes in a page into one master box. +*/ +PG_FUNCTION_INFO_V1(gserialized_gist_union_2d); +Datum gserialized_gist_union_2d(PG_FUNCTION_ARGS) +{ + GistEntryVector *entryvec = (GistEntryVector *) PG_GETARG_POINTER(0); + int *sizep = (int *) PG_GETARG_POINTER(1); /* Size of the return value */ + int numranges, i; + BOX2DF *box_cur, *box_union; + + POSTGIS_DEBUG(4, "[GIST] 'union' function called"); + + numranges = entryvec->n; + + box_cur = (BOX2DF*) DatumGetPointer(entryvec->vector[0].key); + + box_union = box2df_copy(box_cur); + + for ( i = 1; i < numranges; i++ ) + { + box_cur = (BOX2DF*) DatumGetPointer(entryvec->vector[i].key); + box2df_merge(box_union, box_cur); + } + + *sizep = sizeof(BOX2DF); + + POSTGIS_DEBUGF(4, "[GIST] 'union', numranges(%i), pageunion %s", numranges, box2df_to_string(box_union)); + + PG_RETURN_POINTER(box_union); + +} + +/* +** GiST support function. Test equality of keys. +*/ +PG_FUNCTION_INFO_V1(gserialized_gist_same_2d); +Datum gserialized_gist_same_2d(PG_FUNCTION_ARGS) +{ + BOX2DF *b1 = (BOX2DF*)PG_GETARG_POINTER(0); + BOX2DF *b2 = (BOX2DF*)PG_GETARG_POINTER(1); + bool *result = (bool*)PG_GETARG_POINTER(2); + + POSTGIS_DEBUG(4, "[GIST] 'same' function called"); + + *result = box2df_equals(b1, b2); + + PG_RETURN_POINTER(result); +} + +typedef struct +{ + BOX2DF *key; + int pos; +} +KBsort; + +static int +compare_KB(const void* a, const void* b) +{ + BOX2DF *abox = ((KBsort*)a)->key; + BOX2DF *bbox = ((KBsort*)b)->key; + float sa = (abox->xmax - abox->xmin) * (abox->ymax - abox->ymin); + float sb = (bbox->xmax - bbox->xmin) * (bbox->ymax - bbox->ymin); + + if ( sa==sb ) return 0; + return ( sa>sb ) ? 1 : -1; +} + +/** +** The GiST PickSplit method +** New linear algorithm, see 'New Linear Node Splitting Algorithm for R-tree', +** C.H.Ang and T.C.Tan +*/ +PG_FUNCTION_INFO_V1(gserialized_gist_picksplit_2d); +Datum gserialized_gist_picksplit_2d(PG_FUNCTION_ARGS) +{ + GistEntryVector *entryvec = (GistEntryVector *) PG_GETARG_POINTER(0); + + GIST_SPLITVEC *v = (GIST_SPLITVEC *) PG_GETARG_POINTER(1); + OffsetNumber i; + OffsetNumber *listL, *listR, *listB, *listT; + BOX2DF *unionL, *unionR, *unionB, *unionT; + int posL, posR, posB, posT; + BOX2DF pageunion; + BOX2DF *cur; + char direction = ' '; + bool allisequal = true; + OffsetNumber maxoff; + int nbytes; + + POSTGIS_DEBUG(3, "[GIST] 'picksplit' entered"); + + posL = posR = posB = posT = 0; + + maxoff = entryvec->n - 1; + cur = (BOX2DF*) DatumGetPointer(entryvec->vector[FirstOffsetNumber].key); + + memcpy((void *) &pageunion, (void *) cur, sizeof(BOX2DF)); + + /* find MBR */ + for (i = OffsetNumberNext(FirstOffsetNumber); i <= maxoff; i = OffsetNumberNext(i)) + { + cur = (BOX2DF *) DatumGetPointer(entryvec->vector[i].key); + + if ( allisequal == true && ( + pageunion.xmax != cur->xmax || + pageunion.ymax != cur->ymax || + pageunion.xmin != cur->xmin || + pageunion.ymin != cur->ymin + ) ) + allisequal = false; + + if (pageunion.xmax < cur->xmax) + pageunion.xmax = cur->xmax; + if (pageunion.xmin > cur->xmin) + pageunion.xmin = cur->xmin; + if (pageunion.ymax < cur->ymax) + pageunion.ymax = cur->ymax; + if (pageunion.ymin > cur->ymin) + pageunion.ymin = cur->ymin; + } + + POSTGIS_DEBUGF(4, "pageunion is %s", box2df_to_string(&pageunion)); + + nbytes = (maxoff + 2) * sizeof(OffsetNumber); + listL = (OffsetNumber *) palloc(nbytes); + listR = (OffsetNumber *) palloc(nbytes); + unionL = (BOX2DF *) palloc(sizeof(BOX2DF)); + unionR = (BOX2DF *) palloc(sizeof(BOX2DF)); + + if (allisequal) + { + POSTGIS_DEBUG(4, " AllIsEqual!"); + + cur = (BOX2DF*) DatumGetPointer(entryvec->vector[OffsetNumberNext(FirstOffsetNumber)].key); + + + if (memcmp((void *) cur, (void *) &pageunion, sizeof(BOX2DF)) == 0) + { + v->spl_left = listL; + v->spl_right = listR; + v->spl_nleft = v->spl_nright = 0; + memcpy((void *) unionL, (void *) &pageunion, sizeof(BOX2DF)); + memcpy((void *) unionR, (void *) &pageunion, sizeof(BOX2DF)); + + for (i = FirstOffsetNumber; i <= maxoff; i = OffsetNumberNext(i)) + { + if (i <= (maxoff - FirstOffsetNumber + 1) / 2) + { + v->spl_left[v->spl_nleft] = i; + v->spl_nleft++; + } + else + { + v->spl_right[v->spl_nright] = i; + v->spl_nright++; + } + } + v->spl_ldatum = PointerGetDatum(unionL); + v->spl_rdatum = PointerGetDatum(unionR); + + PG_RETURN_POINTER(v); + } + } + + listB = (OffsetNumber *) palloc(nbytes); + listT = (OffsetNumber *) palloc(nbytes); + unionB = (BOX2DF *) palloc(sizeof(BOX2DF)); + unionT = (BOX2DF *) palloc(sizeof(BOX2DF)); + +#define ADDLIST( list, unionD, pos, num ) do { \ + if ( pos ) { \ + if ( unionD->xmax < cur->xmax ) unionD->xmax = cur->xmax; \ + if ( unionD->xmin > cur->xmin ) unionD->xmin = cur->xmin; \ + if ( unionD->ymax < cur->ymax ) unionD->ymax = cur->ymax; \ + if ( unionD->ymin > cur->ymin ) unionD->ymin = cur->ymin; \ + } else { \ + memcpy( (void*)unionD, (void*) cur, sizeof( BOX2DF ) ); \ + } \ + list[pos] = num; \ + (pos)++; \ +} while(0) + + for (i = FirstOffsetNumber; i <= maxoff; i = OffsetNumberNext(i)) + { + cur = (BOX2DF*) DatumGetPointer(entryvec->vector[i].key); + + if (cur->xmin - pageunion.xmin < pageunion.xmax - cur->xmax) + ADDLIST(listL, unionL, posL,i); + else + ADDLIST(listR, unionR, posR,i); + if (cur->ymin - pageunion.ymin < pageunion.ymax - cur->ymax) + ADDLIST(listB, unionB, posB,i); + else + ADDLIST(listT, unionT, posT,i); + } + + POSTGIS_DEBUGF(4, "unionL is %s", box2df_to_string(unionL)); + POSTGIS_DEBUGF(4, "unionR is %s", box2df_to_string(unionR)); + POSTGIS_DEBUGF(4, "unionT is %s", box2df_to_string(unionT)); + POSTGIS_DEBUGF(4, "unionB is %s", box2df_to_string(unionB)); + + /* bad disposition, sort by ascending and resplit */ + if ( (posR==0 || posL==0) && (posT==0 || posB==0) ) + { + KBsort *arr = (KBsort*)palloc( sizeof(KBsort) * maxoff ); + posL = posR = posB = posT = 0; + for (i = FirstOffsetNumber; i <= maxoff; i = OffsetNumberNext(i)) + { + arr[i-1].key = (BOX2DF*) DatumGetPointer(entryvec->vector[i].key); + arr[i-1].pos = i; + } + qsort( arr, maxoff, sizeof(KBsort), compare_KB ); + for (i = FirstOffsetNumber; i <= maxoff; i = OffsetNumberNext(i)) + { + cur = arr[i-1].key; + if (cur->xmin - pageunion.xmin < pageunion.xmax - cur->xmax) + ADDLIST(listL, unionL, posL,arr[i-1].pos); + else if ( cur->xmin - pageunion.xmin == pageunion.xmax - cur->xmax ) + { + if ( posL>posR ) + ADDLIST(listR, unionR, posR,arr[i-1].pos); + else + ADDLIST(listL, unionL, posL,arr[i-1].pos); + } + else + ADDLIST(listR, unionR, posR,arr[i-1].pos); + + if (cur->ymin - pageunion.ymin < pageunion.ymax - cur->ymax) + ADDLIST(listB, unionB, posB,arr[i-1].pos); + else if ( cur->ymin - pageunion.ymin == pageunion.ymax - cur->ymax ) + { + if ( posB>posT ) + ADDLIST(listT, unionT, posT,arr[i-1].pos); + else + ADDLIST(listB, unionB, posB,arr[i-1].pos); + } + else + ADDLIST(listT, unionT, posT,arr[i-1].pos); + } + pfree(arr); + } + + /* which split more optimal? */ + if (Max(posL, posR) < Max(posB, posT)) + direction = 'x'; + else if (Max(posL, posR) > Max(posB, posT)) + direction = 'y'; + else + { + float sizeLR, sizeBT; + BOX2DF interLR, interBT; + + if ( box2df_intersection(unionL, unionR, &interLR) == FALSE ) + sizeLR = 0.0; + else + sizeLR = box2df_size(&interLR); + + if ( box2df_intersection(unionB, unionT, &interBT) == FALSE ) + sizeBT = 0.0; + else + sizeBT = box2df_size(&interBT); + + if (sizeLR < sizeBT) + direction = 'x'; + else + direction = 'y'; + } + + POSTGIS_DEBUGF(4, "split direction '%c'", direction); + + if (direction == 'x') + { + pfree(unionB); + pfree(listB); + pfree(unionT); + pfree(listT); + + v->spl_left = listL; + v->spl_right = listR; + v->spl_nleft = posL; + v->spl_nright = posR; + v->spl_ldatum = PointerGetDatum(unionL); + v->spl_rdatum = PointerGetDatum(unionR); + } + else + { + pfree(unionR); + pfree(listR); + pfree(unionL); + pfree(listL); + + v->spl_left = listB; + v->spl_right = listT; + v->spl_nleft = posB; + v->spl_nright = posT; + v->spl_ldatum = PointerGetDatum(unionB); + v->spl_rdatum = PointerGetDatum(unionT); + } + + POSTGIS_DEBUG(4, "[GIST] 'picksplit' completed"); + + PG_RETURN_POINTER(v); +} + + +/* +** The BOX32DF key must be defined as a PostgreSQL type, even though it is only +** ever used internally. These no-op stubs are used to bind the type. +*/ +PG_FUNCTION_INFO_V1(box2df_in); +Datum box2df_in(PG_FUNCTION_ARGS) +{ + ereport(ERROR,(errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg("function box2df_in not implemented"))); + PG_RETURN_POINTER(NULL); +} + +PG_FUNCTION_INFO_V1(box2df_out); +Datum box2df_out(PG_FUNCTION_ARGS) +{ + ereport(ERROR,(errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg("function box2df_out not implemented"))); + PG_RETURN_POINTER(NULL); +} diff -Nru postgis-1.5.3/postgis/gserialized_gist_nd.c postgis-2.0.1/postgis/gserialized_gist_nd.c --- postgis-1.5.3/postgis/gserialized_gist_nd.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/postgis/gserialized_gist_nd.c 2012-03-29 12:37:42.000000000 +0000 @@ -0,0 +1,1282 @@ +/********************************************************************** + * $Id: gserialized_gist_nd.c 6519 2010-12-28 00:54:19Z pramsey $ + * + * PostGIS - Spatial Types for PostgreSQL + * Copyright 2009 Paul Ramsey + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +/* +** R-Tree Bibliography +** +** [1] A. Guttman. R-tree: a dynamic index structure for spatial searching. +** Proceedings of the ACM SIGMOD Conference, pp 47-57, June 1984. +** [2] C.-H. Ang and T. C. Tan. New linear node splitting algorithm for +** R-Trees. Advances in Spatial Databases - 5th International Symposium, +** 1997 +** [3] N. Beckmann, H.-P. Kriegel, R. Schneider, B. Seeger. The R*tree: an +** efficient and robust access method for points and rectangles. +** Proceedings of the ACM SIGMOD Conference. June 1990. +*/ + +#include "postgres.h" +#include "access/gist.h" /* For GiST */ +#include "access/itup.h" +#include "access/skey.h" + +#include "../postgis_config.h" + +#include "liblwgeom.h" /* For standard geometry types. */ +#include "lwgeom_pg.h" /* For debugging macros. */ +#include "gserialized_gist.h" /* For utility functions. */ +#include "geography.h" + +/* +** When is a node split not so good? If more than 90% of the entries +** end up in one of the children. +*/ +#define LIMIT_RATIO 0.1 + +/* +** For debugging +*/ +#if POSTGIS_DEBUG_LEVEL > 0 +static int geog_counter_leaf = 0; +static int geog_counter_internal = 0; +#endif + +/* +** ND Index key type stub prototypes +*/ +Datum gidx_out(PG_FUNCTION_ARGS); +Datum gidx_in(PG_FUNCTION_ARGS); + +/* +** ND GiST prototypes +*/ +Datum gserialized_gist_consistent(PG_FUNCTION_ARGS); +Datum gserialized_gist_compress(PG_FUNCTION_ARGS); +Datum gserialized_gist_decompress(PG_FUNCTION_ARGS); +Datum gserialized_gist_penalty(PG_FUNCTION_ARGS); +Datum gserialized_gist_picksplit(PG_FUNCTION_ARGS); +Datum gserialized_gist_union(PG_FUNCTION_ARGS); +Datum gserialized_gist_same(PG_FUNCTION_ARGS); + +/* +** ND Operator prototypes +*/ +Datum gserialized_overlaps(PG_FUNCTION_ARGS); +Datum gserialized_contains(PG_FUNCTION_ARGS); +Datum gserialized_within(PG_FUNCTION_ARGS); + +/* +** GIDX true/false test function type +*/ +typedef bool (*gidx_predicate)(GIDX *a, GIDX *b); + + +/* Allocate a new copy of GIDX */ +static GIDX* gidx_copy(GIDX *b) +{ + GIDX *c = (GIDX*)palloc(VARSIZE(b)); + POSTGIS_DEBUGF(5, "copied gidx (%p) to gidx (%p)", b, c); + memcpy((void*)c, (void*)b, VARSIZE(b)); + return c; +} + + +/* Ensure all minimums are below maximums. */ +static inline void gidx_validate(GIDX *b) +{ + int i; + Assert(b); + POSTGIS_DEBUGF(5,"validating gidx (%s)", gidx_to_string(b)); + for ( i = 0; i < GIDX_NDIMS(b); i++ ) + { + if ( GIDX_GET_MIN(b,i) > GIDX_GET_MAX(b,i) ) + { + float tmp; + tmp = GIDX_GET_MIN(b,i); + GIDX_SET_MIN(b,i,GIDX_GET_MAX(b,i)); + GIDX_SET_MAX(b,i,tmp); + } + } + return; +} + +/* An "unknown" GIDX is used to represent the bounds of an EMPTY + geometry or other-wise unindexable geometry (like one with NaN + or Inf bounds) */ +static inline bool gidx_is_unknown(const GIDX *a) +{ + size_t size = VARSIZE(a) - VARHDRSZ; + /* "unknown" gidx objects have a too-small size of one float */ + if ( size <= 0.0 ) + return TRUE; + return FALSE; +} + +static inline void gidx_set_unknown(GIDX *a) +{ + SET_VARSIZE(a, VARHDRSZ); +} + +/* Enlarge b_union to contain b_new. If b_new contains more + dimensions than b_union, expand b_union to contain those dimensions. */ +static void gidx_merge(GIDX **b_union, GIDX *b_new) +{ + int i, dims_union, dims_new; + Assert(b_union); + Assert(*b_union); + Assert(b_new); + + /* Can't merge an unknown into any thing */ + if( gidx_is_unknown(b_new) ) + return; + + /* Merge of unknown and known is known */ + if( gidx_is_unknown(*b_union) ) + { + *b_union = b_new; + return; + } + + dims_union = GIDX_NDIMS(*b_union); + dims_new = GIDX_NDIMS(b_new); + + POSTGIS_DEBUGF(4, "merging gidx (%s) into gidx (%s)", gidx_to_string(b_new), gidx_to_string(*b_union)); + + if ( dims_new > dims_union ) + { + POSTGIS_DEBUGF(5, "reallocating b_union from %d dims to %d dims", dims_union, dims_new); + *b_union = (GIDX*)repalloc(*b_union, GIDX_SIZE(dims_new)); + SET_VARSIZE(*b_union, VARSIZE(b_new)); + dims_union = dims_new; + } + + for ( i = 0; i < dims_new; i++ ) + { + /* Adjust minimums */ + GIDX_SET_MIN(*b_union, i, Min(GIDX_GET_MIN(*b_union,i),GIDX_GET_MIN(b_new,i))); + /* Adjust maximums */ + GIDX_SET_MAX(*b_union, i, Max(GIDX_GET_MAX(*b_union,i),GIDX_GET_MAX(b_new,i))); + } + + POSTGIS_DEBUGF(5, "merge complete (%s)", gidx_to_string(*b_union)); + return; +} + +/* Calculate the volume (in n-d units) of the GIDX */ +static float gidx_volume(GIDX *a) +{ + float result; + int i; + if ( a == NULL || gidx_is_unknown(a) ) + { + /* elog(ERROR, "gidx_volume received a null argument"); */ + return 0.0; + } + result = GIDX_GET_MAX(a,0) - GIDX_GET_MIN(a,0); + for ( i = 1; i < GIDX_NDIMS(a); i++ ) + result *= (GIDX_GET_MAX(a,i) - GIDX_GET_MIN(a,i)); + POSTGIS_DEBUGF(5, "calculated volume of %s as %.8g", gidx_to_string(a), result); + return result; +} + +/* Ensure the first argument has the higher dimensionality. */ +static void gidx_dimensionality_check(GIDX **a, GIDX **b) +{ + if ( GIDX_NDIMS(*a) < GIDX_NDIMS(*b) ) + { + GIDX *tmp = *b; + *b = *a; + *a = tmp; + } +} + +/* Calculate the volume of the union of the boxes. Avoids creating an intermediate box. */ +static float gidx_union_volume(GIDX *a, GIDX *b) +{ + float result; + int i; + int ndims_a, ndims_b; + + POSTGIS_DEBUG(5,"entered function"); + + if ( a == NULL && b == NULL ) + { + elog(ERROR, "gidx_union_volume received two null arguments"); + return 0.0; + } + + if ( a == NULL || gidx_is_unknown(a) ) + return gidx_volume(b); + + if ( b == NULL || gidx_is_unknown(b) ) + return gidx_volume(a); + + if ( gidx_is_unknown(a) && gidx_is_unknown(b) ) + { + return 0.0; + } + + /* Ensure 'a' has the most dimensions. */ + gidx_dimensionality_check(&a, &b); + + ndims_a = GIDX_NDIMS(a); + ndims_b = GIDX_NDIMS(b); + + /* Initialize with maximal length of first dimension. */ + result = Max(GIDX_GET_MAX(a,0),GIDX_GET_MAX(b,0)) - Min(GIDX_GET_MIN(a,0),GIDX_GET_MIN(b,0)); + + /* Multiply by maximal length of remaining dimensions. */ + for ( i = 1; i < ndims_b; i++ ) + { + result *= (Max(GIDX_GET_MAX(a,i),GIDX_GET_MAX(b,i)) - Min(GIDX_GET_MIN(a,i),GIDX_GET_MIN(b,i))); + } + + /* Add in dimensions of higher dimensional box. */ + for ( i = ndims_b; i < ndims_a; i++ ) + { + result *= (GIDX_GET_MAX(a,i) - GIDX_GET_MIN(a,i)); + } + + POSTGIS_DEBUGF(5, "volume( %s union %s ) = %.12g", gidx_to_string(a), gidx_to_string(b), result); + + return result; +} + +/* Calculate the volume of the intersection of the boxes. */ +static float gidx_inter_volume(GIDX *a, GIDX *b) +{ + int i; + float result; + + POSTGIS_DEBUG(5,"entered function"); + + if ( a == NULL || b == NULL ) + { + elog(ERROR, "gidx_inter_volume received a null argument"); + return 0.0; + } + + if ( gidx_is_unknown(a) || gidx_is_unknown(b) ) + { + return 0.0; + } + + /* Ensure 'a' has the most dimensions. */ + gidx_dimensionality_check(&a, &b); + + /* Initialize with minimal length of first dimension. */ + result = Min(GIDX_GET_MAX(a,0),GIDX_GET_MAX(b,0)) - Max(GIDX_GET_MIN(a,0),GIDX_GET_MIN(b,0)); + + /* If they are disjoint (max < min) then return zero. */ + if ( result < 0.0 ) return 0.0; + + /* Continue for remaining dimensions. */ + for ( i = 1; i < GIDX_NDIMS(b); i++ ) + { + float width = Min(GIDX_GET_MAX(a,i),GIDX_GET_MAX(b,i)) - Max(GIDX_GET_MIN(a,i),GIDX_GET_MIN(b,i)); + if ( width < 0.0 ) return 0.0; + /* Multiply by minimal length of remaining dimensions. */ + result *= width; + } + POSTGIS_DEBUGF(5, "volume( %s intersection %s ) = %.12g", gidx_to_string(a), gidx_to_string(b), result); + return result; +} + +/* +** Overlapping GIDX box test. +** +** Box(A) Overlap Box(B) IFF (pt(a)LL < pt(B)UR) && (pt(b)LL < pt(a)UR) +*/ +static bool gidx_overlaps(GIDX *a, GIDX *b) +{ + int i; + int ndims_b; + POSTGIS_DEBUG(5, "entered function"); + + if ( (a == NULL) || (b == NULL) ) return FALSE; + + if ( gidx_is_unknown(a) || gidx_is_unknown(b) ) + return FALSE; + + /* Ensure 'a' has the most dimensions. */ + gidx_dimensionality_check(&a, &b); + + ndims_b = GIDX_NDIMS(b); + + /* compare within the dimensions of (b) */ + for ( i = 0; i < ndims_b; i++ ) + { + if ( GIDX_GET_MIN(a,i) > GIDX_GET_MAX(b,i) ) + return FALSE; + if ( GIDX_GET_MIN(b,i) > GIDX_GET_MAX(a,i) ) + return FALSE; + } + + /* compare to zero those dimensions in (a) absent in (b) */ + for ( i = ndims_b; i < GIDX_NDIMS(a); i++ ) + { + if ( GIDX_GET_MIN(a,i) > 0.0 ) + return FALSE; + if ( GIDX_GET_MAX(a,i) < 0.0 ) + return FALSE; + } + return TRUE; +} + +/* +** Containment GIDX test. +** +** Box(A) CONTAINS Box(B) IFF (pt(A)LL < pt(B)LL) && (pt(A)UR > pt(B)UR) +*/ +static bool gidx_contains(GIDX *a, GIDX *b) +{ + int i, dims_a, dims_b; + + POSTGIS_DEBUG(5, "entered function"); + + if ( (a == NULL) || (b == NULL) ) return FALSE; + + if ( gidx_is_unknown(a) || gidx_is_unknown(b) ) + return FALSE; + + dims_a = GIDX_NDIMS(a); + dims_b = GIDX_NDIMS(b); + + if ( dims_a < dims_b ) + { + /* + ** If (b) is of higher dimensionality than (a) it can only be contained + ** if those higher dimensions are zeroes. + */ + for (i = dims_a; i < dims_b; i++) + { + if ( GIDX_GET_MIN(b,i) != 0 ) + return FALSE; + if ( GIDX_GET_MAX(b,i) != 0 ) + return FALSE; + } + } + + /* Excess dimensions of (a), don't matter, it just has to contain (b) in (b)'s dimensions */ + for (i = 0; i < Min(dims_a, dims_b); i++) + { + if ( GIDX_GET_MIN(a,i) > GIDX_GET_MIN(b,i) ) + return FALSE; + if ( GIDX_GET_MAX(a,i) < GIDX_GET_MAX(b,i) ) + return FALSE; + } + + return TRUE; +} + +/* +** Equality GIDX test. +** +** Box(A) EQUALS Box(B) IFF (pt(A)LL == pt(B)LL) && (pt(A)UR == pt(B)UR) +*/ +static bool gidx_equals(GIDX *a, GIDX *b) +{ + int i; + + POSTGIS_DEBUG(5, "entered function"); + + if ( (a == NULL) && (b == NULL) ) return TRUE; + if ( (a == NULL) || (b == NULL) ) return FALSE; + + if ( gidx_is_unknown(a) && gidx_is_unknown(b) ) + return TRUE; + + if ( gidx_is_unknown(a) || gidx_is_unknown(b) ) + return FALSE; + + /* Ensure 'a' has the most dimensions. */ + gidx_dimensionality_check(&a, &b); + + /* For all shared dimensions min(a) == min(b), max(a) == max(b) */ + for (i = 0; i < GIDX_NDIMS(b); i++) + { + if ( GIDX_GET_MIN(a,i) != GIDX_GET_MIN(b,i) ) + return FALSE; + if ( GIDX_GET_MAX(a,i) != GIDX_GET_MAX(b,i) ) + return FALSE; + } + /* For all unshared dimensions min(a) == 0.0, max(a) == 0.0 */ + for (i = GIDX_NDIMS(b); i < GIDX_NDIMS(a); i++) + { + if ( GIDX_GET_MIN(a,i) != 0.0 ) + return FALSE; + if ( GIDX_GET_MAX(a,i) != 0.0 ) + return FALSE; + } + return TRUE; +} + +/** +* Support function. Based on two datums return true if +* they satisfy the predicate and false otherwise. +*/ +static int +gserialized_datum_predicate(Datum gs1, Datum gs2, gidx_predicate predicate) +{ + /* Put aside some stack memory and use it for GIDX pointers. */ + char boxmem1[GIDX_MAX_SIZE]; + char boxmem2[GIDX_MAX_SIZE]; + GIDX *gidx1 = (GIDX*)boxmem1; + GIDX *gidx2 = (GIDX*)boxmem2; + + POSTGIS_DEBUG(3, "entered function"); + + /* Must be able to build box for each arguement (ie, not empty geometry) + and predicate function to return true. */ + if ( (gserialized_datum_get_gidx_p(gs1, gidx1) == LW_SUCCESS) && + (gserialized_datum_get_gidx_p(gs2, gidx2) == LW_SUCCESS) && + predicate(gidx1, gidx2) ) + { + POSTGIS_DEBUGF(3, "got boxes %s and %s", gidx_to_string(gidx1), gidx_to_string(gidx2)); + return LW_TRUE; + } + return LW_FALSE; +} + +/** +* Return a #GSERIALIZED with an expanded bounding box. +*/ +GSERIALIZED* +gserialized_expand(GSERIALIZED *g, double distance) +{ + char boxmem[GIDX_MAX_SIZE]; + GIDX *gidx = (GIDX*)boxmem; + float fdistance = (float)distance; + + /* Get our bounding box out of the geography, return right away if + input is an EMPTY geometry. */ + if ( gserialized_get_gidx_p(g, gidx) == LW_FAILURE ) + { + return g; + } + + gidx_expand(gidx, fdistance); + + return gserialized_set_gidx(g, gidx); +} + +/*********************************************************************** +* GiST N-D Index Operator Functions +*/ + +/* +** '~' and operator function. Based on two serialized return true if +** the first is contained by the second. +*/ +PG_FUNCTION_INFO_V1(gserialized_within); +Datum gserialized_within(PG_FUNCTION_ARGS) +{ + if ( gserialized_datum_predicate(PG_GETARG_DATUM(1), PG_GETARG_DATUM(0), gidx_contains) == LW_TRUE ) + { + PG_RETURN_BOOL(TRUE); + } + + PG_RETURN_BOOL(FALSE); +} + +/* +** '@' and operator function. Based on two serialized return true if +** the first contains the second. +*/ +PG_FUNCTION_INFO_V1(gserialized_contains); +Datum gserialized_contains(PG_FUNCTION_ARGS) +{ + if ( gserialized_datum_predicate(PG_GETARG_DATUM(0),PG_GETARG_DATUM(1), gidx_contains) == LW_TRUE ) + { + PG_RETURN_BOOL(TRUE); + } + + PG_RETURN_BOOL(FALSE); +} + +/* +** '&&' operator function. Based on two serialized return true if +** they overlap and false otherwise. +*/ +PG_FUNCTION_INFO_V1(gserialized_overlaps); +Datum gserialized_overlaps(PG_FUNCTION_ARGS) +{ + if ( gserialized_datum_predicate(PG_GETARG_DATUM(0),PG_GETARG_DATUM(1), gidx_overlaps) == LW_TRUE ) + { + PG_RETURN_BOOL(TRUE); + } + + PG_RETURN_BOOL(FALSE); +} + +/*********************************************************************** +* GiST Index Support Functions +*/ + +/* +** GiST support function. Given a geography, return a "compressed" +** version. In this case, we convert the geography into a geocentric +** bounding box. If the geography already has the box embedded in it +** we pull that out and hand it back. +*/ +PG_FUNCTION_INFO_V1(gserialized_gist_compress); +Datum gserialized_gist_compress(PG_FUNCTION_ARGS) +{ + GISTENTRY *entry_in = (GISTENTRY*)PG_GETARG_POINTER(0); + GISTENTRY *entry_out = NULL; + char gidxmem[GIDX_MAX_SIZE]; + GIDX *bbox_out = (GIDX*)gidxmem; + int result = LW_SUCCESS; + int i; + + POSTGIS_DEBUG(4, "[GIST] 'compress' function called"); + + /* + ** Not a leaf key? There's nothing to do. + ** Return the input unchanged. + */ + if ( ! entry_in->leafkey ) + { + POSTGIS_DEBUG(4, "[GIST] non-leafkey entry, returning input unaltered"); + PG_RETURN_POINTER(entry_in); + } + + POSTGIS_DEBUG(4, "[GIST] processing leafkey input"); + entry_out = palloc(sizeof(GISTENTRY)); + + /* + ** Null key? Make a copy of the input entry and + ** return. + */ + if ( DatumGetPointer(entry_in->key) == NULL ) + { + POSTGIS_DEBUG(4, "[GIST] leafkey is null"); + gistentryinit(*entry_out, (Datum) 0, entry_in->rel, + entry_in->page, entry_in->offset, FALSE); + POSTGIS_DEBUG(4, "[GIST] returning copy of input"); + PG_RETURN_POINTER(entry_out); + } + + /* Extract our index key from the GiST entry. */ + result = gserialized_datum_get_gidx_p(entry_in->key, bbox_out); + + /* Is the bounding box valid (non-empty, non-infinite) ? + * If not, use the "unknown" GIDX. */ + if ( result == LW_FAILURE ) + { + POSTGIS_DEBUG(4, "[GIST] empty geometry!"); + gidx_set_unknown(bbox_out); + gistentryinit(*entry_out, PointerGetDatum(gidx_copy(bbox_out)), + entry_in->rel, entry_in->page, + entry_in->offset, FALSE); + PG_RETURN_POINTER(entry_out); + } + + POSTGIS_DEBUGF(4, "[GIST] got entry_in->key: %s", gidx_to_string(bbox_out)); + + /* Check all the dimensions for finite values. + * If not, use the "unknown" GIDX as a key */ + for ( i = 0; i < GIDX_NDIMS(bbox_out); i++ ) + { + if ( ! finite(GIDX_GET_MAX(bbox_out, i)) + || ! finite(GIDX_GET_MIN(bbox_out, i)) ) + { + gidx_set_unknown(bbox_out); + gistentryinit(*entry_out, + PointerGetDatum(gidx_copy(bbox_out)), + entry_in->rel, entry_in->page, + entry_in->offset, FALSE); + PG_RETURN_POINTER(entry_out); + } + } + + /* Enure bounding box has minimums below maximums. */ + gidx_validate(bbox_out); + + /* Prepare GISTENTRY for return. */ + gistentryinit(*entry_out, PointerGetDatum(gidx_copy(bbox_out)), + entry_in->rel, entry_in->page, entry_in->offset, FALSE); + + /* Return GISTENTRY. */ + POSTGIS_DEBUG(4, "[GIST] 'compress' function complete"); + PG_RETURN_POINTER(entry_out); +} + +/* +** GiST support function. +** Decompress an entry. Unused for geography, so we return. +*/ +PG_FUNCTION_INFO_V1(gserialized_gist_decompress); +Datum gserialized_gist_decompress(PG_FUNCTION_ARGS) +{ + POSTGIS_DEBUG(5, "[GIST] 'decompress' function called"); + /* We don't decompress. Just return the input. */ + PG_RETURN_POINTER(PG_GETARG_POINTER(0)); +} + +/* +** GiST support function. Called from gserialized_gist_consistent below. +*/ +static inline bool gserialized_gist_consistent_leaf(GIDX *key, GIDX *query, StrategyNumber strategy) +{ + bool retval; + + POSTGIS_DEBUGF(4, "[GIST] leaf consistent, strategy [%d], count[%i]", + strategy, geog_counter_leaf++); + + switch (strategy) + { + case RTOverlapStrategyNumber: + retval = (bool) gidx_overlaps(key, query); + break; + case RTSameStrategyNumber: + retval = (bool) gidx_equals(key, query); + break; + case RTContainsStrategyNumber: + case RTOldContainsStrategyNumber: + retval = (bool) gidx_contains(key, query); + break; + case RTContainedByStrategyNumber: + case RTOldContainedByStrategyNumber: + retval = (bool) gidx_contains(query, key); + break; + default: + retval = FALSE; + } + + return (retval); +} + +/* +** GiST support function. Called from gserialized_gist_consistent below. +*/ +static inline bool gserialized_gist_consistent_internal(GIDX *key, GIDX *query, StrategyNumber strategy) +{ + bool retval; + + POSTGIS_DEBUGF(4, "[GIST] internal consistent, strategy [%d], count[%i], query[%s], key[%s]", + strategy, geog_counter_internal++, gidx_to_string(query), gidx_to_string(key) ); + + switch (strategy) + { + case RTOverlapStrategyNumber: + retval = (bool) gidx_overlaps(key, query); + break; + case RTSameStrategyNumber: + case RTContainsStrategyNumber: + case RTOldContainsStrategyNumber: + retval = (bool) gidx_contains(key, query); + break; + case RTContainedByStrategyNumber: + case RTOldContainedByStrategyNumber: + retval = (bool) gidx_overlaps(key, query); + break; + default: + retval = FALSE; + } + + return (retval); +} + +/* +** GiST support function. Take in a query and an entry and see what the +** relationship is, based on the query strategy. +*/ +PG_FUNCTION_INFO_V1(gserialized_gist_consistent); +Datum gserialized_gist_consistent(PG_FUNCTION_ARGS) +{ + GISTENTRY *entry = (GISTENTRY*) PG_GETARG_POINTER(0); + StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2); + bool result; + char gidxmem[GIDX_MAX_SIZE]; + GIDX *query_gbox_index = (GIDX*)gidxmem; + +#if POSTGIS_PGSQL_VERSION >= 84 + /* PostgreSQL 8.4 and later require the RECHECK flag to be set here, + rather than being supplied as part of the operator class definition */ + bool *recheck = (bool *) PG_GETARG_POINTER(4); + + /* We set recheck to false to avoid repeatedly pulling every "possibly matched" geometry + out during index scans. For cases when the geometries are large, rechecking + can make things twice as slow. */ + *recheck = false; +#endif + + POSTGIS_DEBUG(4, "[GIST] 'consistent' function called"); + + /* Quick sanity check on query argument. */ + if ( DatumGetPointer(PG_GETARG_DATUM(1)) == NULL ) + { + POSTGIS_DEBUG(4, "[GIST] null query pointer (!?!), returning false"); + PG_RETURN_BOOL(FALSE); /* NULL query! This is screwy! */ + } + + /* Quick sanity check on entry key. */ + if ( DatumGetPointer(entry->key) == NULL ) + { + POSTGIS_DEBUG(4, "[GIST] null index entry, returning false"); + PG_RETURN_BOOL(FALSE); /* NULL entry! */ + } + + /* Null box should never make this far. */ + if ( gserialized_datum_get_gidx_p(PG_GETARG_DATUM(1), query_gbox_index) == LW_FAILURE ) + { + POSTGIS_DEBUG(4, "[GIST] null query_gbox_index!"); + PG_RETURN_BOOL(FALSE); + } + + /* Treat leaf node tests different from internal nodes */ + if (GIST_LEAF(entry)) + { + result = gserialized_gist_consistent_leaf( + (GIDX*)DatumGetPointer(entry->key), + query_gbox_index, strategy); + } + else + { + result = gserialized_gist_consistent_internal( + (GIDX*)DatumGetPointer(entry->key), + query_gbox_index, strategy); + } + + PG_RETURN_BOOL(result); +} + + +/* +** GiST support function. Calculate the "penalty" cost of adding this entry into an existing entry. +** Calculate the change in volume of the old entry once the new entry is added. +** TODO: Re-evaluate this in light of R*Tree penalty approaches. +*/ +PG_FUNCTION_INFO_V1(gserialized_gist_penalty); +Datum gserialized_gist_penalty(PG_FUNCTION_ARGS) +{ + GISTENTRY *origentry = (GISTENTRY*) PG_GETARG_POINTER(0); + GISTENTRY *newentry = (GISTENTRY*) PG_GETARG_POINTER(1); + float *result = (float*) PG_GETARG_POINTER(2); + GIDX *gbox_index_orig, *gbox_index_new; + float size_union, size_orig; + + POSTGIS_DEBUG(4, "[GIST] 'penalty' function called"); + + gbox_index_orig = (GIDX*)DatumGetPointer(origentry->key); + gbox_index_new = (GIDX*)DatumGetPointer(newentry->key); + + /* Drop out if we're dealing with null inputs. Shouldn't happen. */ + if ( (gbox_index_orig == NULL) && (gbox_index_new == NULL) ) + { + POSTGIS_DEBUG(4, "[GIST] both inputs NULL! returning penalty of zero"); + *result = 0.0; + PG_RETURN_FLOAT8(*result); + } + + /* Calculate the size difference of the boxes (volume difference in this case). */ + size_union = gidx_union_volume(gbox_index_orig, gbox_index_new); + size_orig = gidx_volume(gbox_index_orig); + *result = size_union - size_orig; + + /* All things being equal, we prefer to expand small boxes rather than large boxes. + NOTE: This code seemed to be causing badly balanced trees to be built + and therefore has been commented out. Not sure why it didn't work, + but it didn't. + if( FP_IS_ZERO(*result) ) + if( FP_IS_ZERO(size_orig) ) + *result = 0.0; + else + *result = 1.0 - (1.0/(1.0 + size_orig)); + else + *result += 1.0; + */ + + POSTGIS_DEBUGF(4, "[GIST] union size (%.12f), original size (%.12f), penalty (%.12f)", size_union, size_orig, *result); + + PG_RETURN_POINTER(result); +} + +/* +** GiST support function. Merge all the boxes in a page into one master box. +*/ +PG_FUNCTION_INFO_V1(gserialized_gist_union); +Datum gserialized_gist_union(PG_FUNCTION_ARGS) +{ + GistEntryVector *entryvec = (GistEntryVector *) PG_GETARG_POINTER(0); + int *sizep = (int *) PG_GETARG_POINTER(1); /* Size of the return value */ + int numranges, i; + GIDX *box_cur, *box_union; + + POSTGIS_DEBUG(4, "[GIST] 'union' function called"); + + numranges = entryvec->n; + + box_cur = (GIDX*) DatumGetPointer(entryvec->vector[0].key); + + box_union = gidx_copy(box_cur); + + for ( i = 1; i < numranges; i++ ) + { + box_cur = (GIDX*) DatumGetPointer(entryvec->vector[i].key); + gidx_merge(&box_union, box_cur); + } + + *sizep = VARSIZE(box_union); + + POSTGIS_DEBUGF(4, "[GIST] union called, numranges(%i), pageunion %s", numranges, gidx_to_string(box_union)); + + PG_RETURN_POINTER(box_union); + +} + + + +/* +** GiST support function. Test equality of keys. +*/ +PG_FUNCTION_INFO_V1(gserialized_gist_same); +Datum gserialized_gist_same(PG_FUNCTION_ARGS) +{ + GIDX *b1 = (GIDX*)PG_GETARG_POINTER(0); + GIDX *b2 = (GIDX*)PG_GETARG_POINTER(1); + bool *result = (bool*)PG_GETARG_POINTER(2); + + POSTGIS_DEBUG(4, "[GIST] 'same' function called"); + + *result = gidx_equals(b1, b2); + + PG_RETURN_POINTER(result); +} + + + +/* +** Utility function to add entries to the axis partition lists in the +** picksplit function. +*/ +static void gserialized_gist_picksplit_addlist(OffsetNumber *list, GIDX **box_union, GIDX *box_current, int *pos, int num) +{ + if ( *pos ) + gidx_merge(box_union, box_current); + else + memcpy((void*)(*box_union), (void*)box_current, VARSIZE(box_current)); + list[*pos] = num; + (*pos)++; +} + +/* +** Utility function check whether the number of entries two halves of the +** space constitute a "bad ratio" (poor balance). +*/ +static int gserialized_gist_picksplit_badratio(int x, int y) +{ + POSTGIS_DEBUGF(4, "[GIST] checking split ratio (%d, %d)", x, y); + if ( (y == 0) || (((float)x / (float)y) < LIMIT_RATIO) || + (x == 0) || (((float)y / (float)x) < LIMIT_RATIO) ) + return TRUE; + + return FALSE; +} + +static bool gserialized_gist_picksplit_badratios(int *pos, int dims) +{ + int i; + for ( i = 0; i < dims; i++ ) + { + if ( gserialized_gist_picksplit_badratio(pos[2*i],pos[2*i+1]) == FALSE ) + return FALSE; + } + return TRUE; +} + + +/* +** Where the picksplit algorithm cannot find any basis for splitting one way +** or another, we simply split the overflowing node in half. +*/ +static void gserialized_gist_picksplit_fallback(GistEntryVector *entryvec, GIST_SPLITVEC *v) +{ + OffsetNumber i, maxoff; + GIDX *unionL = NULL; + GIDX *unionR = NULL; + int nbytes; + + POSTGIS_DEBUG(4, "[GIST] in fallback picksplit function"); + + maxoff = entryvec->n - 1; + + nbytes = (maxoff + 2) * sizeof(OffsetNumber); + v->spl_left = (OffsetNumber*) palloc(nbytes); + v->spl_right = (OffsetNumber*) palloc(nbytes); + v->spl_nleft = v->spl_nright = 0; + + for (i = FirstOffsetNumber; i <= maxoff; i = OffsetNumberNext(i)) + { + GIDX *cur = (GIDX*)DatumGetPointer(entryvec->vector[i].key); + + if (i <= (maxoff - FirstOffsetNumber + 1) / 2) + { + v->spl_left[v->spl_nleft] = i; + if (unionL == NULL) + { + unionL = gidx_copy(cur); + } + else + { + gidx_merge(&unionL, cur); + } + v->spl_nleft++; + } + else + { + v->spl_right[v->spl_nright] = i; + if (unionR == NULL) + { + unionR = gidx_copy(cur); + } + else + { + gidx_merge(&unionR, cur); + } + v->spl_nright++; + } + } + + if (v->spl_ldatum_exists) + gidx_merge(&unionL, (GIDX*)DatumGetPointer(v->spl_ldatum)); + + v->spl_ldatum = PointerGetDatum(unionL); + + if (v->spl_rdatum_exists) + gidx_merge(&unionR, (GIDX*)DatumGetPointer(v->spl_rdatum)); + + v->spl_rdatum = PointerGetDatum(unionR); + v->spl_ldatum_exists = v->spl_rdatum_exists = false; +} + + + +static void gserialized_gist_picksplit_constructsplit(GIST_SPLITVEC *v, OffsetNumber *list1, int nlist1, GIDX **union1, OffsetNumber *list2, int nlist2, GIDX **union2) +{ + bool firstToLeft = true; + + POSTGIS_DEBUG(4, "[GIST] picksplit in constructsplit function"); + + if (v->spl_ldatum_exists || v->spl_rdatum_exists) + { + if (v->spl_ldatum_exists && v->spl_rdatum_exists) + { + GIDX *LRl = gidx_copy(*union1); + GIDX *LRr = gidx_copy(*union2); + GIDX *RLl = gidx_copy(*union2); + GIDX *RLr = gidx_copy(*union1); + double sizeLR, sizeRL; + + gidx_merge(&LRl, (GIDX*)DatumGetPointer(v->spl_ldatum)); + gidx_merge(&LRr, (GIDX*)DatumGetPointer(v->spl_rdatum)); + gidx_merge(&RLl, (GIDX*)DatumGetPointer(v->spl_ldatum)); + gidx_merge(&RLr, (GIDX*)DatumGetPointer(v->spl_rdatum)); + + sizeLR = gidx_inter_volume(LRl,LRr); + sizeRL = gidx_inter_volume(RLl,RLr); + + POSTGIS_DEBUGF(4, "[GIST] sizeLR / sizeRL == %.12g / %.12g", sizeLR, sizeRL); + + if (sizeLR > sizeRL) + firstToLeft = false; + + } + else + { + float p1, p2; + GISTENTRY oldUnion, addon; + + gistentryinit(oldUnion, (v->spl_ldatum_exists) ? v->spl_ldatum : v->spl_rdatum, + NULL, NULL, InvalidOffsetNumber, FALSE); + + gistentryinit(addon, PointerGetDatum(*union1), NULL, NULL, InvalidOffsetNumber, FALSE); + DirectFunctionCall3(gserialized_gist_penalty, PointerGetDatum(&oldUnion), PointerGetDatum(&addon), PointerGetDatum(&p1)); + gistentryinit(addon, PointerGetDatum(*union2), NULL, NULL, InvalidOffsetNumber, FALSE); + DirectFunctionCall3(gserialized_gist_penalty, PointerGetDatum(&oldUnion), PointerGetDatum(&addon), PointerGetDatum(&p2)); + + POSTGIS_DEBUGF(4, "[GIST] p1 / p2 == %.12g / %.12g", p1, p2); + + if ((v->spl_ldatum_exists && p1 > p2) || (v->spl_rdatum_exists && p1 < p2)) + firstToLeft = false; + } + } + + POSTGIS_DEBUGF(4, "[GIST] firstToLeft == %d", firstToLeft); + + if (firstToLeft) + { + v->spl_left = list1; + v->spl_right = list2; + v->spl_nleft = nlist1; + v->spl_nright = nlist2; + if (v->spl_ldatum_exists) + gidx_merge(union1, (GIDX*)DatumGetPointer(v->spl_ldatum)); + v->spl_ldatum = PointerGetDatum(*union1); + if (v->spl_rdatum_exists) + gidx_merge(union2, (GIDX*)DatumGetPointer(v->spl_rdatum)); + v->spl_rdatum = PointerGetDatum(*union2); + } + else + { + v->spl_left = list2; + v->spl_right = list1; + v->spl_nleft = nlist2; + v->spl_nright = nlist1; + if (v->spl_ldatum_exists) + gidx_merge(union2, (GIDX*)DatumGetPointer(v->spl_ldatum)); + v->spl_ldatum = PointerGetDatum(*union2); + if (v->spl_rdatum_exists) + gidx_merge(union1, (GIDX*)DatumGetPointer(v->spl_rdatum)); + v->spl_rdatum = PointerGetDatum(*union1); + } + + v->spl_ldatum_exists = v->spl_rdatum_exists = false; +} + + +#define BELOW(d) (2*(d)) +#define ABOVE(d) ((2*(d))+1) + +/* +** GiST support function. Split an overflowing node into two new nodes. +** Uses linear algorithm from Ang & Tan [2], dividing node extent into +** four quadrants, and splitting along the axis that most evenly distributes +** entries between the new nodes. +** TODO: Re-evaluate this in light of R*Tree picksplit approaches. +*/ +PG_FUNCTION_INFO_V1(gserialized_gist_picksplit); +Datum gserialized_gist_picksplit(PG_FUNCTION_ARGS) +{ + + GistEntryVector *entryvec = (GistEntryVector*) PG_GETARG_POINTER(0); + + GIST_SPLITVEC *v = (GIST_SPLITVEC*) PG_GETARG_POINTER(1); + OffsetNumber i; + /* One union box for each half of the space. */ + GIDX **box_union; + /* One offset number list for each half of the space. */ + OffsetNumber **list; + /* One position index for each half of the space. */ + int *pos; + GIDX *box_pageunion; + GIDX *box_current; + int direction = -1; + bool all_entries_equal = true; + OffsetNumber max_offset; + int nbytes, ndims_pageunion, d; + int posmax = -1; + + POSTGIS_DEBUG(4, "[GIST] 'picksplit' function called"); + + /* + ** First calculate the bounding box and maximum number of dimensions in this page. + */ + + max_offset = entryvec->n - 1; + box_current = (GIDX*) DatumGetPointer(entryvec->vector[FirstOffsetNumber].key); + box_pageunion = gidx_copy(box_current); + + /* Calculate the containing box (box_pageunion) for the whole page we are going to split. */ + for ( i = OffsetNumberNext(FirstOffsetNumber); i <= max_offset; i = OffsetNumberNext(i) ) + { + box_current = (GIDX*) DatumGetPointer(entryvec->vector[i].key); + + if ( all_entries_equal == true && ! gidx_equals (box_pageunion, box_current) ) + all_entries_equal = false; + + gidx_merge( &box_pageunion, box_current ); + } + + POSTGIS_DEBUGF(3, "[GIST] box_pageunion: %s", gidx_to_string(box_pageunion)); + + /* Every box in the page is the same! So, we split and just put half the boxes in each child. */ + if ( all_entries_equal ) + { + POSTGIS_DEBUG(4, "[GIST] picksplit finds all entries equal!"); + gserialized_gist_picksplit_fallback(entryvec, v); + PG_RETURN_POINTER(v); + } + + /* Initialize memory structures. */ + nbytes = (max_offset + 2) * sizeof(OffsetNumber); + ndims_pageunion = GIDX_NDIMS(box_pageunion); + POSTGIS_DEBUGF(4, "[GIST] ndims_pageunion == %d", ndims_pageunion); + pos = palloc(2*ndims_pageunion * sizeof(int)); + list = palloc(2*ndims_pageunion * sizeof(OffsetNumber*)); + box_union = palloc(2*ndims_pageunion * sizeof(GIDX*)); + for ( d = 0; d < ndims_pageunion; d++ ) + { + list[BELOW(d)] = (OffsetNumber*) palloc(nbytes); + list[ABOVE(d)] = (OffsetNumber*) palloc(nbytes); + box_union[BELOW(d)] = gidx_new(ndims_pageunion); + box_union[ABOVE(d)] = gidx_new(ndims_pageunion); + pos[BELOW(d)] = 0; + pos[ABOVE(d)] = 0; + } + + /* + ** Assign each entry in the node to the volume partitions it belongs to, + ** such as "above the x/y plane, left of the y/z plane, below the x/z plane". + ** Each entry thereby ends up in three of the six partitions. + */ + POSTGIS_DEBUG(4, "[GIST] 'picksplit' calculating best split axis"); + for ( i = FirstOffsetNumber; i <= max_offset; i = OffsetNumberNext(i) ) + { + box_current = (GIDX*) DatumGetPointer(entryvec->vector[i].key); + + for ( d = 0; d < ndims_pageunion; d++ ) + { + if ( GIDX_GET_MIN(box_current,d)-GIDX_GET_MIN(box_pageunion,d) < GIDX_GET_MAX(box_pageunion,d)-GIDX_GET_MAX(box_current,d) ) + { + gserialized_gist_picksplit_addlist(list[BELOW(d)], &(box_union[BELOW(d)]), box_current, &(pos[BELOW(d)]), i); + } + else + { + gserialized_gist_picksplit_addlist(list[ABOVE(d)], &(box_union[ABOVE(d)]), box_current, &(pos[ABOVE(d)]), i); + } + + } + + } + + /* + ** "Bad disposition", too many entries fell into one octant of the space, so no matter which + ** plane we choose to split on, we're going to end up with a mostly full node. Where the + ** data is pretty homogeneous (lots of duplicates) entries that are equidistant from the + ** sides of the page union box can occasionally all end up in one place, leading + ** to this condition. + */ + if ( gserialized_gist_picksplit_badratios(pos,ndims_pageunion) == TRUE ) + { + /* + ** Instead we split on center points and see if we do better. + ** First calculate the average center point for each axis. + */ + double *avgCenter = palloc(ndims_pageunion * sizeof(double)); + + for ( d = 0; d < ndims_pageunion; d++ ) + { + avgCenter[d] = 0.0; + } + + POSTGIS_DEBUG(4, "[GIST] picksplit can't find good split axis, trying center point method"); + + for ( i = FirstOffsetNumber; i <= max_offset; i = OffsetNumberNext(i) ) + { + box_current = (GIDX*) DatumGetPointer(entryvec->vector[i].key); + for ( d = 0; d < ndims_pageunion; d++ ) + { + avgCenter[d] += (GIDX_GET_MAX(box_current,d) + GIDX_GET_MIN(box_current,d)) / 2.0; + } + } + for ( d = 0; d < ndims_pageunion; d++ ) + { + avgCenter[d] /= max_offset; + pos[BELOW(d)] = pos[ABOVE(d)] = 0; /* Re-initialize our counters. */ + POSTGIS_DEBUGF(4, "[GIST] picksplit average center point[%d] = %.12g", d, avgCenter[d]); + } + + /* For each of our entries... */ + for ( i = FirstOffsetNumber; i <= max_offset; i = OffsetNumberNext(i) ) + { + double center; + box_current = (GIDX*) DatumGetPointer(entryvec->vector[i].key); + + for ( d = 0; d < ndims_pageunion; d++ ) + { + center = (GIDX_GET_MIN(box_current,d)+GIDX_GET_MAX(box_current,d))/2.0; + if ( center < avgCenter[d] ) + gserialized_gist_picksplit_addlist(list[BELOW(d)], &(box_union[BELOW(d)]), box_current, &(pos[BELOW(d)]), i); + else if ( FPeq(center, avgCenter[d]) ) + if ( pos[BELOW(d)] > pos[ABOVE(d)] ) + gserialized_gist_picksplit_addlist(list[ABOVE(d)], &(box_union[ABOVE(d)]), box_current, &(pos[ABOVE(d)]), i); + else + gserialized_gist_picksplit_addlist(list[BELOW(d)], &(box_union[BELOW(d)]), box_current, &(pos[BELOW(d)]), i); + else + gserialized_gist_picksplit_addlist(list[ABOVE(d)], &(box_union[ABOVE(d)]), box_current, &(pos[ABOVE(d)]), i); + } + + } + + /* Do we have a good disposition now? If not, screw it, just cut the node in half. */ + if ( gserialized_gist_picksplit_badratios(pos,ndims_pageunion) == TRUE ) + { + POSTGIS_DEBUG(4, "[GIST] picksplit still cannot find a good split! just cutting the node in half"); + gserialized_gist_picksplit_fallback(entryvec, v); + PG_RETURN_POINTER(v); + } + + } + + /* + ** Now, what splitting plane gives us the most even ratio of + ** entries in our child pages? Since each split region has been apportioned entries + ** against the same number of total entries, the axis that has the smallest maximum + ** number of entries in its regions is the most evenly distributed. + ** TODO: what if the distributions are equal in two or more axes? + */ + for ( d = 0; d < ndims_pageunion; d++ ) + { + int posd = Max(pos[ABOVE(d)],pos[BELOW(d)]); + if ( posd > posmax ) + { + direction = d; + posmax = posd; + } + } + if ( direction == -1 || posmax == -1 ) + { + /* ERROR OUT HERE */ + elog(ERROR, "Error in building split, unable to determine split direction."); + } + + POSTGIS_DEBUGF(3, "[GIST] 'picksplit' splitting on axis %d", direction); + + gserialized_gist_picksplit_constructsplit(v, list[BELOW(direction)], + pos[BELOW(direction)], + &(box_union[BELOW(direction)]), + list[ABOVE(direction)], + pos[ABOVE(direction)], + &(box_union[ABOVE(direction)]) ); + + POSTGIS_DEBUGF(4, "[GIST] spl_ldatum: %s", gidx_to_string((GIDX*)v->spl_ldatum)); + POSTGIS_DEBUGF(4, "[GIST] spl_rdatum: %s", gidx_to_string((GIDX*)v->spl_rdatum)); + + POSTGIS_DEBUGF(4, "[GIST] axis %d: parent range (%.12g, %.12g) left range (%.12g, %.12g), right range (%.12g, %.12g)", + direction, + GIDX_GET_MIN(box_pageunion, direction), GIDX_GET_MAX(box_pageunion, direction), + GIDX_GET_MIN((GIDX*)v->spl_ldatum, direction), GIDX_GET_MAX((GIDX*)v->spl_ldatum, direction), + GIDX_GET_MIN((GIDX*)v->spl_rdatum, direction), GIDX_GET_MAX((GIDX*)v->spl_rdatum, direction) ); + + PG_RETURN_POINTER(v); + +} + +/* +** The GIDX key must be defined as a PostgreSQL type, even though it is only +** ever used internally. These no-op stubs are used to bind the type. +*/ +PG_FUNCTION_INFO_V1(gidx_in); +Datum gidx_in(PG_FUNCTION_ARGS) +{ + ereport(ERROR,(errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg("function gidx_in not implemented"))); + PG_RETURN_POINTER(NULL); +} + +PG_FUNCTION_INFO_V1(gidx_out); +Datum gidx_out(PG_FUNCTION_ARGS) +{ + ereport(ERROR,(errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg("function gidx_out not implemented"))); + PG_RETURN_POINTER(NULL); +} diff -Nru postgis-1.5.3/postgis/gserialized_typmod.c postgis-2.0.1/postgis/gserialized_typmod.c --- postgis-1.5.3/postgis/gserialized_typmod.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/postgis/gserialized_typmod.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,406 @@ +/********************************************************************** + * $Id: geography_inout.c 7248 2011-05-25 18:42:16Z pramsey $ + * + * PostGIS - Spatial Types for PostgreSQL + * Copyright 2009 Paul Ramsey + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include "postgres.h" + +#include "../postgis_config.h" + +#include +#include +#include +#include +#include + +#include "utils/elog.h" +#include "utils/array.h" +#include "utils/builtins.h" /* for pg_atoi */ +#include "lib/stringinfo.h" /* For binary input */ +#include "catalog/pg_type.h" /* for CSTRINGOID */ + +#include "liblwgeom.h" /* For standard geometry types. */ +#include "lwgeom_pg.h" /* For debugging macros. */ +#include "geography.h" /* For utility functions. */ +#include "lwgeom_export.h" /* For export functions. */ + + +Datum geography_typmod_in(PG_FUNCTION_ARGS); +Datum geometry_typmod_in(PG_FUNCTION_ARGS); +Datum postgis_typmod_out(PG_FUNCTION_ARGS); +Datum postgis_typmod_dims(PG_FUNCTION_ARGS); +Datum postgis_typmod_srid(PG_FUNCTION_ARGS); +Datum postgis_typmod_type(PG_FUNCTION_ARGS); +Datum geography_enforce_typmod(PG_FUNCTION_ARGS); +Datum geometry_enforce_typmod(PG_FUNCTION_ARGS); + + +/* +** postgis_typmod_out(int) returns cstring +*/ +PG_FUNCTION_INFO_V1(postgis_typmod_out); +Datum postgis_typmod_out(PG_FUNCTION_ARGS) +{ + char *s = (char*)palloc(64); + char *str = s; + uint32 typmod = PG_GETARG_INT32(0); + uint32 srid = TYPMOD_GET_SRID(typmod); + uint32 type = TYPMOD_GET_TYPE(typmod); + uint32 hasz = TYPMOD_GET_Z(typmod); + uint32 hasm = TYPMOD_GET_M(typmod); + + POSTGIS_DEBUGF(3, "Got typmod(srid = %d, type = %d, hasz = %d, hasm = %d)", srid, type, hasz, hasm); + + /* No SRID or type or dimensionality? Then no typmod at all. Return empty string. */ + if ( ! ( srid || type || hasz || hasz ) ) + { + *str = '\0'; + PG_RETURN_CSTRING(str); + } + + /* Opening bracket. */ + str += sprintf(str, "("); + + /* Has type? */ + if ( type ) + str += sprintf(str, "%s", lwtype_name(type)); + else if ( (!type) && ( srid || hasz || hasm ) ) + str += sprintf(str, "Geometry"); + + /* Has Z? */ + if ( hasz ) + str += sprintf(str, "%s", "Z"); + + /* Has M? */ + if ( hasm ) + str += sprintf(str, "%s", "M"); + + /* Comma? */ + if ( srid ) + str += sprintf(str, ","); + + /* Has SRID? */ + if ( srid ) + str += sprintf(str, "%d", srid); + + /* Closing bracket. */ + str += sprintf(str, ")"); + + PG_RETURN_CSTRING(s); + +} + + +/** +* Check the consistency of the metadata we want to enforce in the typmod: +* srid, type and dimensionality. If things are inconsistent, shut down the query. +*/ +void postgis_valid_typmod(const GSERIALIZED *gser, int32_t typmod) +{ + int32 geom_srid = gserialized_get_srid(gser); + int32 geom_type = gserialized_get_type(gser); + int32 geom_z = gserialized_has_z(gser); + int32 geom_m = gserialized_has_m(gser); + int32 typmod_srid = TYPMOD_GET_SRID(typmod); + int32 typmod_type = TYPMOD_GET_TYPE(typmod); + int32 typmod_z = TYPMOD_GET_Z(typmod); + int32 typmod_m = TYPMOD_GET_M(typmod); + + POSTGIS_DEBUG(2, "Entered function"); + + /* No typmod (-1) => no preferences */ + if (typmod < 0) return; + + POSTGIS_DEBUGF(3, "Got geom(type = %d, srid = %d, hasz = %d, hasm = %d)", geom_type, geom_srid, geom_z, geom_m); + POSTGIS_DEBUGF(3, "Got typmod(type = %d, srid = %d, hasz = %d, hasm = %d)", typmod_type, typmod_srid, typmod_z, typmod_m); + + /* Typmod has a preference for SRID and geom has a non-default SRID? They had better match. */ + if ( typmod_srid > 0 && typmod_srid != geom_srid ) + { + ereport(ERROR, ( + errcode(ERRCODE_INVALID_PARAMETER_VALUE), + errmsg("Geometry SRID (%d) does not match column SRID (%d)", geom_srid, typmod_srid) )); + } + + /* Typmod has a preference for geometry type. */ + if ( typmod_type > 0 && + /* GEOMETRYCOLLECTION column can hold any kind of collection */ + ((typmod_type == COLLECTIONTYPE && ! (geom_type == COLLECTIONTYPE || + geom_type == MULTIPOLYGONTYPE || + geom_type == MULTIPOINTTYPE || + geom_type == MULTILINETYPE )) || + /* Other types must be strictly equal. */ + (typmod_type != geom_type)) ) + { + ereport(ERROR, ( + errcode(ERRCODE_INVALID_PARAMETER_VALUE), + errmsg("Geometry type (%s) does not match column type (%s)", lwtype_name(geom_type), lwtype_name(typmod_type)) )); + } + + /* Mismatched Z dimensionality. */ + if ( typmod_z && ! geom_z ) + { + ereport(ERROR, ( + errcode(ERRCODE_INVALID_PARAMETER_VALUE), + errmsg("Column has Z dimension but geometry does not" ))); + } + + /* Mismatched Z dimensionality (other way). */ + if ( geom_z && ! typmod_z ) + { + ereport(ERROR, ( + errcode(ERRCODE_INVALID_PARAMETER_VALUE), + errmsg("Geometry has Z dimension but column does not" ))); + } + + /* Mismatched M dimensionality. */ + if ( typmod_m && ! geom_m ) + { + ereport(ERROR, ( + errcode(ERRCODE_INVALID_PARAMETER_VALUE), + errmsg("Column has M dimension but geometry does not" ))); + } + + /* Mismatched M dimensionality (other way). */ + if ( geom_m && ! typmod_m ) + { + ereport(ERROR, ( + errcode(ERRCODE_INVALID_PARAMETER_VALUE), + errmsg("Geometry has M dimension but column does not" ))); + } +} + + +static uint32 gserialized_typmod_in(ArrayType *arr, int is_geography) +{ + uint32 typmod = 0; + Datum *elem_values; + int n = 0; + int i = 0; + + if (ARR_ELEMTYPE(arr) != CSTRINGOID) + ereport(ERROR, + (errcode(ERRCODE_ARRAY_ELEMENT_ERROR), + errmsg("typmod array must be type cstring[]"))); + + if (ARR_NDIM(arr) != 1) + ereport(ERROR, + (errcode(ERRCODE_ARRAY_SUBSCRIPT_ERROR), + errmsg("typmod array must be one-dimensional"))); + + if (ARR_HASNULL(arr)) + ereport(ERROR, + (errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED), + errmsg("typmod array must not contain nulls"))); + + deconstruct_array(arr, + CSTRINGOID, -2, false, 'c', /* hardwire cstring representation details */ + &elem_values, NULL, &n); + + /* Set the SRID to the default value first */ + if ( is_geography) + TYPMOD_SET_SRID(typmod, SRID_DEFAULT); + else + TYPMOD_SET_SRID(typmod, SRID_UNKNOWN); + + for (i = 0; i < n; i++) + { + if ( i == 0 ) /* TYPE */ + { + char *s = DatumGetCString(elem_values[i]); + uint8_t type = 0; + int z = 0; + int m = 0; + + if ( geometry_type_from_string(s, &type, &z, &m) == LW_FAILURE ) + { + ereport(ERROR, + (errcode(ERRCODE_INVALID_PARAMETER_VALUE), + errmsg("Invalid geometry type modifier: %s", s))); + } + else + { + TYPMOD_SET_TYPE(typmod, type); + if ( z ) + TYPMOD_SET_Z(typmod); + if ( m ) + TYPMOD_SET_M(typmod); + } + } + if ( i == 1 ) /* SRID */ + { + int srid = pg_atoi(DatumGetCString(elem_values[i]), + sizeof(int32), '\0'); + srid = clamp_srid(srid); + POSTGIS_DEBUGF(3, "srid: %d", srid); + if ( srid != SRID_UNKNOWN ) + { + /* TODO: Check that the value + * provided is in fact a lonlat + * entry in spatial_ref_sysj + */ + /* For now, we only accept SRID_DEFAULT. */ + if ( is_geography && srid != SRID_DEFAULT ) + { + ereport(ERROR, + (errcode(ERRCODE_INVALID_PARAMETER_VALUE), + errmsg("Currently, only %d is accepted as an SRID for GEOGRAPHY", SRID_DEFAULT))); + } + else + { + TYPMOD_SET_SRID(typmod, srid); + } + } +#if 0 /* keep the default instead */ + else + { + if ( is_geography ) + { + ereport(ERROR, + (errcode(ERRCODE_INVALID_PARAMETER_VALUE), + errmsg("UNKNOWN SRID is not for GEOGRAPHY"))); + } + } +#endif /* keep the default for unknown */ + } + } + + pfree(elem_values); + + return typmod; +} + +/* +** geography_typmod_in(cstring[]) returns int32 +** +** Modified from ArrayGetIntegerTypmods in PostgreSQL 8.3 +*/ +PG_FUNCTION_INFO_V1(geography_typmod_in); +Datum geography_typmod_in(PG_FUNCTION_ARGS) +{ + ArrayType *arr = (ArrayType *) DatumGetPointer(PG_GETARG_DATUM(0)); + uint32 typmod = gserialized_typmod_in(arr, LW_TRUE); + PG_RETURN_INT32(typmod); +} + +/* +** geometry_typmod_in(cstring[]) returns int32 +** +** Modified from ArrayGetIntegerTypmods in PostgreSQL 8.3 +*/ +PG_FUNCTION_INFO_V1(geometry_typmod_in); +Datum geometry_typmod_in(PG_FUNCTION_ARGS) +{ + ArrayType *arr = (ArrayType *) DatumGetPointer(PG_GETARG_DATUM(0)); + uint32 typmod = gserialized_typmod_in(arr, LW_FALSE); /* Not a geography */; + PG_RETURN_INT32(typmod); +} + +/* +** geography_enforce_typmod(*GSERIALIZED, uint32) returns *GSERIALIZED +** Ensure that an incoming geometry conforms to typmod restrictions on +** type, dims and srid. +*/ +PG_FUNCTION_INFO_V1(geography_enforce_typmod); +Datum geography_enforce_typmod(PG_FUNCTION_ARGS) +{ + GSERIALIZED *arg = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + int32 typmod = PG_GETARG_INT32(1); + /* We don't need to have different behavior based on explicitness. */ + /* bool isExplicit = PG_GETARG_BOOL(2); */ + + /* Check if geometry typmod is consistent with the supplied one. */ + postgis_valid_typmod(arg, typmod); + + PG_RETURN_POINTER(arg); +} + +/* +** geometry_enforce_typmod(*GSERIALIZED, uint32) returns *GSERIALIZED +** Ensure that an incoming geometry conforms to typmod restrictions on +** type, dims and srid. +*/ +PG_FUNCTION_INFO_V1(geometry_enforce_typmod); +Datum geometry_enforce_typmod(PG_FUNCTION_ARGS) +{ + GSERIALIZED *arg = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + int32 typmod = PG_GETARG_INT32(1); + /* We don't need to have different behavior based on explicitness. */ + /* bool isExplicit = PG_GETARG_BOOL(2); */ + + /* Check if geometry typmod is consistent with the supplied one. */ + postgis_valid_typmod(arg, typmod); + + PG_RETURN_POINTER(arg); +} + + +/* +** postgis_typmod_type(uint32) returns cstring +** Used for geometry_columns and other views on system tables +*/ +PG_FUNCTION_INFO_V1(postgis_typmod_type); +Datum postgis_typmod_type(PG_FUNCTION_ARGS) +{ + int32 typmod = PG_GETARG_INT32(0); + int32 type = TYPMOD_GET_TYPE(typmod); + char *s = (char*)palloc(64); + char *ptr = s; + text *stext; + + /* Has type? */ + if ( typmod < 0 || type == 0 ) + ptr += sprintf(ptr, "Geometry"); + else + ptr += sprintf(ptr, "%s", lwtype_name(type)); + + /* Has Z? */ + if ( typmod >= 0 && TYPMOD_GET_Z(typmod) ) + ptr += sprintf(ptr, "%s", "Z"); + + /* Has M? */ + if ( typmod >= 0 && TYPMOD_GET_M(typmod) ) + ptr += sprintf(ptr, "%s", "M"); + + stext = cstring2text(s); + pfree(s); + PG_RETURN_TEXT_P(stext); +} + +/* +** postgis_typmod_dims(uint32) returns int +** Used for geometry_columns and other views on system tables +*/ +PG_FUNCTION_INFO_V1(postgis_typmod_dims); +Datum postgis_typmod_dims(PG_FUNCTION_ARGS) +{ + int32 typmod = PG_GETARG_INT32(0); + int32 dims = 2; + if ( typmod < 0 ) + PG_RETURN_INT32(dims); + if ( TYPMOD_GET_Z(typmod) ) + dims++; + if ( TYPMOD_GET_M(typmod) ) + dims++; + PG_RETURN_INT32(dims); +} + +/* +** postgis_typmod_srid(uint32) returns int +** Used for geometry_columns and other views on system tables +*/ +PG_FUNCTION_INFO_V1(postgis_typmod_srid); +Datum postgis_typmod_srid(PG_FUNCTION_ARGS) +{ + int32 typmod = PG_GETARG_INT32(0); + if ( typmod < 0 ) + PG_RETURN_INT32(0); + PG_RETURN_INT32(TYPMOD_GET_SRID(typmod)); +} + diff -Nru postgis-1.5.3/postgis/legacy.sql.in.c postgis-2.0.1/postgis/legacy.sql.in.c --- postgis-1.5.3/postgis/legacy.sql.in.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/postgis/legacy.sql.in.c 2012-05-16 08:29:14.000000000 +0000 @@ -0,0 +1,2016 @@ +-- $Id: legacy.sql.in.c 9735 2012-05-16 08:29:14Z robe $ +-- Legacy functions without chip functions -- +-- This is the full list including the legacy_minimal.sql (minimal) +-- so no need to install both legacy and the minimal +#include "legacy_minimal.sql.in.c" +--- start functions that in theory should never have been used or internal like stuff deprecated + +-- these were superceded by PostGIS_AddBBOX , PostGIS_DropBBOX, PostGIS_HasBBOX in 1.5 -- +CREATE OR REPLACE FUNCTION addbbox(geometry) + RETURNS geometry + AS 'MODULE_PATHNAME','LWGEOM_addBBOX' + LANGUAGE 'c' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION dropbbox(geometry) + RETURNS geometry + AS 'MODULE_PATHNAME','LWGEOM_dropBBOX' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION hasbbox(geometry) + RETURNS bool + AS 'MODULE_PATHNAME', 'LWGEOM_hasBBOX' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Availability: 1.2.2 -- never deprecated but don't think anyone uses it +CREATE OR REPLACE FUNCTION getsrid(geometry) + RETURNS int4 + AS 'MODULE_PATHNAME','LWGEOM_get_srid' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION GeometryFromText(text, int4) + RETURNS geometry + AS 'MODULE_PATHNAME','LWGEOM_from_text' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION GeometryFromText(text) + RETURNS geometry + AS 'MODULE_PATHNAME','LWGEOM_from_text' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION GeomFromWKB(bytea) + RETURNS geometry + AS 'MODULE_PATHNAME','LWGEOM_from_WKB' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION GeomFromWKB(bytea, int) + RETURNS geometry + AS 'SELECT ST_SetSRID(ST_GeomFromWKB($1), $2)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION noop(geometry) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_noop' + LANGUAGE 'c' VOLATILE STRICT; + +-- ESRI ArcSDE compatibility functions -- +-- We are remiving these because we don't +-- think ESRI relies on them +-- so their existence is pointless +-- Availability: 1.5.0 +-- PostGIS equivalent function: none +CREATE OR REPLACE FUNCTION SE_EnvelopesIntersect(geometry,geometry) + RETURNS boolean + AS $$ + SELECT $1 && $2 + $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION SE_Is3D(geometry) + RETURNS bool + AS 'MODULE_PATHNAME', 'LWGEOM_hasz' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Availability: 1.5.0 +CREATE OR REPLACE FUNCTION SE_IsMeasured(geometry) + RETURNS bool + AS 'MODULE_PATHNAME', 'LWGEOM_hasm' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- PostGIS equivalent function: Z(geometry) +CREATE OR REPLACE FUNCTION SE_Z(geometry) + RETURNS float8 + AS 'MODULE_PATHNAME','LWGEOM_z_point' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- PostGIS equivalent function: M(geometry) +CREATE OR REPLACE FUNCTION SE_M(geometry) + RETURNS float8 + AS 'MODULE_PATHNAME','LWGEOM_m_point' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- PostGIS equivalent function: locate_between_measures(geometry, float8, float8) +CREATE OR REPLACE FUNCTION SE_LocateBetween(geometry, float8, float8) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_locate_between_m' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- PostGIS equivalent function: locate_along_measure(geometry, float8) +CREATE OR REPLACE FUNCTION SE_LocateAlong(geometry, float8) + RETURNS geometry + AS $$ SELECT SE_LocateBetween($1, $2, $2) $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + + +--- Deprecation in 1.5.0 +CREATE OR REPLACE FUNCTION st_box2d(geometry) + RETURNS box2d + AS 'MODULE_PATHNAME','LWGEOM_to_BOX2D' + LANGUAGE 'c' IMMUTABLE STRICT; + +--- Deprecation in 1.5.0 +CREATE OR REPLACE FUNCTION st_box3d(geometry) + RETURNS box3d + AS 'MODULE_PATHNAME','LWGEOM_to_BOX3D' + LANGUAGE 'c' IMMUTABLE STRICT; + +--- Deprecation in 1.5.0 +CREATE OR REPLACE FUNCTION st_box(geometry) + RETURNS box + AS 'MODULE_PATHNAME','LWGEOM_to_BOX' + LANGUAGE 'c' IMMUTABLE STRICT; + +--- Deprecation in 1.5.0 +CREATE OR REPLACE FUNCTION st_box2d(box3d) + RETURNS box2d + AS 'MODULE_PATHNAME','BOX3D_to_BOX2D' + LANGUAGE 'c' IMMUTABLE STRICT; + +--- Deprecation in 1.5.0 +CREATE OR REPLACE FUNCTION st_box3d(box2d) + RETURNS box3d + AS 'MODULE_PATHNAME','BOX2D_to_BOX3D' + LANGUAGE 'c' IMMUTABLE STRICT; + +--- Deprecation in 1.5.0 +CREATE OR REPLACE FUNCTION st_box(box3d) + RETURNS box + AS 'MODULE_PATHNAME','BOX3D_to_BOX' + LANGUAGE 'c' IMMUTABLE STRICT; + +--- Deprecation in 1.5.0 +CREATE OR REPLACE FUNCTION st_text(geometry) + RETURNS text + AS 'MODULE_PATHNAME','LWGEOM_to_text' + LANGUAGE 'c' IMMUTABLE STRICT; + +--- Deprecation in 1.5.0 +CREATE OR REPLACE FUNCTION st_geometry(box2d) + RETURNS geometry + AS 'MODULE_PATHNAME','BOX2D_to_LWGEOM' + LANGUAGE 'c' IMMUTABLE STRICT; + +--- Deprecation in 1.5.0 +CREATE OR REPLACE FUNCTION st_geometry(box3d) + RETURNS geometry + AS 'MODULE_PATHNAME','BOX3D_to_LWGEOM' + LANGUAGE 'c' IMMUTABLE STRICT; + +--- Deprecation in 1.5.0 +CREATE OR REPLACE FUNCTION st_geometry(text) + RETURNS geometry + AS 'MODULE_PATHNAME','parse_WKT_lwgeom' + LANGUAGE 'c' IMMUTABLE STRICT; + +--- Deprecation in 1.5.0 +CREATE OR REPLACE FUNCTION st_geometry(bytea) + RETURNS geometry + AS 'MODULE_PATHNAME','LWGEOM_from_bytea' + LANGUAGE 'c' IMMUTABLE STRICT; + +--- Deprecation in 1.5.0 +CREATE OR REPLACE FUNCTION st_bytea(geometry) + RETURNS bytea + AS 'MODULE_PATHNAME','LWGEOM_to_bytea' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.5.0 +CREATE OR REPLACE FUNCTION st_box3d_in(cstring) + RETURNS box3d + AS 'MODULE_PATHNAME', 'BOX3D_in' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.5.0 +CREATE OR REPLACE FUNCTION st_box3d_out(box3d) + RETURNS cstring + AS 'MODULE_PATHNAME', 'BOX3D_out' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- START MANAGEMENT FUNCTIONS +-- These are legacy management functions with no place in our 2.0 world +----------------------------------------------------------------------- +-- RENAME_GEOMETRY_TABLE_CONSTRAINTS() +----------------------------------------------------------------------- +-- This function has been obsoleted for the difficulty in +-- finding attribute on which the constraint is applied. +-- AddGeometryColumn will name the constraints in a meaningful +-- way, but nobody can rely on it since old postgis versions did +-- not do that. +----------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION rename_geometry_table_constraints() RETURNS text +AS +$$ +SELECT 'rename_geometry_table_constraint() is obsoleted'::text +$$ +LANGUAGE 'sql' IMMUTABLE; + +----------------------------------------------------------------------- +-- FIX_GEOMETRY_COLUMNS() +----------------------------------------------------------------------- +-- This function will: +-- +-- o try to fix the schema of records with an integer one +-- (for PG>=73) +-- +-- o link records to system tables through attrelid and varattnum +-- (for PG<75) +-- +-- o delete all records for which no linking was possible +-- (for PG<75) +-- +-- +----------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION fix_geometry_columns() RETURNS text +AS +$$ +DECLARE + mislinked record; + result text; + linked integer; + deleted integer; + foundschema integer; +BEGIN + + -- Since 7.3 schema support has been added. + -- Previous postgis versions used to put the database name in + -- the schema column. This needs to be fixed, so we try to + -- set the correct schema for each geometry_colums record + -- looking at table, column, type and srid. + /** UPDATE geometry_columns SET f_table_schema = n.nspname + FROM pg_namespace n, pg_class c, pg_attribute a, + pg_constraint sridcheck, pg_constraint typecheck + WHERE ( f_table_schema is NULL + OR f_table_schema = '' + OR f_table_schema NOT IN ( + SELECT nspname::varchar + FROM pg_namespace nn, pg_class cc, pg_attribute aa + WHERE cc.relnamespace = nn.oid + AND cc.relname = f_table_name::name + AND aa.attrelid = cc.oid + AND aa.attname = f_geometry_column::name)) + AND f_table_name::name = c.relname + AND c.oid = a.attrelid + AND c.relnamespace = n.oid + AND f_geometry_column::name = a.attname + + AND sridcheck.conrelid = c.oid + AND sridcheck.consrc LIKE '(%srid(% = %)' + AND sridcheck.consrc ~ textcat(' = ', srid::text) + + AND typecheck.conrelid = c.oid + AND typecheck.consrc LIKE + '((geometrytype(%) = ''%''::text) OR (% IS NULL))' + AND typecheck.consrc ~ textcat(' = ''', type::text) + + AND NOT EXISTS ( + SELECT oid FROM geometry_columns gc + WHERE c.relname::varchar = gc.f_table_name + AND n.nspname::varchar = gc.f_table_schema + AND a.attname::varchar = gc.f_geometry_column + ); + + GET DIAGNOSTICS foundschema = ROW_COUNT; + + -- no linkage to system table needed + return 'fixed:'||foundschema::text; **/ + return 'This function is obsolete now that geometry_columns is a view'; + +END; +$$ +LANGUAGE 'plpgsql' VOLATILE; + +----------------------------------------------------------------------- +-- PROBE_GEOMETRY_COLUMNS() +----------------------------------------------------------------------- +-- Fill the geometry_columns table with values probed from the system +-- catalogues. This is done by simply looking up constraints previously +-- added to a geometry column. If geometry constraints are missing, no +-- attempt is made to add the necessary constraints to the geometry +-- column, nor is it recorded in the geometry_columns table. +-- 3d flag cannot be probed, it defaults to 2 +-- +-- Note that bogus records already in geometry_columns are not +-- overridden (a check for schema.table.column is performed), so +-- to have a fresh probe backup your geometry_columns, delete from +-- it and probe. +----------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION probe_geometry_columns() RETURNS text AS +$$ +DECLARE + inserted integer; + oldcount integer; + probed integer; + stale integer; +BEGIN + +/* SELECT count(*) INTO oldcount FROM geometry_columns; + + SELECT count(*) INTO probed + FROM pg_class c, pg_attribute a, pg_type t, + pg_namespace n, + pg_constraint sridcheck, pg_constraint typecheck + + WHERE t.typname = 'geometry' + AND a.atttypid = t.oid + AND a.attrelid = c.oid + AND c.relnamespace = n.oid + AND sridcheck.connamespace = n.oid + AND typecheck.connamespace = n.oid + AND sridcheck.conrelid = c.oid + AND sridcheck.consrc LIKE '(%srid('||a.attname||') = %)' + AND typecheck.conrelid = c.oid + AND typecheck.consrc LIKE + '((geometrytype('||a.attname||') = ''%''::text) OR (% IS NULL))' + ; + + INSERT INTO geometry_columns SELECT + ''::varchar as f_table_catalogue, + n.nspname::varchar as f_table_schema, + c.relname::varchar as f_table_name, + a.attname::varchar as f_geometry_column, + 2 as coord_dimension, + trim(both ' =)' from + replace(replace(split_part( + sridcheck.consrc, ' = ', 2), ')', ''), '(', ''))::integer AS srid, + trim(both ' =)''' from substr(typecheck.consrc, + strpos(typecheck.consrc, '='), + strpos(typecheck.consrc, '::')- + strpos(typecheck.consrc, '=') + ))::varchar as type + FROM pg_class c, pg_attribute a, pg_type t, + pg_namespace n, + pg_constraint sridcheck, pg_constraint typecheck + WHERE t.typname = 'geometry' + AND a.atttypid = t.oid + AND a.attrelid = c.oid + AND c.relnamespace = n.oid + AND sridcheck.connamespace = n.oid + AND typecheck.connamespace = n.oid + AND sridcheck.conrelid = c.oid + AND sridcheck.consrc LIKE '(%srid('||a.attname||') = %)' + AND typecheck.conrelid = c.oid + AND typecheck.consrc LIKE + '((geometrytype('||a.attname||') = ''%''::text) OR (% IS NULL))' + + AND NOT EXISTS ( + SELECT oid FROM geometry_columns gc + WHERE c.relname::varchar = gc.f_table_name + AND n.nspname::varchar = gc.f_table_schema + AND a.attname::varchar = gc.f_geometry_column + ); + + GET DIAGNOSTICS inserted = ROW_COUNT; + + IF oldcount > probed THEN + stale = oldcount-probed; + ELSE + stale = 0; + END IF; + + RETURN 'probed:'||probed::text|| + ' inserted:'||inserted::text|| + ' conflicts:'||(probed-inserted)::text|| + ' stale:'||stale::text;*/ + RETURN 'This function is obsolete now that geometry_columns is a view'; +END + +$$ +LANGUAGE 'plpgsql' VOLATILE; + + + +-- END MANAGEMENT FUNCTIONS -- + +-- Deprecation in 1.5.0 +-- these remarked out functions cause problems and no one uses them directly +-- They should not be installed +/** CREATE OR REPLACE FUNCTION st_geometry_analyze(internal) + RETURNS bool + AS 'MODULE_PATHNAME', 'geometry_analyze' + LANGUAGE 'c' VOLATILE STRICT; + +-- Deprecation in 1.5.0 +CREATE OR REPLACE FUNCTION st_geometry_in(cstring) + RETURNS geometry + AS 'MODULE_PATHNAME','LWGEOM_in' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.5.0 +CREATE OR REPLACE FUNCTION st_geometry_out(geometry) + RETURNS cstring + AS 'MODULE_PATHNAME','LWGEOM_out' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.5.0 +CREATE OR REPLACE FUNCTION st_geometry_recv(internal) + RETURNS geometry + AS 'MODULE_PATHNAME','LWGEOM_recv' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.5.0 +CREATE OR REPLACE FUNCTION st_geometry_send(geometry) + RETURNS bytea + AS 'MODULE_PATHNAME','LWGEOM_send' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.5.0 +CREATE OR REPLACE FUNCTION st_spheroid_in(cstring) + RETURNS spheroid + AS 'MODULE_PATHNAME','ellipsoid_in' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.5.0 +CREATE OR REPLACE FUNCTION st_spheroid_out(spheroid) + RETURNS cstring + AS 'MODULE_PATHNAME','ellipsoid_out' + LANGUAGE 'c' IMMUTABLE STRICT; + +**/ +-- Deprecation in 1.5.0 +CREATE OR REPLACE FUNCTION st_geometry_lt(geometry, geometry) + RETURNS bool + AS 'MODULE_PATHNAME', 'lwgeom_lt' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.5.0 +CREATE OR REPLACE FUNCTION st_geometry_le(geometry, geometry) + RETURNS bool + AS 'MODULE_PATHNAME', 'lwgeom_le' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.5.0 +CREATE OR REPLACE FUNCTION st_geometry_gt(geometry, geometry) + RETURNS bool + AS 'MODULE_PATHNAME', 'lwgeom_gt' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.5.0 +CREATE OR REPLACE FUNCTION st_geometry_ge(geometry, geometry) + RETURNS bool + AS 'MODULE_PATHNAME', 'lwgeom_ge' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.5.0 +CREATE OR REPLACE FUNCTION st_geometry_eq(geometry, geometry) + RETURNS bool + AS 'MODULE_PATHNAME', 'lwgeom_eq' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.5.0 +CREATE OR REPLACE FUNCTION st_geometry_cmp(geometry, geometry) + RETURNS integer + AS 'MODULE_PATHNAME', 'lwgeom_cmp' + LANGUAGE 'c' IMMUTABLE STRICT; + + +--- end functions that in theory should never have been used + + +-- begin old ogc (and non-ST) names that have been replaced with new SQL-MM and SQL ST_ Like names -- +-- AFFINE Functions -- +-- Availability: 1.1.2 +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION Affine(geometry,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_affine' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Availability: 1.1.2 +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION Affine(geometry,float8,float8,float8,float8,float8,float8) + RETURNS geometry + AS 'SELECT st_affine($1, $2, $3, 0, $4, $5, 0, 0, 0, 1, $6, $7, 0)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Availability: 1.1.2 +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION RotateZ(geometry,float8) + RETURNS geometry + AS 'SELECT st_affine($1, cos($2), -sin($2), 0, sin($2), cos($2), 0, 0, 0, 1, 0, 0, 0)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Availability: 1.1.2 +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION Rotate(geometry,float8) + RETURNS geometry + AS 'SELECT st_rotateZ($1, $2)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Availability: 1.1.2 +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION RotateX(geometry,float8) + RETURNS geometry + AS 'SELECT st_affine($1, 1, 0, 0, 0, cos($2), -sin($2), 0, sin($2), cos($2), 0, 0, 0)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Availability: 1.1.2 +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION RotateY(geometry,float8) + RETURNS geometry + AS 'SELECT st_affine($1, cos($2), 0, sin($2), 0, 1, 0, -sin($2), 0, cos($2), 0, 0, 0)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Availability: 1.1.0 +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION Scale(geometry,float8,float8,float8) + RETURNS geometry + AS 'SELECT st_affine($1, $2, 0, 0, 0, $3, 0, 0, 0, $4, 0, 0, 0)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Availability: 1.1.0 +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION Scale(geometry,float8,float8) + RETURNS geometry + AS 'SELECT st_scale($1, $2, $3, 1)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION Translate(geometry,float8,float8,float8) + RETURNS geometry + AS 'SELECT st_affine($1, 1, 0, 0, 0, 1, 0, 0, 0, 1, $2, $3, $4)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION Translate(geometry,float8,float8) + RETURNS geometry + AS 'SELECT st_translate($1, $2, $3, 0)' + LANGUAGE 'sql' IMMUTABLE STRICT; + + +-- Availability: 1.1.0 +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION TransScale(geometry,float8,float8,float8,float8) + RETURNS geometry + AS 'SELECT st_affine($1, $4, 0, 0, 0, $5, 0, + 0, 0, 1, $2 * $4, $3 * $5, 0)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- END Affine functions + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION AddPoint(geometry, geometry) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_addpoint' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION AddPoint(geometry, geometry, integer) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_addpoint' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION Area(geometry) + RETURNS FLOAT8 + AS 'MODULE_PATHNAME','LWGEOM_area_polygon' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- this is an alias for 'area(geometry)' +-- there is nothing such an 'area3d'... +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION Area2D(geometry) + RETURNS FLOAT8 + AS 'MODULE_PATHNAME', 'LWGEOM_area_polygon' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION AsEWKB(geometry) + RETURNS BYTEA + AS 'MODULE_PATHNAME','WKBFromLWGEOM' + LANGUAGE 'c' IMMUTABLE STRICT; + + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION AsEWKB(geometry,text) + RETURNS bytea + AS 'MODULE_PATHNAME','WKBFromLWGEOM' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION AsEWKT(geometry) + RETURNS TEXT + AS 'MODULE_PATHNAME','LWGEOM_asEWKT' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- AsGML(geom) / precision=15 version=2 +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION AsGML(geometry) + RETURNS TEXT + AS 'SELECT _ST_AsGML(2, $1, 15, 0, null)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION AsGML(geometry, int4) + RETURNS TEXT + AS 'SELECT _ST_AsGML(2, $1, $2, 0, null)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- AsKML(geom, precision) / version=2 +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION AsKML(geometry, int4) + RETURNS TEXT + AS 'SELECT _ST_AsKML(2, ST_transform($1,4326), $2, null)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- AsKML(geom) / precision=15 version=2 +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION AsKML(geometry) + RETURNS TEXT + AS 'SELECT _ST_AsKML(2, ST_Transform($1,4326), 15, null)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- AsKML(version, geom, precision) +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION AsKML(int4, geometry, int4) + RETURNS TEXT + AS 'SELECT _ST_AsKML($1, ST_Transform($2,4326), $3, null)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION AsHEXEWKB(geometry) + RETURNS TEXT + AS 'MODULE_PATHNAME','LWGEOM_asHEXEWKB' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION AsHEXEWKB(geometry, text) + RETURNS TEXT + AS 'MODULE_PATHNAME','LWGEOM_asHEXEWKB' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION AsSVG(geometry) + RETURNS TEXT + AS 'MODULE_PATHNAME','LWGEOM_asSVG' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION AsSVG(geometry,int4) + RETURNS TEXT + AS 'MODULE_PATHNAME','LWGEOM_asSVG' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION AsSVG(geometry,int4,int4) + RETURNS TEXT + AS 'MODULE_PATHNAME','LWGEOM_asSVG' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION azimuth(geometry,geometry) + RETURNS float8 + AS 'MODULE_PATHNAME', 'LWGEOM_azimuth' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION BdPolyFromText(text, integer) +RETURNS geometry +AS $$ +DECLARE + geomtext alias for $1; + srid alias for $2; + mline geometry; + geom geometry; +BEGIN + mline := ST_MultiLineStringFromText(geomtext, srid); + + IF mline IS NULL + THEN + RAISE EXCEPTION 'Input is not a MultiLinestring'; + END IF; + + geom := ST_BuildArea(mline); + + IF GeometryType(geom) != 'POLYGON' + THEN + RAISE EXCEPTION 'Input returns more then a single polygon, try using BdMPolyFromText instead'; + END IF; + + RETURN geom; +END; +$$ +LANGUAGE 'plpgsql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION BdMPolyFromText(text, integer) +RETURNS geometry +AS $$ +DECLARE + geomtext alias for $1; + srid alias for $2; + mline geometry; + geom geometry; +BEGIN + mline := ST_MultiLineStringFromText(geomtext, srid); + + IF mline IS NULL + THEN + RAISE EXCEPTION 'Input is not a MultiLinestring'; + END IF; + + geom := ST_Multi(ST_BuildArea(mline)); + + RETURN geom; +END; +$$ +LANGUAGE 'plpgsql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION boundary(geometry) + RETURNS geometry + AS 'MODULE_PATHNAME','boundary' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION buffer(geometry,float8,integer) + RETURNS geometry + AS 'SELECT ST_Buffer($1, $2, $3)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION buffer(geometry,float8) + RETURNS geometry + AS 'MODULE_PATHNAME','buffer' + LANGUAGE 'c' IMMUTABLE STRICT + COST 100; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION BuildArea(geometry) + RETURNS geometry + AS 'MODULE_PATHNAME', 'ST_BuildArea' + LANGUAGE 'c' IMMUTABLE STRICT + COST 100; + +-- This is also available w/out GEOS +CREATE OR REPLACE FUNCTION Centroid(geometry) + RETURNS geometry + AS 'MODULE_PATHNAME' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION Contains(geometry,geometry) + RETURNS boolean + AS 'MODULE_PATHNAME' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION convexhull(geometry) + RETURNS geometry + AS 'MODULE_PATHNAME','convexhull' + LANGUAGE 'c' IMMUTABLE STRICT + COST 100; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION crosses(geometry,geometry) + RETURNS boolean + AS 'MODULE_PATHNAME' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION distance(geometry,geometry) + RETURNS float8 + AS 'MODULE_PATHNAME', 'LWGEOM_mindistance2d' + LANGUAGE 'c' IMMUTABLE STRICT + COST 100; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION difference(geometry,geometry) + RETURNS geometry + AS 'MODULE_PATHNAME','difference' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION Dimension(geometry) + RETURNS int4 + AS 'MODULE_PATHNAME', 'LWGEOM_dimension' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION disjoint(geometry,geometry) + RETURNS boolean + AS 'MODULE_PATHNAME' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION distance_sphere(geometry,geometry) + RETURNS FLOAT8 + AS 'MODULE_PATHNAME','LWGEOM_distance_sphere' + LANGUAGE 'c' IMMUTABLE STRICT + COST 100; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION distance_spheroid(geometry,geometry,spheroid) + RETURNS FLOAT8 + AS 'MODULE_PATHNAME','LWGEOM_distance_ellipsoid' + LANGUAGE 'c' IMMUTABLE STRICT + COST 100; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION Dump(geometry) + RETURNS SETOF geometry_dump + AS 'MODULE_PATHNAME', 'LWGEOM_dump' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION DumpRings(geometry) + RETURNS SETOF geometry_dump + AS 'MODULE_PATHNAME', 'LWGEOM_dump_rings' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION Envelope(geometry) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_envelope' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION Expand(box2d,float8) + RETURNS box2d + AS 'MODULE_PATHNAME', 'BOX2D_expand' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION Expand(box3d,float8) + RETURNS box3d + AS 'MODULE_PATHNAME', 'BOX3D_expand' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION Expand(geometry,float8) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_expand' + LANGUAGE 'c' IMMUTABLE STRICT; + +CREATE AGGREGATE Extent( + sfunc = ST_combine_bbox, + basetype = geometry, + finalfunc = box2d, + stype = box3d + ); + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION Find_Extent(text,text) RETURNS box2d AS +$$ +DECLARE + tablename alias for $1; + columnname alias for $2; + myrec RECORD; + +BEGIN + FOR myrec IN EXECUTE 'SELECT ST_Extent("' || columnname || '") As extent FROM "' || tablename || '"' LOOP + return myrec.extent; + END LOOP; +END; +$$ +LANGUAGE 'plpgsql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION Find_Extent(text,text,text) RETURNS box2d AS +$$ +DECLARE + schemaname alias for $1; + tablename alias for $2; + columnname alias for $3; + myrec RECORD; + +BEGIN + FOR myrec IN EXECUTE 'SELECT ST_Extent("' || columnname || '") FROM "' || schemaname || '"."' || tablename || '" As extent ' LOOP + return myrec.extent; + END LOOP; +END; +$$ +LANGUAGE 'plpgsql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION EndPoint(geometry) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_endpoint_linestring' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION ExteriorRing(geometry) + RETURNS geometry + AS 'MODULE_PATHNAME','LWGEOM_exteriorring_polygon' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION Force_2d(geometry) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_force_2d' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- an alias for force_3dz +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION Force_3d(geometry) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_force_3dz' + LANGUAGE 'c' IMMUTABLE STRICT; + + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION Force_3dm(geometry) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_force_3dm' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION Force_3dz(geometry) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_force_3dz' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION Force_4d(geometry) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_force_4d' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION Force_Collection(geometry) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_force_collection' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION ForceRHR(geometry) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_force_clockwise_poly' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION GeomCollFromText(text, int4) + RETURNS geometry + AS ' + SELECT CASE + WHEN geometrytype(GeomFromText($1, $2)) = ''GEOMETRYCOLLECTION'' + THEN GeomFromText($1,$2) + ELSE NULL END + ' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION GeomCollFromText(text) + RETURNS geometry + AS ' + SELECT CASE + WHEN geometrytype(GeomFromText($1)) = ''GEOMETRYCOLLECTION'' + THEN GeomFromText($1) + ELSE NULL END + ' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION GeomCollFromWKB(bytea, int) + RETURNS geometry + AS ' + SELECT CASE + WHEN geometrytype(GeomFromWKB($1, $2)) = ''GEOMETRYCOLLECTION'' + THEN GeomFromWKB($1, $2) + ELSE NULL END + ' + LANGUAGE 'sql' IMMUTABLE STRICT; + + -- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION GeomCollFromWKB(bytea) + RETURNS geometry + AS ' + SELECT CASE + WHEN geometrytype(GeomFromWKB($1)) = ''GEOMETRYCOLLECTION'' + THEN GeomFromWKB($1) + ELSE NULL END + ' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION GeometryN(geometry,integer) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_geometryn_collection' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION GeomUnion(geometry,geometry) + RETURNS geometry + AS 'MODULE_PATHNAME','geomunion' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Availability: 1.5.0 -- replaced with postgis_getbbox +CREATE OR REPLACE FUNCTION getbbox(geometry) + RETURNS box2d + AS 'MODULE_PATHNAME','LWGEOM_to_BOX2D' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION intersects(geometry,geometry) + RETURNS boolean + AS 'MODULE_PATHNAME' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION IsRing(geometry) + RETURNS boolean + AS 'MODULE_PATHNAME' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION IsSimple(geometry) + RETURNS boolean + AS 'MODULE_PATHNAME', 'issimple' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION length_spheroid(geometry, spheroid) + RETURNS FLOAT8 + AS 'MODULE_PATHNAME','LWGEOM_length_ellipsoid_linestring' + LANGUAGE 'c' IMMUTABLE STRICT + COST 100; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION length2d_spheroid(geometry, spheroid) + RETURNS FLOAT8 + AS 'MODULE_PATHNAME','LWGEOM_length2d_ellipsoid' + LANGUAGE 'c' IMMUTABLE STRICT + COST 100; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION length3d_spheroid(geometry, spheroid) + RETURNS FLOAT8 + AS 'MODULE_PATHNAME','LWGEOM_length_ellipsoid_linestring' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION LineMerge(geometry) + RETURNS geometry + AS 'MODULE_PATHNAME', 'linemerge' + LANGUAGE 'c' IMMUTABLE STRICT + COST 100; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION locate_along_measure(geometry, float8) + RETURNS geometry + AS $$ SELECT ST_locate_between_measures($1, $2, $2) $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION MakeBox2d(geometry, geometry) + RETURNS box2d + AS 'MODULE_PATHNAME', 'BOX2D_construct' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION MakePolygon(geometry, geometry[]) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_makepoly' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION MakePolygon(geometry) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_makepoly' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION MPolyFromWKB(bytea) + RETURNS geometry + AS ' + SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = ''MULTIPOLYGON'' + THEN GeomFromWKB($1) + ELSE NULL END + ' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION multi(geometry) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_force_multi' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION MultiPolyFromWKB(bytea, int) + RETURNS geometry + AS ' + SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = ''MULTIPOLYGON'' + THEN GeomFromWKB($1, $2) + ELSE NULL END + ' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION MultiPolyFromWKB(bytea) + RETURNS geometry + AS ' + SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = ''MULTIPOLYGON'' + THEN GeomFromWKB($1) + ELSE NULL END + ' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION InteriorRingN(geometry,integer) + RETURNS geometry + AS 'MODULE_PATHNAME','LWGEOM_interiorringn_polygon' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION intersection(geometry,geometry) + RETURNS geometry + AS 'MODULE_PATHNAME','intersection' + LANGUAGE 'c' IMMUTABLE STRICT; + + -- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION IsClosed(geometry) + RETURNS boolean + AS 'MODULE_PATHNAME', 'LWGEOM_isclosed' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION IsEmpty(geometry) + RETURNS boolean + AS 'MODULE_PATHNAME', 'LWGEOM_isempty' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION IsValid(geometry) + RETURNS boolean + AS 'MODULE_PATHNAME', 'isvalid' + LANGUAGE 'c' IMMUTABLE STRICT + COST 100; +-- this is a fake (for back-compatibility) +-- uses 3d if 3d is available, 2d otherwise +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION length3d(geometry) + RETURNS FLOAT8 + AS 'MODULE_PATHNAME', 'LWGEOM_length_linestring' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION length2d(geometry) + RETURNS FLOAT8 + AS 'MODULE_PATHNAME', 'LWGEOM_length2d_linestring' + LANGUAGE 'c' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION length(geometry) + RETURNS FLOAT8 + AS 'MODULE_PATHNAME', 'LWGEOM_length_linestring' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION line_interpolate_point(geometry, float8) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_line_interpolate_point' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION line_locate_point(geometry, geometry) + RETURNS float8 + AS 'MODULE_PATHNAME', 'LWGEOM_line_locate_point' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION line_substring(geometry, float8, float8) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_line_substring' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION LineFromText(text) + RETURNS geometry + AS ' + SELECT CASE WHEN geometrytype(GeomFromText($1)) = ''LINESTRING'' + THEN GeomFromText($1) + ELSE NULL END + ' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION LineFromText(text, int4) + RETURNS geometry + AS ' + SELECT CASE WHEN geometrytype(GeomFromText($1, $2)) = ''LINESTRING'' + THEN GeomFromText($1,$2) + ELSE NULL END + ' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION LineFromMultiPoint(geometry) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_line_from_mpoint' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION LineFromWKB(bytea, int) + RETURNS geometry + AS ' + SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = ''LINESTRING'' + THEN GeomFromWKB($1, $2) + ELSE NULL END + ' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION LineFromWKB(bytea) + RETURNS geometry + AS ' + SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = ''LINESTRING'' + THEN GeomFromWKB($1) + ELSE NULL END + ' + LANGUAGE 'sql' IMMUTABLE STRICT; + + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION LineStringFromText(text) + RETURNS geometry + AS 'SELECT LineFromText($1)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION LineStringFromText(text, int4) + RETURNS geometry + AS 'SELECT LineFromText($1, $2)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION LinestringFromWKB(bytea, int) + RETURNS geometry + AS ' + SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = ''LINESTRING'' + THEN GeomFromWKB($1, $2) + ELSE NULL END + ' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION LinestringFromWKB(bytea) + RETURNS geometry + AS ' + SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = ''LINESTRING'' + THEN GeomFromWKB($1) + ELSE NULL END + ' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION locate_between_measures(geometry, float8, float8) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_locate_between_m' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION M(geometry) + RETURNS float8 + AS 'MODULE_PATHNAME','LWGEOM_m_point' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION MakeBox3d(geometry, geometry) + RETURNS box3d + AS 'MODULE_PATHNAME', 'BOX3D_construct' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION makeline_garray (geometry[]) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_makeline_garray' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE AGGREGATE makeline ( + BASETYPE = geometry, + SFUNC = pgis_geometry_accum_transfn, + STYPE = pgis_abs, + FINALFUNC = pgis_geometry_makeline_finalfn + ); + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION MakeLine(geometry, geometry) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_makeline' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION MakePoint(float8, float8) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_makepoint' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION MakePoint(float8, float8, float8) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_makepoint' + LANGUAGE 'c' IMMUTABLE STRICT; + + -- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION MakePoint(float8, float8, float8, float8) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_makepoint' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION MakePointM(float8, float8, float8) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_makepoint3dm' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- This should really be deprecated -- 2011-01-04 robe +CREATE OR REPLACE FUNCTION max_distance(geometry,geometry) + RETURNS float8 + AS 'MODULE_PATHNAME', 'LWGEOM_maxdistance2d_linestring' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION mem_size(geometry) + RETURNS int4 + AS 'MODULE_PATHNAME', 'LWGEOM_mem_size' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION MLineFromText(text, int4) + RETURNS geometry + AS ' + SELECT CASE + WHEN geometrytype(GeomFromText($1, $2)) = ''MULTILINESTRING'' + THEN GeomFromText($1,$2) + ELSE NULL END + ' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION MLineFromText(text) + RETURNS geometry + AS ' + SELECT CASE WHEN geometrytype(GeomFromText($1)) = ''MULTILINESTRING'' + THEN GeomFromText($1) + ELSE NULL END + ' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION MLineFromWKB(bytea, int) + RETURNS geometry + AS ' + SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = ''MULTILINESTRING'' + THEN GeomFromWKB($1, $2) + ELSE NULL END + ' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION MLineFromWKB(bytea) + RETURNS geometry + AS ' + SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = ''MULTILINESTRING'' + THEN GeomFromWKB($1) + ELSE NULL END + ' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION MPointFromText(text, int4) + RETURNS geometry + AS ' + SELECT CASE WHEN geometrytype(GeomFromText($1,$2)) = ''MULTIPOINT'' + THEN GeomFromText($1,$2) + ELSE NULL END + ' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION MPointFromText(text) + RETURNS geometry + AS ' + SELECT CASE WHEN geometrytype(GeomFromText($1)) = ''MULTIPOINT'' + THEN GeomFromText($1) + ELSE NULL END + ' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION MPointFromWKB(bytea, int) + RETURNS geometry + AS ' + SELECT CASE WHEN geometrytype(GeomFromWKB($1,$2)) = ''MULTIPOINT'' + THEN GeomFromWKB($1, $2) + ELSE NULL END + ' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION MPointFromWKB(bytea) + RETURNS geometry + AS ' + SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = ''MULTIPOINT'' + THEN GeomFromWKB($1) + ELSE NULL END + ' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION MPolyFromText(text, int4) + RETURNS geometry + AS ' + SELECT CASE WHEN geometrytype(GeomFromText($1, $2)) = ''MULTIPOLYGON'' + THEN GeomFromText($1,$2) + ELSE NULL END + ' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION MPolyFromText(text) + RETURNS geometry + AS ' + SELECT CASE WHEN geometrytype(GeomFromText($1)) = ''MULTIPOLYGON'' + THEN GeomFromText($1) + ELSE NULL END + ' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION MPolyFromWKB(bytea, int) + RETURNS geometry + AS ' + SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = ''MULTIPOLYGON'' + THEN GeomFromWKB($1, $2) + ELSE NULL END + ' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION MultiLineFromWKB(bytea, int) + RETURNS geometry + AS ' + SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = ''MULTILINESTRING'' + THEN GeomFromWKB($1, $2) + ELSE NULL END + ' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Availability: 1.2.2 +CREATE OR REPLACE FUNCTION MultiLineFromWKB(bytea, int) + RETURNS geometry + AS ' + SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = ''MULTILINESTRING'' + THEN GeomFromWKB($1, $2) + ELSE NULL END + ' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION MultiLineFromWKB(bytea) + RETURNS geometry + AS ' + SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = ''MULTILINESTRING'' + THEN GeomFromWKB($1) + ELSE NULL END + ' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION MultiLineStringFromText(text) + RETURNS geometry + AS 'SELECT ST_MLineFromText($1)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION MultiLineStringFromText(text, int4) + RETURNS geometry + AS 'SELECT MLineFromText($1, $2)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION MultiPointFromText(text) + RETURNS geometry + AS 'SELECT MPointFromText($1)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION MultiPointFromText(text) + RETURNS geometry + AS 'SELECT MPointFromText($1)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION MultiPointFromText(text, int4) + RETURNS geometry + AS 'SELECT MPointFromText($1, $2)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION MultiPointFromWKB(bytea, int) + RETURNS geometry + AS ' + SELECT CASE WHEN geometrytype(GeomFromWKB($1,$2)) = ''MULTIPOINT'' + THEN GeomFromWKB($1, $2) + ELSE NULL END + ' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION MultiPointFromWKB(bytea) + RETURNS geometry + AS ' + SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = ''MULTIPOINT'' + THEN GeomFromWKB($1) + ELSE NULL END + ' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION MultiPolygonFromText(text, int4) + RETURNS geometry + AS 'SELECT MPolyFromText($1, $2)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION MultiPolygonFromText(text) + RETURNS geometry + AS 'SELECT MPolyFromText($1)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION NumInteriorRing(geometry) + RETURNS integer + AS 'MODULE_PATHNAME','LWGEOM_numinteriorrings_polygon' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION NumInteriorRings(geometry) + RETURNS integer + AS 'MODULE_PATHNAME','LWGEOM_numinteriorrings_polygon' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION npoints(geometry) + RETURNS int4 + AS 'MODULE_PATHNAME', 'LWGEOM_npoints' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION nrings(geometry) + RETURNS int4 + AS 'MODULE_PATHNAME', 'LWGEOM_nrings' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION NumGeometries(geometry) + RETURNS int4 + AS 'MODULE_PATHNAME', 'LWGEOM_numgeometries_collection' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION NumPoints(geometry) + RETURNS int4 + AS 'MODULE_PATHNAME', 'LWGEOM_numpoints_linestring' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION overlaps(geometry,geometry) + RETURNS boolean + AS 'MODULE_PATHNAME' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- this is a fake (for back-compatibility) +-- uses 3d if 3d is available, 2d otherwise +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION perimeter3d(geometry) + RETURNS FLOAT8 + AS 'MODULE_PATHNAME', 'LWGEOM_perimeter_poly' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION perimeter2d(geometry) + RETURNS FLOAT8 + AS 'MODULE_PATHNAME', 'LWGEOM_perimeter2d_poly' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION point_inside_circle(geometry,float8,float8,float8) + RETURNS bool + AS 'MODULE_PATHNAME', 'LWGEOM_inside_circle_point' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION PointFromText(text) + RETURNS geometry + AS ' + SELECT CASE WHEN geometrytype(GeomFromText($1)) = ''POINT'' + THEN GeomFromText($1) + ELSE NULL END + ' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION PointFromText(text, int4) + RETURNS geometry + AS ' + SELECT CASE WHEN geometrytype(GeomFromText($1, $2)) = ''POINT'' + THEN GeomFromText($1,$2) + ELSE NULL END + ' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION PointFromWKB(bytea) + RETURNS geometry + AS ' + SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = ''POINT'' + THEN GeomFromWKB($1) + ELSE NULL END + ' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION PointFromWKB(bytea, int) + RETURNS geometry + AS ' + SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1, $2)) = ''POINT'' + THEN GeomFromWKB($1, $2) + ELSE NULL END + ' + LANGUAGE 'sql' IMMUTABLE STRICT; + + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION PointN(geometry,integer) + RETURNS geometry + AS 'MODULE_PATHNAME','LWGEOM_pointn_linestring' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION PointOnSurface(geometry) + RETURNS geometry + AS 'MODULE_PATHNAME' + LANGUAGE 'c' IMMUTABLE STRICT; + + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION PolyFromText(text) + RETURNS geometry + AS ' + SELECT CASE WHEN geometrytype(GeomFromText($1)) = ''POLYGON'' + THEN GeomFromText($1) + ELSE NULL END + ' + LANGUAGE 'sql' IMMUTABLE STRICT; +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION PolyFromText(text, int4) + RETURNS geometry + AS ' + SELECT CASE WHEN geometrytype(GeomFromText($1, $2)) = ''POLYGON'' + THEN GeomFromText($1,$2) + ELSE NULL END + ' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION PolyFromWKB(bytea, int) + RETURNS geometry + AS ' + SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = ''POLYGON'' + THEN GeomFromWKB($1, $2) + ELSE NULL END + ' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION PolyFromWKB(bytea) + RETURNS geometry + AS ' + SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = ''POLYGON'' + THEN GeomFromWKB($1) + ELSE NULL END + ' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION PolygonFromText(text, int4) + RETURNS geometry + AS 'SELECT PolyFromText($1, $2)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION PolygonFromText(text) + RETURNS geometry + AS 'SELECT PolyFromText($1)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION PolygonFromWKB(bytea, int) + RETURNS geometry + AS ' + SELECT CASE WHEN geometrytype(GeomFromWKB($1,$2)) = ''POLYGON'' + THEN GeomFromWKB($1, $2) + ELSE NULL END + ' + LANGUAGE 'sql' IMMUTABLE STRICT; + + -- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION PolygonFromWKB(bytea) + RETURNS geometry + AS ' + SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = ''POLYGON'' + THEN GeomFromWKB($1) + ELSE NULL END + ' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION Polygonize_GArray (geometry[]) + RETURNS geometry + AS 'MODULE_PATHNAME', 'polygonize_garray' + LANGUAGE 'c' IMMUTABLE STRICT + COST 100; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION relate(geometry,geometry) + RETURNS text + AS 'MODULE_PATHNAME','relate_full' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION relate(geometry,geometry,text) + RETURNS boolean + AS 'MODULE_PATHNAME','relate_pattern' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION RemovePoint(geometry, integer) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_removepoint' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION reverse(geometry) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_reverse' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION Segmentize(geometry, float8) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_segmentize2d' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION SetPoint(geometry, integer, geometry) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_setpoint_linestring' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Availability: 1.1.0 +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION shift_longitude(geometry) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_longitude_shift' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION Simplify(geometry, float8) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_simplify2d' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- SnapToGrid(input, size) # xsize=ysize=size, offsets=0 +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION SnapToGrid(geometry, float8, float8, float8, float8) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_snaptogrid' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION SnapToGrid(geometry, float8) + RETURNS geometry + AS 'SELECT ST_SnapToGrid($1, 0, 0, $2, $2)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- SnapToGrid(input, point_offsets, xsize, ysize, zsize, msize) +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION SnapToGrid(geometry, geometry, float8, float8, float8, float8) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_snaptogrid_pointoff' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- SnapToGrid(input, xsize, ysize) # offsets=0 +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION SnapToGrid(geometry, float8, float8) + RETURNS geometry + AS 'SELECT ST_SnapToGrid($1, 0, 0, $2, $3)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Availability: 1.2.2 -- this should be deprecated (do not think anyone has ever used it) +CREATE OR REPLACE FUNCTION ST_MakeLine_GArray (geometry[]) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_makeline_garray' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION StartPoint(geometry) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_startpoint_linestring' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION symdifference(geometry,geometry) + RETURNS geometry + AS 'MODULE_PATHNAME','symdifference' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION symmetricdifference(geometry,geometry) + RETURNS geometry + AS 'MODULE_PATHNAME','symdifference' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION summary(geometry) + RETURNS text + AS 'MODULE_PATHNAME', 'LWGEOM_summary' + LANGUAGE 'c' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION transform(geometry,integer) + RETURNS geometry + AS 'MODULE_PATHNAME','transform' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION touches(geometry,geometry) + RETURNS boolean + AS 'MODULE_PATHNAME' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION within(geometry,geometry) + RETURNS boolean + AS 'SELECT ST_Within($1, $2)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION X(geometry) + RETURNS float8 + AS 'MODULE_PATHNAME','LWGEOM_x_point' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION xmax(box3d) + RETURNS FLOAT8 + AS 'MODULE_PATHNAME','BOX3D_xmax' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION xmin(box3d) + RETURNS FLOAT8 + AS 'MODULE_PATHNAME','BOX3D_xmin' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION Y(geometry) + RETURNS float8 + AS 'MODULE_PATHNAME','LWGEOM_y_point' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION ymax(box3d) + RETURNS FLOAT8 + AS 'MODULE_PATHNAME','BOX3D_ymax' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION ymin(box3d) + RETURNS FLOAT8 + AS 'MODULE_PATHNAME','BOX3D_ymin' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION Z(geometry) + RETURNS float8 + AS 'MODULE_PATHNAME','LWGEOM_z_point' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION zmax(box3d) + RETURNS FLOAT8 + AS 'MODULE_PATHNAME','BOX3D_zmax' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION zmin(box3d) + RETURNS FLOAT8 + AS 'MODULE_PATHNAME','BOX3D_zmin' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION zmflag(geometry) + RETURNS smallint + AS 'MODULE_PATHNAME', 'LWGEOM_zmflag' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- end old ogc names that have been replaced with new SQL-MM names -- + +--- Start Aggregates and supporting functions -- +-- Deprecation in: 1.2.3 +CREATE AGGREGATE accum ( + sfunc = pgis_geometry_accum_transfn, + basetype = geometry, + stype = pgis_abs, + finalfunc = pgis_geometry_accum_finalfn + ); +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION collect(geometry, geometry) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_collect' + LANGUAGE 'c' IMMUTABLE; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION combine_bbox(box2d,geometry) + RETURNS box2d + AS 'MODULE_PATHNAME', 'BOX2D_combine' + LANGUAGE 'c' IMMUTABLE; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION combine_bbox(box3d,geometry) + RETURNS box3d + AS 'MODULE_PATHNAME', 'BOX3D_combine' + LANGUAGE 'c' IMMUTABLE; + + -- Deprecation in 1.5.0 +CREATE OR REPLACE FUNCTION ST_Polygonize_GArray (geometry[]) + RETURNS geometry + AS 'MODULE_PATHNAME', 'polygonize_garray' + LANGUAGE 'c' IMMUTABLE STRICT + COST 100; + +-- Deprecation in 1.4.0 +CREATE OR REPLACE FUNCTION ST_unite_garray (geometry[]) + RETURNS geometry + AS 'MODULE_PATHNAME','pgis_union_geometry_array' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION unite_garray (geometry[]) + RETURNS geometry + AS 'MODULE_PATHNAME', 'pgis_union_geometry_array' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE AGGREGATE Extent3d( + sfunc = combine_bbox, + basetype = geometry, + stype = box3d + ); + +-- Deprecation in 1.2.3 +CREATE AGGREGATE memcollect( + sfunc = ST_collect, + basetype = geometry, + stype = geometry + ); + +-- Deprecation in 1.2.3 +CREATE AGGREGATE MemGeomUnion ( + basetype = geometry, + sfunc = geomunion, + stype = geometry + ); + +-- End Aggregates and supporting functions -- +------------------------------------------------ +--Begin 3D functions -- +------------------------------------------------ + +-- Renamed in 2.0.0 to ST_3DLength +CREATE OR REPLACE FUNCTION ST_Length3D(geometry) + RETURNS FLOAT8 + AS 'MODULE_PATHNAME', 'LWGEOM_length_linestring' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Renamed in 2.0.0 to ST_3DLength_spheroid +CREATE OR REPLACE FUNCTION ST_Length_spheroid3D(geometry, spheroid) + RETURNS FLOAT8 + AS 'MODULE_PATHNAME','LWGEOM_length_ellipsoid_linestring' + LANGUAGE 'c' IMMUTABLE STRICT + COST 100; + +-- Renamed in 2.0.0 to ST_3DPerimeter +CREATE OR REPLACE FUNCTION ST_Perimeter3D(geometry) + RETURNS FLOAT8 + AS 'MODULE_PATHNAME', 'LWGEOM_perimeter_poly' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Renamed in 2.0.0 to ST_3DMakeBox +CREATE OR REPLACE FUNCTION ST_MakeBox3D(geometry, geometry) + RETURNS box3d + AS 'MODULE_PATHNAME', 'BOX3D_construct' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Renamed in 2.0.0 to ST_3DExtent +CREATE AGGREGATE ST_Extent3D( + sfunc = ST_combine_bbox, + basetype = geometry, + stype = box3d + ); +--END 3D functions-- diff -Nru postgis-1.5.3/postgis/legacy_minimal.sql.in.c postgis-2.0.1/postgis/legacy_minimal.sql.in.c --- postgis-1.5.3/postgis/legacy_minimal.sql.in.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/postgis/legacy_minimal.sql.in.c 2012-05-16 08:29:14.000000000 +0000 @@ -0,0 +1,63 @@ +-- $Id: legacy_minimal.sql.in.c 9735 2012-05-16 08:29:14Z robe $ +-- Bare minimum Legacy functions -- +-- This file that contains what we have determined are +-- the most common functions used by older apps +-- You should be able to get by with just to support +-- older versions of mapserver, geoserver, qgis, gdal, openjump etc. +#include "sqldefines.h" +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION AsBinary(geometry) + RETURNS bytea + AS 'MODULE_PATHNAME','LWGEOM_asBinary' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION AsBinary(geometry,text) + RETURNS bytea + AS 'MODULE_PATHNAME','LWGEOM_asBinary' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION AsText(geometry) + RETURNS TEXT + AS 'MODULE_PATHNAME','LWGEOM_asText' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION Estimated_Extent(text,text,text) RETURNS box2d AS + 'MODULE_PATHNAME', 'geometry_estimated_extent' + LANGUAGE 'c' IMMUTABLE STRICT SECURITY DEFINER; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION Estimated_Extent(text,text) RETURNS box2d AS + 'MODULE_PATHNAME', 'geometry_estimated_extent' + LANGUAGE 'c' IMMUTABLE STRICT SECURITY DEFINER; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION GeomFromText(text, int4) + RETURNS geometry AS 'SELECT ST_GeomFromText($1, $2)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION GeomFromText(text) + RETURNS geometry AS 'SELECT ST_GeomFromText($1)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION ndims(geometry) + RETURNS smallint + AS 'MODULE_PATHNAME', 'LWGEOM_ndims' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION SetSRID(geometry,int4) + RETURNS geometry + AS 'MODULE_PATHNAME','LWGEOM_set_srid' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Deprecation in 1.2.3 +CREATE OR REPLACE FUNCTION SRID(geometry) + RETURNS int4 + AS 'MODULE_PATHNAME','LWGEOM_get_srid' + LANGUAGE 'c' IMMUTABLE STRICT; + diff -Nru postgis-1.5.3/postgis/long_xact.c postgis-2.0.1/postgis/long_xact.c --- postgis-1.5.3/postgis/long_xact.c 2009-06-11 16:44:03.000000000 +0000 +++ postgis-2.0.1/postgis/long_xact.c 2012-05-16 08:29:14.000000000 +0000 @@ -1,9 +1,22 @@ +/********************************************************************** + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * + * Copyright (C) 2006 Refractions Research Inc. + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + #include "postgres.h" #include "access/xact.h" #include "executor/spi.h" /* this is what you need to work with SPI */ #include "commands/trigger.h" /* ... and triggers */ #include "utils/lsyscache.h" /* for get_namespace_name() */ - +#include "utils/rel.h" +#include "../postgis_config.h" #include "lwgeom_pg.h" #define ABORT_ON_AUTH_FAILURE 1 diff -Nru postgis-1.5.3/postgis/long_xact.sql.in.c postgis-2.0.1/postgis/long_xact.sql.in.c --- postgis-1.5.3/postgis/long_xact.sql.in.c 2009-11-25 19:15:57.000000000 +0000 +++ postgis-2.0.1/postgis/long_xact.sql.in.c 2012-05-16 08:29:14.000000000 +0000 @@ -1,6 +1,6 @@ -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- --- $Id: long_xact.sql.in.c 4894 2009-11-25 19:15:57Z pramsey $ +-- $Id: long_xact.sql.in.c 9735 2012-05-16 08:29:14Z robe $ -- -- PostGIS - Spatial Types for PostgreSQL -- http://postgis.refractions.net @@ -187,7 +187,7 @@ RETURNS INT AS $$ SELECT CheckAuth('', $1, $2) $$ - LANGUAGE 'SQL'; + LANGUAGE 'sql'; CREATE OR REPLACE FUNCTION CheckAuthTrigger() RETURNS trigger AS diff -Nru postgis-1.5.3/postgis/lwgeom_accum.c postgis-2.0.1/postgis/lwgeom_accum.c --- postgis-1.5.3/postgis/lwgeom_accum.c 2011-05-19 02:32:27.000000000 +0000 +++ postgis-2.0.1/postgis/lwgeom_accum.c 2012-02-27 22:08:12.000000000 +0000 @@ -1,5 +1,5 @@ /********************************************************************** - * $Id: lwgeom_accum.c 7197 2011-05-19 02:32:27Z pramsey $ + * $Id: lwgeom_accum.c 9324 2012-02-27 22:08:12Z pramsey $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net @@ -17,6 +17,8 @@ #include "utils/array.h" #include "utils/lsyscache.h" +#include "../postgis_config.h" + #include "liblwgeom.h" #include "lwgeom_pg.h" @@ -106,18 +108,21 @@ if (fcinfo->context && IsA(fcinfo->context, AggState)) aggcontext = ((AggState *) fcinfo->context)->aggcontext; #if POSTGIS_PGSQL_VERSION == 84 + else if (fcinfo->context && IsA(fcinfo->context, WindowAggState)) aggcontext = ((WindowAggState *) fcinfo->context)->wincontext; #endif #if POSTGIS_PGSQL_VERSION > 84 + else if (fcinfo->context && IsA(fcinfo->context, WindowAggState)) aggcontext = ((WindowAggState *) fcinfo->context)->aggcontext; #endif + else { /* cannot be called directly because of dummy-type argument */ elog(ERROR, "array_agg_transfn called in non-aggregate context"); - aggcontext = NULL; /* keep compiler quiet */ + aggcontext = NULL; /* keep compiler quiet */ } if ( PG_ARGISNULL(0) ) @@ -167,10 +172,13 @@ dims[0] = state->nelems; lbs[0] = 1; #if POSTGIS_PGSQL_VERSION < 84 + result = makeMdArrayResult(state, 1, dims, lbs, mctx); #else + result = makeMdArrayResult(state, 1, dims, lbs, mctx, false); #endif + return result; } @@ -304,9 +312,10 @@ Datum result; #if POSTGIS_PGSQL_VERSION > 90 - /* PgSLQ 9.1 requires five arcuments to InitFunctionCallInfoData */ + InitFunctionCallInfoData(fcinfo, NULL, 1, InvalidOid, NULL, NULL); #else + InitFunctionCallInfoData(fcinfo, NULL, 1, NULL, NULL); #endif diff -Nru postgis-1.5.3/postgis/lwgeom_box.c postgis-2.0.1/postgis/lwgeom_box.c --- postgis-1.5.3/postgis/lwgeom_box.c 2009-03-08 16:36:20.000000000 +0000 +++ postgis-2.0.1/postgis/lwgeom_box.c 2012-02-27 22:08:12.000000000 +0000 @@ -1,5 +1,5 @@ /********************************************************************** - * $Id: lwgeom_box.c 3805 2009-03-08 16:36:20Z mcayland $ + * $Id: lwgeom_box.c 9324 2012-02-27 22:08:12Z pramsey $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net @@ -12,44 +12,530 @@ **********************************************************************/ #include "postgres.h" +#include "access/gist.h" +#include "access/itup.h" +#include "fmgr.h" +#include "utils/elog.h" #include "utils/geo_decls.h" +#include "../postgis_config.h" #include "lwgeom_pg.h" #include "liblwgeom.h" +#include "liblwgeom_internal.h" +#include +#include +#include +#include +#include + + +/* forward defs */ +Datum BOX2D_in(PG_FUNCTION_ARGS); +Datum BOX2D_out(PG_FUNCTION_ARGS); +Datum LWGEOM_to_BOX2D(PG_FUNCTION_ARGS); +Datum BOX2D_expand(PG_FUNCTION_ARGS); +Datum BOX2D_to_BOX3D(PG_FUNCTION_ARGS); +Datum BOX2D_combine(PG_FUNCTION_ARGS); +Datum BOX2D_to_LWGEOM(PG_FUNCTION_ARGS); +Datum BOX2D_construct(PG_FUNCTION_ARGS); + +/* parser - "BOX(xmin ymin,xmax ymax)" */ +PG_FUNCTION_INFO_V1(BOX2D_in); +Datum BOX2D_in(PG_FUNCTION_ARGS) +{ + char *str = PG_GETARG_CSTRING(0); + int nitems; + double tmp; + GBOX box; + + gbox_init(&box); + + if (strstr(str,"BOX(") != str ) + { + elog(ERROR,"box2d parser - doesnt start with BOX("); + PG_RETURN_NULL(); + } + nitems = sscanf(str,"BOX(%lf %lf,%lf %lf)", &box.xmin, &box.ymin, &box.xmax, &box.ymax); + if (nitems != 4) + { + elog(ERROR,"box2d parser - couldnt parse. It should look like: BOX(xmin ymin,xmax ymax)"); + PG_RETURN_NULL(); + } + + if (box.xmin > box.xmax) + { + tmp = box.xmin; + box.xmin = box.xmax; + box.xmax = tmp; + } + if (box.ymin > box.ymax) + { + tmp = box.ymin; + box.ymin = box.ymax; + box.ymax = tmp; + } + PG_RETURN_POINTER(gbox_copy(&box)); +} + +/*writer "BOX(xmin ymin,xmax ymax)" */ +PG_FUNCTION_INFO_V1(BOX2D_out); +Datum BOX2D_out(PG_FUNCTION_ARGS) +{ + GBOX *box = (GBOX *) PG_GETARG_POINTER(0); + char tmp[500]; /* big enough */ + char *result; + int size; + + size = sprintf(tmp,"BOX(%.15g %.15g,%.15g %.15g)", + box->xmin, box->ymin, box->xmax, box->ymax); + + result= palloc(size+1); /* +1= null term */ + memcpy(result,tmp,size+1); + result[size] = '\0'; + + PG_RETURN_CSTRING(result); +} + + +/*convert a GSERIALIZED to BOX2D */ +PG_FUNCTION_INFO_V1(LWGEOM_to_BOX2D); +Datum LWGEOM_to_BOX2D(PG_FUNCTION_ARGS) +{ + GSERIALIZED *geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + LWGEOM *lwgeom = lwgeom_from_gserialized(geom); + GBOX gbox; + + /* Cannot box empty! */ + if ( lwgeom_is_empty(lwgeom) ) + PG_RETURN_NULL(); + + /* Cannot calculate box? */ + if ( lwgeom_calculate_gbox(lwgeom, &gbox) == LW_FAILURE ) + PG_RETURN_NULL(); + + /* Strip out higher dimensions */ + FLAGS_SET_Z(gbox.flags, 0); + FLAGS_SET_M(gbox.flags, 0); + + PG_RETURN_POINTER(gbox_copy(&gbox)); +} + +/*---------------------------------------------------------- + * Relational operators for BOXes. + * <, >, <=, >=, and == are based on box area. + *---------------------------------------------------------*/ + +/* + * box_same - are two boxes identical? + */ +PG_FUNCTION_INFO_V1(BOX2D_same); +Datum BOX2D_same(PG_FUNCTION_ARGS) +{ + GBOX *box1 = (GBOX *) PG_GETARG_POINTER(0); + GBOX *box2 = (GBOX *) PG_GETARG_POINTER(1); + + PG_RETURN_BOOL(FPeq(box1->xmax, box2->xmax) && + FPeq(box1->xmin, box2->xmin) && + FPeq(box1->ymax, box2->ymax) && + FPeq(box1->ymin, box2->ymin)); +} + +/* + * box_overlap - does box1 overlap box2? + */ +PG_FUNCTION_INFO_V1(BOX2D_overlap); +Datum BOX2D_overlap(PG_FUNCTION_ARGS) +{ + GBOX *box1 = (GBOX *) PG_GETARG_POINTER(0); + GBOX *box2 = (GBOX *) PG_GETARG_POINTER(1); + bool result; + + + result = ((FPge(box1->xmax, box2->xmax) && + FPle(box1->xmin, box2->xmax)) || + (FPge(box2->xmax, box1->xmax) && + FPle(box2->xmin, box1->xmax))) + && + ((FPge(box1->ymax, box2->ymax) && + FPle(box1->ymin, box2->ymax)) || + (FPge(box2->ymax, box1->ymax) && + FPle(box2->ymin, box1->ymax))); + + PG_RETURN_BOOL(result); +} + + +/* + * box_overleft - is the right edge of box1 to the left of + * the right edge of box2? + */ +PG_FUNCTION_INFO_V1(BOX2D_overleft); +Datum BOX2D_overleft(PG_FUNCTION_ARGS) +{ + GBOX *box1 = (GBOX *) PG_GETARG_POINTER(0); + GBOX *box2 = (GBOX *) PG_GETARG_POINTER(1); + + PG_RETURN_BOOL(FPle(box1->xmax, box2->xmax)); +} + +/* + * box_left - is box1 strictly left of box2? + */ +PG_FUNCTION_INFO_V1(BOX2D_left); +Datum BOX2D_left(PG_FUNCTION_ARGS) +{ + GBOX *box1 = (GBOX *) PG_GETARG_POINTER(0); + GBOX *box2 = (GBOX *) PG_GETARG_POINTER(1); + + PG_RETURN_BOOL(FPlt(box1->xmax, box2->xmin)); +} + +/* + * box_right - is box1 strictly right of box2? + */ +PG_FUNCTION_INFO_V1(BOX2D_right); +Datum BOX2D_right(PG_FUNCTION_ARGS) +{ + GBOX *box1 = (GBOX *) PG_GETARG_POINTER(0); + GBOX *box2 = (GBOX *) PG_GETARG_POINTER(1); + + PG_RETURN_BOOL(FPgt(box1->xmin, box2->xmax)); +} + +/* + * box_overright - is the left edge of box1 to the right of + * the left edge of box2? + */ +PG_FUNCTION_INFO_V1(BOX2D_overright); +Datum BOX2D_overright(PG_FUNCTION_ARGS) +{ + GBOX *box1 = (GBOX *) PG_GETARG_POINTER(0); + GBOX *box2 = (GBOX *) PG_GETARG_POINTER(1); + + PG_RETURN_BOOL(FPge(box1->xmin, box2->xmin)); +} + +/* + * box_overbelow - is the bottom edge of box1 below + * the bottom edge of box2? + */ +PG_FUNCTION_INFO_V1(BOX2D_overbelow); +Datum BOX2D_overbelow(PG_FUNCTION_ARGS) +{ + GBOX *box1 = (GBOX *) PG_GETARG_POINTER(0); + GBOX *box2 = (GBOX *) PG_GETARG_POINTER(1); + + PG_RETURN_BOOL(FPle(box1->ymax, box2->ymax)); +} -void box_to_box3d(BOX *box, BOX3D *out); -void box3d_to_box_p(BOX3D *box, BOX *out); +/* + * box_below - is box1 strictly below box2? + */ +PG_FUNCTION_INFO_V1(BOX2D_below); +Datum BOX2D_below(PG_FUNCTION_ARGS) +{ + GBOX *box1 = (GBOX *) PG_GETARG_POINTER(0); + GBOX *box2 = (GBOX *) PG_GETARG_POINTER(1); + + PG_RETURN_BOOL(FPlt(box1->ymax, box2->ymin)); +} + +/* + * box_above - is box1 strictly above box2? + */ +PG_FUNCTION_INFO_V1(BOX2D_above); +Datum BOX2D_above(PG_FUNCTION_ARGS) +{ + GBOX *box1 = (GBOX *) PG_GETARG_POINTER(0); + GBOX *box2 = (GBOX *) PG_GETARG_POINTER(1); + + PG_RETURN_BOOL(FPgt(box1->ymin, box2->ymax)); +} + +/* + * box_overabove - the top edge of box1 above + * the top edge of box2? + */ +PG_FUNCTION_INFO_V1(BOX2D_overabove); +Datum BOX2D_overabove(PG_FUNCTION_ARGS) +{ + GBOX *box1 = (GBOX *) PG_GETARG_POINTER(0); + GBOX *box2 = (GBOX *) PG_GETARG_POINTER(1); + + PG_RETURN_BOOL(FPge(box1->ymin, box2->ymin)); +} + +/* + * box_contained - is box1 contained by box2? + */ +PG_FUNCTION_INFO_V1(BOX2D_contained); +Datum BOX2D_contained(PG_FUNCTION_ARGS) +{ + GBOX *box1 =(GBOX *) PG_GETARG_POINTER(0); + GBOX *box2 = (GBOX *) PG_GETARG_POINTER(1); + + PG_RETURN_BOOL(FPle(box1->xmax, box2->xmax) && + FPge(box1->xmin, box2->xmin) && + FPle(box1->ymax, box2->ymax) && + FPge(box1->ymin, box2->ymin)); +} + +/* + * box_contain - does box1 contain box2? + */ +PG_FUNCTION_INFO_V1(BOX2D_contain); +Datum BOX2D_contain(PG_FUNCTION_ARGS) +{ + GBOX *box1 = (GBOX *) PG_GETARG_POINTER(0); + GBOX *box2 = (GBOX *) PG_GETARG_POINTER(1); + + PG_RETURN_BOOL(FPge(box1->xmax, box2->xmax) && + FPle(box1->xmin, box2->xmin) && + FPge(box1->ymax, box2->ymax) && + FPle(box1->ymin, box2->ymin)); + +} + +PG_FUNCTION_INFO_V1(BOX2D_intersects); +Datum BOX2D_intersects(PG_FUNCTION_ARGS) +{ + GBOX *a = (GBOX *) PG_GETARG_POINTER(0); + GBOX *b = (GBOX *) PG_GETARG_POINTER(1); + GBOX *n; + + + n = (GBOX *) palloc(sizeof(GBOX)); + + n->xmax = Min(a->xmax, b->xmax); + n->ymax = Min(a->ymax, b->ymax); + n->xmin = Max(a->xmin, b->xmin); + n->ymin = Max(a->ymin, b->ymin); + + + if (n->xmax < n->xmin || n->ymax < n->ymin) + { + pfree(n); + /* Indicate "no intersection" by returning NULL pointer */ + n = NULL; + } + + PG_RETURN_POINTER(n); +} + + +/* + * union of two BOX2Ds + */ +PG_FUNCTION_INFO_V1(BOX2D_union); +Datum BOX2D_union(PG_FUNCTION_ARGS) +{ + GBOX *a = (GBOX*) PG_GETARG_POINTER(0); + GBOX *b = (GBOX*) PG_GETARG_POINTER(1); + GBOX *n; + + n = (GBOX *) lwalloc(sizeof(GBOX)); + if ( ! gbox_union(a,b,n) ) PG_RETURN_NULL(); + PG_RETURN_POINTER(n); +} -/* convert postgresql BOX to BOX3D */ -void -box_to_box3d(BOX *box, BOX3D *out) +PG_FUNCTION_INFO_V1(BOX2D_expand); +Datum BOX2D_expand(PG_FUNCTION_ARGS) { -#if PARANOIA_LEVEL > 0 - if (box == NULL) return; -#endif + GBOX *box = (GBOX *)PG_GETARG_POINTER(0); + double d = PG_GETARG_FLOAT8(1); + GBOX *result = (GBOX *)palloc(sizeof(GBOX)); + + memcpy(result, box, sizeof(GBOX)); + gbox_expand(result, d); + + PG_RETURN_POINTER(result); +} - out->xmin = box->low.x; - out->ymin = box->low.y; +PG_FUNCTION_INFO_V1(BOX2D_to_BOX3D); +Datum BOX2D_to_BOX3D(PG_FUNCTION_ARGS) +{ + GBOX *box = (GBOX *)PG_GETARG_POINTER(0); + BOX3D *result = box3d_from_gbox(box); + PG_RETURN_POINTER(result); +} - out->xmax = box->high.x; - out->ymax = box->high.y; +PG_FUNCTION_INFO_V1(BOX2D_combine); +Datum BOX2D_combine(PG_FUNCTION_ARGS) +{ + Pointer box2d_ptr = PG_GETARG_POINTER(0); + Pointer geom_ptr = PG_GETARG_POINTER(1); + GBOX *a,*b; + GSERIALIZED *lwgeom; + GBOX box, *result; + + if ( (box2d_ptr == NULL) && (geom_ptr == NULL) ) + { + PG_RETURN_NULL(); /* combine_box2d(null,null) => null */ + } + + result = (GBOX *)palloc(sizeof(GBOX)); + + if (box2d_ptr == NULL) + { + lwgeom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + /* empty geom would make getbox2d_p return NULL */ + if ( ! gserialized_get_gbox_p(lwgeom, &box) ) PG_RETURN_NULL(); + memcpy(result, &box, sizeof(GBOX)); + PG_RETURN_POINTER(result); + } + + /* combine_bbox(BOX3D, null) => BOX3D */ + if (geom_ptr == NULL) + { + memcpy(result, (char *)PG_GETARG_DATUM(0), sizeof(GBOX)); + PG_RETURN_POINTER(result); + } + + /*combine_bbox(BOX3D, geometry) => union(BOX3D, geometry->bvol) */ + + lwgeom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + if ( ! gserialized_get_gbox_p(lwgeom, &box) ) + { + /* must be the empty geom */ + memcpy(result, (char *)PG_GETARG_DATUM(0), sizeof(GBOX)); + PG_RETURN_POINTER(result); + } + + a = (GBOX *)PG_GETARG_DATUM(0); + b = &box; + + result->xmax = Max(a->xmax, b->xmax); + result->ymax = Max(a->ymax, b->ymax); + result->xmin = Min(a->xmin, b->xmin); + result->ymin = Min(a->ymin, b->ymin); + PG_RETURN_POINTER(result); } -/* convert BOX3D to postgresql BOX */ -void -box3d_to_box_p(BOX3D *box, BOX *out) +PG_FUNCTION_INFO_V1(BOX2D_to_LWGEOM); +Datum BOX2D_to_LWGEOM(PG_FUNCTION_ARGS) { -#if PARANOIA_LEVEL > 0 - if (box == NULL) return; -#endif + GBOX *box = (GBOX *)PG_GETARG_POINTER(0); + POINTARRAY *pa = ptarray_construct_empty(0, 0, 5); + POINT4D pt; + GSERIALIZED *result; + + + /* + * Alter BOX2D cast so that a valid geometry is always + * returned depending upon the size of the BOX2D. The + * code makes the following assumptions: + * - If the BOX2D is a single point then return a + * POINT geometry + * - If the BOX2D represents either a horizontal or + * vertical line, return a LINESTRING geometry + * - Otherwise return a POLYGON + */ + + if ( (box->xmin == box->xmax) && (box->ymin == box->ymax) ) + { + /* Construct and serialize point */ + LWPOINT *point = lwpoint_make2d(SRID_UNKNOWN, box->xmin, box->ymin); + result = geometry_serialize(lwpoint_as_lwgeom(point)); + lwpoint_free(point); + } + else if ( (box->xmin == box->xmax) || (box->ymin == box->ymax) ) + { + LWLINE *line; + + /* Assign coordinates to point array */ + pt.x = box->xmin; + pt.y = box->ymin; + ptarray_append_point(pa, &pt, LW_TRUE); + pt.x = box->xmax; + pt.y = box->ymax; + ptarray_append_point(pa, &pt, LW_TRUE); + + /* Construct and serialize linestring */ + line = lwline_construct(SRID_UNKNOWN, NULL, pa); + result = geometry_serialize(lwline_as_lwgeom(line)); + lwline_free(line); + } + else + { + LWPOLY *poly; + POINTARRAY **ppa = lwalloc(sizeof(POINTARRAY*)); + + /* Assign coordinates to point array */ + pt.x = box->xmin; + pt.y = box->ymin; + ptarray_append_point(pa, &pt, LW_TRUE); + pt.x = box->xmin; + pt.y = box->ymax; + ptarray_append_point(pa, &pt, LW_TRUE); + pt.x = box->xmax; + pt.y = box->ymax; + ptarray_append_point(pa, &pt, LW_TRUE); + pt.x = box->xmax; + pt.y = box->ymin; + ptarray_append_point(pa, &pt, LW_TRUE); + pt.x = box->xmin; + pt.y = box->ymin; + ptarray_append_point(pa, &pt, LW_TRUE); + + /* Construct polygon */ + ppa[0] = pa; + poly = lwpoly_construct(SRID_UNKNOWN, NULL, 1, ppa); + result = geometry_serialize(lwpoly_as_lwgeom(poly)); + lwpoly_free(poly); + } - out->low.x = box->xmin; - out->low.y = box->ymin; + PG_RETURN_POINTER(result); +} + +PG_FUNCTION_INFO_V1(BOX2D_construct); +Datum BOX2D_construct(PG_FUNCTION_ARGS) +{ + GSERIALIZED *pgmin = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *pgmax = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + GBOX *result; + LWPOINT *minpoint, *maxpoint; + double min, max, tmp; + + minpoint = (LWPOINT*)lwgeom_from_gserialized(pgmin); + maxpoint = (LWPOINT*)lwgeom_from_gserialized(pgmax); + + if ( (minpoint->type != POINTTYPE) || (maxpoint->type != POINTTYPE) ) + { + elog(ERROR, "GBOX_construct: arguments must be points"); + PG_RETURN_NULL(); + } + + error_if_srid_mismatch(minpoint->srid, maxpoint->srid); + + result = gbox_new(gflags(0, 0, 0)); + + /* Process X min/max */ + min = lwpoint_get_x(minpoint); + max = lwpoint_get_x(maxpoint); + if ( min > max ) + { + tmp = min; + min = max; + max = tmp; + } + result->xmin = min; + result->xmax = max; + + /* Process Y min/max */ + min = lwpoint_get_y(minpoint); + max = lwpoint_get_y(maxpoint); + if ( min > max ) + { + tmp = min; + min = max; + max = tmp; + } + result->ymin = min; + result->ymax = max; - out->high.x = box->xmax; - out->high.y = box->ymax; + PG_RETURN_POINTER(result); } diff -Nru postgis-1.5.3/postgis/lwgeom_box2dfloat4.c postgis-2.0.1/postgis/lwgeom_box2dfloat4.c --- postgis-1.5.3/postgis/lwgeom_box2dfloat4.c 2009-06-11 16:44:03.000000000 +0000 +++ postgis-2.0.1/postgis/lwgeom_box2dfloat4.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,564 +0,0 @@ -#include "postgres.h" -#include "access/gist.h" -#include "access/itup.h" -#include "fmgr.h" -#include "utils/elog.h" -#include "utils/geo_decls.h" - -#include "lwgeom_pg.h" -#include "liblwgeom.h" - -#include -#include -#include -#include -#include - - -/* forward defs */ -Datum BOX2DFLOAT4_in(PG_FUNCTION_ARGS); -Datum BOX2DFLOAT4_out(PG_FUNCTION_ARGS); -Datum LWGEOM_to_BOX2DFLOAT4(PG_FUNCTION_ARGS); -Datum BOX2DFLOAT4_expand(PG_FUNCTION_ARGS); -Datum BOX2DFLOAT4_to_BOX3D(PG_FUNCTION_ARGS); -Datum BOX2DFLOAT4_combine(PG_FUNCTION_ARGS); -Datum BOX2DFLOAT4_to_LWGEOM(PG_FUNCTION_ARGS); -Datum BOX2DFLOAT4_construct(PG_FUNCTION_ARGS); - -/* parser - "BOX(xmin ymin,xmax ymax)" */ -PG_FUNCTION_INFO_V1(BOX2DFLOAT4_in); -Datum BOX2DFLOAT4_in(PG_FUNCTION_ARGS) -{ - char *str = PG_GETARG_CSTRING(0); - int nitems; - BOX2DFLOAT4 *box = (BOX2DFLOAT4 *) palloc(sizeof(BOX2DFLOAT4)); - - - - /*printf( "box3d_in gets '%s'\n",str); */ - - if (strstr(str,"BOX(") != str ) - { - pfree(box); - elog(ERROR,"BOX2DFLOAT4 parser - doesnt start with BOX("); - PG_RETURN_NULL(); - } - nitems = sscanf(str,"BOX(%f %f,%f %f)", &box->xmin,&box->ymin,&box->xmax,&box->ymax); - if (nitems != 4) - { - pfree(box); - elog(ERROR,"BOX2DFLOAT4 parser - couldnt parse. It should look like: BOX(xmin ymin,xmax ymax)"); - PG_RETURN_NULL(); - } - - if (box->xmin > box->xmax) - { - float tmp = box->xmin; - box->xmin = box->xmax; - box->xmax = tmp; - } - if (box->ymin > box->ymax) - { - float tmp = box->ymin; - box->ymin = box->ymax; - box->ymax = tmp; - } - PG_RETURN_POINTER(box); -} - -/*writer "BOX(xmin ymin,xmax ymax)" */ -PG_FUNCTION_INFO_V1(BOX2DFLOAT4_out); -Datum BOX2DFLOAT4_out(PG_FUNCTION_ARGS) -{ - BOX2DFLOAT4 *box = (BOX2DFLOAT4 *) PG_GETARG_POINTER(0); - char tmp[500]; /* big enough */ - char *result; - int size; - - size = sprintf(tmp,"BOX(%.15g %.15g,%.15g %.15g)", - box->xmin, box->ymin, box->xmax, box->ymax); - - result= palloc(size+1); /* +1= null term */ - - memcpy(result,tmp,size+1); - PG_RETURN_CSTRING(result); -} - - -/*convert a PG_LWGEOM to BOX2D */ -PG_FUNCTION_INFO_V1(LWGEOM_to_BOX2DFLOAT4); -Datum LWGEOM_to_BOX2DFLOAT4(PG_FUNCTION_ARGS) -{ - PG_LWGEOM *lwgeom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - BOX2DFLOAT4 *result; - - result = palloc(sizeof(BOX2DFLOAT4)); - if ( ! getbox2d_p(SERIALIZED_FORM(lwgeom), result) ) - { - PG_RETURN_NULL(); /* must be the empty geometry */ - } - - PG_RETURN_POINTER(result); -} - -/*---------------------------------------------------------- - * Relational operators for BOXes. - * <, >, <=, >=, and == are based on box area. - *---------------------------------------------------------*/ - -/* - * box_same - are two boxes identical? - */ -PG_FUNCTION_INFO_V1(BOX2D_same); -Datum BOX2D_same(PG_FUNCTION_ARGS) -{ - BOX2DFLOAT4 *box1 = (BOX2DFLOAT4 *) PG_GETARG_POINTER(0); - BOX2DFLOAT4 *box2 = (BOX2DFLOAT4 *) PG_GETARG_POINTER(1); - - PG_RETURN_BOOL(FPeq(box1->xmax, box2->xmax) && - FPeq(box1->xmin, box2->xmin) && - FPeq(box1->ymax, box2->ymax) && - FPeq(box1->ymin, box2->ymin)); -} - -/* - * box_overlap - does box1 overlap box2? - */ -PG_FUNCTION_INFO_V1(BOX2D_overlap); -Datum BOX2D_overlap(PG_FUNCTION_ARGS) -{ - BOX2DFLOAT4 *box1 = (BOX2DFLOAT4 *) PG_GETARG_POINTER(0); - BOX2DFLOAT4 *box2 = (BOX2DFLOAT4 *) PG_GETARG_POINTER(1); - bool result; - - - result = ((FPge(box1->xmax, box2->xmax) && - FPle(box1->xmin, box2->xmax)) || - (FPge(box2->xmax, box1->xmax) && - FPle(box2->xmin, box1->xmax))) - && - ((FPge(box1->ymax, box2->ymax) && - FPle(box1->ymin, box2->ymax)) || - (FPge(box2->ymax, box1->ymax) && - FPle(box2->ymin, box1->ymax))); - - PG_RETURN_BOOL(result); -} - - -/* - * box_overleft - is the right edge of box1 to the left of - * the right edge of box2? - */ -PG_FUNCTION_INFO_V1(BOX2D_overleft); -Datum BOX2D_overleft(PG_FUNCTION_ARGS) -{ - BOX2DFLOAT4 *box1 = (BOX2DFLOAT4 *) PG_GETARG_POINTER(0); - BOX2DFLOAT4 *box2 = (BOX2DFLOAT4 *) PG_GETARG_POINTER(1); - - PG_RETURN_BOOL(FPle(box1->xmax, box2->xmax)); -} - -/* - * box_left - is box1 strictly left of box2? - */ -PG_FUNCTION_INFO_V1(BOX2D_left); -Datum BOX2D_left(PG_FUNCTION_ARGS) -{ - BOX2DFLOAT4 *box1 = (BOX2DFLOAT4 *) PG_GETARG_POINTER(0); - BOX2DFLOAT4 *box2 = (BOX2DFLOAT4 *) PG_GETARG_POINTER(1); - - PG_RETURN_BOOL(FPlt(box1->xmax, box2->xmin)); -} - -/* - * box_right - is box1 strictly right of box2? - */ -PG_FUNCTION_INFO_V1(BOX2D_right); -Datum BOX2D_right(PG_FUNCTION_ARGS) -{ - BOX2DFLOAT4 *box1 = (BOX2DFLOAT4 *) PG_GETARG_POINTER(0); - BOX2DFLOAT4 *box2 = (BOX2DFLOAT4 *) PG_GETARG_POINTER(1); - - PG_RETURN_BOOL(FPgt(box1->xmin, box2->xmax)); -} - -/* - * box_overright - is the left edge of box1 to the right of - * the left edge of box2? - */ -PG_FUNCTION_INFO_V1(BOX2D_overright); -Datum BOX2D_overright(PG_FUNCTION_ARGS) -{ - BOX2DFLOAT4 *box1 = (BOX2DFLOAT4 *) PG_GETARG_POINTER(0); - BOX2DFLOAT4 *box2 = (BOX2DFLOAT4 *) PG_GETARG_POINTER(1); - - PG_RETURN_BOOL(FPge(box1->xmin, box2->xmin)); -} - -/* - * box_overbelow - is the bottom edge of box1 below - * the bottom edge of box2? - */ -PG_FUNCTION_INFO_V1(BOX2D_overbelow); -Datum BOX2D_overbelow(PG_FUNCTION_ARGS) -{ - BOX2DFLOAT4 *box1 = (BOX2DFLOAT4 *) PG_GETARG_POINTER(0); - BOX2DFLOAT4 *box2 = (BOX2DFLOAT4 *) PG_GETARG_POINTER(1); - - PG_RETURN_BOOL(FPle(box1->ymax, box2->ymax)); -} - -/* - * box_below - is box1 strictly below box2? - */ -PG_FUNCTION_INFO_V1(BOX2D_below); -Datum BOX2D_below(PG_FUNCTION_ARGS) -{ - BOX2DFLOAT4 *box1 = (BOX2DFLOAT4 *) PG_GETARG_POINTER(0); - BOX2DFLOAT4 *box2 = (BOX2DFLOAT4 *) PG_GETARG_POINTER(1); - - PG_RETURN_BOOL(FPlt(box1->ymax, box2->ymin)); -} - -/* - * box_above - is box1 strictly above box2? - */ -PG_FUNCTION_INFO_V1(BOX2D_above); -Datum BOX2D_above(PG_FUNCTION_ARGS) -{ - BOX2DFLOAT4 *box1 = (BOX2DFLOAT4 *) PG_GETARG_POINTER(0); - BOX2DFLOAT4 *box2 = (BOX2DFLOAT4 *) PG_GETARG_POINTER(1); - - PG_RETURN_BOOL(FPgt(box1->ymin, box2->ymax)); -} - -/* - * box_overabove - the top edge of box1 above - * the top edge of box2? - */ -PG_FUNCTION_INFO_V1(BOX2D_overabove); -Datum BOX2D_overabove(PG_FUNCTION_ARGS) -{ - BOX2DFLOAT4 *box1 = (BOX2DFLOAT4 *) PG_GETARG_POINTER(0); - BOX2DFLOAT4 *box2 = (BOX2DFLOAT4 *) PG_GETARG_POINTER(1); - - PG_RETURN_BOOL(FPge(box1->ymin, box2->ymin)); -} - -/* - * box_contained - is box1 contained by box2? - */ -PG_FUNCTION_INFO_V1(BOX2D_contained); -Datum BOX2D_contained(PG_FUNCTION_ARGS) -{ - BOX2DFLOAT4 *box1 =(BOX2DFLOAT4 *) PG_GETARG_POINTER(0); - BOX2DFLOAT4 *box2 = (BOX2DFLOAT4 *) PG_GETARG_POINTER(1); - - PG_RETURN_BOOL(FPle(box1->xmax, box2->xmax) && - FPge(box1->xmin, box2->xmin) && - FPle(box1->ymax, box2->ymax) && - FPge(box1->ymin, box2->ymin)); -} - -/* - * box_contain - does box1 contain box2? - */ -PG_FUNCTION_INFO_V1(BOX2D_contain); -Datum BOX2D_contain(PG_FUNCTION_ARGS) -{ - BOX2DFLOAT4 *box1 = (BOX2DFLOAT4 *) PG_GETARG_POINTER(0); - BOX2DFLOAT4 *box2 = (BOX2DFLOAT4 *) PG_GETARG_POINTER(1); - - PG_RETURN_BOOL(FPge(box1->xmax, box2->xmax) && - FPle(box1->xmin, box2->xmin) && - FPge(box1->ymax, box2->ymax) && - FPle(box1->ymin, box2->ymin)); - -} - -PG_FUNCTION_INFO_V1(BOX2D_intersects); -Datum BOX2D_intersects(PG_FUNCTION_ARGS) -{ - BOX2DFLOAT4 *a = (BOX2DFLOAT4 *) PG_GETARG_POINTER(0); - BOX2DFLOAT4 *b = (BOX2DFLOAT4 *) PG_GETARG_POINTER(1); - BOX2DFLOAT4 *n; - - - n = (BOX2DFLOAT4 *) palloc(sizeof(BOX2DFLOAT4)); - - n->xmax = LWGEOM_Minf(a->xmax, b->xmax); - n->ymax = LWGEOM_Minf(a->ymax, b->ymax); - n->xmin = LWGEOM_Maxf(a->xmin, b->xmin); - n->ymin = LWGEOM_Maxf(a->ymin, b->ymin); - - - if (n->xmax < n->xmin || n->ymax < n->ymin) - { - pfree(n); - /* Indicate "no intersection" by returning NULL pointer */ - n = NULL; - } - - PG_RETURN_POINTER(n); -} - - -/* - * union of two BOX2Ds - */ -PG_FUNCTION_INFO_V1(BOX2D_union); -Datum BOX2D_union(PG_FUNCTION_ARGS) -{ - BOX2DFLOAT4 *a = (BOX2DFLOAT4*) PG_GETARG_POINTER(0); - BOX2DFLOAT4 *b = (BOX2DFLOAT4*) PG_GETARG_POINTER(1); - BOX2DFLOAT4 *n; - - n = (BOX2DFLOAT4 *) lwalloc(sizeof(BOX2DFLOAT4)); - if ( ! box2d_union_p(a,b,n) ) PG_RETURN_NULL(); - PG_RETURN_POINTER(n); -} - - -/* - * min(a,b) - */ -float LWGEOM_Minf(float a, float b) -{ - if (aa) return b; - return a; -} - -PG_FUNCTION_INFO_V1(BOX2DFLOAT4_expand); -Datum BOX2DFLOAT4_expand(PG_FUNCTION_ARGS) -{ - BOX2DFLOAT4 *box = (BOX2DFLOAT4 *)PG_GETARG_POINTER(0); - double d = PG_GETARG_FLOAT8(1); - BOX2DFLOAT4 *result = (BOX2DFLOAT4 *)palloc(sizeof(BOX2DFLOAT4)); - - memcpy(result, box, sizeof(BOX2DFLOAT4)); - expand_box2d(result, d); - - PG_RETURN_POINTER(result); -} - -PG_FUNCTION_INFO_V1(BOX2DFLOAT4_to_BOX3D); -Datum BOX2DFLOAT4_to_BOX3D(PG_FUNCTION_ARGS) -{ - BOX2DFLOAT4 *box = (BOX2DFLOAT4 *)PG_GETARG_POINTER(0); - BOX3D *result = palloc(sizeof(BOX3D)); - - box2df_to_box3d_p(box, result); - - PG_RETURN_POINTER(result); -} - - -#define KEEP_OBSOLETED_FUNX 1 -#if KEEP_OBSOLETED_FUNX -Datum BOX2DFLOAT4_xmin(PG_FUNCTION_ARGS); -Datum BOX2DFLOAT4_ymin(PG_FUNCTION_ARGS); -Datum BOX2DFLOAT4_xmax(PG_FUNCTION_ARGS); -Datum BOX2DFLOAT4_ymax(PG_FUNCTION_ARGS); -PG_FUNCTION_INFO_V1(BOX2DFLOAT4_xmin); -Datum BOX2DFLOAT4_xmin(PG_FUNCTION_ARGS) -{ - BOX2DFLOAT4 *box = (BOX2DFLOAT4 *)PG_GETARG_POINTER(0); - PG_RETURN_FLOAT4(box->xmin); -} -PG_FUNCTION_INFO_V1(BOX2DFLOAT4_ymin); -Datum BOX2DFLOAT4_ymin(PG_FUNCTION_ARGS) -{ - BOX2DFLOAT4 *box = (BOX2DFLOAT4 *)PG_GETARG_POINTER(0); - PG_RETURN_FLOAT4(box->ymin); -} -PG_FUNCTION_INFO_V1(BOX2DFLOAT4_xmax); -Datum BOX2DFLOAT4_xmax(PG_FUNCTION_ARGS) -{ - BOX2DFLOAT4 *box = (BOX2DFLOAT4 *)PG_GETARG_POINTER(0); - PG_RETURN_FLOAT4(box->xmax); -} -PG_FUNCTION_INFO_V1(BOX2DFLOAT4_ymax); -Datum BOX2DFLOAT4_ymax(PG_FUNCTION_ARGS) -{ - BOX2DFLOAT4 *box = (BOX2DFLOAT4 *)PG_GETARG_POINTER(0); - PG_RETURN_FLOAT4(box->ymax); -} -#endif - -PG_FUNCTION_INFO_V1(BOX2DFLOAT4_combine); -Datum BOX2DFLOAT4_combine(PG_FUNCTION_ARGS) -{ - Pointer box2d_ptr = PG_GETARG_POINTER(0); - Pointer geom_ptr = PG_GETARG_POINTER(1); - BOX2DFLOAT4 *a,*b; - PG_LWGEOM *lwgeom; - BOX2DFLOAT4 box, *result; - - if ( (box2d_ptr == NULL) && (geom_ptr == NULL) ) - { - PG_RETURN_NULL(); /* combine_box2d(null,null) => null */ - } - - result = (BOX2DFLOAT4 *)palloc(sizeof(BOX2DFLOAT4)); - - if (box2d_ptr == NULL) - { - lwgeom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - /* empty geom would make getbox2d_p return NULL */ - if ( ! getbox2d_p(SERIALIZED_FORM(lwgeom), &box) ) PG_RETURN_NULL(); - memcpy(result, &box, sizeof(BOX2DFLOAT4)); - PG_RETURN_POINTER(result); - } - - /* combine_bbox(BOX3D, null) => BOX3D */ - if (geom_ptr == NULL) - { - memcpy(result, (char *)PG_GETARG_DATUM(0), sizeof(BOX2DFLOAT4)); - PG_RETURN_POINTER(result); - } - - /*combine_bbox(BOX3D, geometry) => union(BOX3D, geometry->bvol) */ - - lwgeom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - if ( ! getbox2d_p(SERIALIZED_FORM(lwgeom), &box) ) - { - /* must be the empty geom */ - memcpy(result, (char *)PG_GETARG_DATUM(0), sizeof(BOX2DFLOAT4)); - PG_RETURN_POINTER(result); - } - - a = (BOX2DFLOAT4 *)PG_GETARG_DATUM(0); - b = &box; - - result->xmax = LWGEOM_Maxf(a->xmax, b->xmax); - result->ymax = LWGEOM_Maxf(a->ymax, b->ymax); - result->xmin = LWGEOM_Minf(a->xmin, b->xmin); - result->ymin = LWGEOM_Minf(a->ymin, b->ymin); - - PG_RETURN_POINTER(result); -} - -PG_FUNCTION_INFO_V1(BOX2DFLOAT4_to_LWGEOM); -Datum BOX2DFLOAT4_to_LWGEOM(PG_FUNCTION_ARGS) -{ - BOX2DFLOAT4 *box = (BOX2DFLOAT4 *)PG_GETARG_POINTER(0); - POINTARRAY *pa; - int wantbbox = 0; - PG_LWGEOM *result; - uchar *ser; - - - /* - * Alter BOX2D cast so that a valid geometry is always - * returned depending upon the size of the BOX2D. The - * code makes the following assumptions: - * - If the BOX2D is a single point then return a - * POINT geometry - * - If the BOX2D represents either a horizontal or - * vertical line, return a LINESTRING geometry - * - Otherwise return a POLYGON - */ - - if (box->xmin == box->xmax && - box->ymin == box->ymax) - { - /* Construct and serialize point */ - LWPOINT *point = make_lwpoint2d(-1, box->xmin, box->ymin); - ser = lwpoint_serialize(point); - } - else if (box->xmin == box->xmax || - box->ymin == box->ymax) - { - LWLINE *line; - POINT2D *pts = palloc(sizeof(POINT2D)*2); - - /* Assign coordinates to POINT2D array */ - pts[0].x = box->xmin; - pts[0].y = box->ymin; - pts[1].x = box->xmax; - pts[1].y = box->ymax; - - /* Construct point array */ - pa = pointArray_construct((uchar *)pts, 0, 0, 2); - - /* Construct and serialize linestring */ - line = lwline_construct(-1, NULL, pa); - ser = lwline_serialize(line); - } - else - { - LWPOLY *poly; - POINT2D *pts = palloc(sizeof(POINT2D)*5); - - /* Assign coordinates to POINT2D array */ - pts[0].x = box->xmin; - pts[0].y = box->ymin; - pts[1].x = box->xmin; - pts[1].y = box->ymax; - pts[2].x = box->xmax; - pts[2].y = box->ymax; - pts[3].x = box->xmax; - pts[3].y = box->ymin; - pts[4].x = box->xmin; - pts[4].y = box->ymin; - - /* Construct point array */ - pa = pointArray_construct((uchar *)pts, 0, 0, 5); - - /* Construct polygon */ - poly = lwpoly_construct(-1, NULL, 1, &pa); - - /* Serialize polygon */ - ser = lwpoly_serialize(poly); - } - - /* Construct PG_LWGEOM */ - result = PG_LWGEOM_construct(ser, -1, wantbbox); - - PG_RETURN_POINTER(result); -} - -PG_FUNCTION_INFO_V1(BOX2DFLOAT4_construct); -Datum BOX2DFLOAT4_construct(PG_FUNCTION_ARGS) -{ - PG_LWGEOM *min = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_LWGEOM *max = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - BOX2DFLOAT4 *result = palloc(sizeof(BOX2DFLOAT4)); - LWGEOM *minpoint, *maxpoint; - POINT2D minp, maxp; - - minpoint = lwgeom_deserialize(SERIALIZED_FORM(min)); - maxpoint = lwgeom_deserialize(SERIALIZED_FORM(max)); - - if ( TYPE_GETTYPE(minpoint->type) != POINTTYPE || - TYPE_GETTYPE(maxpoint->type) != POINTTYPE ) - { - elog(ERROR, "BOX2DFLOAT4_construct: args must be points"); - PG_RETURN_NULL(); - } - - errorIfSRIDMismatch(minpoint->SRID, maxpoint->SRID); - - getPoint2d_p(((LWPOINT *)minpoint)->point, 0, &minp); - getPoint2d_p(((LWPOINT *)maxpoint)->point, 0, &maxp); - - result->xmax = maxp.x; - result->ymax = maxp.y; - - result->xmin = minp.x; - result->ymin = minp.y; - - PG_RETURN_POINTER(result); -} - diff -Nru postgis-1.5.3/postgis/lwgeom_box3d.c postgis-2.0.1/postgis/lwgeom_box3d.c --- postgis-1.5.3/postgis/lwgeom_box3d.c 2010-02-01 17:35:55.000000000 +0000 +++ postgis-2.0.1/postgis/lwgeom_box3d.c 2012-03-02 23:35:32.000000000 +0000 @@ -9,8 +9,10 @@ #include "utils/elog.h" #include "utils/geo_decls.h" +#include "../postgis_config.h" #include "lwgeom_pg.h" #include "liblwgeom.h" +#include "liblwgeom_internal.h" #include #include @@ -24,12 +26,10 @@ /* forward defs */ Datum BOX3D_in(PG_FUNCTION_ARGS); Datum BOX3D_out(PG_FUNCTION_ARGS); -Datum BOX3D_extent_out(PG_FUNCTION_ARGS); -Datum BOX3D_extent_to_BOX3D(PG_FUNCTION_ARGS); Datum LWGEOM_to_BOX3D(PG_FUNCTION_ARGS); Datum BOX3D_to_LWGEOM(PG_FUNCTION_ARGS); Datum BOX3D_expand(PG_FUNCTION_ARGS); -Datum BOX3D_to_BOX2DFLOAT4(PG_FUNCTION_ARGS); +Datum BOX3D_to_BOX2D(PG_FUNCTION_ARGS); Datum BOX3D_to_BOX(PG_FUNCTION_ARGS); Datum BOX3D_xmin(PG_FUNCTION_ARGS); Datum BOX3D_ymin(PG_FUNCTION_ARGS); @@ -101,6 +101,7 @@ box->zmin = box->zmax; box->zmax = tmp; } + box->srid = SRID_UNKNOWN; PG_RETURN_POINTER(box); } @@ -138,62 +139,27 @@ PG_RETURN_CSTRING(result); } -/** - * Takes an internal rep of a BOX3D and returns a string rep. - * but beginning with BOX(...) and with only 2 dimensions. This - * is a temporary hack to allow ST_Extent() to return a result - * with the precision of BOX2DFLOAT4 but with the BOX2DFLOAT4 - * output format. - * - * example: - * "BOX(xmin ymin, xmax ymax)" - */ -PG_FUNCTION_INFO_V1(BOX3D_extent_out); -Datum BOX3D_extent_out(PG_FUNCTION_ARGS) -{ - BOX3D *bbox = (BOX3D *) PG_GETARG_POINTER(0); - int size; - char *result; - if (bbox == NULL) - { - result = palloc(5); - strcat(result,"NULL"); - PG_RETURN_CSTRING(result); - } - - - /*double digits+ "BOX3D"+ "()" + commas +null */ - size = MAX_DIGS_DOUBLE*6+5+2+4+5+1; - - result = (char *) palloc(size); - - sprintf(result, "BOX(%.15g %.15g,%.15g %.15g)", - bbox->xmin, bbox->ymin, - bbox->xmax,bbox->ymax); - - PG_RETURN_CSTRING(result); -} - -PG_FUNCTION_INFO_V1(BOX3D_extent_to_BOX3D); -Datum BOX3D_extent_to_BOX3D(PG_FUNCTION_ARGS) +PG_FUNCTION_INFO_V1(BOX3D_to_BOX2D); +Datum BOX3D_to_BOX2D(PG_FUNCTION_ARGS) { BOX3D *in = (BOX3D *)PG_GETARG_POINTER(0); - BOX3D *out = palloc(sizeof(BOX3D)); - out->xmin = in->xmin; - out->xmax = in->xmax; - out->ymin = in->ymin; - out->ymax = in->ymax; - + GBOX *out = box3d_to_gbox(in); PG_RETURN_POINTER(out); } -PG_FUNCTION_INFO_V1(BOX3D_to_BOX2DFLOAT4); -Datum BOX3D_to_BOX2DFLOAT4(PG_FUNCTION_ARGS) +static void +box3d_to_box_p(BOX3D *box, BOX *out) { - BOX3D *in = (BOX3D *)PG_GETARG_POINTER(0); - BOX2DFLOAT4 *out = box3d_to_box2df(in); - PG_RETURN_POINTER(out); +#if PARANOIA_LEVEL > 0 + if (box == NULL) return; +#endif + + out->low.x = box->xmin; + out->low.y = box->ymin; + + out->high.x = box->xmax; + out->high.y = box->ymax; } PG_FUNCTION_INFO_V1(BOX3D_to_BOX); @@ -206,14 +172,14 @@ PG_RETURN_POINTER(box); } + PG_FUNCTION_INFO_V1(BOX3D_to_LWGEOM); Datum BOX3D_to_LWGEOM(PG_FUNCTION_ARGS) { BOX3D *box = (BOX3D *)PG_GETARG_POINTER(0); POINTARRAY *pa; - int wantbbox = 0; - PG_LWGEOM *result; - uchar *ser; + GSERIALIZED *result; + POINT4D pt; /** @@ -227,62 +193,57 @@ * - Otherwise return a POLYGON */ - if (box->xmin == box->xmax && - box->ymin == box->ymax) + pa = ptarray_construct_empty(0, 0, 5); + + if ( (box->xmin == box->xmax) && (box->ymin == box->ymax) ) { - /* Construct and serialize point */ - LWPOINT *point = make_lwpoint2d(-1, box->xmin, box->ymin); - ser = lwpoint_serialize(point); + LWPOINT *lwpt = lwpoint_construct(SRID_UNKNOWN, NULL, pa); + + pt.x = box->xmin; + pt.y = box->ymin; + ptarray_append_point(pa, &pt, LW_TRUE); + + result = geometry_serialize(lwpoint_as_lwgeom(lwpt)); } else if (box->xmin == box->xmax || box->ymin == box->ymax) { - LWLINE *line; - POINT2D *pts = palloc(sizeof(POINT2D)*2); + LWLINE *lwline = lwline_construct(SRID_UNKNOWN, NULL, pa); + + pt.x = box->xmin; + pt.y = box->ymin; + ptarray_append_point(pa, &pt, LW_TRUE); + pt.x = box->xmax; + pt.y = box->ymax; + ptarray_append_point(pa, &pt, LW_TRUE); - /* Assign coordinates to POINT2D array */ - pts[0].x = box->xmin; - pts[0].y = box->ymin; - pts[1].x = box->xmax; - pts[1].y = box->ymax; - - /* Construct point array */ - pa = pointArray_construct((uchar *)pts, 0, 0, 2); - - /* Construct and serialize linestring */ - line = lwline_construct(-1, NULL, pa); - ser = lwline_serialize(line); + result = geometry_serialize(lwline_as_lwgeom(lwline)); } else { - LWPOLY *poly; - POINT2D *pts = palloc(sizeof(POINT2D)*5); + LWPOLY *lwpoly = lwpoly_construct(SRID_UNKNOWN, NULL, 1, &pa); - /* Assign coordinates to POINT2D array */ - pts[0].x = box->xmin; - pts[0].y = box->ymin; - pts[1].x = box->xmin; - pts[1].y = box->ymax; - pts[2].x = box->xmax; - pts[2].y = box->ymax; - pts[3].x = box->xmax; - pts[3].y = box->ymin; - pts[4].x = box->xmin; - pts[4].y = box->ymin; - - /* Construct point array */ - pa = pointArray_construct((uchar *)pts, 0, 0, 5); - - /* Construct polygon */ - poly = lwpoly_construct(-1, NULL, 1, &pa); + pt.x = box->xmin; + pt.y = box->ymin; + ptarray_append_point(pa, &pt, LW_TRUE); + pt.x = box->xmin; + pt.y = box->ymax; + ptarray_append_point(pa, &pt, LW_TRUE); + pt.x = box->xmax; + pt.y = box->ymax; + ptarray_append_point(pa, &pt, LW_TRUE); + pt.x = box->xmax; + pt.y = box->ymin; + ptarray_append_point(pa, &pt, LW_TRUE); + pt.x = box->xmin; + pt.y = box->ymin; + ptarray_append_point(pa, &pt, LW_TRUE); - /* Serialize polygon */ - ser = lwpoly_serialize(poly); + result = geometry_serialize(lwpoly_as_lwgeom(lwpoly)); + } - /* Construct PG_LWGEOM */ - result = PG_LWGEOM_construct(ser, -1, wantbbox); - + gserialized_set_srid(result, box->srid); PG_RETURN_POINTER(result); } @@ -313,7 +274,7 @@ } /** - * convert a PG_LWGEOM to BOX3D + * convert a GSERIALIZED to BOX3D * * NOTE: the bounding box is *always* recomputed as the cache * is a box2d, not a box3d... @@ -322,12 +283,19 @@ PG_FUNCTION_INFO_V1(LWGEOM_to_BOX3D); Datum LWGEOM_to_BOX3D(PG_FUNCTION_ARGS) { - PG_LWGEOM *lwgeom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + LWGEOM *lwgeom = lwgeom_from_gserialized(geom); + GBOX gbox; BOX3D *result; + int rv = lwgeom_calculate_gbox(lwgeom, &gbox); - result = compute_serialized_box3d(SERIALIZED_FORM(lwgeom)); - if ( ! result ) PG_RETURN_NULL(); + if ( rv == LW_FAILURE ) + PG_RETURN_NULL(); + + result = box3d_from_gbox(&gbox); + result->srid = lwgeom->srid; + lwgeom_free(lwgeom); PG_RETURN_POINTER(result); } @@ -335,123 +303,133 @@ Datum BOX3D_xmin(PG_FUNCTION_ARGS) { BOX3D *box = (BOX3D *)PG_GETARG_POINTER(0); - PG_RETURN_FLOAT8(LWGEOM_Mind(box->xmin, box->xmax)); + PG_RETURN_FLOAT8(Min(box->xmin, box->xmax)); } PG_FUNCTION_INFO_V1(BOX3D_ymin); Datum BOX3D_ymin(PG_FUNCTION_ARGS) { BOX3D *box = (BOX3D *)PG_GETARG_POINTER(0); - PG_RETURN_FLOAT8(LWGEOM_Mind(box->ymin, box->ymax)); + PG_RETURN_FLOAT8(Min(box->ymin, box->ymax)); } PG_FUNCTION_INFO_V1(BOX3D_zmin); Datum BOX3D_zmin(PG_FUNCTION_ARGS) { BOX3D *box = (BOX3D *)PG_GETARG_POINTER(0); - PG_RETURN_FLOAT8(LWGEOM_Mind(box->zmin, box->zmax)); + PG_RETURN_FLOAT8(Min(box->zmin, box->zmax)); } PG_FUNCTION_INFO_V1(BOX3D_xmax); Datum BOX3D_xmax(PG_FUNCTION_ARGS) { BOX3D *box = (BOX3D *)PG_GETARG_POINTER(0); - PG_RETURN_FLOAT8(LWGEOM_Maxd(box->xmin, box->xmax)); + PG_RETURN_FLOAT8(Max(box->xmin, box->xmax)); } PG_FUNCTION_INFO_V1(BOX3D_ymax); Datum BOX3D_ymax(PG_FUNCTION_ARGS) { BOX3D *box = (BOX3D *)PG_GETARG_POINTER(0); - PG_RETURN_FLOAT8(LWGEOM_Maxd(box->ymin, box->ymax)); + PG_RETURN_FLOAT8(Max(box->ymin, box->ymax)); } PG_FUNCTION_INFO_V1(BOX3D_zmax); Datum BOX3D_zmax(PG_FUNCTION_ARGS) { BOX3D *box = (BOX3D *)PG_GETARG_POINTER(0); - PG_RETURN_FLOAT8(LWGEOM_Maxd(box->zmin, box->zmax)); + PG_RETURN_FLOAT8(Max(box->zmin, box->zmax)); } - +/** +* Used in the ST_Extent and ST_Extent3D aggregates, does not read the +* serialized cached bounding box (since that is floating point) +* but calculates the box in full from the underlying geometry. +*/ PG_FUNCTION_INFO_V1(BOX3D_combine); Datum BOX3D_combine(PG_FUNCTION_ARGS) { - Pointer box3d_ptr = PG_GETARG_POINTER(0); - Pointer geom_ptr = PG_GETARG_POINTER(1); - BOX3D *a,*b; - PG_LWGEOM *lwgeom; - BOX3D *box, *result; + BOX3D *box = (BOX3D*)PG_GETARG_POINTER(0); + GSERIALIZED *geom = PG_ARGISNULL(1) ? NULL : (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_POINTER(1)); + LWGEOM *lwgeom = NULL; + BOX3D *result = NULL; + GBOX gbox; + int32_t srid; + int rv; - if ( (box3d_ptr == NULL) && (geom_ptr == NULL) ) - { + /* Can't do anything with null inputs */ + if ( (box == NULL) && (geom == NULL) ) PG_RETURN_NULL(); - } - result = (BOX3D *)palloc(sizeof(BOX3D)); - - if (box3d_ptr == NULL) + /* Null geometry but non-null box, return the box */ + if (geom == NULL) { - lwgeom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - box = compute_serialized_box3d(SERIALIZED_FORM(lwgeom)); - if ( ! box ) - { - PG_FREE_IF_COPY(lwgeom, 1); - PG_RETURN_NULL(); /* must be the empty geom */ - } + result = palloc(sizeof(BOX3D)); memcpy(result, box, sizeof(BOX3D)); PG_RETURN_POINTER(result); } - /* combine_bbox(BOX3D, null) => BOX3D */ - if (geom_ptr == NULL) - { - memcpy(result, (char *)PG_GETARG_DATUM(0), sizeof(BOX3D)); + /* Deserialize geometry and *calculate* the box */ + /* We can't use the cached box because it's float, we *must* calculate */ + lwgeom = lwgeom_from_gserialized(geom); + srid = lwgeom->srid; + rv = lwgeom_calculate_gbox(lwgeom, &gbox); + lwgeom_free(lwgeom); + + /* If we couldn't calculate the box, return what we know */ + if ( rv == LW_FAILURE ) + { + PG_FREE_IF_COPY(geom, 1); + /* No geom box, no input box, so null return */ + if ( box == NULL ) + PG_RETURN_NULL(); + result = palloc(sizeof(BOX3D)); + memcpy(result, box, sizeof(BOX3D)); PG_RETURN_POINTER(result); } - lwgeom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - box = compute_serialized_box3d(SERIALIZED_FORM(lwgeom)); - if ( ! box ) /* must be the empty geom */ + /* Null box and non-null geometry, just return the geometry box */ + if ( box == NULL ) { - PG_FREE_IF_COPY(lwgeom, 1); - memcpy(result, (char *)PG_GETARG_DATUM(0), sizeof(BOX3D)); + PG_FREE_IF_COPY(geom, 1); + result = box3d_from_gbox(&gbox); + result->srid = srid; PG_RETURN_POINTER(result); } - a = (BOX3D *)PG_GETARG_DATUM(0); - b = box; - - result->xmax = LWGEOM_Maxd(a->xmax, b->xmax); - result->ymax = LWGEOM_Maxd(a->ymax, b->ymax); - result->zmax = LWGEOM_Maxd(a->zmax, b->zmax); - result->xmin = LWGEOM_Mind(a->xmin, b->xmin); - result->ymin = LWGEOM_Mind(a->ymin, b->ymin); - result->zmin = LWGEOM_Mind(a->zmin, b->zmin); + result = palloc(sizeof(BOX3D)); + result->xmax = Max(box->xmax, gbox.xmax); + result->ymax = Max(box->ymax, gbox.ymax); + result->zmax = Max(box->zmax, gbox.zmax); + result->xmin = Min(box->xmin, gbox.xmin); + result->ymin = Min(box->ymin, gbox.ymin); + result->zmin = Min(box->zmin, gbox.zmin); + result->srid = srid; + PG_FREE_IF_COPY(geom, 1); PG_RETURN_POINTER(result); } PG_FUNCTION_INFO_V1(BOX3D_construct); Datum BOX3D_construct(PG_FUNCTION_ARGS) { - PG_LWGEOM *min = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_LWGEOM *max = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + GSERIALIZED *min = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *max = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); BOX3D *result = palloc(sizeof(BOX3D)); LWGEOM *minpoint, *maxpoint; POINT3DZ minp, maxp; - minpoint = lwgeom_deserialize(SERIALIZED_FORM(min)); - maxpoint = lwgeom_deserialize(SERIALIZED_FORM(max)); + minpoint = lwgeom_from_gserialized(min); + maxpoint = lwgeom_from_gserialized(max); - if ( TYPE_GETTYPE(minpoint->type) != POINTTYPE || - TYPE_GETTYPE(maxpoint->type) != POINTTYPE ) + if ( minpoint->type != POINTTYPE || + maxpoint->type != POINTTYPE ) { elog(ERROR, "BOX3D_construct: args must be points"); PG_RETURN_NULL(); } - errorIfSRIDMismatch(minpoint->SRID, maxpoint->SRID); + error_if_srid_mismatch(minpoint->srid, maxpoint->srid); getPoint3dz_p(((LWPOINT *)minpoint)->point, 0, &minp); getPoint3dz_p(((LWPOINT *)maxpoint)->point, 0, &maxp); @@ -464,24 +442,7 @@ result->ymin = minp.y; result->zmin = minp.z; - PG_RETURN_POINTER(result); -} + result->srid = minpoint->srid; -/** min(a,b) */ -double -LWGEOM_Mind(double a, double b) -{ - if (aa) - return b; - return a; + PG_RETURN_POINTER(result); } - diff -Nru postgis-1.5.3/postgis/lwgeom_btree.c postgis-2.0.1/postgis/lwgeom_btree.c --- postgis-1.5.3/postgis/lwgeom_btree.c 2009-06-11 16:44:03.000000000 +0000 +++ postgis-2.0.1/postgis/lwgeom_btree.c 2012-02-27 22:08:12.000000000 +0000 @@ -1,6 +1,16 @@ -/*********************************************************** +/********************************************************************** * - * $Id: lwgeom_btree.c 4168 2009-06-11 16:44:03Z pramsey $ + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * + * Copyright (C) 2010 Olivier Courtin + * Copyright (C) 2010 Mark Cave-Ayland + * Copyright (C) 2009-2011 Paul Ramsey + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + ********************************************************************** * * Comparision function for use in Binary Tree searches * (ORDER BY, GROUP BY, DISTINCT) @@ -11,6 +21,7 @@ #include "fmgr.h" #include "utils/geo_decls.h" +#include "../postgis_config.h" #include "liblwgeom.h" #include "lwgeom_pg.h" @@ -33,28 +44,29 @@ PG_FUNCTION_INFO_V1(lwgeom_lt); Datum lwgeom_lt(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom1 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_LWGEOM *geom2 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - BOX2DFLOAT4 box1; - BOX2DFLOAT4 box2; + GSERIALIZED *geom1 = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *geom2 = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + GBOX box1; + GBOX box2; POSTGIS_DEBUG(2, "lwgeom_lt called"); - if (pglwgeom_getSRID(geom1) != pglwgeom_getSRID(geom2)) + if (gserialized_get_srid(geom1) != gserialized_get_srid(geom2)) { elog(BTREE_SRID_MISMATCH_SEVERITY, "Operation on two GEOMETRIES with different SRIDs\n"); - if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 ) - pfree(geom1); - if ( (Pointer *)PG_GETARG_DATUM(1) != (Pointer *)geom2 ) - pfree(geom2); + PG_FREE_IF_COPY(geom1, 0); + PG_FREE_IF_COPY(geom2, 1); PG_RETURN_NULL(); } POSTGIS_DEBUG(3, "lwgeom_lt passed getSRID test"); - getbox2d_p(SERIALIZED_FORM(geom1), &box1); - getbox2d_p(SERIALIZED_FORM(geom2), &box2); + gserialized_get_gbox_p(geom1, &box1); + gserialized_get_gbox_p(geom2, &box2); + + PG_FREE_IF_COPY(geom1, 0); + PG_FREE_IF_COPY(geom2, 1); POSTGIS_DEBUG(3, "lwgeom_lt getbox2d_p passed"); @@ -88,37 +100,34 @@ PG_FUNCTION_INFO_V1(lwgeom_le); Datum lwgeom_le(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom1 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_LWGEOM *geom2 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - BOX2DFLOAT4 box1; - BOX2DFLOAT4 box2; + GSERIALIZED *geom1 = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *geom2 = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + GBOX box1; + GBOX box2; POSTGIS_DEBUG(2, "lwgeom_le called"); - if (pglwgeom_getSRID(geom1) != pglwgeom_getSRID(geom2)) + if (gserialized_get_srid(geom1) != gserialized_get_srid(geom2)) { elog(BTREE_SRID_MISMATCH_SEVERITY, "Operation on two GEOMETRIES with different SRIDs\n"); - if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 ) - pfree(geom1); - if ( (Pointer *)PG_GETARG_DATUM(1) != (Pointer *)geom2 ) - pfree(geom2); + PG_FREE_IF_COPY(geom1, 0); + PG_FREE_IF_COPY(geom2, 1); PG_RETURN_NULL(); } - getbox2d_p(SERIALIZED_FORM(geom1), &box1); - getbox2d_p(SERIALIZED_FORM(geom2), &box2); + gserialized_get_gbox_p(geom1, &box1); + gserialized_get_gbox_p(geom2, &box2); + + PG_FREE_IF_COPY(geom1, 0); + PG_FREE_IF_COPY(geom2, 1); if ( ! FPeq(box1.xmin , box2.xmin) ) { if (box1.xmin < box2.xmin) { - if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 ) pfree(geom1); - if ( (Pointer *)PG_GETARG_DATUM(1) != (Pointer *)geom2 ) pfree(geom2); PG_RETURN_BOOL(TRUE); } - if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 ) pfree(geom1); - if ( (Pointer *)PG_GETARG_DATUM(1) != (Pointer *)geom2 ) pfree(geom2); PG_RETURN_BOOL(FALSE); } @@ -126,12 +135,8 @@ { if (box1.ymin < box2.ymin) { - if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 ) pfree(geom1); - if ( (Pointer *)PG_GETARG_DATUM(1) != (Pointer *)geom2 ) pfree(geom2); PG_RETURN_BOOL(TRUE); } - if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 ) pfree(geom1); - if ( (Pointer *)PG_GETARG_DATUM(1) != (Pointer *)geom2 ) pfree(geom2); PG_RETURN_BOOL(FALSE); } @@ -139,12 +144,8 @@ { if (box1.xmax < box2.xmax) { - if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 ) pfree(geom1); - if ( (Pointer *)PG_GETARG_DATUM(1) != (Pointer *)geom2 ) pfree(geom2); PG_RETURN_BOOL(TRUE); } - if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 ) pfree(geom1); - if ( (Pointer *)PG_GETARG_DATUM(1) != (Pointer *)geom2 ) pfree(geom2); PG_RETURN_BOOL(FALSE); } @@ -152,109 +153,81 @@ { if (box1.ymax < box2.ymax) { - if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 ) pfree(geom1); - if ( (Pointer *)PG_GETARG_DATUM(1) != (Pointer *)geom2 ) pfree(geom2); PG_RETURN_BOOL(TRUE); } - if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 ) pfree(geom1); - if ( (Pointer *)PG_GETARG_DATUM(1) != (Pointer *)geom2 ) pfree(geom2); PG_RETURN_BOOL(FALSE); } - if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 ) pfree(geom1); - if ( (Pointer *)PG_GETARG_DATUM(1) != (Pointer *)geom2 ) pfree(geom2); - PG_RETURN_BOOL(TRUE); } PG_FUNCTION_INFO_V1(lwgeom_eq); Datum lwgeom_eq(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom1 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_LWGEOM *geom2 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - BOX2DFLOAT4 box1; - BOX2DFLOAT4 box2; + GSERIALIZED *geom1 = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *geom2 = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + GBOX box1; + GBOX box2; + bool result; POSTGIS_DEBUG(2, "lwgeom_eq called"); - if (pglwgeom_getSRID(geom1) != pglwgeom_getSRID(geom2)) + if (gserialized_get_srid(geom1) != gserialized_get_srid(geom2)) { elog(BTREE_SRID_MISMATCH_SEVERITY, "Operation on two GEOMETRIES with different SRIDs\n"); - if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 ) - pfree(geom1); - if ( (Pointer *)PG_GETARG_DATUM(1) != (Pointer *)geom2 ) - pfree(geom2); + PG_FREE_IF_COPY(geom1, 0); + PG_FREE_IF_COPY(geom2, 1); PG_RETURN_NULL(); } - getbox2d_p(SERIALIZED_FORM(geom1), &box1); - getbox2d_p(SERIALIZED_FORM(geom2), &box2); + gserialized_get_gbox_p(geom1, &box1); + gserialized_get_gbox_p(geom2, &box2); + PG_FREE_IF_COPY(geom1, 0); + PG_FREE_IF_COPY(geom2, 1); - if ( ! FPeq(box1.xmin , box2.xmin) ) + if ( ! (FPeq(box1.xmin, box2.xmin) && FPeq(box1.ymin, box2.ymin) && + FPeq(box1.xmax, box2.xmax) && FPeq(box1.ymax, box2.ymax)) ) { - if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 ) pfree(geom1); - if ( (Pointer *)PG_GETARG_DATUM(1) != (Pointer *)geom2 ) pfree(geom2); - PG_RETURN_BOOL(FALSE); + result = FALSE; } - - if ( ! FPeq(box1.ymin , box2.ymin) ) + else { - if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 ) pfree(geom1); - if ( (Pointer *)PG_GETARG_DATUM(1) != (Pointer *)geom2 ) pfree(geom2); - PG_RETURN_BOOL(FALSE); - } - - if ( ! FPeq(box1.xmax , box2.xmax) ) - { - if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 ) pfree(geom1); - if ( (Pointer *)PG_GETARG_DATUM(1) != (Pointer *)geom2 ) pfree(geom2); - PG_RETURN_BOOL(FALSE); - } - - if ( ! FPeq(box1.ymax , box2.ymax) ) - { - if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 ) pfree(geom1); - if ( (Pointer *)PG_GETARG_DATUM(1) != (Pointer *)geom2 ) pfree(geom2); - PG_RETURN_BOOL(FALSE); + result = TRUE; } - if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 ) pfree(geom1); - if ( (Pointer *)PG_GETARG_DATUM(1) != (Pointer *)geom2 ) pfree(geom2); - - PG_RETURN_BOOL(TRUE); + PG_RETURN_BOOL(result); } PG_FUNCTION_INFO_V1(lwgeom_ge); Datum lwgeom_ge(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom1 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_LWGEOM *geom2 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - BOX2DFLOAT4 box1; - BOX2DFLOAT4 box2; + GSERIALIZED *geom1 = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *geom2 = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + GBOX box1; + GBOX box2; POSTGIS_DEBUG(2, "lwgeom_ge called"); - if (pglwgeom_getSRID(geom1) != pglwgeom_getSRID(geom2)) + if (gserialized_get_srid(geom1) != gserialized_get_srid(geom2)) { elog(BTREE_SRID_MISMATCH_SEVERITY, "Operation on two GEOMETRIES with different SRIDs\n"); - if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 ) - pfree(geom1); - if ( (Pointer *)PG_GETARG_DATUM(1) != (Pointer *)geom2 ) - pfree(geom2); + PG_FREE_IF_COPY(geom1, 0); + PG_FREE_IF_COPY(geom2, 1); PG_RETURN_NULL(); } - getbox2d_p(SERIALIZED_FORM(geom1), &box1); - getbox2d_p(SERIALIZED_FORM(geom2), &box2); + gserialized_get_gbox_p(geom1, &box1); + gserialized_get_gbox_p(geom2, &box2); + + PG_FREE_IF_COPY(geom1, 0); + PG_FREE_IF_COPY(geom2, 1); if ( ! FPeq(box1.xmin , box2.xmin) ) { if (box1.xmin > box2.xmin) { - if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 ) pfree(geom1); - if ( (Pointer *)PG_GETARG_DATUM(1) != (Pointer *)geom2 ) pfree(geom2); PG_RETURN_BOOL(TRUE); } PG_RETURN_BOOL(FALSE); @@ -264,8 +237,6 @@ { if (box1.ymin > box2.ymin) { - if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 ) pfree(geom1); - if ( (Pointer *)PG_GETARG_DATUM(1) != (Pointer *)geom2 ) pfree(geom2); PG_RETURN_BOOL(TRUE); } PG_RETURN_BOOL(FALSE); @@ -275,8 +246,6 @@ { if (box1.xmax > box2.xmax) { - if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 ) pfree(geom1); - if ( (Pointer *)PG_GETARG_DATUM(1) != (Pointer *)geom2 ) pfree(geom2); PG_RETURN_BOOL(TRUE); } PG_RETURN_BOOL(FALSE); @@ -286,49 +255,43 @@ { if (box1.ymax > box2.ymax) { - if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 ) pfree(geom1); - if ( (Pointer *)PG_GETARG_DATUM(1) != (Pointer *)geom2 ) pfree(geom2); PG_RETURN_BOOL(TRUE); } PG_RETURN_BOOL(FALSE); } - if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 ) pfree(geom1); - if ( (Pointer *)PG_GETARG_DATUM(1) != (Pointer *)geom2 ) pfree(geom2); - PG_RETURN_BOOL(TRUE); } PG_FUNCTION_INFO_V1(lwgeom_gt); Datum lwgeom_gt(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom1 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_LWGEOM *geom2 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - BOX2DFLOAT4 box1; - BOX2DFLOAT4 box2; + GSERIALIZED *geom1 = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *geom2 = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + GBOX box1; + GBOX box2; POSTGIS_DEBUG(2, "lwgeom_gt called"); - if (pglwgeom_getSRID(geom1) != pglwgeom_getSRID(geom2)) + if (gserialized_get_srid(geom1) != gserialized_get_srid(geom2)) { elog(BTREE_SRID_MISMATCH_SEVERITY, "Operation on two GEOMETRIES with different SRIDs\n"); - if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 ) - pfree(geom1); - if ( (Pointer *)PG_GETARG_DATUM(1) != (Pointer *)geom2 ) - pfree(geom2); + PG_FREE_IF_COPY(geom1, 0); + PG_FREE_IF_COPY(geom2, 1); PG_RETURN_NULL(); } - getbox2d_p(SERIALIZED_FORM(geom1), &box1); - getbox2d_p(SERIALIZED_FORM(geom2), &box2); + gserialized_get_gbox_p(geom1, &box1); + gserialized_get_gbox_p(geom2, &box2); + + PG_FREE_IF_COPY(geom1, 0); + PG_FREE_IF_COPY(geom2, 1); if ( ! FPeq(box1.xmin , box2.xmin) ) { if (box1.xmin > box2.xmin) { - if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 ) pfree(geom1); - if ( (Pointer *)PG_GETARG_DATUM(1) != (Pointer *)geom2 ) pfree(geom2); PG_RETURN_BOOL(TRUE); } } @@ -337,8 +300,6 @@ { if (box1.ymin > box2.ymin) { - if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 ) pfree(geom1); - if ( (Pointer *)PG_GETARG_DATUM(1) != (Pointer *)geom2 ) pfree(geom2); PG_RETURN_BOOL(TRUE); } } @@ -347,8 +308,6 @@ { if (box1.xmax > box2.xmax) { - if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 ) pfree(geom1); - if ( (Pointer *)PG_GETARG_DATUM(1) != (Pointer *)geom2 ) pfree(geom2); PG_RETURN_BOOL(TRUE); } } @@ -357,52 +316,44 @@ { if (box1.ymax > box2.ymax) { - if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 ) pfree(geom1); - if ( (Pointer *)PG_GETARG_DATUM(1) != (Pointer *)geom2 ) pfree(geom2); PG_RETURN_BOOL(TRUE); } } - if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 ) pfree(geom1); - if ( (Pointer *)PG_GETARG_DATUM(1) != (Pointer *)geom2 ) pfree(geom2); - PG_RETURN_BOOL(FALSE); } PG_FUNCTION_INFO_V1(lwgeom_cmp); Datum lwgeom_cmp(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom1 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_LWGEOM *geom2 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - BOX2DFLOAT4 box1; - BOX2DFLOAT4 box2; + GSERIALIZED *geom1 = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *geom2 = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + GBOX box1; + GBOX box2; POSTGIS_DEBUG(2, "lwgeom_cmp called"); - if (pglwgeom_getSRID(geom1) != pglwgeom_getSRID(geom2)) + if (gserialized_get_srid(geom1) != gserialized_get_srid(geom2)) { elog(BTREE_SRID_MISMATCH_SEVERITY, "Operation on two GEOMETRIES with different SRIDs\n"); - if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 ) - pfree(geom1); - if ( (Pointer *)PG_GETARG_DATUM(1) != (Pointer *)geom2 ) - pfree(geom2); + PG_FREE_IF_COPY(geom1, 0); + PG_FREE_IF_COPY(geom2, 1); PG_RETURN_NULL(); } - getbox2d_p(SERIALIZED_FORM(geom1), &box1); - getbox2d_p(SERIALIZED_FORM(geom2), &box2); + gserialized_get_gbox_p(geom1, &box1); + gserialized_get_gbox_p(geom2, &box2); + + PG_FREE_IF_COPY(geom1, 0); + PG_FREE_IF_COPY(geom2, 1); if ( ! FPeq(box1.xmin , box2.xmin) ) { if (box1.xmin < box2.xmin) { - if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 ) pfree(geom1); - if ( (Pointer *)PG_GETARG_DATUM(1) != (Pointer *)geom2 ) pfree(geom2); PG_RETURN_INT32(-1); } - if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 ) pfree(geom1); - if ( (Pointer *)PG_GETARG_DATUM(1) != (Pointer *)geom2 ) pfree(geom2); PG_RETURN_INT32(1); } @@ -410,12 +361,8 @@ { if (box1.ymin < box2.ymin) { - if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 ) pfree(geom1); - if ( (Pointer *)PG_GETARG_DATUM(1) != (Pointer *)geom2 ) pfree(geom2); PG_RETURN_INT32(-1); } - if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 ) pfree(geom1); - if ( (Pointer *)PG_GETARG_DATUM(1) != (Pointer *)geom2 ) pfree(geom2); PG_RETURN_INT32(1); } @@ -423,12 +370,8 @@ { if (box1.xmax < box2.xmax) { - if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 ) pfree(geom1); - if ( (Pointer *)PG_GETARG_DATUM(1) != (Pointer *)geom2 ) pfree(geom2); PG_RETURN_INT32(-1); } - if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 ) pfree(geom1); - if ( (Pointer *)PG_GETARG_DATUM(1) != (Pointer *)geom2 ) pfree(geom2); PG_RETURN_INT32(1); } @@ -436,58 +379,11 @@ { if (box1.ymax < box2.ymax) { - if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 ) pfree(geom1); - if ( (Pointer *)PG_GETARG_DATUM(1) != (Pointer *)geom2 ) pfree(geom2); PG_RETURN_INT32(-1); } - if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 ) pfree(geom1); - if ( (Pointer *)PG_GETARG_DATUM(1) != (Pointer *)geom2 ) pfree(geom2); PG_RETURN_INT32(1); } - if ( (Pointer *)PG_GETARG_DATUM(0) != (Pointer *)geom1 ) pfree(geom1); - if ( (Pointer *)PG_GETARG_DATUM(1) != (Pointer *)geom2 ) pfree(geom2); - PG_RETURN_INT32(0); } -/*********************************************************** - * - * $Log$ - * Revision 1.9 2006/01/09 15:55:55 strk - * ISO C90 comments (finished in lwgeom/) - * - * Revision 1.8 2005/06/15 16:04:11 strk - * fault tolerant btree ops - * - * Revision 1.7 2005/02/07 13:21:10 strk - * Replaced DEBUG* macros with PGIS_DEBUG*, to avoid clashes with postgresql DEBUG - * - * Revision 1.6 2005/01/05 12:44:47 strk - * Added is_worth_caching_serialized_bbox(). Renamed lwgeom_setSRID() to - * pglwgeom_setSRID(). Fixed a bug in PG_LWGEOM_construct support for - * AUTOCACHE_BBOX. - * - * Revision 1.5 2004/09/29 10:50:30 strk - * Big layout change. - * lwgeom.h is public API - * liblwgeom.h is private header - * lwgeom_pg.h is for PG-links - * lw.c contains type-specific functions - * - * Revision 1.4 2004/09/29 06:31:42 strk - * Changed LWGEOM to PG_LWGEOM. - * Changed LWGEOM_construct to PG_LWGEOM_construct. - * - * Revision 1.3 2004/08/20 14:08:41 strk - * Added Geom{etry,}FromWkb(,[]) funx. - * Added LWGEOM typedef and SERIALIZED_FORM(LWGEOM) macro. - * Made lwgeom_setSRID an API function. - * Added LWGEOM_setAllocator(). - * - * Revision 1.2 2004/08/19 13:10:13 strk - * fixed typos - * - * (ORDER BY, GROUP BY, DISTINCT) - * - ***********************************************************/ diff -Nru postgis-1.5.3/postgis/lwgeom_cache.c postgis-2.0.1/postgis/lwgeom_cache.c --- postgis-1.5.3/postgis/lwgeom_cache.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/postgis/lwgeom_cache.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,33 @@ +/********************************************************************** + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * + * Copyright (C) 2012 Sandro Santilli + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include "postgres.h" +#include "fmgr.h" + +#include "../postgis_config.h" +#include "lwgeom_cache.h" + +GeomCache* GetGeomCache(FunctionCallInfoData *fcinfo) +{ + MemoryContext old_context; + GeomCache* cache = fcinfo->flinfo->fn_extra; + if ( ! cache ) { + old_context = MemoryContextSwitchTo(fcinfo->flinfo->fn_mcxt); + cache = palloc(sizeof(GeomCache)); + MemoryContextSwitchTo(old_context); + cache->prep = 0; + cache->rtree = 0; + fcinfo->flinfo->fn_extra = cache; + } + return cache; +} + diff -Nru postgis-1.5.3/postgis/lwgeom_cache.h postgis-2.0.1/postgis/lwgeom_cache.h --- postgis-1.5.3/postgis/lwgeom_cache.h 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/postgis/lwgeom_cache.h 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,30 @@ +/********************************************************************** + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * + * Copyright (C) 2012 Sandro Santilli + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#ifndef LWGEOM_GEOS_CACHE_H_ +#define LWGEOM_GEOS_CACHE_H_ 1 + +#include "postgres.h" +#include "fmgr.h" + +#include "lwgeom_pg.h" +#include "lwgeom_rtree.h" +#include "lwgeom_geos_prepared.h" + +typedef struct { + PrepGeomCache* prep; + RTREE_POLY_CACHE* rtree; +} GeomCache; + +GeomCache* GetGeomCache(FunctionCallInfoData *fcinfo); + +#endif /* LWGEOM_GEOS_CACHE_H_ 1 */ diff -Nru postgis-1.5.3/postgis/lwgeom_chip.c postgis-2.0.1/postgis/lwgeom_chip.c --- postgis-1.5.3/postgis/lwgeom_chip.c 2010-02-01 17:35:55.000000000 +0000 +++ postgis-2.0.1/postgis/lwgeom_chip.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,1364 +0,0 @@ -#include "postgres.h" -#include "access/gist.h" -#include "access/itup.h" -#include "fmgr.h" -#include "utils/elog.h" -#include "funcapi.h" - -#include "lwgeom_pg.h" -#include "liblwgeom.h" - -#include -#include -#include -#include -#include - -/* Define this to debug CHIP ops */ -/*#define DEBUG_CHIP 1*/ - -typedef unsigned short int UINT16; -typedef float FLOAT32; - -typedef struct PIXEL_T -{ - int type; /* 1=float32, 5=int24, 6=int16 */ - uchar val[4]; -} -PIXEL; - -typedef struct RGB_T -{ - uchar red; - uchar green; - uchar blue; -} -RGB; - - -/* Internal funcs */ -void swap_char(char *a,char *b); -void flip_endian_double(char *d); -void flip_endian_int32(char *i); -const char* pixelOpName(int op); -const char* pixelHEX(PIXEL* p); -UINT16 pixel_readUINT16(PIXEL *p); -void pixel_writeUINT16(PIXEL *p, UINT16 i); -PIXEL pixel_readval(char *buf); -void pixel_writeval(PIXEL *p, char *buf, size_t maxlen); -void pixel_add_float32(PIXEL *where, PIXEL *what); -void pixel_add_int24(PIXEL *where, PIXEL *what); -void pixel_add_int16(PIXEL *where, PIXEL *what); -void pixel_add(PIXEL *where, PIXEL *what); -size_t chip_xy_off(CHIP *c, size_t x, size_t y); -void chip_setPixel(CHIP *c, int x, int y, PIXEL *p); -PIXEL chip_getPixel(CHIP *c, int x, int y); -void chip_draw_pixel(CHIP *chip, int x, int y, PIXEL *pixel, int op); -void chip_draw_segment(CHIP *chip, int x1, int y1, int x2, int y2, PIXEL *pixel, int op); -void chip_fill(CHIP *chip, PIXEL *pixel, int op); -CHIP * pgchip_construct(BOX3D *bvol, int SRID, int width, int height, int datatype, PIXEL *initvalue); -void chip_draw_ptarray(CHIP *chip, POINTARRAY *pa, PIXEL *pixel, int op); -void chip_draw_lwpoint(CHIP *chip, LWPOINT *lwpoint, PIXEL* pixel, int op); -void chip_draw_lwline(CHIP *chip, LWLINE *lwline, PIXEL* pixel, int op); -void chip_draw_lwgeom(CHIP *chip, LWGEOM *lwgeom, PIXEL *pixel, int op); -char * text_to_cstring(text *t); - - -/* Prototypes */ -Datum CHIP_in(PG_FUNCTION_ARGS); -Datum CHIP_out(PG_FUNCTION_ARGS); -Datum CHIP_to_LWGEOM(PG_FUNCTION_ARGS); -Datum CHIP_getSRID(PG_FUNCTION_ARGS); -Datum CHIP_getFactor(PG_FUNCTION_ARGS); -Datum CHIP_setFactor(PG_FUNCTION_ARGS); -Datum CHIP_getDatatype(PG_FUNCTION_ARGS); -Datum CHIP_getCompression(PG_FUNCTION_ARGS); -Datum CHIP_getHeight(PG_FUNCTION_ARGS); -Datum CHIP_getWidth(PG_FUNCTION_ARGS); -Datum CHIP_setSRID(PG_FUNCTION_ARGS); -Datum CHIP_send(PG_FUNCTION_ARGS); -Datum CHIP_dump(PG_FUNCTION_ARGS); -Datum CHIP_construct(PG_FUNCTION_ARGS); -Datum CHIP_getpixel(PG_FUNCTION_ARGS); -Datum CHIP_setpixel(PG_FUNCTION_ARGS); -Datum CHIP_draw(PG_FUNCTION_ARGS); -Datum CHIP_fill(PG_FUNCTION_ARGS); - - -/* - * Input is a string with hex chars in it. - * Convert to binary and put in the result - */ -PG_FUNCTION_INFO_V1(CHIP_in); -Datum CHIP_in(PG_FUNCTION_ARGS) -{ - char *str = PG_GETARG_CSTRING(0); - CHIP *result; - int size; - int t; - int input_str_len; - int datum_size; - - /*printf("chip_in called\n"); */ - - input_str_len = strlen(str); - - if ( ( ( (int)(input_str_len/2.0) ) *2.0) != input_str_len) - { - elog(ERROR,"CHIP_in parser - should be even number of characters!"); - PG_RETURN_NULL(); - } - - if (strspn(str,"0123456789ABCDEF") != strlen(str) ) - { - elog(ERROR,"CHIP_in parser - input contains bad characters. Should only have '0123456789ABCDEF'!"); - PG_RETURN_NULL(); - } - size = (input_str_len/2) ; - result = (CHIP *) palloc(size); - - for (t=0; tsize = size; - if (result->size < sizeof(CHIP)-sizeof(void*) ) - { - elog(ERROR,"CHIP_in parser - bad data (too small to be a CHIP)!"); - PG_RETURN_NULL(); - } - - if (result->endian_hint != 1) - { - /*need to do an endian flip */ - flip_endian_int32( (char *) &result->endian_hint); - - flip_endian_double((char *) &result->bvol.xmin); - flip_endian_double((char *) &result->bvol.ymin); - flip_endian_double((char *) &result->bvol.zmin); - - flip_endian_double((char *) &result->bvol.xmax); - flip_endian_double((char *) &result->bvol.ymax); - flip_endian_double((char *) &result->bvol.zmax); - - flip_endian_int32( (char *) & result->SRID); - /*dont know what to do with future[8] ... */ - - flip_endian_int32( (char *) & result->height); - flip_endian_int32( (char *) & result->width); - flip_endian_int32( (char *) & result->compression); - flip_endian_int32( (char *) & result->factor); - flip_endian_int32( (char *) & result->datatype); - - } - if (result->endian_hint != 1 ) - { - elog(ERROR,"CHIP_in parser - bad data (endian flag != 1)!"); - PG_RETURN_NULL(); - } - datum_size = 4; - - if ( (result->datatype == 6) || (result->datatype == 7) || (result->datatype == 106) || (result->datatype == 107) ) - { - datum_size = 2; - } - if ( (result->datatype == 8) || (result->datatype == 108) ) - { - datum_size=1; - } - - if (result->compression ==0) /*only true for non-compressed data */ - { - if (result->size != (sizeof(CHIP) - sizeof(void*) + datum_size * result->width*result->height) ) - { - elog(ERROR,"CHIP_in parser - bad data (actual size [%d] != computed size [%ld])!", result->size, (long int)(sizeof(CHIP)-sizeof(void*) + datum_size * result->width*result->height) ); - PG_RETURN_NULL(); - } - } - - PG_RETURN_POINTER(result); -} - - -/*given a CHIP structure, convert it to Hex and put it in a string */ -PG_FUNCTION_INFO_V1(CHIP_out); -Datum CHIP_out(PG_FUNCTION_ARGS) -{ - CHIP *chip = (CHIP *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - char *result; - int size_result; - int t; - -#if DEBUG_CHIP - lwnotice("CHIP_out: %dx%d chip, %d in size", chip->width, chip->height, chip->size); -#endif - - size_result = (chip->size ) *2 +1; /* +1 for null char */ - result = palloc (size_result); - result[size_result-1] = 0; /*null terminate */ - - for (t=0; t< (chip->size); t++) - { - deparse_hex( ((uchar *) chip)[t], &result[t*2]); - } - PG_RETURN_CSTRING(result); -} - - -/*given a CHIP structure pipe it out as raw binary */ -PG_FUNCTION_INFO_V1(CHIP_send); -Datum CHIP_send(PG_FUNCTION_ARGS) -{ - CHIP *chip = (CHIP *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - bytea *result; - - - - result = (bytea *)palloc( chip->size ); - /*SET_VARSIZE(result, chip->size + VARHDRSZ);*/ - /*memcpy( VARDATA(result), chip, chip->size ); */ - memcpy( result, chip, chip->size ); - PG_RETURN_POINTER(result); - /*PG_RETURN_POINTER( (bytea *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)) );*/ -} - - -PG_FUNCTION_INFO_V1(CHIP_to_LWGEOM); -Datum CHIP_to_LWGEOM(PG_FUNCTION_ARGS) -{ - CHIP *chip = (CHIP *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_LWGEOM *result; - POINT2D *pts = palloc(sizeof(POINT2D)*5); - POINTARRAY *pa[1]; - LWPOLY *poly; - uchar *ser; - int wantbbox = false; - - /* Assign coordinates to POINT2D array */ - pts[0].x = chip->bvol.xmin; - pts[0].y = chip->bvol.ymin; - pts[1].x = chip->bvol.xmin; - pts[1].y = chip->bvol.ymax; - pts[2].x = chip->bvol.xmax; - pts[2].y = chip->bvol.ymax; - pts[3].x = chip->bvol.xmax; - pts[3].y = chip->bvol.ymin; - pts[4].x = chip->bvol.xmin; - pts[4].y = chip->bvol.ymin; - - /* Construct point array */ - pa[0] = palloc(sizeof(POINTARRAY)); - pa[0]->serialized_pointlist = (uchar *)pts; - TYPE_SETZM(pa[0]->dims, 0, 0); - pa[0]->npoints = 5; - - /* Construct polygon */ - poly = lwpoly_construct(chip->SRID, NULL, 1, pa); - - /* Serialize polygon */ - ser = lwpoly_serialize(poly); - - /* Construct PG_LWGEOM */ - result = PG_LWGEOM_construct(ser, chip->SRID, wantbbox); - - PG_RETURN_POINTER(result); - -} - -PG_FUNCTION_INFO_V1(CHIP_getSRID); -Datum CHIP_getSRID(PG_FUNCTION_ARGS) -{ - CHIP *c = (CHIP *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_RETURN_INT32(c->SRID); -} - -PG_FUNCTION_INFO_V1(CHIP_getFactor); -Datum CHIP_getFactor(PG_FUNCTION_ARGS) -{ - CHIP *c = (CHIP *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_RETURN_FLOAT4(c->factor); -} - -PG_FUNCTION_INFO_V1(CHIP_setFactor); -Datum CHIP_setFactor(PG_FUNCTION_ARGS) -{ - CHIP *c = (CHIP *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - float factor = PG_GETARG_FLOAT4(1); - CHIP *result; - - result = (CHIP *) palloc(c->size); - - memcpy(result,c,c->size); - result->factor = factor; - - PG_RETURN_POINTER(result); -} - - - -PG_FUNCTION_INFO_V1(CHIP_getDatatype); -Datum CHIP_getDatatype(PG_FUNCTION_ARGS) -{ - CHIP *c = (CHIP *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_RETURN_INT32(c->datatype); -} - -PG_FUNCTION_INFO_V1(CHIP_getCompression); -Datum CHIP_getCompression(PG_FUNCTION_ARGS) -{ - CHIP *c = (CHIP *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_RETURN_INT32(c->compression); -} - -PG_FUNCTION_INFO_V1(CHIP_getHeight); -Datum CHIP_getHeight(PG_FUNCTION_ARGS) -{ - CHIP *c = (CHIP *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_RETURN_INT32(c->height); -} - -PG_FUNCTION_INFO_V1(CHIP_getWidth); -Datum CHIP_getWidth(PG_FUNCTION_ARGS) -{ - CHIP *c = (CHIP *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_RETURN_INT32(c->width); -} - - -PG_FUNCTION_INFO_V1(CHIP_setSRID); -Datum CHIP_setSRID(PG_FUNCTION_ARGS) -{ - CHIP *c = (CHIP *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - int32 new_srid = PG_GETARG_INT32(1); - CHIP *result; - - result = (CHIP *) palloc(c->size); - - memcpy(result, c, c->size); - result->SRID = new_srid; - - PG_RETURN_POINTER(result); -} - -void flip_endian_double(char *d) -{ - swap_char(d+7, d); - swap_char(d+6, d+1); - swap_char(d+5, d+2); - swap_char(d+4, d+3); -} - -void swap_char(char *a,char *b) -{ - char c; - - c = *a; - *a=*b; - *b=c; -} - -void flip_endian_int32(char *i) -{ - swap_char (i+3,i); - swap_char (i+2,i+1); -} - -/******************************************************************** - * - * NEW chip code - * - ********************************************************************/ - -#define CHIP_BOUNDS_CHECKS 1 - - -/* Macros to find size (in geographic units) of a CHIP cell (or pixel) */ -#define CHIP_CELL_WIDTH(x) ( ((x)->bvol.xmax-(x)->bvol.xmin)/(x)->width ) -#define CHIP_CELL_HEIGHT(x) ( ((x)->bvol.ymax-(x)->bvol.ymin)/(x)->height ) - -/* Return the size of values for pixel of the given datatype */ -size_t chip_pixel_value_size(int datatype); - -/******************************************************************** - * - * IO primitives - * - ********************************************************************/ - -#define PIXELOP_OVERWRITE 1 -#define PIXELOP_ADD 2 -#define PIXELOP_MULTIPLY 3 - -char *pixelop_name[] = -{ - "Unknown", - "Overwrite", - "Add", - "Multiply" -}; - -const char* -pixelOpName(int op) -{ - if ( op < 0 || op > 3 ) - { - return "Invalid"; - } - return pixelop_name[op]; -} - -const char* -pixelHEX(PIXEL* p) -{ - static char buf[256]; - size_t ps = chip_pixel_value_size(p->type); - int i,j; - static const char* hex = "0123456789ABCDEF"; - - for (i=0, j=0; ival[i]; - int upper = (val & 0xF0) >> 4; - int lower = val & 0x0F; - - buf[j++] = hex[ upper ]; - buf[j++] = hex[ lower ]; - } - buf[j]=0; - - return buf; -} - -UINT16 -pixel_readUINT16(PIXEL *p) -{ - UINT16 i=0; - memcpy(&i, &(p->val), 2); - //i = p->val[0] | (p->val[1] << 8); - return i; -} - -void -pixel_writeUINT16(PIXEL *p, UINT16 i) -{ - //memcpy(&(p->val), &i, 2); - p->val[0] = i&0xFF; - p->val[1] = i>>8; - p->val[2] = 0; - p->val[3] = 0; -} - -/* - * Write text representation of a PIXEL value into provided - * buffer. - */ -void -pixel_writeval(PIXEL *p, char *buf, size_t maxlen) -{ - FLOAT32 f32=0.0; - UINT16 i16=0; - - switch (p->type) - { - case 1: /* float32 */ - memcpy(&f32, p->val, 4); - sprintf(buf, "%g", f32); - break; - case 5: /* int24 (rgb) */ - buf[0] = '#'; - deparse_hex(p->val[0], &buf[1]); - deparse_hex(p->val[1], &buf[3]); - deparse_hex(p->val[2], &buf[5]); - buf[7]='\0'; - break; - case 6: /* int16 */ - i16=pixel_readUINT16(p); - snprintf(buf, maxlen, "%u", i16); - break; - default: - lwerror("Unsupported PIXEL value %d", p->type); - } -} - -PIXEL -pixel_readval(char *buf) -{ - FLOAT32 f32=0.0; - long int i16=0; - RGB rgb; - char *ptr; - PIXEL p; - - /* RGB */ - if ( buf[0] == '#' ) - { - if ( strlen(buf) < 7 ) lwerror("RGB value too short"); - p.type = 5; /* rgb */ - ptr=buf+1; - rgb.red = parse_hex(ptr); - ptr+=2; - rgb.green = parse_hex(ptr); - ptr+=2; - rgb.blue = parse_hex(ptr); - memcpy(p.val, &rgb, 3); - - return p; - } - - /* float32 */ - if ( strchr(buf, '.') ) - { - f32 = strtod(buf, &ptr); - if ( ptr != buf+strlen(buf) ) - lwerror("Malformed float value"); - p.type = 1; /* float32 */ - memcpy(p.val, &f32, 4); - - return p; - } - - /* int16 */ - i16 = strtol(buf, &ptr, 0); - if ( ptr != buf+strlen(buf) ) lwerror("Malformed integer value"); - if ( i16 > 65535 ) lwerror("Integer too high for an int16"); - p.type = 6; /* int16 */ - memcpy(p.val, &i16, 2); - p.val[2]=0; - p.val[3]=0; - return p; -} - -void -pixel_add_float32(PIXEL *where, PIXEL *what) -{ - FLOAT32 f1=0.0, f2=0.0; - memcpy(&f1, where->val, 4); - memcpy(&f2, what->val, 4); - f1 += f2; - memcpy(where->val, &f1, 4); -} - -void -pixel_add_int24(PIXEL *where, PIXEL *what) -{ - unsigned int red, green, blue; - RGB rgb1, rgb2; - - memcpy(&rgb1, where->val, 3); - memcpy(&rgb2, what->val, 3); - red = rgb1.red + rgb2.red; - green = rgb1.green + rgb2.green; - blue = rgb1.blue + rgb2.blue; - if ( red > 255 ) - { - lwnotice("Red channel saturated by add operation"); - red = 255; - } - if ( green > 255 ) - { - lwnotice("Green channel saturated by add operation"); - green = 255; - } - if ( blue > 255 ) - { - lwnotice("Blue channel saturated by add operation"); - blue = 255; - } - rgb1.red = red; - rgb1.green = green; - rgb1.blue = blue; - memcpy(where->val, &rgb1, 3); -} - -void -pixel_add_int16(PIXEL *where, PIXEL *what) -{ - UINT16 i1, i2; - unsigned long int tmp; - - i1 = pixel_readUINT16(where); - i2 = pixel_readUINT16(what); - tmp = (unsigned long)i1 + i2; - if ( tmp > 65535 ) - { - lwnotice("UInt16 Pixel saturated by add operation (%u+%u=%u)", - i1, i2, tmp); - tmp = 65535; - } - i1 = tmp; - pixel_writeUINT16(where, i1); -} - -void -pixel_add(PIXEL *where, PIXEL *what) -{ - if ( where->type != what->type ) - lwerror("Can't add pixels of different types"); - - switch (where->type) - { - case 1: /*float32*/ - pixel_add_float32(where, what); - break; - - case 5: /*int24*/ - pixel_add_int24(where, what); - break; - - case 6: /*int16*/ - pixel_add_int16(where, what); - break; - - default: - lwerror("pixel_add: unkown pixel type %d", - where->type); - } - -} - -/* - * Return size of pixel values in bytes - */ -size_t -chip_pixel_value_size(int datatype) -{ - switch (datatype) - { - case 1: - case 101: - return 4; - case 5: - case 105: - return 3; - case 6: - case 7: - case 106: - case 107: - return 2; - case 8: - case 108: - return 1; - default: - lwerror("Unknown CHIP datatype: %d", datatype); - return 0; - } -} - -/* - * Returns offset of pixel at X,Y - */ -#define CHIP_XY_OFF(c, x, y) ((x)+((y)*(c)->width)) -size_t -chip_xy_off(CHIP *c, size_t x, size_t y) -{ -#ifdef CHIP_BOUNDS_CHECKS - if ( x < 0 || x >= c->width || y < 0 || y >= c->height ) - { - lwerror("Coordinates ouf of range"); - return 0; - } -#endif - return x+(y*c->width); -} - -/* - * Set pixel value. - * - * CHIP is assumed to be: - * - uncompressed - * - in machine's byte order - */ -void -chip_setPixel(CHIP *c, int x, int y, PIXEL *p) -{ - void *where; - size_t ps; - size_t off; - -#if DEBUG_CHIP - lwnotice("chip_setPixel([CHIP %p], %d, %d) called", c, x, y); -#endif - if ( c->datatype != p->type ) lwerror("Pixel datatype mismatch"); - - ps = chip_pixel_value_size(c->datatype); - off = chip_xy_off(c, x, y)*ps; - if ( off > c->size + sizeof(CHIP) ) - { - lwerror("Pixel offset out of CHIP size bounds"); - } - - where = ((char*)&(c->data))+off; - -#if DEBUG_CHIP - lwnotice("Writing %d bytes (%s) at offset %d (%p)", - ps, pixelHEX(p), off, where); -#endif - - memcpy(where, &(p->val), ps); -} - -/* - * Get pixel value. - * - * CHIP is assumed to be: - * - uncompressed - * - in machine's byte order - */ -PIXEL -chip_getPixel(CHIP *c, int x, int y) -{ - PIXEL p; - size_t ps = chip_pixel_value_size(c->datatype); - void *where = ((char*)&(c->data))+chip_xy_off(c, x, y)*ps; - p.type = c->datatype; - memset(p.val, '\0', 4); - memcpy(p.val, where, ps); - - return p; -} - -/******************************************************************** - * - * Drawing primitives - * - ********************************************************************/ - -/* - * Coordinates are in CHIP offset, so callers must - * appropriately translate. - */ -void -chip_draw_pixel(CHIP *chip, int x, int y, PIXEL *pixel, int op) -{ - -#if DEBUG_CHIP - lwnotice("chip_draw_pixel([CHIP %p], %d, %d, [PIXEL %p], %s) called", - (void*)chip, x, y, (void*)pixel, pixelOpName(op)); -#endif - - if ( x < 0 || x >= chip->width || y < 0 || y >= chip->height ) - { - /* should this be a warning ? */ - lwnotice("chip_draw_pixel called with out-of-range coordinates (%d,%d)", x, y); - return; - } - - /* - * Translate x and y values, which are in map units, to - * CHIP units - */ - - switch ( op ) - { - PIXEL p; - - case PIXELOP_OVERWRITE: - chip_setPixel(chip, x, y, pixel); - break; - - case PIXELOP_ADD: - p = chip_getPixel(chip, x, y); - pixel_add(&p, pixel); - chip_setPixel(chip, x, y, &p); - break; - - default: - lwerror("Unsupported PIXELOP: %d", op); - } - -} - -/* - * Bresenham Line Algorithm - * http://www.edepot.com/linebresenham.html - */ -void -chip_draw_segment(CHIP *chip, - int x1, int y1, int x2, int y2, - PIXEL *pixel, int op) -{ - int x, y; - int dx, dy; - int incx, incy; - int balance; - - - if (x2 >= x1) - { - dx = x2 - x1; - incx = 1; - } - else - { - dx = x1 - x2; - incx = -1; - } - - if (y2 >= y1) - { - dy = y2 - y1; - incy = 1; - } - else - { - dy = y1 - y2; - incy = -1; - } - - x = x1; - y = y1; - - if (dx >= dy) - { - dy <<= 1; - balance = dy - dx; - dx <<= 1; - - while (x != x2) - { - chip_draw_pixel(chip, x, y, pixel, op); - if (balance >= 0) - { - y += incy; - balance -= dx; - } - balance += dy; - x += incx; - } - chip_draw_pixel(chip, x, y, pixel, op); - } - else - { - dx <<= 1; - balance = dx - dy; - dy <<= 1; - - while (y != y2) - { - chip_draw_pixel(chip, x, y, pixel, op); - if (balance >= 0) - { - x += incx; - balance -= dy; - } - balance += dx; - y += incy; - } - chip_draw_pixel(chip, x, y, pixel, op); - } -} - -void -chip_fill(CHIP *chip, PIXEL *pixel, int op) -{ - int x, y; - -#if DEBUG_CHIP - lwnotice("chip_fill called"); -#endif - - for (x=0; xwidth; x++) - { - for (y=0; yheight; y++) - { - chip_draw_pixel(chip, x, y, pixel, op); - } - } -} - -/******************************************************************** - * - * CHIP constructors - * - ********************************************************************/ - -CHIP * -pgchip_construct(BOX3D *bvol, int SRID, int width, int height, - int datatype, PIXEL *initvalue) -{ - size_t pixsize = chip_pixel_value_size(datatype); - size_t datasize = pixsize*width*height; - size_t size = sizeof(CHIP)-sizeof(void*)+datasize; - CHIP *chip = lwalloc(size); - -#if DEBUG_CHIP - lwnotice(" sizeof(CHIP):%d, pixelsize:%d, datasize:%d, total size:%d", sizeof(CHIP), pixsize, datasize, size); -#endif - - chip->size=size; - chip->endian_hint=1; - memcpy(&(chip->bvol), bvol, sizeof(BOX3D)); - chip->SRID=SRID; - memset(chip->future, '\0', 4); - chip->factor=1.0; - chip->datatype=datatype; - chip->height=height; - chip->width=width; - chip->compression=0; /* no compression */ - if ( ! initvalue ) - { - memset(&(chip->data), '\0', datasize); - } - else - { - chip_fill(chip, initvalue, PIXELOP_OVERWRITE); - } - return chip; -} - - -/******************************************************************** - * - * Drawing functions - * - ********************************************************************/ - - -/* - * Transform a POINT from geo coordinates to CHIP offsets. - * Can be optimized by caching CHIP info somewhere and using - * multiplications rather then divisions. - */ -static void -transform_point(CHIP* chip, POINT2D* p) -{ - /* geo size of full grid/chip */ - double geowidth = chip->bvol.xmax - chip->bvol.xmin; - double geoheight = chip->bvol.ymax - chip->bvol.ymin; - - /* geo size of a cell/pixel */ - double xscale = geowidth / chip->width; - double yscale = geoheight / chip->height; - - double xoff = ( chip->bvol.xmin + xscale ); - double yoff = ( chip->bvol.ymin + yscale ); - -#if 0 - double ox = p->x; - double oy = p->y; -#endif - - p->x = rint ( ( p->x - xoff ) / xscale ); - p->y = rint ( ( p->y - yoff ) / yscale ); - -#if 0 - lwnotice("Old x: %g, new x: %g", ox, p->x); -#endif - -} - -void -chip_draw_ptarray(CHIP *chip, POINTARRAY *pa, PIXEL *pixel, int op) -{ - POINT2D A, B; - int i; - int x1, x2, y1, y2; - - for (i=1; inpoints; i++) - { - getPoint2d_p(pa, i-1, &A); - getPoint2d_p(pa, i, &B); - - transform_point(chip, &A); - transform_point(chip, &B); - - x1 = A.x; - y1 = A.y; - x2 = B.x; - y2 = B.y; - - chip_draw_segment(chip, x1, y1, x2, y2, pixel, op); - } -} - -void -chip_draw_lwpoint(CHIP *chip, LWPOINT *lwpoint, PIXEL* pixel, int op) -{ - POINTARRAY *pa; - POINT2D point; - - pa = lwpoint->point; - getPoint2d_p(pa, 0, &point); - - /* translate to CHIP plane */ - transform_point(chip, &point); - - chip_draw_pixel(chip, point.x, point.y, pixel, op); -} - -void -chip_draw_lwline(CHIP *chip, LWLINE *lwline, PIXEL* pixel, int op) -{ - POINTARRAY *pa; - - pa = lwline->points; - chip_draw_ptarray(chip, pa, pixel, op); - return; -} - -void -chip_draw_lwgeom(CHIP *chip, LWGEOM *lwgeom, PIXEL *pixel, int op) -{ - int i; - LWCOLLECTION *coll; - - /* Check wheter we should completely skip this geometry */ - if ( lwgeom->bbox ) - { - if ( chip->bvol.xmax < lwgeom->bbox->xmin ) return; - if ( chip->bvol.xmin > lwgeom->bbox->xmax ) return; - if ( chip->bvol.ymax < lwgeom->bbox->ymin ) return; - if ( chip->bvol.ymin > lwgeom->bbox->ymax ) return; - } - - switch (TYPE_GETTYPE(lwgeom->type) ) - { - case POINTTYPE: - chip_draw_lwpoint(chip, (LWPOINT*)lwgeom, pixel, op); - return; - case LINETYPE: - chip_draw_lwline(chip, (LWLINE*)lwgeom, pixel, op); - return; - case POLYGONTYPE: - lwerror("%s geometry unsupported by draw operation", - lwgeom_typename(TYPE_GETTYPE(lwgeom->type))); - case MULTIPOINTTYPE: - case MULTILINETYPE: - case MULTIPOLYGONTYPE: - case COLLECTIONTYPE: - coll = (LWCOLLECTION *)lwgeom; - for (i=0; ingeoms; i++) - { - chip_draw_lwgeom(chip, coll->geoms[i], - pixel, op); - } - return; - default: - lwerror("Unknown geometry type: %d", lwgeom->type); - } -} - -/******************************************************************** - * - * PGsql interfaces - * - ********************************************************************/ - -typedef struct CHIPDUMPSTATE_T -{ - CHIP *chip; - int x; - int y; - char *values[3]; - char fmt[8]; -} -CHIPDUMPSTATE; - -/* - * Convert a TEXT to a C-String. - * Remember to lwfree the returned object. - */ -char * -text_to_cstring(text *t) -{ - char *s; - size_t len; - - len = VARSIZE(t)-VARHDRSZ; - s = lwalloc(len+1); - memcpy(s, VARDATA(t), len); - s[len] = '\0'; - - return s; -} - -PG_FUNCTION_INFO_V1(CHIP_dump); -Datum CHIP_dump(PG_FUNCTION_ARGS) -{ - CHIP *chip; - FuncCallContext *funcctx; - MemoryContext oldcontext, newcontext; - CHIPDUMPSTATE *state; - TupleDesc tupdesc; - AttInMetadata *attinmeta; - HeapTuple tuple; - TupleTableSlot *slot; - Datum result; - - if (SRF_IS_FIRSTCALL()) - { - funcctx = SRF_FIRSTCALL_INIT(); - newcontext = funcctx->multi_call_memory_ctx; - - oldcontext = MemoryContextSwitchTo(newcontext); - - chip = (CHIP *)PG_DETOAST_DATUM_COPY(PG_GETARG_DATUM(0)); - - /* Create function state */ - state = lwalloc(sizeof(CHIPDUMPSTATE)); - state->chip = chip; - state->x=0; - state->y=0; - state->values[0] = lwalloc(256); - state->values[1] = lwalloc(256); - state->values[2] = lwalloc(256); - - funcctx->user_fctx = state; - - /* - * Build a tuple description for an - * geometry_dump tuple - */ - tupdesc = RelationNameGetTupleDesc("chip_dump"); - - /* allocate a slot for a tuple with this tupdesc */ - slot = TupleDescGetSlot(tupdesc); - - /* allocate a slot for a tuple with this tupdesc */ - slot = TupleDescGetSlot(tupdesc); - - /* assign slot to function context */ - funcctx->slot = slot; - - /* - * generate attribute metadata needed later to produce - * tuples from raw C strings - */ - attinmeta = TupleDescGetAttInMetadata(tupdesc); - funcctx->attinmeta = attinmeta; - - MemoryContextSwitchTo(oldcontext); - } - - /* stuff done on every call of the function */ - funcctx = SRF_PERCALL_SETUP(); - newcontext = funcctx->multi_call_memory_ctx; - - /* get state */ - state = funcctx->user_fctx; - - /* Handled simple geometries */ - while ( state->y < state->chip->height && - state->x < state->chip->width ) - { - char buf[256]; - PIXEL p; - - if ( ! state->chip ) lwerror("state->chip corrupted"); - p = chip_getPixel(state->chip, state->x, state->y); - pixel_writeval(&p, buf, 255); - - sprintf(state->values[0], "%d", state->x); - sprintf(state->values[1], "%d", state->y); - sprintf(state->values[2], "%s", buf); - - tuple = BuildTupleFromCStrings(funcctx->attinmeta, - state->values); - result = TupleGetDatum(funcctx->slot, tuple); - - if ( state->x < state->chip->width-1 ) - { - state->x++; - } - else - { - state->x=0; - state->y++; - } - - SRF_RETURN_NEXT(funcctx, result); - - } - - SRF_RETURN_DONE(funcctx); -} - -PG_FUNCTION_INFO_V1(CHIP_construct); -Datum CHIP_construct(PG_FUNCTION_ARGS) -{ - CHIP *chip; - BOX3D *box = (BOX3D *)PG_GETARG_POINTER(0); - int SRID = PG_GETARG_INT32(1); - int width = PG_GETARG_INT32(2); - int height = PG_GETARG_INT32(3); - text *pixel_text = PG_GETARG_TEXT_P(4); - char *pixel = text_to_cstring(pixel_text); - PIXEL pix = pixel_readval(pixel); - -#if DEBUG_CHIP - lwnotice("CHIP_construct called"); -#endif - - if ( width <= 0 || height <= 0 ) - { - lwerror("Invalid values for width or height"); - PG_RETURN_NULL(); - } - - chip = pgchip_construct(box, SRID, width, height, pix.type, &pix); - -#if DEBUG_CHIP - lwnotice("Created %dx%d chip type", chip->width, chip->height); -#endif - - PG_RETURN_POINTER(chip); -} - -PG_FUNCTION_INFO_V1(CHIP_getpixel); -Datum CHIP_getpixel(PG_FUNCTION_ARGS) -{ - CHIP *chip = (CHIP *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - int x = PG_GETARG_INT32(1); - int y = PG_GETARG_INT32(2); - char buf[256]; - size_t len; - text *ret; - PIXEL p; - - if ( x < 0 || x >= chip->width ) - { - lwerror("X out of range %d..%d", - 0, chip->width-1); - PG_RETURN_NULL(); - } - if ( y < 0 || y >= chip->height ) - { - lwerror("Y out of range %d..%d", - 0, chip->height-1); - PG_RETURN_NULL(); - } - - p = chip_getPixel(chip, x, y); - pixel_writeval(&p, buf, 255); - len = strlen(buf); - ret = lwalloc(len+VARHDRSZ); - SET_VARSIZE(ret, len+VARHDRSZ); - memcpy(VARDATA(ret), buf, len); - - PG_RETURN_POINTER(ret); -} - -PG_FUNCTION_INFO_V1(CHIP_setpixel); -Datum CHIP_setpixel(PG_FUNCTION_ARGS) -{ - CHIP *chip = (CHIP *) PG_DETOAST_DATUM_COPY(PG_GETARG_DATUM(0)); - int x = PG_GETARG_INT32(1); - int y = PG_GETARG_INT32(2); - text *init_val_text = PG_GETARG_TEXT_P(3); - char *init_val; - PIXEL pixel; - - /* Parse pixel */ - init_val = text_to_cstring(init_val_text); - pixel = pixel_readval(init_val); - - if ( chip->datatype != pixel.type ) - { - lwerror("Pixel datatype %d mismatches chip datatype %d", - pixel.type, chip->datatype); - } - - chip_setPixel(chip, x, y, &pixel); - - PG_RETURN_POINTER(chip); - -} - -PG_FUNCTION_INFO_V1(CHIP_draw); -Datum CHIP_draw(PG_FUNCTION_ARGS) -{ - CHIP *chip = (CHIP *) PG_DETOAST_DATUM_COPY(PG_GETARG_DATUM(0)); - PG_LWGEOM *geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - LWGEOM *lwgeom = pglwgeom_deserialize(geom); - text *pixel_text = PG_GETARG_TEXT_P(2); - char *pixel_str; - text *pixelop_text; - char *pixelop_str; - int pixelop = PIXELOP_OVERWRITE; - PIXEL pixel; - - /* Check SRID match */ - if ( chip->SRID != lwgeom->SRID ) - { - lwerror("Operation on mixed SRID objects"); - } - - if ( PG_NARGS() > 3 ) - { - pixelop_text = PG_GETARG_TEXT_P(3); - pixelop_str = text_to_cstring(pixelop_text); - if ( pixelop_str[0] == 'o' ) - { - pixelop = PIXELOP_OVERWRITE; - } - else if ( pixelop_str[0] == 'a' ) - { - pixelop = PIXELOP_ADD; - } - else - { - lwerror("Unsupported pixel operation %s", pixelop_str); - } - } - - /* Parse pixel */ - pixel_str = text_to_cstring(pixel_text); - pixel = pixel_readval(pixel_str); - lwfree(pixel_str); - - if ( pixel.type != chip->datatype ) - { - lwerror("Pixel/Chip datatype mismatch"); - } - - /* Perform drawing */ - chip_draw_lwgeom(chip, lwgeom, &pixel, pixelop); - - PG_RETURN_POINTER(chip); -} - -PG_FUNCTION_INFO_V1(CHIP_fill); -Datum CHIP_fill(PG_FUNCTION_ARGS) -{ - CHIP *chip = (CHIP *) PG_DETOAST_DATUM_COPY(PG_GETARG_DATUM(0)); - text *pixel_text = PG_GETARG_TEXT_P(1); - char *pixel_str; - text *pixelop_text; - char *pixelop_str; - int pixelop = PIXELOP_OVERWRITE; - PIXEL pixel; - - if ( PG_NARGS() > 2 ) - { - pixelop_text = PG_GETARG_TEXT_P(2); - pixelop_str = text_to_cstring(pixelop_text); - if ( pixelop_str[0] == 'o' ) - { - pixelop = PIXELOP_OVERWRITE; - } - else if ( pixelop_str[0] == 'a' ) - { - pixelop = PIXELOP_ADD; - } - else - { - lwerror("Unsupported pixel operation %s", pixelop_str); - } - } - - /* Parse pixel */ - pixel_str = text_to_cstring(pixel_text); - pixel = pixel_readval(pixel_str); - lwfree(pixel_str); - - if ( pixel.type != chip->datatype ) - { - lwerror("Pixel/Chip datatype mismatch"); - } - - /* Perform fill */ - chip_fill(chip, &pixel, pixelop); - - PG_RETURN_POINTER(chip); -} diff -Nru postgis-1.5.3/postgis/lwgeom_debug.c postgis-2.0.1/postgis/lwgeom_debug.c --- postgis-1.5.3/postgis/lwgeom_debug.c 2010-02-01 17:35:55.000000000 +0000 +++ postgis-2.0.1/postgis/lwgeom_debug.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,142 +0,0 @@ - -#include "lwgeom_pg.h" -#include "liblwgeom.h" - -#include -#include - - -char *lwcollection_summary(LWCOLLECTION *collection, int offset); -char *lwpoly_summary(LWPOLY *poly, int offset); -char *lwline_summary(LWLINE *line, int offset); -char *lwpoint_summary(LWPOINT *point, int offset); - -char * -lwgeom_summary(LWGEOM *lwgeom, int offset) -{ - char *result; - - switch (TYPE_GETTYPE(lwgeom->type)) - { - case POINTTYPE: - return lwpoint_summary((LWPOINT *)lwgeom, offset); - - case LINETYPE: - return lwline_summary((LWLINE *)lwgeom, offset); - - case POLYGONTYPE: - return lwpoly_summary((LWPOLY *)lwgeom, offset); - - case MULTIPOINTTYPE: - case MULTILINETYPE: - case MULTIPOLYGONTYPE: - case COLLECTIONTYPE: - return lwcollection_summary((LWCOLLECTION *)lwgeom, offset); - default: - result = palloc(256); - sprintf(result, "Object is of unknown type: %d", - lwgeom->type); - return result; - } - - return NULL; -} - -/* - * Returns an alloced string containing summary for the LWGEOM object - */ -char * -lwpoint_summary(LWPOINT *point, int offset) -{ - char *result; - char *pad=""; - - result = lwalloc(128+offset); - - sprintf(result, "%*.s%s[%s]\n", - offset, pad, lwgeom_typename(TYPE_GETTYPE(point->type)), - lwgeom_typeflags(point->type)); - return result; -} - -char * -lwline_summary(LWLINE *line, int offset) -{ - char *result; - char *pad=""; - - result = lwalloc(128+offset); - - sprintf(result, "%*.s%s[%s] with %d points\n", - offset, pad, lwgeom_typename(TYPE_GETTYPE(line->type)), - lwgeom_typeflags(line->type), - line->points->npoints); - return result; -} - - -char * -lwcollection_summary(LWCOLLECTION *col, int offset) -{ - size_t size = 128; - char *result; - char *tmp; - int i; - char *pad=""; - - LWDEBUG(2, "lwcollection_summary called"); - - result = (char *)lwalloc(size); - - sprintf(result, "%*.s%s[%s] with %d elements\n", - offset, pad, lwgeom_typename(TYPE_GETTYPE(col->type)), - lwgeom_typeflags(col->type), - col->ngeoms); - - for (i=0; ingeoms; i++) - { - tmp = lwgeom_summary(col->geoms[i], offset+2); - size += strlen(tmp)+1; - result = lwrealloc(result, size); - - LWDEBUGF(4, "Reallocated %d bytes for result", size); - - strcat(result, tmp); - lwfree(tmp); - } - - LWDEBUG(3, "lwcollection_summary returning"); - - return result; -} - -char * -lwpoly_summary(LWPOLY *poly, int offset) -{ - char tmp[256]; - size_t size = 64*(poly->nrings+1)+128; - char *result; - int i; - char *pad=""; - - LWDEBUG(2, "lwpoly_summary called"); - - result = lwalloc(size); - - sprintf(result, "%*.s%s[%s] with %i rings\n", - offset, pad, lwgeom_typename(TYPE_GETTYPE(poly->type)), - lwgeom_typeflags(poly->type), - poly->nrings); - - for (i=0; inrings; i++) - { - sprintf(tmp,"%s ring %i has %i points\n", - pad, i, poly->rings[i]->npoints); - strcat(result,tmp); - } - - LWDEBUG(3, "lwpoly_summary returning"); - - return result; -} - diff -Nru postgis-1.5.3/postgis/lwgeom_dump.c postgis-2.0.1/postgis/lwgeom_dump.c --- postgis-1.5.3/postgis/lwgeom_dump.c 2009-10-09 19:23:05.000000000 +0000 +++ postgis-2.0.1/postgis/lwgeom_dump.c 2012-02-27 22:08:12.000000000 +0000 @@ -1,5 +1,5 @@ /********************************************************************** - * $Id: lwgeom_dump.c 4635 2009-10-09 19:23:05Z pramsey $ + * $Id: lwgeom_dump.c 9324 2012-02-27 22:08:12Z pramsey $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net @@ -9,6 +9,14 @@ * the terms of the GNU General Public Licence. See the COPYING file. * **********************************************************************/ + +#include +#include +#include +#include +#include +#include + #include "postgres.h" #include "fmgr.h" #include "utils/elog.h" @@ -16,18 +24,9 @@ #include "utils/geo_decls.h" #include "funcapi.h" +#include "../postgis_config.h" #include "liblwgeom.h" #include "lwgeom_pg.h" -#include "profile.h" - -#include "../postgis_config.h" - -#include -#include -#include -#include -#include -#include Datum LWGEOM_dump(PG_FUNCTION_ARGS); @@ -36,7 +35,7 @@ typedef struct GEOMDUMPNODE_T { int idx; - LWCOLLECTION *geom; + LWGEOM *geom; } GEOMDUMPNODE; @@ -46,7 +45,6 @@ int stacklen; GEOMDUMPNODE *stack[MAXDEPTH]; LWGEOM *root; - LWGEOM *geom; } GEOMDUMPSTATE; @@ -58,7 +56,7 @@ PG_FUNCTION_INFO_V1(LWGEOM_dump); Datum LWGEOM_dump(PG_FUNCTION_ARGS) { - PG_LWGEOM *pglwgeom; + GSERIALIZED *pglwgeom; LWCOLLECTION *lwcoll; LWGEOM *lwgeom; FuncCallContext *funcctx; @@ -71,7 +69,7 @@ Datum result; char address[256]; char *ptr; - unsigned int i; + uint32 i; char *values[2]; if (SRF_IS_FIRSTCALL()) @@ -81,22 +79,22 @@ oldcontext = MemoryContextSwitchTo(newcontext); - pglwgeom = (PG_LWGEOM *)PG_DETOAST_DATUM_COPY(PG_GETARG_DATUM(0)); - lwgeom = lwgeom_deserialize(SERIALIZED_FORM(pglwgeom)); + pglwgeom = (GSERIALIZED *)PG_DETOAST_DATUM_COPY(PG_GETARG_DATUM(0)); + lwgeom = lwgeom_from_gserialized(pglwgeom); /* Create function state */ state = lwalloc(sizeof(GEOMDUMPSTATE)); state->root = lwgeom; state->stacklen=0; - if ( lwgeom_is_collection(TYPE_GETTYPE(lwgeom->type)) ) + if ( lwgeom_is_collection(lwgeom) ) { /* * Push a GEOMDUMPNODE on the state stack */ node = lwalloc(sizeof(GEOMDUMPNODE)); node->idx=0; - node->geom = (LWCOLLECTION *)lwgeom; + node->geom = lwgeom; PUSH(state, node); } @@ -127,10 +125,12 @@ /* Handled simple geometries */ if ( ! state->root ) SRF_RETURN_DONE(funcctx); - if ( ! lwgeom_is_collection(TYPE_GETTYPE(state->root->type)) ) + /* Return nothing for empties */ + if ( lwgeom_is_empty(state->root) ) SRF_RETURN_DONE(funcctx); + if ( ! lwgeom_is_collection(state->root) ) { values[0] = "{}"; - values[1] = lwgeom_to_hexwkb(state->root, PARSER_CHECK_NONE, -1); + values[1] = lwgeom_to_hexwkb(state->root, WKB_EXTENDED, 0); tuple = BuildTupleFromCStrings(funcctx->attinmeta, values); result = HeapTupleGetDatum(tuple); @@ -141,12 +141,12 @@ while (1) { node = LAST(state); - lwcoll = node->geom; + lwcoll = (LWCOLLECTION*)node->geom; if ( node->idx < lwcoll->ngeoms ) { lwgeom = lwcoll->geoms[node->idx]; - if ( ! lwgeom_is_collection(TYPE_GETTYPE(lwgeom->type)) ) + if ( ! lwgeom_is_collection(lwgeom) ) { /* write address of current geom */ ptr=address; @@ -172,7 +172,7 @@ node = lwalloc(sizeof(GEOMDUMPNODE)); node->idx=0; - node->geom = (LWCOLLECTION *)lwgeom; + node->geom = lwgeom; PUSH(state, node); MemoryContextSwitchTo(oldcontext); @@ -184,10 +184,10 @@ LAST(state)->idx++; } - lwgeom->SRID = state->root->SRID; + lwgeom->srid = state->root->srid; values[0] = address; - values[1] = lwgeom_to_hexwkb(lwgeom, PARSER_CHECK_NONE, -1); + values[1] = lwgeom_to_hexwkb(lwgeom, WKB_EXTENDED, 0); tuple = BuildTupleFromCStrings(funcctx->attinmeta, values); result = TupleGetDatum(funcctx->slot, tuple); node->idx++; @@ -203,7 +203,7 @@ PG_FUNCTION_INFO_V1(LWGEOM_dump_rings); Datum LWGEOM_dump_rings(PG_FUNCTION_ARGS) { - PG_LWGEOM *pglwgeom; + GSERIALIZED *pglwgeom; LWGEOM *lwgeom; FuncCallContext *funcctx; struct POLYDUMPSTATE *state; @@ -222,13 +222,13 @@ oldcontext = MemoryContextSwitchTo(newcontext); - pglwgeom = (PG_LWGEOM *)PG_DETOAST_DATUM_COPY(PG_GETARG_DATUM(0)); - if ( TYPE_GETTYPE(pglwgeom->type) != POLYGONTYPE ) + pglwgeom = (GSERIALIZED *)PG_DETOAST_DATUM_COPY(PG_GETARG_DATUM(0)); + if ( gserialized_get_type(pglwgeom) != POLYGONTYPE ) { lwerror("Input is not a polygon"); } - lwgeom = lwgeom_deserialize(SERIALIZED_FORM(pglwgeom)); + lwgeom = lwgeom_from_gserialized(pglwgeom); /* Create function state */ state = lwalloc(sizeof(struct POLYDUMPSTATE)); @@ -273,11 +273,11 @@ oldcontext = MemoryContextSwitchTo(newcontext); /* We need a copy of input ring here */ - ring = ptarray_clone(poly->rings[state->ringnum]); + ring = ptarray_clone_deep(poly->rings[state->ringnum]); /* Construct another polygon with shell only */ ringgeom = (LWGEOM*)lwpoly_construct( - poly->SRID, + poly->srid, NULL, /* TODO: could use input bounding box here */ 1, /* one ring */ &ring); @@ -286,7 +286,7 @@ sprintf(address, "{%d}", state->ringnum); values[0] = address; - values[1] = lwgeom_to_hexwkb(ringgeom, PARSER_CHECK_NONE, -1); + values[1] = lwgeom_to_hexwkb(ringgeom, WKB_EXTENDED, 0); MemoryContextSwitchTo(oldcontext); diff -Nru postgis-1.5.3/postgis/lwgeom_estimate.c postgis-2.0.1/postgis/lwgeom_estimate.c --- postgis-1.5.3/postgis/lwgeom_estimate.c 2010-02-01 17:35:55.000000000 +0000 +++ postgis-2.0.1/postgis/lwgeom_estimate.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,1633 +0,0 @@ -/********************************************************************** - * $Id: lwgeom_estimate.c 5181 2010-02-01 17:35:55Z pramsey $ - * - * PostGIS - Spatial Types for PostgreSQL - * http://postgis.refractions.net - * Copyright 2001-2006 Refractions Research Inc. - * - * This is free software; you can redistribute and/or modify it under - * the terms of the GNU General Public Licence. See the COPYING file. - * - **********************************************************************/ - -#include "postgres.h" -#include "executor/spi.h" -#include "fmgr.h" -#include "commands/vacuum.h" -#include "nodes/relation.h" -#include "parser/parsetree.h" -#include "utils/array.h" -#include "utils/lsyscache.h" -#include "utils/syscache.h" - -#include "liblwgeom.h" -#include "lwgeom_pg.h" - -#include -#if HAVE_IEEEFP_H -#include -#endif -#include -#include -#include -#include -#include - -/** - * Assign a number to the postgis statistics kind - * - * tgl suggested: - * - * 1-100: reserved for assignment by the core Postgres project - * 100-199: reserved for assignment by PostGIS - * 200-9999: reserved for other globally-known stats kinds - * 10000-32767: reserved for private site-local use - * - */ -#define STATISTIC_KIND_GEOMETRY 100 - -/* - * Define this if you want to use standard deviation based - * histogram extent computation. If you do, you can also - * tweak the deviation factor used in computation with - * SDFACTOR. - */ -#define USE_STANDARD_DEVIATION 1 -#define SDFACTOR 3.25 - -typedef struct GEOM_STATS_T -{ - /* cols * rows = total boxes in grid */ - float4 cols; - float4 rows; - - /* average bounding box area of not-null features */ - float4 avgFeatureArea; - - /* - * average number of histogram cells - * covered by the sample not-null features - */ - float4 avgFeatureCells; - - /* BOX of area */ - float4 xmin,ymin, xmax, ymax; - - /* - * variable length # of floats for histogram - */ - float4 value[1]; -} -GEOM_STATS; - -static float8 estimate_selectivity(BOX2DFLOAT4 *box, GEOM_STATS *geomstats); - - -#define SHOW_DIGS_DOUBLE 15 -#define MAX_DIGS_DOUBLE (SHOW_DIGS_DOUBLE + 6 + 1 + 3 +1) - -/** - * Default geometry selectivity factor - */ -#define DEFAULT_GEOMETRY_SEL 0.000005 - -/** - * Default geometry join selectivity factor - */ -#define DEFAULT_GEOMETRY_JOINSEL 0.000005 - -/** - * Define this to actually DO join selectivity - * (as contrary to just return the default JOINSEL value) - * Note that this is only possible when compiling postgis - * against pgsql >= 800 - */ -#define REALLY_DO_JOINSEL 1 - -Datum LWGEOM_gist_sel(PG_FUNCTION_ARGS); -Datum LWGEOM_gist_joinsel(PG_FUNCTION_ARGS); -Datum LWGEOM_estimated_extent(PG_FUNCTION_ARGS); -Datum LWGEOM_analyze(PG_FUNCTION_ARGS); - - -#if ! REALLY_DO_JOINSEL -/** - * JOIN selectivity in the GiST && operator - * for all PG versions - */ -PG_FUNCTION_INFO_V1(LWGEOM_gist_joinsel); -Datum LWGEOM_gist_joinsel(PG_FUNCTION_ARGS) -{ - POSTGIS_DEBUGF(2, "LWGEOM_gist_joinsel called (returning %f)", - DEFAULT_GEOMETRY_JOINSEL); - - PG_RETURN_FLOAT8(DEFAULT_GEOMETRY_JOINSEL); -} - -#else /* REALLY_DO_JOINSEL */ - -int calculate_column_intersection(BOX2DFLOAT4 *search_box, GEOM_STATS *geomstats1, GEOM_STATS *geomstats2); - -int -calculate_column_intersection(BOX2DFLOAT4 *search_box, GEOM_STATS *geomstats1, GEOM_STATS *geomstats2) -{ - /** - * Calculate the intersection of two columns from their geomstats extents - return true - * if a valid intersection was found, false if there is no overlap - */ - - float8 i_xmin = LW_MAX(geomstats1->xmin, geomstats2->xmin); - float8 i_ymin = LW_MAX(geomstats1->ymin, geomstats2->ymin); - float8 i_xmax = LW_MIN(geomstats1->xmax, geomstats2->xmax); - float8 i_ymax = LW_MIN(geomstats1->ymax, geomstats2->ymax); - - /* If the rectangles don't intersect, return false */ - if (i_xmin > i_xmax || i_ymin > i_ymax) - return 0; - - /* Otherwise return the rectangle in search_box */ - search_box->xmin = i_xmin; - search_box->ymin = i_ymin; - search_box->xmax = i_xmax; - search_box->ymax = i_ymax; - - return -1; -} - -/** -* JOIN selectivity in the GiST && operator -* for all PG versions -*/ -PG_FUNCTION_INFO_V1(LWGEOM_gist_joinsel); -Datum LWGEOM_gist_joinsel(PG_FUNCTION_ARGS) -{ - PlannerInfo *root = (PlannerInfo *) PG_GETARG_POINTER(0); - - /* Oid operator = PG_GETARG_OID(1); */ - List *args = (List *) PG_GETARG_POINTER(2); - JoinType jointype = (JoinType) PG_GETARG_INT16(3); - - Node *arg1, *arg2; - Var *var1, *var2; - Oid relid1, relid2; - - HeapTuple stats1_tuple, stats2_tuple, class_tuple; - GEOM_STATS *geomstats1, *geomstats2; - /* - * These are to avoid casting the corresponding - * "type-punned" pointers, which would break - * "strict-aliasing rules". - */ - GEOM_STATS **gs1ptr=&geomstats1, **gs2ptr=&geomstats2; - int geomstats1_nvalues = 0, geomstats2_nvalues = 0; - float8 selectivity1 = 0.0, selectivity2 = 0.0; - float4 num1_tuples = 0.0, num2_tuples = 0.0; - float4 total_tuples = 0.0, rows_returned = 0.0; - BOX2DFLOAT4 search_box; - - - /** - * Join selectivity algorithm. To calculation the selectivity we - * calculate the intersection of the two column sample extents, - * sum the results, and then multiply by two since for each - * geometry in col 1 that intersects a geometry in col 2, the same - * will also be true. - */ - - - POSTGIS_DEBUGF(3, "LWGEOM_gist_joinsel called with jointype %d", jointype); - - /* - * We'll only respond to an inner join/unknown context join - */ - if (jointype != JOIN_INNER) - { - elog(NOTICE, "LWGEOM_gist_joinsel called with incorrect join type"); - PG_RETURN_FLOAT8(DEFAULT_GEOMETRY_JOINSEL); - } - - /* - * Determine the oids of the geometry columns we are working with - */ - arg1 = (Node *) linitial(args); - arg2 = (Node *) lsecond(args); - - if (!IsA(arg1, Var) || !IsA(arg2, Var)) - { - elog(DEBUG1, "LWGEOM_gist_joinsel called with arguments that are not column references"); - PG_RETURN_FLOAT8(DEFAULT_GEOMETRY_JOINSEL); - } - - var1 = (Var *)arg1; - var2 = (Var *)arg2; - - relid1 = getrelid(var1->varno, root->parse->rtable); - relid2 = getrelid(var2->varno, root->parse->rtable); - - POSTGIS_DEBUGF(3, "Working with relations oids: %d %d", relid1, relid2); - - /* Read the stats tuple from the first column */ - stats1_tuple = SearchSysCache(STATRELATT, ObjectIdGetDatum(relid1), Int16GetDatum(var1->varattno), 0, 0); - if ( ! stats1_tuple ) - { - POSTGIS_DEBUG(3, " No statistics, returning default geometry join selectivity"); - - PG_RETURN_FLOAT8(DEFAULT_GEOMETRY_JOINSEL); - } - - - - if ( ! get_attstatsslot(stats1_tuple, 0, 0, STATISTIC_KIND_GEOMETRY, InvalidOid, NULL, NULL, -#if POSTGIS_PGSQL_VERSION >= 85 - NULL, -#endif - (float4 **)gs1ptr, &geomstats1_nvalues) ) - { - POSTGIS_DEBUG(3, " STATISTIC_KIND_GEOMETRY stats not found - returning default geometry join selectivity"); - - ReleaseSysCache(stats1_tuple); - PG_RETURN_FLOAT8(DEFAULT_GEOMETRY_JOINSEL); - } - - - /* Read the stats tuple from the second column */ - stats2_tuple = SearchSysCache(STATRELATT, ObjectIdGetDatum(relid2), Int16GetDatum(var2->varattno), 0, 0); - if ( ! stats2_tuple ) - { - POSTGIS_DEBUG(3, " No statistics, returning default geometry join selectivity"); - - free_attstatsslot(0, NULL, 0, (float *)geomstats1, - geomstats1_nvalues); - ReleaseSysCache(stats1_tuple); - PG_RETURN_FLOAT8(DEFAULT_GEOMETRY_JOINSEL); - } - - - if ( ! get_attstatsslot(stats2_tuple, 0, 0, STATISTIC_KIND_GEOMETRY, InvalidOid, NULL, NULL, -#if POSTGIS_PGSQL_VERSION >= 85 - NULL, -#endif - (float4 **)gs2ptr, &geomstats2_nvalues) ) - { - POSTGIS_DEBUG(3, " STATISTIC_KIND_GEOMETRY stats not found - returning default geometry join selectivity"); - - free_attstatsslot(0, NULL, 0, (float *)geomstats1, - geomstats1_nvalues); - ReleaseSysCache(stats2_tuple); - ReleaseSysCache(stats1_tuple); - PG_RETURN_FLOAT8(DEFAULT_GEOMETRY_JOINSEL); - } - - - /** - * Setup the search box - this is the intersection of the two column - * extents. - */ - calculate_column_intersection(&search_box, geomstats1, geomstats2); - - POSTGIS_DEBUGF(3, " -- geomstats1 box: %.15g %.15g, %.15g %.15g",geomstats1->xmin,geomstats1->ymin,geomstats1->xmax,geomstats1->ymax); - POSTGIS_DEBUGF(3, " -- geomstats2 box: %.15g %.15g, %.15g %.15g",geomstats2->xmin,geomstats2->ymin,geomstats2->xmax,geomstats2->ymax); - POSTGIS_DEBUGF(3, " -- calculated intersection box is : %.15g %.15g, %.15g %.15g",search_box.xmin,search_box.ymin,search_box.xmax,search_box.ymax); - - - /* Do the selectivity */ - selectivity1 = estimate_selectivity(&search_box, geomstats1); - selectivity2 = estimate_selectivity(&search_box, geomstats2); - - POSTGIS_DEBUGF(3, "selectivity1: %.15g selectivity2: %.15g", selectivity1, selectivity2); - - /* Free the statistic tuples */ - free_attstatsslot(0, NULL, 0, (float *)geomstats1, geomstats1_nvalues); - ReleaseSysCache(stats1_tuple); - - free_attstatsslot(0, NULL, 0, (float *)geomstats2, geomstats2_nvalues); - ReleaseSysCache(stats2_tuple); - - /* - * OK, so before we calculate the join selectivity we also need to - * know the number of tuples in each of the columns since - * estimate_selectivity returns the number of estimated tuples - * divided by the total number of tuples - hence we need to - * multiply out the returned selectivity by the total number of rows. - */ - class_tuple = SearchSysCache(RELOID, ObjectIdGetDatum(relid1), - 0, 0, 0); - - if (HeapTupleIsValid(class_tuple)) - { - Form_pg_class reltup = (Form_pg_class) GETSTRUCT(class_tuple); - num1_tuples = reltup->reltuples; - } - - ReleaseSysCache(class_tuple); - - - class_tuple = SearchSysCache(RELOID, ObjectIdGetDatum(relid2), - 0, 0, 0); - - if (HeapTupleIsValid(class_tuple)) - { - Form_pg_class reltup = (Form_pg_class) GETSTRUCT(class_tuple); - num2_tuples = reltup->reltuples; - } - - ReleaseSysCache(class_tuple); - - - /* - * Finally calculate the estimate of the number of rows returned - * - * = 2 * (nrows from col1 + nrows from col2) / - * total nrows in col1 x total nrows in col2 - * - * The factor of 2 accounts for the fact that for each tuple in - * col 1 matching col 2, - * there will be another match in col 2 matching col 1 - */ - - total_tuples = num1_tuples * num2_tuples; - rows_returned = 2 * ((num1_tuples * selectivity1) + - (num2_tuples * selectivity2)); - - POSTGIS_DEBUGF(3, "Rows from rel1: %f", num1_tuples * selectivity1); - POSTGIS_DEBUGF(3, "Rows from rel2: %f", num2_tuples * selectivity2); - POSTGIS_DEBUGF(3, "Estimated rows returned: %f", rows_returned); - - /* - * One (or both) tuple count is zero... - * We return default selectivity estimate. - * We could probably attempt at an estimate - * w/out looking at tables tuple count, with - * a function of selectivity1, selectivity2. - */ - if ( ! total_tuples ) - { - POSTGIS_DEBUG(3, "Total tuples == 0, returning default join selectivity"); - - PG_RETURN_FLOAT8(DEFAULT_GEOMETRY_JOINSEL); - } - - if ( rows_returned > total_tuples ) - PG_RETURN_FLOAT8(1.0); - - PG_RETURN_FLOAT8(rows_returned / total_tuples); -} - -#endif /* REALLY_DO_JOINSEL */ - -/**************************** FROM POSTGIS ****************/ - - -/** - * This function returns an estimate of the selectivity - * of a search_box looking at data in the GEOM_STATS - * structure. - * */ -/** -* TODO: handle box dimension collapses (probably should be handled -* by the statistic generator, avoiding GEOM_STATS with collapsed -* dimensions) -*/ -static float8 -estimate_selectivity(BOX2DFLOAT4 *box, GEOM_STATS *geomstats) -{ - int x, y; - int x_idx_min, x_idx_max, y_idx_min, y_idx_max; - double intersect_x, intersect_y, AOI; - double cell_area, box_area; - double geow, geoh; /* width and height of histogram */ - int histocols, historows; /* histogram grid size */ - double value; - float overlapping_cells; - float avg_feat_cells; - double gain; - float8 selectivity; - - - /* - * Search box completely miss histogram extent - */ - if ( box->xmax < geomstats->xmin || - box->xmin > geomstats->xmax || - box->ymax < geomstats->ymin || - box->ymin > geomstats->ymax ) - { - POSTGIS_DEBUG(3, " search_box does not overlaps histogram, returning 0"); - - return 0.0; - } - - /* - * Search box completely contains histogram extent - */ - if ( box->xmax >= geomstats->xmax && - box->xmin <= geomstats->xmin && - box->ymax >= geomstats->ymax && - box->ymin <= geomstats->ymin ) - { - POSTGIS_DEBUG(3, " search_box contains histogram, returning 1"); - - return 1.0; - } - - geow = geomstats->xmax-geomstats->xmin; - geoh = geomstats->ymax-geomstats->ymin; - - histocols = geomstats->cols; - historows = geomstats->rows; - - POSTGIS_DEBUGF(3, " histogram has %d cols, %d rows", histocols, historows); - POSTGIS_DEBUGF(3, " histogram geosize is %fx%f", geow, geoh); - - cell_area = (geow*geoh) / (histocols*historows); - box_area = (box->xmax-box->xmin)*(box->ymax-box->ymin); - value = 0; - - /* Find first overlapping column */ - x_idx_min = (box->xmin-geomstats->xmin) / geow * histocols; - if (x_idx_min < 0) - { - POSTGIS_DEBUGF(3, " search_box overlaps %d columns on the left of histogram grid", -x_idx_min); - - /* should increment the value somehow */ - x_idx_min = 0; - } - if (x_idx_min >= histocols) - { - POSTGIS_DEBUGF(3, " search_box overlaps %d columns on the right of histogram grid", x_idx_min-histocols+1); - - /* should increment the value somehow */ - x_idx_min = histocols-1; - } - - /* Find first overlapping row */ - y_idx_min = (box->ymin-geomstats->ymin) / geoh * historows; - if (y_idx_min <0) - { - POSTGIS_DEBUGF(3, " search_box overlaps %d columns on the bottom of histogram grid", -y_idx_min); - - /* should increment the value somehow */ - y_idx_min = 0; - } - if (y_idx_min >= historows) - { - POSTGIS_DEBUGF(3, " search_box overlaps %d columns on the top of histogram grid", y_idx_min-historows+1); - - /* should increment the value somehow */ - y_idx_min = historows-1; - } - - /* Find last overlapping column */ - x_idx_max = (box->xmax-geomstats->xmin) / geow * histocols; - if (x_idx_max <0) - { - /* should increment the value somehow */ - x_idx_max = 0; - } - if (x_idx_max >= histocols ) - { - /* should increment the value somehow */ - x_idx_max = histocols-1; - } - - /* Find last overlapping row */ - y_idx_max = (box->ymax-geomstats->ymin) / geoh * historows; - if (y_idx_max <0) - { - /* should increment the value somehow */ - y_idx_max = 0; - } - if (y_idx_max >= historows) - { - /* should increment the value somehow */ - y_idx_max = historows-1; - } - - /* - * the {x,y}_idx_{min,max} - * define the grid squares that the box intersects - */ - for (y=y_idx_min; y<=y_idx_max; y++) - { - for (x=x_idx_min; x<=x_idx_max; x++) - { - double val; - double gain; - - val = geomstats->value[x+y*histocols]; - - /* - * Of the cell value we get - * only the overlap fraction. - */ - - intersect_x = LW_MIN(box->xmax, geomstats->xmin + (x+1) * geow / histocols) - LW_MAX(box->xmin, geomstats->xmin + x * geow / histocols ); - intersect_y = LW_MIN(box->ymax, geomstats->ymin + (y+1) * geoh / historows) - LW_MAX(box->ymin, geomstats->ymin+ y * geoh / historows) ; - - AOI = intersect_x*intersect_y; - gain = AOI/cell_area; - - POSTGIS_DEBUGF(4, " [%d,%d] cell val %.15f", - x, y, val); - POSTGIS_DEBUGF(4, " [%d,%d] AOI %.15f", - x, y, AOI); - POSTGIS_DEBUGF(4, " [%d,%d] gain %.15f", - x, y, gain); - - val *= gain; - - POSTGIS_DEBUGF(4, " [%d,%d] adding %.15f to value", - x, y, val); - - value += val; - } - } - - - /* - * If the search_box is a point, it will - * overlap a single cell and thus get - * it's value, which is the fraction of - * samples (we can presume of row set also) - * which bumped to that cell. - * - * If the table features are points, each - * of them will overlap a single histogram cell. - * Our search_box value would then be correctly - * computed as the sum of the bumped cells values. - * - * If both our search_box AND the sample features - * overlap more then a single histogram cell we - * need to consider the fact that our sum computation - * will have many duplicated included. E.g. each - * single sample feature would have contributed to - * raise the search_box value by as many times as - * many cells in the histogram are commonly overlapped - * by both searc_box and feature. We should then - * divide our value by the number of cells in the virtual - * 'intersection' between average feature cell occupation - * and occupation of the search_box. This is as - * fuzzy as you understand it :) - * - * Consistency check: whenever the number of cells is - * one of whichever part (search_box_occupation, - * avg_feature_occupation) the 'intersection' must be 1. - * If sounds that our 'intersaction' is actually the - * minimun number between search_box_occupation and - * avg_feat_occupation. - * - */ - overlapping_cells = (x_idx_max-x_idx_min+1) * - (y_idx_max-y_idx_min+1); - avg_feat_cells = geomstats->avgFeatureCells; - - POSTGIS_DEBUGF(3, " search_box overlaps %f cells", overlapping_cells); - POSTGIS_DEBUGF(3, " avg feat overlaps %f cells", avg_feat_cells); - - if ( ! overlapping_cells ) - { - POSTGIS_DEBUG(3, " no overlapping cells, returning 0.0"); - - return 0.0; - } - - gain = 1/LW_MIN(overlapping_cells, avg_feat_cells); - selectivity = value*gain; - - POSTGIS_DEBUGF(3, " SUM(ov_histo_cells)=%f", value); - POSTGIS_DEBUGF(3, " gain=%f", gain); - POSTGIS_DEBUGF(3, " selectivity=%f", selectivity); - - /* prevent rounding overflows */ - if (selectivity > 1.0) selectivity = 1.0; - else if (selectivity < 0) selectivity = 0.0; - - return selectivity; -} - -/** - * This function should return an estimation of the number of - * rows returned by a query involving an overlap check - * ( it's the restrict function for the && operator ) - * - * It can make use (if available) of the statistics collected - * by the geometry analyzer function. - * - * Note that the good work is done by estimate_selectivity() above. - * This function just tries to find the search_box, loads the statistics - * and invoke the work-horse. - * - * This is the one used for PG version >= 7.5 - * - */ -PG_FUNCTION_INFO_V1(LWGEOM_gist_sel); -Datum LWGEOM_gist_sel(PG_FUNCTION_ARGS) -{ - PlannerInfo *root = (PlannerInfo *) PG_GETARG_POINTER(0); - - /* Oid operator = PG_GETARG_OID(1); */ - List *args = (List *) PG_GETARG_POINTER(2); - /* int varRelid = PG_GETARG_INT32(3); */ - Oid relid; - HeapTuple stats_tuple; - GEOM_STATS *geomstats; - /* - * This is to avoid casting the corresponding - * "type-punned" pointer, which would break - * "strict-aliasing rules". - */ - GEOM_STATS **gsptr=&geomstats; - int geomstats_nvalues=0; - Node *other; - Var *self; - uchar *in; - BOX2DFLOAT4 search_box; - float8 selectivity=0; - - POSTGIS_DEBUG(2, "LWGEOM_gist_sel called"); - - /* Fail if not a binary opclause (probably shouldn't happen) */ - if (list_length(args) != 2) - { - POSTGIS_DEBUG(3, "LWGEOM_gist_sel: not a binary opclause"); - - PG_RETURN_FLOAT8(DEFAULT_GEOMETRY_SEL); - } - - - /* - * Find the constant part - */ - other = (Node *) linitial(args); - if ( ! IsA(other, Const) ) - { - self = (Var *)other; - other = (Node *) lsecond(args); - } - else - { - self = (Var *) lsecond(args); - } - - if ( ! IsA(other, Const) ) - { - POSTGIS_DEBUG(3, " no constant arguments - returning default selectivity"); - - PG_RETURN_FLOAT8(DEFAULT_GEOMETRY_SEL); - } - - /* - * We are working on two constants.. - * TODO: check if expression is true, - * returned set would be either - * the whole or none. - */ - if ( ! IsA(self, Var) ) - { - POSTGIS_DEBUG(3, " no variable argument ? - returning default selectivity"); - - PG_RETURN_FLOAT8(DEFAULT_GEOMETRY_SEL); - } - - /* - * Convert the constant to a BOX - */ - - in = (uchar *)PG_DETOAST_DATUM( ((Const*)other)->constvalue ); - if ( ! getbox2d_p(in+4, &search_box) ) - { - POSTGIS_DEBUG(3, "search box is EMPTY"); - - PG_RETURN_FLOAT8(0.0); - } - - POSTGIS_DEBUGF(4, " requested search box is : %.15g %.15g, %.15g %.15g",search_box.xmin,search_box.ymin,search_box.xmax,search_box.ymax); - - /* - * Get pg_statistic row - */ - - relid = getrelid(self->varno, root->parse->rtable); - - stats_tuple = SearchSysCache(STATRELATT, ObjectIdGetDatum(relid), Int16GetDatum(self->varattno), 0, 0); - if ( ! stats_tuple ) - { - POSTGIS_DEBUG(3, " No statistics, returning default estimate"); - - PG_RETURN_FLOAT8(DEFAULT_GEOMETRY_SEL); - } - - - if ( ! get_attstatsslot(stats_tuple, 0, 0, STATISTIC_KIND_GEOMETRY, InvalidOid, NULL, NULL, -#if POSTGIS_PGSQL_VERSION >= 85 - NULL, -#endif - (float4 **)gsptr, &geomstats_nvalues) ) - { - POSTGIS_DEBUG(3, " STATISTIC_KIND_GEOMETRY stats not found - returning default geometry selectivity"); - - ReleaseSysCache(stats_tuple); - PG_RETURN_FLOAT8(DEFAULT_GEOMETRY_SEL); - } - - POSTGIS_DEBUGF(4, " %d read from stats", geomstats_nvalues); - - POSTGIS_DEBUGF(4, " histo: xmin,ymin: %f,%f", - geomstats->xmin, geomstats->ymin); - POSTGIS_DEBUGF(4, " histo: xmax,ymax: %f,%f", - geomstats->xmax, geomstats->ymax); - POSTGIS_DEBUGF(4, " histo: cols: %f", geomstats->rows); - POSTGIS_DEBUGF(4, " histo: rows: %f", geomstats->cols); - POSTGIS_DEBUGF(4, " histo: avgFeatureArea: %f", geomstats->avgFeatureArea); - POSTGIS_DEBUGF(4, " histo: avgFeatureCells: %f", geomstats->avgFeatureCells); - - /* - * Do the estimation - */ - selectivity = estimate_selectivity(&search_box, geomstats); - - - POSTGIS_DEBUGF(3, " returning computed value: %f", selectivity); - - free_attstatsslot(0, NULL, 0, (float *)geomstats, geomstats_nvalues); - ReleaseSysCache(stats_tuple); - PG_RETURN_FLOAT8(selectivity); - -} - - -/** - * This function is called by the analyze function iff - * the geometry_analyze() function give it its pointer - * (this is always the case so far). - * The geometry_analyze() function is also responsible - * of deciding the number of "sample" rows we will receive - * here. It is able to give use other 'custom' data, but we - * won't use them so far. - * - * Our job is to build some statistics on the sample data - * for use by operator estimators. - * - * Currently we only need statistics to estimate the number of rows - * overlapping a given extent (estimation function bound - * to the && operator). - * - */ -static void -compute_geometry_stats(VacAttrStats *stats, AnalyzeAttrFetchFunc fetchfunc, - int samplerows, double totalrows) -{ - MemoryContext old_context; - int i; - int geom_stats_size; - BOX2DFLOAT4 **sampleboxes; - GEOM_STATS *geomstats; - bool isnull; - int null_cnt=0, notnull_cnt=0, examinedsamples=0; - BOX2DFLOAT4 *sample_extent=NULL; - double total_width=0; - double total_boxes_area=0; - int total_boxes_cells=0; - double cell_area; - double cell_width; - double cell_height; -#if USE_STANDARD_DEVIATION - /* for standard deviation */ - double avgLOWx, avgLOWy, avgHIGx, avgHIGy; - double sumLOWx=0, sumLOWy=0, sumHIGx=0, sumHIGy=0; - double sdLOWx=0, sdLOWy=0, sdHIGx=0, sdHIGy=0; - BOX2DFLOAT4 *newhistobox=NULL; -#endif - double geow, geoh; /* width and height of histogram */ - int histocells; - int cols, rows; /* histogram grid size */ - BOX2DFLOAT4 histobox; - - /* - * This is where geometry_analyze - * should put its' custom parameters. - */ - /* void *mystats = stats->extra_data; */ - - /* - * We'll build an histogram having from 40 to 400 boxesPerSide - * Total number of cells is determined by attribute stat - * target. It can go from 1600 to 160000 (stat target: 10,1000) - */ - histocells = 160*stats->attr->attstattarget; - - - POSTGIS_DEBUG(2, "compute_geometry_stats called"); - POSTGIS_DEBUGF(3, " samplerows: %d", samplerows); - POSTGIS_DEBUGF(3, " histogram cells: %d", histocells); - - /* - * We might need less space, but don't think - * its worth saving... - */ - sampleboxes = palloc(sizeof(BOX2DFLOAT4 *)*samplerows); - - /* - * First scan: - * o find extent of the sample rows - * o count null-infinite/not-null values - * o compute total_width - * o compute total features's box area (for avgFeatureArea) - * o sum features box coordinates (for standard deviation) - */ - for (i=0; ixmax = LWGEOM_Maxf(sample_extent->xmax, - box.xmax); - sample_extent->ymax = LWGEOM_Maxf(sample_extent->ymax, - box.ymax); - sample_extent->xmin = LWGEOM_Minf(sample_extent->xmin, - box.xmin); - sample_extent->ymin = LWGEOM_Minf(sample_extent->ymin, - box.ymin); - } - - /** TODO: ask if we need geom or bvol size for stawidth */ - total_width += geom->size; - total_boxes_area += (box.xmax-box.xmin)*(box.ymax-box.ymin); - -#if USE_STANDARD_DEVIATION - /* - * Add bvol coordinates to sum for standard deviation - * computation. - */ - sumLOWx += box.xmin; - sumLOWy += box.ymin; - sumHIGx += box.xmax; - sumHIGy += box.ymax; -#endif - - notnull_cnt++; - - /* give backend a chance of interrupting us */ - vacuum_delay_point(); - - } - - if ( ! notnull_cnt ) - { - elog(NOTICE, " no notnull values, invalid stats"); - stats->stats_valid = false; - return; - } - -#if USE_STANDARD_DEVIATION - - POSTGIS_DEBUGF(3, " sample_extent: xmin,ymin: %f,%f", - sample_extent->xmin, sample_extent->ymin); - POSTGIS_DEBUGF(3, " sample_extent: xmax,ymax: %f,%f", - sample_extent->xmax, sample_extent->ymax); - - /* - * Second scan: - * o compute standard deviation - */ - avgLOWx = sumLOWx/notnull_cnt; - avgLOWy = sumLOWy/notnull_cnt; - avgHIGx = sumHIGx/notnull_cnt; - avgHIGy = sumHIGy/notnull_cnt; - for (i=0; ixmin - avgLOWx) * (box->xmin - avgLOWx); - sdLOWy += (box->ymin - avgLOWy) * (box->ymin - avgLOWy); - sdHIGx += (box->xmax - avgHIGx) * (box->xmax - avgHIGx); - sdHIGy += (box->ymax - avgHIGy) * (box->ymax - avgHIGy); - } - sdLOWx = sqrt(sdLOWx/notnull_cnt); - sdLOWy = sqrt(sdLOWy/notnull_cnt); - sdHIGx = sqrt(sdHIGx/notnull_cnt); - sdHIGy = sqrt(sdHIGy/notnull_cnt); - - POSTGIS_DEBUG(3, " standard deviations:"); - POSTGIS_DEBUGF(3, " LOWx - avg:%f sd:%f", avgLOWx, sdLOWx); - POSTGIS_DEBUGF(3, " LOWy - avg:%f sd:%f", avgLOWy, sdLOWy); - POSTGIS_DEBUGF(3, " HIGx - avg:%f sd:%f", avgHIGx, sdHIGx); - POSTGIS_DEBUGF(3, " HIGy - avg:%f sd:%f", avgHIGy, sdHIGy); - - histobox.xmin = LW_MAX((avgLOWx - SDFACTOR * sdLOWx), - sample_extent->xmin); - histobox.ymin = LW_MAX((avgLOWy - SDFACTOR * sdLOWy), - sample_extent->ymin); - histobox.xmax = LW_MIN((avgHIGx + SDFACTOR * sdHIGx), - sample_extent->xmax); - histobox.ymax = LW_MIN((avgHIGy + SDFACTOR * sdHIGy), - sample_extent->ymax); - - POSTGIS_DEBUGF(3, " sd_extent: xmin,ymin: %f,%f", - histobox.xmin, histobox.ymin); - POSTGIS_DEBUGF(3, " sd_extent: xmax,ymax: %f,%f", - histobox.xmin, histobox.ymax); - - /* - * Third scan: - * o skip hard deviants - * o compute new histogram box - */ - for (i=0; ixmin > histobox.xmax || - box->xmax < histobox.xmin || - box->ymin > histobox.ymax || - box->ymax < histobox.ymin ) - { - POSTGIS_DEBUGF(4, " feat %d is an hard deviant, skipped", i); - - sampleboxes[i] = NULL; - continue; - } - if ( ! newhistobox ) - { - newhistobox = palloc(sizeof(BOX2DFLOAT4)); - memcpy(newhistobox, box, sizeof(BOX2DFLOAT4)); - } - else - { - if ( box->xmin < newhistobox->xmin ) - newhistobox->xmin = box->xmin; - if ( box->ymin < newhistobox->ymin ) - newhistobox->ymin = box->ymin; - if ( box->xmax > newhistobox->xmax ) - newhistobox->xmax = box->xmax; - if ( box->ymax > newhistobox->ymax ) - newhistobox->ymax = box->ymax; - } - } - - /* - * Set histogram extent as the intersection between - * standard deviation based histogram extent - * and computed sample extent after removal of - * hard deviants (there might be no hard deviants). - */ - if ( histobox.xmin < newhistobox->xmin ) - histobox.xmin = newhistobox->xmin; - if ( histobox.ymin < newhistobox->ymin ) - histobox.ymin = newhistobox->ymin; - if ( histobox.xmax > newhistobox->xmax ) - histobox.xmax = newhistobox->xmax; - if ( histobox.ymax > newhistobox->ymax ) - histobox.ymax = newhistobox->ymax; - - -#else /* ! USE_STANDARD_DEVIATION */ - - /* - * Set histogram extent box - */ - histobox.xmin = sample_extent->xmin; - histobox.ymin = sample_extent->ymin; - histobox.xmax = sample_extent->xmax; - histobox.ymax = sample_extent->ymax; -#endif /* USE_STANDARD_DEVIATION */ - - - POSTGIS_DEBUGF(3, " histogram_extent: xmin,ymin: %f,%f", - histobox.xmin, histobox.ymin); - POSTGIS_DEBUGF(3, " histogram_extent: xmax,ymax: %f,%f", - histobox.xmax, histobox.ymax); - - - geow = histobox.xmax - histobox.xmin; - geoh = histobox.ymax - histobox.ymin; - - /* - * Compute histogram cols and rows based on aspect ratio - * of histogram extent - */ - if ( ! geow && ! geoh ) - { - cols = 1; - rows = 1; - histocells = 1; - } - else if ( ! geow ) - { - cols = 1; - rows = histocells; - } - else if ( ! geoh ) - { - cols = histocells; - rows = 1; - } - else - { - if ( geowanl_context); - geom_stats_size=sizeof(GEOM_STATS)+(histocells-1)*sizeof(float4); - geomstats = palloc(geom_stats_size); - MemoryContextSwitchTo(old_context); - - geomstats->avgFeatureArea = total_boxes_area/notnull_cnt; - geomstats->xmin = histobox.xmin; - geomstats->ymin = histobox.ymin; - geomstats->xmax = histobox.xmax; - geomstats->ymax = histobox.ymax; - geomstats->cols = cols; - geomstats->rows = rows; - - /* Initialize all values to 0 */ - for (i=0; ivalue[i] = 0; - - cell_width = geow/cols; - cell_height = geoh/rows; - cell_area = cell_width*cell_height; - - POSTGIS_DEBUGF(4, "cell_width: %f", cell_width); - POSTGIS_DEBUGF(4, "cell_height: %f", cell_height); - - - /* - * Fourth scan: - * o fill histogram values with the number of - * features' bbox overlaps: a feature's bvol - * can fully overlap (1) or partially overlap - * (fraction of 1) an histogram cell. - * - * o compute total cells occupation - * - */ - for (i=0; ixmax, box->ymax, - box->xmin, box->ymin); - - /* Find first overlapping column */ - x_idx_min = (box->xmin-geomstats->xmin) / geow * cols; - if (x_idx_min <0) x_idx_min = 0; - if (x_idx_min >= cols) x_idx_min = cols-1; - - /* Find first overlapping row */ - y_idx_min = (box->ymin-geomstats->ymin) / geoh * rows; - if (y_idx_min <0) y_idx_min = 0; - if (y_idx_min >= rows) y_idx_min = rows-1; - - /* Find last overlapping column */ - x_idx_max = (box->xmax-geomstats->xmin) / geow * cols; - if (x_idx_max <0) x_idx_max = 0; - if (x_idx_max >= cols ) x_idx_max = cols-1; - - /* Find last overlapping row */ - y_idx_max = (box->ymax-geomstats->ymin) / geoh * rows; - if (y_idx_max <0) y_idx_max = 0; - if (y_idx_max >= rows) y_idx_max = rows-1; - - POSTGIS_DEBUGF(4, " feat %d overlaps columns %d-%d, rows %d-%d", - i, x_idx_min, x_idx_max, y_idx_min, y_idx_max); - - /* - * the {x,y}_idx_{min,max} - * define the grid squares that the box intersects - */ - for (y=y_idx_min; y<=y_idx_max; y++) - { - for (x=x_idx_min; x<=x_idx_max; x++) - { - geomstats->value[x+y*cols] += 1; - numcells++; - } - } - - /* - * before adding to the total cells - * we could decide if we really - * want this feature to count - */ - total_boxes_cells += numcells; - - examinedsamples++; - } - - POSTGIS_DEBUGF(3, " examined_samples: %d/%d", examinedsamples, samplerows); - - if ( ! examinedsamples ) - { - elog(NOTICE, " no examined values, invalid stats"); - stats->stats_valid = false; - - POSTGIS_DEBUG(3, " no stats have been gathered"); - - return; - } - - /** TODO: what about null features (TODO) */ - geomstats->avgFeatureCells = (float4)total_boxes_cells/examinedsamples; - - POSTGIS_DEBUGF(3, " histo: total_boxes_cells: %d", total_boxes_cells); - POSTGIS_DEBUGF(3, " histo: avgFeatureArea: %f", geomstats->avgFeatureArea); - POSTGIS_DEBUGF(3, " histo: avgFeatureCells: %f", geomstats->avgFeatureCells); - - - /* - * Normalize histogram - * - * We divide each histogram cell value - * by the number of samples examined. - * - */ - for (i=0; ivalue[i] /= examinedsamples; - - { - int x, y; - for (x=0; xvalue[x+y*cols]); - } - } - } - - - /* - * Write the statistics data - */ - stats->stakind[0] = STATISTIC_KIND_GEOMETRY; - stats->staop[0] = InvalidOid; - stats->stanumbers[0] = (float4 *)geomstats; - stats->numnumbers[0] = geom_stats_size/sizeof(float4); - - stats->stanullfrac = (float4)null_cnt/samplerows; - stats->stawidth = total_width/notnull_cnt; - stats->stadistinct = -1.0; - - POSTGIS_DEBUGF(3, " out: slot 0: kind %d (STATISTIC_KIND_GEOMETRY)", - stats->stakind[0]); - POSTGIS_DEBUGF(3, " out: slot 0: op %d (InvalidOid)", stats->staop[0]); - POSTGIS_DEBUGF(3, " out: slot 0: numnumbers %d", stats->numnumbers[0]); - POSTGIS_DEBUGF(3, " out: null fraction: %d/%d=%g", null_cnt, samplerows, stats->stanullfrac); - POSTGIS_DEBUGF(3, " out: average width: %d bytes", stats->stawidth); - POSTGIS_DEBUG(3, " out: distinct values: all (no check done)"); - - stats->stats_valid = true; -} - -/** - * This function will be called when the ANALYZE command is run - * on a column of the "geometry" type. - * - * It will need to return a stats builder function reference - * and a "minimum" sample rows to feed it. - * If we want analisys to be completely skipped we can return - * FALSE and leave output vals untouched. - * - * What we know from this call is: - * - * o The pg_attribute row referring to the specific column. - * Could be used to get reltuples from pg_class (which - * might quite inexact though...) and use them to set an - * appropriate minimum number of sample rows to feed to - * the stats builder. The stats builder will also receive - * a more accurate "estimation" of the number or rows. - * - * o The pg_type row for the specific column. - * Could be used to set stat builder / sample rows - * based on domain type (when postgis will be implemented - * that way). - * - * Being this experimental we'll stick to a static stat_builder/sample_rows - * value for now. - * - */ -PG_FUNCTION_INFO_V1(LWGEOM_analyze); -Datum LWGEOM_analyze(PG_FUNCTION_ARGS) -{ - VacAttrStats *stats = (VacAttrStats *)PG_GETARG_POINTER(0); - Form_pg_attribute attr = stats->attr; - - POSTGIS_DEBUG(2, "lwgeom_analyze called"); - - /* If the attstattarget column is negative, use the default value */ - /* NB: it is okay to scribble on stats->attr since it's a copy */ - if (attr->attstattarget < 0) - attr->attstattarget = default_statistics_target; - - POSTGIS_DEBUGF(3, " attribute stat target: %d", attr->attstattarget); - - /* - * There might be a reason not to analyze this column - * (can we detect the absence of an index?) - */ -#if 0 - elog(NOTICE, "compute_geometry_stats not implemented yet"); - PG_RETURN_BOOL(false); -#endif - - /* Setup the minimum rows and the algorithm function */ - stats->minrows = 300 * stats->attr->attstattarget; - stats->compute_stats = compute_geometry_stats; - - POSTGIS_DEBUGF(3, " minrows: %d", stats->minrows); - - /* Indicate we are done successfully */ - PG_RETURN_BOOL(true); -} - -/** - * Return the estimated extent of the table - * looking at gathered statistics (or NULL if - * no statistics have been gathered). - */ -PG_FUNCTION_INFO_V1(LWGEOM_estimated_extent); -Datum LWGEOM_estimated_extent(PG_FUNCTION_ARGS) -{ - text *txnsp = NULL; - text *txtbl = NULL; - text *txcol = NULL; - char *nsp = NULL; - char *tbl = NULL; - char *col = NULL; - char *query; - ArrayType *array = NULL; - int SPIcode; - SPITupleTable *tuptable; - TupleDesc tupdesc ; - HeapTuple tuple ; - bool isnull; - BOX2DFLOAT4 *box; - size_t querysize; - - if ( PG_NARGS() == 3 ) - { - txnsp = PG_GETARG_TEXT_P(0); - txtbl = PG_GETARG_TEXT_P(1); - txcol = PG_GETARG_TEXT_P(2); - } - else if ( PG_NARGS() == 2 ) - { - txtbl = PG_GETARG_TEXT_P(0); - txcol = PG_GETARG_TEXT_P(1); - } - else - { - elog(ERROR, "estimated_extent() called with wrong number of arguments"); - PG_RETURN_NULL(); - } - - POSTGIS_DEBUG(2, "LWGEOM_estimated_extent called"); - - /* Connect to SPI manager */ - SPIcode = SPI_connect(); - if (SPIcode != SPI_OK_CONNECT) - { - elog(ERROR, "LWGEOM_estimated_extent: couldnt open a connection to SPI"); - PG_RETURN_NULL() ; - } - - querysize = VARSIZE(txtbl)+VARSIZE(txcol)+516; - - if ( txnsp ) - { - nsp = palloc(VARSIZE(txnsp)+1); - memcpy(nsp, VARDATA(txnsp), VARSIZE(txnsp)-VARHDRSZ); - nsp[VARSIZE(txnsp)-VARHDRSZ]='\0'; - querysize += VARSIZE(txnsp); - } - else - { - querysize += 32; /* current_schema() */ - } - - tbl = palloc(VARSIZE(txtbl)+1); - memcpy(tbl, VARDATA(txtbl), VARSIZE(txtbl)-VARHDRSZ); - tbl[VARSIZE(txtbl)-VARHDRSZ]='\0'; - - col = palloc(VARSIZE(txcol)+1); - memcpy(col, VARDATA(txcol), VARSIZE(txcol)-VARHDRSZ); - col[VARSIZE(txcol)-VARHDRSZ]='\0'; - -#if POSTGIS_DEBUG_LEVEL > 0 - if ( txnsp ) - { - POSTGIS_DEBUGF(3, " schema:%s table:%s column:%s", nsp, tbl, col); - } - else - { - POSTGIS_DEBUGF(3, " schema:current_schema() table:%s column:%s", - tbl, col); - } -#endif - - query = palloc(querysize); - - - /* Security check: because we access information in the pg_statistic table, we must run as the database - superuser (by marking the function as SECURITY DEFINER) and check permissions ourselves */ - if ( txnsp ) - { - sprintf(query, "SELECT has_table_privilege((SELECT usesysid FROM pg_user WHERE usename = session_user), '%s.%s', 'select')", nsp, tbl); - } - else - { - sprintf(query, "SELECT has_table_privilege((SELECT usesysid FROM pg_user WHERE usename = session_user), '%s', 'select')", tbl); - } - - POSTGIS_DEBUGF(4, "permission check sql query is: %s", query); - - SPIcode = SPI_exec(query, 1); - if (SPIcode != SPI_OK_SELECT) - { - SPI_finish(); - elog(ERROR, "LWGEOM_estimated_extent: couldn't execute permission check sql via SPI"); - PG_RETURN_NULL(); - } - - tuptable = SPI_tuptable; - tupdesc = SPI_tuptable->tupdesc; - tuple = tuptable->vals[0]; - - if (!DatumGetBool(SPI_getbinval(tuple, tupdesc, 1, &isnull))) - { - SPI_finish(); - elog(ERROR, "LWGEOM_estimated_extent: permission denied for relation %s", tbl); - PG_RETURN_NULL(); - } - - - /* Return the stats data */ - if ( txnsp ) - { - sprintf(query, "SELECT s.stanumbers1[5:8] FROM pg_statistic s, pg_class c, pg_attribute a, pg_namespace n WHERE c.relname = '%s' AND a.attrelid = c.oid AND a.attname = '%s' AND n.nspname = '%s' AND c.relnamespace = n.oid AND s.starelid=c.oid AND s.staattnum = a.attnum AND staattnum = attnum", tbl, col, nsp); - } - else - { - sprintf(query, "SELECT s.stanumbers1[5:8] FROM pg_statistic s, pg_class c, pg_attribute a, pg_namespace n WHERE c.relname = '%s' AND a.attrelid = c.oid AND a.attname = '%s' AND n.nspname = current_schema() AND c.relnamespace = n.oid AND s.starelid=c.oid AND s.staattnum = a.attnum AND staattnum = attnum", tbl, col); - } - - POSTGIS_DEBUGF(4, " query: %s", query); - - SPIcode = SPI_exec(query, 1); - if (SPIcode != SPI_OK_SELECT ) - { - SPI_finish(); - elog(ERROR,"LWGEOM_estimated_extent: couldnt execute sql via SPI"); - PG_RETURN_NULL(); - } - if (SPI_processed != 1) - { - SPI_finish(); - - POSTGIS_DEBUGF(3, " %d stat rows", SPI_processed); - - elog(ERROR, "LWGEOM_estimated_extent: couldn't locate table within current schema"); - - PG_RETURN_NULL() ; - } - - tuptable = SPI_tuptable; - tupdesc = SPI_tuptable->tupdesc; - tuple = tuptable->vals[0]; - array = DatumGetArrayTypeP(SPI_getbinval(tuple, tupdesc, 1, &isnull)); - if (isnull) - { - SPI_finish(); - - POSTGIS_DEBUG(3, " stats are NULL"); - - elog(ERROR, "LWGEOM_estimated_extent: couldn't locate statistics for table"); - - PG_RETURN_NULL(); - } - if ( ArrayGetNItems(ARR_NDIM(array), ARR_DIMS(array)) != 4 ) - { - elog(ERROR, " corrupted histogram"); - PG_RETURN_NULL(); - } - - POSTGIS_DEBUGF(3, " stats array has %d elems", ArrayGetNItems(ARR_NDIM(array), ARR_DIMS(array))); - - /* - * Construct box2dfloat4. - * Must allocate this in upper executor context - * to keep it alive after SPI_finish(). - */ - box = SPI_palloc(sizeof(BOX2DFLOAT4)); - - /* Construct the box */ - memcpy(box, ARR_DATA_PTR(array), sizeof(BOX2DFLOAT4)); - - POSTGIS_DEBUGF(3, " histogram extent = %g %g, %g %g", box->xmin, - box->ymin, box->xmax, box->ymax); - - SPIcode = SPI_finish(); - if (SPIcode != SPI_OK_FINISH ) - { - elog(ERROR, "LWGEOM_estimated_extent: couldnt disconnect from SPI"); - } - - /* TODO: enlarge the box by some factor */ - - PG_RETURN_POINTER(box); -} - - - - -/********************************************************************** - * $Log$ - * Revision 1.39 2006/05/30 08:38:58 strk - * Added some missing copyright headers. - * - * Revision 1.38 2006/03/13 10:54:08 strk - * Applied patch from Mark Cave Ayland embedding access control for - * the estimated_extent functions. - * - * Revision 1.37 2006/01/09 11:48:15 strk - * Fixed "strict-aliasing rule" breaks. - * - * Revision 1.36 2005/12/30 17:40:37 strk - * Moved PG_LWGEOM WKB I/O and SRID get/set funx - * from lwgeom_api.c to lwgeom_pg.c. - * Made lwgeom_from_ewkb directly invoke grammar parser rather then invoke - * the PG_LWGEOM-specific function. - * Cleaned up signedness-related and comments-related warnings for the files - * being committed (more to do on other files) - * - * Revision 1.35 2005/10/10 16:19:16 strk - * Fixed null values fraction computation in geometry analyzer as suggested by Michael Fuhr - * - * Revision 1.34 2005/09/08 19:26:22 strk - * Handled search_box outside of histogram_box case in selectivity estimator - * - * Revision 1.33 2005/06/28 22:00:09 strk - * Fixed extimators to work with postgresql 8.1.x - * - * Revision 1.32 2005/04/22 01:07:09 strk - * Fixed bug in join selectivity estimator returning invalid estimates (>1) - * - * Revision 1.31 2005/04/18 14:12:43 strk - * Slightly changed standard deviation computation to be more corner-case-friendly. - * - * Revision 1.30 2005/04/18 10:57:13 strk - * Applied patched by Ron Mayer fixing memory leakages and invalid results - * in join selectivity estimator. Fixed some return to use default JOIN - * selectivity estimate instead of default RESTRICT selectivity estimate. - * - * Revision 1.29 2005/03/25 09:34:25 strk - * code cleanup - * - * Revision 1.28 2005/03/24 16:27:32 strk - * Added comments in estimate_allocation() bugfix point. - * - * Revision 1.27 2005/03/24 14:45:50 strk - * Fixed bug in estimated_extent() returning pointer to a memory allocated in SPI memory context - * - * Revision 1.26 2005/03/08 09:27:23 strk - * RESTRICT selectivity estimator use self->varno instead of varRelid. - * Seems to work for subqueries... - * - * Revision 1.25 2005/03/08 09:23:34 strk - * Fixed debugging lines. - * - * Revision 1.24 2005/02/21 16:22:32 strk - * Changed min() max() usage with LW_MIN() LW_MAX() - * - * Revision 1.23 2005/02/10 10:52:53 strk - * Changed 'char' to 'uchar' (unsigned char typedef) wherever octet is actually - * meant to be. - * - * Revision 1.22 2005/01/13 18:26:49 strk - * estimated_extent() implemented for PG<80 - * - * Revision 1.21 2005/01/13 17:41:40 strk - * estimated_extent() prepared for future expansion (support of pre-800 PGSQL) - * - * Revision 1.20 2005/01/07 09:52:12 strk - * JOINSEL disabled for builds against pgsql<80 - * - * Revision 1.19 2004/12/22 17:12:34 strk - * Added Mark Cave-Ayland implementation of JOIN selectivity estimator. - * - * Revision 1.18 2004/12/21 12:21:45 mcayland - * Fixed bug in pass 4 where sample boxes were referred as BOXs and not BOX2DFLOAT4. Also increased SDFACTOR to 3.25 - * - * Revision 1.17 2004/12/17 18:00:33 strk - * LWGEOM_gist_joinsel defined for all PG versions - * - * Revision 1.16 2004/12/17 11:07:48 strk - * Added missing prototype - * - * Revision 1.15 2004/12/13 14:03:07 strk - * Initial skeleton on join selectivity estimator. - * Current estimators application for box2d && box2d operator. - * - * Revision 1.14 2004/12/13 12:25:27 strk - * Removed obsoleted function and fixed some warnings. - * - * Revision 1.13 2004/12/10 12:35:11 strk - * implemented estimated_extent() function - * - * Revision 1.12 2004/11/04 11:40:08 strk - * Renamed max/min/avg macros to LW_MAX, LW_MIN, LW_AVG. - * - * Revision 1.11 2004/10/27 11:02:24 strk - * Removed another getbox2d() call. - * - * Revision 1.10 2004/10/25 17:07:09 strk - * Obsoleted getbox2d(). Use getbox2d_p() or getbox2d_internal() instead. - * - * Revision 1.9 2004/10/08 13:20:54 strk - * - * Changed LWGEOM structure to point to an actual BOX2DFLOAT4. - * Renamed most function to reflect a TYPE_method naming convention. - * (you'll need a dump/reload for it to work) - * Added more manipulation functions. - * - **********************************************************************/ diff -Nru postgis-1.5.3/postgis/lwgeom_export.c postgis-2.0.1/postgis/lwgeom_export.c --- postgis-1.5.3/postgis/lwgeom_export.c 2010-04-27 13:59:21.000000000 +0000 +++ postgis-2.0.1/postgis/lwgeom_export.c 2012-02-27 22:08:12.000000000 +0000 @@ -2,7 +2,7 @@ * $Id:$ * * PostGIS - Export functions for PostgreSQL/PostGIS - * Copyright 2009 Olivier Courtin + * Copyright 2009-2011 Olivier Courtin * * This is free software; you can redistribute and/or modify it under * the terms of the GNU General Public Licence. See the COPYING file. @@ -17,11 +17,17 @@ #include "postgres.h" #include "executor/spi.h" +#include "../postgis_config.h" #include "lwgeom_pg.h" #include "liblwgeom.h" - #include "lwgeom_export.h" +Datum LWGEOM_asGML(PG_FUNCTION_ARGS); +Datum LWGEOM_asKML(PG_FUNCTION_ARGS); +Datum LWGEOM_asGeoJson(PG_FUNCTION_ARGS); +Datum LWGEOM_asSVG(PG_FUNCTION_ARGS); +Datum LWGEOM_asX3D(PG_FUNCTION_ARGS); + /* * Retrieve an SRS from a given SRID * Require valid spatial_ref_sys table entry @@ -29,7 +35,7 @@ * Could return SRS as short one (i.e EPSG:4326) * or as long one: (i.e urn:ogc:def:crs:EPSG::4326) */ -char * getSRSbySRID(int SRID, bool short_crs) +char * getSRSbySRID(int srid, bool short_crs) { char query[256]; char *srs, *srscopy; @@ -44,10 +50,10 @@ if (short_crs) sprintf(query, "SELECT auth_name||':'||auth_srid \ - FROM spatial_ref_sys WHERE srid='%d'", SRID); + FROM spatial_ref_sys WHERE srid='%d'", srid); else sprintf(query, "SELECT 'urn:ogc:def:crs:'||auth_name||'::'||auth_srid \ - FROM spatial_ref_sys WHERE srid='%d'", SRID); + FROM spatial_ref_sys WHERE srid='%d'", srid); err = SPI_exec(query, 1); if ( err < 0 ) @@ -55,7 +61,7 @@ elog(NOTICE, "getSRSbySRID: error executing query %d", err); SPI_finish(); return NULL; - } + } /* no entry in spatial_ref_sys */ if (SPI_processed <= 0) @@ -84,3 +90,454 @@ return srscopy; } + + +/* +* Retrieve an SRID from a given SRS +* Require valid spatial_ref_sys table entry +* +*/ +int getSRIDbySRS(const char* srs) +{ + char query[256]; + int srid, err; + + if (srs == NULL) + return 0; + + if (SPI_OK_CONNECT != SPI_connect ()) + { + elog(NOTICE, "getSRIDbySRS: could not connect to SPI manager"); + SPI_finish(); + return 0; + } + sprintf(query, "SELECT srid \ + FROM spatial_ref_sys WHERE auth_name||':'||auth_srid = '%s'", srs); + + err = SPI_exec(query, 1); + if ( err < 0 ) + { + elog(NOTICE, "getSRIDbySRS: error executing query %d", err); + SPI_finish(); + return 0; + } + + /* no entry in spatial_ref_sys */ + if (SPI_processed <= 0) + { + sprintf(query, "SELECT srid \ + FROM spatial_ref_sys WHERE \ + 'urn:ogc:def:crs:'||auth_name||'::'||auth_srid = '%s'", srs); + + err = SPI_exec(query, 1); + if ( err < 0 ) + { + elog(NOTICE, "getSRIDbySRS: error executing query %d", err); + SPI_finish(); + return 0; + } + + if (SPI_processed <= 0) { + SPI_finish(); + return 0; + } + } + + srid = atoi(SPI_getvalue(SPI_tuptable->vals[0], SPI_tuptable->tupdesc, 1)); + if ( ! srs ) + { + SPI_finish(); + return 0; + } + + SPI_finish(); + + return srid; +} + + +/** + * Encode feature in GML + */ +PG_FUNCTION_INFO_V1(LWGEOM_asGML); +Datum LWGEOM_asGML(PG_FUNCTION_ARGS) +{ + GSERIALIZED *geom; + LWGEOM *lwgeom; + char *gml = NULL; + text *result; + int version; + char *srs; + int srid; + int option = 0; + int lwopts = LW_GML_IS_DIMS; + int precision = OUT_MAX_DOUBLE_PRECISION; + static const char* default_prefix = "gml:"; /* default prefix */ + char *prefixbuf; + const char* prefix = default_prefix; + text *prefix_text; + + /* Get the version */ + version = PG_GETARG_INT32(0); + if ( version != 2 && version != 3 ) + { + elog(ERROR, "Only GML 2 and GML 3 are supported"); + PG_RETURN_NULL(); + } + + /* Get the geometry */ + if ( PG_ARGISNULL(1) ) PG_RETURN_NULL(); + geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + + /* Retrieve precision if any (default is max) */ + if (PG_NARGS() >2 && !PG_ARGISNULL(2)) + { + precision = PG_GETARG_INT32(2); + if ( precision > OUT_MAX_DOUBLE_PRECISION ) + precision = OUT_MAX_DOUBLE_PRECISION; + else if ( precision < 0 ) precision = 0; + } + + /* retrieve option */ + if (PG_NARGS() >3 && !PG_ARGISNULL(3)) + option = PG_GETARG_INT32(3); + + /* retrieve prefix */ + if (PG_NARGS() >4 && !PG_ARGISNULL(4)) + { + prefix_text = PG_GETARG_TEXT_P(4); + if ( VARSIZE(prefix_text)-VARHDRSZ == 0 ) + { + prefix = ""; + } + else + { + /* +2 is one for the ':' and one for term null */ + prefixbuf = palloc(VARSIZE(prefix_text)-VARHDRSZ+2); + memcpy(prefixbuf, VARDATA(prefix_text), + VARSIZE(prefix_text)-VARHDRSZ); + /* add colon and null terminate */ + prefixbuf[VARSIZE(prefix_text)-VARHDRSZ] = ':'; + prefixbuf[VARSIZE(prefix_text)-VARHDRSZ+1] = '\0'; + prefix = prefixbuf; + } + } + + srid = gserialized_get_srid(geom); + if (srid == SRID_UNKNOWN) srs = NULL; + else if (option & 1) srs = getSRSbySRID(srid, false); + else srs = getSRSbySRID(srid, true); + + if (option & 2) lwopts &= ~LW_GML_IS_DIMS; + if (option & 4) lwopts |= LW_GML_SHORTLINE; + if (option & 16) lwopts |= LW_GML_IS_DEGREE; + if (option & 32) lwopts |= LW_GML_EXTENT; + + lwgeom = lwgeom_from_gserialized(geom); + + if (version == 2 && lwopts & LW_GML_EXTENT) + gml = lwgeom_extent_to_gml2(lwgeom, srs, precision, prefix); + else if (version == 2) + gml = lwgeom_to_gml2(lwgeom, srs, precision, prefix); + else if (version == 3 && lwopts & LW_GML_EXTENT) + gml = lwgeom_extent_to_gml3(lwgeom, srs, precision, lwopts, prefix); + else if (version == 3) + gml = lwgeom_to_gml3(lwgeom, srs, precision, lwopts, prefix); + + lwgeom_free(lwgeom); + PG_FREE_IF_COPY(geom, 1); + + /* Return null on null */ + if ( ! gml ) + PG_RETURN_NULL(); + + result = cstring2text(gml); + lwfree(gml); + PG_RETURN_TEXT_P(result); +} + + +/** + * Encode feature in KML + */ +PG_FUNCTION_INFO_V1(LWGEOM_asKML); +Datum LWGEOM_asKML(PG_FUNCTION_ARGS) +{ + GSERIALIZED *geom; + LWGEOM *lwgeom; + char *kml; + text *result; + int version; + int precision = OUT_MAX_DOUBLE_PRECISION; + static const char* default_prefix = ""; /* default prefix */ + char *prefixbuf; + const char* prefix = default_prefix; + text *prefix_text; + + + /* Get the version */ + version = PG_GETARG_INT32(0); + if ( version != 2) + { + elog(ERROR, "Only KML 2 is supported"); + PG_RETURN_NULL(); + } + + /* Get the geometry */ + if ( PG_ARGISNULL(1) ) PG_RETURN_NULL(); + geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + + /* Retrieve precision if any (default is max) */ + if (PG_NARGS() >2 && !PG_ARGISNULL(2)) + { + precision = PG_GETARG_INT32(2); + if ( precision > OUT_MAX_DOUBLE_PRECISION ) + precision = OUT_MAX_DOUBLE_PRECISION; + else if ( precision < 0 ) precision = 0; + } + + /* retrieve prefix */ + if (PG_NARGS() >3 && !PG_ARGISNULL(3)) + { + prefix_text = PG_GETARG_TEXT_P(3); + if ( VARSIZE(prefix_text)-VARHDRSZ == 0 ) + { + prefix = ""; + } + else + { + /* +2 is one for the ':' and one for term null */ + prefixbuf = palloc(VARSIZE(prefix_text)-VARHDRSZ+2); + memcpy(prefixbuf, VARDATA(prefix_text), + VARSIZE(prefix_text)-VARHDRSZ); + /* add colon and null terminate */ + prefixbuf[VARSIZE(prefix_text)-VARHDRSZ] = ':'; + prefixbuf[VARSIZE(prefix_text)-VARHDRSZ+1] = '\0'; + prefix = prefixbuf; + } + } + + lwgeom = lwgeom_from_gserialized(geom); + kml = lwgeom_to_kml2(lwgeom, precision, prefix); + lwgeom_free(lwgeom); + PG_FREE_IF_COPY(geom, 1); + + if( ! kml ) + PG_RETURN_NULL(); + + result = cstring2text(kml); + lwfree(kml); + + PG_RETURN_POINTER(result); +} + + +/** + * Encode Feature in GeoJson + */ +PG_FUNCTION_INFO_V1(LWGEOM_asGeoJson); +Datum LWGEOM_asGeoJson(PG_FUNCTION_ARGS) +{ + GSERIALIZED *geom; + LWGEOM *lwgeom; + char *geojson; + text *result; + int srid; + int version; + int option = 0; + int has_bbox = 0; + int precision = OUT_MAX_DOUBLE_PRECISION; + char * srs = NULL; + + /* Get the version */ + version = PG_GETARG_INT32(0); + if ( version != 1) + { + elog(ERROR, "Only GeoJSON 1 is supported"); + PG_RETURN_NULL(); + } + + /* Get the geometry */ + if (PG_ARGISNULL(1) ) PG_RETURN_NULL(); + geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + + /* Retrieve precision if any (default is max) */ + if (PG_NARGS() >2 && !PG_ARGISNULL(2)) + { + precision = PG_GETARG_INT32(2); + if ( precision > OUT_MAX_DOUBLE_PRECISION ) + precision = OUT_MAX_DOUBLE_PRECISION; + else if ( precision < 0 ) precision = 0; + } + + /* Retrieve output option + * 0 = without option (default) + * 1 = bbox + * 2 = short crs + * 4 = long crs + */ + if (PG_NARGS() >3 && !PG_ARGISNULL(3)) + option = PG_GETARG_INT32(3); + + if (option & 2 || option & 4) + { + srid = gserialized_get_srid(geom); + if ( srid != SRID_UNKNOWN ) + { + if (option & 2) srs = getSRSbySRID(srid, true); + if (option & 4) srs = getSRSbySRID(srid, false); + if (!srs) + { + elog( ERROR, + "SRID %i unknown in spatial_ref_sys table", + srid); + PG_RETURN_NULL(); + } + } + } + + if (option & 1) has_bbox = 1; + + lwgeom = lwgeom_from_gserialized(geom); + geojson = lwgeom_to_geojson(lwgeom, srs, precision, has_bbox); + lwgeom_free(lwgeom); + + PG_FREE_IF_COPY(geom, 1); + if (srs) pfree(srs); + + result = cstring2text(geojson); + + lwfree(geojson); + + PG_RETURN_TEXT_P(result); +} + + +/** + * SVG features + */ +PG_FUNCTION_INFO_V1(LWGEOM_asSVG); +Datum LWGEOM_asSVG(PG_FUNCTION_ARGS) +{ + GSERIALIZED *geom; + LWGEOM *lwgeom; + char *svg; + text *result; + int relative = 0; + int precision=OUT_MAX_DOUBLE_PRECISION; + + if ( PG_ARGISNULL(0) ) PG_RETURN_NULL(); + + geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + + /* check for relative path notation */ + if ( PG_NARGS() > 1 && ! PG_ARGISNULL(1) ) + relative = PG_GETARG_INT32(1) ? 1:0; + + if ( PG_NARGS() > 2 && ! PG_ARGISNULL(2) ) + { + precision = PG_GETARG_INT32(2); + if ( precision > OUT_MAX_DOUBLE_PRECISION ) + precision = OUT_MAX_DOUBLE_PRECISION; + else if ( precision < 0 ) precision = 0; + } + + lwgeom = lwgeom_from_gserialized(geom); + svg = lwgeom_to_svg(lwgeom, precision, relative); + result = cstring2text(svg); + lwgeom_free(lwgeom); + pfree(svg); + PG_FREE_IF_COPY(geom, 0); + + PG_RETURN_TEXT_P(result); +} + +/** + * Encode feature as X3D + */ +PG_FUNCTION_INFO_V1(LWGEOM_asX3D); +Datum LWGEOM_asX3D(PG_FUNCTION_ARGS) +{ + GSERIALIZED *geom; + LWGEOM *lwgeom; + char *x3d; + text *result; + int version; + char *srs; + int srid; + int option = 0; + int is_deegree = 0; + int is_dims = 1; + int precision = OUT_MAX_DOUBLE_PRECISION; + static const char* default_defid = "x3d:"; /* default defid */ + char *defidbuf; + const char* defid = default_defid; + text *defid_text; + + /* Get the version */ + version = PG_GETARG_INT32(0); + if ( version != 3 ) + { + elog(ERROR, "Only X3D version 3 are supported"); + PG_RETURN_NULL(); + } + + /* Get the geometry */ + if ( PG_ARGISNULL(1) ) PG_RETURN_NULL(); + geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + + /* Retrieve precision if any (default is max) */ + if (PG_NARGS() >2 && !PG_ARGISNULL(2)) + { + precision = PG_GETARG_INT32(2); + if ( precision > OUT_MAX_DOUBLE_PRECISION ) + precision = OUT_MAX_DOUBLE_PRECISION; + else if ( precision < 0 ) precision = 0; + } + + /* retrieve option */ + if (PG_NARGS() >3 && !PG_ARGISNULL(3)) + option = PG_GETARG_INT32(3); + + /* retrieve defid */ + if (PG_NARGS() >4 && !PG_ARGISNULL(4)) + { + defid_text = PG_GETARG_TEXT_P(4); + if ( VARSIZE(defid_text)-VARHDRSZ == 0 ) + { + defid = ""; + } + else + { + /* +2 is one for the ':' and one for term null */ + defidbuf = palloc(VARSIZE(defid_text)-VARHDRSZ+2); + memcpy(defidbuf, VARDATA(defid_text), + VARSIZE(defid_text)-VARHDRSZ); + /* add colon and null terminate */ + defidbuf[VARSIZE(defid_text)-VARHDRSZ] = ':'; + defidbuf[VARSIZE(defid_text)-VARHDRSZ+1] = '\0'; + defid = defidbuf; + } + } + + srid = gserialized_get_srid(geom); + if (srid == SRID_UNKNOWN) srs = NULL; + else if (option & 1) srs = getSRSbySRID(srid, false); + else srs = getSRSbySRID(srid, true); + + if (option & 2) is_dims = 0; + if (option & 16) is_deegree = 1; + + lwgeom = lwgeom_from_gserialized(geom); + + + x3d = lwgeom_to_x3d3(lwgeom, srs, precision,option, defid); + + lwgeom_free(lwgeom); + PG_FREE_IF_COPY(geom, 1); + + result = cstring2text(x3d); + lwfree(x3d); + + PG_RETURN_TEXT_P(result); +} diff -Nru postgis-1.5.3/postgis/lwgeom_export.h postgis-2.0.1/postgis/lwgeom_export.h --- postgis-1.5.3/postgis/lwgeom_export.h 2009-10-27 21:39:35.000000000 +0000 +++ postgis-2.0.1/postgis/lwgeom_export.h 2012-02-27 22:08:12.000000000 +0000 @@ -1,5 +1,5 @@ /********************************************************************** - * $Id:$ + * $Id: lwgeom_export.h 9324 2012-02-27 22:08:12Z pramsey $ * * PostGIS - Export functions for PostgreSQL/PostGIS * Copyright 2009 Olivier Courtin @@ -9,19 +9,5 @@ * **********************************************************************/ -/** - * Commons define and prototype function for all export functions - */ - -#define MAX_DOUBLE 1E15 -#define SHOW_DIGS_DOUBLE 20 -#define MAX_DOUBLE_PRECISION 15 -#define MAX_DIGS_DOUBLE (SHOW_DIGS_DOUBLE + 2) /* +2 mean add dot and sign */ - char * getSRSbySRID(int SRID, bool short_crs); - -char *geometry_to_geojson(uchar *srl, char *srs, bool has_bbox, int precision); -char *geometry_to_gml2(uchar *srl, char *srs, int precision); -char *geometry_to_gml3(uchar *srl, char *srs, int precision, bool is_deegree); -char *geometry_to_kml2(uchar *srl, int precision); -char *geometry_to_svg(uchar *srl, bool relative, int precision); +int getSRIDbySRS(const char* SRS); diff -Nru postgis-1.5.3/postgis/lwgeom_functions_analytic.c postgis-2.0.1/postgis/lwgeom_functions_analytic.c --- postgis-1.5.3/postgis/lwgeom_functions_analytic.c 2011-06-23 23:11:15.000000000 +0000 +++ postgis-2.0.1/postgis/lwgeom_functions_analytic.c 2012-03-19 12:07:39.000000000 +0000 @@ -1,9 +1,9 @@ /********************************************************************** - * $Id: lwgeom_functions_analytic.c 7460 2011-06-23 23:11:15Z chodgson $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net - * Copyright 2001-2005 Refractions Research Inc. + * + * Copyright (C) 2001-2005 Refractions Research Inc. * * This is free software; you can redistribute and/or modify it under * the terms of the GNU General Public Licence. See the COPYING file. @@ -13,10 +13,10 @@ #include "postgres.h" #include "fmgr.h" #include "liblwgeom.h" +#include "liblwgeom_internal.h" #include "lwgeom_pg.h" #include "math.h" #include "lwgeom_rtree.h" -#include "lwalgorithm.h" #include "lwgeom_functions_analytic.h" @@ -30,15 +30,8 @@ /* Prototypes */ -void DP_findsplit2d(POINTARRAY *pts, int p1, int p2, int *split, double *dist); -POINTARRAY *DP_simplify2d(POINTARRAY *inpts, double epsilon); -LWLINE *simplify2d_lwline(const LWLINE *iline, double dist); -LWPOLY *simplify2d_lwpoly(const LWPOLY *ipoly, double dist); -LWCOLLECTION *simplify2d_collection(const LWCOLLECTION *igeom, double dist); -LWGEOM *simplify2d_lwgeom(const LWGEOM *igeom, double dist); Datum LWGEOM_simplify2d(PG_FUNCTION_ARGS); Datum ST_LineCrossingDirection(PG_FUNCTION_ARGS); -Datum ST_LocateBetweenElevations(PG_FUNCTION_ARGS); double determineSide(POINT2D *seg1, POINT2D *seg2, POINT2D *point); int isOnSegment(POINT2D *seg1, POINT2D *seg2, POINT2D *point); @@ -46,274 +39,24 @@ int point_in_ring_rtree(RTREE_NODE *root, POINT2D *point); -/* - * Search farthest point from segment p1-p2 - * returns distance in an int pointer - */ -void -DP_findsplit2d(POINTARRAY *pts, int p1, int p2, int *split, double *dist) -{ - int k; - POINT2D pa, pb, pk; - double tmp; - - LWDEBUG(4, "DP_findsplit called"); - - *dist = -1; - *split = p1; - - if (p1 + 1 < p2) - { - - getPoint2d_p(pts, p1, &pa); - getPoint2d_p(pts, p2, &pb); - - LWDEBUGF(4, "DP_findsplit: P%d(%f,%f) to P%d(%f,%f)", - p1, pa.x, pa.y, p2, pb.x, pb.y); - - for (k=p1+1; k *dist) - { - *dist = tmp; /* record the maximum */ - *split = k; - - LWDEBUGF(4, "DP_findsplit: P%d is farthest (%g)", k, *dist); - } - } - - } /* length---should be redone if can == 0 */ - - else - { - LWDEBUG(3, "DP_findsplit: segment too short, no split/no dist"); - } - -} - - -POINTARRAY * -DP_simplify2d(POINTARRAY *inpts, double epsilon) -{ - int *stack; /* recursion stack */ - int sp=-1; /* recursion stack pointer */ - int p1, split; - double dist; - POINTARRAY *outpts; - int ptsize = pointArray_ptsize(inpts); - - /* Allocate recursion stack */ - stack = lwalloc(sizeof(int)*inpts->npoints); - - p1 = 0; - stack[++sp] = inpts->npoints-1; - - LWDEBUGF(2, "DP_simplify called input has %d pts and %d dims (ptsize: %d)", inpts->npoints, inpts->dims, ptsize); - - /* allocate space for output POINTARRAY */ - outpts = palloc(sizeof(POINTARRAY)); - outpts->dims = inpts->dims; - outpts->npoints=1; - outpts->serialized_pointlist = palloc(ptsize*inpts->npoints); - memcpy(getPoint_internal(outpts, 0), getPoint_internal(inpts, 0), - ptsize); - - LWDEBUG(3, "DP_simplify: added P0 to simplified point array (size 1)"); - - do - { - - DP_findsplit2d(inpts, p1, stack[sp], &split, &dist); - - LWDEBUGF(3, "DP_simplify: farthest point from P%d-P%d is P%d (dist. %g)", p1, stack[sp], split, dist); - - if (dist > epsilon) - { - stack[++sp] = split; - } - else - { - outpts->npoints++; - memcpy(getPoint_internal(outpts, outpts->npoints-1), - getPoint_internal(inpts, stack[sp]), - ptsize); - - LWDEBUGF(4, "DP_simplify: added P%d to simplified point array (size: %d)", stack[sp], outpts->npoints); - - p1 = stack[sp--]; - } - - LWDEBUGF(4, "stack pointer = %d", sp); - } - while (! (sp<0) ); - - /* - * If we have reduced the number of points realloc - * outpoints array to free up some memory. - * Might be turned on and off with a SAVE_MEMORY define ... - */ - if ( outpts->npoints < inpts->npoints ) - { - outpts->serialized_pointlist = repalloc( - outpts->serialized_pointlist, - ptsize*outpts->npoints); - if ( outpts->serialized_pointlist == NULL ) - { - elog(ERROR, "Out of virtual memory"); - } - } - - lwfree(stack); - return outpts; -} - -LWLINE * -simplify2d_lwline(const LWLINE *iline, double dist) -{ - POINTARRAY *ipts; - POINTARRAY *opts; - LWLINE *oline; - - LWDEBUG(2, "simplify2d_lwline called"); - - ipts = iline->points; - opts = DP_simplify2d(ipts, dist); - oline = lwline_construct(iline->SRID, NULL, opts); - - return oline; -} - -LWPOLY * -simplify2d_lwpoly(const LWPOLY *ipoly, double dist) -{ - POINTARRAY *ipts; - POINTARRAY **orings = NULL; - LWPOLY *opoly; - int norings=0, ri; - - LWDEBUGF(2, "simplify_polygon3d: simplifying polygon with %d rings", ipoly->nrings); - - orings = (POINTARRAY **)palloc(sizeof(POINTARRAY *)*ipoly->nrings); - - for (ri=0; rinrings; ri++) - { - POINTARRAY *opts; - - ipts = ipoly->rings[ri]; - - opts = DP_simplify2d(ipts, dist); - - - if ( opts->npoints < 2 ) - { - /* There as to be an error in DP_simplify */ - elog(NOTICE, "DP_simplify returned a <2 pts array"); - pfree(opts); - continue; - } - - if ( opts->npoints < 4 ) - { - pfree(opts); - - LWDEBUGF(3, "simplify_polygon3d: ring%d skipped ( <4 pts )", ri); - - if ( ri ) continue; - else break; - } - - - LWDEBUGF(3, "simplify_polygon3d: ring%d simplified from %d to %d points", ri, ipts->npoints, opts->npoints); - - - /* - * Add ring to simplified ring array - * (TODO: dinamic allocation of pts_per_ring) - */ - orings[norings] = opts; - norings++; - - } - - LWDEBUGF(3, "simplify_polygon3d: simplified polygon with %d rings", norings); - - if ( ! norings ) return NULL; - - opoly = lwpoly_construct(ipoly->SRID, NULL, norings, orings); - - return opoly; -} - -LWCOLLECTION * -simplify2d_collection(const LWCOLLECTION *igeom, double dist) -{ - unsigned int i; - unsigned int ngeoms=0; - LWGEOM **geoms = lwalloc(sizeof(LWGEOM *)*igeom->ngeoms); - LWCOLLECTION *out; - - for (i=0; ingeoms; i++) - { - LWGEOM *ngeom = simplify2d_lwgeom(igeom->geoms[i], dist); - if ( ngeom ) geoms[ngeoms++] = ngeom; - } - - out = lwcollection_construct(TYPE_GETTYPE(igeom->type), igeom->SRID, - NULL, ngeoms, geoms); - - return out; -} - -LWGEOM * -simplify2d_lwgeom(const LWGEOM *igeom, double dist) -{ - switch (TYPE_GETTYPE(igeom->type)) - { - case POINTTYPE: - case MULTIPOINTTYPE: - return lwgeom_clone(igeom); - case LINETYPE: - return (LWGEOM *)simplify2d_lwline( - (LWLINE *)igeom, dist); - case POLYGONTYPE: - return (LWGEOM *)simplify2d_lwpoly( - (LWPOLY *)igeom, dist); - case MULTILINETYPE: - case MULTIPOLYGONTYPE: - case COLLECTIONTYPE: - return (LWGEOM *)simplify2d_collection( - (LWCOLLECTION *)igeom, dist); - default: - lwerror("simplify2d_lwgeom: unknown geometry type: %d", - TYPE_GETTYPE(igeom->type)); - } - return NULL; -} - PG_FUNCTION_INFO_V1(LWGEOM_simplify2d); Datum LWGEOM_simplify2d(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - LWGEOM *in = lwgeom_deserialize(SERIALIZED_FORM(geom)); + GSERIALIZED *geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *result; + LWGEOM *in = lwgeom_from_gserialized(geom); LWGEOM *out; - PG_LWGEOM *result; double dist = PG_GETARG_FLOAT8(1); - out = simplify2d_lwgeom(in, dist); + out = lwgeom_simplify(in, dist); if ( ! out ) PG_RETURN_NULL(); /* COMPUTE_BBOX TAINTING */ if ( in->bbox ) lwgeom_add_bbox(out); - result = pglwgeom_serialize(out); - + result = geometry_serialize(out); + lwgeom_free(out); + PG_FREE_IF_COPY(geom, 0); PG_RETURN_POINTER(result); } @@ -336,13 +79,13 @@ PG_FUNCTION_INFO_V1(LWGEOM_line_interpolate_point); Datum LWGEOM_line_interpolate_point(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *gser = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); double distance = PG_GETARG_FLOAT8(1); LWLINE *line; + LWGEOM *geom; LWPOINT *point; POINTARRAY *ipa, *opa; POINT4D pt; - uchar *srl; int nsegs, i; double length, slength, tlength; @@ -352,13 +95,14 @@ PG_RETURN_NULL(); } - if ( lwgeom_getType(geom->type) != LINETYPE ) + if ( gserialized_get_type(gser) != LINETYPE ) { elog(ERROR,"line_interpolate_point: 1st arg isnt a line"); PG_RETURN_NULL(); } - line = lwline_deserialize(SERIALIZED_FORM(geom)); + geom = lwgeom_from_gserialized(gser); + line = lwgeom_as_lwline(geom); ipa = line->points; /* If distance is one of the two extremes, return the point on that @@ -371,20 +115,16 @@ else getPoint4d_p(ipa, ipa->npoints-1, &pt); - opa = pointArray_construct((uchar *)&pt, - TYPE_HASZ(line->type), - TYPE_HASM(line->type), - 1); - point = lwpoint_construct(line->SRID, 0, opa); - srl = lwpoint_serialize(point); - /* We shouldn't need this, the memory context is getting freed on the next line. - lwpoint_free(point); */ - PG_RETURN_POINTER(PG_LWGEOM_construct(srl, line->SRID, 0)); + opa = ptarray_construct(lwgeom_has_z(geom), lwgeom_has_m(geom), 1); + ptarray_set_point4d(opa, 0, &pt); + + point = lwpoint_construct(line->srid, NULL, opa); + PG_RETURN_POINTER(geometry_serialize(lwpoint_as_lwgeom(point))); } /* Interpolate a point on the line */ nsegs = ipa->npoints - 1; - length = lwgeom_pointarray_length2d(ipa); + length = ptarray_length_2d(ipa); tlength = 0; for ( i = 0; i < nsegs; i++ ) { @@ -407,15 +147,10 @@ { double dseg = (distance - tlength) / slength; interpolate_point4d(&p1, &p2, &pt, dseg); - opa = pointArray_construct((uchar *)&pt, - TYPE_HASZ(line->type), - TYPE_HASM(line->type), - 1); - point = lwpoint_construct(line->SRID, 0, opa); - srl = lwpoint_serialize(point); - /* We shouldn't need this, the memory context is getting freed on the next line - lwpoint_free(point); */ - PG_RETURN_POINTER(PG_LWGEOM_construct(srl, line->SRID, 0)); + opa = ptarray_construct(lwgeom_has_z(geom), lwgeom_has_m(geom), 1); + ptarray_set_point4d(opa, 0, &pt); + point = lwpoint_construct(line->srid, NULL, opa); + PG_RETURN_POINTER(geometry_serialize(lwpoint_as_lwgeom(point))); } tlength += slength; } @@ -423,15 +158,11 @@ /* Return the last point on the line. This shouldn't happen, but * could if there's some floating point rounding errors. */ getPoint4d_p(ipa, ipa->npoints-1, &pt); - opa = pointArray_construct((uchar *)&pt, - TYPE_HASZ(line->type), - TYPE_HASM(line->type), - 1); - point = lwpoint_construct(line->SRID, 0, opa); - srl = lwpoint_serialize(point); - /* We shouldn't need this, the memory context is getting freed on the next line - lwpoint_free(point); */ - PG_RETURN_POINTER(PG_LWGEOM_construct(srl, line->SRID, 0)); + opa = ptarray_construct(lwgeom_has_z(geom), lwgeom_has_m(geom), 1); + ptarray_set_point4d(opa, 0, &pt); + point = lwpoint_construct(line->srid, NULL, opa); + PG_FREE_IF_COPY(gser, 0); + PG_RETURN_POINTER(geometry_serialize(lwpoint_as_lwgeom(point))); } /*********************************************************************** * --jsunday@rochgrp.com; @@ -513,11 +244,12 @@ LWPOINT * lwpoint_grid(LWPOINT *point, gridspec *grid); LWPOLY * lwpoly_grid(LWPOLY *poly, gridspec *grid); LWLINE *lwline_grid(LWLINE *line, gridspec *grid); +LWCIRCSTRING *lwcirc_grid(LWCIRCSTRING *line, gridspec *grid); POINTARRAY *ptarray_grid(POINTARRAY *pa, gridspec *grid); Datum LWGEOM_snaptogrid(PG_FUNCTION_ARGS); Datum LWGEOM_snaptogrid_pointoff(PG_FUNCTION_ARGS); static int grid_isNull(const gridspec *grid); -#if POSTGIS_DEBUG_LEVEL > 0 +#if POSTGIS_DEBUG_LEVEL >=4 static void grid_print(const gridspec *grid); #endif @@ -532,7 +264,7 @@ else return 0; } -#if POSTGIS_DEBUG_LEVEL > 0 +#if POSTGIS_DEBUG_LEVEL >= 4 /* Print grid using given reporter */ static void grid_print(const gridspec *grid) @@ -556,12 +288,11 @@ { POINT4D pbuf; int ipn, opn; /* point numbers (input/output) */ - DYNPTARRAY *dpa; - POINTARRAY *opa; + POINTARRAY *dpa; - LWDEBUGF(2, "ptarray_grid called on %p", pa); + POSTGIS_DEBUGF(2, "ptarray_grid called on %p", pa); - dpa=dynptarray_create(pa->npoints, pa->dims); + dpa = ptarray_construct_empty(FLAGS_GET_Z(pa->flags),FLAGS_GET_M(pa->flags), pa->npoints); for (ipn=0, opn=0; ipnnpoints; ++ipn) { @@ -576,22 +307,19 @@ pbuf.y = rint((pbuf.y - grid->ipy)/grid->ysize) * grid->ysize + grid->ipy; - if ( TYPE_HASZ(pa->dims) && grid->zsize ) + if ( FLAGS_GET_Z(pa->flags) && grid->zsize ) pbuf.z = rint((pbuf.z - grid->ipz)/grid->zsize) * grid->zsize + grid->ipz; - if ( TYPE_HASM(pa->dims) && grid->msize ) + if ( FLAGS_GET_M(pa->flags) && grid->msize ) pbuf.m = rint((pbuf.m - grid->ipm)/grid->msize) * grid->msize + grid->ipm; - dynptarray_addPoint4d(dpa, &pbuf, 0); + ptarray_append_point(dpa, &pbuf, LW_FALSE); } - opa = dpa->pa; - lwfree(dpa); - - return opa; + return dpa; } LWLINE * @@ -606,7 +334,24 @@ if ( opa->npoints < 2 ) return NULL; /* TODO: grid bounding box... */ - oline = lwline_construct(line->SRID, NULL, opa); + oline = lwline_construct(line->srid, NULL, opa); + + return oline; +} + +LWCIRCSTRING * +lwcirc_grid(LWCIRCSTRING *line, gridspec *grid) +{ + LWCIRCSTRING *oline; + POINTARRAY *opa; + + opa = ptarray_grid(line->points, grid); + + /* Skip line3d with less then 2 points */ + if ( opa->npoints < 2 ) return NULL; + + /* TODO: grid bounding box... */ + oline = lwcircstring_construct(line->srid, NULL, opa); return oline; } @@ -630,7 +375,7 @@ nrings = 0; - LWDEBUGF(3, "grid_polygon3d: applying grid to polygon with %d rings", + POSTGIS_DEBUGF(3, "grid_polygon3d: applying grid to polygon with %d rings", poly->nrings); for (ri=0; rinrings; ri++) @@ -643,7 +388,7 @@ getPoint2d_p(ring, 0, &p1); getPoint2d_p(ring, ring->npoints-1, &p2); if ( ! SAMEPOINT(&p1, &p2) ) - LWDEBUG(4, "Before gridding: first point != last point"); + POSTGIS_DEBUG(4, "Before gridding: first point != last point"); #endif newring = ptarray_grid(ring, grid); @@ -653,7 +398,7 @@ { pfree(newring); - LWDEBUGF(3, "grid_polygon3d: ring%d skipped ( <4 pts )", ri); + POSTGIS_DEBUGF(3, "grid_polygon3d: ring%d skipped ( <4 pts )", ri); if ( ri ) continue; else break; /* this is the external ring, no need to work on holes */ @@ -663,10 +408,10 @@ getPoint2d_p(newring, 0, &p1); getPoint2d_p(newring, newring->npoints-1, &p2); if ( ! SAMEPOINT(&p1, &p2) ) - LWDEBUG(4, "After gridding: first point != last point"); + POSTGIS_DEBUG(4, "After gridding: first point != last point"); #endif - LWDEBUGF(3, "grid_polygon3d: ring%d simplified from %d to %d points", ri, + POSTGIS_DEBUGF(3, "grid_polygon3d: ring%d simplified from %d to %d points", ri, ring->npoints, newring->npoints); /* @@ -689,11 +434,11 @@ newrings[nrings++] = newring; } - LWDEBUGF(3, "grid_polygon3d: simplified polygon with %d rings", nrings); + POSTGIS_DEBUGF(3, "grid_polygon3d: simplified polygon with %d rings", nrings); if ( ! nrings ) return NULL; - opoly = lwpoly_construct(poly->SRID, NULL, nrings, newrings); + opoly = lwpoly_construct(poly->srid, NULL, nrings, newrings); return opoly; } @@ -706,9 +451,9 @@ opa = ptarray_grid(point->point, grid); /* TODO: grid bounding box ? */ - opoint = lwpoint_construct(point->SRID, NULL, opa); + opoint = lwpoint_construct(point->srid, NULL, opa); - LWDEBUG(2, "lwpoint_grid called"); + POSTGIS_DEBUG(2, "lwpoint_grid called"); return opoint; } @@ -716,9 +461,9 @@ LWCOLLECTION * lwcollection_grid(LWCOLLECTION *coll, gridspec *grid) { - unsigned int i; + uint32 i; LWGEOM **geoms; - unsigned int ngeoms=0; + uint32 ngeoms=0; geoms = palloc(coll->ngeoms * sizeof(LWGEOM *)); @@ -728,16 +473,16 @@ if ( g ) geoms[ngeoms++] = g; } - if ( ! ngeoms ) return lwcollection_construct_empty(coll->SRID, 0, 0); + if ( ! ngeoms ) return lwcollection_construct_empty(coll->type, coll->srid, 0, 0); - return lwcollection_construct(TYPE_GETTYPE(coll->type), coll->SRID, + return lwcollection_construct(coll->type, coll->srid, NULL, ngeoms, geoms); } LWGEOM * lwgeom_grid(LWGEOM *lwgeom, gridspec *grid) { - switch (TYPE_GETTYPE(lwgeom->type)) + switch (lwgeom->type) { case POINTTYPE: return (LWGEOM *)lwpoint_grid((LWPOINT *)lwgeom, grid); @@ -749,10 +494,13 @@ case MULTILINETYPE: case MULTIPOLYGONTYPE: case COLLECTIONTYPE: + case COMPOUNDTYPE: return (LWGEOM *)lwcollection_grid((LWCOLLECTION *)lwgeom, grid); + case CIRCSTRINGTYPE: + return (LWGEOM *)lwcirc_grid((LWCIRCSTRING *)lwgeom, grid); default: elog(ERROR, "lwgeom_grid: Unsupported geometry type: %s", - lwgeom_typename(TYPE_GETTYPE(lwgeom->type))); + lwtype_name(lwgeom->type)); return NULL; } } @@ -761,16 +509,16 @@ Datum LWGEOM_snaptogrid(PG_FUNCTION_ARGS) { Datum datum; - PG_LWGEOM *in_geom; + GSERIALIZED *in_geom; LWGEOM *in_lwgeom; - PG_LWGEOM *out_geom = NULL; + GSERIALIZED *out_geom = NULL; LWGEOM *out_lwgeom; gridspec grid; /* BOX3D box3d; */ if ( PG_ARGISNULL(0) ) PG_RETURN_NULL(); datum = PG_GETARG_DATUM(0); - in_geom = (PG_LWGEOM *)PG_DETOAST_DATUM(datum); + in_geom = (GSERIALIZED *)PG_DETOAST_DATUM(datum); if ( PG_ARGISNULL(1) ) PG_RETURN_NULL(); grid.ipx = PG_GETARG_FLOAT8(1); @@ -787,15 +535,15 @@ /* Do not support gridding Z and M values for now */ grid.ipz=grid.ipm=grid.zsize=grid.msize=0; - /* Return input geometry if grid is null */ - if ( grid_isNull(&grid) ) + /* Return input geometry if grid is null or input geometry is empty */ + if ( grid_isNull(&grid) || gserialized_is_empty(in_geom) ) { PG_RETURN_POINTER(in_geom); } - in_lwgeom = lwgeom_deserialize(SERIALIZED_FORM(in_geom)); + in_lwgeom = lwgeom_from_gserialized(in_geom); - POSTGIS_DEBUGF(3, "SnapToGrid got a %s", lwgeom_typename(TYPE_GETTYPE(in_lwgeom->type))); + POSTGIS_DEBUGF(3, "SnapToGrid got a %s", lwtype_name(in_lwgeom->type)); out_lwgeom = lwgeom_grid(in_lwgeom, &grid); if ( out_lwgeom == NULL ) PG_RETURN_NULL(); @@ -803,37 +551,10 @@ /* COMPUTE_BBOX TAINTING */ if ( in_lwgeom->bbox ) lwgeom_add_bbox(out_lwgeom); -#if 0 - /* - * COMPUTE_BBOX WHEN SIMPLE - * - * WARNING: this is not SIMPLE, as snapping - * an existing bbox to a grid does not - * give the same result as computing a - * new bounding box on the snapped coordinates. - * - * This bug has been fixed in postgis-1.1.2 - */ - if ( in_lwgeom->bbox ) - { - box2df_to_box3d_p(in_lwgeom->bbox, &box3d); - box3d.xmin = rint((box3d.xmin - grid.ipx)/grid.xsize) - * grid.xsize + grid.ipx; - box3d.xmax = rint((box3d.xmax - grid.ipx)/grid.xsize) - * grid.xsize + grid.ipx; - box3d.ymin = rint((box3d.ymin - grid.ipy)/grid.ysize) - * grid.ysize + grid.ipy; - box3d.ymax = rint((box3d.ymax - grid.ipy)/grid.ysize) - * grid.ysize + grid.ipy; + POSTGIS_DEBUGF(3, "SnapToGrid made a %s", lwtype_name(out_lwgeom->type)); - out_lwgeom->bbox = box3d_to_box2df(&box3d); - } -#endif /* 0 */ - - POSTGIS_DEBUGF(3, "SnapToGrid made a %s", lwgeom_typename(TYPE_GETTYPE(out_lwgeom->type))); - - out_geom = pglwgeom_serialize(out_lwgeom); + out_geom = geometry_serialize(out_lwgeom); PG_RETURN_POINTER(out_geom); } @@ -842,10 +563,10 @@ Datum LWGEOM_snaptogrid_pointoff(PG_FUNCTION_ARGS) { Datum datum; - PG_LWGEOM *in_geom, *in_point; + GSERIALIZED *in_geom, *in_point; LWGEOM *in_lwgeom; LWPOINT *in_lwpoint; - PG_LWGEOM *out_geom = NULL; + GSERIALIZED *out_geom = NULL; LWGEOM *out_lwgeom; gridspec grid; /* BOX3D box3d; */ @@ -853,12 +574,12 @@ if ( PG_ARGISNULL(0) ) PG_RETURN_NULL(); datum = PG_GETARG_DATUM(0); - in_geom = (PG_LWGEOM *)PG_DETOAST_DATUM(datum); + in_geom = (GSERIALIZED *)PG_DETOAST_DATUM(datum); if ( PG_ARGISNULL(1) ) PG_RETURN_NULL(); datum = PG_GETARG_DATUM(1); - in_point = (PG_LWGEOM *)PG_DETOAST_DATUM(datum); - in_lwpoint = lwpoint_deserialize(SERIALIZED_FORM(in_point)); + in_point = (GSERIALIZED *)PG_DETOAST_DATUM(datum); + in_lwpoint = lwgeom_as_lwpoint(lwgeom_from_gserialized(in_point)); if ( in_lwpoint == NULL ) { lwerror("Offset geometry must be a point"); @@ -880,9 +601,9 @@ getPoint4d_p(in_lwpoint->point, 0, &offsetpoint); grid.ipx = offsetpoint.x; grid.ipy = offsetpoint.y; - if (TYPE_HASZ(in_lwpoint->type) ) grid.ipz = offsetpoint.z; + if (FLAGS_GET_Z(in_lwpoint->flags) ) grid.ipz = offsetpoint.z; else grid.ipz=0; - if (TYPE_HASM(in_lwpoint->type) ) grid.ipm = offsetpoint.m; + if (FLAGS_GET_M(in_lwpoint->flags) ) grid.ipm = offsetpoint.m; else grid.ipm=0; #if POSTGIS_DEBUG_LEVEL >= 4 @@ -895,9 +616,9 @@ PG_RETURN_POINTER(in_geom); } - in_lwgeom = lwgeom_deserialize(SERIALIZED_FORM(in_geom)); + in_lwgeom = lwgeom_from_gserialized(in_geom); - POSTGIS_DEBUGF(3, "SnapToGrid got a %s", lwgeom_typename(TYPE_GETTYPE(in_lwgeom->type))); + POSTGIS_DEBUGF(3, "SnapToGrid got a %s", lwtype_name(in_lwgeom->type)); out_lwgeom = lwgeom_grid(in_lwgeom, &grid); if ( out_lwgeom == NULL ) PG_RETURN_NULL(); @@ -905,37 +626,9 @@ /* COMPUTE_BBOX TAINTING */ if ( in_lwgeom->bbox ) lwgeom_add_bbox(out_lwgeom); -#if 0 - /* - * COMPUTE_BBOX WHEN SIMPLE - * - * WARNING: this is not SIMPLE, as snapping - * an existing bbox to a grid does not - * give the same result as computing a - * new bounding box on the snapped coordinates. - * - * This bug has been fixed in postgis-1.1.2 - */ - if ( in_lwgeom->bbox ) - { - box2df_to_box3d_p(in_lwgeom->bbox, &box3d); + POSTGIS_DEBUGF(3, "SnapToGrid made a %s", lwtype_name(out_lwgeom->type)); - box3d.xmin = rint((box3d.xmin - grid.ipx)/grid.xsize) - * grid.xsize + grid.ipx; - box3d.xmax = rint((box3d.xmax - grid.ipx)/grid.xsize) - * grid.xsize + grid.ipx; - box3d.ymin = rint((box3d.ymin - grid.ipy)/grid.ysize) - * grid.ysize + grid.ipy; - box3d.ymax = rint((box3d.ymax - grid.ipy)/grid.ysize) - * grid.ysize + grid.ipy; - - out_lwgeom->bbox = box3d_to_box2df(&box3d); - } -#endif /* 0 */ - - POSTGIS_DEBUGF(3, "SnapToGrid made a %s", lwgeom_typename(TYPE_GETTYPE(out_lwgeom->type))); - - out_geom = pglwgeom_serialize(out_lwgeom); + out_geom = geometry_serialize(out_lwgeom); PG_RETURN_POINTER(out_geom); } @@ -945,36 +638,21 @@ ** crossingDirection(line1, line2) ** ** Determines crossing direction of line2 relative to line1. -** Only accepts LINESTRING ass parameters! +** Only accepts LINESTRING as parameters! */ PG_FUNCTION_INFO_V1(ST_LineCrossingDirection); Datum ST_LineCrossingDirection(PG_FUNCTION_ARGS) { int type1, type2, rv; - BOX2DFLOAT4 box1, box2; LWLINE *l1 = NULL; LWLINE *l2 = NULL; - PG_LWGEOM *geom1 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_LWGEOM *geom2 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - - errorIfSRIDMismatch(pglwgeom_getSRID(geom1), pglwgeom_getSRID(geom2)); + GSERIALIZED *geom1 = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *geom2 = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - /* - ** If the bounding boxes don't interact, then there can't be any - ** crossing, return right away. - */ - if ( getbox2d_p(SERIALIZED_FORM(geom1), &box1) && - getbox2d_p(SERIALIZED_FORM(geom2), &box2) ) - { - if ( ( box2.xmax < box1.xmin ) || ( box2.xmin > box1.xmax ) || - ( box2.ymax < box1.ymin ) || ( box2.ymin > box1.ymax ) ) - { - PG_RETURN_INT32(LINE_NO_CROSS); - } - } + error_if_srid_mismatch(gserialized_get_srid(geom1), gserialized_get_srid(geom2)); - type1 = lwgeom_getType((uchar)SERIALIZED_FORM(geom1)[0]); - type2 = lwgeom_getType((uchar)SERIALIZED_FORM(geom2)[0]); + type1 = gserialized_get_type(geom1); + type2 = gserialized_get_type(geom2); if ( type1 != LINETYPE || type2 != LINETYPE ) { @@ -982,8 +660,8 @@ PG_RETURN_NULL(); } - l1 = lwline_deserialize(SERIALIZED_FORM(geom1)); - l2 = lwline_deserialize(SERIALIZED_FORM(geom2)); + l1 = lwgeom_as_lwline(lwgeom_from_gserialized(geom1)); + l2 = lwgeom_as_lwline(lwgeom_from_gserialized(geom2)); rv = lwline_crossing_direction(l1, l2); @@ -994,51 +672,7 @@ } -PG_FUNCTION_INFO_V1(ST_LocateBetweenElevations); -Datum ST_LocateBetweenElevations(PG_FUNCTION_ARGS) -{ - PG_LWGEOM *geom_in = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - double from = PG_GETARG_FLOAT8(1); - double to = PG_GETARG_FLOAT8(2); - LWCOLLECTION *geom_out = NULL; - LWGEOM *line_in = NULL; - uchar type = (uchar)SERIALIZED_FORM(geom_in)[0]; - char geomtype = TYPE_GETTYPE(type); - char hasz = TYPE_HASZ(type); - static int ordinate = 2; /* Z */ - if ( ! ( geomtype == LINETYPE || geomtype == MULTILINETYPE ) ) - { - elog(ERROR,"This function only accepts LINESTRING or MULTILINESTRING as arguments."); - PG_RETURN_NULL(); - } - - if ( ! hasz ) - { - elog(ERROR,"This function only accepts LINESTRING or MULTILINESTRING with Z values as arguments."); - PG_RETURN_NULL(); - } - - line_in = lwgeom_deserialize(SERIALIZED_FORM(geom_in)); - if ( geomtype == LINETYPE ) - { - geom_out = lwline_clip_to_ordinate_range((LWLINE*)line_in, ordinate, from, to); - } - else if ( geomtype == MULTILINETYPE ) - { - geom_out = lwmline_clip_to_ordinate_range((LWMLINE*)line_in, ordinate, from, to); - } - lwgeom_free(line_in); - - if ( ! geom_out ) - { - elog(ERROR,"The lwline_clip_to_ordinate_range returned null."); - PG_RETURN_NULL(); - } - - PG_FREE_IF_COPY(geom_in, 0); - PG_RETURN_POINTER(pglwgeom_serialize((LWGEOM*)geom_out)); -} /*********************************************************************** * --strk@keybit.net @@ -1049,13 +683,13 @@ PG_FUNCTION_INFO_V1(LWGEOM_line_substring); Datum LWGEOM_line_substring(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); double from = PG_GETARG_FLOAT8(1); double to = PG_GETARG_FLOAT8(2); LWGEOM *olwgeom; POINTARRAY *ipa, *opa; - PG_LWGEOM *ret; - uchar type = geom->type; + GSERIALIZED *ret; + int type = gserialized_get_type(geom); if ( from < 0 || from > 1 ) { @@ -1075,13 +709,11 @@ PG_RETURN_NULL(); } - if ( TYPE_GETTYPE(type) == LINETYPE ) + if ( type == LINETYPE ) { - LWLINE *iline; - - iline = lwline_deserialize(SERIALIZED_FORM(geom)); + LWLINE *iline = lwgeom_as_lwline(lwgeom_from_gserialized(geom)); - if( lwgeom_is_empty((LWGEOM*)iline) ) + if ( lwgeom_is_empty((LWGEOM*)iline) ) { /* TODO return empty line */ lwline_release(iline); @@ -1091,25 +723,25 @@ ipa = iline->points; - opa = ptarray_substring(ipa, from, to); + opa = ptarray_substring(ipa, from, to, 0); if ( opa->npoints == 1 ) /* Point returned */ - olwgeom = (LWGEOM *)lwpoint_construct(iline->SRID, NULL, opa); + olwgeom = (LWGEOM *)lwpoint_construct(iline->srid, NULL, opa); else - olwgeom = (LWGEOM *)lwline_construct(iline->SRID, NULL, opa); + olwgeom = (LWGEOM *)lwline_construct(iline->srid, NULL, opa); } - else if ( TYPE_GETTYPE(type) == MULTILINETYPE ) + else if ( type == MULTILINETYPE ) { - LWMLINE *iline; + LWMLINE *iline; int i = 0, g = 0; int homogeneous = LW_TRUE; LWGEOM **geoms = NULL; double length = 0.0, sublength = 0.0, minprop = 0.0, maxprop = 0.0; - - iline = lwmline_deserialize(SERIALIZED_FORM(geom)); - - if( lwgeom_is_empty((LWGEOM*)iline) ) + + iline = lwgeom_as_lwmline(lwgeom_from_gserialized(geom)); + + if ( lwgeom_is_empty((LWGEOM*)iline) ) { /* TODO return empty collection */ lwmline_release(iline); @@ -1122,118 +754,78 @@ { LWLINE *subline = (LWLINE*)iline->geoms[i]; if ( subline->points && subline->points->npoints > 1 ) - length += lwgeom_pointarray_length2d(subline->points); + length += ptarray_length_2d(subline->points); } - + geoms = lwalloc(sizeof(LWGEOM*) * iline->ngeoms); - + /* Slice each sub-geometry of the multiline */ - for( i = 0; i < iline->ngeoms; i++ ) + for ( i = 0; i < iline->ngeoms; i++ ) { LWLINE *subline = (LWLINE*)iline->geoms[i]; double subfrom = 0.0, subto = 0.0; - + if ( subline->points && subline->points->npoints > 1 ) - sublength += lwgeom_pointarray_length2d(subline->points); - + sublength += ptarray_length_2d(subline->points); + /* Calculate proportions for this subline */ minprop = maxprop; maxprop = sublength / length; - - /* This subline doesn't reach the lowest proportion requested + + /* This subline doesn't reach the lowest proportion requested or is beyond the highest proporton */ - if( from > maxprop || to < minprop ) + if ( from > maxprop || to < minprop ) continue; - - if( from <= minprop ) + + if ( from <= minprop ) subfrom = 0.0; - if( to >= maxprop ) + if ( to >= maxprop ) subto = 1.0; - - if( from > minprop && from <= maxprop ) + + if ( from > minprop && from <= maxprop ) subfrom = (from - minprop) / (maxprop - minprop); - if( to < maxprop && to >= minprop ) + if ( to < maxprop && to >= minprop ) subto = (to - minprop) / (maxprop - minprop); - - - opa = ptarray_substring(subline->points, subfrom, subto); - if( opa && opa->npoints > 0 ) + + + opa = ptarray_substring(subline->points, subfrom, subto, 0); + if ( opa && opa->npoints > 0 ) { if ( opa->npoints == 1 ) /* Point returned */ { - geoms[g] = (LWGEOM *)lwpoint_construct(iline->SRID, NULL, opa); + geoms[g] = (LWGEOM *)lwpoint_construct(SRID_UNKNOWN, NULL, opa); homogeneous = LW_FALSE; } else { - geoms[g] = (LWGEOM *)lwline_construct(iline->SRID, NULL, opa); + geoms[g] = (LWGEOM *)lwline_construct(SRID_UNKNOWN, NULL, opa); } g++; } - - - + + + } /* If we got any points, we need to return a GEOMETRYCOLLECTION */ - if( ! homogeneous ) - TYPE_SETTYPE(type,COLLECTIONTYPE); - - olwgeom = (LWGEOM*)lwcollection_construct(type, iline->SRID, NULL, g, geoms); + if ( ! homogeneous ) + type = COLLECTIONTYPE; + + olwgeom = (LWGEOM*)lwcollection_construct(type, iline->srid, NULL, g, geoms); } else { - elog(ERROR,"line_interpolate_point: 1st arg isnt a line"); + elog(ERROR,"line_substring: 1st arg isnt a line"); PG_RETURN_NULL(); } - ret = pglwgeom_serialize(olwgeom); + ret = geometry_serialize(olwgeom); + lwgeom_free(olwgeom); PG_FREE_IF_COPY(geom, 0); - lwgeom_release(olwgeom); PG_RETURN_POINTER(ret); } -Datum LWGEOM_line_locate_point(PG_FUNCTION_ARGS); - -PG_FUNCTION_INFO_V1(LWGEOM_line_locate_point); -Datum LWGEOM_line_locate_point(PG_FUNCTION_ARGS) -{ - PG_LWGEOM *geom1 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_LWGEOM *geom2 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - LWLINE *lwline; - LWPOINT *lwpoint; - POINTARRAY *pa; - POINT2D p; - double ret; - - if ( lwgeom_getType(geom1->type) != LINETYPE ) - { - elog(ERROR,"line_locate_point: 1st arg isnt a line"); - PG_RETURN_NULL(); - } - if ( lwgeom_getType(geom2->type) != POINTTYPE ) - { - elog(ERROR,"line_locate_point: 2st arg isnt a point"); - PG_RETURN_NULL(); - } - if ( pglwgeom_getSRID(geom1) != pglwgeom_getSRID(geom2) ) - { - elog(ERROR, "Operation on two geometries with different SRIDs"); - PG_RETURN_NULL(); - } - - lwline = lwline_deserialize(SERIALIZED_FORM(geom1)); - lwpoint = lwpoint_deserialize(SERIALIZED_FORM(geom2)); - - pa = lwline->points; - lwpoint_getPoint2d_p(lwpoint, &p); - - ret = ptarray_locate_point(pa, &p); - - PG_RETURN_FLOAT8(ret); -} - /******************************************************************************* * The following is based on the "Fast Winding Number Inclusion of a Point * in a Polygon" algorithm by Dan Sunday. @@ -1287,17 +879,17 @@ minY = seg1->y; } - LWDEBUGF(3, "maxX minX/maxY minY: %.8f %.8f/%.8f %.8f", maxX, minX, maxY, minY); + POSTGIS_DEBUGF(3, "maxX minX/maxY minY: %.8f %.8f/%.8f %.8f", maxX, minX, maxY, minY); if (maxX < point->x || minX > point->x) { - LWDEBUGF(3, "X value %.8f falls outside the range %.8f-%.8f", point->x, minX, maxX); + POSTGIS_DEBUGF(3, "X value %.8f falls outside the range %.8f-%.8f", point->x, minX, maxX); return 0; } else if (maxY < point->y || minY > point->y) { - LWDEBUGF(3, "Y value %.8f falls outside the range %.8f-%.8f", point->y, minY, maxY); + POSTGIS_DEBUGF(3, "Y value %.8f falls outside the range %.8f-%.8f", point->y, minY, maxY); return 0; } @@ -1318,7 +910,7 @@ POINT2D seg2; LWMLINE *lines; - LWDEBUG(2, "point_in_ring called."); + POSTGIS_DEBUG(2, "point_in_ring called."); lines = findLineSegments(root, point->y); if (!lines) @@ -1332,24 +924,25 @@ side = determineSide(&seg1, &seg2, point); - LWDEBUGF(3, "segment: (%.8f, %.8f),(%.8f, %.8f)", seg1.x, seg1.y, seg2.x, seg2.y); - LWDEBUGF(3, "side result: %.8f", side); - LWDEBUGF(3, "counterclockwise wrap %d, clockwise wrap %d", FP_CONTAINS_BOTTOM(seg1.y,point->y,seg2.y), FP_CONTAINS_BOTTOM(seg2.y,point->y,seg1.y)); + POSTGIS_DEBUGF(3, "segment: (%.8f, %.8f),(%.8f, %.8f)", seg1.x, seg1.y, seg2.x, seg2.y); + POSTGIS_DEBUGF(3, "side result: %.8f", side); + POSTGIS_DEBUGF(3, "counterclockwise wrap %d, clockwise wrap %d", FP_CONTAINS_BOTTOM(seg1.y,point->y,seg2.y), FP_CONTAINS_BOTTOM(seg2.y,point->y,seg1.y)); /* zero length segments are ignored. */ if (((seg2.x-seg1.x)*(seg2.x-seg1.x)+(seg2.y-seg1.y)*(seg2.y-seg1.y)) < 1e-12*1e-12) { - LWDEBUG(3, "segment is zero length... ignoring."); + POSTGIS_DEBUG(3, "segment is zero length... ignoring."); continue; } /* a point on the boundary of a ring is not contained. */ - if (fabs(side) < 1e-12) + /* WAS: if (fabs(side) < 1e-12), see #852 */ + if (side == 0.0) { if (isOnSegment(&seg1, &seg2, point) == 1) { - LWDEBUGF(3, "point on ring boundary between points %d, %d", i, i+1); + POSTGIS_DEBUGF(3, "point on ring boundary between points %d, %d", i, i+1); return 0; } @@ -1362,7 +955,7 @@ */ if (FP_CONTAINS_BOTTOM(seg1.y,point->y,seg2.y) && side>0) { - LWDEBUG(3, "incrementing winding number."); + POSTGIS_DEBUG(3, "incrementing winding number."); ++wn; } @@ -1373,13 +966,13 @@ */ else if (FP_CONTAINS_BOTTOM(seg2.y,point->y,seg1.y) && side<0) { - LWDEBUG(3, "decrementing winding number."); + POSTGIS_DEBUG(3, "decrementing winding number."); --wn; } } - LWDEBUGF(3, "winding number %d", wn); + POSTGIS_DEBUGF(3, "winding number %d", wn); if (wn == 0) return -1; @@ -1400,7 +993,7 @@ POINT2D seg1; POINT2D seg2; - LWDEBUG(2, "point_in_ring called."); + POSTGIS_DEBUG(2, "point_in_ring called."); for (i=0; inpoints-1; i++) @@ -1411,24 +1004,25 @@ side = determineSide(&seg1, &seg2, point); - LWDEBUGF(3, "segment: (%.8f, %.8f),(%.8f, %.8f)", seg1.x, seg1.y, seg2.x, seg2.y); - LWDEBUGF(3, "side result: %.8f", side); - LWDEBUGF(3, "counterclockwise wrap %d, clockwise wrap %d", FP_CONTAINS_BOTTOM(seg1.y,point->y,seg2.y), FP_CONTAINS_BOTTOM(seg2.y,point->y,seg1.y)); + POSTGIS_DEBUGF(3, "segment: (%.8f, %.8f),(%.8f, %.8f)", seg1.x, seg1.y, seg2.x, seg2.y); + POSTGIS_DEBUGF(3, "side result: %.8f", side); + POSTGIS_DEBUGF(3, "counterclockwise wrap %d, clockwise wrap %d", FP_CONTAINS_BOTTOM(seg1.y,point->y,seg2.y), FP_CONTAINS_BOTTOM(seg2.y,point->y,seg1.y)); /* zero length segments are ignored. */ if (((seg2.x-seg1.x)*(seg2.x-seg1.x)+(seg2.y-seg1.y)*(seg2.y-seg1.y)) < 1e-12*1e-12) { - LWDEBUG(3, "segment is zero length... ignoring."); + POSTGIS_DEBUG(3, "segment is zero length... ignoring."); continue; } /* a point on the boundary of a ring is not contained. */ - if (fabs(side) < 1e-12) + /* WAS: if (fabs(side) < 1e-12), see #852 */ + if (side == 0.0) { if (isOnSegment(&seg1, &seg2, point) == 1) { - LWDEBUGF(3, "point on ring boundary between points %d, %d", i, i+1); + POSTGIS_DEBUGF(3, "point on ring boundary between points %d, %d", i, i+1); return 0; } @@ -1441,7 +1035,7 @@ */ if (FP_CONTAINS_BOTTOM(seg1.y,point->y,seg2.y) && side>0) { - LWDEBUG(3, "incrementing winding number."); + POSTGIS_DEBUG(3, "incrementing winding number."); ++wn; } @@ -1452,13 +1046,13 @@ */ else if (FP_CONTAINS_BOTTOM(seg2.y,point->y,seg1.y) && side<0) { - LWDEBUG(3, "decrementing winding number."); + POSTGIS_DEBUG(3, "decrementing winding number."); --wn; } } - LWDEBUGF(3, "winding number %d", wn); + POSTGIS_DEBUGF(3, "winding number %d", wn); if (wn == 0) return -1; @@ -1474,14 +1068,14 @@ int i; POINT2D pt; - LWDEBUGF(2, "point_in_polygon called for %p %d %p.", root, ringCount, point); + POSTGIS_DEBUGF(2, "point_in_polygon called for %p %d %p.", root, ringCount, point); getPoint2d_p(point->point, 0, &pt); /* assume bbox short-circuit has already been attempted */ if (point_in_ring_rtree(root[0], &pt) != 1) { - LWDEBUG(3, "point_in_polygon_rtree: outside exterior ring."); + POSTGIS_DEBUG(3, "point_in_polygon_rtree: outside exterior ring."); return 0; } @@ -1490,7 +1084,7 @@ { if (point_in_ring_rtree(root[i], &pt) != -1) { - LWDEBUGF(3, "point_in_polygon_rtree: within hole %d.", i); + POSTGIS_DEBUGF(3, "point_in_polygon_rtree: within hole %d.", i); return 0; } @@ -1511,7 +1105,7 @@ POINT2D pt; int result = -1; - LWDEBUGF(2, "point_in_multipolygon_rtree called for %p %d %p.", root, polyCount, point); + POSTGIS_DEBUGF(2, "point_in_multipolygon_rtree called for %p %d %p.", root, polyCount, point); getPoint2d_p(point->point, 0, &pt); /* assume bbox short-circuit has already been attempted */ @@ -1522,14 +1116,14 @@ for ( p = 0; p < polyCount; p++ ) { in_ring = point_in_ring_rtree(root[i], &pt); - LWDEBUGF(4, "point_in_multipolygon_rtree: exterior ring (%d), point_in_ring returned %d", p, in_ring); + POSTGIS_DEBUGF(4, "point_in_multipolygon_rtree: exterior ring (%d), point_in_ring returned %d", p, in_ring); if ( in_ring == -1 ) /* outside the exterior ring */ { - LWDEBUG(3, "point_in_multipolygon_rtree: outside exterior ring."); + POSTGIS_DEBUG(3, "point_in_multipolygon_rtree: outside exterior ring."); } else if ( in_ring == 0 ) /* on the boundary */ { - LWDEBUGF(3, "point_in_multipolygon_rtree: on edge of exterior ring %d", p); + POSTGIS_DEBUGF(3, "point_in_multipolygon_rtree: on edge of exterior ring %d", p); return 0; } else { result = in_ring; @@ -1537,16 +1131,16 @@ for(r=1; r outside the polygon */ { - LWDEBUGF(3, "point_in_multipolygon_rtree: within hole %d of exterior ring %d", r, p); + POSTGIS_DEBUGF(3, "point_in_multipolygon_rtree: within hole %d of exterior ring %d", r, p); result = -1; break; } if (in_ring == 0) /* on the edge of a hole */ { - LWDEBUGF(3, "point_in_multipolygon_rtree: on edge of hole %d of exterior ring %d", r, p); + POSTGIS_DEBUGF(3, "point_in_multipolygon_rtree: on edge of hole %d of exterior ring %d", r, p); return 0; } } @@ -1576,16 +1170,19 @@ POINTARRAY *ring; POINT2D pt; - LWDEBUG(2, "point_in_polygon called."); + POSTGIS_DEBUG(2, "point_in_polygon called."); getPoint2d_p(point->point, 0, &pt); /* assume bbox short-circuit has already been attempted */ + /* everything is outside of an empty polygon */ + if ( polygon->nrings == 0 ) return -1; + ring = polygon->rings[0]; in_ring = point_in_ring(polygon->rings[0], &pt); if ( in_ring == -1) /* outside the exterior ring */ { - LWDEBUG(3, "point_in_polygon: outside exterior ring."); + POSTGIS_DEBUG(3, "point_in_polygon: outside exterior ring."); return -1; } result = in_ring; @@ -1596,12 +1193,12 @@ in_ring = point_in_ring(polygon->rings[i], &pt); if (in_ring == 1) /* inside a hole => outside the polygon */ { - LWDEBUGF(3, "point_in_polygon: within hole %d.", i); + POSTGIS_DEBUGF(3, "point_in_polygon: within hole %d.", i); return -1; } if (in_ring == 0) /* on the edge of a hole */ { - LWDEBUGF(3, "point_in_polygon: on edge of hole %d.", i); + POSTGIS_DEBUGF(3, "point_in_polygon: on edge of hole %d.", i); return 0; } } @@ -1619,7 +1216,7 @@ POINTARRAY *ring; POINT2D pt; - LWDEBUG(2, "point_in_polygon called."); + POSTGIS_DEBUG(2, "point_in_polygon called."); getPoint2d_p(point->point, 0, &pt); /* assume bbox short-circuit has already been attempted */ @@ -1630,11 +1227,15 @@ { LWPOLY *polygon = mpolygon->geoms[j]; + + /* everything is outside of an empty polygon */ + if ( polygon->nrings == 0 ) continue; + ring = polygon->rings[0]; in_ring = point_in_ring(polygon->rings[0], &pt); if ( in_ring == -1) /* outside the exterior ring */ { - LWDEBUG(3, "point_in_polygon: outside exterior ring."); + POSTGIS_DEBUG(3, "point_in_polygon: outside exterior ring."); continue; } if ( in_ring == 0 ) @@ -1650,13 +1251,13 @@ in_ring = point_in_ring(polygon->rings[i], &pt); if (in_ring == 1) /* inside a hole => outside the polygon */ { - LWDEBUGF(3, "point_in_polygon: within hole %d.", i); + POSTGIS_DEBUGF(3, "point_in_polygon: within hole %d.", i); result = -1; break; } if (in_ring == 0) /* on the edge of a hole */ { - LWDEBUGF(3, "point_in_polygon: on edge of hole %d.", i); + POSTGIS_DEBUGF(3, "point_in_polygon: on edge of hole %d.", i); return 0; } } diff -Nru postgis-1.5.3/postgis/lwgeom_functions_basic.c postgis-2.0.1/postgis/lwgeom_functions_basic.c --- postgis-1.5.3/postgis/lwgeom_functions_basic.c 2011-05-04 22:13:01.000000000 +0000 +++ postgis-2.0.1/postgis/lwgeom_functions_basic.c 2012-05-04 08:06:16.000000000 +0000 @@ -1,5 +1,5 @@ /********************************************************************** - * $Id: lwgeom_functions_basic.c 7092 2011-05-04 22:13:01Z chodgson $ + * $Id: lwgeom_functions_basic.c 9712 2012-05-04 08:06:16Z strk $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net @@ -16,10 +16,9 @@ #include "utils/array.h" #include "utils/geo_decls.h" -#include "liblwgeom.h" -#include "lwalgorithm.h" +#include "liblwgeom_internal.h" +#include "libtgeom.h" #include "lwgeom_pg.h" -#include "profile.h" #include #include @@ -32,27 +31,37 @@ Datum LWGEOM_npoints(PG_FUNCTION_ARGS); Datum LWGEOM_nrings(PG_FUNCTION_ARGS); Datum LWGEOM_area_polygon(PG_FUNCTION_ARGS); -Datum LWGEOM_dwithin(PG_FUNCTION_ARGS); -Datum LWGEOM_dfullywithin(PG_FUNCTION_ARGS); Datum postgis_uses_stats(PG_FUNCTION_ARGS); Datum postgis_autocache_bbox(PG_FUNCTION_ARGS); Datum postgis_scripts_released(PG_FUNCTION_ARGS); Datum postgis_version(PG_FUNCTION_ARGS); Datum postgis_lib_version(PG_FUNCTION_ARGS); +Datum postgis_svn_version(PG_FUNCTION_ARGS); Datum postgis_libxml_version(PG_FUNCTION_ARGS); Datum postgis_lib_build_date(PG_FUNCTION_ARGS); Datum LWGEOM_length2d_linestring(PG_FUNCTION_ARGS); Datum LWGEOM_length_linestring(PG_FUNCTION_ARGS); Datum LWGEOM_perimeter2d_poly(PG_FUNCTION_ARGS); Datum LWGEOM_perimeter_poly(PG_FUNCTION_ARGS); + Datum LWGEOM_maxdistance2d_linestring(PG_FUNCTION_ARGS); Datum LWGEOM_mindistance2d(PG_FUNCTION_ARGS); Datum LWGEOM_closestpoint(PG_FUNCTION_ARGS); Datum LWGEOM_shortestline2d(PG_FUNCTION_ARGS); Datum LWGEOM_longestline2d(PG_FUNCTION_ARGS); +Datum LWGEOM_dwithin(PG_FUNCTION_ARGS); +Datum LWGEOM_dfullywithin(PG_FUNCTION_ARGS); + +Datum LWGEOM_maxdistance3d(PG_FUNCTION_ARGS); +Datum LWGEOM_mindistance3d(PG_FUNCTION_ARGS); +Datum LWGEOM_closestpoint3d(PG_FUNCTION_ARGS); +Datum LWGEOM_shortestline3d(PG_FUNCTION_ARGS); +Datum LWGEOM_longestline3d(PG_FUNCTION_ARGS); +Datum LWGEOM_dwithin3d(PG_FUNCTION_ARGS); +Datum LWGEOM_dfullywithin3d(PG_FUNCTION_ARGS); + Datum LWGEOM_inside_circle_point(PG_FUNCTION_ARGS); Datum LWGEOM_collect(PG_FUNCTION_ARGS); -Datum LWGEOM_accum(PG_FUNCTION_ARGS); Datum LWGEOM_collect_garray(PG_FUNCTION_ARGS); Datum LWGEOM_expand(PG_FUNCTION_ARGS); Datum LWGEOM_to_BOX(PG_FUNCTION_ARGS); @@ -60,7 +69,7 @@ Datum LWGEOM_isempty(PG_FUNCTION_ARGS); Datum LWGEOM_segmentize2d(PG_FUNCTION_ARGS); Datum LWGEOM_reverse(PG_FUNCTION_ARGS); -Datum LWGEOM_forceRHR_poly(PG_FUNCTION_ARGS); +Datum LWGEOM_force_clockwise_poly(PG_FUNCTION_ARGS); Datum LWGEOM_noop(PG_FUNCTION_ARGS); Datum LWGEOM_zmflag(PG_FUNCTION_ARGS); Datum LWGEOM_hasz(PG_FUNCTION_ARGS); @@ -84,12 +93,9 @@ Datum ST_GeoHash(PG_FUNCTION_ARGS); Datum ST_MakeEnvelope(PG_FUNCTION_ARGS); Datum ST_CollectionExtract(PG_FUNCTION_ARGS); +Datum ST_CollectionHomogenize(PG_FUNCTION_ARGS); +Datum ST_IsCollection(PG_FUNCTION_ARGS); -void lwgeom_affine_ptarray(POINTARRAY *pa, double afac, double bfac, double cfac, - double dfac, double efac, double ffac, double gfac, double hfac, double ifac, double xoff, double yoff, double zoff); - -void lwgeom_affine_recursive(uchar *serialized, double afac, double bfac, double cfac, - double dfac, double efac, double ffac, double gfac, double hfac, double ifac, double xoff, double yoff, double zoff); /*------------------------------------------------------------------*/ @@ -97,17 +103,8 @@ PG_FUNCTION_INFO_V1(LWGEOM_mem_size); Datum LWGEOM_mem_size(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *geom = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); size_t size = VARSIZE(geom); - size_t computed_size = lwgeom_size(SERIALIZED_FORM(geom)); - computed_size += VARHDRSZ; /* varlena size */ - if ( size != computed_size ) - { - elog(NOTICE, "varlena size (%lu) != computed size+4 (%lu)", - (unsigned long)size, - (unsigned long)computed_size); - } - PG_FREE_IF_COPY(geom,0); PG_RETURN_INT32(size); } @@ -116,69 +113,72 @@ PG_FUNCTION_INFO_V1(LWGEOM_summary); Datum LWGEOM_summary(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); char *result; text *mytext; LWGEOM *lwgeom; - lwgeom = lwgeom_deserialize(SERIALIZED_FORM(geom)); - + lwgeom = lwgeom_from_gserialized(geom); result = lwgeom_summary(lwgeom, 0); + lwgeom_free(lwgeom); /* create a text obj to return */ - mytext = (text *) lwalloc(VARHDRSZ + strlen(result) + 1); - SET_VARSIZE(mytext, VARHDRSZ + strlen(result) + 1); - VARDATA(mytext)[0] = '\n'; - memcpy(VARDATA(mytext)+1, result, strlen(result) ); - - lwfree(result); + mytext = cstring2text(result); + pfree(result); + PG_FREE_IF_COPY(geom,0); - - PG_RETURN_POINTER(mytext); + PG_RETURN_TEXT_P(mytext); } PG_FUNCTION_INFO_V1(postgis_version); Datum postgis_version(PG_FUNCTION_ARGS) { char *ver = POSTGIS_VERSION; - text *result; - result = lwalloc(VARHDRSZ + strlen(ver)); - SET_VARSIZE(result, VARHDRSZ + strlen(ver)); - memcpy(VARDATA(result), ver, strlen(ver)); - PG_RETURN_POINTER(result); + text *result = cstring2text(ver); + PG_RETURN_TEXT_P(result); } PG_FUNCTION_INFO_V1(postgis_lib_version); Datum postgis_lib_version(PG_FUNCTION_ARGS) { char *ver = POSTGIS_LIB_VERSION; - text *result; - result = lwalloc(VARHDRSZ + strlen(ver)); - SET_VARSIZE(result, VARHDRSZ + strlen(ver)); - memcpy(VARDATA(result), ver, strlen(ver)); - PG_RETURN_POINTER(result); + text *result = cstring2text(ver); + PG_RETURN_TEXT_P(result); +} + +PG_FUNCTION_INFO_V1(postgis_svn_version); +Datum postgis_svn_version(PG_FUNCTION_ARGS) +{ + static int rev = POSTGIS_SVN_REVISION; + char ver[32]; + if ( rev > 0 ) + { + snprintf(ver, 32, "%d", rev); + PG_RETURN_TEXT_P(cstring2text(ver)); + } + else + PG_RETURN_NULL(); } PG_FUNCTION_INFO_V1(postgis_lib_build_date); Datum postgis_lib_build_date(PG_FUNCTION_ARGS) { char *ver = POSTGIS_BUILD_DATE; - text *result; - result = lwalloc(VARHDRSZ + strlen(ver)); - SET_VARSIZE(result, VARHDRSZ + strlen(ver)); - memcpy(VARDATA(result), ver, strlen(ver)); - PG_RETURN_POINTER(result); + text *result = cstring2text(ver); + PG_RETURN_TEXT_P(result); } PG_FUNCTION_INFO_V1(postgis_scripts_released); Datum postgis_scripts_released(PG_FUNCTION_ARGS) { - char *ver = POSTGIS_SCRIPTS_VERSION; + char ver[64]; text *result; - result = lwalloc(VARHDRSZ + strlen(ver)); - SET_VARSIZE(result, VARHDRSZ + strlen(ver)); - memcpy(VARDATA(result), ver, strlen(ver)); - PG_RETURN_POINTER(result); + + snprintf(ver, 64, "%s r%d", POSTGIS_LIB_VERSION, POSTGIS_SVN_REVISION); + ver[63] = '\0'; + + result = cstring2text(ver); + PG_RETURN_TEXT_P(result); } PG_FUNCTION_INFO_V1(postgis_uses_stats); @@ -202,127 +202,20 @@ Datum postgis_libxml_version(PG_FUNCTION_ARGS) { char *ver = POSTGIS_LIBXML2_VERSION; - text *result; - result = lwalloc(VARHDRSZ + strlen(ver)); - SET_VARSIZE(result, VARHDRSZ + strlen(ver)); - memcpy(VARDATA(result), ver, strlen(ver)); - PG_RETURN_POINTER(result); -} - - - - - -/** - * Recursively count points in a SERIALIZED lwgeom - */ -int32 -lwgeom_npoints(uchar *serialized) -{ - LWGEOM_INSPECTED *inspected = lwgeom_inspect(serialized); - int i, j; - int npoints=0; - - /* now have to do a scan of each object */ - for (i=0; ingeometries; i++) - { - LWLINE *line=NULL; - LWPOINT *point=NULL; - LWPOLY *poly=NULL; - LWCIRCSTRING *curve=NULL; - uchar *subgeom=NULL; - - point = lwgeom_getpoint_inspected(inspected, i); - if (point !=NULL) - { - npoints++; - continue; - } - - poly = lwgeom_getpoly_inspected(inspected, i); - if (poly !=NULL) - { - for (j=0; jnrings; j++) - { - npoints += poly->rings[j]->npoints; - } - continue; - } - - line = lwgeom_getline_inspected(inspected, i); - if (line != NULL) - { - npoints += line->points->npoints; - continue; - } - - curve = lwgeom_getcircstring_inspected(inspected, i); - if (curve != NULL) - { - npoints += curve->points->npoints; - continue; - } - - subgeom = lwgeom_getsubgeometry_inspected(inspected, i); - if ( subgeom != NULL ) - { - npoints += lwgeom_npoints(subgeom); - } - else - { - elog(ERROR, "What ? lwgeom_getsubgeometry_inspected returned NULL??"); - } - } - return npoints; -} - -/** - * Recursively count rings in a SERIALIZED lwgeom - */ -int32 -lwgeom_nrings_recursive(uchar *serialized) -{ - LWGEOM_INSPECTED *inspected; - int i; - int nrings=0; - - inspected = lwgeom_inspect(serialized); - - /* now have to do a scan of each object */ - for (i=0; ingeometries; i++) - { - LWPOLY *poly=NULL; - uchar *subgeom=NULL; - - subgeom = lwgeom_getsubgeometry_inspected(inspected, i); - - if ( lwgeom_getType(subgeom[0]) == POLYGONTYPE ) - { - poly = lwpoly_deserialize(subgeom); - nrings += poly->nrings; - continue; - } - - if ( lwgeom_getType(subgeom[0]) == COLLECTIONTYPE ) - { - nrings += lwgeom_nrings_recursive(subgeom); - continue; - } - } - - lwinspected_release(inspected); - - return nrings; + text *result = cstring2text(ver); + PG_RETURN_TEXT_P(result); } /** number of points in an object */ PG_FUNCTION_INFO_V1(LWGEOM_npoints); Datum LWGEOM_npoints(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - int32 npoints = 0; + GSERIALIZED *geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + LWGEOM *lwgeom = lwgeom_from_gserialized(geom); + int npoints = 0; - npoints = lwgeom_npoints(SERIALIZED_FORM(geom)); + npoints = lwgeom_count_vertices(lwgeom); + lwgeom_free(lwgeom); PG_FREE_IF_COPY(geom, 0); PG_RETURN_INT32(npoints); @@ -332,10 +225,12 @@ PG_FUNCTION_INFO_V1(LWGEOM_nrings); Datum LWGEOM_nrings(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - int32 nrings = 0; + GSERIALIZED *geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + LWGEOM *lwgeom = lwgeom_from_gserialized(geom); + int nrings = 0; - nrings = lwgeom_nrings_recursive(SERIALIZED_FORM(geom)); + nrings = lwgeom_count_rings(lwgeom); + lwgeom_free(lwgeom); PG_FREE_IF_COPY(geom, 0); PG_RETURN_INT32(nrings); @@ -350,37 +245,17 @@ PG_FUNCTION_INFO_V1(LWGEOM_area_polygon); Datum LWGEOM_area_polygon(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - LWGEOM_INSPECTED *inspected = lwgeom_inspect(SERIALIZED_FORM(geom)); - LWPOLY *poly; - LWCURVEPOLY *curvepoly; - LWGEOM *tmp; + GSERIALIZED *geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + LWGEOM *lwgeom = lwgeom_from_gserialized(geom); double area = 0.0; - int i; POSTGIS_DEBUG(2, "in LWGEOM_area_polygon"); - for (i=0; ingeometries; i++) - { - tmp = lwgeom_getgeom_inspected(inspected, i); - if (lwgeom_getType(tmp->type) == POLYGONTYPE) - { - poly = (LWPOLY *)tmp; - area += lwgeom_polygon_area(poly); - } - else if (lwgeom_getType(tmp->type) == CURVEPOLYTYPE) - { - curvepoly = (LWCURVEPOLY *)tmp; - area += lwgeom_curvepolygon_area(curvepoly); - } - lwgeom_release(tmp); - - POSTGIS_DEBUGF(3, " LWGEOM_area_polygon found a poly (%f)", area); - } - - lwinspected_release(inspected); + area = lwgeom_area(lwgeom); + lwgeom_free(lwgeom); PG_FREE_IF_COPY(geom, 0); + PG_RETURN_FLOAT8(area); } @@ -394,25 +269,10 @@ PG_FUNCTION_INFO_V1(LWGEOM_length2d_linestring); Datum LWGEOM_length2d_linestring(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - LWGEOM_INSPECTED *inspected = lwgeom_inspect(SERIALIZED_FORM(geom)); - LWLINE *line; - double dist = 0.0; - int i; - - POSTGIS_DEBUG(2, "in LWGEOM_length2d"); - - for (i=0; ingeometries; i++) - { - line = lwgeom_getline_inspected(inspected, i); - if ( line == NULL ) continue; - dist += lwgeom_pointarray_length2d(line->points); - - POSTGIS_DEBUGF(3, " LWGEOM_length2d found a line (%f)", dist); - } - - lwinspected_release(inspected); - + GSERIALIZED *geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + LWGEOM *lwgeom = lwgeom_from_gserialized(geom); + double dist = lwgeom_length_2d(lwgeom); + lwgeom_free(lwgeom); PG_FREE_IF_COPY(geom, 0); PG_RETURN_FLOAT8(dist); } @@ -427,21 +287,10 @@ PG_FUNCTION_INFO_V1(LWGEOM_length_linestring); Datum LWGEOM_length_linestring(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - LWGEOM_INSPECTED *inspected = lwgeom_inspect(SERIALIZED_FORM(geom)); - LWLINE *line; - double dist = 0.0; - int i; - - for (i=0; ingeometries; i++) - { - line = lwgeom_getline_inspected(inspected, i); - if ( line == NULL ) continue; - dist += lwgeom_pointarray_length(line->points); - } - - lwinspected_release(inspected); - + GSERIALIZED *geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + LWGEOM *lwgeom = lwgeom_from_gserialized(geom); + double dist = lwgeom_length(lwgeom); + lwgeom_free(lwgeom); PG_FREE_IF_COPY(geom, 0); PG_RETURN_FLOAT8(dist); } @@ -456,23 +305,13 @@ PG_FUNCTION_INFO_V1(LWGEOM_perimeter_poly); Datum LWGEOM_perimeter_poly(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - LWGEOM_INSPECTED *inspected = lwgeom_inspect(SERIALIZED_FORM(geom)); - double ret = 0.0; - int i; - - for (i=0; ingeometries; i++) - { - LWPOLY *poly; - poly = lwgeom_getpoly_inspected(inspected, i); - if ( poly == NULL ) continue; - ret += lwgeom_polygon_perimeter(poly); - } - - lwinspected_release(inspected); - + GSERIALIZED *geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + LWGEOM *lwgeom = lwgeom_from_gserialized(geom); + double perimeter = 0.0; + + perimeter = lwgeom_perimeter(lwgeom); PG_FREE_IF_COPY(geom, 0); - PG_RETURN_FLOAT8(ret); + PG_RETURN_FLOAT8(perimeter); } /** @@ -485,1220 +324,580 @@ PG_FUNCTION_INFO_V1(LWGEOM_perimeter2d_poly); Datum LWGEOM_perimeter2d_poly(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - LWGEOM_INSPECTED *inspected = lwgeom_inspect(SERIALIZED_FORM(geom)); - double ret = 0.0; - int i; - - for (i=0; ingeometries; i++) - { - LWPOLY *poly; - poly = lwgeom_getpoly_inspected(inspected, i); - if ( poly == NULL ) continue; - ret += lwgeom_polygon_perimeter2d(poly); - } - - lwinspected_release(inspected); + GSERIALIZED *geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + LWGEOM *lwgeom = lwgeom_from_gserialized(geom); + double perimeter = 0.0; + + perimeter = lwgeom_perimeter_2d(lwgeom); PG_FREE_IF_COPY(geom, 0); - - PG_RETURN_FLOAT8(ret); + PG_RETURN_FLOAT8(perimeter); } -/** - * @brief Write to already allocated memory 'optr' a 2d version of - * the given serialized form. - * Higher dimensions in input geometry are discarded. - * @return number bytes written in given int pointer. - */ -void -lwgeom_force2d_recursive(uchar *serialized, uchar *optr, size_t *retsize) +/* transform input geometry to 2d if not 2d already */ +PG_FUNCTION_INFO_V1(LWGEOM_force_2d); +Datum LWGEOM_force_2d(PG_FUNCTION_ARGS) { - LWGEOM_INSPECTED *inspected; - int i,j,k; - size_t totsize=0; - size_t size=0; - int type; - uchar newtypefl; - LWPOINT *point = NULL; - LWLINE *line = NULL; - LWCIRCSTRING *curve = NULL; - LWPOLY *poly = NULL; - POINTARRAY newpts; - POINTARRAY **nrings; - POINT2D p2d; - uchar *loc; + GSERIALIZED *pg_geom_in = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *pg_geom_out; + LWGEOM *lwg_in, *lwg_out; + /* already 2d */ + if ( gserialized_ndims(pg_geom_in) == 2 ) PG_RETURN_POINTER(pg_geom_in); - LWDEBUG(2, "lwgeom_force2d_recursive: call"); + lwg_in = lwgeom_from_gserialized(pg_geom_in); + lwg_out = lwgeom_force_2d(lwg_in); + pg_geom_out = geometry_serialize(lwg_out); + lwgeom_free(lwg_out); + lwgeom_free(lwg_in); - type = lwgeom_getType(serialized[0]); + PG_FREE_IF_COPY(pg_geom_in, 0); + PG_RETURN_POINTER(pg_geom_out); +} - if ( type == POINTTYPE ) - { - point = lwpoint_deserialize(serialized); - TYPE_SETZM(newpts.dims, 0, 0); - newpts.npoints = 1; - newpts.serialized_pointlist = lwalloc(sizeof(POINT2D)); - loc = newpts.serialized_pointlist; - getPoint2d_p(point->point, 0, &p2d); - memcpy(loc, &p2d, sizeof(POINT2D)); - point->point = &newpts; - TYPE_SETZM(point->type, 0, 0); - lwpoint_serialize_buf(point, optr, retsize); - lwfree(newpts.serialized_pointlist); - lwfree(point); +/* transform input geometry to 3dz if not 3dz already */ +PG_FUNCTION_INFO_V1(LWGEOM_force_3dz); +Datum LWGEOM_force_3dz(PG_FUNCTION_ARGS) +{ + GSERIALIZED *pg_geom_in = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *pg_geom_out; + LWGEOM *lwg_in, *lwg_out; - LWDEBUG(3, "lwgeom_force2d_recursive returning"); + /* already 3d */ + if ( gserialized_ndims(pg_geom_in) == 3 && gserialized_has_z(pg_geom_in) ) + PG_RETURN_POINTER(pg_geom_in); - return; - } + lwg_in = lwgeom_from_gserialized(pg_geom_in); + lwg_out = lwgeom_force_3dz(lwg_in); + pg_geom_out = geometry_serialize(lwg_out); + lwgeom_free(lwg_out); + lwgeom_free(lwg_in); - if ( type == LINETYPE ) - { - line = lwline_deserialize(serialized); + PG_FREE_IF_COPY(pg_geom_in, 0); + PG_RETURN_POINTER(pg_geom_out); +} - LWDEBUGF(3, "lwgeom_force2d_recursive: it's a line with %d points", line->points->npoints); +/** transform input geometry to 3dm if not 3dm already */ +PG_FUNCTION_INFO_V1(LWGEOM_force_3dm); +Datum LWGEOM_force_3dm(PG_FUNCTION_ARGS) +{ + GSERIALIZED *pg_geom_in = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *pg_geom_out; + LWGEOM *lwg_in, *lwg_out; - TYPE_SETZM(newpts.dims, 0, 0); - newpts.npoints = line->points->npoints; - newpts.serialized_pointlist = lwalloc(sizeof(POINT2D)*line->points->npoints); + /* already 3d */ + if ( gserialized_ndims(pg_geom_in) == 3 && gserialized_has_m(pg_geom_in) ) + PG_RETURN_POINTER(pg_geom_in); - LWDEBUGF(3, "lwgeom_force2d_recursive: %d bytes pointlist allocated", sizeof(POINT2D)*line->points->npoints); + lwg_in = lwgeom_from_gserialized(pg_geom_in); + lwg_out = lwgeom_force_3dm(lwg_in); + pg_geom_out = geometry_serialize(lwg_out); + lwgeom_free(lwg_out); + lwgeom_free(lwg_in); - loc = newpts.serialized_pointlist; - for (j=0; jpoints->npoints; j++) - { - getPoint2d_p(line->points, j, &p2d); - memcpy(loc, &p2d, sizeof(POINT2D)); - loc+=sizeof(POINT2D); - } - line->points = &newpts; - TYPE_SETZM(line->type, 0, 0); - lwline_serialize_buf(line, optr, retsize); - lwfree(newpts.serialized_pointlist); - lwfree(line); + PG_FREE_IF_COPY(pg_geom_in, 0); + PG_RETURN_POINTER(pg_geom_out); +} - LWDEBUG(3, "lwgeom_force2d_recursive returning"); +/* transform input geometry to 4d if not 4d already */ +PG_FUNCTION_INFO_V1(LWGEOM_force_4d); +Datum LWGEOM_force_4d(PG_FUNCTION_ARGS) +{ + GSERIALIZED *pg_geom_in = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *pg_geom_out; + LWGEOM *lwg_in, *lwg_out; - return; - } + /* already 4d */ + if ( gserialized_ndims(pg_geom_in) == 4 ) + PG_RETURN_POINTER(pg_geom_in); - if ( type == CIRCSTRINGTYPE ) - { - curve = lwcircstring_deserialize(serialized); + lwg_in = lwgeom_from_gserialized(pg_geom_in); + lwg_out = lwgeom_force_4d(lwg_in); + pg_geom_out = geometry_serialize(lwg_out); + lwgeom_free(lwg_out); + lwgeom_free(lwg_in); - LWDEBUGF(3, "lwgeom_force2d_recursize: it's a circularstring with %d points", curve->points->npoints); + PG_FREE_IF_COPY(pg_geom_in, 0); + PG_RETURN_POINTER(pg_geom_out); +} - TYPE_SETZM(newpts.dims, 0, 0); - newpts.npoints = curve->points->npoints; - newpts.serialized_pointlist = lwalloc(sizeof(POINT2D)*curve->points->npoints); +/** transform input geometry to a collection type */ +PG_FUNCTION_INFO_V1(LWGEOM_force_collection); +Datum LWGEOM_force_collection(PG_FUNCTION_ARGS) +{ + GSERIALIZED *geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *result; + LWGEOM **lwgeoms; + LWGEOM *lwgeom; + int srid; + GBOX *bbox; - LWDEBUGF(3, "lwgeom_force2d_recursive: %d bytes pointlist allocated", sizeof(POINT2D)*curve->points->npoints); + POSTGIS_DEBUG(2, "LWGEOM_force_collection called"); - loc = newpts.serialized_pointlist; - for (j=0; jpoints->npoints; j++) - { - getPoint2d_p(curve->points, j, &p2d); - memcpy(loc, &p2d, sizeof(POINT2D)); - loc += sizeof(POINT2D); - } - curve->points = &newpts; - TYPE_SETZM(curve->type, 0, 0); - lwcircstring_serialize_buf(curve, optr, retsize); - lwfree(newpts.serialized_pointlist); - lwfree(curve); - return; - } - - if ( type == POLYGONTYPE ) - { - poly = lwpoly_deserialize(serialized); - TYPE_SETZM(newpts.dims, 0, 0); - newpts.npoints = 0; - newpts.serialized_pointlist = lwalloc(1); - nrings = lwalloc(sizeof(POINTARRAY *)*poly->nrings); - loc = newpts.serialized_pointlist; - for (j=0; jnrings; j++) - { - POINTARRAY *ring = poly->rings[j]; - POINTARRAY *nring = lwalloc(sizeof(POINTARRAY)); - TYPE_SETZM(nring->dims, 0, 0); - nring->npoints = ring->npoints; - nring->serialized_pointlist = - lwalloc(ring->npoints*sizeof(POINT2D)); - loc = nring->serialized_pointlist; - for (k=0; knpoints; k++) - { - getPoint2d_p(ring, k, &p2d); - memcpy(loc, &p2d, sizeof(POINT2D)); - loc+=sizeof(POINT2D); - } - nrings[j] = nring; - } - poly->rings = nrings; - TYPE_SETZM(poly->type, 0, 0); - lwpoly_serialize_buf(poly, optr, retsize); - lwfree(poly); - /** @todo TODO: free nrigs[*]->serialized_pointlist - */ + /* + * This funx is a no-op only if a bbox cache is already present + * in input. If bbox cache is not there we'll need to handle + * automatic bbox addition FOR_COMPLEX_GEOMS. + */ + if ( gserialized_get_type(geom) == COLLECTIONTYPE && + gserialized_has_bbox(geom) ) + { + PG_RETURN_POINTER(geom); + } - LWDEBUG(3, "lwgeom_force2d_recursive returning"); + /* deserialize into lwgeoms[0] */ + lwgeom = lwgeom_from_gserialized(geom); - return; + /* alread a multi*, just make it a collection */ + if ( lwgeom_is_collection(lwgeom) ) + { + lwgeom->type = COLLECTIONTYPE; } - if ( type != MULTIPOINTTYPE && type != MULTIPOLYGONTYPE && - type != MULTILINETYPE && type != COLLECTIONTYPE && - type != COMPOUNDTYPE && type != CURVEPOLYTYPE && - type != MULTICURVETYPE && type != MULTISURFACETYPE) + /* single geom, make it a collection */ + else { - lwerror("lwgeom_force2d_recursive: unknown geometry: %d", - type); + srid = lwgeom->srid; + /* We transfer bbox ownership from input to output */ + bbox = lwgeom->bbox; + lwgeom->srid = SRID_UNKNOWN; + lwgeom->bbox = NULL; + lwgeoms = palloc(sizeof(LWGEOM*)); + lwgeoms[0] = lwgeom; + lwgeom = (LWGEOM *)lwcollection_construct(COLLECTIONTYPE, + srid, bbox, 1, + lwgeoms); } - /* - * OK, this is a collection, so we write down its metadata - * first and then call us again - */ - - LWDEBUGF(3, "lwgeom_force2d_recursive: it's a collection (%s)", lwgeom_typename(type)); - + result = geometry_serialize(lwgeom); + lwgeom_free(lwgeom); - /* Add type */ - newtypefl = lwgeom_makeType_full(0, 0, lwgeom_hasSRID(serialized[0]), - type, lwgeom_hasBBOX(serialized[0])); - optr[0] = newtypefl; - optr++; - totsize++; - loc=serialized+1; + PG_FREE_IF_COPY(geom, 0); + PG_RETURN_POINTER(result); +} - LWDEBUGF(3, "lwgeom_force2d_recursive: added collection type (%s[%s]) - size:%d", lwgeom_typename(type), lwgeom_typeflags(newtypefl), totsize); +/** transform input geometry to a multi* type */ +PG_FUNCTION_INFO_V1(LWGEOM_force_multi); +Datum LWGEOM_force_multi(PG_FUNCTION_ARGS) +{ + GSERIALIZED *geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *result; + LWGEOM *lwgeom; + LWGEOM *ogeom; - if ( lwgeom_hasBBOX(serialized[0]) != lwgeom_hasBBOX(newtypefl) ) - lwerror("typeflag mismatch in BBOX"); - if ( lwgeom_hasSRID(serialized[0]) != lwgeom_hasSRID(newtypefl) ) - lwerror("typeflag mismatch in SRID"); + POSTGIS_DEBUG(2, "LWGEOM_force_multi called"); - /* Add BBOX if any */ - if (lwgeom_hasBBOX(serialized[0])) + /* + ** This funx is a no-op only if a bbox cache is already present + ** in input. If bbox cache is not there we'll need to handle + ** automatic bbox addition FOR_COMPLEX_GEOMS. + */ + if ( lwtype_is_collection(gserialized_get_type(geom)) && + gserialized_has_bbox(geom) ) { - memcpy(optr, loc, sizeof(BOX2DFLOAT4)); - optr += sizeof(BOX2DFLOAT4); - totsize += sizeof(BOX2DFLOAT4); - loc += sizeof(BOX2DFLOAT4); - - LWDEBUGF(3, "lwgeom_force2d_recursive: added collection bbox - size:%d", totsize); + PG_RETURN_POINTER(geom); } - /* Add SRID if any */ - if (lwgeom_hasSRID(serialized[0])) - { - memcpy(optr, loc, 4); - optr += 4; - totsize += 4; - loc += 4; + /* deserialize into lwgeoms[0] */ + lwgeom = lwgeom_from_gserialized(geom); + ogeom = lwgeom_as_multi(lwgeom); - LWDEBUGF(3, "lwgeom_force2d_recursive: added collection SRID - size:%d", totsize); - } + result = geometry_serialize(ogeom); - /* Add numsubobjects */ - memcpy(optr, loc, sizeof(uint32)); - optr += sizeof(uint32); - totsize += sizeof(uint32); - loc += sizeof(uint32); + PG_FREE_IF_COPY(geom, 0); - LWDEBUGF(3, "lwgeom_force2d_recursive: added collection ngeoms - size:%d", totsize); + PG_RETURN_POINTER(result); +} - LWDEBUG(3, "lwgeom_force2d_recursive: inspecting subgeoms"); +/** +Returns the point in first input geometry that is closest to the second input geometry in 2d +*/ - /* Now recurse for each subobject */ - inspected = lwgeom_inspect(serialized); - for (i=0; ingeometries; i++) - { - uchar *subgeom = lwgeom_getsubgeometry_inspected(inspected, i); - lwgeom_force2d_recursive(subgeom, optr, &size); - totsize += size; - optr += size; +PG_FUNCTION_INFO_V1(LWGEOM_closestpoint); +Datum LWGEOM_closestpoint(PG_FUNCTION_ARGS) +{ + GSERIALIZED *result; + GSERIALIZED *geom1 = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *geom2 = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + LWGEOM *point; + LWGEOM *lwgeom1 = lwgeom_from_gserialized(geom1); + LWGEOM *lwgeom2 = lwgeom_from_gserialized(geom2); - LWDEBUGF(3, "lwgeom_force2d_recursive: added elem %d size: %d (tot: %d)", - i, size, totsize); + if (lwgeom1->srid != lwgeom2->srid) + { + elog(ERROR,"Operation on two GEOMETRIES with different SRIDs\n"); + PG_RETURN_NULL(); } - lwinspected_release(inspected); - LWDEBUG(3, "lwgeom_force2d_recursive returning"); + point = lw_dist2d_distancepoint(lwgeom1, lwgeom2, lwgeom1->srid, DIST_MIN); + + if (lwgeom_is_empty(point)) + PG_RETURN_NULL(); + + result = geometry_serialize(point); + lwgeom_free(point); + lwgeom_free(lwgeom1); + lwgeom_free(lwgeom2); - if ( retsize ) *retsize = totsize; + PG_FREE_IF_COPY(geom1, 0); + PG_FREE_IF_COPY(geom2, 1); + PG_RETURN_POINTER(result); } /** - * @brief Write to already allocated memory 'optr' a 3dz version of - * the given serialized form. - * Higher dimensions in input geometry are discarder. - * If the given version is 2d Z is set to 0. - * @return number bytes written in given int pointer. - */ -void -lwgeom_force3dz_recursive(uchar *serialized, uchar *optr, size_t *retsize) +Returns the shortest 2d line between two geometries +*/ +PG_FUNCTION_INFO_V1(LWGEOM_shortestline2d); +Datum LWGEOM_shortestline2d(PG_FUNCTION_ARGS) { - LWGEOM_INSPECTED *inspected; - int i,j,k; - size_t totsize=0; - size_t size=0; - int type; - LWPOINT *point = NULL; - LWLINE *line = NULL; - LWCIRCSTRING *curve = NULL; - LWPOLY *poly = NULL; - POINTARRAY newpts; - POINTARRAY **nrings; - uchar *loc; - POINT3DZ point3dz; - - - LWDEBUG(2, "lwgeom_force3dz_recursive: call"); - - type = lwgeom_getType(serialized[0]); + GSERIALIZED *result; + GSERIALIZED *geom1 = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *geom2 = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + LWGEOM *theline; + LWGEOM *lwgeom1 = lwgeom_from_gserialized(geom1); + LWGEOM *lwgeom2 = lwgeom_from_gserialized(geom2); - if ( type == POINTTYPE ) + if (lwgeom1->srid != lwgeom2->srid) { - point = lwpoint_deserialize(serialized); - TYPE_SETZM(newpts.dims, 1, 0); - newpts.npoints = 1; - newpts.serialized_pointlist = lwalloc(sizeof(POINT3DZ)); - loc = newpts.serialized_pointlist; - getPoint3dz_p(point->point, 0, &point3dz); - memcpy(loc, &point3dz, sizeof(POINT3DZ)); - point->point = &newpts; - TYPE_SETZM(point->type, 1, 0); - lwpoint_serialize_buf(point, optr, retsize); - - LWDEBUGF(3, "lwgeom_force3dz_recursive: it's a point, size:%d", *retsize); - - return; + elog(ERROR,"Operation on two GEOMETRIES with different SRIDs\n"); + PG_RETURN_NULL(); } - if ( type == LINETYPE ) - { - line = lwline_deserialize(serialized); - - LWDEBUG(3, "lwgeom_force3dz_recursive: it's a line"); - - TYPE_SETZM(newpts.dims, 1, 0); - newpts.npoints = line->points->npoints; - newpts.serialized_pointlist = lwalloc(sizeof(POINT3DZ)*line->points->npoints); - loc = newpts.serialized_pointlist; - for (j=0; jpoints->npoints; j++) - { - getPoint3dz_p(line->points, j, &point3dz); - memcpy(loc, &point3dz, sizeof(POINT3DZ)); - loc+=sizeof(POINT3DZ); - } - line->points = &newpts; - TYPE_SETZM(line->type, 1, 0); - lwline_serialize_buf(line, optr, retsize); + theline = lw_dist2d_distanceline(lwgeom1, lwgeom2, lwgeom1->srid, DIST_MIN); + + if (lwgeom_is_empty(theline)) + PG_RETURN_NULL(); - LWDEBUGF(3, "lwgeom_force3dz_recursive: it's a line, size:%d", *retsize); + result = geometry_serialize(theline); + lwgeom_free(theline); + lwgeom_free(lwgeom1); + lwgeom_free(lwgeom2); - return; - } - - if ( type == CIRCSTRINGTYPE ) - { - curve = lwcircstring_deserialize(serialized); - - LWDEBUG(3, "lwgeom_force3dz_recursize: it's a circularstring"); - - TYPE_SETZM(newpts.dims, 1, 0); - newpts.npoints = curve->points->npoints; - newpts.serialized_pointlist = lwalloc(sizeof(POINT3DZ)*curve->points->npoints); - loc = newpts.serialized_pointlist; - for (j=0; jpoints->npoints; j++) - { - getPoint3dz_p(curve->points, j, &point3dz); - memcpy(loc, &point3dz, sizeof(POINT3DZ)); - loc+=sizeof(POINT3DZ); - } - curve->points = &newpts; - TYPE_SETZM(curve->type, 1, 0); - lwcircstring_serialize_buf(curve, optr, retsize); - - LWDEBUGF(3, "lwgeom_force3dz_recursive: it's a circularstring, size:%d", *retsize); - - return; - } - - if ( type == POLYGONTYPE ) - { - poly = lwpoly_deserialize(serialized); - TYPE_SETZM(newpts.dims, 1, 0); - newpts.npoints = 0; - newpts.serialized_pointlist = lwalloc(1); - nrings = lwalloc(sizeof(POINTARRAY *)*poly->nrings); - loc = newpts.serialized_pointlist; - for (j=0; jnrings; j++) - { - POINTARRAY *ring = poly->rings[j]; - POINTARRAY *nring = lwalloc(sizeof(POINTARRAY)); - TYPE_SETZM(nring->dims, 1, 0); - nring->npoints = ring->npoints; - nring->serialized_pointlist = - lwalloc(ring->npoints*sizeof(POINT3DZ)); - loc = nring->serialized_pointlist; - for (k=0; knpoints; k++) - { - getPoint3dz_p(ring, k, &point3dz); - memcpy(loc, &point3dz, sizeof(POINT3DZ)); - loc+=sizeof(POINT3DZ); - } - nrings[j] = nring; - } - poly->rings = nrings; - TYPE_SETZM(poly->type, 1, 0); - lwpoly_serialize_buf(poly, optr, retsize); - - LWDEBUGF(3, "lwgeom_force3dz_recursive: it's a poly, size:%d", *retsize); - - return; - } - - /* - * OK, this is a collection, so we write down its metadata - * first and then call us again - */ - - LWDEBUGF(3, "lwgeom_force3dz_recursive: it's a collection (type:%d)", type); - - /* Add type */ - *optr = lwgeom_makeType_full(1, 0, lwgeom_hasSRID(serialized[0]), - type, lwgeom_hasBBOX(serialized[0])); - optr++; - totsize++; - loc=serialized+1; - - /* Add BBOX if any */ - if (lwgeom_hasBBOX(serialized[0])) - { - memcpy(optr, loc, sizeof(BOX2DFLOAT4)); - optr += sizeof(BOX2DFLOAT4); - totsize += sizeof(BOX2DFLOAT4); - loc += sizeof(BOX2DFLOAT4); - } - - /* Add SRID if any */ - if (lwgeom_hasSRID(serialized[0])) - { - memcpy(optr, loc, 4); - optr += 4; - totsize += 4; - loc += 4; - } - - /* Add numsubobjects */ - memcpy(optr, loc, 4); - optr += 4; - totsize += 4; - - LWDEBUGF(3, " collection header size:%d", totsize); - - /* Now recurse for each suboject */ - inspected = lwgeom_inspect(serialized); - for (i=0; ingeometries; i++) - { - uchar *subgeom = lwgeom_getsubgeometry_inspected(inspected, i); - lwgeom_force3dz_recursive(subgeom, optr, &size); - totsize += size; - optr += size; - - LWDEBUGF(3, " elem %d size: %d (tot: %d)", i, size, totsize); - } - lwinspected_release(inspected); - - *retsize = totsize; + PG_FREE_IF_COPY(geom1, 0); + PG_FREE_IF_COPY(geom2, 1); + PG_RETURN_POINTER(result); } /** - * @brief Write to already allocated memory 'optr' a 3dm version of - * the given serialized form. - * Higher dimensions in input geometry are discarder. - * If the given version is 2d M is set to 0. - * @return number bytes written in given int pointer. - */ -void -lwgeom_force3dm_recursive(uchar *serialized, uchar *optr, size_t *retsize) +Returns the longest 2d line between two geometries +*/ +PG_FUNCTION_INFO_V1(LWGEOM_longestline2d); +Datum LWGEOM_longestline2d(PG_FUNCTION_ARGS) { - LWGEOM_INSPECTED *inspected; - int i,j,k; - size_t totsize=0; - size_t size=0; - int type; - uchar newtypefl; - LWPOINT *point = NULL; - LWLINE *line = NULL; - LWCIRCSTRING *curve = NULL; - LWPOLY *poly = NULL; - POINTARRAY newpts; - POINTARRAY **nrings; - POINT3DM p3dm; - uchar *loc; - - - LWDEBUG(2, "lwgeom_force3dm_recursive: call"); - - type = lwgeom_getType(serialized[0]); - - if ( type == POINTTYPE ) - { - point = lwpoint_deserialize(serialized); - TYPE_SETZM(newpts.dims, 0, 1); - newpts.npoints = 1; - newpts.serialized_pointlist = lwalloc(sizeof(POINT3DM)); - loc = newpts.serialized_pointlist; - getPoint3dm_p(point->point, 0, &p3dm); - memcpy(loc, &p3dm, sizeof(POINT3DM)); - point->point = &newpts; - TYPE_SETZM(point->type, 0, 1); - lwpoint_serialize_buf(point, optr, retsize); - lwfree(newpts.serialized_pointlist); - lwfree(point); - - LWDEBUG(3, "lwgeom_force3dm_recursive returning"); - - return; - } - - if ( type == LINETYPE ) - { - line = lwline_deserialize(serialized); - - LWDEBUGF(3, "lwgeom_force3dm_recursive: it's a line with %d points", line->points->npoints); - - TYPE_SETZM(newpts.dims, 0, 1); - newpts.npoints = line->points->npoints; - newpts.serialized_pointlist = lwalloc(sizeof(POINT3DM)*line->points->npoints); - - LWDEBUGF(3, "lwgeom_force3dm_recursive: %d bytes pointlist allocated", sizeof(POINT3DM)*line->points->npoints); - - loc = newpts.serialized_pointlist; - for (j=0; jpoints->npoints; j++) - { - getPoint3dm_p(line->points, j, &p3dm); - memcpy(loc, &p3dm, sizeof(POINT3DM)); - loc+=sizeof(POINT3DM); - } - line->points = &newpts; - TYPE_SETZM(line->type, 0, 1); - lwline_serialize_buf(line, optr, retsize); - lwfree(newpts.serialized_pointlist); - lwfree(line); - - LWDEBUG(3, "lwgeom_force3dm_recursive returning"); - - return; - } - - if ( type == CIRCSTRINGTYPE ) - { - curve = lwcircstring_deserialize(serialized); - - LWDEBUGF(3, "lwgeom_force3dm_recursize: it's a circularstring with %d points", curve->points->npoints); - - TYPE_SETZM(newpts.dims, 0, 1); - newpts.npoints = curve->points->npoints; - newpts.serialized_pointlist = lwalloc(sizeof(POINT3DM)*curve->points->npoints); - - loc = newpts.serialized_pointlist; - for (j=0; jpoints->npoints; j++) - { - getPoint3dm_p(curve->points, j, &p3dm); - memcpy(loc, &p3dm, sizeof(POINT3DM)); - loc+=sizeof(POINT3DM); - } - curve->points = &newpts; - TYPE_SETZM(curve->type, 0, 1); - lwcircstring_serialize_buf(curve, optr, retsize); - lwfree(newpts.serialized_pointlist); - lwfree(curve); - return; - } - - if ( type == POLYGONTYPE ) - { - poly = lwpoly_deserialize(serialized); - TYPE_SETZM(newpts.dims, 0, 1); - newpts.npoints = 0; - newpts.serialized_pointlist = lwalloc(1); - nrings = lwalloc(sizeof(POINTARRAY *)*poly->nrings); - loc = newpts.serialized_pointlist; - for (j=0; jnrings; j++) - { - POINTARRAY *ring = poly->rings[j]; - POINTARRAY *nring = lwalloc(sizeof(POINTARRAY)); - TYPE_SETZM(nring->dims, 0, 1); - nring->npoints = ring->npoints; - nring->serialized_pointlist = - lwalloc(ring->npoints*sizeof(POINT3DM)); - loc = nring->serialized_pointlist; - for (k=0; knpoints; k++) - { - getPoint3dm_p(ring, k, &p3dm); - memcpy(loc, &p3dm, sizeof(POINT3DM)); - loc+=sizeof(POINT3DM); - } - nrings[j] = nring; - } - poly->rings = nrings; - TYPE_SETZM(poly->type, 0, 1); - lwpoly_serialize_buf(poly, optr, retsize); - lwfree(poly); - /** @todo TODO: free nrigs[*]->serialized_pointlist - */ - - LWDEBUG(3, "lwgeom_force3dm_recursive returning"); - - return; - } - - if ( type != MULTIPOINTTYPE && type != MULTIPOLYGONTYPE && - type != MULTILINETYPE && type != COLLECTIONTYPE && - type != COMPOUNDTYPE && type != CURVEPOLYTYPE && - type != MULTICURVETYPE && type != MULTISURFACETYPE) - { - lwerror("lwgeom_force3dm_recursive: unknown geometry: %d", - type); - } - - /* - * OK, this is a collection, so we write down its metadata - * first and then call us again - */ - - LWDEBUGF(3, "lwgeom_force3dm_recursive: it's a collection (%s)", lwgeom_typename(type)); - - - /* Add type */ - newtypefl = lwgeom_makeType_full(0, 1, lwgeom_hasSRID(serialized[0]), - type, lwgeom_hasBBOX(serialized[0])); - optr[0] = newtypefl; - optr++; - totsize++; - loc=serialized+1; - - LWDEBUGF(3, "lwgeom_force3dm_recursive: added collection type (%s[%s]) - size:%d", lwgeom_typename(type), lwgeom_typeflags(newtypefl), totsize); - - if ( lwgeom_hasBBOX(serialized[0]) != lwgeom_hasBBOX(newtypefl) ) - lwerror("typeflag mismatch in BBOX"); - if ( lwgeom_hasSRID(serialized[0]) != lwgeom_hasSRID(newtypefl) ) - lwerror("typeflag mismatch in SRID"); - - /* Add BBOX if any */ - if (lwgeom_hasBBOX(serialized[0])) - { - memcpy(optr, loc, sizeof(BOX2DFLOAT4)); - optr += sizeof(BOX2DFLOAT4); - totsize += sizeof(BOX2DFLOAT4); - loc += sizeof(BOX2DFLOAT4); - - LWDEBUGF(3, "lwgeom_force3dm_recursive: added collection bbox - size:%d", totsize); - } - - /* Add SRID if any */ - if (lwgeom_hasSRID(serialized[0])) - { - memcpy(optr, loc, 4); - optr += 4; - totsize += 4; - loc += 4; - - LWDEBUGF(3, "lwgeom_force3dm_recursive: added collection SRID - size:%d", totsize); - } - - /* Add numsubobjects */ - memcpy(optr, loc, sizeof(uint32)); - optr += sizeof(uint32); - totsize += sizeof(uint32); - loc += sizeof(uint32); - - LWDEBUGF(3, "lwgeom_force3dm_recursive: added collection ngeoms - size:%d", totsize); - - LWDEBUG(3, "lwgeom_force3dm_recursive: inspecting subgeoms"); - - /* Now recurse for each subobject */ - inspected = lwgeom_inspect(serialized); - for (i=0; ingeometries; i++) - { - uchar *subgeom = lwgeom_getsubgeometry_inspected(inspected, i); - lwgeom_force3dm_recursive(subgeom, optr, &size); - totsize += size; - optr += size; - - LWDEBUGF(3, "lwgeom_force3dm_recursive: added elem %d size: %d (tot: %d)", - i, size, totsize); - } - lwinspected_release(inspected); - - LWDEBUG(3, "lwgeom_force3dm_recursive returning"); - - if ( retsize ) *retsize = totsize; -} - - -/* - * Write to already allocated memory 'optr' a 4d version of - * the given serialized form. - * Pad dimensions are set to 0 (this might be z, m or both). - * Return number bytes written in given int pointer. - */ -void -lwgeom_force4d_recursive(uchar *serialized, uchar *optr, size_t *retsize) -{ - LWGEOM_INSPECTED *inspected; - int i,j,k; - size_t totsize=0; - size_t size=0; - int type; - LWPOINT *point = NULL; - LWLINE *line = NULL; - LWCIRCSTRING *curve = NULL; - LWPOLY *poly = NULL; - POINTARRAY newpts; - POINTARRAY **nrings; - POINT4D p4d; - uchar *loc; - - - LWDEBUG(2, "lwgeom_force4d_recursive: call"); - - type = lwgeom_getType(serialized[0]); - - if ( type == POINTTYPE ) - { - point = lwpoint_deserialize(serialized); - TYPE_SETZM(newpts.dims, 1, 1); - newpts.npoints = 1; - newpts.serialized_pointlist = lwalloc(sizeof(POINT4D)); - loc = newpts.serialized_pointlist; - getPoint4d_p(point->point, 0, &p4d); - memcpy(loc, &p4d, sizeof(POINT4D)); - point->point = &newpts; - TYPE_SETZM(point->type, 1, 1); - lwpoint_serialize_buf(point, optr, retsize); - - LWDEBUGF(3, "lwgeom_force4d_recursive: it's a point, size:%d", *retsize); - - return; - } - - if ( type == LINETYPE ) - { - LWDEBUG(3, "lwgeom_force4d_recursive: it's a line"); - - line = lwline_deserialize(serialized); - TYPE_SETZM(newpts.dims, 1, 1); - newpts.npoints = line->points->npoints; - newpts.serialized_pointlist = lwalloc(sizeof(POINT4D)*line->points->npoints); - loc = newpts.serialized_pointlist; - for (j=0; jpoints->npoints; j++) - { - getPoint4d_p(line->points, j, &p4d); - memcpy(loc, &p4d, sizeof(POINT4D)); - loc+=sizeof(POINT4D); - } - line->points = &newpts; - TYPE_SETZM(line->type, 1, 1); - lwline_serialize_buf(line, optr, retsize); - - LWDEBUGF(3, "lwgeom_force4d_recursive: it's a line, size:%d", *retsize); - - return; - } - - if ( type == CIRCSTRINGTYPE ) - { - curve = lwcircstring_deserialize(serialized); - TYPE_SETZM(newpts.dims, 1, 1); - newpts.npoints = curve->points->npoints; - newpts.serialized_pointlist = lwalloc(sizeof(POINT4D)*curve->points->npoints); - loc = newpts.serialized_pointlist; - for (j=0; jpoints->npoints; j++) - { - getPoint4d_p(curve->points, j, &p4d); - memcpy(loc, &p4d, sizeof(POINT4D)); - loc+=sizeof(POINT4D); - } - curve->points = &newpts; - TYPE_SETZM(curve->type, 1, 1); - lwcircstring_serialize_buf(curve, optr, retsize); - - LWDEBUGF(3, "lwgeom_force4d_recursive: it's a circularstring, size:%d", *retsize); - - return; - } - - if ( type == POLYGONTYPE ) - { - poly = lwpoly_deserialize(serialized); - TYPE_SETZM(newpts.dims, 1, 1); - newpts.npoints = 0; - newpts.serialized_pointlist = lwalloc(1); - nrings = lwalloc(sizeof(POINTARRAY *)*poly->nrings); - loc = newpts.serialized_pointlist; - for (j=0; jnrings; j++) - { - POINTARRAY *ring = poly->rings[j]; - POINTARRAY *nring = lwalloc(sizeof(POINTARRAY)); - TYPE_SETZM(nring->dims, 1, 1); - nring->npoints = ring->npoints; - nring->serialized_pointlist = - lwalloc(ring->npoints*sizeof(POINT4D)); - loc = nring->serialized_pointlist; - for (k=0; knpoints; k++) - { - getPoint4d_p(ring, k, &p4d); - memcpy(loc, &p4d, sizeof(POINT4D)); - loc+=sizeof(POINT4D); - } - nrings[j] = nring; - } - poly->rings = nrings; - TYPE_SETZM(poly->type, 1, 1); - lwpoly_serialize_buf(poly, optr, retsize); - - LWDEBUGF(3, "lwgeom_force4d_recursive: it's a poly, size:%d", *retsize); - - return; - } - - /* - * OK, this is a collection, so we write down its metadata - * first and then call us again - */ - - LWDEBUGF(3, "lwgeom_force4d_recursive: it's a collection (type:%d)", type); - - /* Add type */ - *optr = lwgeom_makeType_full( - 1, 1, - lwgeom_hasSRID(serialized[0]), - type, lwgeom_hasBBOX(serialized[0])); - optr++; - totsize++; - loc=serialized+1; - - /* Add BBOX if any */ - if (lwgeom_hasBBOX(serialized[0])) - { - memcpy(optr, loc, sizeof(BOX2DFLOAT4)); - optr += sizeof(BOX2DFLOAT4); - totsize += sizeof(BOX2DFLOAT4); - loc += sizeof(BOX2DFLOAT4); - } - - /* Add SRID if any */ - if (lwgeom_hasSRID(serialized[0])) - { - memcpy(optr, loc, 4); - optr += 4; - totsize += 4; - loc += 4; - } - - /* Add numsubobjects */ - memcpy(optr, loc, 4); - optr += 4; - totsize += 4; - - LWDEBUGF(3, " collection header size:%d", totsize); + GSERIALIZED *result; + GSERIALIZED *geom1 = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *geom2 = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + LWGEOM *theline; + LWGEOM *lwgeom1 = lwgeom_from_gserialized(geom1); + LWGEOM *lwgeom2 = lwgeom_from_gserialized(geom2); - /* Now recurse for each suboject */ - inspected = lwgeom_inspect(serialized); - for (i=0; ingeometries; i++) + if (lwgeom1->srid != lwgeom2->srid) { - uchar *subgeom = lwgeom_getsubgeometry_inspected(inspected, i); - lwgeom_force4d_recursive(subgeom, optr, &size); - totsize += size; - optr += size; - - LWDEBUGF(3, " elem %d size: %d (tot: %d)", i, size, totsize); + elog(ERROR,"Operation on two GEOMETRIES with different SRIDs\n"); + PG_RETURN_NULL(); } - lwinspected_release(inspected); - - *retsize = totsize; -} - -/* transform input geometry to 2d if not 2d already */ -PG_FUNCTION_INFO_V1(LWGEOM_force_2d); -Datum LWGEOM_force_2d(PG_FUNCTION_ARGS) -{ - PG_LWGEOM *geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - uchar *srl; - PG_LWGEOM *result; - size_t size = 0; - - /* already 2d */ - if ( lwgeom_ndims(geom->type) == 2 ) PG_RETURN_POINTER(geom); - - /* allocate a larger for safety and simplicity */ - srl = lwalloc(VARSIZE(geom)); - lwgeom_force2d_recursive(SERIALIZED_FORM(geom), - srl, &size); + theline = lw_dist2d_distanceline(lwgeom1, lwgeom2, lwgeom1->srid, DIST_MAX); + + if (lwgeom_is_empty(theline)) + PG_RETURN_NULL(); - result = PG_LWGEOM_construct(srl, pglwgeom_getSRID(geom), - lwgeom_hasBBOX(geom->type)); - PG_FREE_IF_COPY(geom, 0); + result = geometry_serialize(theline); + lwgeom_free(theline); + lwgeom_free(lwgeom1); + lwgeom_free(lwgeom2); + PG_FREE_IF_COPY(geom1, 0); + PG_FREE_IF_COPY(geom2, 1); PG_RETURN_POINTER(result); } - -/* transform input geometry to 3dz if not 3dz already */ -PG_FUNCTION_INFO_V1(LWGEOM_force_3dz); -Datum LWGEOM_force_3dz(PG_FUNCTION_ARGS) +/** + Minimum 2d distance between objects in geom1 and geom2. + */ +PG_FUNCTION_INFO_V1(LWGEOM_mindistance2d); +Datum LWGEOM_mindistance2d(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - uchar *srl; - PG_LWGEOM *result; - int olddims; - size_t size = 0; - - olddims = lwgeom_ndims(geom->type); - - /* already 3d */ - if ( olddims == 3 && TYPE_HASZ(geom->type) ) PG_RETURN_POINTER(geom); + double mindist; + GSERIALIZED *geom1 = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *geom2 = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + LWGEOM *lwgeom1 = lwgeom_from_gserialized(geom1); + LWGEOM *lwgeom2 = lwgeom_from_gserialized(geom2); - if ( olddims > 3 ) + if (lwgeom1->srid != lwgeom2->srid) { - srl = lwalloc(VARSIZE(geom)); - } - else - { - /* allocate double as memory a larger for safety */ - srl = lwalloc(VARSIZE(geom)*1.5); + elog(ERROR,"Operation on two GEOMETRIES with different SRIDs\n"); + PG_RETURN_NULL(); } - lwgeom_force3dz_recursive(SERIALIZED_FORM(geom), - srl, &size); + mindist = lwgeom_mindistance2d(lwgeom1, lwgeom2); - result = PG_LWGEOM_construct(srl, pglwgeom_getSRID(geom), - lwgeom_hasBBOX(geom->type)); + lwgeom_free(lwgeom1); + lwgeom_free(lwgeom2); - PG_FREE_IF_COPY(geom, 0); - PG_RETURN_POINTER(result); + PG_FREE_IF_COPY(geom1, 0); + PG_FREE_IF_COPY(geom2, 1); + + /*if called with empty geometries the ingoing mindistance is untouched, and makes us return NULL*/ + if (mindisttype); - - /* already 3dm */ - if ( olddims == 3 && TYPE_HASM(geom->type) ) PG_RETURN_POINTER(geom); + double mindist; + GSERIALIZED *geom1 = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *geom2 = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + double tolerance = PG_GETARG_FLOAT8(2); + LWGEOM *lwgeom1 = lwgeom_from_gserialized(geom1); + LWGEOM *lwgeom2 = lwgeom_from_gserialized(geom2); - if ( olddims > 3 ) + if ( tolerance < 0 ) { - size = VARSIZE(geom); + elog(ERROR,"Tolerance cannot be less than zero\n"); + PG_RETURN_NULL(); } - else + + if (lwgeom1->srid != lwgeom2->srid) { - /* allocate double as memory a larger for safety */ - size = VARSIZE(geom) * 2; + elog(ERROR,"Operation on two GEOMETRIES with different SRIDs\n"); + PG_RETURN_NULL(); } - srl = lwalloc(size); - - POSTGIS_DEBUGF(3, "LWGEOM_force_3dm: allocated %d bytes for result", (int)size); - - lwgeom_force3dm_recursive(SERIALIZED_FORM(geom), - srl, &size); - - POSTGIS_DEBUGF(3, "LWGEOM_force_3dm: lwgeom_force3dm_recursive returned a %d sized geom", (int)size); - - result = PG_LWGEOM_construct(srl, pglwgeom_getSRID(geom), - lwgeom_hasBBOX(geom->type)); - - PG_FREE_IF_COPY(geom, 0); - - PG_RETURN_POINTER(result); -} - -/* transform input geometry to 4d if not 4d already */ -PG_FUNCTION_INFO_V1(LWGEOM_force_4d); -Datum LWGEOM_force_4d(PG_FUNCTION_ARGS) -{ - PG_LWGEOM *geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - uchar *srl; - PG_LWGEOM *result; - int olddims; - size_t size = 0; - - olddims = lwgeom_ndims(geom->type); - - /* already 4d */ - if ( olddims == 4 ) PG_RETURN_POINTER(geom); - - /* allocate double as memory a larger for safety */ - srl = lwalloc(VARSIZE(geom)*2); - - lwgeom_force4d_recursive(SERIALIZED_FORM(geom), - srl, &size); - result = PG_LWGEOM_construct(srl, pglwgeom_getSRID(geom), - lwgeom_hasBBOX(geom->type)); + mindist = lwgeom_mindistance2d_tolerance(lwgeom1,lwgeom2,tolerance); - PG_FREE_IF_COPY(geom, 0); - - PG_RETURN_POINTER(result); + PG_FREE_IF_COPY(geom1, 0); + PG_FREE_IF_COPY(geom2, 1); + /*empty geometries cases should be right handled since return from underlying + functions should be MAXFLOAT which causes false as answer*/ + PG_RETURN_BOOL(tolerance >= mindist); } -/** transform input geometry to a collection type */ -PG_FUNCTION_INFO_V1(LWGEOM_force_collection); -Datum LWGEOM_force_collection(PG_FUNCTION_ARGS) +/** +Returns boolean describing if +maximum 2d distance between objects in +geom1 and geom2 is shorter than tolerance +*/ +PG_FUNCTION_INFO_V1(LWGEOM_dfullywithin); +Datum LWGEOM_dfullywithin(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_LWGEOM *result; - LWGEOM *lwgeoms[1]; - LWGEOM *lwgeom; - int SRID; - BOX2DFLOAT4 *bbox; - - POSTGIS_DEBUG(2, "LWGEOM_force_collection called"); - - /* - * This funx is a no-op only if a bbox cache is already present - * in input. If bbox cache is not there we'll need to handle - * automatic bbox addition FOR_COMPLEX_GEOMS. - */ - if ( TYPE_GETTYPE(geom->type) == COLLECTIONTYPE && - TYPE_HASBBOX(geom->type) ) - { - PG_RETURN_POINTER(geom); - } - - /* deserialize into lwgeoms[0] */ - lwgeom = lwgeom_deserialize(SERIALIZED_FORM(geom)); + double maxdist; + GSERIALIZED *geom1 = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *geom2 = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + double tolerance = PG_GETARG_FLOAT8(2); + LWGEOM *lwgeom1 = lwgeom_from_gserialized(geom1); + LWGEOM *lwgeom2 = lwgeom_from_gserialized(geom2); - /* alread a multi*, just make it a collection */ - if ( lwgeom_is_collection(TYPE_GETTYPE(lwgeom->type)) ) + if ( tolerance < 0 ) { - TYPE_SETTYPE(lwgeom->type, COLLECTIONTYPE); + elog(ERROR,"Tolerance cannot be less than zero\n"); + PG_RETURN_NULL(); } - /* single geom, make it a collection */ - else + if (lwgeom1->srid != lwgeom2->srid) { - SRID = lwgeom->SRID; - /* We transfer bbox ownership from input to output */ - bbox = lwgeom->bbox; - lwgeom->SRID = -1; - lwgeom->bbox = NULL; - lwgeoms[0] = lwgeom; - lwgeom = (LWGEOM *)lwcollection_construct(COLLECTIONTYPE, - SRID, bbox, 1, - lwgeoms); + elog(ERROR,"Operation on two GEOMETRIES with different SRIDs\n"); + PG_RETURN_NULL(); } + + maxdist = lwgeom_maxdistance2d_tolerance(lwgeom1, lwgeom2, tolerance); - result = pglwgeom_serialize(lwgeom); - lwgeom_release(lwgeom); - - PG_FREE_IF_COPY(geom, 0); - - PG_RETURN_POINTER(result); + PG_FREE_IF_COPY(geom1, 0); + PG_FREE_IF_COPY(geom2, 1); + + /*If function is feed with empty geometries we should return false*/ + if (maxdist>-1) + PG_RETURN_BOOL(tolerance >= maxdist); + + PG_RETURN_BOOL(LW_FALSE); } -/** transform input geometry to a multi* type */ -PG_FUNCTION_INFO_V1(LWGEOM_force_multi); -Datum LWGEOM_force_multi(PG_FUNCTION_ARGS) +/** + Maximum 2d distance between objects in geom1 and geom2. + */ +PG_FUNCTION_INFO_V1(LWGEOM_maxdistance2d_linestring); +Datum LWGEOM_maxdistance2d_linestring(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_LWGEOM *result; - LWGEOM *lwgeom; - LWGEOM *ogeom; - - POSTGIS_DEBUG(2, "LWGEOM_force_multi called"); + double maxdist; + GSERIALIZED *geom1 = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *geom2 = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + LWGEOM *lwgeom1 = lwgeom_from_gserialized(geom1); + LWGEOM *lwgeom2 = lwgeom_from_gserialized(geom2); - /* - ** This funx is a no-op only if a bbox cache is already present - ** in input. If bbox cache is not there we'll need to handle - ** automatic bbox addition FOR_COMPLEX_GEOMS. - */ - if ( lwgeom_is_collection(TYPE_GETTYPE(geom->type)) && TYPE_HASBBOX(geom->type) ) + if (lwgeom1->srid != lwgeom2->srid) { - PG_RETURN_POINTER(geom); + elog(ERROR,"Operation on two GEOMETRIES with different SRIDs\n"); + PG_RETURN_NULL(); } + maxdist = lwgeom_maxdistance2d(lwgeom1, lwgeom2); - /* deserialize into lwgeoms[0] */ - lwgeom = lwgeom_deserialize(SERIALIZED_FORM(geom)); - ogeom = lwgeom_as_multi(lwgeom); - - result = pglwgeom_serialize(ogeom); - - PG_FREE_IF_COPY(geom, 0); - - PG_RETURN_POINTER(result); + PG_FREE_IF_COPY(geom1, 0); + PG_FREE_IF_COPY(geom2, 1); + + /*if called with empty geometries the ingoing mindistance is untouched, and makes us return NULL*/ + if (maxdist>-1) + PG_RETURN_FLOAT8(maxdist); + + PG_RETURN_NULL(); } /** -Returns the point in first input geometry that is closest to the second input geometry +Returns the point in first input geometry that is closest to the second input geometry in 3D */ -PG_FUNCTION_INFO_V1(LWGEOM_closestpoint); -Datum LWGEOM_closestpoint(PG_FUNCTION_ARGS) +PG_FUNCTION_INFO_V1(LWGEOM_closestpoint3d); +Datum LWGEOM_closestpoint3d(PG_FUNCTION_ARGS) { - - - int srid; - PG_LWGEOM *geom1; - PG_LWGEOM *geom2; - - PG_LWGEOM *result=NULL; + GSERIALIZED *result; + GSERIALIZED *geom1 = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *geom2 = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); LWGEOM *point; + LWGEOM *lwgeom1 = lwgeom_from_gserialized(geom1); + LWGEOM *lwgeom2 = lwgeom_from_gserialized(geom2); - geom1 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - geom2 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - - if (pglwgeom_getSRID(geom1) != pglwgeom_getSRID(geom2)) + if (lwgeom1->srid != lwgeom2->srid) { elog(ERROR,"Operation on two GEOMETRIES with different SRIDs\n"); PG_RETURN_NULL(); } - srid = pglwgeom_getSRID(geom1); + point = lw_dist3d_distancepoint(lwgeom1, lwgeom2, lwgeom1->srid, DIST_MIN); - point = lw_dist2d_distancepoint( SERIALIZED_FORM(geom1),SERIALIZED_FORM(geom2), srid, DIST2D_MIN); if (lwgeom_is_empty(point)) - { - PG_RETURN_NULL(); - } - result = pglwgeom_serialize(point); + PG_RETURN_NULL(); + + result = geometry_serialize(point); + + lwgeom_free(point); + lwgeom_free(lwgeom1); + lwgeom_free(lwgeom2); + + PG_FREE_IF_COPY(geom1, 0); + PG_FREE_IF_COPY(geom2, 1); PG_RETURN_POINTER(result); } /** -Returns the shortest line between two geometries +Returns the shortest line between two geometries in 3D */ -PG_FUNCTION_INFO_V1(LWGEOM_shortestline2d); -Datum LWGEOM_shortestline2d(PG_FUNCTION_ARGS) +PG_FUNCTION_INFO_V1(LWGEOM_shortestline3d); +Datum LWGEOM_shortestline3d(PG_FUNCTION_ARGS) { - int srid; - PG_LWGEOM *geom1; - PG_LWGEOM *geom2; - - PG_LWGEOM *result=NULL; + GSERIALIZED *result; + GSERIALIZED *geom1 = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *geom2 = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); LWGEOM *theline; + LWGEOM *lwgeom1 = lwgeom_from_gserialized(geom1); + LWGEOM *lwgeom2 = lwgeom_from_gserialized(geom2); - geom1 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - geom2 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - - if (pglwgeom_getSRID(geom1) != pglwgeom_getSRID(geom2)) + if (lwgeom1->srid != lwgeom2->srid) { elog(ERROR,"Operation on two GEOMETRIES with different SRIDs\n"); PG_RETURN_NULL(); } - srid = pglwgeom_getSRID(geom1); - - theline = lw_dist2d_distanceline( SERIALIZED_FORM(geom1),SERIALIZED_FORM(geom2), srid, DIST2D_MIN); + theline = lw_dist3d_distanceline(lwgeom1, lwgeom2, lwgeom1->srid, DIST_MIN); + if (lwgeom_is_empty(theline)) - { PG_RETURN_NULL(); - } - result = pglwgeom_serialize(theline); + + result = geometry_serialize(theline); + + lwgeom_free(theline); + lwgeom_free(lwgeom1); + lwgeom_free(lwgeom2); + + PG_FREE_IF_COPY(geom1, 0); + PG_FREE_IF_COPY(geom2, 1); PG_RETURN_POINTER(result); } /** -Returns the longest line between two geometries +Returns the longest line between two geometries in 3D */ -PG_FUNCTION_INFO_V1(LWGEOM_longestline2d); -Datum LWGEOM_longestline2d(PG_FUNCTION_ARGS) +PG_FUNCTION_INFO_V1(LWGEOM_longestline3d); +Datum LWGEOM_longestline3d(PG_FUNCTION_ARGS) { - int srid; - PG_LWGEOM *geom1; - PG_LWGEOM *geom2; - - PG_LWGEOM *result=NULL; + GSERIALIZED *result; + GSERIALIZED *geom1 = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *geom2 = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); LWGEOM *theline; + LWGEOM *lwgeom1 = lwgeom_from_gserialized(geom1); + LWGEOM *lwgeom2 = lwgeom_from_gserialized(geom2); - geom1 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - geom2 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - - if (pglwgeom_getSRID(geom1) != pglwgeom_getSRID(geom2)) + if (lwgeom1->srid != lwgeom2->srid) { elog(ERROR,"Operation on two GEOMETRIES with different SRIDs\n"); PG_RETURN_NULL(); } - srid = pglwgeom_getSRID(geom1); - - theline = lw_dist2d_distanceline( SERIALIZED_FORM(geom1),SERIALIZED_FORM(geom2), srid, DIST2D_MAX); + theline = lw_dist3d_distanceline(lwgeom1, lwgeom2, lwgeom1->srid, DIST_MAX); + if (lwgeom_is_empty(theline)) - { PG_RETURN_NULL(); - } - result = pglwgeom_serialize(theline); + + result = geometry_serialize(theline); + + lwgeom_free(theline); + lwgeom_free(lwgeom1); + lwgeom_free(lwgeom2); + + PG_FREE_IF_COPY(geom1, 0); + PG_FREE_IF_COPY(geom2, 1); PG_RETURN_POINTER(result); } /** - Minimum 2d distance between objects in geom1 and geom2. + Minimum 2d distance between objects in geom1 and geom2 in 3D */ -PG_FUNCTION_INFO_V1(LWGEOM_mindistance2d); -Datum LWGEOM_mindistance2d(PG_FUNCTION_ARGS) +PG_FUNCTION_INFO_V1(LWGEOM_mindistance3d); +Datum LWGEOM_mindistance3d(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom1; - PG_LWGEOM *geom2; double mindist; + GSERIALIZED *geom1 = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *geom2 = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + LWGEOM *lwgeom1 = lwgeom_from_gserialized(geom1); + LWGEOM *lwgeom2 = lwgeom_from_gserialized(geom2); - PROFSTART(PROF_QRUN); - - geom1 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - geom2 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - - if (pglwgeom_getSRID(geom1) != pglwgeom_getSRID(geom2)) + if (lwgeom1->srid != lwgeom2->srid) { elog(ERROR,"Operation on two GEOMETRIES with different SRIDs\n"); PG_RETURN_NULL(); } - mindist = lwgeom_mindistance2d(SERIALIZED_FORM(geom1), - SERIALIZED_FORM(geom2)); - - PROFSTOP(PROF_QRUN); - PROFREPORT("dist",geom1, geom2, NULL); + mindist = lwgeom_mindistance3d(lwgeom1, lwgeom2); PG_FREE_IF_COPY(geom1, 0); PG_FREE_IF_COPY(geom2, 1); + /*if called with empty geometries the ingoing mindistance is untouched, and makes us return NULL*/ if (mindistsrid != lwgeom2->srid) { elog(ERROR,"Operation on two GEOMETRIES with different SRIDs\n"); PG_RETURN_NULL(); } - mindist = lwgeom_mindistance2d_tolerance( - SERIALIZED_FORM(geom1), - SERIALIZED_FORM(geom2), - tolerance - ); - - PROFSTOP(PROF_QRUN); - PROFREPORT("dist",geom1, geom2, NULL); + mindist = lwgeom_mindistance3d_tolerance(lwgeom1,lwgeom2,tolerance); PG_FREE_IF_COPY(geom1, 0); PG_FREE_IF_COPY(geom2, 1); + /*empty geometries cases should be right handled since return from underlying functions should be MAXFLOAT which causes false as answer*/ PG_RETURN_BOOL(tolerance >= mindist); @@ -1730,21 +923,18 @@ /** Returns boolean describing if -maximum 2d distance between objects in +maximum 3d distance between objects in geom1 and geom2 is shorter than tolerance */ -PG_FUNCTION_INFO_V1(LWGEOM_dfullywithin); -Datum LWGEOM_dfullywithin(PG_FUNCTION_ARGS) +PG_FUNCTION_INFO_V1(LWGEOM_dfullywithin3d); +Datum LWGEOM_dfullywithin3d(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom1; - PG_LWGEOM *geom2; - double maxdist, tolerance; - - PROFSTART(PROF_QRUN); - - geom1 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - geom2 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - tolerance = PG_GETARG_FLOAT8(2); + double maxdist; + GSERIALIZED *geom1 = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *geom2 = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + double tolerance = PG_GETARG_FLOAT8(2); + LWGEOM *lwgeom1 = lwgeom_from_gserialized(geom1); + LWGEOM *lwgeom2 = lwgeom_from_gserialized(geom2); if ( tolerance < 0 ) { @@ -1752,64 +942,50 @@ PG_RETURN_NULL(); } - if (pglwgeom_getSRID(geom1) != pglwgeom_getSRID(geom2)) + if (lwgeom1->srid != lwgeom2->srid) { elog(ERROR,"Operation on two GEOMETRIES with different SRIDs\n"); PG_RETURN_NULL(); } - maxdist = lwgeom_maxdistance2d_tolerance( - SERIALIZED_FORM(geom1), - SERIALIZED_FORM(geom2), - tolerance - ); - PROFSTOP(PROF_QRUN); - PROFREPORT("dist",geom1, geom2, NULL); + maxdist = lwgeom_maxdistance3d_tolerance(lwgeom1, lwgeom2, tolerance); PG_FREE_IF_COPY(geom1, 0); PG_FREE_IF_COPY(geom2, 1); + /*If function is feed with empty geometries we should return false*/ if (maxdist>-1) - { PG_RETURN_BOOL(tolerance >= maxdist); - } + PG_RETURN_BOOL(LW_FALSE); } /** - Maximum 2d distance between objects in geom1 and geom2. + Maximum 3d distance between objects in geom1 and geom2. */ -PG_FUNCTION_INFO_V1(LWGEOM_maxdistance2d_linestring); -Datum LWGEOM_maxdistance2d_linestring(PG_FUNCTION_ARGS) +PG_FUNCTION_INFO_V1(LWGEOM_maxdistance3d); +Datum LWGEOM_maxdistance3d(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom1; - PG_LWGEOM *geom2; double maxdist; + GSERIALIZED *geom1 = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *geom2 = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + LWGEOM *lwgeom1 = lwgeom_from_gserialized(geom1); + LWGEOM *lwgeom2 = lwgeom_from_gserialized(geom2); - PROFSTART(PROF_QRUN); - - geom1 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - geom2 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - - if (pglwgeom_getSRID(geom1) != pglwgeom_getSRID(geom2)) + if (lwgeom1->srid != lwgeom2->srid) { elog(ERROR,"Operation on two GEOMETRIES with different SRIDs\n"); PG_RETURN_NULL(); } - - maxdist = lwgeom_maxdistance2d(SERIALIZED_FORM(geom1), - SERIALIZED_FORM(geom2)); - - PROFSTOP(PROF_QRUN); - PROFREPORT("maxdist",geom1, geom2, NULL); + maxdist = lwgeom_maxdistance3d(lwgeom1, lwgeom2); PG_FREE_IF_COPY(geom1, 0); PG_FREE_IF_COPY(geom2, 1); + /*if called with empty geometries the ingoing mindistance is untouched, and makes us return NULL*/ if (maxdist>-1) - { PG_RETURN_FLOAT8(maxdist); - } + PG_RETURN_NULL(); } @@ -1817,14 +993,14 @@ PG_FUNCTION_INFO_V1(LWGEOM_longitude_shift); Datum LWGEOM_longitude_shift(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom; + GSERIALIZED *geom; LWGEOM *lwgeom; - PG_LWGEOM *ret; + GSERIALIZED *ret; POSTGIS_DEBUG(2, "LWGEOM_longitude_shift called."); - geom = (PG_LWGEOM *)PG_DETOAST_DATUM_COPY(PG_GETARG_DATUM(0)); - lwgeom = pglwgeom_deserialize(geom); + geom = (GSERIALIZED *)PG_DETOAST_DATUM_COPY(PG_GETARG_DATUM(0)); + lwgeom = lwgeom_from_gserialized(geom); /* Drop bbox, will be recomputed */ lwgeom_drop_bbox(lwgeom); @@ -1832,11 +1008,11 @@ /* Modify geometry */ lwgeom_longitude_shift(lwgeom); - /* Construct PG_LWGEOM */ - ret = pglwgeom_serialize(lwgeom); + /* Construct GSERIALIZED */ + ret = geometry_serialize(lwgeom); /* Release deserialized geometry */ - lwgeom_release(lwgeom); + lwgeom_free(lwgeom); /* Release detoasted geometry */ pfree(geom); @@ -1847,15 +1023,15 @@ PG_FUNCTION_INFO_V1(LWGEOM_inside_circle_point); Datum LWGEOM_inside_circle_point(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom; + GSERIALIZED *geom; double cx = PG_GETARG_FLOAT8(1); double cy = PG_GETARG_FLOAT8(2); double rr = PG_GETARG_FLOAT8(3); LWPOINT *point; POINT2D pt; - geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - point = lwpoint_deserialize(SERIALIZED_FORM(geom)); + geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + point = lwgeom_as_lwpoint(lwgeom_from_gserialized(geom)); if ( point == NULL ) { PG_FREE_IF_COPY(geom, 0); @@ -1879,214 +1055,71 @@ PG_FUNCTION_INFO_V1(LWGEOM_collect); Datum LWGEOM_collect(PG_FUNCTION_ARGS) { - Pointer geom1_ptr = PG_GETARG_POINTER(0); - Pointer geom2_ptr = PG_GETARG_POINTER(1); - PG_LWGEOM *pglwgeom1, *pglwgeom2, *result; + GSERIALIZED *gser1, *gser2, *result; LWGEOM *lwgeoms[2], *outlwg; - unsigned int type1, type2, outtype; - BOX2DFLOAT4 *box=NULL; - int SRID; + uint32 type1, type2; + uint8_t outtype; + int srid; POSTGIS_DEBUG(2, "LWGEOM_collect called."); /* return null if both geoms are null */ - if ( (geom1_ptr == NULL) && (geom2_ptr == NULL) ) - { + if ( PG_ARGISNULL(0) && PG_ARGISNULL(1) ) PG_RETURN_NULL(); - } - - /* return a copy of the second geom if only first geom is null */ - if (geom1_ptr == NULL) - { - result = (PG_LWGEOM *)PG_DETOAST_DATUM_COPY(PG_GETARG_DATUM(1)); - PG_RETURN_POINTER(result); - } - /* return a copy of the first geom if only second geom is null */ - if (geom2_ptr == NULL) - { - result = (PG_LWGEOM *)PG_DETOAST_DATUM_COPY(PG_GETARG_DATUM(0)); - PG_RETURN_POINTER(result); - } + /* Return the second geom if the first geom is null */ + if (PG_ARGISNULL(0)) + PG_RETURN_DATUM(PG_GETARG_DATUM(1)); + /* Return the first geom if the second geom is null */ + if (PG_ARGISNULL(1)) + PG_RETURN_DATUM(PG_GETARG_DATUM(0)); - pglwgeom1 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - pglwgeom2 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + gser1 = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + gser2 = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - POSTGIS_DEBUGF(3, "LWGEOM_collect(%s, %s): call", lwgeom_typename(TYPE_GETTYPE(pglwgeom1->type)), lwgeom_typename(TYPE_GETTYPE(pglwgeom2->type))); + POSTGIS_DEBUGF(3, "LWGEOM_collect(%s, %s): call", lwtype_name(gserialized_get_type(gser1)), lwtype_name(gserialized_get_type(gser2))); -#if 0 - if ( pglwgeom_getSRID(pglwgeom1) != pglwgeom_getSRID(pglwgeom2) ) + if ( FLAGS_GET_ZM(gser1->flags) != FLAGS_GET_ZM(gser2->flags) ) { - elog(ERROR, "Operation on two GEOMETRIES with different SRIDs\n"); + elog(ERROR,"Cannot ST_Collect geometries with differing dimensionality."); PG_RETURN_NULL(); } -#endif - SRID = pglwgeom_getSRID(pglwgeom1); - errorIfSRIDMismatch(SRID, pglwgeom_getSRID(pglwgeom2)); + srid = gserialized_get_srid(gser1); + error_if_srid_mismatch(srid, gserialized_get_srid(gser2)); - lwgeoms[0] = lwgeom_deserialize(SERIALIZED_FORM(pglwgeom1)); - lwgeoms[1] = lwgeom_deserialize(SERIALIZED_FORM(pglwgeom2)); + lwgeoms[0] = lwgeom_from_gserialized(gser1); + lwgeoms[1] = lwgeom_from_gserialized(gser2); - type1 = TYPE_GETTYPE(lwgeoms[0]->type); - type2 = TYPE_GETTYPE(lwgeoms[1]->type); - if ( type1 == type2 && type1 < 4 ) outtype = type1+3; - else outtype = COLLECTIONTYPE; + type1 = lwgeoms[0]->type; + type2 = lwgeoms[1]->type; + + if ( (type1 == type2) && (!lwgeom_is_collection(lwgeoms[0])) ) + outtype = lwtype_get_collectiontype(type1); + else + outtype = COLLECTIONTYPE; POSTGIS_DEBUGF(3, " outtype = %d", outtype); - /* COMPUTE_BBOX WHEN_SIMPLE */ - if ( lwgeoms[0]->bbox && lwgeoms[1]->bbox ) - { - box = palloc(sizeof(BOX2DFLOAT4)); - box->xmin = LW_MIN(lwgeoms[0]->bbox->xmin, lwgeoms[1]->bbox->xmin); - box->ymin = LW_MIN(lwgeoms[0]->bbox->ymin, lwgeoms[1]->bbox->ymin); - box->xmax = LW_MAX(lwgeoms[0]->bbox->xmax, lwgeoms[1]->bbox->xmax); - box->ymax = LW_MAX(lwgeoms[0]->bbox->ymax, lwgeoms[1]->bbox->ymax); - } - /* Drop input geometries bbox and SRID */ lwgeom_drop_bbox(lwgeoms[0]); - lwgeom_dropSRID(lwgeoms[0]); + lwgeom_drop_srid(lwgeoms[0]); lwgeom_drop_bbox(lwgeoms[1]); - lwgeom_dropSRID(lwgeoms[1]); + lwgeom_drop_srid(lwgeoms[1]); - outlwg = (LWGEOM *)lwcollection_construct( - outtype, SRID, - box, 2, lwgeoms); + outlwg = (LWGEOM *)lwcollection_construct(outtype, srid, NULL, 2, lwgeoms); + result = geometry_serialize(outlwg); - result = pglwgeom_serialize(outlwg); + lwgeom_free(lwgeoms[0]); + lwgeom_free(lwgeoms[1]); - PG_FREE_IF_COPY(pglwgeom1, 0); - PG_FREE_IF_COPY(pglwgeom2, 1); - lwgeom_release(lwgeoms[0]); - lwgeom_release(lwgeoms[1]); + PG_FREE_IF_COPY(gser1, 0); + PG_FREE_IF_COPY(gser2, 1); PG_RETURN_POINTER(result); } -/** - * @brief This is a geometry array constructor - * for use as aggregates sfunc. - * Will have as input an array of Geometry pointers and a Geometry. - * Will DETOAST given geometry and put a pointer to it - * in the given array. DETOASTED value is first copied - * to a safe memory context to avoid premature deletion. - */ -PG_FUNCTION_INFO_V1(LWGEOM_accum); -Datum LWGEOM_accum(PG_FUNCTION_ARGS) -{ - ArrayType *array = NULL; - int nelems; - int lbs=1; - size_t nbytes, oldsize; - Datum datum; - PG_LWGEOM *geom; - ArrayType *result; - Oid oid = get_fn_expr_argtype(fcinfo->flinfo, 1); - - POSTGIS_DEBUG(2, "LWGEOM_accum called"); - - datum = PG_GETARG_DATUM(0); - if ( (Pointer *)datum == NULL ) - { - array = NULL; - nelems = 0; - - POSTGIS_DEBUG(3, "geom_accum: NULL array"); - } - else - { - array = DatumGetArrayTypePCopy(datum); - /*array = PG_GETARG_ARRAYTYPE_P(0); */ - nelems = ArrayGetNItems(ARR_NDIM(array), ARR_DIMS(array)); - - POSTGIS_DEBUGF(3, "geom_accum: array of nelems=%d", nelems); - } - - datum = PG_GETARG_DATUM(1); - /* Do nothing, return state array */ - if ( (Pointer *)datum == NULL ) - { - POSTGIS_DEBUGF(3, "geom_accum: NULL geom, nelems=%d", nelems); - - if ( array == NULL ) PG_RETURN_NULL(); - PG_RETURN_ARRAYTYPE_P(array); - } - - /* Make a DETOASTED copy of input geometry */ - geom = (PG_LWGEOM *)PG_DETOAST_DATUM(datum); - - POSTGIS_DEBUGF(3, "geom_accum: detoasted geom: %p", (void*)geom); - - /* - * Might use a more optimized version instead of lwrealloc'ing - * at every iteration. This is not the bottleneck anyway. - * --strk(TODO); - */ - ++nelems; - if ( nelems == 1 || ! array ) - { - nbytes = ARR_OVERHEAD_NONULLS(1)+INTALIGN(VARSIZE(geom)); - - POSTGIS_DEBUGF(3, "geom_accum: adding %p (nelems=%d; nbytes=%d)", - (void*)geom, nelems, (int)nbytes); - - result = lwalloc(nbytes); - if ( ! result ) - { - elog(ERROR, "Out of virtual memory"); - PG_RETURN_NULL(); - } - - SET_VARSIZE(result, nbytes); - result->ndim = 1; - result->elemtype = oid; - result->dataoffset = 0; - - memcpy(ARR_DIMS(result), &nelems, sizeof(int)); - memcpy(ARR_LBOUND(result), &lbs, sizeof(int)); - memcpy(ARR_DATA_PTR(result), geom, VARSIZE(geom)); - - POSTGIS_DEBUGF(3, " %d bytes memcopied", VARSIZE(geom)); - - } - else - { - oldsize = VARSIZE(array); - nbytes = oldsize + INTALIGN(VARSIZE(geom)); - - POSTGIS_DEBUGF(3, "geom_accum: old array size: %d, adding %ld bytes (nelems=%d; nbytes=%u)", ARR_SIZE(array), INTALIGN(VARSIZE(geom)), nelems, (int)nbytes); - - result = (ArrayType *) lwrealloc(array, nbytes); - if ( ! result ) - { - elog(ERROR, "Out of virtual memory"); - PG_RETURN_NULL(); - } - - POSTGIS_DEBUGF(3, " %d bytes allocated for array", (int)nbytes); - - POSTGIS_DEBUGF(3, " array start @ %p", (void*)result); - POSTGIS_DEBUGF(3, " ARR_DATA_PTR @ %p (%ld)", - ARR_DATA_PTR(result), (uchar *)ARR_DATA_PTR(result)-(uchar *)result); - POSTGIS_DEBUGF(3, " next element @ %p", (uchar *)result+oldsize); - - SET_VARSIZE(result, nbytes); - memcpy(ARR_DIMS(result), &nelems, sizeof(int)); - - POSTGIS_DEBUGF(3, " writing next element starting @ %p", - (void*)(result+oldsize)); - - memcpy((uchar *)result+oldsize, geom, VARSIZE(geom)); - } - - POSTGIS_DEBUG(3, " returning"); - - PG_RETURN_ARRAYTYPE_P(result); - -} /** * @brief collect_garray ( GEOMETRY[] ) returns a geometry which contains @@ -2103,14 +1136,14 @@ Datum datum; ArrayType *array; int nelems; - /*PG_LWGEOM **geoms; */ - PG_LWGEOM *result=NULL; + /*GSERIALIZED **geoms; */ + GSERIALIZED *result=NULL; LWGEOM **lwgeoms, *outlwg; - unsigned int outtype; + uint32 outtype; int i, count; - int SRID=-1; + int srid=SRID_UNKNOWN; size_t offset; - BOX2DFLOAT4 *box=NULL; + GBOX *box=NULL; bits8 *bitmap; int bitmask; @@ -2160,30 +1193,30 @@ /* Don't do anything for NULL values */ if ((bitmap && (*bitmap & bitmask) != 0) || !bitmap) { - PG_LWGEOM *geom = (PG_LWGEOM *)(ARR_DATA_PTR(array)+offset); - unsigned int intype = TYPE_GETTYPE(geom->type); + GSERIALIZED *geom = (GSERIALIZED *)(ARR_DATA_PTR(array)+offset); + uint8_t intype = gserialized_get_type(geom); offset += INTALIGN(VARSIZE(geom)); - lwgeoms[count] = lwgeom_deserialize(SERIALIZED_FORM(geom)); + lwgeoms[count] = lwgeom_from_gserialized(geom); POSTGIS_DEBUGF(3, "LWGEOM_collect_garray: geom %d deserialized", i); if ( ! count ) { /* Get first geometry SRID */ - SRID = lwgeoms[count]->SRID; + srid = lwgeoms[count]->srid; /* COMPUTE_BBOX WHEN_SIMPLE */ if ( lwgeoms[count]->bbox ) { - box = box2d_clone(lwgeoms[count]->bbox); + box = gbox_copy(lwgeoms[count]->bbox); } } else { /* Check SRID homogeneity */ - if ( lwgeoms[count]->SRID != SRID ) + if ( lwgeoms[count]->srid != srid ) { elog(ERROR, "Operation on mixed SRID geometries"); @@ -2195,10 +1228,10 @@ { if ( lwgeoms[count]->bbox ) { - box->xmin = LW_MIN(box->xmin, lwgeoms[count]->bbox->xmin); - box->ymin = LW_MIN(box->ymin, lwgeoms[count]->bbox->ymin); - box->xmax = LW_MAX(box->xmax, lwgeoms[count]->bbox->xmax); - box->ymax = LW_MAX(box->ymax, lwgeoms[count]->bbox->ymax); + box->xmin = Min(box->xmin, lwgeoms[count]->bbox->xmin); + box->ymin = Min(box->ymin, lwgeoms[count]->bbox->ymin); + box->xmax = Max(box->xmax, lwgeoms[count]->bbox->xmax); + box->ymax = Max(box->ymax, lwgeoms[count]->bbox->ymax); } else { @@ -2208,16 +1241,18 @@ } } - lwgeom_dropSRID(lwgeoms[count]); + lwgeom_drop_srid(lwgeoms[count]); lwgeom_drop_bbox(lwgeoms[count]); /* Output type not initialized */ if ( ! outtype ) { /* Input is single, make multi */ - if ( intype < 4 ) outtype = intype+3; + if ( ! lwtype_is_collection(intype) ) + outtype = lwtype_get_collectiontype(intype); /* Input is multi, make collection */ - else outtype = COLLECTIONTYPE; + else + outtype = COLLECTIONTYPE; } /* Input type not compatible with output */ @@ -2253,10 +1288,10 @@ else { outlwg = (LWGEOM *)lwcollection_construct( - outtype, SRID, + outtype, srid, box, count, lwgeoms); - result = pglwgeom_serialize(outlwg); + result = geometry_serialize(outlwg); PG_RETURN_POINTER(result); } @@ -2269,23 +1304,23 @@ PG_FUNCTION_INFO_V1(LWGEOM_line_from_mpoint); Datum LWGEOM_line_from_mpoint(PG_FUNCTION_ARGS) { - PG_LWGEOM *ingeom, *result; + GSERIALIZED *ingeom, *result; LWLINE *lwline; LWMPOINT *mpoint; POSTGIS_DEBUG(2, "LWGEOM_line_from_mpoint called"); - /* Get input PG_LWGEOM and deserialize it */ - ingeom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + /* Get input GSERIALIZED and deserialize it */ + ingeom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - if ( TYPE_GETTYPE(ingeom->type) != MULTIPOINTTYPE ) + if ( gserialized_get_type(ingeom) != MULTIPOINTTYPE ) { elog(ERROR, "makeline: input must be a multipoint"); PG_RETURN_NULL(); /* input is not a multipoint */ } - mpoint = lwmpoint_deserialize(SERIALIZED_FORM(ingeom)); - lwline = lwline_from_lwmpoint(mpoint->SRID, mpoint); + mpoint = lwgeom_as_lwmpoint(lwgeom_from_gserialized(ingeom)); + lwline = lwline_from_lwmpoint(mpoint->srid, mpoint); if ( ! lwline ) { PG_FREE_IF_COPY(ingeom, 0); @@ -2293,10 +1328,10 @@ PG_RETURN_NULL(); } - result = pglwgeom_serialize((LWGEOM *)lwline); + result = geometry_serialize(lwline_as_lwgeom(lwline)); PG_FREE_IF_COPY(ingeom, 0); - lwgeom_release((LWGEOM *)lwline); + lwline_free(lwline); PG_RETURN_POINTER(result); } @@ -2312,13 +1347,13 @@ Datum datum; ArrayType *array; int nelems; - PG_LWGEOM *result=NULL; - LWPOINT **lwpoints; + GSERIALIZED *result=NULL; + LWGEOM **geoms; LWGEOM *outlwg; - unsigned int npoints; + uint32 ngeoms; int i; size_t offset; - int SRID=-1; + int srid=SRID_UNKNOWN; bits8 *bitmap; int bitmask; @@ -2354,13 +1389,13 @@ /* * Deserialize all point geometries in array into the - * lwpoints pointers array. + * geoms pointers array. * Count actual number of points. */ /* possibly more then required */ - lwpoints = palloc(sizeof(LWGEOM *)*nelems); - npoints = 0; + geoms = palloc(sizeof(LWGEOM *)*nelems); + ngeoms = 0; offset = 0; bitmap = ARR_NULLBITMAP(array); bitmask = 1; @@ -2369,23 +1404,24 @@ /* Don't do anything for NULL values */ if ((bitmap && (*bitmap & bitmask) != 0) || !bitmap) { - PG_LWGEOM *geom = (PG_LWGEOM *)(ARR_DATA_PTR(array)+offset); + GSERIALIZED *geom = (GSERIALIZED *)(ARR_DATA_PTR(array)+offset); offset += INTALIGN(VARSIZE(geom)); - if ( TYPE_GETTYPE(geom->type) != POINTTYPE ) continue; + if ( gserialized_get_type(geom) != POINTTYPE && gserialized_get_type(geom) != LINETYPE ) continue; - lwpoints[npoints++] = - lwpoint_deserialize(SERIALIZED_FORM(geom)); + geoms[ngeoms++] = + lwgeom_from_gserialized(geom); /* Check SRID homogeneity */ - if ( npoints == 1 ) + if ( ngeoms == 1 ) { /* Get first geometry SRID */ - SRID = lwpoints[npoints-1]->SRID; + srid = geoms[ngeoms-1]->srid; + /* TODO: also get ZMflags */ } else { - if ( lwpoints[npoints-1]->SRID != SRID ) + if ( geoms[ngeoms-1]->srid != srid ) { elog(ERROR, "Operation on mixed SRID geometries"); @@ -2393,8 +1429,7 @@ } } - POSTGIS_DEBUGF(3, "LWGEOM_makeline_garray: element %d deserialized", - i); + POSTGIS_DEBUGF(3, "LWGEOM_makeline_garray: element %d deserialized", i); } /* Advance NULL bitmap */ @@ -2410,17 +1445,18 @@ } /* Return null on 0-points input array */ - if ( npoints == 0 ) + if ( ngeoms == 0 ) { - elog(NOTICE, "No points in input array"); + /* TODO: should we return LINESTRING EMPTY here ? */ + elog(NOTICE, "No points or linestrings in input array"); PG_RETURN_NULL(); } - POSTGIS_DEBUGF(3, "LWGEOM_makeline_garray: point elements: %d", npoints); + POSTGIS_DEBUGF(3, "LWGEOM_makeline_garray: elements: %d", ngeoms); - outlwg = (LWGEOM *)lwline_from_lwpointarray(SRID, npoints, lwpoints); + outlwg = (LWGEOM *)lwline_from_lwgeom_array(srid, ngeoms, geoms); - result = pglwgeom_serialize(outlwg); + result = geometry_serialize(outlwg); PG_RETURN_POINTER(result); } @@ -2432,37 +1468,37 @@ PG_FUNCTION_INFO_V1(LWGEOM_makeline); Datum LWGEOM_makeline(PG_FUNCTION_ARGS) { - PG_LWGEOM *pglwg1, *pglwg2; - PG_LWGEOM *result=NULL; - LWPOINT *lwpoints[2]; + GSERIALIZED *pglwg1, *pglwg2; + GSERIALIZED *result=NULL; + LWGEOM *lwgeoms[2]; LWLINE *outline; POSTGIS_DEBUG(2, "LWGEOM_makeline called."); /* Get input datum */ - pglwg1 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - pglwg2 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + pglwg1 = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + pglwg2 = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - if ( ! TYPE_GETTYPE(pglwg1->type) == POINTTYPE || - ! TYPE_GETTYPE(pglwg2->type) == POINTTYPE ) + if ( (gserialized_get_type(pglwg1) != POINTTYPE && gserialized_get_type(pglwg1) != LINETYPE) || + (gserialized_get_type(pglwg2) != POINTTYPE && gserialized_get_type(pglwg2) != LINETYPE) ) { - elog(ERROR, "Input geometries must be points"); + elog(ERROR, "Input geometries must be points or lines"); PG_RETURN_NULL(); } - errorIfSRIDMismatch(pglwgeom_getSRID(pglwg1), pglwgeom_getSRID(pglwg2)); + error_if_srid_mismatch(gserialized_get_srid(pglwg1), gserialized_get_srid(pglwg2)); - lwpoints[0] = lwpoint_deserialize(SERIALIZED_FORM(pglwg1)); - lwpoints[1] = lwpoint_deserialize(SERIALIZED_FORM(pglwg2)); + lwgeoms[0] = lwgeom_from_gserialized(pglwg1); + lwgeoms[1] = lwgeom_from_gserialized(pglwg2); - outline = lwline_from_lwpointarray(lwpoints[0]->SRID, 2, lwpoints); + outline = lwline_from_lwgeom_array(lwgeoms[0]->srid, 2, lwgeoms); - result = pglwgeom_serialize((LWGEOM *)outline); + result = geometry_serialize((LWGEOM *)outline); PG_FREE_IF_COPY(pglwg1, 0); PG_FREE_IF_COPY(pglwg2, 1); - lwgeom_release((LWGEOM *)lwpoints[0]); - lwgeom_release((LWGEOM *)lwpoints[1]); + lwgeom_free(lwgeoms[0]); + lwgeom_free(lwgeoms[1]); PG_RETURN_POINTER(result); } @@ -2474,25 +1510,25 @@ PG_FUNCTION_INFO_V1(LWGEOM_makepoly); Datum LWGEOM_makepoly(PG_FUNCTION_ARGS) { - PG_LWGEOM *pglwg1; + GSERIALIZED *pglwg1; ArrayType *array=NULL; - PG_LWGEOM *result=NULL; + GSERIALIZED *result=NULL; const LWLINE *shell=NULL; const LWLINE **holes=NULL; LWPOLY *outpoly; - unsigned int nholes=0; - unsigned int i; + uint32 nholes=0; + uint32 i; size_t offset=0; POSTGIS_DEBUG(2, "LWGEOM_makepoly called."); /* Get input shell */ - pglwg1 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - if ( ! TYPE_GETTYPE(pglwg1->type) == LINETYPE ) + pglwg1 = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + if ( gserialized_get_type(pglwg1) != LINETYPE ) { lwerror("Shell is not a line"); } - shell = lwline_deserialize(SERIALIZED_FORM(pglwg1)); + shell = lwgeom_as_lwline(lwgeom_from_gserialized(pglwg1)); /* Get input holes if any */ if ( PG_NARGS() > 1 ) @@ -2502,27 +1538,29 @@ holes = lwalloc(sizeof(LWLINE *)*nholes); for (i=0; itype) != LINETYPE ) + if ( gserialized_get_type(g) != LINETYPE ) { lwerror("Hole %d is not a line", i); } - hole = lwline_deserialize(SERIALIZED_FORM(g)); + hole = lwgeom_as_lwline(lwgeom_from_gserialized(g)); holes[i] = hole; } } outpoly = lwpoly_from_lwlines(shell, nholes, holes); - POSTGIS_DEBUGF(3, "%s", lwgeom_summary((LWGEOM*)outpoly, 0)); + result = geometry_serialize((LWGEOM *)outpoly); - result = pglwgeom_serialize((LWGEOM *)outpoly); - + lwline_free((LWLINE*)shell); PG_FREE_IF_COPY(pglwg1, 0); - lwgeom_release((LWGEOM *)shell); - for (i=0; iserialized_pointlist = (uchar *)pts; - TYPE_SETZM(pa[0]->dims, 0, 0); - pa[0]->npoints = 5; + ppa = lwalloc(sizeof(POINTARRAY*)); + ppa[0] = pa; /* Construct polygon */ - poly = lwpoly_construct(SRID, ptarray_compute_box2d(pa[0]), 1, pa); + poly = lwpoly_construct(lwgeom->srid, NULL, 1, ppa); + lwgeom_add_bbox(lwpoly_as_lwgeom(poly)); - /* Construct PG_LWGEOM */ - result = pglwgeom_serialize((LWGEOM *)poly); + /* Construct GSERIALIZED */ + result = geometry_serialize(lwpoly_as_lwgeom(poly)); + lwgeom_free(lwpoly_as_lwgeom(poly)); + lwgeom_free(lwgeom); PG_FREE_IF_COPY(geom, 0); PG_RETURN_POINTER(result); @@ -2592,20 +1652,32 @@ PG_FUNCTION_INFO_V1(LWGEOM_to_BOX); Datum LWGEOM_to_BOX(PG_FUNCTION_ARGS) { - PG_LWGEOM *pg_lwgeom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - BOX3D *box3d; - BOX *result = (BOX *)lwalloc(sizeof(BOX)); - LWGEOM *lwgeom = lwgeom_deserialize(SERIALIZED_FORM(pg_lwgeom)); - - /* Calculate the BOX3D of the geometry */ - box3d = lwgeom_compute_box3d(lwgeom); - box3d_to_box_p(box3d, result); - lwfree(box3d); - lwfree(lwgeom); + GSERIALIZED *pg_lwgeom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + LWGEOM *lwgeom = lwgeom_from_gserialized(pg_lwgeom); + GBOX gbox; + int result; + BOX *out = NULL; + + /* Zero out flags */ + gbox_init(&gbox); - PG_FREE_IF_COPY(pg_lwgeom, 0); + /* Calculate the GBOX of the geometry */ + result = lwgeom_calculate_gbox(lwgeom, &gbox); - PG_RETURN_POINTER(result); + /* Clean up memory */ + lwfree(lwgeom); + PG_FREE_IF_COPY(pg_lwgeom, 0); + + /* Null on failure */ + if ( ! result ) + PG_RETURN_NULL(); + + out = lwalloc(sizeof(BOX)); + out->low.x = gbox.xmin; + out->low.y = gbox.ymin; + out->high.x = gbox.xmax; + out->high.y = gbox.ymax; + PG_RETURN_POINTER(out); } /** @@ -2616,25 +1688,27 @@ PG_FUNCTION_INFO_V1(LWGEOM_envelope); Datum LWGEOM_envelope(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - BOX3D box; - int SRID; + GSERIALIZED *geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + LWGEOM *lwgeom = lwgeom_from_gserialized(geom); + int srid = lwgeom->srid; + POINT4D pt; + GBOX box; POINTARRAY *pa; - PG_LWGEOM *result; - uchar *ser = NULL; + GSERIALIZED *result; - /* get bounding box */ - if ( ! compute_serialized_box3d_p(SERIALIZED_FORM(geom), &box) ) + if ( lwgeom_is_empty(lwgeom) ) { /* must be the EMPTY geometry */ PG_RETURN_POINTER(geom); } - - /* get geometry SRID */ - SRID = lwgeom_getsrid(SERIALIZED_FORM(geom)); - - + + if ( lwgeom_calculate_gbox(lwgeom, &box) == LW_FAILURE ) + { + /* must be the EMPTY geometry */ + PG_RETURN_POINTER(geom); + } + /* * Alter envelope type so that a valid geometry is always * returned depending upon the size of the geometry. The @@ -2646,80 +1720,77 @@ * - Otherwise return a POLYGON */ - - if (box.xmin == box.xmax && - box.ymin == box.ymax) + if ( (box.xmin == box.xmax) && (box.ymin == box.ymax) ) { /* Construct and serialize point */ - LWPOINT *point = make_lwpoint2d(SRID, box.xmin, box.ymin); - ser = lwpoint_serialize(point); + LWPOINT *point = lwpoint_make2d(srid, box.xmin, box.ymin); + result = geometry_serialize(lwpoint_as_lwgeom(point)); + lwpoint_free(point); } - else if (box.xmin == box.xmax || - box.ymin == box.ymax) + else if ( (box.xmin == box.xmax) || (box.ymin == box.ymax) ) { LWLINE *line; - POINT2D *pts = palloc(sizeof(POINT2D)*2); + /* Construct point array */ + pa = ptarray_construct_empty(0, 0, 2); /* Assign coordinates to POINT2D array */ - pts[0].x = box.xmin; - pts[0].y = box.ymin; - pts[1].x = box.xmax; - pts[1].y = box.ymax; - - /* Construct point array */ - pa = pointArray_construct((uchar *)pts, 0, 0, 2); + pt.x = box.xmin; + pt.y = box.ymin; + ptarray_append_point(pa, &pt, LW_TRUE); + pt.x = box.xmax; + pt.y = box.ymax; + ptarray_append_point(pa, &pt, LW_TRUE); /* Construct and serialize linestring */ - line = lwline_construct(SRID, NULL, pa); - ser = lwline_serialize(line); + line = lwline_construct(srid, NULL, pa); + result = geometry_serialize(lwline_as_lwgeom(line)); + lwline_free(line); } else { LWPOLY *poly; - POINT2D *pts = lwalloc(sizeof(POINT2D)*5); + POINTARRAY **ppa = lwalloc(sizeof(POINTARRAY*)); + pa = ptarray_construct_empty(0, 0, 5); + ppa[0] = pa; /* Assign coordinates to POINT2D array */ - pts[0].x = box.xmin; - pts[0].y = box.ymin; - pts[1].x = box.xmin; - pts[1].y = box.ymax; - pts[2].x = box.xmax; - pts[2].y = box.ymax; - pts[3].x = box.xmax; - pts[3].y = box.ymin; - pts[4].x = box.xmin; - pts[4].y = box.ymin; - - /* Construct point array */ - pa = pointArray_construct((uchar *)pts, 0, 0, 5); + pt.x = box.xmin; + pt.y = box.ymin; + ptarray_append_point(pa, &pt, LW_TRUE); + pt.x = box.xmin; + pt.y = box.ymax; + ptarray_append_point(pa, &pt, LW_TRUE); + pt.x = box.xmax; + pt.y = box.ymax; + ptarray_append_point(pa, &pt, LW_TRUE); + pt.x = box.xmax; + pt.y = box.ymin; + ptarray_append_point(pa, &pt, LW_TRUE); + pt.x = box.xmin; + pt.y = box.ymin; + ptarray_append_point(pa, &pt, LW_TRUE); /* Construct polygon */ - poly = lwpoly_construct(SRID, ptarray_compute_box2d(pa), 1, &pa); - - /* Serialize polygon */ - ser = lwpoly_serialize(poly); + poly = lwpoly_construct(srid, NULL, 1, ppa); + result = geometry_serialize(lwpoly_as_lwgeom(poly)); + lwpoly_free(poly); } PG_FREE_IF_COPY(geom, 0); - /* Construct PG_LWGEOM */ - result = PG_LWGEOM_construct(ser, SRID, 1); - PG_RETURN_POINTER(result); } PG_FUNCTION_INFO_V1(LWGEOM_isempty); Datum LWGEOM_isempty(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *geom = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + LWGEOM *lwgeom = lwgeom_from_gserialized(geom); + bool empty = lwgeom_is_empty(lwgeom); - if ( lwgeom_getnumgeometries(SERIALIZED_FORM(geom)) == 0 ) - { - PG_FREE_IF_COPY(geom, 0); - PG_RETURN_BOOL(TRUE); - } + lwgeom_free(lwgeom); PG_FREE_IF_COPY(geom, 0); - PG_RETURN_BOOL(FALSE); + PG_RETURN_BOOL(empty); } @@ -2732,32 +1803,47 @@ PG_FUNCTION_INFO_V1(LWGEOM_segmentize2d); Datum LWGEOM_segmentize2d(PG_FUNCTION_ARGS) { - PG_LWGEOM *outgeom, *ingeom; + GSERIALIZED *outgeom, *ingeom; double dist; LWGEOM *inlwgeom, *outlwgeom; + int type; POSTGIS_DEBUG(2, "LWGEOM_segmentize2d called"); - ingeom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + ingeom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); dist = PG_GETARG_FLOAT8(1); + type = gserialized_get_type(ingeom); - /* Avoid deserialize/serialize steps */ - if ( (TYPE_GETTYPE(ingeom->type) == POINTTYPE) || - (TYPE_GETTYPE(ingeom->type) == MULTIPOINTTYPE) ) + /* Avoid types we cannot segmentize. */ + if ( (type == POINTTYPE) || + (type == MULTIPOINTTYPE) || + (type == TRIANGLETYPE) || + (type == TINTYPE) || + (type == POLYHEDRALSURFACETYPE) ) + { PG_RETURN_POINTER(ingeom); + } + + if ( dist <= 0 ) { + /* Protect from knowingly infinite loops, see #1799 */ + /* Note that we'll end out of memory anyway for other small distances */ + elog(ERROR, "ST_Segmentize: invalid max_distance %g (must be >= 0)", dist); + PG_RETURN_NULL(); + } - inlwgeom = lwgeom_deserialize(SERIALIZED_FORM(ingeom)); + inlwgeom = lwgeom_from_gserialized(ingeom); outlwgeom = lwgeom_segmentize2d(inlwgeom, dist); /* Copy input bounding box if any */ if ( inlwgeom->bbox ) - outlwgeom->bbox = box2d_clone(inlwgeom->bbox); + outlwgeom->bbox = gbox_copy(inlwgeom->bbox); - outgeom = pglwgeom_serialize(outlwgeom); + outgeom = geometry_serialize(outlwgeom); + //lwgeom_free(outlwgeom); /* TODO fix lwgeom_clone / ptarray_clone_deep for consistent semantics */ + lwgeom_free(inlwgeom); + PG_FREE_IF_COPY(ingeom, 0); - lwgeom_release(outlwgeom); - lwgeom_release(inlwgeom); PG_RETURN_POINTER(outgeom); } @@ -2766,40 +1852,39 @@ PG_FUNCTION_INFO_V1(LWGEOM_reverse); Datum LWGEOM_reverse(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom; + GSERIALIZED *geom; LWGEOM *lwgeom; POSTGIS_DEBUG(2, "LWGEOM_reverse called"); - geom = (PG_LWGEOM *)PG_DETOAST_DATUM_COPY(PG_GETARG_DATUM(0)); + geom = (GSERIALIZED *)PG_DETOAST_DATUM_COPY(PG_GETARG_DATUM(0)); - lwgeom = lwgeom_deserialize(SERIALIZED_FORM(geom)); + lwgeom = lwgeom_from_gserialized(geom); lwgeom_reverse(lwgeom); - geom = pglwgeom_serialize(lwgeom); + geom = geometry_serialize(lwgeom); PG_RETURN_POINTER(geom); } /** Force polygons of the collection to obey Right-Hand-Rule */ -PG_FUNCTION_INFO_V1(LWGEOM_forceRHR_poly); -Datum LWGEOM_forceRHR_poly(PG_FUNCTION_ARGS) +PG_FUNCTION_INFO_V1(LWGEOM_force_clockwise_poly); +Datum LWGEOM_force_clockwise_poly(PG_FUNCTION_ARGS) { - PG_LWGEOM *ingeom, *outgeom; + GSERIALIZED *ingeom, *outgeom; LWGEOM *lwgeom; - POSTGIS_DEBUG(2, "LWGEOM_forceRHR_poly called"); + POSTGIS_DEBUG(2, "LWGEOM_force_clockwise_poly called"); - ingeom = (PG_LWGEOM *)PG_DETOAST_DATUM_COPY(PG_GETARG_DATUM(0)); + ingeom = (GSERIALIZED *)PG_DETOAST_DATUM_COPY(PG_GETARG_DATUM(0)); - lwgeom = lwgeom_deserialize(SERIALIZED_FORM(ingeom)); - lwgeom_force_rhr(lwgeom); + lwgeom = lwgeom_from_gserialized(ingeom); + lwgeom_force_clockwise(lwgeom); - outgeom = pglwgeom_serialize(lwgeom); + outgeom = geometry_serialize(lwgeom); + lwgeom_free(lwgeom); PG_FREE_IF_COPY(ingeom, 0); - lwgeom_release(lwgeom); - PG_RETURN_POINTER(outgeom); } @@ -2807,21 +1892,21 @@ PG_FUNCTION_INFO_V1(LWGEOM_noop); Datum LWGEOM_noop(PG_FUNCTION_ARGS) { - PG_LWGEOM *in, *out; + GSERIALIZED *in, *out; LWGEOM *lwgeom; POSTGIS_DEBUG(2, "LWGEOM_noop called"); - in = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + in = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - lwgeom = lwgeom_deserialize(SERIALIZED_FORM(in)); + lwgeom = lwgeom_from_gserialized(in); POSTGIS_DEBUGF(3, "Deserialized: %s", lwgeom_summary(lwgeom, 0)); - out = pglwgeom_serialize(lwgeom); + out = geometry_serialize(lwgeom); + lwgeom_free(lwgeom); PG_FREE_IF_COPY(in, 0); - lwgeom_release(lwgeom); PG_RETURN_POINTER(out); } @@ -2836,14 +1921,12 @@ PG_FUNCTION_INFO_V1(LWGEOM_zmflag); Datum LWGEOM_zmflag(PG_FUNCTION_ARGS) { - PG_LWGEOM *in; - uchar type; + GSERIALIZED *in; int ret = 0; - in = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - type = in->type; - if ( TYPE_HASZ(type) ) ret += 2; - if ( TYPE_HASM(type) ) ret += 1; + in = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + if ( gserialized_has_z(in) ) ret += 2; + if ( gserialized_has_m(in) ) ret += 1; PG_FREE_IF_COPY(in, 0); PG_RETURN_INT16(ret); } @@ -2851,28 +1934,24 @@ PG_FUNCTION_INFO_V1(LWGEOM_hasz); Datum LWGEOM_hasz(PG_FUNCTION_ARGS) { - PG_LWGEOM *in = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_RETURN_BOOL(TYPE_HASZ(in->type)); + GSERIALIZED *in = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + PG_RETURN_BOOL(gserialized_has_z(in)); } PG_FUNCTION_INFO_V1(LWGEOM_hasm); Datum LWGEOM_hasm(PG_FUNCTION_ARGS) { - PG_LWGEOM *in = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_RETURN_BOOL(TYPE_HASM(in->type)); + GSERIALIZED *in = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + PG_RETURN_BOOL(gserialized_has_m(in)); } PG_FUNCTION_INFO_V1(LWGEOM_hasBBOX); Datum LWGEOM_hasBBOX(PG_FUNCTION_ARGS) { - PG_LWGEOM *in; - char res; - - in = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - res=lwgeom_hasBBOX(in->type); + GSERIALIZED *in = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + char res = gserialized_has_bbox(in); PG_FREE_IF_COPY(in, 0); - PG_RETURN_BOOL(res); } @@ -2880,11 +1959,11 @@ PG_FUNCTION_INFO_V1(LWGEOM_ndims); Datum LWGEOM_ndims(PG_FUNCTION_ARGS) { - PG_LWGEOM *in; + GSERIALIZED *in; int ret; - in = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - ret = (TYPE_NDIMS(in->type)); + in = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + ret = (gserialized_ndims(in)); PG_FREE_IF_COPY(in, 0); PG_RETURN_INT16(ret); } @@ -2893,19 +1972,19 @@ PG_FUNCTION_INFO_V1(LWGEOM_same); Datum LWGEOM_same(PG_FUNCTION_ARGS) { - PG_LWGEOM *g1 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_LWGEOM *g2 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + GSERIALIZED *g1 = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *g2 = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); LWGEOM *lwg1, *lwg2; bool result; - if ( TYPE_GETTYPE(g1->type) != TYPE_GETTYPE(g2->type) ) + if ( gserialized_get_type(g1) != gserialized_get_type(g2) ) { PG_FREE_IF_COPY(g1, 0); PG_FREE_IF_COPY(g2, 1); PG_RETURN_BOOL(FALSE); /* different types */ } - if ( TYPE_GETZM(g1->type) != TYPE_GETZM(g2->type) ) + if ( gserialized_get_zm(g1) != gserialized_get_zm(g2) ) { PG_FREE_IF_COPY(g1, 0); PG_FREE_IF_COPY(g2, 1); @@ -2913,15 +1992,15 @@ } /* ok, deserialize. */ - lwg1 = lwgeom_deserialize(SERIALIZED_FORM(g1)); - lwg2 = lwgeom_deserialize(SERIALIZED_FORM(g2)); + lwg1 = lwgeom_from_gserialized(g1); + lwg2 = lwgeom_from_gserialized(g2); /* invoke appropriate function */ result = lwgeom_same(lwg1, lwg2); /* Relase memory */ - lwgeom_release(lwg1); - lwgeom_release(lwg2); + lwgeom_free(lwg1); + lwgeom_free(lwg2); PG_FREE_IF_COPY(g1, 0); PG_FREE_IF_COPY(g2, 1); @@ -2932,11 +2011,11 @@ Datum ST_MakeEnvelope(PG_FUNCTION_ARGS) { LWPOLY *poly; - PG_LWGEOM *result; + GSERIALIZED *result; POINTARRAY **pa; - double *pts; + POINT4D p; double x1, y1, x2, y2; - int srid; + int srid = SRID_UNKNOWN; POSTGIS_DEBUG(2, "ST_MakeEnvelope called"); @@ -2944,63 +2023,87 @@ y1 = PG_GETARG_FLOAT8(1); x2 = PG_GETARG_FLOAT8(2); y2 = PG_GETARG_FLOAT8(3); - srid = PG_GETARG_INT32(4); + if ( PG_NARGS() > 4 ) { + srid = PG_GETARG_INT32(4); + } - pa = (POINTARRAY**)palloc(sizeof(POINTARRAY*)); - pa[0] = ptarray_construct(0, 0, 5); - pts = (double*)(pa[0]->serialized_pointlist); + pa = (POINTARRAY**)palloc(sizeof(POINTARRAY**)); + pa[0] = ptarray_construct_empty(0, 0, 5); /* 1st point */ - pts[0] = x1; - pts[1] = y1; + p.x = x1; + p.y = y1; + ptarray_append_point(pa[0], &p, LW_TRUE); /* 2nd point */ - pts[2] = x1; - pts[3] = y2; + p.x = x1; + p.y = y2; + ptarray_append_point(pa[0], &p, LW_TRUE); /* 3rd point */ - pts[4] = x2; - pts[5] = y2; + p.x = x2; + p.y = y2; + ptarray_append_point(pa[0], &p, LW_TRUE); /* 4th point */ - pts[6] = x2; - pts[7] = y1; + p.x = x2; + p.y = y1; + ptarray_append_point(pa[0], &p, LW_TRUE); /* 5th point */ - pts[8] = x1; - pts[9] = y1; + p.x = x1; + p.y = y1; + ptarray_append_point(pa[0], &p, LW_TRUE); - poly = lwpoly_construct(srid, ptarray_compute_box2d(pa[0]), 1, pa); + poly = lwpoly_construct(srid, NULL, 1, pa); + lwgeom_add_bbox(lwpoly_as_lwgeom(poly)); - result = pglwgeom_serialize((LWGEOM*)poly); + result = geometry_serialize(lwpoly_as_lwgeom(poly)); lwpoly_free(poly); PG_RETURN_POINTER(result); } +PG_FUNCTION_INFO_V1(ST_IsCollection); +Datum ST_IsCollection(PG_FUNCTION_ARGS) +{ + GSERIALIZED *geom; + int type; + size_t size; + + /* Pull only a small amount of the tuple, enough to get the type. */ + /* header + srid/flags + bbox? + type number */ + size = VARHDRSZ + 8 + 32 + 4; + + geom = (GSERIALIZED*)PG_DETOAST_DATUM_SLICE(PG_GETARG_DATUM(0), 0, size); + + type = gserialized_get_type(geom); + PG_RETURN_BOOL(lwtype_is_collection(type)); +} + PG_FUNCTION_INFO_V1(LWGEOM_makepoint); Datum LWGEOM_makepoint(PG_FUNCTION_ARGS) { double x,y,z,m; LWPOINT *point; - PG_LWGEOM *result; + GSERIALIZED *result; POSTGIS_DEBUG(2, "LWGEOM_makepoint called"); x = PG_GETARG_FLOAT8(0); y = PG_GETARG_FLOAT8(1); - if ( PG_NARGS() == 2 ) point = make_lwpoint2d(-1, x, y); + if ( PG_NARGS() == 2 ) point = lwpoint_make2d(SRID_UNKNOWN, x, y); else if ( PG_NARGS() == 3 ) { z = PG_GETARG_FLOAT8(2); - point = make_lwpoint3dz(-1, x, y, z); + point = lwpoint_make3dz(SRID_UNKNOWN, x, y, z); } else if ( PG_NARGS() == 4 ) { z = PG_GETARG_FLOAT8(2); m = PG_GETARG_FLOAT8(3); - point = make_lwpoint4d(-1, x, y, z, m); + point = lwpoint_make4d(SRID_UNKNOWN, x, y, z, m); } else { @@ -3009,7 +2112,7 @@ PG_RETURN_NULL(); } - result = pglwgeom_serialize((LWGEOM *)point); + result = geometry_serialize((LWGEOM *)point); PG_RETURN_POINTER(result); } @@ -3019,7 +2122,7 @@ { double x,y,m; LWPOINT *point; - PG_LWGEOM *result; + GSERIALIZED *result; POSTGIS_DEBUG(2, "LWGEOM_makepoint3dm called."); @@ -3027,8 +2130,8 @@ y = PG_GETARG_FLOAT8(1); m = PG_GETARG_FLOAT8(2); - point = make_lwpoint3dm(-1, x, y, m); - result = pglwgeom_serialize((LWGEOM *)point); + point = lwpoint_make3dm(SRID_UNKNOWN, x, y, m); + result = geometry_serialize((LWGEOM *)point); PG_RETURN_POINTER(result); } @@ -3036,54 +2139,58 @@ PG_FUNCTION_INFO_V1(LWGEOM_addpoint); Datum LWGEOM_addpoint(PG_FUNCTION_ARGS) { - PG_LWGEOM *pglwg1, *pglwg2, *result; + GSERIALIZED *pglwg1, *pglwg2, *result; LWPOINT *point; - LWLINE *line, *outline; + LWLINE *line, *linecopy; int where = -1; POSTGIS_DEBUG(2, "LWGEOM_addpoint called."); - pglwg1 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - pglwg2 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + pglwg1 = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + pglwg2 = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); if ( PG_NARGS() > 2 ) { where = PG_GETARG_INT32(2); } - if ( ! TYPE_GETTYPE(pglwg1->type) == LINETYPE ) + if ( gserialized_get_type(pglwg1) != LINETYPE ) { elog(ERROR, "First argument must be a LINESTRING"); PG_RETURN_NULL(); } - if ( ! TYPE_GETTYPE(pglwg2->type) == POINTTYPE ) + if ( gserialized_get_type(pglwg2) != POINTTYPE ) { elog(ERROR, "Second argument must be a POINT"); PG_RETURN_NULL(); } - line = lwline_deserialize(SERIALIZED_FORM(pglwg1)); + line = lwgeom_as_lwline(lwgeom_from_gserialized(pglwg1)); if ( where == -1 ) where = line->points->npoints; - else if ( (unsigned int)where > line->points->npoints ) + else if ( where < 0 || where > line->points->npoints ) { elog(ERROR, "Invalid offset"); PG_RETURN_NULL(); } - point = lwpoint_deserialize(SERIALIZED_FORM(pglwg2)); - - outline = lwline_addpoint(line, point, where); + point = lwgeom_as_lwpoint(lwgeom_from_gserialized(pglwg2)); + linecopy = lwgeom_as_lwline(lwgeom_clone_deep(lwline_as_lwgeom(line))); + lwline_free(line); + + if ( lwline_add_lwpoint(linecopy, point, where) == LW_FAILURE ) + { + elog(ERROR, "Point insert failed"); + PG_RETURN_NULL(); + } - result = pglwgeom_serialize((LWGEOM *)outline); + result = geometry_serialize(lwline_as_lwgeom(linecopy)); /* Release memory */ PG_FREE_IF_COPY(pglwg1, 0); PG_FREE_IF_COPY(pglwg2, 1); - lwgeom_release((LWGEOM *)point); - lwgeom_release((LWGEOM *)line); - lwgeom_release((LWGEOM *)outline); + lwpoint_free(point); PG_RETURN_POINTER(result); @@ -3092,22 +2199,22 @@ PG_FUNCTION_INFO_V1(LWGEOM_removepoint); Datum LWGEOM_removepoint(PG_FUNCTION_ARGS) { - PG_LWGEOM *pglwg1, *result; + GSERIALIZED *pglwg1, *result; LWLINE *line, *outline; - unsigned int which; + uint32 which; POSTGIS_DEBUG(2, "LWGEOM_removepoint called."); - pglwg1 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + pglwg1 = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); which = PG_GETARG_INT32(1); - if ( ! TYPE_GETTYPE(pglwg1->type) == LINETYPE ) + if ( gserialized_get_type(pglwg1) != LINETYPE ) { elog(ERROR, "First argument must be a LINESTRING"); PG_RETURN_NULL(); } - line = lwline_deserialize(SERIALIZED_FORM(pglwg1)); + line = lwgeom_as_lwline(lwgeom_from_gserialized(pglwg1)); if ( which > line->points->npoints-1 ) { @@ -3122,39 +2229,37 @@ } outline = lwline_removepoint(line, which); + /* Release memory */ + lwline_free(line); - result = pglwgeom_serialize((LWGEOM *)outline); + result = geometry_serialize((LWGEOM *)outline); + lwline_free(outline); - /* Release memory */ PG_FREE_IF_COPY(pglwg1, 0); - lwgeom_release((LWGEOM *)line); - lwgeom_release((LWGEOM *)outline); - PG_RETURN_POINTER(result); - } PG_FUNCTION_INFO_V1(LWGEOM_setpoint_linestring); Datum LWGEOM_setpoint_linestring(PG_FUNCTION_ARGS) { - PG_LWGEOM *pglwg1, *pglwg2, *result; + GSERIALIZED *pglwg1, *pglwg2, *result; LWGEOM *lwg; LWLINE *line; LWPOINT *lwpoint; POINT4D newpoint; - unsigned int which; + uint32 which; POSTGIS_DEBUG(2, "LWGEOM_setpoint_linestring called."); /* we copy input as we're going to modify it */ - pglwg1 = (PG_LWGEOM *)PG_DETOAST_DATUM_COPY(PG_GETARG_DATUM(0)); + pglwg1 = (GSERIALIZED *)PG_DETOAST_DATUM_COPY(PG_GETARG_DATUM(0)); which = PG_GETARG_INT32(1); - pglwg2 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(2)); + pglwg2 = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(2)); /* Extract a POINT4D from the point */ - lwg = pglwgeom_deserialize(pglwg2); + lwg = lwgeom_from_gserialized(pglwg2); lwpoint = lwgeom_as_lwpoint(lwg); if ( ! lwpoint ) { @@ -3162,10 +2267,10 @@ PG_RETURN_NULL(); } getPoint4d_p(lwpoint->point, 0, &newpoint); - lwgeom_release((LWGEOM *)lwpoint); + lwpoint_free(lwpoint); PG_FREE_IF_COPY(pglwg2, 2); - lwg = pglwgeom_deserialize(pglwg1); + lwg = lwgeom_from_gserialized(pglwg1); line = lwgeom_as_lwline(lwg); if ( ! line ) { @@ -3182,51 +2287,41 @@ * This will change pointarray of the serialized pglwg1, */ lwline_setPoint4d(line, which, &newpoint); - result = pglwgeom_serialize((LWGEOM *)line); + result = geometry_serialize((LWGEOM *)line); /* Release memory */ + lwline_free(line); pfree(pglwg1); /* we forced copy, POINARRAY is released now */ - lwgeom_release((LWGEOM *)line); PG_RETURN_POINTER(result); - } /* convert LWGEOM to ewkt (in TEXT format) */ PG_FUNCTION_INFO_V1(LWGEOM_asEWKT); Datum LWGEOM_asEWKT(PG_FUNCTION_ARGS) { - LWGEOM_UNPARSER_RESULT lwg_unparser_result; - PG_LWGEOM *lwgeom; - int len, result; - char *lwgeom_result,*loc_wkt; - /*char *semicolonLoc; */ - - lwgeom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - - result = serialized_lwgeom_to_ewkt(&lwg_unparser_result, SERIALIZED_FORM(lwgeom), PARSER_CHECK_ALL); - if (result) - PG_UNPARSER_ERROR(lwg_unparser_result); - -#if 0 - semicolonLoc = strchr(lwg_unparser_result.wkb,';'); + GSERIALIZED *geom; + LWGEOM *lwgeom; + char *wkt; + size_t wkt_size; + text *result; - /*loc points to start of wkt */ - if (semicolonLoc == NULL) loc_wkt = lwg_unparser_result.wkoutput; - else loc_wkt = semicolonLoc +1; -#endif - loc_wkt = lwg_unparser_result.wkoutput; + POSTGIS_DEBUG(2, "LWGEOM_asEWKT called."); - len = strlen(loc_wkt); - lwgeom_result = palloc(len + VARHDRSZ); - SET_VARSIZE(lwgeom_result, len + VARHDRSZ); + geom = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + lwgeom = lwgeom_from_gserialized(geom); - memcpy(VARDATA(lwgeom_result), loc_wkt, len); + /* Write to WKT and free the geometry */ + wkt = lwgeom_to_wkt(lwgeom, WKT_EXTENDED, DBL_DIG, &wkt_size); + lwgeom_free(lwgeom); - pfree(lwg_unparser_result.wkoutput); - PG_FREE_IF_COPY(lwgeom, 0); + /* Write to text and free the WKT */ + result = cstring2text(wkt); + pfree(wkt); - PG_RETURN_POINTER(lwgeom_result); + /* Return the text */ + PG_FREE_IF_COPY(geom, 0); + PG_RETURN_TEXT_P(result); } /** @@ -3238,41 +2333,41 @@ PG_FUNCTION_INFO_V1(LWGEOM_azimuth); Datum LWGEOM_azimuth(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom; + GSERIALIZED *geom; LWPOINT *lwpoint; POINT2D p1, p2; double result; - int SRID; + int srid; /* Extract first point */ - geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - lwpoint = lwpoint_deserialize(SERIALIZED_FORM(geom)); + geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + lwpoint = lwgeom_as_lwpoint(lwgeom_from_gserialized(geom)); if ( ! lwpoint ) { PG_FREE_IF_COPY(geom, 0); lwerror("Argument must be POINT geometries"); PG_RETURN_NULL(); } - SRID = lwpoint->SRID; + srid = lwpoint->srid; if ( ! getPoint2d_p(lwpoint->point, 0, &p1) ) { PG_FREE_IF_COPY(geom, 0); lwerror("Error extracting point"); PG_RETURN_NULL(); } - lwgeom_release((LWGEOM *)lwpoint); + lwpoint_free(lwpoint); PG_FREE_IF_COPY(geom, 0); /* Extract second point */ - geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - lwpoint = lwpoint_deserialize(SERIALIZED_FORM(geom)); + geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + lwpoint = lwgeom_as_lwpoint(lwgeom_from_gserialized(geom)); if ( ! lwpoint ) { PG_FREE_IF_COPY(geom, 1); lwerror("Argument must be POINT geometries"); PG_RETURN_NULL(); } - if ( lwpoint->SRID != SRID ) + if ( lwpoint->srid != srid ) { PG_FREE_IF_COPY(geom, 1); lwerror("Operation on mixed SRID geometries"); @@ -3284,9 +2379,15 @@ lwerror("Error extracting point"); PG_RETURN_NULL(); } - lwgeom_release((LWGEOM *)lwpoint); + lwpoint_free(lwpoint); PG_FREE_IF_COPY(geom, 1); + /* Standard return value for equality case */ + if ( (p1.x == p2.x) && (p1.y == p2.y) ) + { + PG_RETURN_NULL(); + } + /* Compute azimuth */ if ( ! azimuth_pt_pt(&p1, &p2, &result) ) { @@ -3296,10 +2397,6 @@ PG_RETURN_FLOAT8(result); } - - - - /* * optimistic_overlap(Polygon P1, Multipolygon MP2, double dist) * returns true if P1 overlaps MP2 @@ -3310,55 +2407,45 @@ PG_FUNCTION_INFO_V1(optimistic_overlap); Datum optimistic_overlap(PG_FUNCTION_ARGS) { + GSERIALIZED *pg_geom1 = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *pg_geom2 = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + double dist = PG_GETARG_FLOAT8(2); + GBOX g1_bvol; + double calc_dist; - PG_LWGEOM *pg_geom1 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_LWGEOM *pg_geom2 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - double dist = PG_GETARG_FLOAT8(2); - BOX2DFLOAT4 g1_bvol; - double calc_dist; - - LWGEOM *geom1; - LWGEOM *geom2; - + LWGEOM *geom1 = lwgeom_from_gserialized(pg_geom1); + LWGEOM *geom2 = lwgeom_from_gserialized(pg_geom2); - /* deserialized PG_LEGEOM into their respective LWGEOM */ - geom1 = lwgeom_deserialize(SERIALIZED_FORM(pg_geom1)); - geom2 = lwgeom_deserialize(SERIALIZED_FORM(pg_geom2)); - - if (geom1->SRID != geom2->SRID) + if (geom1->srid != geom2->srid) { - elog(ERROR,"optimistic_overlap:Operation on two GEOMETRIES with different SRIDs\\n"); PG_RETURN_NULL(); } - if (TYPE_GETTYPE(geom1->type) != POLYGONTYPE) + if (geom1->type != POLYGONTYPE) { elog(ERROR,"optimistic_overlap: first arg isnt a polygon\n"); PG_RETURN_NULL(); } - if ( (TYPE_GETTYPE(geom2->type) != POLYGONTYPE) && (geom2->type != MULTIPOLYGONTYPE) ) + if (geom2->type != POLYGONTYPE && geom2->type != MULTIPOLYGONTYPE) { elog(ERROR,"optimistic_overlap: 2nd arg isnt a [multi-]polygon\n"); PG_RETURN_NULL(); } /*bbox check */ - - getbox2d_p( SERIALIZED_FORM(pg_geom1), &g1_bvol ); - + gserialized_get_gbox_p(pg_geom1, &g1_bvol ); g1_bvol.xmin = g1_bvol.xmin - dist; g1_bvol.ymin = g1_bvol.ymin - dist; g1_bvol.xmax = g1_bvol.xmax + dist; g1_bvol.ymax = g1_bvol.ymax + dist; - if ( (g1_bvol.xmin > geom2->bbox->xmax) || - (g1_bvol.xmax < geom2->bbox->xmin) || - (g1_bvol.ymin > geom2->bbox->ymax) || - (g1_bvol.ymax < geom2->bbox->ymin) - ) + if ( (g1_bvol.xmin > geom2->bbox->xmax) || + (g1_bvol.xmax < geom2->bbox->xmin) || + (g1_bvol.ymin > geom2->bbox->ymax) || + (g1_bvol.ymax < geom2->bbox->ymin) ) { PG_RETURN_BOOL(FALSE); /*bbox not overlap */ } @@ -3367,193 +2454,46 @@ * compute distances * should be a fast calc if they actually do intersect */ - calc_dist = DatumGetFloat8 ( DirectFunctionCall2(LWGEOM_mindistance2d, PointerGetDatum( pg_geom1 ), PointerGetDatum( pg_geom2 ))); + calc_dist = DatumGetFloat8 ( DirectFunctionCall2(LWGEOM_mindistance2d, PointerGetDatum( pg_geom1 ), PointerGetDatum( pg_geom2 ))); PG_RETURN_BOOL(calc_dist < dist); } -/** - * Affine transform a pointarray. - */ -void -lwgeom_affine_ptarray(POINTARRAY *pa, - double afac, double bfac, double cfac, - double dfac, double efac, double ffac, - double gfac, double hfac, double ifac, - double xoff, double yoff, double zoff) -{ - int i; - double x,y,z; - POINT4D p4d; - - LWDEBUG(2, "lwgeom_affine_ptarray start"); - - if ( TYPE_HASZ(pa->dims) ) - { - LWDEBUG(3, " has z"); - - for (i=0; inpoints; i++) - { - getPoint4d_p(pa, i, &p4d); - x = p4d.x; - y = p4d.y; - z = p4d.z; - p4d.x = afac * x + bfac * y + cfac * z + xoff; - p4d.y = dfac * x + efac * y + ffac * z + yoff; - p4d.z = gfac * x + hfac * y + ifac * z + zoff; - setPoint4d(pa, i, &p4d); - - LWDEBUGF(3, " POINT %g %g %g => %g %g %g", x, y, x, p4d.x, p4d.y, p4d.z); - } - } - else - { - LWDEBUG(3, " doesn't have z"); - - for (i=0; inpoints; i++) - { - getPoint4d_p(pa, i, &p4d); - x = p4d.x; - y = p4d.y; - p4d.x = afac * x + bfac * y + xoff; - p4d.y = dfac * x + efac * y + yoff; - setPoint4d(pa, i, &p4d); - - LWDEBUGF(3, " POINT %g %g %g => %g %g %g", x, y, x, p4d.x, p4d.y, p4d.z); - } - } - - LWDEBUG(3, "lwgeom_affine_ptarray end"); - -} - -void -lwgeom_affine_recursive(uchar *serialized, - double afac, double bfac, double cfac, - double dfac, double efac, double ffac, - double gfac, double hfac, double ifac, - double xoff, double yoff, double zoff) -{ - LWGEOM_INSPECTED *inspected; - int i, j; - - inspected = lwgeom_inspect(serialized); - - /* scan each object translating it */ - for (i=0; ingeometries; i++) - { - LWLINE *line=NULL; - LWPOINT *point=NULL; - LWPOLY *poly=NULL; - LWCIRCSTRING *curve=NULL; - uchar *subgeom=NULL; - - point = lwgeom_getpoint_inspected(inspected, i); - if (point !=NULL) - { - lwgeom_affine_ptarray(point->point, - afac, bfac, cfac, - dfac, efac, ffac, - gfac, hfac, ifac, - xoff, yoff, zoff); - lwgeom_release((LWGEOM *)point); - continue; - } - - poly = lwgeom_getpoly_inspected(inspected, i); - if (poly !=NULL) - { - for (j=0; jnrings; j++) - { - lwgeom_affine_ptarray(poly->rings[j], - afac, bfac, cfac, - dfac, efac, ffac, - gfac, hfac, ifac, - xoff, yoff, zoff); - } - lwgeom_release((LWGEOM *)poly); - continue; - } - - line = lwgeom_getline_inspected(inspected, i); - if (line != NULL) - { - lwgeom_affine_ptarray(line->points, - afac, bfac, cfac, - dfac, efac, ffac, - gfac, hfac, ifac, - xoff, yoff, zoff); - lwgeom_release((LWGEOM *)line); - continue; - } - - curve = lwgeom_getcircstring_inspected(inspected, i); - if (curve != NULL) - { - lwgeom_affine_ptarray(curve->points, - afac, bfac, cfac, - dfac, efac, ffac, - gfac, hfac, ifac, - xoff, yoff, zoff); - lwgeom_release((LWGEOM *)curve); - continue; - } - - subgeom = lwgeom_getsubgeometry_inspected(inspected, i); - if ( subgeom == NULL ) - { - elog(ERROR, "lwgeom_getsubgeometry_inspected returned NULL??"); - } - - lwgeom_affine_recursive(subgeom, - afac, bfac, cfac, - dfac, efac, ffac, - gfac, hfac, ifac, - xoff, yoff, zoff); - } - - lwinspected_release(inspected); -} /*affine transform geometry */ PG_FUNCTION_INFO_V1(LWGEOM_affine); Datum LWGEOM_affine(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom = (PG_LWGEOM *)PG_DETOAST_DATUM_COPY(PG_GETARG_DATUM(0)); - PG_LWGEOM *ret; - LWGEOM *tmp; - uchar *srl = SERIALIZED_FORM(geom); - - double afac = PG_GETARG_FLOAT8(1); - double bfac = PG_GETARG_FLOAT8(2); - double cfac = PG_GETARG_FLOAT8(3); - double dfac = PG_GETARG_FLOAT8(4); - double efac = PG_GETARG_FLOAT8(5); - double ffac = PG_GETARG_FLOAT8(6); - double gfac = PG_GETARG_FLOAT8(7); - double hfac = PG_GETARG_FLOAT8(8); - double ifac = PG_GETARG_FLOAT8(9); - double xoff = PG_GETARG_FLOAT8(10); - double yoff = PG_GETARG_FLOAT8(11); - double zoff = PG_GETARG_FLOAT8(12); + GSERIALIZED *geom = (GSERIALIZED *)PG_DETOAST_DATUM_COPY(PG_GETARG_DATUM(0)); + LWGEOM *lwgeom = lwgeom_from_gserialized(geom); + GSERIALIZED *ret; + AFFINE affine; + + affine.afac = PG_GETARG_FLOAT8(1); + affine.bfac = PG_GETARG_FLOAT8(2); + affine.cfac = PG_GETARG_FLOAT8(3); + affine.dfac = PG_GETARG_FLOAT8(4); + affine.efac = PG_GETARG_FLOAT8(5); + affine.ffac = PG_GETARG_FLOAT8(6); + affine.gfac = PG_GETARG_FLOAT8(7); + affine.hfac = PG_GETARG_FLOAT8(8); + affine.ifac = PG_GETARG_FLOAT8(9); + affine.xoff = PG_GETARG_FLOAT8(10); + affine.yoff = PG_GETARG_FLOAT8(11); + affine.zoff = PG_GETARG_FLOAT8(12); POSTGIS_DEBUG(2, "LWGEOM_affine called."); - lwgeom_affine_recursive(srl, - afac, bfac, cfac, - dfac, efac, ffac, - gfac, hfac, ifac, - xoff, yoff, zoff); + lwgeom_affine(lwgeom, &affine); /* COMPUTE_BBOX TAINTING */ - tmp = pglwgeom_deserialize(geom); - lwgeom_drop_bbox(tmp); - tmp->bbox = lwgeom_compute_box2d(tmp); - ret = pglwgeom_serialize(tmp); + lwgeom_drop_bbox(lwgeom); + lwgeom_add_bbox(lwgeom); + ret = geometry_serialize(lwgeom); /* Release memory */ - pfree(geom); - lwgeom_release(tmp); + lwgeom_free(lwgeom); + PG_FREE_IF_COPY(geom, 0); PG_RETURN_POINTER(ret); } @@ -3562,7 +2502,7 @@ Datum ST_GeoHash(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom = NULL; + GSERIALIZED *geom = NULL; int precision = 0; int len = 0; char *geohash = NULL; @@ -3573,20 +2513,17 @@ PG_RETURN_NULL(); } - geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); if ( ! PG_ARGISNULL(1) ) { precision = PG_GETARG_INT32(1); } - geohash = lwgeom_geohash((LWGEOM*)(pglwgeom_deserialize(geom)), precision); + geohash = lwgeom_geohash((LWGEOM*)(lwgeom_from_gserialized(geom)), precision); if ( ! geohash ) - { - elog(ERROR,"ST_GeoHash: lwgeom_geohash returned NULL.\n"); PG_RETURN_NULL(); - } len = strlen(geohash) + VARHDRSZ; result = palloc(len); @@ -3600,12 +2537,12 @@ PG_FUNCTION_INFO_V1(ST_CollectionExtract); Datum ST_CollectionExtract(PG_FUNCTION_ARGS) { - PG_LWGEOM *input = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_LWGEOM *output; - LWGEOM *lwgeom = pglwgeom_deserialize(input); - LWCOLLECTION *lwcol = NULL; + GSERIALIZED *input = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *output; + LWGEOM *lwgeom = lwgeom_from_gserialized(input); + LWGEOM *lwcol = NULL; int type = PG_GETARG_INT32(1); - int lwgeom_type = TYPE_GETTYPE(lwgeom->type); + int lwgeom_type = lwgeom->type; /* Ensure the right type was input */ if ( ! ( type == POINTTYPE || type == LINETYPE || type == POLYGONTYPE ) ) @@ -3616,24 +2553,94 @@ } /* Mirror non-collections right back */ - if ( ! lwgeom_is_collection(lwgeom_type) ) + if ( ! lwgeom_is_collection(lwgeom) ) { - if( lwgeom_type == type ) + /* Non-collections of the matching type go back */ + if(lwgeom_type == type) { lwgeom_free(lwgeom); PG_RETURN_POINTER(input); } + /* Others go back as EMPTY */ else { - lwgeom_free(lwgeom); - PG_RETURN_NULL(); + lwcol = lwgeom_construct_empty(type, lwgeom->srid, FLAGS_GET_Z(lwgeom->flags), FLAGS_GET_M(lwgeom->flags)); } - } + else + { + lwcol = lwcollection_as_lwgeom(lwcollection_extract((LWCOLLECTION*)lwgeom, type)); + } + +#if 0 + if (lwgeom_is_empty(lwcollection_as_lwgeom(lwcol))) + { + lwgeom_free(lwgeom); + PG_RETURN_NULL(); + } +#endif + output = geometry_serialize((LWGEOM*)lwcol); + lwgeom_free(lwgeom); + lwgeom_free(lwcol); + + PG_RETURN_POINTER(output); +} + +PG_FUNCTION_INFO_V1(ST_CollectionHomogenize); +Datum ST_CollectionHomogenize(PG_FUNCTION_ARGS) +{ + GSERIALIZED *input = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *output; + LWGEOM *lwgeom = lwgeom_from_gserialized(input); + LWGEOM *lwoutput = NULL; - lwcol = lwcollection_extract((LWCOLLECTION*)lwgeom, type); - output = pglwgeom_serialize((LWGEOM*)lwcol); + lwoutput = lwgeom_homogenize(lwgeom); lwgeom_free(lwgeom); + PG_FREE_IF_COPY(input, 0); + + if ( ! lwoutput ) + PG_RETURN_NULL(); + + output = geometry_serialize(lwoutput); + lwgeom_free(lwoutput); + + PG_RETURN_POINTER(output); +} + +Datum ST_RemoveRepeatedPoints(PG_FUNCTION_ARGS); +PG_FUNCTION_INFO_V1(ST_RemoveRepeatedPoints); +Datum ST_RemoveRepeatedPoints(PG_FUNCTION_ARGS) +{ + GSERIALIZED *input = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *output; + LWGEOM *lwgeom_in = lwgeom_from_gserialized(input); + LWGEOM *lwgeom_out; + + /* lwnotice("ST_RemoveRepeatedPoints got %p", lwgeom_in); */ + + lwgeom_out = lwgeom_remove_repeated_points(lwgeom_in); + output = geometry_serialize(lwgeom_out); + + lwgeom_free(lwgeom_in); + PG_FREE_IF_COPY(input, 0); + + PG_RETURN_POINTER(output); +} + +Datum ST_FlipCoordinates(PG_FUNCTION_ARGS); +PG_FUNCTION_INFO_V1(ST_FlipCoordinates); +Datum ST_FlipCoordinates(PG_FUNCTION_ARGS) +{ + GSERIALIZED *input = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *output; + LWGEOM *lwgeom_in = lwgeom_from_gserialized(input); + LWGEOM *lwgeom_out; + + lwgeom_out = lwgeom_flip_coordinates(lwgeom_in); + output = geometry_serialize(lwgeom_out); + + lwgeom_free(lwgeom_in); + PG_FREE_IF_COPY(input, 0); PG_RETURN_POINTER(output); } diff -Nru postgis-1.5.3/postgis/lwgeom_functions_lrs.c postgis-2.0.1/postgis/lwgeom_functions_lrs.c --- postgis-1.5.3/postgis/lwgeom_functions_lrs.c 2010-02-01 17:35:55.000000000 +0000 +++ postgis-2.0.1/postgis/lwgeom_functions_lrs.c 2012-02-27 22:08:12.000000000 +0000 @@ -1,24 +1,253 @@ /********************************************************************** - * $Id: lwgeom_functions_lrs.c 5181 2010-02-01 17:35:55Z pramsey $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net - * Copyright 2001-2005 Refractions Research Inc. + * + * Copyright (C) 2001-2005 Refractions Research Inc. * * This is free software; you can redistribute and/or modify it under * the terms of the GNU General Public Licence. See the COPYING file. * **********************************************************************/ +#include + #include "postgres.h" #include "fmgr.h" + +#include "../postgis_config.h" #include "liblwgeom.h" #include "lwgeom_pg.h" -#include "math.h" - -Datum LWGEOM_locate_between_m(PG_FUNCTION_ARGS); +/* +* Add a measure dimension to a line, interpolating linearly from the +* start value to the end value. +* ST_AddMeasure(Geometry, StartMeasure, EndMeasure) returns Geometry +*/ Datum ST_AddMeasure(PG_FUNCTION_ARGS); +PG_FUNCTION_INFO_V1(ST_AddMeasure); +Datum ST_AddMeasure(PG_FUNCTION_ARGS) +{ + GSERIALIZED *gin = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *gout; + double start_measure = PG_GETARG_FLOAT8(1); + double end_measure = PG_GETARG_FLOAT8(2); + LWGEOM *lwin, *lwout; + int type = gserialized_get_type(gin); + + /* Raise an error if input is not a linestring or multilinestring */ + if ( type != LINETYPE && type != MULTILINETYPE ) + { + lwerror("Only LINESTRING and MULTILINESTRING are supported"); + PG_RETURN_NULL(); + } + + lwin = lwgeom_from_gserialized(gin); + if ( type == LINETYPE ) + lwout = (LWGEOM*)lwline_measured_from_lwline((LWLINE*)lwin, start_measure, end_measure); + else + lwout = (LWGEOM*)lwmline_measured_from_lwmline((LWMLINE*)lwin, start_measure, end_measure); + + lwgeom_free(lwin); + + if ( lwout == NULL ) + PG_RETURN_NULL(); + + gout = geometry_serialize(lwout); + lwgeom_free(lwout); + + PG_RETURN_POINTER(gout); +} + + +/* +* Locate a point along a feature based on a measure value. +* ST_LocateAlong(Geometry, Measure, [Offset]) returns Geometry +*/ +Datum ST_LocateAlong(PG_FUNCTION_ARGS); +PG_FUNCTION_INFO_V1(ST_LocateAlong); +Datum ST_LocateAlong(PG_FUNCTION_ARGS) +{ + GSERIALIZED *gin = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *gout; + LWGEOM *lwin = NULL, *lwout = NULL; + double measure = PG_GETARG_FLOAT8(1); + double offset = PG_GETARG_FLOAT8(2);; + + lwin = lwgeom_from_gserialized(gin); + lwout = lwgeom_locate_along(lwin, measure, offset); + lwgeom_free(lwin); + PG_FREE_IF_COPY(gin, 0); + + if ( ! lwout ) + PG_RETURN_NULL(); + + gout = geometry_serialize(lwout); + lwgeom_free(lwout); + + PG_RETURN_POINTER(gout); +} + + +/* +* Locate the portion of a line between the specified measures +*/ +Datum ST_LocateBetween(PG_FUNCTION_ARGS); +PG_FUNCTION_INFO_V1(ST_LocateBetween); +Datum ST_LocateBetween(PG_FUNCTION_ARGS) +{ + GSERIALIZED *geom_in = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + double from = PG_GETARG_FLOAT8(1); + double to = PG_GETARG_FLOAT8(2); + double offset = PG_GETARG_FLOAT8(3); + LWCOLLECTION *geom_out = NULL; + LWGEOM *line_in = NULL; + static char ordinate = 'M'; /* M */ + + if ( ! gserialized_has_m(geom_in) ) + { + elog(ERROR,"This function only accepts geometries that have an M dimension."); + PG_RETURN_NULL(); + } + + /* This should be a call to ST_LocateAlong! */ + if ( to == from ) + { + PG_RETURN_DATUM(DirectFunctionCall3(ST_LocateAlong, PG_GETARG_DATUM(0), PG_GETARG_DATUM(1), PG_GETARG_DATUM(3))); + } + + line_in = lwgeom_from_gserialized(geom_in); + geom_out = lwgeom_clip_to_ordinate_range(line_in, ordinate, from, to, offset); + lwgeom_free(line_in); + PG_FREE_IF_COPY(geom_in, 0); + + if ( ! geom_out ) + { + elog(ERROR,"lwline_clip_to_ordinate_range returned null"); + PG_RETURN_NULL(); + } + + PG_RETURN_POINTER(geometry_serialize((LWGEOM*)geom_out)); +} + +/* +* Locate the portion of a line between the specified elevations +*/ +Datum ST_LocateBetweenElevations(PG_FUNCTION_ARGS); +PG_FUNCTION_INFO_V1(ST_LocateBetweenElevations); +Datum ST_LocateBetweenElevations(PG_FUNCTION_ARGS) +{ + GSERIALIZED *geom_in = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + double from = PG_GETARG_FLOAT8(1); + double to = PG_GETARG_FLOAT8(2); + LWCOLLECTION *geom_out = NULL; + LWGEOM *line_in = NULL; + static char ordinate = 'Z'; /* Z */ + static double offset = 0.0; + + if ( ! gserialized_has_z(geom_in) ) + { + elog(ERROR,"This function only accepts LINESTRING or MULTILINESTRING with Z dimensions."); + PG_RETURN_NULL(); + } + + line_in = lwgeom_from_gserialized(geom_in); + geom_out = lwgeom_clip_to_ordinate_range(line_in, ordinate, from, to, offset); + lwgeom_free(line_in); + PG_FREE_IF_COPY(geom_in, 0); + + if ( ! geom_out ) + { + elog(ERROR,"lwline_clip_to_ordinate_range returned null"); + PG_RETURN_NULL(); + } + + PG_RETURN_POINTER(geometry_serialize((LWGEOM*)geom_out)); +} + + +Datum ST_InterpolatePoint(PG_FUNCTION_ARGS); +PG_FUNCTION_INFO_V1(ST_InterpolatePoint); +Datum ST_InterpolatePoint(PG_FUNCTION_ARGS) +{ + GSERIALIZED *gser_line = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *gser_point = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + LWGEOM *lwline; + LWPOINT *lwpoint; + + if ( gserialized_get_type(gser_line) != LINETYPE ) + { + elog(ERROR,"ST_InterpolatePoint: 1st argument isn't a line"); + PG_RETURN_NULL(); + } + if ( gserialized_get_type(gser_point) != POINTTYPE ) + { + elog(ERROR,"ST_InterpolatePoint: 2st argument isn't a point"); + PG_RETURN_NULL(); + } + if ( gserialized_get_srid(gser_line) != gserialized_get_srid(gser_point) ) + { + elog(ERROR, "Operation on two geometries with different SRIDs"); + PG_RETURN_NULL(); + } + if ( ! gserialized_has_m(gser_line) ) + { + elog(ERROR,"ST_InterpolatePoint only accepts geometries that have an M dimension"); + PG_RETURN_NULL(); + } + + lwpoint = lwgeom_as_lwpoint(lwgeom_from_gserialized(gser_point)); + lwline = lwgeom_from_gserialized(gser_line); + + PG_RETURN_FLOAT8(lwgeom_interpolate_point(lwline, lwpoint)); +} + + +Datum LWGEOM_line_locate_point(PG_FUNCTION_ARGS); +PG_FUNCTION_INFO_V1(LWGEOM_line_locate_point); +Datum LWGEOM_line_locate_point(PG_FUNCTION_ARGS) +{ + GSERIALIZED *geom1 = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *geom2 = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + LWLINE *lwline; + LWPOINT *lwpoint; + POINTARRAY *pa; + POINT4D p, p_proj; + double ret; + + if ( gserialized_get_type(geom1) != LINETYPE ) + { + elog(ERROR,"line_locate_point: 1st arg isnt a line"); + PG_RETURN_NULL(); + } + if ( gserialized_get_type(geom2) != POINTTYPE ) + { + elog(ERROR,"line_locate_point: 2st arg isnt a point"); + PG_RETURN_NULL(); + } + if ( gserialized_get_srid(geom1) != gserialized_get_srid(geom2) ) + { + elog(ERROR, "Operation on two geometries with different SRIDs"); + PG_RETURN_NULL(); + } + + lwline = lwgeom_as_lwline(lwgeom_from_gserialized(geom1)); + lwpoint = lwgeom_as_lwpoint(lwgeom_from_gserialized(geom2)); + + pa = lwline->points; + lwpoint_getPoint4d_p(lwpoint, &p); + + ret = ptarray_locate_point(pa, &p, NULL, &p_proj); + + PG_RETURN_FLOAT8(ret); +} + + +/*********************************************************************** +* LEGACY SUPPORT FOR locate_between_measures and locate_along_measure +* Deprecated at PostGIS 2.0. To be removed. +*/ + typedef struct { @@ -70,7 +299,7 @@ int swapped=0; int ret=0; - LWDEBUGF(3, "m0: %g m1: %g", m0, m1); + POSTGIS_DEBUGF(3, "m0: %g m1: %g", m0, m1); /* Handle corner case of m values being the same */ if ( p1->m == p2->m ) @@ -124,9 +353,9 @@ dY=p2->y-p1->y; dZ=p2->z-p1->z; - LWDEBUGF(3, "dM0:%g dM1:%g", dM0, dM1); - LWDEBUGF(3, "dX:%g dY:%g dZ:%g", dX, dY, dZ); - LWDEBUGF(3, "swapped: %d", swapped); + POSTGIS_DEBUGF(3, "dM0:%g dM1:%g", dM0, dM1); + POSTGIS_DEBUGF(3, "dX:%g dY:%g dZ:%g", dX, dY, dZ); + POSTGIS_DEBUGF(3, "swapped: %d", swapped); /* * First point out of range, project @@ -142,7 +371,7 @@ { memcpy(p1, p2, sizeof(POINT4D)); - LWDEBUG(3, "Projected p1 on range (as copy of p2)"); + POSTGIS_DEBUG(3, "Projected p1 on range (as copy of p2)"); } else { @@ -152,7 +381,7 @@ p1->z += (dZ*dM0); p1->m = m0; - LWDEBUG(3, "Projected p1 on range"); + POSTGIS_DEBUG(3, "Projected p1 on range"); } if ( swapped ) ret |= 0x0100; @@ -173,7 +402,7 @@ { memcpy(p2, p1, sizeof(POINT4D)); - LWDEBUG(3, "Projected p2 on range (as copy of p1)"); + POSTGIS_DEBUG(3, "Projected p2 on range (as copy of p1)"); } else { @@ -183,7 +412,7 @@ p2->z += (dZ*dM1); p2->m = m1; - LWDEBUG(3, "Projected p2 on range"); + POSTGIS_DEBUG(3, "Projected p2 on range"); } if ( swapped ) ret |= 0x0010; @@ -199,7 +428,7 @@ ptarray_locate_between_m(POINTARRAY *ipa, double m0, double m1) { POINTARRAYSET ret; - DYNPTARRAY *dpa=NULL; + POINTARRAY *dpa=NULL; int i; ret.nptarrays=0; @@ -213,7 +442,7 @@ */ ret.ptarrays=lwalloc(sizeof(POINTARRAY *)*ipa->npoints-1); - LWDEBUGF(2, "ptarray_locate...: called for pointarray %x, m0:%g, m1:%g", + POSTGIS_DEBUGF(2, "ptarray_locate...: called for pointarray %x, m0:%g, m1:%g", ipa, m0, m1); @@ -225,7 +454,7 @@ getPoint4d_p(ipa, i-1, &p1); getPoint4d_p(ipa, i, &p2); - LWDEBUGF(3, " segment %d-%d [ %g %g %g %g - %g %g %g %g ]", + POSTGIS_DEBUGF(3, " segment %d-%d [ %g %g %g %g - %g %g %g %g ]", i-1, i, p1.x, p1.y, p1.z, p1.m, p2.x, p2.y, p2.z, p2.m); @@ -235,33 +464,32 @@ /* segment completely outside, nothing to do */ if (! clipval ) continue; - LWDEBUGF(3, " clipped to: [ %g %g %g %g - %g %g %g %g ] clipval: %x", p1.x, p1.y, p1.z, p1.m, + POSTGIS_DEBUGF(3, " clipped to: [ %g %g %g %g - %g %g %g %g ] clipval: %x", p1.x, p1.y, p1.z, p1.m, p2.x, p2.y, p2.z, p2.m, clipval); /* If no points have been accumulated so far, then if clipval != 0 the first point must be the start of the intersection */ if (dpa == NULL) { - LWDEBUGF(3, " 1 creating new POINTARRAY with first point %g,%g,%g,%g", p1.x, p1.y, p1.z, p1.m); + POSTGIS_DEBUGF(3, " 1 creating new POINTARRAY with first point %g,%g,%g,%g", p1.x, p1.y, p1.z, p1.m); - dpa = dynptarray_create(ipa->npoints-i, ipa->dims); - dynptarray_addPoint4d(dpa, &p1, 1); + dpa = ptarray_construct_empty(FLAGS_GET_Z(ipa->flags), FLAGS_GET_M(ipa->flags), ipa->npoints-i); + ptarray_append_point(dpa, &p1, LW_TRUE); } /* Otherwise always add the next point, avoiding duplicates */ if (dpa) - dynptarray_addPoint4d(dpa, &p2, 0); + ptarray_append_point(dpa, &p2, LW_FALSE); /* * second point has been clipped */ if ( clipval & 0x0100 || i == ipa->npoints-1 ) { - LWDEBUGF(3, " closing pointarray %x with %d points", dpa->pa, dpa->pa->npoints); + POSTGIS_DEBUGF(3, " closing pointarray %x with %d points", dpa, dpa->npoints); - ret.ptarrays[ret.nptarrays++] = dpa->pa; - lwfree(dpa); - dpa=NULL; + ret.ptarrays[ret.nptarrays++] = dpa; + dpa = NULL; } } @@ -284,18 +512,18 @@ { POINT3DM p3dm; - LWDEBUGF(2, "lwpoint_locate_between called for lwpoint %x", lwpoint); + POSTGIS_DEBUGF(2, "lwpoint_locate_between called for lwpoint %x", lwpoint); lwpoint_getPoint3dm_p(lwpoint, &p3dm); if ( p3dm.m >= m0 && p3dm.m <= m1) { - LWDEBUG(3, " lwpoint... returning a clone of input"); + POSTGIS_DEBUG(3, " lwpoint... returning a clone of input"); return (LWGEOM *)lwpoint_clone(lwpoint); } else { - LWDEBUG(3, " lwpoint... returning a clone of input"); + POSTGIS_DEBUG(3, " lwpoint... returning a clone of input"); return NULL; } @@ -325,9 +553,9 @@ const int lineflag=0x10; POINTARRAYSET paset=ptarray_locate_between_m(ipa, m0, m1); - LWDEBUGF(2, "lwline_locate_between called for lwline %x", lwline_in); + POSTGIS_DEBUGF(2, "lwline_locate_between called for lwline %x", lwline_in); - LWDEBUGF(3, " ptarray_locate... returned %d pointarrays", + POSTGIS_DEBUGF(3, " ptarray_locate... returned %d pointarrays", paset.nptarrays); if ( paset.nptarrays == 0 ) @@ -348,16 +576,7 @@ /* This is a point */ if ( pa->npoints == 1 ) { - lwpoint=lwalloc(sizeof(LWPOINT)); - lwpoint->type=lwgeom_makeType_full( - TYPE_HASZ(pa->dims), - TYPE_HASM(pa->dims), - lwline_in->SRID, - POINTTYPE, - 0); - lwpoint->SRID=lwline_in->SRID; - lwpoint->bbox=NULL; - lwpoint->point=pa; + lwpoint = lwpoint_construct(lwline_in->srid, NULL, pa); geoms[i]=(LWGEOM *)lwpoint; typeflag|=pointflag; } @@ -365,16 +584,7 @@ /* This is a line */ else if ( pa->npoints > 1 ) { - lwline=lwalloc(sizeof(LWLINE)); - lwline->type=lwgeom_makeType_full( - TYPE_HASZ(pa->dims), - TYPE_HASM(pa->dims), - lwline_in->SRID, - LINETYPE, - 0); - lwline->SRID=lwline_in->SRID; - lwline->bbox=NULL; - lwline->points=pa; + lwline = lwline_construct(lwline_in->srid, NULL, pa); geoms[i]=(LWGEOM *)lwline; typeflag|=lineflag; } @@ -399,7 +609,7 @@ else outtype = COLLECTIONTYPE; return (LWGEOM *)lwcollection_construct(outtype, - lwline_in->SRID, NULL, ngeoms, geoms); + lwline_in->srid, NULL, ngeoms, geoms); } } @@ -414,7 +624,7 @@ int ngeoms=0; LWGEOM **geoms; - LWDEBUGF(2, "lwcollection_locate_between_m called for lwcoll %x", lwcoll); + POSTGIS_DEBUGF(2, "lwcollection_locate_between_m called for lwcoll %x", lwcoll); geoms=lwalloc(sizeof(LWGEOM *)*lwcoll->ngeoms); for (i=0; ingeoms; i++) @@ -428,7 +638,7 @@ if ( ngeoms == 0 ) return NULL; return (LWGEOM *)lwcollection_construct(COLLECTIONTYPE, - lwcoll->SRID, NULL, ngeoms, geoms); + lwcoll->srid, NULL, ngeoms, geoms); } /* @@ -443,9 +653,9 @@ static LWGEOM * lwgeom_locate_between_m(LWGEOM *lwin, double m0, double m1) { - LWDEBUGF(2, "lwgeom_locate_between called for lwgeom %x", lwin); + POSTGIS_DEBUGF(2, "lwgeom_locate_between called for lwgeom %x", lwin); - switch (TYPE_GETTYPE(lwin->type)) + switch (lwin->type) { case POINTTYPE: return lwpoint_locate_between_m( @@ -479,26 +689,31 @@ * See ISO/IEC CD 13249-3:200x(E) * */ +Datum LWGEOM_locate_between_m(PG_FUNCTION_ARGS); PG_FUNCTION_INFO_V1(LWGEOM_locate_between_m); Datum LWGEOM_locate_between_m(PG_FUNCTION_ARGS) { - PG_LWGEOM *gin = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_LWGEOM *gout; + GSERIALIZED *gin = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *gout; double start_measure = PG_GETARG_FLOAT8(1); double end_measure = PG_GETARG_FLOAT8(2); LWGEOM *lwin, *lwout; + int hasz = gserialized_has_z(gin); + int hasm = gserialized_has_m(gin); int type; + elog(NOTICE,"ST_Locate_Between_Measures and ST_Locate_Along_Measure are deprecated. Use ST_LocateAlong and ST_LocateBetween."); + if ( end_measure < start_measure ) { lwerror("locate_between_m: 2nd arg must be bigger then 1st arg"); PG_RETURN_NULL(); } - + /* * Return error if input doesn't have a measure */ - if ( ! lwgeom_hasM(gin->type) ) + if ( ! hasm ) { lwerror("Geometry argument does not have an 'M' ordinate"); PG_RETURN_NULL(); @@ -508,7 +723,7 @@ * Raise an error if input is a polygon, a multipolygon * or a collection */ - type=lwgeom_getType(gin->type); + type = gserialized_get_type(gin); if ( type == POLYGONTYPE || type == MULTIPOLYGONTYPE || type == COLLECTIONTYPE ) { @@ -516,63 +731,21 @@ PG_RETURN_NULL(); } - lwin = pglwgeom_deserialize(gin); + lwin = lwgeom_from_gserialized(gin); lwout = lwgeom_locate_between_m(lwin, start_measure, end_measure); - lwgeom_release(lwin); + lwgeom_free(lwin); if ( lwout == NULL ) { - lwout = (LWGEOM *)lwcollection_construct_empty( - pglwgeom_getSRID(gin), lwgeom_hasZ(gin->type), - lwgeom_hasM(gin->type)); + lwout = (LWGEOM *)lwcollection_construct_empty(COLLECTIONTYPE, + gserialized_get_srid(gin), hasz, hasm); } - gout = pglwgeom_serialize(lwout); - lwgeom_release(lwout); - - PG_RETURN_POINTER(gout); -} - - -/* -* CREATE OR REPLACE FUNCTION ST_AddMeasure(geometry, float8, float8) -* RETURNS geometry -* AS '$libdir/postgis-1.5', 'ST_AddMeasure' -* LANGUAGE 'C' IMMUTABLE STRICT; -*/ -PG_FUNCTION_INFO_V1(ST_AddMeasure); -Datum ST_AddMeasure(PG_FUNCTION_ARGS) -{ - PG_LWGEOM *gin = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_LWGEOM *gout; - double start_measure = PG_GETARG_FLOAT8(1); - double end_measure = PG_GETARG_FLOAT8(2); - LWGEOM *lwin, *lwout; - int type = TYPE_GETTYPE(gin->type); - - /* Raise an error if input is not a linestring or multilinestring */ - if ( type != LINETYPE && type != MULTILINETYPE ) - { - lwerror("Only LINESTRING and MULTILINESTRING are supported"); - PG_RETURN_NULL(); - } - - lwin = pglwgeom_deserialize(gin); - if ( type == LINETYPE ) - lwout = (LWGEOM*)lwline_measured_from_lwline((LWLINE*)lwin, start_measure, end_measure); - else - lwout = (LWGEOM*)lwmline_measured_from_lwmline((LWMLINE*)lwin, start_measure, end_measure); - - lwgeom_release(lwin); - - if ( lwout == NULL ) - PG_RETURN_NULL(); - - gout = pglwgeom_serialize(lwout); - lwgeom_release(lwout); + gout = geometry_serialize(lwout); + lwgeom_free(lwout); PG_RETURN_POINTER(gout); } diff -Nru postgis-1.5.3/postgis/lwgeom_geojson.c postgis-2.0.1/postgis/lwgeom_geojson.c --- postgis-1.5.3/postgis/lwgeom_geojson.c 2010-02-22 22:03:25.000000000 +0000 +++ postgis-2.0.1/postgis/lwgeom_geojson.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,891 +0,0 @@ -/********************************************************************** - * $Id: lwgeom_geojson.c 5310 2010-02-22 22:03:25Z colivier $ - * - * PostGIS - Spatial Types for PostgreSQL - * http://postgis.refractions.net - * Copyright 2001-2003 Refractions Research Inc. - * - * This is free software; you can redistribute and/or modify it under - * the terms of hte GNU General Public Licence. See the COPYING file. - * - **********************************************************************/ -/** @file -* GeoJSON output routines. -* Originally written by Olivier Courtin (Camptocamp) -* -**********************************************************************/ - -#include "postgres.h" - -#include "lwgeom_pg.h" -#include "liblwgeom.h" -#include "lwgeom_export.h" - -Datum LWGEOM_asGeoJson(PG_FUNCTION_ARGS); - -static char *asgeojson_point(LWPOINT *point, char *srs, BOX3D *bbox, int precision); -static char *asgeojson_line(LWLINE *line, char *srs, BOX3D *bbox, int precision); -static char *asgeojson_poly(LWPOLY *poly, char *srs, BOX3D *bbox, int precision); -static char * asgeojson_multipoint(LWGEOM_INSPECTED *insp, char *srs, BOX3D *bbox, int precision); -static char * asgeojson_multiline(LWGEOM_INSPECTED *insp, char *srs, BOX3D *bbox, int precision); -static char * asgeojson_multipolygon(LWGEOM_INSPECTED *insp, char *srs, BOX3D *bbox, int precision); -static char * asgeojson_collection(LWGEOM_INSPECTED *insp, char *srs, BOX3D *bbox, int precision); -static size_t asgeojson_inspected_size(LWGEOM_INSPECTED *insp, BOX3D *bbox, int precision); -static size_t asgeojson_inspected_buf(LWGEOM_INSPECTED *insp, char *output, BOX3D *bbox, int precision); - -static size_t pointArray_to_geojson(POINTARRAY *pa, char *buf, int precision); -static size_t pointArray_geojson_size(POINTARRAY *pa, int precision); - - -/** - * Encode Feature in GeoJson - */ -PG_FUNCTION_INFO_V1(LWGEOM_asGeoJson); -Datum LWGEOM_asGeoJson(PG_FUNCTION_ARGS) -{ - PG_LWGEOM *geom; - char *geojson; - text *result; - int SRID; - int len; - int version; - int option = 0; - bool has_bbox = 0; - int precision = MAX_DOUBLE_PRECISION; - char * srs = NULL; - - /* Get the version */ - version = PG_GETARG_INT32(0); - if ( version != 1) - { - elog(ERROR, "Only GeoJSON 1 is supported"); - PG_RETURN_NULL(); - } - - /* Get the geometry */ - if (PG_ARGISNULL(1) ) PG_RETURN_NULL(); - geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - - /* Retrieve precision if any (default is max) */ - if (PG_NARGS() >2 && !PG_ARGISNULL(2)) - { - precision = PG_GETARG_INT32(2); - if ( precision > MAX_DOUBLE_PRECISION ) - precision = MAX_DOUBLE_PRECISION; - else if ( precision < 0 ) precision = 0; - } - - /* Retrieve output option - * 0 = without option (default) - * 1 = bbox - * 2 = short crs - * 4 = long crs - */ - if (PG_NARGS() >3 && !PG_ARGISNULL(3)) - option = PG_GETARG_INT32(3); - - if (option & 2 || option & 4) - { - SRID = lwgeom_getsrid(SERIALIZED_FORM(geom)); - if ( SRID != -1 ) - { - if (option & 2) srs = getSRSbySRID(SRID, true); - if (option & 4) srs = getSRSbySRID(SRID, false); - if (!srs) - { - elog(ERROR, "SRID %i unknown in spatial_ref_sys table", SRID); - PG_RETURN_NULL(); - } - } - } - - if (option & 1) has_bbox = 1; - - geojson = geometry_to_geojson(SERIALIZED_FORM(geom), srs, has_bbox, precision); - PG_FREE_IF_COPY(geom, 1); - if (srs) pfree(srs); - - len = strlen(geojson) + VARHDRSZ; - result = palloc(len); - SET_VARSIZE(result, len); - memcpy(VARDATA(result), geojson, len-VARHDRSZ); - - pfree(geojson); - - PG_RETURN_POINTER(result); -} - - -/** - * Takes a GEOMETRY and returns a GeoJson representation - */ -char * -geometry_to_geojson(uchar *geom, char *srs, bool has_bbox, int precision) -{ - int type; - LWPOINT *point; - LWLINE *line; - LWPOLY *poly; - LWGEOM_INSPECTED *insp; - BOX3D * bbox = NULL; - char * ret = NULL; - - type = lwgeom_getType(geom[0]); - - if (has_bbox) bbox = compute_serialized_box3d(geom); - - switch (type) - { - case POINTTYPE: - point = lwpoint_deserialize(geom); - ret = asgeojson_point(point, srs, bbox, precision); - break; - - case LINETYPE: - line = lwline_deserialize(geom); - ret = asgeojson_line(line, srs, bbox, precision); - break; - - case POLYGONTYPE: - poly = lwpoly_deserialize(geom); - ret = asgeojson_poly(poly, srs, bbox, precision); - break; - - case MULTIPOINTTYPE: - insp = lwgeom_inspect(geom); - ret = asgeojson_multipoint(insp, srs, bbox, precision); - break; - - case MULTILINETYPE: - insp = lwgeom_inspect(geom); - ret = asgeojson_multiline(insp, srs, bbox, precision); - break; - - case MULTIPOLYGONTYPE: - insp = lwgeom_inspect(geom); - ret = asgeojson_multipolygon(insp, srs, bbox, precision); - break; - - case COLLECTIONTYPE: - insp = lwgeom_inspect(geom); - ret = asgeojson_collection(insp, srs, bbox, precision); - break; - - default: - if (bbox) - { - lwfree(bbox); - bbox = NULL; - } - lwerror("GeoJson: '%s' geometry type not supported.", - lwgeom_typename(type)); - } - - if (bbox) - { - lwfree(bbox); - bbox = NULL; - } - - return ret; -} - - - -/** - * Handle SRS - */ -static size_t -asgeojson_srs_size(char *srs) -{ - int size; - - size = sizeof("'crs':{'type':'name',"); - size += sizeof("'properties':{'name':''}},"); - size += strlen(srs) * sizeof(char); - - return size; -} - -static size_t -asgeojson_srs_buf(char *output, char *srs) -{ - char *ptr = output; - - ptr += sprintf(ptr, "\"crs\":{\"type\":\"name\","); - ptr += sprintf(ptr, "\"properties\":{\"name\":\"%s\"}},", srs); - - return (ptr-output); -} - - - -/** - * Handle Bbox - */ -static size_t -asgeojson_bbox_size(bool hasz, int precision) -{ - int size; - - if (!hasz) - { - size = sizeof("\"bbox\":[,,,],"); - size += 2 * 2 * (MAX_DIGS_DOUBLE + precision); - } - else - { - size = sizeof("\"bbox\":[,,,,,],"); - size += 2 * 3 * (MAX_DIGS_DOUBLE + precision); - } - - return size; -} - -static size_t -asgeojson_bbox_buf(char *output, BOX3D *bbox, bool hasz, int precision) -{ - char *ptr = output; - - if (!hasz) - ptr += sprintf(ptr, "\"bbox\":[%.*f,%.*f,%.*f,%.*f],", - precision, bbox->xmin, precision, bbox->ymin, - precision, bbox->xmax, precision, bbox->ymax); - else - ptr += sprintf(ptr, "\"bbox\":[%.*f,%.*f,%.*f,%.*f,%.*f,%.*f],", - precision, bbox->xmin, precision, bbox->ymin, precision, bbox->zmin, - precision, bbox->xmax, precision, bbox->ymax, precision, bbox->zmax); - - return (ptr-output); -} - - - -/** - * Point Geometry - */ - -static size_t -asgeojson_point_size(LWPOINT *point, char *srs, BOX3D *bbox, int precision) -{ - int size; - - size = pointArray_geojson_size(point->point, precision); - size += sizeof("{'type':'Point',"); - size += sizeof("'coordinates':}"); - - if (srs) size += asgeojson_srs_size(srs); - if (bbox) size += asgeojson_bbox_size(TYPE_HASZ(point->type), precision); - - return size; -} - -static size_t -asgeojson_point_buf(LWPOINT *point, char *srs, char *output, BOX3D *bbox, int precision) -{ - char *ptr = output; - - ptr += sprintf(ptr, "{\"type\":\"Point\","); - if (srs) ptr += asgeojson_srs_buf(ptr, srs); - if (bbox) ptr += asgeojson_bbox_buf(ptr, bbox, TYPE_HASZ(point->type), precision); - - ptr += sprintf(ptr, "\"coordinates\":"); - ptr += pointArray_to_geojson(point->point, ptr, precision); - ptr += sprintf(ptr, "}"); - - return (ptr-output); -} - -static char * -asgeojson_point(LWPOINT *point, char *srs, BOX3D *bbox, int precision) -{ - char *output; - int size; - - size = asgeojson_point_size(point, srs, bbox, precision); - output = palloc(size); - asgeojson_point_buf(point, srs, output, bbox, precision); - return output; -} - - - -/** - * Line Geometry - */ - -static size_t -asgeojson_line_size(LWLINE *line, char *srs, BOX3D *bbox, int precision) -{ - int size; - - size = sizeof("{'type':'LineString',"); - if (srs) size += asgeojson_srs_size(srs); - if (bbox) size += asgeojson_bbox_size(TYPE_HASZ(line->type), precision); - size += sizeof("'coordinates':[]}"); - size += pointArray_geojson_size(line->points, precision); - - return size; -} - -static size_t -asgeojson_line_buf(LWLINE *line, char *srs, char *output, BOX3D *bbox, int precision) -{ - char *ptr=output; - - ptr += sprintf(ptr, "{\"type\":\"LineString\","); - if (srs) ptr += asgeojson_srs_buf(ptr, srs); - if (bbox) ptr += asgeojson_bbox_buf(ptr, bbox, TYPE_HASZ(line->type), precision); - ptr += sprintf(ptr, "\"coordinates\":["); - ptr += pointArray_to_geojson(line->points, ptr, precision); - ptr += sprintf(ptr, "]}"); - - return (ptr-output); -} - -static char * -asgeojson_line(LWLINE *line, char *srs, BOX3D *bbox, int precision) -{ - char *output; - int size; - - size = asgeojson_line_size(line, srs, bbox, precision); - output = palloc(size); - asgeojson_line_buf(line, srs, output, bbox, precision); - - return output; -} - - - -/** - * Polygon Geometry - */ - -static size_t -asgeojson_poly_size(LWPOLY *poly, char *srs, BOX3D *bbox, int precision) -{ - size_t size; - int i; - - size = sizeof("{\"type\":\"Polygon\","); - if (srs) size += asgeojson_srs_size(srs); - if (bbox) size += asgeojson_bbox_size(TYPE_HASZ(poly->type), precision); - size += sizeof("\"coordinates\":["); - for (i=0, size=0; inrings; i++) - { - size += pointArray_geojson_size(poly->rings[i], precision); - size += sizeof("[]"); - } - size += sizeof(",") * i; - size += sizeof("]}"); - - return size; -} - -static size_t -asgeojson_poly_buf(LWPOLY *poly, char *srs, char *output, BOX3D *bbox, int precision) -{ - int i; - char *ptr=output; - - ptr += sprintf(ptr, "{\"type\":\"Polygon\","); - if (srs) ptr += asgeojson_srs_buf(ptr, srs); - if (bbox) ptr += asgeojson_bbox_buf(ptr, bbox, TYPE_HASZ(poly->type), precision); - ptr += sprintf(ptr, "\"coordinates\":["); - for (i=0; inrings; i++) - { - if (i) ptr += sprintf(ptr, ","); - ptr += sprintf(ptr, "["); - ptr += pointArray_to_geojson(poly->rings[i], ptr, precision); - ptr += sprintf(ptr, "]"); - } - ptr += sprintf(ptr, "]}"); - - return (ptr-output); -} - -static char * -asgeojson_poly(LWPOLY *poly, char *srs, BOX3D *bbox, int precision) -{ - char *output; - int size; - - size = asgeojson_poly_size(poly, srs, bbox, precision); - output = palloc(size); - asgeojson_poly_buf(poly, srs, output, bbox, precision); - - return output; -} - - - -/** - * Multipoint Geometry - */ - -static size_t -asgeojson_multipoint_size(LWGEOM_INSPECTED *insp, char *srs, BOX3D *bbox, int precision) -{ - LWPOINT * point; - int size; - int i; - - size = sizeof("{'type':'MultiPoint',"); - if (srs) size += asgeojson_srs_size(srs); - if (bbox) size += asgeojson_bbox_size(TYPE_HASZ(insp->type), precision); - size += sizeof("'coordinates':[]}"); - - for (i=0; ingeometries; i++) - { - point = lwgeom_getpoint_inspected(insp, i); - size += pointArray_geojson_size(point->point, precision); - lwpoint_release(point); - } - size += sizeof(",") * i; - - return size; -} - -static size_t -asgeojson_multipoint_buf(LWGEOM_INSPECTED *insp, char *srs, char *output, BOX3D *bbox, int precision) -{ - LWPOINT *point; - int i; - char *ptr=output; - - ptr += sprintf(ptr, "{\"type\":\"MultiPoint\","); - if (srs) ptr += asgeojson_srs_buf(ptr, srs); - if (bbox) ptr += asgeojson_bbox_buf(ptr, bbox, TYPE_HASZ(insp->type), precision); - ptr += sprintf(ptr, "\"coordinates\":["); - - for (i=0; ingeometries; i++) - { - if (i) ptr += sprintf(ptr, ","); - point=lwgeom_getpoint_inspected(insp, i); - ptr += pointArray_to_geojson(point->point, ptr, precision); - lwpoint_release(point); - } - ptr += sprintf(ptr, "]}"); - - return (ptr - output); -} - -static char * -asgeojson_multipoint(LWGEOM_INSPECTED *insp, char *srs, BOX3D *bbox, int precision) -{ - char *output; - int size; - - size = asgeojson_multipoint_size(insp, srs, bbox, precision); - output = palloc(size); - asgeojson_multipoint_buf(insp, srs, output, bbox, precision); - - return output; -} - - - -/** - * Multiline Geometry - */ - -static size_t -asgeojson_multiline_size(LWGEOM_INSPECTED *insp, char *srs, BOX3D *bbox, int precision) -{ - LWLINE * line; - int size; - int i; - - size = sizeof("{'type':'MultiLineString',"); - if (srs) size += asgeojson_srs_size(srs); - if (bbox) size += asgeojson_bbox_size(TYPE_HASZ(insp->type), precision); - size += sizeof("'coordinates':[]}"); - - for (i=0 ; ingeometries; i++) - { - line = lwgeom_getline_inspected(insp, i); - size += pointArray_geojson_size(line->points, precision); - size += sizeof("[]"); - lwline_release(line); - } - size += sizeof(",") * i; - - return size; -} - -static size_t -asgeojson_multiline_buf(LWGEOM_INSPECTED *insp, char *srs, char *output, BOX3D *bbox, int precision) -{ - LWLINE *line; - int i; - char *ptr=output; - - ptr += sprintf(ptr, "{\"type\":\"MultiLineString\","); - if (srs) ptr += asgeojson_srs_buf(ptr, srs); - if (bbox) ptr += asgeojson_bbox_buf(ptr, bbox, TYPE_HASZ(insp->type), precision); - ptr += sprintf(ptr, "\"coordinates\":["); - - for (i=0; ingeometries; i++) - { - if (i) ptr += sprintf(ptr, ","); - ptr += sprintf(ptr, "["); - line = lwgeom_getline_inspected(insp, i); - ptr += pointArray_to_geojson(line->points, ptr, precision); - ptr += sprintf(ptr, "]"); - - lwline_release(line); - } - - ptr += sprintf(ptr, "]}"); - - return (ptr - output); -} - -static char * -asgeojson_multiline(LWGEOM_INSPECTED *insp, char *srs, BOX3D *bbox, int precision) -{ - char *output; - int size; - - size = asgeojson_multiline_size(insp, srs, bbox, precision); - output = palloc(size); - asgeojson_multiline_buf(insp, srs, output, bbox, precision); - - return output; -} - - - -/** - * MultiPolygon Geometry - */ - -static size_t -asgeojson_multipolygon_size(LWGEOM_INSPECTED *insp, char *srs, BOX3D *bbox, int precision) -{ - LWPOLY *poly; - int size; - int i, j; - - size = sizeof("{'type':'MultiPolygon',"); - if (srs) size += asgeojson_srs_size(srs); - if (bbox) size += asgeojson_bbox_size(TYPE_HASZ(insp->type), precision); - size += sizeof("'coordinates':[]}"); - - for (i=0; i < insp->ngeometries; i++) - { - poly = lwgeom_getpoly_inspected(insp, i); - for (j=0 ; j nrings ; j++) - { - size += pointArray_geojson_size(poly->rings[j], precision); - size += sizeof("[]"); - } - lwpoly_release(poly); - size += sizeof("[]"); - } - size += sizeof(",") * i; - size += sizeof("]}"); - - return size; -} - -static size_t -asgeojson_multipolygon_buf(LWGEOM_INSPECTED *insp, char *srs, char *output, BOX3D *bbox, int precision) -{ - LWPOLY *poly; - int i, j; - char *ptr=output; - - ptr += sprintf(ptr, "{\"type\":\"MultiPolygon\","); - if (srs) ptr += asgeojson_srs_buf(ptr, srs); - if (bbox) ptr += asgeojson_bbox_buf(ptr, bbox, TYPE_HASZ(insp->type), precision); - ptr += sprintf(ptr, "\"coordinates\":["); - for (i=0; ingeometries; i++) - { - if (i) ptr += sprintf(ptr, ","); - ptr += sprintf(ptr, "["); - poly = lwgeom_getpoly_inspected(insp, i); - for (j=0 ; j < poly->nrings ; j++) - { - if (j) ptr += sprintf(ptr, ","); - ptr += sprintf(ptr, "["); - ptr += pointArray_to_geojson(poly->rings[j], ptr, precision); - ptr += sprintf(ptr, "]"); - } - ptr += sprintf(ptr, "]"); - lwpoly_release(poly); - } - ptr += sprintf(ptr, "]}"); - - return (ptr - output); -} - -static char * -asgeojson_multipolygon(LWGEOM_INSPECTED *insp, char *srs, BOX3D *bbox, int precision) -{ - char *output; - int size; - - size = asgeojson_multipolygon_size(insp, srs, bbox, precision); - output = palloc(size); - asgeojson_multipolygon_buf(insp, srs, output, bbox, precision); - - return output; -} - - - -/** - * Collection Geometry - */ - -static size_t -asgeojson_collection_size(LWGEOM_INSPECTED *insp, char *srs, BOX3D *bbox, int precision) -{ - int i; - int size; - LWGEOM_INSPECTED *subinsp; - uchar *subgeom; - - size = sizeof("{'type':'GeometryCollection',"); - if (srs) size += asgeojson_srs_size(srs); - if (bbox) size += asgeojson_bbox_size(TYPE_HASZ(insp->type), precision); - size += sizeof("'geometries':"); - - for (i=0; ingeometries; i++) - { - subgeom = lwgeom_getsubgeometry_inspected(insp, i); - subinsp = lwgeom_inspect(subgeom); - size += asgeojson_inspected_size(subinsp, NULL, precision); - lwinspected_release(subinsp); - } - size += sizeof(",") * i; - size += sizeof("]}"); - - return size; -} - -static size_t -asgeojson_collection_buf(LWGEOM_INSPECTED *insp, char *srs, char *output, BOX3D *bbox, int precision) -{ - int i; - char *ptr=output; - LWGEOM_INSPECTED *subinsp; - uchar *subgeom; - - ptr += sprintf(ptr, "{\"type\":\"GeometryCollection\","); - if (srs) ptr += asgeojson_srs_buf(ptr, srs); - if (bbox) ptr += asgeojson_bbox_buf(ptr, bbox, TYPE_HASZ(insp->type), precision); - ptr += sprintf(ptr, "\"geometries\":["); - - for (i=0; ingeometries; i++) - { - if (i) ptr += sprintf(ptr, ","); - subgeom = lwgeom_getsubgeometry_inspected(insp, i); - subinsp = lwgeom_inspect(subgeom); - ptr += asgeojson_inspected_buf(subinsp, ptr, NULL, precision); - lwinspected_release(subinsp); - } - - ptr += sprintf(ptr, "]}"); - - return (ptr - output); -} - -static char * -asgeojson_collection(LWGEOM_INSPECTED *insp, char *srs, BOX3D *bbox, int precision) -{ - char *output; - int size; - - size = asgeojson_collection_size(insp, srs, bbox, precision); - output = palloc(size); - asgeojson_collection_buf(insp, srs, output, bbox, precision); - - return output; -} - - - -static size_t -asgeojson_inspected_size(LWGEOM_INSPECTED *insp, BOX3D *bbox, int precision) -{ - int type = lwgeom_getType(insp->serialized_form[0]); - size_t size = 0; - LWPOINT *point; - LWLINE *line; - LWPOLY *poly; - - switch (type) - { - case POINTTYPE: - point=lwgeom_getpoint_inspected(insp, 0); - size = asgeojson_point_size(point, NULL, bbox, precision); - lwpoint_release(point); - break; - - case LINETYPE: - line=lwgeom_getline_inspected(insp, 0); - size = asgeojson_line_size(line, NULL, bbox, precision); - lwline_release(line); - break; - - case POLYGONTYPE: - poly=lwgeom_getpoly_inspected(insp, 0); - size = asgeojson_poly_size(poly, NULL, bbox, precision); - lwpoly_release(poly); - break; - - case MULTIPOINTTYPE: - size = asgeojson_multipoint_size(insp, NULL, bbox, precision); - break; - - case MULTILINETYPE: - size = asgeojson_multiline_size(insp, NULL, bbox, precision); - break; - - case MULTIPOLYGONTYPE: - size = asgeojson_multipolygon_size(insp, NULL, bbox, precision); - break; - - default: - lwerror("GeoJson: geometry not supported."); - } - - return size; -} - - -static size_t -asgeojson_inspected_buf(LWGEOM_INSPECTED *insp, char *output, BOX3D *bbox, int precision) -{ - LWPOINT *point; - LWLINE *line; - LWPOLY *poly; - int type = lwgeom_getType(insp->serialized_form[0]); - char *ptr=output; - - switch (type) - { - case POINTTYPE: - point=lwgeom_getpoint_inspected(insp, 0); - ptr += asgeojson_point_buf(point, NULL, ptr, bbox, precision); - lwpoint_release(point); - break; - - case LINETYPE: - line=lwgeom_getline_inspected(insp, 0); - ptr += asgeojson_line_buf(line, NULL, ptr, bbox, precision); - lwline_release(line); - break; - - case POLYGONTYPE: - poly=lwgeom_getpoly_inspected(insp, 0); - ptr += asgeojson_poly_buf(poly, NULL, ptr, bbox, precision); - lwpoly_release(poly); - break; - - case MULTIPOINTTYPE: - ptr += asgeojson_multipoint_buf(insp, NULL, ptr, bbox, precision); - break; - - case MULTILINETYPE: - ptr += asgeojson_multiline_buf(insp, NULL, ptr, bbox, precision); - break; - - case MULTIPOLYGONTYPE: - ptr += asgeojson_multipolygon_buf(insp, NULL, ptr, bbox, precision); - break; - - default: - if (bbox) lwfree(bbox); - lwerror("GeoJson: geometry not supported."); - } - - return (ptr-output); -} - - -static size_t -pointArray_to_geojson(POINTARRAY *pa, char *output, int precision) -{ - int i; - char *ptr; - char x[MAX_DIGS_DOUBLE+MAX_DOUBLE_PRECISION+1]; - char y[MAX_DIGS_DOUBLE+MAX_DOUBLE_PRECISION+1]; - char z[MAX_DIGS_DOUBLE+MAX_DOUBLE_PRECISION+1]; - - ptr = output; - - if (!TYPE_HASZ(pa->dims)) - { - for (i=0; inpoints; i++) - { - POINT2D pt; - getPoint2d_p(pa, i, &pt); - - if (fabs(pt.x) < MAX_DOUBLE) - sprintf(x, "%.*f", precision, pt.x); - else - sprintf(x, "%g", pt.x); - trim_trailing_zeros(x); - - if (fabs(pt.y) < MAX_DOUBLE) - sprintf(y, "%.*f", precision, pt.y); - else - sprintf(y, "%g", pt.y); - trim_trailing_zeros(y); - - if ( i ) ptr += sprintf(ptr, ","); - ptr += sprintf(ptr, "[%s,%s]", x, y); - } - } - else - { - for (i=0; inpoints; i++) - { - POINT4D pt; - getPoint4d_p(pa, i, &pt); - - if (fabs(pt.x) < MAX_DOUBLE) - sprintf(x, "%.*f", precision, pt.x); - else - sprintf(x, "%g", pt.x); - trim_trailing_zeros(x); - - if (fabs(pt.y) < MAX_DOUBLE) - sprintf(y, "%.*f", precision, pt.y); - else - sprintf(y, "%g", pt.y); - trim_trailing_zeros(y); - - if (fabs(pt.z) < MAX_DOUBLE) - sprintf(z, "%.*f", precision, pt.z); - else - sprintf(z, "%g", pt.z); - trim_trailing_zeros(z); - - if ( i ) ptr += sprintf(ptr, ","); - ptr += sprintf(ptr, "[%s,%s,%s]", x, y, z); - } - } - - return (ptr-output); -} - - - -/** - * Returns maximum size of rendered pointarray in bytes. - */ -static size_t -pointArray_geojson_size(POINTARRAY *pa, int precision) -{ - if (TYPE_NDIMS(pa->dims) == 2) - return (MAX_DIGS_DOUBLE + precision + sizeof(",")) - * 2 * pa->npoints + sizeof(",[]"); - - return (MAX_DIGS_DOUBLE + precision + sizeof(",,")) - * 3 * pa->npoints + sizeof(",[]"); -} diff -Nru postgis-1.5.3/postgis/lwgeom_geos.c postgis-2.0.1/postgis/lwgeom_geos.c --- postgis-1.5.3/postgis/lwgeom_geos.c 2011-06-09 13:59:42.000000000 +0000 +++ postgis-2.0.1/postgis/lwgeom_geos.c 2012-05-16 19:39:43.000000000 +0000 @@ -1,10 +1,9 @@ /********************************************************************** - * $Id: lwgeom_geos.c 7344 2011-06-09 13:59:42Z pramsey $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net * - * Copyright 2009 Sandro Santilli + * Copyright 2009-2012 Sandro Santilli * Copyright 2008 Paul Ramsey * Copyright 2001-2003 Refractions Research Inc. * @@ -13,19 +12,35 @@ * **********************************************************************/ +/* TODO: we probaby don't need _all_ these pgsql headers */ +#include "postgres.h" +#include "fmgr.h" +#include "miscadmin.h" +#include "utils/array.h" +#include "utils/builtins.h" +#include "utils/hsearch.h" +#include "utils/memutils.h" +#include "executor/spi.h" +#include "funcapi.h" + +#include "../postgis_config.h" +#include "lwgeom_functions_analytic.h" /* for point_in_polygon */ +#include "lwgeom_cache.h" #include "lwgeom_geos.h" +#include "liblwgeom_internal.h" #include "lwgeom_rtree.h" -#include "lwgeom_geos_prepared.h" -#include "lwgeom_functions_analytic.h" -#include +/* +** GEOS prepared geometry is only available from GEOS 3.1 onwards +*/ +#define PREPARED_GEOM +#ifdef PREPARED_GEOM +#include "lwgeom_geos_prepared.h" +#endif -/** -** NOTE: Buffer-based GeomUnion has been disabled due to -** limitations in the GEOS code (it would only work against polygons) -** DONE: Implement cascaded GeomUnion and remove old buffer-based code. -*/ +#include +#include /* ** Prototypes for SQL-bound functions @@ -36,13 +51,13 @@ Datum touches(PG_FUNCTION_ARGS); Datum intersects(PG_FUNCTION_ARGS); Datum crosses(PG_FUNCTION_ARGS); -Datum within(PG_FUNCTION_ARGS); Datum contains(PG_FUNCTION_ARGS); Datum containsproperly(PG_FUNCTION_ARGS); Datum covers(PG_FUNCTION_ARGS); Datum overlaps(PG_FUNCTION_ARGS); Datum isvalid(PG_FUNCTION_ARGS); Datum isvalidreason(PG_FUNCTION_ARGS); +Datum isvaliddetail(PG_FUNCTION_ARGS); Datum buffer(PG_FUNCTION_ARGS); Datum intersection(PG_FUNCTION_ARGS); Datum convexhull(PG_FUNCTION_ARGS); @@ -53,42 +68,55 @@ Datum geomunion(PG_FUNCTION_ARGS); Datum issimple(PG_FUNCTION_ARGS); Datum isring(PG_FUNCTION_ARGS); -Datum geomequals(PG_FUNCTION_ARGS); Datum pointonsurface(PG_FUNCTION_ARGS); Datum GEOSnoop(PG_FUNCTION_ARGS); Datum postgis_geos_version(PG_FUNCTION_ARGS); Datum centroid(PG_FUNCTION_ARGS); Datum polygonize_garray(PG_FUNCTION_ARGS); -Datum LWGEOM_buildarea(PG_FUNCTION_ARGS); /* TODO: rename to match others -*/ Datum linemerge(PG_FUNCTION_ARGS); Datum coveredby(PG_FUNCTION_ARGS); Datum hausdorffdistance(PG_FUNCTION_ARGS); Datum hausdorffdistancedensify(PG_FUNCTION_ARGS); +Datum ST_UnaryUnion(PG_FUNCTION_ARGS); +Datum ST_Equals(PG_FUNCTION_ARGS); +Datum ST_BuildArea(PG_FUNCTION_ARGS); -Datum pgis_union_geometry_array_old(PG_FUNCTION_ARGS); Datum pgis_union_geometry_array(PG_FUNCTION_ARGS); - /* ** Prototypes end */ +static RTREE_POLY_CACHE * +GetRtreeCache(FunctionCallInfoData *fcinfo, LWGEOM *lwgeom, GSERIALIZED *poly) +{ + MemoryContext old_context; + GeomCache* supercache = GetGeomCache(fcinfo); + RTREE_POLY_CACHE *poly_cache = supercache->rtree; + + /* + * Switch the context to the function-scope context, + * retrieve the appropriate cache object, cache it for + * future use, then switch back to the local context. + */ + old_context = MemoryContextSwitchTo(fcinfo->flinfo->fn_mcxt); + poly_cache = retrieveCache(lwgeom, poly, poly_cache); + supercache->rtree = poly_cache; + MemoryContextSwitchTo(old_context); + + return poly_cache; +} + PG_FUNCTION_INFO_V1(postgis_geos_version); Datum postgis_geos_version(PG_FUNCTION_ARGS) { - const char *ver = GEOSversion(); - text *result; - result = (text *) palloc(VARHDRSZ + strlen(ver)); - SET_VARSIZE(result, VARHDRSZ + strlen(ver)); - memcpy(VARDATA(result), ver, strlen(ver)); + const char *ver = lwgeom_geos_version(); + text *result = cstring2text(ver); PG_RETURN_POINTER(result); } -#if POSTGIS_GEOS_VERSION >= 32 - /** * @brief Compute the Hausdorff distance thanks to the corresponding GEOS function * @example hausdorffdistance {@link #hausdorffdistance} - SELECT st_hausdorffdistance( @@ -99,8 +127,15 @@ PG_FUNCTION_INFO_V1(hausdorffdistance); Datum hausdorffdistance(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom1; - PG_LWGEOM *geom2; +#if POSTGIS_GEOS_VERSION < 32 + lwerror("The GEOS version this PostGIS binary " + "was compiled against (%d) doesn't support " + "'ST_HausdorffDistance' function (3.2.0+ required)", + POSTGIS_GEOS_VERSION); + PG_RETURN_NULL(); +#else + GSERIALIZED *geom1; + GSERIALIZED *geom2; GEOSGeometry *g1; GEOSGeometry *g2; double result; @@ -108,20 +143,36 @@ POSTGIS_DEBUG(2, "hausdorff_distance called"); - geom1 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - geom2 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + geom1 = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + geom2 = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + + if ( gserialized_is_empty(geom1) || gserialized_is_empty(geom2) ) + PG_RETURN_NULL(); - initGEOS(lwnotice, lwnotice); + initGEOS(lwnotice, lwgeom_geos_error); g1 = (GEOSGeometry *)POSTGIS2GEOS(geom1); + if ( 0 == g1 ) /* exception thrown at construction */ + { + lwerror("First argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + PG_RETURN_NULL(); + } + g2 = (GEOSGeometry *)POSTGIS2GEOS(geom2); + if ( 0 == g2 ) /* exception thrown */ + { + lwerror("Second argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + GEOSGeom_destroy(g1); + PG_RETURN_NULL(); + } + retcode = GEOSHausdorffDistance(g1, g2, &result); GEOSGeom_destroy(g1); GEOSGeom_destroy(g2); if (retcode == 0) { - elog(ERROR,"GEOS HausdorffDistance() threw an error!"); + lwerror("GEOSHausdorffDistance: %s", lwgeom_geos_errmsg); PG_RETURN_NULL(); /*never get here */ } @@ -129,6 +180,7 @@ PG_FREE_IF_COPY(geom2, 1); PG_RETURN_FLOAT8(result); +#endif } /** @@ -141,8 +193,15 @@ PG_FUNCTION_INFO_V1(hausdorffdistancedensify); Datum hausdorffdistancedensify(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom1; - PG_LWGEOM *geom2; +#if POSTGIS_GEOS_VERSION < 32 + lwerror("The GEOS version this PostGIS binary " + "was compiled against (%d) doesn't support " + "'ST_HausdorffDistance' function (3.2.0+ required)", + POSTGIS_GEOS_VERSION); + PG_RETURN_NULL(); +#else + GSERIALIZED *geom1; + GSERIALIZED *geom2; GEOSGeometry *g1; GEOSGeometry *g2; double densifyFrac; @@ -150,21 +209,37 @@ int retcode; - geom1 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - geom2 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + geom1 = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + geom2 = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); densifyFrac = PG_GETARG_FLOAT8(2); - initGEOS(lwnotice, lwnotice); + if ( gserialized_is_empty(geom1) || gserialized_is_empty(geom2) ) + PG_RETURN_NULL(); + + initGEOS(lwnotice, lwgeom_geos_error); g1 = (GEOSGeometry *)POSTGIS2GEOS(geom1); + if ( 0 == g1 ) /* exception thrown at construction */ + { + lwerror("First argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + PG_RETURN_NULL(); + } + g2 = (GEOSGeometry *)POSTGIS2GEOS(geom2); + if ( 0 == g2 ) /* exception thrown at construction */ + { + lwerror("Second argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + GEOSGeom_destroy(g1); + PG_RETURN_NULL(); + } + retcode = GEOSHausdorffDistanceDensify(g1, g2, densifyFrac, &result); GEOSGeom_destroy(g1); GEOSGeom_destroy(g2); if (retcode == 0) { - elog(ERROR,"GEOS HausdorffDistanceDensify() threw an error!"); + lwerror("GEOSHausdorffDistanceDensify: %s", lwgeom_geos_errmsg); PG_RETURN_NULL(); /*never get here */ } @@ -172,9 +247,9 @@ PG_FREE_IF_COPY(geom2, 1); PG_RETURN_FLOAT8(result); +#endif } -#endif /** @@ -186,17 +261,204 @@ */ PG_FUNCTION_INFO_V1(pgis_union_geometry_array); Datum pgis_union_geometry_array(PG_FUNCTION_ARGS) +#if POSTGIS_GEOS_VERSION >= 33 +{ + /* + ** For GEOS >= 3.3, use the new UnaryUnion functionality to merge the + ** terminal collection from the ST_Union aggregate + */ + Datum datum; + ArrayType *array; + + int is3d = LW_FALSE, gotsrid = LW_FALSE; + int nelems = 0, i = 0, geoms_size = 0, curgeom = 0; + + GSERIALIZED *gser_out = NULL; + + GEOSGeometry *g = NULL; + GEOSGeometry *g_union = NULL; + GEOSGeometry **geoms = NULL; + + int srid = SRID_UNKNOWN; + + size_t offset = 0; + bits8 *bitmap; + int bitmask; + int empty_type = 0; + + datum = PG_GETARG_DATUM(0); + + /* Null array, null geometry (should be empty?) */ + if ( (Pointer *)datum == NULL ) PG_RETURN_NULL(); + + array = DatumGetArrayTypeP(datum); + + /* How many things in our array? */ + nelems = ArrayGetNItems(ARR_NDIM(array), ARR_DIMS(array)); + + /* PgSQL supplies a bitmap of which array entries are null */ + bitmap = ARR_NULLBITMAP(array); + + /* Empty array? Null return */ + if ( nelems == 0 ) PG_RETURN_NULL(); + + /* One-element union is the element itself! */ + if ( nelems == 1 ) + { + /* If the element is a NULL then we need to handle it separately */ + if (bitmap && (*bitmap & 1) == 0) + PG_RETURN_NULL(); + else + PG_RETURN_POINTER((GSERIALIZED *)(ARR_DATA_PTR(array))); + } + + /* Ok, we really need GEOS now ;) */ + initGEOS(lwnotice, lwgeom_geos_error); + + /* + ** Collect the non-empty inputs and stuff them into a GEOS collection + */ + geoms_size = nelems; + geoms = palloc( sizeof(GEOSGeometry*) * geoms_size ); + + /* + ** We need to convert the array of GSERIALIZED into a GEOS collection. + ** First make an array of GEOS geometries. + */ + offset = 0; + bitmap = ARR_NULLBITMAP(array); + bitmask = 1; + for ( i = 0; i < nelems; i++ ) + { + /* Only work on non-NULL entries in the array */ + if ((bitmap && (*bitmap & bitmask) != 0) || !bitmap) + { + GSERIALIZED *gser_in = (GSERIALIZED *)(ARR_DATA_PTR(array)+offset); + + /* Check for SRID mismatch in array elements */ + if ( gotsrid ) + { + error_if_srid_mismatch(srid, gserialized_get_srid(gser_in)); + } + else + { + /* Initialize SRID/dimensions info */ + srid = gserialized_get_srid(gser_in); + is3d = gserialized_has_z(gser_in); + gotsrid = 1; + } + + /* Don't include empties in the union */ + if ( gserialized_is_empty(gser_in) ) + { + int gser_type = gserialized_get_type(gser_in); + if (gser_type > empty_type) + { + empty_type = gser_type; + POSTGIS_DEBUGF(4, "empty_type = %d gser_type = %d", empty_type, gser_type); + } + } + else + { + g = (GEOSGeometry *)POSTGIS2GEOS(gser_in); + + /* Uh oh! Exception thrown at construction... */ + if ( ! g ) + { + lwerror("One of the geometries in the set " + "could not be converted to GEOS: %s", lwgeom_geos_errmsg); + PG_RETURN_NULL(); + } + + /* Ensure we have enough space in our storage array */ + if ( curgeom == geoms_size ) + { + geoms_size *= 2; + geoms = repalloc( geoms, sizeof(GEOSGeometry*) * geoms_size ); + } + + geoms[curgeom] = g; + curgeom++; + } + offset += INTALIGN(VARSIZE(gser_in)); + } + + /* Advance NULL bitmap */ + if (bitmap) + { + bitmask <<= 1; + if (bitmask == 0x100) + { + bitmap++; + bitmask = 1; + } + } + } + + /* + ** Take our GEOS geometries and turn them into a GEOS collection, + ** then pass that into cascaded union. + */ + if (curgeom > 0) + { + g = GEOSGeom_createCollection(GEOS_GEOMETRYCOLLECTION, geoms, curgeom); + if ( ! g ) + { + lwerror("Could not create GEOS COLLECTION from geometry array: %s", lwgeom_geos_errmsg); + PG_RETURN_NULL(); + } + + g_union = GEOSUnaryUnion(g); + GEOSGeom_destroy(g); + if ( ! g_union ) + { + lwerror("GEOSUnaryUnion: %s", + lwgeom_geos_errmsg); + PG_RETURN_NULL(); + } + + GEOSSetSRID(g_union, srid); + gser_out = GEOS2POSTGIS(g_union, is3d); + GEOSGeom_destroy(g_union); + } + /* No real geometries in our array, any empties? */ + else + { + /* If it was only empties, we'll return the largest type number */ + if ( empty_type > 0 ) + { + PG_RETURN_POINTER(geometry_serialize(lwgeom_construct_empty(empty_type, srid, is3d, 0))); + } + /* Nothing but NULL, returns NULL */ + else + { + PG_RETURN_NULL(); + } + } + + if ( ! gser_out ) + { + /* Union returned a NULL geometry */ + PG_RETURN_NULL(); + } + + PG_RETURN_POINTER(gser_out); +} + +#else { +/* For GEOS < 3.3, use the old CascadedUnion function for polygons and + brute force two-by-two for other types. */ Datum datum; ArrayType *array; int is3d = 0; int nelems, i; - PG_LWGEOM *result = NULL; - PG_LWGEOM *pgis_geom = NULL; - const GEOSGeometry * g1 = NULL; + GSERIALIZED *result = NULL; + GSERIALIZED *pgis_geom = NULL; + GEOSGeometry * g1 = NULL; GEOSGeometry * g2 = NULL; GEOSGeometry * geos_result=NULL; - int SRID=-1; + int srid=SRID_UNKNOWN; size_t offset = 0; bits8 *bitmap; int bitmask; @@ -213,6 +475,8 @@ datum = PG_GETARG_DATUM(0); + /* TODO handle empties */ + /* Null array, null geometry (should be empty?) */ if ( (Pointer *)datum == NULL ) PG_RETURN_NULL(); @@ -233,11 +497,11 @@ if (bitmap && (*bitmap & 1) == 0) PG_RETURN_NULL(); else - PG_RETURN_POINTER((PG_LWGEOM *)(ARR_DATA_PTR(array))); + PG_RETURN_POINTER((GSERIALIZED *)(ARR_DATA_PTR(array))); } /* Ok, we really need geos now ;) */ - initGEOS(lwnotice, lwnotice); + initGEOS(lwnotice, lwgeom_geos_error); /* ** First, see if all our elements are POLYGON/MULTIPOLYGON @@ -251,18 +515,18 @@ /* Don't do anything for NULL values */ if ((bitmap && (*bitmap & bitmask) != 0) || !bitmap) { - PG_LWGEOM *pggeom = (PG_LWGEOM *)(ARR_DATA_PTR(array)+offset); - int pgtype = TYPE_GETTYPE(pggeom->type); + GSERIALIZED *pggeom = (GSERIALIZED *)(ARR_DATA_PTR(array)+offset); + int pgtype = gserialized_get_type(pggeom); offset += INTALIGN(VARSIZE(pggeom)); if ( ! gotsrid ) /* Initialize SRID */ { - SRID = pglwgeom_getSRID(pggeom); + srid = gserialized_get_srid(pggeom); gotsrid = 1; - if ( TYPE_HASZ(pggeom->type) ) is3d = 1; + if ( gserialized_has_z(pggeom) ) is3d = 1; } else { - errorIfSRIDMismatch(SRID, pglwgeom_getSRID(pggeom)); + error_if_srid_mismatch(srid, gserialized_get_srid(pggeom)); } if ( pgtype != POLYGONTYPE && pgtype != MULTIPOLYGONTYPE ) @@ -294,7 +558,7 @@ GEOSGeometry **geoms = NULL; geoms = palloc( sizeof(GEOSGeometry *) * geoms_size ); /* - ** We need to convert the array of PG_LWGEOM into a GEOS MultiPolygon. + ** We need to convert the array of GSERIALIZED into a GEOS MultiPolygon. ** First make an array of GEOS Polygons. */ offset = 0; @@ -302,11 +566,13 @@ bitmask = 1; for ( i = 0; i < nelems; i++ ) { + GEOSGeometry* g; + /* Don't do anything for NULL values */ if ((bitmap && (*bitmap & bitmask) != 0) || !bitmap) { - PG_LWGEOM *pggeom = (PG_LWGEOM *)(ARR_DATA_PTR(array)+offset); - int pgtype = TYPE_GETTYPE(pggeom->type); + GSERIALIZED *pggeom = (GSERIALIZED *)(ARR_DATA_PTR(array)+offset); + int pgtype = gserialized_get_type(pggeom); offset += INTALIGN(VARSIZE(pggeom)); if ( pgtype == POLYGONTYPE ) { @@ -315,33 +581,40 @@ geoms_size *= 2; geoms = repalloc( geoms, sizeof(GEOSGeom) * geoms_size ); } - geoms[curgeom] = (GEOSGeometry *)POSTGIS2GEOS(pggeom); + g = (GEOSGeometry *)POSTGIS2GEOS(pggeom); + if ( 0 == g ) /* exception thrown at construction */ + { + /* TODO: release GEOS allocated memory ! */ + lwerror("One of the geometries in the set " + "could not be converted to GEOS: %s", lwgeom_geos_errmsg); + PG_RETURN_NULL(); + } + geoms[curgeom] = g; curgeom++; } if ( pgtype == MULTIPOLYGONTYPE ) { int j = 0; - LWGEOM_INSPECTED *lwgeom = lwgeom_inspect(SERIALIZED_FORM(pggeom)); - for ( j = 0; j < lwgeom->ngeometries; j++ ) + LWMPOLY *lwmpoly = (LWMPOLY*)lwgeom_from_gserialized(pggeom);; + for ( j = 0; j < lwmpoly->ngeoms; j++ ) { - LWPOLY *lwpoly = NULL; - int k = 0; + GEOSGeometry* g; if ( curgeom == geoms_size ) { geoms_size *= 2; geoms = repalloc( geoms, sizeof(GEOSGeom) * geoms_size ); } /* This builds a LWPOLY on top of the serialized form */ - lwpoly = lwgeom_getpoly_inspected(lwgeom, j); - geoms[curgeom] = LWGEOM2GEOS(lwpoly_as_lwgeom(lwpoly)); - /* We delicately free the LWPOLY and POINTARRAY structs, leaving the serialized form below untouched. */ - for ( k = 0; k < lwpoly->nrings; k++ ) + g = LWGEOM2GEOS(lwpoly_as_lwgeom(lwmpoly->geoms[j])); + if ( 0 == g ) /* exception thrown at construction */ { - lwfree(lwpoly->rings[k]); + /* TODO: cleanup all GEOS memory */ + lwerror("Geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + PG_RETURN_NULL(); } - lwpoly_release(lwpoly); - curgeom++; + geoms[curgeom++] = g; } + lwmpoly_free(lwmpoly); } } @@ -363,12 +636,24 @@ if (curgeom > 0) { g1 = GEOSGeom_createCollection(GEOS_MULTIPOLYGON, geoms, curgeom); - if ( g1 ) g2 = GEOSUnionCascaded(g1); - if ( g2 ) GEOSSetSRID(g2, SRID); - if ( g2 ) result = GEOS2POSTGIS(g2, is3d); - /* Clean up the mess. */ - if ( g1 ) GEOSGeom_destroy((GEOSGeometry *)g1); - if ( g2 ) GEOSGeom_destroy(g2); + if ( ! g1 ) + { + /* TODO: cleanup geoms memory */ + lwerror("Could not create MULTIPOLYGON from geometry array: %s", lwgeom_geos_errmsg); + PG_RETURN_NULL(); + } + g2 = GEOSUnionCascaded(g1); + GEOSGeom_destroy(g1); + if ( ! g2 ) + { + lwerror("GEOSUnionCascaded: %s", + lwgeom_geos_errmsg); + PG_RETURN_NULL(); + } + + GEOSSetSRID(g2, srid); + result = GEOS2POSTGIS(g2, is3d); + GEOSGeom_destroy(g2); } else { @@ -389,7 +674,7 @@ /* Don't do anything for NULL values */ if ((bitmap && (*bitmap & bitmask) != 0) || !bitmap) { - PG_LWGEOM *geom = (PG_LWGEOM *)(ARR_DATA_PTR(array)+offset); + GSERIALIZED *geom = (GSERIALIZED *)(ARR_DATA_PTR(array)+offset); offset += INTALIGN(VARSIZE(geom)); pgis_geom = geom; @@ -397,30 +682,42 @@ POSTGIS_DEBUGF(3, "geom %d @ %p", i, geom); /* Check is3d flag */ - if ( TYPE_HASZ(geom->type) ) is3d = 1; + if ( gserialized_has_z(geom) ) is3d = 1; /* Check SRID homogeneity and initialize geos result */ if ( ! geos_result ) { geos_result = (GEOSGeometry *)POSTGIS2GEOS(geom); - SRID = pglwgeom_getSRID(geom); - POSTGIS_DEBUGF(3, "first geom is a %s", lwgeom_typename(TYPE_GETTYPE(geom->type))); + if ( 0 == geos_result ) /* exception thrown at construction */ + { + lwerror("geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + PG_RETURN_NULL(); + } + srid = gserialized_get_srid(geom); + POSTGIS_DEBUGF(3, "first geom is a %s", lwtype_name(gserialized_get_type(geom))); } else { - errorIfSRIDMismatch(SRID, pglwgeom_getSRID(geom)); + error_if_srid_mismatch(srid, gserialized_get_srid(geom)); g1 = POSTGIS2GEOS(pgis_geom); + if ( 0 == g1 ) /* exception thrown at construction */ + { + /* TODO: release GEOS allocated memory ! */ + lwerror("First argument geometry could not be converted to GEOS: %s", + lwgeom_geos_errmsg); + PG_RETURN_NULL(); + } POSTGIS_DEBUGF(3, "unite_garray(%d): adding geom %d to union (%s)", - call, i, lwgeom_typename(TYPE_GETTYPE(geom->type))); + call, i, lwtype_name(gserialized_get_type(geom))); g2 = GEOSUnion(g1, geos_result); if ( g2 == NULL ) { GEOSGeom_destroy((GEOSGeometry *)g1); GEOSGeom_destroy((GEOSGeometry *)geos_result); - elog(ERROR,"GEOS union() threw an error!"); + lwerror("GEOSUnion: %s", lwgeom_geos_errmsg); } GEOSGeom_destroy((GEOSGeometry *)g1); GEOSGeom_destroy((GEOSGeometry *)geos_result); @@ -444,7 +741,7 @@ /* If geos_result is set then we found at least one non-NULL geometry */ if (geos_result) { - GEOSSetSRID(geos_result, SRID); + GEOSSetSRID(geos_result, srid); result = GEOS2POSTGIS(geos_result, is3d); GEOSGeom_destroy(geos_result); } @@ -465,85 +762,116 @@ PG_RETURN_POINTER(result); } - +#endif /* POSTGIS_GEOS_VERSION >= 33 */ /** - * @example geomunion {@link #geomunion} SELECT geomunion( - * 'POLYGON((0 0, 10 0, 10 10, 0 10, 0 0))', - * 'POLYGON((5 5, 15 5, 15 7, 5 7, 5 5))' + * @example ST_UnaryUnion {@link #geomunion} SELECT ST_UnaryUnion( + * 'POLYGON((0 0, 10 0, 0 10, 10 10, 0 0))' * ); * */ -PG_FUNCTION_INFO_V1(geomunion); -Datum geomunion(PG_FUNCTION_ARGS) +PG_FUNCTION_INFO_V1(ST_UnaryUnion); +Datum ST_UnaryUnion(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom1; - PG_LWGEOM *geom2; +#if POSTGIS_GEOS_VERSION < 33 + PG_RETURN_NULL(); + lwerror("The GEOS version this PostGIS binary " + "was compiled against (%d) doesn't support " + "'GEOSUnaryUnion' function (3.3.0+ required)", + POSTGIS_GEOS_VERSION); + PG_RETURN_NULL(); +#else /* POSTGIS_GEOS_VERSION >= 33 */ + GSERIALIZED *geom1; int is3d; - int SRID; - GEOSGeometry *g1, *g2, *g3; - PG_LWGEOM *result; + int srid; + GEOSGeometry *g1, *g3; + GSERIALIZED *result; - POSTGIS_DEBUG(2, "in geomunion"); + POSTGIS_DEBUG(2, "in ST_UnaryUnion"); - PROFSTART(PROF_QRUN); + geom1 = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - geom1 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - geom2 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + /* UnaryUnion(empty) == (empty) */ + if ( gserialized_is_empty(geom1) ) + PG_RETURN_POINTER(geom1); - is3d = ( TYPE_HASZ(geom1->type) ) || - ( TYPE_HASZ(geom2->type) ); + is3d = ( gserialized_has_z(geom1) ); - SRID = pglwgeom_getSRID(geom1); - errorIfSRIDMismatch(SRID, pglwgeom_getSRID(geom2)); + srid = gserialized_get_srid(geom1); - initGEOS(lwnotice, lwnotice); + initGEOS(lwnotice, lwgeom_geos_error); - PROFSTART(PROF_P2G1); g1 = (GEOSGeometry *)POSTGIS2GEOS(geom1); - PROFSTOP(PROF_P2G1); - PROFSTART(PROF_P2G2); - g2 = (GEOSGeometry *)POSTGIS2GEOS(geom2); - PROFSTOP(PROF_P2G2); + if ( 0 == g1 ) /* exception thrown at construction */ + { + lwerror("First argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + PG_RETURN_NULL(); + } POSTGIS_DEBUGF(3, "g1=%s", GEOSGeomToWKT(g1)); - POSTGIS_DEBUGF(3, "g2=%s", GEOSGeomToWKT(g2)); - PROFSTART(PROF_GRUN); - g3 = GEOSUnion(g1,g2); - PROFSTOP(PROF_GRUN); + g3 = GEOSUnaryUnion(g1); POSTGIS_DEBUGF(3, "g3=%s", GEOSGeomToWKT(g3)); GEOSGeom_destroy(g1); - GEOSGeom_destroy(g2); if (g3 == NULL) { - elog(ERROR,"GEOS union() threw an error!"); + lwerror("GEOSUnion: %s", lwgeom_geos_errmsg); PG_RETURN_NULL(); /* never get here */ } - GEOSSetSRID(g3, SRID); + GEOSSetSRID(g3, srid); - PROFSTART(PROF_G2P); result = GEOS2POSTGIS(g3, is3d); - PROFSTOP(PROF_G2P); GEOSGeom_destroy(g3); if (result == NULL) { - elog(ERROR,"GEOS union() threw an error (result postgis geometry formation)!"); + elog(ERROR, "ST_UnaryUnion failed converting GEOS result Geometry to PostGIS format"); PG_RETURN_NULL(); /*never get here */ } /* compressType(result); */ - PROFSTOP(PROF_QRUN); - PROFREPORT("geos",geom1, geom2, result); + PG_FREE_IF_COPY(geom1, 0); + + PG_RETURN_POINTER(result); +#endif /* POSTGIS_GEOS_VERSION >= 33 */ +} + + +/** + * @example geomunion {@link #geomunion} SELECT geomunion( + * 'POLYGON((0 0, 10 0, 10 10, 0 10, 0 0))', + * 'POLYGON((5 5, 15 5, 15 7, 5 7, 5 5))' + * ); + * + */ +PG_FUNCTION_INFO_V1(geomunion); +Datum geomunion(PG_FUNCTION_ARGS) +{ + GSERIALIZED *geom1; + GSERIALIZED *geom2; + GSERIALIZED *result; + LWGEOM *lwgeom1, *lwgeom2, *lwresult ; + + geom1 = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + geom2 = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + + lwgeom1 = lwgeom_from_gserialized(geom1) ; + lwgeom2 = lwgeom_from_gserialized(geom2) ; + + lwresult = lwgeom_union(lwgeom1, lwgeom2) ; + result = geometry_serialize(lwresult) ; + + lwgeom_free(lwgeom1) ; + lwgeom_free(lwgeom2) ; + lwgeom_free(lwresult) ; PG_FREE_IF_COPY(geom1, 0); PG_FREE_IF_COPY(geom2, 1); @@ -560,71 +888,23 @@ PG_FUNCTION_INFO_V1(symdifference); Datum symdifference(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom1; - PG_LWGEOM *geom2; - GEOSGeometry *g1, *g2, *g3; - PG_LWGEOM *result; - int is3d; - int SRID; - - PROFSTART(PROF_QRUN); - - geom1 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - geom2 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - - is3d = ( TYPE_HASZ(geom1->type) ) || - ( TYPE_HASZ(geom2->type) ); - - SRID = pglwgeom_getSRID(geom1); - errorIfSRIDMismatch(SRID, pglwgeom_getSRID(geom2)); - - initGEOS(lwnotice, lwnotice); - - PROFSTART(PROF_P2G1); - g1 = (GEOSGeometry *)POSTGIS2GEOS(geom1); - PROFSTOP(PROF_P2G1); - - PROFSTART(PROF_P2G2); - g2 = (GEOSGeometry *)POSTGIS2GEOS(geom2); - PROFSTOP(PROF_P2G2); - - PROFSTART(PROF_GRUN); - g3 = GEOSSymDifference(g1,g2); - PROFSTOP(PROF_GRUN); - - if (g3 == NULL) - { - elog(ERROR,"GEOS symdifference() threw an error!"); - GEOSGeom_destroy(g1); - GEOSGeom_destroy(g2); - PG_RETURN_NULL(); /*never get here */ - } - - POSTGIS_DEBUGF(3, "result: %s", GEOSGeomToWKT(g3)); - - GEOSSetSRID(g3, SRID); - - PROFSTART(PROF_G2P); - result = GEOS2POSTGIS(g3, is3d); - PROFSTOP(PROF_G2P); - - if (result == NULL) - { - GEOSGeom_destroy(g1); - GEOSGeom_destroy(g2); - GEOSGeom_destroy(g3); - elog(ERROR,"GEOS symdifference() threw an error (result postgis geometry formation)!"); - PG_RETURN_NULL(); /*never get here */ - } - - GEOSGeom_destroy(g1); - GEOSGeom_destroy(g2); - GEOSGeom_destroy(g3); - - /* compressType(result); */ - - PROFSTOP(PROF_QRUN); - PROFREPORT("geos",geom1, geom2, result); + GSERIALIZED *geom1; + GSERIALIZED *geom2; + GSERIALIZED *result; + LWGEOM *lwgeom1, *lwgeom2, *lwresult ; + + geom1 = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + geom2 = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + + lwgeom1 = lwgeom_from_gserialized(geom1) ; + lwgeom2 = lwgeom_from_gserialized(geom2) ; + + lwresult = lwgeom_symdifference(lwgeom1, lwgeom2) ; + result = geometry_serialize(lwresult) ; + + lwgeom_free(lwgeom1) ; + lwgeom_free(lwgeom2) ; + lwgeom_free(lwresult) ; PG_FREE_IF_COPY(geom1, 0); PG_FREE_IF_COPY(geom2, 1); @@ -636,60 +916,57 @@ PG_FUNCTION_INFO_V1(boundary); Datum boundary(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom1; + GSERIALIZED *geom1; GEOSGeometry *g1, *g3; - PG_LWGEOM *result; - int SRID; + GSERIALIZED *result; + int srid; - PROFSTART(PROF_QRUN); - geom1 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + geom1 = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - SRID = pglwgeom_getSRID(geom1); + /* Empty.Boundary() == Empty */ + if ( gserialized_is_empty(geom1) ) + PG_RETURN_POINTER(geom1); - initGEOS(lwnotice, lwnotice); + srid = gserialized_get_srid(geom1); + + initGEOS(lwnotice, lwgeom_geos_error); - PROFSTART(PROF_P2G1); g1 = (GEOSGeometry *)POSTGIS2GEOS(geom1 ); - PROFSTOP(PROF_P2G1); - PROFSTART(PROF_GRUN); + if ( 0 == g1 ) /* exception thrown at construction */ + { + lwerror("First argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + PG_RETURN_NULL(); + } + g3 = (GEOSGeometry *)GEOSBoundary(g1); - PROFSTOP(PROF_GRUN); if (g3 == NULL) { - elog(ERROR,"GEOS boundary() threw an error!"); GEOSGeom_destroy(g1); + lwerror("GEOSBoundary: %s", lwgeom_geos_errmsg); PG_RETURN_NULL(); /* never get here */ } POSTGIS_DEBUGF(3, "result: %s", GEOSGeomToWKT(g3)); - GEOSSetSRID(g3, SRID); - - PROFSTART(PROF_G2P); - result = GEOS2POSTGIS(g3, TYPE_HASZ(geom1->type)); + GEOSSetSRID(g3, srid); - PROFSTART(PROF_P2G1); + result = GEOS2POSTGIS(g3, gserialized_has_z(geom1)); if (result == NULL) { GEOSGeom_destroy(g1); GEOSGeom_destroy(g3); - elog(ERROR,"GEOS boundary() threw an error (result postgis geometry formation)!"); + elog(NOTICE,"GEOS2POSTGIS threw an error (result postgis geometry formation)!"); PG_RETURN_NULL(); /* never get here */ } GEOSGeom_destroy(g1); GEOSGeom_destroy(g3); - /* compressType(result); */ - - PROFSTOP(PROF_QRUN); - PROFREPORT("geos",geom1, NULL, result); - PG_FREE_IF_COPY(geom1, 0); PG_RETURN_POINTER(result); @@ -698,121 +975,119 @@ PG_FUNCTION_INFO_V1(convexhull); Datum convexhull(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom1; + GSERIALIZED *geom1; GEOSGeometry *g1, *g3; - PG_LWGEOM *result; + GSERIALIZED *result; LWGEOM *lwout; - int SRID; - BOX2DFLOAT4 bbox; + int srid; + GBOX bbox; - PROFSTART(PROF_QRUN); + geom1 = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - geom1 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - SRID = pglwgeom_getSRID(geom1); + /* Empty.ConvexHull() == Empty */ + if ( gserialized_is_empty(geom1) ) + PG_RETURN_POINTER(geom1); - initGEOS(lwnotice, lwnotice); + srid = gserialized_get_srid(geom1); + + initGEOS(lwnotice, lwgeom_geos_error); - PROFSTART(PROF_P2G1); g1 = (GEOSGeometry *)POSTGIS2GEOS(geom1); - PROFSTOP(PROF_P2G1); - PROFSTART(PROF_GRUN); + if ( 0 == g1 ) /* exception thrown at construction */ + { + lwerror("First argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + PG_RETURN_NULL(); + } + g3 = (GEOSGeometry *)GEOSConvexHull(g1); - PROFSTOP(PROF_GRUN); + GEOSGeom_destroy(g1); if (g3 == NULL) { - elog(ERROR,"GEOS convexhull() threw an error!"); - GEOSGeom_destroy(g1); + lwerror("GEOSConvexHull: %s", lwgeom_geos_errmsg); PG_RETURN_NULL(); /* never get here */ } - POSTGIS_DEBUGF(3, "result: %s", GEOSGeomToWKT(g3)); - GEOSSetSRID(g3, SRID); + GEOSSetSRID(g3, srid); - PROFSTART(PROF_G2P); - lwout = GEOS2LWGEOM(g3, TYPE_HASZ(geom1->type)); - PROFSTOP(PROF_G2P); + lwout = GEOS2LWGEOM(g3, gserialized_has_z(geom1)); + GEOSGeom_destroy(g3); if (lwout == NULL) { - GEOSGeom_destroy(g1); - GEOSGeom_destroy(g3); elog(ERROR,"convexhull() failed to convert GEOS geometry to LWGEOM"); PG_RETURN_NULL(); /* never get here */ } /* Copy input bbox if any */ - if ( getbox2d_p(SERIALIZED_FORM(geom1), &bbox) ) + if ( gserialized_get_gbox_p(geom1, &bbox) ) { - lwout->bbox = box2d_clone(&bbox); + /* Force the box to have the same dimensionality as the lwgeom */ + bbox.flags = lwout->flags; + lwout->bbox = gbox_copy(&bbox); } - result = pglwgeom_serialize(lwout); + result = geometry_serialize(lwout); + lwgeom_free(lwout); + if (result == NULL) { - GEOSGeom_destroy(g1); - GEOSGeom_destroy(g3); elog(ERROR,"GEOS convexhull() threw an error (result postgis geometry formation)!"); PG_RETURN_NULL(); /* never get here */ } - lwgeom_release(lwout); - GEOSGeom_destroy(g1); - GEOSGeom_destroy(g3); - - - /* compressType(result); */ - - PROFSTOP(PROF_QRUN); - PROFREPORT("geos",geom1, NULL, result); PG_FREE_IF_COPY(geom1, 0); - PG_RETURN_POINTER(result); - } PG_FUNCTION_INFO_V1(topologypreservesimplify); Datum topologypreservesimplify(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom1; + GSERIALIZED *geom1; double tolerance; GEOSGeometry *g1, *g3; - PG_LWGEOM *result; + GSERIALIZED *result; - geom1 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + geom1 = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); tolerance = PG_GETARG_FLOAT8(1); - initGEOS(lwnotice, lwnotice); + /* Empty.Simplify() == Empty */ + if ( gserialized_is_empty(geom1) ) + PG_RETURN_POINTER(geom1); + + initGEOS(lwnotice, lwgeom_geos_error); g1 = (GEOSGeometry *)POSTGIS2GEOS(geom1); + if ( 0 == g1 ) /* exception thrown at construction */ + { + lwerror("First argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + PG_RETURN_NULL(); + } + g3 = GEOSTopologyPreserveSimplify(g1,tolerance); + GEOSGeom_destroy(g1); if (g3 == NULL) { - elog(ERROR,"GEOS topologypreservesimplify() threw an error!"); - GEOSGeom_destroy(g1); + lwerror("GEOSTopologyPreserveSimplify: %s", lwgeom_geos_errmsg); PG_RETURN_NULL(); /* never get here */ } - POSTGIS_DEBUGF(3, "result: %s", GEOSGeomToWKT(g3)); - GEOSSetSRID(g3, pglwgeom_getSRID(geom1)); + GEOSSetSRID(g3, gserialized_get_srid(geom1)); - result = GEOS2POSTGIS(g3, TYPE_HASZ(geom1->type)); + result = GEOS2POSTGIS(g3, gserialized_has_z(geom1)); + GEOSGeom_destroy(g3); if (result == NULL) { - GEOSGeom_destroy(g1); - GEOSGeom_destroy(g3); elog(ERROR,"GEOS topologypreservesimplify() threw an error (result postgis geometry formation)!"); PG_RETURN_NULL(); /* never get here */ } - GEOSGeom_destroy(g1); - GEOSGeom_destroy(g3); PG_FREE_IF_COPY(geom1, 0); PG_RETURN_POINTER(result); @@ -821,10 +1096,10 @@ PG_FUNCTION_INFO_V1(buffer); Datum buffer(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom1; + GSERIALIZED *geom1; double size; GEOSGeometry *g1, *g3; - PG_LWGEOM *result; + GSERIALIZED *result; int quadsegs = 8; /* the default */ int nargs; enum @@ -848,20 +1123,30 @@ int joinStyle = DEFAULT_JOIN_STYLE; char *param; char *params = NULL; + LWGEOM *lwg; - - PROFSTART(PROF_QRUN); - - geom1 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + geom1 = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); size = PG_GETARG_FLOAT8(1); + /* Empty.Buffer() == Empty[polygon] */ + if ( gserialized_is_empty(geom1) ) + { + lwg = lwpoly_as_lwgeom(lwpoly_construct_empty( + gserialized_get_srid(geom1), + 0, 0)); // buffer wouldn't give back z or m anyway + PG_RETURN_POINTER(geometry_serialize(lwg)); + } + nargs = PG_NARGS(); - initGEOS(lwnotice, lwnotice); + initGEOS(lwnotice, lwgeom_geos_error); - PROFSTART(PROF_P2G1); g1 = (GEOSGeometry *)POSTGIS2GEOS(geom1); - PROFSTOP(PROF_P2G1); + if ( 0 == g1 ) /* exception thrown at construction */ + { + lwerror("First argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + PG_RETURN_NULL(); + } if (nargs > 2) { @@ -974,10 +1259,8 @@ #if POSTGIS_GEOS_VERSION >= 32 - PROFSTART(PROF_GRUN); - g3 = GEOSBufferWithStyle(g1, size, quadsegs, - endCapStyle, joinStyle, mitreLimit); - PROFSTOP(PROF_GRUN); + g3 = GEOSBufferWithStyle(g1, size, quadsegs, endCapStyle, joinStyle, mitreLimit); + GEOSGeom_destroy(g1); #else /* POSTGIS_GEOS_VERSION < 32 */ @@ -985,131 +1268,213 @@ endCapStyle != DEFAULT_ENDCAP_STYLE || joinStyle != DEFAULT_JOIN_STYLE ) { - lwerror("The GEOS version this postgis binary " + lwerror("The GEOS version this PostGIS binary " "was compiled against (%d) doesn't support " "specifying a mitre limit != %d or styles different " "from 'round' (needs 3.2 or higher)", DEFAULT_MITRE_LIMIT, POSTGIS_GEOS_VERSION); } - PROFSTART(PROF_GRUN); g3 = GEOSBuffer(g1,size,quadsegs); - PROFSTOP(PROF_GRUN); + GEOSGeom_destroy(g1); #endif /* POSTGIS_GEOS_VERSION < 32 */ if (g3 == NULL) { - elog(ERROR,"GEOS buffer() threw an error!"); - GEOSGeom_destroy(g1); + lwerror("GEOSBuffer: %s", lwgeom_geos_errmsg); PG_RETURN_NULL(); /* never get here */ } POSTGIS_DEBUGF(3, "result: %s", GEOSGeomToWKT(g3)); - GEOSSetSRID(g3, pglwgeom_getSRID(geom1)); + GEOSSetSRID(g3, gserialized_get_srid(geom1)); - PROFSTART(PROF_G2P); - result = GEOS2POSTGIS(g3, TYPE_HASZ(geom1->type)); - PROFSTOP(PROF_G2P); + result = GEOS2POSTGIS(g3, gserialized_has_z(geom1)); + GEOSGeom_destroy(g3); if (result == NULL) { - GEOSGeom_destroy(g1); - GEOSGeom_destroy(g3); elog(ERROR,"GEOS buffer() threw an error (result postgis geometry formation)!"); PG_RETURN_NULL(); /* never get here */ } - GEOSGeom_destroy(g1); - GEOSGeom_destroy(g3); - - - /* compressType(result); */ - - PROFSTOP(PROF_QRUN); - PROFREPORT("geos",geom1, NULL, result); PG_FREE_IF_COPY(geom1, 0); - PG_RETURN_POINTER(result); } -PG_FUNCTION_INFO_V1(intersection); -Datum intersection(PG_FUNCTION_ARGS) -{ - PG_LWGEOM *geom1; - PG_LWGEOM *geom2; - GEOSGeometry *g1, *g2, *g3; - PG_LWGEOM *result; - int is3d; - int SRID; - - PROFSTART(PROF_QRUN); +/* +* Compute at offset curve to a line +*/ +Datum ST_OffsetCurve(PG_FUNCTION_ARGS); +PG_FUNCTION_INFO_V1(ST_OffsetCurve); +Datum ST_OffsetCurve(PG_FUNCTION_ARGS) +{ +#if POSTGIS_GEOS_VERSION < 32 + lwerror("The GEOS version this PostGIS binary " + "was compiled against (%d) doesn't support " + "ST_OffsetCurve function " + "(needs 3.2 or higher)", + POSTGIS_GEOS_VERSION); + PG_RETURN_NULL(); /* never get here */ +#else + + GSERIALIZED *gser_input; + GSERIALIZED *gser_result; + LWGEOM *lwgeom_input; + LWGEOM *lwgeom_result; + double size; + int quadsegs = 8; /* the default */ + int nargs; - geom1 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - geom2 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + enum + { + JOIN_ROUND = 1, + JOIN_MITRE = 2, + JOIN_BEVEL = 3 + }; + + static const double DEFAULT_MITRE_LIMIT = 5.0; + static const int DEFAULT_JOIN_STYLE = JOIN_ROUND; + double mitreLimit = DEFAULT_MITRE_LIMIT; + int joinStyle = DEFAULT_JOIN_STYLE; + char *param = NULL; + char *paramstr = NULL; + + /* Read SQL arguments */ + nargs = PG_NARGS(); + gser_input = (GSERIALIZED*) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + size = PG_GETARG_FLOAT8(1); - is3d = ( TYPE_HASZ(geom1->type) ) || - ( TYPE_HASZ(geom2->type) ); + /* Check for a useable type */ + if ( gserialized_get_type(gser_input) != LINETYPE ) + { + lwerror("ST_OffsetCurve only works with LineStrings"); + PG_RETURN_NULL(); + } - SRID = pglwgeom_getSRID(geom1); - errorIfSRIDMismatch(SRID, pglwgeom_getSRID(geom2)); + /* + * For distance == 0, just return the input. + * Note that due to a bug, GEOS 3.3.0 would return EMPTY. + * See http://trac.osgeo.org/geos/ticket/454 + */ + if ( size == 0 ) + PG_RETURN_POINTER(gser_input); - initGEOS(lwnotice, lwnotice); + /* Read the lwgeom, check for errors */ + lwgeom_input = lwgeom_from_gserialized(gser_input); + if ( ! lwgeom_input ) + lwerror("ST_OffsetCurve: lwgeom_from_gserialized returned NULL"); + + /* For empty inputs, just echo them back */ + if ( lwgeom_is_empty(lwgeom_input) ) + PG_RETURN_POINTER(gser_input); - POSTGIS_DEBUG(3, "intersection() START"); + /* Process the optional arguments */ + if ( nargs > 2 ) + { + text *wkttext = PG_GETARG_TEXT_P(2); + paramstr = text2cstring(wkttext); - PROFSTART(PROF_P2G1); - g1 = (GEOSGeometry *)POSTGIS2GEOS(geom1); - PROFSTOP(PROF_P2G1); + POSTGIS_DEBUGF(3, "paramstr: %s", paramstr); - PROFSTART(PROF_P2G2); - g2 = (GEOSGeometry *)POSTGIS2GEOS(geom2); - PROFSTOP(PROF_P2G2); + for ( param=paramstr; ; param=NULL ) + { + char *key, *val; + param = strtok(param, " "); + if ( param == NULL ) break; + POSTGIS_DEBUGF(3, "Param: %s", param); - POSTGIS_DEBUG(3, " constructed geometrys - calling geos"); - POSTGIS_DEBUGF(3, " g1 = %s", GEOSGeomToWKT(g1)); - POSTGIS_DEBUGF(3, " g2 = %s", GEOSGeomToWKT(g2)); - /*POSTGIS_DEBUGF(3, "g2 is valid = %i",GEOSisvalid(g2)); */ - /*POSTGIS_DEBUGF(3, "g1 is valid = %i",GEOSisvalid(g1)); */ - - PROFSTART(PROF_GRUN); - g3 = GEOSIntersection(g1,g2); - PROFSTOP(PROF_GRUN); + key = param; + val = strchr(key, '='); + if ( val == NULL || *(val+1) == '\0' ) + { + lwerror("ST_OffsetCurve: Missing value for buffer parameter %s", key); + break; + } + *val = '\0'; + ++val; - POSTGIS_DEBUG(3, " intersection finished"); + POSTGIS_DEBUGF(3, "Param: %s : %s", key, val); - if (g3 == NULL) - { - elog(ERROR,"GEOS Intersection() threw an error!"); - GEOSGeom_destroy(g1); - GEOSGeom_destroy(g2); - PG_RETURN_NULL(); /* never get here */ + if ( !strcmp(key, "join") ) + { + if ( !strcmp(val, "round") ) + { + joinStyle = JOIN_ROUND; + } + else if ( !(strcmp(val, "mitre") && strcmp(val, "miter")) ) + { + joinStyle = JOIN_MITRE; + } + else if ( ! strcmp(val, "bevel") ) + { + joinStyle = JOIN_BEVEL; + } + else + { + lwerror("Invalid buffer end cap style: %s (accept: " + "'round', 'mitre', 'miter' or 'bevel')", val); + break; + } + } + else if ( !strcmp(key, "mitre_limit") || + !strcmp(key, "miter_limit") ) + { + /* mitreLimit is a float */ + mitreLimit = atof(val); + } + else if ( !strcmp(key, "quad_segs") ) + { + /* quadrant segments is an int */ + quadsegs = atoi(val); + } + else + { + lwerror("Invalid buffer parameter: %s (accept: " + "'join', 'mitre_limit', 'miter_limit and " + "'quad_segs')", key); + break; + } + } + POSTGIS_DEBUGF(3, "joinStyle:%d mitreLimit:%g", joinStyle, mitreLimit); + pfree(paramstr); /* alloc'ed in text2cstring */ } + + lwgeom_result = lwgeom_offsetcurve(lwgeom_as_lwline(lwgeom_input), size, quadsegs, joinStyle, mitreLimit); + + if (lwgeom_result == NULL) + lwerror("ST_OffsetCurve: lwgeom_offsetcurve returned NULL"); - POSTGIS_DEBUGF(3, "result: %s", GEOSGeomToWKT(g3) ) ; - - GEOSSetSRID(g3, SRID); - - PROFSTART(PROF_G2P); - result = GEOS2POSTGIS(g3, is3d); - PROFSTOP(PROF_G2P); + gser_result = gserialized_from_lwgeom(lwgeom_result, 0, 0); + lwgeom_free(lwgeom_input); + lwgeom_free(lwgeom_result); + PG_RETURN_POINTER(gser_result); - if (result == NULL) - { - GEOSGeom_destroy(g1); - GEOSGeom_destroy(g2); - GEOSGeom_destroy(g3); - elog(ERROR,"GEOS Intersection() threw an error (result postgis geometry formation)!"); - PG_RETURN_NULL(); /* never get here */ - } +#endif /* POSTGIS_GEOS_VERSION < 32 */ +} - GEOSGeom_destroy(g1); - GEOSGeom_destroy(g2); - GEOSGeom_destroy(g3); - PROFSTOP(PROF_QRUN); - PROFREPORT("geos",geom1, geom2, result); +PG_FUNCTION_INFO_V1(intersection); +Datum intersection(PG_FUNCTION_ARGS) +{ + GSERIALIZED *geom1; + GSERIALIZED *geom2; + GSERIALIZED *result; + LWGEOM *lwgeom1, *lwgeom2, *lwresult ; + + geom1 = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + geom2 = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + + lwgeom1 = lwgeom_from_gserialized(geom1) ; + lwgeom2 = lwgeom_from_gserialized(geom2) ; + + lwresult = lwgeom_intersection(lwgeom1, lwgeom2) ; + result = geometry_serialize(lwresult) ; + + lwgeom_free(lwgeom1) ; + lwgeom_free(lwgeom2) ; + lwgeom_free(lwresult) ; PG_FREE_IF_COPY(geom1, 0); PG_FREE_IF_COPY(geom2, 1); @@ -1125,71 +1490,23 @@ PG_FUNCTION_INFO_V1(difference); Datum difference(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom1; - PG_LWGEOM *geom2; - GEOSGeometry *g1, *g2, *g3; - PG_LWGEOM *result; - int is3d; - int SRID; - - PROFSTART(PROF_QRUN); - - geom1 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - geom2 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - - is3d = ( TYPE_HASZ(geom1->type) ) || - ( TYPE_HASZ(geom2->type) ); - - SRID = pglwgeom_getSRID(geom1); - errorIfSRIDMismatch(SRID, pglwgeom_getSRID(geom2)); - - initGEOS(lwnotice, lwnotice); - - PROFSTART(PROF_P2G1); - g1 = (GEOSGeometry *)POSTGIS2GEOS(geom1); - PROFSTOP(PROF_P2G1); - - PROFSTART(PROF_P2G2); - g2 = (GEOSGeometry *)POSTGIS2GEOS(geom2); - PROFSTOP(PROF_P2G2); - - PROFSTART(PROF_GRUN); - g3 = GEOSDifference(g1,g2); - PROFSTOP(PROF_GRUN); - - if (g3 == NULL) - { - elog(ERROR,"GEOS difference() threw an error!"); - GEOSGeom_destroy(g1); - GEOSGeom_destroy(g2); - PG_RETURN_NULL(); /* never get here */ - } - - POSTGIS_DEBUGF(3, "result: %s", GEOSGeomToWKT(g3) ) ; - - GEOSSetSRID(g3, SRID); - - PROFSTART(PROF_G2P); - result = GEOS2POSTGIS(g3, is3d); - PROFSTOP(PROF_G2P); - - if (result == NULL) - { - GEOSGeom_destroy(g1); - GEOSGeom_destroy(g2); - GEOSGeom_destroy(g3); - elog(ERROR,"GEOS difference() threw an error (result postgis geometry formation)!"); - PG_RETURN_NULL(); /* never get here */ - } - - GEOSGeom_destroy(g1); - GEOSGeom_destroy(g2); - GEOSGeom_destroy(g3); - - /* compressType(result); */ - - PROFSTOP(PROF_QRUN); - PROFREPORT("geos",geom1, geom2, result); + GSERIALIZED *geom1; + GSERIALIZED *geom2; + GSERIALIZED *result; + LWGEOM *lwgeom1, *lwgeom2, *lwresult ; + + geom1 = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + geom2 = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + + lwgeom1 = lwgeom_from_gserialized(geom1) ; + lwgeom2 = lwgeom_from_gserialized(geom2) ; + + lwresult = lwgeom_difference(lwgeom1, lwgeom2) ; + result = geometry_serialize(lwresult) ; + + lwgeom_free(lwgeom1) ; + lwgeom_free(lwgeom2) ; + lwgeom_free(lwresult) ; PG_FREE_IF_COPY(geom1, 0); PG_FREE_IF_COPY(geom2, 1); @@ -1204,38 +1521,40 @@ PG_FUNCTION_INFO_V1(pointonsurface); Datum pointonsurface(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom1; + GSERIALIZED *geom1; GEOSGeometry *g1, *g3; - PG_LWGEOM *result; + GSERIALIZED *result; - PROFSTART(PROF_QRUN); + geom1 = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - geom1 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + /* Empty.PointOnSurface == Empty */ + if ( gserialized_is_empty(geom1) ) + PG_RETURN_POINTER(geom1); - initGEOS(lwnotice, lwnotice); + initGEOS(lwnotice, lwgeom_geos_error); - PROFSTART(PROF_P2G1); g1 = (GEOSGeometry *)POSTGIS2GEOS(geom1); - PROFSTOP(PROF_P2G1); - PROFSTART(PROF_GRUN); + if ( 0 == g1 ) /* exception thrown at construction */ + { + elog(WARNING, "GEOSPointOnSurface(): %s", lwgeom_geos_errmsg); + PG_RETURN_NULL(); + } + g3 = GEOSPointOnSurface(g1); - PROFSTOP(PROF_GRUN); if (g3 == NULL) { - elog(ERROR,"GEOS pointonsurface() threw an error!"); GEOSGeom_destroy(g1); + lwerror("GEOSPointOnSurface: %s", lwgeom_geos_errmsg); PG_RETURN_NULL(); /* never get here */ } POSTGIS_DEBUGF(3, "result: %s", GEOSGeomToWKT(g3) ) ; - GEOSSetSRID(g3, pglwgeom_getSRID(geom1)); + GEOSSetSRID(g3, gserialized_get_srid(geom1)); - PROFSTART(PROF_G2P); - result = GEOS2POSTGIS(g3, TYPE_HASZ(geom1->type)); - PROFSTOP(PROF_G2P); + result = GEOS2POSTGIS(g3, gserialized_has_z(geom1)); if (result == NULL) { @@ -1248,11 +1567,6 @@ GEOSGeom_destroy(g1); GEOSGeom_destroy(g3); - /* compressType(result); */ - - PROFSTOP(PROF_QRUN); - PROFREPORT("geos",geom1, NULL, result); - PG_FREE_IF_COPY(geom1, 0); PG_RETURN_POINTER(result); @@ -1261,35 +1575,37 @@ PG_FUNCTION_INFO_V1(centroid); Datum centroid(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom, *result; + GSERIALIZED *geom, *result; GEOSGeometry *geosgeom, *geosresult; - PROFSTART(PROF_QRUN); + geom = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - geom = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + /* Empty.Centroid() == Empty */ + if ( gserialized_is_empty(geom) ) + PG_RETURN_POINTER(geom); - initGEOS(lwnotice, lwnotice); + initGEOS(lwnotice, lwgeom_geos_error); - PROFSTART(PROF_P2G1); geosgeom = (GEOSGeometry *)POSTGIS2GEOS(geom); - PROFSTOP(PROF_P2G1); - PROFSTART(PROF_GRUN); + if ( 0 == geosgeom ) /* exception thrown at construction */ + { + lwerror("First argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + PG_RETURN_NULL(); + } + geosresult = GEOSGetCentroid(geosgeom); - PROFSTOP(PROF_GRUN); if ( geosresult == NULL ) { GEOSGeom_destroy(geosgeom); - elog(ERROR,"GEOS getCentroid() threw an error!"); + lwerror("GEOSGetCentroid: %s", lwgeom_geos_errmsg); PG_RETURN_NULL(); } - GEOSSetSRID(geosresult, pglwgeom_getSRID(geom)); + GEOSSetSRID(geosresult, gserialized_get_srid(geom)); - PROFSTART(PROF_G2P); - result = GEOS2POSTGIS(geosresult, TYPE_HASZ(geom->type)); - PROFSTOP(PROF_G2P); + result = GEOS2POSTGIS(geosresult, gserialized_has_z(geom)); if (result == NULL) { @@ -1301,9 +1617,6 @@ GEOSGeom_destroy(geosgeom); GEOSGeom_destroy(geosresult); - PROFSTOP(PROF_QRUN); - PROFREPORT("geos",geom, NULL, result); - PG_FREE_IF_COPY(geom, 0); PG_RETURN_POINTER(result); @@ -1320,102 +1633,104 @@ * problematic geometry so a user knows which parameter and which geometry * is causing the problem. */ -void errorIfGeometryCollection(PG_LWGEOM *g1, PG_LWGEOM *g2) +void errorIfGeometryCollection(GSERIALIZED *g1, GSERIALIZED *g2) { - int t1 = lwgeom_getType(g1->type); - int t2 = lwgeom_getType(g2->type); + int t1 = gserialized_get_type(g1); + int t2 = gserialized_get_type(g2); - LWGEOM_UNPARSER_RESULT lwg_unparser_result; - int result; - char* hintmsg; + char *hintmsg; + char *hintwkt; + size_t hintsz; + LWGEOM *lwgeom; if ( t1 == COLLECTIONTYPE) { - result = serialized_lwgeom_to_ewkt(&lwg_unparser_result, SERIALIZED_FORM(g1), PARSER_CHECK_NONE); - hintmsg = lwmessage_truncate(lwg_unparser_result.wkoutput, 0, strlen(lwg_unparser_result.wkoutput), 80, 1); + lwgeom = lwgeom_from_gserialized(g1); + hintwkt = lwgeom_to_wkt(lwgeom, WKT_SFSQL, DBL_DIG, &hintsz); + hintmsg = lwmessage_truncate(hintwkt, 0, hintsz-1, 80, 1); ereport(ERROR, (errmsg("Relate Operation called with a LWGEOMCOLLECTION type. This is unsupported."), errhint("Change argument 1: '%s'", hintmsg)) ); + pfree(hintwkt); pfree(hintmsg); + lwgeom_free(lwgeom); } else if (t2 == COLLECTIONTYPE) { - result = serialized_lwgeom_to_ewkt(&lwg_unparser_result, SERIALIZED_FORM(g2), PARSER_CHECK_NONE); - hintmsg = lwmessage_truncate(lwg_unparser_result.wkoutput, 0, strlen(lwg_unparser_result.wkoutput), 80, 1); + lwgeom = lwgeom_from_gserialized(g2); + hintwkt = lwgeom_to_wkt(lwgeom, WKT_SFSQL, DBL_DIG, &hintsz); + hintmsg = lwmessage_truncate(hintwkt, 0, hintsz-1, 80, 1); ereport(ERROR, (errmsg("Relate Operation called with a LWGEOMCOLLECTION type. This is unsupported."), errhint("Change argument 2: '%s'", hintmsg)) ); + pfree(hintwkt); pfree(hintmsg); + lwgeom_free(lwgeom); } } PG_FUNCTION_INFO_V1(isvalid); Datum isvalid(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom1; + GSERIALIZED *geom1; LWGEOM *lwgeom; bool result; GEOSGeom g1; #if POSTGIS_GEOS_VERSION < 33 - BOX2DFLOAT4 box1; + GBOX box1; #endif - PROFSTART(PROF_QRUN); + geom1 = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - geom1 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + /* Empty.IsValid() == TRUE */ + if ( gserialized_is_empty(geom1) ) + PG_RETURN_BOOL(true); #if POSTGIS_GEOS_VERSION < 33 - /* Short circuit and return FALSE if we have infinite coordinates */ - /* GEOS 3.3+ is supposed to handle this stuff OK */ - if ( getbox2d_p(SERIALIZED_FORM(geom1), &box1) ) + /* Short circuit and return FALSE if we have infinite coordinates */ + /* GEOS 3.3+ is supposed to handle this stuff OK */ + if ( gserialized_get_gbox_p(geom1, &box1) ) { if ( isinf(box1.xmax) || isinf(box1.ymax) || isinf(box1.xmin) || isinf(box1.ymin) || isnan(box1.xmax) || isnan(box1.ymax) || isnan(box1.xmin) || isnan(box1.ymin) ) { - lwnotice("Geometry contains an Inf or NaN coordinate"); + lwnotice("Geometry contains an Inf or NaN coordinate"); PG_RETURN_BOOL(FALSE); } } #endif - initGEOS(lwnotice, lwnotice); - PROFSTART(PROF_P2G1); + initGEOS(lwnotice, lwgeom_geos_error); - lwgeom = lwgeom_deserialize(SERIALIZED_FORM(geom1)); + lwgeom = lwgeom_from_gserialized(geom1); if ( ! lwgeom ) { lwerror("unable to deserialize input"); } - - g1 = LWGEOM2GEOS(lwgeom); + lwgeom_free(lwgeom); + if ( ! g1 ) { - lwgeom_release(lwgeom); + /* should we drop the following + * notice now that we have ST_isValidReason ? + */ + lwnotice("%s", lwgeom_geos_errmsg); PG_RETURN_BOOL(FALSE); } - lwgeom_release(lwgeom); - - PROFSTOP(PROF_P2G1); - PROFSTART(PROF_GRUN); result = GEOSisValid(g1); - PROFSTOP(PROF_GRUN); - GEOSGeom_destroy(g1); + if (result == 2) { elog(ERROR,"GEOS isvalid() threw an error!"); PG_RETURN_NULL(); /*never get here */ } - PROFSTOP(PROF_QRUN); - PROFREPORT("geos",geom1, NULL, NULL); - PG_FREE_IF_COPY(geom1, 0); - PG_RETURN_BOOL(result); } @@ -1426,56 +1741,58 @@ PG_FUNCTION_INFO_V1(isvalidreason); Datum isvalidreason(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom = NULL; + GSERIALIZED *geom = NULL; char *reason_str = NULL; - int len = 0; - char *result = NULL; + text *result = NULL; const GEOSGeometry *g1 = NULL; #if POSTGIS_GEOS_VERSION < 33 - BOX2DFLOAT4 box; + GBOX box; #endif - geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); #if POSTGIS_GEOS_VERSION < 33 - /* Short circuit and return if we have infinite coordinates */ - /* GEOS 3.3+ is supposed to handle this stuff OK */ - if ( getbox2d_p(SERIALIZED_FORM(geom), &box) ) + /* Short circuit and return if we have infinite coordinates */ + /* GEOS 3.3+ is supposed to handle this stuff OK */ + if ( gserialized_get_gbox_p(geom, &box) ) { if ( isinf(box.xmax) || isinf(box.ymax) || isinf(box.xmin) || isinf(box.ymin) || isnan(box.xmax) || isnan(box.ymax) || isnan(box.xmin) || isnan(box.ymin) ) { const char *rsn = "Geometry contains an Inf or NaN coordinate"; - len = strlen(rsn); - result = palloc(VARHDRSZ + len); - SET_VARSIZE(result, VARHDRSZ + len); - memcpy(VARDATA(result), rsn, len); - PG_FREE_IF_COPY(geom, 0); - PG_RETURN_POINTER(result); + size_t len = strlen(rsn); + result = palloc(VARHDRSZ + len); + SET_VARSIZE(result, VARHDRSZ + len); + memcpy(VARDATA(result), rsn, len); + PG_FREE_IF_COPY(geom, 0); + PG_RETURN_POINTER(result); } } #endif - initGEOS(lwnotice, lwnotice); + initGEOS(lwnotice, lwgeom_geos_error); g1 = (GEOSGeometry *)POSTGIS2GEOS(geom); - if ( ! g1 ) + if ( g1 ) { - PG_RETURN_NULL(); + reason_str = GEOSisValidReason(g1); + GEOSGeom_destroy((GEOSGeometry *)g1); + } + else + { + /* we don't use pstrdup here as we free later */ + reason_str = strdup(lwgeom_geos_errmsg); } - reason_str = GEOSisValidReason(g1); - GEOSGeom_destroy((GEOSGeometry *)g1); if (reason_str == NULL) { elog(ERROR,"GEOS isvalidreason() threw an error!"); PG_RETURN_NULL(); /* never get here */ } - len = strlen(reason_str); - result = palloc(VARHDRSZ + len); - SET_VARSIZE(result, VARHDRSZ + len); - memcpy(VARDATA(result), reason_str, len); + + result = cstring2text(reason_str); + /* No pfree because GEOS did a standard malloc on the reason_str */ free(reason_str); PG_FREE_IF_COPY(geom, 0); @@ -1483,68 +1800,175 @@ } -/** - * overlaps(PG_LWGEOM g1,PG_LWGEOM g2) - * @param g1 - * @param g2 - * @return if GEOS::g1->overlaps(g2) returns true - * @throw an error (elog(ERROR,...)) if GEOS throws an error - */ -PG_FUNCTION_INFO_V1(overlaps); -Datum overlaps(PG_FUNCTION_ARGS) +/* +** IsValidDetail is only available in the GEOS +** C API >= version 3.3 +*/ +PG_FUNCTION_INFO_V1(isvaliddetail); +Datum isvaliddetail(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom1; - PG_LWGEOM *geom2; - GEOSGeometry *g1, *g2; - bool result; - BOX2DFLOAT4 box1, box2; - - PROFSTART(PROF_QRUN); - - geom1 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - geom2 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); +#if POSTGIS_GEOS_VERSION < 33 + lwerror("The GEOS version this PostGIS binary " + "was compiled against (%d) doesn't support " + "'isValidDetail' function (3.3.0+ required)", + POSTGIS_GEOS_VERSION); + PG_RETURN_NULL(); +#else /* POSTGIS_GEOS_VERSION >= 33 */ - errorIfGeometryCollection(geom1,geom2); - errorIfSRIDMismatch(pglwgeom_getSRID(geom1), pglwgeom_getSRID(geom2)); + GSERIALIZED *geom = NULL; + const GEOSGeometry *g1 = NULL; + char *values[3]; /* valid bool, reason text, location geometry */ + char *geos_reason = NULL; + char *reason = NULL; + GEOSGeometry *geos_location = NULL; + LWGEOM *location = NULL; + char valid = 0; + Datum result; + TupleDesc tupdesc; + HeapTuple tuple; + AttInMetadata *attinmeta; + int flags = 0; /* - * short-circuit 1: if geom2 bounding box does not overlap - * geom1 bounding box we can prematurely return FALSE. - * Do the test IFF BOUNDING BOX AVAILABLE. + * Build a tuple description for a + * valid_detail tuple */ - if ( getbox2d_p(SERIALIZED_FORM(geom1), &box1) && - getbox2d_p(SERIALIZED_FORM(geom2), &box2) ) + tupdesc = RelationNameGetTupleDesc("valid_detail"); + if ( ! tupdesc ) { - if ( box2.xmax < box1.xmin ) PG_RETURN_BOOL(FALSE); - if ( box2.xmin > box1.xmax ) PG_RETURN_BOOL(FALSE); - if ( box2.ymax < box1.ymin ) PG_RETURN_BOOL(FALSE); - if ( box2.ymin > box2.ymax ) PG_RETURN_BOOL(FALSE); + lwerror("TYPE valid_detail not found"); + PG_RETURN_NULL(); } - initGEOS(lwnotice, lwnotice); + /* + * generate attribute metadata needed later to produce + * tuples from raw C strings + */ + attinmeta = TupleDescGetAttInMetadata(tupdesc); - PROFSTART(PROF_P2G1); - g1 = (GEOSGeometry *)POSTGIS2GEOS(geom1); - PROFSTOP(PROF_P2G1); + geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PROFSTART(PROF_P2G2); - g2 = (GEOSGeometry *)POSTGIS2GEOS(geom2); - PROFSTOP(PROF_P2G2); + if ( PG_NARGS() > 1 && ! PG_ARGISNULL(1) ) { + flags = PG_GETARG_INT32(1); + } - PROFSTART(PROF_GRUN); - result = GEOSOverlaps(g1,g2); - PROFSTOP(PROF_GRUN); + initGEOS(lwnotice, lwgeom_geos_error); - GEOSGeom_destroy(g1); - GEOSGeom_destroy(g2); - if (result == 2) + g1 = (GEOSGeometry *)POSTGIS2GEOS(geom); + + if ( g1 ) { - elog(ERROR,"GEOS overlaps() threw an error!"); - PG_RETURN_NULL(); /* never get here */ + valid = GEOSisValidDetail(g1, flags, + &geos_reason, &geos_location); + GEOSGeom_destroy((GEOSGeometry *)g1); + if ( geos_reason ) + { + reason = pstrdup(geos_reason); + GEOSFree(geos_reason); + } + if ( geos_location ) + { + location = GEOS2LWGEOM(geos_location, GEOSHasZ(geos_location)); + GEOSGeom_destroy((GEOSGeometry *)geos_location); + } + + if (valid == 2) + { + /* NOTE: should only happen on OOM or similar */ + lwerror("GEOS isvaliddetail() threw an exception!"); + PG_RETURN_NULL(); /* never gets here */ + } + } + else + { + /* TODO: check lwgeom_geos_errmsg for validity error */ + reason = pstrdup(lwgeom_geos_errmsg); + } + + /* the boolean validity */ + values[0] = valid ? "t" : "f"; + + /* the reason */ + values[1] = reason; + + /* the location */ + values[2] = location ? lwgeom_to_hexwkb(location, WKB_EXTENDED, 0) : 0; + + tuple = BuildTupleFromCStrings(attinmeta, values); + result = HeapTupleGetDatum(tuple); + + PG_RETURN_HEAPTUPLEHEADER(result); + +#endif /* POSTGIS_GEOS_VERSION >= 33 */ +} + +/** + * overlaps(GSERIALIZED g1,GSERIALIZED g2) + * @param g1 + * @param g2 + * @return if GEOS::g1->overlaps(g2) returns true + * @throw an error (elog(ERROR,...)) if GEOS throws an error + */ +PG_FUNCTION_INFO_V1(overlaps); +Datum overlaps(PG_FUNCTION_ARGS) +{ + GSERIALIZED *geom1; + GSERIALIZED *geom2; + GEOSGeometry *g1, *g2; + bool result; + GBOX box1, box2; + + geom1 = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + geom2 = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + + errorIfGeometryCollection(geom1,geom2); + error_if_srid_mismatch(gserialized_get_srid(geom1), gserialized_get_srid(geom2)); + + /* A.Overlaps(Empty) == FALSE */ + if ( gserialized_is_empty(geom1) || gserialized_is_empty(geom2) ) + PG_RETURN_BOOL(false); + + /* + * short-circuit 1: if geom2 bounding box does not overlap + * geom1 bounding box we can prematurely return FALSE. + * Do the test IFF BOUNDING BOX AVAILABLE. + */ + if ( gserialized_get_gbox_p(geom1, &box1) && + gserialized_get_gbox_p(geom2, &box2) ) + { + if ( gbox_overlaps_2d(&box1, &box2) == LW_FALSE ) + { + PG_RETURN_BOOL(FALSE); + } + } + + initGEOS(lwnotice, lwgeom_geos_error); + + g1 = (GEOSGeometry *)POSTGIS2GEOS(geom1); + if ( 0 == g1 ) /* exception thrown at construction */ + { + lwerror("First argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + PG_RETURN_NULL(); + } + + g2 = (GEOSGeometry *)POSTGIS2GEOS(geom2); + + if ( 0 == g2 ) /* exception thrown at construction */ + { + GEOSGeom_destroy(g1); + lwerror("Second argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + PG_RETURN_NULL(); } - PROFSTOP(PROF_QRUN); - PROFREPORT("geos",geom1, geom2, NULL); + result = GEOSOverlaps(g1,g2); + + GEOSGeom_destroy(g1); + GEOSGeom_destroy(g2); + if (result == 2) + { + lwerror("GEOSOverlaps: %s", lwgeom_geos_errmsg); + PG_RETURN_NULL(); /* never get here */ + } PG_FREE_IF_COPY(geom1, 0); PG_FREE_IF_COPY(geom2, 1); @@ -1556,25 +1980,28 @@ PG_FUNCTION_INFO_V1(contains); Datum contains(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom1; - PG_LWGEOM *geom2; + GSERIALIZED *geom1; + GSERIALIZED *geom2; GEOSGeometry *g1, *g2; - BOX2DFLOAT4 box1, box2; + GBOX box1, box2; int type1, type2; LWGEOM *lwgeom; LWPOINT *point; RTREE_POLY_CACHE *poly_cache; - MemoryContext old_context; bool result; #ifdef PREPARED_GEOM PrepGeomCache *prep_cache; #endif - geom1 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - geom2 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + geom1 = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + geom2 = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); errorIfGeometryCollection(geom1,geom2); - errorIfSRIDMismatch(pglwgeom_getSRID(geom1), pglwgeom_getSRID(geom2)); + error_if_srid_mismatch(gserialized_get_srid(geom1), gserialized_get_srid(geom2)); + + /* A.Contains(Empty) == FALSE */ + if ( gserialized_is_empty(geom1) || gserialized_is_empty(geom2) ) + PG_RETURN_BOOL(false); POSTGIS_DEBUG(3, "contains called."); @@ -1583,11 +2010,11 @@ ** geom1 bounding box we can prematurely return FALSE. ** Do the test IFF BOUNDING BOX AVAILABLE. */ - if ( getbox2d_p(SERIALIZED_FORM(geom1), &box1) && - getbox2d_p(SERIALIZED_FORM(geom2), &box2) ) + if ( gserialized_get_gbox_p(geom1, &box1) && + gserialized_get_gbox_p(geom2, &box2) ) { if ( ( box2.xmin < box1.xmin ) || ( box2.xmax > box1.xmax ) || - ( box2.ymin < box1.ymin ) || ( box2.ymax > box1.ymax ) ) + ( box2.ymin < box1.ymin ) || ( box2.ymax > box1.ymax ) ) { PG_RETURN_BOOL(FALSE); } @@ -1597,25 +2024,17 @@ ** short-circuit 2: if geom2 is a point and geom1 is a polygon ** call the point-in-polygon function. */ - type1 = lwgeom_getType((uchar)SERIALIZED_FORM(geom1)[0]); - type2 = lwgeom_getType((uchar)SERIALIZED_FORM(geom2)[0]); + type1 = gserialized_get_type(geom1); + type2 = gserialized_get_type(geom2); if ((type1 == POLYGONTYPE || type1 == MULTIPOLYGONTYPE) && type2 == POINTTYPE) { POSTGIS_DEBUG(3, "Point in Polygon test requested...short-circuiting."); - lwgeom = lwgeom_deserialize(SERIALIZED_FORM(geom1)); - point = lwpoint_deserialize(SERIALIZED_FORM(geom2)); + lwgeom = lwgeom_from_gserialized(geom1); + point = lwgeom_as_lwpoint(lwgeom_from_gserialized(geom2)); POSTGIS_DEBUGF(3, "Precall point_in_multipolygon_rtree %p, %p", lwgeom, point); - /* - * Switch the context to the function-scope context, - * retrieve the appropriate cache object, cache it for - * future use, then switch back to the local context. - */ - old_context = MemoryContextSwitchTo(fcinfo->flinfo->fn_mcxt); - poly_cache = retrieveCache(lwgeom, SERIALIZED_FORM(geom1), fcinfo->flinfo->fn_extra); - fcinfo->flinfo->fn_extra = poly_cache; - MemoryContextSwitchTo(old_context); + poly_cache = GetRtreeCache(fcinfo, lwgeom, geom1); if ( poly_cache->ringIndices ) { @@ -1635,10 +2054,10 @@ elog(ERROR,"Type isn't poly or multipoly!"); PG_RETURN_NULL(); } + lwgeom_free(lwgeom); + lwpoint_free(point); PG_FREE_IF_COPY(geom1, 0); PG_FREE_IF_COPY(geom2, 1); - lwgeom_release((LWGEOM *)lwgeom); - lwgeom_release((LWGEOM *)point); if ( result == 1 ) /* completely inside */ { PG_RETURN_BOOL(TRUE); @@ -1653,7 +2072,7 @@ POSTGIS_DEBUGF(3, "Contains: type1: %d, type2: %d", type1, type2); } - initGEOS(lwnotice, lwnotice); + initGEOS(lwnotice, lwgeom_geos_error); #ifdef PREPARED_GEOM prep_cache = GetPrepGeomCache( fcinfo, geom1, 0 ); @@ -1661,6 +2080,11 @@ if ( prep_cache && prep_cache->prepared_geom && prep_cache->argnum == 1 ) { g1 = (GEOSGeometry *)POSTGIS2GEOS(geom2); + if ( 0 == g1 ) /* exception thrown at construction */ + { + lwerror("Geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + PG_RETURN_NULL(); + } POSTGIS_DEBUG(4, "containsPrepared: cache is live, running preparedcontains"); result = GEOSPreparedContains( prep_cache->prepared_geom, g1); GEOSGeom_destroy(g1); @@ -1669,7 +2093,18 @@ #endif { g1 = (GEOSGeometry *)POSTGIS2GEOS(geom1); + if ( 0 == g1 ) /* exception thrown at construction */ + { + lwerror("First argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + PG_RETURN_NULL(); + } g2 = (GEOSGeometry *)POSTGIS2GEOS(geom2); + if ( 0 == g2 ) /* exception thrown at construction */ + { + lwerror("Second argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + GEOSGeom_destroy(g1); + PG_RETURN_NULL(); + } POSTGIS_DEBUG(4, "containsPrepared: cache is not ready, running standard contains"); result = GEOSContains( g1, g2); GEOSGeom_destroy(g1); @@ -1678,7 +2113,7 @@ if (result == 2) { - elog(ERROR,"GEOS contains() threw an error!"); + lwerror("GEOSContains: %s", lwgeom_geos_errmsg); PG_RETURN_NULL(); /* never get here */ } @@ -1692,34 +2127,38 @@ PG_FUNCTION_INFO_V1(containsproperly); Datum containsproperly(PG_FUNCTION_ARGS) { - PG_LWGEOM * geom1; - PG_LWGEOM * geom2; + GSERIALIZED * geom1; + GSERIALIZED * geom2; bool result; - BOX2DFLOAT4 box1, box2; + GBOX box1, box2; #ifdef PREPARED_GEOM PrepGeomCache * prep_cache; #endif - geom1 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - geom2 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + geom1 = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + geom2 = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); errorIfGeometryCollection(geom1,geom2); - errorIfSRIDMismatch(pglwgeom_getSRID(geom1), pglwgeom_getSRID(geom2)); + error_if_srid_mismatch(gserialized_get_srid(geom1), gserialized_get_srid(geom2)); + + /* A.ContainsProperly(Empty) == FALSE */ + if ( gserialized_is_empty(geom1) || gserialized_is_empty(geom2) ) + PG_RETURN_BOOL(false); /* * short-circuit: if geom2 bounding box is not completely inside * geom1 bounding box we can prematurely return FALSE. * Do the test IFF BOUNDING BOX AVAILABLE. */ - if ( getbox2d_p(SERIALIZED_FORM(geom1), &box1) && - getbox2d_p(SERIALIZED_FORM(geom2), &box2) ) + if ( gserialized_get_gbox_p(geom1, &box1) && + gserialized_get_gbox_p(geom2, &box2) ) { if (( box2.xmin < box1.xmin ) || ( box2.xmax > box1.xmax ) || ( box2.ymin < box1.ymin ) || ( box2.ymax > box1.ymax )) PG_RETURN_BOOL(FALSE); } - initGEOS(lwnotice, lwnotice); + initGEOS(lwnotice, lwgeom_geos_error); #ifdef PREPARED_GEOM prep_cache = GetPrepGeomCache( fcinfo, geom1, 0 ); @@ -1727,14 +2166,33 @@ if ( prep_cache && prep_cache->prepared_geom && prep_cache->argnum == 1 ) { GEOSGeometry *g = (GEOSGeometry *)POSTGIS2GEOS(geom2); + if ( 0 == g ) /* exception thrown at construction */ + { + lwerror("First argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + PG_RETURN_NULL(); + } result = GEOSPreparedContainsProperly( prep_cache->prepared_geom, g); GEOSGeom_destroy(g); } else #endif { - GEOSGeometry *g1 = (GEOSGeometry *)POSTGIS2GEOS(geom1); - GEOSGeometry *g2 = (GEOSGeometry *)POSTGIS2GEOS(geom2); + GEOSGeometry *g2; + GEOSGeometry *g1; + + g1 = (GEOSGeometry *)POSTGIS2GEOS(geom1); + if ( 0 == g1 ) /* exception thrown at construction */ + { + lwerror("First argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + PG_RETURN_NULL(); + } + g2 = (GEOSGeometry *)POSTGIS2GEOS(geom2); + if ( 0 == g2 ) /* exception thrown at construction */ + { + lwerror("Second argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + GEOSGeom_destroy(g1); + PG_RETURN_NULL(); + } result = GEOSRelatePattern( g1, g2, "T**FF*FF*" ); GEOSGeom_destroy(g1); GEOSGeom_destroy(g2); @@ -1742,7 +2200,7 @@ if (result == 2) { - elog(ERROR,"GEOS contains() threw an error!"); + lwerror("GEOSContains: %s", lwgeom_geos_errmsg); PG_RETURN_NULL(); /* never get here */ } @@ -1759,32 +2217,35 @@ PG_FUNCTION_INFO_V1(covers); Datum covers(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom1; - PG_LWGEOM *geom2; + GSERIALIZED *geom1; + GSERIALIZED *geom2; bool result; - BOX2DFLOAT4 box1, box2; + GBOX box1, box2; int type1, type2; LWGEOM *lwgeom; LWPOINT *point; RTREE_POLY_CACHE *poly_cache; - MemoryContext old_context; #ifdef PREPARED_GEOM PrepGeomCache *prep_cache; #endif - geom1 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - geom2 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + geom1 = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + geom2 = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + + /* A.Covers(Empty) == FALSE */ + if ( gserialized_is_empty(geom1) || gserialized_is_empty(geom2) ) + PG_RETURN_BOOL(false); errorIfGeometryCollection(geom1,geom2); - errorIfSRIDMismatch(pglwgeom_getSRID(geom1), pglwgeom_getSRID(geom2)); + error_if_srid_mismatch(gserialized_get_srid(geom1), gserialized_get_srid(geom2)); /* * short-circuit 1: if geom2 bounding box is not completely inside * geom1 bounding box we can prematurely return FALSE. * Do the test IFF BOUNDING BOX AVAILABLE. */ - if ( getbox2d_p(SERIALIZED_FORM(geom1), &box1) && - getbox2d_p(SERIALIZED_FORM(geom2), &box2) ) + if ( gserialized_get_gbox_p(geom1, &box1) && + gserialized_get_gbox_p(geom2, &box2) ) { if (( box2.xmin < box1.xmin ) || ( box2.xmax > box1.xmax ) || ( box2.ymin < box1.ymin ) || ( box2.ymax > box1.ymax )) @@ -1796,26 +2257,18 @@ * short-circuit 2: if geom2 is a point and geom1 is a polygon * call the point-in-polygon function. */ - type1 = lwgeom_getType((uchar)SERIALIZED_FORM(geom1)[0]); - type2 = lwgeom_getType((uchar)SERIALIZED_FORM(geom2)[0]); + type1 = gserialized_get_type(geom1); + type2 = gserialized_get_type(geom2); if ((type1 == POLYGONTYPE || type1 == MULTIPOLYGONTYPE) && type2 == POINTTYPE) { POSTGIS_DEBUG(3, "Point in Polygon test requested...short-circuiting."); - lwgeom = lwgeom_deserialize(SERIALIZED_FORM(geom1)); - point = lwpoint_deserialize(SERIALIZED_FORM(geom2)); + lwgeom = lwgeom_from_gserialized(geom1); + point = lwgeom_as_lwpoint(lwgeom_from_gserialized(geom2)); POSTGIS_DEBUGF(3, "Precall point_in_multipolygon_rtree %p, %p", lwgeom, point); - /* - * Switch the context to the function-scope context, - * retrieve the appropriate cache object, cache it for - * future use, then switch back to the local context. - */ - old_context = MemoryContextSwitchTo(fcinfo->flinfo->fn_mcxt); - poly_cache = retrieveCache(lwgeom, SERIALIZED_FORM(geom1), fcinfo->flinfo->fn_extra); - fcinfo->flinfo->fn_extra = poly_cache; - MemoryContextSwitchTo(old_context); + poly_cache = GetRtreeCache(fcinfo, lwgeom, geom1); if ( poly_cache->ringIndices ) { @@ -1836,10 +2289,10 @@ PG_RETURN_NULL(); } + lwgeom_free(lwgeom); + lwpoint_free(point); PG_FREE_IF_COPY(geom1, 0); PG_FREE_IF_COPY(geom2, 1); - lwgeom_release((LWGEOM *)lwgeom); - lwgeom_release((LWGEOM *)point); if ( result != -1 ) /* not outside */ { PG_RETURN_BOOL(TRUE); @@ -1854,7 +2307,7 @@ POSTGIS_DEBUGF(3, "Covers: type1: %d, type2: %d", type1, type2); } - initGEOS(lwnotice, lwnotice); + initGEOS(lwnotice, lwgeom_geos_error); #ifdef PREPARED_GEOM prep_cache = GetPrepGeomCache( fcinfo, geom1, 0 ); @@ -1862,14 +2315,33 @@ if ( prep_cache && prep_cache->prepared_geom && prep_cache->argnum == 1 ) { GEOSGeometry *g1 = (GEOSGeometry *)POSTGIS2GEOS(geom2); + if ( 0 == g1 ) /* exception thrown at construction */ + { + lwerror("First argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + PG_RETURN_NULL(); + } result = GEOSPreparedCovers( prep_cache->prepared_geom, g1); GEOSGeom_destroy(g1); } else #endif { - GEOSGeometry *g1 = (GEOSGeometry *)POSTGIS2GEOS(geom1); - GEOSGeometry *g2 = (GEOSGeometry *)POSTGIS2GEOS(geom2); + GEOSGeometry *g1; + GEOSGeometry *g2; + + g1 = (GEOSGeometry *)POSTGIS2GEOS(geom1); + if ( 0 == g1 ) /* exception thrown at construction */ + { + lwerror("First argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + PG_RETURN_NULL(); + } + g2 = (GEOSGeometry *)POSTGIS2GEOS(geom2); + if ( 0 == g2 ) /* exception thrown at construction */ + { + lwerror("Second argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + GEOSGeom_destroy(g1); + PG_RETURN_NULL(); + } result = GEOSRelatePattern( g1, g2, "******FF*" ); GEOSGeom_destroy(g1); GEOSGeom_destroy(g2); @@ -1877,7 +2349,7 @@ if (result == 2) { - elog(ERROR,"GEOS covers() threw an error!"); + lwerror("GEOSCovers: %s", lwgeom_geos_errmsg); PG_RETURN_NULL(); /* never get here */ } @@ -1889,131 +2361,12 @@ } - +/** +* ST_Within(A, B) => ST_Contains(B, A) so we just delegate this calculation to the +* Contains implementation. PG_FUNCTION_INFO_V1(within); Datum within(PG_FUNCTION_ARGS) -{ - PG_LWGEOM *geom1; - PG_LWGEOM *geom2; - GEOSGeometry *g1, *g2; - bool result; - BOX2DFLOAT4 box1, box2; - LWGEOM *lwgeom; - LWPOINT *point; - int type1, type2; - MemoryContext old_context; - RTREE_POLY_CACHE *poly_cache; - - PROFSTART(PROF_QRUN); - - geom1 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - geom2 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - - errorIfGeometryCollection(geom1,geom2); - errorIfSRIDMismatch(pglwgeom_getSRID(geom1), pglwgeom_getSRID(geom2)); - - /* - * short-circuit 1: if geom1 bounding box is not completely inside - * geom2 bounding box we can prematurely return FALSE. - * Do the test IFF BOUNDING BOX AVAILABLE. - */ - if ( getbox2d_p(SERIALIZED_FORM(geom1), &box1) && - getbox2d_p(SERIALIZED_FORM(geom2), &box2) ) - { - if ( ( box1.xmin < box2.xmin ) || ( box1.xmax > box2.xmax ) || - ( box1.ymin < box2.ymin ) || ( box1.ymax > box2.ymax ) ) - { - PG_RETURN_BOOL(FALSE); - } - } - /* - * short-circuit 2: if geom1 is a point and geom2 is a polygon - * call the point-in-polygon function. - */ - type1 = lwgeom_getType((uchar)SERIALIZED_FORM(geom1)[0]); - type2 = lwgeom_getType((uchar)SERIALIZED_FORM(geom2)[0]); - if ((type2 == POLYGONTYPE || type2 == MULTIPOLYGONTYPE) && type1 == POINTTYPE) - { - POSTGIS_DEBUG(3, "Point in Polygon test requested...short-circuiting."); - - point = lwpoint_deserialize(SERIALIZED_FORM(geom1)); - lwgeom = lwgeom_deserialize(SERIALIZED_FORM(geom2)); - - /* - * Switch the context to the function-scope context, - * retrieve the appropriate cache object, cache it for - * future use, then switch back to the local context. - */ - old_context = MemoryContextSwitchTo(fcinfo->flinfo->fn_mcxt); - poly_cache = retrieveCache(lwgeom, SERIALIZED_FORM(geom2), fcinfo->flinfo->fn_extra); - fcinfo->flinfo->fn_extra = poly_cache; - MemoryContextSwitchTo(old_context); - - if ( poly_cache->ringIndices ) - { - result = point_in_multipolygon_rtree(poly_cache->ringIndices, poly_cache->polyCount, poly_cache->ringCounts, point); - } - else if ( type2 == POLYGONTYPE ) - { - result = point_in_polygon((LWPOLY*)lwgeom, point); - } - else if ( type2 == MULTIPOLYGONTYPE ) - { - result = point_in_multipolygon((LWMPOLY*)lwgeom, point); - } - else - { - /* Gulp! Should not be here... */ - elog(ERROR,"Type isn't poly or multipoly!"); - PG_RETURN_NULL(); - } - - PG_FREE_IF_COPY(geom1, 0); - PG_FREE_IF_COPY(geom2, 1); - lwgeom_release((LWGEOM *)lwgeom); - lwgeom_release((LWGEOM *)point); - if ( result == 1 ) /* completely inside */ - { - PG_RETURN_BOOL(TRUE); - } - else - { - PG_RETURN_BOOL(FALSE); - } - } - - initGEOS(lwnotice, lwnotice); - - PROFSTART(PROF_P2G1); - g1 = (GEOSGeometry *)POSTGIS2GEOS(geom1); - PROFSTOP(PROF_P2G1); - - PROFSTART(PROF_P2G2); - g2 = (GEOSGeometry *)POSTGIS2GEOS(geom2); - PROFSTOP(PROF_P2G2); - - PROFSTART(PROF_GRUN); - result = GEOSWithin(g1,g2); - PROFSTOP(PROF_GRUN); - - GEOSGeom_destroy(g1); - GEOSGeom_destroy(g2); - - if (result == 2) - { - elog(ERROR,"GEOS within() threw an error!"); - PG_RETURN_NULL(); /* never get here */ - } - - PROFSTOP(PROF_QRUN); - PROFREPORT("geos",geom1, geom2, NULL); - - PG_FREE_IF_COPY(geom1, 0); - PG_FREE_IF_COPY(geom2, 1); - - PG_RETURN_BOOL(result); -} - +*/ /* * Described at: @@ -2022,33 +2375,34 @@ PG_FUNCTION_INFO_V1(coveredby); Datum coveredby(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom1; - PG_LWGEOM *geom2; + GSERIALIZED *geom1; + GSERIALIZED *geom2; GEOSGeometry *g1, *g2; bool result; - BOX2DFLOAT4 box1, box2; + GBOX box1, box2; LWGEOM *lwgeom; LWPOINT *point; int type1, type2; - MemoryContext old_context; RTREE_POLY_CACHE *poly_cache; char *patt = "**F**F***"; - PROFSTART(PROF_QRUN); - - geom1 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - geom2 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + geom1 = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + geom2 = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); errorIfGeometryCollection(geom1,geom2); - errorIfSRIDMismatch(pglwgeom_getSRID(geom1), pglwgeom_getSRID(geom2)); + error_if_srid_mismatch(gserialized_get_srid(geom1), gserialized_get_srid(geom2)); + + /* A.CoveredBy(Empty) == FALSE */ + if ( gserialized_is_empty(geom1) || gserialized_is_empty(geom2) ) + PG_RETURN_BOOL(false); /* * short-circuit 1: if geom1 bounding box is not completely inside * geom2 bounding box we can prematurely return FALSE. * Do the test IFF BOUNDING BOX AVAILABLE. */ - if ( getbox2d_p(SERIALIZED_FORM(geom1), &box1) && - getbox2d_p(SERIALIZED_FORM(geom2), &box2) ) + if ( gserialized_get_gbox_p(geom1, &box1) && + gserialized_get_gbox_p(geom2, &box2) ) { if ( ( box1.xmin < box2.xmin ) || ( box1.xmax > box2.xmax ) || ( box1.ymin < box2.ymin ) || ( box1.ymax > box2.ymax ) ) @@ -2062,24 +2416,16 @@ * short-circuit 2: if geom1 is a point and geom2 is a polygon * call the point-in-polygon function. */ - type1 = lwgeom_getType((uchar)SERIALIZED_FORM(geom1)[0]); - type2 = lwgeom_getType((uchar)SERIALIZED_FORM(geom2)[0]); + type1 = gserialized_get_type(geom1); + type2 = gserialized_get_type(geom2); if ((type2 == POLYGONTYPE || type2 == MULTIPOLYGONTYPE) && type1 == POINTTYPE) { POSTGIS_DEBUG(3, "Point in Polygon test requested...short-circuiting."); - point = lwpoint_deserialize(SERIALIZED_FORM(geom1)); - lwgeom = lwgeom_deserialize(SERIALIZED_FORM(geom2)); + point = lwgeom_as_lwpoint(lwgeom_from_gserialized(geom1)); + lwgeom = lwgeom_from_gserialized(geom2); - /* - * Switch the context to the function-scope context, - * retrieve the appropriate cache object, cache it for - * future use, then switch back to the local context. - */ - old_context = MemoryContextSwitchTo(fcinfo->flinfo->fn_mcxt); - poly_cache = retrieveCache(lwgeom, SERIALIZED_FORM(geom2), fcinfo->flinfo->fn_extra); - fcinfo->flinfo->fn_extra = poly_cache; - MemoryContextSwitchTo(old_context); + poly_cache = GetRtreeCache(fcinfo, lwgeom, geom2); if ( poly_cache->ringIndices ) { @@ -2100,10 +2446,10 @@ PG_RETURN_NULL(); } + lwgeom_free(lwgeom); + lwpoint_free(point); PG_FREE_IF_COPY(geom1, 0); PG_FREE_IF_COPY(geom2, 1); - lwgeom_release((LWGEOM *)lwgeom); - lwgeom_release((LWGEOM *)point); if ( result != -1 ) /* not outside */ { PG_RETURN_BOOL(TRUE); @@ -2114,32 +2460,36 @@ } } - initGEOS(lwnotice, lwnotice); + initGEOS(lwnotice, lwgeom_geos_error); - PROFSTART(PROF_P2G1); g1 = (GEOSGeometry *)POSTGIS2GEOS(geom1); - PROFSTOP(PROF_P2G1); - PROFSTART(PROF_P2G2); + if ( 0 == g1 ) /* exception thrown at construction */ + { + lwerror("First argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + PG_RETURN_NULL(); + } + g2 = (GEOSGeometry *)POSTGIS2GEOS(geom2); - PROFSTOP(PROF_P2G2); - PROFSTART(PROF_GRUN); + if ( 0 == g2 ) /* exception thrown at construction */ + { + lwerror("Second argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + GEOSGeom_destroy(g1); + PG_RETURN_NULL(); + } + result = GEOSRelatePattern(g1,g2,patt); - PROFSTOP(PROF_GRUN); GEOSGeom_destroy(g1); GEOSGeom_destroy(g2); if (result == 2) { - elog(ERROR,"GEOS coveredby() threw an error!"); + lwerror("GEOSCoveredBy: %s", lwgeom_geos_errmsg); PG_RETURN_NULL(); /* never get here */ } - PROFSTOP(PROF_QRUN); - PROFREPORT("geos",geom1, geom2, NULL); - PG_FREE_IF_COPY(geom1, 0); PG_FREE_IF_COPY(geom2, 1); @@ -2151,61 +2501,64 @@ PG_FUNCTION_INFO_V1(crosses); Datum crosses(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom1; - PG_LWGEOM *geom2; + GSERIALIZED *geom1; + GSERIALIZED *geom2; GEOSGeometry *g1, *g2; bool result; - BOX2DFLOAT4 box1, box2; + GBOX box1, box2; - PROFSTART(PROF_QRUN); - - geom1 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - geom2 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + geom1 = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + geom2 = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); errorIfGeometryCollection(geom1,geom2); - errorIfSRIDMismatch(pglwgeom_getSRID(geom1), pglwgeom_getSRID(geom2)); + error_if_srid_mismatch(gserialized_get_srid(geom1), gserialized_get_srid(geom2)); + + /* A.Crosses(Empty) == FALSE */ + if ( gserialized_is_empty(geom1) || gserialized_is_empty(geom2) ) + PG_RETURN_BOOL(false); /* * short-circuit 1: if geom2 bounding box does not overlap * geom1 bounding box we can prematurely return FALSE. * Do the test IFF BOUNDING BOX AVAILABLE. */ - if ( getbox2d_p(SERIALIZED_FORM(geom1), &box1) && - getbox2d_p(SERIALIZED_FORM(geom2), &box2) ) + if ( gserialized_get_gbox_p(geom1, &box1) && + gserialized_get_gbox_p(geom2, &box2) ) { - if ( ( box2.xmax < box1.xmin ) || ( box2.xmin > box1.xmax ) || - ( box2.ymax < box1.ymin ) || ( box2.ymin > box2.ymax ) ) + if ( gbox_overlaps_2d(&box1, &box2) == LW_FALSE ) { PG_RETURN_BOOL(FALSE); } } - initGEOS(lwnotice, lwnotice); + initGEOS(lwnotice, lwgeom_geos_error); - PROFSTART(PROF_P2G1); g1 = (GEOSGeometry *)POSTGIS2GEOS(geom1); - PROFSTOP(PROF_P2G1); + if ( 0 == g1 ) /* exception thrown at construction */ + { + lwerror("First argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + PG_RETURN_NULL(); + } - PROFSTART(PROF_P2G2); g2 = (GEOSGeometry *)POSTGIS2GEOS(geom2); - PROFSTOP(PROF_P2G2); + if ( 0 == g2 ) /* exception thrown at construction */ + { + lwerror("Second argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + GEOSGeom_destroy(g1); + PG_RETURN_NULL(); + } - PROFSTART(PROF_GRUN); result = GEOSCrosses(g1,g2); - PROFSTOP(PROF_GRUN); GEOSGeom_destroy(g1); GEOSGeom_destroy(g2); if (result == 2) { - elog(ERROR,"GEOS crosses() threw an error!"); + lwerror("GEOSCrosses: %s", lwgeom_geos_errmsg); PG_RETURN_NULL(); /* never get here */ } - PROFSTOP(PROF_QRUN); - PROFREPORT("geos",geom1, geom2, NULL); - PG_FREE_IF_COPY(geom1, 0); PG_FREE_IF_COPY(geom2, 1); @@ -2216,36 +2569,38 @@ PG_FUNCTION_INFO_V1(intersects); Datum intersects(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom1; - PG_LWGEOM *geom2; - uchar *serialized_poly; + GSERIALIZED *geom1; + GSERIALIZED *geom2; + GSERIALIZED *serialized_poly; bool result; - BOX2DFLOAT4 box1, box2; + GBOX box1, box2; int type1, type2, polytype; LWPOINT *point; LWGEOM *lwgeom; - MemoryContext old_context; RTREE_POLY_CACHE *poly_cache; #ifdef PREPARED_GEOM PrepGeomCache *prep_cache; #endif - geom1 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - geom2 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + geom1 = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + geom2 = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); errorIfGeometryCollection(geom1,geom2); - errorIfSRIDMismatch(pglwgeom_getSRID(geom1), pglwgeom_getSRID(geom2)); + error_if_srid_mismatch(gserialized_get_srid(geom1), gserialized_get_srid(geom2)); + + /* A.Intersects(Empty) == FALSE */ + if ( gserialized_is_empty(geom1) || gserialized_is_empty(geom2) ) + PG_RETURN_BOOL(false); /* * short-circuit 1: if geom2 bounding box does not overlap * geom1 bounding box we can prematurely return FALSE. * Do the test IFF BOUNDING BOX AVAILABLE. */ - if ( getbox2d_p(SERIALIZED_FORM(geom1), &box1) && - getbox2d_p(SERIALIZED_FORM(geom2), &box2) ) + if ( gserialized_get_gbox_p(geom1, &box1) && + gserialized_get_gbox_p(geom2, &box2) ) { - if ( ( box2.xmax < box1.xmin ) || ( box2.xmin > box1.xmax ) || - ( box2.ymax < box1.ymin ) || ( box2.ymin > box1.ymax ) ) + if ( gbox_overlaps_2d(&box1, &box2) == LW_FALSE ) { PG_RETURN_BOOL(FALSE); } @@ -2255,8 +2610,8 @@ * short-circuit 2: if the geoms are a point and a polygon, * call the point_outside_polygon function. */ - type1 = lwgeom_getType((uchar)SERIALIZED_FORM(geom1)[0]); - type2 = lwgeom_getType((uchar)SERIALIZED_FORM(geom2)[0]); + type1 = gserialized_get_type(geom1); + type2 = gserialized_get_type(geom2); if ( (type1 == POINTTYPE && (type2 == POLYGONTYPE || type2 == MULTIPOLYGONTYPE)) || (type2 == POINTTYPE && (type1 == POLYGONTYPE || type1 == MULTIPOLYGONTYPE))) { @@ -2264,27 +2619,20 @@ if ( type1 == POINTTYPE ) { - point = lwpoint_deserialize(SERIALIZED_FORM(geom1)); - lwgeom = lwgeom_deserialize(SERIALIZED_FORM(geom2)); - serialized_poly = SERIALIZED_FORM(geom2); + point = lwgeom_as_lwpoint(lwgeom_from_gserialized(geom1)); + lwgeom = lwgeom_from_gserialized(geom2); + serialized_poly = geom2; polytype = type2; } else { - point = lwpoint_deserialize(SERIALIZED_FORM(geom2)); - lwgeom = lwgeom_deserialize(SERIALIZED_FORM(geom1)); - serialized_poly = SERIALIZED_FORM(geom1); + point = lwgeom_as_lwpoint(lwgeom_from_gserialized(geom2)); + lwgeom = lwgeom_from_gserialized(geom1); + serialized_poly = geom1; polytype = type1; } - /* - * Switch the context to the function-scope context, - * retrieve the appropriate cache object, cache it for - * future use, then switch back to the local context. - */ - old_context = MemoryContextSwitchTo(fcinfo->flinfo->fn_mcxt); - poly_cache = retrieveCache(lwgeom, serialized_poly, fcinfo->flinfo->fn_extra); - fcinfo->flinfo->fn_extra = poly_cache; - MemoryContextSwitchTo(old_context); + + poly_cache = GetRtreeCache(fcinfo, lwgeom, serialized_poly); if ( poly_cache->ringIndices ) { @@ -2305,10 +2653,10 @@ PG_RETURN_NULL(); } + lwgeom_free(lwgeom); + lwpoint_free(point); PG_FREE_IF_COPY(geom1, 0); PG_FREE_IF_COPY(geom2, 1); - lwgeom_release((LWGEOM *)lwgeom); - lwgeom_release((LWGEOM *)point); if ( result != -1 ) /* not outside */ { PG_RETURN_BOOL(TRUE); @@ -2319,7 +2667,7 @@ } } - initGEOS(lwnotice, lwnotice); + initGEOS(lwnotice, lwgeom_geos_error); #ifdef PREPARED_GEOM prep_cache = GetPrepGeomCache( fcinfo, geom1, geom2 ); @@ -2328,12 +2676,22 @@ if ( prep_cache->argnum == 1 ) { GEOSGeometry *g = (GEOSGeometry *)POSTGIS2GEOS(geom2); + if ( 0 == g ) /* exception thrown at construction */ + { + lwerror("Geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + PG_RETURN_NULL(); + } result = GEOSPreparedIntersects( prep_cache->prepared_geom, g); GEOSGeom_destroy(g); } else { GEOSGeometry *g = (GEOSGeometry *)POSTGIS2GEOS(geom1); + if ( 0 == g ) /* exception thrown at construction */ + { + lwerror("Geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + PG_RETURN_NULL(); + } result = GEOSPreparedIntersects( prep_cache->prepared_geom, g); GEOSGeom_destroy(g); } @@ -2341,8 +2699,21 @@ else #endif { - GEOSGeometry *g1 = (GEOSGeometry *)POSTGIS2GEOS(geom1); - GEOSGeometry *g2 = (GEOSGeometry *)POSTGIS2GEOS(geom2); + GEOSGeometry *g1; + GEOSGeometry *g2; + g1 = (GEOSGeometry *)POSTGIS2GEOS(geom1); + if ( 0 == g1 ) /* exception thrown at construction */ + { + lwerror("First argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + PG_RETURN_NULL(); + } + g2 = (GEOSGeometry *)POSTGIS2GEOS(geom2); + if ( 0 == g2 ) /* exception thrown at construction */ + { + lwerror("Second argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + GEOSGeom_destroy(g1); + PG_RETURN_NULL(); + } result = GEOSIntersects( g1, g2); GEOSGeom_destroy(g1); GEOSGeom_destroy(g2); @@ -2350,7 +2721,7 @@ if (result == 2) { - elog(ERROR,"GEOS intersects() threw an error!"); + lwerror("GEOSIntersects: %s", lwgeom_geos_errmsg); PG_RETURN_NULL(); /* never get here */ } @@ -2364,61 +2735,64 @@ PG_FUNCTION_INFO_V1(touches); Datum touches(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom1; - PG_LWGEOM *geom2; + GSERIALIZED *geom1; + GSERIALIZED *geom2; GEOSGeometry *g1, *g2; bool result; - BOX2DFLOAT4 box1, box2; - - PROFSTART(PROF_QRUN); + GBOX box1, box2; - geom1 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - geom2 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + geom1 = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + geom2 = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); errorIfGeometryCollection(geom1,geom2); - errorIfSRIDMismatch(pglwgeom_getSRID(geom1), pglwgeom_getSRID(geom2)); + error_if_srid_mismatch(gserialized_get_srid(geom1), gserialized_get_srid(geom2)); + + /* A.Touches(Empty) == FALSE */ + if ( gserialized_is_empty(geom1) || gserialized_is_empty(geom2) ) + PG_RETURN_BOOL(false); /* * short-circuit 1: if geom2 bounding box does not overlap * geom1 bounding box we can prematurely return FALSE. * Do the test IFF BOUNDING BOX AVAILABLE. */ - if ( getbox2d_p(SERIALIZED_FORM(geom1), &box1) && - getbox2d_p(SERIALIZED_FORM(geom2), &box2) ) + if ( gserialized_get_gbox_p(geom1, &box1) && + gserialized_get_gbox_p(geom2, &box2) ) { - if ( ( box2.xmax < box1.xmin ) || ( box2.xmin > box1.xmax ) || - ( box2.ymax < box1.ymin ) || ( box2.ymin > box1.ymax ) ) + if ( gbox_overlaps_2d(&box1, &box2) == LW_FALSE ) { PG_RETURN_BOOL(FALSE); } } - initGEOS(lwnotice, lwnotice); + initGEOS(lwnotice, lwgeom_geos_error); - PROFSTART(PROF_P2G1); g1 = (GEOSGeometry *)POSTGIS2GEOS(geom1 ); - PROFSTOP(PROF_P2G1); - - PROFSTART(PROF_P2G2); - g2 = (GEOSGeometry *)POSTGIS2GEOS(geom2 ); - PROFSTOP(PROF_P2G2); + if ( 0 == g1 ) /* exception thrown at construction */ + { + lwerror("First argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + PG_RETURN_NULL(); + } + + g2 = (GEOSGeometry *)POSTGIS2GEOS(geom2 ); + if ( 0 == g2 ) /* exception thrown at construction */ + { + lwerror("Second argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + GEOSGeom_destroy(g1); + PG_RETURN_NULL(); + } - PROFSTART(PROF_GRUN); result = GEOSTouches(g1,g2); - PROFSTOP(PROF_GRUN); GEOSGeom_destroy(g1); GEOSGeom_destroy(g2); if (result == 2) { - elog(ERROR,"GEOS touches() threw an error!"); + lwerror("GEOSTouches: %s", lwgeom_geos_errmsg); PG_RETURN_NULL(); /* never get here */ } - PROFSTOP(PROF_QRUN); - PROFREPORT("geos",geom1, geom2, NULL); - PG_FREE_IF_COPY(geom1, 0); PG_FREE_IF_COPY(geom2, 1); @@ -2429,61 +2803,64 @@ PG_FUNCTION_INFO_V1(disjoint); Datum disjoint(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom1; - PG_LWGEOM *geom2; + GSERIALIZED *geom1; + GSERIALIZED *geom2; GEOSGeometry *g1, *g2; bool result; - BOX2DFLOAT4 box1, box2; - - PROFSTART(PROF_QRUN); + GBOX box1, box2; - geom1 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - geom2 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + geom1 = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + geom2 = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); errorIfGeometryCollection(geom1,geom2); - errorIfSRIDMismatch(pglwgeom_getSRID(geom1), pglwgeom_getSRID(geom2)); + error_if_srid_mismatch(gserialized_get_srid(geom1), gserialized_get_srid(geom2)); + + /* A.Disjoint(Empty) == TRUE */ + if ( gserialized_is_empty(geom1) || gserialized_is_empty(geom2) ) + PG_RETURN_BOOL(true); /* * short-circuit 1: if geom2 bounding box does not overlap * geom1 bounding box we can prematurely return TRUE. * Do the test IFF BOUNDING BOX AVAILABLE. */ - if ( getbox2d_p(SERIALIZED_FORM(geom1), &box1) && - getbox2d_p(SERIALIZED_FORM(geom2), &box2) ) + if ( gserialized_get_gbox_p(geom1, &box1) && + gserialized_get_gbox_p(geom2, &box2) ) { - if ( ( box2.xmax < box1.xmin ) || ( box2.xmin > box1.xmax ) || - ( box2.ymax < box1.ymin ) || ( box2.ymin > box1.ymax ) ) + if ( gbox_overlaps_2d(&box1, &box2) == LW_FALSE ) { PG_RETURN_BOOL(TRUE); } } - initGEOS(lwnotice, lwnotice); + initGEOS(lwnotice, lwgeom_geos_error); - PROFSTART(PROF_P2G1); g1 = (GEOSGeometry *)POSTGIS2GEOS(geom1); - PROFSTOP(PROF_P2G1); + if ( 0 == g1 ) /* exception thrown at construction */ + { + lwerror("First argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + PG_RETURN_NULL(); + } - PROFSTART(PROF_P2G2); g2 = (GEOSGeometry *)POSTGIS2GEOS(geom2); - PROFSTOP(PROF_P2G2); + if ( 0 == g2 ) /* exception thrown at construction */ + { + lwerror("Second argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + GEOSGeom_destroy(g1); + PG_RETURN_NULL(); + } - PROFSTART(PROF_GRUN); result = GEOSDisjoint(g1,g2); - PROFSTOP(PROF_GRUN); GEOSGeom_destroy(g1); GEOSGeom_destroy(g2); if (result == 2) { - elog(ERROR,"GEOS disjoin() threw an error!"); + lwerror("GEOSDisjoint: %s", lwgeom_geos_errmsg); PG_RETURN_NULL(); /* never get here */ } - PROFSTOP(PROF_QRUN); - PROFREPORT("geos",geom1, geom2, NULL); - PG_FREE_IF_COPY(geom1, 0); PG_FREE_IF_COPY(geom2, 1); @@ -2494,23 +2871,37 @@ PG_FUNCTION_INFO_V1(relate_pattern); Datum relate_pattern(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom1; - PG_LWGEOM *geom2; + GSERIALIZED *geom1; + GSERIALIZED *geom2; char *patt; bool result; GEOSGeometry *g1, *g2; int i; - geom1 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - geom2 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + geom1 = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + geom2 = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + + + /* TODO handle empty */ errorIfGeometryCollection(geom1,geom2); - errorIfSRIDMismatch(pglwgeom_getSRID(geom1), pglwgeom_getSRID(geom2)); + error_if_srid_mismatch(gserialized_get_srid(geom1), gserialized_get_srid(geom2)); - initGEOS(lwnotice, lwnotice); + initGEOS(lwnotice, lwgeom_geos_error); g1 = (GEOSGeometry *)POSTGIS2GEOS(geom1); + if ( 0 == g1 ) /* exception thrown at construction */ + { + lwerror("First argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + PG_RETURN_NULL(); + } g2 = (GEOSGeometry *)POSTGIS2GEOS(geom2); + if ( 0 == g2 ) /* exception thrown at construction */ + { + lwerror("Second argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + GEOSGeom_destroy(g1); + PG_RETURN_NULL(); + } patt = DatumGetCString(DirectFunctionCall1(textout, PointerGetDatum(PG_GETARG_DATUM(2)))); @@ -2531,7 +2922,7 @@ if (result == 2) { - elog(ERROR,"GEOS relate_pattern() threw an error!"); + lwerror("GEOSRelatePattern: %s", lwgeom_geos_errmsg); PG_RETURN_NULL(); /* never get here */ } @@ -2546,25 +2937,53 @@ PG_FUNCTION_INFO_V1(relate_full); Datum relate_full(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom1; - PG_LWGEOM *geom2; + GSERIALIZED *geom1; + GSERIALIZED *geom2; GEOSGeometry *g1, *g2; char *relate_str; - int len; text *result; +#if POSTGIS_GEOS_VERSION >= 33 + int bnr = GEOSRELATE_BNR_OGC; +#endif POSTGIS_DEBUG(2, "in relate_full()"); - geom1 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - geom2 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + /* TODO handle empty */ + + geom1 = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + geom2 = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + + if ( PG_NARGS() > 2 ) { +#if POSTGIS_GEOS_VERSION >= 33 + bnr = PG_GETARG_INT32(2); +#else + lwerror("The GEOS version this PostGIS binary " + "was compiled against (%d) doesn't support " + "specifying a boundary node rule with ST_Relate" + " (3.3.0+ required)", + POSTGIS_GEOS_VERSION); + PG_RETURN_NULL(); +#endif + } errorIfGeometryCollection(geom1,geom2); - errorIfSRIDMismatch(pglwgeom_getSRID(geom1), pglwgeom_getSRID(geom2)); + error_if_srid_mismatch(gserialized_get_srid(geom1), gserialized_get_srid(geom2)); - initGEOS(lwnotice, lwnotice); + initGEOS(lwnotice, lwgeom_geos_error); g1 = (GEOSGeometry *)POSTGIS2GEOS(geom1 ); + if ( 0 == g1 ) /* exception thrown at construction */ + { + lwerror("First argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + PG_RETURN_NULL(); + } g2 = (GEOSGeometry *)POSTGIS2GEOS(geom2 ); + if ( 0 == g2 ) /* exception thrown at construction */ + { + lwerror("Second argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + GEOSGeom_destroy(g1); + PG_RETURN_NULL(); + } POSTGIS_DEBUG(3, "constructed geometries "); @@ -2574,97 +2993,95 @@ POSTGIS_DEBUGF(3, "%s", GEOSGeomToWKT(g1)); POSTGIS_DEBUGF(3, "%s", GEOSGeomToWKT(g2)); - /*POSTGIS_DEBUGF(3, "valid g1 = %i", GEOSisvalid(g1));*/ - /*POSTGIS_DEBUGF(3, "valid g2 = %i",GEOSisvalid(g2));*/ - - POSTGIS_DEBUG(3, "about to relate()"); - +#if POSTGIS_GEOS_VERSION >= 33 + relate_str = GEOSRelateBoundaryNodeRule(g1, g2, bnr); +#else relate_str = GEOSRelate(g1, g2); - - POSTGIS_DEBUG(3, "finished relate()"); +#endif GEOSGeom_destroy(g1); GEOSGeom_destroy(g2); if (relate_str == NULL) { - elog(ERROR,"GEOS relate() threw an error!"); + lwerror("GEOSRelate: %s", lwgeom_geos_errmsg); PG_RETURN_NULL(); /* never get here */ } - len = strlen(relate_str) + VARHDRSZ; - - result= palloc(len); - SET_VARSIZE(result, len); - - memcpy(VARDATA(result), relate_str, len-VARHDRSZ); - - free(relate_str); + result = cstring2text(relate_str); + GEOSFree(relate_str); PG_FREE_IF_COPY(geom1, 0); PG_FREE_IF_COPY(geom2, 1); - PG_RETURN_POINTER(result); + PG_RETURN_TEXT_P(result); } -PG_FUNCTION_INFO_V1(geomequals); -Datum geomequals(PG_FUNCTION_ARGS) +PG_FUNCTION_INFO_V1(ST_Equals); +Datum ST_Equals(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom1; - PG_LWGEOM *geom2; + GSERIALIZED *geom1; + GSERIALIZED *geom2; GEOSGeometry *g1, *g2; bool result; - BOX2DFLOAT4 box1, box2; - - PROFSTART(PROF_QRUN); + GBOX box1, box2; - geom1 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - geom2 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + geom1 = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + geom2 = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); errorIfGeometryCollection(geom1,geom2); - errorIfSRIDMismatch(pglwgeom_getSRID(geom1), pglwgeom_getSRID(geom2)); + error_if_srid_mismatch(gserialized_get_srid(geom1), gserialized_get_srid(geom2)); + + /* Empty == Empty */ + if ( gserialized_is_empty(geom1) && gserialized_is_empty(geom2) ) + PG_RETURN_BOOL(TRUE); /* - * short-circuit 1: if geom2 bounding box does not equal + * short-circuit: Loose test, if geom2 bounding box does not overlap * geom1 bounding box we can prematurely return FALSE. - * Do the test IFF BOUNDING BOX AVAILABLE. + * + * TODO: use gbox_same_2d instead (not available at time of writing) */ - if ( getbox2d_p(SERIALIZED_FORM(geom1), &box1) && - getbox2d_p(SERIALIZED_FORM(geom2), &box2) ) + if ( gserialized_get_gbox_p(geom1, &box1) && + gserialized_get_gbox_p(geom2, &box2) ) { - if ( box2.xmax != box1.xmax ) PG_RETURN_BOOL(FALSE); - if ( box2.xmin != box1.xmin ) PG_RETURN_BOOL(FALSE); - if ( box2.ymax != box1.ymax ) PG_RETURN_BOOL(FALSE); - if ( box2.ymin != box2.ymin ) PG_RETURN_BOOL(FALSE); + if ( gbox_overlaps_2d(&box1, &box2) == LW_FALSE ) + { + PG_RETURN_BOOL(FALSE); + } } - initGEOS(lwnotice, lwnotice); + initGEOS(lwnotice, lwgeom_geos_error); - PROFSTART(PROF_P2G1); g1 = (GEOSGeometry *)POSTGIS2GEOS(geom1); - PROFSTOP(PROF_P2G1); - PROFSTART(PROF_P2G2); + if ( 0 == g1 ) /* exception thrown at construction */ + { + lwerror("First argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + PG_RETURN_NULL(); + } + g2 = (GEOSGeometry *)POSTGIS2GEOS(geom2); - PROFSTOP(PROF_P2G2); - PROFSTART(PROF_GRUN); + if ( 0 == g2 ) /* exception thrown at construction */ + { + lwerror("Second argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + GEOSGeom_destroy(g1); + PG_RETURN_NULL(); + } + result = GEOSEquals(g1,g2); - PROFSTOP(PROF_GRUN); GEOSGeom_destroy(g1); GEOSGeom_destroy(g2); if (result == 2) { - elog(ERROR,"GEOS equals() threw an error!"); + lwerror("GEOSEquals: %s", lwgeom_geos_errmsg); PG_RETURN_NULL(); /*never get here */ } - PROFSTOP(PROF_QRUN); - PROFREPORT("geos",geom1, geom2, NULL); - PG_FREE_IF_COPY(geom1, 0); PG_FREE_IF_COPY(geom2, 1); @@ -2674,26 +3091,31 @@ PG_FUNCTION_INFO_V1(issimple); Datum issimple(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom; + GSERIALIZED *geom; GEOSGeometry *g1; int result; POSTGIS_DEBUG(2, "issimple called"); - geom = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + geom = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - if (lwgeom_getnumgeometries(SERIALIZED_FORM(geom)) == 0) - PG_RETURN_BOOL(true); + if ( gserialized_is_empty(geom) ) + PG_RETURN_BOOL(TRUE); - initGEOS(lwnotice, lwnotice); + initGEOS(lwnotice, lwgeom_geos_error); g1 = (GEOSGeometry *)POSTGIS2GEOS(geom); + if ( 0 == g1 ) /* exception thrown at construction */ + { + lwerror("First argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + PG_RETURN_NULL(); + } result = GEOSisSimple(g1); GEOSGeom_destroy(g1); if (result == 2) { - elog(ERROR,"GEOS issimple() threw an error!"); + lwerror("GEOSisSimple: %s", lwgeom_geos_errmsg); PG_RETURN_NULL(); /*never get here */ } @@ -2705,29 +3127,35 @@ PG_FUNCTION_INFO_V1(isring); Datum isring(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom; + GSERIALIZED *geom; GEOSGeometry *g1; int result; - geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - if (lwgeom_getType(geom->type) != LINETYPE) + if (gserialized_get_type(geom) != LINETYPE) { elog(ERROR,"isring() should only be called on a LINE"); } - if (lwgeom_getnumgeometries(SERIALIZED_FORM(geom)) == 0) - PG_RETURN_BOOL(false); + /* Empty things can't close */ + if ( gserialized_is_empty(geom) ) + PG_RETURN_BOOL(FALSE); - initGEOS(lwnotice, lwnotice); + initGEOS(lwnotice, lwgeom_geos_error); g1 = (GEOSGeometry *)POSTGIS2GEOS(geom ); + if ( 0 == g1 ) /* exception thrown at construction */ + { + lwerror("First argument geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg); + PG_RETURN_NULL(); + } result = GEOSisRing(g1); GEOSGeom_destroy(g1); if (result == 2) { - elog(ERROR,"GEOS isring() threw an error!"); + lwerror("GEOSisRing: %s", lwgeom_geos_errmsg); PG_RETURN_NULL(); } @@ -2737,163 +3165,13 @@ -/* -** GEOS <==> PostGIS conversion functions -** -** Default conversion creates a GEOS point array, then iterates through the -** PostGIS points, setting each value in the GEOS array one at a time. -** -*/ - -/* Return a POINTARRAY from a GEOSCoordSeq */ -POINTARRAY * -ptarray_from_GEOSCoordSeq(const GEOSCoordSequence *cs, char want3d) -{ - unsigned int dims=2; - unsigned int size, i, ptsize; - uchar *points, *ptr; - POINTARRAY *ret; - - POSTGIS_DEBUG(2, "ptarray_fromGEOSCoordSeq called"); - - if ( ! GEOSCoordSeq_getSize(cs, &size) ) - lwerror("Exception thrown"); - - POSTGIS_DEBUGF(4, " GEOSCoordSeq size: %d", size); - - if ( want3d ) - { - if ( ! GEOSCoordSeq_getDimensions(cs, &dims) ) - lwerror("Exception thrown"); - - POSTGIS_DEBUGF(4, " GEOSCoordSeq dimensions: %d", dims); - - /* forget higher dimensions (if any) */ - if ( dims > 3 ) dims = 3; - } - - POSTGIS_DEBUGF(4, " output dimensions: %d", dims); - - ptsize = sizeof(double)*dims; - - ret = ptarray_construct((dims==3), 0, size); - - points = ret->serialized_pointlist; - ptr = points; - for (i=0; i= 3 ) GEOSCoordSeq_getZ(cs, i, &(point.z)); - memcpy(ptr, &point, ptsize); - ptr += ptsize; - } - - return ret; -} - -/* Return an LWGEOM from a Geometry */ -LWGEOM * -GEOS2LWGEOM(const GEOSGeometry *geom, char want3d) -{ - int type = GEOSGeomTypeId(geom) ; - bool hasZ = GEOSHasZ(geom); - int SRID = GEOSGetSRID(geom); - - /* GEOS's 0 is equivalent to our -1 as for SRID values */ - if ( SRID == 0 ) SRID = -1; - - if ( ! hasZ ) - { - if ( want3d ) - { - POSTGIS_DEBUG(3, "Geometry has no Z, won't provide one"); - want3d = 0; - } - } - if ( GEOSisEmpty(geom) ) - { - return (LWGEOM*)lwcollection_construct_empty(SRID, want3d, 0); - } - - switch (type) - { - const GEOSCoordSequence *cs; - POINTARRAY *pa, **ppaa; - const GEOSGeometry *g; - LWGEOM **geoms; - unsigned int i, ngeoms; - - case GEOS_POINT: - POSTGIS_DEBUG(4, "lwgeom_from_geometry: it's a Point"); - - cs = GEOSGeom_getCoordSeq(geom); - pa = ptarray_from_GEOSCoordSeq(cs, want3d); - return (LWGEOM *)lwpoint_construct(SRID, NULL, pa); - - case GEOS_LINESTRING: - case GEOS_LINEARRING: - POSTGIS_DEBUG(4, "lwgeom_from_geometry: it's a LineString or LinearRing"); - - cs = GEOSGeom_getCoordSeq(geom); - pa = ptarray_from_GEOSCoordSeq(cs, want3d); - return (LWGEOM *)lwline_construct(SRID, NULL, pa); - - case GEOS_POLYGON: - POSTGIS_DEBUG(4, "lwgeom_from_geometry: it's a Polygon"); - - ngeoms = GEOSGetNumInteriorRings(geom); - ppaa = lwalloc(sizeof(POINTARRAY *)*(ngeoms+1)); - g = GEOSGetExteriorRing(geom); - cs = GEOSGeom_getCoordSeq(g); - ppaa[0] = ptarray_from_GEOSCoordSeq(cs, want3d); - for (i=0; idims) ) dims = 3; - size = pa->npoints; - - sq = GEOSCoordSeq_create(size, dims); - if ( ! sq ) lwerror("Error creating GEOS Coordinate Sequence"); - - for (i=0; i= 4 - char *wkt; -#endif - - POSTGIS_DEBUGF(4, "LWGEOM2GEOS got a %s", lwgeom_typename(type)); - - if (has_arc(lwgeom)) - { - POSTGIS_DEBUG(3, "LWGEOM2GEOS_c: arced geometry found."); - - lwerror("Exception in LWGEOM2GEOS: curved geometry not supported."); - /* - tmp = lwgeom; - lwgeom = lwgeom_segmentize(tmp, 32); - POSTGIS_DEBUGF(3, "LWGEOM2GEOM_c: was %p, is %p", tmp, lwgeom); - */ - } - type = TYPE_GETTYPE(lwgeom->type); - switch (type) - { - LWPOINT *lwp; - LWPOLY *lwpoly; - LWLINE *lwl; - LWCOLLECTION *lwc; - - case POINTTYPE: - lwp = (LWPOINT *)lwgeom; - sq = ptarray_to_GEOSCoordSeq(lwp->point); - g = GEOSGeom_createPoint(sq); - if ( ! g ) lwerror("Exception in LWGEOM2GEOS"); - break; - case LINETYPE: - lwl = (LWLINE *)lwgeom; - sq = ptarray_to_GEOSCoordSeq(lwl->points); - g = GEOSGeom_createLineString(sq); - if ( ! g ) lwerror("Exception in LWGEOM2GEOS"); - break; - - case POLYGONTYPE: - lwpoly = (LWPOLY *)lwgeom; - sq = ptarray_to_GEOSCoordSeq(lwpoly->rings[0]); - shell = GEOSGeom_createLinearRing(sq); - if ( ! shell ) return NULL; - /*lwerror("LWGEOM2GEOS: exception during polygon shell conversion"); */ - ngeoms = lwpoly->nrings-1; - geoms = malloc(sizeof(GEOSGeom)*ngeoms); - for (i=1; inrings; ++i) - { - sq = ptarray_to_GEOSCoordSeq(lwpoly->rings[i]); - geoms[i-1] = GEOSGeom_createLinearRing(sq); - if ( ! geoms[i-1] ) return NULL; - /*lwerror("LWGEOM2GEOS: exception during polygon hole conversion"); */ - } - g = GEOSGeom_createPolygon(shell, geoms, ngeoms); - if ( ! g ) return NULL; - free(geoms); - break; - case MULTIPOINTTYPE: - case MULTILINETYPE: - case MULTIPOLYGONTYPE: - case COLLECTIONTYPE: - if ( type == MULTIPOINTTYPE ) - geostype = GEOS_MULTIPOINT; - else if ( type == MULTILINETYPE ) - geostype = GEOS_MULTILINESTRING; - else if ( type == MULTIPOLYGONTYPE ) - geostype = GEOS_MULTIPOLYGON; - else - geostype = GEOS_GEOMETRYCOLLECTION; - - lwc = (LWCOLLECTION *)lwgeom; - ngeoms = lwc->ngeoms; - geoms = malloc(sizeof(GEOSGeom)*ngeoms); - - for (i=0; igeoms[i]); - if ( ! geoms[i] ) return NULL; - } - g = GEOSGeom_createCollection(geostype, geoms, ngeoms); - if ( ! g ) return NULL; - free(geoms); - break; - - default: - lwerror("Unknown geometry type: %d", type); - - return NULL; - } - - GEOSSetSRID(g, lwgeom->SRID); - -#if POSTGIS_DEBUG_LEVEL >= 4 - wkt = GEOSGeomToWKT(g); - POSTGIS_DEBUGF(4, "LWGEOM2GEOS: GEOSGeom: %s", wkt); - /* - if(tmp != NULL) lwgeom_release(tmp); - */ - free(wkt); -#endif - - return g; -} - -const GEOSGeometry * -POSTGIS2GEOS(PG_LWGEOM *pglwgeom) +POSTGIS2GEOS(GSERIALIZED *pglwgeom) { - const GEOSGeometry *ret; - LWGEOM *lwgeom = lwgeom_deserialize(SERIALIZED_FORM(pglwgeom)); + GEOSGeometry *ret; + LWGEOM *lwgeom = lwgeom_from_gserialized(pglwgeom); if ( ! lwgeom ) { lwerror("POSTGIS2GEOS: unable to deserialize input"); return NULL; } ret = LWGEOM2GEOS(lwgeom); - lwgeom_release(lwgeom); + lwgeom_free(lwgeom); if ( ! ret ) { - lwerror("POSTGIS2GEOS conversion failed"); + /* lwerror("POSTGIS2GEOS conversion failed"); */ return NULL; } return ret; @@ -3092,36 +3220,25 @@ PG_FUNCTION_INFO_V1(GEOSnoop); Datum GEOSnoop(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom; + GSERIALIZED *geom; GEOSGeometry *geosgeom; - PG_LWGEOM *lwgeom_result; + GSERIALIZED *lwgeom_result; #if POSTGIS_DEBUG_LEVEL > 0 int result; LWGEOM_UNPARSER_RESULT lwg_unparser_result; #endif - initGEOS(lwnotice, lwnotice); + initGEOS(lwnotice, lwgeom_geos_error); - geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); -#if POSTGIS_DEBUG_LEVEL > 0 - result = serialized_lwgeom_to_ewkt(&lwg_unparser_result, SERIALIZED_FORM(geom), PARSER_CHECK_NONE); - POSTGIS_DEBUGF(2, "GEOSnoop: IN: %s", lwg_unparser_result.wkoutput); -#endif geosgeom = (GEOSGeometry *)POSTGIS2GEOS(geom); if ( ! geosgeom ) PG_RETURN_NULL(); - PROFSTART(PROF_GRUN); - PROFSTOP(PROF_GRUN); - - lwgeom_result = GEOS2POSTGIS(geosgeom, TYPE_HASZ(geom->type)); + lwgeom_result = GEOS2POSTGIS(geosgeom, gserialized_has_z(geom)); GEOSGeom_destroy(geosgeom); -#if POSTGIS_DEBUG_LEVEL > 0 - result = serialized_lwgeom_to_ewkt(&lwg_unparser_result, SERIALIZED_FORM(lwgeom_result), PARSER_CHECK_NONE); - POSTGIS_DEBUGF(4, "GEOSnoop: OUT: %s", lwg_unparser_result.wkoutput); -#endif PG_FREE_IF_COPY(geom, 0); @@ -3134,11 +3251,11 @@ Datum datum; ArrayType *array; int is3d = 0; - unsigned int nelems, i; - PG_LWGEOM *result; + uint32 nelems, i; + GSERIALIZED *result; GEOSGeometry *geos_result; const GEOSGeometry **vgeoms; - int SRID=-1; + int srid=SRID_UNKNOWN; size_t offset; #if POSTGIS_DEBUG_LEVEL >= 3 static int call=1; @@ -3162,23 +3279,31 @@ if ( nelems == 0 ) PG_RETURN_NULL(); /* Ok, we really need geos now ;) */ - initGEOS(lwnotice, lwnotice); + initGEOS(lwnotice, lwgeom_geos_error); vgeoms = palloc(sizeof(GEOSGeometry *)*nelems); offset = 0; for (i=0; itype)); - PROFSTOP(PROF_G2P); + result = GEOS2POSTGIS(g3, gserialized_has_z(geom1)); if (result == NULL) { @@ -3262,9 +3385,6 @@ /* compressType(result); */ - PROFSTOP(PROF_QRUN); - PROFREPORT("geos",geom1, NULL, result); - PG_FREE_IF_COPY(geom1, 0); PG_RETURN_POINTER(result); @@ -3275,146 +3395,232 @@ * (Polygon or MultiPolygon). * Actually a wrapper around GEOSpolygonize, * transforming the resulting collection into - * a valid polygonzl Geometry. + * a valid polygon Geometry. */ -PG_FUNCTION_INFO_V1(LWGEOM_buildarea); -Datum LWGEOM_buildarea(PG_FUNCTION_ARGS) +PG_FUNCTION_INFO_V1(ST_BuildArea); +Datum ST_BuildArea(PG_FUNCTION_ARGS) { - int is3d = 0; - unsigned int i, ngeoms; - PG_LWGEOM *result; - LWGEOM *lwg; - GEOSGeometry *geos_result, *shp; - GEOSGeometry const *vgeoms[1]; - int SRID=-1; -#if POSTGIS_DEBUG_LEVEL >= 3 - static int call=1; -#endif + GSERIALIZED *result; + GSERIALIZED *geom; + LWGEOM *lwgeom_in, *lwgeom_out; - PG_LWGEOM *geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + geom = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + lwgeom_in = lwgeom_from_gserialized(geom); -#if POSTGIS_DEBUG_LEVEL >= 3 - call++; - lwnotice("buildarea called (call %d)", call); -#endif + lwgeom_out = lwgeom_buildarea(lwgeom_in); + lwgeom_free(lwgeom_in) ; + + if ( ! lwgeom_out ) { + PG_FREE_IF_COPY(geom, 0); + PG_RETURN_NULL(); + } - SRID = pglwgeom_getSRID(geom); - is3d = TYPE_HASZ(geom->type); + result = geometry_serialize(lwgeom_out) ; + lwgeom_free(lwgeom_out) ; - POSTGIS_DEBUGF(3, "LWGEOM_buildarea got geom @ %p", geom); + PG_FREE_IF_COPY(geom, 0); + PG_RETURN_POINTER(result); +} - initGEOS(lwnotice, lwnotice); +/* + * ST_Snap + * + * Snap a geometry to another with a given tolerance + */ +Datum ST_Snap(PG_FUNCTION_ARGS); +PG_FUNCTION_INFO_V1(ST_Snap); +Datum ST_Snap(PG_FUNCTION_ARGS) +{ +#if POSTGIS_GEOS_VERSION < 33 + lwerror("The GEOS version this PostGIS binary " + "was compiled against (%d) doesn't support " + "'ST_Snap' function (3.3.0+ required)", + POSTGIS_GEOS_VERSION); + PG_RETURN_NULL(); +#else /* POSTGIS_GEOS_VERSION >= 33 */ + GSERIALIZED *geom1, *geom2, *result; + LWGEOM *lwgeom1, *lwgeom2, *lwresult; + double tolerance; + + geom1 = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + geom2 = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + tolerance = PG_GETARG_FLOAT8(2); + + lwgeom1 = lwgeom_from_gserialized(geom1); + lwgeom2 = lwgeom_from_gserialized(geom2); + + lwresult = lwgeom_snap(lwgeom1, lwgeom2, tolerance); + lwgeom_free(lwgeom1); + lwgeom_free(lwgeom2); + PG_FREE_IF_COPY(geom1, 0); + PG_FREE_IF_COPY(geom2, 1); - vgeoms[0] = (const GEOSGeometry *)POSTGIS2GEOS(geom); - geos_result = GEOSPolygonize(vgeoms, 1); - GEOSGeom_destroy((GEOSGeometry *)vgeoms[0]); + result = geometry_serialize(lwresult); + lwgeom_free(lwresult); - POSTGIS_DEBUGF(3, "GEOSpolygonize returned @ %p", geos_result); + PG_RETURN_POINTER(result); - /* Null return from GEOSpolygonize */ - if ( ! geos_result ) PG_RETURN_NULL(); +#endif /* POSTGIS_GEOS_VERSION >= 33 */ - /* - * We should now have a collection - */ -#if PARANOIA_LEVEL > 0 - if ( GEOSGeometryTypeId(geos_result) != COLLECTIONTYPE ) +} + +/* + * ST_Split + * + * Split polygon by line, line by line, line by point. + * Returns at most components as a collection. + * First element of the collection is always the part which + * remains after the cut, while the second element is the + * part which has been cut out. We arbitrarely take the part + * on the *right* of cut lines as the part which has been cut out. + * For a line cut by a point the part which remains is the one + * from start of the line to the cut point. + * + * + * Author: Sandro Santilli + * + * Work done for Faunalia (http://www.faunalia.it) with fundings + * from Regione Toscana - Sistema Informativo per il Governo + * del Territorio e dell'Ambiente (RT-SIGTA). + * + * Thanks to the PostGIS community for sharing poly/line ideas [1] + * + * [1] http://trac.osgeo.org/postgis/wiki/UsersWikiSplitPolygonWithLineString + * + */ +Datum ST_Split(PG_FUNCTION_ARGS); +PG_FUNCTION_INFO_V1(ST_Split); +Datum ST_Split(PG_FUNCTION_ARGS) +{ + GSERIALIZED *in, *blade_in, *out; + LWGEOM *lwgeom_in, *lwblade_in, *lwgeom_out; + + in = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + lwgeom_in = lwgeom_from_gserialized(in); + + blade_in = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + lwblade_in = lwgeom_from_gserialized(blade_in); + + error_if_srid_mismatch(lwgeom_in->srid, lwblade_in->srid); + + lwgeom_out = lwgeom_split(lwgeom_in, lwblade_in); + lwgeom_free(lwgeom_in); + lwgeom_free(lwblade_in); + + if ( ! lwgeom_out ) { - GEOSGeom_destroy(geos_result); - lwerror("Unexpected return from GEOSpolygonize"); + PG_FREE_IF_COPY(in, 0); /* possibly referenced by lwgeom_out */ + PG_FREE_IF_COPY(blade_in, 1); PG_RETURN_NULL(); } -#endif - ngeoms = GEOSGetNumGeometries(geos_result); + out = geometry_serialize(lwgeom_out); + lwgeom_free(lwgeom_out); + PG_FREE_IF_COPY(in, 0); /* possibly referenced by lwgeom_out */ + PG_FREE_IF_COPY(blade_in, 1); + + PG_RETURN_POINTER(out); +} - POSTGIS_DEBUGF(3, "GEOSpolygonize: ngeoms in polygonize output: %d", ngeoms); +/********************************************************************** + * + * ST_SharedPaths + * + * Return the set of paths shared between two linear geometries, + * and their direction (same or opposite). + * + * Developed by Sandro Santilli (strk@keybit.net) for Faunalia + * (http://www.faunalia.it) with funding from Regione Toscana - Sistema + * Informativo per la Gestione del Territorio e dell' Ambiente + * [RT-SIGTA]". For the project: "Sviluppo strumenti software per il + * trattamento di dati geografici basati su QuantumGIS e Postgis (CIG + * 0494241492)" + * + **********************************************************************/ +Datum ST_SharedPaths(PG_FUNCTION_ARGS); +PG_FUNCTION_INFO_V1(ST_SharedPaths); +Datum ST_SharedPaths(PG_FUNCTION_ARGS) +{ +#if POSTGIS_GEOS_VERSION < 33 + lwerror("The GEOS version this PostGIS binary " + "was compiled against (%d) doesn't support " + "'ST_SharedPaths' function (3.3.0+ required)", + POSTGIS_GEOS_VERSION); + PG_RETURN_NULL(); +#else /* POSTGIS_GEOS_VERSION >= 33 */ + GSERIALIZED *geom1, *geom2, *out; + LWGEOM *g1, *g2, *lwgeom_out; + + geom1 = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + geom2 = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + + g1 = lwgeom_from_gserialized(geom1); + g2 = lwgeom_from_gserialized(geom2); + + lwgeom_out = lwgeom_sharedpaths(g1, g2); + lwgeom_free(g1); + lwgeom_free(g2); - /* - * No geometries in collection, return NULL - */ - if ( ngeoms == 0 ) + if ( ! lwgeom_out ) { - GEOSGeom_destroy(geos_result); + PG_FREE_IF_COPY(geom1, 0); + PG_FREE_IF_COPY(geom2, 1); PG_RETURN_NULL(); } - /* - * Return first geometry if we only have one in collection, - * to avoid the unnecessary Geometry clone below. - */ - if ( ngeoms == 1 ) - { - shp = (GEOSGeometry *)GEOSGetGeometryN(geos_result, 0); - lwg = GEOS2LWGEOM(shp, is3d); - lwg->SRID = SRID; - result = pglwgeom_serialize(lwg); - lwgeom_release(lwg); - GEOSGeom_destroy(geos_result); - PG_RETURN_POINTER(result); - } + out = geometry_serialize(lwgeom_out); + lwgeom_free(lwgeom_out); - /* - * Iteratively invoke symdifference on outer rings - * as suggested by Carl Anderson: - * postgis-devel/2005-December/001805.html - */ - shp = NULL; - for (i=0; i= 33 */ - if ( extring == NULL ) /* exception */ - { - lwerror("GEOSCreatePolygon threw an exception"); - PG_RETURN_NULL(); - } +} - if ( shp == NULL ) - { - shp = extring; - } - else - { - tmp = GEOSSymDifference(shp, extring); - GEOSGeom_destroy(shp); - GEOSGeom_destroy(extring); - shp = tmp; - } - } - GEOSGeom_destroy(geos_result); +/********************************************************************** + * + * ST_Node + * + * Fully node a set of lines using the least possible nodes while + * preserving all of the input ones. + * + **********************************************************************/ +Datum ST_Node(PG_FUNCTION_ARGS); +PG_FUNCTION_INFO_V1(ST_Node); +Datum ST_Node(PG_FUNCTION_ARGS) +{ +#if POSTGIS_GEOS_VERSION < 33 + lwerror("The GEOS version this PostGIS binary " + "was compiled against (%d) doesn't support " + "'ST_Node' function (3.3.0+ required)", + POSTGIS_GEOS_VERSION); + PG_RETURN_NULL(); +#else /* POSTGIS_GEOS_VERSION >= 33 */ + GSERIALIZED *geom1, *out; + LWGEOM *g1, *lwgeom_out; - GEOSSetSRID(shp, SRID); - result = GEOS2POSTGIS(shp, is3d); - GEOSGeom_destroy(shp); + geom1 = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); -#if PARANOIA_LEVEL > 0 - if ( result == NULL ) + g1 = lwgeom_from_gserialized(geom1); + + lwgeom_out = lwgeom_node(g1); + lwgeom_free(g1); + + if ( ! lwgeom_out ) { - lwerror("serialization error"); - PG_RETURN_NULL(); /*never get here */ + PG_FREE_IF_COPY(geom1, 0); + PG_RETURN_NULL(); } -#endif + out = geometry_serialize(lwgeom_out); + lwgeom_free(lwgeom_out); - PG_RETURN_POINTER(result); + PG_FREE_IF_COPY(geom1, 0); + PG_RETURN_POINTER(out); -} +#endif /* POSTGIS_GEOS_VERSION >= 33 */ +} diff -Nru postgis-1.5.3/postgis/lwgeom_geos.h postgis-2.0.1/postgis/lwgeom_geos.h --- postgis-1.5.3/postgis/lwgeom_geos.h 2009-06-11 16:44:03.000000000 +0000 +++ postgis-2.0.1/postgis/lwgeom_geos.h 2012-02-27 22:08:12.000000000 +0000 @@ -1,8 +1,8 @@ /********************************************************************** - * $Id: lwgeom_geos.h 4168 2009-06-11 16:44:03Z pramsey $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net + * * Copyright 2008 Paul Ramsey * * This is free software; you can redistribute and/or modify it under @@ -10,44 +10,20 @@ * **********************************************************************/ -#include "postgres.h" -#include "fmgr.h" -#include "miscadmin.h" -#include "utils/array.h" -#include "utils/builtins.h" -#include "utils/hsearch.h" -#include "utils/memutils.h" -#include "executor/spi.h" - -#include "../postgis_config.h" - -/* Workaround for GEOS 2.2 compatibility: old geos_c.h does not contain - header guards to protect from multiple inclusion */ -#ifndef GEOS_C_INCLUDED -#define GEOS_C_INCLUDED -#include "geos_c.h" -#endif - -#include "lwgeom_pg.h" -#include "liblwgeom.h" -#include "profile.h" - -#include - -#if POSTGIS_PROFILE > 0 -#warning POSTGIS_PROFILE enabled! -#endif +#ifndef LWGEOM_GEOS_H_ +#define LWGEOM_GEOS_H_ 1 + +#include "../liblwgeom/lwgeom_geos.h" /* for GEOSGeom */ +#include "liblwgeom.h" /* for GSERIALIZED */ /* ** Public prototypes for GEOS utility functions. */ -PG_LWGEOM *GEOS2POSTGIS(GEOSGeom geom, char want3d); -const GEOSGeometry * POSTGIS2GEOS(PG_LWGEOM *g); +GSERIALIZED *GEOS2POSTGIS(GEOSGeom geom, char want3d); +GEOSGeometry * POSTGIS2GEOS(GSERIALIZED *g); -LWGEOM *GEOS2LWGEOM(const GEOSGeometry *geom, char want3d); -GEOSGeometry * LWGEOM2GEOS(LWGEOM *g); -POINTARRAY *ptarray_from_GEOSCoordSeq(const GEOSCoordSequence *cs, char want3d); -void errorIfGeometryCollection(PG_LWGEOM *g1, PG_LWGEOM *g2); +void errorIfGeometryCollection(GSERIALIZED *g1, GSERIALIZED *g2); +#endif /* LWGEOM_GEOS_H_ 1 */ diff -Nru postgis-1.5.3/postgis/lwgeom_geos_clean.c postgis-2.0.1/postgis/lwgeom_geos_clean.c --- postgis-1.5.3/postgis/lwgeom_geos_clean.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/postgis/lwgeom_geos_clean.c 2012-03-27 14:32:33.000000000 +0000 @@ -0,0 +1,181 @@ +/********************************************************************** + * $Id: lwgeom_geos.c 5258 2010-02-17 21:02:49Z strk $ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * + * Copyright 2009-2010 Sandro Santilli + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + ********************************************************************** + * + * ST_MakeValid + * + * Attempts to make an invalid geometries valid w/out losing + * points. + * + * Polygons may become lines or points or a collection of + * polygons lines and points (collapsed ring cases). + * + * Author: Sandro Santilli + * + * Work done for Faunalia (http://www.faunalia.it) with fundings + * from Regione Toscana - Sistema Informativo per il Governo + * del Territorio e dell'Ambiente (RT-SIGTA). + * + * Thanks to Dr. Horst Duester for previous work on a plpgsql version + * of the cleanup logic [1] + * + * Thanks to Andrea Peri for recommandations on constraints. + * + * [1] http://www.sogis1.so.ch/sogis/dl/postgis/cleanGeometry.sql + * + * + **********************************************************************/ + +#include "postgres.h" +#include "fmgr.h" +#include "funcapi.h" + +#include "../postgis_config.h" +#include "lwgeom_geos.h" +#include "liblwgeom.h" +#include "liblwgeom_internal.h" +#include "lwgeom_pg.h" + +#include +#include + +/* #define POSTGIS_DEBUG_LEVEL 4 */ + +Datum ST_MakeValid(PG_FUNCTION_ARGS); +PG_FUNCTION_INFO_V1(ST_MakeValid); +Datum ST_MakeValid(PG_FUNCTION_ARGS) +{ +#if POSTGIS_GEOS_VERSION < 33 + elog(ERROR, "You need GEOS-3.3.0 or up for ST_MakeValid"); + PG_RETURN_NULL(); +#else /* POSTGIS_GEOS_VERSION >= 33 */ + + GSERIALIZED *in, *out; + LWGEOM *lwgeom_in, *lwgeom_out; + + in = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + lwgeom_in = lwgeom_from_gserialized(in); + + switch ( lwgeom_in->type ) + { + case POINTTYPE: + case LINETYPE: + case POLYGONTYPE: + case MULTILINETYPE: + case MULTIPOLYGONTYPE: + break; + + default: + lwerror("ST_MakeValid: unsupported geometry type %s", + lwtype_name(lwgeom_in->type)); + PG_RETURN_NULL(); + break; + } + + lwgeom_out = lwgeom_make_valid(lwgeom_in); + if ( ! lwgeom_out ) + { + PG_FREE_IF_COPY(in, 0); + PG_RETURN_NULL(); + } + + out = geometry_serialize(lwgeom_out); + + PG_RETURN_POINTER(out); +#endif /* POSTGIS_GEOS_VERSION >= 33 */ +} + +#if POSTGIS_GEOS_VERSION >= 33 + +/* Uses GEOS internally */ +static LWGEOM* lwgeom_clean(LWGEOM* lwgeom_in); +static LWGEOM* +lwgeom_clean(LWGEOM* lwgeom_in) +{ + LWGEOM* lwgeom_out; + + lwgeom_out = lwgeom_make_valid(lwgeom_in); + if ( ! lwgeom_out ) + { + return NULL; + } + + /* Check dimensionality is the same as input */ + if ( lwgeom_dimensionality(lwgeom_in) != lwgeom_dimensionality(lwgeom_out) ) + { + lwnotice("lwgeom_clean: dimensional collapse (%d to %d)", + lwgeom_dimensionality(lwgeom_in), lwgeom_dimensionality(lwgeom_out)); + + return NULL; + } + + /* Check that the output is not a collection if the input wasn't */ + if ( lwgeom_out->type == COLLECTIONTYPE && + lwgeom_in->type != COLLECTIONTYPE ) + { + lwnotice("lwgeom_clean: mixed-type output (%s) " + "from single-type input (%s)", + lwtype_name(lwgeom_out->type), + lwtype_name(lwgeom_in->type)); + return NULL; + } + + /* Force right-hand-rule (will only affect polygons) */ + /* gout := ST_ForceRHR(gout); */ + + /* Remove repeated duplicated points ? */ + /* gout = ST_RemoveRepeatedPoints(gout); */ + + return lwgeom_out; +} + +#endif /* POSTGIS_GEOS_VERSION >= 33 */ + + +Datum ST_CleanGeometry(PG_FUNCTION_ARGS); +PG_FUNCTION_INFO_V1(ST_CleanGeometry); +Datum ST_CleanGeometry(PG_FUNCTION_ARGS) +{ +#if POSTGIS_GEOS_VERSION < 33 + elog(ERROR, "You need GEOS-3.3.0 or up for ST_CleanGeometry"); + PG_RETURN_NULL(); +#else /* POSTGIS_GEOS_VERSION >= 33 */ + + GSERIALIZED *in, *out; + LWGEOM *lwgeom_in, *lwgeom_out; + + in = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + lwgeom_in = lwgeom_from_gserialized(in); + + /* Short-circuit: empty geometry are the cleanest ! */ +#if 0 + if ( lwgeom_is_empty(lwgeom_in) ) + { + out = geometry_serialize(lwgeom_in); + PG_FREE_IF_COPY(in, 0); + PG_RETURN_POINTER(out); + } +#endif + + lwgeom_out = lwgeom_clean(lwgeom_in); + if ( ! lwgeom_out ) + { + PG_FREE_IF_COPY(in, 0); + PG_RETURN_NULL(); + } + + out = geometry_serialize(lwgeom_out); + PG_RETURN_POINTER(out); + +#endif /* POSTGIS_GEOS_VERSION >= 33 */ +} + diff -Nru postgis-1.5.3/postgis/lwgeom_geos_prepared.c postgis-2.0.1/postgis/lwgeom_geos_prepared.c --- postgis-1.5.3/postgis/lwgeom_geos_prepared.c 2010-02-01 17:35:55.000000000 +0000 +++ postgis-2.0.1/postgis/lwgeom_geos_prepared.c 2012-05-17 13:36:44.000000000 +0000 @@ -1,17 +1,22 @@ /********************************************************************** - * $Id: lwgeom_geos_prepared.c 5181 2010-02-01 17:35:55Z pramsey $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net - * Copyright 2007 Refractions Research Inc. - * Copyright 2008 Paul Ramsey + * + * Copyright (C) 2012 Sandro Santilli + * Copyright (C) 2008 Paul Ramsey + * Copyright (C) 2007 Refractions Research Inc. * * This is free software; you can redistribute and/or modify it under * the terms of the GNU General Public Licence. See the COPYING file. * **********************************************************************/ +#include + +#include "../postgis_config.h" #include "lwgeom_geos_prepared.h" +#include "lwgeom_cache.h" /*********************************************************************** ** @@ -48,8 +53,6 @@ ** **/ -#ifdef PREPARED_GEOM - /* ** Backend prepared hash table ** @@ -272,25 +275,25 @@ ** cycling keys don't cause too much preparing. */ PrepGeomCache* -GetPrepGeomCache(FunctionCallInfoData *fcinfo, PG_LWGEOM *pg_geom1, PG_LWGEOM *pg_geom2) +GetPrepGeomCache(FunctionCallInfoData *fcinfo, GSERIALIZED *pg_geom1, GSERIALIZED *pg_geom2) { MemoryContext old_context; - PrepGeomCache* cache = fcinfo->flinfo->fn_extra; + GeomCache* supercache = GetGeomCache(fcinfo); + PrepGeomCache* cache = supercache->prep; int copy_keys = 1; size_t pg_geom1_size = 0; size_t pg_geom2_size = 0; - /* Make sure this isn't someone else's cache object. */ - if ( cache && cache->type != 2 ) cache = NULL; + assert ( ! cache || cache->type == 2 ); if (!PrepGeomHash) CreatePrepGeomHash(); if ( pg_geom1 ) - pg_geom1_size = VARSIZE(pg_geom1) + VARHDRSZ; + pg_geom1_size = VARSIZE(pg_geom1); if ( pg_geom2 ) - pg_geom2_size = VARSIZE(pg_geom2) + VARHDRSZ; + pg_geom2_size = VARSIZE(pg_geom2); if ( cache == NULL) { @@ -326,7 +329,7 @@ pghe.prepared_geom = 0; AddPrepGeomHashEntry( pghe ); - fcinfo->flinfo->fn_extra = cache; + supercache->prep = cache; POSTGIS_DEBUGF(3, "GetPrepGeomCache: adding context to hash: %p", cache); } @@ -450,235 +453,4 @@ return cache; } -#endif /* PREPARED_GEOM */ - - - -#if 0 -/* -** No longer directly called. Left as example for now. -** Functionality directly embedded in contains() -*/ -PG_FUNCTION_INFO_V1(containsPrepared); -Datum containsPrepared(PG_FUNCTION_ARGS) -{ -#ifndef PREPARED_GEOM - elog(ERROR,"Not implemented in this version!"); - PG_RETURN_NULL(); -#else - PG_LWGEOM * geom1; - PG_LWGEOM * geom2; - bool result; - BOX2DFLOAT4 box1, box2; - PrepGeomCache * prep_cache; - int32 key1; - - geom1 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - geom2 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - key1 = PG_GETARG_INT32(2); - - errorIfGeometryCollection(geom1,geom2); - errorIfSRIDMismatch(pglwgeom_getSRID(geom1), pglwgeom_getSRID(geom2)); - - POSTGIS_DEBUG(3, "containsPrepared: entered function"); - - /* - * short-circuit: if geom2 bounding box is not completely inside - * geom1 bounding box we can prematurely return FALSE. - * Do the test IFF BOUNDING BOX AVAILABLE. - */ - if ( getbox2d_p(SERIALIZED_FORM(geom1), &box1) && - getbox2d_p(SERIALIZED_FORM(geom2), &box2) ) - { - if (( box2.xmin < box1.xmin ) || ( box2.xmax > box1.xmax ) || - ( box2.ymin < box1.ymin ) || ( box2.ymax > box1.ymax )) - PG_RETURN_BOOL(FALSE); - } - - prep_cache = GetPrepGeomCache( fcinfo, geom1, 0 ); - - initGEOS(lwnotice, lwnotice); - - if ( prep_cache && prep_cache->prepared_geom && prep_cache->argnum == 1 ) - { - GEOSGeom g = POSTGIS2GEOS(geom2); - POSTGIS_DEBUG(4, "containsPrepared: cache is live, running preparedcontains"); - result = GEOSPreparedContains( prep_cache->prepared_geom, g); - GEOSGeom_destroy(g); - } - else - { - GEOSGeom g1 = POSTGIS2GEOS(geom1); - GEOSGeom g2 = POSTGIS2GEOS(geom2); - POSTGIS_DEBUG(4, "containsPrepared: cache is not ready, running standard contains"); - result = GEOSContains( g1, g2); - GEOSGeom_destroy(g1); - GEOSGeom_destroy(g2); - } - - if (result == 2) - { - elog(ERROR,"GEOS contains() threw an error!"); - PG_RETURN_NULL(); /* never get here */ - } - - PG_FREE_IF_COPY(geom1, 0); - PG_FREE_IF_COPY(geom2, 1); - - PG_RETURN_BOOL(result); -#endif /* PREPARED_GEOM */ -} - - -/* -** No longer directly called. Left as example for now. -** Functionality directly embedded in covers() -*/ -PG_FUNCTION_INFO_V1(coversPrepared); -Datum coversPrepared(PG_FUNCTION_ARGS) -{ -#ifndef PREPARED_GEOM - elog(ERROR,"Not implemented in this version!"); - PG_RETURN_NULL(); /* never get here */ -#else - PG_LWGEOM * geom1; - PG_LWGEOM * geom2; - bool result; - BOX2DFLOAT4 box1, box2; - PrepGeomCache * prep_cache; - int32 key1; - - geom1 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - geom2 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - key1 = PG_GETARG_INT32(2); - - errorIfGeometryCollection(geom1,geom2); - errorIfSRIDMismatch(pglwgeom_getSRID(geom1), pglwgeom_getSRID(geom2)); - - /* - * short-circuit: if geom2 bounding box is not completely inside - * geom1 bounding box we can prematurely return FALSE. - * Do the test IFF BOUNDING BOX AVAILABLE. - */ - if ( getbox2d_p(SERIALIZED_FORM(geom1), &box1) && - getbox2d_p(SERIALIZED_FORM(geom2), &box2) ) - { - if (( box2.xmin < box1.xmin ) || ( box2.xmax > box1.xmax ) || - ( box2.ymin < box1.ymin ) || ( box2.ymax > box1.ymax )) - PG_RETURN_BOOL(FALSE); - } - - prep_cache = GetPrepGeomCache( fcinfo, geom1, 0 ); - - initGEOS(lwnotice, lwnotice); - - if ( prep_cache && prep_cache->prepared_geom && prep_cache->argnum == 1 ) - { - GEOSGeom g = POSTGIS2GEOS(geom2); - result = GEOSPreparedCovers( prep_cache->prepared_geom, g); - GEOSGeom_destroy(g); - } - else - { - GEOSGeom g1 = POSTGIS2GEOS(geom1); - GEOSGeom g2 = POSTGIS2GEOS(geom2); - result = GEOSRelatePattern( g1, g2, "******FF*" ); - GEOSGeom_destroy(g1); - GEOSGeom_destroy(g2); - } - - if (result == 2) - { - elog(ERROR,"GEOS contains() threw an error!"); - PG_RETURN_NULL(); /* never get here */ - } - - PG_FREE_IF_COPY(geom1, 0); - PG_FREE_IF_COPY(geom2, 1); - - PG_RETURN_BOOL(result); -#endif /* PREPARED_GEOM */ -} - - -/* -** No longer directly called. Left as example for now. -** Functionality directly embedded in intersects() -*/ -PG_FUNCTION_INFO_V1(intersectsPrepared); -Datum intersectsPrepared(PG_FUNCTION_ARGS) -{ -#ifndef PREPARED_GEOM - elog(ERROR,"Not implemented in this version!"); - PG_RETURN_NULL(); /* never get here */ -#else - PG_LWGEOM * geom1; - PG_LWGEOM * geom2; - bool result; - BOX2DFLOAT4 box1, box2; - PrepGeomCache * prep_cache; - int32 key1, key2; - - geom1 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - geom2 = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - key1 = PG_GETARG_INT32(2); - key2 = PG_GETARG_INT32(3); - - errorIfGeometryCollection(geom1,geom2); - errorIfSRIDMismatch(pglwgeom_getSRID(geom1), pglwgeom_getSRID(geom2)); - - /* - * short-circuit 1: if geom2 bounding box does not overlap - * geom1 bounding box we can prematurely return FALSE. - * Do the test IFF BOUNDING BOX AVAILABLE. - */ - if ( getbox2d_p(SERIALIZED_FORM(geom1), &box1) && - getbox2d_p(SERIALIZED_FORM(geom2), &box2) ) - { - if (( box2.xmax < box1.xmin ) || ( box2.xmin > box1.xmax ) || - ( box2.ymax < box1.ymin ) || ( box2.ymin > box1.ymax )) - PG_RETURN_BOOL(FALSE); - } - - prep_cache = GetPrepGeomCache( fcinfo, geom1, geom2 ); - - initGEOS(lwnotice, lwnotice); - - if ( prep_cache && prep_cache->prepared_geom ) - { - if ( prep_cache->argnum == 1 ) - { - GEOSGeom g = POSTGIS2GEOS(geom2); - result = GEOSPreparedIntersects( prep_cache->prepared_geom, g); - GEOSGeom_destroy(g); - } - else - { - GEOSGeom g = POSTGIS2GEOS(geom1); - result = GEOSPreparedIntersects( prep_cache->prepared_geom, g); - GEOSGeom_destroy(g); - } - } - else - { - GEOSGeom g1 = POSTGIS2GEOS(geom1); - GEOSGeom g2 = POSTGIS2GEOS(geom2); - result = GEOSIntersects( g1, g2); - GEOSGeom_destroy(g1); - GEOSGeom_destroy(g2); - } - - if (result == 2) - { - elog(ERROR,"GEOS contains() threw an error!"); - PG_RETURN_NULL(); /* never get here */ - } - - PG_FREE_IF_COPY(geom1, 0); - PG_FREE_IF_COPY(geom2, 1); - - PG_RETURN_BOOL(result); -#endif /* PREPARED_GEOM */ -} -#endif /* 0 */ diff -Nru postgis-1.5.3/postgis/lwgeom_geos_prepared.h postgis-2.0.1/postgis/lwgeom_geos_prepared.h --- postgis-1.5.3/postgis/lwgeom_geos_prepared.h 2010-01-15 17:54:52.000000000 +0000 +++ postgis-2.0.1/postgis/lwgeom_geos_prepared.h 2012-02-27 22:08:12.000000000 +0000 @@ -1,5 +1,5 @@ /********************************************************************** - * $Id: lwgeom_geos_prepared.h 5129 2010-01-15 17:54:52Z pramsey $ + * $Id: lwgeom_geos_prepared.h 9324 2012-02-27 22:08:12Z pramsey $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net @@ -10,6 +10,9 @@ * **********************************************************************/ +#ifndef LWGEOM_GEOS_PREPARED_H_ +#define LWGEOM_GEOS_PREPARED_H_ 1 + #include "postgres.h" #include "fmgr.h" #include "miscadmin.h" @@ -17,26 +20,12 @@ #include "utils/memutils.h" #include "access/hash.h" -#include "../postgis_config.h" - -/* Workaround for GEOS 2.2 compatibility: old geos_c.h does not contain - header guards to protect from multiple inclusion */ -#ifndef GEOS_C_INCLUDED -#define GEOS_C_INCLUDED -#include "geos_c.h" -#endif - #include "lwgeom_pg.h" #include "liblwgeom.h" #include "lwgeom_geos.h" /* -** GEOS prepared geometry is only available from GEOS 3.1 onwards -*/ -#define PREPARED_GEOM - -/* -** Cache structure. We use PG_LWGEOM as keys so no transformations +** Cache structure. We use GSERIALIZED as keys so no transformations ** are needed before we memcmp them with other keys. We store the ** size to avoid having to calculate the size every time. ** The argnum gives the number of function arguments we are caching. @@ -45,12 +34,11 @@ ** Both the Geometry and the PreparedGeometry have to be cached, ** because the PreparedGeometry contains a reference to the geometry. */ -#ifdef PREPARED_GEOM typedef struct { char type; - PG_LWGEOM *pg_geom1; - PG_LWGEOM *pg_geom2; + GSERIALIZED *pg_geom1; + GSERIALIZED *pg_geom2; size_t pg_geom1_size; size_t pg_geom2_size; int32 argnum; @@ -68,8 +56,6 @@ ** If you are only caching one argument (e.g., in contains) supply 0 as the ** value for pg_geom2. */ -PrepGeomCache *GetPrepGeomCache(FunctionCallInfoData *fcinfo, PG_LWGEOM *pg_geom1, PG_LWGEOM *pg_geom2); - - -#endif /* PREPARED_GEOM */ +PrepGeomCache *GetPrepGeomCache(FunctionCallInfoData *fcinfo, GSERIALIZED *pg_geom1, GSERIALIZED *pg_geom2); +#endif /* LWGEOM_GEOS_PREPARED_H_ 1 */ diff -Nru postgis-1.5.3/postgis/lwgeom_geos_relatematch.c postgis-2.0.1/postgis/lwgeom_geos_relatematch.c --- postgis-1.5.3/postgis/lwgeom_geos_relatematch.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/postgis/lwgeom_geos_relatematch.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,80 @@ +/********************************************************************** + * $Id: lwgeom_geos.c 5258 2010-02-17 21:02:49Z strk $ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * + * Copyright (C) 2010 Sandro Santilli + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + ********************************************************************** + * + * ST_RelateMatch + * + * DE9 Intersection Matrix pattern matching + * + * Developed by Sandro Santilli (strk@keybit.net) for Faunalia + * (http://www.faunalia.it) with funding from Regione Toscana - Sistema + * Informativo per la Gestione del Territorio e dell' Ambiente + * [RT-SIGTA]". For the project: "Sviluppo strumenti software per il + * trattamento di dati geografici basati su QuantumGIS e Postgis (CIG + * 0494241492)" + * + **********************************************************************/ + +#include "postgres.h" +#include "fmgr.h" +#include "funcapi.h" + +#include "../postgis_config.h" +#include "lwgeom_geos.h" +#include "lwgeom_pg.h" + +#include +#include + +/* #define POSTGIS_DEBUG_LEVEL 4 */ + +Datum ST_RelateMatch(PG_FUNCTION_ARGS); +PG_FUNCTION_INFO_V1(ST_RelateMatch); +Datum ST_RelateMatch(PG_FUNCTION_ARGS) +{ +#if POSTGIS_GEOS_VERSION < 33 + lwerror("The GEOS version this postgis binary " + "was compiled against (%d) doesn't support " + "'ST_RelateMatch' function (3.3.0+ required)", + POSTGIS_GEOS_VERSION); + PG_RETURN_NULL(); +#else /* POSTGIS_GEOS_VERSION >= 33 */ + + char *mat, *pat; + text *mat_text, *pat_text; + int result; + + /* Read the arguments */ + mat_text = (PG_GETARG_TEXT_P(0)); + pat_text = (PG_GETARG_TEXT_P(1)); + + /* Convert from text to cstring */ + mat = text2cstring(mat_text); + pat = text2cstring(pat_text); + + initGEOS(lwnotice, lwgeom_geos_error); + + result = GEOSRelatePatternMatch(mat, pat); + if (result == 2) + { + lwfree(mat); lwfree(pat); + lwerror("GEOSRelatePatternMatch: %s", lwgeom_geos_errmsg); + PG_RETURN_NULL(); + } + + lwfree(mat); lwfree(pat); + PG_RETURN_BOOL(result); + +#endif /* POSTGIS_GEOS_VERSION >= 33 */ + +} + diff -Nru postgis-1.5.3/postgis/lwgeom_gist.c postgis-2.0.1/postgis/lwgeom_gist.c --- postgis-1.5.3/postgis/lwgeom_gist.c 2010-02-01 17:35:55.000000000 +0000 +++ postgis-2.0.1/postgis/lwgeom_gist.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,1296 +0,0 @@ -#include "postgres.h" -#include "access/gist.h" -#include "access/itup.h" -#include "access/skey.h" - -#include "fmgr.h" -#include "utils/elog.h" - -#include "../postgis_config.h" -#include "liblwgeom.h" - -#include "lwgeom_pg.h" - -#include -#if HAVE_IEEEFP_H -#include -#endif -#include -#include -#include -#include - - -/** - * @file implementation GiST support and basic LWGEOM operations (like &&) - */ - - - -Datum LWGEOM_overlap(PG_FUNCTION_ARGS); -Datum LWGEOM_overleft(PG_FUNCTION_ARGS); -Datum LWGEOM_left(PG_FUNCTION_ARGS); -Datum LWGEOM_right(PG_FUNCTION_ARGS); -Datum LWGEOM_overright(PG_FUNCTION_ARGS); -Datum LWGEOM_overbelow(PG_FUNCTION_ARGS); -Datum LWGEOM_below(PG_FUNCTION_ARGS); -Datum LWGEOM_above(PG_FUNCTION_ARGS); -Datum LWGEOM_overabove(PG_FUNCTION_ARGS); -Datum LWGEOM_contained(PG_FUNCTION_ARGS); -Datum LWGEOM_samebox(PG_FUNCTION_ARGS); -Datum LWGEOM_contain(PG_FUNCTION_ARGS); -Datum LWGEOM_gist_compress(PG_FUNCTION_ARGS); -Datum LWGEOM_gist_consistent(PG_FUNCTION_ARGS); -Datum LWGEOM_gist_decompress(PG_FUNCTION_ARGS); -Datum LWGEOM_gist_union(PG_FUNCTION_ARGS); -Datum LWGEOM_gist_penalty(PG_FUNCTION_ARGS); -Datum LWGEOM_gist_same(PG_FUNCTION_ARGS); -Datum LWGEOM_gist_picksplit(PG_FUNCTION_ARGS); - - - -static float size_box2d(Datum box); - -static bool lwgeom_rtree_internal_consistent(BOX2DFLOAT4 *key, BOX2DFLOAT4 *query, StrategyNumber strategy); -static bool lwgeom_rtree_leaf_consistent(BOX2DFLOAT4 *key,BOX2DFLOAT4 *query, StrategyNumber strategy); - - - -/* for debugging */ -static int counter_leaf = 0; -static int counter_intern = 0; - - -/** GiST strategies (modified from src/include/access/rtree.h) */ -#define RTLeftStrategyNumber 1 -#define RTOverLeftStrategyNumber 2 -#define RTOverlapStrategyNumber 3 -#define RTOverRightStrategyNumber 4 -#define RTRightStrategyNumber 5 -#define RTSameStrategyNumber 6 -#define RTContainsStrategyNumber 7 -#define RTContainedByStrategyNumber 8 -#define RTOverBelowStrategyNumber 9 -#define RTBelowStrategyNumber 10 -#define RTAboveStrategyNumber 11 -#define RTOverAboveStrategyNumber 12 - - -/** - * all the lwgeom_ - * work the same. - * 1. get lwgeom1 - * 2. get lwgeom2 - * 3. get box2d for lwgeom1 - * 4. get box2d for lwgeom2 - * 7. call the appropriate BOX2DFLOAT4 function - * 8. return result; - */ - -PG_FUNCTION_INFO_V1(LWGEOM_overlap); -Datum LWGEOM_overlap(PG_FUNCTION_ARGS) -{ - PG_LWGEOM *lwgeom1 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_LWGEOM *lwgeom2 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - bool result; - BOX2DFLOAT4 box1; - BOX2DFLOAT4 box2; - - POSTGIS_DEBUG(2, "GIST: LWGEOM_overlap --entry"); - - if ( pglwgeom_getSRID(lwgeom1) != pglwgeom_getSRID(lwgeom2) ) - { - PG_FREE_IF_COPY(lwgeom1, 0); - PG_FREE_IF_COPY(lwgeom2, 1); - elog(ERROR, "Operation on two geometries with different SRIDs"); - PG_RETURN_NULL(); - } - - if ( ! (getbox2d_p(SERIALIZED_FORM(lwgeom1), &box1) && getbox2d_p(SERIALIZED_FORM(lwgeom2), &box2)) ) - { - PG_FREE_IF_COPY(lwgeom1, 0); - PG_FREE_IF_COPY(lwgeom2, 1); - /* One or both are empty geoms */ - PG_RETURN_BOOL(FALSE); - } - - result = DatumGetBool(DirectFunctionCall2(BOX2D_overlap, - PointerGetDatum(&box1), PointerGetDatum(&box2))); - - PG_FREE_IF_COPY(lwgeom1, 0); - PG_FREE_IF_COPY(lwgeom2, 1); - - POSTGIS_DEBUGF(3, "GIST: lwgeom_overlap:\n(%f %f, %f %f) (%f %f %f %f) = %i", - box1.xmin, box1.ymax, box1.xmax, box1.ymax, - box2.xmin, box2.ymax, box2.xmax, box2.ymax, - result - ); - - PG_RETURN_BOOL(result); -} - - -PG_FUNCTION_INFO_V1(LWGEOM_overleft); -Datum LWGEOM_overleft(PG_FUNCTION_ARGS) -{ - PG_LWGEOM *lwgeom1 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_LWGEOM *lwgeom2 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - bool result; - BOX2DFLOAT4 box1; - BOX2DFLOAT4 box2; - - POSTGIS_DEBUG(2, "GIST: LWGEOM_overleft --entry"); - - if ( pglwgeom_getSRID(lwgeom1) != pglwgeom_getSRID(lwgeom2) ) - { - PG_FREE_IF_COPY(lwgeom1, 0); - PG_FREE_IF_COPY(lwgeom2, 1); - elog(ERROR, "Operation on two geometries with different SRIDs"); - PG_RETURN_NULL(); - } - - if ( ! (getbox2d_p(SERIALIZED_FORM(lwgeom1), &box1) && getbox2d_p(SERIALIZED_FORM(lwgeom2), &box2)) ) - { - PG_FREE_IF_COPY(lwgeom1, 0); - PG_FREE_IF_COPY(lwgeom2, 1); - PG_RETURN_BOOL(FALSE); - } - - - result = DatumGetBool(DirectFunctionCall2(BOX2D_overleft, - PointerGetDatum(&box1), PointerGetDatum(&box2))); - - PG_FREE_IF_COPY(lwgeom1, 0); - PG_FREE_IF_COPY(lwgeom2, 1); - - PG_RETURN_BOOL(result); -} - -PG_FUNCTION_INFO_V1(LWGEOM_left); -Datum LWGEOM_left(PG_FUNCTION_ARGS) -{ - PG_LWGEOM *lwgeom1 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_LWGEOM *lwgeom2 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - bool result; - BOX2DFLOAT4 box1; - BOX2DFLOAT4 box2; - - POSTGIS_DEBUG(2, "GIST: LWGEOM_left --entry"); - - errorIfSRIDMismatch(pglwgeom_getSRID(lwgeom1), pglwgeom_getSRID(lwgeom2)); - - if ( ! (getbox2d_p(SERIALIZED_FORM(lwgeom1), &box1) && getbox2d_p(SERIALIZED_FORM(lwgeom2), &box2)) ) - { - PG_FREE_IF_COPY(lwgeom1, 0); - PG_FREE_IF_COPY(lwgeom2, 1); - PG_RETURN_BOOL(FALSE); - } - - result = DatumGetBool(DirectFunctionCall2(BOX2D_left, - PointerGetDatum(&box1), PointerGetDatum(&box2))); - - PG_FREE_IF_COPY(lwgeom1, 0); - PG_FREE_IF_COPY(lwgeom2, 1); - - PG_RETURN_BOOL(result); -} - - -PG_FUNCTION_INFO_V1(LWGEOM_right); -Datum LWGEOM_right(PG_FUNCTION_ARGS) -{ - PG_LWGEOM *lwgeom1 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_LWGEOM *lwgeom2 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - bool result; - BOX2DFLOAT4 box1; - BOX2DFLOAT4 box2; - - POSTGIS_DEBUG(2, "GIST: LWGEOM_right --entry"); - - errorIfSRIDMismatch(pglwgeom_getSRID(lwgeom1), pglwgeom_getSRID(lwgeom2)); - - if ( ! (getbox2d_p(SERIALIZED_FORM(lwgeom1), &box1) && getbox2d_p(SERIALIZED_FORM(lwgeom2), &box2)) ) - { - PG_FREE_IF_COPY(lwgeom1, 0); - PG_FREE_IF_COPY(lwgeom2, 1); - PG_RETURN_BOOL(FALSE); - } - - result = DatumGetBool(DirectFunctionCall2(BOX2D_right, - PointerGetDatum(&box1), PointerGetDatum(&box2))); - - PG_FREE_IF_COPY(lwgeom1, 0); - PG_FREE_IF_COPY(lwgeom2, 1); - - PG_RETURN_BOOL(result); -} - - -PG_FUNCTION_INFO_V1(LWGEOM_overright); -Datum LWGEOM_overright(PG_FUNCTION_ARGS) -{ - PG_LWGEOM *lwgeom1 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_LWGEOM *lwgeom2 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - bool result; - BOX2DFLOAT4 box1; - BOX2DFLOAT4 box2; - - POSTGIS_DEBUG(2, "GIST: LWGEOM_overright --entry"); - - errorIfSRIDMismatch(pglwgeom_getSRID(lwgeom1), pglwgeom_getSRID(lwgeom2)); - - if ( ! (getbox2d_p(SERIALIZED_FORM(lwgeom1), &box1) && getbox2d_p(SERIALIZED_FORM(lwgeom2), &box2)) ) - { - PG_FREE_IF_COPY(lwgeom1, 0); - PG_FREE_IF_COPY(lwgeom2, 1); - PG_RETURN_BOOL(FALSE); - } - - result = DatumGetBool(DirectFunctionCall2(BOX2D_overright, - PointerGetDatum(&box1), PointerGetDatum(&box2))); - - PG_FREE_IF_COPY(lwgeom1, 0); - PG_FREE_IF_COPY(lwgeom2, 1); - - PG_RETURN_BOOL(result); -} - - -PG_FUNCTION_INFO_V1(LWGEOM_overbelow); -Datum LWGEOM_overbelow(PG_FUNCTION_ARGS) -{ - PG_LWGEOM *lwgeom1 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_LWGEOM *lwgeom2 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - bool result; - BOX2DFLOAT4 box1; - BOX2DFLOAT4 box2; - - POSTGIS_DEBUG(2, "GIST: LWGEOM_overbelow --entry"); - - errorIfSRIDMismatch(pglwgeom_getSRID(lwgeom1), pglwgeom_getSRID(lwgeom2)); - - if ( ! (getbox2d_p(SERIALIZED_FORM(lwgeom1), &box1) && getbox2d_p(SERIALIZED_FORM(lwgeom2), &box2)) ) - { - PG_FREE_IF_COPY(lwgeom1, 0); - PG_FREE_IF_COPY(lwgeom2, 1); - PG_RETURN_BOOL(FALSE); - } - - - result = DatumGetBool(DirectFunctionCall2(BOX2D_overbelow, - PointerGetDatum(&box1), PointerGetDatum(&box2))); - - PG_FREE_IF_COPY(lwgeom1, 0); - PG_FREE_IF_COPY(lwgeom2, 1); - - PG_RETURN_BOOL(result); -} - -PG_FUNCTION_INFO_V1(LWGEOM_below); -Datum LWGEOM_below(PG_FUNCTION_ARGS) -{ - PG_LWGEOM *lwgeom1 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_LWGEOM *lwgeom2 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - bool result; - BOX2DFLOAT4 box1; - BOX2DFLOAT4 box2; - - POSTGIS_DEBUG(2, "GIST: LWGEOM_below --entry"); - - errorIfSRIDMismatch(pglwgeom_getSRID(lwgeom1), pglwgeom_getSRID(lwgeom2)); - - if ( ! (getbox2d_p(SERIALIZED_FORM(lwgeom1), &box1) && getbox2d_p(SERIALIZED_FORM(lwgeom2), &box2)) ) - { - PG_FREE_IF_COPY(lwgeom1, 0); - PG_FREE_IF_COPY(lwgeom2, 1); - PG_RETURN_BOOL(FALSE); - } - - result = DatumGetBool(DirectFunctionCall2(BOX2D_below, - PointerGetDatum(&box1), PointerGetDatum(&box2))); - - PG_FREE_IF_COPY(lwgeom1, 0); - PG_FREE_IF_COPY(lwgeom2, 1); - - PG_RETURN_BOOL(result); -} - - -PG_FUNCTION_INFO_V1(LWGEOM_above); -Datum LWGEOM_above(PG_FUNCTION_ARGS) -{ - PG_LWGEOM *lwgeom1 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_LWGEOM *lwgeom2 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - bool result; - BOX2DFLOAT4 box1; - BOX2DFLOAT4 box2; - - POSTGIS_DEBUG(2, "GIST: LWGEOM_above --entry"); - - errorIfSRIDMismatch(pglwgeom_getSRID(lwgeom1), pglwgeom_getSRID(lwgeom2)); - - if ( ! (getbox2d_p(SERIALIZED_FORM(lwgeom1), &box1) && getbox2d_p(SERIALIZED_FORM(lwgeom2), &box2)) ) - { - PG_FREE_IF_COPY(lwgeom1, 0); - PG_FREE_IF_COPY(lwgeom2, 1); - PG_RETURN_BOOL(FALSE); - } - - result = DatumGetBool(DirectFunctionCall2(BOX2D_above, - PointerGetDatum(&box1), PointerGetDatum(&box2))); - - PG_FREE_IF_COPY(lwgeom1, 0); - PG_FREE_IF_COPY(lwgeom2, 1); - - PG_RETURN_BOOL(result); -} - - -PG_FUNCTION_INFO_V1(LWGEOM_overabove); -Datum LWGEOM_overabove(PG_FUNCTION_ARGS) -{ - PG_LWGEOM *lwgeom1 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_LWGEOM *lwgeom2 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - bool result; - BOX2DFLOAT4 box1; - BOX2DFLOAT4 box2; - - POSTGIS_DEBUG(2, "GIST: LWGEOM_overabove --entry"); - - errorIfSRIDMismatch(pglwgeom_getSRID(lwgeom1), pglwgeom_getSRID(lwgeom2)); - - if ( ! (getbox2d_p(SERIALIZED_FORM(lwgeom1), &box1) && getbox2d_p(SERIALIZED_FORM(lwgeom2), &box2)) ) - { - PG_FREE_IF_COPY(lwgeom1, 0); - PG_FREE_IF_COPY(lwgeom2, 1); - PG_RETURN_BOOL(FALSE); - } - - result = DatumGetBool(DirectFunctionCall2(BOX2D_overabove, - PointerGetDatum(&box1), PointerGetDatum(&box2))); - - PG_FREE_IF_COPY(lwgeom1, 0); - PG_FREE_IF_COPY(lwgeom2, 1); - - PG_RETURN_BOOL(result); -} - -PG_FUNCTION_INFO_V1(LWGEOM_samebox); -Datum LWGEOM_samebox(PG_FUNCTION_ARGS) -{ - PG_LWGEOM *lwgeom1 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_LWGEOM *lwgeom2 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - bool result; - BOX2DFLOAT4 box1; - BOX2DFLOAT4 box2; - - POSTGIS_DEBUG(2, "GIST: LWGEOM_samebox --entry"); - - errorIfSRIDMismatch(pglwgeom_getSRID(lwgeom1), pglwgeom_getSRID(lwgeom2)); - - if ( ! (getbox2d_p(SERIALIZED_FORM(lwgeom1), &box1) && getbox2d_p(SERIALIZED_FORM(lwgeom2), &box2)) ) - { - PG_FREE_IF_COPY(lwgeom1, 0); - PG_FREE_IF_COPY(lwgeom2, 1); - PG_RETURN_BOOL(FALSE); - } - - result = DatumGetBool(DirectFunctionCall2(BOX2D_same, - PointerGetDatum(&box1), PointerGetDatum(&box2))); - - PG_FREE_IF_COPY(lwgeom1, 0); - PG_FREE_IF_COPY(lwgeom2, 1); - - PG_RETURN_BOOL(result); -} - -PG_FUNCTION_INFO_V1(LWGEOM_contained); -Datum LWGEOM_contained(PG_FUNCTION_ARGS) -{ - PG_LWGEOM *lwgeom1 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_LWGEOM *lwgeom2 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - bool result; - BOX2DFLOAT4 box1; - BOX2DFLOAT4 box2; - - POSTGIS_DEBUG(2, "GIST: LWGEOM_contained --entry"); - - errorIfSRIDMismatch(pglwgeom_getSRID(lwgeom1), pglwgeom_getSRID(lwgeom2)); - - if ( ! (getbox2d_p(SERIALIZED_FORM(lwgeom1), &box1) && getbox2d_p(SERIALIZED_FORM(lwgeom2), &box2)) ) - { - PG_FREE_IF_COPY(lwgeom1, 0); - PG_FREE_IF_COPY(lwgeom2, 1); - PG_RETURN_BOOL(FALSE); - } - - result = DatumGetBool(DirectFunctionCall2(BOX2D_contained, - PointerGetDatum(&box1), PointerGetDatum(&box2))); - - PG_FREE_IF_COPY(lwgeom1, 0); - PG_FREE_IF_COPY(lwgeom2, 1); - - PG_RETURN_BOOL(result); -} - - -PG_FUNCTION_INFO_V1(LWGEOM_contain); -Datum LWGEOM_contain(PG_FUNCTION_ARGS) -{ - PG_LWGEOM *lwgeom1 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_LWGEOM *lwgeom2 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - bool result; - BOX2DFLOAT4 box1; - BOX2DFLOAT4 box2; - - POSTGIS_DEBUG(2, "GIST: LWGEOM_contain --entry"); - - errorIfSRIDMismatch(pglwgeom_getSRID(lwgeom1), pglwgeom_getSRID(lwgeom2)); - - if ( ! (getbox2d_p(SERIALIZED_FORM(lwgeom1), &box1) && getbox2d_p(SERIALIZED_FORM(lwgeom2), &box2)) ) - { - PG_FREE_IF_COPY(lwgeom1, 0); - PG_FREE_IF_COPY(lwgeom2, 1); - PG_RETURN_BOOL(FALSE); - } - - result = DatumGetBool(DirectFunctionCall2(BOX2D_contain, - PointerGetDatum(&box1), PointerGetDatum(&box2))); - - PG_FREE_IF_COPY(lwgeom1, 0); - PG_FREE_IF_COPY(lwgeom2, 1); - - PG_RETURN_BOOL(result); -} - - -/* These functions are taken from the postgis_gist_72.c file */ - - -/* - * GiST Compress methods for geometry - */ -PG_FUNCTION_INFO_V1(LWGEOM_gist_compress); -Datum LWGEOM_gist_compress(PG_FUNCTION_ARGS) -{ - GISTENTRY *entry=(GISTENTRY*)PG_GETARG_POINTER(0); - GISTENTRY *retval; - - PG_LWGEOM *in; /* lwgeom serialized */ - BOX2DFLOAT4 *rr; -#if POSTGIS_DEBUG_LEVEL > 0 - int result; - LWGEOM_UNPARSER_RESULT lwg_unparser_result; -#endif - - POSTGIS_DEBUG(2, "GIST: LWGEOM_gist_compress called"); - - if (entry->leafkey) - { - POSTGIS_DEBUG(4, "GIST: LWGEOM_gist_compress got a leafkey"); - - retval = palloc(sizeof(GISTENTRY)); - if ( DatumGetPointer(entry->key) != NULL ) - { - POSTGIS_DEBUG(4, "GIST: LWGEOM_gist_compress got a non-NULL key"); - - /* lwgeom serialized form */ - in = (PG_LWGEOM*)PG_DETOAST_DATUM(entry->key); - -#if POSTGIS_DEBUG_LEVEL > 0 - result = serialized_lwgeom_to_ewkt(&lwg_unparser_result, (uchar *)in+VARHDRSZ, PARSER_CHECK_NONE); - POSTGIS_DEBUGF(4, "GIST: LWGEOM_gist_compress detoasted entry->key: %s", lwg_unparser_result.wkoutput); -#endif - - if (in == NULL) - { - elog(ERROR, "PG_DETOAST_DATUM() returned NULL ??"); - PG_RETURN_POINTER(entry); - } - - rr = (BOX2DFLOAT4*) palloc(sizeof(BOX2DFLOAT4)); - - if ( ! getbox2d_p(SERIALIZED_FORM(in), rr) || - ! finite(rr->xmin) || - ! finite(rr->ymin) || - ! finite(rr->xmax) || - ! finite(rr->ymax) ) - { - - POSTGIS_DEBUG(4, "found empty or infinite geometry"); - - pfree(rr); - if (in!=(PG_LWGEOM*)DatumGetPointer(entry->key)) - pfree(in); /* PG_FREE_IF_COPY */ - PG_RETURN_POINTER(entry); - } - - POSTGIS_DEBUG(4, "GIST: LWGEOM_gist_compress got box2d"); - - POSTGIS_DEBUGF(3, "GIST: LWGEOM_gist_compress -- got box2d BOX(%.15g %.15g,%.15g %.15g)", rr->xmin, rr->ymin, rr->xmax, rr->ymax); - - if (in != (PG_LWGEOM*)DatumGetPointer(entry->key)) - pfree(in); /* PG_FREE_IF_COPY */ - - gistentryinit(*retval, PointerGetDatum(rr), - entry->rel, entry->page, - entry->offset, - FALSE); - - - } - else - { - POSTGIS_DEBUG(4, "GIST: LWGEOM_gist_compress got a NULL key"); - - gistentryinit(*retval, (Datum) 0, entry->rel, - entry->page, entry->offset, FALSE); - - } - - } - else - { - POSTGIS_DEBUG(4, "GIST: LWGEOM_gist_compress got a non-leafkey"); - - retval = entry; - } - - PG_RETURN_POINTER(retval); -} - - -PG_FUNCTION_INFO_V1(LWGEOM_gist_consistent); -Datum LWGEOM_gist_consistent(PG_FUNCTION_ARGS) -{ - GISTENTRY *entry = (GISTENTRY*) PG_GETARG_POINTER(0); - PG_LWGEOM *query ; /* lwgeom serialized form */ - StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2); - bool result; - uchar *serialized_lwgeom; - BOX2DFLOAT4 box; - -#if POSTGIS_PGSQL_VERSION >= 84 - /* PostgreSQL 8.4 and later require the RECHECK flag to be set here, - rather than being supplied as part of the operator class definition */ - bool *recheck = (bool *) PG_GETARG_POINTER(4); - - /* We set recheck to false to avoid repeatedly pulling every "possibly matched" geometry - out during index scans. For cases when the geometries are large, rechecking - can make things twice as slow. */ - *recheck = false; - -#endif - - POSTGIS_DEBUG(2, "GIST: LWGEOM_gist_consistent called"); - - if ( ((Pointer *) PG_GETARG_DATUM(1)) == NULL ) - { - /*elog(NOTICE,"LWGEOM_gist_consistent:: got null query!"); */ - PG_RETURN_BOOL(false); /* null query - this is screwy! */ - } - - /* - ** First pull only a small amount of the tuple, enough to - ** get the bounding box, if one exists. - ** size = header + type + box2df4? - */ - query = (PG_LWGEOM*)PG_DETOAST_DATUM_SLICE(PG_GETARG_DATUM(1), 0, VARHDRSZ + 1 + sizeof(BOX2DFLOAT4) ); - - if ( ! (DatumGetPointer(entry->key) != NULL && query) ) - { - PG_FREE_IF_COPY(query, 1); - elog(ERROR, "LWGEOM_gist_consistent got either NULL query or entry->key"); - PG_RETURN_BOOL(FALSE); - } - - /* - ** If the bounding box exists, copy it into the working variable. - ** If not, pull the full toasted data out, and call the standard box - ** retrieval function, which will calculate the box from scratch. - */ - serialized_lwgeom = SERIALIZED_FORM(query); - if ( lwgeom_hasBBOX(serialized_lwgeom[0]) ) - { - memcpy(&box, serialized_lwgeom + 1, sizeof(BOX2DFLOAT4)); - } - else - { - query = (PG_LWGEOM*)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - if ( ! getbox2d_p(SERIALIZED_FORM(query), &box) ) - { - PG_FREE_IF_COPY(query, 1); - PG_RETURN_BOOL(FALSE); - } - } - - if (GIST_LEAF(entry)) - result = lwgeom_rtree_leaf_consistent((BOX2DFLOAT4 *) - DatumGetPointer(entry->key), &box, strategy ); - else - result = lwgeom_rtree_internal_consistent( - (BOX2DFLOAT4 *) DatumGetPointer(entry->key), - &box, strategy ); - - PG_FREE_IF_COPY(query, 1); - PG_RETURN_BOOL(result); -} - - -static bool -lwgeom_rtree_internal_consistent(BOX2DFLOAT4 *key, BOX2DFLOAT4 *query, - StrategyNumber strategy) -{ - bool retval; - - POSTGIS_DEBUGF(2, "GIST: lwgeom_rtree_internal_consistent called with strategy=%i", strategy); - - switch (strategy) - { - case RTLeftStrategyNumber: - retval = !DatumGetBool( DirectFunctionCall2( BOX2D_overright, PointerGetDatum(key), PointerGetDatum(query) ) ); - break; - case RTOverLeftStrategyNumber: - retval = !DatumGetBool( DirectFunctionCall2( BOX2D_right, PointerGetDatum(key), PointerGetDatum(query) ) ); - break; - case RTOverlapStrategyNumber: /*optimized for speed */ - - retval = (((key->xmax>= query->xmax) && - (key->xmin <= query->xmax)) || - ((query->xmax>= key->xmax) && - (query->xmin<= key->xmax))) - && - (((key->ymax>= query->ymax) && - (key->ymin<= query->ymax)) || - ((query->ymax>= key->ymax) && - (query->ymin<= key->ymax))); - - - POSTGIS_DEBUGF(4, "%i:(int)<%.8g %.8g,%.8g %.8g>&&<%.8g %.8g,%.8g %.8g> %i",counter_intern++,key->xmin,key->ymin,key->xmax,key->ymax, - query->xmin,query->ymin,query->xmax,query->ymax, (int) retval); - - return(retval); - break; - - case RTOverRightStrategyNumber: - retval = !DatumGetBool( DirectFunctionCall2( BOX2D_left, PointerGetDatum(key), PointerGetDatum(query) ) ); - break; - case RTRightStrategyNumber: - retval = !DatumGetBool( DirectFunctionCall2( BOX2D_overleft, PointerGetDatum(key), PointerGetDatum(query) ) ); - break; - case RTOverBelowStrategyNumber: - retval = !DatumGetBool( DirectFunctionCall2( BOX2D_above, PointerGetDatum(key), PointerGetDatum(query) ) ); - break; - case RTBelowStrategyNumber: - retval = !DatumGetBool( DirectFunctionCall2( BOX2D_overabove, PointerGetDatum(key), PointerGetDatum(query) ) ); - break; - case RTAboveStrategyNumber: - retval = !DatumGetBool( DirectFunctionCall2( BOX2D_overbelow, PointerGetDatum(key), PointerGetDatum(query) ) ); - break; - case RTOverAboveStrategyNumber: - retval = !DatumGetBool( DirectFunctionCall2( BOX2D_below, PointerGetDatum(key), PointerGetDatum(query) ) ); - break; - case RTSameStrategyNumber: - case RTContainsStrategyNumber: - retval = DatumGetBool( DirectFunctionCall2( BOX2D_contain, PointerGetDatum(key), PointerGetDatum(query) ) ); - break; - case RTContainedByStrategyNumber: - retval = DatumGetBool( DirectFunctionCall2( BOX2D_overlap, PointerGetDatum(key), PointerGetDatum(query) ) ); - break; - default: - retval = FALSE; - } - return(retval); -} - - -static bool -lwgeom_rtree_leaf_consistent(BOX2DFLOAT4 *key, - BOX2DFLOAT4 *query, StrategyNumber strategy) -{ - bool retval; - - POSTGIS_DEBUGF(2, "GIST: rtree_leaf_consist called with strategy=%d",strategy); - - switch (strategy) - { - case RTLeftStrategyNumber: - retval = DatumGetBool(DirectFunctionCall2(BOX2D_left, PointerGetDatum(key), PointerGetDatum(query))); - break; - case RTOverLeftStrategyNumber: - retval = DatumGetBool(DirectFunctionCall2(BOX2D_overleft, PointerGetDatum(key), PointerGetDatum(query))); - break; - case RTOverlapStrategyNumber: /*optimized for speed */ - retval = (((key->xmax>= query->xmax) && - (key->xmin <= query->xmax)) || - ((query->xmax>= key->xmax) && - (query->xmin<= key->xmax))) - && - (((key->ymax>= query->ymax) && - (key->ymin<= query->ymax)) || - ((query->ymax>= key->ymax) && - (query->ymin<= key->ymax))); - - /*keep track and report info about how many times this is called */ - POSTGIS_DEBUGF(4, "%i:gist test (leaf) <%.6g %.6g,%.6g %.6g> && <%.6g %.6g,%.6g %.6g> --> %i", - counter_leaf++,key->xmin,key->ymin,key->xmax,key->ymax, - query->xmin,query->ymin,query->xmax,query->ymax, (int) retval); - - return(retval); - - break; - case RTOverRightStrategyNumber: - retval = DatumGetBool(DirectFunctionCall2(BOX2D_overright, PointerGetDatum(key), PointerGetDatum(query))); - break; - case RTRightStrategyNumber: - retval = DatumGetBool(DirectFunctionCall2(BOX2D_right, PointerGetDatum(key), PointerGetDatum(query))); - break; - case RTOverBelowStrategyNumber: - retval = DatumGetBool(DirectFunctionCall2(BOX2D_overbelow, PointerGetDatum(key), PointerGetDatum(query))); - break; - case RTBelowStrategyNumber: - retval = DatumGetBool(DirectFunctionCall2(BOX2D_below, PointerGetDatum(key), PointerGetDatum(query))); - break; - case RTAboveStrategyNumber: - retval = DatumGetBool(DirectFunctionCall2(BOX2D_above, PointerGetDatum(key), PointerGetDatum(query))); - break; - case RTOverAboveStrategyNumber: - retval = DatumGetBool(DirectFunctionCall2(BOX2D_overabove, PointerGetDatum(key), PointerGetDatum(query))); - break; - case RTSameStrategyNumber: - retval = DatumGetBool(DirectFunctionCall2(BOX2D_same, PointerGetDatum(key), PointerGetDatum(query))); - break; - case RTContainsStrategyNumber: - retval = DatumGetBool(DirectFunctionCall2(BOX2D_contain, PointerGetDatum(key), PointerGetDatum(query))); - break; - case RTContainedByStrategyNumber: - retval = DatumGetBool(DirectFunctionCall2(BOX2D_contained, PointerGetDatum(key), PointerGetDatum(query))); - break; - default: - retval = FALSE; - } - return (retval); -} - - - -PG_FUNCTION_INFO_V1(LWGEOM_gist_decompress); -Datum LWGEOM_gist_decompress(PG_FUNCTION_ARGS) -{ -#if POSTGIS_DEBUG_LEVEL >= 4 - static unsigned int counter2 = 0; - counter2++; - POSTGIS_DEBUGF(4, "GIST: LWGEOM_gist_decompress called %i",counter2); -#endif - - PG_RETURN_POINTER(PG_GETARG_POINTER(0)); -} - - - -/** - * The GiST Union method for boxes - * returns the minimal bounding box that encloses all the entries in entryvec - */ -PG_FUNCTION_INFO_V1(LWGEOM_gist_union); -Datum LWGEOM_gist_union(PG_FUNCTION_ARGS) -{ - GistEntryVector *entryvec = (GistEntryVector *) PG_GETARG_POINTER(0); - - int *sizep = (int *) PG_GETARG_POINTER(1); - int numranges, - i; - BOX2DFLOAT4 *cur, - *pageunion; - - POSTGIS_DEBUG(2, "GIST: LWGEOM_gist_union called\n"); - - numranges = entryvec->n; - cur = (BOX2DFLOAT4 *) DatumGetPointer(entryvec->vector[0].key); - - pageunion = (BOX2DFLOAT4 *) palloc(sizeof(BOX2DFLOAT4)); - memcpy((void *) pageunion, (void *) cur, sizeof(BOX2DFLOAT4)); - - - - - for (i = 1; i < numranges; i++) - { - cur = (BOX2DFLOAT4*) DatumGetPointer(entryvec->vector[i].key); - - if (pageunion->xmax < cur->xmax) - pageunion->xmax = cur->xmax; - if (pageunion->xmin > cur->xmin) - pageunion->xmin = cur->xmin; - if (pageunion->ymax < cur->ymax) - pageunion->ymax = cur->ymax; - if (pageunion->ymin > cur->ymin) - pageunion->ymin = cur->ymin; - } - - *sizep = sizeof(BOX2DFLOAT4); - - POSTGIS_DEBUGF(3, "GIST: gbox_union called with numranges=%i pageunion is: <%.16g %.16g,%.16g %.16g>", numranges,pageunion->xmin, pageunion->ymin, pageunion->xmax, pageunion->ymax); - - PG_RETURN_POINTER(pageunion); -} - - -/** - * size of a box is width*height - * we do this in double precision because width and height can be very very small - * and it gives screwy results - */ -static float -size_box2d(Datum box2d) -{ - float result; - - POSTGIS_DEBUG(2, "GIST: size_box2d called"); - - if (DatumGetPointer(box2d) != NULL) - { - BOX2DFLOAT4 *a = (BOX2DFLOAT4*) DatumGetPointer(box2d); - - if ( a == NULL || a->xmax <= a->xmin || a->ymax <= a->ymin) - { - result = (float) 0.0; - } - else - { - result = (((double) a->xmax)-((double) a->xmin)) * (((double) a->ymax)-((double) a->ymin)); - } - } - else result = (float) 0.0; - - POSTGIS_DEBUGF(3, "GIST: size_box2d called - returning %.15g",result); - - return result; -} - -/** - * size of a box is width*height - * we do this in double precision because width and height can be very very small - * and it gives screwy results - * this version returns a double - */ -static double size_box2d_double(Datum box2d); -static double size_box2d_double(Datum box2d) -{ - double result; - - POSTGIS_DEBUG(2, "GIST: size_box2d_double called"); - - if (DatumGetPointer(box2d) != NULL) - { - BOX2DFLOAT4 *a = (BOX2DFLOAT4*) DatumGetPointer(box2d); - - if (a == (BOX2DFLOAT4 *) NULL || a->xmax <= a->xmin || a->ymax <= a->ymin) - { - result = (double) 0.0; - } - else - { - result = (((double) a->xmax)-((double) a->xmin)) * (((double) a->ymax)-((double) a->ymin)); - } - } - else - { - result = (double) 0.0; - } - - POSTGIS_DEBUGF(3, "GIST: size_box2d_double called - returning %.15g",result); - - return result; -} - - - -/** -** The GiST Penalty method for boxes -** As in the R-tree paper, we use change in area as our penalty metric -*/ -PG_FUNCTION_INFO_V1(LWGEOM_gist_penalty); -Datum LWGEOM_gist_penalty(PG_FUNCTION_ARGS) -{ - GISTENTRY *origentry = (GISTENTRY *) PG_GETARG_POINTER(0); - GISTENTRY *newentry = (GISTENTRY *) PG_GETARG_POINTER(1); - float *result = (float *) PG_GETARG_POINTER(2); - Datum ud; - double tmp1; - - POSTGIS_DEBUG(2, "GIST: LWGEOM_gist_penalty called"); - - if (DatumGetPointer(origentry->key) == NULL && DatumGetPointer(newentry->key) == NULL) - { - POSTGIS_DEBUG(4, "GIST: LWGEOM_gist_penalty called with both inputs NULL"); - - *result = 0; - } - else - { - ud = DirectFunctionCall2(BOX2D_union, origentry->key, newentry->key); - /*ud = BOX2D_union(origentry->key, newentry->key); */ - tmp1 = size_box2d_double(ud); - if (DatumGetPointer(ud) != NULL) - pfree(DatumGetPointer(ud)); - *result = tmp1 - size_box2d_double(origentry->key); - } - - - POSTGIS_DEBUGF(4, "GIST: LWGEOM_gist_penalty called and returning %.15g", *result); - - PG_RETURN_POINTER(result); -} - -typedef struct -{ - BOX2DFLOAT4 *key; - int pos; -} -KBsort; - -static int -compare_KB(const void* a, const void* b) -{ - BOX2DFLOAT4 *abox = ((KBsort*)a)->key; - BOX2DFLOAT4 *bbox = ((KBsort*)b)->key; - float sa = (abox->xmax - abox->xmin) * (abox->ymax - abox->ymin); - float sb = (bbox->xmax - bbox->xmin) * (bbox->ymax - bbox->ymin); - - if ( sa==sb ) return 0; - return ( sa>sb ) ? 1 : -1; -} - -/** -** Equality method -*/ -PG_FUNCTION_INFO_V1(LWGEOM_gist_same); -Datum LWGEOM_gist_same(PG_FUNCTION_ARGS) -{ - BOX2DFLOAT4 *b1 = (BOX2DFLOAT4 *) PG_GETARG_POINTER(0); - BOX2DFLOAT4 *b2 = (BOX2DFLOAT4 *) PG_GETARG_POINTER(1); - bool *result = (bool *)PG_GETARG_POINTER(2); - - POSTGIS_DEBUG(2, "GIST: LWGEOM_gist_same called"); - - if (b1 && b2) - *result = DatumGetBool(DirectFunctionCall2(BOX2D_same, PointerGetDatum(b1), PointerGetDatum(b2))); - else - *result = (b1 == NULL && b2 == NULL) ? TRUE : FALSE; - PG_RETURN_POINTER(result); -} - - - -/** -** The GiST PickSplit method -** New linear algorithm, see 'New Linear Node Splitting Algorithm for R-tree', -** C.H.Ang and T.C.Tan -*/ -PG_FUNCTION_INFO_V1(LWGEOM_gist_picksplit); -Datum LWGEOM_gist_picksplit(PG_FUNCTION_ARGS) -{ - GistEntryVector *entryvec = (GistEntryVector *) PG_GETARG_POINTER(0); - - GIST_SPLITVEC *v = (GIST_SPLITVEC *) PG_GETARG_POINTER(1); - OffsetNumber i; - OffsetNumber *listL, *listR, *listB, *listT; - BOX2DFLOAT4 *unionL, *unionR, *unionB, *unionT; - int posL, posR, posB, posT; - BOX2DFLOAT4 pageunion; - BOX2DFLOAT4 *cur; - char direction = ' '; - bool allisequal = true; - OffsetNumber maxoff; - int nbytes; - - POSTGIS_DEBUG(2, "GIST: LWGEOM_gist_picksplit called"); - - posL = posR = posB = posT = 0; - - maxoff = entryvec->n - 1; - cur = (BOX2DFLOAT4*) DatumGetPointer(entryvec->vector[FirstOffsetNumber].key); - - memcpy((void *) &pageunion, (void *) cur, sizeof(BOX2DFLOAT4)); - - POSTGIS_DEBUGF(4, " cur is: <%.16g %.16g,%.16g %.16g>", cur->xmin, cur->ymin, cur->xmax, cur->ymax); - - - /* find MBR */ - for (i = OffsetNumberNext(FirstOffsetNumber); i <= maxoff; i = OffsetNumberNext(i)) - { - cur = (BOX2DFLOAT4 *) DatumGetPointer(entryvec->vector[i].key); - - if ( allisequal == true && ( - pageunion.xmax != cur->xmax || - pageunion.ymax != cur->ymax || - pageunion.xmin != cur->xmin || - pageunion.ymin != cur->ymin - ) ) - allisequal = false; - - if (pageunion.xmax < cur->xmax) - pageunion.xmax = cur->xmax; - if (pageunion.xmin > cur->xmin) - pageunion.xmin = cur->xmin; - if (pageunion.ymax < cur->ymax) - pageunion.ymax = cur->ymax; - if (pageunion.ymin> cur->ymin) - pageunion.ymin = cur->ymin; - } - - POSTGIS_DEBUGF(4, " pageunion is: <%.16g %.16g,%.16g %.16g>", pageunion.xmin, pageunion.ymin, pageunion.xmax, pageunion.ymax); - - nbytes = (maxoff + 2) * sizeof(OffsetNumber); - listL = (OffsetNumber *) palloc(nbytes); - listR = (OffsetNumber *) palloc(nbytes); - unionL = (BOX2DFLOAT4 *) palloc(sizeof(BOX2DFLOAT4)); - unionR = (BOX2DFLOAT4 *) palloc(sizeof(BOX2DFLOAT4)); - - if (allisequal) - { - POSTGIS_DEBUG(4, " AllIsEqual!"); - - cur = (BOX2DFLOAT4*) DatumGetPointer(entryvec->vector[OffsetNumberNext(FirstOffsetNumber)].key); - - - if (memcmp((void *) cur, (void *) &pageunion, sizeof(BOX2DFLOAT4)) == 0) - { - v->spl_left = listL; - v->spl_right = listR; - v->spl_nleft = v->spl_nright = 0; - memcpy((void *) unionL, (void *) &pageunion, sizeof(BOX2DFLOAT4)); - memcpy((void *) unionR, (void *) &pageunion, sizeof(BOX2DFLOAT4)); - - for (i = FirstOffsetNumber; i <= maxoff; i = OffsetNumberNext(i)) - { - if (i <= (maxoff - FirstOffsetNumber + 1) / 2) - { - v->spl_left[v->spl_nleft] = i; - v->spl_nleft++; - } - else - { - v->spl_right[v->spl_nright] = i; - v->spl_nright++; - } - } - v->spl_ldatum = PointerGetDatum(unionL); - v->spl_rdatum = PointerGetDatum(unionR); - - PG_RETURN_POINTER(v); - } - } - - - listB = (OffsetNumber *) palloc(nbytes); - listT = (OffsetNumber *) palloc(nbytes); - unionB = (BOX2DFLOAT4 *) palloc(sizeof(BOX2DFLOAT4)); - unionT = (BOX2DFLOAT4 *) palloc(sizeof(BOX2DFLOAT4)); - -#define ADDLIST( list, unionD, pos, num ) do { \ - if ( pos ) { \ - if ( unionD->xmax < cur->xmax ) unionD->xmax = cur->xmax; \ - if ( unionD->xmin > cur->xmin ) unionD->xmin = cur->xmin; \ - if ( unionD->ymax < cur->ymax ) unionD->ymax = cur->ymax; \ - if ( unionD->ymin > cur->ymin ) unionD->ymin = cur->ymin; \ - } else { \ - memcpy( (void*)unionD, (void*) cur, sizeof( BOX2DFLOAT4 ) ); \ - } \ - list[pos] = num; \ - (pos)++; \ -} while(0) - - for (i = FirstOffsetNumber; i <= maxoff; i = OffsetNumberNext(i)) - { - cur = (BOX2DFLOAT4*) DatumGetPointer(entryvec->vector[i].key); - - if (cur->xmin - pageunion.xmin < pageunion.xmax - cur->xmax) - ADDLIST(listL, unionL, posL,i); - else - ADDLIST(listR, unionR, posR,i); - if (cur->ymin - pageunion.ymin < pageunion.ymax - cur->ymax) - ADDLIST(listB, unionB, posB,i); - else - ADDLIST(listT, unionT, posT,i); - } - - POSTGIS_DEBUGF(4, " unionL is: <%.16g %.16g,%.16g %.16g>", unionL->xmin, unionL->ymin, unionL->xmax, unionL->ymax); - POSTGIS_DEBUGF(4, " unionR is: <%.16g %.16g,%.16g %.16g>", unionR->xmin, unionR->ymin, unionR->xmax, unionR->ymax); - POSTGIS_DEBUGF(4, " unionT is: <%.16g %.16g,%.16g %.16g>", unionT->xmin, unionT->ymin, unionT->xmax, unionT->ymax); - POSTGIS_DEBUGF(4, " unionB is: <%.16g %.16g,%.16g %.16g>", unionB->xmin, unionB->ymin, unionB->xmax, unionB->ymax); - - - - /* bad disposition, sort by ascending and resplit */ - if ( (posR==0 || posL==0) && (posT==0 || posB==0) ) - { - KBsort *arr = (KBsort*)palloc( sizeof(KBsort) * maxoff ); - posL = posR = posB = posT = 0; - for (i = FirstOffsetNumber; i <= maxoff; i = OffsetNumberNext(i)) - { - arr[i-1].key = (BOX2DFLOAT4*) DatumGetPointer(entryvec->vector[i].key); - arr[i-1].pos = i; - } - qsort( arr, maxoff, sizeof(KBsort), compare_KB ); - for (i = FirstOffsetNumber; i <= maxoff; i = OffsetNumberNext(i)) - { - cur = arr[i-1].key; - if (cur->xmin - pageunion.xmin < pageunion.xmax - cur->xmax) - ADDLIST(listL, unionL, posL,arr[i-1].pos); - else if ( cur->xmin - pageunion.xmin == pageunion.xmax - cur->xmax ) - { - if ( posL>posR ) - ADDLIST(listR, unionR, posR,arr[i-1].pos); - else - ADDLIST(listL, unionL, posL,arr[i-1].pos); - } - else - ADDLIST(listR, unionR, posR,arr[i-1].pos); - - if (cur->ymin - pageunion.ymin < pageunion.ymax - cur->ymax) - ADDLIST(listB, unionB, posB,arr[i-1].pos); - else if ( cur->ymin - pageunion.ymin == pageunion.ymax - cur->ymax ) - { - if ( posB>posT ) - ADDLIST(listT, unionT, posT,arr[i-1].pos); - else - ADDLIST(listB, unionB, posB,arr[i-1].pos); - } - else - ADDLIST(listT, unionT, posT,arr[i-1].pos); - } - pfree(arr); - } - - /* which split more optimal? */ - if (Max(posL, posR) < Max(posB, posT)) - direction = 'x'; - else if (Max(posL, posR) > Max(posB, posT)) - direction = 'y'; - else - { - Datum interLR = DirectFunctionCall2(BOX2D_intersects, - PointerGetDatum(unionL), PointerGetDatum(unionR)); - Datum interBT = DirectFunctionCall2(BOX2D_intersects, - PointerGetDatum(unionB), PointerGetDatum(unionT)); - float sizeLR, sizeBT; - - /*elog(NOTICE,"direction is ambiguous"); */ - - sizeLR = size_box2d(interLR); - sizeBT = size_box2d(interBT); - - if ( DatumGetPointer(interLR) != NULL ) - pfree(DatumGetPointer(interLR)); - if ( DatumGetPointer(interBT) != NULL ) - pfree(DatumGetPointer(interBT)); - - if (sizeLR < sizeBT) - direction = 'x'; - else - direction = 'y'; - } - - if (direction == 'x') - { - pfree(unionB); - pfree(listB); - pfree(unionT); - pfree(listT); - - v->spl_left = listL; - v->spl_right = listR; - v->spl_nleft = posL; - v->spl_nright = posR; - v->spl_ldatum = PointerGetDatum(unionL); - v->spl_rdatum = PointerGetDatum(unionR); - -#if POSTGIS_DEBUG_LEVEL >= 4 - { - char aaa[5000],bbb[100]; - aaa[0] = 0; - - POSTGIS_DEBUGF(4, " split direction was '%c'", direction); - POSTGIS_DEBUGF(4, " posL = %i, posR=%i", posL,posR); - POSTGIS_DEBUG(4, " posL's (nleft) offset numbers:"); - - for (i=0; ispl_left = listB; - v->spl_right = listT; - v->spl_nleft = posB; - v->spl_nright = posT; - v->spl_ldatum = PointerGetDatum(unionB); - v->spl_rdatum = PointerGetDatum(unionT); - -#if POSTGIS_DEBUG_LEVEL >= 4 - { - char aaa[5000],bbb[100]; - aaa[0]=0; - - POSTGIS_DEBUGF(4, " split direction was '%c'", direction); - POSTGIS_DEBUGF(4, " posB = %i, posT=%i", posB,posT); - POSTGIS_DEBUG(4, " posB's (nleft) offset numbers:"); - - for (i=0; i2 && !PG_ARGISNULL(2)) - { - precision = PG_GETARG_INT32(2); - if ( precision > MAX_DOUBLE_PRECISION ) - precision = MAX_DOUBLE_PRECISION; - else if ( precision < 0 ) precision = 0; - } - - /* retrieve option */ - if (PG_NARGS() >3 && !PG_ARGISNULL(3)) - option = PG_GETARG_INT32(3); - - SRID = lwgeom_getsrid(SERIALIZED_FORM(geom)); - if (SRID == -1) srs = NULL; - else if (option & 1) srs = getSRSbySRID(SRID, false); - else srs = getSRSbySRID(SRID, true); - - if (option & 16) is_deegree = true; - - if (version == 2) - gml = geometry_to_gml2(SERIALIZED_FORM(geom), srs, precision); - else - gml = geometry_to_gml3(SERIALIZED_FORM(geom), srs, precision, is_deegree); - - PG_FREE_IF_COPY(geom, 1); - - len = strlen(gml) + VARHDRSZ; - - result = palloc(len); - SET_VARSIZE(result, len); - - memcpy(VARDATA(result), gml, len-VARHDRSZ); - - pfree(gml); - - PG_RETURN_POINTER(result); -} - - - -/** - * @brief VERSION GML 2 - * takes a GEOMETRY and returns a GML@ representation - */ -char * -geometry_to_gml2(uchar *geom, char *srs, int precision) -{ - int type; - LWPOINT *point; - LWLINE *line; - LWPOLY *poly; - LWGEOM_INSPECTED *inspected; - - type = lwgeom_getType(geom[0]); - - switch (type) - { - case POINTTYPE: - point = lwpoint_deserialize(geom); - return asgml2_point(point, srs, precision); - - case LINETYPE: - line = lwline_deserialize(geom); - return asgml2_line(line, srs, precision); - - case POLYGONTYPE: - poly = lwpoly_deserialize(geom); - return asgml2_poly(poly, srs, precision); - - case MULTIPOINTTYPE: - case MULTILINETYPE: - case MULTIPOLYGONTYPE: - inspected = lwgeom_inspect(geom); - return asgml2_multi(inspected, srs, precision); - - case COLLECTIONTYPE: - inspected = lwgeom_inspect(geom); - return asgml2_collection(inspected, srs, precision); - - default: - lwerror("geometry_to_gml2: '%s' geometry type not supported", lwgeom_typename(type)); - return NULL; - } -} - -static size_t -asgml2_point_size(LWPOINT *point, char *srs, int precision) -{ - int size; - size = pointArray_GMLsize(point->point, precision); - size += sizeof("/") * 2; - if ( srs ) size += strlen(srs) + sizeof(" srsName=.."); - return size; -} - -static size_t -asgml2_point_buf(LWPOINT *point, char *srs, char *output, int precision) -{ - char *ptr = output; - - if ( srs ) - { - ptr += sprintf(ptr, "", srs); - } - else - { - ptr += sprintf(ptr, ""); - } - ptr += sprintf(ptr, ""); - ptr += pointArray_toGML2(point->point, ptr, precision); - ptr += sprintf(ptr, ""); - - return (ptr-output); -} - -static char * -asgml2_point(LWPOINT *point, char *srs, int precision) -{ - char *output; - int size; - - size = asgml2_point_size(point, srs, precision); - output = palloc(size); - asgml2_point_buf(point, srs, output, precision); - return output; -} - -static size_t -asgml2_line_size(LWLINE *line, char *srs, int precision) -{ - int size; - size = pointArray_GMLsize(line->points, precision); - size += sizeof("/") * 2; - if ( srs ) size += strlen(srs) + sizeof(" srsName=.."); - return size; -} - -static size_t -asgml2_line_buf(LWLINE *line, char *srs, char *output, int precision) -{ - char *ptr=output; - - if ( srs ) - { - ptr += sprintf(ptr, "", srs); - } - else - { - ptr += sprintf(ptr, ""); - } - ptr += sprintf(ptr, ""); - ptr += pointArray_toGML2(line->points, ptr, precision); - ptr += sprintf(ptr, ""); - - return (ptr-output); -} - -static char * -asgml2_line(LWLINE *line, char *srs, int precision) -{ - char *output; - int size; - - size = asgml2_line_size(line, srs, precision); - output = palloc(size); - asgml2_line_buf(line, srs, output, precision); - return output; -} - -static size_t -asgml2_poly_size(LWPOLY *poly, char *srs, int precision) -{ - size_t size; - int i; - - size = sizeof(""); - size += sizeof("/") * 2; - size += sizeof("/") * 2 * - poly->nrings; - if ( srs ) size += strlen(srs) + sizeof(" srsName=.."); - - for (i=0; inrings; i++) - size += pointArray_GMLsize(poly->rings[i], precision); - - return size; -} - -static size_t -asgml2_poly_buf(LWPOLY *poly, char *srs, char *output, int precision) -{ - int i; - char *ptr=output; - - if ( srs ) - { - ptr += sprintf(ptr, "", srs); - } - else - { - ptr += sprintf(ptr, ""); - } - ptr += sprintf(ptr, ""); - ptr += pointArray_toGML2(poly->rings[0], ptr, precision); - ptr += sprintf(ptr, ""); - for (i=1; inrings; i++) - { - ptr += sprintf(ptr, ""); - ptr += pointArray_toGML2(poly->rings[i], ptr, precision); - ptr += sprintf(ptr, ""); - } - ptr += sprintf(ptr, ""); - - return (ptr-output); -} - -static char * -asgml2_poly(LWPOLY *poly, char *srs, int precision) -{ - char *output; - int size; - - size = asgml2_poly_size(poly, srs, precision); - output = palloc(size); - asgml2_poly_buf(poly, srs, output, precision); - return output; -} - -/* - * Compute max size required for GML version of this - * inspected geometry. Will recurse when needed. - * Don't call this with single-geoms inspected. - */ -static size_t -asgml2_multi_size(LWGEOM_INSPECTED *insp, char *srs, int precision) -{ - int i; - size_t size; - - /* the longest possible multi version */ - size = sizeof(""); - - if ( srs ) size += strlen(srs) + sizeof(" srsName=.."); - - for (i=0; ingeometries; i++) - { - LWPOINT *point; - LWLINE *line; - LWPOLY *poly; - - if ((point=lwgeom_getpoint_inspected(insp, i))) - { - size += sizeof("/") * 2; - size += asgml2_point_size(point, 0, precision); - lwpoint_release(point); - } - else if ((line=lwgeom_getline_inspected(insp, i))) - { - size += sizeof("/") * 2; - size += asgml2_line_size(line, 0, precision); - lwline_release(line); - } - else if ((poly=lwgeom_getpoly_inspected(insp, i))) - { - size += sizeof("/") * 2; - size += asgml2_poly_size(poly, 0, precision); - lwpoly_release(poly); - } - } - - return size; -} - -/* - * Don't call this with single-geoms inspected! - */ -static size_t -asgml2_multi_buf(LWGEOM_INSPECTED *insp, char *srs, char *output, int precision) -{ - int type = lwgeom_getType(insp->serialized_form[0]); - char *ptr, *gmltype; - int i; - - ptr = output; - gmltype=""; - - if (type == MULTIPOINTTYPE) gmltype = "MultiPoint"; - else if (type == MULTILINETYPE) gmltype = "MultiLineString"; - else if (type == MULTIPOLYGONTYPE) gmltype = "MultiPolygon"; - - /* Open outmost tag */ - if ( srs ) - { - ptr += sprintf(ptr, "", gmltype, srs); - } - else - { - ptr += sprintf(ptr, "", gmltype); - } - - for (i=0; ingeometries; i++) - { - LWPOINT *point; - LWLINE *line; - LWPOLY *poly; - - if ((point=lwgeom_getpoint_inspected(insp, i))) - { - ptr += sprintf(ptr, ""); - ptr += asgml2_point_buf(point, 0, ptr, precision); - lwpoint_release(point); - ptr += sprintf(ptr, ""); - } - else if ((line=lwgeom_getline_inspected(insp, i))) - { - ptr += sprintf(ptr, ""); - ptr += asgml2_line_buf(line, 0, ptr, precision); - lwline_release(line); - ptr += sprintf(ptr, ""); - } - else if ((poly=lwgeom_getpoly_inspected(insp, i))) - { - ptr += sprintf(ptr, ""); - ptr += asgml2_poly_buf(poly, 0, ptr, precision); - lwpoly_release(poly); - ptr += sprintf(ptr, ""); - } - } - - /* Close outmost tag */ - ptr += sprintf(ptr, "", gmltype); - - return (ptr-output); -} - -/* - * Don't call this with single-geoms inspected! - */ -static char * -asgml2_multi(LWGEOM_INSPECTED *insp, char *srs, int precision) -{ - char *gml; - size_t size; - - size = asgml2_multi_size(insp, srs, precision); - gml = palloc(size); - asgml2_multi_buf(insp, srs, gml, precision); - return gml; -} - - -static size_t -asgml2_collection_size(LWGEOM_INSPECTED *insp, char *srs, int precision) -{ - int i; - size_t size; - - size = sizeof(""); - - if ( srs ) size += strlen(srs) + sizeof(" srsName=.."); - - for (i=0; ingeometries; i++) - { - LWPOINT *point; - LWLINE *line; - LWPOLY *poly; - LWGEOM_INSPECTED *subinsp; - uchar *subgeom; - - size += sizeof("/") * 2; - if ((point=lwgeom_getpoint_inspected(insp, i))) - { - size += asgml2_point_size(point, 0, precision); - lwpoint_release(point); - } - else if ((line=lwgeom_getline_inspected(insp, i))) - { - size += asgml2_line_size(line, 0, precision); - lwline_release(line); - } - else if ((poly=lwgeom_getpoly_inspected(insp, i))) - { - size += asgml2_poly_size(poly, 0, precision); - lwpoly_release(poly); - } - else - { - subgeom = lwgeom_getsubgeometry_inspected(insp, i); - subinsp = lwgeom_inspect(subgeom); - size += asgml2_collection_size(subinsp, 0, precision); - lwinspected_release(subinsp); - } - } - - return size; -} - -/* - * Don't call this with single-geoms inspected! - */ -static size_t -asgml2_collection_buf(LWGEOM_INSPECTED *insp, char *srs, char *output, int precision) -{ - char *ptr; - int i; - - ptr = output; - - /* Open outmost tag */ - if ( srs ) - { - ptr += sprintf(ptr, "", srs); - } - else - { - ptr += sprintf(ptr, ""); - } - - for (i=0; ingeometries; i++) - { - LWPOINT *point; - LWLINE *line; - LWPOLY *poly; - LWGEOM_INSPECTED *subinsp; - uchar *subgeom; - - ptr += sprintf(ptr, ""); - if ((point=lwgeom_getpoint_inspected(insp, i))) - { - ptr += asgml2_point_buf(point, 0, ptr, precision); - lwpoint_release(point); - } - else if ((line=lwgeom_getline_inspected(insp, i))) - { - ptr += asgml2_line_buf(line, 0, ptr, precision); - lwline_release(line); - } - else if ((poly=lwgeom_getpoly_inspected(insp, i))) - { - ptr += asgml2_poly_buf(poly, 0, ptr, precision); - lwpoly_release(poly); - } - else - { - subgeom = lwgeom_getsubgeometry_inspected(insp, i); - subinsp = lwgeom_inspect(subgeom); - if (lwgeom_getType(subgeom[0]) == COLLECTIONTYPE) - ptr += asgml2_collection_buf(subinsp, 0, ptr, precision); - else - ptr += asgml2_multi_buf(subinsp, 0, ptr, precision); - lwinspected_release(subinsp); - } - ptr += sprintf(ptr, ""); - } - - /* Close outmost tag */ - ptr += sprintf(ptr, ""); - - return (ptr-output); -} - -/* - * Don't call this with single-geoms inspected! - */ -static char * -asgml2_collection(LWGEOM_INSPECTED *insp, char *srs, int precision) -{ - char *gml; - size_t size; - - size = asgml2_collection_size(insp, srs, precision); - gml = palloc(size); - asgml2_collection_buf(insp, srs, gml, precision); - return gml; -} - - -static size_t -pointArray_toGML2(POINTARRAY *pa, char *output, int precision) -{ - int i; - char *ptr; - char x[MAX_DIGS_DOUBLE+MAX_DOUBLE_PRECISION+1]; - char y[MAX_DIGS_DOUBLE+MAX_DOUBLE_PRECISION+1]; - char z[MAX_DIGS_DOUBLE+MAX_DOUBLE_PRECISION+1]; - - ptr = output; - - if ( ! TYPE_HASZ(pa->dims) ) - { - for (i=0; inpoints; i++) - { - POINT2D pt; - getPoint2d_p(pa, i, &pt); - - if (fabs(pt.x) < MAX_DOUBLE) - sprintf(x, "%.*f", precision, pt.x); - else - sprintf(x, "%g", pt.x); - trim_trailing_zeros(x); - - if (fabs(pt.y) < MAX_DOUBLE) - sprintf(y, "%.*f", precision, pt.y); - else - sprintf(y, "%g", pt.y); - trim_trailing_zeros(y); - - if ( i ) ptr += sprintf(ptr, " "); - ptr += sprintf(ptr, "%s,%s", x, y); - } - } - else - { - for (i=0; inpoints; i++) - { - POINT4D pt; - getPoint4d_p(pa, i, &pt); - - if (fabs(pt.x) < MAX_DOUBLE) - sprintf(x, "%.*f", precision, pt.x); - else - sprintf(x, "%g", pt.x); - trim_trailing_zeros(x); - - if (fabs(pt.y) < MAX_DOUBLE) - sprintf(y, "%.*f", precision, pt.y); - else - sprintf(y, "%g", pt.y); - trim_trailing_zeros(y); - - if (fabs(pt.z) < MAX_DOUBLE) - sprintf(z, "%.*f", precision, pt.z); - else - sprintf(z, "%g", pt.z); - trim_trailing_zeros(z); - - if ( i ) ptr += sprintf(ptr, " "); - ptr += sprintf(ptr, "%s,%s,%s", x, y, z); - } - } - - return ptr-output; -} - - -/* - * VERSION GML 3.1.1 - */ - - -/* takes a GEOMETRY and returns a GML representation */ -char * -geometry_to_gml3(uchar *geom, char *srs, int precision, bool is_deegree) -{ - int type; - LWPOINT *point; - LWLINE *line; - LWPOLY *poly; - LWGEOM_INSPECTED *inspected; - - type = lwgeom_getType(geom[0]); - - switch (type) - { - case POINTTYPE: - point = lwpoint_deserialize(geom); - return asgml3_point(point, srs, precision, is_deegree); - - case LINETYPE: - line = lwline_deserialize(geom); - return asgml3_line(line, srs, precision, is_deegree); - - case POLYGONTYPE: - poly = lwpoly_deserialize(geom); - return asgml3_poly(poly, srs, precision, is_deegree); - - case MULTIPOINTTYPE: - case MULTILINETYPE: - case MULTIPOLYGONTYPE: - inspected = lwgeom_inspect(geom); - return asgml3_multi(inspected, srs, precision, is_deegree); - - case COLLECTIONTYPE: - inspected = lwgeom_inspect(geom); - return asgml3_collection(inspected, srs, precision, is_deegree); - - default: - lwerror("geometry_to_gml3: '%s' geometry type not supported", lwgeom_typename(type)); - return NULL; - } -} - -static size_t -asgml3_point_size(LWPOINT *point, char *srs, int precision) -{ - int size; - size = pointArray_GMLsize(point->point, precision); - size += sizeof("/") * 2; - if ( srs ) size += strlen(srs) + sizeof(" srsName=.."); - return size; -} - -static size_t -asgml3_point_buf(LWPOINT *point, char *srs, char *output, int precision, bool is_deegree) -{ - char *ptr = output; - int dimension=2; - - if (TYPE_HASZ(point->type)) dimension = 3; - if ( srs ) - { - ptr += sprintf(ptr, "", srs); - } - else - { - ptr += sprintf(ptr, ""); - } - ptr += sprintf(ptr, "", dimension); - ptr += pointArray_toGML3(point->point, ptr, precision, is_deegree); - ptr += sprintf(ptr, ""); - - return (ptr-output); -} - -static char * -asgml3_point(LWPOINT *point, char *srs, int precision, bool is_deegree) -{ - char *output; - int size; - - size = asgml3_point_size(point, srs, precision); - output = palloc(size); - asgml3_point_buf(point, srs, output, precision, is_deegree); - return output; -} - - -static size_t -asgml3_line_size(LWLINE *line, char *srs, int precision) -{ - int size; - size = pointArray_GMLsize(line->points, precision); - size += sizeof("/") * 2; - size += sizeof(" srsDimension='x'"); - if ( srs ) size += strlen(srs) + sizeof(" srsName=.."); - return size; -} - -static size_t -asgml3_line_buf(LWLINE *line, char *srs, char *output, int precision, bool is_deegree) -{ - char *ptr=output; - int dimension=2; - - if (TYPE_HASZ(line->type)) dimension = 3; - if ( srs ) - { - ptr += sprintf(ptr, "", srs); - } - else - { - ptr += sprintf(ptr, ""); - } - ptr += sprintf(ptr, ""); - ptr += sprintf(ptr, ""); - ptr += sprintf(ptr, "", dimension); - ptr += pointArray_toGML3(line->points, ptr, precision, is_deegree); - ptr += sprintf(ptr, ""); - ptr += sprintf(ptr, ""); - ptr += sprintf(ptr, ""); - - return (ptr-output); -} - -static char * -asgml3_line(LWLINE *line, char *srs, int precision, bool is_deegree) -{ - char *output; - int size; - - size = asgml3_line_size(line, srs, precision); - output = palloc(size); - asgml3_line_buf(line, srs, output, precision, is_deegree); - return output; -} - - -static size_t -asgml3_poly_size(LWPOLY *poly, char *srs, int precision) -{ - size_t size; - int i; - - size = sizeof("///") * 2; - size += sizeof("//") * 2 * (poly->nrings - 1); - size += sizeof("") * poly->nrings; - if ( srs ) size += strlen(srs) + sizeof(" srsName=.."); - - for (i=0; inrings; i++) - size += pointArray_GMLsize(poly->rings[i], precision); - - return size; -} - -static size_t -asgml3_poly_buf(LWPOLY *poly, char *srs, char *output, int precision, bool is_deegree) -{ - int i; - char *ptr=output; - int dimension=2; - - if (TYPE_HASZ(poly->type)) dimension = 3; - if ( srs ) - { - ptr += sprintf(ptr, "", srs); - } - else - { - ptr += sprintf(ptr, ""); - } - ptr += sprintf(ptr, ""); - ptr += sprintf(ptr, "", dimension); - ptr += pointArray_toGML3(poly->rings[0], ptr, precision, is_deegree); - ptr += sprintf(ptr, ""); - for (i=1; inrings; i++) - { - ptr += sprintf(ptr, ""); - ptr += sprintf(ptr, "", dimension); - ptr += pointArray_toGML3(poly->rings[i], ptr, precision, is_deegree); - ptr += sprintf(ptr, ""); - } - ptr += sprintf(ptr, ""); - - return (ptr-output); -} - -static char * -asgml3_poly(LWPOLY *poly, char *srs, int precision, bool is_deegree) -{ - char *output; - int size; - - size = asgml3_poly_size(poly, srs, precision); - output = palloc(size); - asgml3_poly_buf(poly, srs, output, precision, is_deegree); - return output; -} - - -/* - * Compute max size required for GML version of this - * inspected geometry. Will recurse when needed. - * Don't call this with single-geoms inspected. - */ -static size_t -asgml3_multi_size(LWGEOM_INSPECTED *insp, char *srs, int precision) -{ - int i; - size_t size; - - /* the longest possible multi version */ - size = sizeof(""); - - if ( srs ) size += strlen(srs) + sizeof(" srsName=.."); - - for (i=0; ingeometries; i++) - { - LWPOINT *point; - LWLINE *line; - LWPOLY *poly; - - if ((point=lwgeom_getpoint_inspected(insp, i))) - { - size += sizeof("/") * 2; - size += asgml3_point_size(point, 0, precision); - lwpoint_release(point); - } - else if ((line=lwgeom_getline_inspected(insp, i))) - { - size += sizeof("/") * 2; - size += asgml3_line_size(line, 0, precision); - lwline_release(line); - } - else if ((poly=lwgeom_getpoly_inspected(insp, i))) - { - size += sizeof("/") * 2; - size += asgml3_poly_size(poly, 0, precision); - lwpoly_release(poly); - } - } - - return size; -} - -/* - * Don't call this with single-geoms inspected! - */ -static size_t -asgml3_multi_buf(LWGEOM_INSPECTED *insp, char *srs, char *output, int precision, bool is_deegree) -{ - int type = lwgeom_getType(insp->serialized_form[0]); - char *ptr, *gmltype; - int i; - - ptr = output; - gmltype=""; - - if (type == MULTIPOINTTYPE) gmltype = "MultiPoint"; - else if (type == MULTILINETYPE) gmltype = "MultiCurve"; - else if (type == MULTIPOLYGONTYPE) gmltype = "MultiSurface"; - - /* Open outmost tag */ - if ( srs ) - { - ptr += sprintf(ptr, "", gmltype, srs); - } - else - { - ptr += sprintf(ptr, "", gmltype); - } - - for (i=0; ingeometries; i++) - { - LWPOINT *point; - LWLINE *line; - LWPOLY *poly; - - if ((point=lwgeom_getpoint_inspected(insp, i))) - { - ptr += sprintf(ptr, ""); - ptr += asgml3_point_buf(point, 0, ptr, precision, is_deegree); - lwpoint_release(point); - ptr += sprintf(ptr, ""); - } - else if ((line=lwgeom_getline_inspected(insp, i))) - { - ptr += sprintf(ptr, ""); - ptr += asgml3_line_buf(line, 0, ptr, precision, is_deegree); - lwline_release(line); - ptr += sprintf(ptr, ""); - } - else if ((poly=lwgeom_getpoly_inspected(insp, i))) - { - ptr += sprintf(ptr, ""); - ptr += asgml3_poly_buf(poly, 0, ptr, precision, is_deegree); - lwpoly_release(poly); - ptr += sprintf(ptr, ""); - } - } - - /* Close outmost tag */ - ptr += sprintf(ptr, "", gmltype); - - return (ptr-output); -} - -/* - * Don't call this with single-geoms inspected! - */ -static char * -asgml3_multi(LWGEOM_INSPECTED *insp, char *srs, int precision, bool is_deegree) -{ - char *gml; - size_t size; - - size = asgml3_multi_size(insp, srs, precision); - gml = palloc(size); - asgml3_multi_buf(insp, srs, gml, precision, is_deegree); - return gml; -} - - -static size_t -asgml3_collection_size(LWGEOM_INSPECTED *insp, char *srs, int precision) -{ - int i; - size_t size; - - size = sizeof(""); - - if ( srs ) size += strlen(srs) + sizeof(" srsName=.."); - - for (i=0; ingeometries; i++) - { - LWPOINT *point; - LWLINE *line; - LWPOLY *poly; - LWGEOM_INSPECTED *subinsp; - uchar *subgeom; - - size += sizeof("/") * 2; - if ((point=lwgeom_getpoint_inspected(insp, i))) - { - size += asgml3_point_size(point, 0, precision); - lwpoint_release(point); - } - else if ((line=lwgeom_getline_inspected(insp, i))) - { - size += asgml3_line_size(line, 0, precision); - lwline_release(line); - } - else if ((poly=lwgeom_getpoly_inspected(insp, i))) - { - size += asgml3_poly_size(poly, 0, precision); - lwpoly_release(poly); - } - else - { - subgeom = lwgeom_getsubgeometry_inspected(insp, i); - subinsp = lwgeom_inspect(subgeom); - size += asgml3_multi_size(subinsp, 0, precision); - lwinspected_release(subinsp); - } - } - - return size; -} - -static size_t -asgml3_collection_buf(LWGEOM_INSPECTED *insp, char *srs, char *output, int precision, bool is_deegree) -{ - char *ptr; - int i; - - ptr = output; - - /* Open outmost tag */ - if ( srs ) - { - ptr += sprintf(ptr, "", srs); - } - else - { - ptr += sprintf(ptr, ""); - } - - for (i=0; ingeometries; i++) - { - LWPOINT *point; - LWLINE *line; - LWPOLY *poly; - LWGEOM_INSPECTED *subinsp; - uchar *subgeom; - - ptr += sprintf(ptr, ""); - if ((point=lwgeom_getpoint_inspected(insp, i))) - { - ptr += asgml3_point_buf(point, 0, ptr, precision, is_deegree); - lwpoint_release(point); - } - else if ((line=lwgeom_getline_inspected(insp, i))) - { - ptr += asgml3_line_buf(line, 0, ptr, precision, is_deegree); - lwline_release(line); - } - else if ((poly=lwgeom_getpoly_inspected(insp, i))) - { - ptr += asgml3_poly_buf(poly, 0, ptr, precision, is_deegree); - lwpoly_release(poly); - } - else - { - subgeom = lwgeom_getsubgeometry_inspected(insp, i); - subinsp = lwgeom_inspect(subgeom); - if (lwgeom_getType(subgeom[0]) == COLLECTIONTYPE) - ptr += asgml3_collection_buf(subinsp, 0, ptr, precision, is_deegree); - else - ptr += asgml3_multi_buf(subinsp, 0, ptr, precision, is_deegree); - lwinspected_release(subinsp); - } - ptr += sprintf(ptr, ""); - } - - /* Close outmost tag */ - ptr += sprintf(ptr, ""); - - return (ptr-output); -} - -/* - * Don't call this with single-geoms inspected! - */ -static char * -asgml3_collection(LWGEOM_INSPECTED *insp, char *srs, int precision, bool is_deegree) -{ - char *gml; - size_t size; - - size = asgml3_collection_size(insp, srs, precision); - gml = palloc(size); - asgml3_collection_buf(insp, srs, gml, precision, is_deegree); - return gml; -} - - -/* In GML3, inside or , coordinates are separated by a space separator - * In GML3 also, lat/lon are reversed for geocentric data - */ -static size_t -pointArray_toGML3(POINTARRAY *pa, char *output, int precision, bool is_deegree) -{ - int i; - char *ptr; - char x[MAX_DIGS_DOUBLE+MAX_DOUBLE_PRECISION+1]; - char y[MAX_DIGS_DOUBLE+MAX_DOUBLE_PRECISION+1]; - char z[MAX_DIGS_DOUBLE+MAX_DOUBLE_PRECISION+1]; - - ptr = output; - - if ( ! TYPE_HASZ(pa->dims) ) - { - for (i=0; inpoints; i++) - { - POINT2D pt; - getPoint2d_p(pa, i, &pt); - - if (fabs(pt.x) < MAX_DOUBLE) - sprintf(x, "%.*f", precision, pt.x); - else - sprintf(x, "%g", pt.x); - trim_trailing_zeros(x); - - if (fabs(pt.y) < MAX_DOUBLE) - sprintf(y, "%.*f", precision, pt.y); - else - sprintf(y, "%g", pt.y); - trim_trailing_zeros(y); - - if ( i ) ptr += sprintf(ptr, " "); - if (is_deegree) - ptr += sprintf(ptr, "%s %s", y, x); - else - ptr += sprintf(ptr, "%s %s", x, y); - } - } - else - { - for (i=0; inpoints; i++) - { - POINT4D pt; - getPoint4d_p(pa, i, &pt); - - if (fabs(pt.x) < MAX_DOUBLE) - sprintf(x, "%.*f", precision, pt.x); - else - sprintf(x, "%g", pt.x); - trim_trailing_zeros(x); - - if (fabs(pt.y) < MAX_DOUBLE) - sprintf(y, "%.*f", precision, pt.y); - else - sprintf(y, "%g", pt.y); - trim_trailing_zeros(y); - - if (fabs(pt.z) < MAX_DOUBLE) - sprintf(z, "%.*f", precision, pt.z); - else - sprintf(z, "%g", pt.z); - trim_trailing_zeros(z); - - if ( i ) ptr += sprintf(ptr, " "); - if (is_deegree) - ptr += sprintf(ptr, "%s %s %s", y, x, z); - else - ptr += sprintf(ptr, "%s %s %s", x, y, z); - } - } - - return ptr-output; -} - - - -/* - * Returns maximum size of rendered pointarray in bytes. - */ -static size_t -pointArray_GMLsize(POINTARRAY *pa, int precision) -{ - if (TYPE_NDIMS(pa->dims) == 2) - return (MAX_DIGS_DOUBLE + precision + sizeof(", ")) - * 2 * pa->npoints; - - return (MAX_DIGS_DOUBLE + precision + sizeof(", ")) * 3 * pa->npoints; -} diff -Nru postgis-1.5.3/postgis/lwgeom_in_geojson.c postgis-2.0.1/postgis/lwgeom_in_geojson.c --- postgis-1.5.3/postgis/lwgeom_in_geojson.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/postgis/lwgeom_in_geojson.c 2012-05-18 09:59:13.000000000 +0000 @@ -0,0 +1,559 @@ +/********************************************************************** + * + * PostGIS - Spatial Types for PostgreSQL + * Copyright 2011 Kashif Rasul + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include + +#include "postgres.h" + +#include "../postgis_config.h" +#include "lwgeom_pg.h" +#include "liblwgeom.h" + +Datum geom_from_geojson(PG_FUNCTION_ARGS); + + +static void geojson_lwerror(char *msg, int error_code) +{ + POSTGIS_DEBUGF(3, "ST_GeomFromGeoJSON ERROR %i", error_code); + lwerror("%s", msg); +} + +#ifdef HAVE_LIBJSON + +#include "lwgeom_export.h" +#include +#include + +/* Prototype */ +LWGEOM* parse_geojson(json_object *geojson, bool *hasz, int *root_srid); + +static json_object* +findMemberByName(json_object* poObj, const char* pszName ) +{ + json_object* poTmp; + json_object_iter it; + + poTmp = poObj; + + if( NULL == pszName || NULL == poObj) + return NULL; + + it.key = NULL; + it.val = NULL; + it.entry = NULL; + + if( NULL != json_object_get_object(poTmp) ) + { + assert( NULL != json_object_get_object(poTmp)->head ); + + for( it.entry = json_object_get_object(poTmp)->head; + ( it.entry ? + ( it.key = (char*)it.entry->k, + it.val = (json_object*)it.entry->v, it.entry) : 0); + it.entry = it.entry->next) + { + if( strcasecmp((char *)it.key, pszName )==0 ) + return it.val; + } + } + + return NULL; +} + + +static int +parse_geojson_coord(json_object *poObj, bool *hasz, POINTARRAY *pa) +{ + POINT4D pt; + int iType = 0; + + POSTGIS_DEBUGF(3, "parse_geojson_coord called for object %s.", json_object_to_json_string( poObj ) ); + + if( json_type_array == json_object_get_type( poObj ) ) + { + + json_object* poObjCoord = NULL; + const int nSize = json_object_array_length( poObj ); + POSTGIS_DEBUGF(3, "parse_geojson_coord called for array size %d.", nSize ); + + + // Read X coordinate + poObjCoord = json_object_array_get_idx( poObj, 0 ); + iType = json_object_get_type(poObjCoord); + if (iType == json_type_double) + pt.x = json_object_get_double( poObjCoord ); + else + pt.x = json_object_get_int( poObjCoord ); + POSTGIS_DEBUGF(3, "parse_geojson_coord pt.x = %f.", pt.x ); + + // Read Y coordiante + poObjCoord = json_object_array_get_idx( poObj, 1 ); + if (iType == json_type_double) + pt.y = json_object_get_double( poObjCoord ); + else + pt.y = json_object_get_int( poObjCoord ); + POSTGIS_DEBUGF(3, "parse_geojson_coord pt.y = %f.", pt.y ); + + if( nSize == 3 ) /* should this be >= 3 ? */ + { + // Read Z coordiante + poObjCoord = json_object_array_get_idx( poObj, 2 ); + if (iType == 3) + pt.z = json_object_get_double( poObjCoord ); + else + pt.z = json_object_get_int( poObjCoord ); + POSTGIS_DEBUGF(3, "parse_geojson_coord pt.z = %f.", pt.z ); + *hasz = true; + } + else + { + *hasz = false; + /* Initialize Z coordinate, if required */ + if ( FLAGS_GET_Z(pa->flags) ) pt.z = 0.0; + } + + /* TODO: should we account for nSize > 3 ? */ + + /* Initialize M coordinate, if required */ + if ( FLAGS_GET_M(pa->flags) ) pt.m = 0.0; + + } + + return ptarray_append_point(pa, &pt, LW_FALSE); +} + +static LWGEOM* +parse_geojson_point(json_object *geojson, bool *hasz, int *root_srid) +{ + LWGEOM *geom; + POINTARRAY *pa; + json_object* coords = NULL; + + POSTGIS_DEBUGF(3, "parse_geojson_point called with root_srid = %d.", *root_srid ); + + coords = findMemberByName( geojson, "coordinates" ); + if ( ! coords ) + geojson_lwerror("Unable to find 'coordinates' in GeoJSON string", 4); + + pa = ptarray_construct_empty(1, 0, 1); + parse_geojson_coord(coords, hasz, pa); + + geom = (LWGEOM *) lwpoint_construct(*root_srid, NULL, pa); + POSTGIS_DEBUG(2, "parse_geojson_point finished."); + return geom; +} + +static LWGEOM* +parse_geojson_linestring(json_object *geojson, bool *hasz, int *root_srid) +{ + LWGEOM *geom; + POINTARRAY *pa; + json_object* points = NULL; + int i = 0; + + POSTGIS_DEBUG(2, "parse_geojson_linestring called."); + + points = findMemberByName( geojson, "coordinates" ); + if ( ! points ) + geojson_lwerror("Unable to find 'coordinates' in GeoJSON string", 4); + + pa = ptarray_construct_empty(1, 0, 1); + + if( json_type_array == json_object_get_type( points ) ) + { + const int nPoints = json_object_array_length( points ); + for(i = 0; i < nPoints; ++i) + { + json_object* coords = NULL; + coords = json_object_array_get_idx( points, i ); + parse_geojson_coord(coords, hasz, pa); + } + } + + geom = (LWGEOM *) lwline_construct(*root_srid, NULL, pa); + + POSTGIS_DEBUG(2, "parse_geojson_linestring finished."); + return geom; +} + +static LWGEOM* +parse_geojson_polygon(json_object *geojson, bool *hasz, int *root_srid) +{ + LWGEOM *geom; + POINTARRAY **ppa; + json_object* rings = NULL; + int i = 0, j = 0; + int ring = 0; + + rings = findMemberByName( geojson, "coordinates" ); + if ( ! rings ) + geojson_lwerror("Unable to find 'coordinates' in GeoJSON string", 4); + + ppa = (POINTARRAY**) lwalloc(sizeof(POINTARRAY*)); + + if( json_type_array == json_object_get_type( rings ) ) + { + int nPoints; + json_object* points = NULL; + ppa[0] = ptarray_construct_empty(1, 0, 1); + ring = json_object_array_length( rings ); + points = json_object_array_get_idx( rings, 0 ); + nPoints = json_object_array_length( points ); + + for (i=0; i < nPoints; i++ ) + { + json_object* coords = NULL; + coords = json_object_array_get_idx( points, i ); + parse_geojson_coord(coords, hasz, ppa[0]); + } + + for(i = 1; i < ring; ++i) + { + int nPoints; + ppa = (POINTARRAY**) lwrealloc((POINTARRAY *) ppa, sizeof(POINTARRAY*) * (i + 1)); + ppa[i] = ptarray_construct_empty(1, 0, 1); + points = json_object_array_get_idx( rings, i ); + nPoints = json_object_array_length( points ); + for (j=0; j < nPoints; j++ ) + { + json_object* coords = NULL; + coords = json_object_array_get_idx( points, j ); + parse_geojson_coord(coords, hasz, ppa[i]); + } + } + } + + geom = (LWGEOM *) lwpoly_construct(*root_srid, NULL, ring, ppa); + return geom; +} + +static LWGEOM* +parse_geojson_multipoint(json_object *geojson, bool *hasz, int *root_srid) +{ + LWGEOM *geom; + int i = 0; + json_object* poObjPoints = NULL; + + if (!*root_srid) + { + geom = (LWGEOM *)lwcollection_construct_empty(MULTIPOINTTYPE, *root_srid, 1, 0); + } + else + { + geom = (LWGEOM *)lwcollection_construct_empty(MULTIPOINTTYPE, -1, 1, 0); + } + + poObjPoints = findMemberByName( geojson, "coordinates" ); + if ( ! poObjPoints ) + geojson_lwerror("Unable to find 'coordinates' in GeoJSON string", 4); + + if( json_type_array == json_object_get_type( poObjPoints ) ) + { + const int nPoints = json_object_array_length( poObjPoints ); + for( i = 0; i < nPoints; ++i) + { + POINTARRAY *pa; + json_object* poObjCoords = NULL; + poObjCoords = json_object_array_get_idx( poObjPoints, i ); + + pa = ptarray_construct_empty(1, 0, 1); + parse_geojson_coord(poObjCoords, hasz, pa); + + geom = (LWGEOM*)lwmpoint_add_lwpoint((LWMPOINT*)geom, + (LWPOINT*)lwpoint_construct(*root_srid, NULL, pa)); + } + } + + return geom; +} + +static LWGEOM* +parse_geojson_multilinestring(json_object *geojson, bool *hasz, int *root_srid) +{ + LWGEOM *geom = NULL; + int i, j; + json_object* poObjLines = NULL; + + if (!*root_srid) + { + geom = (LWGEOM *)lwcollection_construct_empty(MULTILINETYPE, *root_srid, 1, 0); + } + else + { + geom = (LWGEOM *)lwcollection_construct_empty(MULTILINETYPE, -1, 1, 0); + } + + poObjLines = findMemberByName( geojson, "coordinates" ); + if ( ! poObjLines ) + geojson_lwerror("Unable to find 'coordinates' in GeoJSON string", 4); + + if( json_type_array == json_object_get_type( poObjLines ) ) + { + const int nLines = json_object_array_length( poObjLines ); + for( i = 0; i < nLines; ++i) + { + POINTARRAY *pa = NULL; + json_object* poObjLine = NULL; + poObjLine = json_object_array_get_idx( poObjLines, i ); + pa = ptarray_construct_empty(1, 0, 1); + + if( json_type_array == json_object_get_type( poObjLine ) ) + { + const int nPoints = json_object_array_length( poObjLine ); + for(j = 0; j < nPoints; ++j) + { + json_object* coords = NULL; + coords = json_object_array_get_idx( poObjLine, j ); + parse_geojson_coord(coords, hasz, pa); + } + + geom = (LWGEOM*)lwmline_add_lwline((LWMLINE*)geom, + (LWLINE*)lwline_construct(*root_srid, NULL, pa)); + } + } + } + + return geom; +} + +static LWGEOM* +parse_geojson_multipolygon(json_object *geojson, bool *hasz, int *root_srid) +{ + LWGEOM *geom = NULL; + int i, j, k; + json_object* poObjPolys = NULL; + + if (!*root_srid) + { + geom = (LWGEOM *)lwcollection_construct_empty(MULTIPOLYGONTYPE, *root_srid, 1, 0); + } + else + { + geom = (LWGEOM *)lwcollection_construct_empty(MULTIPOLYGONTYPE, -1, 1, 0); + } + + poObjPolys = findMemberByName( geojson, "coordinates" ); + if ( ! poObjPolys ) + geojson_lwerror("Unable to find 'coordinates' in GeoJSON string", 4); + + if( json_type_array == json_object_get_type( poObjPolys ) ) + { + const int nPolys = json_object_array_length( poObjPolys ); + + for(i = 0; i < nPolys; ++i) + { + POINTARRAY **ppa; + json_object* poObjPoly = NULL; + poObjPoly = json_object_array_get_idx( poObjPolys, i ); + + ppa = (POINTARRAY**) lwalloc(sizeof(POINTARRAY*)); + + if( json_type_array == json_object_get_type( poObjPoly ) ) + { + int nPoints; + json_object* points = NULL; + int ring = json_object_array_length( poObjPoly ); + ppa[0] = ptarray_construct_empty(1, 0, 1); + + points = json_object_array_get_idx( poObjPoly, 0 ); + nPoints = json_object_array_length( points ); + + for (j=0; j < nPoints; j++ ) + { + json_object* coords = NULL; + coords = json_object_array_get_idx( points, j ); + parse_geojson_coord(coords, hasz, ppa[0]); + } + + for(j = 1; j < ring; ++j) + { + int nPoints; + ppa = (POINTARRAY**) lwrealloc((POINTARRAY *) ppa, sizeof(POINTARRAY*) * (j + 1)); + ppa[i] = ptarray_construct_empty(1, 0, 1); + points = json_object_array_get_idx( poObjPoly, j ); + + nPoints = json_object_array_length( points ); + for (k=0; k < nPoints; k++ ) + { + json_object* coords = NULL; + coords = json_object_array_get_idx( points, k ); + parse_geojson_coord(coords, hasz, ppa[i]); + } + } + + geom = (LWGEOM*)lwmpoly_add_lwpoly((LWMPOLY*)geom, + (LWPOLY*)lwpoly_construct(*root_srid, NULL, ring, ppa)); + } + } + } + + return geom; +} + +static LWGEOM* +parse_geojson_geometrycollection(json_object *geojson, bool *hasz, int *root_srid) +{ + LWGEOM *geom = NULL; + int i; + json_object* poObjGeoms = NULL; + + if (!*root_srid) + { + geom = (LWGEOM *)lwcollection_construct_empty(COLLECTIONTYPE, *root_srid, 1, 0); + } + else + { + geom = (LWGEOM *)lwcollection_construct_empty(COLLECTIONTYPE, -1, 1, 0); + } + + poObjGeoms = findMemberByName( geojson, "geometries" ); + if ( ! poObjGeoms ) + geojson_lwerror("Unable to find 'geometries' in GeoJSON string", 4); + + if( json_type_array == json_object_get_type( poObjGeoms ) ) + { + const int nGeoms = json_object_array_length( poObjGeoms ); + json_object* poObjGeom = NULL; + for(i = 0; i < nGeoms; ++i ) + { + poObjGeom = json_object_array_get_idx( poObjGeoms, i ); + geom = (LWGEOM*)lwcollection_add_lwgeom((LWCOLLECTION *)geom, + parse_geojson(poObjGeom, hasz, root_srid)); + } + } + + return geom; +} + +LWGEOM* +parse_geojson(json_object *geojson, bool *hasz, int *root_srid) +{ + json_object* type = NULL; + const char* name; + + if( NULL == geojson ) + geojson_lwerror("invalid GeoJSON representation", 2); + + type = findMemberByName( geojson, "type" ); + if( NULL == type ) + geojson_lwerror("unknown GeoJSON type", 3); + + name = json_object_get_string( type ); + + if( strcasecmp( name, "Point" )==0 ) + return parse_geojson_point(geojson, hasz, root_srid); + + if( strcasecmp( name, "LineString" )==0 ) + return parse_geojson_linestring(geojson, hasz, root_srid); + + if( strcasecmp( name, "Polygon" )==0 ) + return parse_geojson_polygon(geojson, hasz, root_srid); + + if( strcasecmp( name, "MultiPoint" )==0 ) + return parse_geojson_multipoint(geojson, hasz, root_srid); + + if( strcasecmp( name, "MultiLineString" )==0 ) + return parse_geojson_multilinestring(geojson, hasz, root_srid); + + if( strcasecmp( name, "MultiPolygon" )==0 ) + return parse_geojson_multipolygon(geojson, hasz, root_srid); + + if( strcasecmp( name, "GeometryCollection" )==0 ) + return parse_geojson_geometrycollection(geojson, hasz, root_srid); + + lwerror("invalid GeoJson representation"); + return NULL; /* Never reach */ +} +#endif /* HAVE_LIBJSON */ + +PG_FUNCTION_INFO_V1(postgis_libjson_version); +Datum postgis_libjson_version(PG_FUNCTION_ARGS) +{ +#ifndef HAVE_LIBJSON + PG_RETURN_NULL(); +#else /* HAVE_LIBJSON */ + const char *ver = "UNKNOWN"; + text *result = cstring2text(ver); + PG_RETURN_POINTER(result); +#endif +} + +PG_FUNCTION_INFO_V1(geom_from_geojson); +Datum geom_from_geojson(PG_FUNCTION_ARGS) +{ +#ifndef HAVE_LIBJSON + elog(ERROR, "You need JSON-C for ST_GeomFromGeoJSON"); + PG_RETURN_NULL(); +#else /* HAVE_LIBJSON */ + + GSERIALIZED *geom; + LWGEOM *lwgeom; + text *geojson_input; + int geojson_size; + char *geojson; + int root_srid=0; + bool hasz=true; + json_tokener* jstok = NULL; + json_object* poObj = NULL; + json_object* poObjSrs = NULL; + + /* Get the geojson stream */ + if (PG_ARGISNULL(0)) PG_RETURN_NULL(); + geojson_input = PG_GETARG_TEXT_P(0); + geojson = text2cstring(geojson_input); + geojson_size = VARSIZE(geojson_input) - VARHDRSZ; + + /* Begin to Parse json */ + jstok = json_tokener_new(); + poObj = json_tokener_parse_ex(jstok, geojson, -1); + if( jstok->err != json_tokener_success) + { + char err[256]; + snprintf(err, 256, "%s (at offset %d)", json_tokener_errors[jstok->err], jstok->char_offset); + json_tokener_free(jstok); + geojson_lwerror(err, 1); + } + json_tokener_free(jstok); + + poObjSrs = findMemberByName( poObj, "crs" ); + if (poObjSrs != NULL) + { + json_object* poObjSrsType = findMemberByName( poObjSrs, "type" ); + if (poObjSrsType != NULL) + { + json_object* poObjSrsProps = findMemberByName( poObjSrs, "properties" ); + json_object* poNameURL = findMemberByName( poObjSrsProps, "name" ); + const char* pszName = json_object_get_string( poNameURL ); + root_srid = getSRIDbySRS(pszName); + POSTGIS_DEBUGF(3, "getSRIDbySRS returned root_srid = %d.", root_srid ); + } + } + + lwgeom = parse_geojson(poObj, &hasz, &root_srid); + + lwgeom_add_bbox(lwgeom); + if (root_srid && lwgeom->srid == -1) lwgeom->srid = root_srid; + + if (!hasz) + { + LWGEOM *tmp = lwgeom_force_2d(lwgeom); + lwgeom_free(lwgeom); + lwgeom = tmp; + + POSTGIS_DEBUG(2, "geom_from_geojson called."); + } + + geom = geometry_serialize(lwgeom); + lwgeom_free(lwgeom); + + PG_RETURN_POINTER(geom); +#endif +} + diff -Nru postgis-1.5.3/postgis/lwgeom_in_gml.c postgis-2.0.1/postgis/lwgeom_in_gml.c --- postgis-1.5.3/postgis/lwgeom_in_gml.c 2011-04-30 08:38:39.000000000 +0000 +++ postgis-2.0.1/postgis/lwgeom_in_gml.c 2012-02-27 22:08:12.000000000 +0000 @@ -1,9 +1,9 @@ /********************************************************************** - * $Id: lwgeom_in_gml.c 7076 2011-04-30 08:38:39Z colivier $ + * $Id: lwgeom_in_gml.c 9324 2012-02-27 22:08:12Z pramsey $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net - * Copyright 2009 Oslandia + * Copyright 2009 - 2010 Oslandia * * This is free software; you can redistribute and/or modify it under * the terms of the GNU General Public Licence. See the COPYING file. @@ -16,9 +16,11 @@ * or an error message. * * Implement ISO SQL/MM ST_GMLToSQL method -* Cf: ISO 13249-3 -> 5.1.50 (p 134) +* Cf: ISO 13249-3:2009 -> 5.1.50 (p 134) * * GML versions supported: +* - Triangle, Tin and TriangulatedSurface, +* and PolyhedralSurface elements * - GML 3.2.1 Namespace * - GML 3.1.1 Simple Features profile SF-2 * (with backward compatibility to GML 3.1.0 and 3.0.0) @@ -32,21 +34,22 @@ **********************************************************************/ -#include "postgres.h" -#include "lwgeom_pg.h" -#include "liblwgeom.h" -#include "lwgeom_transform.h" -#include "executor/spi.h" - - #include #include #include #include +#include "postgres.h" +#include "executor/spi.h" + +#include "../postgis_config.h" +#include "lwgeom_pg.h" +#include "liblwgeom.h" +#include "lwgeom_transform.h" Datum geom_from_gml(PG_FUNCTION_ARGS); +static LWGEOM* lwgeom_from_gml(const char *wkt); static LWGEOM* parse_gml(xmlNodePtr xnode, bool *hasz, int *root_srid); typedef struct struct_gmlSrs @@ -61,74 +64,46 @@ #define GML32_NS ((char *) "http://www.opengis.net/gml/3.2") + +static void gml_lwerror(char *msg, int error_code) +{ + POSTGIS_DEBUGF(3, "ST_GeomFromGML ERROR %i", error_code); + lwerror("%s", msg); +} + /** * Ability to parse GML geometry fragment and to return an LWGEOM * or an error message. * * ISO SQL/MM define two error messages: -* Cf: ISO 13249-3 -> 5.1.50 (p 134) +* Cf: ISO 13249-3:2009 -> 5.1.50 (p 134) * - invalid GML representation * - unknown spatial reference system */ PG_FUNCTION_INFO_V1(geom_from_gml); Datum geom_from_gml(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom, *geom2d; - xmlDocPtr xmldoc; + GSERIALIZED *geom; text *xml_input; LWGEOM *lwgeom; - int xml_size; - uchar *srl; char *xml; - size_t size=0; - bool hasz=true; - int root_srid=0; - xmlNodePtr xmlroot=NULL; + int root_srid=SRID_UNKNOWN; /* Get the GML stream */ if (PG_ARGISNULL(0)) PG_RETURN_NULL(); xml_input = PG_GETARG_TEXT_P(0); + xml = text2cstring(xml_input); - xml_size = VARSIZE(xml_input) - VARHDRSZ; /* actual letters */ - xml = palloc(xml_size + 1); /* +1 for null */ - memcpy(xml, VARDATA(xml_input), xml_size); - xml[xml_size] = 0; /* null term */ + /* Zero for undefined */ + root_srid = PG_GETARG_INT32(1); - /* Begin to Parse XML doc */ - xmlInitParser(); - xmldoc = xmlParseMemory(xml, xml_size); - if (!xmldoc || (xmlroot = xmlDocGetRootElement(xmldoc)) == NULL) - { - xmlFreeDoc(xmldoc); - xmlCleanupParser(); - lwerror("invalid GML representation"); - } - - lwgeom = parse_gml(xmlroot, &hasz, &root_srid); - lwgeom->bbox = lwgeom_compute_box2d(lwgeom); - geom = pglwgeom_serialize(lwgeom); - lwgeom_release(lwgeom); + lwgeom = lwgeom_from_gml(xml); + if ( root_srid != SRID_UNKNOWN ) + lwgeom->srid = root_srid; - xmlFreeDoc(xmldoc); - xmlCleanupParser(); - - /* GML geometries could be either 2 or 3D and can be nested mixed. - * Missing Z dimension is even tolerated inside some GML coords - * - * So we deal with 3D in all structures allocation, and flag hasz - * to false if we met once a missing Z dimension - * In this case, we force recursive 2D. - */ - if (!hasz) - { - srl = lwalloc(VARSIZE(geom)); - lwgeom_force2d_recursive(SERIALIZED_FORM(geom), srl, &size); - geom2d = PG_LWGEOM_construct(srl, pglwgeom_getSRID(geom), - lwgeom_hasBBOX(geom->type)); - lwfree(geom); - geom = geom2d; - } + geom = geometry_serialize(lwgeom); + lwgeom_free(lwgeom); PG_RETURN_POINTER(geom); } @@ -148,34 +123,34 @@ * (because we work only on GML fragment, we don't want to * 'oblige' to add namespace on the geometry root node) */ - if (ns == NULL) { return !is_strict; } + if (ns == NULL) { return !is_strict; } - /* - * Handle namespaces: - * - http://www.opengis.net/gml (GML 3.1.1 and priors) - * - http://www.opengis.net/gml/3.2 (GML 3.2.1) - */ - for (p=ns ; *p ; p++) - { + /* + * Handle namespaces: + * - http://www.opengis.net/gml (GML 3.1.1 and priors) + * - http://www.opengis.net/gml/3.2 (GML 3.2.1) + */ + for (p=ns ; *p ; p++) + { if ((*p)->href == NULL || (*p)->prefix == NULL || xnode->ns == NULL || xnode->ns->prefix == NULL) continue; - if (!xmlStrcmp(xnode->ns->prefix, (*p)->prefix)) + if (!xmlStrcmp(xnode->ns->prefix, (*p)->prefix)) { - if ( !strcmp((char *) (*p)->href, GML_NS) + if ( !strcmp((char *) (*p)->href, GML_NS) || !strcmp((char *) (*p)->href, GML32_NS)) - { - xmlFree(ns); + { + xmlFree(ns); return true; - } else { + } else { xmlFree(ns); - return false; + return false; } - } - } + } + } - xmlFree(ns); - return !is_strict; /* Same reason here to not return false */ + xmlFree(ns); + return !is_strict; /* Same reason here to not return false */ } @@ -292,7 +267,7 @@ if (node_id != NULL) { if (!xmlStrcmp(node_id, p)) - lwerror("invalid GML representation"); + gml_lwerror("invalid GML representation", 2); xmlFree(node_id); } } @@ -303,28 +278,6 @@ /** - * Reverse X and Y axis on a given POINTARRAY - */ -static POINTARRAY* gml_reverse_axis_pa(POINTARRAY *pa) -{ - int i; - double d; - POINT4D p; - - for (i=0 ; i < pa->npoints ; i++) - { - getPoint4d_p(pa, i, &p); - d = p.y; - p.y = p.x; - p.x = d; - setPoint4d(pa, i, &p); - } - - return pa; -} - - -/** * Use Proj4 to reproject a given POINTARRAY */ static POINTARRAY* gml_reproject_pa(POINTARRAY *pa, int srid_in, int srid_out) @@ -334,14 +287,14 @@ projPJ in_pj, out_pj; char *text_in, *text_out; - if (srid_in == -1 || srid_out == -1) - lwerror("invalid GML representation"); + if (srid_in == SRID_UNKNOWN) return pa; /* nothing to do */ + if (srid_out == SRID_UNKNOWN) gml_lwerror("invalid GML representation", 3); text_in = GetProj4StringSPI(srid_in); text_out = GetProj4StringSPI(srid_out); - in_pj = make_project(text_in); - out_pj = make_project(text_out); + in_pj = lwproj_from_string(text_in); + out_pj = lwproj_from_string(text_out); lwfree(text_in); lwfree(text_out); @@ -349,8 +302,8 @@ for (i=0 ; i < pa->npoints ; i++) { getPoint4d_p(pa, i, &p); - transform_point(&p, in_pj, out_pj); - setPoint4d(pa, i, &p); + point4d_transform(&p, in_pj, out_pj); + ptarray_set_point4d(pa, i, &p); } pj_free(in_pj); @@ -398,10 +351,9 @@ /** * Parse gml srsName attribute */ -static gmlSrs* parse_gml_srs(xmlNodePtr xnode) +static void parse_gml_srs(xmlNodePtr xnode, gmlSrs *srs) { char *p; - gmlSrs *srs; int is_planar; xmlNodePtr node; xmlChar *srsname; @@ -410,73 +362,74 @@ node = xnode; srsname = gmlGetProp(node, (xmlChar *) "srsName"); + /*printf("srsname %s\n",srsname);*/ if (!srsname) { if (node->parent == NULL) { - srs = (gmlSrs*) lwalloc(sizeof(gmlSrs)); - srs->srid = -1; + srs->srid = SRID_UNKNOWN; srs->reverse_axis = false; - return srs; + return; } - return parse_gml_srs(node->parent); + parse_gml_srs(node->parent, srs); } + else + { + /* Severals srsName formats are available... + * cf WFS 1.1.0 -> 9.2 (p36) + * cf ISO 19142:2009 -> 7.9.2.4.4 (p34) + * cf RFC 5165 + * cf CITE WFS-1.1 (GetFeature-tc17.2) + */ - srs = (gmlSrs*) lwalloc(sizeof(gmlSrs)); - - /* Severals srsName formats are available... - * cf WFS 1.1.0 -> 9.2 (p36) - * cf ISO 19142 -> 7.9.2.4.4 (p34) - * cf RFC 5165 - * cf CITE WFS-1.1 (GetFeature-tc17.2) - */ - - /* SRS pattern like: EPSG:4326 - urn:EPSG:geographicCRS:4326 - urn:ogc:def:crs:EPSG:4326 - urn:ogc:def:crs:EPSG::4326 - urn:ogc:def:crs:EPSG:6.6:4326 - urn:x-ogc:def:crs:EPSG:6.6:4326 - http://www.opengis.net/gml/srs/epsg.xml#4326 - */ + /* SRS pattern like: EPSG:4326 + urn:EPSG:geographicCRS:4326 + urn:ogc:def:crs:EPSG:4326 + urn:ogc:def:crs:EPSG::4326 + urn:ogc:def:crs:EPSG:6.6:4326 + urn:x-ogc:def:crs:EPSG:6.6:4326 + http://www.opengis.net/gml/srs/epsg.xml#4326 + http://www.epsg.org/6.11.2/4326 + */ - if (!strncmp((char *) srsname, "EPSG:", 5)) - { - sep = ':'; - latlon = false; - } - else if (!strncmp((char *) srsname, "urn:ogc:def:crs:EPSG:", 21) - || !strncmp((char *) srsname, "urn:x-ogc:def:crs:EPSG:", 23) - || !strncmp((char *) srsname, "urn:EPSG:geographicCRS:", 23)) - { - sep = ':'; - latlon = true; - } - else if (!strncmp((char *) srsname, - "http://www.opengis.net/gml/srs/epsg.xml#", 40)) - { - sep = '#'; - latlon = false; - } - else lwerror("unknown spatial reference system"); + if (!strncmp((char *) srsname, "EPSG:", 5)) + { + sep = ':'; + latlon = false; + } + else if (!strncmp((char *) srsname, "urn:ogc:def:crs:EPSG:", 21) + || !strncmp((char *) srsname, "urn:x-ogc:def:crs:EPSG:", 23) + || !strncmp((char *) srsname, "urn:EPSG:geographicCRS:", 23)) + { + sep = ':'; + latlon = true; + } + else if (!strncmp((char *) srsname, + "http://www.opengis.net/gml/srs/epsg.xml#", 40)) + { + sep = '#'; + latlon = false; + } + else gml_lwerror("unknown spatial reference system", 4); - /* retrieve the last ':' or '#' char */ - for (p = (char *) srsname ; *p ; p++); - for (--p ; *p != sep ; p--) - if (!isdigit(*p)) lwerror("unknown spatial reference system"); + /* retrieve the last ':' or '#' char */ + for (p = (char *) srsname ; *p ; p++); + for (--p ; *p != sep ; p--) + if (!isdigit(*p)) gml_lwerror("unknown spatial reference system", 5); - srs->srid = atoi(++p); + srs->srid = atoi(++p); - /* Check into spatial_ref_sys that this SRID really exist */ - is_planar = gml_is_srid_planar(srs->srid); - if (srs->srid == -1 || is_planar == -1) - lwerror("unknown spatial reference system"); + /* Check into spatial_ref_sys that this SRID really exist */ + is_planar = gml_is_srid_planar(srs->srid); + if (srs->srid == SRID_UNKNOWN || is_planar == -1) + gml_lwerror("unknown spatial reference system", 6); - /* About lat/lon issue, Cf: http://tinyurl.com/yjpr55z */ - srs->reverse_axis = !is_planar && latlon; + /* About lat/lon issue, Cf: http://tinyurl.com/yjpr55z */ + srs->reverse_axis = !is_planar && latlon; - xmlFree(srsname); - return srs; + xmlFree(srsname); + return; + } } @@ -513,41 +466,41 @@ if (isdigit(*p)) { - if (st == INIT || st == NEED_DIG) st = DIG; + if (st == INIT || st == NEED_DIG) st = DIG; else if (st == NEED_DIG_DEC) st = DIG_DEC; else if (st == NEED_DIG_EXP || st == EXP) st = DIG_EXP; else if (st == DIG || st == DIG_DEC || st == DIG_EXP); - else lwerror("invalid GML representation"); + else gml_lwerror("invalid GML representation", 7); } else if (*p == '.') { if (st == DIG) st = NEED_DIG_DEC; - else lwerror("invalid GML representation"); + else gml_lwerror("invalid GML representation", 8); } else if (*p == '-' || *p == '+') { if (st == INIT) st = NEED_DIG; else if (st == EXP) st = NEED_DIG_EXP; - else lwerror("invalid GML representation"); + else gml_lwerror("invalid GML representation", 9); } else if (*p == 'e' || *p == 'E') { if (st == DIG || st == DIG_DEC) st = EXP; - else lwerror("invalid GML representation"); + else gml_lwerror("invalid GML representation", 10); } else if (isspace(*p)) { - if (!space_after) lwerror("invalid GML representation"); + if (!space_after) gml_lwerror("invalid GML representation", 11); if (st == DIG || st == DIG_DEC || st == DIG_EXP)st = END; else if (st == NEED_DIG_DEC) st = END; else if (st == END); - else lwerror("invalid GML representation"); + else gml_lwerror("invalid GML representation", 12); } - else lwerror("invalid GML representation"); + else gml_lwerror("invalid GML representation", 13); } if (st != DIG && st != NEED_DIG_DEC && st != DIG_DEC && st != DIG_EXP && st != END) - lwerror("invalid GML representation"); + gml_lwerror("invalid GML representation", 14); return atof(d); } @@ -560,13 +513,11 @@ { xmlChar *gml_coord, *gml_ts, *gml_cs, *gml_dec; char cs, ts, dec; - DYNPTARRAY *dpa; - POINTARRAY *pa; + POINTARRAY *dpa; int gml_dims; char *p, *q; bool digit; POINT4D pt; - uchar dims=0; /* We begin to retrieve coordinates string */ gml_coord = xmlNodeGetContent(xnode); @@ -584,7 +535,7 @@ else { if (xmlStrlen(gml_ts) > 1 || isdigit(gml_ts[0])) - lwerror("invalid GML representation"); + gml_lwerror("invalid GML representation", 15); ts = gml_ts[0]; xmlFree(gml_ts); } @@ -595,7 +546,7 @@ else { if (xmlStrlen(gml_cs) > 1 || isdigit(gml_cs[0])) - lwerror("invalid GML representation"); + gml_lwerror("invalid GML representation", 16); cs = gml_cs[0]; xmlFree(gml_cs); } @@ -606,17 +557,16 @@ else { if (xmlStrlen(gml_dec) > 1 || isdigit(gml_dec[0])) - lwerror("invalid GML representation"); + gml_lwerror("invalid GML representation", 17); dec = gml_dec[0]; xmlFree(gml_dec); } if (cs == ts || cs == dec || ts == dec) - lwerror("invalid GML representation"); + gml_lwerror("invalid GML representation", 18); - /* Now we create PointArray from coordinates values */ - TYPE_SETZM(dims, 1, 0); - dpa = dynptarray_create(1, dims); + /* HasZ, !HasM, 1 Point */ + dpa = ptarray_construct_empty(1, 0, 1); while (isspace(*p)) p++; /* Eat extra whitespaces if any */ for (q = p, gml_dims=0, digit = false ; *p ; p++) @@ -630,7 +580,7 @@ *p = '\0'; gml_dims++; - if (*(p+1) == '\0') lwerror("invalid GML representation"); + if (*(p+1) == '\0') gml_lwerror("invalid GML representation", 19); if (gml_dims == 1) pt.x = parse_gml_double(q, false, true); else if (gml_dims == 2) pt.y = parse_gml_double(q, false, true); @@ -645,7 +595,7 @@ gml_dims++; if (gml_dims < 2 || gml_dims > 3) - lwerror("invalid GML representation"); + gml_lwerror("invalid GML representation", 20); if (gml_dims == 3) pt.z = parse_gml_double(q, false, true); @@ -655,7 +605,7 @@ *hasz = false; } - dynptarray_addPoint4d(dpa, &pt, 0); + ptarray_append_point(dpa, &pt, LW_FALSE); digit = false; q = p+1; @@ -667,10 +617,8 @@ } xmlFree(gml_coord); - pa = ptarray_clone(dpa->pa); - lwfree(dpa); - return pa; + return dpa; /* ptarray_clone_deep(dpa); */ } @@ -680,25 +628,23 @@ static POINTARRAY* parse_gml_coord(xmlNodePtr xnode, bool *hasz) { xmlNodePtr xyz; - DYNPTARRAY *dpa; - POINTARRAY *pa; + POINTARRAY *dpa; bool x,y,z; xmlChar *c; POINT4D p; - uchar dims=0; - - TYPE_SETZM(dims, 1, 0); - dpa = dynptarray_create(1, dims); + /* HasZ?, !HasM, 1 Point */ + dpa = ptarray_construct_empty(1, 0, 1); + x = y = z = false; for (xyz = xnode->children ; xyz != NULL ; xyz = xyz->next) { - if (xyz->type != XML_ELEMENT_NODE) continue; + if (!is_gml_namespace(xyz, false)) continue; if (!strcmp((char *) xyz->name, "X")) { - if (x) lwerror("invalid GML representation"); + if (x) gml_lwerror("invalid GML representation", 21); c = xmlNodeGetContent(xyz); p.x = parse_gml_double((char *) c, true, true); x = true; @@ -706,7 +652,7 @@ } else if (!strcmp((char *) xyz->name, "Y")) { - if (y) lwerror("invalid GML representation"); + if (y) gml_lwerror("invalid GML representation", 22); c = xmlNodeGetContent(xyz); p.y = parse_gml_double((char *) c, true, true); y = true; @@ -714,7 +660,7 @@ } else if (!strcmp((char *) xyz->name, "Z")) { - if (z) lwerror("invalid GML representation"); + if (z) gml_lwerror("invalid GML representation", 23); c = xmlNodeGetContent(xyz); p.z = parse_gml_double((char *) c, true, true); z = true; @@ -722,16 +668,13 @@ } } /* Check dimension consistancy */ - if (!x || !y) lwerror("invalid GML representation"); + if (!x || !y) gml_lwerror("invalid GML representation", 24); if (!z) *hasz = false; - dynptarray_addPoint4d(dpa, &p, 0); + ptarray_append_point(dpa, &p, LW_FALSE); x = y = z = false; - pa = ptarray_clone(dpa->pa); - lwfree(dpa); - - return pa; + return ptarray_clone_deep(dpa); } @@ -743,21 +686,19 @@ xmlChar *dimension, *gmlpos; xmlNodePtr posnode; int dim, gml_dim; - DYNPTARRAY *dpa; - POINTARRAY *pa; + POINTARRAY *dpa; char *pos, *p; bool digit; POINT4D pt; - uchar dims=0; - TYPE_SETZM(dims, 1, 0); - dpa = dynptarray_create(1, dims); + /* HasZ, !HasM, 1 Point */ + dpa = ptarray_construct_empty(1, 0, 1); for (posnode = xnode ; posnode != NULL ; posnode = posnode->next) { - /* We only care about gml:pos element */ if (posnode->type != XML_ELEMENT_NODE) continue; + if (!is_gml_namespace(posnode, false)) continue; if (strcmp((char *) posnode->name, "pos")) continue; dimension = gmlGetProp(xnode, (xmlChar *) "srsDimension"); @@ -769,7 +710,7 @@ dim = atoi((char *) dimension); xmlFree(dimension); if (dim < 2 || dim > 3) - lwerror("invalid GML representation"); + gml_lwerror("invalid GML representation", 25); } if (dim == 2) *hasz = false; @@ -783,11 +724,9 @@ */ for (p=pos, gml_dim=0, digit=false ; *pos ; pos++) { - if (isdigit(*pos)) digit = true; if (digit && (*pos == ' ' || *(pos+1) == '\0')) { - if (*pos == ' ') *pos = '\0'; gml_dim++; if (gml_dim == 1) @@ -806,15 +745,12 @@ /* Test again coherent dimensions on each coord */ if (gml_dim == 2) *hasz = false; if (gml_dim < 2 || gml_dim > 3 || gml_dim != dim) - lwerror("invalid GML representation"); + gml_lwerror("invalid GML representation", 26); - dynptarray_addPoint4d(dpa, &pt, 0); + ptarray_append_point(dpa, &pt, LW_FALSE); } - pa = ptarray_clone(dpa->pa); - lwfree(dpa); - - return pa; + return ptarray_clone_deep(dpa); } @@ -826,11 +762,9 @@ xmlChar *dimension, *gmlposlist; char *poslist, *p; int dim, gml_dim; - DYNPTARRAY *dpa; - POINTARRAY *pa; + POINTARRAY *dpa; POINT4D pt; bool digit; - uchar dims=0; /* Retrieve gml:srsDimension attribute if any */ dimension = gmlGetProp(xnode, (xmlChar *) "srsDimension"); @@ -841,7 +775,7 @@ { dim = atoi((char *) dimension); xmlFree(dimension); - if (dim < 2 || dim > 3) lwerror("invalid GML representation"); + if (dim < 2 || dim > 3) gml_lwerror("invalid GML representation", 27); } if (dim == 2) *hasz = false; @@ -849,8 +783,8 @@ gmlposlist = xmlNodeGetContent(xnode); poslist = (char *) gmlposlist; - TYPE_SETZM(dims, 1, 0); - dpa = dynptarray_create(1, dims); + /* HasZ?, !HasM, 1 point */ + dpa = ptarray_construct_empty(1, 0, 1); /* gml:posList pattern: x1 y1 x2 y2 * x1 y1 z1 x2 y2 z2 @@ -858,11 +792,9 @@ while (isspace(*poslist)) poslist++; /* Eat extra whitespaces if any */ for (p=poslist, gml_dim=0, digit=false ; *poslist ; poslist++) { - if (isdigit(*poslist)) digit = true; if (digit && (*poslist == ' ' || *(poslist+1) == '\0')) { - if (*poslist == ' ') *poslist = '\0'; gml_dim++; @@ -872,11 +804,11 @@ if (gml_dim == dim) { - dynptarray_addPoint4d(dpa, &pt, 0); + ptarray_append_point(dpa, &pt, LW_FALSE); gml_dim = 0; } else if (*(poslist+1) == '\0') - lwerror("invalid GML representation"); + gml_lwerror("invalid GML representation", 28); p = poslist+1; digit = false; @@ -884,10 +816,8 @@ } xmlFree(gmlposlist); - pa = ptarray_clone(dpa->pa); - lwfree(dpa); - return pa; + return ptarray_clone_deep(dpa); } @@ -907,14 +837,13 @@ { POINTARRAY *pa = 0, *tmp_pa = 0; xmlNodePtr xa, xb; - gmlSrs *srs = 0; + gmlSrs srs; bool found; pa = NULL; for (xa = xnode ; xa != NULL ; xa = xa->next) { - if (xa->type != XML_ELEMENT_NODE) continue; if (!is_gml_namespace(xa, false)) continue; if (xa->name == NULL) continue; @@ -963,31 +892,27 @@ } } if (!found || xb == NULL) - lwerror("invalid GML representation"); + gml_lwerror("invalid GML representation", 29); if (is_xlink(xb)) xb = get_xlink_node(xb); if (xb == NULL || xb->children == NULL) - lwerror("invalid GML representation"); + gml_lwerror("invalid GML representation", 30); tmp_pa = parse_gml_data(xb->children, hasz, root_srid); if (tmp_pa->npoints != 1) - lwerror("invalid GML representation"); + gml_lwerror("invalid GML representation", 31); - srs = parse_gml_srs(xb); - if (srs->reverse_axis) tmp_pa = gml_reverse_axis_pa(tmp_pa); - if (!*root_srid) *root_srid = srs->srid; - else - { - if (srs->srid != *root_srid) - gml_reproject_pa(tmp_pa, srs->srid, *root_srid); - } + parse_gml_srs(xb, &srs); + if (srs.reverse_axis) tmp_pa = ptarray_flip_coordinates(tmp_pa); + if (*root_srid == SRID_UNKNOWN) *root_srid = srs.srid; + else if (srs.srid != *root_srid) + gml_reproject_pa(tmp_pa, srs.srid, *root_srid); if (pa == NULL) pa = tmp_pa; else pa = ptarray_merge(pa, tmp_pa); - lwfree(srs); } } - if (pa == NULL) lwerror("invalid GML representation"); + if (pa == NULL) gml_lwerror("invalid GML representation", 32); return pa; } @@ -998,30 +923,31 @@ */ static LWGEOM* parse_gml_point(xmlNodePtr xnode, bool *hasz, int *root_srid) { - gmlSrs *srs; + gmlSrs srs; LWGEOM *geom; POINTARRAY *pa; if (is_xlink(xnode)) xnode = get_xlink_node(xnode); - if (xnode->children == NULL) lwerror("invalid GML representation"); + if (xnode->children == NULL) + return lwpoint_as_lwgeom(lwpoint_construct_empty(*root_srid, 0, 0)); + pa = parse_gml_data(xnode->children, hasz, root_srid); - if (pa->npoints != 1) lwerror("invalid GML representation"); + if (pa->npoints != 1) gml_lwerror("invalid GML representation", 34); - srs = parse_gml_srs(xnode); - if (srs->reverse_axis) pa = gml_reverse_axis_pa(pa); + parse_gml_srs(xnode, &srs); + if (srs.reverse_axis) pa = ptarray_flip_coordinates(pa); if (!*root_srid) { - *root_srid = srs->srid; + *root_srid = srs.srid; geom = (LWGEOM *) lwpoint_construct(*root_srid, NULL, pa); } else { - if (srs->srid != *root_srid) - gml_reproject_pa(pa, srs->srid, *root_srid); - geom = (LWGEOM *) lwpoint_construct(-1, NULL, pa); + if (srs.srid != *root_srid) + gml_reproject_pa(pa, srs.srid, *root_srid); + geom = (LWGEOM *) lwpoint_construct(SRID_UNKNOWN, NULL, pa); } - lwfree(srs); return geom; } @@ -1032,30 +958,31 @@ */ static LWGEOM* parse_gml_line(xmlNodePtr xnode, bool *hasz, int *root_srid) { - gmlSrs *srs; + gmlSrs srs; LWGEOM *geom; POINTARRAY *pa; if (is_xlink(xnode)) xnode = get_xlink_node(xnode); - if (xnode->children == NULL) lwerror("invalid GML representation"); + if (xnode->children == NULL) + return lwline_as_lwgeom(lwline_construct_empty(*root_srid, 0, 0)); + pa = parse_gml_data(xnode->children, hasz, root_srid); - if (pa->npoints < 2) lwerror("invalid GML representation"); + if (pa->npoints < 2) gml_lwerror("invalid GML representation", 36); - srs = parse_gml_srs(xnode); - if (srs->reverse_axis) pa = gml_reverse_axis_pa(pa); + parse_gml_srs(xnode, &srs); + if (srs.reverse_axis) pa = ptarray_flip_coordinates(pa); if (!*root_srid) { - *root_srid = srs->srid; + *root_srid = srs.srid; geom = (LWGEOM *) lwline_construct(*root_srid, NULL, pa); } else { - if (srs->srid != *root_srid) - gml_reproject_pa(pa, srs->srid, *root_srid); - geom = (LWGEOM *) lwline_construct(-1, NULL, pa); + if (srs.srid != *root_srid) + gml_reproject_pa(pa, srs.srid, *root_srid); + geom = (LWGEOM *) lwline_construct(SRID_UNKNOWN, NULL, pa); } - lwfree(srs); return geom; } @@ -1069,11 +996,11 @@ xmlNodePtr xa; int lss, last, i; bool found=false; - gmlSrs *srs=NULL; + gmlSrs srs; LWGEOM *geom=NULL; POINTARRAY *pa=NULL; POINTARRAY **ppa=NULL; - unsigned int npoints=0; + uint32 npoints=0; xmlChar *interpolation=NULL; if (is_xlink(xnode)) xnode = get_xlink_node(xnode); @@ -1081,7 +1008,6 @@ /* Looking for gml:segments */ for (xa = xnode->children ; xa != NULL ; xa = xa->next) { - if (xa->type != XML_ELEMENT_NODE) continue; if (!is_gml_namespace(xa, false)) continue; if (!strcmp((char *) xa->name, "segments")) @@ -1090,14 +1016,13 @@ break; } } - if (!found) lwerror("invalid GML representation"); + if (!found) gml_lwerror("invalid GML representation", 37); ppa = (POINTARRAY**) lwalloc(sizeof(POINTARRAY*)); /* Processing each gml:LineStringSegment */ for (xa = xa->children, lss=0; xa != NULL ; xa = xa->next) { - if (xa->type != XML_ELEMENT_NODE) continue; if (!is_gml_namespace(xa, false)) continue; if (strcmp((char *) xa->name, "LineStringSegment")) continue; @@ -1107,7 +1032,7 @@ if (interpolation != NULL) { if (strcmp((char *) interpolation, "linear")) - lwerror("invalid GML representation"); + gml_lwerror("invalid GML representation", 38); xmlFree(interpolation); } @@ -1117,19 +1042,18 @@ ppa[lss] = parse_gml_data(xa->children, hasz, root_srid); npoints += ppa[lss]->npoints; if (ppa[lss]->npoints < 2) - lwerror("invalid GML representation"); + gml_lwerror("invalid GML representation", 39); lss++; } - if (lss == 0) lwerror("invalid GML representation"); + if (lss == 0) gml_lwerror("invalid GML representation", 40); /* Most common case, a single segment */ if (lss == 1) pa = ppa[0]; - /* * "The curve segments are connected to one another, with the end point * of each segment except the last being the start point of the next - * segment" from ISO 19107 -> 6.3.16.1 (p43) + * segment" from ISO 19107:2003 -> 6.3.16.1 (p43) * * So we must aggregate all the segments into a single one and avoid * to copy the redundants points @@ -1139,18 +1063,17 @@ pa = ptarray_construct(1, 0, npoints - (lss - 1)); for (last = npoints = i = 0; i < lss ; i++) { - if (i + 1 == lss) last = 1; /* Check if segments are not disjoints */ if (i > 0 && memcmp( getPoint_internal(pa, npoints), getPoint_internal(ppa[i], 0), *hasz?sizeof(POINT3D):sizeof(POINT2D))) - lwerror("invalid GML representation"); + gml_lwerror("invalid GML representation", 41); /* Aggregate stuff */ memcpy( getPoint_internal(pa, npoints), getPoint_internal(ppa[i], 0), - pointArray_ptsize(ppa[i]) * (ppa[i]->npoints + last)); + ptarray_point_size(ppa[i]) * (ppa[i]->npoints + last)); npoints += ppa[i]->npoints - 1; lwfree(ppa[i]); @@ -1158,20 +1081,43 @@ lwfree(ppa); } - srs = parse_gml_srs(xnode); - if (srs->reverse_axis) pa = gml_reverse_axis_pa(pa); - if (!*root_srid) - { - *root_srid = srs->srid; - geom = (LWGEOM *) lwline_construct(*root_srid, NULL, pa); - } - else - { - if (srs->srid != *root_srid) - gml_reproject_pa(pa, srs->srid, *root_srid); - geom = (LWGEOM *) lwline_construct(-1, NULL, pa); - } - lwfree(srs); + parse_gml_srs(xnode, &srs); + if (srs.reverse_axis) pa = ptarray_flip_coordinates(pa); + if (srs.srid != *root_srid && *root_srid != SRID_UNKNOWN) + gml_reproject_pa(pa, srs.srid, *root_srid); + geom = (LWGEOM *) lwline_construct(*root_srid, NULL, pa); + + return geom; +} + + +/** + * Parse GML LinearRing (3.1.1) + */ +static LWGEOM* parse_gml_linearring(xmlNodePtr xnode, bool *hasz, int *root_srid) +{ + gmlSrs srs; + LWGEOM *geom; + POINTARRAY **ppa = NULL; + + if (is_xlink(xnode)) xnode = get_xlink_node(xnode); + parse_gml_srs(xnode, &srs); + + ppa = (POINTARRAY**) lwalloc(sizeof(POINTARRAY*)); + ppa[0] = parse_gml_data(xnode->children, hasz, root_srid); + + if (ppa[0]->npoints < 4 + || (!*hasz && !ptarray_isclosed2d(ppa[0])) + || (*hasz && !ptarray_isclosed3d(ppa[0]))) + gml_lwerror("invalid GML representation", 42); + + if (srs.reverse_axis) + ppa[0] = ptarray_flip_coordinates(ppa[0]); + + if (srs.srid != *root_srid && *root_srid != SRID_UNKNOWN) + gml_reproject_pa(ppa[0], srs.srid, *root_srid); + + geom = (LWGEOM *) lwpoly_construct(*root_srid, NULL, 1, ppa); return geom; } @@ -1182,7 +1128,7 @@ */ static LWGEOM* parse_gml_polygon(xmlNodePtr xnode, bool *hasz, int *root_srid) { - gmlSrs *srs; + gmlSrs srs; int i, ring; LWGEOM *geom; xmlNodePtr xa, xb; @@ -1190,10 +1136,13 @@ if (is_xlink(xnode)) xnode = get_xlink_node(xnode); - srs = parse_gml_srs(xnode); + if (xnode->children == NULL) + return lwpoly_as_lwgeom(lwpoly_construct_empty(*root_srid, 0, 0)); + + parse_gml_srs(xnode, &srs); + for (xa = xnode->children ; xa != NULL ; xa = xa->next) { - /* Polygon/outerBoundaryIs -> GML 2.1.2 */ /* Polygon/exterior -> GML 3.1.1 */ if (xa->type != XML_ELEMENT_NODE) continue; @@ -1203,7 +1152,6 @@ for (xb = xa->children ; xb != NULL ; xb = xb->next) { - if (xb->type != XML_ELEMENT_NODE) continue; if (!is_gml_namespace(xb, false)) continue; if (strcmp((char *) xb->name, "LinearRing")) continue; @@ -1214,15 +1162,14 @@ if (ppa[0]->npoints < 4 || (!*hasz && !ptarray_isclosed2d(ppa[0])) || (*hasz && !ptarray_isclosed3d(ppa[0]))) - lwerror("invalid GML representation"); + gml_lwerror("invalid GML representation", 43); - if (srs->reverse_axis) ppa[0] = gml_reverse_axis_pa(ppa[0]); + if (srs.reverse_axis) ppa[0] = ptarray_flip_coordinates(ppa[0]); } } for (ring=1, xa = xnode->children ; xa != NULL ; xa = xa->next) { - /* Polygon/innerBoundaryIs -> GML 2.1.2 */ /* Polygon/interior -> GML 3.1.1 */ if (xa->type != XML_ELEMENT_NODE) continue; @@ -1232,7 +1179,6 @@ for (xb = xa->children ; xb != NULL ; xb = xb->next) { - if (xb->type != XML_ELEMENT_NODE) continue; if (!is_gml_namespace(xb, false)) continue; if (strcmp((char *) xb->name, "LinearRing")) continue; @@ -1244,56 +1190,205 @@ if (ppa[ring]->npoints < 4 || (!*hasz && !ptarray_isclosed2d(ppa[ring])) || (*hasz && !ptarray_isclosed3d(ppa[ring]))) - lwerror("invalid GML representation"); + gml_lwerror("invalid GML representation", 43); - if (srs->reverse_axis) ppa[ring] = gml_reverse_axis_pa(ppa[ring]); + if (srs.reverse_axis) ppa[ring] = ptarray_flip_coordinates(ppa[ring]); ring++; } } /* Exterior Ring is mandatory */ - if (ppa == NULL || ppa[0] == NULL) lwerror("invalid GML representation"); + if (ppa == NULL || ppa[0] == NULL) gml_lwerror("invalid GML representation", 44); - if (!*root_srid) + if (srs.srid != *root_srid && *root_srid != SRID_UNKNOWN) { - *root_srid = srs->srid; - geom = (LWGEOM *) lwpoly_construct(*root_srid, NULL, ring, ppa); + for (i=0 ; i < ring ; i++) + gml_reproject_pa(ppa[i], srs.srid, *root_srid); } - else + geom = (LWGEOM *) lwpoly_construct(*root_srid, NULL, ring, ppa); + + return geom; +} + + +/** + * Parse GML Triangle (3.1.1) + */ +static LWGEOM* parse_gml_triangle(xmlNodePtr xnode, bool *hasz, int *root_srid) +{ + gmlSrs srs; + LWGEOM *geom; + xmlNodePtr xa, xb; + POINTARRAY *pa = NULL; + xmlChar *interpolation=NULL; + + if (is_xlink(xnode)) xnode = get_xlink_node(xnode); + + if (xnode->children == NULL) + return lwtriangle_as_lwgeom(lwtriangle_construct_empty(*root_srid, 0, 0)); + + /* GML SF is resticted to planar interpolation + NOTA: I know Triangle is not part of SF, but + we have to be consistent with other surfaces */ + interpolation = gmlGetProp(xnode, (xmlChar *) "interpolation"); + if (interpolation != NULL) { - if (srs->srid != *root_srid) + if (strcmp((char *) interpolation, "planar")) + gml_lwerror("invalid GML representation", 45); + xmlFree(interpolation); + } + + parse_gml_srs(xnode, &srs); + + for (xa = xnode->children ; xa != NULL ; xa = xa->next) + { + /* Triangle/exterior */ + if (xa->type != XML_ELEMENT_NODE) continue; + if (!is_gml_namespace(xa, false)) continue; + if (strcmp((char *) xa->name, "exterior")) continue; + + for (xb = xa->children ; xb != NULL ; xb = xb->next) { - for (i=0 ; i < ring ; i++) - gml_reproject_pa(ppa[i], srs->srid, *root_srid); + /* Triangle/exterior/LinearRing */ + if (xb->type != XML_ELEMENT_NODE) continue; + if (!is_gml_namespace(xb, false)) continue; + if (strcmp((char *) xb->name, "LinearRing")) continue; + + pa = (POINTARRAY*) lwalloc(sizeof(POINTARRAY)); + pa = parse_gml_data(xb->children, hasz, root_srid); + + if (pa->npoints != 4 + || (!*hasz && !ptarray_isclosed2d(pa)) + || (*hasz && !ptarray_isclosed3d(pa))) + gml_lwerror("invalid GML representation", 46); + + if (srs.reverse_axis) pa = ptarray_flip_coordinates(pa); } - geom = (LWGEOM *) lwpoly_construct(-1, NULL, ring, ppa); } - lwfree(srs); + + /* Exterior Ring is mandatory */ + if (pa == NULL) gml_lwerror("invalid GML representation", 47); + + if (srs.srid != *root_srid && *root_srid != SRID_UNKNOWN) + gml_reproject_pa(pa, srs.srid, *root_srid); + + geom = (LWGEOM *) lwtriangle_construct(*root_srid, NULL, pa); return geom; } /** - * Parse GML Surface (3.1.1) + * Parse GML PolygonPatch (3.1.1) */ -static LWGEOM* parse_gml_surface(xmlNodePtr xnode, bool *hasz, int *root_srid) +static LWGEOM* parse_gml_patch(xmlNodePtr xnode, bool *hasz, int *root_srid) { - xmlNodePtr xa, xb, xc; xmlChar *interpolation=NULL; POINTARRAY **ppa=NULL; - int i, patch, ring=0; LWGEOM *geom=NULL; - gmlSrs *srs=NULL; + xmlNodePtr xa, xb; + int i, ring=0; + gmlSrs srs; + + /* PolygonPatch */ + if (strcmp((char *) xnode->name, "PolygonPatch")) + gml_lwerror("invalid GML representation", 48); + + /* GML SF is resticted to planar interpolation */ + interpolation = gmlGetProp(xnode, (xmlChar *) "interpolation"); + if (interpolation != NULL) + { + if (strcmp((char *) interpolation, "planar")) + gml_lwerror("invalid GML representation", 48); + xmlFree(interpolation); + } + + parse_gml_srs(xnode, &srs); + + /* PolygonPatch/exterior */ + for (xa = xnode->children ; xa != NULL ; xa = xa->next) + { + if (!is_gml_namespace(xa, false)) continue; + if (strcmp((char *) xa->name, "exterior")) continue; + + /* PolygonPatch/exterior/LinearRing */ + for (xb = xa->children ; xb != NULL ; xb = xb->next) + { + if (xb->type != XML_ELEMENT_NODE) continue; + if (!is_gml_namespace(xb, false)) continue; + if (strcmp((char *) xb->name, "LinearRing")) continue; + + ppa = (POINTARRAY**) lwalloc(sizeof(POINTARRAY*)); + ppa[0] = parse_gml_data(xb->children, hasz, root_srid); + + if (ppa[0]->npoints < 4 + || (!*hasz && !ptarray_isclosed2d(ppa[0])) + || (*hasz && !ptarray_isclosed3d(ppa[0]))) + gml_lwerror("invalid GML representation", 48); + + if (srs.reverse_axis) + ppa[0] = ptarray_flip_coordinates(ppa[0]); + } + } + + /* PolygonPatch/interior */ + for (ring=1, xa = xnode->children ; xa != NULL ; xa = xa->next) + { + if (xa->type != XML_ELEMENT_NODE) continue; + if (!is_gml_namespace(xa, false)) continue; + if (strcmp((char *) xa->name, "interior")) continue; + + /* PolygonPatch/interior/LinearRing */ + for (xb = xa->children ; xb != NULL ; xb = xb->next) + { + if (xb->type != XML_ELEMENT_NODE) continue; + if (strcmp((char *) xb->name, "LinearRing")) continue; + + ppa = (POINTARRAY**) lwrealloc((POINTARRAY *) ppa, + sizeof(POINTARRAY*) * (ring + 1)); + ppa[ring] = parse_gml_data(xb->children, hasz, root_srid); + + if (ppa[ring]->npoints < 4 + || (!*hasz && !ptarray_isclosed2d(ppa[ring])) + || ( *hasz && !ptarray_isclosed3d(ppa[ring]))) + gml_lwerror("invalid GML representation", 49); + + if (srs.reverse_axis) + ppa[ring] = ptarray_flip_coordinates(ppa[ring]); + + ring++; + } + } + + /* Exterior Ring is mandatory */ + if (ppa == NULL || ppa[0] == NULL) gml_lwerror("invalid GML representation", 50); + + if (srs.srid != *root_srid && *root_srid != SRID_UNKNOWN) + { + for (i=0 ; i < ring ; i++) + gml_reproject_pa(ppa[i], srs.srid, *root_srid); + } + geom = (LWGEOM *) lwpoly_construct(*root_srid, NULL, ring, ppa); + + return geom; +} + + +/** + * Parse GML Surface (3.1.1) + */ +static LWGEOM* parse_gml_surface(xmlNodePtr xnode, bool *hasz, int *root_srid) +{ + xmlNodePtr xa; + int patch; + LWGEOM *geom=NULL; bool found=false; if (is_xlink(xnode)) xnode = get_xlink_node(xnode); - srs = parse_gml_srs(xnode); /* Looking for gml:patches */ for (xa = xnode->children ; xa != NULL ; xa = xa->next) { - if (xa->type != XML_ELEMENT_NODE) continue; if (!is_gml_namespace(xa, false)) continue; if (!strcmp((char *) xa->name, "patches")) @@ -1302,104 +1397,81 @@ break; } } - if (!found) lwerror("invalid GML representation"); + if (!found) gml_lwerror("invalid GML representation", 51); /* Processing gml:PolygonPatch */ for (patch=0, xa = xa->children ; xa != NULL ; xa = xa->next) { - if (xa->type != XML_ELEMENT_NODE) continue; if (!is_gml_namespace(xa, false)) continue; if (strcmp((char *) xa->name, "PolygonPatch")) continue; patch++; /* SQL/MM define ST_CurvePolygon as a single patch only, - cf ISO 13249-3 -> 4.2.9 (p27) */ - if (patch > 1) lwerror("invalid GML representation"); - - /* GML SF is resticted to planar interpolation */ - interpolation = gmlGetProp(xa, (xmlChar *) "interpolation"); - if (interpolation != NULL) - { - if (strcmp((char *) interpolation, "planar")) - lwerror("invalid GML representation"); - xmlFree(interpolation); - } + cf ISO 13249-3:2009 -> 4.2.9 (p27) */ + if (patch > 1) gml_lwerror("invalid GML representation", 52); - /* PolygonPatch/exterior */ - for (xb = xa->children ; xb != NULL ; xb = xb->next) - { - if (strcmp((char *) xb->name, "exterior")) continue; + geom = parse_gml_patch(xa, hasz, root_srid); + } - /* PolygonPatch/exterior/LinearRing */ - for (xc = xb->children ; xc != NULL ; xc = xc->next) - { + if (!patch) gml_lwerror("invalid GML representation", 53); - if (xc->type != XML_ELEMENT_NODE) continue; - if (!is_gml_namespace(xc, false)) continue; - if (strcmp((char *) xc->name, "LinearRing")) continue; - - ppa = (POINTARRAY**) lwalloc(sizeof(POINTARRAY*)); - ppa[0] = parse_gml_data(xc->children, hasz, root_srid); - - if (ppa[0]->npoints < 4 - || (!*hasz && !ptarray_isclosed2d(ppa[0])) - || (*hasz && !ptarray_isclosed3d(ppa[0]))) - lwerror("invalid GML representation"); + return geom; +} - if (srs->reverse_axis) ppa[0] = gml_reverse_axis_pa(ppa[0]); - } - } - /* PolygonPatch/interior */ - for (ring=1, xb = xa->children ; xb != NULL ; xb = xb->next) - { +/** + * Parse GML Tin (and TriangulatedSurface) (3.1.1) + * + * TODO handle also Tin attributes: + * - stopLines + * - breakLines + * - maxLength + * - position + */ +static LWGEOM* parse_gml_tin(xmlNodePtr xnode, bool *hasz, int *root_srid) +{ + gmlSrs srs; + xmlNodePtr xa; + LWGEOM *geom=NULL; + bool found=false; - if (xb->type != XML_ELEMENT_NODE) continue; - if (!is_gml_namespace(xb, false)) continue; - if (strcmp((char *) xb->name, "interior")) continue; + if (is_xlink(xnode)) xnode = get_xlink_node(xnode); - /* PolygonPatch/interior/LinearRing */ - for (xc = xb->children ; xc != NULL ; xc = xc->next) - { - if (xc->type != XML_ELEMENT_NODE) continue; - if (strcmp((char *) xc->name, "LinearRing")) continue; + parse_gml_srs(xnode, &srs); + if (*root_srid == SRID_UNKNOWN && srs.srid != SRID_UNKNOWN) + *root_srid = srs.srid; - ppa = (POINTARRAY**) lwrealloc((POINTARRAY *) ppa, - sizeof(POINTARRAY*) * (ring + 1)); - ppa[ring] = parse_gml_data(xc->children, hasz, root_srid); - - if (ppa[ring]->npoints < 4 - || (!*hasz && !ptarray_isclosed2d(ppa[ring])) - || ( *hasz && !ptarray_isclosed3d(ppa[ring]))) - lwerror("invalid GML representation"); + geom = (LWGEOM *)lwcollection_construct_empty(TINTYPE, *root_srid, 1, 0); - if (srs->reverse_axis) - ppa[ring] = gml_reverse_axis_pa(ppa[ring]); + if (xnode->children == NULL) + return geom; - ring++; - } + /* Looking for gml:patches or gml:trianglePatches */ + for (xa = xnode->children ; xa != NULL ; xa = xa->next) + { + if (xa->type != XML_ELEMENT_NODE) continue; + if (!is_gml_namespace(xa, false)) continue; + if (!strcmp((char *) xa->name, "patches") || + !strcmp((char *) xa->name, "trianglePatches")) + { + found = true; + break; } } + if (!found) return geom; /* empty one */ - /* Exterior Ring is mandatory */ - if (ppa == NULL || ppa[0] == NULL) lwerror("invalid GML representation"); - - if (!*root_srid) + /* Processing each gml:Triangle */ + for (xa = xa->children ; xa != NULL ; xa = xa->next) { - *root_srid = srs->srid; - geom = (LWGEOM *) lwpoly_construct(*root_srid, NULL, ring, ppa); - } - else - { - if (srs->srid != *root_srid) - { - for (i=0 ; i < ring ; i++) - gml_reproject_pa(ppa[i], srs->srid, *root_srid); - } - geom = (LWGEOM *) lwpoly_construct(-1, NULL, ring, ppa); + if (xa->type != XML_ELEMENT_NODE) continue; + if (!is_gml_namespace(xa, false)) continue; + if (strcmp((char *) xa->name, "Triangle")) continue; + + if (xa->children != NULL) + geom = (LWGEOM*) lwtin_add_lwtriangle((LWTIN *) geom, + (LWTRIANGLE *) parse_gml_triangle(xa, hasz, root_srid)); } - lwfree(srs); return geom; } @@ -1410,36 +1482,30 @@ */ static LWGEOM* parse_gml_mpoint(xmlNodePtr xnode, bool *hasz, int *root_srid) { - gmlSrs *srs; + gmlSrs srs; xmlNodePtr xa; LWGEOM *geom = NULL; if (is_xlink(xnode)) xnode = get_xlink_node(xnode); - srs = parse_gml_srs(xnode); - if (!*root_srid) - { - *root_srid = srs->srid; - geom = (LWGEOM *)lwcollection_construct_empty(*root_srid, 1, 0); - geom->type = lwgeom_makeType(1, 1, 0, MULTIPOINTTYPE); - } - else - { - geom = (LWGEOM *)lwcollection_construct_empty(-1, 1, 0); - geom->type = lwgeom_makeType(1, 0, 0, MULTIPOINTTYPE); - } - lwfree(srs); + parse_gml_srs(xnode, &srs); + if (*root_srid == SRID_UNKNOWN && srs.srid != SRID_UNKNOWN) + *root_srid = srs.srid; + + geom = (LWGEOM *)lwcollection_construct_empty(MULTIPOINTTYPE, *root_srid, 1, 0); + + if (xnode->children == NULL) + return geom; for (xa = xnode->children ; xa != NULL ; xa = xa->next) { - /* MultiPoint/pointMember */ if (xa->type != XML_ELEMENT_NODE) continue; if (!is_gml_namespace(xa, false)) continue; if (strcmp((char *) xa->name, "pointMember")) continue; if (xa->children != NULL) - geom = lwmpoint_add((LWMPOINT *)geom, -1, - parse_gml(xa->children, hasz, root_srid)); + geom = (LWGEOM*)lwmpoint_add_lwpoint((LWMPOINT*)geom, + (LWPOINT*)parse_gml(xa->children, hasz, root_srid)); } return geom; @@ -1451,36 +1517,30 @@ */ static LWGEOM* parse_gml_mline(xmlNodePtr xnode, bool *hasz, int *root_srid) { - gmlSrs *srs; + gmlSrs srs; xmlNodePtr xa; LWGEOM *geom = NULL; if (is_xlink(xnode)) xnode = get_xlink_node(xnode); - srs = parse_gml_srs(xnode); - if (!*root_srid) - { - *root_srid = srs->srid; - geom = (LWGEOM *)lwcollection_construct_empty(*root_srid, 1, 0); - geom->type = lwgeom_makeType(1, 1, 0, MULTILINETYPE); - } - else - { - geom = (LWGEOM *)lwcollection_construct_empty(-1, 1, 0); - geom->type = lwgeom_makeType(1, 0, 0, MULTILINETYPE); - } - lwfree(srs); + parse_gml_srs(xnode, &srs); + if (*root_srid == SRID_UNKNOWN && srs.srid != SRID_UNKNOWN) + *root_srid = srs.srid; + + geom = (LWGEOM *)lwcollection_construct_empty(MULTILINETYPE, *root_srid, 1, 0); + + if (xnode->children == NULL) + return geom; for (xa = xnode->children ; xa != NULL ; xa = xa->next) { - /* MultiLineString/lineStringMember */ if (xa->type != XML_ELEMENT_NODE) continue; if (!is_gml_namespace(xa, false)) continue; if (strcmp((char *) xa->name, "lineStringMember")) continue; if (xa->children != NULL) - geom = lwmline_add((LWMLINE *)geom, -1, - parse_gml(xa->children, hasz, root_srid)); + geom = (LWGEOM*)lwmline_add_lwline((LWMLINE*)geom, + (LWLINE*)parse_gml(xa->children, hasz, root_srid)); } return geom; @@ -1492,25 +1552,20 @@ */ static LWGEOM* parse_gml_mcurve(xmlNodePtr xnode, bool *hasz, int *root_srid) { - gmlSrs *srs; + gmlSrs srs; xmlNodePtr xa; LWGEOM *geom = NULL; if (is_xlink(xnode)) xnode = get_xlink_node(xnode); - srs = parse_gml_srs(xnode); - if (!*root_srid) - { - *root_srid = srs->srid; - geom = (LWGEOM *)lwcollection_construct_empty(*root_srid, 1, 0); - geom->type = lwgeom_makeType(1, 1, 0, MULTILINETYPE); - } - else - { - geom = (LWGEOM *)lwcollection_construct_empty(-1, 1, 0); - geom->type = lwgeom_makeType(1, 0, 0, MULTILINETYPE); - } - lwfree(srs); + parse_gml_srs(xnode, &srs); + if (*root_srid == SRID_UNKNOWN && srs.srid != SRID_UNKNOWN) + *root_srid = srs.srid; + + geom = (LWGEOM *)lwcollection_construct_empty(MULTILINETYPE, *root_srid, 1, 0); + + if (xnode->children == NULL) + return geom; for (xa = xnode->children ; xa != NULL ; xa = xa->next) { @@ -1520,8 +1575,8 @@ if (!is_gml_namespace(xa, false)) continue; if (strcmp((char *) xa->name, "curveMember")) continue; if (xa->children != NULL) - geom = lwmline_add((LWMLINE *)geom, -1, - parse_gml(xa->children, hasz, root_srid)); + geom = (LWGEOM*)lwmline_add_lwline((LWMLINE*)geom, + (LWLINE*)parse_gml(xa->children, hasz, root_srid)); } return geom; @@ -1533,36 +1588,30 @@ */ static LWGEOM* parse_gml_mpoly(xmlNodePtr xnode, bool *hasz, int *root_srid) { - gmlSrs *srs; + gmlSrs srs; xmlNodePtr xa; LWGEOM *geom = NULL; if (is_xlink(xnode)) xnode = get_xlink_node(xnode); - srs = parse_gml_srs(xnode); - if (!*root_srid) - { - *root_srid = srs->srid; - geom = (LWGEOM *)lwcollection_construct_empty(*root_srid, 1, 0); - geom->type = lwgeom_makeType(1, 1, 0, MULTIPOLYGONTYPE); - } - else - { - geom = (LWGEOM *)lwcollection_construct_empty(-1, 1, 0); - geom->type = lwgeom_makeType(1, 0, 0, MULTIPOLYGONTYPE); - } - lwfree(srs); + parse_gml_srs(xnode, &srs); + if (*root_srid == SRID_UNKNOWN && srs.srid != SRID_UNKNOWN) + *root_srid = srs.srid; + + geom = (LWGEOM *)lwcollection_construct_empty(MULTIPOLYGONTYPE, *root_srid, 1, 0); + + if (xnode->children == NULL) + return geom; for (xa = xnode->children ; xa != NULL ; xa = xa->next) { - /* MultiPolygon/polygonMember */ if (xa->type != XML_ELEMENT_NODE) continue; if (!is_gml_namespace(xa, false)) continue; if (strcmp((char *) xa->name, "polygonMember")) continue; if (xa->children != NULL) - geom = lwmpoly_add((LWMPOLY *)geom, -1, - parse_gml(xa->children, hasz, root_srid)); + geom = (LWGEOM*)lwmpoly_add_lwpoly((LWMPOLY*)geom, + (LWPOLY*)parse_gml(xa->children, hasz, root_srid)); } return geom; @@ -1574,36 +1623,30 @@ */ static LWGEOM* parse_gml_msurface(xmlNodePtr xnode, bool *hasz, int *root_srid) { - gmlSrs *srs; + gmlSrs srs; xmlNodePtr xa; LWGEOM *geom = NULL; if (is_xlink(xnode)) xnode = get_xlink_node(xnode); - srs = parse_gml_srs(xnode); - if (!*root_srid) - { - *root_srid = srs->srid; - geom = (LWGEOM *)lwcollection_construct_empty(*root_srid, 1, 0); - geom->type = lwgeom_makeType(1, 1, 0, MULTIPOLYGONTYPE); - } - else - { - geom = (LWGEOM *)lwcollection_construct_empty(-1, 1, 0); - geom->type = lwgeom_makeType(1, 0, 0, MULTIPOLYGONTYPE); - } - lwfree(srs); + parse_gml_srs(xnode, &srs); + if (*root_srid == SRID_UNKNOWN && srs.srid != SRID_UNKNOWN) + *root_srid = srs.srid; + + geom = (LWGEOM *)lwcollection_construct_empty(MULTIPOLYGONTYPE, *root_srid, 1, 0); + + if (xnode->children == NULL) + return geom; for (xa = xnode->children ; xa != NULL ; xa = xa->next) { - /* MultiSurface/surfaceMember */ if (xa->type != XML_ELEMENT_NODE) continue; if (!is_gml_namespace(xa, false)) continue; if (strcmp((char *) xa->name, "surfaceMember")) continue; if (xa->children != NULL) - geom = lwmpoly_add((LWMPOLY *)geom, -1, - parse_gml(xa->children, hasz, root_srid)); + geom = (LWGEOM*)lwmpoly_add_lwpoly((LWMPOLY*)geom, + (LWPOLY*)parse_gml(xa->children, hasz, root_srid)); } return geom; @@ -1611,33 +1654,77 @@ /** - * Parse GML MultiGeometry (2.1.2, 3.1.1) + * Parse GML PolyhedralSurface (3.1.1) + * Nota: It's not part of SF-2 */ -static LWGEOM* parse_gml_coll(xmlNodePtr xnode, bool *hasz, int *root_srid) +static LWGEOM* parse_gml_psurface(xmlNodePtr xnode, bool *hasz, int *root_srid) { - gmlSrs *srs; + gmlSrs srs; xmlNodePtr xa; + bool found = false; LWGEOM *geom = NULL; if (is_xlink(xnode)) xnode = get_xlink_node(xnode); - srs = parse_gml_srs(xnode); - if (!*root_srid) + parse_gml_srs(xnode, &srs); + if (*root_srid == SRID_UNKNOWN && srs.srid != SRID_UNKNOWN) + *root_srid = srs.srid; + + geom = (LWGEOM *)lwcollection_construct_empty(POLYHEDRALSURFACETYPE, *root_srid, 1, 0); + + if (xnode->children == NULL) + return geom; + + /* Looking for gml:polygonPatches */ + for (xa = xnode->children ; xa != NULL ; xa = xa->next) { - *root_srid = srs->srid; - geom = (LWGEOM *)lwcollection_construct_empty(*root_srid, 1, 0); - geom->type = lwgeom_makeType(1, 1, 0, COLLECTIONTYPE); + if (xa->type != XML_ELEMENT_NODE) continue; + if (!is_gml_namespace(xa, false)) continue; + if (!strcmp((char *) xa->name, "polygonPatches")) + { + found = true; + break; + } } - else + if (!found) return geom; + + for (xa = xa->children ; xa != NULL ; xa = xa->next) { - geom = (LWGEOM *)lwcollection_construct_empty(-1, 1, 0); - geom->type = lwgeom_makeType(1, 0, 0, COLLECTIONTYPE); + /* PolyhedralSurface/polygonPatches/PolygonPatch */ + if (xa->type != XML_ELEMENT_NODE) continue; + if (!is_gml_namespace(xa, false)) continue; + if (strcmp((char *) xa->name, "PolygonPatch")) continue; + + geom = (LWGEOM*)lwpsurface_add_lwpoly((LWPSURFACE*)geom, + (LWPOLY*)parse_gml_patch(xa, hasz, root_srid)); } - lwfree(srs); + + return geom; +} + + +/** + * Parse GML MultiGeometry (2.1.2, 3.1.1) + */ +static LWGEOM* parse_gml_coll(xmlNodePtr xnode, bool *hasz, int *root_srid) +{ + gmlSrs srs; + xmlNodePtr xa; + LWGEOM *geom = NULL; + + if (is_xlink(xnode)) xnode = get_xlink_node(xnode); + + parse_gml_srs(xnode, &srs); + if (*root_srid == SRID_UNKNOWN && srs.srid != SRID_UNKNOWN) + *root_srid = srs.srid; + + geom = (LWGEOM *)lwcollection_construct_empty(COLLECTIONTYPE, *root_srid, 1, 0); + + if (xnode->children == NULL) + return geom; for (xa = xnode->children ; xa != NULL ; xa = xa->next) { - if (xa->type != XML_ELEMENT_NODE) continue; if (!is_gml_namespace(xa, false)) continue; @@ -1651,16 +1738,68 @@ || !strcmp((char *) xa->name, "polygonMember") || !strcmp((char *) xa->name, "geometryMember")) { - if (xa->children == NULL) break; - geom = lwcollection_add((LWCOLLECTION *)geom, -1, - parse_gml(xa->children, hasz, root_srid)); + geom = (LWGEOM*)lwcollection_add_lwgeom((LWCOLLECTION *)geom, + parse_gml(xa->children, hasz, root_srid)); } } return geom; } +/** + * Read GML + */ +static LWGEOM* lwgeom_from_gml(const char* xml) +{ + xmlDocPtr xmldoc; + xmlNodePtr xmlroot=NULL; + int xml_size = strlen(xml); + LWGEOM *lwgeom; + bool hasz=true; + int root_srid=SRID_UNKNOWN; + + /* Begin to Parse XML doc */ + xmlInitParser(); + xmldoc = xmlParseMemory(xml, xml_size); + if (!xmldoc || (xmlroot = xmlDocGetRootElement(xmldoc)) == NULL) + { + xmlFreeDoc(xmldoc); + xmlCleanupParser(); + gml_lwerror("invalid GML representation", 1); + } + + + lwgeom = parse_gml(xmlroot, &hasz, &root_srid); + + xmlFreeDoc(xmldoc); + xmlCleanupParser(); + /* shouldn't we be releasing xmldoc too here ? */ + + + if ( root_srid != SRID_UNKNOWN ) + lwgeom->srid = root_srid; + + /* Should we really do this here ? */ + lwgeom_add_bbox(lwgeom); + + /* GML geometries could be either 2 or 3D and can be nested mixed. + * Missing Z dimension is even tolerated inside some GML coords + * + * So we deal with 3D in all structures allocation, and flag hasz + * to false if we met once a missing Z dimension + * In this case, we force recursive 2D. + */ + if (!hasz) + { + LWGEOM *tmp = lwgeom_force_2d(lwgeom); + lwgeom_free(lwgeom); + lwgeom = tmp; + } + + return lwgeom; +} + /** * Parse GML @@ -1668,11 +1807,18 @@ static LWGEOM* parse_gml(xmlNodePtr xnode, bool *hasz, int *root_srid) { xmlNodePtr xa = xnode; + gmlSrs srs; while (xa != NULL && (xa->type != XML_ELEMENT_NODE || !is_gml_namespace(xa, false))) xa = xa->next; - if (xa == NULL) lwerror("invalid GML representation"); + if (xa == NULL) gml_lwerror("invalid GML representation", 55); + + parse_gml_srs(xa, &srs); + if (*root_srid == SRID_UNKNOWN && srs.srid != SRID_UNKNOWN) + { + *root_srid = srs.srid; + } if (!strcmp((char *) xa->name, "Point")) return parse_gml_point(xa, hasz, root_srid); @@ -1683,9 +1829,15 @@ if (!strcmp((char *) xa->name, "Curve")) return parse_gml_curve(xa, hasz, root_srid); + if (!strcmp((char *) xa->name, "LinearRing")) + return parse_gml_linearring(xa, hasz, root_srid); + if (!strcmp((char *) xa->name, "Polygon")) return parse_gml_polygon(xa, hasz, root_srid); + if (!strcmp((char *) xa->name, "Triangle")) + return parse_gml_triangle(xa, hasz, root_srid); + if (!strcmp((char *) xa->name, "Surface")) return parse_gml_surface(xa, hasz, root_srid); @@ -1704,9 +1856,16 @@ if (!strcmp((char *) xa->name, "MultiSurface")) return parse_gml_msurface(xa, hasz, root_srid); + if (!strcmp((char *) xa->name, "PolyhedralSurface")) + return parse_gml_psurface(xa, hasz, root_srid); + + if ((!strcmp((char *) xa->name, "Tin")) || + !strcmp((char *) xa->name, "TriangulatedSurface" )) + return parse_gml_tin(xa, hasz, root_srid); + if (!strcmp((char *) xa->name, "MultiGeometry")) return parse_gml_coll(xa, hasz, root_srid); - lwerror("invalid GML representation"); + gml_lwerror("invalid GML representation", 56); return NULL; /* Never reach */ } diff -Nru postgis-1.5.3/postgis/lwgeom_in_kml.c postgis-2.0.1/postgis/lwgeom_in_kml.c --- postgis-1.5.3/postgis/lwgeom_in_kml.c 2010-02-01 17:35:55.000000000 +0000 +++ postgis-2.0.1/postgis/lwgeom_in_kml.c 2012-02-27 22:08:12.000000000 +0000 @@ -2,7 +2,7 @@ * $Id:$ * * PostGIS - Spatial Types for PostgreSQL - * http://postgis.refractions.net + * Copyright 2009 Oslandia * * This is free software; you can redistribute and/or modify it under @@ -27,19 +27,20 @@ **********************************************************************/ +#include +#include + #include "postgres.h" + +#include "../postgis_config.h" #include "lwgeom_pg.h" #include "liblwgeom.h" -#include -#include - /* TODO: - OGC:LonLat84_5773 explicit support (rather than EPSG:4326) - - Don't return a GEOMETRYCOLLECTION if a MULTI one is enough - altitudeModeGroup relativeToGround Z Altitude computation upon Geoid */ @@ -58,14 +59,12 @@ PG_FUNCTION_INFO_V1(geom_from_kml); Datum geom_from_kml(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom, *geom2d; + GSERIALIZED *geom; + LWGEOM *lwgeom, *hlwgeom; xmlDocPtr xmldoc; text *xml_input; - LWGEOM *lwgeom; int xml_size; - uchar *srl; char *xml; - size_t size=0; bool hasz=true; xmlNodePtr xmlroot=NULL; @@ -73,11 +72,8 @@ /* Get the KML stream */ if (PG_ARGISNULL(0)) PG_RETURN_NULL(); xml_input = PG_GETARG_TEXT_P(0); - - xml_size = VARSIZE(xml_input) - VARHDRSZ; /* actual letters */ - xml = palloc(xml_size + 1); /* +1 for null */ - memcpy(xml, VARDATA(xml_input), xml_size); - xml[xml_size] = 0; /* null term */ + xml = text2cstring(xml_input); + xml_size = VARSIZE(xml_input) - VARHDRSZ; /* Begin to Parse XML doc */ xmlInitParser(); @@ -90,12 +86,16 @@ } lwgeom = parse_kml(xmlroot, &hasz); - lwgeom->bbox = lwgeom_compute_box2d(lwgeom); - geom = pglwgeom_serialize(lwgeom); - lwgeom_release(lwgeom); - xmlFreeDoc(xmldoc); - xmlCleanupParser(); + /* Homogenize geometry result if needed */ + if (lwgeom->type == COLLECTIONTYPE) + { + hlwgeom = lwgeom_homogenize(lwgeom); + lwgeom_release(lwgeom); + lwgeom = hlwgeom; + } + + lwgeom_add_bbox(lwgeom); /* KML geometries could be either 2 or 3D * @@ -105,14 +105,17 @@ */ if (!hasz) { - srl = lwalloc(VARSIZE(geom)); - lwgeom_force2d_recursive(SERIALIZED_FORM(geom), srl, &size); - geom2d = PG_LWGEOM_construct(srl, pglwgeom_getSRID(geom), - lwgeom_hasBBOX(geom->type)); - lwfree(geom); - geom = geom2d; + LWGEOM *tmp = lwgeom_force_2d(lwgeom); + lwgeom_free(lwgeom); + lwgeom = tmp; } + geom = geometry_serialize(lwgeom); + lwgeom_free(lwgeom); + + xmlFreeDoc(xmldoc); + xmlCleanupParser(); + PG_RETURN_POINTER(geom); } @@ -256,12 +259,10 @@ { xmlChar *kml_coord; bool digit, found; - DYNPTARRAY *dpa; - POINTARRAY *pa; + POINTARRAY *dpa; int kml_dims; char *p, *q; POINT4D pt; - uchar dims=0; if (xnode == NULL) lwerror("invalid KML representation"); @@ -285,8 +286,8 @@ */ /* Now we create PointArray from coordinates values */ - TYPE_SETZM(dims, 1, 0); - dpa = dynptarray_create(1, dims); + /* HasZ, !HasM, 1pt */ + dpa = ptarray_construct_empty(1, 0, 1); for (q = p, kml_dims=0, digit = false ; *p ; p++) { @@ -323,7 +324,7 @@ *hasz = false; } - dynptarray_addPoint4d(dpa, &pt, 0); + ptarray_append_point(dpa, &pt, LW_FALSE); digit = false; q = p+1; kml_dims = 0; @@ -332,10 +333,9 @@ } xmlFree(kml_coord); - pa = ptarray_clone(dpa->pa); - lwfree(dpa); - return pa; + /* TODO: we shouldn't need to clone here */ + return ptarray_clone_deep(dpa); } @@ -446,7 +446,7 @@ LWGEOM *geom; xmlNodePtr xa; - geom = (LWGEOM *)lwcollection_construct_empty(4326, 1, 0); + geom = (LWGEOM *)lwcollection_construct_empty(COLLECTIONTYPE, 4326, 1, 0); for (xa = xnode->children ; xa != NULL ; xa = xa->next) { @@ -461,8 +461,7 @@ { if (xa->children == NULL) break; - geom = lwcollection_add((LWCOLLECTION *)geom, -1, - parse_kml(xa, hasz)); + geom = (LWGEOM*)lwcollection_add_lwgeom((LWCOLLECTION*)geom, parse_kml(xa, hasz)); } } diff -Nru postgis-1.5.3/postgis/lwgeom_inout.c postgis-2.0.1/postgis/lwgeom_inout.c --- postgis-1.5.3/postgis/lwgeom_inout.c 2010-02-08 19:19:23.000000000 +0000 +++ postgis-2.0.1/postgis/lwgeom_inout.c 2012-03-14 13:13:23.000000000 +0000 @@ -7,25 +7,22 @@ #include #include #include +#include #include "access/gist.h" #include "access/itup.h" #include "fmgr.h" #include "utils/elog.h" +#include "mb/pg_wchar.h" # include "lib/stringinfo.h" /* for binary input */ - #include "liblwgeom.h" - - - #include "lwgeom_pg.h" -#include "profile.h" +#include "geography.h" /* for lwgeom_valid_typmod */ void elog_ERROR(const char* string); - Datum LWGEOM_in(PG_FUNCTION_ARGS); Datum LWGEOM_out(PG_FUNCTION_ARGS); Datum LWGEOM_to_text(PG_FUNCTION_ARGS); @@ -35,55 +32,190 @@ Datum parse_WKT_lwgeom(PG_FUNCTION_ARGS); Datum LWGEOM_recv(PG_FUNCTION_ARGS); Datum LWGEOM_send(PG_FUNCTION_ARGS); -Datum BOOL_to_text(PG_FUNCTION_ARGS); - - -/* - * included here so we can be independent from postgis - * WKB structure -- exactly the same as TEXT - */ -typedef struct Well_known_bin -{ - int32 size; /* total size of this structure */ - uchar data[1]; /* THIS HOLD VARIABLE LENGTH DATA */ -} -WellKnownBinary; +Datum LWGEOM_to_latlon(PG_FUNCTION_ARGS); /* * LWGEOM_in(cstring) * format is '[SRID=#;]wkt|wkb' * LWGEOM_in( 'SRID=99;POINT(0 0)') - * LWGEOM_in( 'POINT(0 0)') --> assumes SRID=-1 + * LWGEOM_in( 'POINT(0 0)') --> assumes SRID=SRID_UNKNOWN * LWGEOM_in( 'SRID=99;0101000000000000000000F03F000000000000004') - * returns a PG_LWGEOM object + * LWGEOM_in( '0101000000000000000000F03F000000000000004') + * returns a GSERIALIZED object */ PG_FUNCTION_INFO_V1(LWGEOM_in); Datum LWGEOM_in(PG_FUNCTION_ARGS) { - char *str = PG_GETARG_CSTRING(0); + char *input = PG_GETARG_CSTRING(0); + int32 geom_typmod = -1; + char *str = input; LWGEOM_PARSER_RESULT lwg_parser_result; LWGEOM *lwgeom; - PG_LWGEOM *ret; - int result; + GSERIALIZED *ret; + int srid = 0; - /* will handle both HEXEWKB and EWKT */ - result = serialized_lwgeom_from_ewkt(&lwg_parser_result, str, PARSER_CHECK_ALL); - if (result) - PG_PARSER_ERROR(lwg_parser_result); + if ( (PG_NARGS()>2) && (!PG_ARGISNULL(2)) ) { + geom_typmod = PG_GETARG_INT32(2); + } - lwgeom = lwgeom_deserialize(lwg_parser_result.serialized_lwgeom); + lwgeom_parser_result_init(&lwg_parser_result); - ret = pglwgeom_serialize(lwgeom); - lwgeom_release(lwgeom); + /* Empty string. */ + if ( str[0] == '\0' ) + ereport(ERROR,(errmsg("parse error - invalid geometry"))); - if ( is_worth_caching_pglwgeom_bbox(ret) ) + /* Starts with "SRID=" */ + if( strncasecmp(str,"SRID=",5) == 0 ) + { + /* Roll forward to semi-colon */ + char *tmp = str; + while ( tmp && *tmp != ';' ) + tmp++; + + /* Check next character to see if we have WKB */ + if ( tmp && *(tmp+1) == '0' ) + { + /* Null terminate the SRID= string */ + *tmp = '\0'; + /* Set str to the start of the real WKB */ + str = tmp + 1; + /* Move tmp to the start of the numeric part */ + tmp = input + 5; + /* Parse out the SRID number */ + srid = atoi(tmp); + } + } + + /* WKB? Let's find out. */ + if ( str[0] == '0' ) + { + size_t hexsize = strlen(str); + unsigned char *wkb = bytes_from_hexbytes(str, hexsize); + /* TODO: 20101206: No parser checks! This is inline with current 1.5 behavior, but needs discussion */ + lwgeom = lwgeom_from_wkb(wkb, hexsize/2, LW_PARSER_CHECK_NONE); + /* If we picked up an SRID at the head of the WKB set it manually */ + if ( srid ) lwgeom_set_srid(lwgeom, srid); + /* Add a bbox if necessary */ + if ( lwgeom_needs_bbox(lwgeom) ) lwgeom_add_bbox(lwgeom); + pfree(wkb); + ret = geometry_serialize(lwgeom); + lwgeom_free(lwgeom); + } + /* WKT then. */ + else { - ret = (PG_LWGEOM *)DatumGetPointer(DirectFunctionCall1( - LWGEOM_addBBOX, PointerGetDatum(ret))); + if ( lwgeom_parse_wkt(&lwg_parser_result, str, LW_PARSER_CHECK_ALL) == LW_FAILURE ) + { + PG_PARSER_ERROR(lwg_parser_result); + } + lwgeom = lwg_parser_result.geom; + if ( lwgeom_needs_bbox(lwgeom) ) + lwgeom_add_bbox(lwgeom); + ret = geometry_serialize(lwgeom); + lwgeom_parser_result_free(&lwg_parser_result); } + if ( geom_typmod >= 0 ) + { + postgis_valid_typmod(ret, geom_typmod); + POSTGIS_DEBUG(3, "typmod and geometry were consistent"); + } + else + { + POSTGIS_DEBUG(3, "typmod was -1"); + } + + /* Don't free the parser result (and hence lwgeom) until we have done */ + /* the typemod check with lwgeom */ + PG_RETURN_POINTER(ret); + +} + +/* + * LWGEOM_to_latlon(GEOMETRY, text) + * NOTE: Geometry must be a point. It is assumed that the coordinates + * of the point are in a lat/lon projection, and they will be + * normalized in the output to -90-90 and -180-180. + * + * The text parameter is a format string containing the format for the + * resulting text, similar to a date format string. Valid tokens + * are "D" for degrees, "M" for minutes, "S" for seconds, and "C" for + * cardinal direction (NSEW). DMS tokens may be repeated to indicate + * desired width and precision ("SSS.SSSS" means " 1.0023"). + * "M", "S", and "C" are optional. If "C" is omitted, degrees are + * shown with a "-" sign if south or west. If "S" is omitted, + * minutes will be shown as decimal with as many digits of precision + * as you specify. If "M" is omitted, degrees are shown as decimal + * with as many digits precision as you specify. + * + * If the format string is omitted (null or 0-length) a default + * format will be used. + * + * returns text + */ +PG_FUNCTION_INFO_V1(LWGEOM_to_latlon); +Datum LWGEOM_to_latlon(PG_FUNCTION_ARGS) +{ + /* Get the parameters */ + GSERIALIZED *pg_lwgeom = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + text *format_text = PG_GETARG_TEXT_P(1); + + LWGEOM *lwgeom; + char *format_str = NULL; + + char * formatted_str; + text * formatted_text; + char * tmp; + + /* Only supports points. */ + uint8_t geom_type = gserialized_get_type(pg_lwgeom); + if (POINTTYPE != geom_type) + { + lwerror("Only points are supported, you tried type %s.", lwtype_name(geom_type)); + } + /* Convert to LWGEOM type */ + lwgeom = lwgeom_from_gserialized(pg_lwgeom); + + if (format_text == NULL) { + lwerror("ST_AsLatLonText: invalid format string (null"); + PG_RETURN_NULL(); + } + + format_str = text2cstring(format_text); + assert(format_str != NULL); + + /* The input string supposedly will be in the database encoding, + so convert to UTF-8. */ + tmp = (char *)pg_do_encoding_conversion( + (uint8_t *)format_str, strlen(format_str), GetDatabaseEncoding(), PG_UTF8); + assert(tmp != NULL); + if ( tmp != format_str ) { + pfree(format_str); + format_str = tmp; + } + + /* Produce the formatted string. */ + formatted_str = lwpoint_to_latlon((LWPOINT *)lwgeom, format_str); + assert(formatted_str != NULL); + pfree(format_str); + + /* Convert the formatted string from UTF-8 back to database encoding. */ + tmp = (char *)pg_do_encoding_conversion( + (uint8_t *)formatted_str, strlen(formatted_str), + PG_UTF8, GetDatabaseEncoding()); + assert(tmp != NULL); + if ( tmp != formatted_str) { + pfree(formatted_str); + formatted_str = tmp; + } + + /* Convert to the postgres output string type. */ + formatted_text = cstring2text(formatted_str); + pfree(formatted_str); + + PG_RETURN_POINTER(formatted_text); } /* @@ -96,16 +228,16 @@ PG_FUNCTION_INFO_V1(LWGEOM_out); Datum LWGEOM_out(PG_FUNCTION_ARGS) { - LWGEOM_UNPARSER_RESULT lwg_unparser_result; - PG_LWGEOM *lwgeom; - int result; - - lwgeom = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - result = serialized_lwgeom_to_hexwkb(&lwg_unparser_result, SERIALIZED_FORM(lwgeom), PARSER_CHECK_NONE, -1); - if (result) - PG_UNPARSER_ERROR(lwg_unparser_result); + GSERIALIZED *geom = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + LWGEOM *lwgeom; + char *hexwkb; + size_t hexwkb_size; - PG_RETURN_CSTRING(lwg_unparser_result.wkoutput); + lwgeom = lwgeom_from_gserialized(geom); + hexwkb = lwgeom_to_hexwkb(lwgeom, WKB_EXTENDED, &hexwkb_size); + lwgeom_free(lwgeom); + + PG_RETURN_CSTRING(hexwkb); } /* @@ -114,48 +246,49 @@ PG_FUNCTION_INFO_V1(LWGEOM_asHEXEWKB); Datum LWGEOM_asHEXEWKB(PG_FUNCTION_ARGS) { - LWGEOM_UNPARSER_RESULT lwg_unparser_result; - PG_LWGEOM *lwgeom; - int result; - text *text_result; + GSERIALIZED *geom = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + LWGEOM *lwgeom; + char *hexwkb; + size_t hexwkb_size; + uint8_t variant = 0; + text *result; text *type; - unsigned int byteorder=-1; - - lwgeom = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + size_t text_size; + /* If user specified endianness, respect it */ if ( (PG_NARGS()>1) && (!PG_ARGISNULL(1)) ) { type = PG_GETARG_TEXT_P(1); - if (VARSIZE(type) < 7) - { - elog(ERROR,"AsHEXEWKB(geometry, ) - type should be 'XDR' or 'NDR'. type length is %i",VARSIZE(type) -VARHDRSZ); - PG_RETURN_NULL(); - } if ( ! strncmp(VARDATA(type), "xdr", 3) || - ! strncmp(VARDATA(type), "XDR", 3) ) + ! strncmp(VARDATA(type), "XDR", 3) ) { - byteorder = XDR; + variant = variant | WKB_XDR; } else { - byteorder = NDR; + variant = variant | WKB_NDR; } } - result = serialized_lwgeom_to_hexwkb(&lwg_unparser_result, SERIALIZED_FORM(lwgeom), PARSER_CHECK_NONE, byteorder); - if (result) - PG_UNPARSER_ERROR(lwg_unparser_result); - - text_result = palloc(lwg_unparser_result.size+VARHDRSZ); - memcpy(VARDATA(text_result),lwg_unparser_result.wkoutput,lwg_unparser_result.size); - SET_VARSIZE(text_result, lwg_unparser_result.size+VARHDRSZ); - pfree(lwg_unparser_result.wkoutput); - - PG_RETURN_POINTER(text_result); - + /* Create WKB hex string */ + lwgeom = lwgeom_from_gserialized(geom); + hexwkb = lwgeom_to_hexwkb(lwgeom, variant | WKB_EXTENDED, &hexwkb_size); + lwgeom_free(lwgeom); + + /* Prepare the PgSQL text return type */ + text_size = hexwkb_size - 1 + VARHDRSZ; + result = palloc(text_size); + memcpy(VARDATA(result), hexwkb, hexwkb_size - 1); + SET_VARSIZE(result, text_size); + + /* Clean up and return */ + pfree(hexwkb); + PG_FREE_IF_COPY(geom, 0); + PG_RETURN_TEXT_P(result); } + /* * LWGEOM_to_text(lwgeom) --> text * output is 'SRID=#;' @@ -166,22 +299,24 @@ PG_FUNCTION_INFO_V1(LWGEOM_to_text); Datum LWGEOM_to_text(PG_FUNCTION_ARGS) { - LWGEOM_UNPARSER_RESULT lwg_unparser_result; - PG_LWGEOM *lwgeom; - int result; - text *text_result; - - lwgeom = (PG_LWGEOM *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - result = serialized_lwgeom_to_hexwkb(&lwg_unparser_result, SERIALIZED_FORM(lwgeom), PARSER_CHECK_NONE, -1); - if (result) - PG_UNPARSER_ERROR(lwg_unparser_result); - - text_result = palloc(lwg_unparser_result.size+VARHDRSZ); - memcpy(VARDATA(text_result),lwg_unparser_result.wkoutput,lwg_unparser_result.size); - SET_VARSIZE(text_result, lwg_unparser_result.size+VARHDRSZ); - pfree(lwg_unparser_result.wkoutput); + GSERIALIZED *geom = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + LWGEOM *lwgeom; + char *hexwkb; + size_t hexwkb_size; + text *result; - PG_RETURN_POINTER(text_result); + /* Generate WKB hex text */ + lwgeom = lwgeom_from_gserialized(geom); + hexwkb = lwgeom_to_hexwkb(lwgeom, WKB_EXTENDED, &hexwkb_size); + lwgeom_free(lwgeom); + + /* Copy into text obect */ + result = cstring2text(hexwkb); + pfree(hexwkb); + + /* Clean up and return */ + PG_FREE_IF_COPY(geom, 0); + PG_RETURN_TEXT_P(result); } /* @@ -189,41 +324,32 @@ * NOTE: wkb is in *binary* not hex form. * * NOTE: this function parses EWKB (extended form) - * which also contains SRID info. When the SRID - * argument is provided it will override any SRID - * info found in EWKB format. - * - * NOTE: this function is *unoptimized* as will copy - * the object when adding SRID and when adding BBOX. - * additionally, it suffers from the non-optimal - * pglwgeom_from_ewkb function. - * + * which also contains SRID info. */ PG_FUNCTION_INFO_V1(LWGEOMFromWKB); Datum LWGEOMFromWKB(PG_FUNCTION_ARGS) { - WellKnownBinary *wkb_input; - PG_LWGEOM *lwgeom, *lwgeom2; - - wkb_input = (WellKnownBinary *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - - lwgeom2 = pglwgeom_from_ewkb((uchar *)VARDATA(wkb_input), PARSER_CHECK_ALL, - VARSIZE(wkb_input)-VARHDRSZ); - + bytea *bytea_wkb = (bytea*)PG_GETARG_BYTEA_P(0); + int32 srid = 0; + GSERIALIZED *geom; + LWGEOM *lwgeom; + uint8_t *wkb = (uint8_t*)VARDATA(bytea_wkb); + + lwgeom = lwgeom_from_wkb(wkb, VARSIZE(bytea_wkb)-VARHDRSZ, LW_PARSER_CHECK_ALL); + if ( ( PG_NARGS()>1) && ( ! PG_ARGISNULL(1) )) { - lwgeom = pglwgeom_setSRID(lwgeom2, PG_GETARG_INT32(1)); - lwfree(lwgeom2); + srid = PG_GETARG_INT32(1); + lwgeom_set_srid(lwgeom, srid); } - else lwgeom = lwgeom2; - if ( is_worth_caching_pglwgeom_bbox(lwgeom) ) - { - lwgeom = (PG_LWGEOM *)DatumGetPointer(DirectFunctionCall1( - LWGEOM_addBBOX, PointerGetDatum(lwgeom))); - } + if ( lwgeom_needs_bbox(lwgeom) ) + lwgeom_add_bbox(lwgeom); - PG_RETURN_POINTER(lwgeom); + geom = geometry_serialize(lwgeom); + lwgeom_free(lwgeom); + PG_FREE_IF_COPY(bytea_wkb, 0); + PG_RETURN_POINTER(geom); } /* @@ -233,228 +359,74 @@ PG_FUNCTION_INFO_V1(WKBFromLWGEOM); Datum WKBFromLWGEOM(PG_FUNCTION_ARGS) { - /* #define BINARY_FROM_HEX 1 */ - - LWGEOM_UNPARSER_RESULT lwg_unparser_result; - PG_LWGEOM *lwgeom_input; /* SRID=#; */ - char *lwgeom_result; - int result; - int size_result; -#ifdef BINARY_FROM_HEX - char *hexized_wkb; /* hexized_wkb_srid w/o srid */ - char *semicolonLoc; - int t; -#endif /* BINARY_FROM_HEX */ + GSERIALIZED *geom = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + LWGEOM *lwgeom; + uint8_t *wkb; + size_t wkb_size; + uint8_t variant = 0; + bytea *result; text *type; - unsigned int byteorder=-1; - - PROFSTART(PROF_QRUN); + /* If user specified endianness, respect it */ if ( (PG_NARGS()>1) && (!PG_ARGISNULL(1)) ) { type = PG_GETARG_TEXT_P(1); - if (VARSIZE(type) < 7) - { - elog(ERROR,"asbinary(geometry, ) - type should be 'XDR' or 'NDR'. type length is %i",VARSIZE(type) -VARHDRSZ); - PG_RETURN_NULL(); - } if ( ! strncmp(VARDATA(type), "xdr", 3) || - ! strncmp(VARDATA(type), "XDR", 3) ) + ! strncmp(VARDATA(type), "XDR", 3) ) { - byteorder = XDR; + variant = variant | WKB_XDR; } else { - byteorder = NDR; + variant = variant | WKB_NDR; } } - lwgeom_input = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - -#ifdef BINARY_FROM_HEX - result = serialized_lwgeom_to_hexwkb(&lwg_unparser_result, SERIALIZED_FORM(lwgeom_input), byteorder); - if (result) - PG_UNPARSER_ERROR(lwg_unparser_result); - - LWDEBUGF(3, "in WKBFromLWGEOM with WKB = '%s'", lwg_unparser_result.wkoutput); - - hexized_wkb_srid = lwg_unparser_result.wkoutput; - - semicolonLoc = strchr(lwg_unparser_result.wkoutput,';'); - if (semicolonLoc != NULL) - { - hexized_wkb = (semicolonLoc+1); - } - - LWDEBUGF(3, "in WKBFromLWGEOM with WKB (with no 'SRID=#;' = '%s'", - hexized_wkb); - - size_result = lwg_unparser_result.size/2 + VARHDRSZ; - lwgeom_result = palloc(size_result); - SET_VARSIZE(lwgeom_result, size_result); - - /* have a hexized string, want to make it binary */ - for (t=0; t< (lwgeom_unparser_result.size/2); t++) - { - ((uchar *) VARDATA(lwgeom_result))[t] = parse_hex( hexized_wkb + (t*2) ); - } - - pfree(hexized_wkb); - -#else /* ndef BINARY_FROM_HEX */ - - result = serialized_lwgeom_to_ewkb(&lwg_unparser_result, SERIALIZED_FORM(lwgeom_input), PARSER_CHECK_ALL, byteorder); - if (result) - PG_UNPARSER_ERROR(lwg_unparser_result); - - size_result = lwg_unparser_result.size+VARHDRSZ; - lwgeom_result = palloc(size_result); - SET_VARSIZE(lwgeom_result, size_result); - memcpy(VARDATA(lwgeom_result), lwg_unparser_result.wkoutput, lwg_unparser_result.size); - pfree(lwg_unparser_result.wkoutput); - -#endif - -#if POSTGIS_PROFILE > 0 - PROFSTOP(PROF_QRUN); - lwnotice("serialized_lwgeom_to_ewkb: prof: %lu", proftime[PROF_QRUN]); -#endif - - LWDEBUGF(3, "Output size is %lu (comp: %lu)", - VARSIZE(lwgeom_result), (unsigned long)size_result); - - PG_RETURN_POINTER(lwgeom_result); + /* Create WKB hex string */ + lwgeom = lwgeom_from_gserialized(geom); + wkb = lwgeom_to_wkb(lwgeom, variant | WKB_EXTENDED , &wkb_size); + lwgeom_free(lwgeom); + + /* Prepare the PgSQL text return type */ + result = palloc(wkb_size + VARHDRSZ); + memcpy(VARDATA(result), wkb, wkb_size); + SET_VARSIZE(result, wkb_size+VARHDRSZ); + + /* Clean up and return */ + pfree(wkb); + PG_FREE_IF_COPY(geom, 0); + PG_RETURN_BYTEA_P(result); } + /* puts a bbox inside the geometry */ PG_FUNCTION_INFO_V1(LWGEOM_addBBOX); Datum LWGEOM_addBBOX(PG_FUNCTION_ARGS) { - PG_LWGEOM *lwgeom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_LWGEOM *result; - BOX2DFLOAT4 box; - uchar old_type; - int size; - - POSTGIS_DEBUG(2, "in LWGEOM_addBBOX"); - - if (lwgeom_hasBBOX( lwgeom->type ) ) - { - POSTGIS_DEBUG(3, "LWGEOM_addBBOX -- already has bbox"); - - /* easy - already has one. Just copy! */ - result = palloc (VARSIZE(lwgeom)); - SET_VARSIZE(result, VARSIZE(lwgeom)); - memcpy(VARDATA(result), VARDATA(lwgeom), VARSIZE(lwgeom)-VARHDRSZ); - PG_RETURN_POINTER(result); - } - - POSTGIS_DEBUG(3, "LWGEOM_addBBOX -- giving it a bbox"); - - /* construct new one */ - if ( ! getbox2d_p(SERIALIZED_FORM(lwgeom), &box) ) - { - /* Empty geom, no bbox to add */ - result = palloc (VARSIZE(lwgeom)); - SET_VARSIZE(result, VARSIZE(lwgeom)); - memcpy(VARDATA(result), VARDATA(lwgeom), VARSIZE(lwgeom)-VARHDRSZ); - PG_RETURN_POINTER(result); - } - old_type = lwgeom->type; - - size = VARSIZE(lwgeom)+sizeof(BOX2DFLOAT4); - - result = palloc(size); /* 16 for bbox2d */ - SET_VARSIZE(result, size); - - result->type = lwgeom_makeType_full( - TYPE_HASZ(old_type), - TYPE_HASM(old_type), - lwgeom_hasSRID(old_type), lwgeom_getType(old_type), 1); - - /* copy in bbox */ - memcpy(result->data, &box, sizeof(BOX2DFLOAT4)); - - POSTGIS_DEBUGF(3, "result->type hasbbox: %d", TYPE_HASBBOX(result->type)); - POSTGIS_DEBUG(3, "LWGEOM_addBBOX -- about to copy serialized form"); - - /* everything but the type and length */ - memcpy((char *)VARDATA(result)+sizeof(BOX2DFLOAT4)+1, (char *)VARDATA(lwgeom)+1, VARSIZE(lwgeom)-VARHDRSZ-1); + GSERIALIZED *geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *result; + LWGEOM *lwgeom; + lwgeom = lwgeom_from_gserialized(geom); + lwgeom_add_bbox(lwgeom); + result = geometry_serialize(lwgeom); + + PG_FREE_IF_COPY(geom, 0); PG_RETURN_POINTER(result); } -char -is_worth_caching_pglwgeom_bbox(const PG_LWGEOM *in) -{ -#if ! POSTGIS_AUTOCACHE_BBOX - return false; -#endif - if ( TYPE_GETTYPE(in->type) == POINTTYPE ) return false; - return true; -} - -char -is_worth_caching_serialized_bbox(const uchar *in) -{ -#if ! POSTGIS_AUTOCACHE_BBOX - return false; -#endif - if ( TYPE_GETTYPE((uchar)in[0]) == POINTTYPE ) return false; - return true; -} - -char -is_worth_caching_lwgeom_bbox(const LWGEOM *in) -{ -#if ! POSTGIS_AUTOCACHE_BBOX - return false; -#endif - if ( TYPE_GETTYPE(in->type) == POINTTYPE ) return false; - return true; -} - /* removes a bbox from a geometry */ PG_FUNCTION_INFO_V1(LWGEOM_dropBBOX); Datum LWGEOM_dropBBOX(PG_FUNCTION_ARGS) { - PG_LWGEOM *lwgeom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_LWGEOM *result; - uchar old_type; - int size; - - POSTGIS_DEBUG(2, "in LWGEOM_dropBBOX"); - - if (!lwgeom_hasBBOX( lwgeom->type ) ) - { - POSTGIS_DEBUG(3, "LWGEOM_dropBBOX -- doesnt have a bbox already"); - - result = palloc (VARSIZE(lwgeom)); - SET_VARSIZE(result, VARSIZE(lwgeom)); - memcpy(VARDATA(result), VARDATA(lwgeom), VARSIZE(lwgeom)-VARHDRSZ); - PG_RETURN_POINTER(result); - } - - POSTGIS_DEBUG(3, "LWGEOM_dropBBOX -- dropping the bbox"); + GSERIALIZED *geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - /* construct new one */ - old_type = lwgeom->type; - - size = VARSIZE(lwgeom)-sizeof(BOX2DFLOAT4); - - result = palloc(size); /* 16 for bbox2d */ - SET_VARSIZE(result, size); - - result->type = lwgeom_makeType_full( - TYPE_HASZ(old_type), - TYPE_HASM(old_type), - lwgeom_hasSRID(old_type), lwgeom_getType(old_type), 0); - - /* everything but the type and length */ - memcpy((char *)VARDATA(result)+1, ((char *)(lwgeom->data))+sizeof(BOX2DFLOAT4), size-VARHDRSZ-1); - - PG_RETURN_POINTER(result); + /* No box? we're done already! */ + if ( ! gserialized_has_bbox(geom) ) + PG_RETURN_POINTER(geom); + + PG_RETURN_POINTER(gserialized_drop_gidx(geom)); } @@ -465,51 +437,29 @@ } /* - * parse WKT input - * parse_WKT_lwgeom(TEXT) -> LWGEOM - */ +* This just does the same thing as the _in function, +* except it has to handle a 'text' input. First +* unwrap the text into a cstring, then call +* geometry_in +*/ PG_FUNCTION_INFO_V1(parse_WKT_lwgeom); Datum parse_WKT_lwgeom(PG_FUNCTION_ARGS) { - /* text */ - text *wkt_input = PG_GETARG_TEXT_P(0); - PG_LWGEOM *ret; /*with length */ - LWGEOM_PARSER_RESULT lwg_parser_result; - LWGEOM *lwgeom; + text *wkt_text = PG_GETARG_TEXT_P(0); char *wkt; - int wkt_size, result; + Datum result; - wkt_size = VARSIZE(wkt_input)-VARHDRSZ; /* actual letters */ + /* Unwrap the PgSQL text type into a cstring */ + wkt = text2cstring(wkt_text); + + /* Now we call over to the geometry_in function */ + result = DirectFunctionCall1(LWGEOM_in, CStringGetDatum(wkt)); + + /* Return null on null */ + if ( ! result ) + PG_RETURN_NULL(); - wkt = palloc( wkt_size+1); /* +1 for null */ - memcpy(wkt, VARDATA(wkt_input), wkt_size ); - wkt[wkt_size] = 0; /* null term */ - - - POSTGIS_DEBUGF(3, "in parse_WKT_lwgeom with input: '%s'",wkt); - - result = serialized_lwgeom_from_ewkt(&lwg_parser_result, wkt, PARSER_CHECK_ALL); - if (result) - PG_PARSER_ERROR(lwg_parser_result); - - lwgeom = lwgeom_deserialize(lwg_parser_result.serialized_lwgeom); - - ret = pglwgeom_serialize(lwgeom); - lwgeom_release(lwgeom); - - POSTGIS_DEBUG(3, "parse_WKT_lwgeom:: finished parse"); - - pfree (wkt); - - if (ret == NULL) elog(ERROR,"parse_WKT:: couldnt parse!"); - - if ( is_worth_caching_pglwgeom_bbox(ret) ) - { - ret = (PG_LWGEOM *)DatumGetPointer(DirectFunctionCall1( - LWGEOM_addBBOX, PointerGetDatum(ret))); - } - - PG_RETURN_POINTER(ret); + PG_RETURN_DATUM(result); } @@ -524,93 +474,77 @@ Datum LWGEOM_recv(PG_FUNCTION_ARGS) { StringInfo buf = (StringInfo) PG_GETARG_POINTER(0); - bytea *wkb; - PG_LWGEOM *lwgeom_result; -#if POSTGIS_DEBUG_LEVEL > 0 - int result; - LWGEOM_UNPARSER_RESULT lwg_unparser_result; -#endif - - POSTGIS_DEBUG(2, "LWGEOM_recv start"); - - /* Add VARLENA size info to make it a valid varlena object */ - wkb = (bytea *)palloc(buf->len+VARHDRSZ); - SET_VARSIZE(wkb, buf->len+VARHDRSZ); - memcpy(VARDATA(wkb), buf->data, buf->len); - - POSTGIS_DEBUG(3, "LWGEOM_recv calling LWGEOMFromWKB"); - - /* Call LWGEOM_from_bytea function... */ - lwgeom_result = (PG_LWGEOM *)DatumGetPointer(DirectFunctionCall1( - LWGEOMFromWKB, PointerGetDatum(wkb))); - - POSTGIS_DEBUG(3, "LWGEOM_recv advancing StringInfo buffer"); - -#if POSTGIS_DEBUG_LEVEL > 0 - result = serialized_lwgeom_to_hexwkb(&lwg_unparser_result, SERIALIZED_FORM(lwgeom_result), PARSER_CHECK_NONE, -1); - POSTGIS_DEBUGF(3, "LWGEOM_from_bytea returned %s", lwg_unparser_result.wkoutput); -#endif + int32 geom_typmod = -1; + GSERIALIZED *geom; + LWGEOM *lwgeom; + + if ( (PG_NARGS()>2) && (!PG_ARGISNULL(2)) ) { + geom_typmod = PG_GETARG_INT32(2); + } + + lwgeom = lwgeom_from_wkb((uint8_t*)buf->data, buf->len, LW_PARSER_CHECK_ALL); + + if ( lwgeom_needs_bbox(lwgeom) ) + lwgeom_add_bbox(lwgeom); /* Set cursor to the end of buffer (so the backend is happy) */ buf->cursor = buf->len; - POSTGIS_DEBUG(3, "LWGEOM_recv returning"); + geom = geometry_serialize(lwgeom); + lwgeom_free(lwgeom); + + if ( geom_typmod >= 0 ) + { + postgis_valid_typmod(geom, geom_typmod); + POSTGIS_DEBUG(3, "typmod and geometry were consistent"); + } + else + { + POSTGIS_DEBUG(3, "typmod was -1"); + } - PG_RETURN_POINTER(lwgeom_result); + + PG_RETURN_POINTER(geom); } + + PG_FUNCTION_INFO_V1(LWGEOM_send); Datum LWGEOM_send(PG_FUNCTION_ARGS) { - bytea *result; - POSTGIS_DEBUG(2, "LWGEOM_send called"); - result = (bytea *)DatumGetPointer(DirectFunctionCall1( - WKBFromLWGEOM, PG_GETARG_DATUM(0))); - - PG_RETURN_POINTER(result); + PG_RETURN_POINTER( + DatumGetPointer( + DirectFunctionCall1( + WKBFromLWGEOM, + PG_GETARG_DATUM(0) + ))); } PG_FUNCTION_INFO_V1(LWGEOM_to_bytea); Datum LWGEOM_to_bytea(PG_FUNCTION_ARGS) { - bytea *result; - POSTGIS_DEBUG(2, "LWGEOM_to_bytea called"); - result = (bytea *)DatumGetPointer(DirectFunctionCall1( - WKBFromLWGEOM, PG_GETARG_DATUM(0))); - - PG_RETURN_POINTER(result); + PG_RETURN_POINTER( + DatumGetPointer( + DirectFunctionCall1( + WKBFromLWGEOM, + PG_GETARG_DATUM(0) + ))); } PG_FUNCTION_INFO_V1(LWGEOM_from_bytea); Datum LWGEOM_from_bytea(PG_FUNCTION_ARGS) { - PG_LWGEOM *result; + GSERIALIZED *result; POSTGIS_DEBUG(2, "LWGEOM_from_bytea start"); - result = (PG_LWGEOM *)DatumGetPointer(DirectFunctionCall1( + result = (GSERIALIZED *)DatumGetPointer(DirectFunctionCall1( LWGEOMFromWKB, PG_GETARG_DATUM(0))); PG_RETURN_POINTER(result); } -PG_FUNCTION_INFO_V1(BOOL_to_text); -Datum BOOL_to_text(PG_FUNCTION_ARGS) -{ - bool b = PG_GETARG_BOOL(0); - char c; - text *result; - - c = b ? 't' : 'f'; - - result = palloc(VARHDRSZ+1*sizeof(char)); - SET_VARSIZE(result, VARHDRSZ+1*sizeof(char)); - memcpy(VARDATA(result), &c, 1*sizeof(char)); - - PG_RETURN_POINTER(result); - -} diff -Nru postgis-1.5.3/postgis/lwgeom_kml.c postgis-2.0.1/postgis/lwgeom_kml.c --- postgis-1.5.3/postgis/lwgeom_kml.c 2009-10-27 21:39:35.000000000 +0000 +++ postgis-2.0.1/postgis/lwgeom_kml.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,462 +0,0 @@ -/********************************************************************** - * $Id: lwgeom_kml.c 4682 2009-10-27 21:39:35Z colivier $ - * - * PostGIS - Spatial Types for PostgreSQL - * http://postgis.refractions.net - * Copyright 2001-2003 Refractions Research Inc. - * - * This is free software; you can redistribute and/or modify it under - * the terms of hte GNU General Public Licence. See the COPYING file. - * - **********************************************************************/ - -/** -* @file -* KML output routines based on lwgeom_gml.c -* Written by: Eduin Carrillo -* © 2006 Corporacion Autonoma Regional de Santander - CAS -* -**********************************************************************/ - - -#include "postgres.h" -#include "executor/spi.h" - -#include "lwgeom_pg.h" -#include "liblwgeom.h" -#include "lwgeom_export.h" - -Datum LWGEOM_asKML(PG_FUNCTION_ARGS); - -char *geometry_to_kml2(uchar *srl, int precision); - -static size_t askml2_point_size(LWPOINT *point, int precision); -static char *askml2_point(LWPOINT *point, int precision); -static size_t askml2_line_size(LWLINE *line, int precision); -static char *askml2_line(LWLINE *line, int precision); -static size_t askml2_poly_size(LWPOLY *poly, int precision); -static char *askml2_poly(LWPOLY *poly, int precision); -static size_t askml2_inspected_size(LWGEOM_INSPECTED *geom, int precision); -static char *askml2_inspected(LWGEOM_INSPECTED *geom, int precision); -static size_t pointArray_toKML2(POINTARRAY *pa, char *buf, int precision); - -static size_t pointArray_KMLsize(POINTARRAY *pa, int precision); - - -/** - * Encode feature in KML - */ -PG_FUNCTION_INFO_V1(LWGEOM_asKML); -Datum LWGEOM_asKML(PG_FUNCTION_ARGS) -{ - PG_LWGEOM *geom; - char *kml; - text *result; - int len; - int version; - int precision = MAX_DOUBLE_PRECISION; - - - /* Get the version */ - version = PG_GETARG_INT32(0); - if ( version != 2) - { - elog(ERROR, "Only KML 2 is supported"); - PG_RETURN_NULL(); - } - - /* Get the geometry */ - if ( PG_ARGISNULL(1) ) PG_RETURN_NULL(); - geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); - - /* Retrieve precision if any (default is max) */ - if (PG_NARGS() >2 && !PG_ARGISNULL(2)) - { - precision = PG_GETARG_INT32(2); - if ( precision > MAX_DOUBLE_PRECISION ) - precision = MAX_DOUBLE_PRECISION; - else if ( precision < 0 ) precision = 0; - } - - kml = geometry_to_kml2(SERIALIZED_FORM(geom), precision); - - PG_FREE_IF_COPY(geom, 1); - - len = strlen(kml) + VARHDRSZ; - - result = palloc(len); - SET_VARSIZE(result, len); - - memcpy(VARDATA(result), kml, len-VARHDRSZ); - - pfree(kml); - - PG_RETURN_POINTER(result); -} - - - -/* - * VERSION KML 2 - */ - -/* takes a GEOMETRY and returns a KML representation */ -char * -geometry_to_kml2(uchar *geom, int precision) -{ - int type; - LWPOINT *point; - LWLINE *line; - LWPOLY *poly; - LWGEOM_INSPECTED *inspected; - - type = lwgeom_getType(geom[0]); - - switch (type) - { - - case POINTTYPE: - point = lwpoint_deserialize(geom); - return askml2_point(point, precision); - - case LINETYPE: - line = lwline_deserialize(geom); - return askml2_line(line, precision); - - case POLYGONTYPE: - poly = lwpoly_deserialize(geom); - return askml2_poly(poly, precision); - - case MULTIPOINTTYPE: - case MULTILINETYPE: - case MULTIPOLYGONTYPE: - inspected = lwgeom_inspect(geom); - return askml2_inspected(inspected, precision); - - default: - lwerror("geometry_to_kml: '%s' geometry type not supported by Google Earth", lwgeom_typename(type)); - return NULL; - } -} - -static size_t -askml2_point_size(LWPOINT *point, int precision) -{ - int size; - size = pointArray_KMLsize(point->point, precision); - size += sizeof("/") * 2; - return size; -} - -static size_t -askml2_point_buf(LWPOINT *point, char *output, int precision) -{ - char *ptr = output; - - ptr += sprintf(ptr, ""); - ptr += sprintf(ptr, ""); - ptr += pointArray_toKML2(point->point, ptr, precision); - ptr += sprintf(ptr, ""); - - return (ptr-output); -} - -static char * -askml2_point(LWPOINT *point, int precision) -{ - char *output; - int size; - - size = askml2_point_size(point, precision); - output = palloc(size); - askml2_point_buf(point, output, precision); - return output; -} - -static size_t -askml2_line_size(LWLINE *line, int precision) -{ - int size; - size = pointArray_KMLsize(line->points, precision); - size += sizeof("/") * 2; - return size; -} - -static size_t -askml2_line_buf(LWLINE *line, char *output, int precision) -{ - char *ptr=output; - - ptr += sprintf(ptr, ""); - ptr += sprintf(ptr, ""); - ptr += pointArray_toKML2(line->points, ptr, precision); - ptr += sprintf(ptr, ""); - - return (ptr-output); -} - -static char * -askml2_line(LWLINE *line, int precision) -{ - char *output; - int size; - - size = askml2_line_size(line, precision); - output = palloc(size); - askml2_line_buf(line, output, precision); - return output; -} - -static size_t -askml2_poly_size(LWPOLY *poly, int precision) -{ - size_t size; - int i; - - size = sizeof(""); - size += sizeof("/") * 2; - size += sizeof("/") * 2 * - poly->nrings; - - for (i=0; inrings; i++) - size += pointArray_KMLsize(poly->rings[i], precision); - - return size; -} - -static size_t -askml2_poly_buf(LWPOLY *poly, char *output, int precision) -{ - int i; - char *ptr=output; - - ptr += sprintf(ptr, ""); - ptr += sprintf(ptr, ""); - ptr += pointArray_toKML2(poly->rings[0], ptr, precision); - ptr += sprintf(ptr, ""); - for (i=1; inrings; i++) - { - ptr += sprintf(ptr, ""); - ptr += pointArray_toKML2(poly->rings[i], ptr, precision); - ptr += sprintf(ptr, ""); - } - ptr += sprintf(ptr, ""); - - return (ptr-output); -} - -static char * -askml2_poly(LWPOLY *poly, int precision) -{ - char *output; - int size; - - size = askml2_poly_size(poly, precision); - output = palloc(size); - askml2_poly_buf(poly, output, precision); - return output; -} - -/* - * Compute max size required for KML version of this - * inspected geometry. Will recurse when needed. - * Don't call this with single-geoms inspected. - */ -static size_t -askml2_inspected_size(LWGEOM_INSPECTED *insp, int precision) -{ - int i; - size_t size; - - /* the longest possible multi version */ - size = sizeof(""); - - for (i=0; ingeometries; i++) - { - LWPOINT *point; - LWLINE *line; - LWPOLY *poly; - LWGEOM_INSPECTED *subinsp; - uchar *subgeom; - - if ((point=lwgeom_getpoint_inspected(insp, i))) - { - size += askml2_point_size(point, precision); - lwpoint_free(point); - } - else if ((line=lwgeom_getline_inspected(insp, i))) - { - size += askml2_line_size(line, precision); - lwline_free(line); - } - else if ((poly=lwgeom_getpoly_inspected(insp, i))) - { - size += askml2_poly_size(poly, precision); - lwpoly_free(poly); - } - else - { - subgeom = lwgeom_getsubgeometry_inspected(insp, i); - subinsp = lwgeom_inspect(subgeom); - size += askml2_inspected_size(subinsp, precision); - lwinspected_release(subinsp); - } - } - - return size; -} - -/* - * Don't call this with single-geoms inspected! - */ -static size_t -askml2_inspected_buf(LWGEOM_INSPECTED *insp, char *output, int precision) -{ - char *ptr, *kmltype; - int i; - - ptr = output; - kmltype = "MultiGeometry"; - - /* Open outmost tag */ - ptr += sprintf(ptr, "<%s>", kmltype); - - for (i=0; ingeometries; i++) - { - LWPOINT *point; - LWLINE *line; - LWPOLY *poly; - LWGEOM_INSPECTED *subinsp; - uchar *subgeom; - - if ((point=lwgeom_getpoint_inspected(insp, i))) - { - ptr += askml2_point_buf(point, ptr, precision); - lwpoint_free(point); - } - else if ((line=lwgeom_getline_inspected(insp, i))) - { - ptr += askml2_line_buf(line, ptr, precision); - lwline_free(line); - } - else if ((poly=lwgeom_getpoly_inspected(insp, i))) - { - ptr += askml2_poly_buf(poly, ptr, precision); - lwpoly_free(poly); - } - else - { - subgeom = lwgeom_getsubgeometry_inspected(insp, i); - subinsp = lwgeom_inspect(subgeom); - ptr += askml2_inspected_buf(subinsp, ptr, precision); - lwinspected_release(subinsp); - } - } - - /* Close outmost tag */ - ptr += sprintf(ptr, "", kmltype); - - return (ptr-output); -} - -/* - * Don't call this with single-geoms inspected! - */ -static char * -askml2_inspected(LWGEOM_INSPECTED *insp, int precision) -{ - char *kml; - size_t size; - - size = askml2_inspected_size(insp, precision); - kml = palloc(size); - askml2_inspected_buf(insp, kml, precision); - return kml; -} - -static size_t -pointArray_toKML2(POINTARRAY *pa, char *output, int precision) -{ - int i; - char *ptr; - char x[MAX_DIGS_DOUBLE+MAX_DOUBLE_PRECISION+1]; - char y[MAX_DIGS_DOUBLE+MAX_DOUBLE_PRECISION+1]; - char z[MAX_DIGS_DOUBLE+MAX_DOUBLE_PRECISION+1]; - - ptr = output; - - if ( ! TYPE_HASZ(pa->dims) ) - { - for (i=0; inpoints; i++) - { - POINT2D pt; - getPoint2d_p(pa, i, &pt); - - if (fabs(pt.x) < MAX_DOUBLE) - sprintf(x, "%.*f", precision, pt.x); - else - sprintf(x, "%g", pt.x); - trim_trailing_zeros(x); - - if (fabs(pt.y) < MAX_DOUBLE) - sprintf(y, "%.*f", precision, pt.y); - else - sprintf(y, "%g", pt.y); - trim_trailing_zeros(y); - - if ( i ) ptr += sprintf(ptr, " "); - ptr += sprintf(ptr, "%s,%s", x, y); - } - } - else - { - for (i=0; inpoints; i++) - { - POINT4D pt; - getPoint4d_p(pa, i, &pt); - - if (fabs(pt.x) < MAX_DOUBLE) - sprintf(x, "%.*f", precision, pt.x); - else - sprintf(x, "%g", pt.x); - trim_trailing_zeros(x); - - if (fabs(pt.y) < MAX_DOUBLE) - sprintf(y, "%.*f", precision, pt.y); - else - sprintf(y, "%g", pt.y); - trim_trailing_zeros(y); - - if (fabs(pt.z) < MAX_DOUBLE) - sprintf(z, "%.*f", precision, pt.z); - else - sprintf(z, "%g", pt.z); - trim_trailing_zeros(z); - - if ( i ) ptr += sprintf(ptr, " "); - ptr += sprintf(ptr, "%s,%s,%s", x, y, z); - } - } - - return ptr-output; -} - - - -/* - * Common KML routines - */ - -/* - * Returns maximum size of rendered pointarray in bytes. - */ -static size_t -pointArray_KMLsize(POINTARRAY *pa, int precision) -{ - if (TYPE_NDIMS(pa->dims) == 2) - return (MAX_DIGS_DOUBLE + precision + sizeof(", ")) - * 2 * pa->npoints; - - return (MAX_DIGS_DOUBLE + precision + sizeof(", ")) * 3 * pa->npoints; -} - diff -Nru postgis-1.5.3/postgis/lwgeom_ogc.c postgis-2.0.1/postgis/lwgeom_ogc.c --- postgis-1.5.3/postgis/lwgeom_ogc.c 2010-02-08 19:19:23.000000000 +0000 +++ postgis-2.0.1/postgis/lwgeom_ogc.c 2012-02-27 22:08:12.000000000 +0000 @@ -1,5 +1,5 @@ /********************************************************************** - * $Id: lwgeom_ogc.c 5216 2010-02-08 19:19:23Z strk $ + * $Id: lwgeom_ogc.c 9324 2012-02-27 22:08:12Z pramsey $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net @@ -24,14 +24,16 @@ #include "fmgr.h" #include "utils/elog.h" +#include "../postgis_config.h" + #include "liblwgeom.h" #include "lwgeom_pg.h" /* ---- SRID(geometry) */ -Datum LWGEOM_getSRID(PG_FUNCTION_ARGS); +Datum LWGEOM_get_srid(PG_FUNCTION_ARGS); /* ---- SetSRID(geometry, integer) */ -Datum LWGEOM_setSRID(PG_FUNCTION_ARGS); +Datum LWGEOM_set_srid(PG_FUNCTION_ARGS); /* ---- GeometryType(geometry) */ Datum LWGEOM_getTYPE(PG_FUNCTION_ARGS); Datum geometry_geometrytype(PG_FUNCTION_ARGS); @@ -72,40 +74,32 @@ /* ---- GeomFromWKB(bytea, integer) */ Datum LWGEOM_from_WKB(PG_FUNCTION_ARGS); /* ---- IsClosed(geometry) */ -Datum LWGEOM_isclosed_linestring(PG_FUNCTION_ARGS); - -/* internal */ -static int32 lwgeom_numpoints_linestring_recursive(const uchar *serialized); -static int32 lwgeom_dimension_recursive(const uchar *serialized); -char line_is_closed(LWLINE *line); -char circstring_is_closed(LWCIRCSTRING *curve); -char compound_is_closed(LWCOMPOUND *compound); +Datum LWGEOM_isclosed(PG_FUNCTION_ARGS); /*------------------------------------------------------------------*/ /* getSRID(lwgeom) :: int4 */ -PG_FUNCTION_INFO_V1(LWGEOM_getSRID); -Datum LWGEOM_getSRID(PG_FUNCTION_ARGS) +PG_FUNCTION_INFO_V1(LWGEOM_get_srid); +Datum LWGEOM_get_srid(PG_FUNCTION_ARGS) { - PG_LWGEOM *pglwgeom=(PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - int srid = pglwgeom_getSRID (pglwgeom); - PG_FREE_IF_COPY(pglwgeom,0); + GSERIALIZED *geom=(GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + int srid = gserialized_get_srid (geom); + PG_FREE_IF_COPY(geom,0); PG_RETURN_INT32(srid); } /* setSRID(lwgeom, int4) :: lwgeom */ -PG_FUNCTION_INFO_V1(LWGEOM_setSRID); -Datum LWGEOM_setSRID(PG_FUNCTION_ARGS) +PG_FUNCTION_INFO_V1(LWGEOM_set_srid); +Datum LWGEOM_set_srid(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - int newSRID = PG_GETARG_INT32(1); - PG_LWGEOM *result; - - result = PG_LWGEOM_construct(SERIALIZED_FORM(geom), newSRID, - lwgeom_hasBBOX(geom->type)); - + GSERIALIZED *result; + GSERIALIZED *geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + int srid = PG_GETARG_INT32(1); + LWGEOM *lwgeom = lwgeom_from_gserialized(geom); + lwgeom_set_srid(lwgeom, srid); + result = geometry_serialize(lwgeom); + lwgeom_free(lwgeom); PG_FREE_IF_COPY(geom, 0); - PG_RETURN_POINTER(result); } @@ -113,17 +107,17 @@ PG_FUNCTION_INFO_V1(LWGEOM_getTYPE); Datum LWGEOM_getTYPE(PG_FUNCTION_ARGS) { - PG_LWGEOM *lwgeom; + GSERIALIZED *lwgeom; char *text_ob; char *result; int32 size; - uchar type; + uint8_t type; - lwgeom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + lwgeom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); text_ob = lwalloc(20+VARHDRSZ); result = text_ob+VARHDRSZ; - type = lwgeom_getType(lwgeom->type); + type = gserialized_get_type(lwgeom); memset(VARDATA(text_ob), 0, 20); @@ -143,6 +137,8 @@ strcpy(result, "MULTICURVE"); else if (type == POLYGONTYPE) strcpy(result,"POLYGON"); + else if (type == TRIANGLETYPE) + strcpy(result,"TRIANGLE"); else if (type == CURVEPOLYTYPE) strcpy(result,"CURVEPOLYGON"); else if (type == MULTIPOLYGONTYPE) @@ -151,10 +147,14 @@ strcpy(result, "MULTISURFACE"); else if (type == COLLECTIONTYPE) strcpy(result,"GEOMETRYCOLLECTION"); + else if (type == POLYHEDRALSURFACETYPE) + strcpy(result,"POLYHEDRALSURFACE"); + else if (type == TINTYPE) + strcpy(result,"TIN"); else strcpy(result,"UNKNOWN"); - if ( TYPE_HASM(lwgeom->type) && ! TYPE_HASZ(lwgeom->type) ) + if ( gserialized_has_m(lwgeom) && ! gserialized_has_z(lwgeom) ) strcat(result, "M"); size = strlen(result) + VARHDRSZ ; @@ -170,149 +170,82 @@ PG_FUNCTION_INFO_V1(geometry_geometrytype); Datum geometry_geometrytype(PG_FUNCTION_ARGS) { - PG_LWGEOM *lwgeom; - char *type_text; + GSERIALIZED *lwgeom; + text *type_text; char *type_str = palloc(32); - size_t size; - lwgeom = (PG_LWGEOM*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + lwgeom = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); /* Make it empty string to start */ *type_str = 0; /* Build up the output string */ strncat(type_str, "ST_", 32); - strncat(type_str, lwgeom_typename(lwgeom_getType(lwgeom->type)), 32); - size = strlen(type_str) + VARHDRSZ; - + strncat(type_str, lwtype_name(gserialized_get_type(lwgeom)), 32); + /* Build a text type to store things in */ - type_text = lwalloc(size); - memcpy(VARDATA(type_text),type_str, size - VARHDRSZ); + type_text = cstring2text(type_str); pfree(type_str); - SET_VARSIZE(type_text, size); + PG_FREE_IF_COPY(lwgeom, 0); - PG_RETURN_POINTER(type_text); + PG_RETURN_TEXT_P(type_text); } -/** - * Find first linestring in serialized geometry and return - * the number of points in it. If no linestrings are found - * return -1. - */ -static int32 -lwgeom_numpoints_linestring_recursive(const uchar *serialized) -{ - LWGEOM_INSPECTED *inspected = lwgeom_inspect(serialized); - int i; - - LWDEBUG(2, "lwgeom_numpoints_linestring_recursive called."); - - /* - * CURVEPOLY and COMPOUND have no concept of numpoints but look like - * collections once inspected. Fast-fail on these here. - */ - if (lwgeom_getType(inspected->type) == COMPOUNDTYPE || - lwgeom_getType(inspected->type) == CURVEPOLYTYPE) - { - return -1; - } - - for (i=0; ingeometries; i++) - { - int32 npoints; - int type; - LWGEOM *geom=NULL; - uchar *subgeom; - - geom = lwgeom_getgeom_inspected(inspected, i); - - LWDEBUGF(3, "numpoints_recursive: type=%d", lwgeom_getType(geom->type)); - - if (lwgeom_getType(geom->type) == LINETYPE) - { - return ((LWLINE *)geom)->points->npoints; - } - else if (lwgeom_getType(geom->type) == CIRCSTRINGTYPE) - { - return ((LWCIRCSTRING *)geom)->points->npoints; - } - - subgeom = lwgeom_getsubgeometry_inspected(inspected, i); - if ( subgeom == NULL ) - { - elog(ERROR, "What ? lwgeom_getsubgeometry_inspected returned NULL??"); - } - - type = lwgeom_getType(subgeom[0]); - - /* MULTILINESTRING && GEOMETRYCOLLECTION are worth checking */ - if ( type != MULTILINETYPE && type != COLLECTIONTYPE ) continue; - - npoints = lwgeom_numpoints_linestring_recursive(subgeom); - if ( npoints == -1 ) continue; - - lwinspected_release(inspected); - - return npoints; - } - - lwinspected_release(inspected); - - return -1; -} /** - * numpoints(GEOMETRY) -- find the first linestring in GEOMETRY, return - * the number of points in it. Return NULL if there is no LINESTRING(..) - * in GEOMETRY - */ +* numpoints(LINESTRING) -- return the number of points in the +* linestring, or NULL if it is not a linestring +*/ PG_FUNCTION_INFO_V1(LWGEOM_numpoints_linestring); Datum LWGEOM_numpoints_linestring(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - int32 ret; + GSERIALIZED *geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + LWGEOM *lwgeom = lwgeom_from_gserialized(geom); + int count = -1; + + if ( lwgeom->type == LINETYPE ) + count = lwgeom_count_vertices(lwgeom); - POSTGIS_DEBUG(2, "LWGEOM_numpoints_linestring called."); + lwgeom_free(lwgeom); + PG_FREE_IF_COPY(geom, 0); - ret = lwgeom_numpoints_linestring_recursive(SERIALIZED_FORM(geom)); - if ( ret == -1 ) - { - PG_FREE_IF_COPY(geom, 0); + /* OGC says this functions is only valid on LINESTRING */ + if ( count < 0 ) PG_RETURN_NULL(); - } - PG_FREE_IF_COPY(geom, 0); - PG_RETURN_INT32(ret); + + PG_RETURN_INT32(count); } PG_FUNCTION_INFO_V1(LWGEOM_numgeometries_collection); Datum LWGEOM_numgeometries_collection(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - int type; - int32 ret; - uchar *serialized = SERIALIZED_FORM(geom); + GSERIALIZED *geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + LWGEOM *lwgeom; + int32 ret = 1; - type = lwgeom_getType(geom->type); - if (type==MULTIPOINTTYPE || type==MULTILINETYPE || - type==MULTICURVETYPE || type==MULTIPOLYGONTYPE || - type==MULTISURFACETYPE || type==COLLECTIONTYPE) + lwgeom = lwgeom_from_gserialized(geom); + if ( lwgeom_is_empty(lwgeom) ) { - ret = lwgeom_getnumgeometries(serialized); - PG_FREE_IF_COPY(geom, 0); - PG_RETURN_INT32(ret); + ret = 0; } + else if ( lwgeom_is_collection(lwgeom) ) + { + LWCOLLECTION *col = lwgeom_as_lwcollection(lwgeom); + ret = col->ngeoms; + } + lwgeom_free(lwgeom); PG_FREE_IF_COPY(geom, 0); - PG_RETURN_NULL(); + PG_RETURN_INT32(ret); } /** 1-based offset */ PG_FUNCTION_INFO_V1(LWGEOM_geometryn_collection); Datum LWGEOM_geometryn_collection(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_LWGEOM *result; - int type = lwgeom_getType(geom->type); + GSERIALIZED *geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *result; + int type = gserialized_get_type(geom); int32 idx; LWCOLLECTION *coll; LWGEOM *subgeom; @@ -321,127 +254,60 @@ /* elog(NOTICE, "GeometryN called"); */ + idx = PG_GETARG_INT32(1); + idx -= 1; /* index is 1-based */ + /* call is valid on multi* geoms only */ if (type==POINTTYPE || type==LINETYPE || type==CIRCSTRINGTYPE || - type==COMPOUNDTYPE || type==POLYGONTYPE || type==CURVEPOLYTYPE) + type==COMPOUNDTYPE || type==POLYGONTYPE || + type==CURVEPOLYTYPE || type==TRIANGLETYPE) { - /* elog(NOTICE, "geometryn: geom is of type %d, requires >=4", type); */ + if ( idx == 0 ) PG_RETURN_POINTER(geom); PG_RETURN_NULL(); } - idx = PG_GETARG_INT32(1); - idx -= 1; /* index is 1-based */ - - coll = (LWCOLLECTION *)lwgeom_deserialize(SERIALIZED_FORM(geom)); + coll = lwgeom_as_lwcollection(lwgeom_from_gserialized(geom)); if ( idx < 0 ) PG_RETURN_NULL(); if ( idx >= coll->ngeoms ) PG_RETURN_NULL(); subgeom = coll->geoms[idx]; - subgeom->SRID = coll->SRID; + subgeom->srid = coll->srid; /* COMPUTE_BBOX==TAINTING */ if ( coll->bbox ) lwgeom_add_bbox(subgeom); - result = pglwgeom_serialize(subgeom); + result = geometry_serialize(subgeom); - lwgeom_release((LWGEOM *)coll); + lwcollection_free(coll); PG_FREE_IF_COPY(geom, 0); PG_RETURN_POINTER(result); } -/** - * @brief returns 0 for points, 1 for lines, 2 for polygons. - * returns max dimension for a collection. - * returns -1 for the empty geometry (TODO) - * returns -2 on error - */ -static int32 -lwgeom_dimension_recursive(const uchar *serialized) -{ - LWGEOM_INSPECTED *inspected; - int ret = -1; - int i; - - /** @todo - * This has the unfortunate habit of traversing the CURVEPOLYTYPe - * geoms and returning 1, as all contained geoms are linear. - * Here we preempt this problem. - * TODO: This should handle things a bit better. Only - * GEOMETRYCOLLECTION should ever need to be traversed. - */ - if (lwgeom_getType(serialized[0]) == CURVEPOLYTYPE) return 2; - - inspected = lwgeom_inspect(serialized); - for (i=0; ingeometries; i++) - { - uchar *subgeom; - char typeflags = lwgeom_getsubtype_inspected(inspected, i); - int type = lwgeom_getType(typeflags); - int dims=-1; - - LWDEBUGF(3, "lwgeom_dimension_recursive: type %d", type); - - if ( type == POINTTYPE ) dims = 0; - else if ( type == MULTIPOINTTYPE ) dims=0; - else if ( type == LINETYPE ) dims=1; - else if ( type == CIRCSTRINGTYPE ) dims=1; - else if ( type == COMPOUNDTYPE ) dims=1; - else if ( type == MULTILINETYPE ) dims=1; - else if ( type == MULTICURVETYPE ) dims=1; - else if ( type == POLYGONTYPE ) dims=2; - else if ( type == CURVEPOLYTYPE ) dims=2; - else if ( type == MULTIPOLYGONTYPE ) dims=2; - else if ( type == MULTISURFACETYPE ) dims=2; - else if ( type == COLLECTIONTYPE ) - { - subgeom = lwgeom_getsubgeometry_inspected(inspected, i); - if ( subgeom == NULL ) - { - lwinspected_release(inspected); - return -2; - } - - dims = lwgeom_dimension_recursive(subgeom); - } - - if ( dims == 2 ) - { /* nothing can be higher */ - lwinspected_release(inspected); - return 2; - } - if ( dims > ret ) ret = dims; - } - - lwinspected_release(inspected); - - return ret; -} /** @brief - * returns 0 for points, 1 for lines, 2 for polygons. - * returns max dimension for a collection. - * TODO: @todo return -1 for the empty geometry (TODO) - */ +* returns 0 for points, 1 for lines, 2 for polygons, 3 for volume. +* returns max dimension for a collection. +*/ PG_FUNCTION_INFO_V1(LWGEOM_dimension); Datum LWGEOM_dimension(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - int dimension; + GSERIALIZED *geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + LWGEOM *lwgeom = lwgeom_from_gserialized(geom); + int dimension = -1; - POSTGIS_DEBUG(2, "LWGEOM_dimension called"); - - dimension = lwgeom_dimension_recursive(SERIALIZED_FORM(geom)); - if ( dimension == -1 ) + dimension = lwgeom_dimension(lwgeom); + lwgeom_free(lwgeom); + PG_FREE_IF_COPY(geom, 0); + + if ( dimension < 0 ) { - PG_FREE_IF_COPY(geom, 0); - elog(ERROR, "Something went wrong in dimension computation"); + elog(NOTICE, "Could not compute geometry dimensions"); PG_RETURN_NULL(); } - PG_FREE_IF_COPY(geom, 0); PG_RETURN_INT32(dimension); } @@ -454,26 +320,36 @@ PG_FUNCTION_INFO_V1(LWGEOM_exteriorring_polygon); Datum LWGEOM_exteriorring_polygon(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - LWPOLY *poly = NULL; - LWCURVEPOLY *curvepoly = NULL; + GSERIALIZED *geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *result; POINTARRAY *extring; - LWGEOM *ring; + LWGEOM *lwgeom; LWLINE *line; - PG_LWGEOM *result; - BOX2DFLOAT4 *bbox=NULL; + GBOX *bbox=NULL; + int type = gserialized_get_type(geom); POSTGIS_DEBUG(2, "LWGEOM_exteriorring_polygon called."); - if ( TYPE_GETTYPE(geom->type) != POLYGONTYPE && - TYPE_GETTYPE(geom->type) != CURVEPOLYTYPE) + if ( (type != POLYGONTYPE) && + (type != CURVEPOLYTYPE) && + (type != TRIANGLETYPE)) { elog(ERROR, "ExteriorRing: geom is not a polygon"); PG_RETURN_NULL(); } - if (lwgeom_getType((uchar)SERIALIZED_FORM(geom)[0]) == POLYGONTYPE) + + lwgeom = lwgeom_from_gserialized(geom); + + if( lwgeom_is_empty(lwgeom) ) + { + line = lwline_construct_empty(lwgeom->srid, + lwgeom_has_z(lwgeom), + lwgeom_has_m(lwgeom)); + result = geometry_serialize(lwline_as_lwgeom(line)); + } + else if ( lwgeom->type == POLYGONTYPE ) { - poly = lwpoly_deserialize(SERIALIZED_FORM(geom)); + LWPOLY *poly = lwgeom_as_lwpoly(lwgeom); /* Ok, now we have a polygon. Here is its exterior ring. */ extring = poly->rings[0]; @@ -483,93 +359,73 @@ * If the input geom has a bbox, use it for * the output geom, as exterior ring makes it up ! */ - if ( poly->bbox ) bbox=box2d_clone(poly->bbox); - line = lwline_construct(poly->SRID, bbox, extring); + if ( poly->bbox ) + bbox = gbox_copy(poly->bbox); - result = pglwgeom_serialize((LWGEOM *)line); + line = lwline_construct(poly->srid, bbox, extring); + result = geometry_serialize((LWGEOM *)line); + + lwgeom_release((LWGEOM *)line); + } + else if ( lwgeom->type == TRIANGLETYPE ) + { + LWTRIANGLE *triangle = lwgeom_as_lwtriangle(lwgeom); + + /* + * This is a LWLINE constructed by exterior ring POINTARRAY + * If the input geom has a bbox, use it for + * the output geom, as exterior ring makes it up ! + */ + if ( triangle->bbox ) + bbox = gbox_copy(triangle->bbox); + line = lwline_construct(triangle->srid, bbox, triangle->points); + + result = geometry_serialize((LWGEOM *)line); lwgeom_release((LWGEOM *)line); - lwgeom_release((LWGEOM *)poly); } else { - curvepoly = lwcurvepoly_deserialize(SERIALIZED_FORM(geom)); - ring = curvepoly->rings[0]; - result = pglwgeom_serialize(ring); - lwgeom_release(ring); + LWCURVEPOLY *curvepoly = lwgeom_as_lwcurvepoly(lwgeom); + result = geometry_serialize(curvepoly->rings[0]); } + lwgeom_free(lwgeom); PG_FREE_IF_COPY(geom, 0); - - PG_RETURN_POINTER(result); } /** - * NumInteriorRings(GEOMETRY) -- find the first polygon in GEOMETRY, - * @return the number of its interior rings (holes). - * Return NULL if there is no POLYGON(..) in (first level of) GEOMETRY. - */ +* NumInteriorRings(GEOMETRY) defined for Polygon and +* and CurvePolygon. +* +* @return the number of its interior rings (holes). NULL if not a polygon. +*/ PG_FUNCTION_INFO_V1(LWGEOM_numinteriorrings_polygon); Datum LWGEOM_numinteriorrings_polygon(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - LWGEOM_INSPECTED *inspected = NULL; - LWGEOM *tmp = NULL; + GSERIALIZED *geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + LWGEOM *lwgeom = lwgeom_from_gserialized(geom); LWPOLY *poly = NULL; LWCURVEPOLY *curvepoly = NULL; - int32 result; - int i; + int result = -1; - POSTGIS_DEBUG(2, "LWGEOM_numinteriorrings called."); - - if (lwgeom_getType((uchar)SERIALIZED_FORM(geom)[0]) == CURVEPOLYTYPE) + if ( lwgeom->type == POLYGONTYPE ) { - tmp = (LWGEOM *)lwcurvepoly_deserialize(SERIALIZED_FORM(geom)); + poly = lwgeom_as_lwpoly(lwgeom); + result = poly->nrings - 1; } - else - { - inspected = lwgeom_inspect(SERIALIZED_FORM(geom)); - for (i=0; ingeometries; i++) - { - tmp = lwgeom_getgeom_inspected(inspected, i); - if (lwgeom_getType(tmp->type) == POLYGONTYPE || - lwgeom_getType(tmp->type) == CURVEPOLYTYPE) break; - } - } - - if ( tmp == NULL ) - { - PG_FREE_IF_COPY(geom, 0); - lwinspected_release(inspected); - PG_RETURN_NULL(); - } - - POSTGIS_DEBUGF(3, "Geometry of type %d found.", lwgeom_getType(tmp->type)); - - if (lwgeom_getType(tmp->type) == POLYGONTYPE) - { - poly = (LWPOLY *)tmp; - - /* Ok, now we have a polygon. Here is its number of holes */ - result = poly->nrings-1; - } - else if (lwgeom_getType(tmp->type) == CURVEPOLYTYPE) - { - POSTGIS_DEBUG(3, "CurvePolygon found."); - - curvepoly = (LWCURVEPOLY *)tmp; - result = curvepoly->nrings-1; - } - else + else if ( lwgeom->type == CURVEPOLYTYPE ) { - PG_FREE_IF_COPY(geom, 0); - lwinspected_release(inspected); - PG_RETURN_NULL(); + curvepoly = lwgeom_as_lwcurvepoly(lwgeom); + result = curvepoly->nrings - 1; } + + lwgeom_free(lwgeom); PG_FREE_IF_COPY(geom, 0); - if (inspected != NULL) lwinspected_release(inspected); - lwgeom_release((LWGEOM *)tmp); + + if ( result < 0 ) + PG_RETURN_NULL(); PG_RETURN_INT32(result); } @@ -583,14 +439,16 @@ PG_FUNCTION_INFO_V1(LWGEOM_interiorringn_polygon); Datum LWGEOM_interiorringn_polygon(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom; + GSERIALIZED *geom; int32 wanted_index; LWCURVEPOLY *curvepoly = NULL; LWPOLY *poly = NULL; POINTARRAY *ring; LWLINE *line; - PG_LWGEOM *result; - BOX2DFLOAT4 *bbox = NULL; + LWGEOM *lwgeom; + GSERIALIZED *result; + GBOX *bbox = NULL; + int type; POSTGIS_DEBUG(2, "LWGEOM_interierringn_polygon called."); @@ -601,45 +459,56 @@ PG_RETURN_NULL(); /* index out of range */ } - geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + type = gserialized_get_type(geom); - if ( TYPE_GETTYPE(geom->type) != POLYGONTYPE && - TYPE_GETTYPE(geom->type) != CURVEPOLYTYPE ) + if ( (type != POLYGONTYPE) && (type != CURVEPOLYTYPE) ) { - PG_FREE_IF_COPY(geom, 0); elog(ERROR, "InteriorRingN: geom is not a polygon"); + PG_FREE_IF_COPY(geom, 0); PG_RETURN_NULL(); } - if ( TYPE_GETTYPE(geom->type) == POLYGONTYPE) + + lwgeom = lwgeom_from_gserialized(geom); + if( lwgeom_is_empty(lwgeom) ) { - poly = lwpoly_deserialize(SERIALIZED_FORM(geom)); + lwpoly_free(poly); + PG_FREE_IF_COPY(geom, 0); + PG_RETURN_NULL(); + } + + if ( type == POLYGONTYPE) + { + poly = lwgeom_as_lwpoly(lwgeom_from_gserialized(geom)); /* Ok, now we have a polygon. Let's see if it has enough holes */ if ( wanted_index >= poly->nrings ) { + lwpoly_free(poly); PG_FREE_IF_COPY(geom, 0); - lwgeom_release((LWGEOM *)poly); PG_RETURN_NULL(); } ring = poly->rings[wanted_index]; /* COMPUTE_BBOX==TAINTING */ - if ( poly->bbox ) bbox = ptarray_compute_box2d(ring); + if ( poly->bbox ) + { + bbox = lwalloc(sizeof(GBOX)); + ptarray_calculate_gbox_cartesian(ring, bbox); + } /* This is a LWLINE constructed by interior ring POINTARRAY */ - line = lwline_construct(poly->SRID, bbox, ring); + line = lwline_construct(poly->srid, bbox, ring); - /* Copy SRID from polygon */ - line->SRID = poly->SRID; - result = pglwgeom_serialize((LWGEOM *)line); - lwgeom_release((LWGEOM *)line); - lwgeom_release((LWGEOM *)poly); + result = geometry_serialize((LWGEOM *)line); + lwline_release(line); + lwpoly_free(poly); } else { - curvepoly = lwcurvepoly_deserialize(SERIALIZED_FORM(geom)); + curvepoly = lwgeom_as_lwcurvepoly(lwgeom_from_gserialized(geom)); if (wanted_index >= curvepoly->nrings) { @@ -648,13 +517,11 @@ PG_RETURN_NULL(); } - result = pglwgeom_serialize(curvepoly->rings[wanted_index]); - lwgeom_release((LWGEOM *)curvepoly); + result = geometry_serialize(curvepoly->rings[wanted_index]); + lwgeom_free((LWGEOM*)curvepoly); } - PG_FREE_IF_COPY(geom, 0); - PG_RETURN_POINTER(result); } @@ -666,110 +533,29 @@ PG_FUNCTION_INFO_V1(LWGEOM_pointn_linestring); Datum LWGEOM_pointn_linestring(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom; - int32 wanted_index; - LWGEOM_INSPECTED *inspected; - LWLINE *line = NULL; - LWCIRCSTRING *curve = NULL; - LWGEOM *tmp = NULL; - POINTARRAY *pts; - LWPOINT *point; - uchar *serializedpoint; - PG_LWGEOM *result; - int i, type; - - wanted_index = PG_GETARG_INT32(1); - if ( wanted_index < 1 ) - PG_RETURN_NULL(); /* index out of range */ + GSERIALIZED *geom = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + int where = PG_GETARG_INT32(1); + LWGEOM *lwgeom = lwgeom_from_gserialized(geom); + LWPOINT *lwpoint = NULL; + int type = lwgeom->type; + + /* Can't handle crazy index! */ + if ( where < 1 ) + PG_RETURN_NULL(); - geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - type = lwgeom_getType((uchar)SERIALIZED_FORM(geom)[0]); - if (type == COMPOUNDTYPE || type == CURVEPOLYTYPE) + if ( type == LINETYPE || type == CIRCSTRINGTYPE ) { - PG_FREE_IF_COPY(geom, 0); - PG_RETURN_NULL(); + /* OGC index starts at one, so we substract first. */ + lwpoint = lwline_get_lwpoint((LWLINE*)lwgeom, where - 1); } - else - { - inspected = lwgeom_inspect(SERIALIZED_FORM(geom)); - - for (i=0; ingeometries; i++) - { - tmp = lwgeom_getgeom_inspected(inspected, i); - if (lwgeom_getType(tmp->type) == LINETYPE || - lwgeom_getType(tmp->type) == CIRCSTRINGTYPE) - break; - } - if ( tmp == NULL ) - { - lwinspected_release(inspected); - PG_FREE_IF_COPY(geom, 0); - PG_RETURN_NULL(); - } - if (lwgeom_getType(tmp->type) == CIRCSTRINGTYPE) - { - curve = (LWCIRCSTRING *)tmp; - if (wanted_index > curve->points->npoints) - { - lwinspected_release(inspected); - PG_FREE_IF_COPY(geom, 0); - lwgeom_release(tmp); - PG_RETURN_NULL(); - } - lwinspected_release(inspected); - - pts = pointArray_construct(getPoint_internal( - curve->points, - wanted_index-1), - TYPE_HASZ(curve->type), - TYPE_HASM(curve->type), 1); - } - else if (lwgeom_getType(tmp->type) == LINETYPE) - { - line = (LWLINE *)tmp; - /* Ok, now we have a line. Let's see if it has enough points. */ - if ( wanted_index > line->points->npoints ) - { - lwinspected_release(inspected); - PG_FREE_IF_COPY(geom, 0); - lwgeom_release(tmp); - PG_RETURN_NULL(); - } - lwinspected_release(inspected); - - /* Construct a point array */ - pts = pointArray_construct(getPoint_internal(line->points, - wanted_index-1), - TYPE_HASZ(line->type), TYPE_HASM(line->type), 1); - } - else - { - lwinspected_release(inspected); - PG_FREE_IF_COPY(geom, 0); - lwgeom_release(tmp); - PG_RETURN_NULL(); - } - } + lwgeom_free(lwgeom); + PG_FREE_IF_COPY(geom, 0); - /* Construct an LWPOINT */ - point = lwpoint_construct(pglwgeom_getSRID(geom), - NULL, pts); - - /* Serialized the point */ - serializedpoint = lwpoint_serialize(point); - - /* And we construct the line - * TODO: use serialize_buf above, instead .. - */ - result = PG_LWGEOM_construct(serializedpoint, - pglwgeom_getSRID(geom), 0); + if ( ! lwpoint ) + PG_RETURN_NULL(); - pfree(point); - pfree(serializedpoint); - PG_FREE_IF_COPY(geom, 0); - lwgeom_release(tmp); - PG_RETURN_POINTER(result); + PG_RETURN_POINTER(geometry_serialize(lwpoint_as_lwgeom(lwpoint))); } /** @@ -779,21 +565,25 @@ PG_FUNCTION_INFO_V1(LWGEOM_x_point); Datum LWGEOM_x_point(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom; + GSERIALIZED *geom; + LWGEOM *lwgeom; LWPOINT *point = NULL; POINT2D p; - geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - if ( TYPE_GETTYPE(geom->type) != POINTTYPE ) + if ( gserialized_get_type(geom) != POINTTYPE ) lwerror("Argument to X() must be a point"); - point = lwgeom_getpoint(SERIALIZED_FORM(geom), 0); + lwgeom = lwgeom_from_gserialized(geom); + point = lwgeom_as_lwpoint(lwgeom); + + if ( lwgeom_is_empty(lwgeom) ) + PG_RETURN_NULL(); getPoint2d_p(point->point, 0, &p); PG_FREE_IF_COPY(geom, 0); - PG_RETURN_FLOAT8(p.x); } @@ -804,16 +594,21 @@ PG_FUNCTION_INFO_V1(LWGEOM_y_point); Datum LWGEOM_y_point(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom; + GSERIALIZED *geom; LWPOINT *point = NULL; + LWGEOM *lwgeom; POINT2D p; - geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - if ( TYPE_GETTYPE(geom->type) != POINTTYPE ) + if ( gserialized_get_type(geom) != POINTTYPE ) lwerror("Argument to Y() must be a point"); - point = lwgeom_getpoint(SERIALIZED_FORM(geom), 0); + lwgeom = lwgeom_from_gserialized(geom); + point = lwgeom_as_lwpoint(lwgeom); + + if ( lwgeom_is_empty(lwgeom) ) + PG_RETURN_NULL(); getPoint2d_p(point->point, 0, &p); @@ -830,19 +625,24 @@ PG_FUNCTION_INFO_V1(LWGEOM_z_point); Datum LWGEOM_z_point(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom; + GSERIALIZED *geom; LWPOINT *point = NULL; + LWGEOM *lwgeom; POINT3DZ p; - geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - if ( TYPE_GETTYPE(geom->type) != POINTTYPE ) + if ( gserialized_get_type(geom) != POINTTYPE ) lwerror("Argument to Z() must be a point"); - point = lwgeom_getpoint(SERIALIZED_FORM(geom), 0); + lwgeom = lwgeom_from_gserialized(geom); + point = lwgeom_as_lwpoint(lwgeom); + + if ( lwgeom_is_empty(lwgeom) ) + PG_RETURN_NULL(); /* no Z in input */ - if ( ! TYPE_HASZ(geom->type) ) PG_RETURN_NULL(); + if ( ! gserialized_has_z(geom) ) PG_RETURN_NULL(); getPoint3dz_p(point->point, 0, &p); @@ -858,19 +658,24 @@ PG_FUNCTION_INFO_V1(LWGEOM_m_point); Datum LWGEOM_m_point(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom; + GSERIALIZED *geom; LWPOINT *point = NULL; + LWGEOM *lwgeom; POINT3DM p; - geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - if ( TYPE_GETTYPE(geom->type) != POINTTYPE ) + if ( gserialized_get_type(geom) != POINTTYPE ) lwerror("Argument to M() must be a point"); - point = lwgeom_getpoint(SERIALIZED_FORM(geom), 0); + lwgeom = lwgeom_from_gserialized(geom); + point = lwgeom_as_lwpoint(lwgeom); + + if ( lwgeom_is_empty(lwgeom) ) + PG_RETURN_NULL(); /* no M in input */ - if ( ! TYPE_HASM(point->type) ) PG_RETURN_NULL(); + if ( ! FLAGS_GET_M(point->flags) ) PG_RETURN_NULL(); getPoint3dm_p(point->point, 0, &p); @@ -879,68 +684,31 @@ PG_RETURN_FLOAT8(p.m); } -/** StartPoint(GEOMETRY) -- find the first linestring in GEOMETRY, - * @return the first point. - * Return NULL if there is no LINESTRING(..) in GEOMETRY - */ +/** +* ST_StartPoint(GEOMETRY) +* @return the first point of a linestring. +* Return NULL if there is no LINESTRING +*/ PG_FUNCTION_INFO_V1(LWGEOM_startpoint_linestring); Datum LWGEOM_startpoint_linestring(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom; - LWGEOM_INSPECTED *inspected; - LWLINE *line = NULL; - POINTARRAY *pts; - LWPOINT *point; - PG_LWGEOM *result; - int i, type; - - POSTGIS_DEBUG(2, "LWGEOM_startpoint_linestring called."); - - geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - - /* - * Curved polygons and compound curves are both collections - * that should not be traversed looking for linestrings. - */ - type = lwgeom_getType((uchar)SERIALIZED_FORM(geom)[0]); - if (type == CURVEPOLYTYPE || type == COMPOUNDTYPE) - { - PG_FREE_IF_COPY(geom, 0); - PG_RETURN_NULL(); - } - - inspected = lwgeom_inspect(SERIALIZED_FORM(geom)); - - for (i=0; ingeometries; i++) - { - line = lwgeom_getline_inspected(inspected, i); - if ( line ) break; - } + GSERIALIZED *geom = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + LWGEOM *lwgeom = lwgeom_from_gserialized(geom); + LWPOINT *lwpoint = NULL; + int type = lwgeom->type; - if ( line == NULL ) + if ( type == LINETYPE || type == CIRCSTRINGTYPE ) { - PG_FREE_IF_COPY(geom, 0); - PG_RETURN_NULL(); + lwpoint = lwline_get_lwpoint((LWLINE*)lwgeom, 0); } - /* Ok, now we have a line. */ - - /* Construct a point array */ - pts = pointArray_construct(getPoint_internal(line->points, 0), - TYPE_HASZ(line->type), - TYPE_HASM(line->type), 1); - lwgeom_release((LWGEOM *)line); - - /* Construct an LWPOINT */ - point = lwpoint_construct(pglwgeom_getSRID(geom), NULL, pts); - - /* Construct a PG_LWGEOM */ - result = pglwgeom_serialize((LWGEOM *)point); - - lwgeom_release((LWGEOM *)point); + lwgeom_free(lwgeom); PG_FREE_IF_COPY(geom, 0); - PG_RETURN_POINTER(result); + if ( ! lwpoint ) + PG_RETURN_NULL(); + + PG_RETURN_POINTER(geometry_serialize(lwpoint_as_lwgeom(lwpoint))); } /** EndPoint(GEOMETRY) -- find the first linestring in GEOMETRY, @@ -950,58 +718,25 @@ PG_FUNCTION_INFO_V1(LWGEOM_endpoint_linestring); Datum LWGEOM_endpoint_linestring(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom; - LWGEOM_INSPECTED *inspected; - LWLINE *line = NULL; - POINTARRAY *pts; - LWGEOM *point; - PG_LWGEOM *result; - int i, type; - - POSTGIS_DEBUG(2, "LWGEOM_endpoint_linestring called."); - - geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - type = lwgeom_getType((uchar)SERIALIZED_FORM(geom)[0]); - if (type == CURVEPOLYTYPE || type == COMPOUNDTYPE) - { - PG_FREE_IF_COPY(geom, 0); - PG_RETURN_NULL(); - } - - inspected = lwgeom_inspect(SERIALIZED_FORM(geom)); + GSERIALIZED *geom = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + LWGEOM *lwgeom = lwgeom_from_gserialized(geom); + LWPOINT *lwpoint = NULL; + int type = lwgeom->type; - for (i=0; ingeometries; i++) + if ( type == LINETYPE || type == CIRCSTRINGTYPE ) { - line = lwgeom_getline_inspected(inspected, i); - if ( line ) break; - } - lwinspected_release(inspected); - - if ( line == NULL ) - { - PG_FREE_IF_COPY(geom, 0); - PG_RETURN_NULL(); + LWLINE *line = (LWLINE*)lwgeom; + if ( line->points ) + lwpoint = lwline_get_lwpoint((LWLINE*)lwgeom, line->points->npoints - 1); } - /* Ok, now we have a line. */ - - /* Construct a point array */ - pts = pointArray_construct( - getPoint_internal(line->points, line->points->npoints-1), - TYPE_HASZ(line->type), - TYPE_HASM(line->type), 1); - lwgeom_release((LWGEOM *)line); - - /* Construct an LWPOINT */ - point = (LWGEOM *)lwpoint_construct(pglwgeom_getSRID(geom), NULL, pts); - - /* Serialize an PG_LWGEOM */ - result = pglwgeom_serialize(point); - lwgeom_release(point); - + lwgeom_free(lwgeom); PG_FREE_IF_COPY(geom, 0); - PG_RETURN_POINTER(result); + if ( ! lwpoint ) + PG_RETURN_NULL(); + + PG_RETURN_POINTER(geometry_serialize(lwpoint_as_lwgeom(lwpoint))); } /** @@ -1015,49 +750,30 @@ Datum LWGEOM_from_text(PG_FUNCTION_ARGS) { text *wkttext = PG_GETARG_TEXT_P(0); - char *wkt, fc; - size_t size; + char *wkt = text2cstring(wkttext); LWGEOM_PARSER_RESULT lwg_parser_result; - PG_LWGEOM *geom_result = NULL; + GSERIALIZED *geom_result = NULL; LWGEOM *lwgeom; - int result; POSTGIS_DEBUG(2, "LWGEOM_from_text"); - - size = VARSIZE(wkttext)-VARHDRSZ; - - POSTGIS_DEBUGF(3, "size: %d", (int)size); - - if ( size < 10 ) - { - lwerror("Invalid OGC WKT (too short)"); - PG_RETURN_NULL(); - } - - fc=*(VARDATA(wkttext)); - - wkt = lwalloc(size+1); - memcpy(wkt, VARDATA(wkttext), size); - wkt[size]='\0'; - POSTGIS_DEBUGF(3, "wkt: [%s]", wkt); - result = serialized_lwgeom_from_ewkt(&lwg_parser_result, wkt, PARSER_CHECK_ALL); - if (result) + if (lwgeom_parse_wkt(&lwg_parser_result, wkt, LW_PARSER_CHECK_ALL) == LW_FAILURE) PG_PARSER_ERROR(lwg_parser_result); - lwgeom = lwgeom_deserialize(lwg_parser_result.serialized_lwgeom); + lwgeom = lwg_parser_result.geom; - if ( lwgeom->SRID != -1 || TYPE_GETZM(lwgeom->type) != 0 ) + if ( lwgeom->srid != SRID_UNKNOWN ) { elog(WARNING, "OGC WKT expected, EWKT provided - use GeomFromEWKT() for this"); } /* read user-requested SRID if any */ - if ( PG_NARGS() > 1 ) lwgeom->SRID = PG_GETARG_INT32(1); + if ( PG_NARGS() > 1 ) + lwgeom_set_srid(lwgeom, PG_GETARG_INT32(1)); - geom_result = pglwgeom_serialize(lwgeom); - lwgeom_release(lwgeom); + geom_result = geometry_serialize(lwgeom); + lwgeom_parser_result_free(&lwg_parser_result); PG_RETURN_POINTER(geom_result); } @@ -1073,14 +789,14 @@ PG_FUNCTION_INFO_V1(LWGEOM_from_WKB); Datum LWGEOM_from_WKB(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom; - int32 SRID; - PG_LWGEOM *result = NULL; + GSERIALIZED *geom; + int32 srid; + GSERIALIZED *result = NULL; - geom = (PG_LWGEOM *)DatumGetPointer(DirectFunctionCall1( + geom = (GSERIALIZED *)DatumGetPointer(DirectFunctionCall1( LWGEOMFromWKB, PG_GETARG_DATUM(0))); - if ( pglwgeom_getSRID(geom) != -1 || TYPE_GETZM(geom->type) != 0 ) + if ( gserialized_get_srid(geom) != SRID_UNKNOWN ) { elog(WARNING, "OGC WKB expected, EWKB provided - use GeometryFromEWKB() for this"); } @@ -1089,12 +805,9 @@ /* read user-requested SRID if any */ if ( PG_NARGS() > 1 ) { - SRID = PG_GETARG_INT32(1); - if ( SRID != pglwgeom_getSRID(geom) ) - { - result = pglwgeom_setSRID(geom, SRID); - pfree(geom); - } + srid = PG_GETARG_INT32(1); + if ( srid != gserialized_get_srid(geom) ) + gserialized_set_srid(geom, srid); } if ( ! result ) result = geom; @@ -1106,147 +819,79 @@ PG_FUNCTION_INFO_V1(LWGEOM_asText); Datum LWGEOM_asText(PG_FUNCTION_ARGS) { - LWGEOM_UNPARSER_RESULT lwg_unparser_result; - PG_LWGEOM *lwgeom; - PG_LWGEOM *ogclwgeom; - int len, result; - char *lwgeom_result,*loc_wkt; - char *semicolonLoc; - - POSTGIS_DEBUG(2, "LWGEOM_asText called."); - - lwgeom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - - /* Force to 2d */ - ogclwgeom = (PG_LWGEOM *)DatumGetPointer(DirectFunctionCall1( - LWGEOM_force_2d, PointerGetDatum(lwgeom))); - - result = serialized_lwgeom_to_ewkt(&lwg_unparser_result, SERIALIZED_FORM(ogclwgeom), PARSER_CHECK_NONE); - if (result) - PG_UNPARSER_ERROR(lwg_unparser_result); - - semicolonLoc = strchr(lwg_unparser_result.wkoutput,';'); + GSERIALIZED *geom; + LWGEOM *lwgeom; + char *wkt; + size_t wkt_size; + text *result; - /* loc points to start of wkt */ - if (semicolonLoc == NULL) loc_wkt = lwg_unparser_result.wkoutput; - else loc_wkt = semicolonLoc +1; + POSTGIS_DEBUG(2, "Called."); - len = strlen(loc_wkt)+VARHDRSZ; - lwgeom_result = palloc(len); - SET_VARSIZE(lwgeom_result, len); + geom = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + lwgeom = lwgeom_from_gserialized(geom); - memcpy(VARDATA(lwgeom_result), loc_wkt, len-VARHDRSZ); + /* Write to WKT and free the geometry */ + wkt = lwgeom_to_wkt(lwgeom, WKT_ISO, DBL_DIG, &wkt_size); + lwgeom_free(lwgeom); + POSTGIS_DEBUGF(3, "WKT size = %d, WKT length = %d", wkt_size, strlen(wkt)); - pfree(lwg_unparser_result.wkoutput); - PG_FREE_IF_COPY(lwgeom, 0); - if ( ogclwgeom != lwgeom ) pfree(ogclwgeom); + /* Write to text and free the WKT */ + result = cstring2text(wkt); + pfree(wkt); - PG_RETURN_POINTER(lwgeom_result); + /* Return the text */ + PG_FREE_IF_COPY(geom, 0); + PG_RETURN_TEXT_P(result); } + /** convert LWGEOM to wkb (in BINARY format) */ PG_FUNCTION_INFO_V1(LWGEOM_asBinary); Datum LWGEOM_asBinary(PG_FUNCTION_ARGS) { - PG_LWGEOM *ogclwgeom; - char *result; - - /* Force to 2d */ - ogclwgeom = (PG_LWGEOM *)DatumGetPointer(DirectFunctionCall1( - LWGEOM_force_2d, PG_GETARG_DATUM(0))); - - /* Drop SRID */ - ogclwgeom = (PG_LWGEOM *)DatumGetPointer(DirectFunctionCall2( - LWGEOM_setSRID, PointerGetDatum(ogclwgeom), -1)); + GSERIALIZED *geom; + LWGEOM *lwgeom; + uint8_t *wkb; + size_t wkb_size; + bytea *result; + uint8_t variant = WKB_ISO; + + /* Get a 2D version of the geometry */ + geom = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + lwgeom = lwgeom_from_gserialized(geom); - /* Call WKBFromLWGEOM */ + /* If user specified endianness, respect it */ if ( (PG_NARGS()>1) && (!PG_ARGISNULL(1)) ) { - result = (char *)DatumGetPointer(DirectFunctionCall2( - WKBFromLWGEOM, PointerGetDatum(ogclwgeom), - PG_GETARG_DATUM(1))); - } - else - { - result = (char *)DatumGetPointer(DirectFunctionCall1( - WKBFromLWGEOM, PointerGetDatum(ogclwgeom))); - } - - PG_RETURN_POINTER(result); -} - -char line_is_closed(LWLINE *line) -{ - POINT3DZ sp, ep; + text *wkb_endian = PG_GETARG_TEXT_P(1); - LWDEBUG(2, "line_is_closed called."); - - getPoint3dz_p(line->points, 0, &sp); - getPoint3dz_p(line->points, line->points->npoints-1, &ep); - - if ( sp.x != ep.x ) return 0; - if ( sp.y != ep.y ) return 0; - if ( TYPE_HASZ(line->type) ) - { - if ( sp.z != ep.z ) return 0; + if ( ! strncmp(VARDATA(wkb_endian), "xdr", 3) || + ! strncmp(VARDATA(wkb_endian), "XDR", 3) ) + { + variant = variant | WKB_XDR; + } + else + { + variant = variant | WKB_NDR; + } } + + /* Write to WKB and free the geometry */ + wkb = lwgeom_to_wkb(lwgeom, variant, &wkb_size); + lwgeom_free(lwgeom); - return 1; -} + /* Write to text and free the WKT */ + result = palloc(wkb_size + VARHDRSZ); + memcpy(VARDATA(result), wkb, wkb_size); + SET_VARSIZE(result, wkb_size + VARHDRSZ); + pfree(wkb); -char circstring_is_closed(LWCIRCSTRING *curve) -{ - POINT3DZ sp, ep; - - LWDEBUG(2, "circstring_is_closed called."); - - getPoint3dz_p(curve->points, 0, &sp); - getPoint3dz_p(curve->points, curve->points->npoints-1, &ep); - - if (sp.x != ep.x) return 0; - if (sp.y != ep.y) return 0; - if (TYPE_HASZ(curve->type)) - { - if (sp.z != ep.z) return 0; - } - return 1; + /* Return the text */ + PG_FREE_IF_COPY(geom, 0); + PG_RETURN_BYTEA_P(result); } -char compound_is_closed(LWCOMPOUND *compound) -{ - POINT3DZ sp, ep; - LWGEOM *tmp; - - LWDEBUG(2, "compound_is_closed called."); - - tmp = compound->geoms[0]; - if (lwgeom_getType(tmp->type) == LINETYPE) - { - getPoint3dz_p(((LWLINE *)tmp)->points, 0, &sp); - } - else - { - getPoint3dz_p(((LWCIRCSTRING *)tmp)->points, 0, &sp); - } - - tmp = compound->geoms[compound->ngeoms - 1]; - if (lwgeom_getType(tmp->type) == LINETYPE) - { - getPoint3dz_p(((LWLINE *)tmp)->points, ((LWLINE *)tmp)->points->npoints - 1, &ep); - } - else - { - getPoint3dz_p(((LWCIRCSTRING *)tmp)->points, ((LWCIRCSTRING *)tmp)->points->npoints - 1, &ep); - } - if (sp.x != ep.x) return 0; - if (sp.y != ep.y) return 0; - if (TYPE_HASZ(compound->type)) - { - if (sp.z != ep.z) return 0; - } - return 1; -} /** * @brief IsClosed(GEOMETRY) if geometry is a linestring then returns @@ -1254,77 +899,14 @@ * If it's a collection containing multiple linestrings, * @return true only if all the linestrings have startpoint=endpoint. */ -PG_FUNCTION_INFO_V1(LWGEOM_isclosed_linestring); -Datum LWGEOM_isclosed_linestring(PG_FUNCTION_ARGS) +PG_FUNCTION_INFO_V1(LWGEOM_isclosed); +Datum LWGEOM_isclosed(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom; - LWGEOM_INSPECTED *inspected; - LWGEOM *sub = NULL; - LWCOMPOUND *compound = NULL; - int linesfound=0; - int i; - - POSTGIS_DEBUG(2, "LWGEOM_isclosed_linestring called."); - - geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - if (lwgeom_getType((uchar)SERIALIZED_FORM(geom)[0]) == COMPOUNDTYPE) - { - compound = lwcompound_deserialize(SERIALIZED_FORM(geom)); - if (compound_is_closed(compound)) - { - lwgeom_release((LWGEOM *)compound); - PG_FREE_IF_COPY(geom, 0); - PG_RETURN_BOOL(TRUE); - } - else - { - lwgeom_release((LWGEOM *)compound); - PG_FREE_IF_COPY(geom, 0); - PG_RETURN_BOOL(FALSE); - } - } - - inspected = lwgeom_inspect(SERIALIZED_FORM(geom)); - - for (i=0; ingeometries; i++) - { - sub = lwgeom_getgeom_inspected(inspected, i); - if ( sub == NULL ) continue; - else if (lwgeom_getType(sub->type) == LINETYPE && - !line_is_closed((LWLINE *)sub)) - { - lwgeom_release(sub); - lwinspected_release(inspected); - PG_FREE_IF_COPY(geom, 0); - PG_RETURN_BOOL(FALSE); - } - else if (lwgeom_getType(sub->type) == CIRCSTRINGTYPE && - !circstring_is_closed((LWCIRCSTRING *)sub)) - { - lwgeom_release(sub); - lwinspected_release(inspected); - PG_FREE_IF_COPY(geom, 0); - PG_RETURN_BOOL(FALSE); - } - else if (lwgeom_getType(sub->type) == COMPOUNDTYPE && - !compound_is_closed((LWCOMPOUND *)sub)) - { - lwgeom_release(sub); - lwinspected_release(inspected); - PG_FREE_IF_COPY(geom, 0); - PG_RETURN_BOOL(FALSE); - } - lwgeom_release(sub); - linesfound++; - } - lwinspected_release(inspected); - - if ( ! linesfound ) - { - PG_FREE_IF_COPY(geom, 0); - PG_RETURN_NULL(); - } + GSERIALIZED *geom = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + LWGEOM *lwgeom = lwgeom_from_gserialized(geom); + int closed = lwgeom_is_closed(lwgeom); + + lwgeom_free(lwgeom); PG_FREE_IF_COPY(geom, 0); - PG_RETURN_BOOL(TRUE); - -} + PG_RETURN_BOOL(closed); +} diff -Nru postgis-1.5.3/postgis/lwgeom_pg.c postgis-2.0.1/postgis/lwgeom_pg.c --- postgis-1.5.3/postgis/lwgeom_pg.c 2009-06-11 16:44:03.000000000 +0000 +++ postgis-2.0.1/postgis/lwgeom_pg.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,461 +0,0 @@ -#include -#include -#include - -#include "../postgis_config.h" -#include "liblwgeom.h" -#include "lwgeom_pg.h" - -#include -#include -#include - -#define PARANOIA_LEVEL 1 - -/* - * This is required for builds against pgsql 8.2 - */ -#ifdef PG_MODULE_MAGIC -PG_MODULE_MAGIC; -#endif - - -/* - * Error message parsing functions - * - * Produces nicely formatted messages for parser/unparser errors with optional HINT - */ - -void -pg_parser_errhint(LWGEOM_PARSER_RESULT *lwg_parser_result) -{ - char *hintbuffer; - - /* Return a copy of the input string start truncated at the error location */ - hintbuffer = lwmessage_truncate((char *)lwg_parser_result->wkinput, 0, lwg_parser_result->errlocation - 1, 40, 0); - - /* Only display the parser position if the location is > 0; this provides a nicer output when the first token - within the input stream cannot be matched */ - if (lwg_parser_result->errlocation > 0) - { - ereport(ERROR, - (errmsg("%s", lwg_parser_result->message), - errhint("\"%s\" <-- parse error at position %d within geometry", hintbuffer, lwg_parser_result->errlocation)) - ); - } - else - { - ereport(ERROR, - (errmsg("%s", lwg_parser_result->message), - errhint("You must specify a valid OGC WKT geometry type such as POINT, LINESTRING or POLYGON")) - ); - } -} - -void -pg_unparser_errhint(LWGEOM_UNPARSER_RESULT *lwg_unparser_result) -{ - /* For the unparser simply output the error message without any associated HINT */ - elog(ERROR, "%s", lwg_unparser_result->message); -} - - -void * -pg_alloc(size_t size) -{ - void * result; - - POSTGIS_DEBUGF(5, " pg_alloc(%d) called", (int)size); - - result = palloc(size); - - POSTGIS_DEBUGF(5, " pg_alloc(%d) returning %p", (int)size, result); - - if ( ! result ) - { - ereport(ERROR, (errmsg_internal("Out of virtual memory"))); - return NULL; - } - return result; -} - -void * -pg_realloc(void *mem, size_t size) -{ - void * result; - - POSTGIS_DEBUGF(5, " pg_realloc(%p, %d) called", mem, (int)size); - - result = repalloc(mem, size); - - POSTGIS_DEBUGF(5, " pg_realloc(%p, %d) returning %p", mem, (int)size, result); - - return result; -} - -void -pg_free(void *ptr) -{ - pfree(ptr); -} - -void -pg_error(const char *fmt, va_list ap) -{ -#define ERRMSG_MAXLEN 256 - - char errmsg[ERRMSG_MAXLEN+1]; - - vsnprintf (errmsg, ERRMSG_MAXLEN, fmt, ap); - - errmsg[ERRMSG_MAXLEN]='\0'; - ereport(ERROR, (errmsg_internal("%s", errmsg))); -} - -void -pg_notice(const char *fmt, va_list ap) -{ - char *msg; - - /* - * This is a GNU extension. - * Dunno how to handle errors here. - */ - if (!lw_vasprintf (&msg, fmt, ap)) - { - va_end (ap); - return; - } - ereport(NOTICE, (errmsg_internal("%s", msg))); - free(msg); -} - -void -lwgeom_init_allocators(void) -{ - /* liblwgeom callback - install PostgreSQL handlers */ - lwalloc_var = pg_alloc; - lwrealloc_var = pg_realloc; - lwfree_var = pg_free; - lwerror_var = pg_error; - lwnotice_var = pg_notice; -} - -PG_LWGEOM * -pglwgeom_serialize(LWGEOM *in) -{ - size_t size; - PG_LWGEOM *result; - -#if POSTGIS_AUTOCACHE_BBOX - if ( ! in->bbox && is_worth_caching_lwgeom_bbox(in) ) - { - lwgeom_add_bbox(in); - } -#endif - - size = lwgeom_serialize_size(in) + VARHDRSZ; - - POSTGIS_DEBUGF(3, "lwgeom_serialize_size returned %d", (int)size-VARHDRSZ); - - result = palloc(size); - SET_VARSIZE(result, size); - lwgeom_serialize_buf(in, SERIALIZED_FORM(result), &size); - - POSTGIS_DEBUGF(3, "pglwgeom_serialize: serialized size: %d, computed size: %d", (int)size, VARSIZE(result)-VARHDRSZ); - -#if PARANOIA_LEVEL > 0 - if ( size != VARSIZE(result)-VARHDRSZ ) - { - lwerror("pglwgeom_serialize: serialized size:%d, computed size:%d", (int)size, VARSIZE(result)-VARHDRSZ); - return NULL; - } -#endif - - return result; -} - -LWGEOM * -pglwgeom_deserialize(PG_LWGEOM *in) -{ - return lwgeom_deserialize(SERIALIZED_FORM(in)); -} - -Oid -getGeometryOID(void) -{ - static Oid OID = InvalidOid; - int SPIcode; - bool isnull; - char *query = "select OID from pg_type where typname = 'geometry'"; - - if ( OID != InvalidOid ) return OID; - - SPIcode = SPI_connect(); - if (SPIcode != SPI_OK_CONNECT) - { - lwerror("getGeometryOID(): couldn't connection to SPI"); - } - - SPIcode = SPI_exec(query, 0); - if (SPIcode != SPI_OK_SELECT ) - { - lwerror("getGeometryOID(): error querying geometry oid"); - } - if (SPI_processed != 1) - { - lwerror("getGeometryOID(): error querying geometry oid"); - } - - OID = (Oid)SPI_getbinval(SPI_tuptable->vals[0], - SPI_tuptable->tupdesc, 1, &isnull); - - if (isnull) - lwerror("getGeometryOID(): couldn't find geometry oid"); - - return OID; -} - -PG_LWGEOM * -PG_LWGEOM_construct(uchar *ser, int SRID, int wantbbox) -{ - int size; - uchar *iptr, *optr, *eptr; - int wantsrid = 0; - BOX2DFLOAT4 box; - PG_LWGEOM *result; - - /* COMPUTE_BBOX FOR_COMPLEX_GEOMS */ - if ( is_worth_caching_serialized_bbox(ser) ) - { - /* if ( ! wantbbox ) elog(NOTICE, "PG_LWGEOM_construct forced wantbbox=1 due to rule FOR_COMPLEX_GEOMS"); */ - wantbbox=1; - } - - size = lwgeom_size(ser); - eptr = ser+size; /* end of subgeom */ - - iptr = ser+1; /* skip type */ - if ( lwgeom_hasSRID(ser[0]) ) - { - iptr += 4; /* skip SRID */ - size -= 4; - } - if ( lwgeom_hasBBOX(ser[0]) ) - { - iptr += sizeof(BOX2DFLOAT4); /* skip BBOX */ - size -= sizeof(BOX2DFLOAT4); - } - - if ( SRID != -1 ) - { - wantsrid = 1; - size += 4; - } - if ( wantbbox ) - { - size += sizeof(BOX2DFLOAT4); - getbox2d_p(ser, &box); - } - - size+=4; /* size header */ - - result = lwalloc(size); - SET_VARSIZE(result, size); - - result->type = lwgeom_makeType_full( - TYPE_HASZ(ser[0]), TYPE_HASM(ser[0]), - wantsrid, lwgeom_getType(ser[0]), wantbbox); - optr = result->data; - if ( wantbbox ) - { - memcpy(optr, &box, sizeof(BOX2DFLOAT4)); - optr += sizeof(BOX2DFLOAT4); - } - if ( wantsrid ) - { - memcpy(optr, &SRID, 4); - optr += 4; - } - memcpy(optr, iptr, eptr-iptr); - - return result; -} - -/* - * Make a PG_LWGEOM object from a WKB binary representation. - */ -PG_LWGEOM * -pglwgeom_from_ewkb(uchar *ewkb, int flags, size_t ewkblen) -{ - PG_LWGEOM *ret; - LWGEOM_PARSER_RESULT lwg_parser_result; - char *hexewkb; - size_t hexewkblen = ewkblen*2; - int i, result; - - hexewkb = lwalloc(hexewkblen+1); - for (i=0; itype); - - result = serialized_lwgeom_to_ewkb(&lwg_unparser_result, srl, flags, byteorder); - if (result) - PG_UNPARSER_ERROR(lwg_unparser_result); - - *outsize = lwg_unparser_result.size; - - /* Make a copy of the wkoutput so it can be used outside of the function */ - wkoutput = palloc(lwg_unparser_result.size); - memcpy(wkoutput, lwg_unparser_result.wkoutput, lwg_unparser_result.size); - - return wkoutput; -} - -/* - * Set the SRID of a PG_LWGEOM - * Returns a newly allocated PG_LWGEOM object. - * Allocation will be done using the lwalloc. - */ -PG_LWGEOM * -pglwgeom_setSRID(PG_LWGEOM *lwgeom, int32 newSRID) -{ - uchar type = lwgeom->type; - int bbox_offset=0; /* 0=no bbox, otherwise sizeof(BOX2DFLOAT4) */ - int len,len_new,len_left; - PG_LWGEOM *result; - uchar *loc_new, *loc_old; - - if (lwgeom_hasBBOX(type)) - bbox_offset = sizeof(BOX2DFLOAT4); - - len = lwgeom->size; - - if (lwgeom_hasSRID(type)) - { - if ( newSRID != -1 ) - { - /* we create a new one and copy the SRID in */ - result = lwalloc(len); - memcpy(result, lwgeom, len); - memcpy(result->data+bbox_offset, &newSRID,4); - } - else - { - /* we create a new one dropping the SRID */ - result = lwalloc(len-4); - result->size = len-4; - result->type = lwgeom_makeType_full( - TYPE_HASZ(type), TYPE_HASM(type), - 0, lwgeom_getType(type), - lwgeom_hasBBOX(type)); - loc_new = result->data; - loc_old = lwgeom->data; - len_left = len-4-1; - - /* handle bbox (if there) */ - if (lwgeom_hasBBOX(type)) - { - memcpy(loc_new, loc_old, sizeof(BOX2DFLOAT4)); - loc_new += sizeof(BOX2DFLOAT4); - loc_old += sizeof(BOX2DFLOAT4); - len_left -= sizeof(BOX2DFLOAT4); - } - - /* skip SRID, copy the remaining */ - loc_old += 4; - len_left -= 4; - memcpy(loc_new, loc_old, len_left); - - } - - } - else - { - /* just copy input, already w/out a SRID */ - if ( newSRID == -1 ) - { - result = lwalloc(len); - memcpy(result, lwgeom, len); - } - /* need to add one */ - else - { - len_new = len + 4; /* +4 for SRID */ - result = lwalloc(len_new); - memcpy(result, &len_new, 4); /* size copy in */ - result->type = lwgeom_makeType_full( - TYPE_HASZ(type), TYPE_HASM(type), - 1, lwgeom_getType(type),lwgeom_hasBBOX(type)); - - loc_new = result->data; - loc_old = lwgeom->data; - - len_left = len -4-1; /* old length - size - type */ - - /* handle bbox (if there) */ - - if (lwgeom_hasBBOX(type)) - { - memcpy(loc_new, loc_old, sizeof(BOX2DFLOAT4)) ; /* copy in bbox */ - loc_new += sizeof(BOX2DFLOAT4); - loc_old += sizeof(BOX2DFLOAT4); - len_left -= sizeof(BOX2DFLOAT4); - } - - /* put in SRID */ - - memcpy(loc_new, &newSRID,4); - loc_new +=4; - memcpy(loc_new, loc_old, len_left); - } - } - return result; -} - -/* - * get the SRID from the LWGEOM - * none present => -1 - */ -int -pglwgeom_getSRID(PG_LWGEOM *lwgeom) -{ - uchar type = lwgeom->type; - uchar *loc = lwgeom->data; - - if ( ! lwgeom_hasSRID(type)) return -1; - - if (lwgeom_hasBBOX(type)) - { - loc += sizeof(BOX2DFLOAT4); - } - - return lw_get_int32(loc); -} - diff -Nru postgis-1.5.3/postgis/lwgeom_pg.h postgis-2.0.1/postgis/lwgeom_pg.h --- postgis-1.5.3/postgis/lwgeom_pg.h 2010-01-07 16:04:22.000000000 +0000 +++ postgis-2.0.1/postgis/lwgeom_pg.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,140 +0,0 @@ -#ifndef _LWGEOM_PG_H -#define _LWGEOM_PG_H 1 - -#include "postgres.h" -#include "utils/geo_decls.h" -#include "fmgr.h" - -#include "../postgis_config.h" - -#include "liblwgeom.h" -#include "pgsql_compat.h" - -void *pg_alloc(size_t size); -void *pg_realloc(void *ptr, size_t size); -void pg_free(void *ptr); -void pg_error(const char *msg, va_list vp); -void pg_notice(const char *msg, va_list vp); - - -/* Debugging macros */ -#if POSTGIS_DEBUG_LEVEL > 0 - -/* Display a simple message at NOTICE level */ -#define POSTGIS_DEBUG(level, msg) \ - do { \ - if (POSTGIS_DEBUG_LEVEL >= level) \ - ereport(NOTICE, (errmsg_internal("[%s:%s:%d] " msg, __FILE__, __func__, __LINE__))); \ - } while (0); - -/* Display a formatted message at NOTICE level (like printf, with variadic arguments) */ -#define POSTGIS_DEBUGF(level, msg, ...) \ - do { \ - if (POSTGIS_DEBUG_LEVEL >= level) \ - ereport(NOTICE, (errmsg_internal("[%s:%s:%d] " msg, __FILE__, __func__, __LINE__, __VA_ARGS__))); \ - } while (0); - -#else - -/* Empty prototype that can be optimised away by the compiler for non-debug builds */ -#define POSTGIS_DEBUG(level, msg) \ - ((void) 0) - -/* Empty prototype that can be optimised away by the compiler for non-debug builds */ -#define POSTGIS_DEBUGF(level, msg, ...) \ - ((void) 0) - -#endif - - -/* - * Standard macro for reporting parser errors to PostgreSQL - */ - -extern void pg_parser_errhint(LWGEOM_PARSER_RESULT *lwg_parser_result); -extern void pg_unparser_errhint(LWGEOM_UNPARSER_RESULT *lwg_unparser_result); - -#define PG_PARSER_ERROR(lwg_parser_result) \ - do { \ - pg_parser_errhint(&lwg_parser_result); \ - } while(0); - -/* - * Standard macro for reporting unparser errors to PostgreSQL - */ -#define PG_UNPARSER_ERROR(lwg_unparser_result) \ - do { \ - pg_unparser_errhint(&lwg_unparser_result); \ - } while(0); - - -/* Serialize/deserialize a PG_LWGEOM (postgis datatype) */ -extern PG_LWGEOM *pglwgeom_serialize(LWGEOM *lwgeom); -extern LWGEOM *pglwgeom_deserialize(PG_LWGEOM *pglwgeom); - -/* PG_LWGEOM WKB IO */ -extern PG_LWGEOM *pglwgeom_from_ewkb(uchar *ewkb, int flags, size_t ewkblen); -extern char *pglwgeom_to_ewkb(PG_LWGEOM *geom, int flags, char byteorder, size_t *ewkblen); - -/* PG_LWGEOM SRID get/set */ -extern PG_LWGEOM *pglwgeom_setSRID(PG_LWGEOM *pglwgeom, int32 newSRID); -extern int pglwgeom_getSRID(PG_LWGEOM *pglwgeom); - -extern Oid getGeometryOID(void); - -/* PG-dependant */ - -/* - * Use this macro to extract the char * required - * by most functions from an PG_LWGEOM struct. - * (which is an PG_LWGEOM w/out int32 size casted to char *) - */ -#define SERIALIZED_FORM(x) ((uchar *)VARDATA((x))) - -/* - * For PostgreSQL >= 8.5 redefine the STATRELATT macro to its - * new value of STATRELATTINH - */ -#if POSTGIS_PGSQL_VERSION >= 85 - #define STATRELATT STATRELATTINH -#endif - -/* BOX is postgresql standard type */ -extern void box_to_box3d_p(BOX *box, BOX3D *out); -extern void box3d_to_box_p(BOX3D *box, BOX *out); - -/* PG-exposed */ -Datum BOX2D_same(PG_FUNCTION_ARGS); -Datum BOX2D_overlap(PG_FUNCTION_ARGS); -Datum BOX2D_overleft(PG_FUNCTION_ARGS); -Datum BOX2D_left(PG_FUNCTION_ARGS); -Datum BOX2D_right(PG_FUNCTION_ARGS); -Datum BOX2D_overright(PG_FUNCTION_ARGS); -Datum BOX2D_overbelow(PG_FUNCTION_ARGS); -Datum BOX2D_below(PG_FUNCTION_ARGS); -Datum BOX2D_above(PG_FUNCTION_ARGS); -Datum BOX2D_overabove(PG_FUNCTION_ARGS); -Datum BOX2D_contained(PG_FUNCTION_ARGS); -Datum BOX2D_contain(PG_FUNCTION_ARGS); -Datum BOX2D_intersects(PG_FUNCTION_ARGS); -Datum BOX2D_union(PG_FUNCTION_ARGS); - -Datum LWGEOM_same(PG_FUNCTION_ARGS); -Datum BOX3D_construct(PG_FUNCTION_ARGS); -Datum BOX2DFLOAT4_ymin(PG_FUNCTION_ARGS); - -Datum LWGEOM_force_2d(PG_FUNCTION_ARGS); -Datum LWGEOM_force_3dm(PG_FUNCTION_ARGS); -Datum LWGEOM_force_3dz(PG_FUNCTION_ARGS); -Datum LWGEOM_force_4d(PG_FUNCTION_ARGS); -Datum LWGEOM_force_collection(PG_FUNCTION_ARGS); -Datum LWGEOM_force_multi(PG_FUNCTION_ARGS); - -Datum LWGEOMFromWKB(PG_FUNCTION_ARGS); -Datum WKBFromLWGEOM(PG_FUNCTION_ARGS); - -Datum LWGEOM_getBBOX(PG_FUNCTION_ARGS); -Datum LWGEOM_addBBOX(PG_FUNCTION_ARGS); -Datum LWGEOM_dropBBOX(PG_FUNCTION_ARGS); - -#endif /* !defined _LWGEOM_PG_H 1 */ diff -Nru postgis-1.5.3/postgis/lwgeom_rtree.c postgis-2.0.1/postgis/lwgeom_rtree.c --- postgis-1.5.3/postgis/lwgeom_rtree.c 2011-05-13 01:01:26.000000000 +0000 +++ postgis-2.0.1/postgis/lwgeom_rtree.c 2012-02-27 22:08:12.000000000 +0000 @@ -1,17 +1,20 @@ /********************************************************************** - * $Id: lwgeom_rtree.c 7140 2011-05-13 01:01:26Z chodgson $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net - * Copyright 2001-2005 Refractions Research Inc. + * Copyright (C) 2001-2005 Refractions Research Inc. * * This is free software; you can redistribute and/or modify it under * the terms of the GNU General Public Licence. See the COPYING file. * **********************************************************************/ +#include + +#include "../postgis_config.h" #include "lwgeom_pg.h" #include "liblwgeom.h" +#include "liblwgeom_internal.h" /* For FP comparators. */ #include "lwgeom_rtree.h" @@ -29,11 +32,11 @@ int i, nodeCount; int childNodes, parentNodes; - LWDEBUGF(2, "createTree called with pointarray %p", pointArray); + POSTGIS_DEBUGF(2, "createTree called with pointarray %p", pointArray); nodeCount = pointArray->npoints - 1; - LWDEBUGF(3, "Total leaf nodes: %d", nodeCount); + POSTGIS_DEBUGF(3, "Total leaf nodes: %d", nodeCount); /* * Create a leaf node for every line segment. @@ -52,7 +55,7 @@ parentNodes = nodeCount / 2; while (parentNodes > 0) { - LWDEBUGF(3, "Merging %d children into %d parents.", childNodes, parentNodes); + POSTGIS_DEBUGF(3, "Merging %d children into %d parents.", childNodes, parentNodes); i = 0; while (i < parentNodes) @@ -65,7 +68,7 @@ */ if (parentNodes * 2 < childNodes) { - LWDEBUGF(3, "Shuffling child %d to parent %d", childNodes - 1, i); + POSTGIS_DEBUGF(3, "Shuffling child %d to parent %d", childNodes - 1, i); nodes[i] = nodes[childNodes - 1]; parentNodes++; @@ -76,7 +79,7 @@ root = nodes[0]; lwfree(nodes); - LWDEBUGF(3, "createTree returning %p", root); + POSTGIS_DEBUGF(3, "createTree returning %p", root); return root; } @@ -88,7 +91,7 @@ { RTREE_NODE *parent; - LWDEBUGF(2, "createInteriorNode called for children %p, %p", left, right); + POSTGIS_DEBUGF(2, "createInteriorNode called for children %p, %p", left, right); parent = lwalloc(sizeof(RTREE_NODE)); parent->leftNode = left; @@ -96,7 +99,7 @@ parent->interval = mergeIntervals(left->interval, right->interval); parent->segment = NULL; - LWDEBUGF(3, "createInteriorNode returning %p", parent); + POSTGIS_DEBUGF(3, "createInteriorNode returning %p", parent); return parent; } @@ -113,7 +116,7 @@ POINT4D tmp; POINTARRAY *npa; - LWDEBUGF(2, "createLeafNode called for point %d of %p", startPoint, pa); + POSTGIS_DEBUGF(2, "createLeafNode called for point %d of %p", startPoint, pa); if (pa->npoints < startPoint + 2) { @@ -125,31 +128,25 @@ * independently of the index. Since we may want to cache the index, * we must create independent arrays. */ - npa = lwalloc(sizeof(POINTARRAY)); - npa->dims = 0; - npa->npoints = 2; - TYPE_SETZM(npa->dims, 0, 0); - npa->serialized_pointlist = lwalloc(pointArray_ptsize(pa) * 2); + npa = ptarray_construct_empty(0,0,2); getPoint4d_p(pa, startPoint, &tmp); - - setPoint4d(npa, 0, &tmp); value1 = tmp.y; - - getPoint4d_p(pa, startPoint + 1, &tmp); - - setPoint4d(npa, 1, &tmp); + ptarray_append_point(npa,&tmp,LW_TRUE); + + getPoint4d_p(pa, startPoint+1, &tmp); value2 = tmp.y; + ptarray_append_point(npa,&tmp,LW_TRUE); - line = lwline_construct(-1, NULL, npa); - + line = lwline_construct(SRID_UNKNOWN, NULL, npa); + parent = lwalloc(sizeof(RTREE_NODE)); parent->interval = createInterval(value1, value2); parent->segment = line; parent->leftNode = NULL; parent->rightNode = NULL; - LWDEBUGF(3, "createLeafNode returning %p", parent); + POSTGIS_DEBUGF(3, "createLeafNode returning %p", parent); return parent; } @@ -161,13 +158,13 @@ { INTERVAL *interval; - LWDEBUGF(2, "mergeIntervals called with %p, %p", inter1, inter2); + POSTGIS_DEBUGF(2, "mergeIntervals called with %p, %p", inter1, inter2); interval = lwalloc(sizeof(INTERVAL)); interval->max = FP_MAX(inter1->max, inter2->max); interval->min = FP_MIN(inter1->min, inter2->min); - LWDEBUGF(3, "interval min = %8.3f, max = %8.3f", interval->min, interval->max); + POSTGIS_DEBUGF(3, "interval min = %8.3f, max = %8.3f", interval->min, interval->max); return interval; } @@ -179,13 +176,13 @@ { INTERVAL *interval; - LWDEBUGF(2, "createInterval called with %8.3f, %8.3f", value1, value2); + POSTGIS_DEBUGF(2, "createInterval called with %8.3f, %8.3f", value1, value2); interval = lwalloc(sizeof(INTERVAL)); interval->max = FP_MAX(value1, value2); interval->min = FP_MIN(value1, value2); - LWDEBUGF(3, "interval min = %8.3f, max = %8.3f", interval->min, interval->max); + POSTGIS_DEBUGF(3, "interval min = %8.3f, max = %8.3f", interval->min, interval->max); return interval; } @@ -196,7 +193,7 @@ */ void freeTree(RTREE_NODE *root) { - LWDEBUGF(2, "freeTree called for %p", root); + POSTGIS_DEBUGF(2, "freeTree called for %p", root); if (root->leftNode) freeTree(root->leftNode); @@ -205,9 +202,7 @@ lwfree(root->interval); if (root->segment) { - lwfree(root->segment->points->serialized_pointlist); - lwfree(root->segment->points); - lwgeom_release((LWGEOM *)root->segment); + lwline_free(root->segment); } lwfree(root); } @@ -219,7 +214,7 @@ void clearCache(RTREE_POLY_CACHE *cache) { int g, r, i; - LWDEBUGF(2, "clearCache called for %p", cache); + POSTGIS_DEBUGF(2, "clearCache called for %p", cache); i = 0; for (g = 0; g < cache->polyCount; g++) { @@ -250,13 +245,13 @@ LWMLINE *tmp, *result; LWGEOM **lwgeoms; - LWDEBUGF(2, "findLineSegments called for tree %p and value %8.3f", root, value); + POSTGIS_DEBUGF(2, "findLineSegments called for tree %p and value %8.3f", root, value); result = NULL; if (!isContained(root->interval, value)) { - LWDEBUGF(3, "findLineSegments %p: not contained.", root); + POSTGIS_DEBUGF(3, "findLineSegments %p: not contained.", root); return NULL; } @@ -264,25 +259,25 @@ /* If there is a segment defined for this node, include it. */ if (root->segment) { - LWDEBUGF(3, "findLineSegments %p: adding segment %p %d.", root, root->segment, TYPE_GETTYPE(root->segment->type)); + POSTGIS_DEBUGF(3, "findLineSegments %p: adding segment %p %d.", root, root->segment, root->segment->type); lwgeoms = lwalloc(sizeof(LWGEOM *)); lwgeoms[0] = (LWGEOM *)root->segment; - LWDEBUGF(3, "Found geom %p, type %d, dim %d", root->segment, TYPE_GETTYPE(root->segment->type), TYPE_GETZM(root->segment->type)); + POSTGIS_DEBUGF(3, "Found geom %p, type %d, dim %d", root->segment, root->segment->type, FLAGS_GET_Z(root->segment->flags)); - result = (LWMLINE *)lwcollection_construct(lwgeom_makeType_full(0, 0, 0, MULTILINETYPE, 0), -1, NULL, 1, lwgeoms); + result = (LWMLINE *)lwcollection_construct(MULTILINETYPE, SRID_UNKNOWN, NULL, 1, lwgeoms); } /* If there is a left child node, recursively include its results. */ if (root->leftNode) { - LWDEBUGF(3, "findLineSegments %p: recursing left.", root); + POSTGIS_DEBUGF(3, "findLineSegments %p: recursing left.", root); tmp = findLineSegments(root->leftNode, value); if (tmp) { - LWDEBUGF(3, "Found geom %p, type %d, dim %d", tmp, TYPE_GETTYPE(tmp->type), TYPE_GETZM(tmp->type)); + POSTGIS_DEBUGF(3, "Found geom %p, type %d, dim %d", tmp, tmp->type, FLAGS_GET_Z(tmp->flags)); if (result) result = mergeMultiLines(result, tmp); @@ -294,12 +289,12 @@ /* Same for any right child. */ if (root->rightNode) { - LWDEBUGF(3, "findLineSegments %p: recursing right.", root); + POSTGIS_DEBUGF(3, "findLineSegments %p: recursing right.", root); tmp = findLineSegments(root->rightNode, value); if (tmp) { - LWDEBUGF(3, "Found geom %p, type %d, dim %d", tmp, TYPE_GETTYPE(tmp->type), TYPE_GETZM(tmp->type)); + POSTGIS_DEBUGF(3, "Found geom %p, type %d, dim %d", tmp, tmp->type, FLAGS_GET_Z(tmp->flags)); if (result) result = mergeMultiLines(result, tmp); @@ -318,7 +313,7 @@ LWCOLLECTION *col; int i, j, ngeoms; - LWDEBUGF(2, "mergeMultiLines called on %p, %d, %d; %p, %d, %d", line1, line1->ngeoms, TYPE_GETTYPE(line1->type), line2, line2->ngeoms, TYPE_GETTYPE(line2->type)); + POSTGIS_DEBUGF(2, "mergeMultiLines called on %p, %d, %d; %p, %d, %d", line1, line1->ngeoms, line1->type, line2, line2->ngeoms, line2->type); ngeoms = line1->ngeoms + line2->ngeoms; geoms = lwalloc(sizeof(LWGEOM *) * ngeoms); @@ -332,9 +327,9 @@ { geoms[j] = lwgeom_clone((LWGEOM *)line2->geoms[i]); } - col = lwcollection_construct(MULTILINETYPE, -1, NULL, ngeoms, geoms); + col = lwcollection_construct(MULTILINETYPE, SRID_UNKNOWN, NULL, ngeoms, geoms); - LWDEBUGF(3, "mergeMultiLines returning %p, %d, %d", col, col->ngeoms, TYPE_GETTYPE(col->type)); + POSTGIS_DEBUGF(3, "mergeMultiLines returning %p, %d, %d", col, col->ngeoms, col->type); return (LWMLINE *)col; } @@ -349,51 +344,48 @@ PG_FUNCTION_INFO_V1(LWGEOM_polygon_index); Datum LWGEOM_polygon_index(PG_FUNCTION_ARGS) { - PG_LWGEOM *igeom, *result; - LWGEOM *geom; + GSERIALIZED *igeom, *result; LWPOLY *poly; LWMLINE *mline; RTREE_NODE *root; double yval; -#if POSTGIS_DEBUG_LEVEL > 0 +#if POSTGIS_DEBUG_LEVEL >= 3 int i = 0; #endif POSTGIS_DEBUG(2, "polygon_index called."); result = NULL; - igeom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + igeom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); yval = PG_GETARG_FLOAT8(1); - geom = lwgeom_deserialize(SERIALIZED_FORM(igeom)); - if (TYPE_GETTYPE(geom->type) != POLYGONTYPE) + if ( gserialized_get_type(igeom) != POLYGONTYPE ) { - lwgeom_release(geom); PG_FREE_IF_COPY(igeom, 0); PG_RETURN_NULL(); } - poly = (LWPOLY *)geom; + poly = lwgeom_as_lwpoly(lwgeom_from_gserialized(igeom)); root = createTree(poly->rings[0]); mline = findLineSegments(root, yval); #if POSTGIS_DEBUG_LEVEL >= 3 - POSTGIS_DEBUGF(3, "mline returned %p %d", mline, TYPE_GETTYPE(mline->type)); + POSTGIS_DEBUGF(3, "mline returned %p %d", mline, mline->type); for (i = 0; i < mline->ngeoms; i++) { - POSTGIS_DEBUGF(3, "geom[%d] %p %d", i, mline->geoms[i], TYPE_GETTYPE(mline->geoms[i]->type)); + POSTGIS_DEBUGF(3, "geom[%d] %p %d", i, mline->geoms[i], mline->geoms[i]->type); } #endif if (mline) - result = pglwgeom_serialize((LWGEOM *)mline); + result = geometry_serialize((LWGEOM *)mline); POSTGIS_DEBUGF(3, "returning result %p", result); lwfree(root); + lwpoly_free(poly); + lwmline_free(mline); PG_FREE_IF_COPY(igeom, 0); - lwgeom_release((LWGEOM *)poly); - lwgeom_release((LWGEOM *)mline); PG_RETURN_POINTER(result); } @@ -410,18 +402,18 @@ return result; } -void populateCache(RTREE_POLY_CACHE *currentCache, LWGEOM *lwgeom, uchar *serializedPoly) +void populateCache(RTREE_POLY_CACHE *currentCache, LWGEOM *lwgeom, GSERIALIZED *serializedPoly) { int i, p, r, length; LWMPOLY *mpoly; LWPOLY *poly; int nrings; - LWDEBUGF(2, "populateCache called with cache %p geom %p", currentCache, lwgeom); + POSTGIS_DEBUGF(2, "populateCache called with cache %p geom %p", currentCache, lwgeom); - if (TYPE_GETTYPE(lwgeom->type) == MULTIPOLYGONTYPE) + if (lwgeom->type == MULTIPOLYGONTYPE) { - LWDEBUG(2, "populateCache MULTIPOLYGON"); + POSTGIS_DEBUG(2, "populateCache MULTIPOLYGON"); mpoly = (LWMPOLY *)lwgeom; nrings = 0; /* @@ -449,9 +441,9 @@ } } } - else if ( TYPE_GETTYPE(lwgeom->type) == POLYGONTYPE ) + else if ( lwgeom->type == POLYGONTYPE ) { - LWDEBUG(2, "populateCache POLYGON"); + POSTGIS_DEBUG(2, "populateCache POLYGON"); poly = (LWPOLY *)lwgeom; currentCache->polyCount = 1; currentCache->ringCounts = lwalloc(sizeof(int)); @@ -475,10 +467,10 @@ ** Copy the serialized form of the polygon into the cache so ** we can test for equality against subsequent polygons. */ - length = lwgeom_size(serializedPoly); + length = VARSIZE(serializedPoly); currentCache->poly = lwalloc(length); memcpy(currentCache->poly, serializedPoly, length); - LWDEBUGF(3, "populateCache returning %p", currentCache); + POSTGIS_DEBUGF(3, "populateCache returning %p", currentCache); } /** @@ -488,43 +480,43 @@ * method. The method will allocate memory for the cache it creates, * as well as freeing the memory of any cache that is no longer applicable. */ -RTREE_POLY_CACHE *retrieveCache(LWGEOM *lwgeom, uchar *serializedPoly, RTREE_POLY_CACHE *currentCache) +RTREE_POLY_CACHE *retrieveCache(LWGEOM *lwgeom, GSERIALIZED *serializedPoly, RTREE_POLY_CACHE *currentCache) { int length; - LWDEBUGF(2, "retrieveCache called with %p %p %p", lwgeom, serializedPoly, currentCache); + POSTGIS_DEBUGF(2, "retrieveCache called with %p %p %p", lwgeom, serializedPoly, currentCache); - /* Make sure this isn't someone else's cache object. */ - if ( currentCache && currentCache->type != 1 ) currentCache = NULL; + assert ( ! currentCache || currentCache->type == 1 ); if (!currentCache) { - LWDEBUG(3, "No existing cache, create one."); + POSTGIS_DEBUG(3, "No existing cache, create one."); return createCache(); } if (!(currentCache->poly)) { - LWDEBUG(3, "Cache contains no polygon, populating it."); + POSTGIS_DEBUG(3, "Cache contains no polygon, populating it."); populateCache(currentCache, lwgeom, serializedPoly); return currentCache; } - length = lwgeom_size(serializedPoly); + length = VARSIZE(serializedPoly); - if (lwgeom_size(currentCache->poly) != length) + if (VARSIZE(currentCache->poly) != length) { - LWDEBUG(3, "Polygon size mismatch, creating new cache."); + POSTGIS_DEBUG(3, "Polygon size mismatch, creating new cache."); clearCache(currentCache); return currentCache; } if ( memcmp(serializedPoly, currentCache->poly, length) ) { - LWDEBUG(3, "Polygon mismatch, creating new cache."); + POSTGIS_DEBUG(3, "Polygon mismatch, creating new cache."); clearCache(currentCache); return currentCache; } - LWDEBUGF(3, "Polygon match, retaining current cache, %p.", currentCache); + POSTGIS_DEBUGF(3, "Polygon match, retaining current cache, %p.", + currentCache); return currentCache; } diff -Nru postgis-1.5.3/postgis/lwgeom_rtree.h postgis-2.0.1/postgis/lwgeom_rtree.h --- postgis-1.5.3/postgis/lwgeom_rtree.h 2011-05-12 18:39:28.000000000 +0000 +++ postgis-2.0.1/postgis/lwgeom_rtree.h 2012-02-27 22:08:12.000000000 +0000 @@ -1,70 +1,72 @@ -#ifndef _LWGEOM_RTREE_H -#define _LWGEOM_RTREE_H - -typedef struct -{ - double min; - double max; -} -INTERVAL; - -/* Returns 1 if min < value <= max, 0 otherwise */ -uint32 isContained(INTERVAL *interval, double value); -/* Creates an interval given the min and max values, in whatever order. */ -INTERVAL *createInterval(double value1, double value2); -/* Creates an interval with the total extents of the two given intervals. */ -INTERVAL *mergeIntervals(INTERVAL *inter1, INTERVAL *inter2); - -/* - * The following struct and methods are used for a 1D RTree implementation, - * described at: - * http://lin-ear-th-inking.blogspot.com/2007/06/packed-1-dimensional-r-tree.html - */ -typedef struct rtree_node -{ - INTERVAL *interval; - struct rtree_node *leftNode; - struct rtree_node *rightNode; - LWLINE *segment; -} -RTREE_NODE; - -/* Creates an interior node given the children. */ -RTREE_NODE *createInteriorNode(RTREE_NODE *left, RTREE_NODE *right); -/* Creates a leaf node given the pointer to the start point of the segment. */ -RTREE_NODE *createLeafNode(POINTARRAY *pa, int startPoint); -/* - * Creates an rtree given a pointer to the point array. - * Must copy the point array. - */ -RTREE_NODE *createTree(POINTARRAY *pointArray); -/* Frees the tree. */ -void freeTree(RTREE_NODE *root); -/* Retrieves a collection of line segments given the root and crossing value. */ -LWMLINE *findLineSegments(RTREE_NODE *root, double value); -/* Merges two multilinestrings into a single multilinestring. */ -LWMLINE *mergeMultiLines(LWMLINE *line1, LWMLINE *line2); - -typedef struct -{ - char type; - RTREE_NODE **ringIndices; - int* ringCounts; - int polyCount; - uchar *poly; -} -RTREE_POLY_CACHE; - -/* - * Creates a new cachable index if needed, or returns the current cache if - * it is applicable to the current polygon. - */ -RTREE_POLY_CACHE *retrieveCache(LWGEOM *lwgeom, uchar *serializedPoly, RTREE_POLY_CACHE *currentCache); -RTREE_POLY_CACHE *createCache(void); -/* Frees the cache. */ -void populateCache(RTREE_POLY_CACHE *cache, LWGEOM *lwgeom, uchar *serializedPoly); -void clearCache(RTREE_POLY_CACHE *cache); - - - -#endif /* !defined _LIBLWGEOM_H */ +#ifndef _LWGEOM_RTREE_H +#define _LWGEOM_RTREE_H + +#include "liblwgeom.h" + +typedef struct +{ + double min; + double max; +} +INTERVAL; + +/* Returns 1 if min < value <= max, 0 otherwise */ +uint32 isContained(INTERVAL *interval, double value); +/* Creates an interval given the min and max values, in whatever order. */ +INTERVAL *createInterval(double value1, double value2); +/* Creates an interval with the total extents of the two given intervals. */ +INTERVAL *mergeIntervals(INTERVAL *inter1, INTERVAL *inter2); + +/* + * The following struct and methods are used for a 1D RTree implementation, + * described at: + * http://lin-ear-th-inking.blogspot.com/2007/06/packed-1-dimensional-r-tree.html + */ +typedef struct rtree_node +{ + INTERVAL *interval; + struct rtree_node *leftNode; + struct rtree_node *rightNode; + LWLINE *segment; +} +RTREE_NODE; + +/* Creates an interior node given the children. */ +RTREE_NODE *createInteriorNode(RTREE_NODE *left, RTREE_NODE *right); +/* Creates a leaf node given the pointer to the start point of the segment. */ +RTREE_NODE *createLeafNode(POINTARRAY *pa, int startPoint); +/* + * Creates an rtree given a pointer to the point array. + * Must copy the point array. + */ +RTREE_NODE *createTree(POINTARRAY *pointArray); +/* Frees the tree. */ +void freeTree(RTREE_NODE *root); +/* Retrieves a collection of line segments given the root and crossing value. */ +LWMLINE *findLineSegments(RTREE_NODE *root, double value); +/* Merges two multilinestrings into a single multilinestring. */ +LWMLINE *mergeMultiLines(LWMLINE *line1, LWMLINE *line2); + +typedef struct +{ + char type; + RTREE_NODE **ringIndices; + int* ringCounts; + int polyCount; + GSERIALIZED *poly; +} +RTREE_POLY_CACHE; + +/* + * Creates a new cachable index if needed, or returns the current cache if + * it is applicable to the current polygon. + */ +RTREE_POLY_CACHE *retrieveCache(LWGEOM *lwgeom, GSERIALIZED *serializedPoly, RTREE_POLY_CACHE *currentCache); +RTREE_POLY_CACHE *createCache(void); +/* Frees the cache. */ +void populateCache(RTREE_POLY_CACHE *cache, LWGEOM *lwgeom, GSERIALIZED *serializedPoly); +void clearCache(RTREE_POLY_CACHE *cache); + + + +#endif /* !defined _LIBLWGEOM_H */ diff -Nru postgis-1.5.3/postgis/lwgeom_spheroid.c postgis-2.0.1/postgis/lwgeom_spheroid.c --- postgis-1.5.3/postgis/lwgeom_spheroid.c 2010-02-01 17:35:55.000000000 +0000 +++ postgis-2.0.1/postgis/lwgeom_spheroid.c 2012-02-27 22:08:12.000000000 +0000 @@ -1,9 +1,9 @@ /********************************************************************** - * $Id: lwgeom_spheroid.c 5181 2010-02-01 17:35:55Z pramsey $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net - * Copyright 2001-2003 Refractions Research Inc. + * + * Copyright (C) 2001-2003 Refractions Research Inc. * * This is free software; you can redistribute and/or modify it under * the terms of the GNU General Public Licence. See the COPYING file. @@ -25,7 +25,8 @@ #include "fmgr.h" #include "utils/elog.h" -#include "libgeom.h" +#include "../postgis_config.h" +#include "liblwgeom.h" #include "lwgeom_pg.h" #define SHOW_DIGS_DOUBLE 15 @@ -55,8 +56,6 @@ double mu2(double azimuth,SPHEROID *sphere); double bigA(double u2); double bigB(double u2); -double lwgeom_pointarray_length2d_ellipse(POINTARRAY *pts, SPHEROID *sphere); -double lwgeom_pointarray_length_ellipse(POINTARRAY *pts, SPHEROID *sphere); /* @@ -196,7 +195,7 @@ double lat2, double long2, SPHEROID *sphere) { double result = 0; -#if POSTGIS_DEBUG_LEVEL > 0 +#if POSTGIS_DEBUG_LEVEL >= 4 double result2 = 0; #endif @@ -210,9 +209,9 @@ #if POSTGIS_DEBUG_LEVEL >= 4 result2 = distance_sphere_method(lat1, long1,lat2,long2, sphere); - LWDEBUGF(4, "delta = %lf, skae says: %.15lf,2 circle says: %.15lf", + POSTGIS_DEBUGF(4, "delta = %lf, skae says: %.15lf,2 circle says: %.15lf", (result2-result),result,result2); - LWDEBUGF(4, "2 circle says: %.15lf",result2); + POSTGIS_DEBUGF(4, "2 circle says: %.15lf",result2); #endif if (result != result) /* NaN check @@ -311,67 +310,6 @@ return sphere->b * (A * (sigma - dsigma)); } -/* - * Computed 2d/3d length of a POINTARRAY depending on input dimensions. - * Uses ellipsoidal math to find the distance. - */ -double lwgeom_pointarray_length_ellipse(POINTARRAY *pts, SPHEROID *sphere) -{ - double dist = 0.0; - int i; - - LWDEBUG(2, "lwgeom_pointarray_length_ellipse called"); - - if ( pts->npoints < 2 ) return 0.0; - - /* compute 2d length if 3d is not available */ - if ( TYPE_NDIMS(pts->dims) < 3 ) - { - return lwgeom_pointarray_length2d_ellipse(pts, sphere); - } - - for (i=0; inpoints-1; i++) - { - POINT3DZ frm; - POINT3DZ to; - double distellips; - - getPoint3dz_p(pts, i, &frm); - getPoint3dz_p(pts, i+1, &to); - - distellips = distance_ellipse( - frm.y*M_PI/180.0, frm.x*M_PI/180.0, - to.y*M_PI/180.0, to.x*M_PI/180.0, sphere); - dist += sqrt(distellips*distellips + (frm.z-to.z)*(frm.z-to.z)); - } - return dist; -} - -/* - * Computed 2d length of a POINTARRAY regardless of input dimensions - * Uses ellipsoidal math to find the distance. - */ -double -lwgeom_pointarray_length2d_ellipse(POINTARRAY *pts, SPHEROID *sphere) -{ - double dist = 0.0; - int i; - POINT2D frm; - POINT2D to; - - LWDEBUG(2, "lwgeom_pointarray_length2d_ellipse called"); - - if ( pts->npoints < 2 ) return 0.0; - for (i=0; inpoints-1; i++) - { - getPoint2d_p(pts, i, &frm); - getPoint2d_p(pts, i+1, &to); - dist += distance_ellipse(frm.y*M_PI/180.0, - frm.x*M_PI/180.0, to.y*M_PI/180.0, - to.x*M_PI/180.0, sphere); - } - return dist; -} /* * Find the "length of a geometry" @@ -385,11 +323,12 @@ PG_FUNCTION_INFO_V1(LWGEOM_length2d_ellipsoid); Datum LWGEOM_length2d_ellipsoid(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); SPHEROID *sphere = (SPHEROID *) PG_GETARG_POINTER(1); - LWGEOM *lwgeom = lwgeom_deserialize(SERIALIZED_FORM(geom)); + LWGEOM *lwgeom = lwgeom_from_gserialized(geom); double dist = lwgeom_length_spheroid(lwgeom, sphere); - lwgeom_release(lwgeom); + lwgeom_free(lwgeom); + PG_FREE_IF_COPY(geom, 0); PG_RETURN_FLOAT8(dist); } @@ -407,29 +346,31 @@ PG_FUNCTION_INFO_V1(LWGEOM_length_ellipsoid_linestring); Datum LWGEOM_length_ellipsoid_linestring(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + LWGEOM *lwgeom = lwgeom_from_gserialized(geom); SPHEROID *sphere = (SPHEROID *) PG_GETARG_POINTER(1); - LWGEOM_INSPECTED *inspected = lwgeom_inspect(SERIALIZED_FORM(geom)); - LWLINE *line; - double dist = 0.0; - int i; - - POSTGIS_DEBUG(2, "in LWGEOM_length_ellipsoid_linestring"); + double length = 0.0; - for (i=0; ingeometries; i++) + /* EMPTY things have no length */ + if ( lwgeom_is_empty(lwgeom) ) { - line = lwgeom_getline_inspected(inspected, i); - if ( line == NULL ) continue; - dist += lwgeom_pointarray_length_ellipse(line->points, - sphere); - - POSTGIS_DEBUGF(3, " LWGEOM_length_ellipsoid_linestring found a line (%f)", - dist); + lwgeom_free(lwgeom); + PG_RETURN_FLOAT8(0.0); } - lwinspected_release(inspected); + length = lwgeom_length_spheroid(lwgeom, sphere); + lwgeom_free(lwgeom); + PG_FREE_IF_COPY(geom, 0); - PG_RETURN_FLOAT8(dist); + /* Something went wrong... */ + if ( length < 0.0 ) + { + elog(ERROR, "lwgeom_length_spheroid returned length < 0.0"); + PG_RETURN_NULL(); + } + + /* Clean up */ + PG_RETURN_FLOAT8(length); } /* @@ -528,14 +469,13 @@ PG_FUNCTION_INFO_V1(geometry_distance_spheroid); Datum geometry_distance_spheroid(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom1 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_LWGEOM *geom2 = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + GSERIALIZED *geom1 = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *geom2 = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); SPHEROID *sphere = (SPHEROID *)PG_GETARG_POINTER(2); - int type1 = TYPE_GETTYPE(geom1->type); - int type2 = TYPE_GETTYPE(geom2->type); + int type1 = gserialized_get_type(geom1); + int type2 = gserialized_get_type(geom2); bool use_spheroid = PG_GETARG_BOOL(3); LWGEOM *lwgeom1, *lwgeom2; - GBOX gbox1, gbox2; double distance; /* Calculate some other parameters on the spheroid */ @@ -547,9 +487,6 @@ sphere->a = sphere->b = sphere->radius; } - gbox1.flags = gflags(0, 0, 1); - gbox2.flags = gflags(0, 0, 1); - if ( ! ( type1 == POINTTYPE || type1 == LINETYPE || type1 == POLYGONTYPE || type1 == MULTIPOINTTYPE || type1 == MULTILINETYPE || type1 == MULTIPOLYGONTYPE )) { @@ -565,28 +502,21 @@ } - if (pglwgeom_getSRID(geom1) != pglwgeom_getSRID(geom2)) + if (gserialized_get_srid(geom1) != gserialized_get_srid(geom2)) { elog(ERROR, "geometry_distance_spheroid: Operation on two GEOMETRIES with different SRIDs\n"); PG_RETURN_NULL(); } - lwgeom1 = lwgeom_deserialize(SERIALIZED_FORM(geom1)); - lwgeom2 = lwgeom_deserialize(SERIALIZED_FORM(geom2)); - - if ( lwgeom_calculate_gbox_geodetic(lwgeom1, &gbox1) != G_SUCCESS ) - { - elog(ERROR, "geometry_distance_spheroid: unable to calculate gbox1\n"); - PG_RETURN_NULL(); - }; - - if ( lwgeom_calculate_gbox_geodetic(lwgeom2, &gbox2) != G_SUCCESS ) - { - elog(ERROR, "geometry_distance_spheroid: unable to calculate gbox2\n"); - PG_RETURN_NULL(); - }; + /* Get #LWGEOM structures */ + lwgeom1 = lwgeom_from_gserialized(geom1); + lwgeom2 = lwgeom_from_gserialized(geom2); + + /* We are going to be calculating geodetic distances */ + lwgeom_set_geodetic(lwgeom1, LW_TRUE); + lwgeom_set_geodetic(lwgeom2, LW_TRUE); - distance = lwgeom_distance_spheroid(lwgeom1, lwgeom2, &gbox1, &gbox2, sphere, 0.0); + distance = lwgeom_distance_spheroid(lwgeom1, lwgeom2, sphere, 0.0); PG_RETURN_FLOAT8(distance); diff -Nru postgis-1.5.3/postgis/lwgeom_sqlmm.c postgis-2.0.1/postgis/lwgeom_sqlmm.c --- postgis-1.5.3/postgis/lwgeom_sqlmm.c 2010-02-01 17:35:55.000000000 +0000 +++ postgis-2.0.1/postgis/lwgeom_sqlmm.c 2012-02-27 22:08:12.000000000 +0000 @@ -1,5 +1,5 @@ /********************************************************************** - * $Id: lwgeom_sqlmm.c 5181 2010-02-01 17:35:55Z pramsey $ + * $Id: lwgeom_sqlmm.c 9324 2012-02-27 22:08:12Z pramsey $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net @@ -10,16 +10,17 @@ * **********************************************************************/ -#include "postgres.h" -#include "liblwgeom.h" -#include "fmgr.h" - #include #include #include #include #include +#include "postgres.h" +#include "fmgr.h" + +#include "../postgis_config.h" +#include "liblwgeom.h" #include "lwgeom_pg.h" @@ -36,8 +37,10 @@ PG_FUNCTION_INFO_V1(LWGEOM_has_arc); Datum LWGEOM_has_arc(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - uint32 result = has_arc(lwgeom_deserialize(SERIALIZED_FORM(geom))); + GSERIALIZED *geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + LWGEOM *lwgeom = lwgeom_from_gserialized(geom); + uint32 result = lwgeom_has_arc(lwgeom); + lwgeom_free(lwgeom); PG_RETURN_BOOL(result == 1); } @@ -50,9 +53,9 @@ PG_FUNCTION_INFO_V1(LWGEOM_curve_segmentize); Datum LWGEOM_curve_segmentize(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); uint32 perQuad = PG_GETARG_INT32(1); - PG_LWGEOM *ret; + GSERIALIZED *ret; LWGEOM *igeom = NULL, *ogeom = NULL; POSTGIS_DEBUG(2, "LWGEOM_curve_segmentize called."); @@ -68,16 +71,16 @@ POSTGIS_DEBUGF(3, "perQuad = %d", perQuad); } #endif - igeom = lwgeom_deserialize(SERIALIZED_FORM(geom)); - if ( ! has_arc(igeom) ) + igeom = lwgeom_from_gserialized(geom); + if ( ! lwgeom_has_arc(igeom) ) { PG_RETURN_POINTER(geom); } ogeom = lwgeom_segmentize(igeom, perQuad); if (ogeom == NULL) PG_RETURN_NULL(); - ret = pglwgeom_serialize(ogeom); - lwgeom_release(igeom); - lwgeom_release(ogeom); + ret = geometry_serialize(ogeom); + lwgeom_free(igeom); + lwgeom_free(ogeom); PG_FREE_IF_COPY(geom, 0); PG_RETURN_POINTER(ret); } @@ -85,22 +88,24 @@ PG_FUNCTION_INFO_V1(LWGEOM_line_desegmentize); Datum LWGEOM_line_desegmentize(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - PG_LWGEOM *ret; + GSERIALIZED *geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + GSERIALIZED *ret; LWGEOM *igeom = NULL, *ogeom = NULL; POSTGIS_DEBUG(2, "LWGEOM_line_desegmentize."); - igeom = lwgeom_deserialize(SERIALIZED_FORM(geom)); + igeom = lwgeom_from_gserialized(geom); ogeom = lwgeom_desegmentize(igeom); + lwgeom_free(igeom); + if (ogeom == NULL) { - lwgeom_release(igeom); + PG_FREE_IF_COPY(geom, 0); PG_RETURN_NULL(); } - ret = pglwgeom_serialize(ogeom); - lwgeom_release(igeom); - lwgeom_release(ogeom); + + ret = geometry_serialize(ogeom); + lwgeom_free(ogeom); PG_FREE_IF_COPY(geom, 0); PG_RETURN_POINTER(ret); } diff -Nru postgis-1.5.3/postgis/lwgeom_svg.c postgis-2.0.1/postgis/lwgeom_svg.c --- postgis-1.5.3/postgis/lwgeom_svg.c 2010-02-06 10:49:00.000000000 +0000 +++ postgis-2.0.1/postgis/lwgeom_svg.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,726 +0,0 @@ -/********************************************************************** - * $Id: lwgeom_svg.c 5210 2010-02-06 10:49:00Z colivier $ - * - * PostGIS - Spatial Types for PostgreSQL - * http://postgis.refractions.net - * Copyright 2001-2003 Refractions Research Inc. - * - * This is free software; you can redistribute and/or modify it under - * the terms of hte GNU General Public Licence. See the COPYING file. - * - **********************************************************************/ - -/** @file -* -* SVG output routines. -* Originally written by: Klaus Förster -* Refactored by: Olivier Courtin (Camptocamp) -* -* BNF SVG Path: -**********************************************************************/ - - -#include "postgres.h" -#include "lwgeom_pg.h" -#include "liblwgeom.h" -#include "lwgeom_export.h" - -Datum assvg_geometry(PG_FUNCTION_ARGS); -static char * assvg_point(LWPOINT *point, bool relative, int precision); -static char * assvg_line(LWLINE *line, bool relative, int precision); -static char * assvg_polygon(LWPOLY *poly, bool relative, int precision); -static char * assvg_multipoint(LWGEOM_INSPECTED *insp, bool relative, int precision); -static char * assvg_multiline(LWGEOM_INSPECTED *insp, bool relative, int precision); -static char * assvg_multipolygon(LWGEOM_INSPECTED *insp, bool relative, int precision); -static char * assvg_collection(LWGEOM_INSPECTED *insp, bool relative, int precision); - -static size_t assvg_inspected_size(LWGEOM_INSPECTED *insp, bool relative, int precision); -static size_t assvg_inspected_buf(LWGEOM_INSPECTED *insp, char *output, bool relative, int precision); -static size_t pointArray_svg_size(POINTARRAY *pa, int precision); -static size_t pointArray_svg_rel(POINTARRAY *pa, char * output, bool close_ring, int precision); -static size_t pointArray_svg_abs(POINTARRAY *pa, char * output, bool close_ring, int precision); - - -/** - * SVG features - */ -PG_FUNCTION_INFO_V1(assvg_geometry); -Datum assvg_geometry(PG_FUNCTION_ARGS) -{ - PG_LWGEOM *geom; - char *svg; - text *result; - int len; - bool relative = false; - int precision=MAX_DOUBLE_PRECISION; - - if ( PG_ARGISNULL(0) ) PG_RETURN_NULL(); - - geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); - - /* check for relative path notation */ - if ( PG_NARGS() > 1 && ! PG_ARGISNULL(1) ) - relative = PG_GETARG_INT32(1) ? true:false; - - if ( PG_NARGS() > 2 && ! PG_ARGISNULL(2) ) - { - precision = PG_GETARG_INT32(2); - if ( precision > MAX_DOUBLE_PRECISION ) - precision = MAX_DOUBLE_PRECISION; - else if ( precision < 0 ) precision = 0; - } - - svg = geometry_to_svg(SERIALIZED_FORM(geom), relative, precision); - PG_FREE_IF_COPY(geom, 0); - - len = strlen(svg) + VARHDRSZ; - result = palloc(len); - SET_VARSIZE(result, len); - memcpy(VARDATA(result), svg, len-VARHDRSZ); - - pfree(svg); - - PG_RETURN_POINTER(result); -} - - -/** - * Takes a GEOMETRY and returns a SVG representation - */ -char * -geometry_to_svg(uchar *geom, bool relative, int precision) -{ - char *ret = NULL; - int type; - - type = lwgeom_getType(geom[0]); - switch (type) - { - case POINTTYPE: - ret = assvg_point(lwpoint_deserialize(geom), relative, precision); - break; - case LINETYPE: - ret = assvg_line(lwline_deserialize(geom), relative, precision); - break; - case POLYGONTYPE: - ret = assvg_polygon(lwpoly_deserialize(geom), relative, precision); - break; - case MULTIPOINTTYPE: - ret = assvg_multipoint(lwgeom_inspect(geom), relative, precision); - break; - case MULTILINETYPE: - ret = assvg_multiline(lwgeom_inspect(geom), relative, precision); - break; - case MULTIPOLYGONTYPE: - ret = assvg_multipolygon(lwgeom_inspect(geom), relative, precision); - break; - case COLLECTIONTYPE: - ret = assvg_collection(lwgeom_inspect(geom), relative, precision); - break; - - default: - lwerror("ST_AsSVG: '%s' geometry type not supported.", - lwgeom_typename(type)); - } - - return ret; -} - - -/** - * Point Geometry - */ - -static size_t -assvg_point_size(LWPOINT *point, bool circle, int precision) -{ - size_t size; - - size = (MAX_DIGS_DOUBLE + precision) * 2; - if (circle) size += sizeof("cx='' cy=''"); - else size += sizeof("x='' y=''"); - - return size; -} - -static size_t -assvg_point_buf(LWPOINT *point, char * output, bool circle, int precision) -{ - char *ptr=output; - char x[MAX_DIGS_DOUBLE+MAX_DOUBLE_PRECISION+1]; - char y[MAX_DIGS_DOUBLE+MAX_DOUBLE_PRECISION+1]; - POINT2D pt; - - getPoint2d_p(point->point, 0, &pt); - - if (fabs(pt.x) < MAX_DOUBLE) - sprintf(x, "%.*f", precision, pt.x); - else - sprintf(x, "%g", pt.x); - trim_trailing_zeros(x); - - /* SVG Y axis is reversed, an no need to transform 0 into -0 */ - if (fabs(pt.y) < MAX_DOUBLE) - sprintf(y, "%.*f", precision, fabs(pt.y) ? pt.y * -1 : pt.y); - else - sprintf(y, "%g", fabs(pt.y) ? pt.y * -1 : pt.y); - trim_trailing_zeros(y); - - if (circle) ptr += sprintf(ptr, "x=\"%s\" y=\"%s\"", x, y); - else ptr += sprintf(ptr, "cx=\"%s\" cy=\"%s\"", x, y); - - return (ptr-output); -} - -static char * -assvg_point(LWPOINT *point, bool circle, int precision) -{ - char *output; - int size; - - size = assvg_point_size(point, circle, precision); - output = palloc(size); - assvg_point_buf(point, output, circle, precision); - - return output; -} - - -/** - * Line Geometry - */ - -static size_t -assvg_line_size(LWLINE *line, bool relative, int precision) -{ - size_t size; - - size = sizeof("M "); - size += pointArray_svg_size(line->points, precision); - - return size; -} - -static size_t -assvg_line_buf(LWLINE *line, char * output, bool relative, int precision) -{ - char *ptr=output; - - /* Start path with SVG MoveTo */ - ptr += sprintf(ptr, "M "); - if (relative) - ptr += pointArray_svg_rel(line->points, ptr, true, precision); - else - ptr += pointArray_svg_abs(line->points, ptr, true, precision); - - return (ptr-output); -} - -static char * -assvg_line(LWLINE *line, bool relative, int precision) -{ - char *output; - int size; - - size = assvg_line_size(line, relative, precision); - output = palloc(size); - assvg_line_buf(line, output, relative, precision); - - return output; -} - - -/** - * Polygon Geometry - */ - -static size_t -assvg_polygon_size(LWPOLY *poly, bool relative, int precision) -{ - int i; - size_t size=0; - - for (i=0; inrings; i++) - size += pointArray_svg_size(poly->rings[i], precision) + sizeof(" "); - size += sizeof("M Z") * poly->nrings; - - return size; -} - -static size_t -assvg_polygon_buf(LWPOLY *poly, char * output, bool relative, int precision) -{ - int i; - char *ptr=output; - - for (i=0; inrings; i++) - { - if (i) ptr += sprintf(ptr, " "); /* Space beetween each ring */ - ptr += sprintf(ptr, "M "); /* Start path with SVG MoveTo */ - - if (relative) - { - ptr += pointArray_svg_rel(poly->rings[i], ptr, false, precision); - ptr += sprintf(ptr, " z"); /* SVG closepath */ - } - else - { - ptr += pointArray_svg_abs(poly->rings[i], ptr, false, precision); - ptr += sprintf(ptr, " Z"); /* SVG closepath */ - } - } - - return (ptr-output); -} - -static char * -assvg_polygon(LWPOLY *poly, bool relative, int precision) -{ - char *output; - int size; - - size = assvg_polygon_size(poly, relative, precision); - output = palloc(size); - assvg_polygon_buf(poly, output, relative, precision); - - return output; -} - - -/** - * Multipoint Geometry - */ - -static size_t -assvg_multipoint_size(LWGEOM_INSPECTED *insp, bool relative, int precision) -{ - LWPOINT *point; - size_t size=0; - int i; - - for (i=0 ; ingeometries ; i++) - { - point = lwgeom_getpoint_inspected(insp, i); - size += assvg_point_size(point, relative, precision); - if (point) lwpoint_release(point); - } - size += sizeof(",") * --i; /* Arbitrary comma separator */ - - return size; -} - -static size_t -assvg_multipoint_buf(LWGEOM_INSPECTED *insp, char *output, bool relative, int precision) -{ - LWPOINT *point; - int i; - char *ptr=output; - - for (i=0 ; ingeometries ; i++) - { - if (i) ptr += sprintf(ptr, ","); /* Arbitrary comma separator */ - point = lwgeom_getpoint_inspected(insp, i); - ptr += assvg_point_buf(point, ptr, relative, precision); - if (point) lwpoint_release(point); - } - - return (ptr-output); -} - -static char * -assvg_multipoint(LWGEOM_INSPECTED *point, bool relative, int precision) -{ - char *output; - int size; - - size = assvg_multipoint_size(point, relative, precision); - output = palloc(size); - assvg_multipoint_buf(point, output, relative, precision); - - return output; -} - - -/** - * Multiline Geometry - */ - -static size_t -assvg_multiline_size(LWGEOM_INSPECTED *insp, bool relative, int precision) -{ - LWLINE *line; - size_t size=0; - int i; - - for (i=0 ; ingeometries ; i++) - { - line = lwgeom_getline_inspected(insp, i); - size += assvg_line_size(line, relative, precision); - if (line) lwline_release(line); - } - size += sizeof(" ") * --i; /* SVG whitespace Separator */ - - return size; -} - -static size_t -assvg_multiline_buf(LWGEOM_INSPECTED *insp, char *output, bool relative, int precision) -{ - LWLINE *line; - int i; - char *ptr=output; - - for (i=0 ; ingeometries ; i++) - { - if (i) ptr += sprintf(ptr, " "); /* SVG whitespace Separator */ - line = lwgeom_getline_inspected(insp, i); - ptr += assvg_line_buf(line, ptr, relative, precision); - if (line) lwline_release(line); - } - - return (ptr-output); -} - -static char * -assvg_multiline(LWGEOM_INSPECTED *line, bool relative, int precision) -{ - char *output; - int size; - - size = assvg_multiline_size(line, relative, precision); - output = palloc(size); - assvg_multiline_buf(line, output, relative, precision); - - return output; -} - - -/* - * Multipolygon Geometry - */ - -static size_t -assvg_multipolygon_size(LWGEOM_INSPECTED *insp, bool relative, int precision) -{ - LWPOLY *poly; - size_t size=0; - int i; - - for (i=0 ; ingeometries ; i++) - { - poly = lwgeom_getpoly_inspected(insp, i); - size += assvg_polygon_size(poly, relative, precision); - if (poly) lwpoly_release(poly); - } - size += sizeof(" ") * --i; /* SVG whitespace Separator */ - - return size; -} - -static size_t -assvg_multipolygon_buf(LWGEOM_INSPECTED *insp, char *output, bool relative, int precision) -{ - LWPOLY *poly; - int i; - char *ptr=output; - - for (i=0 ; ingeometries ; i++) - { - if (i) ptr += sprintf(ptr, " "); /* SVG whitespace Separator */ - poly = lwgeom_getpoly_inspected(insp, i); - ptr += assvg_polygon_buf(poly, ptr, relative, precision); - if (poly) lwpoly_release(poly); - } - - return (ptr-output); -} - -static char * -assvg_multipolygon(LWGEOM_INSPECTED *poly, bool relative, int precision) -{ - char *output; - int size; - - size = assvg_multipolygon_size(poly, relative, precision); - output = palloc(size); - assvg_multipolygon_buf(poly, output, relative, precision); - - return output; -} - - -/** -* Collection Geometry -*/ - -static size_t -assvg_collection_size(LWGEOM_INSPECTED *insp, bool relative, int precision) -{ - int i = 0; - size_t size=0; - LWGEOM_INSPECTED *subinsp; - uchar *subgeom; - - for (i=0; ingeometries; i++) - { - subgeom = lwgeom_getsubgeometry_inspected(insp, i); - subinsp = lwgeom_inspect(subgeom); - size += assvg_inspected_size(subinsp, relative, precision); - lwinspected_release(subinsp); - } - - if ( i ) /* We have some geometries, so add space for delimiters. */ - size += sizeof(";") * --i; - - if (size == 0) size++; /* EMPTY GEOMETRYCOLLECTION */ - - return size; -} - -static size_t -assvg_collection_buf(LWGEOM_INSPECTED *insp, char *output, bool relative, int precision) -{ - int i; - char *ptr=output; - LWGEOM_INSPECTED *subinsp; - uchar *subgeom; - - /* EMPTY GEOMETRYCOLLECTION */ - if (insp->ngeometries == 0) *ptr = '\0'; - - for (i=0; ingeometries; i++) - { - if (i) ptr += sprintf(ptr, ";"); - subgeom = lwgeom_getsubgeometry_inspected(insp, i); - subinsp = lwgeom_inspect(subgeom); - ptr += assvg_inspected_buf(subinsp, ptr, relative, precision); - lwinspected_release(subinsp); - } - - return (ptr - output); -} - -static char * -assvg_collection(LWGEOM_INSPECTED *insp, bool relative, int precision) -{ - char *output; - int size; - - size = assvg_collection_size(insp, relative, precision); - output = palloc(size); - assvg_collection_buf(insp, output, relative, precision); - - return output; -} - - - -static size_t -assvg_inspected_buf(LWGEOM_INSPECTED *insp, char *output, bool relative, int precision) -{ - LWPOINT *point; - LWLINE *line; - LWPOLY *poly; - int type = lwgeom_getType(insp->serialized_form[0]); - char *ptr=output; - - switch (type) - { - case POINTTYPE: - point=lwgeom_getpoint_inspected(insp, 0); - ptr += assvg_point_buf(point, ptr, relative, precision); - lwpoint_release(point); - break; - - case LINETYPE: - line=lwgeom_getline_inspected(insp, 0); - ptr += assvg_line_buf(line, ptr, relative, precision); - lwline_release(line); - break; - - case POLYGONTYPE: - poly=lwgeom_getpoly_inspected(insp, 0); - ptr += assvg_polygon_buf(poly, ptr, relative, precision); - lwpoly_release(poly); - break; - - case MULTIPOINTTYPE: - ptr += assvg_multipoint_buf(insp, ptr, relative, precision); - break; - - case MULTILINETYPE: - ptr += assvg_multiline_buf(insp, ptr, relative, precision); - break; - - case MULTIPOLYGONTYPE: - ptr += assvg_multipolygon_buf(insp, ptr, relative, precision); - break; - - default: - lwerror("ST_AsSVG: '%s' geometry type not supported.", - lwgeom_typename(type)); - } - - return (ptr-output); -} - - -static size_t -assvg_inspected_size(LWGEOM_INSPECTED *insp, bool relative, int precision) -{ - int type = lwgeom_getType(insp->serialized_form[0]); - size_t size = 0; - LWPOINT *point; - LWLINE *line; - LWPOLY *poly; - - switch (type) - { - case POINTTYPE: - point=lwgeom_getpoint_inspected(insp, 0); - size = assvg_point_size(point, relative, precision); - lwpoint_release(point); - break; - - case LINETYPE: - line=lwgeom_getline_inspected(insp, 0); - size = assvg_line_size(line, relative, precision); - lwline_release(line); - break; - - case POLYGONTYPE: - poly=lwgeom_getpoly_inspected(insp, 0); - size = assvg_polygon_size(poly, relative, precision); - lwpoly_release(poly); - - case MULTIPOINTTYPE: - size = assvg_multipoint_size(insp, relative, precision); - break; - - case MULTILINETYPE: - size = assvg_multiline_size(insp, relative, precision); - break; - - case MULTIPOLYGONTYPE: - size = assvg_multipolygon_size(insp, relative, precision); - break; - - default: - lwerror("ST_AsSVG: geometry not supported."); - } - - return size; -} - - -static size_t -pointArray_svg_rel(POINTARRAY *pa, char *output, bool close_ring, int precision) -{ - int i, end; - char *ptr; - char x[MAX_DIGS_DOUBLE+MAX_DOUBLE_PRECISION+1]; - char y[MAX_DIGS_DOUBLE+MAX_DOUBLE_PRECISION+1]; - POINT2D pt, lpt; - - ptr = output; - - if (close_ring) end = pa->npoints; - else end = pa->npoints - 1; - - /* Starting point */ - getPoint2d_p(pa, 0, &pt); - - if (fabs(pt.x) < MAX_DOUBLE) - sprintf(x, "%.*f", precision, pt.x); - else - sprintf(x, "%g", pt.x); - trim_trailing_zeros(x); - - if (fabs(pt.y) < MAX_DOUBLE) - sprintf(y, "%.*f", precision, fabs(pt.y) ? pt.y * -1 : pt.y); - else - sprintf(y, "%g", fabs(pt.y) ? pt.y * -1 : pt.y); - trim_trailing_zeros(y); - - ptr += sprintf(ptr,"%s %s l", x, y); - - /* All the following ones */ - for (i=1 ; i < end ; i++) - { - lpt = pt; - - getPoint2d_p(pa, i, &pt); - if (fabs(pt.x -lpt.x) < MAX_DOUBLE) - sprintf(x, "%.*f", precision, pt.x -lpt.x); - else - sprintf(x, "%g", pt.x -lpt.x); - trim_trailing_zeros(x); - - /* SVG Y axis is reversed, an no need to transform 0 into -0 */ - if (fabs(pt.y -lpt.y) < MAX_DOUBLE) - sprintf(y, "%.*f", precision, - fabs(pt.y -lpt.y) ? (pt.y - lpt.y) * -1: (pt.y - lpt.y)); - else - sprintf(y, "%g", - fabs(pt.y -lpt.y) ? (pt.y - lpt.y) * -1: (pt.y - lpt.y)); - trim_trailing_zeros(y); - - ptr += sprintf(ptr," %s %s", x, y); - } - - return (ptr-output); -} - - -/** - * Returns maximum size of rendered pointarray in bytes. - */ -static size_t -pointArray_svg_abs(POINTARRAY *pa, char *output, bool close_ring, int precision) -{ - int i, end; - char *ptr; - char x[MAX_DIGS_DOUBLE+MAX_DOUBLE_PRECISION+1]; - char y[MAX_DIGS_DOUBLE+MAX_DOUBLE_PRECISION+1]; - POINT2D pt; - - ptr = output; - - if (close_ring) end = pa->npoints; - else end = pa->npoints - 1; - - for (i=0 ; i < end ; i++) - { - getPoint2d_p(pa, i, &pt); - - if (fabs(pt.x) < MAX_DOUBLE) - sprintf(x, "%.*f", precision, pt.x); - else - sprintf(x, "%g", pt.x); - trim_trailing_zeros(x); - - /* SVG Y axis is reversed, an no need to transform 0 into -0 */ - if (fabs(pt.y) < MAX_DOUBLE) - sprintf(y, "%.*f", precision, fabs(pt.y) ? pt.y * -1:pt.y); - else - sprintf(y, "%g", fabs(pt.y) ? pt.y * -1:pt.y); - trim_trailing_zeros(y); - - if (i == 1) ptr += sprintf(ptr, " L "); - else if (i) ptr += sprintf(ptr, " "); - ptr += sprintf(ptr,"%s %s", x, y); - } - - return (ptr-output); -} - - -/** - * Returns maximum size of rendered pointarray in bytes. - */ -static size_t -pointArray_svg_size(POINTARRAY *pa, int precision) -{ - return (MAX_DIGS_DOUBLE + precision + sizeof(" ")) - * 2 * pa->npoints + sizeof(" L "); -} diff -Nru postgis-1.5.3/postgis/lwgeom_transform.c postgis-2.0.1/postgis/lwgeom_transform.c --- postgis-1.5.3/postgis/lwgeom_transform.c 2010-02-01 17:35:55.000000000 +0000 +++ postgis-2.0.1/postgis/lwgeom_transform.c 2012-03-16 11:58:49.000000000 +0000 @@ -1,9 +1,9 @@ /********************************************************************** - * $Id: lwgeom_transform.c 5181 2010-02-01 17:35:55Z pramsey $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net - * Copyright 2001-2003 Refractions Research Inc. + * + * Copyright (C) 2001-2003 Refractions Research Inc. * * This is free software; you can redistribute and/or modify it under * the terms of the GNU General Public Licence. See the COPYING file. @@ -12,16 +12,10 @@ #include "postgres.h" #include "fmgr.h" -#include "miscadmin.h" +#include "../postgis_config.h" #include "liblwgeom.h" -#include "lwgeom_pg.h" - -#include -#include -#include -#include -#include +#include "lwgeom_transform.h" Datum transform(PG_FUNCTION_ARGS); @@ -29,749 +23,6 @@ Datum postgis_proj_version(PG_FUNCTION_ARGS); -#include "proj_api.h" -#include "utils/memutils.h" -#include "executor/spi.h" -#include "access/hash.h" -#include "utils/hsearch.h" -#include "lwgeom_transform.h" - -projPJ make_project(char *str1); -void to_rad(POINT4D *pt); -void to_dec(POINT4D *pt); -int pj_transform_nodatum(projPJ srcdefn, projPJ dstdefn, long point_count, int point_offset, double *x, double *y, double *z ); -int transform_point(POINT4D *pt, projPJ srcdefn, projPJ dstdefn); -static int lwgeom_transform_recursive(uchar *geom, projPJ inpj, projPJ outpj); - - - -/* PROJ 4 lookup transaction cache methods */ -#define PROJ4_CACHE_ITEMS 8 - -/* - * PROJ 4 backend hash table initial hash size - * (since 16 is the default portal hash table size, and we would - * typically have 2 entries per portal - * then we shall use a default size of 32) - */ -#define PROJ4_BACKEND_HASH_SIZE 32 - - -/* An entry in the PROJ4 SRS cache */ -typedef struct struct_PROJ4SRSCacheItem -{ - int srid; - projPJ projection; - MemoryContext projection_mcxt; -} -PROJ4SRSCacheItem; - -/** The portal cache: it's contents and cache context - */ -typedef struct struct_PROJ4PortalCache -{ - PROJ4SRSCacheItem PROJ4SRSCache[PROJ4_CACHE_ITEMS]; - int PROJ4SRSCacheCount; - MemoryContext PROJ4SRSCacheContext; -} -PROJ4PortalCache; - -/** - * Backend projPJ hash table - * - * This hash table stores a key/value pair of MemoryContext/projPJ objects. - * Whenever we create a projPJ object using pj_init(), we create a separate - * MemoryContext as a child context of the current executor context. - * The MemoryContext/projPJ object is stored in this hash table so - * that when PROJ4SRSCacheDelete() is called during query cleanup, we can - * lookup the projPJ object based upon the MemoryContext parameter and hence - * pj_free() it. - */ -static HTAB *PJHash = NULL; - -typedef struct struct_PJHashEntry -{ - MemoryContext ProjectionContext; - projPJ projection; -} -PJHashEntry; - - -/* PJ Hash API */ -uint32 mcxt_ptr_hash(const void *key, Size keysize); - -static HTAB *CreatePJHash(void); -static void AddPJHashEntry(MemoryContext mcxt, projPJ projection); -static projPJ GetPJHashEntry(MemoryContext mcxt); -static void DeletePJHashEntry(MemoryContext mcxt); - -/* Cache API */ -bool IsInPROJ4SRSCache(PROJ4PortalCache *PROJ4Cache, int srid); -projPJ GetProjectionFromPROJ4SRSCache(PROJ4PortalCache *PROJ4Cache, int srid); -void AddToPROJ4SRSCache(PROJ4PortalCache *PROJ4Cache, int srid, int other_srid); -void DeleteFromPROJ4SRSCache(PROJ4PortalCache *PROJ4Cache, int srid); - -/* Search path for PROJ.4 library */ -static bool IsPROJ4LibPathSet = false; -void SetPROJ4LibPath(void); - -/* Memory context cache functions */ -static void PROJ4SRSCacheInit(MemoryContext context); -static void PROJ4SRSCacheDelete(MemoryContext context); -static void PROJ4SRSCacheReset(MemoryContext context); -static bool PROJ4SRSCacheIsEmpty(MemoryContext context); -static void PROJ4SRSCacheStats(MemoryContext context, int level); -#ifdef MEMORY_CONTEXT_CHECKING -static void PROJ4SRSCacheCheck(MemoryContext context); -#endif - - -/* Memory context definition must match the current version of PostgreSQL */ -static MemoryContextMethods PROJ4SRSCacheContextMethods = -{ - NULL, - NULL, - NULL, - PROJ4SRSCacheInit, - PROJ4SRSCacheReset, - PROJ4SRSCacheDelete, - NULL, - PROJ4SRSCacheIsEmpty, - PROJ4SRSCacheStats -#ifdef MEMORY_CONTEXT_CHECKING - ,PROJ4SRSCacheCheck -#endif -}; - - -static void -PROJ4SRSCacheInit(MemoryContext context) -{ - /* - * Do nothing as the cache is initialised when the transform() - * function is first called - */ -} - -static void -PROJ4SRSCacheDelete(MemoryContext context) -{ - projPJ projection; - - /* Lookup the projPJ pointer in the global hash table so we can free it */ - projection = GetPJHashEntry(context); - - if (!projection) - elog(ERROR, "PROJ4SRSCacheDelete: Trying to delete non-existant projection object with MemoryContext key (%p)", (void *)context); - - LWDEBUGF(3, "deleting projection object (%p) with MemoryContext key (%p)", projection, context); - - /* Free it */ - pj_free(projection); - - /* Remove the hash entry as it is no longer needed */ - DeletePJHashEntry(context); -} - -static void -PROJ4SRSCacheReset(MemoryContext context) -{ - /* - * Do nothing, but we must supply a function since this call is mandatory according to tgl - * (see postgis-devel archives July 2007) - */ -} - -static bool -PROJ4SRSCacheIsEmpty(MemoryContext context) -{ - /* - * Always return false since this call is mandatory according to tgl - * (see postgis-devel archives July 2007) - */ - return FALSE; -} - -static void -PROJ4SRSCacheStats(MemoryContext context, int level) -{ - /* - * Simple stats display function - we must supply a function since this call is mandatory according to tgl - * (see postgis-devel archives July 2007) - */ - - fprintf(stderr, "%s: PROJ4 context\n", context->name); -} - -#ifdef MEMORY_CONTEXT_CHECKING -static void -PROJ4SRSCacheCheck(MemoryContext context) -{ - /* - * Do nothing - stub required for when PostgreSQL is compiled - * with MEMORY_CONTEXT_CHECKING defined - */ -} -#endif - - -/* - * PROJ4 projPJ Hash Table functions - */ - - -/** - * A version of tag_hash - we specify this here as the implementation - * has changed over the years.... - */ - -uint32 mcxt_ptr_hash(const void *key, Size keysize) -{ - uint32 hashval; - - hashval = DatumGetUInt32(hash_any(key, keysize)); - - return hashval; -} - - -static HTAB *CreatePJHash(void) -{ - HASHCTL ctl; - - ctl.keysize = sizeof(MemoryContext); - ctl.entrysize = sizeof(PJHashEntry); - ctl.hash = mcxt_ptr_hash; - - return hash_create("PostGIS PROJ4 Backend projPJ MemoryContext Hash", PROJ4_BACKEND_HASH_SIZE, &ctl, (HASH_ELEM | HASH_FUNCTION)); -} - -static void AddPJHashEntry(MemoryContext mcxt, projPJ projection) -{ - bool found; - void **key; - PJHashEntry *he; - - /* The hash key is the MemoryContext pointer */ - key = (void *)&mcxt; - - he = (PJHashEntry *) hash_search(PJHash, key, HASH_ENTER, &found); - if (!found) - { - /* Insert the entry into the new hash element */ - he->ProjectionContext = mcxt; - he->projection = projection; - } - else - { - elog(ERROR, "AddPJHashEntry: PROJ4 projection object already exists for this MemoryContext (%p)", - (void *)mcxt); - } -} - -static projPJ GetPJHashEntry(MemoryContext mcxt) -{ - void **key; - PJHashEntry *he; - - /* The hash key is the MemoryContext pointer */ - key = (void *)&mcxt; - - /* Return the projection object from the hash */ - he = (PJHashEntry *) hash_search(PJHash, key, HASH_FIND, NULL); - - return he->projection; -} - - -static void DeletePJHashEntry(MemoryContext mcxt) -{ - void **key; - PJHashEntry *he; - - /* The hash key is the MemoryContext pointer */ - key = (void *)&mcxt; - - /* Delete the projection object from the hash */ - he = (PJHashEntry *) hash_search(PJHash, key, HASH_REMOVE, NULL); - - he->projection = NULL; - - if (!he) - elog(ERROR, "DeletePJHashEntry: There was an error removing the PROJ4 projection object from this MemoryContext (%p)", (void *)mcxt); -} - - -/* - * Per-cache management functions - */ - -bool -IsInPROJ4SRSCache(PROJ4PortalCache *PROJ4Cache, int srid) -{ - /* - * Return true/false depending upon whether the item - * is in the SRS cache. - */ - - int i; - - for (i = 0; i < PROJ4_CACHE_ITEMS; i++) - { - if (PROJ4Cache->PROJ4SRSCache[i].srid == srid) - return true; - } - - /* Otherwise not found */ - return false; -} - - -/** - * Return the projection object from the cache (we should - * already have checked it exists using IsInPROJ4SRSCache first) - */ -projPJ -GetProjectionFromPROJ4SRSCache(PROJ4PortalCache *PROJ4Cache, int srid) -{ - int i; - - for (i = 0; i < PROJ4_CACHE_ITEMS; i++) - { - if (PROJ4Cache->PROJ4SRSCache[i].srid == srid) - return PROJ4Cache->PROJ4SRSCache[i].projection; - } - - return NULL; -} - -char* GetProj4StringSPI(int srid) -{ - static int maxproj4len = 512; - int spi_result; - char *proj_str = palloc(maxproj4len); - char proj4_spi_buffer[256]; - - /* Connect */ - spi_result = SPI_connect(); - if (spi_result != SPI_OK_CONNECT) - { - elog(ERROR, "GetProj4StringSPI: Could not connect to database using SPI"); - } - - /* Execute the lookup query */ - snprintf(proj4_spi_buffer, 255, "SELECT proj4text FROM spatial_ref_sys WHERE srid = %d LIMIT 1", srid); - spi_result = SPI_exec(proj4_spi_buffer, 1); - - /* Read back the PROJ4 text */ - if (spi_result == SPI_OK_SELECT && SPI_processed > 0) - { - /* Select the first (and only tuple) */ - TupleDesc tupdesc = SPI_tuptable->tupdesc; - SPITupleTable *tuptable = SPI_tuptable; - HeapTuple tuple = tuptable->vals[0]; - - /* Make a projection object out of it */ - strncpy(proj_str, SPI_getvalue(tuple, tupdesc, 1), maxproj4len - 1); - } - else - { - elog(ERROR, "GetProj4StringSPI: Cannot find SRID (%d) in spatial_ref_sys", srid); - } - - spi_result = SPI_finish(); - if (spi_result != SPI_OK_FINISH) - { - elog(ERROR, "GetProj4StringSPI: Could not disconnect from database using SPI"); - } - - return proj_str; -} - - -/** -* Given an SRID, return the proj4 text. If the integer is less than zero, -* and one of the "well known" projections we support -* (WGS84 UTM N/S, Polar Stereographic N/S), return the proj4text -* for those. -*/ -static char* GetProj4String(int srid) -{ - static int maxproj4len = 512; - - /* SRIDs in SPATIAL_REF_SYS */ - if ( srid > 0 ) - { - return GetProj4StringSPI(srid); - } - /* Automagic SRIDs ( < 0, using abs(srid) = epsg# ) */ - else - { - char *proj_str = palloc(maxproj4len); - int id = abs(srid); - /* UTM North */ - if ( id >= 32601 && id <= 32660 ) - { - snprintf(proj_str, maxproj4len, "+proj=utm +zone=%d +ellps=WGS84 +datum=WGS84 +units=m +no_defs", id - 32600); - } - /* UTM South */ - else if ( id >= 32701 && id <= 32760 ) - { - snprintf(proj_str, maxproj4len, "+proj=utm +zone=%d +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs", id - 32700); - } - /* Lambert Azimuthal Equal Area South Pole */ - else if ( id == 3409 ) - { - strncpy(proj_str, "+proj=laea +lat_0=-90 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs", maxproj4len ); - } - /* Polar Sterographic South */ - else if ( id == 3031 ) - { - strncpy(proj_str, "+proj=stere +lat_0=-90 +lat_ts=-71 +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs", maxproj4len); - } - /* Lambert Azimuthal Equal Area North Pole */ - else if ( id == 3574 ) - { - strncpy(proj_str, "+proj=laea +lat_0=90 +lon_0=-40 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs", maxproj4len ); - } - /* Polar Stereographic North */ - else if ( id == 3995 ) - { - strncpy(proj_str, "+proj=stere +lat_0=90 +lat_ts=71 +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs", maxproj4len ); - } - /* World Mercator */ - else if ( id == 3395 ) - { - strncpy(proj_str, "+proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs", maxproj4len ); - } - else - { - elog(ERROR, "Cannot find SRID (%d) in spatial_ref_sys", srid); - return NULL; - } - - POSTGIS_DEBUGF(3, "returning on SRID=%d: %s", srid, proj_str); - return proj_str; - } -} - - -/** - * Add an entry to the local PROJ4 SRS cache. If we need to wrap around then - * we must make sure the entry we choose to delete does not contain other_srid - * which is the definition for the other half of the transformation. - */ -void -AddToPROJ4SRSCache(PROJ4PortalCache *PROJ4Cache, int srid, int other_srid) -{ - MemoryContext PJMemoryContext; - projPJ projection = NULL; - char *proj_str; - int* pj_errno_ref; - - /* - ** Turn the SRID number into a proj4 string, by reading from spatial_ref_sys - ** or instantiating a magical value from a negative srid. - */ - proj_str = GetProj4String(srid); - if ( ! proj_str ) - { - elog(ERROR, "GetProj4String returned NULL for SRID (%d)", srid); - } - - projection = make_project(proj_str); - - pj_errno_ref = pj_get_errno_ref(); - if ( (projection == NULL) || (*pj_errno_ref)) - { - /* we need this for error reporting */ - /*pfree(projection); */ - elog(ERROR, "AddToPROJ4SRSCache: couldn't parse proj4 string: '%s': %s", proj_str, pj_strerrno(*pj_errno_ref)); - } - - /* - * If the cache is already full then find the first entry - * that doesn't contain other_srid and use this as the - * subsequent value of PROJ4SRSCacheCount - */ - if (PROJ4Cache->PROJ4SRSCacheCount == PROJ4_CACHE_ITEMS) - { - bool found = false; - int i; - - for (i = 0; i < PROJ4_CACHE_ITEMS; i++) - { - if (PROJ4Cache->PROJ4SRSCache[i].srid != other_srid && found == false) - { - LWDEBUGF(3, "choosing to remove item from query cache with SRID %d and index %d", PROJ4Cache->PROJ4SRSCache[i].srid, i); - - DeleteFromPROJ4SRSCache(PROJ4Cache, PROJ4Cache->PROJ4SRSCache[i].srid); - PROJ4Cache->PROJ4SRSCacheCount = i; - - found = true; - } - } - } - - /* - * Now create a memory context for this projection and - * store it in the backend hash - */ - LWDEBUGF(3, "adding SRID %d with proj4text \"%s\" to query cache at index %d", srid, proj_str, PROJ4Cache->PROJ4SRSCacheCount); - - PJMemoryContext = MemoryContextCreate(T_AllocSetContext, 8192, - &PROJ4SRSCacheContextMethods, - PROJ4Cache->PROJ4SRSCacheContext, - "PostGIS PROJ4 PJ Memory Context"); - - /* Create the backend hash if it doesn't already exist */ - if (!PJHash) - PJHash = CreatePJHash(); - - /* - * Add the MemoryContext to the backend hash so we can - * clean up upon portal shutdown - */ - LWDEBUGF(3, "adding projection object (%p) to hash table with MemoryContext key (%p)", projection, PJMemoryContext); - - AddPJHashEntry(PJMemoryContext, projection); - - PROJ4Cache->PROJ4SRSCache[PROJ4Cache->PROJ4SRSCacheCount].srid = srid; - PROJ4Cache->PROJ4SRSCache[PROJ4Cache->PROJ4SRSCacheCount].projection = projection; - PROJ4Cache->PROJ4SRSCache[PROJ4Cache->PROJ4SRSCacheCount].projection_mcxt = PJMemoryContext; - PROJ4Cache->PROJ4SRSCacheCount++; - - /* Free the projection string */ - pfree(proj_str); - -} - - -void DeleteFromPROJ4SRSCache(PROJ4PortalCache *PROJ4Cache, int srid) -{ - /* - * Delete the SRID entry from the cache - */ - - int i; - - for (i = 0; i < PROJ4_CACHE_ITEMS; i++) - { - if (PROJ4Cache->PROJ4SRSCache[i].srid == srid) - { - LWDEBUGF(3, "removing query cache entry with SRID %d at index %d", srid, i); - - /* - * Zero out the entries and free the PROJ4 handle - * by deleting the memory context - */ - MemoryContextDelete(PROJ4Cache->PROJ4SRSCache[i].projection_mcxt); - PROJ4Cache->PROJ4SRSCache[i].projection = NULL; - PROJ4Cache->PROJ4SRSCache[i].projection_mcxt = NULL; - PROJ4Cache->PROJ4SRSCache[i].srid = -1; - } - } -} - - -/** - * Specify an alternate directory for the PROJ.4 grid files - * (this should augment the PROJ.4 compile-time path) - * - * It's main purpose is to allow Win32 PROJ.4 installations - * to find a set grid shift files, although other platforms - * may find this useful too. - * - * Note that we currently ignore this on PostgreSQL < 8.0 - * since the method of determining the current installation - * path are different on older PostgreSQL versions. - */ -void SetPROJ4LibPath(void) -{ - char *path; - const char **proj_lib_path; - - /* - * Get the sharepath and append /contrib/postgis/proj to form a suitable - * directory in which to store the grid shift files - */ - proj_lib_path = palloc(sizeof(char *)); - path = palloc(MAXPGPATH); - *proj_lib_path = path; - - get_share_path(my_exec_path, path); - strncat(path, "/contrib/postgis/proj", MAXPGPATH - strlen(path) - 1); - - /* Set the search path for PROJ.4 */ - pj_set_searchpath(1, proj_lib_path); - - /* Ensure we only do this once... */ - IsPROJ4LibPathSet = true; -} - - -/** convert decimal degress to radians */ -void -to_rad(POINT4D *pt) -{ - pt->x *= M_PI/180.0; - pt->y *= M_PI/180.0; -} - -/** convert radians to decimal degress */ -void -to_dec(POINT4D *pt) -{ - pt->x *= 180.0/M_PI; - pt->y *= 180.0/M_PI; -} - -/** given a string, make a PJ object */ -projPJ -make_project(char *str1) -{ - int t; - char *params[1024]; /* one for each parameter */ - char *loc; - char *str; - projPJ result; - - - if (str1 == NULL) return NULL; - - if (strlen(str1) == 0) return NULL; - - str = pstrdup(str1); - - /* - * first we split the string into a bunch of smaller strings, - * based on the " " separator - */ - - params[0] = str; /* 1st param, we'll null terminate at the " " soon */ - - loc = str; - t = 1; - while ((loc != NULL) && (*loc != 0) ) - { - loc = strchr(loc, ' '); - if (loc != NULL) - { - *loc = 0; /* null terminate */ - params[t] = loc+1; - loc++; /* next char */ - t++; /*next param */ - } - } - - if (!(result=pj_init(t, params))) - { - pfree(str); - return NULL; - } - pfree(str); - return result; -} - -/** - * Transform given SERIALIZED geometry - * from inpj projection to outpj projection - */ -static int -lwgeom_transform_recursive(uchar *geom, projPJ inpj, projPJ outpj) -{ - LWGEOM_INSPECTED *inspected = lwgeom_inspect(geom); - int j, i; - - for (j=0; jngeometries; j++) - { - LWLINE *line=NULL; - LWPOINT *point=NULL; - LWPOLY *poly=NULL; - LWCIRCSTRING *curve=NULL; - POINT4D p; - uchar *subgeom=NULL; - - point = lwgeom_getpoint_inspected(inspected,j); - if (point != NULL) - { - getPoint4d_p(point->point, 0, &p); - transform_point(&p, inpj, outpj); - setPoint4d(point->point, 0, &p); - lwgeom_release((LWGEOM *)point); - continue; - } - - line = lwgeom_getline_inspected(inspected, j); - if (line != NULL) - { - POINTARRAY *pts = line->points; - for (i=0; inpoints; i++) - { - getPoint4d_p(pts, i, &p); - transform_point(&p, inpj, outpj); - setPoint4d(pts, i, &p); - } - lwgeom_release((LWGEOM *)line); - continue; - } - - poly = lwgeom_getpoly_inspected(inspected, j); - if (poly !=NULL) - { - for (i=0; inrings; i++) - { - int pi; - POINTARRAY *pts = poly->rings[i]; - for (pi=0; pinpoints; pi++) - { - getPoint4d_p(pts, pi, &p); - transform_point(&p, inpj, outpj); - setPoint4d(pts, pi, &p); - } - } - lwgeom_release((LWGEOM *)poly); - continue; - } - - curve = lwgeom_getcircstring_inspected(inspected, j); - if (curve != NULL) - { - POINTARRAY *pts = curve->points; - for (i=0; inpoints; i++) - { - getPoint4d_p(pts, i, &p); - transform_point(&p, inpj, outpj); - setPoint4d(pts, i, &p); - } - lwgeom_release((LWGEOM *)curve); - continue; - } - - subgeom = lwgeom_getsubgeometry_inspected(inspected, j); - if ( subgeom != NULL ) - { - if (!lwgeom_transform_recursive(subgeom, inpj, outpj)) - { - lwinspected_release(inspected); - return 0; - } - continue; - } - else - { - lwinspected_release(inspected); - lwerror("lwgeom_getsubgeometry_inspected returned NULL"); - return 0; - } - } - - lwinspected_release(inspected); - return 1; -} - - - /** * transform( GEOMETRY, INT (output srid) ) @@ -782,124 +33,61 @@ PG_FUNCTION_INFO_V1(transform); Datum transform(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom; - PG_LWGEOM *result=NULL; + GSERIALIZED *geom; + GSERIALIZED *result=NULL; LWGEOM *lwgeom; projPJ input_pj, output_pj; - int32 result_srid ; - uchar *srl; - - PROJ4PortalCache *PROJ4Cache = NULL; + int32 output_srid, input_srid; - - result_srid = PG_GETARG_INT32(1); - if (result_srid == -1) + output_srid = PG_GETARG_INT32(1); + if (output_srid == SRID_UNKNOWN) { - elog(ERROR,"-1 is an invalid target SRID"); + elog(ERROR,"%d is an invalid target SRID",SRID_UNKNOWN); PG_RETURN_NULL(); } - geom = (PG_LWGEOM *)PG_DETOAST_DATUM_COPY(PG_GETARG_DATUM(0)); - if (pglwgeom_getSRID(geom) == -1) + geom = (GSERIALIZED *)PG_DETOAST_DATUM_COPY(PG_GETARG_DATUM(0)); + input_srid = gserialized_get_srid(geom); + if ( input_srid == SRID_UNKNOWN ) { PG_FREE_IF_COPY(geom, 0); - elog(ERROR,"Input geometry has unknown (-1) SRID"); + elog(ERROR,"Input geometry has unknown (%d) SRID",SRID_UNKNOWN); PG_RETURN_NULL(); } - /* Set the search path if we haven't already */ - if (!IsPROJ4LibPathSet) - SetPROJ4LibPath(); - /* * If input SRID and output SRID are equal, return geometry * without transform it */ - if (pglwgeom_getSRID(geom) == result_srid) - { - pfree(geom); + if ( input_srid == output_srid ) PG_RETURN_POINTER(PG_GETARG_DATUM(0)); - } - - /* - * If we have not already created PROJ4 cache for this portal - * then create it - */ - if (fcinfo->flinfo->fn_extra == NULL) - { - MemoryContext old_context; - old_context = MemoryContextSwitchTo(fcinfo->flinfo->fn_mcxt); - PROJ4Cache = palloc(sizeof(PROJ4PortalCache)); - MemoryContextSwitchTo(old_context); - - if (PROJ4Cache) - { - int i; - - POSTGIS_DEBUGF(3, "Allocating PROJ4Cache for portal with transform() MemoryContext %p", fcinfo->flinfo->fn_mcxt); - /* Put in any required defaults */ - for (i = 0; i < PROJ4_CACHE_ITEMS; i++) - { - PROJ4Cache->PROJ4SRSCache[i].srid = -1; - PROJ4Cache->PROJ4SRSCache[i].projection = NULL; - PROJ4Cache->PROJ4SRSCache[i].projection_mcxt = NULL; - } - PROJ4Cache->PROJ4SRSCacheCount = 0; - PROJ4Cache->PROJ4SRSCacheContext = fcinfo->flinfo->fn_mcxt; - - /* Store the pointer in fcinfo->flinfo->fn_extra */ - fcinfo->flinfo->fn_extra = PROJ4Cache; - } - } - else + if ( GetProjectionsUsingFCInfo(fcinfo, input_srid, output_srid, &input_pj, &output_pj) == LW_FAILURE ) { - /* Use the existing cache */ - PROJ4Cache = fcinfo->flinfo->fn_extra; + PG_FREE_IF_COPY(geom, 0); + elog(ERROR,"Failure reading projections from spatial_ref_sys."); + PG_RETURN_NULL(); } - - /* Add the output srid to the cache if it's not already there */ - if (!IsInPROJ4SRSCache(PROJ4Cache, result_srid)) - AddToPROJ4SRSCache(PROJ4Cache, result_srid, pglwgeom_getSRID(geom)); - - /* Get the output projection */ - output_pj = GetProjectionFromPROJ4SRSCache(PROJ4Cache, result_srid); - - /* Add the input srid to the cache if it's not already there */ - if (!IsInPROJ4SRSCache(PROJ4Cache, pglwgeom_getSRID(geom))) - AddToPROJ4SRSCache(PROJ4Cache, pglwgeom_getSRID(geom), result_srid); - - /* Get the input projection */ - input_pj = GetProjectionFromPROJ4SRSCache(PROJ4Cache, pglwgeom_getSRID(geom)); - - + /* now we have a geometry, and input/output PJ structs. */ - lwgeom_transform_recursive(SERIALIZED_FORM(geom), - input_pj, output_pj); - - srl = SERIALIZED_FORM(geom); + lwgeom = lwgeom_from_gserialized(geom); + lwgeom_transform(lwgeom, input_pj, output_pj); + lwgeom->srid = output_srid; /* Re-compute bbox if input had one (COMPUTE_BBOX TAINTING) */ - if ( TYPE_HASBBOX(geom->type) ) + if ( lwgeom->bbox ) { - lwgeom = lwgeom_deserialize(srl); lwgeom_drop_bbox(lwgeom); - lwgeom->bbox = lwgeom_compute_box2d(lwgeom); - lwgeom->SRID = result_srid; - result = pglwgeom_serialize(lwgeom); - lwgeom_release(lwgeom); - } - else - { - result = PG_LWGEOM_construct(srl, result_srid, 0); + lwgeom_add_bbox(lwgeom); } - pfree(geom); + result = geometry_serialize(lwgeom); + lwgeom_free(lwgeom); + PG_FREE_IF_COPY(geom, 0); PG_RETURN_POINTER(result); /* new geometry */ } - /** * Transform_geom( GEOMETRY, TEXT (input proj4), TEXT (output proj4), * INT (output srid) @@ -911,106 +99,102 @@ PG_FUNCTION_INFO_V1(transform_geom); Datum transform_geom(PG_FUNCTION_ARGS) { - PG_LWGEOM *geom; - PG_LWGEOM *result=NULL; + GSERIALIZED *geom; + GSERIALIZED *result=NULL; LWGEOM *lwgeom; projPJ input_pj, output_pj; char *input_proj4, *output_proj4; text *input_proj4_text; text *output_proj4_text; int32 result_srid ; - uchar *srl; - int* pj_errno_ref; + char *pj_errstr; + result_srid = PG_GETARG_INT32(3); - if (result_srid == -1) + if (result_srid == SRID_UNKNOWN) { - elog(ERROR,"tranform: destination SRID = -1"); + elog(ERROR,"tranform: destination SRID = %d",SRID_UNKNOWN); PG_RETURN_NULL(); } - geom = (PG_LWGEOM *)PG_DETOAST_DATUM_COPY(PG_GETARG_DATUM(0)); - if (pglwgeom_getSRID(geom) == -1) + geom = (GSERIALIZED *)PG_DETOAST_DATUM_COPY(PG_GETARG_DATUM(0)); + if (gserialized_get_srid(geom) == SRID_UNKNOWN) { pfree(geom); - elog(ERROR,"tranform: source SRID = -1"); + elog(ERROR,"transform_geom: source SRID = %d",SRID_UNKNOWN); PG_RETURN_NULL(); } /* Set the search path if we haven't already */ - if (!IsPROJ4LibPathSet) - SetPROJ4LibPath(); + SetPROJ4LibPath(); + /* Read the arguments */ input_proj4_text = (PG_GETARG_TEXT_P(1)); output_proj4_text = (PG_GETARG_TEXT_P(2)); - input_proj4 = (char *)palloc(VARSIZE(input_proj4_text)+1-4); - memcpy(input_proj4, VARDATA(input_proj4_text), - VARSIZE(input_proj4_text)-VARHDRSZ); - input_proj4[VARSIZE(input_proj4_text)-VARHDRSZ] = 0; /* null terminate */ - - output_proj4 = (char *) palloc(VARSIZE(output_proj4_text) +1-VARHDRSZ); - memcpy(output_proj4, VARDATA(output_proj4_text), - VARSIZE(output_proj4_text)-VARHDRSZ); - output_proj4[VARSIZE(output_proj4_text)-VARHDRSZ] = 0; /* null terminate */ + /* Convert from text to cstring for libproj */ + input_proj4 = text2cstring(input_proj4_text); + output_proj4 = text2cstring(output_proj4_text); /* make input and output projection objects */ - input_pj = make_project(input_proj4); - - pj_errno_ref = pj_get_errno_ref(); - if ( (input_pj == NULL) || (*pj_errno_ref)) + input_pj = lwproj_from_string(input_proj4); + if ( input_pj == NULL ) { + pj_errstr = pj_strerrno(*pj_get_errno_ref()); + if ( ! pj_errstr ) pj_errstr = ""; + /* we need this for error reporting */ /* pfree(input_proj4); */ - pfree(output_proj4); pfree(geom); - elog(ERROR, "transform: couldn't parse proj4 input string: '%s': %s", input_proj4, pj_strerrno(*pj_errno_ref)); + + elog(ERROR, + "transform_geom: could not parse proj4 string '%s' %s", + input_proj4, pj_errstr); PG_RETURN_NULL(); } pfree(input_proj4); - output_pj = make_project(output_proj4); + output_pj = lwproj_from_string(output_proj4); - pj_errno_ref = pj_get_errno_ref(); - if ((output_pj == NULL)|| (*pj_errno_ref)) + if ( output_pj == NULL ) { + pj_errstr = pj_strerrno(*pj_get_errno_ref()); + if ( ! pj_errstr ) pj_errstr = ""; + /* we need this for error reporting */ /* pfree(output_proj4); */ pj_free(input_pj); pfree(geom); - elog(ERROR, "transform: couldn't parse proj4 output string: '%s': %s", output_proj4, pj_strerrno(*pj_errno_ref)); + + elog(ERROR, + "transform_geom: couldn't parse proj4 output string: '%s': %s", + output_proj4, pj_errstr); PG_RETURN_NULL(); } pfree(output_proj4); /* now we have a geometry, and input/output PJ structs. */ - lwgeom_transform_recursive(SERIALIZED_FORM(geom), - input_pj, output_pj); + lwgeom = lwgeom_from_gserialized(geom); + lwgeom_transform(lwgeom, input_pj, output_pj); + lwgeom->srid = result_srid; /* clean up */ pj_free(input_pj); pj_free(output_pj); - srl = SERIALIZED_FORM(geom); - /* Re-compute bbox if input had one (COMPUTE_BBOX TAINTING) */ - if ( TYPE_HASBBOX(geom->type) ) + if ( lwgeom->bbox ) { - lwgeom = lwgeom_deserialize(srl); lwgeom_drop_bbox(lwgeom); - lwgeom->bbox = lwgeom_compute_box2d(lwgeom); - lwgeom->SRID = result_srid; - result = pglwgeom_serialize(lwgeom); - lwgeom_release(lwgeom); - } - else - { - result = PG_LWGEOM_construct(srl, result_srid, 0); + lwgeom_add_bbox(lwgeom); } - pfree(geom); + result = geometry_serialize(lwgeom); + + lwgeom_free(lwgeom); + PG_FREE_IF_COPY(geom, 0); PG_RETURN_POINTER(result); /* new geometry */ } @@ -1020,55 +204,6 @@ Datum postgis_proj_version(PG_FUNCTION_ARGS) { const char *ver = pj_get_release(); - text *result; - result = (text *) palloc(VARHDRSZ + strlen(ver)); - SET_VARSIZE(result, VARHDRSZ + strlen(ver)); - memcpy(VARDATA(result), ver, strlen(ver)); + text *result = cstring2text(ver); PG_RETURN_POINTER(result); } - - -int -transform_point(POINT4D *pt, projPJ srcpj, projPJ dstpj) -{ - int* pj_errno_ref; - POINT4D orig_pt; - - /* Make a copy of the input point so we can report the original should an error occur */ - orig_pt.x = pt->x; - orig_pt.y = pt->y; - orig_pt.z = pt->z; - - if (pj_is_latlong(srcpj)) to_rad(pt); - - /* Perform the transform */ - pj_transform(srcpj, dstpj, 1, 0, &(pt->x), &(pt->y), &(pt->z)); - - /* For NAD grid-shift errors, display an error message with an additional hint */ - pj_errno_ref = pj_get_errno_ref(); - - if (*pj_errno_ref != 0) - { - if (*pj_errno_ref == -38) - { - ereport(ERROR, ( - errmsg_internal("transform: couldn't project point (%g %g %g): %s (%d)", - orig_pt.x, orig_pt.y, orig_pt.z, pj_strerrno(*pj_errno_ref), *pj_errno_ref), - errhint("PostGIS was unable to transform the point because either no grid shift files were found, or the point does not lie within the range for which the grid shift is defined. Refer to the ST_Transform() section of the PostGIS manual for details on how to configure PostGIS to alter this behaviour.") - )); - return 0; - } - else - { - elog(ERROR, "transform: couldn't project point (%g %g %g): %s (%d)", - orig_pt.x, orig_pt.y, orig_pt.z, pj_strerrno(*pj_errno_ref), *pj_errno_ref); - return 0; - } - } - - if (pj_is_latlong(dstpj)) to_dec(pt); - return 1; -} - - - diff -Nru postgis-1.5.3/postgis/lwgeom_transform.h postgis-2.0.1/postgis/lwgeom_transform.h --- postgis-1.5.3/postgis/lwgeom_transform.h 2009-10-29 18:40:34.000000000 +0000 +++ postgis-2.0.1/postgis/lwgeom_transform.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -/********************************************************************** - * $Id: lwgeom_transform.h 4698 2009-10-29 18:40:34Z colivier $ - * - * PostGIS - Spatial Types for PostgreSQL - * http://postgis.refractions.net - * Copyright 2001-2003 Refractions Research Inc. - * - * This is free software; you can redistribute and/or modify it under - * the terms of the GNU General Public Licence. See the COPYING file. - * - **********************************************************************/ - -#include "postgres.h" -#include "liblwgeom.h" -#include "lwgeom_pg.h" -#include "proj_api.h" - -projPJ make_project(char *str1); -int transform_point(POINT4D *pt, projPJ srcdefn, projPJ dstdefn); -char* GetProj4StringSPI(int srid); diff -Nru postgis-1.5.3/postgis/lwgeom_triggers.c postgis-2.0.1/postgis/lwgeom_triggers.c --- postgis-1.5.3/postgis/lwgeom_triggers.c 2009-06-11 16:44:03.000000000 +0000 +++ postgis-2.0.1/postgis/lwgeom_triggers.c 2012-05-16 08:29:14.000000000 +0000 @@ -1,7 +1,22 @@ +/********************************************************************** + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * + * Copyright (C) 2004 Refractions Research Inc. + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + #include "postgres.h" #include "executor/spi.h" /* this is what you need to work with SPI */ #include "commands/trigger.h" /* ... and triggers */ + +#include "../postgis_config.h" #include "lwgeom_pg.h" +#include "utils/rel.h" Datum cache_bbox(PG_FUNCTION_ARGS); diff -Nru postgis-1.5.3/postgis/pgsql_compat.h postgis-2.0.1/postgis/pgsql_compat.h --- postgis-1.5.3/postgis/pgsql_compat.h 2008-06-29 19:19:06.000000000 +0000 +++ postgis-2.0.1/postgis/pgsql_compat.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ -#ifndef _PGSQL_COMPAT_H - -/* Make sure PG_NARGS is defined for older PostgreSQL versions */ -#ifndef PG_NARGS -#define PG_NARGS() (fcinfo->nargs) -#endif - -/* Define ARR_OVERHEAD_NONULLS for PostgreSQL < 8.2 */ -#if POSTGIS_PGSQL_VERSION < 82 -#define ARR_OVERHEAD_NONULLS(x) ARR_OVERHEAD((x)) -#endif - -/* PostgreSQL < 8.3 uses VARATT_SIZEP rather than SET_VARSIZE for varlena types */ -#if POSTGIS_PGSQL_VERSION < 83 -#define SET_VARSIZE(var, size) VARATT_SIZEP(var) = size -#endif - -#endif /* _PGSQL_COMPAT_H */ diff -Nru postgis-1.5.3/postgis/postgis.sql.in.c postgis-2.0.1/postgis/postgis.sql.in.c --- postgis-1.5.3/postgis/postgis.sql.in.c 2011-06-10 16:55:53.000000000 +0000 +++ postgis-2.0.1/postgis/postgis.sql.in.c 2012-06-12 13:04:49.000000000 +0000 @@ -1,6 +1,6 @@ -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- --- $Id: postgis.sql.in.c 7360 2011-06-10 16:55:53Z robe $ +-- $Id: postgis.sql.in.c 9900 2012-06-12 13:04:49Z strk $ -- -- PostGIS - Spatial Types for PostgreSQL -- http://postgis.refractions.net @@ -21,37 +21,24 @@ #include "sqldefines.h" --- INSTALL VERSION: POSTGIS_LIB_VERSION - SET client_min_messages TO warning; +-- INSTALL VERSION: POSTGIS_LIB_VERSION + BEGIN; ------------------------------------------------------------------- -- SPHEROID TYPE ------------------------------------------------------------------- - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_spheroid_in(cstring) - RETURNS spheroid - AS 'MODULE_PATHNAME','ellipsoid_in' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_spheroid_out(spheroid) - RETURNS cstring - AS 'MODULE_PATHNAME','ellipsoid_out' - LANGUAGE 'C' IMMUTABLE STRICT; - CREATE OR REPLACE FUNCTION spheroid_in(cstring) RETURNS spheroid AS 'MODULE_PATHNAME','ellipsoid_in' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; CREATE OR REPLACE FUNCTION spheroid_out(spheroid) RETURNS cstring AS 'MODULE_PATHNAME','ellipsoid_out' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; CREATE TYPE spheroid ( alignment = double, @@ -63,61 +50,42 @@ ------------------------------------------------------------------- -- GEOMETRY TYPE (lwgeom) ------------------------------------------------------------------- - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_geometry_in(cstring) +CREATE OR REPLACE FUNCTION geometry_in(cstring) RETURNS geometry AS 'MODULE_PATHNAME','LWGEOM_in' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_geometry_out(geometry) +CREATE OR REPLACE FUNCTION geometry_out(geometry) RETURNS cstring AS 'MODULE_PATHNAME','LWGEOM_out' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_geometry_analyze(internal) - RETURNS bool - AS 'MODULE_PATHNAME', 'LWGEOM_analyze' - LANGUAGE 'C' VOLATILE STRICT; - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_geometry_recv(internal) - RETURNS geometry - AS 'MODULE_PATHNAME','LWGEOM_recv' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_geometry_send(geometry) - RETURNS bytea - AS 'MODULE_PATHNAME','LWGEOM_send' - LANGUAGE 'C' IMMUTABLE STRICT; - -CREATE OR REPLACE FUNCTION geometry_in(cstring) - RETURNS geometry - AS 'MODULE_PATHNAME','LWGEOM_in' - LANGUAGE 'C' IMMUTABLE STRICT; +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION geometry_typmod_in(cstring[]) + RETURNS integer + AS 'MODULE_PATHNAME','geometry_typmod_in' + LANGUAGE 'c' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION geometry_out(geometry) +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION geometry_typmod_out(integer) RETURNS cstring - AS 'MODULE_PATHNAME','LWGEOM_out' - LANGUAGE 'C' IMMUTABLE STRICT; + AS 'MODULE_PATHNAME','postgis_typmod_out' + LANGUAGE 'c' IMMUTABLE STRICT; CREATE OR REPLACE FUNCTION geometry_analyze(internal) RETURNS bool - AS 'MODULE_PATHNAME', 'LWGEOM_analyze' - LANGUAGE 'C' VOLATILE STRICT; + AS 'MODULE_PATHNAME', 'geometry_analyze_2d' + LANGUAGE 'c' VOLATILE STRICT; CREATE OR REPLACE FUNCTION geometry_recv(internal) RETURNS geometry AS 'MODULE_PATHNAME','LWGEOM_recv' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; CREATE OR REPLACE FUNCTION geometry_send(geometry) RETURNS bytea AS 'MODULE_PATHNAME','LWGEOM_send' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; CREATE TYPE geometry ( internallength = variable, @@ -125,452 +93,185 @@ output = geometry_out, send = geometry_send, receive = geometry_recv, + typmod_in = geometry_typmod_in, + typmod_out = geometry_typmod_out, delimiter = ':', + alignment = double, analyze = geometry_analyze, storage = main ); -------------------------------------------- --- Affine transforms -------------------------------------------- - --- Availability: 1.1.2 --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION Affine(geometry,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_affine' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_Affine(geometry,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_affine' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Availability: 1.1.2 --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION Affine(geometry,float8,float8,float8,float8,float8,float8) - RETURNS geometry - AS 'SELECT affine($1, $2, $3, 0, $4, $5, 0, 0, 0, 1, $6, $7, 0)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_Affine(geometry,float8,float8,float8,float8,float8,float8) - RETURNS geometry - AS 'SELECT affine($1, $2, $3, 0, $4, $5, 0, 0, 0, 1, $6, $7, 0)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Availability: 1.1.2 --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION RotateZ(geometry,float8) - RETURNS geometry - AS 'SELECT affine($1, cos($2), -sin($2), 0, sin($2), cos($2), 0, 0, 0, 1, 0, 0, 0)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_RotateZ(geometry,float8) - RETURNS geometry - AS 'SELECT affine($1, cos($2), -sin($2), 0, sin($2), cos($2), 0, 0, 0, 1, 0, 0, 0)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Availability: 1.1.2 --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION Rotate(geometry,float8) - RETURNS geometry - AS 'SELECT rotateZ($1, $2)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_Rotate(geometry,float8) - RETURNS geometry - AS 'SELECT rotateZ($1, $2)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Availability: 1.1.2 --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION RotateX(geometry,float8) - RETURNS geometry - AS 'SELECT affine($1, 1, 0, 0, 0, cos($2), -sin($2), 0, sin($2), cos($2), 0, 0, 0)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_RotateX(geometry,float8) - RETURNS geometry - AS 'SELECT affine($1, 1, 0, 0, 0, cos($2), -sin($2), 0, sin($2), cos($2), 0, 0, 0)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Availability: 1.1.2 --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION RotateY(geometry,float8) - RETURNS geometry - AS 'SELECT affine($1, cos($2), 0, sin($2), 0, 1, 0, -sin($2), 0, cos($2), 0, 0, 0)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_RotateY(geometry,float8) - RETURNS geometry - AS 'SELECT affine($1, cos($2), 0, sin($2), 0, 1, 0, -sin($2), 0, cos($2), 0, 0, 0)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION Translate(geometry,float8,float8,float8) - RETURNS geometry - AS 'SELECT affine($1, 1, 0, 0, 0, 1, 0, 0, 0, 1, $2, $3, $4)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_Translate(geometry,float8,float8,float8) - RETURNS geometry - AS 'SELECT affine($1, 1, 0, 0, 0, 1, 0, 0, 0, 1, $2, $3, $4)' - LANGUAGE 'SQL' IMMUTABLE STRICT; --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION Translate(geometry,float8,float8) +-- Availability: 2.0.0 +-- Special cast for enforcing the typmod restrictions +CREATE OR REPLACE FUNCTION geometry(geometry, integer, boolean) RETURNS geometry - AS 'SELECT translate($1, $2, $3, 0)' - LANGUAGE 'SQL' IMMUTABLE STRICT; + AS 'MODULE_PATHNAME','geometry_enforce_typmod' + LANGUAGE 'c' IMMUTABLE STRICT; --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_Translate(geometry,float8,float8) - RETURNS geometry - AS 'SELECT translate($1, $2, $3, 0)' - LANGUAGE 'SQL' IMMUTABLE STRICT; +-- Availability: 2.0.0 +CREATE CAST (geometry AS geometry) WITH FUNCTION geometry(geometry, integer, boolean) AS IMPLICIT; --- Availability: 1.1.0 --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION Scale(geometry,float8,float8,float8) - RETURNS geometry - AS 'SELECT affine($1, $2, 0, 0, 0, $3, 0, 0, 0, $4, 0, 0, 0)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_Scale(geometry,float8,float8,float8) - RETURNS geometry - AS 'SELECT affine($1, $2, 0, 0, 0, $3, 0, 0, 0, $4, 0, 0, 0)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Availability: 1.1.0 --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION Scale(geometry,float8,float8) - RETURNS geometry - AS 'SELECT scale($1, $2, $3, 1)' - LANGUAGE 'SQL' IMMUTABLE STRICT; --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_Scale(geometry,float8,float8) - RETURNS geometry - AS 'SELECT scale($1, $2, $3, 1)' - LANGUAGE 'SQL' IMMUTABLE STRICT; +------------------------------------------------------------------- +-- BOX3D TYPE +-- Point coordinate data access +------------------------------------------- +-- PostGIS equivalent function: X(geometry) +CREATE OR REPLACE FUNCTION ST_X(geometry) + RETURNS float8 + AS 'MODULE_PATHNAME','LWGEOM_x_point' + LANGUAGE 'c' IMMUTABLE STRICT; --- Availability: 1.1.0 --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION transscale(geometry,float8,float8,float8,float8) - RETURNS geometry - AS 'SELECT affine($1, $4, 0, 0, 0, $5, 0, - 0, 0, 1, $2 * $4, $3 * $5, 0)' - LANGUAGE 'SQL' IMMUTABLE STRICT; +-- PostGIS equivalent function: Y(geometry) +CREATE OR REPLACE FUNCTION ST_Y(geometry) + RETURNS float8 + AS 'MODULE_PATHNAME','LWGEOM_y_point' + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_transscale(geometry,float8,float8,float8,float8) - RETURNS geometry - AS 'SELECT affine($1, $4, 0, 0, 0, $5, 0, - 0, 0, 1, $2 * $4, $3 * $5, 0)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Availability: 1.1.0 --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION shift_longitude(geometry) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_longitude_shift' - LANGUAGE 'C' IMMUTABLE STRICT; +CREATE OR REPLACE FUNCTION ST_Z(geometry) + RETURNS float8 + AS 'MODULE_PATHNAME','LWGEOM_z_point' + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_shift_longitude(geometry) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_longitude_shift' - LANGUAGE 'C' IMMUTABLE STRICT; +CREATE OR REPLACE FUNCTION ST_M(geometry) + RETURNS float8 + AS 'MODULE_PATHNAME','LWGEOM_m_point' + LANGUAGE 'c' IMMUTABLE STRICT; +------------------------------------------- ------------------------------------------------------------------- --- BOX3D TYPE -------------------------------------------------------------------- - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_box3d_in(cstring) - RETURNS box3d - AS 'MODULE_PATHNAME', 'BOX3D_in' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_box3d_out(box3d) - RETURNS cstring - AS 'MODULE_PATHNAME', 'BOX3D_out' - LANGUAGE 'C' IMMUTABLE STRICT; CREATE OR REPLACE FUNCTION box3d_in(cstring) RETURNS box3d AS 'MODULE_PATHNAME', 'BOX3D_in' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; CREATE OR REPLACE FUNCTION box3d_out(box3d) RETURNS cstring AS 'MODULE_PATHNAME', 'BOX3D_out' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; CREATE TYPE box3d ( alignment = double, - internallength = 48, + internallength = 52, input = box3d_in, output = box3d_out ); --- Temporary box3d aggregate type to retain full double precision --- for ST_Extent(). Should be removed when we change the output --- type of ST_Extent() to return something other than BOX2DFLOAT4. -CREATE OR REPLACE FUNCTION box3d_extent_in(cstring) - RETURNS box3d_extent - AS 'MODULE_PATHNAME', 'BOX3D_in' - LANGUAGE 'C' IMMUTABLE STRICT; - -CREATE OR REPLACE FUNCTION box3d_extent_out(box3d_extent) - RETURNS cstring - AS 'MODULE_PATHNAME', 'BOX3D_extent_out' - LANGUAGE 'C' IMMUTABLE STRICT; - -CREATE TYPE box3d_extent ( - alignment = double, - internallength = 48, - input = box3d_extent_in, - output = box3d_extent_out -); - --- Availability: 1.4.0 -CREATE OR REPLACE FUNCTION box3d_extent(box3d_extent) - RETURNS box3d - AS 'MODULE_PATHNAME', 'BOX3D_extent_to_BOX3D' - LANGUAGE 'C' IMMUTABLE STRICT; - -CREATE OR REPLACE FUNCTION box2d(box3d_extent) - RETURNS box2d - AS 'MODULE_PATHNAME', 'BOX3D_to_BOX2DFLOAT4' - LANGUAGE 'C' IMMUTABLE STRICT; - -CREATE OR REPLACE FUNCTION geometry(box3d_extent) - RETURNS geometry - AS 'MODULE_PATHNAME','BOX3D_to_LWGEOM' - LANGUAGE 'C' IMMUTABLE STRICT; - --- End of temporary hack - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION xmin(box3d) - RETURNS FLOAT8 - AS 'MODULE_PATHNAME','BOX3D_xmin' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_XMin(box3d) - RETURNS FLOAT8 - AS 'MODULE_PATHNAME','BOX3D_xmin' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION ymin(box3d) - RETURNS FLOAT8 - AS 'MODULE_PATHNAME','BOX3D_ymin' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_YMin(box3d) - RETURNS FLOAT8 - AS 'MODULE_PATHNAME','BOX3D_ymin' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION zmin(box3d) - RETURNS FLOAT8 - AS 'MODULE_PATHNAME','BOX3D_zmin' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_ZMin(box3d) - RETURNS FLOAT8 - AS 'MODULE_PATHNAME','BOX3D_zmin' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION xmax(box3d) - RETURNS FLOAT8 - AS 'MODULE_PATHNAME','BOX3D_xmax' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_XMax(box3d) - RETURNS FLOAT8 - AS 'MODULE_PATHNAME','BOX3D_xmax' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION ymax(box3d) - RETURNS FLOAT8 - AS 'MODULE_PATHNAME','BOX3D_ymax' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_YMax(box3d) - RETURNS FLOAT8 - AS 'MODULE_PATHNAME','BOX3D_ymax' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION zmax(box3d) - RETURNS FLOAT8 - AS 'MODULE_PATHNAME','BOX3D_zmax' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_ZMax(box3d) - RETURNS FLOAT8 - AS 'MODULE_PATHNAME','BOX3D_zmax' - LANGUAGE 'C' IMMUTABLE STRICT; - -------------------------------------------------------------------- --- CHIP TYPE -------------------------------------------------------------------- - -CREATE OR REPLACE FUNCTION chip_in(cstring) - RETURNS chip - AS 'MODULE_PATHNAME','CHIP_in' - LANGUAGE 'C' IMMUTABLE STRICT; - -CREATE OR REPLACE FUNCTION chip_out(chip) - RETURNS cstring - AS 'MODULE_PATHNAME','CHIP_out' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION ST_chip_in(cstring) - RETURNS chip - AS 'MODULE_PATHNAME','CHIP_in' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION ST_chip_out(chip) - RETURNS cstring - AS 'MODULE_PATHNAME','CHIP_out' - LANGUAGE 'C' IMMUTABLE STRICT; - -CREATE TYPE chip ( - alignment = double, - internallength = variable, - input = chip_in, - output = chip_out, - storage = extended -); - ----------------------------------------------------------------------- -- BOX2D ----------------------------------------------------------------------- - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_box2d_in(cstring) - RETURNS box2d - AS 'MODULE_PATHNAME','BOX2DFLOAT4_in' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_box2d_out(box2d) - RETURNS cstring - AS 'MODULE_PATHNAME','BOX2DFLOAT4_out' - LANGUAGE 'C' IMMUTABLE STRICT; - CREATE OR REPLACE FUNCTION box2d_in(cstring) RETURNS box2d - AS 'MODULE_PATHNAME','BOX2DFLOAT4_in' - LANGUAGE 'C' IMMUTABLE STRICT; + AS 'MODULE_PATHNAME','BOX2D_in' + LANGUAGE 'c' IMMUTABLE STRICT; CREATE OR REPLACE FUNCTION box2d_out(box2d) RETURNS cstring - AS 'MODULE_PATHNAME','BOX2DFLOAT4_out' - LANGUAGE 'C' IMMUTABLE STRICT; + AS 'MODULE_PATHNAME','BOX2D_out' + LANGUAGE 'c' IMMUTABLE STRICT; CREATE TYPE box2d ( - internallength = 16, + internallength = 65, input = box2d_in, output = box2d_out, storage = plain ); - ------------------------------------------------------------------- --- BTREE indexes +-- BOX2DF TYPE (INTERNAL ONLY) ------------------------------------------------------------------- +-- +-- Box2Df type is used by the GiST index bindings. +-- In/out functions are stubs, as all access should be internal. +--- +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION box2df_in(cstring) + RETURNS box2df + AS 'MODULE_PATHNAME','box2df_in' + LANGUAGE 'c' IMMUTABLE STRICT; --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_geometry_lt(geometry, geometry) - RETURNS bool - AS 'MODULE_PATHNAME', 'lwgeom_lt' - LANGUAGE 'C' IMMUTABLE STRICT; +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION box2df_out(box2df) + RETURNS cstring + AS 'MODULE_PATHNAME','box2df_out' + LANGUAGE 'c' IMMUTABLE STRICT; --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_geometry_le(geometry, geometry) - RETURNS bool - AS 'MODULE_PATHNAME', 'lwgeom_le' - LANGUAGE 'C' IMMUTABLE STRICT; +-- Availability: 2.0.0 +CREATE TYPE box2df ( + internallength = 16, + input = box2df_in, + output = box2df_out, + storage = plain, + alignment = double +); --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_geometry_gt(geometry, geometry) - RETURNS bool - AS 'MODULE_PATHNAME', 'lwgeom_gt' - LANGUAGE 'C' IMMUTABLE STRICT; --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_geometry_ge(geometry, geometry) - RETURNS bool - AS 'MODULE_PATHNAME', 'lwgeom_ge' - LANGUAGE 'C' IMMUTABLE STRICT; +------------------------------------------------------------------- +-- GIDX TYPE (INTERNAL ONLY) +------------------------------------------------------------------- +-- +-- GIDX type is used by the N-D and GEOGRAPHY GiST index bindings. +-- In/out functions are stubs, as all access should be internal. +--- --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_geometry_eq(geometry, geometry) - RETURNS bool - AS 'MODULE_PATHNAME', 'lwgeom_eq' - LANGUAGE 'C' IMMUTABLE STRICT; +-- Availability: 1.5.0 +CREATE OR REPLACE FUNCTION gidx_in(cstring) + RETURNS gidx + AS 'MODULE_PATHNAME','gidx_in' + LANGUAGE 'c' IMMUTABLE STRICT; --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_geometry_cmp(geometry, geometry) - RETURNS integer - AS 'MODULE_PATHNAME', 'lwgeom_cmp' - LANGUAGE 'C' IMMUTABLE STRICT; +-- Availability: 1.5.0 +CREATE OR REPLACE FUNCTION gidx_out(gidx) + RETURNS cstring + AS 'MODULE_PATHNAME','gidx_out' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Availability: 1.5.0 +CREATE TYPE gidx ( + internallength = variable, + input = gidx_in, + output = gidx_out, + storage = plain, + alignment = double +); -CREATE OR REPLACE FUNCTION geometry_lt(geometry, geometry) +------------------------------------------------------------------- +-- BTREE indexes +------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION geometry_lt(geom1 geometry, geom2 geometry) RETURNS bool AS 'MODULE_PATHNAME', 'lwgeom_lt' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION geometry_le(geometry, geometry) +CREATE OR REPLACE FUNCTION geometry_le(geom1 geometry, geom2 geometry) RETURNS bool AS 'MODULE_PATHNAME', 'lwgeom_le' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION geometry_gt(geometry, geometry) +CREATE OR REPLACE FUNCTION geometry_gt(geom1 geometry, geom2 geometry) RETURNS bool AS 'MODULE_PATHNAME', 'lwgeom_gt' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION geometry_ge(geometry, geometry) +CREATE OR REPLACE FUNCTION geometry_ge(geom1 geometry, geom2 geometry) RETURNS bool AS 'MODULE_PATHNAME', 'lwgeom_ge' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION geometry_eq(geometry, geometry) +CREATE OR REPLACE FUNCTION geometry_eq(geom1 geometry, geom2 geometry) RETURNS bool AS 'MODULE_PATHNAME', 'lwgeom_eq' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION geometry_cmp(geometry, geometry) +CREATE OR REPLACE FUNCTION geometry_cmp(geom1 geometry, geom2 geometry) RETURNS integer AS 'MODULE_PATHNAME', 'lwgeom_cmp' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- -- Sorting operators for Btree @@ -613,185 +314,162 @@ OPERATOR 3 = , OPERATOR 4 >= , OPERATOR 5 > , - FUNCTION 1 geometry_cmp (geometry, geometry); - - - -------------------------------------------------------------------- --- GiST indexes -------------------------------------------------------------------- - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION postgis_gist_sel (internal, oid, internal, int4) - RETURNS float8 - AS 'MODULE_PATHNAME', 'LWGEOM_gist_sel' - LANGUAGE 'C'; - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION postgis_gist_joinsel(internal, oid, internal, smallint) - RETURNS float8 - AS 'MODULE_PATHNAME', 'LWGEOM_gist_joinsel' - LANGUAGE 'C'; - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_postgis_gist_sel (internal, oid, internal, int4) - RETURNS float8 - AS 'MODULE_PATHNAME', 'LWGEOM_gist_sel' - LANGUAGE 'C'; - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_postgis_gist_joinsel(internal, oid, internal, smallint) - RETURNS float8 - AS 'MODULE_PATHNAME', 'LWGEOM_gist_joinsel' - LANGUAGE 'C'; - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_geometry_overleft(geometry, geometry) - RETURNS bool - AS 'MODULE_PATHNAME', 'LWGEOM_overleft' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_geometry_overright(geometry, geometry) - RETURNS bool - AS 'MODULE_PATHNAME', 'LWGEOM_overright' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_geometry_overabove(geometry, geometry) - RETURNS bool - AS 'MODULE_PATHNAME', 'LWGEOM_overabove' - LANGUAGE 'C' IMMUTABLE STRICT; + FUNCTION 1 geometry_cmp (geom1 geometry, geom2 geometry); --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_geometry_overbelow(geometry, geometry) - RETURNS bool - AS 'MODULE_PATHNAME', 'LWGEOM_overbelow' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_geometry_left(geometry, geometry) - RETURNS bool - AS 'MODULE_PATHNAME', 'LWGEOM_left' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_geometry_right(geometry, geometry) - RETURNS bool - AS 'MODULE_PATHNAME', 'LWGEOM_right' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_geometry_above(geometry, geometry) - RETURNS bool - AS 'MODULE_PATHNAME', 'LWGEOM_above' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_geometry_below(geometry, geometry) - RETURNS bool - AS 'MODULE_PATHNAME', 'LWGEOM_below' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_geometry_contain(geometry, geometry) - RETURNS bool - AS 'MODULE_PATHNAME', 'LWGEOM_contain' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_geometry_contained(geometry, geometry) - RETURNS bool - AS 'MODULE_PATHNAME', 'LWGEOM_contained' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_geometry_overlap(geometry, geometry) - RETURNS bool - AS 'MODULE_PATHNAME', 'LWGEOM_overlap' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_geometry_same(geometry, geometry) - RETURNS bool - AS 'MODULE_PATHNAME', 'LWGEOM_samebox' - LANGUAGE 'C' IMMUTABLE STRICT; --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION geometry_same(geometry, geometry) - RETURNS bool - AS 'MODULE_PATHNAME', 'LWGEOM_samebox' - LANGUAGE 'C' IMMUTABLE STRICT; +----------------------------------------------------------------------------- +-- GiST 2D GEOMETRY-over-GSERIALIZED INDEX +----------------------------------------------------------------------------- + +-- ---------- ---------- ---------- ---------- ---------- ---------- ---------- +-- GiST Support Functions +-- ---------- ---------- ---------- ---------- ---------- ---------- ---------- + +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION geometry_gist_distance_2d(internal,geometry,int4) + RETURNS float8 + AS 'MODULE_PATHNAME' ,'gserialized_gist_distance_2d' + LANGUAGE 'c'; + +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION geometry_gist_consistent_2d(internal,geometry,int4) + RETURNS bool + AS 'MODULE_PATHNAME' ,'gserialized_gist_consistent_2d' + LANGUAGE 'c'; + +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION geometry_gist_compress_2d(internal) + RETURNS internal + AS 'MODULE_PATHNAME','gserialized_gist_compress_2d' + LANGUAGE 'c'; + +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION geometry_gist_penalty_2d(internal,internal,internal) + RETURNS internal + AS 'MODULE_PATHNAME' ,'gserialized_gist_penalty_2d' + LANGUAGE 'c'; + +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION geometry_gist_picksplit_2d(internal, internal) + RETURNS internal + AS 'MODULE_PATHNAME' ,'gserialized_gist_picksplit_2d' + LANGUAGE 'c'; + +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION geometry_gist_union_2d(bytea, internal) + RETURNS internal + AS 'MODULE_PATHNAME' ,'gserialized_gist_union_2d' + LANGUAGE 'c'; + +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION geometry_gist_same_2d(geom1 geometry, geom2 geometry, internal) + RETURNS internal + AS 'MODULE_PATHNAME' ,'gserialized_gist_same_2d' + LANGUAGE 'c'; + +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION geometry_gist_decompress_2d(internal) + RETURNS internal + AS 'MODULE_PATHNAME' ,'gserialized_gist_decompress_2d' + LANGUAGE 'c'; -CREATE OR REPLACE FUNCTION geometry_gist_sel (internal, oid, internal, int4) +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION geometry_gist_sel_2d (internal, oid, internal, int4) RETURNS float8 - AS 'MODULE_PATHNAME', 'LWGEOM_gist_sel' - LANGUAGE 'C'; + AS 'MODULE_PATHNAME', 'geometry_gist_sel_2d' + LANGUAGE 'c'; -CREATE OR REPLACE FUNCTION geometry_gist_joinsel(internal, oid, internal, smallint) +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION geometry_gist_joinsel_2d(internal, oid, internal, smallint) RETURNS float8 - AS 'MODULE_PATHNAME', 'LWGEOM_gist_joinsel' - LANGUAGE 'C'; + AS 'MODULE_PATHNAME', 'geometry_gist_joinsel_2d' + LANGUAGE 'c'; -CREATE OR REPLACE FUNCTION geometry_overleft(geometry, geometry) - RETURNS bool - AS 'MODULE_PATHNAME', 'LWGEOM_overleft' - LANGUAGE 'C' IMMUTABLE STRICT; - -CREATE OR REPLACE FUNCTION geometry_overright(geometry, geometry) - RETURNS bool - AS 'MODULE_PATHNAME', 'LWGEOM_overright' - LANGUAGE 'C' IMMUTABLE STRICT; +----------------------------------------------------------------------------- +-- GEOMETRY Operators +----------------------------------------------------------------------------- + +-- ---------- ---------- ---------- ---------- ---------- ---------- ---------- +-- 2D GEOMETRY Operators +-- ---------- ---------- ---------- ---------- ---------- ---------- ---------- + +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION geometry_overlaps(geom1 geometry, geom2 geometry) + RETURNS boolean + AS 'MODULE_PATHNAME' ,'gserialized_overlaps_2d' + LANGUAGE 'c' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION geometry_overabove(geometry, geometry) - RETURNS bool - AS 'MODULE_PATHNAME', 'LWGEOM_overabove' - LANGUAGE 'C' IMMUTABLE STRICT; +CREATE OPERATOR && ( + LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_overlaps, + COMMUTATOR = '&&' +-- ,RESTRICT = contsel, JOIN = contjoinsel + ,RESTRICT = geometry_gist_sel_2d, JOIN = geometry_gist_joinsel_2d +); -CREATE OR REPLACE FUNCTION geometry_overbelow(geometry, geometry) - RETURNS bool - AS 'MODULE_PATHNAME', 'LWGEOM_overbelow' - LANGUAGE 'C' IMMUTABLE STRICT; +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION geometry_same(geom1 geometry, geom2 geometry) + RETURNS boolean + AS 'MODULE_PATHNAME' ,'gserialized_same_2d' + LANGUAGE 'c' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION geometry_left(geometry, geometry) - RETURNS bool - AS 'MODULE_PATHNAME', 'LWGEOM_left' - LANGUAGE 'C' IMMUTABLE STRICT; +CREATE OPERATOR ~= ( + LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_same, + RESTRICT = contsel, JOIN = contjoinsel +); -CREATE OR REPLACE FUNCTION geometry_right(geometry, geometry) - RETURNS bool - AS 'MODULE_PATHNAME', 'LWGEOM_right' - LANGUAGE 'C' IMMUTABLE STRICT; +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION geometry_distance_centroid(geom1 geometry, geom2 geometry) + RETURNS float8 + AS 'MODULE_PATHNAME' ,'gserialized_distance_centroid_2d' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION geometry_distance_box(geom1 geometry, geom2 geometry) + RETURNS float8 + AS 'MODULE_PATHNAME' ,'gserialized_distance_box_2d' + LANGUAGE 'c' IMMUTABLE STRICT; + +#if POSTGIS_PGSQL_VERSION >= 91 +CREATE OPERATOR <-> ( + LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_distance_centroid, + COMMUTATOR = '<->' +); -CREATE OR REPLACE FUNCTION geometry_above(geometry, geometry) - RETURNS bool - AS 'MODULE_PATHNAME', 'LWGEOM_above' - LANGUAGE 'C' IMMUTABLE STRICT; +CREATE OPERATOR <#> ( + LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_distance_box, + COMMUTATOR = '<#>' +); +#endif -CREATE OR REPLACE FUNCTION geometry_below(geometry, geometry) +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION geometry_contains(geom1 geometry, geom2 geometry) RETURNS bool - AS 'MODULE_PATHNAME', 'LWGEOM_below' - LANGUAGE 'C' IMMUTABLE STRICT; + AS 'MODULE_PATHNAME', 'gserialized_contains_2d' + LANGUAGE 'c' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION geometry_contain(geometry, geometry) +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION geometry_within(geom1 geometry, geom2 geometry) RETURNS bool - AS 'MODULE_PATHNAME', 'LWGEOM_contain' - LANGUAGE 'C' IMMUTABLE STRICT; + AS 'MODULE_PATHNAME', 'gserialized_within_2d' + LANGUAGE 'c' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION geometry_contained(geometry, geometry) - RETURNS bool - AS 'MODULE_PATHNAME', 'LWGEOM_contained' - LANGUAGE 'C' IMMUTABLE STRICT; +CREATE OPERATOR @ ( + LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_within, + COMMUTATOR = '~', + RESTRICT = contsel, JOIN = contjoinsel +); -CREATE OR REPLACE FUNCTION geometry_overlap(geometry, geometry) - RETURNS bool - AS 'MODULE_PATHNAME', 'LWGEOM_overlap' - LANGUAGE 'C' IMMUTABLE STRICT; +CREATE OPERATOR ~ ( + LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_contains, + COMMUTATOR = '@', + RESTRICT = contsel, JOIN = contjoinsel +); -CREATE OR REPLACE FUNCTION geometry_samebox(geometry, geometry) +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION geometry_left(geom1 geometry, geom2 geometry) RETURNS bool - AS 'MODULE_PATHNAME', 'LWGEOM_samebox' - LANGUAGE 'C' IMMUTABLE STRICT; + AS 'MODULE_PATHNAME', 'gserialized_left_2d' + LANGUAGE 'c' IMMUTABLE STRICT; CREATE OPERATOR << ( LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_left, @@ -799,29 +477,47 @@ RESTRICT = positionsel, JOIN = positionjoinsel ); +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION geometry_overleft(geom1 geometry, geom2 geometry) + RETURNS bool + AS 'MODULE_PATHNAME', 'gserialized_overleft_2d' + LANGUAGE 'c' IMMUTABLE STRICT; + CREATE OPERATOR &< ( LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_overleft, COMMUTATOR = '&>', RESTRICT = positionsel, JOIN = positionjoinsel ); +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION geometry_below(geom1 geometry, geom2 geometry) + RETURNS bool + AS 'MODULE_PATHNAME', 'gserialized_below_2d' + LANGUAGE 'c' IMMUTABLE STRICT; + CREATE OPERATOR <<| ( LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_below, COMMUTATOR = '|>>', RESTRICT = positionsel, JOIN = positionjoinsel ); +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION geometry_overbelow(geom1 geometry, geom2 geometry) + RETURNS bool + AS 'MODULE_PATHNAME', 'gserialized_overbelow_2d' + LANGUAGE 'c' IMMUTABLE STRICT; + CREATE OPERATOR &<| ( LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_overbelow, COMMUTATOR = '|&>', RESTRICT = positionsel, JOIN = positionjoinsel ); -CREATE OPERATOR && ( - LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_overlap, - COMMUTATOR = '&&', - RESTRICT = geometry_gist_sel, JOIN = geometry_gist_joinsel -); +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION geometry_overright(geom1 geometry, geom2 geometry) + RETURNS bool + AS 'MODULE_PATHNAME', 'gserialized_overright_2d' + LANGUAGE 'c' IMMUTABLE STRICT; CREATE OPERATOR &> ( LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_overright, @@ -829,1092 +525,848 @@ RESTRICT = positionsel, JOIN = positionjoinsel ); +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION geometry_right(geom1 geometry, geom2 geometry) + RETURNS bool + AS 'MODULE_PATHNAME', 'gserialized_right_2d' + LANGUAGE 'c' IMMUTABLE STRICT; + CREATE OPERATOR >> ( LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_right, COMMUTATOR = '<<', RESTRICT = positionsel, JOIN = positionjoinsel ); +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION geometry_overabove(geom1 geometry, geom2 geometry) + RETURNS bool + AS 'MODULE_PATHNAME', 'gserialized_overabove_2d' + LANGUAGE 'c' IMMUTABLE STRICT; + CREATE OPERATOR |&> ( LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_overabove, COMMUTATOR = '&<|', RESTRICT = positionsel, JOIN = positionjoinsel ); +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION geometry_above(geom1 geometry, geom2 geometry) + RETURNS bool + AS 'MODULE_PATHNAME', 'gserialized_above_2d' + LANGUAGE 'c' IMMUTABLE STRICT; + CREATE OPERATOR |>> ( LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_above, COMMUTATOR = '<<|', RESTRICT = positionsel, JOIN = positionjoinsel ); -CREATE OPERATOR ~= ( - LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_samebox, - COMMUTATOR = '~=', - RESTRICT = eqsel, JOIN = eqjoinsel +-- Availability: 2.0.0 +CREATE OPERATOR CLASS gist_geometry_ops_2d + DEFAULT FOR TYPE geometry USING GIST AS + STORAGE box2df, + OPERATOR 1 << , + OPERATOR 2 &< , + OPERATOR 3 && , + OPERATOR 4 &> , + OPERATOR 5 >> , + OPERATOR 6 ~= , + OPERATOR 7 ~ , + OPERATOR 8 @ , + OPERATOR 9 &<| , + OPERATOR 10 <<| , + OPERATOR 11 |>> , + OPERATOR 12 |&> , +#if POSTGIS_PGSQL_VERSION >= 91 + OPERATOR 13 <-> FOR ORDER BY pg_catalog.float_ops, + OPERATOR 14 <#> FOR ORDER BY pg_catalog.float_ops, + FUNCTION 8 geometry_gist_distance_2d (internal, geometry, int4), +#endif + FUNCTION 1 geometry_gist_consistent_2d (internal, geometry, int4), + FUNCTION 2 geometry_gist_union_2d (bytea, internal), + FUNCTION 3 geometry_gist_compress_2d (internal), + FUNCTION 4 geometry_gist_decompress_2d (internal), + FUNCTION 5 geometry_gist_penalty_2d (internal, internal, internal), + FUNCTION 6 geometry_gist_picksplit_2d (internal, internal), + FUNCTION 7 geometry_gist_same_2d (geom1 geometry, geom2 geometry, internal); + + +----------------------------------------------------------------------------- +-- GiST ND GEOMETRY-over-GSERIALIZED +----------------------------------------------------------------------------- + +-- ---------- ---------- ---------- ---------- ---------- ---------- ---------- +-- GiST Support Functions +-- ---------- ---------- ---------- ---------- ---------- ---------- ---------- + +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION geometry_gist_consistent_nd(internal,geometry,int4) + RETURNS bool + AS 'MODULE_PATHNAME' ,'gserialized_gist_consistent' + LANGUAGE 'c'; + +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION geometry_gist_compress_nd(internal) + RETURNS internal + AS 'MODULE_PATHNAME','gserialized_gist_compress' + LANGUAGE 'c'; + +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION geometry_gist_penalty_nd(internal,internal,internal) + RETURNS internal + AS 'MODULE_PATHNAME' ,'gserialized_gist_penalty' + LANGUAGE 'c'; + +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION geometry_gist_picksplit_nd(internal, internal) + RETURNS internal + AS 'MODULE_PATHNAME' ,'gserialized_gist_picksplit' + LANGUAGE 'c'; + +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION geometry_gist_union_nd(bytea, internal) + RETURNS internal + AS 'MODULE_PATHNAME' ,'gserialized_gist_union' + LANGUAGE 'c'; + +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION geometry_gist_same_nd(geometry, geometry, internal) + RETURNS internal + AS 'MODULE_PATHNAME' ,'gserialized_gist_same' + LANGUAGE 'c'; + +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION geometry_gist_decompress_nd(internal) + RETURNS internal + AS 'MODULE_PATHNAME' ,'gserialized_gist_decompress' + LANGUAGE 'c'; + +-- Availability: 2.0.0 +--CREATE OR REPLACE FUNCTION geometry_gist_selectivity_nd (internal, oid, internal, int4) +-- RETURNS float8 +-- AS 'MODULE_PATHNAME', 'geometry_gist_selectivity_nd' +-- LANGUAGE 'c'; + +-- Availability: 2.0.0 +--CREATE OR REPLACE FUNCTION geography_gist_join_selectivity_nd(internal, oid, internal, smallint) +-- RETURNS float8 +-- AS 'MODULE_PATHNAME', 'geometry_gist_join_selectivity_nd' +-- LANGUAGE 'c'; + +-- ---------- ---------- ---------- ---------- ---------- ---------- ---------- +-- N-D GEOMETRY Operators +-- ---------- ---------- ---------- ---------- ---------- ---------- ---------- + +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION geometry_overlaps_nd(geometry, geometry) + RETURNS boolean + AS 'MODULE_PATHNAME' ,'gserialized_overlaps' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Availability: 2.0.0 +CREATE OPERATOR &&& ( + LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_overlaps_nd, + COMMUTATOR = '&&&' + ,RESTRICT = contsel, JOIN = contjoinsel +-- ,RESTRICT = geometry_gist_selectivity_nd +-- ,JOIN = geometry_gist_join_selectivity_nd ); -CREATE OPERATOR @ ( - LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_contained, - COMMUTATOR = '~', - RESTRICT = contsel, JOIN = contjoinsel -); +-- Availability: 2.0.0 +CREATE OPERATOR CLASS gist_geometry_ops_nd + FOR TYPE geometry USING GIST AS + STORAGE gidx, + OPERATOR 3 &&& , +-- OPERATOR 6 ~= , +-- OPERATOR 7 ~ , +-- OPERATOR 8 @ , + FUNCTION 1 geometry_gist_consistent_nd (internal, geometry, int4), + FUNCTION 2 geometry_gist_union_nd (bytea, internal), + FUNCTION 3 geometry_gist_compress_nd (internal), + FUNCTION 4 geometry_gist_decompress_nd (internal), + FUNCTION 5 geometry_gist_penalty_nd (internal, internal, internal), + FUNCTION 6 geometry_gist_picksplit_nd (internal, internal), + FUNCTION 7 geometry_gist_same_nd (geometry, geometry, internal); -CREATE OPERATOR ~ ( - LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_contain, - COMMUTATOR = '@', - RESTRICT = contsel, JOIN = contjoinsel -); --- gist support functions +----------------------------------------------------------------------------- +-- Affine transforms +----------------------------------------------------------------------------- + +-- Availability: 1.2.2 +CREATE OR REPLACE FUNCTION ST_Affine(geometry,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_affine' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Availability: 1.2.2 +CREATE OR REPLACE FUNCTION ST_Affine(geometry,float8,float8,float8,float8,float8,float8) + RETURNS geometry + AS 'SELECT ST_Affine($1, $2, $3, 0, $4, $5, 0, 0, 0, 1, $6, $7, 0)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Availability: 1.2.2 +CREATE OR REPLACE FUNCTION ST_Rotate(geometry,float8) + RETURNS geometry + AS 'SELECT ST_Affine($1, cos($2), -sin($2), 0, sin($2), cos($2), 0, 0, 0, 1, 0, 0, 0)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION ST_Rotate(geometry,float8,float8,float8) + RETURNS geometry + AS 'SELECT ST_Affine($1, cos($2), -sin($2), 0, sin($2), cos($2), 0, 0, 0, 1, $3 - cos($2) * $3 + sin($2) * $4, $4 - sin($2) * $3 - cos($2) * $4, 0)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION ST_Rotate(geometry,float8,geometry) + RETURNS geometry + AS 'SELECT ST_Affine($1, cos($2), -sin($2), 0, sin($2), cos($2), 0, 0, 0, 1, ST_X($3) - cos($2) * ST_X($3) + sin($2) * ST_Y($3), ST_Y($3) - sin($2) * ST_X($3) - cos($2) * ST_Y($3), 0)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Availability: 1.2.2 +CREATE OR REPLACE FUNCTION ST_RotateZ(geometry,float8) + RETURNS geometry + AS 'SELECT ST_Rotate($1, $2)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Availability: 1.2.2 +CREATE OR REPLACE FUNCTION ST_RotateX(geometry,float8) + RETURNS geometry + AS 'SELECT ST_Affine($1, 1, 0, 0, 0, cos($2), -sin($2), 0, sin($2), cos($2), 0, 0, 0)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Availability: 1.2.2 +CREATE OR REPLACE FUNCTION ST_RotateY(geometry,float8) + RETURNS geometry + AS 'SELECT ST_Affine($1, cos($2), 0, sin($2), 0, 1, 0, -sin($2), 0, cos($2), 0, 0, 0)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Availability: 1.2.2 +CREATE OR REPLACE FUNCTION ST_Translate(geometry,float8,float8,float8) + RETURNS geometry + AS 'SELECT ST_Affine($1, 1, 0, 0, 0, 1, 0, 0, 0, 1, $2, $3, $4)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Availability: 1.2.2 +CREATE OR REPLACE FUNCTION ST_Translate(geometry,float8,float8) + RETURNS geometry + AS 'SELECT ST_Translate($1, $2, $3, 0)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Availability: 1.2.2 +CREATE OR REPLACE FUNCTION ST_Scale(geometry,float8,float8,float8) + RETURNS geometry + AS 'SELECT ST_Affine($1, $2, 0, 0, 0, $3, 0, 0, 0, $4, 0, 0, 0)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Availability: 1.2.2 +CREATE OR REPLACE FUNCTION ST_Scale(geometry,float8,float8) + RETURNS geometry + AS 'SELECT ST_Scale($1, $2, $3, 1)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Availability: 1.2.2 +CREATE OR REPLACE FUNCTION ST_Transscale(geometry,float8,float8,float8,float8) + RETURNS geometry + AS 'SELECT ST_Affine($1, $4, 0, 0, 0, $5, 0, + 0, 0, 1, $2 * $4, $3 * $5, 0)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Availability: 1.2.2 +CREATE OR REPLACE FUNCTION ST_Shift_Longitude(geometry) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_longitude_shift' + LANGUAGE 'c' IMMUTABLE STRICT; + +----------------------------------------------------------------------------- +-- BOX3D FUNCTIONS +----------------------------------------------------------------------------- + +-- Availability: 1.2.2 +CREATE OR REPLACE FUNCTION ST_XMin(box3d) + RETURNS FLOAT8 + AS 'MODULE_PATHNAME','BOX3D_xmin' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Availability: 1.2.2 +CREATE OR REPLACE FUNCTION ST_YMin(box3d) + RETURNS FLOAT8 + AS 'MODULE_PATHNAME','BOX3D_ymin' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Availability: 1.2.2 +CREATE OR REPLACE FUNCTION ST_ZMin(box3d) + RETURNS FLOAT8 + AS 'MODULE_PATHNAME','BOX3D_zmin' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Availability: 1.2.2 +CREATE OR REPLACE FUNCTION ST_XMax(box3d) + RETURNS FLOAT8 + AS 'MODULE_PATHNAME','BOX3D_xmax' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Availability: 1.2.2 +CREATE OR REPLACE FUNCTION ST_YMax(box3d) + RETURNS FLOAT8 + AS 'MODULE_PATHNAME','BOX3D_ymax' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Availability: 1.2.2 +CREATE OR REPLACE FUNCTION ST_ZMax(box3d) + RETURNS FLOAT8 + AS 'MODULE_PATHNAME','BOX3D_zmax' + LANGUAGE 'c' IMMUTABLE STRICT; + +----------------------------------------------------------------------------- +-- BOX2D FUNCTIONS +----------------------------------------------------------------------------- + +-- Availability: 1.2.2 +CREATE OR REPLACE FUNCTION ST_expand(box2d,float8) + RETURNS box2d + AS 'MODULE_PATHNAME', 'BOX2D_expand' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Availability: 1.5.0 +CREATE OR REPLACE FUNCTION postgis_getbbox(geometry) + RETURNS box2d + AS 'MODULE_PATHNAME','LWGEOM_to_BOX2D' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Availability: 1.2.2 +CREATE OR REPLACE FUNCTION ST_MakeBox2d(geom1 geometry, geom2 geometry) + RETURNS box2d + AS 'MODULE_PATHNAME', 'BOX2D_construct' + LANGUAGE 'c' IMMUTABLE STRICT; + + +-- Availability: 1.2.2 +CREATE OR REPLACE FUNCTION ST_Combine_BBox(box2d,geometry) + RETURNS box2d + AS 'MODULE_PATHNAME', 'BOX2D_combine' + LANGUAGE 'c' IMMUTABLE; + +----------------------------------------------------------------------- +-- ESTIMATED_EXTENT( ,
, ) +----------------------------------------------------------------------- +-- Availability: 1.2.2 +CREATE OR REPLACE FUNCTION ST_estimated_extent(text,text,text) RETURNS box2d AS + 'MODULE_PATHNAME', 'geometry_estimated_extent' + LANGUAGE 'c' IMMUTABLE STRICT SECURITY DEFINER; + +----------------------------------------------------------------------- +-- ESTIMATED_EXTENT(
, ) +----------------------------------------------------------------------- +-- Availability: 1.2.2 +CREATE OR REPLACE FUNCTION ST_estimated_extent(text,text) RETURNS box2d AS + 'MODULE_PATHNAME', 'geometry_estimated_extent' + LANGUAGE 'c' IMMUTABLE STRICT SECURITY DEFINER; + +----------------------------------------------------------------------- +-- FIND_EXTENT( ,
, ) +----------------------------------------------------------------------- +-- Availability: 1.2.2 +CREATE OR REPLACE FUNCTION ST_find_extent(text,text,text) RETURNS box2d AS +$$ +DECLARE + schemaname alias for $1; + tablename alias for $2; + columnname alias for $3; + myrec RECORD; + +BEGIN + FOR myrec IN EXECUTE 'SELECT ST_Extent("' || columnname || '") As extent FROM "' || schemaname || '"."' || tablename || '"' LOOP + return myrec.extent; + END LOOP; +END; +$$ +LANGUAGE 'plpgsql' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION LWGEOM_gist_consistent(internal,geometry,int4) - RETURNS bool - AS 'MODULE_PATHNAME' ,'LWGEOM_gist_consistent' - LANGUAGE 'C'; -CREATE OR REPLACE FUNCTION LWGEOM_gist_compress(internal) - RETURNS internal - AS 'MODULE_PATHNAME','LWGEOM_gist_compress' - LANGUAGE 'C'; - -CREATE OR REPLACE FUNCTION LWGEOM_gist_penalty(internal,internal,internal) - RETURNS internal - AS 'MODULE_PATHNAME' ,'LWGEOM_gist_penalty' - LANGUAGE 'C'; - -CREATE OR REPLACE FUNCTION LWGEOM_gist_picksplit(internal, internal) - RETURNS internal - AS 'MODULE_PATHNAME' ,'LWGEOM_gist_picksplit' - LANGUAGE 'C'; - -CREATE OR REPLACE FUNCTION LWGEOM_gist_union(bytea, internal) - RETURNS internal - AS 'MODULE_PATHNAME' ,'LWGEOM_gist_union' - LANGUAGE 'C'; - -CREATE OR REPLACE FUNCTION LWGEOM_gist_same(box2d, box2d, internal) - RETURNS internal - AS 'MODULE_PATHNAME' ,'LWGEOM_gist_same' - LANGUAGE 'C'; - -CREATE OR REPLACE FUNCTION LWGEOM_gist_decompress(internal) - RETURNS internal - AS 'MODULE_PATHNAME' ,'LWGEOM_gist_decompress' - LANGUAGE 'C'; +----------------------------------------------------------------------- +-- FIND_EXTENT(
, ) +----------------------------------------------------------------------- +-- Availability: 1.2.2 +CREATE OR REPLACE FUNCTION ST_find_extent(text,text) RETURNS box2d AS +$$ +DECLARE + tablename alias for $1; + columnname alias for $2; + myrec RECORD; -------------------------------------------- --- GIST opclass index binding entries. -------------------------------------------- --- --- Create opclass index bindings for PG>=73 --- +BEGIN + FOR myrec IN EXECUTE 'SELECT ST_Extent("' || columnname || '") As extent FROM "' || tablename || '"' LOOP + return myrec.extent; + END LOOP; +END; +$$ +LANGUAGE 'plpgsql' IMMUTABLE STRICT; -CREATE OPERATOR CLASS gist_geometry_ops - DEFAULT FOR TYPE geometry USING gist AS - STORAGE box2d, - OPERATOR 1 << , - OPERATOR 2 &< , - OPERATOR 3 && , - OPERATOR 4 &> , - OPERATOR 5 >> , - OPERATOR 6 ~= , - OPERATOR 7 ~ , - OPERATOR 8 @ , - OPERATOR 9 &<| , - OPERATOR 10 <<| , - OPERATOR 11 |>> , - OPERATOR 12 |&> , - FUNCTION 1 LWGEOM_gist_consistent (internal, geometry, int4), - FUNCTION 2 LWGEOM_gist_union (bytea, internal), - FUNCTION 3 LWGEOM_gist_compress (internal), - FUNCTION 4 LWGEOM_gist_decompress (internal), - FUNCTION 5 LWGEOM_gist_penalty (internal, internal, internal), - FUNCTION 6 LWGEOM_gist_picksplit (internal, internal), - FUNCTION 7 LWGEOM_gist_same (box2d, box2d, internal); ------------------------------------------- -- other lwgeom functions ------------------------------------------- - -CREATE OR REPLACE FUNCTION addbbox(geometry) - RETURNS geometry - AS 'MODULE_PATHNAME','LWGEOM_addBBOX' - LANGUAGE 'C' IMMUTABLE STRICT; - -- Availability: 1.5.0 CREATE OR REPLACE FUNCTION postgis_addbbox(geometry) RETURNS geometry AS 'MODULE_PATHNAME','LWGEOM_addBBOX' - LANGUAGE 'C' IMMUTABLE STRICT; - -CREATE OR REPLACE FUNCTION dropbbox(geometry) - RETURNS geometry - AS 'MODULE_PATHNAME','LWGEOM_dropBBOX' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.5.0 CREATE OR REPLACE FUNCTION postgis_dropbbox(geometry) RETURNS geometry AS 'MODULE_PATHNAME','LWGEOM_dropBBOX' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION getsrid(geometry) - RETURNS int4 - AS 'MODULE_PATHNAME','LWGEOM_getSRID' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Availability: 1.5.0 -CREATE OR REPLACE FUNCTION getbbox(geometry) - RETURNS box2d - AS 'MODULE_PATHNAME','LWGEOM_to_BOX2DFLOAT4' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Availability: 1.5.0 -CREATE OR REPLACE FUNCTION postgis_getbbox(geometry) - RETURNS box2d - AS 'MODULE_PATHNAME','LWGEOM_to_BOX2DFLOAT4' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION hasbbox(geometry) - RETURNS bool - AS 'MODULE_PATHNAME', 'LWGEOM_hasBBOX' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.5.0 CREATE OR REPLACE FUNCTION postgis_hasbbox(geometry) RETURNS bool AS 'MODULE_PATHNAME', 'LWGEOM_hasBBOX' - LANGUAGE 'C' IMMUTABLE STRICT; - -------------------------------------------- ---- CHIP functions -------------------------------------------- - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION srid(chip) - RETURNS int4 - AS 'MODULE_PATHNAME','CHIP_getSRID' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_srid(chip) - RETURNS int4 - AS 'MODULE_PATHNAME','CHIP_getSRID' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION height(chip) - RETURNS int4 - AS 'MODULE_PATHNAME','CHIP_getHeight' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_height(chip) - RETURNS int4 - AS 'MODULE_PATHNAME','CHIP_getHeight' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION factor(chip) - RETURNS FLOAT4 - AS 'MODULE_PATHNAME','CHIP_getFactor' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_factor(chip) - RETURNS FLOAT4 - AS 'MODULE_PATHNAME','CHIP_getFactor' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION width(chip) - RETURNS int4 - AS 'MODULE_PATHNAME','CHIP_getWidth' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_width(chip) - RETURNS int4 - AS 'MODULE_PATHNAME','CHIP_getWidth' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION datatype(chip) - RETURNS int4 - AS 'MODULE_PATHNAME','CHIP_getDatatype' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_datatype(chip) - RETURNS int4 - AS 'MODULE_PATHNAME','CHIP_getDatatype' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION compression(chip) - RETURNS int4 - AS 'MODULE_PATHNAME','CHIP_getCompression' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_compression(chip) - RETURNS int4 - AS 'MODULE_PATHNAME','CHIP_getCompression' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION setSRID(chip,int4) - RETURNS chip - AS 'MODULE_PATHNAME','CHIP_setSRID' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION setFactor(chip,float4) - RETURNS chip - AS 'MODULE_PATHNAME','CHIP_setFactor' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_setFactor(chip,float4) - RETURNS chip - AS 'MODULE_PATHNAME','CHIP_setFactor' - LANGUAGE 'C' IMMUTABLE STRICT; ------------------------------------------------------------------------ -- DEBUG ------------------------------------------------------------------------ - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION mem_size(geometry) - RETURNS int4 - AS 'MODULE_PATHNAME', 'LWGEOM_mem_size' - LANGUAGE 'C' IMMUTABLE STRICT; - -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_mem_size(geometry) RETURNS int4 AS 'MODULE_PATHNAME', 'LWGEOM_mem_size' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION summary(geometry) - RETURNS text - AS 'MODULE_PATHNAME', 'LWGEOM_summary' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_summary(geometry) RETURNS text AS 'MODULE_PATHNAME', 'LWGEOM_summary' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION npoints(geometry) - RETURNS int4 - AS 'MODULE_PATHNAME', 'LWGEOM_npoints' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_npoints(geometry) +CREATE OR REPLACE FUNCTION ST_Npoints(geometry) RETURNS int4 AS 'MODULE_PATHNAME', 'LWGEOM_npoints' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION nrings(geometry) - RETURNS int4 - AS 'MODULE_PATHNAME', 'LWGEOM_nrings' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_nrings(geometry) RETURNS int4 AS 'MODULE_PATHNAME', 'LWGEOM_nrings' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; ------------------------------------------------------------------------ --- Misures +-- Measures ------------------------------------------------------------------------ - --- this is a fake (for back-compatibility) --- uses 3d if 3d is available, 2d otherwise --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION length3d(geometry) - RETURNS FLOAT8 - AS 'MODULE_PATHNAME', 'LWGEOM_length_linestring' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_length3d(geometry) +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION ST_3DLength(geometry) RETURNS FLOAT8 AS 'MODULE_PATHNAME', 'LWGEOM_length_linestring' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION length2d(geometry) - RETURNS FLOAT8 - AS 'MODULE_PATHNAME', 'LWGEOM_length2d_linestring' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_length2d(geometry) +CREATE OR REPLACE FUNCTION ST_Length2d(geometry) RETURNS FLOAT8 AS 'MODULE_PATHNAME', 'LWGEOM_length2d_linestring' - LANGUAGE 'C' IMMUTABLE STRICT; - -CREATE OR REPLACE FUNCTION length(geometry) - RETURNS FLOAT8 - AS 'MODULE_PATHNAME', 'LWGEOM_length_linestring' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- PostGIS equivalent function: length2d(geometry) CREATE OR REPLACE FUNCTION ST_Length(geometry) RETURNS FLOAT8 AS 'MODULE_PATHNAME', 'LWGEOM_length2d_linestring' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- this is a fake (for back-compatibility) -- uses 3d if 3d is available, 2d otherwise --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION length3d_spheroid(geometry, spheroid) - RETURNS FLOAT8 - AS 'MODULE_PATHNAME','LWGEOM_length_ellipsoid_linestring' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_length3d_spheroid(geometry, spheroid) - RETURNS FLOAT8 - AS 'MODULE_PATHNAME','LWGEOM_length_ellipsoid_linestring' - LANGUAGE 'C' IMMUTABLE STRICT - COST 100; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION length_spheroid(geometry, spheroid) +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION ST_3DLength_spheroid(geometry, spheroid) RETURNS FLOAT8 AS 'MODULE_PATHNAME','LWGEOM_length_ellipsoid_linestring' - LANGUAGE 'C' IMMUTABLE STRICT + LANGUAGE 'c' IMMUTABLE STRICT COST 100; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_length_spheroid(geometry, spheroid) RETURNS FLOAT8 AS 'MODULE_PATHNAME','LWGEOM_length_ellipsoid_linestring' - LANGUAGE 'C' IMMUTABLE STRICT - COST 100; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION length2d_spheroid(geometry, spheroid) - RETURNS FLOAT8 - AS 'MODULE_PATHNAME','LWGEOM_length2d_ellipsoid' - LANGUAGE 'C' IMMUTABLE STRICT + LANGUAGE 'c' IMMUTABLE STRICT COST 100; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_length2d_spheroid(geometry, spheroid) RETURNS FLOAT8 AS 'MODULE_PATHNAME','LWGEOM_length2d_ellipsoid' - LANGUAGE 'C' IMMUTABLE STRICT + LANGUAGE 'c' IMMUTABLE STRICT COST 100; --- this is a fake (for back-compatibility) --- uses 3d if 3d is available, 2d otherwise --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION perimeter3d(geometry) - RETURNS FLOAT8 - AS 'MODULE_PATHNAME', 'LWGEOM_perimeter_poly' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_perimeter3d(geometry) +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION ST_3DPerimeter(geometry) RETURNS FLOAT8 AS 'MODULE_PATHNAME', 'LWGEOM_perimeter_poly' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION perimeter2d(geometry) - RETURNS FLOAT8 - AS 'MODULE_PATHNAME', 'LWGEOM_perimeter2d_poly' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_perimeter2d(geometry) RETURNS FLOAT8 AS 'MODULE_PATHNAME', 'LWGEOM_perimeter2d_poly' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION perimeter(geometry) - RETURNS FLOAT8 - AS 'MODULE_PATHNAME', 'LWGEOM_perimeter_poly' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- PostGIS equivalent function: perimeter2d(geometry) CREATE OR REPLACE FUNCTION ST_Perimeter(geometry) RETURNS FLOAT8 AS 'MODULE_PATHNAME', 'LWGEOM_perimeter2d_poly' - LANGUAGE 'C' IMMUTABLE STRICT; - --- this is an alias for 'area(geometry)' --- there is nothing such an 'area3d'... --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION area2d(geometry) - RETURNS FLOAT8 - AS 'MODULE_PATHNAME', 'LWGEOM_area_polygon' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 -- Deprecation in 1.3.4 CREATE OR REPLACE FUNCTION ST_area2d(geometry) RETURNS FLOAT8 AS 'MODULE_PATHNAME', 'LWGEOM_area_polygon' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION area(geometry) - RETURNS FLOAT8 - AS 'MODULE_PATHNAME','LWGEOM_area_polygon' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- PostGIS equivalent function: area(geometry) CREATE OR REPLACE FUNCTION ST_Area(geometry) RETURNS FLOAT8 AS 'MODULE_PATHNAME','LWGEOM_area_polygon' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION distance_spheroid(geometry,geometry,spheroid) - RETURNS FLOAT8 - AS 'MODULE_PATHNAME','LWGEOM_distance_ellipsoid' - LANGUAGE 'C' IMMUTABLE STRICT - COST 100; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_distance_spheroid(geometry,geometry,spheroid) +CREATE OR REPLACE FUNCTION ST_distance_spheroid(geom1 geometry, geom2 geometry,spheroid) RETURNS FLOAT8 AS 'MODULE_PATHNAME','LWGEOM_distance_ellipsoid' - LANGUAGE 'C' IMMUTABLE STRICT - COST 100; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION distance_sphere(geometry,geometry) - RETURNS FLOAT8 - AS 'MODULE_PATHNAME','LWGEOM_distance_sphere' - LANGUAGE 'C' IMMUTABLE STRICT - COST 100; - --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_distance_sphere(geometry,geometry) - RETURNS FLOAT8 - AS 'MODULE_PATHNAME','LWGEOM_distance_sphere' - LANGUAGE 'C' IMMUTABLE STRICT + LANGUAGE 'c' IMMUTABLE STRICT COST 100; -- Minimum distance. 2d only. --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION distance(geometry,geometry) - RETURNS float8 - AS 'MODULE_PATHNAME', 'LWGEOM_mindistance2d' - LANGUAGE 'C' IMMUTABLE STRICT - COST 100; --- PostGIS equivalent function: distance(geometry,geometry) -CREATE OR REPLACE FUNCTION ST_Distance(geometry,geometry) +-- PostGIS equivalent function: distance(geom1 geometry, geom2 geometry) +CREATE OR REPLACE FUNCTION ST_Distance(geom1 geometry, geom2 geometry) RETURNS float8 AS 'MODULE_PATHNAME', 'LWGEOM_mindistance2d' - LANGUAGE 'C' IMMUTABLE STRICT + LANGUAGE 'c' IMMUTABLE STRICT COST 100; --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION point_inside_circle(geometry,float8,float8,float8) - RETURNS bool - AS 'MODULE_PATHNAME', 'LWGEOM_inside_circle_point' - LANGUAGE 'C' IMMUTABLE STRICT; - -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_point_inside_circle(geometry,float8,float8,float8) RETURNS bool AS 'MODULE_PATHNAME', 'LWGEOM_inside_circle_point' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION azimuth(geometry,geometry) - RETURNS float8 - AS 'MODULE_PATHNAME', 'LWGEOM_azimuth' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_azimuth(geometry,geometry) +CREATE OR REPLACE FUNCTION ST_azimuth(geom1 geometry, geom2 geometry) RETURNS float8 AS 'MODULE_PATHNAME', 'LWGEOM_azimuth' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; ------------------------------------------------------------------------ -- MISC ------------------------------------------------------------------------ - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION force_2d(geometry) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_force_2d' - LANGUAGE 'C' IMMUTABLE STRICT; - -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_force_2d(geometry) RETURNS geometry AS 'MODULE_PATHNAME', 'LWGEOM_force_2d' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION force_3dz(geometry) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_force_3dz' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_force_3dz(geometry) RETURNS geometry AS 'MODULE_PATHNAME', 'LWGEOM_force_3dz' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; --- an alias for force_3dz --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION force_3d(geometry) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_force_3dz' - LANGUAGE 'C' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_force_3d(geometry) RETURNS geometry AS 'MODULE_PATHNAME', 'LWGEOM_force_3dz' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION force_3dm(geometry) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_force_3dm' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_force_3dm(geometry) RETURNS geometry AS 'MODULE_PATHNAME', 'LWGEOM_force_3dm' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION force_4d(geometry) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_force_4d' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_force_4d(geometry) RETURNS geometry AS 'MODULE_PATHNAME', 'LWGEOM_force_4d' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION force_collection(geometry) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_force_collection' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_force_collection(geometry) RETURNS geometry AS 'MODULE_PATHNAME', 'LWGEOM_force_collection' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.5.0 CREATE OR REPLACE FUNCTION ST_CollectionExtract(geometry, integer) RETURNS geometry AS 'MODULE_PATHNAME', 'ST_CollectionExtract' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION multi(geometry) +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION ST_CollectionHomogenize(geometry) RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_force_multi' - LANGUAGE 'C' IMMUTABLE STRICT; + AS 'MODULE_PATHNAME', 'ST_CollectionHomogenize' + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_multi(geometry) +CREATE OR REPLACE FUNCTION ST_Multi(geometry) RETURNS geometry AS 'MODULE_PATHNAME', 'LWGEOM_force_multi' - LANGUAGE 'C' IMMUTABLE STRICT; - - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION expand(box3d,float8) - RETURNS box3d - AS 'MODULE_PATHNAME', 'BOX3D_expand' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_Expand(box3d,float8) RETURNS box3d AS 'MODULE_PATHNAME', 'BOX3D_expand' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION expand(box2d,float8) - RETURNS box2d - AS 'MODULE_PATHNAME', 'BOX2DFLOAT4_expand' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_expand(box2d,float8) - RETURNS box2d - AS 'MODULE_PATHNAME', 'BOX2DFLOAT4_expand' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION expand(geometry,float8) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_expand' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_expand(geometry,float8) +CREATE OR REPLACE FUNCTION ST_Expand(geometry,float8) RETURNS geometry AS 'MODULE_PATHNAME', 'LWGEOM_expand' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION envelope(geometry) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_envelope' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- PostGIS equivalent function: envelope(geometry) CREATE OR REPLACE FUNCTION ST_Envelope(geometry) RETURNS geometry AS 'MODULE_PATHNAME', 'LWGEOM_envelope' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION reverse(geometry) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_reverse' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_Reverse(geometry) RETURNS geometry AS 'MODULE_PATHNAME', 'LWGEOM_reverse' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION ForceRHR(geometry) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_forceRHR_poly' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_ForceRHR(geometry) RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_forceRHR_poly' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION noop(geometry) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_noop' - LANGUAGE 'C' VOLATILE STRICT; + AS 'MODULE_PATHNAME', 'LWGEOM_force_clockwise_poly' + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.5.0 CREATE OR REPLACE FUNCTION postgis_noop(geometry) RETURNS geometry AS 'MODULE_PATHNAME', 'LWGEOM_noop' - LANGUAGE 'C' VOLATILE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION zmflag(geometry) - RETURNS smallint - AS 'MODULE_PATHNAME', 'LWGEOM_zmflag' - LANGUAGE 'C' IMMUTABLE STRICT; - + LANGUAGE 'c' VOLATILE STRICT; + -- Deprecation in 1.5.0 CREATE OR REPLACE FUNCTION ST_zmflag(geometry) RETURNS smallint AS 'MODULE_PATHNAME', 'LWGEOM_zmflag' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION ndims(geometry) - RETURNS smallint - AS 'MODULE_PATHNAME', 'LWGEOM_ndims' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_NDims(geometry) RETURNS smallint AS 'MODULE_PATHNAME', 'LWGEOM_ndims' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION AsEWKT(geometry) - RETURNS TEXT - AS 'MODULE_PATHNAME','LWGEOM_asEWKT' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_AsEWKT(geometry) - RETURNS TEXT - AS 'MODULE_PATHNAME','LWGEOM_asEWKT' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION AsEWKB(geometry) - RETURNS BYTEA - AS 'MODULE_PATHNAME','WKBFromLWGEOM' - LANGUAGE 'C' IMMUTABLE STRICT; + RETURNS TEXT + AS 'MODULE_PATHNAME','LWGEOM_asEWKT' + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_AsEWKB(geometry) RETURNS BYTEA AS 'MODULE_PATHNAME','WKBFromLWGEOM' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION AsHEXEWKB(geometry) - RETURNS TEXT - AS 'MODULE_PATHNAME','LWGEOM_asHEXEWKB' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_AsHEXEWKB(geometry) RETURNS TEXT AS 'MODULE_PATHNAME','LWGEOM_asHEXEWKB' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION AsHEXEWKB(geometry, text) - RETURNS TEXT - AS 'MODULE_PATHNAME','LWGEOM_asHEXEWKB' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_AsHEXEWKB(geometry, text) RETURNS TEXT AS 'MODULE_PATHNAME','LWGEOM_asHEXEWKB' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION AsEWKB(geometry,text) - RETURNS bytea - AS 'MODULE_PATHNAME','WKBFromLWGEOM' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_AsEWKB(geometry,text) RETURNS bytea AS 'MODULE_PATHNAME','WKBFromLWGEOM' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION ST_AsLatLonText(geometry, text) + RETURNS text + AS 'MODULE_PATHNAME','LWGEOM_to_latlon' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION ST_AsLatLonText(geometry) + RETURNS text + AS $$ SELECT ST_AsLatLonText($1, '') $$ + LANGUAGE 'sql' IMMUTABLE STRICT; -- Deprecation in 1.2.3 CREATE OR REPLACE FUNCTION GeomFromEWKB(bytea) RETURNS geometry AS 'MODULE_PATHNAME','LWGEOMFromWKB' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_GeomFromEWKB(bytea) RETURNS geometry AS 'MODULE_PATHNAME','LWGEOMFromWKB' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Deprecation in 1.2.3 CREATE OR REPLACE FUNCTION GeomFromEWKT(text) RETURNS geometry AS 'MODULE_PATHNAME','parse_WKT_lwgeom' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_GeomFromEWKT(text) RETURNS geometry AS 'MODULE_PATHNAME','parse_WKT_lwgeom' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.5.0 CREATE OR REPLACE FUNCTION postgis_cache_bbox() RETURNS trigger AS 'MODULE_PATHNAME', 'cache_bbox' - LANGUAGE 'C'; + LANGUAGE 'c'; ------------------------------------------------------------------------ -- CONSTRUCTORS ------------------------------------------------------------------------ --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION MakePoint(float8, float8) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_makepoint' - LANGUAGE 'C' IMMUTABLE STRICT; - -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_MakePoint(float8, float8) RETURNS geometry AS 'MODULE_PATHNAME', 'LWGEOM_makepoint' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION MakePoint(float8, float8, float8) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_makepoint' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_MakePoint(float8, float8, float8) RETURNS geometry AS 'MODULE_PATHNAME', 'LWGEOM_makepoint' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION MakePoint(float8, float8, float8, float8) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_makepoint' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_MakePoint(float8, float8, float8, float8) RETURNS geometry AS 'MODULE_PATHNAME', 'LWGEOM_makepoint' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION MakePointM(float8, float8, float8) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_makepoint3dm' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.3.4 CREATE OR REPLACE FUNCTION ST_MakePointM(float8, float8, float8) RETURNS geometry AS 'MODULE_PATHNAME', 'LWGEOM_makepoint3dm' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION MakeBox2d(geometry, geometry) - RETURNS box2d - AS 'MODULE_PATHNAME', 'BOX2DFLOAT4_construct' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_MakeBox2d(geometry, geometry) - RETURNS box2d - AS 'MODULE_PATHNAME', 'BOX2DFLOAT4_construct' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION MakeBox3d(geometry, geometry) - RETURNS box3d - AS 'MODULE_PATHNAME', 'BOX3D_construct' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_MakeBox3d(geometry, geometry) +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION ST_3DMakeBox(geom1 geometry, geom2 geometry) RETURNS box3d AS 'MODULE_PATHNAME', 'BOX3D_construct' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION makeline_garray (geometry[]) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_makeline_garray' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_MakeLine_GArray (geometry[]) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_makeline_garray' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.4.0 CREATE OR REPLACE FUNCTION ST_MakeLine (geometry[]) RETURNS geometry AS 'MODULE_PATHNAME', 'LWGEOM_makeline_garray' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION LineFromMultiPoint(geometry) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_line_from_mpoint' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_LineFromMultiPoint(geometry) RETURNS geometry AS 'MODULE_PATHNAME', 'LWGEOM_line_from_mpoint' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION MakeLine(geometry, geometry) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_makeline' - LANGUAGE 'C' IMMUTABLE STRICT; - + LANGUAGE 'c' IMMUTABLE STRICT; + -- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_MakeLine(geometry, geometry) +CREATE OR REPLACE FUNCTION ST_MakeLine(geom1 geometry, geom2 geometry) RETURNS geometry AS 'MODULE_PATHNAME', 'LWGEOM_makeline' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION AddPoint(geometry, geometry) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_addpoint' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_AddPoint(geometry, geometry) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_addpoint' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION AddPoint(geometry, geometry, integer) +CREATE OR REPLACE FUNCTION ST_AddPoint(geom1 geometry, geom2 geometry) RETURNS geometry AS 'MODULE_PATHNAME', 'LWGEOM_addpoint' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_AddPoint(geometry, geometry, integer) +CREATE OR REPLACE FUNCTION ST_AddPoint(geom1 geometry, geom2 geometry, integer) RETURNS geometry AS 'MODULE_PATHNAME', 'LWGEOM_addpoint' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION RemovePoint(geometry, integer) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_removepoint' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_RemovePoint(geometry, integer) RETURNS geometry AS 'MODULE_PATHNAME', 'LWGEOM_removepoint' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION SetPoint(geometry, integer, geometry) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_setpoint_linestring' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_SetPoint(geometry, integer, geometry) RETURNS geometry AS 'MODULE_PATHNAME', 'LWGEOM_setpoint_linestring' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.5.0 -CREATE OR REPLACE FUNCTION ST_MakeEnvelope(float8, float8, float8, float8, integer) +-- Availability: 2.0.0 - made srid optional +CREATE OR REPLACE FUNCTION ST_MakeEnvelope(float8, float8, float8, float8, integer DEFAULT 0) RETURNS geometry AS 'MODULE_PATHNAME', 'ST_MakeEnvelope' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION MakePolygon(geometry, geometry[]) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_makepoly' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_MakePolygon(geometry, geometry[]) RETURNS geometry AS 'MODULE_PATHNAME', 'LWGEOM_makepoly' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION MakePolygon(geometry) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_makepoly' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_MakePolygon(geometry) RETURNS geometry AS 'MODULE_PATHNAME', 'LWGEOM_makepoly' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION BuildArea(geometry) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_buildarea' - LANGUAGE 'C' IMMUTABLE STRICT - COST 100; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_BuildArea(geometry) RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_buildarea' - LANGUAGE 'C' IMMUTABLE STRICT - COST 100; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION Polygonize_GArray (geometry[]) - RETURNS geometry - AS 'MODULE_PATHNAME', 'polygonize_garray' - LANGUAGE 'C' IMMUTABLE STRICT - COST 100; - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION ST_Polygonize_GArray (geometry[]) - RETURNS geometry - AS 'MODULE_PATHNAME', 'polygonize_garray' - LANGUAGE 'C' IMMUTABLE STRICT + AS 'MODULE_PATHNAME', 'ST_BuildArea' + LANGUAGE 'c' IMMUTABLE STRICT COST 100; -- Availability: 1.4.0 CREATE OR REPLACE FUNCTION ST_Polygonize (geometry[]) RETURNS geometry AS 'MODULE_PATHNAME', 'polygonize_garray' - LANGUAGE 'C' IMMUTABLE STRICT - COST 100; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION LineMerge(geometry) - RETURNS geometry - AS 'MODULE_PATHNAME', 'linemerge' - LANGUAGE 'C' IMMUTABLE STRICT + LANGUAGE 'c' IMMUTABLE STRICT COST 100; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_LineMerge(geometry) RETURNS geometry AS 'MODULE_PATHNAME', 'linemerge' - LANGUAGE 'C' IMMUTABLE STRICT + LANGUAGE 'c' IMMUTABLE STRICT COST 100; -CREATE TYPE geometry_dump AS (path integer[], geom geometry); - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION Dump(geometry) - RETURNS SETOF geometry_dump - AS 'MODULE_PATHNAME', 'LWGEOM_dump' - LANGUAGE 'C' IMMUTABLE STRICT; +CREATE TYPE geometry_dump AS ( + path integer[], + geom geometry +); -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_Dump(geometry) RETURNS SETOF geometry_dump AS 'MODULE_PATHNAME', 'LWGEOM_dump' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION DumpRings(geometry) - RETURNS SETOF geometry_dump - AS 'MODULE_PATHNAME', 'LWGEOM_dump_rings' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_DumpRings(geometry) RETURNS SETOF geometry_dump AS 'MODULE_PATHNAME', 'LWGEOM_dump_rings' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; ----------------------------------------------------------------------- -- _ST_DumpPoints() @@ -1933,13 +1385,12 @@ BEGIN - RAISE DEBUG '%,%', cur_path, ST_GeometryType(the_geom); + -- RAISE DEBUG '%,%', cur_path, ST_GeometryType(the_geom); - -- Special case (MULTI* OR GEOMETRYCOLLECTION) : iterate and return the DumpPoints of the geometries - SELECT ST_NumGeometries(the_geom) INTO nb_geom; + -- Special case collections : iterate and return the DumpPoints of the geometries - IF (nb_geom IS NOT NULL) THEN - + IF (ST_IsCollection(the_geom)) THEN + i = 1; FOR tmp2 IN SELECT (ST_Dump(the_geom)).* LOOP @@ -1971,6 +1422,16 @@ RETURN; END IF; + -- Special case (TRIANGLE) : return the points of the external rings of a TRIANGLE + IF (ST_GeometryType(the_geom) = 'ST_Triangle') THEN + + FOR tmp IN SELECT * FROM _ST_DumpPoints(ST_ExteriorRing(the_geom), cur_path || ARRAY[1]) LOOP + RETURN NEXT tmp; + END LOOP; + + RETURN; + END IF; + -- Special case (POINT) : return the point IF (ST_GeometryType(the_geom) = 'ST_Point') THEN @@ -1985,7 +1446,7 @@ -- Use ST_NumPoints rather than ST_NPoints to have a NULL value if the_geom isn't - -- a LINESTRING or CIRCULARSTRING. + -- a LINESTRING, CIRCULARSTRING. SELECT ST_NumPoints(the_geom) INTO nb_points; -- This should never happen @@ -2014,294 +1475,20 @@ SELECT * FROM _ST_DumpPoints($1, NULL); $$ LANGUAGE SQL STRICT; - ------------------------------------------------------------------------- - --- --- Aggregate functions --- - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION combine_bbox(box2d,geometry) - RETURNS box2d - AS 'MODULE_PATHNAME', 'BOX2DFLOAT4_combine' - LANGUAGE 'C' IMMUTABLE; - --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_Combine_BBox(box2d,geometry) - RETURNS box2d - AS 'MODULE_PATHNAME', 'BOX2DFLOAT4_combine' - LANGUAGE 'C' IMMUTABLE; - --- Temporary hack function -CREATE OR REPLACE FUNCTION combine_bbox(box3d_extent,geometry) - RETURNS box3d_extent - AS 'MODULE_PATHNAME', 'BOX3D_combine' - LANGUAGE 'C' IMMUTABLE; - --- Temporary hack function -CREATE OR REPLACE FUNCTION ST_Combine_BBox(box3d_extent,geometry) - RETURNS box3d_extent - AS 'MODULE_PATHNAME', 'BOX3D_combine' - LANGUAGE 'C' IMMUTABLE; - --- Deprecation in 1.2.3 -CREATE AGGREGATE Extent( - sfunc = ST_combine_bbox, - basetype = geometry, - stype = box3d_extent - ); - --- Availability: 1.2.2 -CREATE AGGREGATE ST_Extent( - sfunc = ST_combine_bbox, - basetype = geometry, - stype = box3d_extent - ); - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION combine_bbox(box3d,geometry) - RETURNS box3d - AS 'MODULE_PATHNAME', 'BOX3D_combine' - LANGUAGE 'C' IMMUTABLE; - --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_Combine_BBox(box3d,geometry) - RETURNS box3d - AS 'MODULE_PATHNAME', 'BOX3D_combine' - LANGUAGE 'C' IMMUTABLE; - --- Deprecation in 1.2.3 -CREATE AGGREGATE Extent3d( - sfunc = combine_bbox, - basetype = geometry, - stype = box3d - ); - --- Availability: 1.2.2 -CREATE AGGREGATE ST_Extent3d( - sfunc = ST_combine_bbox, - basetype = geometry, - stype = box3d - ); - ------------------------------------------------------------------------ --- ESTIMATED_EXTENT( ,
, ) ------------------------------------------------------------------------ --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION estimated_extent(text,text,text) RETURNS box2d AS - 'MODULE_PATHNAME', 'LWGEOM_estimated_extent' - LANGUAGE 'C' IMMUTABLE STRICT SECURITY DEFINER; - --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_estimated_extent(text,text,text) RETURNS box2d AS - 'MODULE_PATHNAME', 'LWGEOM_estimated_extent' - LANGUAGE 'C' IMMUTABLE STRICT SECURITY DEFINER; - ------------------------------------------------------------------------ --- ESTIMATED_EXTENT(
, ) ------------------------------------------------------------------------ --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION estimated_extent(text,text) RETURNS box2d AS - 'MODULE_PATHNAME', 'LWGEOM_estimated_extent' - LANGUAGE 'C' IMMUTABLE STRICT SECURITY DEFINER; - --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_estimated_extent(text,text) RETURNS box2d AS - 'MODULE_PATHNAME', 'LWGEOM_estimated_extent' - LANGUAGE 'C' IMMUTABLE STRICT SECURITY DEFINER; - ------------------------------------------------------------------------ --- FIND_EXTENT( ,
, ) ------------------------------------------------------------------------ --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION find_extent(text,text,text) RETURNS box2d AS -$$ -DECLARE - schemaname alias for $1; - tablename alias for $2; - columnname alias for $3; - myrec RECORD; - -BEGIN - FOR myrec IN EXECUTE 'SELECT extent("' || columnname || '") FROM "' || schemaname || '"."' || tablename || '"' LOOP - return myrec.extent; - END LOOP; -END; -$$ -LANGUAGE 'plpgsql' IMMUTABLE STRICT; - --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_find_extent(text,text,text) RETURNS box2d AS -$$ -DECLARE - schemaname alias for $1; - tablename alias for $2; - columnname alias for $3; - myrec RECORD; - -BEGIN - FOR myrec IN EXECUTE 'SELECT extent("' || columnname || '") FROM "' || schemaname || '"."' || tablename || '"' LOOP - return myrec.extent; - END LOOP; -END; -$$ -LANGUAGE 'plpgsql' IMMUTABLE STRICT; - - ------------------------------------------------------------------------ --- FIND_EXTENT(
, ) ------------------------------------------------------------------------ --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION find_extent(text,text) RETURNS box2d AS -$$ -DECLARE - tablename alias for $1; - columnname alias for $2; - myrec RECORD; - -BEGIN - FOR myrec IN EXECUTE 'SELECT extent("' || columnname || '") FROM "' || tablename || '"' LOOP - return myrec.extent; - END LOOP; -END; -$$ -LANGUAGE 'plpgsql' IMMUTABLE STRICT; - --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_find_extent(text,text) RETURNS box2d AS -$$ -DECLARE - tablename alias for $1; - columnname alias for $2; - myrec RECORD; - -BEGIN - FOR myrec IN EXECUTE 'SELECT extent("' || columnname || '") FROM "' || tablename || '"' LOOP - return myrec.extent; - END LOOP; -END; -$$ -LANGUAGE 'plpgsql' IMMUTABLE STRICT; - + + ------------------------------------------------------------------- -- SPATIAL_REF_SYS ------------------------------------------------------------------- CREATE TABLE spatial_ref_sys ( - srid integer not null primary key, + srid integer not null primary key + check (srid > 0 and srid <= SRID_USR_MAX), auth_name varchar(256), auth_srid integer, srtext varchar(2048), proj4text varchar(2048) ); -------------------------------------------------------------------- --- GEOMETRY_COLUMNS -------------------------------------------------------------------- -CREATE TABLE geometry_columns ( - f_table_catalog varchar(256) not null, - f_table_schema varchar(256) not null, - f_table_name varchar(256) not null, - f_geometry_column varchar(256) not null, - coord_dimension integer not null, - srid integer not null, - type varchar(30) not null, - CONSTRAINT geometry_columns_pk primary key ( - f_table_catalog, - f_table_schema, - f_table_name, - f_geometry_column ) -) WITH OIDS; - ------------------------------------------------------------------------ --- RENAME_GEOMETRY_TABLE_CONSTRAINTS() ------------------------------------------------------------------------ --- This function has been obsoleted for the difficulty in --- finding attribute on which the constraint is applied. --- AddGeometryColumn will name the constraints in a meaningful --- way, but nobody can rely on it since old postgis versions did --- not do that. ------------------------------------------------------------------------ -CREATE OR REPLACE FUNCTION rename_geometry_table_constraints() RETURNS text -AS -$$ -SELECT 'rename_geometry_table_constraint() is obsoleted'::text -$$ -LANGUAGE 'SQL' IMMUTABLE; - ------------------------------------------------------------------------ --- FIX_GEOMETRY_COLUMNS() ------------------------------------------------------------------------ --- This function will: --- --- o try to fix the schema of records with an integer one --- (for PG>=73) --- --- o link records to system tables through attrelid and varattnum --- (for PG<75) --- --- o delete all records for which no linking was possible --- (for PG<75) --- --- ------------------------------------------------------------------------ -CREATE OR REPLACE FUNCTION fix_geometry_columns() RETURNS text -AS -$$ -DECLARE - mislinked record; - result text; - linked integer; - deleted integer; - foundschema integer; -BEGIN - - -- Since 7.3 schema support has been added. - -- Previous postgis versions used to put the database name in - -- the schema column. This needs to be fixed, so we try to - -- set the correct schema for each geometry_colums record - -- looking at table, column, type and srid. - UPDATE geometry_columns SET f_table_schema = n.nspname - FROM pg_namespace n, pg_class c, pg_attribute a, - pg_constraint sridcheck, pg_constraint typecheck - WHERE ( f_table_schema is NULL - OR f_table_schema = '' - OR f_table_schema NOT IN ( - SELECT nspname::varchar - FROM pg_namespace nn, pg_class cc, pg_attribute aa - WHERE cc.relnamespace = nn.oid - AND cc.relname = f_table_name::name - AND aa.attrelid = cc.oid - AND aa.attname = f_geometry_column::name)) - AND f_table_name::name = c.relname - AND c.oid = a.attrelid - AND c.relnamespace = n.oid - AND f_geometry_column::name = a.attname - - AND sridcheck.conrelid = c.oid - AND sridcheck.consrc LIKE '(srid(% = %)' - AND sridcheck.consrc ~ textcat(' = ', srid::text) - - AND typecheck.conrelid = c.oid - AND typecheck.consrc LIKE - '((geometrytype(%) = ''%''::text) OR (% IS NULL))' - AND typecheck.consrc ~ textcat(' = ''', type::text) - - AND NOT EXISTS ( - SELECT oid FROM geometry_columns gc - WHERE c.relname::varchar = gc.f_table_name - AND n.nspname::varchar = gc.f_table_schema - AND a.attname::varchar = gc.f_geometry_column - ); - - GET DIAGNOSTICS foundschema = ROW_COUNT; - - -- no linkage to system table needed - return 'fixed:'||foundschema::text; - -END; -$$ -LANGUAGE 'plpgsql' VOLATILE; ----------------------------------------------------------------------- -- POPULATE_GEOMETRY_COLUMNS() @@ -2313,8 +1500,12 @@ -- appropriate spatial contraints (for tables) and exists in the -- geometry_columns table. -- Availability: 1.4.0 +-- Revised: 2.0.0 -- no longer deletes from geometry_columns +-- Has new use_typmod option that defaults to true. +-- If use typmod is set to false will use old constraint behavior. +-- Will only touch table missing typmod or geometry constraints ----------------------------------------------------------------------- -CREATE OR REPLACE FUNCTION populate_geometry_columns() +CREATE OR REPLACE FUNCTION populate_geometry_columns(use_typmod boolean DEFAULT true) RETURNS text AS $$ DECLARE @@ -2334,8 +1525,6 @@ SELECT count(*) INTO oldcount FROM geometry_columns; inserted := 0; - EXECUTE 'TRUNCATE geometry_columns'; - -- Count the number of geometry columns in all tables and views SELECT count(DISTINCT c.oid) INTO probed FROM pg_class c, @@ -2343,60 +1532,41 @@ pg_type t, pg_namespace n WHERE (c.relkind = 'r' OR c.relkind = 'v') - AND t.typname = 'geometry' - AND a.attisdropped = false - AND a.atttypid = t.oid - AND a.attrelid = c.oid - AND c.relnamespace = n.oid - AND n.nspname NOT ILIKE 'pg_temp%'; - - -- Iterate through all non-dropped geometry columns - RAISE DEBUG 'Processing Tables.....'; - - FOR gcs IN - SELECT DISTINCT ON (c.oid) c.oid, n.nspname, c.relname - FROM pg_class c, - pg_attribute a, - pg_type t, - pg_namespace n - WHERE c.relkind = 'r' AND t.typname = 'geometry' AND a.attisdropped = false AND a.atttypid = t.oid AND a.attrelid = c.oid AND c.relnamespace = n.oid - AND n.nspname NOT ILIKE 'pg_temp%' - LOOP + AND n.nspname NOT ILIKE 'pg_temp%' AND c.relname != 'raster_columns' ; - inserted := inserted + populate_geometry_columns(gcs.oid); - END LOOP; + -- Iterate through all non-dropped geometry columns + RAISE DEBUG 'Processing Tables.....'; - -- Add views to geometry columns table - RAISE DEBUG 'Processing Views.....'; FOR gcs IN SELECT DISTINCT ON (c.oid) c.oid, n.nspname, c.relname FROM pg_class c, pg_attribute a, pg_type t, pg_namespace n - WHERE c.relkind = 'v' + WHERE c.relkind = 'r' AND t.typname = 'geometry' AND a.attisdropped = false AND a.atttypid = t.oid AND a.attrelid = c.oid AND c.relnamespace = n.oid + AND n.nspname NOT ILIKE 'pg_temp%' AND c.relname != 'raster_columns' LOOP - inserted := inserted + populate_geometry_columns(gcs.oid); + inserted := inserted + populate_geometry_columns(gcs.oid, use_typmod); END LOOP; IF oldcount > inserted THEN - stale = oldcount-inserted; + stale = oldcount-inserted; ELSE - stale = 0; + stale = 0; END IF; - RETURN 'probed:' ||probed|| ' inserted:'||inserted|| ' conflicts:'||probed-inserted|| ' deleted:'||stale; + RETURN 'probed:' ||probed|| ' inserted:'||inserted; END $$ @@ -2424,18 +1594,20 @@ -- table. -- Availability: 1.4.0 ----------------------------------------------------------------------- -CREATE OR REPLACE FUNCTION populate_geometry_columns(tbl_oid oid) +CREATE OR REPLACE FUNCTION populate_geometry_columns(tbl_oid oid, use_typmod boolean DEFAULT true) RETURNS integer AS $$ DECLARE gcs RECORD; gc RECORD; + gc_old RECORD; gsrid integer; gndims integer; gtype text; query text; gc_is_valid boolean; inserted integer; + constraint_successful boolean := false; BEGIN inserted := 0; @@ -2457,189 +1629,90 @@ AND c.oid = tbl_oid LOOP - RAISE DEBUG 'Processing table %.%.%', gcs.nspname, gcs.relname, gcs.attname; - - DELETE FROM geometry_columns - WHERE f_table_schema = gcs.nspname - AND f_table_name = gcs.relname - AND f_geometry_column = gcs.attname; - - gc_is_valid := true; - - -- Try to find srid check from system tables (pg_constraint) - gsrid := - (SELECT replace(replace(split_part(s.consrc, ' = ', 2), ')', ''), '(', '') - FROM pg_class c, pg_namespace n, pg_attribute a, pg_constraint s - WHERE n.nspname = gcs.nspname - AND c.relname = gcs.relname - AND a.attname = gcs.attname - AND a.attrelid = c.oid - AND s.connamespace = n.oid - AND s.conrelid = c.oid - AND a.attnum = ANY (s.conkey) - AND s.consrc LIKE '%srid(% = %'); - IF (gsrid IS NULL) THEN - -- Try to find srid from the geometry itself - EXECUTE 'SELECT srid(' || quote_ident(gcs.attname) || ') - FROM ONLY ' || quote_ident(gcs.nspname) || '.' || quote_ident(gcs.relname) || ' - WHERE ' || quote_ident(gcs.attname) || ' IS NOT NULL LIMIT 1' - INTO gc; - gsrid := gc.srid; - - -- Try to apply srid check to column - IF (gsrid IS NOT NULL) THEN - BEGIN - EXECUTE 'ALTER TABLE ONLY ' || quote_ident(gcs.nspname) || '.' || quote_ident(gcs.relname) || ' - ADD CONSTRAINT ' || quote_ident('enforce_srid_' || gcs.attname) || ' - CHECK (srid(' || quote_ident(gcs.attname) || ') = ' || gsrid || ')'; - EXCEPTION - WHEN check_violation THEN - RAISE WARNING 'Not inserting ''%'' in ''%.%'' into geometry_columns: could not apply constraint CHECK (srid(%) = %)', quote_ident(gcs.attname), quote_ident(gcs.nspname), quote_ident(gcs.relname), quote_ident(gcs.attname), gsrid; - gc_is_valid := false; - END; - END IF; - END IF; - - -- Try to find ndims check from system tables (pg_constraint) - gndims := - (SELECT replace(split_part(s.consrc, ' = ', 2), ')', '') - FROM pg_class c, pg_namespace n, pg_attribute a, pg_constraint s - WHERE n.nspname = gcs.nspname - AND c.relname = gcs.relname - AND a.attname = gcs.attname - AND a.attrelid = c.oid - AND s.connamespace = n.oid - AND s.conrelid = c.oid - AND a.attnum = ANY (s.conkey) - AND s.consrc LIKE '%ndims(% = %'); - IF (gndims IS NULL) THEN - -- Try to find ndims from the geometry itself - EXECUTE 'SELECT ndims(' || quote_ident(gcs.attname) || ') - FROM ONLY ' || quote_ident(gcs.nspname) || '.' || quote_ident(gcs.relname) || ' - WHERE ' || quote_ident(gcs.attname) || ' IS NOT NULL LIMIT 1' - INTO gc; - gndims := gc.ndims; - - -- Try to apply ndims check to column - IF (gndims IS NOT NULL) THEN - BEGIN - EXECUTE 'ALTER TABLE ONLY ' || quote_ident(gcs.nspname) || '.' || quote_ident(gcs.relname) || ' - ADD CONSTRAINT ' || quote_ident('enforce_dims_' || gcs.attname) || ' - CHECK (ndims(' || quote_ident(gcs.attname) || ') = '||gndims||')'; - EXCEPTION - WHEN check_violation THEN - RAISE WARNING 'Not inserting ''%'' in ''%.%'' into geometry_columns: could not apply constraint CHECK (ndims(%) = %)', quote_ident(gcs.attname), quote_ident(gcs.nspname), quote_ident(gcs.relname), quote_ident(gcs.attname), gndims; - gc_is_valid := false; - END; - END IF; - END IF; - - -- Try to find geotype check from system tables (pg_constraint) - gtype := - (SELECT replace(split_part(s.consrc, '''', 2), ')', '') - FROM pg_class c, pg_namespace n, pg_attribute a, pg_constraint s - WHERE n.nspname = gcs.nspname - AND c.relname = gcs.relname - AND a.attname = gcs.attname - AND a.attrelid = c.oid - AND s.connamespace = n.oid - AND s.conrelid = c.oid - AND a.attnum = ANY (s.conkey) - AND s.consrc LIKE '%geometrytype(% = %'); - IF (gtype IS NULL) THEN - -- Try to find geotype from the geometry itself - EXECUTE 'SELECT geometrytype(' || quote_ident(gcs.attname) || ') - FROM ONLY ' || quote_ident(gcs.nspname) || '.' || quote_ident(gcs.relname) || ' - WHERE ' || quote_ident(gcs.attname) || ' IS NOT NULL LIMIT 1' - INTO gc; - gtype := gc.geometrytype; - --IF (gtype IS NULL) THEN - -- gtype := 'GEOMETRY'; - --END IF; - - -- Try to apply geometrytype check to column - IF (gtype IS NOT NULL) THEN - BEGIN - EXECUTE 'ALTER TABLE ONLY ' || quote_ident(gcs.nspname) || '.' || quote_ident(gcs.relname) || ' - ADD CONSTRAINT ' || quote_ident('enforce_geotype_' || gcs.attname) || ' - CHECK ((geometrytype(' || quote_ident(gcs.attname) || ') = ' || quote_literal(gtype) || ') OR (' || quote_ident(gcs.attname) || ' IS NULL))'; - EXCEPTION - WHEN check_violation THEN - -- No geometry check can be applied. This column contains a number of geometry types. - RAISE WARNING 'Could not add geometry type check (%) to table column: %.%.%', gtype, quote_ident(gcs.nspname),quote_ident(gcs.relname),quote_ident(gcs.attname); - END; - END IF; - END IF; - - IF (gsrid IS NULL) THEN - RAISE WARNING 'Not inserting ''%'' in ''%.%'' into geometry_columns: could not determine the srid', quote_ident(gcs.attname), quote_ident(gcs.nspname), quote_ident(gcs.relname); - ELSIF (gndims IS NULL) THEN - RAISE WARNING 'Not inserting ''%'' in ''%.%'' into geometry_columns: could not determine the number of dimensions', quote_ident(gcs.attname), quote_ident(gcs.nspname), quote_ident(gcs.relname); - ELSIF (gtype IS NULL) THEN - RAISE WARNING 'Not inserting ''%'' in ''%.%'' into geometry_columns: could not determine the geometry type', quote_ident(gcs.attname), quote_ident(gcs.nspname), quote_ident(gcs.relname); - ELSE - -- Only insert into geometry_columns if table constraints could be applied. - IF (gc_is_valid) THEN - INSERT INTO geometry_columns (f_table_catalog,f_table_schema, f_table_name, f_geometry_column, coord_dimension, srid, type) - VALUES ('', gcs.nspname, gcs.relname, gcs.attname, gndims, gsrid, gtype); - inserted := inserted + 1; - END IF; - END IF; - END LOOP; - - -- Add views to geometry columns table - FOR gcs IN - SELECT n.nspname, c.relname, a.attname - FROM pg_class c, - pg_attribute a, - pg_type t, - pg_namespace n - WHERE c.relkind = 'v' - AND t.typname = 'geometry' - AND a.attisdropped = false - AND a.atttypid = t.oid - AND a.attrelid = c.oid - AND c.relnamespace = n.oid - AND n.nspname NOT ILIKE 'pg_temp%' - AND c.oid = tbl_oid - LOOP - RAISE DEBUG 'Processing view %.%.%', gcs.nspname, gcs.relname, gcs.attname; + RAISE DEBUG 'Processing table %.%.%', gcs.nspname, gcs.relname, gcs.attname; + + gc_is_valid := true; + -- Find the srid, coord_dimension, and type of current geometry + -- in geometry_columns -- which is now a view + + SELECT type, srid, coord_dimension INTO gc_old + FROM geometry_columns + WHERE f_table_schema = gcs.nspname AND f_table_name = gcs.relname AND f_geometry_column = gcs.attname; + + IF upper(gc_old.type) = 'GEOMETRY' THEN + -- This is an unconstrained geometry we need to do something + -- We need to figure out what to set the type by inspecting the data + EXECUTE 'SELECT st_srid(' || quote_ident(gcs.attname) || ') As srid, GeometryType(' || quote_ident(gcs.attname) || ') As type, ST_NDims(' || quote_ident(gcs.attname) || ') As dims ' || + ' FROM ONLY ' || quote_ident(gcs.nspname) || '.' || quote_ident(gcs.relname) || + ' WHERE ' || quote_ident(gcs.attname) || ' IS NOT NULL LIMIT 1;' + INTO gc; + IF gc IS NULL THEN -- there is no data so we can not determine geometry type + RAISE WARNING 'No data in table %.%, so no information to determine geometry type and srid', gcs.nspname, gcs.relname; + RETURN 0; + END IF; + gsrid := gc.srid; gtype := gc.type; gndims := gc.dims; + + IF use_typmod THEN + BEGIN + EXECUTE 'ALTER TABLE ' || quote_ident(gcs.nspname) || '.' || quote_ident(gcs.relname) || ' ALTER COLUMN ' || quote_ident(gcs.attname) || + ' TYPE geometry(' || postgis_type_name(gtype, gndims, true) || ', ' || gsrid::text || ') '; + inserted := inserted + 1; + EXCEPTION + WHEN invalid_parameter_value THEN + RAISE WARNING 'Could not convert ''%'' in ''%.%'' to use typmod with srid %, type: % ', quote_ident(gcs.attname), quote_ident(gcs.nspname), quote_ident(gcs.relname), gsrid, postgis_type_name(gtype, gndims, true); + gc_is_valid := false; + END; + + ELSE + -- Try to apply srid check to column + constraint_successful = false; + IF (gsrid > 0 AND postgis_constraint_srid(gcs.nspname, gcs.relname,gcs.attname) IS NULL ) THEN + BEGIN + EXECUTE 'ALTER TABLE ONLY ' || quote_ident(gcs.nspname) || '.' || quote_ident(gcs.relname) || + ' ADD CONSTRAINT ' || quote_ident('enforce_srid_' || gcs.attname) || + ' CHECK (st_srid(' || quote_ident(gcs.attname) || ') = ' || gsrid || ')'; + constraint_successful := true; + EXCEPTION + WHEN check_violation THEN + RAISE WARNING 'Not inserting ''%'' in ''%.%'' into geometry_columns: could not apply constraint CHECK (st_srid(%) = %)', quote_ident(gcs.attname), quote_ident(gcs.nspname), quote_ident(gcs.relname), quote_ident(gcs.attname), gsrid; + gc_is_valid := false; + END; + END IF; + + -- Try to apply ndims check to column + IF (gndims IS NOT NULL AND postgis_constraint_dims(gcs.nspname, gcs.relname,gcs.attname) IS NULL ) THEN + BEGIN + EXECUTE 'ALTER TABLE ONLY ' || quote_ident(gcs.nspname) || '.' || quote_ident(gcs.relname) || ' + ADD CONSTRAINT ' || quote_ident('enforce_dims_' || gcs.attname) || ' + CHECK (st_ndims(' || quote_ident(gcs.attname) || ') = '||gndims||')'; + constraint_successful := true; + EXCEPTION + WHEN check_violation THEN + RAISE WARNING 'Not inserting ''%'' in ''%.%'' into geometry_columns: could not apply constraint CHECK (st_ndims(%) = %)', quote_ident(gcs.attname), quote_ident(gcs.nspname), quote_ident(gcs.relname), quote_ident(gcs.attname), gndims; + gc_is_valid := false; + END; + END IF; + + -- Try to apply geometrytype check to column + IF (gtype IS NOT NULL AND postgis_constraint_type(gcs.nspname, gcs.relname,gcs.attname) IS NULL ) THEN + BEGIN + EXECUTE 'ALTER TABLE ONLY ' || quote_ident(gcs.nspname) || '.' || quote_ident(gcs.relname) || ' + ADD CONSTRAINT ' || quote_ident('enforce_geotype_' || gcs.attname) || ' + CHECK ((geometrytype(' || quote_ident(gcs.attname) || ') = ' || quote_literal(gtype) || ') OR (' || quote_ident(gcs.attname) || ' IS NULL))'; + constraint_successful := true; + EXCEPTION + WHEN check_violation THEN + -- No geometry check can be applied. This column contains a number of geometry types. + RAISE WARNING 'Could not add geometry type check (%) to table column: %.%.%', gtype, quote_ident(gcs.nspname),quote_ident(gcs.relname),quote_ident(gcs.attname); + END; + END IF; + --only count if we were successful in applying at least one constraint + IF constraint_successful THEN + inserted := inserted + 1; + END IF; + END IF; + END IF; - DELETE FROM geometry_columns - WHERE f_table_schema = gcs.nspname - AND f_table_name = gcs.relname - AND f_geometry_column = gcs.attname; - - EXECUTE 'SELECT ndims(' || quote_ident(gcs.attname) || ') - FROM ' || quote_ident(gcs.nspname) || '.' || quote_ident(gcs.relname) || ' - WHERE ' || quote_ident(gcs.attname) || ' IS NOT NULL LIMIT 1' - INTO gc; - gndims := gc.ndims; - - EXECUTE 'SELECT srid(' || quote_ident(gcs.attname) || ') - FROM ' || quote_ident(gcs.nspname) || '.' || quote_ident(gcs.relname) || ' - WHERE ' || quote_ident(gcs.attname) || ' IS NOT NULL LIMIT 1' - INTO gc; - gsrid := gc.srid; - - EXECUTE 'SELECT geometrytype(' || quote_ident(gcs.attname) || ') - FROM ' || quote_ident(gcs.nspname) || '.' || quote_ident(gcs.relname) || ' - WHERE ' || quote_ident(gcs.attname) || ' IS NOT NULL LIMIT 1' - INTO gc; - gtype := gc.geometrytype; - - IF (gndims IS NULL) THEN - RAISE WARNING 'Not inserting ''%'' in ''%.%'' into geometry_columns: could not determine ndims', quote_ident(gcs.attname), quote_ident(gcs.nspname), quote_ident(gcs.relname); - ELSIF (gsrid IS NULL) THEN - RAISE WARNING 'Not inserting ''%'' in ''%.%'' into geometry_columns: could not determine srid', quote_ident(gcs.attname), quote_ident(gcs.nspname), quote_ident(gcs.relname); - ELSIF (gtype IS NULL) THEN - RAISE WARNING 'Not inserting ''%'' in ''%.%'' into geometry_columns: could not determine gtype', quote_ident(gcs.attname), quote_ident(gcs.nspname), quote_ident(gcs.relname); - ELSE - query := 'INSERT INTO geometry_columns (f_table_catalog,f_table_schema, f_table_name, f_geometry_column, coord_dimension, srid, type) ' || - 'VALUES ('''', ' || quote_literal(gcs.nspname) || ',' || quote_literal(gcs.relname) || ',' || quote_literal(gcs.attname) || ',' || gndims || ',' || gsrid || ',' || quote_literal(gtype) || ')'; - EXECUTE query; - inserted := inserted + 1; - END IF; END LOOP; RETURN inserted; @@ -2648,104 +1721,6 @@ $$ LANGUAGE 'plpgsql' VOLATILE; - ------------------------------------------------------------------------ --- PROBE_GEOMETRY_COLUMNS() ------------------------------------------------------------------------ --- Fill the geometry_columns table with values probed from the system --- catalogues. This is done by simply looking up constraints previously --- added to a geometry column. If geometry constraints are missing, no --- attempt is made to add the necessary constraints to the geometry --- column, nor is it recorded in the geometry_columns table. --- 3d flag cannot be probed, it defaults to 2 --- --- Note that bogus records already in geometry_columns are not --- overridden (a check for schema.table.column is performed), so --- to have a fresh probe backup your geometry_columns, delete from --- it and probe. ------------------------------------------------------------------------ -CREATE OR REPLACE FUNCTION probe_geometry_columns() RETURNS text AS -$$ -DECLARE - inserted integer; - oldcount integer; - probed integer; - stale integer; -BEGIN - - SELECT count(*) INTO oldcount FROM geometry_columns; - - SELECT count(*) INTO probed - FROM pg_class c, pg_attribute a, pg_type t, - pg_namespace n, - pg_constraint sridcheck, pg_constraint typecheck - - WHERE t.typname = 'geometry' - AND a.atttypid = t.oid - AND a.attrelid = c.oid - AND c.relnamespace = n.oid - AND sridcheck.connamespace = n.oid - AND typecheck.connamespace = n.oid - AND sridcheck.conrelid = c.oid - AND sridcheck.consrc LIKE '(srid('||a.attname||') = %)' - AND typecheck.conrelid = c.oid - AND typecheck.consrc LIKE - '((geometrytype('||a.attname||') = ''%''::text) OR (% IS NULL))' - ; - - INSERT INTO geometry_columns SELECT - ''::varchar as f_table_catalogue, - n.nspname::varchar as f_table_schema, - c.relname::varchar as f_table_name, - a.attname::varchar as f_geometry_column, - 2 as coord_dimension, - trim(both ' =)' from - replace(replace(split_part( - sridcheck.consrc, ' = ', 2), ')', ''), '(', ''))::integer AS srid, - trim(both ' =)''' from substr(typecheck.consrc, - strpos(typecheck.consrc, '='), - strpos(typecheck.consrc, '::')- - strpos(typecheck.consrc, '=') - ))::varchar as type - FROM pg_class c, pg_attribute a, pg_type t, - pg_namespace n, - pg_constraint sridcheck, pg_constraint typecheck - WHERE t.typname = 'geometry' - AND a.atttypid = t.oid - AND a.attrelid = c.oid - AND c.relnamespace = n.oid - AND sridcheck.connamespace = n.oid - AND typecheck.connamespace = n.oid - AND sridcheck.conrelid = c.oid - AND sridcheck.consrc LIKE '(st_srid('||a.attname||') = %)' - AND typecheck.conrelid = c.oid - AND typecheck.consrc LIKE - '((geometrytype('||a.attname||') = ''%''::text) OR (% IS NULL))' - - AND NOT EXISTS ( - SELECT oid FROM geometry_columns gc - WHERE c.relname::varchar = gc.f_table_name - AND n.nspname::varchar = gc.f_table_schema - AND a.attname::varchar = gc.f_geometry_column - ); - - GET DIAGNOSTICS inserted = ROW_COUNT; - - IF oldcount > probed THEN - stale = oldcount-probed; - ELSE - stale = 0; - END IF; - - RETURN 'probed:'||probed::text|| - ' inserted:'||inserted::text|| - ' conflicts:'||(probed-inserted)::text|| - ' stale:'||stale::text; -END - -$$ -LANGUAGE 'plpgsql' VOLATILE; - ----------------------------------------------------------------------- -- ADDGEOMETRYCOLUMN -- , ,
, , , , @@ -2762,53 +1737,23 @@ -- Should also check the precision grid (future expansion). -- ----------------------------------------------------------------------- -CREATE OR REPLACE FUNCTION AddGeometryColumn(varchar,varchar,varchar,varchar,integer,varchar,integer) +CREATE OR REPLACE FUNCTION AddGeometryColumn(catalog_name varchar,schema_name varchar,table_name varchar,column_name varchar,new_srid_in integer,new_type varchar,new_dim integer, use_typmod boolean DEFAULT true) RETURNS text AS $$ DECLARE - catalog_name alias for $1; - schema_name alias for $2; - table_name alias for $3; - column_name alias for $4; - new_srid alias for $5; - new_type alias for $6; - new_dim alias for $7; rec RECORD; sr varchar; real_schema name; sql text; + new_srid integer; BEGIN -- Verify geometry type - IF ( NOT ( (new_type = 'GEOMETRY') OR - (new_type = 'GEOMETRYCOLLECTION') OR - (new_type = 'POINT') OR - (new_type = 'MULTIPOINT') OR - (new_type = 'POLYGON') OR - (new_type = 'MULTIPOLYGON') OR - (new_type = 'LINESTRING') OR - (new_type = 'MULTILINESTRING') OR - (new_type = 'GEOMETRYCOLLECTIONM') OR - (new_type = 'POINTM') OR - (new_type = 'MULTIPOINTM') OR - (new_type = 'POLYGONM') OR - (new_type = 'MULTIPOLYGONM') OR - (new_type = 'LINESTRINGM') OR - (new_type = 'MULTILINESTRINGM') OR - (new_type = 'CIRCULARSTRING') OR - (new_type = 'CIRCULARSTRINGM') OR - (new_type = 'COMPOUNDCURVE') OR - (new_type = 'COMPOUNDCURVEM') OR - (new_type = 'CURVEPOLYGON') OR - (new_type = 'CURVEPOLYGONM') OR - (new_type = 'MULTICURVE') OR - (new_type = 'MULTICURVEM') OR - (new_type = 'MULTISURFACE') OR - (new_type = 'MULTISURFACEM')) ) + IF (postgis_type_name(new_type,new_dim) IS NULL ) THEN - RAISE EXCEPTION 'Invalid type name - valid ones are: + RAISE EXCEPTION 'Invalid type name "%(%)" - valid ones are: POINT, MULTIPOINT, LINESTRING, MULTILINESTRING, POLYGON, MULTIPOLYGON, @@ -2819,14 +1764,15 @@ LINESTRINGM, MULTILINESTRINGM, POLYGONM, MULTIPOLYGONM, CIRCULARSTRINGM, COMPOUNDCURVEM, MULTICURVEM - CURVEPOLYGONM, MULTISURFACEM, - or GEOMETRYCOLLECTIONM'; + CURVEPOLYGONM, MULTISURFACEM, TRIANGLE, TRIANGLEM, + POLYHEDRALSURFACE, POLYHEDRALSURFACEM, TIN, TINM + or GEOMETRYCOLLECTIONM', new_type, new_dim; RETURN 'fail'; END IF; -- Verify dimension - IF ( (new_dim >4) OR (new_dim <0) ) THEN + IF ( (new_dim >4) OR (new_dim <2) ) THEN RAISE EXCEPTION 'invalid dimension'; RETURN 'fail'; END IF; @@ -2838,12 +1784,21 @@ -- Verify SRID - IF ( new_srid != -1 ) THEN + IF ( new_srid_in > 0 ) THEN + IF new_srid_in > SRID_USR_MAX THEN + RAISE EXCEPTION 'AddGeometryColumn() - SRID must be <= %', SRID_USR_MAX; + END IF; + new_srid := new_srid_in; SELECT SRID INTO sr FROM spatial_ref_sys WHERE SRID = new_srid; IF NOT FOUND THEN - RAISE EXCEPTION 'AddGeometryColumns() - invalid SRID'; + RAISE EXCEPTION 'AddGeometryColumn() - invalid SRID'; RETURN 'fail'; END IF; + ELSE + new_srid := ST_SRID('POINT EMPTY'::geometry); + IF ( new_srid_in != new_srid ) THEN + RAISE NOTICE 'SRID value % converted to the officially unknown SRID value %', new_srid_in, new_srid; + END IF; END IF; @@ -2881,70 +1836,53 @@ -- Add geometry column to table - sql := 'ALTER TABLE ' || - quote_ident(real_schema) || '.' || quote_ident(table_name) - || ' ADD COLUMN ' || quote_ident(column_name) || - ' geometry '; - RAISE DEBUG '%', sql; - EXECUTE sql; - - - -- Delete stale record in geometry_columns (if any) - sql := 'DELETE FROM geometry_columns WHERE - f_table_catalog = ' || quote_literal('') || - ' AND f_table_schema = ' || - quote_literal(real_schema) || - ' AND f_table_name = ' || quote_literal(table_name) || - ' AND f_geometry_column = ' || quote_literal(column_name); - RAISE DEBUG '%', sql; - EXECUTE sql; - - - -- Add record in geometry_columns - sql := 'INSERT INTO geometry_columns (f_table_catalog,f_table_schema,f_table_name,' || - 'f_geometry_column,coord_dimension,srid,type)' || - ' VALUES (' || - quote_literal('') || ',' || - quote_literal(real_schema) || ',' || - quote_literal(table_name) || ',' || - quote_literal(column_name) || ',' || - new_dim::text || ',' || - new_srid::text || ',' || - quote_literal(new_type) || ')'; - RAISE DEBUG '%', sql; - EXECUTE sql; - - - -- Add table CHECKs - sql := 'ALTER TABLE ' || - quote_ident(real_schema) || '.' || quote_ident(table_name) - || ' ADD CONSTRAINT ' - || quote_ident('enforce_srid_' || column_name) - || ' CHECK (ST_SRID(' || quote_ident(column_name) || - ') = ' || new_srid::text || ')' ; - RAISE DEBUG '%', sql; - EXECUTE sql; - - sql := 'ALTER TABLE ' || - quote_ident(real_schema) || '.' || quote_ident(table_name) - || ' ADD CONSTRAINT ' - || quote_ident('enforce_dims_' || column_name) - || ' CHECK (ST_NDims(' || quote_ident(column_name) || - ') = ' || new_dim::text || ')' ; - RAISE DEBUG '%', sql; + IF use_typmod THEN + sql := 'ALTER TABLE ' || + quote_ident(real_schema) || '.' || quote_ident(table_name) + || ' ADD COLUMN ' || quote_ident(column_name) || + ' geometry(' || postgis_type_name(new_type, new_dim) || ', ' || new_srid::text || ')'; + RAISE DEBUG '%', sql; + ELSE + sql := 'ALTER TABLE ' || + quote_ident(real_schema) || '.' || quote_ident(table_name) + || ' ADD COLUMN ' || quote_ident(column_name) || + ' geometry '; + RAISE DEBUG '%', sql; + END IF; EXECUTE sql; - IF ( NOT (new_type = 'GEOMETRY')) THEN - sql := 'ALTER TABLE ' || - quote_ident(real_schema) || '.' || quote_ident(table_name) || ' ADD CONSTRAINT ' || - quote_ident('enforce_geotype_' || column_name) || - ' CHECK (GeometryType(' || - quote_ident(column_name) || ')=' || - quote_literal(new_type) || ' OR (' || - quote_ident(column_name) || ') is null)'; - RAISE DEBUG '%', sql; - EXECUTE sql; - END IF; + IF NOT use_typmod THEN + -- Add table CHECKs + sql := 'ALTER TABLE ' || + quote_ident(real_schema) || '.' || quote_ident(table_name) + || ' ADD CONSTRAINT ' + || quote_ident('enforce_srid_' || column_name) + || ' CHECK (st_srid(' || quote_ident(column_name) || + ') = ' || new_srid::text || ')' ; + RAISE DEBUG '%', sql; + EXECUTE sql; + + sql := 'ALTER TABLE ' || + quote_ident(real_schema) || '.' || quote_ident(table_name) + || ' ADD CONSTRAINT ' + || quote_ident('enforce_dims_' || column_name) + || ' CHECK (st_ndims(' || quote_ident(column_name) || + ') = ' || new_dim::text || ')' ; + RAISE DEBUG '%', sql; + EXECUTE sql; + + IF ( NOT (new_type = 'GEOMETRY')) THEN + sql := 'ALTER TABLE ' || + quote_ident(real_schema) || '.' || quote_ident(table_name) || ' ADD CONSTRAINT ' || + quote_ident('enforce_geotype_' || column_name) || + ' CHECK (GeometryType(' || + quote_ident(column_name) || ')=' || + quote_literal(new_type) || ' OR (' || + quote_ident(column_name) || ') is null)'; + RAISE DEBUG '%', sql; + EXECUTE sql; + END IF; + END IF; RETURN real_schema || '.' || @@ -2964,11 +1902,11 @@ -- when catalogue is undefined -- ---------------------------------------------------------------------------- -CREATE OR REPLACE FUNCTION AddGeometryColumn(varchar,varchar,varchar,integer,varchar,integer) RETURNS text AS $$ +CREATE OR REPLACE FUNCTION AddGeometryColumn(schema_name varchar,table_name varchar,column_name varchar,new_srid integer,new_type varchar,new_dim integer, use_typmod boolean DEFAULT true) RETURNS text AS $$ DECLARE ret text; BEGIN - SELECT AddGeometryColumn('',$1,$2,$3,$4,$5,$6) into ret; + SELECT AddGeometryColumn('',$1,$2,$3,$4,$5,$6,$7) into ret; RETURN ret; END; $$ @@ -2982,11 +1920,11 @@ -- when catalogue and schema are undefined -- ---------------------------------------------------------------------------- -CREATE OR REPLACE FUNCTION AddGeometryColumn(varchar,varchar,integer,varchar,integer) RETURNS text AS $$ +CREATE OR REPLACE FUNCTION AddGeometryColumn(table_name varchar,column_name varchar,new_srid integer,new_type varchar,new_dim integer, use_typmod boolean DEFAULT true) RETURNS text AS $$ DECLARE ret text; BEGIN - SELECT AddGeometryColumn('','',$1,$2,$3,$4,$5) into ret; + SELECT AddGeometryColumn('','',$1,$2,$3,$4,$5, $6) into ret; RETURN ret; END; $$ @@ -3002,15 +1940,11 @@ -- Make some silly enforcements on it for pgsql < 73 -- ----------------------------------------------------------------------- -CREATE OR REPLACE FUNCTION DropGeometryColumn(varchar, varchar,varchar,varchar) +CREATE OR REPLACE FUNCTION DropGeometryColumn(catalog_name varchar, schema_name varchar,table_name varchar,column_name varchar) RETURNS text AS $$ DECLARE - catalog_name alias for $1; - schema_name alias for $2; - table_name alias for $3; - column_name alias for $4; myrec RECORD; okay boolean; real_schema name; @@ -3020,13 +1954,13 @@ -- Find, check or fix schema_name IF ( schema_name != '' ) THEN - okay = 'f'; + okay = false; FOR myrec IN SELECT nspname FROM pg_namespace WHERE text(nspname) = schema_name LOOP - okay := 't'; + okay := true; END LOOP; - IF ( okay <> 't' ) THEN + IF ( okay <> true ) THEN RAISE NOTICE 'Invalid schema name - using current_schema()'; SELECT current_schema() into real_schema; ELSE @@ -3037,21 +1971,15 @@ END IF; -- Find out if the column is in the geometry_columns table - okay = 'f'; + okay = false; FOR myrec IN SELECT * from geometry_columns where f_table_schema = text(real_schema) and f_table_name = table_name and f_geometry_column = column_name LOOP - okay := 't'; + okay := true; END LOOP; - IF (okay <> 't') THEN + IF (okay <> true) THEN RAISE EXCEPTION 'column not found in geometry_columns table'; - RETURN 'f'; + RETURN false; END IF; - -- Remove ref from geometry_columns table - EXECUTE 'delete from geometry_columns where f_table_schema = ' || - quote_literal(real_schema) || ' and f_table_name = ' || - quote_literal(table_name) || ' and f_geometry_column = ' || - quote_literal(column_name); - -- Remove table column EXECUTE 'ALTER TABLE ' || quote_ident(real_schema) || '.' || quote_ident(table_name) || ' DROP COLUMN ' || @@ -3072,7 +2000,7 @@ -- when catalogue is undefined -- ----------------------------------------------------------------------- -CREATE OR REPLACE FUNCTION DropGeometryColumn(varchar,varchar,varchar) +CREATE OR REPLACE FUNCTION DropGeometryColumn(schema_name varchar, table_name varchar,column_name varchar) RETURNS text AS $$ @@ -3094,7 +2022,7 @@ -- when catalogue and schema is undefined. -- ----------------------------------------------------------------------- -CREATE OR REPLACE FUNCTION DropGeometryColumn(varchar,varchar) +CREATE OR REPLACE FUNCTION DropGeometryColumn(table_name varchar, column_name varchar) RETURNS text AS $$ @@ -3115,14 +2043,11 @@ -- Drop a table and all its references in geometry_columns -- ----------------------------------------------------------------------- -CREATE OR REPLACE FUNCTION DropGeometryTable(varchar, varchar,varchar) +CREATE OR REPLACE FUNCTION DropGeometryTable(catalog_name varchar, schema_name varchar, table_name varchar) RETURNS text AS $$ DECLARE - catalog_name alias for $1; - schema_name alias for $2; - table_name alias for $3; real_schema name; BEGIN @@ -3133,16 +2058,11 @@ real_schema = schema_name; END IF; - -- Remove refs from geometry_columns table - EXECUTE 'DELETE FROM geometry_columns WHERE ' || - 'f_table_schema = ' || quote_literal(real_schema) || - ' AND ' || - ' f_table_name = ' || quote_literal(table_name); - + -- TODO: Should we warn if table doesn't exist probably instead just saying dropped -- Remove table - EXECUTE 'DROP TABLE ' + EXECUTE 'DROP TABLE IF EXISTS ' || quote_ident(real_schema) || '.' || - quote_ident(table_name); + quote_ident(table_name) || ' RESTRICT'; RETURN real_schema || '.' || @@ -3160,9 +2080,9 @@ -- Drop a table and all its references in geometry_columns -- ----------------------------------------------------------------------- -CREATE OR REPLACE FUNCTION DropGeometryTable(varchar,varchar) RETURNS text AS +CREATE OR REPLACE FUNCTION DropGeometryTable(schema_name varchar, table_name varchar) RETURNS text AS $$ SELECT DropGeometryTable('',$1,$2) $$ -LANGUAGE 'sql' WITH (isstrict); +LANGUAGE 'sql' VOLATILE STRICT; ----------------------------------------------------------------------- -- DROPGEOMETRYTABLE @@ -3173,7 +2093,7 @@ -- For PG>=73 use current_schema() -- ----------------------------------------------------------------------- -CREATE OR REPLACE FUNCTION DropGeometryTable(varchar) RETURNS text AS +CREATE OR REPLACE FUNCTION DropGeometryTable(table_name varchar) RETURNS text AS $$ SELECT DropGeometryTable('','',$1) $$ LANGUAGE 'sql' VOLATILE STRICT; @@ -3185,33 +2105,30 @@ -- Change SRID of all features in a spatially-enabled table -- ----------------------------------------------------------------------- -CREATE OR REPLACE FUNCTION UpdateGeometrySRID(varchar,varchar,varchar,varchar,integer) +CREATE OR REPLACE FUNCTION UpdateGeometrySRID(catalogn_name varchar,schema_name varchar,table_name varchar,column_name varchar,new_srid_in integer) RETURNS text AS $$ DECLARE - catalog_name alias for $1; - schema_name alias for $2; - table_name alias for $3; - column_name alias for $4; - new_srid alias for $5; myrec RECORD; okay boolean; cname varchar; real_schema name; + unknown_srid integer; + new_srid integer := new_srid_in; BEGIN -- Find, check or fix schema_name IF ( schema_name != '' ) THEN - okay = 'f'; + okay = false; FOR myrec IN SELECT nspname FROM pg_namespace WHERE text(nspname) = schema_name LOOP - okay := 't'; + okay := true; END LOOP; - IF ( okay <> 't' ) THEN + IF ( okay <> true ) THEN RAISE EXCEPTION 'Invalid schema name'; ELSE real_schema = schema_name; @@ -3220,44 +2137,60 @@ SELECT INTO real_schema current_schema()::text; END IF; - -- Find out if the column is in the geometry_columns table - okay = 'f'; - FOR myrec IN SELECT * from geometry_columns where f_table_schema = text(real_schema) and f_table_name = table_name and f_geometry_column = column_name LOOP - okay := 't'; + -- Ensure that column_name is in geometry_columns + okay = false; + FOR myrec IN SELECT type, coord_dimension FROM geometry_columns WHERE f_table_schema = text(real_schema) and f_table_name = table_name and f_geometry_column = column_name LOOP + okay := true; END LOOP; - IF (okay <> 't') THEN + IF (NOT okay) THEN RAISE EXCEPTION 'column not found in geometry_columns table'; - RETURN 'f'; + RETURN false; + END IF; + + -- Ensure that new_srid is valid + IF ( new_srid > 0 ) THEN + IF ( SELECT count(*) = 0 from spatial_ref_sys where srid = new_srid ) THEN + RAISE EXCEPTION 'invalid SRID: % not found in spatial_ref_sys', new_srid; + RETURN false; + END IF; + ELSE + unknown_srid := ST_SRID('POINT EMPTY'::geometry); + IF ( new_srid != unknown_srid ) THEN + new_srid := unknown_srid; + RAISE NOTICE 'SRID value % converted to the officially unknown SRID value %', new_srid_in, new_srid; + END IF; END IF; - -- Update ref from geometry_columns table - EXECUTE 'UPDATE geometry_columns SET SRID = ' || new_srid::text || - ' where f_table_schema = ' || - quote_literal(real_schema) || ' and f_table_name = ' || - quote_literal(table_name) || ' and f_geometry_column = ' || - quote_literal(column_name); - - -- Make up constraint name - cname = 'enforce_srid_' || column_name; - - -- Drop enforce_srid constraint - EXECUTE 'ALTER TABLE ' || quote_ident(real_schema) || - '.' || quote_ident(table_name) || - ' DROP constraint ' || quote_ident(cname); - - -- Update geometries SRID - EXECUTE 'UPDATE ' || quote_ident(real_schema) || - '.' || quote_ident(table_name) || - ' SET ' || quote_ident(column_name) || - ' = setSRID(' || quote_ident(column_name) || - ', ' || new_srid::text || ')'; - - -- Reset enforce_srid constraint - EXECUTE 'ALTER TABLE ' || quote_ident(real_schema) || - '.' || quote_ident(table_name) || - ' ADD constraint ' || quote_ident(cname) || - ' CHECK (srid(' || quote_ident(column_name) || - ') = ' || new_srid::text || ')'; + IF postgis_constraint_srid(schema_name, table_name, column_name) IS NOT NULL THEN + -- srid was enforced with constraints before, keep it that way. + -- Make up constraint name + cname = 'enforce_srid_' || column_name; + + -- Drop enforce_srid constraint + EXECUTE 'ALTER TABLE ' || quote_ident(real_schema) || + '.' || quote_ident(table_name) || + ' DROP constraint ' || quote_ident(cname); + + -- Update geometries SRID + EXECUTE 'UPDATE ' || quote_ident(real_schema) || + '.' || quote_ident(table_name) || + ' SET ' || quote_ident(column_name) || + ' = ST_SetSRID(' || quote_ident(column_name) || + ', ' || new_srid::text || ')'; + + -- Reset enforce_srid constraint + EXECUTE 'ALTER TABLE ' || quote_ident(real_schema) || + '.' || quote_ident(table_name) || + ' ADD constraint ' || quote_ident(cname) || + ' CHECK (st_srid(' || quote_ident(column_name) || + ') = ' || new_srid::text || ')'; + ELSE + -- We will use typmod to enforce if no srid constraints + -- We are using postgis_type_name to lookup the new name + -- (in case Paul changes his mind and flips geometry_columns to return old upper case name) + EXECUTE 'ALTER TABLE ' || quote_ident(real_schema) || '.' || quote_ident(table_name) || + ' ALTER COLUMN ' || quote_ident(column_name) || ' TYPE geometry(' || postgis_type_name(myrec.type, myrec.coord_dimension, true) || ', ' || new_srid::text || ') USING ST_SetSRID(' || quote_ident(column_name) || ',' || new_srid::text || ');' ; + END IF; RETURN real_schema || '.' || table_name || '.' || column_name ||' SRID changed to ' || new_srid::text; @@ -3353,18 +2286,13 @@ CREATE OR REPLACE FUNCTION postgis_transform_geometry(geometry,text,text,int) RETURNS geometry AS 'MODULE_PATHNAME','transform_geom' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION transform(geometry,integer) - RETURNS geometry - AS 'MODULE_PATHNAME','transform' - LANGUAGE 'C' IMMUTABLE STRICT; - --- PostGIS equivalent function: transform(geometry,integer) +-- PostGIS equivalent of old function: transform(geometry,integer) CREATE OR REPLACE FUNCTION ST_Transform(geometry,integer) RETURNS geometry AS 'MODULE_PATHNAME','transform' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; ----------------------------------------------------------------------- @@ -3373,11 +2301,11 @@ CREATE OR REPLACE FUNCTION postgis_version() RETURNS text AS 'MODULE_PATHNAME' - LANGUAGE 'C' IMMUTABLE; + LANGUAGE 'c' IMMUTABLE; CREATE OR REPLACE FUNCTION postgis_proj_version() RETURNS text AS 'MODULE_PATHNAME' - LANGUAGE 'C' IMMUTABLE; + LANGUAGE 'c' IMMUTABLE; -- -- IMPORTANT: @@ -3391,24 +2319,25 @@ CREATE OR REPLACE FUNCTION postgis_lib_version() RETURNS text AS 'MODULE_PATHNAME' - LANGUAGE 'C' IMMUTABLE; -- a new lib will require a new session + LANGUAGE 'c' IMMUTABLE; -- a new lib will require a new session --- NOTE: starting at 1.1.0 this is the same of postgis_lib_version() +-- NOTE: from 1.1.0 to 1.5.x this was the same of postgis_lib_version() +-- NOTE: from 2.0.0 up it includes postgis_svn_revision() CREATE OR REPLACE FUNCTION postgis_scripts_released() RETURNS text AS 'MODULE_PATHNAME' - LANGUAGE 'C' IMMUTABLE; + LANGUAGE 'c' IMMUTABLE; -CREATE OR REPLACE FUNCTION postgis_uses_stats() RETURNS bool +CREATE OR REPLACE FUNCTION postgis_geos_version() RETURNS text AS 'MODULE_PATHNAME' - LANGUAGE 'C' IMMUTABLE; + LANGUAGE 'c' IMMUTABLE; -CREATE OR REPLACE FUNCTION postgis_geos_version() RETURNS text +CREATE OR REPLACE FUNCTION postgis_svn_version() RETURNS text AS 'MODULE_PATHNAME' - LANGUAGE 'C' IMMUTABLE; + LANGUAGE 'c' IMMUTABLE; CREATE OR REPLACE FUNCTION postgis_libxml_version() RETURNS text AS 'MODULE_PATHNAME' - LANGUAGE 'C' IMMUTABLE; + LANGUAGE 'c' IMMUTABLE; CREATE OR REPLACE FUNCTION postgis_scripts_build_date() RETURNS text AS _POSTGIS_SQL_SELECT_POSTGIS_BUILD_DATE @@ -3416,31 +2345,71 @@ CREATE OR REPLACE FUNCTION postgis_lib_build_date() RETURNS text AS 'MODULE_PATHNAME' - LANGUAGE 'C' IMMUTABLE; - - + LANGUAGE 'c' IMMUTABLE; CREATE OR REPLACE FUNCTION postgis_full_version() RETURNS text AS $$ DECLARE libver text; + svnver text; projver text; geosver text; + gdalver text; libxmlver text; - usestats bool; dbproc text; relproc text; fullver text; + rast_lib_ver text; + rast_scr_ver text; + topo_scr_ver text; + json_lib_ver text; BEGIN SELECT postgis_lib_version() INTO libver; SELECT postgis_proj_version() INTO projver; SELECT postgis_geos_version() INTO geosver; + SELECT postgis_libjson_version() INTO json_lib_ver; + BEGIN + SELECT postgis_gdal_version() INTO gdalver; + EXCEPTION + WHEN undefined_function THEN + gdalver := NULL; + RAISE NOTICE 'Function postgis_gdal_version() not found. Is raster support enabled and rtpostgis.sql installed?'; + END; SELECT postgis_libxml_version() INTO libxmlver; - SELECT postgis_uses_stats() INTO usestats; SELECT postgis_scripts_installed() INTO dbproc; SELECT postgis_scripts_released() INTO relproc; + select postgis_svn_version() INTO svnver; + BEGIN + SELECT postgis_topology_scripts_installed() INTO topo_scr_ver; + EXCEPTION + WHEN undefined_function THEN + topo_scr_ver := NULL; + RAISE NOTICE 'Function postgis_topology_scripts_installed() not found. Is topology support enabled and topology.sql installed?'; + END; + + BEGIN + SELECT postgis_raster_scripts_installed() INTO rast_scr_ver; + EXCEPTION + WHEN undefined_function THEN + rast_scr_ver := NULL; + RAISE NOTICE 'Function postgis_raster_scripts_installed() not found. Is raster support enabled and rtpostgis.sql installed?'; + END; + + BEGIN + SELECT postgis_raster_lib_version() INTO rast_lib_ver; + EXCEPTION + WHEN undefined_function THEN + rast_lib_ver := NULL; + RAISE NOTICE 'Function postgis_raster_lib_version() not found. Is raster support enabled and rtpostgis.sql installed?'; + END; + + fullver = 'POSTGIS="' || libver; + + IF svnver IS NOT NULL THEN + fullver = fullver || ' r' || svnver; + END IF; - fullver = 'POSTGIS="' || libver || '"'; + fullver = fullver || '"'; IF geosver IS NOT NULL THEN fullver = fullver || ' GEOS="' || geosver || '"'; @@ -3450,19 +2419,41 @@ fullver = fullver || ' PROJ="' || projver || '"'; END IF; + IF gdalver IS NOT NULL THEN + fullver = fullver || ' GDAL="' || gdalver || '"'; + END IF; + IF libxmlver IS NOT NULL THEN fullver = fullver || ' LIBXML="' || libxmlver || '"'; END IF; - IF usestats THEN - fullver = fullver || ' USE_STATS'; + IF json_lib_ver IS NOT NULL THEN + fullver = fullver || ' LIBJSON="' || json_lib_ver || '"'; END IF; -- fullver = fullver || ' DBPROC="' || dbproc || '"'; -- fullver = fullver || ' RELPROC="' || relproc || '"'; IF dbproc != relproc THEN - fullver = fullver || ' (procs from ' || dbproc || ' need upgrade)'; + fullver = fullver || ' (core procs from "' || dbproc || '" need upgrade)'; + END IF; + + IF topo_scr_ver IS NOT NULL THEN + fullver = fullver || ' TOPOLOGY'; + IF topo_scr_ver != relproc THEN + fullver = fullver || ' (topology procs from "' || topo_scr_ver || '" need upgrade)'; + END IF; + END IF; + + IF rast_lib_ver IS NOT NULL THEN + fullver = fullver || ' RASTER'; + IF rast_lib_ver != relproc THEN + fullver = fullver || ' (raster lib from "' || rast_lib_ver || '" need upgrade)'; + END IF; + END IF; + + IF rast_scr_ver IS NOT NULL AND rast_scr_ver != relproc THEN + fullver = fullver || ' (raster procs from "' || rast_scr_ver || '" need upgrade)'; END IF; RETURN fullver; @@ -3473,178 +2464,73 @@ --------------------------------------------------------------- -- CASTS --------------------------------------------------------------- - --- Legacy ST_ variants of casts, to be removed in 2.0 - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_box2d(geometry) - RETURNS box2d - AS 'MODULE_PATHNAME','LWGEOM_to_BOX2DFLOAT4' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_box3d(geometry) - RETURNS box3d - AS 'MODULE_PATHNAME','LWGEOM_to_BOX3D' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_box(geometry) - RETURNS box - AS 'MODULE_PATHNAME','LWGEOM_to_BOX' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_box2d(box3d) - RETURNS box2d - AS 'MODULE_PATHNAME','BOX3D_to_BOX2DFLOAT4' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_box3d(box2d) - RETURNS box3d - AS 'MODULE_PATHNAME','BOX2DFLOAT4_to_BOX3D' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_box(box3d) - RETURNS box - AS 'MODULE_PATHNAME','BOX3D_to_BOX' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_text(geometry) - RETURNS text - AS 'MODULE_PATHNAME','LWGEOM_to_text' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_geometry(box2d) - RETURNS geometry - AS 'MODULE_PATHNAME','BOX2DFLOAT4_to_LWGEOM' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_geometry(box3d) - RETURNS geometry - AS 'MODULE_PATHNAME','BOX3D_to_LWGEOM' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_geometry(text) - RETURNS geometry - AS 'MODULE_PATHNAME','parse_WKT_lwgeom' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_geometry(chip) - RETURNS geometry - AS 'MODULE_PATHNAME','CHIP_to_LWGEOM' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_geometry(bytea) - RETURNS geometry - AS 'MODULE_PATHNAME','LWGEOM_from_bytea' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_bytea(geometry) - RETURNS bytea - AS 'MODULE_PATHNAME','LWGEOM_to_bytea' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_box3d_extent(box3d_extent) - RETURNS box3d - AS 'MODULE_PATHNAME', 'BOX3D_extent_to_BOX3D' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_box2d(box3d_extent) - RETURNS box2d - AS 'MODULE_PATHNAME', 'BOX3D_to_BOX2DFLOAT4' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.5.0 -CREATE OR REPLACE FUNCTION st_geometry(box3d_extent) - RETURNS geometry - AS 'MODULE_PATHNAME','BOX3D_to_LWGEOM' - LANGUAGE 'C' IMMUTABLE STRICT; - --- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- CREATE OR REPLACE FUNCTION box2d(geometry) RETURNS box2d - AS 'MODULE_PATHNAME','LWGEOM_to_BOX2DFLOAT4' - LANGUAGE 'C' IMMUTABLE STRICT; + AS 'MODULE_PATHNAME','LWGEOM_to_BOX2D' + LANGUAGE 'c' IMMUTABLE STRICT; CREATE OR REPLACE FUNCTION box3d(geometry) RETURNS box3d AS 'MODULE_PATHNAME','LWGEOM_to_BOX3D' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; CREATE OR REPLACE FUNCTION box(geometry) RETURNS box AS 'MODULE_PATHNAME','LWGEOM_to_BOX' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; CREATE OR REPLACE FUNCTION box2d(box3d) RETURNS box2d - AS 'MODULE_PATHNAME','BOX3D_to_BOX2DFLOAT4' - LANGUAGE 'C' IMMUTABLE STRICT; + AS 'MODULE_PATHNAME','BOX3D_to_BOX2D' + LANGUAGE 'c' IMMUTABLE STRICT; CREATE OR REPLACE FUNCTION box3d(box2d) RETURNS box3d - AS 'MODULE_PATHNAME','BOX2DFLOAT4_to_BOX3D' - LANGUAGE 'C' IMMUTABLE STRICT; + AS 'MODULE_PATHNAME','BOX2D_to_BOX3D' + LANGUAGE 'c' IMMUTABLE STRICT; CREATE OR REPLACE FUNCTION box(box3d) RETURNS box AS 'MODULE_PATHNAME','BOX3D_to_BOX' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; CREATE OR REPLACE FUNCTION text(geometry) RETURNS text AS 'MODULE_PATHNAME','LWGEOM_to_text' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- this is kept for backward-compatibility -- Deprecation in 1.2.3 CREATE OR REPLACE FUNCTION box3dtobox(box3d) RETURNS box AS 'SELECT box($1)' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; CREATE OR REPLACE FUNCTION geometry(box2d) RETURNS geometry - AS 'MODULE_PATHNAME','BOX2DFLOAT4_to_LWGEOM' - LANGUAGE 'C' IMMUTABLE STRICT; + AS 'MODULE_PATHNAME','BOX2D_to_LWGEOM' + LANGUAGE 'c' IMMUTABLE STRICT; CREATE OR REPLACE FUNCTION geometry(box3d) RETURNS geometry AS 'MODULE_PATHNAME','BOX3D_to_LWGEOM' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; CREATE OR REPLACE FUNCTION geometry(text) RETURNS geometry AS 'MODULE_PATHNAME','parse_WKT_lwgeom' - LANGUAGE 'C' IMMUTABLE STRICT; - -CREATE OR REPLACE FUNCTION geometry(chip) - RETURNS geometry - AS 'MODULE_PATHNAME','CHIP_to_LWGEOM' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; CREATE OR REPLACE FUNCTION geometry(bytea) RETURNS geometry AS 'MODULE_PATHNAME','LWGEOM_from_bytea' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; CREATE OR REPLACE FUNCTION bytea(geometry) RETURNS bytea AS 'MODULE_PATHNAME','LWGEOM_to_bytea' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- 7.3+ explicit casting definitions CREATE CAST (geometry AS box2d) WITH FUNCTION box2d(geometry) AS IMPLICIT; @@ -3657,201 +2543,118 @@ CREATE CAST (box3d AS geometry) WITH FUNCTION geometry(box3d) AS IMPLICIT; CREATE CAST (text AS geometry) WITH FUNCTION geometry(text) AS IMPLICIT; CREATE CAST (geometry AS text) WITH FUNCTION text(geometry) AS IMPLICIT; -CREATE CAST (chip AS geometry) WITH FUNCTION geometry(chip) AS IMPLICIT; CREATE CAST (bytea AS geometry) WITH FUNCTION geometry(bytea) AS IMPLICIT; CREATE CAST (geometry AS bytea) WITH FUNCTION bytea(geometry) AS IMPLICIT; --- Casts to allow the box3d_extent type to automatically cast to box3d/box2d in queries -CREATE CAST (box3d_extent AS box3d) WITH FUNCTION box3d_extent(box3d_extent) AS IMPLICIT; -CREATE CAST (box3d_extent AS box2d) WITH FUNCTION box2d(box3d_extent) AS IMPLICIT; -CREATE CAST (box3d_extent AS geometry) WITH FUNCTION geometry(box3d_extent) AS IMPLICIT; --------------------------------------------------------------- -- Algorithms --------------------------------------------------------------- --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION Simplify(geometry, float8) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_simplify2d' - LANGUAGE 'C' IMMUTABLE STRICT; - -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_Simplify(geometry, float8) RETURNS geometry AS 'MODULE_PATHNAME', 'LWGEOM_simplify2d' - LANGUAGE 'C' IMMUTABLE STRICT; - --- SnapToGrid(input, xoff, yoff, xsize, ysize) --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION SnapToGrid(geometry, float8, float8, float8, float8) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_snaptogrid' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; +-- ST_SnapToGrid(input, xoff, yoff, xsize, ysize) -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_SnapToGrid(geometry, float8, float8, float8, float8) RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_snaptogrid' - LANGUAGE 'C' IMMUTABLE STRICT; - --- SnapToGrid(input, xsize, ysize) # offsets=0 --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION SnapToGrid(geometry, float8, float8) - RETURNS geometry - AS 'SELECT SnapToGrid($1, 0, 0, $2, $3)' - LANGUAGE 'SQL' IMMUTABLE STRICT; + AS 'MODULE_PATHNAME', 'LWGEOM_snaptogrid' + LANGUAGE 'c' IMMUTABLE STRICT; +-- ST_SnapToGrid(input, xsize, ysize) # offsets=0 -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_SnapToGrid(geometry, float8, float8) RETURNS geometry AS 'SELECT ST_SnapToGrid($1, 0, 0, $2, $3)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- SnapToGrid(input, size) # xsize=ysize=size, offsets=0 --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION SnapToGrid(geometry, float8) - RETURNS geometry - AS 'SELECT SnapToGrid($1, 0, 0, $2, $2)' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; +-- ST_SnapToGrid(input, size) # xsize=ysize=size, offsets=0 -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_SnapToGrid(geometry, float8) RETURNS geometry AS 'SELECT ST_SnapToGrid($1, 0, 0, $2, $2)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- SnapToGrid(input, point_offsets, xsize, ysize, zsize, msize) --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION SnapToGrid(geometry, geometry, float8, float8, float8, float8) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_snaptogrid_pointoff' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; +-- ST_SnapToGrid(input, point_offsets, xsize, ysize, zsize, msize) -- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_SnapToGrid(geometry, geometry, float8, float8, float8, float8) +CREATE OR REPLACE FUNCTION ST_SnapToGrid(geom1 geometry, geom2 geometry, float8, float8, float8, float8) RETURNS geometry AS 'MODULE_PATHNAME', 'LWGEOM_snaptogrid_pointoff' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION Segmentize(geometry, float8) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_segmentize2d' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_Segmentize(geometry, float8) RETURNS geometry AS 'MODULE_PATHNAME', 'LWGEOM_segmentize2d' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; --------------------------------------------------------------- -- LRS --------------------------------------------------------------- --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION line_interpolate_point(geometry, float8) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_line_interpolate_point' - LANGUAGE 'C' IMMUTABLE STRICT; - -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_line_interpolate_point(geometry, float8) RETURNS geometry AS 'MODULE_PATHNAME', 'LWGEOM_line_interpolate_point' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION line_substring(geometry, float8, float8) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_line_substring' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_line_substring(geometry, float8, float8) RETURNS geometry AS 'MODULE_PATHNAME', 'LWGEOM_line_substring' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION line_locate_point(geometry, geometry) - RETURNS float8 - AS 'MODULE_PATHNAME', 'LWGEOM_line_locate_point' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_line_locate_point(geometry, geometry) +CREATE OR REPLACE FUNCTION ST_line_locate_point(geom1 geometry, geom2 geometry) RETURNS float8 AS 'MODULE_PATHNAME', 'LWGEOM_line_locate_point' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION locate_between_measures(geometry, float8, float8) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_locate_between_m' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_locate_between_measures(geometry, float8, float8) RETURNS geometry AS 'MODULE_PATHNAME', 'LWGEOM_locate_between_m' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION locate_along_measure(geometry, float8) - RETURNS geometry - AS $$ SELECT locate_between_measures($1, $2, $2) $$ - LANGUAGE 'sql' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_locate_along_measure(geometry, float8) RETURNS geometry - AS $$ SELECT locate_between_measures($1, $2, $2) $$ + AS $$ SELECT ST_locate_between_measures($1, $2, $2) $$ LANGUAGE 'sql' IMMUTABLE STRICT; -- Availability: 1.5.0 CREATE OR REPLACE FUNCTION ST_AddMeasure(geometry, float8, float8) RETURNS geometry AS 'MODULE_PATHNAME', 'ST_AddMeasure' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; --------------------------------------------------------------- -- GEOS --------------------------------------------------------------- --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION intersection(geometry,geometry) - RETURNS geometry - AS 'MODULE_PATHNAME','intersection' - LANGUAGE 'C' IMMUTABLE STRICT; - --- PostGIS equivalent function: intersection(geometry,geometry) -CREATE OR REPLACE FUNCTION ST_Intersection(geometry,geometry) +-- PostGIS equivalent function: intersection(geom1 geometry, geom2 geometry) +CREATE OR REPLACE FUNCTION ST_Intersection(geom1 geometry, geom2 geometry) RETURNS geometry AS 'MODULE_PATHNAME','intersection' - LANGUAGE 'C' IMMUTABLE STRICT - COST 100; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION buffer(geometry,float8) - RETURNS geometry - AS 'MODULE_PATHNAME','buffer' - LANGUAGE 'C' IMMUTABLE STRICT + LANGUAGE 'c' IMMUTABLE STRICT COST 100; -- PostGIS equivalent function: buffer(geometry,float8) CREATE OR REPLACE FUNCTION ST_Buffer(geometry,float8) RETURNS geometry AS 'MODULE_PATHNAME','buffer' - LANGUAGE 'C' IMMUTABLE STRICT + LANGUAGE 'c' IMMUTABLE STRICT COST 100; -- Availability: 1.5.0 - requires GEOS-3.2 or higher CREATE OR REPLACE FUNCTION _ST_Buffer(geometry,float8,cstring) RETURNS geometry AS 'MODULE_PATHNAME','buffer' - LANGUAGE 'C' IMMUTABLE STRICT + LANGUAGE 'c' IMMUTABLE STRICT COST 100; -- Availability: 1.2.2 @@ -3860,66 +2663,52 @@ AS $$ SELECT _ST_Buffer($1, $2, CAST('quad_segs='||CAST($3 AS text) as cstring)) $$ - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -- Availability: 1.5.0 -CREATE OR REPLACE FUNCTION ST_buffer(geometry,float8,text) +CREATE OR REPLACE FUNCTION ST_Buffer(geometry,float8,text) RETURNS geometry AS $$ SELECT _ST_Buffer($1, $2, CAST( regexp_replace($3, '^[0123456789]+$', 'quad_segs='||$3) AS cstring) ) $$ - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION buffer(geometry,float8,integer) - RETURNS geometry - AS 'SELECT ST_Buffer($1, $2, $3)' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION convexhull(geometry) - RETURNS geometry - AS 'MODULE_PATHNAME','convexhull' - LANGUAGE 'C' IMMUTABLE STRICT - COST 100; +-- Availability: 2.0.0 - requires GEOS-3.2 or higher +CREATE OR REPLACE FUNCTION ST_OffsetCurve(line geometry, distance float8, params text DEFAULT '') + RETURNS geometry + AS 'MODULE_PATHNAME','ST_OffsetCurve' + LANGUAGE 'c' IMMUTABLE STRICT + COST 100; -- PostGIS equivalent function: convexhull(geometry) CREATE OR REPLACE FUNCTION ST_ConvexHull(geometry) RETURNS geometry AS 'MODULE_PATHNAME','convexhull' - LANGUAGE 'C' IMMUTABLE STRICT + LANGUAGE 'c' IMMUTABLE STRICT COST 100; -- Only accepts LINESTRING as parameters. -- Availability: 1.4.0 -CREATE OR REPLACE FUNCTION _ST_LineCrossingDirection(geometry, geometry) +CREATE OR REPLACE FUNCTION _ST_LineCrossingDirection(geom1 geometry, geom2 geometry) RETURNS integer AS 'MODULE_PATHNAME', 'ST_LineCrossingDirection' - LANGUAGE 'C' IMMUTABLE STRICT + LANGUAGE 'c' IMMUTABLE STRICT COST 100; -- Availability: 1.4.0 -CREATE OR REPLACE FUNCTION ST_LineCrossingDirection(geometry, geometry) +CREATE OR REPLACE FUNCTION ST_LineCrossingDirection(geom1 geometry, geom2 geometry) RETURNS integer AS $$ SELECT CASE WHEN NOT $1 && $2 THEN 0 ELSE _ST_LineCrossingDirection($1,$2) END $$ LANGUAGE 'sql' IMMUTABLE; - --- Only accepts LINESTRING as parameters. --- Availability: 1.4.0 -CREATE OR REPLACE FUNCTION ST_LocateBetweenElevations(geometry, float8, float8) - RETURNS geometry - AS 'MODULE_PATHNAME', 'ST_LocateBetweenElevations' - LANGUAGE 'C' IMMUTABLE STRICT; - -- Requires GEOS >= 3.0.0 -- Availability: 1.3.3 CREATE OR REPLACE FUNCTION ST_SimplifyPreserveTopology(geometry, float8) RETURNS geometry AS 'MODULE_PATHNAME','topologypreservesimplify' - LANGUAGE 'C' IMMUTABLE STRICT + LANGUAGE 'c' IMMUTABLE STRICT COST 100; -- Requires GEOS >= 3.1.0 @@ -3927,131 +2716,300 @@ CREATE OR REPLACE FUNCTION ST_IsValidReason(geometry) RETURNS text AS 'MODULE_PATHNAME', 'isvalidreason' - LANGUAGE 'C' IMMUTABLE STRICT + LANGUAGE 'c' IMMUTABLE STRICT + COST 100; + +-- Availability: 2.0.0 +CREATE TYPE valid_detail AS ( + valid bool, + reason varchar, + location geometry +); + +-- Requires GEOS >= 3.3.0 +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION ST_IsValidDetail(geometry) + RETURNS valid_detail + AS 'MODULE_PATHNAME', 'isvaliddetail' + LANGUAGE 'c' IMMUTABLE STRICT + COST 100; + +-- Requires GEOS >= 3.3.0 +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION ST_IsValidDetail(geometry, int4) + RETURNS valid_detail + AS 'MODULE_PATHNAME', 'isvaliddetail' + LANGUAGE 'c' IMMUTABLE STRICT + COST 100; + +-- Requires GEOS >= 3.3.0 +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION ST_IsValidReason(geometry, int4) + RETURNS text + AS $$ +SELECT CASE WHEN valid THEN 'Valid Geometry' ELSE reason END FROM ( + SELECT (ST_isValidDetail($1, $2)).* +) foo + $$ + LANGUAGE 'sql' IMMUTABLE STRICT + COST 100; + +-- Requires GEOS >= 3.3.0 +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION ST_IsValid(geometry, int4) + RETURNS boolean + AS 'SELECT (ST_isValidDetail($1, $2)).valid' + LANGUAGE 'sql' IMMUTABLE STRICT COST 100; -#if POSTGIS_GEOS_VERSION >= 32 + -- Requires GEOS >= 3.2.0 -- Availability: 1.5.0 -CREATE OR REPLACE FUNCTION ST_HausdorffDistance(geometry, geometry) +CREATE OR REPLACE FUNCTION ST_HausdorffDistance(geom1 geometry, geom2 geometry) RETURNS FLOAT8 AS 'MODULE_PATHNAME', 'hausdorffdistance' - LANGUAGE 'C' IMMUTABLE STRICT + LANGUAGE 'c' IMMUTABLE STRICT COST 100; -#endif -#if POSTGIS_GEOS_VERSION >= 32 -- Requires GEOS >= 3.2.0 -- Availability: 1.5.0 -CREATE OR REPLACE FUNCTION ST_HausdorffDistance(geometry, geometry, float8) +CREATE OR REPLACE FUNCTION ST_HausdorffDistance(geom1 geometry, geom2 geometry, float8) RETURNS FLOAT8 AS 'MODULE_PATHNAME', 'hausdorffdistancedensify' - LANGUAGE 'C' IMMUTABLE STRICT + LANGUAGE 'c' IMMUTABLE STRICT COST 100; -#endif - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION difference(geometry,geometry) - RETURNS geometry - AS 'MODULE_PATHNAME','difference' - LANGUAGE 'C' IMMUTABLE STRICT; --- PostGIS equivalent function: difference(geometry,geometry) -CREATE OR REPLACE FUNCTION ST_Difference(geometry,geometry) +-- PostGIS equivalent function: difference(geom1 geometry, geom2 geometry) +CREATE OR REPLACE FUNCTION ST_Difference(geom1 geometry, geom2 geometry) RETURNS geometry AS 'MODULE_PATHNAME','difference' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION boundary(geometry) - RETURNS geometry - AS 'MODULE_PATHNAME','boundary' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- PostGIS equivalent function: boundary(geometry) CREATE OR REPLACE FUNCTION ST_Boundary(geometry) RETURNS geometry AS 'MODULE_PATHNAME','boundary' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION symdifference(geometry,geometry) - RETURNS geometry - AS 'MODULE_PATHNAME','symdifference' - LANGUAGE 'C' IMMUTABLE STRICT; - --- PostGIS equivalent function: symdifference(geometry,geometry) -CREATE OR REPLACE FUNCTION ST_SymDifference(geometry,geometry) - RETURNS geometry - AS 'MODULE_PATHNAME','symdifference' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION symmetricdifference(geometry,geometry) +-- PostGIS equivalent function: symdifference(geom1 geometry, geom2 geometry) +CREATE OR REPLACE FUNCTION ST_SymDifference(geom1 geometry, geom2 geometry) RETURNS geometry AS 'MODULE_PATHNAME','symdifference' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_symmetricdifference(geometry,geometry) +CREATE OR REPLACE FUNCTION ST_symmetricdifference(geom1 geometry, geom2 geometry) RETURNS geometry AS 'MODULE_PATHNAME','symdifference' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION GeomUnion(geometry,geometry) +-- PostGIS equivalent function: GeomUnion(geom1 geometry, geom2 geometry) +CREATE OR REPLACE FUNCTION ST_Union(geom1 geometry, geom2 geometry) RETURNS geometry AS 'MODULE_PATHNAME','geomunion' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Availability: 2.0.0 +-- Requires: GEOS-3.3.0 +CREATE OR REPLACE FUNCTION ST_UnaryUnion(geometry) + RETURNS geometry + AS 'MODULE_PATHNAME','ST_UnaryUnion' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- ST_RemoveRepeatedPoints(in geometry) +-- +-- Removes duplicate vertices in input. +-- Only checks consecutive points for lineal and polygonal geoms. +-- Checks all points for multipoint geoms. +-- +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION ST_RemoveRepeatedPoints(geometry) + RETURNS geometry + AS 'MODULE_PATHNAME', 'ST_RemoveRepeatedPoints' + LANGUAGE 'c' IMMUTABLE STRICT + COST 100; + +-------------------------------------------------------------------------------- +-- ST_CleanGeometry / ST_MakeValid +-------------------------------------------------------------------------------- + +-- ST_MakeValid(in geometry) +-- +-- Try to make the input valid maintaining the boundary profile. +-- May return a collection. +-- May return a geometry with inferior dimensions (dimensional collapses). +-- May return NULL if can't handle input. +-- +-- Requires: GEOS-3.3.0 +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION ST_MakeValid(geometry) + RETURNS geometry + AS 'MODULE_PATHNAME', 'ST_MakeValid' + LANGUAGE 'c' IMMUTABLE STRICT + COST 100; + +-- ST_CleanGeometry(in geometry) +-- +-- Make input: +-- - Simple (lineal components) +-- - Valid (polygonal components) +-- - Obeying the RHR (if polygonal) +-- - Simplified of consecutive duplicated points +-- Ensuring: +-- - No input vertexes are discarded (except consecutive repeated ones) +-- - Output geometry type matches input +-- +-- Returns NULL on failure. +-- +-- Requires: GEOS-3.3.0 +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION ST_CleanGeometry(geometry) + RETURNS geometry + AS 'MODULE_PATHNAME', 'ST_CleanGeometry' + LANGUAGE 'c' IMMUTABLE STRICT + COST 100; + +-------------------------------------------------------------------------------- +-- ST_Split +-------------------------------------------------------------------------------- + +-- ST_Split(in geometry, blade geometry) +-- +-- Split a geometry in parts after cutting it with given blade. +-- Returns a collection containing all parts. +-- +-- Note that multi-part geometries will be returned exploded, +-- no matter relation to blade. +-- +-- Availability: 2.0.0 +-- +CREATE OR REPLACE FUNCTION ST_Split(geom1 geometry, geom2 geometry) + RETURNS geometry + AS 'MODULE_PATHNAME', 'ST_Split' + LANGUAGE 'c' IMMUTABLE STRICT + COST 100; + +-------------------------------------------------------------------------------- +-- ST_SharedPaths +-------------------------------------------------------------------------------- + +-- ST_SharedPaths(lineal1 geometry, lineal1 geometry) +-- +-- Returns a collection containing paths shared by the two +-- input geometries. Those going in the same direction are +-- in the first element of the collection, those going in the +-- opposite direction are in the second element. +-- +-- The paths themselves are given in the direction of the +-- first geometry. +-- +-- Availability: 2.0.0 +-- Requires GEOS >= 3.3.0 +-- +CREATE OR REPLACE FUNCTION ST_SharedPaths(geom1 geometry, geom2 geometry) + RETURNS geometry + AS 'MODULE_PATHNAME', 'ST_SharedPaths' + LANGUAGE 'c' IMMUTABLE STRICT + COST 100; + +-------------------------------------------------------------------------------- +-- ST_Snap +-------------------------------------------------------------------------------- + +-- ST_Snap(g1 geometry, g2 geometry, tolerance float8) +-- +-- Snap first geometry against second. +-- +-- Availability: 2.0.0 +-- Requires GEOS >= 3.3.0 +-- +CREATE OR REPLACE FUNCTION ST_Snap(geom1 geometry, geom2 geometry, float8) + RETURNS geometry + AS 'MODULE_PATHNAME', 'ST_Snap' + LANGUAGE 'c' IMMUTABLE STRICT + COST 100; + +-------------------------------------------------------------------------------- +-- ST_RelateMatch +-------------------------------------------------------------------------------- + +-- ST_RelateMatch(matrix text, pattern text) +-- +-- Returns true if pattern 'pattern' matches DE9 intersection matrix 'matrix' +-- +-- Availability: 2.0.0 +-- Requires GEOS >= 3.3.0 +-- +CREATE OR REPLACE FUNCTION ST_RelateMatch(text, text) + RETURNS bool + AS 'MODULE_PATHNAME', 'ST_RelateMatch' + LANGUAGE 'c' IMMUTABLE STRICT + COST 100; + +-------------------------------------------------------------------------------- +-- ST_Node +-------------------------------------------------------------------------------- + +-- ST_Node(in geometry) +-- +-- Fully node lines in input using the least set of nodes while +-- preserving each of the input ones. +-- Returns a linestring or a multilinestring containing all parts. +-- +-- Availability: 2.0.0 +-- Requires GEOS >= 3.3.0 +-- +CREATE OR REPLACE FUNCTION ST_Node(g geometry) + RETURNS geometry + AS 'MODULE_PATHNAME', 'ST_Node' + LANGUAGE 'c' IMMUTABLE STRICT + COST 100; --- PostGIS equivalent function: GeomUnion(geometry,geometry) -CREATE OR REPLACE FUNCTION ST_Union(geometry,geometry) - RETURNS geometry - AS 'MODULE_PATHNAME','geomunion' - LANGUAGE 'C' IMMUTABLE STRICT; -------------------------------------------------------------------------------- -- Aggregates and their supporting functions -------------------------------------------------------------------------------- --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION collect(geometry, geometry) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_collect' - LANGUAGE 'C' IMMUTABLE; +------------------------------------------------------------------------ +-- Availability: 1.2.2 +CREATE OR REPLACE FUNCTION ST_Combine_BBox(box3d,geometry) + RETURNS box3d + AS 'MODULE_PATHNAME', 'BOX3D_combine' + LANGUAGE 'c' IMMUTABLE; -- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_collect(geometry, geometry) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_collect' - LANGUAGE 'C' IMMUTABLE; +CREATE AGGREGATE ST_Extent( + sfunc = ST_combine_bbox, + finalfunc = box2d, + basetype = geometry, + stype = box3d + ); --- Deprecation in 1.2.3 -CREATE AGGREGATE memcollect( - sfunc = ST_collect, +-- Availability: 2.0.0 +CREATE AGGREGATE ST_3DExtent( + sfunc = ST_combine_bbox, basetype = geometry, - stype = geometry + stype = box3d ); -- Availability: 1.2.2 -CREATE AGGREGATE ST_memcollect( +CREATE OR REPLACE FUNCTION ST_Collect(geom1 geometry, geom2 geometry) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_collect' + LANGUAGE 'c' IMMUTABLE; + +-- Availability: 1.2.2 +CREATE AGGREGATE ST_MemCollect( sfunc = ST_collect, basetype = geometry, stype = geometry ); -- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_collect (geometry[]) +CREATE OR REPLACE FUNCTION ST_Collect(geometry[]) RETURNS geometry AS 'MODULE_PATHNAME', 'LWGEOM_collect_garray' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE AGGREGATE MemGeomUnion ( - basetype = geometry, - sfunc = geomunion, - stype = geometry - ); + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE AGGREGATE ST_MemUnion ( @@ -4068,12 +3026,12 @@ CREATE OR REPLACE FUNCTION pgis_abs_in(cstring) RETURNS pgis_abs AS 'MODULE_PATHNAME' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; CREATE OR REPLACE FUNCTION pgis_abs_out(pgis_abs) RETURNS cstring AS 'MODULE_PATHNAME' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; CREATE TYPE pgis_abs ( internallength = 8, @@ -4086,45 +3044,37 @@ CREATE OR REPLACE FUNCTION pgis_geometry_accum_transfn(pgis_abs, geometry) RETURNS pgis_abs AS 'MODULE_PATHNAME' - LANGUAGE 'C'; + LANGUAGE 'c'; -- Availability: 1.4.0 CREATE OR REPLACE FUNCTION pgis_geometry_accum_finalfn(pgis_abs) RETURNS geometry[] AS 'MODULE_PATHNAME' - LANGUAGE 'C'; + LANGUAGE 'c'; -- Availability: 1.4.0 CREATE OR REPLACE FUNCTION pgis_geometry_union_finalfn(pgis_abs) RETURNS geometry AS 'MODULE_PATHNAME' - LANGUAGE 'C'; + LANGUAGE 'c'; -- Availability: 1.4.0 CREATE OR REPLACE FUNCTION pgis_geometry_collect_finalfn(pgis_abs) RETURNS geometry AS 'MODULE_PATHNAME' - LANGUAGE 'C'; + LANGUAGE 'c'; -- Availability: 1.4.0 CREATE OR REPLACE FUNCTION pgis_geometry_polygonize_finalfn(pgis_abs) RETURNS geometry AS 'MODULE_PATHNAME' - LANGUAGE 'C'; + LANGUAGE 'c'; -- Availability: 1.4.0 CREATE OR REPLACE FUNCTION pgis_geometry_makeline_finalfn(pgis_abs) RETURNS geometry AS 'MODULE_PATHNAME' - LANGUAGE 'C'; - --- Deprecation in: 1.2.3 -CREATE AGGREGATE accum ( - sfunc = pgis_geometry_accum_transfn, - basetype = geometry, - stype = pgis_abs, - finalfunc = pgis_geometry_accum_finalfn - ); + LANGUAGE 'c'; -- Availability: 1.2.2 CREATE AGGREGATE ST_Accum ( @@ -4134,23 +3084,11 @@ finalfunc = pgis_geometry_accum_finalfn ); --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION unite_garray (geometry[]) - RETURNS geometry - AS 'MODULE_PATHNAME', 'pgis_union_geometry_array' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.4.0 -CREATE OR REPLACE FUNCTION ST_unite_garray (geometry[]) - RETURNS geometry - AS 'MODULE_PATHNAME','pgis_union_geometry_array' - LANGUAGE 'C' IMMUTABLE STRICT; - -- Availability: 1.4.0 CREATE OR REPLACE FUNCTION ST_Union (geometry[]) RETURNS geometry AS 'MODULE_PATHNAME','pgis_union_geometry_array' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE AGGREGATE ST_Union ( @@ -4160,14 +3098,6 @@ finalfunc = pgis_geometry_union_finalfn ); --- Deprecation in 1.2.3 -CREATE AGGREGATE collect ( - basetype = geometry, - sfunc = pgis_geometry_accum_transfn, - stype = pgis_abs, - finalfunc = pgis_geometry_collect_finalfn -); - -- Availability: 1.2.2 CREATE AGGREGATE ST_Collect ( BASETYPE = geometry, @@ -4176,14 +3106,6 @@ FINALFUNC = pgis_geometry_collect_finalfn ); --- Deprecation in 1.2.3 -CREATE AGGREGATE Polygonize ( - BASETYPE = geometry, - SFUNC = pgis_geometry_accum_transfn, - STYPE = pgis_abs, - FINALFUNC = pgis_geometry_polygonize_finalfn - ); - -- Availability: 1.2.2 CREATE AGGREGATE ST_Polygonize ( BASETYPE = geometry, @@ -4192,14 +3114,6 @@ FINALFUNC = pgis_geometry_polygonize_finalfn ); --- Deprecation in 1.2.3 -CREATE AGGREGATE makeline ( - BASETYPE = geometry, - SFUNC = pgis_geometry_accum_transfn, - STYPE = pgis_abs, - FINALFUNC = pgis_geometry_makeline_finalfn - ); - -- Availability: 1.2.2 CREATE AGGREGATE ST_MakeLine ( BASETYPE = geometry, @@ -4212,476 +3126,346 @@ -------------------------------------------------------------------------------- --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION relate(geometry,geometry) +-- Availability: 1.2.2 +CREATE OR REPLACE FUNCTION ST_Relate(geom1 geometry, geom2 geometry) RETURNS text AS 'MODULE_PATHNAME','relate_full' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_relate(geometry,geometry) +-- Availability: 2.0.0 +-- Requires GEOS >= 3.3.0 +CREATE OR REPLACE FUNCTION ST_Relate(geom1 geometry, geom2 geometry, int4) RETURNS text AS 'MODULE_PATHNAME','relate_full' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION relate(geometry,geometry,text) - RETURNS boolean - AS 'MODULE_PATHNAME','relate_pattern' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; --- PostGIS equivalent function: relate(geometry,geometry,text) -CREATE OR REPLACE FUNCTION ST_Relate(geometry,geometry,text) +-- PostGIS equivalent function: relate(geom1 geometry, geom2 geometry,text) +CREATE OR REPLACE FUNCTION ST_Relate(geom1 geometry, geom2 geometry,text) RETURNS boolean AS 'MODULE_PATHNAME','relate_pattern' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION disjoint(geometry,geometry) - RETURNS boolean - AS 'MODULE_PATHNAME' - LANGUAGE 'C' IMMUTABLE STRICT; - --- PostGIS equivalent function: disjoint(geometry,geometry) -CREATE OR REPLACE FUNCTION ST_Disjoint(geometry,geometry) +-- PostGIS equivalent function: disjoint(geom1 geometry, geom2 geometry) +CREATE OR REPLACE FUNCTION ST_Disjoint(geom1 geometry, geom2 geometry) RETURNS boolean AS 'MODULE_PATHNAME','disjoint' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION touches(geometry,geometry) - RETURNS boolean - AS 'MODULE_PATHNAME' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; --- PostGIS equivalent function: touches(geometry,geometry) -CREATE OR REPLACE FUNCTION _ST_Touches(geometry,geometry) +-- PostGIS equivalent function: touches(geom1 geometry, geom2 geometry) +CREATE OR REPLACE FUNCTION _ST_Touches(geom1 geometry, geom2 geometry) RETURNS boolean AS 'MODULE_PATHNAME','touches' - LANGUAGE 'C' IMMUTABLE STRICT + LANGUAGE 'c' IMMUTABLE STRICT COST 100; -- Availability: 1.2.2 -- Inlines index magic -CREATE OR REPLACE FUNCTION ST_Touches(geometry,geometry) +CREATE OR REPLACE FUNCTION ST_Touches(geom1 geometry, geom2 geometry) RETURNS boolean AS 'SELECT $1 && $2 AND _ST_Touches($1,$2)' - LANGUAGE 'SQL' IMMUTABLE; + LANGUAGE 'sql' IMMUTABLE; -- Availability: 1.3.4 -CREATE OR REPLACE FUNCTION _ST_DWithin(geometry,geometry,float8) +CREATE OR REPLACE FUNCTION _ST_DWithin(geom1 geometry, geom2 geometry,float8) RETURNS boolean AS 'MODULE_PATHNAME', 'LWGEOM_dwithin' - LANGUAGE 'C' IMMUTABLE STRICT + LANGUAGE 'c' IMMUTABLE STRICT COST 100; -- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_DWithin(geometry, geometry, float8) +CREATE OR REPLACE FUNCTION ST_DWithin(geom1 geometry, geom2 geometry, float8) RETURNS boolean AS 'SELECT $1 && ST_Expand($2,$3) AND $2 && ST_Expand($1,$3) AND _ST_DWithin($1, $2, $3)' - LANGUAGE 'SQL' IMMUTABLE; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION intersects(geometry,geometry) - RETURNS boolean - AS 'MODULE_PATHNAME' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE; --- PostGIS equivalent function: intersects(geometry,geometry) -CREATE OR REPLACE FUNCTION _ST_Intersects(geometry,geometry) +-- PostGIS equivalent function: intersects(geom1 geometry, geom2 geometry) +CREATE OR REPLACE FUNCTION _ST_Intersects(geom1 geometry, geom2 geometry) RETURNS boolean AS 'MODULE_PATHNAME','intersects' - LANGUAGE 'C' IMMUTABLE STRICT + LANGUAGE 'c' IMMUTABLE STRICT COST 100; -- Availability: 1.2.2 -- Inlines index magic -CREATE OR REPLACE FUNCTION ST_Intersects(geometry,geometry) +CREATE OR REPLACE FUNCTION ST_Intersects(geom1 geometry, geom2 geometry) RETURNS boolean AS 'SELECT $1 && $2 AND _ST_Intersects($1,$2)' - LANGUAGE 'SQL' IMMUTABLE; + LANGUAGE 'sql' IMMUTABLE; --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION crosses(geometry,geometry) - RETURNS boolean - AS 'MODULE_PATHNAME' - LANGUAGE 'C' IMMUTABLE STRICT; - --- PostGIS equivalent function: crosses(geometry,geometry) -CREATE OR REPLACE FUNCTION _ST_Crosses(geometry,geometry) +-- PostGIS equivalent function: crosses(geom1 geometry, geom2 geometry) +CREATE OR REPLACE FUNCTION _ST_Crosses(geom1 geometry, geom2 geometry) RETURNS boolean AS 'MODULE_PATHNAME','crosses' - LANGUAGE 'C' IMMUTABLE STRICT + LANGUAGE 'c' IMMUTABLE STRICT COST 100; -- Availability: 1.2.2 -- Inlines index magic -CREATE OR REPLACE FUNCTION ST_Crosses(geometry,geometry) +CREATE OR REPLACE FUNCTION ST_Crosses(geom1 geometry, geom2 geometry) RETURNS boolean AS 'SELECT $1 && $2 AND _ST_Crosses($1,$2)' - LANGUAGE 'SQL' IMMUTABLE; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION within(geometry,geometry) - RETURNS boolean - AS 'MODULE_PATHNAME' - LANGUAGE 'C' IMMUTABLE STRICT; - --- PostGIS equivalent function: within(geometry,geometry) -CREATE OR REPLACE FUNCTION _ST_Within(geometry,geometry) - RETURNS boolean - AS 'MODULE_PATHNAME','within' - LANGUAGE 'C' IMMUTABLE STRICT - COST 100; - --- Availability: 1.2.2 --- Inlines index magic -CREATE OR REPLACE FUNCTION ST_Within(geometry,geometry) - RETURNS boolean - AS 'SELECT $1 && $2 AND _ST_Within($1,$2)' - LANGUAGE 'SQL' IMMUTABLE; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION Contains(geometry,geometry) - RETURNS boolean - AS 'MODULE_PATHNAME' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE; --- PostGIS equivalent function: contains(geometry,geometry) -CREATE OR REPLACE FUNCTION _ST_Contains(geometry,geometry) +-- PostGIS equivalent function: contains(geom1 geometry, geom2 geometry) +CREATE OR REPLACE FUNCTION _ST_Contains(geom1 geometry, geom2 geometry) RETURNS boolean AS 'MODULE_PATHNAME','contains' - LANGUAGE 'C' IMMUTABLE STRICT + LANGUAGE 'c' IMMUTABLE STRICT COST 100; -- Availability: 1.2.2 -- Inlines index magic -CREATE OR REPLACE FUNCTION ST_Contains(geometry,geometry) +CREATE OR REPLACE FUNCTION ST_Contains(geom1 geometry, geom2 geometry) RETURNS boolean AS 'SELECT $1 && $2 AND _ST_Contains($1,$2)' - LANGUAGE 'SQL' IMMUTABLE; + LANGUAGE 'sql' IMMUTABLE; -- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION _ST_CoveredBy(geometry,geometry) +CREATE OR REPLACE FUNCTION _ST_CoveredBy(geom1 geometry, geom2 geometry) RETURNS boolean AS 'MODULE_PATHNAME', 'coveredby' - LANGUAGE 'C' IMMUTABLE STRICT + LANGUAGE 'c' IMMUTABLE STRICT COST 100; -- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_CoveredBy(geometry,geometry) +CREATE OR REPLACE FUNCTION ST_CoveredBy(geom1 geometry, geom2 geometry) RETURNS boolean AS 'SELECT $1 && $2 AND _ST_CoveredBy($1,$2)' - LANGUAGE 'SQL' IMMUTABLE; + LANGUAGE 'sql' IMMUTABLE; -- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION _ST_Covers(geometry,geometry) +CREATE OR REPLACE FUNCTION _ST_Covers(geom1 geometry, geom2 geometry) RETURNS boolean AS 'MODULE_PATHNAME', 'covers' - LANGUAGE 'C' IMMUTABLE STRICT + LANGUAGE 'c' IMMUTABLE STRICT COST 100; -- Availability: 1.2.2 -- Inlines index magic -CREATE OR REPLACE FUNCTION ST_Covers(geometry,geometry) +CREATE OR REPLACE FUNCTION ST_Covers(geom1 geometry, geom2 geometry) RETURNS boolean AS 'SELECT $1 && $2 AND _ST_Covers($1,$2)' - LANGUAGE 'SQL' IMMUTABLE; + LANGUAGE 'sql' IMMUTABLE; -- Availability: 1.4.0 -CREATE OR REPLACE FUNCTION _ST_ContainsProperly(geometry,geometry) +CREATE OR REPLACE FUNCTION _ST_ContainsProperly(geom1 geometry, geom2 geometry) RETURNS boolean AS 'MODULE_PATHNAME','containsproperly' - LANGUAGE 'C' IMMUTABLE STRICT + LANGUAGE 'c' IMMUTABLE STRICT COST 100; -- Availability: 1.4.0 -- Inlines index magic -CREATE OR REPLACE FUNCTION ST_ContainsProperly(geometry,geometry) +CREATE OR REPLACE FUNCTION ST_ContainsProperly(geom1 geometry, geom2 geometry) RETURNS boolean AS 'SELECT $1 && $2 AND _ST_ContainsProperly($1,$2)' - LANGUAGE 'SQL' IMMUTABLE; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION overlaps(geometry,geometry) - RETURNS boolean - AS 'MODULE_PATHNAME' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE; --- PostGIS equivalent function: overlaps(geometry,geometry) -CREATE OR REPLACE FUNCTION _ST_Overlaps(geometry,geometry) +-- PostGIS equivalent function: overlaps(geom1 geometry, geom2 geometry) +CREATE OR REPLACE FUNCTION _ST_Overlaps(geom1 geometry, geom2 geometry) RETURNS boolean AS 'MODULE_PATHNAME','overlaps' - LANGUAGE 'C' IMMUTABLE STRICT + LANGUAGE 'c' IMMUTABLE STRICT COST 100; +-- PostGIS equivalent function: within(geom1 geometry, geom2 geometry) +CREATE OR REPLACE FUNCTION _ST_Within(geom1 geometry, geom2 geometry) + RETURNS boolean + AS 'SELECT _ST_Contains($2,$1)' + LANGUAGE 'sql' IMMUTABLE; + -- Availability: 1.2.2 -- Inlines index magic -CREATE OR REPLACE FUNCTION ST_Overlaps(geometry,geometry) +CREATE OR REPLACE FUNCTION ST_Within(geom1 geometry, geom2 geometry) RETURNS boolean - AS 'SELECT $1 && $2 AND _ST_Overlaps($1,$2)' - LANGUAGE 'SQL' IMMUTABLE; + AS 'SELECT $1 && $2 AND _ST_Contains($2,$1)' + LANGUAGE 'sql' IMMUTABLE; --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION IsValid(geometry) +-- Availability: 1.2.2 +-- Inlines index magic +CREATE OR REPLACE FUNCTION ST_Overlaps(geom1 geometry, geom2 geometry) RETURNS boolean - AS 'MODULE_PATHNAME', 'isvalid' - LANGUAGE 'C' IMMUTABLE STRICT - COST 100; + AS 'SELECT $1 && $2 AND _ST_Overlaps($1,$2)' + LANGUAGE 'sql' IMMUTABLE; -- PostGIS equivalent function: IsValid(geometry) -- TODO: change null returns to true CREATE OR REPLACE FUNCTION ST_IsValid(geometry) RETURNS boolean AS 'MODULE_PATHNAME', 'isvalid' - LANGUAGE 'C' IMMUTABLE STRICT + LANGUAGE 'c' IMMUTABLE STRICT COST 100; --- This is also available w/out GEOS -CREATE OR REPLACE FUNCTION Centroid(geometry) - RETURNS geometry - AS 'MODULE_PATHNAME' - LANGUAGE 'C' IMMUTABLE STRICT; - -- PostGIS equivalent function: Centroid(geometry) CREATE OR REPLACE FUNCTION ST_Centroid(geometry) RETURNS geometry - AS 'MODULE_PATHNAME', 'centroid' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION IsRing(geometry) - RETURNS boolean - AS 'MODULE_PATHNAME' - LANGUAGE 'C' IMMUTABLE STRICT; - + AS 'MODULE_PATHNAME', 'centroid' + LANGUAGE 'c' IMMUTABLE STRICT; + -- PostGIS equivalent function: IsRing(geometry) CREATE OR REPLACE FUNCTION ST_IsRing(geometry) RETURNS boolean AS 'MODULE_PATHNAME', 'isring' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION PointOnSurface(geometry) - RETURNS geometry - AS 'MODULE_PATHNAME' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- PostGIS equivalent function: PointOnSurface(geometry) CREATE OR REPLACE FUNCTION ST_PointOnSurface(geometry) RETURNS geometry AS 'MODULE_PATHNAME', 'pointonsurface' - LANGUAGE 'C' IMMUTABLE STRICT + LANGUAGE 'c' IMMUTABLE STRICT COST 100; --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION IsSimple(geometry) - RETURNS boolean - AS 'MODULE_PATHNAME', 'issimple' - LANGUAGE 'C' IMMUTABLE STRICT; - -- PostGIS equivalent function: IsSimple(geometry) CREATE OR REPLACE FUNCTION ST_IsSimple(geometry) RETURNS boolean AS 'MODULE_PATHNAME', 'issimple' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION Equals(geometry,geometry) +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION ST_IsCollection(geometry) RETURNS boolean - AS 'MODULE_PATHNAME','geomequals' - LANGUAGE 'C' IMMUTABLE STRICT; + AS 'MODULE_PATHNAME', 'ST_IsCollection' + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.5.0 -CREATE OR REPLACE FUNCTION _ST_Equals(geometry,geometry) +CREATE OR REPLACE FUNCTION _ST_Equals(geom1 geometry, geom2 geometry) RETURNS boolean - AS 'MODULE_PATHNAME','geomequals' - LANGUAGE 'C' IMMUTABLE STRICT + AS 'MODULE_PATHNAME','ST_Equals' + LANGUAGE 'c' IMMUTABLE STRICT COST 100; -- Availability: 1.2.1 -CREATE OR REPLACE FUNCTION ST_Equals(geometry,geometry) +CREATE OR REPLACE FUNCTION ST_Equals(geom1 geometry, geom2 geometry) RETURNS boolean - AS 'SELECT $1 && $2 AND _ST_Equals($1,$2)' - LANGUAGE 'SQL' IMMUTABLE; + AS 'SELECT $1 ~= $2 AND _ST_Equals($1,$2)' + LANGUAGE 'sql' IMMUTABLE; +-- Deprecation in 1.2.3 +-- TODO: drop in 2.0.0 ! +CREATE OR REPLACE FUNCTION Equals(geom1 geometry, geom2 geometry) + RETURNS boolean + AS 'MODULE_PATHNAME','ST_Equals' + LANGUAGE 'c' IMMUTABLE STRICT; ----------------------------------------------------------------------- -- GML & KML INPUT --- Availability: 1.5.0 ----------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION _ST_GeomFromGML(text, int4) + RETURNS geometry + AS 'MODULE_PATHNAME','geom_from_gml' + LANGUAGE 'c' IMMUTABLE; + +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION ST_GeomFromGML(text, int4) + RETURNS geometry + AS 'MODULE_PATHNAME','geom_from_gml' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Availability: 1.5.0 CREATE OR REPLACE FUNCTION ST_GeomFromGML(text) - RETURNS geometry - AS 'MODULE_PATHNAME','geom_from_gml' - LANGUAGE 'C' IMMUTABLE STRICT; + RETURNS geometry + AS 'SELECT _ST_GeomFromGML($1, 0)' + LANGUAGE 'sql' IMMUTABLE STRICT; +-- Availability: 1.5.0 CREATE OR REPLACE FUNCTION ST_GMLToSQL(text) - RETURNS geometry - AS 'MODULE_PATHNAME','geom_from_gml' - LANGUAGE 'C' IMMUTABLE STRICT; + RETURNS geometry + AS 'SELECT _ST_GeomFromGML($1, 0)' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION ST_GMLToSQL(text, int4) + RETURNS geometry + AS 'MODULE_PATHNAME','geom_from_gml' + LANGUAGE 'c' IMMUTABLE STRICT; +-- Availability: 1.5.0 CREATE OR REPLACE FUNCTION ST_GeomFromKML(text) RETURNS geometry AS 'MODULE_PATHNAME','geom_from_kml' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; ----------------------------------------------------------------------- --- SVG OUTPUT +-- GEOJSON INPUT ----------------------------------------------------------------------- --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION AsSVG(geometry,int4,int4) - RETURNS TEXT - AS 'MODULE_PATHNAME','assvg_geometry' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_AsSVG(geometry,int4,int4) - RETURNS TEXT - AS 'MODULE_PATHNAME','assvg_geometry' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION AsSVG(geometry,int4) - RETURNS TEXT - AS 'MODULE_PATHNAME','assvg_geometry' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_AsSVG(geometry,int4) - RETURNS TEXT - AS 'MODULE_PATHNAME','assvg_geometry' - LANGUAGE 'C' IMMUTABLE STRICT; +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION ST_GeomFromGeoJson(text) + RETURNS geometry + AS 'MODULE_PATHNAME','geom_from_geojson' + LANGUAGE 'c' IMMUTABLE STRICT; --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION AsSVG(geometry) - RETURNS TEXT - AS 'MODULE_PATHNAME','assvg_geometry' - LANGUAGE 'C' IMMUTABLE STRICT; +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION postgis_libjson_version() + RETURNS text + AS 'MODULE_PATHNAME','postgis_libjson_version' + LANGUAGE 'c' IMMUTABLE STRICT; +----------------------------------------------------------------------- +-- SVG OUTPUT +----------------------------------------------------------------------- -- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_AsSVG(geometry) +-- Changed: 2.0.0 changed to use default args and allow calling by named args +CREATE OR REPLACE FUNCTION ST_AsSVG(geom geometry,rel int4 DEFAULT 0,maxdecimaldigits int4 DEFAULT 15) RETURNS TEXT - AS 'MODULE_PATHNAME','assvg_geometry' - LANGUAGE 'C' IMMUTABLE STRICT; + AS 'MODULE_PATHNAME','LWGEOM_asSVG' + LANGUAGE 'c' IMMUTABLE STRICT; ----------------------------------------------------------------------- -- GML OUTPUT ----------------------------------------------------------------------- --- _ST_AsGML(version, geom, precision, option) -CREATE OR REPLACE FUNCTION _ST_AsGML(int4, geometry, int4, int4) +-- _ST_AsGML(version, geom, precision, option, prefix) +CREATE OR REPLACE FUNCTION _ST_AsGML(int4, geometry, int4, int4, text) RETURNS TEXT AS 'MODULE_PATHNAME','LWGEOM_asGML' - LANGUAGE 'C' IMMUTABLE STRICT; - --- AsGML(geom, precision) / version=2 --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION AsGML(geometry, int4) - RETURNS TEXT - AS 'SELECT _ST_AsGML(2, $1, $2, 0)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_AsGML(geometry, int4) - RETURNS TEXT - AS 'SELECT _ST_AsGML(2, $1, $2, 0)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- AsGML(geom) / precision=15 version=2 --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION AsGML(geometry) - RETURNS TEXT - AS 'SELECT _ST_AsGML(2, $1, 15, 0)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_AsGML(geometry) - RETURNS TEXT - AS 'SELECT _ST_AsGML(2, $1, 15, 0)' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE; --- ST_AsGML(version, geom) / precision=15 version=2 +-- ST_AsGML(version, geom) / precision=15 -- Availability: 1.3.2 -CREATE OR REPLACE FUNCTION ST_AsGML(int4, geometry) - RETURNS TEXT - AS 'SELECT _ST_AsGML($1, $2, 15, 0)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - -- ST_AsGML(version, geom, precision) -- Availability: 1.3.2 -CREATE OR REPLACE FUNCTION ST_AsGML(int4, geometry, int4) - RETURNS TEXT - AS 'SELECT _ST_AsGML($1, $2, $3, 0)' - LANGUAGE 'SQL' IMMUTABLE STRICT; -- ST_AsGML (geom, precision, option) / version=2 -- Availability: 1.4.0 -CREATE OR REPLACE FUNCTION ST_AsGML(geometry, int4, int4) +-- Changed: 2.0.0 to have default args +CREATE OR REPLACE FUNCTION ST_AsGML(geom geometry, maxdecimaldigits int4 DEFAULT 15, options int4 DEFAULT 0) RETURNS TEXT - AS 'SELECT _ST_AsGML(2, $1, $2, $3)' - LANGUAGE 'SQL' IMMUTABLE STRICT; + AS $$ SELECT _ST_AsGML(2, $1, $2, $3, null); $$ + LANGUAGE 'sql' IMMUTABLE STRICT; -- ST_AsGML(version, geom, precision, option) -- Availability: 1.4.0 -CREATE OR REPLACE FUNCTION ST_AsGML(int4, geometry, int4, int4) +-- ST_AsGML(version, geom, precision, option, prefix) +-- Availability: 2.0.0 +-- Changed: 2.0.0 to use default and named args +CREATE OR REPLACE FUNCTION ST_AsGML(version int4, geom geometry, maxdecimaldigits int4 DEFAULT 15, options int4 DEFAULT 0, nprefix text DEFAULT null) RETURNS TEXT - AS 'SELECT _ST_AsGML($1, $2, $3, $4)' - LANGUAGE 'SQL' IMMUTABLE STRICT; + AS $$ SELECT _ST_AsGML($1, $2, $3, $4,$5); $$ + LANGUAGE 'sql' IMMUTABLE; ----------------------------------------------------------------------- -- KML OUTPUT ----------------------------------------------------------------------- --- _ST_AsKML(version, geom, precision) -CREATE OR REPLACE FUNCTION _ST_AsKML(int4, geometry, int4) +-- _ST_AsKML(version, geom, precision, nprefix) +CREATE OR REPLACE FUNCTION _ST_AsKML(int4,geometry, int4, text) RETURNS TEXT AS 'MODULE_PATHNAME','LWGEOM_asKML' - LANGUAGE 'C' IMMUTABLE STRICT; - --- AsKML(geom, precision) / version=2 --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION AsKML(geometry, int4) - RETURNS TEXT - AS 'SELECT _ST_AsKML(2, transform($1,4326), $2)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_AsKML(geometry, int4) - RETURNS TEXT - AS 'SELECT _ST_AsKML(2, ST_Transform($1,4326), $2)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- AsKML(geom) / precision=15 version=2 --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION AsKML(geometry) - RETURNS TEXT - AS 'SELECT _ST_AsKML(2, transform($1,4326), 15)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- AsKML(version, geom, precision) --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION AsKML(int4, geometry, int4) - RETURNS TEXT - AS 'SELECT _ST_AsKML($1, transform($2,4326), $3)' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE; -- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_AsKML(geometry) +-- Changed: 2.0.0 to use default args and allow named args +CREATE OR REPLACE FUNCTION ST_AsKML(geom geometry, maxdecimaldigits int4 DEFAULT 15) RETURNS TEXT - AS 'SELECT _ST_AsKML(2, ST_Transform($1,4326), 15)' - LANGUAGE 'SQL' IMMUTABLE STRICT; + AS $$ SELECT _ST_AsKML(2, ST_Transform($1,4326), $2, null); $$ + LANGUAGE 'sql' IMMUTABLE STRICT; --- ST_AsKML(version, geom) / precision=15 version=2 --- Availability: 1.3.2 -CREATE OR REPLACE FUNCTION ST_AsKML(int4, geometry) +-- ST_AsKML(version, geom, precision, text) +-- Availability: 2.0.0 +-- Changed: 2.0.0 allows default args and got rid of other permutations +CREATE OR REPLACE FUNCTION ST_AsKML(version int4, geom geometry, maxdecimaldigits int4 DEFAULT 15, nprefix text DEFAULT null) RETURNS TEXT - AS 'SELECT _ST_AsKML($1, ST_Transform($2,4326), 15)' - LANGUAGE 'SQL' IMMUTABLE STRICT; + AS $$ SELECT _ST_AsKML($1, ST_Transform($2,4326), $3, $4); $$ + LANGUAGE 'sql' IMMUTABLE; --- ST_AsKML(version, geom, precision) --- Availability: 1.3.2 -CREATE OR REPLACE FUNCTION ST_AsKML(int4, geometry, int4) - RETURNS TEXT - AS 'SELECT _ST_AsKML($1, ST_Transform($2,4326), $3)' - LANGUAGE 'SQL' IMMUTABLE STRICT; ----------------------------------------------------------------------- -- GEOJSON OUTPUT @@ -4691,395 +3475,205 @@ CREATE OR REPLACE FUNCTION _ST_AsGeoJson(int4, geometry, int4, int4) RETURNS TEXT AS 'MODULE_PATHNAME','LWGEOM_asGeoJson' - LANGUAGE 'C' IMMUTABLE STRICT; - --- ST_AsGeoJson(geom, precision) / version=1 options=0 -CREATE OR REPLACE FUNCTION ST_AsGeoJson(geometry, int4) - RETURNS TEXT - AS 'SELECT _ST_AsGeoJson(1, $1, $2, 0)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- ST_AsGeoJson(geom) / precision=15 version=1 options=0 -CREATE OR REPLACE FUNCTION ST_AsGeoJson(geometry) - RETURNS TEXT - AS 'SELECT _ST_AsGeoJson(1, $1, 15, 0)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- ST_AsGeoJson(version, geom) / precision=15 options=0 -CREATE OR REPLACE FUNCTION ST_AsGeoJson(int4, geometry) - RETURNS TEXT - AS 'SELECT _ST_AsGeoJson($1, $2, 15, 0)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- ST_AsGeoJson(version, geom, precision) / options=0 -CREATE OR REPLACE FUNCTION ST_AsGeoJson(int4, geometry, int4) - RETURNS TEXT - AS 'SELECT _ST_AsGeoJson($1, $2, $3, 0)' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- ST_AsGeoJson(geom, precision, options) / version=1 -CREATE OR REPLACE FUNCTION ST_AsGeoJson(geometry, int4, int4) +-- Changed 2.0.0 to use default args and named args +CREATE OR REPLACE FUNCTION ST_AsGeoJson(geom geometry, maxdecimaldigits int4 DEFAULT 15, options int4 DEFAULT 0) RETURNS TEXT - AS 'SELECT _ST_AsGeoJson(1, $1, $2, $3)' - LANGUAGE 'SQL' IMMUTABLE STRICT; + AS $$ SELECT _ST_AsGeoJson(1, $1, $2, $3); $$ + LANGUAGE 'sql' IMMUTABLE STRICT; -- ST_AsGeoJson(version, geom, precision,options) -CREATE OR REPLACE FUNCTION ST_AsGeoJson(int4, geometry, int4, int4) +-- Changed 2.0.0 to use default args and named args +CREATE OR REPLACE FUNCTION ST_AsGeoJson(gj_version int4, geom geometry, maxdecimaldigits int4 DEFAULT 15, options int4 DEFAULT 0) RETURNS TEXT - AS 'SELECT _ST_AsGeoJson($1, $2, $3, $4)' - LANGUAGE 'SQL' IMMUTABLE STRICT; + AS $$ SELECT _ST_AsGeoJson($1, $2, $3, $4); $$ + LANGUAGE 'sql' IMMUTABLE STRICT; ------------------------------------------------------------------------ -- GeoHash (geohash.org) ------------------------------------------------------------------------ -- Availability 1.4.0 -CREATE OR REPLACE FUNCTION ST_GeoHash(geometry, int4) +-- Changed 2.0.0 to use default args and named args +CREATE OR REPLACE FUNCTION ST_GeoHash(geom geometry, maxchars int4 DEFAULT 0) RETURNS TEXT AS 'MODULE_PATHNAME', 'ST_GeoHash' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Availability 1.4.0 -CREATE OR REPLACE FUNCTION ST_GeoHash(geometry) - RETURNS TEXT - AS 'SELECT ST_GeoHash($1, 0)' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; ------------------------------------------------------------------------ -- OGC defined ------------------------------------------------------------------------ - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION NumPoints(geometry) - RETURNS int4 - AS 'MODULE_PATHNAME', 'LWGEOM_numpoints_linestring' - LANGUAGE 'C' IMMUTABLE STRICT; - -- PostGIS equivalent function: NumPoints(geometry) CREATE OR REPLACE FUNCTION ST_NumPoints(geometry) RETURNS int4 AS 'MODULE_PATHNAME', 'LWGEOM_numpoints_linestring' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION NumGeometries(geometry) - RETURNS int4 - AS 'MODULE_PATHNAME', 'LWGEOM_numgeometries_collection' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- PostGIS equivalent function: NumGeometries(geometry) CREATE OR REPLACE FUNCTION ST_NumGeometries(geometry) RETURNS int4 AS 'MODULE_PATHNAME', 'LWGEOM_numgeometries_collection' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION GeometryN(geometry,integer) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_geometryn_collection' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- PostGIS equivalent function: GeometryN(geometry) CREATE OR REPLACE FUNCTION ST_GeometryN(geometry,integer) RETURNS geometry AS 'MODULE_PATHNAME', 'LWGEOM_geometryn_collection' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION Dimension(geometry) - RETURNS int4 - AS 'MODULE_PATHNAME', 'LWGEOM_dimension' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- PostGIS equivalent function: Dimension(geometry) CREATE OR REPLACE FUNCTION ST_Dimension(geometry) RETURNS int4 AS 'MODULE_PATHNAME', 'LWGEOM_dimension' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION ExteriorRing(geometry) - RETURNS geometry - AS 'MODULE_PATHNAME','LWGEOM_exteriorring_polygon' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- PostGIS equivalent function: ExteriorRing(geometry) CREATE OR REPLACE FUNCTION ST_ExteriorRing(geometry) RETURNS geometry AS 'MODULE_PATHNAME','LWGEOM_exteriorring_polygon' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION NumInteriorRings(geometry) - RETURNS integer - AS 'MODULE_PATHNAME','LWGEOM_numinteriorrings_polygon' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- PostGIS equivalent function: NumInteriorRings(geometry) CREATE OR REPLACE FUNCTION ST_NumInteriorRings(geometry) RETURNS integer AS 'MODULE_PATHNAME','LWGEOM_numinteriorrings_polygon' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION NumInteriorRing(geometry) - RETURNS integer - AS 'MODULE_PATHNAME','LWGEOM_numinteriorrings_polygon' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_NumInteriorRing(geometry) RETURNS integer AS 'MODULE_PATHNAME','LWGEOM_numinteriorrings_polygon' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION InteriorRingN(geometry,integer) - RETURNS geometry - AS 'MODULE_PATHNAME','LWGEOM_interiorringn_polygon' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- PostGIS equivalent function: InteriorRingN(geometry) CREATE OR REPLACE FUNCTION ST_InteriorRingN(geometry,integer) RETURNS geometry AS 'MODULE_PATHNAME','LWGEOM_interiorringn_polygon' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; --- Deprecation in 1.2.3 +-- Deprecation in 1.2.3 -- this should not be deprecated (2011-01-04 robe) CREATE OR REPLACE FUNCTION GeometryType(geometry) RETURNS text AS 'MODULE_PATHNAME', 'LWGEOM_getTYPE' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Not quite equivalent to GeometryType CREATE OR REPLACE FUNCTION ST_GeometryType(geometry) RETURNS text AS 'MODULE_PATHNAME', 'geometry_geometrytype' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION PointN(geometry,integer) - RETURNS geometry - AS 'MODULE_PATHNAME','LWGEOM_pointn_linestring' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- PostGIS equivalent function: PointN(geometry,integer) CREATE OR REPLACE FUNCTION ST_PointN(geometry,integer) RETURNS geometry AS 'MODULE_PATHNAME','LWGEOM_pointn_linestring' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION X(geometry) - RETURNS float8 - AS 'MODULE_PATHNAME','LWGEOM_x_point' - LANGUAGE 'C' IMMUTABLE STRICT; - --- PostGIS equivalent function: X(geometry) -CREATE OR REPLACE FUNCTION ST_X(geometry) - RETURNS float8 - AS 'MODULE_PATHNAME','LWGEOM_x_point' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION Y(geometry) - RETURNS float8 - AS 'MODULE_PATHNAME','LWGEOM_y_point' - LANGUAGE 'C' IMMUTABLE STRICT; - --- PostGIS equivalent function: Y(geometry) -CREATE OR REPLACE FUNCTION ST_Y(geometry) - RETURNS float8 - AS 'MODULE_PATHNAME','LWGEOM_y_point' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION Z(geometry) - RETURNS float8 - AS 'MODULE_PATHNAME','LWGEOM_z_point' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_Z(geometry) - RETURNS float8 - AS 'MODULE_PATHNAME','LWGEOM_z_point' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION M(geometry) - RETURNS float8 - AS 'MODULE_PATHNAME','LWGEOM_m_point' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_M(geometry) - RETURNS float8 - AS 'MODULE_PATHNAME','LWGEOM_m_point' - LANGUAGE 'C' IMMUTABLE STRICT; +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION ST_NumPatches(geometry) + RETURNS int4 + AS ' + SELECT CASE WHEN ST_GeometryType($1) = ''ST_PolyhedralSurface'' + THEN ST_NumGeometries($1) + ELSE NULL END + ' + LANGUAGE 'sql' IMMUTABLE STRICT; --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION StartPoint(geometry) +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION ST_PatchN(geometry, integer) RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_startpoint_linestring' - LANGUAGE 'C' IMMUTABLE STRICT; + AS ' + SELECT CASE WHEN ST_GeometryType($1) = ''ST_PolyhedralSurface'' + THEN ST_GeometryN($1, $2) + ELSE NULL END + ' + LANGUAGE 'sql' IMMUTABLE STRICT; --- PostGIS equivalent function: StartPoint(geometry)) +-- PostGIS equivalent function of old StartPoint(geometry)) CREATE OR REPLACE FUNCTION ST_StartPoint(geometry) RETURNS geometry AS 'MODULE_PATHNAME', 'LWGEOM_startpoint_linestring' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION EndPoint(geometry) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_endpoint_linestring' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; --- PostGIS equivalent function: EndPoint(geometry)) +-- PostGIS equivalent function of old EndPoint(geometry) CREATE OR REPLACE FUNCTION ST_EndPoint(geometry) RETURNS geometry AS 'MODULE_PATHNAME', 'LWGEOM_endpoint_linestring' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION IsClosed(geometry) - RETURNS boolean - AS 'MODULE_PATHNAME', 'LWGEOM_isclosed_linestring' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- PostGIS equivalent function: IsClosed(geometry) CREATE OR REPLACE FUNCTION ST_IsClosed(geometry) RETURNS boolean - AS 'MODULE_PATHNAME', 'LWGEOM_isclosed_linestring' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION IsEmpty(geometry) - RETURNS boolean - AS 'MODULE_PATHNAME', 'LWGEOM_isempty' - LANGUAGE 'C' IMMUTABLE STRICT; + AS 'MODULE_PATHNAME', 'LWGEOM_isclosed' + LANGUAGE 'c' IMMUTABLE STRICT; -- PostGIS equivalent function: IsEmpty(geometry) CREATE OR REPLACE FUNCTION ST_IsEmpty(geometry) RETURNS boolean AS 'MODULE_PATHNAME', 'LWGEOM_isempty' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION SRID(geometry) - RETURNS int4 - AS 'MODULE_PATHNAME','LWGEOM_getSRID' - LANGUAGE 'C' IMMUTABLE STRICT; - --- PostGIS equivalent function: getSRID(geometry) CREATE OR REPLACE FUNCTION ST_SRID(geometry) RETURNS int4 - AS 'MODULE_PATHNAME','LWGEOM_getSRID' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION SetSRID(geometry,int4) - RETURNS geometry - AS 'MODULE_PATHNAME','LWGEOM_setSRID' - LANGUAGE 'C' IMMUTABLE STRICT; + AS 'MODULE_PATHNAME','LWGEOM_get_srid' + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_SetSRID(geometry,int4) RETURNS geometry - AS 'MODULE_PATHNAME','LWGEOM_setSRID' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION AsBinary(geometry) + AS 'MODULE_PATHNAME','LWGEOM_set_srid' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Availability: 1.2.2 +CREATE OR REPLACE FUNCTION ST_AsBinary(geometry,text) RETURNS bytea AS 'MODULE_PATHNAME','LWGEOM_asBinary' - LANGUAGE 'C' IMMUTABLE STRICT; - --- PostGIS equivalent function: AsBinary(geometry) + LANGUAGE 'c' IMMUTABLE STRICT; + +-- PostGIS equivalent of old function: AsBinary(geometry) CREATE OR REPLACE FUNCTION ST_AsBinary(geometry) RETURNS bytea AS 'MODULE_PATHNAME','LWGEOM_asBinary' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION AsBinary(geometry,text) - RETURNS bytea - AS 'MODULE_PATHNAME','LWGEOM_asBinary' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_AsBinary(geometry,text) - RETURNS bytea - AS 'MODULE_PATHNAME','LWGEOM_asBinary' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION AsText(geometry) - RETURNS TEXT - AS 'MODULE_PATHNAME','LWGEOM_asText' - LANGUAGE 'C' IMMUTABLE STRICT; - + LANGUAGE 'c' IMMUTABLE STRICT; + -- PostGIS equivalent function: AsText(geometry) CREATE OR REPLACE FUNCTION ST_AsText(geometry) RETURNS TEXT AS 'MODULE_PATHNAME','LWGEOM_asText' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION GeometryFromText(text) - RETURNS geometry - AS 'MODULE_PATHNAME','LWGEOM_from_text' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_GeometryFromText(text) RETURNS geometry AS 'MODULE_PATHNAME','LWGEOM_from_text' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION GeometryFromText(text, int4) - RETURNS geometry - AS 'MODULE_PATHNAME','LWGEOM_from_text' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_GeometryFromText(text, int4) RETURNS geometry AS 'MODULE_PATHNAME','LWGEOM_from_text' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION GeomFromText(text) - RETURNS geometry AS 'SELECT geometryfromtext($1)' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_GeomFromText(text) RETURNS geometry AS 'MODULE_PATHNAME','LWGEOM_from_text' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION GeomFromText(text, int4) - RETURNS geometry AS 'SELECT geometryfromtext($1, $2)' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- PostGIS equivalent function: ST_GeometryFromText(text, int4) CREATE OR REPLACE FUNCTION ST_GeomFromText(text, int4) RETURNS geometry AS 'MODULE_PATHNAME','LWGEOM_from_text' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION PointFromText(text) + LANGUAGE 'c' IMMUTABLE STRICT; + +-- PostGIS equivalent function: ST_GeometryFromText(text) +-- SQL/MM alias for ST_GeomFromText +CREATE OR REPLACE FUNCTION ST_WKTToSQL(text) RETURNS geometry - AS ' - SELECT CASE WHEN geometrytype(GeomFromText($1)) = ''POINT'' - THEN GeomFromText($1) - ELSE NULL END - ' - LANGUAGE 'SQL' IMMUTABLE STRICT; + AS 'MODULE_PATHNAME','LWGEOM_from_text' + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_PointFromText(text) @@ -5089,17 +3683,8 @@ THEN ST_GeomFromText($1) ELSE NULL END ' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION PointFromText(text, int4) - RETURNS geometry - AS ' - SELECT CASE WHEN geometrytype(GeomFromText($1, $2)) = ''POINT'' - THEN GeomFromText($1,$2) - ELSE NULL END - ' - LANGUAGE 'SQL' IMMUTABLE STRICT; -- PostGIS equivalent function: PointFromText(text, int4) -- TODO: improve this ... by not duplicating constructor time. @@ -5110,69 +3695,27 @@ THEN ST_GeomFromText($1, $2) ELSE NULL END ' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION LineFromText(text) - RETURNS geometry - AS ' - SELECT CASE WHEN geometrytype(GeomFromText($1)) = ''LINESTRING'' - THEN GeomFromText($1) - ELSE NULL END - ' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION ST_LineFromText(text) - RETURNS geometry - AS ' - SELECT CASE WHEN geometrytype(ST_GeomFromText($1)) = ''LINESTRING'' - THEN ST_GeomFromText($1) - ELSE NULL END - ' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION LineFromText(text, int4) - RETURNS geometry - AS ' - SELECT CASE WHEN geometrytype(GeomFromText($1, $2)) = ''LINESTRING'' - THEN GeomFromText($1,$2) - ELSE NULL END - ' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- PostGIS equivalent function: LineFromText(text, int4) -CREATE OR REPLACE FUNCTION ST_LineFromText(text, int4) +CREATE OR REPLACE FUNCTION ST_LineFromText(text) RETURNS geometry AS ' - SELECT CASE WHEN geometrytype(GeomFromText($1, $2)) = ''LINESTRING'' - THEN GeomFromText($1,$2) + SELECT CASE WHEN geometrytype(ST_GeomFromText($1)) = ''LINESTRING'' + THEN ST_GeomFromText($1) ELSE NULL END ' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION LineStringFromText(text) - RETURNS geometry - AS 'SELECT LineFromText($1)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION LineStringFromText(text, int4) - RETURNS geometry - AS 'SELECT LineFromText($1, $2)' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION PolyFromText(text) +-- PostGIS equivalent function: LineFromText(text, int4) +CREATE OR REPLACE FUNCTION ST_LineFromText(text, int4) RETURNS geometry AS ' - SELECT CASE WHEN geometrytype(GeomFromText($1)) = ''POLYGON'' - THEN GeomFromText($1) + SELECT CASE WHEN geometrytype(ST_GeomFromText($1, $2)) = ''LINESTRING'' + THEN ST_GeomFromText($1,$2) ELSE NULL END ' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_PolyFromText(text) @@ -5182,17 +3725,7 @@ THEN ST_GeomFromText($1) ELSE NULL END ' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION PolyFromText(text, int4) - RETURNS geometry - AS ' - SELECT CASE WHEN geometrytype(GeomFromText($1, $2)) = ''POLYGON'' - THEN GeomFromText($1,$2) - ELSE NULL END - ' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -- PostGIS equivalent function: ST_PolygonFromText(text, int4) CREATE OR REPLACE FUNCTION ST_PolyFromText(text, int4) @@ -5202,63 +3735,30 @@ THEN ST_GeomFromText($1, $2) ELSE NULL END ' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION PolygonFromText(text, int4) - RETURNS geometry - AS 'SELECT PolyFromText($1, $2)' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_PolygonFromText(text, int4) RETURNS geometry - AS 'SELECT PolyFromText($1, $2)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION PolygonFromText(text) - RETURNS geometry - AS 'SELECT PolyFromText($1)' - LANGUAGE 'SQL' IMMUTABLE STRICT; + AS 'SELECT ST_PolyFromText($1, $2)' + LANGUAGE 'sql' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_PolygonFromText(text) RETURNS geometry AS 'SELECT ST_PolyFromText($1)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION MLineFromText(text, int4) - RETURNS geometry - AS ' - SELECT CASE - WHEN geometrytype(GeomFromText($1, $2)) = ''MULTILINESTRING'' - THEN GeomFromText($1,$2) - ELSE NULL END - ' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -- PostGIS equivalent function: MLineFromText(text, int4) CREATE OR REPLACE FUNCTION ST_MLineFromText(text, int4) RETURNS geometry AS ' SELECT CASE - WHEN geometrytype(GeomFromText($1, $2)) = ''MULTILINESTRING'' - THEN GeomFromText($1,$2) - ELSE NULL END - ' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION MLineFromText(text) - RETURNS geometry - AS ' - SELECT CASE WHEN geometrytype(GeomFromText($1)) = ''MULTILINESTRING'' - THEN GeomFromText($1) + WHEN geometrytype(ST_GeomFromText($1, $2)) = ''MULTILINESTRING'' + THEN ST_GeomFromText($1,$2) ELSE NULL END ' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_MLineFromText(text) @@ -5268,61 +3768,30 @@ THEN ST_GeomFromText($1) ELSE NULL END ' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION MultiLineStringFromText(text) - RETURNS geometry - AS 'SELECT ST_MLineFromText($1)' - LANGUAGE 'SQL' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_MultiLineStringFromText(text) RETURNS geometry AS 'SELECT ST_MLineFromText($1)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION MultiLineStringFromText(text, int4) - RETURNS geometry - AS 'SELECT MLineFromText($1, $2)' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_MultiLineStringFromText(text, int4) RETURNS geometry - AS 'SELECT MLineFromText($1, $2)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION MPointFromText(text, int4) - RETURNS geometry - AS ' - SELECT CASE WHEN geometrytype(GeomFromText($1,$2)) = ''MULTIPOINT'' - THEN GeomFromText($1,$2) - ELSE NULL END - ' - LANGUAGE 'SQL' IMMUTABLE STRICT; + AS 'SELECT ST_MLineFromText($1, $2)' + LANGUAGE 'sql' IMMUTABLE STRICT; -- PostGIS equivalent function: MPointFromText(text, int4) CREATE OR REPLACE FUNCTION ST_MPointFromText(text, int4) RETURNS geometry AS ' - SELECT CASE WHEN geometrytype(GeomFromText($1, $2)) = ''MULTIPOINT'' - THEN GeomFromText($1, $2) - ELSE NULL END - ' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION MPointFromText(text) - RETURNS geometry - AS ' - SELECT CASE WHEN geometrytype(GeomFromText($1)) = ''MULTIPOINT'' - THEN GeomFromText($1) + SELECT CASE WHEN geometrytype(ST_GeomFromText($1, $2)) = ''MULTIPOINT'' + THEN ST_GeomFromText($1, $2) ELSE NULL END ' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_MPointFromText(text) @@ -5332,47 +3801,19 @@ THEN ST_GeomFromText($1) ELSE NULL END ' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION MultiPointFromText(text, int4) - RETURNS geometry - AS 'SELECT MPointFromText($1, $2)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION MultiPointFromText(text) - RETURNS geometry - AS 'SELECT MPointFromText($1)' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_MultiPointFromText(text) RETURNS geometry AS 'SELECT ST_MPointFromText($1)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION MultiPointFromText(text) - RETURNS geometry - AS 'SELECT MPointFromText($1)' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_MultiPointFromText(text) RETURNS geometry - AS 'SELECT MPointFromText($1)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION MPolyFromText(text, int4) - RETURNS geometry - AS ' - SELECT CASE WHEN geometrytype(GeomFromText($1, $2)) = ''MULTIPOLYGON'' - THEN GeomFromText($1,$2) - ELSE NULL END - ' - LANGUAGE 'SQL' IMMUTABLE STRICT; + AS 'SELECT ST_MPointFromText($1)' + LANGUAGE 'sql' IMMUTABLE STRICT; -- PostGIS equivalent function: MPolyFromText(text, int4) CREATE OR REPLACE FUNCTION ST_MPolyFromText(text, int4) @@ -5382,17 +3823,7 @@ THEN ST_GeomFromText($1,$2) ELSE NULL END ' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION MPolyFromText(text) - RETURNS geometry - AS ' - SELECT CASE WHEN geometrytype(GeomFromText($1)) = ''MULTIPOLYGON'' - THEN GeomFromText($1) - ELSE NULL END - ' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; --Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_MPolyFromText(text) @@ -5402,42 +3833,19 @@ THEN ST_GeomFromText($1) ELSE NULL END ' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION MultiPolygonFromText(text, int4) - RETURNS geometry - AS 'SELECT MPolyFromText($1, $2)' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_MultiPolygonFromText(text, int4) RETURNS geometry - AS 'SELECT MPolyFromText($1, $2)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION MultiPolygonFromText(text) - RETURNS geometry - AS 'SELECT MPolyFromText($1)' - LANGUAGE 'SQL' IMMUTABLE STRICT; + AS 'SELECT ST_MPolyFromText($1, $2)' + LANGUAGE 'sql' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_MultiPolygonFromText(text) RETURNS geometry - AS 'SELECT MPolyFromText($1)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION GeomCollFromText(text, int4) - RETURNS geometry - AS ' - SELECT CASE - WHEN geometrytype(GeomFromText($1, $2)) = ''GEOMETRYCOLLECTION'' - THEN GeomFromText($1,$2) - ELSE NULL END - ' - LANGUAGE 'SQL' IMMUTABLE STRICT; + AS 'SELECT ST_MPolyFromText($1)' + LANGUAGE 'sql' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_GeomCollFromText(text, int4) @@ -5448,18 +3856,7 @@ THEN ST_GeomFromText($1,$2) ELSE NULL END ' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION GeomCollFromText(text) - RETURNS geometry - AS ' - SELECT CASE - WHEN geometrytype(GeomFromText($1)) = ''GEOMETRYCOLLECTION'' - THEN GeomFromText($1) - ELSE NULL END - ' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_GeomCollFromText(text) @@ -5470,41 +3867,19 @@ THEN ST_GeomFromText($1) ELSE NULL END ' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION GeomFromWKB(bytea) - RETURNS geometry - AS 'MODULE_PATHNAME','LWGEOM_from_WKB' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_GeomFromWKB(bytea) RETURNS geometry AS 'MODULE_PATHNAME','LWGEOM_from_WKB' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION GeomFromWKB(bytea, int) - RETURNS geometry - AS 'SELECT setSRID(GeomFromWKB($1), $2)' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- PostGIS equivalent function: GeomFromWKB(bytea, int) CREATE OR REPLACE FUNCTION ST_GeomFromWKB(bytea, int) RETURNS geometry AS 'SELECT ST_SetSRID(ST_GeomFromWKB($1), $2)' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION PointFromWKB(bytea, int) - RETURNS geometry - AS ' - SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = ''POINT'' - THEN GeomFromWKB($1, $2) - ELSE NULL END - ' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -- PostGIS equivalent function: PointFromWKB(bytea, int) CREATE OR REPLACE FUNCTION ST_PointFromWKB(bytea, int) @@ -5514,17 +3889,7 @@ THEN ST_GeomFromWKB($1, $2) ELSE NULL END ' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION PointFromWKB(bytea) - RETURNS geometry - AS ' - SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = ''POINT'' - THEN GeomFromWKB($1) - ELSE NULL END - ' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_PointFromWKB(bytea) @@ -5534,17 +3899,7 @@ THEN ST_GeomFromWKB($1) ELSE NULL END ' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION LineFromWKB(bytea, int) - RETURNS geometry - AS ' - SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = ''LINESTRING'' - THEN GeomFromWKB($1, $2) - ELSE NULL END - ' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -- PostGIS equivalent function: LineFromWKB(bytea, int) CREATE OR REPLACE FUNCTION ST_LineFromWKB(bytea, int) @@ -5554,17 +3909,7 @@ THEN ST_GeomFromWKB($1, $2) ELSE NULL END ' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION LineFromWKB(bytea) - RETURNS geometry - AS ' - SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = ''LINESTRING'' - THEN GeomFromWKB($1) - ELSE NULL END - ' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_LineFromWKB(bytea) @@ -5574,17 +3919,7 @@ THEN ST_GeomFromWKB($1) ELSE NULL END ' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION LinestringFromWKB(bytea, int) - RETURNS geometry - AS ' - SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = ''LINESTRING'' - THEN GeomFromWKB($1, $2) - ELSE NULL END - ' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_LinestringFromWKB(bytea, int) @@ -5594,37 +3929,17 @@ THEN ST_GeomFromWKB($1, $2) ELSE NULL END ' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION LinestringFromWKB(bytea) - RETURNS geometry - AS ' - SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = ''LINESTRING'' - THEN GeomFromWKB($1) - ELSE NULL END - ' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_LinestringFromWKB(bytea) RETURNS geometry AS ' - SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = ''LINESTRING'' - THEN GeomFromWKB($1) - ELSE NULL END - ' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION PolyFromWKB(bytea, int) - RETURNS geometry - AS ' - SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = ''POLYGON'' - THEN GeomFromWKB($1, $2) + SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1)) = ''LINESTRING'' + THEN ST_GeomFromWKB($1) ELSE NULL END ' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -- PostGIS equivalent function: PolyFromWKB(text, int) CREATE OR REPLACE FUNCTION ST_PolyFromWKB(bytea, int) @@ -5634,17 +3949,7 @@ THEN ST_GeomFromWKB($1, $2) ELSE NULL END ' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION PolyFromWKB(bytea) - RETURNS geometry - AS ' - SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = ''POLYGON'' - THEN GeomFromWKB($1) - ELSE NULL END - ' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_PolyFromWKB(bytea) @@ -5654,17 +3959,7 @@ THEN ST_GeomFromWKB($1) ELSE NULL END ' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION PolygonFromWKB(bytea, int) - RETURNS geometry - AS ' - SELECT CASE WHEN geometrytype(GeomFromWKB($1,$2)) = ''POLYGON'' - THEN GeomFromWKB($1, $2) - ELSE NULL END - ' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_PolygonFromWKB(bytea, int) @@ -5674,57 +3969,28 @@ THEN ST_GeomFromWKB($1, $2) ELSE NULL END ' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION PolygonFromWKB(bytea) - RETURNS geometry - AS ' - SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = ''POLYGON'' - THEN GeomFromWKB($1) - ELSE NULL END - ' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_PolygonFromWKB(bytea) RETURNS geometry AS ' - SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = ''POLYGON'' - THEN GeomFromWKB($1) - ELSE NULL END - ' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION MPointFromWKB(bytea, int) - RETURNS geometry - AS ' - SELECT CASE WHEN geometrytype(GeomFromWKB($1,$2)) = ''MULTIPOINT'' - THEN GeomFromWKB($1, $2) + SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1)) = ''POLYGON'' + THEN ST_GeomFromWKB($1) ELSE NULL END ' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -- PostGIS equivalent function: MPointFromWKB(text, int) CREATE OR REPLACE FUNCTION ST_MPointFromWKB(bytea, int) RETURNS geometry AS ' - SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = ''MULTIPOINT'' - THEN GeomFromWKB($1, $2) + SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1, $2)) = ''MULTIPOINT'' + THEN ST_GeomFromWKB($1, $2) ELSE NULL END ' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION MPointFromWKB(bytea) - RETURNS geometry - AS ' - SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = ''MULTIPOINT'' - THEN GeomFromWKB($1) - ELSE NULL END - ' - LANGUAGE 'SQL' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_MPointFromWKB(bytea) @@ -5734,17 +4000,7 @@ THEN ST_GeomFromWKB($1) ELSE NULL END ' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION MultiPointFromWKB(bytea, int) - RETURNS geometry - AS ' - SELECT CASE WHEN geometrytype(GeomFromWKB($1,$2)) = ''MULTIPOINT'' - THEN GeomFromWKB($1, $2) - ELSE NULL END - ' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_MultiPointFromWKB(bytea, int) @@ -5754,17 +4010,7 @@ THEN ST_GeomFromWKB($1, $2) ELSE NULL END ' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION MultiPointFromWKB(bytea) - RETURNS geometry - AS ' - SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = ''MULTIPOINT'' - THEN GeomFromWKB($1) - ELSE NULL END - ' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_MultiPointFromWKB(bytea) @@ -5774,57 +4020,17 @@ THEN ST_GeomFromWKB($1) ELSE NULL END ' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION MultiLineFromWKB(bytea, int) - RETURNS geometry - AS ' - SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = ''MULTILINESTRING'' - THEN GeomFromWKB($1, $2) - ELSE NULL END - ' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Availability: 1.2.2 -CREATE OR REPLACE FUNCTION MultiLineFromWKB(bytea, int) - RETURNS geometry - AS ' - SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = ''MULTILINESTRING'' - THEN GeomFromWKB($1, $2) - ELSE NULL END - ' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION MultiLineFromWKB(bytea) - RETURNS geometry - AS ' - SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = ''MULTILINESTRING'' - THEN GeomFromWKB($1) - ELSE NULL END - ' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_MultiLineFromWKB(bytea) RETURNS geometry AS ' - SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1)) = ''MULTILINESTRING'' - THEN ST_GeomFromWKB($1) - ELSE NULL END - ' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION MLineFromWKB(bytea, int) - RETURNS geometry - AS ' - SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = ''MULTILINESTRING'' - THEN GeomFromWKB($1, $2) + SELECT CASE WHEN geometrytype(ST_GeomFromWKB($1)) = ''MULTILINESTRING'' + THEN ST_GeomFromWKB($1) ELSE NULL END ' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -- PostGIS equivalent function: MLineFromWKB(text, int) CREATE OR REPLACE FUNCTION ST_MLineFromWKB(bytea, int) @@ -5834,17 +4040,7 @@ THEN ST_GeomFromWKB($1, $2) ELSE NULL END ' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION MLineFromWKB(bytea) - RETURNS geometry - AS ' - SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = ''MULTILINESTRING'' - THEN GeomFromWKB($1) - ELSE NULL END - ' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_MLineFromWKB(bytea) @@ -5854,18 +4050,9 @@ THEN ST_GeomFromWKB($1) ELSE NULL END ' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION MPolyFromWKB(bytea, int) - RETURNS geometry - AS ' - SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = ''MULTIPOLYGON'' - THEN GeomFromWKB($1, $2) - ELSE NULL END - ' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; +-- Availability: 1.2.2 -- PostGIS equivalent function: MPolyFromWKB(bytea, int) CREATE OR REPLACE FUNCTION ST_MPolyFromWKB(bytea, int) RETURNS geometry @@ -5874,17 +4061,7 @@ THEN ST_GeomFromWKB($1, $2) ELSE NULL END ' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION MPolyFromWKB(bytea) - RETURNS geometry - AS ' - SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = ''MULTIPOLYGON'' - THEN GeomFromWKB($1) - ELSE NULL END - ' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_MPolyFromWKB(bytea) @@ -5894,17 +4071,7 @@ THEN ST_GeomFromWKB($1) ELSE NULL END ' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION MultiPolyFromWKB(bytea, int) - RETURNS geometry - AS ' - SELECT CASE WHEN geometrytype(GeomFromWKB($1, $2)) = ''MULTIPOLYGON'' - THEN GeomFromWKB($1, $2) - ELSE NULL END - ' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_MultiPolyFromWKB(bytea, int) @@ -5914,17 +4081,8 @@ THEN ST_GeomFromWKB($1, $2) ELSE NULL END ' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION MultiPolyFromWKB(bytea) - RETURNS geometry - AS ' - SELECT CASE WHEN geometrytype(GeomFromWKB($1)) = ''MULTIPOLYGON'' - THEN GeomFromWKB($1) - ELSE NULL END - ' - LANGUAGE 'SQL' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_MultiPolyFromWKB(bytea) @@ -5934,40 +4092,19 @@ THEN ST_GeomFromWKB($1) ELSE NULL END ' - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION GeomCollFromWKB(bytea, int) - RETURNS geometry - AS ' - SELECT CASE - WHEN geometrytype(GeomFromWKB($1, $2)) = ''GEOMETRYCOLLECTION'' - THEN GeomFromWKB($1, $2) - ELSE NULL END - ' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_GeomCollFromWKB(bytea, int) RETURNS geometry AS ' SELECT CASE - WHEN geometrytype(GeomFromWKB($1, $2)) = ''GEOMETRYCOLLECTION'' - THEN GeomFromWKB($1, $2) + WHEN geometrytype(ST_GeomFromWKB($1, $2)) = ''GEOMETRYCOLLECTION'' + THEN ST_GeomFromWKB($1, $2) ELSE NULL END ' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION GeomCollFromWKB(bytea) - RETURNS geometry - AS ' - SELECT CASE - WHEN geometrytype(GeomFromWKB($1)) = ''GEOMETRYCOLLECTION'' - THEN GeomFromWKB($1) - ELSE NULL END - ' - LANGUAGE 'SQL' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_GeomCollFromWKB(bytea) @@ -5978,60 +4115,59 @@ THEN ST_GeomFromWKB($1) ELSE NULL END ' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; --New functions -- Maximum distance between linestrings. -CREATE OR REPLACE FUNCTION max_distance(geometry,geometry) - RETURNS float8 - AS 'MODULE_PATHNAME', 'LWGEOM_maxdistance2d_linestring' - LANGUAGE 'C' IMMUTABLE STRICT; - -- Availability: 1.5.0 -CREATE OR REPLACE FUNCTION _ST_MaxDistance(geometry,geometry) +CREATE OR REPLACE FUNCTION _ST_MaxDistance(geom1 geometry, geom2 geometry) RETURNS float8 AS 'MODULE_PATHNAME', 'LWGEOM_maxdistance2d_linestring' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- Availability: 1.5.0 -CREATE OR REPLACE FUNCTION ST_MaxDistance(geometry,geometry) +CREATE OR REPLACE FUNCTION ST_MaxDistance(geom1 geometry, geom2 geometry) RETURNS float8 AS 'SELECT _ST_MaxDistance(ST_ConvexHull($1), ST_ConvexHull($2))' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION ST_ClosestPoint(geometry,geometry) +CREATE OR REPLACE FUNCTION ST_ClosestPoint(geom1 geometry, geom2 geometry) RETURNS geometry AS 'MODULE_PATHNAME', 'LWGEOM_closestpoint' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION ST_ShortestLine(geometry,geometry) +CREATE OR REPLACE FUNCTION ST_ShortestLine(geom1 geometry, geom2 geometry) RETURNS geometry AS 'MODULE_PATHNAME', 'LWGEOM_shortestline2d' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION _ST_LongestLine(geometry,geometry) +CREATE OR REPLACE FUNCTION _ST_LongestLine(geom1 geometry, geom2 geometry) RETURNS geometry AS 'MODULE_PATHNAME', 'LWGEOM_longestline2d' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION ST_LongestLine(geometry,geometry) +CREATE OR REPLACE FUNCTION ST_LongestLine(geom1 geometry, geom2 geometry) RETURNS geometry AS 'SELECT _ST_LongestLine(ST_ConvexHull($1), ST_ConvexHull($2))' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION _ST_DFullyWithin(geometry,geometry,float8) +CREATE OR REPLACE FUNCTION _ST_DFullyWithin(geom1 geometry, geom2 geometry,float8) RETURNS boolean AS 'MODULE_PATHNAME', 'LWGEOM_dfullywithin' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION ST_DFullyWithin(geometry, geometry, float8) +CREATE OR REPLACE FUNCTION ST_DFullyWithin(geom1 geometry, geom2 geometry, float8) RETURNS boolean AS 'SELECT $1 && ST_Expand($2,$3) AND $2 && ST_Expand($1,$3) AND _ST_DFullyWithin(ST_ConvexHull($1), ST_ConvexHull($2), $3)' - LANGUAGE 'SQL' IMMUTABLE; - + LANGUAGE 'sql' IMMUTABLE; +CREATE OR REPLACE FUNCTION ST_FlipCoordinates(geometry) + RETURNS geometry + AS 'MODULE_PATHNAME', 'ST_FlipCoordinates' + LANGUAGE 'c' IMMUTABLE STRICT; + -- -- SFSQL 1.1 -- @@ -6046,34 +4182,6 @@ -- and another to actual return, in a CASE WHEN construct). -- Also, we profit from plpgsql to RAISE exceptions. -- --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION BdPolyFromText(text, integer) -RETURNS geometry -AS $$ -DECLARE - geomtext alias for $1; - srid alias for $2; - mline geometry; - geom geometry; -BEGIN - mline := MultiLineStringFromText(geomtext, srid); - - IF mline IS NULL - THEN - RAISE EXCEPTION 'Input is not a MultiLinestring'; - END IF; - - geom := BuildArea(mline); - - IF GeometryType(geom) != 'POLYGON' - THEN - RAISE EXCEPTION 'Input returns more then a single polygon, try using BdMPolyFromText instead'; - END IF; - - RETURN geom; -END; -$$ -LANGUAGE 'plpgsql' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_BdPolyFromText(text, integer) @@ -6116,29 +4224,6 @@ -- This is a PLPGSQL function rather then an SQL function -- To raise an exception in case of invalid input. -- --- Deprecation in 1.2.3 -CREATE OR REPLACE FUNCTION BdMPolyFromText(text, integer) -RETURNS geometry -AS $$ -DECLARE - geomtext alias for $1; - srid alias for $2; - mline geometry; - geom geometry; -BEGIN - mline := MultiLineStringFromText(geomtext, srid); - - IF mline IS NULL - THEN - RAISE EXCEPTION 'Input is not a MultiLinestring'; - END IF; - - geom := multi(BuildArea(mline)); - - RETURN geom; -END; -$$ -LANGUAGE 'plpgsql' IMMUTABLE STRICT; -- Availability: 1.2.2 CREATE OR REPLACE FUNCTION ST_BdMPolyFromText(text, integer) @@ -6157,7 +4242,7 @@ RAISE EXCEPTION 'Input is not a MultiLinestring'; END IF; - geom := multi(ST_BuildArea(mline)); + geom := ST_Multi(ST_BuildArea(mline)); RETURN geom; END; @@ -6165,13 +4250,294 @@ LANGUAGE 'plpgsql' IMMUTABLE STRICT; #include "long_xact.sql.in.c" -#include "sqlmm.sql.in.c" #include "geography.sql.in.c" + + +-- Availability: 1.2.2 +CREATE OR REPLACE FUNCTION ST_distance_sphere(geom1 geometry, geom2 geometry) + RETURNS FLOAT8 + AS $$ + select st_distance(geography($1),geography($2),false) + $$ + LANGUAGE 'sql' IMMUTABLE STRICT + COST 300; + +-- Availability: 1.2.2 +CREATE OR REPLACE FUNCTION ST_distance_sphere(geom1 geometry, geom2 geometry) + RETURNS FLOAT8 + AS $$ + select st_distance(geography($1),geography($2),false) + $$ + LANGUAGE 'sql' IMMUTABLE STRICT + COST 300; + + --------------------------------------------------------------- --- SQL-MM +-- GEOMETRY_COLUMNS view support functions +--------------------------------------------------------------- +-- New helper function so we can keep list of valid geometry types in one place -- +-- Maps old names to pramsey beautiful names but can take old name or new name as input +-- By default returns new name but can be overridden to return old name for old constraint like support +CREATE OR REPLACE FUNCTION postgis_type_name(geomname varchar, coord_dimension integer, use_new_name boolean DEFAULT true) + RETURNS varchar +AS +$$ + SELECT CASE WHEN $3 THEN new_name ELSE old_name END As geomname + FROM + ( VALUES + ('GEOMETRY', 'Geometry', 2) , + ('GEOMETRY', 'GeometryZ', 3) , + ('GEOMETRY', 'GeometryZM', 4) , + ('GEOMETRYCOLLECTION', 'GeometryCollection', 2) , + ('GEOMETRYCOLLECTION', 'GeometryCollectionZ', 3) , + ('GEOMETRYCOLLECTIONM', 'GeometryCollectionM', 3) , + ('GEOMETRYCOLLECTION', 'GeometryCollectionZM', 4) , + + ('POINT', 'Point',2) , + ('POINTM','PointM',3) , + ('POINT', 'PointZ',3) , + ('POINT', 'PointZM',4) , + + ('MULTIPOINT','MultiPoint',2) , + ('MULTIPOINT','MultiPointZ',3) , + ('MULTIPOINTM','MultiPointM',3) , + ('MULTIPOINT','MultiPointZM',4) , + + ('POLYGON', 'Polygon',2) , + ('POLYGON', 'PolygonZ',3) , + ('POLYGONM', 'PolygonM',3) , + ('POLYGON', 'PolygonZM',4) , + + ('MULTIPOLYGON', 'MultiPolygon',2) , + ('MULTIPOLYGON', 'MultiPolygonZ',3) , + ('MULTIPOLYGONM', 'MultiPolygonM',3) , + ('MULTIPOLYGON', 'MultiPolygonZM',4) , + + ('MULTILINESTRING', 'MultiLineString',2) , + ('MULTILINESTRING', 'MultiLineStringZ',3) , + ('MULTILINESTRINGM', 'MultiLineStringM',3) , + ('MULTILINESTRING', 'MultiLineStringZM',4) , + + ('LINESTRING', 'LineString',2) , + ('LINESTRING', 'LineStringZ',3) , + ('LINESTRINGM', 'LineStringM',3) , + ('LINESTRING', 'LineStringZM',4) , + + ('CIRCULARSTRING', 'CircularString',2) , + ('CIRCULARSTRING', 'CircularStringZ',3) , + ('CIRCULARSTRINGM', 'CircularStringM',3) , + ('CIRCULARSTRING', 'CircularStringZM',4) , + + ('COMPOUNDCURVE', 'CompoundCurve',2) , + ('COMPOUNDCURVE', 'CompoundCurveZ',3) , + ('COMPOUNDCURVEM', 'CompoundCurveM',3) , + ('COMPOUNDCURVE', 'CompoundCurveZM',4) , + + ('CURVEPOLYGON', 'CurvePolygon',2) , + ('CURVEPOLYGON', 'CurvePolygonZ',3) , + ('CURVEPOLYGONM', 'CurvePolygonM',3) , + ('CURVEPOLYGON', 'CurvePolygonZM',4) , + + ('MULTICURVE', 'MultiCurve',2 ) , + ('MULTICURVE', 'MultiCurveZ',3 ) , + ('MULTICURVEM', 'MultiCurveM',3 ) , + ('MULTICURVE', 'MultiCurveZM',4 ) , + + ('MULTISURFACE', 'MultiSurface', 2) , + ('MULTISURFACE', 'MultiSurfaceZ', 3) , + ('MULTISURFACEM', 'MultiSurfaceM', 3) , + ('MULTISURFACE', 'MultiSurfaceZM', 4) , + + ('POLYHEDRALSURFACE', 'PolyhedralSurface',2) , + ('POLYHEDRALSURFACE', 'PolyhedralSurfaceZ',3) , + ('POLYHEDRALSURFACEM', 'PolyhedralSurfaceM',3) , + ('POLYHEDRALSURFACE', 'PolyhedralSurfaceZM',4) , + + ('TRIANGLE', 'Triangle',2) , + ('TRIANGLE', 'TriangleZ',3) , + ('TRIANGLEM', 'TriangleM',3) , + ('TRIANGLE', 'TriangleZM',4) , + + ('TIN', 'Tin', 2), + ('TIN', 'TinZ', 3), + ('TIN', 'TinM', 3), + ('TIN', 'TinZM', 4) ) + As g(old_name, new_name, coord_dimension) + WHERE (upper(old_name) = upper($1) OR upper(new_name) = upper($1)) + AND coord_dimension = $2; +$$ +LANGUAGE 'sql' IMMUTABLE STRICT COST 200; + +CREATE OR REPLACE FUNCTION postgis_constraint_srid(geomschema text, geomtable text, geomcolumn text) RETURNS integer AS +$$ +SELECT replace(replace(split_part(s.consrc, ' = ', 2), ')', ''), '(', '')::integer + FROM pg_class c, pg_namespace n, pg_attribute a, pg_constraint s + WHERE n.nspname = $1 + AND c.relname = $2 + AND a.attname = $3 + AND a.attrelid = c.oid + AND s.connamespace = n.oid + AND s.conrelid = c.oid + AND a.attnum = ANY (s.conkey) + AND s.consrc LIKE '%srid(% = %'; +$$ +LANGUAGE 'sql' STABLE STRICT; + +CREATE OR REPLACE FUNCTION postgis_constraint_dims(geomschema text, geomtable text, geomcolumn text) RETURNS integer AS +$$ +SELECT replace(split_part(s.consrc, ' = ', 2), ')', '')::integer + FROM pg_class c, pg_namespace n, pg_attribute a, pg_constraint s + WHERE n.nspname = $1 + AND c.relname = $2 + AND a.attname = $3 + AND a.attrelid = c.oid + AND s.connamespace = n.oid + AND s.conrelid = c.oid + AND a.attnum = ANY (s.conkey) + AND s.consrc LIKE '%ndims(% = %'; +$$ +LANGUAGE 'sql' STABLE STRICT; + +-- support function to pull out geometry type from constraint check +-- will return pretty name instead of ugly name +CREATE OR REPLACE FUNCTION postgis_constraint_type(geomschema text, geomtable text, geomcolumn text) RETURNS varchar AS +$$ +SELECT replace(split_part(s.consrc, '''', 2), ')', '')::varchar + FROM pg_class c, pg_namespace n, pg_attribute a, pg_constraint s + WHERE n.nspname = $1 + AND c.relname = $2 + AND a.attname = $3 + AND a.attrelid = c.oid + AND s.connamespace = n.oid + AND s.conrelid = c.oid + AND a.attnum = ANY (s.conkey) + AND s.consrc LIKE '%geometrytype(% = %'; +$$ +LANGUAGE 'sql' STABLE STRICT; + +CREATE OR REPLACE VIEW geometry_columns AS + SELECT current_database()::varchar(256) AS f_table_catalog, + n.nspname::varchar(256) AS f_table_schema, + c.relname::varchar(256) AS f_table_name, + a.attname::varchar(256) AS f_geometry_column, + COALESCE(NULLIF(postgis_typmod_dims(a.atttypmod),2), + postgis_constraint_dims(n.nspname, c.relname, a.attname), + 2) AS coord_dimension, + COALESCE(NULLIF(postgis_typmod_srid(a.atttypmod),0), + postgis_constraint_srid(n.nspname, c.relname, a.attname), + 0) AS srid, + -- force to be uppercase with no ZM so is backwards compatible + -- with old geometry_columns + replace( + replace( + COALESCE( + NULLIF(upper(postgis_typmod_type(a.atttypmod)::text), 'GEOMETRY'), + postgis_constraint_type(n.nspname, c.relname, a.attname), + 'GEOMETRY' + ), 'ZM', '' + ), 'Z', '' + )::varchar(30) AS type + FROM pg_class c, pg_attribute a, pg_type t, pg_namespace n + WHERE t.typname = 'geometry'::name + AND a.attisdropped = false + AND a.atttypid = t.oid + AND a.attrelid = c.oid + AND c.relnamespace = n.oid + AND (c.relkind = 'r'::"char" OR c.relkind = 'v'::"char") + AND NOT pg_is_other_temp_schema(c.relnamespace) + AND NOT ( n.nspname = 'public' AND c.relname = 'raster_columns' ) + AND has_table_privilege( c.oid, 'SELECT'::text ); + +-- TODO: support RETURNING and raise a WARNING +CREATE OR REPLACE RULE geometry_columns_insert AS + ON INSERT TO geometry_columns + DO INSTEAD NOTHING; + +-- TODO: raise a WARNING +CREATE OR REPLACE RULE geometry_columns_update AS + ON UPDATE TO geometry_columns + DO INSTEAD NOTHING; + +-- TODO: raise a WARNING +CREATE OR REPLACE RULE geometry_columns_delete AS + ON DELETE TO geometry_columns + DO INSTEAD NOTHING; + + +--------------------------------------------------------------- +-- 3D-functions --------------------------------------------------------------- +CREATE OR REPLACE FUNCTION ST_3DDistance(geom1 geometry, geom2 geometry) + RETURNS float8 + AS 'MODULE_PATHNAME', 'LWGEOM_mindistance3d' + LANGUAGE 'c' IMMUTABLE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION ST_3DMaxDistance(geom1 geometry, geom2 geometry) + RETURNS float8 + AS 'MODULE_PATHNAME', 'LWGEOM_maxdistance3d' + LANGUAGE 'c' IMMUTABLE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION ST_3DClosestPoint(geom1 geometry, geom2 geometry) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_closestpoint3d' + LANGUAGE 'c' IMMUTABLE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION ST_3DShortestLine(geom1 geometry, geom2 geometry) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_shortestline3d' + LANGUAGE 'c' IMMUTABLE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION ST_3DLongestLine(geom1 geometry, geom2 geometry) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_longestline3d' + LANGUAGE 'c' IMMUTABLE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION _ST_3DDWithin(geom1 geometry, geom2 geometry,float8) + RETURNS boolean + AS 'MODULE_PATHNAME', 'LWGEOM_dwithin3d' + LANGUAGE 'c' IMMUTABLE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION ST_3DDWithin(geom1 geometry, geom2 geometry,float8) + RETURNS boolean + AS 'SELECT $1 && ST_Expand($2,$3) AND $2 && ST_Expand($1,$3) AND _ST_3DDWithin($1, $2, $3)' + LANGUAGE 'sql' IMMUTABLE + COST 100; + +CREATE OR REPLACE FUNCTION _ST_3DDFullyWithin(geom1 geometry, geom2 geometry,float8) + RETURNS boolean + AS 'MODULE_PATHNAME', 'LWGEOM_dfullywithin3d' + LANGUAGE 'c' IMMUTABLE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION ST_3DDFullyWithin(geom1 geometry, geom2 geometry,float8) + RETURNS boolean + AS 'SELECT $1 && ST_Expand($2,$3) AND $2 && ST_Expand($1,$3) AND _ST_3DDFullyWithin($1, $2, $3)' + LANGUAGE 'sql' IMMUTABLE + COST 100; + +CREATE OR REPLACE FUNCTION ST_3DIntersects(geom1 geometry, geom2 geometry) + RETURNS boolean + AS 'SELECT $1 && $2 AND _ST_3DDWithin($1, $2, 0.0)' + LANGUAGE 'sql' IMMUTABLE + COST 100; + + +--------------------------------------------------------------- +-- SQL-MM +--------------------------------------------------------------- +-- PostGIS equivalent function: ST_ndims(geometry) +CREATE OR REPLACE FUNCTION ST_CoordDim(Geometry geometry) + RETURNS smallint + AS 'MODULE_PATHNAME', 'LWGEOM_ndims' + LANGUAGE 'c' IMMUTABLE STRICT; -- -- SQL-MM -- @@ -6183,7 +4549,7 @@ CREATE OR REPLACE FUNCTION ST_CurveToLine(geometry, integer) RETURNS geometry AS 'MODULE_PATHNAME', 'LWGEOM_curve_segmentize' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -- -- SQL-MM -- @@ -6194,24 +4560,93 @@ -- the default value of 32 segments per quarter circle CREATE OR REPLACE FUNCTION ST_CurveToLine(geometry) RETURNS geometry AS 'SELECT ST_CurveToLine($1, 32)' - LANGUAGE 'SQL' IMMUTABLE STRICT; + LANGUAGE 'sql' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION ST_HasArc(geometry) +CREATE OR REPLACE FUNCTION ST_HasArc(Geometry geometry) RETURNS boolean AS 'MODULE_PATHNAME', 'LWGEOM_has_arc' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION ST_LineToCurve(geometry) +CREATE OR REPLACE FUNCTION ST_LineToCurve(Geometry geometry) RETURNS geometry AS 'MODULE_PATHNAME', 'LWGEOM_line_desegmentize' - LANGUAGE 'C' IMMUTABLE STRICT; + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Availability: 1.5.0 +CREATE OR REPLACE FUNCTION _ST_OrderingEquals(GeometryA geometry, GeometryB geometry) + RETURNS boolean + AS 'MODULE_PATHNAME', 'LWGEOM_same' + LANGUAGE 'c' IMMUTABLE STRICT + COST 100; + +-- Availability: 1.3.0 +CREATE OR REPLACE FUNCTION ST_OrderingEquals(GeometryA geometry, GeometryB geometry) + RETURNS boolean + AS $$ + SELECT $1 ~= $2 AND _ST_OrderingEquals($1, $2) + $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +------------------------------------------------------------------------------- +-- SQL/MM - SQL Functions on type ST_Point +------------------------------------------------------------------------------- + +-- PostGIS equivalent function: ST_MakePoint(XCoordinate float8,YCoordinate float8) +CREATE OR REPLACE FUNCTION ST_Point(float8, float8) + RETURNS geometry + AS 'MODULE_PATHNAME', 'LWGEOM_makepoint' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- PostGIS equivalent function: ST_MakePolygon(Geometry geometry) +CREATE OR REPLACE FUNCTION ST_Polygon(geometry, int) + RETURNS geometry + AS $$ + SELECT ST_SetSRID(ST_MakePolygon($1), $2) + $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- PostGIS equivalent function: GeomFromWKB(WKB bytea)) +-- Note: Defaults to an SRID=-1, not 0 as per SQL/MM specs. +CREATE OR REPLACE FUNCTION ST_WKBToSQL(WKB bytea) + RETURNS geometry + AS 'MODULE_PATHNAME','LWGEOM_from_WKB' + LANGUAGE 'c' IMMUTABLE STRICT; + +--- +-- Linear referencing functions +--- +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION ST_LocateBetween(Geometry geometry, FromMeasure float8, ToMeasure float8, LeftRightOffset float8 default 0.0) + RETURNS geometry + AS 'MODULE_PATHNAME', 'ST_LocateBetween' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION ST_LocateAlong(Geometry geometry, Measure float8, LeftRightOffset float8 default 0.0) + RETURNS geometry + AS 'MODULE_PATHNAME', 'ST_LocateAlong' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Only accepts LINESTRING as parameters. +-- Availability: 1.4.0 +CREATE OR REPLACE FUNCTION ST_LocateBetweenElevations(Geometry geometry, FromElevation float8, ToElevation float8) + RETURNS geometry + AS 'MODULE_PATHNAME', 'ST_LocateBetweenElevations' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Availability: 2.0.0 +CREATE OR REPLACE FUNCTION ST_InterpolatePoint(Line geometry, Point geometry) + RETURNS float8 + AS 'MODULE_PATHNAME', 'ST_InterpolatePoint' + LANGUAGE 'c' IMMUTABLE STRICT; + --------------------------------------------------------------- -- END --------------------------------------------------------------- --------------------------------------------------------------- --- USER CONTRIUBUTED +-- USER CONTRIBUTED --------------------------------------------------------------- ----------------------------------------------------------------------- @@ -6222,7 +4657,7 @@ -- Contributed by Bruce Rindahl -- Availability: 1.4.0 ----------------------------------------------------------------------- -CREATE OR REPLACE FUNCTION ST_MinimumBoundingCircle(inputgeom geometry, segs_per_quarter integer) +CREATE OR REPLACE FUNCTION ST_MinimumBoundingCircle(inputgeom geometry, segs_per_quarter integer DEFAULT 48) RETURNS geometry AS $BODY$ DECLARE @@ -6271,7 +4706,7 @@ END LOOP; -- We now have the diameter of the convex hull. The following line returns it if desired. - -- RETURN MakeLine(PointN(ring,idx1),PointN(ring,idx2)); + -- RETURN ST_MakeLine(ST_PointN(ring,idx1),ST_PointN(ring,idx2)); -- Now for the Minimum Bounding Circle. Since we know the two points furthest from each -- other, the MBC must go through those two points. Start with those points as a diameter of a circle. @@ -6295,20 +4730,20 @@ -- Compute the midpoint p1 = ST_line_interpolate_point(l1,0.5); -- Rotate the line 90 degrees around the midpoint (perpendicular bisector) - l1 = ST_Translate(ST_Rotate(ST_Translate(l1,-X(p1),-Y(p1)),pi()/2),X(p1),Y(p1)); + l1 = ST_Rotate(l1,pi()/2,p1); -- Compute the azimuth of the bisector a1 = ST_Azimuth(ST_PointN(l1,1),ST_PointN(l1,2)); -- Extend the line in each direction the new computed distance to insure they will intersect - l1 = ST_AddPoint(l1,ST_Makepoint(X(ST_PointN(l1,2))+sin(a1)*dist,Y(ST_PointN(l1,2))+cos(a1)*dist),-1); - l1 = ST_AddPoint(l1,ST_Makepoint(X(ST_PointN(l1,1))-sin(a1)*dist,Y(ST_PointN(l1,1))-cos(a1)*dist),0); + l1 = ST_AddPoint(l1,ST_Makepoint(ST_X(ST_PointN(l1,2))+sin(a1)*dist,ST_Y(ST_PointN(l1,2))+cos(a1)*dist),-1); + l1 = ST_AddPoint(l1,ST_Makepoint(ST_X(ST_PointN(l1,1))-sin(a1)*dist,ST_Y(ST_PointN(l1,1))-cos(a1)*dist),0); -- Repeat for the line from the point to the other diameter point l2 = ST_Makeline(ST_PointN(ring,idx2),ST_PointN(ring,k)); p2 = ST_Line_interpolate_point(l2,0.5); - l2 = ST_Translate(ST_Rotate(ST_Translate(l2,-X(p2),-Y(p2)),pi()/2),X(p2),Y(p2)); + l2 = ST_Rotate(l2,pi()/2,p2); a2 = ST_Azimuth(ST_PointN(l2,1),ST_PointN(l2,2)); - l2 = ST_AddPoint(l2,ST_Makepoint(X(ST_PointN(l2,2))+sin(a2)*dist,Y(ST_PointN(l2,2))+cos(a2)*dist),-1); - l2 = ST_AddPoint(l2,ST_Makepoint(X(ST_PointN(l2,1))-sin(a2)*dist,Y(ST_PointN(l2,1))-cos(a2)*dist),0); + l2 = ST_AddPoint(l2,ST_Makepoint(ST_X(ST_PointN(l2,2))+sin(a2)*dist,ST_Y(ST_PointN(l2,2))+cos(a2)*dist),-1); + l2 = ST_AddPoint(l2,ST_Makepoint(ST_X(ST_PointN(l2,1))-sin(a2)*dist,ST_Y(ST_PointN(l2,1))-cos(a2)*dist),0); -- The new center is the intersection of the two bisectors center = ST_Intersection(l1,l2); @@ -6324,10 +4759,251 @@ $BODY$ LANGUAGE 'plpgsql' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION ST_MinimumBoundingCircle(geometry) - RETURNS geometry AS -'SELECT ST_MinimumBoundingCircle($1, 48)' - LANGUAGE 'sql' IMMUTABLE STRICT; -COMMIT; + +-- ST_ConcaveHull and Helper functions starts here -- +----------------------------------------------------------------------- +-- Contributed by Regina Obe and Leo Hsu +-- Availability: 2.0.0 +----------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION _st_concavehull(param_inputgeom geometry) + RETURNS geometry AS +$$ + DECLARE + vexhull GEOMETRY; + var_resultgeom geometry; + var_inputgeom geometry; + vexring GEOMETRY; + cavering GEOMETRY; + cavept geometry[]; + seglength double precision; + var_tempgeom geometry; + scale_factor integer := 1; + i integer; + + BEGIN + + -- First compute the ConvexHull of the geometry + vexhull := ST_ConvexHull(param_inputgeom); + var_inputgeom := param_inputgeom; + --A point really has no concave hull + IF ST_GeometryType(vexhull) = 'ST_Point' OR ST_GeometryType(vexHull) = 'ST_LineString' THEN + RETURN vexhull; + END IF; + + -- convert the hull perimeter to a linestring so we can manipulate individual points + vexring := CASE WHEN ST_GeometryType(vexhull) = 'ST_LineString' THEN vexhull ELSE ST_ExteriorRing(vexhull) END; + IF abs(ST_X(ST_PointN(vexring,1))) < 1 THEN --scale the geometry to prevent stupid precision errors - not sure it works so make low for now + scale_factor := 100; + vexring := ST_Scale(vexring, scale_factor,scale_factor); + var_inputgeom := ST_Scale(var_inputgeom, scale_factor, scale_factor); + --RAISE NOTICE 'Scaling'; + END IF; + seglength := ST_Length(vexring)/least(ST_NPoints(vexring)*2,1000) ; + + vexring := ST_Segmentize(vexring, seglength); + -- find the point on the original geom that is closest to each point of the convex hull and make a new linestring out of it. + cavering := ST_Collect( + ARRAY( + + SELECT + ST_ClosestPoint(var_inputgeom, pt ) As the_geom + FROM ( + SELECT ST_PointN(vexring, n ) As pt, n + FROM + generate_series(1, ST_NPoints(vexring) ) As n + ) As pt + + ) + ) + ; + + + var_resultgeom := ST_MakeLine(geom) + FROM ST_Dump(cavering) As foo; + + IF ST_IsSimple(var_resultgeom) THEN + var_resultgeom := ST_MakePolygon(var_resultgeom); + --RAISE NOTICE 'is Simple: %', var_resultgeom; + ELSE /** will not result in a valid polygon -- just return convex hull **/ + --RAISE NOTICE 'is not Simple: %', var_resultgeom; + var_resultgeom := ST_ConvexHull(var_resultgeom); + END IF; + + IF scale_factor > 1 THEN -- scale the result back + var_resultgeom := ST_Scale(var_resultgeom, 1/scale_factor, 1/scale_factor); + END IF; + RETURN var_resultgeom; + + END; +$$ + LANGUAGE plpgsql IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION ST_ConcaveHull(param_geom geometry, param_pctconvex float, param_allow_holes boolean DEFAULT false) RETURNS geometry AS +$$ + DECLARE + var_convhull geometry := ST_ConvexHull(param_geom); + var_param_geom geometry := param_geom; + var_initarea float := ST_Area(var_convhull); + var_newarea float := var_initarea; + var_div integer := 6; /** this is the 1/var_div is the percent increase we will allow per triangle to keep speed decent **/ + var_tempgeom geometry; + var_tempgeom2 geometry; + var_cent geometry; + var_geoms geometry[4]; /** We will cut the current geometry into 4 triangular quadrants along the centroid/extent **/ + var_enline geometry; + var_resultgeom geometry; + var_atempgeoms geometry[]; + var_buf float := 1; /**tolerance so that geometries that are right on the extent don't get accidentally clipped off **/ + BEGIN + -- We start with convex hull as our base + var_resultgeom := var_convhull; + + IF param_pctconvex = 1 THEN + return var_resultgeom; + ELSIF ST_GeometryType(var_param_geom) = 'ST_Polygon' THEN -- it is as concave as it is going to get + IF param_allow_holes THEN -- leave the holes + RETURN var_param_geom; + ELSE -- remove the holes + var_resultgeom := ST_MakePolygon(ST_ExteriorRing(var_param_geom)); + RETURN var_resultgeom; + END IF; + END IF; + IF ST_Dimension(var_resultgeom) > 1 AND param_pctconvex BETWEEN 0 and 0.98 THEN + -- get linestring that forms envelope of geometry + var_enline := ST_Boundary(ST_Envelope(var_param_geom)); + var_buf := ST_Length(var_enline)/1000.0; + IF ST_GeometryType(var_param_geom) = 'ST_MultiPoint' AND ST_NumGeometries(var_param_geom) BETWEEN 4 and 200 THEN + -- we make polygons out of points since they are easier to cave in. + -- Note we limit to between 4 and 200 points because this process is slow and gets quadratically slow + var_buf := sqrt(ST_Area(var_convhull)*0.8/(ST_NumGeometries(var_param_geom)*ST_NumGeometries(var_param_geom))); + var_atempgeoms := ARRAY(SELECT geom FROM ST_DumpPoints(var_param_geom)); + -- 5 and 10 and just fudge factors + var_tempgeom := ST_Union(ARRAY(SELECT geom + FROM ( + -- fuse near neighbors together + SELECT DISTINCT ON (i) i, ST_Distance(var_atempgeoms[i],var_atempgeoms[j]), ST_Buffer(ST_MakeLine(var_atempgeoms[i], var_atempgeoms[j]) , var_buf*5, 'quad_segs=3') As geom + FROM generate_series(1,array_upper(var_atempgeoms, 1)) As i + INNER JOIN generate_series(1,array_upper(var_atempgeoms, 1)) As j + ON ( + NOT ST_Intersects(var_atempgeoms[i],var_atempgeoms[j]) + AND ST_DWithin(var_atempgeoms[i],var_atempgeoms[j], var_buf*10) + ) + UNION ALL + -- catch the ones with no near neighbors + SELECT i, 0, ST_Buffer(var_atempgeoms[i] , var_buf*10, 'quad_segs=3') As geom + FROM generate_series(1,array_upper(var_atempgeoms, 1)) As i + LEFT JOIN generate_series(ceiling(array_upper(var_atempgeoms,1)/2)::integer,array_upper(var_atempgeoms, 1)) As j + ON ( + NOT ST_Intersects(var_atempgeoms[i],var_atempgeoms[j]) + AND ST_DWithin(var_atempgeoms[i],var_atempgeoms[j], var_buf*10) + ) + WHERE j IS NULL + ORDER BY 1, 2 + ) As foo ) ); + IF ST_IsValid(var_tempgeom) AND ST_GeometryType(var_tempgeom) = 'ST_Polygon' THEN + var_tempgeom := ST_Intersection(var_tempgeom, var_convhull); + IF param_allow_holes THEN + var_param_geom := var_tempgeom; + ELSE + var_param_geom := ST_MakePolygon(ST_ExteriorRing(var_tempgeom)); + END IF; + return var_param_geom; + ELSIF ST_IsValid(var_tempgeom) THEN + var_param_geom := ST_Intersection(var_tempgeom, var_convhull); + END IF; + END IF; + + IF ST_GeometryType(var_param_geom) = 'ST_Polygon' THEN + IF NOT param_allow_holes THEN + var_param_geom := ST_MakePolygon(ST_ExteriorRing(var_param_geom)); + END IF; + return var_param_geom; + END IF; + var_cent := ST_Centroid(var_param_geom); + IF (ST_XMax(var_enline) - ST_XMin(var_enline) ) > var_buf AND (ST_YMax(var_enline) - ST_YMin(var_enline) ) > var_buf THEN + IF ST_Dwithin(ST_Centroid(var_convhull) , ST_Centroid(ST_Envelope(var_param_geom)), var_buf/2) THEN + -- If the geometric dimension is > 1 and the object is symettric (cutting at centroid will not work -- offset a bit) + var_cent := ST_Translate(var_cent, (ST_XMax(var_enline) - ST_XMin(var_enline))/1000, (ST_YMAX(var_enline) - ST_YMin(var_enline))/1000); + ELSE + -- uses closest point on geometry to centroid. I can't explain why we are doing this + var_cent := ST_ClosestPoint(var_param_geom,var_cent); + END IF; + IF ST_DWithin(var_cent, var_enline,var_buf) THEN + var_cent := ST_centroid(ST_Envelope(var_param_geom)); + END IF; + -- break envelope into 4 triangles about the centroid of the geometry and returned the clipped geometry in each quadrant + FOR i in 1 .. 4 LOOP + var_geoms[i] := ST_MakePolygon(ST_MakeLine(ARRAY[ST_PointN(var_enline,i), ST_PointN(var_enline,i+1), var_cent, ST_PointN(var_enline,i)])); + var_geoms[i] := ST_Intersection(var_param_geom, ST_Buffer(var_geoms[i],var_buf)); + IF ST_IsValid(var_geoms[i]) THEN + + ELSE + var_geoms[i] := ST_BuildArea(ST_MakeLine(ARRAY[ST_PointN(var_enline,i), ST_PointN(var_enline,i+1), var_cent, ST_PointN(var_enline,i)])); + END IF; + END LOOP; + var_tempgeom := ST_Union(ARRAY[ST_ConvexHull(var_geoms[1]), ST_ConvexHull(var_geoms[2]) , ST_ConvexHull(var_geoms[3]), ST_ConvexHull(var_geoms[4])]); + --RAISE NOTICE 'Curr vex % ', ST_AsText(var_tempgeom); + IF ST_Area(var_tempgeom) <= var_newarea AND ST_IsValid(var_tempgeom) THEN --AND ST_GeometryType(var_tempgeom) ILIKE '%Polygon' + + var_tempgeom := ST_Buffer(ST_ConcaveHull(var_geoms[1],least(param_pctconvex + param_pctconvex/var_div),true),var_buf, 'quad_segs=2'); + FOR i IN 1 .. 4 LOOP + var_geoms[i] := ST_Buffer(ST_ConcaveHull(var_geoms[i],least(param_pctconvex + param_pctconvex/var_div),true), var_buf, 'quad_segs=2'); + IF ST_IsValid(var_geoms[i]) Then + var_tempgeom := ST_Union(var_tempgeom, var_geoms[i]); + ELSE + RAISE NOTICE 'Not valid % %', i, ST_AsText(var_tempgeom); + var_tempgeom := ST_Union(var_tempgeom, ST_ConvexHull(var_geoms[i])); + END IF; + END LOOP; + + --RAISE NOTICE 'Curr concave % ', ST_AsText(var_tempgeom); + IF ST_IsValid(var_tempgeom) THEN + var_resultgeom := var_tempgeom; + END IF; + var_newarea := ST_Area(var_resultgeom); + ELSIF ST_IsValid(var_tempgeom) THEN + var_resultgeom := var_tempgeom; + END IF; + + IF ST_NumGeometries(var_resultgeom) > 1 THEN + var_tempgeom := _ST_ConcaveHull(var_resultgeom); + IF ST_IsValid(var_tempgeom) AND ST_GeometryType(var_tempgeom) ILIKE 'ST_Polygon' THEN + var_resultgeom := var_tempgeom; + ELSE + var_resultgeom := ST_Buffer(var_tempgeom,var_buf, 'quad_segs=2'); + END IF; + END IF; + IF param_allow_holes = false THEN + -- only keep exterior ring since we do not want holes + var_resultgeom := ST_MakePolygon(ST_ExteriorRing(var_resultgeom)); + END IF; + ELSE + var_resultgeom := ST_Buffer(var_resultgeom,var_buf); + END IF; + var_resultgeom := ST_Intersection(var_resultgeom, ST_ConvexHull(var_param_geom)); + ELSE + -- dimensions are too small to cut + var_resultgeom := _ST_ConcaveHull(var_param_geom); + END IF; + RETURN var_resultgeom; + END; +$$ +LANGUAGE 'plpgsql' IMMUTABLE STRICT; +-- ST_ConcaveHull and Helper functions end here -- -#include "postgis_drop.sql.in.c" +----------------------------------------------------------------------- +-- X3D OUTPUT +----------------------------------------------------------------------- +-- _ST_AsX3D(version, geom, precision, option, attribs) +CREATE OR REPLACE FUNCTION _ST_AsX3D(int4, geometry, int4, int4, text) + RETURNS TEXT + AS 'MODULE_PATHNAME','LWGEOM_asX3D' + LANGUAGE 'c' IMMUTABLE; + +-- ST_AsX3D(geom, precision, options) +CREATE OR REPLACE FUNCTION ST_AsX3D(geom geometry, maxdecimaldigits integer DEFAULT 15, options integer DEFAULT 0) + RETURNS TEXT + AS $$SELECT _ST_AsX3D(3,$1,$2,$3,'');$$ + LANGUAGE 'sql' IMMUTABLE; + +COMMIT; diff -Nru postgis-1.5.3/postgis/postgis_drop.sql.in.c postgis-2.0.1/postgis/postgis_drop.sql.in.c --- postgis-1.5.3/postgis/postgis_drop.sql.in.c 2010-01-08 23:16:43.000000000 +0000 +++ postgis-2.0.1/postgis/postgis_drop.sql.in.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,43 +0,0 @@ --- First drop old aggregates -DROP AGGREGATE IF EXISTS geomunion(geometry); -DROP AGGREGATE IF EXISTS st_geomunion(geometry); -DROP AGGREGATE IF EXISTS accum_old(geometry); -DROP AGGREGATE IF EXISTS st_accum_old(geometry); - --- Then drop old functions -DROP FUNCTION IF EXISTS box2d_overleft(box2d, box2d); -DROP FUNCTION IF EXISTS box2d_overright(box2d, box2d); -DROP FUNCTION IF EXISTS box2d_left(box2d, box2d); -DROP FUNCTION IF EXISTS box2d_right(box2d, box2d); -DROP FUNCTION IF EXISTS box2d_contain(box2d, box2d); -DROP FUNCTION IF EXISTS box2d_contained(box2d, box2d); -DROP FUNCTION IF EXISTS box2d_overlap(box2d, box2d); -DROP FUNCTION IF EXISTS box2d_same(box2d, box2d); -DROP FUNCTION IF EXISTS box2d_intersects(box2d, box2d); -DROP FUNCTION IF EXISTS st_box2d_overleft(box2d, box2d); -DROP FUNCTION IF EXISTS st_box2d_overright(box2d, box2d); -DROP FUNCTION IF EXISTS st_box2d_left(box2d, box2d); -DROP FUNCTION IF EXISTS st_box2d_right(box2d, box2d); -DROP FUNCTION IF EXISTS st_box2d_contain(box2d, box2d); -DROP FUNCTION IF EXISTS st_box2d_contained(box2d, box2d); -DROP FUNCTION IF EXISTS st_box2d_overlap(box2d, box2d); -DROP FUNCTION IF EXISTS st_box2d_same(box2d, box2d); -DROP FUNCTION IF EXISTS st_box2d_intersects(box2d, box2d); -DROP FUNCTION IF EXISTS st_addbbox(geometry); -DROP FUNCTION IF EXISTS st_dropbbox(geometry); -DROP FUNCTION IF EXISTS st_hasbbox(geometry); -DROP FUNCTION IF EXISTS cache_bbox(); -DROP FUNCTION IF EXISTS st_cache_bbox(); -DROP FUNCTION IF EXISTS transform_geometry(geometry,text,text,int); -DROP FUNCTION IF EXISTS collector(geometry, geometry); -DROP FUNCTION IF EXISTS st_collector(geometry, geometry); -DROP FUNCTION IF EXISTS geom_accum (geometry[],geometry); -DROP FUNCTION IF EXISTS st_geom_accum (geometry[],geometry); -DROP FUNCTION IF EXISTS collect_garray (geometry[]); -DROP FUNCTION IF EXISTS st_collect_garray (geometry[]); -DROP FUNCTION IF EXISTS geosnoop(geometry); -DROP FUNCTION IF EXISTS jtsnoop(geometry); -DROP FUNCTION IF EXISTS st_noop(geometry); -DROP FUNCTION IF EXISTS st_max_distance(geometry, geometry); - - diff -Nru postgis-1.5.3/postgis/postgis_drop_after.sql postgis-2.0.1/postgis/postgis_drop_after.sql --- postgis-1.5.3/postgis/postgis_drop_after.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/postgis/postgis_drop_after.sql 2012-03-01 08:54:38.000000000 +0000 @@ -0,0 +1,139 @@ +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- +-- $Id: postgis_drop_after.sql 9360 2012-03-01 08:54:38Z strk $ +-- +-- PostGIS - Spatial Types for PostgreSQL +-- http://postgis.refractions.net +-- +-- Copyright (C) 2011-2012 Sandro Santilli +-- Copyright (C) 2010-2012 Regina Obe +-- Copyright (C) 2009 Paul Ramsey +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +-- +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- +-- This file contains drop commands for obsoleted items that need +-- to be dropped _after_ upgrade of old functions. +-- Changes to this file affect postgis_upgrade*.sql script. +-- +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +-- First drop old aggregates +DROP AGGREGATE IF EXISTS memgeomunion(geometry); +DROP AGGREGATE IF EXISTS geomunion(geometry); +DROP AGGREGATE IF EXISTS polygonize(geometry); -- Deprecated in 1.2.3, Dropped in 2.0.0 +DROP AGGREGATE IF EXISTS collect(geometry); -- Deprecated in 1.2.3, Dropped in 2.0.0 +DROP AGGREGATE IF EXISTS st_geomunion(geometry); +DROP AGGREGATE IF EXISTS accum_old(geometry); +DROP AGGREGATE IF EXISTS st_accum_old(geometry); + +-- BEGIN Management functions that now have default param for typmod -- +DROP FUNCTION IF EXISTS AddGeometryColumn(varchar,varchar,varchar,varchar,integer,varchar,integer); +DROP FUNCTION IF EXISTS AddGeometryColumn(varchar,varchar,varchar,integer,varchar,integer); +DROP FUNCTION IF EXISTS AddGeometryColumn(varchar,varchar,integer,varchar,integer); +DROP FUNCTION IF EXISTS populate_geometry_columns(); +DROP FUNCTION IF EXISTS populate_geometry_columns(oid); + +-- END Management functions now have default parameter for typmod -- +-- Then drop old functions +DROP FUNCTION IF EXISTS box2d_overleft(box2d, box2d); +DROP FUNCTION IF EXISTS box2d_overright(box2d, box2d); +DROP FUNCTION IF EXISTS box2d_left(box2d, box2d); +DROP FUNCTION IF EXISTS box2d_right(box2d, box2d); +DROP FUNCTION IF EXISTS box2d_contain(box2d, box2d); +DROP FUNCTION IF EXISTS box2d_contained(box2d, box2d); +DROP FUNCTION IF EXISTS box2d_overlap(box2d, box2d); +DROP FUNCTION IF EXISTS box2d_same(box2d, box2d); +DROP FUNCTION IF EXISTS box2d_intersects(box2d, box2d); +DROP FUNCTION IF EXISTS st_area(geography); -- this one changed to use default parameters +DROP FUNCTION IF EXISTS ST_AsGeoJson(geometry); -- this one changed to use default args +DROP FUNCTION IF EXISTS ST_AsGeoJson(geography); -- this one changed to use default args +DROP FUNCTION IF EXISTS ST_AsGeoJson(geometry,int4); -- this one changed to use default args +DROP FUNCTION IF EXISTS ST_AsGeoJson(geography,int4); -- this one changed to use default args +DROP FUNCTION IF EXISTS ST_AsGeoJson(int4,geometry); -- this one changed to use default args +DROP FUNCTION IF EXISTS ST_AsGeoJson(int4,geography); -- this one changed to use default args +DROP FUNCTION IF EXISTS ST_AsGeoJson(int4,geometry,int4); -- this one changed to use default args +DROP FUNCTION IF EXISTS ST_AsGeoJson(int4,geography,int4); -- this one changed to use default args +DROP FUNCTION IF EXISTS st_asgml(geometry); -- changed to use default args +DROP FUNCTION IF EXISTS st_asgml(geometry, int4); -- changed to use default args +DROP FUNCTION IF EXISTS st_asgml(int4, geometry); -- changed to use default args +DROP FUNCTION IF EXISTS st_asgml(int4, geometry, int4); -- changed to use default args +DROP FUNCTION IF EXISTS st_asgml(int4, geometry, int4,int4); -- changed to use default args +DROP FUNCTION IF EXISTS st_asgml(geography); -- changed to use default args +DROP FUNCTION IF EXISTS st_asgml(geography, int4); -- changed to use default args +DROP FUNCTION IF EXISTS st_asgml(int4, geography); -- changed to use default args +DROP FUNCTION IF EXISTS st_asgml(int4, geography, int4); -- changed to use default args +DROP FUNCTION IF EXISTS st_asgml(int4, geography, int4,int4); -- changed to use default args +DROP FUNCTION IF EXISTS ST_AsKML(geometry); -- changed to use default args +DROP FUNCTION IF EXISTS ST_AsKML(geography); -- changed to use default args +DROP FUNCTION IF EXISTS ST_AsKML(int4, geometry, int4); -- changed to use default args +DROP FUNCTION IF EXISTS ST_AsKML(int4, geography, int4); -- changed to use default args +DROP FUNCTION IF EXISTS st_asx3d(geometry); -- this one changed to use default parameters so full function deals with it +DROP FUNCTION IF EXISTS st_asx3d(geometry, int4); -- introduce variant with opts so get rid of other without ops +DROP FUNCTION IF EXISTS st_assvg(geometry); -- changed to use default args +DROP FUNCTION IF EXISTS st_assvg(geometry,int4); -- changed to use default args +DROP FUNCTION IF EXISTS st_assvg(geography); -- changed to use default args +DROP FUNCTION IF EXISTS st_assvg(geography,int4); -- changed to use default args +DROP FUNCTION IF EXISTS st_box2d_overleft(box2d, box2d); +DROP FUNCTION IF EXISTS st_box2d_overright(box2d, box2d); +DROP FUNCTION IF EXISTS st_box2d_left(box2d, box2d); +DROP FUNCTION IF EXISTS st_box2d_right(box2d, box2d); +DROP FUNCTION IF EXISTS st_box2d_contain(box2d, box2d); +DROP FUNCTION IF EXISTS st_box2d_contained(box2d, box2d); +DROP FUNCTION IF EXISTS st_box2d_overlap(box2d, box2d); +DROP FUNCTION IF EXISTS st_box2d_same(box2d, box2d); +DROP FUNCTION IF EXISTS st_box2d_intersects(box2d, box2d); +DROP FUNCTION IF EXISTS st_box2d_in(cstring); +DROP FUNCTION IF EXISTS st_box2d_out(box2d); +DROP FUNCTION IF EXISTS st_box2d(geometry); +DROP FUNCTION IF EXISTS st_box2d(box3d); +DROP FUNCTION IF EXISTS st_box3d(box2d); +DROP FUNCTION IF EXISTS st_box(box3d); +DROP FUNCTION IF EXISTS st_box3d(geometry); +DROP FUNCTION IF EXISTS st_box(geometry); +DROP FUNCTION IF EXISTS ST_ConcaveHull(geometry,float); -- this one changed to use default parameters +DROP FUNCTION IF EXISTS st_text(geometry); +DROP FUNCTION IF EXISTS st_geometry(box2d); +DROP FUNCTION IF EXISTS st_geometry(box3d); +DROP FUNCTION IF EXISTS st_geometry(text); +DROP FUNCTION IF EXISTS st_geometry(bytea); +DROP FUNCTION IF EXISTS st_bytea(geometry); +DROP FUNCTION IF EXISTS st_addbbox(geometry); +DROP FUNCTION IF EXISTS st_dropbbox(geometry); +DROP FUNCTION IF EXISTS st_hasbbox(geometry); +DROP FUNCTION IF EXISTS cache_bbox(); +DROP FUNCTION IF EXISTS st_cache_bbox(); +DROP FUNCTION IF EXISTS ST_GeoHash(geometry); -- changed to use default args +DROP FUNCTION IF EXISTS st_length(geography); -- this one changed to use default parameters +DROP FUNCTION IF EXISTS st_perimeter(geography); -- this one changed to use default parameters +DROP FUNCTION IF EXISTS transform_geometry(geometry,text,text,int); +DROP FUNCTION IF EXISTS collector(geometry, geometry); +DROP FUNCTION IF EXISTS st_collector(geometry, geometry); +DROP FUNCTION IF EXISTS geom_accum (geometry[],geometry); +DROP FUNCTION IF EXISTS st_geom_accum (geometry[],geometry); +DROP FUNCTION IF EXISTS collect_garray (geometry[]); +DROP FUNCTION IF EXISTS st_collect_garray (geometry[]); +DROP FUNCTION IF EXISTS geosnoop(geometry); +DROP FUNCTION IF EXISTS jtsnoop(geometry); +DROP FUNCTION IF EXISTS st_noop(geometry); +DROP FUNCTION IF EXISTS st_max_distance(geometry, geometry); +DROP FUNCTION IF EXISTS ST_MinimumBoundingCircle(geometry); --changed to use default parameters +-- Drop internals that should never have existed -- +DROP FUNCTION IF EXISTS st_geometry_analyze(internal); +DROP FUNCTION IF EXISTS st_geometry_in(cstring); +DROP FUNCTION IF EXISTS st_geometry_out(geometry); +DROP FUNCTION IF EXISTS st_geometry_recv(internal); +DROP FUNCTION IF EXISTS st_geometry_send(geometry); +DROP FUNCTION IF EXISTS st_spheroid_in(cstring); +DROP FUNCTION IF EXISTS st_spheroid_out(spheroid); +DROP FUNCTION IF EXISTS st_geometry_lt(geometry, geometry); +DROP FUNCTION IF EXISTS st_geometry_gt(geometry, geometry); +DROP FUNCTION IF EXISTS st_geometry_ge(geometry, geometry); +DROP FUNCTION IF EXISTS st_geometry_eq(geometry, geometry); +DROP FUNCTION IF EXISTS st_geometry_cmp(geometry, geometry); +DROP FUNCTION IF EXISTS SnapToGrid(geometry, float8, float8); + +DROP FUNCTION IF EXISTS ST_AsBinary(text); -- deprecated in 2.0 +DROP FUNCTION IF EXISTS postgis_uses_stats(); -- deprecated in 2.0 diff -Nru postgis-1.5.3/postgis/postgis_drop_before.sql postgis-2.0.1/postgis/postgis_drop_before.sql --- postgis-1.5.3/postgis/postgis_drop_before.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/postgis/postgis_drop_before.sql 2012-03-01 08:26:34.000000000 +0000 @@ -0,0 +1,28 @@ +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- +-- $Id$ +-- +-- PostGIS - Spatial Types for PostgreSQL +-- http://postgis.refractions.net +-- +-- Copyright (C) 2011-2012 Sandro Santilli +-- Copyright (C) 2010-2012 Regina Obe +-- Copyright (C) 2009 Paul Ramsey +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +-- +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- +-- This file contains drop commands for obsoleted items that need +-- to be dropped _before_ upgrade of old functions. +-- Changes to this file affect postgis_upgrade*.sql script. +-- +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +DROP FUNCTION IF EXISTS AddGeometryColumn(varchar,varchar,varchar,varchar,integer,varchar,integer,boolean); +DROP FUNCTION IF EXISTS ST_MakeEnvelope(float8, float8, float8, float8); +--changed name of prec arg to be consistent with ST_AsGML/KML +DROP FUNCTION IF EXISTS ST_AsX3D(geometry, integer, integer); +--changed name of arg: http://trac.osgeo.org/postgis/ticket/1606 +DROP FUNCTION IF EXISTS UpdateGeometrySRID(varchar,varchar,varchar,varchar,integer); diff -Nru postgis-1.5.3/postgis/postgis_module.c postgis-2.0.1/postgis/postgis_module.c --- postgis-1.5.3/postgis/postgis_module.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/postgis/postgis_module.c 2012-06-11 09:01:53.000000000 +0000 @@ -0,0 +1,84 @@ +/********************************************************************** + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * + * Copyright (C) 2011 OpenGeo.org + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + **********************************************************************/ + +#include "postgres.h" +#include "fmgr.h" +#include "utils/elog.h" +#include "utils/guc.h" + +#include "../postgis_config.h" +#include "lwgeom_log.h" +#include "lwgeom_pg.h" + +/* + * This is required for builds against pgsql + */ +PG_MODULE_MAGIC; + +/* + * Module load callback + */ +void _PG_init(void); +void +_PG_init(void) +{ +#if 0 + /* Define custom GUC variables. */ + DefineCustomIntVariable( + "postgis.debug.level", /* name */ + "Sets the debugging level of PostGIS.", /* short_desc */ + "This is an experimental configuration.", /* long_desc */ + &postgis_debug_level, /* valueAddr */ + 0, 8, /* min-max */ + 0, /* bootValue */ + PGC_SUSET, /* GucContext context */ + GUC_UNIT_MS, /* int flags */ +#if POSTGIS_PGSQL_VERSION >= 91 + NULL, /* GucStringCheckHook check_hook */ +#endif + NULL, /* GucStringAssignHook assign_hook */ + NULL /* GucShowHook show_hook */ + ); +#endif + +#if 0 + /* Define custom GUC variables. */ + DefineCustomStringVariable( + "postgis.greeting.string", /* name */ + "Sets the greeting string used on postgis module load.", /* short_desc */ + "This is an experimental configuration.", /* long_desc */ + &greeting, /* valueAddr */ + "Welcome to PostGIS " POSTGIS_VERSION, /* bootValue */ + PGC_SUSET, /* GucContext context */ + GUC_UNIT_MS, /* int flags */ +#if POSTGIS_PGSQL_VERSION >= 91 + NULL, /* GucStringCheckHook check_hook */ +#endif + NULL, /* GucStringAssignHook assign_hook */ + NULL /* GucShowHook show_hook */ + ); +#endif + +} + +/* + * Module unload callback + */ +void _PG_fini(void); +void +_PG_fini(void) +{ + elog(NOTICE, "Goodbye from PostGIS %s", POSTGIS_VERSION); +} + + + diff -Nru postgis-1.5.3/postgis/profile.h postgis-2.0.1/postgis/profile.h --- postgis-1.5.3/postgis/profile.h 2008-11-20 15:00:57.000000000 +0000 +++ postgis-2.0.1/postgis/profile.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,60 +0,0 @@ -#ifndef _PROFILE_H -#define _PROFILE_H 1 - -#include - -/* Only enable profiling code if POSTGIS_PROFILE in postgis_config.h is > 0 */ -#if POSTGIS_PROFILE > 0 - -#include - -#define PROF_P2G1 0 -#define PROF_P2G2 1 -#define PROF_G2P 2 -#define PROF_GRUN 3 -#define PROF_QRUN 4 - -struct timeval profstart[5], profstop[5]; -long proftime[5]; -long profipts1, profipts2, profopts; - -#define PROFSTART(x) do { gettimeofday(&(profstart[x]), NULL); } while (0); -#define PROFSTOP(x) do { gettimeofday(&(profstop[x]), NULL); \ - proftime[x] = ( profstop[x].tv_sec*1000000+profstop[x].tv_usec) - \ - ( profstart[x].tv_sec*1000000+profstart[x].tv_usec); \ - } while (0); -#define PROFREPORT(n, i1, i2, o) do { \ - profipts1 = profipts2 = profopts = 0; \ - if ((i1)) profipts1 += lwgeom_npoints(SERIALIZED_FORM((i1))); \ - else proftime[PROF_P2G1] = 0; \ - if ((i2)) profipts2 += lwgeom_npoints(SERIALIZED_FORM((i2))); \ - else proftime[PROF_P2G2] = 0; \ - if ((o)) profopts += lwgeom_npoints(SERIALIZED_FORM((o))); \ - else proftime[PROF_G2P] = 0; \ - long int conv = proftime[PROF_P2G1]+proftime[PROF_P2G2]+proftime[PROF_G2P]; \ - long int run = proftime[PROF_GRUN]; \ - long int qrun = proftime[PROF_QRUN]; \ - long int tot = qrun; \ - int convpercent = round(((double)conv/(double)tot)*100); \ - int runpercent = round(((double)run/(double)tot)*100); \ - elog(NOTICE, \ - "PRF(%s) ipt1 %lu ipt2 %lu opt %lu p2g1 %lu p2g2 %lu g2p %lu grun %lu qrun %lu perc %d%%", \ - (n), \ - profipts1, profipts2, profopts, \ - proftime[PROF_P2G1], proftime[PROF_P2G2], \ - proftime[PROF_G2P], \ - proftime[PROF_GRUN], \ - proftime[PROF_QRUN], \ - runpercent+convpercent); \ - } while (0); - -#else - -/* Empty prototype that can be optimised away by the compiler for non-profiling builds */ -#define PROFSTART(x) ((void) 0) -#define PROFSTOP(x) ((void) 0) -#define PROFREPORT(n, i1, i2, o) ((void) 0) - -#endif /* POSTGIS_PROFILE */ - -#endif /* _PROFILE_H */ diff -Nru postgis-1.5.3/postgis/sqldefines.h postgis-2.0.1/postgis/sqldefines.h --- postgis-1.5.3/postgis/sqldefines.h 2011-06-25 16:29:50.000000000 +0000 +++ postgis-2.0.1/postgis/sqldefines.h 2012-06-22 21:04:32.000000000 +0000 @@ -1,13 +1,15 @@ #ifndef _LWPGIS_DEFINES #define _LWPGIS_DEFINES +#include "../postgis_svn_revision.h" + /* * Define just the version numbers; otherwise we get some strange substitutions in postgis.sql.in */ -#define POSTGIS_PGSQL_VERSION 912 -#define POSTGIS_GEOS_VERSION 32 -#define POSTGIS_PROJ_VERSION 47 -#define POSTGIS_LIB_VERSION 1.5.3 +#define POSTGIS_PGSQL_VERSION 91 +#define POSTGIS_GEOS_VERSION 33 +#define POSTGIS_PROJ_VERSION 48 +#define POSTGIS_LIB_VERSION 2.0.1 #define POSTGIS_LIBXML2_VERSION 2.7.8 /* @@ -15,8 +17,17 @@ * (these substitiutions are done with extra quotes sinces CPP * won't substitute within apostrophes) */ -#define _POSTGIS_SQL_SELECT_POSTGIS_VERSION 'SELECT ''1.5 USE_GEOS=1 USE_PROJ=1 USE_STATS=1''::text AS version' -#define _POSTGIS_SQL_SELECT_POSTGIS_BUILD_DATE 'SELECT ''2011-06-25 16:29:49''::text AS version' -#define _POSTGIS_SQL_SELECT_POSTGIS_SCRIPTS_VERSION 'SELECT ''1.5 r7360''::text AS version' +#define _POSTGIS_SQL_SELECT_POSTGIS_VERSION 'SELECT ''2.0 USE_GEOS=1 USE_PROJ=1 USE_STATS=1''::text AS version' +#define _POSTGIS_SQL_SELECT_POSTGIS_BUILD_DATE 'SELECT ''2012-06-22 21:04:28''::text AS version' + +#if POSTGIS_SVN_REVISION +#define _POSTGIS_SQL_SELECT_POSTGIS_SCRIPTS_VERSION $$ SELECT '2.0.1'::text || ' r' || POSTGIS_SVN_REVISION::text AS version $$ +#else +#define _POSTGIS_SQL_SELECT_POSTGIS_SCRIPTS_VERSION $$ SELECT '2.0.1'::text AS version $$ +#endif + +#define SRID_USR_MAX 998999 #endif /* _LWPGIS_DEFINES */ + + diff -Nru postgis-1.5.3/postgis/sqldefines.h.in postgis-2.0.1/postgis/sqldefines.h.in --- postgis-1.5.3/postgis/sqldefines.h.in 2009-12-18 19:08:20.000000000 +0000 +++ postgis-2.0.1/postgis/sqldefines.h.in 2012-04-12 14:09:10.000000000 +0000 @@ -1,6 +1,8 @@ #ifndef _LWPGIS_DEFINES #define _LWPGIS_DEFINES +#include "../postgis_svn_revision.h" + /* * Define just the version numbers; otherwise we get some strange substitutions in postgis.sql.in */ @@ -17,6 +19,15 @@ */ #define _POSTGIS_SQL_SELECT_POSTGIS_VERSION 'SELECT ''@POSTGIS_VERSION@''::text AS version' #define _POSTGIS_SQL_SELECT_POSTGIS_BUILD_DATE 'SELECT ''@POSTGIS_BUILD_DATE@''::text AS version' -#define _POSTGIS_SQL_SELECT_POSTGIS_SCRIPTS_VERSION 'SELECT ''@POSTGIS_SCRIPTS_VERSION@''::text AS version' + +#if POSTGIS_SVN_REVISION +#define _POSTGIS_SQL_SELECT_POSTGIS_SCRIPTS_VERSION $$ SELECT '@POSTGIS_SCRIPTS_VERSION@'::text || ' r' || POSTGIS_SVN_REVISION::text AS version $$ +#else +#define _POSTGIS_SQL_SELECT_POSTGIS_SCRIPTS_VERSION $$ SELECT '@POSTGIS_SCRIPTS_VERSION@'::text AS version $$ +#endif + +#define SRID_USR_MAX @SRID_USR_MAX@ #endif /* _LWPGIS_DEFINES */ + + diff -Nru postgis-1.5.3/postgis/sqlmm.sql.in.c postgis-2.0.1/postgis/sqlmm.sql.in.c --- postgis-1.5.3/postgis/sqlmm.sql.in.c 2009-11-25 19:15:57.000000000 +0000 +++ postgis-2.0.1/postgis/sqlmm.sql.in.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,321 +0,0 @@ --- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --- --- $Id: sqlmm.sql.in.c 4894 2009-11-25 19:15:57Z pramsey $ --- --- PostGIS - Spatial Types for PostgreSQL --- http://postgis.refractions.net --- Copyright 2001-2003 Refractions Research Inc. --- --- This is free software; you can redistribute and/or modify it under --- the terms of the GNU General Public Licence. See the COPYING file. --- --- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --- This file defines a subset of SQL/MM functions (that is, only those --- currently defined by ESRI's ArcSDE). Since these functions already exist --- in PostGIS (for the most part), these functions simply expose the current --- functions. Although mostly complying with SQL/MM standards, these prototypes --- follow ESRI's ArcSDE SQL Specifications and not SQL/MM standards where --- disparities exist. --- --- Specification Disparity Notes: --- * ST_OrderingEquals(geometry, geometry) is implemented as per --- ESRI's ArcSDE SQL specifications, not SQL/MM specifications. --- (http://edndoc.esri.com/arcsde/9.1/sql_api/sqlapi3.htm#ST_OrderingEquals) --- * Geometry constructors default to an SRID of -1, not 0 as per SQL/MM specs. --- * Boolean return type methods (ie. ST_IsValid, ST_IsEmpty, ...) --- * SQL/MM : RETURNS 1 if TRUE, 0 if (FALSE, NULL) --- * ESRI in Informix : RETURNS 1 if (TRUE, NULL), 0 if FALSE --- * ESRI in DB2 : RETURNS 1 if TRUE, 0 if FALSE, NULL if NULL --- * PostGIS : RETURNS 1 if TRUE, 0 if FALSE, NULL if NULL --- --- TODO: Implement ESRI's Shape constructors --- * SE_AsShape(geometry) --- * SE_ShapeToSQL --- * SE_GeomFromShape --- * SE_PointFromShape --- * SE_LineFromShape --- * SE_PolyFromShape --- * SE_MPointFromShape --- * SE_MLineFromShape --- * SE_MPolyFromShape --- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -#include "sqldefines.h" - -------------------------------------------------------------------------------- --- SQL/MM (ArcSDE subset) - SQL Functions for constructing an ST_Geometry --- value given its WTK representation --- (http://edndoc.esri.com/arcsde/9.1/general_topics/storing_geo_in_rdbms.html) -------------------------------------------------------------------------------- - --- PostGIS equivalent function: ST_GeometryFromText(text) --- Note: Defaults to an SRID=-1, not 0 as per SQL/MM specs. -CREATE OR REPLACE FUNCTION ST_WKTToSQL(text) - RETURNS geometry - AS 'MODULE_PATHNAME','LWGEOM_from_text' - LANGUAGE 'C' IMMUTABLE STRICT; - --- ST_GeomFromText(text, int4) - already defined --- ST_PointFromText(text, int4) - already defined --- ST_LineFromText(text, int4) - already defined --- ST_PolyFromText(text, int4) - already defined --- ST_MPointFromText(text, int4) - already defined --- ST_MLineFromText(text, int4) - already defined --- ST_MPolyFromText(text, int4) - already defined - -------------------------------------------------------------------------------- --- SQL/MM (ArcSDE subset) - SQL Functions for constructing an ST_Geometry --- value given its WKB representation -------------------------------------------------------------------------------- - --- PostGIS equivalent function: GeomFromWKB(bytea)) --- Note: Defaults to an SRID=-1, not 0 as per SQL/MM specs. - -CREATE OR REPLACE FUNCTION ST_WKBToSQL(bytea) - RETURNS geometry - AS 'MODULE_PATHNAME','LWGEOM_from_WKB' - LANGUAGE 'C' IMMUTABLE STRICT; - --- ST_GeomFromWKB(bytea, int) - already defined --- ST_PointFromWKB(bytea, int) - already defined --- ST_LineFromWKB(bytea, int) - already defined --- ST_PolyFromWKB(bytea, int) - already defined --- ST_MPointFromWKB(bytea, int) - already defined --- ST_MLineFromWKB(bytea, int) - already defined --- ST_MPolyFromWKB(bytea, int) - already defined - -------------------------------------------------------------------------------- --- SQL/MM (ArcSDE subset) - SQL Functions for constructing an ST_Geometry --- value given an ESRI Shape representation -------------------------------------------------------------------------------- - --- TODO: SE_ShapeToSQL --- TODO: SE_GeomFromShape --- TODO: SE_PointFromShape --- TODO: SE_LineFromShape --- TODO: SE_PolyFromShape --- TODO: SE_MPointFromShape --- TODO: SE_MLineFromShape --- TODO: SE_MPolyFromShape - -------------------------------------------------------------------------------- --- SQL/MM (ArcSDE subset) - SQL Functions for obtaining the WKT representation --- of an ST_Geometry -------------------------------------------------------------------------------- - --- ST_AsText(geometry) - already defined - -------------------------------------------------------------------------------- --- SQL/MM (ArcSDE subset) - SQL Functions for obtaining the WKB representation --- of an ST_Geometry -------------------------------------------------------------------------------- - --- ST_AsBinary(geometry) - already defined - -------------------------------------------------------------------------------- --- SQL/MM (ArcSDE subset) - SQL Functions for obtaining the ESRI Shape --- representation of an ST_Geometry -------------------------------------------------------------------------------- - --- TODO: SE_AsShape(geometry) ---CREATE OR REPLACE FUNCTION SE_AsShape(geometry) --- RETURNS bytea --- AS 'MODULE_PATHNAME','LWGEOM_AsShape' --- LANGUAGE 'C' IMMUTABLE STRICT; - -------------------------------------------------------------------------------- --- SQL/MM (ArcSDE subset) - SQL Functions on type ST_Geometry -------------------------------------------------------------------------------- - --- PostGIS equivalent function: ndims(geometry) -CREATE OR REPLACE FUNCTION ST_CoordDim(geometry) - RETURNS smallint - AS 'MODULE_PATHNAME', 'LWGEOM_ndims' - LANGUAGE 'C' IMMUTABLE STRICT; - --- ST_Dimension(geometry) - already defined. --- ST_GeometryType(geometry) - already defined. --- ST_SRID(geometry) - already defined. --- ST_IsEmpty(geometry) - already defined. --- ST_IsSimple(geometry) - already defined. --- ST_IsValid(geometry) - already defined. --- ST_Boundary(geometry) - already defined. --- ST_Envelope(geometry) - already defined. --- ST_Transform(geometry) - already defined. --- ST_AsText(geometry) - already defined. --- ST_AsBinary(geometry) - already defined. --- SE_AsShape(geometry) - already defined. --- ST_X(geometry) - already defined. --- ST_Y(geometry) - already defined. - --- Availability: 1.5.0 -CREATE OR REPLACE FUNCTION _ST_OrderingEquals(geometry, geometry) - RETURNS boolean - AS 'MODULE_PATHNAME', 'LWGEOM_same' - LANGUAGE 'C' IMMUTABLE STRICT - COST 100; - --- Availability: 1.3.0 -CREATE OR REPLACE FUNCTION ST_OrderingEquals(geometry, geometry) - RETURNS boolean - AS $$ - SELECT $1 ~= $2 AND _ST_OrderingEquals($1, $2) - $$ - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- Availability: 1.5.0 -CREATE OR REPLACE FUNCTION SE_Is3D(geometry) - RETURNS bool - AS 'MODULE_PATHNAME', 'LWGEOM_hasz' - LANGUAGE 'C' IMMUTABLE STRICT; - --- Availability: 1.5.0 -CREATE OR REPLACE FUNCTION SE_IsMeasured(geometry) - RETURNS bool - AS 'MODULE_PATHNAME', 'LWGEOM_hasm' - LANGUAGE 'C' IMMUTABLE STRICT; - -------------------------------------------------------------------------------- --- SQL/MM (ArcSDE subset) - SQL Functions on type ST_Point -------------------------------------------------------------------------------- - --- PostGIS equivalent function: makePoint(float8,float8) -CREATE OR REPLACE FUNCTION ST_Point(float8, float8) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_makepoint' - LANGUAGE 'C' IMMUTABLE STRICT; - --- PostGIS equivalent function: Z(geometry) -CREATE OR REPLACE FUNCTION SE_Z(geometry) - RETURNS float8 - AS 'MODULE_PATHNAME','LWGEOM_z_point' - LANGUAGE 'C' IMMUTABLE STRICT; - --- PostGIS equivalent function: M(geometry) -CREATE OR REPLACE FUNCTION SE_M(geometry) - RETURNS float8 - AS 'MODULE_PATHNAME','LWGEOM_m_point' - LANGUAGE 'C' IMMUTABLE STRICT; - -------------------------------------------------------------------------------- --- SQL/MM (ArcSDE subset) - SQL Functions on type ST_Curve -------------------------------------------------------------------------------- - --- ST_StartPoint(geometry) - already defined. --- ST_EndPoint(geometry) - already defined. --- ST_IsClosed(geometry) - already defined. --- ST_IsRing(geometry) - already defined. --- ST_Length(geometry) - already defined. - -------------------------------------------------------------------------------- --- SQL/MM (ArcSDE subset) - SQL Functions on type ST_LineString -------------------------------------------------------------------------------- - --- ST_NumPoints(geometry) - already defined. --- ST_PointN(geometry) - already defined. - -------------------------------------------------------------------------------- --- SQL/MM (ArcSDE subset) - SQL Functions on type ST_Surface -------------------------------------------------------------------------------- - --- ST_Centroid(geometry) - already defined. --- ST_PointOnSurface(geometry) - already defined. --- ST_Area(geometry) - already defined. --- ST_Perimeter(geometry) - already defined. - -------------------------------------------------------------------------------- --- SQL/MM (ArcSDE subset) - SQL Functions on type ST_Polygon -------------------------------------------------------------------------------- - --- PostGIS equivalent function: MakePolygon(geometry) -CREATE OR REPLACE FUNCTION ST_Polygon(geometry, int) - RETURNS geometry - AS $$ - SELECT setSRID(makepolygon($1), $2) - $$ - LANGUAGE 'SQL' IMMUTABLE STRICT; - --- ST_ExteriorRing(geometry) - already defined. --- ST_NumInteriorRing(geometry) - already defined. --- ST_InteriorRingN(geometry, integer) - already defined. - -------------------------------------------------------------------------------- --- SQL/MM (ArcSDE subset) - SQL Functions on type ST_GeomCollection -------------------------------------------------------------------------------- - --- ST_NumGeometries(geometry) - already defined. --- ST_GeometryN(geometry, integer) - already defined. - -------------------------------------------------------------------------------- --- SQL/MM (ArcSDE subset) - SQL Functions on type ST_MultiCurve -------------------------------------------------------------------------------- - --- ST_IsClosed(geometry) - already defined. --- ST_Length(geometry) - already defined. - -------------------------------------------------------------------------------- --- SQL/MM (ArcSDE subset) - SQL Functions on type ST_MultiSurface -------------------------------------------------------------------------------- - --- ST_Centroid(geometry) - already defined. --- ST_PointOnSurface(geometry) - already defined. --- ST_Area(geometry) - already defined. --- ST_Perimeter(geometry) - already defined. - -------------------------------------------------------------------------------- --- SQL/MM (ArcSDE subset) - SQL Functions that test spatial relationships -------------------------------------------------------------------------------- - --- ST_Equals(geometry, geometry) - already defined. --- ST_Disjoint(geometry, geometry) - already defined. --- ST_Touches(geometry, geometry) - already defined. --- ST_Within(geometry, geometry) - already defined. --- ST_Overlaps(geometry, geometry) - already defined. --- ST_Crosses(geometry, geometry) - already defined. --- ST_Intersects(geometry, geometry) - already defined. --- ST_Contains(geometry, geometry) - already defined. --- ST_Relate(geometry, geometry, text) - already defined. - --- PostGIS equivalent function: none -CREATE OR REPLACE FUNCTION SE_EnvelopesIntersect(geometry,geometry) - RETURNS boolean - AS $$ - SELECT $1 && $2 - $$ - LANGUAGE 'SQL' IMMUTABLE STRICT; - -------------------------------------------------------------------------------- --- SQL/MM (ArcSDE subset) - SQL Functions for distance relationships -------------------------------------------------------------------------------- - --- ST_Distance(geometry, geometry) - already defined. - -------------------------------------------------------------------------------- --- SQL/MM (ArcSDE subset) - SQL Functions that implement spatial operators -------------------------------------------------------------------------------- - --- ST_Intersection(geometry, geometry) - already defined. --- ST_Difference(geometry, geometry) - already defined. --- ST_Union(geometry, geometry) - already defined. --- ST_SymDifference(geometry, geometry) - already defined. --- ST_Buffer(geometry, float8) - already defined. --- ST_ConvexHull(geometry) already defined. - --- PostGIS equivalent function: locate_along_measure(geometry, float8) -CREATE OR REPLACE FUNCTION SE_LocateAlong(geometry, float8) - RETURNS geometry - AS $$ SELECT locate_between_measures($1, $2, $2) $$ - LANGUAGE 'sql' IMMUTABLE STRICT; - --- PostGIS equivalent function: locate_between_measures(geometry, float8, float8) -CREATE OR REPLACE FUNCTION SE_LocateBetween(geometry, float8, float8) - RETURNS geometry - AS 'MODULE_PATHNAME', 'LWGEOM_locate_between_m' - LANGUAGE 'C' IMMUTABLE STRICT; - - - -------------------------------------------------------------------------------- --- END -------------------------------------------------------------------------------- - diff -Nru postgis-1.5.3/postgis/uninstall_geography.sql.in.c postgis-2.0.1/postgis/uninstall_geography.sql.in.c --- postgis-1.5.3/postgis/uninstall_geography.sql.in.c 2009-11-30 19:56:27.000000000 +0000 +++ postgis-2.0.1/postgis/uninstall_geography.sql.in.c 2012-02-27 22:08:12.000000000 +0000 @@ -1,6 +1,6 @@ -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- --- $Id: uninstall_geography.sql.in.c 4942 2009-11-30 19:56:27Z pramsey $ +-- $Id: uninstall_geography.sql.in.c 9324 2012-02-27 22:08:12Z pramsey $ -- -- PostGIS - Spatial Types for PostgreSQL -- http://postgis.org/ @@ -15,8 +15,8 @@ DROP VIEW geography_columns; -- indexes -DROP OPERATOR CLASS gist_geography_ops USING gist CASCADE; -DROP OPERATOR CLASS btree_geography_ops USING btree CASCADE; +DROP OPERATOR FAMILY gist_geography_ops USING gist CASCADE; +DROP OPERATOR FAMILY btree_geography_ops USING btree CASCADE; -- r-tree operator DROP OPERATOR && (geography,geography); diff -Nru postgis-1.5.3/postgis/uninstall_long_xact.sql.in.c postgis-2.0.1/postgis/uninstall_long_xact.sql.in.c --- postgis-1.5.3/postgis/uninstall_long_xact.sql.in.c 2009-09-14 10:54:33.000000000 +0000 +++ postgis-2.0.1/postgis/uninstall_long_xact.sql.in.c 2012-02-27 22:08:12.000000000 +0000 @@ -1,6 +1,6 @@ -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- --- $Id: uninstall_long_xact.sql.in.c 4494 2009-09-14 10:54:33Z mcayland $ +-- $Id: uninstall_long_xact.sql.in.c 9324 2012-02-27 22:08:12Z pramsey $ -- -- PostGIS - Spatial Types for PostgreSQL -- http://postgis.refractions.net diff -Nru postgis-1.5.3/postgis/uninstall_postgis.sql.in.c postgis-2.0.1/postgis/uninstall_postgis.sql.in.c --- postgis-1.5.3/postgis/uninstall_postgis.sql.in.c 2010-01-26 17:09:30.000000000 +0000 +++ postgis-2.0.1/postgis/uninstall_postgis.sql.in.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,941 +0,0 @@ --- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --- --- $Id: uninstall_postgis.sql.in.c 5166 2010-01-26 17:09:30Z pramsey $ --- --- PostGIS - Spatial Types for PostgreSQL --- http://postgis.refractions.net --- Copyright 2001-2003 Refractions Research Inc. --- Copyright 2009 Open Source Geospatial Foundation --- --- This is free software; you can redistribute and/or modify it under --- the terms of the GNU General Public Licence. See the COPYING file. --- --- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --- --- NOTE: This file lists items in reverse section order so that --- dependency issues are not encountered during removal. --- --- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -#include "sqldefines.h" - -BEGIN; - ---------------------------------------------------------------- --- USER CONTRIUBUTED ---------------------------------------------------------------- - -DROP FUNCTION ST_MinimumBoundingCircle(geometry); -DROP FUNCTION ST_MinimumBoundingCircle(inputgeom geometry, segs_per_quarter integer); -DROP FUNCTION ST_ShortestLine(geometry, geometry); -DROP FUNCTION ST_LongestLine(geometry, geometry); -DROP FUNCTION ST_DFullyWithin(geometry, geometry, float8); -DROP FUNCTION _ST_DumpPoints(geometry, integer[]); - ---------------------------------------------------------------- --- SQL-MM ---------------------------------------------------------------- - -DROP FUNCTION ST_LineToCurve(geometry); -DROP FUNCTION ST_HasArc(geometry); -DROP FUNCTION ST_CurveToLine(geometry); -DROP FUNCTION ST_CurveToLine(geometry, integer); - ------------------------------------------------------------------------- --- OGC defined ------------------------------------------------------------------------- - -#include "uninstall_sqlmm.sql.in.c" -#include "uninstall_long_xact.sql.in.c" -#include "uninstall_geography.sql.in.c" - -DROP FUNCTION ST_BdMPolyFromText(text, integer); -DROP FUNCTION BdMPolyFromText(text, integer); -DROP FUNCTION ST_BdPolyFromText(text, integer); -DROP FUNCTION BdPolyFromText(text, integer); -DROP FUNCTION ST_GeomCollFromWKB(bytea); -DROP FUNCTION GeomCollFromWKB(bytea); -DROP FUNCTION ST_GeomCollFromWKB(bytea, int); -DROP FUNCTION GeomCollFromWKB(bytea, int); -DROP FUNCTION ST_MultiPolyFromWKB(bytea); -DROP FUNCTION MultiPolyFromWKB(bytea); -DROP FUNCTION ST_MultiPolyFromWKB(bytea, int); -DROP FUNCTION MultiPolyFromWKB(bytea, int); -DROP FUNCTION ST_MPolyFromWKB(bytea); -DROP FUNCTION MPolyFromWKB(bytea); -DROP FUNCTION ST_MPolyFromWKB(bytea, int); -DROP FUNCTION MPolyFromWKB(bytea, int); -DROP FUNCTION ST_MLineFromWKB(bytea); -DROP FUNCTION MLineFromWKB(bytea); -DROP FUNCTION ST_MLineFromWKB(bytea, int); -DROP FUNCTION MLineFromWKB(bytea, int); -DROP FUNCTION ST_MultiLineFromWKB(bytea); -DROP FUNCTION MultiLineFromWKB(bytea); -DROP FUNCTION MultiLineFromWKB(bytea, int); -DROP FUNCTION ST_MultiPointFromWKB(bytea); -DROP FUNCTION MultiPointFromWKB(bytea); -DROP FUNCTION ST_MultiPointFromWKB(bytea, int); -DROP FUNCTION MultiPointFromWKB(bytea, int); -DROP FUNCTION ST_MPointFromWKB(bytea); -DROP FUNCTION MPointFromWKB(bytea); -DROP FUNCTION ST_MPointFromWKB(bytea, int); -DROP FUNCTION MPointFromWKB(bytea, int); -DROP FUNCTION ST_PolygonFromWKB(bytea); -DROP FUNCTION PolygonFromWKB(bytea); -DROP FUNCTION ST_PolygonFromWKB(bytea, int); -DROP FUNCTION PolygonFromWKB(bytea, int); -DROP FUNCTION ST_PolyFromWKB(bytea); -DROP FUNCTION PolyFromWKB(bytea); -DROP FUNCTION ST_PolyFromWKB(bytea, int); -DROP FUNCTION PolyFromWKB(bytea, int); -DROP FUNCTION ST_LinestringFromWKB(bytea); -DROP FUNCTION LinestringFromWKB(bytea); -DROP FUNCTION ST_LinestringFromWKB(bytea, int); -DROP FUNCTION LinestringFromWKB(bytea, int); -DROP FUNCTION ST_LineFromWKB(bytea); -DROP FUNCTION LineFromWKB(bytea); -DROP FUNCTION ST_LineFromWKB(bytea, int); -DROP FUNCTION LineFromWKB(bytea, int); -DROP FUNCTION ST_PointFromWKB(bytea); -DROP FUNCTION PointFromWKB(bytea); -DROP FUNCTION ST_PointFromWKB(bytea, int); -DROP FUNCTION PointFromWKB(bytea, int); -DROP FUNCTION ST_GeomFromWKB(bytea, int); -DROP FUNCTION GeomFromWKB(bytea, int); -DROP FUNCTION ST_GeomFromWKB(bytea); -DROP FUNCTION GeomFromWKB(bytea); -DROP FUNCTION ST_GeomCollFromText(text); -DROP FUNCTION GeomCollFromText(text); -DROP FUNCTION ST_GeomCollFromText(text, int4); -DROP FUNCTION GeomCollFromText(text, int4); -DROP FUNCTION ST_MultiPolygonFromText(text); -DROP FUNCTION MultiPolygonFromText(text); -DROP FUNCTION ST_MultiPolygonFromText(text, int4); -DROP FUNCTION MultiPolygonFromText(text, int4); -DROP FUNCTION ST_MPolyFromText(text); -DROP FUNCTION MPolyFromText(text); -DROP FUNCTION ST_MPolyFromText(text, int4); -DROP FUNCTION MPolyFromText(text, int4); -DROP FUNCTION ST_MultiPointFromText(text); -DROP FUNCTION MultiPointFromText(text); -DROP FUNCTION MultiPointFromText(text, int4); -DROP FUNCTION ST_MPointFromText(text); -DROP FUNCTION MPointFromText(text); -DROP FUNCTION ST_MPointFromText(text, int4); -DROP FUNCTION MPointFromText(text, int4); -DROP FUNCTION ST_MultiLineStringFromText(text, int4); -DROP FUNCTION MultiLineStringFromText(text, int4); -DROP FUNCTION ST_MultiLineStringFromText(text); -DROP FUNCTION MultiLineStringFromText(text); -DROP FUNCTION ST_MLineFromText(text); -DROP FUNCTION MLineFromText(text); -DROP FUNCTION ST_MLineFromText(text, int4); -DROP FUNCTION MLineFromText(text, int4); -DROP FUNCTION ST_PolygonFromText(text); -DROP FUNCTION PolygonFromText(text); -DROP FUNCTION ST_PolygonFromText(text, int4); -DROP FUNCTION PolygonFromText(text, int4); -DROP FUNCTION ST_PolyFromText(text, int4); -DROP FUNCTION PolyFromText(text, int4); -DROP FUNCTION ST_PolyFromText(text); -DROP FUNCTION PolyFromText(text); -DROP FUNCTION LineStringFromText(text, int4); -DROP FUNCTION LineStringFromText(text); -DROP FUNCTION ST_LineFromText(text, int4); -DROP FUNCTION LineFromText(text, int4); -DROP FUNCTION ST_LineFromText(text); -DROP FUNCTION LineFromText(text); -DROP FUNCTION ST_PointFromText(text, int4); -DROP FUNCTION PointFromText(text, int4); -DROP FUNCTION ST_PointFromText(text); -DROP FUNCTION PointFromText(text); -DROP FUNCTION ST_GeomFromText(text, int4); -DROP FUNCTION GeomFromText(text, int4); -DROP FUNCTION ST_GeomFromText(text); -DROP FUNCTION GeomFromText(text); -DROP FUNCTION ST_GeometryFromText(text, int4); -DROP FUNCTION GeometryFromText(text, int4); -DROP FUNCTION ST_GeometryFromText(text); -DROP FUNCTION GeometryFromText(text); -DROP FUNCTION ST_AsText(geometry); -DROP FUNCTION AsText(geometry); -DROP FUNCTION ST_AsBinary(geometry,text); -DROP FUNCTION AsBinary(geometry,text); -DROP FUNCTION ST_AsBinary(geometry); -DROP FUNCTION AsBinary(geometry); -DROP FUNCTION ST_SetSRID(geometry,int4); -DROP FUNCTION SetSRID(geometry,int4); -DROP FUNCTION ST_SRID(geometry); -DROP FUNCTION SRID(geometry); -DROP FUNCTION ST_IsEmpty(geometry); -DROP FUNCTION IsEmpty(geometry); -DROP FUNCTION ST_IsClosed(geometry); -DROP FUNCTION IsClosed(geometry); -DROP FUNCTION ST_EndPoint(geometry); -DROP FUNCTION EndPoint(geometry); -DROP FUNCTION ST_StartPoint(geometry); -DROP FUNCTION StartPoint(geometry); -DROP FUNCTION ST_M(geometry); -DROP FUNCTION M(geometry); -DROP FUNCTION ST_Z(geometry); -DROP FUNCTION Z(geometry); -DROP FUNCTION ST_Y(geometry); -DROP FUNCTION Y(geometry); -DROP FUNCTION ST_X(geometry); -DROP FUNCTION X(geometry); -DROP FUNCTION ST_PointN(geometry,integer); -DROP FUNCTION PointN(geometry,integer); -DROP FUNCTION ST_GeometryType(geometry); -DROP FUNCTION GeometryType(geometry); -DROP FUNCTION ST_InteriorRingN(geometry,integer); -DROP FUNCTION InteriorRingN(geometry,integer); -DROP FUNCTION ST_NumInteriorRing(geometry); -DROP FUNCTION NumInteriorRing(geometry); -DROP FUNCTION ST_NumInteriorRings(geometry); -DROP FUNCTION NumInteriorRings(geometry); -DROP FUNCTION ST_ExteriorRing(geometry); -DROP FUNCTION ExteriorRing(geometry); -DROP FUNCTION ST_Dimension(geometry); -DROP FUNCTION Dimension(geometry); -DROP FUNCTION ST_GeometryN(geometry,integer); -DROP FUNCTION GeometryN(geometry,integer); -DROP FUNCTION ST_NumGeometries(geometry); -DROP FUNCTION NumGeometries(geometry); -DROP FUNCTION ST_NumPoints(geometry); -DROP FUNCTION NumPoints(geometry); - ------------------------------------------------------------------------- --- GeoHash (geohash.org) ------------------------------------------------------------------------- - -DROP FUNCTION ST_GeoHash(geometry); -DROP FUNCTION ST_GeoHash(geometry, int4); - ------------------------------------------------------------------------ --- GEOJSON OUTPUT ------------------------------------------------------------------------ - -DROP FUNCTION ST_AsGeoJson(int4, geometry, int4, int4); -DROP FUNCTION ST_AsGeoJson(geometry, int4, int4); -DROP FUNCTION ST_AsGeoJson(int4, geometry, int4); -DROP FUNCTION ST_AsGeoJson(int4, geometry); -DROP FUNCTION ST_AsGeoJson(geometry); -DROP FUNCTION ST_AsGeoJson(geometry, int4); -DROP FUNCTION _ST_AsGeoJson(int4, geometry, int4, int4); - ------------------------------------------------------------------------ --- KML OUTPUT ------------------------------------------------------------------------ - -DROP FUNCTION ST_AsKML(int4, geometry, int4); -DROP FUNCTION ST_AsKML(int4, geometry); -DROP FUNCTION ST_AsKML(geometry); -DROP FUNCTION AsKML(int4, geometry, int4); -DROP FUNCTION AsKML(geometry); -DROP FUNCTION ST_AsKML(geometry, int4); -DROP FUNCTION AsKML(geometry, int4); -DROP FUNCTION _ST_AsKML(int4, geometry, int4); - ------------------------------------------------------------------------ --- GML OUTPUT ------------------------------------------------------------------------ - -DROP FUNCTION ST_AsGML(int4, geometry, int4, int4); -DROP FUNCTION ST_AsGML(geometry, int4, int4); -DROP FUNCTION ST_AsGML(int4, geometry, int4); -DROP FUNCTION ST_AsGML(int4, geometry); -DROP FUNCTION ST_AsGML(geometry); -DROP FUNCTION AsGML(geometry); -DROP FUNCTION ST_AsGML(geometry, int4); -DROP FUNCTION AsGML(geometry, int4); -DROP FUNCTION _ST_AsGML(int4, geometry, int4, int4); -DROP FUNCTION ST_GeomFromGML(text); -DROP FUNCTION ST_GMLToSQL(text); -DROP FUNCTION ST_GeomFromKML(text); - ------------------------------------------------------------------------ --- SVG OUTPUT ------------------------------------------------------------------------ - -DROP FUNCTION ST_AsSVG(geometry); -DROP FUNCTION AsSVG(geometry); -DROP FUNCTION ST_AsSVG(geometry,int4); -DROP FUNCTION AsSVG(geometry,int4); -DROP FUNCTION ST_AsSVG(geometry,int4,int4); -DROP FUNCTION AsSVG(geometry,int4,int4); - --------------------------------------------------------------------------------- - -DROP FUNCTION ST_Equals(geometry,geometry); -DROP FUNCTION Equals(geometry,geometry); -DROP FUNCTION ST_IsSimple(geometry); -DROP FUNCTION IsSimple(geometry); -DROP FUNCTION ST_PointOnSurface(geometry); -DROP FUNCTION PointOnSurface(geometry); -DROP FUNCTION ST_IsRing(geometry); -DROP FUNCTION IsRing(geometry); -DROP FUNCTION ST_Centroid(geometry); -DROP FUNCTION Centroid(geometry); -DROP FUNCTION ST_IsValid(geometry); -DROP FUNCTION IsValid(geometry); -DROP FUNCTION ST_Overlaps(geometry,geometry); -DROP FUNCTION _ST_Overlaps(geometry,geometry); -DROP FUNCTION overlaps(geometry,geometry); -DROP FUNCTION ST_ContainsProperly(geometry,geometry); -DROP FUNCTION _ST_ContainsProperly(geometry,geometry); -DROP FUNCTION ST_Covers(geometry,geometry); -DROP FUNCTION _ST_Covers(geometry,geometry); -DROP FUNCTION ST_CoveredBy(geometry,geometry); -DROP FUNCTION _ST_CoveredBy(geometry,geometry); - -DROP FUNCTION ST_Contains(geometry,geometry); -DROP FUNCTION _ST_Contains(geometry,geometry); -DROP FUNCTION Contains(geometry,geometry); -DROP FUNCTION ST_Within(geometry,geometry); -DROP FUNCTION _ST_Within(geometry,geometry); -DROP FUNCTION within(geometry,geometry); -DROP FUNCTION ST_Crosses(geometry,geometry); -DROP FUNCTION _ST_Crosses(geometry,geometry); -DROP FUNCTION crosses(geometry,geometry); -DROP FUNCTION ST_Intersects(geometry,geometry); -DROP FUNCTION _ST_Intersects(geometry,geometry); -DROP FUNCTION intersects(geometry,geometry); -DROP FUNCTION ST_DWithin(geometry, geometry, float8); -DROP FUNCTION _ST_DWithin(geometry,geometry,float8); -DROP FUNCTION ST_Touches(geometry,geometry); -DROP FUNCTION _ST_Touches(geometry,geometry); -DROP FUNCTION touches(geometry,geometry); -DROP FUNCTION ST_Disjoint(geometry,geometry); -DROP FUNCTION disjoint(geometry,geometry); -DROP FUNCTION ST_Relate(geometry,geometry,text); -DROP FUNCTION relate(geometry,geometry,text); -DROP FUNCTION ST_relate(geometry,geometry); -DROP FUNCTION relate(geometry,geometry); - --------------------------------------------------------------------------------- --- Aggregates and their supporting functions --------------------------------------------------------------------------------- - -DROP AGGREGATE ST_MakeLine(geometry); -DROP AGGREGATE makeline(geometry); -DROP AGGREGATE ST_Polygonize(geometry); -DROP AGGREGATE Polygonize(geometry); -DROP AGGREGATE ST_Collect(geometry); -DROP AGGREGATE collect(geometry); -DROP AGGREGATE ST_Union(geometry); - -DROP FUNCTION ST_Union (geometry[]); -DROP FUNCTION ST_unite_garray (geometry[]); -DROP FUNCTION unite_garray (geometry[]); - -DROP AGGREGATE ST_Accum(geometry); -DROP AGGREGATE accum(geometry); - -DROP FUNCTION pgis_geometry_makeline_finalfn(pgis_abs); -DROP FUNCTION pgis_geometry_polygonize_finalfn(pgis_abs); -DROP FUNCTION pgis_geometry_collect_finalfn(pgis_abs); -DROP FUNCTION pgis_geometry_union_finalfn(pgis_abs); -DROP FUNCTION pgis_geometry_accum_finalfn(pgis_abs); -DROP FUNCTION pgis_geometry_accum_transfn(pgis_abs, geometry); --- This drops pgis_abs_in, pgis_abs_out and the type in an atomic fashion -DROP TYPE pgis_abs CASCADE; - -DROP AGGREGATE ST_MemUnion(geometry); -DROP AGGREGATE MemGeomUnion(geometry); -DROP FUNCTION ST_collect(geometry[]); -DROP AGGREGATE ST_memcollect(geometry); -DROP AGGREGATE memcollect(geometry); -DROP FUNCTION ST_collect(geometry, geometry); -DROP FUNCTION collect(geometry, geometry); - - ---------------------------------------------------------------- --- GEOS ---------------------------------------------------------------- - -DROP FUNCTION ST_Union(geometry,geometry); -DROP FUNCTION GeomUnion(geometry,geometry); -DROP FUNCTION ST_symmetricdifference(geometry,geometry); -DROP FUNCTION symmetricdifference(geometry,geometry); -DROP FUNCTION ST_SymDifference(geometry,geometry); -DROP FUNCTION symdifference(geometry,geometry); -DROP FUNCTION ST_Boundary(geometry); -DROP FUNCTION boundary(geometry); -DROP FUNCTION ST_Difference(geometry,geometry); -DROP FUNCTION difference(geometry,geometry); -DROP FUNCTION ST_IsValidReason(geometry); -DROP FUNCTION ST_SimplifyPreserveTopology(geometry, float8); -DROP FUNCTION ST_LocateBetweenElevations(geometry, float8, float8); -DROP FUNCTION ST_LineCrossingDirection(geometry, geometry); -DROP FUNCTION _ST_LineCrossingDirection(geometry, geometry); -DROP FUNCTION ST_ConvexHull(geometry); -DROP FUNCTION convexhull(geometry); -DROP FUNCTION ST_buffer(geometry,float8,integer); -DROP FUNCTION buffer(geometry,float8,integer); -DROP FUNCTION ST_Buffer(geometry,float8); -DROP FUNCTION buffer(geometry,float8); -DROP FUNCTION ST_buffer(geometry,float8,text); -DROP FUNCTION _ST_buffer(geometry,float8,cstring); -DROP FUNCTION ST_Intersection(geometry,geometry); -DROP FUNCTION intersection(geometry,geometry); -#if POSTGIS_GEOS_VERSION >= 32 -DROP FUNCTION ST_HausdorffDistance(geometry, geometry); -DROP FUNCTION ST_HausdorffDistance(geometry, geometry, float8); -#endif - - ---------------------------------------------------------------- --- LRS ---------------------------------------------------------------- - -DROP FUNCTION ST_locate_along_measure(geometry, float8); -DROP FUNCTION locate_along_measure(geometry, float8); -DROP FUNCTION ST_locate_between_measures(geometry, float8, float8); -DROP FUNCTION locate_between_measures(geometry, float8, float8); -DROP FUNCTION ST_line_locate_point(geometry, geometry); -DROP FUNCTION line_locate_point(geometry, geometry); -DROP FUNCTION ST_line_substring(geometry, float8, float8); -DROP FUNCTION line_substring(geometry, float8, float8); -DROP FUNCTION ST_line_interpolate_point(geometry, float8); -DROP FUNCTION line_interpolate_point(geometry, float8); -DROP FUNCTION ST_AddMeasure(geometry, float8, float8); - ---------------------------------------------------------------- --- Algorithms ---------------------------------------------------------------- - -DROP FUNCTION ST_Segmentize(geometry, float8); -DROP FUNCTION Segmentize(geometry, float8); -DROP FUNCTION ST_SnapToGrid(geometry, geometry, float8, float8, float8, float8); -DROP FUNCTION SnapToGrid(geometry, geometry, float8, float8, float8, float8); -DROP FUNCTION ST_SnapToGrid(geometry, float8); -DROP FUNCTION SnapToGrid(geometry, float8); -DROP FUNCTION ST_SnapToGrid(geometry, float8, float8); -DROP FUNCTION SnapToGrid(geometry, float8, float8); -DROP FUNCTION ST_SnapToGrid(geometry, float8, float8, float8, float8); -DROP FUNCTION SnapToGrid(geometry, float8, float8, float8, float8); -DROP FUNCTION ST_Simplify(geometry, float8); -DROP FUNCTION Simplify(geometry, float8); - - ---------------------------------------------------------------- --- CASTS ---------------------------------------------------------------- - -DROP CAST (box3d_extent AS geometry); -DROP CAST (box3d_extent AS box2d); -DROP CAST (box3d_extent AS box3d); - -DROP CAST (geometry AS bytea); -DROP CAST (bytea AS geometry); -DROP CAST (chip AS geometry); -DROP CAST (geometry AS text); -DROP CAST (text AS geometry); -DROP CAST (box3d AS geometry); -DROP CAST (box3d AS box); -DROP CAST (box2d AS geometry); -DROP CAST (box2d AS box3d); -DROP CAST (box3d AS box2d); -DROP CAST (geometry AS box); -DROP CAST (geometry AS box3d); -DROP CAST (geometry AS box2d); - -DROP FUNCTION ST_bytea(geometry); -DROP FUNCTION bytea(geometry); -DROP FUNCTION ST_geometry(bytea); -DROP FUNCTION geometry(bytea); -DROP FUNCTION ST_geometry(chip); -DROP FUNCTION geometry(chip); -DROP FUNCTION ST_geometry(text); -DROP FUNCTION geometry(text); -DROP FUNCTION ST_geometry(box3d); -DROP FUNCTION geometry(box3d); -DROP FUNCTION ST_geometry(box2d); -DROP FUNCTION geometry(box2d); -DROP FUNCTION box3dtobox(box3d); -DROP FUNCTION ST_text(geometry); -DROP FUNCTION text(geometry); -DROP FUNCTION ST_box(box3d); -DROP FUNCTION box(box3d); -DROP FUNCTION ST_box3d(box2d); -DROP FUNCTION box3d(box2d); -DROP FUNCTION ST_box2d(box3d); -DROP FUNCTION box2d(box3d); -DROP FUNCTION ST_box(geometry); -DROP FUNCTION box(geometry); -DROP FUNCTION ST_box3d(geometry); -DROP FUNCTION box3d(geometry); -DROP FUNCTION ST_box2d(geometry); -DROP FUNCTION box2d(geometry); - - ------------------------------------------------------------------------ --- POSTGIS_VERSION() ------------------------------------------------------------------------ - -DROP FUNCTION postgis_full_version(); -DROP FUNCTION postgis_lib_version(); -DROP FUNCTION postgis_version(); -DROP FUNCTION postgis_lib_build_date(); -DROP FUNCTION postgis_scripts_build_date(); -DROP FUNCTION postgis_geos_version(); -DROP FUNCTION postgis_libxml_version(); -DROP FUNCTION postgis_uses_stats(); -DROP FUNCTION postgis_scripts_released(); -DROP FUNCTION postgis_scripts_installed(); -DROP FUNCTION postgis_proj_version(); - ---------------------------------------------------------------- --- PROJ support ---------------------------------------------------------------- - -DROP FUNCTION ST_Transform(geometry,integer); -DROP FUNCTION transform(geometry,integer); -DROP FUNCTION get_proj4_from_srid(integer); - - -------------------------------------------------------------------- --- GEOMETRY_COLUMNS -------------------------------------------------------------------- - -DROP FUNCTION find_srid(varchar,varchar,varchar); -DROP FUNCTION UpdateGeometrySRID(varchar,varchar,integer); -DROP FUNCTION UpdateGeometrySRID(varchar,varchar,varchar,integer); -DROP FUNCTION UpdateGeometrySRID(varchar,varchar,varchar,varchar,integer); -DROP FUNCTION DropGeometryTable(varchar); -DROP FUNCTION DropGeometryTable(varchar,varchar); -DROP FUNCTION DropGeometryTable(varchar, varchar,varchar); -DROP FUNCTION DropGeometryColumn(varchar,varchar); -DROP FUNCTION DropGeometryColumn(varchar,varchar,varchar); -DROP FUNCTION DropGeometryColumn(varchar, varchar,varchar,varchar); -DROP FUNCTION AddGeometryColumn(varchar,varchar,integer,varchar,integer); -DROP FUNCTION AddGeometryColumn(varchar,varchar,varchar,integer,varchar,integer); -DROP FUNCTION AddGeometryColumn(varchar,varchar,varchar,varchar,integer,varchar,integer); -DROP FUNCTION probe_geometry_columns(); -DROP FUNCTION populate_geometry_columns(oid); -DROP FUNCTION populate_geometry_columns(); -DROP FUNCTION fix_geometry_columns(); -DROP FUNCTION rename_geometry_table_constraints(); - -DROP TABLE geometry_columns; - - -------------------------------------------------------------------- --- SPATIAL_REF_SYS -------------------------------------------------------------------- - --- Currently leave this for upgrade purposes -DROP TABLE spatial_ref_sys; - - --- --- Aggregate functions --- - -DROP FUNCTION ST_find_extent(text,text); -DROP FUNCTION find_extent(text,text); -DROP FUNCTION ST_find_extent(text,text,text); -DROP FUNCTION find_extent(text,text,text); -DROP FUNCTION ST_estimated_extent(text,text); -DROP FUNCTION estimated_extent(text,text); -DROP FUNCTION ST_estimated_extent(text,text,text); -DROP FUNCTION estimated_extent(text,text,text); -DROP AGGREGATE ST_Extent3d(geometry); -DROP AGGREGATE Extent3d(geometry); -DROP FUNCTION ST_Combine_BBox(box3d,geometry); -DROP FUNCTION combine_bbox(box3d,geometry); -DROP AGGREGATE ST_Extent(geometry); -DROP AGGREGATE Extent(geometry); -DROP FUNCTION ST_Combine_BBox(box3d_extent,geometry); -DROP FUNCTION combine_bbox(box3d_extent,geometry); -DROP FUNCTION ST_Combine_BBox(box2d,geometry); -DROP FUNCTION combine_bbox(box2d,geometry); - - ------------------------------------------------------------------------- --- CONSTRUCTORS ------------------------------------------------------------------------- - -DROP FUNCTION ST_DumpRings(geometry); -DROP FUNCTION DumpRings(geometry); -DROP FUNCTION ST_Dump(geometry); -DROP FUNCTION Dump(geometry); -DROP FUNCTION ST_LineMerge(geometry); -DROP FUNCTION LineMerge(geometry); -DROP FUNCTION ST_Polygonize (geometry[]); -DROP FUNCTION ST_Polygonize_GArray (geometry[]); -DROP FUNCTION Polygonize_GArray (geometry[]); -DROP FUNCTION ST_BuildArea(geometry); -DROP FUNCTION BuildArea(geometry); -DROP FUNCTION ST_MakePolygon(geometry); -DROP FUNCTION MakePolygon(geometry); -DROP FUNCTION ST_MakePolygon(geometry, geometry[]); -DROP FUNCTION MakePolygon(geometry, geometry[]); -DROP FUNCTION ST_SetPoint(geometry, integer, geometry); -DROP FUNCTION SetPoint(geometry, integer, geometry); -DROP FUNCTION ST_RemovePoint(geometry, integer); -DROP FUNCTION RemovePoint(geometry, integer); -DROP FUNCTION ST_AddPoint(geometry, geometry, integer); -DROP FUNCTION AddPoint(geometry, geometry, integer); -DROP FUNCTION ST_AddPoint(geometry, geometry); -DROP FUNCTION AddPoint(geometry, geometry); -DROP FUNCTION ST_MakeLine(geometry, geometry); -DROP FUNCTION MakeLine(geometry, geometry); -DROP FUNCTION ST_LineFromMultiPoint(geometry); -DROP FUNCTION LineFromMultiPoint(geometry); -DROP FUNCTION ST_MakeLine (geometry[]); -DROP FUNCTION ST_MakeLine_GArray (geometry[]); -DROP FUNCTION makeline_garray (geometry[]); -DROP FUNCTION ST_MakeBox3d(geometry, geometry); -DROP FUNCTION MakeBox3d(geometry, geometry); -DROP FUNCTION ST_MakeBox2d(geometry, geometry); -DROP FUNCTION MakeBox2d(geometry, geometry); -DROP FUNCTION ST_MakePointM(float8, float8, float8); -DROP FUNCTION MakePointM(float8, float8, float8); -DROP FUNCTION ST_MakePoint(float8, float8, float8, float8); -DROP FUNCTION MakePoint(float8, float8, float8, float8); -DROP FUNCTION ST_MakePoint(float8, float8, float8); -DROP FUNCTION MakePoint(float8, float8, float8); -DROP FUNCTION ST_MakePoint(float8, float8); -DROP FUNCTION MakePoint(float8, float8); - - ------------------------------------------------------------------------- --- MISC ------------------------------------------------------------------------- - -DROP FUNCTION ST_GeomFromEWKT(text); -DROP FUNCTION GeomFromEWKT(text); -DROP FUNCTION ST_GeomFromEWKB(bytea); -DROP FUNCTION GeomFromEWKB(bytea); -DROP FUNCTION ST_AsEWKB(geometry,text); -DROP FUNCTION AsEWKB(geometry,text); -DROP FUNCTION ST_AsHEXEWKB(geometry, text); -DROP FUNCTION AsHEXEWKB(geometry, text); -DROP FUNCTION ST_AsHEXEWKB(geometry); -DROP FUNCTION AsHEXEWKB(geometry); -DROP FUNCTION ST_AsEWKB(geometry); -DROP FUNCTION AsEWKB(geometry); -DROP FUNCTION ST_AsEWKT(geometry); -DROP FUNCTION AsEWKT(geometry); -DROP FUNCTION ST_NDims(geometry); -DROP FUNCTION ndims(geometry); -DROP FUNCTION hasBBOX(geometry); -DROP FUNCTION postgis_cache_bbox(); -DROP FUNCTION ST_zmflag(geometry); -DROP FUNCTION zmflag(geometry); -DROP FUNCTION noop(geometry); -DROP FUNCTION ST_ForceRHR(geometry); -DROP FUNCTION ForceRHR(geometry); -DROP FUNCTION ST_Reverse(geometry); -DROP FUNCTION reverse(geometry); -DROP FUNCTION ST_Envelope(geometry); -DROP FUNCTION envelope(geometry); -DROP FUNCTION ST_expand(geometry,float8); -DROP FUNCTION expand(geometry,float8); -DROP FUNCTION ST_expand(box2d,float8); -DROP FUNCTION expand(box2d,float8); -DROP FUNCTION ST_Expand(box3d,float8); -DROP FUNCTION expand(box3d,float8); -DROP FUNCTION ST_multi(geometry); -DROP FUNCTION multi(geometry); -DROP FUNCTION ST_force_collection(geometry); -DROP FUNCTION force_collection(geometry); -DROP FUNCTION ST_force_4d(geometry); -DROP FUNCTION force_4d(geometry); -DROP FUNCTION ST_force_3dm(geometry); -DROP FUNCTION force_3dm(geometry); -DROP FUNCTION ST_force_3d(geometry); -DROP FUNCTION force_3d(geometry); -DROP FUNCTION ST_force_3dz(geometry); -DROP FUNCTION force_3dz(geometry); -DROP FUNCTION ST_force_2d(geometry); -DROP FUNCTION force_2d(geometry); - ------------------------------------------------------------------------- --- Misures ------------------------------------------------------------------------- - -DROP FUNCTION ST_azimuth(geometry,geometry); -DROP FUNCTION azimuth(geometry,geometry); -DROP FUNCTION ST_point_inside_circle(geometry,float8,float8,float8); -DROP FUNCTION point_inside_circle(geometry,float8,float8,float8); -DROP FUNCTION _ST_MaxDistance(geometry,geometry); -DROP FUNCTION ST_maxdistance(geometry,geometry); -DROP FUNCTION max_distance(geometry,geometry); -DROP FUNCTION ST_Distance(geometry,geometry); -DROP FUNCTION distance(geometry,geometry); -DROP FUNCTION ST_distance_sphere(geometry,geometry); -DROP FUNCTION distance_sphere(geometry,geometry); -DROP FUNCTION ST_distance_spheroid(geometry,geometry,spheroid); -DROP FUNCTION distance_spheroid(geometry,geometry,spheroid); -DROP FUNCTION ST_Area(geometry); -DROP FUNCTION area(geometry); -DROP FUNCTION ST_area2d(geometry); -DROP FUNCTION area2d(geometry); -DROP FUNCTION ST_Perimeter(geometry); -DROP FUNCTION perimeter(geometry); -DROP FUNCTION ST_perimeter2d(geometry); -DROP FUNCTION perimeter2d(geometry); -DROP FUNCTION ST_perimeter3d(geometry); -DROP FUNCTION perimeter3d(geometry); -DROP FUNCTION ST_length2d_spheroid(geometry, spheroid); -DROP FUNCTION length2d_spheroid(geometry, spheroid); -DROP FUNCTION ST_length_spheroid(geometry, spheroid); -DROP FUNCTION length_spheroid(geometry, spheroid); -DROP FUNCTION ST_length3d_spheroid(geometry, spheroid); -DROP FUNCTION length3d_spheroid(geometry, spheroid); -DROP FUNCTION ST_Length(geometry); -DROP FUNCTION length(geometry); -DROP FUNCTION ST_length2d(geometry); -DROP FUNCTION length2d(geometry); -DROP FUNCTION ST_length3d(geometry); -DROP FUNCTION length3d(geometry); - - ------------------------------------------------------------------------- --- DEBUG ------------------------------------------------------------------------- - -DROP FUNCTION ST_nrings(geometry); -DROP FUNCTION nrings(geometry); -DROP FUNCTION ST_npoints(geometry); -DROP FUNCTION npoints(geometry); -DROP FUNCTION ST_summary(geometry); -DROP FUNCTION summary(geometry); -DROP FUNCTION ST_mem_size(geometry); -DROP FUNCTION mem_size(geometry); - - -------------------------------------------- ---- CHIP functions -------------------------------------------- - -DROP FUNCTION ST_setFactor(chip,float4); -DROP FUNCTION setFactor(chip,float4); -DROP FUNCTION setSRID(chip,int4); -DROP FUNCTION ST_compression(chip); -DROP FUNCTION compression(chip); -DROP FUNCTION ST_datatype(chip); -DROP FUNCTION datatype(chip); -DROP FUNCTION ST_width(chip); -DROP FUNCTION width(chip); -DROP FUNCTION ST_factor(chip); -DROP FUNCTION factor(chip); -DROP FUNCTION ST_height(chip); -DROP FUNCTION height(chip); -DROP FUNCTION ST_srid(chip); -DROP FUNCTION srid(chip); - - -------------------------------------------- --- other lwgeom functions -------------------------------------------- - -DROP FUNCTION getBBOX(geometry); -DROP FUNCTION getSRID(geometry); -DROP FUNCTION dropBBOX(geometry); -DROP FUNCTION addBBOX(geometry); - - -------------------------------------------- --- GIST opclass index binding entries. -------------------------------------------- - -DROP OPERATOR CLASS gist_geometry_ops USING gist CASCADE; - --- gist support functions -DROP FUNCTION LWGEOM_gist_decompress(internal); -DROP FUNCTION LWGEOM_gist_same(box2d, box2d, internal); -DROP FUNCTION LWGEOM_gist_union(bytea, internal); -DROP FUNCTION LWGEOM_gist_picksplit(internal, internal); -DROP FUNCTION LWGEOM_gist_penalty(internal,internal,internal); -DROP FUNCTION LWGEOM_gist_compress(internal); -DROP FUNCTION LWGEOM_gist_consistent(internal,geometry,int4); - --- GEOMETRY operators - -DROP OPERATOR ~ (geometry,geometry); -DROP OPERATOR @ (geometry,geometry); -DROP OPERATOR ~= (geometry,geometry); -DROP OPERATOR |>> (geometry,geometry); -DROP OPERATOR |&> (geometry,geometry); -DROP OPERATOR >> (geometry,geometry); -DROP OPERATOR &> (geometry,geometry); -DROP OPERATOR && (geometry,geometry); -DROP OPERATOR &<| (geometry,geometry); -DROP OPERATOR <<| (geometry,geometry); -DROP OPERATOR &< (geometry,geometry); -DROP OPERATOR << (geometry,geometry); - - -------------------------------------------------------------------- --- GiST indexes -------------------------------------------------------------------- - -DROP FUNCTION ST_geometry_same(geometry, geometry); -DROP FUNCTION geometry_same(geometry, geometry); -DROP FUNCTION ST_geometry_overlap(geometry, geometry); -DROP FUNCTION geometry_overlap(geometry, geometry); -DROP FUNCTION ST_geometry_contained(geometry, geometry); -DROP FUNCTION geometry_contained(geometry, geometry); -DROP FUNCTION ST_geometry_contain(geometry, geometry); -DROP FUNCTION geometry_contain(geometry, geometry); -DROP FUNCTION ST_geometry_below(geometry, geometry); -DROP FUNCTION geometry_below(geometry, geometry); -DROP FUNCTION ST_geometry_above(geometry, geometry); -DROP FUNCTION geometry_above(geometry, geometry); -DROP FUNCTION ST_geometry_right(geometry, geometry); -DROP FUNCTION geometry_right(geometry, geometry); -DROP FUNCTION ST_geometry_left(geometry, geometry); -DROP FUNCTION geometry_left(geometry, geometry); -DROP FUNCTION ST_geometry_overbelow(geometry, geometry); -DROP FUNCTION geometry_overbelow(geometry, geometry); -DROP FUNCTION ST_geometry_overabove(geometry, geometry); -DROP FUNCTION geometry_overabove(geometry, geometry); -DROP FUNCTION ST_geometry_overright(geometry, geometry); -DROP FUNCTION geometry_overright(geometry, geometry); -DROP FUNCTION ST_geometry_overleft(geometry, geometry); -DROP FUNCTION geometry_overleft(geometry, geometry); -DROP FUNCTION ST_postgis_gist_joinsel(internal, oid, internal, smallint); -DROP FUNCTION postgis_gist_joinsel(internal, oid, internal, smallint); -DROP FUNCTION ST_postgis_gist_sel (internal, oid, internal, int4); -DROP FUNCTION postgis_gist_sel (internal, oid, internal, int4); - - --- --- Sorting operators for Btree --- - -DROP OPERATOR CLASS btree_geometry_ops USING btree; -DROP OPERATOR > (geometry,geometry); -DROP OPERATOR >= (geometry,geometry); -DROP OPERATOR = (geometry,geometry); -DROP OPERATOR <= (geometry,geometry); -DROP OPERATOR < (geometry,geometry); - - -------------------------------------------------------------------- --- BTREE indexes -------------------------------------------------------------------- - - -DROP FUNCTION ST_geometry_cmp(geometry, geometry); -DROP FUNCTION geometry_cmp(geometry, geometry); -DROP FUNCTION ST_geometry_eq(geometry, geometry); -DROP FUNCTION geometry_eq(geometry, geometry); -DROP FUNCTION ST_geometry_ge(geometry, geometry); -DROP FUNCTION geometry_ge(geometry, geometry); -DROP FUNCTION ST_geometry_gt(geometry, geometry); -DROP FUNCTION geometry_gt(geometry, geometry); -DROP FUNCTION ST_geometry_le(geometry, geometry); -DROP FUNCTION geometry_le(geometry, geometry); -DROP FUNCTION ST_geometry_lt(geometry, geometry); -DROP FUNCTION geometry_lt(geometry, geometry); - - - ------------------------------------------------------------------------ --- BOX2D ------------------------------------------------------------------------ - -DROP FUNCTION ST_box2d(box3d_extent); - --- This drops ST_box2d_in, ST_box2d_out, box2d_in, box2d_out and the type in an atomic fashion -DROP TYPE box2d CASCADE; - - -------------------------------------------------------------------- --- CHIP TYPE -------------------------------------------------------------------- - --- This drops ST_chip_in, ST_chip_out, chip_in, chip_out and the type in an atomic fashion -DROP TYPE chip CASCADE; - - -------------------------------------------------------------------- --- BOX3D TYPE -------------------------------------------------------------------- - - -DROP FUNCTION ST_ZMax(box3d); -DROP FUNCTION zmax(box3d); -DROP FUNCTION ST_YMax(box3d); -DROP FUNCTION ymax(box3d); -DROP FUNCTION ST_XMax(box3d); -DROP FUNCTION xmax(box3d); -DROP FUNCTION ST_ZMin(box3d); -DROP FUNCTION zmin(box3d); -DROP FUNCTION ST_YMin(box3d); -DROP FUNCTION ymin(box3d); -DROP FUNCTION ST_XMin(box3d); -DROP FUNCTION xmin(box3d); - -DROP FUNCTION ST_geometry(box3d_extent); -DROP FUNCTION ST_box3d_extent(box3d_extent); - --- This drops box3d_extent_in, box3d_extent_out and the type in an atomic fashion -DROP TYPE box3d_extent CASCADE; - --- This drops ST_box3d_in, ST_box3d_out, box3d_in, box3d_out and the type in an atomic fashion -DROP TYPE box3d CASCADE; - - -------------------------------------------- --- Affine transforms -------------------------------------------- - -DROP FUNCTION ST_shift_longitude(geometry); -DROP FUNCTION shift_longitude(geometry); -DROP FUNCTION ST_transscale(geometry,float8,float8,float8,float8); -DROP FUNCTION transscale(geometry,float8,float8,float8,float8); -DROP FUNCTION ST_Scale(geometry,float8,float8); -DROP FUNCTION Scale(geometry,float8,float8); -DROP FUNCTION ST_Scale(geometry,float8,float8,float8); -DROP FUNCTION Scale(geometry,float8,float8,float8); -DROP FUNCTION ST_Translate(geometry,float8,float8); -DROP FUNCTION Translate(geometry,float8,float8); -DROP FUNCTION ST_Translate(geometry,float8,float8,float8); -DROP FUNCTION Translate(geometry,float8,float8,float8); -DROP FUNCTION ST_RotateY(geometry,float8); -DROP FUNCTION RotateY(geometry,float8); -DROP FUNCTION ST_RotateX(geometry,float8); -DROP FUNCTION RotateX(geometry,float8); -DROP FUNCTION ST_Rotate(geometry,float8); -DROP FUNCTION Rotate(geometry,float8); -DROP FUNCTION ST_RotateZ(geometry,float8); -DROP FUNCTION RotateZ(geometry,float8); -DROP FUNCTION ST_Affine(geometry,float8,float8,float8,float8,float8,float8); -DROP FUNCTION Affine(geometry,float8,float8,float8,float8,float8,float8); -DROP FUNCTION ST_Affine(geometry,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8); -DROP FUNCTION Affine(geometry,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8); - - -------------------------------------------------------------------- --- GEOMETRY TYPE (geometry_dump) -------------------------------------------------------------------- -DROP TYPE geometry_dump CASCADE; - -------------------------------------------------------------------- --- GEOMETRY TYPE (lwgeom) -------------------------------------------------------------------- - --- This drops ST_geometry_send, geometry_send, ST_geometry_recv, geometry_recv, --- ST_geometry_out, geometry_out, ST_geometry_in, geometry_in and the type in an atomic fashion - -DROP TYPE geometry CASCADE; - -DROP FUNCTION ST_geometry_analyze(internal); -DROP FUNCTION geometry_analyze(internal); -DROP FUNCTION geometry_gist_sel (internal, oid, internal, int4); -DROP FUNCTION geometry_gist_joinsel(internal, oid, internal, smallint); - -------------------------------------------------------------------- --- SPHEROID TYPE -------------------------------------------------------------------- - --- This drops ST_spheroid_out, spheroid_out, ST_spheroid_in, spheroid_in and the type in an atomic fashion -DROP TYPE spheroid CASCADE; - - -COMMIT; diff -Nru postgis-1.5.3/postgis/uninstall_sqlmm.sql.in.c postgis-2.0.1/postgis/uninstall_sqlmm.sql.in.c --- postgis-1.5.3/postgis/uninstall_sqlmm.sql.in.c 2009-09-14 10:54:33.000000000 +0000 +++ postgis-2.0.1/postgis/uninstall_sqlmm.sql.in.c 2012-02-27 22:08:12.000000000 +0000 @@ -1,6 +1,6 @@ -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- --- $Id: uninstall_sqlmm.sql.in.c 4494 2009-09-14 10:54:33Z mcayland $ +-- $Id: uninstall_sqlmm.sql.in.c 9324 2012-02-27 22:08:12Z pramsey $ -- -- PostGIS - Spatial Types for PostgreSQL -- http://postgis.refractions.net @@ -64,6 +64,15 @@ DROP FUNCTION SE_LocateBetween(geometry, float8, float8); ------------------------------------------------------------------------------- +-- SQL/MM LRS functions +------------------------------------------------------------------------------- + +DROP FUNCTION ST_LocateBetween(geometry, float8, float8); +DROP FUNCTION ST_LocateAlong(geometry, float8); +DROP FUNCTION ST_LocateBetween(geometry, float8, float8, float8); +DROP FUNCTION ST_LocateAlong(geometry, float8, float8); + +------------------------------------------------------------------------------- -- END ------------------------------------------------------------------------------- diff -Nru postgis-1.5.3/postgis_config.h.in postgis-2.0.1/postgis_config.h.in --- postgis-1.5.3/postgis_config.h.in 2009-12-18 19:08:20.000000000 +0000 +++ postgis-2.0.1/postgis_config.h.in 2012-03-13 16:23:38.000000000 +0000 @@ -1,11 +1,43 @@ /* postgis_config.h.in. Generated from configure.ac by autoheader. */ +#include "postgis_svn_revision.h" + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +#undef ENABLE_NLS + +/* Define to 1 if GDALFPolygonize function is available */ +#undef GDALFPOLYGONIZE + +/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the + CoreFoundation framework. */ +#undef HAVE_CFLOCALECOPYCURRENT + +/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +#undef HAVE_CFPREFERENCESCOPYAPPVALUE + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +#undef HAVE_DCGETTEXT + +/* Define for some functions we are interested in */ +#undef HAVE_VASPRINTF +#undef HAVE_ASPRINTF +#undef HAVE_FSEEKO + /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H -/* Defined if libiconv headers and library are present */ +/* Define if the GNU gettext() function is already present or preinstalled. */ +#undef HAVE_GETTEXT + +/* Define if you have the iconv() function and it works. */ #undef HAVE_ICONV +/* Define to 1 if you have the `iconvctl' function. */ +#undef HAVE_ICONVCTL + /* ieeefp.h header */ #undef HAVE_IEEEFP_H @@ -15,12 +47,33 @@ /* Define to 1 if you have the `geos_c' library (-lgeos_c). */ #undef HAVE_LIBGEOS_C +/* Define to 1 if you have the `libiconvctl' function. */ +#undef HAVE_LIBICONVCTL + +/* Define to 1 if libjson is present */ +#undef HAVE_LIBJSON + /* Define to 1 if you have the `pq' library (-lpq). */ #undef HAVE_LIBPQ /* Define to 1 if you have the `proj' library (-lproj). */ #undef HAVE_LIBPROJ +/* Define to 1 if you have the `xml2' library (-lxml2). */ +#undef HAVE_LIBXML2 + +/* Define to 1 if you have the header file. */ +#undef HAVE_LIBXML_PARSER_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LIBXML_TREE_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LIBXML_XPATHINTERNALS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LIBXML_XPATH_H + /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H @@ -49,6 +102,9 @@ */ #undef LT_OBJDIR +/* Location of PostgreSQL locale directory */ +#undef PGSQL_LOCALEDIR + /* Enable caching of bounding box within geometries */ #undef POSTGIS_AUTOCACHE_BBOX @@ -58,6 +114,9 @@ /* PostGIS library debug level (0=disabled) */ #undef POSTGIS_DEBUG_LEVEL +/* GDAL library version */ +#undef POSTGIS_GDAL_VERSION + /* GEOS library version */ #undef POSTGIS_GEOS_VERSION @@ -70,12 +129,12 @@ /* PostGIS major version */ #undef POSTGIS_MAJOR_VERSION -/* PostGIS micro version */ -#undef POSTGIS_MICRO_VERSION - /* PostGIS minor version */ #undef POSTGIS_MINOR_VERSION +/* PostGIS micro version */ +#undef POSTGIS_MICRO_VERSION + /* PostgreSQL server version */ #undef POSTGIS_PGSQL_VERSION @@ -85,6 +144,30 @@ /* PROJ library version */ #undef POSTGIS_PROJ_VERSION +/* PostGIS Raster build date */ +#undef POSTGIS_RASTER_BUILD_DATE + +/* PostGIS Raster library version */ +#undef POSTGIS_RASTER_LIB_VERSION + +/* PostGIS Raster major version */ +#undef POSTGIS_RASTER_MAJOR_VERSION + +/* PostGIS Raster micro version */ +#undef POSTGIS_RASTER_MICRO_VERSION + +/* PostGIS Raster minor version */ +#undef POSTGIS_RASTER_MINOR_VERSION + +/* PostGIS Raster scripts version */ +#undef POSTGIS_RASTER_SCRIPTS_VERSION + +/* PostGIS Raster version */ +#undef POSTGIS_RASTER_VERSION + +/* Define to 1 if a warning is outputted every time a double is truncated */ +#undef POSTGIS_RASTER_WARN_ON_TRUNCATION + /* PostGIS scripts version */ #undef POSTGIS_SCRIPTS_VERSION @@ -94,6 +177,9 @@ /* PostGIS version */ #undef POSTGIS_VERSION +/* Define command to determine the current directory during regression */ +#undef PWDREGRESS + /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS diff -Nru postgis-1.5.3/postgis_svn_revision.h postgis-2.0.1/postgis_svn_revision.h --- postgis-1.5.3/postgis_svn_revision.h 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/postgis_svn_revision.h 2012-06-22 21:04:34.000000000 +0000 @@ -0,0 +1 @@ +#define POSTGIS_SVN_REVISION 9979 diff -Nru postgis-1.5.3/raster/CREDITS postgis-2.0.1/raster/CREDITS --- postgis-1.5.3/raster/CREDITS 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/CREDITS 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,19 @@ +- The BAM project, University Laval, sponsored project management kick-start. + +- CadCorp (http://www.cadcorp.com/) sponsored WKB and datum format design + and implementation. + +- The Michigan Tech Research Institute sponsored spatial operators + implementation. + +- Refractions Research Inc. provided svn repository + +- Pierre Racine designed the functionality + +- Sandro Santilli wrote the in-memory api, build scripts and + postgresql connectors + +- Deimos Space (http://www.deimos-space.com/UK/index.asp?lang=UK), under + "España Virtual" project (http://www.espanavirtual.org/?q=en) + sponsored the creation of several core and import/export functions + diff -Nru postgis-1.5.3/raster/DEBUG postgis-2.0.1/raster/DEBUG --- postgis-1.5.3/raster/DEBUG 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/DEBUG 2010-10-26 17:40:32.000000000 +0000 @@ -0,0 +1,80 @@ +PostGIS debugging information +============================= + +Written by Jorge Arevalo +2010-10-26 + +Based on the ../postgis/DEBUG document, written by Mark Cave-Ayland + +Description +=========== + +The philosophy of the PostGIS Raster debug system is the same used in PostGIS. +Review the ../postgis/DEBUG document for further understanding on this +philosophy. + +Debugging is accomplished using four new macros: + + RASTER_DEBUG(level, "message") + - If the current debug level >= level, emit message + + RASTER_DEBUGF(level, "format message", ...) + - If the current debug level >= level, emit formatted message + (this allows placeholders and extra arguments in exactly the + same way as vasprintf()) + + POSTGIS_RASTER_DEBUG(level, "message") + - If the current debug level >= level, emit message + + POSTGIS_RASTER_DEBUGF(level, "format message", ...) + - If the current debug level >= level, emit formatted message + (this allows placeholders and extra arguments in exactly the + same way as vasprintf()) + +The two RASTER_DEBUG macros are designed for use within librtcore; i.e. raster +core routines that may not necessarily be used from PostgreSQL, and make use of the +default_info_handler() call. +Similarly, the POSTGIS_RASTER_DEBUG macros are designed for code that can *only* be called +from within PostgreSQL, i.e. it calls ereport() directly. The trick is, of course, +to distinguish between the two. Generally anything within a function declared as +returning type Datum should use the POSTGIS_RASTER_DEBUG macros, as well as code that can +only be called from these functions. Similarly, any functions that do not take +PostgreSQL-specific datatypes should use the RASTER_DEBUG functions. + +Note that the debugging macros automatically prefix the current filename, function name +and line number to any debugging messages. As well as allowing debug messages to be +shorter, it also makes following program flow much easier. + + +Usage +===== + +The current debug level is set by the POSTGIS_DEBUG_LEVEL #define in postgis_config.h. +By default, configure sets POSTGIS_DEBUG_LEVEL to 0 which disables all debugging output. +If debugging output is required, it is necessary to either redefine POSTGIS_DEBUG_LEVEL +to the required level (and rebuild the shared library), or re-run configure with the +--enable-debug option and then rebuild the shared library (currently configure defaults +to level 4). + +A rebuild of the library is required since the output of the debug macros is conditional; +if POSTGIS_DEBUG_LEVEL is set to 0 then instead of providing debug output, the macros +simply evaluate to (void)0 which can be optimised away by the compiler. Hence adding +debugging statements during development will have negligible performance impact during +execution when debugging is disabled. + + +Verbosity levels +================ + +The following verbosity levels have been defined in the initial implementation; obviously +these may need to change as experience dictates. By specifying a debug level, output for +all levels up to and including the current debug level is generated. It should also be +obvious that as the debug level is increased, more complex output is generated. + +0 - All debugging output is disable +1 - Reserved +2 - Function entry; for simply announcing when a function has been entered +3 - Normal function debug; output any information of interest to the developer +4 - Verbose function debug; output lots of useful detail +5 - Memory allocation; output all uses of alloc/free within the code + diff -Nru postgis-1.5.3/raster/Makefile.in postgis-2.0.1/raster/Makefile.in --- postgis-1.5.3/raster/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/Makefile.in 2012-03-21 21:36:59.000000000 +0000 @@ -0,0 +1,57 @@ +############################################################################# +# $Id: Makefile 3940 2009-03-30 09:30:43Z mloskot $ +# +# Master makefile used to build WKT Raster +# +# Copyright (c) 2009 Sandro Santilli +# +# This is free software; you can redistribute and/or modify it under +# the terms of the GNU General Public Licence. See the COPYING file. +# +############################################################################# + + +all: @RT_CORE_LIB@ @RT_PG_LIB@ @RT_LOADER@ @RT_POSTGIS_SQL@ + +corelib: + $(MAKE) -C rt_core + +pglib: + $(MAKE) -C rt_pg + +rtloader: + $(MAKE) -C loader + +rtpostgis.sql: + $(MAKE) -C rt_pg rtpostgis.sql + +install: all + $(MAKE) -C rt_pg install + $(MAKE) -C loader install + $(MAKE) -C scripts install + +uninstall: + $(MAKE) -C rt_pg uninstall + $(MAKE) -C loader uninstall + $(MAKE) -C scripts uninstall + +clean: + $(MAKE) -C rt_core $@ + $(MAKE) -C rt_pg $@ + $(MAKE) -C loader $@ + $(MAKE) -C test $@ + $(MAKE) -C scripts $@ + +distclean: clean + $(MAKE) -C rt_core $@ + $(MAKE) -C rt_pg $@ + $(MAKE) -C loader $@ + $(MAKE) -C test $@ + $(MAKE) -C scripts $@ + rm -f raster_config.h Makefile + +core-check: + $(MAKE) -C test $@ + +check: + $(MAKE) -C test $@ diff -Nru postgis-1.5.3/raster/NEWS postgis-2.0.1/raster/NEWS --- postgis-1.5.3/raster/NEWS 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/NEWS 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,9 @@ +Sun Sep 26 23:10:45 CEST 2010 + +Extension added to PostGIS SVN version. + + +Mon Jan 26 18:58:35 CET 2009 + +First in-memory raster management api implemented, +initial work on postgresql interface. diff -Nru postgis-1.5.3/raster/Version.config postgis-2.0.1/raster/Version.config --- postgis-1.5.3/raster/Version.config 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/Version.config 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,8 @@ +# Version numbering central repository, to be included from various +# places during the build process + +# See HOWTO_RELEASE file in SVN for definitions of those three. + +POSTGIS_RASTER_MAJOR_VERSION=0 +POSTGIS_RASTER_MINOR_VERSION=1 +POSTGIS_RASTER_MICRO_VERSION=6d diff -Nru postgis-1.5.3/raster/doc/RFC1-SerializedFormat postgis-2.0.1/raster/doc/RFC1-SerializedFormat --- postgis-1.5.3/raster/doc/RFC1-SerializedFormat 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/doc/RFC1-SerializedFormat 2011-01-24 15:06:02.000000000 +0000 @@ -0,0 +1,271 @@ +RFC1: serialized format (storage) for RASTER type +------------------------------------------------------ +$Author: jorgearevalo $ +$Date: 2011-01-24 07:06:02 -0800 (Mon, 24 Jan 2011) $ +$Revision: 6716 $ +------------------------------------------------------ + +The goals of the serialized version for RASTER type are: + + - Small memory footprint on deserialization + This means that the amount of allocated memory + required for deserialization is minimal + + - Fast access + Access to band data must be aligned, saving from + memory copies on full scan. + + - Ease of format switch + On-disk format must be allowed to change + w/out need for dump-reload of the whole + database. + +The first two goals boil down to forcing alignment of band +data in the serialized format itself, which in turn will +require variable padding based on pixeltype of each band. + +For simplicity we will ensure that each band of the +raster starts at the 8-byte boundary and thus pad +previous structures in the stream accordingly. + +The structure will then look like this: + + [HEADER] [BAND0] [BAND1] [BAND2] + ^aligned ^aligned ^aligned + +The third goal can be accomplished by adding a version +number to the serialized format so that in case of changes +the deserializer can pick the correct parsing procedure +based on that. + +The HEADER +---------- + +PostgreSQL forces a 4-byte size field a the start of +the detoasted datum, and ensure this start of structure +is aligned to 8-byte. We'll add version number right after it, +and then make sure the total size is a multiple of 8 bytes. + + The following structure is composed by 8 slots of 8-bytes, + totaling 64 bytes: + + struct rt_raster_serialized_t { + + /*---[ 8 byte boundary ]---{ */ + uint32_t size; /* required by postgresql: 4 bytes */ + uint16_t version; /* format version (this is version 0): 2 bytes */ + uint16_t numBands; /* Number of bands: 2 bytes */ + + /* }---[ 8 byte boundary ]---{ */ + double scaleX; /* pixel width: 8 bytes */ + + /* }---[ 8 byte boundary ]---{ */ + double scaleY; /* pixel height: 8 bytes */ + + /* }---[ 8 byte boundary ]---{ */ + double ipX; /* insertion point X: 8 bytes */ + + /* }---[ 8 byte boundary ]---{ */ + double ipY; /* insertion point Y: 8 bytes */ + + /* }---[ 8 byte boundary ]---{ */ + double skewX; /* rotation about the X axis: 8 bytes */ + + /* }---[ 8 byte boundary ]---{ */ + double skewY; /* rotation about the Y axis: 8 bytes */ + + /* }---[ 8 byte boundary ]--- */ + int32_t srid; /* Spatial reference id: 4 bytes */ + uint16_t width; /* pixel columns: 2 bytes */ + uint16_t height; /* pixel rows: 2 bytes */ + }; + +The BANDS +--------- + +Given the serialized raster header structure above, it +is guaranteed that a serialized band always start at 8-bytes +boundary, so it's simpler to compute padding required at +the end of each band to ensure next band will be guaranteed +the same assumption. + +We'll need to take 2 padding spots into account: +the first is to ensure actual band data is aligned accordingly +to the pixel type (and storage flag) needs, the second is to +ensure next band (if any) will also be aligned to 8-bytes: + + [PIXELTYPE+STORAGE_FLAG] [DATA_PADDING] [DATA] [TRAILING_PADDING] + +The total size of a band's serialized form in bytes +must be a multiple of 8. + +The maximum required data padding size will be of 7 bytes +(64bit pixel type). The maximum required trailing padding size +will be of 7 bytes. + + Pixel type and storage flag + --------------------------- + + Pixel type specifies type of pixel values in a band. + Storage flag specifies whether the band data is stored + as part of the datum or is to be found on the server's + filesytem. + + There are currently 11 supported pixel value types, so 4 + bits are enough to account for all. We'll reserve + the upper 4 bits for generic flags and define upmost as + storage flag: + + #define BANDTYPE_FLAGS_MASK 0xF0 + #define BANDTYPE_PIXTYPE_MASK 0x0F + + #define BANDTYPE_FLAG_OFFDB (1<<7) + #define BANDTYPE_FLAG_HASNODATA (1<<6) + #define BANDTYPE_FLAG_ISNODATA (1<<5) + #define BANDTYPE_FLAG_RESERVED3 (1<<4) + + Data padding + ------------ + + Band alignment depends on pixeltypes, as follows: + + - PT_1BB, PT_2BUI, PT_4BUI, PT_8BSI, PT_8BUI: + No alignment required, each value is 1 byte. + + - PT_16BSI, PT_16BUI: + Data must be aligned to 2-bytes boundary. + + - PT_32BSI, PT_32BUI, PT_32BF: + Data must be aligned to 4-bytes boundary. + + - PT_64BF: + Data must be aligned to 8-bytes boundary. + + Accordingly we can then define the following structures: + + struct rt_band8_serialized_t { + uint8_t pixeltype; + uint8_t data[1]; /* no data padding */ + } + + struct rt_band16_serialized_t { + uint8_t pixeltype; + uint8_t padding; /* 1-byte padding */ + uint8_t data[1]; + } + + struct rt_band32_serialized_t { + uint8_t pixeltype; + uint8_t padding[3]; /* 3-bytes padding */ + uint8_t data[1]; + } + + struct rt_band64_serialized_t { + uint8_t pixeltype; + uint8_t padding[7]; /* 7-bytes padding */ + uint8_t data[1]; + } + + And an abstract base class: + + struct rt_band_serialized_t { + uint8_t pixeltype + } + + Data + ---- + + The band data - guaranteed to be always aligned as required by + pixeltype - will start with the nodata value. + After that we may have pixel values or off-db raster reference + depending on OFFDB flag in the pixeltype field: + + * For in-db bands the nodata value is followed by a value + for each column in first row, then in second row and so on. + For example, a 2x2 raster band data will have this form: + + [nodata] [x:0,y:0] [x:1,y:0] [x:0,y:1] [x:1,y:1] + + Where the size of the [...] blocks is 1,2,4 or 8 bytes depending + on pixeltype. Endiannes of multi-bytes value is the host endiannes. + + * For off-db bands the nodata value is followed by a band number + followed by a null-terminated string expressing the path to + the raster file: + + [nodata] [bandno] [path] + + Where the size of the [nodata] block is 1,2,4 or 8 bytes depending + on pixeltype (endiannes of multi-bytes value is the host endiannes), + size of [bandno] is 1 byte, and [path] is null-terminated. + + + Trailing padding + ---------------- + + The trailing band padding is used to ensure next band (if any) + will start on the 8-bytes boundary. + It is both dependent on raster dimensions (number of values) + and band data pixel type (size of each value). + + In order to obtain the required padding size for a band + we'll need to compute the minimum size required to hold the band + data, add the data padding and pixeltype sizes, and then grow + the resulting size to reach a multiple of 8 bytes: + + size_t + rt_band_serialized_size(rt_context ctx, rt_band band) + { + rt_pixtype pixtype = rt_band_get_pixtype(ctx, band); + size_t sz; + + /* pixeltype + data padding */ + sz = rt_pixtype_alignment(ctx, pixtype); + + /* add data size */ + sz += rt_band_get_data_size(ctx, band); + + /* grow size to reach a multiple of 8 bytes */ + sz = TYPEALIGN(sz, 8); + + assert( !(sz%8) ); + + return sz; + } + + +Example sizes +------------- + +255x255 single band PT_16BUI: + header size: 64 + + pixeltype+data_padding: 2 + + data size: (255*255+1)*2 == 130052 = + 130118 + + trailing padding: 2 = + total size: 130120 (~127k) + +255x255 single band PT_8BUI: + header size: 64 + + pixeltype+data_padding: 1 + + data size: (255*255+1) == 65026 = + 65091 + + trailing padding: 5 = + total size: 65096 (~63k) + +64x64 single band PT_16BSI: + header size: 64 + + pixeltype+data_padding: 2 + + data size: (64*64+1)*2 == 8194 = + 8260 + + trailing padding: 4 = + total size: 8264 (~8k -- >page size) + +64x64 single band PT_8BUI: + header size: 64 + + pixeltype+data_padding: 1 + + data size: (64*64+1) == 4097 = + 4162 + + trailing padding: 6 = + total size: 4168 (~4k) + diff -Nru postgis-1.5.3/raster/doc/RFC2-WellKnownBinaryFormat postgis-2.0.1/raster/doc/RFC2-WellKnownBinaryFormat --- postgis-1.5.3/raster/doc/RFC2-WellKnownBinaryFormat 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/doc/RFC2-WellKnownBinaryFormat 2011-06-23 23:50:13.000000000 +0000 @@ -0,0 +1,129 @@ +RFC2: Well Known Binary format for RASTER type +---------------------------------------------- +$Author: chodgson $ +$Date: 2011-06-23 16:50:13 -0700 (Thu, 23 Jun 2011) $ +$Revision: 7461 $ +------------------------------------------------------ + +The WKB format for RASTER is meant for transport. +Takes into account endiannes and avoids any padding. +Still, beside padding and endiannes, it matches the +internal serialized format (see RFC1), for quick +input/output. + +// Basic Type definitions +// byte : 1 byte +// uint16 : 16 bit unsigned integer (2 bytes) +// uint32 : 32 bit unsigned integer (4 bytes) +// float64 : double precision floating point number (8 bytes) + + +------------------------------------------------------------+ + | RASTER | + +---------------+-------------+------------------------------+ + | - name - | - type - | - meaning - | + +---------------+-------------+------------------------------+ + | endiannes | byte | 1:ndr/little endian | + | | | 0:xdr/big endian | + +---------------+-------------+------------------------------+ + | version | uint16 | format version (0 for this | + | | | structure) | + +---------------+-------------+------------------------------+ + | nBands | uint16 | Number of bands | + +---------------+-------------+------------------------------+ + | scaleX | float64 | pixel width | + | | | in geographical units | + +---------------+-------------+------------------------------+ + | scaleY | float64 | pixel height | + | | | in geographical units | + +---------------+-------------+------------------------------+ + | ipX | float64 | X ordinate of upper-left | + | | | pixel's upper-left corner | + | | | in geographical units | + +---------------+-------------+------------------------------+ + | ipY | float64 | Y ordinate of upper-left | + | | | pixel's upper-left corner | + | | | in geographical units | + +---------------+-------------+------------------------------+ + | skewX | float64 | rotation about Y-axis | + +---------------+-------------+------------------------------+ + | skewY | float64 | rotation about X-axis | + +---------------+-------------+------------------------------+ + | srid | int32 | Spatial reference id | + +---------------+-------------+------------------------------+ + | width | uint16 | number of pixel columns | + +---------------+-------------+------------------------------+ + | height | uint16 | number of pixel rows | + +---------------+-------------+------------------------------+ + | bands[nBands] | RASTERBAND | Bands data | + +---------------+-------------+------------------------------+ + + + +------------------------------------------------------------------+ + | RASTERBAND | + +---------------+--------------+-----------------------------------+ + | - name - | - type - | - meaning - | + +---------------+--------------+-----------------------------------+ + | isOffline | 1bit | If true, data is to be found | + | | | on the filesystem, trought the | + | | | path specified in RASTERDATA | + +---------------+--------------+-----------------------------------+ + | hasNodataValue| 1bit | If true, stored nodata value is | + | | | a true nodata value. Otherwise | + | | | the value stored as a nodata | + | | | value should be ignored. | + +---------------+--------------+-----------------------------------+ + | isNodataValue | 1bit | If true, all the values of the | + | | | band are expected to be nodata | + | | | values. This is a dirty flag. | + | | | To set the flag to its real value | + | | | the function st_bandisnodata must | + | | | must be called for the band with | + | | | 'TRUE' as last argument. | + +---------------+--------------+-----------------------------------+ + | reserved | 1bit | unused in this version | + +---------------+--------------+-----------------------------------+ + | pixtype | 4bits | 0: 1-bit boolean | + | | | 1: 2-bit unsigned integer | + | | | 2: 4-bit unsigned integer | + | | | 3: 8-bit signed integer | + | | | 4: 8-bit unsigned integer | + | | | 5: 16-bit signed integer | + | | | 6: 16-bit unsigned signed integer | + | | | 7: 32-bit signed integer | + | | | 8: 32-bit unsigned signed integer | + | | | 9: 32-bit float | + | | | 10: 64-bit float | + +---------------+--------------+-----------------------------------+ + | nodata | 1 to 8 bytes | Nodata value | + | | depending on | | + | | pixtype [1] | | + +---------------+--------------+-----------------------------------+ + | data | RASTERDATA | Raster band data (see below) | + +---------------+--------------+-----------------------------------+ + + +------------------------------------------------------------------+ + | RASTERDATA (isOffline flag clear) | + +---------------+--------------+-----------------------------------+ + | pix[w*h] | 1 to 8 bytes | Pixels values, row after row, | + | | depending on | so pix[0] is upper-left, pix[w-1] | + | | pixtype [1] | is upper-right. | + | | | | + | | | As for endiannes, it is specified | + | | | at the start of WKB, and implicit | + | | | up to 8bits (bit-order is most | + | | | significant first) | + | | | | + +---------------+--------------+-----------------------------------+ + + [1] 1,2 and 4 bit pixtypes are still encoded as 1-byte per value + + +-----------------------------------------------------------------+ + | RASTERDATA (isOffline flag set) | + +---------------+-------------+-----------------------------------+ + | bandNumber | int8 | 0-based band number to use from | + | | | the set available in the external | + | | | file | + +---------------+-------------+-----------------------------------+ + | path | string | null-terminated path to data file | + +---------------+-------------+-----------------------------------+ + diff -Nru postgis-1.5.3/raster/doc/doxygen.cfg.in postgis-2.0.1/raster/doc/doxygen.cfg.in --- postgis-1.5.3/raster/doc/doxygen.cfg.in 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/doc/doxygen.cfg.in 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,1252 @@ +# Doxyfile 1.4.7 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + +PROJECT_NAME = "WKT Raster Doxygen" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = @@LAST_RELEASE_VERSION@@-r@@SVN_REVISION@@ + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = doxygen + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = YES + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, +# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, +# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, +# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, +# Swedish, and Ukrainian. + +OUTPUT_LANGUAGE = English + +# This tag can be used to specify the encoding used in the generated output. +# The encoding is not always determined by the language that is chosen, +# but also whether or not the output is meant for Windows or non-Windows users. +# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES +# forces the Windows encoding (this is the default for the Windows binary), +# whereas setting the tag to NO uses a Unix-style encoding (the default for +# all platforms other than Windows). + +USE_WINDOWS_ENCODING = NO + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = YES + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = YES + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = NO + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like the Qt-style comments (thus requiring an +# explicit @brief command for a brief description. + +JAVADOC_AUTOBRIEF = YES + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the DETAILS_AT_TOP tag is set to YES then Doxygen +# will output the detailed description near the top, like JavaDoc. +# If set to NO, the detailed description appears after the member +# documentation. + +DETAILS_AT_TOP = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = YES + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = YES + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for Java. +# For instance, namespaces will be presented as packages, qualified scopes +# will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to +# include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = YES + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = YES + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from the +# version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = YES + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = ../ + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py + +FILE_PATTERNS = + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# is applied to all files. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = YES + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = YES + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES (the default) +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = YES + +# If the REFERENCES_RELATION tag is set to YES (the default) +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = YES + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. Otherwise they will link to the documentstion. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = NO + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = YES + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# This tag can be used to set the number of enum values (range [1..20]) +# that doxygen will group on one line in the generated HTML documentation. + +ENUM_VALUES_PER_LINE = 4 + +# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be +# generated containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, +# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are +# probably better off using the HTML help feature. + +GENERATE_TREEVIEW = YES + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4wide + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = NO + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = NO + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. This is useful +# if you want to understand what is going on. On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse +# the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more +# powerful graphs. + +CLASS_DIAGRAMS = YES + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = YES + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = YES + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will +# generate a call dependency graph for every global function or class method. +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable call graphs for selected +# functions only using the \callgraph command. + +CALL_GRAPH = YES + +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will +# generate a caller dependency graph for every global function or class method. +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable caller graphs for selected +# functions only using the \callergraph command. + +CALLER_GRAPH = YES + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are png, jpg, or gif +# If left blank png will be used. + +DOT_IMAGE_FORMAT = png + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width +# (in pixels) of the graphs generated by dot. If a graph becomes larger than +# this value, doxygen will try to truncate the graph, so that it fits within +# the specified constraint. Beware that most browsers cannot cope with very +# large images. + +MAX_DOT_GRAPH_WIDTH = 1024 + +# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height +# (in pixels) of the graphs generated by dot. If a graph becomes larger than +# this value, doxygen will try to truncate the graph, so that it fits within +# the specified constraint. Beware that most browsers cannot cope with very +# large images. + +MAX_DOT_GRAPH_HEIGHT = 1024 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that a graph may be further truncated if the graph's +# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH +# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), +# the graph is not depth-constrained. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, which results in a white background. +# Warning: Depending on the platform used, enabling this option may lead to +# badly anti-aliased labels on the edges of a graph (i.e. they become hard to +# read). + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- + +# The SEARCHENGINE tag specifies whether or not a search engine should be +# used. If set to NO the values of all tags below this one will be ignored. + +SEARCHENGINE = YES diff -Nru postgis-1.5.3/raster/install-sh postgis-2.0.1/raster/install-sh --- postgis-1.5.3/raster/install-sh 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/install-sh 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,325 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2004-04-01.17 + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. It can only install one file at a time, a restriction +# shared with many OS's install programs. + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" + +# put in absolute paths if you don't have them in your path; or use env. vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +transformbasename= +transform_arg= +instcmd="$mvprog" +chmodcmd="$chmodprog 0755" +chowncmd= +chgrpcmd= +stripcmd= +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src= +dst= +dir_arg= + +usage="Usage: $0 [OPTION]... SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 -d DIRECTORIES... + +In the first form, install SRCFILE to DSTFILE, removing SRCFILE by default. +In the second, create the directory path DIR. + +Options: +-b=TRANSFORMBASENAME +-c copy source (using $cpprog) instead of moving (using $mvprog). +-d create directories instead of installing files. +-g GROUP $chgrp installed files to GROUP. +-m MODE $chmod installed files to MODE. +-o USER $chown installed files to USER. +-s strip installed files (using $stripprog). +-t=TRANSFORM +--help display this help and exit. +--version display version info and exit. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG +" + +while test -n "$1"; do + case $1 in + -b=*) transformbasename=`echo $1 | sed 's/-b=//'` + shift + continue;; + + -c) instcmd=$cpprog + shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + --help) echo "$usage"; exit 0;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -s) stripcmd=$stripprog + shift + continue;; + + -t=*) transformarg=`echo $1 | sed 's/-t=//'` + shift + continue;; + + --version) echo "$0 $scriptversion"; exit 0;; + + *) # When -d is used, all remaining arguments are directories to create. + test -n "$dir_arg" && break + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dstarg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dstarg" + shift # fnord + fi + shift # arg + dstarg=$arg + done + break;; + esac +done + +if test -z "$1"; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call `install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +for src +do + # Protect names starting with `-'. + case $src in + -*) src=./$src ;; + esac + + if test -n "$dir_arg"; then + dst=$src + src= + + if test -d "$dst"; then + instcmd=: + chmodcmd= + else + instcmd=$mkdirprog + fi + else + # Waiting for this to be detected by the "$instcmd $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dstarg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + + dst=$dstarg + # Protect names starting with `-'. + case $dst in + -*) dst=./$dst ;; + esac + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + dst=$dst/`basename "$src"` + fi + fi + + # This sed command emulates the dirname command. + dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` + + # Make sure that the destination directory exists. + + # Skip lots of stat calls in the usual case. + if test ! -d "$dstdir"; then + defaultIFS=' + ' + IFS="${IFS-$defaultIFS}" + + oIFS=$IFS + # Some sh's can't handle IFS=/ for some reason. + IFS='%' + set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` + IFS=$oIFS + + pathcomp= + + while test $# -ne 0 ; do + pathcomp=$pathcomp$1 + shift + if test ! -d "$pathcomp"; then + $mkdirprog "$pathcomp" || lasterr=$? + # mkdir can fail with a `File exist' error in case several + # install-sh are creating the directory concurrently. This + # is OK. + test ! -d "$pathcomp" && { (exit ${lasterr-1}); exit; } + fi + pathcomp=$pathcomp/ + done + fi + + if test -n "$dir_arg"; then + $doit $instcmd "$dst" \ + && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ + && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ + && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ + && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } + + else + # If we're going to rename the final executable, determine the name now. + if test -z "$transformarg"; then + dstfile=`basename "$dst"` + else + dstfile=`basename "$dst" $transformbasename \ + | sed $transformarg`$transformbasename + fi + + # don't allow the sed command to completely eliminate the filename. + test -z "$dstfile" && dstfile=`basename "$dst"` + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0 + trap '(exit $?); exit' 1 2 13 15 + + # Move or copy the file name to the temp name + $doit $instcmd "$src" "$dsttmp" && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $instcmd $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ + && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ + && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ + && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && + + # Now rename the file to the real destination. + { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ + || { + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + if test -f "$dstdir/$dstfile"; then + $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ + || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ + || { + echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 + (exit 1); exit + } + else + : + fi + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" + } + } + fi || { (exit 1); exit; } +done + +# The final little trick to "correctly" pass the exit status to the exit trap. +{ + (exit 0); exit +} + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff -Nru postgis-1.5.3/raster/loader/Makefile.in postgis-2.0.1/raster/loader/Makefile.in --- postgis-1.5.3/raster/loader/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/loader/Makefile.in 2012-03-21 21:36:59.000000000 +0000 @@ -0,0 +1,94 @@ +############################################################################# +# $Id$ +# +# Copyright (c) 2011 Regents of the University of California +# +# Copyright (c) 2009 Sandro Santilli +# +# This is free software; you can redistribute and/or modify it under +# the terms of the GNU General Public Licence. See the COPYING file. +# +############################################################################# + +# Set CFLAGS afer PGXS, otherwise it will get overwritten with the PGXS +# version which is not what we want. +CC=@CC@ +CFLAGS=@CFLAGS@ @PICFLAGS@ @WARNFLAGS@ @PROJ_CPPFLAGS@ +top_builddir = @top_builddir@ +SHELL = @SHELL@ +INSTALL = $(SHELL) ../../install-sh +LIBTOOL = @LIBTOOL@ + +# Filenames with extension as determined by the OS +RASTER2PGSQL=raster2pgsql@EXESUFFIX@ + +# PostgreSQL executable directory +PGSQL_BINDIR=@PGSQL_BINDIR@ + +RT_CORE=../rt_core + +LIBLWGEOM_LDFLAGS=../../liblwgeom/liblwgeom.la +LIBLWGEOM_CFLAGS=-I../../liblwgeom +LIBGDAL_CFLAGS=@LIBGDAL_CFLAGS@ +LIBGDAL_LDFLAGS=@LIBGDAL_LDFLAGS@ +PROJ_CFLAGS=@PROJ_CPPFLAGS@ +GEOS_CFLAGS=@GEOS_CPPFLAGS@ +GEOS_LDFLAGS=@GEOS_LDFLAGS@ -lgeos_c + +RTCORE_CFLAGS=-I$(RT_CORE) +RTCORE_LDFLAGS=$(RT_CORE)/librtcore.a + +# GetText includes and libraries +GETTEXT_CFLAGS = @GETTEXT_CFLAGS@ +GETTEXT_LDFLAGS = @GETTEXT_LDFLAGS@ @LIBINTL@ + +# iconv flags +ICONV_LDFLAGS=@ICONV_LDFLAGS@ +ICONV_CFLAGS=@ICONV_CFLAGS@ + +CFLAGS = \ + @CFLAGS@ @PICFLAGS@ @WARNFLAGS@ \ + $(RTCORE_CFLAGS) \ + $(LIBLWGEOM_CFLAGS) \ + $(PROJ_CFLAGS) \ + $(LIBGDAL_CFLAGS) \ + $(GEOS_CFLAGS) \ + $(GETTEXT_CFLAGS) \ + $(ICONV_CFLAGS) + +LDFLAGS = \ + @LDFLAGS@ \ + $(RTCORE_LDFLAGS) \ + $(LIBLWGEOM_LDFLAGS) \ + $(LIBGDAL_LDFLAGS) \ + $(GEOS_LDFLAGS) \ + $(GETTEXT_LDFLAGS) \ + $(ICONV_LDFLAGS) \ + -lm + +all: $(RASTER2PGSQL) + +raster2pgsql.o: raster2pgsql.c + $(CC) $(CFLAGS) -c $< + +$(RASTER2PGSQL): raster2pgsql.o $(RT_CORE)/librtcore.a + $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@ + +installdir: + @mkdir -p $(DESTDIR)$(PGSQL_BINDIR) + +install: installdir + $(LIBTOOL) --mode=install $(INSTALL) $(RASTER2PGSQL) "$(DESTDIR)$(PGSQL_BINDIR)/$(RASTER2PGSQL)" + +uninstall: + $(LIBTOOL) --mode=uninstall $(RM) "$(DESTDIR)$(PGSQL_BINDIR)/$(RASTER2PGSQL)" + +$(RT_CORE)/librtcore.a: + $(MAKE) -C ../rt_core + +clean: + rm -rf .libs + rm -f *.o $(RASTER2PGSQL) + +distclean: clean + rm -f Makefile diff -Nru postgis-1.5.3/raster/loader/raster2pgsql.c postgis-2.0.1/raster/loader/raster2pgsql.c --- postgis-1.5.3/raster/loader/raster2pgsql.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/loader/raster2pgsql.c 2012-05-23 22:51:27.000000000 +0000 @@ -0,0 +1,2783 @@ +/* + * $Id: raster2pgsql.c 9815 2012-05-23 22:51:27Z dustymugs $ + * + * PostGIS raster loader + * http://trac.osgeo.org/postgis/wiki/WKTRaster + * + * Copyright 2001-2003 Refractions Research Inc. + * Copyright 2009 Paul Ramsey + * Copyright 2009 Mark Cave-Ayland + * Copyright (C) 2011 Regents of the University of California + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include "raster2pgsql.h" +#include "gdal_vrt.h" +#include "ogr_srs_api.h" +#include + +/* This is needed by liblwgeom */ +void lwgeom_init_allocators(void) { + lwgeom_install_default_allocators(); +} + +static void +loader_rt_error_handler(const char *fmt, va_list ap) { + static const char *label = "ERROR: "; + char newfmt[1024] = {0}; + snprintf(newfmt, 1024, "%s%s\n", label, fmt); + newfmt[1023] = '\0'; + vfprintf(stderr, newfmt, ap); + va_end(ap); +} + +static void +loader_rt_warning_handler(const char *fmt, va_list ap) { + static const char *label = "WARNING: "; + char newfmt[1024] = {0}; + snprintf(newfmt, 1024, "%s%s\n", label, fmt); + newfmt[1023] = '\0'; + vfprintf(stderr, newfmt, ap); + va_end(ap); +} + +static void +loader_rt_info_handler(const char *fmt, va_list ap) { + static const char *label = "INFO: "; + char newfmt[1024] = {0}; + snprintf(newfmt, 1024, "%s%s\n", label, fmt); + newfmt[1023] = '\0'; + vfprintf(stderr, newfmt, ap); + va_end(ap); +} + +void rt_init_allocators(void) { + rt_set_handlers( + default_rt_allocator, + default_rt_reallocator, + default_rt_deallocator, + loader_rt_error_handler, + loader_rt_info_handler, + loader_rt_warning_handler + ); +} + +static void +raster_destroy(rt_raster raster) { + uint16_t i; + uint16_t nbands = rt_raster_get_num_bands(raster); + for (i = 0; i < nbands; i++) { + rt_band band = rt_raster_get_band(raster, i); + if (!rt_band_is_offline(band)) { + void* mem = rt_band_get_data(band); + if (mem) rtdealloc(mem); + } + rt_band_destroy(band); + } + rt_raster_destroy(raster); +} + +static int +array_range(int min, int max, int step, int **range, int *len) { + int i = 0; + int j = 0; + + step = abs(step); + *len = (abs(max - min) + 1 + (step / 2)) / step; + *range = rtalloc(sizeof(int) * *len); + + if (min < max) { + for (i = min, j = 0; i <= max; i += step, j++) + (*range)[j] = i; + } + else if (max < min) { + if (step > 0) step *= -1; + for (i = min, j = 0; i >= max; i += step, j++) + (*range)[j] = i; + } + else if (min == max) { + (*range)[0] = min; + } + else { + *len = 0; + *range = NULL; + return 0; + } + + return 1; +} + +/* string replacement function taken from + * http://ubuntuforums.org/showthread.php?s=aa6f015109fd7e4c7e30d2fd8b717497&t=141670&page=3 + */ +/* --------------------------------------------------------------------------- + Name : replace - Search & replace a substring by another one. + Creation : Thierry Husson, Sept 2010 + Parameters : + str : Big string where we search + oldstr : Substring we are looking for + newstr : Substring we want to replace with + count : Optional pointer to int (input / output value). NULL to ignore. + Input: Maximum replacements to be done. NULL or < 1 to do all. + Output: Number of replacements done or -1 if not enough memory. + Returns : Pointer to the new string or NULL if error. + Notes : + - Case sensitive - Otherwise, replace functions "strstr" by "strcasestr" + - Always allocates memory for the result. +--------------------------------------------------------------------------- */ +static char* +strreplace( + const char *str, + const char *oldstr, const char *newstr, + int *count +) { + const char *tmp = str; + char *result; + int found = 0; + int length, reslen; + int oldlen = strlen(oldstr); + int newlen = strlen(newstr); + int limit = (count != NULL && *count > 0) ? *count : -1; + + tmp = str; + while ((tmp = strstr(tmp, oldstr)) != NULL && found != limit) + found++, tmp += oldlen; + + length = strlen(str) + found * (newlen - oldlen); + if ((result = (char *) rtalloc(length + 1)) == NULL) { + rterror(_("strreplace: Not enough memory")); + found = -1; + } + else { + tmp = str; + limit = found; /* Countdown */ + reslen = 0; /* length of current result */ + + /* Replace each old string found with new string */ + while ((limit-- > 0) && (tmp = strstr(tmp, oldstr)) != NULL) { + length = (tmp - str); /* Number of chars to keep intouched */ + strncpy(result + reslen, str, length); /* Original part keeped */ + strcpy(result + (reslen += length), newstr); /* Insert new string */ + + reslen += newlen; + tmp += oldlen; + str = tmp; + } + strcpy(result + reslen, str); /* Copies last part and ending null char */ + } + + if (count != NULL) *count = found; + return result; +} + +static char * +strtolower(char * str) { + int j; + + for (j = strlen(str) - 1; j >= 0; j--) + str[j] = tolower(str[j]); + + return str; +} + +/* split a string based on a delimiter */ +static char** +strsplit(const char *str, const char *delimiter, int *n) { + char *tmp = NULL; + char **rtn = NULL; + char *token = NULL; + + *n = 0; + if (!str) + return NULL; + + /* copy str to tmp as strtok will mangle the string */ + tmp = rtalloc(sizeof(char) * (strlen(str) + 1)); + if (NULL == tmp) { + rterror(_("strsplit: Not enough memory")); + return NULL; + } + strcpy(tmp, str); + + if (!strlen(tmp) || !delimiter || !strlen(delimiter)) { + *n = 1; + rtn = (char **) rtalloc(*n * sizeof(char *)); + if (NULL == rtn) { + rterror(_("strsplit: Not enough memory")); + return NULL; + } + rtn[0] = (char *) rtalloc(sizeof(char) * (strlen(tmp) + 1)); + if (NULL == rtn[0]) { + rterror(_("strsplit: Not enough memory")); + return NULL; + } + strcpy(rtn[0], tmp); + rtdealloc(tmp); + return rtn; + } + + token = strtok(tmp, delimiter); + while (token != NULL) { + if (*n < 1) { + rtn = (char **) rtalloc(sizeof(char *)); + } + else { + rtn = (char **) rtrealloc(rtn, (*n + 1) * sizeof(char *)); + } + if (NULL == rtn) { + rterror(_("strsplit: Not enough memory")); + return NULL; + } + + rtn[*n] = NULL; + rtn[*n] = (char *) rtalloc(sizeof(char) * (strlen(token) + 1)); + if (NULL == rtn[*n]) { + rterror(_("strsplit: Not enough memory")); + return NULL; + } + + strcpy(rtn[*n], token); + *n = *n + 1; + + token = strtok(NULL, delimiter); + } + + rtdealloc(tmp); + return rtn; +} + +static char* +trim(const char *input) { + char *rtn; + char *ptr; + uint32_t offset = 0; + + if (!input) + return NULL; + else if (!*input) + return (char *) input; + + /* trim left */ + while (isspace(*input)) + input++; + + /* trim right */ + ptr = ((char *) input) + strlen(input); + while (isspace(*--ptr)) + offset++; + + rtn = rtalloc(sizeof(char) * (strlen(input) - offset + 1)); + if (NULL == rtn) { + rterror(_("trim: Not enough memory")); + return NULL; + } + strncpy(rtn, input, strlen(input) - offset); + rtn[strlen(input) - offset] = '\0'; + + return rtn; +} + +static char* +chartrim(const char *input, char *remove) { + char *rtn = NULL; + char *ptr = NULL; + uint32_t offset = 0; + + if (!input) + return NULL; + else if (!*input) + return (char *) input; + + /* trim left */ + while (strchr(remove, *input) != NULL) + input++; + + /* trim right */ + ptr = ((char *) input) + strlen(input); + while (strchr(remove, *--ptr) != NULL) + offset++; + + rtn = rtalloc(sizeof(char) * (strlen(input) - offset + 1)); + if (NULL == rtn) { + rterror(_("chartrim: Not enough memory")); + return NULL; + } + strncpy(rtn, input, strlen(input) - offset); + rtn[strlen(input) - offset] = '\0'; + + return rtn; +} + +static void +usage() { + printf(_("RELEASE: %s GDAL_VERSION=%d (r%d)\n"), POSTGIS_LIB_VERSION, POSTGIS_GDAL_VERSION, POSTGIS_SVN_REVISION); + printf(_( + "USAGE: raster2pgsql [] [ [ ...]] [[.]
]\n" + " Multiple rasters can also be specified using wildcards (*,?).\n" + "\n" + "OPTIONS:\n" + )); + printf(_( + " -s Set the raster's SRID. Defaults to %d. If SRID not\n" + " provided or is %d, raster's metadata will be checked to\n" + " determine an appropriate SRID.\n" + ), SRID_UNKNOWN, SRID_UNKNOWN); + printf(_( + " -b Index (1-based) of band to extract from raster. For more\n" + " than one band index, separate with comma (,). Ranges can be\n" + " defined by separating with dash (-). If unspecified, all bands\n" + " of raster will be extracted.\n" + )); + printf(_( + " -t Cut raster into tiles to be inserted one per\n" + " table row. is expressed as WIDTHxHEIGHT.\n" + )); + printf(_( + " -R Register the raster as an out-of-db (filesystem) raster. Provided\n" + " raster should have absolute path to the file\n" + )); + printf(_( + " (-d|a|c|p) These are mutually exclusive options:\n" + " -d Drops the table, then recreates it and populates\n" + " it with current raster data.\n" + " -a Appends raster into current table, must be\n" + " exactly the same table schema.\n" + " -c Creates a new table and populates it, this is the\n" + " default if you do not specify any options.\n" + " -p Prepare mode, only creates the table.\n" + )); + printf(_( + " -f Specify the name of the raster column\n" + )); + printf(_( + " -F Add a column with the filename of the raster.\n" + )); + printf(_( + " -l Create overview of the raster. For more than\n" + " one factor, separate with comma(,). Overview table name follows\n" + " the pattern o__
. Created overview is\n" + " stored in the database and is not affected by -R.\n" + )); + printf(_( + " -q Wrap PostgreSQL identifiers in quotes.\n" + )); + printf(_( + " -I Create a GIST spatial index on the raster column. The ANALYZE\n" + " command will automatically be issued for the created index.\n" + )); + printf(_( + " -M Run VACUUM ANALYZE on the table of the raster column. Most\n" + " useful when appending raster to existing table with -a.\n" + )); + printf(_( + " -C Set the standard set of constraints on the raster\n" + " column after the rasters are loaded. Some constraints may fail\n" + " if one or more rasters violate the constraint.\n" + " -x Disable setting the max extent constraint. Only applied if\n" + " -C flag is also used.\n" + " -r Set the regular blocking constraint. Only applied if -C flag is\n" + " also used.\n" + )); + printf(_( + " -T Specify the tablespace for the new table.\n" + " Note that indices (including the primary key) will still use\n" + " the default tablespace unless the -X flag is also used.\n" + )); + printf(_( + " -X Specify the tablespace for the table's new index.\n" + " This applies to the primary key and the spatial index if\n" + " the -I flag is used.\n" + )); + printf(_( + " -N NODATA value to use on bands without a NODATA value.\n" + )); + printf(_( + " -E Control endianness of generated binary output of\n" + " raster. Use 0 for XDR and 1 for NDR (default). Only NDR\n" + " is supported at this time.\n" + )); + printf(_( + " -V Specify version of output format. Default\n" + " is 0. Only 0 is supported at this time.\n" + )); + printf(_( + " -e Execute each statement individually, do not use a transaction.\n" + )); + printf(_( + " -Y Use COPY statements instead of INSERT statements.\n" + )); + printf(_( + " -G Print the supported GDAL raster formats.\n" + )); + printf(_( + " -? Display this help screen.\n" + )); +} + +static void +init_rastinfo(RASTERINFO *info) { + info->srid = SRID_UNKNOWN; + info->srs = NULL; + memset(info->dim, 0, sizeof(double) * 2); + info->nband_count = 0; + info->nband = NULL; + info->gdalbandtype = NULL; + info->bandtype = NULL; + info->hasnodata = NULL; + info->nodataval = NULL; + memset(info->gt, 0, sizeof(double) * 6); + memset(info->tile_size, 0, sizeof(int) * 2); +} + +static void +rtdealloc_rastinfo(RASTERINFO *info) { + if (info->srs != NULL) + rtdealloc(info->srs); + if (info->nband_count > 0 && info->nband != NULL) + rtdealloc(info->nband); + if (info->gdalbandtype != NULL) + rtdealloc(info->gdalbandtype); + if (info->bandtype != NULL) + rtdealloc(info->bandtype); + if (info->hasnodata != NULL) + rtdealloc(info->hasnodata); + if (info->nodataval != NULL) + rtdealloc(info->nodataval); +} + +static int +copy_rastinfo(RASTERINFO *dst, RASTERINFO *src) { + if (src->srs != NULL) { + dst->srs = rtalloc(sizeof(char) * (strlen(src->srs) + 1)); + if (dst->srs == NULL) { + rterror(_("copy_rastinfo: Not enough memory")); + return 0; + } + strcpy(dst->srs, src->srs); + } + memcpy(dst->dim, src->dim, sizeof(uint32_t) * 2); + dst->nband_count = src->nband_count; + if (src->nband_count && src->nband != NULL) { + dst->nband = rtalloc(sizeof(int) * src->nband_count); + if (dst->nband == NULL) { + rterror(_("copy_rastinfo: Not enough memory")); + return 0; + } + memcpy(dst->nband, src->nband, sizeof(int) * src->nband_count); + } + if (src->gdalbandtype != NULL) { + dst->gdalbandtype = rtalloc(sizeof(GDALDataType) * src->nband_count); + if (dst->gdalbandtype == NULL) { + rterror(_("copy_rastinfo: Not enough memory")); + return 0; + } + memcpy(dst->gdalbandtype, src->gdalbandtype, sizeof(GDALDataType) * src->nband_count); + } + if (src->bandtype != NULL) { + dst->bandtype = rtalloc(sizeof(rt_pixtype) * src->nband_count); + if (dst->bandtype == NULL) { + rterror(_("copy_rastinfo: Not enough memory")); + return 0; + } + memcpy(dst->bandtype, src->bandtype, sizeof(rt_pixtype) * src->nband_count); + } + if (src->hasnodata != NULL) { + dst->hasnodata = rtalloc(sizeof(int) * src->nband_count); + if (dst->hasnodata == NULL) { + rterror(_("copy_rastinfo: Not enough memory")); + return 0; + } + memcpy(dst->hasnodata, src->hasnodata, sizeof(int) * src->nband_count); + } + if (src->nodataval != NULL) { + dst->nodataval = rtalloc(sizeof(double) * src->nband_count); + if (dst->nodataval == NULL) { + rterror(_("copy_rastinfo: Not enough memory")); + return 0; + } + memcpy(dst->nodataval, src->nodataval, sizeof(double) * src->nband_count); + } + memcpy(dst->gt, src->gt, sizeof(double) * 6); + memcpy(dst->tile_size, src->tile_size, sizeof(int) * 2); + + return 1; +} + +static void +diff_rastinfo(RASTERINFO *x, RASTERINFO *ref) { + static uint8_t msg[6] = {0}; + int i = 0; + + /* # of bands */ + if ( + !msg[0] && + x->nband_count != ref->nband_count + ) { + rtwarn(_("Different number of bands found in the set of rasters being converted to PostGIS raster")); + msg[0]++; + } + + /* pixel types */ + if (!msg[1]) { + for (i = 0; i < ref->nband_count; i++) { + if (x->bandtype[i] != ref->bandtype[i]) { + rtwarn(_("Different pixel types found for band %d in the set of rasters being converted to PostGIS raster"), ref->nband[i]); + msg[1]++; + } + } + } + + /* hasnodata */ + if (!msg[2]) { + for (i = 0; i < ref->nband_count; i++) { + if (x->hasnodata[i] != ref->hasnodata[i]) { + rtwarn(_("Different hasnodata flags found for band %d in the set of rasters being converted to PostGIS raster"), ref->nband[i]); + msg[2]++; + } + } + } + + /* nodataval */ + if (!msg[3]) { + for (i = 0; i < ref->nband_count; i++) { + if (!x->hasnodata[i] && !ref->hasnodata[i]) continue; + if (FLT_NEQ(x->hasnodata[i], ref->hasnodata[i])) { + rtwarn(_("Different NODATA values found for band %d in the set of rasters being converted to PostGIS raster"), ref->nband[i]); + msg[3]++; + } + } + } + + /* alignment */ + if (!msg[4]) { + rt_raster rx = NULL; + rt_raster rref = NULL; + int err; + int aligned; + + if ( + (rx = rt_raster_new(1, 1)) == NULL || + (rref = rt_raster_new(1, 1)) == NULL + ) { + rterror(_("diff_rastinfo: Could not allocate memory for raster alignment test")); + if (rx != NULL) rt_raster_destroy(rx); + if (rref != NULL) rt_raster_destroy(rref); + return; + } + + rt_raster_set_geotransform_matrix(rx, x->gt); + rt_raster_set_geotransform_matrix(rref, ref->gt); + + err = rt_raster_same_alignment(rx, rref, &aligned); + rt_raster_destroy(rx); + rt_raster_destroy(rref); + if (!err) { + rterror(_("diff_rastinfo: Could not run raster alignment test")); + return; + } + + if (!aligned) { + rtwarn(_("Raster with different alignment found in the set of rasters being converted to PostGIS raster")); + msg[4]++; + } + } + + /* tile size */ + if (!msg[5]) { + for (i = 0; i < 2; i++) { + if (FLT_NEQ(x->tile_size[i], ref->tile_size[i])) { + rtwarn(_("Different tile sizes found in the set of rasters being converted to PostGIS raster")); + msg[5]++; + break; + } + } + } +} + +static void +init_config(RTLOADERCFG *config) { + config->rt_file_count = 0; + config->rt_file = NULL; + config->rt_filename = NULL; + config->schema = NULL; + config->table = NULL; + config->raster_column = NULL; + config->file_column = 0; + config->overview_count = 0; + config->overview = NULL; + config->overview_table = NULL; + config->quoteident = 0; + config->srid = SRID_UNKNOWN; + config->nband = NULL; + config->nband_count = 0; + memset(config->tile_size, 0, sizeof(int) * 2); + config->outdb = 0; + config->opt = 'c'; + config->idx = 0; + config->maintenance = 0; + config->constraints = 0; + config->max_extent = 1; + config->regular_blocking = 0; + config->tablespace = NULL; + config->idx_tablespace = NULL; + config->hasnodata = 0; + config->nodataval = 0; + config->endian = 1; + config->version = 0; + config->transaction = 1; + config->copy_statements = 0; +} + +static void +rtdealloc_config(RTLOADERCFG *config) { + int i = 0; + if (config->rt_file_count) { + for (i = config->rt_file_count - 1; i >= 0; i--) { + rtdealloc(config->rt_file[i]); + if (config->rt_filename) + rtdealloc(config->rt_filename[i]); + } + rtdealloc(config->rt_file); + if (config->rt_filename) + rtdealloc(config->rt_filename); + } + if (config->schema != NULL) + rtdealloc(config->schema); + if (config->table != NULL) + rtdealloc(config->table); + if (config->raster_column != NULL) + rtdealloc(config->raster_column); + if (config->overview_count > 0) { + if (config->overview != NULL) + rtdealloc(config->overview); + if (config->overview_table != NULL) { + for (i = config->overview_count - 1; i >= 0; i--) + rtdealloc(config->overview_table[i]); + rtdealloc(config->overview_table); + } + } + if (config->nband_count > 0 && config->nband != NULL) + rtdealloc(config->nband); + if (config->tablespace != NULL) + rtdealloc(config->tablespace); + if (config->idx_tablespace != NULL) + rtdealloc(config->idx_tablespace); + + rtdealloc(config); +} + +static void +init_stringbuffer(STRINGBUFFER *buffer) { + buffer->line = NULL; + buffer->length = 0; +} + +static void +rtdealloc_stringbuffer(STRINGBUFFER *buffer, int freebuffer) { + if (buffer->length) { + uint32_t i = 0; + for (i = 0; i < buffer->length; i++) { + if (buffer->line[i] != NULL) + rtdealloc(buffer->line[i]); + } + rtdealloc(buffer->line); + } + buffer->line = NULL; + buffer->length = 0; + + if (freebuffer) + rtdealloc(buffer); +} + +static void +dump_stringbuffer(STRINGBUFFER *buffer) { + int i = 0; + + for (i = 0; i < buffer->length; i++) { + printf("%s\n", buffer->line[i]); + } +} + +static void +flush_stringbuffer(STRINGBUFFER *buffer) { + dump_stringbuffer(buffer); + rtdealloc_stringbuffer(buffer, 0); +} + +static int +append_stringbuffer(STRINGBUFFER *buffer, const char *str) { + buffer->length++; + + buffer->line = rtrealloc(buffer->line, sizeof(char *) * buffer->length); + if (buffer->line == NULL) { + rterror(_("append_stringbuffer: Could not allocate memory for appending string to buffer")); + return 0; + } + + buffer->line[buffer->length - 1] = NULL; + buffer->line[buffer->length - 1] = rtalloc(sizeof(char) * (strlen(str) + 1)); + if (buffer->line[buffer->length - 1] == NULL) { + rterror(_("append_stringbuffer: Could not allocate memory for appending string to buffer")); + return 0; + } + strcpy(buffer->line[buffer->length - 1], str); + + return 1; +} + +static int +append_sql_to_buffer(STRINGBUFFER *buffer, const char *str) { + if (buffer->length > 9) + flush_stringbuffer(buffer); + + return append_stringbuffer(buffer, str); +} + +static int +insert_records( + const char *schema, const char *table, const char *column, + const char *filename, int copy_statements, + STRINGBUFFER *tileset, STRINGBUFFER *buffer +) { + char *fn = NULL; + uint32_t len = 0; + char *sql = NULL; + uint32_t x = 0; + + assert(table != NULL); + assert(column != NULL); + + /* COPY statements */ + if (copy_statements) { + + /* escape tabs in filename */ + if (filename != NULL) + fn = strreplace(filename, "\t", "\\t", NULL); + + /* rows */ + for (x = 0; x < tileset->length; x++) { + len = strlen(tileset->line[x]) + 1; + + if (filename != NULL) + len += strlen(fn) + 1; + + sql = rtalloc(sizeof(char) * len); + if (sql == NULL) { + rterror(_("insert_records: Could not allocate memory for COPY statement")); + return 0; + } + sprintf(sql, "%s%s%s", + tileset->line[x], + (filename != NULL ? "\t" : ""), + (filename != NULL ? fn : "") + ); + + append_sql_to_buffer(buffer, sql); + rtdealloc(sql); + sql = NULL; + } + + } + /* INSERT statements */ + else { + len = strlen("INSERT INTO () VALUES (''::raster);") + 1; + if (schema != NULL) + len += strlen(schema); + len += strlen(table); + len += strlen(column); + if (filename != NULL) + len += strlen(",\"filename\""); + + /* escape single-quotes in filename */ + if (filename != NULL) + fn = strreplace(filename, "'", "''", NULL); + + for (x = 0; x < tileset->length; x++) { + int sqllen = len; + + sqllen += strlen(tileset->line[x]); + if (filename != NULL) + sqllen += strlen(",''") + strlen(fn); + + sql = rtalloc(sizeof(char) * sqllen); + if (sql == NULL) { + rterror(_("insert_records: Could not allocate memory for INSERT statement")); + return 0; + } + sprintf(sql, "INSERT INTO %s%s (%s%s) VALUES ('%s'::raster%s%s%s);", + (schema != NULL ? schema : ""), + table, + column, + (filename != NULL ? ",\"filename\"" : ""), + tileset->line[x], + (filename != NULL ? ",'" : ""), + (filename != NULL ? fn : ""), + (filename != NULL ? "'" : "") + ); + + append_sql_to_buffer(buffer, sql); + rtdealloc(sql); + sql = NULL; + } + } + + if (fn != NULL) rtdealloc(fn); + return 1; +} + +static int +drop_table(const char *schema, const char *table, STRINGBUFFER *buffer) { + char *sql = NULL; + uint32_t len = 0; + + len = strlen("DROP TABLE IF EXISTS ;") + 1; + if (schema != NULL) + len += strlen(schema); + len += strlen(table); + + sql = rtalloc(sizeof(char) * len); + if (sql == NULL) { + rterror(_("drop_table: Could not allocate memory for DROP TABLE statement")); + return 0; + } + sprintf(sql, "DROP TABLE IF EXISTS %s%s;", + (schema != NULL ? schema : ""), + table + ); + + append_sql_to_buffer(buffer, sql); + rtdealloc(sql); + + return 1; +} + +static int +create_table( + const char *schema, const char *table, const char *column, + const int file_column, + const char *tablespace, const char *idx_tablespace, + STRINGBUFFER *buffer +) { + char *sql = NULL; + uint32_t len = 0; + + assert(table != NULL); + assert(column != NULL); + + len = strlen("CREATE TABLE (\"rid\" serial PRIMARY KEY, raster);") + 1; + if (schema != NULL) + len += strlen(schema); + len += strlen(table); + len += strlen(column); + if (file_column) + len += strlen(",\"filename\" text"); + if (tablespace != NULL) + len += strlen(" TABLESPACE ") + strlen(tablespace); + if (idx_tablespace != NULL) + len += strlen(" USING INDEX TABLESPACE ") + strlen(idx_tablespace); + + sql = rtalloc(sizeof(char) * len); + if (sql == NULL) { + rterror(_("create_table: Could not allocate memory for CREATE TABLE statement")); + return 0; + } + sprintf(sql, "CREATE TABLE %s%s (\"rid\" serial PRIMARY KEY,%s raster%s)%s%s%s%s;", + (schema != NULL ? schema : ""), + table, + column, + (file_column ? ",\"filename\" text" : ""), + (tablespace != NULL ? " TABLESPACE " : ""), + (tablespace != NULL ? tablespace : ""), + (idx_tablespace != NULL ? " USING INDEX TABLESPACE " : ""), + (idx_tablespace != NULL ? idx_tablespace : "") + ); + + append_sql_to_buffer(buffer, sql); + rtdealloc(sql); + + return 1; +} + +static int +copy_from( + const char *schema, const char *table, const char *column, + const char *filename, + STRINGBUFFER *buffer +) { + char *sql = NULL; + uint32_t len = 0; + + assert(table != NULL); + assert(column != NULL); + + len = strlen("COPY () FROM stdin;") + 1; + if (schema != NULL) + len += strlen(schema); + len += strlen(table); + len += strlen(column); + if (filename != NULL) + len += strlen(",\"filename\""); + + sql = rtalloc(sizeof(char) * len); + if (sql == NULL) { + rterror(_("copy_from: Could not allocate memory for COPY statement")); + return 0; + } + sprintf(sql, "COPY %s%s (%s%s) FROM stdin;", + (schema != NULL ? schema : ""), + table, + column, + (filename != NULL ? ",\"filename\"" : "") + ); + + append_sql_to_buffer(buffer, sql); + rtdealloc(sql); + sql = NULL; + + return 1; +} + +static int +copy_from_end(STRINGBUFFER *buffer) { + /* end of data */ + append_sql_to_buffer(buffer, "\\."); + + return 1; +} + +static int +create_index( + const char *schema, const char *table, const char *column, + const char *tablespace, + STRINGBUFFER *buffer +) { + char *sql = NULL; + uint32_t len = 0; + char *_table = NULL; + char *_column = NULL; + + assert(table != NULL); + assert(column != NULL); + + _table = chartrim(table, "\""); + _column = chartrim(column, "\""); + + /* create index */ + len = strlen("CREATE INDEX \"__gist\" ON USING gist (st_convexhull());") + 1; + if (schema != NULL) + len += strlen(schema); + len += strlen(_table); + len += strlen(_column); + len += strlen(table); + len += strlen(column); + if (tablespace != NULL) + len += strlen(" TABLESPACE ") + strlen(tablespace); + + sql = rtalloc(sizeof(char) * len); + if (sql == NULL) { + rterror(_("create_index: Could not allocate memory for CREATE INDEX statement")); + rtdealloc(_table); + rtdealloc(_column); + return 0; + } + sprintf(sql, "CREATE INDEX \"%s_%s_gist\" ON %s%s USING gist (st_convexhull(%s))%s%s;", + _table, + _column, + (schema != NULL ? schema : ""), + table, + column, + (tablespace != NULL ? " TABLESPACE " : ""), + (tablespace != NULL ? tablespace : "") + ); + rtdealloc(_table); + rtdealloc(_column); + + append_sql_to_buffer(buffer, sql); + rtdealloc(sql); + + return 1; +} + +static int +analyze_table( + const char *schema, const char *table, + STRINGBUFFER *buffer +) { + char *sql = NULL; + uint32_t len = 0; + + assert(table != NULL); + + len = strlen("ANALYZE ;") + 1; + if (schema != NULL) + len += strlen(schema); + len += strlen(table); + + sql = rtalloc(sizeof(char) * len); + if (sql == NULL) { + rterror(_("analyze_table: Could not allocate memory for ANALYZE TABLE statement")); + return 0; + } + sprintf(sql, "ANALYZE %s%s;", + (schema != NULL ? schema : ""), + table + ); + + append_sql_to_buffer(buffer, sql); + rtdealloc(sql); + + return 1; +} + +static int +vacuum_table( + const char *schema, const char *table, + STRINGBUFFER *buffer +) { + char *sql = NULL; + uint32_t len = 0; + + assert(table != NULL); + + len = strlen("VACUUM ANALYZE ;") + 1; + if (schema != NULL) + len += strlen(schema); + len += strlen(table); + + sql = rtalloc(sizeof(char) * len); + if (sql == NULL) { + rterror(_("vacuum_table: Could not allocate memory for VACUUM statement")); + return 0; + } + sprintf(sql, "VACUUM ANALYZE %s%s;", + (schema != NULL ? schema : ""), + table + ); + + append_sql_to_buffer(buffer, sql); + rtdealloc(sql); + + return 1; +} + +static int +add_raster_constraints( + const char *schema, const char *table, const char *column, + int regular_blocking, int max_extent, + STRINGBUFFER *buffer +) { + char *sql = NULL; + uint32_t len = 0; + + char *_schema = NULL; + char *_table = NULL; + char *_column = NULL; + + assert(table != NULL); + assert(column != NULL); + + if (schema != NULL) { + char *tmp = chartrim(schema, "."); + _schema = chartrim(tmp, "\""); + rtdealloc(tmp); + } + _table = chartrim(table, "\""); + _column = chartrim(column, "\""); + + len = strlen("SELECT AddRasterConstraints('','','',TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,FALSE,TRUE,TRUE,TRUE,TRUE,FALSE);") + 1; + if (_schema != NULL) + len += strlen(_schema); + len += strlen(_table); + len += strlen(_column); + + sql = rtalloc(sizeof(char) * len); + if (sql == NULL) { + rterror(_("add_raster_constraints: Could not allocate memory for AddRasterConstraints statement")); + return 0; + } + sprintf(sql, "SELECT AddRasterConstraints('%s','%s','%s',TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,%s,TRUE,TRUE,TRUE,TRUE,%s);", + (_schema != NULL ? _schema : ""), + _table, + _column, + (regular_blocking ? "TRUE" : "FALSE"), + (max_extent ? "TRUE" : "FALSE") + ); + + if (_schema != NULL) + rtdealloc(_schema); + rtdealloc(_table); + rtdealloc(_column); + + append_sql_to_buffer(buffer, sql); + rtdealloc(sql); + + return 1; +} + +static int +add_overview_constraints( + const char *ovschema, const char *ovtable, const char *ovcolumn, + const char *schema, const char *table, const char *column, + const int factor, + STRINGBUFFER *buffer +) { + char *sql = NULL; + uint32_t len = 0; + + char *_ovschema = NULL; + char *_ovtable = NULL; + char *_ovcolumn = NULL; + + char *_schema = NULL; + char *_table = NULL; + char *_column = NULL; + + assert(ovtable != NULL); + assert(ovcolumn != NULL); + assert(table != NULL); + assert(column != NULL); + assert(factor >= MINOVFACTOR && factor <= MAXOVFACTOR); + + if (ovschema != NULL) { + char *tmp = chartrim(ovschema, "."); + _ovschema = chartrim(tmp, "\""); + rtdealloc(tmp); + } + _ovtable = chartrim(ovtable, "\""); + _ovcolumn = chartrim(ovcolumn, "\""); + + if (schema != NULL) { + char *tmp = chartrim(schema, "."); + _schema = chartrim(tmp, "\""); + rtdealloc(tmp); + } + _table = chartrim(table, "\""); + _column = chartrim(column, "\""); + + len = strlen("SELECT AddOverviewConstraints('','','','','','',);") + 5; + if (_ovschema != NULL) + len += strlen(_ovschema); + len += strlen(_ovtable); + len += strlen(_ovcolumn); + if (_schema != NULL) + len += strlen(_schema); + len += strlen(_table); + len += strlen(_column); + + sql = rtalloc(sizeof(char) * len); + if (sql == NULL) { + rterror(_("add_overview_constraints: Could not allocate memory for AddOverviewConstraints statement")); + return 0; + } + sprintf(sql, "SELECT AddOverviewConstraints('%s','%s','%s','%s','%s','%s',%d);", + (_ovschema != NULL ? _ovschema : ""), + _ovtable, + _ovcolumn, + (_schema != NULL ? _schema : ""), + _table, + _column, + factor + ); + + if (_ovschema != NULL) + rtdealloc(_ovschema); + rtdealloc(_ovtable); + rtdealloc(_ovcolumn); + + if (_schema != NULL) + rtdealloc(_schema); + rtdealloc(_table); + rtdealloc(_column); + + append_sql_to_buffer(buffer, sql); + rtdealloc(sql); + + return 1; +} + +static int +build_overview(int idx, RTLOADERCFG *config, RASTERINFO *info, int ovx, STRINGBUFFER *tileset, STRINGBUFFER *buffer) { + GDALDatasetH hdsSrc; + VRTDatasetH hdsOv; + VRTSourcedRasterBandH hbandOv; + double gtOv[6] = {0.}; + int dimOv[2] = {0}; + + int j = 0; + int factor; + const char *ovtable = NULL; + + VRTDatasetH hdsDst; + VRTSourcedRasterBandH hbandDst; + int tile_size[2] = {0}; + int ntiles[2] = {1, 1}; + int xtile = 0; + int ytile = 0; + double gt[6] = {0.}; + + rt_raster rast = NULL; + char *hex; + uint32_t hexlen = 0; + + hdsSrc = GDALOpenShared(config->rt_file[idx], GA_ReadOnly); + if (hdsSrc == NULL) { + rterror(_("build_overview: Could not open raster: %s"), config->rt_file[idx]); + return 0; + } + + /* working copy of geotransform matrix */ + memcpy(gtOv, info->gt, sizeof(double) * 6); + + if (ovx >= config->overview_count) { + rterror(_("build_overview: Invalid overview index: %d"), ovx); + return 0; + } + factor = config->overview[ovx]; + ovtable = (const char *) config->overview_table[ovx]; + + /* factor must be within valid range */ + if (factor < MINOVFACTOR || factor > MAXOVFACTOR) { + rterror(_("build_overview: Overview factor %d is not between %d and %d"), factor, MINOVFACTOR, MAXOVFACTOR); + return 0; + } + + dimOv[0] = (int) (info->dim[0] + (factor / 2)) / factor; + dimOv[1] = (int) (info->dim[1] + (factor / 2)) / factor; + + /* create VRT dataset */ + hdsOv = VRTCreate(dimOv[0], dimOv[1]); + /* + GDALSetDescription(hdsOv, "/tmp/ov.vrt"); + */ + GDALSetProjection(hdsOv, info->srs); + + /* adjust scale */ + gtOv[1] *= factor; + gtOv[5] *= factor; + + GDALSetGeoTransform(hdsOv, gtOv); + + /* add bands as simple sources */ + for (j = 0; j < info->nband_count; j++) { + GDALAddBand(hdsOv, info->gdalbandtype[j], NULL); + hbandOv = (VRTSourcedRasterBandH) GDALGetRasterBand(hdsOv, j + 1); + + if (info->hasnodata[j]) + GDALSetRasterNoDataValue(hbandOv, info->nodataval[j]); + + VRTAddSimpleSource( + hbandOv, GDALGetRasterBand(hdsSrc, info->nband[j]), + 0, 0, + info->dim[0], info->dim[1], + 0, 0, + dimOv[0], dimOv[1], + "near", VRT_NODATA_UNSET + ); + } + + /* make sure VRT reflects all changes */ + VRTFlushCache(hdsOv); + + /* decide on tile size */ + if (!config->tile_size[0]) + tile_size[0] = dimOv[0]; + else + tile_size[0] = config->tile_size[0]; + if (!config->tile_size[1]) + tile_size[1] = dimOv[1]; + else + tile_size[1] = config->tile_size[1]; + + /* number of tiles */ + if ( + tile_size[0] != dimOv[0] && + tile_size[1] != dimOv[1] + ) { + ntiles[0] = (dimOv[0] + tile_size[0] - 1) / tile_size[0]; + ntiles[1] = (dimOv[1] + tile_size[1] - 1) / tile_size[1]; + } + + /* working copy of geotransform matrix */ + memcpy(gt, gtOv, sizeof(double) * 6); + + /* tile overview */ + /* each tile is a VRT with constraints set for just the data required for the tile */ + for (ytile = 0; ytile < ntiles[1]; ytile++) { + for (xtile = 0; xtile < ntiles[0]; xtile++) { + /* + char fn[100]; + sprintf(fn, "/tmp/ovtile%d.vrt", (ytile * ntiles[0]) + xtile); + */ + + /* compute tile's upper-left corner */ + GDALApplyGeoTransform( + gtOv, + xtile * tile_size[0], ytile * tile_size[1], + &(gt[0]), &(gt[3]) + ); + + /* create VRT dataset */ + hdsDst = VRTCreate(tile_size[0], tile_size[1]); + /* + GDALSetDescription(hdsDst, fn); + */ + GDALSetProjection(hdsDst, info->srs); + GDALSetGeoTransform(hdsDst, gt); + + /* add bands as simple sources */ + for (j = 0; j < info->nband_count; j++) { + GDALAddBand(hdsDst, info->gdalbandtype[j], NULL); + hbandDst = (VRTSourcedRasterBandH) GDALGetRasterBand(hdsDst, j + 1); + + if (info->hasnodata[j]) + GDALSetRasterNoDataValue(hbandDst, info->nodataval[j]); + + VRTAddSimpleSource( + hbandDst, GDALGetRasterBand(hdsOv, j + 1), + xtile * tile_size[0], ytile * tile_size[1], + tile_size[0], tile_size[1], + 0, 0, + tile_size[0], tile_size[1], + "near", VRT_NODATA_UNSET + ); + } + + /* make sure VRT reflects all changes */ + VRTFlushCache(hdsDst); + + /* convert VRT dataset to rt_raster */ + rast = rt_raster_from_gdal_dataset(hdsDst); + if (rast == NULL) { + rterror(_("build_overview: Could not convert VRT dataset to PostGIS raster")); + GDALClose(hdsDst); + return 0; + } + + /* set srid if provided */ + rt_raster_set_srid(rast, info->srid); + + /* convert rt_raster to hexwkb */ + hex = rt_raster_to_hexwkb(rast, &hexlen); + raster_destroy(rast); + + if (hex == NULL) { + rterror(_("build_overview: Could not convert PostGIS raster to hex WKB")); + GDALClose(hdsDst); + return 0; + } + + /* add hexwkb to tileset */ + append_stringbuffer(tileset, hex); + + rtdealloc(hex); + GDALClose(hdsDst); + + /* flush if tileset gets too big */ + if (tileset->length > 10) { + if (!insert_records( + config->schema, ovtable, config->raster_column, + (config->file_column ? config->rt_filename[idx] : NULL), config->copy_statements, + tileset, buffer + )) { + rterror(_("build_overview: Could not convert raster tiles into INSERT or COPY statements")); + GDALClose(hdsSrc); + return 0; + } + + rtdealloc_stringbuffer(tileset, 0); + } + } + } + + GDALClose(hdsOv); + GDALClose(hdsSrc); + return 1; +} + +static int +convert_raster(int idx, RTLOADERCFG *config, RASTERINFO *info, STRINGBUFFER *tileset, STRINGBUFFER *buffer) { + GDALDatasetH hdsSrc; + GDALRasterBandH hbandSrc; + int nband = 0; + int i = 0; + int ntiles[2] = {1, 1}; + int xtile = 0; + int ytile = 0; + double gt[6] = {0.}; + const char* pszProjectionRef = NULL; + + rt_raster rast = NULL; + char *hex; + uint32_t hexlen = 0; + + info->srid = config->srid; + + hdsSrc = GDALOpenShared(config->rt_file[idx], GA_ReadOnly); + if (hdsSrc == NULL) { + rterror(_("convert_raster: Could not open raster: %s"), config->rt_file[idx]); + return 0; + } + + nband = GDALGetRasterCount(hdsSrc); + if (!nband) { + rterror(_("convert_raster: No bands found in raster: %s"), config->rt_file[idx]); + GDALClose(hdsSrc); + return 0; + } + + /* check that bands specified are available */ + for (i = 0; i < config->nband_count; i++) { + if (config->nband[i] > nband) { + rterror(_("convert_raster: Band %d not found in raster: %s"), config->nband[i], config->rt_file[idx]); + GDALClose(hdsSrc); + return 0; + } + } + + /* record srs */ + pszProjectionRef = GDALGetProjectionRef(hdsSrc); + if (pszProjectionRef != NULL && pszProjectionRef[0] != '\0') { + info->srs = rtalloc(sizeof(char) * (strlen(pszProjectionRef) + 1)); + if (info->srs == NULL) { + rterror(_("convert_raster: Could not allocate memory for storing SRS")); + GDALClose(hdsSrc); + return 0; + } + strcpy(info->srs, pszProjectionRef); + + if (info->srid == SRID_UNKNOWN) { + OGRSpatialReferenceH hSRS = OSRNewSpatialReference(NULL); + if (OSRSetFromUserInput(hSRS, pszProjectionRef) == OGRERR_NONE) { + const char* pszAuthorityName = OSRGetAuthorityName(hSRS, NULL); + const char* pszAuthorityCode = OSRGetAuthorityCode(hSRS, NULL); + if ( + pszAuthorityName != NULL && + strcmp(pszAuthorityName, "EPSG") == 0 && + pszAuthorityCode != NULL + ) { + info->srid = atoi(pszAuthorityCode); + } + } + OSRDestroySpatialReference(hSRS); + } + } + + /* record geotransform matrix */ + if (GDALGetGeoTransform(hdsSrc, info->gt) != CE_None) { + rtinfo(_("Using default geotransform matrix (0, 1, 0, 0, 0, -1) for raster: %s"), config->rt_file[idx]); + info->gt[0] = 0; + info->gt[1] = 1; + info->gt[2] = 0; + info->gt[3] = 0; + info->gt[4] = 0; + info->gt[5] = -1; + } + memcpy(gt, info->gt, sizeof(double) * 6); + + /* record # of bands */ + /* user-specified bands */ + if (config->nband_count > 0) { + info->nband_count = config->nband_count; + info->nband = rtalloc(sizeof(int) * info->nband_count); + if (info->nband == NULL) { + rterror(_("convert_raster: Could not allocate memory for storing band indices")); + GDALClose(hdsSrc); + return 0; + } + memcpy(info->nband, config->nband, sizeof(int) * info->nband_count); + } + /* all bands */ + else { + info->nband_count = nband; + info->nband = rtalloc(sizeof(int) * info->nband_count); + if (info->nband == NULL) { + rterror(_("convert_raster: Could not allocate memory for storing band indices")); + GDALClose(hdsSrc); + return 0; + } + for (i = 0; i < info->nband_count; i++) + info->nband[i] = i + 1; + } + + /* initialize parameters dependent on nband */ + info->gdalbandtype = rtalloc(sizeof(GDALDataType) * info->nband_count); + if (info->gdalbandtype == NULL) { + rterror(_("convert_raster: Could not allocate memory for storing GDAL data type")); + GDALClose(hdsSrc); + return 0; + } + info->bandtype = rtalloc(sizeof(rt_pixtype) * info->nband_count); + if (info->bandtype == NULL) { + rterror(_("convert_raster: Could not allocate memory for storing pixel type")); + GDALClose(hdsSrc); + return 0; + } + info->hasnodata = rtalloc(sizeof(int) * info->nband_count); + if (info->hasnodata == NULL) { + rterror(_("convert_raster: Could not allocate memory for storing hasnodata flag")); + GDALClose(hdsSrc); + return 0; + } + info->nodataval = rtalloc(sizeof(double) * info->nband_count); + if (info->nodataval == NULL) { + rterror(_("convert_raster: Could not allocate memory for storing nodata value")); + GDALClose(hdsSrc); + return 0; + } + memset(info->gdalbandtype, GDT_Unknown, sizeof(GDALDataType) * info->nband_count); + memset(info->bandtype, PT_END, sizeof(rt_pixtype) * info->nband_count); + memset(info->hasnodata, 0, sizeof(int) * info->nband_count); + memset(info->nodataval, 0, sizeof(double) * info->nband_count); + + /* dimensions of raster */ + info->dim[0] = GDALGetRasterXSize(hdsSrc); + info->dim[1] = GDALGetRasterYSize(hdsSrc); + + /* decide on tile size */ + if (!config->tile_size[0]) + info->tile_size[0] = info->dim[0]; + else + info->tile_size[0] = config->tile_size[0]; + if (!config->tile_size[1]) + info->tile_size[1] = info->dim[1]; + else + info->tile_size[1] = config->tile_size[1]; + + /* number of tiles */ + if (info->tile_size[0] != info->dim[0]) + ntiles[0] = (info->dim[0] + info->tile_size[0] - 1) / info->tile_size[0]; + if (info->tile_size[1] != info->dim[1]) + ntiles[1] = (info->dim[1] + info->tile_size[1] - 1) / info->tile_size[1]; + + /* go through bands for attributes */ + for (i = 0; i < info->nband_count; i++) { + hbandSrc = GDALGetRasterBand(hdsSrc, info->nband[i]); + + /* datatype */ + info->gdalbandtype[i] = GDALGetRasterDataType(hbandSrc); + + /* complex data type? */ + if (GDALDataTypeIsComplex(info->gdalbandtype[i])) { + rterror(_("convert_raster: The pixel type of band %d is a complex data type. PostGIS raster does not support complex data types"), i + 1); + GDALClose(hdsSrc); + return 0; + } + + /* convert data type to that of postgis raster */ + info->bandtype[i] = rt_util_gdal_datatype_to_pixtype(info->gdalbandtype[i]); + + /* hasnodata and nodataval */ + info->nodataval[i] = GDALGetRasterNoDataValue(hbandSrc, &(info->hasnodata[i])); + if (!info->hasnodata[i]) { + /* does NOT have nodata value, but user-specified */ + if (config->hasnodata) { + info->hasnodata[i] = 1; + info->nodataval[i] = config->nodataval; + } + else + info->nodataval[i] = 0; + } + } + + /* out-db raster */ + if (config->outdb) { + rt_band band = NULL; + + GDALClose(hdsSrc); + + /* each tile is a raster */ + for (ytile = 0; ytile < ntiles[1]; ytile++) { + for (xtile = 0; xtile < ntiles[0]; xtile++) { + + /* compute tile's upper-left corner */ + GDALApplyGeoTransform( + info->gt, + xtile * info->tile_size[0], ytile * info->tile_size[1], + &(gt[0]), &(gt[3]) + ); + + /* create raster object */ + rast = rt_raster_new(info->tile_size[0], info->tile_size[1]); + if (rast == NULL) { + rterror(_("convert_raster: Could not create raster")); + return 0; + } + + /* set raster attributes */ + rt_raster_set_srid(rast, info->srid); + rt_raster_set_geotransform_matrix(rast, gt); + + /* add bands */ + for (i = 0; i < info->nband_count; i++) { + band = rt_band_new_offline( + info->tile_size[0], info->tile_size[1], + info->bandtype[i], + info->hasnodata[i], info->nodataval[i], + info->nband[i] - 1, + config->rt_file[idx] + ); + if (band == NULL) { + rterror(_("convert_raster: Could not create offline band")); + raster_destroy(rast); + return 0; + } + + /* add band to raster */ + if (rt_raster_add_band(rast, band, rt_raster_get_num_bands(rast)) == -1) { + rterror(_("convert_raster: Could not add offlineband to raster")); + rt_band_destroy(band); + raster_destroy(rast); + return 0; + } + } + + /* convert rt_raster to hexwkb */ + hex = rt_raster_to_hexwkb(rast, &hexlen); + raster_destroy(rast); + + if (hex == NULL) { + rterror(_("convert_raster: Could not convert PostGIS raster to hex WKB")); + return 0; + } + + /* add hexwkb to tileset */ + append_stringbuffer(tileset, hex); + + rtdealloc(hex); + + /* flush if tileset gets too big */ + if (tileset->length > 10) { + if (!insert_records( + config->schema, config->table, config->raster_column, + (config->file_column ? config->rt_filename[idx] : NULL), config->copy_statements, + tileset, buffer + )) { + rterror(_("convert_raster: Could not convert raster tiles into INSERT or COPY statements")); + return 0; + } + + rtdealloc_stringbuffer(tileset, 0); + } + } + } + } + /* in-db raster */ + else { + VRTDatasetH hdsDst; + VRTSourcedRasterBandH hbandDst; + + /* each tile is a VRT with constraints set for just the data required for the tile */ + for (ytile = 0; ytile < ntiles[1]; ytile++) { + for (xtile = 0; xtile < ntiles[0]; xtile++) { + /* + char fn[100]; + sprintf(fn, "/tmp/tile%d.vrt", (ytile * ntiles[0]) + xtile); + */ + + /* compute tile's upper-left corner */ + GDALApplyGeoTransform( + info->gt, + xtile * info->tile_size[0], ytile * info->tile_size[1], + &(gt[0]), &(gt[3]) + ); + /* + rtinfo(_("tile (%d, %d) gt = (%f, %f, %f, %f, %f, %f)"), + xtile, ytile, + gt[0], gt[1], gt[2], gt[3], gt[4], gt[5] + ); + */ + + /* create VRT dataset */ + hdsDst = VRTCreate(info->tile_size[0], info->tile_size[1]); + /* + GDALSetDescription(hdsDst, fn); + */ + GDALSetProjection(hdsDst, info->srs); + GDALSetGeoTransform(hdsDst, gt); + + /* add bands as simple sources */ + for (i = 0; i < info->nband_count; i++) { + GDALAddBand(hdsDst, info->gdalbandtype[i], NULL); + hbandDst = (VRTSourcedRasterBandH) GDALGetRasterBand(hdsDst, i + 1); + + if (info->hasnodata[i]) + GDALSetRasterNoDataValue(hbandDst, info->nodataval[i]); + + VRTAddSimpleSource( + hbandDst, GDALGetRasterBand(hdsSrc, info->nband[i]), + xtile * info->tile_size[0], ytile * info->tile_size[1], + info->tile_size[0], info->tile_size[1], + 0, 0, + info->tile_size[0], info->tile_size[1], + "near", VRT_NODATA_UNSET + ); + } + + /* make sure VRT reflects all changes */ + VRTFlushCache(hdsDst); + + /* convert VRT dataset to rt_raster */ + rast = rt_raster_from_gdal_dataset(hdsDst); + if (rast == NULL) { + rterror(_("convert_raster: Could not convert VRT dataset to PostGIS raster")); + GDALClose(hdsDst); + return 0; + } + + /* set srid if provided */ + rt_raster_set_srid(rast, info->srid); + + /* convert rt_raster to hexwkb */ + hex = rt_raster_to_hexwkb(rast, &hexlen); + raster_destroy(rast); + + if (hex == NULL) { + rterror(_("convert_raster: Could not convert PostGIS raster to hex WKB")); + GDALClose(hdsDst); + return 0; + } + + /* add hexwkb to tileset */ + append_stringbuffer(tileset, hex); + + rtdealloc(hex); + GDALClose(hdsDst); + + /* flush if tileset gets too big */ + if (tileset->length > 10) { + if (!insert_records( + config->schema, config->table, config->raster_column, + (config->file_column ? config->rt_filename[idx] : NULL), config->copy_statements, + tileset, buffer + )) { + rterror(_("convert_raster: Could not convert raster tiles into INSERT or COPY statements")); + GDALClose(hdsSrc); + return 0; + } + + rtdealloc_stringbuffer(tileset, 0); + } + } + } + + GDALClose(hdsSrc); + } + + return 1; +} + +static int +process_rasters(RTLOADERCFG *config, STRINGBUFFER *buffer) { + int i = 0; + + assert(config != NULL); + assert(config->table != NULL); + assert(config->raster_column != NULL); + + if (config->transaction) { + if (!append_sql_to_buffer(buffer, "BEGIN;")) { + rterror(_("process_rasters: Could not add BEGIN statement to string buffer")); + return 0; + } + } + + /* drop table */ + if (config->opt == 'd') { + if (!drop_table(config->schema, config->table, buffer)) { + rterror(_("process_rasters: Could not add DROP TABLE statement to string buffer")); + return 0; + } + + if (config->overview_count) { + for (i = 0; i < config->overview_count; i++) { + if (!drop_table(config->schema, config->overview_table[i], buffer)) { + rterror(_("process_rasters: Could not add an overview's DROP TABLE statement to string buffer")); + return 0; + } + } + } + } + + /* create table */ + if (config->opt != 'a') { + if (!create_table( + config->schema, config->table, config->raster_column, + config->file_column, + config->tablespace, config->idx_tablespace, + buffer + )) { + rterror(_("process_rasters: Could not add CREATE TABLE statement to string buffer")); + return 0; + } + + if (config->overview_count) { + for (i = 0; i < config->overview_count; i++) { + if (!create_table( + config->schema, config->overview_table[i], config->raster_column, + config->file_column, + config->tablespace, config->idx_tablespace, + buffer + )) { + rterror(_("process_rasters: Could not add an overview's CREATE TABLE statement to string buffer")); + return 0; + } + } + } + } + + /* no need to run if opt is 'p' */ + if (config->opt != 'p') { + RASTERINFO refinfo; + init_rastinfo(&refinfo); + + /* process each raster */ + for (i = 0; i < config->rt_file_count; i++) { + RASTERINFO rastinfo; + STRINGBUFFER tileset; + + fprintf(stderr, _("Processing %d/%d: %s\n"), i + 1, config->rt_file_count, config->rt_file[i]); + + init_rastinfo(&rastinfo); + init_stringbuffer(&tileset); + + if (config->copy_statements && !copy_from( + config->schema, config->table, config->raster_column, + (config->file_column ? config->rt_filename[i] : NULL), + buffer + )) { + rterror(_("process_rasters: Could not add COPY statement to string buffer")); + rtdealloc_rastinfo(&rastinfo); + rtdealloc_stringbuffer(&tileset, 0); + return 0; + } + + /* convert raster */ + if (!convert_raster(i, config, &rastinfo, &tileset, buffer)) { + rterror(_("process_rasters: Could not process raster: %s"), config->rt_file[i]); + rtdealloc_rastinfo(&rastinfo); + rtdealloc_stringbuffer(&tileset, 0); + return 0; + } + + /* process raster tiles into COPY or INSERT statements */ + if (tileset.length && !insert_records( + config->schema, config->table, config->raster_column, + (config->file_column ? config->rt_filename[i] : NULL), config->copy_statements, + &tileset, buffer + )) { + rterror(_("process_rasters: Could not convert raster tiles into INSERT or COPY statements")); + rtdealloc_rastinfo(&rastinfo); + rtdealloc_stringbuffer(&tileset, 0); + return 0; + } + + rtdealloc_stringbuffer(&tileset, 0); + + if (config->copy_statements && !copy_from_end(buffer)) { + rterror(_("process_rasters: Could not add COPY end statement to string buffer")); + rtdealloc_rastinfo(&rastinfo); + return 0; + } + + /* flush buffer after every raster */ + flush_stringbuffer(buffer); + + /* overviews */ + if (config->overview_count) { + int j = 0; + + for (j = 0; j < config->overview_count; j++) { + + if (config->copy_statements && !copy_from( + config->schema, config->overview_table[j], config->raster_column, + (config->file_column ? config->rt_filename[i] : NULL), + buffer + )) { + rterror(_("process_rasters: Could not add COPY statement to string buffer")); + rtdealloc_rastinfo(&rastinfo); + rtdealloc_stringbuffer(&tileset, 0); + return 0; + } + + if (!build_overview(i, config, &rastinfo, j, &tileset, buffer)) { + rterror(_("process_rasters: Could not create overview of factor %d for raster %s"), config->overview[j], config->rt_file[i]); + rtdealloc_rastinfo(&rastinfo); + rtdealloc_stringbuffer(&tileset, 0); + return 0; + } + + if (tileset.length && !insert_records( + config->schema, config->overview_table[j], config->raster_column, + (config->file_column ? config->rt_filename[i] : NULL), config->copy_statements, + &tileset, buffer + )) { + rterror(_("process_rasters: Could not convert overview tiles into INSERT or COPY statements")); + rtdealloc_rastinfo(&rastinfo); + rtdealloc_stringbuffer(&tileset, 0); + return 0; + } + + rtdealloc_stringbuffer(&tileset, 0); + + /* flush buffer after every raster */ + flush_stringbuffer(buffer); + + if (config->copy_statements) { + if (!copy_from_end(buffer)) { + rterror(_("process_rasters: Could not add COPY end statement to string buffer")); + rtdealloc_rastinfo(&rastinfo); + return 0; + } + } + } + } + + if (config->rt_file_count > 1) { + if (i < 1) + copy_rastinfo(&refinfo, &rastinfo); + else { + diff_rastinfo(&rastinfo, &refinfo); + } + } + + rtdealloc_rastinfo(&rastinfo); + } + + rtdealloc_rastinfo(&refinfo); + } + + /* index */ + if (config->idx) { + /* create index */ + if (!create_index( + config->schema, config->table, config->raster_column, + config->idx_tablespace, + buffer + )) { + rterror(_("process_rasters: Could not add CREATE INDEX statement to string buffer")); + return 0; + } + + /* analyze */ + if (config->opt != 'p') { + if (!analyze_table( + config->schema, config->table, + buffer + )) { + rterror(_("process_rasters: Could not add ANALYZE statement to string buffer")); + return 0; + } + } + + if (config->overview_count) { + for (i = 0; i < config->overview_count; i++) { + /* create index */ + if (!create_index( + config->schema, config->overview_table[i], config->raster_column, + config->idx_tablespace, + buffer + )) { + rterror(_("process_rasters: Could not add an overview's CREATE INDEX statement to string buffer")); + return 0; + } + + /* analyze */ + if (config->opt != 'p') { + if (!analyze_table( + config->schema, config->overview_table[i], + buffer + )) { + rterror(_("process_rasters: Could not add an overview's ANALYZE statement to string buffer")); + return 0; + } + } + } + } + } + + /* add constraints */ + if (config->constraints) { + if (!add_raster_constraints( + config->schema, config->table, config->raster_column, + config->regular_blocking, config->max_extent, + buffer + )) { + rterror(_("process:rasters: Could not add AddRasterConstraints statement to string buffer")); + return 0; + } + + if (config->overview_count) { + for (i = 0; i < config->overview_count; i++) { + if (!add_raster_constraints( + config->schema, config->overview_table[i], config->raster_column, + config->regular_blocking, config->max_extent, + buffer + )) { + rterror(_("process_rasters: Could not add an overview's AddRasterConstraints statement to string buffer")); + return 0; + } + } + } + } + + /* overview constraint is automatically added */ + if (config->overview_count) { + for (i = 0; i < config->overview_count; i++) { + if (!add_overview_constraints( + config->schema, config->overview_table[i], config->raster_column, + config->schema, config->table, config->raster_column, + config->overview[i], + buffer + )) { + rterror(_("process_rasters: Could not add an overview's AddOverviewConstraints statement to string buffer")); + return 0; + } + } + } + + if (config->transaction) { + if (!append_sql_to_buffer(buffer, "END;")) { + rterror(_("process_rasters: Could not add END statement to string buffer")); + return 0; + } + } + + /* maintenance */ + if (config->opt != 'p' && config->maintenance) { + if (!vacuum_table( + config->schema, config->table, + buffer + )) { + rterror(_("process_rasters: Could not add VACUUM statement to string buffer")); + return 0; + } + + if (config->overview_count) { + for (i = 0; i < config->overview_count; i++) { + if (!vacuum_table( + config->schema, config->overview_table[i], + buffer + )) { + rterror(_("process_rasters: Could not add an overview's VACUUM statement to string buffer")); + return 0; + } + } + } + + } + + return 1; +} + +int +main(int argc, char **argv) { + RTLOADERCFG *config = NULL; + STRINGBUFFER *buffer = NULL; + int i = 0; + int j = 0; + char **elements = NULL; + int n = 0; + GDALDriverH drv = NULL; + char *tmp = NULL; + +#ifdef USE_NLS + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); +#endif + + /* no args, show usage */ + if (argc == 1) { + usage(); + exit(0); + } + + /* initialize config */ + config = rtalloc(sizeof(RTLOADERCFG)); + if (config == NULL) { + rterror(_("Could not allocate memory for loader configuration")); + exit(1); + } + init_config(config); + + /**************************************************************************** + * parse arguments + ****************************************************************************/ + + for (i = 1; i < argc; i++) { + /* srid */ + if (CSEQUAL(argv[i], "-s") && i < argc - 1) { + config->srid = atoi(argv[++i]); + } + /* band index */ + else if (CSEQUAL(argv[i], "-b") && i < argc - 1) { + elements = strsplit(argv[++i], ",", &n); + if (n < 1) { + rterror(_("Could not process -b")); + rtdealloc_config(config); + exit(1); + } + + config->nband_count = 0; + for (j = 0; j < n; j++) { + char *t = trim(elements[j]); + char **minmax = NULL; + int *range = NULL; + int p = 0; + int l = 0; + int m = 0; + int o = 0; + + /* is t a range? */ + minmax = strsplit(t, "-", &o); + if (o == 2) { + if (!array_range(atoi(minmax[0]), atoi(minmax[1]), 1, &range, &p)) { + rterror(_("Could not allocate memory for storing band indices")); + for (l = 0; l < o; l++) + rtdealloc(minmax[l]); + rtdealloc(minmax); + for (j = 0; j < n; j++) + rtdealloc(elements[j]); + rtdealloc(elements); + rtdealloc(t); + rtdealloc_config(config); + exit(1); + } + } + else { + p = 1; + range = rtalloc(sizeof(int)); + if (range == NULL) { + rterror(_("Could not allocate memory for storing band indices")); + for (l = 0; l < o; l++) + rtdealloc(minmax[l]); + rtdealloc(minmax); + for (j = 0; j < n; j++) + rtdealloc(elements[j]); + rtdealloc(elements); + rtdealloc(t); + rtdealloc_config(config); + exit(1); + } + *range = atoi(t); + } + + m = config->nband_count; + config->nband_count += p; + config->nband = rtrealloc(config->nband, sizeof(int) * config->nband_count); + if (config->nband == NULL) { + rterror(_("Could not allocate memory for storing band indices")); + rtdealloc(range); + for (l = 0; l < o; l++) + rtdealloc(minmax[l]); + rtdealloc(minmax); + for (j = 0; j < n; j++) + rtdealloc(elements[j]); + rtdealloc(elements); + rtdealloc(t); + rtdealloc_config(config); + exit(1); + } + + for (l = 0; l < p; l++, m++) + config->nband[m] = range[l]; + + rtdealloc(range); + + for (l = 0; l < o; l++) + rtdealloc(minmax[l]); + rtdealloc(minmax); + + rtdealloc(t); + rtdealloc(elements[j]); + } + rtdealloc(elements); + elements = NULL; + n = 0; + + for (j = 0; j < config->nband_count; j++) { + if (config->nband[j] < 1) { + rterror(_("Band index %d must be greater than 0"), config->nband[j]); + rtdealloc_config(config); + exit(1); + } + } + } + /* tile size */ + else if (CSEQUAL(argv[i], "-t") && i < argc - 1) { + elements = strsplit(argv[++i], "x", &n); + if (n != 2) { + rterror(_("Could not process -t")); + rtdealloc_config(config); + exit(1); + } + + for (j = 0; j < n; j++) { + char *t = trim(elements[j]); + config->tile_size[j] = atoi(t); + rtdealloc(t); + rtdealloc(elements[j]); + } + rtdealloc(elements); + elements = NULL; + n = 0; + + for (j = 0; j < 2; j++) { + if (config->tile_size[j] < 1) { + rterror(_("Tile size must be greater than 0x0")); + rtdealloc_config(config); + exit(1); + } + } + + } + /* out-of-db raster */ + else if (CSEQUAL(argv[i], "-R")) { + config->outdb = 1; + } + /* drop table and recreate */ + else if (CSEQUAL(argv[i], "-d")) { + config->opt = 'd'; + } + /* append to table */ + else if (CSEQUAL(argv[i], "-a")) { + config->opt = 'a'; + } + /* create new table */ + else if (CSEQUAL(argv[i], "-c")) { + config->opt = 'c'; + } + /* prepare only */ + else if (CSEQUAL(argv[i], "-p")) { + config->opt = 'p'; + } + /* raster column name */ + else if (CSEQUAL(argv[i], "-f") && i < argc - 1) { + config->raster_column = rtalloc(sizeof(char) * (strlen(argv[++i]) + 1)); + if (config->raster_column == NULL) { + rterror(_("Could not allocate memory for storing raster column name")); + rtdealloc_config(config); + exit(1); + } + strncpy(config->raster_column, argv[i], strlen(argv[i]) + 1); + } + /* filename column */ + else if (CSEQUAL(argv[i], "-F")) { + config->file_column = 1; + } + /* overview factors */ + else if (CSEQUAL(argv[i], "-l") && i < argc - 1) { + elements = strsplit(argv[++i], ",", &n); + if (n < 1) { + rterror(_("Could not process -l")); + rtdealloc_config(config); + exit(1); + } + + config->overview_count = n; + config->overview = rtalloc(sizeof(int) * n); + if (config->overview == NULL) { + rterror(_("Could not allocate memory for storing overview factors")); + rtdealloc_config(config); + exit(1); + } + for (j = 0; j < n; j++) { + char *t = trim(elements[j]); + config->overview[j] = atoi(t); + rtdealloc(t); + rtdealloc(elements[j]); + } + rtdealloc(elements); + elements = NULL; + n = 0; + + for (j = 0; j < config->overview_count; j++) { + if (config->overview[j] < MINOVFACTOR || config->overview[j] > MAXOVFACTOR) { + rterror(_("Overview factor %d is not between %d and %d"), config->overview[j], MINOVFACTOR, MAXOVFACTOR); + rtdealloc_config(config); + exit(1); + } + } + } + /* quote identifiers */ + else if (CSEQUAL(argv[i], "-q")) { + config->quoteident = 1; + } + /* create index */ + else if (CSEQUAL(argv[i], "-I")) { + config->idx = 1; + } + /* maintenance */ + else if (CSEQUAL(argv[i], "-M")) { + config->maintenance = 1; + } + /* set constraints */ + else if (CSEQUAL(argv[i], "-C")) { + config->constraints = 1; + } + /* disable extent constraint */ + else if (CSEQUAL(argv[i], "-x")) { + config->max_extent = 0; + } + /* enable regular_blocking */ + else if (CSEQUAL(argv[i], "-r")) { + config->regular_blocking = 1; + } + /* tablespace of new table */ + else if (CSEQUAL(argv[i], "-T") && i < argc - 1) { + config->tablespace = rtalloc(sizeof(char) * (strlen(argv[++i]) + 1)); + if (config->tablespace == NULL) { + rterror(_("Could not allocate memory for storing tablespace of new table")); + rtdealloc_config(config); + exit(1); + } + strncpy(config->tablespace, argv[i], strlen(argv[i]) + 1); + } + /* tablespace of new index */ + else if (CSEQUAL(argv[i], "-X") && i < argc - 1) { + config->idx_tablespace = rtalloc(sizeof(char) * (strlen(argv[++i]) + 1)); + if (config->idx_tablespace == NULL) { + rterror(_("Could not allocate memory for storing tablespace of new indices")); + rtdealloc_config(config); + exit(1); + } + strncpy(config->idx_tablespace, argv[i], strlen(argv[i]) + 1); + } + /* nodata value */ + else if (CSEQUAL(argv[i], "-N") && i < argc - 1) { + config->hasnodata = 1; + config->nodataval = atof(argv[++i]); + } + /* endianness */ + else if (CSEQUAL(argv[i], "-E") && i < argc - 1) { + config->endian = atoi(argv[++i]); + config->endian = 1; + } + /* version */ + else if (CSEQUAL(argv[i], "-V") && i < argc - 1) { + config->version = atoi(argv[++i]); + config->version = 0; + } + /* transaction */ + else if (CSEQUAL(argv[i], "-e")) { + config->transaction = 0; + } + /* COPY statements */ + else if (CSEQUAL(argv[i], "-Y")) { + config->copy_statements = 1; + } + /* GDAL formats */ + else if (CSEQUAL(argv[i], "-G")) { + uint32_t drv_count = 0; + rt_gdaldriver drv_set = rt_raster_gdal_drivers(&drv_count, 0); + if (drv_set == NULL || !drv_count) { + rterror(_("Could not get list of available GDAL raster formats")); + } + else { + printf(_("Available GDAL raster formats:\n")); + for (j = 0; j < drv_count; j++) { + printf(_(" %s\n"), drv_set[j].long_name); + + rtdealloc(drv_set[j].short_name); + rtdealloc(drv_set[j].long_name); + rtdealloc(drv_set[j].create_options); + } + rtdealloc(drv_set); + } + + rtdealloc_config(config); + exit(0); + } + /* help */ + else if (CSEQUAL(argv[i], "-?")) { + usage(); + rtdealloc_config(config); + exit(0); + } + else { + config->rt_file_count++; + config->rt_file = (char **) rtrealloc(config->rt_file, sizeof(char *) * config->rt_file_count); + if (config->rt_file == NULL) { + rterror(_("Could not allocate memory for storing raster files")); + rtdealloc_config(config); + exit(1); + } + + config->rt_file[config->rt_file_count - 1] = rtalloc(sizeof(char) * (strlen(argv[i]) + 1)); + if (config->rt_file[config->rt_file_count - 1] == NULL) { + rterror(_("Could not allocate memory for storing raster filename")); + rtdealloc_config(config); + exit(1); + } + strncpy(config->rt_file[config->rt_file_count - 1], argv[i], strlen(argv[i]) + 1); + } + } + + /* register GDAL drivers */ + GDALAllRegister(); + + /* no files provided */ + if (!config->rt_file_count) { + rterror(_("No raster provided")); + rtdealloc_config(config); + exit(1); + } + /* + at least two files, see if last is table + last isn't recognized by GDAL + */ + else if (config->rt_file_count > 1) { + drv = GDALIdentifyDriver(config->rt_file[config->rt_file_count - 1], NULL); + + if (drv == NULL) { + char *ptr; + ptr = strchr(config->rt_file[config->rt_file_count - 1], '.'); + + /* schema.table */ + if (ptr) { + config->schema = rtalloc(sizeof(char) * (ptr - config->rt_file[config->rt_file_count - 1] + 1)); + if (config->schema == NULL) { + rterror(_("Could not allocate memory for storing schema name")); + rtdealloc_config(config); + exit(1); + } + snprintf(config->schema, ptr - config->rt_file[config->rt_file_count - 1] + 1, "%s", config->rt_file[config->rt_file_count - 1]); + config->schema[ptr - config->rt_file[config->rt_file_count - 1]] = '\0'; + + config->table = rtalloc(sizeof(char) * (strlen(config->rt_file[config->rt_file_count - 1]) - strlen(config->schema) + 1)); + if (config->table == NULL) { + rterror(_("Could not allocate memory for storing table name")); + rtdealloc_config(config); + exit(1); + } + snprintf(config->table, strlen(config->rt_file[config->rt_file_count - 1]) - strlen(config->schema), "%s", ptr + 1); + config->table[strlen(config->rt_file[config->rt_file_count - 1]) - strlen(config->schema)] = '\0'; + } + /* table */ + else { + config->table = rtalloc(sizeof(char) * strlen(config->rt_file[config->rt_file_count - 1]) + 1); + if (config->table == NULL) { + rterror(_("Could not allocate memory for storing table name")); + rtdealloc_config(config); + exit(1); + } + strncpy(config->table, config->rt_file[config->rt_file_count - 1], strlen(config->rt_file[config->rt_file_count - 1]) + 1); + } + + rtdealloc(config->rt_file[--(config->rt_file_count)]); + config->rt_file = (char **) rtrealloc(config->rt_file, sizeof(char *) * config->rt_file_count); + if (config->rt_file == NULL) { + rterror(_("Could not reallocate the memory holding raster names")); + rtdealloc_config(config); + exit(1); + } + } + } + + /**************************************************************************** + * validate raster files + ****************************************************************************/ + + /* check that GDAL recognizes all files */ + for (i = 0; i < config->rt_file_count; i++) { + drv = GDALIdentifyDriver(config->rt_file[i], NULL); + + if (drv == NULL) { + rterror(_("Unable to read raster file: %s"), config->rt_file[i]); + rtdealloc_config(config); + exit(1); + } + } + + /* process each file for just the filename */ + config->rt_filename = (char **) rtalloc(sizeof(char *) * config->rt_file_count); + if (config->rt_filename == NULL) { + rterror(_("Could not allocate memory for cleaned raster filenames")); + rtdealloc_config(config); + exit(1); + } + for (i = 0; i < config->rt_file_count; i++) { + char *file; + char *ptr; + + file = rtalloc(sizeof(char) * (strlen(config->rt_file[i]) + 1)); + if (file == NULL) { + rterror(_("Could not allocate memory for cleaned raster filename")); + rtdealloc_config(config); + exit(1); + } + strcpy(file, config->rt_file[i]); + + for (ptr = file + strlen(file); ptr > file; ptr--) { + if (*ptr == '/' || *ptr == '\\') { + ptr++; + break; + } + } + + config->rt_filename[i] = rtalloc(sizeof(char) * (strlen(ptr) + 1)); + if (config->rt_filename[i] == NULL) { + rterror(_("Could not allocate memory for cleaned raster filename")); + rtdealloc_config(config); + exit(1); + } + strcpy(config->rt_filename[i], ptr); + rtdealloc(file); + } + + /**************************************************************************** + * defaults for table and column names + ****************************************************************************/ + + /* first file as proxy table name */ + if (config->table == NULL) { + char *file; + char *ptr; + + file = rtalloc(sizeof(char) * (strlen(config->rt_filename[0]) + 1)); + if (file == NULL) { + rterror(_("Could not allocate memory for proxy table name")); + rtdealloc_config(config); + exit(1); + } + strcpy(file, config->rt_filename[0]); + + for (ptr = file + strlen(file); ptr > file; ptr--) { + if (*ptr == '.') { + *ptr = '\0'; + break; + } + } + + config->table = rtalloc(sizeof(char) * (strlen(file) + 1)); + if (config->table == NULL) { + rterror(_("Could not allocate memory for proxy table name")); + rtdealloc_config(config); + exit(1); + } + strcpy(config->table, file); + rtdealloc(file); + } + + /* raster_column not specified, default to "rast" */ + if (config->raster_column == NULL) { + config->raster_column = rtalloc(sizeof(char) * (strlen("rast") + 1)); + if (config->raster_column == NULL) { + rterror(_("Could not allocate memory for default raster column name")); + rtdealloc_config(config); + exit(1); + } + strcpy(config->raster_column, "rast"); + } + + /**************************************************************************** + * literal PostgreSQL identifiers disabled + ****************************************************************************/ + + /* no quotes, lower case everything */ + if (!config->quoteident) { + if (config->schema != NULL) + config->schema = strtolower(config->schema); + if (config->table != NULL) + config->table = strtolower(config->table); + if (config->raster_column != NULL) + config->raster_column = strtolower(config->raster_column); + if (config->tablespace != NULL) + config->tablespace = strtolower(config->tablespace); + if (config->idx_tablespace != NULL) + config->idx_tablespace = strtolower(config->idx_tablespace); + } + + /**************************************************************************** + * overview table names + ****************************************************************************/ + + if (config->overview_count) { + char factor[4]; + config->overview_table = rtalloc(sizeof(char *) * config->overview_count); + if (config->overview_table == NULL) { + rterror(_("Could not allocate memory for overview table names")); + rtdealloc_config(config); + exit(1); + } + + for (i = 0; i < config->overview_count; i++) { + sprintf(factor, "%d", config->overview[i]); + + config->overview_table[i] = rtalloc(sizeof(char) * (strlen("o__") + strlen(factor) + strlen(config->table) + 1)); + if (config->overview_table[i] == NULL) { + rterror(_("Could not allocate memory for overview table name")); + rtdealloc_config(config); + exit(1); + } + sprintf(config->overview_table[i], "o_%d_%s", config->overview[i], config->table); + } + } + + /**************************************************************************** + * check that identifiers won't get truncated + ****************************************************************************/ + + if (config->schema != NULL && strlen(config->schema) > MAXNAMELEN) { + rtwarn(_("The schema name \"%s\" may exceed the maximum string length permitted for PostgreSQL identifiers (%d)"), + config->schema, + MAXNAMELEN + ); + } + if (config->table != NULL && strlen(config->table) > MAXNAMELEN) { + rtwarn(_("The table name \"%s\" may exceed the maximum string length permitted for PostgreSQL identifiers (%d)"), + config->table, + MAXNAMELEN + ); + } + if (config->raster_column != NULL && strlen(config->raster_column) > MAXNAMELEN) { + rtwarn(_("The column name \"%s\" may exceed the maximum string length permitted for PostgreSQL identifiers (%d)"), + config->raster_column, + MAXNAMELEN + ); + } + if (config->tablespace != NULL && strlen(config->tablespace) > MAXNAMELEN) { + rtwarn(_("The tablespace name \"%s\" may exceed the maximum string length permitted for PostgreSQL identifiers (%d)"), + config->tablespace, + MAXNAMELEN + ); + } + if (config->idx_tablespace != NULL && strlen(config->idx_tablespace) > MAXNAMELEN) { + rtwarn(_("The index tablespace name \"%s\" may exceed the maximum string length permitted for PostgreSQL identifiers (%d)"), + config->idx_tablespace, + MAXNAMELEN + ); + } + if (config->overview_count) { + for (i = 0; i < config->overview_count; i++) { + if (strlen(config->overview_table[i]) > MAXNAMELEN) { + rtwarn(_("The overview table name \"%s\" may exceed the maximum string length permitted for PostgreSQL identifiers (%d)"), + config->overview_table[i], + MAXNAMELEN + ); + } + } + } + + /**************************************************************************** + * double quote identifiers + ****************************************************************************/ + + if (config->schema != NULL) { + tmp = rtalloc(sizeof(char) * (strlen(config->schema) + 4)); + if (tmp == NULL) { + rterror(_("Could not allocate memory for quoting schema name")); + rtdealloc_config(config); + exit(1); + } + + sprintf(tmp, "\"%s\".", config->schema); + rtdealloc(config->schema); + config->schema = tmp; + } + if (config->table != NULL) { + tmp = rtalloc(sizeof(char) * (strlen(config->table) + 3)); + if (tmp == NULL) { + rterror(_("Could not allocate memory for quoting table name")); + rtdealloc_config(config); + exit(1); + } + + sprintf(tmp, "\"%s\"", config->table); + rtdealloc(config->table); + config->table = tmp; + } + if (config->raster_column != NULL) { + tmp = rtalloc(sizeof(char) * (strlen(config->raster_column) + 3)); + if (tmp == NULL) { + rterror(_("Could not allocate memory for quoting raster column name")); + rtdealloc_config(config); + exit(1); + } + + sprintf(tmp, "\"%s\"", config->raster_column); + rtdealloc(config->raster_column); + config->raster_column = tmp; + } + if (config->tablespace != NULL) { + tmp = rtalloc(sizeof(char) * (strlen(config->tablespace) + 3)); + if (tmp == NULL) { + rterror(_("Could not allocate memory for quoting tablespace name")); + rtdealloc_config(config); + exit(1); + } + + sprintf(tmp, "\"%s\"", config->tablespace); + rtdealloc(config->tablespace); + config->tablespace = tmp; + } + if (config->idx_tablespace != NULL) { + tmp = rtalloc(sizeof(char) * (strlen(config->idx_tablespace) + 3)); + if (tmp == NULL) { + rterror(_("Could not allocate memory for quoting index tablespace name")); + rtdealloc_config(config); + exit(1); + } + + sprintf(tmp, "\"%s\"", config->idx_tablespace); + rtdealloc(config->idx_tablespace); + config->idx_tablespace = tmp; + } + if (config->overview_count) { + for (i = 0; i < config->overview_count; i++) { + tmp = rtalloc(sizeof(char) * (strlen(config->overview_table[i]) + 3)); + if (tmp == NULL) { + rterror(_("Could not allocate memory for quoting overview table name")); + rtdealloc_config(config); + exit(1); + } + + sprintf(tmp, "\"%s\"", config->overview_table[i]); + rtdealloc(config->overview_table[i]); + config->overview_table[i] = tmp; + } + } + + /**************************************************************************** + * processing of rasters + ****************************************************************************/ + + /* initialize string buffer */ + buffer = rtalloc(sizeof(STRINGBUFFER)); + if (buffer == NULL) { + rterror(_("Could not allocate memory for output string buffer")); + rtdealloc_config(config); + exit(1); + } + init_stringbuffer(buffer); + + /* pass off to processing function */ + if (!process_rasters(config, buffer)) { + rterror(_("Unable to process rasters")); + rtdealloc_stringbuffer(buffer, 1); + rtdealloc_config(config); + exit(1); + } + + flush_stringbuffer(buffer); + + rtdealloc_stringbuffer(buffer, 1); + rtdealloc_config(config); + + return 0; +} diff -Nru postgis-1.5.3/raster/loader/raster2pgsql.h postgis-2.0.1/raster/loader/raster2pgsql.h --- postgis-1.5.3/raster/loader/raster2pgsql.h 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/loader/raster2pgsql.h 2012-03-09 19:00:25.000000000 +0000 @@ -0,0 +1,177 @@ +/* + * $Id: raster2pgsql.h 9436 2012-03-09 19:00:25Z dustymugs $ + * + * PostGIS Raster loader + * http://trac.osgeo.org/postgis/wiki/WKTRaster + * + * Copyright 2001-2003 Refractions Research Inc. + * Copyright 2009 Paul Ramsey + * Copyright 2009 Mark Cave-Ayland + * Copyright (C) 2011 Regents of the University of California + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +/* For internationalization */ +#ifdef ENABLE_NLS +#include +#include +#define _(String) gettext(String) +#define PACKAGE "raster2pgsql" +#else +#define _(String) String +#endif + +#include +#include +#include +#include + +#include "../rt_core/rt_api.h" + +#define CSEQUAL(a,b) (strcmp(a,b)==0) + +/* + max length of of "name" data type in PostgreSQL as + defined in pg_config_manual.h as macro NAMEDATALEN + default is 64 bytes (63 usable characters plus NULL) +*/ +#define MAXNAMELEN 63 + +/* minimum and maximum overview factor */ +#define MINOVFACTOR 2 +#define MAXOVFACTOR 1000 + +#define RCSID "$Id: raster2pgsql.h 9436 2012-03-09 19:00:25Z dustymugs $" + +typedef struct raster_loader_config { + /* raster filename */ + int rt_file_count; + char **rt_file; + char **rt_filename; + + /* schema to load into */ + char *schema; + + /* table to load into */ + char *table; + + /* raster column name specified by user */ + char *raster_column; + + /* add column with raster filename, 1 = yes, 0 = no (default) */ + int file_column; + + /* overview factor */ + int overview_count; + int *overview; + char **overview_table; + + /* case-sensitive of identifiers, 1 = yes, 0 = no (default) */ + int quoteident; + + /* SRID of raster */ + int srid; + + /* bands to extract */ + int *nband; /* 1-based */ + int nband_count; + + /* tile size */ + int tile_size[2]; + + /* register raster as of out-of-db, 1 = yes, 0 = no (default) */ + int outdb; + + /* type of operation, (d|a|c|p) */ + char opt; + + /* create index, 1 = yes, 0 = no (default) */ + int idx; + + /* maintenance statements, 1 = yes, 0 = no (default) */ + int maintenance; + + /* set constraints */ + int constraints; + + /* enable max extent constraint, 1 = yes (default), 0 = no */ + int max_extent; + + /* enable regular_blocking constraint, 1 = yes, 0 = no (default) */ + int regular_blocking; + + /* new table's tablespace */ + char *tablespace; + + /* new index's tablespace */ + char *idx_tablespace; + + /* flag indicating that user specified a nodata value */ + int hasnodata; + /* nodata value for bands with no nodata value */ + double nodataval; + + /* endianness of binary output, 0 = XDR, 1 = NDR (default) */ + int endian; + + /* version of output format */ + int version; + + /* use a transaction, 0 = no, 1 = yes (default) */ + int transaction; + + /* use COPY instead of INSERT */ + int copy_statements; + +} RTLOADERCFG; + +typedef struct rasterinfo_t { + /* SRID of raster */ + int srid; + + /* srs of raster */ + char *srs; + + /* width, height */ + uint32_t dim[2]; + + /* number of bands */ + int *nband; /* 1-based */ + int nband_count; + + /* array of pixeltypes */ + GDALDataType *gdalbandtype; + rt_pixtype *bandtype; + + /* array of hasnodata flags */ + int *hasnodata; + /* array of nodatavals */ + double *nodataval; + + /* geotransform matrix */ + double gt[6]; + + /* tile size */ + int tile_size[2]; + +} RASTERINFO; + +typedef struct stringbuffer_t { + uint32_t length; + char **line; +} STRINGBUFFER; diff -Nru postgis-1.5.3/raster/macros/ac_proj4_version.m4 postgis-2.0.1/raster/macros/ac_proj4_version.m4 --- postgis-1.5.3/raster/macros/ac_proj4_version.m4 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/macros/ac_proj4_version.m4 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,42 @@ +dnl ********************************************************************** +dnl * $Id: ac_proj4_version.m4 9324 2012-02-27 22:08:12Z pramsey $ +dnl * +dnl * PostGIS - Spatial Types for PostgreSQL +dnl * http://postgis.refractions.net +dnl * Copyright 2008 Mark Cave-Ayland +dnl * +dnl * This is free software; you can redistribute and/or modify it under +dnl * the terms of the GNU General Public Licence. See the COPYING file. +dnl * +dnl ********************************************************************** + +dnl +dnl Return the PROJ.4 version number +dnl + +AC_DEFUN([AC_PROJ_VERSION], [ + AC_RUN_IFELSE( + [AC_LANG_PROGRAM([ + #ifdef HAVE_STDINT_H + #include + #endif + #include "proj_api.h" + ], + [ + FILE *fp; + + fp = fopen("conftest.out", "w"); + fprintf(fp, "%d\n", PJ_VERSION); + fclose(fp)]) + ], + [ + dnl The program ran successfully, so return the version number in the form MAJORMINOR + $1=`cat conftest.out | sed 's/\([[0-9]]\)\([[0-9]]\)\([[0-9]]\)/\1\2/'` + ], + [ + dnl The program failed so return an empty variable + $1="" + ] + ) +]) + diff -Nru postgis-1.5.3/raster/raster_config.h.in postgis-2.0.1/raster/raster_config.h.in --- postgis-1.5.3/raster/raster_config.h.in 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/raster_config.h.in 2012-02-29 00:52:31.000000000 +0000 @@ -0,0 +1,34 @@ +/* raster_config.h.in. Generated from configure.ac by autoheader. */ + +/* PostGIS Raster build date */ +#undef POSTGIS_RASTER_BUILD_DATE + +/* PostGIS Raster library version */ +#undef POSTGIS_RASTER_LIB_VERSION + +/* PostGIS Raster major version */ +#undef POSTGIS_RASTER_MAJOR_VERSION + +/* PostGIS Raster micro version */ +#undef POSTGIS_RASTER_MICRO_VERSION + +/* PostGIS Raster minor version */ +#undef POSTGIS_RASTER_MINOR_VERSION + +/* PostGIS Raster scripts version */ +#undef POSTGIS_RASTER_SCRIPTS_VERSION + +/* PostGIS Raster version */ +#undef POSTGIS_RASTER_VERSION + +/* GDAL library version */ +#undef POSTGIS_GDAL_VERSION + +/* Define to 1 if GDAL has GDALFPolygonize function. */ +#undef GDALFPOLYGONIZE + +/* Enable development variable */ +#undef ENABLE_DEVELOPMENT + +/* Define to 1 if a warning is outputted every time a double is truncated */ +#undef POSTGIS_RASTER_WARN_ON_TRUNCATION diff -Nru postgis-1.5.3/raster/rt_core/Makefile.in postgis-2.0.1/raster/rt_core/Makefile.in --- postgis-1.5.3/raster/rt_core/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/rt_core/Makefile.in 2012-03-21 21:36:59.000000000 +0000 @@ -0,0 +1,38 @@ +############################################################################# +# $Id: Makefile.in 9523 2012-03-21 21:36:59Z pramsey $ +# +# Copyright (c) 2009 Sandro Santilli +# +# This is free software; you can redistribute and/or modify it under +# the terms of the GNU General Public Licence. See the COPYING file. +# +############################################################################# + +AR=ar rs + +CC=@CC@ +LIBLWGEOM_LDFLAGS=../../liblwgeom/.libs/liblwgeom.a +LIBLWGEOM_CFLAGS=-I../../liblwgeom +LIBGDAL_CFLAGS=@LIBGDAL_CFLAGS@ +LIBGDAL_LDFLAGS=@LIBGDAL_LDFLAGS@ +GEOS_LDFLAGS=@GEOS_LDFLAGS@ -lgeos_c +PROJ_LDFLAGS=@PROJ_LDFLAGS@ -lproj +LDFLAGS=$(LIBLWGEOM_LDFLAGS) $(LIBGDAL_LDFLAGS) $(PROJ_LDFLAGS) $(GEOS_LDFLAGS) +CFLAGS=@CFLAGS@ @PICFLAGS@ @WARNFLAGS@ $(LIBLWGEOM_CFLAGS) $(LIBGDAL_CFLAGS) @PROJ_CPPFLAGS@ @GEOS_CPPFLAGS@ + +# Standalone RTCORE objects +RT_OBJS=rt_api.o +RT_LIB=librtcore.a +RT_HEADERS=rt_api.h + +all: $(RT_LIB) + +clean: + rm -f $(RT_OBJS) + rm -f $(RT_LIB) + +distclean: clean + rm -f Makefile + +librtcore.a: $(RT_OBJS) $(RT_HEADERS) + $(AR) $(RT_LIB) $(RT_OBJS) diff -Nru postgis-1.5.3/raster/rt_core/rt_api.c postgis-2.0.1/raster/rt_core/rt_api.c --- postgis-1.5.3/raster/rt_core/rt_api.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/rt_core/rt_api.c 2012-06-21 20:17:50.000000000 +0000 @@ -0,0 +1,11463 @@ +/* + * $Id: rt_api.c 9966 2012-06-21 20:17:50Z dustymugs $ + * + * WKTRaster - Raster Types for PostGIS + * http://trac.osgeo.org/postgis/wiki/WKTRaster + * + * Copyright (C) 2011-2012 Regents of the University of California + * + * Copyright (C) 2010-2011 Jorge Arevalo + * Copyright (C) 2010-2011 David Zwarg + * Copyright (C) 2009-2011 Pierre Racine + * Copyright (C) 2009-2011 Mateusz Loskot + * Copyright (C) 2008-2009 Sandro Santilli + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include +#include /* for printf (default message handler) */ +#include /* for va_list, va_start etc */ +#include /* for memcpy and strlen */ +#include +#include /* for time */ +#include "rt_api.h" +#include "gdal_vrt.h" + +/****************************************************************************** + * Some rules for *.(c|h) files in rt_core + * + * All functions in rt_core that receive a band index parameter + * must be 0-based + *****************************************************************************/ + +/*--- Utilities -------------------------------------------------*/ + +static void +swap_char(uint8_t *a, uint8_t *b) { + uint8_t c = 0; + + assert(NULL != a && NULL != b); + + c = *a; + *a = *b; + *b = c; +} + +static void +flip_endian_16(uint8_t *d) { + assert(NULL != d); + + swap_char(d, d + 1); +} + +static void +flip_endian_32(uint8_t *d) { + assert(NULL != d); + + swap_char(d, d + 3); + swap_char(d + 1, d + 2); +} + +static void +flip_endian_64(uint8_t *d) { + assert(NULL != d); + + swap_char(d + 7, d); + swap_char(d + 6, d + 1); + swap_char(d + 5, d + 2); + swap_char(d + 4, d + 3); +} + +uint8_t +rt_util_clamp_to_1BB(double value) { + return (uint8_t)fmin(fmax((value), 0), POSTGIS_RT_1BBMAX); +} + +uint8_t +rt_util_clamp_to_2BUI(double value) { + return (uint8_t)fmin(fmax((value), 0), POSTGIS_RT_2BUIMAX); +} + +uint8_t +rt_util_clamp_to_4BUI(double value) { + return (uint8_t)fmin(fmax((value), 0), POSTGIS_RT_4BUIMAX); +} + +int8_t +rt_util_clamp_to_8BSI(double value) { + return (int8_t)fmin(fmax((value), SCHAR_MIN), SCHAR_MAX); +} + +uint8_t +rt_util_clamp_to_8BUI(double value) { + return (uint8_t)fmin(fmax((value), 0), UCHAR_MAX); +} + +int16_t +rt_util_clamp_to_16BSI(double value) { + return (int16_t)fmin(fmax((value), SHRT_MIN), SHRT_MAX); +} + +uint16_t +rt_util_clamp_to_16BUI(double value) { + return (uint16_t)fmin(fmax((value), 0), USHRT_MAX); +} + +int32_t +rt_util_clamp_to_32BSI(double value) { + return (int32_t)fmin(fmax((value), INT_MIN), INT_MAX); +} + +uint32_t +rt_util_clamp_to_32BUI(double value) { + return (uint32_t)fmin(fmax((value), 0), UINT_MAX); +} + +float +rt_util_clamp_to_32F(double value) { + return (float)fmin(fmax((value), -FLT_MAX), FLT_MAX); +} + +/* quicksort */ +#define SWAP(x, y) { double t; t = x; x = y; y = t; } +#define ORDER(x, y) if (x > y) SWAP(x, y) + +static double pivot(double *left, double *right) { + double l, m, r, *p; + + l = *left; + m = *(left + (right - left) / 2); + r = *right; + + /* order */ + ORDER(l, m); + ORDER(l, r); + ORDER(m, r); + + /* pivot is higher of two values */ + if (l < m) return m; + if (m < r) return r; + + /* find pivot that isn't left */ + for (p = left + 1; p <= right; ++p) { + if (*p != *left) + return (*p < *left) ? *left : *p; + } + + /* all values are same */ + return -1; +} + +static double *partition(double *left, double *right, double pivot) { + while (left <= right) { + while (*left < pivot) ++left; + while (*right >= pivot) --right; + + if (left < right) { + SWAP(*left, *right); + ++left; + --right; + } + } + + return left; +} + +static void quicksort(double *left, double *right) { + double p = pivot(left, right); + double *pos; + + if (p != -1) { + pos = partition(left, right, p); + quicksort(left, pos - 1); + quicksort(pos, right); + } +} + +/** + * Convert cstring name to GDAL Resample Algorithm + * + * @param algname: cstring name to convert + * + * @return valid GDAL resampling algorithm + */ +GDALResampleAlg +rt_util_gdal_resample_alg(const char *algname) { + if (!algname || !strlen(algname)) return GRA_NearestNeighbour; + + if (strcmp(algname, "NEARESTNEIGHBOUR") == 0) + return GRA_NearestNeighbour; + else if (strcmp(algname, "NEARESTNEIGHBOR") == 0) + return GRA_NearestNeighbour; + else if (strcmp(algname, "BILINEAR") == 0) + return GRA_Bilinear; + else if (strcmp(algname, "CUBICSPLINE") == 0) + return GRA_CubicSpline; + else if (strcmp(algname, "CUBIC") == 0) + return GRA_Cubic; + else if (strcmp(algname, "LANCZOS") == 0) + return GRA_Lanczos; + + return GRA_NearestNeighbour; +} + +/** + * Convert rt_pixtype to GDALDataType + * + * @param pt: pixeltype to convert + * + * @return valid GDALDataType + */ +GDALDataType +rt_util_pixtype_to_gdal_datatype(rt_pixtype pt) { + switch (pt) { + case PT_1BB: + case PT_2BUI: + case PT_4BUI: + case PT_8BUI: + return GDT_Byte; + case PT_8BSI: + case PT_16BSI: + return GDT_Int16; + case PT_16BUI: + return GDT_UInt16; + case PT_32BSI: + return GDT_Int32; + case PT_32BUI: + return GDT_UInt32; + case PT_32BF: + return GDT_Float32; + case PT_64BF: + return GDT_Float64; + default: + return GDT_Unknown; + } + + return GDT_Unknown; +} + +/** + * Convert GDALDataType to rt_pixtype + * + * @param gdt: GDAL datatype to convert + * + * @return valid rt_pixtype + */ +rt_pixtype +rt_util_gdal_datatype_to_pixtype(GDALDataType gdt) { + switch (gdt) { + case GDT_Byte: + return PT_8BUI; + case GDT_UInt16: + return PT_16BUI; + case GDT_Int16: + return PT_16BSI; + case GDT_UInt32: + return PT_32BUI; + case GDT_Int32: + return PT_32BSI; + case GDT_Float32: + return PT_32BF; + case GDT_Float64: + return PT_64BF; + default: + return PT_END; + } + + return PT_END; +} + +/* + get GDAL runtime version information +*/ +const char* +rt_util_gdal_version(const char *request) { + if (NULL == request || !strlen(request)) + return GDALVersionInfo("RELEASE_NAME"); + else + return GDALVersionInfo(request); +} + +/* + computed extent type +*/ +rt_extenttype +rt_util_extent_type(const char *name) { + if (strcmp(name, "UNION") == 0) + return ET_UNION; + else if (strcmp(name, "FIRST") == 0) + return ET_FIRST; + else if (strcmp(name, "SECOND") == 0) + return ET_SECOND; + else + return ET_INTERSECTION; +} + +/* + convert the spatial reference string from a GDAL recognized format to either WKT or Proj4 +*/ +char* +rt_util_gdal_convert_sr(const char *srs, int proj4) { + OGRSpatialReferenceH hsrs; + char *rtn = NULL; + + hsrs = OSRNewSpatialReference(NULL); + if (OSRSetFromUserInput(hsrs, srs) == OGRERR_NONE) { + if (proj4) + OSRExportToProj4(hsrs, &rtn); + else + OSRExportToWkt(hsrs, &rtn); + } + else { + rterror("rt_util_gdal_convert_sr: Could not process the provided srs: %s", srs); + return NULL; + } + + OSRDestroySpatialReference(hsrs); + if (rtn == NULL) { + rterror("rt_util_gdal_convert_sr: Could not process the provided srs: %s", srs); + return NULL; + } + + return rtn; +} + +/* + is the spatial reference string supported by GDAL +*/ +int +rt_util_gdal_supported_sr(const char *srs) { + OGRSpatialReferenceH hsrs; + OGRErr rtn = OGRERR_NONE; + + hsrs = OSRNewSpatialReference(NULL); + rtn = OSRSetFromUserInput(hsrs, srs); + OSRDestroySpatialReference(hsrs); + + if (rtn == OGRERR_NONE) + return 1; + else + return 0; +} + +/* + is GDAL configured correctly? +*/ +int rt_util_gdal_configured(void) { + + /* set of EPSG codes */ + if (!rt_util_gdal_supported_sr("EPSG:4326")) + return 0; + if (!rt_util_gdal_supported_sr("EPSG:4269")) + return 0; + if (!rt_util_gdal_supported_sr("EPSG:4267")) + return 0; + if (!rt_util_gdal_supported_sr("EPSG:3310")) + return 0; + if (!rt_util_gdal_supported_sr("EPSG:2163")) + return 0; + + return 1; +} + +/* + is the driver registered? +*/ +int +rt_util_gdal_driver_registered(const char *drv) { + int count = GDALGetDriverCount(); + int i = 0; + GDALDriverH hdrv = NULL; + + if (drv == NULL || !strlen(drv) || count < 1) + return 0; + + for (i = 0; i < count; i++) { + hdrv = GDALGetDriver(i); + if (hdrv == NULL) continue; + + if (strcmp(drv, GDALGetDriverShortName(hdrv)) == 0) + return 1; + } + + return 0; +} + +void +rt_util_from_ogr_envelope( + OGREnvelope env, + rt_envelope *ext +) { + assert(ext != NULL); + + ext->MinX = env.MinX; + ext->MaxX = env.MaxX; + ext->MinY = env.MinY; + ext->MaxY = env.MaxY; + + ext->UpperLeftX = env.MinX; + ext->UpperLeftY = env.MaxY; +} + +void +rt_util_to_ogr_envelope( + rt_envelope ext, + OGREnvelope *env +) { + assert(env != NULL); + + env->MinX = ext.MinX; + env->MaxX = ext.MaxX; + env->MinY = ext.MinY; + env->MaxY = ext.MaxY; +} + +LWPOLY * +rt_util_envelope_to_lwpoly( + rt_envelope env +) { + LWPOLY *npoly = NULL; + POINTARRAY **rings = NULL; + POINTARRAY *pts = NULL; + POINT4D p4d; + + rings = (POINTARRAY **) rtalloc(sizeof (POINTARRAY*)); + if (!rings) { + rterror("rt_util_envelope_to_lwpoly: Out of memory building envelope's geometry"); + return NULL; + } + rings[0] = ptarray_construct(0, 0, 5); + if (!rings[0]) { + rterror("rt_util_envelope_to_lwpoly: Out of memory building envelope's geometry ring"); + return NULL; + } + + pts = rings[0]; + + /* Upper-left corner (first and last points) */ + p4d.x = env.MinX; + p4d.y = env.MaxY; + ptarray_set_point4d(pts, 0, &p4d); + ptarray_set_point4d(pts, 4, &p4d); + + /* Upper-right corner (we go clockwise) */ + p4d.x = env.MaxX; + p4d.y = env.MaxY; + ptarray_set_point4d(pts, 1, &p4d); + + /* Lower-right corner */ + p4d.x = env.MaxX; + p4d.y = env.MinY; + ptarray_set_point4d(pts, 2, &p4d); + + /* Lower-left corner */ + p4d.x = env.MinX; + p4d.y = env.MinY; + ptarray_set_point4d(pts, 3, &p4d); + + npoly = lwpoly_construct(SRID_UNKNOWN, 0, 1, rings); + if (npoly == NULL) { + rterror("rt_util_envelope_to_lwpoly: Unable to build envelope's geometry"); + return NULL; + } + + return npoly; +} + +/*- rt_context -------------------------------------------------------*/ + +/* Functions definitions */ +void * init_rt_allocator(size_t size); +void * init_rt_reallocator(void * mem, size_t size); +void init_rt_deallocator(void * mem); +void init_rt_errorreporter(const char * fmt, va_list ap); +void init_rt_warnreporter(const char * fmt, va_list ap); +void init_rt_inforeporter(const char * fmt, va_list ap); + + + +/* + * Default allocators + * + * We include some default allocators that use malloc/free/realloc + * along with stdout/stderr since this is the most common use case + * + */ +void * +default_rt_allocator(size_t size) +{ + void *mem = malloc(size); + return mem; +} + +void * +default_rt_reallocator(void *mem, size_t size) +{ + void *ret = realloc(mem, size); + return ret; +} + +void +default_rt_deallocator(void *mem) +{ + free(mem); +} + + +void +default_rt_error_handler(const char *fmt, va_list ap) { + + static const char *label = "ERROR: "; + char newfmt[1024] = {0}; + snprintf(newfmt, 1024, "%s%s\n", label, fmt); + newfmt[1023] = '\0'; + + vprintf(newfmt, ap); + + va_end(ap); +} + +void +default_rt_warning_handler(const char *fmt, va_list ap) { + + static const char *label = "WARNING: "; + char newfmt[1024] = {0}; + snprintf(newfmt, 1024, "%s%s\n", label, fmt); + newfmt[1023] = '\0'; + + vprintf(newfmt, ap); + + va_end(ap); +} + + +void +default_rt_info_handler(const char *fmt, va_list ap) { + + static const char *label = "INFO: "; + char newfmt[1024] = {0}; + snprintf(newfmt, 1024, "%s%s\n", label, fmt); + newfmt[1023] = '\0'; + + vprintf(newfmt, ap); + + va_end(ap); +} + + +/** + * Struct definition here + */ +struct rt_context_t { + rt_allocator alloc; + rt_reallocator realloc; + rt_deallocator dealloc; + rt_message_handler err; + rt_message_handler warn; + rt_message_handler info; +}; + +/* Static variable, to be used for all rt_core functions */ +static struct rt_context_t ctx_t = { + .alloc = init_rt_allocator, + .realloc = init_rt_reallocator, + .dealloc = init_rt_deallocator, + .err = init_rt_errorreporter, + .warn = init_rt_warnreporter, + .info = init_rt_inforeporter +}; + + +/** + * This function is normally called by rt_init_allocators when no special memory + * management is needed. Useful in raster core testing and in the (future) + * loader, when we need to use raster core functions but we don't have + * PostgreSQL backend behind. We must take care of memory by ourselves in those + * situations + */ +void +rt_install_default_allocators(void) +{ + ctx_t.alloc = default_rt_allocator; + ctx_t.realloc = default_rt_reallocator; + ctx_t.dealloc = default_rt_deallocator; + ctx_t.err = default_rt_error_handler; + ctx_t.info = default_rt_info_handler; + ctx_t.warn = default_rt_warning_handler; +} + + +/** + * This function is called by rt_init_allocators when the PostgreSQL backend is + * taking care of the memory and we want to use palloc family + */ +void +rt_set_handlers(rt_allocator allocator, rt_reallocator reallocator, + rt_deallocator deallocator, rt_message_handler error_handler, + rt_message_handler info_handler, rt_message_handler warning_handler) { + + ctx_t.alloc = allocator; + ctx_t.realloc = reallocator; + ctx_t.dealloc = deallocator; + + ctx_t.err = error_handler; + ctx_t.info = info_handler; + ctx_t.warn = warning_handler; +} + + + +/** + * Initialisation allocators + * + * These are used the first time any of the allocators are called to enable + * executables/libraries that link into raster to be able to set up their own + * allocators. This is mainly useful for older PostgreSQL versions that don't + * have functions that are called upon startup. + **/ +void * +init_rt_allocator(size_t size) +{ + rt_init_allocators(); + + return ctx_t.alloc(size); +} + +void +init_rt_deallocator(void *mem) +{ + rt_init_allocators(); + + ctx_t.dealloc(mem); +} + + +void * +init_rt_reallocator(void *mem, size_t size) +{ + rt_init_allocators(); + + return ctx_t.realloc(mem, size); +} + +void +init_rt_inforeporter(const char *fmt, va_list ap) +{ + rt_init_allocators(); + + (*ctx_t.info)(fmt, ap); +} + +void +init_rt_warnreporter(const char *fmt, va_list ap) +{ + rt_init_allocators(); + + (*ctx_t.warn)(fmt, ap); +} + + +void +init_rt_errorreporter(const char *fmt, va_list ap) +{ + rt_init_allocators(); + + (*ctx_t.err)(fmt, ap); + +} + + + +/** + * Raster core memory management functions. + * + * They use the functions defined by the caller. + */ +void * +rtalloc(size_t size) { + void * mem = ctx_t.alloc(size); + RASTER_DEBUGF(5, "rtalloc called: %d@%p", size, mem); + return mem; +} + + +void * +rtrealloc(void * mem, size_t size) { + void * result = ctx_t.realloc(mem, size); + RASTER_DEBUGF(5, "rtrealloc called: %d@%p", size, result); + return result; +} + +void +rtdealloc(void * mem) { + ctx_t.dealloc(mem); + RASTER_DEBUG(5, "rtdealloc called"); +} + +/** + * Raster core error and info handlers + * + * Since variadic functions cannot pass their parameters directly, we need + * wrappers for these functions to convert the arguments into a va_list + * structure. + */ +void +rterror(const char *fmt, ...) { + va_list ap; + + va_start(ap, fmt); + + /* Call the supplied function */ + (*ctx_t.err)(fmt, ap); + + va_end(ap); +} + +void +rtinfo(const char *fmt, ...) { + va_list ap; + + va_start(ap, fmt); + + /* Call the supplied function */ + (*ctx_t.info)(fmt, ap); + + va_end(ap); +} + + +void +rtwarn(const char *fmt, ...) { + va_list ap; + + va_start(ap, fmt); + + /* Call the supplied function */ + (*ctx_t.warn)(fmt, ap); + + va_end(ap); +} + + + +int +rt_util_dbl_trunc_warning( + double initialvalue, + int32_t checkvalint, uint32_t checkvaluint, + float checkvalfloat, double checkvaldouble, + rt_pixtype pixtype +) { + int result = 0; + + switch (pixtype) { + case PT_1BB: + case PT_2BUI: + case PT_4BUI: + case PT_8BSI: + case PT_8BUI: + case PT_16BSI: + case PT_16BUI: + case PT_32BSI: { + if (fabs(checkvalint - initialvalue) >= 1) { +#if POSTGIS_RASTER_WARN_ON_TRUNCATION > 0 + rtwarn("Value set for %s band got clamped from %f to %d", + rt_pixtype_name(pixtype), + initialvalue, checkvalint + ); +#endif + result = 1; + } + else if (FLT_NEQ(checkvalint, initialvalue)) { +#if POSTGIS_RASTER_WARN_ON_TRUNCATION > 0 + rtwarn("Value set for %s band got truncated from %f to %d", + rt_pixtype_name(pixtype), + initialvalue, checkvalint + ); +#endif + result = 1; + } + break; + } + case PT_32BUI: { + if (fabs(checkvaluint - initialvalue) >= 1) { +#if POSTGIS_RASTER_WARN_ON_TRUNCATION > 0 + rtwarn("Value set for %s band got clamped from %f to %u", + rt_pixtype_name(pixtype), + initialvalue, checkvaluint + ); +#endif + result = 1; + } + else if (FLT_NEQ(checkvaluint, initialvalue)) { +#if POSTGIS_RASTER_WARN_ON_TRUNCATION > 0 + rtwarn("Value set for %s band got truncated from %f to %u", + rt_pixtype_name(pixtype), + initialvalue, checkvaluint + ); +#endif + result = 1; + } + break; + } + case PT_32BF: { + /* + For float, because the initial value is a double, + there is very often a difference between the desired value and the obtained one + */ + if (FLT_NEQ(checkvalfloat, initialvalue)) { +#if POSTGIS_RASTER_WARN_ON_TRUNCATION > 0 + rtwarn("Value set for %s band got converted from %f to %f", + rt_pixtype_name(pixtype), + initialvalue, checkvalfloat + ); +#endif + result = 1; + } + break; + } + case PT_64BF: { + if (FLT_NEQ(checkvaldouble, initialvalue)) { +#if POSTGIS_RASTER_WARN_ON_TRUNCATION > 0 + rtwarn("Value set for %s band got converted from %f to %f", + rt_pixtype_name(pixtype), + initialvalue, checkvaldouble + ); +#endif + result = 1; + } + break; + } + case PT_END: + break; + } + + return result; +} + +/*--- Debug and Testing Utilities --------------------------------------------*/ + +#if POSTGIS_DEBUG_LEVEL > 2 + +static char* +d_binary_to_hex(const uint8_t * const raw, uint32_t size, uint32_t *hexsize) { + char* hex = NULL; + uint32_t i = 0; + + + assert(NULL != raw); + assert(NULL != hexsize); + + + *hexsize = size * 2; /* hex is 2 times bytes */ + hex = (char*) rtalloc((*hexsize) + 1); + if (!hex) { + rterror("d_binary_to_hex: Out of memory hexifying raw binary"); + return NULL; + } + hex[*hexsize] = '\0'; /* Null-terminate */ + + for (i = 0; i < size; ++i) { + deparse_hex(raw[i], &(hex[2 * i])); + } + + assert(NULL != hex); + assert(0 == strlen(hex) % 2); + return hex; +} + +static void +d_print_binary_hex(const char* msg, const uint8_t * const raw, uint32_t size) { + char* hex = NULL; + uint32_t hexsize = 0; + + + assert(NULL != msg); + assert(NULL != raw); + + + hex = d_binary_to_hex(raw, size, &hexsize); + if (NULL != hex) { + rtinfo("%s\t%s", msg, hex); + rtdealloc(hex); + } +} + +static size_t +d_binptr_to_pos(const uint8_t * const ptr, const uint8_t * const end, size_t size) { + assert(NULL != ptr && NULL != end); + + return (size - (end - ptr)); +} + +#define CHECK_BINPTR_POSITION(ptr, end, size, pos) \ + { if (pos != d_binptr_to_pos(ptr, end, size)) { \ + fprintf(stderr, "Check of binary stream pointer position failed on line %d\n", __LINE__); \ + fprintf(stderr, "\tactual = %lu, expected = %lu\n", (long unsigned)d_binptr_to_pos(ptr, end, size), (long unsigned)pos); \ + } } + +#else + +#define CHECK_BINPTR_POSITION(ptr, end, size, pos) ((void)0); + +#endif /* ifndef POSTGIS_DEBUG_LEVEL > 3 */ + +/*- rt_pixeltype -----------------------------------------------------*/ + +int +rt_pixtype_size(rt_pixtype pixtype) { + int pixbytes = -1; + + switch (pixtype) { + case PT_1BB: + case PT_2BUI: + case PT_4BUI: + case PT_8BSI: + case PT_8BUI: + pixbytes = 1; + break; + case PT_16BSI: + case PT_16BUI: + pixbytes = 2; + break; + case PT_32BSI: + case PT_32BUI: + case PT_32BF: + pixbytes = 4; + break; + case PT_64BF: + pixbytes = 8; + break; + default: + rterror("rt_pixtype_size: Unknown pixeltype %d", pixtype); + pixbytes = -1; + break; + } + + RASTER_DEBUGF(3, "Pixel type = %s and size = %d bytes", + rt_pixtype_name(pixtype), pixbytes); + + return pixbytes; +} + +int +rt_pixtype_alignment(rt_pixtype pixtype) { + return rt_pixtype_size(pixtype); +} + +rt_pixtype +rt_pixtype_index_from_name(const char* pixname) { + assert(pixname && strlen(pixname) > 0); + + if (strcmp(pixname, "1BB") == 0) + return PT_1BB; + if (strcmp(pixname, "2BUI") == 0) + return PT_2BUI; + if (strcmp(pixname, "4BUI") == 0) + return PT_4BUI; + if (strcmp(pixname, "8BSI") == 0) + return PT_8BSI; + if (strcmp(pixname, "8BUI") == 0) + return PT_8BUI; + if (strcmp(pixname, "16BSI") == 0) + return PT_16BSI; + if (strcmp(pixname, "16BUI") == 0) + return PT_16BUI; + if (strcmp(pixname, "32BSI") == 0) + return PT_32BSI; + if (strcmp(pixname, "32BUI") == 0) + return PT_32BUI; + if (strcmp(pixname, "32BF") == 0) + return PT_32BF; + if (strcmp(pixname, "64BF") == 0) + return PT_64BF; + + return PT_END; +} + +const char* +rt_pixtype_name(rt_pixtype pixtype) { + switch (pixtype) { + case PT_1BB: + return "1BB"; + case PT_2BUI: + return "2BUI"; + case PT_4BUI: + return "4BUI"; + case PT_8BSI: + return "8BSI"; + case PT_8BUI: + return "8BUI"; + case PT_16BSI: + return "16BSI"; + case PT_16BUI: + return "16BUI"; + case PT_32BSI: + return "32BSI"; + case PT_32BUI: + return "32BUI"; + case PT_32BF: + return "32BF"; + case PT_64BF: + return "64BF"; + default: + rterror("rt_pixtype_name: Unknown pixeltype %d", pixtype); + return "Unknown"; + } +} + +/** + * Return minimum value possible for pixel type + * + * @param pixtype: the pixel type to get minimum possible value for + * + * @return the minimum possible value for the pixel type. + */ +double +rt_pixtype_get_min_value(rt_pixtype pixtype) { + switch (pixtype) { + case PT_1BB: + case PT_2BUI: + case PT_4BUI: + case PT_8BUI: { + return (double) CHAR_MIN; + } + case PT_8BSI: { + return (double) SCHAR_MIN; + } + case PT_16BSI: + case PT_16BUI: { + return (double) SHRT_MIN; + } + case PT_32BSI: + case PT_32BUI: { + return (double) INT_MIN; + } + case PT_32BF: { + return (double) -FLT_MAX; + } + case PT_64BF: { + return (double) -DBL_MAX; + } + default: { + rterror("rt_pixtype_get_min_value: Unknown pixeltype %d", pixtype); + return (double) CHAR_MIN; + } + } +} + +/*- rt_band ----------------------------------------------------------*/ + +/** + * Create an in-db rt_band with no data + * + * @param width : number of pixel columns + * @param height : number of pixel rows + * @param pixtype : pixel type for the band + * @param hasnodata : indicates if the band has nodata value + * @param nodataval : the nodata value, will be appropriately + * truncated to fit the pixtype size. + * @param data : pointer to actual band data, required to + * be aligned accordingly to + * rt_pixtype_aligment(pixtype) and big enough + * to hold raster width*height values. + * Data will NOT be copied, ownership is left + * to caller which is responsible to keep it + * allocated for the whole lifetime of the returned + * rt_band. + * + * @return an rt_band, or 0 on failure + */ +rt_band +rt_band_new_inline( + uint16_t width, uint16_t height, + rt_pixtype pixtype, + uint32_t hasnodata, double nodataval, + uint8_t* data +) { + rt_band band = NULL; + + assert(NULL != data); + + band = rtalloc(sizeof(struct rt_band_t)); + if (band == NULL) { + rterror("rt_band_new_inline: Out of memory allocating rt_band"); + return NULL; + } + + RASTER_DEBUGF(3, "Created rt_band @ %p with pixtype %s", band, rt_pixtype_name(pixtype)); + + band->pixtype = pixtype; + band->offline = 0; + band->width = width; + band->height = height; + band->hasnodata = hasnodata; + band->nodataval = 0; + band->data.mem = data; + band->ownsData = 0; + band->isnodata = FALSE; + band->raster = NULL; + + RASTER_DEBUGF(3, "Created rt_band with dimensions %d x %d", band->width, band->height); + + /* properly set nodataval as it may need to be constrained to the data type */ + if (hasnodata && rt_band_set_nodata(band, nodataval) < 0) { + rterror("rt_band_new_inline: Unable to set NODATA value"); + rtdealloc(band); + return NULL; + } + + return band; +} + +/** + * Create an out-db rt_band + * + * @param width : number of pixel columns + * @param height : number of pixel rows + * @param pixtype : pixel type for the band + * @param hasnodata : indicates if the band has nodata value + * @param nodataval : the nodata value, will be appropriately + * truncated to fit the pixtype size. + * @param bandNum : 0-based band number in the external file + * to associate this band with. + * @param path : NULL-terminated path string pointing to the file + * containing band data. The string will NOT be + * copied, ownership is left to caller which is + * responsible to keep it allocated for the whole + * lifetime of the returned rt_band. + * + * @return an rt_band, or 0 on failure + */ +rt_band +rt_band_new_offline( + uint16_t width, uint16_t height, + rt_pixtype pixtype, + uint32_t hasnodata, double nodataval, + uint8_t bandNum, const char* path +) { + rt_band band = NULL; + + assert(NULL != path); + + band = rtalloc(sizeof(struct rt_band_t)); + if (band == NULL) { + rterror("rt_band_new_offline: Out of memory allocating rt_band"); + return NULL; + } + + RASTER_DEBUGF(3, "Created rt_band @ %p with pixtype %s", + band, rt_pixtype_name(pixtype) + ); + + band->pixtype = pixtype; + band->offline = 1; + band->width = width; + band->height = height; + band->hasnodata = hasnodata; + band->nodataval = 0; + band->isnodata = FALSE; + band->raster = NULL; + + /* properly set nodataval as it may need to be constrained to the data type */ + if (hasnodata && rt_band_set_nodata(band, nodataval) < 0) { + rterror("rt_band_new_offline: Unable to set NODATA value"); + rtdealloc(band); + return NULL; + } + + /* XXX QUESTION (jorgearevalo): What does exactly ownsData mean?? I think that + * ownsData = 0 ==> the memory for band->data is externally owned + * ownsData = 1 ==> the memory for band->data is internally owned + */ + band->ownsData = 0; + + band->data.offline.bandNum = bandNum; + + /* memory for data.offline.path should be managed externally */ + band->data.offline.path = (char *) path; + + band->data.offline.mem = NULL; + + return band; +} + +/** + * Create a new band duplicated from source band. Memory is allocated + * for band path (if band is offline) or band data (if band is online). + * The caller is responsible for freeing the memory when the returned + * rt_band is destroyed. + * + * @param : the band to copy + * + * @return an rt_band or NULL on failure + */ +rt_band +rt_band_duplicate(rt_band band) { + rt_band rtn = NULL; + assert(band != NULL); + + /* offline */ + if (band->offline) { + char *path = NULL; + path = rtalloc(sizeof(char) * (strlen(band->data.offline.path) + 1)); + if (path == NULL) { + rterror("rt_band_duplicate: Out of memory allocating offline band path"); + return NULL; + } + strcpy(path, band->data.offline.path); + + rtn = rt_band_new_offline( + band->width, band->height, + band->pixtype, + band->hasnodata, band->nodataval, + band->data.offline.bandNum, (const char *) path + ); + } + /* online */ + else { + uint8_t *data = NULL; + data = rtalloc(rt_pixtype_size(band->pixtype) * band->width * band->height); + if (data == NULL) { + rterror("rt_band_duplicate: Out of memory allocating online band data"); + return NULL; + } + memcpy(data, band->data.mem, rt_pixtype_size(band->pixtype) * band->width * band->height); + + rtn = rt_band_new_inline( + band->width, band->height, + band->pixtype, + band->hasnodata, band->nodataval, + data + ); + } + + if (rtn == NULL) + rterror("rt_band_duplicate: Could not copy band"); + + return rtn; +} + +int +rt_band_is_offline(rt_band band) { + + assert(NULL != band); + + + return band->offline; +} + +/** + * Destroy a raster band + * + * @param band : the band to destroy + */ +void +rt_band_destroy(rt_band band) { + + + RASTER_DEBUGF(3, "Destroying rt_band @ %p", band); + + /* offline band and has data, free as data is internally owned */ + if (band->offline && band->data.offline.mem != NULL) + rtdealloc(band->data.offline.mem); + + /* band->data content is externally owned */ + /* XXX jorgearevalo: not really... rt_band_from_wkb allocates memory for + * data.mem + */ + rtdealloc(band); +} + +const char* +rt_band_get_ext_path(rt_band band) { + + assert(NULL != band); + + + if (!band->offline) { + RASTER_DEBUG(3, "rt_band_get_ext_path: Band is not offline"); + return 0; + } + return band->data.offline.path; +} + +uint8_t +rt_band_get_ext_band_num(rt_band band) { + + assert(NULL != band); + + + if (!band->offline) { + RASTER_DEBUG(3, "rt_band_get_ext_path: Band is not offline"); + return 0; + } + return band->data.offline.bandNum; +} + +/** + * Get pointer to raster band data + * + * @param band : the band who's data to get + * + * @return void pointer to band data + */ +void * +rt_band_get_data(rt_band band) { + assert(NULL != band); + + if (band->offline) { + int state = 0; + + if (band->data.offline.mem != NULL) + return band->data.offline.mem; + + state = rt_band_load_offline_data(band); + if (state == 0) + return band->data.offline.mem; + else + return NULL; + } + else + return band->data.mem; +} + +/** + * Load offline band's data. Loaded data is internally owned + * and should not be released by the caller. Data will be + * released when band is destroyed with rt_band_destroy(). + * + * @param band : the band who's data to get + * + * @return 0 if success, non-zero if failure + */ +int +rt_band_load_offline_data(rt_band band) { + GDALDatasetH hdsSrc = NULL; + int nband = 0; + VRTDatasetH hdsDst = NULL; + VRTSourcedRasterBandH hbandDst = NULL; + double gt[6] = {0.}; + double ogt[6] = {0.}; + double offset[2] = {0}; + + rt_raster _rast = NULL; + rt_band _band = NULL; + + assert(band != NULL); + assert(band->raster != NULL); + + if (!band->offline) { + rterror("rt_band_load_offline_data: Band is not offline"); + return 1; + } + else if (!strlen(band->data.offline.path)) { + rterror("rt_band_load_offline_data: Offline band does not a have a specified file"); + return 1; + } + + GDALAllRegister(); + hdsSrc = GDALOpenShared(band->data.offline.path, GA_ReadOnly); + if (hdsSrc == NULL) { + rterror("rt_band_load_offline_data: Cannot open offline raster: %s", band->data.offline.path); + return 1; + } + + /* # of bands */ + nband = GDALGetRasterCount(hdsSrc); + if (!nband) { + rterror("rt_band_load_offline_data: No bands found in offline raster: %s", band->data.offline.path); + GDALClose(hdsSrc); + return 1; + } + /* bandNum is 0-based */ + else if (band->data.offline.bandNum + 1 > nband) { + rterror("rt_band_load_offline_data: Specified band %d not found in offline raster: %s", band->data.offline.bandNum, band->data.offline.path); + GDALClose(hdsSrc); + return 1; + } + + /* get raster's geotransform */ + rt_raster_get_geotransform_matrix(band->raster, gt); + RASTER_DEBUGF(3, "Raster geotransform (%f, %f, %f, %f, %f, %f)", + gt[0], gt[1], gt[2], gt[3], gt[4], gt[5]); + + /* get offline raster's geotransform */ + GDALGetGeoTransform(hdsSrc, ogt); + RASTER_DEBUGF(3, "Offline geotransform (%f, %f, %f, %f, %f, %f)", + ogt[0], ogt[1], ogt[2], ogt[3], ogt[4], ogt[5]); + + /* get offsets */ + rt_raster_geopoint_to_cell( + band->raster, + ogt[0], ogt[3], + &(offset[0]), &(offset[1]), + NULL + ); + RASTER_DEBUGF(4, "offsets: (%f, %f)", offset[0], offset[1]); + + /* XXX: should there be a check for the spatial attributes between the offline raster file and that of the raster? */ + + /* create VRT dataset */ + hdsDst = VRTCreate(band->width, band->height); + GDALSetGeoTransform(hdsDst, gt); + /* + GDALSetDescription(hdsDst, "/tmp/offline.vrt"); + */ + + /* add band as simple sources */ + GDALAddBand(hdsDst, rt_util_pixtype_to_gdal_datatype(band->pixtype), NULL); + hbandDst = (VRTSourcedRasterBandH) GDALGetRasterBand(hdsDst, 1); + + if (band->hasnodata) + GDALSetRasterNoDataValue(hbandDst, band->nodataval); + + VRTAddSimpleSource( + hbandDst, GDALGetRasterBand(hdsSrc, band->data.offline.bandNum + 1), + abs(offset[0]), abs(offset[1]), + band->width, band->height, + 0, 0, + band->width, band->height, + "near", VRT_NODATA_UNSET + ); + + /* make sure VRT reflects all changes */ + VRTFlushCache(hdsDst); + + /* convert VRT dataset to rt_raster */ + _rast = rt_raster_from_gdal_dataset(hdsDst); + + GDALClose(hdsDst); + /* XXX: need to find a way to clean up the GDALOpenShared datasets at end of transaction */ + /* GDALClose(hdsSrc); */ + + if (_rast == NULL) { + rterror("rt_band_load_offline_data: Cannot load data from offline raster: %s", band->data.offline.path); + return 1; + } + + _band = rt_raster_get_band(_rast, 0); + if (_band == NULL) { + rterror("rt_band_load_offline_data: Cannot load data from offline raster: %s", band->data.offline.path); + rt_raster_destroy(_rast); + return 1; + } + + /* band->data.offline.mem not NULL, free first */ + if (band->data.offline.mem != NULL) { + rtdealloc(band->data.offline.mem); + band->data.offline.mem = NULL; + } + + band->data.offline.mem = _band->data.mem; + + rtdealloc(_band); /* cannot use rt_band_destory */ + rt_raster_destroy(_rast); + + return 0; +} + +rt_pixtype +rt_band_get_pixtype(rt_band band) { + + assert(NULL != band); + + + return band->pixtype; +} + +uint16_t +rt_band_get_width(rt_band band) { + + assert(NULL != band); + + + return band->width; +} + +uint16_t +rt_band_get_height(rt_band band) { + + assert(NULL != band); + + + return band->height; +} + +#ifdef OPTIMIZE_SPACE + +/* + * Set given number of bits of the given byte, + * starting from given bitOffset (from the first) + * to the given value. + * + * Examples: + * char ch; + * ch=0; setBits(&ch, 1, 1, 0) -> ch==8 + * ch=0; setBits(&ch, 3, 2, 1) -> ch==96 (0x60) + * + * Note that number of bits set must be <= 8-bitOffset + * + */ +static void +setBits(char* ch, double val, int bits, int bitOffset) { + char mask = 0xFF >> (8 - bits); + char ival = val; + + + assert(8 - bitOffset >= bits); + + RASTER_DEBUGF(4, "ival:%d bits:%d mask:%hhx bitoffset:%d\n", + ival, bits, mask, bitOffset); + + /* clear all but significant bits from ival */ + ival &= mask; +#if POSTGIS_RASTER_WARN_ON_TRUNCATION > 0 + if (ival != val) { + rtwarn("Pixel value for %d-bits band got truncated" + " from %g to %hhu", bits, val, ival); + } +#endif /* POSTGIS_RASTER_WARN_ON_TRUNCATION */ + + RASTER_DEBUGF(4, " cleared ival:%hhx\n", ival); + + + /* Shift ival so the significant bits start at + * the first bit */ + ival <<= (8 - bitOffset - bits); + + RASTER_DEBUGF(4, " ival shifted:%hhx\n", ival); + RASTER_DEBUGF(4, " ch:%hhx\n", *ch); + + /* clear first bits of target */ + *ch &= ~(mask << (8 - bits - bitOffset)); + + RASTER_DEBUGF(4, " ch cleared:%hhx\n", *ch); + + /* Set the first bit of target */ + *ch |= ival; + + RASTER_DEBUGF(4, " ch ored:%hhx\n", *ch); + +} +#endif /* OPTIMIZE_SPACE */ + +int +rt_band_get_hasnodata_flag(rt_band band) { + + assert(NULL != band); + + + return band->hasnodata; +} + +void +rt_band_set_hasnodata_flag(rt_band band, int flag) { + + assert(NULL != band); + + + band->hasnodata = (flag) ? 1 : 0; +} + +void +rt_band_set_isnodata_flag(rt_band band, int flag) { + + assert(NULL != band); + + + band->isnodata = (flag) ? 1 : 0; +} + +int +rt_band_get_isnodata_flag(rt_band band) { + + assert(NULL != band); + + return band->isnodata; +} + +/** + * Set nodata value + * + * @param band : the band to set nodata value to + * @param val : the nodata value + * + * @return 0 on success, -1 on error (invalid pixel type), + * 1 on truncation/clamping/converting. + */ +int +rt_band_set_nodata(rt_band band, double val) { + rt_pixtype pixtype = PT_END; + /* + double oldnodataval = band->nodataval; + */ + + int32_t checkvalint = 0; + uint32_t checkvaluint = 0; + float checkvalfloat = 0; + double checkvaldouble = 0; + + + + assert(NULL != band); + + pixtype = band->pixtype; + + RASTER_DEBUGF(3, "rt_band_set_nodata: setting nodata value %g with band type %s", val, rt_pixtype_name(pixtype)); + + /* return -1 on out of range */ + switch (pixtype) { + case PT_1BB: + { + band->nodataval = rt_util_clamp_to_1BB(val); + checkvalint = band->nodataval; + break; + } + case PT_2BUI: + { + band->nodataval = rt_util_clamp_to_2BUI(val); + checkvalint = band->nodataval; + break; + } + case PT_4BUI: + { + band->nodataval = rt_util_clamp_to_4BUI(val); + checkvalint = band->nodataval; + break; + } + case PT_8BSI: + { + band->nodataval = rt_util_clamp_to_8BSI(val); + checkvalint = band->nodataval; + break; + } + case PT_8BUI: + { + band->nodataval = rt_util_clamp_to_8BUI(val); + checkvalint = band->nodataval; + break; + } + case PT_16BSI: + { + band->nodataval = rt_util_clamp_to_16BSI(val); + checkvalint = band->nodataval; + break; + } + case PT_16BUI: + { + band->nodataval = rt_util_clamp_to_16BUI(val); + checkvalint = band->nodataval; + break; + } + case PT_32BSI: + { + band->nodataval = rt_util_clamp_to_32BSI(val); + checkvalint = band->nodataval; + break; + } + case PT_32BUI: + { + band->nodataval = rt_util_clamp_to_32BUI(val); + checkvaluint = band->nodataval; + break; + } + case PT_32BF: + { + band->nodataval = rt_util_clamp_to_32F(val); + checkvalfloat = band->nodataval; + break; + } + case PT_64BF: + { + band->nodataval = val; + checkvaldouble = band->nodataval; + break; + } + default: + { + rterror("rt_band_set_nodata: Unknown pixeltype %d", pixtype); + band->hasnodata = 0; + return -1; + } + } + + RASTER_DEBUGF(3, "rt_band_set_nodata: band->hasnodata = %d", band->hasnodata); + RASTER_DEBUGF(3, "rt_band_set_nodata: band->nodataval = %f", band->nodataval); + + + /* the nodata value was just set, so this band has NODATA */ + rt_band_set_hasnodata_flag(band, 1); + + /* If the nodata value is different from the previous one, we need to check + * again if the band is a nodata band + * TODO: NO, THAT'S TOO SLOW!!! + */ + + /* + if (FLT_NEQ(band->nodataval, oldnodataval)) + rt_band_check_is_nodata(band); + */ + + if (rt_util_dbl_trunc_warning( + val, + checkvalint, checkvaluint, + checkvalfloat, checkvaldouble, + pixtype + )) { + return 1; + } + + return 0; +} + +/** + * Set values of multiple pixels. Unlike rt_band_set_pixel, + * values in vals are expected to be of the band's pixel type + * as this function uses memcpy. + * + * @param band : the band to set value to + * @param x : X coordinate (0-based) + * @param y : Y coordinate (0-based) + * @param vals : the pixel values to apply + * @param len : # of elements in vals + * + * @return 1 on success, 0 on error + */ +int +rt_band_set_pixel_line( + rt_band band, + int x, int y, + void *vals, uint16_t len +) { + rt_pixtype pixtype = PT_END; + int size = 0; + uint8_t *data = NULL; + uint32_t offset = 0; + + assert(NULL != band); + + if (band->offline) { + rterror("rt_band_set_pixel_line not implemented yet for OFFDB bands"); + return 0; + } + + pixtype = band->pixtype; + size = rt_pixtype_size(pixtype); + + if ( + x < 0 || x >= band->width || + y < 0 || y >= band->height + ) { + rterror("rt_band_set_pixel_line: Coordinates out of range (%d, %d) vs (%d, %d)", x, y, band->width, band->height); + return 0; + } + + data = rt_band_get_data(band); + offset = x + (y * band->width); + RASTER_DEBUGF(5, "offset = %d", offset); + + /* make sure len of values to copy don't exceed end of data */ + if (len > (band->width * band->height) - offset) { + rterror("rt_band_set_pixel_line: Unable to apply pixels as values length exceeds end of data"); + return 0; + } + + switch (pixtype) { + case PT_1BB: + case PT_2BUI: + case PT_4BUI: + case PT_8BUI: + case PT_8BSI: { + uint8_t *ptr = data; + ptr += offset; + memcpy(ptr, vals, size * len); + break; + } + case PT_16BUI: { + uint16_t *ptr = (uint16_t *) data; + ptr += offset; + memcpy(ptr, vals, size * len); + break; + } + case PT_16BSI: { + int16_t *ptr = (int16_t *) data; + ptr += offset; + memcpy(ptr, vals, size * len); + break; + } + case PT_32BUI: { + uint32_t *ptr = (uint32_t *) data; + ptr += offset; + memcpy(ptr, vals, size * len); + break; + } + case PT_32BSI: { + int32_t *ptr = (int32_t *) data; + ptr += offset; + memcpy(ptr, vals, size * len); + break; + } + case PT_32BF: { + float *ptr = (float *) data; + ptr += offset; + memcpy(ptr, vals, size * len); + break; + } + case PT_64BF: { + double *ptr = (double *) data; + ptr += offset; + memcpy(ptr, vals, size * len); + break; + } + default: { + rterror("rt_band_set_pixel_line: Unknown pixeltype %d", pixtype); + return 0; + } + } + +#if POSTGIS_DEBUG_LEVEL > 0 + { + double value; + rt_band_get_pixel(band, x, y, &value); + RASTER_DEBUGF(4, "pixel at (%d, %d) = %f", x, y, value); + } +#endif + + return 1; +} + +/** + * Set single pixel's value + * + * @param band : the band to set value to + * @param x : x ordinate (0-based) + * @param y : y ordinate (0-based) + * @param val : the pixel value + * + * @return 0 on success, -1 on error (value out of valid range), + * 1 on truncation/clamping/converting. + */ +int +rt_band_set_pixel( + rt_band band, + int x, int y, + double val +) { + rt_pixtype pixtype = PT_END; + unsigned char* data = NULL; + uint32_t offset = 0; + int rtn = 0; + + int32_t checkvalint = 0; + uint32_t checkvaluint = 0; + float checkvalfloat = 0; + double checkvaldouble = 0; + double checkval = 0; + + assert(NULL != band); + + if (band->offline) { + rterror("rt_band_set_pixel not implemented yet for OFFDB bands"); + return -1; + } + + pixtype = band->pixtype; + + if ( + x < 0 || x >= band->width || + y < 0 || y >= band->height + ) { + rterror("rt_band_set_pixel: Coordinates out of range"); + return -1; + } + + /* check that clamped value isn't clamped NODATA */ + if (band->hasnodata && pixtype != PT_64BF) { + double newval; + if (rt_band_corrected_clamped_value(band, val, &newval) == 1) { +#if POSTGIS_RASTER_WARN_ON_TRUNCATION > 0 + rtwarn("Value for pixel %d x %d has been corrected as clamped value becomes NODATA", x, y); +#endif + val = newval; + rtn = 1; + } + } + + data = rt_band_get_data(band); + offset = x + (y * band->width); + + switch (pixtype) { + case PT_1BB: { + data[offset] = rt_util_clamp_to_1BB(val); + checkvalint = data[offset]; + break; + } + case PT_2BUI: { + data[offset] = rt_util_clamp_to_2BUI(val); + checkvalint = data[offset]; + break; + } + case PT_4BUI: { + data[offset] = rt_util_clamp_to_4BUI(val); + checkvalint = data[offset]; + break; + } + case PT_8BSI: { + data[offset] = rt_util_clamp_to_8BSI(val); + checkvalint = (int8_t) data[offset]; + break; + } + case PT_8BUI: { + data[offset] = rt_util_clamp_to_8BUI(val); + checkvalint = data[offset]; + break; + } + case PT_16BSI: { + int16_t *ptr = (int16_t*) data; /* we assume correct alignment */ + ptr[offset] = rt_util_clamp_to_16BSI(val); + checkvalint = (int16_t) ptr[offset]; + break; + } + case PT_16BUI: { + uint16_t *ptr = (uint16_t*) data; /* we assume correct alignment */ + ptr[offset] = rt_util_clamp_to_16BUI(val); + checkvalint = ptr[offset]; + break; + } + case PT_32BSI: { + int32_t *ptr = (int32_t*) data; /* we assume correct alignment */ + ptr[offset] = rt_util_clamp_to_32BSI(val); + checkvalint = (int32_t) ptr[offset]; + break; + } + case PT_32BUI: { + uint32_t *ptr = (uint32_t*) data; /* we assume correct alignment */ + ptr[offset] = rt_util_clamp_to_32BUI(val); + checkvaluint = ptr[offset]; + break; + } + case PT_32BF: { + float *ptr = (float*) data; /* we assume correct alignment */ + ptr[offset] = rt_util_clamp_to_32F(val); + checkvalfloat = ptr[offset]; + break; + } + case PT_64BF: { + double *ptr = (double*) data; /* we assume correct alignment */ + ptr[offset] = val; + checkvaldouble = ptr[offset]; + break; + } + default: { + rterror("rt_band_set_pixel: Unknown pixeltype %d", pixtype); + return -1; + } + } + + /* If the stored value is different from no data, reset the isnodata flag */ + if (FLT_NEQ(checkval, band->nodataval)) { + band->isnodata = FALSE; + } + + /* + * If the pixel was a nodata value, now the band may be NODATA band) + * TODO: NO, THAT'S TOO SLOW!!! + */ + /* + else { + rt_band_check_is_nodata(band); + } + */ + + /* Overflow checking */ + if (rt_util_dbl_trunc_warning( + val, + checkvalint, checkvaluint, + checkvalfloat, checkvaldouble, + pixtype + )) { + return 1; + } + + return rtn; +} + +/** + * Get pixel value + * + * @param band : the band to set nodata value to + * @param x : x ordinate (0-based) + * @param y : x ordinate (0-based) + * @param *result: result if there is a value + * + * @return 0 on success, -1 on error (value out of valid range). + */ +int +rt_band_get_pixel( + rt_band band, + int x, int y, + double *result +) { + rt_pixtype pixtype = PT_END; + uint8_t* data = NULL; + uint32_t offset = 0; + + assert(NULL != band); + + pixtype = band->pixtype; + + if ( + x < 0 || x >= band->width || + y < 0 || y >= band->height + ) { + rtwarn("Attempting to get pixel value with out of range raster coordinates: (%d, %d)", x, y); + return -1; + } + + data = rt_band_get_data(band); + if (data == NULL) { + rterror("rt_band_get_pixel: Cannot get band data"); + return -1; + } + + offset = x + (y * band->width); /* +1 for the nodata value */ + + switch (pixtype) { + case PT_1BB: +#ifdef OPTIMIZE_SPACE + { + int byteOffset = offset / 8; + int bitOffset = offset % 8; + data += byteOffset; + + /* Bit to set is bitOffset into data */ + *result = getBits(data, val, 1, bitOffset); + return 0; + } +#endif + + case PT_2BUI: +#ifdef OPTIMIZE_SPACE + { + int byteOffset = offset / 4; + int bitOffset = offset % 4; + data += byteOffset; + + /* Bits to set start at bitOffset into data */ + *result = getBits(data, val, 2, bitOffset); + return 0; + } +#endif + + case PT_4BUI: +#ifdef OPTIMIZE_SPACE + { + int byteOffset = offset / 2; + int bitOffset = offset % 2; + data += byteOffset; + + /* Bits to set start at bitOffset into data */ + *result = getBits(data, val, 2, bitOffset); + return 0; + } +#endif + + case PT_8BSI: + { + int8_t val = data[offset]; + *result = val; + return 0; + } + case PT_8BUI: + { + uint8_t val = data[offset]; + *result = val; + return 0; + } + case PT_16BSI: + { + int16_t *ptr = (int16_t*) data; /* we assume correct alignment */ + *result = ptr[offset]; + return 0; + } + case PT_16BUI: + { + uint16_t *ptr = (uint16_t*) data; /* we assume correct alignment */ + *result = ptr[offset]; + return 0; + } + case PT_32BSI: + { + int32_t *ptr = (int32_t*) data; /* we assume correct alignment */ + *result = ptr[offset]; + return 0; + } + case PT_32BUI: + { + uint32_t *ptr = (uint32_t*) data; /* we assume correct alignment */ + *result = ptr[offset]; + return 0; + } + case PT_32BF: + { + float *ptr = (float*) data; /* we assume correct alignment */ + *result = ptr[offset]; + return 0; + } + case PT_64BF: + { + double *ptr = (double*) data; /* we assume correct alignment */ + *result = ptr[offset]; + return 0; + } + default: + { + rterror("rt_band_get_pixel: Unknown pixeltype %d", pixtype); + return -1; + } + } +} + +double +rt_band_get_nodata(rt_band band) { + + + assert(NULL != band); + + if (!band->hasnodata) + RASTER_DEBUGF(3, "Getting nodata value for a band without NODATA values. Using %g", band->nodataval); + + + return band->nodataval; +} + +double +rt_band_get_min_value(rt_band band) { + assert(NULL != band); + + return rt_pixtype_get_min_value(band->pixtype); +} + + +int +rt_band_check_is_nodata(rt_band band) { + int i, j, err; + double pxValue; + + assert(NULL != band); + + /* Check if band has nodata value */ + if (!band->hasnodata) { + RASTER_DEBUG(3, "Band has no NODATA value"); + band->isnodata = FALSE; + return FALSE; + } + + pxValue = band->nodataval; + + /* Check all pixels */ + for (i = 0; i < band->width; i++) { + for (j = 0; j < band->height; j++) { + err = rt_band_get_pixel(band, i, j, &pxValue); + if (err != 0) { + rterror("rt_band_check_is_nodata: Cannot get band pixel"); + return FALSE; + } + else if (FLT_NEQ(pxValue, band->nodataval)) { + band->isnodata = FALSE; + return FALSE; + } + } + } + + band->isnodata = TRUE; + return TRUE; +} + +/** + * Compare clamped value to band's clamped NODATA value. If unclamped + * value is exactly unclamped NODATA value, function returns -1. + * + * @param band: the band whose NODATA value will be used for comparison + * @param val: the value to compare to the NODATA value + * + * @return 1 if clamped value is clamped NODATA + * 0 if clamped value is NOT clamped NODATA + * -1 otherwise + */ +int +rt_band_clamped_value_is_nodata(rt_band band, double val) { + + assert(NULL != band); + + /* no NODATA, so no need to test */ + if (!band->hasnodata) + return -1; + + /* value is exactly NODATA */ + if (FLT_EQ(val, band->nodataval)) + return -1; + + switch (band->pixtype) { + case PT_1BB: + if (rt_util_clamp_to_1BB(val) == rt_util_clamp_to_1BB(band->nodataval)) + return 1; + break; + case PT_2BUI: + if (rt_util_clamp_to_2BUI(val) == rt_util_clamp_to_2BUI(band->nodataval)) + return 1; + break; + case PT_4BUI: + if (rt_util_clamp_to_4BUI(val) == rt_util_clamp_to_4BUI(band->nodataval)) + return 1; + break; + case PT_8BSI: + if (rt_util_clamp_to_8BSI(val) == rt_util_clamp_to_8BSI(band->nodataval)) + return 1; + break; + case PT_8BUI: + if (rt_util_clamp_to_8BUI(val) == rt_util_clamp_to_8BUI(band->nodataval)) + return 1; + break; + case PT_16BSI: + if (rt_util_clamp_to_16BSI(val) == rt_util_clamp_to_16BSI(band->nodataval)) + return 1; + break; + case PT_16BUI: + if (rt_util_clamp_to_16BUI(val) == rt_util_clamp_to_16BUI(band->nodataval)) + return 1; + break; + case PT_32BSI: + if (rt_util_clamp_to_32BSI(val) == rt_util_clamp_to_32BSI(band->nodataval)) + return 1; + break; + case PT_32BUI: + if (rt_util_clamp_to_32BUI(val) == rt_util_clamp_to_32BUI(band->nodataval)) + return 1; + break; + case PT_32BF: + if (FLT_EQ(rt_util_clamp_to_32F(val), rt_util_clamp_to_32F(band->nodataval))) + return 1; + break; + case PT_64BF: + break; + default: + rterror("rt_band_clamped_value_is_nodata: Unknown pixeltype %d", band->pixtype); + return -1; + } + + return 0; +} + +/** + * Correct value when clamped value is clamped NODATA value. Correction + * does NOT occur if unclamped value is exactly unclamped NODATA value. + * + * @param band: the band whose NODATA value will be used for comparison + * @param val: the value to compare to the NODATA value and correct + * @param newval: pointer to corrected value + * + * @return 0 on error, 1 if corrected, -1 otherwise + */ +int +rt_band_corrected_clamped_value(rt_band band, double val, double *newval) { + double minval = 0.; + + assert(NULL != band); + + /* check that value needs correcting */ + if (rt_band_clamped_value_is_nodata(band, val) != 1) { + *newval = val; + return -1; + } + + minval = rt_pixtype_get_min_value(band->pixtype); + *newval = val; + + switch (band->pixtype) { + case PT_1BB: + *newval = !band->nodataval; + break; + case PT_2BUI: + if (rt_util_clamp_to_2BUI(val) == rt_util_clamp_to_2BUI(minval)) + (*newval)++; + else + (*newval)--; + break; + case PT_4BUI: + if (rt_util_clamp_to_4BUI(val) == rt_util_clamp_to_4BUI(minval)) + (*newval)++; + else + (*newval)--; + break; + case PT_8BSI: + if (rt_util_clamp_to_8BSI(val) == rt_util_clamp_to_8BSI(minval)) + (*newval)++; + else + (*newval)--; + break; + case PT_8BUI: + if (rt_util_clamp_to_8BUI(val) == rt_util_clamp_to_8BUI(minval)) + (*newval)++; + else + (*newval)--; + break; + case PT_16BSI: + if (rt_util_clamp_to_16BSI(val) == rt_util_clamp_to_16BSI(minval)) + (*newval)++; + else + (*newval)--; + break; + case PT_16BUI: + if (rt_util_clamp_to_16BUI(val) == rt_util_clamp_to_16BUI(minval)) + (*newval)++; + else + (*newval)--; + break; + case PT_32BSI: + if (rt_util_clamp_to_32BSI(val) == rt_util_clamp_to_32BSI(minval)) + (*newval)++; + else + (*newval)--; + break; + case PT_32BUI: + if (rt_util_clamp_to_32BUI(val) == rt_util_clamp_to_32BUI(minval)) + (*newval)++; + else + (*newval)--; + break; + case PT_32BF: + if (FLT_EQ(rt_util_clamp_to_32F(val), rt_util_clamp_to_32F(minval))) + *newval += FLT_EPSILON; + else + *newval -= FLT_EPSILON; + break; + case PT_64BF: + break; + default: + rterror("rt_band_alternative_clamped_value: Unknown pixeltype %d", band->pixtype); + return 0; + } + + return 1; +} + +/** + * Compute summary statistics for a band + * + * @param band: the band to query for summary stats + * @param exclude_nodata_value: if non-zero, ignore nodata values + * @param sample: percentage of pixels to sample + * @param inc_vals: flag to include values in return struct + * @param cK: number of pixels counted thus far in coverage + * @param cM: M component of 1-pass stddev for coverage + * @param cQ: Q component of 1-pass stddev for coverage + * + * @return the summary statistics for a band + */ +rt_bandstats +rt_band_get_summary_stats( + rt_band band, + int exclude_nodata_value, double sample, int inc_vals, + uint64_t *cK, double *cM, double *cQ +) { + uint8_t *data = NULL; + uint32_t x = 0; + uint32_t y = 0; + uint32_t z = 0; + uint32_t offset = 0; + uint32_t diff = 0; + int rtn; + int hasnodata = FALSE; + double nodata = 0; + double *values = NULL; + double value; + rt_bandstats stats = NULL; + + uint32_t do_sample = 0; + uint32_t sample_size = 0; + uint32_t sample_per = 0; + uint32_t sample_int = 0; + uint32_t i = 0; + uint32_t j = 0; + double sum = 0; + uint32_t k = 0; + double M = 0; + double Q = 0; + +#if POSTGIS_DEBUG_LEVEL > 0 + clock_t start, stop; + double elapsed = 0; +#endif + + RASTER_DEBUG(3, "starting"); +#if POSTGIS_DEBUG_LEVEL > 0 + start = clock(); +#endif + + assert(NULL != band); + + /* band is empty (width < 1 || height < 1) */ + if (band->width < 1 || band->height < 1) { + stats = (rt_bandstats) rtalloc(sizeof(struct rt_bandstats_t)); + if (NULL == stats) { + rterror("rt_band_get_summary_stats: Unable to allocate memory for stats"); + return NULL; + } + + rtwarn("Band is empty as width and/or height is 0"); + + stats->sample = 1; + stats->sorted = 0; + stats->values = NULL; + stats->count = 0; + stats->min = stats->max = 0; + stats->sum = 0; + stats->mean = 0; + stats->stddev = -1; + + return stats; + } + + data = rt_band_get_data(band); + if (data == NULL) { + rterror("rt_band_get_summary_stats: Cannot get band data"); + return NULL; + } + + hasnodata = rt_band_get_hasnodata_flag(band); + if (hasnodata != FALSE) + nodata = rt_band_get_nodata(band); + else + exclude_nodata_value = 0; + + RASTER_DEBUGF(3, "nodata = %f", nodata); + RASTER_DEBUGF(3, "hasnodata = %d", hasnodata); + RASTER_DEBUGF(3, "exclude_nodata_value = %d", exclude_nodata_value); + + /* entire band is nodata */ + if (rt_band_get_isnodata_flag(band) != FALSE) { + stats = (rt_bandstats) rtalloc(sizeof(struct rt_bandstats_t)); + if (NULL == stats) { + rterror("rt_band_get_summary_stats: Unable to allocate memory for stats"); + return NULL; + } + + stats->sample = 1; + stats->sorted = 0; + stats->values = NULL; + + if (exclude_nodata_value) { + rtwarn("All pixels of band have the NODATA value"); + + stats->count = 0; + stats->min = stats->max = 0; + stats->sum = 0; + stats->mean = 0; + stats->stddev = -1; + } + else { + stats->count = band->width * band->height; + stats->min = stats->max = nodata; + stats->sum = stats->count * nodata; + stats->mean = nodata; + stats->stddev = 0; + } + + return stats; + } + + /* clamp percentage */ + if ( + (sample < 0 || FLT_EQ(sample, 0.0)) || + (sample > 1 || FLT_EQ(sample, 1.0)) + ) { + do_sample = 0; + sample = 1; + } + else + do_sample = 1; + RASTER_DEBUGF(3, "do_sample = %d", do_sample); + + /* sample all pixels */ + if (!do_sample) { + sample_size = band->width * band->height; + sample_per = band->height; + } + /* + randomly sample a percentage of available pixels + sampling method is known as + "systematic random sample without replacement" + */ + else { + sample_size = round((band->width * band->height) * sample); + sample_per = round(sample_size / band->width); + if (sample_per < 1) + sample_per = 1; + sample_int = round(band->height / sample_per); + srand(time(NULL)); + } + + RASTER_DEBUGF(3, "sampling %d of %d available pixels w/ %d per set" + , sample_size, (band->width * band->height), sample_per); + + if (inc_vals) { + values = rtalloc(sizeof(double) * sample_size); + if (NULL == values) { + rtwarn("Unable to allocate memory for values"); + inc_vals = 0; + } + } + + /* initialize stats */ + stats = (rt_bandstats) rtalloc(sizeof(struct rt_bandstats_t)); + if (NULL == stats) { + rterror("rt_band_get_summary_stats: Unable to allocate memory for stats"); + return NULL; + } + stats->sample = sample; + stats->count = 0; + stats->sum = 0; + stats->mean = 0; + stats->stddev = -1; + stats->min = stats->max = 0; + stats->values = NULL; + stats->sorted = 0; + + for (x = 0, j = 0, k = 0; x < band->width; x++) { + y = -1; + diff = 0; + + for (i = 0, z = 0; i < sample_per; i++) { + if (!do_sample) + y = i; + else { + offset = (rand() % sample_int) + 1; + y += diff + offset; + diff = sample_int - offset; + } + RASTER_DEBUGF(5, "(x, y, z) = (%d, %d, %d)", x, y, z); + if (y >= band->height || z > sample_per) break; + + rtn = rt_band_get_pixel(band, x, y, &value); +#if POSTGIS_DEBUG_LEVEL > 0 + if (rtn != -1) { + RASTER_DEBUGF(5, "(x, y, value) = (%d,%d, %f)", x, y, value); + } +#endif + + j++; + if ( + rtn != -1 && ( + !exclude_nodata_value || ( + exclude_nodata_value && + (hasnodata != FALSE) && ( + FLT_NEQ(value, nodata) && + (rt_band_clamped_value_is_nodata(band, value) != 1) + ) + ) + ) + ) { + + /* inc_vals set, collect pixel values */ + if (inc_vals) values[k] = value; + + /* average */ + k++; + sum += value; + + /* + one-pass standard deviation + http://www.eecs.berkeley.edu/~mhoemmen/cs194/Tutorials/variance.pdf + */ + if (k == 1) { + Q = 0; + M = value; + } + else { + Q += (((k - 1) * pow(value - M, 2)) / k); + M += ((value - M ) / k); + } + + /* coverage one-pass standard deviation */ + if (NULL != cK) { + (*cK)++; + if (*cK == 1) { + *cQ = 0; + *cM = value; + } + else { + *cQ += (((*cK - 1) * pow(value - *cM, 2)) / *cK); + *cM += ((value - *cM ) / *cK); + } + } + + /* min/max */ + if (stats->count < 1) { + stats->count = 1; + stats->min = stats->max = value; + } + else { + if (value < stats->min) + stats->min = value; + if (value > stats->max) + stats->max = value; + } + + } + + z++; + } + } + + RASTER_DEBUG(3, "sampling complete"); + + stats->count = k; + if (k > 0) { + if (inc_vals) { + /* free unused memory */ + if (sample_size != k) { + values = rtrealloc(values, k * sizeof(double)); + } + + stats->values = values; + } + + stats->sum = sum; + stats->mean = sum / k; + + /* standard deviation */ + if (!do_sample) + stats->stddev = sqrt(Q / k); + /* sample deviation */ + else { + if (k < 2) + stats->stddev = -1; + else + stats->stddev = sqrt(Q / (k - 1)); + } + } + /* inc_vals thus values allocated but not used */ + else if (inc_vals) + rtdealloc(values); + + /* if count is zero and do_sample is one */ + if (k < 0 && do_sample) + rtwarn("All sampled pixels of band have the NODATA value"); + +#if POSTGIS_DEBUG_LEVEL > 0 + stop = clock(); + elapsed = ((double) (stop - start)) / CLOCKS_PER_SEC; + RASTER_DEBUGF(3, "(time, count, mean, stddev, min, max) = (%0.4f, %d, %f, %f, %f, %f)", + elapsed, stats->count, stats->mean, stats->stddev, stats->min, stats->max); +#endif + + RASTER_DEBUG(3, "done"); + return stats; +} + +/** + * Count the distribution of data + * + * @param stats: a populated stats struct for processing + * @param bin_count: the number of bins to group the data by + * @param bin_width: the width of each bin as an array + * @param bin_width_count: number of values in bin_width + * @param right: evaluate bins by (a,b] rather than default [a,b) + * @param min: user-defined minimum value of the histogram + * a value less than the minimum value is not counted in any bins + * if min = max, min and max are not used + * @param max: user-defined maximum value of the histogram + * a value greater than the max value is not counted in any bins + * if min = max, min and max are not used + * @param rtn_count: set to the number of bins being returned + * + * @return the histogram of the data + */ +rt_histogram +rt_band_get_histogram(rt_bandstats stats, + int bin_count, double *bin_width, int bin_width_count, + int right, double min, double max, uint32_t *rtn_count) { + rt_histogram bins = NULL; + int init_width = 0; + int i; + int j; + double tmp; + double value; + int sum = 0; + int user_minmax = 0; + double qmin; + double qmax; + +#if POSTGIS_DEBUG_LEVEL > 0 + clock_t start, stop; + double elapsed = 0; +#endif + + RASTER_DEBUG(3, "starting"); +#if POSTGIS_DEBUG_LEVEL > 0 + start = clock(); +#endif + + assert(NULL != stats); + + if (stats->count < 1 || NULL == stats->values) { + rterror("rt_util_get_histogram: rt_bandstats object has no value"); + return NULL; + } + + /* bin width must be positive numbers and not zero */ + if (NULL != bin_width && bin_width_count > 0) { + for (i = 0; i < bin_width_count; i++) { + if (bin_width[i] < 0 || FLT_EQ(bin_width[i], 0.0)) { + rterror("rt_util_get_histogram: bin_width element is less than or equal to zero"); + return NULL; + } + } + } + + /* ignore min and max parameters */ + if (FLT_EQ(max, min)) { + qmin = stats->min; + qmax = stats->max; + } + else { + user_minmax = 1; + qmin = min; + qmax = max; + if (qmin > qmax) { + qmin = max; + qmax = min; + } + } + + /* # of bins not provided */ + if (bin_count <= 0) { + /* + determine # of bins + http://en.wikipedia.org/wiki/Histogram + + all computed bins are assumed to have equal width + */ + /* Square-root choice for stats->count < 30 */ + if (stats->count < 30) + bin_count = ceil(sqrt(stats->count)); + /* Sturges' formula for stats->count >= 30 */ + else + bin_count = ceil(log2((double) stats->count) + 1.); + + /* bin_width_count provided and bin_width has value */ + if (bin_width_count > 0 && NULL != bin_width) { + /* user has defined something specific */ + if (bin_width_count > bin_count) + bin_count = bin_width_count; + else if (bin_width_count > 1) { + tmp = 0; + for (i = 0; i < bin_width_count; i++) tmp += bin_width[i]; + bin_count = ceil((qmax - qmin) / tmp) * bin_width_count; + } + else + bin_count = ceil((qmax - qmin) / bin_width[0]); + } + /* set bin width count to zero so that one can be calculated */ + else { + bin_width_count = 0; + } + } + + /* min and max the same */ + if (FLT_EQ(qmax, qmin)) bin_count = 1; + + RASTER_DEBUGF(3, "bin_count = %d", bin_count); + + /* bin count = 1, all values are in one bin */ + if (bin_count < 2) { + bins = rtalloc(sizeof(struct rt_histogram_t)); + if (NULL == bins) { + rterror("rt_util_get_histogram: Unable to allocate memory for histogram"); + return NULL; + } + + bins->count = stats->count; + bins->percent = -1; + bins->min = qmin; + bins->max = qmax; + bins->inc_min = bins->inc_max = 1; + + *rtn_count = bin_count; + return bins; + } + + /* establish bin width */ + if (bin_width_count == 0) { + bin_width_count = 1; + + /* bin_width unallocated */ + if (NULL == bin_width) { + bin_width = rtalloc(sizeof(double)); + if (NULL == bin_width) { + rterror("rt_util_get_histogram: Unable to allocate memory for bin widths"); + return NULL; + } + init_width = 1; + } + + bin_width[0] = (qmax - qmin) / bin_count; + } + + /* initialize bins */ + bins = rtalloc(bin_count * sizeof(struct rt_histogram_t)); + if (NULL == bins) { + rterror("rt_util_get_histogram: Unable to allocate memory for histogram"); + if (init_width) rtdealloc(bin_width); + return NULL; + } + if (!right) + tmp = qmin; + else + tmp = qmax; + for (i = 0; i < bin_count;) { + for (j = 0; j < bin_width_count; j++) { + bins[i].count = 0; + bins->percent = -1; + + if (!right) { + bins[i].min = tmp; + tmp += bin_width[j]; + bins[i].max = tmp; + + bins[i].inc_min = 1; + bins[i].inc_max = 0; + } + else { + bins[i].max = tmp; + tmp -= bin_width[j]; + bins[i].min = tmp; + + bins[i].inc_min = 0; + bins[i].inc_max = 1; + } + + i++; + } + } + if (!right) { + bins[bin_count - 1].inc_max = 1; + + /* align last bin to the max value */ + if (bins[bin_count - 1].max < qmax) + bins[bin_count - 1].max = qmax; + } + else { + bins[bin_count - 1].inc_min = 1; + + /* align first bin to the min value */ + if (bins[bin_count - 1].min > qmin) + bins[bin_count - 1].min = qmin; + } + + /* process the values */ + for (i = 0; i < stats->count; i++) { + value = stats->values[i]; + + /* default, [a, b) */ + if (!right) { + for (j = 0; j < bin_count; j++) { + if ( + (!bins[j].inc_max && value < bins[j].max) || ( + bins[j].inc_max && ( + (value < bins[j].max) || + FLT_EQ(value, bins[j].max) + ) + ) + ) { + bins[j].count++; + sum++; + break; + } + } + } + /* (a, b] */ + else { + for (j = 0; j < bin_count; j++) { + if ( + (!bins[j].inc_min && value > bins[j].min) || ( + bins[j].inc_min && ( + (value > bins[j].min) || + FLT_EQ(value, bins[j].min) + ) + ) + ) { + bins[j].count++; + sum++; + break; + } + } + } + } + + for (i = 0; i < bin_count; i++) { + bins[i].percent = ((double) bins[i].count) / sum; + } + +#if POSTGIS_DEBUG_LEVEL > 0 + stop = clock(); + elapsed = ((double) (stop - start)) / CLOCKS_PER_SEC; + RASTER_DEBUGF(3, "elapsed time = %0.4f", elapsed); + + for (j = 0; j < bin_count; j++) { + RASTER_DEBUGF(5, "(min, max, inc_min, inc_max, count, sum, percent) = (%f, %f, %d, %d, %d, %d, %f)", + bins[j].min, bins[j].max, bins[j].inc_min, bins[j].inc_max, bins[j].count, sum, bins[j].percent); + } +#endif + + if (init_width) rtdealloc(bin_width); + *rtn_count = bin_count; + RASTER_DEBUG(3, "done"); + return bins; +} + +/** + * Compute the default set of or requested quantiles for a set of data + * the quantile formula used is same as Excel and R default method + * + * @param stats: a populated stats struct for processing + * @param quantiles: the quantiles to be computed + * @param quantiles_count: the number of quantiles to be computed + * @param rtn_count: set to the number of quantiles being returned + * + * @return the default set of or requested quantiles for a band + */ +rt_quantile +rt_band_get_quantiles(rt_bandstats stats, + double *quantiles, int quantiles_count, uint32_t *rtn_count) { + rt_quantile rtn; + int init_quantiles = 0; + int i = 0; + double h; + int hl; + +#if POSTGIS_DEBUG_LEVEL > 0 + clock_t start, stop; + double elapsed = 0; +#endif + + RASTER_DEBUG(3, "starting"); +#if POSTGIS_DEBUG_LEVEL > 0 + start = clock(); +#endif + + assert(NULL != stats); + + if (stats->count < 1 || NULL == stats->values) { + rterror("rt_band_get_quantiles: rt_bandstats object has no value"); + return NULL; + } + + /* quantiles not provided */ + if (NULL == quantiles) { + /* quantile count not specified, default to quartiles */ + if (quantiles_count < 2) + quantiles_count = 5; + + quantiles = rtalloc(sizeof(double) * quantiles_count); + init_quantiles = 1; + if (NULL == quantiles) { + rterror("rt_band_get_quantiles: Unable to allocate memory for quantile input"); + return NULL; + } + + quantiles_count--; + for (i = 0; i <= quantiles_count; i++) + quantiles[i] = ((double) i) / quantiles_count; + quantiles_count++; + } + + /* check quantiles */ + for (i = 0; i < quantiles_count; i++) { + if (quantiles[i] < 0. || quantiles[i] > 1.) { + rterror("rt_band_get_quantiles: Quantile value not between 0 and 1"); + if (init_quantiles) rtdealloc(quantiles); + return NULL; + } + } + quicksort(quantiles, quantiles + quantiles_count - 1); + + /* initialize rt_quantile */ + rtn = rtalloc(sizeof(struct rt_quantile_t) * quantiles_count); + if (NULL == rtn) { + rterror("rt_band_get_quantiles: Unable to allocate memory for quantile output"); + if (init_quantiles) rtdealloc(quantiles); + return NULL; + } + + /* sort values */ + if (!stats->sorted) { + quicksort(stats->values, stats->values + stats->count - 1); + stats->sorted = 1; + } + + /* + make quantiles + + formula is that used in R (method 7) and Excel from + http://en.wikipedia.org/wiki/Quantile + */ + for (i = 0; i < quantiles_count; i++) { + rtn[i].quantile = quantiles[i]; + + h = ((stats->count - 1.) * quantiles[i]) + 1.; + hl = floor(h); + + /* h greater than hl, do full equation */ + if (h > hl) + rtn[i].value = stats->values[hl - 1] + ((h - hl) * (stats->values[hl] - stats->values[hl - 1])); + /* shortcut as second part of equation is zero */ + else + rtn[i].value = stats->values[hl - 1]; + } + +#if POSTGIS_DEBUG_LEVEL > 0 + stop = clock(); + elapsed = ((double) (stop - start)) / CLOCKS_PER_SEC; + RASTER_DEBUGF(3, "elapsed time = %0.4f", elapsed); +#endif + + *rtn_count = quantiles_count; + if (init_quantiles) rtdealloc(quantiles); + RASTER_DEBUG(3, "done"); + return rtn; +} + +static struct quantile_llist_element *quantile_llist_search( + struct quantile_llist_element *element, + double needle +) { + if (NULL == element) + return NULL; + else if (FLT_NEQ(needle, element->value)) { + if (NULL != element->next) + return quantile_llist_search(element->next, needle); + else + return NULL; + } + else + return element; +} + +static struct quantile_llist_element *quantile_llist_insert( + struct quantile_llist_element *element, + double value, + uint32_t *idx +) { + struct quantile_llist_element *qle = NULL; + + if (NULL == element) { + qle = rtalloc(sizeof(struct quantile_llist_element)); + RASTER_DEBUGF(4, "qle @ %p is only element in list", qle); + if (NULL == qle) return NULL; + + qle->value = value; + qle->count = 1; + + qle->prev = NULL; + qle->next = NULL; + + if (NULL != idx) *idx = 0; + return qle; + } + else if (value > element->value) { + if (NULL != idx) *idx += 1; + if (NULL != element->next) + return quantile_llist_insert(element->next, value, idx); + /* insert as last element in list */ + else { + qle = rtalloc(sizeof(struct quantile_llist_element)); + RASTER_DEBUGF(4, "insert qle @ %p as last element", qle); + if (NULL == qle) return NULL; + + qle->value = value; + qle->count = 1; + + qle->prev = element; + qle->next = NULL; + element->next = qle; + + return qle; + } + } + /* insert before current element */ + else { + qle = rtalloc(sizeof(struct quantile_llist_element)); + RASTER_DEBUGF(4, "insert qle @ %p before current element", qle); + if (NULL == qle) return NULL; + + qle->value = value; + qle->count = 1; + + if (NULL != element->prev) element->prev->next = qle; + qle->next = element; + qle->prev = element->prev; + element->prev = qle; + + return qle; + } +} + +static int quantile_llist_delete(struct quantile_llist_element *element) { + if (NULL == element) return 0; + + /* beginning of list */ + if (NULL == element->prev && NULL != element->next) { + element->next->prev = NULL; + } + /* end of list */ + else if (NULL != element->prev && NULL == element->next) { + element->prev->next = NULL; + } + /* within list */ + else if (NULL != element->prev && NULL != element->next) { + element->prev->next = element->next; + element->next->prev = element->prev; + } + + RASTER_DEBUGF(4, "qle @ %p destroyed", element); + rtdealloc(element); + + return 1; +} + +int quantile_llist_destroy(struct quantile_llist **list, uint32_t list_count) { + struct quantile_llist_element *element = NULL; + uint32_t i; + + if (NULL == *list) return 0; + + for (i = 0; i < list_count; i++) { + element = (*list)[i].head; + while (NULL != element->next) { + quantile_llist_delete(element->next); + } + quantile_llist_delete(element); + + rtdealloc((*list)[i].index); + } + + rtdealloc(*list); + return 1; +} + +static void quantile_llist_index_update(struct quantile_llist *qll, struct quantile_llist_element *qle, uint32_t idx) { + uint32_t anchor = (uint32_t) floor(idx / 100); + + if (qll->tail == qle) return; + + if ( + (anchor != 0) && ( + NULL == qll->index[anchor].element || + idx <= qll->index[anchor].index + ) + ) { + qll->index[anchor].index = idx; + qll->index[anchor].element = qle; + } + + if (anchor != 0 && NULL == qll->index[0].element) { + qll->index[0].index = 0; + qll->index[0].element = qll->head; + } +} + +static void quantile_llist_index_delete(struct quantile_llist *qll, struct quantile_llist_element *qle) { + uint32_t i = 0; + + for (i = 0; i < qll->index_max; i++) { + if ( + NULL == qll->index[i].element || + (qll->index[i].element) != qle + ) { + continue; + } + + RASTER_DEBUGF(5, "deleting index: %d => %f", i, qle->value); + qll->index[i].index = -1; + qll->index[i].element = NULL; + } +} + +static struct quantile_llist_element *quantile_llist_index_search( + struct quantile_llist *qll, + double value, + uint32_t *index +) { + uint32_t i = 0, j = 0; + RASTER_DEBUGF(5, "searching index for value %f", value); + + for (i = 0; i < qll->index_max; i++) { + if (NULL == qll->index[i].element) { + if (i < 1) break; + continue; + } + if (value > (qll->index[i]).element->value) continue; + + if (FLT_EQ(value, qll->index[i].element->value)) { + RASTER_DEBUGF(5, "using index value at %d = %f", i, qll->index[i].element->value); + *index = i * 100; + return qll->index[i].element; + } + else if (i > 0) { + for (j = 1; j < i; j++) { + if (NULL != qll->index[i - j].element) { + RASTER_DEBUGF(5, "using index value at %d = %f", i - j, qll->index[i - j].element->value); + *index = (i - j) * 100; + return qll->index[i - j].element; + } + } + } + } + + *index = 0; + return qll->head; +} + +static void quantile_llist_index_reset(struct quantile_llist *qll) { + uint32_t i = 0; + + RASTER_DEBUG(5, "resetting index"); + for (i = 0; i < qll->index_max; i++) { + qll->index[i].index = -1; + qll->index[i].element = NULL; + } +} + +/** + * Compute the default set of or requested quantiles for a coverage + * + * This function is based upon the algorithm described in: + * + * A One-Pass Space-Efficient Algorithm for Finding Quantiles (1995) + * by Rakesh Agrawal, Arun Swami + * in Proc. 7th Intl. Conf. Management of Data (COMAD-95) + * + * http://www.almaden.ibm.com/cs/projects/iis/hdb/Publications/papers/comad95.pdf + * + * In the future, it may be worth exploring algorithms that don't + * require the size of the coverage + * + * @param band: the band to include in the quantile search + * @param exclude_nodata_value: if non-zero, ignore nodata values + * @param sample: percentage of pixels to sample + * @param cov_count: number of values in coverage + * @param qlls: set of quantile_llist structures + * @param qlls_count: the number of quantile_llist structures + * @param quantiles: the quantiles to be computed + * if bot qlls and quantiles provided, qlls is used + * @param quantiles_count: the number of quantiles to be computed + * @param rtn_count: the number of quantiles being returned + * + * @return the default set of or requested quantiles for a band + */ +rt_quantile +rt_band_get_quantiles_stream(rt_band band, + int exclude_nodata_value, double sample, + uint64_t cov_count, + struct quantile_llist **qlls, uint32_t *qlls_count, + double *quantiles, int quantiles_count, + uint32_t *rtn_count) { + rt_quantile rtn = NULL; + int init_quantiles = 0; + + struct quantile_llist *qll = NULL; + struct quantile_llist_element *qle = NULL; + struct quantile_llist_element *qls = NULL; + const uint32_t MAX_VALUES = 750; + + uint8_t *data = NULL; + int hasnodata = FALSE; + double nodata = 0; + double value; + + uint32_t a = 0; + uint32_t i = 0; + uint32_t j = 0; + uint32_t k = 0; + uint32_t x = 0; + uint32_t y = 0; + uint32_t z = 0; + uint32_t idx = 0; + uint32_t offset = 0; + uint32_t diff = 0; + uint8_t exists = 0; + + uint32_t do_sample = 0; + uint32_t sample_size = 0; + uint32_t sample_per = 0; + uint32_t sample_int = 0; + int status; + + RASTER_DEBUG(3, "starting"); + + assert(NULL != band); + assert(cov_count > 1); + RASTER_DEBUGF(3, "cov_count = %d", cov_count); + + + data = rt_band_get_data(band); + if (data == NULL) { + rterror("rt_band_get_summary_stats: Cannot get band data"); + return NULL; + } + + hasnodata = rt_band_get_hasnodata_flag(band); + if (hasnodata != FALSE) + nodata = rt_band_get_nodata(band); + else + exclude_nodata_value = 0; + RASTER_DEBUGF(3, "nodata = %f", nodata); + RASTER_DEBUGF(3, "hasnodata = %d", hasnodata); + RASTER_DEBUGF(3, "exclude_nodata_value = %d", exclude_nodata_value); + + /* quantile_llist not provided */ + if (NULL == *qlls) { + /* quantiles not provided */ + if (NULL == quantiles) { + /* quantile count not specified, default to quartiles */ + if (quantiles_count < 2) + quantiles_count = 5; + + quantiles = rtalloc(sizeof(double) * quantiles_count); + init_quantiles = 1; + if (NULL == quantiles) { + rterror("rt_band_get_quantiles_stream: Unable to allocate memory for quantile input"); + return NULL; + } + + quantiles_count--; + for (i = 0; i <= quantiles_count; i++) + quantiles[i] = ((double) i) / quantiles_count; + quantiles_count++; + } + + /* check quantiles */ + for (i = 0; i < quantiles_count; i++) { + if (quantiles[i] < 0. || quantiles[i] > 1.) { + rterror("rt_band_get_quantiles_stream: Quantile value not between 0 and 1"); + if (init_quantiles) rtdealloc(quantiles); + return NULL; + } + } + quicksort(quantiles, quantiles + quantiles_count - 1); + + /* initialize linked-list set */ + *qlls_count = quantiles_count * 2; + RASTER_DEBUGF(4, "qlls_count = %d", *qlls_count); + *qlls = rtalloc(sizeof(struct quantile_llist) * *qlls_count); + if (NULL == *qlls) { + rterror("rt_band_get_quantiles_stream: Unable to allocate memory for quantile output"); + if (init_quantiles) rtdealloc(quantiles); + return NULL; + } + + j = (uint32_t) floor(MAX_VALUES / 100.) + 1; + for (i = 0; i < *qlls_count; i++) { + qll = &((*qlls)[i]); + qll->quantile = quantiles[(i * quantiles_count) / *qlls_count]; + qll->count = 0; + qll->sum1 = 0; + qll->sum2 = 0; + qll->head = NULL; + qll->tail = NULL; + + /* initialize index */ + qll->index = rtalloc(sizeof(struct quantile_llist_index) * j); + if (NULL == qll->index) { + rterror("rt_band_get_quantiles_stream: Unable to allocate memory for quantile output"); + if (init_quantiles) rtdealloc(quantiles); + return NULL; + } + qll->index_max = j; + quantile_llist_index_reset(qll); + + /* AL-GEQ */ + if (!(i % 2)) { + qll->algeq = 1; + qll->tau = (uint64_t) ROUND(cov_count - (cov_count * qll->quantile), 0); + if (qll->tau < 1) qll->tau = 1; + } + /* AL-GT */ + else { + qll->algeq = 0; + qll->tau = cov_count - (*qlls)[i - 1].tau + 1; + } + + RASTER_DEBUGF(4, "qll init: (algeq, quantile, count, tau, sum1, sum2) = (%d, %f, %d, %d, %d, %d)", + qll->algeq, qll->quantile, qll->count, qll->tau, qll->sum1, qll->sum2); + RASTER_DEBUGF(4, "qll init: (head, tail) = (%p, %p)", qll->head, qll->tail); + } + + if (init_quantiles) rtdealloc(quantiles); + } + + /* clamp percentage */ + if ( + (sample < 0 || FLT_EQ(sample, 0.0)) || + (sample > 1 || FLT_EQ(sample, 1.0)) + ) { + do_sample = 0; + sample = 1; + } + else + do_sample = 1; + RASTER_DEBUGF(3, "do_sample = %d", do_sample); + + /* sample all pixels */ + if (!do_sample) { + sample_size = band->width * band->height; + sample_per = band->height; + } + /* + randomly sample a percentage of available pixels + sampling method is known as + "systematic random sample without replacement" + */ + else { + sample_size = round((band->width * band->height) * sample); + sample_per = round(sample_size / band->width); + sample_int = round(band->height / sample_per); + srand(time(NULL)); + } + RASTER_DEBUGF(3, "sampling %d of %d available pixels w/ %d per set" + , sample_size, (band->width * band->height), sample_per); + + for (x = 0, j = 0, k = 0; x < band->width; x++) { + y = -1; + diff = 0; + + for (i = 0, z = 0; i < sample_per; i++) { + if (do_sample != 1) + y = i; + else { + offset = (rand() % sample_int) + 1; + y += diff + offset; + diff = sample_int - offset; + } + RASTER_DEBUGF(5, "(x, y, z) = (%d, %d, %d)", x, y, z); + if (y >= band->height || z > sample_per) break; + + status = rt_band_get_pixel(band, x, y, &value); + + j++; + if ( + status != -1 && ( + !exclude_nodata_value || ( + exclude_nodata_value && + (hasnodata != FALSE) && ( + FLT_NEQ(value, nodata) && + (rt_band_clamped_value_is_nodata(band, value) != 1) + ) + ) + ) + ) { + + /* process each quantile */ + for (a = 0; a < *qlls_count; a++) { + qll = &((*qlls)[a]); + qls = NULL; + RASTER_DEBUGF(4, "%d of %d (%f)", a + 1, *qlls_count, qll->quantile); + RASTER_DEBUGF(5, "qll before: (algeq, quantile, count, tau, sum1, sum2) = (%d, %f, %d, %d, %d, %d)", + qll->algeq, qll->quantile, qll->count, qll->tau, qll->sum1, qll->sum2); + RASTER_DEBUGF(5, "qll before: (head, tail) = (%p, %p)", qll->head, qll->tail); + + /* OPTIMIZATION: shortcuts for quantiles of zero or one */ + if (FLT_EQ(qll->quantile, 0.)) { + if (NULL != qll->head) { + if (value < qll->head->value) + qll->head->value = value; + } + else { + qle = quantile_llist_insert(qll->head, value, NULL); + qll->head = qle; + qll->tail = qle; + qll->count = 1; + } + + RASTER_DEBUGF(4, "quantile shortcut for %f\n\n", qll->quantile); + continue; + } + else if (FLT_EQ(qll->quantile, 1.)) { + if (NULL != qll->head) { + if (value > qll->head->value) + qll->head->value = value; + } + else { + qle = quantile_llist_insert(qll->head, value, NULL); + qll->head = qle; + qll->tail = qle; + qll->count = 1; + } + + RASTER_DEBUGF(4, "quantile shortcut for %f\n\n", qll->quantile); + continue; + } + + /* value exists in list */ + /* OPTIMIZATION: check to see if value exceeds last value */ + if (NULL != qll->tail && value > qll->tail->value) + qle = NULL; + /* OPTIMIZATION: check to see if value equals last value */ + else if (NULL != qll->tail && FLT_EQ(value, qll->tail->value)) + qle = qll->tail; + /* OPTIMIZATION: use index if possible */ + else { + qls = quantile_llist_index_search(qll, value, &idx); + qle = quantile_llist_search(qls, value); + } + + /* value found */ + if (NULL != qle) { + RASTER_DEBUGF(4, "%f found in list", value); + RASTER_DEBUGF(5, "qle before: (value, count) = (%f, %d)", qle->value, qle->count); + + qle->count++; + qll->sum1++; + + if (qll->algeq) + qll->sum2 = qll->sum1 - qll->head->count; + else + qll->sum2 = qll->sum1 - qll->tail->count; + + RASTER_DEBUGF(4, "qle after: (value, count) = (%f, %d)", qle->value, qle->count); + } + /* can still add element */ + else if (qll->count < MAX_VALUES) { + RASTER_DEBUGF(4, "Adding %f to list", value); + + /* insert */ + /* OPTIMIZATION: check to see if value exceeds last value */ + if (NULL != qll->tail && (value > qll->tail->value || FLT_EQ(value, qll->tail->value))) { + idx = qll->count; + qle = quantile_llist_insert(qll->tail, value, &idx); + } + /* OPTIMIZATION: use index if possible */ + else + qle = quantile_llist_insert(qls, value, &idx); + if (NULL == qle) return NULL; + RASTER_DEBUGF(5, "value added at index: %d => %f", idx, value); + qll->count++; + qll->sum1++; + + /* first element */ + if (NULL == qle->prev) + qll->head = qle; + /* last element */ + if (NULL == qle->next) + qll->tail = qle; + + if (qll->algeq) + qll->sum2 = qll->sum1 - qll->head->count; + else + qll->sum2 = qll->sum1 - qll->tail->count; + + /* index is only needed if there are at least 100 values */ + quantile_llist_index_update(qll, qle, idx); + + RASTER_DEBUGF(5, "qle, prev, next, head, tail = %p, %p, %p, %p, %p", qle, qle->prev, qle->next, qll->head, qll->tail); + } + /* AL-GEQ */ + else if (qll->algeq) { + RASTER_DEBUGF(4, "value, head->value = %f, %f", value, qll->head->value); + + if (value < qll->head->value) { + /* ignore value if test isn't true */ + if (qll->sum1 >= qll->tau) { + RASTER_DEBUGF(4, "skipping %f", value); + } + else { + + /* delete last element */ + RASTER_DEBUGF(4, "deleting %f from list", qll->tail->value); + qle = qll->tail->prev; + RASTER_DEBUGF(5, "to-be tail is %f with count %d", qle->value, qle->count); + qle->count += qll->tail->count; + quantile_llist_index_delete(qll, qll->tail); + quantile_llist_delete(qll->tail); + qll->tail = qle; + qll->count--; + RASTER_DEBUGF(5, "tail is %f with count %d", qll->tail->value, qll->tail->count); + + /* insert value */ + RASTER_DEBUGF(4, "adding %f to list", value); + /* OPTIMIZATION: check to see if value exceeds last value */ + if (NULL != qll->tail && (value > qll->tail->value || FLT_EQ(value, qll->tail->value))) { + idx = qll->count; + qle = quantile_llist_insert(qll->tail, value, &idx); + } + /* OPTIMIZATION: use index if possible */ + else { + qls = quantile_llist_index_search(qll, value, &idx); + qle = quantile_llist_insert(qls, value, &idx); + } + if (NULL == qle) return NULL; + RASTER_DEBUGF(5, "value added at index: %d => %f", idx, value); + qll->count++; + qll->sum1++; + + /* first element */ + if (NULL == qle->prev) + qll->head = qle; + /* last element */ + if (NULL == qle->next) + qll->tail = qle; + + qll->sum2 = qll->sum1 - qll->head->count; + + quantile_llist_index_update(qll, qle, idx); + + RASTER_DEBUGF(5, "qle, head, tail = %p, %p, %p", qle, qll->head, qll->tail); + + } + } + else { + qle = qll->tail; + while (NULL != qle) { + if (qle->value < value) { + qle->count++; + qll->sum1++; + qll->sum2 = qll->sum1 - qll->head->count; + RASTER_DEBUGF(4, "incremented count of %f by 1 to %d", qle->value, qle->count); + break; + } + + qle = qle->prev; + } + } + } + /* AL-GT */ + else { + RASTER_DEBUGF(4, "value, tail->value = %f, %f", value, qll->tail->value); + + if (value > qll->tail->value) { + /* ignore value if test isn't true */ + if (qll->sum1 >= qll->tau) { + RASTER_DEBUGF(4, "skipping %f", value); + } + else { + + /* delete last element */ + RASTER_DEBUGF(4, "deleting %f from list", qll->head->value); + qle = qll->head->next; + RASTER_DEBUGF(5, "to-be tail is %f with count %d", qle->value, qle->count); + qle->count += qll->head->count; + quantile_llist_index_delete(qll, qll->head); + quantile_llist_delete(qll->head); + qll->head = qle; + qll->count--; + quantile_llist_index_update(qll, NULL, 0); + RASTER_DEBUGF(5, "tail is %f with count %d", qll->head->value, qll->head->count); + + /* insert value */ + RASTER_DEBUGF(4, "adding %f to list", value); + /* OPTIMIZATION: check to see if value exceeds last value */ + if (NULL != qll->tail && (value > qll->tail->value || FLT_EQ(value, qll->tail->value))) { + idx = qll->count; + qle = quantile_llist_insert(qll->tail, value, &idx); + } + /* OPTIMIZATION: use index if possible */ + else { + qls = quantile_llist_index_search(qll, value, &idx); + qle = quantile_llist_insert(qls, value, &idx); + } + if (NULL == qle) return NULL; + RASTER_DEBUGF(5, "value added at index: %d => %f", idx, value); + qll->count++; + qll->sum1++; + + /* first element */ + if (NULL == qle->prev) + qll->head = qle; + /* last element */ + if (NULL == qle->next) + qll->tail = qle; + + qll->sum2 = qll->sum1 - qll->tail->count; + + quantile_llist_index_update(qll, qle, idx); + + RASTER_DEBUGF(5, "qle, head, tail = %p, %p, %p", qle, qll->head, qll->tail); + + } + } + else { + qle = qll->head; + while (NULL != qle) { + if (qle->value > value) { + qle->count++; + qll->sum1++; + qll->sum2 = qll->sum1 - qll->tail->count; + RASTER_DEBUGF(4, "incremented count of %f by 1 to %d", qle->value, qle->count); + break; + } + + qle = qle->next; + } + } + } + + RASTER_DEBUGF(5, "sum2, tau = %d, %d", qll->sum2, qll->tau); + if (qll->sum2 >= qll->tau) { + /* AL-GEQ */ + if (qll->algeq) { + RASTER_DEBUGF(4, "deleting first element %f from list", qll->head->value); + + if (NULL != qll->head->next) { + qle = qll->head->next; + qll->sum1 -= qll->head->count; + qll->sum2 = qll->sum1 - qle->count; + quantile_llist_index_delete(qll, qll->head); + quantile_llist_delete(qll->head); + qll->head = qle; + qll->count--; + + quantile_llist_index_update(qll, NULL, 0); + } + else { + quantile_llist_delete(qll->head); + qll->head = NULL; + qll->tail = NULL; + qll->sum1 = 0; + qll->sum2 = 0; + qll->count = 0; + + quantile_llist_index_reset(qll); + } + } + /* AL-GT */ + else { + RASTER_DEBUGF(4, "deleting first element %f from list", qll->tail->value); + + if (NULL != qll->tail->prev) { + qle = qll->tail->prev; + qll->sum1 -= qll->tail->count; + qll->sum2 = qll->sum1 - qle->count; + quantile_llist_index_delete(qll, qll->tail); + quantile_llist_delete(qll->tail); + qll->tail = qle; + qll->count--; + } + else { + quantile_llist_delete(qll->tail); + qll->head = NULL; + qll->tail = NULL; + qll->sum1 = 0; + qll->sum2 = 0; + qll->count = 0; + + quantile_llist_index_reset(qll); + } + } + } + + RASTER_DEBUGF(5, "qll after: (algeq, quantile, count, tau, sum1, sum2) = (%d, %f, %d, %d, %d, %d)", + qll->algeq, qll->quantile, qll->count, qll->tau, qll->sum1, qll->sum2); + RASTER_DEBUGF(5, "qll after: (head, tail) = (%p, %p)\n\n", qll->head, qll->tail); + } + + } + else { + RASTER_DEBUGF(5, "skipping value at (x, y) = (%d, %d)", x, y); + } + + z++; + } + } + + /* process quantiles */ + *rtn_count = *qlls_count / 2; + rtn = rtalloc(sizeof(struct rt_quantile_t) * *rtn_count); + if (NULL == rtn) return NULL; + + RASTER_DEBUGF(3, "returning %d quantiles", *rtn_count); + for (i = 0, k = 0; i < *qlls_count; i++) { + qll = &((*qlls)[i]); + + exists = 0; + for (x = 0; x < k; x++) { + if (FLT_EQ(qll->quantile, rtn[x].quantile)) { + exists = 1; + break; + } + } + if (exists) continue; + + RASTER_DEBUGF(5, "qll: (algeq, quantile, count, tau, sum1, sum2) = (%d, %f, %d, %d, %d, %d)", + qll->algeq, qll->quantile, qll->count, qll->tau, qll->sum1, qll->sum2); + RASTER_DEBUGF(5, "qll: (head, tail) = (%p, %p)", qll->head, qll->tail); + + rtn[k].quantile = qll->quantile; + rtn[k].has_value = 0; + + /* check that qll->head and qll->tail have value */ + if (qll->head == NULL || qll->tail == NULL) + continue; + + /* AL-GEQ */ + if (qll->algeq) + qle = qll->head; + /* AM-GT */ + else + qle = qll->tail; + + exists = 0; + for (j = i + 1; j < *qlls_count; j++) { + if (FLT_EQ((*qlls)[j].quantile, qll->quantile)) { + + RASTER_DEBUGF(5, "qlls[%d]: (algeq, quantile, count, tau, sum1, sum2) = (%d, %f, %d, %d, %d, %d)", + j, (*qlls)[j].algeq, (*qlls)[j].quantile, (*qlls)[j].count, (*qlls)[j].tau, (*qlls)[j].sum1, (*qlls)[j].sum2); + RASTER_DEBUGF(5, "qlls[%d]: (head, tail) = (%p, %p)", j, (*qlls)[j].head, (*qlls)[j].tail); + + exists = 1; + break; + } + } + + /* weighted average for quantile */ + if (exists) { + if ((*qlls)[j].algeq) { + rtn[k].value = ((qle->value * qle->count) + ((*qlls)[j].head->value * (*qlls)[j].head->count)) / (qle->count + (*qlls)[j].head->count); + RASTER_DEBUGF(5, "qlls[%d].head: (value, count) = (%f, %d)", j, (*qlls)[j].head->value, (*qlls)[j].head->count); + } + else { + rtn[k].value = ((qle->value * qle->count) + ((*qlls)[j].tail->value * (*qlls)[j].tail->count)) / (qle->count + (*qlls)[j].tail->count); + RASTER_DEBUGF(5, "qlls[%d].tail: (value, count) = (%f, %d)", j, (*qlls)[j].tail->value, (*qlls)[j].tail->count); + } + } + /* straight value for quantile */ + else { + rtn[k].value = qle->value; + } + rtn[k].has_value = 1; + RASTER_DEBUGF(3, "(quantile, value) = (%f, %f)\n\n", rtn[k].quantile, rtn[k].value); + + k++; + } + + RASTER_DEBUG(3, "done"); + return rtn; +} + +/** + * Count the number of times provided value(s) occur in + * the band + * + * @param band: the band to query for minimum and maximum pixel values + * @param exclude_nodata_value: if non-zero, ignore nodata values + * @param search_values: array of values to count + * @param search_values_count: the number of search values + * @param roundto: the decimal place to round the values to + * @param rtn_total: the number of pixels examined in the band + * @param rtn_count: the number of value counts being returned + * + * @return the number of times the provide value(s) occur + */ +rt_valuecount +rt_band_get_value_count(rt_band band, int exclude_nodata_value, + double *search_values, uint32_t search_values_count, double roundto, + uint32_t *rtn_total, uint32_t *rtn_count) { + rt_valuecount vcnts = NULL; + rt_pixtype pixtype = PT_END; + uint8_t *data = NULL; + int hasnodata = FALSE; + double nodata = 0; + + int scale = 0; + int doround = 0; + double tmpd = 0; + int i = 0; + + uint32_t x = 0; + uint32_t y = 0; + int rtn; + double pxlval; + double rpxlval; + uint32_t total = 0; + int vcnts_count = 0; + int new_valuecount = 0; + +#if POSTGIS_DEBUG_LEVEL > 0 + clock_t start, stop; + double elapsed = 0; +#endif + + RASTER_DEBUG(3, "starting"); +#if POSTGIS_DEBUG_LEVEL > 0 + start = clock(); +#endif + + assert(NULL != band); + + data = rt_band_get_data(band); + if (data == NULL) { + rterror("rt_band_get_summary_stats: Cannot get band data"); + return NULL; + } + + pixtype = band->pixtype; + + hasnodata = rt_band_get_hasnodata_flag(band); + if (hasnodata != FALSE) + nodata = rt_band_get_nodata(band); + else + exclude_nodata_value = 0; + + RASTER_DEBUGF(3, "nodata = %f", nodata); + RASTER_DEBUGF(3, "hasnodata = %d", hasnodata); + RASTER_DEBUGF(3, "exclude_nodata_value = %d", exclude_nodata_value); + + /* process roundto */ + if (roundto < 0 || FLT_EQ(roundto, 0.0)) { + roundto = 0; + scale = 0; + } + /* tenths, hundredths, thousandths, etc */ + else if (roundto < 1) { + switch (pixtype) { + /* integer band types don't have digits after the decimal place */ + case PT_1BB: + case PT_2BUI: + case PT_4BUI: + case PT_8BSI: + case PT_8BUI: + case PT_16BSI: + case PT_16BUI: + case PT_32BSI: + case PT_32BUI: + roundto = 0; + break; + /* floating points, check the rounding */ + case PT_32BF: + case PT_64BF: + for (scale = 0; scale <= 20; scale++) { + tmpd = roundto * pow(10, scale); + if (FLT_EQ((tmpd - ((int) tmpd)), 0.0)) break; + } + break; + case PT_END: + break; + } + } + /* ones, tens, hundreds, etc */ + else { + for (scale = 0; scale >= -20; scale--) { + tmpd = roundto * pow(10, scale); + if (tmpd < 1 || FLT_EQ(tmpd, 1.0)) { + if (scale == 0) doround = 1; + break; + } + } + } + + if (scale != 0 || doround) + doround = 1; + else + doround = 0; + RASTER_DEBUGF(3, "scale = %d", scale); + RASTER_DEBUGF(3, "doround = %d", doround); + + /* process search_values */ + if (search_values_count > 0 && NULL != search_values) { + vcnts = (rt_valuecount) rtalloc(sizeof(struct rt_valuecount_t) * search_values_count); + if (NULL == vcnts) { + rterror("rt_band_get_count_of_values: Unable to allocate memory for value counts"); + *rtn_count = 0; + return NULL; + } + + for (i = 0; i < search_values_count; i++) { + vcnts[i].count = 0; + vcnts[i].percent = 0; + if (!doround) + vcnts[i].value = search_values[i]; + else + vcnts[i].value = ROUND(search_values[i], scale); + } + vcnts_count = i; + } + else + search_values_count = 0; + RASTER_DEBUGF(3, "search_values_count = %d", search_values_count); + + /* entire band is nodata */ + if (rt_band_get_isnodata_flag(band) != FALSE) { + if (exclude_nodata_value) { + rtwarn("All pixels of band have the NODATA value"); + return NULL; + } + else { + if (search_values_count > 0) { + /* check for nodata match */ + for (i = 0; i < search_values_count; i++) { + if (!doround) + tmpd = nodata; + else + tmpd = ROUND(nodata, scale); + + if (FLT_NEQ(tmpd, vcnts[i].value)) + continue; + + vcnts[i].count = band->width * band->height; + if (NULL != rtn_total) *rtn_total = vcnts[i].count; + vcnts->percent = 1.0; + } + + *rtn_count = vcnts_count; + } + /* no defined search values */ + else { + vcnts = (rt_valuecount) rtalloc(sizeof(struct rt_valuecount_t)); + if (NULL == vcnts) { + rterror("rt_band_get_count_of_values: Unable to allocate memory for value counts"); + *rtn_count = 0; + return NULL; + } + + vcnts->value = nodata; + vcnts->count = band->width * band->height; + if (NULL != rtn_total) *rtn_total = vcnts[i].count; + vcnts->percent = 1.0; + + *rtn_count = 1; + } + + return vcnts; + } + } + + for (x = 0; x < band->width; x++) { + for (y = 0; y < band->height; y++) { + rtn = rt_band_get_pixel(band, x, y, &pxlval); + + /* error getting value, continue */ + if (rtn == -1) continue; + + if ( + !exclude_nodata_value || ( + exclude_nodata_value && + (hasnodata != FALSE) && ( + FLT_NEQ(pxlval, nodata) && + (rt_band_clamped_value_is_nodata(band, pxlval) != 1) + ) + ) + ) { + total++; + if (doround) { + rpxlval = ROUND(pxlval, scale); + } + else + rpxlval = pxlval; + RASTER_DEBUGF(5, "(pxlval, rpxlval) => (%0.6f, %0.6f)", pxlval, rpxlval); + + new_valuecount = 1; + /* search for match in existing valuecounts */ + for (i = 0; i < vcnts_count; i++) { + /* match found */ + if (FLT_EQ(vcnts[i].value, rpxlval)) { + vcnts[i].count++; + new_valuecount = 0; + RASTER_DEBUGF(5, "(value, count) => (%0.6f, %d)", vcnts[i].value, vcnts[i].count); + break; + } + } + + /* + don't add new valuecount either because + - no need for new one + - user-defined search values + */ + if (!new_valuecount || search_values_count > 0) continue; + + /* add new valuecount */ + vcnts = rtrealloc(vcnts, sizeof(struct rt_valuecount_t) * (vcnts_count + 1)); + if (NULL == vcnts) { + rterror("rt_band_get_count_of_values: Unable to allocate memory for value counts"); + *rtn_count = 0; + return NULL; + } + + vcnts[vcnts_count].value = rpxlval; + vcnts[vcnts_count].count = 1; + vcnts[vcnts_count].percent = 0; + RASTER_DEBUGF(5, "(value, count) => (%0.6f, %d)", vcnts[vcnts_count].value, vcnts[vcnts_count].count); + vcnts_count++; + } + } + } + +#if POSTGIS_DEBUG_LEVEL > 0 + stop = clock(); + elapsed = ((double) (stop - start)) / CLOCKS_PER_SEC; + RASTER_DEBUGF(3, "elapsed time = %0.4f", elapsed); +#endif + + for (i = 0; i < vcnts_count; i++) { + vcnts[i].percent = (double) vcnts[i].count / total; + RASTER_DEBUGF(5, "(value, count) => (%0.6f, %d)", vcnts[i].value, vcnts[i].count); + } + + RASTER_DEBUG(3, "done"); + if (NULL != rtn_total) *rtn_total = total; + *rtn_count = vcnts_count; + return vcnts; +} + +/** + * Returns new band with values reclassified + * + * @param srcband : the band who's values will be reclassified + * @param pixtype : pixel type of the new band + * @param hasnodata : indicates if the band has a nodata value + * @param nodataval : nodata value for the new band + * @param exprset : array of rt_reclassexpr structs + * @param exprcount : number of elements in expr + * + * @return a new rt_band or 0 on error + */ +rt_band +rt_band_reclass(rt_band srcband, rt_pixtype pixtype, + uint32_t hasnodata, double nodataval, rt_reclassexpr *exprset, + int exprcount) { + rt_band band = NULL; + uint32_t width = 0; + uint32_t height = 0; + int numval = 0; + int memsize = 0; + void *mem = NULL; + uint32_t src_hasnodata = 0; + double src_nodataval = 0.0; + + int rtn; + uint32_t x; + uint32_t y; + int i; + double or = 0; + double ov = 0; + double nr = 0; + double nv = 0; + int do_nv = 0; + rt_reclassexpr expr = NULL; + + assert(NULL != srcband); + assert(NULL != exprset); + + /* source nodata */ + src_hasnodata = rt_band_get_hasnodata_flag(srcband); + src_nodataval = rt_band_get_nodata(srcband); + + /* size of memory block to allocate */ + width = rt_band_get_width(srcband); + height = rt_band_get_height(srcband); + numval = width * height; + memsize = rt_pixtype_size(pixtype) * numval; + mem = (int *) rtalloc(memsize); + if (!mem) { + rterror("rt_band_reclass: Could not allocate memory for band"); + return 0; + } + + /* initialize to zero */ + if (!hasnodata) { + memset(mem, 0, memsize); + } + /* initialize to nodataval */ + else { + int32_t checkvalint = 0; + uint32_t checkvaluint = 0; + double checkvaldouble = 0; + float checkvalfloat = 0; + + switch (pixtype) { + case PT_1BB: + { + uint8_t *ptr = mem; + uint8_t clamped_initval = rt_util_clamp_to_1BB(nodataval); + for (i = 0; i < numval; i++) + ptr[i] = clamped_initval; + checkvalint = ptr[0]; + break; + } + case PT_2BUI: + { + uint8_t *ptr = mem; + uint8_t clamped_initval = rt_util_clamp_to_2BUI(nodataval); + for (i = 0; i < numval; i++) + ptr[i] = clamped_initval; + checkvalint = ptr[0]; + break; + } + case PT_4BUI: + { + uint8_t *ptr = mem; + uint8_t clamped_initval = rt_util_clamp_to_4BUI(nodataval); + for (i = 0; i < numval; i++) + ptr[i] = clamped_initval; + checkvalint = ptr[0]; + break; + } + case PT_8BSI: + { + int8_t *ptr = mem; + int8_t clamped_initval = rt_util_clamp_to_8BSI(nodataval); + for (i = 0; i < numval; i++) + ptr[i] = clamped_initval; + checkvalint = ptr[0]; + break; + } + case PT_8BUI: + { + uint8_t *ptr = mem; + uint8_t clamped_initval = rt_util_clamp_to_8BUI(nodataval); + for (i = 0; i < numval; i++) + ptr[i] = clamped_initval; + checkvalint = ptr[0]; + break; + } + case PT_16BSI: + { + int16_t *ptr = mem; + int16_t clamped_initval = rt_util_clamp_to_16BSI(nodataval); + for (i = 0; i < numval; i++) + ptr[i] = clamped_initval; + checkvalint = ptr[0]; + break; + } + case PT_16BUI: + { + uint16_t *ptr = mem; + uint16_t clamped_initval = rt_util_clamp_to_16BUI(nodataval); + for (i = 0; i < numval; i++) + ptr[i] = clamped_initval; + checkvalint = ptr[0]; + break; + } + case PT_32BSI: + { + int32_t *ptr = mem; + int32_t clamped_initval = rt_util_clamp_to_32BSI(nodataval); + for (i = 0; i < numval; i++) + ptr[i] = clamped_initval; + checkvalint = ptr[0]; + break; + } + case PT_32BUI: + { + uint32_t *ptr = mem; + uint32_t clamped_initval = rt_util_clamp_to_32BUI(nodataval); + for (i = 0; i < numval; i++) + ptr[i] = clamped_initval; + checkvaluint = ptr[0]; + break; + } + case PT_32BF: + { + float *ptr = mem; + float clamped_initval = rt_util_clamp_to_32F(nodataval); + for (i = 0; i < numval; i++) + ptr[i] = clamped_initval; + checkvalfloat = ptr[0]; + break; + } + case PT_64BF: + { + double *ptr = mem; + for (i = 0; i < numval; i++) + ptr[i] = nodataval; + checkvaldouble = ptr[0]; + break; + } + default: + { + rterror("rt_band_reclass: Unknown pixeltype %d", pixtype); + rtdealloc(mem); + return 0; + } + } + + /* Overflow checking */ + rt_util_dbl_trunc_warning( + nodataval, + checkvalint, checkvaluint, + checkvalfloat, checkvaldouble, + pixtype + ); + } + RASTER_DEBUGF(3, "rt_band_reclass: width = %d height = %d", width, height); + + band = rt_band_new_inline(width, height, pixtype, hasnodata, nodataval, mem); + if (!band) { + rterror("rt_band_reclass: Could not create new band"); + rtdealloc(mem); + return 0; + } + RASTER_DEBUGF(3, "rt_band_reclass: new band @ %p", band); + + for (x = 0; x < width; x++) { + for (y = 0; y < height; y++) { + rtn = rt_band_get_pixel(srcband, x, y, &ov); + + /* error getting value, skip */ + if (rtn == -1) { + RASTER_DEBUGF(3, "Cannot get value at %d, %d", x, y); + continue; + } + + do { + do_nv = 0; + + /* no data*/ + if (src_hasnodata && hasnodata && FLT_EQ(ov, src_nodataval)) { + do_nv = 1; + break; + } + + for (i = 0; i < exprcount; i++) { + expr = exprset[i]; + + /* ov matches min and max*/ + if ( + FLT_EQ(expr->src.min, ov) && + FLT_EQ(expr->src.max, ov) + ) { + do_nv = 1; + break; + } + + /* process min */ + if (( + expr->src.exc_min && ( + expr->src.min > ov || + FLT_EQ(expr->src.min, ov) + )) || ( + expr->src.inc_min && ( + expr->src.min < ov || + FLT_EQ(expr->src.min, ov) + )) || ( + expr->src.min < ov + )) { + /* process max */ + if (( + expr->src.exc_max && ( + ov > expr->src.max || + FLT_EQ(expr->src.max, ov) + )) || ( + expr->src.inc_max && ( + ov < expr->src.max || + FLT_EQ(expr->src.max, ov) + )) || ( + ov < expr->src.max + )) { + do_nv = 1; + break; + } + } + } + } + while (0); + + /* no expression matched, do not continue */ + if (!do_nv) continue; + + /* converting a value from one range to another range + OldRange = (OldMax - OldMin) + NewRange = (NewMax - NewMin) + NewValue = (((OldValue - OldMin) * NewRange) / OldRange) + NewMin + */ + + /* nodata */ + if ( + src_hasnodata && + hasnodata && + FLT_EQ(ov, src_nodataval) + ) { + nv = nodataval; + } + /* + "src" min and max is the same, prevent division by zero + set nv to "dst" min, which should be the same as "dst" max + */ + else if (FLT_EQ(expr->src.max, expr->src.min)) { + nv = expr->dst.min; + } + else { + or = expr->src.max - expr->src.min; + nr = expr->dst.max - expr->dst.min; + nv = (((ov - expr->src.min) * nr) / or) + expr->dst.min; + + /* if dst range is from high to low */ + if (expr->dst.min > expr->dst.max) { + if (nv > expr->dst.min) + nv = expr->dst.min; + else if (nv < expr->dst.max) + nv = expr->dst.max; + } + /* if dst range is from low to high */ + else { + if (nv < expr->dst.min) + nv = expr->dst.min; + else if (nv > expr->dst.max) + nv = expr->dst.max; + } + } + + /* round the value for integers */ + switch (pixtype) { + case PT_1BB: + case PT_2BUI: + case PT_4BUI: + case PT_8BSI: + case PT_8BUI: + case PT_16BSI: + case PT_16BUI: + case PT_32BSI: + case PT_32BUI: + nv = round(nv); + break; + default: + break; + } + + RASTER_DEBUGF(3, "(%d, %d) ov: %f or: %f - %f nr: %f - %f nv: %f" + , x + , y + , ov + , (NULL != expr) ? expr->src.min : 0 + , (NULL != expr) ? expr->src.max : 0 + , (NULL != expr) ? expr->dst.min : 0 + , (NULL != expr) ? expr->dst.max : 0 + , nv + ); + if (rt_band_set_pixel(band, x, y, nv) < 0) { + rterror("rt_band_reclass: Could not assign value to new band"); + rt_band_destroy(band); + rtdealloc(mem); + return 0; + } + + expr = NULL; + } + } + + return band; +} + +/*- rt_raster --------------------------------------------------------*/ + +rt_raster +rt_raster_new(uint32_t width, uint32_t height) { + rt_raster ret = NULL; + + ret = (rt_raster) rtalloc(sizeof (struct rt_raster_t)); + if (!ret) { + rterror("rt_raster_new: Out of virtual memory creating an rt_raster"); + return NULL; + } + + RASTER_DEBUGF(3, "Created rt_raster @ %p", ret); + + assert(NULL != ret); + + if (width > 65535 || height > 65535) { + rterror("rt_raster_new: Dimensions requested exceed the maximum (65535 x 65535) permitted for a raster"); + return NULL; + } + + ret->width = width; + ret->height = height; + ret->scaleX = 1; + ret->scaleY = 1; + ret->ipX = 0.0; + ret->ipY = 0.0; + ret->skewX = 0.0; + ret->skewY = 0.0; + ret->srid = SRID_UNKNOWN; + + ret->numBands = 0; + ret->bands = 0; + return ret; +} + +void +rt_raster_destroy(rt_raster raster) { + + + RASTER_DEBUGF(3, "Destroying rt_raster @ %p", raster); + + if (raster->bands) { + rtdealloc(raster->bands); + } + rtdealloc(raster); +} + +uint16_t +rt_raster_get_width(rt_raster raster) { + + assert(NULL != raster); + + return raster->width; +} + +uint16_t +rt_raster_get_height(rt_raster raster) { + + assert(NULL != raster); + + return raster->height; +} + +void +rt_raster_set_scale(rt_raster raster, + double scaleX, double scaleY) { + + + assert(NULL != raster); + + raster->scaleX = scaleX; + raster->scaleY = scaleY; +} + +double +rt_raster_get_x_scale(rt_raster raster) { + + + assert(NULL != raster); + + return raster->scaleX; +} + +double +rt_raster_get_y_scale(rt_raster raster) { + + + assert(NULL != raster); + + return raster->scaleY; +} + +void +rt_raster_set_skews(rt_raster raster, + double skewX, double skewY) { + + + assert(NULL != raster); + + raster->skewX = skewX; + raster->skewY = skewY; +} + +double +rt_raster_get_x_skew(rt_raster raster) { + + + assert(NULL != raster); + + return raster->skewX; +} + +double +rt_raster_get_y_skew(rt_raster raster) { + + + assert(NULL != raster); + + return raster->skewY; +} + +void +rt_raster_set_offsets(rt_raster raster, double x, double y) { + + + assert(NULL != raster); + + raster->ipX = x; + raster->ipY = y; +} + +double +rt_raster_get_x_offset(rt_raster raster) { + + + assert(NULL != raster); + + return raster->ipX; +} + +double +rt_raster_get_y_offset(rt_raster raster) { + + + assert(NULL != raster); + + return raster->ipY; +} + +void +rt_raster_get_phys_params(rt_raster rast, + double *i_mag, double *j_mag, double *theta_i, double *theta_ij) +{ + double o11, o12, o21, o22 ; /* geotransform coefficients */ + + if (rast == NULL) return ; + if ( (i_mag==NULL) || (j_mag==NULL) || (theta_i==NULL) || (theta_ij==NULL)) + return ; + + /* retrieve coefficients from raster */ + o11 = rt_raster_get_x_scale(rast) ; + o12 = rt_raster_get_x_skew(rast) ; + o21 = rt_raster_get_y_skew(rast) ; + o22 = rt_raster_get_y_scale(rast) ; + + rt_raster_calc_phys_params(o11, o12, o21, o22, i_mag, j_mag, theta_i, theta_ij); +} + +void +rt_raster_calc_phys_params(double xscale, double xskew, double yskew, double yscale, + double *i_mag, double *j_mag, double *theta_i, double *theta_ij) + +{ + double theta_test ; + + if ( (i_mag==NULL) || (j_mag==NULL) || (theta_i==NULL) || (theta_ij==NULL)) + return ; + + /* pixel size in the i direction */ + *i_mag = sqrt(xscale*xscale + yskew*yskew) ; + + /* pixel size in the j direction */ + *j_mag = sqrt(xskew*xskew + yscale*yscale) ; + + /* Rotation + * ======== + * Two steps: + * 1] calculate the magnitude of the angle between the x axis and + * the i basis vector. + * 2] Calculate the sign of theta_i based on the angle between the y axis + * and the i basis vector. + */ + *theta_i = acos(xscale/(*i_mag)) ; /* magnitude */ + theta_test = acos(yskew/(*i_mag)) ; /* sign */ + if (theta_test < M_PI_2){ + *theta_i = -(*theta_i) ; + } + + + /* Angular separation of basis vectors + * =================================== + * Two steps: + * 1] calculate the magnitude of the angle between the j basis vector and + * the i basis vector. + * 2] Calculate the sign of theta_ij based on the angle between the + * perpendicular of the i basis vector and the j basis vector. + */ + *theta_ij = acos(((xscale*xskew) + (yskew*yscale))/((*i_mag)*(*j_mag))) ; + theta_test = acos( ((-yskew*xskew)+(xscale*yscale)) / + ((*i_mag)*(*j_mag))); + if (theta_test > M_PI_2) { + *theta_ij = -(*theta_ij) ; + } +} + +void +rt_raster_set_phys_params(rt_raster rast,double i_mag, double j_mag, double theta_i, double theta_ij) +{ + double o11, o12, o21, o22 ; /* calculated geotransform coefficients */ + int success ; + + if (rast == NULL) return ; + + success = rt_raster_calc_gt_coeff(i_mag, j_mag, theta_i, theta_ij, + &o11, &o12, &o21, &o22) ; + + if (success) { + rt_raster_set_scale(rast, o11, o22) ; + rt_raster_set_skews(rast, o12, o21) ; + } +} + +int +rt_raster_calc_gt_coeff(double i_mag, double j_mag, double theta_i, double theta_ij, + double *xscale, double *xskew, double *yskew, double *yscale) +{ + double f ; /* reflection flag 1.0 or -1.0 */ + double k_i ; /* shearing coefficient */ + double s_i, s_j ; /* scaling coefficients */ + double cos_theta_i, sin_theta_i ; + + if ( (xscale==NULL) || (xskew==NULL) || (yskew==NULL) || (yscale==NULL)) { + return 0; + } + + if ( (theta_ij == 0.0) || (theta_ij == M_PI)) { + return 0; + } + + /* Reflection across the i axis */ + f=1.0 ; + if (theta_ij < 0) { + f = -1.0; + } + + /* scaling along i axis */ + s_i = i_mag ; + + /* shearing parallel to i axis */ + k_i = tan(f*M_PI_2 - theta_ij) ; + + /* scaling along j axis */ + s_j = j_mag / (sqrt(k_i*k_i + 1)) ; + + /* putting it altogether */ + cos_theta_i = cos(theta_i) ; + sin_theta_i = sin(theta_i) ; + *xscale = s_i * cos_theta_i ; + *xskew = k_i * s_j * f * cos_theta_i + s_j * f * sin_theta_i ; + *yskew = -s_i * sin_theta_i ; + *yscale = -k_i * s_j * f * sin_theta_i + s_j * f * cos_theta_i ; + return 1; +} + +int32_t +rt_raster_get_srid(rt_raster raster) { + assert(NULL != raster); + + return clamp_srid(raster->srid); +} + +void +rt_raster_set_srid(rt_raster raster, int32_t srid) { + assert(NULL != raster); + + raster->srid = clamp_srid(srid); +} + +int +rt_raster_get_num_bands(rt_raster raster) { + + + assert(NULL != raster); + + return raster->numBands; +} + +rt_band +rt_raster_get_band(rt_raster raster, int n) { + + + assert(NULL != raster); + + if (n >= raster->numBands || n < 0) return 0; + return raster->bands[n]; +} + +/** + * Add band data to a raster. + * + * @param raster : the raster to add a band to + * @param band : the band to add, ownership left to caller. + * Band dimensions are required to match with raster ones. + * @param index : the position where to insert the new band (0 based) + * + * @return identifier (position) for the just-added raster, or -1 on error + */ +int32_t +rt_raster_add_band(rt_raster raster, rt_band band, int index) { + rt_band *oldbands = NULL; + rt_band oldband = NULL; + rt_band tmpband = NULL; + uint16_t i = 0; + + + + assert(NULL != raster); + + RASTER_DEBUGF(3, "Adding band %p to raster %p", band, raster); + + if (band->width != raster->width || band->height != raster->height) { + rterror("rt_raster_add_band: Can't add a %dx%d band to a %dx%d raster", + band->width, band->height, raster->width, raster->height); + return -1; + } + + if (index > raster->numBands) + index = raster->numBands; + + if (index < 0) + index = 0; + + oldbands = raster->bands; + + RASTER_DEBUGF(3, "Oldbands at %p", oldbands); + + raster->bands = (rt_band*) rtrealloc(raster->bands, + sizeof (rt_band)*(raster->numBands + 1) + ); + + RASTER_DEBUG(3, "Checking bands"); + + if (NULL == raster->bands) { + rterror("rt_raster_add_band: Out of virtual memory " + "reallocating band pointers"); + raster->bands = oldbands; + return -1; + } + + RASTER_DEBUGF(4, "realloc returned %p", raster->bands); + + for (i = 0; i <= raster->numBands; ++i) { + if (i == index) { + oldband = raster->bands[i]; + raster->bands[i] = band; + } else if (i > index) { + tmpband = raster->bands[i]; + raster->bands[i] = oldband; + oldband = tmpband; + } + } + + band->raster = raster; + + raster->numBands++; + + RASTER_DEBUGF(4, "now raster has %d bands", raster->numBands); + + return index; +} + +/** + * Generate a new inline band and add it to a raster. + * + * @param raster : the raster to add a band to + * @param pixtype: the pixel type for the new band + * @param initialvalue: initial value for pixels + * @param hasnodata: indicates if the band has a nodata value + * @param nodatavalue: nodata value for the new band + * @param index: position to add the new band in the raster + * + * @return identifier (position) for the just-added raster, or -1 on error + */ +int32_t +rt_raster_generate_new_band(rt_raster raster, rt_pixtype pixtype, + double initialvalue, uint32_t hasnodata, double nodatavalue, int index) +{ + rt_band band = NULL; + int width = 0; + int height = 0; + int numval = 0; + int datasize = 0; + int oldnumbands = 0; + int numbands = 0; + void * mem = NULL; + int32_t checkvalint = 0; + uint32_t checkvaluint = 0; + double checkvaldouble = 0; + float checkvalfloat = 0; + int i; + + + assert(NULL != raster); + + /* Make sure index is in a valid range */ + oldnumbands = rt_raster_get_num_bands(raster); + if (index < 0) + index = 0; + else if (index > oldnumbands + 1) + index = oldnumbands + 1; + + /* Determine size of memory block to allocate and allocate it */ + width = rt_raster_get_width(raster); + height = rt_raster_get_height(raster); + numval = width * height; + datasize = rt_pixtype_size(pixtype) * numval; + + mem = (int *)rtalloc(datasize); + if (!mem) { + rterror("rt_raster_generate_new_band: Could not allocate memory for band"); + return -1; + } + + if (FLT_EQ(initialvalue, 0.0)) + memset(mem, 0, datasize); + else { + switch (pixtype) + { + case PT_1BB: + { + uint8_t *ptr = mem; + uint8_t clamped_initval = rt_util_clamp_to_1BB(initialvalue); + for (i = 0; i < numval; i++) + ptr[i] = clamped_initval; + checkvalint = ptr[0]; + break; + } + case PT_2BUI: + { + uint8_t *ptr = mem; + uint8_t clamped_initval = rt_util_clamp_to_2BUI(initialvalue); + for (i = 0; i < numval; i++) + ptr[i] = clamped_initval; + checkvalint = ptr[0]; + break; + } + case PT_4BUI: + { + uint8_t *ptr = mem; + uint8_t clamped_initval = rt_util_clamp_to_4BUI(initialvalue); + for (i = 0; i < numval; i++) + ptr[i] = clamped_initval; + checkvalint = ptr[0]; + break; + } + case PT_8BSI: + { + int8_t *ptr = mem; + int8_t clamped_initval = rt_util_clamp_to_8BSI(initialvalue); + for (i = 0; i < numval; i++) + ptr[i] = clamped_initval; + checkvalint = ptr[0]; + break; + } + case PT_8BUI: + { + uint8_t *ptr = mem; + uint8_t clamped_initval = rt_util_clamp_to_8BUI(initialvalue); + for (i = 0; i < numval; i++) + ptr[i] = clamped_initval; + checkvalint = ptr[0]; + break; + } + case PT_16BSI: + { + int16_t *ptr = mem; + int16_t clamped_initval = rt_util_clamp_to_16BSI(initialvalue); + for (i = 0; i < numval; i++) + ptr[i] = clamped_initval; + checkvalint = ptr[0]; + break; + } + case PT_16BUI: + { + uint16_t *ptr = mem; + uint16_t clamped_initval = rt_util_clamp_to_16BUI(initialvalue); + for (i = 0; i < numval; i++) + ptr[i] = clamped_initval; + checkvalint = ptr[0]; + break; + } + case PT_32BSI: + { + int32_t *ptr = mem; + int32_t clamped_initval = rt_util_clamp_to_32BSI(initialvalue); + for (i = 0; i < numval; i++) + ptr[i] = clamped_initval; + checkvalint = ptr[0]; + break; + } + case PT_32BUI: + { + uint32_t *ptr = mem; + uint32_t clamped_initval = rt_util_clamp_to_32BUI(initialvalue); + for (i = 0; i < numval; i++) + ptr[i] = clamped_initval; + checkvaluint = ptr[0]; + break; + } + case PT_32BF: + { + float *ptr = mem; + float clamped_initval = rt_util_clamp_to_32F(initialvalue); + for (i = 0; i < numval; i++) + ptr[i] = clamped_initval; + checkvalfloat = ptr[0]; + break; + } + case PT_64BF: + { + double *ptr = mem; + for (i = 0; i < numval; i++) + ptr[i] = initialvalue; + checkvaldouble = ptr[0]; + break; + } + default: + { + rterror("rt_raster_generate_new_band: Unknown pixeltype %d", pixtype); + rtdealloc(mem); + return -1; + } + } + } + + /* Overflow checking */ + rt_util_dbl_trunc_warning( + initialvalue, + checkvalint, checkvaluint, + checkvalfloat, checkvaldouble, + pixtype + ); + + band = rt_band_new_inline(width, height, pixtype, hasnodata, nodatavalue, mem); + if (! band) { + rterror("rt_raster_generate_new_band: Could not add band to raster. Aborting"); + rtdealloc(mem); + return -1; + } + index = rt_raster_add_band(raster, band, index); + numbands = rt_raster_get_num_bands(raster); + if (numbands == oldnumbands || index == -1) { + rterror("rt_raster_generate_new_band: Could not add band to raster. Aborting"); + rt_band_destroy(band); + } + + return index; +} + +/** + * Get 6-element array of raster geotransform matrix + * + * @param raster : the raster to get matrix of + * @param gt : output parameter, 6-element geotransform matrix + * + */ +void +rt_raster_get_geotransform_matrix(rt_raster raster, + double *gt) { + assert(NULL != raster); + assert(NULL != gt); + + gt[0] = raster->ipX; + gt[1] = raster->scaleX; + gt[2] = raster->skewX; + gt[3] = raster->ipY; + gt[4] = raster->skewY; + gt[5] = raster->scaleY; +} + +/** + * Set raster's geotransform using 6-element array + * + * @param raster : the raster to set matrix of + * @param gt : intput parameter, 6-element geotransform matrix + * + */ +void +rt_raster_set_geotransform_matrix(rt_raster raster, + double *gt) { + assert(NULL != raster); + assert(NULL != gt); + + raster->ipX = gt[0]; + raster->scaleX = gt[1]; + raster->skewX = gt[2]; + raster->ipY = gt[3]; + raster->skewY = gt[4]; + raster->scaleY = gt[5]; +} + +/** + * Convert an xr, yr raster point to an xw, yw point on map + * + * @param raster : the raster to get info from + * @param xr : the pixel's column + * @param yr : the pixel's row + * @param xw : output parameter, X ordinate of the geographical point + * @param yw : output parameter, Y ordinate of the geographical point + * @param gt : input/output parameter, 3x2 geotransform matrix + * + * @return if zero, error occurred in function + */ +int +rt_raster_cell_to_geopoint(rt_raster raster, + double xr, double yr, + double *xw, double *yw, + double *gt +) { + double *_gt = NULL; + int init_gt = 0; + int i = 0; + + assert(NULL != raster); + assert(NULL != xw); + assert(NULL != yw); + + if (NULL == gt) { + _gt = rtalloc(sizeof(double) * 6); + if (NULL == _gt) { + rterror("rt_raster_cell_to_geopoint: Unable to allocate memory for geotransform matrix"); + return 0; + } + init_gt = 1; + + for (i = 0; i < 6; i++) _gt[i] = 0; + } + else { + _gt = gt; + init_gt = 0; + } + + /* scale of matrix is not set */ + if ( + FLT_EQ(_gt[1], 0) || + FLT_EQ(_gt[5], 0) + ) { + rt_raster_get_geotransform_matrix(raster, _gt); + } + + RASTER_DEBUGF(4, "gt = (%f, %f, %f, %f, %f, %f)", + _gt[0], + _gt[1], + _gt[2], + _gt[3], + _gt[4], + _gt[5] + ); + + GDALApplyGeoTransform(_gt, xr, yr, xw, yw); + RASTER_DEBUGF(4, "GDALApplyGeoTransform (c -> g) for (%f, %f) = (%f, %f)", + xr, yr, *xw, *yw); + + if (init_gt) rtdealloc(_gt); + return 1; +} + +/** + * Convert an xw,yw map point to a xr,yr raster point + * + * @param raster : the raster to get info from + * @param xw : X ordinate of the geographical point + * @param yw : Y ordinate of the geographical point + * @param xr : output parameter, the pixel's column + * @param yr : output parameter, the pixel's row + * @param igt : input/output parameter, 3x2 inverse geotransform matrix + * + * @return if zero, error occurred in function + */ +int +rt_raster_geopoint_to_cell(rt_raster raster, + double xw, double yw, + double *xr, double *yr, + double *igt +) { + double *_igt = NULL; + int i = 0; + int init_igt = 0; + double rnd = 0; + + assert(NULL != raster); + assert(NULL != xr); + assert(NULL != yr); + + if (igt == NULL) { + _igt = rtalloc(sizeof(double) * 6); + if (_igt == NULL) { + rterror("rt_raster_geopoint_to_cell: Unable to allocate memory for inverse geotransform matrix"); + return 0; + } + init_igt = 1; + + for (i = 0; i < 6; i++) _igt[i] = 0; + } + else { + _igt = igt; + init_igt = 0; + } + + /* matrix is not set */ + if ( + FLT_EQ(_igt[0], 0.) && + FLT_EQ(_igt[1], 0.) && + FLT_EQ(_igt[2], 0.) && + FLT_EQ(_igt[3], 0.) && + FLT_EQ(_igt[4], 0.) && + FLT_EQ(_igt[5], 0.) + ) { + double gt[6] = {0.0}; + rt_raster_get_geotransform_matrix(raster, gt); + + if (!GDALInvGeoTransform(gt, _igt)) { + rterror("rt_raster_geopoint_to_cell: Unable to compute inverse geotransform matrix"); + if (init_igt) rtdealloc(_igt); + return 0; + } + } + + GDALApplyGeoTransform(_igt, xw, yw, xr, yr); + RASTER_DEBUGF(4, "GDALApplyGeoTransform (g -> c) for (%f, %f) = (%f, %f)", + xw, yw, *xr, *yr); + + rnd = ROUND(*xr, 0); + if (FLT_EQ(rnd, *xr)) + *xr = rnd; + else + *xr = floor(*xr); + + rnd = ROUND(*yr, 0); + if (FLT_EQ(rnd, *yr)) + *yr = rnd; + else + *yr = floor(*yr); + + RASTER_DEBUGF(4, "Corrected GDALApplyGeoTransform (g -> c) for (%f, %f) = (%f, %f)", + xw, yw, *xr, *yr); + + if (init_igt) rtdealloc(_igt); + return 1; +} + +/** + * Returns a set of "geomval" value, one for each group of pixel + * sharing the same value for the provided band. + * + * A "geomval" value is a complex type composed of a geometry + * in LWPOLY representation (one for each group of pixel sharing + * the same value) and the value associated with this geometry. + * + * @param raster: the raster to get info from. + * @param nband: the band to polygonize. 0-based + * + * @return A set of "geomval" values, one for each group of pixels + * sharing the same value for the provided band. The returned values are + * LWPOLY geometries. + */ +rt_geomval +rt_raster_gdal_polygonize( + rt_raster raster, int nband, + int *pnElements +) { + CPLErr cplerr = CE_None; + char *pszQuery; + long j; + OGRSFDriverH ogr_drv = NULL; + GDALDriverH gdal_drv = NULL; + GDALDatasetH memdataset = NULL; + GDALRasterBandH gdal_band = NULL; + OGRDataSourceH memdatasource = NULL; + rt_geomval pols = NULL; + OGRLayerH hLayer = NULL; + OGRFeatureH hFeature = NULL; + OGRGeometryH hGeom = NULL; + OGRFieldDefnH hFldDfn = NULL; + unsigned char *wkb = NULL; + int wkbsize = 0; + LWGEOM *lwgeom = NULL; + int nFeatureCount = 0; + rt_band band = NULL; + int iPixVal = -1; + double dValue = 0.0; + int iBandHasNodataValue = FALSE; + double dBandNoData = 0.0; + + /* for checking that a geometry is valid */ + GEOSGeometry *ggeom = NULL; + int isValid; + LWGEOM *lwgeomValid = NULL; + +#if POSTGIS_GEOS_VERSION < 33 + int msgValid = 0; +#endif + + uint32_t bandNums[1] = {nband}; + + /* checks */ + assert(NULL != raster); + assert(nband >= 0 && nband < rt_raster_get_num_bands(raster)); + + RASTER_DEBUG(2, "In rt_raster_gdal_polygonize"); + + /******************************* + * Get band + *******************************/ + band = rt_raster_get_band(raster, nband); + if (NULL == band) { + rterror("rt_raster_gdal_polygonize: Error getting band %d from raster", nband); + return NULL; + } + + iBandHasNodataValue = rt_band_get_hasnodata_flag(band); + if (iBandHasNodataValue) dBandNoData = rt_band_get_nodata(band); + + /***************************************************** + * Convert raster to GDAL MEM dataset + *****************************************************/ + memdataset = rt_raster_to_gdal_mem(raster, NULL, bandNums, 1, &gdal_drv); + if (NULL == memdataset) { + rterror("rt_raster_gdal_polygonize: Couldn't convert raster to GDAL MEM dataset"); + return NULL; + } + + /***************************** + * Register ogr mem driver + *****************************/ + OGRRegisterAll(); + + RASTER_DEBUG(3, "creating OGR MEM vector"); + + /***************************************************** + * Create an OGR in-memory vector for layers + *****************************************************/ + ogr_drv = OGRGetDriverByName("Memory"); + memdatasource = OGR_Dr_CreateDataSource(ogr_drv, "", NULL); + if (NULL == memdatasource) { + rterror("rt_raster_gdal_polygonize: Couldn't create a OGR Datasource to store pols"); + GDALClose(memdataset); + return NULL; + } + + /* Can MEM driver create new layers? */ + if (!OGR_DS_TestCapability(memdatasource, ODsCCreateLayer)) { + rterror("rt_raster_gdal_polygonize: MEM driver can't create new layers, aborting"); + + /* xxx jorgearevalo: what should we do now? */ + GDALClose(memdataset); + OGRReleaseDataSource(memdatasource); + + return NULL; + } + + RASTER_DEBUG(3, "polygonizying GDAL MEM raster band"); + + /***************************** + * Polygonize the raster band + *****************************/ + + /** + * From GDALPolygonize function header: "Polygon features will be + * created on the output layer, with polygon geometries representing + * the polygons". So,the WKB geometry type should be "wkbPolygon" + **/ + hLayer = OGR_DS_CreateLayer(memdatasource, "PolygonizedLayer", NULL, wkbPolygon, NULL); + + if (NULL == hLayer) { + rterror("rt_raster_gdal_polygonize: Couldn't create layer to store polygons"); + + GDALClose(memdataset); + OGRReleaseDataSource(memdatasource); + + return NULL; + } + + /** + * Create a new field in the layer, to store the px value + */ + + /* First, create a field definition to create the field */ + hFldDfn = OGR_Fld_Create("PixelValue", OFTReal); + + /* Second, create the field */ + if (OGR_L_CreateField(hLayer, hFldDfn, TRUE) != OGRERR_NONE) { + rtwarn("Couldn't create a field in OGR Layer. The polygons generated won't be able to store the pixel value"); + iPixVal = -1; + } + else { + /* Index to the new field created in the layer */ + iPixVal = 0; + } + + /* Get GDAL raster band */ + gdal_band = GDALGetRasterBand(memdataset, 1); + if (NULL == gdal_band) { + rterror("rt_raster_gdal_polygonize: Couldn't get GDAL band to polygonize"); + + GDALClose(memdataset); + OGR_Fld_Destroy(hFldDfn); + OGR_DS_DeleteLayer(memdatasource, 0); + OGRReleaseDataSource(memdatasource); + + return NULL; + } + + /** + * We don't need a raster mask band. Each band has a nodata value. + **/ +#ifdef GDALFPOLYGONIZE + cplerr = GDALFPolygonize(gdal_band, NULL, hLayer, iPixVal, NULL, NULL, NULL); +#else + cplerr = GDALPolygonize(gdal_band, NULL, hLayer, iPixVal, NULL, NULL, NULL); +#endif + + if (cplerr != CE_None) { + rterror("rt_raster_gdal_polygonize: Could not polygonize GDAL band"); + + GDALClose(memdataset); + OGR_Fld_Destroy(hFldDfn); + OGR_DS_DeleteLayer(memdatasource, 0); + OGRReleaseDataSource(memdatasource); + + return NULL; + } + + /** + * Optimization: Apply a OGR SQL filter to the layer to select the + * features different from NODATA value. + * + * Thanks to David Zwarg. + **/ + if (iBandHasNodataValue) { + pszQuery = (char *) rtalloc(50 * sizeof (char)); + sprintf(pszQuery, "PixelValue != %f", dBandNoData ); + OGRErr e = OGR_L_SetAttributeFilter(hLayer, pszQuery); + if (e != OGRERR_NONE) { + rtwarn("Error filtering NODATA values for band. All values will be treated as data values"); + } + } + else { + pszQuery = NULL; + } + + /********************************************************************* + * Transform OGR layers to WKB polygons + * XXX jorgearevalo: GDALPolygonize does not set the coordinate system + * on the output layer. Application code should do this when the layer + * is created, presumably matching the raster coordinate system. + *********************************************************************/ + nFeatureCount = OGR_L_GetFeatureCount(hLayer, TRUE); + + /* Allocate memory for pols */ + pols = (rt_geomval) rtalloc(nFeatureCount * sizeof(struct rt_geomval_t)); + + if (NULL == pols) { + rterror("rt_raster_gdal_polygonize: Could not allocate memory for geomval set"); + + GDALClose(memdataset); + OGR_Fld_Destroy(hFldDfn); + OGR_DS_DeleteLayer(memdatasource, 0); + if (NULL != pszQuery) + rtdealloc(pszQuery); + OGRReleaseDataSource(memdatasource); + + return NULL; + } + + /* initialize GEOS */ + initGEOS(lwnotice, lwgeom_geos_error); + + RASTER_DEBUGF(3, "storing polygons (%d)", nFeatureCount); + + if (pnElements) + *pnElements = 0; + + /* Reset feature reading to start in the first feature */ + OGR_L_ResetReading(hLayer); + + for (j = 0; j < nFeatureCount; j++) { + hFeature = OGR_L_GetNextFeature(hLayer); + dValue = OGR_F_GetFieldAsDouble(hFeature, iPixVal); + + hGeom = OGR_F_GetGeometryRef(hFeature); + wkbsize = OGR_G_WkbSize(hGeom); + + /* allocate wkb buffer */ + wkb = rtalloc(sizeof(unsigned char) * wkbsize); + if (wkb == NULL) { + rterror("rt_raster_gdal_polygonize: Could not allocate memory for WKB buffer"); + + OGR_F_Destroy(hFeature); + GDALClose(memdataset); + OGR_Fld_Destroy(hFldDfn); + OGR_DS_DeleteLayer(memdatasource, 0); + if (NULL != pszQuery) + rtdealloc(pszQuery); + OGRReleaseDataSource(memdatasource); + + return NULL; + } + + /* export WKB with LSB byte order */ + OGR_G_ExportToWkb(hGeom, wkbNDR, wkb); + + /* convert WKB to LWGEOM */ + lwgeom = lwgeom_from_wkb(wkb, wkbsize, LW_PARSER_CHECK_NONE); + + /* cleanup unnecessary stuff */ + rtdealloc(wkb); + wkb = NULL; + wkbsize = 0; + + OGR_F_Destroy(hFeature); + + /* specify SRID */ + lwgeom_set_srid(lwgeom, rt_raster_get_srid(raster)); + + /* + is geometry valid? + if not, try to make valid + */ + do { +#if POSTGIS_GEOS_VERSION < 33 +/* + if (!msgValid) { + rtwarn("Skipping check for invalid geometry. GEOS-3.3.0 or up is required to fix an invalid geometry"); + msgValid = 1; + } +*/ + break; +#endif + + ggeom = (GEOSGeometry *) LWGEOM2GEOS(lwgeom); + if (ggeom == NULL) { + rtwarn("Cannot test geometry for validity"); + break; + } + + isValid = GEOSisValid(ggeom); + + GEOSGeom_destroy(ggeom); + ggeom = NULL; + + /* geometry is valid */ + if (isValid) + break; + + /* make geometry valid */ + lwgeomValid = lwgeom_make_valid(lwgeom); + if (lwgeomValid == NULL) { + rtwarn("Cannot fix invalid geometry"); + break; + } + + lwgeom_free(lwgeom); + lwgeom = lwgeomValid; + } + while (0); + + /* save lwgeom */ + pols[j].geom = lwgeom_as_lwpoly(lwgeom); + + /* set pixel value */ + pols[j].val = dValue; + } + + if (pnElements) + *pnElements = nFeatureCount; + + RASTER_DEBUG(3, "destroying GDAL MEM raster"); + GDALClose(memdataset); + + RASTER_DEBUG(3, "destroying OGR MEM vector"); + OGR_Fld_Destroy(hFldDfn); + OGR_DS_DeleteLayer(memdatasource, 0); + if (NULL != pszQuery) rtdealloc(pszQuery); + OGRReleaseDataSource(memdatasource); + + return pols; +} + +LWPOLY* +rt_raster_get_convex_hull(rt_raster raster) { + double gt[6] = {0.0}; + POINTARRAY **rings = NULL; + POINTARRAY *pts = NULL; + LWPOLY* ret = NULL; + POINT4D p4d; + + assert(NULL != raster); + + RASTER_DEBUGF(3, "rt_raster_get_convex_hull: raster is %dx%d", + raster->width, raster->height); + + if ((!raster->width) || (!raster->height)) { + return 0; + } + + rings = (POINTARRAY **) rtalloc(sizeof (POINTARRAY*)); + if (!rings) { + rterror("rt_raster_get_convex_hull: Out of memory [%s:%d]", __FILE__, __LINE__); + return 0; + } + rings[0] = ptarray_construct(0, 0, 5); + /* TODO: handle error on ptarray construction */ + /* XXX jorgearevalo: the error conditions aren't managed in ptarray_construct */ + if (!rings[0]) { + rterror("rt_raster_get_convex_hull: Out of memory [%s:%d]", __FILE__, __LINE__); + return 0; + } + pts = rings[0]; + + /* Upper-left corner (first and last points) */ + rt_raster_cell_to_geopoint(raster, + 0, 0, + &p4d.x, &p4d.y, + gt); + ptarray_set_point4d(pts, 0, &p4d); + ptarray_set_point4d(pts, 4, &p4d); /* needed for closing it? */ + + /* Upper-right corner (we go clockwise) */ + rt_raster_cell_to_geopoint(raster, + raster->width, 0, + &p4d.x, &p4d.y, + gt); + ptarray_set_point4d(pts, 1, &p4d); + + /* Lower-right corner */ + rt_raster_cell_to_geopoint(raster, + raster->width, raster->height, + &p4d.x, &p4d.y, + gt); + ptarray_set_point4d(pts, 2, &p4d); + + /* Lower-left corner */ + rt_raster_cell_to_geopoint(raster, + 0, raster->height, + &p4d.x, &p4d.y, + gt); + ptarray_set_point4d(pts, 3, &p4d); + + ret = lwpoly_construct(rt_raster_get_srid(raster), 0, 1, rings); + + return ret; +} + +/** + * Get raster's envelope. + * + * The envelope is the minimum bounding rectangle of the raster + * + * @param raster: the raster to get envelope of + * @param env: pointer to rt_envelope + * + * @return 0 on error, 1 on success + */ +int rt_raster_get_envelope( + rt_raster raster, + rt_envelope *env +) { + int i; + int rtn; + int set = 0; + double _r[2] = {0.}; + double _w[2] = {0.}; + double _gt[6] = {0.}; + + assert(raster != NULL); + assert(env != NULL); + + rt_raster_get_geotransform_matrix(raster, _gt); + + for (i = 0; i < 4; i++) { + switch (i) { + case 0: + _r[0] = 0; + _r[1] = 0; + break; + case 1: + _r[0] = 0; + _r[1] = raster->height; + break; + case 2: + _r[0] = raster->width; + _r[1] = raster->height; + break; + case 3: + _r[0] = raster->width; + _r[1] = 0; + break; + } + + rtn = rt_raster_cell_to_geopoint( + raster, + _r[0], _r[1], + &(_w[0]), &(_w[1]), + _gt + ); + if (!rtn) { + rterror("rt_raster_get_envelope: Unable to compute spatial coordinates for raster pixel"); + return 0; + } + + if (!set) { + set = 1; + env->MinX = _w[0]; + env->MaxX = _w[0]; + env->MinY = _w[1]; + env->MaxY = _w[1]; + } + else { + if (_w[0] < env->MinX) + env->MinX = _w[0]; + else if (_w[0] > env->MaxX) + env->MaxX = _w[0]; + + if (_w[1] < env->MinY) + env->MinY = _w[1]; + else if (_w[1] > env->MaxY) + env->MaxY = _w[1]; + } + } + + return 1; +} + +/* + * Compute skewed extent that covers unskewed extent. + * + * @param envelope: unskewed extent of type rt_envelope + * @param skew: pointer to 2-element array (x, y) of skew + * @param scale: pointer to 2-element array (x, y) of scale + * @param tolerance: value between 0 and 1 where the smaller the tolerance + * results in an extent approaching the "minimum" skewed + * extent. If value <= 0, tolerance = 0.1. + * If value > 1, tolerance = 1. + * + * @return skewed raster who's extent covers unskewed extent, NULL on error + */ +rt_raster +rt_raster_compute_skewed_raster( + rt_envelope extent, + double *skew, + double *scale, + double tolerance +) { + uint32_t run = 0; + uint32_t max_run = 1; + double dbl_run = 0; + + int rtn; + int covers = 0; + rt_raster raster; + double _gt[6] = {0}; + double _igt[6] = {0}; + int _d[2] = {1, -1}; + int _dlast = 0; + int _dlastpos = 0; + double _w[2] = {0}; + double _r[2] = {0}; + double _xy[2] = {0}; + int i; + int j; + int x; + int y; + + LWPOLY *spoly = NULL; + GEOSGeometry *sgeom = NULL; + GEOSGeometry *ngeom = NULL; + + if ( + (tolerance < 0.) || + FLT_EQ(tolerance, 0.) + ) { + tolerance = 0.1; + } + else if (tolerance > 1.) + tolerance = 1; + + dbl_run = tolerance; + while (dbl_run < 10) { + dbl_run *= 10.; + max_run *= 10; + } + + /* scale must be provided */ + if (scale == NULL) + return NULL; + for (i = 0; i < 2; i++) { + if (FLT_EQ(scale[i], 0)) { + rterror("rt_raster_compute_skewed_raster: Scale cannot be zero"); + return 0; + } + + if (i < 1) + _gt[1] = fabs(scale[i] * tolerance); + else + _gt[5] = fabs(scale[i] * tolerance); + } + /* conform scale-y to be negative */ + _gt[5] *= -1; + + /* skew not provided or skew is zero, return raster of correct dim and spatial attributes */ + if ( + (skew == NULL) || ( + FLT_EQ(skew[0], 0) && + FLT_EQ(skew[1], 0) + ) + ) { + int _dim[2] = { + (int) fmax((fabs(extent.MaxX - extent.MinX) + (fabs(scale[0]) / 2.)) / fabs(scale[0]), 1), + (int) fmax((fabs(extent.MaxY - extent.MinY) + (fabs(scale[1]) / 2.)) / fabs(scale[1]), 1) + }; + + raster = rt_raster_new(_dim[0], _dim[1]); + if (raster == NULL) { + rterror("rt_raster_compute_skewed_raster: Unable to create output raster"); + return NULL; + } + + rt_raster_set_offsets(raster, extent.MinX, extent.MaxY); + rt_raster_set_scale(raster, fabs(scale[0]), -1 * fabs(scale[1])); + rt_raster_set_skews(raster, skew[0], skew[1]); + + return raster; + } + + /* direction to shift upper-left corner */ + if (skew[0] > 0.) + _d[0] = -1; + if (skew[1] < 0.) + _d[1] = 1; + + /* geotransform */ + _gt[0] = extent.UpperLeftX; + _gt[2] = skew[0] * tolerance; + _gt[3] = extent.UpperLeftY; + _gt[4] = skew[1] * tolerance; + + RASTER_DEBUGF(4, "Initial geotransform: %f, %f, %f, %f, %f, %f", + _gt[0], _gt[1], _gt[2], _gt[3], _gt[4], _gt[5] + ); + RASTER_DEBUGF(4, "Delta: %d, %d", _d[0], _d[1]); + + /* simple raster */ + if ((raster = rt_raster_new(1, 1)) == NULL) { + rterror("rt_raster_compute_skewed_raster: Out of memory allocating extent raster"); + return NULL; + } + rt_raster_set_geotransform_matrix(raster, _gt); + + /* get inverse geotransform matrix */ + if (!GDALInvGeoTransform(_gt, _igt)) { + rterror("rt_raster_compute_skewed_raster: Unable to compute inverse geotransform matrix"); + rt_raster_destroy(raster); + return NULL; + } + RASTER_DEBUGF(4, "Inverse geotransform: %f, %f, %f, %f, %f, %f", + _igt[0], _igt[1], _igt[2], _igt[3], _igt[4], _igt[5] + ); + + /* shift along axis */ + for (i = 0; i < 2; i++) { + covers = 0; + run = 0; + + RASTER_DEBUGF(3, "Shifting along %s axis", i < 1 ? "X" : "Y"); + + do { + + /* prevent possible infinite loop */ + if (run > max_run) { + rterror("rt_raster_compute_skewed_raster: Unable to compute skewed extent due to check preventing infinite loop"); + rt_raster_destroy(raster); + return NULL; + } + + /* + check the four corners that they are covered along the specific axis + pixel column should be >= 0 + */ + for (j = 0; j < 4; j++) { + switch (j) { + /* upper-left */ + case 0: + _xy[0] = extent.MinX; + _xy[1] = extent.MaxY; + break; + /* lower-left */ + case 1: + _xy[0] = extent.MinX; + _xy[1] = extent.MinY; + break; + /* lower-right */ + case 2: + _xy[0] = extent.MaxX; + _xy[1] = extent.MinY; + break; + /* upper-right */ + case 3: + _xy[0] = extent.MaxX; + _xy[1] = extent.MaxY; + break; + } + + rtn = rt_raster_geopoint_to_cell( + raster, + _xy[0], _xy[1], + &(_r[0]), &(_r[1]), + _igt + ); + if (!rtn) { + rterror("rt_raster_compute_skewed_raster: Unable to compute raster pixel for spatial coordinates"); + rt_raster_destroy(raster); + return NULL; + } + + RASTER_DEBUGF(4, "Point %d at cell %d x %d", j, (int) _r[0], (int) _r[1]); + + /* raster doesn't cover point */ + if ((int) _r[i] < 0) { + RASTER_DEBUGF(4, "Point outside of skewed extent: %d", j); + covers = 0; + + if (_dlastpos != j) { + _dlast = (int) _r[i]; + _dlastpos = j; + } + else if ((int) _r[i] < _dlast) { + RASTER_DEBUG(4, "Point going in wrong direction. Reversing direction"); + _d[i] *= -1; + _dlastpos = -1; + run = 0; + } + + break; + } + + covers++; + } + + if (!covers) { + x = 0; + y = 0; + if (i < 1) + x = _d[i] * fabs(_r[i]); + else + y = _d[i] * fabs(_r[i]); + + rtn = rt_raster_cell_to_geopoint( + raster, + x, y, + &(_w[0]), &(_w[1]), + _gt + ); + if (!rtn) { + rterror("rt_raster_compute_skewed_raster: Unable to compute spatial coordinates for raster pixel"); + rt_raster_destroy(raster); + return NULL; + } + + /* adjust ul */ + if (i < 1) + _gt[0] = _w[i]; + else + _gt[3] = _w[i]; + rt_raster_set_geotransform_matrix(raster, _gt); + RASTER_DEBUGF(4, "Shifted geotransform: %f, %f, %f, %f, %f, %f", + _gt[0], _gt[1], _gt[2], _gt[3], _gt[4], _gt[5] + ); + + /* get inverse geotransform matrix */ + if (!GDALInvGeoTransform(_gt, _igt)) { + rterror("rt_raster_compute_skewed_raster: Unable to compute inverse geotransform matrix"); + rt_raster_destroy(raster); + return NULL; + } + RASTER_DEBUGF(4, "Inverse geotransform: %f, %f, %f, %f, %f, %f", + _igt[0], _igt[1], _igt[2], _igt[3], _igt[4], _igt[5] + ); + } + + run++; + } + while (!covers); + } + + /* covers test */ + rtn = rt_raster_geopoint_to_cell( + raster, + extent.MaxX, extent.MinY, + &(_r[0]), &(_r[1]), + _igt + ); + if (!rtn) { + rterror("rt_raster_compute_skewed_raster: Unable to compute raster pixel for spatial coordinates"); + rt_raster_destroy(raster); + return NULL; + } + + RASTER_DEBUGF(4, "geopoint %f x %f at cell %d x %d", extent.MaxX, extent.MinY, (int) _r[0], (int) _r[1]); + + raster->width = _r[0]; + raster->height = _r[1]; + + /* initialize GEOS */ + initGEOS(lwnotice, lwgeom_geos_error); + + /* create reference LWPOLY */ + { + LWPOLY *npoly = rt_util_envelope_to_lwpoly(extent); + if (npoly == NULL) { + rterror("rt_raster_compute_skewed_raster: Unable to build extent's geometry for covers test"); + rt_raster_destroy(raster); + return NULL; + } + + ngeom = (GEOSGeometry *) LWGEOM2GEOS(lwpoly_as_lwgeom(npoly)); + lwpoly_free(npoly); + } + + do { + covers = 0; + + /* construct spoly from raster */ + spoly = rt_raster_get_convex_hull(raster); + if (spoly == NULL) { + rterror("rt_raster_compute_skewed_raster: Unable to build skewed extent's geometry for covers test"); + GEOSGeom_destroy(ngeom); + rt_raster_destroy(raster); + return NULL; + } + + sgeom = (GEOSGeometry *) LWGEOM2GEOS(lwpoly_as_lwgeom(spoly)); + lwpoly_free(spoly); + + covers = GEOSRelatePattern(sgeom, ngeom, "******FF*"); + GEOSGeom_destroy(sgeom); + + if (covers == 2) { + rterror("rt_raster_compute_skewed_raster: Unable to run covers test"); + GEOSGeom_destroy(ngeom); + rt_raster_destroy(raster); + return NULL; + } + + if (covers) + break; + + raster->width++; + raster->height++; + } + while (!covers); + + RASTER_DEBUGF(4, "Skewed extent does cover normal extent with dimensions %d x %d", raster->width, raster->height); + + raster->width = (int) ((((double) raster->width) * fabs(_gt[1]) + fabs(scale[0] / 2.)) / fabs(scale[0])); + raster->height = (int) ((((double) raster->height) * fabs(_gt[5]) + fabs(scale[1] / 2.)) / fabs(scale[1])); + _gt[1] = fabs(scale[0]); + _gt[5] = -1 * fabs(scale[1]); + _gt[2] = skew[0]; + _gt[4] = skew[1]; + rt_raster_set_geotransform_matrix(raster, _gt); + + /* minimize width/height */ + for (i = 0; i < 2; i++) { + covers = 1; + do { + if (i < 1) + raster->width--; + else + raster->height--; + + /* construct spoly from raster */ + spoly = rt_raster_get_convex_hull(raster); + if (spoly == NULL) { + rterror("rt_raster_compute_skewed_raster: Unable to build skewed extent's geometry for minimizing dimensions"); + GEOSGeom_destroy(ngeom); + rt_raster_destroy(raster); + return NULL; + } + + sgeom = (GEOSGeometry *) LWGEOM2GEOS(lwpoly_as_lwgeom(spoly)); + lwpoly_free(spoly); + + covers = GEOSRelatePattern(sgeom, ngeom, "******FF*"); + GEOSGeom_destroy(sgeom); + + if (covers == 2) { + rterror("rt_raster_compute_skewed_raster: Unable to run covers test for minimizing dimensions"); + GEOSGeom_destroy(ngeom); + rt_raster_destroy(raster); + return NULL; + } + + if (!covers) { + if (i < 1) + raster->width++; + else + raster->height++; + + break; + } + } + while (covers); + } + + GEOSGeom_destroy(ngeom); + + return raster; +} + +/*--------- WKB I/O ---------------------------------------------------*/ + +static uint8_t +isMachineLittleEndian(void) { + static int endian_check_int = 1; /* dont modify this!!! */ + /* 0=big endian|xdr -- 1=little endian|ndr */ + return *((uint8_t *) & endian_check_int); +} + +static uint8_t +read_uint8(const uint8_t** from) { + assert(NULL != from); + + return *(*from)++; +} + +/* unused up to now +static void +write_uint8(uint8_t** from, uint8_t v) +{ + assert(NULL != from); + + *(*from)++ = v; +} + */ + +static int8_t +read_int8(const uint8_t** from) { + assert(NULL != from); + + return (int8_t) read_uint8(from); +} + +/* unused up to now +static void +write_int8(uint8_t** from, int8_t v) +{ + assert(NULL != from); + + *(*from)++ = v; +} + */ + +static uint16_t +read_uint16(const uint8_t** from, uint8_t littleEndian) { + uint16_t ret = 0; + + assert(NULL != from); + + if (littleEndian) { + ret = (*from)[0] | + (*from)[1] << 8; + } else { + /* big endian */ + ret = (*from)[0] << 8 | + (*from)[1]; + } + *from += 2; + return ret; +} + +static void +write_uint16(uint8_t** to, uint8_t littleEndian, uint16_t v) { + assert(NULL != to); + + if (littleEndian) { + (*to)[0] = v & 0x00FF; + (*to)[1] = v >> 8; + } else { + (*to)[1] = v & 0x00FF; + (*to)[0] = v >> 8; + } + *to += 2; +} + +static int16_t +read_int16(const uint8_t** from, uint8_t littleEndian) { + assert(NULL != from); + + return read_uint16(from, littleEndian); +} + +/* unused up to now +static void +write_int16(uint8_t** to, uint8_t littleEndian, int16_t v) +{ + assert(NULL != to); + + if ( littleEndian ) + { + (*to)[0] = v & 0x00FF; + (*to)[1] = v >> 8; + } + else + { + (*to)[1] = v & 0x00FF; + (*to)[0] = v >> 8; + } + *to += 2; +} + */ + +static uint32_t +read_uint32(const uint8_t** from, uint8_t littleEndian) { + uint32_t ret = 0; + + assert(NULL != from); + + if (littleEndian) { + ret = (uint32_t) ((*from)[0] & 0xff) | + (uint32_t) ((*from)[1] & 0xff) << 8 | + (uint32_t) ((*from)[2] & 0xff) << 16 | + (uint32_t) ((*from)[3] & 0xff) << 24; + } else { + /* big endian */ + ret = (uint32_t) ((*from)[3] & 0xff) | + (uint32_t) ((*from)[2] & 0xff) << 8 | + (uint32_t) ((*from)[1] & 0xff) << 16 | + (uint32_t) ((*from)[0] & 0xff) << 24; + } + + *from += 4; + return ret; +} + +/* unused up to now +static void +write_uint32(uint8_t** to, uint8_t littleEndian, uint32_t v) +{ + assert(NULL != to); + + if ( littleEndian ) + { + (*to)[0] = v & 0x000000FF; + (*to)[1] = ( v & 0x0000FF00 ) >> 8; + (*to)[2] = ( v & 0x00FF0000 ) >> 16; + (*to)[3] = ( v & 0xFF000000 ) >> 24; + } + else + { + (*to)[3] = v & 0x000000FF; + (*to)[2] = ( v & 0x0000FF00 ) >> 8; + (*to)[1] = ( v & 0x00FF0000 ) >> 16; + (*to)[0] = ( v & 0xFF000000 ) >> 24; + } + *to += 4; +} + */ + +static int32_t +read_int32(const uint8_t** from, uint8_t littleEndian) { + assert(NULL != from); + + return read_uint32(from, littleEndian); +} + +/* unused up to now +static void +write_int32(uint8_t** to, uint8_t littleEndian, int32_t v) +{ + assert(NULL != to); + + if ( littleEndian ) + { + (*to)[0] = v & 0x000000FF; + (*to)[1] = ( v & 0x0000FF00 ) >> 8; + (*to)[2] = ( v & 0x00FF0000 ) >> 16; + (*to)[3] = ( v & 0xFF000000 ) >> 24; + } + else + { + (*to)[3] = v & 0x000000FF; + (*to)[2] = ( v & 0x0000FF00 ) >> 8; + (*to)[1] = ( v & 0x00FF0000 ) >> 16; + (*to)[0] = ( v & 0xFF000000 ) >> 24; + } + *to += 4; +} + */ + +static float +read_float32(const uint8_t** from, uint8_t littleEndian) { + + union { + float f; + uint32_t i; + } ret; + + ret.i = read_uint32(from, littleEndian); + + return ret.f; +} + +/* unused up to now +static void +write_float32(uint8_t** from, uint8_t littleEndian, float f) +{ + union { + float f; + uint32_t i; + } u; + + u.f = f; + write_uint32(from, littleEndian, u.i); +} + */ + +static double +read_float64(const uint8_t** from, uint8_t littleEndian) { + + union { + double d; + uint64_t i; + } ret; + + assert(NULL != from); + + if (littleEndian) { + ret.i = (uint64_t) ((*from)[0] & 0xff) | + (uint64_t) ((*from)[1] & 0xff) << 8 | + (uint64_t) ((*from)[2] & 0xff) << 16 | + (uint64_t) ((*from)[3] & 0xff) << 24 | + (uint64_t) ((*from)[4] & 0xff) << 32 | + (uint64_t) ((*from)[5] & 0xff) << 40 | + (uint64_t) ((*from)[6] & 0xff) << 48 | + (uint64_t) ((*from)[7] & 0xff) << 56; + } else { + /* big endian */ + ret.i = (uint64_t) ((*from)[7] & 0xff) | + (uint64_t) ((*from)[6] & 0xff) << 8 | + (uint64_t) ((*from)[5] & 0xff) << 16 | + (uint64_t) ((*from)[4] & 0xff) << 24 | + (uint64_t) ((*from)[3] & 0xff) << 32 | + (uint64_t) ((*from)[2] & 0xff) << 40 | + (uint64_t) ((*from)[1] & 0xff) << 48 | + (uint64_t) ((*from)[0] & 0xff) << 56; + } + + *from += 8; + return ret.d; +} + +/* unused up to now +static void +write_float64(uint8_t** to, uint8_t littleEndian, double v) +{ + union { + double d; + uint64_t i; + } u; + + assert(NULL != to); + + u.d = v; + + if ( littleEndian ) + { + (*to)[0] = u.i & 0x00000000000000FFULL; + (*to)[1] = ( u.i & 0x000000000000FF00ULL ) >> 8; + (*to)[2] = ( u.i & 0x0000000000FF0000ULL ) >> 16; + (*to)[3] = ( u.i & 0x00000000FF000000ULL ) >> 24; + (*to)[4] = ( u.i & 0x000000FF00000000ULL ) >> 32; + (*to)[5] = ( u.i & 0x0000FF0000000000ULL ) >> 40; + (*to)[6] = ( u.i & 0x00FF000000000000ULL ) >> 48; + (*to)[7] = ( u.i & 0xFF00000000000000ULL ) >> 56; + } + else + { + (*to)[7] = u.i & 0x00000000000000FFULL; + (*to)[6] = ( u.i & 0x000000000000FF00ULL ) >> 8; + (*to)[5] = ( u.i & 0x0000000000FF0000ULL ) >> 16; + (*to)[4] = ( u.i & 0x00000000FF000000ULL ) >> 24; + (*to)[3] = ( u.i & 0x000000FF00000000ULL ) >> 32; + (*to)[2] = ( u.i & 0x0000FF0000000000ULL ) >> 40; + (*to)[1] = ( u.i & 0x00FF000000000000ULL ) >> 48; + (*to)[0] = ( u.i & 0xFF00000000000000ULL ) >> 56; + } + *to += 8; +} + */ + +#define BANDTYPE_FLAGS_MASK 0xF0 +#define BANDTYPE_PIXTYPE_MASK 0x0F +#define BANDTYPE_FLAG_OFFDB (1<<7) +#define BANDTYPE_FLAG_HASNODATA (1<<6) +#define BANDTYPE_FLAG_ISNODATA (1<<5) +#define BANDTYPE_FLAG_RESERVED3 (1<<4) + +#define BANDTYPE_PIXTYPE(x) ((x)&BANDTYPE_PIXTYPE_MASK) +#define BANDTYPE_IS_OFFDB(x) ((x)&BANDTYPE_FLAG_OFFDB) +#define BANDTYPE_HAS_NODATA(x) ((x)&BANDTYPE_FLAG_HASNODATA) +#define BANDTYPE_IS_NODATA(x) ((x)&BANDTYPE_FLAG_ISNODATA) + +/* Read band from WKB as at start of band */ +static rt_band +rt_band_from_wkb(uint16_t width, uint16_t height, + const uint8_t** ptr, const uint8_t* end, + uint8_t littleEndian) { + rt_band band = NULL; + int pixbytes = 0; + uint8_t type = 0; + unsigned long sz = 0; + uint32_t v = 0; + + + + assert(NULL != ptr); + assert(NULL != end); + + band = rtalloc(sizeof (struct rt_band_t)); + if (!band) { + rterror("rt_band_from_wkb: Out of memory allocating rt_band during WKB parsing"); + return 0; + } + + if (end - *ptr < 1) { + rterror("rt_band_from_wkb: Premature end of WKB on band reading (%s:%d)", + __FILE__, __LINE__); + return 0; + } + type = read_uint8(ptr); + + if ((type & BANDTYPE_PIXTYPE_MASK) >= PT_END) { + rterror("rt_band_from_wkb: Invalid pixtype %d", type & BANDTYPE_PIXTYPE_MASK); + rtdealloc(band); + return 0; + } + assert(NULL != band); + + band->pixtype = type & BANDTYPE_PIXTYPE_MASK; + band->offline = BANDTYPE_IS_OFFDB(type) ? 1 : 0; + band->hasnodata = BANDTYPE_HAS_NODATA(type) ? 1 : 0; + band->isnodata = BANDTYPE_IS_NODATA(type) ? 1 : 0; + band->width = width; + band->height = height; + + RASTER_DEBUGF(3, " Band pixtype:%s, offline:%d, hasnodata:%d", + rt_pixtype_name(band->pixtype), + band->offline, + band->hasnodata); + + /* Check there's enough bytes to read nodata value */ + + pixbytes = rt_pixtype_size(band->pixtype); + if (((*ptr) + pixbytes) >= end) { + rterror("rt_band_from_wkb: Premature end of WKB on band novalue reading"); + rtdealloc(band); + return 0; + } + + /* Read nodata value */ + switch (band->pixtype) { + case PT_1BB: + { + band->nodataval = ((int) read_uint8(ptr)) & 0x01; + break; + } + case PT_2BUI: + { + band->nodataval = ((int) read_uint8(ptr)) & 0x03; + break; + } + case PT_4BUI: + { + band->nodataval = ((int) read_uint8(ptr)) & 0x0F; + break; + } + case PT_8BSI: + { + band->nodataval = read_int8(ptr); + break; + } + case PT_8BUI: + { + band->nodataval = read_uint8(ptr); + break; + } + case PT_16BSI: + { + band->nodataval = read_int16(ptr, littleEndian); + break; + } + case PT_16BUI: + { + band->nodataval = read_uint16(ptr, littleEndian); + break; + } + case PT_32BSI: + { + band->nodataval = read_int32(ptr, littleEndian); + break; + } + case PT_32BUI: + { + band->nodataval = read_uint32(ptr, littleEndian); + break; + } + case PT_32BF: + { + band->nodataval = read_float32(ptr, littleEndian); + break; + } + case PT_64BF: + { + band->nodataval = read_float64(ptr, littleEndian); + break; + } + default: + { + rterror("rt_band_from_wkb: Unknown pixeltype %d", band->pixtype); + rtdealloc(band); + return 0; + } + } + + RASTER_DEBUGF(3, " Nodata value: %g, pixbytes: %d, ptr @ %p, end @ %p", + band->nodataval, pixbytes, *ptr, end); + + if (band->offline) { + if (((*ptr) + 1) >= end) { + rterror("rt_band_from_wkb: Premature end of WKB on offline " + "band data bandNum reading (%s:%d)", + __FILE__, __LINE__); + rtdealloc(band); + return 0; + } + band->data.offline.bandNum = read_int8(ptr); + + band->data.offline.mem = NULL; + + { + /* check we have a NULL-termination */ + sz = 0; + while ((*ptr)[sz] && &((*ptr)[sz]) < end) ++sz; + if (&((*ptr)[sz]) >= end) { + rterror("rt_band_from_wkb: Premature end of WKB on band offline path reading"); + rtdealloc(band); + return 0; + } + + band->ownsData = 1; + band->data.offline.path = rtalloc(sz + 1); + + memcpy(band->data.offline.path, *ptr, sz); + band->data.offline.path[sz] = '\0'; + + RASTER_DEBUGF(3, "OFFDB band path is %s (size is %d)", + band->data.offline.path, sz); + + *ptr += sz + 1; + + /* TODO: How could we know if the offline band is a nodata band? */ + band->isnodata = FALSE; + } + return band; + } + + /* This is an on-disk band */ + sz = width * height * pixbytes; + if (((*ptr) + sz) > end) { + rterror("rt_band_from_wkb: Premature end of WKB on band data reading (%s:%d)", + __FILE__, __LINE__); + rtdealloc(band); + return 0; + } + + band->data.mem = rtalloc(sz); + if (!band->data.mem) { + rterror("rt_band_from_wkb: Out of memory during band creation in WKB parser"); + rtdealloc(band); + return 0; + } + + memcpy(band->data.mem, *ptr, sz); + *ptr += sz; + + /* Should now flip values if > 8bit and + * littleEndian != isMachineLittleEndian */ + if (pixbytes > 1) { + if (isMachineLittleEndian() != littleEndian) { + { + void (*flipper)(uint8_t*) = 0; + uint8_t *flipme = NULL; + + if (pixbytes == 2) flipper = flip_endian_16; + else if (pixbytes == 4) flipper = flip_endian_32; + else if (pixbytes == 8) flipper = flip_endian_64; + else { + rterror("rt_band_from_wkb: Unexpected pix bytes %d", pixbytes); + rtdealloc(band); + rtdealloc(band->data.mem); + return 0; + } + + flipme = band->data.mem; + sz = width * height; + for (v = 0; v < sz; ++v) { + flipper(flipme); + flipme += pixbytes; + } + } + } + } + /* And should check for invalid values for < 8bit types */ + else if (band->pixtype == PT_1BB || + band->pixtype == PT_2BUI || + band->pixtype == PT_4BUI) { + { + uint8_t maxVal = band->pixtype == PT_1BB ? 1 : + band->pixtype == PT_2BUI ? 3 : + 15; + uint8_t val; + + sz = width*height; + for (v = 0; v < sz; ++v) { + val = ((uint8_t*) band->data.mem)[v]; + if (val > maxVal) { + rterror("rt_band_from_wkb: Invalid value %d for pixel of type %s", + val, rt_pixtype_name(band->pixtype)); + rtdealloc(band->data.mem); + rtdealloc(band); + return 0; + } + } + } + } + + /* And we should check if the band is a nodata band */ + /* TODO: No!! This is too slow */ + /*rt_band_check_is_nodata(band);*/ + + return band; +} + +/* -4 for size, +1 for endian */ +#define RT_WKB_HDR_SZ (sizeof(struct rt_raster_serialized_t)-4+1) + +rt_raster +rt_raster_from_wkb(const uint8_t* wkb, uint32_t wkbsize) { + const uint8_t *ptr = wkb; + const uint8_t *wkbend = NULL; + rt_raster rast = NULL; + uint8_t endian = 0; + uint16_t version = 0; + uint16_t i = 0; + + + + assert(NULL != ptr); + + /* Check that wkbsize is >= sizeof(rt_raster_serialized) */ + if (wkbsize < RT_WKB_HDR_SZ) { + rterror("rt_raster_from_wkb: wkb size (%d) < min size (%d)", + wkbsize, RT_WKB_HDR_SZ); + return 0; + } + wkbend = wkb + wkbsize; + + RASTER_DEBUGF(3, "Parsing header from wkb position %d (expected 0)", + d_binptr_to_pos(ptr, wkbend, wkbsize)); + + + CHECK_BINPTR_POSITION(ptr, wkbend, wkbsize, 0); + + /* Read endianness */ + endian = *ptr; + ptr += 1; + + /* Read version of protocol */ + version = read_uint16(&ptr, endian); + if (version != 0) { + rterror("rt_raster_from_wkb: WKB version %d unsupported", version); + return 0; + } + + /* Read other components of raster header */ + rast = (rt_raster) rtalloc(sizeof (struct rt_raster_t)); + if (!rast) { + rterror("rt_raster_from_wkb: Out of memory allocating raster for wkb input"); + return 0; + } + rast->numBands = read_uint16(&ptr, endian); + rast->scaleX = read_float64(&ptr, endian); + rast->scaleY = read_float64(&ptr, endian); + rast->ipX = read_float64(&ptr, endian); + rast->ipY = read_float64(&ptr, endian); + rast->skewX = read_float64(&ptr, endian); + rast->skewY = read_float64(&ptr, endian); + rt_raster_set_srid(rast, read_int32(&ptr, endian)); + rast->width = read_uint16(&ptr, endian); + rast->height = read_uint16(&ptr, endian); + + /* Consistency checking, should have been checked before */ + assert(ptr <= wkbend); + + RASTER_DEBUGF(3, "rt_raster_from_wkb: Raster numBands: %d", + rast->numBands); + RASTER_DEBUGF(3, "rt_raster_from_wkb: Raster scale: %gx%g", + rast->scaleX, rast->scaleY); + RASTER_DEBUGF(3, "rt_raster_from_wkb: Raster ip: %gx%g", + rast->ipX, rast->ipY); + RASTER_DEBUGF(3, "rt_raster_from_wkb: Raster skew: %gx%g", + rast->skewX, rast->skewY); + RASTER_DEBUGF(3, "rt_raster_from_wkb: Raster srid: %d", + rast->srid); + RASTER_DEBUGF(3, "rt_raster_from_wkb: Raster dims: %dx%d", + rast->width, rast->height); + RASTER_DEBUGF(3, "Parsing raster header finished at wkb position %d (expected 61)", + d_binptr_to_pos(ptr, wkbend, wkbsize)); + + CHECK_BINPTR_POSITION(ptr, wkbend, wkbsize, 61); + + /* Read all bands of raster */ + + if (!rast->numBands) { + /* Here ptr should have been left to right after last used byte */ + if (ptr < wkbend) { + rtwarn("%d bytes of WKB remained unparsed", wkbend - ptr); + } else if (ptr > wkbend) { + /* Easier to get a segfault before I guess */ + rtwarn("We parsed %d bytes more then available!", ptr - wkbend); + } + rast->bands = 0; + return rast; + } + + /* Now read the bands */ + rast->bands = (rt_band*) rtalloc(sizeof (rt_band) * rast->numBands); + if (!rast->bands) { + rterror("rt_raster_from_wkb: Out of memory allocating bands for WKB raster decoding"); + rtdealloc(rast); + return 0; + } + + /* ptr should now point to start of first band */ + assert(ptr <= wkbend); /* we should have checked this before */ + + for (i = 0; i < rast->numBands; ++i) { + RASTER_DEBUGF(3, "Parsing band %d from wkb position %d", i, + d_binptr_to_pos(ptr, wkbend, wkbsize)); + + rt_band band = rt_band_from_wkb(rast->width, rast->height, + &ptr, wkbend, endian); + if (!band) { + rterror("rt_raster_from_wkb: Error reading WKB form of band %d", i); + rtdealloc(rast); + /* TODO: dealloc any previously allocated band too ! */ + return 0; + } + band->raster = rast; + rast->bands[i] = band; + } + + /* Here ptr should have been left to right after last used byte */ + if (ptr < wkbend) { + rtwarn("%d bytes of WKB remained unparsed", wkbend - ptr); + } else if (ptr > wkbend) { + /* Easier to get a segfault before I guess */ + rtwarn("We parsed %d bytes more then available!", + ptr - wkbend); + } + + assert(NULL != rast); + return rast; +} + +rt_raster +rt_raster_from_hexwkb(const char* hexwkb, + uint32_t hexwkbsize) { + uint8_t* wkb = NULL; + uint32_t wkbsize = 0; + uint32_t i = 0; + + + + assert(NULL != hexwkb); + + RASTER_DEBUGF(3, "rt_raster_from_hexwkb: input wkb: %s", hexwkb); + + if (hexwkbsize % 2) { + rterror("rt_raster_from_hexwkb: Raster HEXWKB input must have an even number of characters"); + return 0; + } + wkbsize = hexwkbsize / 2; + + wkb = rtalloc(wkbsize); + if (!wkb) { + rterror("rt_raster_from_hexwkb: Out of memory allocating memory for decoding HEXWKB"); + return 0; + } + + for (i = 0; i < wkbsize; ++i) /* parse full hex */ { + wkb[i] = parse_hex((char*) & (hexwkb[i * 2])); + } + + rt_raster ret = rt_raster_from_wkb(wkb, wkbsize); + + rtdealloc(wkb); /* as long as rt_raster_from_wkb copies memory */ + + return ret; +} + +static uint32_t +rt_raster_wkb_size(rt_raster raster) { + uint32_t size = RT_WKB_HDR_SZ; + uint16_t i = 0; + + + + assert(NULL != raster); + + RASTER_DEBUGF(3, "rt_raster_wkb_size: computing size for %d bands", + raster->numBands); + + for (i = 0; i < raster->numBands; ++i) { + rt_band band = raster->bands[i]; + rt_pixtype pixtype = band->pixtype; + int pixbytes = rt_pixtype_size(pixtype); + + RASTER_DEBUGF(3, "rt_raster_wkb_size: adding size of band %d", i); + + if (pixbytes < 1) { + rterror("rt_raster_wkb_size: Corrupted band: unknown pixtype"); + return 0; + } + + /* Add space for band type */ + size += 1; + + /* Add space for nodata value */ + size += pixbytes; + + if (band->offline) { + /* Add space for band number */ + size += 1; + + /* Add space for null-terminated path */ + size += strlen(band->data.offline.path) + 1; + } else { + /* Add space for actual data */ + size += pixbytes * raster->width * raster->height; + } + + } + + return size; +} + +uint8_t * +rt_raster_to_wkb(rt_raster raster, uint32_t *wkbsize) { +#if POSTGIS_DEBUG_LEVEL > 0 + const uint8_t *wkbend = NULL; +#endif + uint8_t *wkb = NULL; + uint8_t *ptr = NULL; + uint16_t i = 0; + uint8_t littleEndian = isMachineLittleEndian(); + + + + assert(NULL != raster); + assert(NULL != wkbsize); + + RASTER_DEBUG(2, "rt_raster_to_wkb: about to call rt_raster_wkb_size"); + + *wkbsize = rt_raster_wkb_size(raster); + + RASTER_DEBUGF(3, "rt_raster_to_wkb: found size: %d", *wkbsize); + + wkb = (uint8_t*) rtalloc(*wkbsize); + if (!wkb) { + rterror("rt_raster_to_wkb: Out of memory allocating WKB for raster"); + return 0; + } + + ptr = wkb; + +#if POSTGIS_DEBUG_LEVEL > 2 + wkbend = ptr + (*wkbsize); +#endif + RASTER_DEBUGF(3, "Writing raster header to wkb on position %d (expected 0)", + d_binptr_to_pos(ptr, wkbend, *wkbsize)); + + /* Write endianness */ + *ptr = littleEndian; + ptr += 1; + + /* Write version(size - (end - ptr)) */ + write_uint16(&ptr, littleEndian, 0); + + /* Copy header (from numBands up) */ + memcpy(ptr, &(raster->numBands), sizeof (struct rt_raster_serialized_t) - 6); + ptr += sizeof (struct rt_raster_serialized_t) - 6; + + RASTER_DEBUGF(3, "Writing bands header to wkb position %d (expected 61)", + d_binptr_to_pos(ptr, wkbend, *wkbsize)); + + /* Serialize bands now */ + for (i = 0; i < raster->numBands; ++i) { + rt_band band = raster->bands[i]; + rt_pixtype pixtype = band->pixtype; + int pixbytes = rt_pixtype_size(pixtype); + + RASTER_DEBUGF(3, "Writing WKB for band %d", i); + RASTER_DEBUGF(3, "Writing band pixel type to wkb position %d", + d_binptr_to_pos(ptr, wkbend, *wkbsize)); + + if (pixbytes < 1) { + rterror("rt_raster_to_wkb: Corrupted band: unknown pixtype"); + return 0; + } + + /* Add band type */ + *ptr = band->pixtype; + if (band->offline) *ptr |= BANDTYPE_FLAG_OFFDB; + if (band->hasnodata) *ptr |= BANDTYPE_FLAG_HASNODATA; + if (band->isnodata) *ptr |= BANDTYPE_FLAG_ISNODATA; + ptr += 1; + +#if 0 /* no padding required for WKB */ + /* Add padding (if needed) */ + if (pixbytes > 1) { + memset(ptr, '\0', pixbytes - 1); + ptr += pixbytes - 1; + } + /* Consistency checking (ptr is pixbytes-aligned) */ + assert(!(((uint64_t) ptr) % pixbytes)); +#endif + + RASTER_DEBUGF(3, "Writing band nodata to wkb position %d", + d_binptr_to_pos(ptr, wkbend, *wkbsize)); + + /* Add nodata value */ + switch (pixtype) { + case PT_1BB: + case PT_2BUI: + case PT_4BUI: + case PT_8BUI: + { + uint8_t v = band->nodataval; + *ptr = v; + ptr += 1; + break; + } + case PT_8BSI: + { + int8_t v = band->nodataval; + *ptr = v; + ptr += 1; + break; + } + case PT_16BSI: + case PT_16BUI: + { + uint16_t v = band->nodataval; + memcpy(ptr, &v, 2); + ptr += 2; + break; + } + case PT_32BSI: + case PT_32BUI: + { + uint32_t v = band->nodataval; + memcpy(ptr, &v, 4); + ptr += 4; + break; + } + case PT_32BF: + { + float v = band->nodataval; + memcpy(ptr, &v, 4); + ptr += 4; + break; + } + case PT_64BF: + { + memcpy(ptr, &band->nodataval, 8); + ptr += 8; + break; + } + default: + rterror("rt_raster_to_wkb: Fatal error caused by unknown pixel type. Aborting."); + abort(); /* shoudn't happen */ + return 0; + } + +#if 0 /* no padding for WKB */ + /* Consistency checking (ptr is pixbytes-aligned) */ + assert(!((uint64_t) ptr % pixbytes)); +#endif + + if (band->offline) { + /* Write band number */ + *ptr = band->data.offline.bandNum; + ptr += 1; + + /* Write path */ + strcpy((char*) ptr, band->data.offline.path); + ptr += strlen(band->data.offline.path) + 1; + } else { + /* Write data */ + { + uint32_t datasize = raster->width * raster->height * pixbytes; + RASTER_DEBUGF(4, "rt_raster_to_wkb: Copying %d bytes", datasize); + memcpy(ptr, band->data.mem, datasize); + ptr += datasize; + } + } + +#if 0 /* no padding for WKB */ + /* Pad up to 8-bytes boundary */ + while ((uint64_t) ptr % 8) { + *ptr = 0; + ++ptr; + } + + /* Consistency checking (ptr is pixbytes-aligned) */ + assert(!((uint64_t) ptr % pixbytes)); +#endif + } + + return wkb; +} + +char * +rt_raster_to_hexwkb(rt_raster raster, uint32_t *hexwkbsize) { + uint8_t *wkb = NULL; + char* hexwkb = NULL; + uint32_t i = 0; + uint32_t wkbsize = 0; + + + + assert(NULL != raster); + assert(NULL != hexwkbsize); + + RASTER_DEBUG(2, "rt_raster_to_hexwkb: calling rt_raster_to_wkb"); + + wkb = rt_raster_to_wkb(raster, &wkbsize); + + RASTER_DEBUG(3, "rt_raster_to_hexwkb: rt_raster_to_wkb returned"); + + *hexwkbsize = wkbsize * 2; /* hex is 2 times bytes */ + hexwkb = (char*) rtalloc((*hexwkbsize) + 1); + if (!hexwkb) { + rtdealloc(wkb); + rterror("rt_raster_to_hexwkb: Out of memory hexifying raster WKB"); + return 0; + } + hexwkb[*hexwkbsize] = '\0'; /* Null-terminate */ + + for (i = 0; i < wkbsize; ++i) { + deparse_hex(wkb[i], &(hexwkb[2 * i])); + } + + rtdealloc(wkb); /* we don't need this anymore */ + + RASTER_DEBUGF(3, "rt_raster_to_hexwkb: output wkb: %s", hexwkb); + + return hexwkb; +} + +/*--------- Serializer/Deserializer --------------------------------------*/ + +static uint32_t +rt_raster_serialized_size(rt_raster raster) { + uint32_t size = sizeof (struct rt_raster_serialized_t); + uint16_t i = 0; + + + + assert(NULL != raster); + + RASTER_DEBUGF(3, "Serialized size with just header:%d - now adding size of %d bands", + size, raster->numBands); + + for (i = 0; i < raster->numBands; ++i) { + rt_band band = raster->bands[i]; + rt_pixtype pixtype = band->pixtype; + int pixbytes = rt_pixtype_size(pixtype); + + if (pixbytes < 1) { + rterror("rt_raster_serialized_size: Corrupted band: unknown pixtype"); + return 0; + } + + /* Add space for band type, hasnodata flag and data padding */ + size += pixbytes; + + /* Add space for nodata value */ + size += pixbytes; + + if (band->offline) { + /* Add space for band number */ + size += 1; + + /* Add space for null-terminated path */ + size += strlen(band->data.offline.path) + 1; + } else { + /* Add space for raster band data */ + size += pixbytes * raster->width * raster->height; + } + + RASTER_DEBUGF(3, "Size before alignment is %d", size); + + /* Align size to 8-bytes boundary (trailing padding) */ + /* XXX jorgearevalo: bug here. If the size is actually 8-bytes aligned, + this line will add 8 bytes trailing padding, and it's not necessary */ + /*size += 8 - (size % 8);*/ + if (size % 8) + size += 8 - (size % 8); + + RASTER_DEBUGF(3, "Size after alignment is %d", size); + } + + return size; +} + +void* +rt_raster_serialize(rt_raster raster) { + uint32_t size = rt_raster_serialized_size(raster); + uint8_t* ret = NULL; + uint8_t* ptr = NULL; + uint16_t i = 0; + + + assert(NULL != raster); + + ret = (uint8_t*) rtalloc(size); + if (!ret) { + rterror("rt_raster_serialize: Out of memory allocating %d bytes for serializing a raster", + size); + return 0; + } + memset(ret, '-', size); + + ptr = ret; + + RASTER_DEBUGF(3, "sizeof(struct rt_raster_serialized_t):%u", + sizeof (struct rt_raster_serialized_t)); + RASTER_DEBUGF(3, "sizeof(struct rt_raster_t):%u", + sizeof (struct rt_raster_t)); + RASTER_DEBUGF(3, "serialized size:%lu", (long unsigned) size); + + /* Set size */ + /* NOTE: Value of rt_raster.size may be updated in + * returned object, for instance, by rt_pg layer to + * store value calculated by SET_VARSIZE. + */ + raster->size = size; + + /* Set version */ + raster->version = 0; + + /* Copy header */ + memcpy(ptr, raster, sizeof (struct rt_raster_serialized_t)); + + RASTER_DEBUG(3, "Start hex dump of raster being serialized using 0x2D to mark non-written bytes"); + +#if POSTGIS_DEBUG_LEVEL > 2 + uint8_t* dbg_ptr = ptr; + d_print_binary_hex("HEADER", dbg_ptr, size); +#endif + + ptr += sizeof (struct rt_raster_serialized_t); + + /* Serialize bands now */ + for (i = 0; i < raster->numBands; ++i) { + rt_band band = raster->bands[i]; + assert(NULL != band); + + rt_pixtype pixtype = band->pixtype; + int pixbytes = rt_pixtype_size(pixtype); + if (pixbytes < 1) { + rterror("rt_raster_serialize: Corrupted band: unknown pixtype"); + return 0; + } + + /* Add band type */ + *ptr = band->pixtype; + if (band->offline) { + *ptr |= BANDTYPE_FLAG_OFFDB; + } + if (band->hasnodata) { + *ptr |= BANDTYPE_FLAG_HASNODATA; + } + + if (band->isnodata) { + *ptr |= BANDTYPE_FLAG_ISNODATA; + } + +#if POSTGIS_DEBUG_LEVEL > 2 + d_print_binary_hex("PIXTYPE", dbg_ptr, size); +#endif + + ptr += 1; + + /* Add padding (if needed) */ + if (pixbytes > 1) { + memset(ptr, '\0', pixbytes - 1); + ptr += pixbytes - 1; + } + +#if POSTGIS_DEBUG_LEVEL > 2 + d_print_binary_hex("PADDING", dbg_ptr, size); +#endif + + /* Consistency checking (ptr is pixbytes-aligned) */ + assert(!((ptr - ret) % pixbytes)); + + /* Add nodata value */ + switch (pixtype) { + case PT_1BB: + case PT_2BUI: + case PT_4BUI: + case PT_8BUI: + { + uint8_t v = band->nodataval; + *ptr = v; + ptr += 1; + break; + } + case PT_8BSI: + { + int8_t v = band->nodataval; + *ptr = v; + ptr += 1; + break; + } + case PT_16BSI: + case PT_16BUI: + { + uint16_t v = band->nodataval; + memcpy(ptr, &v, 2); + ptr += 2; + break; + } + case PT_32BSI: + case PT_32BUI: + { + uint32_t v = band->nodataval; + memcpy(ptr, &v, 4); + ptr += 4; + break; + } + case PT_32BF: + { + float v = band->nodataval; + memcpy(ptr, &v, 4); + ptr += 4; + break; + } + case PT_64BF: + { + memcpy(ptr, &band->nodataval, 8); + ptr += 8; + break; + } + default: + rterror("rt_raster_serialize: Fatal error caused by unknown pixel type. Aborting."); + abort(); /* shouldn't happen */ + return 0; + } + + /* Consistency checking (ptr is pixbytes-aligned) */ + assert(!((ptr - ret) % pixbytes)); + +#if POSTGIS_DEBUG_LEVEL > 2 + d_print_binary_hex("nodata", dbg_ptr, size); +#endif + + if (band->offline) { + /* Write band number */ + *ptr = band->data.offline.bandNum; + ptr += 1; + + /* Write path */ + strcpy((char*) ptr, band->data.offline.path); + ptr += strlen(band->data.offline.path) + 1; + } else { + /* Write data */ + uint32_t datasize = raster->width * raster->height * pixbytes; + memcpy(ptr, band->data.mem, datasize); + ptr += datasize; + } + +#if POSTGIS_DEBUG_LEVEL > 2 + d_print_binary_hex("BAND", dbg_ptr, size); +#endif + + /* Pad up to 8-bytes boundary */ + while ((uintptr_t) ptr % 8) { + *ptr = 0; + ++ptr; + + RASTER_DEBUGF(3, "PAD at %d", (uintptr_t) ptr % 8); + + } + + /* Consistency checking (ptr is pixbytes-aligned) */ + assert(!((ptr - ret) % pixbytes)); + + } /* for-loop over bands */ + +#if POSTGIS_DEBUG_LEVEL > 2 + d_print_binary_hex("SERIALIZED RASTER", dbg_ptr, size); +#endif + + return ret; +} + +rt_raster +rt_raster_deserialize(void* serialized, int header_only) { + rt_raster rast = NULL; + const uint8_t *ptr = NULL; + const uint8_t *beg = NULL; + uint16_t i = 0; + uint8_t littleEndian = isMachineLittleEndian(); + + + + assert(NULL != serialized); + + RASTER_DEBUG(2, "rt_raster_deserialize: Entering..."); + + /* NOTE: Value of rt_raster.size may be different + * than actual size of raster data being read. + * See note on SET_VARSIZE in rt_raster_serialize function above. + */ + + /* Allocate memory for deserialized raster header */ + + RASTER_DEBUG(3, "rt_raster_deserialize: Allocating memory for deserialized raster header"); + rast = (rt_raster) rtalloc(sizeof (struct rt_raster_t)); + if (!rast) { + rterror("rt_raster_deserialize: Out of memory allocating raster for deserialization"); + return 0; + } + + /* Deserialize raster header */ + RASTER_DEBUG(3, "rt_raster_deserialize: Deserialize raster header"); + memcpy(rast, serialized, sizeof (struct rt_raster_serialized_t)); + + if (0 == rast->numBands || header_only) { + rast->bands = 0; + return rast; + } + beg = (const uint8_t*) serialized; + + RASTER_DEBUG(3, "rt_raster_deserialize: Allocating memory for bands"); + /* Allocate registry of raster bands */ + rast->bands = rtalloc(rast->numBands * sizeof (rt_band)); + + RASTER_DEBUGF(3, "rt_raster_deserialize: %d bands", rast->numBands); + + /* Move to the beginning of first band */ + ptr = beg; + ptr += sizeof (struct rt_raster_serialized_t); + + /* Deserialize bands now */ + for (i = 0; i < rast->numBands; ++i) { + rt_band band = NULL; + uint8_t type = 0; + int pixbytes = 0; + + band = rtalloc(sizeof (struct rt_band_t)); + if (!band) { + rterror("rt_raster_deserialize: Out of memory allocating rt_band during deserialization"); + return 0; + } + + rast->bands[i] = band; + + type = *ptr; + ptr++; + band->pixtype = type & BANDTYPE_PIXTYPE_MASK; + + RASTER_DEBUGF(3, "rt_raster_deserialize: band %d with pixel type %s", i, rt_pixtype_name(band->pixtype)); + + band->offline = BANDTYPE_IS_OFFDB(type) ? 1 : 0; + band->hasnodata = BANDTYPE_HAS_NODATA(type) ? 1 : 0; + band->isnodata = BANDTYPE_IS_NODATA(type) ? 1 : 0; + band->width = rast->width; + band->height = rast->height; + band->ownsData = 0; + band->raster = rast; + + /* Advance by data padding */ + pixbytes = rt_pixtype_size(band->pixtype); + ptr += pixbytes - 1; + + /* Read nodata value */ + switch (band->pixtype) { + case PT_1BB: + { + band->nodataval = ((int) read_uint8(&ptr)) & 0x01; + break; + } + case PT_2BUI: + { + band->nodataval = ((int) read_uint8(&ptr)) & 0x03; + break; + } + case PT_4BUI: + { + band->nodataval = ((int) read_uint8(&ptr)) & 0x0F; + break; + } + case PT_8BSI: + { + band->nodataval = read_int8(&ptr); + break; + } + case PT_8BUI: + { + band->nodataval = read_uint8(&ptr); + break; + } + case PT_16BSI: + { + band->nodataval = read_int16(&ptr, littleEndian); + break; + } + case PT_16BUI: + { + band->nodataval = read_uint16(&ptr, littleEndian); + break; + } + case PT_32BSI: + { + band->nodataval = read_int32(&ptr, littleEndian); + break; + } + case PT_32BUI: + { + band->nodataval = read_uint32(&ptr, littleEndian); + break; + } + case PT_32BF: + { + band->nodataval = read_float32(&ptr, littleEndian); + break; + } + case PT_64BF: + { + band->nodataval = read_float64(&ptr, littleEndian); + break; + } + default: + { + rterror("rt_raster_deserialize: Unknown pixeltype %d", band->pixtype); + rtdealloc(band); + rtdealloc(rast); + return 0; + } + } + + RASTER_DEBUGF(3, "rt_raster_deserialize: has nodata flag %d", band->hasnodata); + RASTER_DEBUGF(3, "rt_raster_deserialize: nodata value %g", band->nodataval); + + /* Consistency checking (ptr is pixbytes-aligned) */ + assert(!((ptr - beg) % pixbytes)); + + if (band->offline) { + /* Read band number */ + band->data.offline.bandNum = *ptr; + ptr += 1; + + /* Register path */ + band->data.offline.path = (char*) ptr; + ptr += strlen(band->data.offline.path) + 1; + + band->data.offline.mem = NULL; + } else { + /* Register data */ + const uint32_t datasize = rast->width * rast->height * pixbytes; + band->data.mem = (uint8_t*) ptr; + ptr += datasize; + } + + /* Skip bytes of padding up to 8-bytes boundary */ +#if POSTGIS_DEBUG_LEVEL > 0 + const uint8_t *padbeg = ptr; +#endif + while (0 != ((ptr - beg) % 8)){ + ++ptr; + } + + RASTER_DEBUGF(3, "rt_raster_deserialize: skip %d bytes of 8-bytes boundary padding", ptr - padbeg); + + /* Consistency checking (ptr is pixbytes-aligned) */ + assert(!((ptr - beg) % pixbytes)); + } + + return rast; +} + +/** + * Return TRUE if the raster is empty. i.e. is NULL, width = 0 or height = 0 + * + * @param raster: the raster to get info from + * + * @return TRUE if the raster is empty, FALSE otherwise + */ +int +rt_raster_is_empty(rt_raster raster) { + return (NULL == raster || raster->height <= 0 || raster->width <= 0); +} + +/** + * Return TRUE if the raster do not have a band of this number. + * + * @param raster: the raster to get info from + * @param nband: the band number. 0-based + * + * @return TRUE if the raster do not have a band of this number, FALSE otherwise + */ +int +rt_raster_has_no_band(rt_raster raster, int nband) { + return (NULL == raster || nband >= raster->numBands || nband < 0); +} + +/** + * Copy one band from one raster to another. Bands are duplicated from + * fromrast to torast using rt_band_duplicate. The caller will need + * to ensure that the copied band's data or path remains allocated + * for the lifetime of the copied bands. + * + * @param torast: raster to copy band to + * @param fromrast: raster to copy band from + * @param fromindex: index of band in source raster, 0-based + * @param toindex: index of new band in destination raster, 0-based + * + * @return The band index of the second raster where the new band is copied. + */ +int32_t +rt_raster_copy_band( + rt_raster torast, rt_raster fromrast, + int fromindex, int toindex +) { + rt_band srcband = NULL; + rt_band dstband = NULL; + + assert(NULL != torast); + assert(NULL != fromrast); + + /* Check raster dimensions */ + if (torast->height != fromrast->height || torast->width != fromrast->width) { + rtwarn("rt_raster_copy_band: Attempting to add a band with different width or height"); + return -1; + } + + /* Check bands limits */ + if (fromrast->numBands < 1) { + rtwarn("rt_raster_copy_band: Second raster has no band"); + return -1; + } + else if (fromindex < 0) { + rtwarn("rt_raster_copy_band: Band index for second raster < 0. Defaulted to 0"); + fromindex = 0; + } + else if (fromindex >= fromrast->numBands) { + rtwarn("rt_raster_copy_band: Band index for second raster > number of bands, truncated from %u to %u", fromindex, fromrast->numBands - 1); + fromindex = fromrast->numBands - 1; + } + + if (toindex < 0) { + rtwarn("rt_raster_copy_band: Band index for first raster < 0. Defaulted to 0"); + toindex = 0; + } + else if (toindex > torast->numBands) { + rtwarn("rt_raster_copy_band: Band index for first raster > number of bands, truncated from %u to %u", toindex, torast->numBands); + toindex = torast->numBands; + } + + /* Get band from source raster */ + srcband = rt_raster_get_band(fromrast, fromindex); + + /* duplicate band */ + dstband = rt_band_duplicate(srcband); + + /* Add band to the second raster */ + return rt_raster_add_band(torast, dstband, toindex); +} + +/** + * Construct a new rt_raster from an existing rt_raster and an array + * of band numbers + * + * @param raster : the source raster + * @param bandNums : array of band numbers to extract from source raster + * and add to the new raster (0 based) + * @param count : number of elements in bandNums + * + * @return a new rt_raster or 0 on error + */ +rt_raster +rt_raster_from_band(rt_raster raster, uint32_t *bandNums, int count) { + rt_raster rast = NULL; + int i = 0; + int idx; + int32_t flag; + double gt[6] = {0.}; + + assert(NULL != raster); + assert(NULL != bandNums); + + RASTER_DEBUGF(3, "rt_raster_from_band: source raster has %d bands", + rt_raster_get_num_bands(raster)); + + /* create new raster */ + rast = rt_raster_new(raster->width, raster->height); + if (NULL == rast) { + rterror("rt_raster_from_band: Out of memory allocating new raster"); + return 0; + } + + /* copy raster attributes */ + rt_raster_get_geotransform_matrix(raster, gt); + rt_raster_set_geotransform_matrix(rast, gt); + + /* srid */ + rt_raster_set_srid(rast, raster->srid); + + /* copy bands */ + for (i = 0; i < count; i++) { + idx = bandNums[i]; + flag = rt_raster_copy_band(rast, raster, idx, i); + + if (flag < 0) { + rterror("rt_raster_from_band: Unable to copy band"); + rt_raster_destroy(rast); + return NULL; + } + + RASTER_DEBUGF(3, "rt_raster_from_band: band created at index %d", + flag); + } + + RASTER_DEBUGF(3, "rt_raster_from_band: new raster has %d bands", + rt_raster_get_num_bands(rast)); + return rast; +} + +/** + * Replace band at provided index with new band + * + * @param raster: raster of band to be replaced + * @param band : new band to add to raster + * @param index : index of band to replace (0-based) + * + * @return 0 on error or replaced band + */ +rt_band +rt_raster_replace_band(rt_raster raster, rt_band band, int index) { + rt_band oldband = NULL; + assert(NULL != raster); + + if (band->width != raster->width || band->height != raster->height) { + rterror("rt_raster_replace_band: Band does not match raster's dimensions: %dx%d band to %dx%d raster", + band->width, band->height, raster->width, raster->height); + return 0; + } + + if (index >= raster->numBands || index < 0) { + rterror("rt_raster_replace_band: Band index is not valid"); + return 0; + } + + oldband = rt_raster_get_band(raster, index); + RASTER_DEBUGF(3, "rt_raster_replace_band: old band at %p", oldband); + RASTER_DEBUGF(3, "rt_raster_replace_band: new band at %p", band); + + raster->bands[index] = band; + RASTER_DEBUGF(3, "rt_raster_replace_band: new band at %p", raster->bands[index]); + + band->raster = raster; + + return oldband; +} + +/** + * Return formatted GDAL raster from raster + * + * @param raster : the raster to convert + * @param srs : the raster's coordinate system in OGC WKT + * @param format : format to convert to. GDAL driver short name + * @param options : list of format creation options. array of strings + * @param gdalsize : will be set to the size of returned bytea + * + * @return formatted GDAL raster. the calling function is responsible + * for freeing the returned data using CPLFree() + */ +uint8_t* +rt_raster_to_gdal(rt_raster raster, const char *srs, + char *format, char **options, uint64_t *gdalsize) { + GDALDriverH src_drv = NULL; + GDALDatasetH src_ds = NULL; + + vsi_l_offset rtn_lenvsi; + uint64_t rtn_len = 0; + + GDALDriverH rtn_drv = NULL; + GDALDatasetH rtn_ds = NULL; + uint8_t *rtn = NULL; + + assert(NULL != raster); + + /* any supported format is possible */ + GDALAllRegister(); + RASTER_DEBUG(3, "rt_raster_to_gdal: loaded all supported GDAL formats"); + + /* output format not specified */ + if (format == NULL || !strlen(format)) + format = "GTiff"; + RASTER_DEBUGF(3, "rt_raster_to_gdal: output format is %s", format); + + /* load raster into a GDAL MEM raster */ + src_ds = rt_raster_to_gdal_mem(raster, srs, NULL, 0, &src_drv); + if (NULL == src_ds) { + rterror("rt_raster_to_gdal: Unable to convert raster to GDAL MEM format"); + return 0; + } + + /* load driver */ + rtn_drv = GDALGetDriverByName(format); + if (NULL == rtn_drv) { + rterror("rt_raster_to_gdal: Unable to load the output GDAL driver"); + GDALClose(src_ds); + return 0; + } + RASTER_DEBUG(3, "rt_raster_to_gdal: Output driver loaded"); + + /* convert GDAL MEM raster to output format */ + RASTER_DEBUG(3, "rt_raster_to_gdal: Copying GDAL MEM raster to memory file in output format"); + rtn_ds = GDALCreateCopy( + rtn_drv, + "/vsimem/out.dat", /* should be fine assuming this is in a process */ + src_ds, + FALSE, /* should copy be strictly equivelent? */ + options, /* format options */ + NULL, /* progress function */ + NULL /* progress data */ + ); + if (NULL == rtn_ds) { + rterror("rt_raster_to_gdal: Unable to create the output GDAL dataset"); + GDALClose(src_ds); + return 0; + } + + /* close source dataset */ + GDALClose(src_ds); + RASTER_DEBUG(3, "rt_raster_to_gdal: Closed GDAL MEM raster"); + + /* close dataset, this also flushes any pending writes */ + GDALClose(rtn_ds); + RASTER_DEBUG(3, "rt_raster_to_gdal: Closed GDAL output raster"); + + RASTER_DEBUG(3, "rt_raster_to_gdal: Done copying GDAL MEM raster to memory file in output format"); + + /* from memory file to buffer */ + RASTER_DEBUG(3, "rt_raster_to_gdal: Copying GDAL memory file to buffer"); + rtn = VSIGetMemFileBuffer("/vsimem/out.dat", &rtn_lenvsi, TRUE); + RASTER_DEBUG(3, "rt_raster_to_gdal: Done copying GDAL memory file to buffer"); + if (NULL == rtn) { + rterror("rt_raster_to_gdal: Unable to create the output GDAL raster"); + return 0; + } + + rtn_len = (uint64_t) rtn_lenvsi; + *gdalsize = rtn_len; + + return rtn; +} + +/** + * Returns a set of available GDAL drivers + * + * @param drv_count : number of GDAL drivers available + * @param cancc : if non-zero, filter drivers to only those + * with support for CreateCopy and VirtualIO + * + * @return set of "gdaldriver" values of available GDAL drivers + */ +rt_gdaldriver +rt_raster_gdal_drivers(uint32_t *drv_count, uint8_t cancc) { + const char *state; + const char *txt; + int txt_len; + GDALDriverH *drv = NULL; + rt_gdaldriver rtn = NULL; + int count; + int i; + uint32_t j; + + GDALAllRegister(); + count = GDALGetDriverCount(); + rtn = (rt_gdaldriver) rtalloc(count * sizeof(struct rt_gdaldriver_t)); + if (NULL == rtn) { + rterror("rt_raster_gdal_drivers: Unable to allocate memory for gdaldriver structure"); + return 0; + } + + for (i = 0, j = 0; i < count; i++) { + drv = GDALGetDriver(i); + + if (cancc) { + /* CreateCopy support */ + state = GDALGetMetadataItem(drv, GDAL_DCAP_CREATECOPY, NULL); + if (state == NULL) continue; + + /* VirtualIO support */ + state = GDALGetMetadataItem(drv, GDAL_DCAP_VIRTUALIO, NULL); + if (state == NULL) continue; + } + + /* index of driver */ + rtn[j].idx = i; + + /* short name */ + txt = GDALGetDriverShortName(drv); + txt_len = strlen(txt); + + if (cancc) { + RASTER_DEBUGF(3, "rt_raster_gdal_driver: driver %s (%d) supports CreateCopy() and VirtualIO()", txt, i); + } + + txt_len = (txt_len + 1) * sizeof(char); + rtn[j].short_name = (char *) rtalloc(txt_len); + memcpy(rtn[j].short_name, txt, txt_len); + + /* long name */ + txt = GDALGetDriverLongName(drv); + txt_len = strlen(txt); + + txt_len = (txt_len + 1) * sizeof(char); + rtn[j].long_name = (char *) rtalloc(txt_len); + memcpy(rtn[j].long_name, txt, txt_len); + + /* creation options */ + txt = GDALGetDriverCreationOptionList(drv); + txt_len = strlen(txt); + + txt_len = (txt_len + 1) * sizeof(char); + rtn[j].create_options = (char *) rtalloc(txt_len); + memcpy(rtn[j].create_options, txt, txt_len); + + j++; + } + + /* free unused memory */ + rtn = rtrealloc(rtn, j * sizeof(struct rt_gdaldriver_t)); + *drv_count = j; + + return rtn; +} + +/** + * Return GDAL dataset using GDAL MEM driver from raster + * + * @param raster : raster to convert to GDAL MEM + * @param srs : the raster's coordinate system in OGC WKT + * @param bandNums : array of band numbers to extract from raster + * and include in the GDAL dataset (0 based) + * @param count : number of elements in bandNums + * @param rtn_drv : is set to the GDAL driver object + * + * @return GDAL dataset using GDAL MEM driver + */ +GDALDatasetH +rt_raster_to_gdal_mem(rt_raster raster, const char *srs, + uint32_t *bandNums, int count, GDALDriverH *rtn_drv) { + GDALDriverH drv = NULL; + GDALDatasetH ds = NULL; + double gt[6] = {0.0}; + CPLErr cplerr; + GDALDataType gdal_pt = GDT_Unknown; + GDALRasterBandH band; + void *pVoid; + char *pszDataPointer; + char szGDALOption[50]; + char *apszOptions[4]; + double nodata = 0.0; + int allocBandNums = 0; + + int i; + int numBands; + uint32_t width = 0; + uint32_t height = 0; + rt_band rtband = NULL; + rt_pixtype pt = PT_END; + + assert(NULL != raster); + + /* store raster in GDAL MEM raster */ + if (!rt_util_gdal_driver_registered("MEM")) + GDALRegister_MEM(); + drv = GDALGetDriverByName("MEM"); + if (NULL == drv) { + rterror("rt_raster_to_gdal_mem: Unable to load the MEM GDAL driver"); + return 0; + } + *rtn_drv = drv; + + width = rt_raster_get_width(raster); + height = rt_raster_get_height(raster); + ds = GDALCreate( + drv, "", + width, height, + 0, GDT_Byte, NULL + ); + if (NULL == ds) { + rterror("rt_raster_to_gdal_mem: Could not create a GDALDataset to convert into"); + return 0; + } + + /* add geotransform */ + rt_raster_get_geotransform_matrix(raster, gt); + cplerr = GDALSetGeoTransform(ds, gt); + if (cplerr != CE_None) { + rterror("rt_raster_to_gdal_mem: Unable to set geotransformation"); + GDALClose(ds); + return 0; + } + + /* set spatial reference */ + if (NULL != srs && strlen(srs)) { + cplerr = GDALSetProjection(ds, srs); + if (cplerr != CE_None) { + rterror("rt_raster_to_gdal_mem: Unable to set projection"); + GDALClose(ds); + return 0; + } + RASTER_DEBUGF(3, "Projection set to: %s", srs); + } + + /* process bandNums */ + numBands = rt_raster_get_num_bands(raster); + if (NULL != bandNums && count > 0) { + for (i = 0; i < count; i++) { + if (bandNums[i] < 0 || bandNums[i] >= numBands) { + rterror("rt_raster_to_gdal_mem: The band index %d is invalid", bandNums[i]); + GDALClose(ds); + return 0; + } + } + } + else { + count = numBands; + bandNums = (uint32_t *) rtalloc(sizeof(uint32_t) * count); + if (NULL == bandNums) { + rterror("rt_raster_to_gdal_mem: Unable to allocate memory for band indices"); + GDALClose(ds); + return 0; + } + allocBandNums = 1; + for (i = 0; i < count; i++) bandNums[i] = i; + } + + /* add band(s) */ + for (i = 0; i < count; i++) { + rtband = rt_raster_get_band(raster, bandNums[i]); + if (NULL == rtband) { + rterror("rt_raster_to_gdal_mem: Unable to get requested band index %d", bandNums[i]); + if (allocBandNums) rtdealloc(bandNums); + GDALClose(ds); + return 0; + } + + pt = rt_band_get_pixtype(rtband); + gdal_pt = rt_util_pixtype_to_gdal_datatype(pt); + if (gdal_pt == GDT_Unknown) + rtwarn("rt_raster_to_gdal_mem: Unknown pixel type for band"); + + /* + For all pixel types other than PT_8BSI, set pointer to start of data + */ + if (pt != PT_8BSI) { + pVoid = rt_band_get_data(rtband); + RASTER_DEBUGF(4, "Band data is at pos %p", pVoid); + + pszDataPointer = (char *) rtalloc(20 * sizeof (char)); + sprintf(pszDataPointer, "%p", pVoid); + RASTER_DEBUGF(4, "rt_raster_to_gdal_mem: szDatapointer is %p", + pszDataPointer); + + if (strnicmp(pszDataPointer, "0x", 2) == 0) + sprintf(szGDALOption, "DATAPOINTER=%s", pszDataPointer); + else + sprintf(szGDALOption, "DATAPOINTER=0x%s", pszDataPointer); + + RASTER_DEBUG(3, "Storing info for GDAL MEM raster band"); + + apszOptions[0] = szGDALOption; + apszOptions[1] = NULL; /* pixel offset, not needed */ + apszOptions[2] = NULL; /* line offset, not needed */ + apszOptions[3] = NULL; + + /* free */ + rtdealloc(pszDataPointer); + + /* add band */ + if (GDALAddBand(ds, gdal_pt, apszOptions) == CE_Failure) { + rterror("rt_raster_to_gdal_mem: Could not add GDAL raster band"); + if (allocBandNums) rtdealloc(bandNums); + GDALClose(ds); + return 0; + } + } + /* + PT_8BSI is special as GDAL has no equivalent pixel type. + Must convert 8BSI to 16BSI so create basic band + */ + else { + /* add band */ + if (GDALAddBand(ds, gdal_pt, NULL) == CE_Failure) { + rterror("rt_raster_to_gdal_mem: Could not add GDAL raster band"); + if (allocBandNums) rtdealloc(bandNums); + GDALClose(ds); + return 0; + } + } + + /* check band count */ + if (GDALGetRasterCount(ds) != i + 1) { + rterror("rt_raster_to_gdal_mem: Error creating GDAL MEM raster band"); + if (allocBandNums) rtdealloc(bandNums); + GDALClose(ds); + return 0; + } + + /* get new band */ + band = NULL; + band = GDALGetRasterBand(ds, i + 1); + if (NULL == band) { + rterror("rt_raster_to_gdal_mem: Could not get GDAL band for additional processing"); + if (allocBandNums) rtdealloc(bandNums); + GDALClose(ds); + return 0; + } + + /* PT_8BSI requires manual setting of pixels */ + if (pt == PT_8BSI) { + int nXBlocks, nYBlocks; + int nXBlockSize, nYBlockSize; + int iXBlock, iYBlock; + int nXValid, nYValid; + int iX, iY; + int iXMax, iYMax; + + int x, y, z; + uint32_t valueslen = 0; + int16_t *values = NULL; + double value = 0.; + + /* this makes use of GDAL's "natural" blocks */ + GDALGetBlockSize(band, &nXBlockSize, &nYBlockSize); + nXBlocks = (width + nXBlockSize - 1) / nXBlockSize; + nYBlocks = (height + nYBlockSize - 1) / nYBlockSize; + RASTER_DEBUGF(4, "(nXBlockSize, nYBlockSize) = (%d, %d)", nXBlockSize, nYBlockSize); + RASTER_DEBUGF(4, "(nXBlocks, nYBlocks) = (%d, %d)", nXBlocks, nYBlocks); + + /* length is for the desired pixel type */ + valueslen = rt_pixtype_size(PT_16BSI) * nXBlockSize * nYBlockSize; + values = rtalloc(valueslen); + if (NULL == values) { + rterror("rt_raster_to_gdal_mem: Could not allocate memory for GDAL band pixel values"); + if (allocBandNums) rtdealloc(bandNums); + GDALClose(ds); + return 0; + } + + for (iYBlock = 0; iYBlock < nYBlocks; iYBlock++) { + for (iXBlock = 0; iXBlock < nXBlocks; iXBlock++) { + memset(values, 0, valueslen); + + x = iXBlock * nXBlockSize; + y = iYBlock * nYBlockSize; + RASTER_DEBUGF(4, "(iXBlock, iYBlock) = (%d, %d)", iXBlock, iYBlock); + RASTER_DEBUGF(4, "(x, y) = (%d, %d)", x, y); + + /* valid block width */ + if ((iXBlock + 1) * nXBlockSize > width) + nXValid = width - (iXBlock * nXBlockSize); + else + nXValid = nXBlockSize; + + /* valid block height */ + if ((iYBlock + 1) * nYBlockSize > height) + nYValid = height - (iYBlock * nYBlockSize); + else + nYValid = nYBlockSize; + + RASTER_DEBUGF(4, "(nXValid, nYValid) = (%d, %d)", nXValid, nYValid); + + /* convert 8BSI values to 16BSI */ + z = 0; + iYMax = y + nYValid; + iXMax = x + nXValid; + for (iY = y; iY < iYMax; iY++) { + for (iX = x; iX < iXMax; iX++) { + if (rt_band_get_pixel(rtband, iX, iY, &value) != 0) { + rterror("rt_raster_to_gdal_mem: Could not get pixel value to convert from 8BSI to 16BSI"); + rtdealloc(values); + if (allocBandNums) rtdealloc(bandNums); + GDALClose(ds); + return 0; + } + + values[z++] = rt_util_clamp_to_16BSI(value); + } + } + + /* burn values */ + if (GDALRasterIO( + band, GF_Write, + x, y, + nXValid, nYValid, + values, nXValid, nYValid, + gdal_pt, + 0, 0 + ) != CE_None) { + rterror("rt_raster_to_gdal_mem: Could not write converted 8BSI to 16BSI values to GDAL band"); + rtdealloc(values); + if (allocBandNums) rtdealloc(bandNums); + GDALClose(ds); + return 0; + } + } + } + + rtdealloc(values); + } + + /* Add nodata value for band */ + if (rt_band_get_hasnodata_flag(rtband) != FALSE) { + nodata = rt_band_get_nodata(rtband); + if (GDALSetRasterNoDataValue(band, nodata) != CE_None) + rtwarn("rt_raster_to_gdal_mem: Could not set nodata value for band"); + RASTER_DEBUGF(3, "nodata value set to %f", GDALGetRasterNoDataValue(band, NULL)); + } + } + + /* necessary??? */ + GDALFlushCache(ds); + + if (allocBandNums) rtdealloc(bandNums); + + return ds; +} + +/** + * Return a raster from a GDAL dataset + * + * @param ds : the GDAL dataset to convert to a raster + * + * @return raster + */ +rt_raster +rt_raster_from_gdal_dataset(GDALDatasetH ds) { + rt_raster rast = NULL; + double gt[6] = {0}; + CPLErr cplerr; + uint32_t width = 0; + uint32_t height = 0; + uint32_t numBands = 0; + int i = 0; + int status; + + const char *srs = NULL; + + GDALRasterBandH gdband = NULL; + GDALDataType gdpixtype = GDT_Unknown; + rt_band band; + int32_t idx; + rt_pixtype pt = PT_END; + uint32_t ptlen = 0; + uint32_t hasnodata = 0; + double nodataval; + + int x; + int y; + + int nXBlocks, nYBlocks; + int nXBlockSize, nYBlockSize; + int iXBlock, iYBlock; + int nXValid, nYValid; + int iY; + + void *values = NULL; + uint32_t valueslen = 0; + void *ptr = NULL; + + assert(NULL != ds); + + /* raster size */ + width = GDALGetRasterXSize(ds); + height = GDALGetRasterYSize(ds); + RASTER_DEBUGF(3, "Raster dimensions (width x height): %d x %d", width, height); + + /* create new raster */ + RASTER_DEBUG(3, "Creating new raster"); + rast = rt_raster_new(width, height); + if (NULL == rast) { + rterror("rt_raster_from_gdal_dataset: Out of memory allocating new raster"); + return NULL; + } + RASTER_DEBUGF(3, "Created raster dimensions (width x height): %d x %d", rast->width, rast->height); + + /* get raster attributes */ + cplerr = GDALGetGeoTransform(ds, gt); + if (cplerr != CE_None) { + rterror("rt_raster_from_gdal_dataset: Unable to get geotransformation"); + rt_raster_destroy(rast); + return NULL; + } + RASTER_DEBUGF(3, "Raster geotransform (%f, %f, %f, %f, %f, %f)", + gt[0], gt[1], gt[2], gt[3], gt[4], gt[5]); + + /* apply raster attributes */ + rt_raster_set_geotransform_matrix(rast, gt); + + /* srid */ + srs = GDALGetProjectionRef(ds); + if (srs != NULL && srs[0] != '\0') { + OGRSpatialReferenceH hSRS = OSRNewSpatialReference(NULL); + if (OSRSetFromUserInput(hSRS, srs) == OGRERR_NONE) { + const char* pszAuthorityName = OSRGetAuthorityName(hSRS, NULL); + const char* pszAuthorityCode = OSRGetAuthorityCode(hSRS, NULL); + if ( + pszAuthorityName != NULL && + strcmp(pszAuthorityName, "EPSG") == 0 && + pszAuthorityCode != NULL + ) { + rt_raster_set_srid(rast, atoi(pszAuthorityCode)); + } + } + OSRDestroySpatialReference(hSRS); + } + + /* copy bands */ + numBands = GDALGetRasterCount(ds); + for (i = 1; i <= numBands; i++) { + RASTER_DEBUGF(3, "Processing band %d of %d", i, numBands); + gdband = NULL; + gdband = GDALGetRasterBand(ds, i); + if (NULL == gdband) { + rterror("rt_raster_from_gdal_dataset: Unable to get GDAL band"); + rt_raster_destroy(rast); + return NULL; + } + + /* pixtype */ + gdpixtype = GDALGetRasterDataType(gdband); + pt = rt_util_gdal_datatype_to_pixtype(gdpixtype); + if (pt == PT_END) { + rterror("rt_raster_from_gdal_dataset: Unknown pixel type for GDAL band"); + rt_raster_destroy(rast); + return NULL; + } + ptlen = rt_pixtype_size(pt); + + /* size: width and height */ + width = GDALGetRasterBandXSize(gdband); + height = GDALGetRasterBandYSize(gdband); + RASTER_DEBUGF(3, "Band dimensions (width x height): %d x %d", width, height); + + /* nodata */ + nodataval = GDALGetRasterNoDataValue(gdband, &status); + if (!status) { + nodataval = 0; + hasnodata = 0; + } + else + hasnodata = 1; + RASTER_DEBUGF(3, "(hasnodata, nodataval) = (%d, %f)", hasnodata, nodataval); + + /* create band object */ + idx = rt_raster_generate_new_band( + rast, pt, + (hasnodata ? nodataval : 0), + hasnodata, nodataval, rt_raster_get_num_bands(rast) + ); + if (idx < 0) { + rterror("rt_raster_from_gdal_dataset: Could not allocate memory for raster band"); + rt_raster_destroy(rast); + return NULL; + } + band = rt_raster_get_band(rast, idx); + RASTER_DEBUGF(3, "Created band of dimension (width x height): %d x %d", band->width, band->height); + + /* this makes use of GDAL's "natural" blocks */ + GDALGetBlockSize(gdband, &nXBlockSize, &nYBlockSize); + nXBlocks = (width + nXBlockSize - 1) / nXBlockSize; + nYBlocks = (height + nYBlockSize - 1) / nYBlockSize; + RASTER_DEBUGF(4, "(nXBlockSize, nYBlockSize) = (%d, %d)", nXBlockSize, nYBlockSize); + RASTER_DEBUGF(4, "(nXBlocks, nYBlocks) = (%d, %d)", nXBlocks, nYBlocks); + + /* allocate memory for values */ + valueslen = ptlen * nXBlockSize * nYBlockSize; + switch (gdpixtype) { + case GDT_Byte: + values = (uint8_t *) rtalloc(valueslen); + break; + case GDT_UInt16: + values = (uint16_t *) rtalloc(valueslen); + break; + case GDT_Int16: + values = (int16_t *) rtalloc(valueslen); + break; + case GDT_UInt32: + values = (uint32_t *) rtalloc(valueslen); + break; + case GDT_Int32: + values = (int32_t *) rtalloc(valueslen); + break; + case GDT_Float32: + values = (float *) rtalloc(valueslen); + break; + case GDT_Float64: + values = (double *) rtalloc(valueslen); + break; + default: + /* should NEVER get here */ + rterror("rt_raster_from_gdal_dataset: Could not allocate memory for unknown pixel type"); + rt_raster_destroy(rast); + return NULL; + } + if (values == NULL) { + rterror("rt_raster_from_gdal_dataset: Could not allocate memory for GDAL band pixel values"); + rt_raster_destroy(rast); + return NULL; + } + + for (iYBlock = 0; iYBlock < nYBlocks; iYBlock++) { + for (iXBlock = 0; iXBlock < nXBlocks; iXBlock++) { + memset(values, 0, valueslen); + + x = iXBlock * nXBlockSize; + y = iYBlock * nYBlockSize; + RASTER_DEBUGF(4, "(iXBlock, iYBlock) = (%d, %d)", iXBlock, iYBlock); + RASTER_DEBUGF(4, "(x, y) = (%d, %d)", x, y); + + /* valid block width */ + if ((iXBlock + 1) * nXBlockSize > width) + nXValid = width - (iXBlock * nXBlockSize); + else + nXValid = nXBlockSize; + + /* valid block height */ + if ((iYBlock + 1) * nYBlockSize > height) + nYValid = height - (iYBlock * nYBlockSize); + else + nYValid = nYBlockSize; + + RASTER_DEBUGF(4, "(nXValid, nYValid) = (%d, %d)", nXValid, nYValid); + + cplerr = GDALRasterIO( + gdband, GF_Read, + x, y, + nXValid, nYValid, + values, nXValid, nYValid, + gdpixtype, + 0, 0 + ); + if (cplerr != CE_None) { + rterror("rt_raster_from_gdal_dataset: Unable to get data from transformed raster"); + rtdealloc(values); + rt_raster_destroy(rast); + return NULL; + } + + /* if block width is same as raster width, shortcut */ + if (nXBlocks == 1 && nYBlockSize > 1 && nXValid == width) { + x = 0; + y = nYBlockSize * iYBlock; + + RASTER_DEBUGF(4, "Setting set of pixel lines at (%d, %d) for %d pixels", x, y, nXValid * nYValid); + rt_band_set_pixel_line(band, x, y, values, nXValid * nYValid); + } + else { + ptr = values; + x = nXBlockSize * iXBlock; + for (iY = 0; iY < nYValid; iY++) { + y = iY + (nYBlockSize * iYBlock); + + RASTER_DEBUGF(4, "Setting pixel line at (%d, %d) for %d pixels", x, y, nXValid); + rt_band_set_pixel_line(band, x, y, ptr, nXValid); + ptr += (nXValid * ptlen); + } + } + } + } + + /* free memory */ + rtdealloc(values); + } + + return rast; +} + +/** + * Return a warped raster using GDAL Warp API + * + * @param raster : raster to transform + * @param src_srs : the raster's coordinate system in OGC WKT + * @param dst_srs : the warped raster's coordinate system in OGC WKT + * @param scale_x : the x size of pixels of the warped raster's pixels in + * units of dst_srs + * @param scale_y : the y size of pixels of the warped raster's pixels in + * units of dst_srs + * @param width : the number of columns of the warped raster. note that + * width/height CANNOT be used with scale_x/scale_y + * @param height : the number of rows of the warped raster. note that + * width/height CANNOT be used with scale_x/scale_y + * @param ul_xw : the X value of upper-left corner of the warped raster in + * units of dst_srs + * @param ul_yw : the Y value of upper-left corner of the warped raster in + * units of dst_srs + * @param grid_xw : the X value of point on a grid to align warped raster + * to in units of dst_srs + * @param grid_yw : the Y value of point on a grid to align warped raster + * to in units of dst_srs + * @param skew_x : the X skew of the warped raster in units of dst_srs + * @param skew_y : the Y skew of the warped raster in units of dst_srs + * @param resample_alg : the resampling algorithm + * @param max_err : maximum error measured in input pixels permitted + * (0.0 for exact calculations) + * + * @return the warped raster + */ +rt_raster rt_raster_gdal_warp( + rt_raster raster, const char *src_srs, + const char *dst_srs, + double *scale_x, double *scale_y, + int *width, int *height, + double *ul_xw, double *ul_yw, + double *grid_xw, double *grid_yw, + double *skew_x, double *skew_y, + GDALResampleAlg resample_alg, double max_err +) { + CPLErr cplerr; + GDALDriverH src_drv = NULL; + GDALDatasetH src_ds = NULL; + GDALWarpOptions *wopts = NULL; + GDALDriverH dst_drv = NULL; + GDALDatasetH dst_ds = NULL; + char *_src_srs = NULL; + char *_dst_srs = NULL; + char *dst_options[] = {"SUBCLASS=VRTWarpedDataset", NULL}; + char **transform_opts = NULL; + int transform_opts_len = 2; + void *transform_arg = NULL; + void *imgproj_arg = NULL; + void *approx_arg = NULL; + GDALTransformerFunc transform_func = NULL; + + GDALRasterBandH band; + rt_band rtband = NULL; + rt_pixtype pt = PT_END; + GDALDataType gdal_pt = GDT_Unknown; + double nodata = 0.0; + + double _gt[6] = {0}; + double dst_extent[4]; + rt_envelope extent; + + int _dim[2] = {0}; + double _skew[2] = {0}; + double _scale[2] = {0}; + int ul_user = 0; + + rt_raster rast = NULL; + int i = 0; + int j = 0; + int numBands = 0; + + RASTER_DEBUG(3, "starting"); + + assert(NULL != raster); + assert(NULL != src_srs); + + /* + max_err must be gte zero + + the value 0.125 is the default used in gdalwarp.cpp on line 283 + */ + if (max_err < 0.) max_err = 0.125; + RASTER_DEBUGF(4, "max_err = %f", max_err); + + _src_srs = rt_util_gdal_convert_sr(src_srs, 0); + /* dst_srs not provided, set to src_srs */ + if (NULL == dst_srs) + _dst_srs = rt_util_gdal_convert_sr(src_srs, 0); + else + _dst_srs = rt_util_gdal_convert_sr(dst_srs, 0); + + /* load raster into a GDAL MEM dataset */ + src_ds = rt_raster_to_gdal_mem(raster, _src_srs, NULL, 0, &src_drv); + if (NULL == src_ds) { + rterror("rt_raster_gdal_warp: Unable to convert raster to GDAL MEM format"); + + CPLFree(_src_srs); + CPLFree(_dst_srs); + + return NULL; + } + RASTER_DEBUG(3, "raster loaded into GDAL MEM dataset"); + + /* set transform_opts */ + transform_opts = (char **) rtalloc(sizeof(char *) * (transform_opts_len + 1)); + if (NULL == transform_opts) { + rterror("rt_raster_gdal_warp: Unable to allocation memory for transform options"); + + GDALClose(src_ds); + + CPLFree(_src_srs); + CPLFree(_dst_srs); + + return NULL; + } + for (i = 0; i < transform_opts_len; i++) { + switch (i) { + case 1: + transform_opts[i] = (char *) rtalloc(sizeof(char) * (strlen("DST_SRS=") + strlen(_dst_srs) + 1)); + break; + case 0: + transform_opts[i] = (char *) rtalloc(sizeof(char) * (strlen("SRC_SRS=") + strlen(_src_srs) + 1)); + break; + } + if (NULL == transform_opts[i]) { + rterror("rt_raster_gdal_warp: Unable to allocation memory for transform options"); + + for (j = 0; j < i; j++) rtdealloc(transform_opts[j]); + rtdealloc(transform_opts); + GDALClose(src_ds); + + CPLFree(_src_srs); + CPLFree(_dst_srs); + + return NULL; + } + + switch (i) { + case 1: + snprintf( + transform_opts[i], + sizeof(char) * (strlen("DST_SRS=") + strlen(_dst_srs) + 1), + "DST_SRS=%s", + _dst_srs + ); + break; + case 0: + snprintf( + transform_opts[i], + sizeof(char) * (strlen("SRC_SRS=") + strlen(_src_srs) + 1), + "SRC_SRS=%s", + _src_srs + ); + break; + } + RASTER_DEBUGF(4, "transform_opts[%d] = %s", i, transform_opts[i]); + } + transform_opts[transform_opts_len] = NULL; + CPLFree(_src_srs); + CPLFree(_dst_srs); + + /* transformation object for building dst dataset */ + transform_arg = GDALCreateGenImgProjTransformer2(src_ds, NULL, transform_opts); + if (NULL == transform_arg) { + rterror("rt_raster_gdal_warp: Unable to create GDAL transformation object for output dataset creation"); + + GDALClose(src_ds); + + for (i = 0; i < transform_opts_len; i++) rtdealloc(transform_opts[i]); + rtdealloc(transform_opts); + + return NULL; + } + + /* get approximate output georeferenced bounds and resolution */ + cplerr = GDALSuggestedWarpOutput2(src_ds, GDALGenImgProjTransform, + transform_arg, _gt, &(_dim[0]), &(_dim[1]), dst_extent, 0); + GDALDestroyGenImgProjTransformer(transform_arg); + if (cplerr != CE_None) { + rterror("rt_raster_gdal_warp: Unable to get GDAL suggested warp output for output dataset creation"); + + GDALClose(src_ds); + + for (i = 0; i < transform_opts_len; i++) rtdealloc(transform_opts[i]); + rtdealloc(transform_opts); + + return NULL; + } + + /* + don't use suggested dimensions as use of suggested scales + on suggested extent will result in suggested dimensions + */ + _dim[0] = 0; + _dim[1] = 0; + + RASTER_DEBUGF(3, "Suggested geotransform: %f, %f, %f, %f, %f, %f", + _gt[0], _gt[1], _gt[2], _gt[3], _gt[4], _gt[5]); + + /* store extent in easier-to-use object */ + extent.MinX = dst_extent[0]; + extent.MinY = dst_extent[1]; + extent.MaxX = dst_extent[2]; + extent.MaxY = dst_extent[3]; + + extent.UpperLeftX = dst_extent[0]; + extent.UpperLeftY = dst_extent[3]; + + RASTER_DEBUGF(3, "Suggested extent: %f, %f, %f, %f", + extent.MinX, extent.MinY, extent.MaxX, extent.MaxY); + + /* scale and width/height are mutually exclusive */ + if ( + ((NULL != scale_x) || (NULL != scale_y)) && + ((NULL != width) || (NULL != height)) + ) { + rterror("rt_raster_gdal_warp: Scale X/Y and width/height are mutually exclusive. Only provide one"); + + GDALClose(src_ds); + + for (i = 0; i < transform_opts_len; i++) rtdealloc(transform_opts[i]); + rtdealloc(transform_opts); + + return NULL; + } + + /* user-defined width */ + if (NULL != width) { + _dim[0] = abs(*width); + _scale[0] = fabs((extent.MaxX - extent.MinX) / ((double) _dim[0])); + } + /* user-defined height */ + if (NULL != height) { + _dim[1] = abs(*height); + _scale[1] = fabs((extent.MaxY - extent.MinY) / ((double) _dim[1])); + } + + /* user-defined scale */ + if ( + ((NULL != scale_x) && (FLT_NEQ(*scale_x, 0.0))) && + ((NULL != scale_y) && (FLT_NEQ(*scale_y, 0.0))) + ) { + _scale[0] = fabs(*scale_x); + _scale[1] = fabs(*scale_y); + } + else if ( + ((NULL != scale_x) && (NULL == scale_y)) || + ((NULL == scale_x) && (NULL != scale_y)) + ) { + rterror("rt_raster_gdal_warp: Both X and Y scale values must be provided for scale"); + + GDALClose(src_ds); + + for (i = 0; i < transform_opts_len; i++) rtdealloc(transform_opts[i]); + rtdealloc(transform_opts); + + return NULL; + } + + /* scale not defined, use suggested */ + if (FLT_EQ(_scale[0], 0) && FLT_EQ(_scale[1], 0)) { + _scale[0] = fabs(_gt[1]); + _scale[1] = fabs(_gt[5]); + } + + RASTER_DEBUGF(4, "Using scale: %f x %f", _scale[0], -1 * _scale[1]); + + /* user-defined skew */ + if (NULL != skew_x) { + _skew[0] = *skew_x; + + /* + negative scale-x affects skew + for now, force skew to be in left-right, top-down orientation + */ + if ( + NULL != scale_x && + *scale_x < 0. + ) { + _skew[0] *= -1; + } + } + if (NULL != skew_y) { + _skew[1] = *skew_y; + + /* + positive scale-y affects skew + for now, force skew to be in left-right, top-down orientation + */ + if ( + NULL != scale_y && + *scale_y > 0. + ) { + _skew[1] *= -1; + } + } + + RASTER_DEBUGF(4, "Using skew: %f x %f", _skew[0], _skew[1]); + + /* reprocess extent if skewed */ + if ( + FLT_NEQ(_skew[0], 0) || + FLT_NEQ(_skew[1], 0) + ) { + rt_raster skewedrast; + + RASTER_DEBUG(3, "Computing skewed extent's envelope"); + + skewedrast = rt_raster_compute_skewed_raster( + extent, + _skew, + _scale, + 0.01 + ); + if (skewedrast == NULL) { + rterror("rt_raster_gdal_warp: Could not compute skewed raster"); + + GDALClose(src_ds); + + for (i = 0; i < transform_opts_len; i++) rtdealloc(transform_opts[i]); + rtdealloc(transform_opts); + + return NULL; + } + + if (_dim[0] == 0) + _dim[0] = skewedrast->width; + if (_dim[1] == 0) + _dim[1] = skewedrast->height; + + extent.UpperLeftX = skewedrast->ipX; + extent.UpperLeftY = skewedrast->ipY; + + rt_raster_destroy(skewedrast); + } + + /* dimensions not defined, compute */ + if (!_dim[0]) + _dim[0] = (int) fmax((fabs(extent.MaxX - extent.MinX) + (_scale[0] / 2.)) / _scale[0], 1); + if (!_dim[1]) + _dim[1] = (int) fmax((fabs(extent.MaxY - extent.MinY) + (_scale[1] / 2.)) / _scale[1], 1); + + /* temporary raster */ + rast = rt_raster_new(_dim[0], _dim[1]); + if (rast == NULL) { + rterror("rt_raster_gdal_warp: Out of memory allocating temporary raster"); + + GDALClose(src_ds); + + for (i = 0; i < transform_opts_len; i++) rtdealloc(transform_opts[i]); + rtdealloc(transform_opts); + + return NULL; + } + + /* set raster's spatial attributes */ + rt_raster_set_offsets(rast, extent.UpperLeftX, extent.UpperLeftY); + rt_raster_set_scale(rast, _scale[0], -1 * _scale[1]); + rt_raster_set_skews(rast, _skew[0], _skew[1]); + + rt_raster_get_geotransform_matrix(rast, _gt); + RASTER_DEBUGF(3, "Temp raster's geotransform: %f, %f, %f, %f, %f, %f", + _gt[0], _gt[1], _gt[2], _gt[3], _gt[4], _gt[5]); + RASTER_DEBUGF(3, "Temp raster's dimensions (width x height): %d x %d", + _dim[0], _dim[1]); + + /* user-defined upper-left corner */ + if ( + NULL != ul_xw && + NULL != ul_yw + ) { + ul_user = 1; + + RASTER_DEBUGF(4, "Using user-specified upper-left corner: %f, %f", *ul_xw, *ul_yw); + + /* set upper-left corner */ + rt_raster_set_offsets(rast, *ul_xw, *ul_yw); + extent.UpperLeftX = *ul_xw; + extent.UpperLeftY = *ul_yw; + } + else if ( + ((NULL != ul_xw) && (NULL == ul_yw)) || + ((NULL == ul_xw) && (NULL != ul_yw)) + ) { + rterror("rt_raster_gdal_warp: Both X and Y upper-left corner values must be provided"); + + rt_raster_destroy(rast); + GDALClose(src_ds); + + for (i = 0; i < transform_opts_len; i++) rtdealloc(transform_opts[i]); + rtdealloc(transform_opts); + + return NULL; + } + + /* alignment only considered if upper-left corner not provided */ + if ( + !ul_user && ( + (NULL != grid_xw) || (NULL != grid_yw) + ) + ) { + + if ( + ((NULL != grid_xw) && (NULL == grid_yw)) || + ((NULL == grid_xw) && (NULL != grid_yw)) + ) { + rterror("rt_raster_gdal_warp: Both X and Y alignment values must be provided"); + + rt_raster_destroy(rast); + GDALClose(src_ds); + + for (i = 0; i < transform_opts_len; i++) rtdealloc(transform_opts[i]); + rtdealloc(transform_opts); + + return NULL; + } + + RASTER_DEBUGF(4, "Aligning extent to user-specified grid: %f, %f", *grid_xw, *grid_yw); + + do { + double _r[2] = {0}; + double _w[2] = {0}; + + /* raster is already aligned */ + if (FLT_EQ(*grid_xw, extent.UpperLeftX) && FLT_EQ(*grid_yw, extent.UpperLeftY)) { + RASTER_DEBUG(3, "Skipping raster alignment as it is already aligned to grid"); + break; + } + + extent.UpperLeftX = rast->ipX; + extent.UpperLeftY = rast->ipY; + rt_raster_set_offsets(rast, *grid_xw, *grid_yw); + + /* process upper-left corner */ + if (!rt_raster_geopoint_to_cell( + rast, + extent.UpperLeftX, extent.UpperLeftY, + &(_r[0]), &(_r[1]), + NULL + )) { + rterror("rt_raster_gdal_warp: Unable to compute raster pixel for spatial coordinates"); + + rt_raster_destroy(rast); + GDALClose(src_ds); + + for (i = 0; i < transform_opts_len; i++) rtdealloc(transform_opts[i]); + rtdealloc(transform_opts); + + return NULL; + } + + if (!rt_raster_cell_to_geopoint( + rast, + _r[0], _r[1], + &(_w[0]), &(_w[1]), + NULL + )) { + rterror("rt_raster_gdal_warp: Unable to compute spatial coordinates for raster pixel"); + + rt_raster_destroy(rast); + GDALClose(src_ds); + + for (i = 0; i < transform_opts_len; i++) rtdealloc(transform_opts[i]); + rtdealloc(transform_opts); + + return NULL; + } + + /* shift occurred */ + if (FLT_NEQ(_w[0], extent.UpperLeftX)) { + if (NULL == width) + rast->width++; + else if (NULL == scale_x) { + double _c[2] = {0}; + + rt_raster_set_offsets(rast, extent.UpperLeftX, extent.UpperLeftY); + + /* get upper-right corner */ + if (!rt_raster_cell_to_geopoint( + rast, + rast->width, 0, + &(_c[0]), &(_c[1]), + NULL + )) { + rterror("rt_raster_gdal_warp: Unable to compute spatial coordinates for raster pixel"); + + rt_raster_destroy(rast); + GDALClose(src_ds); + + for (i = 0; i < transform_opts_len; i++) rtdealloc(transform_opts[i]); + rtdealloc(transform_opts); + + return NULL; + } + + rast->scaleX = fabs((_c[0] - _w[0]) / ((double) rast->width)); + } + } + if (FLT_NEQ(_w[1], extent.UpperLeftY)) { + if (NULL == height) + rast->height++; + else if (NULL == scale_y) { + double _c[2] = {0}; + + rt_raster_set_offsets(rast, extent.UpperLeftX, extent.UpperLeftY); + + /* get upper-right corner */ + if (!rt_raster_cell_to_geopoint( + rast, + 0, rast->height, + &(_c[0]), &(_c[1]), + NULL + )) { + rterror("rt_raster_gdal_warp: Unable to compute spatial coordinates for raster pixel"); + + rt_raster_destroy(rast); + GDALClose(src_ds); + + for (i = 0; i < transform_opts_len; i++) rtdealloc(transform_opts[i]); + rtdealloc(transform_opts); + + return NULL; + } + + rast->scaleY = -1 * fabs((_c[1] - _w[1]) / ((double) rast->height)); + } + } + + rt_raster_set_offsets(rast, _w[0], _w[1]); + RASTER_DEBUGF(4, "aligned offsets: %f x %f", _w[0], _w[1]); + } + while (0); + } + + /* + after this point, rt_envelope extent is no longer used + */ + + /* get key attributes from rast */ + _dim[0] = rast->width; + _dim[1] = rast->height; + rt_raster_get_geotransform_matrix(rast, _gt); + + /* scale-x is negative or scale-y is positive */ + if (( + (NULL != scale_x) && (*scale_x < 0.) + ) || ( + (NULL != scale_y) && (*scale_y > 0) + )) { + double _w[2] = {0}; + + /* negative scale-x */ + if ( + (NULL != scale_x) && + (*scale_x < 0.) + ) { + if (!rt_raster_cell_to_geopoint( + rast, + rast->width, 0, + &(_w[0]), &(_w[1]), + NULL + )) { + rterror("rt_raster_gdal_warp: Unable to compute spatial coordinates for raster pixel"); + + rt_raster_destroy(rast); + + GDALClose(src_ds); + + for (i = 0; i < transform_opts_len; i++) rtdealloc(transform_opts[i]); + rtdealloc(transform_opts); + + return NULL; + } + + _gt[0] = _w[0]; + _gt[1] = *scale_x; + + /* check for skew */ + if (NULL != skew_x && FLT_NEQ(*skew_x, 0)) + _gt[2] = *skew_x; + } + /* positive scale-y */ + if ( + (NULL != scale_y) && + (*scale_y > 0) + ) { + if (!rt_raster_cell_to_geopoint( + rast, + 0, rast->height, + &(_w[0]), &(_w[1]), + NULL + )) { + rterror("rt_raster_gdal_warp: Unable to compute spatial coordinates for raster pixel"); + + rt_raster_destroy(rast); + + GDALClose(src_ds); + + for (i = 0; i < transform_opts_len; i++) rtdealloc(transform_opts[i]); + rtdealloc(transform_opts); + + return NULL; + } + + _gt[3] = _w[1]; + _gt[5] = *scale_y; + + /* check for skew */ + if (NULL != skew_y && FLT_NEQ(*skew_y, 0)) + _gt[4] = *skew_y; + } + } + + rt_raster_destroy(rast); + rast = NULL; + + RASTER_DEBUGF(3, "Applied geotransform: %f, %f, %f, %f, %f, %f", + _gt[0], _gt[1], _gt[2], _gt[3], _gt[4], _gt[5]); + RASTER_DEBUGF(3, "Raster dimensions (width x height): %d x %d", + _dim[0], _dim[1]); + + if (FLT_EQ(_dim[0], 0) || FLT_EQ(_dim[1], 0)) { + rterror("rt_raster_gdal_warp: The width (%f) or height (%f) of the warped raster is zero", _dim[0], _dim[1]); + + GDALClose(src_ds); + + for (i = 0; i < transform_opts_len; i++) rtdealloc(transform_opts[i]); + rtdealloc(transform_opts); + + return NULL; + } + + /* load VRT driver */ + if (!rt_util_gdal_driver_registered("VRT")) + GDALRegister_VRT(); + dst_drv = GDALGetDriverByName("VRT"); + if (NULL == dst_drv) { + rterror("rt_raster_gdal_warp: Unable to load the output GDAL VRT driver"); + + GDALClose(src_ds); + + return NULL; + } + + /* create dst dataset */ + dst_ds = GDALCreate(dst_drv, "", _dim[0], _dim[1], 0, GDT_Byte, dst_options); + if (NULL == dst_ds) { + rterror("rt_raster_gdal_warp: Unable to create GDAL VRT dataset"); + + GDALClose(src_ds); + + for (i = 0; i < transform_opts_len; i++) rtdealloc(transform_opts[i]); + rtdealloc(transform_opts); + + return NULL; + } + + /* add bands to dst dataset */ + numBands = rt_raster_get_num_bands(raster); + for (i = 0; i < numBands; i++) { + rtband = rt_raster_get_band(raster, i); + if (NULL == rtband) { + rterror("rt_raster_gdal_warp: Unable to get band %d for adding to VRT dataset", i); + + GDALClose(dst_ds); + GDALClose(src_ds); + + for (i = 0; i < transform_opts_len; i++) rtdealloc(transform_opts[i]); + rtdealloc(transform_opts); + + return NULL; + } + + pt = rt_band_get_pixtype(rtband); + gdal_pt = rt_util_pixtype_to_gdal_datatype(pt); + if (gdal_pt == GDT_Unknown) + rtwarn("rt_raster_gdal_warp: Unknown pixel type for band %d", i); + + cplerr = GDALAddBand(dst_ds, gdal_pt, NULL); + if (cplerr != CE_None) { + rterror("rt_raster_gdal_warp: Unable to add band to VRT dataset"); + + GDALClose(dst_ds); + GDALClose(src_ds); + + for (i = 0; i < transform_opts_len; i++) rtdealloc(transform_opts[i]); + rtdealloc(transform_opts); + + return NULL; + } + + /* get band to write data to */ + band = NULL; + band = GDALGetRasterBand(dst_ds, i + 1); + if (NULL == band) { + rterror("rt_raster_gdal_warp: Could not get GDAL band for additional processing"); + + GDALClose(dst_ds); + GDALClose(src_ds); + + for (i = 0; i < transform_opts_len; i++) rtdealloc(transform_opts[i]); + rtdealloc(transform_opts); + + return NULL; + } + + /* set nodata */ + if (rt_band_get_hasnodata_flag(rtband) != FALSE) { + nodata = rt_band_get_nodata(rtband); + if (GDALSetRasterNoDataValue(band, nodata) != CE_None) + rtwarn("rt_raster_gdal_warp: Could not set nodata value for band %d", i); + RASTER_DEBUGF(3, "nodata value set to %f", GDALGetRasterNoDataValue(band, NULL)); + } + } + + /* set dst srs */ + _dst_srs = rt_util_gdal_convert_sr((NULL == dst_srs ? src_srs : dst_srs), 1); + cplerr = GDALSetProjection(dst_ds, _dst_srs); + CPLFree(_dst_srs); + if (cplerr != CE_None) { + rterror("rt_raster_gdal_warp: Unable to set projection"); + + GDALClose(dst_ds); + GDALClose(src_ds); + + for (i = 0; i < transform_opts_len; i++) rtdealloc(transform_opts[i]); + rtdealloc(transform_opts); + + return NULL; + } + + /* set dst geotransform */ + cplerr = GDALSetGeoTransform(dst_ds, _gt); + if (cplerr != CE_None) { + rterror("rt_raster_gdal_warp: Unable to set geotransform"); + + GDALClose(dst_ds); + GDALClose(src_ds); + + for (i = 0; i < transform_opts_len; i++) rtdealloc(transform_opts[i]); + rtdealloc(transform_opts); + + return NULL; + } + + /* create transformation object */ + transform_arg = imgproj_arg = GDALCreateGenImgProjTransformer2(src_ds, dst_ds, transform_opts); + if (NULL == transform_arg) { + rterror("rt_raster_gdal_warp: Unable to create GDAL transformation object"); + + GDALClose(dst_ds); + GDALClose(src_ds); + + for (i = 0; i < transform_opts_len; i++) rtdealloc(transform_opts[i]); + rtdealloc(transform_opts); + + return NULL; + } + transform_func = GDALGenImgProjTransform; + + /* use approximate transformation object */ + if (max_err > 0.0) { + transform_arg = approx_arg = GDALCreateApproxTransformer( + GDALGenImgProjTransform, + imgproj_arg, max_err + ); + if (NULL == transform_arg) { + rterror("rt_raster_gdal_warp: Unable to create GDAL approximate transformation object"); + + GDALClose(dst_ds); + GDALClose(src_ds); + + GDALDestroyGenImgProjTransformer(imgproj_arg); + for (i = 0; i < transform_opts_len; i++) rtdealloc(transform_opts[i]); + rtdealloc(transform_opts); + + return NULL; + } + + transform_func = GDALApproxTransform; + } + + /* warp options */ + wopts = GDALCreateWarpOptions(); + if (NULL == wopts) { + rterror("rt_raster_gdal_warp: Unable to create GDAL warp options object"); + + GDALClose(dst_ds); + GDALClose(src_ds); + + GDALDestroyGenImgProjTransformer(imgproj_arg); + GDALDestroyApproxTransformer(approx_arg); + for (i = 0; i < transform_opts_len; i++) rtdealloc(transform_opts[i]); + rtdealloc(transform_opts); + + return NULL; + } + + /* set options */ + wopts->eResampleAlg = resample_alg; + wopts->hSrcDS = src_ds; + wopts->hDstDS = dst_ds; + wopts->pfnTransformer = transform_func; + wopts->pTransformerArg = transform_arg; + wopts->papszWarpOptions = (char **) CPLMalloc(sizeof(char *) * 2); + wopts->papszWarpOptions[0] = (char *) CPLMalloc(sizeof(char) * (strlen("INIT_DEST=NO_DATA") + 1)); + strcpy(wopts->papszWarpOptions[0], "INIT_DEST=NO_DATA"); + wopts->papszWarpOptions[1] = NULL; + + /* set band mapping */ + wopts->nBandCount = numBands; + wopts->panSrcBands = (int *) CPLMalloc(sizeof(int) * wopts->nBandCount); + wopts->panDstBands = (int *) CPLMalloc(sizeof(int) * wopts->nBandCount); + for (i = 0; i < wopts->nBandCount; i++) + wopts->panDstBands[i] = wopts->panSrcBands[i] = i + 1; + + /* set nodata mapping */ + RASTER_DEBUG(3, "Setting nodata mapping"); + wopts->padfSrcNoDataReal = (double *) CPLMalloc(numBands * sizeof(double)); + wopts->padfDstNoDataReal = (double *) CPLMalloc(numBands * sizeof(double)); + wopts->padfSrcNoDataImag = (double *) CPLMalloc(numBands * sizeof(double)); + wopts->padfDstNoDataImag = (double *) CPLMalloc(numBands * sizeof(double)); + if ( + NULL == wopts->padfSrcNoDataReal || + NULL == wopts->padfDstNoDataReal || + NULL == wopts->padfSrcNoDataImag || + NULL == wopts->padfDstNoDataImag + ) { + rterror("rt_raster_gdal_warp: Out of memory allocating nodata mapping"); + + GDALClose(dst_ds); + GDALClose(src_ds); + + GDALDestroyGenImgProjTransformer(imgproj_arg); + GDALDestroyApproxTransformer(approx_arg); + GDALDestroyWarpOptions(wopts); + for (i = 0; i < transform_opts_len; i++) rtdealloc(transform_opts[i]); + rtdealloc(transform_opts); + + return NULL; + } + for (i = 0; i < numBands; i++) { + band = rt_raster_get_band(raster, i); + if (!band) { + rterror("rt_raster_gdal_warp: Unable to process bands for nodata values"); + + GDALClose(dst_ds); + GDALClose(src_ds); + + GDALDestroyGenImgProjTransformer(imgproj_arg); + GDALDestroyApproxTransformer(approx_arg); + GDALDestroyWarpOptions(wopts); + for (i = 0; i < transform_opts_len; i++) rtdealloc(transform_opts[i]); + rtdealloc(transform_opts); + + return NULL; + } + + if (!rt_band_get_hasnodata_flag(band)) { + /* + based on line 1004 of gdalwarp.cpp + the problem is that there is a chance that this number is a legitimate value + */ + wopts->padfSrcNoDataReal[i] = -123456.789; + } + else { + wopts->padfSrcNoDataReal[i] = rt_band_get_nodata(band); + } + + wopts->padfDstNoDataReal[i] = wopts->padfSrcNoDataReal[i]; + wopts->padfDstNoDataImag[i] = wopts->padfSrcNoDataImag[i] = 0.0; + RASTER_DEBUGF(4, "Mapped nodata value for band %d: %f (%f) => %f (%f)", + i, + wopts->padfSrcNoDataReal[i], wopts->padfSrcNoDataImag[i], + wopts->padfDstNoDataReal[i], wopts->padfDstNoDataImag[i] + ); + } + + /* warp raster */ + RASTER_DEBUG(3, "Warping raster"); + cplerr = GDALInitializeWarpedVRT(dst_ds, wopts); + if (cplerr != CE_None) { + rterror("rt_raster_gdal_warp: Unable to warp raster"); + + GDALClose(dst_ds); + GDALClose(src_ds); + + if ((transform_func == GDALApproxTransform) && (NULL != imgproj_arg)) + GDALDestroyGenImgProjTransformer(imgproj_arg); + GDALDestroyWarpOptions(wopts); + for (i = 0; i < transform_opts_len; i++) rtdealloc(transform_opts[i]); + rtdealloc(transform_opts); + + return NULL; + } + GDALFlushCache(dst_ds); + RASTER_DEBUG(3, "Raster warped"); + + /* convert gdal dataset to raster */ + RASTER_DEBUG(3, "Converting GDAL dataset to raster"); + rast = rt_raster_from_gdal_dataset(dst_ds); + + GDALClose(dst_ds); + GDALClose(src_ds); + + if ((transform_func == GDALApproxTransform) && (NULL != imgproj_arg)) + GDALDestroyGenImgProjTransformer(imgproj_arg); + GDALDestroyWarpOptions(wopts); + for (i = 0; i < transform_opts_len; i++) rtdealloc(transform_opts[i]); + rtdealloc(transform_opts); + + if (NULL == rast) { + rterror("rt_raster_gdal_warp: Unable to warp raster"); + return NULL; + } + + RASTER_DEBUG(3, "done"); + + return rast; +} + +/** + * Return a raster of the provided geometry + * + * @param wkb : WKB representation of the geometry to convert + * @param wkb_len : length of the WKB representation of the geometry + * @param srs : the geometry's coordinate system in OGC WKT + * @param num_bands: number of bands in the output raster + * @param pixtype: data type of each band + * @param init: array of values to initialize each band with + * @param value: array of values for pixels of geometry + * @param nodata: array of nodata values for each band + * @param hasnodata: array flagging the presence of nodata for each band + * @param width : the number of columns of the raster + * @param height : the number of rows of the raster + * @param scale_x : the pixel width of the raster + * @param scale_y : the pixel height of the raster + * @param ul_xw : the X value of upper-left corner of the raster + * @param ul_yw : the Y value of upper-left corner of the raster + * @param grid_xw : the X value of point on grid to align raster to + * @param grid_yw : the Y value of point on grid to align raster to + * @param skew_x : the X skew of the raster + * @param skew_y : the Y skew of the raster + * @param options : array of options. only option is "ALL_TOUCHED" + * + * @return the raster of the provided geometry + */ +rt_raster +rt_raster_gdal_rasterize(const unsigned char *wkb, + uint32_t wkb_len, const char *srs, + uint32_t num_bands, rt_pixtype *pixtype, + double *init, double *value, + double *nodata, uint8_t *hasnodata, + int *width, int *height, + double *scale_x, double *scale_y, + double *ul_xw, double *ul_yw, + double *grid_xw, double *grid_yw, + double *skew_x, double *skew_y, + char **options +) { + rt_raster rast; + int i = 0; + int noband = 0; + int banderr = 0; + int *band_list = NULL; + + rt_pixtype *_pixtype = NULL; + double *_init = NULL; + double *_nodata = NULL; + uint8_t *_hasnodata = NULL; + double *_value = NULL; + + int _dim[2] = {0}; + double _scale[2] = {0}; + double _skew[2] = {0}; + + OGRErr ogrerr; + OGRSpatialReferenceH src_sr = NULL; + OGRGeometryH src_geom; + OGREnvelope src_env; + rt_envelope extent; + OGRwkbGeometryType wkbtype = wkbUnknown; + + int ul_user = 0; + + CPLErr cplerr; + double _gt[6] = {0}; + GDALDriverH _drv = NULL; + GDALDatasetH _ds = NULL; + GDALRasterBandH _band = NULL; + + RASTER_DEBUG(3, "starting"); + + assert(NULL != wkb); + assert(0 != wkb_len); + + /* internal aliases */ + _pixtype = pixtype; + _init = init; + _nodata = nodata; + _hasnodata = hasnodata; + _value = value; + + /* no bands, raster is a mask */ + if (num_bands < 1) { + num_bands = 1; + noband = 1; + + _pixtype = (rt_pixtype *) rtalloc(sizeof(rt_pixtype)); + *_pixtype = PT_8BUI; + + _init = (double *) rtalloc(sizeof(double)); + *_init = 0; + + _nodata = (double *) rtalloc(sizeof(double)); + *_nodata = 0; + + _hasnodata = (uint8_t *) rtalloc(sizeof(uint8_t)); + *_hasnodata = 1; + + _value = (double *) rtalloc(sizeof(double)); + *_value = 1; + } + + assert(NULL != _pixtype); + assert(NULL != _init); + assert(NULL != _nodata); + assert(NULL != _hasnodata); + + /* OGR spatial reference */ + if (NULL != srs && strlen(srs)) { + src_sr = OSRNewSpatialReference(NULL); + if (OSRSetFromUserInput(src_sr, srs) != OGRERR_NONE) { + rterror("rt_raster_gdal_rasterize: Unable to create OSR spatial reference using the provided srs: %s", srs); + + if (noband) { + rtdealloc(_pixtype); + rtdealloc(_init); + rtdealloc(_nodata); + rtdealloc(_hasnodata); + rtdealloc(_value); + } + + return NULL; + } + } + + /* convert WKB to OGR Geometry */ + ogrerr = OGR_G_CreateFromWkb((unsigned char *) wkb, src_sr, &src_geom, wkb_len); + if (ogrerr != OGRERR_NONE) { + rterror("rt_raster_gdal_rasterize: Unable to create OGR Geometry from WKB"); + + if (noband) { + rtdealloc(_pixtype); + rtdealloc(_init); + rtdealloc(_nodata); + rtdealloc(_hasnodata); + rtdealloc(_value); + } + + OSRDestroySpatialReference(src_sr); + OGRCleanupAll(); + + return NULL; + } + + /* get envelope */ + OGR_G_GetEnvelope(src_geom, &src_env); + rt_util_from_ogr_envelope(src_env, &extent); + + RASTER_DEBUGF(3, "Suggested raster envelope: %f, %f, %f, %f", + extent.MinX, extent.MinY, extent.MaxX, extent.MaxY); + + /* user-defined scale */ + if ( + (NULL != scale_x) && + (NULL != scale_y) && + (FLT_NEQ(*scale_x, 0.0)) && + (FLT_NEQ(*scale_y, 0.0)) + ) { + /* for now, force scale to be in left-right, top-down orientation */ + _scale[0] = fabs(*scale_x); + _scale[1] = fabs(*scale_y); + } + /* user-defined width/height */ + else if ( + (NULL != width) && + (NULL != height) && + (FLT_NEQ(*width, 0.0)) && + (FLT_NEQ(*height, 0.0)) + ) { + _dim[0] = fabs(*width); + _dim[1] = fabs(*height); + + if (FLT_NEQ(extent.MaxX, extent.MinX)) + _scale[0] = fabs((extent.MaxX - extent.MinX) / _dim[0]); + else + _scale[0] = 1.; + + if (FLT_NEQ(extent.MaxY, extent.MinY)) + _scale[1] = fabs((extent.MaxY - extent.MinY) / _dim[1]); + else + _scale[1] = 1.; + } + else { + rterror("rt_raster_gdal_rasterize: Values must be provided for width and height or X and Y of scale"); + + if (noband) { + rtdealloc(_pixtype); + rtdealloc(_init); + rtdealloc(_nodata); + rtdealloc(_hasnodata); + rtdealloc(_value); + } + + OGR_G_DestroyGeometry(src_geom); + OSRDestroySpatialReference(src_sr); + OGRCleanupAll(); + + return NULL; + } + RASTER_DEBUGF(3, "scale (x, y) = %f, %f", _scale[0], -1 * _scale[1]); + RASTER_DEBUGF(3, "dim (x, y) = %d, %d", _dim[0], _dim[1]); + + /* user-defined skew */ + if (NULL != skew_x) { + _skew[0] = *skew_x; + + /* + negative scale-x affects skew + for now, force skew to be in left-right, top-down orientation + */ + if ( + NULL != scale_x && + *scale_x < 0. + ) { + _skew[0] *= -1; + } + } + if (NULL != skew_y) { + _skew[1] = *skew_y; + + /* + positive scale-y affects skew + for now, force skew to be in left-right, top-down orientation + */ + if ( + NULL != scale_y && + *scale_y > 0. + ) { + _skew[1] *= -1; + } + } + + /* + if geometry is a point, a linestring or set of either and bounds not set, + increase extent by a pixel to avoid missing points on border + + a whole pixel is used instead of half-pixel due to backward + compatibility with GDAL 1.6, 1.7 and 1.8. 1.9+ works fine with half-pixel. + */ + wkbtype = wkbFlatten(OGR_G_GetGeometryType(src_geom)); + if (( + (wkbtype == wkbPoint) || + (wkbtype == wkbMultiPoint) || + (wkbtype == wkbLineString) || + (wkbtype == wkbMultiLineString) + ) && + FLT_EQ(_dim[0], 0) && + FLT_EQ(_dim[1], 0) + ) { + int result; + LWPOLY *epoly = NULL; + LWGEOM *lwgeom = NULL; + GEOSGeometry *egeom = NULL; + GEOSGeometry *geom = NULL; + + RASTER_DEBUG(3, "Testing geometry is properly contained by extent"); + + /* + see if geometry is properly contained by extent + all parts of geometry lies within extent + */ + + /* initialize GEOS */ + initGEOS(lwnotice, lwgeom_geos_error); + + /* convert envelope to geometry */ + RASTER_DEBUG(4, "Converting envelope to geometry"); + epoly = rt_util_envelope_to_lwpoly(extent); + if (epoly == NULL) { + rterror("rt_raster_gdal_rasterize: Unable to create envelope's geometry to test if geometry is properly contained by extent"); + + if (noband) { + rtdealloc(_pixtype); + rtdealloc(_init); + rtdealloc(_nodata); + rtdealloc(_hasnodata); + rtdealloc(_value); + } + + OGR_G_DestroyGeometry(src_geom); + OSRDestroySpatialReference(src_sr); + OGRCleanupAll(); + + return NULL; + } + + egeom = (GEOSGeometry *) LWGEOM2GEOS(lwpoly_as_lwgeom(epoly)); + lwpoly_free(epoly); + + /* convert WKB to geometry */ + RASTER_DEBUG(4, "Converting WKB to geometry"); + lwgeom = lwgeom_from_wkb(wkb, wkb_len, LW_PARSER_CHECK_NONE); + geom = (GEOSGeometry *) LWGEOM2GEOS(lwgeom); + lwgeom_free(lwgeom); + + result = GEOSRelatePattern(egeom, geom, "T**FF*FF*"); + GEOSGeom_destroy(geom); + GEOSGeom_destroy(egeom); + + if (result == 2) { + rterror("rt_raster_gdal_rasterize: Unable to test if geometry is properly contained by extent for geometry within extent"); + + if (noband) { + rtdealloc(_pixtype); + rtdealloc(_init); + rtdealloc(_nodata); + rtdealloc(_hasnodata); + rtdealloc(_value); + } + + OGR_G_DestroyGeometry(src_geom); + OSRDestroySpatialReference(src_sr); + OGRCleanupAll(); + + return NULL; + } + + /* geometry NOT properly contained by extent */ + if (!result) { + +#if POSTGIS_GDAL_VERSION > 18 + + /* check alignment flag: grid_xw */ + if ( + (NULL == ul_xw && NULL == ul_yw) && + (NULL != grid_xw && NULL != grid_xw) && + FLT_NEQ(*grid_xw, extent.MinX) + ) { + // do nothing + RASTER_DEBUG(3, "Skipping extent adjustment on X-axis due to upcoming alignment"); + } + else { + RASTER_DEBUG(3, "Adjusting extent for GDAL > 1.8 by half the scale on X-axis"); + extent.MinX -= (_scale[0] / 2.); + extent.MaxX += (_scale[0] / 2.); + } + + /* check alignment flag: grid_yw */ + if ( + (NULL == ul_xw && NULL == ul_yw) && + (NULL != grid_xw && NULL != grid_xw) && + FLT_NEQ(*grid_yw, extent.MaxY) + ) { + // do nothing + RASTER_DEBUG(3, "Skipping extent adjustment on Y-axis due to upcoming alignment"); + } + else { + RASTER_DEBUG(3, "Adjusting extent for GDAL > 1.8 by half the scale on Y-axis"); + extent.MinY -= (_scale[1] / 2.); + extent.MaxY += (_scale[1] / 2.); + } + +#else + + /* check alignment flag: grid_xw */ + if ( + (NULL == ul_xw && NULL == ul_yw) && + (NULL != grid_xw && NULL != grid_xw) && + FLT_NEQ(*grid_xw, extent.MinX) + ) { + // do nothing + RASTER_DEBUG(3, "Skipping extent adjustment on X-axis due to upcoming alignment"); + } + else { + RASTER_DEBUG(3, "Adjusting extent for GDAL <= 1.8 by the scale on X-axis"); + extent.MinX -= _scale[0]; + extent.MaxX += _scale[0]; + } + + + /* check alignment flag: grid_yw */ + if ( + (NULL == ul_xw && NULL == ul_yw) && + (NULL != grid_xw && NULL != grid_xw) && + FLT_NEQ(*grid_yw, extent.MaxY) + ) { + // do nothing + RASTER_DEBUG(3, "Skipping extent adjustment on Y-axis due to upcoming alignment"); + } + else { + RASTER_DEBUG(3, "Adjusting extent for GDAL <= 1.8 by the scale on Y-axis"); + extent.MinY -= _scale[1]; + extent.MaxY += _scale[1]; + } + +#endif + + } + + RASTER_DEBUGF(3, "Adjusted extent: %f, %f, %f, %f", + extent.MinX, extent.MinY, extent.MaxX, extent.MaxY); + + extent.UpperLeftX = extent.MinX; + extent.UpperLeftY = extent.MaxY; + } + + /* reprocess extent if skewed */ + if ( + FLT_NEQ(_skew[0], 0) || + FLT_NEQ(_skew[1], 0) + ) { + rt_raster skewedrast; + + RASTER_DEBUG(3, "Computing skewed extent's envelope"); + + skewedrast = rt_raster_compute_skewed_raster( + extent, + _skew, + _scale, + 0.01 + ); + if (skewedrast == NULL) { + rterror("rt_raster_gdal_rasterize: Could not compute skewed raster"); + + if (noband) { + rtdealloc(_pixtype); + rtdealloc(_init); + rtdealloc(_nodata); + rtdealloc(_hasnodata); + rtdealloc(_value); + } + + OGR_G_DestroyGeometry(src_geom); + OSRDestroySpatialReference(src_sr); + OGRCleanupAll(); + + return NULL; + } + + _dim[0] = skewedrast->width; + _dim[1] = skewedrast->height; + + extent.UpperLeftX = skewedrast->ipX; + extent.UpperLeftY = skewedrast->ipY; + + rt_raster_destroy(skewedrast); + } + + /* raster dimensions */ + if (!_dim[0]) + _dim[0] = (int) fmax((fabs(extent.MaxX - extent.MinX) + (_scale[0] / 2.)) / _scale[0], 1); + if (!_dim[1]) + _dim[1] = (int) fmax((fabs(extent.MaxY - extent.MinY) + (_scale[1] / 2.)) / _scale[1], 1); + + /* temporary raster */ + rast = rt_raster_new(_dim[0], _dim[1]); + if (rast == NULL) { + rterror("rt_raster_gdal_rasterize: Out of memory allocating temporary raster"); + + if (noband) { + rtdealloc(_pixtype); + rtdealloc(_init); + rtdealloc(_nodata); + rtdealloc(_hasnodata); + rtdealloc(_value); + } + + OGR_G_DestroyGeometry(src_geom); + OSRDestroySpatialReference(src_sr); + OGRCleanupAll(); + + return NULL; + } + + /* set raster's spatial attributes */ + rt_raster_set_offsets(rast, extent.UpperLeftX, extent.UpperLeftY); + rt_raster_set_scale(rast, _scale[0], -1 * _scale[1]); + rt_raster_set_skews(rast, _skew[0], _skew[1]); + + rt_raster_get_geotransform_matrix(rast, _gt); + RASTER_DEBUGF(3, "Temp raster's geotransform: %f, %f, %f, %f, %f, %f", + _gt[0], _gt[1], _gt[2], _gt[3], _gt[4], _gt[5]); + RASTER_DEBUGF(3, "Temp raster's dimensions (width x height): %d x %d", + _dim[0], _dim[1]); + + /* user-specified upper-left corner */ + if ( + NULL != ul_xw && + NULL != ul_yw + ) { + ul_user = 1; + + RASTER_DEBUGF(4, "Using user-specified upper-left corner: %f, %f", *ul_xw, *ul_yw); + + /* set upper-left corner */ + rt_raster_set_offsets(rast, *ul_xw, *ul_yw); + extent.UpperLeftX = *ul_xw; + extent.UpperLeftY = *ul_yw; + } + else if ( + ((NULL != ul_xw) && (NULL == ul_yw)) || + ((NULL == ul_xw) && (NULL != ul_yw)) + ) { + rterror("rt_raster_gdal_rasterize: Both X and Y upper-left corner values must be provided"); + + rt_raster_destroy(rast); + + if (noband) { + rtdealloc(_pixtype); + rtdealloc(_init); + rtdealloc(_nodata); + rtdealloc(_hasnodata); + rtdealloc(_value); + } + + OGR_G_DestroyGeometry(src_geom); + OSRDestroySpatialReference(src_sr); + OGRCleanupAll(); + + return NULL; + } + + /* alignment only considered if upper-left corner not provided */ + if ( + !ul_user && ( + (NULL != grid_xw) || (NULL != grid_yw) + ) + ) { + + if ( + ((NULL != grid_xw) && (NULL == grid_yw)) || + ((NULL == grid_xw) && (NULL != grid_yw)) + ) { + rterror("rt_raster_gdal_rasterize: Both X and Y alignment values must be provided"); + + rt_raster_destroy(rast); + + if (noband) { + rtdealloc(_pixtype); + rtdealloc(_init); + rtdealloc(_nodata); + rtdealloc(_hasnodata); + rtdealloc(_value); + } + + OGR_G_DestroyGeometry(src_geom); + OSRDestroySpatialReference(src_sr); + OGRCleanupAll(); + + return NULL; + } + + RASTER_DEBUGF(4, "Aligning extent to user-specified grid: %f, %f", *grid_xw, *grid_yw); + + do { + double _r[2] = {0}; + double _w[2] = {0}; + + /* raster is already aligned */ + if (FLT_EQ(*grid_xw, extent.UpperLeftX) && FLT_EQ(*grid_yw, extent.UpperLeftY)) { + RASTER_DEBUG(3, "Skipping raster alignment as it is already aligned to grid"); + break; + } + + extent.UpperLeftX = rast->ipX; + extent.UpperLeftY = rast->ipY; + rt_raster_set_offsets(rast, *grid_xw, *grid_yw); + + /* process upper-left corner */ + if (!rt_raster_geopoint_to_cell( + rast, + extent.UpperLeftX, extent.UpperLeftY, + &(_r[0]), &(_r[1]), + NULL + )) { + rterror("rt_raster_gdal_rasterize: Unable to compute raster pixel for spatial coordinates"); + + rt_raster_destroy(rast); + + if (noband) { + rtdealloc(_pixtype); + rtdealloc(_init); + rtdealloc(_nodata); + rtdealloc(_hasnodata); + rtdealloc(_value); + } + + OGR_G_DestroyGeometry(src_geom); + OSRDestroySpatialReference(src_sr); + OGRCleanupAll(); + + return NULL; + } + + if (!rt_raster_cell_to_geopoint( + rast, + _r[0], _r[1], + &(_w[0]), &(_w[1]), + NULL + )) { + rterror("rt_raster_gdal_rasterize: Unable to compute spatial coordinates for raster pixel"); + + rt_raster_destroy(rast); + + if (noband) { + rtdealloc(_pixtype); + rtdealloc(_init); + rtdealloc(_nodata); + rtdealloc(_hasnodata); + rtdealloc(_value); + } + + OGR_G_DestroyGeometry(src_geom); + OSRDestroySpatialReference(src_sr); + OGRCleanupAll(); + + return NULL; + } + + /* shift occurred */ + if (FLT_NEQ(_w[0], extent.UpperLeftX)) { + if (NULL == width) + rast->width++; + else if (NULL == scale_x) { + double _c[2] = {0}; + + rt_raster_set_offsets(rast, extent.UpperLeftX, extent.UpperLeftY); + + /* get upper-right corner */ + if (!rt_raster_cell_to_geopoint( + rast, + rast->width, 0, + &(_c[0]), &(_c[1]), + NULL + )) { + rterror("rt_raster_gdal_rasterize: Unable to compute spatial coordinates for raster pixel"); + + rt_raster_destroy(rast); + + if (noband) { + rtdealloc(_pixtype); + rtdealloc(_init); + rtdealloc(_nodata); + rtdealloc(_hasnodata); + rtdealloc(_value); + } + + OGR_G_DestroyGeometry(src_geom); + OSRDestroySpatialReference(src_sr); + OGRCleanupAll(); + + return NULL; + } + + rast->scaleX = fabs((_c[0] - _w[0]) / ((double) rast->width)); + } + } + if (FLT_NEQ(_w[1], extent.UpperLeftY)) { + if (NULL == height) + rast->height++; + else if (NULL == scale_y) { + double _c[2] = {0}; + + rt_raster_set_offsets(rast, extent.UpperLeftX, extent.UpperLeftY); + + /* get upper-right corner */ + if (!rt_raster_cell_to_geopoint( + rast, + 0, rast->height, + &(_c[0]), &(_c[1]), + NULL + )) { + rterror("rt_raster_gdal_rasterize: Unable to compute spatial coordinates for raster pixel"); + + rt_raster_destroy(rast); + + if (noband) { + rtdealloc(_pixtype); + rtdealloc(_init); + rtdealloc(_nodata); + rtdealloc(_hasnodata); + rtdealloc(_value); + } + + OGR_G_DestroyGeometry(src_geom); + OSRDestroySpatialReference(src_sr); + OGRCleanupAll(); + + return NULL; + } + + rast->scaleY = -1 * fabs((_c[1] - _w[1]) / ((double) rast->height)); + } + } + + rt_raster_set_offsets(rast, _w[0], _w[1]); + } + while (0); + } + + /* + after this point, rt_envelope extent is no longer used + */ + + /* get key attributes from rast */ + _dim[0] = rast->width; + _dim[1] = rast->height; + rt_raster_get_geotransform_matrix(rast, _gt); + + /* scale-x is negative or scale-y is positive */ + if (( + (NULL != scale_x) && (*scale_x < 0.) + ) || ( + (NULL != scale_y) && (*scale_y > 0) + )) { + double _w[2] = {0}; + + /* negative scale-x */ + if ( + (NULL != scale_x) && + (*scale_x < 0.) + ) { + RASTER_DEBUG(3, "Processing negative scale-x"); + + if (!rt_raster_cell_to_geopoint( + rast, + _dim[0], 0, + &(_w[0]), &(_w[1]), + NULL + )) { + rterror("rt_raster_gdal_rasterize: Unable to compute spatial coordinates for raster pixel"); + + rt_raster_destroy(rast); + + if (noband) { + rtdealloc(_pixtype); + rtdealloc(_init); + rtdealloc(_nodata); + rtdealloc(_hasnodata); + rtdealloc(_value); + } + + OGR_G_DestroyGeometry(src_geom); + OSRDestroySpatialReference(src_sr); + OGRCleanupAll(); + + return NULL; + } + + _gt[0] = _w[0]; + _gt[1] = *scale_x; + + /* check for skew */ + if (NULL != skew_x && FLT_NEQ(*skew_x, 0)) + _gt[2] = *skew_x; + } + /* positive scale-y */ + if ( + (NULL != scale_y) && + (*scale_y > 0) + ) { + RASTER_DEBUG(3, "Processing positive scale-y"); + + if (!rt_raster_cell_to_geopoint( + rast, + 0, _dim[1], + &(_w[0]), &(_w[1]), + NULL + )) { + rterror("rt_raster_gdal_rasterize: Unable to compute spatial coordinates for raster pixel"); + + rt_raster_destroy(rast); + + if (noband) { + rtdealloc(_pixtype); + rtdealloc(_init); + rtdealloc(_nodata); + rtdealloc(_hasnodata); + rtdealloc(_value); + } + + OGR_G_DestroyGeometry(src_geom); + OSRDestroySpatialReference(src_sr); + OGRCleanupAll(); + + return NULL; + } + + _gt[3] = _w[1]; + _gt[5] = *scale_y; + + /* check for skew */ + if (NULL != skew_y && FLT_NEQ(*skew_y, 0)) + _gt[4] = *skew_y; + } + } + + rt_raster_destroy(rast); + rast = NULL; + + RASTER_DEBUGF(3, "Applied geotransform: %f, %f, %f, %f, %f, %f", + _gt[0], _gt[1], _gt[2], _gt[3], _gt[4], _gt[5]); + RASTER_DEBUGF(3, "Raster dimensions (width x height): %d x %d", + _dim[0], _dim[1]); + + /* load GDAL mem */ + if (!rt_util_gdal_driver_registered("MEM")) + GDALRegister_MEM(); + _drv = GDALGetDriverByName("MEM"); + if (NULL == _drv) { + rterror("rt_raster_gdal_rasterize: Unable to load the MEM GDAL driver"); + + if (noband) { + rtdealloc(_pixtype); + rtdealloc(_init); + rtdealloc(_nodata); + rtdealloc(_hasnodata); + rtdealloc(_value); + } + + OGR_G_DestroyGeometry(src_geom); + OSRDestroySpatialReference(src_sr); + OGRCleanupAll(); + + return NULL; + } + + _ds = GDALCreate(_drv, "", _dim[0], _dim[1], 0, GDT_Byte, NULL); + if (NULL == _ds) { + rterror("rt_raster_gdal_rasterize: Could not create a GDALDataset to rasterize the geometry into"); + + if (noband) { + rtdealloc(_pixtype); + rtdealloc(_init); + rtdealloc(_nodata); + rtdealloc(_hasnodata); + rtdealloc(_value); + } + + OGR_G_DestroyGeometry(src_geom); + OSRDestroySpatialReference(src_sr); + OGRCleanupAll(); + + return NULL; + } + + /* set geotransform */ + cplerr = GDALSetGeoTransform(_ds, _gt); + if (cplerr != CE_None) { + rterror("rt_raster_gdal_rasterize: Could not set geotransform on GDALDataset"); + + if (noband) { + rtdealloc(_pixtype); + rtdealloc(_init); + rtdealloc(_nodata); + rtdealloc(_hasnodata); + rtdealloc(_value); + } + + OGR_G_DestroyGeometry(src_geom); + OSRDestroySpatialReference(src_sr); + OGRCleanupAll(); + + GDALClose(_ds); + + return NULL; + } + + /* set SRS */ + if (NULL != src_sr) { + cplerr = GDALSetProjection(_ds, srs); + if (cplerr != CE_None) { + rterror("rt_raster_gdal_rasterize: Could not set projection on GDALDataset"); + + if (noband) { + rtdealloc(_pixtype); + rtdealloc(_init); + rtdealloc(_nodata); + rtdealloc(_hasnodata); + rtdealloc(_value); + } + + OGR_G_DestroyGeometry(src_geom); + OSRDestroySpatialReference(src_sr); + OGRCleanupAll(); + + GDALClose(_ds); + + return NULL; + } + } + + /* set bands */ + for (i = 0; i < num_bands; i++) { + banderr = 0; + + do { + /* add band */ + cplerr = GDALAddBand(_ds, rt_util_pixtype_to_gdal_datatype(_pixtype[i]), NULL); + if (cplerr != CE_None) { + rterror("rt_raster_gdal_rasterize: Unable to add band to GDALDataset"); + banderr = 1; + break; + } + + _band = GDALGetRasterBand(_ds, i + 1); + if (NULL == _band) { + rterror("rt_raster_gdal_rasterize: Unable to get band %d from GDALDataset", i + 1); + banderr = 1; + break; + } + + /* nodata value */ + if (_hasnodata[i]) { + RASTER_DEBUGF(4, "Setting NODATA value of band %d to %f", i, _nodata[i]); + cplerr = GDALSetRasterNoDataValue(_band, _nodata[i]); + if (cplerr != CE_None) { + rterror("rt_raster_gdal_rasterize: Unable to set nodata value"); + banderr = 1; + break; + } + RASTER_DEBUGF(4, "NODATA value set to %f", GDALGetRasterNoDataValue(_band, NULL)); + } + + /* initial value */ + cplerr = GDALFillRaster(_band, _init[i], 0); + if (cplerr != CE_None) { + rterror("rt_raster_gdal_rasterize: Unable to set initial value"); + banderr = 1; + break; + } + } + while (0); + + if (banderr) { + if (noband) { + rtdealloc(_pixtype); + rtdealloc(_init); + rtdealloc(_nodata); + rtdealloc(_hasnodata); + rtdealloc(_value); + } + + OGR_G_DestroyGeometry(src_geom); + OSRDestroySpatialReference(src_sr); + OGRCleanupAll(); + + GDALClose(_ds); + + return NULL; + } + } + + band_list = (int *) rtalloc(sizeof(int) * num_bands); + for (i = 0; i < num_bands; i++) band_list[i] = i + 1; + + /* burn geometry */ + cplerr = GDALRasterizeGeometries( + _ds, + num_bands, band_list, + 1, &src_geom, + NULL, NULL, + _value, + options, + NULL, NULL + ); + rtdealloc(band_list); + if (cplerr != CE_None) { + rterror("rt_raster_gdal_rasterize: Unable to rasterize geometry"); + + if (noband) { + rtdealloc(_pixtype); + rtdealloc(_init); + rtdealloc(_nodata); + rtdealloc(_hasnodata); + rtdealloc(_value); + } + + OGR_G_DestroyGeometry(src_geom); + OSRDestroySpatialReference(src_sr); + OGRCleanupAll(); + + GDALClose(_ds); + + return NULL; + } + + /* convert gdal dataset to raster */ + GDALFlushCache(_ds); + RASTER_DEBUG(3, "Converting GDAL dataset to raster"); + rast = rt_raster_from_gdal_dataset(_ds); + + if (noband) { + rtdealloc(_pixtype); + rtdealloc(_init); + rtdealloc(_nodata); + rtdealloc(_hasnodata); + rtdealloc(_value); + } + + OGR_G_DestroyGeometry(src_geom); + OSRDestroySpatialReference(src_sr); + OGRCleanupAll(); + + GDALClose(_ds); + + if (NULL == rast) { + rterror("rt_raster_gdal_rasterize: Unable to rasterize geometry"); + return NULL; + } + + RASTER_DEBUG(3, "done"); + + return rast; +} + +static +int rt_raster_intersects_algorithm( + rt_raster rast1, rt_raster rast2, + rt_band band1, rt_band band2, + int hasnodata1, int hasnodata2, + double nodata1, double nodata2 +) { + int i; + int byHeight = 1; + uint32_t dimValue; + + uint32_t row; + uint32_t rowoffset; + uint32_t col; + uint32_t coloffset; + + enum line_points {X1, Y1, X2, Y2}; + enum point {pX, pY}; + double line1[4] = {0.}; + double line2[4] = {0.}; + double P[2] = {0.}; + double Qw[2] = {0.}; + double Qr[2] = {0.}; + double gt1[6] = {0.}; + double gt2[6] = {0.}; + double igt1[6] = {0}; + double igt2[6] = {0}; + double d; + double val1; + int noval1; + double val2; + int noval2; + uint32_t adjacent[8] = {0}; + + double xscale; + double yscale; + + uint16_t width1; + uint16_t height1; + uint16_t width2; + uint16_t height2; + + width1 = rt_raster_get_width(rast1); + height1 = rt_raster_get_height(rast1); + width2 = rt_raster_get_width(rast2); + height2 = rt_raster_get_height(rast2); + + /* sampling scale */ + xscale = fmin(rt_raster_get_x_scale(rast1), rt_raster_get_x_scale(rast2)) / 10.; + yscale = fmin(rt_raster_get_y_scale(rast1), rt_raster_get_y_scale(rast2)) / 10.; + + /* see if skew made rast2's rows are parallel to rast1's cols */ + rt_raster_cell_to_geopoint( + rast1, + 0, 0, + &(line1[X1]), &(line1[Y1]), + gt1 + ); + + rt_raster_cell_to_geopoint( + rast1, + 0, height1, + &(line1[X2]), &(line1[Y2]), + gt1 + ); + + rt_raster_cell_to_geopoint( + rast2, + 0, 0, + &(line2[X1]), &(line2[Y1]), + gt2 + ); + + rt_raster_cell_to_geopoint( + rast2, + width2, 0, + &(line2[X2]), &(line2[Y2]), + gt2 + ); + + /* parallel vertically */ + if (FLT_EQ(line1[X2] - line1[X1], 0.) && FLT_EQ(line2[X2] - line2[X1], 0.)) + byHeight = 0; + /* parallel */ + else if (FLT_EQ(((line1[Y2] - line1[Y1]) / (line1[X2] - line1[X1])), ((line2[Y2] - line2[Y1]) / (line2[X2] - line2[X1])))) + byHeight = 0; + + if (byHeight) + dimValue = height2; + else + dimValue = width2; + RASTER_DEBUGF(4, "byHeight: %d, dimValue: %d", byHeight, dimValue); + + /* 3 x 3 search */ + for (coloffset = 0; coloffset < 3; coloffset++) { + for (rowoffset = 0; rowoffset < 3; rowoffset++) { + /* smaller raster */ + for (col = coloffset; col <= width1; col += 3) { + + rt_raster_cell_to_geopoint( + rast1, + col, 0, + &(line1[X1]), &(line1[Y1]), + gt1 + ); + + rt_raster_cell_to_geopoint( + rast1, + col, height1, + &(line1[X2]), &(line1[Y2]), + gt1 + ); + + /* larger raster */ + for (row = rowoffset; row <= dimValue; row += 3) { + + if (byHeight) { + rt_raster_cell_to_geopoint( + rast2, + 0, row, + &(line2[X1]), &(line2[Y1]), + gt2 + ); + + rt_raster_cell_to_geopoint( + rast2, + width2, row, + &(line2[X2]), &(line2[Y2]), + gt2 + ); + } + else { + rt_raster_cell_to_geopoint( + rast2, + row, 0, + &(line2[X1]), &(line2[Y1]), + gt2 + ); + + rt_raster_cell_to_geopoint( + rast2, + row, height2, + &(line2[X2]), &(line2[Y2]), + gt2 + ); + } + + RASTER_DEBUGF(4, "(col, row) = (%d, %d)", col, row); + RASTER_DEBUGF(4, "line1(x1, y1, x2, y2) = (%f, %f, %f, %f)", + line1[X1], line1[Y1], line1[X2], line1[Y2]); + RASTER_DEBUGF(4, "line2(x1, y1, x2, y2) = (%f, %f, %f, %f)", + line2[X1], line2[Y1], line2[X2], line2[Y2]); + + /* intersection */ + /* http://en.wikipedia.org/wiki/Line-line_intersection */ + d = ((line1[X1] - line1[X2]) * (line2[Y1] - line2[Y2])) - ((line1[Y1] - line1[Y2]) * (line2[X1] - line2[X2])); + /* no intersection */ + if (FLT_EQ(d, 0.)) { + continue; + } + + P[pX] = (((line1[X1] * line1[Y2]) - (line1[Y1] * line1[X2])) * (line2[X1] - line2[X2])) - + ((line1[X1] - line1[X2]) * ((line2[X1] * line2[Y2]) - (line2[Y1] * line2[X2]))); + P[pX] = P[pX] / d; + + P[pY] = (((line1[X1] * line1[Y2]) - (line1[Y1] * line1[X2])) * (line2[Y1] - line2[Y2])) - + ((line1[Y1] - line1[Y2]) * ((line2[X1] * line2[Y2]) - (line2[Y1] * line2[X2]))); + P[pY] = P[pY] / d; + + RASTER_DEBUGF(4, "P(x, y) = (%f, %f)", P[pX], P[pY]); + + /* intersection within bounds */ + if (( + (FLT_EQ(P[pX], line1[X1]) || FLT_EQ(P[pX], line1[X2])) || + (P[pX] > fmin(line1[X1], line1[X2]) && (P[pX] < fmax(line1[X1], line1[X2]))) + ) && ( + (FLT_EQ(P[pY], line1[Y1]) || FLT_EQ(P[pY], line1[Y2])) || + (P[pY] > fmin(line1[Y1], line1[Y2]) && (P[pY] < fmax(line1[Y1], line1[Y2]))) + ) && ( + (FLT_EQ(P[pX], line2[X1]) || FLT_EQ(P[pX], line2[X2])) || + (P[pX] > fmin(line2[X1], line2[X2]) && (P[pX] < fmax(line2[X1], line2[X2]))) + ) && ( + (FLT_EQ(P[pY], line2[Y1]) || FLT_EQ(P[pY], line2[Y2])) || + (P[pY] > fmin(line2[Y1], line2[Y2]) && (P[pY] < fmax(line2[Y1], line2[Y2]))) + )) { + RASTER_DEBUG(4, "within bounds"); + + for (i = 0; i < 8; i++) adjacent[i] = 0; + + /* test points around intersection */ + for (i = 0; i < 8; i++) { + switch (i) { + case 7: + Qw[pX] = P[pX] - xscale; + Qw[pY] = P[pY] + yscale; + break; + /* 270 degrees = 09:00 */ + case 6: + Qw[pX] = P[pX] - xscale; + Qw[pY] = P[pY]; + break; + case 5: + Qw[pX] = P[pX] - xscale; + Qw[pY] = P[pY] - yscale; + break; + /* 180 degrees = 06:00 */ + case 4: + Qw[pX] = P[pX]; + Qw[pY] = P[pY] - yscale; + break; + case 3: + Qw[pX] = P[pX] + xscale; + Qw[pY] = P[pY] - yscale; + break; + /* 90 degrees = 03:00 */ + case 2: + Qw[pX] = P[pX] + xscale; + Qw[pY] = P[pY]; + break; + /* 45 degrees */ + case 1: + Qw[pX] = P[pX] + xscale; + Qw[pY] = P[pY] + yscale; + break; + /* 0 degrees = 00:00 */ + case 0: + Qw[pX] = P[pX]; + Qw[pY] = P[pY] + yscale; + break; + } + + /* unable to convert point to cell */ + noval1 = 0; + if (!rt_raster_geopoint_to_cell( + rast1, + Qw[pX], Qw[pY], + &(Qr[pX]), &(Qr[pY]), + igt1 + )) { + noval1 = 1; + } + /* cell is outside bounds of grid */ + else if ( + (Qr[pX] < 0 || Qr[pX] > width1 || FLT_EQ(Qr[pX], width1)) || + (Qr[pY] < 0 || Qr[pY] > height1 || FLT_EQ(Qr[pY], height1)) + ) { + noval1 = 1; + } + else if (hasnodata1 == FALSE) + val1 = 1; + /* unable to get value at cell */ + else if (rt_band_get_pixel(band1, Qr[pX], Qr[pY], &val1) < 0) + noval1 = 1; + + /* unable to convert point to cell */ + noval2 = 0; + if (!rt_raster_geopoint_to_cell( + rast2, + Qw[pX], Qw[pY], + &(Qr[pX]), &(Qr[pY]), + igt2 + )) { + noval2 = 1; + } + /* cell is outside bounds of grid */ + else if ( + (Qr[pX] < 0 || Qr[pX] > width2 || FLT_EQ(Qr[pX], width2)) || + (Qr[pY] < 0 || Qr[pY] > height2 || FLT_EQ(Qr[pY], height2)) + ) { + noval2 = 1; + } + else if (hasnodata2 == FALSE) + val2 = 1; + /* unable to get value at cell */ + else if (rt_band_get_pixel(band2, Qr[pX], Qr[pY], &val2) < 0) + noval2 = 1; + + if (!noval1) { + RASTER_DEBUGF(4, "val1 = %f", val1); + } + if (!noval2) { + RASTER_DEBUGF(4, "val2 = %f", val2); + } + + /* pixels touch */ + if (!noval1 && ( + (hasnodata1 == FALSE) || ( + (hasnodata1 != FALSE) && + FLT_NEQ(val1, nodata1) + ) + )) { + adjacent[i]++; + } + if (!noval2 && ( + (hasnodata2 == FALSE) || ( + (hasnodata2 != FALSE) && + FLT_NEQ(val2, nodata2) + ) + )) { + adjacent[i] += 3; + } + + /* two pixel values not present */ + if (noval1 || noval2) { + RASTER_DEBUGF(4, "noval1 = %d, noval2 = %d", noval1, noval2); + continue; + } + + /* pixels valid, so intersect */ + if (( + (hasnodata1 == FALSE) || ( + (hasnodata1 != FALSE) && + FLT_NEQ(val1, nodata1) + ) + ) && ( + (hasnodata2 == FALSE) || ( + (hasnodata2 != FALSE) && + FLT_NEQ(val2, nodata2) + ) + )) { + RASTER_DEBUG(3, "The two rasters do intersect"); + + return 1; + } + } + + /* pixels touch */ + for (i = 0; i < 4; i++) { + RASTER_DEBUGF(4, "adjacent[%d] = %d, adjacent[%d] = %d" + , i, adjacent[i], i + 4, adjacent[i + 4]); + if (adjacent[i] == 0) continue; + + if (adjacent[i] + adjacent[i + 4] == 4) { + RASTER_DEBUG(3, "The two rasters touch"); + + return 1; + } + } + } + else { + RASTER_DEBUG(4, "outside of bounds"); + } + } + } + } + } + + return 0; +} + +/** + * Return zero if error occurred in function. + * Parameter intersects returns non-zero if two rasters intersect + * + * @param rast1 : the first raster whose band will be tested + * @param nband1 : the 0-based band of raster rast1 to use + * if value is less than zero, bands are ignored. + * if nband1 gte zero, nband2 must be gte zero + * @param rast2 : the second raster whose band will be tested + * @param nband2 : the 0-based band of raster rast2 to use + * if value is less than zero, bands are ignored + * if nband2 gte zero, nband1 must be gte zero + * @param intersects : non-zero value if the two rasters' bands intersects + * + * @return if zero, an error occurred in function + */ +int +rt_raster_intersects( + rt_raster rast1, int nband1, + rt_raster rast2, int nband2, + int *intersects +) { + int i; + int j; + int within = 0; + + LWPOLY *hull[2] = {NULL}; + GEOSGeometry *ghull[2] = {NULL}; + + uint16_t width1; + uint16_t height1; + uint16_t width2; + uint16_t height2; + double area1; + double area2; + double pixarea1; + double pixarea2; + rt_raster rastS = NULL; + rt_raster rastL = NULL; + uint16_t *widthS = NULL; + uint16_t *heightS = NULL; + uint16_t *widthL = NULL; + uint16_t *heightL = NULL; + int nbandS; + int nbandL; + rt_band bandS = NULL; + rt_band bandL = NULL; + int hasnodataS = FALSE; + int hasnodataL = FALSE; + double nodataS = 0; + double nodataL = 0; + double gtS[6] = {0}; + double igtL[6] = {0}; + + uint32_t row; + uint32_t rowoffset; + uint32_t col; + uint32_t coloffset; + + enum line_points {X1, Y1, X2, Y2}; + enum point {pX, pY}; + double lineS[4]; + double Qr[2]; + double valS; + double valL; + + RASTER_DEBUG(3, "Starting"); + + assert(NULL != rast1); + assert(NULL != rast2); + + if (nband1 < 0 && nband2 < 0) { + nband1 = -1; + nband2 = -1; + } + else { + assert(nband1 >= 0 && nband1 < rt_raster_get_num_bands(rast1)); + assert(nband2 >= 0 && nband2 < rt_raster_get_num_bands(rast2)); + } + + /* same srid */ + if (rt_raster_get_srid(rast1) != rt_raster_get_srid(rast2)) { + rterror("rt_raster_intersects: The two rasters provided have different SRIDs"); + *intersects = 0; + return 0; + } + + /* raster extents need to intersect */ + do { + int rtn; + + initGEOS(lwnotice, lwgeom_geos_error); + + rtn = 1; + for (i = 0; i < 2; i++) { + hull[i] = rt_raster_get_convex_hull(i < 1 ? rast1 : rast2); + if (NULL == hull[i]) { + for (j = 0; j < i; j++) { + GEOSGeom_destroy(ghull[j]); + lwpoly_free(hull[j]); + } + rtn = 0; + break; + } + ghull[i] = (GEOSGeometry *) LWGEOM2GEOS(lwpoly_as_lwgeom(hull[i])); + if (NULL == ghull[i]) { + for (j = 0; j < i; j++) { + GEOSGeom_destroy(ghull[j]); + lwpoly_free(hull[j]); + } + lwpoly_free(hull[i]); + rtn = 0; + break; + } + } + if (!rtn) break; + + /* test to see if raster within the other */ + within = 0; + if (GEOSWithin(ghull[0], ghull[1]) == 1) + within = -1; + else if (GEOSWithin(ghull[1], ghull[0]) == 1) + within = 1; + + if (within != 0) + rtn = 1; + else + rtn = GEOSIntersects(ghull[0], ghull[1]); + + for (i = 0; i < 2; i++) { + GEOSGeom_destroy(ghull[i]); + lwpoly_free(hull[i]); + } + + if (rtn != 2) { + RASTER_DEBUGF(4, "convex hulls of rasters do %sintersect", rtn != 1 ? "NOT " : ""); + if (rtn != 1) { + *intersects = 0; + return 1; + } + /* band isn't specified */ + else if (nband1 < 0) { + *intersects = 1; + return 1; + } + } + } + while (0); + + /* smaller raster by area or width */ + width1 = rt_raster_get_width(rast1); + height1 = rt_raster_get_height(rast1); + width2 = rt_raster_get_width(rast2); + height2 = rt_raster_get_height(rast2); + pixarea1 = fabs(rt_raster_get_x_scale(rast1) * rt_raster_get_y_scale(rast1)); + pixarea2 = fabs(rt_raster_get_x_scale(rast2) * rt_raster_get_y_scale(rast2)); + area1 = fabs(width1 * height1 * pixarea1); + area2 = fabs(width2 * height2 * pixarea2); + RASTER_DEBUGF(4, "pixarea1, pixarea2, area1, area2 = %f, %f, %f, %f", + pixarea1, pixarea2, area1, area2); + if ( + (within <= 0) || + (area1 < area2) || + FLT_EQ(area1, area2) || + (area1 < pixarea2) || /* area of rast1 smaller than pixel area of rast2 */ + FLT_EQ(area1, pixarea2) + ) { + rastS = rast1; + nbandS = nband1; + widthS = &width1; + heightS = &height1; + + rastL = rast2; + nbandL = nband2; + widthL = &width2; + heightL = &height2; + } + else { + rastS = rast2; + nbandS = nband2; + widthS = &width2; + heightS = &height2; + + rastL = rast1; + nbandL = nband1; + widthL = &width1; + heightL = &height1; + } + + /* no band to use, set band to zero */ + if (nband1 < 0) { + nbandS = 0; + nbandL = 0; + } + + RASTER_DEBUGF(4, "rast1 @ %p", rast1); + RASTER_DEBUGF(4, "rast2 @ %p", rast2); + RASTER_DEBUGF(4, "rastS @ %p", rastS); + RASTER_DEBUGF(4, "rastL @ %p", rastL); + + /* load band of smaller raster */ + bandS = rt_raster_get_band(rastS, nbandS); + if (NULL == bandS) { + rterror("rt_raster_intersects: Unable to get band %d of the first raster", nbandS); + *intersects = 0; + return 0; + } + if (bandS->offline) { + rterror("rt_raster_intersects not implemented yet for OFFDB bands"); + *intersects = 0; + return 0; + } + + hasnodataS = rt_band_get_hasnodata_flag(bandS); + if (hasnodataS != FALSE) + nodataS = rt_band_get_nodata(bandS); + + /* load band of larger raster */ + bandL = rt_raster_get_band(rastL, nbandL); + if (NULL == bandL) { + rterror("rt_raster_intersects: Unable to get band %d of the first raster", nbandL); + *intersects = 0; + return 0; + } + if (bandL->offline) { + rterror("rt_raster_intersects not implemented yet for OFFDB bands"); + *intersects = 0; + return 0; + } + + hasnodataL = rt_band_get_hasnodata_flag(bandL); + if (hasnodataL != FALSE) + nodataL = rt_band_get_nodata(bandL); + + /* no band to use, ignore nodata */ + if (nband1 < 0) { + hasnodataS = FALSE; + hasnodataL = FALSE; + } + + /* special case where a raster can fit inside another raster's pixel */ + if (within != 0 && ((pixarea1 > area2) || (pixarea2 > area1))) { + RASTER_DEBUG(4, "Using special case of raster fitting into another raster's pixel"); + /* 3 x 3 search */ + for (coloffset = 0; coloffset < 3; coloffset++) { + for (rowoffset = 0; rowoffset < 3; rowoffset++) { + for (col = coloffset; col < *widthS; col += 3) { + for (row = rowoffset; row < *heightS; row += 3) { + if (hasnodataS == FALSE) + valS = 1; + else if (rt_band_get_pixel(bandS, col, row, &valS) < 0) + continue; + + if ((hasnodataS == FALSE) || ( + (hasnodataS != FALSE) && + FLT_NEQ(valS, nodataS) + )) { + rt_raster_cell_to_geopoint( + rastS, + col, row, + &(lineS[X1]), &(lineS[Y1]), + gtS + ); + + if (!rt_raster_geopoint_to_cell( + rastL, + lineS[X1], lineS[Y1], + &(Qr[pX]), &(Qr[pY]), + igtL + )) { + continue; + } + + if ( + (Qr[pX] < 0 || Qr[pX] > *widthL || FLT_EQ(Qr[pX], *widthL)) || + (Qr[pY] < 0 || Qr[pY] > *heightL || FLT_EQ(Qr[pY], *heightL)) + ) { + continue; + } + + if (hasnodataS == FALSE) + valL = 1; + else if (rt_band_get_pixel(bandL, Qr[pX], Qr[pY], &valL) < 0) + continue; + + if ((hasnodataL == FALSE) || ( + (hasnodataL != FALSE) && + FLT_NEQ(valL, nodataL) + )) { + RASTER_DEBUG(3, "The two rasters do intersect"); + *intersects = 1; + return 1; + } + } + } + } + } + } + } + + *intersects = rt_raster_intersects_algorithm( + rastS, rastL, + bandS, bandL, + hasnodataS, hasnodataL, + nodataS, nodataL + ); + + if (*intersects) return 1; + + *intersects = rt_raster_intersects_algorithm( + rastL, rastS, + bandL, bandS, + hasnodataL, hasnodataS, + nodataL, nodataS + ); + + if (*intersects) return 1; + + RASTER_DEBUG(3, "The two rasters do not intersect"); + + *intersects = 0; + return 1; +} + +/* + * Return zero if error occurred in function. + * Paramter aligned returns non-zero if two rasters are aligned + * + * @param rast1 : the first raster for alignment test + * @param rast2 : the second raster for alignment test + * @param aligned : non-zero value if the two rasters are aligned + * + * @return if zero, an error occurred in function + */ +int +rt_raster_same_alignment( + rt_raster rast1, + rt_raster rast2, + int *aligned +) { + double xr; + double yr; + double xw; + double yw; + int err = 0; + + assert(NULL != rast1); + assert(NULL != rast2); + + err = 0; + /* same srid */ + if (rt_raster_get_srid(rast1) != rt_raster_get_srid(rast2)) { + RASTER_DEBUG(3, "The two rasters provided have different SRIDs"); + err = 1; + } + /* scales must match */ + else if (FLT_NEQ(fabs(rast1->scaleX), fabs(rast2->scaleX))) { + RASTER_DEBUG(3, "The two raster provided have different scales on the X axis"); + err = 1; + } + else if (FLT_NEQ(fabs(rast1->scaleY), fabs(rast2->scaleY))) { + RASTER_DEBUG(3, "The two raster provided have different scales on the Y axis"); + err = 1; + } + /* skews must match */ + else if (FLT_NEQ(rast1->skewX, rast2->skewX)) { + RASTER_DEBUG(3, "The two raster provided have different skews on the X axis"); + err = 1; + } + else if (FLT_NEQ(rast1->skewY, rast2->skewY)) { + RASTER_DEBUG(3, "The two raster provided have different skews on the Y axis"); + err = 1; + } + + if (err) { + *aligned = 0; + return 1; + } + + /* raster coordinates in context of second raster of first raster's upper-left corner */ + if (rt_raster_geopoint_to_cell( + rast2, + rast1->ipX, rast1->ipY, + &xr, &yr, + NULL + ) == 0) { + rterror("rt_raster_same_alignment: Unable to get raster coordinates of second raster from first raster's spatial coordinates"); + *aligned = 0; + return 0; + } + + /* spatial coordinates of raster coordinates from above */ + if (rt_raster_cell_to_geopoint( + rast2, + xr, yr, + &xw, &yw, + NULL + ) == 0) { + rterror("rt_raster_same_alignment: Unable to get spatial coordinates of second raster from raster coordinates"); + *aligned = 0; + return 0; + } + + RASTER_DEBUGF(4, "rast1(ipX, ipxY) = (%f, %f)", rast1->ipX, rast1->ipY); + RASTER_DEBUGF(4, "rast2(xr, yr) = (%f, %f)", xr, yr); + RASTER_DEBUGF(4, "rast2(xw, yw) = (%f, %f)", xw, yw); + + /* spatial coordinates are identical to that of first raster's upper-left corner */ + if (FLT_EQ(xw, rast1->ipX) && FLT_EQ(yw, rast1->ipY)) { + RASTER_DEBUG(3, "The two rasters are aligned"); + *aligned = 1; + return 1; + } + + /* no alignment */ + RASTER_DEBUG(3, "The two rasters are NOT aligned"); + *aligned = 0; + return 1; +} + +/* + * Return raster of computed extent specified extenttype applied + * on two input rasters. The raster returned should be freed by + * the caller + * + * @param rast1 : the first raster + * @param rast2 : the second raster + * @param extenttype : type of extent for the output raster + * @param err : if 0, error occurred + * @param offset : 4-element array indicating the X,Y offsets + * for each raster. 0,1 for rast1 X,Y. 2,3 for rast2 X,Y. + * + * @return raster object if success, NULL otherwise + */ +rt_raster +rt_raster_from_two_rasters( + rt_raster rast1, rt_raster rast2, + rt_extenttype extenttype, + int *err, double *offset +) { + int i; + + rt_raster _rast[2] = {rast1, rast2}; + double _offset[2][4] = {{0.}}; + uint16_t _dim[2][2] = {{0}}; + + rt_raster raster = NULL; + int aligned = 0; + int dim[2] = {0}; + double gt[6] = {0.}; + + assert(NULL != rast1); + assert(NULL != rast2); + + /* rasters must have same srid */ + if (rt_raster_get_srid(rast1) != rt_raster_get_srid(rast2)) { + rterror("rt_raster_from_two_rasters: The two rasters provided do not have the same SRID"); + *err = 0; + return NULL; + } + + /* rasters must be aligned */ + if (!rt_raster_same_alignment(rast1, rast2, &aligned)) { + rterror("rt_raster_from_two_rasters: Unable to test for alignment on the two rasters"); + *err = 0; + return NULL; + } + if (!aligned) { + rterror("rt_raster_from_two_rasters: The two rasters provided do not have the same alignment"); + *err = 0; + return NULL; + } + + /* dimensions */ + _dim[0][0] = rast1->width; + _dim[0][1] = rast1->height; + _dim[1][0] = rast2->width; + _dim[1][1] = rast2->height; + + /* get raster offsets */ + if (!rt_raster_geopoint_to_cell( + _rast[1], + _rast[0]->ipX, _rast[0]->ipY, + &(_offset[1][0]), &(_offset[1][1]), + NULL + )) { + rterror("rt_raster_from_two_rasters: Unable to compute offsets of the second raster relative to the first raster"); + *err = 0; + return NULL; + } + _offset[1][0] = -1 * _offset[1][0]; + _offset[1][1] = -1 * _offset[1][1]; + _offset[1][2] = _offset[1][0] + _dim[1][0] - 1; + _offset[1][3] = _offset[1][1] + _dim[1][1] - 1; + + i = -1; + switch (extenttype) { + case ET_FIRST: + i = 0; + _offset[0][0] = 0.; + _offset[0][1] = 0.; + case ET_SECOND: + if (i < 0) { + i = 1; + _offset[0][0] = -1 * _offset[1][0]; + _offset[0][1] = -1 * _offset[1][1]; + _offset[1][0] = 0.; + _offset[1][1] = 0.; + } + + dim[0] = _dim[i][0]; + dim[1] = _dim[i][1]; + raster = rt_raster_new( + dim[0], + dim[1] + ); + if (raster == NULL) { + rterror("rt_raster_from_two_rasters: Unable to create output raster"); + *err = 0; + return NULL; + } + rt_raster_set_srid(raster, _rast[i]->srid); + rt_raster_get_geotransform_matrix(_rast[i], gt); + rt_raster_set_geotransform_matrix(raster, gt); + break; + case ET_UNION: { + double off[4] = {0}; + + rt_raster_get_geotransform_matrix(_rast[0], gt); + RASTER_DEBUGF(4, "gt = (%f, %f, %f, %f, %f, %f)", + gt[0], + gt[1], + gt[2], + gt[3], + gt[4], + gt[5] + ); + + /* new raster upper left offset */ + off[0] = 0; + if (_offset[1][0] < 0) + off[0] = _offset[1][0]; + off[1] = 0; + if (_offset[1][1] < 0) + off[1] = _offset[1][1]; + + /* new raster lower right offset */ + off[2] = _dim[0][0] - 1; + if ((int) _offset[1][2] >= _dim[0][0]) + off[2] = _offset[1][2]; + off[3] = _dim[0][1] - 1; + if ((int) _offset[1][3] >= _dim[0][1]) + off[3] = _offset[1][3]; + + /* upper left corner */ + if (!rt_raster_cell_to_geopoint( + _rast[0], + off[0], off[1], + &(gt[0]), &(gt[3]), + NULL + )) { + rterror("rt_raster_from_two_rasters: Unable to get spatial coordinates of upper-left pixel of output raster"); + *err = 0; + return NULL; + } + + dim[0] = off[2] - off[0] + 1; + dim[1] = off[3] - off[1] + 1; + RASTER_DEBUGF(4, "off = (%f, %f, %f, %f)", + off[0], + off[1], + off[2], + off[3] + ); + RASTER_DEBUGF(4, "dim = (%d, %d)", dim[0], dim[1]); + + raster = rt_raster_new( + dim[0], + dim[1] + ); + if (raster == NULL) { + rterror("rt_raster_from_two_rasters: Unable to create output raster"); + *err = 0; + return NULL; + } + rt_raster_set_srid(raster, _rast[0]->srid); + rt_raster_set_geotransform_matrix(raster, gt); + RASTER_DEBUGF(4, "gt = (%f, %f, %f, %f, %f, %f)", + gt[0], + gt[1], + gt[2], + gt[3], + gt[4], + gt[5] + ); + + /* get offsets */ + if (!rt_raster_geopoint_to_cell( + _rast[0], + gt[0], gt[3], + &(_offset[0][0]), &(_offset[0][1]), + NULL + )) { + rterror("rt_raster_from_two_rasters: Unable to get offsets of the FIRST raster relative to the output raster"); + rt_raster_destroy(raster); + *err = 0; + return NULL; + } + _offset[0][0] *= -1; + _offset[0][1] *= -1; + + if (!rt_raster_geopoint_to_cell( + _rast[1], + gt[0], gt[3], + &(_offset[1][0]), &(_offset[1][1]), + NULL + )) { + rterror("rt_raster_from_two_rasters: Unable to get offsets of the SECOND raster relative to the output raster"); + rt_raster_destroy(raster); + *err = 0; + return NULL; + } + _offset[1][0] *= -1; + _offset[1][1] *= -1; + break; + } + case ET_INTERSECTION: { + double off[4] = {0}; + + /* no intersection */ + if ( + (_offset[1][2] < 0 || _offset[1][0] > (_dim[0][0] - 1)) || + (_offset[1][3] < 0 || _offset[1][1] > (_dim[0][1] - 1)) + ) { + RASTER_DEBUG(3, "The two rasters provided have no intersection. Returning no band raster"); + + raster = rt_raster_new(0, 0); + if (raster == NULL) { + rterror("rt_raster_from_two_rasters: Unable to create output raster"); + *err = 0; + return NULL; + } + rt_raster_set_srid(raster, _rast[0]->srid); + rt_raster_set_scale(raster, 0, 0); + + /* set offsets if provided */ + if (NULL != offset) { + for (i = 0; i < 4; i++) + offset[i] = _offset[i / 2][i % 2]; + } + + *err = 1; + return raster; + } + + if (_offset[1][0] > 0) + off[0] = _offset[1][0]; + if (_offset[1][1] > 0) + off[1] = _offset[1][1]; + + off[2] = _dim[0][0] - 1; + if (_offset[1][2] < _dim[0][0]) + off[2] = _offset[1][2]; + off[3] = _dim[0][1] - 1; + if (_offset[1][3] < _dim[0][1]) + off[3] = _offset[1][3]; + + dim[0] = off[2] - off[0] + 1; + dim[1] = off[3] - off[1] + 1; + raster = rt_raster_new( + dim[0], + dim[1] + ); + if (raster == NULL) { + rterror("rt_raster_from_two_rasters: Unable to create output raster"); + *err = 0; + return NULL; + } + rt_raster_set_srid(raster, _rast[0]->srid); + + /* get upper-left corner */ + rt_raster_get_geotransform_matrix(_rast[0], gt); + if (!rt_raster_cell_to_geopoint( + _rast[0], + off[0], off[1], + &(gt[0]), &(gt[3]), + gt + )) { + rterror("rt_raster_from_two_rasters: Unable to get spatial coordinates of upper-left pixel of output raster"); + rt_raster_destroy(raster); + *err = 0; + return NULL; + } + + rt_raster_set_geotransform_matrix(raster, gt); + + /* get offsets */ + if (!rt_raster_geopoint_to_cell( + _rast[0], + gt[0], gt[3], + &(_offset[0][0]), &(_offset[0][1]), + NULL + )) { + rterror("rt_raster_from_two_rasters: Unable to get pixel coordinates to compute the offsets of the FIRST raster relative to the output raster"); + rt_raster_destroy(raster); + *err = 0; + return NULL; + } + _offset[0][0] *= -1; + _offset[0][1] *= -1; + + if (!rt_raster_geopoint_to_cell( + _rast[1], + gt[0], gt[3], + &(_offset[1][0]), &(_offset[1][1]), + NULL + )) { + rterror("rt_raster_from_two_rasters: Unable to get pixel coordinates to compute the offsets of the SECOND raster relative to the output raster"); + rt_raster_destroy(raster); + *err = 0; + return NULL; + } + _offset[1][0] *= -1; + _offset[1][1] *= -1; + break; + } + } + + /* set offsets if provided */ + if (NULL != offset) { + for (i = 0; i < 4; i++) + offset[i] = _offset[i / 2][i % 2]; + } + + *err = 1; + return raster; +} + + +LWPOLY* +rt_raster_pixel_as_polygon(rt_raster rast, int x, int y) +{ + double scale_x, scale_y; + double skew_x, skew_y; + double ul_x, ul_y; + int srid; + POINTARRAY **points; + POINT4D p, p0; + LWPOLY *poly; + + scale_x = rt_raster_get_x_scale(rast); + scale_y = rt_raster_get_y_scale(rast); + skew_x = rt_raster_get_x_skew(rast); + skew_y = rt_raster_get_y_skew(rast); + ul_x = rt_raster_get_x_offset(rast); + ul_y = rt_raster_get_y_offset(rast); + srid = rt_raster_get_srid(rast); + + points = rtalloc(sizeof(POINTARRAY *)*1); + points[0] = ptarray_construct(0, 0, 5); + + p0.x = scale_x * x + skew_x * y + ul_x; + p0.y = scale_y * y + skew_y * x + ul_y; + ptarray_set_point4d(points[0], 0, &p0); + + p.x = p0.x + scale_x; + p.y = p0.y + skew_y; + ptarray_set_point4d(points[0], 1, &p); + + p.x = p0.x + scale_x + skew_x; + p.y = p0.y + scale_y + skew_y; + ptarray_set_point4d(points[0], 2, &p); + + p.x = p0.x + skew_x; + p.y = p0.y + scale_y; + ptarray_set_point4d(points[0], 3, &p); + + /* close it */ + ptarray_set_point4d(points[0], 4, &p0); + + poly = lwpoly_construct(srid, NULL, 1, points); + + return poly; +} diff -Nru postgis-1.5.3/raster/rt_core/rt_api.h postgis-2.0.1/raster/rt_core/rt_api.h --- postgis-1.5.3/raster/rt_core/rt_api.h 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/rt_core/rt_api.h 2012-06-21 20:17:50.000000000 +0000 @@ -0,0 +1,1753 @@ +/* + * $Id: rt_api.h 9966 2012-06-21 20:17:50Z dustymugs $ + * + * WKTRaster - Raster Types for PostGIS + * http://www.postgis.org/support/wiki/index.php?WKTRasterHomePage + * + * Copyright (C) 2011-2012 Regents of the University of California + * + * Copyright (C) 2010-2011 Jorge Arevalo + * Copyright (C) 2010-2011 David Zwarg + * Copyright (C) 2009-2011 Pierre Racine + * Copyright (C) 2009-2011 Mateusz Loskot + * Copyright (C) 2008-2009 Sandro Santilli + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef RT_API_H_INCLUDED +#define RT_API_H_INCLUDED + +/* define the systems */ +#if defined(__linux__) /* (predefined) */ +#if !defined(LINUX) +#define LINUX +#endif +#if !defined(UNIX) +#define UNIX /* make sure this is defined */ +#endif +#endif + + +#if defined(__FreeBSD__) || defined(__OpenBSD__) /* seems to work like Linux... */ +#if !defined(LINUX) +#define LINUX +#endif +#if !defined(UNIX) +#define UNIX /* make sure this is defined */ +#endif +#endif + +#if defined(__MSDOS__) +#if !defined(MSDOS) +#define MSDOS /* make sure this is defined */ +#endif +#endif + +#if defined(__WIN32__) || defined(__NT__) || defined(_WIN32) +#if !defined(WIN32) +#define WIN32 +#endif +#if defined(__BORLANDC__) && defined(MSDOS) /* Borland always defines MSDOS */ +#undef MSDOS +#endif +#endif + +#if defined(__APPLE__) +#if !defined(UNIX) +#define UNIX +#endif +#endif + +#if defined(sun) || defined(__sun) +#if !defined(UNIX) +#define UNIX +#endif +#endif + +/* if we are in Unix define stricmp to be strcasecmp and strnicmp to */ +/* be strncasecmp. I'm not sure if all Unices have these, but Linux */ +/* does. */ +#if defined(UNIX) +#if !defined(HAVE_STRICMP) +#define stricmp strcasecmp +#endif +#if !defined(HAVE_STRNICMP) +#define strnicmp strncasecmp +#endif +#endif + +#include /* For size_t, srand and rand */ +#include /* For C99 int types */ +#include /* for FLT_EPSILON, DBL_EPSILON and float type limits */ +#include /* for integer type limits */ +#include + +#include "lwgeom_geos.h" +#include "liblwgeom.h" + +#include "gdal_alg.h" +#include "gdal_frmts.h" +#include "gdal.h" +#include "gdalwarper.h" +#include "ogr_api.h" +#include "ogr_srs_api.h" +#include "cpl_vsi.h" +#include "cpl_conv.h" +#include "../../postgis_config.h" +#include "../raster_config.h" + +/** + * @file rt_api.h + * + * This library is the generic raster handling section of PostGIS. The raster + * objects, constructors, destructors, and a set of spatial processing functions + * are implemented here. + * + * The library is designed for use in non-PostGIS applications if necessary. The + * units tests at test/core (and the future loader/dumper programs) are examples + * of non-PostGIS applications using rt_core. + * + * Programs using this library should set up the default memory managers and error + * handlers by implementing an rt_init_allocators() function, which can be as + * a wrapper around the rt_install_default_allocators() function if you want + * no special handling for memory management and error reporting. + * + **/ + +/** + * Types definitions + */ +typedef struct rt_raster_t* rt_raster; +typedef struct rt_band_t* rt_band; +typedef struct rt_geomval_t* rt_geomval; +typedef struct rt_bandstats_t* rt_bandstats; +typedef struct rt_histogram_t* rt_histogram; +typedef struct rt_quantile_t* rt_quantile; +typedef struct rt_valuecount_t* rt_valuecount; +typedef struct rt_gdaldriver_t* rt_gdaldriver; +typedef struct rt_reclassexpr_t* rt_reclassexpr; + +/* envelope information */ +typedef struct { + double MinX; + double MaxX; + double MinY; + double MaxY; + + double UpperLeftX; + double UpperLeftY; +} rt_envelope; + +/** + * Enum definitions + */ +/* Pixel types */ +typedef enum { + PT_1BB=0, /* 1-bit boolean */ + PT_2BUI=1, /* 2-bit unsigned integer */ + PT_4BUI=2, /* 4-bit unsigned integer */ + PT_8BSI=3, /* 8-bit signed integer */ + PT_8BUI=4, /* 8-bit unsigned integer */ + PT_16BSI=5, /* 16-bit signed integer */ + PT_16BUI=6, /* 16-bit unsigned integer */ + PT_32BSI=7, /* 32-bit signed integer */ + PT_32BUI=8, /* 32-bit unsigned integer */ + PT_32BF=10, /* 32-bit float */ + PT_64BF=11, /* 64-bit float */ + PT_END=13 +} rt_pixtype; + +typedef enum { + ET_INTERSECTION = 0, + ET_UNION, + ET_FIRST, + ET_SECOND +} rt_extenttype; + +/** +* Global functions for memory/logging handlers. +*/ +typedef void* (*rt_allocator)(size_t size); +typedef void* (*rt_reallocator)(void *mem, size_t size); +typedef void (*rt_deallocator)(void *mem); +typedef void (*rt_message_handler)(const char* string, va_list ap); + +/**************************************************************************** + * Functions that must be implemented for the raster core function's caller + * (for example: rt_pg functions, test functions, future loader/exporter) + ****************************************************************************/ + +/** + * Supply the memory management and error handling functions you want your + * application to use + */ +extern void rt_init_allocators(void); + +/*********************************************************************/ + + +/******************************************************************* + * Functions that may be used by the raster core function's caller + * (for example: rt_pg functions, test functions, future loader/exporter) + *******************************************************************/ +/** + * Apply the default memory management (malloc() and free()) and error handlers. + * Called inside rt_init_allocators() generally. + */ +extern void rt_install_default_allocators(void); + + +/** + * Wrappers used for managing memory. They simply call the functions defined by + * the caller + **/ +extern void* rtalloc(size_t size); +extern void* rtrealloc(void* mem, size_t size); +extern void rtdealloc(void* mem); + +/******************************************************************/ + + +/** + * Wrappers used for reporting errors and info. + **/ +void rterror(const char *fmt, ...); +void rtinfo(const char *fmt, ...); +void rtwarn(const char *fmt, ...); + + +/** +* The default memory/logging handlers installed by lwgeom_install_default_allocators() +*/ +void * default_rt_allocator(size_t size); +void * default_rt_reallocator(void * mem, size_t size); +void default_rt_deallocator(void * mem); +void default_rt_error_handler(const char * fmt, va_list ap); +void default_rt_warning_handler(const char * fmt, va_list ap); +void default_rt_info_handler(const char * fmt, va_list ap); + + +/* Debugging macros */ +#if POSTGIS_DEBUG_LEVEL > 0 + +/* Display a simple message at NOTICE level */ +#define RASTER_DEBUG(level, msg) \ + do { \ + if (POSTGIS_DEBUG_LEVEL >= level) \ + rtinfo("[%s:%s:%d] " msg, __FILE__, __func__, __LINE__); \ + } while (0); + +/* Display a formatted message at NOTICE level (like printf, with variadic arguments) */ +#define RASTER_DEBUGF(level, msg, ...) \ + do { \ + if (POSTGIS_DEBUG_LEVEL >= level) \ + rtinfo("[%s:%s:%d] " msg, __FILE__, __func__, __LINE__, __VA_ARGS__); \ + } while (0); + +#else + +/* Empty prototype that can be optimised away by the compiler for non-debug builds */ +#define RASTER_DEBUG(level, msg) \ + ((void) 0) + +/* Empty prototype that can be optimised away by the compiler for non-debug builds */ +#define RASTER_DEBUGF(level, msg, ...) \ + ((void) 0) + +#endif + +/*- memory context -------------------------------------------------------*/ + +void rt_set_handlers(rt_allocator allocator, rt_reallocator reallocator, + rt_deallocator deallocator, rt_message_handler error_handler, + rt_message_handler info_handler, rt_message_handler warning_handler); + + + +/*- rt_pixtype --------------------------------------------------------*/ + +/** + * Return size in bytes of a value in the given pixtype + */ +int rt_pixtype_size(rt_pixtype pixtype); + +/** + * Return alignment requirements for data in the given pixel type. + * Fast access to pixel values of this type must be aligned to as + * many bytes as returned by this function. + */ +int rt_pixtype_alignment(rt_pixtype pixtype); + +/* Return human-readable name of pixel type */ +const char* rt_pixtype_name(rt_pixtype pixtype); + +/* Return pixel type index from human-readable name */ +rt_pixtype rt_pixtype_index_from_name(const char* pixname); + +/** + * Return minimum value possible for pixel type + * + * @param pixtype: the pixel type to get minimum possible value for + * + * @return the minimum possible value for the pixel type. + */ +double rt_pixtype_get_min_value(rt_pixtype pixtype); + +/*- rt_band ----------------------------------------------------------*/ + +/** + * Create an in-db rt_band with no data + * + * @param width : number of pixel columns + * @param height : number of pixel rows + * @param pixtype : pixel type for the band + * @param hasnodata : indicates if the band has nodata value + * @param nodataval : the nodata value, will be appropriately + * truncated to fit the pixtype size. + * @param data : pointer to actual band data, required to + * be aligned accordingly to + * rt_pixtype_aligment(pixtype) and big enough + * to hold raster width*height values. + * Data will NOT be copied, ownership is left + * to caller which is responsible to keep it + * allocated for the whole lifetime of the returned + * rt_band. + * + * @return an rt_band, or 0 on failure + */ +rt_band rt_band_new_inline( + uint16_t width, uint16_t height, + rt_pixtype pixtype, + uint32_t hasnodata, double nodataval, + uint8_t* data +); + +/** + * Create an out-db rt_band + * + * @param width : number of pixel columns + * @param height : number of pixel rows + * @param pixtype : pixel type for the band + * @param hasnodata : indicates if the band has nodata value + * @param nodataval : the nodata value, will be appropriately + * truncated to fit the pixtype size. + * @param bandNum : 0-based band number in the external file + * to associate this band with. + * @param path : NULL-terminated path string pointing to the file + * containing band data. The string will NOT be + * copied, ownership is left to caller which is + * responsible to keep it allocated for the whole + * lifetime of the returned rt_band. + * + * @return an rt_band, or 0 on failure + */ +rt_band rt_band_new_offline( + uint16_t width, uint16_t height, + rt_pixtype pixtype, + uint32_t hasnodata, double nodataval, + uint8_t bandNum, const char* path +); + +/** + * Create a new band duplicated from source band. Memory is allocated + * for band path (if band is offline) or band data (if band is online). + * The caller is responsible for freeing the memory when the returned + * rt_band is destroyed. + * + * @param : the band to duplicate + * + * @return an rt_band or NULL on failure + */ +rt_band rt_band_duplicate(rt_band band); + +/** + * Return non-zero if the given band data is on + * the filesystem. + * + * @param band : the band + * + * @return non-zero if the given band data is on + * the filesystem. + */ +int rt_band_is_offline(rt_band band); + +/** + * Return bands' external path (only valid when rt_band_is_offline + * returns non-zero). + */ +const char* rt_band_get_ext_path(rt_band band); + +/** + * Return bands' external band number (only valid when + * rt_band_is_offline returns non-zero). + */ +uint8_t rt_band_get_ext_band_num(rt_band band); + +/* Get pixeltype of this band */ +rt_pixtype rt_band_get_pixtype(rt_band band); + +/* Get width of this band */ +uint16_t rt_band_get_width(rt_band band); + +/* Get height of this band */ +uint16_t rt_band_get_height(rt_band band); + +/** + * Get pointer to raster band data + * + * @param band : the band who's data to get + * + * @return void pointer to band data + */ +void* rt_band_get_data(rt_band band); + +/** + * Load offline band's data. Loaded data is internally owned + * and should not be released by the caller. Data will be + * released when band is destroyed with rt_band_destroy(). + * + * @param band : the band who's data to get + * + * @return 0 if success, non-zero if failure + */ +int rt_band_load_offline_data(rt_band band); + +/** + * Destroy a raster band + * + * @param band : the band to destroy + */ +void rt_band_destroy(rt_band band); + +/** + * Get hasnodata flag value + * + * @param band : the band on which to check the hasnodata flag + * + * @return the hasnodata flag. + */ +int rt_band_get_hasnodata_flag(rt_band band); + +/** + * Set hasnodata flag value + * @param band : the band on which to set the hasnodata flag + * @param flag : the new hasnodata flag value. Must be 1 or 0. + */ +void rt_band_set_hasnodata_flag(rt_band band, int flag); + +/** + * Set isnodata flag value + * + * @param band : the band on which to set the isnodata flag + * @param flag : the new isnodata flag value. Must be 1 or 0 + */ +void rt_band_set_isnodata_flag(rt_band band, int flag); + +/** + * Get hasnodata flag value + * @param band : the band on which to check the isnodata flag + * @return the hasnodata flag. + */ +int rt_band_get_isnodata_flag(rt_band band); + +/** + * Set nodata value + * + * @param band : the band to set nodata value to + * @param val : the nodata value + * + * @return 0 on success, -1 on error (invalid pixel type), + * 1 on truncation/clamping/converting. + */ +int rt_band_set_nodata(rt_band band, double val); + +/** + * Get nodata value + * + * @param band : the band to set nodata value to + * + * @return nodata value + */ +double rt_band_get_nodata(rt_band band); + +/** + * Set values of multiple pixels. Unlike rt_band_set_pixel, + * values in vals are expected to be of the band's pixel type + * as this function uses memcpy. + * + * @param band : the band to set value to + * @param x : X coordinate (0-based) + * @param y : Y coordinate (0-based) + * @param vals : the pixel values to apply + * @param len : # of elements in vals + * + * @return 1 on success, 0 on error + */ +int rt_band_set_pixel_line( + rt_band band, + int x, int y, + void *vals, uint16_t len +); + +/** + * Set single pixel's value + * + * @param band : the band to set value to + * @param x : x ordinate (0-based) + * @param y : y ordinate (0-based) + * @param val : the pixel value + * + * @return 0 on success, -1 on error (value out of valid range), + * 1 on truncation/clamping/converting. + */ +int rt_band_set_pixel( + rt_band band, + int x, int y, + double val +); + +/** + * Get pixel value + * + * @param band : the band to get pixel value from + * @param x : x ordinate (0-based) + * @param y : x ordinate (0-based) + * @param *result: result if there is a value + * + * @return 0 on success, -1 on error (value out of valid range). + */ +int rt_band_get_pixel( + rt_band band, + int x, int y, + double *result +); + +/** + * Returns the minimal possible value for the band according to the pixel type. + * @param band: the band to get info from + * @return the minimal possible value for the band. + */ +double rt_band_get_min_value(rt_band band); + +/** + * Returns TRUE if the band is only nodata values + * @param band: the band to get info from + * @return TRUE if the band is only nodata values, FALSE otherwise + */ +int rt_band_is_nodata(rt_band band); + +/** + * Returns TRUE if the band is only nodata values + * @param band: the band to get info from + * @return TRUE if the band is only nodata values, FALSE otherwise + */ +int rt_band_check_is_nodata(rt_band band); + +/** + * Compare clamped value to band's clamped NODATA value + * + * @param band: the band whose NODATA value will be used for comparison + * @param val: the value to compare to the NODATA value + * + * @return 1 if clamped value is clamped NODATA + * 0 if clamped value is NOT clamped NODATA + * -1 otherwise + */ +int rt_band_clamped_value_is_nodata(rt_band band, double val); + +/** + * Correct value when clamped value is clamped NODATA value. Correction + * does NOT occur if unclamped value is exactly unclamped NODATA value. + * + * @param band: the band whose NODATA value will be used for comparison + * @param val: the value to compare to the NODATA value and correct + * @param newval: pointer to corrected value + * + * @return 0 on error, 1 if corrected, -1 otherwise + */ +int +rt_band_corrected_clamped_value(rt_band band, double val, double *newval); + +/** + * Compute summary statistics for a band + * + * @param band: the band to query for summary stats + * @param exclude_nodata_value: if non-zero, ignore nodata values + * @param sample: percentage of pixels to sample + * @param inc_vals: flag to include values in return struct + * @param cK: number of pixels counted thus far in coverage + * @param cM: M component of 1-pass stddev for coverage + * @param cQ: Q component of 1-pass stddev for coverage + * + * @return the summary statistics for a band + */ +rt_bandstats rt_band_get_summary_stats(rt_band band, int exclude_nodata_value, + double sample, int inc_vals, uint64_t *cK, double *cM, double *cQ); + +/** + * Count the distribution of data + * + * @param stats: a populated stats struct for processing + * @param bin_count: the number of bins to group the data by + * @param bin_width: the width of each bin as an array + * @param bin_width_count: number of values in bin_width + * @param right: evaluate bins by (a,b] rather than default [a,b) + * @param min: user-defined minimum value of the histogram + * a value less than the minimum value is not counted in any bins + * if min = max, min and max are not used + * @param max: user-defined maximum value of the histogram + * a value greater than the max value is not counted in any bins + * if min = max, min and max are not used + * @param rtn_count: set to the number of bins being returned + * + * @return the histogram of the data + */ +rt_histogram rt_band_get_histogram(rt_bandstats stats, + int bin_count, double *bin_widths, int bin_widths_count, + int right, double min, double max, uint32_t *rtn_count); + +/** + * Compute the default set of or requested quantiles for a set of data + * the quantile formula used is same as Excel and R default method + * + * @param stats: a populated stats struct for processing + * @param quantiles: the quantiles to be computed + * @param quantiles_count: the number of quantiles to be computed + * @param rtn_count: the number of quantiles being returned + * + * @return the default set of or requested quantiles for a band + */ +rt_quantile rt_band_get_quantiles(rt_bandstats stats, + double *quantiles, int quantiles_count, uint32_t *rtn_count); + +struct quantile_llist; +int quantile_llist_destroy(struct quantile_llist **list, + uint32_t list_count); + +/** + * Compute the default set of or requested quantiles for a coverage + * + * This function is based upon the algorithm described in: + * + * A One-Pass Space-Efficient Algorithm for Finding Quantiles (1995) + * by Rakesh Agrawal, Arun Swami + * in Proc. 7th Intl. Conf. Management of Data (COMAD-95) + * + * http://www.almaden.ibm.com/cs/projects/iis/hdb/Publications/papers/comad95.pdf + * + * In the future, it may be worth exploring algorithms that don't + * require the size of the coverage + * + * @param band: the band to include in the quantile search + * @param exclude_nodata_value: if non-zero, ignore nodata values + * @param sample: percentage of pixels to sample + * @param cov_count: number of values in coverage + * @param qlls: set of quantile_llist structures + * @param qlls_count: the number of quantile_llist structures + * @param quantiles: the quantiles to be computed + * if bot qlls and quantiles provided, qlls is used + * @param quantiles_count: the number of quantiles to be computed + * @param rtn_count: the number of quantiles being returned + * + * @return the default set of or requested quantiles for a band + */ +rt_quantile rt_band_get_quantiles_stream(rt_band band, + int exclude_nodata_value, double sample, + uint64_t cov_count, + struct quantile_llist **qlls, uint32_t *qlls_count, + double *quantiles, int quantiles_count, + uint32_t *rtn_count); + +/** + * Count the number of times provided value(s) occur in + * the band + * + * @param band: the band to query for minimum and maximum pixel values + * @param exclude_nodata_value: if non-zero, ignore nodata values + * @param search_values: array of values to count + * @param search_values_count: the number of search values + * @param roundto: the decimal place to round the values to + * @param rtn_total: the number of pixels examined in the band + * @param rtn_count: the number of value counts being returned + * + * @return the number of times the provide value(s) occur + */ +rt_valuecount rt_band_get_value_count(rt_band band, int exclude_nodata_value, + double *search_values, uint32_t search_values_count, + double roundto, uint32_t *rtn_total, uint32_t *rtn_count); + +/** + * Returns new band with values reclassified + * + * @param srcband : the band who's values will be reclassified + * @param pixtype : pixel type of the new band + * @param hasnodata : indicates if the band has a nodata value + * @param nodataval : nodata value for the new band + * @param exprset : array of rt_reclassexpr structs + * @param exprcount : number of elements in expr + * + * @return a new rt_band or 0 on error + */ +rt_band rt_band_reclass(rt_band srcband, rt_pixtype pixtype, + uint32_t hasnodata, double nodataval, + rt_reclassexpr *exprset, int exprcount); + +/*- rt_raster --------------------------------------------------------*/ + +/** + * Construct a raster with given dimensions. + * + * Transform will be set to identity. + * Will contain no bands. + * + * @param width : number of pixel columns + * @param height : number of pixel rows + * + * @return an rt_raster or 0 if out of memory + */ +rt_raster rt_raster_new(uint32_t width, uint32_t height); + +/** + * Construct an rt_raster from a binary WKB representation + * + * @param wkb : an octet stream + * @param wkbsize : size (in bytes) of the wkb octet stream + * + * @return an rt_raster or 0 on error (out of memory or + * malformed WKB). + * + */ +rt_raster rt_raster_from_wkb(const uint8_t* wkb, + uint32_t wkbsize); + +/** + * Construct an rt_raster from a text HEXWKB representation + * + * @param hexwkb : an hex-encoded stream + * @param hexwkbsize : size (in bytes) of the hexwkb stream + * + * @return an rt_raster or 0 on error (out of memory or + * malformed WKB). + * + */ +rt_raster rt_raster_from_hexwkb(const char* hexwkb, + uint32_t hexwkbsize); + +/** + * Return this raster in WKB form + * + * @param raster : the raster + * @param wkbsize : will be set to the size of returned wkb form + */ +uint8_t *rt_raster_to_wkb(rt_raster raster, + uint32_t *wkbsize); + +/** + * Return this raster in HEXWKB form (null-terminated hex) + * + * @param raster : the raster + * @param hexwkbsize : will be set to the size of returned wkb form, + * not including the null termination + */ +char *rt_raster_to_hexwkb(rt_raster raster, + uint32_t *hexwkbsize); + +/** + * Release memory associated to a raster + * + * Note that this will not release data + * associated to the band themselves (but only + * the one associated with the pointers pointing + * at them). + * + + * @param raster : the raster to destroy + */ +void rt_raster_destroy(rt_raster raster); + +/* Get number of bands */ +int rt_raster_get_num_bands(rt_raster raster); + +/* Return Nth band, or 0 if unavailable */ +rt_band rt_raster_get_band(rt_raster raster, int bandNum); + +/* Get number of rows */ +uint16_t rt_raster_get_width(rt_raster raster); + +/* Get number of columns */ +uint16_t rt_raster_get_height(rt_raster raster); + +/** + * Add band data to a raster. + * + * @param raster : the raster to add a band to + * @param band : the band to add, ownership left to caller. + * Band dimensions are required to match with raster ones. + * @param index : the position where to insert the new band (0 based) + * + * @return identifier (position) for the just-added raster, or -1 on error + */ +int32_t rt_raster_add_band(rt_raster raster, rt_band band, int index); + +/** + * Generate a new inline band and add it to a raster. + * + * @param raster : the raster to add a band to + * @param pixtype: the pixel type for the new band + * @param initialvalue: initial value for pixels + * @param hasnodata: indicates if the band has a nodata value + * @param nodatavalue: nodata value for the new band + * @param index: position to add the new band in the raster + * + * @return identifier (position) for the just-added raster, or -1 on error + */ +int32_t rt_raster_generate_new_band(rt_raster raster, rt_pixtype pixtype, + double initialvalue, uint32_t hasnodata, double nodatavalue, int index); + +/** + * Set scale in projection units + * + * @param raster : the raster to set georeference of + * @param scaleX : scale X in projection units + * @param scaleY : scale Y height in projection units + * + * NOTE: doesn't recompute offsets + */ +void rt_raster_set_scale(rt_raster raster, + double scaleX, double scaleY); + +/** + * Get scale X in projection units + * + * @param raster : the raster to get georeference of + * + * @return scale X in projection units + */ +double rt_raster_get_x_scale(rt_raster raster); + +/** + * Get scale Y in projection units + * + * @param raster : the raster to get georeference of + * + * @return scale Y in projection units + */ +double rt_raster_get_y_scale(rt_raster raster); + +/** + * Set insertion points in projection units + * + * @param raster : the raster to set georeference of + * @param x : x ordinate of the upper-left corner of upper-left pixel, + * in projection units + * @param y : y ordinate of the upper-left corner of upper-left pixel, + * in projection units + */ +void rt_raster_set_offsets(rt_raster raster, + double x, double y); + +/** + * Get raster x offset, in projection units + * + * @param raster : the raster to get georeference of + * + * @return x ordinate of the upper-left corner of upper-left pixel, + * in projection units + */ +double rt_raster_get_x_offset(rt_raster raster); + +/** + * Get raster y offset, in projection units + * + * @param raster : the raster to get georeference of + * + * @return y ordinate of the upper-left corner of upper-left pixel, + * in projection units + */ +double rt_raster_get_y_offset(rt_raster raster); + +/** + * Set skews about the X and Y axis + * + * @param raster : the raster to set georeference of + * @param skewX : skew about the x axis + * @param skewY : skew about the y axis + */ +void rt_raster_set_skews(rt_raster raster, + double skewX, double skewY); + +/** + * Get skew about the X axis + * + * @param raster : the raster to set georeference of + * @return skew about the Y axis + */ +double rt_raster_get_x_skew(rt_raster raster); + +/** + * Get skew about the Y axis + * + * @param raster : the raster to set georeference of + * @return skew about the Y axis + */ +double rt_raster_get_y_skew(rt_raster raster); + +/** +* Calculates and returns the physically significant descriptors embodied +* in the geotransform attached to the provided raster. +* +* @param rast the raster containing the geotransform of interest +* @param i_mag size of a pixel along the transformed i axis +* @param j_mag size of a pixel along the transformed j axis +* @param theta_i angle by which the raster is rotated (radians positive clockwise) +* @param theta_ij angle from transformed i axis to transformed j axis +* (radians positive counterclockwise) +* +*/ +void rt_raster_get_phys_params(rt_raster rast, + double *i_mag, double *j_mag, double *theta_i, double *theta_ij) ; + +/** +* Calculates the geotransform coefficients and applies them to the +* supplied raster. The coefficients will not be applied if there was an +* error during the calculation. +* +* This method affects only the scale and skew coefficients. The offset +* parameters are not changed. +* +* @param rast the raster in which the geotransform will be stored. +* @param i_mag size of a pixel along the transformed i axis +* @param j_mag size of a pixel along the transformed j axis +* @param theta_i angle by which the raster is rotated (radians positive clockwise) +* @param theta_ij angle from transformed i axis to transformed j axis +* (radians positive counterclockwise) +*/ +void rt_raster_set_phys_params(rt_raster rast, + double i_mag, double j_mag, double theta_i, double theta_ij) ; + + +/** +* Calculates the physically significant descriptors embodied in an +* arbitrary geotransform. Always succeeds unless one or more of the +* output pointers is set to NULL. +* +* @param xscale geotransform coefficient o_11 +* @param xskew geotransform coefficient o_12 +* @param yskew geotransform coefficient o_21 +* @param yscale geotransform coefficient o_22 +* @param i_mag size of a pixel along the transformed i axis +* @param j_mag size of a pixel along the transformed j axis +* @param theta_i angle by which the raster is rotated (radians positive clockwise) +* @param theta_ij angle from transformed i axis to transformed j axis +* (radians positive counterclockwise) +*/ +void rt_raster_calc_phys_params(double xscale, + double xskew, double yskew, double yscale, + double *i_mag, double *j_mag, double *theta_i, double *theta_ij) ; + + +/** +* Calculates the coefficients of a geotransform given the physically +* significant parameters describing the transform. Will fail if any of the +* result pointers is NULL, or if theta_ij has an illegal value (0 or PI). +* +* @param i_mag size of a pixel along the transformed i axis +* @param j_mag size of a pixel along the transformed j axis +* @param theta_i angle by which the raster is rotated (radians positive clockwise) +* @param theta_ij angle from transformed i axis to transformed j axis +* (radians positive counterclockwise) +* @param xscale geotransform coefficient o_11 +* @param xskew geotransform coefficient o_12 +* @param yskew geotransform coefficient o_21 +* @param yscale geotransform coefficient o_22 +* @return 1 if the calculation succeeded, 0 if error. +*/ +int rt_raster_calc_gt_coeff(double i_mag, + double j_mag, double theta_i, double theta_ij, + double *xscale, double *xskew, double *yskew, double *yscale) ; + +/** + * Set raster's SRID + * + * @param raster : the raster to set SRID of + * @param srid : the SRID to set for the raster + */ +void rt_raster_set_srid(rt_raster raster, int32_t srid); + +/** + * Get raster's SRID + * @param raster : the raster to set SRID of + * + * @return the raster's SRID + */ +int32_t rt_raster_get_srid(rt_raster raster); + +/** + * Get 6-element array of raster geotransform matrix + * + * @param raster : the raster to get matrix of + * @param gt : output parameter, 6-element geotransform matrix + * + */ +void rt_raster_get_geotransform_matrix(rt_raster raster, + double *gt); + +/** + * Set raster's geotransform using 6-element array + * + * @param raster : the raster to set matrix of + * @param gt : intput parameter, 6-element geotransform matrix + * + */ +void rt_raster_set_geotransform_matrix(rt_raster raster, + double *gt); + +/** + * Convert an xr, yr raster point to an xw, yw point on map + * + * @param raster : the raster to get info from + * @param xr : the pixel's column + * @param yr : the pixel's row + * @param xw : output parameter, X ordinate of the geographical point + * @param yw : output parameter, Y ordinate of the geographical point + * @param gt : input/output parameter, 3x2 geotransform matrix + * + * @return if zero, error occurred in function + */ +int rt_raster_cell_to_geopoint(rt_raster raster, + double xr, double yr, + double* xw, double* yw, + double *gt); + +/** + * Convert an xw, yw map point to a xr, yr raster point + * + * @param raster : the raster to get info from + * @param xw : X ordinate of the geographical point + * @param yw : Y ordinate of the geographical point + * @param xr : output parameter, the pixel's column + * @param yr : output parameter, the pixel's row + * @param igt : input/output parameter, inverse geotransform matrix + * + * @return if zero, error occurred in function + */ +int rt_raster_geopoint_to_cell(rt_raster raster, + double xw, double yw, + double *xr, double *yr, + double *igt); + +/** + * Get raster's polygon convex hull. + * + * The convex hull is a 4 vertices (5 to be closed) single + * ring polygon bearing the raster's rotation + * and using projection coordinates + * + * @param raster : the raster to get info from + * + * @return the convex hull, or NULL on error. + * + */ +LWPOLY* rt_raster_get_convex_hull(rt_raster raster); + +/** + * Get raster's envelope. + * + * The envelope is the minimum bounding rectangle of the raster + * + * @param raster: the raster to get envelope of + * @param env: pointer to rt_envelope + * + * @return 0 on error, 1 on success + */ +int rt_raster_get_envelope( + rt_raster raster, + rt_envelope *env +); + +/* + * Compute skewed extent that covers unskewed extent. + * + * @param envelope: unskewed extent of type rt_envelope + * @param skew: pointer to 2-element array (x, y) of skew + * @param scale: pointer to 2-element array (x, y) of scale + * @param tolerance: value between 0 and 1 where the smaller the tolerance + * results in an extent approaching the "minimum" skewed + * extent. If value <= 0, tolerance = 0.1. + * If value > 1, tolerance = 1. + * + * @return skewed raster who's extent covers unskewed extent, NULL on error + */ +rt_raster +rt_raster_compute_skewed_raster( + rt_envelope extent, + double *skew, + double *scale, + double tolerance +); + +/** + * Get a raster pixel as a polygon. + * + * The pixel shape is a 4 vertices (5 to be closed) single + * ring polygon bearing the raster's rotation + * and using projection coordinates + * + * @param raster : the raster to get pixel from + * @param x : the column number + * @param y : the row number + * + * @return the pixel polygon, or NULL on error. + * + */ +LWPOLY* rt_raster_pixel_as_polygon(rt_raster raster, int x, int y); + +/** + * Returns a set of "geomval" value, one for each group of pixel + * sharing the same value for the provided band. + * + * A "geomval" value is a complex type composed of a geometry + * in LWPOLY representation (one for each group of pixel sharing + * the same value) and the value associated with this geometry. + * + * @param raster: the raster to get info from. + * @param nband: the band to polygonize. 0-based + * + * @return A set of "geomval" values, one for each group of pixels + * sharing the same value for the provided band. The returned values are + * LWPOLY geometries. + */ +rt_geomval +rt_raster_gdal_polygonize( + rt_raster raster, int nband, + int * pnElements +); + +/** + * Return this raster in serialized form. + * + * Serialized form is documented in doc/RFC1-SerializedFormat. + * + */ +void* rt_raster_serialize(rt_raster raster); + +/** + * Return a raster from a serialized form. + * + * Serialized form is documented in doc/RFC1-SerializedFormat. + * + * NOTE: the raster will contain pointer to the serialized + * form, which must be kept alive. + */ +rt_raster rt_raster_deserialize(void* serialized, int header_only); + + +/** + * Return TRUE if the raster is empty. i.e. is NULL, width = 0 or height = 0 + * + * @param raster: the raster to get info from + * + * @return TRUE if the raster is empty, FALSE otherwise + */ +int rt_raster_is_empty(rt_raster raster); + +/** + * Return TRUE if the raster do not have a band of this number. + * + * @param raster: the raster to get info from + * @param nband: the band number. 0-based + * + * @return TRUE if the raster do not have a band of this number, FALSE otherwise + */ +int rt_raster_has_no_band(rt_raster raster, int nband); + +/** + * Copy one band from one raster to another. Bands are duplicated from + * fromrast to torast using rt_band_duplicate. The caller will need + * to ensure that the copied band's data or path remains allocated + * for the lifetime of the copied bands. + * + * @param torast: raster to copy band to + * @param fromrast: raster to copy band from + * @param fromindex: index of band in source raster, 0-based + * @param toindex: index of new band in destination raster, 0-based + * + * @return The band index of the second raster where the new band is copied. + */ +int32_t rt_raster_copy_band( + rt_raster torast, rt_raster fromrast, + int fromindex, int toindex +); + +/** + * Construct a new rt_raster from an existing rt_raster and an array + * of band numbers + * + * @param raster : the source raster + * @param bandNums : array of band numbers to extract from source raster + * and add to the new raster (0 based) + * @param count : number of elements in bandNums + * + * @return a new rt_raster or 0 on error + */ +rt_raster rt_raster_from_band(rt_raster raster, uint32_t *bandNums, + int count); + +/** + * Replace band at provided index with new band + * + * @param raster: raster of band to be replaced + * @param band : new band to add to raster + * @param index : index of band to replace (0-based) + * + * @return 0 on error or replaced band + */ +rt_band rt_raster_replace_band(rt_raster raster, rt_band band, + int index); + +/** + * Return formatted GDAL raster from raster + * + * @param raster : the raster to convert + * @param srs : the raster's coordinate system in OGC WKT + * @param format : format to convert to. GDAL driver short name + * @param options : list of format creation options. array of strings + * @param gdalsize : will be set to the size of returned bytea + * + * @return formatted GDAL raster. the calling function is responsible + * for freeing the returned data using CPLFree() + */ +uint8_t *rt_raster_to_gdal(rt_raster raster, const char *srs, + char *format, char **options, uint64_t *gdalsize); + +/** + * Returns a set of available GDAL drivers + * + * @param drv_count : number of GDAL drivers available + * @param cancc : if non-zero, filter drivers to only those + * with support for CreateCopy and VirtualIO + * + * @return set of "gdaldriver" values of available GDAL drivers + */ +rt_gdaldriver rt_raster_gdal_drivers(uint32_t *drv_count, uint8_t cancc); + +/** + * Return GDAL dataset using GDAL MEM driver from raster + * + * @param raster : raster to convert to GDAL MEM + * @param srs : the raster's coordinate system in OGC WKT + * @param bandNums : array of band numbers to extract from raster + * and include in the GDAL dataset (0 based) + * @param count : number of elements in bandNums + * @param rtn_drv : is set to the GDAL driver object + * + * @return GDAL dataset using GDAL MEM driver + */ +GDALDatasetH rt_raster_to_gdal_mem(rt_raster raster, const char *srs, + uint32_t *bandNums, int count, GDALDriverH *rtn_drv); + +/** + * Return a raster from a GDAL dataset + * + * @param ds : the GDAL dataset to convert to a raster + * + * @return raster + */ +rt_raster rt_raster_from_gdal_dataset(GDALDatasetH ds); + +/** + * Return a warped raster using GDAL Warp API + * + * @param raster : raster to transform + * @param src_srs : the raster's coordinate system in OGC WKT + * @param dst_srs : the warped raster's coordinate system in OGC WKT + * @param scale_x : the x size of pixels of the warped raster's pixels in + * units of dst_srs + * @param scale_y : the y size of pixels of the warped raster's pixels in + * units of dst_srs + * @param width : the number of columns of the warped raster. note that + * width/height CANNOT be used with scale_x/scale_y + * @param height : the number of rows of the warped raster. note that + * width/height CANNOT be used with scale_x/scale_y + * @param ul_xw : the X value of upper-left corner of the warped raster in + * units of dst_srs + * @param ul_yw : the Y value of upper-left corner of the warped raster in + * units of dst_srs + * @param grid_xw : the X value of point on a grid to align warped raster + * to in units of dst_srs + * @param grid_yw : the Y value of point on a grid to align warped raster + * to in units of dst_srs + * @param skew_x : the X skew of the warped raster in units of dst_srs + * @param skew_y : the Y skew of the warped raster in units of dst_srs + * @param resample_alg : the resampling algorithm + * @param max_err : maximum error measured in input pixels permitted + * (0.0 for exact calculations) + * + * @return the warped raster + */ +rt_raster rt_raster_gdal_warp(rt_raster raster, const char *src_srs, + const char *dst_srs, + double *scale_x, double *scale_y, + int *width, int *height, + double *ul_xw, double *ul_yw, + double *grid_xw, double *grid_yw, + double *skew_x, double *skew_y, + GDALResampleAlg resample_alg, double max_err); + +/** + * Return a raster of the provided geometry + * + * @param wkb : WKB representation of the geometry to convert + * @param wkb_len : length of the WKB representation of the geometry + * @param srs : the geometry's coordinate system in OGC WKT + * @param num_bands: number of bands in the output raster + * @param pixtype: data type of each band + * @param init: array of values to initialize each band with + * @param value: array of values for pixels of geometry + * @param nodata: array of nodata values for each band + * @param hasnodata: array flagging the presence of nodata for each band + * @param width : the number of columns of the raster + * @param height : the number of rows of the raster + * @param scale_x : the pixel width of the raster + * @param scale_y : the pixel height of the raster + * @param ul_xw : the X value of upper-left corner of the raster + * @param ul_yw : the Y value of upper-left corner of the raster + * @param grid_xw : the X value of point on grid to align raster to + * @param grid_yw : the Y value of point on grid to align raster to + * @param skew_x : the X skew of the raster + * @param skew_y : the Y skew of the raster + * @param options : array of options. only option is "ALL_TOUCHED" + * + * @return the raster of the provided geometry + */ +rt_raster rt_raster_gdal_rasterize(const unsigned char *wkb, + uint32_t wkb_len, const char *srs, + uint32_t num_bands, rt_pixtype *pixtype, + double *init, double *value, + double *nodata, uint8_t *hasnodata, + int *width, int *height, + double *scale_x, double *scale_y, + double *ul_xw, double *ul_yw, + double *grid_xw, double *grid_yw, + double *skew_x, double *skew_y, + char **options +); + +/** + * Return zero if error occurred in function. + * Parameter intersects returns non-zero if two rasters intersect + * + * @param rast1 : the first raster whose band will be tested + * @param nband1 : the 0-based band of raster rast1 to use + * if value is less than zero, bands are ignored. + * if nband1 gte zero, nband2 must be gte zero + * @param rast2 : the second raster whose band will be tested + * @param nband2 : the 0-based band of raster rast2 to use + * if value is less than zero, bands are ignored + * if nband2 gte zero, nband1 must be gte zero + * @param intersects : non-zero value if the two rasters' bands intersects + * + * @return if zero, an error occurred in function + */ +int rt_raster_intersects( + rt_raster rast1, int nband1, + rt_raster rast2, int nband2, + int *intersects +); + +/* + * Return zero if error occurred in function. + * Paramter aligned returns non-zero if two rasters are aligned + * + * @param rast1 : the first raster for alignment test + * @param rast2 : the second raster for alignment test + * @param aligned : non-zero value if the two rasters are aligned + * + * @return if zero, an error occurred in function + */ +int rt_raster_same_alignment( + rt_raster rast1, + rt_raster rast2, + int *aligned +); + +/* + * Return raster of computed extent specified extenttype applied + * on two input rasters. The raster returned should be freed by + * the caller + * + * @param rast1 : the first raster + * @param rast2 : the second raster + * @param extenttype : type of extent for the output raster + * @param err : if 0, error occurred + * @param offset : 4-element array indicating the X,Y offsets + * for each raster. 0,1 for rast1 X,Y. 2,3 for rast2 X,Y. + * + * @return raster object if success, NULL otherwise + */ +rt_raster +rt_raster_from_two_rasters( + rt_raster rast1, rt_raster rast2, + rt_extenttype extenttype, + int *err, double *offset +); + +/*- utilities -------------------------------------------------------*/ + +/* + * rt_core memory functions + */ +extern void *rtalloc(size_t size); +extern void *rtrealloc(void *mem, size_t size); +extern void rtdealloc(void *mem); + + + +/* Set of functions to clamp double to int of different size + */ + +#if !defined(POSTGIS_RASTER_WARN_ON_TRUNCATION) +#define POSTGIS_RASTER_WARN_ON_TRUNCATION 0 +#endif + +#define POSTGIS_RT_1BBMAX 1 +#define POSTGIS_RT_2BUIMAX 3 +#define POSTGIS_RT_4BUIMAX 15 + +uint8_t +rt_util_clamp_to_1BB(double value); + +uint8_t +rt_util_clamp_to_2BUI(double value); + +uint8_t +rt_util_clamp_to_4BUI(double value); + +int8_t +rt_util_clamp_to_8BSI(double value); + +uint8_t +rt_util_clamp_to_8BUI(double value); + +int16_t +rt_util_clamp_to_16BSI(double value); + +uint16_t +rt_util_clamp_to_16BUI(double value); + +int32_t +rt_util_clamp_to_32BSI(double value); + +uint32_t +rt_util_clamp_to_32BUI(double value); + +float +rt_util_clamp_to_32F(double value); + +int +rt_util_dbl_trunc_warning( + double initialvalue, + int32_t checkvalint, uint32_t checkvaluint, + float checkvalfloat, double checkvaldouble, + rt_pixtype pixtype +); + +/** + * Convert cstring name to GDAL Resample Algorithm + * + * @param algname: cstring name to convert + * + * @return valid GDAL resampling algorithm + */ +GDALResampleAlg +rt_util_gdal_resample_alg(const char *algname); + +/** + * Convert rt_pixtype to GDALDataType + * + * @param pt: pixeltype to convert + * + * @return valid GDALDataType + */ +GDALDataType +rt_util_pixtype_to_gdal_datatype(rt_pixtype pt); + +/** + * Convert GDALDataType to rt_pixtype + * + * @param gdt: GDAL datatype to convert + * + * @return valid rt_pixtype + */ +rt_pixtype +rt_util_gdal_datatype_to_pixtype(GDALDataType gdt); + +/* + get GDAL runtime version information +*/ +const char* +rt_util_gdal_version(const char *request); + +/* + computed extent type from c string +*/ +rt_extenttype +rt_util_extent_type(const char *name); + +/* + convert the spatial reference string from a GDAL recognized format to either WKT or Proj4 +*/ +char* +rt_util_gdal_convert_sr(const char *srs, int proj4); + +/* + is the spatial reference string supported by GDAL +*/ +int +rt_util_gdal_supported_sr(const char *srs); + +/* + is GDAL configured correctly? +*/ +int +rt_util_gdal_configured(void); + +/* + is the driver registered? +*/ +int +rt_util_gdal_driver_registered(const char *drv); + +void +rt_util_from_ogr_envelope( + OGREnvelope env, + rt_envelope *ext +); + +void +rt_util_to_ogr_envelope( + rt_envelope ext, + OGREnvelope *env +); + +LWPOLY * +rt_util_envelope_to_lwpoly( + rt_envelope ext +); + +/* + helper macros for consistent floating point equality checks +*/ +#define FLT_NEQ(x, y) (fabs(x - y) > FLT_EPSILON) +#define FLT_EQ(x, y) (!FLT_NEQ(x, y)) +#define DBL_NEQ(x, y) (fabs(x - y) > DBL_EPSILON) +#define DBL_EQ(x, y) (!DBL_NEQ(x, y)) + +/* + helper macro for symmetrical rounding +*/ +#define ROUND(x, y) (((x > 0.0) ? floor((x * pow(10, y) + 0.5)) : ceil((x * pow(10, y) - 0.5))) / pow(10, y)) + +/** + * Struct definitions + * + * These structs are defined here as they are needed elsewhere + * including rt_pg/rt_pg.c and reduce duplicative declarations + * + */ +struct rt_raster_serialized_t { + /*---[ 8 byte boundary ]---{ */ + uint32_t size; /* required by postgresql: 4 bytes */ + uint16_t version; /* format version (this is version 0): 2 bytes */ + uint16_t numBands; /* Number of bands: 2 bytes */ + + /* }---[ 8 byte boundary ]---{ */ + double scaleX; /* pixel width: 8 bytes */ + + /* }---[ 8 byte boundary ]---{ */ + double scaleY; /* pixel height: 8 bytes */ + + /* }---[ 8 byte boundary ]---{ */ + double ipX; /* insertion point X: 8 bytes */ + + /* }---[ 8 byte boundary ]---{ */ + double ipY; /* insertion point Y: 8 bytes */ + + /* }---[ 8 byte boundary ]---{ */ + double skewX; /* skew about the X axis: 8 bytes */ + + /* }---[ 8 byte boundary ]---{ */ + double skewY; /* skew about the Y axis: 8 bytes */ + + /* }---[ 8 byte boundary ]--- */ + int32_t srid; /* Spatial reference id: 4 bytes */ + uint16_t width; /* pixel columns: 2 bytes */ + uint16_t height; /* pixel rows: 2 bytes */ +}; + +/* NOTE: the initial part of this structure matches the layout + * of data in the serialized form version 0, starting + * from the numBands element + */ +struct rt_raster_t { + uint32_t size; + uint16_t version; + + /* Number of bands, all share the same dimension + * and georeference */ + uint16_t numBands; + + /* Georeference (in projection units) */ + double scaleX; /* pixel width */ + double scaleY; /* pixel height */ + double ipX; /* geo x ordinate of the corner of upper-left pixel */ + double ipY; /* geo y ordinate of the corner of bottom-right pixel */ + double skewX; /* skew about the X axis*/ + double skewY; /* skew about the Y axis */ + + int32_t srid; /* spatial reference id */ + uint16_t width; /* pixel columns - max 65535 */ + uint16_t height; /* pixel rows - max 65535 */ + rt_band *bands; /* actual bands */ + +}; + +struct rt_extband_t { + uint8_t bandNum; /* 0-based */ + char* path; /* externally owned ? */ + void *mem; /* loaded external band data, internally owned */ +}; + +struct rt_band_t { + rt_pixtype pixtype; + int32_t offline; + uint16_t width; + uint16_t height; + int32_t hasnodata; /* a flag indicating if this band contains nodata values */ + int32_t isnodata; /* a flag indicating if this band is filled only with + nodata values */ + double nodataval; /* int will be converted ... */ + int32_t ownsData; /* XXX mloskot: its behaviour needs to be documented */ + + rt_raster raster; /* reference to parent raster */ + + union { + void* mem; /* actual data, externally owned */ + struct rt_extband_t offline; + } data; + +}; + +/* polygon as LWPOLY with associated value */ +struct rt_geomval_t { + LWPOLY *geom; + double val; +}; + +/* summary stats of specified band */ +struct rt_bandstats_t { + double sample; + uint32_t count; + + double min; + double max; + double sum; + double mean; + double stddev; + + double *values; + int sorted; /* flag indicating that values is sorted ascending by value */ +}; + +/* histogram bin(s) of specified band */ +struct rt_histogram_t { + uint32_t count; + double percent; + + double min; + double max; + + int inc_min; + int inc_max; +}; + +/* quantile(s) of the specified band */ +struct rt_quantile_t { + double quantile; + double value; + uint32_t has_value; +}; + +/* listed-list structures for rt_band_get_quantiles_stream */ +struct quantile_llist { + uint8_t algeq; /* AL-GEQ (1) or AL-GT (0) */ + double quantile; + uint64_t tau; /* position in sequence */ + + struct quantile_llist_element *head; /* H index 0 */ + struct quantile_llist_element *tail; /* H index last */ + uint32_t count; /* # of elements in H */ + + /* faster access to elements at specific intervals */ + struct quantile_llist_index *index; + uint32_t index_max; /* max # of elements in index */ + + uint64_t sum1; /* N1H */ + uint64_t sum2; /* N2H */ +}; + +struct quantile_llist_element { + double value; + uint32_t count; + + struct quantile_llist_element *prev; + struct quantile_llist_element *next; +}; + +struct quantile_llist_index { + struct quantile_llist_element *element; + uint32_t index; +}; + +/* number of times a value occurs */ +struct rt_valuecount_t { + double value; + uint32_t count; + double percent; +}; + +/* reclassification expression */ +struct rt_reclassexpr_t { + struct rt_reclassrange { + double min; + double max; + int inc_min; /* include min */ + int inc_max; /* include max */ + int exc_min; /* exceed min */ + int exc_max; /* exceed max */ + } src, dst; +}; + +/* gdal driver information */ +struct rt_gdaldriver_t { + int idx; + char *short_name; + char *long_name; + char *create_options; +}; + +#endif /* RT_API_H_INCLUDED */ diff -Nru postgis-1.5.3/raster/rt_pg/Makefile.in postgis-2.0.1/raster/rt_pg/Makefile.in --- postgis-1.5.3/raster/rt_pg/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/rt_pg/Makefile.in 2012-04-12 14:09:22.000000000 +0000 @@ -0,0 +1,111 @@ +############################################################################# +# $Id: Makefile.in 9639 2012-04-12 14:09:22Z strk $ +# +# Copyright (c) 2009-2011 Sandro Santilli +# +# This is free software; you can redistribute and/or modify it under +# the terms of the GNU General Public Licence. See the COPYING file. +# +############################################################################# + +POSTGIS_PGSQL_VERSION=@POSTGIS_PGSQL_VERSION@ + +MODULE_big=rtpostgis-@POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@ +MODULEDIR=contrib/postgis-@POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@ + +# Files to be copied to the contrib/ directory +DATA_built=rtpostgis.sql rtpostgis_upgrade_20_minor.sql uninstall_rtpostgis.sql rtpostgis_legacy.sql +DATA= + +# SQL preprocessor +SQLPP = @SQLPP@ + +# SQL objects (files requiring pre-processing) +SQL_OBJS=rtpostgis.sql.in rtpostgis_drop.sql.in rtpostgis_upgrade_cleanup.sql.in rtpostgis_legacy.sql.in + +# Objects to build using PGXS +OBJS=rt_pg.o + +# Libraries to link into the module (proj, geos) +# +# Note: we specify liblwgeom.a directly in SHLIB_LINK rather than using +# -L... -l options to prevent issues with some platforms trying to link +# to an existing liblwgeom.so in the PostgreSQL $libdir supplied by an +# older version of PostGIS, rather than with the static liblwgeom.a +# supplied with newer versions of PostGIS +# +LIBLWGEOM_LDFLAGS=../../liblwgeom/.libs/liblwgeom.a +LIBLWGEOM_CFLAGS="-I../../liblwgeom" +LIBPGCOMMON_CFLAGS="-I../../libpgcommon" +LIBPGCOMMON_LDFLAGS=../../libpgcommon/libpgcommon.a +LIBGDAL_CFLAGS=@LIBGDAL_CFLAGS@ +LIBGDAL_LDFLAGS=@LIBGDAL_LDFLAGS@ +LIBPROJ_CFLAGS=@PROJ_CPPFLAGS@ + +PG_CPPFLAGS+=@CPPFLAGS@ $(LIBLWGEOM_CFLAGS) $(LIBGDAL_CFLAGS) $(LIBPGCOMMON_CFLAGS) $(LIBPROJ_CFLAGS) -I../rt_core +SHLIB_LINK_F = ../rt_core/librtcore.a $(LIBLWGEOM_LDFLAGS) $(LIBPGCOMMON_LDFLAGS) $(LIBGDAL_LDFLAGS) @SHLIB_LINK@ + +# Extra files to remove during 'make clean' +EXTRA_CLEAN=$(SQL_OBJS) $(DATA_built) rtpostgis_upgrade.sql + +# PGXS information +PG_CONFIG = @PGCONFIG@ +PGXS := @PGXS@ +include $(PGXS) + +# Set PERL _after_ the include of PGXS +PERL=@PERL@ + +# This is to workaround a bug in PGXS 8.4 win32 link line, +# see http://trac.osgeo.org/postgis/ticket/1158#comment:57 +SHLIB_LINK := $(SHLIB_LINK_F) $(SHLIB_LINK) + +# PGXS override feature. The ability to allow PostGIS to install itself +# in a versioned directory is only available in PostgreSQL >= 8.5. To +# do this by default on older PostgreSQL versions, we need to override +# the existing PGXS targets. +# +# Once PostgreSQL 8.5 becomes the minimum supported version, this entire +# section and its associated Makefile.pgxs should be removed. +PGXSOVERRIDE = @PGXSOVERRIDE@ +ifeq ($(PGXSOVERRIDE),1) + include Makefile.pgxs +endif + +# If REGRESS=1 passed as a parameter, change the default install paths +# so that no prefix is included. This allows us to relocate to a temporary +# directory for regression testing. +ifeq ($(REGRESS),1) + bindir=/bin + pkglibdir=/lib + datadir=/share + datamoduledir=contrib/postgis +endif + +# Borrow the $libdir substitution from PGXS but customise by adding the version number +%.sql: %.sql.in + sed 's,MODULE_PATHNAME,$$libdir/rtpostgis-@POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@,g' $< >$@ + + +# Objects dependencies +$(OBJS): ../../liblwgeom/.libs/liblwgeom.a ../../libpgcommon/libpgcommon.a ../../postgis_config.h ../../postgis_svn_revision.h + +# Generate any .sql.in files from .sql.in.c files by running them through the SQL pre-processor +$(SQL_OBJS): %.in: %.in.c + $(SQLPP) -I../../postgis/ -I../../ $< | grep -v '^#' > $@ + +# SQL objects deps here +$(SQL_OBJS): ../../postgis/sqldefines.h ../../postgis_svn_revision.h + +#remove all create object types since these can't be done cleanly in an upgrade +rtpostgis_upgrade.sql: rtpostgis.sql + $(PERL) -0777 -ne 's/^(CREATE|ALTER) (CAST|OPERATOR|TYPE|TABLE|SCHEMA|DOMAIN|TRIGGER).*?;//msg;print;' $< > $@ + +rtpostgis_upgrade_20_minor.sql: rtpostgis_drop.sql rtpostgis_upgrade_cleanup.sql rtpostgis_upgrade.sql + cat $^ > $@ + +uninstall_rtpostgis.sql: rtpostgis.sql ../../utils/create_undef.pl + $(PERL) ../../utils/create_undef.pl $< $(POSTGIS_PGSQL_VERSION) > $@ + +distclean: clean + rm -f Makefile diff -Nru postgis-1.5.3/raster/rt_pg/Makefile.pgxs postgis-2.0.1/raster/rt_pg/Makefile.pgxs --- postgis-1.5.3/raster/rt_pg/Makefile.pgxs 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/rt_pg/Makefile.pgxs 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,102 @@ +# +# PostGIS PGXS override file for PostgreSQL <= 8.5 +# (updates relevant targets for MODULEDIR as per the +# PostgreSQL 8.5 PGXS Makefile) +# + +ifdef MODULEDIR +datamoduledir = $(MODULEDIR) +docmoduledir = $(MODULEDIR) +else +datamoduledir = contrib +docmoduledir = contrib +endif + +install: all installdirs +ifneq (,$(DATA)$(DATA_built)) + @for file in $(addprefix $(srcdir)/, $(DATA)) $(DATA_built); do \ + echo "$(INSTALL_DATA) $$file '$(DESTDIR)$(datadir)/$(datamoduledir)'"; \ + $(INSTALL_DATA) $$file '$(DESTDIR)$(datadir)/$(datamoduledir)'; \ + done +endif # DATA +ifneq (,$(DATA_TSEARCH)) + @for file in $(addprefix $(srcdir)/, $(DATA_TSEARCH)); do \ + echo "$(INSTALL_DATA) $$file '$(DESTDIR)$(datadir)/tsearch_data'"; \ + $(INSTALL_DATA) $$file '$(DESTDIR)$(datadir)/tsearch_data'; \ + done +endif # DATA_TSEARCH +ifdef MODULES + @for file in $(addsuffix $(DLSUFFIX), $(MODULES)); do \ + echo "$(INSTALL_SHLIB) $$file '$(DESTDIR)$(pkglibdir)'"; \ + $(INSTALL_SHLIB) $$file '$(DESTDIR)$(pkglibdir)'; \ + done +endif # MODULES +ifdef DOCS +ifdef docdir + @for file in $(addprefix $(srcdir)/, $(DOCS)); do \ + echo "$(INSTALL_DATA) $$file '$(DESTDIR)$(docdir)/$(docmoduledir)'"; \ + $(INSTALL_DATA) $$file '$(DESTDIR)$(docdir)/$(docmoduledir)'; \ + done +endif # docdir +endif # DOCS +ifdef PROGRAM + $(INSTALL_PROGRAM) $(PROGRAM)$(X) '$(DESTDIR)$(bindir)' +endif # PROGRAM +ifdef SCRIPTS + @for file in $(addprefix $(srcdir)/, $(SCRIPTS)); do \ + echo "$(INSTALL_SCRIPT) $$file '$(DESTDIR)$(bindir)'"; \ + $(INSTALL_SCRIPT) $$file '$(DESTDIR)$(bindir)'; \ + done +endif # SCRIPTS +ifdef SCRIPTS_built + @for file in $(SCRIPTS_built); do \ + echo "$(INSTALL_SCRIPT) $$file '$(DESTDIR)$(bindir)'"; \ + $(INSTALL_SCRIPT) $$file '$(DESTDIR)$(bindir)'; \ + done +endif # SCRIPTS_built +ifdef MODULE_big + $(INSTALL_SHLIB) $(shlib) '$(DESTDIR)$(pkglibdir)/$(MODULE_big)$(DLSUFFIX)' +endif # MODULE_big + +installdirs: +ifneq (,$(DATA)$(DATA_built)) + $(mkinstalldirs) '$(DESTDIR)$(datadir)/$(datamoduledir)' +endif +ifneq (,$(DATA_TSEARCH)) + $(mkinstalldirs) '$(DESTDIR)$(datadir)/tsearch_data' +endif +ifneq (,$(MODULES)) + $(mkinstalldirs) '$(DESTDIR)$(pkglibdir)' +endif +ifdef DOCS +ifdef docdir + $(mkinstalldirs) '$(DESTDIR)$(docdir)/$(docmoduledir)' +endif # docdir +endif # DOCS +ifneq (,$(PROGRAM)$(SCRIPTS)$(SCRIPTS_built)) + $(mkinstalldirs) '$(DESTDIR)$(bindir)' +endif + +uninstall: +ifneq (,$(DATA)$(DATA_built)) + rm -f $(addprefix '$(DESTDIR)$(datadir)/$(datamoduledir)'/, $(notdir $(DATA) $(DATA_built))) +endif +ifneq (,$(DATA_TSEARCH)) + rm -f $(addprefix '$(DESTDIR)$(datadir)/tsearch_data'/, $(notdir $(DATA_TSEARCH))) +endif +ifdef MODULES + rm -f $(addprefix '$(DESTDIR)$(pkglibdir)'/, $(addsuffix $(DLSUFFIX), $(MODULES))) +endif +ifdef DOCS + rm -f $(addprefix '$(DESTDIR)$(docdir)/$(docmoduledir)'/, $(DOCS)) +endif +ifdef PROGRAM + rm -f '$(DESTDIR)$(bindir)/$(PROGRAM)$(X)' +endif +ifdef SCRIPTS + rm -f $(addprefix '$(DESTDIR)$(bindir)'/, $(SCRIPTS)) +endif +ifdef SCRIPTS_built + rm -f $(addprefix '$(DESTDIR)$(bindir)'/, $(SCRIPTS_built)) +endif + diff -Nru postgis-1.5.3/raster/rt_pg/rt_pg.c postgis-2.0.1/raster/rt_pg/rt_pg.c --- postgis-1.5.3/raster/rt_pg/rt_pg.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/rt_pg/rt_pg.c 2012-06-21 20:17:57.000000000 +0000 @@ -0,0 +1,10510 @@ +/* + * $Id: rt_pg.c 9967 2012-06-21 20:17:57Z dustymugs $ + * + * WKTRaster - Raster Types for PostGIS + * http://www.postgis.org/support/wiki/index.php?WKTRasterHomePage + * + * Copyright (C) 2011-2012 Regents of the University of California + * + * Copyright (C) 2010-2011 Jorge Arevalo + * Copyright (C) 2010-2011 David Zwarg + * Copyright (C) 2009-2011 Pierre Racine + * Copyright (C) 2009-2011 Mateusz Loskot + * Copyright (C) 2008-2009 Sandro Santilli + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include +#include +#include +#include /* for strtod in RASTER_reclass */ +#include +#include +#include /* for isspace */ + +#include /* for palloc */ +#include +#include +#include +#include +#include +#include +#include /* for GetAttributeByName in RASTER_reclass */ +#include + +#include "../../postgis_config.h" + +#include "lwgeom_pg.h" +#include "rt_pg.h" +#include "pgsql_compat.h" + +#include /* for get_typlenbyvalalign */ +#include /* for ArrayType */ +#include /* for INT2OID, INT4OID, FLOAT4OID, FLOAT8OID and TEXTOID */ + +/* maximum char length required to hold any double or long long value */ +#define MAX_DBL_CHARLEN (3 + DBL_MANT_DIG - DBL_MIN_EXP) +#define MAX_INT_CHARLEN 32 + +/* + * This is required for builds against pgsql + */ +PG_MODULE_MAGIC; + +/*************************************************************** + * Internal functions must be prefixed with rtpg_. This is + * keeping inline with the use of pgis_ for ./postgis C utility + * functions. + ****************************************************************/ +/* Internal funcs */ +static char *rtpg_strreplace( + const char *str, + const char *oldstr, const char *newstr, + int *count +); +static char *rtpg_strtoupper(char *str); +static char *rtpg_chartrim(const char* input, char *remove); +static char **rtpg_strsplit(const char *str, const char *delimiter, int *n); +static char *rtpg_removespaces(char *str); +static char *rtpg_trim(const char* input); +static char *rtpg_getSR(int srid); + +/*************************************************************** + * Some rules for returning NOTICE or ERROR... + * + * Send an ERROR like: + * + * elog(ERROR, "RASTER_out: Could not deserialize raster"); + * + * only when: + * + * -something wrong happen with memory, + * -a function got an invalid argument ('3BUI' as pixel type) so that no row can + * be processed + * + * Send a NOTICE like: + * + * elog(NOTICE, "Invalid band index (must use 1-based). Returning NULL"); + * + * when arguments (e.g. x, y, band) are NULL or out of range so that some or + * most rows can be processed anyway + * + * in this case, + * for SET functions or function normally returning a modified raster, return + * the original raster + * for GET functions, return NULL + * try to deduce a valid parameter value if it makes sence (e.g. out of range + * index for addband) + * + * Do not put the name of the faulty function for NOTICEs, only with ERRORs. + * + ****************************************************************/ + +/****************************************************************************** + * Some notes on memory management... + * + * Every time a SQL function is called, PostgreSQL creates a new memory context. + * So, all the memory allocated with palloc/repalloc in that context is + * automatically free'd at the end of the function. If you want some data to + * live between function calls, you have 2 options: + * + * - Use fcinfo->flinfo->fn_mcxt contex to store the data (by pointing the + * data you want to keep with fcinfo->flinfo->fn_extra) + * - Use SRF funcapi, and storing the data at multi_call_memory_ctx (by pointing + * the data you want to keep with funcctx->user_fctx. funcctx is created by + * funcctx = SPI_FIRSTCALL_INIT()). Recommended way in functions returning rows, + * like RASTER_dumpAsPolygons (see section 34.9.9 at + * http://www.postgresql.org/docs/8.4/static/xfunc-c.html). + * + * But raster code follows the same philosophy than the rest of PostGIS: keep + * memory as clean as possible. So, we free all allocated memory. + * + * TODO: In case of functions returning NULL, we should free the memory too. + *****************************************************************************/ + +/* Prototypes */ + +/* Utility functions */ +Datum RASTER_lib_version(PG_FUNCTION_ARGS); +Datum RASTER_lib_build_date(PG_FUNCTION_ARGS); +Datum RASTER_gdal_version(PG_FUNCTION_ARGS); +Datum RASTER_minPossibleValue(PG_FUNCTION_ARGS); + +/* Input/output and format conversions */ +Datum RASTER_in(PG_FUNCTION_ARGS); +Datum RASTER_out(PG_FUNCTION_ARGS); + +Datum RASTER_to_bytea(PG_FUNCTION_ARGS); +Datum RASTER_to_binary(PG_FUNCTION_ARGS); + +/* Raster as geometry operations */ +Datum RASTER_convex_hull(PG_FUNCTION_ARGS); +Datum RASTER_dumpAsPolygons(PG_FUNCTION_ARGS); + +/* Get all the properties of a raster */ +Datum RASTER_getSRID(PG_FUNCTION_ARGS); +Datum RASTER_getWidth(PG_FUNCTION_ARGS); +Datum RASTER_getHeight(PG_FUNCTION_ARGS); +Datum RASTER_getNumBands(PG_FUNCTION_ARGS); +Datum RASTER_getXScale(PG_FUNCTION_ARGS); +Datum RASTER_getYScale(PG_FUNCTION_ARGS); +Datum RASTER_getXSkew(PG_FUNCTION_ARGS); +Datum RASTER_getYSkew(PG_FUNCTION_ARGS); +Datum RASTER_getXUpperLeft(PG_FUNCTION_ARGS); +Datum RASTER_getYUpperLeft(PG_FUNCTION_ARGS); +Datum RASTER_getPixelWidth(PG_FUNCTION_ARGS); +Datum RASTER_getPixelHeight(PG_FUNCTION_ARGS); +Datum RASTER_getGeotransform(PG_FUNCTION_ARGS); + +/* Set all the properties of a raster */ +Datum RASTER_setSRID(PG_FUNCTION_ARGS); +Datum RASTER_setScale(PG_FUNCTION_ARGS); +Datum RASTER_setScaleXY(PG_FUNCTION_ARGS); +Datum RASTER_setSkew(PG_FUNCTION_ARGS); +Datum RASTER_setSkewXY(PG_FUNCTION_ARGS); +Datum RASTER_setUpperLeftXY(PG_FUNCTION_ARGS); +Datum RASTER_setRotation(PG_FUNCTION_ARGS); +Datum RASTER_setGeotransform(PG_FUNCTION_ARGS); + +/* Get all the properties of a raster band */ +Datum RASTER_getBandPixelType(PG_FUNCTION_ARGS); +Datum RASTER_getBandPixelTypeName(PG_FUNCTION_ARGS); +Datum RASTER_getBandNoDataValue(PG_FUNCTION_ARGS); +Datum RASTER_getBandPath(PG_FUNCTION_ARGS); +Datum RASTER_bandIsNoData(PG_FUNCTION_ARGS); +Datum RASTER_isEmpty(PG_FUNCTION_ARGS); +Datum RASTER_hasNoBand(PG_FUNCTION_ARGS); + +/* Set all the properties of a raster band */ +Datum RASTER_setBandIsNoData(PG_FUNCTION_ARGS); +Datum RASTER_setBandNoDataValue(PG_FUNCTION_ARGS); + +/* Get pixel value */ +Datum RASTER_getPixelValue(PG_FUNCTION_ARGS); + +/* Set pixel value */ +Datum RASTER_setPixelValue(PG_FUNCTION_ARGS); + +/* Get pixel geographical shape */ +Datum RASTER_getPixelPolygon(PG_FUNCTION_ARGS); + +/* Raster and band creation */ +Datum RASTER_makeEmpty(PG_FUNCTION_ARGS); +Datum RASTER_addband(PG_FUNCTION_ARGS); +Datum RASTER_copyband(PG_FUNCTION_ARGS); + +/* Raster analysis */ +Datum RASTER_mapAlgebraExpr(PG_FUNCTION_ARGS); +Datum RASTER_mapAlgebraFct(PG_FUNCTION_ARGS); + +/* create new raster from existing raster's bands */ +Datum RASTER_band(PG_FUNCTION_ARGS); + +/* Get summary stats */ +Datum RASTER_summaryStats(PG_FUNCTION_ARGS); +Datum RASTER_summaryStatsCoverage(PG_FUNCTION_ARGS); + +/* get histogram */ +Datum RASTER_histogram(PG_FUNCTION_ARGS); +Datum RASTER_histogramCoverage(PG_FUNCTION_ARGS); + +/* get quantiles */ +Datum RASTER_quantile(PG_FUNCTION_ARGS); +Datum RASTER_quantileCoverage(PG_FUNCTION_ARGS); + +/* get counts of values */ +Datum RASTER_valueCount(PG_FUNCTION_ARGS); +Datum RASTER_valueCountCoverage(PG_FUNCTION_ARGS); + +/* reclassify specified bands of a raster */ +Datum RASTER_reclass(PG_FUNCTION_ARGS); + +/* convert raster to GDAL raster */ +Datum RASTER_asGDALRaster(PG_FUNCTION_ARGS); +Datum RASTER_getGDALDrivers(PG_FUNCTION_ARGS); + +/* rasterize a geometry */ +Datum RASTER_asRaster(PG_FUNCTION_ARGS); + +/* resample a raster */ +Datum RASTER_resample(PG_FUNCTION_ARGS); + +/* get raster's meta data */ +Datum RASTER_metadata(PG_FUNCTION_ARGS); + +/* get raster band's meta data */ +Datum RASTER_bandmetadata(PG_FUNCTION_ARGS); + +/* convert pixel/line to spatial coordinates */ +Datum RASTER_rasterToWorldCoord(PG_FUNCTION_ARGS); + +/* convert spatial coordinates to pixel/line*/ +Datum RASTER_worldToRasterCoord(PG_FUNCTION_ARGS); + +/* determine if two rasters intersect */ +Datum RASTER_intersects(PG_FUNCTION_ARGS); + +/* determine if two rasters are aligned */ +Datum RASTER_sameAlignment(PG_FUNCTION_ARGS); + +/* two-raster MapAlgebra */ +Datum RASTER_mapAlgebra2(PG_FUNCTION_ARGS); + +/* one-raster neighborhood MapAlgebra */ +Datum RASTER_mapAlgebraFctNgb(PG_FUNCTION_ARGS); + +/* string replacement function taken from + * http://ubuntuforums.org/showthread.php?s=aa6f015109fd7e4c7e30d2fd8b717497&t=141670&page=3 + */ +/* --------------------------------------------------------------------------- + Name : replace - Search & replace a substring by another one. + Creation : Thierry Husson, Sept 2010 + Parameters : + str : Big string where we search + oldstr : Substring we are looking for + newstr : Substring we want to replace with + count : Optional pointer to int (input / output value). NULL to ignore. + Input: Maximum replacements to be done. NULL or < 1 to do all. + Output: Number of replacements done or -1 if not enough memory. + Returns : Pointer to the new string or NULL if error. + Notes : + - Case sensitive - Otherwise, replace functions "strstr" by "strcasestr" + - Always allocates memory for the result. +--------------------------------------------------------------------------- */ +static char* +rtpg_strreplace( + const char *str, + const char *oldstr, const char *newstr, + int *count +) { + const char *tmp = str; + char *result; + int found = 0; + int length, reslen; + int oldlen = strlen(oldstr); + int newlen = strlen(newstr); + int limit = (count != NULL && *count > 0) ? *count : -1; + + tmp = str; + while ((tmp = strstr(tmp, oldstr)) != NULL && found != limit) + found++, tmp += oldlen; + + length = strlen(str) + found * (newlen - oldlen); + if ((result = (char *) palloc(length + 1)) == NULL) { + fprintf(stderr, "Not enough memory\n"); + found = -1; + } + else { + tmp = str; + limit = found; /* Countdown */ + reslen = 0; /* length of current result */ + + /* Replace each old string found with new string */ + while ((limit-- > 0) && (tmp = strstr(tmp, oldstr)) != NULL) { + length = (tmp - str); /* Number of chars to keep intouched */ + strncpy(result + reslen, str, length); /* Original part keeped */ + strcpy(result + (reslen += length), newstr); /* Insert new string */ + + reslen += newlen; + tmp += oldlen; + str = tmp; + } + strcpy(result + reslen, str); /* Copies last part and ending null char */ + } + + if (count != NULL) *count = found; + return result; +} + +static char * +rtpg_strtoupper(char * str) { + int j; + + for (j = strlen(str) - 1; j >= 0; j--) + str[j] = toupper(str[j]); + + return str; +} + +static char* +rtpg_chartrim(const char *input, char *remove) { + char *rtn = NULL; + char *ptr = NULL; + uint32_t offset = 0; + + if (!input) + return NULL; + else if (!*input) + return (char *) input; + + /* trim left */ + while (strchr(remove, *input) != NULL) + input++; + + /* trim right */ + ptr = ((char *) input) + strlen(input); + while (strchr(remove, *--ptr) != NULL) + offset++; + + rtn = palloc(sizeof(char) * (strlen(input) - offset + 1)); + if (rtn == NULL) { + fprintf(stderr, "Not enough memory\n"); + return NULL; + } + strncpy(rtn, input, strlen(input) - offset); + rtn[strlen(input) - offset] = '\0'; + + return rtn; +} + +/* split a string based on a delimiter */ +static char** +rtpg_strsplit(const char *str, const char *delimiter, int *n) { + char *tmp = NULL; + char **rtn = NULL; + char *token = NULL; + + *n = 0; + if (!str) + return NULL; + + /* copy str to tmp as strtok will mangle the string */ + tmp = palloc(sizeof(char) * (strlen(str) + 1)); + if (NULL == tmp) { + fprintf(stderr, "Not enough memory\n"); + return NULL; + } + strcpy(tmp, str); + + if (!strlen(tmp) || !delimiter || !strlen(delimiter)) { + *n = 1; + rtn = (char **) palloc(*n * sizeof(char *)); + if (NULL == rtn) { + fprintf(stderr, "Not enough memory\n"); + return NULL; + } + rtn[0] = (char *) palloc(sizeof(char) * (strlen(tmp) + 1)); + if (NULL == rtn[0]) { + fprintf(stderr, "Not enough memory\n"); + return NULL; + } + strcpy(rtn[0], tmp); + pfree(tmp); + return rtn; + } + + token = strtok(tmp, delimiter); + while (token != NULL) { + if (*n < 1) { + rtn = (char **) palloc(sizeof(char *)); + } + else { + rtn = (char **) repalloc(rtn, (*n + 1) * sizeof(char *)); + } + if (NULL == rtn) { + fprintf(stderr, "Not enough memory\n"); + return NULL; + } + + rtn[*n] = NULL; + rtn[*n] = (char *) palloc(sizeof(char) * (strlen(token) + 1)); + if (NULL == rtn[*n]) { + fprintf(stderr, "Not enough memory\n"); + return NULL; + } + + strcpy(rtn[*n], token); + *n = *n + 1; + + token = strtok(NULL, delimiter); + } + + pfree(tmp); + return rtn; +} + +static char * +rtpg_removespaces(char *str) { + char *rtn; + char *tmp; + + rtn = rtpg_strreplace(str, " ", "", NULL); + + tmp = rtpg_strreplace(rtn, "\n", "", NULL); + pfree(rtn); + rtn = rtpg_strreplace(tmp, "\t", "", NULL); + pfree(tmp); + tmp = rtpg_strreplace(rtn, "\f", "", NULL); + pfree(rtn); + rtn = rtpg_strreplace(tmp, "\r", "", NULL); + pfree(tmp); + + return rtn; +} + +static char* +rtpg_trim(const char *input) { + char *rtn; + char *ptr; + uint32_t offset = 0; + + if (!input) + return NULL; + else if (!*input) + return (char *) input; + + /* trim left */ + while (isspace(*input)) + input++; + + /* trim right */ + ptr = ((char *) input) + strlen(input); + while (isspace(*--ptr)) + offset++; + + rtn = palloc(sizeof(char) * (strlen(input) - offset + 1)); + if (rtn == NULL) { + fprintf(stderr, "Not enough memory\n"); + return NULL; + } + strncpy(rtn, input, strlen(input) - offset); + rtn[strlen(input) - offset] = '\0'; + + return rtn; +} + +static char* +rtpg_getSR(int srid) +{ + int i = 0; + int len = 0; + char *sql = NULL; + int spi_result; + TupleDesc tupdesc; + SPITupleTable *tuptable = NULL; + HeapTuple tuple; + char *tmp = NULL; + char *srs = NULL; + +/* +SELECT + CASE + WHEN (upper(auth_name) = 'EPSG' OR upper(auth_name) = 'EPSGA') AND length(COALESCE(auth_srid::text, '')) > 0 + THEN upper(auth_name) || ':' || auth_srid + WHEN length(COALESCE(auth_name, '') || COALESCE(auth_srid::text, '')) > 0 + THEN COALESCE(auth_name, '') || COALESCE(auth_srid::text, '') + ELSE '' + END, + proj4text, + srtext +FROM spatial_ref_sys +WHERE srid = X +LIMIT 1 +*/ + + len = sizeof(char) * (strlen("SELECT CASE WHEN (upper(auth_name) = 'EPSG' OR upper(auth_name) = 'EPSGA') AND length(COALESCE(auth_srid::text, '')) > 0 THEN upper(auth_name) || ':' || auth_srid WHEN length(COALESCE(auth_name, '') || COALESCE(auth_srid::text, '')) > 0 THEN COALESCE(auth_name, '') || COALESCE(auth_srid::text, '') ELSE '' END, proj4text, srtext FROM spatial_ref_sys WHERE srid = LIMIT 1") + MAX_INT_CHARLEN + 1); + sql = (char *) palloc(len); + if (NULL == sql) { + elog(ERROR, "rtpg_getSR: Unable to allocate memory for sql\n"); + return NULL; + } + + spi_result = SPI_connect(); + if (spi_result != SPI_OK_CONNECT) { + elog(ERROR, "rtpg_getSR: Could not connect to database using SPI\n"); + pfree(sql); + return NULL; + } + + /* execute query */ + snprintf(sql, len, "SELECT CASE WHEN (upper(auth_name) = 'EPSG' OR upper(auth_name) = 'EPSGA') AND length(COALESCE(auth_srid::text, '')) > 0 THEN upper(auth_name) || ':' || auth_srid WHEN length(COALESCE(auth_name, '') || COALESCE(auth_srid::text, '')) > 0 THEN COALESCE(auth_name, '') || COALESCE(auth_srid::text, '') ELSE '' END, proj4text, srtext FROM spatial_ref_sys WHERE srid = %d LIMIT 1", srid); + POSTGIS_RT_DEBUGF(4, "SRS query: %s", sql); + spi_result = SPI_execute(sql, TRUE, 0); + SPI_pfree(sql); + if (spi_result != SPI_OK_SELECT || SPI_tuptable == NULL || SPI_processed != 1) { + elog(ERROR, "rtpg_getSR: Cannot find SRID (%d) in spatial_ref_sys", srid); + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_finish(); + return NULL; + } + + tupdesc = SPI_tuptable->tupdesc; + tuptable = SPI_tuptable; + tuple = tuptable->vals[0]; + + /* which column to use? */ + for (i = 1; i < 4; i++) { + tmp = SPI_getvalue(tuple, tupdesc, i); + + /* value AND GDAL supports this SR */ + if ( + SPI_result != SPI_ERROR_NOATTRIBUTE && + SPI_result != SPI_ERROR_NOOUTFUNC && + tmp != NULL && + strlen(tmp) && + rt_util_gdal_supported_sr(tmp) + ) { + POSTGIS_RT_DEBUGF(4, "Value for column %d is %s", i, tmp); + + len = strlen(tmp) + 1; + srs = SPI_palloc(sizeof(char) * len); + if (NULL == srs) { + elog(ERROR, "rtpg_getSR: Unable to allocate memory for spatial reference text\n"); + pfree(tmp); + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_finish(); + return NULL; + } + strncpy(srs, tmp, len); + pfree(tmp); + + break; + } + + if (tmp != NULL) + pfree(tmp); + continue; + } + + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_finish(); + + /* unable to get SR info */ + if (srs == NULL) { + elog(ERROR, "rtpg_getSR: Unable to find a viable spatial reference for SRID (%d)", srid); + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_finish(); + return NULL; + } + + return srs; +} + +PG_FUNCTION_INFO_V1(RASTER_lib_version); +Datum RASTER_lib_version(PG_FUNCTION_ARGS) +{ + char ver[64]; + text *result; + + snprintf(ver, 64, "%s r%d", POSTGIS_LIB_VERSION, POSTGIS_SVN_REVISION); + ver[63] = '\0'; + + result = cstring2text(ver); + PG_RETURN_TEXT_P(result); +} + +PG_FUNCTION_INFO_V1(RASTER_lib_build_date); +Datum RASTER_lib_build_date(PG_FUNCTION_ARGS) +{ + char *ver = POSTGIS_BUILD_DATE; + text *result; + result = palloc(VARHDRSZ + strlen(ver)); + SET_VARSIZE(result, VARHDRSZ + strlen(ver)); + memcpy(VARDATA(result), ver, strlen(ver)); + PG_RETURN_POINTER(result); +} + +PG_FUNCTION_INFO_V1(RASTER_gdal_version); +Datum RASTER_gdal_version(PG_FUNCTION_ARGS) +{ + const char *ver = rt_util_gdal_version("--version"); + text *result; + + /* add indicator if GDAL isn't configured right */ + if (!rt_util_gdal_configured()) { + char *rtn = NULL; + rtn = palloc(strlen(ver) + strlen(" GDAL_DATA not found") + 1); + if (!rtn) + result = cstring2text(ver); + else { + sprintf(rtn, "%s GDAL_DATA not found", ver); + result = cstring2text(rtn); + pfree(rtn); + } + } + else + result = cstring2text(ver); + + PG_RETURN_POINTER(result); +} + +PG_FUNCTION_INFO_V1(RASTER_minPossibleValue); +Datum RASTER_minPossibleValue(PG_FUNCTION_ARGS) +{ + text *pixeltypetext = NULL; + char *pixeltypechar = NULL; + rt_pixtype pixtype = PT_END; + double pixsize = 0; + + if (PG_ARGISNULL(0)) + PG_RETURN_NULL(); + + pixeltypetext = PG_GETARG_TEXT_P(0); + pixeltypechar = text_to_cstring(pixeltypetext); + + pixtype = rt_pixtype_index_from_name(pixeltypechar); + if (pixtype == PT_END) { + elog(ERROR, "RASTER_minPossibleValue: Invalid pixel type: %s", pixeltypechar); + PG_RETURN_NULL(); + } + + pixsize = rt_pixtype_get_min_value(pixtype); + + /* + correct pixsize of unsigned pixel types + example: for PT_8BUI, the value is CHAR_MIN but if char is signed, + the value returned is -127 instead of 0. + */ + switch (pixtype) { + case PT_1BB: + case PT_2BUI: + case PT_4BUI: + case PT_8BUI: + case PT_16BUI: + case PT_32BUI: + pixsize = 0; + break; + default: + break; + } + + PG_RETURN_FLOAT8(pixsize); +} + +/** + * Input is a string with hex chars in it. + * Convert to binary and put in the result + */ +PG_FUNCTION_INFO_V1(RASTER_in); +Datum RASTER_in(PG_FUNCTION_ARGS) +{ + rt_raster raster; + char *hexwkb = PG_GETARG_CSTRING(0); + void *result = NULL; + + raster = rt_raster_from_hexwkb(hexwkb, strlen(hexwkb)); + result = rt_raster_serialize(raster); + + SET_VARSIZE(result, ((rt_pgraster*)result)->size); + + rt_raster_destroy(raster); + + if ( NULL != result ) + PG_RETURN_POINTER(result); + else + PG_RETURN_NULL(); +} + +/** + * Given a RASTER structure, convert it to Hex and put it in a string + */ +PG_FUNCTION_INFO_V1(RASTER_out); +Datum RASTER_out(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster = NULL; + rt_raster raster = NULL; + uint32_t hexwkbsize = 0; + char *hexwkb = NULL; + + if (PG_ARGISNULL(0)) PG_RETURN_NULL(); + pgraster = (rt_pgraster *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + + raster = rt_raster_deserialize(pgraster, FALSE); + if (!raster) { + elog(ERROR, "RASTER_out: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + hexwkb = rt_raster_to_hexwkb(raster, &hexwkbsize); + if (!hexwkb) { + elog(ERROR, "RASTER_out: Could not HEX-WKBize raster"); + rt_raster_destroy(raster); + PG_RETURN_NULL(); + } + + /* Free the raster objects used */ + rt_raster_destroy(raster); + + PG_RETURN_CSTRING(hexwkb); +} + +/** + * Return bytea object with raster in Well-Known-Binary form. + */ +PG_FUNCTION_INFO_V1(RASTER_to_bytea); +Datum RASTER_to_bytea(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster = NULL; + rt_raster raster = NULL; + uint8_t *wkb = NULL; + uint32_t wkb_size = 0; + bytea *result = NULL; + int result_size = 0; + + if (PG_ARGISNULL(0)) PG_RETURN_NULL(); + pgraster = (rt_pgraster *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + + /* Get raster object */ + raster = rt_raster_deserialize(pgraster, FALSE); + if (!raster) { + elog(ERROR, "RASTER_to_bytea: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + /* Parse raster to wkb object */ + wkb = rt_raster_to_wkb(raster, &wkb_size); + if (!wkb) { + elog(ERROR, "RASTER_to_bytea: Could not allocate and generate WKB data"); + rt_raster_destroy(raster); + PG_RETURN_NULL(); + } + + /* Create varlena object */ + result_size = wkb_size + VARHDRSZ; + result = (bytea *)palloc(result_size); + SET_VARSIZE(result, result_size); + memcpy(VARDATA(result), wkb, VARSIZE(result) - VARHDRSZ); + + /* Free raster objects used */ + rt_raster_destroy(raster); + pfree(wkb); + + PG_RETURN_POINTER(result); +} + +/** + * Return bytea object with raster requested using ST_AsBinary function. + */ +PG_FUNCTION_INFO_V1(RASTER_to_binary); +Datum RASTER_to_binary(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster = NULL; + rt_raster raster = NULL; + uint8_t *wkb = NULL; + uint32_t wkb_size = 0; + char *result = NULL; + int result_size = 0; + + if (PG_ARGISNULL(0)) PG_RETURN_NULL(); + pgraster = (rt_pgraster *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + + /* Get raster object */ + raster = rt_raster_deserialize(pgraster, FALSE); + if (!raster) { + elog(ERROR, "RASTER_to_binary: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + /* Parse raster to wkb object */ + wkb = rt_raster_to_wkb(raster, &wkb_size); + if (!wkb) { + elog(ERROR, "RASTER_to_binary: Could not allocate and generate WKB data"); + rt_raster_destroy(raster); + PG_RETURN_NULL(); + } + + /* Create varlena object */ + result_size = wkb_size + VARHDRSZ; + result = (char *)palloc(result_size); + SET_VARSIZE(result, result_size); + memcpy(VARDATA(result), wkb, VARSIZE(result) - VARHDRSZ); + + /* Free raster objects used */ + rt_raster_destroy(raster); + pfree(wkb); + + PG_RETURN_POINTER(result); +} + +/** + * Return the convex hull of this raster as a 4-vertices POLYGON. + */ +PG_FUNCTION_INFO_V1(RASTER_convex_hull); +Datum RASTER_convex_hull(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster; + rt_raster raster; + LWPOLY* convexhull = NULL; + GSERIALIZED* gser = NULL; + + if (PG_ARGISNULL(0)) PG_RETURN_NULL(); + pgraster = (rt_pgraster *) PG_DETOAST_DATUM_SLICE(PG_GETARG_DATUM(0), 0, sizeof(struct rt_raster_serialized_t)); + + { + raster = rt_raster_deserialize(pgraster, TRUE); + if ( ! raster ) { + elog(ERROR, "RASTER_convex_hull: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + convexhull = rt_raster_get_convex_hull(raster); + if ( ! convexhull ) { + elog(ERROR, "RASTER_convex_hull: Could not get raster's convex hull"); + rt_raster_destroy(raster); + PG_RETURN_NULL(); + } + } + + { + size_t gser_size; + gser = gserialized_from_lwgeom(lwpoly_as_lwgeom(convexhull), 0, &gser_size); + SET_VARSIZE(gser, gser_size); + } + + /* Free raster and lwgeom memory */ + rt_raster_destroy(raster); + lwfree(convexhull); + + PG_RETURN_POINTER(gser); +} + + +PG_FUNCTION_INFO_V1(RASTER_dumpAsPolygons); +Datum RASTER_dumpAsPolygons(PG_FUNCTION_ARGS) { + FuncCallContext *funcctx; + TupleDesc tupdesc; + rt_geomval geomval; + rt_geomval geomval2; + int call_cntr; + int max_calls; + + /* stuff done only on the first call of the function */ + if (SRF_IS_FIRSTCALL()) { + MemoryContext oldcontext; + int numbands; + rt_pgraster *pgraster = NULL; + rt_raster raster = NULL; + int nband; + int nElements; + + POSTGIS_RT_DEBUG(2, "RASTER_dumpAsPolygons first call"); + + /* create a function context for cross-call persistence */ + funcctx = SRF_FIRSTCALL_INIT(); + + /* switch to memory context appropriate for multiple function calls */ + oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx); + + /* Get input arguments */ + if (PG_ARGISNULL(0)) { + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + pgraster = (rt_pgraster *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + raster = rt_raster_deserialize(pgraster, FALSE); + if (!raster) { + ereport(ERROR, ( + errcode(ERRCODE_OUT_OF_MEMORY), + errmsg("Could not deserialize raster") + )); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + if (PG_NARGS() == 2) + nband = PG_GETARG_UINT32(1); + else + nband = 1; /* By default, first band */ + + POSTGIS_RT_DEBUGF(3, "band %d", nband); + numbands = rt_raster_get_num_bands(raster); + + if (nband < 1 || nband > numbands) { + elog(NOTICE, "Invalid band index (must use 1-based). Returning NULL"); + rt_raster_destroy(raster); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + /* Polygonize raster */ + + /** + * Dump raster + */ + geomval = rt_raster_gdal_polygonize(raster, nband - 1, &nElements); + rt_raster_destroy(raster); + if (NULL == geomval) { + ereport(ERROR, ( + errcode(ERRCODE_NO_DATA_FOUND), + errmsg("Could not polygonize raster") + )); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + POSTGIS_RT_DEBUGF(3, "raster dump, %d elements returned", nElements); + + /* Store needed information */ + funcctx->user_fctx = geomval; + + /* total number of tuples to be returned */ + funcctx->max_calls = nElements; + + /* Build a tuple descriptor for our result type */ + if (get_call_result_type(fcinfo, NULL, &tupdesc) != TYPEFUNC_COMPOSITE) { + ereport(ERROR, ( + errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg("function returning record called in context that cannot accept type record") + )); + } + + BlessTupleDesc(tupdesc); + funcctx->tuple_desc = tupdesc; + + MemoryContextSwitchTo(oldcontext); + } + + /* stuff done on every call of the function */ + funcctx = SRF_PERCALL_SETUP(); + + call_cntr = funcctx->call_cntr; + max_calls = funcctx->max_calls; + tupdesc = funcctx->tuple_desc; + geomval2 = funcctx->user_fctx; + + /* do when there is more left to send */ + if (call_cntr < max_calls) { + bool *nulls = NULL; + int values_length = 2; + Datum values[values_length]; + HeapTuple tuple; + Datum result; + + GSERIALIZED *gser = NULL; + size_t gser_size = 0; + + POSTGIS_RT_DEBUGF(3, "call number %d", call_cntr); + + nulls = palloc(sizeof(bool) * values_length); + memset(nulls, FALSE, values_length); + + /* convert LWGEOM to GSERIALIZED */ + gser = gserialized_from_lwgeom(lwpoly_as_lwgeom(geomval2[call_cntr].geom), 0, &gser_size); + lwgeom_free(lwpoly_as_lwgeom(geomval2[call_cntr].geom)); + + values[0] = PointerGetDatum(gser); + values[1] = Float8GetDatum(geomval2[call_cntr].val); + + /* build a tuple */ + tuple = heap_form_tuple(tupdesc, values, nulls); + + /* make the tuple into a datum */ + result = HeapTupleGetDatum(tuple); + + /* clean up (this is not really necessary) */ + pfree(nulls); + + SRF_RETURN_NEXT(funcctx, result); + } + /* do when there is no more left */ + else { + pfree(geomval2); + SRF_RETURN_DONE(funcctx); + } +} + +/** + * rt_MakeEmptyRaster( , , , , + * , , + * , , + * ) + */ +PG_FUNCTION_INFO_V1(RASTER_makeEmpty); +Datum RASTER_makeEmpty(PG_FUNCTION_ARGS) +{ + uint16 width, height; + double ipx, ipy, scalex, scaley, skewx, skewy; + int32_t srid; + rt_pgraster *pgraster; + rt_raster raster; + + if ( PG_NARGS() < 9 ) + { + elog(ERROR, "RASTER_makeEmpty: ST_MakeEmptyRaster requires 9 args"); + PG_RETURN_NULL(); + } + + if (PG_ARGISNULL(0)) + width = 0; + else + width = PG_GETARG_UINT16(0); + + if (PG_ARGISNULL(1)) + height = 0; + else + height = PG_GETARG_UINT16(1); + + if (PG_ARGISNULL(2)) + ipx = 0; + else + ipx = PG_GETARG_FLOAT8(2); + + if (PG_ARGISNULL(3)) + ipy = 0; + else + ipy = PG_GETARG_FLOAT8(3); + + if (PG_ARGISNULL(4)) + scalex = 0; + else + scalex = PG_GETARG_FLOAT8(4); + + if (PG_ARGISNULL(5)) + scaley = 0; + else + scaley = PG_GETARG_FLOAT8(5); + + if (PG_ARGISNULL(6)) + skewx = 0; + else + skewx = PG_GETARG_FLOAT8(6); + + if (PG_ARGISNULL(7)) + skewy = 0; + else + skewy = PG_GETARG_FLOAT8(7); + + if (PG_ARGISNULL(8)) + srid = SRID_UNKNOWN; + else + srid = PG_GETARG_INT32(8); + + POSTGIS_RT_DEBUGF(4, "%dx%d, ip:%g,%g, scale:%g,%g, skew:%g,%g srid:%d", + width, height, ipx, ipy, scalex, scaley, + skewx, skewy, srid); + + raster = rt_raster_new(width, height); + if ( ! raster ) { + PG_RETURN_NULL(); /* error was supposedly printed already */ + } + + rt_raster_set_scale(raster, scalex, scaley); + rt_raster_set_offsets(raster, ipx, ipy); + rt_raster_set_skews(raster, skewx, skewy); + rt_raster_set_srid(raster, srid); + + pgraster = rt_raster_serialize(raster); + rt_raster_destroy(raster); + if ( ! pgraster ) PG_RETURN_NULL(); + + SET_VARSIZE(pgraster, pgraster->size); + + PG_RETURN_POINTER(pgraster); +} + +/** + * Return the SRID associated with the raster. + */ +PG_FUNCTION_INFO_V1(RASTER_getSRID); +Datum RASTER_getSRID(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster; + rt_raster raster; + int32_t srid; + + if (PG_ARGISNULL(0)) PG_RETURN_NULL(); + pgraster = (rt_pgraster *) PG_DETOAST_DATUM_SLICE(PG_GETARG_DATUM(0), 0, sizeof(struct rt_raster_serialized_t)); + + raster = rt_raster_deserialize(pgraster, TRUE); + if ( ! raster ) { + elog(ERROR, "RASTER_getSRID: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + srid = rt_raster_get_srid(raster); + + rt_raster_destroy(raster); + + PG_RETURN_INT32(srid); +} + +/** + * Set the SRID associated with the raster. + */ +PG_FUNCTION_INFO_V1(RASTER_setSRID); +Datum RASTER_setSRID(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster = NULL; + rt_raster raster; + int32_t newSRID = PG_GETARG_INT32(1); + + if (PG_ARGISNULL(0)) PG_RETURN_NULL(); + pgraster = (rt_pgraster *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + + raster = rt_raster_deserialize(pgraster, FALSE); + if (!raster) { + elog(ERROR, "RASTER_setSRID: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + rt_raster_set_srid(raster, newSRID); + + pgraster = rt_raster_serialize(raster); + rt_raster_destroy(raster); + if (!pgraster) PG_RETURN_NULL(); + + SET_VARSIZE(pgraster, pgraster->size); + + PG_RETURN_POINTER(pgraster); +} + +/** + * Return the width of the raster. + */ +PG_FUNCTION_INFO_V1(RASTER_getWidth); +Datum RASTER_getWidth(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster; + rt_raster raster; + uint16_t width; + + if (PG_ARGISNULL(0)) PG_RETURN_NULL(); + pgraster = (rt_pgraster *) PG_DETOAST_DATUM_SLICE(PG_GETARG_DATUM(0), 0, sizeof(struct rt_raster_serialized_t)); + + raster = rt_raster_deserialize(pgraster, TRUE); + if ( ! raster ) { + elog(ERROR, "RASTER_getWidth: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + width = rt_raster_get_width(raster); + + rt_raster_destroy(raster); + + PG_RETURN_INT32(width); +} + +/** + * Return the height of the raster. + */ +PG_FUNCTION_INFO_V1(RASTER_getHeight); +Datum RASTER_getHeight(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster; + rt_raster raster; + uint16_t height; + + if (PG_ARGISNULL(0)) PG_RETURN_NULL(); + pgraster = (rt_pgraster *) PG_DETOAST_DATUM_SLICE(PG_GETARG_DATUM(0), 0, sizeof(struct rt_raster_serialized_t)); + + raster = rt_raster_deserialize(pgraster, TRUE); + if ( ! raster ) { + elog(ERROR, "RASTER_getHeight: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + height = rt_raster_get_height(raster); + + rt_raster_destroy(raster); + + PG_RETURN_INT32(height); +} + +/** + * Return the number of bands included in the raster. + */ +PG_FUNCTION_INFO_V1(RASTER_getNumBands); +Datum RASTER_getNumBands(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster; + rt_raster raster; + int32_t num_bands; + + if (PG_ARGISNULL(0)) PG_RETURN_NULL(); + pgraster = (rt_pgraster *) PG_DETOAST_DATUM_SLICE(PG_GETARG_DATUM(0), 0, sizeof(struct rt_raster_serialized_t)); + + raster = rt_raster_deserialize(pgraster, TRUE); + if ( ! raster ) { + elog(ERROR, "RASTER_getNumBands: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + num_bands = rt_raster_get_num_bands(raster); + + rt_raster_destroy(raster); + + PG_RETURN_INT32(num_bands); +} + +/** + * Return X scale from georeference of the raster. + */ +PG_FUNCTION_INFO_V1(RASTER_getXScale); +Datum RASTER_getXScale(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster; + rt_raster raster; + double xsize; + + if (PG_ARGISNULL(0)) PG_RETURN_NULL(); + pgraster = (rt_pgraster *) PG_DETOAST_DATUM_SLICE(PG_GETARG_DATUM(0), 0, sizeof(struct rt_raster_serialized_t)); + + raster = rt_raster_deserialize(pgraster, TRUE); + if ( ! raster ) { + elog(ERROR, "RASTER_getXScale: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + xsize = rt_raster_get_x_scale(raster); + + rt_raster_destroy(raster); + + PG_RETURN_FLOAT8(xsize); +} + +/** + * Return Y scale from georeference of the raster. + */ +PG_FUNCTION_INFO_V1(RASTER_getYScale); +Datum RASTER_getYScale(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster; + rt_raster raster; + double ysize; + + if (PG_ARGISNULL(0)) PG_RETURN_NULL(); + pgraster = (rt_pgraster *) PG_DETOAST_DATUM_SLICE(PG_GETARG_DATUM(0), 0, sizeof(struct rt_raster_serialized_t)); + + raster = rt_raster_deserialize(pgraster, TRUE); + if ( ! raster ) { + elog(ERROR, "RASTER_getYScale: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + ysize = rt_raster_get_y_scale(raster); + + rt_raster_destroy(raster); + + PG_RETURN_FLOAT8(ysize); +} + +/** + * Set the scale of the raster. + */ +PG_FUNCTION_INFO_V1(RASTER_setScale); +Datum RASTER_setScale(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster = NULL; + rt_raster raster; + double size = PG_GETARG_FLOAT8(1); + + if (PG_ARGISNULL(0)) PG_RETURN_NULL(); + pgraster = (rt_pgraster *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + raster = rt_raster_deserialize(pgraster, FALSE); + if (! raster ) { + elog(ERROR, "RASTER_setScale: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + rt_raster_set_scale(raster, size, size); + + pgraster = rt_raster_serialize(raster); + rt_raster_destroy(raster); + if ( ! pgraster ) PG_RETURN_NULL(); + + SET_VARSIZE(pgraster, pgraster->size); + + PG_RETURN_POINTER(pgraster); +} + +/** + * Set the pixel size of the raster. + */ +PG_FUNCTION_INFO_V1(RASTER_setScaleXY); +Datum RASTER_setScaleXY(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster = NULL; + rt_raster raster; + double xscale = PG_GETARG_FLOAT8(1); + double yscale = PG_GETARG_FLOAT8(2); + + if (PG_ARGISNULL(0)) PG_RETURN_NULL(); + pgraster = (rt_pgraster *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + raster = rt_raster_deserialize(pgraster, FALSE); + if (! raster ) { + elog(ERROR, "RASTER_setScaleXY: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + rt_raster_set_scale(raster, xscale, yscale); + + pgraster = rt_raster_serialize(raster); + rt_raster_destroy(raster); + if ( ! pgraster ) PG_RETURN_NULL(); + + SET_VARSIZE(pgraster, pgraster->size); + + PG_RETURN_POINTER(pgraster); +} + +/** + * Return value of the raster skew about the X axis. + */ +PG_FUNCTION_INFO_V1(RASTER_getXSkew); +Datum RASTER_getXSkew(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster; + rt_raster raster; + double xskew; + + if (PG_ARGISNULL(0)) PG_RETURN_NULL(); + pgraster = (rt_pgraster *) PG_DETOAST_DATUM_SLICE(PG_GETARG_DATUM(0), 0, sizeof(struct rt_raster_serialized_t)); + + raster = rt_raster_deserialize(pgraster, TRUE); + if ( ! raster ) { + elog(ERROR, "RASTER_getXSkew: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + xskew = rt_raster_get_x_skew(raster); + + rt_raster_destroy(raster); + + PG_RETURN_FLOAT8(xskew); +} + +/** + * Return value of the raster skew about the Y axis. + */ +PG_FUNCTION_INFO_V1(RASTER_getYSkew); +Datum RASTER_getYSkew(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster; + rt_raster raster; + double yskew; + + if (PG_ARGISNULL(0)) PG_RETURN_NULL(); + pgraster = (rt_pgraster *) PG_DETOAST_DATUM_SLICE(PG_GETARG_DATUM(0), 0, sizeof(struct rt_raster_serialized_t)); + + raster = rt_raster_deserialize(pgraster, TRUE); + if ( ! raster ) { + elog(ERROR, "RASTER_getYSkew: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + yskew = rt_raster_get_y_skew(raster); + + rt_raster_destroy(raster); + + PG_RETURN_FLOAT8(yskew); +} + +/** + * Set the skew of the raster. + */ +PG_FUNCTION_INFO_V1(RASTER_setSkew); +Datum RASTER_setSkew(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster = NULL; + rt_raster raster; + double skew = PG_GETARG_FLOAT8(1); + + if (PG_ARGISNULL(0)) PG_RETURN_NULL(); + pgraster = (rt_pgraster *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + raster = rt_raster_deserialize(pgraster, FALSE); + if (! raster ) { + elog(ERROR, "RASTER_setSkew: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + rt_raster_set_skews(raster, skew, skew); + + pgraster = rt_raster_serialize(raster); + rt_raster_destroy(raster); + if ( ! pgraster ) PG_RETURN_NULL(); + + SET_VARSIZE(pgraster, pgraster->size); + + PG_RETURN_POINTER(pgraster); +} + +/** + * Set the skew of the raster. + */ +PG_FUNCTION_INFO_V1(RASTER_setSkewXY); +Datum RASTER_setSkewXY(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster = NULL; + rt_raster raster; + double xskew = PG_GETARG_FLOAT8(1); + double yskew = PG_GETARG_FLOAT8(2); + + if (PG_ARGISNULL(0)) PG_RETURN_NULL(); + pgraster = (rt_pgraster *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + raster = rt_raster_deserialize(pgraster, FALSE); + if (! raster ) { + elog(ERROR, "RASTER_setSkewXY: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + rt_raster_set_skews(raster, xskew, yskew); + + pgraster = rt_raster_serialize(raster); + rt_raster_destroy(raster); + if ( ! pgraster ) PG_RETURN_NULL(); + + SET_VARSIZE(pgraster, pgraster->size); + + PG_RETURN_POINTER(pgraster); +} + +/** + * Return value of the raster offset in the X dimension. + */ +PG_FUNCTION_INFO_V1(RASTER_getXUpperLeft); +Datum RASTER_getXUpperLeft(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster; + rt_raster raster; + double xul; + + if (PG_ARGISNULL(0)) PG_RETURN_NULL(); + pgraster = (rt_pgraster *) PG_DETOAST_DATUM_SLICE(PG_GETARG_DATUM(0), 0, sizeof(struct rt_raster_serialized_t)); + + raster = rt_raster_deserialize(pgraster, TRUE); + if ( ! raster ) { + elog(ERROR, "RASTER_getXUpperLeft: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + xul = rt_raster_get_x_offset(raster); + + rt_raster_destroy(raster); + + PG_RETURN_FLOAT8(xul); +} + +/** + * Return value of the raster offset in the Y dimension. + */ +PG_FUNCTION_INFO_V1(RASTER_getYUpperLeft); +Datum RASTER_getYUpperLeft(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster; + rt_raster raster; + double yul; + + if (PG_ARGISNULL(0)) PG_RETURN_NULL(); + pgraster = (rt_pgraster *) PG_DETOAST_DATUM_SLICE(PG_GETARG_DATUM(0), 0, sizeof(struct rt_raster_serialized_t)); + + raster = rt_raster_deserialize(pgraster, TRUE); + if ( ! raster ) { + elog(ERROR, "RASTER_getYUpperLeft: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + yul = rt_raster_get_y_offset(raster); + + rt_raster_destroy(raster); + + PG_RETURN_FLOAT8(yul); +} + +/** + * Set the raster offset in the X and Y dimension. + */ +PG_FUNCTION_INFO_V1(RASTER_setUpperLeftXY); +Datum RASTER_setUpperLeftXY(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster = NULL; + rt_raster raster; + double xoffset = PG_GETARG_FLOAT8(1); + double yoffset = PG_GETARG_FLOAT8(2); + + if (PG_ARGISNULL(0)) PG_RETURN_NULL(); + pgraster = (rt_pgraster *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + raster = rt_raster_deserialize(pgraster, FALSE); + if (! raster ) { + elog(ERROR, "RASTER_setUpperLeftXY: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + rt_raster_set_offsets(raster, xoffset, yoffset); + + pgraster = rt_raster_serialize(raster); + rt_raster_destroy(raster); + if ( ! pgraster ) PG_RETURN_NULL(); + + SET_VARSIZE(pgraster, pgraster->size); + + PG_RETURN_POINTER(pgraster); +} + +/** + * Return the pixel width of the raster. The pixel width is + * a read-only, dynamically computed value derived from the + * X Scale and the Y Skew. + * + * Pixel Width = sqrt( X Scale * X Scale + Y Skew * Y Skew ) + */ +PG_FUNCTION_INFO_V1(RASTER_getPixelWidth); +Datum RASTER_getPixelWidth(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster; + rt_raster raster; + double xscale; + double yskew; + double pwidth; + + if (PG_ARGISNULL(0)) PG_RETURN_NULL(); + pgraster = (rt_pgraster *)PG_DETOAST_DATUM_SLICE(PG_GETARG_DATUM(0), 0, sizeof(struct rt_raster_serialized_t)); + + raster = rt_raster_deserialize(pgraster, TRUE); + if (!raster) { + elog(ERROR, "RASTER_getPixelWidth: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + xscale = rt_raster_get_x_scale(raster); + yskew = rt_raster_get_y_skew(raster); + pwidth = sqrt(xscale*xscale + yskew*yskew); + + rt_raster_destroy(raster); + + PG_RETURN_FLOAT8(pwidth); +} + +/** + * Return the pixel height of the raster. The pixel height is + * a read-only, dynamically computed value derived from the + * Y Scale and the X Skew. + * + * Pixel Height = sqrt( Y Scale * Y Scale + X Skew * X Skew ) + */ +PG_FUNCTION_INFO_V1(RASTER_getPixelHeight); +Datum RASTER_getPixelHeight(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster; + rt_raster raster; + double yscale; + double xskew; + double pheight; + + if (PG_ARGISNULL(0)) PG_RETURN_NULL(); + pgraster = (rt_pgraster *)PG_DETOAST_DATUM_SLICE(PG_GETARG_DATUM(0), 0, sizeof(struct rt_raster_serialized_t)); + + raster = rt_raster_deserialize(pgraster, TRUE); + if (!raster) { + elog(ERROR, "RASTER_getPixelHeight: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + yscale = rt_raster_get_y_scale(raster); + xskew = rt_raster_get_x_skew(raster); + pheight = sqrt(yscale*yscale + xskew*xskew); + + rt_raster_destroy(raster); + + PG_RETURN_FLOAT8(pheight); +} + +/** + * Set the geotransform of the supplied raster. Returns the raster. + */ +PG_FUNCTION_INFO_V1(RASTER_setGeotransform); +Datum RASTER_setGeotransform(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster ; + rt_raster raster ; + float8 imag, jmag, theta_i, theta_ij, xoffset, yoffset ; + + if (PG_ARGISNULL(0) || PG_ARGISNULL(1) || PG_ARGISNULL(2) || + PG_ARGISNULL(3) || PG_ARGISNULL(4) || + PG_ARGISNULL(5) || PG_ARGISNULL(6)) + PG_RETURN_NULL(); + + /* get the inputs */ + pgraster = (rt_pgraster *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + imag = PG_GETARG_FLOAT8(1) ; + jmag = PG_GETARG_FLOAT8(2) ; + theta_i = PG_GETARG_FLOAT8(3); + theta_ij = PG_GETARG_FLOAT8(4); + xoffset = PG_GETARG_FLOAT8(5); + yoffset = PG_GETARG_FLOAT8(6); + + raster = rt_raster_deserialize(pgraster, TRUE); + if (!raster) { + elog(ERROR, "RASTER_setGeotransform: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + /* store the new geotransform */ + rt_raster_set_phys_params(raster, imag,jmag,theta_i,theta_ij) ; + rt_raster_set_offsets(raster, xoffset, yoffset) ; + + /* prep the return value */ + pgraster = rt_raster_serialize(raster); + if ( ! pgraster ) PG_RETURN_NULL(); + + SET_VARSIZE(pgraster, pgraster->size); + + rt_raster_destroy(raster); + + PG_RETURN_POINTER(pgraster); +} + + +/** + * Calculates the physically relevant parameters of the supplied raster's + * geotransform. Returns them as a set. + */ +PG_FUNCTION_INFO_V1(RASTER_getGeotransform); +Datum RASTER_getGeotransform(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster = NULL; + rt_raster raster = NULL; + + double imag; + double jmag; + double theta_i; + double theta_ij; + /* + double xoffset; + double yoffset; + */ + + TupleDesc result_tuple; /* for returning a composite */ + bool *nulls = NULL; + int values_length = 6; + Datum values[values_length]; + HeapTuple heap_tuple ; /* instance of the tuple to return */ + Datum result; + + POSTGIS_RT_DEBUG(3, "RASTER_getGeotransform: Starting"); + + /* get argument */ + if (PG_ARGISNULL(0)) + PG_RETURN_NULL(); + pgraster = (rt_pgraster *)PG_DETOAST_DATUM_SLICE(PG_GETARG_DATUM(0), 0, sizeof(struct rt_raster_serialized_t)); + + /* raster */ + raster = rt_raster_deserialize(pgraster, TRUE); + if (!raster) { + elog(ERROR, "RASTER_getGeotransform: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + /* do the calculation */ + rt_raster_calc_phys_params( + rt_raster_get_x_scale(raster), + rt_raster_get_x_skew(raster), + rt_raster_get_y_skew(raster), + rt_raster_get_y_scale(raster), + &imag, &jmag, &theta_i, &theta_ij) ; + + rt_raster_destroy(raster); + + /* setup the return value infrastructure */ + if (get_call_result_type(fcinfo, NULL, &result_tuple) != TYPEFUNC_COMPOSITE) { + ereport(ERROR, ( + errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg("RASTER_getGeotransform(): function returning record called in context that cannot accept type record" + ) + )); + PG_RETURN_NULL(); + } + + BlessTupleDesc(result_tuple); + + /* get argument */ + /* prep the composite return value */ + /* construct datum array */ + values[0] = Float8GetDatum(imag); + values[1] = Float8GetDatum(jmag); + values[2] = Float8GetDatum(theta_i); + values[3] = Float8GetDatum(theta_ij); + values[4] = Float8GetDatum(rt_raster_get_x_offset(raster)); + values[5] = Float8GetDatum(rt_raster_get_y_offset(raster)); + + nulls = palloc(sizeof(bool) * values_length); + memset(nulls, FALSE, values_length); + + /* stick em on the heap */ + heap_tuple = heap_form_tuple(result_tuple, values, nulls); + + /* make the tuple into a datum */ + result = HeapTupleGetDatum(heap_tuple); + + /* clean up */ + pfree(nulls); + + PG_RETURN_DATUM(result); +} + + +/** + * Set the rotation of the raster. This method will change the X Scale, + * Y Scale, X Skew and Y Skew properties all at once to keep the rotations + * about the X and Y axis uniform. + * + * This method will set the rotation about the X axis and Y axis based on + * the pixel size. This pixel size may not be uniform if rasters have different + * skew values (the raster cells are diamond-shaped). If a raster has different + * skew values has a rotation set upon it, this method will remove the + * diamond distortions of the cells, as each axis will have the same rotation. + */ +PG_FUNCTION_INFO_V1(RASTER_setRotation); +Datum RASTER_setRotation(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster = NULL; + rt_raster raster; + double rotation = PG_GETARG_FLOAT8(1); + double imag, jmag, theta_i, theta_ij; + + if (PG_ARGISNULL(0)) PG_RETURN_NULL(); + pgraster = (rt_pgraster *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + + raster = rt_raster_deserialize(pgraster, FALSE); + if (! raster ) { + elog(ERROR, "RASTER_setRotation: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + /* preserve all defining characteristics of the grid except for rotation */ + rt_raster_get_phys_params(raster, &imag, &jmag, &theta_i, &theta_ij); + rt_raster_set_phys_params(raster, imag, jmag, rotation, theta_ij); + + pgraster = rt_raster_serialize(raster); + rt_raster_destroy(raster); + if ( ! pgraster ) PG_RETURN_NULL(); + + SET_VARSIZE(pgraster, pgraster->size); + + PG_RETURN_POINTER(pgraster); +} + +/** + * Return pixel type of the specified band of raster. + * Band index is 1-based. + */ +PG_FUNCTION_INFO_V1(RASTER_getBandPixelType); +Datum RASTER_getBandPixelType(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster = NULL; + rt_raster raster = NULL; + rt_band band = NULL; + rt_pixtype pixtype; + int32_t bandindex; + + /* Deserialize raster */ + if (PG_ARGISNULL(0)) PG_RETURN_NULL(); + pgraster = (rt_pgraster *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + + /* Index is 1-based */ + bandindex = PG_GETARG_INT32(1); + if ( bandindex < 1 ) { + elog(NOTICE, "Invalid band index (must use 1-based). Returning NULL"); + PG_RETURN_NULL(); + } + + raster = rt_raster_deserialize(pgraster, FALSE); + if ( ! raster ) { + elog(ERROR, "RASTER_getBandPixelType: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + /* Fetch requested band and its pixel type */ + band = rt_raster_get_band(raster, bandindex - 1); + if ( ! band ) { + elog(NOTICE, "Could not find raster band of index %d when getting pixel type. Returning NULL", bandindex); + rt_raster_destroy(raster); + PG_RETURN_NULL(); + } + + pixtype = rt_band_get_pixtype(band); + + rt_raster_destroy(raster); + + PG_RETURN_INT32(pixtype); +} + +/** + * Return name of pixel type of the specified band of raster. + * Band index is 1-based. + * NOTE: This is unofficial utility not included in the spec. + */ +PG_FUNCTION_INFO_V1(RASTER_getBandPixelTypeName); +Datum RASTER_getBandPixelTypeName(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster = NULL; + rt_raster raster = NULL; + rt_band band = NULL; + rt_pixtype pixtype; + int32_t bandindex; + const size_t name_size = 8; /* size of type name */ + size_t size = 0; + char *ptr = NULL; + text *result = NULL; + + /* Deserialize raster */ + if (PG_ARGISNULL(0)) PG_RETURN_NULL(); + pgraster = (rt_pgraster *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + + /* Index is 1-based */ + bandindex = PG_GETARG_INT32(1); + if ( bandindex < 1 ) { + elog(NOTICE, "Invalid band index (must use 1-based). Returning NULL"); + PG_RETURN_NULL(); + } + + raster = rt_raster_deserialize(pgraster, FALSE); + if ( ! raster ) { + elog(ERROR, "RASTER_getBandPixelTypeName: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + /* Fetch requested band and its pixel type */ + band = rt_raster_get_band(raster, bandindex - 1); + if ( ! band ) { + elog(NOTICE, "Could not find raster band of index %d when getting pixel type name. Returning NULL", bandindex); + rt_raster_destroy(raster); + PG_RETURN_NULL(); + } + + pixtype = rt_band_get_pixtype(band); + + result = palloc(VARHDRSZ + name_size); + /* We don't need to check for NULL pointer, because if out of memory, palloc + * exit via elog(ERROR). It never returns NULL. + */ + + memset(VARDATA(result), 0, name_size); + ptr = (char *)result + VARHDRSZ; + strcpy(ptr, rt_pixtype_name(pixtype)); + + size = VARHDRSZ + strlen(ptr); + SET_VARSIZE(result, size); + + rt_raster_destroy(raster); + + PG_RETURN_TEXT_P(result); +} + +/** + * Return nodata value of the specified band of raster. + * The value is always returned as FLOAT32 even if the pixel type is INTEGER. + */ +PG_FUNCTION_INFO_V1(RASTER_getBandNoDataValue); +Datum RASTER_getBandNoDataValue(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster = NULL; + rt_raster raster = NULL; + rt_band band = NULL; + int32_t bandindex; + double nodata; + + /* Deserialize raster */ + if (PG_ARGISNULL(0)) PG_RETURN_NULL(); + pgraster = (rt_pgraster *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + + /* Index is 1-based */ + bandindex = PG_GETARG_INT32(1); + if ( bandindex < 1 ) { + elog(NOTICE, "Invalid band index (must use 1-based). Returning NULL"); + PG_RETURN_NULL(); + } + + raster = rt_raster_deserialize(pgraster, FALSE); + if ( ! raster ) { + elog(ERROR, "RASTER_getBandNoDataValue: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + /* Fetch requested band and its nodata value */ + band = rt_raster_get_band(raster, bandindex - 1); + if ( ! band ) { + elog(NOTICE, "Could not find raster band of index %d when getting band nodata value. Returning NULL", bandindex); + rt_raster_destroy(raster); + PG_RETURN_NULL(); + } + + if ( ! rt_band_get_hasnodata_flag(band) ) { + /* Raster does not have a nodata value set so we return NULL */ + rt_raster_destroy(raster); + PG_RETURN_NULL(); + } + + nodata = rt_band_get_nodata(band); + + rt_raster_destroy(raster); + + PG_RETURN_FLOAT8(nodata); +} + + +/** + * Set the nodata value of the specified band of raster. + */ +PG_FUNCTION_INFO_V1(RASTER_setBandNoDataValue); +Datum RASTER_setBandNoDataValue(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster = NULL; + rt_raster raster = NULL; + rt_band band = NULL; + double nodata; + int32_t bandindex; + bool forcechecking = FALSE; + bool skipset = FALSE; + + /* Deserialize raster */ + if (PG_ARGISNULL(0)) PG_RETURN_NULL(); + pgraster = (rt_pgraster *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + + /* Check index is not NULL or smaller than 1 */ + if (PG_ARGISNULL(1)) + bandindex = -1; + else + bandindex = PG_GETARG_INT32(1); + if (bandindex < 1) { + elog(NOTICE, "Invalid band index (must use 1-based). Nodata value not set. Returning original raster"); + skipset = TRUE; + } + + raster = rt_raster_deserialize(pgraster, FALSE); + if (! raster) { + elog(ERROR, "RASTER_setBandNoDataValue: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + if (! skipset) { + assert(0 <= (bandindex - 1)); + /* Fetch requested band */ + band = rt_raster_get_band(raster, bandindex - 1); + if (! band) { + elog(NOTICE, "Could not find raster band of index %d when setting pixel value. Nodata value not set. Returning original raster", bandindex); + } + else { + if (!PG_ARGISNULL(3)) + forcechecking = PG_GETARG_BOOL(3); + + if (PG_ARGISNULL(2)) { + /* Set the hasnodata flag to FALSE */ + rt_band_set_hasnodata_flag(band, FALSE); + + POSTGIS_RT_DEBUGF(3, "Raster band %d does not have a nodata value", + bandindex); + } + else { + + /* Get the nodata value */ + nodata = PG_GETARG_FLOAT8(2); + + /* Set the band's nodata value */ + rt_band_set_nodata(band, nodata); + + /* Set the hasnodata flag to TRUE */ + rt_band_set_hasnodata_flag(band, TRUE); + + /* Recheck all pixels if requested */ + if (forcechecking) + rt_band_check_is_nodata(band); + } + } + } + + pgraster = rt_raster_serialize(raster); + rt_raster_destroy(raster); + if (! pgraster) PG_RETURN_NULL(); + + SET_VARSIZE(pgraster, pgraster->size); + + PG_RETURN_POINTER(pgraster); +} + +PG_FUNCTION_INFO_V1(RASTER_setBandIsNoData); +Datum RASTER_setBandIsNoData(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster = NULL; + rt_raster raster = NULL; + rt_band band = NULL; + int32_t bandindex; + + if (PG_ARGISNULL(0)) PG_RETURN_NULL(); + pgraster = (rt_pgraster *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + + raster = rt_raster_deserialize(pgraster, FALSE); + if ( ! raster ) { + elog(ERROR, "RASTER_setBandIsNoData: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + /* Check index is not NULL or smaller than 1 */ + if (PG_ARGISNULL(1)) + bandindex = -1; + else + bandindex = PG_GETARG_INT32(1); + + if (bandindex < 1) + elog(NOTICE, "Invalid band index (must use 1-based). Isnodata flag not set. Returning original raster"); + else { + + /* Fetch requested band */ + band = rt_raster_get_band(raster, bandindex - 1); + + if ( ! band ) + elog(NOTICE, "Could not find raster band of index %d. Isnodata flag not set. Returning original raster", bandindex); + else + /* Set the band's nodata value */ + rt_band_set_isnodata_flag(band, 1); + } + + /* Serialize raster again */ + pgraster = rt_raster_serialize(raster); + rt_raster_destroy(raster); + if ( ! pgraster ) PG_RETURN_NULL(); + + SET_VARSIZE(pgraster, pgraster->size); + + PG_RETURN_POINTER(pgraster); +} + +PG_FUNCTION_INFO_V1(RASTER_bandIsNoData); +Datum RASTER_bandIsNoData(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster = NULL; + rt_raster raster = NULL; + rt_band band = NULL; + int32_t bandindex; + bool forcechecking = FALSE; + bool bandisnodata = FALSE; + + /* Index is 1-based */ + bandindex = PG_GETARG_INT32(1); + if ( bandindex < 1 ) { + elog(NOTICE, "Invalid band index (must use 1-based). Returning NULL"); + PG_RETURN_NULL(); + } + + /* Deserialize raster */ + if (PG_ARGISNULL(0)) PG_RETURN_NULL(); + pgraster = (rt_pgraster *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + + raster = rt_raster_deserialize(pgraster, FALSE); + if ( ! raster ) { + elog(ERROR, "RASTER_bandIsNoData: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + /* Fetch requested band and its nodata value */ + band = rt_raster_get_band(raster, bandindex - 1); + if ( ! band ) { + elog(NOTICE, "Could not find raster band of index %d when determining if band is nodata. Returning NULL", bandindex); + rt_raster_destroy(raster); + PG_RETURN_NULL(); + } + + forcechecking = PG_GETARG_BOOL(2); + + bandisnodata = (forcechecking) ? + rt_band_check_is_nodata(band) : rt_band_get_isnodata_flag(band); + + rt_raster_destroy(raster); + + PG_RETURN_BOOL(bandisnodata); +} + + + +/** + * Return the path of the raster for out-db raster. + */ +PG_FUNCTION_INFO_V1(RASTER_getBandPath); +Datum RASTER_getBandPath(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster = NULL; + rt_raster raster = NULL; + rt_band band = NULL; + int32_t bandindex; + const char *bandpath; + text *result; + + /* Index is 1-based */ + bandindex = PG_GETARG_INT32(1); + if ( bandindex < 1 ) { + elog(NOTICE, "Invalid band index (must use 1-based). Returning NULL"); + PG_RETURN_NULL(); + } + + /* Deserialize raster */ + if (PG_ARGISNULL(0)) PG_RETURN_NULL(); + pgraster = (rt_pgraster *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + + raster = rt_raster_deserialize(pgraster, FALSE); + if ( ! raster ) { + elog(ERROR, "RASTER_getBandPath: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + /* Fetch requested band and its nodata value */ + band = rt_raster_get_band(raster, bandindex - 1); + if ( ! band ) { + elog(NOTICE, "Could not find raster band of index %d when getting band path. Returning NULL", bandindex); + rt_raster_destroy(raster); + PG_RETURN_NULL(); + } + + bandpath = rt_band_get_ext_path(band); + rt_band_destroy(band); + rt_raster_destroy(raster); + if ( ! bandpath ) + { + PG_RETURN_NULL(); + } + + result = (text *) palloc(VARHDRSZ + strlen(bandpath) + 1); + + SET_VARSIZE(result, VARHDRSZ + strlen(bandpath) + 1); + + strcpy((char *) VARDATA(result), bandpath); + + PG_RETURN_TEXT_P(result); +} + + +/** + * Return value of a single pixel. + * Pixel location is specified by 1-based index of Nth band of raster and + * X,Y coordinates (X <= RT_Width(raster) and Y <= RT_Height(raster)). + * + * TODO: Should we return NUMERIC instead of FLOAT8 ? + */ +PG_FUNCTION_INFO_V1(RASTER_getPixelValue); +Datum RASTER_getPixelValue(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster = NULL; + rt_raster raster = NULL; + rt_band band = NULL; + double pixvalue = 0; + int32_t bandindex = 0; + int32_t x = 0; + int32_t y = 0; + int result = 0; + bool hasnodata = TRUE; + + /* Index is 1-based */ + bandindex = PG_GETARG_INT32(1); + if ( bandindex < 1 ) { + elog(NOTICE, "Invalid band index (must use 1-based). Returning NULL"); + PG_RETURN_NULL(); + } + + x = PG_GETARG_INT32(2); + + y = PG_GETARG_INT32(3); + + hasnodata = PG_GETARG_BOOL(4); + + POSTGIS_RT_DEBUGF(3, "Pixel coordinates (%d, %d)", x, y); + + /* Deserialize raster */ + if (PG_ARGISNULL(0)) PG_RETURN_NULL(); + pgraster = (rt_pgraster *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + + raster = rt_raster_deserialize(pgraster, FALSE); + if (!raster) { + elog(ERROR, "RASTER_getPixelValue: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + /* Fetch Nth band using 0-based internal index */ + band = rt_raster_get_band(raster, bandindex - 1); + if (! band) { + elog(NOTICE, "Could not find raster band of index %d when getting pixel " + "value. Returning NULL", bandindex); + rt_raster_destroy(raster); + PG_RETURN_NULL(); + } + /* Fetch pixel using 0-based coordinates */ + result = rt_band_get_pixel(band, x - 1, y - 1, &pixvalue); + + /* If the result is -1 or the value is nodata and we take nodata into account + * then return nodata = NULL */ + if (result == -1 || (hasnodata && rt_band_get_hasnodata_flag(band) && + pixvalue == rt_band_get_nodata(band))) { + rt_raster_destroy(raster); + PG_RETURN_NULL(); + } + + rt_raster_destroy(raster); + + PG_RETURN_FLOAT8(pixvalue); +} + +/** + * Write value of raster sample on given position and in specified band. + */ +PG_FUNCTION_INFO_V1(RASTER_setPixelValue); +Datum RASTER_setPixelValue(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster = NULL; + rt_raster raster = NULL; + rt_band band = NULL; + double pixvalue = 0; + int32_t bandindex = 0; + int32_t x = 0; + int32_t y = 0; + bool skipset = FALSE; + + if (PG_ARGISNULL(0)) { + PG_RETURN_NULL(); + } + + /* Check index is not NULL or < 1 */ + if (PG_ARGISNULL(1)) + bandindex = -1; + else + bandindex = PG_GETARG_INT32(1); + if ( bandindex < 1 ) { + elog(NOTICE, "Invalid band index (must use 1-based). Value not set. " + "Returning original raster"); + skipset = TRUE; + } + + /* Validate pixel coordinates are not null */ + if (PG_ARGISNULL(2)) { + elog(NOTICE, "X coordinate can not be NULL when getting pixel value. " + "Value not set. Returning original raster"); + skipset = TRUE; + } + else + x = PG_GETARG_INT32(2); + + if (PG_ARGISNULL(3)) { + elog(NOTICE, "Y coordinate can not be NULL when getting pixel value. " + "Value not set. Returning original raster"); + skipset = TRUE; + } + else + y = PG_GETARG_INT32(3); + + POSTGIS_RT_DEBUGF(3, "Pixel coordinates (%d, %d)", x, y); + + /* Deserialize raster */ + pgraster = (rt_pgraster *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + + raster = rt_raster_deserialize(pgraster, FALSE); + if ( ! raster ) { + elog(ERROR, "RASTER_setPixelValue: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + if (! skipset) { + /* Fetch requested band */ + band = rt_raster_get_band(raster, bandindex - 1); + if ( ! band ) { + elog(NOTICE, "Could not find raster band of index %d when setting " + "pixel value. Value not set. Returning original raster", + bandindex); + } + else { + /* Set the pixel value */ + if (PG_ARGISNULL(4)) { + if (!rt_band_get_hasnodata_flag(band)) { + elog(NOTICE, "Raster do not have a nodata value defined. " + "Set band nodata value first. Nodata value not set. " + "Returning original raster"); + } + else { + pixvalue = rt_band_get_nodata(band); + rt_band_set_pixel(band, x - 1, y - 1, pixvalue); + } + } + else { + pixvalue = PG_GETARG_FLOAT8(4); + rt_band_set_pixel(band, x - 1, y - 1, pixvalue); + } + } + } + + pgraster = rt_raster_serialize(raster); + rt_raster_destroy(raster); + if ( ! pgraster ) PG_RETURN_NULL(); + + SET_VARSIZE(pgraster, pgraster->size); + + PG_RETURN_POINTER(pgraster); +} + +/** + * Return the geographical shape of a single pixel. + * Pixel location is specified by + * X,Y coordinates (X <= RT_Width(raster) and Y <= RT_Height(raster)). + * + */ +PG_FUNCTION_INFO_V1(RASTER_getPixelPolygon); +Datum RASTER_getPixelPolygon(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster = NULL; + rt_raster raster = NULL; + LWPOLY *poly; + int32_t x = 0; + int32_t y = 0; + GSERIALIZED* gser = NULL; + + + /* Deserialize raster */ + pgraster = (rt_pgraster *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + + x = PG_GETARG_INT32(1); + + y = PG_GETARG_INT32(2); + + POSTGIS_RT_DEBUGF(3, "Pixel coordinates (%d, %d)", x, y); + + raster = rt_raster_deserialize(pgraster, FALSE); + if (!raster) { + elog(ERROR, "RASTER_getPixelPolygon: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + /* Fetch pixel shape */ + poly = rt_raster_pixel_as_polygon(raster, x - 1, y - 1); + if (!poly) { + elog(ERROR, "RASTER_getPixelPolygon: could not get raster's pixel polygon"); + rt_raster_destroy(raster); + PG_RETURN_NULL(); + } + + { + size_t gser_size; + gser = gserialized_from_lwgeom(lwpoly_as_lwgeom(poly), 0, &gser_size); + SET_VARSIZE(gser, gser_size); + } + + rt_raster_destroy(raster); + lwfree(poly); + + PG_RETURN_POINTER(gser); +} + +/** + * Add a band to the given raster at the given position. + */ +PG_FUNCTION_INFO_V1(RASTER_addband); +Datum RASTER_addband(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster = NULL; + rt_raster raster = NULL; + + int bandindex = 0; + double initialvalue = 0; + double nodatavalue = 0; + bool hasnodata = FALSE; + bool skipaddband = FALSE; + + text *pixeltypename = NULL; + char *new_pixeltypename = NULL; + + rt_pixtype pixtype = PT_END; + int32_t oldnumbands = 0; + int32_t numbands = 0; + + /* Get the initial pixel value */ + if (PG_ARGISNULL(3)) + initialvalue = 0; + else + initialvalue = PG_GETARG_FLOAT8(3); + + /* Get the nodata value */ + if (PG_ARGISNULL(4)) + nodatavalue = 0; + else + { + nodatavalue = PG_GETARG_FLOAT8(4); + hasnodata = TRUE; + } + + /* Deserialize raster */ + if (PG_ARGISNULL(0)) PG_RETURN_NULL(); + pgraster = (rt_pgraster *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + + /* Get the pixel type in text form */ + if (PG_ARGISNULL(2)) { + elog(ERROR, "RASTER_addband: Pixel type can not be NULL"); + PG_RETURN_NULL(); + } + + pixeltypename = PG_GETARG_TEXT_P(2); + new_pixeltypename = text_to_cstring(pixeltypename); + + /* Get the pixel type index */ + pixtype = rt_pixtype_index_from_name(new_pixeltypename); + if ( pixtype == PT_END ) { + elog(ERROR, "RASTER_addband: Invalid pixel type: %s", new_pixeltypename); + PG_RETURN_NULL(); + } + + raster = rt_raster_deserialize(pgraster, FALSE); + if ( ! raster ) { + elog(ERROR, "RASTER_addband: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + /* Make sure index (1 based) is in a valid range */ + oldnumbands = rt_raster_get_num_bands(raster); + if (PG_ARGISNULL(1)) + bandindex = oldnumbands + 1; + else + { + bandindex = PG_GETARG_INT32(1); + if (bandindex < 1) { + elog(NOTICE, "Invalid band index (must use 1-based). Band not added. " + "Returning original raster"); + skipaddband = TRUE; + } + if (bandindex > oldnumbands + 1) { + elog(NOTICE, "RASTER_addband: Band index number exceed possible " + "values, truncated to number of band (%u) + 1", oldnumbands); + bandindex = oldnumbands + 1; + } + } + + if (!skipaddband) { + bandindex = rt_raster_generate_new_band(raster, pixtype, initialvalue, + hasnodata, nodatavalue, + bandindex - 1); + + numbands = rt_raster_get_num_bands(raster); + if (numbands == oldnumbands || bandindex == -1) { + elog(ERROR, "RASTER_addband: Could not add band to raster. " + "Returning NULL"); + rt_raster_destroy(raster); + PG_RETURN_NULL(); + } + } + + pgraster = rt_raster_serialize(raster); + rt_raster_destroy(raster); + if (!pgraster) PG_RETURN_NULL(); + + SET_VARSIZE(pgraster, pgraster->size); + + PG_RETURN_POINTER(pgraster); +} + + +/** + * Copy a band from one raster to another one at the given position. + */ +PG_FUNCTION_INFO_V1(RASTER_copyband); +Datum RASTER_copyband(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster = NULL; + rt_raster torast = NULL; + rt_raster fromrast = NULL; + int toindex = 0; + int fromband = 0; + int oldtorastnumbands = 0; + int newtorastnumbands = 0; + int newbandindex = 0; + + /* Deserialize torast */ + if (PG_ARGISNULL(0)) PG_RETURN_NULL(); + pgraster = (rt_pgraster *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + + torast = rt_raster_deserialize(pgraster, FALSE); + if (!torast) { + elog(ERROR, "RASTER_copyband: Could not deserialize first raster"); + PG_RETURN_NULL(); + } + + /* Deserialize fromrast */ + if (!PG_ARGISNULL(1)) { + pgraster = (rt_pgraster *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1)); + + fromrast = rt_raster_deserialize(pgraster, FALSE); + if (!fromrast) { + elog(ERROR, "RASTER_copyband: Could not deserialize second raster"); + rt_raster_destroy(torast); + PG_RETURN_NULL(); + } + + oldtorastnumbands = rt_raster_get_num_bands(torast); + + if (PG_ARGISNULL(2)) + fromband = 1; + else + fromband = PG_GETARG_INT32(2); + + if (PG_ARGISNULL(3)) + toindex = oldtorastnumbands + 1; + else + toindex = PG_GETARG_INT32(3); + + /* Copy band fromrast torast */ + newbandindex = rt_raster_copy_band( + torast, fromrast, + fromband - 1, toindex - 1 + ); + + newtorastnumbands = rt_raster_get_num_bands(torast); + if (newtorastnumbands == oldtorastnumbands || newbandindex == -1) { + elog(NOTICE, "RASTER_copyband: Could not add band to raster. " + "Returning original raster." + ); + } + + rt_raster_destroy(fromrast); + } + + /* Serialize and return torast */ + pgraster = rt_raster_serialize(torast); + rt_raster_destroy(torast); + if (!pgraster) PG_RETURN_NULL(); + + SET_VARSIZE(pgraster, pgraster->size); + PG_RETURN_POINTER(pgraster); +} + +/** + * Check if raster is empty or not + */ +PG_FUNCTION_INFO_V1(RASTER_isEmpty); +Datum RASTER_isEmpty(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster = NULL; + rt_raster raster = NULL; + bool isempty = FALSE; + + /* Deserialize raster */ + if (PG_ARGISNULL(0)) PG_RETURN_NULL(); + pgraster = (rt_pgraster *) PG_DETOAST_DATUM_SLICE(PG_GETARG_DATUM(0), 0, sizeof(struct rt_raster_serialized_t)); + + raster = rt_raster_deserialize(pgraster, TRUE); + if ( ! raster ) + { + ereport(ERROR, + (errcode(ERRCODE_OUT_OF_MEMORY), + errmsg("RASTER_isEmpty: Could not deserialize raster"))); + PG_RETURN_NULL(); + } + + isempty = rt_raster_is_empty(raster); + + rt_raster_destroy(raster); + + PG_RETURN_BOOL(isempty); +} + +/** + * Check if the raster has a given band or not + */ +PG_FUNCTION_INFO_V1(RASTER_hasNoBand); +Datum RASTER_hasNoBand(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster = NULL; + rt_raster raster = NULL; + int bandindex = 0; + bool hasnoband = FALSE; + + /* Deserialize raster */ + if (PG_ARGISNULL(0)) PG_RETURN_NULL(); + pgraster = (rt_pgraster *) PG_DETOAST_DATUM_SLICE(PG_GETARG_DATUM(0), 0, sizeof(struct rt_raster_serialized_t)); + + raster = rt_raster_deserialize(pgraster, TRUE); + if ( ! raster ) + { + ereport(ERROR, + (errcode(ERRCODE_OUT_OF_MEMORY), + errmsg("RASTER_hasNoBand: Could not deserialize raster"))); + PG_RETURN_NULL(); + } + + /* Get band number */ + bandindex = PG_GETARG_INT32(1); + hasnoband = rt_raster_has_no_band(raster, bandindex - 1); + + rt_raster_destroy(raster); + + PG_RETURN_BOOL(hasnoband); +} + +PG_FUNCTION_INFO_V1(RASTER_mapAlgebraExpr); +Datum RASTER_mapAlgebraExpr(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster = NULL; + rt_raster raster = NULL; + rt_raster newrast = NULL; + rt_band band = NULL; + rt_band newband = NULL; + int x, y, nband, width, height; + double r; + double newnodatavalue = 0.0; + double newinitialvalue = 0.0; + double newval = 0.0; + char *newexpr = NULL; + char *initexpr = NULL; + char *expression = NULL; + int hasnodataval = 0; + double nodataval = 0.; + rt_pixtype newpixeltype; + int skipcomputation = 0; + int len = 0; + const int argkwcount = 3; + enum KEYWORDS { kVAL=0, kX=1, kY=2 }; + char *argkw[] = {"[rast]", "[rast.x]", "[rast.y]"}; + Oid argkwtypes[] = { FLOAT8OID, INT4OID, INT4OID }; + int argcount = 0; + Oid argtype[] = { FLOAT8OID, INT4OID, INT4OID }; + uint8_t argpos[3] = {0}; + char place[5]; + int idx = 0; + int ret = -1; + TupleDesc tupdesc; + SPIPlanPtr spi_plan = NULL; + SPITupleTable * tuptable = NULL; + HeapTuple tuple; + char * strFromText = NULL; + Datum *values = NULL; + Datum datum = (Datum)NULL; + char *nulls = NULL; + bool isnull = FALSE; + int i = 0; + int j = 0; + + POSTGIS_RT_DEBUG(2, "RASTER_mapAlgebraExpr: Starting..."); + + /* Check raster */ + if (PG_ARGISNULL(0)) { + elog(NOTICE, "Raster is NULL. Returning NULL"); + PG_RETURN_NULL(); + } + + + /* Deserialize raster */ + pgraster = (rt_pgraster *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + raster = rt_raster_deserialize(pgraster, FALSE); + if (NULL == raster) { + elog(ERROR, "RASTER_mapAlgebraExpr: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + POSTGIS_RT_DEBUG(3, "RASTER_mapAlgebraExpr: Getting arguments..."); + + if (PG_ARGISNULL(1)) + nband = 1; + else + nband = PG_GETARG_INT32(1); + + if (nband < 1) + nband = 1; + + + POSTGIS_RT_DEBUG(3, "RASTER_mapAlgebraExpr: Creating new empty raster..."); + + /** + * Create a new empty raster with having the same georeference as the + * provided raster + **/ + width = rt_raster_get_width(raster); + height = rt_raster_get_height(raster); + + newrast = rt_raster_new(width, height); + + if ( NULL == newrast ) { + elog(ERROR, "RASTER_mapAlgebraExpr: Could not create a new raster. " + "Returning NULL"); + PG_RETURN_NULL(); + } + + rt_raster_set_scale(newrast, + rt_raster_get_x_scale(raster), + rt_raster_get_y_scale(raster)); + + rt_raster_set_offsets(newrast, + rt_raster_get_x_offset(raster), + rt_raster_get_y_offset(raster)); + + rt_raster_set_skews(newrast, + rt_raster_get_x_skew(raster), + rt_raster_get_y_skew(raster)); + + rt_raster_set_srid(newrast, rt_raster_get_srid(raster)); + + + /** + * If this new raster is empty (width = 0 OR height = 0) then there is + * nothing to compute and we return it right now + **/ + if (rt_raster_is_empty(newrast)) + { + elog(NOTICE, "Raster is empty. Returning an empty raster"); + rt_raster_destroy(raster); + + pgraster = rt_raster_serialize(newrast); + if (NULL == pgraster) { + + elog(ERROR, "RASTER_mapAlgebraExpr: Could not serialize raster. " + "Returning NULL"); + PG_RETURN_NULL(); + } + + SET_VARSIZE(pgraster, pgraster->size); + rt_raster_destroy(newrast); + + PG_RETURN_POINTER(pgraster); + } + + + POSTGIS_RT_DEBUGF(3, "RASTER_mapAlgebraExpr: Getting raster band %d...", nband); + + /** + * Check if the raster has the required band. Otherwise, return a raster + * without band + **/ + if (rt_raster_has_no_band(raster, nband - 1)) { + elog(NOTICE, "Raster does not have the required band. Returning a raster " + "without a band"); + rt_raster_destroy(raster); + + pgraster = rt_raster_serialize(newrast); + if (NULL == pgraster) { + elog(ERROR, "RASTER_mapAlgebraExpr: Could not serialize raster. " + "Returning NULL"); + PG_RETURN_NULL(); + } + + SET_VARSIZE(pgraster, pgraster->size); + rt_raster_destroy(newrast); + + PG_RETURN_POINTER(pgraster); + } + + /* Get the raster band */ + band = rt_raster_get_band(raster, nband - 1); + if ( NULL == band ) { + elog(NOTICE, "Could not get the required band. Returning a raster " + "without a band"); + rt_raster_destroy(raster); + + pgraster = rt_raster_serialize(newrast); + if (NULL == pgraster) { + elog(ERROR, "RASTER_mapAlgebraExpr: Could not serialize raster. " + "Returning NULL"); + PG_RETURN_NULL(); + } + + SET_VARSIZE(pgraster, pgraster->size); + + rt_raster_destroy(newrast); + + PG_RETURN_POINTER(pgraster); + } + + /* + * Get NODATA value + */ + POSTGIS_RT_DEBUG(3, "RASTER_mapAlgebraExpr: Getting NODATA value for band..."); + + if (rt_band_get_hasnodata_flag(band)) { + newnodatavalue = rt_band_get_nodata(band); + } + + else { + newnodatavalue = rt_band_get_min_value(band); + } + + POSTGIS_RT_DEBUGF(3, "RASTER_mapAlgebraExpr: NODATA value for band: = %f", + newnodatavalue); + + /** + * We set the initial value of the future band to nodata value. If nodata + * value is null, then the raster will be initialized to + * rt_band_get_min_value but all the values should be recomputed anyway + **/ + newinitialvalue = newnodatavalue; + + /** + * Set the new pixeltype + **/ + POSTGIS_RT_DEBUG(3, "RASTER_mapAlgebraExpr: Setting pixeltype..."); + + if (PG_ARGISNULL(2)) { + newpixeltype = rt_band_get_pixtype(band); + } + + else { + strFromText = text_to_cstring(PG_GETARG_TEXT_P(2)); + newpixeltype = rt_pixtype_index_from_name(strFromText); + lwfree(strFromText); + if (newpixeltype == PT_END) + newpixeltype = rt_band_get_pixtype(band); + } + + if (newpixeltype == PT_END) { + elog(ERROR, "RASTER_mapAlgebraExpr: Invalid pixeltype. Returning NULL"); + PG_RETURN_NULL(); + } + + POSTGIS_RT_DEBUGF(3, "RASTER_mapAlgebraExpr: Pixeltype set to %s", + rt_pixtype_name(newpixeltype)); + + + /* Construct expression for raster values */ + if (!PG_ARGISNULL(3)) { + expression = text_to_cstring(PG_GETARG_TEXT_P(3)); + len = strlen("SELECT (") + strlen(expression) + strlen(")::double precision"); + initexpr = (char *)palloc(len + 1); + + strncpy(initexpr, "SELECT (", strlen("SELECT (")); + strncpy(initexpr + strlen("SELECT ("), expression, strlen(expression)); + strncpy(initexpr + strlen("SELECT (") + strlen(expression), ")::double precision", strlen(")::double precision")); + initexpr[len] = '\0'; + + POSTGIS_RT_DEBUGF(3, "RASTER_mapAlgebraExpr: Expression is %s", initexpr); + + /* We don't need this memory */ + /* + lwfree(expression); + expression = NULL; + */ + } + + + + /** + * Optimization: If a nodataval is provided, use it for newinitialvalue. + * Then, we can initialize the raster with this value and skip the + * computation of nodata values one by one in the main computing loop + **/ + if (!PG_ARGISNULL(4)) { + hasnodataval = 1; + nodataval = PG_GETARG_FLOAT8(4); + newinitialvalue = nodataval; + + POSTGIS_RT_DEBUGF(3, "RASTER_mapAlgebraExpr: new initial value = %f", + newinitialvalue); + } + else + hasnodataval = 0; + + + + /** + * Optimization: If the raster is only filled with nodata values return + * right now a raster filled with the newinitialvalue + * TODO: Call rt_band_check_isnodata instead? + **/ + if (rt_band_get_isnodata_flag(band)) { + + POSTGIS_RT_DEBUG(3, "RASTER_mapAlgebraExpr: Band is a nodata band, returning " + "a raster filled with nodata"); + + ret = rt_raster_generate_new_band(newrast, newpixeltype, + newinitialvalue, TRUE, newnodatavalue, 0); + + /* Serialize created raster */ + pgraster = rt_raster_serialize(newrast); + if (NULL == pgraster) { + elog(ERROR, "RASTER_mapAlgebraExpr: Could not serialize raster. " + "Returning NULL"); + PG_RETURN_NULL(); + } + + SET_VARSIZE(pgraster, pgraster->size); + + /* Free memory */ + if (initexpr) + pfree(initexpr); + rt_raster_destroy(raster); + rt_raster_destroy(newrast); + + PG_RETURN_POINTER(pgraster); + } + + + /** + * Optimization: If expression resume to 'RAST' and hasnodataval is zero, + * we can just return the band from the original raster + **/ + if (initexpr != NULL && ( !strcmp(initexpr, "SELECT [rast]") || !strcmp(initexpr, "SELECT [rast.val]") ) && !hasnodataval) { + + POSTGIS_RT_DEBUGF(3, "RASTER_mapAlgebraExpr: Expression resumes to RAST. " + "Returning raster with band %d from original raster", nband); + + POSTGIS_RT_DEBUGF(4, "RASTER_mapAlgebraExpr: New raster has %d bands", + rt_raster_get_num_bands(newrast)); + + rt_raster_copy_band(newrast, raster, nband - 1, 0); + + POSTGIS_RT_DEBUGF(4, "RASTER_mapAlgebraExpr: New raster now has %d bands", + rt_raster_get_num_bands(newrast)); + + /* Serialize created raster */ + pgraster = rt_raster_serialize(newrast); + if (NULL == pgraster) { + elog(ERROR, "RASTER_mapAlgebraExpr: Could not serialize raster. " + "Returning NULL"); + PG_RETURN_NULL(); + } + + SET_VARSIZE(pgraster, pgraster->size); + + if (initexpr) + pfree(initexpr); + rt_raster_destroy(raster); + rt_raster_destroy(newrast); + + PG_RETURN_POINTER(pgraster); + } + + /** + * Optimization: If expression resume to a constant (it does not contain + * [rast) + **/ + if (initexpr != NULL && strstr(initexpr, "[rast") == NULL) { + ret = SPI_connect(); + if (ret != SPI_OK_CONNECT) { + elog(ERROR, "RASTER_mapAlgebraExpr: Unable to connect to the SPI manager." + " Aborting"); + PG_RETURN_NULL(); + }; + + /* Execute the expresion into newval */ + ret = SPI_execute(initexpr, FALSE, 0); + + if (ret != SPI_OK_SELECT || SPI_tuptable == NULL || SPI_processed != 1) { + elog(ERROR, "RASTER_mapAlgebraExpr: Invalid construction for expression." + " Aborting"); + + /* Free memory allocated out of the current context */ + if (SPI_tuptable) + SPI_freetuptable(tuptable); + + SPI_finish(); + PG_RETURN_NULL(); + } + + tupdesc = SPI_tuptable->tupdesc; + tuptable = SPI_tuptable; + + tuple = tuptable->vals[0]; + newexpr = SPI_getvalue(tuple, tupdesc, 1); + if ( ! newexpr ) { + POSTGIS_RT_DEBUG(3, "Constant expression evaluated to NULL, keeping initvalue"); + newval = newinitialvalue; + } else { + newval = atof(newexpr); + } + + SPI_freetuptable(tuptable); + + POSTGIS_RT_DEBUGF(3, "RASTER_mapAlgebraExpr: New raster value = %f", + newval); + + SPI_finish(); + + skipcomputation = 1; + + /** + * Compute the new value, set it and we will return after creating the + * new raster + **/ + if (!hasnodataval) { + newinitialvalue = newval; + skipcomputation = 2; + } + + /* Return the new raster as it will be before computing pixel by pixel */ + else if (FLT_NEQ(newval, newinitialvalue)) { + skipcomputation = 2; + } + } + + /** + * Create the raster receiving all the computed values. Initialize it to the + * new initial value + **/ + ret = rt_raster_generate_new_band(newrast, newpixeltype, + newinitialvalue, TRUE, newnodatavalue, 0); + + /** + * Optimization: If expression is NULL, or all the pixels could be set in + * one step, return the initialized raster now + **/ + /*if (initexpr == NULL || skipcomputation == 2) {*/ + if (expression == NULL || skipcomputation == 2) { + + /* Serialize created raster */ + pgraster = rt_raster_serialize(newrast); + if (NULL == pgraster) { + elog(ERROR, "RASTER_mapAlgebraExpr: Could not serialize raster. " + "Returning NULL"); + + PG_RETURN_NULL(); + } + + SET_VARSIZE(pgraster, pgraster->size); + + /* Free memory */ + if (initexpr) + pfree(initexpr); + rt_raster_destroy(raster); + rt_raster_destroy(newrast); + + PG_RETURN_POINTER(pgraster); + } + + RASTER_DEBUG(3, "RASTER_mapAlgebraExpr: Creating new raster band..."); + + /* Get the new raster band */ + newband = rt_raster_get_band(newrast, 0); + if ( NULL == newband ) { + elog(NOTICE, "Could not modify band for new raster. Returning new " + "raster with the original band"); + + /* Serialize created raster */ + pgraster = rt_raster_serialize(newrast); + if (NULL == pgraster) { + elog(ERROR, "RASTER_mapAlgebraExpr: Could not serialize raster. " + "Returning NULL"); + + PG_RETURN_NULL(); + } + + SET_VARSIZE(pgraster, pgraster->size); + + if (initexpr) + pfree(initexpr); + rt_raster_destroy(raster); + rt_raster_destroy(newrast); + + + PG_RETURN_POINTER(pgraster); + } + + POSTGIS_RT_DEBUGF(3, "RASTER_mapAlgebraExpr: Main computing loop (%d x %d)", + width, height); + + if (initexpr != NULL) { + /* Convert [rast.val] to [rast] */ + newexpr = rtpg_strreplace(initexpr, "[rast.val]", "[rast]", NULL); + pfree(initexpr); initexpr=newexpr; + + sprintf(place,"$1"); + for (i = 0, j = 1; i < argkwcount; i++) { + len = 0; + newexpr = rtpg_strreplace(initexpr, argkw[i], place, &len); + pfree(initexpr); initexpr=newexpr; + if (len > 0) { + argtype[argcount] = argkwtypes[i]; + argcount++; + argpos[i] = j++; + + sprintf(place, "$%d", j); + } + else { + argpos[i] = 0; + } + } + + POSTGIS_RT_DEBUGF(3, "RASTER_mapAlgebraExpr: initexpr = %s", initexpr); + + /* define values */ + values = (Datum *) palloc(sizeof(Datum) * argcount); + if (values == NULL) { + elog(ERROR, "RASTER_mapAlgebraExpr: Unable to allocate memory for value parameters of prepared statement"); + + SPI_finish(); + + rt_raster_destroy(raster); + rt_raster_destroy(newrast); + + PG_RETURN_NULL(); + } + + /* define nulls */ + nulls = (char *)palloc(argcount); + if (nulls == NULL) { + elog(ERROR, "RASTER_mapAlgebraExpr: Unable to allocate memory for null parameters of prepared statement"); + + SPI_finish(); + + rt_raster_destroy(raster); + rt_raster_destroy(newrast); + + PG_RETURN_NULL(); + } + + /* Connect to SPI and prepare the expression */ + ret = SPI_connect(); + if (ret != SPI_OK_CONNECT) { + elog(ERROR, "RASTER_mapAlgebraExpr: Unable to connect to the SPI manager." + " Aborting"); + + if (initexpr) + pfree(initexpr); + rt_raster_destroy(raster); + rt_raster_destroy(newrast); + + PG_RETURN_NULL(); + }; + + /* Type of all arguments is FLOAT8OID */ + spi_plan = SPI_prepare(initexpr, argcount, argtype); + + if (spi_plan == NULL) { + elog(ERROR, "RASTER_mapAlgebraExpr: Could not prepare expression." + " Aborting"); + + rt_raster_destroy(raster); + rt_raster_destroy(newrast); + + SPI_finish(); + + pfree(initexpr); + + PG_RETURN_NULL(); + } + } + + for (x = 0; x < width; x++) { + for(y = 0; y < height; y++) { + ret = rt_band_get_pixel(band, x, y, &r); + + /** + * We compute a value only for the withdata value pixel since the + * nodata value has already been set by the first optimization + **/ + if (ret != -1 && FLT_NEQ(r, newnodatavalue)) { + if (skipcomputation == 0) { + if (initexpr != NULL) { + /* Reset the null arg flags. */ + memset(nulls, 'n', argcount); + + for (i = 0; i < argkwcount; i++) { + idx = argpos[i]; + if (idx < 1) continue; + idx--; + + if (i == kX ) { + /* x is 0 based index, but SQL expects 1 based index */ + values[idx] = Int32GetDatum(x+1); + nulls[idx] = ' '; + } + else if (i == kY) { + /* y is 0 based index, but SQL expects 1 based index */ + values[idx] = Int32GetDatum(y+1); + nulls[idx] = ' '; + } + else if (i == kVAL ) { + values[idx] = Float8GetDatum(r); + nulls[idx] = ' '; + } + + } + + ret = SPI_execute_plan(spi_plan, values, nulls, FALSE, 0); + if (ret != SPI_OK_SELECT || SPI_tuptable == NULL || + SPI_processed != 1) { + elog(ERROR, "RASTER_mapAlgebraExpr: Error executing prepared plan." + " Aborting"); + + if (SPI_tuptable) + SPI_freetuptable(tuptable); + + SPI_freeplan(spi_plan); + SPI_finish(); + + pfree(values); + pfree(nulls); + pfree(initexpr); + + PG_RETURN_NULL(); + } + + tupdesc = SPI_tuptable->tupdesc; + tuptable = SPI_tuptable; + + tuple = tuptable->vals[0]; + datum = SPI_getbinval(tuple, tupdesc, 1, &isnull); + if ( SPI_result == SPI_ERROR_NOATTRIBUTE ) { + POSTGIS_RT_DEBUGF(3, "Expression for pixel %d,%d (value %g) errored, skip setting", x+1,y+1,r); + newval = newinitialvalue; + } + else if ( isnull ) { + POSTGIS_RT_DEBUGF(3, "Expression for pixel %d,%d (value %g) evaluated to NULL, skip setting", x+1,y+1,r); + newval = newinitialvalue; + } else { + newval = DatumGetFloat8(datum); + } + + SPI_freetuptable(tuptable); + } + + else + newval = newinitialvalue; + + POSTGIS_RT_DEBUGF(3, "RASTER_mapAlgebraExpr: new value = %f", + newval); + } + + + rt_band_set_pixel(newband, x, y, newval); + } + + } + } + + if (initexpr != NULL) { + SPI_freeplan(spi_plan); + SPI_finish(); + + pfree(values); + pfree(nulls); + pfree(initexpr); + } + else { + POSTGIS_RT_DEBUG(3, "RASTER_mapAlgebraExpr: no SPI cleanup"); + } + + + /* The newrast band has been modified */ + + POSTGIS_RT_DEBUG(3, "RASTER_mapAlgebraExpr: raster modified, serializing it."); + /* Serialize created raster */ + + pgraster = rt_raster_serialize(newrast); + if (NULL == pgraster) { + /* Free memory allocated out of the current context */ + rt_raster_destroy(raster); + rt_raster_destroy(newrast); + + PG_RETURN_NULL(); + } + + SET_VARSIZE(pgraster, pgraster->size); + + POSTGIS_RT_DEBUG(3, "RASTER_mapAlgebraExpr: raster serialized"); + + rt_raster_destroy(raster); + rt_raster_destroy(newrast); + + POSTGIS_RT_DEBUG(4, "RASTER_mapAlgebraExpr: returning raster"); + + + PG_RETURN_POINTER(pgraster); +} + +/* + * One raster user function MapAlgebra. + */ +PG_FUNCTION_INFO_V1(RASTER_mapAlgebraFct); +Datum RASTER_mapAlgebraFct(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster = NULL; + rt_raster raster = NULL; + rt_raster newrast = NULL; + rt_band band = NULL; + rt_band newband = NULL; + int x, y, nband, width, height; + double r; + double newnodatavalue = 0.0; + double newinitialvalue = 0.0; + double newval = 0.0; + rt_pixtype newpixeltype; + int ret = -1; + Oid oid; + FmgrInfo cbinfo; + FunctionCallInfoData cbdata; + Datum tmpnewval; + char * strFromText = NULL; + int k = 0; + + POSTGIS_RT_DEBUG(2, "RASTER_mapAlgebraFct: STARTING..."); + + /* Check raster */ + if (PG_ARGISNULL(0)) { + elog(WARNING, "Raster is NULL. Returning NULL"); + PG_RETURN_NULL(); + } + + + /* Deserialize raster */ + pgraster = (rt_pgraster *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + raster = rt_raster_deserialize(pgraster, FALSE); + if (NULL == raster) + { + elog(ERROR, "RASTER_mapAlgebraFct: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + POSTGIS_RT_DEBUG(3, "RASTER_mapAlgebraFct: Getting arguments..."); + + /* Get the rest of the arguments */ + + if (PG_ARGISNULL(1)) + nband = 1; + else + nband = PG_GETARG_INT32(1); + + if (nband < 1) + nband = 1; + + POSTGIS_RT_DEBUG(3, "RASTER_mapAlgebraFct: Creating new empty raster..."); + + /** + * Create a new empty raster with having the same georeference as the + * provided raster + **/ + width = rt_raster_get_width(raster); + height = rt_raster_get_height(raster); + + newrast = rt_raster_new(width, height); + + if ( NULL == newrast ) { + elog(ERROR, "RASTER_mapAlgebraFct: Could not create a new raster. " + "Returning NULL"); + + rt_raster_destroy(raster); + + PG_RETURN_NULL(); + } + + rt_raster_set_scale(newrast, + rt_raster_get_x_scale(raster), + rt_raster_get_y_scale(raster)); + + rt_raster_set_offsets(newrast, + rt_raster_get_x_offset(raster), + rt_raster_get_y_offset(raster)); + + rt_raster_set_skews(newrast, + rt_raster_get_x_skew(raster), + rt_raster_get_y_skew(raster)); + + rt_raster_set_srid(newrast, rt_raster_get_srid(raster)); + + + /** + * If this new raster is empty (width = 0 OR height = 0) then there is + * nothing to compute and we return it right now + **/ + if (rt_raster_is_empty(newrast)) + { + elog(NOTICE, "Raster is empty. Returning an empty raster"); + rt_raster_destroy(raster); + + pgraster = rt_raster_serialize(newrast); + if (NULL == pgraster) { + elog(ERROR, "RASTER_mapAlgebraFct: Could not serialize raster. " + "Returning NULL"); + PG_RETURN_NULL(); + } + + SET_VARSIZE(pgraster, pgraster->size); + rt_raster_destroy(newrast); + + PG_RETURN_POINTER(pgraster); + } + + POSTGIS_RT_DEBUGF(3, "RASTER_mapAlgebraFct: Getting raster band %d...", nband); + + /** + * Check if the raster has the required band. Otherwise, return a raster + * without band + **/ + if (rt_raster_has_no_band(raster, nband - 1)) { + elog(NOTICE, "Raster does not have the required band. Returning a raster " + "without a band"); + rt_raster_destroy(raster); + + pgraster = rt_raster_serialize(newrast); + if (NULL == pgraster) { + elog(ERROR, "RASTER_mapAlgebraFct: Could not serialize raster. " + "Returning NULL"); + PG_RETURN_NULL(); + } + + SET_VARSIZE(pgraster, pgraster->size); + rt_raster_destroy(newrast); + + PG_RETURN_POINTER(pgraster); + } + + /* Get the raster band */ + band = rt_raster_get_band(raster, nband - 1); + if ( NULL == band ) { + elog(NOTICE, "Could not get the required band. Returning a raster " + "without a band"); + rt_raster_destroy(raster); + + pgraster = rt_raster_serialize(newrast); + if (NULL == pgraster) { + elog(ERROR, "RASTER_mapAlgebraFct: Could not serialize raster. " + "Returning NULL"); + PG_RETURN_NULL(); + } + + SET_VARSIZE(pgraster, pgraster->size); + + rt_raster_destroy(newrast); + + PG_RETURN_POINTER(pgraster); + } + + /* + * Get NODATA value + */ + POSTGIS_RT_DEBUG(3, "RASTER_mapAlgebraFct: Getting NODATA value for band..."); + + if (rt_band_get_hasnodata_flag(band)) { + newnodatavalue = rt_band_get_nodata(band); + } + + else { + newnodatavalue = rt_band_get_min_value(band); + } + + POSTGIS_RT_DEBUGF(3, "RASTER_mapAlgebraFct: NODATA value for band: %f", + newnodatavalue); + /** + * We set the initial value of the future band to nodata value. If nodata + * value is null, then the raster will be initialized to + * rt_band_get_min_value but all the values should be recomputed anyway + **/ + newinitialvalue = newnodatavalue; + + /** + * Set the new pixeltype + **/ + POSTGIS_RT_DEBUG(3, "RASTER_mapAlgebraFct: Setting pixeltype..."); + + if (PG_ARGISNULL(2)) { + newpixeltype = rt_band_get_pixtype(band); + } + + else { + strFromText = text_to_cstring(PG_GETARG_TEXT_P(2)); + newpixeltype = rt_pixtype_index_from_name(strFromText); + lwfree(strFromText); + if (newpixeltype == PT_END) + newpixeltype = rt_band_get_pixtype(band); + } + + if (newpixeltype == PT_END) { + elog(ERROR, "RASTER_mapAlgebraFct: Invalid pixeltype. Returning NULL"); + + rt_raster_destroy(raster); + rt_raster_destroy(newrast); + + PG_RETURN_NULL(); + } + + POSTGIS_RT_DEBUGF(3, "RASTER_mapAlgebraFct: Pixeltype set to %s", + rt_pixtype_name(newpixeltype)); + + /* Get the name of the callback user function for raster values */ + if (PG_ARGISNULL(3)) { + elog(ERROR, "RASTER_mapAlgebraFct: Required function is missing. Returning NULL"); + + rt_raster_destroy(raster); + rt_raster_destroy(newrast); + + PG_RETURN_NULL(); + } + + oid = PG_GETARG_OID(3); + if (oid == InvalidOid) { + elog(ERROR, "RASTER_mapAlgebraFct: Got invalid function object id. Returning NULL"); + + rt_raster_destroy(raster); + rt_raster_destroy(newrast); + + PG_RETURN_NULL(); + } + + fmgr_info(oid, &cbinfo); + + /* function cannot return set */ + if (cbinfo.fn_retset) { + elog(ERROR, "RASTER_mapAlgebraFct: Function provided must return double precision not resultset"); + + rt_raster_destroy(raster); + rt_raster_destroy(newrast); + + PG_RETURN_NULL(); + } + /* function should have correct # of args */ + else if (cbinfo.fn_nargs < 2 || cbinfo.fn_nargs > 3) { + elog(ERROR, "RASTER_mapAlgebraFct: Function does not have two or three input parameters"); + + rt_raster_destroy(raster); + rt_raster_destroy(newrast); + + PG_RETURN_NULL(); + } + + if (cbinfo.fn_nargs == 2) + k = 1; + else + k = 2; + + if (func_volatile(oid) == 'v') { + elog(NOTICE, "Function provided is VOLATILE. Unless required and for best performance, function should be IMMUTABLE or STABLE"); + } + + /* prep function call data */ +#if POSTGIS_PGSQL_VERSION <= 90 + InitFunctionCallInfoData(cbdata, &cbinfo, 2, InvalidOid, NULL); +#else + InitFunctionCallInfoData(cbdata, &cbinfo, 2, InvalidOid, NULL, NULL); +#endif + memset(cbdata.argnull, FALSE, cbinfo.fn_nargs); + + /* check that the function isn't strict if the args are null. */ + if (PG_ARGISNULL(4)) { + if (cbinfo.fn_strict) { + elog(ERROR, "RASTER_mapAlgebraFct: Strict callback functions cannot have null parameters"); + + rt_raster_destroy(raster); + rt_raster_destroy(newrast); + + PG_RETURN_NULL(); + } + + cbdata.arg[k] = (Datum)NULL; + cbdata.argnull[k] = TRUE; + } + else { + cbdata.arg[k] = PG_GETARG_DATUM(4); + } + + /** + * Optimization: If the raster is only filled with nodata values return + * right now a raster filled with the nodatavalueexpr + * TODO: Call rt_band_check_isnodata instead? + **/ + if (rt_band_get_isnodata_flag(band)) { + + POSTGIS_RT_DEBUG(3, "RASTER_mapAlgebraFct: Band is a nodata band, returning " + "a raster filled with nodata"); + + ret = rt_raster_generate_new_band(newrast, newpixeltype, + newinitialvalue, TRUE, newnodatavalue, 0); + + /* Serialize created raster */ + pgraster = rt_raster_serialize(newrast); + if (NULL == pgraster) { + elog(ERROR, "RASTER_mapAlgebraFct: Could not serialize raster. " + "Returning NULL"); + PG_RETURN_NULL(); + } + + SET_VARSIZE(pgraster, pgraster->size); + + /* Free memory */ + rt_raster_destroy(raster); + rt_raster_destroy(newrast); + + PG_RETURN_POINTER(pgraster); + } + + + /** + * Create the raster receiving all the computed values. Initialize it to the + * new initial value + **/ + ret = rt_raster_generate_new_band(newrast, newpixeltype, + newinitialvalue, TRUE, newnodatavalue, 0); + + /* Get the new raster band */ + newband = rt_raster_get_band(newrast, 0); + if ( NULL == newband ) { + elog(NOTICE, "Could not modify band for new raster. Returning new " + "raster with the original band"); + + /* Serialize created raster */ + pgraster = rt_raster_serialize(newrast); + if (NULL == pgraster) { + elog(ERROR, "RASTER_mapAlgebraFct: Could not serialize raster. " + "Returning NULL"); + + PG_RETURN_NULL(); + } + + SET_VARSIZE(pgraster, pgraster->size); + + rt_raster_destroy(raster); + rt_raster_destroy(newrast); + + PG_RETURN_POINTER(pgraster); + } + + POSTGIS_RT_DEBUGF(3, "RASTER_mapAlgebraFct: Main computing loop (%d x %d)", + width, height); + + for (x = 0; x < width; x++) { + for(y = 0; y < height; y++) { + ret = rt_band_get_pixel(band, x, y, &r); + + /** + * We compute a value only for the withdata value pixel since the + * nodata value has already been set by the first optimization + **/ + if (ret != -1) { + if (FLT_EQ(r, newnodatavalue)) { + if (cbinfo.fn_strict) { + POSTGIS_RT_DEBUG(3, "RASTER_mapAlgebraFct: Strict callbacks cannot accept NULL arguments, skipping NODATA cell."); + continue; + } + cbdata.argnull[0] = TRUE; + cbdata.arg[0] = (Datum)NULL; + } + else { + cbdata.argnull[0] = FALSE; + cbdata.arg[0] = Float8GetDatum(r); + } + + /* Add pixel positions if callback has proper # of args */ + if (cbinfo.fn_nargs == 3) { + Datum d[2]; + ArrayType *a; + + d[0] = Int32GetDatum(x+1); + d[1] = Int32GetDatum(y+1); + + a = construct_array(d, 2, INT4OID, sizeof(int4), true, 'i'); + + cbdata.argnull[1] = FALSE; + cbdata.arg[1] = PointerGetDatum(a); + } + + POSTGIS_RT_DEBUGF(3, "RASTER_mapAlgebraFct: (%dx%d), r = %f", + x, y, r); + + tmpnewval = FunctionCallInvoke(&cbdata); + + if (cbdata.isnull) { + newval = newnodatavalue; + } + else { + newval = DatumGetFloat8(tmpnewval); + } + + POSTGIS_RT_DEBUGF(3, "RASTER_mapAlgebraFct: new value = %f", + newval); + + rt_band_set_pixel(newband, x, y, newval); + } + + } + } + + /* The newrast band has been modified */ + + POSTGIS_RT_DEBUG(3, "RASTER_mapAlgebraFct: raster modified, serializing it."); + /* Serialize created raster */ + + pgraster = rt_raster_serialize(newrast); + if (NULL == pgraster) { + rt_raster_destroy(raster); + rt_raster_destroy(newrast); + + PG_RETURN_NULL(); + } + + SET_VARSIZE(pgraster, pgraster->size); + + POSTGIS_RT_DEBUG(3, "RASTER_mapAlgebraFct: raster serialized"); + + rt_raster_destroy(raster); + rt_raster_destroy(newrast); + + POSTGIS_RT_DEBUG(4, "RASTER_mapAlgebraFct: returning raster"); + + PG_RETURN_POINTER(pgraster); +} + +/** + * Return new raster from selected bands of existing raster through ST_Band. + * second argument is an array of band numbers (1 based) + */ +PG_FUNCTION_INFO_V1(RASTER_band); +Datum RASTER_band(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster; + rt_pgraster *pgrast; + rt_raster raster; + rt_raster rast; + + bool skip = FALSE; + ArrayType *array; + Oid etype; + Datum *e; + bool *nulls; + int16 typlen; + bool typbyval; + char typalign; + int ndims = 1; + int *dims; + int *lbs; + + uint32_t numBands; + uint32_t *bandNums; + uint32 idx = 0; + int n; + int i = 0; + int j = 0; + + if (PG_ARGISNULL(0)) PG_RETURN_NULL(); + pgraster = (rt_pgraster *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + + raster = rt_raster_deserialize(pgraster, FALSE); + if (!raster) { + elog(ERROR, "RASTER_band: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + /* process bandNums */ + if (PG_ARGISNULL(1)) { + elog(NOTICE, "Band number(s) not provided. Returning original raster"); + skip = TRUE; + } + do { + if (skip) break; + + numBands = rt_raster_get_num_bands(raster); + + array = PG_GETARG_ARRAYTYPE_P(1); + etype = ARR_ELEMTYPE(array); + get_typlenbyvalalign(etype, &typlen, &typbyval, &typalign); + + switch (etype) { + case INT2OID: + case INT4OID: + break; + default: + elog(ERROR, "RASTER_band: Invalid data type for band number(s)"); + rt_raster_destroy(raster); + PG_RETURN_NULL(); + break; + } + + ndims = ARR_NDIM(array); + dims = ARR_DIMS(array); + lbs = ARR_LBOUND(array); + + deconstruct_array(array, etype, typlen, typbyval, typalign, &e, + &nulls, &n); + + bandNums = palloc(sizeof(uint32_t) * n); + for (i = 0, j = 0; i < n; i++) { + if (nulls[i]) continue; + + switch (etype) { + case INT2OID: + idx = (uint32_t) DatumGetInt16(e[i]); + break; + case INT4OID: + idx = (uint32_t) DatumGetInt32(e[i]); + break; + } + + POSTGIS_RT_DEBUGF(3, "band idx (before): %d", idx); + if (idx > numBands || idx < 1) { + elog(NOTICE, "Invalid band index (must use 1-based). Returning original raster"); + skip = TRUE; + break; + } + + bandNums[j] = idx - 1; + POSTGIS_RT_DEBUGF(3, "bandNums[%d] = %d", j, bandNums[j]); + j++; + } + + if (skip || j < 1) { + pfree(bandNums); + skip = TRUE; + } + } + while (0); + + if (!skip) { + rast = rt_raster_from_band(raster, bandNums, j); + pfree(bandNums); + rt_raster_destroy(raster); + if (!rast) { + elog(ERROR, "RASTER_band: Could not create new raster"); + PG_RETURN_NULL(); + } + + pgrast = rt_raster_serialize(rast); + rt_raster_destroy(rast); + + if (!pgrast) PG_RETURN_NULL(); + + SET_VARSIZE(pgrast, pgrast->size); + PG_RETURN_POINTER(pgrast); + } + + PG_RETURN_POINTER(pgraster); +} + +/** + * Get summary stats of a band + */ +PG_FUNCTION_INFO_V1(RASTER_summaryStats); +Datum RASTER_summaryStats(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster = NULL; + rt_raster raster = NULL; + rt_band band = NULL; + int32_t bandindex = 1; + bool exclude_nodata_value = TRUE; + int num_bands = 0; + double sample = 0; + rt_bandstats stats = NULL; + + TupleDesc tupdesc; + int values_length = 6; + Datum values[values_length]; + bool nulls[values_length]; + HeapTuple tuple; + Datum result; + + /* pgraster is null, return null */ + if (PG_ARGISNULL(0)) PG_RETURN_NULL(); + pgraster = (rt_pgraster *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + + raster = rt_raster_deserialize(pgraster, FALSE); + if (!raster) { + elog(ERROR, "RASTER_summaryStats: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + /* band index is 1-based */ + if (!PG_ARGISNULL(1)) + bandindex = PG_GETARG_INT32(1); + num_bands = rt_raster_get_num_bands(raster); + if (bandindex < 1 || bandindex > num_bands) { + elog(NOTICE, "Invalid band index (must use 1-based). Returning NULL"); + rt_raster_destroy(raster); + PG_RETURN_NULL(); + } + + /* exclude_nodata_value flag */ + if (!PG_ARGISNULL(2)) + exclude_nodata_value = PG_GETARG_BOOL(2); + + /* sample % */ + if (!PG_ARGISNULL(3)) { + sample = PG_GETARG_FLOAT8(3); + if (sample < 0 || sample > 1) { + elog(NOTICE, "Invalid sample percentage (must be between 0 and 1). Returning NULL"); + rt_raster_destroy(raster); + PG_RETURN_NULL(); + } + else if (FLT_EQ(sample, 0.0)) + sample = 1; + } + else + sample = 1; + + /* get band */ + band = rt_raster_get_band(raster, bandindex - 1); + if (!band) { + elog(NOTICE, "Could not find band at index %d. Returning NULL", bandindex); + rt_raster_destroy(raster); + PG_RETURN_NULL(); + } + + /* we don't need the raw values, hence the zero parameter */ + stats = rt_band_get_summary_stats(band, (int) exclude_nodata_value, sample, 0, NULL, NULL, NULL); + rt_band_destroy(band); + rt_raster_destroy(raster); + if (NULL == stats) { + elog(NOTICE, "Unable to compute summary statistics for band at index %d. Returning NULL", bandindex); + PG_RETURN_NULL(); + } + + /* Build a tuple descriptor for our result type */ + if (get_call_result_type(fcinfo, NULL, &tupdesc) != TYPEFUNC_COMPOSITE) { + ereport(ERROR, ( + errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg( + "function returning record called in context " + "that cannot accept type record" + ) + )); + } + + BlessTupleDesc(tupdesc); + + memset(nulls, FALSE, values_length); + + values[0] = Int64GetDatum(stats->count); + if (stats->count > 0) { + values[1] = Float8GetDatum(stats->sum); + values[2] = Float8GetDatum(stats->mean); + values[3] = Float8GetDatum(stats->stddev); + values[4] = Float8GetDatum(stats->min); + values[5] = Float8GetDatum(stats->max); + } + else { + nulls[1] = TRUE; + nulls[2] = TRUE; + nulls[3] = TRUE; + nulls[4] = TRUE; + nulls[5] = TRUE; + } + + /* build a tuple */ + tuple = heap_form_tuple(tupdesc, values, nulls); + + /* make the tuple into a datum */ + result = HeapTupleGetDatum(tuple); + + /* clean up */ + pfree(stats); + + PG_RETURN_DATUM(result); +} + +/** + * Get summary stats of a coverage for a specific band + */ +PG_FUNCTION_INFO_V1(RASTER_summaryStatsCoverage); +Datum RASTER_summaryStatsCoverage(PG_FUNCTION_ARGS) +{ + text *tablenametext = NULL; + char *tablename = NULL; + text *colnametext = NULL; + char *colname = NULL; + int32_t bandindex = 1; + bool exclude_nodata_value = TRUE; + double sample = 0; + + int len = 0; + char *sql = NULL; + int spi_result; + Portal portal; + TupleDesc tupdesc; + SPITupleTable *tuptable = NULL; + HeapTuple tuple; + Datum datum; + bool isNull = FALSE; + + rt_pgraster *pgraster = NULL; + rt_raster raster = NULL; + rt_band band = NULL; + int num_bands = 0; + uint64_t cK = 0; + double cM = 0; + double cQ = 0; + rt_bandstats stats = NULL; + rt_bandstats rtn = NULL; + + int values_length = 6; + Datum values[values_length]; + bool nulls[values_length]; + Datum result; + + /* tablename is null, return null */ + if (PG_ARGISNULL(0)) { + elog(NOTICE, "Table name must be provided"); + PG_RETURN_NULL(); + } + tablenametext = PG_GETARG_TEXT_P(0); + tablename = text_to_cstring(tablenametext); + if (!strlen(tablename)) { + elog(NOTICE, "Table name must be provided"); + PG_RETURN_NULL(); + } + + /* column name is null, return null */ + if (PG_ARGISNULL(1)) { + elog(NOTICE, "Column name must be provided"); + PG_RETURN_NULL(); + } + colnametext = PG_GETARG_TEXT_P(1); + colname = text_to_cstring(colnametext); + if (!strlen(colname)) { + elog(NOTICE, "Column name must be provided"); + PG_RETURN_NULL(); + } + + /* band index is 1-based */ + if (!PG_ARGISNULL(2)) + bandindex = PG_GETARG_INT32(2); + + /* exclude_nodata_value flag */ + if (!PG_ARGISNULL(3)) + exclude_nodata_value = PG_GETARG_BOOL(3); + + /* sample % */ + if (!PG_ARGISNULL(4)) { + sample = PG_GETARG_FLOAT8(4); + if (sample < 0 || sample > 1) { + elog(NOTICE, "Invalid sample percentage (must be between 0 and 1). Returning NULL"); + rt_raster_destroy(raster); + PG_RETURN_NULL(); + } + else if (FLT_EQ(sample, 0.0)) + sample = 1; + } + else + sample = 1; + + /* iterate through rasters of coverage */ + /* connect to database */ + spi_result = SPI_connect(); + if (spi_result != SPI_OK_CONNECT) { + elog(ERROR, "RASTER_summaryStatsCoverage: Could not connect to database using SPI\n"); + pfree(sql); + PG_RETURN_NULL(); + } + + /* create sql */ + len = sizeof(char) * (strlen("SELECT \"\" FROM \"\" WHERE \"\" IS NOT NULL") + (strlen(colname) * 2) + strlen(tablename) + 1); + sql = (char *) palloc(len); + if (NULL == sql) { + elog(ERROR, "RASTER_summaryStatsCoverage: Unable to allocate memory for sql\n"); + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_finish(); + PG_RETURN_NULL(); + } + + /* get cursor */ + snprintf(sql, len, "SELECT \"%s\" FROM \"%s\" WHERE \"%s\" IS NOT NULL", colname, tablename, colname); + portal = SPI_cursor_open_with_args( + "coverage", + sql, + 0, NULL, + NULL, NULL, + TRUE, 0 + ); + pfree(sql); + + /* process resultset */ + SPI_cursor_fetch(portal, TRUE, 1); + while (SPI_processed == 1 && SPI_tuptable != NULL) { + tupdesc = SPI_tuptable->tupdesc; + tuptable = SPI_tuptable; + tuple = tuptable->vals[0]; + + datum = SPI_getbinval(tuple, tupdesc, 1, &isNull); + if (SPI_result == SPI_ERROR_NOATTRIBUTE) { + elog(ERROR, "RASTER_summaryStatsCoverage: Unable to get raster of coverage\n"); + + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_cursor_close(portal); + SPI_finish(); + + if (NULL != rtn) pfree(rtn); + PG_RETURN_NULL(); + } + else if (isNull) { + SPI_cursor_fetch(portal, TRUE, 1); + continue; + } + + pgraster = (rt_pgraster *) PG_DETOAST_DATUM(datum); + + raster = rt_raster_deserialize(pgraster, FALSE); + if (!raster) { + elog(ERROR, "RASTER_summaryStatsCoverage: Could not deserialize raster"); + + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_cursor_close(portal); + SPI_finish(); + + if (NULL != rtn) pfree(rtn); + PG_RETURN_NULL(); + } + + /* inspect number of bands */ + num_bands = rt_raster_get_num_bands(raster); + if (bandindex < 1 || bandindex > num_bands) { + elog(NOTICE, "Invalid band index (must use 1-based). Returning NULL"); + + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_cursor_close(portal); + SPI_finish(); + + if (NULL != rtn) pfree(rtn); + PG_RETURN_NULL(); + } + + /* get band */ + band = rt_raster_get_band(raster, bandindex - 1); + if (!band) { + elog(NOTICE, "Could not find band at index %d. Returning NULL", bandindex); + + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_cursor_close(portal); + SPI_finish(); + + if (NULL != rtn) pfree(rtn); + PG_RETURN_NULL(); + } + + /* we don't need the raw values, hence the zero parameter */ + stats = rt_band_get_summary_stats(band, (int) exclude_nodata_value, sample, 0, &cK, &cM, &cQ); + + rt_band_destroy(band); + rt_raster_destroy(raster); + + if (NULL == stats) { + elog(NOTICE, "Unable to compute summary statistics for band at index %d. Returning NULL", bandindex); + + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_cursor_close(portal); + SPI_finish(); + + if (NULL != rtn) pfree(rtn); + PG_RETURN_NULL(); + } + + /* initialize rtn */ + if (stats->count > 0) { + if (NULL == rtn) { + rtn = (rt_bandstats) SPI_palloc(sizeof(struct rt_bandstats_t)); + if (NULL == rtn) { + elog(ERROR, "RASTER_summaryStatsCoverage: Unable to allocate memory for summary stats of coverage\n"); + + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_cursor_close(portal); + SPI_finish(); + + PG_RETURN_NULL(); + } + + rtn->sample = stats->sample; + rtn->count = stats->count; + rtn->min = stats->min; + rtn->max = stats->max; + rtn->sum = stats->sum; + rtn->mean = stats->mean; + rtn->stddev = -1; + + rtn->values = NULL; + rtn->sorted = 0; + } + else { + rtn->count += stats->count; + rtn->sum += stats->sum; + + if (stats->min < rtn->min) + rtn->min = stats->min; + if (stats->max > rtn->max) + rtn->max = stats->max; + } + } + + pfree(stats); + + /* next record */ + SPI_cursor_fetch(portal, TRUE, 1); + } + + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_cursor_close(portal); + SPI_finish(); + + if (NULL == rtn) { + elog(ERROR, "RASTER_summaryStatsCoverage: Unable to compute coverage summary stats\n"); + PG_RETURN_NULL(); + } + + /* coverage mean and deviation */ + rtn->mean = rtn->sum / rtn->count; + /* sample deviation */ + if (rtn->sample > 0 && rtn->sample < 1) + rtn->stddev = sqrt(cQ / (rtn->count - 1)); + /* standard deviation */ + else + rtn->stddev = sqrt(cQ / rtn->count); + + /* Build a tuple descriptor for our result type */ + if (get_call_result_type(fcinfo, NULL, &tupdesc) != TYPEFUNC_COMPOSITE) { + ereport(ERROR, ( + errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg( + "function returning record called in context " + "that cannot accept type record" + ) + )); + } + + BlessTupleDesc(tupdesc); + + memset(nulls, FALSE, values_length); + + values[0] = Int64GetDatum(rtn->count); + if (rtn->count > 0) { + values[1] = Float8GetDatum(rtn->sum); + values[2] = Float8GetDatum(rtn->mean); + values[3] = Float8GetDatum(rtn->stddev); + values[4] = Float8GetDatum(rtn->min); + values[5] = Float8GetDatum(rtn->max); + } + else { + nulls[1] = TRUE; + nulls[2] = TRUE; + nulls[3] = TRUE; + nulls[4] = TRUE; + nulls[5] = TRUE; + } + + /* build a tuple */ + tuple = heap_form_tuple(tupdesc, values, nulls); + + /* make the tuple into a datum */ + result = HeapTupleGetDatum(tuple); + + /* clean up */ + pfree(rtn); + + PG_RETURN_DATUM(result); +} + +/** + * Returns histogram for a band + */ +PG_FUNCTION_INFO_V1(RASTER_histogram); +Datum RASTER_histogram(PG_FUNCTION_ARGS) +{ + FuncCallContext *funcctx; + TupleDesc tupdesc; + + int i; + rt_histogram hist; + rt_histogram hist2; + int call_cntr; + int max_calls; + + /* first call of function */ + if (SRF_IS_FIRSTCALL()) { + MemoryContext oldcontext; + + rt_pgraster *pgraster = NULL; + rt_raster raster = NULL; + rt_band band = NULL; + int32_t bandindex = 1; + int num_bands = 0; + bool exclude_nodata_value = TRUE; + double sample = 0; + uint32_t bin_count = 0; + double *bin_width = NULL; + uint32_t bin_width_count = 0; + double width = 0; + bool right = FALSE; + double min = 0; + double max = 0; + rt_bandstats stats = NULL; + uint32_t count; + + int j; + int n; + + ArrayType *array; + Oid etype; + Datum *e; + bool *nulls; + int16 typlen; + bool typbyval; + char typalign; + int ndims = 1; + int *dims; + int *lbs; + + POSTGIS_RT_DEBUG(3, "RASTER_histogram: Starting"); + + /* create a function context for cross-call persistence */ + funcctx = SRF_FIRSTCALL_INIT(); + + /* switch to memory context appropriate for multiple function calls */ + oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx); + + /* pgraster is null, return nothing */ + if (PG_ARGISNULL(0)) { + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + pgraster = (rt_pgraster *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + + raster = rt_raster_deserialize(pgraster, FALSE); + if (!raster) { + elog(ERROR, "RASTER_histogram: Could not deserialize raster"); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + /* band index is 1-based */ + if (!PG_ARGISNULL(1)) + bandindex = PG_GETARG_INT32(1); + num_bands = rt_raster_get_num_bands(raster); + if (bandindex < 1 || bandindex > num_bands) { + elog(NOTICE, "Invalid band index (must use 1-based). Returning NULL"); + rt_raster_destroy(raster); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + /* exclude_nodata_value flag */ + if (!PG_ARGISNULL(2)) + exclude_nodata_value = PG_GETARG_BOOL(2); + + /* sample % */ + if (!PG_ARGISNULL(3)) { + sample = PG_GETARG_FLOAT8(3); + if (sample < 0 || sample > 1) { + elog(NOTICE, "Invalid sample percentage (must be between 0 and 1). Returning NULL"); + rt_raster_destroy(raster); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + else if (FLT_EQ(sample, 0.0)) + sample = 1; + } + else + sample = 1; + + /* bin_count */ + if (!PG_ARGISNULL(4)) { + bin_count = PG_GETARG_INT32(4); + if (bin_count < 1) bin_count = 0; + } + + /* bin_width */ + if (!PG_ARGISNULL(5)) { + array = PG_GETARG_ARRAYTYPE_P(5); + etype = ARR_ELEMTYPE(array); + get_typlenbyvalalign(etype, &typlen, &typbyval, &typalign); + + switch (etype) { + case FLOAT4OID: + case FLOAT8OID: + break; + default: + elog(ERROR, "RASTER_histogram: Invalid data type for width"); + rt_raster_destroy(raster); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + break; + } + + ndims = ARR_NDIM(array); + dims = ARR_DIMS(array); + lbs = ARR_LBOUND(array); + + deconstruct_array(array, etype, typlen, typbyval, typalign, &e, + &nulls, &n); + + bin_width = palloc(sizeof(double) * n); + for (i = 0, j = 0; i < n; i++) { + if (nulls[i]) continue; + + switch (etype) { + case FLOAT4OID: + width = (double) DatumGetFloat4(e[i]); + break; + case FLOAT8OID: + width = (double) DatumGetFloat8(e[i]); + break; + } + + if (width < 0 || FLT_EQ(width, 0.0)) { + elog(NOTICE, "Invalid value for width (must be greater than 0). Returning NULL"); + pfree(bin_width); + rt_raster_destroy(raster); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + bin_width[j] = width; + POSTGIS_RT_DEBUGF(5, "bin_width[%d] = %f", j, bin_width[j]); + j++; + } + bin_width_count = j; + + if (j < 1) { + pfree(bin_width); + bin_width = NULL; + } + } + + /* right */ + if (!PG_ARGISNULL(6)) + right = PG_GETARG_BOOL(6); + + /* min */ + if (!PG_ARGISNULL(7)) min = PG_GETARG_FLOAT8(7); + + /* max */ + if (!PG_ARGISNULL(8)) max = PG_GETARG_FLOAT8(8); + + /* get band */ + band = rt_raster_get_band(raster, bandindex - 1); + if (!band) { + elog(NOTICE, "Could not find band at index %d. Returning NULL", bandindex); + rt_raster_destroy(raster); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + /* get stats */ + stats = rt_band_get_summary_stats(band, (int) exclude_nodata_value, sample, 1, NULL, NULL, NULL); + rt_band_destroy(band); + rt_raster_destroy(raster); + if (NULL == stats || NULL == stats->values) { + elog(NOTICE, "Unable to compute summary statistics for band at index %d", bandindex); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + else if (stats->count < 1) { + elog(NOTICE, "Unable to compute histogram for band at index %d as the band has no values", bandindex); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + /* get histogram */ + hist = rt_band_get_histogram(stats, bin_count, bin_width, bin_width_count, right, min, max, &count); + if (bin_width_count) pfree(bin_width); + pfree(stats); + if (NULL == hist || !count) { + elog(NOTICE, "Unable to compute histogram for band at index %d", bandindex); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + POSTGIS_RT_DEBUGF(3, "%d bins returned", count); + + /* Store needed information */ + funcctx->user_fctx = hist; + + /* total number of tuples to be returned */ + funcctx->max_calls = count; + + /* Build a tuple descriptor for our result type */ + if (get_call_result_type(fcinfo, NULL, &tupdesc) != TYPEFUNC_COMPOSITE) { + ereport(ERROR, ( + errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg( + "function returning record called in context " + "that cannot accept type record" + ) + )); + } + + BlessTupleDesc(tupdesc); + funcctx->tuple_desc = tupdesc; + + MemoryContextSwitchTo(oldcontext); + } + + /* stuff done on every call of the function */ + funcctx = SRF_PERCALL_SETUP(); + + call_cntr = funcctx->call_cntr; + max_calls = funcctx->max_calls; + tupdesc = funcctx->tuple_desc; + hist2 = funcctx->user_fctx; + + /* do when there is more left to send */ + if (call_cntr < max_calls) { + int values_length = 4; + Datum values[values_length]; + bool *nulls = NULL; + HeapTuple tuple; + Datum result; + + POSTGIS_RT_DEBUGF(3, "Result %d", call_cntr); + + nulls = palloc(sizeof(bool) * values_length); + memset(nulls, FALSE, values_length); + + values[0] = Float8GetDatum(hist2[call_cntr].min); + values[1] = Float8GetDatum(hist2[call_cntr].max); + values[2] = Int64GetDatum(hist2[call_cntr].count); + values[3] = Float8GetDatum(hist2[call_cntr].percent); + + /* build a tuple */ + tuple = heap_form_tuple(tupdesc, values, nulls); + + /* make the tuple into a datum */ + result = HeapTupleGetDatum(tuple); + + /* clean up */ + pfree(nulls); + + SRF_RETURN_NEXT(funcctx, result); + } + /* do when there is no more left */ + else { + pfree(hist2); + SRF_RETURN_DONE(funcctx); + } +} + +/** + * Returns histogram of a coverage for a specified band + */ +PG_FUNCTION_INFO_V1(RASTER_histogramCoverage); +Datum RASTER_histogramCoverage(PG_FUNCTION_ARGS) +{ + FuncCallContext *funcctx; + TupleDesc tupdesc; + + int i; + rt_histogram covhist = NULL; + rt_histogram covhist2; + int call_cntr; + int max_calls; + + POSTGIS_RT_DEBUG(3, "RASTER_histogramCoverage: Starting"); + + /* first call of function */ + if (SRF_IS_FIRSTCALL()) { + MemoryContext oldcontext; + + text *tablenametext = NULL; + char *tablename = NULL; + text *colnametext = NULL; + char *colname = NULL; + int32_t bandindex = 1; + bool exclude_nodata_value = TRUE; + double sample = 0; + uint32_t bin_count = 0; + double *bin_width = NULL; + uint32_t bin_width_count = 0; + double width = 0; + bool right = FALSE; + uint32_t count; + + int len = 0; + char *sql = NULL; + char *tmp = NULL; + double min = 0; + double max = 0; + int spi_result; + Portal portal; + SPITupleTable *tuptable = NULL; + HeapTuple tuple; + Datum datum; + bool isNull = FALSE; + + rt_pgraster *pgraster = NULL; + rt_raster raster = NULL; + rt_band band = NULL; + int num_bands = 0; + rt_bandstats stats = NULL; + rt_histogram hist; + uint64_t sum = 0; + + int j; + int n; + + ArrayType *array; + Oid etype; + Datum *e; + bool *nulls; + int16 typlen; + bool typbyval; + char typalign; + int ndims = 1; + int *dims; + int *lbs; + + POSTGIS_RT_DEBUG(3, "RASTER_histogramCoverage: first call of function"); + + /* create a function context for cross-call persistence */ + funcctx = SRF_FIRSTCALL_INIT(); + + /* switch to memory context appropriate for multiple function calls */ + oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx); + + /* tablename is null, return null */ + if (PG_ARGISNULL(0)) { + elog(NOTICE, "Table name must be provided"); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + tablenametext = PG_GETARG_TEXT_P(0); + tablename = text_to_cstring(tablenametext); + if (!strlen(tablename)) { + elog(NOTICE, "Table name must be provided"); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + POSTGIS_RT_DEBUGF(3, "RASTER_histogramCoverage: tablename = %s", tablename); + + /* column name is null, return null */ + if (PG_ARGISNULL(1)) { + elog(NOTICE, "Column name must be provided"); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + colnametext = PG_GETARG_TEXT_P(1); + colname = text_to_cstring(colnametext); + if (!strlen(colname)) { + elog(NOTICE, "Column name must be provided"); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + POSTGIS_RT_DEBUGF(3, "RASTER_histogramCoverage: colname = %s", colname); + + /* band index is 1-based */ + if (!PG_ARGISNULL(2)) + bandindex = PG_GETARG_INT32(2); + + /* exclude_nodata_value flag */ + if (!PG_ARGISNULL(3)) + exclude_nodata_value = PG_GETARG_BOOL(3); + + /* sample % */ + if (!PG_ARGISNULL(4)) { + sample = PG_GETARG_FLOAT8(4); + if (sample < 0 || sample > 1) { + elog(NOTICE, "Invalid sample percentage (must be between 0 and 1). Returning NULL"); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + else if (FLT_EQ(sample, 0.0)) + sample = 1; + } + else + sample = 1; + + /* bin_count */ + if (!PG_ARGISNULL(5)) { + bin_count = PG_GETARG_INT32(5); + if (bin_count < 1) bin_count = 0; + } + + /* bin_width */ + if (!PG_ARGISNULL(6)) { + array = PG_GETARG_ARRAYTYPE_P(6); + etype = ARR_ELEMTYPE(array); + get_typlenbyvalalign(etype, &typlen, &typbyval, &typalign); + + switch (etype) { + case FLOAT4OID: + case FLOAT8OID: + break; + default: + elog(ERROR, "RASTER_histogramCoverage: Invalid data type for width"); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + break; + } + + ndims = ARR_NDIM(array); + dims = ARR_DIMS(array); + lbs = ARR_LBOUND(array); + + deconstruct_array(array, etype, typlen, typbyval, typalign, &e, + &nulls, &n); + + bin_width = palloc(sizeof(double) * n); + for (i = 0, j = 0; i < n; i++) { + if (nulls[i]) continue; + + switch (etype) { + case FLOAT4OID: + width = (double) DatumGetFloat4(e[i]); + break; + case FLOAT8OID: + width = (double) DatumGetFloat8(e[i]); + break; + } + + if (width < 0 || FLT_EQ(width, 0.0)) { + elog(NOTICE, "Invalid value for width (must be greater than 0). Returning NULL"); + pfree(bin_width); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + bin_width[j] = width; + POSTGIS_RT_DEBUGF(5, "bin_width[%d] = %f", j, bin_width[j]); + j++; + } + bin_width_count = j; + + if (j < 1) { + pfree(bin_width); + bin_width = NULL; + } + } + + /* right */ + if (!PG_ARGISNULL(7)) + right = PG_GETARG_BOOL(7); + + /* connect to database */ + spi_result = SPI_connect(); + if (spi_result != SPI_OK_CONNECT) { + elog(ERROR, "RASTER_histogramCoverage: Could not connect to database using SPI\n"); + + if (bin_width_count) pfree(bin_width); + + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + /* coverage stats */ + len = sizeof(char) * (strlen("SELECT min, max FROM _st_summarystats('','',,::boolean,)") + strlen(tablename) + strlen(colname) + (MAX_INT_CHARLEN * 2) + MAX_DBL_CHARLEN + 1); + sql = (char *) palloc(len); + if (NULL == sql) { + elog(ERROR, "RASTER_histogramCoverage: Unable to allocate memory for sql\n"); + + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_finish(); + + if (bin_width_count) pfree(bin_width); + + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + /* get stats */ + snprintf(sql, len, "SELECT min, max FROM _st_summarystats('%s','%s',%d,%d::boolean,%f)", tablename, colname, bandindex, (exclude_nodata_value ? 1 : 0), sample); + POSTGIS_RT_DEBUGF(3, "RASTER_histogramCoverage: %s", sql); + spi_result = SPI_execute(sql, TRUE, 0); + pfree(sql); + if (spi_result != SPI_OK_SELECT || SPI_tuptable == NULL || SPI_processed != 1) { + elog(ERROR, "RASTER_histogramCoverage: Could not get summary stats of coverage"); + + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_finish(); + + if (bin_width_count) pfree(bin_width); + + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + tupdesc = SPI_tuptable->tupdesc; + tuptable = SPI_tuptable; + tuple = tuptable->vals[0]; + + tmp = SPI_getvalue(tuple, tupdesc, 1); + if (NULL == tmp || !strlen(tmp)) { + elog(ERROR, "RASTER_histogramCoverage: Could not get summary stats of coverage"); + + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_finish(); + + if (bin_width_count) pfree(bin_width); + + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + min = strtod(tmp, NULL); + POSTGIS_RT_DEBUGF(3, "RASTER_histogramCoverage: min = %f", min); + pfree(tmp); + + tmp = SPI_getvalue(tuple, tupdesc, 2); + if (NULL == tmp || !strlen(tmp)) { + elog(ERROR, "RASTER_histogramCoverage: Could not get summary stats of coverage"); + + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_finish(); + + if (bin_width_count) pfree(bin_width); + + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + max = strtod(tmp, NULL); + POSTGIS_RT_DEBUGF(3, "RASTER_histogramCoverage: max = %f", max); + pfree(tmp); + + /* iterate through rasters of coverage */ + /* create sql */ + len = sizeof(char) * (strlen("SELECT \"\" FROM \"\" WHERE \"\" IS NOT NULL") + (strlen(colname) * 2) + strlen(tablename) + 1); + sql = (char *) palloc(len); + if (NULL == sql) { + elog(ERROR, "RASTER_histogramCoverage: Unable to allocate memory for sql\n"); + + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_finish(); + + if (bin_width_count) pfree(bin_width); + + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + /* get cursor */ + snprintf(sql, len, "SELECT \"%s\" FROM \"%s\" WHERE \"%s\" IS NOT NULL", colname, tablename, colname); + POSTGIS_RT_DEBUGF(3, "RASTER_histogramCoverage: %s", sql); + portal = SPI_cursor_open_with_args( + "coverage", + sql, + 0, NULL, + NULL, NULL, + TRUE, 0 + ); + pfree(sql); + + /* process resultset */ + SPI_cursor_fetch(portal, TRUE, 1); + while (SPI_processed == 1 && SPI_tuptable != NULL) { + tupdesc = SPI_tuptable->tupdesc; + tuptable = SPI_tuptable; + tuple = tuptable->vals[0]; + + datum = SPI_getbinval(tuple, tupdesc, 1, &isNull); + if (SPI_result == SPI_ERROR_NOATTRIBUTE) { + elog(ERROR, "RASTER_histogramCoverage: Unable to get raster of coverage\n"); + + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_cursor_close(portal); + SPI_finish(); + + if (NULL != covhist) pfree(covhist); + if (bin_width_count) pfree(bin_width); + + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + else if (isNull) { + SPI_cursor_fetch(portal, TRUE, 1); + continue; + } + + pgraster = (rt_pgraster *) PG_DETOAST_DATUM(datum); + + raster = rt_raster_deserialize(pgraster, FALSE); + if (!raster) { + elog(ERROR, "RASTER_histogramCoverage: Could not deserialize raster"); + + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_cursor_close(portal); + SPI_finish(); + + if (NULL != covhist) pfree(covhist); + if (bin_width_count) pfree(bin_width); + + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + /* inspect number of bands*/ + num_bands = rt_raster_get_num_bands(raster); + if (bandindex < 1 || bandindex > num_bands) { + elog(NOTICE, "Invalid band index (must use 1-based). Returning NULL"); + + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_cursor_close(portal); + SPI_finish(); + + if (NULL != covhist) pfree(covhist); + if (bin_width_count) pfree(bin_width); + + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + /* get band */ + band = rt_raster_get_band(raster, bandindex - 1); + if (!band) { + elog(NOTICE, "Could not find band at index %d. Returning NULL", bandindex); + + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_cursor_close(portal); + SPI_finish(); + + if (NULL != covhist) pfree(covhist); + if (bin_width_count) pfree(bin_width); + + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + /* we need the raw values, hence the non-zero parameter */ + stats = rt_band_get_summary_stats(band, (int) exclude_nodata_value, sample, 1, NULL, NULL, NULL); + + rt_band_destroy(band); + rt_raster_destroy(raster); + + if (NULL == stats) { + elog(NOTICE, "Unable to compute summary statistics for band at index %d. Returning NULL", bandindex); + + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_cursor_close(portal); + SPI_finish(); + + if (NULL != covhist) pfree(covhist); + if (bin_width_count) pfree(bin_width); + + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + /* get histogram */ + if (stats->count > 0) { + hist = rt_band_get_histogram(stats, bin_count, bin_width, bin_width_count, right, min, max, &count); + pfree(stats); + if (NULL == hist || !count) { + elog(NOTICE, "Unable to compute histogram for band at index %d", bandindex); + + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_cursor_close(portal); + SPI_finish(); + + if (NULL != covhist) pfree(covhist); + if (bin_width_count) pfree(bin_width); + + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + POSTGIS_RT_DEBUGF(3, "%d bins returned", count); + + /* coverage histogram */ + if (NULL == covhist) { + covhist = (rt_histogram) SPI_palloc(sizeof(struct rt_histogram_t) * count); + if (NULL == covhist) { + elog(ERROR, "RASTER_histogramCoverage: Unable to allocate memory for histogram of coverage"); + + pfree(hist); + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_cursor_close(portal); + SPI_finish(); + + if (bin_width_count) pfree(bin_width); + + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + for (i = 0; i < count; i++) { + sum += hist[i].count; + covhist[i].count = hist[i].count; + covhist[i].percent = 0; + covhist[i].min = hist[i].min; + covhist[i].max = hist[i].max; + } + } + else { + for (i = 0; i < count; i++) { + sum += hist[i].count; + covhist[i].count += hist[i].count; + } + } + + pfree(hist); + + /* assuming bin_count wasn't set, force consistency */ + if (bin_count <= 0) bin_count = count; + } + + /* next record */ + SPI_cursor_fetch(portal, TRUE, 1); + } + + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_cursor_close(portal); + SPI_finish(); + + if (bin_width_count) pfree(bin_width); + + /* finish percent of histogram */ + if (sum > 0) { + for (i = 0; i < count; i++) + covhist[i].percent = covhist[i].count / (double) sum; + } + + /* Store needed information */ + funcctx->user_fctx = covhist; + + /* total number of tuples to be returned */ + funcctx->max_calls = count; + + /* Build a tuple descriptor for our result type */ + if (get_call_result_type(fcinfo, NULL, &tupdesc) != TYPEFUNC_COMPOSITE) { + ereport(ERROR, ( + errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg( + "function returning record called in context " + "that cannot accept type record" + ) + )); + } + + BlessTupleDesc(tupdesc); + funcctx->tuple_desc = tupdesc; + + MemoryContextSwitchTo(oldcontext); + } + + /* stuff done on every call of the function */ + funcctx = SRF_PERCALL_SETUP(); + + call_cntr = funcctx->call_cntr; + max_calls = funcctx->max_calls; + tupdesc = funcctx->tuple_desc; + covhist2 = funcctx->user_fctx; + + /* do when there is more left to send */ + if (call_cntr < max_calls) { + int values_length = 4; + Datum values[values_length]; + bool *nulls = NULL; + HeapTuple tuple; + Datum result; + + POSTGIS_RT_DEBUGF(3, "Result %d", call_cntr); + + nulls = palloc(sizeof(bool) * values_length); + memset(nulls, FALSE, values_length); + + values[0] = Float8GetDatum(covhist2[call_cntr].min); + values[1] = Float8GetDatum(covhist2[call_cntr].max); + values[2] = Int64GetDatum(covhist2[call_cntr].count); + values[3] = Float8GetDatum(covhist2[call_cntr].percent); + + /* build a tuple */ + tuple = heap_form_tuple(tupdesc, values, nulls); + + /* make the tuple into a datum */ + result = HeapTupleGetDatum(tuple); + + /* clean up */ + pfree(nulls); + + SRF_RETURN_NEXT(funcctx, result); + } + /* do when there is no more left */ + else { + pfree(covhist2); + SRF_RETURN_DONE(funcctx); + } +} + +/** + * Returns quantiles for a band + */ +PG_FUNCTION_INFO_V1(RASTER_quantile); +Datum RASTER_quantile(PG_FUNCTION_ARGS) +{ + FuncCallContext *funcctx; + TupleDesc tupdesc; + + int i; + rt_quantile quant; + rt_quantile quant2; + int call_cntr; + int max_calls; + + /* first call of function */ + if (SRF_IS_FIRSTCALL()) { + MemoryContext oldcontext; + + rt_pgraster *pgraster = NULL; + rt_raster raster = NULL; + rt_band band = NULL; + int32_t bandindex = 0; + int num_bands = 0; + bool exclude_nodata_value = TRUE; + double sample = 0; + double *quantiles = NULL; + uint32_t quantiles_count = 0; + double quantile = 0; + rt_bandstats stats = NULL; + uint32_t count; + + int j; + int n; + + ArrayType *array; + Oid etype; + Datum *e; + bool *nulls; + int16 typlen; + bool typbyval; + char typalign; + int ndims = 1; + int *dims; + int *lbs; + + /* create a function context for cross-call persistence */ + funcctx = SRF_FIRSTCALL_INIT(); + + /* switch to memory context appropriate for multiple function calls */ + oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx); + + /* pgraster is null, return nothing */ + if (PG_ARGISNULL(0)) { + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + pgraster = (rt_pgraster *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + + raster = rt_raster_deserialize(pgraster, FALSE); + if (!raster) { + elog(ERROR, "RASTER_quantile: Could not deserialize raster"); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + /* band index is 1-based */ + bandindex = PG_GETARG_INT32(1); + num_bands = rt_raster_get_num_bands(raster); + if (bandindex < 1 || bandindex > num_bands) { + elog(NOTICE, "Invalid band index (must use 1-based). Returning NULL"); + rt_raster_destroy(raster); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + assert(0 <= (bandindex - 1)); + + /* exclude_nodata_value flag */ + if (!PG_ARGISNULL(2)) + exclude_nodata_value = PG_GETARG_BOOL(2); + + /* sample % */ + if (!PG_ARGISNULL(3)) { + sample = PG_GETARG_FLOAT8(3); + if (sample < 0 || sample > 1) { + elog(NOTICE, "Invalid sample percentage (must be between 0 and 1). Returning NULL"); + rt_raster_destroy(raster); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + else if (FLT_EQ(sample, 0.0)) + sample = 1; + } + else + sample = 1; + + /* quantiles */ + if (!PG_ARGISNULL(4)) { + array = PG_GETARG_ARRAYTYPE_P(4); + etype = ARR_ELEMTYPE(array); + get_typlenbyvalalign(etype, &typlen, &typbyval, &typalign); + + switch (etype) { + case FLOAT4OID: + case FLOAT8OID: + break; + default: + elog(ERROR, "RASTER_quantile: Invalid data type for quantiles"); + rt_raster_destroy(raster); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + break; + } + + ndims = ARR_NDIM(array); + dims = ARR_DIMS(array); + lbs = ARR_LBOUND(array); + + deconstruct_array(array, etype, typlen, typbyval, typalign, &e, + &nulls, &n); + + quantiles = palloc(sizeof(double) * n); + for (i = 0, j = 0; i < n; i++) { + if (nulls[i]) continue; + + switch (etype) { + case FLOAT4OID: + quantile = (double) DatumGetFloat4(e[i]); + break; + case FLOAT8OID: + quantile = (double) DatumGetFloat8(e[i]); + break; + } + + if (quantile < 0 || quantile > 1) { + elog(NOTICE, "Invalid value for quantile (must be between 0 and 1). Returning NULL"); + pfree(quantiles); + rt_raster_destroy(raster); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + quantiles[j] = quantile; + POSTGIS_RT_DEBUGF(5, "quantiles[%d] = %f", j, quantiles[j]); + j++; + } + quantiles_count = j; + + if (j < 1) { + pfree(quantiles); + quantiles = NULL; + } + } + + /* get band */ + band = rt_raster_get_band(raster, bandindex - 1); + if (!band) { + elog(NOTICE, "Could not find band at index %d. Returning NULL", bandindex); + rt_raster_destroy(raster); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + /* get stats */ + stats = rt_band_get_summary_stats(band, (int) exclude_nodata_value, sample, 1, NULL, NULL, NULL); + rt_band_destroy(band); + rt_raster_destroy(raster); + if (NULL == stats || NULL == stats->values) { + elog(NOTICE, "Could not retrieve summary statistics for band at index %d", bandindex); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + else if (stats->count < 1) { + elog(NOTICE, "Unable to compute quantiles for band at index %d as the band has no values", bandindex); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + /* get quantiles */ + quant = rt_band_get_quantiles(stats, quantiles, quantiles_count, &count); + if (quantiles_count) pfree(quantiles); + pfree(stats); + if (NULL == quant || !count) { + elog(NOTICE, "Unable to compute quantiles for band at index %d", bandindex); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + POSTGIS_RT_DEBUGF(3, "%d quantiles returned", count); + + /* Store needed information */ + funcctx->user_fctx = quant; + + /* total number of tuples to be returned */ + funcctx->max_calls = count; + + /* Build a tuple descriptor for our result type */ + if (get_call_result_type(fcinfo, NULL, &tupdesc) != TYPEFUNC_COMPOSITE) { + ereport(ERROR, ( + errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg( + "function returning record called in context " + "that cannot accept type record" + ) + )); + } + + BlessTupleDesc(tupdesc); + funcctx->tuple_desc = tupdesc; + + MemoryContextSwitchTo(oldcontext); + } + + /* stuff done on every call of the function */ + funcctx = SRF_PERCALL_SETUP(); + + call_cntr = funcctx->call_cntr; + max_calls = funcctx->max_calls; + tupdesc = funcctx->tuple_desc; + quant2 = funcctx->user_fctx; + + /* do when there is more left to send */ + if (call_cntr < max_calls) { + int values_length = 2; + Datum values[values_length]; + bool *nulls = NULL; + HeapTuple tuple; + Datum result; + + POSTGIS_RT_DEBUGF(3, "Result %d", call_cntr); + + nulls = palloc(sizeof(bool) * values_length); + memset(nulls, FALSE, values_length); + + values[0] = Float8GetDatum(quant2[call_cntr].quantile); + values[1] = Float8GetDatum(quant2[call_cntr].value); + + /* build a tuple */ + tuple = heap_form_tuple(tupdesc, values, nulls); + + /* make the tuple into a datum */ + result = HeapTupleGetDatum(tuple); + + /* clean up */ + pfree(nulls); + + SRF_RETURN_NEXT(funcctx, result); + } + /* do when there is no more left */ + else { + pfree(quant2); + SRF_RETURN_DONE(funcctx); + } +} + +/** + * Returns selected quantiles of a coverage for a specified band + */ +PG_FUNCTION_INFO_V1(RASTER_quantileCoverage); +Datum RASTER_quantileCoverage(PG_FUNCTION_ARGS) +{ + FuncCallContext *funcctx; + TupleDesc tupdesc; + + int i; + rt_quantile covquant = NULL; + rt_quantile covquant2; + int call_cntr; + int max_calls; + + POSTGIS_RT_DEBUG(3, "RASTER_quantileCoverage: Starting"); + + /* first call of function */ + if (SRF_IS_FIRSTCALL()) { + MemoryContext oldcontext; + + text *tablenametext = NULL; + char *tablename = NULL; + text *colnametext = NULL; + char *colname = NULL; + int32_t bandindex = 1; + bool exclude_nodata_value = TRUE; + double sample = 0; + double *quantiles = NULL; + uint32_t quantiles_count = 0; + double quantile = 0; + uint32_t count; + + int len = 0; + char *sql = NULL; + char *tmp = NULL; + uint64_t cov_count = 0; + int spi_result; + Portal portal; + SPITupleTable *tuptable = NULL; + HeapTuple tuple; + Datum datum; + bool isNull = FALSE; + + rt_pgraster *pgraster = NULL; + rt_raster raster = NULL; + rt_band band = NULL; + int num_bands = 0; + struct quantile_llist *qlls = NULL; + uint32_t qlls_count; + + int j; + int n; + + ArrayType *array; + Oid etype; + Datum *e; + bool *nulls; + int16 typlen; + bool typbyval; + char typalign; + int ndims = 1; + int *dims; + int *lbs; + + POSTGIS_RT_DEBUG(3, "RASTER_quantileCoverage: first call of function"); + + /* create a function context for cross-call persistence */ + funcctx = SRF_FIRSTCALL_INIT(); + + /* switch to memory context appropriate for multiple function calls */ + oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx); + + /* tablename is null, return null */ + if (PG_ARGISNULL(0)) { + elog(NOTICE, "Table name must be provided"); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + tablenametext = PG_GETARG_TEXT_P(0); + tablename = text_to_cstring(tablenametext); + if (!strlen(tablename)) { + elog(NOTICE, "Table name must be provided"); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + POSTGIS_RT_DEBUGF(3, "RASTER_quantileCoverage: tablename = %s", tablename); + + /* column name is null, return null */ + if (PG_ARGISNULL(1)) { + elog(NOTICE, "Column name must be provided"); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + colnametext = PG_GETARG_TEXT_P(1); + colname = text_to_cstring(colnametext); + if (!strlen(colname)) { + elog(NOTICE, "Column name must be provided"); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + POSTGIS_RT_DEBUGF(3, "RASTER_quantileCoverage: colname = %s", colname); + + /* band index is 1-based */ + if (!PG_ARGISNULL(2)) + bandindex = PG_GETARG_INT32(2); + + /* exclude_nodata_value flag */ + if (!PG_ARGISNULL(3)) + exclude_nodata_value = PG_GETARG_BOOL(3); + + /* sample % */ + if (!PG_ARGISNULL(4)) { + sample = PG_GETARG_FLOAT8(4); + if (sample < 0 || sample > 1) { + elog(NOTICE, "Invalid sample percentage (must be between 0 and 1). Returning NULL"); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + else if (FLT_EQ(sample, 0.0)) + sample = 1; + } + else + sample = 1; + + /* quantiles */ + if (!PG_ARGISNULL(5)) { + array = PG_GETARG_ARRAYTYPE_P(5); + etype = ARR_ELEMTYPE(array); + get_typlenbyvalalign(etype, &typlen, &typbyval, &typalign); + + switch (etype) { + case FLOAT4OID: + case FLOAT8OID: + break; + default: + elog(ERROR, "RASTER_quantileCoverage: Invalid data type for quantiles"); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + break; + } + + ndims = ARR_NDIM(array); + dims = ARR_DIMS(array); + lbs = ARR_LBOUND(array); + + deconstruct_array(array, etype, typlen, typbyval, typalign, &e, + &nulls, &n); + + quantiles = palloc(sizeof(double) * n); + for (i = 0, j = 0; i < n; i++) { + if (nulls[i]) continue; + + switch (etype) { + case FLOAT4OID: + quantile = (double) DatumGetFloat4(e[i]); + break; + case FLOAT8OID: + quantile = (double) DatumGetFloat8(e[i]); + break; + } + + if (quantile < 0 || quantile > 1) { + elog(NOTICE, "Invalid value for quantile (must be between 0 and 1). Returning NULL"); + pfree(quantiles); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + quantiles[j] = quantile; + POSTGIS_RT_DEBUGF(5, "quantiles[%d] = %f", j, quantiles[j]); + j++; + } + quantiles_count = j; + + if (j < 1) { + pfree(quantiles); + quantiles = NULL; + } + } + + /* coverage stats */ + /* connect to database */ + spi_result = SPI_connect(); + if (spi_result != SPI_OK_CONNECT) { + elog(ERROR, "RASTER_quantileCoverage: Could not connect to database using SPI\n"); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + len = sizeof(char) * (strlen("SELECT count FROM _st_summarystats('','',,::boolean,)") + strlen(tablename) + strlen(colname) + (MAX_INT_CHARLEN * 2) + MAX_DBL_CHARLEN + 1); + sql = (char *) palloc(len); + if (NULL == sql) { + elog(ERROR, "RASTER_quantileCoverage: Unable to allocate memory for sql\n"); + + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_finish(); + + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + /* get stats */ + snprintf(sql, len, "SELECT count FROM _st_summarystats('%s','%s',%d,%d::boolean,%f)", tablename, colname, bandindex, (exclude_nodata_value ? 1 : 0), sample); + POSTGIS_RT_DEBUGF(3, "stats sql: %s", sql); + spi_result = SPI_execute(sql, TRUE, 0); + pfree(sql); + if (spi_result != SPI_OK_SELECT || SPI_tuptable == NULL || SPI_processed != 1) { + elog(ERROR, "RASTER_quantileCoverage: Could not get summary stats of coverage"); + + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_finish(); + + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + tupdesc = SPI_tuptable->tupdesc; + tuptable = SPI_tuptable; + tuple = tuptable->vals[0]; + + tmp = SPI_getvalue(tuple, tupdesc, 1); + if (NULL == tmp || !strlen(tmp)) { + elog(ERROR, "RASTER_quantileCoverage: Could not get summary stats of coverage"); + + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_finish(); + + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + cov_count = strtol(tmp, NULL, 10); + POSTGIS_RT_DEBUGF(3, "covcount = %d", (int) cov_count); + pfree(tmp); + + /* iterate through rasters of coverage */ + /* create sql */ + len = sizeof(char) * (strlen("SELECT \"\" FROM \"\" WHERE \"\" IS NOT NULL") + (strlen(colname) * 2) + strlen(tablename) + 1); + sql = (char *) palloc(len); + if (NULL == sql) { + elog(ERROR, "RASTER_quantileCoverage: Unable to allocate memory for sql\n"); + + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_finish(); + + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + /* get cursor */ + snprintf(sql, len, "SELECT \"%s\" FROM \"%s\" WHERE \"%s\" IS NOT NULL", colname, tablename, colname); + POSTGIS_RT_DEBUGF(3, "coverage sql: %s", sql); + portal = SPI_cursor_open_with_args( + "coverage", + sql, + 0, NULL, + NULL, NULL, + TRUE, 0 + ); + pfree(sql); + + /* process resultset */ + SPI_cursor_fetch(portal, TRUE, 1); + while (SPI_processed == 1 && SPI_tuptable != NULL) { + if (NULL != covquant) pfree(covquant); + + tupdesc = SPI_tuptable->tupdesc; + tuptable = SPI_tuptable; + tuple = tuptable->vals[0]; + + datum = SPI_getbinval(tuple, tupdesc, 1, &isNull); + if (SPI_result == SPI_ERROR_NOATTRIBUTE) { + elog(ERROR, "RASTER_quantileCoverage: Unable to get raster of coverage\n"); + + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_cursor_close(portal); + SPI_finish(); + + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + else if (isNull) { + SPI_cursor_fetch(portal, TRUE, 1); + continue; + } + + pgraster = (rt_pgraster *) PG_DETOAST_DATUM(datum); + + raster = rt_raster_deserialize(pgraster, FALSE); + if (!raster) { + elog(ERROR, "RASTER_quantileCoverage: Could not deserialize raster"); + + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_cursor_close(portal); + SPI_finish(); + + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + /* inspect number of bands*/ + num_bands = rt_raster_get_num_bands(raster); + if (bandindex < 1 || bandindex > num_bands) { + elog(NOTICE, "Invalid band index (must use 1-based). Returning NULL"); + + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_cursor_close(portal); + SPI_finish(); + + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + /* get band */ + band = rt_raster_get_band(raster, bandindex - 1); + if (!band) { + elog(NOTICE, "Could not find raster band of index %d. Returning NULL", bandindex); + + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_cursor_close(portal); + SPI_finish(); + + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + covquant = rt_band_get_quantiles_stream( + band, + exclude_nodata_value, sample, cov_count, + &qlls, &qlls_count, + quantiles, quantiles_count, + &count + ); + + rt_band_destroy(band); + rt_raster_destroy(raster); + + if (NULL == covquant || !count) { + elog(NOTICE, "Unable to compute quantiles for band at index %d", bandindex); + + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_cursor_close(portal); + SPI_finish(); + + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + /* next record */ + SPI_cursor_fetch(portal, TRUE, 1); + } + + covquant2 = SPI_palloc(sizeof(struct rt_quantile_t) * count); + for (i = 0; i < count; i++) { + covquant2[i].quantile = covquant[i].quantile; + covquant2[i].has_value = covquant[i].has_value; + if (covquant2[i].has_value) + covquant2[i].value = covquant[i].value; + } + + if (NULL != covquant) pfree(covquant); + quantile_llist_destroy(&qlls, qlls_count); + + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_cursor_close(portal); + SPI_finish(); + + if (quantiles_count) pfree(quantiles); + + POSTGIS_RT_DEBUGF(3, "%d quantiles returned", count); + + /* Store needed information */ + funcctx->user_fctx = covquant2; + + /* total number of tuples to be returned */ + funcctx->max_calls = count; + + /* Build a tuple descriptor for our result type */ + if (get_call_result_type(fcinfo, NULL, &tupdesc) != TYPEFUNC_COMPOSITE) { + ereport(ERROR, ( + errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg( + "function returning record called in context " + "that cannot accept type record" + ) + )); + } + + BlessTupleDesc(tupdesc); + funcctx->tuple_desc = tupdesc; + + MemoryContextSwitchTo(oldcontext); + } + + /* stuff done on every call of the function */ + funcctx = SRF_PERCALL_SETUP(); + + call_cntr = funcctx->call_cntr; + max_calls = funcctx->max_calls; + tupdesc = funcctx->tuple_desc; + covquant2 = funcctx->user_fctx; + + /* do when there is more left to send */ + if (call_cntr < max_calls) { + int values_length = 2; + Datum values[values_length]; + bool *nulls = NULL; + HeapTuple tuple; + Datum result; + + POSTGIS_RT_DEBUGF(3, "Result %d", call_cntr); + + nulls = palloc(sizeof(bool) * values_length); + memset(nulls, FALSE, values_length); + + values[0] = Float8GetDatum(covquant2[call_cntr].quantile); + if (covquant2[call_cntr].has_value) + values[1] = Float8GetDatum(covquant2[call_cntr].value); + else + nulls[1] = TRUE; + + /* build a tuple */ + tuple = heap_form_tuple(tupdesc, values, nulls); + + /* make the tuple into a datum */ + result = HeapTupleGetDatum(tuple); + + /* clean up */ + pfree(nulls); + + SRF_RETURN_NEXT(funcctx, result); + } + /* do when there is no more left */ + else { + POSTGIS_RT_DEBUG(3, "done"); + pfree(covquant2); + SRF_RETURN_DONE(funcctx); + } +} + +/* get counts of values */ +PG_FUNCTION_INFO_V1(RASTER_valueCount); +Datum RASTER_valueCount(PG_FUNCTION_ARGS) { + FuncCallContext *funcctx; + TupleDesc tupdesc; + + int i; + rt_valuecount vcnts; + rt_valuecount vcnts2; + int call_cntr; + int max_calls; + + /* first call of function */ + if (SRF_IS_FIRSTCALL()) { + MemoryContext oldcontext; + + rt_pgraster *pgraster = NULL; + rt_raster raster = NULL; + rt_band band = NULL; + int32_t bandindex = 0; + int num_bands = 0; + bool exclude_nodata_value = TRUE; + double *search_values = NULL; + uint32_t search_values_count = 0; + double roundto = 0; + uint32_t count; + + int j; + int n; + + ArrayType *array; + Oid etype; + Datum *e; + bool *nulls; + int16 typlen; + bool typbyval; + char typalign; + int ndims = 1; + int *dims; + int *lbs; + + /* create a function context for cross-call persistence */ + funcctx = SRF_FIRSTCALL_INIT(); + + /* switch to memory context appropriate for multiple function calls */ + oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx); + + /* pgraster is null, return nothing */ + if (PG_ARGISNULL(0)) { + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + pgraster = (rt_pgraster *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + + raster = rt_raster_deserialize(pgraster, FALSE); + if (!raster) { + elog(ERROR, "RASTER_valueCount: Could not deserialize raster"); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + /* band index is 1-based */ + bandindex = PG_GETARG_INT32(1); + num_bands = rt_raster_get_num_bands(raster); + if (bandindex < 1 || bandindex > num_bands) { + elog(NOTICE, "Invalid band index (must use 1-based). Returning NULL"); + rt_raster_destroy(raster); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + assert(0 <= (bandindex - 1)); + + /* exclude_nodata_value flag */ + if (!PG_ARGISNULL(2)) + exclude_nodata_value = PG_GETARG_BOOL(2); + + /* search values */ + if (!PG_ARGISNULL(3)) { + array = PG_GETARG_ARRAYTYPE_P(3); + etype = ARR_ELEMTYPE(array); + get_typlenbyvalalign(etype, &typlen, &typbyval, &typalign); + + switch (etype) { + case FLOAT4OID: + case FLOAT8OID: + break; + default: + elog(ERROR, "RASTER_valueCount: Invalid data type for values"); + rt_raster_destroy(raster); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + break; + } + + ndims = ARR_NDIM(array); + dims = ARR_DIMS(array); + lbs = ARR_LBOUND(array); + + deconstruct_array(array, etype, typlen, typbyval, typalign, &e, + &nulls, &n); + + search_values = palloc(sizeof(double) * n); + for (i = 0, j = 0; i < n; i++) { + if (nulls[i]) continue; + + switch (etype) { + case FLOAT4OID: + search_values[j] = (double) DatumGetFloat4(e[i]); + break; + case FLOAT8OID: + search_values[j] = (double) DatumGetFloat8(e[i]); + break; + } + + POSTGIS_RT_DEBUGF(5, "search_values[%d] = %f", j, search_values[j]); + j++; + } + search_values_count = j; + + if (j < 1) { + pfree(search_values); + search_values = NULL; + } + } + + /* roundto */ + if (!PG_ARGISNULL(4)) { + roundto = PG_GETARG_FLOAT8(4); + if (roundto < 0.) roundto = 0; + } + + /* get band */ + band = rt_raster_get_band(raster, bandindex - 1); + if (!band) { + elog(NOTICE, "Could not find band at index %d. Returning NULL", bandindex); + rt_raster_destroy(raster); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + /* get counts of values */ + vcnts = rt_band_get_value_count(band, (int) exclude_nodata_value, search_values, search_values_count, roundto, NULL, &count); + rt_band_destroy(band); + rt_raster_destroy(raster); + if (NULL == vcnts || !count) { + elog(NOTICE, "Unable to count the values for band at index %d", bandindex); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + POSTGIS_RT_DEBUGF(3, "%d value counts returned", count); + + /* Store needed information */ + funcctx->user_fctx = vcnts; + + /* total number of tuples to be returned */ + funcctx->max_calls = count; + + /* Build a tuple descriptor for our result type */ + if (get_call_result_type(fcinfo, NULL, &tupdesc) != TYPEFUNC_COMPOSITE) { + ereport(ERROR, ( + errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg( + "function returning record called in context " + "that cannot accept type record" + ) + )); + } + + BlessTupleDesc(tupdesc); + funcctx->tuple_desc = tupdesc; + + MemoryContextSwitchTo(oldcontext); + } + + /* stuff done on every call of the function */ + funcctx = SRF_PERCALL_SETUP(); + + call_cntr = funcctx->call_cntr; + max_calls = funcctx->max_calls; + tupdesc = funcctx->tuple_desc; + vcnts2 = funcctx->user_fctx; + + /* do when there is more left to send */ + if (call_cntr < max_calls) { + int values_length = 3; + Datum values[values_length]; + bool *nulls = NULL; + HeapTuple tuple; + Datum result; + + POSTGIS_RT_DEBUGF(3, "Result %d", call_cntr); + + nulls = palloc(sizeof(bool) * values_length); + memset(nulls, FALSE, values_length); + + values[0] = Float8GetDatum(vcnts2[call_cntr].value); + values[1] = UInt32GetDatum(vcnts2[call_cntr].count); + values[2] = Float8GetDatum(vcnts2[call_cntr].percent); + + /* build a tuple */ + tuple = heap_form_tuple(tupdesc, values, nulls); + + /* make the tuple into a datum */ + result = HeapTupleGetDatum(tuple); + + /* clean up */ + pfree(nulls); + + SRF_RETURN_NEXT(funcctx, result); + } + /* do when there is no more left */ + else { + pfree(vcnts2); + SRF_RETURN_DONE(funcctx); + } +} + +/* get counts of values for a coverage */ +PG_FUNCTION_INFO_V1(RASTER_valueCountCoverage); +Datum RASTER_valueCountCoverage(PG_FUNCTION_ARGS) { + FuncCallContext *funcctx; + TupleDesc tupdesc; + + int i; + uint64_t covcount = 0; + uint64_t covtotal = 0; + rt_valuecount covvcnts = NULL; + rt_valuecount covvcnts2; + int call_cntr; + int max_calls; + + POSTGIS_RT_DEBUG(3, "RASTER_valueCountCoverage: Starting"); + + /* first call of function */ + if (SRF_IS_FIRSTCALL()) { + MemoryContext oldcontext; + + text *tablenametext = NULL; + char *tablename = NULL; + text *colnametext = NULL; + char *colname = NULL; + int32_t bandindex = 1; + bool exclude_nodata_value = TRUE; + double *search_values = NULL; + uint32_t search_values_count = 0; + double roundto = 0; + + int len = 0; + char *sql = NULL; + int spi_result; + Portal portal; + SPITupleTable *tuptable = NULL; + HeapTuple tuple; + Datum datum; + bool isNull = FALSE; + rt_pgraster *pgraster = NULL; + rt_raster raster = NULL; + rt_band band = NULL; + int num_bands = 0; + uint32_t count; + uint32_t total; + rt_valuecount vcnts = NULL; + int exists = 0; + + int j; + int n; + + ArrayType *array; + Oid etype; + Datum *e; + bool *nulls; + int16 typlen; + bool typbyval; + char typalign; + int ndims = 1; + int *dims; + int *lbs; + + /* create a function context for cross-call persistence */ + funcctx = SRF_FIRSTCALL_INIT(); + + /* switch to memory context appropriate for multiple function calls */ + oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx); + + /* tablename is null, return null */ + if (PG_ARGISNULL(0)) { + elog(NOTICE, "Table name must be provided"); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + tablenametext = PG_GETARG_TEXT_P(0); + tablename = text_to_cstring(tablenametext); + if (!strlen(tablename)) { + elog(NOTICE, "Table name must be provided"); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + POSTGIS_RT_DEBUGF(3, "tablename = %s", tablename); + + /* column name is null, return null */ + if (PG_ARGISNULL(1)) { + elog(NOTICE, "Column name must be provided"); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + colnametext = PG_GETARG_TEXT_P(1); + colname = text_to_cstring(colnametext); + if (!strlen(colname)) { + elog(NOTICE, "Column name must be provided"); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + POSTGIS_RT_DEBUGF(3, "colname = %s", colname); + + /* band index is 1-based */ + if (!PG_ARGISNULL(2)) + bandindex = PG_GETARG_INT32(2); + + /* exclude_nodata_value flag */ + if (!PG_ARGISNULL(3)) + exclude_nodata_value = PG_GETARG_BOOL(3); + + /* search values */ + if (!PG_ARGISNULL(4)) { + array = PG_GETARG_ARRAYTYPE_P(4); + etype = ARR_ELEMTYPE(array); + get_typlenbyvalalign(etype, &typlen, &typbyval, &typalign); + + switch (etype) { + case FLOAT4OID: + case FLOAT8OID: + break; + default: + elog(ERROR, "RASTER_valueCountCoverage: Invalid data type for values"); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + break; + } + + ndims = ARR_NDIM(array); + dims = ARR_DIMS(array); + lbs = ARR_LBOUND(array); + + deconstruct_array(array, etype, typlen, typbyval, typalign, &e, + &nulls, &n); + + search_values = palloc(sizeof(double) * n); + for (i = 0, j = 0; i < n; i++) { + if (nulls[i]) continue; + + switch (etype) { + case FLOAT4OID: + search_values[j] = (double) DatumGetFloat4(e[i]); + break; + case FLOAT8OID: + search_values[j] = (double) DatumGetFloat8(e[i]); + break; + } + + POSTGIS_RT_DEBUGF(5, "search_values[%d] = %f", j, search_values[j]); + j++; + } + search_values_count = j; + + if (j < 1) { + pfree(search_values); + search_values = NULL; + } + } + + /* roundto */ + if (!PG_ARGISNULL(5)) { + roundto = PG_GETARG_FLOAT8(5); + if (roundto < 0.) roundto = 0; + } + + /* iterate through rasters of coverage */ + /* connect to database */ + spi_result = SPI_connect(); + if (spi_result != SPI_OK_CONNECT) { + elog(ERROR, "RASTER_valueCountCoverage: Could not connect to database using SPI\n"); + + if (search_values_count) pfree(search_values); + + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + /* create sql */ + len = sizeof(char) * (strlen("SELECT \"\" FROM \"\" WHERE \"\" IS NOT NULL") + (strlen(colname) * 2) + strlen(tablename) + 1); + sql = (char *) palloc(len); + if (NULL == sql) { + elog(ERROR, "RASTER_valueCountCoverage: Unable to allocate memory for sql\n"); + + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_finish(); + + if (search_values_count) pfree(search_values); + + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + /* get cursor */ + snprintf(sql, len, "SELECT \"%s\" FROM \"%s\" WHERE \"%s\" IS NOT NULL", colname, tablename, colname); + POSTGIS_RT_DEBUGF(3, "RASTER_valueCountCoverage: %s", sql); + portal = SPI_cursor_open_with_args( + "coverage", + sql, + 0, NULL, + NULL, NULL, + TRUE, 0 + ); + pfree(sql); + + /* process resultset */ + SPI_cursor_fetch(portal, TRUE, 1); + while (SPI_processed == 1 && SPI_tuptable != NULL) { + tupdesc = SPI_tuptable->tupdesc; + tuptable = SPI_tuptable; + tuple = tuptable->vals[0]; + + datum = SPI_getbinval(tuple, tupdesc, 1, &isNull); + if (SPI_result == SPI_ERROR_NOATTRIBUTE) { + elog(ERROR, "RASTER_valueCountCoverage: Unable to get raster of coverage\n"); + + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_cursor_close(portal); + SPI_finish(); + + if (NULL != covvcnts) pfree(covvcnts); + if (search_values_count) pfree(search_values); + + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + else if (isNull) { + SPI_cursor_fetch(portal, TRUE, 1); + continue; + } + + pgraster = (rt_pgraster *) PG_DETOAST_DATUM(datum); + + raster = rt_raster_deserialize(pgraster, FALSE); + if (!raster) { + elog(ERROR, "RASTER_valueCountCoverage: Could not deserialize raster"); + + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_cursor_close(portal); + SPI_finish(); + + if (NULL != covvcnts) pfree(covvcnts); + if (search_values_count) pfree(search_values); + + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + /* inspect number of bands*/ + num_bands = rt_raster_get_num_bands(raster); + if (bandindex < 1 || bandindex > num_bands) { + elog(NOTICE, "Invalid band index (must use 1-based). Returning NULL"); + + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_cursor_close(portal); + SPI_finish(); + + if (NULL != covvcnts) pfree(covvcnts); + if (search_values_count) pfree(search_values); + + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + /* get band */ + band = rt_raster_get_band(raster, bandindex - 1); + if (!band) { + elog(NOTICE, "Could not find band at index %d. Returning NULL", bandindex); + + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_cursor_close(portal); + SPI_finish(); + + if (NULL != covvcnts) pfree(covvcnts); + if (search_values_count) pfree(search_values); + + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + /* get counts of values */ + vcnts = rt_band_get_value_count(band, (int) exclude_nodata_value, search_values, search_values_count, roundto, &total, &count); + rt_band_destroy(band); + rt_raster_destroy(raster); + if (NULL == vcnts || !count) { + elog(NOTICE, "Unable to count the values for band at index %d", bandindex); + + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_cursor_close(portal); + SPI_finish(); + + if (NULL != covvcnts) free(covvcnts); + if (search_values_count) pfree(search_values); + + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + POSTGIS_RT_DEBUGF(3, "%d value counts returned", count); + + if (NULL == covvcnts) { + covvcnts = (rt_valuecount) SPI_palloc(sizeof(struct rt_valuecount_t) * count); + if (NULL == covvcnts) { + elog(ERROR, "RASTER_valueCountCoverage: Unable to allocate memory for value counts of coverage"); + + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_cursor_close(portal); + SPI_finish(); + + if (search_values_count) pfree(search_values); + + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + for (i = 0; i < count; i++) { + covvcnts[i].value = vcnts[i].value; + covvcnts[i].count = vcnts[i].count; + covvcnts[i].percent = -1; + } + + covcount = count; + } + else { + for (i = 0; i < count; i++) { + exists = 0; + + for (j = 0; j < covcount; j++) { + if (FLT_EQ(vcnts[i].value, covvcnts[j].value)) { + exists = 1; + break; + } + } + + if (exists) { + covvcnts[j].count += vcnts[i].count; + } + else { + covcount++; + covvcnts = SPI_repalloc(covvcnts, sizeof(struct rt_valuecount_t) * covcount); + if (NULL == covvcnts) { + elog(ERROR, "RASTER_valueCountCoverage: Unable to change allocated memory for value counts of coverage"); + + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_cursor_close(portal); + SPI_finish(); + + if (search_values_count) pfree(search_values); + if (NULL != covvcnts) free(covvcnts); + + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + covvcnts[covcount - 1].value = vcnts[i].value; + covvcnts[covcount - 1].count = vcnts[i].count; + covvcnts[covcount - 1].percent = -1; + } + } + } + + covtotal += total; + + pfree(vcnts); + + /* next record */ + SPI_cursor_fetch(portal, TRUE, 1); + } + + if (SPI_tuptable) SPI_freetuptable(tuptable); + SPI_cursor_close(portal); + SPI_finish(); + + if (search_values_count) pfree(search_values); + + /* compute percentages */ + for (i = 0; i < covcount; i++) { + covvcnts[i].percent = (double) covvcnts[i].count / covtotal; + } + + /* Store needed information */ + funcctx->user_fctx = covvcnts; + + /* total number of tuples to be returned */ + funcctx->max_calls = covcount; + + /* Build a tuple descriptor for our result type */ + if (get_call_result_type(fcinfo, NULL, &tupdesc) != TYPEFUNC_COMPOSITE) { + ereport(ERROR, ( + errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg( + "function returning record called in context " + "that cannot accept type record" + ) + )); + } + + BlessTupleDesc(tupdesc); + funcctx->tuple_desc = tupdesc; + + MemoryContextSwitchTo(oldcontext); + } + + /* stuff done on every call of the function */ + funcctx = SRF_PERCALL_SETUP(); + + call_cntr = funcctx->call_cntr; + max_calls = funcctx->max_calls; + tupdesc = funcctx->tuple_desc; + covvcnts2 = funcctx->user_fctx; + + /* do when there is more left to send */ + if (call_cntr < max_calls) { + int values_length = 3; + Datum values[values_length]; + bool *nulls = NULL; + HeapTuple tuple; + Datum result; + + POSTGIS_RT_DEBUGF(3, "Result %d", call_cntr); + + nulls = palloc(sizeof(bool) * values_length); + memset(nulls, FALSE, values_length); + + values[0] = Float8GetDatum(covvcnts2[call_cntr].value); + values[1] = UInt32GetDatum(covvcnts2[call_cntr].count); + values[2] = Float8GetDatum(covvcnts2[call_cntr].percent); + + /* build a tuple */ + tuple = heap_form_tuple(tupdesc, values, nulls); + + /* make the tuple into a datum */ + result = HeapTupleGetDatum(tuple); + + /* clean up */ + pfree(nulls); + + SRF_RETURN_NEXT(funcctx, result); + } + /* do when there is no more left */ + else { + pfree(covvcnts2); + SRF_RETURN_DONE(funcctx); + } +} + +/** + * Reclassify the specified bands of the raster + */ +PG_FUNCTION_INFO_V1(RASTER_reclass); +Datum RASTER_reclass(PG_FUNCTION_ARGS) { + rt_pgraster *pgraster = NULL; + rt_raster raster = NULL; + rt_band band = NULL; + rt_band newband = NULL; + uint32_t numBands = 0; + + ArrayType *array; + Oid etype; + Datum *e; + bool *nulls; + int16 typlen; + bool typbyval; + char typalign; + int ndims = 1; + int *dims; + int *lbs; + int n = 0; + + int i = 0; + int j = 0; + int k = 0; + + int a = 0; + int b = 0; + int c = 0; + + rt_reclassexpr *exprset = NULL; + HeapTupleHeader tup; + bool isnull; + Datum tupv; + uint32_t nband = 0; + char *expr = NULL; + text *exprtext = NULL; + double val = 0; + char *junk = NULL; + int inc_val = 0; + int exc_val = 0; + char *pixeltype = NULL; + text *pixeltypetext = NULL; + rt_pixtype pixtype = PT_END; + double nodataval = 0; + bool hasnodata = FALSE; + + char **comma_set = NULL; + int comma_n = 0; + char **colon_set = NULL; + int colon_n = 0; + char **dash_set = NULL; + int dash_n = 0; + + POSTGIS_RT_DEBUG(3, "RASTER_reclass: Starting"); + + /* pgraster is null, return null */ + if (PG_ARGISNULL(0)) PG_RETURN_NULL(); + pgraster = (rt_pgraster *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + + /* raster */ + raster = rt_raster_deserialize(pgraster, FALSE); + if (!raster) { + elog(ERROR, "RASTER_reclass: Could not deserialize raster"); + PG_RETURN_NULL(); + } + numBands = rt_raster_get_num_bands(raster); + POSTGIS_RT_DEBUGF(3, "RASTER_reclass: %d possible bands to be reclassified", n); + + /* process set of reclassarg */ + POSTGIS_RT_DEBUG(3, "RASTER_reclass: Processing Arg 1 (reclassargset)"); + array = PG_GETARG_ARRAYTYPE_P(1); + etype = ARR_ELEMTYPE(array); + get_typlenbyvalalign(etype, &typlen, &typbyval, &typalign); + + ndims = ARR_NDIM(array); + dims = ARR_DIMS(array); + lbs = ARR_LBOUND(array); + + deconstruct_array(array, etype, typlen, typbyval, typalign, &e, + &nulls, &n); + + if (!n) { + elog(NOTICE, "Invalid argument for reclassargset. Returning original raster"); + + pgraster = rt_raster_serialize(raster); + rt_raster_destroy(raster); + if (!pgraster) PG_RETURN_NULL(); + SET_VARSIZE(pgraster, pgraster->size); + + PG_RETURN_POINTER(pgraster); + } + + /* + process each element of reclassarg + each element is the index of the band to process, the set + of reclass ranges and the output band's pixeltype + */ + for (i = 0; i < n; i++) { + if (nulls[i]) continue; + + /* each element is a tuple */ + tup = (HeapTupleHeader) DatumGetPointer(e[i]); + if (NULL == tup) { + elog(NOTICE, "Invalid argument for reclassargset. Returning original raster"); + + pgraster = rt_raster_serialize(raster); + rt_raster_destroy(raster); + if (!pgraster) PG_RETURN_NULL(); + SET_VARSIZE(pgraster, pgraster->size); + + PG_RETURN_POINTER(pgraster); + } + + /* band index (1-based) */ + tupv = GetAttributeByName(tup, "nband", &isnull); + if (isnull) { + elog(NOTICE, "Invalid argument for reclassargset. Missing value of nband for reclassarg of index %d . Returning original raster", i); + + pgraster = rt_raster_serialize(raster); + rt_raster_destroy(raster); + if (!pgraster) PG_RETURN_NULL(); + SET_VARSIZE(pgraster, pgraster->size); + + PG_RETURN_POINTER(pgraster); + } + nband = DatumGetInt32(tupv); + POSTGIS_RT_DEBUGF(3, "RASTER_reclass: expression for band %d", nband); + + /* valid band index? */ + if (nband < 1 || nband > numBands) { + elog(NOTICE, "Invalid argument for reclassargset. Invalid band index (must use 1-based) for reclassarg of index %d . Returning original raster", i); + + pgraster = rt_raster_serialize(raster); + rt_raster_destroy(raster); + if (!pgraster) PG_RETURN_NULL(); + SET_VARSIZE(pgraster, pgraster->size); + + PG_RETURN_POINTER(pgraster); + } + + /* reclass expr */ + tupv = GetAttributeByName(tup, "reclassexpr", &isnull); + if (isnull) { + elog(NOTICE, "Invalid argument for reclassargset. Missing value of reclassexpr for reclassarg of index %d . Returning original raster", i); + + pgraster = rt_raster_serialize(raster); + rt_raster_destroy(raster); + if (!pgraster) PG_RETURN_NULL(); + SET_VARSIZE(pgraster, pgraster->size); + + PG_RETURN_POINTER(pgraster); + } + exprtext = (text *) DatumGetPointer(tupv); + if (NULL == exprtext) { + elog(NOTICE, "Invalid argument for reclassargset. Missing value of reclassexpr for reclassarg of index %d . Returning original raster", i); + + pgraster = rt_raster_serialize(raster); + rt_raster_destroy(raster); + if (!pgraster) PG_RETURN_NULL(); + SET_VARSIZE(pgraster, pgraster->size); + + PG_RETURN_POINTER(pgraster); + } + expr = text_to_cstring(exprtext); + POSTGIS_RT_DEBUGF(5, "RASTER_reclass: expr (raw) %s", expr); + expr = rtpg_removespaces(expr); + POSTGIS_RT_DEBUGF(5, "RASTER_reclass: expr (clean) %s", expr); + + /* split string to its components */ + /* comma (,) separating rangesets */ + comma_set = rtpg_strsplit(expr, ",", &comma_n); + if (comma_n < 1) { + elog(NOTICE, "Invalid argument for reclassargset. Invalid expression of reclassexpr for reclassarg of index %d . Returning original raster", i); + + pgraster = rt_raster_serialize(raster); + rt_raster_destroy(raster); + if (!pgraster) PG_RETURN_NULL(); + SET_VARSIZE(pgraster, pgraster->size); + + PG_RETURN_POINTER(pgraster); + } + + /* set of reclass expressions */ + POSTGIS_RT_DEBUGF(5, "RASTER_reclass: %d possible expressions", comma_n); + exprset = palloc(comma_n * sizeof(rt_reclassexpr)); + + for (a = 0, j = 0; a < comma_n; a++) { + POSTGIS_RT_DEBUGF(5, "RASTER_reclass: map %s", comma_set[a]); + + /* colon (:) separating range "src" and "dst" */ + colon_set = rtpg_strsplit(comma_set[a], ":", &colon_n); + if (colon_n != 2) { + elog(NOTICE, "Invalid argument for reclassargset. Invalid expression of reclassexpr for reclassarg of index %d . Returning original raster", i); + for (k = 0; k < j; k++) pfree(exprset[k]); + pfree(exprset); + + pgraster = rt_raster_serialize(raster); + rt_raster_destroy(raster); + if (!pgraster) PG_RETURN_NULL(); + SET_VARSIZE(pgraster, pgraster->size); + + PG_RETURN_POINTER(pgraster); + } + + /* allocate mem for reclass expression */ + exprset[j] = palloc(sizeof(struct rt_reclassexpr_t)); + + for (b = 0; b < colon_n; b++) { + POSTGIS_RT_DEBUGF(5, "RASTER_reclass: range %s", colon_set[b]); + + /* dash (-) separating "min" and "max" */ + dash_set = rtpg_strsplit(colon_set[b], "-", &dash_n); + if (dash_n < 1 || dash_n > 3) { + elog(NOTICE, "Invalid argument for reclassargset. Invalid expression of reclassexpr for reclassarg of index %d . Returning original raster", i); + for (k = 0; k < j; k++) pfree(exprset[k]); + pfree(exprset); + + pgraster = rt_raster_serialize(raster); + rt_raster_destroy(raster); + if (!pgraster) PG_RETURN_NULL(); + SET_VARSIZE(pgraster, pgraster->size); + + PG_RETURN_POINTER(pgraster); + } + + for (c = 0; c < dash_n; c++) { + /* need to handle: (-9999-100 -> "(", "9999", "100" */ + if ( + c < 1 && + strlen(dash_set[c]) == 1 && ( + strchr(dash_set[c], '(') != NULL || + strchr(dash_set[c], '[') != NULL || + strchr(dash_set[c], ')') != NULL || + strchr(dash_set[c], ']') != NULL + ) + ) { + junk = palloc(sizeof(char) * (strlen(dash_set[c + 1]) + 2)); + if (NULL == junk) { + elog(ERROR, "RASTER_reclass: Insufficient memory. Returning NULL"); + for (k = 0; k <= j; k++) pfree(exprset[k]); + pfree(exprset); + rt_raster_destroy(raster); + + PG_RETURN_NULL(); + } + + sprintf(junk, "%s%s", dash_set[c], dash_set[c + 1]); + c++; + dash_set[c] = repalloc(dash_set[c], sizeof(char) * (strlen(junk) + 1)); + strcpy(dash_set[c], junk); + pfree(junk); + + /* rebuild dash_set */ + for (k = 1; k < dash_n; k++) { + dash_set[k - 1] = repalloc(dash_set[k - 1], (strlen(dash_set[k]) + 1) * sizeof(char)); + strcpy(dash_set[k - 1], dash_set[k]); + } + dash_n--; + c--; + pfree(dash_set[dash_n]); + dash_set = repalloc(dash_set, sizeof(char *) * dash_n); + } + + /* there shouldn't be more than two in dash_n */ + if (c < 1 && dash_n > 2) { + elog(NOTICE, "Invalid argument for reclassargset. Invalid expression of reclassexpr for reclassarg of index %d . Returning original raster", i); + for (k = 0; k < j; k++) pfree(exprset[k]); + pfree(exprset); + + pgraster = rt_raster_serialize(raster); + rt_raster_destroy(raster); + if (!pgraster) PG_RETURN_NULL(); + SET_VARSIZE(pgraster, pgraster->size); + + PG_RETURN_POINTER(pgraster); + } + + /* check interval flags */ + exc_val = 0; + inc_val = 1; + /* range */ + if (dash_n != 1) { + /* min */ + if (c < 1) { + if ( + strchr(dash_set[c], ')') != NULL || + strchr(dash_set[c], ']') != NULL + ) { + exc_val = 1; + inc_val = 1; + } + else if (strchr(dash_set[c], '(') != NULL){ + inc_val = 0; + } + else { + inc_val = 1; + } + } + /* max */ + else { + if ( + strrchr(dash_set[c], '(') != NULL || + strrchr(dash_set[c], '[') != NULL + ) { + exc_val = 1; + inc_val = 0; + } + else if (strrchr(dash_set[c], ']') != NULL) { + inc_val = 1; + } + else { + inc_val = 0; + } + } + } + POSTGIS_RT_DEBUGF(5, "RASTER_reclass: exc_val %d inc_val %d", exc_val, inc_val); + + /* remove interval flags */ + dash_set[c] = rtpg_chartrim(dash_set[c], "()[]"); + POSTGIS_RT_DEBUGF(5, "RASTER_reclass: min/max (char) %s", dash_set[c]); + + /* value from string to double */ + errno = 0; + val = strtod(dash_set[c], &junk); + if (errno != 0 || dash_set[c] == junk) { + elog(NOTICE, "Invalid argument for reclassargset. Invalid expression of reclassexpr for reclassarg of index %d . Returning original raster", i); + for (k = 0; k < j; k++) pfree(exprset[k]); + pfree(exprset); + + pgraster = rt_raster_serialize(raster); + rt_raster_destroy(raster); + if (!pgraster) PG_RETURN_NULL(); + SET_VARSIZE(pgraster, pgraster->size); + + PG_RETURN_POINTER(pgraster); + } + POSTGIS_RT_DEBUGF(5, "RASTER_reclass: min/max (double) %f", val); + + /* strsplit removes dash (a.k.a. negative sign), compare now to restore */ + junk = strstr(colon_set[b], dash_set[c]); + /* not beginning of string */ + if (junk != colon_set[b]) { + /* prior is a dash */ + if (*(junk - 1) == '-') { + /* prior is beginning of string or prior - 1 char is dash, negative number */ + if ( + ((junk - 1) == colon_set[b]) || + (*(junk - 2) == '-') || + (*(junk - 2) == '[') || + (*(junk - 2) == '(') + ) { + val *= -1.; + } + } + } + POSTGIS_RT_DEBUGF(5, "RASTER_reclass: min/max (double) %f", val); + + /* src */ + if (b < 1) { + /* singular value */ + if (dash_n == 1) { + exprset[j]->src.exc_min = exprset[j]->src.exc_max = exc_val; + exprset[j]->src.inc_min = exprset[j]->src.inc_max = inc_val; + exprset[j]->src.min = exprset[j]->src.max = val; + } + /* min */ + else if (c < 1) { + exprset[j]->src.exc_min = exc_val; + exprset[j]->src.inc_min = inc_val; + exprset[j]->src.min = val; + } + /* max */ + else { + exprset[j]->src.exc_max = exc_val; + exprset[j]->src.inc_max = inc_val; + exprset[j]->src.max = val; + } + } + /* dst */ + else { + /* singular value */ + if (dash_n == 1) + exprset[j]->dst.min = exprset[j]->dst.max = val; + /* min */ + else if (c < 1) + exprset[j]->dst.min = val; + /* max */ + else + exprset[j]->dst.max = val; + } + } + pfree(dash_set); + } + pfree(colon_set); + + POSTGIS_RT_DEBUGF(3, "RASTER_reclass: or: %f - %f nr: %f - %f" + , exprset[j]->src.min + , exprset[j]->src.max + , exprset[j]->dst.min + , exprset[j]->dst.max + ); + j++; + } + pfree(comma_set); + + /* pixel type */ + tupv = GetAttributeByName(tup, "pixeltype", &isnull); + if (isnull) { + elog(NOTICE, "Invalid argument for reclassargset. Missing value of pixeltype for reclassarg of index %d . Returning original raster", i); + + pgraster = rt_raster_serialize(raster); + rt_raster_destroy(raster); + if (!pgraster) PG_RETURN_NULL(); + SET_VARSIZE(pgraster, pgraster->size); + + PG_RETURN_POINTER(pgraster); + } + pixeltypetext = (text *) DatumGetPointer(tupv); + if (NULL == pixeltypetext) { + elog(NOTICE, "Invalid argument for reclassargset. Missing value of pixeltype for reclassarg of index %d . Returning original raster", i); + + pgraster = rt_raster_serialize(raster); + rt_raster_destroy(raster); + if (!pgraster) PG_RETURN_NULL(); + SET_VARSIZE(pgraster, pgraster->size); + + PG_RETURN_POINTER(pgraster); + } + pixeltype = text_to_cstring(pixeltypetext); + POSTGIS_RT_DEBUGF(3, "RASTER_reclass: pixeltype %s", pixeltype); + pixtype = rt_pixtype_index_from_name(pixeltype); + + /* nodata */ + tupv = GetAttributeByName(tup, "nodataval", &isnull); + if (isnull) { + nodataval = 0; + hasnodata = FALSE; + } + else { + nodataval = DatumGetFloat8(tupv); + hasnodata = TRUE; + } + POSTGIS_RT_DEBUGF(3, "RASTER_reclass: nodataval %f", nodataval); + POSTGIS_RT_DEBUGF(3, "RASTER_reclass: hasnodata %d", hasnodata); + + /* do reclass */ + band = rt_raster_get_band(raster, nband - 1); + if (!band) { + elog(NOTICE, "Could not find raster band of index %d. Returning original raster", nband); + for (k = 0; k < j; k++) pfree(exprset[k]); + pfree(exprset); + + pgraster = rt_raster_serialize(raster); + rt_raster_destroy(raster); + if (!pgraster) PG_RETURN_NULL(); + SET_VARSIZE(pgraster, pgraster->size); + + PG_RETURN_POINTER(pgraster); + } + newband = rt_band_reclass(band, pixtype, hasnodata, nodataval, exprset, j); + if (!newband) { + elog(ERROR, "RASTER_reclass: Could not reclassify raster band of index %d. Returning NULL", nband); + rt_raster_destroy(raster); + for (k = 0; k < j; k++) pfree(exprset[k]); + pfree(exprset); + + PG_RETURN_NULL(); + } + + /* replace old band with new band */ + if (rt_raster_replace_band(raster, newband, nband - 1) == NULL) { + elog(ERROR, "RASTER_reclass: Could not replace raster band of index %d with reclassified band. Returning NULL", nband); + rt_band_destroy(newband); + rt_raster_destroy(raster); + for (k = 0; k < j; k++) pfree(exprset[k]); + pfree(exprset); + + PG_RETURN_NULL(); + } + + /* free exprset */ + for (k = 0; k < j; k++) pfree(exprset[k]); + pfree(exprset); + } + + pgraster = rt_raster_serialize(raster); + rt_raster_destroy(raster); + + if (!pgraster) PG_RETURN_NULL(); + + POSTGIS_RT_DEBUG(3, "RASTER_reclass: Finished"); + SET_VARSIZE(pgraster, pgraster->size); + PG_RETURN_POINTER(pgraster); +} + +/** + * Returns formatted GDAL raster as bytea object of raster + */ +PG_FUNCTION_INFO_V1(RASTER_asGDALRaster); +Datum RASTER_asGDALRaster(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster = NULL; + rt_raster raster; + + text *formattext = NULL; + char *format = NULL; + char **options = NULL; + text *optiontext = NULL; + char *option = NULL; + int srid = SRID_UNKNOWN; + char *srs = NULL; + + ArrayType *array; + Oid etype; + Datum *e; + bool *nulls; + int16 typlen; + bool typbyval; + char typalign; + int ndims = 1; + int *dims; + int *lbs; + int n = 0; + int i = 0; + int j = 0; + + uint8_t *gdal = NULL; + uint64_t gdal_size = 0; + bytea *result = NULL; + uint64_t result_size = 0; + + POSTGIS_RT_DEBUG(3, "RASTER_asGDALRaster: Starting"); + + /* pgraster is null, return null */ + if (PG_ARGISNULL(0)) PG_RETURN_NULL(); + pgraster = (rt_pgraster *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + + raster = rt_raster_deserialize(pgraster, FALSE); + if (!raster) { + elog(ERROR, "RASTER_asGDALRaster: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + /* format is required */ + if (PG_ARGISNULL(1)) { + elog(NOTICE, "Format must be provided"); + rt_raster_destroy(raster); + PG_RETURN_NULL(); + } + else { + formattext = PG_GETARG_TEXT_P(1); + format = text_to_cstring(formattext); + } + + POSTGIS_RT_DEBUGF(3, "RASTER_asGDALRaster: Arg 1 (format) is %s", format); + + /* process options */ + if (!PG_ARGISNULL(2)) { + POSTGIS_RT_DEBUG(3, "RASTER_asGDALRaster: Processing Arg 2 (options)"); + array = PG_GETARG_ARRAYTYPE_P(2); + etype = ARR_ELEMTYPE(array); + get_typlenbyvalalign(etype, &typlen, &typbyval, &typalign); + + switch (etype) { + case TEXTOID: + break; + default: + elog(ERROR, "RASTER_asGDALRaster: Invalid data type for options"); + PG_RETURN_NULL(); + break; + } + + ndims = ARR_NDIM(array); + dims = ARR_DIMS(array); + lbs = ARR_LBOUND(array); + + deconstruct_array(array, etype, typlen, typbyval, typalign, &e, + &nulls, &n); + + if (n) { + options = (char **) palloc(sizeof(char *) * (n + 1)); + /* clean each option */ + for (i = 0, j = 0; i < n; i++) { + if (nulls[i]) continue; + + option = NULL; + switch (etype) { + case TEXTOID: + optiontext = (text *) DatumGetPointer(e[i]); + if (NULL == optiontext) break; + option = text_to_cstring(optiontext); + + /* trim string */ + option = rtpg_trim(option); + POSTGIS_RT_DEBUGF(3, "RASTER_asGDALRaster: option is '%s'", option); + break; + } + + if (strlen(option)) { + options[j] = (char *) palloc(sizeof(char) * (strlen(option) + 1)); + options[j] = option; + j++; + } + } + + if (j > 0) { + /* trim allocation */ + options = repalloc(options, (j + 1) * sizeof(char *)); + + /* add NULL to end */ + options[j] = NULL; + + } + else { + pfree(options); + options = NULL; + } + } + } + + /* process srid */ + /* NULL srid means use raster's srid */ + if (PG_ARGISNULL(3)) + srid = rt_raster_get_srid(raster); + else + srid = PG_GETARG_INT32(3); + + /* get srs from srid */ + if (clamp_srid(srid) != SRID_UNKNOWN) { + srs = rtpg_getSR(srid); + if (NULL == srs) { + elog(ERROR, "RASTER_asGDALRaster: Could not find srtext for SRID (%d)", srid); + if (NULL != options) { + for (i = j - 1; i >= 0; i--) pfree(options[i]); + pfree(options); + } + rt_raster_destroy(raster); + PG_RETURN_NULL(); + } + POSTGIS_RT_DEBUGF(3, "RASTER_asGDALRaster: Arg 3 (srs) is %s", srs); + } + else + srs = NULL; + + POSTGIS_RT_DEBUG(3, "RASTER_asGDALRaster: Generating GDAL raster"); + gdal = rt_raster_to_gdal(raster, srs, format, options, &gdal_size); + + /* free memory */ + if (NULL != options) { + for (i = j - 1; i >= 0; i--) pfree(options[i]); + pfree(options); + } + if (NULL != srs) pfree(srs); + rt_raster_destroy(raster); + + if (!gdal) { + elog(ERROR, "RASTER_asGDALRaster: Could not allocate and generate GDAL raster"); + PG_RETURN_NULL(); + } + POSTGIS_RT_DEBUGF(3, "RASTER_asGDALRaster: GDAL raster generated with %d bytes", (int) gdal_size); + + /* result is a varlena */ + result_size = gdal_size + VARHDRSZ; + result = (bytea *) palloc(result_size); + if (NULL == result) { + elog(ERROR, "RASTER_asGDALRaster: Insufficient virtual memory for GDAL raster"); + PG_RETURN_NULL(); + } + SET_VARSIZE(result, result_size); + memcpy(VARDATA(result), gdal, VARSIZE(result) - VARHDRSZ); + + /* for test output + FILE *fh = NULL; + fh = fopen("/tmp/out.dat", "w"); + fwrite(gdal, sizeof(uint8_t), gdal_size, fh); + fclose(fh); + */ + + /* free gdal mem buffer */ + if (gdal) CPLFree(gdal); + + POSTGIS_RT_DEBUG(3, "RASTER_asGDALRaster: Returning pointer to GDAL raster"); + PG_RETURN_POINTER(result); +} + +/** + * Returns available GDAL drivers + */ +PG_FUNCTION_INFO_V1(RASTER_getGDALDrivers); +Datum RASTER_getGDALDrivers(PG_FUNCTION_ARGS) +{ + FuncCallContext *funcctx; + TupleDesc tupdesc; + + uint32_t drv_count; + rt_gdaldriver drv_set; + rt_gdaldriver drv_set2; + int call_cntr; + int max_calls; + + /* first call of function */ + if (SRF_IS_FIRSTCALL()) { + MemoryContext oldcontext; + + /* create a function context for cross-call persistence */ + funcctx = SRF_FIRSTCALL_INIT(); + + /* switch to memory context appropriate for multiple function calls */ + oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx); + + drv_set = rt_raster_gdal_drivers(&drv_count, 1); + if (NULL == drv_set || !drv_count) { + elog(NOTICE, "No GDAL drivers found"); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + POSTGIS_RT_DEBUGF(3, "%d drivers returned", (int) drv_count); + + /* Store needed information */ + funcctx->user_fctx = drv_set; + + /* total number of tuples to be returned */ + funcctx->max_calls = drv_count; + + /* Build a tuple descriptor for our result type */ + if (get_call_result_type(fcinfo, NULL, &tupdesc) != TYPEFUNC_COMPOSITE) { + ereport(ERROR, ( + errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg( + "function returning record called in context " + "that cannot accept type record" + ) + )); + } + + BlessTupleDesc(tupdesc); + funcctx->tuple_desc = tupdesc; + MemoryContextSwitchTo(oldcontext); + } + + /* stuff done on every call of the function */ + funcctx = SRF_PERCALL_SETUP(); + + call_cntr = funcctx->call_cntr; + max_calls = funcctx->max_calls; + tupdesc = funcctx->tuple_desc; + drv_set2 = funcctx->user_fctx; + + /* do when there is more left to send */ + if (call_cntr < max_calls) { + int values_length = 4; + Datum values[values_length]; + bool *nulls; + HeapTuple tuple; + Datum result; + + POSTGIS_RT_DEBUGF(3, "Result %d", call_cntr); + + nulls = palloc(sizeof(bool) * values_length); + memset(nulls, FALSE, values_length); + + values[0] = Int32GetDatum(drv_set2[call_cntr].idx); + values[1] = CStringGetTextDatum(drv_set2[call_cntr].short_name); + values[2] = CStringGetTextDatum(drv_set2[call_cntr].long_name); + values[3] = CStringGetTextDatum(drv_set2[call_cntr].create_options); + + POSTGIS_RT_DEBUGF(4, "Result %d, Index %d", call_cntr, drv_set2[call_cntr].idx); + POSTGIS_RT_DEBUGF(4, "Result %d, Short Name %s", call_cntr, drv_set2[call_cntr].short_name); + POSTGIS_RT_DEBUGF(4, "Result %d, Full Name %s", call_cntr, drv_set2[call_cntr].long_name); + POSTGIS_RT_DEBUGF(5, "Result %d, Create Options %s", call_cntr, drv_set2[call_cntr].create_options); + + /* build a tuple */ + tuple = heap_form_tuple(tupdesc, values, nulls); + + /* make the tuple into a datum */ + result = HeapTupleGetDatum(tuple); + + /* clean up */ + pfree(nulls); + + pfree(drv_set2[call_cntr].short_name); + pfree(drv_set2[call_cntr].long_name); + pfree(drv_set2[call_cntr].create_options); + + SRF_RETURN_NEXT(funcctx, result); + } + /* do when there is no more left */ + else { + pfree(drv_set2); + SRF_RETURN_DONE(funcctx); + } +} + +/** + * Rasterize a geometry + */ +PG_FUNCTION_INFO_V1(RASTER_asRaster); +Datum RASTER_asRaster(PG_FUNCTION_ARGS) +{ + GSERIALIZED *gser = NULL; + + LWGEOM *geom = NULL; + rt_raster rast = NULL; + rt_pgraster *pgrast = NULL; + + unsigned char *wkb; + size_t wkb_len = 0; + unsigned char variant = WKB_SFSQL; + + double scale[2] = {0}; + double *scale_x = NULL; + double *scale_y = NULL; + + int dim[2] = {0}; + int *dim_x = NULL; + int *dim_y = NULL; + + ArrayType *array; + Oid etype; + Datum *e; + bool *nulls; + int16 typlen; + bool typbyval; + char typalign; + int ndims = 1; + int *dims; + int *lbs; + int n = 0; + int i = 0; + int j = 0; + int haserr = 0; + + text *pixeltypetext = NULL; + char *pixeltype = NULL; + rt_pixtype pixtype = PT_END; + rt_pixtype *pixtypes = NULL; + int pixtypes_len = 0; + + double *values = NULL; + int values_len = 0; + + uint8_t *hasnodatas = NULL; + double *nodatavals = NULL; + int nodatavals_len = 0; + + double ulw[2] = {0}; + double *ul_xw = NULL; + double *ul_yw = NULL; + + double gridw[2] = {0}; + double *grid_xw = NULL; + double *grid_yw = NULL; + + double skew[2] = {0}; + double *skew_x = NULL; + double *skew_y = NULL; + + char **options = NULL; + int options_len = 0; + + uint32_t num_bands = 0; + + int srid = SRID_UNKNOWN; + char *srs = NULL; + + POSTGIS_RT_DEBUG(3, "RASTER_asRaster: Starting"); + + /* based upon LWGEOM_asBinary function in postgis/lwgeom_ogc.c */ + + /* Get the geometry */ + if (PG_ARGISNULL(0)) + PG_RETURN_NULL(); + + gser = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + geom = lwgeom_from_gserialized(gser); + + /* Get a 2D version of the geometry if necessary */ + if (lwgeom_ndims(geom) > 2) { + LWGEOM *geom2d = lwgeom_force_2d(geom); + lwgeom_free(geom); + geom = geom2d; + } + + /* scale x */ + if (!PG_ARGISNULL(1)) { + scale[0] = PG_GETARG_FLOAT8(1); + if (FLT_NEQ(scale[0], 0)) scale_x = &scale[0]; + } + + /* scale y */ + if (!PG_ARGISNULL(2)) { + scale[1] = PG_GETARG_FLOAT8(2); + if (FLT_NEQ(scale[1], 0)) scale_y = &scale[1]; + } + POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: scale (x, y) = %f, %f", scale[0], scale[1]); + + /* width */ + if (!PG_ARGISNULL(3)) { + dim[0] = PG_GETARG_INT32(3); + if (dim[0] < 0) dim[0] = 0; + if (dim[0] != 0) dim_x = &dim[0]; + } + + /* height */ + if (!PG_ARGISNULL(4)) { + dim[1] = PG_GETARG_INT32(4); + if (dim[1] < 0) dim[1] = 0; + if (dim[1] != 0) dim_y = &dim[1]; + } + POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: dim (x, y) = %d, %d", dim[0], dim[1]); + + /* pixeltype */ + if (!PG_ARGISNULL(5)) { + array = PG_GETARG_ARRAYTYPE_P(5); + etype = ARR_ELEMTYPE(array); + get_typlenbyvalalign(etype, &typlen, &typbyval, &typalign); + + switch (etype) { + case TEXTOID: + break; + default: + elog(ERROR, "RASTER_asRaster: Invalid data type for pixeltype"); + + lwgeom_free(geom); + + PG_RETURN_NULL(); + break; + } + + ndims = ARR_NDIM(array); + dims = ARR_DIMS(array); + lbs = ARR_LBOUND(array); + + deconstruct_array(array, etype, typlen, typbyval, typalign, &e, + &nulls, &n); + + if (n) { + pixtypes = (rt_pixtype *) palloc(sizeof(rt_pixtype) * n); + /* clean each pixeltype */ + for (i = 0, j = 0; i < n; i++) { + if (nulls[i]) { + pixtypes[j++] = PT_64BF; + continue; + } + + pixeltype = NULL; + switch (etype) { + case TEXTOID: + pixeltypetext = (text *) DatumGetPointer(e[i]); + if (NULL == pixeltypetext) break; + pixeltype = text_to_cstring(pixeltypetext); + + /* trim string */ + pixeltype = rtpg_trim(pixeltype); + POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: pixeltype is '%s'", pixeltype); + break; + } + + if (strlen(pixeltype)) { + pixtype = rt_pixtype_index_from_name(pixeltype); + if (pixtype == PT_END) { + elog(ERROR, "RASTER_asRaster: Invalid pixel type provided: %s", pixeltype); + + pfree(pixtypes); + + lwgeom_free(geom); + + PG_RETURN_NULL(); + } + + pixtypes[j] = pixtype; + j++; + } + } + + if (j > 0) { + /* trim allocation */ + pixtypes = repalloc(pixtypes, j * sizeof(rt_pixtype)); + pixtypes_len = j; + } + else { + pfree(pixtypes); + pixtypes = NULL; + pixtypes_len = 0; + } + } + } +#if POSTGIS_DEBUG_LEVEL > 0 + for (i = 0; i < pixtypes_len; i++) + POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: pixtypes[%d] = %d", i, (int) pixtypes[i]); +#endif + + /* value */ + if (!PG_ARGISNULL(6)) { + array = PG_GETARG_ARRAYTYPE_P(6); + etype = ARR_ELEMTYPE(array); + get_typlenbyvalalign(etype, &typlen, &typbyval, &typalign); + + switch (etype) { + case FLOAT4OID: + case FLOAT8OID: + break; + default: + elog(ERROR, "RASTER_asRaster: Invalid data type for value"); + + if (pixtypes_len) pfree(pixtypes); + + lwgeom_free(geom); + + PG_RETURN_NULL(); + break; + } + + ndims = ARR_NDIM(array); + dims = ARR_DIMS(array); + lbs = ARR_LBOUND(array); + + deconstruct_array(array, etype, typlen, typbyval, typalign, &e, + &nulls, &n); + + if (n) { + values = (double *) palloc(sizeof(double) * n); + for (i = 0, j = 0; i < n; i++) { + if (nulls[i]) { + values[j++] = 1; + continue; + } + + switch (etype) { + case FLOAT4OID: + values[j] = (double) DatumGetFloat4(e[i]); + break; + case FLOAT8OID: + values[j] = (double) DatumGetFloat8(e[i]); + break; + } + POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: values[%d] = %f", j, values[j]); + + j++; + } + + if (j > 0) { + /* trim allocation */ + values = repalloc(values, j * sizeof(double)); + values_len = j; + } + else { + pfree(values); + values = NULL; + values_len = 0; + } + } + } +#if POSTGIS_DEBUG_LEVEL > 0 + for (i = 0; i < values_len; i++) + POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: values[%d] = %f", i, values[i]); +#endif + + /* nodataval */ + if (!PG_ARGISNULL(7)) { + array = PG_GETARG_ARRAYTYPE_P(7); + etype = ARR_ELEMTYPE(array); + get_typlenbyvalalign(etype, &typlen, &typbyval, &typalign); + + switch (etype) { + case FLOAT4OID: + case FLOAT8OID: + break; + default: + elog(ERROR, "RASTER_asRaster: Invalid data type for nodataval"); + + if (pixtypes_len) pfree(pixtypes); + if (values_len) pfree(values); + + lwgeom_free(geom); + + PG_RETURN_NULL(); + break; + } + + ndims = ARR_NDIM(array); + dims = ARR_DIMS(array); + lbs = ARR_LBOUND(array); + + deconstruct_array(array, etype, typlen, typbyval, typalign, &e, + &nulls, &n); + + if (n) { + nodatavals = (double *) palloc(sizeof(double) * n); + hasnodatas = (uint8_t *) palloc(sizeof(uint8_t) * n); + for (i = 0, j = 0; i < n; i++) { + if (nulls[i]) { + hasnodatas[j] = 0; + nodatavals[j] = 0; + j++; + continue; + } + + hasnodatas[j] = 1; + switch (etype) { + case FLOAT4OID: + nodatavals[j] = (double) DatumGetFloat4(e[i]); + break; + case FLOAT8OID: + nodatavals[j] = (double) DatumGetFloat8(e[i]); + break; + } + POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: hasnodatas[%d] = %d", j, hasnodatas[j]); + POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: nodatavals[%d] = %f", j, nodatavals[j]); + + j++; + } + + if (j > 0) { + /* trim allocation */ + nodatavals = repalloc(nodatavals, j * sizeof(double)); + hasnodatas = repalloc(hasnodatas, j * sizeof(uint8_t)); + nodatavals_len = j; + } + else { + pfree(nodatavals); + pfree(hasnodatas); + nodatavals = NULL; + hasnodatas = NULL; + nodatavals_len = 0; + } + } + } +#if POSTGIS_DEBUG_LEVEL > 0 + for (i = 0; i < nodatavals_len; i++) { + POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: hasnodatas[%d] = %d", i, hasnodatas[i]); + POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: nodatavals[%d] = %f", i, nodatavals[i]); + } +#endif + + /* upperleftx */ + if (!PG_ARGISNULL(8)) { + ulw[0] = PG_GETARG_FLOAT8(8); + ul_xw = &ulw[0]; + } + + /* upperlefty */ + if (!PG_ARGISNULL(9)) { + ulw[1] = PG_GETARG_FLOAT8(9); + ul_yw = &ulw[1]; + } + POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: upperleft (x, y) = %f, %f", ulw[0], ulw[1]); + + /* gridx */ + if (!PG_ARGISNULL(10)) { + gridw[0] = PG_GETARG_FLOAT8(10); + grid_xw = &gridw[0]; + } + + /* gridy */ + if (!PG_ARGISNULL(11)) { + gridw[1] = PG_GETARG_FLOAT8(11); + grid_yw = &gridw[1]; + } + POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: grid (x, y) = %f, %f", gridw[0], gridw[1]); + + /* check dependent variables */ + haserr = 0; + do { + /* only part of scale provided */ + if ( + (scale_x == NULL && scale_y != NULL) || + (scale_x != NULL && scale_y == NULL) + ) { + elog(NOTICE, "Values must be provided for both X and Y of scale if one is specified"); + haserr = 1; + break; + } + + /* only part of dimension provided */ + if ( + (dim_x == NULL && dim_y != NULL) || + (dim_x != NULL && dim_y == NULL) + ) { + elog(NOTICE, "Values must be provided for both width and height if one is specified"); + haserr = 1; + break; + } + + /* scale and dimension provided */ + if ( + (scale_x != NULL && scale_y != NULL) && + (dim_x != NULL && dim_y != NULL) + ) { + elog(NOTICE, "Values provided for X and Y of scale and width and height. Using the width and height"); + scale_x = NULL; + scale_y = NULL; + break; + } + + /* neither scale or dimension provided */ + if ( + (scale_x == NULL && scale_y == NULL) && + (dim_x == NULL && dim_y == NULL) + ) { + elog(NOTICE, "Values must be provided for X and Y of scale or width and height"); + haserr = 1; + break; + } + + /* only part of upper-left provided */ + if ( + (ul_xw == NULL && ul_yw != NULL) || + (ul_xw != NULL && ul_yw == NULL) + ) { + elog(NOTICE, "Values must be provided for both X and Y when specifying the upper-left corner"); + haserr = 1; + break; + } + + /* only part of alignment provided */ + if ( + (grid_xw == NULL && grid_yw != NULL) || + (grid_xw != NULL && grid_yw == NULL) + ) { + elog(NOTICE, "Values must be provided for both X and Y when specifying the alignment"); + haserr = 1; + break; + } + + /* upper-left and alignment provided */ + if ( + (ul_xw != NULL && ul_yw != NULL) && + (grid_xw != NULL && grid_yw != NULL) + ) { + elog(NOTICE, "Values provided for both X and Y of upper-left corner and alignment. Using the values of upper-left corner"); + grid_xw = NULL; + grid_yw = NULL; + break; + } + } + while (0); + + if (haserr) { + if (pixtypes_len) pfree(pixtypes); + if (values_len) pfree(values); + if (nodatavals_len) { + pfree(nodatavals); + pfree(hasnodatas); + } + + lwgeom_free(geom); + + PG_RETURN_NULL(); + } + + /* skewx */ + if (!PG_ARGISNULL(12)) { + skew[0] = PG_GETARG_FLOAT8(12); + if (FLT_NEQ(skew[0], 0)) skew_x = &skew[0]; + } + + /* skewy */ + if (!PG_ARGISNULL(13)) { + skew[1] = PG_GETARG_FLOAT8(13); + if (FLT_NEQ(skew[1], 0)) skew_y = &skew[1]; + } + POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: skew (x, y) = %f, %f", skew[0], skew[1]); + + /* all touched */ + if (!PG_ARGISNULL(14) && PG_GETARG_BOOL(14) == TRUE) { + if (options_len < 1) { + options_len = 1; + options = (char **) palloc(sizeof(char *) * options_len); + } + else { + options_len++; + options = (char **) repalloc(options, sizeof(char *) * options_len); + } + + options[options_len - 1] = palloc(sizeof(char*) * (strlen("ALL_TOUCHED=TRUE") + 1)); + options[options_len - 1] = "ALL_TOUCHED=TRUE"; + } + + if (options_len) { + options_len++; + options = (char **) repalloc(options, sizeof(char *) * options_len); + options[options_len - 1] = NULL; + } + + /* get geometry's srid */ + srid = gserialized_get_srid(gser); + + POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: srid = %d", srid); + if (clamp_srid(srid) != SRID_UNKNOWN) { + srs = rtpg_getSR(srid); + if (NULL == srs) { + elog(ERROR, "RASTER_asRaster: Could not find srtext for SRID (%d)", srid); + + if (pixtypes_len) pfree(pixtypes); + if (values_len) pfree(values); + if (nodatavals_len) { + pfree(hasnodatas); + pfree(nodatavals); + } + if (options_len) pfree(options); + + lwgeom_free(geom); + + PG_RETURN_NULL(); + } + POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: srs is %s", srs); + } + else + srs = NULL; + + /* determine number of bands */ + /* MIN macro is from GDAL's cpl_port.h */ + num_bands = MIN(pixtypes_len, values_len); + num_bands = MIN(num_bands, nodatavals_len); + POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: pixtypes_len = %d", pixtypes_len); + POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: values_len = %d", values_len); + POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: nodatavals_len = %d", nodatavals_len); + POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: num_bands = %d", num_bands); + + /* warn of imbalanced number of band elements */ + if (!( + (pixtypes_len == values_len) && + (values_len == nodatavals_len) + )) { + elog( + NOTICE, + "Imbalanced number of values provided for pixeltype (%d), value (%d) and nodataval (%d). Using the first %d values of each parameter", + pixtypes_len, + values_len, + nodatavals_len, + num_bands + ); + } + + /* get wkb of geometry */ + POSTGIS_RT_DEBUG(3, "RASTER_asRaster: getting wkb of geometry"); + wkb = lwgeom_to_wkb(geom, variant, &wkb_len); + lwgeom_free(geom); + + /* rasterize geometry */ + POSTGIS_RT_DEBUG(3, "RASTER_asRaster: rasterizing geometry"); + /* use nodatavals for the init parameter */ + rast = rt_raster_gdal_rasterize(wkb, + (uint32_t) wkb_len, srs, + num_bands, pixtypes, + nodatavals, values, + nodatavals, hasnodatas, + dim_x, dim_y, + scale_x, scale_y, + ul_xw, ul_yw, + grid_xw, grid_yw, + skew_x, skew_y, + options + ); + + if (pixtypes_len) pfree(pixtypes); + if (values_len) pfree(values); + if (nodatavals_len) { + pfree(hasnodatas); + pfree(nodatavals); + } + if (options_len) pfree(options); + + if (!rast) { + elog(ERROR, "RASTER_asRaster: Could not rasterize geometry"); + PG_RETURN_NULL(); + } + + /* add target srid */ + rt_raster_set_srid(rast, srid); + + pgrast = rt_raster_serialize(rast); + rt_raster_destroy(rast); + + if (NULL == pgrast) PG_RETURN_NULL(); + + POSTGIS_RT_DEBUG(3, "RASTER_asRaster: done"); + + SET_VARSIZE(pgrast, pgrast->size); + PG_RETURN_POINTER(pgrast); +} + +/** + * Resample a raster + */ +PG_FUNCTION_INFO_V1(RASTER_resample); +Datum RASTER_resample(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster = NULL; + rt_pgraster *pgrast = NULL; + rt_raster raster = NULL; + rt_raster rast = NULL; + + text *algtext = NULL; + char *algchar = NULL; + GDALResampleAlg alg = GRA_NearestNeighbour; + double max_err = 0.125; + + int src_srid = SRID_UNKNOWN; + char *src_srs = NULL; + int dst_srid = SRID_UNKNOWN; + char *dst_srs = NULL; + + double scale[2] = {0}; + double *scale_x = NULL; + double *scale_y = NULL; + + double gridw[2] = {0}; + double *grid_xw = NULL; + double *grid_yw = NULL; + + double skew[2] = {0}; + double *skew_x = NULL; + double *skew_y = NULL; + + int dim[2] = {0}; + int *dim_x = NULL; + int *dim_y = NULL; + + POSTGIS_RT_DEBUG(3, "RASTER_resample: Starting"); + + /* pgraster is null, return null */ + if (PG_ARGISNULL(0)) + PG_RETURN_NULL(); + pgraster = (rt_pgraster *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + + /* raster */ + raster = rt_raster_deserialize(pgraster, FALSE); + if (!raster) { + elog(ERROR, "RASTER_resample: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + /* resampling algorithm */ + if (!PG_ARGISNULL(1)) { + algtext = PG_GETARG_TEXT_P(1); + algchar = rtpg_trim(rtpg_strtoupper(text_to_cstring(algtext))); + alg = rt_util_gdal_resample_alg(algchar); + } + POSTGIS_RT_DEBUGF(4, "Resampling algorithm: %d", alg); + + /* max error */ + if (!PG_ARGISNULL(2)) { + max_err = PG_GETARG_FLOAT8(2); + if (max_err < 0.) max_err = 0.; + } + POSTGIS_RT_DEBUGF(4, "max_err: %f", max_err); + + /* source srid */ + src_srid = rt_raster_get_srid(raster); + if (clamp_srid(src_srid) == SRID_UNKNOWN) { + elog(ERROR, "RASTER_resample: Input raster has unknown (%d) SRID", src_srid); + rt_raster_destroy(raster); + PG_RETURN_NULL(); + } + POSTGIS_RT_DEBUGF(4, "source srid: %d", src_srid); + + /* target srid */ + if (!PG_ARGISNULL(3)) { + dst_srid = PG_GETARG_INT32(3); + if (clamp_srid(dst_srid) == SRID_UNKNOWN) { + elog(ERROR, "RASTER_resample: %d is an invalid target SRID", dst_srid); + rt_raster_destroy(raster); + PG_RETURN_NULL(); + } + } + else + dst_srid = src_srid; + POSTGIS_RT_DEBUGF(4, "destination srid: %d", dst_srid); + + /* scale x */ + if (!PG_ARGISNULL(4)) { + scale[0] = PG_GETARG_FLOAT8(4); + if (FLT_NEQ(scale[0], 0)) scale_x = &scale[0]; + } + + /* scale y */ + if (!PG_ARGISNULL(5)) { + scale[1] = PG_GETARG_FLOAT8(5); + if (FLT_NEQ(scale[1], 0)) scale_y = &scale[1]; + } + + /* grid alignment x */ + if (!PG_ARGISNULL(6)) { + gridw[0] = PG_GETARG_FLOAT8(6); + grid_xw = &gridw[0]; + } + + /* grid alignment y */ + if (!PG_ARGISNULL(7)) { + gridw[1] = PG_GETARG_FLOAT8(7); + grid_yw = &gridw[1]; + } + + /* skew x */ + if (!PG_ARGISNULL(8)) { + skew[0] = PG_GETARG_FLOAT8(8); + if (FLT_NEQ(skew[0], 0)) skew_x = &skew[0]; + } + + /* skew y */ + if (!PG_ARGISNULL(9)) { + skew[1] = PG_GETARG_FLOAT8(9); + if (FLT_NEQ(skew[1], 0)) skew_y = &skew[1]; + } + + /* width */ + if (!PG_ARGISNULL(10)) { + dim[0] = PG_GETARG_INT32(10); + if (dim[0] < 0) dim[0] = 0; + if (dim[0] > 0) dim_x = &dim[0]; + } + + /* height */ + if (!PG_ARGISNULL(11)) { + dim[1] = PG_GETARG_INT32(11); + if (dim[1] < 0) dim[1] = 0; + if (dim[1] > 0) dim_y = &dim[1]; + } + + /* check that at least something is to be done */ + if ( + (clamp_srid(dst_srid) == SRID_UNKNOWN) && + (scale_x == NULL) && + (scale_y == NULL) && + (grid_xw == NULL) && + (grid_yw == NULL) && + (skew_x == NULL) && + (skew_y == NULL) && + (dim_x == NULL) && + (dim_y == NULL) + ) { + elog(NOTICE, "No resampling parameters provided. Returning original raster"); + rt_raster_destroy(raster); + PG_RETURN_POINTER(pgraster); + } + /* both values of alignment must be provided if any one is provided */ + else if ( + (grid_xw != NULL && grid_yw == NULL) || + (grid_xw == NULL && grid_yw != NULL) + ) { + elog(NOTICE, "Values must be provided for both X and Y when specifying the alignment. Returning original raster"); + rt_raster_destroy(raster); + PG_RETURN_POINTER(pgraster); + } + /* both values of scale must be provided if any one is provided */ + else if ( + (scale_x != NULL && scale_y == NULL) || + (scale_x == NULL && scale_y != NULL) + ) { + elog(NOTICE, "Values must be provided for both X and Y when specifying the scale. Returning original raster"); + rt_raster_destroy(raster); + PG_RETURN_POINTER(pgraster); + } + /* scale and width/height provided */ + else if ( + (scale_x != NULL || scale_y != NULL) && + (dim_x != NULL || dim_y != NULL) + ) { + elog(NOTICE, "Scale X/Y and width/height are mutually exclusive. Only provide one. Returning original raster"); + rt_raster_destroy(raster); + PG_RETURN_POINTER(pgraster); + } + + /* get srses from srids */ + /* source srs */ + src_srs = rtpg_getSR(src_srid); + if (NULL == src_srs) { + elog(ERROR, "RASTER_resample: Input raster has unknown SRID (%d)", src_srid); + rt_raster_destroy(raster); + PG_RETURN_NULL(); + } + POSTGIS_RT_DEBUGF(4, "src srs: %s", src_srs); + + /* target srs */ + if (clamp_srid(dst_srid) != SRID_UNKNOWN) { + dst_srs = rtpg_getSR(dst_srid); + if (NULL == dst_srs) { + elog(ERROR, "RASTER_resample: Target SRID (%d) is unknown", dst_srid); + rt_raster_destroy(raster); + if (NULL != src_srs) pfree(src_srs); + PG_RETURN_NULL(); + } + POSTGIS_RT_DEBUGF(4, "dst srs: %s", dst_srs); + } + + rast = rt_raster_gdal_warp(raster, src_srs, + dst_srs, + scale_x, scale_y, + dim_x, dim_y, + NULL, NULL, + grid_xw, grid_yw, + skew_x, skew_y, + alg, max_err); + rt_raster_destroy(raster); + if (NULL != src_srs) pfree(src_srs); + if (NULL != dst_srs) pfree(dst_srs); + if (!rast) { + elog(ERROR, "RASTER_band: Could not create transformed raster"); + PG_RETURN_NULL(); + } + + /* add target srid */ + rt_raster_set_srid(rast, dst_srid); + + pgrast = rt_raster_serialize(rast); + rt_raster_destroy(rast); + + if (NULL == pgrast) PG_RETURN_NULL(); + + POSTGIS_RT_DEBUG(3, "RASTER_resample: done"); + + SET_VARSIZE(pgrast, pgrast->size); + PG_RETURN_POINTER(pgrast); +} + +/** + * Get raster's meta data + */ +PG_FUNCTION_INFO_V1(RASTER_metadata); +Datum RASTER_metadata(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster = NULL; + rt_raster raster = NULL; + + uint32_t numBands; + double scaleX; + double scaleY; + double ipX; + double ipY; + double skewX; + double skewY; + int32_t srid; + uint32_t width; + uint32_t height; + + TupleDesc tupdesc; + bool *nulls = NULL; + int values_length = 10; + Datum values[values_length]; + HeapTuple tuple; + Datum result; + + POSTGIS_RT_DEBUG(3, "RASTER_metadata: Starting"); + + /* pgraster is null, return null */ + if (PG_ARGISNULL(0)) + PG_RETURN_NULL(); + pgraster = (rt_pgraster *) PG_DETOAST_DATUM_SLICE(PG_GETARG_DATUM(0), 0, sizeof(struct rt_raster_serialized_t)); + + /* raster */ + raster = rt_raster_deserialize(pgraster, TRUE); + if (!raster) { + elog(ERROR, "RASTER_metadata; Could not deserialize raster"); + PG_RETURN_NULL(); + } + + /* upper left x, y */ + ipX = rt_raster_get_x_offset(raster); + ipY = rt_raster_get_y_offset(raster); + + /* width, height */ + width = rt_raster_get_width(raster); + height = rt_raster_get_height(raster); + + /* scale x, y */ + scaleX = rt_raster_get_x_scale(raster); + scaleY = rt_raster_get_y_scale(raster); + + /* skew x, y */ + skewX = rt_raster_get_x_skew(raster); + skewY = rt_raster_get_y_skew(raster); + + /* srid */ + srid = rt_raster_get_srid(raster); + + /* numbands */ + numBands = rt_raster_get_num_bands(raster); + + rt_raster_destroy(raster); + + /* Build a tuple descriptor for our result type */ + if (get_call_result_type(fcinfo, NULL, &tupdesc) != TYPEFUNC_COMPOSITE) { + ereport(ERROR, ( + errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg( + "function returning record called in context " + "that cannot accept type record" + ) + )); + } + + BlessTupleDesc(tupdesc); + + values[0] = Float8GetDatum(ipX); + values[1] = Float8GetDatum(ipY); + values[2] = UInt32GetDatum(width); + values[3] = UInt32GetDatum(height); + values[4] = Float8GetDatum(scaleX); + values[5] = Float8GetDatum(scaleY); + values[6] = Float8GetDatum(skewX); + values[7] = Float8GetDatum(skewY); + values[8] = Int32GetDatum(srid); + values[9] = UInt32GetDatum(numBands); + + nulls = palloc(sizeof(bool) * values_length); + memset(nulls, FALSE, values_length); + + /* build a tuple */ + tuple = heap_form_tuple(tupdesc, values, nulls); + + /* make the tuple into a datum */ + result = HeapTupleGetDatum(tuple); + + /* clean up */ + pfree(nulls); + + PG_RETURN_DATUM(result); +} + +/** + * Get raster bands' meta data + */ +PG_FUNCTION_INFO_V1(RASTER_bandmetadata); +Datum RASTER_bandmetadata(PG_FUNCTION_ARGS) +{ + FuncCallContext *funcctx; + TupleDesc tupdesc; + int call_cntr; + int max_calls; + + struct bandmetadata { + uint32_t bandnum; + char *pixeltype; + bool hasnodata; + double nodataval; + bool isoutdb; + char *bandpath; + }; + struct bandmetadata *bmd = NULL; + struct bandmetadata *bmd2 = NULL; + + bool *nulls = NULL; + int values_length = 5; + Datum values[values_length]; + HeapTuple tuple; + Datum result; + + if (SRF_IS_FIRSTCALL()) { + MemoryContext oldcontext; + + rt_pgraster *pgraster = NULL; + rt_raster raster = NULL; + rt_band band = NULL; + + ArrayType *array; + Oid etype; + Datum *e; + bool *nulls; + int16 typlen; + bool typbyval; + char typalign; + int ndims = 1; + int *dims; + int *lbs; + int i = 0; + int j = 0; + int n = 0; + + uint32_t numBands; + uint32_t idx = 1; + uint32_t *bandNums = NULL; + const char *tmp = NULL; + + POSTGIS_RT_DEBUG(3, "RASTER_bandmetadata: Starting"); + + /* create a function context for cross-call persistence */ + funcctx = SRF_FIRSTCALL_INIT(); + + /* switch to memory context appropriate for multiple function calls */ + oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx); + + /* pgraster is null, return null */ + if (PG_ARGISNULL(0)) { + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + pgraster = (rt_pgraster *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + + /* raster */ + raster = rt_raster_deserialize(pgraster, FALSE); + if (!raster) { + elog(ERROR, "RASTER_bandmetadata: Could not deserialize raster"); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + /* numbands */ + numBands = rt_raster_get_num_bands(raster); + if (numBands < 1) { + elog(NOTICE, "Raster provided has no bands"); + rt_raster_destroy(raster); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + /* band index */ + array = PG_GETARG_ARRAYTYPE_P(1); + etype = ARR_ELEMTYPE(array); + get_typlenbyvalalign(etype, &typlen, &typbyval, &typalign); + + switch (etype) { + case INT2OID: + case INT4OID: + break; + default: + elog(ERROR, "RASTER_bandmetadata: Invalid data type for band number(s)"); + rt_raster_destroy(raster); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + break; + } + + ndims = ARR_NDIM(array); + dims = ARR_DIMS(array); + lbs = ARR_LBOUND(array); + + deconstruct_array(array, etype, typlen, typbyval, typalign, &e, + &nulls, &n); + + bandNums = palloc(sizeof(uint32_t) * n); + for (i = 0, j = 0; i < n; i++) { + if (nulls[i]) continue; + + switch (etype) { + case INT2OID: + idx = (uint32_t) DatumGetInt16(e[i]); + break; + case INT4OID: + idx = (uint32_t) DatumGetInt32(e[i]); + break; + } + + POSTGIS_RT_DEBUGF(3, "band idx (before): %d", idx); + if (idx > numBands || idx < 1) { + elog(NOTICE, "Invalid band index: %d. Indices must be 1-based. Returning NULL", idx); + pfree(bandNums); + rt_raster_destroy(raster); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + bandNums[j] = idx; + POSTGIS_RT_DEBUGF(3, "bandNums[%d] = %d", j, bandNums[j]); + j++; + } + + if (j < 1) { + j = numBands; + bandNums = repalloc(bandNums, sizeof(uint32_t) * j); + for (i = 0; i < j; i++) + bandNums[i] = i + 1; + } + else if (j < n) + bandNums = repalloc(bandNums, sizeof(uint32_t) * j); + + bmd = (struct bandmetadata *) palloc(sizeof(struct bandmetadata) * j); + + for (i = 0; i < j; i++) { + band = rt_raster_get_band(raster, bandNums[i] - 1); + if (NULL == band) { + elog(NOTICE, "Could not get raster band at index %d", bandNums[i]); + rt_raster_destroy(raster); + MemoryContextSwitchTo(oldcontext); + SRF_RETURN_DONE(funcctx); + } + + /* bandnum */ + bmd[i].bandnum = bandNums[i]; + + /* pixeltype */ + tmp = rt_pixtype_name(rt_band_get_pixtype(band)); + bmd[i].pixeltype = palloc(sizeof(char) * (strlen(tmp) + 1)); + strncpy(bmd[i].pixeltype, tmp, strlen(tmp) + 1); + + /* hasnodatavalue */ + if (rt_band_get_hasnodata_flag(band)) + bmd[i].hasnodata = TRUE; + else + bmd[i].hasnodata = FALSE; + + /* nodatavalue */ + if (bmd[i].hasnodata) + bmd[i].nodataval = rt_band_get_nodata(band); + else + bmd[i].nodataval = 0; + + /* path */ + tmp = rt_band_get_ext_path(band); + if (tmp) { + bmd[i].bandpath = palloc(sizeof(char) * (strlen(tmp) + 1)); + strncpy(bmd[i].bandpath, tmp, strlen(tmp) + 1); + } + else + bmd[i].bandpath = NULL; + + /* isoutdb */ + bmd[i].isoutdb = bmd[i].bandpath ? TRUE : FALSE; + + rt_band_destroy(band); + } + + rt_raster_destroy(raster); + + /* Store needed information */ + funcctx->user_fctx = bmd; + + /* total number of tuples to be returned */ + funcctx->max_calls = j; + + /* Build a tuple descriptor for our result type */ + if (get_call_result_type(fcinfo, NULL, &tupdesc) != TYPEFUNC_COMPOSITE) { + MemoryContextSwitchTo(oldcontext); + ereport(ERROR, ( + errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg( + "function returning record called in context " + "that cannot accept type record" + ) + )); + } + + BlessTupleDesc(tupdesc); + funcctx->tuple_desc = tupdesc; + + MemoryContextSwitchTo(oldcontext); + } + + /* stuff done on every call of the function */ + funcctx = SRF_PERCALL_SETUP(); + + call_cntr = funcctx->call_cntr; + max_calls = funcctx->max_calls; + tupdesc = funcctx->tuple_desc; + bmd2 = funcctx->user_fctx; + + /* do when there is more left to send */ + if (call_cntr < max_calls) { + nulls = palloc(sizeof(bool) * values_length); + memset(nulls, FALSE, values_length); + + values[0] = UInt32GetDatum(bmd2[call_cntr].bandnum); + values[1] = CStringGetTextDatum(bmd2[call_cntr].pixeltype); + + if (bmd2[call_cntr].hasnodata) + values[2] = Float8GetDatum(bmd2[call_cntr].nodataval); + else + nulls[2] = TRUE; + + values[3] = BoolGetDatum(bmd2[call_cntr].isoutdb); + if (bmd2[call_cntr].bandpath && strlen(bmd2[call_cntr].bandpath)) + values[4] = CStringGetTextDatum(bmd2[call_cntr].bandpath); + else + nulls[4] = TRUE; + + /* build a tuple */ + tuple = heap_form_tuple(tupdesc, values, nulls); + + /* make the tuple into a datum */ + result = HeapTupleGetDatum(tuple); + + /* clean up */ + pfree(nulls); + pfree(bmd2[call_cntr].pixeltype); + if (bmd2[call_cntr].bandpath) pfree(bmd2[call_cntr].bandpath); + + SRF_RETURN_NEXT(funcctx, result); + } + /* do when there is no more left */ + else { + pfree(bmd2); + SRF_RETURN_DONE(funcctx); + } +} + +PG_FUNCTION_INFO_V1(RASTER_rasterToWorldCoord); +Datum RASTER_rasterToWorldCoord(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster = NULL; + rt_raster raster = NULL; + int i = 0; + int cr[2] = {0}; + bool skewed[2] = {false, false}; + double cw[2] = {0}; + + TupleDesc tupdesc; + int values_length = 2; + Datum values[values_length]; + bool nulls[values_length]; + HeapTuple tuple; + Datum result; + + POSTGIS_RT_DEBUG(3, "RASTER_rasterToWorldCoord: Starting"); + + /* pgraster is null, return null */ + if (PG_ARGISNULL(0)) + PG_RETURN_NULL(); + pgraster = (rt_pgraster *) PG_DETOAST_DATUM_SLICE(PG_GETARG_DATUM(0), 0, sizeof(struct rt_raster_serialized_t)); + + /* raster */ + raster = rt_raster_deserialize(pgraster, TRUE); + if (!raster) { + elog(ERROR, "RASTER_rasterToWorldCoord: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + /* raster skewed? */ + skewed[0] = FLT_NEQ(rt_raster_get_x_skew(raster), 0) ? true : false; + skewed[1] = FLT_NEQ(rt_raster_get_y_skew(raster), 0) ? true : false; + + /* column and row */ + for (i = 1; i <= 2; i++) { + if (PG_ARGISNULL(i)) { + /* if skewed on same axis, parameter is required */ + if (skewed[i - 1]) { + /* in 2.0, error is ERROR. for 2.1 must change to NOTICE */ + elog(ERROR, "RASTER_rasterToWorldCoord: Pixel row and column required for computing longitude and latitude of a rotated raster"); + rt_raster_destroy(raster); + PG_RETURN_NULL(); + } + + continue; + } + + cr[i - 1] = PG_GETARG_INT32(i); + } + + /* user-provided value is 1-based but needs to be 0-based */ + if (rt_raster_cell_to_geopoint( + raster, + (double) cr[0] - 1, (double) cr[1] - 1, + &(cw[0]), &(cw[1]), + NULL + ) == 0) { + elog(ERROR, "RASTER_rasterToWorldCoord: Could not compute longitude and latitude from pixel row and column"); + rt_raster_destroy(raster); + PG_RETURN_NULL(); + } + rt_raster_destroy(raster); + + /* Build a tuple descriptor for our result type */ + if (get_call_result_type(fcinfo, NULL, &tupdesc) != TYPEFUNC_COMPOSITE) { + ereport(ERROR, ( + errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg( + "function returning record called in context " + "that cannot accept type record" + ) + )); + } + + BlessTupleDesc(tupdesc); + + values[0] = Float8GetDatum(cw[0]); + values[1] = Float8GetDatum(cw[1]); + + memset(nulls, FALSE, values_length); + + /* build a tuple */ + tuple = heap_form_tuple(tupdesc, values, nulls); + + /* make the tuple into a datum */ + result = HeapTupleGetDatum(tuple); + + PG_RETURN_DATUM(result); +} + +PG_FUNCTION_INFO_V1(RASTER_worldToRasterCoord); +Datum RASTER_worldToRasterCoord(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster = NULL; + rt_raster raster = NULL; + int i = 0; + double cw[2] = {0}; + double _cr[2] = {0}; + int cr[2] = {0}; + bool skewed = false; + + TupleDesc tupdesc; + int values_length = 2; + Datum values[values_length]; + bool nulls[values_length]; + HeapTuple tuple; + Datum result; + + POSTGIS_RT_DEBUG(3, "RASTER_worldToRasterCoord: Starting"); + + /* pgraster is null, return null */ + if (PG_ARGISNULL(0)) + PG_RETURN_NULL(); + pgraster = (rt_pgraster *) PG_DETOAST_DATUM_SLICE(PG_GETARG_DATUM(0), 0, sizeof(struct rt_raster_serialized_t)); + + /* raster */ + raster = rt_raster_deserialize(pgraster, TRUE); + if (!raster) { + elog(ERROR, "RASTER_worldToRasterCoord: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + /* raster skewed? */ + skewed = FLT_NEQ(rt_raster_get_x_skew(raster), 0) ? true : false; + if (!skewed) + skewed = FLT_NEQ(rt_raster_get_y_skew(raster), 0) ? true : false; + + /* longitude and latitude */ + for (i = 1; i <= 2; i++) { + if (PG_ARGISNULL(i)) { + /* if skewed, parameter is required */ + if (skewed) { + /* in 2.0, error is ERROR. for 2.1 must change to NOTICE */ + elog(ERROR, "RASTER_worldToRasterCoord: Latitude and longitude required for computing pixel row and column of a rotated raster"); + rt_raster_destroy(raster); + PG_RETURN_NULL(); + } + + continue; + } + + cw[i - 1] = PG_GETARG_FLOAT8(i); + } + + /* return pixel row and column values are 0-based */ + if (rt_raster_geopoint_to_cell( + raster, + cw[0], cw[1], + &(_cr[0]), &(_cr[1]), + NULL + ) == 0) { + elog(ERROR, "RASTER_worldToRasterCoord: Could not compute pixel row and column from longitude and latitude"); + rt_raster_destroy(raster); + PG_RETURN_NULL(); + } + rt_raster_destroy(raster); + + /* force to integer and add one to make 1-based */ + cr[0] = ((int) _cr[0]) + 1; + cr[1] = ((int) _cr[1]) + 1; + + /* Build a tuple descriptor for our result type */ + if (get_call_result_type(fcinfo, NULL, &tupdesc) != TYPEFUNC_COMPOSITE) { + ereport(ERROR, ( + errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg( + "function returning record called in context " + "that cannot accept type record" + ) + )); + } + + BlessTupleDesc(tupdesc); + + values[0] = Int32GetDatum(cr[0]); + values[1] = Int32GetDatum(cr[1]); + + memset(nulls, FALSE, values_length); + + /* build a tuple */ + tuple = heap_form_tuple(tupdesc, values, nulls); + + /* make the tuple into a datum */ + result = HeapTupleGetDatum(tuple); + + PG_RETURN_DATUM(result); +} + +/** + * See if two rasters intersect + */ +PG_FUNCTION_INFO_V1(RASTER_intersects); +Datum RASTER_intersects(PG_FUNCTION_ARGS) +{ + const int set_count = 2; + rt_pgraster *pgrast; + rt_raster rast[2] = {NULL}; + uint32_t bandindex[2] = {0}; + uint32_t hasbandindex[2] = {0}; + + uint32_t i; + uint32_t j; + uint32_t k; + uint32_t numBands; + int rtn; + int intersects; + + LWPOLY *hull[2] = {NULL}; + GEOSGeometry *ghull[2] = {NULL}; + + for (i = 0, j = 0; i < set_count; i++) { + /* pgrast is null, return null */ + if (PG_ARGISNULL(j)) { + for (k = 0; k < i; k++) rt_raster_destroy(rast[k]); + PG_RETURN_NULL(); + } + pgrast = (rt_pgraster *) PG_DETOAST_DATUM(PG_GETARG_DATUM(j)); + j++; + + /* raster */ + rast[i] = rt_raster_deserialize(pgrast, FALSE); + if (!rast[i]) { + elog(ERROR, "RASTER_intersects: Could not deserialize the %s raster", i < 1 ? "first" : "second"); + for (k = 0; k < i; k++) rt_raster_destroy(rast[k]); + PG_RETURN_NULL(); + } + + /* numbands */ + numBands = rt_raster_get_num_bands(rast[i]); + if (numBands < 1) { + elog(NOTICE, "The %s raster provided has no bands", i < 1 ? "first" : "second"); + for (k = 0; k < i; k++) rt_raster_destroy(rast[k]); + PG_RETURN_NULL(); + } + + /* band index */ + if (!PG_ARGISNULL(j)) { + bandindex[i] = PG_GETARG_INT32(j); + if (bandindex[i] < 1 || bandindex[i] > numBands) { + elog(NOTICE, "Invalid band index (must use 1-based) for the %s raster. Returning NULL", i < 1 ? "first" : "second"); + for (k = 0; k < i; k++) rt_raster_destroy(rast[k]); + PG_RETURN_NULL(); + } + hasbandindex[i] = 1; + } + else + hasbandindex[i] = 0; + POSTGIS_RT_DEBUGF(4, "hasbandindex[%d] = %d", i, hasbandindex[i]); + POSTGIS_RT_DEBUGF(4, "bandindex[%d] = %d", i, bandindex[i]); + j++; + } + + /* hasbandindex must be balanced */ + if ( + (hasbandindex[0] && !hasbandindex[1]) || + (!hasbandindex[0] && hasbandindex[1]) + ) { + elog(NOTICE, "Missing band index. Band indices must be provided for both rasters if any one is provided"); + for (k = 0; k < i; k++) rt_raster_destroy(rast[k]); + PG_RETURN_NULL(); + } + + /* SRID must match */ + if (rt_raster_get_srid(rast[0]) != rt_raster_get_srid(rast[1])) { + elog(ERROR, "The two rasters provided have different SRIDs"); + for (k = 0; k < set_count; k++) rt_raster_destroy(rast[k]); + PG_RETURN_NULL(); + } + + /* raster extents need to intersect */ + do { + initGEOS(lwnotice, lwgeom_geos_error); + + rtn = 1; + for (i = 0; i < 2; i++) { + hull[i] = rt_raster_get_convex_hull(rast[i]); + if (NULL == hull[i]) { + for (j = 0; j < i; j++) { + GEOSGeom_destroy(ghull[j]); + lwpoly_free(hull[j]); + } + rtn = 0; + break; + } + ghull[i] = (GEOSGeometry *) LWGEOM2GEOS(lwpoly_as_lwgeom(hull[i])); + if (NULL == ghull[i]) { + for (j = 0; j < i; j++) { + GEOSGeom_destroy(ghull[j]); + lwpoly_free(hull[j]); + } + lwpoly_free(hull[i]); + rtn = 0; + break; + } + } + if (!rtn) break; + + rtn = GEOSIntersects(ghull[0], ghull[1]); + + for (i = 0; i < 2; i++) { + GEOSGeom_destroy(ghull[i]); + lwpoly_free(hull[i]); + } + + if (rtn != 2) { + if (rtn != 1) { + for (k = 0; k < set_count; k++) rt_raster_destroy(rast[k]); + PG_RETURN_BOOL(0); + } + /* band isn't specified */ + else if (!hasbandindex[0]) { + for (k = 0; k < set_count; k++) rt_raster_destroy(rast[k]); + PG_RETURN_BOOL(1); + } + } + } + while (0); + + rtn = rt_raster_intersects( + rast[0], (hasbandindex[0] ? bandindex[0] - 1 : -1), + rast[1], (hasbandindex[1] ? bandindex[1] - 1 : -1), + &intersects + ); + for (k = 0; k < set_count; k++) rt_raster_destroy(rast[k]); + + if (!rtn) { + elog(ERROR, "RASTER_intersects: Unable to test for intersection on the two rasters"); + PG_RETURN_NULL(); + } + + PG_RETURN_BOOL(intersects); +} + +/** + * See if two rasters are aligned + */ +PG_FUNCTION_INFO_V1(RASTER_sameAlignment); +Datum RASTER_sameAlignment(PG_FUNCTION_ARGS) +{ + const int set_count = 2; + rt_pgraster *pgrast; + rt_raster rast[2] = {NULL}; + + uint32_t i; + uint32_t j; + uint32_t k; + int rtn; + int aligned = 0; + int err = 0; + + for (i = 0, j = 0; i < set_count; i++) { + /* pgrast is null, return null */ + if (PG_ARGISNULL(j)) { + for (k = 0; k < i; k++) rt_raster_destroy(rast[k]); + PG_RETURN_NULL(); + } + pgrast = (rt_pgraster *) PG_DETOAST_DATUM_SLICE(PG_GETARG_DATUM(j), 0, sizeof(struct rt_raster_serialized_t)); + j++; + + /* raster */ + rast[i] = rt_raster_deserialize(pgrast, TRUE); + if (!rast[i]) { + elog(ERROR, "RASTER_sameAlignment: Could not deserialize the %s raster", i < 1 ? "first" : "second"); + for (k = 0; k < i; k++) rt_raster_destroy(rast[k]); + PG_RETURN_NULL(); + } + } + + err = 0; + /* SRID must match */ + if (rt_raster_get_srid(rast[0]) != rt_raster_get_srid(rast[1])) { + elog(NOTICE, "The two rasters provided have different SRIDs"); + err = 1; + } + /* scales must match */ + else if (FLT_NEQ(fabs(rt_raster_get_x_scale(rast[0])), fabs(rt_raster_get_x_scale(rast[1])))) { + elog(NOTICE, "The two rasters provided have different scales on the X axis"); + err = 1; + } + else if (FLT_NEQ(fabs(rt_raster_get_y_scale(rast[0])), fabs(rt_raster_get_y_scale(rast[1])))) { + elog(NOTICE, "The two rasters provided have different scales on the Y axis"); + err = 1; + } + /* skews must match */ + else if (FLT_NEQ(rt_raster_get_x_skew(rast[0]), rt_raster_get_x_skew(rast[1]))) { + elog(NOTICE, "The two rasters provided have different skews on the X axis"); + err = 1; + } + else if (FLT_NEQ(rt_raster_get_y_skew(rast[0]), rt_raster_get_y_skew(rast[1]))) { + elog(NOTICE, "The two rasters provided have different skews on the Y axis"); + err = 1; + } + + if (err) { + for (k = 0; k < set_count; k++) rt_raster_destroy(rast[k]); + PG_RETURN_BOOL(0); + } + + rtn = rt_raster_same_alignment( + rast[0], + rast[1], + &aligned + ); + for (k = 0; k < set_count; k++) rt_raster_destroy(rast[k]); + + if (!rtn) { + elog(ERROR, "RASTER_sameAlignment: Unable to test for alignment on the two rasters"); + PG_RETURN_NULL(); + } + + PG_RETURN_BOOL(aligned); +} + +/** + * Two raster MapAlgebra + */ +PG_FUNCTION_INFO_V1(RASTER_mapAlgebra2); +Datum RASTER_mapAlgebra2(PG_FUNCTION_ARGS) +{ + const int set_count = 2; + rt_pgraster *pgrast; + rt_raster rast[2] = {NULL}; + int _isempty[2] = {0}; + uint32_t bandindex[2] = {0}; + rt_raster _rast[2] = {NULL}; + rt_band _band[2] = {NULL}; + int _hasnodata[2] = {0}; + double _nodataval[2] = {0}; + double _offset[4] = {0.}; + double _rastoffset[2][4] = {{0.}}; + int _haspixel[2] = {0}; + double _pixel[2] = {0}; + int _pos[2][2] = {{0}}; + uint16_t _dim[2][2] = {{0}}; + + char *pixtypename = NULL; + rt_pixtype pixtype = PT_END; + char *extenttypename = NULL; + rt_extenttype extenttype = ET_INTERSECTION; + + rt_raster raster = NULL; + rt_band band = NULL; + uint16_t dim[2] = {0}; + int haspixel = 0; + double pixel = 0.; + double nodataval = 0; + double gt[6] = {0.}; + + Oid calltype = InvalidOid; + + const int spi_count = 3; + uint16_t spi_exprpos[3] = {4, 7, 8}; + uint32_t spi_argcount[3] = {0}; + char *expr = NULL; + char *sql = NULL; + SPIPlanPtr spi_plan[3] = {NULL}; + uint16_t spi_empty = 0; + Oid *argtype = NULL; + const int argkwcount = 8; + uint8_t argpos[3][8] = {{0}}; + char *argkw[] = {"[rast1.x]", "[rast1.y]", "[rast1.val]", "[rast1]", "[rast2.x]", "[rast2.y]", "[rast2.val]", "[rast2]"}; + Datum values[8]; + bool nulls[8]; + TupleDesc tupdesc; + SPITupleTable *tuptable = NULL; + HeapTuple tuple; + Datum datum; + bool isnull = FALSE; + int hasargval[3] = {0}; + double argval[3] = {0.}; + int hasnodatanodataval = 0; + double nodatanodataval = 0; + + Oid ufc_noid = InvalidOid; + FmgrInfo ufl_info; + FunctionCallInfoData ufc_info; + int ufc_nullcount = 0; + + int idx = 0; + uint32_t i = 0; + uint32_t j = 0; + uint32_t k = 0; + uint32_t x = 0; + uint32_t y = 0; + int _x = 0; + int _y = 0; + int err; + int aligned = 0; + int len = 0; + + POSTGIS_RT_DEBUG(3, "Starting RASTER_mapAlgebra2"); + + for (i = 0, j = 0; i < set_count; i++) { + if (!PG_ARGISNULL(j)) { + pgrast = (rt_pgraster *) PG_DETOAST_DATUM(PG_GETARG_DATUM(j)); + j++; + + /* raster */ + rast[i] = rt_raster_deserialize(pgrast, FALSE); + if (!rast[i]) { + elog(ERROR, "RASTER_mapAlgebra2: Could not deserialize the %s raster", i < 1 ? "first" : "second"); + for (k = 0; k < i; k++) { + if (rast[k] != NULL) rt_raster_destroy(rast[k]); + } + PG_RETURN_NULL(); + } + + /* empty */ + _isempty[i] = rt_raster_is_empty(rast[i]); + + /* band index */ + if (!PG_ARGISNULL(j)) { + bandindex[i] = PG_GETARG_INT32(j); + } + j++; + } + else { + _isempty[i] = 1; + j += 2; + } + + POSTGIS_RT_DEBUGF(3, "_isempty[%d] = %d", i, _isempty[i]); + } + + /* both rasters are NULL */ + if (rast[0] == NULL && rast[1] == NULL) { + elog(NOTICE, "The two rasters provided are NULL. Returning NULL"); + PG_RETURN_NULL(); + } + + /* both rasters are empty */ + if (_isempty[0] && _isempty[1]) { + elog(NOTICE, "The two rasters provided are empty. Returning empty raster"); + + raster = rt_raster_new(0, 0); + if (raster == NULL) { + elog(ERROR, "RASTER_mapAlgebra2: Unable to create empty raster"); + for (k = 0; k < i; k++) { + if (rast[k] != NULL) rt_raster_destroy(rast[k]); + } + PG_RETURN_NULL(); + } + rt_raster_set_scale(raster, 0, 0); + + pgrast = rt_raster_serialize(raster); + rt_raster_destroy(raster); + if (!pgrast) PG_RETURN_NULL(); + + SET_VARSIZE(pgrast, pgrast->size); + PG_RETURN_POINTER(pgrast); + } + + /* replace the empty or NULL raster with one matching the other */ + if ( + (rast[0] == NULL || _isempty[0]) || + (rast[1] == NULL || _isempty[1]) + ) { + if (rast[0] == NULL || _isempty[0]) { + i = 0; + j = 1; + } + else { + i = 1; + j = 0; + } + + _rast[j] = rast[j]; + + /* raster is empty, destroy it */ + if (_rast[i] != NULL) + rt_raster_destroy(_rast[i]); + + _dim[i][0] = rt_raster_get_width(_rast[j]); + _dim[i][1] = rt_raster_get_height(_rast[j]); + _dim[j][0] = rt_raster_get_width(_rast[j]); + _dim[j][1] = rt_raster_get_height(_rast[j]); + + _rast[i] = rt_raster_new( + _dim[j][0], + _dim[j][1] + ); + if (_rast[i] == NULL) { + elog(ERROR, "RASTER_mapAlgebra2: Unable to create nodata raster"); + rt_raster_destroy(_rast[j]); + PG_RETURN_NULL(); + } + rt_raster_set_srid(_rast[i], rt_raster_get_srid(_rast[j])); + + rt_raster_get_geotransform_matrix(_rast[j], gt); + rt_raster_set_geotransform_matrix(_rast[i], gt); + } + else { + _rast[0] = rast[0]; + _dim[0][0] = rt_raster_get_width(_rast[0]); + _dim[0][1] = rt_raster_get_height(_rast[0]); + + _rast[1] = rast[1]; + _dim[1][0] = rt_raster_get_width(_rast[1]); + _dim[1][1] = rt_raster_get_height(_rast[1]); + } + + /* SRID must match */ + if (rt_raster_get_srid(_rast[0]) != rt_raster_get_srid(_rast[1])) { + elog(NOTICE, "The two rasters provided have different SRIDs. Returning NULL"); + for (k = 0; k < set_count; k++) rt_raster_destroy(_rast[k]); + PG_RETURN_NULL(); + } + + /* same alignment */ + if (!rt_raster_same_alignment(_rast[0], _rast[1], &aligned)) { + elog(ERROR, "RASTER_mapAlgebra2: Unable to test for alignment on the two rasters"); + for (k = 0; k < set_count; k++) rt_raster_destroy(_rast[k]); + PG_RETURN_NULL(); + } + if (!aligned) { + elog(NOTICE, "The two rasters provided do not have the same alignment. Returning NULL"); + for (k = 0; k < set_count; k++) rt_raster_destroy(_rast[k]); + PG_RETURN_NULL(); + } + + /* pixel type */ + if (!PG_ARGISNULL(5)) { + pixtypename = text_to_cstring(PG_GETARG_TEXT_P(5)); + /* Get the pixel type index */ + pixtype = rt_pixtype_index_from_name(pixtypename); + if (pixtype == PT_END ) { + elog(ERROR, "RASTER_mapAlgebra2: Invalid pixel type: %s", pixtypename); + for (k = 0; k < set_count; k++) rt_raster_destroy(_rast[k]); + PG_RETURN_NULL(); + } + } + + /* extent type */ + if (!PG_ARGISNULL(6)) { + extenttypename = rtpg_strtoupper(rtpg_trim(text_to_cstring(PG_GETARG_TEXT_P(6)))); + extenttype = rt_util_extent_type(extenttypename); + } + POSTGIS_RT_DEBUGF(3, "extenttype: %d %s", extenttype, extenttypename); + + /* computed raster from extent type */ + raster = rt_raster_from_two_rasters( + _rast[0], _rast[1], + extenttype, + &err, _offset + ); + if (!err) { + elog(ERROR, "RASTER_mapAlgebra2: Unable to get output raster of correct extent"); + for (k = 0; k < set_count; k++) rt_raster_destroy(_rast[k]); + PG_RETURN_NULL(); + } + + /* copy offsets */ + _rastoffset[0][0] = _offset[0]; + _rastoffset[0][1] = _offset[1]; + _rastoffset[1][0] = _offset[2]; + _rastoffset[1][1] = _offset[3]; + + /* get output raster dimensions */ + dim[0] = rt_raster_get_width(raster); + dim[1] = rt_raster_get_height(raster); + + i = 2; + /* handle special cases for extent */ + switch (extenttype) { + case ET_FIRST: + i = 0; + case ET_SECOND: + if (i > 1) + i = 1; + + if ( + _isempty[i] && ( + (extenttype == ET_FIRST && i == 0) || + (extenttype == ET_SECOND && i == 1) + ) + ) { + elog(NOTICE, "The %s raster is NULL. Returning NULL", (i != 1 ? "FIRST" : "SECOND")); + for (k = 0; k < set_count; k++) rt_raster_destroy(_rast[k]); + rt_raster_destroy(raster); + PG_RETURN_NULL(); + } + + /* specified band not found */ + if (rt_raster_has_no_band(_rast[i], bandindex[i] - 1)) { + elog(NOTICE, "The %s raster does not have the band at index %d. Returning no band raster of correct extent", + (i != 1 ? "FIRST" : "SECOND"), bandindex[i] + ); + + for (k = 0; k < set_count; k++) rt_raster_destroy(_rast[k]); + + pgrast = rt_raster_serialize(raster); + rt_raster_destroy(raster); + if (!pgrast) PG_RETURN_NULL(); + + SET_VARSIZE(pgrast, pgrast->size); + PG_RETURN_POINTER(pgrast); + } + break; + case ET_UNION: + break; + case ET_INTERSECTION: + /* no intersection */ + if ( + _isempty[0] || _isempty[1] || + !dim[0] || !dim[1] + ) { + elog(NOTICE, "The two rasters provided have no intersection. Returning no band raster"); + + /* raster has dimension, replace with no band raster */ + if (dim[0] || dim[1]) { + rt_raster_destroy(raster); + + raster = rt_raster_new(0, 0); + if (raster == NULL) { + elog(ERROR, "RASTER_mapAlgebra2: Unable to create no band raster"); + for (k = 0; k < set_count; k++) rt_raster_destroy(_rast[k]); + PG_RETURN_NULL(); + } + rt_raster_set_scale(raster, 0, 0); + rt_raster_set_srid(raster, rt_raster_get_srid(_rast[0])); + } + + for (k = 0; k < set_count; k++) rt_raster_destroy(_rast[k]); + + pgrast = rt_raster_serialize(raster); + rt_raster_destroy(raster); + if (!pgrast) PG_RETURN_NULL(); + + SET_VARSIZE(pgrast, pgrast->size); + PG_RETURN_POINTER(pgrast); + } + break; + } + + /* both rasters do not have specified bands */ + if ( + (!_isempty[0] && rt_raster_has_no_band(_rast[0], bandindex[0] - 1)) && + (!_isempty[1] && rt_raster_has_no_band(_rast[1], bandindex[1] - 1)) + ) { + elog(NOTICE, "The two rasters provided do not have the respectively specified band indices. Returning no band raster of correct extent"); + + for (k = 0; k < set_count; k++) rt_raster_destroy(_rast[k]); + + pgrast = rt_raster_serialize(raster); + rt_raster_destroy(raster); + if (!pgrast) PG_RETURN_NULL(); + + SET_VARSIZE(pgrast, pgrast->size); + PG_RETURN_POINTER(pgrast); + } + + /* get bands */ + for (i = 0; i < set_count; i++) { + if (_isempty[i] || rt_raster_has_no_band(_rast[i], bandindex[i] - 1)) { + _hasnodata[i] = 1; + _nodataval[i] = 0; + + continue; + } + + _band[i] = rt_raster_get_band(_rast[i], bandindex[i] - 1); + if (_band[i] == NULL) { + elog(ERROR, "RASTER_mapAlgebra2: Unable to get band %d of the %s raster", + bandindex[i], + (i < 1 ? "FIRST" : "SECOND") + ); + for (k = 0; k < set_count; k++) rt_raster_destroy(_rast[k]); + rt_raster_destroy(raster); + PG_RETURN_NULL(); + } + + _hasnodata[i] = rt_band_get_hasnodata_flag(_band[i]); + if (_hasnodata[i]) + _nodataval[i] = rt_band_get_nodata(_band[i]); + } + + /* pixtype is PT_END, get pixtype based upon extent */ + if (pixtype == PT_END) { + if ((extenttype == ET_SECOND && !_isempty[1]) || _isempty[0]) + pixtype = rt_band_get_pixtype(_band[1]); + else + pixtype = rt_band_get_pixtype(_band[0]); + } + + /* nodata value for new band */ + if (extenttype == ET_SECOND && !_isempty[1] && _hasnodata[1]) { + nodataval = _nodataval[1]; + } + else if (!_isempty[0] && _hasnodata[0]) { + nodataval = _nodataval[0]; + } + else if (!_isempty[1] && _hasnodata[1]) { + nodataval = _nodataval[1]; + } + else { + elog(NOTICE, "Neither raster provided has a NODATA value for the specified band indices. NODATA value set to minimum possible for %s", rt_pixtype_name(pixtype)); + nodataval = rt_pixtype_get_min_value(pixtype); + } + + /* add band to output raster */ + if (rt_raster_generate_new_band( + raster, + pixtype, nodataval, + 1, nodataval, + 0 + ) < 0) { + elog(ERROR, "RASTER_mapAlgebra2: Unable to add new band to output raster"); + for (k = 0; k < set_count; k++) rt_raster_destroy(_rast[k]); + rt_raster_destroy(raster); + PG_RETURN_NULL(); + } + + /* get output band */ + band = rt_raster_get_band(raster, 0); + if (band == NULL) { + elog(ERROR, "RASTER_mapAlgebra2: Unable to get newly added band of output raster"); + for (k = 0; k < set_count; k++) rt_raster_destroy(_rast[k]); + rt_raster_destroy(raster); + PG_RETURN_NULL(); + } + + POSTGIS_RT_DEBUGF(4, "offsets = (%d, %d, %d, %d)", + (int) _rastoffset[0][0], + (int) _rastoffset[0][1], + (int) _rastoffset[1][0], + (int) _rastoffset[1][1] + ); + + POSTGIS_RT_DEBUGF(4, "metadata = (%f, %f, %d, %d, %f, %f, %f, %f, %d)", + rt_raster_get_x_offset(raster), + rt_raster_get_y_offset(raster), + rt_raster_get_width(raster), + rt_raster_get_height(raster), + rt_raster_get_x_scale(raster), + rt_raster_get_y_scale(raster), + rt_raster_get_x_skew(raster), + rt_raster_get_y_skew(raster), + rt_raster_get_srid(raster) + ); + + POSTGIS_RT_DEBUGF(4, "bandmetadata = (%s, %d, %f)", + rt_pixtype_name(rt_band_get_pixtype(band)), + rt_band_get_hasnodata_flag(band), + rt_band_get_nodata(band) + ); + + /* + determine who called this function + Arg 4 will either be text or regprocedure + */ + POSTGIS_RT_DEBUG(3, "checking parameter type for arg 4"); + calltype = get_fn_expr_argtype(fcinfo->flinfo, 4); + + switch(calltype) { + case TEXTOID: { + POSTGIS_RT_DEBUG(3, "arg 4 is \"expression\"!"); + + /* connect SPI */ + if (SPI_connect() != SPI_OK_CONNECT) { + elog(ERROR, "RASTER_mapAlgebra2: Unable to connect to the SPI manager"); + for (k = 0; k < set_count; k++) rt_raster_destroy(_rast[k]); + rt_raster_destroy(raster); + PG_RETURN_NULL(); + } + + /* reset hasargval */ + memset(hasargval, 0, spi_count); + + /* + process expressions + + spi_exprpos elements are: + 4 - expression => spi_plan[0] + 7 - nodata1expr => spi_plan[1] + 8 - nodata2expr => spi_plan[2] + */ + for (i = 0; i < spi_count; i++) { + if (!PG_ARGISNULL(spi_exprpos[i])) { + char *tmp = NULL; + char place[5] = "$1"; + expr = text_to_cstring(PG_GETARG_TEXT_P(spi_exprpos[i])); + POSTGIS_RT_DEBUGF(3, "raw expr #%d: %s", i, expr); + + for (j = 0, k = 1; j < argkwcount; j++) { + /* attempt to replace keyword with placeholder */ + len = 0; + tmp = rtpg_strreplace(expr, argkw[j], place, &len); + pfree(expr); + expr = tmp; + + if (len) { + spi_argcount[i]++; + argpos[i][j] = k++; + + sprintf(place, "$%d", k); + } + else + argpos[i][j] = 0; + } + + len = strlen("SELECT (") + strlen(expr) + strlen(")::double precision"); + sql = (char *) palloc(len + 1); + if (sql == NULL) { + elog(ERROR, "RASTER_mapAlgebra2: Unable to allocate memory for expression parameter %d", spi_exprpos[i]); + + for (k = 0; k < spi_count; k++) SPI_freeplan(spi_plan[k]); + SPI_finish(); + + for (k = 0; k < set_count; k++) rt_raster_destroy(_rast[k]); + rt_raster_destroy(raster); + + PG_RETURN_NULL(); + } + + strncpy(sql, "SELECT (", strlen("SELECT (")); + strncpy(sql + strlen("SELECT ("), expr, strlen(expr)); + strncpy(sql + strlen("SELECT (") + strlen(expr), ")::double precision", strlen(")::double precision")); + sql[len] = '\0'; + + POSTGIS_RT_DEBUGF(3, "sql #%d: %s", i, sql); + + /* create prepared plan */ + if (spi_argcount[i]) { + argtype = (Oid *) palloc(spi_argcount[i] * sizeof(Oid)); + if (argtype == NULL) { + elog(ERROR, "RASTER_mapAlgebra2: Unable to allocate memory for prepared plan argtypes of expression parameter %d", spi_exprpos[i]); + + pfree(sql); + for (k = 0; k < spi_count; k++) SPI_freeplan(spi_plan[k]); + SPI_finish(); + + for (k = 0; k < set_count; k++) rt_raster_destroy(_rast[k]); + rt_raster_destroy(raster); + + PG_RETURN_NULL(); + } + + /* specify datatypes of parameters */ + for (j = 0, k = 0; j < argkwcount; j++) { + if (argpos[i][j] < 1) continue; + + /* positions are INT4 */ + if ( + (strstr(argkw[j], "[rast1.x]") != NULL) || + (strstr(argkw[j], "[rast1.y]") != NULL) || + (strstr(argkw[j], "[rast2.x]") != NULL) || + (strstr(argkw[j], "[rast2.y]") != NULL) + ) { + argtype[k] = INT4OID; + } + /* everything else is FLOAT8 */ + else { + argtype[k] = FLOAT8OID; + } + + k++; + } + + spi_plan[i] = SPI_prepare(sql, spi_argcount[i], argtype); + pfree(argtype); + + if (spi_plan[i] == NULL) { + elog(ERROR, "RASTER_mapAlgebra2: Unable to create prepared plan of expression parameter %d", spi_exprpos[i]); + + pfree(sql); + for (k = 0; k < spi_count; k++) SPI_freeplan(spi_plan[k]); + SPI_finish(); + + for (k = 0; k < set_count; k++) rt_raster_destroy(_rast[k]); + rt_raster_destroy(raster); + + PG_RETURN_NULL(); + } + } + /* no args, just execute query */ + else { + err = SPI_execute(sql, TRUE, 0); + if (err != SPI_OK_SELECT || SPI_tuptable == NULL || SPI_processed != 1) { + elog(ERROR, "RASTER_mapAlgebra2: Unable to evaluate expression parameter %d", spi_exprpos[i]); + + pfree(sql); + for (k = 0; k < spi_count; k++) SPI_freeplan(spi_plan[k]); + SPI_finish(); + + for (k = 0; k < set_count; k++) rt_raster_destroy(_rast[k]); + rt_raster_destroy(raster); + + PG_RETURN_NULL(); + } + + /* get output of prepared plan */ + tupdesc = SPI_tuptable->tupdesc; + tuptable = SPI_tuptable; + tuple = tuptable->vals[0]; + + datum = SPI_getbinval(tuple, tupdesc, 1, &isnull); + if (SPI_result == SPI_ERROR_NOATTRIBUTE) { + elog(ERROR, "RASTER_mapAlgebra2: Unable to get result of expression parameter %d", spi_exprpos[i]); + + pfree(sql); + if (SPI_tuptable) SPI_freetuptable(tuptable); + for (k = 0; k < spi_count; k++) SPI_freeplan(spi_plan[k]); + SPI_finish(); + + for (k = 0; k < set_count; k++) rt_raster_destroy(_rast[k]); + rt_raster_destroy(raster); + + PG_RETURN_NULL(); + } + + if (!isnull) { + hasargval[i] = 1; + argval[i] = DatumGetFloat8(datum); + } + + if (SPI_tuptable) SPI_freetuptable(tuptable); + } + + pfree(sql); + } + else + spi_empty++; + } + + /* nodatanodataval */ + if (!PG_ARGISNULL(9)) { + hasnodatanodataval = 1; + nodatanodataval = PG_GETARG_FLOAT8(9); + } + else + hasnodatanodataval = 0; + break; + } + case REGPROCEDUREOID: { + POSTGIS_RT_DEBUG(3, "arg 4 is \"userfunction\"!"); + if (!PG_ARGISNULL(4)) { + ufc_nullcount = 0; + ufc_noid = PG_GETARG_OID(4); + + /* get function info */ + fmgr_info(ufc_noid, &ufl_info); + + /* function cannot return set */ + err = 0; + if (ufl_info.fn_retset) { + elog(ERROR, "RASTER_mapAlgebra2: Function provided must return double precision not resultset"); + err = 1; + } + /* function should have correct # of args */ + else if (ufl_info.fn_nargs < 3 || ufl_info.fn_nargs > 4) { + elog(ERROR, "RASTER_mapAlgebra2: Function provided must have three or four input parameters"); + err = 1; + } + + /* + TODO: consider adding checks of the userfunction parameters + should be able to use get_fn_expr_argtype() of fmgr.c + */ + + if (err) { + for (k = 0; k < set_count; k++) rt_raster_destroy(_rast[k]); + rt_raster_destroy(raster); + + PG_RETURN_NULL(); + } + + if (func_volatile(ufc_noid) == 'v') { + elog(NOTICE, "Function provided is VOLATILE. Unless required and for best performance, function should be IMMUTABLE or STABLE"); + } + + /* prep function call data */ +#if POSTGIS_PGSQL_VERSION <= 90 + InitFunctionCallInfoData(ufc_info, &ufl_info, ufl_info.fn_nargs, InvalidOid, NULL); +#else + InitFunctionCallInfoData(ufc_info, &ufl_info, ufl_info.fn_nargs, InvalidOid, NULL, NULL); +#endif + memset(ufc_info.argnull, FALSE, ufl_info.fn_nargs); + + if (ufl_info.fn_nargs != 4) + k = 2; + else + k = 3; + if (!PG_ARGISNULL(7)) { + ufc_info.arg[k] = PG_GETARG_DATUM(7); + } + else { + ufc_info.arg[k] = (Datum) NULL; + ufc_info.argnull[k] = TRUE; + ufc_nullcount++; + } + } + break; + } + default: + elog(ERROR, "RASTER_mapAlgebra2: Invalid data type for expression or userfunction"); + for (k = 0; k < set_count; k++) rt_raster_destroy(_rast[k]); + rt_raster_destroy(raster); + PG_RETURN_NULL(); + break; + } + + /* loop over pixels */ + /* if any expression present, run */ + if (( + (calltype == TEXTOID) && ( + (spi_empty != spi_count) || hasnodatanodataval + ) + ) || ( + (calltype == REGPROCEDUREOID) && (ufc_noid != InvalidOid) + )) { + for (x = 0; x < dim[0]; x++) { + for (y = 0; y < dim[1]; y++) { + + /* get pixel from each raster */ + for (i = 0; i < set_count; i++) { + _haspixel[i] = 0; + _pixel[i] = 0; + + /* row/column */ + _x = x - (int) _rastoffset[i][0]; + _y = y - (int) _rastoffset[i][1]; + + /* store _x and _y in 1-based */ + _pos[i][0] = _x + 1; + _pos[i][1] = _y + 1; + + /* get pixel value */ + if (_band[i] == NULL) { + if (!_hasnodata[i]) { + _haspixel[i] = 1; + _pixel[i] = _nodataval[i]; + } + } + else if ( + !_isempty[i] && + (_x >= 0 && _x < _dim[i][0]) && + (_y >= 0 && _y < _dim[i][1]) + ) { + err = rt_band_get_pixel(_band[i], _x, _y, &(_pixel[i])); + if (err < 0) { + elog(ERROR, "RASTER_mapAlgebra2: Unable to get pixel of %s raster", (i < 1 ? "FIRST" : "SECOND")); + + if (calltype == TEXTOID) { + for (k = 0; k < spi_count; k++) SPI_freeplan(spi_plan[k]); + SPI_finish(); + } + + for (k = 0; k < set_count; k++) rt_raster_destroy(_rast[k]); + rt_raster_destroy(raster); + + PG_RETURN_NULL(); + } + + if (!_hasnodata[i] || FLT_NEQ(_nodataval[i], _pixel[i])) + _haspixel[i] = 1; + } + + POSTGIS_RT_DEBUGF(5, "pixel r%d(%d, %d) = %d, %f", + i, + _x, + _y, + _haspixel[i], + _pixel[i] + ); + } + + haspixel = 0; + + switch (calltype) { + case TEXTOID: { + /* which prepared plan to use? */ + /* !pixel0 && !pixel1 */ + /* use nodatanodataval */ + if (!_haspixel[0] && !_haspixel[1]) + i = 3; + /* pixel0 && !pixel1 */ + /* run spi_plan[2] (nodata2expr) */ + else if (_haspixel[0] && !_haspixel[1]) + i = 2; + /* !pixel0 && pixel1 */ + /* run spi_plan[1] (nodata1expr) */ + else if (!_haspixel[0] && _haspixel[1]) + i = 1; + /* pixel0 && pixel1 */ + /* run spi_plan[0] (expression) */ + else + i = 0; + + /* process values */ + if (i == 3) { + if (hasnodatanodataval) { + haspixel = 1; + pixel = nodatanodataval; + } + } + /* has an evaluated value */ + else if (hasargval[i]) { + haspixel = 1; + pixel = argval[i]; + } + /* prepared plan exists */ + else if (spi_plan[i] != NULL) { + POSTGIS_RT_DEBUGF(4, "Using prepared plan: %d", i); + + /* expression has argument(s) */ + if (spi_argcount[i]) { + /* reset values to (Datum) NULL */ + memset(values, (Datum) NULL, argkwcount); + /* reset nulls to FALSE */ + memset(nulls, FALSE, argkwcount); + + /* set values and nulls */ + for (j = 0; j < argkwcount; j++) { + idx = argpos[i][j]; + if (idx < 1) continue; + idx--; /* 1-based becomes 0-based */ + + if (strstr(argkw[j], "[rast1.x]") != NULL) { + values[idx] = _pos[0][0]; + } + else if (strstr(argkw[j], "[rast1.y]") != NULL) { + values[idx] = _pos[0][1]; + } + else if ( + (strstr(argkw[j], "[rast1.val]") != NULL) || + (strstr(argkw[j], "[rast1]") != NULL) + ) { + if (_isempty[0] || !_haspixel[0]) + nulls[idx] = TRUE; + else + values[idx] = Float8GetDatum(_pixel[0]); + } + else if (strstr(argkw[j], "[rast2.x]") != NULL) { + values[idx] = _pos[1][0]; + } + else if (strstr(argkw[j], "[rast2.y]") != NULL) { + values[idx] = _pos[1][1]; + } + else if ( + (strstr(argkw[j], "[rast2.val]") != NULL) || + (strstr(argkw[j], "[rast2]") != NULL) + ) { + if (_isempty[1] || !_haspixel[1]) + nulls[idx] = TRUE; + else + values[idx] = Float8GetDatum(_pixel[1]); + } + } + } + + /* run prepared plan */ + err = SPI_execute_plan(spi_plan[i], values, nulls, TRUE, 1); + if (err != SPI_OK_SELECT || SPI_tuptable == NULL || SPI_processed != 1) { + elog(ERROR, "RASTER_mapAlgebra2: Unexpected error when running prepared statement %d", i); + + for (k = 0; k < spi_count; k++) SPI_freeplan(spi_plan[k]); + SPI_finish(); + + for (k = 0; k < set_count; k++) rt_raster_destroy(_rast[k]); + rt_raster_destroy(raster); + + PG_RETURN_NULL(); + } + + /* get output of prepared plan */ + tupdesc = SPI_tuptable->tupdesc; + tuptable = SPI_tuptable; + tuple = tuptable->vals[0]; + + datum = SPI_getbinval(tuple, tupdesc, 1, &isnull); + if (SPI_result == SPI_ERROR_NOATTRIBUTE) { + elog(ERROR, "RASTER_mapAlgebra2: Unable to get result of prepared statement %d", i); + + if (SPI_tuptable) SPI_freetuptable(tuptable); + for (k = 0; k < spi_count; k++) SPI_freeplan(spi_plan[k]); + SPI_finish(); + + for (k = 0; k < set_count; k++) rt_raster_destroy(_rast[k]); + rt_raster_destroy(raster); + + PG_RETURN_NULL(); + } + + if (!isnull) { + haspixel = 1; + pixel = DatumGetFloat8(datum); + } + + if (SPI_tuptable) SPI_freetuptable(tuptable); + } + } break; + case REGPROCEDUREOID: { + Datum d[4]; + ArrayType *a; + + /* build fcnarg */ + for (i = 0; i < set_count; i++) { + ufc_info.arg[i] = Float8GetDatum(_pixel[i]); + + if (_haspixel[i]) { + ufc_info.argnull[i] = FALSE; + ufc_nullcount--; + } + else { + ufc_info.argnull[i] = TRUE; + ufc_nullcount++; + } + } + + /* function is strict and null parameter is passed */ + /* http://archives.postgresql.org/pgsql-general/2011-11/msg00424.php */ + if (ufl_info.fn_strict && ufc_nullcount) + break; + + /* 4 parameters, add position */ + if (ufl_info.fn_nargs == 4) { + /* Datum of 4 element array */ + /* array is (x1, y1, x2, y2) */ + for (i = 0; i < set_count; i++) { + if (i < 1) { + d[0] = Int32GetDatum(_pos[i][0]); + d[1] = Int32GetDatum(_pos[i][1]); + } + else { + d[2] = Int32GetDatum(_pos[i][0]); + d[3] = Int32GetDatum(_pos[i][1]); + } + } + + a = construct_array(d, 4, INT4OID, sizeof(int4), true, 'i'); + ufc_info.arg[2] = PointerGetDatum(a); + ufc_info.argnull[2] = FALSE; + } + + datum = FunctionCallInvoke(&ufc_info); + + /* result is not null*/ + if (!ufc_info.isnull) { + haspixel = 1; + pixel = DatumGetFloat8(datum); + } + } break; + } + + /* burn pixel if haspixel != 0 */ + if (haspixel) { + if (rt_band_set_pixel(band, x, y, pixel) < 0) { + elog(ERROR, "RASTER_mapAlgebra2: Unable to set pixel value of output raster"); + + if (calltype == TEXTOID) { + for (k = 0; k < spi_count; k++) SPI_freeplan(spi_plan[k]); + SPI_finish(); + } + + for (k = 0; k < set_count; k++) rt_raster_destroy(_rast[k]); + rt_raster_destroy(raster); + + PG_RETURN_NULL(); + } + } + + POSTGIS_RT_DEBUGF(5, "(x, y, val) = (%d, %d, %f)", x, y, haspixel ? pixel : nodataval); + + } /* y: height */ + } /* x: width */ + } + + /* CLEANUP */ + if (calltype == TEXTOID) { + for (i = 0; i < spi_count; i++) { + if (spi_plan[i] != NULL) SPI_freeplan(spi_plan[i]); + } + SPI_finish(); + } + + for (k = 0; k < set_count; k++) { + if (_rast[k] != NULL) rt_raster_destroy(_rast[k]); + } + + pgrast = rt_raster_serialize(raster); + rt_raster_destroy(raster); + if (!pgrast) PG_RETURN_NULL(); + + POSTGIS_RT_DEBUG(3, "Finished RASTER_mapAlgebra2"); + + SET_VARSIZE(pgrast, pgrast->size); + PG_RETURN_POINTER(pgrast); +} + +/** + * One raster neighborhood MapAlgebra + */ +PG_FUNCTION_INFO_V1(RASTER_mapAlgebraFctNgb); +Datum RASTER_mapAlgebraFctNgb(PG_FUNCTION_ARGS) +{ + rt_pgraster *pgraster = NULL; + rt_raster raster = NULL; + rt_raster newrast = NULL; + rt_band band = NULL; + rt_band newband = NULL; + int x, y, nband, width, height, ngbwidth, ngbheight, winwidth, winheight, u, v, nIndex, nNullItems; + double r, rpix; + double newnodatavalue = 0.0; + double newinitialvalue = 0.0; + double newval = 0.0; + rt_pixtype newpixeltype; + int ret = -1; + Oid oid; + FmgrInfo cbinfo; + FunctionCallInfoData cbdata; + Datum tmpnewval; + ArrayType * neighborDatum; + char * strFromText = NULL; + text * txtNodataMode = NULL; + text * txtCallbackParam = NULL; + int intReplace = 0; + float fltReplace = 0; + bool valuereplace = false, pixelreplace, nNodataOnly = true, nNullSkip = false; + Datum * neighborData = NULL; + bool * neighborNulls = NULL; + int neighborDims[2]; + int neighborLbs[2]; + int16 typlen; + bool typbyval; + char typalign; + + POSTGIS_RT_DEBUG(2, "RASTER_mapAlgebraFctNgb: STARTING..."); + + /* Check raster */ + if (PG_ARGISNULL(0)) { + elog(WARNING, "Raster is NULL. Returning NULL"); + PG_RETURN_NULL(); + } + + + /* Deserialize raster */ + pgraster = (rt_pgraster *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + raster = rt_raster_deserialize(pgraster, FALSE); + if (NULL == raster) + { + elog(ERROR, "RASTER_mapAlgebraFctNgb: Could not deserialize raster"); + PG_RETURN_NULL(); + } + + POSTGIS_RT_DEBUG(3, "RASTER_mapAlgebraFctNgb: Getting arguments..."); + + /* Get the rest of the arguments */ + + if (PG_ARGISNULL(1)) + nband = 1; + else + nband = PG_GETARG_INT32(1); + + if (nband < 1) + nband = 1; + + POSTGIS_RT_DEBUG(3, "RASTER_mapAlgebraFctNgb: Creating new empty raster..."); + + /** + * Create a new empty raster with having the same georeference as the + * provided raster + **/ + width = rt_raster_get_width(raster); + height = rt_raster_get_height(raster); + + newrast = rt_raster_new(width, height); + + if ( NULL == newrast ) { + elog(ERROR, "RASTER_mapAlgebraFctNgb: Could not create a new raster. " + "Returning NULL"); + PG_RETURN_NULL(); + } + + rt_raster_set_scale(newrast, + rt_raster_get_x_scale(raster), + rt_raster_get_y_scale(raster)); + + rt_raster_set_offsets(newrast, + rt_raster_get_x_offset(raster), + rt_raster_get_y_offset(raster)); + + rt_raster_set_skews(newrast, + rt_raster_get_x_skew(raster), + rt_raster_get_y_skew(raster)); + + rt_raster_set_srid(newrast, rt_raster_get_srid(raster)); + + + /** + * If this new raster is empty (width = 0 OR height = 0) then there is + * nothing to compute and we return it right now + **/ + if (rt_raster_is_empty(newrast)) + { + elog(NOTICE, "Raster is empty. Returning an empty raster"); + rt_raster_destroy(raster); + + pgraster = rt_raster_serialize(newrast); + if (NULL == pgraster) { + elog(ERROR, "RASTER_mapAlgebraFctNgb: Could not serialize raster. " + "Returning NULL"); + PG_RETURN_NULL(); + } + + SET_VARSIZE(pgraster, pgraster->size); + rt_raster_destroy(newrast); + + PG_RETURN_POINTER(pgraster); + } + + POSTGIS_RT_DEBUGF(3, "RASTER_mapAlgebraFctNgb: Getting raster band %d...", nband); + + /** + * Check if the raster has the required band. Otherwise, return a raster + * without band + **/ + if (rt_raster_has_no_band(raster, nband - 1)) { + elog(NOTICE, "Raster does not have the required band. Returning a raster " + "without a band"); + rt_raster_destroy(raster); + + pgraster = rt_raster_serialize(newrast); + if (NULL == pgraster) { + elog(ERROR, "RASTER_mapAlgebraFctNgb: Could not serialize raster. " + "Returning NULL"); + PG_RETURN_NULL(); + } + + SET_VARSIZE(pgraster, pgraster->size); + rt_raster_destroy(newrast); + + PG_RETURN_POINTER(pgraster); + } + + /* Get the raster band */ + band = rt_raster_get_band(raster, nband - 1); + if ( NULL == band ) { + elog(NOTICE, "Could not get the required band. Returning a raster " + "without a band"); + rt_raster_destroy(raster); + + pgraster = rt_raster_serialize(newrast); + if (NULL == pgraster) { + elog(ERROR, "RASTER_mapAlgebraFctNgb: Could not serialize raster. " + "Returning NULL"); + PG_RETURN_NULL(); + } + + SET_VARSIZE(pgraster, pgraster->size); + + rt_raster_destroy(newrast); + + PG_RETURN_POINTER(pgraster); + } + + /* + * Get NODATA value + */ + POSTGIS_RT_DEBUG(3, "RASTER_mapAlgebraFctNgb: Getting NODATA value for band..."); + + if (rt_band_get_hasnodata_flag(band)) { + newnodatavalue = rt_band_get_nodata(band); + } + + else { + newnodatavalue = rt_band_get_min_value(band); + } + + POSTGIS_RT_DEBUGF(3, "RASTER_mapAlgebraFctNgb: NODATA value for band: %f", + newnodatavalue); + /** + * We set the initial value of the future band to nodata value. If nodata + * value is null, then the raster will be initialized to + * rt_band_get_min_value but all the values should be recomputed anyway + **/ + newinitialvalue = newnodatavalue; + + /** + * Set the new pixeltype + **/ + POSTGIS_RT_DEBUG(3, "RASTER_mapAlgebraFctNgb: Setting pixeltype..."); + + if (PG_ARGISNULL(2)) { + newpixeltype = rt_band_get_pixtype(band); + } + + else { + strFromText = text_to_cstring(PG_GETARG_TEXT_P(2)); + POSTGIS_RT_DEBUGF(3, "RASTER_mapAlgebraFctNgb: Pixeltype parameter: %s", strFromText); + newpixeltype = rt_pixtype_index_from_name(strFromText); + pfree(strFromText); + if (newpixeltype == PT_END) + newpixeltype = rt_band_get_pixtype(band); + } + + if (newpixeltype == PT_END) { + elog(ERROR, "RASTER_mapAlgebraFctNgb: Invalid pixeltype. Returning NULL"); + + rt_raster_destroy(raster); + rt_raster_destroy(newrast); + + PG_RETURN_NULL(); + } + + POSTGIS_RT_DEBUGF(3, "RASTER_mapAlgebraFctNgb: Pixeltype set to %s (%d)", + rt_pixtype_name(newpixeltype), newpixeltype); + + /* Get the name of the callback userfunction */ + if (PG_ARGISNULL(5)) { + elog(ERROR, "RASTER_mapAlgebraFctNgb: Required function is missing. Returning NULL"); + + rt_raster_destroy(raster); + rt_raster_destroy(newrast); + + PG_RETURN_NULL(); + } + + oid = PG_GETARG_OID(5); + if (oid == InvalidOid) { + elog(ERROR, "RASTER_mapAlgebraFctNgb: Got invalid function object id. Returning NULL"); + + rt_raster_destroy(raster); + rt_raster_destroy(newrast); + + PG_RETURN_NULL(); + } + + fmgr_info(oid, &cbinfo); + + /* function cannot return set */ + if (cbinfo.fn_retset) { + elog(ERROR, "RASTER_mapAlgebraFctNgb: Function provided must return double precision not resultset. Returning NULL"); + + rt_raster_destroy(raster); + rt_raster_destroy(newrast); + + PG_RETURN_NULL(); + } + /* function should have correct # of args */ + else if (cbinfo.fn_nargs != 3) { + elog(ERROR, "RASTER_mapAlgebraFctNgb: Function does not have three input parameters. Returning NULL"); + + rt_raster_destroy(raster); + rt_raster_destroy(newrast); + + PG_RETURN_NULL(); + } + + if (func_volatile(oid) == 'v') { + elog(NOTICE, "Function provided is VOLATILE. Unless required and for best performance, function should be IMMUTABLE or STABLE"); + } + + /* prep function call data */ +#if POSTGIS_PGSQL_VERSION <= 90 + InitFunctionCallInfoData(cbdata, &cbinfo, 3, InvalidOid, NULL); +#else + InitFunctionCallInfoData(cbdata, &cbinfo, 3, InvalidOid, NULL, NULL); +#endif + memset(cbdata.argnull, FALSE, 3); + + /* check that the function isn't strict if the args are null. */ + if (PG_ARGISNULL(7)) { + if (cbinfo.fn_strict) { + elog(ERROR, "RASTER_mapAlgebraFctNgb: Strict callback functions cannot have null parameters. Returning NULL"); + + rt_raster_destroy(raster); + rt_raster_destroy(newrast); + + PG_RETURN_NULL(); + } + + cbdata.arg[2] = (Datum)NULL; + cbdata.argnull[2] = TRUE; + } + else { + cbdata.arg[2] = PG_GETARG_DATUM(7); + } + + /** + * Optimization: If the raster is only filled with nodata values return + * right now a raster filled with the nodatavalueexpr + * TODO: Call rt_band_check_isnodata instead? + **/ + if (rt_band_get_isnodata_flag(band)) { + + POSTGIS_RT_DEBUG(3, "RASTER_mapAlgebraFctNgb: Band is a nodata band, returning " + "a raster filled with nodata"); + + rt_raster_generate_new_band(newrast, newpixeltype, + newinitialvalue, TRUE, newnodatavalue, 0); + + /* Serialize created raster */ + pgraster = rt_raster_serialize(newrast); + if (NULL == pgraster) { + elog(ERROR, "RASTER_mapAlgebraFctNgb: Could not serialize raster. " + "Returning NULL"); + PG_RETURN_NULL(); + } + + SET_VARSIZE(pgraster, pgraster->size); + + /* Free memory */ + rt_raster_destroy(raster); + rt_raster_destroy(newrast); + + PG_RETURN_POINTER(pgraster); + } + + + /** + * Create the raster receiving all the computed values. Initialize it to the + * new initial value + **/ + rt_raster_generate_new_band(newrast, newpixeltype, + newinitialvalue, TRUE, newnodatavalue, 0); + + /* Get the new raster band */ + newband = rt_raster_get_band(newrast, 0); + if ( NULL == newband ) { + elog(NOTICE, "Could not modify band for new raster. Returning new " + "raster with the original band"); + + /* Serialize created raster */ + pgraster = rt_raster_serialize(newrast); + if (NULL == pgraster) { + elog(ERROR, "RASTER_mapAlgebraFctNgb: Could not serialize raster. " + "Returning NULL"); + + PG_RETURN_NULL(); + } + + SET_VARSIZE(pgraster, pgraster->size); + + rt_raster_destroy(raster); + rt_raster_destroy(newrast); + + PG_RETURN_POINTER(pgraster); + } + + /* Get the width of the neighborhood */ + if (PG_ARGISNULL(3) || PG_GETARG_INT32(3) <= 0) { + elog(NOTICE, "Neighborhood width is NULL or <= 0. Returning new " + "raster with the original band"); + + /* Serialize created raster */ + pgraster = rt_raster_serialize(newrast); + if (NULL == pgraster) { + elog(ERROR, "RASTER_mapAlgebraFctNgb: Could not serialize raster. " + "Returning NULL"); + + PG_RETURN_NULL(); + } + + SET_VARSIZE(pgraster, pgraster->size); + + rt_raster_destroy(raster); + rt_raster_destroy(newrast); + + PG_RETURN_POINTER(pgraster); + } + + ngbwidth = PG_GETARG_INT32(3); + winwidth = ngbwidth * 2 + 1; + + /* Get the height of the neighborhood */ + if (PG_ARGISNULL(4) || PG_GETARG_INT32(4) <= 0) { + elog(NOTICE, "Neighborhood height is NULL or <= 0. Returning new " + "raster with the original band"); + + /* Serialize created raster */ + pgraster = rt_raster_serialize(newrast); + if (NULL == pgraster) { + elog(ERROR, "RASTER_mapAlgebraFctNgb: Could not serialize raster. " + "Returning NULL"); + + PG_RETURN_NULL(); + } + + SET_VARSIZE(pgraster, pgraster->size); + + rt_raster_destroy(raster); + rt_raster_destroy(newrast); + + PG_RETURN_POINTER(pgraster); + } + + ngbheight = PG_GETARG_INT32(4); + winheight = ngbheight * 2 + 1; + + /* Get the type of NODATA behavior for the neighborhoods. */ + if (PG_ARGISNULL(6)) { + elog(NOTICE, "Neighborhood NODATA behavior defaulting to 'ignore'"); + txtNodataMode = cstring_to_text("ignore"); + } + else { + txtNodataMode = PG_GETARG_TEXT_P(6); + } + + txtCallbackParam = (text*)palloc(VARSIZE(txtNodataMode)); + SET_VARSIZE(txtCallbackParam, VARSIZE(txtNodataMode)); + memcpy((void *)VARDATA(txtCallbackParam), (void *)VARDATA(txtNodataMode), VARSIZE(txtNodataMode) - VARHDRSZ); + + /* pass the nodata mode into the user function */ + cbdata.arg[1] = CStringGetDatum(txtCallbackParam); + + strFromText = text_to_cstring(txtNodataMode); + strFromText = rtpg_strtoupper(strFromText); + + if (strcmp(strFromText, "VALUE") == 0) + valuereplace = true; + else if (strcmp(strFromText, "IGNORE") != 0 && strcmp(strFromText, "NULL") != 0) { + // if the text is not "IGNORE" or "NULL", it may be a numerical value + if (sscanf(strFromText, "%d", &intReplace) <= 0 && sscanf(strFromText, "%f", &fltReplace) <= 0) { + // the value is NOT an integer NOR a floating point + elog(NOTICE, "Neighborhood NODATA mode is not recognized. Must be one of 'value', 'ignore', " + "'NULL', or a numeric value. Returning new raster with the original band"); + + /* clean up the nodatamode string */ + pfree(txtCallbackParam); + pfree(strFromText); + + /* Serialize created raster */ + pgraster = rt_raster_serialize(newrast); + if (NULL == pgraster) { + elog(ERROR, "RASTER_mapAlgebraFctNgb: Could not serialize raster. " + "Returning NULL"); + + PG_RETURN_NULL(); + } + + SET_VARSIZE(pgraster, pgraster->size); + + rt_raster_destroy(raster); + rt_raster_destroy(newrast); + + PG_RETURN_POINTER(pgraster); + } + } + else if (strcmp(strFromText, "NULL") == 0) { + /* this setting means that the neighborhood should be skipped if any of the values are null */ + nNullSkip = true; + } + + POSTGIS_RT_DEBUGF(3, "RASTER_mapAlgebraFctNgb: Main computing loop (%d x %d)", + width, height); + + /* Allocate room for the neighborhood. */ + neighborData = (Datum *)palloc(winwidth * winheight * sizeof(Datum)); + neighborNulls = (bool *)palloc(winwidth * winheight * sizeof(bool)); + + /* The dimensions of the neighborhood array, for creating a multi-dimensional array. */ + neighborDims[0] = winwidth; + neighborDims[1] = winheight; + + /* The lower bounds for the new multi-dimensional array. */ + neighborLbs[0] = 1; + neighborLbs[1] = 1; + + /* Get information about the type of item in the multi-dimensional array (float8). */ + get_typlenbyvalalign(FLOAT8OID, &typlen, &typbyval, &typalign); + + for (x = 0 + ngbwidth; x < width - ngbwidth; x++) { + for(y = 0 + ngbheight; y < height - ngbheight; y++) { + /* populate an array with the pixel values in the neighborhood */ + nIndex = 0; + nNullItems = 0; + nNodataOnly = true; + pixelreplace = false; + if (valuereplace) { + ret = rt_band_get_pixel(band, x, y, &rpix); + if (ret != -1 && FLT_NEQ(rpix, newnodatavalue)) { + pixelreplace = true; + } + } + for (u = x - ngbwidth; u <= x + ngbwidth; u++) { + for (v = y - ngbheight; v <= y + ngbheight; v++) { + ret = rt_band_get_pixel(band, u, v, &r); + if (ret != -1) { + if (FLT_NEQ(r, newnodatavalue)) { + /* If the pixel value for this neighbor cell is not NODATA */ + neighborData[nIndex] = Float8GetDatum((double)r); + neighborNulls[nIndex] = false; + nNodataOnly = false; + } + else { + /* If the pixel value for this neighbor cell is NODATA */ + if (valuereplace && pixelreplace) { + /* Replace the NODATA value with the currently processing pixel. */ + neighborData[nIndex] = Float8GetDatum((double)rpix); + neighborNulls[nIndex] = false; + /* do not increment nNullItems, since the user requested that the */ + /* neighborhood replace NODATA values with the central pixel value */ + } + else { + neighborData[nIndex] = PointerGetDatum(NULL); + neighborNulls[nIndex] = true; + nNullItems++; + } + } + } + else { + /* Fill this will NULL if we can't read the raster pixel. */ + neighborData[nIndex] = PointerGetDatum(NULL); + neighborNulls[nIndex] = true; + nNullItems++; + } + /* Next neighbor position */ + nIndex++; + } + } + + /** + * We compute a value only for the withdata value neighborhood since the + * nodata value has already been set by the first optimization + **/ + if (!(nNodataOnly || /* neighborhood only contains NODATA -- OR -- */ + (nNullSkip && nNullItems > 0) || /* neighborhood should skip any NODATA cells, and a NODATA cell was detected -- OR -- */ + (valuereplace && nNullItems > 0))) { /* neighborhood should replace NODATA cells with the central pixel value, and a NODATA cell was detected */ + POSTGIS_RT_DEBUGF(3, "RASTER_mapAlgebraFctNgb: (%dx%d), %dx%d neighborhood", + x, y, winwidth, winheight); + + neighborDatum = construct_md_array((void *)neighborData, neighborNulls, 2, neighborDims, neighborLbs, + FLOAT8OID, typlen, typbyval, typalign); + + /* Assign the neighbor matrix as the first argument to the user function */ + cbdata.arg[0] = PointerGetDatum(neighborDatum); + + /* Invoke the user function */ + tmpnewval = FunctionCallInvoke(&cbdata); + + /* Get the return value of the user function */ + if (cbdata.isnull) { + newval = newnodatavalue; + } + else { + newval = DatumGetFloat8(tmpnewval); + } + + POSTGIS_RT_DEBUGF(3, "RASTER_mapAlgebraFctNgb: new value = %f", + newval); + + rt_band_set_pixel(newband, x, y, newval); + } + + /* reset the number of null items in the neighborhood */ + nNullItems = 0; + } + } + + + /* clean up */ + pfree(neighborNulls); + pfree(neighborData); + pfree(strFromText); + pfree(txtCallbackParam); + + /* The newrast band has been modified */ + + POSTGIS_RT_DEBUG(3, "RASTER_mapAlgebraFctNgb: raster modified, serializing it."); + /* Serialize created raster */ + + pgraster = rt_raster_serialize(newrast); + if (NULL == pgraster) { + rt_raster_destroy(raster); + rt_raster_destroy(newrast); + + PG_RETURN_NULL(); + } + + SET_VARSIZE(pgraster, pgraster->size); + + POSTGIS_RT_DEBUG(3, "RASTER_mapAlgebraFctNgb: raster serialized"); + + rt_raster_destroy(raster); + rt_raster_destroy(newrast); + + POSTGIS_RT_DEBUG(4, "RASTER_mapAlgebraFctNgb: returning raster"); + + PG_RETURN_POINTER(pgraster); +} + +/* ---------------------------------------------------------------- */ +/* Memory allocation / error reporting hooks */ +/* ---------------------------------------------------------------- */ + +static void * +rt_pg_alloc(size_t size) +{ + void * result; + + POSTGIS_RT_DEBUGF(5, "rt_pgalloc(%ld) called", (long int) size); + + result = palloc(size); + + return result; +} + +static void * +rt_pg_realloc(void *mem, size_t size) +{ + void * result; + + POSTGIS_RT_DEBUGF(5, "rt_pg_realloc(%ld) called", (long int) size); + + if (mem) + result = repalloc(mem, size); + + else + result = palloc(size); + + return result; +} + +static void +rt_pg_free(void *ptr) +{ + POSTGIS_RT_DEBUG(5, "rt_pfree called"); + pfree(ptr); +} + +static void +rt_pg_error(const char *fmt, va_list ap) +{ +#define ERRMSG_MAXLEN 256 + + char errmsg[ERRMSG_MAXLEN+1]; + + vsnprintf (errmsg, ERRMSG_MAXLEN, fmt, ap); + + errmsg[ERRMSG_MAXLEN]='\0'; + ereport(ERROR, (errmsg_internal("%s", errmsg))); +} + +static void +rt_pg_notice(const char *fmt, va_list ap) +{ + char *msg; + + /* + * This is a GNU extension. + * Dunno how to handle errors here. + */ + if (!lw_vasprintf (&msg, fmt, ap)) + { + va_end (ap); + return; + } + ereport(NOTICE, (errmsg_internal("%s", msg))); + free(msg); +} + + +#if 0 /* defined by libpgcommon { */ +/* This is needed by liblwgeom */ +void +lwgeom_init_allocators(void) +{ + /* liblwgeom callback - install PostgreSQL handlers */ + lwalloc_var = rt_pg_alloc; + lwrealloc_var = rt_pg_realloc; + lwfree_var = rt_pg_free; + lwerror_var = rt_pg_error; + lwnotice_var = rt_pg_notice; +} +#endif /* defined by libpgcommon } */ + + +void +rt_init_allocators(void) +{ + /* raster callback - install raster handlers */ + rt_set_handlers(rt_pg_alloc, rt_pg_realloc, rt_pg_free, rt_pg_error, + rt_pg_notice, rt_pg_notice); +} + diff -Nru postgis-1.5.3/raster/rt_pg/rt_pg.h postgis-2.0.1/raster/rt_pg/rt_pg.h --- postgis-1.5.3/raster/rt_pg/rt_pg.h 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/rt_pg/rt_pg.h 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,102 @@ +/* + * $Id: rt_pg.h 9324 2012-02-27 22:08:12Z pramsey $ + * + * WKTRaster - Raster Types for PostGIS + * http://www.postgis.org/support/wiki/index.php?WKTRasterHomePage + * + * Copyright (C) 2010-2011 Jorge Arevalo + * Copyright (C) 2010-2011 David Zwarg + * Copyright (C) 2009-2011 Pierre Racine + * Copyright (C) 2009-2011 Mateusz Loskot + * Copyright (C) 2008-2009 Sandro Santilli + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef RT_PG_H_INCLUDED +#define RT_PG_H_INCLUDED + +#include /* for int16_t and friends */ + +#include "rt_api.h" +#include "../../postgis_config.h" +#include "../raster_config.h" + +/* Debugging macros */ +#if POSTGIS_DEBUG_LEVEL > 0 + +/* Display a simple message at NOTICE level */ +#define POSTGIS_RT_DEBUG(level, msg) \ + do { \ + if (POSTGIS_DEBUG_LEVEL >= level) \ + ereport(NOTICE, (errmsg_internal("[%s:%s:%d] " msg, __FILE__, __func__, __LINE__))); \ + } while (0); + +/* Display a formatted message at NOTICE level (like printf, with variadic arguments) */ +#define POSTGIS_RT_DEBUGF(level, msg, ...) \ + do { \ + if (POSTGIS_DEBUG_LEVEL >= level) \ + ereport(NOTICE, (errmsg_internal("[%s:%s:%d] " msg, __FILE__, __func__, __LINE__, __VA_ARGS__))); \ + } while (0); + +#else + +/* Empty prototype that can be optimised away by the compiler for non-debug builds */ +#define POSTGIS_RT_DEBUG(level, msg) \ + ((void) 0) + +/* Empty prototype that can be optimised away by the compiler for non-debug builds */ +#define POSTGIS_RT_DEBUGF(level, msg, ...) \ + ((void) 0) + +#endif + + +typedef struct rt_pgband8_t { + uint8_t pixtype; + uint8_t data[1]; +} rt_pgband8; + +typedef struct rt_pgband16_t { + uint8_t pixtype; + uint8_t pad; + uint8_t data[1]; +} rt_pgband16; + +typedef struct rt_pgband32_t { + uint8_t pixtype; + uint8_t pad0; + uint8_t pad1; + uint8_t pad2; + uint8_t data[1]; +} rt_pgband32; + +typedef struct rt_pgband64_t { + uint8_t pixtype; + uint8_t pad[7]; + uint8_t data[1]; +} rt_pgband64; + +typedef struct rt_pgband_t { + uint8_t pixtype; + uint8_t data[1]; +} rt_pgband; + +/* Header of PostgreSQL-stored RASTER value, + * and binary representation of it */ +typedef struct rt_raster_serialized_t rt_pgraster; + +#endif /* RT_PG_H_INCLUDED */ diff -Nru postgis-1.5.3/raster/rt_pg/rtpostgis.sql.in.c postgis-2.0.1/raster/rt_pg/rtpostgis.sql.in.c --- postgis-1.5.3/raster/rt_pg/rtpostgis.sql.in.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/rt_pg/rtpostgis.sql.in.c 2012-06-18 22:44:40.000000000 +0000 @@ -0,0 +1,4995 @@ +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- +-- +-- PostGIS Raster - Raster Type for PostGIS +-- http://trac.osgeo.org/postgis/wiki/WKTRaster +-- +-- Copyright (c) 2009-2012 Sandro Santilli +-- Copyright (c) 2009-2010 Pierre Racine +-- Copyright (c) 2009-2010 Jorge Arevalo +-- Copyright (c) 2009-2010 Mateusz Loskot +-- Copyright (c) 2010 David Zwarg +-- Copyright (C) 2011 Regents of the University of California +-- +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +-- +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- +-- WARNING: Any change in this file must be evaluated for compatibility. +-- +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +#include "../../postgis/sqldefines.h" + +SET client_min_messages TO warning; + +BEGIN; + +------------------------------------------------------------------------------ +-- RASTER Type +------------------------------------------------------------------------------ + +CREATE OR REPLACE FUNCTION raster_in(cstring) + RETURNS raster + AS 'MODULE_PATHNAME','RASTER_in' + LANGUAGE 'c' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION raster_out(raster) + RETURNS cstring + AS 'MODULE_PATHNAME','RASTER_out' + LANGUAGE 'c' IMMUTABLE STRICT; + +CREATE TYPE raster ( + alignment = double, + internallength = variable, + input = raster_in, + output = raster_out, + storage = extended +); + +------------------------------------------------------------------------------ +-- FUNCTIONS +------------------------------------------------------------------------------ + +----------------------------------------------------------------------- +-- Raster Version +----------------------------------------------------------------------- + +CREATE OR REPLACE FUNCTION postgis_raster_lib_version() + RETURNS text + AS 'MODULE_PATHNAME', 'RASTER_lib_version' + LANGUAGE 'c' IMMUTABLE; -- a new lib will require a new session + +CREATE OR REPLACE FUNCTION postgis_raster_scripts_installed() RETURNS text + AS _POSTGIS_SQL_SELECT_POSTGIS_SCRIPTS_VERSION + LANGUAGE 'sql' IMMUTABLE; + +CREATE OR REPLACE FUNCTION postgis_raster_lib_build_date() + RETURNS text + AS 'MODULE_PATHNAME', 'RASTER_lib_build_date' + LANGUAGE 'c' IMMUTABLE; -- a new lib will require a new session + +CREATE OR REPLACE FUNCTION postgis_gdal_version() + RETURNS text + AS 'MODULE_PATHNAME', 'RASTER_gdal_version' + LANGUAGE 'c' IMMUTABLE; + +----------------------------------------------------------------------- +-- Raster Accessors +----------------------------------------------------------------------- + +CREATE OR REPLACE FUNCTION st_convexhull(raster) + RETURNS geometry + AS 'MODULE_PATHNAME','RASTER_convex_hull' + LANGUAGE 'c' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION box3d(raster) + RETURNS box3d + AS 'select box3d(st_convexhull($1))' + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_envelope(raster) + RETURNS geometry + AS 'select st_envelope(st_convexhull($1))' + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_height(raster) + RETURNS integer + AS 'MODULE_PATHNAME','RASTER_getHeight' + LANGUAGE 'c' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_numbands(raster) + RETURNS integer + AS 'MODULE_PATHNAME','RASTER_getNumBands' + LANGUAGE 'c' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_scalex(raster) + RETURNS float8 + AS 'MODULE_PATHNAME','RASTER_getXScale' + LANGUAGE 'c' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_scaley(raster) + RETURNS float8 + AS 'MODULE_PATHNAME','RASTER_getYScale' + LANGUAGE 'c' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_skewx(raster) + RETURNS float8 + AS 'MODULE_PATHNAME','RASTER_getXSkew' + LANGUAGE 'c' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_skewy(raster) + RETURNS float8 + AS 'MODULE_PATHNAME','RASTER_getYSkew' + LANGUAGE 'c' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_srid(raster) + RETURNS integer + AS 'MODULE_PATHNAME','RASTER_getSRID' + LANGUAGE 'c' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_upperleftx(raster) + RETURNS float8 + AS 'MODULE_PATHNAME','RASTER_getXUpperLeft' + LANGUAGE 'c' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_upperlefty(raster) + RETURNS float8 + AS 'MODULE_PATHNAME','RASTER_getYUpperLeft' + LANGUAGE 'c' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_width(raster) + RETURNS integer + AS 'MODULE_PATHNAME','RASTER_getWidth' + LANGUAGE 'c' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_pixelwidth(raster) + RETURNS float8 + AS 'MODULE_PATHNAME', 'RASTER_getPixelWidth' + LANGUAGE 'c' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_pixelheight(raster) + RETURNS float8 + AS 'MODULE_PATHNAME', 'RASTER_getPixelHeight' + LANGUAGE 'c' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_geotransform(raster, + OUT imag double precision, + OUT jmag double precision, + OUT theta_i double precision, + OUT theta_ij double precision, + OUT xoffset double precision, + OUT yoffset double precision) + AS 'MODULE_PATHNAME', 'RASTER_getGeotransform' + LANGUAGE 'c' IMMUTABLE; + +CREATE OR REPLACE FUNCTION st_rotation(raster) + RETURNS float8 + AS $$ SELECT (ST_Geotransform($1)).theta_i $$ + LANGUAGE 'sql' VOLATILE; + +CREATE OR REPLACE FUNCTION st_metadata( + rast raster, + OUT upperleftx double precision, + OUT upperlefty double precision, + OUT width int, + OUT height int, + OUT scalex double precision, + OUT scaley double precision, + OUT skewx double precision, + OUT skewy double precision, + OUT srid int, + OUT numbands int +) + AS 'MODULE_PATHNAME', 'RASTER_metadata' + LANGUAGE 'c' IMMUTABLE STRICT; + +----------------------------------------------------------------------- +-- Constructors ST_MakeEmptyRaster and ST_AddBand +----------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION st_makeemptyraster(width int, height int, upperleftx float8, upperlefty float8, scalex float8, scaley float8, skewx float8, skewy float8, srid int4 DEFAULT 0) + RETURNS RASTER + AS 'MODULE_PATHNAME', 'RASTER_makeEmpty' + LANGUAGE 'c' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_makeemptyraster(width int, height int, upperleftx float8, upperlefty float8, pixelsize float8) + RETURNS raster + AS $$ SELECT st_makeemptyraster($1, $2, $3, $4, $5, -($5), 0, 0, ST_SRID('POINT(0 0)'::geometry)) $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_makeemptyraster(rast raster) + RETURNS raster + AS $$ + DECLARE + w int; + h int; + ul_x double precision; + ul_y double precision; + scale_x double precision; + scale_y double precision; + skew_x double precision; + skew_y double precision; + sr_id int; + BEGIN + SELECT width, height, upperleftx, upperlefty, scalex, scaley, skewx, skewy, srid INTO w, h, ul_x, ul_y, scale_x, scale_y, skew_x, skew_y, sr_id FROM ST_Metadata(rast); + RETURN st_makeemptyraster(w, h, ul_x, ul_y, scale_x, scale_y, skew_x, skew_y, sr_id); + END; + $$ LANGUAGE 'plpgsql' IMMUTABLE STRICT; + +-- This function can not be STRICT, because nodataval can be NULL indicating that no nodata value should be set +CREATE OR REPLACE FUNCTION st_addband(rast raster, index int, pixeltype text, initialvalue float8 DEFAULT 0., nodataval float8 DEFAULT NULL) + RETURNS RASTER + AS 'MODULE_PATHNAME', 'RASTER_addband' + LANGUAGE 'c' IMMUTABLE; + +-- This function can not be STRICT, because nodataval can be NULL indicating that no nodata value should be set +CREATE OR REPLACE FUNCTION st_addband(rast raster, pixeltype text, initialvalue float8 DEFAULT 0., nodataval float8 DEFAULT NULL) + RETURNS raster + AS 'select st_addband($1, NULL, $2, $3, $4)' + LANGUAGE 'sql' IMMUTABLE; + +-- This function can not be STRICT, because torastindex can not be determined (could be st_numbands(raster) though) +CREATE OR REPLACE FUNCTION st_addband(torast raster, fromrast raster, fromband int DEFAULT 1, torastindex int DEFAULT NULL) + RETURNS RASTER + AS 'MODULE_PATHNAME', 'RASTER_copyband' + LANGUAGE 'c' IMMUTABLE; + +-- Variant that adds multiple raster bands in one array call -- +-- If null is passed in for the torast, then array of rasts is accumulated. +CREATE OR REPLACE FUNCTION ST_AddBand(torast raster, fromrasts raster[], fromband integer DEFAULT 1) + RETURNS raster + AS $$ + DECLARE var_result raster := torast; + var_num integer := array_upper(fromrasts,1); + var_i integer := 1; + BEGIN + IF torast IS NULL AND var_num > 0 THEN + var_result := ST_Band(fromrasts[1],fromband); + var_i := 2; + END IF; + WHILE var_i <= var_num LOOP + var_result := ST_AddBand(var_result, fromrasts[var_i], 1); + var_i := var_i + 1; + END LOOP; + + RETURN var_result; + END; +$$ LANGUAGE 'plpgsql'; + +----------------------------------------------------------------------- +-- Constructor ST_Band +----------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION st_band(rast raster, nbands int[] DEFAULT ARRAY[1]) + RETURNS RASTER + AS 'MODULE_PATHNAME', 'RASTER_band' + LANGUAGE 'c' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_band(rast raster, nband int) + RETURNS RASTER + AS $$ SELECT st_band($1, ARRAY[$2]) $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_band(rast raster, nbands text, delimiter char DEFAULT ',') + RETURNS RASTER + AS $$ SELECT st_band($1, regexp_split_to_array(regexp_replace($2, '[[:space:]]', '', 'g'), $3)::int[]) $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +----------------------------------------------------------------------- +-- ST_SummaryStats and ST_ApproxSummaryStats +----------------------------------------------------------------------- +CREATE TYPE summarystats AS ( + count bigint, + sum double precision, + mean double precision, + stddev double precision, + min double precision, + max double precision +); + +CREATE OR REPLACE FUNCTION _st_summarystats(rast raster, nband int DEFAULT 1, exclude_nodata_value boolean DEFAULT TRUE, sample_percent double precision DEFAULT 1) + RETURNS summarystats + AS 'MODULE_PATHNAME','RASTER_summaryStats' + LANGUAGE 'c' IMMUTABLE; + +CREATE OR REPLACE FUNCTION st_summarystats(rast raster, nband int DEFAULT 1, exclude_nodata_value boolean DEFAULT TRUE) + RETURNS summarystats + AS $$ SELECT _st_summarystats($1, $2, $3, 1) $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_summarystats(rast raster, exclude_nodata_value boolean) + RETURNS summarystats + AS $$ SELECT _st_summarystats($1, 1, $2, 1) $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_approxsummarystats(rast raster, nband int DEFAULT 1, exclude_nodata_value boolean DEFAULT TRUE, sample_percent double precision DEFAULT 0.1) + RETURNS summarystats + AS $$ SELECT _st_summarystats($1, $2, $3, $4) $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_approxsummarystats(rast raster, nband int, sample_percent double precision) + RETURNS summarystats + AS $$ SELECT _st_summarystats($1, $2, TRUE, $3) $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_approxsummarystats(rast raster, exclude_nodata_value boolean, sample_percent double precision DEFAULT 0.1) + RETURNS summarystats + AS $$ SELECT _st_summarystats($1, 1, $2, $3) $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_approxsummarystats(rast raster, sample_percent double precision) + RETURNS summarystats + AS $$ SELECT _st_summarystats($1, 1, TRUE, $2) $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION _st_summarystats(rastertable text, rastercolumn text, nband integer DEFAULT 1, exclude_nodata_value boolean DEFAULT TRUE, sample_percent double precision DEFAULT 1) + RETURNS summarystats + AS 'MODULE_PATHNAME','RASTER_summaryStatsCoverage' + LANGUAGE 'c' IMMUTABLE; + +CREATE OR REPLACE FUNCTION st_summarystats(rastertable text, rastercolumn text, nband integer DEFAULT 1, exclude_nodata_value boolean DEFAULT TRUE) + RETURNS summarystats + AS $$ SELECT _st_summarystats($1, $2, $3, $4, 1) $$ + LANGUAGE 'sql' STABLE STRICT; + +CREATE OR REPLACE FUNCTION st_summarystats(rastertable text, rastercolumn text, exclude_nodata_value boolean) + RETURNS summarystats + AS $$ SELECT _st_summarystats($1, $2, 1, $3, 1) $$ + LANGUAGE 'sql' STABLE STRICT; + +CREATE OR REPLACE FUNCTION st_approxsummarystats(rastertable text, rastercolumn text, nband integer DEFAULT 1, exclude_nodata_value boolean DEFAULT TRUE, sample_percent double precision DEFAULT 0.1) + RETURNS summarystats + AS $$ SELECT _st_summarystats($1, $2, $3, $4, $5) $$ + LANGUAGE 'sql' STABLE STRICT; + +CREATE OR REPLACE FUNCTION st_approxsummarystats(rastertable text, rastercolumn text, nband integer, sample_percent double precision) + RETURNS summarystats + AS $$ SELECT _st_summarystats($1, $2, $3, TRUE, $4) $$ + LANGUAGE 'sql' STABLE STRICT; + +CREATE OR REPLACE FUNCTION st_approxsummarystats(rastertable text, rastercolumn text, exclude_nodata_value boolean) + RETURNS summarystats + AS $$ SELECT _st_summarystats($1, $2, 1, $3, 0.1) $$ + LANGUAGE 'sql' STABLE STRICT; + +CREATE OR REPLACE FUNCTION st_approxsummarystats(rastertable text, rastercolumn text, sample_percent double precision) + RETURNS summarystats + AS $$ SELECT _st_summarystats($1, $2, 1, TRUE, $3) $$ + LANGUAGE 'sql' STABLE STRICT; + +----------------------------------------------------------------------- +-- ST_Count and ST_ApproxCount +----------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION _st_count(rast raster, nband int DEFAULT 1, exclude_nodata_value boolean DEFAULT TRUE, sample_percent double precision DEFAULT 1) + RETURNS bigint + AS $$ + DECLARE + rtn bigint; + BEGIN + IF exclude_nodata_value IS FALSE THEN + SELECT width * height INTO rtn FROM ST_Metadata(rast); + ELSE + SELECT count INTO rtn FROM _st_summarystats($1, $2, $3, $4); + END IF; + + RETURN rtn; + END; + $$ LANGUAGE 'plpgsql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_count(rast raster, nband int DEFAULT 1, exclude_nodata_value boolean DEFAULT TRUE) + RETURNS bigint + AS $$ SELECT _st_count($1, $2, $3, 1) $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_count(rast raster, exclude_nodata_value boolean) + RETURNS bigint + AS $$ SELECT _st_count($1, 1, $2, 1) $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_approxcount(rast raster, nband int DEFAULT 1, exclude_nodata_value boolean DEFAULT TRUE, sample_percent double precision DEFAULT 0.1) + RETURNS bigint + AS $$ SELECT _st_count($1, $2, $3, $4) $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_approxcount(rast raster, nband int, sample_percent double precision) + RETURNS bigint + AS $$ SELECT _st_count($1, $2, TRUE, $3) $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_approxcount(rast raster, exclude_nodata_value boolean, sample_percent double precision DEFAULT 0.1) + RETURNS bigint + AS $$ SELECT _st_count($1, 1, $2, $3) $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_approxcount(rast raster, sample_percent double precision) + RETURNS bigint + AS $$ SELECT _st_count($1, 1, TRUE, $2) $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION _st_count(rastertable text, rastercolumn text, nband integer DEFAULT 1, exclude_nodata_value boolean DEFAULT TRUE, sample_percent double precision DEFAULT 1) + RETURNS bigint + AS $$ + DECLARE + curs refcursor; + + ctable text; + ccolumn text; + rast raster; + stats summarystats; + + rtn bigint; + tmp bigint; + BEGIN + -- nband + IF nband < 1 THEN + RAISE WARNING 'Invalid band index (must use 1-based). Returning NULL'; + RETURN NULL; + END IF; + + -- sample percent + IF sample_percent < 0 OR sample_percent > 1 THEN + RAISE WARNING 'Invalid sample percentage (must be between 0 and 1). Returning NULL'; + RETURN NULL; + END IF; + + -- exclude_nodata_value IS TRUE + IF exclude_nodata_value IS TRUE THEN + SELECT count INTO rtn FROM _st_summarystats($1, $2, $3, $4, $5); + RETURN rtn; + END IF; + + -- clean rastertable and rastercolumn + ctable := quote_ident(rastertable); + ccolumn := quote_ident(rastercolumn); + + BEGIN + OPEN curs FOR EXECUTE 'SELECT ' + || ccolumn + || ' FROM ' + || ctable + || ' WHERE ' + || ccolumn + || ' IS NOT NULL'; + EXCEPTION + WHEN OTHERS THEN + RAISE WARNING 'Invalid table or column name. Returning NULL'; + RETURN NULL; + END; + + rtn := 0; + LOOP + FETCH curs INTO rast; + EXIT WHEN NOT FOUND; + + SELECT (width * height) INTO tmp FROM ST_Metadata(rast); + rtn := rtn + tmp; + END LOOP; + + CLOSE curs; + + RETURN rtn; + END; + $$ LANGUAGE 'plpgsql' STABLE STRICT; + +CREATE OR REPLACE FUNCTION st_count(rastertable text, rastercolumn text, nband int DEFAULT 1, exclude_nodata_value boolean DEFAULT TRUE) + RETURNS bigint + AS $$ SELECT _st_count($1, $2, $3, $4, 1) $$ + LANGUAGE 'sql' STABLE STRICT; + +CREATE OR REPLACE FUNCTION st_count(rastertable text, rastercolumn text, exclude_nodata_value boolean) + RETURNS bigint + AS $$ SELECT _st_count($1, $2, 1, $3, 1) $$ + LANGUAGE 'sql' STABLE STRICT; + +CREATE OR REPLACE FUNCTION st_approxcount(rastertable text, rastercolumn text, nband int DEFAULT 1, exclude_nodata_value boolean DEFAULT TRUE, sample_percent double precision DEFAULT 0.1) + RETURNS bigint + AS $$ SELECT _st_count($1, $2, $3, $4, $5) $$ + LANGUAGE 'sql' STABLE STRICT; + +CREATE OR REPLACE FUNCTION st_approxcount(rastertable text, rastercolumn text, nband int, sample_percent double precision) + RETURNS bigint + AS $$ SELECT _st_count($1, $2, $3, TRUE, $4) $$ + LANGUAGE 'sql' STABLE STRICT; + +CREATE OR REPLACE FUNCTION st_approxcount(rastertable text, rastercolumn text, exclude_nodata_value boolean, sample_percent double precision DEFAULT 0.1) + RETURNS bigint + AS $$ SELECT _st_count($1, $2, 1, $3, $4) $$ + LANGUAGE 'sql' STABLE STRICT; + +CREATE OR REPLACE FUNCTION st_approxcount(rastertable text, rastercolumn text, sample_percent double precision) + RETURNS bigint + AS $$ SELECT _st_count($1, $2, 1, TRUE, $3) $$ + LANGUAGE 'sql' STABLE STRICT; + +----------------------------------------------------------------------- +-- ST_Histogram and ST_ApproxHistogram +----------------------------------------------------------------------- +CREATE TYPE histogram AS ( + min double precision, + max double precision, + count bigint, + percent double precision +); + +-- Cannot be strict as "width", "min" and "max" can be NULL +CREATE OR REPLACE FUNCTION _st_histogram( + rast raster, nband int DEFAULT 1, + exclude_nodata_value boolean DEFAULT TRUE, + sample_percent double precision DEFAULT 1, + bins int DEFAULT 0, width double precision[] DEFAULT NULL, + right boolean DEFAULT FALSE, + min double precision DEFAULT NULL, max double precision DEFAULT NULL +) + RETURNS SETOF histogram + AS 'MODULE_PATHNAME','RASTER_histogram' + LANGUAGE 'c' IMMUTABLE; + +-- Cannot be strict as "width" can be NULL +CREATE OR REPLACE FUNCTION st_histogram(rast raster, nband int DEFAULT 1, exclude_nodata_value boolean DEFAULT TRUE, bins int DEFAULT 0, width double precision[] DEFAULT NULL, right boolean DEFAULT FALSE) + RETURNS SETOF histogram + AS $$ SELECT min, max, count, percent FROM _st_histogram($1, $2, $3, 1, $4, $5, $6) $$ + LANGUAGE 'sql' IMMUTABLE; + +CREATE OR REPLACE FUNCTION st_histogram(rast raster, nband int, exclude_nodata_value boolean, bins int, right boolean) + RETURNS SETOF histogram + AS $$ SELECT min, max, count, percent FROM _st_histogram($1, $2, $3, 1, $4, NULL, $5) $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Cannot be strict as "width" can be NULL +CREATE OR REPLACE FUNCTION st_histogram(rast raster, nband int, bins int, width double precision[] DEFAULT NULL, right boolean DEFAULT FALSE) + RETURNS SETOF histogram + AS $$ SELECT min, max, count, percent FROM _st_histogram($1, $2, TRUE, 1, $3, $4, $5) $$ + LANGUAGE 'sql' IMMUTABLE; + +CREATE OR REPLACE FUNCTION st_histogram(rast raster, nband int, bins int, right boolean) + RETURNS SETOF histogram + AS $$ SELECT min, max, count, percent FROM _st_histogram($1, $2, TRUE, 1, $3, NULL, $4) $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Cannot be strict as "width" can be NULL +CREATE OR REPLACE FUNCTION st_approxhistogram( + rast raster, nband int DEFAULT 1, + exclude_nodata_value boolean DEFAULT TRUE, + sample_percent double precision DEFAULT 0.1, + bins int DEFAULT 0, width double precision[] DEFAULT NULL, + right boolean DEFAULT FALSE +) + RETURNS SETOF histogram + AS $$ SELECT min, max, count, percent FROM _st_histogram($1, $2, $3, $4, $5, $6, $7) $$ + LANGUAGE 'sql' IMMUTABLE; + +CREATE OR REPLACE FUNCTION st_approxhistogram(rast raster, nband int, exclude_nodata_value boolean, sample_percent double precision, bins int, right boolean) + RETURNS SETOF histogram + AS $$ SELECT min, max, count, percent FROM _st_histogram($1, $2, $3, $4, $5, NULL, $6) $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_approxhistogram(rast raster, nband int, sample_percent double precision) + RETURNS SETOF histogram + AS $$ SELECT min, max, count, percent FROM _st_histogram($1, $2, TRUE, $3, 0, NULL, FALSE) $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_approxhistogram(rast raster, sample_percent double precision) + RETURNS SETOF histogram + AS $$ SELECT min, max, count, percent FROM _st_histogram($1, 1, TRUE, $2, 0, NULL, FALSE) $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Cannot be strict as "width" can be NULL +CREATE OR REPLACE FUNCTION st_approxhistogram(rast raster, nband int, sample_percent double precision, bins int, width double precision[] DEFAULT NULL, right boolean DEFAULT FALSE) + RETURNS SETOF histogram + AS $$ SELECT min, max, count, percent FROM _st_histogram($1, $2, TRUE, $3, $4, $5, $6) $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_approxhistogram(rast raster, nband int, sample_percent double precision, bins int, right boolean) + RETURNS SETOF histogram + AS $$ SELECT min, max, count, percent FROM _st_histogram($1, $2, TRUE, $3, $4, NULL, $5) $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Cannot be strict as "width" can be NULL +CREATE OR REPLACE FUNCTION _st_histogram( + rastertable text, rastercolumn text, + nband int DEFAULT 1, + exclude_nodata_value boolean DEFAULT TRUE, + sample_percent double precision DEFAULT 1, + bins int DEFAULT 0, width double precision[] DEFAULT NULL, + right boolean DEFAULT FALSE +) + RETURNS SETOF histogram + AS 'MODULE_PATHNAME','RASTER_histogramCoverage' + LANGUAGE 'c' IMMUTABLE; + +CREATE OR REPLACE FUNCTION st_histogram(rastertable text, rastercolumn text, nband int DEFAULT 1, exclude_nodata_value boolean DEFAULT TRUE, bins int DEFAULT 0, width double precision[] DEFAULT NULL, right boolean DEFAULT FALSE) + RETURNS SETOF histogram + AS $$ SELECT _st_histogram($1, $2, $3, $4, 1, $5, $6, $7) $$ + LANGUAGE 'sql' STABLE; + +CREATE OR REPLACE FUNCTION st_histogram(rastertable text, rastercolumn text, nband int, exclude_nodata_value boolean, bins int, right boolean) + RETURNS SETOF histogram + AS $$ SELECT _st_histogram($1, $2, $3, $4, 1, $5, NULL, $6) $$ + LANGUAGE 'sql' STABLE STRICT; + +-- Cannot be strict as "width" can be NULL +CREATE OR REPLACE FUNCTION st_histogram(rastertable text, rastercolumn text, nband int, bins int, width double precision[] DEFAULT NULL, right boolean DEFAULT FALSE) + RETURNS SETOF histogram + AS $$ SELECT _st_histogram($1, $2, $3, TRUE, 1, $4, $5, $6) $$ + LANGUAGE 'sql' STABLE; + +CREATE OR REPLACE FUNCTION st_histogram(rastertable text, rastercolumn text, nband int, bins int, right boolean) + RETURNS SETOF histogram + AS $$ SELECT _st_histogram($1, $2, $3, TRUE, 1, $4, NULL, $5) $$ + LANGUAGE 'sql' STABLE STRICT; + +-- Cannot be strict as "width" can be NULL +CREATE OR REPLACE FUNCTION st_approxhistogram( + rastertable text, rastercolumn text, + nband int DEFAULT 1, + exclude_nodata_value boolean DEFAULT TRUE, + sample_percent double precision DEFAULT 0.1, + bins int DEFAULT 0, width double precision[] DEFAULT NULL, + right boolean DEFAULT FALSE +) + RETURNS SETOF histogram + AS $$ SELECT _st_histogram($1, $2, $3, $4, $5, $6, $7, $8) $$ + LANGUAGE 'sql' STABLE; + +CREATE OR REPLACE FUNCTION st_approxhistogram(rastertable text, rastercolumn text, nband int, exclude_nodata_value boolean, sample_percent double precision, bins int, right boolean) + RETURNS SETOF histogram + AS $$ SELECT _st_histogram($1, $2, $3, $4, $5, $6, NULL, $7) $$ + LANGUAGE 'sql' STABLE STRICT; + +CREATE OR REPLACE FUNCTION st_approxhistogram(rastertable text, rastercolumn text, nband int, sample_percent double precision) + RETURNS SETOF histogram + AS $$ SELECT _st_histogram($1, $2, $3, TRUE, $4, 0, NULL, FALSE) $$ + LANGUAGE 'sql' STABLE STRICT; + +CREATE OR REPLACE FUNCTION st_approxhistogram(rastertable text, rastercolumn text, sample_percent double precision) + RETURNS SETOF histogram + AS $$ SELECT _st_histogram($1, $2, 1, TRUE, $3, 0, NULL, FALSE) $$ + LANGUAGE 'sql' STABLE STRICT; + +-- Cannot be strict as "width" can be NULL +CREATE OR REPLACE FUNCTION st_approxhistogram(rastertable text, rastercolumn text, nband int, sample_percent double precision, bins int, width double precision[] DEFAULT NULL, right boolean DEFAULT FALSE) + RETURNS SETOF histogram + AS $$ SELECT _st_histogram($1, $2, $3, TRUE, $4, $5, $6, $7) $$ + LANGUAGE 'sql' STABLE STRICT; + +CREATE OR REPLACE FUNCTION st_approxhistogram(rastertable text, rastercolumn text, nband int, sample_percent double precision, bins int, right boolean) + RETURNS SETOF histogram + AS $$ SELECT _st_histogram($1, $2, $3, TRUE, $4, $5, NULL, $6) $$ + LANGUAGE 'sql' STABLE STRICT; + +----------------------------------------------------------------------- +-- ST_Quantile and ST_ApproxQuantile +----------------------------------------------------------------------- +CREATE TYPE quantile AS ( + quantile double precision, + value double precision +); + +-- Cannot be strict as "quantiles" can be NULL +CREATE OR REPLACE FUNCTION _st_quantile(rast raster, nband int DEFAULT 1, exclude_nodata_value boolean DEFAULT TRUE, sample_percent double precision DEFAULT 1, quantiles double precision[] DEFAULT NULL) + RETURNS SETOF quantile + AS 'MODULE_PATHNAME','RASTER_quantile' + LANGUAGE 'c' IMMUTABLE; + +-- Cannot be strict as "quantiles" can be NULL +CREATE OR REPLACE FUNCTION st_quantile(rast raster, nband int DEFAULT 1, exclude_nodata_value boolean DEFAULT TRUE, quantiles double precision[] DEFAULT NULL) + RETURNS SETOF quantile + AS $$ SELECT _st_quantile($1, $2, $3, 1, $4) $$ + LANGUAGE 'sql' IMMUTABLE; + +CREATE OR REPLACE FUNCTION st_quantile(rast raster, nband int, quantiles double precision[]) + RETURNS SETOF quantile + AS $$ SELECT _st_quantile($1, $2, TRUE, 1, $3) $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_quantile(rast raster, quantiles double precision[]) + RETURNS SETOF quantile + AS $$ SELECT _st_quantile($1, 1, TRUE, 1, $2) $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_quantile(rast raster, nband int, exclude_nodata_value boolean, quantile double precision) + RETURNS double precision + AS $$ SELECT (_st_quantile($1, $2, $3, 1, ARRAY[$4]::double precision[])).value $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_quantile(rast raster, nband int, quantile double precision) + RETURNS double precision + AS $$ SELECT (_st_quantile($1, $2, TRUE, 1, ARRAY[$3]::double precision[])).value $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Cannot be strict as "quantile" can be NULL +CREATE OR REPLACE FUNCTION st_quantile(rast raster, exclude_nodata_value boolean, quantile double precision DEFAULT NULL) + RETURNS double precision + AS $$ SELECT (_st_quantile($1, 1, $2, 1, ARRAY[$3]::double precision[])).value $$ + LANGUAGE 'sql' IMMUTABLE; + +CREATE OR REPLACE FUNCTION st_quantile(rast raster, quantile double precision) + RETURNS double precision + AS $$ SELECT (_st_quantile($1, 1, TRUE, 1, ARRAY[$2]::double precision[])).value $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Cannot be strict as "quantiles" can be NULL +CREATE OR REPLACE FUNCTION st_approxquantile(rast raster, nband int DEFAULT 1, exclude_nodata_value boolean DEFAULT TRUE, sample_percent double precision DEFAULT 0.1, quantiles double precision[] DEFAULT NULL) + RETURNS SETOF quantile + AS $$ SELECT _st_quantile($1, $2, $3, $4, $5) $$ + LANGUAGE 'sql' IMMUTABLE; + +-- Cannot be strict as "quantiles" can be NULL +CREATE OR REPLACE FUNCTION st_approxquantile(rast raster, nband int, sample_percent double precision, quantiles double precision[] DEFAULT NULL) + RETURNS SETOF quantile + AS $$ SELECT _st_quantile($1, $2, TRUE, $3, $4) $$ + LANGUAGE 'sql' IMMUTABLE; + +-- Cannot be strict as "quantiles" can be NULL +CREATE OR REPLACE FUNCTION st_approxquantile(rast raster, sample_percent double precision, quantiles double precision[] DEFAULT NULL) + RETURNS SETOF quantile + AS $$ SELECT _st_quantile($1, 1, TRUE, $2, $3) $$ + LANGUAGE 'sql' IMMUTABLE; + +CREATE OR REPLACE FUNCTION st_approxquantile(rast raster, quantiles double precision[]) + RETURNS SETOF quantile + AS $$ SELECT _st_quantile($1, 1, TRUE, 0.1, $2) $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_approxquantile(rast raster, nband int, exclude_nodata_value boolean, sample_percent double precision, quantile double precision) + RETURNS double precision + AS $$ SELECT (_st_quantile($1, $2, $3, $4, ARRAY[$5]::double precision[])).value $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_approxquantile(rast raster, nband int, sample_percent double precision, quantile double precision) + RETURNS double precision + AS $$ SELECT (_st_quantile($1, $2, TRUE, $3, ARRAY[$4]::double precision[])).value $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_approxquantile(rast raster, sample_percent double precision, quantile double precision) + RETURNS double precision + AS $$ SELECT (_st_quantile($1, 1, TRUE, $2, ARRAY[$3]::double precision[])).value $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- Cannot be strict as "quantile" can be NULL +CREATE OR REPLACE FUNCTION st_approxquantile(rast raster, exclude_nodata_value boolean, quantile double precision DEFAULT NULL) + RETURNS double precision + AS $$ SELECT (_st_quantile($1, 1, $2, 0.1, ARRAY[$3]::double precision[])).value $$ + LANGUAGE 'sql' IMMUTABLE; + +CREATE OR REPLACE FUNCTION st_approxquantile(rast raster, quantile double precision) + RETURNS double precision + AS $$ SELECT (_st_quantile($1, 1, TRUE, 0.1, ARRAY[$2]::double precision[])).value $$ + LANGUAGE 'sql' IMMUTABLE; + +-- Cannot be strict as "quantiles" can be NULL +CREATE OR REPLACE FUNCTION _st_quantile(rastertable text, rastercolumn text, nband int DEFAULT 1, exclude_nodata_value boolean DEFAULT TRUE, sample_percent double precision DEFAULT 1, quantiles double precision[] DEFAULT NULL) + RETURNS SETOF quantile + AS 'MODULE_PATHNAME','RASTER_quantileCoverage' + LANGUAGE 'c' STABLE; + +-- Cannot be strict as "quantiles" can be NULL +CREATE OR REPLACE FUNCTION st_quantile(rastertable text, rastercolumn text, nband int DEFAULT 1, exclude_nodata_value boolean DEFAULT TRUE, quantiles double precision[] DEFAULT NULL) + RETURNS SETOF quantile + AS $$ SELECT _st_quantile($1, $2, $3, $4, 1, $5) $$ + LANGUAGE 'sql' STABLE; + +CREATE OR REPLACE FUNCTION st_quantile(rastertable text, rastercolumn text, nband int, quantiles double precision[]) + RETURNS SETOF quantile + AS $$ SELECT _st_quantile($1, $2, $3, TRUE, 1, $4) $$ + LANGUAGE 'sql' STABLE STRICT; + +CREATE OR REPLACE FUNCTION st_quantile(rastertable text, rastercolumn text, quantiles double precision[]) + RETURNS SETOF quantile + AS $$ SELECT _st_quantile($1, $2, 1, TRUE, 1, $3) $$ + LANGUAGE 'sql' STABLE STRICT; + +CREATE OR REPLACE FUNCTION st_quantile(rastertable text, rastercolumn text, nband int, exclude_nodata_value boolean, quantile double precision) + RETURNS double precision + AS $$ SELECT (_st_quantile($1, $2, $3, $4, 1, ARRAY[$5]::double precision[])).value $$ + LANGUAGE 'sql' STABLE STRICT; + +CREATE OR REPLACE FUNCTION st_quantile(rastertable text, rastercolumn text, nband int, quantile double precision) + RETURNS double precision + AS $$ SELECT (_st_quantile($1, $2, $3, TRUE, 1, ARRAY[$4]::double precision[])).value $$ + LANGUAGE 'sql' STABLE STRICT; + +-- Cannot be strict as "quantile" can be NULL +CREATE OR REPLACE FUNCTION st_quantile(rastertable text, rastercolumn text, exclude_nodata_value boolean, quantile double precision DEFAULT NULL) + RETURNS double precision + AS $$ SELECT (_st_quantile($1, $2, 1, $3, 1, ARRAY[$4]::double precision[])).value $$ + LANGUAGE 'sql' STABLE; + +CREATE OR REPLACE FUNCTION st_quantile(rastertable text, rastercolumn text, quantile double precision) + RETURNS double precision + AS $$ SELECT (_st_quantile($1, $2, 1, TRUE, 1, ARRAY[$3]::double precision[])).value $$ + LANGUAGE 'sql' STABLE STRICT; + +-- Cannot be strict as "quantiles" can be NULL +CREATE OR REPLACE FUNCTION st_approxquantile(rastertable text, rastercolumn text, nband int DEFAULT 1, exclude_nodata_value boolean DEFAULT TRUE, sample_percent double precision DEFAULT 0.1, quantiles double precision[] DEFAULT NULL) + RETURNS SETOF quantile + AS $$ SELECT _st_quantile($1, $2, $3, $4, $5, $6) $$ + LANGUAGE 'sql' STABLE; + +-- Cannot be strict as "quantiles" can be NULL +CREATE OR REPLACE FUNCTION st_approxquantile(rastertable text, rastercolumn text, nband int, sample_percent double precision, quantiles double precision[] DEFAULT NULL) + RETURNS SETOF quantile + AS $$ SELECT _st_quantile($1, $2, $3, TRUE, $4, $5) $$ + LANGUAGE 'sql' STABLE; + +-- Cannot be strict as "quantiles" can be NULL +CREATE OR REPLACE FUNCTION st_approxquantile(rastertable text, rastercolumn text, sample_percent double precision, quantiles double precision[] DEFAULT NULL) + RETURNS SETOF quantile + AS $$ SELECT _st_quantile($1, $2, 1, TRUE, $3, $4) $$ + LANGUAGE 'sql' STABLE; + +CREATE OR REPLACE FUNCTION st_approxquantile(rastertable text, rastercolumn text, quantiles double precision[]) + RETURNS SETOF quantile + AS $$ SELECT _st_quantile($1, $2, 1, TRUE, 0.1, $3) $$ + LANGUAGE 'sql' STABLE STRICT; + +CREATE OR REPLACE FUNCTION st_approxquantile(rastertable text, rastercolumn text, nband int, exclude_nodata_value boolean, sample_percent double precision, quantile double precision) + RETURNS double precision + AS $$ SELECT (_st_quantile($1, $2, $3, $4, $5, ARRAY[$6]::double precision[])).value $$ + LANGUAGE 'sql' STABLE STRICT; + +CREATE OR REPLACE FUNCTION st_approxquantile(rastertable text, rastercolumn text, nband int, sample_percent double precision, quantile double precision) + RETURNS double precision + AS $$ SELECT (_st_quantile($1, $2, $3, TRUE, $4, ARRAY[$5]::double precision[])).value $$ + LANGUAGE 'sql' STABLE STRICT; + +CREATE OR REPLACE FUNCTION st_approxquantile(rastertable text, rastercolumn text, sample_percent double precision, quantile double precision) + RETURNS double precision + AS $$ SELECT (_st_quantile($1, $2, 1, TRUE, $3, ARRAY[$4]::double precision[])).value $$ + LANGUAGE 'sql' STABLE STRICT; + +-- Cannot be strict as "quantile" can be NULL +CREATE OR REPLACE FUNCTION st_approxquantile(rastertable text, rastercolumn text, exclude_nodata_value boolean, quantile double precision DEFAULT NULL) + RETURNS double precision + AS $$ SELECT (_st_quantile($1, $2, 1, $3, 0.1, ARRAY[$4]::double precision[])).value $$ + LANGUAGE 'sql' STABLE; + +CREATE OR REPLACE FUNCTION st_approxquantile(rastertable text, rastercolumn text, quantile double precision) + RETURNS double precision + AS $$ SELECT (_st_quantile($1, $2, 1, TRUE, 0.1, ARRAY[$3]::double precision[])).value $$ + LANGUAGE 'sql' STABLE; + +----------------------------------------------------------------------- +-- ST_ValueCount and ST_ValuePercent +----------------------------------------------------------------------- +CREATE TYPE valuecount AS ( + value double precision, + count integer, + percent double precision +); + +-- None of the "valuecount" functions with "searchvalues" can be strict as "searchvalues" and "roundto" can be NULL +-- Allowing "searchvalues" to be NULL instructs the function to count all values + +CREATE OR REPLACE FUNCTION _st_valuecount(rast raster, nband integer DEFAULT 1, exclude_nodata_value boolean DEFAULT TRUE, searchvalues double precision[] DEFAULT NULL, roundto double precision DEFAULT 0) + RETURNS SETOF valuecount + AS 'MODULE_PATHNAME', 'RASTER_valueCount' + LANGUAGE 'c' IMMUTABLE; + +CREATE OR REPLACE FUNCTION st_valuecount( + rast raster, nband integer DEFAULT 1, + exclude_nodata_value boolean DEFAULT TRUE, + searchvalues double precision[] DEFAULT NULL, + roundto double precision DEFAULT 0, + OUT value double precision, OUT count integer +) + RETURNS SETOF record + AS $$ SELECT value, count FROM _st_valuecount($1, $2, $3, $4, $5) $$ + LANGUAGE 'sql' IMMUTABLE; + +CREATE OR REPLACE FUNCTION st_valuecount(rast raster, nband integer, searchvalues double precision[], roundto double precision DEFAULT 0, OUT value double precision, OUT count integer) + RETURNS SETOF record + AS $$ SELECT value, count FROM _st_valuecount($1, $2, TRUE, $3, $4) $$ + LANGUAGE 'sql' IMMUTABLE; + +CREATE OR REPLACE FUNCTION st_valuecount(rast raster, searchvalues double precision[], roundto double precision DEFAULT 0, OUT value double precision, OUT count integer) + RETURNS SETOF record + AS $$ SELECT value, count FROM _st_valuecount($1, 1, TRUE, $2, $3) $$ + LANGUAGE 'sql' IMMUTABLE; + +CREATE OR REPLACE FUNCTION st_valuecount(rast raster, nband integer, exclude_nodata_value boolean, searchvalue double precision, roundto double precision DEFAULT 0) + RETURNS integer + AS $$ SELECT (_st_valuecount($1, $2, $3, ARRAY[$4]::double precision[], $5)).count $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_valuecount(rast raster, nband integer, searchvalue double precision, roundto double precision DEFAULT 0) + RETURNS integer + AS $$ SELECT (_st_valuecount($1, $2, TRUE, ARRAY[$3]::double precision[], $4)).count $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_valuecount(rast raster, searchvalue double precision, roundto double precision DEFAULT 0) + RETURNS integer + AS $$ SELECT (_st_valuecount($1, 1, TRUE, ARRAY[$2]::double precision[], $3)).count $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_valuepercent( + rast raster, nband integer DEFAULT 1, + exclude_nodata_value boolean DEFAULT TRUE, + searchvalues double precision[] DEFAULT NULL, + roundto double precision DEFAULT 0, + OUT value double precision, OUT percent double precision +) + RETURNS SETOF record + AS $$ SELECT value, percent FROM _st_valuecount($1, $2, $3, $4, $5) $$ + LANGUAGE 'sql' IMMUTABLE; + +CREATE OR REPLACE FUNCTION st_valuepercent(rast raster, nband integer, searchvalues double precision[], roundto double precision DEFAULT 0, OUT value double precision, OUT percent double precision) + RETURNS SETOF record + AS $$ SELECT value, percent FROM _st_valuecount($1, $2, TRUE, $3, $4) $$ + LANGUAGE 'sql' IMMUTABLE; + +CREATE OR REPLACE FUNCTION st_valuepercent(rast raster, searchvalues double precision[], roundto double precision DEFAULT 0, OUT value double precision, OUT percent double precision) + RETURNS SETOF record + AS $$ SELECT value, percent FROM _st_valuecount($1, 1, TRUE, $2, $3) $$ + LANGUAGE 'sql' IMMUTABLE; + +CREATE OR REPLACE FUNCTION st_valuepercent(rast raster, nband integer, exclude_nodata_value boolean, searchvalue double precision, roundto double precision DEFAULT 0) + RETURNS double precision + AS $$ SELECT (_st_valuecount($1, $2, $3, ARRAY[$4]::double precision[], $5)).percent $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_valuepercent(rast raster, nband integer, searchvalue double precision, roundto double precision DEFAULT 0) + RETURNS double precision + AS $$ SELECT (_st_valuecount($1, $2, TRUE, ARRAY[$3]::double precision[], $4)).percent $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_valuepercent(rast raster, searchvalue double precision, roundto double precision DEFAULT 0) + RETURNS double precision + AS $$ SELECT (_st_valuecount($1, 1, TRUE, ARRAY[$2]::double precision[], $3)).percent $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION _st_valuecount(rastertable text, rastercolumn text, nband integer DEFAULT 1, exclude_nodata_value boolean DEFAULT TRUE, searchvalues double precision[] DEFAULT NULL, roundto double precision DEFAULT 0) + RETURNS SETOF valuecount + AS 'MODULE_PATHNAME', 'RASTER_valueCountCoverage' + LANGUAGE 'c' STABLE; + +CREATE OR REPLACE FUNCTION st_valuecount( + rastertable text, rastercolumn text, + nband integer DEFAULT 1, + exclude_nodata_value boolean DEFAULT TRUE, + searchvalues double precision[] DEFAULT NULL, + roundto double precision DEFAULT 0, + OUT value double precision, OUT count integer +) + RETURNS SETOF record + AS $$ SELECT value, count FROM _st_valuecount($1, $2, $3, $4, $5, $6) $$ + LANGUAGE 'sql' STABLE; + +CREATE OR REPLACE FUNCTION st_valuecount(rastertable text, rastercolumn text, nband integer, searchvalues double precision[], roundto double precision DEFAULT 0, OUT value double precision, OUT count integer) + RETURNS SETOF record + AS $$ SELECT value, count FROM _st_valuecount($1, $2, $3, TRUE, $4, $5) $$ + LANGUAGE 'sql' STABLE; + +CREATE OR REPLACE FUNCTION st_valuecount(rastertable text, rastercolumn text, searchvalues double precision[], roundto double precision DEFAULT 0, OUT value double precision, OUT count integer) + RETURNS SETOF record + AS $$ SELECT value, count FROM _st_valuecount($1, $2, 1, TRUE, $3, $4) $$ + LANGUAGE 'sql' STABLE; + +CREATE OR REPLACE FUNCTION st_valuecount(rastertable text, rastercolumn text, nband integer, exclude_nodata_value boolean, searchvalue double precision, roundto double precision DEFAULT 0) + RETURNS integer + AS $$ SELECT (_st_valuecount($1, $2, $3, $4, ARRAY[$5]::double precision[], $6)).count $$ + LANGUAGE 'sql' STABLE STRICT; + +CREATE OR REPLACE FUNCTION st_valuecount(rastertable text, rastercolumn text, nband integer, searchvalue double precision, roundto double precision DEFAULT 0) + RETURNS integer + AS $$ SELECT (_st_valuecount($1, $2, $3, TRUE, ARRAY[$4]::double precision[], $5)).count $$ + LANGUAGE 'sql' STABLE STRICT; + +CREATE OR REPLACE FUNCTION st_valuecount(rastertable text, rastercolumn text, searchvalue double precision, roundto double precision DEFAULT 0) + RETURNS integer + AS $$ SELECT (_st_valuecount($1, $2, 1, TRUE, ARRAY[$3]::double precision[], $4)).count $$ + LANGUAGE 'sql' STABLE STRICT; + +CREATE OR REPLACE FUNCTION st_valuepercent( + rastertable text, rastercolumn text, + nband integer DEFAULT 1, + exclude_nodata_value boolean DEFAULT TRUE, + searchvalues double precision[] DEFAULT NULL, + roundto double precision DEFAULT 0, + OUT value double precision, OUT percent double precision +) + RETURNS SETOF record + AS $$ SELECT value, percent FROM _st_valuecount($1, $2, $3, $4, $5, $6) $$ + LANGUAGE 'sql' STABLE; + +CREATE OR REPLACE FUNCTION st_valuepercent(rastertable text, rastercolumn text, nband integer, searchvalues double precision[], roundto double precision DEFAULT 0, OUT value double precision, OUT percent double precision) + RETURNS SETOF record + AS $$ SELECT value, percent FROM _st_valuecount($1, $2, $3, TRUE, $4, $5) $$ + LANGUAGE 'sql' STABLE; + +CREATE OR REPLACE FUNCTION st_valuepercent(rastertable text, rastercolumn text, searchvalues double precision[], roundto double precision DEFAULT 0, OUT value double precision, OUT percent double precision) + RETURNS SETOF record + AS $$ SELECT value, percent FROM _st_valuecount($1, $2, 1, TRUE, $3, $4) $$ + LANGUAGE 'sql' STABLE; + +CREATE OR REPLACE FUNCTION st_valuepercent(rastertable text, rastercolumn text, nband integer, exclude_nodata_value boolean, searchvalue double precision, roundto double precision DEFAULT 0) + RETURNS double precision + AS $$ SELECT (_st_valuecount($1, $2, $3, $4, ARRAY[$5]::double precision[], $6)).percent $$ + LANGUAGE 'sql' STABLE STRICT; + +CREATE OR REPLACE FUNCTION st_valuepercent(rastertable text, rastercolumn text, nband integer, searchvalue double precision, roundto double precision DEFAULT 0) + RETURNS double precision + AS $$ SELECT (_st_valuecount($1, $2, $3, TRUE, ARRAY[$4]::double precision[], $5)).percent $$ + LANGUAGE 'sql' STABLE STRICT; + +CREATE OR REPLACE FUNCTION st_valuepercent(rastertable text, rastercolumn text, searchvalue double precision, roundto double precision DEFAULT 0) + RETURNS double precision + AS $$ SELECT (_st_valuecount($1, $2, 1, TRUE, ARRAY[$3]::double precision[], $4)).percent $$ + LANGUAGE 'sql' STABLE STRICT; + +----------------------------------------------------------------------- +-- ST_Reclass +----------------------------------------------------------------------- +CREATE TYPE reclassarg AS ( + nband int, + reclassexpr text, + pixeltype text, + nodataval double precision +); + +CREATE OR REPLACE FUNCTION _st_reclass(rast raster, VARIADIC reclassargset reclassarg[]) + RETURNS raster + AS 'MODULE_PATHNAME', 'RASTER_reclass' + LANGUAGE 'c' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_reclass(rast raster, VARIADIC reclassargset reclassarg[]) + RETURNS raster + AS $$ + DECLARE + i int; + expr text; + BEGIN + -- for each reclassarg, validate elements as all except nodataval cannot be NULL + FOR i IN SELECT * FROM generate_subscripts($2, 1) LOOP + IF $2[i].nband IS NULL OR $2[i].reclassexpr IS NULL OR $2[i].pixeltype IS NULL THEN + RAISE WARNING 'Values are required for the nband, reclassexpr and pixeltype attributes.'; + RETURN rast; + END IF; + END LOOP; + + RETURN _st_reclass($1, VARIADIC $2); + END; + $$ LANGUAGE 'plpgsql' IMMUTABLE STRICT; + +-- Cannot be strict as "nodataval" can be NULL +CREATE OR REPLACE FUNCTION st_reclass(rast raster, nband int, reclassexpr text, pixeltype text, nodataval double precision DEFAULT NULL) + RETURNS raster + AS $$ SELECT st_reclass($1, ROW($2, $3, $4, $5)) $$ + LANGUAGE 'sql' IMMUTABLE; + +CREATE OR REPLACE FUNCTION st_reclass(rast raster, reclassexpr text, pixeltype text) + RETURNS raster + AS $$ SELECT st_reclass($1, ROW(1, $2, $3, NULL)) $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +----------------------------------------------------------------------- +-- ST_AsGDALRaster and supporting functions +----------------------------------------------------------------------- +-- returns set of available and usable GDAL drivers +CREATE OR REPLACE FUNCTION st_gdaldrivers(OUT idx int, OUT short_name text, OUT long_name text, OUT create_options text) + RETURNS SETOF record + AS 'MODULE_PATHNAME', 'RASTER_getGDALDrivers' + LANGUAGE 'c' IMMUTABLE STRICT; + +-- Cannot be strict as "options" and "srid" can be NULL +CREATE OR REPLACE FUNCTION st_asgdalraster(rast raster, format text, options text[] DEFAULT NULL, srid integer DEFAULT NULL) + RETURNS bytea + AS 'MODULE_PATHNAME', 'RASTER_asGDALRaster' + LANGUAGE 'c' IMMUTABLE; + +----------------------------------------------------------------------- +-- ST_AsTIFF +----------------------------------------------------------------------- +-- Cannot be strict as "options" and "srid" can be NULL +CREATE OR REPLACE FUNCTION st_astiff(rast raster, options text[] DEFAULT NULL, srid integer DEFAULT NULL) + RETURNS bytea + AS $$ + DECLARE + i int; + num_bands int; + nodata double precision; + last_nodata double precision; + BEGIN + num_bands := st_numbands($1); + + -- TIFF only allows one NODATA value for ALL bands + FOR i IN 1..num_bands LOOP + nodata := st_bandnodatavalue($1, i); + IF last_nodata IS NULL THEN + last_nodata := nodata; + ELSEIF nodata != last_nodata THEN + RAISE NOTICE 'The TIFF format only permits one NODATA value for all bands. The value used will be the last band with a NODATA value.'; + END IF; + END LOOP; + + RETURN st_asgdalraster($1, 'GTiff', $2, $3); + END; + $$ LANGUAGE 'plpgsql' IMMUTABLE; + +-- Cannot be strict as "options" and "srid" can be NULL +CREATE OR REPLACE FUNCTION st_astiff(rast raster, nbands int[], options text[] DEFAULT NULL, srid integer DEFAULT NULL) + RETURNS bytea + AS $$ SELECT st_astiff(st_band($1, $2), $3, $4) $$ + LANGUAGE 'sql' IMMUTABLE; + +-- Cannot be strict as "srid" can be NULL +CREATE OR REPLACE FUNCTION st_astiff(rast raster, compression text, srid integer DEFAULT NULL) + RETURNS bytea + AS $$ + DECLARE + compression2 text; + c_type text; + c_level int; + i int; + num_bands int; + options text[]; + BEGIN + compression2 := trim(both from upper(compression)); + + IF length(compression2) > 0 THEN + -- JPEG + IF position('JPEG' in compression2) != 0 THEN + c_type := 'JPEG'; + c_level := substring(compression2 from '[0-9]+$'); + + IF c_level IS NOT NULL THEN + IF c_level > 100 THEN + c_level := 100; + ELSEIF c_level < 1 THEN + c_level := 1; + END IF; + + options := array_append(options, 'JPEG_QUALITY=' || c_level); + END IF; + + -- per band pixel type check + num_bands := st_numbands($1); + FOR i IN 1..num_bands LOOP + IF st_bandpixeltype($1, i) != '8BUI' THEN + RAISE EXCEPTION 'The pixel type of band % in the raster is not 8BUI. JPEG compression can only be used with the 8BUI pixel type.', i; + END IF; + END LOOP; + + -- DEFLATE + ELSEIF position('DEFLATE' in compression2) != 0 THEN + c_type := 'DEFLATE'; + c_level := substring(compression2 from '[0-9]+$'); + + IF c_level IS NOT NULL THEN + IF c_level > 9 THEN + c_level := 9; + ELSEIF c_level < 1 THEN + c_level := 1; + END IF; + + options := array_append(options, 'ZLEVEL=' || c_level); + END IF; + + ELSE + c_type := compression2; + + -- CCITT + IF position('CCITT' in compression2) THEN + -- per band pixel type check + num_bands := st_numbands($1); + FOR i IN 1..num_bands LOOP + IF st_bandpixeltype($1, i) != '1BB' THEN + RAISE EXCEPTION 'The pixel type of band % in the raster is not 1BB. CCITT compression can only be used with the 1BB pixel type.', i; + END IF; + END LOOP; + END IF; + + END IF; + + -- compression type check + IF ARRAY[c_type] <@ ARRAY['JPEG', 'LZW', 'PACKBITS', 'DEFLATE', 'CCITTRLE', 'CCITTFAX3', 'CCITTFAX4', 'NONE'] THEN + options := array_append(options, 'COMPRESS=' || c_type); + ELSE + RAISE NOTICE 'Unknown compression type: %. The outputted TIFF will not be COMPRESSED.', c_type; + END IF; + END IF; + + RETURN st_astiff($1, options, $3); + END; + $$ LANGUAGE 'plpgsql' IMMUTABLE; + +-- Cannot be strict as "srid" can be NULL +CREATE OR REPLACE FUNCTION st_astiff(rast raster, nbands int[], compression text, srid integer DEFAULT NULL) + RETURNS bytea + AS $$ SELECT st_astiff(st_band($1, $2), $3, $4) $$ + LANGUAGE 'sql' IMMUTABLE; + +----------------------------------------------------------------------- +-- ST_AsJPEG +----------------------------------------------------------------------- +-- Cannot be strict as "options" can be NULL +CREATE OR REPLACE FUNCTION st_asjpeg(rast raster, options text[] DEFAULT NULL) + RETURNS bytea + AS $$ + DECLARE + rast2 raster; + num_bands int; + i int; + BEGIN + num_bands := st_numbands($1); + + -- JPEG allows 1 or 3 bands + IF num_bands <> 1 AND num_bands <> 3 THEN + RAISE NOTICE 'The JPEG format only permits one or three bands. The first band will be used.'; + rast2 := st_band(rast, ARRAY[1]); + num_bands := st_numbands(rast); + ELSE + rast2 := rast; + END IF; + + -- JPEG only supports 8BUI pixeltype + FOR i IN 1..num_bands LOOP + IF st_bandpixeltype(rast, i) != '8BUI' THEN + RAISE EXCEPTION 'The pixel type of band % in the raster is not 8BUI. The JPEG format can only be used with the 8BUI pixel type.', i; + END IF; + END LOOP; + + RETURN st_asgdalraster(rast2, 'JPEG', $2, NULL); + END; + $$ LANGUAGE 'plpgsql' IMMUTABLE; + +-- Cannot be strict as "options" can be NULL +CREATE OR REPLACE FUNCTION st_asjpeg(rast raster, nbands int[], options text[] DEFAULT NULL) + RETURNS bytea + AS $$ SELECT st_asjpeg(st_band($1, $2), $3) $$ + LANGUAGE 'sql' IMMUTABLE; + +CREATE OR REPLACE FUNCTION st_asjpeg(rast raster, nbands int[], quality int) + RETURNS bytea + AS $$ + DECLARE + quality2 int; + options text[]; + BEGIN + IF quality IS NOT NULL THEN + IF quality > 100 THEN + quality2 := 100; + ELSEIF quality < 10 THEN + quality2 := 10; + ELSE + quality2 := quality; + END IF; + + options := array_append(options, 'QUALITY=' || quality2); + END IF; + + RETURN st_asjpeg(st_band($1, $2), options); + END; + $$ LANGUAGE 'plpgsql' IMMUTABLE STRICT; + +-- Cannot be strict as "options" can be NULL +CREATE OR REPLACE FUNCTION st_asjpeg(rast raster, nband int, options text[] DEFAULT NULL) + RETURNS bytea + AS $$ SELECT st_asjpeg(st_band($1, $2), $3) $$ + LANGUAGE 'sql' IMMUTABLE; + +CREATE OR REPLACE FUNCTION st_asjpeg(rast raster, nband int, quality int) + RETURNS bytea + AS $$ SELECT st_asjpeg($1, ARRAY[$2], $3) $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +----------------------------------------------------------------------- +-- ST_AsPNG +----------------------------------------------------------------------- +-- Cannot be strict as "options" can be NULL +CREATE OR REPLACE FUNCTION st_aspng(rast raster, options text[] DEFAULT NULL) + RETURNS bytea + AS $$ + DECLARE + rast2 raster; + num_bands int; + i int; + pt text; + BEGIN + num_bands := st_numbands($1); + + -- PNG allows 1, 3 or 4 bands + IF num_bands <> 1 AND num_bands <> 3 AND num_bands <> 4 THEN + RAISE NOTICE 'The PNG format only permits one, three or four bands. The first band will be used.'; + rast2 := st_band($1, ARRAY[1]); + num_bands := st_numbands(rast2); + ELSE + rast2 := rast; + END IF; + + -- PNG only supports 8BUI and 16BUI pixeltype + FOR i IN 1..num_bands LOOP + pt = st_bandpixeltype(rast, i); + IF pt != '8BUI' AND pt != '16BUI' THEN + RAISE EXCEPTION 'The pixel type of band % in the raster is not 8BUI or 16BUI. The PNG format can only be used with 8BUI and 16BUI pixel types.', i; + END IF; + END LOOP; + + RETURN st_asgdalraster(rast2, 'PNG', $2, NULL); + END; + $$ LANGUAGE 'plpgsql' IMMUTABLE; + +-- Cannot be strict as "options" can be NULL +CREATE OR REPLACE FUNCTION st_aspng(rast raster, nbands int[], options text[] DEFAULT NULL) + RETURNS bytea + AS $$ SELECT st_aspng(st_band($1, $2), $3) $$ + LANGUAGE 'sql' IMMUTABLE; + +CREATE OR REPLACE FUNCTION st_aspng(rast raster, nbands int[], compression int) + RETURNS bytea + AS $$ + DECLARE + compression2 int; + options text[]; + BEGIN + IF compression IS NOT NULL THEN + IF compression > 9 THEN + compression2 := 9; + ELSEIF compression < 1 THEN + compression2 := 1; + ELSE + compression2 := compression; + END IF; + + options := array_append(options, 'ZLEVEL=' || compression2); + END IF; + + RETURN st_aspng(st_band($1, $2), options); + END; + $$ LANGUAGE 'plpgsql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_aspng(rast raster, nband int, options text[] DEFAULT NULL) + RETURNS bytea + AS $$ SELECT st_aspng(st_band($1, $2), $3) $$ + LANGUAGE 'sql' IMMUTABLE; + +CREATE OR REPLACE FUNCTION st_aspng(rast raster, nband int, compression int) + RETURNS bytea + AS $$ SELECT st_aspng($1, ARRAY[$2], $3) $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +----------------------------------------------------------------------- +-- ST_AsRaster +----------------------------------------------------------------------- +-- None of the ST_AsRaster can be strict as some parameters can be NULL +CREATE OR REPLACE FUNCTION _st_asraster( + geom geometry, + scalex double precision DEFAULT 0, scaley double precision DEFAULT 0, + width integer DEFAULT 0, height integer DEFAULT 0, + pixeltype text[] DEFAULT ARRAY['8BUI']::text[], + value double precision[] DEFAULT ARRAY[1]::double precision[], + nodataval double precision[] DEFAULT ARRAY[0]::double precision[], + upperleftx double precision DEFAULT NULL, upperlefty double precision DEFAULT NULL, + gridx double precision DEFAULT NULL, gridy double precision DEFAULT NULL, + skewx double precision DEFAULT 0, skewy double precision DEFAULT 0, + touched boolean DEFAULT FALSE +) + RETURNS raster + AS 'MODULE_PATHNAME', 'RASTER_asRaster' + LANGUAGE 'c' STABLE; + +CREATE OR REPLACE FUNCTION st_asraster( + geom geometry, + scalex double precision, scaley double precision, + gridx double precision DEFAULT NULL, gridy double precision DEFAULT NULL, + pixeltype text[] DEFAULT ARRAY['8BUI']::text[], + value double precision[] DEFAULT ARRAY[1]::double precision[], + nodataval double precision[] DEFAULT ARRAY[0]::double precision[], + skewx double precision DEFAULT 0, skewy double precision DEFAULT 0, + touched boolean DEFAULT FALSE +) + RETURNS raster + AS $$ SELECT _st_asraster($1, $2, $3, NULL, NULL, $6, $7, $8, NULL, NULL, $4, $5, $9, $10, $11) $$ + LANGUAGE 'sql' STABLE; + +CREATE OR REPLACE FUNCTION st_asraster( + geom geometry, + scalex double precision, scaley double precision, + pixeltype text[], + value double precision[] DEFAULT ARRAY[1]::double precision[], + nodataval double precision[] DEFAULT ARRAY[0]::double precision[], + upperleftx double precision DEFAULT NULL, upperlefty double precision DEFAULT NULL, + skewx double precision DEFAULT 0, skewy double precision DEFAULT 0, + touched boolean DEFAULT FALSE +) + RETURNS raster + AS $$ SELECT _st_asraster($1, $2, $3, NULL, NULL, $4, $5, $6, $7, $8, NULL, NULL, $9, $10, $11) $$ + LANGUAGE 'sql' STABLE; + +CREATE OR REPLACE FUNCTION st_asraster( + geom geometry, + width integer, height integer, + gridx double precision DEFAULT NULL, gridy double precision DEFAULT NULL, + pixeltype text[] DEFAULT ARRAY['8BUI']::text[], + value double precision[] DEFAULT ARRAY[1]::double precision[], + nodataval double precision[] DEFAULT ARRAY[0]::double precision[], + skewx double precision DEFAULT 0, skewy double precision DEFAULT 0, + touched boolean DEFAULT FALSE +) + RETURNS raster + AS $$ SELECT _st_asraster($1, NULL, NULL, $2, $3, $6, $7, $8, NULL, NULL, $4, $5, $9, $10, $11) $$ + LANGUAGE 'sql' STABLE; + +CREATE OR REPLACE FUNCTION st_asraster( + geom geometry, + width integer, height integer, + pixeltype text[], + value double precision[] DEFAULT ARRAY[1]::double precision[], + nodataval double precision[] DEFAULT ARRAY[0]::double precision[], + upperleftx double precision DEFAULT NULL, upperlefty double precision DEFAULT NULL, + skewx double precision DEFAULT 0, skewy double precision DEFAULT 0, + touched boolean DEFAULT FALSE +) + RETURNS raster + AS $$ SELECT _st_asraster($1, NULL, NULL, $2, $3, $4, $5, $6, $7, $8, NULL, NULL, $9, $10, $11) $$ + LANGUAGE 'sql' STABLE; + +CREATE OR REPLACE FUNCTION st_asraster( + geom geometry, + scalex double precision, scaley double precision, + gridx double precision, gridy double precision, + pixeltype text, + value double precision DEFAULT 1, + nodataval double precision DEFAULT 0, + skewx double precision DEFAULT 0, skewy double precision DEFAULT 0, + touched boolean DEFAULT FALSE +) + RETURNS raster + AS $$ SELECT _st_asraster($1, $2, $3, NULL, NULL, ARRAY[$6]::text[], ARRAY[$7]::double precision[], ARRAY[$8]::double precision[], NULL, NULL, $4, $5, $9, $10, $11) $$ + LANGUAGE 'sql' STABLE; + +CREATE OR REPLACE FUNCTION st_asraster( + geom geometry, + scalex double precision, scaley double precision, + pixeltype text, + value double precision DEFAULT 1, + nodataval double precision DEFAULT 0, + upperleftx double precision DEFAULT NULL, upperlefty double precision DEFAULT NULL, + skewx double precision DEFAULT 0, skewy double precision DEFAULT 0, + touched boolean DEFAULT FALSE +) + RETURNS raster + AS $$ SELECT _st_asraster($1, $2, $3, NULL, NULL, ARRAY[$4]::text[], ARRAY[$5]::double precision[], ARRAY[$6]::double precision[], $7, $8, NULL, NULL, $9, $10, $11) $$ + LANGUAGE 'sql' STABLE; + +CREATE OR REPLACE FUNCTION st_asraster( + geom geometry, + width integer, height integer, + gridx double precision, gridy double precision, + pixeltype text, + value double precision DEFAULT 1, + nodataval double precision DEFAULT 0, + skewx double precision DEFAULT 0, skewy double precision DEFAULT 0, + touched boolean DEFAULT FALSE +) + RETURNS raster + AS $$ SELECT _st_asraster($1, NULL, NULL, $2, $3, ARRAY[$6]::text[], ARRAY[$7]::double precision[], ARRAY[$8]::double precision[], NULL, NULL, $4, $5, $9, $10, $11) $$ + LANGUAGE 'sql' STABLE; + +CREATE OR REPLACE FUNCTION st_asraster( + geom geometry, + width integer, height integer, + pixeltype text, + value double precision DEFAULT 1, + nodataval double precision DEFAULT 0, + upperleftx double precision DEFAULT NULL, upperlefty double precision DEFAULT NULL, + skewx double precision DEFAULT 0, skewy double precision DEFAULT 0, + touched boolean DEFAULT FALSE +) + RETURNS raster + AS $$ SELECT _st_asraster($1, NULL, NULL, $2, $3, ARRAY[$4]::text[], ARRAY[$5]::double precision[], ARRAY[$6]::double precision[], $7, $8, NULL, NULL,$9, $10, $11) $$ + LANGUAGE 'sql' STABLE; + +CREATE OR REPLACE FUNCTION st_asraster( + geom geometry, + ref raster, + pixeltype text[] DEFAULT ARRAY['8BUI']::text[], + value double precision[] DEFAULT ARRAY[1]::double precision[], + nodataval double precision[] DEFAULT ARRAY[0]::double precision[], + touched boolean DEFAULT FALSE +) + RETURNS raster + AS $$ + DECLARE + g geometry; + g_srid integer; + + ul_x double precision; + ul_y double precision; + scale_x double precision; + scale_y double precision; + skew_x double precision; + skew_y double precision; + sr_id integer; + BEGIN + SELECT upperleftx, upperlefty, scalex, scaley, skewx, skewy, srid INTO ul_x, ul_y, scale_x, scale_y, skew_x, skew_y, sr_id FROM ST_Metadata(ref); + --RAISE NOTICE '%, %, %, %, %, %, %', ul_x, ul_y, scale_x, scale_y, skew_x, skew_y, sr_id; + + -- geometry and raster has different SRID + g_srid := ST_SRID(geom); + IF g_srid != sr_id THEN + RAISE NOTICE 'The geometry''s SRID (%) is not the same as the raster''s SRID (%). The geometry will be transformed to the raster''s projection', g_srid, sr_id; + g := ST_Transform(geom, sr_id); + ELSE + g := geom; + END IF; + + RETURN _st_asraster(g, scale_x, scale_y, NULL, NULL, $3, $4, $5, NULL, NULL, ul_x, ul_y, skew_x, skew_y, $6); + END; + $$ LANGUAGE 'plpgsql' STABLE; + +CREATE OR REPLACE FUNCTION st_asraster( + geom geometry, + ref raster, + pixeltype text, + value double precision DEFAULT 1, + nodataval double precision DEFAULT 0, + touched boolean DEFAULT FALSE +) + RETURNS raster + AS $$ SELECT st_asraster($1, $2, ARRAY[$3]::text[], ARRAY[$4]::double precision[], ARRAY[$5]::double precision[], $6) $$ + LANGUAGE 'sql' STABLE; + +----------------------------------------------------------------------- +-- ST_Resample +----------------------------------------------------------------------- +-- cannot be strict as almost all parameters can be NULL +CREATE OR REPLACE FUNCTION _st_resample( + rast raster, + algorithm text DEFAULT 'NearestNeighbour', maxerr double precision DEFAULT 0.125, + srid integer DEFAULT NULL, + scalex double precision DEFAULT 0, scaley double precision DEFAULT 0, + gridx double precision DEFAULT NULL, gridy double precision DEFAULT NULL, + skewx double precision DEFAULT 0, skewy double precision DEFAULT 0, + width integer DEFAULT NULL, height integer DEFAULT NULL +) + RETURNS raster + AS 'MODULE_PATHNAME', 'RASTER_resample' + LANGUAGE 'c' STABLE; + +CREATE OR REPLACE FUNCTION st_resample( + rast raster, + srid integer DEFAULT NULL, + scalex double precision DEFAULT 0, scaley double precision DEFAULT 0, + gridx double precision DEFAULT NULL, gridy double precision DEFAULT NULL, + skewx double precision DEFAULT 0, skewy double precision DEFAULT 0, + algorithm text DEFAULT 'NearestNeighbour', maxerr double precision DEFAULT 0.125 +) + RETURNS raster + AS $$ SELECT _st_resample($1, $9, $10, $2, $3, $4, $5, $6, $7, $8) $$ + LANGUAGE 'sql' STABLE; + +CREATE OR REPLACE FUNCTION st_resample( + rast raster, + width integer, height integer, + srid integer DEFAULT NULL, + gridx double precision DEFAULT NULL, gridy double precision DEFAULT NULL, + skewx double precision DEFAULT 0, skewy double precision DEFAULT 0, + algorithm text DEFAULT 'NearestNeighbour', maxerr double precision DEFAULT 0.125 +) + RETURNS raster + AS $$ SELECT _st_resample($1, $9, $10, $4, NULL, NULL, $5, $6, $7, $8, $2, $3) $$ + LANGUAGE 'sql' STABLE; + +CREATE OR REPLACE FUNCTION st_resample( + rast raster, + ref raster, + algorithm text DEFAULT 'NearestNeighbour', + maxerr double precision DEFAULT 0.125, + usescale boolean DEFAULT TRUE +) + RETURNS raster + AS $$ + DECLARE + sr_id int; + dim_x int; + dim_y int; + scale_x double precision; + scale_y double precision; + grid_x double precision; + grid_y double precision; + skew_x double precision; + skew_y double precision; + BEGIN + SELECT srid, width, height, scalex, scaley, upperleftx, upperlefty, skewx, skewy INTO sr_id, dim_x, dim_y, scale_x, scale_y, grid_x, grid_y, skew_x, skew_y FROM st_metadata($2); + + IF usescale IS TRUE THEN + dim_x := NULL; + dim_y := NULL; + ELSE + scale_x := NULL; + scale_y := NULL; + END IF; + + RETURN _st_resample($1, $3, $4, sr_id, scale_x, scale_y, grid_x, grid_y, skew_x, skew_y, dim_x, dim_y); + END; + $$ LANGUAGE 'plpgsql' STABLE STRICT; + +CREATE OR REPLACE FUNCTION st_resample( + rast raster, + ref raster, + usescale boolean, + algorithm text DEFAULT 'NearestNeighbour', + maxerr double precision DEFAULT 0.125 +) + RETURNS raster + AS $$ SELECT st_resample($1, $2, $4, $5, $3) $$ + LANGUAGE 'sql' STABLE STRICT; + +----------------------------------------------------------------------- +-- ST_Transform +----------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION st_transform(rast raster, srid integer, algorithm text DEFAULT 'NearestNeighbour', maxerr double precision DEFAULT 0.125, scalex double precision DEFAULT 0, scaley double precision DEFAULT 0) + RETURNS raster + AS $$ SELECT _st_resample($1, $3, $4, $2, $5, $6) $$ + LANGUAGE 'sql' STABLE STRICT; + +CREATE OR REPLACE FUNCTION st_transform(rast raster, srid integer, scalex double precision, scaley double precision, algorithm text DEFAULT 'NearestNeighbour', maxerr double precision DEFAULT 0.125) + RETURNS raster + AS $$ SELECT _st_resample($1, $5, $6, $2, $3, $4) $$ + LANGUAGE 'sql' STABLE STRICT; + +CREATE OR REPLACE FUNCTION st_transform(rast raster, srid integer, scalexy double precision, algorithm text DEFAULT 'NearestNeighbour', maxerr double precision DEFAULT 0.125) + RETURNS raster + AS $$ SELECT _st_resample($1, $4, $5, $2, $3, $3) $$ + LANGUAGE 'sql' STABLE STRICT; + +----------------------------------------------------------------------- +-- ST_Rescale +----------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION st_rescale(rast raster, scalex double precision, scaley double precision, algorithm text DEFAULT 'NearestNeighbour', maxerr double precision DEFAULT 0.125) + RETURNS raster + AS $$ SELECT _st_resample($1, $4, $5, NULL, $2, $3) $$ + LANGUAGE 'sql' STABLE STRICT; + +CREATE OR REPLACE FUNCTION st_rescale(rast raster, scalexy double precision, algorithm text DEFAULT 'NearestNeighbour', maxerr double precision DEFAULT 0.125) + RETURNS raster + AS $$ SELECT _st_resample($1, $3, $4, NULL, $2, $2) $$ + LANGUAGE 'sql' STABLE STRICT; + +----------------------------------------------------------------------- +-- ST_Reskew +----------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION st_reskew(rast raster, skewx double precision, skewy double precision, algorithm text DEFAULT 'NearestNeighbour', maxerr double precision DEFAULT 0.125) + RETURNS raster + AS $$ SELECT _st_resample($1, $4, $5, NULL, 0, 0, NULL, NULL, $2, $3) $$ + LANGUAGE 'sql' STABLE STRICT; + +CREATE OR REPLACE FUNCTION st_reskew(rast raster, skewxy double precision, algorithm text DEFAULT 'NearestNeighbour', maxerr double precision DEFAULT 0.125) + RETURNS raster + AS $$ SELECT _st_resample($1, $3, $4, NULL, 0, 0, NULL, NULL, $2, $2) $$ + LANGUAGE 'sql' STABLE STRICT; + +----------------------------------------------------------------------- +-- ST_SnapToGrid +----------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION st_snaptogrid( + rast raster, + gridx double precision, gridy double precision, + algorithm text DEFAULT 'NearestNeighbour', maxerr double precision DEFAULT 0.125, + scalex double precision DEFAULT 0, scaley double precision DEFAULT 0 +) + RETURNS raster + AS $$ SELECT _st_resample($1, $4, $5, NULL, $6, $7, $2, $3) $$ + LANGUAGE 'sql' STABLE STRICT; + +CREATE OR REPLACE FUNCTION st_snaptogrid( + rast raster, + gridx double precision, gridy double precision, + scalex double precision, scaley double precision, + algorithm text DEFAULT 'NearestNeighbour', maxerr double precision DEFAULT 0.125 +) + RETURNS raster + AS $$ SELECT _st_resample($1, $6, $7, NULL, $4, $5, $2, $3) $$ + LANGUAGE 'sql' STABLE STRICT; + +CREATE OR REPLACE FUNCTION st_snaptogrid( + rast raster, + gridx double precision, gridy double precision, + scalexy double precision, + algorithm text DEFAULT 'NearestNeighbour', maxerr double precision DEFAULT 0.125 +) + RETURNS raster + AS $$ SELECT _st_resample($1, $5, $6, NULL, $4, $4, $2, $3) $$ + LANGUAGE 'sql' STABLE STRICT; + +----------------------------------------------------------------------- +-- One Raster ST_MapAlgebra +----------------------------------------------------------------------- +-- This function can not be STRICT, because nodataval can be NULL +-- or pixeltype can not be determined (could be st_bandpixeltype(raster, band) though) +CREATE OR REPLACE FUNCTION st_mapalgebraexpr(rast raster, band integer, pixeltype text, + expression text, nodataval double precision DEFAULT NULL) + RETURNS raster + AS 'MODULE_PATHNAME', 'RASTER_mapAlgebraExpr' + LANGUAGE 'c' IMMUTABLE; + +-- This function can not be STRICT, because nodataval can be NULL +-- or pixeltype can not be determined (could be st_bandpixeltype(raster, band) though) +CREATE OR REPLACE FUNCTION st_mapalgebraexpr(rast raster, pixeltype text, expression text, + nodataval double precision DEFAULT NULL) + RETURNS raster + AS $$ SELECT st_mapalgebraexpr($1, 1, $2, $3, $4) $$ + LANGUAGE 'sql'; + +-- All arguments supplied, use the C implementation. +CREATE OR REPLACE FUNCTION st_mapalgebrafct(rast raster, band integer, + pixeltype text, onerastuserfunc regprocedure, variadic args text[]) + RETURNS raster + AS 'MODULE_PATHNAME', 'RASTER_mapAlgebraFct' + LANGUAGE 'c' IMMUTABLE; + +-- Variant 1: missing user args +CREATE OR REPLACE FUNCTION st_mapalgebrafct(rast raster, band integer, + pixeltype text, onerastuserfunc regprocedure) + RETURNS raster + AS $$ SELECT st_mapalgebrafct($1, $2, $3, $4, NULL) $$ + LANGUAGE 'sql'; + +-- Variant 2: missing pixeltype; default to pixeltype of rast +CREATE OR REPLACE FUNCTION st_mapalgebrafct(rast raster, band integer, + onerastuserfunc regprocedure, variadic args text[]) + RETURNS raster + AS $$ SELECT st_mapalgebrafct($1, $2, NULL, $3, VARIADIC $4) $$ + LANGUAGE 'sql'; + +-- Variant 3: missing pixeltype and user args; default to pixeltype of rast +CREATE OR REPLACE FUNCTION st_mapalgebrafct(rast raster, band integer, + onerastuserfunc regprocedure) + RETURNS raster + AS $$ SELECT st_mapalgebrafct($1, $2, NULL, $3, NULL) $$ + LANGUAGE 'sql'; + +-- Variant 4: missing band; default to band 1 +CREATE OR REPLACE FUNCTION st_mapalgebrafct(rast raster, pixeltype text, + onerastuserfunc regprocedure, variadic args text[]) + RETURNS raster + AS $$ SELECT st_mapalgebrafct($1, 1, $2, $3, VARIADIC $4) $$ + LANGUAGE 'sql'; + +-- Variant 5: missing band and user args; default to band 1 +CREATE OR REPLACE FUNCTION st_mapalgebrafct(rast raster, pixeltype text, + onerastuserfunc regprocedure) + RETURNS raster + AS $$ SELECT st_mapalgebrafct($1, 1, $2, $3, NULL) $$ + LANGUAGE 'sql'; + +-- Variant 6: missing band, and pixeltype; default to band 1, pixeltype of rast. +CREATE OR REPLACE FUNCTION st_mapalgebrafct(rast raster, onerastuserfunc regprocedure, + variadic args text[]) + RETURNS raster + AS $$ SELECT st_mapalgebrafct($1, 1, NULL, $2, VARIADIC $3) $$ + LANGUAGE 'sql'; + +-- Variant 7: missing band, pixeltype, and user args; default to band 1, pixeltype of rast. +CREATE OR REPLACE FUNCTION st_mapalgebrafct(rast raster, onerastuserfunc regprocedure) + RETURNS raster + AS $$ SELECT st_mapalgebrafct($1, 1, NULL, $2, NULL) $$ + LANGUAGE 'sql'; + +----------------------------------------------------------------------- +-- Two Raster ST_MapAlgebra +----------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION st_mapalgebraexpr( + rast1 raster, band1 integer, + rast2 raster, band2 integer, + expression text, + pixeltype text DEFAULT NULL, extenttype text DEFAULT 'INTERSECTION', + nodata1expr text DEFAULT NULL, nodata2expr text DEFAULT NULL, + nodatanodataval double precision DEFAULT NULL +) + RETURNS raster + AS 'MODULE_PATHNAME', 'RASTER_mapAlgebra2' + LANGUAGE 'c' STABLE; + +CREATE OR REPLACE FUNCTION st_mapalgebraexpr( + rast1 raster, + rast2 raster, + expression text, + pixeltype text DEFAULT NULL, extenttype text DEFAULT 'INTERSECTION', + nodata1expr text DEFAULT NULL, nodata2expr text DEFAULT NULL, + nodatanodataval double precision DEFAULT NULL +) + RETURNS raster + AS $$ SELECT st_mapalgebraexpr($1, 1, $2, 1, $3, $4, $5, $6, $7, $8) $$ + LANGUAGE 'sql' STABLE; + +CREATE OR REPLACE FUNCTION st_mapalgebrafct( + rast1 raster, band1 integer, + rast2 raster, band2 integer, + tworastuserfunc regprocedure, + pixeltype text DEFAULT NULL, extenttype text DEFAULT 'INTERSECTION', + VARIADIC userargs text[] DEFAULT NULL +) + RETURNS raster + AS 'MODULE_PATHNAME', 'RASTER_mapAlgebra2' + LANGUAGE 'c' STABLE; + +CREATE OR REPLACE FUNCTION st_mapalgebrafct( + rast1 raster, + rast2 raster, + tworastuserfunc regprocedure, + pixeltype text DEFAULT NULL, extenttype text DEFAULT 'INTERSECTION', + VARIADIC userargs text[] DEFAULT NULL +) + RETURNS raster + AS $$ SELECT st_mapalgebrafct($1, 1, $2, 1, $3, $4, $5, VARIADIC $6) $$ + LANGUAGE 'sql' STABLE; + +----------------------------------------------------------------------- +-- Neighborhood single raster map algebra +----------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION st_mapalgebrafctngb( + rast raster, + band integer, + pixeltype text, + ngbwidth integer, + ngbheight integer, + onerastngbuserfunc regprocedure, + nodatamode text, + variadic args text[] +) + RETURNS raster + AS 'MODULE_PATHNAME', 'RASTER_mapAlgebraFctNgb' + LANGUAGE 'c' IMMUTABLE; + +----------------------------------------------------------------------- +-- Neighborhood MapAlgebra processing functions. +----------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION st_max4ma(matrix float[][], nodatamode text, variadic args text[]) + RETURNS float AS + $$ + DECLARE + _matrix float[][]; + max float; + BEGIN + _matrix := matrix; + max := '-Infinity'::float; + FOR x in array_lower(_matrix, 1)..array_upper(_matrix, 1) LOOP + FOR y in array_lower(_matrix, 2)..array_upper(_matrix, 2) LOOP + IF _matrix[x][y] IS NULL THEN + IF NOT nodatamode = 'ignore' THEN + _matrix[x][y] := nodatamode::float; + END IF; + END IF; + IF max < _matrix[x][y] THEN + max := _matrix[x][y]; + END IF; + END LOOP; + END LOOP; + RETURN max; + END; + $$ + LANGUAGE 'plpgsql' IMMUTABLE; + + +CREATE OR REPLACE FUNCTION st_min4ma(matrix float[][], nodatamode text, variadic args text[]) + RETURNS float AS + $$ + DECLARE + _matrix float[][]; + min float; + BEGIN + _matrix := matrix; + min := 'Infinity'::float; + FOR x in array_lower(_matrix, 1)..array_upper(_matrix, 1) LOOP + FOR y in array_lower(_matrix, 2)..array_upper(_matrix, 2) LOOP + IF _matrix[x][y] IS NULL THEN + IF NOT nodatamode = 'ignore' THEN + _matrix[x][y] := nodatamode::float; + END IF; + END IF; + IF min > _matrix[x][y] THEN + min := _matrix[x][y]; + END IF; + END LOOP; + END LOOP; + RETURN min; + END; + $$ + LANGUAGE 'plpgsql' IMMUTABLE; + +CREATE OR REPLACE FUNCTION st_sum4ma(matrix float[][], nodatamode text, variadic args text[]) + RETURNS float AS + $$ + DECLARE + _matrix float[][]; + sum float; + BEGIN + _matrix := matrix; + sum := 0; + FOR x in array_lower(matrix, 1)..array_upper(matrix, 1) LOOP + FOR y in array_lower(matrix, 2)..array_upper(matrix, 2) LOOP + IF _matrix[x][y] IS NULL THEN + IF nodatamode = 'ignore' THEN + _matrix[x][y] := 0; + ELSE + _matrix[x][y] := nodatamode::float; + END IF; + END IF; + sum := sum + _matrix[x][y]; + END LOOP; + END LOOP; + RETURN sum; + END; + $$ + LANGUAGE 'plpgsql' IMMUTABLE; + +CREATE OR REPLACE FUNCTION st_mean4ma(matrix float[][], nodatamode text, variadic args text[]) + RETURNS float AS + $$ + DECLARE + _matrix float[][]; + sum float; + count float; + BEGIN + _matrix := matrix; + sum := 0; + count := 0; + FOR x in array_lower(matrix, 1)..array_upper(matrix, 1) LOOP + FOR y in array_lower(matrix, 2)..array_upper(matrix, 2) LOOP + IF _matrix[x][y] IS NULL THEN + IF nodatamode = 'ignore' THEN + _matrix[x][y] := 0; + ELSE + _matrix[x][y] := nodatamode::float; + count := count + 1; + END IF; + ELSE + count := count + 1; + END IF; + sum := sum + _matrix[x][y]; + END LOOP; + END LOOP; + IF count = 0 THEN + RETURN NULL; + END IF; + RETURN sum / count; + END; + $$ + LANGUAGE 'plpgsql' IMMUTABLE; + +CREATE OR REPLACE FUNCTION st_range4ma(matrix float[][], nodatamode text, variadic args text[]) + RETURNS float AS + $$ + DECLARE + _matrix float[][]; + min float; + max float; + BEGIN + _matrix := matrix; + min := 'Infinity'::float; + max := '-Infinity'::float; + FOR x in array_lower(matrix, 1)..array_upper(matrix, 1) LOOP + FOR y in array_lower(matrix, 2)..array_upper(matrix, 2) LOOP + IF _matrix[x][y] IS NULL THEN + IF NOT nodatamode = 'ignore' THEN + _matrix[x][y] := nodatamode::float; + END IF; + END IF; + IF min > _matrix[x][y] THEN + min = _matrix[x][y]; + END IF; + IF max < _matrix[x][y] THEN + max = _matrix[x][y]; + END IF; + END LOOP; + END LOOP; + IF max = '-Infinity'::float OR min = 'Infinity'::float THEN + RETURN NULL; + END IF; + RETURN max - min; + END; + $$ + LANGUAGE 'plpgsql' IMMUTABLE; + +CREATE OR REPLACE FUNCTION _st_slope4ma(matrix float[][], nodatamode text, variadic args text[]) + RETURNS float + AS + $$ + DECLARE + pwidth float; + pheight float; + dz_dx float; + dz_dy float; + BEGIN + pwidth := args[1]::float; + pheight := args[2]::float; + dz_dx := ((matrix[3][1] + 2.0 * matrix[3][2] + matrix[3][3]) - (matrix[1][1] + 2.0 * matrix[1][2] + matrix[1][3])) / (8.0 * pwidth); + dz_dy := ((matrix[1][3] + 2.0 * matrix[2][3] + matrix[3][3]) - (matrix[1][1] + 2.0 * matrix[2][1] + matrix[3][1])) / (8.0 * pheight); + RETURN atan(sqrt(pow(dz_dx, 2.0) + pow(dz_dy, 2.0))); + END; + $$ + LANGUAGE 'plpgsql' IMMUTABLE; + +CREATE OR REPLACE FUNCTION st_slope(rast raster, band integer, pixeltype text) + RETURNS RASTER + AS $$ SELECT st_mapalgebrafctngb($1, $2, $3, 1, 1, '_st_slope4ma(float[][], text, text[])'::regprocedure, 'value', st_pixelwidth($1)::text, st_pixelheight($1)::text) $$ + LANGUAGE 'sql' STABLE; + +CREATE OR REPLACE FUNCTION _st_aspect4ma(matrix float[][], nodatamode text, variadic args text[]) + RETURNS float + AS + $$ + DECLARE + pwidth float; + pheight float; + dz_dx float; + dz_dy float; + aspect float; + BEGIN + pwidth := args[1]::float; + pheight := args[2]::float; + dz_dx := ((matrix[3][1] + 2.0 * matrix[3][2] + matrix[3][3]) - (matrix[1][1] + 2.0 * matrix[1][2] + matrix[1][3])) / (8.0 * pwidth); + dz_dy := ((matrix[1][3] + 2.0 * matrix[2][3] + matrix[3][3]) - (matrix[1][1] + 2.0 * matrix[2][1] + matrix[3][1])) / (8.0 * pheight); + IF abs(dz_dx) = 0::float AND abs(dz_dy) = 0::float THEN + RETURN -1; + END IF; + + aspect := atan2(dz_dy, -dz_dx); + IF aspect > (pi() / 2.0) THEN + RETURN (5.0 * pi() / 2.0) - aspect; + ELSE + RETURN (pi() / 2.0) - aspect; + END IF; + END; + $$ + LANGUAGE 'plpgsql' IMMUTABLE; + +CREATE OR REPLACE FUNCTION st_aspect(rast raster, band integer, pixeltype text) + RETURNS RASTER + AS $$ SELECT st_mapalgebrafctngb($1, $2, $3, 1, 1, '_st_aspect4ma(float[][], text, text[])'::regprocedure, 'value', st_pixelwidth($1)::text, st_pixelheight($1)::text) $$ + LANGUAGE 'sql' STABLE; + + +CREATE OR REPLACE FUNCTION _st_hillshade4ma(matrix float[][], nodatamode text, variadic args text[]) + RETURNS float + AS + $$ + DECLARE + pwidth float; + pheight float; + dz_dx float; + dz_dy float; + zenith float; + azimuth float; + slope float; + aspect float; + max_bright float; + elevation_scale float; + BEGIN + pwidth := args[1]::float; + pheight := args[2]::float; + azimuth := (5.0 * pi() / 2.0) - args[3]::float; + zenith := (pi() / 2.0) - args[4]::float; + dz_dx := ((matrix[3][1] + 2.0 * matrix[3][2] + matrix[3][3]) - (matrix[1][1] + 2.0 * matrix[1][2] + matrix[1][3])) / (8.0 * pwidth); + dz_dy := ((matrix[1][3] + 2.0 * matrix[2][3] + matrix[3][3]) - (matrix[1][1] + 2.0 * matrix[2][1] + matrix[3][1])) / (8.0 * pheight); + elevation_scale := args[6]::float; + slope := atan(sqrt(elevation_scale * pow(dz_dx, 2.0) + pow(dz_dy, 2.0))); + -- handle special case of 0, 0 + IF abs(dz_dy) = 0::float AND abs(dz_dy) = 0::float THEN + -- set to pi as that is the expected PostgreSQL answer in Linux + aspect := pi(); + ELSE + aspect := atan2(dz_dy, -dz_dx); + END IF; + max_bright := args[5]::float; + + IF aspect < 0 THEN + aspect := aspect + (2.0 * pi()); + END IF; + + RETURN max_bright * ( (cos(zenith)*cos(slope)) + (sin(zenith)*sin(slope)*cos(azimuth - aspect)) ); + END; + $$ + LANGUAGE 'plpgsql' IMMUTABLE; + +CREATE OR REPLACE FUNCTION st_hillshade(rast raster, band integer, pixeltype text, azimuth float, altitude float, max_bright float DEFAULT 255.0, elevation_scale float DEFAULT 1.0) + RETURNS RASTER + AS $$ SELECT st_mapalgebrafctngb($1, $2, $3, 1, 1, '_st_hillshade4ma(float[][], text, text[])'::regprocedure, 'value', st_pixelwidth($1)::text, st_pixelheight($1)::text, $4::text, $5::text, $6::text, $7::text) $$ + LANGUAGE 'sql' STABLE; + +CREATE OR REPLACE FUNCTION st_distinct4ma(matrix float[][], nodatamode TEXT, VARIADIC args TEXT[]) + RETURNS float AS + $$ SELECT COUNT(DISTINCT unnest)::float FROM unnest($1) $$ + LANGUAGE 'sql' IMMUTABLE; + +CREATE OR REPLACE FUNCTION st_stddev4ma(matrix float[][], nodatamode TEXT, VARIADIC args TEXT[]) + RETURNS float AS + $$ SELECT stddev(unnest) FROM unnest($1) $$ + LANGUAGE 'sql' IMMUTABLE; + + +----------------------------------------------------------------------- +-- Get information about the raster +----------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION st_isempty(rast raster) + RETURNS boolean + AS 'MODULE_PATHNAME', 'RASTER_isEmpty' + LANGUAGE 'c' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_hasnoband(rast raster, nband int DEFAULT 1) + RETURNS boolean + AS 'MODULE_PATHNAME', 'RASTER_hasNoBand' + LANGUAGE 'c' IMMUTABLE STRICT; + +----------------------------------------------------------------------- +-- Raster Band Accessors +----------------------------------------------------------------------- + +CREATE OR REPLACE FUNCTION st_bandnodatavalue(rast raster, band integer DEFAULT 1) + RETURNS double precision + AS 'MODULE_PATHNAME','RASTER_getBandNoDataValue' + LANGUAGE 'c' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_bandisnodata(rast raster, band integer DEFAULT 1, forceChecking boolean DEFAULT FALSE) + RETURNS boolean + AS 'MODULE_PATHNAME', 'RASTER_bandIsNoData' + LANGUAGE 'c' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_bandisnodata(rast raster, forceChecking boolean) + RETURNS boolean + AS $$ SELECT st_bandisnodata($1, 1, $2) $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_bandpath(rast raster, band integer DEFAULT 1) + RETURNS text + AS 'MODULE_PATHNAME','RASTER_getBandPath' + LANGUAGE 'c' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_bandpixeltype(rast raster, band integer DEFAULT 1) + RETURNS text + AS 'MODULE_PATHNAME','RASTER_getBandPixelTypeName' + LANGUAGE 'c' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_bandmetadata( + rast raster, + band int[], + OUT bandnum int, + OUT pixeltype text, + OUT nodatavalue double precision, + OUT isoutdb boolean, + OUT path text +) + AS 'MODULE_PATHNAME','RASTER_bandmetadata' + LANGUAGE 'c' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_bandmetadata( + rast raster, + band int DEFAULT 1, + OUT pixeltype text, + OUT nodatavalue double precision, + OUT isoutdb boolean, + OUT path text +) + AS $$ SELECT pixeltype, nodatavalue, isoutdb, path FROM st_bandmetadata($1, ARRAY[$2]::int[]) LIMIT 1 $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +----------------------------------------------------------------------- +-- Raster Pixel Accessors +----------------------------------------------------------------------- + +CREATE OR REPLACE FUNCTION st_value(rast raster, band integer, x integer, y integer, hasnodata boolean DEFAULT TRUE) + RETURNS float8 + AS 'MODULE_PATHNAME','RASTER_getPixelValue' + LANGUAGE 'c' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_value(rast raster, x integer, y integer, hasnodata boolean DEFAULT TRUE) + RETURNS float8 + AS $$ SELECT st_value($1, 1, $2, $3, $4) $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_value(rast raster, band integer, pt geometry, hasnodata boolean DEFAULT TRUE) + RETURNS float8 AS + $$ + DECLARE + x float8; + y float8; + gtype text; + BEGIN + gtype := st_geometrytype(pt); + IF ( gtype != 'ST_Point' ) THEN + RAISE EXCEPTION 'Attempting to get the value of a pixel with a non-point geometry'; + END IF; + x := st_x(pt); + y := st_y(pt); + RETURN st_value(rast, + band, + st_world2rastercoordx(rast, x, y), + st_world2rastercoordy(rast, x, y), + hasnodata); + END; + $$ + LANGUAGE 'plpgsql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_value(rast raster, pt geometry, hasnodata boolean DEFAULT TRUE) + RETURNS float8 + AS $$ SELECT st_value($1, 1, $2, $3) $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +----------------------------------------------------------------------- +-- Raster Accessors ST_Georeference() +----------------------------------------------------------------------- + +CREATE OR REPLACE FUNCTION st_georeference(rast raster, format text DEFAULT 'GDAL') + RETURNS text AS + $$ + DECLARE + scale_x numeric; + scale_y numeric; + skew_x numeric; + skew_y numeric; + ul_x numeric; + ul_y numeric; + + result text; + BEGIN + SELECT scalex::numeric, scaley::numeric, skewx::numeric, skewy::numeric, upperleftx::numeric, upperlefty::numeric + INTO scale_x, scale_y, skew_x, skew_y, ul_x, ul_y FROM ST_Metadata(rast); + + -- scale x + result := trunc(scale_x, 10) || E'\n'; + + -- skew y + result := result || trunc(skew_y, 10) || E'\n'; + + -- skew x + result := result || trunc(skew_x, 10) || E'\n'; + + -- scale y + result := result || trunc(scale_y, 10) || E'\n'; + + IF format = 'ESRI' THEN + -- upper left x + result := result || trunc((ul_x + scale_x * 0.5), 10) || E'\n'; + + -- upper left y + result = result || trunc((ul_y + scale_y * 0.5), 10) || E'\n'; + ELSE -- IF format = 'GDAL' THEN + -- upper left x + result := result || trunc(ul_x, 10) || E'\n'; + + -- upper left y + result := result || trunc(ul_y, 10) || E'\n'; + END IF; + + RETURN result; + END; + $$ + LANGUAGE 'plpgsql' IMMUTABLE STRICT; -- WITH (isstrict); + +----------------------------------------------------------------------- +-- Raster Editors +----------------------------------------------------------------------- + +CREATE OR REPLACE FUNCTION st_setscale(rast raster, scale float8) + RETURNS raster + AS 'MODULE_PATHNAME','RASTER_setScale' + LANGUAGE 'c' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_setscale(rast raster, scalex float8, scaley float8) + RETURNS raster + AS 'MODULE_PATHNAME','RASTER_setScaleXY' + LANGUAGE 'c' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_setskew(rast raster, skew float8) + RETURNS raster + AS 'MODULE_PATHNAME','RASTER_setSkew' + LANGUAGE 'c' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_setskew(rast raster, skewx float8, skewy float8) + RETURNS raster + AS 'MODULE_PATHNAME','RASTER_setSkewXY' + LANGUAGE 'c' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_setsrid(rast raster, srid integer) + RETURNS raster + AS 'MODULE_PATHNAME','RASTER_setSRID' + LANGUAGE 'c' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_setupperleft(rast raster, upperleftx float8, upperlefty float8) + RETURNS raster + AS 'MODULE_PATHNAME','RASTER_setUpperLeftXY' + LANGUAGE 'c' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_setrotation(rast raster, rotation float8) + RETURNS raster + AS 'MODULE_PATHNAME','RASTER_setRotation' + LANGUAGE 'c' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_setgeotransform(rast raster, + imag double precision, + jmag double precision, + theta_i double precision, + theta_ij double precision, + xoffset double precision, + yoffset double precision) + RETURNS raster + AS 'MODULE_PATHNAME','RASTER_setGeotransform' + LANGUAGE 'c' IMMUTABLE; + +----------------------------------------------------------------------- +-- Raster Editors ST_SetGeoreference() +----------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION st_setgeoreference(rast raster, georef text, format text DEFAULT 'GDAL') + RETURNS raster AS + $$ + DECLARE + params text[]; + rastout raster; + BEGIN + IF rast IS NULL THEN + RAISE WARNING 'Cannot set georeferencing on a null raster in st_setgeoreference.'; + RETURN rastout; + END IF; + + SELECT regexp_matches(georef, + E'(-?\\d+(?:\\.\\d+)?)\\s(-?\\d+(?:\\.\\d+)?)\\s(-?\\d+(?:\\.\\d+)?)\\s' || + E'(-?\\d+(?:\\.\\d+)?)\\s(-?\\d+(?:\\.\\d+)?)\\s(-?\\d+(?:\\.\\d+)?)') INTO params; + + IF NOT FOUND THEN + RAISE EXCEPTION 'st_setgeoreference requires a string with 6 floating point values.'; + END IF; + + IF format = 'ESRI' THEN + -- params array is now: + -- {scalex, skewy, skewx, scaley, upperleftx, upperlefty} + rastout := st_setscale(rast, params[1]::float8, params[4]::float8); + rastout := st_setskew(rastout, params[3]::float8, params[2]::float8); + rastout := st_setupperleft(rastout, + params[5]::float8 - (params[1]::float8 * 0.5), + params[6]::float8 - (params[4]::float8 * 0.5)); + ELSE + IF format != 'GDAL' THEN + RAISE WARNING E'Format \'%\' is not recognized, defaulting to GDAL format.', format; + END IF; + -- params array is now: + -- {scalex, skewy, skewx, scaley, upperleftx, upperlefty} + + rastout := st_setscale(rast, params[1]::float8, params[4]::float8); + rastout := st_setskew( rastout, params[3]::float8, params[2]::float8); + rastout := st_setupperleft(rastout, params[5]::float8, params[6]::float8); + END IF; + RETURN rastout; + END; + $$ + LANGUAGE 'plpgsql' IMMUTABLE STRICT; -- WITH (isstrict); + +----------------------------------------------------------------------- +-- Raster Band Editors +----------------------------------------------------------------------- + +-- This function can not be STRICT, because nodatavalue can be NULL indicating that no nodata value should be set +CREATE OR REPLACE FUNCTION st_setbandnodatavalue(rast raster, band integer, nodatavalue float8, forceChecking boolean DEFAULT FALSE) + RETURNS raster + AS 'MODULE_PATHNAME','RASTER_setBandNoDataValue' + LANGUAGE 'c' IMMUTABLE; + +-- This function can not be STRICT, because nodatavalue can be NULL indicating that no nodata value should be set +CREATE OR REPLACE FUNCTION st_setbandnodatavalue(rast raster, nodatavalue float8) + RETURNS raster + AS $$ SELECT st_setbandnodatavalue($1, 1, $2, FALSE) $$ + LANGUAGE 'sql'; + +CREATE OR REPLACE FUNCTION st_setbandisnodata(rast raster, band integer DEFAULT 1) + RETURNS raster + AS 'MODULE_PATHNAME', 'RASTER_setBandIsNoData' + LANGUAGE 'c' IMMUTABLE STRICT; + +----------------------------------------------------------------------- +-- Raster Pixel Editors +----------------------------------------------------------------------- + +-- This function can not be STRICT, because newvalue can be NULL for nodata +CREATE OR REPLACE FUNCTION st_setvalue(rast raster, band integer, x integer, y integer, newvalue float8) + RETURNS raster + AS 'MODULE_PATHNAME','RASTER_setPixelValue' + LANGUAGE 'c' IMMUTABLE; + +-- This function can not be STRICT, because newvalue can be NULL for nodata +CREATE OR REPLACE FUNCTION st_setvalue(rast raster, x integer, y integer, newvalue float8) + RETURNS raster + AS $$ SELECT st_setvalue($1, 1, $2, $3, $4) $$ + LANGUAGE 'sql'; + +-- This function can not be STRICT, because newvalue can be NULL for nodata +CREATE OR REPLACE FUNCTION st_setvalue(rast raster, band integer, pt geometry, newvalue float8) + RETURNS raster AS + $$ + DECLARE + x float8; + y float8; + gtype text; + BEGIN + gtype := st_geometrytype(pt); + IF ( gtype != 'ST_Point' ) THEN + RAISE EXCEPTION 'Attempting to get the value of a pixel with a non-point geometry'; + END IF; + x := st_x(pt); + y := st_y(pt); + RETURN st_setvalue(rast, + band, + st_world2rastercoordx(rast, x, y), + st_world2rastercoordy(rast, x, y), + newvalue); + END; + $$ + LANGUAGE 'plpgsql' IMMUTABLE; + +-- This function can not be STRICT, because newvalue can be NULL for nodata +CREATE OR REPLACE FUNCTION st_setvalue(rast raster, pt geometry, newvalue float8) + RETURNS raster + AS $$ SELECT st_setvalue($1, 1, $2, $3) $$ + LANGUAGE 'sql'; + +----------------------------------------------------------------------- +-- Raster Processing Functions +----------------------------------------------------------------------- + +CREATE TYPE geomval AS ( + geom geometry, + val double precision +); + +CREATE OR REPLACE FUNCTION st_dumpaspolygons(rast raster, band integer DEFAULT 1) + RETURNS SETOF geomval + AS 'MODULE_PATHNAME','RASTER_dumpAsPolygons' + LANGUAGE 'c' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_polygon(rast raster, band integer DEFAULT 1) + RETURNS geometry AS + $$ + SELECT st_union(f.geom) AS singlegeom + FROM (SELECT (st_dumpaspolygons($1, $2)).geom AS geom) AS f; + $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_pixelaspolygon(rast raster, x integer, y integer) + RETURNS geometry + AS 'MODULE_PATHNAME','RASTER_getPixelPolygon' + LANGUAGE 'c' IMMUTABLE STRICT; + +----------------------------------------------------------------------- +-- ST_PixelAsPolygons +-- Return all the pixels of a raster as a geom, val, x, y record +-- Should be called like this: +-- SELECT (gv).geom, (gv).val FROM (SELECT ST_PixelAsPolygons(rast) gv FROM mytable) foo +----------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION ST_PixelAsPolygons(rast raster, band integer DEFAULT 1, OUT geom geometry, OUT val double precision, OUT x int, OUT y int) + RETURNS SETOF record AS + $$ + DECLARE + rast alias for $1; + var_w integer; + var_h integer; + var_x integer; + var_y integer; + value float8 := NULL; + hasband boolean := TRUE; + BEGIN + IF rast IS NOT NULL AND NOT ST_IsEmpty(rast) THEN + IF ST_HasNoBand(rast, band) THEN + RAISE NOTICE 'Raster do not have band %. Returning null values', band; + hasband := false; + END IF; + SELECT ST_Width(rast), ST_Height(rast) INTO var_w, var_h; + FOR var_x IN 1..var_w LOOP + FOR var_y IN 1..var_h LOOP + IF hasband THEN + value := ST_Value(rast, band, var_x, var_y); + END IF; + SELECT ST_PixelAsPolygon(rast, var_x, var_y), value, var_x, var_y INTO geom,val,x,y; + RETURN NEXT; + END LOOP; + END LOOP; + END IF; + RETURN; + END; + $$ + LANGUAGE 'plpgsql'; + +----------------------------------------------------------------------- +-- Raster Utility Functions +----------------------------------------------------------------------- + +----------------------------------------------------------------------- +-- ST_World2RasterCoord +----------------------------------------------------------------------- + +CREATE OR REPLACE FUNCTION _st_world2rastercoord( + rast raster, + longitude double precision DEFAULT NULL, latitude double precision DEFAULT NULL, + OUT columnx integer, + OUT rowy integer +) + AS 'MODULE_PATHNAME', 'RASTER_worldToRasterCoord' + LANGUAGE 'c' IMMUTABLE; + +--------------------------------------------------------------------------------- +-- ST_World2RasterCoordX(rast raster, xw float8, yw float8) +-- Returns the column number of the pixel covering the provided X and Y world +-- coordinates. +-- This function works even if the world coordinates are outside the raster extent. +--------------------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION st_world2rastercoordx(rast raster, xw float8, yw float8) + RETURNS int + AS $$ SELECT columnx FROM _st_world2rastercoord($1, $2, $3) $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +--------------------------------------------------------------------------------- +-- ST_World2RasterCoordX(rast raster, xw float8) +-- Returns the column number of the pixels covering the provided world X coordinate +-- for a non-rotated raster. +-- This function works even if the world coordinate is outside the raster extent. +-- This function returns an error if the raster is rotated. In this case you must +-- also provide a Y. +--------------------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION st_world2rastercoordx(rast raster, xw float8) + RETURNS int + AS $$ SELECT columnx FROM _st_world2rastercoord($1, $2, NULL) $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +--------------------------------------------------------------------------------- +-- ST_World2RasterCoordX(rast raster, pt geometry) +-- Returns the column number of the pixel covering the provided point geometry. +-- This function works even if the point is outside the raster extent. +--------------------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION st_world2rastercoordx(rast raster, pt geometry) + RETURNS int AS + $$ + DECLARE + xr integer; + BEGIN + IF ( st_geometrytype(pt) != 'ST_Point' ) THEN + RAISE EXCEPTION 'Attempting to compute raster coordinate with a non-point geometry'; + END IF; + SELECT columnx INTO xr FROM _st_world2rastercoord($1, st_x(pt), st_y(pt)); + RETURN xr; + END; + $$ + LANGUAGE 'plpgsql' IMMUTABLE STRICT; + +--------------------------------------------------------------------------------- +-- ST_World2RasterCoordY(rast raster, xw float8, yw float8) +-- Returns the row number of the pixel covering the provided X and Y world +-- coordinates. +-- This function works even if the world coordinates are outside the raster extent. +--------------------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION st_world2rastercoordy(rast raster, xw float8, yw float8) + RETURNS int + AS $$ SELECT rowy FROM _st_world2rastercoord($1, $2, $3) $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +--------------------------------------------------------------------------------- +-- ST_World2RasterCoordY(rast raster, yw float8) +-- Returns the row number of the pixels covering the provided world Y coordinate +-- for a non-rotated raster. +-- This function works even if the world coordinate is outside the raster extent. +-- This function returns an error if the raster is rotated. In this case you must +-- also provide an X. +--------------------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION st_world2rastercoordy(rast raster, yw float8) + RETURNS int + AS $$ SELECT rowy FROM _st_world2rastercoord($1, NULL, $2) $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +--------------------------------------------------------------------------------- +-- ST_World2RasterCoordY(rast raster, pt geometry) +-- Returns the row number of the pixel covering the provided point geometry. +-- This function works even if the point is outside the raster extent. +--------------------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION st_world2rastercoordy(rast raster, pt geometry) + RETURNS int AS + $$ + DECLARE + yr integer; + BEGIN + IF ( st_geometrytype(pt) != 'ST_Point' ) THEN + RAISE EXCEPTION 'Attempting to compute raster coordinate with a non-point geometry'; + END IF; + SELECT rowy INTO yr FROM _st_world2rastercoord($1, st_x(pt), st_y(pt)); + RETURN yr; + END; + $$ + LANGUAGE 'plpgsql' IMMUTABLE STRICT; + +--------------------------------------------------------------------------------- +-- ST_Raster2WorldCoord +--------------------------------------------------------------------------------- + +CREATE OR REPLACE FUNCTION _st_raster2worldcoord( + rast raster, + columnx integer DEFAULT NULL, rowy integer DEFAULT NULL, + OUT longitude double precision, + OUT latitude double precision +) + AS 'MODULE_PATHNAME', 'RASTER_rasterToWorldCoord' + LANGUAGE 'c' IMMUTABLE; + +--------------------------------------------------------------------------------- +-- ST_Raster2WorldCoordX(rast raster, xr int, yr int) +-- Returns the X world coordinate of the upper left corner of the pixel located at +-- the provided column and row numbers. +-- This function works even if the provided raster column and row are beyond or +-- below the raster width and height. +--------------------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION st_raster2worldcoordx(rast raster, xr int, yr int) + RETURNS float8 + AS $$ SELECT longitude FROM _st_raster2worldcoord($1, $2, $3) $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +--------------------------------------------------------------------------------- +-- ST_Raster2WorldCoordX(rast raster, xr int) +-- Returns the X world coordinate of the upper left corner of the pixel located at +-- the provided column number for a non-rotated raster. +-- This function works even if the provided raster column is beyond or below the +-- raster width. +-- This function returns an error if the raster is rotated. In this case you must +-- also provide a Y. +--------------------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION st_raster2worldcoordx(rast raster, xr int) + RETURNS float8 + AS $$ SELECT longitude FROM _st_raster2worldcoord($1, $2, NULL) $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +--------------------------------------------------------------------------------- +-- ST_Raster2WorldCoordY(rast raster, xr int, yr int) +-- Returns the Y world coordinate of the upper left corner of the pixel located at +-- the provided column and row numbers. +-- This function works even if the provided raster column and row are beyond or +-- below the raster width and height. +--------------------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION st_raster2worldcoordy(rast raster, xr int, yr int) + RETURNS float8 + AS $$ SELECT latitude FROM _st_raster2worldcoord($1, $2, $3) $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +--------------------------------------------------------------------------------- +-- ST_Raster2WorldCoordY(rast raster, yr int) +-- Returns the Y world coordinate of the upper left corner of the pixel located at +-- the provided row number for a non-rotated raster. +-- This function works even if the provided raster row is beyond or below the +-- raster height. +-- This function returns an error if the raster is rotated. In this case you must +-- also provide an X. +--------------------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION st_raster2worldcoordy(rast raster, yr int) + RETURNS float8 + AS $$ SELECT latitude FROM _st_raster2worldcoord($1, NULL, $2) $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +----------------------------------------------------------------------- +-- ST_MinPossibleValue(pixeltype text) +-- Return the smallest value for a given pixeltyp. +-- Should be called like this: +-- SELECT ST_MinPossibleValue(ST_BandPixelType(rast, band)) +----------------------------------------------------------------------- + +CREATE OR REPLACE FUNCTION st_minpossiblevalue(pixeltype text) + RETURNS double precision + AS 'MODULE_PATHNAME', 'RASTER_minPossibleValue' + LANGUAGE 'c' IMMUTABLE STRICT; + +----------------------------------------------------------------------- +-- Raster Outputs +----------------------------------------------------------------------- + +CREATE OR REPLACE FUNCTION st_asbinary(raster) + RETURNS bytea + AS 'MODULE_PATHNAME', 'RASTER_to_binary' + LANGUAGE 'c' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION bytea(raster) + RETURNS bytea + AS 'MODULE_PATHNAME', 'RASTER_to_bytea' + LANGUAGE 'c' IMMUTABLE STRICT; + +------------------------------------------------------------------------------ +-- Casts +------------------------------------------------------------------------------ + +CREATE CAST (raster AS box3d) + WITH FUNCTION box3d(raster) AS ASSIGNMENT; + +CREATE CAST (raster AS geometry) + WITH FUNCTION st_convexhull(raster) AS ASSIGNMENT; + +CREATE CAST (raster AS bytea) + WITH FUNCTION bytea(raster) AS ASSIGNMENT; + +------------------------------------------------------------------------------ +-- GiST index OPERATOR support functions +------------------------------------------------------------------------------ +-- raster/raster functions +CREATE OR REPLACE FUNCTION raster_overleft(raster, raster) + RETURNS bool + AS 'select $1::geometry &< $2::geometry' + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION raster_overright(raster, raster) + RETURNS bool + AS 'select $1::geometry &> $2::geometry' + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION raster_left(raster, raster) + RETURNS bool + AS 'select $1::geometry << $2::geometry' + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION raster_right(raster, raster) + RETURNS bool + AS 'select $1::geometry >> $2::geometry' + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION raster_overabove(raster, raster) + RETURNS bool + AS 'select $1::geometry |&> $2::geometry' + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION raster_overbelow(raster, raster) + RETURNS bool + AS 'select $1::geometry &<| $2::geometry' + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION raster_above(raster, raster) + RETURNS bool + AS 'select $1::geometry |>> $2::geometry' + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION raster_below(raster, raster) + RETURNS bool + AS 'select $1::geometry <<| $2::geometry' + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION raster_same(raster, raster) + RETURNS bool + AS 'select $1::geometry ~= $2::geometry' + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION raster_contained(raster, raster) + RETURNS bool + AS 'select $1::geometry @ $2::geometry' + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION raster_contain(raster, raster) + RETURNS bool + AS 'select $1::geometry ~ $2::geometry' + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION raster_overlap(raster, raster) + RETURNS bool + AS 'select $1::geometry && $2::geometry' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- raster/geometry functions +CREATE OR REPLACE FUNCTION raster_geometry_contain(raster, geometry) + RETURNS bool + AS 'select $1::geometry ~ $2' + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION raster_geometry_overlap(raster, geometry) + RETURNS bool + AS 'select $1::geometry && $2' + LANGUAGE 'sql' IMMUTABLE STRICT; + +-- geometry/raster functions +CREATE OR REPLACE FUNCTION geometry_raster_contain(geometry, raster) + RETURNS bool + AS 'select $1 ~ $2::geometry' + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION geometry_raster_overlap(geometry, raster) + RETURNS bool + AS 'select $1 && $2::geometry' + LANGUAGE 'sql' IMMUTABLE STRICT; + +------------------------------------------------------------------------------ +-- GiST index OPERATORs +------------------------------------------------------------------------------ +-- raster/raster operators +CREATE OPERATOR << ( + LEFTARG = raster, RIGHTARG = raster, PROCEDURE = raster_left, + COMMUTATOR = '>>', + RESTRICT = positionsel, JOIN = positionjoinsel + ); + +CREATE OPERATOR &< ( + LEFTARG = raster, RIGHTARG = raster, PROCEDURE = raster_overleft, + COMMUTATOR = '&>', + RESTRICT = positionsel, JOIN = positionjoinsel + ); + +CREATE OPERATOR <<| ( + LEFTARG = raster, RIGHTARG = raster, PROCEDURE = raster_below, + COMMUTATOR = '|>>', + RESTRICT = positionsel, JOIN = positionjoinsel + ); + +CREATE OPERATOR &<| ( + LEFTARG = raster, RIGHTARG = raster, PROCEDURE = raster_overbelow, + COMMUTATOR = '|&>', + RESTRICT = positionsel, JOIN = positionjoinsel + ); + +CREATE OPERATOR && ( + LEFTARG = raster, RIGHTARG = raster, PROCEDURE = raster_overlap, + COMMUTATOR = '&&', + RESTRICT = contsel, JOIN = contjoinsel + ); + +CREATE OPERATOR &> ( + LEFTARG = raster, RIGHTARG = raster, PROCEDURE = raster_overright, + COMMUTATOR = '&<', + RESTRICT = positionsel, JOIN = positionjoinsel + ); + +CREATE OPERATOR >> ( + LEFTARG = raster, RIGHTARG = raster, PROCEDURE = raster_right, + COMMUTATOR = '<<', + RESTRICT = positionsel, JOIN = positionjoinsel + ); + +CREATE OPERATOR |&> ( + LEFTARG = raster, RIGHTARG = raster, PROCEDURE = raster_overabove, + COMMUTATOR = '&<|', + RESTRICT = positionsel, JOIN = positionjoinsel + ); + +CREATE OPERATOR |>> ( + LEFTARG = raster, RIGHTARG = raster, PROCEDURE = raster_above, + COMMUTATOR = '<<|', + RESTRICT = positionsel, JOIN = positionjoinsel + ); + +CREATE OPERATOR ~= ( + LEFTARG = raster, RIGHTARG = raster, PROCEDURE = raster_same, + COMMUTATOR = '~=', + RESTRICT = eqsel, JOIN = eqjoinsel + ); + +CREATE OPERATOR @ ( + LEFTARG = raster, RIGHTARG = raster, PROCEDURE = raster_contained, + COMMUTATOR = '~', + RESTRICT = contsel, JOIN = contjoinsel + ); + +CREATE OPERATOR ~ ( + LEFTARG = raster, RIGHTARG = raster, PROCEDURE = raster_contain, + COMMUTATOR = '@', + RESTRICT = contsel, JOIN = contjoinsel + ); + +-- raster/geometry operators +CREATE OPERATOR ~ ( + LEFTARG = raster, RIGHTARG = geometry, PROCEDURE = raster_geometry_contain, + COMMUTATOR = '@', + RESTRICT = contsel, JOIN = contjoinsel + ); + +CREATE OPERATOR && ( + LEFTARG = raster, RIGHTARG = geometry, PROCEDURE = raster_geometry_overlap, + COMMUTATOR = '&&', + RESTRICT = contsel, JOIN = contjoinsel + ); + +-- geometry/raster operators +CREATE OPERATOR ~ ( + LEFTARG = geometry, RIGHTARG = raster, PROCEDURE = geometry_raster_contain, + COMMUTATOR = '@', + RESTRICT = contsel, JOIN = contjoinsel + ); + +CREATE OPERATOR && ( + LEFTARG = geometry, RIGHTARG = raster, PROCEDURE = geometry_raster_overlap, + COMMUTATOR = '&&', + RESTRICT = contsel, JOIN = contjoinsel + ); + +----------------------------------------------------------------------- +-- Raster/Raster Spatial Relationship +----------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION st_samealignment(rast1 raster, rast2 raster) + RETURNS boolean + AS 'MODULE_PATHNAME', 'RASTER_sameAlignment' + LANGUAGE 'c' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_samealignment( + ulx1 double precision, uly1 double precision, scalex1 double precision, scaley1 double precision, skewx1 double precision, skewy1 double precision, + ulx2 double precision, uly2 double precision, scalex2 double precision, scaley2 double precision, skewx2 double precision, skewy2 double precision +) + RETURNS boolean + AS $$ SELECT st_samealignment(st_makeemptyraster(1, 1, $1, $2, $3, $4, $5, $6), st_makeemptyraster(1, 1, $7, $8, $9, $10, $11, $12)) $$ + LANGUAGE 'sql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION _st_intersects(rast1 raster, nband1 integer, rast2 raster, nband2 integer) + RETURNS boolean + AS 'MODULE_PATHNAME', 'RASTER_intersects' + LANGUAGE 'c' IMMUTABLE STRICT + COST 1000; + +CREATE OR REPLACE FUNCTION st_intersects(rast1 raster, nband1 integer, rast2 raster, nband2 integer) + RETURNS boolean + AS $$ SELECT $1 && $3 AND CASE WHEN $2 IS NULL OR $4 IS NULL THEN TRUE ELSE _st_intersects($1, $2, $3, $4) END $$ + LANGUAGE 'sql' IMMUTABLE + COST 1000; + +CREATE OR REPLACE FUNCTION st_intersects(rast1 raster, rast2 raster) + RETURNS boolean + AS $$ SELECT st_intersects($1, NULL::integer, $2, NULL::integer) $$ + LANGUAGE 'sql' IMMUTABLE + COST 1000; + +----------------------------------------------------------------------- +-- Raster/Geometry Spatial Relationship +----------------------------------------------------------------------- + +CREATE OR REPLACE FUNCTION _st_intersects(rast raster, geom geometry, nband integer DEFAULT NULL) + RETURNS boolean + AS $$ + DECLARE + gr raster; + scale double precision; + BEGIN + IF ST_Intersects(geom, ST_ConvexHull(rast)) IS NOT TRUE THEN + RETURN FALSE; + ELSEIF nband IS NULL THEN + RETURN TRUE; + END IF; + + -- scale is set to 1/100th of raster for granularity + SELECT least(scalex, scaley) / 100. INTO scale FROM ST_Metadata(rast); + gr := _st_asraster(geom, scale, scale); + IF gr IS NULL THEN + RAISE EXCEPTION 'Unable to convert geometry to a raster'; + RETURN FALSE; + END IF; + + RETURN ST_Intersects(rast, nband, gr, 1); + END; + $$ LANGUAGE 'plpgsql' IMMUTABLE + COST 1000; + +CREATE OR REPLACE FUNCTION st_intersects(rast raster, geom geometry, nband integer DEFAULT NULL) + RETURNS boolean + AS $$ SELECT $1::geometry && $2 AND _st_intersects($1, $2, $3) $$ + LANGUAGE 'sql' IMMUTABLE + COST 1000; + +CREATE OR REPLACE FUNCTION st_intersects(rast raster, nband integer, geom geometry) + RETURNS boolean + AS $$ SELECT $1::geometry && $3 AND _st_intersects($1, $3, $2) $$ + LANGUAGE 'sql' IMMUTABLE + COST 1000; + +----------------------------------------------------------------------- +-- _st_intersects(geom geometry, rast raster, nband integer) +-- If band is provided, check for the presence of withvalue pixels in the area +-- shared by the raster and the geometry. If only nodata value pixels are found, the +-- geometry does not intersect with the raster. +----------------------------------------------------------------------- +-- This function can not be STRICT +CREATE OR REPLACE FUNCTION _st_intersects(geom geometry, rast raster, nband integer DEFAULT NULL) + RETURNS boolean AS $$ + DECLARE + hasnodata boolean := TRUE; + nodata float8 := 0.0; + convexhull geometry; + geomintersect geometry; + x1w double precision := 0.0; + x2w double precision := 0.0; + y1w double precision := 0.0; + y2w double precision := 0.0; + x1 integer := 0; + x2 integer := 0; + x3 integer := 0; + x4 integer := 0; + y1 integer := 0; + y2 integer := 0; + y3 integer := 0; + y4 integer := 0; + x integer := 0; + y integer := 0; + xinc integer := 0; + yinc integer := 0; + pixelval double precision; + bintersect boolean := FALSE; + gtype text; + scale float8; + w int; + h int; + BEGIN + convexhull := ST_ConvexHull(rast); + IF nband IS NOT NULL THEN + SELECT CASE WHEN bmd.nodatavalue IS NULL THEN FALSE ELSE NULL END INTO hasnodata FROM ST_BandMetaData(rast, nband) AS bmd; + END IF; + + IF ST_Intersects(geom, convexhull) IS NOT TRUE THEN + RETURN FALSE; + ELSEIF nband IS NULL OR hasnodata IS FALSE THEN + RETURN TRUE; + END IF; + + -- Get the intersection between with the geometry. + -- We will search for withvalue pixel only in this area. + geomintersect := st_intersection(geom, convexhull); + +--RAISE NOTICE 'geomintersect=%', st_astext(geomintersect); + + -- If the intersection is empty, return false + IF st_isempty(geomintersect) THEN + RETURN FALSE; + END IF; + + -- We create a minimalistic buffer around the intersection in order to scan every pixels + -- that would touch the edge or intersect with the geometry + SELECT sqrt(scalex * scalex + skewy * skewy), width, height INTO scale, w, h FROM ST_Metadata(rast); + IF scale != 0 THEN + geomintersect := st_buffer(geomintersect, scale / 1000000); + END IF; + +--RAISE NOTICE 'geomintersect2=%', st_astext(geomintersect); + + -- Find the world coordinates of the bounding box of the intersecting area + x1w := st_xmin(geomintersect); + y1w := st_ymin(geomintersect); + x2w := st_xmax(geomintersect); + y2w := st_ymax(geomintersect); + nodata := st_bandnodatavalue(rast, nband); + +--RAISE NOTICE 'x1w=%, y1w=%, x2w=%, y2w=%', x1w, y1w, x2w, y2w; + + -- Convert world coordinates to raster coordinates + x1 := st_world2rastercoordx(rast, x1w, y1w); + y1 := st_world2rastercoordy(rast, x1w, y1w); + x2 := st_world2rastercoordx(rast, x2w, y1w); + y2 := st_world2rastercoordy(rast, x2w, y1w); + x3 := st_world2rastercoordx(rast, x1w, y2w); + y3 := st_world2rastercoordy(rast, x1w, y2w); + x4 := st_world2rastercoordx(rast, x2w, y2w); + y4 := st_world2rastercoordy(rast, x2w, y2w); + +--RAISE NOTICE 'x1=%, y1=%, x2=%, y2=%, x3=%, y3=%, x4=%, y4=%', x1, y1, x2, y2, x3, y3, x4, y4; + + -- Order the raster coordinates for the upcoming FOR loop. + x1 := int4smaller(int4smaller(int4smaller(x1, x2), x3), x4); + y1 := int4smaller(int4smaller(int4smaller(y1, y2), y3), y4); + x2 := int4larger(int4larger(int4larger(x1, x2), x3), x4); + y2 := int4larger(int4larger(int4larger(y1, y2), y3), y4); + + -- Make sure the range is not lower than 1. + -- This can happen when world coordinate are exactly on the left border + -- of the raster and that they do not span on more than one pixel. + x1 := int4smaller(int4larger(x1, 1), w); + y1 := int4smaller(int4larger(y1, 1), h); + + -- Also make sure the range does not exceed the width and height of the raster. + -- This can happen when world coordinate are exactly on the lower right border + -- of the raster. + x2 := int4smaller(x2, w); + y2 := int4smaller(y2, h); + +--RAISE NOTICE 'x1=%, y1=%, x2=%, y2=%', x1, y1, x2, y2; + + -- Search exhaustively for withvalue pixel on a moving 3x3 grid + -- (very often more efficient than searching on a mere 1x1 grid) + FOR xinc in 0..2 LOOP + FOR yinc in 0..2 LOOP + FOR x IN x1+xinc..x2 BY 3 LOOP + FOR y IN y1+yinc..y2 BY 3 LOOP + -- Check first if the pixel intersects with the geometry. Often many won't. + bintersect := NOT st_isempty(st_intersection(st_pixelaspolygon(rast, x, y), geom)); + + IF bintersect THEN + -- If the pixel really intersects, check its value. Return TRUE if with value. + pixelval := st_value(rast, nband, x, y); + IF pixelval != nodata THEN + RETURN TRUE; + END IF; + END IF; + END LOOP; + END LOOP; + END LOOP; + END LOOP; + + RETURN FALSE; + END; + $$ LANGUAGE 'plpgsql' IMMUTABLE + COST 1000; + +-- This function can not be STRICT +CREATE OR REPLACE FUNCTION st_intersects(geom geometry, rast raster, nband integer DEFAULT NULL) + RETURNS boolean AS + $$ SELECT $1 && $2::geometry AND _st_intersects($1, $2, $3); $$ + LANGUAGE 'sql' IMMUTABLE + COST 1000; + +----------------------------------------------------------------------- +-- ST_Intersection (geometry, raster in vector space) +----------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION st_intersection(geomin geometry, rast raster, band integer DEFAULT 1) + RETURNS SETOF geomval AS $$ + DECLARE + intersects boolean := FALSE; + BEGIN + intersects := ST_Intersects(geomin, rast, band); + IF intersects THEN + -- Return the intersections of the geometry with the vectorized parts of + -- the raster and the values associated with those parts, if really their + -- intersection is not empty. + RETURN QUERY + SELECT + intgeom, + val + FROM ( + SELECT + ST_Intersection((gv).geom, geomin) AS intgeom, + (gv).val + FROM ST_DumpAsPolygons(rast, band) gv + WHERE ST_Intersects((gv).geom, geomin) + ) foo + WHERE NOT ST_IsEmpty(intgeom); + ELSE + -- If the geometry does not intersect with the raster, return an empty + -- geometry and a null value + RETURN QUERY + SELECT + emptygeom, + NULL::float8 + FROM ST_GeomCollFromText('GEOMETRYCOLLECTION EMPTY', ST_SRID($1)) emptygeom; + END IF; + END; + $$ + LANGUAGE 'plpgsql' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION st_intersection(rast raster, band integer, geomin geometry) + RETURNS SETOF geomval AS + $$ SELECT st_intersection($3, $1, $2) $$ + LANGUAGE 'sql' STABLE; + +CREATE OR REPLACE FUNCTION st_intersection(rast raster, geomin geometry) + RETURNS SETOF geomval AS + $$ SELECT st_intersection($2, $1, 1) $$ + LANGUAGE 'sql' STABLE; + +----------------------------------------------------------------------- +-- ST_Intersection (2-raster in raster space) +----------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION st_intersection( + rast1 raster, band1 int, + rast2 raster, band2 int, + returnband text DEFAULT 'BOTH', + nodataval double precision[] DEFAULT NULL +) + RETURNS raster + AS $$ + DECLARE + rtn raster; + _returnband text; + newnodata1 float8; + newnodata2 float8; + BEGIN + newnodata1 := coalesce(nodataval[1], ST_BandNodataValue(rast1, band1), ST_MinPossibleValue(ST_BandPixelType(rast1, band1))); + newnodata2 := coalesce(nodataval[2], ST_BandNodataValue(rast2, band2), ST_MinPossibleValue(ST_BandPixelType(rast2, band2))); + + _returnband := upper(returnband); + + rtn := NULL; + CASE + WHEN _returnband = 'BAND1' THEN + rtn := ST_MapAlgebraExpr(rast1, band1, rast2, band2, '[rast1.val]', ST_BandPixelType(rast1, band1), 'INTERSECTION', newnodata1::text, newnodata1::text, newnodata1); + rtn := ST_SetBandNodataValue(rtn, 1, newnodata1); + WHEN _returnband = 'BAND2' THEN + rtn := ST_MapAlgebraExpr(rast1, band1, rast2, band2, '[rast2.val]', ST_BandPixelType(rast2, band2), 'INTERSECTION', newnodata2::text, newnodata2::text, newnodata2); + rtn := ST_SetBandNodataValue(rtn, 1, newnodata2); + WHEN _returnband = 'BOTH' THEN + rtn := ST_MapAlgebraExpr(rast1, band1, rast2, band2, '[rast1.val]', ST_BandPixelType(rast1, band1), 'INTERSECTION', newnodata1::text, newnodata1::text, newnodata1); + rtn := ST_SetBandNodataValue(rtn, 1, newnodata1); + rtn := ST_AddBand(rtn, ST_MapAlgebraExpr(rast1, band1, rast2, band2, '[rast2.val]', ST_BandPixelType(rast2, band2), 'INTERSECTION', newnodata2::text, newnodata2::text, newnodata2)); + rtn := ST_SetBandNodataValue(rtn, 2, newnodata2); + ELSE + RAISE EXCEPTION 'Unknown value provided for returnband: %', returnband; + RETURN NULL; + END CASE; + + RETURN rtn; + END; + $$ LANGUAGE 'plpgsql' STABLE; + +CREATE OR REPLACE FUNCTION st_intersection( + rast1 raster, band1 int, + rast2 raster, band2 int, + returnband text, + nodataval double precision +) + RETURNS raster AS + $$ SELECT st_intersection($1, $2, $3, $4, $5, ARRAY[$6, $6]) $$ + LANGUAGE 'sql' STABLE; + +CREATE OR REPLACE FUNCTION st_intersection( + rast1 raster, band1 int, + rast2 raster, band2 int, + nodataval double precision[] +) + RETURNS raster AS + $$ SELECT st_intersection($1, $2, $3, $4, 'BOTH', $5) $$ + LANGUAGE 'sql' STABLE; + +CREATE OR REPLACE FUNCTION st_intersection( + rast1 raster, band1 int, + rast2 raster, band2 int, + nodataval double precision +) + RETURNS raster AS + $$ SELECT st_intersection($1, $2, $3, $4, 'BOTH', ARRAY[$5, $5]) $$ + LANGUAGE 'sql' STABLE; + +-- Variants without band number +CREATE OR REPLACE FUNCTION st_intersection( + rast1 raster, + rast2 raster, + returnband text DEFAULT 'BOTH', + nodataval double precision[] DEFAULT NULL +) + RETURNS raster AS + $$ SELECT st_intersection($1, 1, $2, 1, $3, $4) $$ + LANGUAGE 'sql' STABLE; + +CREATE OR REPLACE FUNCTION st_intersection( + rast1 raster, + rast2 raster, + returnband text, + nodataval double precision +) + RETURNS raster AS + $$ SELECT st_intersection($1, 1, $2, 1, $3, ARRAY[$4, $4]) $$ + LANGUAGE 'sql' STABLE; + +CREATE OR REPLACE FUNCTION st_intersection( + rast1 raster, + rast2 raster, + nodataval double precision[] +) + RETURNS raster AS + $$ SELECT st_intersection($1, 1, $2, 1, 'BOTH', $3) $$ + LANGUAGE 'sql' STABLE; + +CREATE OR REPLACE FUNCTION st_intersection( + rast1 raster, + rast2 raster, + nodataval double precision +) + RETURNS raster AS + $$ SELECT st_intersection($1, 1, $2, 1, 'BOTH', ARRAY[$3, $3]) $$ + LANGUAGE 'sql' STABLE; + +----------------------------------------------------------------------- +-- st_union aggregate +----------------------------------------------------------------------- +-- Main state function +CREATE OR REPLACE FUNCTION _ST_MapAlgebra4UnionState(rast1 raster, rast2 raster, p_expression text, p_nodata1expr text, p_nodata2expr text, p_nodatanodataval double precision,t_expression text,t_nodata1expr text, t_nodata2expr text,t_nodatanodataval double precision) + RETURNS raster AS + $$ + DECLARE + t_raster raster; + p_raster raster; + BEGIN + -- With the new ST_MapAlgebraExpr we must split the main expression in three expressions: expression, nodata1expr, nodata2expr and a nodatanodataval + -- ST_MapAlgebraExpr(rast1 raster, band1 integer, rast2 raster, band2 integer, expression text, pixeltype text, extentexpr text, nodata1expr text, nodata2expr text, nodatanodatadaval double precision) + -- We must make sure that when NULL is passed as the first raster to ST_MapAlgebraExpr, ST_MapAlgebraExpr resolve the nodata1expr + -- Note: rast2 is always a single band raster since it is the accumulated raster thus far + -- There we always set that to band 1 regardless of what band num is requested + IF upper(p_expression) = 'LAST' THEN + --RAISE NOTICE 'last asked for '; + RETURN ST_MapAlgebraExpr(rast1, 1, rast2, 1, '[rast2.val]'::text, NULL::text, 'UNION'::text, '[rast2.val]'::text, '[rast1.val]'::text, NULL::double precision); + ELSIF upper(p_expression) = 'FIRST' THEN + RETURN ST_MapAlgebraExpr(rast1, 1, rast2, 1, '[rast1.val]'::text, NULL::text, 'UNION'::text, '[rast2.val]'::text, '[rast1.val]'::text, NULL::double precision); + ELSIF upper(p_expression) = 'MIN' THEN + RETURN ST_MapAlgebraExpr(rast1, 1, rast2, 1, 'LEAST([rast1.val], [rast2.val])'::text, NULL::text, 'UNION'::text, '[rast2.val]'::text, '[rast1.val]'::text, NULL::double precision); + ELSIF upper(p_expression) = 'MAX' THEN + RETURN ST_MapAlgebraExpr(rast1, 1, rast2, 1, 'GREATEST([rast1.val], [rast2.val])'::text, NULL::text, 'UNION'::text, '[rast2.val]'::text, '[rast1.val]'::text, NULL::double precision); + ELSIF upper(p_expression) = 'COUNT' THEN + RETURN ST_MapAlgebraExpr(rast1, 1, rast2, 1, '[rast1.val] + 1'::text, NULL::text, 'UNION'::text, '1'::text, '[rast1.val]'::text, 0::double precision); + ELSIF upper(p_expression) = 'SUM' THEN + RETURN ST_MapAlgebraExpr(rast1, 1, rast2, 1, '[rast1.val] + [rast2.val]'::text, NULL::text, 'UNION'::text, '[rast2.val]'::text, '[rast1.val]'::text, NULL::double precision); + ELSIF upper(p_expression) = 'RANGE' THEN + -- have no idea what this is + t_raster = ST_MapAlgebraExpr(rast1, 2, rast2, 1, 'LEAST([rast1.val], [rast2.val])'::text, NULL::text, 'UNION'::text, '[rast2.val]'::text, '[rast1.val]'::text, NULL::double precision); + p_raster := _ST_MapAlgebra4UnionState(rast1, rast2, 'MAX'::text, NULL::text, NULL::text, NULL::double precision, NULL::text, NULL::text, NULL::text, NULL::double precision); + RETURN ST_AddBand(p_raster, t_raster, 1, 2); + ELSIF upper(p_expression) = 'MEAN' THEN + -- looks like t_raster is used to keep track of accumulated count + -- and p_raster is there to keep track of accumulated sum and final state function + -- would then do a final map to divide them. This one is currently broken because + -- have not reworked it so it can do without a final function + t_raster = ST_MapAlgebraExpr(rast1, 2, rast2, 1, '[rast1.val] + 1'::text, NULL::text, 'UNION'::text, '1'::text, '[rast1.val]'::text, 0::double precision); + p_raster := _ST_MapAlgebra4UnionState(rast1, rast2, 'SUM'::text, NULL::text, NULL::text, NULL::double precision, NULL::text, NULL::text, NULL::text, NULL::double precision); + RETURN ST_AddBand(p_raster, t_raster, 1, 2); + ELSE + IF t_expression NOTNULL AND t_expression != '' THEN + t_raster = ST_MapAlgebraExpr(rast1, 2, rast2, 1, t_expression, NULL::text, 'UNION'::text, t_nodata1expr, t_nodata2expr, t_nodatanodataval::double precision); + p_raster = ST_MapAlgebraExpr(rast1, 1, rast2, 1, p_expression, NULL::text, 'UNION'::text, p_nodata1expr, p_nodata2expr, p_nodatanodataval::double precision); + RETURN ST_AddBand(p_raster, t_raster, 1, 2); + END IF; + RETURN ST_MapAlgebraExpr(rast1, 1, rast2, 1, p_expression, NULL, 'UNION'::text, NULL::text, NULL::text, NULL::double precision); + END IF; + END; + $$ + LANGUAGE 'plpgsql'; + +-- State function when there is a primary expression, band number and no alternative nodata expressions +CREATE OR REPLACE FUNCTION _ST_MapAlgebra4UnionState(rast1 raster,rast2 raster,bandnum integer, p_expression text) + RETURNS raster + AS $$ + SELECT _ST_MapAlgebra4UnionState($1, ST_Band($2,$3), $4, NULL, NULL, NULL, NULL, NULL, NULL, NULL) + $$ LANGUAGE 'sql'; + +-- State function when there is no expressions but allows specifying band +CREATE OR REPLACE FUNCTION _ST_MapAlgebra4UnionState(rast1 raster,rast2 raster, bandnum integer) + RETURNS raster + AS $$ + SELECT _ST_MapAlgebra4UnionState($1,ST_Band($2,$3), 'LAST', NULL, NULL, NULL, NULL, NULL, NULL, NULL) + $$ LANGUAGE 'sql'; + +-- State function when there is no expressions and assumes band 1 +CREATE OR REPLACE FUNCTION _ST_MapAlgebra4UnionState(rast1 raster,rast2 raster) + RETURNS raster + AS $$ + SELECT _ST_MapAlgebra4UnionState($1,$2, 'LAST', NULL, NULL, NULL, NULL, NULL, NULL, NULL) + $$ LANGUAGE 'sql'; + +-- State function when there isan expressions and assumes band 1 +CREATE OR REPLACE FUNCTION _ST_MapAlgebra4UnionState(rast1 raster,rast2 raster, p_expression text) + RETURNS raster + AS $$ + SELECT _ST_MapAlgebra4UnionState($1,$2, $3, NULL, NULL, NULL, NULL, NULL, NULL, NULL) + $$ LANGUAGE 'sql'; + +-- Final function with only the primary expression +CREATE OR REPLACE FUNCTION _ST_MapAlgebra4UnionFinal1(rast raster) + RETURNS raster AS + $$ + DECLARE + BEGIN + -- NOTE: I have to sacrifice RANGE. Sorry RANGE. Any 2 banded raster is going to be treated + -- as a MEAN + IF ST_NumBands(rast) = 2 THEN + RETURN ST_MapAlgebraExpr(rast, 1, rast, 2, 'CASE WHEN [rast2.val] > 0 THEN [rast1.val] / [rast2.val]::float8 ELSE NULL END'::text, NULL::text, 'UNION'::text, NULL::text, NULL::text, NULL::double precision); + ELSE + RETURN rast; + END IF; + END; + $$ + LANGUAGE 'plpgsql'; + +-- Variant with primary expression defaulting to 'LAST' and working on first band +CREATE AGGREGATE ST_Union(raster) ( + SFUNC = _ST_MapAlgebra4UnionState, + STYPE = raster, + FINALFUNC = _ST_MapAlgebra4UnionFinal1 +); + +-- Variant with primary expression defaulting to 'LAST' and working on specified band +CREATE AGGREGATE ST_Union(raster, integer) ( + SFUNC = _ST_MapAlgebra4UnionState, + STYPE = raster, + FINALFUNC = _ST_MapAlgebra4UnionFinal1 +); + +-- Variant with simple primary expressions but without alternative nodata, temporary and final expressions +-- and working on first band +-- supports LAST, MIN,MAX,MEAN,FIRST,SUM +CREATE AGGREGATE ST_Union(raster, text) ( + SFUNC = _ST_MapAlgebra4UnionState, + STYPE = raster, + FINALFUNC = _ST_MapAlgebra4UnionFinal1 +); + +CREATE AGGREGATE ST_Union(raster, integer, text) ( + SFUNC = _ST_MapAlgebra4UnionState, + STYPE = raster, + FINALFUNC = _ST_MapAlgebra4UnionFinal1 +); + +------------------------------------------------------------------- +-- ST_Clip(rast raster, band int, geom geometry, nodata float8 DEFAULT null, crop boolean DEFAULT true) +-- Clip the values of a raster to the shape of a polygon. +-- +-- rast - raster to be clipped +-- band - limit the result to only one band +-- geom - geometry defining the shape to clip the raster +-- nodata - define (if there is none defined) or replace the raster nodata value with this value +-- crop - limit the extent of the result to the extent of the geometry +----------------------------------------------------------------------- +-- ST_Clip +----------------------------------------------------------------------- +-- nodataval as array series + +-- Major variant +CREATE OR REPLACE FUNCTION st_clip(rast raster, band int, geom geometry, nodataval double precision[] DEFAULT NULL, crop boolean DEFAULT TRUE) + RETURNS raster + AS $$ + DECLARE + newrast raster; + geomrast raster; + numband int; + bandstart int; + bandend int; + newextent text; + newnodataval double precision; + newpixtype text; + bandi int; + BEGIN + IF rast IS NULL THEN + RETURN NULL; + END IF; + IF geom IS NULL THEN + RETURN rast; + END IF; + numband := ST_Numbands(rast); + IF band IS NULL THEN + bandstart := 1; + bandend := numband; + ELSEIF ST_HasNoBand(rast, band) THEN + RAISE NOTICE 'Raster do not have band %. Returning null', band; + RETURN NULL; + ELSE + bandstart := band; + bandend := band; + END IF; + + newpixtype := ST_BandPixelType(rast, bandstart); + newnodataval := coalesce(nodataval[1], ST_BandNodataValue(rast, bandstart), ST_MinPossibleValue(newpixtype)); + newextent := CASE WHEN crop THEN 'INTERSECTION' ELSE 'FIRST' END; + + -- Convert the geometry to a raster + geomrast := ST_AsRaster(geom, rast, ST_BandPixelType(rast, band), 1, newnodataval); + + -- Compute the first raster band + newrast := ST_MapAlgebraExpr(rast, bandstart, geomrast, 1, '[rast1.val]', newpixtype, newextent, newnodataval::text, newnodataval::text, newnodataval); + -- Set the newnodataval + newrast := ST_SetBandNodataValue(newrast, bandstart, newnodataval); + + FOR bandi IN bandstart+1..bandend LOOP + -- for each band we must determine the nodata value + newpixtype := ST_BandPixelType(rast, bandi); + newnodataval := coalesce(nodataval[bandi], nodataval[array_upper(nodataval, 1)], ST_BandNodataValue(rast, bandi), ST_MinPossibleValue(newpixtype)); + newrast := ST_AddBand(newrast, ST_MapAlgebraExpr(rast, bandi, geomrast, 1, '[rast1.val]', newpixtype, newextent, newnodataval::text, newnodataval::text, newnodataval)); + newrast := ST_SetBandNodataValue(newrast, bandi, newnodataval); + END LOOP; + + RETURN newrast; + END; + $$ LANGUAGE 'plpgsql' STABLE; + +-- Nodata values as integer series +CREATE OR REPLACE FUNCTION st_clip(rast raster, band int, geom geometry, nodataval double precision, crop boolean DEFAULT TRUE) + RETURNS raster AS + $$ SELECT ST_Clip($1, $2, $3, ARRAY[$4], $5) $$ + LANGUAGE 'sql' STABLE; + +-- Variant defaulting nodataval to the one of the raster or the min possible value +CREATE OR REPLACE FUNCTION st_clip(rast raster, band int, geom geometry, crop boolean) + RETURNS raster AS + $$ SELECT ST_Clip($1, $2, $3, null::float8[], $4) $$ + LANGUAGE 'sql' STABLE; + +-- Variant defaulting to all bands +CREATE OR REPLACE FUNCTION st_clip(rast raster, geom geometry, nodataval double precision[] DEFAULT NULL, crop boolean DEFAULT TRUE) + RETURNS raster AS + $$ SELECT ST_Clip($1, NULL, $2, $3, $4) $$ + LANGUAGE 'sql' STABLE; + +-- Variant defaulting to all bands +CREATE OR REPLACE FUNCTION st_clip(rast raster, geom geometry, nodataval double precision, crop boolean DEFAULT TRUE) + RETURNS raster AS + $$ SELECT ST_Clip($1, NULL, $2, ARRAY[$3], $4) $$ + LANGUAGE 'sql' STABLE; + +-- Variant defaulting nodataval to the one of the raster or the min possible value and returning all bands +CREATE OR REPLACE FUNCTION st_clip(rast raster, geom geometry, crop boolean) + RETURNS raster AS + $$ SELECT ST_Clip($1, NULL, $2, null::float8[], $3) $$ + LANGUAGE 'sql' STABLE; + +------------------------------------------------------------------------------ +-- raster constraint functions +------------------------------------------------------------------------------- + +CREATE OR REPLACE FUNCTION _add_raster_constraint(cn name, sql text) + RETURNS boolean AS $$ + BEGIN + BEGIN + EXECUTE sql; + EXCEPTION + WHEN duplicate_object THEN + RAISE NOTICE 'The constraint "%" already exists. To replace the existing constraint, delete the constraint and call ApplyRasterConstraints again', cn; + WHEN OTHERS THEN + RAISE NOTICE 'Unable to add constraint "%"', cn; + RETURN FALSE; + END; + + RETURN TRUE; + END; + $$ LANGUAGE 'plpgsql' VOLATILE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION _drop_raster_constraint(rastschema name, rasttable name, cn name) + RETURNS boolean AS $$ + DECLARE + fqtn text; + BEGIN + fqtn := ''; + IF length($1) > 0 THEN + fqtn := quote_ident($1) || '.'; + END IF; + fqtn := fqtn || quote_ident($2); + + BEGIN + EXECUTE 'ALTER TABLE ' + || fqtn + || ' DROP CONSTRAINT ' + || quote_ident(cn); + RETURN TRUE; + EXCEPTION + WHEN undefined_object THEN + RAISE NOTICE 'The constraint "%" does not exist. Skipping', cn; + WHEN OTHERS THEN + RAISE NOTICE 'Unable to drop constraint "%"', cn; + RETURN FALSE; + END; + + RETURN TRUE; + END; + $$ LANGUAGE 'plpgsql' VOLATILE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION _raster_constraint_info_srid(rastschema name, rasttable name, rastcolumn name) + RETURNS integer AS $$ + SELECT + replace(replace(split_part(s.consrc, ' = ', 2), ')', ''), '(', '')::integer + FROM pg_class c, pg_namespace n, pg_attribute a, pg_constraint s + WHERE n.nspname = $1 + AND c.relname = $2 + AND a.attname = $3 + AND a.attrelid = c.oid + AND s.connamespace = n.oid + AND s.conrelid = c.oid + AND a.attnum = ANY (s.conkey) + AND s.consrc LIKE '%st_srid(% = %'; + $$ LANGUAGE sql STABLE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION _add_raster_constraint_srid(rastschema name, rasttable name, rastcolumn name) + RETURNS boolean AS $$ + DECLARE + fqtn text; + cn name; + sql text; + attr int; + BEGIN + fqtn := ''; + IF length($1) > 0 THEN + fqtn := quote_ident($1) || '.'; + END IF; + fqtn := fqtn || quote_ident($2); + + cn := 'enforce_srid_' || $3; + + sql := 'SELECT st_srid(' + || quote_ident($3) + || ') FROM ' || fqtn + || ' LIMIT 1'; + BEGIN + EXECUTE sql INTO attr; + EXCEPTION WHEN OTHERS THEN + RAISE NOTICE 'Unable to get the SRID of a sample raster'; + RETURN FALSE; + END; + + sql := 'ALTER TABLE ' || fqtn + || ' ADD CONSTRAINT ' || quote_ident(cn) + || ' CHECK (st_srid(' + || quote_ident($3) + || ') = ' || attr || ')'; + + RETURN _add_raster_constraint(cn, sql); + END; + $$ LANGUAGE 'plpgsql' VOLATILE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION _drop_raster_constraint_srid(rastschema name, rasttable name, rastcolumn name) + RETURNS boolean AS + $$ SELECT _drop_raster_constraint($1, $2, 'enforce_srid_' || $3) $$ + LANGUAGE 'sql' VOLATILE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION _raster_constraint_info_scale(rastschema name, rasttable name, rastcolumn name, axis char) + RETURNS double precision AS $$ + SELECT + replace(replace(split_part(split_part(s.consrc, ' = ', 2), '::', 1), ')', ''), '(', '')::double precision + FROM pg_class c, pg_namespace n, pg_attribute a, pg_constraint s + WHERE n.nspname = $1 + AND c.relname = $2 + AND a.attname = $3 + AND a.attrelid = c.oid + AND s.connamespace = n.oid + AND s.conrelid = c.oid + AND a.attnum = ANY (s.conkey) + AND s.consrc LIKE '%st_scale' || $4 || '(% = %'; + $$ LANGUAGE sql STABLE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION _add_raster_constraint_scale(rastschema name, rasttable name, rastcolumn name, axis char) + RETURNS boolean AS $$ + DECLARE + fqtn text; + cn name; + sql text; + attr double precision; + BEGIN + IF lower($4) != 'x' AND lower($4) != 'y' THEN + RAISE EXCEPTION 'axis must be either "x" or "y"'; + RETURN FALSE; + END IF; + + fqtn := ''; + IF length($1) > 0 THEN + fqtn := quote_ident($1) || '.'; + END IF; + fqtn := fqtn || quote_ident($2); + + cn := 'enforce_scale' || $4 || '_' || $3; + + sql := 'SELECT st_scale' || $4 || '(' + || quote_ident($3) + || ') FROM ' + || fqtn + || ' LIMIT 1'; + BEGIN + EXECUTE sql INTO attr; + EXCEPTION WHEN OTHERS THEN + RAISE NOTICE 'Unable to get the %-scale of a sample raster', upper($4); + RETURN FALSE; + END; + + sql := 'ALTER TABLE ' || fqtn + || ' ADD CONSTRAINT ' || quote_ident(cn) + || ' CHECK (st_scale' || $4 || '(' + || quote_ident($3) + || ')::numeric(16,10) = (' || attr || ')::numeric(16,10))'; + RETURN _add_raster_constraint(cn, sql); + END; + $$ LANGUAGE 'plpgsql' VOLATILE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION _drop_raster_constraint_scale(rastschema name, rasttable name, rastcolumn name, axis char) + RETURNS boolean AS $$ + BEGIN + IF lower($4) != 'x' AND lower($4) != 'y' THEN + RAISE EXCEPTION 'axis must be either "x" or "y"'; + RETURN FALSE; + END IF; + + RETURN _drop_raster_constraint($1, $2, 'enforce_scale' || $4 || '_' || $3); + END; + $$ LANGUAGE 'plpgsql' VOLATILE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION _raster_constraint_info_blocksize(rastschema name, rasttable name, rastcolumn name, axis text) + RETURNS integer AS $$ + SELECT + replace(replace(split_part(s.consrc, ' = ', 2), ')', ''), '(', '')::integer + FROM pg_class c, pg_namespace n, pg_attribute a, pg_constraint s + WHERE n.nspname = $1 + AND c.relname = $2 + AND a.attname = $3 + AND a.attrelid = c.oid + AND s.connamespace = n.oid + AND s.conrelid = c.oid + AND a.attnum = ANY (s.conkey) + AND s.consrc LIKE '%st_' || $4 || '(% = %'; + $$ LANGUAGE sql STABLE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION _add_raster_constraint_blocksize(rastschema name, rasttable name, rastcolumn name, axis text) + RETURNS boolean AS $$ + DECLARE + fqtn text; + cn name; + sql text; + attr int; + BEGIN + IF lower($4) != 'width' AND lower($4) != 'height' THEN + RAISE EXCEPTION 'axis must be either "width" or "height"'; + RETURN FALSE; + END IF; + + fqtn := ''; + IF length($1) > 0 THEN + fqtn := quote_ident($1) || '.'; + END IF; + fqtn := fqtn || quote_ident($2); + + cn := 'enforce_' || $4 || '_' || $3; + + sql := 'SELECT st_' || $4 || '(' + || quote_ident($3) + || ') FROM ' || fqtn + || ' LIMIT 1'; + BEGIN + EXECUTE sql INTO attr; + EXCEPTION WHEN OTHERS THEN + RAISE NOTICE 'Unable to get the % of a sample raster', $4; + RETURN FALSE; + END; + + sql := 'ALTER TABLE ' || fqtn + || ' ADD CONSTRAINT ' || quote_ident(cn) + || ' CHECK (st_' || $4 || '(' + || quote_ident($3) + || ') = ' || attr || ')'; + RETURN _add_raster_constraint(cn, sql); + END; + $$ LANGUAGE 'plpgsql' VOLATILE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION _drop_raster_constraint_blocksize(rastschema name, rasttable name, rastcolumn name, axis text) + RETURNS boolean AS $$ + BEGIN + IF lower($4) != 'width' AND lower($4) != 'height' THEN + RAISE EXCEPTION 'axis must be either "width" or "height"'; + RETURN FALSE; + END IF; + + RETURN _drop_raster_constraint($1, $2, 'enforce_' || $4 || '_' || $3); + END; + $$ LANGUAGE 'plpgsql' VOLATILE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION _raster_constraint_info_extent(rastschema name, rasttable name, rastcolumn name) + RETURNS geometry AS $$ + SELECT + trim(both '''' from split_part(trim(split_part(s.consrc, ',', 2)), '::', 1))::geometry + FROM pg_class c, pg_namespace n, pg_attribute a, pg_constraint s + WHERE n.nspname = $1 + AND c.relname = $2 + AND a.attname = $3 + AND a.attrelid = c.oid + AND s.connamespace = n.oid + AND s.conrelid = c.oid + AND a.attnum = ANY (s.conkey) + AND s.consrc LIKE '%st_coveredby(st_convexhull(%'; + $$ LANGUAGE sql STABLE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION _add_raster_constraint_extent(rastschema name, rasttable name, rastcolumn name) + RETURNS boolean AS $$ + DECLARE + fqtn text; + cn name; + sql text; + attr text; + BEGIN + fqtn := ''; + IF length($1) > 0 THEN + fqtn := quote_ident($1) || '.'; + END IF; + fqtn := fqtn || quote_ident($2); + + cn := 'enforce_max_extent_' || $3; + + sql := 'SELECT st_ashexewkb(st_convexhull(st_collect(st_convexhull(' + || quote_ident($3) + || ')))) FROM ' + || fqtn; + BEGIN + EXECUTE sql INTO attr; + EXCEPTION WHEN OTHERS THEN + RAISE NOTICE 'Unable to get the extent of a sample raster'; + RETURN FALSE; + END; + + sql := 'ALTER TABLE ' || fqtn + || ' ADD CONSTRAINT ' || quote_ident(cn) + || ' CHECK (st_coveredby(st_convexhull(' + || quote_ident($3) + || '), ''' || attr || '''::geometry))'; + RETURN _add_raster_constraint(cn, sql); + END; + $$ LANGUAGE 'plpgsql' VOLATILE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION _drop_raster_constraint_extent(rastschema name, rasttable name, rastcolumn name) + RETURNS boolean AS + $$ SELECT _drop_raster_constraint($1, $2, 'enforce_max_extent_' || $3) $$ + LANGUAGE 'sql' VOLATILE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION _raster_constraint_info_alignment(rastschema name, rasttable name, rastcolumn name) + RETURNS boolean AS $$ + SELECT + TRUE + FROM pg_class c, pg_namespace n, pg_attribute a, pg_constraint s + WHERE n.nspname = $1 + AND c.relname = $2 + AND a.attname = $3 + AND a.attrelid = c.oid + AND s.connamespace = n.oid + AND s.conrelid = c.oid + AND a.attnum = ANY (s.conkey) + AND s.consrc LIKE '%st_samealignment(%'; + $$ LANGUAGE sql STABLE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION _add_raster_constraint_alignment(rastschema name, rasttable name, rastcolumn name) + RETURNS boolean AS $$ + DECLARE + fqtn text; + cn name; + sql text; + attr text; + BEGIN + fqtn := ''; + IF length($1) > 0 THEN + fqtn := quote_ident($1) || '.'; + END IF; + fqtn := fqtn || quote_ident($2); + + cn := 'enforce_same_alignment_' || $3; + + sql := 'SELECT st_makeemptyraster(1, 1, upperleftx, upperlefty, scalex, scaley, skewx, skewy, srid) FROM st_metadata((SELECT ' + || quote_ident($3) + || ' FROM ' || fqtn || ' LIMIT 1))'; + BEGIN + EXECUTE sql INTO attr; + EXCEPTION WHEN OTHERS THEN + RAISE NOTICE 'Unable to get the alignment of a sample raster'; + RETURN FALSE; + END; + + sql := 'ALTER TABLE ' || fqtn || + ' ADD CONSTRAINT ' || quote_ident(cn) || + ' CHECK (st_samealignment(' || quote_ident($3) || ', ''' || attr || '''::raster))'; + RETURN _add_raster_constraint(cn, sql); + END; + $$ LANGUAGE 'plpgsql' VOLATILE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION _drop_raster_constraint_alignment(rastschema name, rasttable name, rastcolumn name) + RETURNS boolean AS + $$ SELECT _drop_raster_constraint($1, $2, 'enforce_same_alignment_' || $3) $$ + LANGUAGE 'sql' VOLATILE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION _raster_constraint_info_regular_blocking(rastschema name, rasttable name, rastcolumn name) + RETURNS boolean + AS $$ + DECLARE + cn text; + sql text; + rtn boolean; + BEGIN + cn := 'enforce_regular_blocking_' || $3; + + sql := 'SELECT TRUE FROM pg_class c, pg_namespace n, pg_constraint s' + || ' WHERE n.nspname = ' || quote_literal($1) + || ' AND c.relname = ' || quote_literal($2) + || ' AND s.connamespace = n.oid AND s.conrelid = c.oid' + || ' AND s.conname = ' || quote_literal(cn); + EXECUTE sql INTO rtn; + RETURN rtn; + END; + $$ LANGUAGE 'plpgsql' STABLE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION _add_raster_constraint_regular_blocking(rastschema name, rasttable name, rastcolumn name) + RETURNS boolean AS $$ + DECLARE + fqtn text; + cn name; + sql text; + BEGIN + + RAISE INFO 'The regular_blocking constraint is just a flag indicating that the column "%" is regularly blocked. It is up to the end-user to ensure that the column is truely regularly blocked.', quote_ident($3); + + fqtn := ''; + IF length($1) > 0 THEN + fqtn := quote_ident($1) || '.'; + END IF; + fqtn := fqtn || quote_ident($2); + + cn := 'enforce_regular_blocking_' || $3; + + sql := 'ALTER TABLE ' || fqtn + || ' ADD CONSTRAINT ' || quote_ident(cn) + || ' CHECK (TRUE)'; + RETURN _add_raster_constraint(cn, sql); + END; + $$ LANGUAGE 'plpgsql' VOLATILE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION _drop_raster_constraint_regular_blocking(rastschema name, rasttable name, rastcolumn name) + RETURNS boolean AS + $$ SELECT _drop_raster_constraint($1, $2, 'enforce_regular_blocking_' || $3) $$ + LANGUAGE 'sql' VOLATILE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION _raster_constraint_info_num_bands(rastschema name, rasttable name, rastcolumn name) + RETURNS integer AS $$ + SELECT + replace(replace(split_part(s.consrc, ' = ', 2), ')', ''), '(', '')::integer + FROM pg_class c, pg_namespace n, pg_attribute a, pg_constraint s + WHERE n.nspname = $1 + AND c.relname = $2 + AND a.attname = $3 + AND a.attrelid = c.oid + AND s.connamespace = n.oid + AND s.conrelid = c.oid + AND a.attnum = ANY (s.conkey) + AND s.consrc LIKE '%st_numbands(%'; + $$ LANGUAGE sql STABLE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION _add_raster_constraint_num_bands(rastschema name, rasttable name, rastcolumn name) + RETURNS boolean AS $$ + DECLARE + fqtn text; + cn name; + sql text; + attr int; + BEGIN + fqtn := ''; + IF length($1) > 0 THEN + fqtn := quote_ident($1) || '.'; + END IF; + fqtn := fqtn || quote_ident($2); + + cn := 'enforce_num_bands_' || $3; + + sql := 'SELECT st_numbands(' || quote_ident($3) + || ') FROM ' || fqtn + || ' LIMIT 1'; + BEGIN + EXECUTE sql INTO attr; + EXCEPTION WHEN OTHERS THEN + RAISE NOTICE 'Unable to get the number of bands of a sample raster'; + RETURN FALSE; + END; + + sql := 'ALTER TABLE ' || fqtn + || ' ADD CONSTRAINT ' || quote_ident(cn) + || ' CHECK (st_numbands(' || quote_ident($3) + || ') = ' || attr + || ')'; + RETURN _add_raster_constraint(cn, sql); + END; + $$ LANGUAGE 'plpgsql' VOLATILE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION _drop_raster_constraint_num_bands(rastschema name, rasttable name, rastcolumn name) + RETURNS boolean AS + $$ SELECT _drop_raster_constraint($1, $2, 'enforce_num_bands_' || $3) $$ + LANGUAGE 'sql' VOLATILE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION _raster_constraint_info_pixel_types(rastschema name, rasttable name, rastcolumn name) + RETURNS text[] AS $$ + SELECT + trim(both '''' from split_part(replace(replace(split_part(s.consrc, ' = ', 2), ')', ''), '(', ''), '::', 1))::text[] + FROM pg_class c, pg_namespace n, pg_attribute a, pg_constraint s + WHERE n.nspname = $1 + AND c.relname = $2 + AND a.attname = $3 + AND a.attrelid = c.oid + AND s.connamespace = n.oid + AND s.conrelid = c.oid + AND a.attnum = ANY (s.conkey) + AND s.consrc LIKE '%_raster_constraint_pixel_types(%'; + $$ LANGUAGE sql STABLE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION _raster_constraint_pixel_types(rast raster) + RETURNS text[] AS + $$ SELECT array_agg(pixeltype)::text[] FROM st_bandmetadata($1, ARRAY[]::int[]); $$ + LANGUAGE 'sql' STABLE STRICT; + +CREATE OR REPLACE FUNCTION _add_raster_constraint_pixel_types(rastschema name, rasttable name, rastcolumn name) + RETURNS boolean AS $$ + DECLARE + fqtn text; + cn name; + sql text; + attr text[]; + max int; + BEGIN + fqtn := ''; + IF length($1) > 0 THEN + fqtn := quote_ident($1) || '.'; + END IF; + fqtn := fqtn || quote_ident($2); + + cn := 'enforce_pixel_types_' || $3; + + sql := 'SELECT _raster_constraint_pixel_types(' || quote_ident($3) + || ') FROM ' || fqtn + || ' LIMIT 1'; + BEGIN + EXECUTE sql INTO attr; + EXCEPTION WHEN OTHERS THEN + RAISE NOTICE 'Unable to get the pixel types of a sample raster'; + RETURN FALSE; + END; + max := array_length(attr, 1); + IF max < 1 OR max IS NULL THEN + RAISE NOTICE 'Unable to get the pixel types of a sample raster'; + RETURN FALSE; + END IF; + + sql := 'ALTER TABLE ' || fqtn + || ' ADD CONSTRAINT ' || quote_ident(cn) + || ' CHECK (_raster_constraint_pixel_types(' || quote_ident($3) + || ') = ''{'; + FOR x in 1..max LOOP + sql := sql || '"' || attr[x] || '"'; + IF x < max THEN + sql := sql || ','; + END IF; + END LOOP; + sql := sql || '}''::text[])'; + + RETURN _add_raster_constraint(cn, sql); + END; + $$ LANGUAGE 'plpgsql' VOLATILE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION _drop_raster_constraint_pixel_types(rastschema name, rasttable name, rastcolumn name) + RETURNS boolean AS + $$ SELECT _drop_raster_constraint($1, $2, 'enforce_pixel_types_' || $3) $$ + LANGUAGE 'sql' VOLATILE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION _raster_constraint_info_nodata_values(rastschema name, rasttable name, rastcolumn name) + RETURNS double precision[] AS $$ + SELECT + trim(both '''' from split_part(replace(replace(split_part(s.consrc, ' = ', 2), ')', ''), '(', ''), '::', 1))::double precision[] + FROM pg_class c, pg_namespace n, pg_attribute a, pg_constraint s + WHERE n.nspname = $1 + AND c.relname = $2 + AND a.attname = $3 + AND a.attrelid = c.oid + AND s.connamespace = n.oid + AND s.conrelid = c.oid + AND a.attnum = ANY (s.conkey) + AND s.consrc LIKE '%_raster_constraint_nodata_values(%'; + $$ LANGUAGE sql STABLE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION _raster_constraint_nodata_values(rast raster) + RETURNS double precision[] AS + $$ SELECT array_agg(nodatavalue)::double precision[] FROM st_bandmetadata($1, ARRAY[]::int[]); $$ + LANGUAGE 'sql' STABLE STRICT; + +CREATE OR REPLACE FUNCTION _add_raster_constraint_nodata_values(rastschema name, rasttable name, rastcolumn name) + RETURNS boolean AS $$ + DECLARE + fqtn text; + cn name; + sql text; + attr double precision[]; + max int; + BEGIN + fqtn := ''; + IF length($1) > 0 THEN + fqtn := quote_ident($1) || '.'; + END IF; + fqtn := fqtn || quote_ident($2); + + cn := 'enforce_nodata_values_' || $3; + + sql := 'SELECT _raster_constraint_nodata_values(' || quote_ident($3) + || ') FROM ' || fqtn + || ' LIMIT 1'; + BEGIN + EXECUTE sql INTO attr; + EXCEPTION WHEN OTHERS THEN + RAISE NOTICE 'Unable to get the nodata values of a sample raster'; + RETURN FALSE; + END; + max := array_length(attr, 1); + IF max < 1 OR max IS NULL THEN + RAISE NOTICE 'Unable to get the nodata values of a sample raster'; + RETURN FALSE; + END IF; + + sql := 'ALTER TABLE ' || fqtn + || ' ADD CONSTRAINT ' || quote_ident(cn) + || ' CHECK (_raster_constraint_nodata_values(' || quote_ident($3) + || ')::numeric(16,10)[] = ''{'; + FOR x in 1..max LOOP + IF attr[x] IS NULL THEN + sql := sql || 'NULL'; + ELSE + sql := sql || attr[x]; + END IF; + IF x < max THEN + sql := sql || ','; + END IF; + END LOOP; + sql := sql || '}''::numeric(16,10)[])'; + + RETURN _add_raster_constraint(cn, sql); + END; + $$ LANGUAGE 'plpgsql' VOLATILE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION _drop_raster_constraint_nodata_values(rastschema name, rasttable name, rastcolumn name) + RETURNS boolean AS + $$ SELECT _drop_raster_constraint($1, $2, 'enforce_nodata_values_' || $3) $$ + LANGUAGE 'sql' VOLATILE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION _raster_constraint_info_out_db(rastschema name, rasttable name, rastcolumn name) + RETURNS boolean[] AS $$ + SELECT + trim(both '''' from split_part(replace(replace(split_part(s.consrc, ' = ', 2), ')', ''), '(', ''), '::', 1))::boolean[] + FROM pg_class c, pg_namespace n, pg_attribute a, pg_constraint s + WHERE n.nspname = $1 + AND c.relname = $2 + AND a.attname = $3 + AND a.attrelid = c.oid + AND s.connamespace = n.oid + AND s.conrelid = c.oid + AND a.attnum = ANY (s.conkey) + AND s.consrc LIKE '%_raster_constraint_out_db(%'; + $$ LANGUAGE sql STABLE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION _raster_constraint_out_db(rast raster) + RETURNS boolean[] AS + $$ SELECT array_agg(isoutdb)::boolean[] FROM st_bandmetadata($1, ARRAY[]::int[]); $$ + LANGUAGE 'sql' STABLE STRICT; + +CREATE OR REPLACE FUNCTION _add_raster_constraint_out_db(rastschema name, rasttable name, rastcolumn name) + RETURNS boolean AS $$ + DECLARE + fqtn text; + cn name; + sql text; + attr boolean[]; + max int; + BEGIN + fqtn := ''; + IF length($1) > 0 THEN + fqtn := quote_ident($1) || '.'; + END IF; + fqtn := fqtn || quote_ident($2); + + cn := 'enforce_out_db_' || $3; + + sql := 'SELECT _raster_constraint_out_db(' || quote_ident($3) + || ') FROM ' || fqtn + || ' LIMIT 1'; + BEGIN + EXECUTE sql INTO attr; + EXCEPTION WHEN OTHERS THEN + RAISE NOTICE 'Unable to get the out-of-database bands of a sample raster'; + RETURN FALSE; + END; + max := array_length(attr, 1); + IF max < 1 OR max IS NULL THEN + RAISE NOTICE 'Unable to get the out-of-database bands of a sample raster'; + RETURN FALSE; + END IF; + + sql := 'ALTER TABLE ' || fqtn + || ' ADD CONSTRAINT ' || quote_ident(cn) + || ' CHECK (_raster_constraint_out_db(' || quote_ident($3) + || ') = ''{'; + FOR x in 1..max LOOP + IF attr[x] IS FALSE THEN + sql := sql || 'FALSE'; + ELSE + sql := sql || 'TRUE'; + END IF; + IF x < max THEN + sql := sql || ','; + END IF; + END LOOP; + sql := sql || '}''::boolean[])'; + + RETURN _add_raster_constraint(cn, sql); + END; + $$ LANGUAGE 'plpgsql' VOLATILE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION _drop_raster_constraint_out_db(rastschema name, rasttable name, rastcolumn name) + RETURNS boolean AS + $$ SELECT _drop_raster_constraint($1, $2, 'enforce_out_db_' || $3) $$ + LANGUAGE 'sql' VOLATILE STRICT + COST 100; + +------------------------------------------------------------------------------ +-- AddRasterConstraints +------------------------------------------------------------------------------ + +CREATE OR REPLACE FUNCTION AddRasterConstraints ( + rastschema name, + rasttable name, + rastcolumn name, + VARIADIC constraints text[] +) + RETURNS boolean + AS $$ + DECLARE + max int; + cnt int; + sql text; + schema name; + x int; + kw text; + rtn boolean; + BEGIN + cnt := 0; + max := array_length(constraints, 1); + IF max < 1 THEN + RAISE NOTICE 'No constraints indicated to be added. Doing nothing'; + RETURN TRUE; + END IF; + + -- validate schema + schema := NULL; + IF length($1) > 0 THEN + sql := 'SELECT nspname FROM pg_namespace ' + || 'WHERE nspname = ' || quote_literal($1) + || 'LIMIT 1'; + EXECUTE sql INTO schema; + + IF schema IS NULL THEN + RAISE EXCEPTION 'The value provided for schema is invalid'; + RETURN FALSE; + END IF; + END IF; + + IF schema IS NULL THEN + sql := 'SELECT n.nspname AS schemaname ' + || 'FROM pg_catalog.pg_class c ' + || 'JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace ' + || 'WHERE c.relkind = ' || quote_literal('r') + || ' AND n.nspname NOT IN (' || quote_literal('pg_catalog') + || ', ' || quote_literal('pg_toast') + || ') AND pg_catalog.pg_table_is_visible(c.oid)' + || ' AND c.relname = ' || quote_literal($2); + EXECUTE sql INTO schema; + + IF schema IS NULL THEN + RAISE EXCEPTION 'The table % does not occur in the search_path', quote_literal($2); + RETURN FALSE; + END IF; + END IF; + + <> + FOR x in 1..max LOOP + kw := trim(both from lower(constraints[x])); + + BEGIN + CASE + WHEN kw = 'srid' THEN + RAISE NOTICE 'Adding SRID constraint'; + rtn := _add_raster_constraint_srid(schema, $2, $3); + WHEN kw IN ('scale_x', 'scalex') THEN + RAISE NOTICE 'Adding scale-X constraint'; + rtn := _add_raster_constraint_scale(schema, $2, $3, 'x'); + WHEN kw IN ('scale_y', 'scaley') THEN + RAISE NOTICE 'Adding scale-Y constraint'; + rtn := _add_raster_constraint_scale(schema, $2, $3, 'y'); + WHEN kw = 'scale' THEN + RAISE NOTICE 'Adding scale-X constraint'; + rtn := _add_raster_constraint_scale(schema, $2, $3, 'x'); + RAISE NOTICE 'Adding scale-Y constraint'; + rtn := _add_raster_constraint_scale(schema, $2, $3, 'y'); + WHEN kw IN ('blocksize_x', 'blocksizex', 'width') THEN + RAISE NOTICE 'Adding blocksize-X constraint'; + rtn := _add_raster_constraint_blocksize(schema, $2, $3, 'width'); + WHEN kw IN ('blocksize_y', 'blocksizey', 'height') THEN + RAISE NOTICE 'Adding blocksize-Y constraint'; + rtn := _add_raster_constraint_blocksize(schema, $2, $3, 'height'); + WHEN kw = 'blocksize' THEN + RAISE NOTICE 'Adding blocksize-X constraint'; + rtn := _add_raster_constraint_blocksize(schema, $2, $3, 'width'); + RAISE NOTICE 'Adding blocksize-Y constraint'; + rtn := _add_raster_constraint_blocksize(schema, $2, $3, 'height'); + WHEN kw IN ('same_alignment', 'samealignment', 'alignment') THEN + RAISE NOTICE 'Adding alignment constraint'; + rtn := _add_raster_constraint_alignment(schema, $2, $3); + WHEN kw IN ('regular_blocking', 'regularblocking') THEN + RAISE NOTICE 'Adding regular blocking constraint'; + rtn := _add_raster_constraint_regular_blocking(schema, $2, $3); + WHEN kw IN ('num_bands', 'numbands') THEN + RAISE NOTICE 'Adding number of bands constraint'; + rtn := _add_raster_constraint_num_bands(schema, $2, $3); + WHEN kw IN ('pixel_types', 'pixeltypes') THEN + RAISE NOTICE 'Adding pixel type constraint'; + rtn := _add_raster_constraint_pixel_types(schema, $2, $3); + WHEN kw IN ('nodata_values', 'nodatavalues', 'nodata') THEN + RAISE NOTICE 'Adding nodata value constraint'; + rtn := _add_raster_constraint_nodata_values(schema, $2, $3); + WHEN kw IN ('out_db', 'outdb') THEN + RAISE NOTICE 'Adding out-of-database constraint'; + rtn := _add_raster_constraint_out_db(schema, $2, $3); + WHEN kw = 'extent' THEN + RAISE NOTICE 'Adding maximum extent constraint'; + rtn := _add_raster_constraint_extent(schema, $2, $3); + ELSE + RAISE NOTICE 'Unknown constraint: %. Skipping', quote_literal(constraints[x]); + CONTINUE kwloop; + END CASE; + END; + + IF rtn IS FALSE THEN + cnt := cnt + 1; + RAISE WARNING 'Unable to add constraint: %. Skipping', quote_literal(constraints[x]); + END IF; + + END LOOP kwloop; + + IF cnt = max THEN + RAISE EXCEPTION 'None of the constraints specified could be added. Is the schema name, table name or column name incorrect?'; + RETURN FALSE; + END IF; + + RETURN TRUE; + END; + $$ LANGUAGE 'plpgsql' VOLATILE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION AddRasterConstraints ( + rasttable name, + rastcolumn name, + VARIADIC constraints text[] +) + RETURNS boolean AS + $$ SELECT AddRasterConstraints('', $1, $2, VARIADIC $3) $$ + LANGUAGE 'sql' VOLATILE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION AddRasterConstraints ( + rastschema name, + rasttable name, + rastcolumn name, + srid boolean DEFAULT TRUE, + scale_x boolean DEFAULT TRUE, + scale_y boolean DEFAULT TRUE, + blocksize_x boolean DEFAULT TRUE, + blocksize_y boolean DEFAULT TRUE, + same_alignment boolean DEFAULT TRUE, + regular_blocking boolean DEFAULT FALSE, -- false as regular_blocking is not a usable constraint + num_bands boolean DEFAULT TRUE, + pixel_types boolean DEFAULT TRUE, + nodata_values boolean DEFAULT TRUE, + out_db boolean DEFAULT TRUE, + extent boolean DEFAULT TRUE +) + RETURNS boolean + AS $$ + DECLARE + constraints text[]; + BEGIN + IF srid IS TRUE THEN + constraints := constraints || 'srid'::text; + END IF; + + IF scale_x IS TRUE THEN + constraints := constraints || 'scale_x'::text; + END IF; + + IF scale_y IS TRUE THEN + constraints := constraints || 'scale_y'::text; + END IF; + + IF blocksize_x IS TRUE THEN + constraints := constraints || 'blocksize_x'::text; + END IF; + + IF blocksize_y IS TRUE THEN + constraints := constraints || 'blocksize_y'::text; + END IF; + + IF same_alignment IS TRUE THEN + constraints := constraints || 'same_alignment'::text; + END IF; + + IF regular_blocking IS TRUE THEN + constraints := constraints || 'regular_blocking'::text; + END IF; + + IF num_bands IS TRUE THEN + constraints := constraints || 'num_bands'::text; + END IF; + + IF pixel_types IS TRUE THEN + constraints := constraints || 'pixel_types'::text; + END IF; + + IF nodata_values IS TRUE THEN + constraints := constraints || 'nodata_values'::text; + END IF; + + IF out_db IS TRUE THEN + constraints := constraints || 'out_db'::text; + END IF; + + IF extent IS TRUE THEN + constraints := constraints || 'extent'::text; + END IF; + + RETURN AddRasterConstraints($1, $2, $3, VARIADIC constraints); + END; + $$ LANGUAGE 'plpgsql' VOLATILE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION AddRasterConstraints ( + rasttable name, + rastcolumn name, + srid boolean DEFAULT TRUE, + scale_x boolean DEFAULT TRUE, + scale_y boolean DEFAULT TRUE, + blocksize_x boolean DEFAULT TRUE, + blocksize_y boolean DEFAULT TRUE, + same_alignment boolean DEFAULT TRUE, + regular_blocking boolean DEFAULT FALSE, -- false as regular_blocking is not a usable constraint + num_bands boolean DEFAULT TRUE, + pixel_types boolean DEFAULT TRUE, + nodata_values boolean DEFAULT TRUE, + out_db boolean DEFAULT TRUE, + extent boolean DEFAULT TRUE +) + RETURNS boolean AS + $$ SELECT AddRasterConstraints('', $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) $$ + LANGUAGE 'sql' VOLATILE STRICT + COST 100; + +------------------------------------------------------------------------------ +-- DropRasterConstraints +------------------------------------------------------------------------------ + +CREATE OR REPLACE FUNCTION DropRasterConstraints ( + rastschema name, + rasttable name, + rastcolumn name, + VARIADIC constraints text[] +) + RETURNS boolean + AS $$ + DECLARE + max int; + x int; + schema name; + sql text; + kw text; + rtn boolean; + cnt int; + BEGIN + cnt := 0; + max := array_length(constraints, 1); + IF max < 1 THEN + RAISE NOTICE 'No constraints indicated to be dropped. Doing nothing'; + RETURN TRUE; + END IF; + + -- validate schema + schema := NULL; + IF length($1) > 0 THEN + sql := 'SELECT nspname FROM pg_namespace ' + || 'WHERE nspname = ' || quote_literal($1) + || 'LIMIT 1'; + EXECUTE sql INTO schema; + + IF schema IS NULL THEN + RAISE EXCEPTION 'The value provided for schema is invalid'; + RETURN FALSE; + END IF; + END IF; + + IF schema IS NULL THEN + sql := 'SELECT n.nspname AS schemaname ' + || 'FROM pg_catalog.pg_class c ' + || 'JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace ' + || 'WHERE c.relkind = ' || quote_literal('r') + || ' AND n.nspname NOT IN (' || quote_literal('pg_catalog') + || ', ' || quote_literal('pg_toast') + || ') AND pg_catalog.pg_table_is_visible(c.oid)' + || ' AND c.relname = ' || quote_literal($2); + EXECUTE sql INTO schema; + + IF schema IS NULL THEN + RAISE EXCEPTION 'The table % does not occur in the search_path', quote_literal($2); + RETURN FALSE; + END IF; + END IF; + + <> + FOR x in 1..max LOOP + kw := trim(both from lower(constraints[x])); + + BEGIN + CASE + WHEN kw = 'srid' THEN + RAISE NOTICE 'Dropping SRID constraint'; + rtn := _drop_raster_constraint_srid(schema, $2, $3); + WHEN kw IN ('scale_x', 'scalex') THEN + RAISE NOTICE 'Dropping scale-X constraint'; + rtn := _drop_raster_constraint_scale(schema, $2, $3, 'x'); + WHEN kw IN ('scale_y', 'scaley') THEN + RAISE NOTICE 'Dropping scale-Y constraint'; + rtn := _drop_raster_constraint_scale(schema, $2, $3, 'y'); + WHEN kw = 'scale' THEN + RAISE NOTICE 'Dropping scale-X constraint'; + rtn := _drop_raster_constraint_scale(schema, $2, $3, 'x'); + RAISE NOTICE 'Dropping scale-Y constraint'; + rtn := _drop_raster_constraint_scale(schema, $2, $3, 'y'); + WHEN kw IN ('blocksize_x', 'blocksizex', 'width') THEN + RAISE NOTICE 'Dropping blocksize-X constraint'; + rtn := _drop_raster_constraint_blocksize(schema, $2, $3, 'width'); + WHEN kw IN ('blocksize_y', 'blocksizey', 'height') THEN + RAISE NOTICE 'Dropping blocksize-Y constraint'; + rtn := _drop_raster_constraint_blocksize(schema, $2, $3, 'height'); + WHEN kw = 'blocksize' THEN + RAISE NOTICE 'Dropping blocksize-X constraint'; + rtn := _drop_raster_constraint_blocksize(schema, $2, $3, 'width'); + RAISE NOTICE 'Dropping blocksize-Y constraint'; + rtn := _drop_raster_constraint_blocksize(schema, $2, $3, 'height'); + WHEN kw IN ('same_alignment', 'samealignment', 'alignment') THEN + RAISE NOTICE 'Dropping alignment constraint'; + rtn := _drop_raster_constraint_alignment(schema, $2, $3); + WHEN kw IN ('regular_blocking', 'regularblocking') THEN + RAISE NOTICE 'Dropping regular blocking constraint'; + rtn := _drop_raster_constraint_regular_blocking(schema, $2, $3); + WHEN kw IN ('num_bands', 'numbands') THEN + RAISE NOTICE 'Dropping number of bands constraint'; + rtn := _drop_raster_constraint_num_bands(schema, $2, $3); + WHEN kw IN ('pixel_types', 'pixeltypes') THEN + RAISE NOTICE 'Dropping pixel type constraint'; + rtn := _drop_raster_constraint_pixel_types(schema, $2, $3); + WHEN kw IN ('nodata_values', 'nodatavalues', 'nodata') THEN + RAISE NOTICE 'Dropping nodata value constraint'; + rtn := _drop_raster_constraint_nodata_values(schema, $2, $3); + WHEN kw IN ('out_db', 'outdb') THEN + RAISE NOTICE 'Dropping out-of-database constraint'; + rtn := _drop_raster_constraint_out_db(schema, $2, $3); + WHEN kw = 'extent' THEN + RAISE NOTICE 'Dropping maximum extent constraint'; + rtn := _drop_raster_constraint_extent(schema, $2, $3); + ELSE + RAISE NOTICE 'Unknown constraint: %. Skipping', quote_literal(constraints[x]); + CONTINUE kwloop; + END CASE; + END; + + IF rtn IS FALSE THEN + cnt := cnt + 1; + RAISE WARNING 'Unable to drop constraint: %. Skipping', quote_literal(constraints[x]); + END IF; + + END LOOP kwloop; + + IF cnt = max THEN + RAISE EXCEPTION 'None of the constraints specified could be dropped. Is the schema name, table name or column name incorrect?'; + RETURN FALSE; + END IF; + + RETURN TRUE; + END; + $$ LANGUAGE 'plpgsql' VOLATILE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION DropRasterConstraints ( + rasttable name, + rastcolumn name, + VARIADIC constraints text[] +) + RETURNS boolean AS + $$ SELECT DropRasterConstraints('', $1, $2, VARIADIC $3) $$ + LANGUAGE 'sql' VOLATILE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION DropRasterConstraints ( + rastschema name, + rasttable name, + rastcolumn name, + srid boolean DEFAULT TRUE, + scale_x boolean DEFAULT TRUE, + scale_y boolean DEFAULT TRUE, + blocksize_x boolean DEFAULT TRUE, + blocksize_y boolean DEFAULT TRUE, + same_alignment boolean DEFAULT TRUE, + regular_blocking boolean DEFAULT TRUE, + num_bands boolean DEFAULT TRUE, + pixel_types boolean DEFAULT TRUE, + nodata_values boolean DEFAULT TRUE, + out_db boolean DEFAULT TRUE, + extent boolean DEFAULT TRUE +) + RETURNS boolean + AS $$ + DECLARE + constraints text[]; + BEGIN + IF srid IS TRUE THEN + constraints := constraints || 'srid'::text; + END IF; + + IF scale_x IS TRUE THEN + constraints := constraints || 'scale_x'::text; + END IF; + + IF scale_y IS TRUE THEN + constraints := constraints || 'scale_y'::text; + END IF; + + IF blocksize_x IS TRUE THEN + constraints := constraints || 'blocksize_x'::text; + END IF; + + IF blocksize_y IS TRUE THEN + constraints := constraints || 'blocksize_y'::text; + END IF; + + IF same_alignment IS TRUE THEN + constraints := constraints || 'same_alignment'::text; + END IF; + + IF regular_blocking IS TRUE THEN + constraints := constraints || 'regular_blocking'::text; + END IF; + + IF num_bands IS TRUE THEN + constraints := constraints || 'num_bands'::text; + END IF; + + IF pixel_types IS TRUE THEN + constraints := constraints || 'pixel_types'::text; + END IF; + + IF nodata_values IS TRUE THEN + constraints := constraints || 'nodata_values'::text; + END IF; + + IF out_db IS TRUE THEN + constraints := constraints || 'out_db'::text; + END IF; + + IF extent IS TRUE THEN + constraints := constraints || 'extent'::text; + END IF; + + RETURN DropRasterConstraints($1, $2, $3, VARIADIC constraints); + END; + $$ LANGUAGE 'plpgsql' VOLATILE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION DropRasterConstraints ( + rasttable name, + rastcolumn name, + srid boolean DEFAULT TRUE, + scale_x boolean DEFAULT TRUE, + scale_y boolean DEFAULT TRUE, + blocksize_x boolean DEFAULT TRUE, + blocksize_y boolean DEFAULT TRUE, + same_alignment boolean DEFAULT TRUE, + regular_blocking boolean DEFAULT TRUE, + num_bands boolean DEFAULT TRUE, + pixel_types boolean DEFAULT TRUE, + nodata_values boolean DEFAULT TRUE, + out_db boolean DEFAULT TRUE, + extent boolean DEFAULT TRUE +) + RETURNS boolean AS + $$ SELECT DropRasterConstraints('', $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) $$ + LANGUAGE 'sql' VOLATILE STRICT + COST 100; + +------------------------------------------------------------------------------ +-- raster_columns +-- +-- The metadata is documented in the PostGIS Raster specification: +-- http://trac.osgeo.org/postgis/wiki/WKTRaster/SpecificationFinal01 +------------------------------------------------------------------------------ + +CREATE OR REPLACE VIEW raster_columns AS + SELECT + current_database() AS r_table_catalog, + n.nspname AS r_table_schema, + c.relname AS r_table_name, + a.attname AS r_raster_column, + COALESCE(_raster_constraint_info_srid(n.nspname, c.relname, a.attname), (SELECT ST_SRID('POINT(0 0)'::geometry))) AS srid, + _raster_constraint_info_scale(n.nspname, c.relname, a.attname, 'x') AS scale_x, + _raster_constraint_info_scale(n.nspname, c.relname, a.attname, 'y') AS scale_y, + _raster_constraint_info_blocksize(n.nspname, c.relname, a.attname, 'width') AS blocksize_x, + _raster_constraint_info_blocksize(n.nspname, c.relname, a.attname, 'height') AS blocksize_y, + COALESCE(_raster_constraint_info_alignment(n.nspname, c.relname, a.attname), FALSE) AS same_alignment, + COALESCE(_raster_constraint_info_regular_blocking(n.nspname, c.relname, a.attname), FALSE) AS regular_blocking, + _raster_constraint_info_num_bands(n.nspname, c.relname, a.attname) AS num_bands, + _raster_constraint_info_pixel_types(n.nspname, c.relname, a.attname) AS pixel_types, + _raster_constraint_info_nodata_values(n.nspname, c.relname, a.attname) AS nodata_values, + _raster_constraint_info_out_db(n.nspname, c.relname, a.attname) AS out_db, + _raster_constraint_info_extent(n.nspname, c.relname, a.attname) AS extent + FROM + pg_class c, + pg_attribute a, + pg_type t, + pg_namespace n + WHERE t.typname = 'raster'::name + AND a.attisdropped = false + AND a.atttypid = t.oid + AND a.attrelid = c.oid + AND c.relnamespace = n.oid + AND (c.relkind = 'r'::"char" OR c.relkind = 'v'::"char") + AND NOT pg_is_other_temp_schema(c.relnamespace); + +------------------------------------------------------------------------------ +-- overview constraint functions +------------------------------------------------------------------------------- + +CREATE OR REPLACE FUNCTION _overview_constraint(ov raster, factor integer, refschema name, reftable name, refcolumn name) + RETURNS boolean AS + $$ SELECT COALESCE((SELECT TRUE FROM raster_columns WHERE r_table_catalog = current_database() AND r_table_schema = $3 AND r_table_name = $4 AND r_raster_column = $5), FALSE) $$ + LANGUAGE 'sql' STABLE + COST 100; + +CREATE OR REPLACE FUNCTION _overview_constraint_info( + ovschema name, ovtable name, ovcolumn name, + OUT refschema name, OUT reftable name, OUT refcolumn name, OUT factor integer +) + AS $$ + SELECT + split_part(split_part(s.consrc, '''::name', 1), '''', 2)::name, + split_part(split_part(s.consrc, '''::name', 2), '''', 2)::name, + split_part(split_part(s.consrc, '''::name', 3), '''', 2)::name, + trim(both from split_part(s.consrc, ',', 2))::integer + FROM pg_class c, pg_namespace n, pg_attribute a, pg_constraint s + WHERE n.nspname = $1 + AND c.relname = $2 + AND a.attname = $3 + AND a.attrelid = c.oid + AND s.connamespace = n.oid + AND s.conrelid = c.oid + AND a.attnum = ANY (s.conkey) + AND s.consrc LIKE '%_overview_constraint(%' + $$ LANGUAGE sql STABLE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION _add_overview_constraint( + ovschema name, ovtable name, ovcolumn name, + refschema name, reftable name, refcolumn name, + factor integer +) + RETURNS boolean AS $$ + DECLARE + fqtn text; + cn name; + sql text; + BEGIN + fqtn := ''; + IF length($1) > 0 THEN + fqtn := quote_ident($1) || '.'; + END IF; + fqtn := fqtn || quote_ident($2); + + cn := 'enforce_overview_' || $3; + + sql := 'ALTER TABLE ' || fqtn + || ' ADD CONSTRAINT ' || quote_ident(cn) + || ' CHECK (_overview_constraint(' || quote_ident($3) + || ',' || $7 + || ',' || quote_literal($4) + || ',' || quote_literal($5) + || ',' || quote_literal($6) + || '))'; + + RETURN _add_raster_constraint(cn, sql); + END; + $$ LANGUAGE 'plpgsql' VOLATILE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION _drop_overview_constraint(ovschema name, ovtable name, ovcolumn name) + RETURNS boolean AS + $$ SELECT _drop_raster_constraint($1, $2, 'enforce_overview_' || $3) $$ + LANGUAGE 'sql' VOLATILE STRICT + COST 100; + +------------------------------------------------------------------------------ +-- RASTER_OVERVIEWS +------------------------------------------------------------------------------ + +CREATE OR REPLACE VIEW raster_overviews AS + SELECT + current_database() AS o_table_catalog, + n.nspname AS o_table_schema, + c.relname AS o_table_name, + a.attname AS o_raster_column, + current_database() AS r_table_catalog, + split_part(split_part(s.consrc, '''::name', 1), '''', 2)::name AS r_table_schema, + split_part(split_part(s.consrc, '''::name', 2), '''', 2)::name AS r_table_name, + split_part(split_part(s.consrc, '''::name', 3), '''', 2)::name AS r_raster_column, + trim(both from split_part(s.consrc, ',', 2))::integer AS overview_factor + FROM + pg_class c, + pg_attribute a, + pg_type t, + pg_namespace n, + pg_constraint s + WHERE t.typname = 'raster'::name + AND a.attisdropped = false + AND a.atttypid = t.oid + AND a.attrelid = c.oid + AND c.relnamespace = n.oid + AND (c.relkind = 'r'::"char" OR c.relkind = 'v'::"char") + AND s.connamespace = n.oid + AND s.conrelid = c.oid + AND s.consrc LIKE '%_overview_constraint(%' + AND NOT pg_is_other_temp_schema(c.relnamespace); + +------------------------------------------------------------------------------ +-- AddOverviewConstraints +------------------------------------------------------------------------------ + +CREATE OR REPLACE FUNCTION AddOverviewConstraints ( + ovschema name, ovtable name, ovcolumn name, + refschema name, reftable name, refcolumn name, + ovfactor int +) + RETURNS boolean + AS $$ + DECLARE + x int; + s name; + t name; + oschema name; + rschema name; + sql text; + rtn boolean; + BEGIN + FOR x IN 1..2 LOOP + s := ''; + + IF x = 1 THEN + s := $1; + t := $2; + ELSE + s := $4; + t := $5; + END IF; + + -- validate user-provided schema + IF length(s) > 0 THEN + sql := 'SELECT nspname FROM pg_namespace ' + || 'WHERE nspname = ' || quote_literal(s) + || 'LIMIT 1'; + EXECUTE sql INTO s; + + IF s IS NULL THEN + RAISE EXCEPTION 'The value % is not a valid schema', quote_literal(s); + RETURN FALSE; + END IF; + END IF; + + -- no schema, determine what it could be using the table + IF length(s) < 1 THEN + sql := 'SELECT n.nspname AS schemaname ' + || 'FROM pg_catalog.pg_class c ' + || 'JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace ' + || 'WHERE c.relkind = ' || quote_literal('r') + || ' AND n.nspname NOT IN (' || quote_literal('pg_catalog') + || ', ' || quote_literal('pg_toast') + || ') AND pg_catalog.pg_table_is_visible(c.oid)' + || ' AND c.relname = ' || quote_literal(t); + EXECUTE sql INTO s; + + IF s IS NULL THEN + RAISE EXCEPTION 'The table % does not occur in the search_path', quote_literal(t); + RETURN FALSE; + END IF; + END IF; + + IF x = 1 THEN + oschema := s; + ELSE + rschema := s; + END IF; + END LOOP; + + -- reference raster + rtn := _add_overview_constraint(oschema, $2, $3, rschema, $5, $6, $7); + IF rtn IS FALSE THEN + RAISE EXCEPTION 'Unable to add the overview constraint. Is the schema name, table name or column name incorrect?'; + RETURN FALSE; + END IF; + + RETURN TRUE; + END; + $$ LANGUAGE 'plpgsql' VOLATILE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION AddOverviewConstraints ( + ovtable name, ovcolumn name, + reftable name, refcolumn name, + ovfactor int +) + RETURNS boolean + AS $$ SELECT AddOverviewConstraints('', $1, $2, '', $3, $4, $5) $$ + LANGUAGE 'sql' VOLATILE STRICT + COST 100; + +------------------------------------------------------------------------------ +-- DropOverviewConstraints +------------------------------------------------------------------------------ + +CREATE OR REPLACE FUNCTION DropOverviewConstraints ( + ovschema name, + ovtable name, + ovcolumn name +) + RETURNS boolean + AS $$ + DECLARE + schema name; + sql text; + rtn boolean; + BEGIN + -- validate schema + schema := NULL; + IF length($1) > 0 THEN + sql := 'SELECT nspname FROM pg_namespace ' + || 'WHERE nspname = ' || quote_literal($1) + || 'LIMIT 1'; + EXECUTE sql INTO schema; + + IF schema IS NULL THEN + RAISE EXCEPTION 'The value provided for schema is invalid'; + RETURN FALSE; + END IF; + END IF; + + IF schema IS NULL THEN + sql := 'SELECT n.nspname AS schemaname ' + || 'FROM pg_catalog.pg_class c ' + || 'JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace ' + || 'WHERE c.relkind = ' || quote_literal('r') + || ' AND n.nspname NOT IN (' || quote_literal('pg_catalog') + || ', ' || quote_literal('pg_toast') + || ') AND pg_catalog.pg_table_is_visible(c.oid)' + || ' AND c.relname = ' || quote_literal($2); + EXECUTE sql INTO schema; + + IF schema IS NULL THEN + RAISE EXCEPTION 'The table % does not occur in the search_path', quote_literal($2); + RETURN FALSE; + END IF; + END IF; + + rtn := _drop_overview_constraint(schema, $2, $3); + IF rtn IS FALSE THEN + RAISE EXCEPTION 'Unable to drop the overview constraint . Is the schema name, table name or column name incorrect?'; + RETURN FALSE; + END IF; + + RETURN TRUE; + END; + $$ LANGUAGE 'plpgsql' VOLATILE STRICT + COST 100; + +CREATE OR REPLACE FUNCTION DropOverviewConstraints ( + ovtable name, + ovcolumn name +) + RETURNS boolean + AS $$ SELECT DropOverviewConstraints('', $1, $2) $$ + LANGUAGE 'sql' VOLATILE STRICT + COST 100; + +------------------------------------------------------------------- +-- END +------------------------------------------------------------------- + +COMMIT; diff -Nru postgis-1.5.3/raster/rt_pg/rtpostgis_drop.sql.in.c postgis-2.0.1/raster/rt_pg/rtpostgis_drop.sql.in.c --- postgis-1.5.3/raster/rt_pg/rtpostgis_drop.sql.in.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/rt_pg/rtpostgis_drop.sql.in.c 2012-06-11 15:47:16.000000000 +0000 @@ -0,0 +1,327 @@ +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- +-- $Id: rtpostgis_drop.sql.in.c 7884 2011-09-22 15:07:25Z robe $ +-- +-- PostGIS Raster - Raster Type for PostGIS +-- http://trac.osgeo.org/postgis/wiki/WKTRaster +-- +-- Copyright (C) 2011 Regina Obe +-- Copyright (C) 2011 Regents of the University of California +-- +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +-- +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- +-- WARNING: Any change in this file must be evaluated for compatibility. +-- +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- This file will be used to drop obselete functions and other objects. +-- It will be used for both upgrade and uninstall +-- Drop obsolete functions +-- (which fully obsolete, changed to take default args, or outp params changed) -- + +-- drop aggregates +DROP AGGREGATE IF EXISTS ST_Union(raster, text, text, text, double precision, text, text, text, double precision, text, text, text, double precision); +DROP AGGREGATE IF EXISTS ST_Union(raster, text, text, text); +DROP AGGREGATE IF EXISTS ST_Union(raster, text, text, text, double precision, text, text, text, double precision); +DROP AGGREGATE IF EXISTS ST_Union(raster, text, text); +DROP AGGREGATE IF EXISTS ST_Union(raster, text, text, text, double precision); +DROP AGGREGATE IF EXISTS ST_Union(raster, text); +DROP AGGREGATE IF EXISTS ST_Union(raster, integer); +DROP AGGREGATE IF EXISTS ST_Union(raster); + +DROP FUNCTION IF EXISTS st_summarystats(rastertable text, rastercolumn text, nband integer, exclude_nodata_value boolean, sample_percent double precision) ; +DROP FUNCTION IF EXISTS st_summarystats(rastertable text, rastercolumn text, exclude_nodata_value boolean) ; +DROP FUNCTION IF EXISTS st_summarystats(rast raster, exclude_nodata_value boolean) ; +DROP FUNCTION IF EXISTS st_summarystats(rast raster, nband integer, exclude_nodata_value boolean) ; + +DROP FUNCTION IF EXISTS _st_summarystats(raster, integer, exclude_nodata_value boolean , double precision, bigint, double precision, double precision); +DROP FUNCTION IF EXISTS _st_summarystats(rast raster, nband integer, exclude_nodata_value boolean, sample_percent double precision) ; + +--return types changed evidentally. Dropping first allows us to recreate cleanly -- +DROP FUNCTION IF EXISTS st_valuecount(text, text, integer, double precision, double precision); +DROP FUNCTION IF EXISTS st_valuecount(text, text, integer, boolean, double precision[], double precision); +DROP FUNCTION IF EXISTS st_valuecount(text, text, double precision[], double precision); +DROP FUNCTION IF EXISTS st_valuecount(text, text, integer, double precision[], double precision); +DROP FUNCTION IF EXISTS st_valuecount(text, text, integer, boolean, double precision, double precision); +DROP FUNCTION IF EXISTS st_valuecount(text, text, double precision, double precision); +DROP FUNCTION IF EXISTS st_valuecount(raster, integer, boolean, double precision[], double precision); +DROP FUNCTION IF EXISTS st_valuecount(raster, integer, double precision[], double precision); +DROP FUNCTION IF EXISTS st_valuecount(raster, double precision[], double precision); +DROP FUNCTION IF EXISTS _st_valuecount(text, text, integer, boolean, double precision[], double precision); +DROP FUNCTION IF EXISTS _st_valuecount(raster, integer, boolean, double precision[], double precision); + +DROP FUNCTION IF EXISTS ST_Intersects(raster,boolean,geometry); +DROP FUNCTION IF EXISTS ST_Intersects(geometry,raster,boolean); +DROP FUNCTION IF EXISTS ST_Intersects(raster,geometry); +DROP FUNCTION IF EXISTS ST_Intersects(geometry,raster); +DROP FUNCTION IF EXISTS ST_Intersects(raster, integer, boolean , geometry); +DROP FUNCTION IF EXISTS ST_Intersects(geometry , raster, integer , boolean); +DROP FUNCTION IF EXISTS ST_Intersection(raster,raster, integer, integer); +DROP FUNCTION IF EXISTS ST_Intersection(geometry,raster); +DROP FUNCTION IF EXISTS ST_Intersection(raster, geometry); +DROP FUNCTION IF EXISTS ST_Intersection(raster, integer, geometry); + +--these were renamed to ST_MapAlgebraExpr or argument names changed -- +DROP FUNCTION IF EXISTS ST_MapAlgebra(raster, integer, text, text, nodatavaluerepl text); +DROP FUNCTION IF EXISTS ST_MapAlgebra(raster, pixeltype text, expression text, nodatavaluerepl text); + + +--signatures or arg names changed +DROP FUNCTION IF EXISTS ST_MapAlgebraExpr(raster, integer, text, text, text); +DROP FUNCTION IF EXISTS ST_MapAlgebraExpr(raster, text, text, text); +DROP FUNCTION IF EXISTS ST_MapalgebraFct(raster, regprocedure); +DROP FUNCTION IF EXISTS ST_MapAlgebraFct(raster, text, regprocedure, VARIADIC text[]); +DROP FUNCTION IF EXISTS ST_MapAlgebraFct(raster, text, regprocedure); +DROP FUNCTION IF EXISTS ST_MapAlgebraFct(raster, regprocedure, VARIADIC text[]); +DROP FUNCTION IF EXISTS ST_MapAlgebraFct(raster, integer, regprocedure, variadic text[]); +DROP FUNCTION IF EXISTS ST_MapAlgebraFct(raster, integer, text, regprocedure, VARIADIC text[]); +DROP FUNCTION IF EXISTS ST_MapAlgebraFct(raster, integer, text, regprocedure); +DROP FUNCTION IF EXISTS ST_MapAlgebraFct(raster, integer, regprocedure, variadic text[]); +DROP FUNCTION IF EXISTS ST_MapalgebraFct(raster, integer, regprocedure); +DROP FUNCTION IF EXISTS ST_MapAlgebraFct(raster, raster, regprocedure, text, text, VARIADIC text[]); +DROP FUNCTION IF EXISTS ST_MapAlgebraFct(raster, integer, raster, integer, regprocedure, text, text, VARIADIC text[]); +DROP FUNCTION IF EXISTS ST_MapAlgebraFctNgb(raster, integer, text, integer, integer, regprocedure, text, VARIADIC text[]); + + +--dropped functions +DROP FUNCTION IF EXISTS ST_MapAlgebraFct(raster, raster, regprocedure, VARIADIC text[]); + +--added extra parameter so these are obsolete -- +DROP FUNCTION IF EXISTS ST_AsRaster(geometry , integer , integer , double precision , double precision , text , double precision , double precision , double precision , double precision ); +DROP FUNCTION IF EXISTS ST_AsRaster(geometry , integer , integer , text[] , double precision[] , double precision[] , double precision , double precision , double precision , double precision ); +DROP FUNCTION IF EXISTS ST_AsRaster(geometry , integer , integer , text , double precision , double precision , double precision , double precision , double precision , double precision ); +DROP FUNCTION IF EXISTS ST_AsRaster(geometry , integer , integer , double precision , double precision , text[] , double precision[] , double precision[] , double precision , double precision ); +DROP FUNCTION IF EXISTS ST_AsRaster(geometry , integer , integer , double precision , double precision , text[] , double precision[] , double precision[] , double precision , double precision ); +DROP FUNCTION IF EXISTS ST_AsRaster(geometry , double precision , double precision , text , double precision , double precision , double precision , double precision , double precision , double precision ); +DROP FUNCTION IF EXISTS ST_AsRaster(geometry , raster , text , double precision , double precision ); +DROP FUNCTION IF EXISTS _ST_AsRaster(geometry,double precision , double precision, integer , integer,text[] , double precision[] ,double precision[] , double precision, double precision, double precision,double precision, double precision, double precision,touched boolean); +-- arg names changed +DROP FUNCTION IF EXISTS _ST_Resample(raster, text, double precision, integer, double precision, double precision, double precision, double precision, double precision, double precision); + +-- signature changed +DROP FUNCTION IF EXISTS ST_Resample(raster, raster, text, double precision); + +-- default parameters added +DROP FUNCTION IF EXISTS ST_HasNoBand(raster); + +--function out parameters changed so can not just create or replace +DROP FUNCTION IF EXISTS ST_BandMetaData(raster, integer); + +--function out parameter changed +DROP FUNCTION IF EXISTS ST_BandNoDataValue(raster, integer); +--function no longer exists +DROP FUNCTION IF EXISTS ST_BandNoDataValue(raster); + +--function no longer exists +DROP FUNCTION IF EXISTS ST_SetGeoReference(raster, text); +-- signature changed +DROP FUNCTION IF EXISTS ST_SetGeoReference(raster, text, text); + +--function no longer exists +DROP FUNCTION IF EXISTS st_setbandisnodata(raster); +-- signature changed +DROP FUNCTION IF EXISTS st_setbandisnodata(raster, integer); + +--function no longer exists +DROP FUNCTION IF EXISTS st_setbandnodatavalue(raster, integer, double precision); +-- signature changed +DROP FUNCTION IF EXISTS st_setbandnodatavalue(raster, integer, double precision, boolean); + +--function no longer exists +DROP FUNCTION IF EXISTS st_dumpaspolygons(raster); +-- signature changed +DROP FUNCTION IF EXISTS st_dumpaspolygons(raster, integer); + +--function no longer exists +DROP FUNCTION IF EXISTS st_polygon(raster); +-- signature changed +DROP FUNCTION IF EXISTS st_polygon(raster, integer); + +-- function no longer exists +DROP FUNCTION IF EXISTS st_makeemptyraster(int, int, float8, float8, float8, float8, float8, float8); +-- signature changed +DROP FUNCTION IF EXISTS st_makeemptyraster(int, int, float8, float8, float8, float8, float8, float8, int4); + +-- function no longer exists +DROP FUNCTION IF EXISTS st_addband(raster, text); +DROP FUNCTION IF EXISTS st_addband(raster, text, float8); +DROP FUNCTION IF EXISTS st_addband(raster, int, text); +DROP FUNCTION IF EXISTS st_addband(raster, int, text, float8); +DROP FUNCTION IF EXISTS st_addband(raster, raster, int); +DROP FUNCTION IF EXISTS st_addband(raster, raster); +-- signature changed +DROP FUNCTION IF EXISTS st_addband(raster, text, float8, float8); +DROP FUNCTION IF EXISTS st_addband(raster, int, text, float8, float8); +DROP FUNCTION IF EXISTS st_addband(raster, raster, int, int); + +-- function no longer exists +DROP FUNCTION IF EXISTS st_bandisnodata(raster); +DROP FUNCTION IF EXISTS st_bandisnodata(raster, integer); +-- signature changed +DROP FUNCTION IF EXISTS st_bandisnodata(raster, integer, boolean); + +-- function no longer exists +DROP FUNCTION IF EXISTS st_bandpath(raster); +-- signature changed +DROP FUNCTION IF EXISTS st_bandpath(raster, integer); + +-- function no longer exists +DROP FUNCTION IF EXISTS st_bandpixeltype(raster); +-- signature changed +DROP FUNCTION IF EXISTS st_bandpixeltype(raster, integer); + + +-- signature changed and some functions dropped -- +-- Note: I am only including the surviving variants +-- since some people may be using the dead ones which are in scripts +-- and we do not have a replace for those +DROP AGGREGATE IF EXISTS ST_Union(raster); +DROP AGGREGATE IF EXISTS ST_Union(raster, integer, text); + +-- function no longer exists +DROP FUNCTION IF EXISTS st_value(raster, integer, integer, integer); +DROP FUNCTION IF EXISTS st_value(raster, integer, integer); +DROP FUNCTION IF EXISTS st_value(raster, integer, geometry); +DROP FUNCTION IF EXISTS st_value(raster, geometry); +-- signature changed +DROP FUNCTION IF EXISTS st_value(raster, integer, integer, integer, boolean); +DROP FUNCTION IF EXISTS st_value(raster, integer, integer, boolean); +DROP FUNCTION IF EXISTS st_value(raster, integer, geometry, boolean); +DROP FUNCTION IF EXISTS st_value(raster, geometry, boolean); + +-- function no longer exists +DROP FUNCTION IF EXISTS st_georeference(raster); +-- signature changed +DROP FUNCTION IF EXISTS st_georeference(raster, text); + +-- function name change +DROP FUNCTION IF EXISTS dumpaswktpolygons(raster, integer); + +-- signature changed +DROP FUNCTION IF EXISTS st_bandmetadata(raster, VARIADIC int[]); + +--change to use default parameters +DROP FUNCTION IF EXISTS ST_PixelAsPolygons(raster); +DROP FUNCTION IF EXISTS ST_PixelAsPolygons(raster,integer); + +-- no longer needed functions changed to use out parameters +DROP TYPE IF EXISTS bandmetadata; +DROP TYPE IF EXISTS geomvalxy; + +-- raster_columns and raster_overviews tables are deprecated +DROP FUNCTION IF EXISTS _rename_raster_tables(); +CREATE OR REPLACE FUNCTION _rename_raster_tables() + RETURNS void AS $$ + DECLARE + cnt int; + BEGIN + SELECT count(*) INTO cnt + FROM pg_class c + JOIN pg_namespace n + ON c.relnamespace = n.oid + WHERE c.relname = 'raster_columns' + AND c.relkind = 'r'::char + AND NOT pg_is_other_temp_schema(c.relnamespace); + + IF cnt > 0 THEN + EXECUTE 'ALTER TABLE raster_columns RENAME TO deprecated_raster_columns'; + END IF; + + SELECT count(*) INTO cnt + FROM pg_class c + JOIN pg_namespace n + ON c.relnamespace = n.oid + WHERE c.relname = 'raster_overviews' + AND c.relkind = 'r'::char + AND NOT pg_is_other_temp_schema(c.relnamespace); + + IF cnt > 0 THEN + EXECUTE 'ALTER TABLE raster_overviews RENAME TO deprecated_raster_overviews'; + END IF; + + END; + $$ LANGUAGE 'plpgsql' VOLATILE; +SELECT _rename_raster_tables(); +DROP FUNCTION _rename_raster_tables(); + +-- inserted new column into view +DROP VIEW IF EXISTS raster_columns; + +-- functions no longer supported +DROP FUNCTION IF EXISTS AddRasterColumn(varchar, varchar, varchar, varchar, integer, varchar[], boolean, boolean, double precision[], double precision, double precision, integer, integer, geometry); +DROP FUNCTION IF EXISTS AddRasterColumn(varchar, varchar, varchar, integer, varchar[], boolean, boolean, double precision[], double precision, double precision, integer, integer, geometry); +DROP FUNCTION IF EXISTS AddRasterColumn(varchar, varchar, integer, varchar[], boolean, boolean, double precision[], double precision, double precision, integer, integer, geometry); +DROP FUNCTION IF EXISTS DropRasterColumn(varchar, varchar, varchar, varchar); +DROP FUNCTION IF EXISTS DropRasterColumn(varchar, varchar, varchar); +DROP FUNCTION IF EXISTS DropRasterColumn(varchar, varchar); +DROP FUNCTION IF EXISTS DropRasterTable(varchar, varchar, varchar); +DROP FUNCTION IF EXISTS DropRasterTable(varchar, varchar); +DROP FUNCTION IF EXISTS DropRasterTable(varchar); + +-- function parameters added +DROP FUNCTION IF EXISTS AddRasterConstraints(name, name, name, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean); +DROP FUNCTION IF EXISTS AddRasterConstraints(name, name, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean); +DROP FUNCTION IF EXISTS DropRasterConstraints(name, name, name, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean); +DROP FUNCTION IF EXISTS DropRasterConstraints(name, name, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean); + +-- function parameters renamed +CREATE OR REPLACE FUNCTION _drop_st_samealignment() + RETURNS void AS $$ + DECLARE + cnt int; + BEGIN + SELECT count(*) INTO cnt + FROM pg_proc + WHERE lower(proname) = 'st_samealignment' + AND pronargs = 2 + AND ( + proargnames = '{rasta,rastb}'::text[] OR + proargnames = '{rastA,rastB}'::text[] + ); + + IF cnt > 0 THEN + RAISE NOTICE 'Dropping ST_SameAlignment(raster, raster) due to parameter name changes. Unfortunately, this is a DROP ... CASCADE as the alignment raster constraint uses ST_SameAlignment(raster, raster). You will need to reapply AddRasterConstraint(''SCHEMA'', ''TABLE'', ''COLUMN'', ''alignment'') to any raster column that requires this constraint.'; + DROP FUNCTION IF EXISTS st_samealignment(raster, raster) CASCADE; + END IF; + END; + $$ LANGUAGE 'plpgsql' VOLATILE; +SELECT _drop_st_samealignment(); +DROP FUNCTION _drop_st_samealignment(); +DROP FUNCTION IF EXISTS _st_intersects(raster, integer, raster, integer); +DROP FUNCTION IF EXISTS st_intersects(raster, integer, raster, integer); +DROP FUNCTION IF EXISTS st_intersects(raster, raster); + +-- functions have changed dramatically +DROP FUNCTION IF EXISTS st_intersection(rast raster, band integer, geom geometry); +DROP FUNCTION IF EXISTS st_intersection(rast raster, geom geometry); + +-- function was renamed +DROP FUNCTION IF EXISTS st_minpossibleval(text); + +-- function deprecated previously +DROP FUNCTION IF EXISTS st_pixelaspolygon(raster, integer, integer, integer); + +-- function signatures changed +DROP FUNCTION IF EXISTS st_intersection(raster, int, geometry, text, regprocedure); +DROP FUNCTION IF EXISTS st_intersection(raster, int, geometry, regprocedure); +DROP FUNCTION IF EXISTS st_intersection(raster, geometry, text, regprocedure); +DROP FUNCTION IF EXISTS st_intersection(raster, geometry, regprocedure); +DROP FUNCTION IF EXISTS st_clip(raster, integer, geometry, boolean); +DROP FUNCTION IF EXISTS st_clip(raster, geometry, float8, boolean); +DROP FUNCTION IF EXISTS st_clip(raster, geometry, boolean); +DROP FUNCTION IF EXISTS st_clip(raster, int, geometry, float8, boolean); +DROP FUNCTION IF EXISTS st_clip(raster, geometry, float8[], boolean); +DROP FUNCTION IF EXISTS st_clip(raster, integer, geometry, float8[], boolean); + +-- refactoring of functions +DROP FUNCTION IF EXISTS _st_dumpaswktpolygons(rast raster, band integer); +DROP TYPE IF EXISTS wktgeomval; + +-- variants of st_intersection with regprocedure no longer exist +DROP FUNCTION IF EXISTS st_intersection(raster, integer, raster, integer, text, regprocedure); +DROP FUNCTION IF EXISTS st_intersection(raster, integer, raster, integer, regprocedure); +DROP FUNCTION IF EXISTS st_intersection(raster, raster, text, regprocedure); +DROP FUNCTION IF EXISTS st_intersection(raster, raster, regprocedure); diff -Nru postgis-1.5.3/raster/rt_pg/rtpostgis_legacy.sql.in.c postgis-2.0.1/raster/rt_pg/rtpostgis_legacy.sql.in.c --- postgis-1.5.3/raster/rt_pg/rtpostgis_legacy.sql.in.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/rt_pg/rtpostgis_legacy.sql.in.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,150 @@ +------------------------------------------------------------------------------- +-- +-- $Id: rtpostgis_legacy.sql.in.c 9324 2012-02-27 22:08:12Z pramsey $ +-- +-- PostGIS Raster - Raster Type for PostGIS +-- http://trac.osgeo.org/postgis/wiki/WKTRaster +-- +-- Copyright (C) 2012 Regents of the University of California +-- +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +-- +------------------------------------------------------------------------------- + +-- +-- For legacy access to OLD versions of raster_columns AND raster_overviews +-- + +-- raster_columns and raster_overviews tables no longer exist +-- if tables found, rename tables +DROP FUNCTION IF EXISTS _rename_raster_tables(); +CREATE OR REPLACE FUNCTION _rename_raster_tables() + RETURNS void AS $$ + DECLARE + cnt int; + BEGIN + SELECT count(*) INTO cnt + FROM pg_class c + JOIN pg_namespace n + ON c.relnamespace = n.oid + WHERE c.relname = 'raster_columns' + AND c.relkind = 'r'::char + AND NOT pg_is_other_temp_schema(c.relnamespace); + + IF cnt > 0 THEN + EXECUTE 'ALTER TABLE raster_columns RENAME TO deprecated_raster_columns'; + END IF; + + SELECT count(*) INTO cnt + FROM pg_class c + JOIN pg_namespace n + ON c.relnamespace = n.oid + WHERE c.relname = 'raster_overviews' + AND c.relkind = 'r'::char + AND NOT pg_is_other_temp_schema(c.relnamespace); + + IF cnt > 0 THEN + EXECUTE 'ALTER TABLE raster_overviews RENAME TO deprecated_raster_overviews'; + END IF; + + END; + $$ LANGUAGE 'plpgsql' VOLATILE; +SELECT _rename_raster_tables(); +DROP FUNCTION _rename_raster_tables(); + +CREATE OR REPLACE VIEW raster_columns AS + SELECT + current_database() AS r_table_catalog, + n.nspname AS r_table_schema, + c.relname AS r_table_name, + a.attname AS r_raster_column, + COALESCE(_raster_constraint_info_srid(n.nspname, c.relname, a.attname), (SELECT ST_SRID('POINT(0 0)'::geometry))) AS srid, + _raster_constraint_info_scale(n.nspname, c.relname, a.attname, 'x') AS scale_x, + _raster_constraint_info_scale(n.nspname, c.relname, a.attname, 'y') AS scale_y, + _raster_constraint_info_blocksize(n.nspname, c.relname, a.attname, 'width') AS blocksize_x, + _raster_constraint_info_blocksize(n.nspname, c.relname, a.attname, 'height') AS blocksize_y, + COALESCE(_raster_constraint_info_alignment(n.nspname, c.relname, a.attname), FALSE) AS same_alignment, + COALESCE(_raster_constraint_info_regular_blocking(n.nspname, c.relname, a.attname), FALSE) AS regular_blocking, + _raster_constraint_info_num_bands(n.nspname, c.relname, a.attname) AS num_bands, + _raster_constraint_info_pixel_types(n.nspname, c.relname, a.attname) AS pixel_types, + _raster_constraint_info_nodata_values(n.nspname, c.relname, a.attname) AS nodata_values, + _raster_constraint_info_out_db(n.nspname, c.relname, a.attname) AS out_db, + _raster_constraint_info_extent(n.nspname, c.relname, a.attname) AS extent, + a.attname AS r_column + FROM + pg_class c, + pg_attribute a, + pg_type t, + pg_namespace n + WHERE t.typname = 'raster'::name + AND a.attisdropped = false + AND a.atttypid = t.oid + AND a.attrelid = c.oid + AND c.relnamespace = n.oid + AND (c.relkind = 'r'::"char" OR c.relkind = 'v'::"char") + AND NOT pg_is_other_temp_schema(c.relnamespace); + +CREATE OR REPLACE VIEW raster_overviews AS + SELECT + current_database() AS o_table_catalog, + n.nspname AS o_table_schema, + c.relname AS o_table_name, + a.attname AS o_raster_column, + current_database() AS r_table_catalog, + split_part(split_part(s.consrc, '''::name', 1), '''', 2)::name AS r_table_schema, + split_part(split_part(s.consrc, '''::name', 2), '''', 2)::name AS r_table_name, + split_part(split_part(s.consrc, '''::name', 3), '''', 2)::name AS r_raster_column, + trim(both from split_part(s.consrc, ',', 2))::integer AS overview_factor, + a.attname AS o_column, + split_part(split_part(s.consrc, '''::name', 3), '''', 2)::name AS r_column, + rc.out_db AS out_db + FROM + pg_class c, + pg_attribute a, + pg_type t, + pg_namespace n, + pg_constraint s, + raster_columns rc + WHERE t.typname = 'raster'::name + AND a.attisdropped = false + AND a.atttypid = t.oid + AND a.attrelid = c.oid + AND c.relnamespace = n.oid + AND (c.relkind = 'r'::"char" OR c.relkind = 'v'::"char") + AND s.connamespace = n.oid + AND s.conrelid = c.oid + AND n.nspname = rc.r_table_schema + AND c.relname = rc.r_table_name + AND a.attname = rc.r_raster_column + AND s.consrc LIKE '%_overview_constraint(%' + AND NOT pg_is_other_temp_schema(c.relnamespace); + +-- +-- Add rules to catch INSERT, UPDATE and DELETE +-- + +CREATE OR REPLACE RULE raster_columns_insert AS + ON INSERT TO raster_columns + DO INSTEAD NOTHING; + +CREATE OR REPLACE RULE raster_columns_update AS + ON UPDATE TO raster_columns + DO INSTEAD NOTHING; + +CREATE OR REPLACE RULE raster_columns_delete AS + ON DELETE TO raster_columns + DO INSTEAD NOTHING; + +CREATE OR REPLACE RULE raster_overviews_insert AS + ON INSERT TO raster_overviews + DO INSTEAD NOTHING; + +CREATE OR REPLACE RULE raster_overviews_update AS + ON UPDATE TO raster_overviews + DO INSTEAD NOTHING; + +CREATE OR REPLACE RULE raster_overviews_delete AS + ON DELETE TO raster_overviews + DO INSTEAD NOTHING; diff -Nru postgis-1.5.3/raster/rt_pg/rtpostgis_upgrade_cleanup.sql.in.c postgis-2.0.1/raster/rt_pg/rtpostgis_upgrade_cleanup.sql.in.c --- postgis-1.5.3/raster/rt_pg/rtpostgis_upgrade_cleanup.sql.in.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/rt_pg/rtpostgis_upgrade_cleanup.sql.in.c 2012-05-16 08:29:14.000000000 +0000 @@ -0,0 +1,105 @@ +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- +-- $Id: rtpostgis_upgrade.sql.in.c 8448 2011-12-16 22:07:26Z dustymugs $ +-- +-- PostGIS Raster - Raster Type for PostGIS +-- http://trac.osgeo.org/postgis/wiki/WKTRaster +-- +-- Copyright (c) 2011 Regina Obe +-- Copyright (C) 2011 Regents of the University of California +-- +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +-- +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- +-- WARNING: Any change in this file must be evaluated for compatibility. +-- +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +-- This section is take add / drop things like CASTS, TYPES etc. that have changed +-- Since these are normally excluded from sed upgrade generator +-- they must be explicitly added +-- So that they can immediately be recreated. +-- It is not run thru the sed processor to prevent it from being stripped +-- Note: We put these in separate file from drop since the extension module has +-- to add additional logic to drop them from the extension as well +#include "sqldefines.h" +/** -- GIST operator functions -- these don't seem necessary +DROP OPERATOR IF EXISTS << (raster, raster); +DROP FUNCTION IF EXISTS st_left(raster, raster); +DROP OPERATOR IF EXISTS &< (raster, raster); +DROP FUNCTION IF EXISTS st_overleft(raster, raster); +DROP OPERATOR IF EXISTS <<| (raster, raster); +DROP FUNCTION IF EXISTS st_below(raster, raster); +DROP OPERATOR IF EXISTS &<| (raster, raster); +DROP FUNCTION IF EXISTS st_overbelow(raster, raster); +DROP OPERATOR IF EXISTS && (raster, raster); +DROP FUNCTION IF EXISTS st_overlap(raster, raster); +DROP OPERATOR IF EXISTS &> (raster, raster); +DROP FUNCTION IF EXISTS st_overright(raster, raster); +DROP OPERATOR IF EXISTS >> (raster, raster); +DROP FUNCTION IF EXISTS st_right(raster, raster); +DROP OPERATOR IF EXISTS |&> (raster, raster); +DROP FUNCTION IF EXISTS st_overabove(raster, raster); +DROP OPERATOR IF EXISTS |>> (raster, raster); +DROP FUNCTION IF EXISTS st_above(raster, raster); +DROP OPERATOR IF EXISTS ~= (raster, raster); +DROP FUNCTION IF EXISTS st_same(raster, raster); +DROP OPERATOR IF EXISTS @ (raster, raster); +DROP FUNCTION IF EXISTS st_contained(raster, raster); +DROP OPERATOR IF EXISTS ~ (raster, raster); +DROP FUNCTION IF EXISTS st_contain(raster, raster); **/ + +-- drop st_bytea +DROP CAST IF EXISTS (raster AS bytea); +DROP FUNCTION IF EXISTS st_bytea(raster); + +CREATE OR REPLACE FUNCTION bytea(raster) + RETURNS bytea + AS 'MODULE_PATHNAME', 'RASTER_to_bytea' + LANGUAGE 'c' IMMUTABLE STRICT; +CREATE CAST (raster AS bytea) + WITH FUNCTION bytea(raster) AS ASSIGNMENT; + +-- drop box2d +DROP CAST IF EXISTS (raster AS box2d); +DROP FUNCTION IF EXISTS box2d(raster); + +-- create box3d cast if it does not exist +#if POSTGIS_PGSQL_VERSION >= 90 +-- If we are running 9.0+ we can use DO plpgsql to check +-- and only create if not exists so no need to force a drop +-- that way if people are using it, we will not mess them up +DO language 'plpgsql' $$DECLARE r record; +BEGIN + IF NOT EXISTS(SELECT cs.typname AS source + FROM pg_cast AS ca + INNER JOIN pg_type AS cs ON ca.castsource = cs.oid + INNER JOIN pg_type AS ct ON ca.casttarget = ct.oid + WHERE cs.typname = 'raster' AND ct.typname = 'box3d') THEN + CREATE OR REPLACE FUNCTION box3d(raster) + RETURNS box3d + AS 'SELECT box3d(st_convexhull($1))' + LANGUAGE 'sql' IMMUTABLE STRICT; + CREATE CAST (raster AS box3d) + WITH FUNCTION box3d(raster) AS ASSIGNMENT; + END IF; +END$$; +#endif +#if POSTGIS_PGSQL_VERSION < 90 +-- if we are running 8.4 we need to use brute force +DROP CAST IF EXISTS (raster AS box3d); +CREATE OR REPLACE FUNCTION box3d(raster) + RETURNS box3d + AS 'SELECT box3d(st_convexhull($1))' + LANGUAGE 'sql' IMMUTABLE STRICT; +CREATE CAST (raster AS box3d) + WITH FUNCTION box3d(raster) AS ASSIGNMENT; +#endif + +-- make geometry cast ASSIGNMENT +DROP CAST IF EXISTS (raster AS geometry); +CREATE CAST (raster AS geometry) + WITH FUNCTION st_convexhull(raster) AS ASSIGNMENT; diff -Nru postgis-1.5.3/raster/scripts/Makefile.in postgis-2.0.1/raster/scripts/Makefile.in --- postgis-1.5.3/raster/scripts/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/scripts/Makefile.in 2012-03-21 21:36:59.000000000 +0000 @@ -0,0 +1,36 @@ +############################################################################# +# $Id$ +# +# Copyright (c) 2011 Regents of the University of California +# +# +# This is free software; you can redistribute and/or modify it under +# the terms of the GNU General Public Licence. See the COPYING file. +# +############################################################################# + +RT_CORE=../rt_core +RT_PG=../rt_pg + +all: plpgsql python + +plpgsql: +# $(MAKE) -C plpgsql + +python: + $(MAKE) -C python + +install: +# $(MAKE) -C plpgsql + $(MAKE) -C python + +uninstall: + +clean: +# $(MAKE) -C plpgsql $@ + $(MAKE) -C python $@ + +distclean: clean +# $(MAKE) -C plpgsql $@ + $(MAKE) -C python $@ + rm -f Makefile diff -Nru postgis-1.5.3/raster/scripts/plpgsql/_MapAlgebraParts.sql postgis-2.0.1/raster/scripts/plpgsql/_MapAlgebraParts.sql --- postgis-1.5.3/raster/scripts/plpgsql/_MapAlgebraParts.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/scripts/plpgsql/_MapAlgebraParts.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,401 @@ +---------------------------------------------------------------------- +-- +-- $Id: _MapAlgebraParts.sql 6127 2010-10-25 16:06:00Z jorgearevalo $ +-- +-- Copyright (c) 2009-2010 Pierre Racine +-- +---------------------------------------------------------------------- + +-- Note: The functions found in this file are for exclusive usage of ST_MapAlgebra2 + +CREATE OR REPLACE FUNCTION max(a int, b int) + RETURNS int + AS 'SELECT CASE WHEN $1 < $2 THEN $2 ELSE $1 END' + LANGUAGE 'SQL' IMMUTABLE STRICT; + +CREATE OR REPLACE FUNCTION min(a int, b int) + RETURNS int + AS 'SELECT CASE WHEN $1 < $2 THEN $1 ELSE $2 END' + LANGUAGE 'SQL' IMMUTABLE STRICT; + +--DROP FUNCTION _MapAlgebraParts(r1x int, r1y int, r1w int, r1h int, r2x int, r2y int, r2w int, r2h int); +CREATE OR REPLACE FUNCTION _MapAlgebraParts(r1x int, + r1y int, + r1w int, + r1h int, + r2x int, + r2y int, + r2w int, + r2h int) + RETURNS int[] + AS $$ + DECLARE + z11x int; + z11y int; + z11w int; + z11h int; + z12x int; + z12y int; + z12w int; + z12h int; + z13x int; + z13y int; + z13w int; + z13h int; + z14x int; + z14y int; + z14w int; + z14h int; + z21x int; + z21y int; + z21w int; + z21h int; + z22x int; + z22y int; + z22w int; + z22h int; + z23x int; + z23y int; + z23w int; + z23h int; + z24x int; + z24y int; + z24w int; + z24h int; + zcx int; + zcy int; + zcw int; + zch int; + BEGIN + z11x := r1x; + z11y := r1y; + z11w := r1w; + z11h := min(max(0, r2y - r1y), r1h); + + z12x := r1x; + z12y := z11y + z11h; + z12w := min(max(0, r2x - r1x), r1w); + z12h := max(0, min(max(0, r2y + r2h - (r1y + z11h)), z11y + r1h - z12y)); + + z13x := max(min(r1x + r1w, r2x + r2w), r1x); + z13y := z12y; + z13w := min(max(0, r1x + r1w - (r2x + r2w)), r1w); + z13h := z12h; + + z14x := r1x; + z14y := z12y + z12h; + z14w := r1w; + z14h := min(max(0, r1y + r1h - (r2y + r2h)), r1h); + + z21x := r2x; + z21y := r2y; + z21w := r2w; + z21h := min(max(0, r1y - r2y), r2h); + + z22x := r2x; + z22y := z21y + z21h; + z22w := min(max(0, r1x - r2x), r2w); + z22h := max(0, min(max(0, r1y + r1h - (r2y + z21h)), z21y + r2h - z22y)); + + z23x := max(min(r2x + r2w, r1x + r1w), r2x); + z23y := z22y; + z23w := min(max(0, r2x + r2w - (r1x + r1w)), r2w); + z23h := z22h; + + z24x := r2x; + z24y := z22y + z22h; + z24w := r2w; + z24h := min(max(0, r2y + r2h - (r1y + r1h)), r2h); + + zcx := z12x + z12w; + zcy := z12y; + zcw := z13x - (z12x + z12w); + zch := z14y - z12y; + + -- Merge z11 with z12 if they are continuous parts of the same vertical bar + IF z12h > 0 AND z12x = z11x AND z12w = z11w THEN + z12y := z11y; + z12h := z11h + z12h; + z11h := 0; + END IF; + + -- Merge z11 with z13 if they are continuous parts of the same vertical bar + IF z13h > 0 AND z13x = z11x AND z13w = z11w THEN + z13y := z11y; + z13h := z11h + z13h; + z11h := 0; + END IF; + + -- Merge z12 with z14 if they are continuous parts of the same vertical bar + IF z14h > 0 AND z14x = z12x AND z14w = z12w THEN + z14y := z12y; + z14h := z12h + z14h; + z12h := 0; + END IF; + + -- Merge z13 with z14 if they are continuous parts of the same vertical bar + IF z14h > 0 AND z14x = z13x AND z14w = z13w THEN + z14y := z13y; + z14h := z13h + z14h; + z13h := 0; + END IF; + + -- Merge z21 with z22 if they are continuous parts of the same vertical bar + IF z22h > 0 AND z22x = z21x AND z22w = z21w THEN + z22y := z21y; + z22h := z21h + z22h; + z21h := 0; + END IF; + + -- Merge z21 with z23 if they are continuous parts of the same vertical bar + IF z23h > 0 AND z23x = z21x AND z23w = z21w THEN + z23y := z21y; + z23h := z21h + z23h; + z21h := 0; + END IF; + + -- Merge z22 with z24 if they are continuous parts of the same vertical bar + IF z24h > 0 AND z24x = z22x AND z24w = z22w THEN + z24y := z22y; + z24h := z22h + z24h; + z22h := 0; + END IF; + + -- Merge z23 with z24 if they are continuous parts of the same vertical bar + IF z24h > 0 AND z24x = z23x AND z24w = z23w THEN + z24y := z23y; + z24h := z23h + z24h; + z23h := 0; + END IF; + RETURN ARRAY[z11x, z11y, z11w, z11h, z12x, z12y, z12w, z12h, z13x, z13y, z13w, z13h, z14x, z14y, z14w, z14h, z21x, z21y, z21w, z21h, z22x, z22y, z22w, z22h, z23x, z23y, z23w, z23h, z24x, z24y, z24w, z24h, zcx, zcy, zcw, zch]; + END; + $$ + LANGUAGE 'plpgsql'; + +--DROP FUNCTION _MapAlgebraPartsGeom(r1x int, r1y int, r1w int, r1h int, r2x int, r2y int, r2w int, r2h int); +CREATE OR REPLACE FUNCTION _MapAlgebraPartsGeom(nx int, + ny int, + r1x int, + r1y int, + r1w int, + r1h int, + r2x int, + r2y int, + r2w int, + r2h int) + RETURNS SETOF geometry AS + $$ + DECLARE + BEGIN + RETURN NEXT ST_MakeBox2D(ST_Point(10 * ny + r1x, -10 * nx + 5 - r1y), ST_Point(10 * ny + r1x + r1w, -10 * nx + 5 - (r1y + r1h)))::geometry; + RETURN NEXT ST_MakeBox2D(ST_Point(10 * ny + r2x, -10 * nx + 5 - r2y), ST_Point(10 * ny + r2x + r2w, -10 * nx + 5 - (r2y + r2h)))::geometry; + RETURN; + END; + $$ + LANGUAGE 'plpgsql'; + +CREATE OR REPLACE FUNCTION _MapAlgebraAllPartsGeom(r1x int, + r1y int, + r1w int, + r1h int, + r2x int, + r2y int, + r2w int, + r2h int) + RETURNS SETOF geometry AS + $$ + DECLARE + z int[]; + BEGIN + z := _MapAlgebraParts(r1x, r1y, r1w, r1h, r2x, r2y, r2w, r2h); + RETURN NEXT ST_MakeBox2D(ST_Point(z[1], z[2]), ST_Point(z[1] + z[3], z[2] + z[4]))::geometry; + RETURN NEXT ST_MakeBox2D(ST_Point(z[5], z[6]), ST_Point(z[5] + z[7], z[6] + z[8]))::geometry; + RETURN NEXT ST_MakeBox2D(ST_Point(z[9], z[10]), ST_Point(z[9] + z[11], z[10] + z[12]))::geometry; + RETURN NEXT ST_MakeBox2D(ST_Point(z[13], z[14]), ST_Point(z[13] + z[15], z[14] + z[16]))::geometry; + + RETURN NEXT ST_MakeBox2D(ST_Point(z[17], z[18]), ST_Point(z[17] + z[19], z[18] + z[20]))::geometry; + RETURN NEXT ST_MakeBox2D(ST_Point(z[21], z[22]), ST_Point(z[21] + z[23], z[22] + z[24]))::geometry; + RETURN NEXT ST_MakeBox2D(ST_Point(z[25], z[26]), ST_Point(z[25] + z[27], z[26] + z[28]))::geometry; + RETURN NEXT ST_MakeBox2D(ST_Point(z[29], z[30]), ST_Point(z[29] + z[31], z[30] + z[32]))::geometry; + + RETURN NEXT ST_MakeBox2D(ST_Point(z[33], z[34]), ST_Point(z[33] + z[35], z[34] + z[36]))::geometry; + RETURN; + END; + $$ + LANGUAGE 'plpgsql'; + +SELECT asbinary(_MapAlgebraAllPartsGeom(0, 0, 1, 1, 1, 0, 1, 1)) + +CREATE OR REPLACE FUNCTION X1W1X2W2() + RETURNS SETOF record AS + $$ + DECLARE + x1w1x2w2 record; + BEGIN + x1w1x2w2 := (0, 3-4, 2, 0-4, 2); + RETURN NEXT x1w1x2w2; + x1w1x2w2 := (1, 2-4, 3, 0-4, 2); + RETURN NEXT x1w1x2w2; + x1w1x2w2 := (2, 2-4, 3, 0-4, 3); + RETURN NEXT x1w1x2w2; + x1w1x2w2 := (3, 2-4, 3, 0-4, 5); + RETURN NEXT x1w1x2w2; + x1w1x2w2 := (4, 1-4, 3, 0-4, 5); + RETURN NEXT x1w1x2w2; + x1w1x2w2 := (5, 1-4, 4, 1-4, 2); + RETURN NEXT x1w1x2w2; + x1w1x2w2 := (6, 1-4, 3, 1-4, 3); + RETURN NEXT x1w1x2w2; + x1w1x2w2 := (7, 1-4, 2, 1-4, 4); + RETURN NEXT x1w1x2w2; + x1w1x2w2 := (8, 0-4, 5, 1-4, 3); + RETURN NEXT x1w1x2w2; + x1w1x2w2 := (9, 0-4, 5, 1-4, 4); + RETURN NEXT x1w1x2w2; + x1w1x2w2 := (10, 0-4, 3, 2-4, 3); + RETURN NEXT x1w1x2w2; + x1w1x2w2 := (11, 0-4, 3, 3-4, 2); + RETURN NEXT x1w1x2w2; + x1w1x2w2 := (12, 0-4, 2, 3-4, 2); + RETURN NEXT x1w1x2w2; + RETURN; + END; + $$ + LANGUAGE 'plpgsql'; + +CREATE OR REPLACE FUNCTION Y1H1Y2H2() + RETURNS SETOF record AS + $$ + DECLARE + y1h1y2h2 record; + BEGIN + y1h1y2h2 := (0, 3-4, 2, 0-4, 2); + RETURN NEXT y1h1y2h2; + y1h1y2h2 := (1, 2-4, 3, 0-4, 2); + RETURN NEXT y1h1y2h2; + y1h1y2h2 := (2, 2-4, 3, 0-4, 3); + RETURN NEXT y1h1y2h2; + y1h1y2h2 := (3, 2-4, 3, 0-4, 5); + RETURN NEXT y1h1y2h2; + y1h1y2h2 := (4, 1-4, 3, 0-4, 5); + RETURN NEXT y1h1y2h2; + y1h1y2h2 := (5, 1-4, 4, 1-4, 2); + RETURN NEXT y1h1y2h2; + y1h1y2h2 := (6, 1-4, 3, 1-4, 3); + RETURN NEXT y1h1y2h2; + y1h1y2h2 := (7, 1-4, 2, 1-4, 4); + RETURN NEXT y1h1y2h2; + y1h1y2h2 := (8, 0-4, 5, 1-4, 3); + RETURN NEXT y1h1y2h2; + y1h1y2h2 := (9, 0-4, 5, 1-4, 4); + RETURN NEXT y1h1y2h2; + y1h1y2h2 := (10, 0-4, 3, 2-4, 3); + RETURN NEXT y1h1y2h2; + y1h1y2h2 := (11, 0-4, 3, 3-4, 2); + RETURN NEXT y1h1y2h2; + y1h1y2h2 := (12, 0-4, 2, 3-4, 2); + RETURN NEXT y1h1y2h2; + RETURN; + END; + $$ + LANGUAGE 'plpgsql'; + +_MapAlgebraParts(r1x, r1y, r1w, r1h, r2x, r2y, r2w, r2h) + +SELECT nx, x1, w1, x2, w2 FROM X1W1X2W2() as (nx int, x1 int, w1 int, x2 int, w2 int); + +SELECT nx, ny, x1, w1, x2, w2, y1, h1, y2, h2 +FROM X1W1X2W2() as (nx int, x1 int, w1 int, x2 int, w2 int), Y1H1Y2H2() as (ny int, y1 int, h1 int, y2 int, h2 int); + +SELECT nx, ny, x1, w1, x2, w2, y1, h1, y2, h2, asbinary(_MapAlgebraPartsGeom(nx, ny, x1, y1, w1, h1, x2, y2, w2, h2)) +FROM X1W1X2W2() as (nx int, x1 int, w1 int, x2 int, w2 int), Y1H1Y2H2() as (ny int, y1 int, h1 int, y2 int, h2 int); + +SELECT asbinary(_MapAlgebraPartsGeom(nx, ny, x1, y1, w1, h1, x2, y2, w2, h2)) +FROM X1W1X2W2() as (nx int, x1 int, w1 int, x2 int, w2 int), Y1H1Y2H2() as (ny int, y1 int, h1 int, y2 int, h2 int); + + +-- First series of zones covering raster 1 +SELECT nx, ny, map[1], map[2], map[3], map[4], + asbinary(ST_MakeBox2D(ST_Point(10 * ny + map[1], -10 * nx + 5 - map[2]), ST_Point(10 * ny + map[1] + map[3], -10 * nx + 5 - (map[2] + map[4])))::geometry) +FROM ( + SELECT nx, ny, x1, y1, w1, h1, x2, y2, w2, h2, _MapAlgebraParts(x1, y1, w1, h1, x2, y2, w2, h2) as map + FROM X1W1X2W2() as (nx int, x1 int, w1 int, x2 int, w2 int), Y1H1Y2H2() as (ny int, y1 int, h1 int, y2 int, h2 int) + ) as foo; + +-- Second series of zones covering raster 1 +SELECT nx, ny, map[5], map[6], map[7], map[8], + asbinary(ST_Point(10 * ny + map[5], -10 * nx + 5 - map[6])::geometry) +FROM ( + SELECT nx, ny, x1, y1, w1, h1, x2, y2, w2, h2, _MapAlgebraParts(x1, y1, w1, h1, x2, y2, w2, h2) as map + FROM X1W1X2W2() as (nx int, x1 int, w1 int, x2 int, w2 int), Y1H1Y2H2() as (ny int, y1 int, h1 int, y2 int, h2 int) + ) as foo; + +SELECT nx, ny, map[5], map[6], map[7], map[8], + asbinary(ST_MakeBox2D(ST_Point(10 * ny + map[5], -10 * nx + 5 - map[6]), ST_Point(10 * ny + map[5] + map[7], -10 * nx + 5 - (map[6] + map[8])))::geometry) +FROM ( + SELECT nx, ny, x1, y1, w1, h1, x2, y2, w2, h2, _MapAlgebraParts(x1, y1, w1, h1, x2, y2, w2, h2) as map + FROM X1W1X2W2() as (nx int, x1 int, w1 int, x2 int, w2 int), Y1H1Y2H2() as (ny int, y1 int, h1 int, y2 int, h2 int) + ) as foo; + +-- Third series of zones covering raster 1 +SELECT nx, ny, map[9], map[10], map[11], map[12], + asbinary(ST_MakeBox2D(ST_Point(10 * ny + map[9], -10 * nx + 5 - map[10]), ST_Point(10 * ny + map[9] + map[11], -10 * nx + 5 - (map[10] + map[12])))::geometry) +FROM ( + SELECT nx, ny, x1, y1, w1, h1, x2, y2, w2, h2, _MapAlgebraParts(x1, y1, w1, h1, x2, y2, w2, h2) as map + FROM X1W1X2W2() as (nx int, x1 int, w1 int, x2 int, w2 int), Y1H1Y2H2() as (ny int, y1 int, h1 int, y2 int, h2 int) + ) as foo; + +-- Fourth series of zones covering raster 1 +SELECT nx, ny, map[13], map[14], map[15], map[16], + asbinary(ST_MakeBox2D(ST_Point(10 * ny + map[13], -10 * nx + 5 - map[14]), ST_Point(10 * ny + map[13] + map[15], -10 * nx + 5 - (map[14] + map[16])))::geometry) +FROM ( + SELECT nx, ny, x1, y1, w1, h1, x2, y2, w2, h2, _MapAlgebraParts(x1, y1, w1, h1, x2, y2, w2, h2) as map + FROM X1W1X2W2() as (nx int, x1 int, w1 int, x2 int, w2 int), Y1H1Y2H2() as (ny int, y1 int, h1 int, y2 int, h2 int) + ) as foo; + +-- First series of zones covering raster 2 +SELECT nx, ny, map[17], map[18], map[19], map[20], + asbinary(ST_MakeBox2D(ST_Point(10 * ny + map[17], -10 * nx + 5 - map[18]), ST_Point(10 * ny + map[17] + map[19], -10 * nx + 5 - (map[18] + map[20])))::geometry) +FROM ( + SELECT nx, ny, x1, y1, w1, h1, x2, y2, w2, h2, _MapAlgebraParts(x1, y1, w1, h1, x2, y2, w2, h2) as map + FROM X1W1X2W2() as (nx int, x1 int, w1 int, x2 int, w2 int), Y1H1Y2H2() as (ny int, y1 int, h1 int, y2 int, h2 int) + ) as foo; + +-- Second series of zones covering raster 2 +SELECT nx, ny, map[21], map[22], map[23], map[24], + asbinary(ST_Point(10 * ny + map[21], -10 * nx + 5 - map[22])::geometry) +FROM ( + SELECT nx, ny, x1, y1, w1, h1, x2, y2, w2, h2, _MapAlgebraParts(x1, y1, w1, h1, x2, y2, w2, h2) as map + FROM X1W1X2W2() as (nx int, x1 int, w1 int, x2 int, w2 int), Y1H1Y2H2() as (ny int, y1 int, h1 int, y2 int, h2 int) + ) as foo; + +SELECT nx, ny, map[21], map[22], map[23], map[24], + asbinary(ST_MakeBox2D(ST_Point(10 * ny + map[21], -10 * nx + 5 - map[22]), ST_Point(10 * ny + map[21] + map[23], -10 * nx + 5 - (map[22] + map[24])))::geometry) +FROM ( + SELECT nx, ny, x1, y1, w1, h1, x2, y2, w2, h2, _MapAlgebraParts(x1, y1, w1, h1, x2, y2, w2, h2) as map + FROM X1W1X2W2() as (nx int, x1 int, w1 int, x2 int, w2 int), Y1H1Y2H2() as (ny int, y1 int, h1 int, y2 int, h2 int) + ) as foo; + +-- Third series of zones covering raster 2 +SELECT nx, ny, map[25], map[26], map[27], map[28], + asbinary(ST_MakeBox2D(ST_Point(10 * ny + map[25], -10 * nx + 5 - map[26]), ST_Point(10 * ny + map[25] + map[27], -10 * nx + 5 - (map[26] + map[28])))::geometry) +FROM ( + SELECT nx, ny, x1, y1, w1, h1, x2, y2, w2, h2, _MapAlgebraParts(x1, y1, w1, h1, x2, y2, w2, h2) as map + FROM X1W1X2W2() as (nx int, x1 int, w1 int, x2 int, w2 int), Y1H1Y2H2() as (ny int, y1 int, h1 int, y2 int, h2 int) + ) as foo; + +-- Fourth series of zones covering raster 2 +SELECT nx, ny, map[29], map[30], map[31], map[32], + asbinary(ST_MakeBox2D(ST_Point(10 * ny + map[28], -10 * nx + 5 - map[29]), ST_Point(10 * ny + map[28] + map[30], -10 * nx + 5 - (map[29] + map[31])))::geometry) +FROM ( + SELECT nx, ny, x1, y1, w1, h1, x2, y2, w2, h2, _MapAlgebraParts(x1, y1, w1, h1, x2, y2, w2, h2) as map + FROM X1W1X2W2() as (nx int, x1 int, w1 int, x2 int, w2 int), Y1H1Y2H2() as (ny int, y1 int, h1 int, y2 int, h2 int) + ) as foo; + +-- Common zone +SELECT nx, ny, map[33], map[34], map[35], map[36], + asbinary(ST_MakeBox2D(ST_Point(10 * ny + map[33], -10 * nx + 5 - map[34]), ST_Point(10 * ny + map[33] + map[35], -10 * nx + 5 - (map[34] + map[36])))::geometry) +FROM ( + SELECT nx, ny, x1, y1, w1, h1, x2, y2, w2, h2, _MapAlgebraParts(x1, y1, w1, h1, x2, y2, w2, h2) as map + FROM X1W1X2W2() as (nx int, x1 int, w1 int, x2 int, w2 int), Y1H1Y2H2() as (ny int, y1 int, h1 int, y2 int, h2 int) + ) as foo; \ No newline at end of file diff -Nru postgis-1.5.3/raster/scripts/plpgsql/readme.txt postgis-2.0.1/raster/scripts/plpgsql/readme.txt --- postgis-1.5.3/raster/scripts/plpgsql/readme.txt 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/scripts/plpgsql/readme.txt 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1 @@ +This folder contain experimental pl/pgSQL functions which might be implemented later as C functions. To be used with caution. \ No newline at end of file diff -Nru postgis-1.5.3/raster/scripts/plpgsql/st_addband.sql postgis-2.0.1/raster/scripts/plpgsql/st_addband.sql --- postgis-1.5.3/raster/scripts/plpgsql/st_addband.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/scripts/plpgsql/st_addband.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,54 @@ +---------------------------------------------------------------------- +-- +-- $Id: st_addband.sql 6127 2010-10-25 16:06:00Z jorgearevalo $ +-- +-- Copyright (c) 2009-2010 Pierre Racine +-- +---------------------------------------------------------------------- + +-- NOTE: This function is provided merely as an example since a C version was implemented and is now provided in rtpostgis.sql + +CREATE OR REPLACE FUNCTION ST_AddBand(rast1 raster, rast2 raster, band int, index int) + RETURNS raster AS + $$ + DECLARE + newraster raster; + newnodatavalue int; + newindex int := index; + newband int := band; + x int; + y int; + BEGIN + IF ST_Width(rast1) != ST_Width(rast2) OR ST_Height(rast1) != ST_Height(rast2) THEN + RAISE EXCEPTION 'ST_AddBand: Attempting to add a band with different width or height'; + END IF; + IF newindex < 1 THEN + newindex := 1; + END IF; + IF newindex IS NULL OR newindex > ST_NumBands(rast1) THEN + newindex := ST_NumBands(rast1) + 1; + END IF; + IF newband < 1 THEN + newband := 1; + END IF; + IF newband IS NULL OR newband > ST_NumBands(rast2) THEN + newband := ST_NumBands(rast2); + END IF; + + IF newband = 0 THEN + RETURN rast1; + END IF; + newnodatavalue := ST_BandNodataValue(rast2, newband); + newraster := ST_AddBand(rast1, newindex, ST_BandPixelType(rast2, newband), newnodatavalue, newnodatavalue); + FOR x IN 1..ST_Width(rast2) LOOP + FOR y IN 1..ST_Height(rast2) LOOP + newraster := ST_SetValue(newraster, newindex, x, y, ST_Value(rast2, newband, x, y)); + END LOOP; + END LOOP; + RETURN newraster; + END; + $$ + LANGUAGE 'plpgsql'; + +--Test +SELECT ST_NumBands(ST_AddBand(ST_TestRaster(0, 0, 1), ST_TestRaster(0, 0, 1), 1, 2)) \ No newline at end of file diff -Nru postgis-1.5.3/raster/scripts/plpgsql/st_areaweightedsummarystats.sql postgis-2.0.1/raster/scripts/plpgsql/st_areaweightedsummarystats.sql --- postgis-1.5.3/raster/scripts/plpgsql/st_areaweightedsummarystats.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/scripts/plpgsql/st_areaweightedsummarystats.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,231 @@ +--------------------------------------------------------------------- +-- ST_AreaWeightedSummaryStats AGGREGATE +-- Compute statistics of a value weighted by the area of the corresponding geometry. +-- Specially written to be used with ST_Intersection(raster, geometry) +-- +-- Exemple +-- SELECT gt.id, +-- (aws).count, +-- (aws).distinctcount, +-- (aws).geom, +-- (aws).totalarea, +-- (aws).meanarea, +-- (aws).totalperimeter, +-- (aws).meanperimeter, +-- (aws).weightedsum, +-- (aws).weightedmean, +-- (aws).maxareavalue, +-- (aws).minareavalue, +-- (aws).maxcombinedareavalue, +-- (aws).mincombinedareavalue, +-- (aws).sum, +-- (aws).mean, +-- (aws).max, +-- (aws).min +-- FROM (SELECT ST_AreaWeightedSummaryStats(gv) aws +-- FROM (SELECT ST_Intersection(rt.rast, gt.geom) gv +-- FROM rasttable rt, geomtable gt +-- WHERE ST_Intersects(rt.rast, gt.geom) +-- ) foo +-- GROUP BY gt.id +-- ) foo2 +--------------------------------------------------------------------- + +--DROP TYPE arealweightedstats CASCADE; +CREATE TYPE arealweightedstats AS ( + count int, + distinctcount int, + geom geometry, + totalarea double precision, + meanarea double precision, + totalperimeter double precision, + meanperimeter double precision, + weightedsum double precision, + weightedmean double precision, + maxareavalue double precision, + minareavalue double precision, + maxcombinedareavalue double precision, + mincombinedareavalue double precision, + sum double precision, + mean double precision, + max double precision, + min double precision +); + +-- DROP TYPE arealweightedstatsstate CASCADE; +CREATE TYPE arealweightedstatsstate AS ( + count int, + distinctvalues double precision[], + unionedgeom geometry, + totalarea double precision, + totalperimeter double precision, + weightedsum double precision, + maxareavalue double precision[], + minareavalue double precision[], + combinedweightedareas double precision[], + sum double precision, + max double precision, + min double precision +); + +--------------------------------------------------------------------- +-- geomval_arealweightedstate +-- State function used by the ST_AreaWeightedSummaryStats aggregate +CREATE OR REPLACE FUNCTION geomval_arealweightedstate(aws arealweightedstatsstate, gv geomval) + RETURNS arealweightedstatsstate + AS $$ + DECLARE + i int; + ret arealweightedstatsstate; + newcombinedweightedareas double precision[] := ($1).combinedweightedareas; + newgeom geometry := ($2).geom; + geomtype text := GeometryType(($2).geom); + BEGIN + IF geomtype = 'GEOMETRYCOLLECTION' THEN + newgeom := ST_CollectionExtract(newgeom, 3); + END IF; + IF newgeom IS NULL OR ST_IsEmpty(newgeom) OR geomtype = 'POINT' OR geomtype = 'LINESTRING' OR geomtype = 'MULTIPOINT' OR geomtype = 'MULTILINESTRING' THEN + ret := aws; + ELSEIF $1 IS NULL THEN + ret := (1, + ARRAY[($2).val], + newgeom, + ST_Area(newgeom), + ST_Perimeter(newgeom), + ($2).val * ST_Area(newgeom), + ARRAY[ST_Area(newgeom), ($2).val], + ARRAY[ST_Area(newgeom), ($2).val], + ARRAY[ST_Area(newgeom)], + ($2).val, + ($2).val, + ($2).val + )::arealweightedstatsstate; + ELSE + -- Search for the new value in the array of distinct values + SELECT n FROM generate_series(1, array_length(($1).distinctvalues, 1)) n WHERE (($1).distinctvalues)[n] = ($2).val INTO i; +RAISE NOTICE 'i=% ',i; + -- If the value already exists, increment the corresponding area with the new area + IF NOT i IS NULL THEN + newcombinedweightedareas[i] := newcombinedweightedareas[i] + ST_Area(newgeom); + END IF; + ret := (($1).count + 1, + CASE WHEN i IS NULL THEN array_append(($1).distinctvalues, ($2).val) ELSE ($1).distinctvalues END, + ST_Union(($1).unionedgeom, newgeom), + ($1).totalarea + ST_Area(newgeom), + ($1).totalperimeter + ST_Perimeter(newgeom), + ($1).weightedsum + ($2).val * ST_Area(newgeom), + CASE WHEN ST_Area(newgeom) > (($1).maxareavalue)[1] THEN ARRAY[ST_Area(newgeom), ($2).val] ELSE ($1).maxareavalue END, + CASE WHEN ST_Area(newgeom) < (($1).minareavalue)[1] THEN ARRAY[ST_Area(newgeom), ($2).val] ELSE ($1).minareavalue END, + CASE WHEN i IS NULL THEN array_append(($1).combinedweightedareas, ST_Area(newgeom)) ELSE ($1).combinedweightedareas END, + ($1).sum + ($2).val, + greatest(($1).max, ($2).val), + least(($1).min, ($2).val) + )::arealweightedstatsstate; + END IF; + RETURN ret; + END; + $$ + LANGUAGE 'plpgsql'; + +CREATE OR REPLACE FUNCTION geomval_arealweightedstate(aws arealweightedstatsstate, geom geometry, val double precision) + RETURNS arealweightedstatsstate + AS $$ + SELECT geomval_arealweightedstate($1, ($2, $3)::geomval); + $$ LANGUAGE 'SQL'; + +--------------------------------------------------------------------- +-- geomval_arealweightedfinal +-- Final function used by the ST_AreaWeightedSummaryStats aggregate +CREATE OR REPLACE FUNCTION geomval_arealweightedfinal(aws arealweightedstatsstate) + RETURNS arealweightedstats + AS $$ + DECLARE + a RECORD; + maxarea double precision = 0.0; + minarea double precision = (($1).combinedweightedareas)[1]; + imax int := 1; + imin int := 1; + ret arealweightedstats; + BEGIN + -- Search for the max and the min areas in the array of all distinct values + FOR a IN SELECT n, (($1).combinedweightedareas)[n] warea FROM generate_series(1, array_length(($1).combinedweightedareas, 1)) n LOOP + IF a.warea > maxarea THEN + imax := a.n; + maxarea = a.warea; + END IF; + IF a.warea < minarea THEN + imin := a.n; + minarea = a.warea; + END IF; + END LOOP; + + ret := (($1).count, + array_length(($1).distinctvalues, 1), + ($1).unionedgeom, + ($1).totalarea, + ($1).totalarea / ($1).count, + ($1).totalperimeter, + ($1).totalperimeter / ($1).count, + ($1).weightedsum, + ($1).weightedsum / ($1).totalarea, + (($1).maxareavalue)[2], + (($1).minareavalue)[2], + (($1).distinctvalues)[imax], + (($1).distinctvalues)[imin], + ($1).sum, + ($1).sum / ($1).count, + ($1).max, + ($1).min + )::arealweightedstats; + RETURN ret; + END; + $$ + LANGUAGE 'plpgsql'; + +--------------------------------------------------------------------- +-- ST_AreaWeightedSummaryStats AGGREGATE +--------------------------------------------------------------------- +CREATE AGGREGATE ST_AreaWeightedSummaryStats(geomval) ( + SFUNC=geomval_arealweightedstate, + STYPE=arealweightedstatsstate, + FINALFUNC=geomval_arealweightedfinal +); + +--------------------------------------------------------------------- +-- ST_AreaWeightedSummaryStats AGGREGATE +--------------------------------------------------------------------- +CREATE AGGREGATE ST_AreaWeightedSummaryStats(geometry, double precision) ( + SFUNC=geomval_arealweightedstate, + STYPE=arealweightedstatsstate, + FINALFUNC=geomval_arealweightedfinal +); + + +SELECT id, + (aws).count, + (aws).distinctcount, + (aws).geom, + (aws).totalarea, + (aws).meanarea, + (aws).totalperimeter, + (aws).meanperimeter, + (aws).weightedsum, + (aws).weightedmean, + (aws).maxareavalue, + (aws).minareavalue, + (aws).maxcombinedareavalue, + (aws).mincombinedareavalue, + (aws).sum, + (aws).mean, + (aws).max, + (aws).min +FROM (SELECT ST_AreaWeightedSummaryStats((geom, weight)::geomval) as aws, id + FROM (SELECT ST_GeomFromEWKT('SRID=4269;POLYGON((0 0,0 10, 10 10, 10 0, 0 0))') as geom, 'a' as id, 100 as weight + UNION ALL + SELECT ST_GeomFromEWKT('SRID=4269;POLYGON((12 0,12 1, 13 1, 13 0, 12 0))') as geom, 'a' as id, 1 as weight + UNION ALL + SELECT ST_GeomFromEWKT('SRID=4269;POLYGON((10 0, 10 2, 12 2, 12 0, 10 0))') as geom, 'b' as id, 4 as weight + ) foo + GROUP BY id + ) foo2 + diff -Nru postgis-1.5.3/raster/scripts/plpgsql/st_asraster.sql postgis-2.0.1/raster/scripts/plpgsql/st_asraster.sql --- postgis-1.5.3/raster/scripts/plpgsql/st_asraster.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/scripts/plpgsql/st_asraster.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,50 @@ +---------------------------------------------------------------------- +-- +-- $Id: st_asraster.sql 9324 2012-02-27 22:08:12Z pramsey $ +-- +-- Copyright (c) 2009-2010 Pierre Racine +-- +---------------------------------------------------------------------- + +-- NOTE: The ST_AsRaster() function is already implemented in C. This plpgsql script is provided only as an example. +-- Defining the plpgsql function below might overwrite the current C implementation and brake other functions dependent on it. +-- Use with caution. + +CREATE OR REPLACE FUNCTION ST_AsRaster(geom geometry, rast raster, pixeltype text, nodatavalue float8, val float8) + RETURNS raster AS + $$ + DECLARE + numband int := ST_NumBands(rast); + x1w float8 := ST_XMin(geom); + y1w float8 := ST_YMax(geom); + x2w float8 := ST_XMax(geom); + y2w float8 := ST_YMin(geom); + x1r int := ST_World2RasterCoordX(rast, x1w, y1w); + y1r int := ST_World2RasterCoordY(rast, x1w, y1w); + x2r int := ST_World2RasterCoordX(rast, x2w, y2w); + y2r int := ST_World2RasterCoordY(rast, x2w, y2w); + newx1w float8 := ST_Raster2WorldCoordX(rast, x1r, y1r); + newy1w float8 := ST_Raster2WorldCoordY(rast, x1r, y1r); + newwidth int := abs(x2r - x1r) + 1; + newheight int := abs(y2r - y1r) + 1; + newrast raster := ST_AddBand(ST_MakeEmptyRaster(newwidth, newheight, newx1w, newy1w, ST_ScaleX(rast), ST_ScaleY(rast), ST_SkewX(rast), ST_SkewY(rast), ST_SRID(rast)), pixeltype, nodatavalue, nodatavalue); + BEGIN + FOR x IN 1..newwidth LOOP + FOR y IN 1..newheight LOOP + IF ST_Intersects(geom, ST_Centroid(ST_PixelAsPolygon(newrast, x, y))) THEN + newrast := ST_SetValue(newrast, 1, x, y, val); + END IF; + END LOOP; + END LOOP; + RETURN newrast; + END; + $$ + LANGUAGE 'plpgsql'; + +-- Test + +SELECT (gv).geom, (gv).val +FROM (SELECT (ST_PixelAsPolygons(rast, 1)) gv +FROM (SELECT ST_AsRaster(the_geom, (SELECT rast FROM srtm_tiled_100x100 LIMIT 1), '8BSI', -1, 1) rast +FROM realcaribou_buffers_wgs +LIMIT 10) foo) foi diff -Nru postgis-1.5.3/raster/scripts/plpgsql/st_clip.sql postgis-2.0.1/raster/scripts/plpgsql/st_clip.sql --- postgis-1.5.3/raster/scripts/plpgsql/st_clip.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/scripts/plpgsql/st_clip.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,191 @@ +---------------------------------------------------------------------- +-- +-- $Id: st_clip.sql 9324 2012-02-27 22:08:12Z pramsey $ +-- +-- Copyright (c) 2009-2010 Pierre Racine +-- +---------------------------------------------------------------------- + +-- NOTE: The ST_Clip function found in this file still many improvements before being implemented in C. + +CREATE OR REPLACE FUNCTION ST_Clip(rast raster, x int, y int, width int, height int) + RETURNS raster AS + $$ + DECLARE + newrast raster := ST_MakeEmptyRaster(width, height, ST_UpperLeftX(rast), ST_UpperLeftY(rast), + ST_ScaleX(rast), ST_ScaleY(rast), ST_SkewX(rast), ST_SkewY(rast), ST_SRID(rast)); + numband int := ST_Numbands(rast); + band int; + cx int; + cy int; + newwidth int := CASE WHEN x + width > ST_Width(rast) THEN ST_Width(rast) - x ELSE width END; + newheight int := CASE WHEN y + height > ST_Height(rast) THEN ST_Height(rast) - y ELSE height END; + BEGIN + FOR b IN 1..numband LOOP + newrast := ST_AddBand(newrast, ST_PixelType(rast, band), ST_NodataValue(rast, band), ST_NodataValue(rast, band)); + FOR cx IN 1..newwidth LOOP + FOR cy IN 1..newheight LOOP + newrast := ST_SetValue(newrast, band, cx, cy, ST_Value(rast, band, cx + x - 1, cy + y - 1)); + END LOOP; + END LOOP; + END LOOP; + RETURN newrast; + END; + $$ + LANGUAGE 'plpgsql'; +------------------------------------------------------------------- +-- ST_Clip +-- Clip the values of a raster to the shape of a polygon. +-- +-- rast - raster to be clipped +-- band - limit the result to only one band +-- geom - geometry defining the she to clip the raster +-- nodata - define (if there is none defined) or replace the raster nodata value with this value +-- trimraster - limit the extent of the result to the extent of the geometry +-- Todo: +-- test point +-- test line +-- test polygon smaller than pixel +-- test and optimize raster totally included in polygon +CREATE OR REPLACE FUNCTION ST_Clip(rast raster, band int, geom geometry, nodata float8 DEFAULT null, trimraster boolean DEFAULT false) + RETURNS raster AS + $$ + DECLARE + sourceraster raster := rast; + newrast raster; + geomrast raster; + numband int := ST_Numbands(rast); + bandstart int; + bandend int; + newextent text; + newnodata float8; + newpixtype text; + bandi int; + BEGIN + IF rast IS NULL THEN + RETURN null; + END IF; + IF geom IS NULL THEN + RETURN rast; + END IF; + IF band IS NULL THEN + bandstart := 1; + bandend := numband; + ELSEIF ST_HasNoBand(rast, band) THEN + RAISE NOTICE 'Raster do not have band %. Returning null', band; + RETURN null; + ELSE + bandstart := band; + bandend := band; + END IF; + newpixtype := ST_BandPixelType(rast, bandstart); + newnodata := coalesce(nodata, ST_BandNodataValue(rast, bandstart), ST_MinPossibleValue(newpixtype)); + newextent := CASE WHEN trimraster THEN 'INTERSECTION' ELSE 'FIRST' END; + +--RAISE NOTICE 'newextent=%', newextent; + -- Convert the geometry to a raster + geomrast := ST_AsRaster(geom, rast, ST_BandPixelType(rast, band), 1, newnodata); + + -- Set the newnodata + sourceraster := ST_SetBandNodataValue(sourceraster, bandstart, newnodata); + + -- Compute the first raster band + newrast := ST_MapAlgebraExpr(sourceraster, bandstart, geomrast, 1, '[rast1.val]', newpixtype, newextent); + + FOR bandi IN bandstart+1..bandend LOOP +--RAISE NOTICE 'bandi=%', bandi; + -- for each band we must determine the nodata value + newpixtype := ST_BandPixelType(rast, bandi); + newnodata := coalesce(nodata, ST_BandNodataValue(sourceraster, bandi), ST_MinPossibleValue(newpixtype)); + sourceraster := ST_SetBandNodataValue(sourceraster, bandi, newnodata); + newrast := ST_AddBand(newrast, ST_MapAlgebraExpr(sourceraster, bandi, geomrast, 1, '[rast1.val]', newpixtype, newextent)); + END LOOP; + RETURN newrast; + END; + $$ + LANGUAGE 'plpgsql'; + +-- Variant defaulting to band 1 +CREATE OR REPLACE FUNCTION ST_Clip(rast raster, geom geometry, nodata float8 DEFAULT null, trimraster boolean DEFAULT false) + RETURNS raster + AS $$ + SELECT ST_Clip($1, 1, $2, $3, $4); + $$ LANGUAGE 'SQL'; + +-- Variant defaulting nodata to the one of the raster or the min possible value +CREATE OR REPLACE FUNCTION ST_Clip(rast raster, band int, geom geometry, trimraster boolean) + RETURNS raster + AS $$ + SELECT ST_Clip($1, $2, $3, null, $4); + $$ LANGUAGE 'SQL'; + +-- Variant defaulting nodata to the one of the raster or the min possible value +CREATE OR REPLACE FUNCTION ST_Clip(rast raster, geom geometry, trimraster boolean) + RETURNS raster + AS $$ + SELECT ST_Clip($1, 1, $2, null, $3); + $$ LANGUAGE 'SQL'; + +-- Test + +CREATE OR REPLACE FUNCTION ST_TestRaster(h integer, w integer, val float8) + RETURNS raster AS + $$ + DECLARE + BEGIN + RETURN ST_AddBand(ST_MakeEmptyRaster(h, w, 0, 0, 1, 1, 0, 0, 0), '32BF', val, 0); + END; + $$ + LANGUAGE 'plpgsql'; + +SELECT ST_Clip(ST_TestRaster(10, 10, 2), 1, ST_Buffer(ST_MakePoint(8, 5), 4)) rast + +-- Test one band raster +SELECT ST_AsBinary((gv).geom), (gv).val +FROM ST_PixelAsPolygons(ST_Clip(ST_TestRaster(10, 10, 2), 1, ST_Buffer(ST_MakePoint(8, 5), 4))) gv + +-- Test two bands raster +SELECT ST_AsBinary((gv).geom), (gv).val +FROM ST_PixelAsPolygons(ST_Clip(ST_AddBand(ST_TestRaster(10, 10, 2), '16BUI'::text, 4, 0), null, ST_Buffer(ST_MakePoint(8, 5), 4)), 2) gv + +-- Test one band raster with trimraster set to true +SELECT ST_AsBinary((gv).geom), (gv).val +FROM ST_PixelAsPolygons(ST_Clip(ST_TestRaster(10, 10, 2), 1, ST_Buffer(ST_MakePoint(8, 5), 4), null, true)) gv + +-- Test two bands raster with trimraster set to true +SELECT ST_AsBinary((gv).geom), (gv).val +FROM ST_PixelAsPolygons(ST_Clip(ST_AddBand(ST_TestRaster(10, 10, 2), '16BUI'::text, 4, 0), null, ST_Buffer(ST_MakePoint(8, 5), 4), null, true), 2) gv + +-- Test nodatavalue set by the first raster +SELECT ST_AsBinary((gv).geom), (gv).val +FROM ST_PixelAsPolygons(ST_SetBandNoDataValue(ST_Clip(ST_TestRaster(10, 10, 2), 1, ST_Buffer(ST_MakePoint(8, 5), 4)), null)) gv + +-- Test nodatavalue set by the parameter +SELECT ST_AsBinary((gv).geom), (gv).val +FROM ST_PixelAsPolygons(ST_SetBandNoDataValue(ST_Clip(ST_TestRaster(10, 10, 2), 1, ST_Buffer(ST_MakePoint(8, 5), 4), -10), null)) gv + +-- Test nodatavalue set by the min possible value +SELECT ST_AsBinary((gv).geom), (gv).val +FROM ST_PixelAsPolygons(ST_SetBandNoDataValue(ST_Clip(ST_SetBandNoDataValue(ST_TestRaster(10, 10, 2), null), 1, ST_Buffer(ST_MakePoint(8, 5), 4)), null)) gv + +-- Test the variant defaulting to band 1 +SELECT ST_Numbands(ST_Clip(ST_AddBand(ST_TestRaster(10, 10, 2), '16BUI'::text, 4, 0), ST_Buffer(ST_MakePoint(8, 5), 4))) gv + +SELECT ST_AsBinary((gv).geom), (gv).val +FROM ST_PixelAsPolygons(ST_Clip(ST_AddBand(ST_TestRaster(10, 10, 2), '16BUI'::text, 4, 0), ST_Buffer(ST_MakePoint(8, 5), 4)), 1) gv + +-- Test defaulting to min possible value and band 1 +SELECT ST_AsBinary((gv).geom), (gv).val +FROM ST_PixelAsPolygons(ST_SetBandNoDataValue(ST_Clip(ST_SetBandNoDataValue(ST_TestRaster(10, 10, 2), null), ST_Buffer(ST_MakePoint(8, 5), 4)), null)) gv + +-- Test defaulting to nodatavalue set by the first raster and band 1 +SELECT ST_AsBinary((gv).geom), (gv).val +FROM ST_PixelAsPolygons(ST_SetBandNoDataValue(ST_Clip(ST_TestRaster(10, 10, 2), ST_Buffer(ST_MakePoint(8, 5), 4)), null)) gv + +-- Test when band number does not exist +SELECT ST_AsBinary((gv).geom), (gv).val +FROM ST_PixelAsPolygons(ST_Clip(ST_TestRaster(10, 10, 2), 2, ST_Buffer(ST_MakePoint(8, 5), 4))) gv + +-- Test point -- bug. The produced raster does not have the same alignment +SELECT ST_AsBinary((gv).geom), (gv).val +FROM ST_PixelAsPolygons(ST_Clip(ST_TestRaster(10, 10, 2), ST_MakePoint(8.5, 5.5))) gv diff -Nru postgis-1.5.3/raster/scripts/plpgsql/st_createindexraster.sql postgis-2.0.1/raster/scripts/plpgsql/st_createindexraster.sql --- postgis-1.5.3/raster/scripts/plpgsql/st_createindexraster.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/scripts/plpgsql/st_createindexraster.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,73 @@ +---------------------------------------------------------------------------------------------------------------------- +-- Create an index raster. Georeference is borrowed from the provided raster. +-- pixeltype - The pixeltype of the resulting raster +-- startvalue - The first index value assigned to the raster. Default to 0. +-- incwithx - If true, the index increments when the x position of the pixel increments. +-- The index decrement on x otherwise. Default to true. +-- incwithy - If true, the index increments when the y position of the pixel increments. +-- The index decrement on y otherwise. Default to true. +-- columnfirst - If true, columns are traversed first. +-- Rows are traversed first otherwise. Default to true. +-- rowscanorder - If true, the raster is traversed in "row scan" order. +-- Row prime order (Boustrophedon) is used otherwise. Default to true. +-- falsecolinc - Overwrite the column index increment which is normally equal to ST_Height() +-- falserowinc - Overwrite the row index increment which is normally equal to ST_Width() +---------------------------------------------------------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION ST_CreateIndexRaster(rast raster, + pixeltype text DEFAULT '32BUI', + startvalue int DEFAULT 0, + incwithx boolean DEFAULT true, + incwithy boolean DEFAULT true, + columnfirst boolean DEFAULT true, + rowscanorder boolean DEFAULT true, + falsecolinc int DEFAULT NULL, + falserowinc int DEFAULT NULL) +RETURNS raster AS +$BODY$ +DECLARE + newraster raster := ST_AddBand(ST_MakeEmptyRaster(rast), pixeltype); + x int; + y int; + w int := ST_Width(newraster); + h int := ST_Height(newraster); + rowincx int := Coalesce(falserowinc, w); + colincx int := Coalesce(falsecolinc, h); + rowincy int := Coalesce(falserowinc, 1); + colincy int := Coalesce(falsecolinc, 1); + xdir int := CASE WHEN Coalesce(incwithx, true) THEN 1 ELSE w END; + ydir int := CASE WHEN Coalesce(incwithy, true) THEN 1 ELSE h END; + xdflag int := Coalesce(incwithx::int, 1); + ydflag int := Coalesce(incwithy::int, 1); + rsflag int := Coalesce(rowscanorder::int, 1); + newstartvalue int := Coalesce(startvalue, 0); + newcolumnfirst boolean := Coalesce(columnfirst, true); +BEGIN + IF newcolumnfirst THEN + IF colincx <= (h - 1) * rowincy THEN + RAISE EXCEPTION 'Column increment (now %) must be greater than the number of index on one column (now % pixel x % = %)...', colincx, h - 1, rowincy, (h - 1) * rowincy; + END IF; + FOR x IN 1..w LOOP + FOR y IN 1..h LOOP + newraster := ST_SetValue(newraster, x, y, abs(x - xdir) * colincx + abs(y - (h ^ ((abs(x - xdir + 1) % 2) | rsflag # ydflag))::int) * rowincy + newstartvalue); + END LOOP; + END LOOP; + ELSE + IF rowincx <= (w - 1) * colincy THEN + RAISE EXCEPTION 'Row increment (now %) must be greater than the number of index on one row (now % pixel x % = %)...', rowincx, w - 1, colincy, (w - 1) * colincy; + END IF; + FOR x IN 1..w LOOP + FOR y IN 1..h LOOP + newraster := ST_SetValue(newraster, x, y, abs(x - (w ^ ((abs(y - ydir + 1) % 2) | rsflag # xdflag))::int) * colincy + abs(y - ydir) * rowincx + newstartvalue); + END LOOP; + END LOOP; + END IF; + RETURN newraster; +END; +$BODY$ +LANGUAGE plpgsql VOLATILE; + +-- test +SELECT ST_AsBinary((gvxy).geom), (gvxy).val, (gvxy).x, (gvxy).y +FROM (SELECT ST_PixelAsPolygons(ST_CreateIndexRaster(ST_MakeEmptyRaster(2, 2, 0, 0, 1), '32BSI', null, null, null, null, null, 3, null)) gvxy) foo + +SELECT Coalesce(null::int, 2); \ No newline at end of file diff -Nru postgis-1.5.3/raster/scripts/plpgsql/st_deleteband.sql postgis-2.0.1/raster/scripts/plpgsql/st_deleteband.sql --- postgis-1.5.3/raster/scripts/plpgsql/st_deleteband.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/scripts/plpgsql/st_deleteband.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,50 @@ +---------------------------------------------------------------------- +-- +-- $Id: st_deleteband.sql 9324 2012-02-27 22:08:12Z pramsey $ +-- +-- Copyright (c) 2009-2010 Pierre Racine +-- +---------------------------------------------------------------------- + +-- NOTE: The ST_DeleteBand function found in this file still need enhancement before being implemented in C. + + +-- NOTE: ST_DeleteBand(rast raster, band int) is dependent on +-- ST_AddBand(rast1 raster, rast2 raster, band int, index int) +-- to be found in the script/plpgsql folder + +CREATE OR REPLACE FUNCTION ST_DeleteBand(rast raster, + band int) + RETURNS raster AS + $$ + DECLARE + numband int := ST_NumBands(rast); + newrast raster := ST_MakeEmptyRaster(rast); + BEGIN + FOR b IN 1..numband LOOP + IF b != band THEN + newrast := ST_AddBand(newrast, rast, b, NULL); + END IF; + END LOOP; + RETURN newrast; + END; + $$ + LANGUAGE 'plpgsql'; + +--Test +SELECT ST_MakeEmptyRaster(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + +SELECT ST_MakeEmptyRaster(ST_AddBand(ST_AddBand(ST_TestRaster(1, 1, 1), ST_TestRaster(1, 1, 2), 1, NULL), ST_TestRaster(1, 1, 3), 1, NULL)); + +SELECT st_width(ST_AddBand(ST_AddBand(ST_TestRaster(1, 1, 1), ST_TestRaster(1, 1, 2), 1, NULL), ST_TestRaster(1, 1, 3), 1, NULL)); + +SELECT st_width(ST_AddBand(ST_TestRaster(1, 1, 1), ST_TestRaster(1, 1, 2), 1, NULL)); + +SELECT ST_NumBands(ST_AddBand(ST_AddBand(ST_TestRaster(1, 1, 1), ST_TestRaster(1, 1, 2), 1, NULL), ST_TestRaster(1, 1, 3), 1, NULL)); +SELECT ST_Value(ST_AddBand(ST_AddBand(ST_TestRaster(1, 1, 1), ST_TestRaster(1, 1, 2), 1, 2), ST_TestRaster(1, 1, 3), 1, 3), 2, 1, 1); + +SELECT ST_NumBands(ST_DeleteBand(ST_AddBand(ST_AddBand(ST_TestRaster(1, 1, 1), ST_TestRaster(1, 1, 2), 1, 2), ST_TestRaster(1, 1, 3), 1, 2), 2)); + +SELECT ST_NumBands(ST_DeleteBand(ST_DeleteBand(ST_AddBand(ST_AddBand(ST_TestRaster(1, 1, 1), ST_TestRaster(1, 1, 2), 1, 2), ST_TestRaster(1, 1, 3), 1, 2), 2), 2)); + +SELECT ST_DeleteBand(ST_TestRaster(1, 1, 1), 2); diff -Nru postgis-1.5.3/raster/scripts/plpgsql/st_geomextent2rastercoord.sql postgis-2.0.1/raster/scripts/plpgsql/st_geomextent2rastercoord.sql --- postgis-1.5.3/raster/scripts/plpgsql/st_geomextent2rastercoord.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/scripts/plpgsql/st_geomextent2rastercoord.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,102 @@ +DROP FUNCTION ST_GeomExtent2RasterCoord(rast raster, geomin geometry); +CREATE OR REPLACE FUNCTION ST_GeomExtent2RasterCoord(rast raster, + geomin geometry) + RETURNS int[] AS + $$ + DECLARE + geomintersect geometry; + x1w double precision := 0.0; + x2w double precision := 0.0; + y1w double precision := 0.0; + y2w double precision := 0.0; + x1 integer := 0; + x2 integer := 0; + x3 integer := 0; + x4 integer := 0; + y1 integer := 0; + y2 integer := 0; + y3 integer := 0; + y4 integer := 0; + psize float8; + BEGIN + + -- Get the intersection between with the geometry. + -- We will search for withvalue pixel only in this area. + geomintersect := st_intersection(geomin, st_convexhull(rast)); +--RAISE NOTICE 'geomintersect1=%', astext(geomintersect); + + -- If the intersection is empty, return false + IF st_isempty(geomintersect) THEN + RETURN ARRAY[NULL, NULL, NULL, NULL]; + END IF; + + -- We create a minimalistic buffer around the intersection in order to scan every pixels + -- that would touch the edge or intersect with the geometry + psize := st_scalex(rast) + st_skewy(rast); + geomintersect := st_buffer(geomintersect, psize / 1000000); + +--RAISE NOTICE 'geomintersect2=%', astext(geomintersect); + + -- Find the world coordinates of the bounding box of the intersecting area + x1w := st_xmin(geomintersect); + y1w := st_ymin(geomintersect); + x2w := st_xmax(geomintersect); + y2w := st_ymax(geomintersect); + +--RAISE NOTICE 'x1w=%, y1w=%, x2w=%, y2w=%', x1w, y1w, x2w, y2w; + + -- Convert world coordinates to raster coordinates + x1 := st_world2rastercoordx(rast, x1w, y1w); + y1 := st_world2rastercoordy(rast, x1w, y1w); + x2 := st_world2rastercoordx(rast, x2w, y1w); + y2 := st_world2rastercoordy(rast, x2w, y1w); + x3 := st_world2rastercoordx(rast, x1w, y2w); + y3 := st_world2rastercoordy(rast, x1w, y2w); + x4 := st_world2rastercoordx(rast, x2w, y2w); + y4 := st_world2rastercoordy(rast, x2w, y2w); + +--RAISE NOTICE 'x1=%, y1=%, x2=%, y2=%, x3=%, y3=%, x4=%, y4=%', x1, y1, x2, y2, x3, y3, x4, y4; + + -- Order the raster coordinates for the upcoming FOR loop. + x1 := int4smaller(int4smaller(int4smaller(x1, x2), x3), x4); + y1 := int4smaller(int4smaller(int4smaller(y1, y2), y3), y4); + x2 := int4larger(int4larger(int4larger(x1, x2), x3), x4); + y2 := int4larger(int4larger(int4larger(y1, y2), y3), y4); + + -- Make sure the range is not lower than 1. + -- This can happen when world coordinate are exactly on the left border + -- of the raster and that they do not span on more than one pixel. + x1 := int4smaller(int4larger(x1, 1), st_width(rast)); + y1 := int4smaller(int4larger(y1, 1), st_height(rast)); + + -- Also make sure the range does not exceed the width and height of the raster. + -- This can happen when world coordinate are exactly on the lower right border + -- of the raster. + x2 := int4smaller(x2, st_width(rast)); + y2 := int4smaller(y2, st_height(rast)); + + RETURN ARRAY[x1, y1, x2, y2]; + + END; + $$ + LANGUAGE 'plpgsql' IMMUTABLE STRICT; + +--Test +SELECT (gvxy).geom, (gvxy).x::text || ',' || (gvxy).y::text +FROM (SELECT DISTINCT rid, ST_PixelAsPolygons(rast) gvxy + FROM srtm_22_03_tiled, rect3 + WHERE st_intersects(rast, geom) + ) foo + +SELECT DISTINCT rid +FROM srtm_22_03_tiled, rect3 +WHERE st_intersects(rast, geom) + + +SELECT rid, id, ST_GeomExtent2RasterCoord(rast, geom) +FROM srtm_22_03_tiled, rect3 +WHERE st_intersects(rast, geom) + + +SELECT (ext).x1, (ext).y1, (ext).x2, (ext).y2 FROM (SELECT ST_GeomExtent2RasterCoord(rast, geom) ext FROM srtm_22_03_tiled, rect3 +WHERE st_intersects(rast, geom)) foo \ No newline at end of file diff -Nru postgis-1.5.3/raster/scripts/plpgsql/st_histogram.sql postgis-2.0.1/raster/scripts/plpgsql/st_histogram.sql --- postgis-1.5.3/raster/scripts/plpgsql/st_histogram.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/scripts/plpgsql/st_histogram.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,358 @@ +---------------------------------------------------------------------- +-- +-- $Id: st_histogram.sql 6127 2010-10-25 16:06:00Z jorgearevalo $ +-- +-- Copyright (c) 2009-2010 Pierre Racine +-- +---------------------------------------------------------------------- +-- NOTE: The ST_Histogram() function is already implemented in C. This plpgsql script is provided only as an example. +-- Defining the plpgsql function below might overwrite the current C implementation and brake other functions dependent on it. +-- Use with caution. +---------------------------------------------------------------------- +-- _ST_Values(rast raster, band int) +-- Return all rast pixels values which center are in a geometry +-- Values are returned as groups of identical adjacent values (value, count) +-- in order to reduce the number of row returned. +---------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION _ST_Values(rast raster, band int, geom geometry, OUT val float8, OUT count int) + RETURNS SETOF record AS + $$ + DECLARE + geomintersect geometry; + m int[]; + x integer := 0; + y integer := 0; + curval float8; + BEGIN + m := ST_GeomExtent2RasterCoord(rast, geom); + -- Get the intersection between with the geometry. + geomintersect := ST_Intersection(geom, ST_ConvexHull(rast)); + + -- If the intersection is empty, return false + IF m[1] IS NULL AND m[2] IS NULL AND m[3] IS NULL AND m[4] IS NULL THEN + RETURN; + END IF; + + count := 0; + val := ST_Value(rast, band, m[1], m[2]); + FOR x IN m[1]..m[3] LOOP + FOR y IN m[2]..m[4] LOOP + -- Check first if the pixel intersects with the geometry. Many won't. + IF ST_Intersects(geom, ST_Centroid(ST_PixelAsPolygon(rast, x, y))) THEN + curval = ST_Value(rast, band, x, y); + IF NOT curval IS NULL THEN + IF curval = val THEN + count := count + 1; + ELSE + RETURN NEXT; + val := curval; + count := 1; + END IF; + END IF; + END IF; + END LOOP; + END LOOP; + RETURN NEXT; + RETURN; + END; + $$ + LANGUAGE 'plpgsql' IMMUTABLE STRICT; + +---------------------------------------------------------------------- +-- _ST_Values(rast raster, band int) +-- Return all rast pixels values +-- Values are returned as groups of identical adjacent values (value, count) +-- in order to reduce the number of row returned. +---------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION _ST_Values(rast raster, band int, OUT val float8, OUT count int) + RETURNS SETOF record AS + $$ + DECLARE + x int; + y int; + width int := ST_Width(rast); + height int := ST_Height(rast); + curval float8; + BEGIN + count := 0; + val := ST_Value(rast, band, 1, 1); + FOR x IN 1..width LOOP + FOR y IN 1..height LOOP + curval = ST_Value(rast, band, x, y); + IF NOT curval IS NULL THEN + IF curval = val THEN + count := count + 1; + ELSE + RETURN NEXT; + val := curval; + count := 1; + END IF; + END IF; + END LOOP; + END LOOP; + RETURN NEXT; + RETURN; + END; + $$ + LANGUAGE 'plpgsql'; + +---------------------------------------------------------------------- +-- ST_Histogram(rast raster, band int) group +-- Return a set of (val, count) rows forming the value histogram for a raster +---------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION ST_Histogram(rast raster, band int, OUT val double precision, OUT count bigint) +RETURNS SETOF record + AS $$ + SELECT (vc).val val, sum((vc).count)::bigint count + FROM (SELECT _ST_Values($1, $2) vc) foo GROUP BY (vc).val; + $$ + LANGUAGE SQL; + +CREATE OR REPLACE FUNCTION ST_Histogram(rast raster, OUT val double precision, OUT count bigint) +RETURNS SETOF record + AS $$ + SELECT (vc).val val, sum((vc).count)::bigint count + FROM (SELECT _ST_Values($1, 1) vc) foo GROUP BY (vc).val; + $$ + LANGUAGE SQL; + +---------------------------------------------------------------------- +-- ST_Histogram(rast raster, band int, geom geometry) group +-- Return a set of (val, count) rows forming the value histogram for the area of a raster covered by a polygon geometry. +-- Pixels are selected only when their center intersects the polygon +---------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION ST_Histogram(rast raster, band int, geom geometry, OUT val double precision, OUT count bigint) +RETURNS SETOF record + AS $$ + SELECT (vc).val val, sum((vc).count)::bigint count + FROM (SELECT _ST_Values($1, $2, $3) vc) foo GROUP BY (vc).val; + $$ + LANGUAGE SQL; + +CREATE OR REPLACE FUNCTION ST_Histogram(rast raster, geom geometry, OUT val double precision, OUT count bigint) +RETURNS SETOF record + AS $$ + SELECT (vc).val val, sum((vc).count)::bigint count + FROM (SELECT _ST_Values($1, 1, $2) vc) foo GROUP BY (vc).val; + $$ + LANGUAGE SQL; + +---------------------------------------------------------------------- +-- This variant might be faster (not using an intermediate _ST_Values function) +---------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION ST_Histogram2(rast raster, band int, OUT val double precision, OUT count bigint) +RETURNS SETOF record + AS $$ + SELECT val, count(*) count + FROM (SELECT ST_Value($1, $2, x, y) val FROM generate_series(1, ST_Width($1)) x , generate_series(1, ST_Height($1)) y) foo + GROUP BY val; + $$ + LANGUAGE SQL IMMUTABLE; + +SELECT (hist).val val, sum((hist).count) count +FROM (SELECT ST_Histogram2(rast, 1) hist FROM srtm_22_03_tiled_10x10) foo +GROUP BY val +ORDER BY count DESC + +---------------------------------------------------------------------- +-- Other variant (not grouping in the function) (not using an intermediate _ST_Values function) +---------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION ST_Histogram3(rast raster, band int, OUT val double precision) +RETURNS SETOF double precision + AS $$ + SELECT ST_Value($1, $2, x, y) val FROM generate_series(1, ST_Width($1)) x , generate_series(1, ST_Height($1)) y; + $$ + LANGUAGE SQL IMMUTABLE; + +SELECT val, count(*) count +FROM (SELECT ST_Histogram3(rast, 1) val FROM srtm_22_03_tiled_10x10) foo +GROUP BY val +ORDER BY count DESC + +SELECT ST_Histogram3(rast, 1) val, count(*) count FROM srtm_22_03_tiled_10x10 +GROUP BY val +ORDER BY count DESC + +---------------------------------------------------------------------- +-- This might actually be the fasters query to get the histogram +---------------------------------------------------------------------- +SELECT val, count(*) count +FROM (SELECT ST_Value(rast, 1, x, y) val + FROM generate_series(1, 10) x, generate_series(1, 10) y, srtm_22_03_tiled_10x10 + ) foo +GROUP BY val +ORDER BY count DESC + +---------------------------------------------------------------------- +-- Example 1: Query returning the histogram for a raster tile (one at a time) +---------------------------------------------------------------------- + +------------------------------- +-- The subquery gets the histogram for each tile +-- The main query split the resulting records in their two components (val & count) +------------------------------- +SELECT rid, + (hist).val, + (hist).count +FROM (SELECT rid, + ST_Histogram(rast) hist + FROM srtm_22_03_tiled_25x25 + WHERE rid = 234 + ) foo +ORDER BY (hist).count DESC + +---------------------------------------------------------------------- +-- Example 2: Query returning the complete histogram for a tiled raster coverage +- (might be very long) +---------------------------------------------------------------------- + +------------------------------- +-- The subquery gets the histogram for each tile +-- The main query split the resulting records in their two +-- components (val & count) and sum the count over all the tiles +------------------------------- +SELECT (hist).val, + SUM((hist).count) count +FROM (SELECT rid, + ST_Histogram(rast) hist + FROM srtm_22_03_tiled_25x25 + ) foo +GROUP BY (hist).val +ORDER BY count DESC + +---------------------------------------------------------------------- +-- Example 3: Query returning the mean pixel value for each tile of a +-- tiled raster (might be very long) +---------------------------------------------------------------------- + +------------------------------- +-- The subquery gets the histogram for each tile +-- The main query split the resulting records in their two +-- components (val & count) computing a mean value per tile at the same time +------------------------------- +SELECT rid, + geom, + round(((SUM((hist).val * (hist).count)) / SUM((hist).count))::numeric, 2) meanval +FROM (SELECT rid, + rast::geometry geom, + ST_Histogram(rast) hist + FROM srtm_22_03_tiled_25x25 + ) foo +GROUP BY rid, geom +ORDER BY rid; + +---------------------------------------------------------------------- +-- Example 4: Query returning the most frequent pixel value for each tile +-- of a tiled raster (might be very long) +-- This example requires an aggregate function tracking the value +-- associated with the maximum count +---------------------------------------------------------------------- +CREATE TYPE dblIntSet AS ( + maxval double precision, + val int +); + +CREATE OR REPLACE FUNCTION maxFromDblIntSet(dblIntSet, dblIntSet) RETURNS dblIntSet AS +$$ SELECT CASE WHEN $1.maxval>$2.maxval THEN $1 ELSE $2 END $$ +LANGUAGE sql; + +CREATE OR REPLACE FUNCTION valFromDblIntSet(dblIntSet) RETURNS int AS +$$ SELECT $1.val $$ +LANGUAGE sql; + +CREATE AGGREGATE maxFromDblIntSet ( + BASETYPE = dblIntSet, + SFUNC = maxFromDblIntSet, + STYPE = dblIntSet, + INITCOND = '(0,0)', + FINALFUNC = valFromDblIntSet +); + +------------------------------- +-- Actual query +-- The subquery gets the histogram for each tile +-- The main query split the resulting records in their two +-- components (val & count) and compute the maximum count and its associated value +------------------------------- +SELECT rid, + geom, + maxFromDblIntSet(ROW((hist).count, (hist).val::int)) mostfreqval, + MAX((hist).count) count +FROM (SELECT rid, + rast::geometry geom, + ST_Histogram(rast) hist + FROM srtm_22_03_tiled_25x25 + ) foo +GROUP BY rid, geom +ORDER BY rid + +---------------------------------------------------------------------- +-- Example 5: Query returning the most frequent pixel value per polygon from a raster +-- Do not use when the raster is big, in this case it should be tiled and +-- the next example (6) should be used instead +---------------------------------------------------------------------- +SELECT polyid, + geom, + maxFromDblIntSet(ROW((hist).count, (hist).val::int)) mostfreqval, + MAX((hist).count) count +FROM ( + SELECT polyid, + geom, + ST_Histogram(rast, geom) hist + FROM srtm_22_03, mypolygons + WHERE ST_Intersects(rast, geom) + ) foo +GROUP BY polyid, geom + +---------------------------------------------------------------------- +-- Example 6: Query returning the most frequent pixel value per polygon on a tiled raster coverage +---------------------------------------------------------------------- + +------------------------------- +-- The first subquery gets the histogram for each tile +-- The second subquery split the resulting records in their two +-- components (val & count) and sum the count for each polygon-value couple +-- The main query compute the maximum count and its associated value +------------------------------- +SELECT polyid, + geom, + maxFromDblIntSet(ROW(count, val)) mostfreqval, + MAX(count) count +FROM (SELECT polyid, + geom, (hist).val::int val, + SUM((hist).count) count + FROM (SELECT polyid, + geom, + ST_Histogram(rast, geom) hist + FROM srtm_22_03_tiled_25x25, mypolygons + WHERE ST_Intersects(rast, geom) + ) foo + GROUP BY polyid, geom, (hist).val + ) bar +GROUP BY polyid, geom + +---------------------------------------------------------------------- +-- Example 7: Query returning the mean pixel value per polygon on a tiled raster coverage +---------------------------------------------------------------------- + +------------------------------- +-- The first subquery gets the histogram for each tile +-- The second subquery split the resulting records in their two +-- components (val & count) and sum the count for each polygon-value couple +-- The main query compute the mean pixel value +------------------------------- +SELECT polyid, + geom, + round((SUM(val * count) / SUM(count))::numeric, 2) meanval +FROM (SELECT polyid, + geom, (hist).val::int val, + SUM((hist).count) count + FROM (SELECT polyid, + geom, + ST_Histogram(rast, geom) hist + FROM srtm_22_03_tiled_25x25, mypolygons + WHERE ST_Intersects(rast, geom) + ) foo + GROUP BY polyid, geom, (hist).val + ) bar +GROUP BY polyid, geom \ No newline at end of file diff -Nru postgis-1.5.3/raster/scripts/plpgsql/st_mapalgebra.sql postgis-2.0.1/raster/scripts/plpgsql/st_mapalgebra.sql --- postgis-1.5.3/raster/scripts/plpgsql/st_mapalgebra.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/scripts/plpgsql/st_mapalgebra.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,1129 @@ +---------------------------------------------------------------------- +-- $Id: st_mapalgebra.sql 9324 2012-02-27 22:08:12Z pramsey $ +-- +-- Copyright (c) 2009-2010 Pierre Racine +-- +---------------------------------------------------------------------- +-- NOTE: The ST_MapAlgebra() function is already implemented in C. This plpgsql script is provided only as an example. +-- Defining the plpgsql function below might overwrite the current C implementation and brake other functions dependent on it. +-- Use with caution. +---------------------------------------------------------------------- + +-------------------------------------------------------------------- +-- ST_MapAlgebra - (one raster version) Return a raster which values +-- are the result of an SQL expression involving pixel +-- value from the input raster band. +-- Arguments +-- rast raster - Raster on which the expression is evaluated. (Referred +-- by "rast1" in the expression. +-- band integer - Band number of the raster to be evaluated. Default to 1. +-- expression text - SQL expression to apply to with value pixels. Ex.: "rast + 2" +-- nodatavalueexpr text - SQL expression to apply to nodata value pixels. Ex.: "2" +-- pixeltype text - Pixeltype assigned to the resulting raster. Expression +-- results are truncated to this type. Default to the +-- pixeltype of the first raster. +-- +-- NOTE that this function now exist as a C implementation and is provided +-- here solely as a plpgsql example. +-------------------------------------------------------------------- +DROP FUNCTION IF EXISTS ST_MapAlgebra(rast raster, band integer, expression text, nodatavalueexpr text, pixeltype text); +CREATE OR REPLACE FUNCTION ST_MapAlgebra(rast raster, band integer, expression text, nodatavalueexpr text, pixeltype text) + RETURNS raster AS + $$ + DECLARE + width integer; + height integer; + x integer; + y integer; + r float; + newnodatavalue float8; + newinitialvalue float8; + newrast raster; + newval float8; + newexpr text; + initexpr text; + initndvexpr text; + newpixeltype text; + skipcomputation int := 0; + newhasnodatavalue boolean := FALSE; + BEGIN + -- Check if raster is NULL + IF rast IS NULL THEN + RAISE NOTICE 'ST_MapAlgebra: Raster is NULL. Returning NULL'; + RETURN NULL; + END IF; + + width := ST_Width(rast); + height := ST_Height(rast); + + -- Create a new empty raster having the same georeference as the provided raster + newrast := ST_MakeEmptyRaster(width, height, ST_UpperLeftX(rast), ST_UpperLeftY(rast), ST_ScaleX(rast), ST_ScaleY(rast), ST_SkewX(rast), ST_SkewY(rast), ST_SRID(rast)); + + -- If this new raster is empty (width = 0 OR height = 0) then there is nothing to compute and we return it right now + IF ST_IsEmpty(newrast) THEN + RAISE NOTICE 'ST_MapAlgebra: Raster is empty. Returning an empty raster'; + RETURN newrast; + END IF; + + -- Check if rast has the required band. Otherwise return a raster without band + IF ST_HasNoBand(rast, band) THEN + RAISE NOTICE 'ST_MapAlgebra: Raster do not have the required band. Returning a raster without band'; + RETURN newrast; + END IF; + + -- Set the new pixeltype + newpixeltype := pixeltype; + IF newpixeltype IS NULL THEN + newpixeltype := ST_BandPixelType(rast, band); + ELSIF newpixeltype != '1BB' AND newpixeltype != '2BUI' AND newpixeltype != '4BUI' AND newpixeltype != '8BSI' AND newpixeltype != '8BUI' AND + newpixeltype != '16BSI' AND newpixeltype != '16BUI' AND newpixeltype != '32BSI' AND newpixeltype != '32BUI' AND newpixeltype != '32BF' AND newpixeltype != '64BF' THEN + RAISE EXCEPTION 'ST_MapAlgebra: Invalid pixeltype "%". Aborting.', newpixeltype; + END IF; + + -- Check for notada value + newnodatavalue := ST_BandNodataValue(rast, band); + IF newnodatavalue IS NULL OR newnodatavalue < ST_MinPossibleValue(newpixeltype) OR newnodatavalue > (-ST_MinPossibleValue(newpixeltype) - 1) THEN + RAISE NOTICE 'ST_MapAlgebra: Source raster do not have a nodata value or is out of range for the new raster pixeltype, nodata value for new raster set to the min value possible'; + newnodatavalue := ST_MinPossibleValue(newpixeltype); + END IF; + -- We set the initial value of the future band to nodata value. + -- If nodatavalue is null then the raster will be initialise to ST_MinPossibleValue + -- but all the values should be recomputed anyway. + newinitialvalue := newnodatavalue; + + initexpr := 'SELECT ' || trim(upper(expression)); + initndvexpr := 'SELECT ' || trim(upper(nodatavalueexpr)); + +--RAISE NOTICE '111 initexpr=%, newnodatavalue=%', initexpr,newnodatavalue; + + -- Optimization: If a nodatavalueexpr is provided, recompute the initial value + -- so we can then initialise the raster with this value and skip the computation + -- of nodata values one by one in the main computing loop + IF NOT nodatavalueexpr IS NULL THEN + newexpr := replace(initndvexpr, 'RAST', newnodatavalue::text); +--RAISE NOTICE '222 newexpr=%', newexpr; + EXECUTE newexpr INTO newinitialvalue; + END IF; + +--RAISE NOTICE '333'; + + -- Optimization: If the raster is only filled with nodata value return right now a raster filled with the nodatavalueexpr + IF ST_BandIsNoData(rast, band) THEN + RETURN ST_AddBand(newrast, newpixeltype, newinitialvalue, newnodatavalue); + END IF; + + -- Optimization: If expression resume to 'RAST' and nodatavalueexpr is NULL or also equal to 'RAST', + -- we can just return the band from the original raster + IF initexpr = 'SELECT RAST' AND (nodatavalueexpr IS NULL OR initndvexpr = 'SELECT RAST') THEN + RETURN ST_AddBand(newrast, rast, band, 1); -- To be implemented in C + END IF; + + -- Optimization: If expression resume to a constant (it does not contain RAST) + IF position('RAST' in initexpr) = 0 THEN +--RAISE NOTICE '444'; + EXECUTE initexpr INTO newval; +--RAISE NOTICE '555'; + skipcomputation := 1; + + IF nodatavalueexpr IS NULL THEN + -- Compute the new value, set it and we will return after creating the new raster + newinitialvalue := newval; + skipcomputation := 2; + ELSEIF newval = newinitialvalue THEN + -- Return the new raster as it will be before computing pixel by pixel + skipcomputation := 2; + END IF; + END IF; + + --Create the raster receiving all the computed values. Initialize it to the new initial value. + newrast := ST_AddBand(newrast, newpixeltype, newinitialvalue, newnodatavalue); + + + -- Optimization: If expression is NULL, or all the pixels could be set in a one step, return the initialised raster now + IF expression IS NULL OR skipcomputation = 2 THEN + RETURN newrast; + END IF; + FOR x IN 1..width LOOP + FOR y IN 1..height LOOP + r := ST_Value(rast, band, x, y); + -- We compute a value only for the withdata value pixel since the nodata value have already been set by the first optimization + IF NOT r IS NULL AND (newnodatavalue IS NULL OR r != newnodatavalue) THEN -- The second part of the test can be removed once ST_Value return NULL for a nodata value + IF skipcomputation = 0 THEN + newexpr := replace(initexpr, 'RAST', r::text); +--RAISE NOTICE '666 newexpr=%', newexpr; + EXECUTE newexpr INTO newval; + IF newval IS NULL THEN + newval := newnodatavalue; + END IF; + END IF; + newrast = ST_SetValue(newrast, band, x, y, newval); + ELSE + newhasnodatavalue := TRUE; + END IF; + END LOOP; + END LOOP; + IF newhasnodatavalue THEN + newrast := ST_SetBandNodataValue(newrast, 1, newnodatavalue); + END IF; + RETURN newrast; + END; + $$ + LANGUAGE 'plpgsql'; + +--Test rasters +CREATE OR REPLACE FUNCTION ST_TestRaster(val float8) + RETURNS raster AS + $$ + DECLARE + BEGIN + RETURN ST_SetValue(ST_AddBand(ST_MakeEmptyRaster(2, 2, 0, 0, 1, 1, 0, 0, -1), '32BF', val, -1), 1, 1, -1); + END; + $$ + LANGUAGE 'plpgsql'; + +-- Tests +-- Test NULL Raster. Should be true. +--SELECT ST_MapAlgebra(NULL, 1, 'rast + 20', '2', NULL) IS NULL FROM ST_TestRaster(0, 0, -1) rast; + +-- Test empty Raster. Should be true. +--SELECT ST_IsEmpty(ST_MapAlgebra(ST_MakeEmptyRaster(0, 10, 0, 0, 1, 1, 1, 1, -1), 1, 'rast + 20', '2', NULL)) + +-- Test has no band raster. Should be true. +--SELECT ST_HasNoBand(ST_MapAlgebra(ST_MakeEmptyRaster(10, 10, 0, 0, 1, 1, 1, 1, -1), 1, 'rast + 20', '2', NULL)) + +-- Test has no nodata value. Should return null and 19. +--SELECT ST_Value(rast, 1, 1), ST_Value(ST_MapAlgebra(ST_SetBandNoDataValue(ST_TestRaster(0, 0, 1), NULL), 1, 'rast + 20', '2', NULL), 1, 1) +--FROM ST_TestRaster(0, 0, 1) rast; + +-- Test has nodata value. Should return null and 2. +--SELECT ST_Value(rast, 1, 1), ST_Value(ST_MapAlgebra(rast, 1, 'rast + 20', 'rast + 3', NULL), 1, 1) +--FROM ST_TestRaster(0, 0, 1) rast; + +-- Test has nodata value. Should return null and null. +--SELECT ST_Value(rast, 1, 1), ST_Value(ST_MapAlgebra(rast, 1, 'rast + 20', NULL, NULL), 1, 1) +--FROM ST_TestRaster(0, 0, 1) rast; + +-- Test 'rast' expression. Should be 1 and 1. +--SELECT ST_Value(rast, 1, 2), ST_Value(ST_MapAlgebra(rast, 1, 'rast', 'rast', NULL), 1, 2) +--FROM ST_TestRaster(0, 0, 0) rast; + +-- Test 'rast' expression on a no nodata value raster. Should be null and -1. +--SELECT ST_Value(rast, 1, 1), ST_Value(ST_MapAlgebra(ST_SetBandNoDataValue(rast, NULL), 1, 'rast', NULL, NULL), 1, 1) +--FROM ST_TestRaster(0, 0, -1) rast; + +-- Test pixeltype 1. Should return 100 and 15. +--SELECT ST_Value(rast, 1, 2), ST_Value(ST_MapAlgebra(rast, 1, 'rast + 20', 'rast + 2', '4BUI'), 1, 2) +--FROM ST_TestRaster(0, 0, 100) rast; + +-- Test pixeltype 1. Should return an error. +--SELECT ST_Value(rast, 1, 2), ST_Value(ST_MapAlgebra(rast, 1, 'rast + 20', 'rast + 2', '4BUId'), 1, 2) +--FROM ST_TestRaster(0, 0, 100) rast; + +-- Test pixeltype 1. Should return 101 and 3. +--SELECT ST_Value(rast, 1, 2), ST_Value(ST_MapAlgebra(rast, 1, 'rast + 20', 'rast + 2', '2BUI'), 1, 2) +--FROM ST_TestRaster(0, 0, 101) rast; + + +-------------------------------------------------------------------- +-- ST_SameAlignment +-- Determine if the raster coordinates are aligned. +-- Scale must be the same and pixels corners must fall on the same grid. +-------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION ST_SameAlignment(rast1ulx float8, + rast1uly float8, + rast1scalex float8, + rast1scaley float8, + rast1skewx float8, + rast1skewy float8, + rast2ulx float8, + rast2uly float8, + rast2scalex float8, + rast2scaley float8, + rast2skewx float8, + rast2skewy float8) + RETURNS boolean AS + $$ + DECLARE + emptyraster2 raster; + r2x integer; + r2y integer; + BEGIN + IF rast1scalex != rast2scalex THEN + RAISE NOTICE 'ST_SameAlignment: Pixelsize in x are different'; + RETURN FALSE; + END IF; + IF rast1scaley != rast2scaley THEN + RAISE NOTICE 'ST_SameAlignment: Pixelsize in y are different'; + RETURN FALSE; + END IF; + IF rast1skewx != rast2skewx THEN + RAISE NOTICE 'ST_SameAlignment: Skews in x are different'; + RETURN FALSE; + END IF; + IF rast1skewy != rast2skewy THEN + RAISE NOTICE 'ST_SameAlignment: Skews in y are different'; + RETURN FALSE; + END IF; + -- For checking for the pixel corner alignment, we create a fake raster aligned on the second raster... + emptyraster2 := ST_MakeEmptyRaster(1, 1, rast2ulx, rast2uly, rast2scalex, rast2scaley, rast2skewx, rast2skewy, -1); + -- We get the raster coordinates of the upper left corner of the first raster in this new raster.. + r2x := ST_World2RasterCoordX(emptyraster2, rast1ulx, rast1uly); + r2y := ST_World2RasterCoordY(emptyraster2, rast1ulx, rast1uly); + -- And we make sure the world coordinates the upperleft corner of this pixel are the same as the first raster. + IF ST_Raster2WorldCoordX(emptyraster2, r2x, r2y) != rast1ulx OR ST_Raster2WorldCoordY(emptyraster2, r2x, r2y) != rast1uly THEN + RAISE NOTICE 'ST_SameAlignment: alignments are different'; + RETURN FALSE; + END IF; + RETURN TRUE; + END; + $$ + LANGUAGE 'plpgsql'; + +CREATE OR REPLACE FUNCTION ST_SameAlignment(rast1 raster, rast2 raster) + RETURNS boolean + AS 'select ST_SameAlignment(ST_UpperLeftX($1), + ST_UpperLeftY($1), + ST_ScaleX($1), + ST_ScaleY($1), + ST_SkewX($1), + ST_SkewY($1), + ST_UpperLeftX($2), + ST_UpperLeftY($2), + ST_ScaleX($2), + ST_ScaleY($2), + ST_SkewX($2), + ST_SkewY($2))' + LANGUAGE 'SQL' IMMUTABLE STRICT; + +--Test + +--SELECT ST_SameAlignment(0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0) -- FALSE +--SELECT ST_SameAlignment(0.0001, 0, 1, 1, 0, 0, 1.00001, 0, 1, 1, 0, 0) -- FALSE +--SELECT ST_SameAlignment(10.0001, 2, 1, 1, 0, 0, 1.0001, 1110, 1, 1, 0, 0) --TRUE +--SELECT ST_SameAlignment(10.0001, 2, 1, 1, 0, 0, 1.001, 1110, 1, 1, 0, 0) -- FALSE +--SELECT ST_SameAlignment(10, 2, 1, 1, 1, -1, sqrt(2.0), sqrt(2.0), 1, 1, 1, -1) -- FALSE +--SELECT ST_SameAlignment(ST_AddBand(ST_MakeEmptyRaster(10, 10, 2, 0, 1, 1, 1, -1, -1), '8BSI'), ST_AddBand(ST_MakeEmptyRaster(10, 10, 0, 0, 1, 1, 1, -1, -1), '8BSI')) +--SELECT ST_SameAlignment(ST_AddBand(ST_MakeEmptyRaster(10, 10, 2, 0, 1, 1, 1, -1, -1), '8BSI'), ST_AddBand(ST_MakeEmptyRaster(10, 10, 2, 6, 1, 1, 1, -1, -1), '8BSI')) + +--SELECT ST_SameAlignment(ST_AddBand(ST_MakeEmptyRaster(10, 10, 0, 0, 1, -1, -0.2, -0.2, -1), '8BSI'), ST_AddBand(ST_MakeEmptyRaster(5, 5, 0.8, -1.2, 1, -1, -0.2, -0.2, -1), '8BSI')) +--SELECT ST_SameAlignment(ST_AddBand(ST_MakeEmptyRaster(10, 10, 0, 0, 1, -1, 0.2, 0.2, -1), '8BSI'), ST_AddBand(ST_MakeEmptyRaster(10, 10, 1.2, -0.8, 1, -1, 0.2, 0.2, -1), '8BSI')) + +--SELECT generate_series(1, 100) AS ID, AsBinary((ST_PixelAsPolygons(ST_AddBand(ST_MakeEmptyRaster(10, 10, 0, 0, 1, 1, -0.4361, 0.4361, -1), '8BSI'), 1)).geom) + +-------------------------------------------------------------------- +-- ST_IsEmpty +-- Return TRUE if the raster is empty. i.e. is NULL, width = 0 or height = 0 +-------------------------------------------------------------------- +--CREATE OR REPLACE FUNCTION ST_IsEmpty(raster) +-- RETURNS boolean +-- AS 'SELECT $1 IS NULL OR ST_Width($1) = 0 OR ST_Height($1) = 0' +-- LANGUAGE 'SQL' IMMUTABLE; + +-------------------------------------------------------------------- +-- ST_HasNoBand +-- Return TRUE if the number of band is 0 +-------------------------------------------------------------------- +--CREATE OR REPLACE FUNCTION ST_HasNoBand(raster) +-- RETURNS boolean +-- AS 'SELECT $1 IS NULL OR ST_NumBands($1) = 0' +-- LANGUAGE 'SQL' IMMUTABLE; + +-------------------------------------------------------------------- +-- ST_HasNoBand +-- Return TRUE if the raster do not have a band of this number. +-------------------------------------------------------------------- +--CREATE OR REPLACE FUNCTION ST_HasNoBand(raster, int) +-- RETURNS boolean +-- AS 'SELECT $1 IS NULL OR ST_NumBands($1) < $2' +-- LANGUAGE 'SQL' IMMUTABLE; + +-- Test +--SELECT ST_HasNoband(NULL); + +-------------------------------------------------------------------- +-- ST_BandIsNoData +-- NOT YET IMPLEMENTED +-- Return TRUE if the raster band contains only nodata values. +-------------------------------------------------------------------- +--CREATE OR REPLACE FUNCTION ST_BandIsNoData(raster, int) +-- RETURNS boolean +-- AS 'SELECT ST_HasNoBand($1, $2) AND ST_BandHasNodataValue($1, $2) AND false' +-- LANGUAGE 'SQL' IMMUTABLE; + +--CREATE OR REPLACE FUNCTION toto() +-- RETURNS int +-- AS 'SELECT 10' +-- LANGUAGE 'SQL' IMMUTABLE STRICT; + +DROP FUNCTION IF EXISTS ST_MapAlgebra(rast1 raster, + band1 integer, + rast2 raster, + band2 integer, + expression text, + pixeltype text, + extentexpr text, + nodata1expr text, + nodata2expr text, + nodatanodataaexpr text); + +CREATE OR REPLACE FUNCTION ST_MapAlgebra(rast1 raster, + band1 integer, + rast2 raster, + band2 integer, + expression text, + pixeltype text, + extentexpr text, + nodata1expr text, + nodata2expr text, + nodatanodataexpr text) + RETURNS raster AS + $$ + DECLARE + x integer; + y integer; + r1 float8; + r2 float8; + rast1ulx float8; + rast1uly float8; + rast1width int; + rast1height int; + rast1scalex float8; + rast1scaley float8; + rast1skewx float8; + rast1skewy float8; + rast1nodataval float8; + rast1srid int; + + rast1offsetx int; + rast1offsety int; + + rast2ulx float8; + rast2uly float8; + rast2width int; + rast2height int; + rast2scalex float8; + rast2scaley float8; + rast2skewx float8; + rast2skewy float8; + rast2nodataval float8; + rast2srid int; + + rast2offsetx1 int; + rast2offsety1 int; + rast2offsetx2 int; + rast2offsety2 int; + + newrast raster; + newsrid int; + + newscalex float8; + newscaley float8; + newskewx float8; + newskewy float8; + newnodatavalue float8; + newpixeltype text; + newulx float8; + newuly float8; + newwidth int; + newheight int; + newoffsetx1 int; + newoffsety1 int; + newoffsetx2 int; + newoffsety2 int; + + newval float8; + newexpr text; + + BEGIN + -- We have to deal with NULL, empty, hasnoband and hasnodatavalue band rasters... + -- These are respectively tested by "IS NULL", "ST_IsEmpty()", "ST_HasNoBand()" and "ST_BandIsNodata()" + + -- If both raster are null, we return NULL. ok + -- If both raster do not have extent (are empty), we return an empty raster. ok + -- If both raster do not have the specified band, + -- we return a no band raster with the correct extent (according to the extent expression). ok + -- If both raster bands are nodatavalue and there is no replacement value, we return a nodata value band. ok + + -- If only one raster is null or empty or has no band or hasnodata band we treat it as a nodata band raster. + -- If there is a replacement value we replace the missing raster values with this replacement value. ok + -- If there is no replacement value, we return a nodata value band. ok + + -- What to do when only one raster is NULL or empty + -- If the extent expression is FIRST and the first raster is null we return NULL. ok + -- If the extent expression is FIRST and the first raster do not have extent (is empty), we return an empty raster. ok + -- If the extent expression is SECOND and the second raster is null we return NULL. ok + -- If the extent expression is SECOND and the second raster do not have extent (is empty), we return an empty raster. ok + -- If the extent expression is INTERSECTION and one raster is null or do not have extent (is empty), we return an empty raster. ok + -- If the extent expression is UNION and one raster is null or do not have extent (is empty), + -- we return a raster having the extent and the band characteristics of the other raster. ok + + -- What to do when only one raster do not have the required band. + -- If the extent expression is FIRST and the first raster do not have the specified band, + -- we return a no band raster with the correct extent (according to the extent expression). ok + -- If the extent expression is SECOND and the second raster do not have the specified band, + -- we return a no band raster with the correct extent (according to the extent expression). ok + -- If the extent expression is INTERSECTION and one raster do not have the specified band, + -- we treat it as a nodata raster band. ok + -- If the extent expression is UNION and one raster do not have the specified band, + -- we treat it as a nodata raster band. ok + + -- In all those cases, we make a warning. + + -- Check if both rasters are NULL + IF rast1 IS NULL AND rast2 IS NULL THEN + RAISE NOTICE 'ST_MapAlgebra: Both raster are NULL. Returning NULL'; + RETURN NULL; + END IF; + + -- Check if both rasters are empty (width or height = 0) + IF ST_IsEmpty(rast1) AND ST_IsEmpty(rast2) THEN + RAISE NOTICE 'ST_MapAlgebra: Both raster are empty. Returning an empty raster'; + RETURN ST_MakeEmptyRaster(0, 0, 0, 0, 0, 0, 0, 0, -1); + END IF; + + rast1ulx := ST_UpperLeftX(rast1); + rast1uly := ST_UpperLeftY(rast1); + rast1width := ST_Width(rast1); + rast1height := ST_Height(rast1); + rast1scalex := ST_ScaleX(rast1); + rast1scaley := ST_ScaleY(rast1); + rast1skewx := ST_SkewX(rast1); + rast1skewy := ST_SkewY(rast1); + rast1srid := ST_SRID(rast1); + + rast2ulx := ST_UpperLeftX(rast2); + rast2uly := ST_UpperLeftY(rast2); + rast2width := ST_Width(rast2); + rast2height := ST_Height(rast2); + rast2scalex := ST_ScaleX(rast2); + rast2scaley := ST_ScaleY(rast2); + rast2skewx := ST_SkewX(rast2); + rast2skewy := ST_SkewY(rast2); + rast2srid := ST_SRID(rast2); + + -- Check if the first raster is NULL or empty + IF rast1 IS NULL OR ST_IsEmpty(rast1) THEN + rast1ulx := rast2ulx; + rast1uly := rast2uly; + rast1width := rast2width; + rast1height := rast2height; + rast1scalex := rast2scalex; + rast1scaley := rast2scaley; + rast1skewx := rast2skewx; + rast1skewy := rast2skewy; + rast1srid := rast2srid; + END IF; + -- Check if the second raster is NULL or empty + IF rast2 IS NULL OR ST_IsEmpty(rast2) THEN + rast2ulx := rast1ulx; + rast2uly := rast1uly; + rast2width := rast1width; + rast2height := rast1height; + rast2scalex := rast1scalex; + rast2scaley := rast1scaley; + rast2skewx := rast1skewx; + rast2skewy := rast1skewy; + rast2srid := rast1srid; + END IF; + + -- Check for SRID + IF rast1srid != rast2srid THEN + RAISE EXCEPTION 'ST_MapAlgebra: Provided raster with different SRID. Aborting'; + END IF; + newsrid := rast1srid; + + -- Check for alignment. (Rotation problem here) + IF NOT ST_SameAlignment(rast1ulx, rast1uly, rast1scalex, rast1scaley, rast1skewx, rast1skewy, rast2ulx, rast2uly, rast2scalex, rast2scaley, rast2skewx, rast2skewy) THEN + -- For now print an error message, but a more robust implementation should resample the second raster to the alignment of the first raster. + RAISE EXCEPTION 'ST_MapAlgebra: Provided raster do not have the same alignment. Aborting'; + END IF; + + -- Set new pixel size and skew. We set it to the rast1 scale and skew + -- since both rasters are aligned and thus have the same scale and skew + newscalex := rast1scalex; + newscaley := rast1scaley; + newskewx := rast1skewx; + newskewy := rast1skewy; + + --rastoffset is the offset of a raster in relatively to the first raster + rast2offsetx1 := -st_world2rastercoordx(rast2, rast1ulx, rast1uly) + 1; + rast2offsety1 := -st_world2rastercoordy(rast2, rast1ulx, rast1uly) + 1; + rast2offsetx2 := rast2offsetx1 + rast2width - 1; + rast2offsety2 := rast2offsety1 + rast2height - 1; + + -- Compute x and y relative index of master and slave according to the extent expression (FIRST, SECOND, INTERSECTION or UNION) + IF extentexpr IS NULL OR upper(extentexpr) = 'FIRST' THEN + + -- Check if rast1 is NULL + IF rast1 IS NULL THEN + RAISE NOTICE 'ST_MapAlgebra: FIRST raster is NULL. Returning NULL'; + RETURN NULL; + END IF; + + -- Check if rast1 is empty + IF ST_IsEmpty(rast1) THEN + RAISE NOTICE 'ST_MapAlgebra: FIRST raster is empty. Returning an empty raster'; + RETURN ST_MakeEmptyRaster(0, 0, 0, 0, 0, 0, 0, 0, newsrid); + END IF; + + -- Check if rast1 has the required band + IF ST_HasNoBand(rast1, band1) THEN + RAISE NOTICE 'ST_MapAlgebra: FIRST raster has no band. Returning a raster without band'; + RETURN ST_MakeEmptyRaster(rast1width, rast1height, rast1ulx, rast1uly, rast1scalex, rast1scaley, rast1skewx, rast1skewy, rast1srid); + END IF; + + newulx := rast1ulx; + newuly := rast1uly; + newwidth := rast1width; + newheight := rast1height; + rast1offsetx := 0; + rast1offsety := 0; + + ELSIF upper(extentexpr) = 'SECOND' THEN + + -- Check if rast2 is NULL + IF rast2 IS NULL THEN + RAISE NOTICE 'ST_MapAlgebra: SECOND raster is NULL. Returning NULL'; + RETURN NULL; + END IF; + + -- Check if rast2 is empty + IF ST_IsEmpty(rast2) THEN + RAISE NOTICE 'ST_MapAlgebra: SECOND raster is empty. Returning an empty raster'; + RETURN ST_MakeEmptyRaster(0, 0, 0, 0, 0, 0, 0, 0, newsrid); + END IF; + + -- Check if rast2 has the required band + IF ST_HasNoBand(rast2, band2) THEN + RAISE NOTICE 'ST_MapAlgebra: SECOND raster has no band. Returning an empty raster'; + RETURN ST_MakeEmptyRaster(rast2width, rast2height, rast2ulx, rast2uly, rast2scalex, rast2scaley, rast2skewx, rast2skewy, rast2srid); + END IF; + + newulx := rast2ulx; + newuly := rast2uly; + newwidth := rast2width; + newheight := rast2height; + rast1offsetx := -rast2offsetx1; + rast1offsety := -rast2offsety1; + rast2offsetx1 := 0; + rast2offsety1 := 0; + + ELSIF upper(extentexpr) = 'INTERSECTION' THEN + + -- Check if the intersection is empty. + IF rast2offsetx2 < 0 OR rast2offsetx1 > (rast1width - 1) OR + rast2offsety2 < 0 OR rast2offsety1 > (rast1height - 1) OR + rast1 IS NULL OR ST_IsEmpty(rast1) OR + rast2 IS NULL OR ST_IsEmpty(rast2) THEN + RAISE NOTICE 'ST_MapAlgebra: INTERSECTION of provided rasters is empty. Returning an empty raster'; + RETURN ST_MakeEmptyRaster(0, 0, 0, 0, 0, 0, 0, 0, newsrid); + END IF; + + --Determine the new raster upper left x offset + newoffsetx1 := 0; + IF rast2offsetx1 > 0 THEN + newoffsetx1 := rast2offsetx1; + END IF; + --Determine the new raster upper left y offset + newoffsety1 := 0; + IF rast2offsety1 > 0 THEN + newoffsety1 := rast2offsety1; + END IF; + --Determine the new raster lower right x offset + newoffsetx2 := rast1width - 1; + IF rast2offsetx2 < rast1width THEN + newoffsetx2 := rast2offsetx2; + END IF; + --Determine the new raster lower right y offset + newoffsety2 := rast1height - 1; + IF rast2offsety2 < rast1height THEN + newoffsety2 := rast2offsety2; + END IF; + + -- Compute the new ulx and uly + newulx := st_raster2worldcoordx(rast1, newoffsetx1 + 1, newoffsety1 + 1); + newuly := st_raster2worldcoordy(rast1, newoffsetx1 + 1, newoffsety1 + 1); + newwidth := newoffsetx2 - newoffsetx1 + 1; + newheight := newoffsety2 - newoffsety1 + 1; + + -- Compute the master offsets + rast1offsetx := -st_world2rastercoordx(rast1, newulx, newuly) + 1; + rast1offsety := -st_world2rastercoordy(rast1, newulx, newuly) + 1; + + -- Recompute the slave offsets + rast2offsetx1 := -st_world2rastercoordx(rast2, newulx, newuly) + 1; + rast2offsety1 := -st_world2rastercoordy(rast2, newulx, newuly) + 1; + + ELSIF upper(extentexpr) = 'UNION' THEN + + IF rast1 IS NULL OR ST_IsEmpty(rast1) THEN + newulx := rast2ulx; + newuly := rast2uly; + newwidth := rast2width; + newheight := rast2height; + rast1offsetx := 0; + rast1offsety := 0; + rast2offsetx1 := 0; + rast2offsety1 := 0; + ELSIF rast2 IS NULL OR ST_IsEmpty(rast2) THEN + newulx := rast1ulx; + newuly := rast1uly; + newwidth := rast1width; + newheight := rast1height; + rast1offsetx := 0; + rast1offsety := 0; + rast2offsetx1 := 0; + rast2offsety1 := 0; + ELSE + --Determine the new raster upper left x offset + newoffsetx1 := 0; + IF rast2offsetx1 < 0 THEN + newoffsetx1 := rast2offsetx1; + END IF; + --Determine the new raster upper left y offset + newoffsety1 := 0; + IF rast2offsety1 < 0 THEN + newoffsety1 := rast2offsety1; + END IF; + --Determine the new raster lower right x offset + newoffsetx2 := rast1width - 1; + IF rast2offsetx2 >= rast1width THEN + newoffsetx2 := rast2offsetx2; + END IF; + --Determine the new raster lower right y offset + newoffsety2 := rast1height - 1; + IF rast2offsety2 >= rast1height THEN + newoffsety2 := rast2offsety2; + END IF; + + -- Compute the new ulx and uly + newulx := st_raster2worldcoordx(rast1, newoffsetx1 + 1, newoffsety1 + 1); + newuly := st_raster2worldcoordy(rast1, newoffsetx1 + 1, newoffsety1 + 1); + newwidth := newoffsetx2 - newoffsetx1 + 1; + newheight := newoffsety2 - newoffsety1 + 1; + + -- Compute the first raster offsets + rast1offsetx := -st_world2rastercoordx(rast1, newulx, newuly) + 1; + rast1offsety := -st_world2rastercoordy(rast1, newulx, newuly) + 1; + + -- Recompute the second raster offsets + rast2offsetx1 := -st_world2rastercoordx(rast2, newulx, newuly) + 1; + rast2offsety1 := -st_world2rastercoordy(rast2, newulx, newuly) + 1; + END IF; + ELSE + RAISE EXCEPTION 'ST_MapAlgebra: Unhandled extent expression "%". Only MASTER, INTERSECTION and UNION are accepted. Aborting.', upper(extentexpr); + END IF; + + -- Check if both rasters do not have the specified band. + IF ST_HasNoband(rast1, band1) AND ST_HasNoband(rast2, band2) THEN + RAISE NOTICE 'ST_MapAlgebra: Both raster do not have the specified band. Returning a no band raster with the correct extent'; + RETURN ST_MakeEmptyRaster(newwidth, newheight, newulx, newuly, newscalex, newscaley, newskewx, newskewy, newsrid); + END IF; + + -- Check newpixeltype + newpixeltype := pixeltype; + IF newpixeltype NOTNULL AND newpixeltype != '1BB' AND newpixeltype != '2BUI' AND newpixeltype != '4BUI' AND newpixeltype != '8BSI' AND newpixeltype != '8BUI' AND + newpixeltype != '16BSI' AND newpixeltype != '16BUI' AND newpixeltype != '32BSI' AND newpixeltype != '32BUI' AND newpixeltype != '32BF' AND newpixeltype != '64BF' THEN + RAISE EXCEPTION 'ST_MapAlgebra: Invalid pixeltype "%". Aborting.', newpixeltype; + END IF; + + -- If no newpixeltype was provided, get it from the provided rasters. + IF newpixeltype IS NULL THEN + IF (upper(extentexpr) = 'SECOND' AND NOT ST_HasNoBand(rast2, band2)) OR ST_HasNoBand(rast1, band1) THEN + newpixeltype := ST_BandPixelType(rast2, band2); + ELSE + newpixeltype := ST_BandPixelType(rast1, band1); + END IF; + END IF; + + -- Get the nodata value for first raster + IF NOT ST_HasNoBand(rast1, band1) AND NOT ST_BandNodataValue(rast1, band1) IS NULL THEN + rast1nodataval := ST_BandNodatavalue(rast1, band1); + ELSE + rast1nodataval := NULL; + END IF; + -- Get the nodata value for second raster + IF NOT ST_HasNoBand(rast2, band2) AND NOT ST_BandNodatavalue(rast2, band2) IS NULL THEN + rast2nodataval := ST_BandNodatavalue(rast2, band2); + ELSE + rast2nodataval := NULL; + END IF; + + -- Determine new notadavalue + IF (upper(extentexpr) = 'SECOND' AND NOT rast2nodataval IS NULL) THEN + newnodatavalue := rast2nodataval; + ELSEIF NOT rast1nodataval IS NULL THEN + newnodatavalue := rast1nodataval; + ELSEIF NOT rast2nodataval IS NULL THEN + newnodatavalue := rast2nodataval; + ELSE + RAISE NOTICE 'ST_MapAlgebra: Both source rasters do not have a nodata value, nodata value for new raster set to the minimum value possible'; + newnodatavalue := ST_MinPossibleValue(newrast); + END IF; + + ------------------------------------------------------------------- + --Create the raster receiving all the computed values. Initialize it to the new nodatavalue. + newrast := ST_AddBand(ST_MakeEmptyRaster(newwidth, newheight, newulx, newuly, newscalex, newscaley, newskewx, newskewy, newsrid), newpixeltype, newnodatavalue, newnodatavalue); + ------------------------------------------------------------------- + + -- If one of the two raster is NULL, empty, do not have the requested band or is only nodata values + -- and there is no replacement value for those missing values + -- and this raster IS involved in the expression + -- return NOW with the nodata band raster. + --IF (rast1 IS NULL OR ST_IsEmpty(rast1) OR ST_HasNoBand(rast1, band1) OR ST_BandIsNoData(rast1, band1)) AND nodatavalrepl IS NULL AND position('RAST1' in upper(expression)) != 0 THEN + -- RETURN newrast; + --END IF; + --IF (rast2 IS NULL OR ST_IsEmpty(rast2) OR ST_HasNoBand(rast2, band2) OR ST_BandIsNoData(rast2, band2)) AND nodatavalrepl IS NULL AND position('RAST2' in upper(expression)) != 0 THEN + -- RETURN newrast; + --END IF; + + -- There is place for optimization here when doing a UNION we don't want to iterate over the empty space. + FOR x IN 1..newwidth LOOP + FOR y IN 1..newheight LOOP + r1 := ST_Value(rast1, band1, x - rast1offsetx, y - rast1offsety); + r2 := ST_Value(rast2, band2, x - rast2offsetx1, y - rast2offsety1); + + -- Check if both values are outside the extent or nodata values + IF (r1 IS NULL OR r1 = rast1nodataval) AND (r2 IS NULL OR r2 = rast1nodataval) THEN + IF nodatanodataexpr IS NULL THEN + newval := newnodatavalue; + ELSE + EXECUTE 'SELECT ' || nodatanodataexpr INTO newval; + END IF; + ELSIF r1 IS NULL OR r1 = rast1nodataval THEN + IF nodata1expr IS NULL THEN + newval := newnodatavalue; + ELSE + newexpr := replace('SELECT ' || upper(nodata1expr), 'RAST2'::text, r2::text); + EXECUTE newexpr INTO newval; + END IF; + + ELSIF r2 IS NULL OR r2 = rast2nodataval THEN + IF nodata2expr IS NULL THEN + newval := newnodatavalue; + ELSE + newexpr := replace('SELECT ' || upper(nodata2expr), 'RAST1'::text, r1::text); + EXECUTE newexpr INTO newval; + END IF; + ELSE + newexpr := replace('SELECT ' || upper(expression), 'RAST1'::text, r1::text); + newexpr := replace(newexpr, 'RAST2'::text, r2::text); +--RAISE NOTICE '222 - %', newexpr; + EXECUTE newexpr INTO newval; +--RAISE NOTICE '333 - %', newval; + END IF; + IF newval IS NULL THEN + newval := newnodatavalue; + END IF; + newrast = ST_SetValue(newrast, 1, x, y, newval); + END LOOP; + END LOOP; + RETURN newrast; + END; + $$ + LANGUAGE 'plpgsql'; + + +-------------------------------------------------------------------- +-- ST_MapAlgebra (two raster version) variants +-------------------------------------------------------------------- + +-- Variant 5 +CREATE OR REPLACE FUNCTION ST_MapAlgebra(rast1 raster, + rast2 raster, + expression text, + pixeltype text, + extentexpr text, + nodata1expr text, + nodata2expr text, + nodatanodataexpr text) + RETURNS raster + AS 'SELECT ST_MapAlgebra($1, 1, $2, 1, $3, $4, $5, $6, $7, $8)' + LANGUAGE 'SQL' IMMUTABLE; + +-- Variant 6 +CREATE OR REPLACE FUNCTION ST_MapAlgebra(rast1 raster, + rast2 raster, + expression text, + pixeltype text, + extentexpr text) + RETURNS raster + AS 'SELECT ST_MapAlgebra($1, 1, $2, 1, $3, $4, $5, NULL, NULL, NULL)' + LANGUAGE 'SQL' IMMUTABLE; + +-- Variant 7 +CREATE OR REPLACE FUNCTION ST_MapAlgebra(rast1 raster, + rast2 raster, + expression text, + pixeltype text) + RETURNS raster + AS 'SELECT ST_MapAlgebra($1, 1, $2, 1, $3, $4, NULL, NULL, NULL, NULL)' + LANGUAGE 'SQL' IMMUTABLE; + + +-- Variant 8 +CREATE OR REPLACE FUNCTION ST_MapAlgebra(rast1 raster, + rast2 raster, + expression text) + RETURNS raster + AS 'SELECT ST_MapAlgebra($1, 1, $2, 1, $3, NULL, NULL, NULL, NULL, NULL)' + LANGUAGE 'SQL' IMMUTABLE STRICT; + +-- Variant 10 +--DROP FUNCTION ST_MapAlgebra(rast1 raster, band1 integer, rast2 raster, band2 integer, expression text, pixeltype text, extentexpr text, rastnodatavalrepl float8); +CREATE OR REPLACE FUNCTION ST_MapAlgebra(rast1 raster, + band1 integer, + rast2 raster, + band2 integer, + expression text, + pixeltype text, + extentexpr text, + nodataexpr text) + RETURNS raster + AS 'SELECT ST_MapAlgebra($1, $2, $3, $4, $5, $6, $7, $8, $8, $8)' + LANGUAGE 'SQL' IMMUTABLE; + +-- Variant 11 +CREATE OR REPLACE FUNCTION ST_MapAlgebra(rast1 raster, + band1 integer, + rast2 raster, + band2 integer, + expression text, + pixeltype text, + extentexpr text) + RETURNS raster + AS 'SELECT ST_MapAlgebra($1, $2, $3, $4, $5, $6, $7, NULL, NULL, NULL)' + LANGUAGE 'SQL' IMMUTABLE; + +-- Variant 12 +CREATE OR REPLACE FUNCTION ST_MapAlgebra(rast1 raster, + band1 integer, + rast2 raster, + band2 integer, + expression text, + pixeltype text) + RETURNS raster + AS 'SELECT ST_MapAlgebra($1, $2, $3, $4, $5, $6, NULL, NULL, NULL, NULL)' + LANGUAGE 'SQL' IMMUTABLE; + +-- Variant 13 +CREATE OR REPLACE FUNCTION ST_MapAlgebra(rast1 raster, + band1 integer, + rast2 raster, + band2 integer, + expression text) + RETURNS raster + AS 'SELECT ST_MapAlgebra($1, $2, $3, $4, $5, NULL, NULL, NULL, NULL, NULL)' + LANGUAGE 'SQL' IMMUTABLE; + +--test MapAlgebra with NULL +--SELECT ST_MapAlgebra(NULL, 1, ST_TestRaster(2, 0), 1, 'rast2', NULL, 'UNION', 0); +--SELECT AsBinary((rast).geom), (rast).val FROM (SELECT ST_PixelAsPolygons(ST_MapAlgebra(NULL, 1, ST_TestRaster(2, 0), 1, 'rast2', NULL, 'UNION', 0), 1) rast) foo + +--SELECT ST_MapAlgebra(NULL, 1, NULL, 1, 'rast2', NULL, 'UNION', 0); + + +--Test rasters +CREATE OR REPLACE FUNCTION ST_TestRaster(ulx float8, uly float8, val float8) + RETURNS raster AS + $$ + DECLARE + BEGIN + RETURN ST_AddBand(ST_MakeEmptyRaster(3, 3, ulx, uly, 1, 1, 0, 0, -1), '32BF', val, -1); + END; + $$ + LANGUAGE 'plpgsql'; + + +CREATE OR REPLACE FUNCTION ST_TestRotatedRaster(ulx float8, uly float8) + RETURNS raster AS + $$ + DECLARE + BEGIN + RETURN ST_AddBand(ST_MakeEmptyRaster(20, 20, ulx, uly, 1, -1, 0.2, 0.2, -1), '32BSI', 1, -1); + END; + $$ + LANGUAGE 'plpgsql'; + +-- Overlay operations on two raster implemented with the two raster version of ST_MapAlgebra +-- Note that every time an expression resume to 'rast1' or 'rast2' you can optimize the value setting memcpy the pixel values. + +-- First display the two test rasters used in the following examples in OpenJump +--SELECT (gv).val, ST_AsBinary((gv).geom) +--FROM (SELECT ST_PixelAsPolygons(ST_TestRaster(0, 0, 1)) gv) foo + +--SELECT (gv).val, ST_AsBinary((gv).geom) +--FROM (SELECT ST_PixelAsPolygons(ST_TestRaster(1, 1, 3)) gv) foo + + +-- 1) ST_Intersection and ST_Clip +--SELECT ST_MapAlgebra(rast1, rast2, 'rast1', '32BF', 'INTERSECTION') +--FROM (SELECT ST_TestRaster(0, 0, 1) rast1, ST_TestRaster(1, 1, 3) rast2) foo + +-- Display in OpenJump. +--SELECT (gv).val, ST_AsBinary((gv).geom) +--FROM (SELECT ST_PixelAsPolygons(ST_MapAlgebra(rast1, rast2, 'rast1', '32BF', 'INTERSECTION')) gv +-- FROM (SELECT ST_TestRaster(0, 0, 1) rast1, ST_TestRaster(1, 1, 3) rast2) foo) foo2 + + +-- 2) ST_Intersection returning a two band raster +--SELECT ST_AddBand(ST_MapAlgebra(rast1, rast2, 'rast1', '32BF', 'INTERSECTION'), ST_MapAlgebra(rast1, rast2, 'rast2', '32BF', 'INTERSECTION')) +--FROM (SELECT ST_TestRaster(0, 0, 1) rast1, ST_TestRaster(1, 1, 3) rast2) foo + +-- Display band 1 in OpenJump. +--SELECT (gv).val, ST_AsBinary((gv).geom) +--FROM (SELECT ST_PixelAsPolygons(ST_AddBand(ST_MapAlgebra(rast1, rast2, 'rast1', '32BF', 'INTERSECTION'), ST_MapAlgebra(rast1, rast2, 'rast2', '32BF', 'INTERSECTION'))) gv +-- FROM (SELECT ST_TestRaster(0, 0, 1) rast1, ST_TestRaster(1, 1, 3) rast2) foo) foo2 + +-- Display band 2 in OpenJump. +--SELECT (gv).val, ST_AsBinary((gv).geom) +--FROM (SELECT ST_PixelAsPolygons(ST_AddBand(ST_MapAlgebra(rast1, rast2, 'rast1', '32BF', 'INTERSECTION'), ST_MapAlgebra(rast1, rast2, 'rast2', '32BF', 'INTERSECTION')), 2) gv +-- FROM (SELECT ST_TestRaster(0, 0, 1) rast1, ST_TestRaster(1, 1, 3) rast2) foo) foo2 + + +-- 3) ST_Union +--SELECT ST_MapAlgebra(rast1, rast2, '(rast1 + rast2)/2::numeric', '32BF', 'UNION', 'rast2', 'rast1', NULL) +--FROM (SELECT ST_TestRaster(0, 0, 1) rast1, ST_TestRaster(1, 1, 3) rast2) foo + +-- Display in OpenJump. +--SELECT (gv).val, ST_AsBinary((gv).geom) +--FROM (SELECT ST_PixelAsPolygons(ST_MapAlgebra(rast1, rast2, '(rast1 + rast2)/2::numeric', '32BF', 'UNION', 'rast2', 'rast1', NULL)) gv +-- FROM (SELECT ST_TestRaster(0, 0, 1) rast1, ST_TestRaster(1, 1, 3) rast2) foo) foo2 + + +-- 4) ST_Collect +--SELECT ST_MapAlgebra(rast1, rast2, 'rast2', '32BF', 'UNION', 'rast2', 'rast1', NULL) +--FROM (SELECT ST_TestRaster(0, 0, 1) rast1, ST_TestRaster(1, 1, 3) rast2) foo + +-- Display in OpenJump. +--SELECT (gv).val, ST_AsBinary((gv).geom) +--FROM (SELECT ST_PixelAsPolygons(ST_MapAlgebra(rast1, rast2, 'rast2', '32BF', 'UNION', 'rast2', 'rast1', NULL)) gv +-- FROM (SELECT ST_TestRaster(0, 0, 1) rast1, ST_TestRaster(1, 1, 3) rast2) foo) foo2 + + +-- 5) ST_Difference making a mere geometric difference +--SELECT ST_MapAlgebra(rast1, rast2, 'CASE WHEN NOT rast2 IS NULL THEN NULL ELSE rast1 END', '32BF', 'FIRST', NULL, 'rast1', NULL) +--FROM (SELECT ST_TestRaster(0, 0, 1) rast1, ST_TestRaster(1, 1, 3) rast2) foo + +-- Display in OpenJump. +--SELECT (gv).val, ST_AsBinary((gv).geom) +--FROM (SELECT ST_PixelAsPolygons(ST_MapAlgebra(rast1, rast2, 'CASE WHEN NOT rast2 IS NULL THEN NULL ELSE rast1 END', '32BF', 'FIRST', NULL, 'rast1', NULL)) gv +-- FROM (SELECT ST_TestRaster(0, 0, 1) rast1, ST_TestRaster(1, 1, 3) rast2) foo) foo2 + + +-- 6) ST_Difference making an arithmetic difference +--SELECT ST_MapAlgebra(rast1, rast2, 'rast1 - rast2', '32BF', 'FIRST', NULL, 'rast1', NULL) +--FROM (SELECT ST_TestRaster(0, 0, 1) rast1, ST_TestRaster(1, 1, 3) rast2) foo + +-- Display in OpenJump. +--SELECT (gv).val, ST_AsBinary((gv).geom) +--FROM (SELECT ST_PixelAsPolygons(ST_MapAlgebra(rast1, rast2, 'rast1 - rast2', '32BF', 'FIRST', NULL, 'rast1', NULL)) gv +-- FROM (SELECT ST_TestRaster(0, 0, 1) rast1, ST_TestRaster(1, 1, 3) rast2) foo) foo2 + + +-- 7) ST_SymDifference making a mere geometric difference (commutative) +--SELECT ST_MapAlgebra(rast1, rast2, 'NULL', '32BF', 'UNION', 'rast2', 'rast1', NULL) +--FROM (SELECT ST_TestRaster(0, 0, 1) rast1, ST_TestRaster(1, 1, 3) rast2) foo + +-- Display first commutation in OpenJump. +--SELECT (gv).val, ST_AsBinary((gv).geom) +--FROM (SELECT ST_PixelAsPolygons(ST_MapAlgebra(rast1, rast2, 'NULL', '32BF', 'UNION', 'rast2', 'rast1', NULL)) gv +-- FROM (SELECT ST_TestRaster(0, 0, 1) rast1, ST_TestRaster(1, 1, 3) rast2) foo) foo2 + +-- Display second commutation in OpenJump. +--SELECT (gv).val, ST_AsBinary((gv).geom) +--FROM (SELECT ST_PixelAsPolygons(ST_MapAlgebra(rast1, rast2, 'NULL', '32BF', 'UNION', 'rast2', 'rast1', NULL)) gv +-- FROM (SELECT ST_TestRaster(1, 1, 3) rast1, ST_TestRaster(0, 0, 1) rast2) foo) foo2 + + +-- 8) ST_SymDifference making an arithmetic difference (not commutative) +--Commutation 1 +--SELECT ST_MapAlgebra(rast1, rast2, 'rast1 - rast2', '32BF', 'UNION', 'rast2', 'rast1', NULL) +--FROM (SELECT ST_TestRaster(0, 0, 1) rast1, ST_TestRaster(1, 1, 2) rast2) foo + +--Commutation 2 +--SELECT ST_MapAlgebra(rast1, rast2, 'rast1 - rast2', '32BF', 'UNION', 'rast2', 'rast1', NULL) +--FROM (SELECT ST_TestRaster(1, 1, 2) rast1, ST_TestRaster(0, 0, 1) rast2) foo + + +-- Other tests + +-- UNION +-- SELECT ST_Value(rast, 1, 1) AS "1, 1", +-- ST_Value(rast, 2, 1) AS "2, 1", +-- ST_Value(rast, 3, 1) AS "3, 1", +-- ST_Value(rast, 1, 2) AS "1, 2", +-- ST_Value(rast, 2, 2) AS "2, 2", +-- ST_Value(rast, 3, 2) AS "3, 2", +-- ST_BandPixelType(rast, 1), +-- ST_Width(rast), +-- ST_Height(rast) +-- FROM (SELECT ST_MapAlgebra(ST_TestRaster(0, 0, 1), 1, ST_TestRaster(1, 0, 1), 1, 'rast1 + rast2 + 2*rast2'::text, '8BSI'::text, 'Union'::text, '0'::text) AS rast) foo + +-- INTERSECTION +--SELECT ST_IsEmpty(rast), +-- ST_Value(rast, 1, 1) AS "1, 1", +-- ST_Value(rast, 1, 2) AS "1, 2", +-- ST_Value(rast, 2, 1) AS "2, 1", +-- ST_Value(rast, 2, 2) AS "2, 2", +-- ST_BandPixelType(rast, 1), +-- ST_Width(rast), +-- ST_Height(rast) +--FROM (SELECT ST_MapAlgebra(ST_TestRaster(0, 0, 1), 1, ST_TestRaster(1, 0, 1), 1, '(rast1 + rast2)/3::float8', '64BF', 'INTERSECTION', '0'::text) AS rast) foo + + +-- FIRST -- Doesn't work... +--SELECT ST_Value(rast, 1, 1), +-- ST_Value(rast, 1, 2), +-- ST_Value(rast, 2, 1), +-- ST_Value(rast, 2, 2), +-- ST_BandPixelType(rast, 1), +-- ST_Width(rast), +-- ST_Height(rast) +--FROM (SELECT ST_MapAlgebra(ST_TestRaster(0, 0, 1), 1, ST_TestRaster(1, 1, 1), 1, 'rast1 + rast2 + 2*rast2 + toto()', '8BSI', 'FIRST', NULL) AS rast) foo + +-- SECOND -- Doesn't work... +--SELECT ST_Value(rast, 1, 1), +-- ST_Value(rast, 1, 2), +-- ST_Value(rast, 2, 1), +-- ST_Value(rast, 2, 2), +-- ST_BandPixelType(rast, 1), +-- ST_Width(rast), +-- ST_Height(rast) +--FROM (SELECT ST_MapAlgebra(ST_TestRaster(0, 0, 1), 1, ST_TestRaster(1, 1, 1), 1, 'rast1 + rast2 + 2*rast2 + toto()', '8BSI', 'SECOND', NULL) AS rast) foo + + +-- INTERSECTION with rotated. -- Doesn't work... +--SELECT ST_IsEmpty(rast), +-- ST_Value(rast, 1, 1) AS "1, 1", +-- ST_Value(rast, 1, 2) AS "1, 2", +-- ST_Value(rast, 2, 1) AS "2, 1", +-- ST_Value(rast, 2, 2) AS "2, 2", +-- ST_BandPixelType(rast, 1), +-- ST_Width(rast), +-- ST_Height(rast) +--FROM (SELECT ST_MapAlgebra(ST_TestRotatedRaster(0, 0), 1, ST_TestRotatedRaster(1.2, -0.8), 1, '(rast1 + rast2)/3::float8', '64BF', 'Union', 0) AS rast) foo + +--SELECT AsBinary((rast).geom), (rast).val FROM (SELECT ST_PixelAsPolygons(ST_TestRotatedRaster(0, 0), 1) rast) foo +--SELECT AsBinary((rast).geom), (rast).val FROM (SELECT ST_PixelAsPolygons(ST_TestRotatedRaster(1.2, -0.8), 1) rast) foo +--SELECT AsBinary((rast).geom), (rast).val FROM (SELECT ST_PixelAsPolygons(ST_MapAlgebra(ST_TestRotatedRaster(0, 0), 1, ST_TestRotatedRaster(1.2, -0.8), 1, '(rast1 + rast2)/3::float8', '64BF', 'Union', 0), 1) rast) foo + +--SELECT ST_IsEmpty(rast), +-- ST_Value(rast, 1, 1) AS "1, 1", +-- ST_Value(rast, 1, 2) AS "1, 2", +-- ST_Value(rast, 2, 1) AS "2, 1", +-- ST_Value(rast, 2, 2) AS "2, 2", + -- ST_BandPixelType(rast, 1), +-- ST_Width(rast), +-- ST_Height(rast) +--FROM (SELECT ST_MapAlgebra(ST_TestRaster(0, 0), 1, ST_TestRaster(1, 1), 1, '(rast1 + rast2)/2', '64BF', 'Union', 0) AS rast) foo + +--SELECT ST_IsEmpty(rast), +-- ST_Value(rast, 1, 1) AS "1, 1", +-- ST_Value(rast, 1, 2) AS "1, 2", +-- ST_Value(rast, 2, 1) AS "2, 1", +-- ST_Value(rast, 2, 2) AS "2, 2", +-- ST_BandPixelType(rast, 1), +-- ST_Width(rast), +-- ST_Height(rast) +--FROM (SELECT ST_MapAlgebra(ST_TestRaster(0, 0), 1, ST_TestRaster(1, 1), 1, 'CASE WHEN rast1 IS NULL THEN rast2 WHEN rast2 IS NULL THEN rast1 ELSE (rast1 + rast2)/2 END', '64BF', 'Union', 0) AS rast) foo diff -Nru postgis-1.5.3/raster/scripts/plpgsql/st_mapalgebra_optimized.sql postgis-2.0.1/raster/scripts/plpgsql/st_mapalgebra_optimized.sql --- postgis-1.5.3/raster/scripts/plpgsql/st_mapalgebra_optimized.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/scripts/plpgsql/st_mapalgebra_optimized.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,652 @@ +---------------------------------------------------------------------- +-- +-- $Id: st_mapalgebra_optimized.sql 6127 2010-10-25 16:06:00Z jorgearevalo $ +-- +-- Copyright (c) 2009-2010 Pierre Racine +-- +---------------------------------------------------------------------- + +-- Note: The functions provided in this script are in developement. Do not use. + +-- Note: this script is dependent on +-- _MapAlgebraParts(r1x int, r1y int, r1w int, r1h int, r2x int, r2y int, r2w int, r2h int) +-- ST_SameAlignment(rast1ulx float8, rast1uly float8, rast1scalex float8, rast1scaley float8, rast1skewx float8, rast1skewy float8, rast2ulx float8, rast2uly float8, rast2scalex float8, rast2scaley float8, rast2skewx float8, rast2skewy float8) +-- ST_IsEmpty(raster) +-- ST_HasNoBand(raster, int) +-- ST_BandIsNoData(raster, int) +-- to be found in the script/plpgsql folder + +-------------------------------------------------------------------- +-- ST_MapAlgebra - (two rasters version) Return a raster which +-- values are the result of an SQL expression involving +-- pixel values from input rasters bands. +-- Arguments +-- rast1 raster - First raster referred by rast1 in the expression. +-- band1 integer - Band number of the first raster. Default to 1. +-- rast2 raster - Second raster referred by rast2 in the expression. +-- band2 integer - Band number of the second raster. Default to 1. +-- expression text - SQL expression. Ex.: "rast1 + 2 * rast2" +-- pixeltype text - Pixeltype assigned to the resulting raster. Expression +-- results are truncated to this type. Default to the +-- pixeltype of the first raster. +-- extentexpr text - Raster extent of the result. Can be: +-- -FIRST: Same extent as the first raster. Default. +-- -SECOND: Same extent as the second) raster. Default. +-- -INTERSECTION: Intersection of extent of the two rasters. +-- -UNION: Union oof extent of the two rasters. +-- nodata1expr text - Expression used when only rast1 pixel value are nodata or absent, i.e. rast2 pixel value is with data. +-- nodata2expr text - Expression used when only rast2 pixel value are nodata or absent, i.e. rast1 pixel value is with data. +-- nodatanodataexpr text - Expression used when both pixel values are nodata values or absent. + +-- Further enhancements: +-- -Move the expression parameter in seventh position just before other expression parameters. +-- -Optimization for UNION & FIRST. We might not have to iterate over all the new raster. See st_mapalgebra_optimized.sql +-- -Add the possibility to assign the x or y coordinate of the pixel to the pixel (do the same to the one raster version). +-- -Resample the second raster when necessary (Require ST_Resample) +-- -More test with rotated images +-------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION ST_MapAlgebra2(rast1 raster, + band1 integer, + rast2 raster, + band2 integer, + expression text, + pixeltype text, + extentexpr text, + nodata1expr text, + nodata2expr text, + nodatanodataexpr text) + RETURNS raster AS + $$ + DECLARE + x integer; + y integer; + r1 float; + r2 float; + rast1ulx float8; + rast1uly float8; + rast1width int; + rast1height int; + rast1scalex float8; + rast1scaley float8; + rast1skewx float8; + rast1skewy float8; + rast1nodataval float8; + rast1srid int; + + rast1offsetx int; + rast1offsety int; + + rast2ulx float8; + rast2uly float8; + rast2width int; + rast2height int; + rast2scalex float8; + rast2scaley float8; + rast2skewx float8; + rast2skewy float8; + rast2nodataval float8; + rast2srid int; + + r1x int; + r1y int; + r1w int; + r1h int; + r2x int; + r2y int; + r2w int; + r2h int; + + newrx int; + newry int; + + newrast raster; + tmprast raster; + newsrid int; + + newscalex float8; + newscaley float8; + newskewx float8; + newskewy float8; + newnodatavalue float8; + newpixeltype text; + newulx float8; + newuly float8; + newwidth int; + newheight int; + newoffsetx1 int; + newoffsety1 int; + newoffsetx2 int; + newoffsety2 int; + + newval float; + newexpr text; + upnodatanodataexpr text; + upnodata1expr text; + upnodata2expr text; + upexpression text; + nodatanodataval float; + skipcomputation int; + + zones int[]; + z11x int; + z11y int; + z11w int; + z11h int; + z12x int; + z12y int; + z12w int; + z12h int; + z13x int; + z13y int; + z13w int; + z13h int; + z14x int; + z14y int; + z14w int; + z14h int; + z21x int; + z21y int; + z21w int; + z21h int; + z22x int; + z22y int; + z22w int; + z22h int; + z23x int; + z23y int; + z23w int; + z23h int; + z24x int; + z24y int; + z24w int; + z24h int; + zcx int; + zcy int; + zcw int; + zch int; + + BEGIN + -- We have to deal with NULL, empty, hasnoband and hasnodatavalue band rasters... + -- These are respectively tested by "IS NULL", "ST_IsEmpty()", "ST_HasNoBand()" and "ST_BandIsNodata()" + + -- If both raster are null, we return NULL. ok + -- If both raster do not have extent (are empty), we return an empty raster. ok + -- If both raster do not have the specified band, + -- we return a no band raster with the correct extent (according to the extent expression). ok + -- If both raster bands are nodatavalue and there is no replacement value, we return a nodata value band. ok + + -- If only one raster is null or empty or has no band or hasnodata band we treat it as a nodata band raster. + -- If there is a replacement value we replace the missing raster values with this replacement value. ok + -- If there is no replacement value, we return a nodata value band. ok + + -- What to do when only one raster is NULL or empty + -- If the extent expression is FIRST and the first raster is null we return NULL. ok + -- If the extent expression is FIRST and the first raster do not have extent (is empty), we return an empty raster. ok + -- If the extent expression is SECOND and the second raster is null we return NULL. ok + -- If the extent expression is SECOND and the second raster do not have extent (is empty), we return an empty raster. ok + -- If the extent expression is INTERSECTION and one raster is null or do not have extent (is empty), we return an empty raster. ok + -- If the extent expression is UNION and one raster is null or do not have extent (is empty), + -- we return a raster having the extent and the band characteristics of the other raster. ok + + -- What to do when only one raster do not have the required band. + -- If the extent expression is FIRST and the first raster do not have the specified band, + -- we return a no band raster with the correct extent (according to the extent expression). ok + -- If the extent expression is SECOND and the second raster do not have the specified band, + -- we return a no band raster with the correct extent (according to the extent expression). ok + -- If the extent expression is INTERSECTION and one raster do not have the specified band, + -- we treat it as a nodata raster band. ok + -- If the extent expression is UNION and one raster do not have the specified band, + -- we treat it as a nodata raster band. ok + + -- In all those cases, we make a warning. + + -- Check if both rasters are NULL +RAISE NOTICE 'ST_MapAlgebra2 000'; + + IF rast1 IS NULL AND rast2 IS NULL THEN + RAISE NOTICE 'ST_MapAlgebra: Both raster are NULL. Returning NULL'; + RETURN NULL; + END IF; + + -- Check if both rasters are empty (width or height = 0) + IF ST_IsEmpty(rast1) AND ST_IsEmpty(rast2) THEN + RAISE NOTICE 'ST_MapAlgebra: Both raster are empty. Returning an empty raster'; + RETURN ST_MakeEmptyRaster(0, 0, 0, 0, 0, 0, 0, 0, -1); + END IF; + + rast1ulx := ST_UpperLeftX(rast1); + rast1uly := ST_UpperLeftY(rast1); + rast1width := ST_Width(rast1); + rast1height := ST_Height(rast1); + rast1scalex := ST_ScaleX(rast1); + rast1scaley := ST_ScaleY(rast1); + rast1skewx := ST_SkewX(rast1); + rast1skewy := ST_SkewY(rast1); + rast1srid := ST_SRID(rast1); + + rast2ulx := ST_UpperLeftX(rast2); + rast2uly := ST_UpperLeftY(rast2); + rast2width := ST_Width(rast2); + rast2height := ST_Height(rast2); + rast2scalex := ST_ScaleX(rast2); + rast2scaley := ST_ScaleY(rast2); + rast2skewx := ST_SkewX(rast2); + rast2skewy := ST_SkewY(rast2); + rast2srid := ST_SRID(rast2); + + -- Check if the first raster is NULL or empty + IF rast1 IS NULL OR ST_IsEmpty(rast1) THEN + rast1ulx := rast2ulx; + rast1uly := rast2uly; + rast1width := rast2width; + rast1height := rast2height; + rast1scalex := rast2scalex; + rast1scaley := rast2scaley; + rast1skewx := rast2skewx; + rast1skewy := rast2skewy; + rast1srid := rast2srid; + END IF; + -- Check if the second raster is NULL or empty + IF rast2 IS NULL OR ST_IsEmpty(rast2) THEN + rast2ulx := rast1ulx; + rast2uly := rast1uly; + rast2width := rast1width; + rast2height := rast1height; + rast2scalex := rast1scalex; + rast2scaley := rast1scaley; + rast2skewx := rast1skewx; + rast2skewy := rast1skewy; + rast2srid := rast1srid; + END IF; + + -- Check for SRID + IF rast1srid != rast2srid THEN + RAISE EXCEPTION 'ST_MapAlgebra: Provided raster with different SRID. Aborting'; + END IF; + newsrid := rast1srid; + + -- Check for alignment. (Rotation problem here) + IF NOT ST_SameAlignment(rast1ulx, rast1uly, rast1scalex, rast1scaley, rast1skewx, rast1skewy, rast2ulx, rast2uly, rast2scalex, rast2scaley, rast2skewx, rast2skewy) THEN + -- For now print an error message, but a more robust implementation should resample the second raster to the alignment of the first raster. + RAISE EXCEPTION 'ST_MapAlgebra: Provided raster do not have the same alignment. Aborting'; + END IF; + + -- Set new pixel size and skew. We set it to the rast1 scale and skew + -- since both rasters are aligned and thus have the same scale and skew + newscalex := rast1scalex; + newscaley := rast1scaley; + newskewx := rast1skewx; + newskewy := rast1skewy; + + --r1x & r2x are the offset of each rasters relatively to global extent + r1x := 0; + r2x := -st_world2rastercoordx(rast2, rast1ulx, rast1uly) + 1; + IF r2x < 0 THEN + r1x := -r2x; + r2x := 0; + END IF; + r1y := 0; + r2y := -st_world2rastercoordy(rast2, rast1ulx, rast1uly) + 1; + IF r2y < 0 THEN + r1y := -r2y; + r2y := 0; + END IF; + + r1w := rast1width; + r1h := rast1height; + r2w := rast2width; + r2h := rast2height; + + zones := _MapAlgebraParts(r1x + 1, r1y + 1, r1w, r1h, r2x + 1, r2y + 1, r2w, r2h); + z11x := zones[1]; + z11y := zones[2]; + z11w := zones[3]; + z11h := zones[4]; + z12x := zones[5]; + z12y := zones[6]; + z12w := zones[7]; + z12h := zones[8]; + z13x := zones[9]; + z13y := zones[10]; + z13w := zones[11]; + z13h := zones[12]; + z14x := zones[13]; + z14y := zones[14]; + z14w := zones[15]; + z14h := zones[16]; + z21x := zones[17]; + z21y := zones[18]; + z21w := zones[19]; + z21h := zones[20]; + z22x := zones[21]; + z22y := zones[22]; + z22w := zones[23]; + z22h := zones[24]; + z23x := zones[25]; + z23y := zones[26]; + z23w := zones[27]; + z23h := zones[28]; + z24x := zones[29]; + z24y := zones[30]; + z24w := zones[31]; + z24h := zones[32]; + zcx := zones[33]; + zcy := zones[34]; + zcw := zones[35]; + zch := zones[36]; + + -- Compute x and y relative index of master and slave according to the extent expression (FIRST, SECOND, INTERSECTION or UNION) + IF extentexpr IS NULL OR upper(extentexpr) = 'FIRST' THEN + + -- Check if rast1 is NULL + IF rast1 IS NULL THEN + RAISE NOTICE 'ST_MapAlgebra: FIRST raster is NULL. Returning NULL'; + RETURN NULL; + END IF; + + -- Check if rast1 is empty + IF ST_IsEmpty(rast1) THEN + RAISE NOTICE 'ST_MapAlgebra: FIRST raster is empty. Returning an empty raster'; + RETURN ST_MakeEmptyRaster(0, 0, 0, 0, 0, 0, 0, 0, newsrid); + END IF; + + -- Check if rast1 has the required band + IF ST_HasNoBand(rast1, band1) THEN + RAISE NOTICE 'ST_MapAlgebra: FIRST raster has no band. Returning a raster without band'; + RETURN ST_MakeEmptyRaster(rast1width, rast1height, rast1ulx, rast1uly, rast1scalex, rast1scaley, rast1skewx, rast1skewy, rast1srid); + END IF; + + newulx := rast1ulx; + newuly := rast1uly; + newwidth := rast1width; + newheight := rast1height; + + newrx := r1x; + newry := r1y; + z21w := 0; + z22w := 0; + z23w := 0; + z24w := 0; + + ELSIF upper(extentexpr) = 'SECOND' THEN + + -- Check if rast2 is NULL + IF rast2 IS NULL THEN + RAISE NOTICE 'ST_MapAlgebra: SECOND raster is NULL. Returning NULL'; + RETURN NULL; + END IF; + + -- Check if rast2 is empty + IF ST_IsEmpty(rast2) THEN + RAISE NOTICE 'ST_MapAlgebra: SECOND raster is empty. Returning an empty raster'; + RETURN ST_MakeEmptyRaster(0, 0, 0, 0, 0, 0, 0, 0, newsrid); + END IF; + + -- Check if rast2 has the required band + IF ST_HasNoBand(rast2, band2) THEN + RAISE NOTICE 'ST_MapAlgebra: SECOND raster has no band. Returning an empty raster'; + RETURN ST_MakeEmptyRaster(rast2width, rast2height, rast2ulx, rast2uly, rast2scalex, rast2scaley, rast2skewx, rast2skewy, rast2srid); + END IF; + + newulx := rast2ulx; + newuly := rast2uly; + newwidth := rast2width; + newheight := rast2height; + + newrx := r2x; + newry := r2y; + z11w := 0; + z12w := 0; + z13w := 0; + z14w := 0; + + ELSIF upper(extentexpr) = 'INTERSECTION' THEN + + -- Check if the intersection is empty. + IF zcw = 0 OR zch = 0 OR + rast1 IS NULL OR ST_IsEmpty(rast1) OR + rast2 IS NULL OR ST_IsEmpty(rast2) THEN + RAISE NOTICE 'ST_MapAlgebra: INTERSECTION of provided rasters is empty. Returning an empty raster'; + RETURN ST_MakeEmptyRaster(0, 0, 0, 0, 0, 0, 0, 0, newsrid); + END IF; + + + -- Compute the new ulx and uly + newulx := st_raster2worldcoordx(rast1, zcx - r1x + 1, zcy - r1y + 1); + newuly := st_raster2worldcoordy(rast1, zcx - r1x + 1, zcy - r1y + 1); + newwidth := zcw; + newheight := zch; + + newrx := zcx; + newry := zcy; + z11w := 0; + z12w := 0; + z13w := 0; + z14w := 0; + z21w := 0; + z22w := 0; + z23w := 0; + z24w := 0; + + ELSIF upper(extentexpr) = 'UNION' THEN + + IF rast1 IS NULL OR ST_IsEmpty(rast1) THEN + newulx := rast2ulx; + newuly := rast2uly; + newwidth := rast2width; + newheight := rast2height; + + newrx := r2x; + newry := r2y; + z21w := 0; + z22w := 0; + z23w := 0; + z24w := 0; + ELSIF rast2 IS NULL OR ST_IsEmpty(rast2) THEN + newulx := rast1ulx; + newuly := rast1uly; + newwidth := rast1width; + newheight := rast1height; + + newrx := r1x; + newry := r1y; + z11w := 0; + z12w := 0; + z13w := 0; + z14w := 0; + ELSE + newrx := 0; + newry := 0; + + newulx := st_raster2worldcoordx(rast1, r1x + 1, r1y + 1); + newuly := st_raster2worldcoordy(rast1, r1x + 1, r1y + 1); + newwidth := max(r1x + r1w, r2x + r2w); + newheight := max(r1y + r1h, r2y + r2h); + + END IF; + ELSE + RAISE EXCEPTION 'ST_MapAlgebra: Unhandled extent expression "%". Only MASTER, INTERSECTION and UNION are accepted. Aborting.', upper(extentexpr); + END IF; + + -- Check if both rasters do not have the specified band. + IF ST_HasNoband(rast1, band1) AND ST_HasNoband(rast2, band2) THEN + RAISE NOTICE 'ST_MapAlgebra: Both raster do not have the specified band. Returning a no band raster with the correct extent'; + RETURN ST_MakeEmptyRaster(newwidth, newheight, newulx, newuly, newscalex, newscaley, newskewx, newskewy, newsrid); + END IF; + + -- Check newpixeltype + newpixeltype := pixeltype; + IF newpixeltype NOTNULL AND newpixeltype != '1BB' AND newpixeltype != '2BUI' AND newpixeltype != '4BUI' AND newpixeltype != '8BSI' AND newpixeltype != '8BUI' AND + newpixeltype != '16BSI' AND newpixeltype != '16BUI' AND newpixeltype != '32BSI' AND newpixeltype != '32BUI' AND newpixeltype != '32BF' AND newpixeltype != '64BF' THEN + RAISE EXCEPTION 'ST_MapAlgebra: Invalid pixeltype "%". Aborting.', newpixeltype; + END IF; + + -- If no newpixeltype was provided, get it from the provided rasters. + IF newpixeltype IS NULL THEN + IF (upper(extentexpr) = 'SECOND' AND NOT ST_HasNoBand(rast2, band2)) OR ST_HasNoBand(rast1, band1) THEN + newpixeltype := ST_BandPixelType(rast2, band2); + ELSE + newpixeltype := ST_BandPixelType(rast1, band1); + END IF; + END IF; + + -- Get the nodata value for first raster + IF NOT ST_HasNoBand(rast1, band1) AND ST_BandHasNodataValue(rast1, band1) THEN + rast1nodataval := ST_BandNodatavalue(rast1, band1); + ELSE + rast1nodataval := NULL; + END IF; + -- Get the nodata value for second raster + IF NOT ST_HasNoBand(rast2, band2) AND ST_BandHasNodatavalue(rast2, band2) THEN + rast2nodataval := ST_BandNodatavalue(rast2, band2); + ELSE + rast2nodataval := NULL; + END IF; + + -- Determine new notadavalue + IF (upper(extentexpr) = 'SECOND' AND NOT rast2nodataval IS NULL) THEN + newnodatavalue := rast2nodataval; + ELSEIF NOT rast1nodataval IS NULL THEN + newnodatavalue := rast1nodataval; + ELSE + RAISE NOTICE 'ST_MapAlgebra: Both source rasters do not have a nodata value, nodata value for new raster set to the minimum value possible'; + newnodatavalue := ST_MinPossibleValue(newrast); + END IF; + + upnodatanodataexpr := upper(nodatanodataexpr); + upnodata1expr := upper(nodata1expr); + upnodata2expr := upper(nodata2expr); + upexpression := upper(expression); + + -- Initialise newrast with nodata-nodata values. Then we don't have anymore to set values for nodata-nodata pixels. + IF upnodatanodataexpr IS NULL THEN + nodatanodataval := newnodatavalue; + ELSE + EXECUTE 'SELECT ' || upnodatanodataexpr INTO nodatanodataval; + IF nodatanodataval IS NULL THEN + nodatanodataval := newnodatavalue; + ELSE + newnodatavalue := nodatanodataval; + END IF; + END IF; + + ------------------------------------------------------------------- + --Create the raster receiving all the computed values. Initialize it to the new nodatavalue. + newrast := ST_AddBand(ST_MakeEmptyRaster(newwidth, newheight, newulx, newuly, newscalex, newscaley, newskewx, newskewy, newsrid), newpixeltype, newnodatavalue, newnodatavalue); + ------------------------------------------------------------------- + +RAISE NOTICE 'ST_MapAlgebra2 111 z11x=%, z11y=%, z11w=%, z11h=%', z11x, z11y, z11w, z11h; + -- First zone with only rast1 (z11) + IF z11w > 0 AND z11h > 0 AND NOT ST_BandIsNodata(rast1, band1) AND NOT nodata2expr IS NULL THEN + IF upnodata2expr = 'RAST' THEN + + + -- IF rast1nodataval != nodatanodataval THEN +RAISE NOTICE 'ST_MapAlgebra2 222'; + -- newrast := ST_SetValues(newrast, 1, z11x, z11y, z11w, z11h, nodatanodataval); + -- END IF; +RAISE NOTICE 'ST_MapAlgebra2 333 z11x=%, z11y=%, z11w=%, z11h=%', z11x, z11y, z11w, z11h; + newrast := ST_SetValues(newrast, 1, z11x, z11y, z11w, z11h, rast1, band1, NULL, TRUE); + + ELSE +RAISE NOTICE 'ST_MapAlgebra2 444'; + + tmprast := ST_Clip(rast1, z11x - r1x + 1, z11y - r1y + 1, z11w, z11h); + newrast := ST_Mapalgebra2(newrast, 1, tmprast, 1, replace(upnodata2expr, 'RAST', 'RAST2'), NULL, 'FIRST', NULL, 'RAST', NULL); + + END IF; + END IF; + +RAISE NOTICE 'ST_MapAlgebra2 555'; + + -- Common zone (zc) + skipcomputation = 0; + IF zcw > 0 AND zch > 0 AND (NOT ST_BandIsNodata(rast1, band1) OR NOT ST_BandIsNodata(rast2, band2)) THEN + +RAISE NOTICE 'ST_MapAlgebra2 666'; + -- Initialize the zone with nodatavalue. We will not further compute nodata nodata pixels + -- newrast := ST_SetValues(newrast, 1, zcx + 1, zcy + 1, zcw, zch, newnodatavalue); + + -- If rast1 is only nodata values, apply nodata1expr + IF ST_BandIsNodata(rast1, band1) THEN + + IF nodata1expr IS NULL THEN + + -- Do nothing + skipcomputation = 0; + + ELSEIF upnodata1expr = 'RAST' THEN + + -- Copy rast2 into newrast + newrast := ST_SetValues(newrast, 1, zcx, zcy, zcw, zch, , rast2, band2, NULL, 'KEEP'); + + ELSE + -- If nodata1expr resume to a constant + IF position('RAST' in upnodata1expr) = 0 THEN + + EXECUTE 'SELECT ' || upnodata1expr INTO newval; + IF newval IS NULL OR newval = newnodatavalue THEN + -- The constant is equal to nodata. We have nothing to compute since newrast was already initialized to nodata + skipcomputation := 2; + ELSEIF newnodatavalue IS NULL THEN + -- We can globally initialize to the constant only if there was no newnodatavalue. + newrast := ST_SetValues(newrast, 1, zcx, zcy, zcw, zch, newval); + skipcomputation := 2; + ELSE + -- We will assign the constant pixel by pixel. + skipcomputation := 1; + END IF; + END IF; + IF skipcomputation < 2 THEN + FOR x IN 1..zcw LOOP + FOR y IN 1..zch LOOP + r2 := ST_Value(rast2, band2, x + r2x, y + r2y); + IF (r2 IS NULL OR r2 = rast2nodataval) THEN + -- Do nothing since the raster have already been all set to this value + ELSE + IF skipcomputation < 1 THEN + newexpr := replace('SELECT ' || upnodata1expr, 'RAST', r2); + EXECUTE newexpr INTO newval; + IF newval IS NULL THEN + newval := newnodatavalue; + END IF; + END IF; + newrast = ST_SetValue(newrast, 1, x + zcx, y + zcy, newval); + END IF; + END LOOP; + END LOOP; + END IF; + END IF; + ELSEIF ST_BandIsNodata(rast2, band2) THEN + ELSE + END IF; + END IF; + + RETURN newrast; + END; + $$ + LANGUAGE 'plpgsql'; + + +CREATE OR REPLACE FUNCTION ST_TestRaster(ulx float8, uly float8, val float8) + RETURNS raster AS + $$ + DECLARE + BEGIN + RETURN ST_AddBand(ST_MakeEmptyRaster(5, 5, ulx, uly, 1, -1, 0, 0, -1), '32BF', val, -1); + END; + $$ + LANGUAGE 'plpgsql'; + + +SELECT asbinary((gv).geom), (gv).val +FROM st_pixelaspolygons(ST_TestRaster(-10, 2, 1)) gv; + +SELECT asbinary(_MapAlgebraAllPartsGeom(0, 0, 2, 1, 1, 0, 2, 1)) + +SELECT asbinary(pix.geom) as geom, pix.val +FROM st_pixelaspolygons(ST_MapAlgebra2(ST_TestRaster(0, 1, 1), 1, ST_TestRaster(1, 0, 1), 1, '(rast1 + rast2) / 2', NULL, 'union', '2*rast', 'rast', NULL), 1) as pix + + + + diff -Nru postgis-1.5.3/raster/scripts/plpgsql/st_mapalgebrafctngb.sql postgis-2.0.1/raster/scripts/plpgsql/st_mapalgebrafctngb.sql --- postgis-1.5.3/raster/scripts/plpgsql/st_mapalgebrafctngb.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/scripts/plpgsql/st_mapalgebrafctngb.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,378 @@ +---------------------------------------------------------------------- +-- $Id:$ +-- +-- Copyright (c) 2011 David Zwarg +-- +---------------------------------------------------------------------- + +-- +-- Helper method to get the smallest value in a raster, based on the pixeltype. +-- +CREATE OR REPLACE FUNCTION ST_MinPossibleValue(pixeltype text) + RETURNS float8 AS + $$ + DECLARE + newval int := 0; + BEGIN + newval := CASE + WHEN pixeltype = '1BB' THEN 0 + WHEN pixeltype = '2BUI' THEN 0 + WHEN pixeltype = '4BUI' THEN 0 + WHEN pixeltype = '8BUI' THEN 0 + WHEN pixeltype = '8BSI' THEN -128 + WHEN pixeltype = '16BUI' THEN 0 + WHEN pixeltype = '16BSI' THEN -32768 + WHEN pixeltype = '32BUI' THEN 0 + WHEN pixeltype = '32BSI' THEN -2147483648 + WHEN pixeltype = '32BF' THEN -2147483648 -- Could not find a function returning the smallest real yet + WHEN pixeltype = '64BF' THEN -2147483648 -- Could not find a function returning the smallest float8 yet + END; + RETURN newval; + END; + $$ + LANGUAGE 'plpgsql'; + +-- +--Test rasters +-- +CREATE OR REPLACE FUNCTION ST_TestRaster(h integer, w integer, val float8) + RETURNS raster AS + $$ + DECLARE + BEGIN + RETURN ST_AddBand(ST_MakeEmptyRaster(h, w, 0, 0, 1, 1, 0, 0, -1), '32BF', val, -1); + END; + $$ + LANGUAGE 'plpgsql'; + +-------------------------------------------------------------------- +-- ST_MapAlgebraFctNgb - (one raster version) Return a raster which values +-- are the result of a PLPGSQL user function involving a +-- neighborhood of values from the input raster band. +-- Arguments +-- rast raster - Raster on which the user function is evaluated. +-- band integer - Band number of the raster to be evaluated. Default to 1. +-- pixeltype text - Pixeltype assigned to the resulting raster. User function +-- results are truncated to this type. Default to the +-- pixeltype of the first raster. +-- ngbwidth integer - The width of the neighborhood, in cells. +-- ngbheight integer - The heigh of the neighborhood, in cells. +-- userfunction regprocedure - PLPGSQL user function to apply to with neighborhod pixels. +-- args variadic text[] - Arguments to pass into the user function. +-------------------------------------------------------------------- +DROP FUNCTION IF EXISTS ST_MapAlgebraFctNgb(rast raster, band integer, pixeltype text, ngbwidth integer, ngbheight integer, userfunction text, nodatamode text, variadic args text[]); +CREATE OR REPLACE FUNCTION ST_MapAlgebraFctNgb(rast raster, band integer, pixeltype text, ngbwidth integer, ngbheight integer, userfunction text, nodatamode text, variadic args text[]) + RETURNS raster AS + $$ + DECLARE + width integer; + height integer; + x integer; + y integer; + r float; + newrast raster; + newval float8; + newpixeltype text; + newnodatavalue float; + newinitialvalue float; + neighborhood float[][]; + nrow float[]; + valuesub boolean; + BEGIN + -- Check if raster is NULL + IF rast IS NULL THEN + RAISE NOTICE 'ST_MapAlgebraFctNgb: Raster is NULL. Returning NULL'; + RETURN NULL; + END IF; + + width := ST_Width(rast); + height := ST_Height(rast); + + -- Create a new empty raster having the same georeference as the provided raster + newrast := ST_MakeEmptyRaster(width, height, ST_UpperLeftX(rast), ST_UpperLeftY(rast), ST_ScaleX(rast), ST_ScaleY(rast), ST_SkewX(rast), ST_SkewY(rast), ST_SRID(rast)); + + -- If this new raster is empty (width = 0 OR height = 0) then there is nothing to compute and we return it right now + IF ST_IsEmpty(newrast) THEN + RAISE NOTICE 'ST_MapAlgebraFctNgb: Raster is empty. Returning an empty raster'; + RETURN newrast; + END IF; + + -- Check if rast has the required band. Otherwise return a raster without band + IF ST_HasNoBand(rast, band) THEN + RAISE NOTICE 'ST_MapAlgebraFctNgb: Raster does not have the required band. Returning a raster without a band'; + RETURN newrast; + END IF; + + -- Set the new pixeltype + newpixeltype := pixeltype; + IF newpixeltype IS NULL THEN + newpixeltype := ST_BandPixelType(rast, band); + ELSIF newpixeltype != '1BB' AND newpixeltype != '2BUI' AND newpixeltype != '4BUI' AND newpixeltype != '8BSI' AND newpixeltype != '8BUI' AND + newpixeltype != '16BSI' AND newpixeltype != '16BUI' AND newpixeltype != '32BSI' AND newpixeltype != '32BUI' AND newpixeltype != '32BF' AND newpixeltype != '64BF' THEN + RAISE EXCEPTION 'ST_MapAlgebraFctNgb: Invalid pixeltype "%". Aborting.', newpixeltype; + END IF; + + -- Check for notada value + newnodatavalue := ST_BandNodataValue(rast, band); + IF newnodatavalue IS NULL OR newnodatavalue < ST_MinPossibleValue(newpixeltype) OR newnodatavalue > (-ST_MinPossibleValue(newpixeltype) - 1) THEN + RAISE NOTICE 'ST_MapAlgebraFctNgb: Source raster does not have a nodata value or is out of range for the new raster pixeltype, nodata value for new raster set to the min value possible'; + newnodatavalue := ST_MinPossibleValue(newpixeltype); + END IF; + + -- We set the initial value of the future band to nodata value. + -- If nodatavalue is null then the raster will be initialise to ST_MinPossibleValue + -- but all the values should be recomputed anyway. + newinitialvalue := newnodatavalue; + + -- Optimization: If the raster is only filled with nodata value return right now a raster filled with the nodatavalueexpr + IF ST_BandIsNoData(rast, band) THEN + RETURN ST_AddBand(newrast, newpixeltype, newinitialvalue, newnodatavalue); + END IF; + + --Create the raster receiving all the computed values. Initialize it to the new initial value. + newrast := ST_AddBand(newrast, newpixeltype, newinitialvalue, newnodatavalue); + + IF nodatamode = 'value' THEN + valuesub := TRUE; + ELSIF nodatamode != 'ignore' AND nodatamode != 'NULL' AND NOT nodatamode ~ E'^[\-+]?[0-9]*(\.[0-9]+(e[\-+]?[0-9]+)?)?$' THEN + RAISE NOTICE 'ST_MapAlgebraFctNgb: ''nodatamode'' parameter must be one of: value, ignore, NULL, or a numerical value.'; + RETURN NULL; + END IF; + + -- Computation loop + FOR x IN (1+ngbwidth)..(width-ngbwidth) LOOP + FOR y IN (1+ngbheight)..(height-ngbheight) LOOP + + -- create a matrix of the pixel values in the neighborhood + neighborhood := ARRAY[[]]::float[]; + FOR u IN (x-ngbwidth)..(x+ngbwidth) LOOP + nrow := ARRAY[]::float[]; + FOR v in (y-ngbheight)..(y+ngbheight) LOOP + nrow := nrow || ARRAY[ ST_Value(rast, band, u, v)::float ]; + END LOOP; + neighborhood := neighborhood || ARRAY[ nrow ]; + END LOOP; + + -- RAISE NOTICE 'Neighborhood: %', neighborhood; + + IF valuesub IS TRUE THEN + nodatamode := ST_Value(rast, band, x, y); + -- special case where NULL needs to be quoted + IF nodatamode IS NULL THEN + nodatamode := 'NULL'; + END IF; + END IF; + + EXECUTE 'SELECT ' ||userfunction || '(' || quote_literal(neighborhood) || ', ' || quote_literal(nodatamode) || ', NULL)' INTO r; + + newrast = ST_SetValue(newrast, band, x, y, r); + END LOOP; + END LOOP; + RETURN newrast; + END; + $$ + LANGUAGE 'plpgsql'; + +-- +-- A simple 'callback' user function that sums up all the values in a neighborhood. +-- +CREATE OR REPLACE FUNCTION ST_Sum(matrix float[][], nodatamode text, variadic args text[]) + RETURNS float AS + $$ + DECLARE + x1 integer; + x2 integer; + y1 integer; + y2 integer; + sum float; + BEGIN + sum := 0; + raise notice 'in callback: %', nodatamode; + FOR x in array_lower(matrix, 1)..array_upper(matrix, 1) LOOP + FOR y in array_lower(matrix, 2)..array_upper(matrix, 2) LOOP + IF matrix[x][y] IS NULL THEN + raise notice 'matrix[%][%] is NULL', x, y; + IF nodatamode = 'ignore' THEN + matrix[x][y] := 0; + ELSE + matrix[x][y] := nodatamode::float; + END IF; + END IF; + sum := sum + matrix[x][y]; + END LOOP; + END LOOP; + RETURN sum; + END; + $$ + LANGUAGE 'plpgsql'; + +-- Tests +-- Test NULL Raster. Should be true. +--SELECT ST_MapAlgebraFctNgb(NULL, 1, NULL, 1, 1, 'ST_Sum', 'NULL', NULL) IS NULL FROM ST_TestRaster(0, 0, -1) rast; + +-- Test empty Raster. Should be true. +--SELECT ST_IsEmpty(ST_MapAlgebraFctNgb(ST_MakeEmptyRaster(0, 10, 0, 0, 1, 1, 1, 1, -1), 1, NULL, 1, 1, 'ST_Sum', 'NULL', NULL)); + +-- Test has no band raster. Should be true +--SELECT ST_HasNoBand(ST_MapAlgebraFctNgb(ST_MakeEmptyRaster(10, 10, 0, 0, 1, 1, 1, 1, -1), 1, NULL, 1, 1, 'ST_Sum', 'NULL', NULL)); + +-- Test has no nodata value. Should return null and 7. +--SELECT +-- ST_Value(rast, 2, 2) IS NULL, +-- ST_Value( +-- ST_MapAlgebraFctNgb( +-- ST_SetBandNoDataValue(rast, NULL), 1, NULL, 1, 1, 'ST_Sum', 'NULL', NULL +-- ), 2, 2) = 7 +-- FROM ST_SetValue(ST_TestRaster(3, 3, 1), 2, 2, NULL) AS rast; +-- +-- Test NULL nodatamode. Should return null and null. +--SELECT +-- ST_Value(rast, 2, 2) IS NULL, +-- ST_Value( +-- ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'ST_Sum', 'NULL', NULL), 2, 2 +-- ) IS NULL +-- FROM ST_SetValue(ST_TestRaster(3, 3, 1), 2, 2, NULL) AS rast; +-- +-- Test ignore nodatamode. Should return null and 8. +--SELECT +-- ST_Value(rast, 2, 2) IS NULL, +-- ST_Value( +-- ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'ST_Sum', 'ignore', NULL), 2, 2 +-- ) = 8 +-- FROM ST_SetValue(ST_TestRaster(3, 3, 1), 2, 2, NULL) AS rast; +-- +-- Test value nodatamode. Should return null and null. +--SELECT +-- ST_Value(rast, 2, 2) IS NULL, +-- ST_Value( +-- ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'ST_Sum', 'value', NULL), 2, 2 +-- ) IS NULL +-- FROM ST_SetValue(ST_TestRaster(3, 3, 1), 2, 2, NULL) AS rast; +-- +-- Test value nodatamode. Should return null and 9. +--SELECT +-- ST_Value(rast, 1, 1) IS NULL, +-- ST_Value( +-- ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'ST_Sum', 'value', NULL), 2, 2 +-- ) = 9 +-- FROM ST_SetValue(ST_TestRaster(3, 3, 1), 1, 1, NULL) AS rast; +-- +-- Test value nodatamode. Should return null and 0. +--SELECT +-- ST_Value(rast, 2, 2) IS NULL, +-- ST_Value( +-- ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'ST_Sum', '-8', NULL), 2, 2 +-- ) = 0 +-- FROM ST_SetValue(ST_TestRaster(3, 3, 1), 2, 2, NULL) AS rast; +-- +-- Test ST_Sum user function. Should be 1 and 9. +--SELECT +-- ST_Value(rast, 2, 2) = 1, +-- ST_Value( +-- ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'ST_Sum', 'NULL', NULL), 2, 2 +-- ) = 9 +-- FROM ST_TestRaster(3, 3, 1) AS rast; +-- +-- Test ST_Sum user function on a no nodata value raster. Should be null and -1. +--SELECT +-- ST_Value(rast, 2, 2) IS NULL, +-- ST_Value( +-- ST_MapAlgebraFctNgb(ST_SetBandNoDataValue(rast, NULL), 1, NULL, 1, 1, 'ST_Sum', 'NULL', NULL), 2, 2 +-- ) = -1 +-- FROM ST_SetValue(ST_TestRaster(3, 3, 0), 2, 2, NULL) AS rast; +-- +-- Test pixeltype 1. Should return 2 and 15. +--SELECT +-- ST_Value(rast, 2, 2) = 2, +-- ST_Value( +-- ST_MapAlgebraFctNgb(rast, 1, '4BUI', 1, 1, 'ST_Sum', 'NULL', NULL), 2, 2 +-- ) = 15 +-- FROM ST_SetBandNoDataValue(ST_TestRaster(3, 3, 2), 1, NULL) AS rast; +-- +-- Test pixeltype 1. Should return an error. +--SELECT +-- ST_Value(rast, 2, 2), +-- ST_Value( +-- ST_MapAlgebraFctNgb(rast, 1, '4BUId', 1, 1, 'ST_Sum', 'NULL', NULL), 2, 2 +-- ) +-- FROM ST_TestRaster(3, 3, 2) AS rast; +-- +-- Test pixeltype 1. Should return 1 and 3. +--SELECT +-- ST_Value(rast, 2, 2) = 1, +-- ST_Value( +-- ST_MapAlgebraFctNgb(rast, 1, '2BUI', 1, 1, 'ST_Sum', 'NULL', NULL), 2, 2 +-- ) = 3 +-- FROM ST_TestRaster(3, 3, 1) AS rast; +-- +-- Test that the neighborhood function leaves a border of NODATA +--SELECT +-- COUNT(*) = 1 +-- FROM (SELECT +-- (ST_DumpAsPolygons( +-- ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'ST_Sum', 'NULL', NULL) +-- )).* +-- FROM ST_TestRaster(5, 5, 1) AS rast) AS foo +-- WHERE ST_Area(geom) = 9; +-- +-- Test that the neighborhood function leaves a border of NODATA +--SELECT +-- ST_Area(geom) = 8, val = 9 +-- FROM (SELECT +-- (ST_DumpAsPolygons( +-- ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'ST_Sum', 'NULL', NULL) +-- )).* +-- FROM ST_SetValue(ST_TestRaster(5, 5, 1), 1, 1, NULL) AS rast) AS foo; +-- +-- Test that the neighborhood function leaves a border of NODATA +-- plus a corner where one cell has a value of 8. +--SELECT +-- (ST_Area(geom) = 1 AND val = 8) OR (ST_Area(geom) = 8 AND val = 9) +-- FROM (SELECT +-- (ST_DumpAsPolygons( +-- ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'ST_Sum', 'ignore', NULL) +-- )).* +-- FROM ST_SetValue(ST_TestRaster(5, 5, 1), 1, 1, NULL) AS rast) AS foo; +-- +-- Test that the neighborhood function leaves a border of NODATA +-- plus a hole where 9 cells have NODATA +-- This results in a donut: a polygon with a hole. The polygon has +-- an area of 16, with a hole that has an area of 9 +--SELECT +-- ST_NRings(geom) = 2, +-- ST_NumInteriorRings(geom) = 1, +-- ST_Area(geom) = 16, +-- val = 9, +-- ST_Area(ST_BuildArea(ST_InteriorRingN(geom, 1))) = 9 +-- FROM (SELECT +-- (ST_DumpAsPolygons( +-- ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'ST_Sum', 'NULL', NULL) +-- )).* +-- FROM ST_SetValue(ST_TestRaster(7, 7, 1), 4, 4, NULL) AS rast) AS foo; +-- +-- Test that the neighborhood function leaves a border of NODATA, +-- and the center pyramids when summed twice, ignoring NODATA values +--SELECT +-- COUNT(*) = 9, SUM(ST_Area(geom)) = 9, SUM(val) = ((36+54+36) + (54+81+54) + (36+54+36)) +-- --ST_AsText(geom), ST_Area(geom), val +-- FROM (SELECT +-- (ST_DumpAsPolygons( +-- ST_MapAlgebraFctNgb( +-- ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'ST_Sum', 'ignore', NULL), 1, NULL, 1, 1, 'ST_Sum', 'ignore', NULL +-- ) +-- )).* +-- FROM ST_SetBandNoDataValue(ST_TestRaster(5, 5, 1), NULL) AS rast) AS foo; +-- +-- Test that the neighborhood function leaves a border of NODATA, +-- and the center contains one cel when summed twice, replacing NULL with NODATA values +--SELECT +-- COUNT(*) = 1, SUM(ST_Area(geom)) = 1, SUM(val) = 81 +-- --ST_AsText(geom), ST_Area(geom), val +-- FROM (SELECT +-- (ST_DumpAsPolygons( +-- ST_MapAlgebraFctNgb( +-- ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'ST_Sum', 'NULL', NULL), 1, NULL, 1, 1, 'ST_Sum', 'NULL', NULL +-- ) +-- )).* +-- FROM ST_SetBandNoDataValue(ST_TestRaster(5, 5, 1), NULL) AS rast) AS foo; +-- diff -Nru postgis-1.5.3/raster/scripts/plpgsql/st_multibandmapalgebra.sql postgis-2.0.1/raster/scripts/plpgsql/st_multibandmapalgebra.sql --- postgis-1.5.3/raster/scripts/plpgsql/st_multibandmapalgebra.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/scripts/plpgsql/st_multibandmapalgebra.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,29 @@ +----------------------------------------------------------------------- +-- ST_MultiBandMapAlgebra +-- Return the same map algebra expression to all the band of a raster. +----------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION ST_MultiBandMapAlgebra(rast1 raster, + rast2 raster, + expression text, + extentexpr text) + RETURNS raster AS + $$ + DECLARE + numband int; + newrast raster; + pixeltype text; + nodataval float; + BEGIN + numband := ST_NumBands(rast1); + IF numband != ST_NumBands(rast2) THEN + RAISE EXCEPTION 'ST_MultiBandMapAlgebra: Rasters do not have the same number of band'; + END IF; + newrast := ST_MakeEmptyRaster(rast1); + FOR b IN 1..numband LOOP + pixeltype := ST_BandPixelType(rast1, b); + nodataval := ST_BandNodataValue(rast1, b); + newrast := ST_AddBand(newrast, NULL, ST_MapAlgebraExpr(rast1, b, rast2, b, expression, pixeltype, extentexpr, nodataval), 1); + END LOOP; + END; + $$ + LANGUAGE 'plpgsql'; \ No newline at end of file diff -Nru postgis-1.5.3/raster/scripts/plpgsql/st_pixelaspoints.sql postgis-2.0.1/raster/scripts/plpgsql/st_pixelaspoints.sql --- postgis-1.5.3/raster/scripts/plpgsql/st_pixelaspoints.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/scripts/plpgsql/st_pixelaspoints.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,46 @@ +----------------------------------------------------------------------- +-- Complex type geomvalxy for returning the geometry, the value, the x coordinate and the y coordinate of a pixel +----------------------------------------------------------------------- +CREATE TYPE geomvalxy AS ( + geom geometry, + val double precision, + x int, + y int +); +----------------------------------------------------------------------- +-- ST_PixelAsPoints +-- Return all the pixels of a raster as a record composed of a point geometry, a value, a x and a y raster coordinate. +-- Should be called like this: +-- SELECT (gv).geom, (gv).val, (gv).x, (gv).y FROM (SELECT ST_PixelAsPoints(rast) gv FROM mytable) foo +----------------------------------------------------------------------- +DROP FUNCTION IF EXISTS ST_PixelAsPoints(rast raster, band integer); +CREATE OR REPLACE FUNCTION ST_PixelAsPoints(rast raster, band integer) + RETURNS SETOF geomvalxy AS + $$ + DECLARE + rast alias for $1; + w integer; + h integer; + x integer; + y integer; + result geomvalxy; + BEGIN + SELECT st_width(rast), st_height(rast) + INTO w, h; + FOR x IN 1..w LOOP + FOR y IN 1..h LOOP + SELECT ST_Centroid(ST_PixelAsPolygon(rast, x, y)), ST_Value(rast, band, x, y), x, y INTO result; + RETURN NEXT result; + END LOOP; + END LOOP; + RETURN; + END; + $$ + LANGUAGE 'plpgsql'; + +DROP FUNCTION IF EXISTS ST_PixelAsPoints(rast raster); +CREATE FUNCTION ST_PixelAsPoints(raster) RETURNS SETOF geomvalxy AS +$$ + SELECT ST_PixelAsPoints($1, 1); +$$ +LANGUAGE SQL; \ No newline at end of file diff -Nru postgis-1.5.3/raster/scripts/plpgsql/st_pixelaspolygons.sql postgis-2.0.1/raster/scripts/plpgsql/st_pixelaspolygons.sql --- postgis-1.5.3/raster/scripts/plpgsql/st_pixelaspolygons.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/scripts/plpgsql/st_pixelaspolygons.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,55 @@ +---------------------------------------------------------------------- +-- +-- $Id: st_pixelaspolygons.sql 9324 2012-02-27 22:08:12Z pramsey $ +-- +-- Copyright (c) 2009-2010 Pierre Racine +-- +---------------------------------------------------------------------- +CREATE TYPE geomvalxy AS ( + geom geometry, + val double precision, + x int, + y int +); + +----------------------------------------------------------------------- +-- ST_PixelAsPolygons +-- Return all the pixels of a raster as a geomval record +-- Should be called like this: +-- SELECT (gv).geom, (gv).val FROM (SELECT ST_PixelAsPolygons(rast) gv FROM mytable) foo +----------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION ST_PixelAsPolygons(rast raster, band integer) + RETURNS SETOF geomvalxy AS + $$ + DECLARE + rast alias for $1; + w integer; + h integer; + x integer; + y integer; + result geomvalxy; + BEGIN + IF rast IS NOT NULL THEN + IF ST_HasNoBand(rast, band) THEN + RAISE NOTICE 'Raster do not have band %. Returning null', band; + ELSE + SELECT ST_Width(rast), ST_Height(rast) + INTO w, h; + FOR x IN 1..w LOOP + FOR y IN 1..h LOOP + SELECT ST_PixelAsPolygon(rast, band, x, y), ST_Value(rast, band, x, y), x, y INTO result; + RETURN NEXT result; + END LOOP; + END LOOP; + END IF; + END IF; + RETURN; + END; + $$ + LANGUAGE 'plpgsql'; + +CREATE FUNCTION ST_PixelAsPolygons(raster) RETURNS SETOF geomvalxy AS +$$ + SELECT ST_PixelAsPolygons($1, 1); +$$ +LANGUAGE SQL; diff -Nru postgis-1.5.3/raster/scripts/plpgsql/st_querytables.sql postgis-2.0.1/raster/scripts/plpgsql/st_querytables.sql --- postgis-1.5.3/raster/scripts/plpgsql/st_querytables.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/scripts/plpgsql/st_querytables.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,26 @@ +---------------------------------------------------------------------------------------------------------------------- +-- ST_QueryTables +-- Execute a query on a series of table based on a prefix. +-- The string "tablename" will be replaced by the name of the table. +-- schemaname - The schema where to execute the queries. +-- prefix - Prefix to restraint the query to tables names starting with this string. +-- inquery - Query to execute. Can contain the 'tablename' string which will be replaced buy the name of the current table. +-- +-- Example to drop a set of table +-- +-- SELECT ST_QueryTables('public', 'aa', 'DROP TABLE IF EXISTS tablename'); +---------------------------------------------------------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION ST_QueryTables(schemaname text, prefix text, inquery text) +RETURNS int AS +$BODY$ +DECLARE + tabletoquery RECORD; +BEGIN + FOR tabletoquery IN EXECUTE 'SELECT tablename FROM pg_tables WHERE schemaname = ' || quote_literal(schemaname) || ' AND tablename LIKE ' || quote_literal(prefix || '%') LOOP + RAISE NOTICE 'Querying %', schemaname || '.' || tabletoquery.tablename; + EXECUTE replace(inquery, 'tablename', '"' || schemaname || '"."' || tabletoquery.tablename || '"'); + END LOOP; + RETURN 1; +END; +$BODY$ +LANGUAGE plpgsql VOLATILE STRICT; \ No newline at end of file diff -Nru postgis-1.5.3/raster/scripts/plpgsql/st_reclass.sql postgis-2.0.1/raster/scripts/plpgsql/st_reclass.sql --- postgis-1.5.3/raster/scripts/plpgsql/st_reclass.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/scripts/plpgsql/st_reclass.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,70 @@ +---------------------------------------------------------------------- +-- +-- $Id: st_reclass.sql 9324 2012-02-27 22:08:12Z pramsey $ +-- +-- Copyright (c) 2009-2010 Pierre Racine +-- +---------------------------------------------------------------------- +-- NOTE: The ST_Reclass() function is already implemented in C. This plpgsql script is provided only as an example. +-- Defining the plpgsql function below might overwrite the current C implementation and brake other functions dependent on it. +-- Use with caution. +---------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION ST_Reclass(rast raster, + band int, + reclassexpr text) + RETURNS raster AS + $$ + DECLARE + -- Create a new raster without the band we will reclassify + newrast raster := ST_DeleteBand(rast, band); + + -- Determine the nodata value + nodataval float8 := ST_BandNodataValue(rast, band); + + -- First parse of the reclass expression. Split the reclass classes into an array. + reclarray text[] := string_to_array(reclassexpr, '|'); + + -- Determine the number of classes. + nbreclassstr int := array_length(reclarray, 1); + + -- Initialise the MapAlgebra expression + maexpr text := 'CASE '; + + -- Temporary container for the two part of the class being parsed. + reclassstr text[]; + + -- Temporary array containing the splited class. + fromstr text[]; + + i int; + BEGIN + -- For each classes + FOR i IN 1..nbreclassstr LOOP + -- Split the class into an array of classes. + reclassstr := string_to_array(reclarray[i], ':'); + IF array_length(reclassstr, 1) < 2 THEN + RAISE EXCEPTION 'ST_Reclass: Invalid reclassification class: "%". Aborting', reclarray[i]; + END IF; + -- Split the range to reclassify into two + fromstr := string_to_array(reclassstr[1], '-'); + -- Replace nodata with the nodata value + IF upper(reclassstr[2]) = 'NODATA' THEN + reclassstr[2] = nodataval::text; + END IF; + -- Build the maexpr expression + IF fromstr[2] IS NULL OR fromstr[2] = '' THEN + maexpr := maexpr || ' WHEN ' || fromstr[1] || ' = rast THEN ' || reclassstr[2] || ' '; + ELSE + maexpr := maexpr || ' WHEN ' || fromstr[1] || ' <= rast AND rast < ' || fromstr[2] || ' THEN ' || reclassstr[2] || ' '; + END IF; + END LOOP; + maexpr := maexpr || 'ELSE rast END'; + newrast := ST_AddBand(rast, ST_MapAlgebra(rast, band, maexpr), 1, band); + RETURN newrast; + END; + $$ + LANGUAGE 'plpgsql'; + +SELECT ST_Value(ST_TestRaster(1, 1, 4),1,1) +SELECT ST_Value(ST_Reclass(ST_TestRaster(1, 1, 4), 1, '1:2|2:2|3-5:10'), 1, 1); + diff -Nru postgis-1.5.3/raster/scripts/plpgsql/st_setarray.sql postgis-2.0.1/raster/scripts/plpgsql/st_setarray.sql --- postgis-1.5.3/raster/scripts/plpgsql/st_setarray.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/scripts/plpgsql/st_setarray.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,27 @@ +-- $Id: st_setarray.sql 9324 2012-02-27 22:08:12Z pramsey $ +---------------------------------------------------------------------- +-- Copyright (c) 2009-2010 Pierre Racine +---------------------------------------------------------------------- + +CREATE OR REPLACE FUNCTION ST_SetArea(rast raster, band, x int, y int, width int, height int, val float8) + RETURNS raster AS + $$ + DECLARE + newraster raster := rast; + cx int; + cy int; + newwidth int := CASE WHEN x + width > ST_Width(rast) THEN ST_Width(rast) - x ELSE width END; + newheight int := CASE WHEN y + height > ST_Height(rast) THEN ST_Height(rast) - y ELSE height END; + BEGIN + newrast + FOR cx IN 1..newwidth LOOP + FOR cy IN 1..newheight LOOP + newrast := ST_SetValue(newrast, band, cx, cy, val); + END LOOP; + END LOOP; + RETURN newrast; + END; + $$ + LANGUAGE 'plpgsql'; + + diff -Nru postgis-1.5.3/raster/scripts/plpgsql/st_setvalues.sql postgis-2.0.1/raster/scripts/plpgsql/st_setvalues.sql --- postgis-1.5.3/raster/scripts/plpgsql/st_setvalues.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/scripts/plpgsql/st_setvalues.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,386 @@ +---------------------------------------------------------------------- +-- +-- $Id: st_setvalues.sql 6127 2010-10-25 16:06:00Z jorgearevalo $ +-- +-- Copyright (c) 2009-2010 Pierre Racine +-- +---------------------------------------------------------------------- + +--NOTE: Both ST_SetValues functions found in this file are ready to be being implemented in C + +-------------------------------------------------------------------- +-- ST_SetValues - Set a range of raster pixels to a value. +-- +-- Arguments +-- +-- rast raster - Raster to be edited. +-- band integer - Band number of the raster to be edited. Default to 1. +-- x, y - Raster coordinates of the upper left corner of the range +-- of pixel to be edited. +-- width, height - Width and height of the range of pixel to be edited. +-- val - Value to set the range. If NULL, pixels are set to nodata. +-- keepdestnodata - Flag indicating not to change pixels set to nodata value. +-- Default to FALSE. +-- +-- When x, y, width or height are out of the raster range, only the part +-- of the range intersecting with the raster is set. +-------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION ST_SetValues(rast raster, band int, x int, y int, width int, height int, val float8, keepdestnodata boolean) + RETURNS raster AS + $$ + DECLARE + newraster raster := rast; + cx int; + cy int; + newwidth int := width; + newheight int := height; + newband int := band; + oldx int := x; + oldy int := y; + newx int; + newy int; + newval float8 := val; + newkeepdestnodata boolean := keepdestnodata; + rastnodataval int := 0; + BEGIN + IF rast IS NULL THEN + RAISE NOTICE 'ST_SetValues: No raster provided. Returns NULL'; + RETURN NULL; + END IF; + + IF ST_IsEmpty(rast) OR ST_HasNoBand(rast, band) THEN + RAISE NOTICE 'ST_SetValues: Empty or no band raster provided. Returns rast'; + RETURN rast; + END IF; + + IF newband IS NULL THEN + newband := 1; + END IF; + + IF newband < 1 THEN + RAISE NOTICE 'ST_SetValues: band out of range. Returns rast'; + RETURN rast; + END IF; + + IF width IS NULL OR width < 1 OR height IS NULL OR height < 1 THEN + RAISE NOTICE 'ST_SetValues: invalid width or height. Returns rast'; + RETURN rast; + END IF; + + IF x IS NULL THEN + oldx := 1; + END IF; + + newx := 1 + LEAST(GREATEST(0, oldx - 1), ST_Width(rast)); + newwidth := GREATEST(LEAST(1 + ST_Width(rast), oldx + newwidth), 1) - newx; + + IF y IS NULL THEN + oldy := 1; + END IF; + + newy := 1 + LEAST(GREATEST(0, oldy - 1), ST_Height(rast)); + newheight := GREATEST(LEAST(1 + ST_Height(rast), oldy + newheight), 1) - newy; + + IF newwidth < 1 OR newheight < 1 THEN + RETURN rast; + END IF; + + IF newkeepdestnodata IS NULL THEN + newkeepdestnodata := FALSE; + END IF; + + IF newkeepdestnodata THEN + IF NOT ST_BandNodataValue(rast, newband) IS NULL THEN + rastnodataval := ST_BandNoDataValue(rast, newband); + ELSE + RAISE NOTICE 'ST_SetValues: keepdestnodata was set to TRUE but rast1 does not have a nodata value. keepdestnodata reset to FALSE'; + newkeepdestnodata := FALSE; + END IF; + IF ST_BandIsNodata(rast, band) THEN + RETURN rast; + END IF; + END IF; + + IF newval IS NULL THEN + newval := ST_BandNoDataValue(rast, band); + END IF; + + IF newval IS NULL THEN + RAISE NOTICE 'ST_SetValues: val is NULL and no nodata exist for rast. Returns rast'; + RETURN rast; + END IF; + + IF newkeepdestnodata THEN + FOR cx IN newx..newx + newwidth - 1 LOOP + FOR cy IN newy..newy + newheight - 1 LOOP + IF ST_Value(newraster, newband, cx, cy) != rastnodataval THEN + newraster := ST_SetValue(newraster, newband, cx, cy, newval); + END IF; + END LOOP; + END LOOP; + ELSE + FOR cx IN newx..newx + newwidth - 1 LOOP + FOR cy IN newy..newy + newheight - 1 LOOP + newraster := ST_SetValue(newraster, newband, cx, cy, newval); + END LOOP; + END LOOP; + END IF; + + RETURN newraster; + END; + $$ + LANGUAGE 'plpgsql'; + +-- Variant with band = 1 +CREATE OR REPLACE FUNCTION ST_SetValues(rast raster, x int, y int, width int, height int, val float8, keepdestnodata boolean) + RETURNS raster + AS 'SELECT ST_SetValues($1, 1, $2, $3, $4, $5, $6, $7)' + LANGUAGE 'SQL' IMMUTABLE; + +-- Variant with band = 1 & keepdestnodata = FALSE +CREATE OR REPLACE FUNCTION ST_SetValues(rast raster, x int, y int, width int, height int, val float8) + RETURNS raster + AS 'SELECT ST_SetValues($1, 1, $2, $3, $4, $5, $6, FALSE)' + LANGUAGE 'SQL' IMMUTABLE; + +-- Variant with keepdestnodata = FALSE +CREATE OR REPLACE FUNCTION ST_SetValues(rast raster, band int, x int, y int, width int, height int, val float8) + RETURNS raster + AS 'SELECT ST_SetValues($1, $2, $3, $4, $5, $6, $7, FALSE)' + LANGUAGE 'SQL' IMMUTABLE; + +--Test rasters +CREATE OR REPLACE FUNCTION ST_TestRaster(ulx float8, uly float8, val float8) + RETURNS raster AS + $$ + DECLARE + BEGIN + RETURN ST_AddBand(ST_MakeEmptyRaster(10, 10, ulx, uly, 1, 1, 0, 0, -1), '32BF', val, -1); + END; + $$ + LANGUAGE 'plpgsql'; + + +-- Test +SELECT ST_SetValues(ST_TestRaster(0, 0, 1), 2, 2, 1, 1, 0) + +SELECT (pix).geom, (pix).val +FROM (SELECT ST_PixelAsPolygons(ST_TestRaster(0, 0, 1)) as pix) foo + +SELECT ST_AsBinary((pix).geom), (pix).val +FROM (SELECT ST_PixelAsPolygons(ST_SetValues(ST_TestRaster(0, 0, 1), 2, 1, 1, 1, 0)) as pix) foo + +SELECT ST_AsBinary((pix).geom), (pix).val +FROM (SELECT ST_PixelAsPolygons(ST_SetValues(ST_TestRaster(0, 0, 1), 2, 1, 1, 10, 0)) as pix) foo + +SELECT ST_AsBinary((pix).geom), (pix).val +FROM (SELECT ST_PixelAsPolygons(ST_SetValues(ST_TestRaster(0, 0, 1), 1, 1, 4, 4, 0)) as pix) foo + +SELECT ST_AsBinary((pix).geom), (pix).val +FROM (SELECT ST_PixelAsPolygons(ST_SetValues(ST_TestRaster(0, 0, 1), 0, 3, 4, 4, 0)) as pix) foo + +SELECT ST_AsBinary((pix).geom), (pix).val +FROM (SELECT ST_PixelAsPolygons(ST_SetValues(ST_TestRaster(0, 0, -1), 2, 2, 2, 2, 0, TRUE)) as pix) foo + +SELECT ST_AsBinary((pix).geom), (pix).val +FROM (SELECT ST_PixelAsPolygons(ST_SetValues(ST_SetBandNoDataValue(ST_TestRaster(0, 0, -1), NULL), 2, 2, 2, 2, 0, TRUE)) as pix) foo + +-------------------------------------------------------------------- +-- ST_SetValues - Set a range of raster pixels to values copied from +-- the corresponding pixels in another raster. +-- Arguments +-- +-- rast1 raster - Raster to be edited. +-- band1 integer - Band number of the raster to be edited. Default to 1. +-- x, y - Raster coordinates of the upper left corner of the +-- range of pixel to be edited. +-- width, height - Width and height of the range of pixel to be edited. +-- rast2 - Raster values are copied from. +-- band2 - Band number of the raster values are copied from. +-- keepdestnodata - Flag indicating not to change pixels (in the edited +-- raster) set to nodata value. Default to FALSE. +-- keepsourcetnodata - Flag indicating not to copy pixels (from the source +-- raster) set to nodata value. Default to FALSE. +-- +-- When x, y, width or height are out of the raster range, only the part +-- of the range intersecting with the raster is set. +-------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION ST_SetValues(rast1 raster, band1 int, x int, y int, width int, height int, rast2 raster, band2 int, keepdestnodata boolean, keepsourcenodata boolean) + RETURNS raster AS + $$ + DECLARE + newraster raster := rast1; + newwidth int := width; + newheight int := height; + oldx int := x; + oldy int := y; + newx int; + newy int; + newband1 int := band1; + newband2 int := band2; + newkeepdestnodata boolean := keepdestnodata; + newkeepsourcenodata boolean := keepsourcenodata; + r2val float; + rast1nodataval float; + rast2nodataval float; + + x2 int; + y2 int; + cx int; + cy int; + BEGIN + IF rast1 IS NULL THEN + RAISE NOTICE 'ST_SetValues: No raster provided. Return NULL'; + RETURN NULL; + END IF; + + IF ST_IsEmpty(rast1) OR ST_HasNoBand(rast1, band1) THEN + RAISE NOTICE 'ST_SetValues: Empty or no band destination raster provided. Returns rast1'; + RETURN rast1; + END IF; + + IF rast2 IS NULL OR ST_IsEmpty(rast2) OR ST_HasNoBand(rast2, band2) THEN + RAISE NOTICE 'ST_SetValues: Empty or no band source raster provided. Returns rast1'; + RETURN rast1; + END IF; + + IF newband1 IS NULL THEN + newband1 := 1; + END IF; + + IF newband1 < 1 THEN + RAISE NOTICE 'ST_SetValues: band1 out of range. Returns rast'; + RETURN rast1; + END IF; + + IF newband2 IS NULL THEN + newband2 := 1; + END IF; + + IF newband2 < 1 THEN + RAISE NOTICE 'ST_SetValues: band2 out of range. Returns rast'; + RETURN rast1; + END IF; + + IF x IS NULL THEN + oldx := 1; + END IF; + + newx := 1 + LEAST(GREATEST(0, oldx - 1), ST_Width(rast1)); + newwidth := GREATEST(LEAST(1 + ST_Width(rast1), oldx + newwidth), 1) - newx; + oldx := newx; + + IF y IS NULL THEN + oldy := 1; + END IF; + +--RAISE NOTICE 'aaa oldy=%, newheight=%', oldy, newheight; + + newy := 1 + LEAST(GREATEST(0, oldy - 1), ST_Height(rast1)); + newheight := GREATEST(LEAST(1 + ST_Height(rast1), oldy + newheight), 1) - newy; + oldy := newy; + +--RAISE NOTICE 'bbb newx=%, newy=%', newx, newy; +--RAISE NOTICE 'ccc newwidth=%, newheight=%', newwidth, newheight; + IF newwidth < 1 OR newheight < 1 THEN + RETURN rast1; + END IF; + + x2 := ST_World2RasterCoordX(rast1, ST_Raster2WorldCoordX(rast2, 1, 1), ST_Raster2WorldCoordY(rast2, 1, 1)); + y2 := ST_World2RasterCoordY(rast1, ST_Raster2WorldCoordY(rast2, 1, 1), ST_Raster2WorldCoordY(rast2, 1, 1)); + +--RAISE NOTICE '111 x2=%, y2=%', x2, y2; + + newx := x2 + LEAST(GREATEST(0, oldx - x2), ST_Width(rast2)); + newwidth := GREATEST(LEAST(x2 + ST_Width(rast2), oldx + newwidth), x2) - newx; + + newy := y2 + LEAST(GREATEST(0, oldy - y2), ST_Height(rast2)); + newheight := GREATEST(LEAST(y2 + ST_Height(rast2), oldy + newheight), y2) - newy; + + IF newwidth < 1 OR newheight < 1 THEN + RETURN rast1; + END IF; + +--RAISE NOTICE '222 newx=%, newy=%', newx, newy; +--RAISE NOTICE '333 newwidth=%, newheight=%', newwidth, newheight; + + IF newkeepdestnodata IS NULL THEN + newkeepdestnodata := FALSE; + END IF; + + IF newkeepdestnodata THEN + IF NOT ST_BandNodataValue(rast1, newband1) IS NULL THEN + rast1nodataval := ST_BandNoDataValue(rast1, newband1); + ELSE + RAISE NOTICE 'ST_SetValues: keepdestnodata was set to TRUE but rast1 does not have a nodata value. keepdestnodata reset to FALSE'; + newkeepdestnodata := FALSE; + END IF; + IF ST_BandIsNodata(rast1, newband1) THEN + RETURN rast1; + END IF; + END IF; + + IF newkeepsourcenodata IS NULL THEN + newkeepsourcenodata := FALSE; + END IF; + + IF newkeepsourcenodata THEN + IF NOT ST_BandNodataValue(rast2, newband2) IS NULL THEN + rast2nodataval := ST_BandNoDataValue(rast2, newband2); + ELSE + RAISE NOTICE 'ST_SetValues: keepsourcenodata was set to true but rast2 does not have a nodata value. keepsourcenodata reset to false'; + newkeepsourcenodata := FALSE; + END IF; + IF ST_BandIsNodata(rast2, newband2) THEN + RETURN rast1; + END IF; + END IF; + + IF newkeepdestnodata THEN + FOR cx IN newx..newx + newwidth - 1 LOOP + FOR cy IN newy..newy + newheight - 1 LOOP + r2val := ST_Value(rast2, newband2, cx - x2 + 1, cy - y2 + 1); +--RAISE NOTICE '444 x=%, y=%', cx, cy; + IF (ST_Value(newraster, newband1, cx, cy) != rast1nodataval) AND (NOT newkeepsourcenodata OR r2val != rast2nodataval) THEN + newraster := ST_SetValue(newraster, newband1, cx, cy, r2val); + END IF; + END LOOP; + END LOOP; + ELSE +--RAISE NOTICE '555 newx + newwidth - 1=%, newy + newheight - 1=%', newx + newwidth - 1, newy + newheight - 1; + FOR cx IN newx..newx + newwidth - 1 LOOP + FOR cy IN newy..newy + newheight - 1 LOOP + r2val := ST_Value(rast2, newband2, cx - x2 + 1, cy - y2 + 1); +--RAISE NOTICE '666 x=%, y=%', cx, cy; + IF NOT newkeepsourcenodata OR r2val != rast2nodataval THEN + newraster := ST_SetValue(newraster, newband1, cx, cy, r2val); + END IF; + END LOOP; + END LOOP; + END IF; + RETURN newraster; + END; + $$ + LANGUAGE 'plpgsql'; + +-- Variant with both band = 1 +CREATE OR REPLACE FUNCTION ST_SetValues(rast1 raster, x int, y int, width int, height int, rast2 raster, keepdestnodata boolean, keepsourcenodata boolean) + RETURNS raster + AS 'SELECT ST_SetValues($1, 1, $2, $3, $4, $5, $6, 1, $7, $8)' + LANGUAGE 'SQL' IMMUTABLE; + +-- Variant with both band = 1 & both keepnodata = FALSE +CREATE OR REPLACE FUNCTION ST_SetValues(rast1 raster, x int, y int, width int, height int, rast2 raster) + RETURNS raster + AS 'SELECT ST_SetValues($1, 1, $2, $3, $4, $5, $6, 1, FALSE, FALSE)' + LANGUAGE 'SQL' IMMUTABLE; + +-- Test +SELECT ST_AsBinary((pix).geom), (pix).val +FROM (SELECT ST_PixelAsPolygons(ST_TestRaster(0, 0, 1)) as pix) foo + +SELECT ST_AsBinary((pix).geom), (pix).val +FROM (SELECT ST_PixelAsPolygons(ST_SetValues(ST_TestRaster(0, 0, 1), 2, 1, 3, 1, ST_TestRaster(3, 0, 3))) as pix) foo + + + diff -Nru postgis-1.5.3/raster/scripts/plpgsql/st_splittable.sql postgis-2.0.1/raster/scripts/plpgsql/st_splittable.sql --- postgis-1.5.3/raster/scripts/plpgsql/st_splittable.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/scripts/plpgsql/st_splittable.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,47 @@ +---------------------------------------------------------------------------------------------------------------------- +-- ST_SplitTable +-- Split a table into a series of table which names are composed of the concatenation of a prefix +-- and the value of a column. This function is usefull when loading many raster in one operation but +-- still wanting to split them in different tables afterward. They must have been loaded with the -F +-- raster2pgsql option so that different rasters are identifiable by a column. +-- +-- sourcetablename - The name of the table to split into multiple table +-- targettableschema - The schema in which to create the new set of table +-- targettableprefix - The prefix of the set of table names to create. +-- suffixcolumnname - The name of the column providing the suffix to each table name. +-- +-- Example to split the table 'test' into a set of table starting with 't_' and +-- ending with the value of the column 'rid' to be created in the 'public' schema. +-- +-- SELECT ST_SplitTable('test', 'public', 't_', 'rid');; +---------------------------------------------------------------------------------------------------------------------- +CREATE OR REPLACE FUNCTION ST_SplitTable(sourcetablename text, targettableschema text, targettableprefix text, suffixcolumnname text) +RETURNS int AS +$BODY$ +DECLARE + newtablename text; + uniqueid RECORD; +BEGIN + FOR uniqueid IN EXECUTE 'SELECT DISTINCT ' || quote_ident(suffixcolumnname) || ' AS xyz123 FROM ' || sourcetablename LOOP + newtablename := targettableschema || '.' || targettableprefix || uniqueid.xyz123; + EXECUTE 'CREATE TABLE ' || quote_ident(newtablename) || ' AS SELECT * FROM ' || sourcetablename || ' WHERE ' || suffixcolumnname || ' = ' || uniqueid.xyz123; + END LOOP; + RETURN 1; +END; +$BODY$ +LANGUAGE plpgsql VOLATILE STRICT; + +--------------------------------------- +-- test +CREATE TABLE test AS +SELECT 1 AS rid, ST_MakeEmptyRaster(2,2,0,0,1,1,1,1,4326) AS rast +UNION ALL +SELECT 2 AS rid, ST_MakeEmptyRaster(2,2,0,0,1,1,1,1,4326) AS rast +UNION ALL +SELECT 1 AS rid, ST_MakeEmptyRaster(2,2,0,0,1,1,1,1,4326) AS rast +UNION ALL +SELECT 2 AS rid, ST_MakeEmptyRaster(2,2,0,0,1,1,1,1,4326) AS rast + +SELECT * FROM test; + +SELECT ST_SplitTable('test', 'public', 't_', 'rid'); diff -Nru postgis-1.5.3/raster/scripts/plpgsql/st_summarystatsagg.sql postgis-2.0.1/raster/scripts/plpgsql/st_summarystatsagg.sql --- postgis-1.5.3/raster/scripts/plpgsql/st_summarystatsagg.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/scripts/plpgsql/st_summarystatsagg.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,121 @@ +--------------------------------------------------------------------- +-- ST_SummaryStatsAgg AGGREGATE +-- Compute summary statistics for an aggregation of raster. +-- +-- Exemple +-- SELECT (ss).count, +-- (ss).sum, +-- (ss).mean, +-- (ss).min, +-- (ss).max +-- FROM (SELECT ST_SummaryStatsAgg(gv) ss +-- FROM (SELECT ST_Clip(rt.rast, gt.geom) gv +-- FROM rasttable rt, geomtable gt +-- WHERE ST_Intersects(rt.rast, gt.geom) +-- ) foo +-- GROUP BY gt.id +-- ) foo2 +--------------------------------------------------------------------- +-- raster_summarystatsstate +-- State function used by the ST_SummaryStatsAgg aggregate +CREATE OR REPLACE FUNCTION raster_summarystatsstate(ss summarystats, rast raster, nband int DEFAULT 1, exclude_nodata_value boolean DEFAULT TRUE, sample_percent double precision DEFAULT 1) + RETURNS summarystats + AS $$ + DECLARE + newstats summarystats; + ret summarystats; + BEGIN + IF rast IS NULL THEN + RETURN ss; + END IF; + newstats := _ST_SummaryStats(rast, nband, exclude_nodata_value, sample_percent); + IF $1 IS NULL THEN + ret := (newstats.count, + newstats.sum, + null, + null, + newstats.min, + newstats.max)::summarystats; + ELSE + ret := (ss.count + newstats.count, + ss.sum + newstats.sum, + null, + null, + least(ss.min, newstats.min), + greatest(ss.max, newstats.max))::summarystats; + END IF; + RETURN ret; + END; + $$ + LANGUAGE 'plpgsql'; + +CREATE OR REPLACE FUNCTION raster_summarystatsstate(ss summarystats, rast raster) + RETURNS summarystats + AS $$ + SELECT raster_summarystatsstate($1, $2, 1, true, 1); + $$ LANGUAGE 'SQL'; + +--------------------------------------------------------------------- +-- raster_summarystatsfinal +-- Final function used by the ST_SummaryStatsAgg aggregate +CREATE OR REPLACE FUNCTION raster_summarystatsfinal(ss summarystats) + RETURNS summarystats + AS $$ + DECLARE + ret summarystats; + BEGIN + ret := (($1).count, + ($1).sum, + ($1).sum / ($1).count, + null, + ($1).min, + ($1).max + )::summarystats; + RETURN ret; + END; + $$ + LANGUAGE 'plpgsql'; + +--------------------------------------------------------------------- +-- ST_SummaryStatsAgg AGGREGATE +--------------------------------------------------------------------- +CREATE AGGREGATE ST_SummaryStatsAgg(raster, int, boolean, double precision) ( + SFUNC=raster_summarystatsstate, + STYPE=summarystats, + FINALFUNC=raster_summarystatsfinal +); + +CREATE AGGREGATE ST_SummaryStatsAgg(raster) ( + SFUNC=raster_summarystatsstate, + STYPE=summarystats, + FINALFUNC=raster_summarystatsfinal +); + +-- Test +CREATE OR REPLACE FUNCTION ST_TestRaster(h integer, w integer, val float8) + RETURNS raster AS + $$ + DECLARE + BEGIN + RETURN ST_AddBand(ST_MakeEmptyRaster(h, w, 0, 0, 1, 1, 0, 0, -1), '32BF', val, -1); + END; + $$ + LANGUAGE 'plpgsql'; + +SELECT id, + (ss).count, + (ss).sum, + (ss).mean, + (ss).stddev, + (ss).min, + (ss).max +FROM (SELECT ST_SummaryStatsAgg(rast) as ss, id + FROM (SELECT 1 id, ST_TestRaster(2, 2, 2) rast + UNION ALL + SELECT 1 id, ST_TestRaster(2, 2, 4) rast + UNION ALL + SELECT 2 id, ST_TestRaster(2, 2, 4) rast + ) foo + GROUP BY id + ) foo2 + diff -Nru postgis-1.5.3/raster/scripts/plpgsql/st_tile.sql postgis-2.0.1/raster/scripts/plpgsql/st_tile.sql --- postgis-1.5.3/raster/scripts/plpgsql/st_tile.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/scripts/plpgsql/st_tile.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,229 @@ +---------------------------------------------------------------------- +-- +-- $Id: st_tile.sql 8255 2011-11-29 16:34:48Z pracine $ +-- +-- Copyright (c) 2009-2010 Pierre Racine +-- +---------------------------------------------------------------------- +-- ST_Tile +-- Split a raster into a set of raster tiles, one tile per row returned. +-- Works on multiband rasters. There is no way to specify the upper left +-- corner of the new tiled grid. The grid start at the upperleft corner +-- of the provided raster. +-- +-- rast - Raster to be tiled. +-- width - Width of the tiles. +-- height - Height of the tiles +-- padwithnodata - If TRUE, the produced tiles are strictly width x heigth pixels. +-- Pixels outside the extent of the passed raster are filled with +-- nodata value. When FALSE out of bound tiles are clipped to the +-- extent of the raster. Default to FALSE. +-- nodatavalue - nodata value to use to pad the outbound tiles when the provided +-- raster do not have a nodata value defined. If not provided and +-- the raster do not have a nodata value defined +-- ST_MinPossibleValue(ST_BandPixelType(rast, band)) is used for each band. +-- +-- Example producing 120 x 120 pixel tiles +-- +-- CREATE TABLE srtm_22_03_tiled_120x120 AS +-- SELECT ST_Tile(rast, 120, 120, true), generate_series(1, 3600) rid +-- FROM srtm_22_03; +---------------------------------------------------------------------------------------------------------------------- +DROP FUNCTION IF EXISTS ST_Tile(rast raster, width integer, height integer, padwithnodata boolean, nodatavalue double precision); +CREATE OR REPLACE FUNCTION ST_Tile(rast raster, width integer, height integer, padwithnodata boolean DEFAULT FALSE, nodatavalue double precision DEFAULT NULL) + RETURNS SETOF raster AS + $$ + DECLARE + gridrast raster; + rastwidth integer; + rastheight integer; + gridwidth integer; + gridheight integer; + newnodata double precision; + newpixtype text; + nbband integer; + bandi integer; + newrast raster; + initvalue double precision; + grid record; + geomrast raster; + BEGIN + IF rast IS NULL THEN + RETURN; + END IF; + + nbband := ST_Numbands(rast); + IF nbband < 1 THEN + RAISE NOTICE 'Raster do not have band %. Returning null', band; + RETURN; + END IF; + + rastwidth := ST_Width(rast); + IF width IS NULL THEN + width := rastwidth; + END IF; + + rastheight := ST_Height(rast); + IF height IS NULL THEN + height := rastheight; + END IF; + + gridwidth := (rastwidth / width) + CASE WHEN rastwidth % width > 0 THEN 1 ELSE 0 END; + gridheight := (rastheight / height) + CASE WHEN rastheight % height > 0 THEN 1 ELSE 0 END; + + gridrast := ST_AddBand(ST_MakeEmptyRaster(gridwidth, gridheight, ST_UpperLeftX(rast), ST_UpperLeftY(rast), ST_ScaleX(rast) * width, ST_ScaleY(rast) * height, ST_SkewX(rast), ST_SkewY(rast), ST_SRID(rast)), '8BUI'::text, 1, 0); + IF padwithnodata THEN + FOR grid IN SELECT (ST_PixelAsPolygons(gridrast)).geom LOOP + FOR bandi IN 1..nbband LOOP + -- for each band we must determine the nodata value + newpixtype := ST_BandPixelType(rast, bandi); + newnodata := ST_BandNodataValue(rast, bandi); + IF newnodata IS NULL THEN + newnodata := coalesce(nodatavalue, ST_MinPossibleVal(newpixtype)); + rast := ST_SetBandNodataValue(rast, newnodata); + END IF; +--RAISE NOTICE 'newnodata1 %', ST_BandNodataValue(rast); + + geomrast := ST_AsRaster(grid.geom, rast); + IF bandi = 1 THEN + newrast := ST_SetBandNodataValue(ST_MapAlgebraExpr(rast, 1, geomrast, 1, 'RAST1', newpixtype, 'SECOND', newnodata::text, newnodata::text, newnodata), newnodata); + ELSE + newrast := ST_AddBand(newrast, ST_SetBandNodataValue(ST_MapAlgebraExpr(rast, bandi, geomrast, 1, 'RAST1', newpixtype, 'SECOND', newnodata::text, newnodata::text, newnodata), newnodata)); + END IF; +--RAISE NOTICE 'newnodata2 = %, newnodata = %, numbands = %, type = %, newset = %', ST_BandNodataValue(newrast), newnodata, ST_NumBands(newrast), ST_BandPixelType(newrast), ST_BandNodataValue(ST_SetBandNodataValue(newrast, 1, -4)); + END LOOP; + RETURN NEXT newrast; + END LOOP; + RETURN; + ELSE + RETURN QUERY SELECT ST_Clip(rast, (ST_PixelAsPolygons(gridrast)).geom, NULL, TRUE) rast; + END IF; + RETURN; + END; + $$ + LANGUAGE 'plpgsql'; + +---------------------------------------------------------------------- +-- ST_TileAsGeom +-- Split a raster into a set of raster tiles, returning only the geometry +-- corresponding to each tile. +-- There is no way to specify the upper left corner of the new tiled grid. +-- The grid start at the upperleft corner of the provided raster. +-- +-- rast - Raster to be tiled. +-- width - Width of the tiles. +-- height - Height of the tiles +-- padwithnodata - If TRUE, the produced tiles are strictly width x heigth pixels. +-- Pixels outside the extent of the passed raster are filled with +-- nodata value. When FALSE out of bound tiles are clipped to the +-- extent of the raster. Default to FALSE. +-- +-- Example producing 120 x 120 pixel tiles +-- +-- SELECT ST_TileAsGeom(rast, 130, 130, true) +-- FROM srtm_22_03; +---------------------------------------------------------------------------------------------------------------------- +DROP FUNCTION IF EXISTS ST_TileAsGeom(rast raster, width integer, height integer, padwithnodata boolean); +CREATE OR REPLACE FUNCTION ST_TileAsGeom(rast raster, width integer, height integer, padwithnodata boolean DEFAULT FALSE) + RETURNS SETOF geometry AS + $$ + DECLARE + gridrast raster; + rastwidth integer; + rastheight integer; + gridwidth integer; + gridheight integer; + nbband integer; + rastextent geometry; + BEGIN + IF rast IS NULL THEN + RETURN; + END IF; + + nbband := ST_Numbands(rast); + IF nbband < 1 THEN + RAISE NOTICE 'Raster do not have band %. Returning null', band; + RETURN; + END IF; + + rastwidth := ST_Width(rast); + IF width IS NULL THEN + width := rastwidth; + END IF; + + rastheight := ST_Height(rast); + IF height IS NULL THEN + height := rastheight; + END IF; + + gridwidth := (rastwidth / width) + CASE WHEN rastwidth % width > 0 THEN 1 ELSE 0 END; + gridheight := (rastheight / height) + CASE WHEN rastheight % height > 0 THEN 1 ELSE 0 END; + + gridrast := ST_AddBand(ST_MakeEmptyRaster(gridwidth, gridheight, ST_UpperLeftX(rast), ST_UpperLeftY(rast), ST_ScaleX(rast) * width, ST_ScaleY(rast) * height, ST_SkewX(rast), ST_SkewY(rast), ST_SRID(rast)), '8BUI'::text, 1, 0); + IF padwithnodata THEN + RETURN QUERY SELECT (ST_PixelAsPolygons(gridrast)).geom geom; + ELSE + rastextent := rast::geometry; + RETURN QUERY SELECT ST_Intersection(rastextent, (ST_PixelAsPolygons(gridrast)).geom) geom; + END IF; + RETURN; + END; + $$ + LANGUAGE 'plpgsql'; + + +-- Redefine ST_TestRaster() +CREATE OR REPLACE FUNCTION ST_TestRaster(ulx float8, uly float8, val float8) + RETURNS raster AS + $$ + DECLARE + BEGIN + RETURN ST_AddBand(ST_MakeEmptyRaster(48, 63, ulx, uly, 0.001, -0.001, 0, 0, 4269), '32BF', val, -1); + END; + $$ + LANGUAGE 'plpgsql'; + +----------------------------------------------- +-- Display the test raster +SELECT ST_AsBinary((gv).geom) geom, (gv).val +FROM (SELECT ST_PixelAsPolygons(ST_TestRaster(0, 0, 1)) gv) foo; + +-- Tile it to 10x10 tiles +SELECT ST_Tile(ST_TestRaster(0, 0, 1), 10, 10) + +-- Display the result of the tile function +SELECT ST_AsBinary((gv).geom) geom, (gv).val +FROM (SELECT ST_PixelAsPolygons(ST_Tile(ST_TestRaster(0, 0, 1), 3, 4)) gv) foo; + +-- Display each tile as a geometry +SELECT ST_Asbinary(ST_Tile(ST_TestRaster(0, 0, 1), 10, 10)::geometry); + +-- Test the padwithnodata parameter +SELECT ST_Asbinary(ST_Tile(ST_TestRaster(0, 0, 1), 10, 10, true)::geometry); + +-- Display the result +SELECT ST_AsBinary((gv).geom) geom, (gv).val +FROM (SELECT ST_PixelAsPolygons(ST_Tile(ST_TestRaster(0, 0, 1), 10, 10, true)) gv) foo; + +-- Add a rid +SELECT ST_Asbinary(ST_Tile(ST_TestRaster(0, 0, 1), 10, 10)::geometry), generate_series(1, 35) rid; + +SELECT ST_AsBinary((gv).geom) geom, (gv).val, rid +FROM (SELECT ST_PixelAsPolygons(ST_Tile(ST_TestRaster(0, 0, 1), 10, 10, true)) gv, generate_series(1, 35) rid) foo; + +SELECT ST_AsBinary((gv).geom) geom, (gv).val, rid +FROM (SELECT ST_PixelAsPolygons(rast) gv, rid + FROM (SELECT ST_Tile(ST_TestRaster(0, 0, 1), 10, 10, true) rast, generate_series(1, 35) rid) foo WHERE rid = 2) foo2; + +-- Test ST_TileAsGeom +SELECT ST_TileAsGeom(ST_TestRaster(0, 0, 1), 10, 10); + + +-- Other tests +SELECT ST_Tile(ST_AddBand(ST_MakeEmptyRaster(48, 63, 0, 0, 0.001, -0.001, 0, 0, 4269), '8BSI'::text, 0, -2), 10, 10, true, -10); + +SELECT ST_BandNodataValue(ST_Tile(ST_AddBand(ST_MakeEmptyRaster(48, 63, 0, 0, 0.001, -0.001, 0, 0, 4269), '8BSI'::text, 0, 200), 10, 10, true)); + +SELECT ST_BandNodataValue(ST_AddBand(ST_MakeEmptyRaster(2, 2, 0, 0, 0.001, -0.001, 0, 0, 4269), '8BSI'::text, 0, 128)); + +SELECT ST_BandNodataValue(ST_SetBandNodataValue(ST_AddBand(ST_MakeEmptyRaster(2, 2, 0, 0, 0.001, -0.001, 0, 0, 4269), '8BSI'::text, 0, 2), 200)); diff -Nru postgis-1.5.3/raster/scripts/plpgsql/st_union.sql postgis-2.0.1/raster/scripts/plpgsql/st_union.sql --- postgis-1.5.3/raster/scripts/plpgsql/st_union.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/scripts/plpgsql/st_union.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,293 @@ +---------------------------------------------------------------------- +-- +-- $Id: st_union.sql 9324 2012-02-27 22:08:12Z pramsey $ +-- +-- Copyright (c) 2009-2010 Pierre Racine +-- +---------------------------------------------------------------------- + +-- Note: The functions provided in this script are in developement. Do not use. + +DROP TYPE IF EXISTS rastexpr CASCADE; +CREATE TYPE rastexpr AS ( + rast raster, + f_expression text, + f_nodata1expr text, + f_nodata2expr text, + f_nodatanodataval double precision +); + +--DROP FUNCTION MapAlgebra4Union(rast1 raster, rast2 raster, expression text); +CREATE OR REPLACE FUNCTION MapAlgebra4Union(rast1 raster, + rast2 raster, + p_expression text, + p_nodata1expr text, + p_nodata2expr text, + p_nodatanodataval double precision, + t_expression text, + t_nodata1expr text, + t_nodata2expr text, + t_nodatanodataval double precision) + RETURNS raster AS + $$ + DECLARE + t_raster raster; + p_raster raster; + BEGIN + -- With the new ST_MapAlgebraExpr we must split the main expression in three expressions: expression, nodata1expr, nodata2expr + -- ST_MapAlgebraExpr(rast1 raster, band1 integer, rast2 raster, band2 integer, expression text, pixeltype text, extentexpr text, nodata1expr text, nodata2expr text, nodatanodatadaexpr double precision) + -- We must make sure that when NULL is passed as the first raster to ST_MapAlgebraExpr, ST_MapAlgebraExpr resolve the nodata1expr + IF upper(p_expression) = 'LAST' THEN + RETURN ST_MapAlgebraExpr(rast1, 1, rast2, 1, '[rast2.val]'::text, NULL::text, 'UNION'::text, '[rast2.val]'::text, '[rast1.val]'::text, NULL::double precision); + ELSIF upper(p_expression) = 'FIRST' THEN + RETURN ST_MapAlgebraExpr(rast1, 1, rast2, 1, '[rast1.val]'::text, NULL::text, 'UNION'::text, '[rast2.val]'::text, '[rast1.val]'::text, NULL::double precision); + ELSIF upper(p_expression) = 'MIN' THEN + RETURN ST_MapAlgebraExpr(rast1, 1, rast2, 1, 'LEAST([rast1.val], [rast2.val])'::text, NULL::text, 'UNION'::text, '[rast2.val]'::text, '[rast1.val]'::text, NULL::double precision); + ELSIF upper(p_expression) = 'MAX' THEN + RETURN ST_MapAlgebraExpr(rast1, 1, rast2, 1, 'GREATEST([rast1.val], [rast2.val])'::text, NULL::text, 'UNION'::text, '[rast2.val]'::text, '[rast1.val]'::text, NULL::double precision); + ELSIF upper(p_expression) = 'COUNT' THEN + RETURN ST_MapAlgebraExpr(rast1, 1, rast2, 1, '[rast1.val] + 1'::text, NULL::text, 'UNION'::text, '1'::text, '[rast1.val]'::text, 0::double precision); + ELSIF upper(p_expression) = 'SUM' THEN + RETURN ST_MapAlgebraExpr(rast1, 1, rast2, 1, '[rast1.val] + [rast2.val]'::text, NULL::text, 'UNION'::text, '[rast2.val]'::text, '[rast1.val]'::text, NULL::double precision); + ELSIF upper(p_expression) = 'RANGE' THEN + t_raster = ST_MapAlgebraExpr(rast1, 2, rast2, 1, 'LEAST([rast1.val], [rast2.val])'::text, NULL::text, 'UNION'::text, '[rast2.val]'::text, '[rast1.val]'::text, NULL::double precision); + p_raster := MapAlgebra4Union(rast1, rast2, 'MAX'::text, NULL::text, NULL::text, NULL::double precision, NULL::text, NULL::text, NULL::text, NULL::double precision); + RETURN ST_AddBand(p_raster, t_raster, 1, 2); + ELSIF upper(p_expression) = 'MEAN' THEN + t_raster = ST_MapAlgebraExpr(rast1, 2, rast2, 1, '[rast1.val] + 1'::text, NULL::text, 'UNION'::text, '1'::text, '[rast1.val]'::text, 0::double precision); + p_raster := MapAlgebra4Union(rast1, rast2, 'SUM'::text, NULL::text, NULL::text, NULL::double precision, NULL::text, NULL::text, NULL::text, NULL::double precision); + RETURN ST_AddBand(p_raster, t_raster, 1, 2); + ELSE + IF t_expression NOTNULL AND t_expression != '' THEN + t_raster = ST_MapAlgebraExpr(rast1, 2, rast2, 1, t_expression, NULL::text, 'UNION'::text, t_nodata1expr, t_nodata2expr, t_nodatanodataval::double precision); + p_raster = ST_MapAlgebraExpr(rast1, 1, rast2, 1, p_expression, NULL::text, 'UNION'::text, p_nodata1expr, p_nodata2expr, p_nodatanodataval::double precision); + RETURN ST_AddBand(p_raster, t_raster, 1, 2); + END IF; + RETURN ST_MapAlgebraExpr(rast1, 1, rast2, 1, p_expression, NULL, 'UNION'::text, NULL::text, NULL::text, NULL::double precision); + END IF; + END; + $$ + LANGUAGE 'plpgsql'; + +CREATE OR REPLACE FUNCTION MapAlgebra4UnionFinal3(rast rastexpr) + RETURNS raster AS + $$ + DECLARE + BEGIN + RETURN ST_MapAlgebraExpr(rast.rast, 1, rast.rast, 2, rast.f_expression, NULL::text, 'UNION'::text, rast.f_nodata1expr, rast.f_nodata2expr, rast.f_nodatanodataval); + END; + $$ + LANGUAGE 'plpgsql'; + +CREATE OR REPLACE FUNCTION MapAlgebra4UnionFinal1(rast rastexpr) + RETURNS raster AS + $$ + DECLARE + BEGIN + IF upper(rast.f_expression) = 'RANGE' THEN + RETURN ST_MapAlgebraExpr(rast.rast, 1, rast.rast, 2, '[rast1.val] - [rast2.val]'::text, NULL::text, 'UNION'::text, NULL::text, NULL::text, NULL::double precision); + ELSEIF upper(rast.f_expression) = 'MEAN' THEN + RETURN ST_MapAlgebraExpr(rast.rast, 1, rast.rast, 2, 'CASE WHEN [rast2.val] > 0 THEN [rast1.val] / [rast2.val]::float8 ELSE NULL END'::text, NULL::text, 'UNION'::text, NULL::text, NULL::text, NULL::double precision); + ELSE + RETURN rast.rast; + END IF; + END; + $$ + LANGUAGE 'plpgsql'; + + +CREATE OR REPLACE FUNCTION MapAlgebra4Union(rast1 rastexpr, + rast2 raster, + p_expression text, + p_nodata1expr text, + p_nodata2expr text, + p_nodatanodataval double precision, + t_expression text, + t_nodata1expr text, + t_nodata2expr text, + t_nodatanodataval double precision, + f_expression text, + f_nodata1expr text, + f_nodata2expr text, + f_nodatanodataval double precision) + RETURNS rastexpr + AS $$ + SELECT (MapAlgebra4Union(($1).rast, $2, $3, $4, $5, $6, $7, $8, $9, $10), $11, $12, $13, $14)::rastexpr + $$ LANGUAGE 'SQL'; + +CREATE OR REPLACE FUNCTION MapAlgebra4Union(rast1 rastexpr, + rast2 raster, + p_expression text, + t_expression text, + f_expression text) + RETURNS rastexpr + AS $$ + SELECT (MapAlgebra4Union(($1).rast, $2, $3, NULL, NULL, NULL, $4, NULL, NULL, NULL), $5, NULL, NULL, NULL)::rastexpr + $$ LANGUAGE 'SQL'; + +CREATE OR REPLACE FUNCTION MapAlgebra4Union(rast1 rastexpr, + rast2 raster, + p_expression text, + p_nodata1expr text, + p_nodata2expr text, + p_nodatanodataval double precision, + t_expression text, + t_nodata1expr text, + t_nodata2expr text, + t_nodatanodataval double precision) + RETURNS rastexpr + AS $$ + SELECT (MapAlgebra4Union(($1).rast, $2, $3, $4, $5, $6, $7, $8, $9, $10), NULL, NULL, NULL, NULL)::rastexpr + $$ LANGUAGE 'SQL'; + +CREATE OR REPLACE FUNCTION MapAlgebra4Union(rast1 rastexpr, + rast2 raster, + p_expression text, + t_expression text) + RETURNS rastexpr + AS $$ + SELECT (MapAlgebra4Union(($1).rast, $2, $3, NULL, NULL, NULL, $4, NULL, NULL, NULL), NULL, NULL, NULL, NULL)::rastexpr + $$ LANGUAGE 'SQL'; + +CREATE OR REPLACE FUNCTION MapAlgebra4Union(rast1 rastexpr, + rast2 raster, + p_expression text, + p_nodata1expr text, + p_nodata2expr text, + p_nodatanodataval double precision) + RETURNS rastexpr + AS $$ + SELECT (MapAlgebra4Union(($1).rast, $2, $3, $4, $5, $6, NULL, NULL, NULL, NULL), NULL, NULL, NULL, NULL)::rastexpr + $$ LANGUAGE 'SQL'; + +CREATE OR REPLACE FUNCTION MapAlgebra4Union(rast1 rastexpr, + rast2 raster, + p_expression text) + RETURNS rastexpr + AS $$ + SELECT (MapAlgebra4Union(($1).rast, $2, $3, NULL, NULL, NULL, NULL, NULL, NULL, NULL), $3, NULL, NULL, NULL)::rastexpr + $$ LANGUAGE 'SQL'; + +CREATE OR REPLACE FUNCTION MapAlgebra4Union(rast1 rastexpr, + rast2 raster) + RETURNS rastexpr + AS $$ + SELECT (MapAlgebra4Union(($1).rast, $2, 'LAST', NULL, NULL, NULL, NULL, NULL, NULL, NULL), NULL, NULL, NULL, NULL)::rastexpr + $$ LANGUAGE 'SQL'; + +--DROP AGGREGATE ST_Union(raster, text, text, text, double precision, text, text, text, double precision, text, text, text, double precision); +CREATE AGGREGATE ST_Union(raster, text, text, text, double precision, text, text, text, double precision, text, text, text, double precision) ( + SFUNC = MapAlgebra4Union, + STYPE = rastexpr, + FINALFUNC = MapAlgebra4UnionFinal3 +); + +--DROP AGGREGATE ST_Union(raster, text, text, text); +CREATE AGGREGATE ST_Union(raster, text, text, text) ( + SFUNC = MapAlgebra4Union, + STYPE = rastexpr, + FINALFUNC = MapAlgebra4UnionFinal3 +); + +--DROP AGGREGATE ST_Union(raster, text, text, text, double precision, text, text, text, double precision); +CREATE AGGREGATE ST_Union(raster, text, text, text, double precision, text, text, text, double precision) ( + SFUNC = MapAlgebra4Union, + STYPE = rastexpr +); + +--DROP AGGREGATE ST_Union(raster, text, text); +CREATE AGGREGATE ST_Union(raster, text, text) ( + SFUNC = MapAlgebra4Union, + STYPE = rastexpr +); + +--DROP AGGREGATE ST_Union(raster, text, text, text, double precision); +CREATE AGGREGATE ST_Union(raster, text, text, text, double precision) ( + SFUNC = MapAlgebra4Union, + STYPE = rastexpr, + FINALFUNC = MapAlgebra4UnionFinal1 +); + +--DROP AGGREGATE ST_Union(raster, text); +CREATE AGGREGATE ST_Union(raster, text) ( + SFUNC = MapAlgebra4Union, + STYPE = rastexpr, + FINALFUNC = MapAlgebra4UnionFinal1 +); + +--DROP AGGREGATE ST_Union(raster); +CREATE AGGREGATE ST_Union(raster) ( + SFUNC = MapAlgebra4Union, + STYPE = rastexpr +); + +-- Test ST_TestRaster +SELECT ST_AsBinary((rast).geom), (rast).val +FROM (SELECT ST_PixelAsPolygons(ST_TestRaster(0, 0, 2)) rast) foo; + +-- Test St_Union +SELECT ST_AsBinary((rast).geom), (rast).val +FROM (SELECT ST_PixelAsPolygons(ST_Union(rast, 'mean'), 1) rast + FROM (SELECT ST_TestRaster(1, 0, 6) AS rast + UNION ALL + SELECT ST_TestRaster(1, 1, 4) AS rast + UNION ALL + SELECT ST_TestRaster(-1, 0, 6) AS rast + UNION ALL + SELECT ST_TestRaster(0, 0, 2) AS rast + ) foi) foo + +-- Test St_Union merging a blending merge of disjoint raster +SELECT ST_AsBinary((rast).geom), (rast).val +FROM (SELECT ST_PixelAsPolygons(ST_Union(rast, 'last'), 1) rast + FROM (SELECT ST_TestRaster(0, 0, 1) AS rast + UNION ALL + SELECT ST_TestRaster(3, 0, 2) AS rast + UNION ALL + SELECT ST_TestRaster(3, 3, 4) AS rast + UNION ALL + SELECT ST_TestRaster(0, 3, 3) AS rast + ) foi) foo + + +-- Explicit implementation of 'MEAN' to make sure directly passing expressions works properly +SELECT ST_AsBinary((rast).geom), (rast).val +FROM (SELECT ST_PixelAsPolygons(ST_Union(rast, '[rast1.val] + [rast2.val]'::text, '[rast2.val]'::text, '[rast1.val]'::text, NULL::double precision, + '[rast1.val] + 1'::text, '1'::text, '[rast1.val]'::text, 0::double precision, + 'CASE WHEN [rast2.val] > 0 THEN [rast1.val] / [rast2.val]::float8 ELSE NULL END'::text, NULL::text, NULL::text, NULL::double precision), 1) rast + FROM (SELECT ST_TestRaster(0, 0, 2) AS rast + UNION ALL + SELECT ST_TestRaster(1, 1, 4) AS rast + UNION ALL + SELECT ST_TestRaster(1, 0, 6) AS rast + UNION ALL + SELECT ST_TestRaster(-1, 0, 6) AS rast + ) foi) foo + +-- Pseudo-explicit implementation of 'MEAN' using other predefined functions. Do not work yet... +SELECT ST_AsBinary((rast).geom), (rast).val +FROM (SELECT ST_PixelAsPolygons(ST_Union(rast, 'SUM'::text, + 'COUNT'::text, + 'CASE WHEN [rast2.val] > 0 THEN [rast1.val] / [rast2.val]::float8 ELSE NULL END'::text), 1) rast + FROM (SELECT ST_TestRaster(0, 0, 2) AS rast + UNION ALL + SELECT ST_TestRaster(1, 1, 4) AS rast + UNION ALL + SELECT ST_TestRaster(1, 0, 6) AS rast + UNION ALL + SELECT ST_TestRaster(-1, 0, 6) AS rast + ) foi) foo + + +SELECT ST_AsBinary((rast).geom), (rast).val +FROM (SELECT ST_PixelAsPolygons(ST_Union(rast), 1) AS rast + FROM (SELECT ST_TestRaster(0, 0, 1) AS rast UNION ALL SELECT ST_TestRaster(2, 0, 2) + ) foi + ) foo + + +SELECT ST_AsBinary((rast).geom), (rast).val +FROM (SELECT ST_PixelAsPolygons(ST_Union(rast, 'mean'), 1) AS rast + FROM (SELECT ST_TestRaster(0, 0, 1) AS rast UNION ALL SELECT ST_TestRaster(1, 0, 2) UNION ALL SELECT ST_TestRaster(0, 1, 6) + ) foi + ) foo diff -Nru postgis-1.5.3/raster/scripts/python/Makefile.in postgis-2.0.1/raster/scripts/python/Makefile.in --- postgis-1.5.3/raster/scripts/python/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/scripts/python/Makefile.in 2012-03-21 21:36:59.000000000 +0000 @@ -0,0 +1,30 @@ +############################################################################# +# $Id: Makefile.in 9523 2012-03-21 21:36:59Z pramsey $ +# +# Copyright (c) 2009 Pierre Racine +# +# This is free software; you can redistribute and/or modify it under +# the terms of the GNU General Public Licence. See the COPYING file. +# +############################################################################# +CP = cp -p + +# Filenames with extension as determined by the OS +RASTER2PGSQL=raster2pgsql.py + +# PostgreSQL executable directory +PGSQL_BINDIR=@PGSQL_BINDIR@ + +all: + +install: +# $(CP) $(RASTER2PGSQL) $(DESTDIR)$(PGSQL_BINDIR)/$(RASTER2PGSQL) + +uninstall: +# $(RM) $(DESTDIR)$(PGSQL_BINDIR)/$(RASTER2PGSQL) + +clean: + rm -f *.o + +distclean: clean + rm -f Makefile diff -Nru postgis-1.5.3/raster/scripts/python/Makefile.rt.sample postgis-2.0.1/raster/scripts/python/Makefile.rt.sample --- postgis-1.5.3/raster/scripts/python/Makefile.rt.sample 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/scripts/python/Makefile.rt.sample 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,71 @@ +############################################################################# +# $Id: Makefile.rt.sample 9324 2012-02-27 22:08:12Z pramsey $ +# +# Makefile used to simplify creation of PostGIS and WKT Raster enabled +# database. Run make -f Makefile.rt to see usage message. +# +############################################################################# +# Copyright (C) 2009 Mateusz Loskot +# +# This is free software; you can redistribute and/or modify it under +# the terms of the GNU General Public Licence. See the COPYING file. +# +############################################################################# +# +# Instructions: +# You may need to update the location of SQL scripts of PostGIS +# and WKT Raster extensions. +# +### BEGIN OF CONFIGURATION ################################################## +POSTGIS = /usr/share/postgresql/8.4/contrib/postgis-2.0 +RTPOSTGIS = /usr/share/postgresql/8.4/contrib/rtpostgis-2.0 +### END OF CONFIGURATION #################################################### +# +# *** DO NOT EDIT ANYTHING BELOW *** + +ifndef VERBOSE + ERROUT=2>&1 +endif + +all: + @echo "****** Makefile.rt usage ******" + @echo "*** Create PostGIS and WKT Raster enabled database:" + @echo "\tDBNAME=mydb make -f Makefile.rt create" + @echo "*** Drop PostGIS and WKT Raster enabled database:" + @echo "\tDBNAME=mydb make -f Makefile.rt drop" + @echo "*** Check if database exists:" + @echo "\tDBNAME=mydb make -f Makefile.rt check" + @echo "PostGIS installation scripts: $(POSTGIS)" +drop: + @echo "****** Makefile.rt ******" +ifdef DBNAME + @echo "*** Dropping database '$(DBNAME)'..." + @dropdb $(DBNAME) > /dev/null $(ERROUT); + @echo "****** END. *******" +else + @echo "****** Missing DBNAME option. Aborting." +endif + +create: + @echo "****** Makefile.rt ******" +ifdef DBNAME + @echo "****** Creating database '$(DBNAME)'..." + @createdb --tablespace=tablespace2 $(DBNAME) > /dev/null $(ERROUT); + @createlang plpgsql $(DBNAME) > /dev/null $(ERROUT); + @echo "****** Loading PostGIS into '$(DBNAME)'..." + @psql -d $(DBNAME) -f $(POSTGIS)/postgis.sql > /dev/null $(ERROUT); + @psql -d $(DBNAME) -f $(POSTGIS)/spatial_ref_sys.sql > /dev/null $(ERROUT); + @echo "****** Loading WKT Raster into '$(DBNAME)'..." + @psql -d $(DBNAME) -f $(RTPOSTGIS)/rtpostgis.sql > /dev/null $(ERROUT); + @echo "****** END. *******" +else + @echo "****** Missing DBNAME option. Aborting." +endif + +check: + @echo "****** Makefile.rt ******" +ifeq ($(shell psql -l | grep ' $(DBNAME) ' | wc -l), 1) + @echo "****** Database '$(DBNAME)' found" +else + @echo "****** Database '$(DBNAME)' not found" +endif diff -Nru postgis-1.5.3/raster/scripts/python/genraster.py postgis-2.0.1/raster/scripts/python/genraster.py --- postgis-1.5.3/raster/scripts/python/genraster.py 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/scripts/python/genraster.py 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,83 @@ +#! /usr/bin/env python +# -*- coding: utf-8 -*- +# +# $Id$ +# +# A very simple generator of rasters for testing WKT Raster. +# A test file is a matrix of numbered cells greyscaled randomly. +# +# Requirements: Python + Python Imaging Library (PIL) +# Also, path to FreeSans.ttf is a hardcoded Unix path, so fix it if you need. +# +############################################################################### +# (C) 2009 Mateusz Loskot +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +############################################################################### +import Image +import ImageDraw +import ImageFont +import random +import sys + +if len(sys.argv) < 5 or len(sys.argv) > 6: + print 'Usage: genraster.py ' + print 'Note: Generated image is saved as out.png' + sys.exit(1) + +g_file = "out.png" +g_size = ( int(sys.argv[1]), int(sys.argv[2]) ) +g_cell_size = ( int(sys.argv[3]), int(sys.argv[4]) ) +if len(sys.argv) == 6: + g_outline = int(sys.argv[5]) +else: + g_outline = None + +ncells = (g_size[0] / g_cell_size[0]) * (g_size[1] / g_cell_size[1]) +print 'Number of cells: ',ncells +print 'ID \tULX\tULY\tCLR\tTXTCLR\tOUTCLR' + +img = Image.new("L", g_size, 255) +draw = ImageDraw.Draw(img) + +colour_step = 8 +count = 0 +for j in range(0, g_size[1], g_cell_size[1]): + for i in range(0, g_size[0], g_cell_size[0]): + + if count < 256 / colour_step: + value = count * colour_step + else: + value = random.randrange(0, 255) + + if value < 16: + value_text = 255 + else: + value_text = 0; + + + font = ImageFont.truetype('/usr/share/fonts/truetype/freefont/FreeSans.ttf', + g_cell_size[1] - int(g_cell_size[1] * 0.4)) + + draw.rectangle( [(i,j), (i + g_cell_size[0], j + g_cell_size[1])], fill=value, outline=g_outline) + draw.text( (i,j), ('%d' % count), fill=value_text, font=font) + + print '%d:\t%d\t%d\t%d\t%d\t%s' % (count, i, j, value, value_text, str(g_outline)) + count = count + 1 + +del draw +img.save(g_file, 'PNG') +print 'Output saved: %s' % g_file diff -Nru postgis-1.5.3/raster/scripts/python/ovdump.py postgis-2.0.1/raster/scripts/python/ovdump.py --- postgis-1.5.3/raster/scripts/python/ovdump.py 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/scripts/python/ovdump.py 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,110 @@ +#! /usr/bin/env python +# +# $Id$ +# +# This is a simple script based on GDAL to dump overview to separate file. +# It is used in WKTRaster testing to compare raster samples. +# +# NOTE: GDAL does include Frank's (unofficial) dumpoverviews utility too, +# which dumps overview as complete geospatial raster dataset. +# +# Copyright (C) 2009 Mateusz Loskot +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +from osgeo import gdal +from osgeo import osr +import osgeo.gdalconst as gdalc +from optparse import OptionParser +import os +import struct +import sys + + +prs = OptionParser(version="%prog $Revision: 4037 $", + usage="%prog -r -v ", + description="Dump GDAL raster overview to separate file, GeoTIF by default") +prs.add_option("-r", "--raster", dest="raster", action="store", default=None, + help="input raster file") +prs.add_option("-v", "--overview", dest="overview", action="store", type="int", default=None, + help="1-based index of raster overview, optional") + +(opts, args) = prs.parse_args() + +if opts.raster is None: + prs.error("use option -r to specify input raster file that contains overviews") + +################################################################################ +# MAIN + +# Source +src_ds = gdal.Open(opts.raster, gdalc.GA_ReadOnly); +if src_ds is None: + sys.exit('ERROR: Cannot open input file: ' + opts.raster) + +band = src_ds.GetRasterBand(1) +if opts.overview is None: + nvstart = 0 + nvend = band.GetOverviewCount() +else: + nvstart = opts.overview - 1 + nvend = opts.overview + +for nv in range(nvstart, nvend): + + band = src_ds.GetRasterBand(1) + if nv < 0 and nv >= band.GetOverviewCount(): + print "ERROR: Failed to find overview %d" % nv + sys.exit(1) + ov_band = band.GetOverview(nv) + + ovf = int(0.5 + band.XSize / float(ov_band.XSize)) + + print "--- OVERVIEW #%d level = %d ---------------------------------------" % (nv + 1, ovf) + + # Destination + dst_file = os.path.basename(opts.raster) + "_ov_" + str(ovf) + ".tif" + dst_format = "GTiff" + dst_drv = gdal.GetDriverByName(dst_format) + dst_ds = dst_drv.Create(dst_file, ov_band.XSize, ov_band.YSize, src_ds.RasterCount, ov_band.DataType) + + print "Source: " + opts.raster + print "Target: " + dst_file + print "Exporting %d bands of size %d x %d" % (src_ds.RasterCount, ov_band.XSize, ov_band.YSize) + + # Rewrite bands of overview to output file + ov_band = None + band = None + + for nb in range(1, src_ds.RasterCount + 1): + + band = src_ds.GetRasterBand(nb) + assert band is not None + ov_band = band.GetOverview(nv) + assert ov_band is not None + + print " Band #%d (%s) (%d x %d)" % \ + (nb, gdal.GetDataTypeName(ov_band.DataType), ov_band.XSize, ov_band.YSize) + + dst_band = dst_ds.GetRasterBand(nb) + assert dst_band is not None + data = ov_band.ReadRaster(0, 0, ov_band.XSize, ov_band.YSize) + assert data is not None + dst_band.WriteRaster(0, 0, ov_band.XSize, ov_band.YSize, data, buf_type = ov_band.DataType) + + dst_ds = None + +# Cleanup +src_ds = None diff -Nru postgis-1.5.3/raster/scripts/python/pixval.py postgis-2.0.1/raster/scripts/python/pixval.py --- postgis-1.5.3/raster/scripts/python/pixval.py 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/scripts/python/pixval.py 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,95 @@ +#! /usr/bin/env python +# +# $Id: pixval.py 9324 2012-02-27 22:08:12Z pramsey $ +# +# This is a simple script based on GDAL and used to retrieve value of single raster pixel. +# It is used in WKTRaster testing to compare raster samples. +# +# Copyright (C) 2009 Mateusz Loskot +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +from osgeo import gdal +from osgeo import osr +import osgeo.gdalconst as gdalc +import struct +import sys + +def pt2fmt(pt): + fmttypes = { + gdalc.GDT_Byte: 'B', + gdalc.GDT_Int16: 'h', + gdalc.GDT_UInt16: 'H', + gdalc.GDT_Int32: 'i', + gdalc.GDT_UInt32: 'I', + gdalc.GDT_Float32: 'f', + gdalc.GDT_Float64: 'f' + } + return fmttypes.get(pt, 'x') + +if len(sys.argv) < 5 or len(sys.argv) > 6: + print "Usage: pixval.py " + print "\traster - GDAL supported dataset" + print "\tband - 1-based number of band" + print "\toverview - optional 1-based number of overview" + print "\tx - Pixel column - 1..N where N is raster X dimension" + print "\ty - Pixel row - 1..N where N is raster Y dimension" + sys.exit(0) + +infile = sys.argv[1] +nband = int(sys.argv[2]) +x = int(sys.argv[3]) +y = int(sys.argv[4]) +if len(sys.argv) > 5: + noverview = int(sys.argv[5]) +else: + noverview = None + +print "File : %s" % infile +print "Band : %d" % nband +if noverview is not None: + print "Overview: %d" % noverview +print "Pixel: %d x %d" % (x, y) + +ds = gdal.Open(infile, gdalc.GA_ReadOnly); +if ds is None: + sys.exit('ERROR: Cannot open input file: ' + str(infile)) + +band = ds.GetRasterBand(nband) +if band is None: + sys.exit('Cannot access band %d', nband) + +if noverview is None: + src_band = band +else: + if noverview > 0 and noverview <= band.GetOverviewCount(): + src_band = band.GetOverview(noverview - 1) + else: + print "ERROR: Invalid overview index" + print "Band %d consists of %d overivews" % (nband, band.GetOverviewCount()) + sys.exit(1) + +if x <= 0 or x > src_band.XSize or y <= 0 or y > src_band.YSize: + print "ERROR: Invalid pixel coordinates" + print "Band or overview dimensions are %d x %d" % (src_band.XSize, src_band.YSize) + sys.exit(1) + +# Pixel index is 0-based +pixel = src_band.ReadRaster(x - 1, y - 1, 1, 1, 1, 1) + +fmt = pt2fmt(src_band.DataType) +pixval = struct.unpack(fmt, pixel) + +print "Pixel value -> %s" % str(pixval[0]) diff -Nru postgis-1.5.3/raster/scripts/python/raster2pgsql.py postgis-2.0.1/raster/scripts/python/raster2pgsql.py --- postgis-1.5.3/raster/scripts/python/raster2pgsql.py 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/scripts/python/raster2pgsql.py 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,1040 @@ +#! /usr/bin/env python +# +# $Id: raster2pgsql.py 9324 2012-02-27 22:08:12Z pramsey $ +# +# This is a simple utility used to dump GDAL dataset into HEX WKB stream. +# It's considered as a prototype of raster2pgsql tool planned to develop +# in future. +# For more details about raster2pgsql tool, see Specification page: +# http://trac.osgeo.org/postgis/wiki/WKTRaster +# +# The script requires Python bindings for GDAL. +# Available at http://trac.osgeo.org/gdal/wiki/GdalOgrInPython +# +################################################################################ +# Copyright (C) 2009-2010 Mateusz Loskot +# Copyright (C) 2009-2011 Pierre Racine +# Copyright (C) 2009-2010 Jorge Arevalo +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +################################################################################ +# +from osgeo import gdal +from osgeo import osr +import osgeo.gdalconst as gdalc +from optparse import OptionParser, OptionGroup +import binascii +import glob +import math +import numpy +import os +import sys + +################################################################################ +# CONSTANTS - DO NOT CHANGE + +# Endianness enumeration +NDR = 1 # Little-endian +XDR = 0 # Big-endian + +# Default version of WKTRaster protocol. +# WARNING: Currently, this is the only valid value +# and option -w, --raster-version is ignored, if specified. +g_rt_version = 0 + +# Default format of binary output is little-endian (NDR) +# WARNING: Currently, big-endian (XDR) output is not supported +# and option -e, --endian is ignored, if specified. +g_rt_endian = NDR + +# Default name of column, overriden with -f, --field option. +g_rt_column = 'rast' + +g_rt_catalog = '' +g_rt_schema = 'public' + +################################################################################ +# UTILITIES +VERBOSE = False +SUMMARY = [] + +def is_nan(x): + if sys.hexversion < 0x02060000: + return str(float(x)).lower() == 'nan' + else: + return math.isnan(x) + +def parse_command_line(): + """Collects, parses and validates command line arguments.""" + + prs = OptionParser(version="%prog $Revision: 9324 $") + + # Mandatory parameters + grp0 = OptionGroup(prs, "Source and destination", + "*** Mandatory parameters always required ***") + grp0.add_option("-r", "--raster", dest="raster", action="append", default=None, + help="append raster to list of input files, at least one raster " + "file required. You may use wildcards (?,*) for specifying multiple files.") + grp0.add_option("-t", "--table", dest="table", action="store", default=None, + help="raster destination in form of [.]
or base raster table for overview level>1, required") + prs.add_option_group(grp0); + + # Optional parameters - raster manipulation + grp_r = OptionGroup(prs, "Raster processing", + "Optional parameters used to manipulate input raster dataset") + grp_r.add_option("-s", "--srid", dest="srid", action="store", type="int", default=-1, + help="assign output raster with specified SRID") + grp_r.add_option("-b", "--band", dest="band", action="store", type="int", default=None, + help="specify number of the band to be extracted from raster file") + grp_r.add_option("-k", "--block-size", dest="block_size", action="store", default=None, + help="cut raster(s) into tiles to be inserted one by table row." + "BLOCK_SIZE is expressed as WIDTHxHEIGHT. Incomplete tiles are completed with nodata values") + grp_r.add_option("-R", "--register", dest="register", action="store_true", default=False, + help="register the raster as a filesystem (out-db) raster") + grp_r.add_option("-l", "--overview-level", dest="overview_level", action="store", type="int", default=1, + help='create overview tables named as o__ and ' + 'populate with GDAL-provided overviews (regular blocking only)') + prs.add_option_group(grp_r); + + # Optional parameters - database/table manipulation + grp_t = OptionGroup(prs, 'Database processing', + 'Optional parameters used to manipulate database objects') + grp_t.add_option('-c', '--create', dest='create_table', action='store_true', default=False, + help='create new table and populate it with raster(s), this is the default mode') + grp_t.add_option('-a', '--append', dest='append_table', action='store_true', default=False, + help='append raster(s) to an existing table') + grp_t.add_option("-d", "--drop", dest="drop_table", action="store_true", default=False, + help="drop table, create new one and populate it with raster(s)") + grp_t.add_option("-f", "--field", dest="column", action="store", default=g_rt_column, + help="specify name of destination raster column, default is 'rast'") + grp_t.add_option("-F", "--filename", dest="filename", action="store_true", default=False, + help="add a column with the name of the file") + grp_t.add_option("-I", "--index", dest="index", action="store_true", default=False, + help="create a GiST index on the raster column") + grp_t.add_option("-M", "--vacuum", dest="vacuum", action="store_true", default=False, + help="issue VACUUM command against all generated tables") + grp_t.add_option('-V', '--create-raster-overviews', dest='create_raster_overviews_table', + action='store_true', default=False, + help='create RASTER_OVERVIEWS table used to store overviews metadata') + prs.add_option_group(grp_t); + + # Other optional parameters + grp_u = OptionGroup(prs, "Miscellaneous", "Other optional parameters") + grp_u.add_option("-e", "--endian", dest="endian", action="store", type="int", default=g_rt_endian, + help="control endianness of generated binary output of raster; " + "specify 0 for XDR and 1 for NDR (default); " + "only NDR output is supported now") + grp_u.add_option("-w", "--raster-version", dest="version", + action="store", type="int", default=g_rt_version, + help="specify version of raster protocol, default is 0; " + "only value of zero is supported now") + grp_u.add_option("-o", "--output", dest="output", action="store", default=sys.stdout, + help="specify output file, otherwise send to stdout") + grp_u.add_option("-v", "--verbose", dest="verbose", action="store_true", default=False, + help="verbose mode. Useful for debugging") + prs.add_option_group(grp_u); + + (opts, args) = prs.parse_args() + + # Validate options + if opts.create_table and opts.drop_table and opts.append_table: + prs.error("options -c, -a and -d are mutually exclusive") + if opts.create_table and opts.drop_table: + prs.error("options -c and -d are mutually exclusive") + if opts.create_table and opts.append_table: + prs.error("options -c and -a are mutually exclusive") + if opts.append_table and opts.drop_table: + prs.error("options -a and -d are mutually exclusive") + if (not opts.create_table and not opts.drop_table and not opts.append_table) or opts.drop_table: + opts.create_table = True + + if opts.raster is None: + prs.error("use option -r to specify at least one input raster. Wildcards (?,*) are accepted.") + + if opts.block_size is not None and len(opts.raster) != 1: + prs.error("regular blocking supports single-raster input only") + + if opts.block_size is not None: + if len(opts.block_size.split('x')) != 2 and len(opts.block_size.split('X')) != 2: + prs.error("invalid format of block size, expected WIDTHxHEIGHT") + + if opts.overview_level > 1 and opts.block_size is None: + prs.error("regular blocking mode required to enable overviews support (level > 1)") + + if opts.create_raster_overviews_table and opts.overview_level <= 1: + prs.error('create table for RASTER_OVERVIEWS available only if overviews import requested') + + # XXX: Now, if --band=Nth, then only Nth band of all specified rasters is dumped/imported + # This behavior can be changed to support only single-raster input if --band option used. + #if opts.band is not None and len(opts.raster) > 1: + # prs.error("option -b requires single input raster only, specify -r option only once") + + if opts.table is None: + prs.error("use option -t to specify raster destination table") + if len(opts.table.split('.')) > 2: + prs.error("invalid format of table name specified with option -t, expected [.]table") + + if opts.output is None: + prs.error("failed to initialise output file, try to use option -o explicitly") + + if opts.version is not None: + if opts.version != g_rt_version: + prs.error("invalid version of WKT Raster protocol specified, only version 0 is supported") + else: + prs.error("use option -w to specify version of WKT Raster protocol") + + if opts.endian is not None: + if opts.endian != NDR and opts.endian != XDR: + prs.error("invalid endianness value, valid ones are 0 for NDR or 1 for XDR") + else: + prs.error("use option -e to specify endianness of binary output") + + return (opts, args) + + +def logit(msg): + """If verbose mode requested, sends extra progress information to stderr""" + if VERBOSE is True: + sys.stderr.write(msg) + + +def gdt2pt(gdt): + """Translate GDAL data type to WKT Raster pixel type.""" + pixtypes = { + gdalc.GDT_Byte : { 'name': 'PT_8BUI', 'id': 4 }, + gdalc.GDT_Int16 : { 'name': 'PT_16BSI', 'id': 5 }, + gdalc.GDT_UInt16 : { 'name': 'PT_16BUI', 'id': 6 }, + gdalc.GDT_Int32 : { 'name': 'PT_32BSI', 'id': 7 }, + gdalc.GDT_UInt32 : { 'name': 'PT_32BUI', 'id': 8 }, + gdalc.GDT_Float32 : { 'name': 'PT_32BF', 'id': 10 }, + gdalc.GDT_Float64 : { 'name': 'PT_64BF', 'id': 11 } + } + + # XXX: Uncomment these logs to debug types translation + #logit('MSG: Input GDAL pixel type: %s (%d)\n' % (gdal.GetDataTypeName(gdt), gdt)) + #logit('MSG: Output WKTRaster pixel type: %(name)s (%(id)d)\n' % (pixtypes.get(gdt, 13))) + + return pixtypes.get(gdt, 13) + +def pt2numpy(pt): + """Translate GDAL data type to NumPy data type""" + ptnumpy = { + gdalc.GDT_Byte : numpy.uint8, + gdalc.GDT_Int16 : numpy.int16, + gdalc.GDT_UInt16 : numpy.uint16, + gdalc.GDT_Int32 : numpy.int32, + gdalc.GDT_UInt32 : numpy.uint32, + gdalc.GDT_Float32: numpy.float32, + gdalc.GDT_Float64: numpy.float64 + } + return ptnumpy.get(pt, numpy.uint8) + +def pt2fmt(pt): + """Returns binary data type specifier for given pixel type.""" + fmttypes = { + 4: 'B', # PT_8BUI + 5: 'h', # PT_16BSI + 6: 'H', # PT_16BUI + 7: 'i', # PT_32BSI + 8: 'I', # PT_32BUI + 10: 'f', # PT_32BF + 11: 'd' # PT_64BF + } + return fmttypes.get(pt, 'x') + + +def fmt2printfmt(fmt): + """Returns printf-like formatter for given binary data type sepecifier.""" + fmttypes = { + 'B': '%d', # PT_8BUI + 'h': '%d', # PT_16BSI + 'H': '%d', # PT_16BUI + 'i': '%d', # PT_32BSI + 'I': '%d', # PT_32BUI + 'f': '%.15f', # PT_32BF + 'd': '%.15f', # PT_64BF + 's': '%s' + } + return fmttypes.get(fmt, 'f') + +def parse_block_size(options): + assert options is not None + assert options.block_size is not None + + wh = options.block_size.split('x') + if len(wh) != 2: + wh = options.block_size.split('X') + + assert len(wh) == 2, "invalid format of specified block size" + return ( int(wh[0]), int(wh[1]) ) + +################################################################################ +# SQL OPERATIONS + +def quote_sql_value(value): + assert value is not None, "None value given" + + if len(value) > 0 and value[0] != "'" and value[:-1] != "'": + sql = "'" + str(value) + "'" + else: + sql = value + return sql + +def quote_sql_name(name): + assert name is not None, "None name given" + + if name[0] != "\"" and name[:-1] != "\"": + sql = "\"" + str(name) + "\"" + else: + sql = name + return sql + +def make_sql_value_array(values): + sql = "ARRAY[" + for v in values: + if type(v) == str: + sql += quote_sql_value(v) + "," + else: + sql += str(v) + ',' + sql = sql[:-1] # Trim comma + sql += "]" + return sql + +def make_sql_schema_table_names(schema_table): + st = schema_table.split('.') + if len(st) == 1: + # TODO: Should we warn user that public is used implicitly? + st.insert(0, "public") + assert len(st) == 2, "Invalid format of table name, expected [.]table" + return (st[0], st[1]) + +def make_sql_full_table_name(schema_table): + st = make_sql_schema_table_names(schema_table) + table = "\"%s\".\"%s\"" % (st[0], st[1]) + return table + +def make_sql_table_name(schema_table): + st = schema_table.split('.') + assert len(st) == 1 or len(st) == 2, "Invalid format of table name, expected [.]table" + if len(st) == 2: + return st[1] + return st[0] + +def make_sql_drop_table(table): + sql = "DROP TABLE IF EXISTS %s CASCADE;\n" \ + % make_sql_full_table_name(table) + logit("SQL: %s" % sql) + return sql + +def make_sql_drop_raster_table(table): + st = make_sql_schema_table_names(table) + + if len(st[0]) == 0: + target = "'', '%s'" % st[1] + else: + target = "'%s', '%s'" % (st[0], st[1]) + sql = "SELECT DropRasterTable(%s);\n" % target + logit("SQL: %s" % sql) + return sql + + +def make_sql_create_table(options, table = None, is_overview = False): + + if table is None: + table = options.table + + if options.filename: + sql = "CREATE TABLE %s (rid serial PRIMARY KEY, \"filename\" text);\n" \ + % (make_sql_full_table_name(table)) + else: + if options.overview_level > 1 and is_overview: + sql = "CREATE TABLE %s (rid serial PRIMARY KEY, %s RASTER);\n" \ + % (make_sql_full_table_name(table), quote_sql_name(options.column)) + else: + sql = "CREATE TABLE %s (rid serial PRIMARY KEY);\n" \ + % (make_sql_full_table_name(table)) + + logit("SQL: %s" % sql) + return sql + + +def make_sql_create_gist(table, column): + gist_table = make_sql_table_name(table) + target_table = make_sql_full_table_name(table) + logit("MSG: Create GiST spatial index on %s\n" % gist_table) + + sql = "CREATE INDEX \"%s_%s_gist_idx\" ON %s USING GIST (st_convexhull(%s));\n" % \ + (gist_table, column, target_table, column) + logit("SQL: %s" % sql) + return sql; + + +def make_sql_addrastercolumn(options, pixeltypes, nodata, pixelsize, blocksize, extent): + assert len(pixeltypes) > 0, "No pixel types given" + ts = make_sql_schema_table_names(options.table) + pt = make_sql_value_array(pixeltypes) + + nd = 'null' + if nodata is not None and len(nodata) > 0: + nd = make_sql_value_array(nodata) + + odb = 'false' + if options.register: + odb = 'true' + + rb = 'false' + extgeom = 'null' + bs = ( 'null', 'null' ) + # Check if regular blocking mode requested + if options.block_size is not None: + assert pixelsize is not None, "Pixel size is none, but regular blocking requested" + assert blocksize is not None, "Block size is none, but regular blocking requested" + assert extent is not None, "Extent is none, but regular blocking requested" + assert len(pixelsize) == 2, "Invalid pixel size, two values expected" + assert len(blocksize) == 2, "Invalid block size, two values expected" + assert len(extent) == 4, "Invalid extent, four coordinates expected" + assert len(extent[0]) == len(extent[3]) == 2, "Invalid extent, pair of X and Y pair expected" + rb = 'true' + bs = ( blocksize[0], blocksize[1] ) + extgeom = "ST_Envelope(ST_SetSRID('POLYGON((%.15f %.15f,%.15f %.15f,%.15f %.15f,%.15f %.15f,%.15f %.15f))'::geometry, %d))" % \ + (extent[0][0], extent[0][1], extent[1][0], extent[1][1], + extent[2][0], extent[2][1], extent[3][0], extent[3][1], + extent[0][0], extent[0][1], options.srid) + + sql = "SELECT AddRasterColumn('%s','%s','%s',%d, %s, %s, %s, %s, %.15f, %.15f, %s, %s, %s);\n" % \ + (ts[0], ts[1], options.column, options.srid, pt, odb, rb, nd, + pixelsize[0], pixelsize[1], bs[0], bs[1], extgeom) + + logit("SQL: %s" % sql) + return sql + +def make_sql_insert_raster(table, rast, hexwkb, insert_filename, file): + if insert_filename: + assert file is not None, "Missing filename, but insert_filename requested" + sql = "INSERT INTO %s ( filename, %s ) VALUES ( (\'%s\')::text, (\'%s\')::raster );\n" \ + % (make_sql_full_table_name(table), rast, file, hexwkb) + else: + sql = "INSERT INTO %s ( %s ) VALUES ( (\'%s\')::raster );\n" \ + % (make_sql_full_table_name(table), rast, hexwkb) + + # NOTE: Usually, no need for such detailed verbosity + #logit("SQL: %s" % sql) + return sql + +def make_sql_create_raster_overviews(options): + schema = make_sql_schema_table_names(options.table)[0] + table = make_sql_full_table_name(schema + '.raster_overviews') + sql = 'CREATE TABLE ' + table + ' ( ' \ + 'o_table_catalog character varying(256) NOT NULL, ' \ + 'o_table_schema character varying(256) NOT NULL, ' \ + 'o_table_name character varying(256) NOT NULL, ' \ + 'o_column character varying(256) NOT NULL, ' \ + 'r_table_catalog character varying(256) NOT NULL, ' \ + 'r_table_schema character varying(256) NOT NULL, ' \ + 'r_table_name character varying(256) NOT NULL, ' \ + 'r_column character varying(256) NOT NULL, ' \ + 'out_db boolean NOT NULL, ' \ + 'overview_factor integer NOT NULL, ' \ + 'CONSTRAINT raster_overviews_pk ' \ + 'PRIMARY KEY (o_table_catalog, o_table_schema, o_table_name, o_column, overview_factor));\n' + + return sql + + +def make_sql_register_overview(options, ov_table, ov_factor): + assert len(ov_table) > 0 + assert ov_factor > 0 + + catalog = quote_sql_value('') + schema = make_sql_schema_table_names(options.table)[0] + r_table = make_sql_table_name(options.table) + + sql = "INSERT INTO public.raster_overviews( " \ + "o_table_catalog, o_table_schema, o_table_name, o_column, " \ + "r_table_catalog, r_table_schema, r_table_name, r_column, out_db, overview_factor) " \ + "VALUES ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', FALSE, %d);\n" % \ + (catalog, schema, ov_table, options.column, catalog, schema, r_table, options.column, ov_factor) + + return sql + +def make_sql_vacuum(table): + sql = 'VACUUM ANALYZE ' + make_sql_full_table_name(table) + ';\n' + return sql + +################################################################################ +# RASTER OPERATIONS + +def calculate_overviews(ds, band_from = None, band_to = None): + assert ds is not None + + if band_from is None: + band_from = 0 + if band_to is None: + band_to = ds.RasterCount + + assert band_to <= ds.RasterCount,'Failed checking band_to=%d <= RasterCount=%d' % (band_to,ds.RasterCount) + assert band_from <= band_to + + nov = 0 + for i in range(band_from, band_to + 1): + n = ds.GetRasterBand(i).GetOverviewCount() + if 0 == nov: + nov = n + assert n == nov, 'Number of raster overviews is not the same for all bands' + + return nov + +def calculate_overview_factor(ds, overview): + assert ds is not None + + + # Assume all bands have same layout of overviews + band = ds.GetRasterBand(1) + assert band is not None + assert overview < band.GetOverviewCount() + + ov_band = band.GetOverview(overview) + assert ov_band is not None + + ovf = int(0.5 + ds.RasterXSize / float(ov_band.XSize)) + logit('MSG: Overview factor = %d\n' % ovf) + + return ovf + + +def collect_pixel_types(ds, band_from, band_to): + """Collect pixel types of bands in requested range. + Use names of pixel types in format as returned + by rt_core function rt_pixtype_name()""" + + pt =[] + for i in range(band_from, band_to): + band = ds.GetRasterBand(i) + pixel_type = gdt2pt(band.DataType)['name'][3:] + pt.append(pixel_type) + + return pt + +def collect_nodata_values(ds, band_from, band_to): + """Collect nodata values of bands in requested range""" + + nd = [] + for i in range(band_from, band_to): + band = ds.GetRasterBand(i) + nodata = band.GetNoDataValue() + if nodata is not None and not is_nan(nodata): + nd.append(nodata) + + return nd + +def calculate_block_size(ds, band_from, band_to): + """Size of natural block reported by GDAL for bands of given dataset""" + + block_dims = None + for i in range(band_from, band_to): + band = ds.GetRasterBand(i) + assert band is not None, "Cannot access raster band %d" % i + dims = band.GetBlockSize() + + # Assume bands with common block size + if i == band_from: + block_dims = dims + + # Validate dimensions of bands block + if block_dims != dims: + logit("MSG: Block sizes don't match: %s != %s\n" % (str(block_dims), str(dims))) + + assert block_dims is not None, "Failed to calculate block size" + return (int(block_dims[0]), int(block_dims[1])) + +def calculate_grid_size(raster_size, block_size): + """Dimensions of grid made up with blocks of requested size""" + + # Exact number of grid dimensions + nx = float(raster_size[0]) / float(block_size[0]) + ny = float(raster_size[1]) / float(block_size[1]) + + return ( int(math.ceil(nx)), int(math.ceil(ny))) + +def calculate_block_pad_size(band, xoff, yoff, block_size): + """Calculates number of columns [0] and rows [1] of padding""" + assert band is not None + + xpad = 0 + ypad= 0 + block_bound = ( xoff + block_size[0], yoff + block_size[1] ) + + if block_bound[0] > band.XSize: + xpad = block_bound[0] - band.XSize + if block_bound[1] > band.YSize: + ypad = block_bound[1] - band.YSize + + return (xpad, ypad) + +def get_gdal_geotransform(ds): + assert ds is not None + gt = list(ds.GetGeoTransform()) + return tuple(gt) + +def calculate_geoxy(gt, xy): + """Calculate georeferenced coordinate from given x and y""" + assert gt is not None + assert xy is not None + assert len(xy) == 2 + + xgeo = gt[0] + gt[1] * xy[0] + gt[2] * xy[1]; + ygeo = gt[3] + gt[4] * xy[0] + gt[5] * xy[1]; + + return (xgeo, ygeo) + +def calculate_geoxy_level(gt, xy, level): + + # Update pixel resolution according to overview level + newgt = ( gt[0], gt[1] * float(level), gt[2], gt[3], gt[4], gt[5] * float(level) ) + + return calculate_geoxy(newgt, xy) + +def calculate_bounding_box(ds, gt): + """Calculate georeferenced coordinates of spatial extent of raster dataset""" + assert ds is not None + + # UL, LL, UR, LR + dim = ( (0,0),(0,ds.RasterYSize),(ds.RasterXSize,0),(ds.RasterXSize,ds.RasterYSize) ) + + ext = (calculate_geoxy(gt, dim[0]), calculate_geoxy(gt, dim[1]), + calculate_geoxy(gt, dim[2]), calculate_geoxy(gt, dim[3])) + + return ext + +def check_hex(hex, bytes_size = None): + assert hex is not None, "Error: Missing hex string" + size = len(hex) + assert size > 0, "Error: hex string is empty" + assert size % 2 == 0, "Error: invalid size of hex string" + if bytes_size is not None: + n = int(size / 2) + assert n == bytes_size, "Error: invalid number of bytes %d, expected %d" % (n, bytes_size) + +def dump_block_numpy(pixels): + assert pixels.ndim == 2 + print 'BEGIN BLOCK SCANLINES (numpy): (%d, %d)' %(len(pixels[0]), len(pixels)) + + i = 0 + for row in range (0, len(pixels)): + s = binascii.hexlify(pixels[row]) + print '%d (%d)\t%s' % (i, (len(s) / 2), s) + i = i + 1 + + print 'END BLOCK SCANLINES' + +def fetch_band_nodata(band, default = 0): + assert band is not None + + nodata = default + if band.GetNoDataValue() is not None: + nodata = band.GetNoDataValue() + else: + logit("WARNING: No nodata flagged in raster_columns metadata. " + "In serialized raster, nodata bytes will have value of 0.\n") + return nodata + +def wkblify(fmt, data): + """Writes raw binary data into HEX-encoded string using binascii module.""" + import struct + + # Binary to HEX + fmt_little = '<' +fmt + hexstr = binascii.hexlify(struct.pack(fmt_little, data)).upper() + + # String'ify raw value for log + valfmt = '\'' + fmt2printfmt(fmt[len(fmt) - 1]) + '\'' + val = valfmt % data + logit('HEX (\'fmt=%s\', bytes=%d, val=%s):\t\t%s\n' \ + % (fmt, len(hexstr) / 2, str(val), hexstr)) + + return hexstr + +def wkblify_raster_header(options, ds, level, ulp, xsize = None, ysize = None): + """Writes WKT Raster header based on given GDAL into HEX-encoded WKB.""" + assert ds is not None, "Error: Missing GDAL dataset" + assert level >= 1 + assert len(ulp) == 2 is not None, "Error: invalid upper-left corner" + + if xsize is None or ysize is None: + assert xsize is None and ysize is None + xsize = ds.RasterXSize + ysize = ds.RasterYSize + + # Collect GeoReference information + gt = get_gdal_geotransform(ds) + ul = calculate_geoxy(gt, (ulp[0], ulp[1])) + rt_ip = ( ul[0], ul[1] ) + rt_skew = ( gt[2], gt[4] ) + rt_scale = ( gt[1] * level, gt[5] * level ) + + # TODO: Any way to lookup for SRID based on SRS in WKT? + #srs = osr.SpatialReference() + #srs.ImportFromWkt(ds.GetProjection()) + + # Burn input raster as WKTRaster WKB format + hexwkb = '' + ### Endiannes + hexwkb += wkblify('B', options.endian) + ### Version + hexwkb += wkblify('H', options.version) + ### Number of bands + if options.band is not None and options.band > 0: + hexwkb += wkblify('H', 1) + else: + hexwkb += wkblify('H', ds.RasterCount) + check_hex(hexwkb, 5) + ### Georeference + hexwkb += wkblify('d', rt_scale[0]) + hexwkb += wkblify('d', rt_scale[1]) + hexwkb += wkblify('d', rt_ip[0]) + hexwkb += wkblify('d', rt_ip[1]) + hexwkb += wkblify('d', rt_skew[0]) + hexwkb += wkblify('d', rt_skew[1]) + hexwkb += wkblify('i', options.srid) + check_hex(hexwkb, 57) + ### Number of columns and rows + hexwkb += wkblify('H', xsize) + hexwkb += wkblify('H', ysize) + check_hex(hexwkb, 61) + + logit("MSG: Georeference: px = %s -> ul = %s \tresolution = %s \trotation = %s\n" \ + % (str(ulp), str(rt_ip), str(rt_scale), str(rt_skew))) + return hexwkb + +def wkblify_band_header(options, band): + """Writes band header into HEX-encoded WKB""" + assert band is not None, "Error: Missing GDAL raster band" + + hexwkb = "" + + first4bits = 0 + + # If the register option is enabled, set the first bit to 1 + if options.register: + first4bits = 128 + + nodata = band.GetNoDataValue() + # If there is no nodata value, set it to 0. Otherwise set the HasNodata bit to 1 + if nodata is not None: + first4bits += 64 + else: + nodata = 0 + + # Encode pixel type + pixtype = gdt2pt(band.DataType)['id'] + hexwkb += wkblify('B', pixtype + first4bits) + + # Encode nodata value (or Zero, if nodata unavailable) + hexwkb += wkblify(pt2fmt(pixtype), nodata) + + check_hex(hexwkb) + return hexwkb + +def wkblify_band(options, band, level, xoff, yoff, read_block_size, block_size, infile, bandidx): + """Writes band of given GDAL dataset into HEX-encoded WKB for WKT Raster output.""" + assert band is not None, "Error: Missing GDAL raster band" + + hexwkb = '' + + if options.register: + # Off-db raster + # TODO: Do we want to handle options.overview_level? --mloskot + # ANSWER: + # TODO: Where bandidx and ds come from? --mloskot + # ANSWER: Provided by caller method --jorgearevalo + hexwkb += wkblify('B', bandidx - 1) + filepath = os.path.abspath(infile.replace('\\', '\\\\')) + logit('MSG: Out-db raster path=%s\n' % filepath) + hexwkb += wkblify(str(len(filepath)) + 's', filepath) + hexwkb += wkblify('B', 0) + else: + # In-db raster + + # Right most column and bottom most row of blocks have + # portions that extend beyond the raster + read_padding_size = calculate_block_pad_size(band, xoff, yoff, read_block_size) + valid_read_block_size = ( read_block_size[0] - read_padding_size[0], + read_block_size[1] - read_padding_size[1] ) + + + if read_padding_size[0] > 0 or read_padding_size[1] > 0: + target_block_size = (valid_read_block_size[0] / level, valid_read_block_size[1] / level) + target_padding_size = (read_padding_size[0] / level, read_padding_size[1] / level) + else: + target_block_size = block_size + target_padding_size = ( 0, 0 ) + + logit('MSG: Normalize read_block=%s for level=%d to valid_read_block=%s with padding=%s\n' % \ + (read_block_size, level, valid_read_block_size, read_padding_size)) + logit('MSG: Normalize target_block=%s for level=%d to valid_target_block=%s with padding=%s\n' % \ + (block_size, level, target_block_size, target_padding_size)) + logit('MSG: ReadAsArray( %d, %d, %s, %s)\n' % \ + (xoff, yoff, str(valid_read_block_size), str(target_block_size))) + + assert valid_read_block_size[0] > 0 and valid_read_block_size[1] > 0 + assert target_block_size[0] > 0 and target_block_size[1] > 0 + + pixels = band.ReadAsArray(xoff, yoff, valid_read_block_size[0], valid_read_block_size[1], + target_block_size[0], target_block_size[1]) + + # XXX: Use for debugging only + #dump_block_numpy(pixels) + + out_pixels = numpy.zeros((block_size[1], block_size[0]), pt2numpy(band.DataType)) + + logit('MSG: Read valid source:\t%d x %d\n' % (len(pixels[0]), len(pixels))) + logit('MSG: Write into block:\t%d x %d\n' % (len(out_pixels[0]), len(out_pixels))) + + if target_padding_size[0] > 0 or target_padding_size[1] > 0: + + ysize_read_pixels = len(pixels) + nodata_value = fetch_band_nodata(band) + + # Apply columns padding + pad_cols = numpy.array([nodata_value] * target_padding_size[0]) + for row in range (0, ysize_read_pixels): + out_line = numpy.append(pixels[row], pad_cols) + out_pixels[row] = out_line + + # Fill rows padding with nodata value + for row in range(ysize_read_pixels, ysize_read_pixels + target_padding_size[1]): + out_pixels[row].fill(nodata_value) + else: + out_pixels = pixels + + # XXX: Use for debugging only + #dump_block_numpy(out_pixels) + + hexwkb = binascii.hexlify(out_pixels) + + check_hex(hexwkb) + return hexwkb + +def wkblify_raster_level(options, ds, level, band_range, infile, i): + assert ds is not None + assert level >= 1 + assert len(band_range) == 2 + + band_from = band_range[0] + band_to = band_range[1] + + # Collect raster and block dimensions + raster_size = ( ds.RasterXSize, ds.RasterYSize ) + if options.block_size is not None: + block_size = parse_block_size(options) + read_block_size = ( block_size[0] * level, block_size[1] * level) + grid_size = calculate_grid_size(raster_size, read_block_size) + else: + block_size = raster_size # Whole raster as a single block + read_block_size = block_size + grid_size = (1, 1) + + logit("MSG: Processing raster=%s using read_block_size=%s block_size=%s of grid=%s in level=%d\n" % \ + (str(raster_size), str(read_block_size), str(block_size), str(grid_size), level)) + + # Register base raster in RASTER_COLUMNS - SELECT AddRasterColumn(); + if level == 1: + if i == 0 and options.create_table: + gt = get_gdal_geotransform(ds) + pixel_size = ( gt[1], gt[5] ) + pixel_types = collect_pixel_types(ds, band_from, band_to) + nodata_values = collect_nodata_values(ds, band_from, band_to) + extent = calculate_bounding_box(ds, gt) + sql = make_sql_addrastercolumn(options, pixel_types, nodata_values, + pixel_size, block_size, extent) + options.output.write(sql) + gen_table = options.table + + else: + # Create overview table and register in RASTER_OVERVIEWS + + # CREATE TABLE o__ ( rid serial, options.column RASTER ) + schema_table_names = make_sql_schema_table_names(options.table) + level_table_name = 'o_' + str(level) + '_' + schema_table_names[1] + level_table = schema_table_names[0] + '.' + level_table_name + if i == 0: + sql = make_sql_create_table(options, level_table, True) + options.output.write(sql) + sql = make_sql_register_overview(options, level_table_name, level) + options.output.write(sql) + gen_table = level_table + + # Write (original) raster to hex binary output + tile_count = 0 + hexwkb = '' + + for ycell in range(0, grid_size[1]): + for xcell in range(0, grid_size[0]): + + xoff = xcell * read_block_size[0] + yoff = ycell * read_block_size[1] + + logit("MSG: --------- CELL #%04d\tindex = %d x %d\tdim = (%d x %d)\t(%d x %d) \t---------\n" % \ + (tile_count, xcell, ycell, xoff, yoff, xoff + read_block_size[0], yoff + read_block_size[1])) + + if options.block_size is not None: + hexwkb = '' # Reset buffer as single INSERT per tile is generated + hexwkb += wkblify_raster_header(options, ds, level, (xoff, yoff), + block_size[0], block_size[1]) + else: + hexwkb += wkblify_raster_header(options, ds, level, (xoff, yoff)) + + for b in range(band_from, band_to): + band = ds.GetRasterBand(b) + assert band is not None, "Missing GDAL raster band %d" % b + logit("MSG: Band %d\n" % b) + + hexwkb += wkblify_band_header(options, band) + hexwkb += wkblify_band(options, band, level, xoff, yoff, read_block_size, block_size, infile, b) + + # INSERT INTO + check_hex(hexwkb) # TODO: Remove to not to decrease performance + sql = make_sql_insert_raster(gen_table, options.column, hexwkb, options.filename, infile) + options.output.write(sql) + + tile_count = tile_count + 1 + + return (gen_table, tile_count) + +def wkblify_raster(options, infile, i, previous_gt = None): + """Writes given raster dataset using GDAL features into HEX-encoded of + WKB for WKT Raster output.""" + + assert infile is not None, "Input file is none, expected file name" + assert options.version == g_rt_version, "Error: invalid WKT Raster protocol version" + assert options.endian == NDR, "Error: invalid endianness, use little-endian (NDR) only" + assert options.srid >= -1, "Error: do you really want to specify SRID = %d" % options.srid + + # Open source raster file + ds = gdal.Open(infile, gdalc.GA_ReadOnly); + if ds is None: + sys.exit('Error: Cannot open input file: ' + str(infile)) + + # By default, translate all raster bands + + # Calculate range for single-band request + if options.band is not None and options.band > 0: + band_range = ( options.band, options.band + 1 ) + else: + band_range = ( 1, ds.RasterCount + 1 ) + + # Compare this px size with previous one + current_gt = get_gdal_geotransform(ds) + if previous_gt is not None: + if previous_gt[1] != current_gt[1] or previous_gt[5] != current_gt[5]: + sys.exit('Error: Cannot load raster with different pixel size in the same raster table') + + # Generate requested overview level (base raster if level = 1) + summary = wkblify_raster_level(options, ds, options.overview_level, band_range, infile, i) + SUMMARY.append( summary ) + + # Cleanup + ds = None + + return current_gt + +################################################################################ + +def main(): + + (opts, args) = parse_command_line() + + global VERBOSE + VERBOSE = opts.verbose + + global SUMMARY + SUMMARY = [] + + saved_out = sys.stdout + if type(opts.output) is str: + filename = opts.output + opts.output = open(filename, "w") + + # BEGIN + opts.output.write('BEGIN;\n') + + # If overviews requested, CREATE TABLE raster_overviews + if opts.create_raster_overviews_table: + sql = make_sql_create_raster_overviews(opts) + opts.output.write(sql) + + # Base raster schema + if opts.overview_level == 1: + # DROP TABLE + if opts.drop_table: + sql = make_sql_drop_raster_table(opts.table) + opts.output.write(sql) + + # CREATE TABLE + if opts.create_table and opts.overview_level == 1: + sql = make_sql_create_table(opts) + opts.output.write(sql) + + # INSERT + i = 0 + + # Burn all specified input raster files into single WKTRaster table + gt = None + for infile in opts.raster: + filelist = glob.glob(infile) + assert len(filelist) > 0, "No input raster files found for '" + str(infile) + "'" + + for filename in filelist: + logit("MSG: Dataset #%d: %s\n" % (i + 1, filename)) + + # Write raster data to WKB and send it to opts.output + gt = wkblify_raster(opts, filename.replace( '\\', '/') , i, gt) + i += 1 + + # INDEX + if opts.index and SUMMARY is not None: + sql = make_sql_create_gist(SUMMARY[0][0], opts.column) + opts.output.write(sql) + + # COMMIT + opts.output.write('END;\n') + + # VACUUM + if opts.vacuum and SUMMARY is not None: + sql = make_sql_vacuum(SUMMARY[0][0]) + opts.output.write(sql) + + # Cleanup + if opts.output != sys.stdout: + sys.stdout = saved_out + + print "------------------------------------------------------------" + print " Summary of GDAL to PostGIS Raster processing:" + print "------------------------------------------------------------" + if i == 1: + m = '%d (%s)' % (i, infile) + else: + m = '%d' % i + print "Number of processed raster files: " + m + print "List of generated tables (number of tiles):" + i = 0 + for s in SUMMARY: + i += 1 + print "%d\t%s (%d)" % (i, s[0], s[1]) + +################################################################################ + +if __name__ == "__main__": + main() diff -Nru postgis-1.5.3/raster/scripts/python/rtgdalraster.py postgis-2.0.1/raster/scripts/python/rtgdalraster.py --- postgis-1.5.3/raster/scripts/python/rtgdalraster.py 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/scripts/python/rtgdalraster.py 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,100 @@ +#! /usr/bin/env python +# +# $Id$ +# +# A simple utility for passing parameters to ST_AsGDALRaster +# for a GDAL raster output +# This utility is handy for debugging purposes. +# +# Example: +# rtgdalraster.py -d "dbname=postgres" -r "(SELECT rast FROM pele LIMIT 1)" -f JPEG -o pele.jpg +# +# +############################################################################### +# Copyright (C) 2011 Regents of the University of California +# +# Copyright (C) 2009 Mateusz Loskot +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +############################################################################### +from optparse import OptionParser +import sys +import os +import psycopg2 + +def logit(msg): + if VERBOSE is True: + sys.stderr.write("LOG - " + str(msg) + "\n") + +############################################################################### +try: + prs = OptionParser(version="%prog", + usage="%prog -d -r -o [-f ] [-c ]", + description="Output raster in a GDAL raster format") + prs.add_option("-d", "--db", dest="db", action="store", default=None, + help="PostgreSQL database connection string, required") + prs.add_option("-r", "--raster", dest="raster", action="store", default=None, + help="sql expression to create or access a existing raster, required") + prs.add_option("-o", "--output", dest="output", action="store", default=None, + help="file to put the output of ST_AsGDALRaster if successful, required") + prs.add_option("-f", "--format", dest="format", action="store", default="GTiff", + help="format of GDAL raster output, optional, default=GTiff") + prs.add_option("-c", "--config", dest="config", action="store", default=None, + help="comma separated list of GDAL raster creation options, optional") + prs.add_option("-v", "--verbose", dest="verbose", action="store_true", default=False, + help="be excessively verbose and useful for debugging") + + (opts, args) = prs.parse_args() + + if opts.db is None: + prs.error("use -d option to specify database connection string") + if opts.raster is None: + prs.error("use -r option to specify a sql expression for a raster") + if opts.output is None: + prs.error("use -o option to specify raster output file") + + if opts.config is not None: + opts.cfg = opts.config.split(',') + else: + opts.cfg = None + + global VERBOSE + VERBOSE = opts.verbose + + conn = psycopg2.connect(opts.db) + logit("Connected to %s" % opts.db) + logit("Raster expression is %s" % opts.raster) + + cur = conn.cursor() + sql = "SELECT ST_AsGDALRaster(%s, %%s, %%s::text[], NULL::integer)" % (opts.raster) + cur.execute(sql, (opts.format, opts.cfg)) + logit("Number of rows: %i" % cur.rowcount) + rec = cur.fetchone()[0]; + logit("size of raster (bytes): %i" % len(rec)) + + fh = open(opts.output, 'wb', -1) + fh.write(rec); + fh.flush(); + fh.close(); + logit("size of %s (bytes): %i" % (opts.output, os.stat(opts.output)[6])); + + cur.close(); + conn.close(); + + print "raster outputted to %s" % opts.output; + +except Exception, e: + print "ERROR: ", e diff -Nru postgis-1.5.3/raster/scripts/python/rtpixdump.py postgis-2.0.1/raster/scripts/python/rtpixdump.py --- postgis-1.5.3/raster/scripts/python/rtpixdump.py 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/scripts/python/rtpixdump.py 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,77 @@ +#! /usr/bin/env python +# +# $Id: rtpixdump.py 9324 2012-02-27 22:08:12Z pramsey $ +# +# Brute-force dump of all pixels of all bands in WKT Raster field/row to text. +# This utility is handy for debugging purposes. +# +# Copyright (C) 2009 Mateusz Loskot +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +############################################################################### +import rtreader +from optparse import OptionParser +import sys + +def logit(msg): + if VERBOSE is True: + sys.stderr.write("LOG - " + msg + "\n") + +############################################################################### +try: + + prs = OptionParser(version="%prog $Revision: 9324 $", + usage="%prog -d -t
[-c ]", + description="Brute-force dump of all pixel values of WKT Raster dataset") + prs.add_option("-d", "--db", dest="db", action="store", default=None, + help="PostgreSQL database connection string, required") + prs.add_option("-t", "--table", dest="table", action="store", default=None, + help="table with raster column [.]
, required") + prs.add_option("-c", "--column", dest="column", action="store", default="rast", + help="raster column, optional, default=rast") + prs.add_option("-w", "--where", dest="where", action="store", default=None, + help="SQL WHERE clause to filter record - NOT IMPLEMENTED") + prs.add_option("-v", "--verbose", dest="verbose", action="store_true", default=False, + help="be excessively verbose and useful for debugging") + + (opts, args) = prs.parse_args() + + if opts.db is None: + prs.error("use -d option to specify database connection string") + if opts.table is None: + prs.error("use -t option to specify raster table") + if opts.column is None: + prs.error("use -c option to specify raster column in raster table") + + global VERBOSE + VERBOSE = opts.verbose + + rast = rtreader.RasterReader(opts.db, opts.table, opts.column) + logit("Connected to %s" % opts.db) + logit("Raster width=%d, height=%d, bands=%d" %(rast.width, rast.height, rast.num_bands)) + + for band in range(1, rast.num_bands + 1): + logit("--- BAND %d ---------------------------------" % band) + sys.stderr.write("\n") + for y in range(1, rast.height + 1): + scanline = "" + for x in range(1, rast.width + 1): + scanline += str(int(rast.get_value(band, x, y))) + '\t' + print scanline + print # Bands separator + +except rtreader.RasterError, e: + print "ERROR - ", e diff -Nru postgis-1.5.3/raster/scripts/python/rtreader.py postgis-2.0.1/raster/scripts/python/rtreader.py --- postgis-1.5.3/raster/scripts/python/rtreader.py 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/scripts/python/rtreader.py 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,160 @@ +#! /usr/bin/env python +# +# $Id: rtreader.py 9324 2012-02-27 22:08:12Z pramsey $ +# +# A simple driver to read RASTER field data directly from PostGIS/WKTRaster. +# +# Copyright (C) 2009 Mateusz Loskot +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +############################################################################### +# +# Requirements: psycopg2 +# +# WARNING: Tha main purpose of the RasterReader is to test and debug +# WKT Raster implementation. It is not supposed to be an efficient +# performance killer, by no means. +# +############################################################################### +import psycopg2 +import sys + +############################################################################### +# RASTER driver (read-only) + +class RasterError(Exception): + def __init__(self, msg): + self.msg = msg + def __str__(self): + return self.msg + +class RasterReader(object): + """Reader of RASTER data stored in specified column and row (where) in a table""" + + # Constructors + + def __init__(self, connstr, table, column, where = ""): + self._connstr = connstr + self._conn = None + self._table = table + self._column = column + self._where = where + self._sizes = None + self._types = None + self._logging = False + # Connect and read RASTER header + self._setup() + + # Public properties + + logging = property(fset = lambda self, v: setattr(self, '_logging', v)) + db = property(fget = lambda self: self._get_db()) + table = property(fget = lambda self: self._table) + column = property(fget = lambda self: self._column) + width = property(fget = lambda self: self._get_width()) + height = property(fget = lambda self: self._get_height()) + num_bands = property(fget = lambda self: self._get_num_bands()) + pixel_types = property(fget = lambda self: self._get_pixel_types()) + + # Public methods + + def get_value(self, band, x, y): + return self._query_value(band, x, y) + + # Private methods + + def _log(self, m): + if self._logging: + sys.stderr.write('[rtreader] ' + str(m) + '\n') + + def _get_db(self): + n = filter(lambda db: db[:6] == 'dbname', self._connstr.split())[0].split('=')[1] + return n.strip('\'').strip() + + def _get_width(self): + return self._query_raster_size(0) + + def _get_height(self): + return self._query_raster_size(1) + + def _get_num_bands(self): + return self._query_raster_size(2) + + def _get_pixel_types(self): + return self._query_pixel_types() + + def _setup(self): + self._connect() + + def _connect(self): + try: + if self._conn is None: + self._conn = psycopg2.connect(self._connstr) + except Exception, e: + raise RasterError("Falied to connect to %s: %s" % (self._connstr, e)) + + def _query_single_row(self, sql): + assert self._conn is not None + #self._log(sql) + + try: + cur = self._conn.cursor() + cur.execute(sql) + except Exception, e: + raise RasterError("Failed to execute query %s: %s" % (sql, + e)) + + row = cur.fetchone() + if row is None: + raise RasterError("No tupes returned for query: %s" % sql) + return row + + def _query_value(self, band, x, y): + sql = 'SELECT st_value(%s, %d, %d, %d) FROM %s' % \ + (self._column, band, x, y, self._table) + if len(self._where) > 0: + sql += ' WHERE %s' % self._where + + row = self._query_single_row(sql) + if row is None: + raise RasterError("Value of pixel %dx%d of band %d is none" %(x, y, band)) + return row[0] + + def _query_raster_size(self, dim, force = False): + if self._sizes is None or force is True: + sql = 'SELECT st_width(%s), st_height(%s), st_numbands(%s) FROM %s' % \ + (self._column, self._column, self._column, self._table) + if len(self._where) > 0: + sql += ' WHERE %s' % self._where + + self._log(sql) + self._sizes = self._query_single_row(sql) + + if self._sizes is None: + raise RasterError("Falied to query %dx%d of band %d is none" %(x, y, band)) + return self._sizes[dim] + + def _query_pixel_types(self): + + types = [] + sql = 'SELECT ' + for i in range(0, self.num_bands): + if i != 0: + sql += ',' + nband = i + 1 + sql += ' st_bandpixeltype(%s, %d) ' % (self._column, nband) + sql += ' FROM ' + self._table + return self._query_single_row(sql) diff -Nru postgis-1.5.3/raster/scripts/python/rtrowdump.py postgis-2.0.1/raster/scripts/python/rtrowdump.py --- postgis-1.5.3/raster/scripts/python/rtrowdump.py 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/scripts/python/rtrowdump.py 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,136 @@ +#! /usr/bin/env python +# +# $Id$ +# +# Brute-force dump of single row from WKT Raster table as GeoTIFF. +# This utility is handy for debugging purposes. +# +# WARNING: Tha main purpose of this program is to test and +# debug WKT Raster implementation. It is NOT supposed to be an +# efficient performance killer, by no means. +# +############################################################################### +# Copyright (C) 2009 Mateusz Loskot +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +############################################################################### +import rtreader +import numpy +import osgeo.gdalconst +from osgeo import gdal +from optparse import OptionParser +import sys + +def logit(msg): + if VERBOSE is True: + sys.stderr.write("LOG - " + str(msg) + "\n") + +def pt2gdt(pt): + """Translate WKT Raster pixel type to GDAL type""" + pixtypes = { + '8BUI' : osgeo.gdalconst.GDT_Byte, + '16BSI' : osgeo.gdalconst.GDT_Int16, + '16BUI' : osgeo.gdalconst.GDT_UInt16, + '32BSI' : osgeo.gdalconst.GDT_Int32, + '32BUI' : osgeo.gdalconst.GDT_UInt32, + '32BF' : osgeo.gdalconst.GDT_Float32, + '64BF' : osgeo.gdalconst.GDT_Float64 + } + return pixtypes.get(pt, 'UNKNOWN') + +def pt2numpy(pt): + """Translate WKT Raster pixel type to NumPy data type""" + numpytypes = { + '8BUI' : numpy.uint8, + '16BSI' : numpy.int16, + '16BUI' : numpy.uint16, + '32BSI' : numpy.int32, + '32BUI' : numpy.uint32, + '32BF' : numpy.float32, + '64BF' : numpy.float64 + } + return numpytypes.get(pt, numpy.uint8) + +############################################################################### +try: + + prs = OptionParser(version="%prog $Revision: 4037 $", + usage="%prog -d -t
[-c ]", + description="Brute-force dump of single row from WKT Raster table as GeoTIF") + prs.add_option("-d", "--db", dest="db", action="store", default=None, + help="PostgreSQL database connection string, required") + prs.add_option("-t", "--table", dest="table", action="store", default=None, + help="table with raster column [.]
, required") + prs.add_option("-c", "--column", dest="column", action="store", default="rast", + help="raster column, optional, default=rast") + prs.add_option("-w", "--where", dest="where", action="store", default="", + help="SQL WHERE clause to filter record") + prs.add_option("-o", "--output", dest="output", action="store", default=None, + help="GeoTIFF output file for pixel data read from WKT Raster table") + prs.add_option("-v", "--verbose", dest="verbose", action="store_true", default=False, + help="be excessively verbose and useful for debugging") + + (opts, args) = prs.parse_args() + + if opts.db is None: + prs.error("use -d option to specify database connection string") + if opts.table is None: + prs.error("use -t option to specify raster table") + if opts.column is None: + prs.error("use -c option to specify raster column in raster table") + if opts.output is None: + prs.error("use -o option to specify raster output file") + + global VERBOSE + VERBOSE = opts.verbose + + rt = rtreader.RasterReader(opts.db, opts.table, opts.column, opts.where) + if VERBOSE is True: + rt.logging = True + + logit("Connected to %s" % opts.db) + logit("Source WKT raster:") + logit("\trow=%s" % opts.where) + logit("\twidth=%d, height=%d, bands=%d, pixel types=%s" \ + %(rt.width, rt.height, rt.num_bands, str(rt.pixel_types))) + logit("Target GeoTIFF: %s" % opts.output) + + out_format = "GTiff" + out_driver = gdal.GetDriverByName(out_format) + out_data_type = pt2gdt(rt.pixel_types[0]) + out_ds = out_driver.Create(opts.output, rt.width, rt.height, rt.num_bands, out_data_type) + + + for b in range(1, rt.num_bands +1): + logit("--- BAND %d ---------------------------------" % b) + + ### Be careful!! + ### Zeros function's input parameter can be a (height x width) array, + ### not (width x height): http://docs.scipy.org/doc/numpy/reference/generated/numpy.zeros.html?highlight=zeros#numpy.zeros + raster = numpy.zeros((rt.height, rt.width), pt2numpy(out_data_type)) + for width_index in range(0, rt.width): + for height_index in range(0, rt.height): + pixel = rt.get_value(b, width_index + 1, height_index + 1) + raster[height_index, width_index] = pixel + + logit(str(raster)) + + band = out_ds.GetRasterBand(b) + assert band is not None + band.WriteArray(raster) + +except rtreader.RasterError, e: + print "ERROR - ", e diff -Nru postgis-1.5.3/raster/scripts/python/window.py postgis-2.0.1/raster/scripts/python/window.py --- postgis-1.5.3/raster/scripts/python/window.py 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/scripts/python/window.py 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,85 @@ +#! /usr/bin/env python +# +# $Id: window.py 9324 2012-02-27 22:08:12Z pramsey $ +# +# Calculates coordinates of window corners of given raster dataset. +# It's just a simple helper for testing and debugging WKT Raster. +# +############################################################################## +# Copyright (C) 2009 Mateusz Loskot +# +# This is free software; you can redistribute and/or modify it under +# the terms of the GNU General Public Licence. See the COPYING file. +############################################################################## +from osgeo import gdal +from osgeo import osr +import osgeo.gdalconst as gdalc +import sys + +if len(sys.argv) != 6: + print "Usage: window.py " + print "\traster - GDAL supported dataset" + print "\tx - column - 1..N where N is raster X dimension" + print "\ty - row - 1..N where N is raster Y dimension" + print "\txsize - x-dimension of requested window (xsize <= xsize of raster - x)" + print "\tysize - y-dimension of requested window (ysize <= ysize of raster - y)" + sys.exit(0) + +def is_georeferenced(gt): + if gt[0] == 0.0 and gt[1] == 1.0 and gt[3] == 0.0 and gt[5] == 1.0: + return False + else: + return True + +def calculate_corner(gt, x, y): + if is_georeferenced(gt): + xgeo = gt[0] + gt[1] * x + gt[2] * y + ygeo = gt[3] + gt[4] * x + gt[5] * y + else: + xgeo = x + xgeo = y + return (xgeo, ygeo) + +infile = sys.argv[1] +inxoff = int(sys.argv[2]) +inyoff = int(sys.argv[3]) +inxsize = int(sys.argv[4]) +inysize = int(sys.argv[5]) +print "=== INPUT ===" +print "File: %s" % infile +print "Window:" +print "- upper-left: %d x %d" % (inxoff, inyoff) +print "- dimensions: %d x %d" % (inxsize, inysize) + +ds = gdal.Open(infile, gdalc.GA_ReadOnly); +if ds is None: + sys.exit('Cannot open input file: ' + str(infile)) + +xsize = ds.RasterXSize +ysize = ds.RasterYSize +print "=== RASTER ===" +print "- dimensions: %d x %d" % (xsize, ysize) + +if inxsize > xsize or inysize > ysize or inxoff > xsize or inyoff > ysize: + print "Invalid size of input window" + sys.exit(1) + +gt = ds.GetGeoTransform() +res = ( gt[1], gt[5] ) # X/Y pixel resolution +ulp = ( gt[0], gt[3] ) # X/Y upper left pixel corner +rot = ( gt[2], gt[4] ) # X-/Y-axis rotation + +if is_georeferenced(gt): + print "- pixel size:", res + print "- upper left:", ulp + print "- rotation :", rot +else: + print "No georeferencing is available" + sys.exit(1) + +print "=== WINDOW ===" +print "- upper-left :", calculate_corner(gt, inxoff, inyoff) +print "- lower-left :", calculate_corner(gt, inxoff, ysize) +print "- upper-right:", calculate_corner(gt, xsize, inyoff) +print "- lower-right:", calculate_corner(gt, xsize, ysize) +print "- center :", calculate_corner(gt, xsize/2, ysize/2) diff -Nru postgis-1.5.3/raster/test/Makefile.in postgis-2.0.1/raster/test/Makefile.in --- postgis-1.5.3/raster/test/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/Makefile.in 2012-03-21 21:36:59.000000000 +0000 @@ -0,0 +1,28 @@ +############################################################################# +# $Id$ +# +# Copyright (c) 2009 Mateusz Loskot +# +# This is free software; you can redistribute and/or modify it under +# the terms of the GNU General Public Licence. See the COPYING file. +# +############################################################################# + +RT_CORE=../rt_core + +all: check + +core-check: + $(MAKE) -C core check + +check: core-check + $(MAKE) -C regress check + +clean: + $(MAKE) -C core $@ + $(MAKE) -C regress $@ + +distclean: clean + $(MAKE) -C core $@ + $(MAKE) -C regress $@ + rm -f Makefile diff -Nru postgis-1.5.3/raster/test/core/Makefile.in postgis-2.0.1/raster/test/core/Makefile.in --- postgis-1.5.3/raster/test/core/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/core/Makefile.in 2012-03-21 21:36:59.000000000 +0000 @@ -0,0 +1,72 @@ +############################################################################# +# $Id$ +# +# Copyright (c) 2012 Regents of the University of California +# +# Copyright (c) 2009 Sandro Santilli +# +# This is free software; you can redistribute and/or modify it under +# the terms of the GNU General Public Licence. See the COPYING file. +# +############################################################################# + +# Filenames with extension as determined by the OS +TESTAPI=testapi@EXESUFFIX@ +TESTWKB=testwkb@EXESUFFIX@ + +RT_CORE=../../rt_core + +LIBLWGEOM_LDFLAGS=../../../liblwgeom/.libs/liblwgeom.a +LIBLWGEOM_CFLAGS=-I../../../liblwgeom +LIBGDAL_CFLAGS=@LIBGDAL_CFLAGS@ +LIBGDAL_LDFLAGS=@LIBGDAL_LDFLAGS@ +PROJ_CFLAGS=@PROJ_CPPFLAGS@ +GEOS_CFLAGS=@GEOS_CPPFLAGS@ +GEOS_LDFLAGS=@GEOS_LDFLAGS@ -lgeos_c + +RTCORE_CFLAGS=-I$(RT_CORE) +RTCORE_LDFLAGS=$(RT_CORE)/librtcore.a + +CC=@CC@ +CFLAGS = \ + @CFLAGS@ @PICFLAGS@ @WARNFLAGS@ \ + $(RTCORE_CFLAGS) \ + $(LIBLWGEOM_CFLAGS) \ + $(PROJ_CFLAGS) \ + $(LIBGDAL_CFLAGS) \ + $(GEOS_CFLAGS) + +LDFLAGS = \ + $(RTCORE_LDFLAGS) \ + $(LIBLWGEOM_LDFLAGS) \ + $(LIBGDAL_LDFLAGS) \ + $(GEOS_LDFLAGS) \ + -lm \ + +all: $(TESTAPI) $(TESTWKB) + +check: $(RT_CORE)/librtcore.a $(TESTAPI) $(TESTWKB) + ./testapi + ./testwkb + +testapi.o: testapi.c + $(CC) $(CFLAGS) -c $< + +$(TESTAPI): testapi.o $(RT_CORE)/librtcore.a + $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@ + +testwkb.o: testwkb.c + $(CC) $(CFLAGS) -c $< + +$(TESTWKB): testwkb.o $(RT_CORE)/librtcore.a + $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@ + +$(RT_CORE)/librtcore.a: + $(MAKE) -C ../../rt_core + +clean: + rm -rf .libs + rm -f *.o $(TESTAPI) $(TESTWKB) + +distclean: clean + rm -f Makefile diff -Nru postgis-1.5.3/raster/test/core/check.h postgis-2.0.1/raster/test/core/check.h --- postgis-1.5.3/raster/test/core/check.h 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/core/check.h 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,66 @@ +/* + * $Id: check.h 9324 2012-02-27 22:08:12Z pramsey $ + * + * WKTRaster - Raster Types for PostGIS + * http://www.postgis.org/support/wiki/index.php?WKTRasterHomePage + * + * Copyright (C) 2009 Sandro Santilli + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ +#define FLT_DIG_PRINTF FLT_DIG + 6 +#define DBL_DIG_PRINTF DBL_DIG + 6 + +#ifndef DOUBLE_EQ +#define DOUBLE_EQ(obt, exp, epsilon) \ + ((((obt) - (exp)) <= (epsilon)) && (((obt) - (exp)) >= -(epsilon))) +#endif + +#ifndef FLOAT_EQ +#define FLOAT_EQ(obt, exp, epsilon) \ + ((((obt) - (exp)) <= (epsilon)) && (((obt) - (exp)) >= -(epsilon))) +#endif + +#define CHECK(exp) { if ( !exp ) { \ + fprintf(stderr, "Check failed on line %d\n", __LINE__); \ + exit(EXIT_FAILURE); } } + +/* FIXME: Macro uses C99 integral type, might be not portable */ +#define CHECK_EQUALS(obt, exp) { if ( (long long)obt != (long long)exp ) { \ + fprintf(stderr, "Check failed on line %d\n", __LINE__); \ + fprintf(stderr, "\tactual = %lld, expected = %lld\n", (long long)obt, (long long)exp ); \ + exit(EXIT_FAILURE); } } + +#define CHECK_EQUALS_FLOAT_EX(obt, exp, eps) { if ( !FLOAT_EQ(obt, exp, eps) ) { \ + fprintf(stderr, "Check failed on line %d\n", __LINE__); \ + fprintf(stderr, "\tactual = %.*g, expected = %.*g\n", FLT_DIG_PRINTF, obt, FLT_DIG_PRINTF, exp ); \ + exit(EXIT_FAILURE); } } + +#define CHECK_EQUALS_FLOAT(obt, exp) { if ( !FLOAT_EQ(obt, exp, FLT_EPSILON) ) { \ + fprintf(stderr, "Check failed on line %d\n", __LINE__); \ + fprintf(stderr, "\tactual = %.*g, expected = %.*g\n", FLT_DIG_PRINTF, obt, FLT_DIG_PRINTF, exp ); \ + exit(EXIT_FAILURE); } } + + +#define CHECK_EQUALS_DOUBLE_EX(obt, exp, eps) { if ( !DOUBLE_EQ(obt, exp, eps) ) { \ + fprintf(stderr, "Check failed on line %d\n", __LINE__); \ + fprintf(stderr, "\tactual = %.*g, expected = %.*g\n", DBL_DIG_PRINTF, obt, DBL_DIG_PRINTF, exp ); \ + exit(EXIT_FAILURE); } } + +#define CHECK_EQUALS_DOUBLE(obt, exp) { if ( !DOUBLE_EQ(obt, exp, DBL_EPSILON) ) { \ + fprintf(stderr, "Check failed on line %d\n", __LINE__); \ + fprintf(stderr, "\tactual = %.*g, expected = %.*g\n", DBL_DIG_PRINTF, obt, DBL_DIG_PRINTF, exp ); \ + exit(EXIT_FAILURE); } } diff -Nru postgis-1.5.3/raster/test/core/testapi.c postgis-2.0.1/raster/test/core/testapi.c --- postgis-1.5.3/raster/test/core/testapi.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/core/testapi.c 2012-06-21 20:17:50.000000000 +0000 @@ -0,0 +1,2890 @@ +#include +#include +#include + +#include "rt_api.h" +#include "check.h" + +static char * +lwgeom_to_text(const LWGEOM *lwgeom) { + char *wkt; + size_t wkt_size; + + wkt = lwgeom_to_wkt(lwgeom, WKT_ISO, DBL_DIG, &wkt_size); + + return wkt; +} + +static rt_band +addBand(rt_raster raster, rt_pixtype pixtype, int hasnodata, double nodataval) +{ + void* mem; + int32_t bandNum; + size_t datasize; + uint16_t width = rt_raster_get_width(raster); + uint16_t height = rt_raster_get_height(raster); + + datasize = rt_pixtype_size(pixtype)*width*height; + mem = rtalloc(datasize); + + rt_band band = rt_band_new_inline(width, height, + pixtype, hasnodata, nodataval, mem); + assert(band); + bandNum = rt_raster_add_band(raster, band, 100); + assert(bandNum>=0); + return band; +} + +static void +deepRelease(rt_raster raster) +{ + uint16_t i, nbands=rt_raster_get_num_bands(raster); + for (i=0; imin, 1); + CHECK_EQUALS(stats->max, 198); + + quantile = (rt_quantile) rt_band_get_quantiles(stats, NULL, 0, &count); + CHECK(quantile); + rtdealloc(quantile); + + histogram = (rt_histogram) rt_band_get_histogram(stats, 0, NULL, 0, 0, 0, 0, &count); + CHECK(histogram); + rtdealloc(histogram); + + histogram = (rt_histogram) rt_band_get_histogram(stats, 0, NULL, 0, 1, 0, 0, &count); + CHECK(histogram); + rtdealloc(histogram); + + histogram = (rt_histogram) rt_band_get_histogram(stats, 0, bin_width, 1, 0, 0, 0, &count); + CHECK(histogram); + rtdealloc(histogram); + + rtdealloc(stats->values); + rtdealloc(stats); + + stats = (rt_bandstats) rt_band_get_summary_stats(band, 1, 0.1, 1, NULL, NULL, NULL); + CHECK(stats); + + quantile = (rt_quantile) rt_band_get_quantiles(stats, NULL, 0, &count); + CHECK(quantile); + rtdealloc(quantile); + + quantile = (rt_quantile) rt_band_get_quantiles(stats, quantiles, 5, &count); + CHECK(quantile); + CHECK((count == 5)); + rtdealloc(quantile); + + histogram = (rt_histogram) rt_band_get_histogram(stats, 0, NULL, 0, 0, 0, 0, &count); + CHECK(histogram); + rtdealloc(histogram); + + rtdealloc(stats->values); + rtdealloc(stats); + + stats = (rt_bandstats) rt_band_get_summary_stats(band, 1, 0.15, 0, NULL, NULL, NULL); + CHECK(stats); + rtdealloc(stats); + + stats = (rt_bandstats) rt_band_get_summary_stats(band, 1, 0.2, 0, NULL, NULL, NULL); + CHECK(stats); + rtdealloc(stats); + + stats = (rt_bandstats) rt_band_get_summary_stats(band, 1, 0.25, 0, NULL, NULL, NULL); + CHECK(stats); + rtdealloc(stats); + + stats = (rt_bandstats) rt_band_get_summary_stats(band, 0, 0, 1, NULL, NULL, NULL); + CHECK(stats); + CHECK_EQUALS(stats->min, 0); + CHECK_EQUALS(stats->max, 198); + + quantile = (rt_quantile) rt_band_get_quantiles(stats, NULL, 0, &count); + CHECK(quantile); + rtdealloc(quantile); + + rtdealloc(stats->values); + rtdealloc(stats); + + stats = (rt_bandstats) rt_band_get_summary_stats(band, 0, 0.1, 1, NULL, NULL, NULL); + CHECK(stats); + + quantile = (rt_quantile) rt_band_get_quantiles(stats, NULL, 0, &count); + CHECK(quantile); + rtdealloc(quantile); + + rtdealloc(stats->values); + rtdealloc(stats); + + deepRelease(raster); + + xmax = 4; + ymax = 4; + raster = rt_raster_new(4, 4); + assert(raster); + band = addBand(raster, PT_8BUI, 0, 0); + CHECK(band); + rt_band_set_nodata(band, 0); + + for (x = 0; x < xmax; x++) { + for (y = 0; y < ymax; y++) { + rtn = rt_band_set_pixel(band, x, y, values[(x * ymax) + y]); + CHECK((rtn != -1)); + } + } + + nodata = rt_band_get_nodata(band); + CHECK_EQUALS(nodata, 0); + + quantile = (rt_quantile) rt_band_get_quantiles_stream( + band, 1, 1, 15, + &qlls, &qlls_count, + quantiles2, 1, + &count); + CHECK(quantile); + CHECK(count); + CHECK((qlls_count > 0)); + CHECK(FLT_EQ(quantile[0].value, 78)); + rtdealloc(quantile); + quantile_llist_destroy(&qlls, qlls_count); + qlls = NULL; + qlls_count = 0; + + deepRelease(raster); + + xmax = 100; + ymax = 100; + raster = rt_raster_new(xmax, ymax); + assert(raster); + band = addBand(raster, PT_64BF, 0, 0); + CHECK(band); + rt_band_set_nodata(band, 0); + + for (x = 0; x < xmax; x++) { + for (y = 0; y < ymax; y++) { + rtn = rt_band_set_pixel(band, x, y, (((double) x * y) + (x + y) + (x + y * x)) / (x + y + 1)); + CHECK((rtn != -1)); + } + } + + nodata = rt_band_get_nodata(band); + CHECK_EQUALS(nodata, 0); + + max_run = 5; + for (x = 0; x < max_run; x++) { + quantile = (rt_quantile) rt_band_get_quantiles_stream( + band, 1, 1, xmax * ymax * max_run, + &qlls, &qlls_count, + quantiles2, 1, + &count); + CHECK(quantile); + CHECK(count); + CHECK((qlls_count > 0)); + rtdealloc(quantile); + } + + quantile_llist_destroy(&qlls, qlls_count); + qlls = NULL; + qlls_count = 0; + + deepRelease(raster); +} + +static void testRasterReplaceBand() { + rt_raster raster; + rt_band band; + rt_band rband; + void* mem; + size_t datasize; + uint16_t width; + uint16_t height; + double nodata; + + raster = rt_raster_new(10, 10); + assert(raster); /* or we're out of virtual memory */ + band = addBand(raster, PT_8BUI, 0, 0); + CHECK(band); + band = addBand(raster, PT_8BUI, 1, 255); + CHECK(band); + + width = rt_raster_get_width(raster); + height = rt_raster_get_height(raster); + + datasize = rt_pixtype_size(PT_8BUI) * width * height; + mem = rtalloc(datasize); + band = rt_band_new_inline(width, height, PT_8BUI, 1, 1, mem); + assert(band); + + rband = rt_raster_replace_band(raster, band, 0); + CHECK(rband); + nodata = rt_band_get_nodata(rt_raster_get_band(raster, 0)); + CHECK((nodata == 1)); + + deepRelease(raster); + + mem = rt_band_get_data(rband); + rt_band_destroy(rband); + if (mem) rtdealloc(mem); +} + +static void testBandReclass() { + rt_reclassexpr *exprset; + + rt_raster raster; + rt_band band; + uint16_t x; + uint16_t y; + double nodata; + int cnt = 2; + int i = 0; + int rtn; + rt_band newband; + double val; + void *mem = NULL; + + raster = rt_raster_new(100, 10); + assert(raster); /* or we're out of virtual memory */ + band = addBand(raster, PT_16BUI, 0, 0); + CHECK(band); + rt_band_set_nodata(band, 0); + + for (x = 0; x < 100; x++) { + for (y = 0; y < 10; y++) { + rtn = rt_band_set_pixel(band, x, y, x * y + (x + y)); + CHECK((rtn != -1)); + } + } + + nodata = rt_band_get_nodata(band); + CHECK_EQUALS(nodata, 0); + + exprset = rtalloc(cnt * sizeof(rt_reclassexpr)); + assert(exprset); + + for (i = 0; i < cnt; i++) { + exprset[i] = rtalloc(sizeof(struct rt_reclassexpr_t)); + assert(exprset[i]); + + if (i == 0) { + /* nodata */ + exprset[i]->src.min = 0; + exprset[i]->src.inc_min = 0; + exprset[i]->src.exc_min = 0; + + exprset[i]->src.max = 0; + exprset[i]->src.inc_max = 0; + exprset[i]->src.exc_max = 0; + + exprset[i]->dst.min = 0; + exprset[i]->dst.max = 0; + } + else { + /* range */ + exprset[i]->src.min = 0; + exprset[i]->src.inc_min = 0; + exprset[i]->src.exc_min = 0; + + exprset[i]->src.max = 1000; + exprset[i]->src.inc_max = 1; + exprset[i]->src.exc_max = 0; + + exprset[i]->dst.min = 1; + exprset[i]->dst.max = 255; + } + } + + newband = rt_band_reclass(band, PT_8BUI, 0, 0, exprset, cnt); + CHECK(newband); + + rtn = rt_band_get_pixel(newband, 0, 0, &val); + CHECK((rtn != -1)); + CHECK_EQUALS(val, 0); + + rtn = rt_band_get_pixel(newband, 49, 5, &val); + CHECK((rtn != -1)); + CHECK_EQUALS(val, 77); + + rtn = rt_band_get_pixel(newband, 99, 9, &val); + CHECK((rtn != -1)); + CHECK_EQUALS(val, 255); + + for (i = cnt - 1; i >= 0; i--) rtdealloc(exprset[i]); + rtdealloc(exprset); + deepRelease(raster); + + mem = rt_band_get_data(newband); + if (mem) rtdealloc(mem); + rt_band_destroy(newband); +} + +static void testGDALDrivers() { + int i; + uint32_t size; + rt_gdaldriver drv; + + drv = (rt_gdaldriver) rt_raster_gdal_drivers(&size, 1); + /*printf("size: %d\n", size);*/ + CHECK(drv); + + for (i = 0; i < size; i++) { + /*printf("gdal_driver: %s\n", drv[i].short_name);*/ + CHECK(drv[i].short_name); + rtdealloc(drv[i].short_name); + rtdealloc(drv[i].long_name); + rtdealloc(drv[i].create_options); + } + + rtdealloc(drv); +} + +static void testRasterToGDAL() { + rt_raster raster; + rt_band band; + uint32_t x; + uint32_t xmax = 100; + uint32_t y; + uint32_t ymax = 100; + int rtn = 0; + char srs[] = "PROJCS[\"unnamed\",GEOGCS[\"unnamed ellipse\",DATUM[\"unknown\",SPHEROID[\"unnamed\",6370997,0]],PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433]],PROJECTION[\"Lambert_Azimuthal_Equal_Area\"],PARAMETER[\"latitude_of_center\",45],PARAMETER[\"longitude_of_center\",-100],PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],UNIT[\"Meter\",1],AUTHORITY[\"EPSG\",\"2163\"]]"; + + uint64_t gdalSize; + uint8_t *gdal = NULL; + + raster = rt_raster_new(xmax, ymax); + assert(raster); /* or we're out of virtual memory */ + band = addBand(raster, PT_64BF, 0, 0); + CHECK(band); + rt_band_set_nodata(band, 0); + + rt_raster_set_offsets(raster, -500000, 600000); + rt_raster_set_scale(raster, 1000, -1000); + + for (x = 0; x < xmax; x++) { + for (y = 0; y < ymax; y++) { + rtn = rt_band_set_pixel(band, x, y, (((double) x * y) + (x + y) + (x + y * x)) / (x + y + 1)); + CHECK((rtn != -1)); + } + } + + gdal = rt_raster_to_gdal(raster, srs, "GTiff", NULL, &gdalSize); + /*printf("gdalSize: %d\n", (int) gdalSize);*/ + CHECK(gdalSize); + + /* + FILE *fh = NULL; + fh = fopen("/tmp/out.tif", "w"); + fwrite(gdal, sizeof(uint8_t), gdalSize, fh); + fclose(fh); + */ + + if (gdal) CPLFree(gdal); + + deepRelease(raster); + + raster = rt_raster_new(xmax, ymax); + assert(raster); /* or we're out of virtual memory */ + band = addBand(raster, PT_8BSI, 0, 0); + CHECK(band); + rt_band_set_nodata(band, 0); + + rt_raster_set_offsets(raster, -500000, 600000); + rt_raster_set_scale(raster, 1000, -1000); + + for (x = 0; x < xmax; x++) { + for (y = 0; y < ymax; y++) { + rtn = rt_band_set_pixel(band, x, y, x); + CHECK((rtn != -1)); + } + } + + /* add check that band isn't NODATA */ + CHECK((rt_band_check_is_nodata(band) == FALSE)); + + gdal = rt_raster_to_gdal(raster, srs, "PNG", NULL, &gdalSize); + /*printf("gdalSize: %d\n", (int) gdalSize);*/ + CHECK(gdalSize); + + if (gdal) CPLFree(gdal); + + deepRelease(raster); +} + +static void testValueCount() { + rt_valuecount vcnts = NULL; + + rt_raster raster; + rt_band band; + uint32_t x; + uint32_t xmax = 100; + uint32_t y; + uint32_t ymax = 100; + uint32_t rtn = 0; + + double count[] = {3, 4, 5}; + + raster = rt_raster_new(xmax, ymax); + assert(raster); /* or we're out of virtual memory */ + band = addBand(raster, PT_64BF, 0, 0); + CHECK(band); + rt_band_set_nodata(band, 0); + + for (x = 0; x < xmax; x++) { + for (y = 0; y < ymax; y++) { + rtn = rt_band_set_pixel(band, x, y, (((double) x * y) + (x + y) + (x + y * x)) / (x + y + 1)); + CHECK((rtn != -1)); + } + } + vcnts = rt_band_get_value_count(band, 1, NULL, 0, 0, NULL, &rtn); + CHECK(vcnts); + CHECK((rtn > 0)); + rtdealloc(vcnts); + + vcnts = rt_band_get_value_count(band, 1, NULL, 0, 0.01, NULL, &rtn); + CHECK(vcnts); + CHECK((rtn > 0)); + rtdealloc(vcnts); + + vcnts = rt_band_get_value_count(band, 1, NULL, 0, 0.1, NULL, &rtn); + CHECK(vcnts); + CHECK((rtn > 0)); + rtdealloc(vcnts); + + vcnts = rt_band_get_value_count(band, 1, NULL, 0, 1, NULL, &rtn); + CHECK(vcnts); + CHECK((rtn > 0)); + rtdealloc(vcnts); + + vcnts = rt_band_get_value_count(band, 1, NULL, 0, 10, NULL, &rtn); + CHECK(vcnts); + CHECK((rtn > 0)); + rtdealloc(vcnts); + + vcnts = rt_band_get_value_count(band, 1, count, 3, 1, NULL, &rtn); + CHECK(vcnts); + CHECK((rtn > 0)); + rtdealloc(vcnts); + + deepRelease(raster); +} + +static void testGDALToRaster() { + rt_raster raster; + rt_raster rast; + rt_band band; + const uint32_t xmax = 100; + const uint32_t ymax = 100; + uint32_t x; + uint32_t y; + int v; + double values[xmax][ymax]; + int rtn = 0; + double value; + + GDALDriverH gddrv = NULL; + GDALDatasetH gdds = NULL; + + raster = rt_raster_new(xmax, ymax); + assert(raster); /* or we're out of virtual memory */ + band = addBand(raster, PT_64BF, 0, 0); + CHECK(band); + rt_band_set_nodata(band, 0); + + for (x = 0; x < xmax; x++) { + for (y = 0; y < ymax; y++) { + values[x][y] = (((double) x * y) + (x + y) + (x + y * x)) / (x + y + 1); + rtn = rt_band_set_pixel(band, x, y, values[x][y]); + CHECK((rtn != -1)); + } + } + + gdds = rt_raster_to_gdal_mem(raster, NULL, NULL, 0, &gddrv); + CHECK(gddrv); + CHECK(gdds); + CHECK((GDALGetRasterXSize(gdds) == xmax)); + CHECK((GDALGetRasterYSize(gdds) == ymax)); + + rast = rt_raster_from_gdal_dataset(gdds); + CHECK(rast); + CHECK((rt_raster_get_num_bands(rast) == 1)); + + band = rt_raster_get_band(rast, 0); + CHECK(band); + + for (x = 0; x < xmax; x++) { + for (y = 0; y < ymax; y++) { + rtn = rt_band_get_pixel(band, x, y, &value); + CHECK((rtn != -1)); + CHECK(FLT_EQ(value, values[x][y])); + } + } + + GDALClose(gdds); + + deepRelease(rast); + deepRelease(raster); + + raster = rt_raster_new(xmax, ymax); + assert(raster); /* or we're out of virtual memory */ + band = addBand(raster, PT_8BSI, 0, 0); + CHECK(band); + rt_band_set_nodata(band, 0); + + v = -127; + for (x = 0; x < xmax; x++) { + for (y = 0; y < ymax; y++) { + values[x][y] = v++; + rtn = rt_band_set_pixel(band, x, y, values[x][y]); + CHECK((rtn != -1)); + if (v == 128) + v = -127; + } + } + + gdds = rt_raster_to_gdal_mem(raster, NULL, NULL, 0, &gddrv); + CHECK(gddrv); + CHECK(gdds); + CHECK((GDALGetRasterXSize(gdds) == xmax)); + CHECK((GDALGetRasterYSize(gdds) == ymax)); + + rast = rt_raster_from_gdal_dataset(gdds); + CHECK(rast); + CHECK((rt_raster_get_num_bands(rast) == 1)); + + band = rt_raster_get_band(rast, 0); + CHECK(band); + CHECK((rt_band_get_pixtype(band) == PT_16BSI)); + + for (x = 0; x < xmax; x++) { + for (y = 0; y < ymax; y++) { + rtn = rt_band_get_pixel(band, x, y, &value); + CHECK((rtn != -1)); + CHECK(FLT_EQ(value, values[x][y])); + } + } + + GDALClose(gdds); + + deepRelease(rast); + deepRelease(raster); +} + +static void testGDALWarp() { + rt_raster raster; + rt_raster rast; + rt_band band; + uint32_t x; + uint32_t xmax = 100; + uint32_t y; + uint32_t ymax = 100; + int rtn = 0; + double value = 0; + + char src_srs[] = "PROJCS[\"unnamed\",GEOGCS[\"unnamed ellipse\",DATUM[\"unknown\",SPHEROID[\"unnamed\",6370997,0]],PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433]],PROJECTION[\"Lambert_Azimuthal_Equal_Area\"],PARAMETER[\"latitude_of_center\",45],PARAMETER[\"longitude_of_center\",-100],PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],UNIT[\"Meter\",1],AUTHORITY[\"EPSG\",\"2163\"]]"; + + char dst_srs[] = "PROJCS[\"NAD83 / California Albers\",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[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],PROJECTION[\"Albers_Conic_Equal_Area\"],PARAMETER[\"standard_parallel_1\",34],PARAMETER[\"standard_parallel_2\",40.5],PARAMETER[\"latitude_of_center\",0],PARAMETER[\"longitude_of_center\",-120],PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",-4000000],AUTHORITY[\"EPSG\",\"3310\"],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH]]"; + + raster = rt_raster_new(xmax, ymax); + assert(raster); /* or we're out of virtual memory */ + band = addBand(raster, PT_64BF, 0, 0); + CHECK(band); + rt_band_set_nodata(band, 0); + + rt_raster_set_offsets(raster, -500000, 600000); + rt_raster_set_scale(raster, 1000, -1000); + + for (x = 0; x < xmax; x++) { + for (y = 0; y < ymax; y++) { + rtn = rt_band_set_pixel(band, x, y, (((double) x * y) + (x + y) + (x + y * x)) / (x + y + 1)); + CHECK((rtn != -1)); + } + } + + rast = rt_raster_gdal_warp( + raster, + src_srs, dst_srs, + NULL, NULL, + NULL, NULL, + NULL, NULL, + NULL, NULL, + NULL, NULL, + GRA_NearestNeighbour, -1 + ); + CHECK(rast); + CHECK((rt_raster_get_width(rast) == 122)); + CHECK((rt_raster_get_height(rast) == 116)); + CHECK((rt_raster_get_num_bands(rast) != 0)); + + band = rt_raster_get_band(rast, 0); + CHECK(band); + + CHECK(rt_band_get_hasnodata_flag(band)); + CHECK(FLT_EQ(rt_band_get_nodata(band), 0.)); + + CHECK(rt_band_get_pixel(band, 0, 0, &value) == 0); + CHECK(FLT_EQ(value, 0.)); + + deepRelease(rast); + deepRelease(raster); +} + +static void testComputeSkewedExtent() { + rt_envelope extent; + rt_raster rast; + double skew[2] = {0.25, 0.25}; + double scale[2] = {1, -1}; + + extent.MinX = 0; + extent.MaxY = 0; + extent.MaxX = 2; + extent.MinY = -2; + extent.UpperLeftX = extent.MinX; + extent.UpperLeftY = extent.MaxY; + + rast = rt_raster_compute_skewed_raster( + extent, + skew, + scale, + 0 + ); + + CHECK(rast); + CHECK((rt_raster_get_width(rast) == 2)); + CHECK((rt_raster_get_height(rast) == 3)); + CHECK(FLT_EQ(rt_raster_get_x_offset(rast), -0.5)); + CHECK(FLT_EQ(rt_raster_get_y_offset(rast), 0)); + + deepRelease(rast); +} + +static void testGDALRasterize() { + rt_raster raster; + char srs[] = "PROJCS[\"unnamed\",GEOGCS[\"unnamed ellipse\",DATUM[\"unknown\",SPHEROID[\"unnamed\",6370997,0]],PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433]],PROJECTION[\"Lambert_Azimuthal_Equal_Area\"],PARAMETER[\"latitude_of_center\",45],PARAMETER[\"longitude_of_center\",-100],PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],UNIT[\"Meter\",1],AUTHORITY[\"EPSG\",\"2163\"]]"; + const char wkb_hex[] = "010300000001000000050000000000000080841ec100000000600122410000000080841ec100000000804f22410000000040e81dc100000000804f22410000000040e81dc100000000600122410000000080841ec10000000060012241"; + const char *pos = wkb_hex; + unsigned char *wkb = NULL; + int wkb_len = 0; + int i; + double scale_x = 100; + double scale_y = -100; + + rt_pixtype pixtype[] = {PT_8BUI}; + double init[] = {0}; + double value[] = {1}; + double nodata[] = {0}; + uint8_t nodata_mask[] = {1}; + + /* hex to byte */ + wkb_len = (int) ceil(((double) strlen(wkb_hex)) / 2); + wkb = (unsigned char *) rtalloc(sizeof(unsigned char) * wkb_len); + for (i = 0; i < wkb_len; i++) { + sscanf(pos, "%2hhx", &wkb[i]); + pos += 2; + } + + raster = rt_raster_gdal_rasterize( + wkb, + wkb_len, srs, + 1, pixtype, + init, value, + nodata, nodata_mask, + NULL, NULL, + &scale_x, &scale_y, + NULL, NULL, + NULL, NULL, + NULL, NULL, + NULL + ); + + CHECK(raster); + CHECK((rt_raster_get_width(raster) == 100)); + CHECK((rt_raster_get_height(raster) == 100)); + CHECK((rt_raster_get_num_bands(raster) != 0)); + CHECK((rt_raster_get_x_offset(raster) == -500000)); + CHECK((rt_raster_get_y_offset(raster) == 600000)); + deepRelease(raster); + + rtdealloc(wkb); +} + +static void testIntersects() { + rt_raster rast1; + rt_raster rast2; + rt_band band1; + rt_band band2; + double nodata; + int rtn; + int intersects; + + /* + rast1 + + (-1, -1) + +-+-+ + |1|1| + +-+-+ + |1|1| + +-+-+ + (1, 1) + */ + rast1 = rt_raster_new(2, 2); + assert(rast1); + rt_raster_set_offsets(rast1, -1, -1); + + band1 = addBand(rast1, PT_8BUI, 1, 0); + CHECK(band1); + rt_band_set_nodata(band1, 0); + rtn = rt_band_set_pixel(band1, 0, 0, 1); + rtn = rt_band_set_pixel(band1, 0, 1, 1); + rtn = rt_band_set_pixel(band1, 1, 0, 1); + rtn = rt_band_set_pixel(band1, 1, 1, 1); + + nodata = rt_band_get_nodata(band1); + CHECK_EQUALS(nodata, 0); + + /* + rast2 + + (0, 0) + +-+-+ + |1|1| + +-+-+ + |1|1| + +-+-+ + (2, 2) + */ + rast2 = rt_raster_new(2, 2); + assert(rast2); + + band2 = addBand(rast2, PT_8BUI, 1, 0); + CHECK(band2); + rt_band_set_nodata(band2, 0); + rtn = rt_band_set_pixel(band2, 0, 0, 1); + rtn = rt_band_set_pixel(band2, 0, 1, 1); + rtn = rt_band_set_pixel(band2, 1, 0, 1); + rtn = rt_band_set_pixel(band2, 1, 1, 1); + + nodata = rt_band_get_nodata(band2); + CHECK_EQUALS(nodata, 0); + + rtn = rt_raster_intersects( + rast1, 0, + rast2, 0, + &intersects + ); + CHECK((rtn != 0)); + CHECK((intersects == 1)); + + rtn = rt_raster_intersects( + rast1, -1, + rast2, -1, + &intersects + ); + CHECK((rtn != 0)); + CHECK((intersects == 1)); + + /* + rast2 + + (0, 0) + +-+-+ + |0|1| + +-+-+ + |1|1| + +-+-+ + (2, 2) + */ + rtn = rt_band_set_pixel(band2, 0, 0, 0); + + rtn = rt_raster_intersects( + rast1, 0, + rast2, 0, + &intersects + ); + CHECK((rtn != 0)); + CHECK((intersects == 1)); + + /* + rast2 + + (0, 0) + +-+-+ + |1|0| + +-+-+ + |1|1| + +-+-+ + (2, 2) + */ + rtn = rt_band_set_pixel(band2, 0, 0, 1); + rtn = rt_band_set_pixel(band2, 1, 0, 0); + + rtn = rt_raster_intersects( + rast1, 0, + rast2, 0, + &intersects + ); + CHECK((rtn != 0)); + CHECK((intersects == 1)); + + /* + rast2 + + (0, 0) + +-+-+ + |0|0| + +-+-+ + |0|1| + +-+-+ + (2, 2) + */ + rtn = rt_band_set_pixel(band2, 0, 0, 0); + rtn = rt_band_set_pixel(band2, 1, 0, 0); + rtn = rt_band_set_pixel(band2, 0, 1, 0); + + rtn = rt_raster_intersects( + rast1, 0, + rast2, 0, + &intersects + ); + CHECK((rtn != 0)); + CHECK((intersects == 1)); + + /* + rast2 + + (0, 0) + +-+-+ + |0|0| + +-+-+ + |0|0| + +-+-+ + (2, 2) + */ + rtn = rt_band_set_pixel(band2, 0, 0, 0); + rtn = rt_band_set_pixel(band2, 1, 0, 0); + rtn = rt_band_set_pixel(band2, 0, 1, 0); + rtn = rt_band_set_pixel(band2, 1, 1, 0); + + rtn = rt_raster_intersects( + rast1, 0, + rast2, 0, + &intersects + ); + CHECK((rtn != 0)); + CHECK((intersects != 1)); + + /* + rast2 + + (2, 0) + +-+-+ + |1|1| + +-+-+ + |1|1| + +-+-+ + (4, 2) + */ + rt_raster_set_offsets(rast2, 2, 0); + + rtn = rt_band_set_pixel(band2, 0, 0, 1); + rtn = rt_band_set_pixel(band2, 1, 0, 1); + rtn = rt_band_set_pixel(band2, 0, 1, 1); + rtn = rt_band_set_pixel(band2, 1, 1, 1); + + rtn = rt_raster_intersects( + rast1, 0, + rast2, 0, + &intersects + ); + CHECK((rtn != 0)); + CHECK((intersects != 1)); + + /* + rast2 + + (0.1, 0.1) + +-+-+ + |1|1| + +-+-+ + |1|1| + +-+-+ + (0.9, 0.9) + */ + rt_raster_set_offsets(rast2, 0.1, 0.1); + rt_raster_set_scale(rast2, 0.4, 0.4); + + rtn = rt_band_set_pixel(band2, 0, 0, 1); + rtn = rt_band_set_pixel(band2, 1, 0, 1); + rtn = rt_band_set_pixel(band2, 0, 1, 1); + rtn = rt_band_set_pixel(band2, 1, 1, 1); + + rtn = rt_raster_intersects( + rast1, 0, + rast2, 0, + &intersects + ); + CHECK((rtn != 0)); + CHECK((intersects == 1)); + + /* + rast2 + + (-0.1, 0.1) + +-+-+ + |1|1| + +-+-+ + |1|1| + +-+-+ + (0.9, 0.9) + */ + rt_raster_set_offsets(rast2, -0.1, 0.1); + + rtn = rt_raster_intersects( + rast1, 0, + rast2, 0, + &intersects + ); + CHECK((rtn != 0)); + CHECK((intersects == 1)); + + deepRelease(rast2); + + /* + rast2 + + (0, 0) + +-+-+-+ + |1|1|1| + +-+-+-+ + |1|1|1| + +-+-+-+ + |1|1|1| + +-+-+-+ + (3, 3) + */ + rast2 = rt_raster_new(3, 3); + assert(rast2); + + band2 = addBand(rast2, PT_8BUI, 1, 0); + CHECK(band2); + rt_band_set_nodata(band2, 0); + rtn = rt_band_set_pixel(band2, 0, 0, 1); + rtn = rt_band_set_pixel(band2, 0, 1, 1); + rtn = rt_band_set_pixel(band2, 0, 2, 1); + rtn = rt_band_set_pixel(band2, 1, 0, 1); + rtn = rt_band_set_pixel(band2, 1, 1, 1); + rtn = rt_band_set_pixel(band2, 1, 2, 1); + rtn = rt_band_set_pixel(band2, 2, 0, 1); + rtn = rt_band_set_pixel(band2, 2, 1, 1); + rtn = rt_band_set_pixel(band2, 2, 2, 1); + + nodata = rt_band_get_nodata(band2); + CHECK_EQUALS(nodata, 0); + + rtn = rt_raster_intersects( + rast1, 0, + rast2, 0, + &intersects + ); + CHECK((rtn != 0)); + CHECK((intersects == 1)); + + /* + rast2 + + (-2, -2) + +-+-+-+ + |1|1|1| + +-+-+-+ + |1|1|1| + +-+-+-+ + |1|1|1| + +-+-+-+ + (1, 1) + */ + rt_raster_set_offsets(rast2, -2, -2); + + rtn = rt_band_set_pixel(band2, 0, 0, 1); + rtn = rt_band_set_pixel(band2, 0, 1, 1); + rtn = rt_band_set_pixel(band2, 0, 2, 1); + rtn = rt_band_set_pixel(band2, 1, 0, 1); + rtn = rt_band_set_pixel(band2, 1, 1, 1); + rtn = rt_band_set_pixel(band2, 1, 2, 1); + rtn = rt_band_set_pixel(band2, 2, 0, 1); + rtn = rt_band_set_pixel(band2, 2, 1, 1); + rtn = rt_band_set_pixel(band2, 2, 2, 1); + + rtn = rt_raster_intersects( + rast1, 0, + rast2, 0, + &intersects + ); + CHECK((rtn != 0)); + CHECK((intersects == 1)); + + /* + rast2 + + (-2, -2) + +-+-+-+ + |0|1|1| + +-+-+-+ + |1|0|1| + +-+-+-+ + |1|1|0| + +-+-+-+ + (1, 1) + */ + rtn = rt_band_set_pixel(band2, 0, 0, 0); + rtn = rt_band_set_pixel(band2, 0, 1, 1); + rtn = rt_band_set_pixel(band2, 0, 2, 1); + rtn = rt_band_set_pixel(band2, 1, 0, 1); + rtn = rt_band_set_pixel(band2, 1, 1, 0); + rtn = rt_band_set_pixel(band2, 1, 2, 1); + rtn = rt_band_set_pixel(band2, 2, 0, 1); + rtn = rt_band_set_pixel(band2, 2, 1, 1); + rtn = rt_band_set_pixel(band2, 2, 2, 0); + + rtn = rt_raster_intersects( + rast1, 0, + rast2, 0, + &intersects + ); + CHECK((rtn != 0)); + CHECK((intersects == 1)); + + /* + rast2 + + (-2, -2) + +-+-+-+ + |0|1|1| + +-+-+-+ + |1|0|0| + +-+-+-+ + |1|0|0| + +-+-+-+ + (1, 1) + */ + rtn = rt_band_set_pixel(band2, 0, 0, 0); + rtn = rt_band_set_pixel(band2, 0, 1, 1); + rtn = rt_band_set_pixel(band2, 0, 2, 1); + rtn = rt_band_set_pixel(band2, 1, 0, 1); + rtn = rt_band_set_pixel(band2, 1, 1, 0); + rtn = rt_band_set_pixel(band2, 1, 2, 0); + rtn = rt_band_set_pixel(band2, 2, 0, 1); + rtn = rt_band_set_pixel(band2, 2, 1, 0); + rtn = rt_band_set_pixel(band2, 2, 2, 0); + + rtn = rt_raster_intersects( + rast1, 0, + rast2, 0, + &intersects + ); + CHECK((rtn != 0)); + CHECK((intersects == 1)); + + /* + rast2 + + (-2, -2) + +-+-+-+ + |0|1|0| + +-+-+-+ + |1|0|0| + +-+-+-+ + |0|0|0| + +-+-+-+ + (1, 1) + */ + rtn = rt_band_set_pixel(band2, 0, 0, 0); + rtn = rt_band_set_pixel(band2, 0, 1, 1); + rtn = rt_band_set_pixel(band2, 0, 2, 0); + rtn = rt_band_set_pixel(band2, 1, 0, 1); + rtn = rt_band_set_pixel(band2, 1, 1, 0); + rtn = rt_band_set_pixel(band2, 1, 2, 0); + rtn = rt_band_set_pixel(band2, 2, 0, 0); + rtn = rt_band_set_pixel(band2, 2, 1, 0); + rtn = rt_band_set_pixel(band2, 2, 2, 0); + + rtn = rt_raster_intersects( + rast1, 0, + rast2, 0, + &intersects + ); + CHECK((rtn != 0)); + CHECK((intersects == 1)); + + deepRelease(rast2); + + /* skew tests */ + /* rast2 (skewed by -0.5, 0.5) */ + rast2 = rt_raster_new(3, 3); + assert(rast2); + rt_raster_set_skews(rast2, -0.5, 0.5); + + band2 = addBand(rast2, PT_8BUI, 1, 0); + CHECK(band2); + rt_band_set_nodata(band2, 0); + rtn = rt_band_set_pixel(band2, 0, 0, 1); + rtn = rt_band_set_pixel(band2, 0, 1, 2); + rtn = rt_band_set_pixel(band2, 0, 2, 3); + rtn = rt_band_set_pixel(band2, 1, 0, 1); + rtn = rt_band_set_pixel(band2, 1, 1, 2); + rtn = rt_band_set_pixel(band2, 1, 2, 3); + rtn = rt_band_set_pixel(band2, 2, 0, 1); + rtn = rt_band_set_pixel(band2, 2, 1, 2); + rtn = rt_band_set_pixel(band2, 2, 2, 3); + + rtn = rt_raster_intersects( + rast1, 0, + rast2, 0, + &intersects + ); + CHECK((rtn != 0)); + CHECK((intersects == 1)); + + /* rast2 (skewed by -1, 1) */ + rt_raster_set_skews(rast2, -1, 1); + + rtn = rt_raster_intersects( + rast1, 0, + rast2, 0, + &intersects + ); + CHECK((rtn != 0)); + CHECK((intersects == 1)); + + /* rast2 (skewed by 1, -1) */ + rt_raster_set_skews(rast2, 1, -1); + + rtn = rt_raster_intersects( + rast1, 0, + rast2, 0, + &intersects + ); + CHECK((rtn != 0)); + CHECK((intersects == 1)); + + deepRelease(rast2); + deepRelease(rast1); +} + +static void testAlignment() { + rt_raster rast1; + rt_raster rast2; + int rtn; + int aligned; + + rast1 = rt_raster_new(2, 2); + assert(rast1); + rt_raster_set_scale(rast1, 1, 1); + + rast2 = rt_raster_new(10, 10); + assert(rast2); + rt_raster_set_scale(rast2, 1, 1); + + rtn = rt_raster_same_alignment(rast1, rast2, &aligned); + CHECK((rtn != 0)); + CHECK((aligned != 0)); + + rt_raster_set_scale(rast2, 0.1, 0.1); + rtn = rt_raster_same_alignment(rast1, rast2, &aligned); + CHECK((rtn != 0)); + CHECK((aligned == 0)); + rt_raster_set_scale(rast2, 1, 1); + + rt_raster_set_skews(rast2, -0.5, 0.5); + rtn = rt_raster_same_alignment(rast1, rast2, &aligned); + CHECK((rtn != 0)); + CHECK((aligned == 0)); + rt_raster_set_skews(rast2, 0, 0); + + rt_raster_set_offsets(rast2, 1, 1); + rtn = rt_raster_same_alignment(rast1, rast2, &aligned); + CHECK((rtn != 0)); + CHECK((aligned != 0)); + + rt_raster_set_offsets(rast2, 2, 3); + rtn = rt_raster_same_alignment(rast1, rast2, &aligned); + CHECK((rtn != 0)); + CHECK((aligned != 0)); + + rt_raster_set_offsets(rast2, 0.1, 0.1); + rtn = rt_raster_same_alignment(rast1, rast2, &aligned); + CHECK((rtn != 0)); + CHECK((aligned == 0)); + + deepRelease(rast2); + deepRelease(rast1); +} + +static void testFromTwoRasters() { + rt_raster rast1; + rt_raster rast2; + rt_raster rast = NULL; + int err; + double offset[4] = {0.}; + + rast1 = rt_raster_new(4, 4); + assert(rast1); + rt_raster_set_scale(rast1, 1, 1); + rt_raster_set_offsets(rast1, -2, -2); + + rast2 = rt_raster_new(2, 2); + assert(rast2); + rt_raster_set_scale(rast2, 1, 1); + + rast = rt_raster_from_two_rasters( + rast1, rast2, + ET_FIRST, + &err, + offset + ); + CHECK((err != 0)); + CHECK(rast); + CHECK((rt_raster_get_width(rast) == 4)); + CHECK((rt_raster_get_height(rast) == 4)); + CHECK(FLT_EQ(offset[0], 0)); + CHECK(FLT_EQ(offset[1], 0)); + CHECK(FLT_EQ(offset[2], 2)); + CHECK(FLT_EQ(offset[3], 2)); + deepRelease(rast); + + rast = rt_raster_from_two_rasters( + rast1, rast2, + ET_SECOND, + &err, + offset + ); + CHECK((err != 0)); + CHECK(rast); + CHECK((rt_raster_get_width(rast) == 2)); + CHECK((rt_raster_get_height(rast) == 2)); + CHECK(FLT_EQ(offset[0], -2)); + CHECK(FLT_EQ(offset[1], -2)); + CHECK(FLT_EQ(offset[2], 0)); + CHECK(FLT_EQ(offset[3], 0)); + deepRelease(rast); + + rast = rt_raster_from_two_rasters( + rast1, rast2, + ET_INTERSECTION, + &err, + offset + ); + CHECK((err != 0)); + CHECK(rast); + CHECK((rt_raster_get_width(rast) == 2)); + CHECK((rt_raster_get_height(rast) == 2)); + CHECK(FLT_EQ(offset[0], -2)); + CHECK(FLT_EQ(offset[1], -2)); + CHECK(FLT_EQ(offset[2], 0)); + CHECK(FLT_EQ(offset[3], 0)); + deepRelease(rast); + + rast = rt_raster_from_two_rasters( + rast1, rast2, + ET_UNION, + &err, + offset + ); + CHECK((err != 0)); + CHECK(rast); + CHECK((rt_raster_get_width(rast) == 4)); + CHECK((rt_raster_get_height(rast) == 4)); + CHECK(FLT_EQ(offset[0], 0)); + CHECK(FLT_EQ(offset[1], 0)); + CHECK(FLT_EQ(offset[2], 2)); + CHECK(FLT_EQ(offset[3], 2)); + deepRelease(rast); + + rt_raster_set_scale(rast2, 1, 0.1); + rast = rt_raster_from_two_rasters( + rast1, rast2, + ET_UNION, + &err, + offset + ); + CHECK((err == 0)); + rt_raster_set_scale(rast2, 1, 1); + + rt_raster_set_srid(rast2, 9999); + rast = rt_raster_from_two_rasters( + rast1, rast2, + ET_UNION, + &err, + offset + ); + CHECK((err == 0)); + rt_raster_set_srid(rast2, 0); + + rt_raster_set_skews(rast2, -1, 1); + rast = rt_raster_from_two_rasters( + rast1, rast2, + ET_UNION, + &err, + offset + ); + CHECK((err == 0)); + + deepRelease(rast2); + deepRelease(rast1); +} + +static void testLoadOfflineBand() { + rt_raster rast; + rt_band band; + const int maxX = 10; + const int maxY = 10; + const char *path = "../regress/loader/testraster.tif"; + int rtn; + int x; + int y; + double val; + + rast = rt_raster_new(maxX, maxY); + assert(rast); + rt_raster_set_offsets(rast, 80, 80); + + band = rt_band_new_offline(maxX, maxY, PT_8BUI, 0, 0, 2, path); + assert(band); + rtn = rt_raster_add_band(rast, band, 0); + CHECK((rtn >= 0)); + + rtn = rt_band_load_offline_data(band); + CHECK((rtn == 0)); + CHECK(band->data.offline.mem); + + for (x = 0; x < maxX; x++) { + for (y = 0; y < maxY; y++) { + rtn = rt_band_get_pixel(band, x, y, &val); + CHECK((rtn == 0)); + CHECK(FLT_EQ(val, 255)); + } + } + + /* test rt_band_check_is_nodata */ + rtdealloc(band->data.offline.mem); + band->data.offline.mem = NULL; + CHECK((rt_band_check_is_nodata(band) == FALSE)); + + deepRelease(rast); +} + +static void testCellGeoPoint() { + rt_raster raster; + int rtn; + double xr, yr; + double xw, yw; + double gt[6] = {-128.604911499087763, 0.002424431085498, 0, 53.626968388905752, 0, -0.002424431085498}; + + raster = rt_raster_new(1, 1); + assert(raster); /* or we're out of virtual memory */ + rt_raster_set_srid(raster, 4326); + rt_raster_set_geotransform_matrix(raster, gt); + + xr = 0; + yr = 0; + rtn = rt_raster_cell_to_geopoint(raster, xr, yr, &xw, &yw, NULL); + CHECK((rtn != 0)); + CHECK(FLT_EQ(xw, gt[0])); + CHECK(FLT_EQ(yw, gt[3])); + + rtn = rt_raster_geopoint_to_cell(raster, xw, yw, &xr, &yr, NULL); + CHECK((rtn != 0)); + CHECK(FLT_EQ(xr, 0)); + CHECK(FLT_EQ(yr, 0)); + + deepRelease(raster); +} + +int +main() +{ + rt_raster raster; + rt_band band_1BB, band_2BUI, band_4BUI, + band_8BSI, band_8BUI, band_16BSI, band_16BUI, + band_32BSI, band_32BUI, band_32BF, + band_64BF; + + raster = rt_raster_new(256, 256); + assert(raster); /* or we're out of virtual memory */ + + printf("Checking empty and hasnoband functions...\n"); + { /* Check isEmpty and hasnoband */ + CHECK(!rt_raster_is_empty(raster)); + + /* Create a dummy empty raster to test the opposite + * to the previous sentence + */ + rt_raster emptyraster = rt_raster_new(0, 0); + CHECK(rt_raster_is_empty(emptyraster)); + rt_raster_destroy(emptyraster); + + /* Once we add a band to this raster, we'll check the opposite */ + CHECK(rt_raster_has_no_band(raster, 1)); + } + + + printf("Checking raster properties...\n"); + { /* Check scale */ + float scale; + scale = rt_raster_get_x_scale(raster); + CHECK_EQUALS(scale, 1); + scale = rt_raster_get_y_scale(raster); + CHECK_EQUALS(scale, 1); + } + + { /* Check offsets */ + float off; + + off = rt_raster_get_x_offset(raster); + CHECK_EQUALS(off, 0.5); + + off = rt_raster_get_y_offset(raster); + CHECK_EQUALS(off, 0.5); + + rt_raster_set_offsets(raster, 30, 70); + + off = rt_raster_get_x_offset(raster); + CHECK_EQUALS(off, 30); + + off = rt_raster_get_y_offset(raster); + CHECK_EQUALS(off, 70); + + rt_raster_set_offsets(raster, 0.5, 0.5); + } + + { /* Check skew */ + float off; + + off = rt_raster_get_x_skew(raster); + CHECK_EQUALS(off, 0); + + off = rt_raster_get_y_skew(raster); + CHECK_EQUALS(off, 0); + + rt_raster_set_skews(raster, 4, 5); + + off = rt_raster_get_x_skew(raster); + CHECK_EQUALS(off, 4); + + off = rt_raster_get_y_skew(raster); + CHECK_EQUALS(off, 5); + + rt_raster_set_skews(raster, 0, 0); + } + + { /* Check SRID */ + int32_t srid; + srid = rt_raster_get_srid(raster); + CHECK_EQUALS(srid, 0); + + rt_raster_set_srid(raster, 65546); + srid = rt_raster_get_srid(raster); + CHECK_EQUALS(srid, 65546); + } + + printf("Raster starts with %d bands\n", + rt_raster_get_num_bands(raster)); + + { /* Check convex hull, based on offset, scale and rotation */ + LWPOLY *convexhull; + POINTARRAY *ring; + POINT4D pt; + + /* will rotate the raster to see difference with the envelope */ + rt_raster_set_skews(raster, 4, 5); + + convexhull = rt_raster_get_convex_hull(raster); + CHECK_EQUALS(convexhull->srid, rt_raster_get_srid(raster)); + CHECK_EQUALS(convexhull->nrings, 1); + ring = convexhull->rings[0]; + CHECK(ring); + CHECK_EQUALS(ring->npoints, 5); + + getPoint4d_p(ring, 0, &pt); + printf("First point on convexhull ring is %g,%g\n", pt.x, pt.y); + CHECK_EQUALS_DOUBLE(pt.x, 0.5); + CHECK_EQUALS_DOUBLE(pt.y, 0.5); + + getPoint4d_p(ring, 1, &pt); + printf("Second point on convexhull ring is %g,%g\n", pt.x, pt.y); + CHECK_EQUALS_DOUBLE(pt.x, 256.5); + CHECK_EQUALS_DOUBLE(pt.y, 1280.5); + + getPoint4d_p(ring, 2, &pt); + printf("Third point on convexhull ring is %g,%g\n", pt.x, pt.y); + CHECK_EQUALS_DOUBLE(pt.x, 1280.5); + CHECK_EQUALS_DOUBLE(pt.y, 1536.5); + + getPoint4d_p(ring, 3, &pt); + printf("Fourth point on convexhull ring is %g,%g\n", pt.x, pt.y); + CHECK_EQUALS_DOUBLE(pt.x, 1024.5); + CHECK_EQUALS_DOUBLE(pt.y, 256.5); + + getPoint4d_p(ring, 4, &pt); + printf("Fifth point on convexhull ring is %g,%g\n", pt.x, pt.y); + CHECK_EQUALS_DOUBLE(pt.x, 0.5); + CHECK_EQUALS_DOUBLE(pt.y, 0.5); + + lwpoly_free(convexhull); + + rt_raster_set_skews(raster, 0, 0); + } + + printf("Testing rt_util_gdal_configured... "); + testGDALConfigured(); + printf("OK\n"); + + printf("Testing rt_raster_gdal_polygonize... "); + testGDALPolygonize(); + printf("OK\n"); + + printf("Testing 1BB band... "); + band_1BB = addBand(raster, PT_1BB, 0, 0); + testBand1BB(band_1BB); + printf("OK\n"); + + printf("Testing 2BB band... "); + band_2BUI = addBand(raster, PT_2BUI, 0, 0); + testBand2BUI(band_2BUI); + printf("OK\n"); + + printf("Testing 4BUI band... "); + band_4BUI = addBand(raster, PT_4BUI, 0, 0); + testBand4BUI(band_4BUI); + printf("OK\n"); + + printf("Testing 8BUI band... "); + band_8BUI = addBand(raster, PT_8BUI, 0, 0); + testBand8BUI(band_8BUI); + printf("OK\n"); + + printf("Testing 8BSI band... "); + band_8BSI = addBand(raster, PT_8BSI, 0, 0); + testBand8BSI(band_8BSI); + printf("OK\n"); + + printf("Testing 16BSI band... "); + band_16BSI = addBand(raster, PT_16BSI, 0, 0); + testBand16BSI(band_16BSI); + printf("OK\n"); + + printf("Testing 16BUI band... "); + band_16BUI = addBand(raster, PT_16BUI, 0, 0); + testBand16BUI(band_16BUI); + printf("OK\n"); + + printf("Testing 32BUI band... "); + band_32BUI = addBand(raster, PT_32BUI, 0, 0); + testBand32BUI(band_32BUI); + printf("OK\n"); + + printf("Testing 32BSI band... "); + band_32BSI = addBand(raster, PT_32BSI, 0, 0); + testBand32BSI(band_32BSI); + printf("OK\n"); + + printf("Testing 32BF band... "); + band_32BF = addBand(raster, PT_32BF, 0, 0); + testBand32BF(band_32BF); + printf("OK\n"); + + printf("Testing 64BF band... "); + band_64BF = addBand(raster, PT_64BF, 0, 0); + testBand64BF(band_64BF); + printf("OK\n"); + + printf("Testing band hasnodata flag... "); + testBandHasNoData(band_64BF); + printf("OK\n"); + + printf("Testing rt_raster_from_band... "); + testRasterFromBand(); + printf("OK\n"); + + printf("Testing band stats... "); + testBandStats(); + printf("OK\n"); + + printf("Testing rt_raster_replace_band... "); + testRasterReplaceBand(); + printf("OK\n"); + + printf("Testing rt_band_reclass... "); + testBandReclass(); + printf("OK\n"); + + printf("Testing rt_raster_to_gdal... "); + testRasterToGDAL(); + printf("OK\n"); + + printf("Testing rt_raster_gdal_drivers... "); + testGDALDrivers(); + printf("OK\n"); + + printf("Testing rt_band_get_value_count... "); + testValueCount(); + printf("OK\n"); + + printf("Testing rt_raster_from_gdal_dataset... "); + testGDALToRaster(); + printf("OK\n"); + + printf("Testing rt_util_compute_skewed_extent... "); + testComputeSkewedExtent(); + printf("OK\n"); + + printf("Testing rt_raster_gdal_warp... "); + testGDALWarp(); + printf("OK\n"); + + printf("Testing rt_raster_gdal_rasterize... "); + testGDALRasterize(); + printf("OK\n"); + + printf("Testing rt_raster_intersects... "); + testIntersects(); + printf("OK\n"); + + printf("Testing rt_raster_same_alignment... "); + testAlignment(); + printf("OK\n"); + + printf("Testing rt_raster_from_two_rasters... "); + testFromTwoRasters(); + printf("OK\n"); + + printf("Testing rt_raster_load_offline_band... "); + testLoadOfflineBand(); + printf("OK\n"); + + printf("Testing cell <-> geopoint... "); + testCellGeoPoint(); + printf("OK\n"); + + deepRelease(raster); + + return EXIT_SUCCESS; +} + +/* This is needed by liblwgeom */ +void +lwgeom_init_allocators(void) +{ + lwgeom_install_default_allocators(); +} + + +void rt_init_allocators(void) +{ + rt_install_default_allocators(); +} diff -Nru postgis-1.5.3/raster/test/core/testwkb.c postgis-2.0.1/raster/test/core/testwkb.c --- postgis-1.5.3/raster/test/core/testwkb.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/core/testwkb.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,810 @@ +/* + * $Id: testwkb.c 9324 2012-02-27 22:08:12Z pramsey $ + * + * WKTRaster - Raster Types for PostGIS + * http://www.postgis.org/support/wiki/index.php?WKTRasterHomePage + * + * Copyright (C) 2009 Sandro Santilli + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ +#include +#include +#include +#include +#include /* for fabs */ +#include /* for FLT_EPSILON and DBL_EPSILON */ + +#include "rt_api.h" +#include "check.h" + + +int +main() +{ + /* will use default allocators and message handlers */ + rt_raster raster = NULL; + const char *hexwkb = NULL; + const char *out = NULL; + uint32_t len = 0; + int i = 0; + + /* ------------------------------------------------------ */ + /* No bands, 7x8 - little endian */ + /* ------------------------------------------------------ */ + + hexwkb = +"01" /* little endian (uint8 ndr) */ +"0000" /* version (uint16 0) */ +"0000" /* nBands (uint16 0) */ +"000000000000F03F" /* scaleX (float64 1) */ +"0000000000000040" /* scaleY (float64 2) */ +"0000000000000840" /* ipX (float64 3) */ +"0000000000001040" /* ipY (float64 4) */ +"0000000000001440" /* skewX (float64 5) */ +"0000000000001840" /* skewY (float64 6) */ +"0A000000" /* SRID (int32 10) */ +"0700" /* width (uint16 7) */ +"0800" /* height (uint16 8) */ + ; + + raster = rt_raster_from_hexwkb(hexwkb, strlen(hexwkb)); + CHECK(raster); + CHECK_EQUALS(rt_raster_get_num_bands(raster), 0); + CHECK_EQUALS(rt_raster_get_x_scale(raster), 1); + CHECK_EQUALS(rt_raster_get_y_scale(raster), 2); + CHECK_EQUALS(rt_raster_get_x_offset(raster), 3); + CHECK_EQUALS(rt_raster_get_y_offset(raster), 4); + CHECK_EQUALS(rt_raster_get_x_skew(raster), 5); + CHECK_EQUALS(rt_raster_get_y_skew(raster), 6); + CHECK_EQUALS(rt_raster_get_srid(raster), 10); + CHECK_EQUALS(rt_raster_get_width(raster), 7); + CHECK_EQUALS(rt_raster_get_height(raster), 8); + + out = rt_raster_to_hexwkb(raster, &len); +/* + printf(" in hexwkb len: %d\n", strlen(hexwkb)); + printf("out hexwkb len: %d\n", len); + printf(" in hexwkb: %s\n", hexwkb); + printf("out hexwkb: %s\n", out); +*/ + CHECK_EQUALS(len, strlen(hexwkb)); +/* would depend on machine endian... + CHECK( ! strcmp(hexwkb, out) ); +*/ + free((/*no const*/ void*)out); + + { + void *serialized; + rt_raster rast2; + + serialized = rt_raster_serialize(raster); + rast2 = rt_raster_deserialize(serialized, FALSE); + + rt_raster_destroy(rast2); + free(serialized); + } + + rt_raster_destroy(raster); + + /* ------------------------------------------------------ */ + /* No bands, 7x8 - big endian */ + /* ------------------------------------------------------ */ + + hexwkb = +"00" /* big endian (uint8 xdr) */ +"0000" /* version (uint16 0) */ +"0000" /* nBands (uint16 0) */ +"3FF0000000000000" /* scaleX (float64 1) */ +"4000000000000000" /* scaleY (float64 2) */ +"4008000000000000" /* ipX (float64 3) */ +"4010000000000000" /* ipY (float64 4) */ +"4014000000000000" /* skewX (float64 5) */ +"4018000000000000" /* skewY (float64 6) */ +"0000000A" /* SRID (int32 10) */ +"0007" /* width (uint16 7) */ +"0008" /* height (uint16 8) */ + ; + + raster = rt_raster_from_hexwkb(hexwkb, strlen(hexwkb)); + CHECK(raster); + CHECK_EQUALS(rt_raster_get_num_bands(raster), 0); + CHECK_EQUALS(rt_raster_get_x_scale(raster), 1); + CHECK_EQUALS(rt_raster_get_y_scale(raster), 2); + CHECK_EQUALS(rt_raster_get_x_offset(raster), 3); + CHECK_EQUALS(rt_raster_get_y_offset(raster), 4); + CHECK_EQUALS(rt_raster_get_x_skew(raster), 5); + CHECK_EQUALS(rt_raster_get_y_skew(raster), 6); + CHECK_EQUALS(rt_raster_get_srid(raster), 10); + CHECK_EQUALS(rt_raster_get_width(raster), 7); + CHECK_EQUALS(rt_raster_get_height(raster), 8); + + out = rt_raster_to_hexwkb(raster, &len); + printf(" in hexwkb len: %u\n", (uint32_t) strlen(hexwkb)); + printf("out hexwkb len: %u\n", len); + printf(" in hexwkb: %s\n", hexwkb); + printf("out hexwkb: %s\n", out); + CHECK_EQUALS(len, strlen(hexwkb)); +/* would depend on machine endian... + CHECK( ! strcmp(hexwkb, out) ); +*/ + + rt_raster_destroy(raster); + free((/*no const*/ void*)out); + + /* ------------------------------------------------------ */ + /* 1x1, little endian, band0(1bb) */ + /* ------------------------------------------------------ */ + + hexwkb = +"01" /* little endian (uint8 ndr) */ +"0000" /* version (uint16 0) */ +"0100" /* nBands (uint16 1) */ +"000000000000F03F" /* scaleX (float64 1) */ +"0000000000000040" /* scaleY (float64 2) */ +"0000000000000840" /* ipX (float64 3) */ +"0000000000001040" /* ipY (float64 4) */ +"0000000000001440" /* skewX (float64 5) */ +"0000000000001840" /* skewY (float64 6) */ +"0A000000" /* SRID (int32 10) */ +"0100" /* width (uint16 1) */ +"0100" /* height (uint16 1) */ +"40" /* First band type (1BB, in memory, hasnodata) */ +"00" /* nodata value (0) */ +"01" /* pix(0,0) == 1 */ + ; + + raster = rt_raster_from_hexwkb(hexwkb, strlen(hexwkb)); + CHECK(raster); + CHECK_EQUALS(rt_raster_get_num_bands(raster), 1); + CHECK_EQUALS(rt_raster_get_x_scale(raster), 1); + CHECK_EQUALS(rt_raster_get_y_scale(raster), 2); + CHECK_EQUALS(rt_raster_get_x_offset(raster), 3); + CHECK_EQUALS(rt_raster_get_y_offset(raster), 4); + CHECK_EQUALS(rt_raster_get_x_skew(raster), 5); + CHECK_EQUALS(rt_raster_get_y_skew(raster), 6); + CHECK_EQUALS(rt_raster_get_srid(raster), 10); + CHECK_EQUALS(rt_raster_get_width(raster), 1); + CHECK_EQUALS(rt_raster_get_height(raster), 1); + { + double val; + int failure; + rt_band band = rt_raster_get_band(raster, 0); + CHECK(band); + CHECK_EQUALS(rt_band_get_pixtype(band), PT_1BB); + CHECK(!rt_band_is_offline(band)); + CHECK(rt_band_get_hasnodata_flag(band)); + CHECK_EQUALS(rt_band_get_nodata(band), 0); + failure = rt_band_get_pixel(band, 0, 0, &val); + CHECK(!failure); + CHECK_EQUALS(val, 1); + } + + out = rt_raster_to_hexwkb(raster, &len); + printf(" in hexwkb len: %u\n", (uint32_t) strlen(hexwkb)); + printf("out hexwkb len: %u\n", len); + CHECK_EQUALS(len, strlen(hexwkb)); +/* would depend on machine endian... + CHECK( ! strcmp(hexwkb, out) ); +*/ + + rt_raster_destroy(raster); + free((/*no const*/ void*)out); + + /* ------------------------------------------------------ */ + /* 3x2, big endian, band0(8BSI) */ + /* ------------------------------------------------------ */ + + hexwkb = +"01" /* little endian (uint8 ndr) */ +"0000" /* version (uint16 0) */ +"0100" /* nBands (uint16 1) */ +"000000000000F03F" /* scaleX (float64 1) */ +"0000000000000040" /* scaleY (float64 2) */ +"0000000000000840" /* ipX (float64 3) */ +"0000000000001040" /* ipY (float64 4) */ +"0000000000001440" /* skewX (float64 5) */ +"0000000000001840" /* skewY (float64 6) */ +"0A000000" /* SRID (int32 10) */ +"0300" /* width (uint16 3) */ +"0200" /* height (uint16 2) */ +"43" /* First band type (8BSI, in memory, hasnodata) */ +"FF" /* nodata value (-1) */ +"FF" /* pix(0,0) == -1 */ +"00" /* pix(1,0) == 0 */ +"01" /* pix(2,0) == 1 */ +"7F" /* pix(0,1) == 127 */ +"0A" /* pix(1,1) == 10 */ +"02" /* pix(2,1) == 2 */ + ; + + raster = rt_raster_from_hexwkb(hexwkb, strlen(hexwkb)); + CHECK(raster); + CHECK_EQUALS(rt_raster_get_num_bands(raster), 1); + CHECK_EQUALS(rt_raster_get_x_scale(raster), 1); + CHECK_EQUALS(rt_raster_get_y_scale(raster), 2); + CHECK_EQUALS(rt_raster_get_x_offset(raster), 3); + CHECK_EQUALS(rt_raster_get_y_offset(raster), 4); + CHECK_EQUALS(rt_raster_get_x_skew(raster), 5); + CHECK_EQUALS(rt_raster_get_y_skew(raster), 6); + CHECK_EQUALS(rt_raster_get_srid(raster), 10); + CHECK_EQUALS(rt_raster_get_width(raster), 3); + CHECK_EQUALS(rt_raster_get_height(raster), 2); + { + double val; + int failure; + + rt_band band = rt_raster_get_band(raster, 0); + CHECK(band); + CHECK_EQUALS(rt_band_get_pixtype(band), PT_8BSI); + CHECK(!rt_band_is_offline(band)); + CHECK(rt_band_get_hasnodata_flag(band)); + CHECK_EQUALS(rt_band_get_nodata(band), -1); + + failure = rt_band_get_pixel(band, 0, 0, &val); + CHECK(!failure); + CHECK_EQUALS(val, -1); + + failure = rt_band_get_pixel(band, 1, 0, &val); + CHECK(!failure); + CHECK_EQUALS(val, 0); + + failure = rt_band_get_pixel(band, 2, 0, &val); + CHECK(!failure); + CHECK_EQUALS(val, 1); + + failure = rt_band_get_pixel(band, 0, 1, &val); + CHECK(!failure); + CHECK_EQUALS(val, 127); + + failure = rt_band_get_pixel(band, 1, 1, &val); + CHECK(!failure); + CHECK_EQUALS(val, 10); + + failure = rt_band_get_pixel(band, 2, 1, &val); + CHECK(!failure); + CHECK_EQUALS(val, 2); + } + + out = rt_raster_to_hexwkb(raster, &len); + printf(" in hexwkb len: %u\n", (uint32_t) strlen(hexwkb)); + printf("out hexwkb len: %u\n", len); + CHECK_EQUALS(len, strlen(hexwkb)); +/* would depend on machine endian... + CHECK( ! strcmp(hexwkb, out) ); +*/ + + free((/*no const*/ void*)out); + + { + void *serialized; + rt_raster rast2; + + serialized = rt_raster_serialize(raster); + rast2 = rt_raster_deserialize(serialized, FALSE); + + rt_raster_destroy(rast2); + free(serialized); + + } + + rt_raster_destroy(raster); + + /* ------------------------------------------------------ */ + /* 3x2, little endian, band0(16BSI) */ + /* ------------------------------------------------------ */ + + hexwkb = +"01" /* little endian (uint8 ndr) */ +"0000" /* version (uint16 0) */ +"0100" /* nBands (uint16 1) */ +"000000000000F03F" /* scaleX (float64 1) */ +"0000000000000040" /* scaleY (float64 2) */ +"0000000000000840" /* ipX (float64 3) */ +"0000000000001040" /* ipY (float64 4) */ +"0000000000001440" /* skewX (float64 5) */ +"0000000000001840" /* skewY (float64 6) */ +"0A000000" /* SRID (int32 10) */ +"0300" /* width (uint16 3) */ +"0200" /* height (uint16 2) */ +"05" /* First band type (16BSI, in memory) */ +"FFFF" /* nodata value (-1) */ +"FFFF" /* pix(0,0) == -1 */ +"0000" /* pix(1,0) == 0 */ +"F0FF" /* pix(2,0) == -16 */ +"7F00" /* pix(0,1) == 127 */ +"0A00" /* pix(1,1) == 10 */ +"0200" /* pix(2,1) == 2 */ + ; + + raster = rt_raster_from_hexwkb(hexwkb, strlen(hexwkb)); + CHECK(raster); + CHECK_EQUALS(rt_raster_get_num_bands(raster), 1); + CHECK_EQUALS(rt_raster_get_x_scale(raster), 1); + CHECK_EQUALS(rt_raster_get_y_scale(raster), 2); + CHECK_EQUALS(rt_raster_get_x_offset(raster), 3); + CHECK_EQUALS(rt_raster_get_y_offset(raster), 4); + CHECK_EQUALS(rt_raster_get_x_skew(raster), 5); + CHECK_EQUALS(rt_raster_get_y_skew(raster), 6); + CHECK_EQUALS(rt_raster_get_srid(raster), 10); + CHECK_EQUALS(rt_raster_get_width(raster), 3); + CHECK_EQUALS(rt_raster_get_height(raster), 2); + { + double val; + int failure; + rt_band band = rt_raster_get_band(raster, 0); + CHECK(band); + CHECK_EQUALS(rt_band_get_pixtype(band), PT_16BSI); + CHECK(!rt_band_is_offline(band)); + CHECK(!rt_band_get_hasnodata_flag(band)); + CHECK_EQUALS(rt_band_get_nodata(band), -1); + + failure = rt_band_get_pixel(band, 0, 0, &val); + CHECK(!failure); + CHECK_EQUALS(val, -1); + + failure = rt_band_get_pixel(band, 1, 0, &val); + CHECK(!failure); + CHECK_EQUALS(val, 0); + + failure = rt_band_get_pixel(band, 2, 0, &val); + CHECK(!failure); + CHECK_EQUALS(val, -16); + + failure = rt_band_get_pixel(band, 0, 1, &val); + CHECK(!failure); + CHECK_EQUALS(val, 127); + + failure = rt_band_get_pixel(band, 1, 1, &val); + CHECK(!failure); + CHECK_EQUALS(val, 10); + + failure = rt_band_get_pixel(band, 2, 1, &val); + CHECK(!failure); + CHECK_EQUALS(val, 2); + } + + out = rt_raster_to_hexwkb(raster, &len); + printf(" in hexwkb len: %u\n", (uint32_t) strlen(hexwkb)); + printf("out hexwkb len: %u\n", len); + CHECK_EQUALS(len, strlen(hexwkb)); +/* would depend on machine endian + CHECK( ! strcmp(hexwkb, out) ); +*/ + + rt_raster_destroy(raster); + free((/*no const*/ void*)out); + + /* ------------------------------------------------------ */ + /* 3x2, big endian, band0(16BSI) */ + /* ------------------------------------------------------ */ + + hexwkb = +"00" /* big endian (uint8 xdr) */ +"0000" /* version (uint16 0) */ +"0001" /* nBands (uint16 1) */ +"3FF0000000000000" /* scaleX (float64 1) */ +"4000000000000000" /* scaleY (float64 2) */ +"4008000000000000" /* ipX (float64 3) */ +"4010000000000000" /* ipY (float64 4) */ +"4014000000000000" /* skewX (float64 5) */ +"4018000000000000" /* skewY (float64 6) */ +"0000000A" /* SRID (int32 10) */ +"0003" /* width (uint16 3) */ +"0002" /* height (uint16 2) */ +"05" /* First band type (16BSI, in memory) */ +"FFFF" /* nodata value (-1) */ +"FFFF" /* pix(0,0) == -1 */ +"0000" /* pix(1,0) == 0 */ +"FFF0" /* pix(2,0) == -16 */ +"007F" /* pix(0,1) == 127 */ +"000A" /* pix(1,1) == 10 */ +"0002" /* pix(2,1) == 2 */ + ; + + raster = rt_raster_from_hexwkb(hexwkb, strlen(hexwkb)); + CHECK(raster); + CHECK_EQUALS(rt_raster_get_num_bands(raster), 1); + CHECK_EQUALS(rt_raster_get_x_scale(raster), 1); + CHECK_EQUALS(rt_raster_get_y_scale(raster), 2); + CHECK_EQUALS(rt_raster_get_x_offset(raster), 3); + CHECK_EQUALS(rt_raster_get_y_offset(raster), 4); + CHECK_EQUALS(rt_raster_get_x_skew(raster), 5); + CHECK_EQUALS(rt_raster_get_y_skew(raster), 6); + CHECK_EQUALS(rt_raster_get_srid(raster), 10); + CHECK_EQUALS(rt_raster_get_width(raster), 3); + CHECK_EQUALS(rt_raster_get_height(raster), 2); + { + double val; + int failure; + rt_band band = rt_raster_get_band(raster, 0); + CHECK(band); + CHECK_EQUALS(rt_band_get_pixtype(band), PT_16BSI); + CHECK(!rt_band_is_offline(band)); + CHECK(!rt_band_get_hasnodata_flag(band)); + CHECK_EQUALS(rt_band_get_nodata(band), -1); + + failure = rt_band_get_pixel(band, 0, 0, &val); + CHECK(!failure); + CHECK_EQUALS(val, -1); + + failure = rt_band_get_pixel(band, 1, 0, &val); + CHECK(!failure); + CHECK_EQUALS(val, 0); + + failure = rt_band_get_pixel(band, 2, 0, &val); + CHECK(!failure); + CHECK_EQUALS(val, -16); + + failure = rt_band_get_pixel(band, 0, 1, &val); + CHECK(!failure); + CHECK_EQUALS(val, 127); + + failure = rt_band_get_pixel(band, 1, 1, &val); + CHECK(!failure); + CHECK_EQUALS(val, 10); + + failure = rt_band_get_pixel(band, 2, 1, &val); + CHECK(!failure); + CHECK_EQUALS(val, 2); + } + + out = rt_raster_to_hexwkb(raster, &len); + printf(" in hexwkb len: %u\n", (uint32_t) strlen(hexwkb)); + printf("out hexwkb len: %u\n", len); + CHECK_EQUALS(len, strlen(hexwkb)); +/* would depend on machine endian + CHECK( ! strcmp(hexwkb, out) ); +*/ + + rt_raster_destroy(raster); + free((/*no const*/ void*)out); + + /* ------------------------------------------------------ */ + /* 3x2, bit endian, band0(16BSI ext: 3;/tmp/t.tif) */ + /* ------------------------------------------------------ */ + + hexwkb = +"00" /* big endian (uint8 xdr) */ +"0000" /* version (uint16 0) */ +"0001" /* nBands (uint16 1) */ +"3FF0000000000000" /* scaleX (float64 1) */ +"4000000000000000" /* scaleY (float64 2) */ +"4008000000000000" /* ipX (float64 3) */ +"4010000000000000" /* ipY (float64 4) */ +"4014000000000000" /* skewX (float64 5) */ +"4018000000000000" /* skewY (float64 6) */ +"0000000A" /* SRID (int32 10) */ +"0003" /* width (uint16 3) */ +"0002" /* height (uint16 2) */ +"C5" /* First band type (16BSI, on disk, hasnodata) */ +"FFFF" /* nodata value (-1) */ +"03" /* ext band num == 3 */ +/* ext band path == /tmp/t.tif */ +"2F746D702F742E74696600" + ; + + raster = rt_raster_from_hexwkb(hexwkb, strlen(hexwkb)); + CHECK(raster); + CHECK_EQUALS(rt_raster_get_num_bands(raster), 1); + CHECK_EQUALS(rt_raster_get_x_scale(raster), 1); + CHECK_EQUALS(rt_raster_get_y_scale(raster), 2); + CHECK_EQUALS(rt_raster_get_x_offset(raster), 3); + CHECK_EQUALS(rt_raster_get_y_offset(raster), 4); + CHECK_EQUALS(rt_raster_get_x_skew(raster), 5); + CHECK_EQUALS(rt_raster_get_y_skew(raster), 6); + CHECK_EQUALS(rt_raster_get_srid(raster), 10); + CHECK_EQUALS(rt_raster_get_width(raster), 3); + CHECK_EQUALS(rt_raster_get_height(raster), 2); + { + rt_band band = rt_raster_get_band(raster, 0); + CHECK(band); + CHECK_EQUALS(rt_band_get_pixtype(band), PT_16BSI); + CHECK(rt_band_is_offline(band)); + CHECK(rt_band_get_hasnodata_flag(band)); + CHECK_EQUALS(rt_band_get_nodata(band), -1); + printf("ext band path: %s\n", rt_band_get_ext_path(band)); + printf("ext band num: %u\n", rt_band_get_ext_band_num(band)); + CHECK( ! strcmp(rt_band_get_ext_path(band), "/tmp/t.tif")); + CHECK_EQUALS(rt_band_get_ext_band_num(band), 3); + } + + out = rt_raster_to_hexwkb(raster, &len); + printf(" in hexwkb len: %u\n", (uint32_t) strlen(hexwkb)); + printf("out hexwkb len: %u\n", len); + CHECK_EQUALS(len, strlen(hexwkb)); +/* would depend on machine endian + CHECK( ! strcmp(hexwkb, out) ); +*/ + + rt_raster_destroy(raster); + free((/*no const*/ void*)out); + + /* ------------------------------------------------------ */ + /* 1x3, little endian, band0 16BSI, nodata 1, srid -1 */ + /* ------------------------------------------------------ */ + + hexwkb = +"01" /* little endian (uint8 ndr) */ +"0000" /* version (uint16 0) */ +"0100" /* nBands (uint16 1) */ +"0000000000805640" /* scaleX (float64 90.0) */ +"00000000008056C0" /* scaleY (float64 -90.0) */ +"000000001C992D41" /* ipX (float64 969870.0) */ +"00000000E49E2341" /* ipY (float64 642930.0) */ +"0000000000000000" /* skewX (float64 0) */ +"0000000000000000" /* skewY (float64 0) */ +"FFFFFFFF" /* SRID (int32 -1) */ +"0300" /* width (uint16 3) */ +"0100" /* height (uint16 1) */ +"45" /* First band type (16BSI, in memory, hasnodata) */ +"0100" /* nodata value (1) */ +"0100" /* pix(0,0) == 1 */ +"B401" /* pix(1,0) == 436 */ +"AF01" /* pix(2,0) == 431 */ + ; + + raster = rt_raster_from_hexwkb(hexwkb, strlen(hexwkb)); + CHECK(raster); + CHECK_EQUALS(rt_raster_get_num_bands(raster), 1); + CHECK_EQUALS(rt_raster_get_x_scale(raster), 90); + CHECK_EQUALS(rt_raster_get_y_scale(raster), -90); + CHECK_EQUALS(rt_raster_get_x_offset(raster), 969870.0); + CHECK_EQUALS(rt_raster_get_y_offset(raster), 642930.0); + CHECK_EQUALS(rt_raster_get_x_skew(raster), 0); + CHECK_EQUALS(rt_raster_get_y_skew(raster), 0); + CHECK_EQUALS(rt_raster_get_srid(raster), 0); + CHECK_EQUALS(rt_raster_get_width(raster), 3); + CHECK_EQUALS(rt_raster_get_height(raster), 1); + { + double val; + int failure; + rt_band band = rt_raster_get_band(raster, 0); + CHECK(band); + CHECK_EQUALS(rt_band_get_pixtype(band), PT_16BSI); + CHECK(!rt_band_is_offline(band)); + CHECK(rt_band_get_hasnodata_flag(band)); + CHECK_EQUALS(rt_band_get_nodata(band), 1); + + failure = rt_band_get_pixel(band, 0, 0, &val); + CHECK(!failure); + CHECK_EQUALS(val, 1); + + failure = rt_band_get_pixel(band, 1, 0, &val); + CHECK(!failure); + CHECK_EQUALS(val, 436); + + failure = rt_band_get_pixel(band, 2, 0, &val); + CHECK(!failure); + CHECK_EQUALS(val, 431); + } + + out = rt_raster_to_hexwkb(raster, &len); +/* + printf(" in hexwkb len: %d\n", strlen(hexwkb)); + printf("out hexwkb len: %d\n", len); + printf(" in hexwkb: %s\n", hexwkb); + printf("out hexwkb: %s\n", out); +*/ + CHECK_EQUALS(len, strlen(hexwkb)); +/* would depend on machine endian + CHECK( ! strcmp(hexwkb, out) ); +*/ + free((/*no const*/ void*)out); + + { + void *serialized; + rt_raster rast2; + + serialized = rt_raster_serialize(raster); + rast2 = rt_raster_deserialize(serialized, FALSE); + + rt_raster_destroy(rast2); + free(serialized); + } + + rt_raster_destroy(raster); + + /* ------------------------------------------------------ */ + /* 5x5, little endian, 3 x band 8BUI (RGB), */ + /* nodata 0, srid -1 */ + /* Test case completes regress/bug_test_car5.sql */ + /* Test case repeated 4 times to mimic 4 tiles insertion */ + /* ------------------------------------------------------ */ + for (i = 0; i < 5; ++i) + { + + hexwkb = +"01" /* little endian (uint8 ndr) */ +"0000" /* version (uint16 0) */ +"0300" /* nBands (uint16 3) */ +"9A9999999999A93F" /* scaleX (float64 0.050000) */ +"9A9999999999A9BF" /* scaleY (float64 -0.050000) */ +"000000E02B274A41" /* ipX (float64 3427927.750000) */ +"0000000077195641" /* ipY (float64 5793244.000000) */ +"0000000000000000" /* skewX (float64 0.000000) */ +"0000000000000000" /* skewY (float64 0.000000) */ +"FFFFFFFF" /* srid (int32 -1) */ +"0500" /* width (uint16 5) */ +"0500" /* height (uint16 5) */ +"44" /* 1st band pixel type (8BUI, in memory, hasnodata) */ +"00" /* 1st band nodata 0 */ +"FDFEFDFEFEFDFEFEFDF9FAFEFEFCF9FBFDFEFEFDFCFAFEFEFE" /* 1st band pixels */ +"44" /* 2nd band pixel type (8BUI, in memory, hasnodata) */ +"00" /* 2nd band nodata 0 */ +"4E627AADD16076B4F9FE6370A9F5FE59637AB0E54F58617087" /* 2nd band pixels */ +"44" /* 3rd band pixel type (8BUI, in memory, hasnodata) */ +"00" /* 3rd band nodata 0 */ +"46566487A1506CA2E3FA5A6CAFFBFE4D566DA4CB3E454C5665" /* 3rd band pixels */ +; + + raster = rt_raster_from_hexwkb(hexwkb, strlen(hexwkb)); + CHECK(raster); + CHECK_EQUALS(rt_raster_get_num_bands(raster), 3); + CHECK_EQUALS_DOUBLE(rt_raster_get_x_scale(raster), 0.05); + CHECK_EQUALS_DOUBLE(rt_raster_get_y_scale(raster), -0.05); + CHECK_EQUALS_DOUBLE(rt_raster_get_x_offset(raster), 3427927.75); + CHECK_EQUALS_DOUBLE(rt_raster_get_y_offset(raster), 5793244.00); + CHECK_EQUALS_DOUBLE(rt_raster_get_x_skew(raster), 0.0); + CHECK_EQUALS_DOUBLE(rt_raster_get_y_skew(raster), 0.0); + CHECK_EQUALS(rt_raster_get_srid(raster), 0); + CHECK_EQUALS(rt_raster_get_width(raster), 5); + CHECK_EQUALS(rt_raster_get_height(raster), 5); + { + /* Test 1st band */ + double val; + int failure; + rt_band band = rt_raster_get_band(raster, 0); + CHECK(band); + CHECK_EQUALS(rt_band_get_pixtype(band), PT_8BUI); + CHECK(!rt_band_is_offline(band)); + CHECK(rt_band_get_hasnodata_flag(band)); + CHECK_EQUALS(rt_band_get_nodata(band), 0); + + failure = rt_band_get_pixel(band, 0, 0, &val); + CHECK(!failure); + CHECK_EQUALS(val, 253); + + failure = rt_band_get_pixel(band, 1, 0, &val); + CHECK(!failure); + CHECK_EQUALS(val, 254); + + failure = rt_band_get_pixel(band, 2, 0, &val); + CHECK(!failure); + CHECK_EQUALS(val, 253); + + failure = rt_band_get_pixel(band, 3, 0, &val); + CHECK(!failure); + CHECK_EQUALS(val, 254); + + failure = rt_band_get_pixel(band, 4, 0, &val); + CHECK(!failure); + CHECK_EQUALS(val, 254); + } + + { + /* Test 2nd band */ + double val; + int failure; + rt_band band = rt_raster_get_band(raster, 1); + CHECK(band); + CHECK_EQUALS(rt_band_get_pixtype(band), PT_8BUI); + CHECK(!rt_band_is_offline(band)); + CHECK(rt_band_get_hasnodata_flag(band)); + CHECK_EQUALS(rt_band_get_nodata(band), 0); + + failure = rt_band_get_pixel(band, 0, 0, &val); + CHECK(!failure); + CHECK_EQUALS(val, 78); + + failure = rt_band_get_pixel(band, 1, 0, &val); + CHECK(!failure); + CHECK_EQUALS(val, 98); + + failure = rt_band_get_pixel(band, 2, 0, &val); + CHECK(!failure); + CHECK_EQUALS(val, 122); + + failure = rt_band_get_pixel(band, 3, 0, &val); + CHECK(!failure); + CHECK_EQUALS(val, 173); + + failure = rt_band_get_pixel(band, 4, 0, &val); + CHECK(!failure); + CHECK_EQUALS(val, 209); + } + + { + /* Test 3rd band */ + double val; + int failure; + rt_band band = rt_raster_get_band(raster, 2); + CHECK(band); + CHECK_EQUALS(rt_band_get_pixtype(band), PT_8BUI); + CHECK(!rt_band_is_offline(band)); + CHECK(rt_band_get_hasnodata_flag(band)); + CHECK_EQUALS(rt_band_get_nodata(band), 0); + + failure = rt_band_get_pixel(band, 0, 0, &val); + CHECK(!failure); + CHECK_EQUALS(val, 70); + + failure = rt_band_get_pixel(band, 1, 0, &val); + CHECK(!failure); + CHECK_EQUALS(val, 86); + + failure = rt_band_get_pixel(band, 2, 0, &val); + CHECK(!failure); + CHECK_EQUALS(val, 100); + + failure = rt_band_get_pixel(band, 3, 0, &val); + CHECK(!failure); + CHECK_EQUALS(val, 135); + + failure = rt_band_get_pixel(band, 4, 0, &val); + CHECK(!failure); + CHECK_EQUALS(val, 161); + } + + out = rt_raster_to_hexwkb(raster, &len); + printf(" in hexwkb len: %u\n", (uint32_t) strlen(hexwkb)); + printf("out hexwkb len: %u\n", len); + CHECK_EQUALS(len, strlen(hexwkb)); +/* would depend on machine endian + CHECK( ! strcmp(hexwkb, out) ); +*/ + + free((/*no const*/ void*)out); + { + void *serialized; + rt_raster rast2; + + serialized = rt_raster_serialize(raster); + rast2 = rt_raster_deserialize(serialized, FALSE); + + rt_raster_destroy(rast2); + free(serialized); + } + rt_raster_destroy(raster); + + } /* for-loop running car5 tests */ + + /* ------------------------------------------------------ */ + /* TODO: New test cases */ + /* ------------------------------------------------------ */ + + /* new test case */ + + /* ------------------------------------------------------ */ + /* Success summary */ + /* ------------------------------------------------------ */ + + printf("All tests successful !\n"); + + return EXIT_SUCCESS; +} + +/* This is needed by liblwgeom */ +void +lwgeom_init_allocators(void) +{ + lwgeom_install_default_allocators(); +} + +void rt_init_allocators(void) +{ + rt_install_default_allocators(); +} diff -Nru postgis-1.5.3/raster/test/regress/Makefile.in postgis-2.0.1/raster/test/regress/Makefile.in --- postgis-1.5.3/raster/test/regress/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/Makefile.in 2012-06-21 20:17:50.000000000 +0000 @@ -0,0 +1,170 @@ +############################################################################# +# $Id$ +# +# Copyright (c) 2009 Sandro Santilli , Pierre Racine +# Copyright (c) 2011 Jorge Arevalo +# Copyright (c) 2011 Regents of the University of California +# +# +# This is free software; you can redistribute and/or modify it under +# the terms of the GNU General Public Licence. See the COPYING file. +# +############################################################################# + +POSTGIS_SRC=../../.. + +# MingW hack: rather than use PGSQL_BINDIR directly, we change +# to the directory and then use "pwd" to return the path. This +# ensures that the returned path is in MSYS format, otherwise +# colons in drive letters will break PATH. +PGSQL_BINDIR=$(shell cd "@PGSQL_BINDIR@" && pwd) + +# Where we put our regression installation +REGRESS_INSTALLDIR=$(POSTGIS_SRC)/regress/00-regress-install + +# +# Put path from pg_config into front of search path +# +PATH := $(PGSQL_BINDIR):$(PATH) +export PATH + +TEST_FIRST = \ + check_gdal + +TEST_METADATA = \ + check_raster_columns \ + check_raster_overviews + +TEST_IO = \ + rt_io + +TEST_FUNC = \ + rt_bytea \ + box3d \ + rt_addband \ + rt_band \ + rt_asgdalraster \ + rt_astiff \ + rt_asjpeg \ + rt_aspng \ + rt_union + +TEST_PROPS = \ + create_rt_properties_test \ + rt_dimensions \ + rt_scale \ + rt_pixelsize \ + rt_upperleft \ + rt_rotation \ + rt_georeference \ + rt_set_properties \ + drop_rt_properties_test \ + create_rt_empty_raster_test \ + rt_isempty \ + rt_hasnoband \ + drop_rt_empty_raster_test \ + rt_metadata + +TEST_BANDPROPS = \ + create_rt_band_properties_test \ + rt_band_properties \ + rt_set_band_properties \ + rt_summarystats \ + rt_count \ + rt_histogram \ + rt_quantile \ + rt_valuecount \ + rt_valuepercent \ + rt_bandmetadata \ + rt_pixelvalue \ + drop_rt_band_properties_test + +TEST_UTILITY = \ + rt_utility \ + create_rt_mapalgebra_test \ + rt_mapalgebraexpr \ + rt_mapalgebrafct \ + rt_mapalgebraexpr_2raster \ + rt_mapalgebrafct_2raster \ + drop_rt_mapalgebra_test \ + create_rt_mapalgebrafctngb_test \ + rt_mapalgebrafctngb \ + rt_mapalgebrafctngb_userfunc \ + drop_rt_mapalgebrafctngb_test \ + rt_reclass \ + rt_resample \ + rt_asraster \ + rt_intersection \ + rt_clip + +TEST_GIST = \ + create_rt_gist_test \ + rt_above \ + rt_below \ + rt_contained \ + rt_contain \ + rt_left \ + rt_overabove \ + rt_overbelow \ + rt_overlap \ + rt_overleft \ + rt_overright \ + rt_right \ + rt_same \ + drop_rt_gist_test + +TEST_SREL = \ + rt_spatial_relationship \ + rt_intersects \ + rt_samealignment + +TEST_BUGS = \ + bug_test_car5 \ + tickets + +TEST_LOADER = \ + loader/Basic \ + loader/BasicCopy \ + loader/Tiled10x10 \ + loader/Tiled10x10Copy + +TESTS = $(TEST_FIRST) $(TEST_METADATA) $(TEST_IO) $(TEST_FUNC) \ + $(TEST_PROPS) $(TEST_BANDPROPS) \ + $(TEST_UTILITY) $(TEST_GIST) $(TEST_SREL) \ + $(TEST_BUGS) \ + $(TEST_LOADER) + +all: + @echo "Use 'make check' to run all tests" + +distclean: clean + rm -f Makefile + +clean: + $(RM) -f rtpostgis.sql + +rtpostgis.sql: ../../rt_pg/rtpostgis.sql + sed 's,$$libdir,$(REGRESS_INSTALLDIR)/lib,g' ../../rt_pg/rtpostgis.sql > rtpostgis.sql + +check: + $(MAKE) -C ../../../regress staged-install + ../../../regress/run_test --raster $(RUNTESTFLAGS) $(TESTS) + ../../../regress/run_test --upgrade --raster $(RUNTESTFLAGS) $(TESTS) + +#all: run_test + +#run_test: run_test.in Makefile +# sed -e "s#@POSTGIS_SRC@#$(POSTGIS_SRC)#" $< > $@ +# chmod +x $@ + +#post-install-check check: run_test +# ./run_test $(TESTS) + +#clean: +# $(RM) run_test +# $(RM) testgdalraster + +testgdalraster: + chmod +x $@ + chmod +x ../../scripts/python/rtgdalraster.py + ./testgdalraster diff -Nru postgis-1.5.3/raster/test/regress/README postgis-2.0.1/raster/test/regress/README --- postgis-1.5.3/raster/test/regress/README 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/README 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,7 @@ +Run 'make check' to run the postgresql-wrappers regression testing. + +You must be allowed to create databases and install C-language +function in it. + +You must also have installed the wrappers with 'make install' +from top-level dir. diff -Nru postgis-1.5.3/raster/test/regress/box3d.sql postgis-2.0.1/raster/test/regress/box3d.sql --- postgis-1.5.3/raster/test/regress/box3d.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/box3d.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,144 @@ +----------------------------------------------------------------------- +-- $Id$ +-- +-- Copyright (c) 2009 Sandro Santilli , David Zwarg +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +----------------------------------------------------------------------- + +CREATE TABLE rt_box3d_test ( + id numeric, + name text, + rast raster, + env box3d +); + +-- 10x20, ip:0.5,0.5 scale:2,3 +INSERT INTO rt_box3d_test +VALUES ( 0, '10x20, ip:0.5,0.5 scale:2,3 skew:0,0', +( +'01' -- little endian (uint8 ndr) +|| +'0000' -- version (uint16 0) +|| +'0000' -- nBands (uint16 0) +|| +'0000000000000040' -- scaleX (float64 2) +|| +'0000000000000840' -- scaleY (float64 3) +|| +'000000000000E03F' -- ipX (float64 0.5) +|| +'000000000000E03F' -- ipY (float64 0.5) +|| +'0000000000000000' -- skewX (float64 0) +|| +'0000000000000000' -- skewY (float64 0) +|| +'0A000000' -- SRID (int32 10) +|| +'0A00' -- width (uint16 10) +|| +'1400' -- height (uint16 20) +)::raster +,'BOX3D(0.5 0.5,20.5 60.5 0)' -- expected envelope (20x60) == (10*2 x 20*3) +); + +INSERT INTO rt_box3d_test +VALUES ( 1, '1x1, ip:2.5,2.5 scale:5,5 skew:0,0', +( +'01' -- little endian (uint8 ndr) +|| +'0000' -- version (uint16 0) +|| +'0000' -- nBands (uint16 0) +|| +'0000000000001440' -- scaleX (float64 5) +|| +'0000000000001440' -- scaleY (float64 5) +|| +'0000000000000440' -- ipX (float64 2.5) +|| +'0000000000000440' -- ipY (float64 2.5) +|| +'0000000000000000' -- skewX (float64 0) +|| +'0000000000000000' -- skewY (float64 0) +|| +'00000000' -- SRID (int32 0) +|| +'0100' -- width (uint16 1) +|| +'0100' -- height (uint16 1) +)::raster +,'BOX3D(2.5 2.5,7.5 7.5 0)' -- expected envelope +); + +INSERT INTO rt_box3d_test +VALUES ( 2, '1x1, ip:7.5,2.5 scale:5,5 skew:0,0', +( +'01' -- little endian (uint8 ndr) +|| +'0000' -- version (uint16 0) +|| +'0000' -- nBands (uint16 0) +|| +'0000000000001440' -- scaleX (float64 5) +|| +'0000000000001440' -- scaleY (float64 5) +|| +'0000000000001E40' -- ipX (float64 7.5) +|| +'0000000000000440' -- ipY (float64 2.5) +|| +'0000000000000000' -- skewX (float64 0) +|| +'0000000000000000' -- skewY (float64 0) +|| +'00000000' -- SRID (int32 0) +|| +'0100' -- width (uint16 1) +|| +'0100' -- height (uint16 1) +)::raster +,'BOX3D(7.5 2.5,12.5 7.5 0)' -- expected envelope +); + +----------------------------------------------------------------------- +-- test bounding box (2D) +----------------------------------------------------------------------- +SELECT + id, + env as expected, + rast::box3d as obtained +FROM rt_box3d_test +WHERE + rast::box3d::text != env::text; + +SELECT + id, + env as expected, + box3d(rast) as obtained +FROM rt_box3d_test +WHERE + box3d(rast)::text != env::text; + +SELECT + id, + env as expected, + box3d(st_convexhull(rast)) as obtained +FROM rt_box3d_test +WHERE + box3d(st_convexhull(rast))::text != env::text; + +SELECT + id, + env as expected, + box3d(st_envelope(rast)) as obtained +FROM rt_box3d_test +WHERE + box3d(st_envelope(rast))::text != env::text; + +-- Cleanup +DROP TABLE rt_box3d_test; diff -Nru postgis-1.5.3/raster/test/regress/bug_test_car5.sql postgis-2.0.1/raster/test/regress/bug_test_car5.sql --- postgis-1.5.3/raster/test/regress/bug_test_car5.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/bug_test_car5.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,50 @@ +-- $Id$ +-- +-- Copyright (c) 2009 Mateusz Loskot +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +----------------------------------------------------------------------- +-- +-- Test case for mysterious band truncation revealed recently +-- on 32-bit platform. The problem was reproduced on 32-bit +-- Unix 32-bit system (Linux, Ubuntu 8.10) and was not reproduced on +-- Unix 64-bit system (Linux, Ubuntu 9.04). +-- +-- There is likely a bug related to reaster data alignment. +-- Problem leaked in SVN trunk r3951. +----------------------------------------------------------------------- +BEGIN; +-- DROP TABLE IF EXISTS car5 CASCADE; +CREATE TABLE car5 +( + rid integer, + rast raster +); +-- +-- Test case: insert the same raster 3 times +-- +-- Raster: 5 x 5 pixels, 3 bands, PT_8BUI pixel type, nodata = 0 +-- +INSERT INTO car5 (rid,rast) VALUES (1, ('01000003009A9999999999A93F9A9999999999A9BF000000E02B274A41000000007719564100000000000000000000000000000000FFFFFFFF050005000400FDFEFDFEFEFDFEFEFDF9FAFEFEFCF9FBFDFEFEFDFCFAFEFEFE04004E627AADD16076B4F9FE6370A9F5FE59637AB0E54F58617087040046566487A1506CA2E3FA5A6CAFFBFE4D566DA4CB3E454C5665')::raster ); +INSERT INTO car5 (rid,rast) VALUES (2, ('01000003009A9999999999A93F9A9999999999A9BF000000E02B274A41000000007719564100000000000000000000000000000000FFFFFFFF050005000400FDFEFDFEFEFDFEFEFDF9FAFEFEFCF9FBFDFEFEFDFCFAFEFEFE04004E627AADD16076B4F9FE6370A9F5FE59637AB0E54F58617087040046566487A1506CA2E3FA5A6CAFFBFE4D566DA4CB3E454C5665')::raster ); +INSERT INTO car5 (rid,rast) VALUES (3, ('01000003009A9999999999A93F9A9999999999A9BF000000E02B274A41000000007719564100000000000000000000000000000000FFFFFFFF050005000400FDFEFDFEFEFDFEFEFDF9FAFEFEFCF9FBFDFEFEFDFCFAFEFEFE04004E627AADD16076B4F9FE6370A9F5FE59637AB0E54F58617087040046566487A1506CA2E3FA5A6CAFFBFE4D566DA4CB3E454C5665')::raster ); + +-- Run test +SELECT rid, st_width(rast), st_height(rast), st_bandpixeltype(rast,1), st_bandpixeltype(rast,2), st_bandpixeltype(rast,3) FROM car5; + +DROP TABLE car5; + +COMMIT; + +----------------------------------------------------------------------- +-- Test results +----------------------------------------------------------------------- +-- Expected output included in file bug_test_car5_expected. +-- In case bug leaks, output includes incorrectly reported +-- pixel type, i.e. 1BB (code 0), example: +--BEGIN +--1|5|5|8BUI|8BUI|8BUI +--2|5|5|8BUI|1BB|1BB +--3|5|5|8BUI|8BUI|8BUI +--COMMIT diff -Nru postgis-1.5.3/raster/test/regress/bug_test_car5_expected postgis-2.0.1/raster/test/regress/bug_test_car5_expected --- postgis-1.5.3/raster/test/regress/bug_test_car5_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/bug_test_car5_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,8 @@ +BEGIN +NOTICE: SRID value -1 converted to the officially unknown SRID value 0 at character 41 +NOTICE: SRID value -1 converted to the officially unknown SRID value 0 at character 41 +NOTICE: SRID value -1 converted to the officially unknown SRID value 0 at character 41 +1|5|5|8BUI|8BUI|8BUI +2|5|5|8BUI|8BUI|8BUI +3|5|5|8BUI|8BUI|8BUI +COMMIT diff -Nru postgis-1.5.3/raster/test/regress/check_gdal.sql postgis-2.0.1/raster/test/regress/check_gdal.sql --- postgis-1.5.3/raster/test/regress/check_gdal.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/check_gdal.sql 2012-06-21 20:17:57.000000000 +0000 @@ -0,0 +1,6 @@ +SELECT + CASE + WHEN strpos(postgis_gdal_version(), 'GDAL_DATA') <> 0 + THEN false + ELSE NULL + END; diff -Nru postgis-1.5.3/raster/test/regress/check_raster_columns.sql postgis-2.0.1/raster/test/regress/check_raster_columns.sql --- postgis-1.5.3/raster/test/regress/check_raster_columns.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/check_raster_columns.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,85 @@ +----------------------------------------------------------------------- +-- $Id$ +-- +-- Copyright (c) 2010 Mateusz Loskot +-- Copyright (C) 2011 Regents of the University of California +-- +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +----------------------------------------------------------------------- + +SET client_min_messages TO warning; + +----------------------------------------------------------------------- +--- Test RASTER_COLUMNS +----------------------------------------------------------------------- + +-- Check table exists +SELECT c.relname FROM pg_class c, pg_views v + WHERE c.relname = v.viewname + AND v.viewname = 'raster_columns'; + +----------------------------------------------------------------------- +--- Test AddRasterConstraints and DropRasterConstraints +----------------------------------------------------------------------- + +DROP TABLE IF EXISTS test_raster_columns; +CREATE TABLE test_raster_columns ( + rid integer, + rast raster +); +CREATE OR REPLACE FUNCTION make_test_raster( + rid integer, + width integer DEFAULT 2, + height integer DEFAULT 2, + ul_x double precision DEFAULT 0, + ul_y double precision DEFAULT 0, + skew_x double precision DEFAULT 0, + skew_y double precision DEFAULT 0, + initvalue double precision DEFAULT 1, + nodataval double precision DEFAULT 0 +) + RETURNS void + AS $$ + DECLARE + x int; + y int; + rast raster; + BEGIN + rast := ST_MakeEmptyRaster(width, height, ul_x, ul_y, 1, 1, skew_x, skew_y, 0); + rast := ST_AddBand(rast, 1, '8BUI', initvalue, nodataval); + + + INSERT INTO test_raster_columns VALUES (rid, rast); + + RETURN; + END; + $$ LANGUAGE 'plpgsql'; +-- no skew +SELECT make_test_raster(0, 2, 2, -2, -2); +SELECT make_test_raster(1, 2, 2, 0, 0, 0, 0, 2); +SELECT make_test_raster(2, 2, 2, 1, -1, 0, 0, 3); +SELECT make_test_raster(3, 2, 2, 1, 1, 0, 0, 4); +SELECT make_test_raster(4, 2, 2, 2, 2, 0, 0, 5); + +SELECT AddRasterConstraints(current_schema(), 'test_raster_columns', 'rast'::name); +SELECT r_table_name, r_raster_column, srid, scale_x, scale_y, blocksize_x, blocksize_y, same_alignment, regular_blocking, num_bands, pixel_types, nodata_values, extent FROM raster_columns WHERE r_table_name = 'test_raster_columns'; + +SELECT DropRasterConstraints(current_schema(),'test_raster_columns', 'rast'::name); +SELECT r_table_name, r_raster_column, srid, scale_x, scale_y, blocksize_x, blocksize_y, same_alignment, regular_blocking, num_bands, pixel_types, nodata_values, extent FROM raster_columns WHERE r_table_name = 'test_raster_columns'; + +SELECT AddRasterConstraints('test_raster_columns', 'rast'::name, 'srid'::text, 'extent', 'blocksize'); +SELECT r_table_name, r_raster_column, srid, scale_x, scale_y, blocksize_x, blocksize_y, same_alignment, regular_blocking, num_bands, pixel_types, nodata_values, extent FROM raster_columns WHERE r_table_name = 'test_raster_columns'; + +SELECT DropRasterConstraints('test_raster_columns', 'rast'::name, 'scale'::text); +SELECT r_table_name, r_raster_column, srid, scale_x, scale_y, blocksize_x, blocksize_y, same_alignment, regular_blocking, num_bands, pixel_types, nodata_values, extent FROM raster_columns WHERE r_table_name = 'test_raster_columns'; + +SELECT AddRasterConstraints('test_raster_columns', 'rast', FALSE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE); +SELECT r_table_name, r_raster_column, srid, scale_x, scale_y, blocksize_x, blocksize_y, same_alignment, regular_blocking, num_bands, pixel_types, nodata_values, extent FROM raster_columns WHERE r_table_name = 'test_raster_columns'; + +SELECT DropRasterConstraints(current_schema(), 'test_raster_columns', 'rast'::name, 'scale'::text); +SELECT r_table_name, r_raster_column, srid, scale_x, scale_y, blocksize_x, blocksize_y, same_alignment, regular_blocking, num_bands, pixel_types, nodata_values, extent FROM raster_columns WHERE r_table_name = 'test_raster_columns'; + +DROP FUNCTION make_test_raster(integer, integer, integer, double precision, double precision, double precision, double precision, double precision, double precision); +DROP TABLE IF EXISTS test_raster_columns; diff -Nru postgis-1.5.3/raster/test/regress/check_raster_columns_expected postgis-2.0.1/raster/test/regress/check_raster_columns_expected --- postgis-1.5.3/raster/test/regress/check_raster_columns_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/check_raster_columns_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,13 @@ +raster_columns +t +test_raster_columns|rast|0|1|1|2|2|t|f|1|{8BUI}|{0}|0103000000010000000800000000000000000000C000000000000000C000000000000000C000000000000000000000000000000040000000000000104000000000000010400000000000001040000000000000104000000000000000400000000000000840000000000000F0BF000000000000000000000000000000C000000000000000C000000000000000C0 +t +test_raster_columns|rast|0|||||f|f|||| +t +test_raster_columns|rast|0|||2|2|f|f||||0103000000010000000800000000000000000000C000000000000000C000000000000000C000000000000000000000000000000040000000000000104000000000000010400000000000001040000000000000104000000000000000400000000000000840000000000000F0BF000000000000000000000000000000C000000000000000C000000000000000C0 +t +test_raster_columns|rast|0|||2|2|f|f||||0103000000010000000800000000000000000000C000000000000000C000000000000000C000000000000000000000000000000040000000000000104000000000000010400000000000001040000000000000104000000000000000400000000000000840000000000000F0BF000000000000000000000000000000C000000000000000C000000000000000C0 +t +test_raster_columns|rast|0|1|1|2|2|t|f|1||{0}|0103000000010000000800000000000000000000C000000000000000C000000000000000C000000000000000000000000000000040000000000000104000000000000010400000000000001040000000000000104000000000000000400000000000000840000000000000F0BF000000000000000000000000000000C000000000000000C000000000000000C0 +t +test_raster_columns|rast|0|||2|2|t|f|1||{0}|0103000000010000000800000000000000000000C000000000000000C000000000000000C000000000000000000000000000000040000000000000104000000000000010400000000000001040000000000000104000000000000000400000000000000840000000000000F0BF000000000000000000000000000000C000000000000000C000000000000000C0 diff -Nru postgis-1.5.3/raster/test/regress/check_raster_overviews.sql postgis-2.0.1/raster/test/regress/check_raster_overviews.sql --- postgis-1.5.3/raster/test/regress/check_raster_overviews.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/check_raster_overviews.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,91 @@ +----------------------------------------------------------------------- +-- $Id$ +-- +-- Copyright (c) 2010 Mateusz Loskot +-- Copyright (C) 2011 Regents of the University of California +-- +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +----------------------------------------------------------------------- + +SET client_min_messages TO warning; + +----------------------------------------------------------------------- +--- Test RASTER_OVERVIEWS +----------------------------------------------------------------------- + +-- Check table exists +SELECT c.relname FROM pg_class c, pg_views v + WHERE c.relname = v.viewname + AND v.viewname = 'raster_overviews'; + +----------------------------------------------------------------------- +--- Test AddOverviewConstraints and DropOverviewConstraints +----------------------------------------------------------------------- + +DROP TABLE IF EXISTS test_raster_columns; +CREATE TABLE test_raster_columns ( + rid integer, + rast raster +); +DROP TABLE IF EXISTS test_raster_overviews; +CREATE OR REPLACE FUNCTION make_test_raster( + rid integer, + width integer DEFAULT 2, + height integer DEFAULT 2, + ul_x double precision DEFAULT 0, + ul_y double precision DEFAULT 0, + skew_x double precision DEFAULT 0, + skew_y double precision DEFAULT 0, + initvalue double precision DEFAULT 1, + nodataval double precision DEFAULT 0 +) + RETURNS void + AS $$ + DECLARE + x int; + y int; + rast raster; + BEGIN + rast := ST_MakeEmptyRaster(width, height, ul_x, ul_y, 1, 1, skew_x, skew_y, 0); + rast := ST_AddBand(rast, 1, '8BUI', initvalue, nodataval); + + + INSERT INTO test_raster_columns VALUES (rid, rast); + + RETURN; + END; + $$ LANGUAGE 'plpgsql'; +-- no skew +SELECT make_test_raster(0, 2, 2, -2, -2); +SELECT make_test_raster(1, 2, 2, 0, 0, 0, 0, 2); +SELECT make_test_raster(2, 2, 2, 1, -1, 0, 0, 3); +SELECT make_test_raster(3, 2, 2, 1, 1, 0, 0, 4); +SELECT make_test_raster(4, 2, 2, 2, 2, 0, 0, 5); + +SELECT * +INTO test_raster_overviews +FROM test_raster_columns; +SELECT r_table_name, r_raster_column, srid, scale_x, scale_y, blocksize_x, blocksize_y, same_alignment, regular_blocking, num_bands, pixel_types, nodata_values, extent FROM raster_columns WHERE r_table_name IN ('test_raster_columns', 'test_raster_overviews') ORDER BY r_table_name, r_raster_column; +SELECT o_table_name, o_raster_column, r_table_name, r_raster_column, overview_factor FROM raster_overviews WHERE o_table_name = 'test_raster_overviews'; + +SELECT AddRasterConstraints(current_schema(), 'test_raster_columns', 'rast'::name); +SELECT r_table_name, r_raster_column, srid, scale_x, scale_y, blocksize_x, blocksize_y, same_alignment, regular_blocking, num_bands, pixel_types, nodata_values, extent FROM raster_columns WHERE r_table_name IN ('test_raster_columns', 'test_raster_overviews') ORDER BY r_table_name, r_raster_column; +SELECT o_table_name, o_raster_column, r_table_name, r_raster_column, overview_factor FROM raster_overviews WHERE o_table_name = 'test_raster_overviews'; + +SELECT AddOverviewConstraints('test_raster_overviews', 'rast', 'test_raster_columns', 'rast', 1); +SELECT r_table_name, r_raster_column, srid, scale_x, scale_y, blocksize_x, blocksize_y, same_alignment, regular_blocking, num_bands, pixel_types, nodata_values, extent FROM raster_columns WHERE r_table_name IN ('test_raster_columns', 'test_raster_overviews') ORDER BY r_table_name, r_raster_column; +SELECT o_table_name, o_raster_column, r_table_name, r_raster_column, overview_factor FROM raster_overviews WHERE o_table_name = 'test_raster_overviews'; + +SELECT DropOverviewConstraints(current_schema(), 'test_raster_overviews', 'rast'); +SELECT r_table_name, r_raster_column, srid, scale_x, scale_y, blocksize_x, blocksize_y, same_alignment, regular_blocking, num_bands, pixel_types, nodata_values, extent FROM raster_columns WHERE r_table_name IN ('test_raster_columns', 'test_raster_overviews') ORDER BY r_table_name, r_raster_column; +SELECT o_table_name, o_raster_column, r_table_name, r_raster_column, overview_factor FROM raster_overviews WHERE o_table_name = 'test_raster_overviews'; + +SELECT DropRasterConstraints(current_schema(), 'test_raster_columns', 'rast'::name); +SELECT r_table_name, r_raster_column, srid, scale_x, scale_y, blocksize_x, blocksize_y, same_alignment, regular_blocking, num_bands, pixel_types, nodata_values, extent FROM raster_columns WHERE r_table_name IN ('test_raster_columns', 'test_raster_overviews') ORDER BY r_table_name, r_raster_column; +SELECT o_table_name, o_raster_column, r_table_name, r_raster_column, overview_factor FROM raster_overviews WHERE o_table_name = 'test_raster_overviews'; + +DROP FUNCTION make_test_raster(integer, integer, integer, double precision, double precision, double precision, double precision, double precision, double precision); +DROP TABLE IF EXISTS test_raster_overviews; +DROP TABLE IF EXISTS test_raster_columns; diff -Nru postgis-1.5.3/raster/test/regress/check_raster_overviews_expected postgis-2.0.1/raster/test/regress/check_raster_overviews_expected --- postgis-1.5.3/raster/test/regress/check_raster_overviews_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/check_raster_overviews_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,16 @@ +raster_overviews +test_raster_columns|rast|0|||||f|f|||| +test_raster_overviews|rast|0|||||f|f|||| +t +test_raster_columns|rast|0|1|1|2|2|t|f|1|{8BUI}|{0}|0103000000010000000800000000000000000000C000000000000000C000000000000000C000000000000000000000000000000040000000000000104000000000000010400000000000001040000000000000104000000000000000400000000000000840000000000000F0BF000000000000000000000000000000C000000000000000C000000000000000C0 +test_raster_overviews|rast|0|||||f|f|||| +t +test_raster_columns|rast|0|1|1|2|2|t|f|1|{8BUI}|{0}|0103000000010000000800000000000000000000C000000000000000C000000000000000C000000000000000000000000000000040000000000000104000000000000010400000000000001040000000000000104000000000000000400000000000000840000000000000F0BF000000000000000000000000000000C000000000000000C000000000000000C0 +test_raster_overviews|rast|0|||||f|f|||| +test_raster_overviews|rast|test_raster_columns|rast|1 +t +test_raster_columns|rast|0|1|1|2|2|t|f|1|{8BUI}|{0}|0103000000010000000800000000000000000000C000000000000000C000000000000000C000000000000000000000000000000040000000000000104000000000000010400000000000001040000000000000104000000000000000400000000000000840000000000000F0BF000000000000000000000000000000C000000000000000C000000000000000C0 +test_raster_overviews|rast|0|||||f|f|||| +t +test_raster_columns|rast|0|||||f|f|||| +test_raster_overviews|rast|0|||||f|f|||| diff -Nru postgis-1.5.3/raster/test/regress/create_rt_band_properties_test.sql postgis-2.0.1/raster/test/regress/create_rt_band_properties_test.sql --- postgis-1.5.3/raster/test/regress/create_rt_band_properties_test.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/create_rt_band_properties_test.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,225 @@ +----------------------------------------------------------------------- +-- $Id$ +-- +-- Copyright (c) 2009 Pierre Racine +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +----------------------------------------------------------------------- + +----------------------------------------------------------------------- +--- Test of "Get" functions for properties of the raster. +----------------------------------------------------------------------- + +CREATE TABLE rt_band_properties_test ( + id numeric, + description text, + nbband integer, + b1pixeltype text, + b1hasnodatavalue boolean, + b1nodatavalue float4, + b1val float4, + b2pixeltype text, + b2hasnodatavalue boolean, + b2nodatavalue float4, + b2val float4, + geomtxt text, + rast raster +); + +INSERT INTO rt_band_properties_test +VALUES ( 1, '1x1, nbband:2 b1pixeltype:4BUI b1hasnodatavalue:true b1nodatavalue:3 b2pixeltype:16BSI b2hasnodatavalue:false b2nodatavalue:13', + 2, --- nbband + '4BUI', true, 3, 2, --- b1pixeltype, b1hasnodatavalue, b1nodatavalue, b1val + '16BSI', false, 13, 4, --- b2pixeltype, b2hasnodatavalue, b2nodatavalue, b2val + 'POLYGON((782325.5 26744042.5,782330.5 26744045.5,782333.5 26744040.5,782328.5 26744037.5,782325.5 26744042.5))', +( +'01' -- big endian (uint8 xdr) +|| +'0000' -- version (uint16 0) +|| +'0200' -- nBands (uint16 2) +|| +'0000000000001440' -- scaleX (float64 5) +|| +'00000000000014C0' -- scaleY (float64 -5) +|| +'00000000EBDF2741' -- ipX (float64 782325.5) +|| +'000000A84E817941' -- ipY (float64 26744042.5) +|| +'0000000000000840' -- skewX (float64 3) +|| +'0000000000000840' -- skewY (float64 3) +|| +'27690000' -- SRID (int32 26919 - UTM 19N) +|| +'0100' -- width (uint16 1) +|| +'0100' -- height (uint16 1) +|| +'4' -- hasnodatavalue set to true +|| +'2' -- first band type (4BUI) +|| +'03' -- novalue==3 +|| +'02' -- pixel(0,0)==2 +|| +'0' -- hasnodatavalue set to false +|| +'5' -- second band type (16BSI) +|| +'0D00' -- novalue==13 +|| +'0400' -- pixel(0,0)==4 +)::raster +); + +INSERT INTO rt_band_properties_test +VALUES ( 2, '1x1, nbband:2 b1pixeltype:4BUI b1hasnodatavalue:true b1nodatavalue:3 b2pixeltype:16BSI b2hasnodatavalue:false b2nodatavalue:13', + 2, --- nbband + '4BUI', true, 3, 2, --- b1pixeltype, b1hasnodatavalue, b1nodatavalue, b1val + '16BSI', false, 13, 4, --- b2pixeltype, b2hasnodatavalue, b2nodatavalue, b2val + 'POLYGON((-75.5533328537098 49.2824585505576,-75.5525268884758 49.2826703629415,-75.5523150760919 49.2818643977075,-75.553121041326 49.2816525853236,-75.5533328537098 49.2824585505576))', +( +'01' -- little endian (uint8 ndr) +|| +'0000' -- version (uint16 0) +|| +'0200' -- nBands (uint16 0) +|| +'17263529ED684A3F' -- scaleX (float64 0.000805965234044584) +|| +'F9253529ED684ABF' -- scaleY (float64 -0.00080596523404458) +|| +'1C9F33CE69E352C0' -- ipX (float64 -75.5533328537098) +|| +'718F0E9A27A44840' -- ipY (float64 49.2824585505576) +|| +'ED50EB853EC32B3F' -- skewX (float64 0.000211812383858707) +|| +'7550EB853EC32B3F' -- skewY (float64 0.000211812383858704) +|| +'E6100000' -- SRID (int32 4326) +|| +'0100' -- width (uint16 1) +|| +'0100' -- height (uint16 1) +|| +'4' -- hasnodatavalue set to true +|| +'2' -- first band type (4BUI) +|| +'03' -- novalue==3 +|| +'02' -- pixel(0,0)==2 +|| +'0' -- hasnodatavalue set to false +|| +'5' -- second band type (16BSI) +|| +'0D00' -- novalue==13 +|| +'0400' -- pixel(0,0)==4 +)::raster +); + +INSERT INTO rt_band_properties_test +VALUES ( 3, '1x1, nbband:2 b1pixeltype:4BUI b1hasnodatavalue:true b1nodatavalue:3 b2pixeltype:16BSI b2hasnodatavalue:false b2nodatavalue:13', + 2, --- nbband + '4BUI', true, 3, 3, --- b1pixeltype, b1hasnodatavalue, b1nodatavalue, b1val + '16BSI', false, 13, 4, --- b2pixeltype, b2hasnodatavalue, b2nodatavalue, b2val + 'POLYGON((-75.5533328537098 49.2824585505576,-75.5525268884758 49.2826703629415,-75.5523150760919 49.2818643977075,-75.553121041326 49.2816525853236,-75.5533328537098 49.2824585505576))', +( +'01' -- little endian (uint8 ndr) +|| +'0000' -- version (uint16 0) +|| +'0200' -- nBands (uint16 0) +|| +'17263529ED684A3F' -- scaleX (float64 0.000805965234044584) +|| +'F9253529ED684ABF' -- scaleY (float64 -0.00080596523404458) +|| +'1C9F33CE69E352C0' -- ipX (float64 -75.5533328537098) +|| +'718F0E9A27A44840' -- ipY (float64 49.2824585505576) +|| +'ED50EB853EC32B3F' -- skewX (float64 0.000211812383858707) +|| +'7550EB853EC32B3F' -- skewY (float64 0.000211812383858704) +|| +'E6100000' -- SRID (int32 4326) +|| +'0100' -- width (uint16 1) +|| +'0100' -- height (uint16 1) +|| +'6' -- hasnodatavalue and isnodata set to true +|| +'2' -- first band type (4BUI) +|| +'03' -- novalue==3 +|| +'03' -- pixel(0,0)==3 (same that nodata) +|| +'0' -- hasnodatavalue set to false +|| +'5' -- second band type (16BSI) +|| +'0D00' -- novalue==13 +|| +'0400' -- pixel(0,0)==4 +)::raster +); + +INSERT INTO rt_band_properties_test +VALUES ( 4, '1x1, nbband:2 b1pixeltype:4BUI b1hasnodatavalue:true b1nodatavalue:3 b2pixeltype:16BSI b2hasnodatavalue:false b2nodatavalue:13', + 2, --- nbband + '4BUI', true, 3, 3, --- b1pixeltype, b1hasnodatavalue, b1nodatavalue, b1val + '16BSI', false, 13, 4, --- b2pixeltype, b2hasnodatavalue, b2nodatavalue, b2val + 'POLYGON((-75.5533328537098 49.2824585505576,-75.5525268884758 49.2826703629415,-75.5523150760919 49.2818643977075,-75.553121041326 49.2816525853236,-75.5533328537098 49.2824585505576))', +( +'01' -- little endian (uint8 ndr) +|| +'0000' -- version (uint16 0) +|| +'0200' -- nBands (uint16 0) +|| +'17263529ED684A3F' -- scaleX (float64 0.000805965234044584) +|| +'F9253529ED684ABF' -- scaleY (float64 -0.00080596523404458) +|| +'1C9F33CE69E352C0' -- ipX (float64 -75.5533328537098) +|| +'718F0E9A27A44840' -- ipY (float64 49.2824585505576) +|| +'ED50EB853EC32B3F' -- skewX (float64 0.000211812383858707) +|| +'7550EB853EC32B3F' -- skewY (float64 0.000211812383858704) +|| +'E6100000' -- SRID (int32 4326) +|| +'0100' -- width (uint16 1) +|| +'0100' -- height (uint16 1) +|| +'4' -- hasnodatavalue set to true and isnodata set to false (should be updated) +|| +'2' -- first band type (4BUI) +|| +'03' -- novalue==3 +|| +'03' -- pixel(0,0)==3 (same that nodata) +|| +'0' -- hasnodatavalue set to false +|| +'5' -- second band type (16BSI) +|| +'0D00' -- novalue==13 +|| +'0400' -- pixel(0,0)==4 +)::raster +); + diff -Nru postgis-1.5.3/raster/test/regress/create_rt_empty_raster_test.sql postgis-2.0.1/raster/test/regress/create_rt_empty_raster_test.sql --- postgis-1.5.3/raster/test/regress/create_rt_empty_raster_test.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/create_rt_empty_raster_test.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,16 @@ +----------------------------------------------------------------------- +-- $Id$ +-- +-- Copyright (c) 2011 Jorge Arevalo +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +----------------------------------------------------------------------- + +CREATE TABLE empty_raster_test ( + rid numeric, + rast raster +); + +INSERT INTO empty_raster_test +VALUES (1, ST_MakeEmptyRaster( 100, 100, 0.0005, 0.0005, 1, 1, 0, 0, 4326) ); \ No newline at end of file diff -Nru postgis-1.5.3/raster/test/regress/create_rt_gist_test.sql postgis-2.0.1/raster/test/regress/create_rt_gist_test.sql --- postgis-1.5.3/raster/test/regress/create_rt_gist_test.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/create_rt_gist_test.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,71 @@ +----------------------------------------------------------------------- +-- $Id$ +-- +-- Copyright (c) 2009 Sandro Santilli +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +----------------------------------------------------------------------- + +----------------------------------------------------------------------- +-- makeTileGrid( , , , +-- , ) +-- +-- Return a set of tuples in the form: +-- x int, y int, t raster +-- Containing a subdivision of given extent +-- into a grid composed by rasters of the given +-- dimension in pixels. +-- +-- TODO: DROP functiona and type at the end of test +----------------------------------------------------------------------- +CREATE TYPE tile AS (x int, y int, tile raster); +CREATE OR REPLACE FUNCTION makegrid (int, int, box2d, int, int) + RETURNS SETOF tile +AS +' +DECLARE + gridCols alias for $1; + gridRows alias for $2; + extent alias for $3; + tileWidth alias for $4; + tileHeight alias for $5; + rec tile; + scalex float8; + scaley float8; + ipx float8; + ipy float8; +BEGIN + + -- compute some sizes + -- each tile extent width is extent.width / gridRows + scalex = ((ST_xmax(extent)-ST_xmin(extent))/gridCols)/tileWidth; + scaley = ((ST_ymax(extent)-ST_ymin(extent))/gridRows)/tileHeight; + + FOR y IN 0..gridRows-1 LOOP + ipy = y*scaley + ST_ymin(extent); + FOR x IN 0..gridCols-1 LOOP + ipx = x*scalex + ST_xmin(extent); + rec.x = x; + rec.y = y; + rec.tile = st_MakeEmptyRaster(tileWidth, tileHeight, ipx, ipy, + scalex, scaley, 0, 0); + RETURN NEXT rec; + END LOOP; + END LOOP; + + RETURN; +END; +' +LANGUAGE 'plpgsql'; + +----------------------------------------------------------------------- +-- Create a grid of 10x10 rasters on an extent of -100..100 both axis +-- and another on the same extent with 3x3 tiles, to use for queries +----------------------------------------------------------------------- + +CREATE TABLE rt_gist_grid_test AS + SELECT * FROM makegrid(10, 10, 'BOX(-100 -100, 100 100)', 1, 1); + +CREATE TABLE rt_gist_query_test AS + SELECT * from makegrid(3, 3, 'BOX(-100 -100, 100 100)', 1, 1); diff -Nru postgis-1.5.3/raster/test/regress/create_rt_mapalgebra_test.sql postgis-2.0.1/raster/test/regress/create_rt_mapalgebra_test.sql --- postgis-1.5.3/raster/test/regress/create_rt_mapalgebra_test.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/create_rt_mapalgebra_test.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,92 @@ +CREATE OR REPLACE FUNCTION ST_TestRaster(ulx float8, uly float8, val float8) + RETURNS raster AS + $$ + DECLARE + BEGIN + RETURN ST_AddBand(ST_MakeEmptyRaster(10, 10, ulx, uly, 1, 1, 0, 0, 0), '32BF', val, -1); + END; + $$ + LANGUAGE 'plpgsql'; + + + +CREATE OR REPLACE FUNCTION raster_plus_twenty(pixel FLOAT, VARIADIC args TEXT[]) + RETURNS FLOAT AS + $$ + BEGIN + IF pixel IS NULL THEN + RAISE NOTICE 'Pixel value is null.'; + END IF; + RETURN pixel + 20; + END; + $$ + LANGUAGE 'plpgsql' IMMUTABLE; + +CREATE OR REPLACE FUNCTION raster_plus_arg1(pixel FLOAT, VARIADIC args TEXT[]) + RETURNS FLOAT AS + $$ + DECLARE + x float := 0; + BEGIN + IF NOT args[1] IS NULL THEN + x := args[1]::float; + END IF; + RETURN pixel + x; + END; + $$ + LANGUAGE 'plpgsql' IMMUTABLE; + +CREATE OR REPLACE FUNCTION raster_polynomial(pixel FLOAT, VARIADIC args TEXT[]) + RETURNS FLOAT AS + $$ + DECLARE + m float := 1; + b float := 0; + BEGIN + IF NOT args[1] is NULL THEN + m := args[1]::float; + END IF; + IF NOT args[2] is NULL THEN + b := args[2]::float; + END IF; + RETURN m * pixel + b; + END; + $$ + LANGUAGE 'plpgsql' IMMUTABLE; + + CREATE OR REPLACE FUNCTION raster_nullage(pixel FLOAT, VARIADIC args TEXT[]) + RETURNS FLOAT AS + $$ + BEGIN + RETURN NULL; + END; + $$ + LANGUAGE 'plpgsql' IMMUTABLE; + + CREATE OR REPLACE FUNCTION raster_x_plus_arg(pixel FLOAT, pos INT[], VARIADIC args TEXT[]) + RETURNS FLOAT AS + $$ + DECLARE + x float := 0; + BEGIN + IF NOT args[1] IS NULL THEN + x := args[1]::float; + END IF; + RETURN pixel + pos[1] + x; + END; + $$ + LANGUAGE 'plpgsql' IMMUTABLE; + + CREATE OR REPLACE FUNCTION raster_y_plus_arg(pixel FLOAT, pos INT[], VARIADIC args TEXT[]) + RETURNS FLOAT AS + $$ + DECLARE + x float := 0; + BEGIN + IF NOT args[1] IS NULL THEN + x := args[1]::float; + END IF; + RETURN pixel + pos[2] + x; + END; + $$ + LANGUAGE 'plpgsql' IMMUTABLE; diff -Nru postgis-1.5.3/raster/test/regress/create_rt_mapalgebrafctngb_test.sql postgis-2.0.1/raster/test/regress/create_rt_mapalgebrafctngb_test.sql --- postgis-1.5.3/raster/test/regress/create_rt_mapalgebrafctngb_test.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/create_rt_mapalgebrafctngb_test.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,25 @@ +-- +-- A user callback function that nullifies all cells in the resulting raster. +-- +CREATE OR REPLACE FUNCTION ST_Nullage(matrix float[][], nodatamode text, VARIADIC args text[]) + RETURNS float AS + $$ + BEGIN + RETURN NULL; + END; + $$ + LANGUAGE 'plpgsql' IMMUTABLE; + + +-- +--Test rasters +-- +CREATE OR REPLACE FUNCTION ST_TestRasterNgb(h integer, w integer, val float8) + RETURNS raster AS + $$ + DECLARE + BEGIN + RETURN ST_AddBand(ST_MakeEmptyRaster(h, w, 0, 0, 1, 1, 0, 0, 0), '32BF', val, -1); + END; + $$ + LANGUAGE 'plpgsql'; diff -Nru postgis-1.5.3/raster/test/regress/create_rt_properties_test.sql postgis-2.0.1/raster/test/regress/create_rt_properties_test.sql --- postgis-1.5.3/raster/test/regress/create_rt_properties_test.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/create_rt_properties_test.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,213 @@ +----------------------------------------------------------------------- +-- $Id$ +-- +-- Copyright (c) 2009 Mateusz Loskot +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +----------------------------------------------------------------------- + +----------------------------------------------------------------------- +--- Test of "Get" functions for properties of the raster. +----------------------------------------------------------------------- + +CREATE TABLE rt_properties_test ( + id numeric, + name text, + srid integer, + width integer, + height integer, + scalex double precision, + scaley double precision, + ipx double precision, + ipy double precision, + skewx double precision, + skewy double precision, + rast raster +); + +INSERT INTO rt_properties_test +VALUES ( 0, '10x20, ip:0.5,0.5 scale:2,3 skew:0,0 srid:10 width:10 height:20', + 10, 10, 20, --- SRID, width, height + 2, 3, 0.5, 0.5, 0, 0, --- georeference +( +'01' -- little endian (uint8 ndr) +|| +'0000' -- version (uint16 0) +|| +'0000' -- nBands (uint16 0) +|| +'0000000000000040' -- scaleX (float64 2) +|| +'0000000000000840' -- scaleY (float64 3) +|| +'000000000000E03F' -- ipX (float64 0.5) +|| +'000000000000E03F' -- ipY (float64 0.5) +|| +'0000000000000000' -- skewX (float64 0) +|| +'0000000000000000' -- skewY (float64 0) +|| +'0A000000' -- SRID (int32 10) +|| +'0A00' -- width (uint16 10) +|| +'1400' -- height (uint16 20) +)::raster +); + +INSERT INTO rt_properties_test +VALUES ( 1, '1x1, ip:2.5,2.5 scale:5,5 skew:0,0, srid:12, width:1, height:1', + 12, 1, 1, --- SRID, width, height + 5, 5, 2.5, 2.5, 0, 0, --- georeference +( +'01' -- little endian (uint8 ndr) +|| +'0000' -- version (uint16 0) +|| +'0000' -- nBands (uint16 0) +|| +'0000000000001440' -- scaleX (float64 5) +|| +'0000000000001440' -- scaleY (float64 5) +|| +'0000000000000440' -- ipX (float64 2.5) +|| +'0000000000000440' -- ipY (float64 2.5) +|| +'0000000000000000' -- skewX (float64 0) +|| +'0000000000000000' -- skewY (float64 0) +|| +'0C000000' -- SRID (int32 12) +|| +'0100' -- width (uint16 1) +|| +'0100' -- height (uint16 1) +)::raster +); + +INSERT INTO rt_properties_test +VALUES ( 2, '1x1, ip:7.5,2.5 scale:5,5 skew:0,0, srid:0, width:1, height:1', + 0, 1, 1, --- SRID, width, height + 5, 5, 7.5, 2.5, 0, 0, --- georeference +( +'01' -- little endian (uint8 ndr) +|| +'0000' -- version (uint16 0) +|| +'0000' -- nBands (uint16 0) +|| +'0000000000001440' -- scaleX (float64 5) +|| +'0000000000001440' -- scaleY (float64 5) +|| +'0000000000001E40' -- ipX (float64 7.5) +|| +'0000000000000440' -- ipY (float64 2.5) +|| +'0000000000000000' -- skewX (float64 0) +|| +'0000000000000000' -- skewY (float64 0) +|| +'00000000' -- SRID (int32 0) +|| +'0100' -- width (uint16 1) +|| +'0100' -- height (uint16 1) +)::raster +); + +INSERT INTO rt_properties_test +VALUES ( 3, '1x1, ip:7.5,2.5 scale:5,5 skew:0,0, srid:-1, width:1, height:1', + 0, 1, 1, --- SRID, width, height + 5, 5, 7.5, 2.5, 0, 0, --- georeference +( +'01' -- little endian (uint8 ndr) +|| +'0000' -- version (uint16 0) +|| +'0000' -- nBands (uint16 0) +|| +'0000000000001440' -- scaleX (float64 5) +|| +'0000000000001440' -- scaleY (float64 5) +|| +'0000000000001E40' -- ipX (float64 7.5) +|| +'0000000000000440' -- ipY (float64 2.5) +|| +'0000000000000000' -- skewX (float64 0) +|| +'0000000000000000' -- skewY (float64 0) +|| +'00000000' -- SRID (int32 0) +|| +'0100' -- width (uint16 1) +|| +'0100' -- height (uint16 1) +)::raster +); + +INSERT INTO rt_properties_test +VALUES ( 4, '1x1, ip:7.5,2.5 scale:5,5 skew:1,1, srid:-1, width:1, height:1', + 0, 1, 1, --- SRID, width, height + 5, 5, 7.5, 2.5, 1, 1, --- georeference +( +'01' -- little endian (uint8 ndr) +|| +'0000' -- version (uint16 0) +|| +'0000' -- nBands (uint16 0) +|| +'0000000000001440' -- scaleX (float64 5) +|| +'0000000000001440' -- scaleY (float64 5) +|| +'0000000000001E40' -- ipX (float64 7.5) +|| +'0000000000000440' -- ipY (float64 2.5) +|| +'000000000000F03F' -- skewX (float64 1) +|| +'000000000000F03F' -- skewY (float64 1) +|| +'00000000' -- SRID (int32 0) +|| +'0100' -- width (uint16 1) +|| +'0100' -- height (uint16 1) +)::raster +); + +INSERT INTO rt_properties_test +VALUES ( 5, '1x1, ip:7.5,2.5 scale:5,5 skew:3,7, srid:-1, width:1, height:1', + 0, 1, 1, --- SRID, width, height + 5, 5, 7.5, 2.5, 3, 7, --- georeference +( +'01' -- little endian (uint8 ndr) +|| +'0000' -- version (uint16 0) +|| +'0000' -- nBands (uint16 0) +|| +'0000000000001440' -- scaleX (float64 5) +|| +'0000000000001440' -- scaleY (float64 5) +|| +'0000000000001E40' -- ipX (float64 7.5) +|| +'0000000000000440' -- ipY (float64 2.5) +|| +'0000000000000840' -- skewX (float64 3) +|| +'0000000000001C40' -- skewY (float64 7) +|| +'00000000' -- SRID (int32 0) +|| +'0100' -- width (uint16 1) +|| +'0100' -- height (uint16 1) +)::raster +); diff -Nru postgis-1.5.3/raster/test/regress/create_rt_utility_test.sql postgis-2.0.1/raster/test/regress/create_rt_utility_test.sql --- postgis-1.5.3/raster/test/regress/create_rt_utility_test.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/create_rt_utility_test.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,153 @@ +----------------------------------------------------------------------- +-- $Id$ +-- +-- Copyright (c) 2009 Pierre Racine +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +----------------------------------------------------------------------- + +SET client_min_messages TO warning; + +----------------------------------------------------------------------- +--- Test of "Get" functions for properties of the raster. +----------------------------------------------------------------------- + +CREATE TABLE rt_utility_test ( + id numeric, + name text, + srid integer, + width integer, + height integer, + scalex double precision, + scaley double precision, + ipx double precision, + ipy double precision, + skewx double precision, + skewy double precision, + rast raster +); + +INSERT INTO rt_utility_test +VALUES ( 1, '1217x1156, ip:782325.5,26744042.5 scale:5,-5 skew:0,0 srid:9102707 width:1217 height:1156', + 26919, 1217, 1156, --- SRID, width, height + 5, -5, 782325.5, 26744042.5, 0, 0, --- georeference +( +'01' -- little endian (uint8 ndr) +|| +'0000' -- version (uint16 0) +|| +'0000' -- nBands (uint16 0) +|| +'0000000000001440' -- scaleX (float64 5) +|| +'00000000000014C0' -- scaleY (float64 -5) +|| +'00000000EBDF2741' -- ipX (float64 782325.5) +|| +'000000A84E817941' -- ipY (float64 26744042.5) +|| +'0000000000000000' -- skewX (float64 0) +|| +'0000000000000000' -- skewY (float64 0) +|| +'27690000' -- SRID (int32 26919 - UTM 19N) +|| +'C104' -- width (uint16 1217) +|| +'8404' -- height (uint16 1156) +)::raster +); + +INSERT INTO rt_utility_test +VALUES ( 2, '1217x1156, ip:782325.5,26744042.5 scale:5,-5 skew:3,3 srid:9102707 width:1217 height:1156', + 26919, 1217, 1156, --- SRID, width, height + 5, -5, 782325.5, 26744042.5, 3, 3, --- georeference +( +'01' -- little endian (uint8 ndr) +|| +'0000' -- version (uint16 0) +|| +'0000' -- nBands (uint16 0) +|| +'0000000000001440' -- scaleX (float64 5) +|| +'00000000000014C0' -- scaleY (float64 -5) +|| +'00000000EBDF2741' -- ipX (float64 782325.5) +|| +'000000A84E817941' -- ipY (float64 26744042.5) +|| +'0000000000000840' -- skewX (float64 3) +|| +'0000000000000840' -- skewY (float64 3) +|| +'27690000' -- SRID (int32 26919 - UTM 19N) +|| +'C104' -- width (uint16 1217) +|| +'8404' -- height (uint16 1156) +)::raster +); + +INSERT INTO rt_utility_test +VALUES ( 3, '6000x6000, ip:-75,50 scale:0.000833333333333333,-0.000833333333333333 skew:0,0 srid:4326 width:6000 height:6000', + 4326, 6000, 6000, --- SRID, width, height + 0.000833333333333333, -0.000833333333333333, -75, 50, 0, 0, --- georeference +( +'01' -- little endian (uint8 ndr) +|| +'0000' -- version (uint16 0) +|| +'0000' -- nBands (uint16 0) +|| +'4F1BE8B4814E4B3F' -- scaleX (float64 0.000833333333333333) +|| +'4F1BE8B4814E4BBF' -- scaleY (float64 -0.000833333333333333) +|| +'0000000000C052C0' -- ipX (float64 -75) +|| +'0000000000004940' -- ipY (float64 50) +|| +'0000000000000000' -- skewX (float64 0) +|| +'0000000000000000' -- skewY (float64 0) +|| +'E6100000' -- SRID (int32 4326) +|| +'7017' -- width (uint16 6000) +|| +'7017' -- height (uint16 6000) +)::raster +); + +INSERT INTO rt_utility_test +VALUES ( 4, '6000x6000, ip:-75.5533328537098,49.2824585505576 scale:0.000805965234044584,-0.00080596523404458 skew:0.000211812383858707,0.000211812383858704 srid:4326 width:6000 height:6000', + 4326, 6000, 6000, --- SRID, width, height + 0.000805965234044584, -0.00080596523404458, -75.5533328537098, 49.2824585505576, 0.000211812383858707, 0.000211812383858704, --- georeference +( +'01' -- little endian (uint8 ndr) +|| +'0000' -- version (uint16 0) +|| +'0000' -- nBands (uint16 0) +|| +'17263529ED684A3F' -- scaleX (float64 0.000805965234044584) +|| +'F9253529ED684ABF' -- scaleY (float64 -0.00080596523404458) +|| +'1C9F33CE69E352C0' -- ipX (float64 -75.5533328537098) +|| +'718F0E9A27A44840' -- ipY (float64 49.2824585505576) +|| +'ED50EB853EC32B3F' -- skewX (float64 0.000211812383858707) +|| +'7550EB853EC32B3F' -- skewY (float64 0.000211812383858704) +|| +'E6100000' -- SRID (int32 4326) +|| +'7017' -- width (uint16 6000) +|| +'7017' -- height (uint16 6000) +)::raster +); diff -Nru postgis-1.5.3/raster/test/regress/drop_rt_band_properties_test.sql postgis-2.0.1/raster/test/regress/drop_rt_band_properties_test.sql --- postgis-1.5.3/raster/test/regress/drop_rt_band_properties_test.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/drop_rt_band_properties_test.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1 @@ +DROP TABLE rt_band_properties_test; diff -Nru postgis-1.5.3/raster/test/regress/drop_rt_empty_raster_test.sql postgis-2.0.1/raster/test/regress/drop_rt_empty_raster_test.sql --- postgis-1.5.3/raster/test/regress/drop_rt_empty_raster_test.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/drop_rt_empty_raster_test.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1 @@ +DROP TABLE empty_raster_test; diff -Nru postgis-1.5.3/raster/test/regress/drop_rt_gist_test.sql postgis-2.0.1/raster/test/regress/drop_rt_gist_test.sql --- postgis-1.5.3/raster/test/regress/drop_rt_gist_test.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/drop_rt_gist_test.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,5 @@ +DROP FUNCTION makegrid(integer,integer,box2d,integer,integer); +DROP table rt_gist_grid_test; +DROP table rt_gist_query_test; +DROP type tile; + diff -Nru postgis-1.5.3/raster/test/regress/drop_rt_mapalgebra_test.sql postgis-2.0.1/raster/test/regress/drop_rt_mapalgebra_test.sql --- postgis-1.5.3/raster/test/regress/drop_rt_mapalgebra_test.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/drop_rt_mapalgebra_test.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,7 @@ +DROP FUNCTION ST_TestRaster(ulx float8, uly float8, val float8); +DROP FUNCTION raster_plus_twenty(pixel FLOAT, VARIADIC args TEXT[]); +DROP FUNCTION raster_plus_arg1(pixel FLOAT, VARIADIC args TEXT[]); +DROP FUNCTION raster_polynomial(pixel FLOAT, VARIADIC args TEXT[]); +DROP FUNCTION raster_nullage(pixel FLOAT, VARIADIC args TEXT[]); +DROP FUNCTION raster_x_plus_arg(pixel FLOAT, pos INT[], VARIADIC args TEXT[]); +DROP FUNCTION raster_y_plus_arg(pixel FLOAT, pos INT[], VARIADIC args TEXT[]); diff -Nru postgis-1.5.3/raster/test/regress/drop_rt_mapalgebrafctngb_test.sql postgis-2.0.1/raster/test/regress/drop_rt_mapalgebrafctngb_test.sql --- postgis-1.5.3/raster/test/regress/drop_rt_mapalgebrafctngb_test.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/drop_rt_mapalgebrafctngb_test.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +DROP FUNCTION ST_Nullage(matrix float[][], nodatamode text, VARIADIC args text[]); +DROP FUNCTION ST_TestRasterNgb(h integer, w integer, val float8); diff -Nru postgis-1.5.3/raster/test/regress/drop_rt_properties_test.sql postgis-2.0.1/raster/test/regress/drop_rt_properties_test.sql --- postgis-1.5.3/raster/test/regress/drop_rt_properties_test.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/drop_rt_properties_test.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +DROP TABLE rt_properties_test; + diff -Nru postgis-1.5.3/raster/test/regress/loader/Basic-post.sh postgis-2.0.1/raster/test/regress/loader/Basic-post.sh --- postgis-1.5.3/raster/test/regress/loader/Basic-post.sh 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/loader/Basic-post.sh 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1 @@ +rm -f loader/Basic.tif diff -Nru postgis-1.5.3/raster/test/regress/loader/Basic-pre.sh postgis-2.0.1/raster/test/regress/loader/Basic-pre.sh --- postgis-1.5.3/raster/test/regress/loader/Basic-pre.sh 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/loader/Basic-pre.sh 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1 @@ +cp loader/testraster.tif loader/Basic.tif diff -Nru postgis-1.5.3/raster/test/regress/loader/Basic.select.expected postgis-2.0.1/raster/test/regress/loader/Basic.select.expected --- postgis-1.5.3/raster/test/regress/loader/Basic.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/loader/Basic.select.expected 2012-02-08 16:11:13.000000000 +0000 @@ -0,0 +1,74 @@ +0|1.0000000000|-1.0000000000|90|90|t|f|3|{8BUI,8BUI,8BUI}|{NULL,NULL,NULL}|{f,f,f}|01030000000100000005000000000000000000000000000000008056C00000000000000000000000000000000000000000008056400000000000000000000000000080564000000000008056C0000000000000000000000000008056C0 +0103000000010000000500000000000000000034400000000000000000000000000000344000000000000024C00000000000003E4000000000000024C00000000000003E40000000000000000000000000000034400000000000000000|0 +0103000000010000000500000000000000000044400000000000000000000000000000444000000000000024C0000000000000494000000000000024C00000000000004940000000000000000000000000000044400000000000000000|0 +010300000001000000050000000000000000004E4000000000000000000000000000004E4000000000000024C0000000000080514000000000000024C0000000000080514000000000000000000000000000004E400000000000000000|0 +01030000000100000005000000000000000000000000000000000034C000000000000000000000000000003EC000000000000024400000000000003EC0000000000000244000000000000034C0000000000000000000000000000034C0|0 +01030000000100000005000000000000000000344000000000000034C000000000000034400000000000003EC00000000000003E400000000000003EC00000000000003E4000000000000034C0000000000000344000000000000034C0|0 +01030000000100000005000000000000000000444000000000000034C000000000000044400000000000003EC000000000000049400000000000003EC0000000000000494000000000000034C0000000000000444000000000000034C0|0 +010300000001000000050000000000000000004E4000000000000034C00000000000004E400000000000003EC000000000008051400000000000003EC0000000000080514000000000000034C00000000000004E4000000000000034C0|0 +01030000000100000005000000000000000000544000000000000034C000000000000054400000000000003EC000000000008056400000000000003EC0000000000080564000000000000034C0000000000000544000000000000034C0|0 +01030000000100000005000000000000000000000000000000000044C0000000000000000000000000000049C0000000000000244000000000000049C0000000000000244000000000000044C0000000000000000000000000000044C0|0 +01030000000100000005000000000000000000344000000000000044C0000000000000344000000000000049C00000000000003E4000000000000049C00000000000003E4000000000000044C0000000000000344000000000000044C0|0 +01030000000100000005000000000000000000444000000000000044C0000000000000444000000000000049C0000000000000494000000000000049C0000000000000494000000000000044C0000000000000444000000000000044C0|0 +010300000001000000050000000000000000004E4000000000000044C00000000000004E4000000000000049C0000000000080514000000000000049C0000000000080514000000000000044C00000000000004E4000000000000044C0|0 +01030000000100000005000000000000000000544000000000000044C0000000000000544000000000000049C0000000000080564000000000000049C0000000000080564000000000000044C0000000000000544000000000000044C0|0 +0103000000010000000500000000000000000000000000000000004EC0000000000000000000000000008051C0000000000000244000000000008051C000000000000024400000000000004EC000000000000000000000000000004EC0|0 +0103000000010000000500000000000000000034400000000000004EC0000000000000344000000000008051C00000000000003E4000000000008051C00000000000003E400000000000004EC000000000000034400000000000004EC0|0 +0103000000010000000500000000000000000044400000000000004EC0000000000000444000000000008051C0000000000000494000000000008051C000000000000049400000000000004EC000000000000044400000000000004EC0|0 +010300000001000000050000000000000000004E400000000000004EC00000000000004E4000000000008051C0000000000080514000000000008051C000000000008051400000000000004EC00000000000004E400000000000004EC0|0 +0103000000010000000500000000000000000054400000000000004EC0000000000000544000000000008051C0000000000080564000000000008051C000000000008056400000000000004EC000000000000054400000000000004EC0|0 +01030000000A0000004000000000000000000000000000000000000000000000000000000000000000000034C0000000000000244000000000000034C000000000000024400000000000003EC000000000000022400000000000003EC000000000000000000000000000003EC0000000000000000000000000000044C0000000000000244000000000000044C0000000000000244000000000000049C0000000000000224000000000000049C0000000000000000000000000000049C000000000000000000000000000004EC000000000000024400000000000004EC0000000000000244000000000008051C0000000000000224000000000008051C0000000000000000000000000008051C0000000000000000000000000000054C0000000000000244000000000000054C0000000000000244000000000008056C0000000000000344000000000008056C0000000000000344000000000000054C00000000000003E4000000000000054C00000000000003E4000000000008056C0000000000000444000000000008056C0000000000000444000000000000054C0000000000000494000000000000054C0000000000000494000000000008056C00000000000004E4000000000008056C00000000000004E4000000000000054C0000000000080514000000000000054C0000000000080514000000000008056C0000000000000544000000000008056C0000000000000544000000000000054C0000000000040564000000000000054C0000000000080564000000000000054C0000000000080564000000000008051C0000000000000544000000000008051C000000000000054400000000000004EC000000000004056400000000000004EC000000000008056400000000000004EC0000000000080564000000000000049C0000000000000544000000000000049C0000000000000544000000000000044C0000000000040564000000000000044C0000000000080564000000000000044C000000000008056400000000000003EC000000000000054400000000000003EC0000000000000544000000000000034C0000000000040564000000000000034C0000000000080564000000000000034C00000000000805640000000000000000000000000008051400000000000000000000000000080514000000000000024C00000000000004E4000000000000024C00000000000004E40000000000000000000000000000049400000000000000000000000000000494000000000000024C0000000000000444000000000000024C0000000000000444000000000000000000000000000003E4000000000000000000000000000003E4000000000000024C0000000000000344000000000000024C0000000000000344000000000000000000000000000000000000000000000000005000000000000000000344000000000000044C00000000000003E4000000000000044C00000000000003E4000000000000049C0000000000000344000000000000049C0000000000000344000000000000044C005000000000000000000444000000000000044C0000000000000444000000000000049C0000000000000494000000000000049C0000000000000494000000000000044C0000000000000444000000000000044C0050000000000000000004E400000000000004EC00000000000004E4000000000008051C0000000000080514000000000008051C000000000008051400000000000004EC00000000000004E400000000000004EC0050000000000000000004E4000000000000044C00000000000004E4000000000000049C0000000000080514000000000000049C0000000000080514000000000000044C00000000000004E4000000000000044C00500000000000000000044400000000000004EC0000000000000444000000000008051C0000000000000494000000000008051C000000000000049400000000000004EC000000000000044400000000000004EC00500000000000000000034400000000000004EC00000000000003E400000000000004EC00000000000003E4000000000008051C0000000000000344000000000008051C000000000000034400000000000004EC0050000000000000000004E4000000000000034C0000000000080514000000000000034C000000000008051400000000000003EC00000000000004E400000000000003EC00000000000004E4000000000000034C005000000000000000000344000000000000034C000000000000034400000000000003EC00000000000003E400000000000003EC00000000000003E4000000000000034C0000000000000344000000000000034C005000000000000000000444000000000000034C0000000000000494000000000000034C000000000000049400000000000003EC000000000000044400000000000003EC0000000000000444000000000000034C0|255 +01030000000100000005000000000000000000000000000000000054C0000000000000000000000000008056C0000000000000244000000000008056C0000000000000244000000000000054C0000000000000000000000000000054C0|0 +01030000000100000005000000000000000000344000000000000054C0000000000000344000000000008056C00000000000003E4000000000008056C00000000000003E4000000000000054C0000000000000344000000000000054C0|0 +01030000000100000005000000000000000000444000000000000054C0000000000000444000000000008056C0000000000000494000000000008056C0000000000000494000000000000054C0000000000000444000000000000054C0|0 +010300000001000000050000000000000000004E4000000000000054C00000000000004E4000000000008056C0000000000080514000000000008056C0000000000080514000000000000054C00000000000004E4000000000000054C0|0 +01030000000100000005000000000000000000544000000000000054C0000000000000544000000000008056C0000000000080564000000000008056C0000000000080564000000000000054C0000000000000544000000000000054C0|0 +0103000000010000000500000000000000000000000000000000000000000000000000000000000000000024C0000000000000244000000000000024C00000000000002440000000000000000000000000000000000000000000000000|0 +0103000000010000000500000000000000000034400000000000000000000000000000344000000000000024C00000000000003E4000000000000024C00000000000003E40000000000000000000000000000034400000000000000000|0 +0103000000010000000500000000000000000044400000000000000000000000000000444000000000000024C0000000000000494000000000000024C00000000000004940000000000000000000000000000044400000000000000000|0 +010300000001000000050000000000000000004E4000000000000000000000000000004E4000000000000024C0000000000080514000000000000024C0000000000080514000000000000000000000000000004E400000000000000000|0 +01030000000100000005000000000000000000000000000000000034C000000000000000000000000000003EC000000000000024400000000000003EC0000000000000244000000000000034C0000000000000000000000000000034C0|0 +01030000000100000005000000000000000000344000000000000034C000000000000034400000000000003EC00000000000003E400000000000003EC00000000000003E4000000000000034C0000000000000344000000000000034C0|0 +01030000000100000005000000000000000000444000000000000034C000000000000044400000000000003EC000000000000049400000000000003EC0000000000000494000000000000034C0000000000000444000000000000034C0|0 +010300000001000000050000000000000000004E4000000000000034C00000000000004E400000000000003EC000000000008051400000000000003EC0000000000080514000000000000034C00000000000004E4000000000000034C0|0 +01030000000100000005000000000000000000544000000000000034C000000000000054400000000000003EC000000000008056400000000000003EC0000000000080564000000000000034C0000000000000544000000000000034C0|0 +01030000000100000005000000000000000000000000000000000044C0000000000000000000000000000049C0000000000000244000000000000049C0000000000000244000000000000044C0000000000000000000000000000044C0|0 +01030000000100000005000000000000000000344000000000000044C0000000000000344000000000000049C00000000000003E4000000000000049C00000000000003E4000000000000044C0000000000000344000000000000044C0|0 +01030000000100000005000000000000000000444000000000000044C0000000000000444000000000000049C0000000000000494000000000000049C0000000000000494000000000000044C0000000000000444000000000000044C0|0 +010300000001000000050000000000000000004E4000000000000044C00000000000004E4000000000000049C0000000000080514000000000000049C0000000000080514000000000000044C00000000000004E4000000000000044C0|0 +01030000000100000005000000000000000000544000000000000044C0000000000000544000000000000049C0000000000080564000000000000049C0000000000080564000000000000044C0000000000000544000000000000044C0|0 +0103000000010000000500000000000000000000000000000000004EC0000000000000000000000000008051C0000000000000244000000000008051C000000000000024400000000000004EC000000000000000000000000000004EC0|0 +0103000000010000000500000000000000000034400000000000004EC0000000000000344000000000008051C00000000000003E4000000000008051C00000000000003E400000000000004EC000000000000034400000000000004EC0|0 +0103000000010000000500000000000000000044400000000000004EC0000000000000444000000000008051C0000000000000494000000000008051C000000000000049400000000000004EC000000000000044400000000000004EC0|0 +010300000001000000050000000000000000004E400000000000004EC00000000000004E4000000000008051C0000000000080514000000000008051C000000000008051400000000000004EC00000000000004E400000000000004EC0|0 +0103000000010000000500000000000000000054400000000000004EC0000000000000544000000000008051C0000000000080564000000000008051C000000000008056400000000000004EC000000000000054400000000000004EC0|0 +01030000000A0000004100000000000000000024400000000000000000000000000000244000000000000024C0000000000000224000000000000024C0000000000000000000000000000024C0000000000000000000000000000034C0000000000000244000000000000034C000000000000024400000000000003EC000000000000022400000000000003EC000000000000000000000000000003EC0000000000000000000000000000044C0000000000000244000000000000044C0000000000000244000000000000049C0000000000000224000000000000049C0000000000000000000000000000049C000000000000000000000000000004EC000000000000024400000000000004EC0000000000000244000000000008051C0000000000000224000000000008051C0000000000000000000000000008051C0000000000000000000000000008056C0000000000000344000000000008056C0000000000000344000000000000054C00000000000003E4000000000000054C00000000000003E4000000000008056C0000000000000444000000000008056C0000000000000444000000000000054C0000000000000494000000000000054C0000000000000494000000000008056C00000000000004E4000000000008056C00000000000004E4000000000000054C0000000000080514000000000000054C0000000000080514000000000008056C0000000000000544000000000008056C0000000000000544000000000000054C0000000000040564000000000000054C0000000000080564000000000000054C0000000000080564000000000008051C0000000000000544000000000008051C000000000000054400000000000004EC000000000004056400000000000004EC000000000008056400000000000004EC0000000000080564000000000000049C0000000000000544000000000000049C0000000000000544000000000000044C0000000000040564000000000000044C0000000000080564000000000000044C000000000008056400000000000003EC000000000000054400000000000003EC0000000000000544000000000000034C0000000000040564000000000000034C0000000000080564000000000000034C00000000000805640000000000000000000000000008051400000000000000000000000000080514000000000000024C00000000000004E4000000000000024C00000000000004E40000000000000000000000000000049400000000000000000000000000000494000000000000024C0000000000000444000000000000024C0000000000000444000000000000000000000000000003E4000000000000000000000000000003E4000000000000024C0000000000000344000000000000024C00000000000003440000000000000000000000000000024400000000000000000050000000000000000004E400000000000004EC00000000000004E4000000000008051C0000000000080514000000000008051C000000000008051400000000000004EC00000000000004E400000000000004EC005000000000000000000344000000000000044C0000000000000344000000000000049C00000000000003E4000000000000049C00000000000003E4000000000000044C0000000000000344000000000000044C00500000000000000000034400000000000004EC00000000000003E400000000000004EC00000000000003E4000000000008051C0000000000000344000000000008051C000000000000034400000000000004EC005000000000000000000444000000000000044C0000000000000444000000000000049C0000000000000494000000000000049C0000000000000494000000000000044C0000000000000444000000000000044C0050000000000000000004E4000000000000034C0000000000080514000000000000034C000000000008051400000000000003EC00000000000004E400000000000003EC00000000000004E4000000000000034C0050000000000000000004E4000000000000044C00000000000004E4000000000000049C0000000000080514000000000000049C0000000000080514000000000000044C00000000000004E4000000000000044C005000000000000000000444000000000000034C0000000000000494000000000000034C000000000000049400000000000003EC000000000000044400000000000003EC0000000000000444000000000000034C00500000000000000000044400000000000004EC000000000000049400000000000004EC0000000000000494000000000008051C0000000000000444000000000008051C000000000000044400000000000004EC005000000000000000000344000000000000034C00000000000003E4000000000000034C00000000000003E400000000000003EC000000000000034400000000000003EC0000000000000344000000000000034C0|255 +01030000000100000005000000000000000000344000000000000054C0000000000000344000000000008056C00000000000003E4000000000008056C00000000000003E4000000000000054C0000000000000344000000000000054C0|0 +01030000000100000005000000000000000000444000000000000054C0000000000000444000000000008056C0000000000000494000000000008056C0000000000000494000000000000054C0000000000000444000000000000054C0|0 +010300000001000000050000000000000000004E4000000000000054C00000000000004E4000000000008056C0000000000080514000000000008056C0000000000080514000000000000054C00000000000004E4000000000000054C0|0 +01030000000100000005000000000000000000544000000000000054C0000000000000544000000000008056C0000000000080564000000000008056C0000000000080564000000000000054C0000000000000544000000000000054C0|0 +0103000000010000000500000000000000000000000000000000000000000000000000000000000000000024C0000000000000244000000000000024C00000000000002440000000000000000000000000000000000000000000000000|0 +0103000000010000000500000000000000000034400000000000000000000000000000344000000000000024C00000000000003E4000000000000024C00000000000003E40000000000000000000000000000034400000000000000000|0 +0103000000010000000500000000000000000044400000000000000000000000000000444000000000000024C0000000000000494000000000000024C00000000000004940000000000000000000000000000044400000000000000000|0 +010300000001000000050000000000000000004E4000000000000000000000000000004E4000000000000024C0000000000080514000000000000024C0000000000080514000000000000000000000000000004E400000000000000000|0 +0103000000010000000500000000000000000054400000000000000000000000000000544000000000000024C0000000000080564000000000000024C00000000000805640000000000000000000000000000054400000000000000000|0 +01030000000100000005000000000000000000000000000000000034C000000000000000000000000000003EC000000000000024400000000000003EC0000000000000244000000000000034C0000000000000000000000000000034C0|0 +01030000000100000005000000000000000000344000000000000034C000000000000034400000000000003EC00000000000003E400000000000003EC00000000000003E4000000000000034C0000000000000344000000000000034C0|0 +01030000000100000005000000000000000000444000000000000034C000000000000044400000000000003EC000000000000049400000000000003EC0000000000000494000000000000034C0000000000000444000000000000034C0|0 +010300000001000000050000000000000000004E4000000000000034C00000000000004E400000000000003EC000000000008051400000000000003EC0000000000080514000000000000034C00000000000004E4000000000000034C0|0 +01030000000100000005000000000000000000544000000000000034C000000000000054400000000000003EC000000000008056400000000000003EC0000000000080564000000000000034C0000000000000544000000000000034C0|0 +01030000000100000005000000000000000000000000000000000044C0000000000000000000000000000049C0000000000000244000000000000049C0000000000000244000000000000044C0000000000000000000000000000044C0|0 +01030000000100000005000000000000000000344000000000000044C0000000000000344000000000000049C00000000000003E4000000000000049C00000000000003E4000000000000044C0000000000000344000000000000044C0|0 +01030000000100000005000000000000000000444000000000000044C0000000000000444000000000000049C0000000000000494000000000000049C0000000000000494000000000000044C0000000000000444000000000000044C0|0 +010300000001000000050000000000000000004E4000000000000044C00000000000004E4000000000000049C0000000000080514000000000000049C0000000000080514000000000000044C00000000000004E4000000000000044C0|0 +01030000000100000005000000000000000000544000000000000044C0000000000000544000000000000049C0000000000080564000000000000049C0000000000080564000000000000044C0000000000000544000000000000044C0|0 +0103000000010000000500000000000000000000000000000000004EC0000000000000000000000000008051C0000000000000244000000000008051C000000000000024400000000000004EC000000000000000000000000000004EC0|0 +0103000000010000000500000000000000000034400000000000004EC0000000000000344000000000008051C00000000000003E4000000000008051C00000000000003E400000000000004EC000000000000034400000000000004EC0|0 +0103000000010000000500000000000000000044400000000000004EC0000000000000444000000000008051C0000000000000494000000000008051C000000000000049400000000000004EC000000000000044400000000000004EC0|0 +010300000001000000050000000000000000004E400000000000004EC00000000000004E4000000000008051C0000000000080514000000000008051C000000000008051400000000000004EC00000000000004E400000000000004EC0|0 +0103000000010000000500000000000000000054400000000000004EC0000000000000544000000000008051C0000000000080564000000000008051C000000000008056400000000000004EC000000000000054400000000000004EC0|0 +01030000000A0000004300000000000000000024400000000000000000000000000000244000000000000024C0000000000000224000000000000024C0000000000000000000000000000024C0000000000000000000000000000034C0000000000000244000000000000034C000000000000024400000000000003EC000000000000022400000000000003EC000000000000000000000000000003EC0000000000000000000000000000044C0000000000000244000000000000044C0000000000000244000000000000049C0000000000000224000000000000049C0000000000000000000000000000049C000000000000000000000000000004EC000000000000024400000000000004EC0000000000000244000000000008051C0000000000000224000000000008051C0000000000000000000000000008051C0000000000000000000000000000054C0000000000000244000000000000054C0000000000000244000000000008056C0000000000000344000000000008056C0000000000000344000000000000054C00000000000003E4000000000000054C00000000000003E4000000000008056C0000000000000444000000000008056C0000000000000444000000000000054C0000000000000494000000000000054C0000000000000494000000000008056C00000000000004E4000000000008056C00000000000004E4000000000000054C0000000000080514000000000000054C0000000000080514000000000008056C0000000000040564000000000008056C0000000000080564000000000008056C0000000000080564000000000008051C0000000000000544000000000008051C000000000000054400000000000004EC000000000004056400000000000004EC000000000008056400000000000004EC0000000000080564000000000000049C0000000000000544000000000000049C0000000000000544000000000000044C0000000000040564000000000000044C0000000000080564000000000000044C000000000008056400000000000003EC000000000000054400000000000003EC0000000000000544000000000000034C0000000000040564000000000000034C0000000000080564000000000000034C0000000000080564000000000000024C0000000000000544000000000000024C00000000000005440000000000000000000000000008051400000000000000000000000000080514000000000000024C00000000000004E4000000000000024C00000000000004E40000000000000000000000000000049400000000000000000000000000000494000000000000024C0000000000000444000000000000024C0000000000000444000000000000000000000000000003E4000000000000000000000000000003E4000000000000024C0000000000000344000000000000024C00000000000003440000000000000000000000000000024400000000000000000050000000000000000004E400000000000004EC00000000000004E4000000000008051C0000000000080514000000000008051C000000000008051400000000000004EC00000000000004E400000000000004EC005000000000000000000344000000000000044C0000000000000344000000000000049C00000000000003E4000000000000049C00000000000003E4000000000000044C0000000000000344000000000000044C00500000000000000000034400000000000004EC00000000000003E400000000000004EC00000000000003E4000000000008051C0000000000000344000000000008051C000000000000034400000000000004EC005000000000000000000444000000000000044C0000000000000444000000000000049C0000000000000494000000000000049C0000000000000494000000000000044C0000000000000444000000000000044C0050000000000000000004E4000000000000034C0000000000080514000000000000034C000000000008051400000000000003EC00000000000004E400000000000003EC00000000000004E4000000000000034C0050000000000000000004E4000000000000044C00000000000004E4000000000000049C0000000000080514000000000000049C0000000000080514000000000000044C00000000000004E4000000000000044C005000000000000000000444000000000000034C0000000000000494000000000000034C000000000000049400000000000003EC000000000000044400000000000003EC0000000000000444000000000000034C00500000000000000000044400000000000004EC000000000000049400000000000004EC0000000000000494000000000008051C0000000000000444000000000008051C000000000000044400000000000004EC005000000000000000000344000000000000034C00000000000003E4000000000000034C00000000000003E400000000000003EC000000000000034400000000000003EC0000000000000344000000000000034C0|255 +01030000000100000005000000000000000000000000000000000054C0000000000000000000000000008056C0000000000000244000000000008056C0000000000000244000000000000054C0000000000000000000000000000054C0|0 +01030000000100000005000000000000000000344000000000000054C0000000000000344000000000008056C00000000000003E4000000000008056C00000000000003E4000000000000054C0000000000000344000000000000054C0|0 +01030000000100000005000000000000000000444000000000000054C0000000000000444000000000008056C0000000000000494000000000008056C0000000000000494000000000000054C0000000000000444000000000000054C0|0 +010300000001000000050000000000000000004E4000000000000054C00000000000004E4000000000008056C0000000000080514000000000008056C0000000000080514000000000000054C00000000000004E4000000000000054C0|0 diff -Nru postgis-1.5.3/raster/test/regress/loader/Basic.select.sql postgis-2.0.1/raster/test/regress/loader/Basic.select.sql --- postgis-1.5.3/raster/test/regress/loader/Basic.select.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/loader/Basic.select.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,4 @@ +SELECT srid, scale_x::numeric(16, 10), scale_y::numeric(16, 10), blocksize_x, blocksize_y, same_alignment, regular_blocking, num_bands, pixel_types, nodata_values::numeric(16,10)[], out_db, extent FROM raster_columns WHERE r_table_name = 'loadedrast' AND r_raster_column = 'the_rast'; +SELECT geom, val FROM (SELECT (ST_DumpAsPolygons(the_rast, 1)).* FROM loadedrast) foo; +SELECT geom, val FROM (SELECT (ST_DumpAsPolygons(the_rast, 2)).* FROM loadedrast) foo; +SELECT geom, val FROM (SELECT (ST_DumpAsPolygons(the_rast, 3)).* FROM loadedrast) foo; diff -Nru postgis-1.5.3/raster/test/regress/loader/Basic.sql.expected postgis-2.0.1/raster/test/regress/loader/Basic.sql.expected --- postgis-1.5.3/raster/test/regress/loader/Basic.sql.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/loader/Basic.sql.expected 2012-02-08 16:11:13.000000000 +0000 @@ -0,0 +1,5 @@ +BEGIN; +CREATE TABLE "loadedrast" ("rid" serial PRIMARY KEY,"the_rast" raster); +INSERT INTO "loadedrast" ("the_rast") VALUES ('0100000300000000000000F03F000000000000F0BF0000000000000000000000000000000000000000000000000000000000000000000000005A005A000400FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000040000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000040000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF'::raster); +SELECT AddRasterConstraints('','loadedrast','the_rast',TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,FALSE,TRUE,TRUE,TRUE,TRUE,TRUE); +END; diff -Nru postgis-1.5.3/raster/test/regress/loader/BasicCopy-post.sh postgis-2.0.1/raster/test/regress/loader/BasicCopy-post.sh --- postgis-1.5.3/raster/test/regress/loader/BasicCopy-post.sh 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/loader/BasicCopy-post.sh 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1 @@ +rm -f loader/BasicCopy.tif diff -Nru postgis-1.5.3/raster/test/regress/loader/BasicCopy-pre.sh postgis-2.0.1/raster/test/regress/loader/BasicCopy-pre.sh --- postgis-1.5.3/raster/test/regress/loader/BasicCopy-pre.sh 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/loader/BasicCopy-pre.sh 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1 @@ +cp loader/testraster.tif loader/BasicCopy.tif diff -Nru postgis-1.5.3/raster/test/regress/loader/BasicCopy.opts postgis-2.0.1/raster/test/regress/loader/BasicCopy.opts --- postgis-1.5.3/raster/test/regress/loader/BasicCopy.opts 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/loader/BasicCopy.opts 2012-02-08 16:11:13.000000000 +0000 @@ -0,0 +1 @@ +-Y diff -Nru postgis-1.5.3/raster/test/regress/loader/BasicCopy.select.expected postgis-2.0.1/raster/test/regress/loader/BasicCopy.select.expected --- postgis-1.5.3/raster/test/regress/loader/BasicCopy.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/loader/BasicCopy.select.expected 2012-02-08 16:11:13.000000000 +0000 @@ -0,0 +1,74 @@ +0|1.0000000000|-1.0000000000|90|90|t|f|3|{8BUI,8BUI,8BUI}|{NULL,NULL,NULL}|{f,f,f}|01030000000100000005000000000000000000000000000000008056C00000000000000000000000000000000000000000008056400000000000000000000000000080564000000000008056C0000000000000000000000000008056C0 +0103000000010000000500000000000000000034400000000000000000000000000000344000000000000024C00000000000003E4000000000000024C00000000000003E40000000000000000000000000000034400000000000000000|0 +0103000000010000000500000000000000000044400000000000000000000000000000444000000000000024C0000000000000494000000000000024C00000000000004940000000000000000000000000000044400000000000000000|0 +010300000001000000050000000000000000004E4000000000000000000000000000004E4000000000000024C0000000000080514000000000000024C0000000000080514000000000000000000000000000004E400000000000000000|0 +01030000000100000005000000000000000000000000000000000034C000000000000000000000000000003EC000000000000024400000000000003EC0000000000000244000000000000034C0000000000000000000000000000034C0|0 +01030000000100000005000000000000000000344000000000000034C000000000000034400000000000003EC00000000000003E400000000000003EC00000000000003E4000000000000034C0000000000000344000000000000034C0|0 +01030000000100000005000000000000000000444000000000000034C000000000000044400000000000003EC000000000000049400000000000003EC0000000000000494000000000000034C0000000000000444000000000000034C0|0 +010300000001000000050000000000000000004E4000000000000034C00000000000004E400000000000003EC000000000008051400000000000003EC0000000000080514000000000000034C00000000000004E4000000000000034C0|0 +01030000000100000005000000000000000000544000000000000034C000000000000054400000000000003EC000000000008056400000000000003EC0000000000080564000000000000034C0000000000000544000000000000034C0|0 +01030000000100000005000000000000000000000000000000000044C0000000000000000000000000000049C0000000000000244000000000000049C0000000000000244000000000000044C0000000000000000000000000000044C0|0 +01030000000100000005000000000000000000344000000000000044C0000000000000344000000000000049C00000000000003E4000000000000049C00000000000003E4000000000000044C0000000000000344000000000000044C0|0 +01030000000100000005000000000000000000444000000000000044C0000000000000444000000000000049C0000000000000494000000000000049C0000000000000494000000000000044C0000000000000444000000000000044C0|0 +010300000001000000050000000000000000004E4000000000000044C00000000000004E4000000000000049C0000000000080514000000000000049C0000000000080514000000000000044C00000000000004E4000000000000044C0|0 +01030000000100000005000000000000000000544000000000000044C0000000000000544000000000000049C0000000000080564000000000000049C0000000000080564000000000000044C0000000000000544000000000000044C0|0 +0103000000010000000500000000000000000000000000000000004EC0000000000000000000000000008051C0000000000000244000000000008051C000000000000024400000000000004EC000000000000000000000000000004EC0|0 +0103000000010000000500000000000000000034400000000000004EC0000000000000344000000000008051C00000000000003E4000000000008051C00000000000003E400000000000004EC000000000000034400000000000004EC0|0 +0103000000010000000500000000000000000044400000000000004EC0000000000000444000000000008051C0000000000000494000000000008051C000000000000049400000000000004EC000000000000044400000000000004EC0|0 +010300000001000000050000000000000000004E400000000000004EC00000000000004E4000000000008051C0000000000080514000000000008051C000000000008051400000000000004EC00000000000004E400000000000004EC0|0 +0103000000010000000500000000000000000054400000000000004EC0000000000000544000000000008051C0000000000080564000000000008051C000000000008056400000000000004EC000000000000054400000000000004EC0|0 +01030000000A0000004000000000000000000000000000000000000000000000000000000000000000000034C0000000000000244000000000000034C000000000000024400000000000003EC000000000000022400000000000003EC000000000000000000000000000003EC0000000000000000000000000000044C0000000000000244000000000000044C0000000000000244000000000000049C0000000000000224000000000000049C0000000000000000000000000000049C000000000000000000000000000004EC000000000000024400000000000004EC0000000000000244000000000008051C0000000000000224000000000008051C0000000000000000000000000008051C0000000000000000000000000000054C0000000000000244000000000000054C0000000000000244000000000008056C0000000000000344000000000008056C0000000000000344000000000000054C00000000000003E4000000000000054C00000000000003E4000000000008056C0000000000000444000000000008056C0000000000000444000000000000054C0000000000000494000000000000054C0000000000000494000000000008056C00000000000004E4000000000008056C00000000000004E4000000000000054C0000000000080514000000000000054C0000000000080514000000000008056C0000000000000544000000000008056C0000000000000544000000000000054C0000000000040564000000000000054C0000000000080564000000000000054C0000000000080564000000000008051C0000000000000544000000000008051C000000000000054400000000000004EC000000000004056400000000000004EC000000000008056400000000000004EC0000000000080564000000000000049C0000000000000544000000000000049C0000000000000544000000000000044C0000000000040564000000000000044C0000000000080564000000000000044C000000000008056400000000000003EC000000000000054400000000000003EC0000000000000544000000000000034C0000000000040564000000000000034C0000000000080564000000000000034C00000000000805640000000000000000000000000008051400000000000000000000000000080514000000000000024C00000000000004E4000000000000024C00000000000004E40000000000000000000000000000049400000000000000000000000000000494000000000000024C0000000000000444000000000000024C0000000000000444000000000000000000000000000003E4000000000000000000000000000003E4000000000000024C0000000000000344000000000000024C0000000000000344000000000000000000000000000000000000000000000000005000000000000000000344000000000000044C00000000000003E4000000000000044C00000000000003E4000000000000049C0000000000000344000000000000049C0000000000000344000000000000044C005000000000000000000444000000000000044C0000000000000444000000000000049C0000000000000494000000000000049C0000000000000494000000000000044C0000000000000444000000000000044C0050000000000000000004E400000000000004EC00000000000004E4000000000008051C0000000000080514000000000008051C000000000008051400000000000004EC00000000000004E400000000000004EC0050000000000000000004E4000000000000044C00000000000004E4000000000000049C0000000000080514000000000000049C0000000000080514000000000000044C00000000000004E4000000000000044C00500000000000000000044400000000000004EC0000000000000444000000000008051C0000000000000494000000000008051C000000000000049400000000000004EC000000000000044400000000000004EC00500000000000000000034400000000000004EC00000000000003E400000000000004EC00000000000003E4000000000008051C0000000000000344000000000008051C000000000000034400000000000004EC0050000000000000000004E4000000000000034C0000000000080514000000000000034C000000000008051400000000000003EC00000000000004E400000000000003EC00000000000004E4000000000000034C005000000000000000000344000000000000034C000000000000034400000000000003EC00000000000003E400000000000003EC00000000000003E4000000000000034C0000000000000344000000000000034C005000000000000000000444000000000000034C0000000000000494000000000000034C000000000000049400000000000003EC000000000000044400000000000003EC0000000000000444000000000000034C0|255 +01030000000100000005000000000000000000000000000000000054C0000000000000000000000000008056C0000000000000244000000000008056C0000000000000244000000000000054C0000000000000000000000000000054C0|0 +01030000000100000005000000000000000000344000000000000054C0000000000000344000000000008056C00000000000003E4000000000008056C00000000000003E4000000000000054C0000000000000344000000000000054C0|0 +01030000000100000005000000000000000000444000000000000054C0000000000000444000000000008056C0000000000000494000000000008056C0000000000000494000000000000054C0000000000000444000000000000054C0|0 +010300000001000000050000000000000000004E4000000000000054C00000000000004E4000000000008056C0000000000080514000000000008056C0000000000080514000000000000054C00000000000004E4000000000000054C0|0 +01030000000100000005000000000000000000544000000000000054C0000000000000544000000000008056C0000000000080564000000000008056C0000000000080564000000000000054C0000000000000544000000000000054C0|0 +0103000000010000000500000000000000000000000000000000000000000000000000000000000000000024C0000000000000244000000000000024C00000000000002440000000000000000000000000000000000000000000000000|0 +0103000000010000000500000000000000000034400000000000000000000000000000344000000000000024C00000000000003E4000000000000024C00000000000003E40000000000000000000000000000034400000000000000000|0 +0103000000010000000500000000000000000044400000000000000000000000000000444000000000000024C0000000000000494000000000000024C00000000000004940000000000000000000000000000044400000000000000000|0 +010300000001000000050000000000000000004E4000000000000000000000000000004E4000000000000024C0000000000080514000000000000024C0000000000080514000000000000000000000000000004E400000000000000000|0 +01030000000100000005000000000000000000000000000000000034C000000000000000000000000000003EC000000000000024400000000000003EC0000000000000244000000000000034C0000000000000000000000000000034C0|0 +01030000000100000005000000000000000000344000000000000034C000000000000034400000000000003EC00000000000003E400000000000003EC00000000000003E4000000000000034C0000000000000344000000000000034C0|0 +01030000000100000005000000000000000000444000000000000034C000000000000044400000000000003EC000000000000049400000000000003EC0000000000000494000000000000034C0000000000000444000000000000034C0|0 +010300000001000000050000000000000000004E4000000000000034C00000000000004E400000000000003EC000000000008051400000000000003EC0000000000080514000000000000034C00000000000004E4000000000000034C0|0 +01030000000100000005000000000000000000544000000000000034C000000000000054400000000000003EC000000000008056400000000000003EC0000000000080564000000000000034C0000000000000544000000000000034C0|0 +01030000000100000005000000000000000000000000000000000044C0000000000000000000000000000049C0000000000000244000000000000049C0000000000000244000000000000044C0000000000000000000000000000044C0|0 +01030000000100000005000000000000000000344000000000000044C0000000000000344000000000000049C00000000000003E4000000000000049C00000000000003E4000000000000044C0000000000000344000000000000044C0|0 +01030000000100000005000000000000000000444000000000000044C0000000000000444000000000000049C0000000000000494000000000000049C0000000000000494000000000000044C0000000000000444000000000000044C0|0 +010300000001000000050000000000000000004E4000000000000044C00000000000004E4000000000000049C0000000000080514000000000000049C0000000000080514000000000000044C00000000000004E4000000000000044C0|0 +01030000000100000005000000000000000000544000000000000044C0000000000000544000000000000049C0000000000080564000000000000049C0000000000080564000000000000044C0000000000000544000000000000044C0|0 +0103000000010000000500000000000000000000000000000000004EC0000000000000000000000000008051C0000000000000244000000000008051C000000000000024400000000000004EC000000000000000000000000000004EC0|0 +0103000000010000000500000000000000000034400000000000004EC0000000000000344000000000008051C00000000000003E4000000000008051C00000000000003E400000000000004EC000000000000034400000000000004EC0|0 +0103000000010000000500000000000000000044400000000000004EC0000000000000444000000000008051C0000000000000494000000000008051C000000000000049400000000000004EC000000000000044400000000000004EC0|0 +010300000001000000050000000000000000004E400000000000004EC00000000000004E4000000000008051C0000000000080514000000000008051C000000000008051400000000000004EC00000000000004E400000000000004EC0|0 +0103000000010000000500000000000000000054400000000000004EC0000000000000544000000000008051C0000000000080564000000000008051C000000000008056400000000000004EC000000000000054400000000000004EC0|0 +01030000000A0000004100000000000000000024400000000000000000000000000000244000000000000024C0000000000000224000000000000024C0000000000000000000000000000024C0000000000000000000000000000034C0000000000000244000000000000034C000000000000024400000000000003EC000000000000022400000000000003EC000000000000000000000000000003EC0000000000000000000000000000044C0000000000000244000000000000044C0000000000000244000000000000049C0000000000000224000000000000049C0000000000000000000000000000049C000000000000000000000000000004EC000000000000024400000000000004EC0000000000000244000000000008051C0000000000000224000000000008051C0000000000000000000000000008051C0000000000000000000000000008056C0000000000000344000000000008056C0000000000000344000000000000054C00000000000003E4000000000000054C00000000000003E4000000000008056C0000000000000444000000000008056C0000000000000444000000000000054C0000000000000494000000000000054C0000000000000494000000000008056C00000000000004E4000000000008056C00000000000004E4000000000000054C0000000000080514000000000000054C0000000000080514000000000008056C0000000000000544000000000008056C0000000000000544000000000000054C0000000000040564000000000000054C0000000000080564000000000000054C0000000000080564000000000008051C0000000000000544000000000008051C000000000000054400000000000004EC000000000004056400000000000004EC000000000008056400000000000004EC0000000000080564000000000000049C0000000000000544000000000000049C0000000000000544000000000000044C0000000000040564000000000000044C0000000000080564000000000000044C000000000008056400000000000003EC000000000000054400000000000003EC0000000000000544000000000000034C0000000000040564000000000000034C0000000000080564000000000000034C00000000000805640000000000000000000000000008051400000000000000000000000000080514000000000000024C00000000000004E4000000000000024C00000000000004E40000000000000000000000000000049400000000000000000000000000000494000000000000024C0000000000000444000000000000024C0000000000000444000000000000000000000000000003E4000000000000000000000000000003E4000000000000024C0000000000000344000000000000024C00000000000003440000000000000000000000000000024400000000000000000050000000000000000004E400000000000004EC00000000000004E4000000000008051C0000000000080514000000000008051C000000000008051400000000000004EC00000000000004E400000000000004EC005000000000000000000344000000000000044C0000000000000344000000000000049C00000000000003E4000000000000049C00000000000003E4000000000000044C0000000000000344000000000000044C00500000000000000000034400000000000004EC00000000000003E400000000000004EC00000000000003E4000000000008051C0000000000000344000000000008051C000000000000034400000000000004EC005000000000000000000444000000000000044C0000000000000444000000000000049C0000000000000494000000000000049C0000000000000494000000000000044C0000000000000444000000000000044C0050000000000000000004E4000000000000034C0000000000080514000000000000034C000000000008051400000000000003EC00000000000004E400000000000003EC00000000000004E4000000000000034C0050000000000000000004E4000000000000044C00000000000004E4000000000000049C0000000000080514000000000000049C0000000000080514000000000000044C00000000000004E4000000000000044C005000000000000000000444000000000000034C0000000000000494000000000000034C000000000000049400000000000003EC000000000000044400000000000003EC0000000000000444000000000000034C00500000000000000000044400000000000004EC000000000000049400000000000004EC0000000000000494000000000008051C0000000000000444000000000008051C000000000000044400000000000004EC005000000000000000000344000000000000034C00000000000003E4000000000000034C00000000000003E400000000000003EC000000000000034400000000000003EC0000000000000344000000000000034C0|255 +01030000000100000005000000000000000000344000000000000054C0000000000000344000000000008056C00000000000003E4000000000008056C00000000000003E4000000000000054C0000000000000344000000000000054C0|0 +01030000000100000005000000000000000000444000000000000054C0000000000000444000000000008056C0000000000000494000000000008056C0000000000000494000000000000054C0000000000000444000000000000054C0|0 +010300000001000000050000000000000000004E4000000000000054C00000000000004E4000000000008056C0000000000080514000000000008056C0000000000080514000000000000054C00000000000004E4000000000000054C0|0 +01030000000100000005000000000000000000544000000000000054C0000000000000544000000000008056C0000000000080564000000000008056C0000000000080564000000000000054C0000000000000544000000000000054C0|0 +0103000000010000000500000000000000000000000000000000000000000000000000000000000000000024C0000000000000244000000000000024C00000000000002440000000000000000000000000000000000000000000000000|0 +0103000000010000000500000000000000000034400000000000000000000000000000344000000000000024C00000000000003E4000000000000024C00000000000003E40000000000000000000000000000034400000000000000000|0 +0103000000010000000500000000000000000044400000000000000000000000000000444000000000000024C0000000000000494000000000000024C00000000000004940000000000000000000000000000044400000000000000000|0 +010300000001000000050000000000000000004E4000000000000000000000000000004E4000000000000024C0000000000080514000000000000024C0000000000080514000000000000000000000000000004E400000000000000000|0 +0103000000010000000500000000000000000054400000000000000000000000000000544000000000000024C0000000000080564000000000000024C00000000000805640000000000000000000000000000054400000000000000000|0 +01030000000100000005000000000000000000000000000000000034C000000000000000000000000000003EC000000000000024400000000000003EC0000000000000244000000000000034C0000000000000000000000000000034C0|0 +01030000000100000005000000000000000000344000000000000034C000000000000034400000000000003EC00000000000003E400000000000003EC00000000000003E4000000000000034C0000000000000344000000000000034C0|0 +01030000000100000005000000000000000000444000000000000034C000000000000044400000000000003EC000000000000049400000000000003EC0000000000000494000000000000034C0000000000000444000000000000034C0|0 +010300000001000000050000000000000000004E4000000000000034C00000000000004E400000000000003EC000000000008051400000000000003EC0000000000080514000000000000034C00000000000004E4000000000000034C0|0 +01030000000100000005000000000000000000544000000000000034C000000000000054400000000000003EC000000000008056400000000000003EC0000000000080564000000000000034C0000000000000544000000000000034C0|0 +01030000000100000005000000000000000000000000000000000044C0000000000000000000000000000049C0000000000000244000000000000049C0000000000000244000000000000044C0000000000000000000000000000044C0|0 +01030000000100000005000000000000000000344000000000000044C0000000000000344000000000000049C00000000000003E4000000000000049C00000000000003E4000000000000044C0000000000000344000000000000044C0|0 +01030000000100000005000000000000000000444000000000000044C0000000000000444000000000000049C0000000000000494000000000000049C0000000000000494000000000000044C0000000000000444000000000000044C0|0 +010300000001000000050000000000000000004E4000000000000044C00000000000004E4000000000000049C0000000000080514000000000000049C0000000000080514000000000000044C00000000000004E4000000000000044C0|0 +01030000000100000005000000000000000000544000000000000044C0000000000000544000000000000049C0000000000080564000000000000049C0000000000080564000000000000044C0000000000000544000000000000044C0|0 +0103000000010000000500000000000000000000000000000000004EC0000000000000000000000000008051C0000000000000244000000000008051C000000000000024400000000000004EC000000000000000000000000000004EC0|0 +0103000000010000000500000000000000000034400000000000004EC0000000000000344000000000008051C00000000000003E4000000000008051C00000000000003E400000000000004EC000000000000034400000000000004EC0|0 +0103000000010000000500000000000000000044400000000000004EC0000000000000444000000000008051C0000000000000494000000000008051C000000000000049400000000000004EC000000000000044400000000000004EC0|0 +010300000001000000050000000000000000004E400000000000004EC00000000000004E4000000000008051C0000000000080514000000000008051C000000000008051400000000000004EC00000000000004E400000000000004EC0|0 +0103000000010000000500000000000000000054400000000000004EC0000000000000544000000000008051C0000000000080564000000000008051C000000000008056400000000000004EC000000000000054400000000000004EC0|0 +01030000000A0000004300000000000000000024400000000000000000000000000000244000000000000024C0000000000000224000000000000024C0000000000000000000000000000024C0000000000000000000000000000034C0000000000000244000000000000034C000000000000024400000000000003EC000000000000022400000000000003EC000000000000000000000000000003EC0000000000000000000000000000044C0000000000000244000000000000044C0000000000000244000000000000049C0000000000000224000000000000049C0000000000000000000000000000049C000000000000000000000000000004EC000000000000024400000000000004EC0000000000000244000000000008051C0000000000000224000000000008051C0000000000000000000000000008051C0000000000000000000000000000054C0000000000000244000000000000054C0000000000000244000000000008056C0000000000000344000000000008056C0000000000000344000000000000054C00000000000003E4000000000000054C00000000000003E4000000000008056C0000000000000444000000000008056C0000000000000444000000000000054C0000000000000494000000000000054C0000000000000494000000000008056C00000000000004E4000000000008056C00000000000004E4000000000000054C0000000000080514000000000000054C0000000000080514000000000008056C0000000000040564000000000008056C0000000000080564000000000008056C0000000000080564000000000008051C0000000000000544000000000008051C000000000000054400000000000004EC000000000004056400000000000004EC000000000008056400000000000004EC0000000000080564000000000000049C0000000000000544000000000000049C0000000000000544000000000000044C0000000000040564000000000000044C0000000000080564000000000000044C000000000008056400000000000003EC000000000000054400000000000003EC0000000000000544000000000000034C0000000000040564000000000000034C0000000000080564000000000000034C0000000000080564000000000000024C0000000000000544000000000000024C00000000000005440000000000000000000000000008051400000000000000000000000000080514000000000000024C00000000000004E4000000000000024C00000000000004E40000000000000000000000000000049400000000000000000000000000000494000000000000024C0000000000000444000000000000024C0000000000000444000000000000000000000000000003E4000000000000000000000000000003E4000000000000024C0000000000000344000000000000024C00000000000003440000000000000000000000000000024400000000000000000050000000000000000004E400000000000004EC00000000000004E4000000000008051C0000000000080514000000000008051C000000000008051400000000000004EC00000000000004E400000000000004EC005000000000000000000344000000000000044C0000000000000344000000000000049C00000000000003E4000000000000049C00000000000003E4000000000000044C0000000000000344000000000000044C00500000000000000000034400000000000004EC00000000000003E400000000000004EC00000000000003E4000000000008051C0000000000000344000000000008051C000000000000034400000000000004EC005000000000000000000444000000000000044C0000000000000444000000000000049C0000000000000494000000000000049C0000000000000494000000000000044C0000000000000444000000000000044C0050000000000000000004E4000000000000034C0000000000080514000000000000034C000000000008051400000000000003EC00000000000004E400000000000003EC00000000000004E4000000000000034C0050000000000000000004E4000000000000044C00000000000004E4000000000000049C0000000000080514000000000000049C0000000000080514000000000000044C00000000000004E4000000000000044C005000000000000000000444000000000000034C0000000000000494000000000000034C000000000000049400000000000003EC000000000000044400000000000003EC0000000000000444000000000000034C00500000000000000000044400000000000004EC000000000000049400000000000004EC0000000000000494000000000008051C0000000000000444000000000008051C000000000000044400000000000004EC005000000000000000000344000000000000034C00000000000003E4000000000000034C00000000000003E400000000000003EC000000000000034400000000000003EC0000000000000344000000000000034C0|255 +01030000000100000005000000000000000000000000000000000054C0000000000000000000000000008056C0000000000000244000000000008056C0000000000000244000000000000054C0000000000000000000000000000054C0|0 +01030000000100000005000000000000000000344000000000000054C0000000000000344000000000008056C00000000000003E4000000000008056C00000000000003E4000000000000054C0000000000000344000000000000054C0|0 +01030000000100000005000000000000000000444000000000000054C0000000000000444000000000008056C0000000000000494000000000008056C0000000000000494000000000000054C0000000000000444000000000000054C0|0 +010300000001000000050000000000000000004E4000000000000054C00000000000004E4000000000008056C0000000000080514000000000008056C0000000000080514000000000000054C00000000000004E4000000000000054C0|0 diff -Nru postgis-1.5.3/raster/test/regress/loader/BasicCopy.select.sql postgis-2.0.1/raster/test/regress/loader/BasicCopy.select.sql --- postgis-1.5.3/raster/test/regress/loader/BasicCopy.select.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/loader/BasicCopy.select.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,4 @@ +SELECT srid, scale_x::numeric(16, 10), scale_y::numeric(16, 10), blocksize_x, blocksize_y, same_alignment, regular_blocking, num_bands, pixel_types, nodata_values::numeric(16,10)[], out_db, extent FROM raster_columns WHERE r_table_name = 'loadedrast' AND r_raster_column = 'the_rast'; +SELECT geom, val FROM (SELECT (ST_DumpAsPolygons(the_rast, 1)).* FROM loadedrast) foo; +SELECT geom, val FROM (SELECT (ST_DumpAsPolygons(the_rast, 2)).* FROM loadedrast) foo; +SELECT geom, val FROM (SELECT (ST_DumpAsPolygons(the_rast, 3)).* FROM loadedrast) foo; diff -Nru postgis-1.5.3/raster/test/regress/loader/BasicCopy.sql.expected postgis-2.0.1/raster/test/regress/loader/BasicCopy.sql.expected --- postgis-1.5.3/raster/test/regress/loader/BasicCopy.sql.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/loader/BasicCopy.sql.expected 2012-02-08 16:11:13.000000000 +0000 @@ -0,0 +1,7 @@ +BEGIN; +CREATE TABLE "loadedrast" ("rid" serial PRIMARY KEY,"the_rast" raster); +COPY "loadedrast" ("the_rast") FROM stdin; +0100000300000000000000F03F000000000000F0BF0000000000000000000000000000000000000000000000000000000000000000000000005A005A000400FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000040000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000040000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +\. +SELECT AddRasterConstraints('','loadedrast','the_rast',TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,FALSE,TRUE,TRUE,TRUE,TRUE,TRUE); +END; diff -Nru postgis-1.5.3/raster/test/regress/loader/Tiled10x10-post.sh postgis-2.0.1/raster/test/regress/loader/Tiled10x10-post.sh --- postgis-1.5.3/raster/test/regress/loader/Tiled10x10-post.sh 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/loader/Tiled10x10-post.sh 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1 @@ +rm -f loader/Tiled10x10.tif diff -Nru postgis-1.5.3/raster/test/regress/loader/Tiled10x10-pre.sh postgis-2.0.1/raster/test/regress/loader/Tiled10x10-pre.sh --- postgis-1.5.3/raster/test/regress/loader/Tiled10x10-pre.sh 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/loader/Tiled10x10-pre.sh 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1 @@ +cp loader/testraster.tif loader/Tiled10x10.tif diff -Nru postgis-1.5.3/raster/test/regress/loader/Tiled10x10.opts postgis-2.0.1/raster/test/regress/loader/Tiled10x10.opts --- postgis-1.5.3/raster/test/regress/loader/Tiled10x10.opts 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/loader/Tiled10x10.opts 2012-02-08 16:11:13.000000000 +0000 @@ -0,0 +1 @@ +-t 10x10 diff -Nru postgis-1.5.3/raster/test/regress/loader/Tiled10x10.select.expected postgis-2.0.1/raster/test/regress/loader/Tiled10x10.select.expected --- postgis-1.5.3/raster/test/regress/loader/Tiled10x10.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/loader/Tiled10x10.select.expected 2012-02-08 16:11:13.000000000 +0000 @@ -0,0 +1,244 @@ +0|1.0000000000|-1.0000000000|10|10|t|f|3|{8BUI,8BUI,8BUI}|{NULL,NULL,NULL}|{f,f,f}|01030000000100000005000000000000000000000000000000008056C00000000000000000000000000000000000000000008056400000000000000000000000000080564000000000008056C0000000000000000000000000008056C0 +0103000000010000000500000000000000000000000000000000000000000000000000000000000000000024C0000000000000244000000000000024C00000000000002440000000000000000000000000000000000000000000000000|255 +0103000000010000000500000000000000000024400000000000000000000000000000244000000000000024C0000000000000344000000000000024C00000000000003440000000000000000000000000000024400000000000000000|255 +0103000000010000000500000000000000000034400000000000000000000000000000344000000000000024C00000000000003E4000000000000024C00000000000003E40000000000000000000000000000034400000000000000000|0 +010300000001000000050000000000000000003E4000000000000000000000000000003E4000000000000024C0000000000000444000000000000024C0000000000000444000000000000000000000000000003E400000000000000000|255 +0103000000010000000500000000000000000044400000000000000000000000000000444000000000000024C0000000000000494000000000000024C00000000000004940000000000000000000000000000044400000000000000000|0 +0103000000010000000500000000000000000049400000000000000000000000000000494000000000000024C00000000000004E4000000000000024C00000000000004E40000000000000000000000000000049400000000000000000|255 +010300000001000000050000000000000000004E4000000000000000000000000000004E4000000000000024C0000000000080514000000000000024C0000000000080514000000000000000000000000000004E400000000000000000|0 +0103000000010000000500000000000000008051400000000000000000000000000080514000000000000024C0000000000000544000000000000024C00000000000005440000000000000000000000000008051400000000000000000|255 +0103000000010000000500000000000000000054400000000000000000000000000000544000000000000024C0000000000080564000000000000024C00000000000805640000000000000000000000000000054400000000000000000|255 +01030000000100000005000000000000000000000000000000000024C0000000000000000000000000000034C0000000000000244000000000000034C0000000000000244000000000000024C0000000000000000000000000000024C0|255 +01030000000100000005000000000000000000244000000000000024C0000000000000244000000000000034C0000000000000344000000000000034C0000000000000344000000000000024C0000000000000244000000000000024C0|255 +01030000000100000005000000000000000000344000000000000024C0000000000000344000000000000034C00000000000003E4000000000000034C00000000000003E4000000000000024C0000000000000344000000000000024C0|255 +010300000001000000050000000000000000003E4000000000000024C00000000000003E4000000000000034C0000000000000444000000000000034C0000000000000444000000000000024C00000000000003E4000000000000024C0|255 +01030000000100000005000000000000000000444000000000000024C0000000000000444000000000000034C0000000000000494000000000000034C0000000000000494000000000000024C0000000000000444000000000000024C0|255 +01030000000100000005000000000000000000494000000000000024C0000000000000494000000000000034C00000000000004E4000000000000034C00000000000004E4000000000000024C0000000000000494000000000000024C0|255 +010300000001000000050000000000000000004E4000000000000024C00000000000004E4000000000000034C0000000000080514000000000000034C0000000000080514000000000000024C00000000000004E4000000000000024C0|255 +01030000000100000005000000000000000080514000000000000024C0000000000080514000000000000034C0000000000000544000000000000034C0000000000000544000000000000024C0000000000080514000000000000024C0|255 +01030000000100000005000000000000000000544000000000000024C0000000000000544000000000000034C0000000000080564000000000000034C0000000000080564000000000000024C0000000000000544000000000000024C0|255 +01030000000100000005000000000000000000000000000000000034C000000000000000000000000000003EC000000000000024400000000000003EC0000000000000244000000000000034C0000000000000000000000000000034C0|0 +01030000000100000005000000000000000000244000000000000034C000000000000024400000000000003EC000000000000034400000000000003EC0000000000000344000000000000034C0000000000000244000000000000034C0|255 +01030000000100000005000000000000000000344000000000000034C000000000000034400000000000003EC00000000000003E400000000000003EC00000000000003E4000000000000034C0000000000000344000000000000034C0|0 +010300000001000000050000000000000000003E4000000000000034C00000000000003E400000000000003EC000000000000044400000000000003EC0000000000000444000000000000034C00000000000003E4000000000000034C0|255 +01030000000100000005000000000000000000444000000000000034C000000000000044400000000000003EC000000000000049400000000000003EC0000000000000494000000000000034C0000000000000444000000000000034C0|0 +01030000000100000005000000000000000000494000000000000034C000000000000049400000000000003EC00000000000004E400000000000003EC00000000000004E4000000000000034C0000000000000494000000000000034C0|255 +010300000001000000050000000000000000004E4000000000000034C00000000000004E400000000000003EC000000000008051400000000000003EC0000000000080514000000000000034C00000000000004E4000000000000034C0|0 +01030000000100000005000000000000000080514000000000000034C000000000008051400000000000003EC000000000000054400000000000003EC0000000000000544000000000000034C0000000000080514000000000000034C0|255 +01030000000100000005000000000000000000544000000000000034C000000000000054400000000000003EC000000000008056400000000000003EC0000000000080564000000000000034C0000000000000544000000000000034C0|0 +0103000000010000000500000000000000000000000000000000003EC0000000000000000000000000000044C0000000000000244000000000000044C000000000000024400000000000003EC000000000000000000000000000003EC0|255 +0103000000010000000500000000000000000024400000000000003EC0000000000000244000000000000044C0000000000000344000000000000044C000000000000034400000000000003EC000000000000024400000000000003EC0|255 +0103000000010000000500000000000000000034400000000000003EC0000000000000344000000000000044C00000000000003E4000000000000044C00000000000003E400000000000003EC000000000000034400000000000003EC0|255 +010300000001000000050000000000000000003E400000000000003EC00000000000003E4000000000000044C0000000000000444000000000000044C000000000000044400000000000003EC00000000000003E400000000000003EC0|255 +0103000000010000000500000000000000000044400000000000003EC0000000000000444000000000000044C0000000000000494000000000000044C000000000000049400000000000003EC000000000000044400000000000003EC0|255 +0103000000010000000500000000000000000049400000000000003EC0000000000000494000000000000044C00000000000004E4000000000000044C00000000000004E400000000000003EC000000000000049400000000000003EC0|255 +010300000001000000050000000000000000004E400000000000003EC00000000000004E4000000000000044C0000000000080514000000000000044C000000000008051400000000000003EC00000000000004E400000000000003EC0|255 +0103000000010000000500000000000000008051400000000000003EC0000000000080514000000000000044C0000000000000544000000000000044C000000000000054400000000000003EC000000000008051400000000000003EC0|255 +0103000000010000000500000000000000000054400000000000003EC0000000000000544000000000000044C0000000000080564000000000000044C000000000008056400000000000003EC000000000000054400000000000003EC0|255 +01030000000100000005000000000000000000000000000000000044C0000000000000000000000000000049C0000000000000244000000000000049C0000000000000244000000000000044C0000000000000000000000000000044C0|0 +01030000000100000005000000000000000000244000000000000044C0000000000000244000000000000049C0000000000000344000000000000049C0000000000000344000000000000044C0000000000000244000000000000044C0|255 +01030000000100000005000000000000000000344000000000000044C0000000000000344000000000000049C00000000000003E4000000000000049C00000000000003E4000000000000044C0000000000000344000000000000044C0|0 +010300000001000000050000000000000000003E4000000000000044C00000000000003E4000000000000049C0000000000000444000000000000049C0000000000000444000000000000044C00000000000003E4000000000000044C0|255 +01030000000100000005000000000000000000444000000000000044C0000000000000444000000000000049C0000000000000494000000000000049C0000000000000494000000000000044C0000000000000444000000000000044C0|0 +01030000000100000005000000000000000000494000000000000044C0000000000000494000000000000049C00000000000004E4000000000000049C00000000000004E4000000000000044C0000000000000494000000000000044C0|255 +010300000001000000050000000000000000004E4000000000000044C00000000000004E4000000000000049C0000000000080514000000000000049C0000000000080514000000000000044C00000000000004E4000000000000044C0|0 +01030000000100000005000000000000000080514000000000000044C0000000000080514000000000000049C0000000000000544000000000000049C0000000000000544000000000000044C0000000000080514000000000000044C0|255 +01030000000100000005000000000000000000544000000000000044C0000000000000544000000000000049C0000000000080564000000000000049C0000000000080564000000000000044C0000000000000544000000000000044C0|0 +01030000000100000005000000000000000000000000000000000049C000000000000000000000000000004EC000000000000024400000000000004EC0000000000000244000000000000049C0000000000000000000000000000049C0|255 +01030000000100000005000000000000000000244000000000000049C000000000000024400000000000004EC000000000000034400000000000004EC0000000000000344000000000000049C0000000000000244000000000000049C0|255 +01030000000100000005000000000000000000344000000000000049C000000000000034400000000000004EC00000000000003E400000000000004EC00000000000003E4000000000000049C0000000000000344000000000000049C0|255 +010300000001000000050000000000000000003E4000000000000049C00000000000003E400000000000004EC000000000000044400000000000004EC0000000000000444000000000000049C00000000000003E4000000000000049C0|255 +01030000000100000005000000000000000000444000000000000049C000000000000044400000000000004EC000000000000049400000000000004EC0000000000000494000000000000049C0000000000000444000000000000049C0|255 +01030000000100000005000000000000000000494000000000000049C000000000000049400000000000004EC00000000000004E400000000000004EC00000000000004E4000000000000049C0000000000000494000000000000049C0|255 +010300000001000000050000000000000000004E4000000000000049C00000000000004E400000000000004EC000000000008051400000000000004EC0000000000080514000000000000049C00000000000004E4000000000000049C0|255 +01030000000100000005000000000000000080514000000000000049C000000000008051400000000000004EC000000000000054400000000000004EC0000000000000544000000000000049C0000000000080514000000000000049C0|255 +01030000000100000005000000000000000000544000000000000049C000000000000054400000000000004EC000000000008056400000000000004EC0000000000080564000000000000049C0000000000000544000000000000049C0|255 +0103000000010000000500000000000000000000000000000000004EC0000000000000000000000000008051C0000000000000244000000000008051C000000000000024400000000000004EC000000000000000000000000000004EC0|0 +0103000000010000000500000000000000000024400000000000004EC0000000000000244000000000008051C0000000000000344000000000008051C000000000000034400000000000004EC000000000000024400000000000004EC0|255 +0103000000010000000500000000000000000034400000000000004EC0000000000000344000000000008051C00000000000003E4000000000008051C00000000000003E400000000000004EC000000000000034400000000000004EC0|0 +010300000001000000050000000000000000003E400000000000004EC00000000000003E4000000000008051C0000000000000444000000000008051C000000000000044400000000000004EC00000000000003E400000000000004EC0|255 +0103000000010000000500000000000000000044400000000000004EC0000000000000444000000000008051C0000000000000494000000000008051C000000000000049400000000000004EC000000000000044400000000000004EC0|0 +0103000000010000000500000000000000000049400000000000004EC0000000000000494000000000008051C00000000000004E4000000000008051C00000000000004E400000000000004EC000000000000049400000000000004EC0|255 +010300000001000000050000000000000000004E400000000000004EC00000000000004E4000000000008051C0000000000080514000000000008051C000000000008051400000000000004EC00000000000004E400000000000004EC0|0 +0103000000010000000500000000000000008051400000000000004EC0000000000080514000000000008051C0000000000000544000000000008051C000000000000054400000000000004EC000000000008051400000000000004EC0|255 +0103000000010000000500000000000000000054400000000000004EC0000000000000544000000000008051C0000000000080564000000000008051C000000000008056400000000000004EC000000000000054400000000000004EC0|0 +01030000000100000005000000000000000000000000000000008051C0000000000000000000000000000054C0000000000000244000000000000054C0000000000000244000000000008051C0000000000000000000000000008051C0|255 +01030000000100000005000000000000000000244000000000008051C0000000000000244000000000000054C0000000000000344000000000000054C0000000000000344000000000008051C0000000000000244000000000008051C0|255 +01030000000100000005000000000000000000344000000000008051C0000000000000344000000000000054C00000000000003E4000000000000054C00000000000003E4000000000008051C0000000000000344000000000008051C0|255 +010300000001000000050000000000000000003E4000000000008051C00000000000003E4000000000000054C0000000000000444000000000000054C0000000000000444000000000008051C00000000000003E4000000000008051C0|255 +01030000000100000005000000000000000000444000000000008051C0000000000000444000000000000054C0000000000000494000000000000054C0000000000000494000000000008051C0000000000000444000000000008051C0|255 +01030000000100000005000000000000000000494000000000008051C0000000000000494000000000000054C00000000000004E4000000000000054C00000000000004E4000000000008051C0000000000000494000000000008051C0|255 +010300000001000000050000000000000000004E4000000000008051C00000000000004E4000000000000054C0000000000080514000000000000054C0000000000080514000000000008051C00000000000004E4000000000008051C0|255 +01030000000100000005000000000000000080514000000000008051C0000000000080514000000000000054C0000000000000544000000000000054C0000000000000544000000000008051C0000000000080514000000000008051C0|255 +01030000000100000005000000000000000000544000000000008051C0000000000000544000000000000054C0000000000080564000000000000054C0000000000080564000000000008051C0000000000000544000000000008051C0|255 +01030000000100000005000000000000000000000000000000000054C0000000000000000000000000008056C0000000000000244000000000008056C0000000000000244000000000000054C0000000000000000000000000000054C0|0 +01030000000100000005000000000000000000244000000000000054C0000000000000244000000000008056C0000000000000344000000000008056C0000000000000344000000000000054C0000000000000244000000000000054C0|255 +01030000000100000005000000000000000000344000000000000054C0000000000000344000000000008056C00000000000003E4000000000008056C00000000000003E4000000000000054C0000000000000344000000000000054C0|0 +010300000001000000050000000000000000003E4000000000000054C00000000000003E4000000000008056C0000000000000444000000000008056C0000000000000444000000000000054C00000000000003E4000000000000054C0|255 +01030000000100000005000000000000000000444000000000000054C0000000000000444000000000008056C0000000000000494000000000008056C0000000000000494000000000000054C0000000000000444000000000000054C0|0 +01030000000100000005000000000000000000494000000000000054C0000000000000494000000000008056C00000000000004E4000000000008056C00000000000004E4000000000000054C0000000000000494000000000000054C0|255 +010300000001000000050000000000000000004E4000000000000054C00000000000004E4000000000008056C0000000000080514000000000008056C0000000000080514000000000000054C00000000000004E4000000000000054C0|0 +01030000000100000005000000000000000080514000000000000054C0000000000080514000000000008056C0000000000000544000000000008056C0000000000000544000000000000054C0000000000080514000000000000054C0|255 +01030000000100000005000000000000000000544000000000000054C0000000000000544000000000008056C0000000000080564000000000008056C0000000000080564000000000000054C0000000000000544000000000000054C0|0 +0103000000010000000500000000000000000000000000000000000000000000000000000000000000000024C0000000000000244000000000000024C00000000000002440000000000000000000000000000000000000000000000000|0 +0103000000010000000500000000000000000024400000000000000000000000000000244000000000000024C0000000000000344000000000000024C00000000000003440000000000000000000000000000024400000000000000000|255 +0103000000010000000500000000000000000034400000000000000000000000000000344000000000000024C00000000000003E4000000000000024C00000000000003E40000000000000000000000000000034400000000000000000|0 +010300000001000000050000000000000000003E4000000000000000000000000000003E4000000000000024C0000000000000444000000000000024C0000000000000444000000000000000000000000000003E400000000000000000|255 +0103000000010000000500000000000000000044400000000000000000000000000000444000000000000024C0000000000000494000000000000024C00000000000004940000000000000000000000000000044400000000000000000|0 +0103000000010000000500000000000000000049400000000000000000000000000000494000000000000024C00000000000004E4000000000000024C00000000000004E40000000000000000000000000000049400000000000000000|255 +010300000001000000050000000000000000004E4000000000000000000000000000004E4000000000000024C0000000000080514000000000000024C0000000000080514000000000000000000000000000004E400000000000000000|0 +0103000000010000000500000000000000008051400000000000000000000000000080514000000000000024C0000000000000544000000000000024C00000000000005440000000000000000000000000008051400000000000000000|255 +0103000000010000000500000000000000000054400000000000000000000000000000544000000000000024C0000000000080564000000000000024C00000000000805640000000000000000000000000000054400000000000000000|255 +01030000000100000005000000000000000000000000000000000024C0000000000000000000000000000034C0000000000000244000000000000034C0000000000000244000000000000024C0000000000000000000000000000024C0|255 +01030000000100000005000000000000000000244000000000000024C0000000000000244000000000000034C0000000000000344000000000000034C0000000000000344000000000000024C0000000000000244000000000000024C0|255 +01030000000100000005000000000000000000344000000000000024C0000000000000344000000000000034C00000000000003E4000000000000034C00000000000003E4000000000000024C0000000000000344000000000000024C0|255 +010300000001000000050000000000000000003E4000000000000024C00000000000003E4000000000000034C0000000000000444000000000000034C0000000000000444000000000000024C00000000000003E4000000000000024C0|255 +01030000000100000005000000000000000000444000000000000024C0000000000000444000000000000034C0000000000000494000000000000034C0000000000000494000000000000024C0000000000000444000000000000024C0|255 +01030000000100000005000000000000000000494000000000000024C0000000000000494000000000000034C00000000000004E4000000000000034C00000000000004E4000000000000024C0000000000000494000000000000024C0|255 +010300000001000000050000000000000000004E4000000000000024C00000000000004E4000000000000034C0000000000080514000000000000034C0000000000080514000000000000024C00000000000004E4000000000000024C0|255 +01030000000100000005000000000000000080514000000000000024C0000000000080514000000000000034C0000000000000544000000000000034C0000000000000544000000000000024C0000000000080514000000000000024C0|255 +01030000000100000005000000000000000000544000000000000024C0000000000000544000000000000034C0000000000080564000000000000034C0000000000080564000000000000024C0000000000000544000000000000024C0|255 +01030000000100000005000000000000000000000000000000000034C000000000000000000000000000003EC000000000000024400000000000003EC0000000000000244000000000000034C0000000000000000000000000000034C0|0 +01030000000100000005000000000000000000244000000000000034C000000000000024400000000000003EC000000000000034400000000000003EC0000000000000344000000000000034C0000000000000244000000000000034C0|255 +01030000000100000005000000000000000000344000000000000034C000000000000034400000000000003EC00000000000003E400000000000003EC00000000000003E4000000000000034C0000000000000344000000000000034C0|0 +010300000001000000050000000000000000003E4000000000000034C00000000000003E400000000000003EC000000000000044400000000000003EC0000000000000444000000000000034C00000000000003E4000000000000034C0|255 +01030000000100000005000000000000000000444000000000000034C000000000000044400000000000003EC000000000000049400000000000003EC0000000000000494000000000000034C0000000000000444000000000000034C0|0 +01030000000100000005000000000000000000494000000000000034C000000000000049400000000000003EC00000000000004E400000000000003EC00000000000004E4000000000000034C0000000000000494000000000000034C0|255 +010300000001000000050000000000000000004E4000000000000034C00000000000004E400000000000003EC000000000008051400000000000003EC0000000000080514000000000000034C00000000000004E4000000000000034C0|0 +01030000000100000005000000000000000080514000000000000034C000000000008051400000000000003EC000000000000054400000000000003EC0000000000000544000000000000034C0000000000080514000000000000034C0|255 +01030000000100000005000000000000000000544000000000000034C000000000000054400000000000003EC000000000008056400000000000003EC0000000000080564000000000000034C0000000000000544000000000000034C0|0 +0103000000010000000500000000000000000000000000000000003EC0000000000000000000000000000044C0000000000000244000000000000044C000000000000024400000000000003EC000000000000000000000000000003EC0|255 +0103000000010000000500000000000000000024400000000000003EC0000000000000244000000000000044C0000000000000344000000000000044C000000000000034400000000000003EC000000000000024400000000000003EC0|255 +0103000000010000000500000000000000000034400000000000003EC0000000000000344000000000000044C00000000000003E4000000000000044C00000000000003E400000000000003EC000000000000034400000000000003EC0|255 +010300000001000000050000000000000000003E400000000000003EC00000000000003E4000000000000044C0000000000000444000000000000044C000000000000044400000000000003EC00000000000003E400000000000003EC0|255 +0103000000010000000500000000000000000044400000000000003EC0000000000000444000000000000044C0000000000000494000000000000044C000000000000049400000000000003EC000000000000044400000000000003EC0|255 +0103000000010000000500000000000000000049400000000000003EC0000000000000494000000000000044C00000000000004E4000000000000044C00000000000004E400000000000003EC000000000000049400000000000003EC0|255 +010300000001000000050000000000000000004E400000000000003EC00000000000004E4000000000000044C0000000000080514000000000000044C000000000008051400000000000003EC00000000000004E400000000000003EC0|255 +0103000000010000000500000000000000008051400000000000003EC0000000000080514000000000000044C0000000000000544000000000000044C000000000000054400000000000003EC000000000008051400000000000003EC0|255 +0103000000010000000500000000000000000054400000000000003EC0000000000000544000000000000044C0000000000080564000000000000044C000000000008056400000000000003EC000000000000054400000000000003EC0|255 +01030000000100000005000000000000000000000000000000000044C0000000000000000000000000000049C0000000000000244000000000000049C0000000000000244000000000000044C0000000000000000000000000000044C0|0 +01030000000100000005000000000000000000244000000000000044C0000000000000244000000000000049C0000000000000344000000000000049C0000000000000344000000000000044C0000000000000244000000000000044C0|255 +01030000000100000005000000000000000000344000000000000044C0000000000000344000000000000049C00000000000003E4000000000000049C00000000000003E4000000000000044C0000000000000344000000000000044C0|0 +010300000001000000050000000000000000003E4000000000000044C00000000000003E4000000000000049C0000000000000444000000000000049C0000000000000444000000000000044C00000000000003E4000000000000044C0|255 +01030000000100000005000000000000000000444000000000000044C0000000000000444000000000000049C0000000000000494000000000000049C0000000000000494000000000000044C0000000000000444000000000000044C0|0 +01030000000100000005000000000000000000494000000000000044C0000000000000494000000000000049C00000000000004E4000000000000049C00000000000004E4000000000000044C0000000000000494000000000000044C0|255 +010300000001000000050000000000000000004E4000000000000044C00000000000004E4000000000000049C0000000000080514000000000000049C0000000000080514000000000000044C00000000000004E4000000000000044C0|0 +01030000000100000005000000000000000080514000000000000044C0000000000080514000000000000049C0000000000000544000000000000049C0000000000000544000000000000044C0000000000080514000000000000044C0|255 +01030000000100000005000000000000000000544000000000000044C0000000000000544000000000000049C0000000000080564000000000000049C0000000000080564000000000000044C0000000000000544000000000000044C0|0 +01030000000100000005000000000000000000000000000000000049C000000000000000000000000000004EC000000000000024400000000000004EC0000000000000244000000000000049C0000000000000000000000000000049C0|255 +01030000000100000005000000000000000000244000000000000049C000000000000024400000000000004EC000000000000034400000000000004EC0000000000000344000000000000049C0000000000000244000000000000049C0|255 +01030000000100000005000000000000000000344000000000000049C000000000000034400000000000004EC00000000000003E400000000000004EC00000000000003E4000000000000049C0000000000000344000000000000049C0|255 +010300000001000000050000000000000000003E4000000000000049C00000000000003E400000000000004EC000000000000044400000000000004EC0000000000000444000000000000049C00000000000003E4000000000000049C0|255 +01030000000100000005000000000000000000444000000000000049C000000000000044400000000000004EC000000000000049400000000000004EC0000000000000494000000000000049C0000000000000444000000000000049C0|255 +01030000000100000005000000000000000000494000000000000049C000000000000049400000000000004EC00000000000004E400000000000004EC00000000000004E4000000000000049C0000000000000494000000000000049C0|255 +010300000001000000050000000000000000004E4000000000000049C00000000000004E400000000000004EC000000000008051400000000000004EC0000000000080514000000000000049C00000000000004E4000000000000049C0|255 +01030000000100000005000000000000000080514000000000000049C000000000008051400000000000004EC000000000000054400000000000004EC0000000000000544000000000000049C0000000000080514000000000000049C0|255 +01030000000100000005000000000000000000544000000000000049C000000000000054400000000000004EC000000000008056400000000000004EC0000000000080564000000000000049C0000000000000544000000000000049C0|255 +0103000000010000000500000000000000000000000000000000004EC0000000000000000000000000008051C0000000000000244000000000008051C000000000000024400000000000004EC000000000000000000000000000004EC0|0 +0103000000010000000500000000000000000024400000000000004EC0000000000000244000000000008051C0000000000000344000000000008051C000000000000034400000000000004EC000000000000024400000000000004EC0|255 +0103000000010000000500000000000000000034400000000000004EC0000000000000344000000000008051C00000000000003E4000000000008051C00000000000003E400000000000004EC000000000000034400000000000004EC0|0 +010300000001000000050000000000000000003E400000000000004EC00000000000003E4000000000008051C0000000000000444000000000008051C000000000000044400000000000004EC00000000000003E400000000000004EC0|255 +0103000000010000000500000000000000000044400000000000004EC0000000000000444000000000008051C0000000000000494000000000008051C000000000000049400000000000004EC000000000000044400000000000004EC0|0 +0103000000010000000500000000000000000049400000000000004EC0000000000000494000000000008051C00000000000004E4000000000008051C00000000000004E400000000000004EC000000000000049400000000000004EC0|255 +010300000001000000050000000000000000004E400000000000004EC00000000000004E4000000000008051C0000000000080514000000000008051C000000000008051400000000000004EC00000000000004E400000000000004EC0|0 +0103000000010000000500000000000000008051400000000000004EC0000000000080514000000000008051C0000000000000544000000000008051C000000000000054400000000000004EC000000000008051400000000000004EC0|255 +0103000000010000000500000000000000000054400000000000004EC0000000000000544000000000008051C0000000000080564000000000008051C000000000008056400000000000004EC000000000000054400000000000004EC0|0 +01030000000100000005000000000000000000000000000000008051C0000000000000000000000000000054C0000000000000244000000000000054C0000000000000244000000000008051C0000000000000000000000000008051C0|255 +01030000000100000005000000000000000000244000000000008051C0000000000000244000000000000054C0000000000000344000000000000054C0000000000000344000000000008051C0000000000000244000000000008051C0|255 +01030000000100000005000000000000000000344000000000008051C0000000000000344000000000000054C00000000000003E4000000000000054C00000000000003E4000000000008051C0000000000000344000000000008051C0|255 +010300000001000000050000000000000000003E4000000000008051C00000000000003E4000000000000054C0000000000000444000000000000054C0000000000000444000000000008051C00000000000003E4000000000008051C0|255 +01030000000100000005000000000000000000444000000000008051C0000000000000444000000000000054C0000000000000494000000000000054C0000000000000494000000000008051C0000000000000444000000000008051C0|255 +01030000000100000005000000000000000000494000000000008051C0000000000000494000000000000054C00000000000004E4000000000000054C00000000000004E4000000000008051C0000000000000494000000000008051C0|255 +010300000001000000050000000000000000004E4000000000008051C00000000000004E4000000000000054C0000000000080514000000000000054C0000000000080514000000000008051C00000000000004E4000000000008051C0|255 +01030000000100000005000000000000000080514000000000008051C0000000000080514000000000000054C0000000000000544000000000000054C0000000000000544000000000008051C0000000000080514000000000008051C0|255 +01030000000100000005000000000000000000544000000000008051C0000000000000544000000000000054C0000000000080564000000000000054C0000000000080564000000000008051C0000000000000544000000000008051C0|255 +01030000000100000005000000000000000000000000000000000054C0000000000000000000000000008056C0000000000000244000000000008056C0000000000000244000000000000054C0000000000000000000000000000054C0|255 +01030000000100000005000000000000000000244000000000000054C0000000000000244000000000008056C0000000000000344000000000008056C0000000000000344000000000000054C0000000000000244000000000000054C0|255 +01030000000100000005000000000000000000344000000000000054C0000000000000344000000000008056C00000000000003E4000000000008056C00000000000003E4000000000000054C0000000000000344000000000000054C0|0 +010300000001000000050000000000000000003E4000000000000054C00000000000003E4000000000008056C0000000000000444000000000008056C0000000000000444000000000000054C00000000000003E4000000000000054C0|255 +01030000000100000005000000000000000000444000000000000054C0000000000000444000000000008056C0000000000000494000000000008056C0000000000000494000000000000054C0000000000000444000000000000054C0|0 +01030000000100000005000000000000000000494000000000000054C0000000000000494000000000008056C00000000000004E4000000000008056C00000000000004E4000000000000054C0000000000000494000000000000054C0|255 +010300000001000000050000000000000000004E4000000000000054C00000000000004E4000000000008056C0000000000080514000000000008056C0000000000080514000000000000054C00000000000004E4000000000000054C0|0 +01030000000100000005000000000000000080514000000000000054C0000000000080514000000000008056C0000000000000544000000000008056C0000000000000544000000000000054C0000000000080514000000000000054C0|255 +01030000000100000005000000000000000000544000000000000054C0000000000000544000000000008056C0000000000080564000000000008056C0000000000080564000000000000054C0000000000000544000000000000054C0|0 +0103000000010000000500000000000000000000000000000000000000000000000000000000000000000024C0000000000000244000000000000024C00000000000002440000000000000000000000000000000000000000000000000|0 +0103000000010000000500000000000000000024400000000000000000000000000000244000000000000024C0000000000000344000000000000024C00000000000003440000000000000000000000000000024400000000000000000|255 +0103000000010000000500000000000000000034400000000000000000000000000000344000000000000024C00000000000003E4000000000000024C00000000000003E40000000000000000000000000000034400000000000000000|0 +010300000001000000050000000000000000003E4000000000000000000000000000003E4000000000000024C0000000000000444000000000000024C0000000000000444000000000000000000000000000003E400000000000000000|255 +0103000000010000000500000000000000000044400000000000000000000000000000444000000000000024C0000000000000494000000000000024C00000000000004940000000000000000000000000000044400000000000000000|0 +0103000000010000000500000000000000000049400000000000000000000000000000494000000000000024C00000000000004E4000000000000024C00000000000004E40000000000000000000000000000049400000000000000000|255 +010300000001000000050000000000000000004E4000000000000000000000000000004E4000000000000024C0000000000080514000000000000024C0000000000080514000000000000000000000000000004E400000000000000000|0 +0103000000010000000500000000000000008051400000000000000000000000000080514000000000000024C0000000000000544000000000000024C00000000000005440000000000000000000000000008051400000000000000000|255 +0103000000010000000500000000000000000054400000000000000000000000000000544000000000000024C0000000000080564000000000000024C00000000000805640000000000000000000000000000054400000000000000000|0 +01030000000100000005000000000000000000000000000000000024C0000000000000000000000000000034C0000000000000244000000000000034C0000000000000244000000000000024C0000000000000000000000000000024C0|255 +01030000000100000005000000000000000000244000000000000024C0000000000000244000000000000034C0000000000000344000000000000034C0000000000000344000000000000024C0000000000000244000000000000024C0|255 +01030000000100000005000000000000000000344000000000000024C0000000000000344000000000000034C00000000000003E4000000000000034C00000000000003E4000000000000024C0000000000000344000000000000024C0|255 +010300000001000000050000000000000000003E4000000000000024C00000000000003E4000000000000034C0000000000000444000000000000034C0000000000000444000000000000024C00000000000003E4000000000000024C0|255 +01030000000100000005000000000000000000444000000000000024C0000000000000444000000000000034C0000000000000494000000000000034C0000000000000494000000000000024C0000000000000444000000000000024C0|255 +01030000000100000005000000000000000000494000000000000024C0000000000000494000000000000034C00000000000004E4000000000000034C00000000000004E4000000000000024C0000000000000494000000000000024C0|255 +010300000001000000050000000000000000004E4000000000000024C00000000000004E4000000000000034C0000000000080514000000000000034C0000000000080514000000000000024C00000000000004E4000000000000024C0|255 +01030000000100000005000000000000000080514000000000000024C0000000000080514000000000000034C0000000000000544000000000000034C0000000000000544000000000000024C0000000000080514000000000000024C0|255 +01030000000100000005000000000000000000544000000000000024C0000000000000544000000000000034C0000000000080564000000000000034C0000000000080564000000000000024C0000000000000544000000000000024C0|255 +01030000000100000005000000000000000000000000000000000034C000000000000000000000000000003EC000000000000024400000000000003EC0000000000000244000000000000034C0000000000000000000000000000034C0|0 +01030000000100000005000000000000000000244000000000000034C000000000000024400000000000003EC000000000000034400000000000003EC0000000000000344000000000000034C0000000000000244000000000000034C0|255 +01030000000100000005000000000000000000344000000000000034C000000000000034400000000000003EC00000000000003E400000000000003EC00000000000003E4000000000000034C0000000000000344000000000000034C0|0 +010300000001000000050000000000000000003E4000000000000034C00000000000003E400000000000003EC000000000000044400000000000003EC0000000000000444000000000000034C00000000000003E4000000000000034C0|255 +01030000000100000005000000000000000000444000000000000034C000000000000044400000000000003EC000000000000049400000000000003EC0000000000000494000000000000034C0000000000000444000000000000034C0|0 +01030000000100000005000000000000000000494000000000000034C000000000000049400000000000003EC00000000000004E400000000000003EC00000000000004E4000000000000034C0000000000000494000000000000034C0|255 +010300000001000000050000000000000000004E4000000000000034C00000000000004E400000000000003EC000000000008051400000000000003EC0000000000080514000000000000034C00000000000004E4000000000000034C0|0 +01030000000100000005000000000000000080514000000000000034C000000000008051400000000000003EC000000000000054400000000000003EC0000000000000544000000000000034C0000000000080514000000000000034C0|255 +01030000000100000005000000000000000000544000000000000034C000000000000054400000000000003EC000000000008056400000000000003EC0000000000080564000000000000034C0000000000000544000000000000034C0|0 +0103000000010000000500000000000000000000000000000000003EC0000000000000000000000000000044C0000000000000244000000000000044C000000000000024400000000000003EC000000000000000000000000000003EC0|255 +0103000000010000000500000000000000000024400000000000003EC0000000000000244000000000000044C0000000000000344000000000000044C000000000000034400000000000003EC000000000000024400000000000003EC0|255 +0103000000010000000500000000000000000034400000000000003EC0000000000000344000000000000044C00000000000003E4000000000000044C00000000000003E400000000000003EC000000000000034400000000000003EC0|255 +010300000001000000050000000000000000003E400000000000003EC00000000000003E4000000000000044C0000000000000444000000000000044C000000000000044400000000000003EC00000000000003E400000000000003EC0|255 +0103000000010000000500000000000000000044400000000000003EC0000000000000444000000000000044C0000000000000494000000000000044C000000000000049400000000000003EC000000000000044400000000000003EC0|255 +0103000000010000000500000000000000000049400000000000003EC0000000000000494000000000000044C00000000000004E4000000000000044C00000000000004E400000000000003EC000000000000049400000000000003EC0|255 +010300000001000000050000000000000000004E400000000000003EC00000000000004E4000000000000044C0000000000080514000000000000044C000000000008051400000000000003EC00000000000004E400000000000003EC0|255 +0103000000010000000500000000000000008051400000000000003EC0000000000080514000000000000044C0000000000000544000000000000044C000000000000054400000000000003EC000000000008051400000000000003EC0|255 +0103000000010000000500000000000000000054400000000000003EC0000000000000544000000000000044C0000000000080564000000000000044C000000000008056400000000000003EC000000000000054400000000000003EC0|255 +01030000000100000005000000000000000000000000000000000044C0000000000000000000000000000049C0000000000000244000000000000049C0000000000000244000000000000044C0000000000000000000000000000044C0|0 +01030000000100000005000000000000000000244000000000000044C0000000000000244000000000000049C0000000000000344000000000000049C0000000000000344000000000000044C0000000000000244000000000000044C0|255 +01030000000100000005000000000000000000344000000000000044C0000000000000344000000000000049C00000000000003E4000000000000049C00000000000003E4000000000000044C0000000000000344000000000000044C0|0 +010300000001000000050000000000000000003E4000000000000044C00000000000003E4000000000000049C0000000000000444000000000000049C0000000000000444000000000000044C00000000000003E4000000000000044C0|255 +01030000000100000005000000000000000000444000000000000044C0000000000000444000000000000049C0000000000000494000000000000049C0000000000000494000000000000044C0000000000000444000000000000044C0|0 +01030000000100000005000000000000000000494000000000000044C0000000000000494000000000000049C00000000000004E4000000000000049C00000000000004E4000000000000044C0000000000000494000000000000044C0|255 +010300000001000000050000000000000000004E4000000000000044C00000000000004E4000000000000049C0000000000080514000000000000049C0000000000080514000000000000044C00000000000004E4000000000000044C0|0 +01030000000100000005000000000000000080514000000000000044C0000000000080514000000000000049C0000000000000544000000000000049C0000000000000544000000000000044C0000000000080514000000000000044C0|255 +01030000000100000005000000000000000000544000000000000044C0000000000000544000000000000049C0000000000080564000000000000049C0000000000080564000000000000044C0000000000000544000000000000044C0|0 +01030000000100000005000000000000000000000000000000000049C000000000000000000000000000004EC000000000000024400000000000004EC0000000000000244000000000000049C0000000000000000000000000000049C0|255 +01030000000100000005000000000000000000244000000000000049C000000000000024400000000000004EC000000000000034400000000000004EC0000000000000344000000000000049C0000000000000244000000000000049C0|255 +01030000000100000005000000000000000000344000000000000049C000000000000034400000000000004EC00000000000003E400000000000004EC00000000000003E4000000000000049C0000000000000344000000000000049C0|255 +010300000001000000050000000000000000003E4000000000000049C00000000000003E400000000000004EC000000000000044400000000000004EC0000000000000444000000000000049C00000000000003E4000000000000049C0|255 +01030000000100000005000000000000000000444000000000000049C000000000000044400000000000004EC000000000000049400000000000004EC0000000000000494000000000000049C0000000000000444000000000000049C0|255 +01030000000100000005000000000000000000494000000000000049C000000000000049400000000000004EC00000000000004E400000000000004EC00000000000004E4000000000000049C0000000000000494000000000000049C0|255 +010300000001000000050000000000000000004E4000000000000049C00000000000004E400000000000004EC000000000008051400000000000004EC0000000000080514000000000000049C00000000000004E4000000000000049C0|255 +01030000000100000005000000000000000080514000000000000049C000000000008051400000000000004EC000000000000054400000000000004EC0000000000000544000000000000049C0000000000080514000000000000049C0|255 +01030000000100000005000000000000000000544000000000000049C000000000000054400000000000004EC000000000008056400000000000004EC0000000000080564000000000000049C0000000000000544000000000000049C0|255 +0103000000010000000500000000000000000000000000000000004EC0000000000000000000000000008051C0000000000000244000000000008051C000000000000024400000000000004EC000000000000000000000000000004EC0|0 +0103000000010000000500000000000000000024400000000000004EC0000000000000244000000000008051C0000000000000344000000000008051C000000000000034400000000000004EC000000000000024400000000000004EC0|255 +0103000000010000000500000000000000000034400000000000004EC0000000000000344000000000008051C00000000000003E4000000000008051C00000000000003E400000000000004EC000000000000034400000000000004EC0|0 +010300000001000000050000000000000000003E400000000000004EC00000000000003E4000000000008051C0000000000000444000000000008051C000000000000044400000000000004EC00000000000003E400000000000004EC0|255 +0103000000010000000500000000000000000044400000000000004EC0000000000000444000000000008051C0000000000000494000000000008051C000000000000049400000000000004EC000000000000044400000000000004EC0|0 +0103000000010000000500000000000000000049400000000000004EC0000000000000494000000000008051C00000000000004E4000000000008051C00000000000004E400000000000004EC000000000000049400000000000004EC0|255 +010300000001000000050000000000000000004E400000000000004EC00000000000004E4000000000008051C0000000000080514000000000008051C000000000008051400000000000004EC00000000000004E400000000000004EC0|0 +0103000000010000000500000000000000008051400000000000004EC0000000000080514000000000008051C0000000000000544000000000008051C000000000000054400000000000004EC000000000008051400000000000004EC0|255 +0103000000010000000500000000000000000054400000000000004EC0000000000000544000000000008051C0000000000080564000000000008051C000000000008056400000000000004EC000000000000054400000000000004EC0|0 +01030000000100000005000000000000000000000000000000008051C0000000000000000000000000000054C0000000000000244000000000000054C0000000000000244000000000008051C0000000000000000000000000008051C0|255 +01030000000100000005000000000000000000244000000000008051C0000000000000244000000000000054C0000000000000344000000000000054C0000000000000344000000000008051C0000000000000244000000000008051C0|255 +01030000000100000005000000000000000000344000000000008051C0000000000000344000000000000054C00000000000003E4000000000000054C00000000000003E4000000000008051C0000000000000344000000000008051C0|255 +010300000001000000050000000000000000003E4000000000008051C00000000000003E4000000000000054C0000000000000444000000000000054C0000000000000444000000000008051C00000000000003E4000000000008051C0|255 +01030000000100000005000000000000000000444000000000008051C0000000000000444000000000000054C0000000000000494000000000000054C0000000000000494000000000008051C0000000000000444000000000008051C0|255 +01030000000100000005000000000000000000494000000000008051C0000000000000494000000000000054C00000000000004E4000000000000054C00000000000004E4000000000008051C0000000000000494000000000008051C0|255 +010300000001000000050000000000000000004E4000000000008051C00000000000004E4000000000000054C0000000000080514000000000000054C0000000000080514000000000008051C00000000000004E4000000000008051C0|255 +01030000000100000005000000000000000080514000000000008051C0000000000080514000000000000054C0000000000000544000000000000054C0000000000000544000000000008051C0000000000080514000000000008051C0|255 +01030000000100000005000000000000000000544000000000008051C0000000000000544000000000000054C0000000000080564000000000000054C0000000000080564000000000008051C0000000000000544000000000008051C0|255 +01030000000100000005000000000000000000000000000000000054C0000000000000000000000000008056C0000000000000244000000000008056C0000000000000244000000000000054C0000000000000000000000000000054C0|0 +01030000000100000005000000000000000000244000000000000054C0000000000000244000000000008056C0000000000000344000000000008056C0000000000000344000000000000054C0000000000000244000000000000054C0|255 +01030000000100000005000000000000000000344000000000000054C0000000000000344000000000008056C00000000000003E4000000000008056C00000000000003E4000000000000054C0000000000000344000000000000054C0|0 +010300000001000000050000000000000000003E4000000000000054C00000000000003E4000000000008056C0000000000000444000000000008056C0000000000000444000000000000054C00000000000003E4000000000000054C0|255 +01030000000100000005000000000000000000444000000000000054C0000000000000444000000000008056C0000000000000494000000000008056C0000000000000494000000000000054C0000000000000444000000000000054C0|0 +01030000000100000005000000000000000000494000000000000054C0000000000000494000000000008056C00000000000004E4000000000008056C00000000000004E4000000000000054C0000000000000494000000000000054C0|255 +010300000001000000050000000000000000004E4000000000000054C00000000000004E4000000000008056C0000000000080514000000000008056C0000000000080514000000000000054C00000000000004E4000000000000054C0|0 +01030000000100000005000000000000000080514000000000000054C0000000000080514000000000008056C0000000000000544000000000008056C0000000000000544000000000000054C0000000000080514000000000000054C0|255 +01030000000100000005000000000000000000544000000000000054C0000000000000544000000000008056C0000000000080564000000000008056C0000000000080564000000000000054C0000000000000544000000000000054C0|255 diff -Nru postgis-1.5.3/raster/test/regress/loader/Tiled10x10.select.sql postgis-2.0.1/raster/test/regress/loader/Tiled10x10.select.sql --- postgis-1.5.3/raster/test/regress/loader/Tiled10x10.select.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/loader/Tiled10x10.select.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,4 @@ +SELECT srid, scale_x::numeric(16, 10), scale_y::numeric(16, 10), blocksize_x, blocksize_y, same_alignment, regular_blocking, num_bands, pixel_types, nodata_values::numeric(16,10)[], out_db, extent FROM raster_columns WHERE r_table_name = 'loadedrast' AND r_raster_column = 'the_rast'; +SELECT geom, val FROM (SELECT (ST_DumpAsPolygons(the_rast, 1)).* FROM loadedrast) foo; +SELECT geom, val FROM (SELECT (ST_DumpAsPolygons(the_rast, 2)).* FROM loadedrast) foo; +SELECT geom, val FROM (SELECT (ST_DumpAsPolygons(the_rast, 3)).* FROM loadedrast) foo; diff -Nru postgis-1.5.3/raster/test/regress/loader/Tiled10x10Copy-post.sh postgis-2.0.1/raster/test/regress/loader/Tiled10x10Copy-post.sh --- postgis-1.5.3/raster/test/regress/loader/Tiled10x10Copy-post.sh 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/loader/Tiled10x10Copy-post.sh 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1 @@ +rm -f loader/Tiled10x10Copy.tif diff -Nru postgis-1.5.3/raster/test/regress/loader/Tiled10x10Copy-pre.sh postgis-2.0.1/raster/test/regress/loader/Tiled10x10Copy-pre.sh --- postgis-1.5.3/raster/test/regress/loader/Tiled10x10Copy-pre.sh 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/loader/Tiled10x10Copy-pre.sh 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1 @@ +cp loader/testraster.tif loader/Tiled10x10Copy.tif diff -Nru postgis-1.5.3/raster/test/regress/loader/Tiled10x10Copy.opts postgis-2.0.1/raster/test/regress/loader/Tiled10x10Copy.opts --- postgis-1.5.3/raster/test/regress/loader/Tiled10x10Copy.opts 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/loader/Tiled10x10Copy.opts 2012-02-08 16:11:13.000000000 +0000 @@ -0,0 +1 @@ +-t 10x10 -Y diff -Nru postgis-1.5.3/raster/test/regress/loader/Tiled10x10Copy.select.expected postgis-2.0.1/raster/test/regress/loader/Tiled10x10Copy.select.expected --- postgis-1.5.3/raster/test/regress/loader/Tiled10x10Copy.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/loader/Tiled10x10Copy.select.expected 2012-02-08 16:11:13.000000000 +0000 @@ -0,0 +1,244 @@ +0|1.0000000000|-1.0000000000|10|10|t|f|3|{8BUI,8BUI,8BUI}|{NULL,NULL,NULL}|{f,f,f}|01030000000100000005000000000000000000000000000000008056C00000000000000000000000000000000000000000008056400000000000000000000000000080564000000000008056C0000000000000000000000000008056C0 +0103000000010000000500000000000000000000000000000000000000000000000000000000000000000024C0000000000000244000000000000024C00000000000002440000000000000000000000000000000000000000000000000|255 +0103000000010000000500000000000000000024400000000000000000000000000000244000000000000024C0000000000000344000000000000024C00000000000003440000000000000000000000000000024400000000000000000|255 +0103000000010000000500000000000000000034400000000000000000000000000000344000000000000024C00000000000003E4000000000000024C00000000000003E40000000000000000000000000000034400000000000000000|0 +010300000001000000050000000000000000003E4000000000000000000000000000003E4000000000000024C0000000000000444000000000000024C0000000000000444000000000000000000000000000003E400000000000000000|255 +0103000000010000000500000000000000000044400000000000000000000000000000444000000000000024C0000000000000494000000000000024C00000000000004940000000000000000000000000000044400000000000000000|0 +0103000000010000000500000000000000000049400000000000000000000000000000494000000000000024C00000000000004E4000000000000024C00000000000004E40000000000000000000000000000049400000000000000000|255 +010300000001000000050000000000000000004E4000000000000000000000000000004E4000000000000024C0000000000080514000000000000024C0000000000080514000000000000000000000000000004E400000000000000000|0 +0103000000010000000500000000000000008051400000000000000000000000000080514000000000000024C0000000000000544000000000000024C00000000000005440000000000000000000000000008051400000000000000000|255 +0103000000010000000500000000000000000054400000000000000000000000000000544000000000000024C0000000000080564000000000000024C00000000000805640000000000000000000000000000054400000000000000000|255 +01030000000100000005000000000000000000000000000000000024C0000000000000000000000000000034C0000000000000244000000000000034C0000000000000244000000000000024C0000000000000000000000000000024C0|255 +01030000000100000005000000000000000000244000000000000024C0000000000000244000000000000034C0000000000000344000000000000034C0000000000000344000000000000024C0000000000000244000000000000024C0|255 +01030000000100000005000000000000000000344000000000000024C0000000000000344000000000000034C00000000000003E4000000000000034C00000000000003E4000000000000024C0000000000000344000000000000024C0|255 +010300000001000000050000000000000000003E4000000000000024C00000000000003E4000000000000034C0000000000000444000000000000034C0000000000000444000000000000024C00000000000003E4000000000000024C0|255 +01030000000100000005000000000000000000444000000000000024C0000000000000444000000000000034C0000000000000494000000000000034C0000000000000494000000000000024C0000000000000444000000000000024C0|255 +01030000000100000005000000000000000000494000000000000024C0000000000000494000000000000034C00000000000004E4000000000000034C00000000000004E4000000000000024C0000000000000494000000000000024C0|255 +010300000001000000050000000000000000004E4000000000000024C00000000000004E4000000000000034C0000000000080514000000000000034C0000000000080514000000000000024C00000000000004E4000000000000024C0|255 +01030000000100000005000000000000000080514000000000000024C0000000000080514000000000000034C0000000000000544000000000000034C0000000000000544000000000000024C0000000000080514000000000000024C0|255 +01030000000100000005000000000000000000544000000000000024C0000000000000544000000000000034C0000000000080564000000000000034C0000000000080564000000000000024C0000000000000544000000000000024C0|255 +01030000000100000005000000000000000000000000000000000034C000000000000000000000000000003EC000000000000024400000000000003EC0000000000000244000000000000034C0000000000000000000000000000034C0|0 +01030000000100000005000000000000000000244000000000000034C000000000000024400000000000003EC000000000000034400000000000003EC0000000000000344000000000000034C0000000000000244000000000000034C0|255 +01030000000100000005000000000000000000344000000000000034C000000000000034400000000000003EC00000000000003E400000000000003EC00000000000003E4000000000000034C0000000000000344000000000000034C0|0 +010300000001000000050000000000000000003E4000000000000034C00000000000003E400000000000003EC000000000000044400000000000003EC0000000000000444000000000000034C00000000000003E4000000000000034C0|255 +01030000000100000005000000000000000000444000000000000034C000000000000044400000000000003EC000000000000049400000000000003EC0000000000000494000000000000034C0000000000000444000000000000034C0|0 +01030000000100000005000000000000000000494000000000000034C000000000000049400000000000003EC00000000000004E400000000000003EC00000000000004E4000000000000034C0000000000000494000000000000034C0|255 +010300000001000000050000000000000000004E4000000000000034C00000000000004E400000000000003EC000000000008051400000000000003EC0000000000080514000000000000034C00000000000004E4000000000000034C0|0 +01030000000100000005000000000000000080514000000000000034C000000000008051400000000000003EC000000000000054400000000000003EC0000000000000544000000000000034C0000000000080514000000000000034C0|255 +01030000000100000005000000000000000000544000000000000034C000000000000054400000000000003EC000000000008056400000000000003EC0000000000080564000000000000034C0000000000000544000000000000034C0|0 +0103000000010000000500000000000000000000000000000000003EC0000000000000000000000000000044C0000000000000244000000000000044C000000000000024400000000000003EC000000000000000000000000000003EC0|255 +0103000000010000000500000000000000000024400000000000003EC0000000000000244000000000000044C0000000000000344000000000000044C000000000000034400000000000003EC000000000000024400000000000003EC0|255 +0103000000010000000500000000000000000034400000000000003EC0000000000000344000000000000044C00000000000003E4000000000000044C00000000000003E400000000000003EC000000000000034400000000000003EC0|255 +010300000001000000050000000000000000003E400000000000003EC00000000000003E4000000000000044C0000000000000444000000000000044C000000000000044400000000000003EC00000000000003E400000000000003EC0|255 +0103000000010000000500000000000000000044400000000000003EC0000000000000444000000000000044C0000000000000494000000000000044C000000000000049400000000000003EC000000000000044400000000000003EC0|255 +0103000000010000000500000000000000000049400000000000003EC0000000000000494000000000000044C00000000000004E4000000000000044C00000000000004E400000000000003EC000000000000049400000000000003EC0|255 +010300000001000000050000000000000000004E400000000000003EC00000000000004E4000000000000044C0000000000080514000000000000044C000000000008051400000000000003EC00000000000004E400000000000003EC0|255 +0103000000010000000500000000000000008051400000000000003EC0000000000080514000000000000044C0000000000000544000000000000044C000000000000054400000000000003EC000000000008051400000000000003EC0|255 +0103000000010000000500000000000000000054400000000000003EC0000000000000544000000000000044C0000000000080564000000000000044C000000000008056400000000000003EC000000000000054400000000000003EC0|255 +01030000000100000005000000000000000000000000000000000044C0000000000000000000000000000049C0000000000000244000000000000049C0000000000000244000000000000044C0000000000000000000000000000044C0|0 +01030000000100000005000000000000000000244000000000000044C0000000000000244000000000000049C0000000000000344000000000000049C0000000000000344000000000000044C0000000000000244000000000000044C0|255 +01030000000100000005000000000000000000344000000000000044C0000000000000344000000000000049C00000000000003E4000000000000049C00000000000003E4000000000000044C0000000000000344000000000000044C0|0 +010300000001000000050000000000000000003E4000000000000044C00000000000003E4000000000000049C0000000000000444000000000000049C0000000000000444000000000000044C00000000000003E4000000000000044C0|255 +01030000000100000005000000000000000000444000000000000044C0000000000000444000000000000049C0000000000000494000000000000049C0000000000000494000000000000044C0000000000000444000000000000044C0|0 +01030000000100000005000000000000000000494000000000000044C0000000000000494000000000000049C00000000000004E4000000000000049C00000000000004E4000000000000044C0000000000000494000000000000044C0|255 +010300000001000000050000000000000000004E4000000000000044C00000000000004E4000000000000049C0000000000080514000000000000049C0000000000080514000000000000044C00000000000004E4000000000000044C0|0 +01030000000100000005000000000000000080514000000000000044C0000000000080514000000000000049C0000000000000544000000000000049C0000000000000544000000000000044C0000000000080514000000000000044C0|255 +01030000000100000005000000000000000000544000000000000044C0000000000000544000000000000049C0000000000080564000000000000049C0000000000080564000000000000044C0000000000000544000000000000044C0|0 +01030000000100000005000000000000000000000000000000000049C000000000000000000000000000004EC000000000000024400000000000004EC0000000000000244000000000000049C0000000000000000000000000000049C0|255 +01030000000100000005000000000000000000244000000000000049C000000000000024400000000000004EC000000000000034400000000000004EC0000000000000344000000000000049C0000000000000244000000000000049C0|255 +01030000000100000005000000000000000000344000000000000049C000000000000034400000000000004EC00000000000003E400000000000004EC00000000000003E4000000000000049C0000000000000344000000000000049C0|255 +010300000001000000050000000000000000003E4000000000000049C00000000000003E400000000000004EC000000000000044400000000000004EC0000000000000444000000000000049C00000000000003E4000000000000049C0|255 +01030000000100000005000000000000000000444000000000000049C000000000000044400000000000004EC000000000000049400000000000004EC0000000000000494000000000000049C0000000000000444000000000000049C0|255 +01030000000100000005000000000000000000494000000000000049C000000000000049400000000000004EC00000000000004E400000000000004EC00000000000004E4000000000000049C0000000000000494000000000000049C0|255 +010300000001000000050000000000000000004E4000000000000049C00000000000004E400000000000004EC000000000008051400000000000004EC0000000000080514000000000000049C00000000000004E4000000000000049C0|255 +01030000000100000005000000000000000080514000000000000049C000000000008051400000000000004EC000000000000054400000000000004EC0000000000000544000000000000049C0000000000080514000000000000049C0|255 +01030000000100000005000000000000000000544000000000000049C000000000000054400000000000004EC000000000008056400000000000004EC0000000000080564000000000000049C0000000000000544000000000000049C0|255 +0103000000010000000500000000000000000000000000000000004EC0000000000000000000000000008051C0000000000000244000000000008051C000000000000024400000000000004EC000000000000000000000000000004EC0|0 +0103000000010000000500000000000000000024400000000000004EC0000000000000244000000000008051C0000000000000344000000000008051C000000000000034400000000000004EC000000000000024400000000000004EC0|255 +0103000000010000000500000000000000000034400000000000004EC0000000000000344000000000008051C00000000000003E4000000000008051C00000000000003E400000000000004EC000000000000034400000000000004EC0|0 +010300000001000000050000000000000000003E400000000000004EC00000000000003E4000000000008051C0000000000000444000000000008051C000000000000044400000000000004EC00000000000003E400000000000004EC0|255 +0103000000010000000500000000000000000044400000000000004EC0000000000000444000000000008051C0000000000000494000000000008051C000000000000049400000000000004EC000000000000044400000000000004EC0|0 +0103000000010000000500000000000000000049400000000000004EC0000000000000494000000000008051C00000000000004E4000000000008051C00000000000004E400000000000004EC000000000000049400000000000004EC0|255 +010300000001000000050000000000000000004E400000000000004EC00000000000004E4000000000008051C0000000000080514000000000008051C000000000008051400000000000004EC00000000000004E400000000000004EC0|0 +0103000000010000000500000000000000008051400000000000004EC0000000000080514000000000008051C0000000000000544000000000008051C000000000000054400000000000004EC000000000008051400000000000004EC0|255 +0103000000010000000500000000000000000054400000000000004EC0000000000000544000000000008051C0000000000080564000000000008051C000000000008056400000000000004EC000000000000054400000000000004EC0|0 +01030000000100000005000000000000000000000000000000008051C0000000000000000000000000000054C0000000000000244000000000000054C0000000000000244000000000008051C0000000000000000000000000008051C0|255 +01030000000100000005000000000000000000244000000000008051C0000000000000244000000000000054C0000000000000344000000000000054C0000000000000344000000000008051C0000000000000244000000000008051C0|255 +01030000000100000005000000000000000000344000000000008051C0000000000000344000000000000054C00000000000003E4000000000000054C00000000000003E4000000000008051C0000000000000344000000000008051C0|255 +010300000001000000050000000000000000003E4000000000008051C00000000000003E4000000000000054C0000000000000444000000000000054C0000000000000444000000000008051C00000000000003E4000000000008051C0|255 +01030000000100000005000000000000000000444000000000008051C0000000000000444000000000000054C0000000000000494000000000000054C0000000000000494000000000008051C0000000000000444000000000008051C0|255 +01030000000100000005000000000000000000494000000000008051C0000000000000494000000000000054C00000000000004E4000000000000054C00000000000004E4000000000008051C0000000000000494000000000008051C0|255 +010300000001000000050000000000000000004E4000000000008051C00000000000004E4000000000000054C0000000000080514000000000000054C0000000000080514000000000008051C00000000000004E4000000000008051C0|255 +01030000000100000005000000000000000080514000000000008051C0000000000080514000000000000054C0000000000000544000000000000054C0000000000000544000000000008051C0000000000080514000000000008051C0|255 +01030000000100000005000000000000000000544000000000008051C0000000000000544000000000000054C0000000000080564000000000000054C0000000000080564000000000008051C0000000000000544000000000008051C0|255 +01030000000100000005000000000000000000000000000000000054C0000000000000000000000000008056C0000000000000244000000000008056C0000000000000244000000000000054C0000000000000000000000000000054C0|0 +01030000000100000005000000000000000000244000000000000054C0000000000000244000000000008056C0000000000000344000000000008056C0000000000000344000000000000054C0000000000000244000000000000054C0|255 +01030000000100000005000000000000000000344000000000000054C0000000000000344000000000008056C00000000000003E4000000000008056C00000000000003E4000000000000054C0000000000000344000000000000054C0|0 +010300000001000000050000000000000000003E4000000000000054C00000000000003E4000000000008056C0000000000000444000000000008056C0000000000000444000000000000054C00000000000003E4000000000000054C0|255 +01030000000100000005000000000000000000444000000000000054C0000000000000444000000000008056C0000000000000494000000000008056C0000000000000494000000000000054C0000000000000444000000000000054C0|0 +01030000000100000005000000000000000000494000000000000054C0000000000000494000000000008056C00000000000004E4000000000008056C00000000000004E4000000000000054C0000000000000494000000000000054C0|255 +010300000001000000050000000000000000004E4000000000000054C00000000000004E4000000000008056C0000000000080514000000000008056C0000000000080514000000000000054C00000000000004E4000000000000054C0|0 +01030000000100000005000000000000000080514000000000000054C0000000000080514000000000008056C0000000000000544000000000008056C0000000000000544000000000000054C0000000000080514000000000000054C0|255 +01030000000100000005000000000000000000544000000000000054C0000000000000544000000000008056C0000000000080564000000000008056C0000000000080564000000000000054C0000000000000544000000000000054C0|0 +0103000000010000000500000000000000000000000000000000000000000000000000000000000000000024C0000000000000244000000000000024C00000000000002440000000000000000000000000000000000000000000000000|0 +0103000000010000000500000000000000000024400000000000000000000000000000244000000000000024C0000000000000344000000000000024C00000000000003440000000000000000000000000000024400000000000000000|255 +0103000000010000000500000000000000000034400000000000000000000000000000344000000000000024C00000000000003E4000000000000024C00000000000003E40000000000000000000000000000034400000000000000000|0 +010300000001000000050000000000000000003E4000000000000000000000000000003E4000000000000024C0000000000000444000000000000024C0000000000000444000000000000000000000000000003E400000000000000000|255 +0103000000010000000500000000000000000044400000000000000000000000000000444000000000000024C0000000000000494000000000000024C00000000000004940000000000000000000000000000044400000000000000000|0 +0103000000010000000500000000000000000049400000000000000000000000000000494000000000000024C00000000000004E4000000000000024C00000000000004E40000000000000000000000000000049400000000000000000|255 +010300000001000000050000000000000000004E4000000000000000000000000000004E4000000000000024C0000000000080514000000000000024C0000000000080514000000000000000000000000000004E400000000000000000|0 +0103000000010000000500000000000000008051400000000000000000000000000080514000000000000024C0000000000000544000000000000024C00000000000005440000000000000000000000000008051400000000000000000|255 +0103000000010000000500000000000000000054400000000000000000000000000000544000000000000024C0000000000080564000000000000024C00000000000805640000000000000000000000000000054400000000000000000|255 +01030000000100000005000000000000000000000000000000000024C0000000000000000000000000000034C0000000000000244000000000000034C0000000000000244000000000000024C0000000000000000000000000000024C0|255 +01030000000100000005000000000000000000244000000000000024C0000000000000244000000000000034C0000000000000344000000000000034C0000000000000344000000000000024C0000000000000244000000000000024C0|255 +01030000000100000005000000000000000000344000000000000024C0000000000000344000000000000034C00000000000003E4000000000000034C00000000000003E4000000000000024C0000000000000344000000000000024C0|255 +010300000001000000050000000000000000003E4000000000000024C00000000000003E4000000000000034C0000000000000444000000000000034C0000000000000444000000000000024C00000000000003E4000000000000024C0|255 +01030000000100000005000000000000000000444000000000000024C0000000000000444000000000000034C0000000000000494000000000000034C0000000000000494000000000000024C0000000000000444000000000000024C0|255 +01030000000100000005000000000000000000494000000000000024C0000000000000494000000000000034C00000000000004E4000000000000034C00000000000004E4000000000000024C0000000000000494000000000000024C0|255 +010300000001000000050000000000000000004E4000000000000024C00000000000004E4000000000000034C0000000000080514000000000000034C0000000000080514000000000000024C00000000000004E4000000000000024C0|255 +01030000000100000005000000000000000080514000000000000024C0000000000080514000000000000034C0000000000000544000000000000034C0000000000000544000000000000024C0000000000080514000000000000024C0|255 +01030000000100000005000000000000000000544000000000000024C0000000000000544000000000000034C0000000000080564000000000000034C0000000000080564000000000000024C0000000000000544000000000000024C0|255 +01030000000100000005000000000000000000000000000000000034C000000000000000000000000000003EC000000000000024400000000000003EC0000000000000244000000000000034C0000000000000000000000000000034C0|0 +01030000000100000005000000000000000000244000000000000034C000000000000024400000000000003EC000000000000034400000000000003EC0000000000000344000000000000034C0000000000000244000000000000034C0|255 +01030000000100000005000000000000000000344000000000000034C000000000000034400000000000003EC00000000000003E400000000000003EC00000000000003E4000000000000034C0000000000000344000000000000034C0|0 +010300000001000000050000000000000000003E4000000000000034C00000000000003E400000000000003EC000000000000044400000000000003EC0000000000000444000000000000034C00000000000003E4000000000000034C0|255 +01030000000100000005000000000000000000444000000000000034C000000000000044400000000000003EC000000000000049400000000000003EC0000000000000494000000000000034C0000000000000444000000000000034C0|0 +01030000000100000005000000000000000000494000000000000034C000000000000049400000000000003EC00000000000004E400000000000003EC00000000000004E4000000000000034C0000000000000494000000000000034C0|255 +010300000001000000050000000000000000004E4000000000000034C00000000000004E400000000000003EC000000000008051400000000000003EC0000000000080514000000000000034C00000000000004E4000000000000034C0|0 +01030000000100000005000000000000000080514000000000000034C000000000008051400000000000003EC000000000000054400000000000003EC0000000000000544000000000000034C0000000000080514000000000000034C0|255 +01030000000100000005000000000000000000544000000000000034C000000000000054400000000000003EC000000000008056400000000000003EC0000000000080564000000000000034C0000000000000544000000000000034C0|0 +0103000000010000000500000000000000000000000000000000003EC0000000000000000000000000000044C0000000000000244000000000000044C000000000000024400000000000003EC000000000000000000000000000003EC0|255 +0103000000010000000500000000000000000024400000000000003EC0000000000000244000000000000044C0000000000000344000000000000044C000000000000034400000000000003EC000000000000024400000000000003EC0|255 +0103000000010000000500000000000000000034400000000000003EC0000000000000344000000000000044C00000000000003E4000000000000044C00000000000003E400000000000003EC000000000000034400000000000003EC0|255 +010300000001000000050000000000000000003E400000000000003EC00000000000003E4000000000000044C0000000000000444000000000000044C000000000000044400000000000003EC00000000000003E400000000000003EC0|255 +0103000000010000000500000000000000000044400000000000003EC0000000000000444000000000000044C0000000000000494000000000000044C000000000000049400000000000003EC000000000000044400000000000003EC0|255 +0103000000010000000500000000000000000049400000000000003EC0000000000000494000000000000044C00000000000004E4000000000000044C00000000000004E400000000000003EC000000000000049400000000000003EC0|255 +010300000001000000050000000000000000004E400000000000003EC00000000000004E4000000000000044C0000000000080514000000000000044C000000000008051400000000000003EC00000000000004E400000000000003EC0|255 +0103000000010000000500000000000000008051400000000000003EC0000000000080514000000000000044C0000000000000544000000000000044C000000000000054400000000000003EC000000000008051400000000000003EC0|255 +0103000000010000000500000000000000000054400000000000003EC0000000000000544000000000000044C0000000000080564000000000000044C000000000008056400000000000003EC000000000000054400000000000003EC0|255 +01030000000100000005000000000000000000000000000000000044C0000000000000000000000000000049C0000000000000244000000000000049C0000000000000244000000000000044C0000000000000000000000000000044C0|0 +01030000000100000005000000000000000000244000000000000044C0000000000000244000000000000049C0000000000000344000000000000049C0000000000000344000000000000044C0000000000000244000000000000044C0|255 +01030000000100000005000000000000000000344000000000000044C0000000000000344000000000000049C00000000000003E4000000000000049C00000000000003E4000000000000044C0000000000000344000000000000044C0|0 +010300000001000000050000000000000000003E4000000000000044C00000000000003E4000000000000049C0000000000000444000000000000049C0000000000000444000000000000044C00000000000003E4000000000000044C0|255 +01030000000100000005000000000000000000444000000000000044C0000000000000444000000000000049C0000000000000494000000000000049C0000000000000494000000000000044C0000000000000444000000000000044C0|0 +01030000000100000005000000000000000000494000000000000044C0000000000000494000000000000049C00000000000004E4000000000000049C00000000000004E4000000000000044C0000000000000494000000000000044C0|255 +010300000001000000050000000000000000004E4000000000000044C00000000000004E4000000000000049C0000000000080514000000000000049C0000000000080514000000000000044C00000000000004E4000000000000044C0|0 +01030000000100000005000000000000000080514000000000000044C0000000000080514000000000000049C0000000000000544000000000000049C0000000000000544000000000000044C0000000000080514000000000000044C0|255 +01030000000100000005000000000000000000544000000000000044C0000000000000544000000000000049C0000000000080564000000000000049C0000000000080564000000000000044C0000000000000544000000000000044C0|0 +01030000000100000005000000000000000000000000000000000049C000000000000000000000000000004EC000000000000024400000000000004EC0000000000000244000000000000049C0000000000000000000000000000049C0|255 +01030000000100000005000000000000000000244000000000000049C000000000000024400000000000004EC000000000000034400000000000004EC0000000000000344000000000000049C0000000000000244000000000000049C0|255 +01030000000100000005000000000000000000344000000000000049C000000000000034400000000000004EC00000000000003E400000000000004EC00000000000003E4000000000000049C0000000000000344000000000000049C0|255 +010300000001000000050000000000000000003E4000000000000049C00000000000003E400000000000004EC000000000000044400000000000004EC0000000000000444000000000000049C00000000000003E4000000000000049C0|255 +01030000000100000005000000000000000000444000000000000049C000000000000044400000000000004EC000000000000049400000000000004EC0000000000000494000000000000049C0000000000000444000000000000049C0|255 +01030000000100000005000000000000000000494000000000000049C000000000000049400000000000004EC00000000000004E400000000000004EC00000000000004E4000000000000049C0000000000000494000000000000049C0|255 +010300000001000000050000000000000000004E4000000000000049C00000000000004E400000000000004EC000000000008051400000000000004EC0000000000080514000000000000049C00000000000004E4000000000000049C0|255 +01030000000100000005000000000000000080514000000000000049C000000000008051400000000000004EC000000000000054400000000000004EC0000000000000544000000000000049C0000000000080514000000000000049C0|255 +01030000000100000005000000000000000000544000000000000049C000000000000054400000000000004EC000000000008056400000000000004EC0000000000080564000000000000049C0000000000000544000000000000049C0|255 +0103000000010000000500000000000000000000000000000000004EC0000000000000000000000000008051C0000000000000244000000000008051C000000000000024400000000000004EC000000000000000000000000000004EC0|0 +0103000000010000000500000000000000000024400000000000004EC0000000000000244000000000008051C0000000000000344000000000008051C000000000000034400000000000004EC000000000000024400000000000004EC0|255 +0103000000010000000500000000000000000034400000000000004EC0000000000000344000000000008051C00000000000003E4000000000008051C00000000000003E400000000000004EC000000000000034400000000000004EC0|0 +010300000001000000050000000000000000003E400000000000004EC00000000000003E4000000000008051C0000000000000444000000000008051C000000000000044400000000000004EC00000000000003E400000000000004EC0|255 +0103000000010000000500000000000000000044400000000000004EC0000000000000444000000000008051C0000000000000494000000000008051C000000000000049400000000000004EC000000000000044400000000000004EC0|0 +0103000000010000000500000000000000000049400000000000004EC0000000000000494000000000008051C00000000000004E4000000000008051C00000000000004E400000000000004EC000000000000049400000000000004EC0|255 +010300000001000000050000000000000000004E400000000000004EC00000000000004E4000000000008051C0000000000080514000000000008051C000000000008051400000000000004EC00000000000004E400000000000004EC0|0 +0103000000010000000500000000000000008051400000000000004EC0000000000080514000000000008051C0000000000000544000000000008051C000000000000054400000000000004EC000000000008051400000000000004EC0|255 +0103000000010000000500000000000000000054400000000000004EC0000000000000544000000000008051C0000000000080564000000000008051C000000000008056400000000000004EC000000000000054400000000000004EC0|0 +01030000000100000005000000000000000000000000000000008051C0000000000000000000000000000054C0000000000000244000000000000054C0000000000000244000000000008051C0000000000000000000000000008051C0|255 +01030000000100000005000000000000000000244000000000008051C0000000000000244000000000000054C0000000000000344000000000000054C0000000000000344000000000008051C0000000000000244000000000008051C0|255 +01030000000100000005000000000000000000344000000000008051C0000000000000344000000000000054C00000000000003E4000000000000054C00000000000003E4000000000008051C0000000000000344000000000008051C0|255 +010300000001000000050000000000000000003E4000000000008051C00000000000003E4000000000000054C0000000000000444000000000000054C0000000000000444000000000008051C00000000000003E4000000000008051C0|255 +01030000000100000005000000000000000000444000000000008051C0000000000000444000000000000054C0000000000000494000000000000054C0000000000000494000000000008051C0000000000000444000000000008051C0|255 +01030000000100000005000000000000000000494000000000008051C0000000000000494000000000000054C00000000000004E4000000000000054C00000000000004E4000000000008051C0000000000000494000000000008051C0|255 +010300000001000000050000000000000000004E4000000000008051C00000000000004E4000000000000054C0000000000080514000000000000054C0000000000080514000000000008051C00000000000004E4000000000008051C0|255 +01030000000100000005000000000000000080514000000000008051C0000000000080514000000000000054C0000000000000544000000000000054C0000000000000544000000000008051C0000000000080514000000000008051C0|255 +01030000000100000005000000000000000000544000000000008051C0000000000000544000000000000054C0000000000080564000000000000054C0000000000080564000000000008051C0000000000000544000000000008051C0|255 +01030000000100000005000000000000000000000000000000000054C0000000000000000000000000008056C0000000000000244000000000008056C0000000000000244000000000000054C0000000000000000000000000000054C0|255 +01030000000100000005000000000000000000244000000000000054C0000000000000244000000000008056C0000000000000344000000000008056C0000000000000344000000000000054C0000000000000244000000000000054C0|255 +01030000000100000005000000000000000000344000000000000054C0000000000000344000000000008056C00000000000003E4000000000008056C00000000000003E4000000000000054C0000000000000344000000000000054C0|0 +010300000001000000050000000000000000003E4000000000000054C00000000000003E4000000000008056C0000000000000444000000000008056C0000000000000444000000000000054C00000000000003E4000000000000054C0|255 +01030000000100000005000000000000000000444000000000000054C0000000000000444000000000008056C0000000000000494000000000008056C0000000000000494000000000000054C0000000000000444000000000000054C0|0 +01030000000100000005000000000000000000494000000000000054C0000000000000494000000000008056C00000000000004E4000000000008056C00000000000004E4000000000000054C0000000000000494000000000000054C0|255 +010300000001000000050000000000000000004E4000000000000054C00000000000004E4000000000008056C0000000000080514000000000008056C0000000000080514000000000000054C00000000000004E4000000000000054C0|0 +01030000000100000005000000000000000080514000000000000054C0000000000080514000000000008056C0000000000000544000000000008056C0000000000000544000000000000054C0000000000080514000000000000054C0|255 +01030000000100000005000000000000000000544000000000000054C0000000000000544000000000008056C0000000000080564000000000008056C0000000000080564000000000000054C0000000000000544000000000000054C0|0 +0103000000010000000500000000000000000000000000000000000000000000000000000000000000000024C0000000000000244000000000000024C00000000000002440000000000000000000000000000000000000000000000000|0 +0103000000010000000500000000000000000024400000000000000000000000000000244000000000000024C0000000000000344000000000000024C00000000000003440000000000000000000000000000024400000000000000000|255 +0103000000010000000500000000000000000034400000000000000000000000000000344000000000000024C00000000000003E4000000000000024C00000000000003E40000000000000000000000000000034400000000000000000|0 +010300000001000000050000000000000000003E4000000000000000000000000000003E4000000000000024C0000000000000444000000000000024C0000000000000444000000000000000000000000000003E400000000000000000|255 +0103000000010000000500000000000000000044400000000000000000000000000000444000000000000024C0000000000000494000000000000024C00000000000004940000000000000000000000000000044400000000000000000|0 +0103000000010000000500000000000000000049400000000000000000000000000000494000000000000024C00000000000004E4000000000000024C00000000000004E40000000000000000000000000000049400000000000000000|255 +010300000001000000050000000000000000004E4000000000000000000000000000004E4000000000000024C0000000000080514000000000000024C0000000000080514000000000000000000000000000004E400000000000000000|0 +0103000000010000000500000000000000008051400000000000000000000000000080514000000000000024C0000000000000544000000000000024C00000000000005440000000000000000000000000008051400000000000000000|255 +0103000000010000000500000000000000000054400000000000000000000000000000544000000000000024C0000000000080564000000000000024C00000000000805640000000000000000000000000000054400000000000000000|0 +01030000000100000005000000000000000000000000000000000024C0000000000000000000000000000034C0000000000000244000000000000034C0000000000000244000000000000024C0000000000000000000000000000024C0|255 +01030000000100000005000000000000000000244000000000000024C0000000000000244000000000000034C0000000000000344000000000000034C0000000000000344000000000000024C0000000000000244000000000000024C0|255 +01030000000100000005000000000000000000344000000000000024C0000000000000344000000000000034C00000000000003E4000000000000034C00000000000003E4000000000000024C0000000000000344000000000000024C0|255 +010300000001000000050000000000000000003E4000000000000024C00000000000003E4000000000000034C0000000000000444000000000000034C0000000000000444000000000000024C00000000000003E4000000000000024C0|255 +01030000000100000005000000000000000000444000000000000024C0000000000000444000000000000034C0000000000000494000000000000034C0000000000000494000000000000024C0000000000000444000000000000024C0|255 +01030000000100000005000000000000000000494000000000000024C0000000000000494000000000000034C00000000000004E4000000000000034C00000000000004E4000000000000024C0000000000000494000000000000024C0|255 +010300000001000000050000000000000000004E4000000000000024C00000000000004E4000000000000034C0000000000080514000000000000034C0000000000080514000000000000024C00000000000004E4000000000000024C0|255 +01030000000100000005000000000000000080514000000000000024C0000000000080514000000000000034C0000000000000544000000000000034C0000000000000544000000000000024C0000000000080514000000000000024C0|255 +01030000000100000005000000000000000000544000000000000024C0000000000000544000000000000034C0000000000080564000000000000034C0000000000080564000000000000024C0000000000000544000000000000024C0|255 +01030000000100000005000000000000000000000000000000000034C000000000000000000000000000003EC000000000000024400000000000003EC0000000000000244000000000000034C0000000000000000000000000000034C0|0 +01030000000100000005000000000000000000244000000000000034C000000000000024400000000000003EC000000000000034400000000000003EC0000000000000344000000000000034C0000000000000244000000000000034C0|255 +01030000000100000005000000000000000000344000000000000034C000000000000034400000000000003EC00000000000003E400000000000003EC00000000000003E4000000000000034C0000000000000344000000000000034C0|0 +010300000001000000050000000000000000003E4000000000000034C00000000000003E400000000000003EC000000000000044400000000000003EC0000000000000444000000000000034C00000000000003E4000000000000034C0|255 +01030000000100000005000000000000000000444000000000000034C000000000000044400000000000003EC000000000000049400000000000003EC0000000000000494000000000000034C0000000000000444000000000000034C0|0 +01030000000100000005000000000000000000494000000000000034C000000000000049400000000000003EC00000000000004E400000000000003EC00000000000004E4000000000000034C0000000000000494000000000000034C0|255 +010300000001000000050000000000000000004E4000000000000034C00000000000004E400000000000003EC000000000008051400000000000003EC0000000000080514000000000000034C00000000000004E4000000000000034C0|0 +01030000000100000005000000000000000080514000000000000034C000000000008051400000000000003EC000000000000054400000000000003EC0000000000000544000000000000034C0000000000080514000000000000034C0|255 +01030000000100000005000000000000000000544000000000000034C000000000000054400000000000003EC000000000008056400000000000003EC0000000000080564000000000000034C0000000000000544000000000000034C0|0 +0103000000010000000500000000000000000000000000000000003EC0000000000000000000000000000044C0000000000000244000000000000044C000000000000024400000000000003EC000000000000000000000000000003EC0|255 +0103000000010000000500000000000000000024400000000000003EC0000000000000244000000000000044C0000000000000344000000000000044C000000000000034400000000000003EC000000000000024400000000000003EC0|255 +0103000000010000000500000000000000000034400000000000003EC0000000000000344000000000000044C00000000000003E4000000000000044C00000000000003E400000000000003EC000000000000034400000000000003EC0|255 +010300000001000000050000000000000000003E400000000000003EC00000000000003E4000000000000044C0000000000000444000000000000044C000000000000044400000000000003EC00000000000003E400000000000003EC0|255 +0103000000010000000500000000000000000044400000000000003EC0000000000000444000000000000044C0000000000000494000000000000044C000000000000049400000000000003EC000000000000044400000000000003EC0|255 +0103000000010000000500000000000000000049400000000000003EC0000000000000494000000000000044C00000000000004E4000000000000044C00000000000004E400000000000003EC000000000000049400000000000003EC0|255 +010300000001000000050000000000000000004E400000000000003EC00000000000004E4000000000000044C0000000000080514000000000000044C000000000008051400000000000003EC00000000000004E400000000000003EC0|255 +0103000000010000000500000000000000008051400000000000003EC0000000000080514000000000000044C0000000000000544000000000000044C000000000000054400000000000003EC000000000008051400000000000003EC0|255 +0103000000010000000500000000000000000054400000000000003EC0000000000000544000000000000044C0000000000080564000000000000044C000000000008056400000000000003EC000000000000054400000000000003EC0|255 +01030000000100000005000000000000000000000000000000000044C0000000000000000000000000000049C0000000000000244000000000000049C0000000000000244000000000000044C0000000000000000000000000000044C0|0 +01030000000100000005000000000000000000244000000000000044C0000000000000244000000000000049C0000000000000344000000000000049C0000000000000344000000000000044C0000000000000244000000000000044C0|255 +01030000000100000005000000000000000000344000000000000044C0000000000000344000000000000049C00000000000003E4000000000000049C00000000000003E4000000000000044C0000000000000344000000000000044C0|0 +010300000001000000050000000000000000003E4000000000000044C00000000000003E4000000000000049C0000000000000444000000000000049C0000000000000444000000000000044C00000000000003E4000000000000044C0|255 +01030000000100000005000000000000000000444000000000000044C0000000000000444000000000000049C0000000000000494000000000000049C0000000000000494000000000000044C0000000000000444000000000000044C0|0 +01030000000100000005000000000000000000494000000000000044C0000000000000494000000000000049C00000000000004E4000000000000049C00000000000004E4000000000000044C0000000000000494000000000000044C0|255 +010300000001000000050000000000000000004E4000000000000044C00000000000004E4000000000000049C0000000000080514000000000000049C0000000000080514000000000000044C00000000000004E4000000000000044C0|0 +01030000000100000005000000000000000080514000000000000044C0000000000080514000000000000049C0000000000000544000000000000049C0000000000000544000000000000044C0000000000080514000000000000044C0|255 +01030000000100000005000000000000000000544000000000000044C0000000000000544000000000000049C0000000000080564000000000000049C0000000000080564000000000000044C0000000000000544000000000000044C0|0 +01030000000100000005000000000000000000000000000000000049C000000000000000000000000000004EC000000000000024400000000000004EC0000000000000244000000000000049C0000000000000000000000000000049C0|255 +01030000000100000005000000000000000000244000000000000049C000000000000024400000000000004EC000000000000034400000000000004EC0000000000000344000000000000049C0000000000000244000000000000049C0|255 +01030000000100000005000000000000000000344000000000000049C000000000000034400000000000004EC00000000000003E400000000000004EC00000000000003E4000000000000049C0000000000000344000000000000049C0|255 +010300000001000000050000000000000000003E4000000000000049C00000000000003E400000000000004EC000000000000044400000000000004EC0000000000000444000000000000049C00000000000003E4000000000000049C0|255 +01030000000100000005000000000000000000444000000000000049C000000000000044400000000000004EC000000000000049400000000000004EC0000000000000494000000000000049C0000000000000444000000000000049C0|255 +01030000000100000005000000000000000000494000000000000049C000000000000049400000000000004EC00000000000004E400000000000004EC00000000000004E4000000000000049C0000000000000494000000000000049C0|255 +010300000001000000050000000000000000004E4000000000000049C00000000000004E400000000000004EC000000000008051400000000000004EC0000000000080514000000000000049C00000000000004E4000000000000049C0|255 +01030000000100000005000000000000000080514000000000000049C000000000008051400000000000004EC000000000000054400000000000004EC0000000000000544000000000000049C0000000000080514000000000000049C0|255 +01030000000100000005000000000000000000544000000000000049C000000000000054400000000000004EC000000000008056400000000000004EC0000000000080564000000000000049C0000000000000544000000000000049C0|255 +0103000000010000000500000000000000000000000000000000004EC0000000000000000000000000008051C0000000000000244000000000008051C000000000000024400000000000004EC000000000000000000000000000004EC0|0 +0103000000010000000500000000000000000024400000000000004EC0000000000000244000000000008051C0000000000000344000000000008051C000000000000034400000000000004EC000000000000024400000000000004EC0|255 +0103000000010000000500000000000000000034400000000000004EC0000000000000344000000000008051C00000000000003E4000000000008051C00000000000003E400000000000004EC000000000000034400000000000004EC0|0 +010300000001000000050000000000000000003E400000000000004EC00000000000003E4000000000008051C0000000000000444000000000008051C000000000000044400000000000004EC00000000000003E400000000000004EC0|255 +0103000000010000000500000000000000000044400000000000004EC0000000000000444000000000008051C0000000000000494000000000008051C000000000000049400000000000004EC000000000000044400000000000004EC0|0 +0103000000010000000500000000000000000049400000000000004EC0000000000000494000000000008051C00000000000004E4000000000008051C00000000000004E400000000000004EC000000000000049400000000000004EC0|255 +010300000001000000050000000000000000004E400000000000004EC00000000000004E4000000000008051C0000000000080514000000000008051C000000000008051400000000000004EC00000000000004E400000000000004EC0|0 +0103000000010000000500000000000000008051400000000000004EC0000000000080514000000000008051C0000000000000544000000000008051C000000000000054400000000000004EC000000000008051400000000000004EC0|255 +0103000000010000000500000000000000000054400000000000004EC0000000000000544000000000008051C0000000000080564000000000008051C000000000008056400000000000004EC000000000000054400000000000004EC0|0 +01030000000100000005000000000000000000000000000000008051C0000000000000000000000000000054C0000000000000244000000000000054C0000000000000244000000000008051C0000000000000000000000000008051C0|255 +01030000000100000005000000000000000000244000000000008051C0000000000000244000000000000054C0000000000000344000000000000054C0000000000000344000000000008051C0000000000000244000000000008051C0|255 +01030000000100000005000000000000000000344000000000008051C0000000000000344000000000000054C00000000000003E4000000000000054C00000000000003E4000000000008051C0000000000000344000000000008051C0|255 +010300000001000000050000000000000000003E4000000000008051C00000000000003E4000000000000054C0000000000000444000000000000054C0000000000000444000000000008051C00000000000003E4000000000008051C0|255 +01030000000100000005000000000000000000444000000000008051C0000000000000444000000000000054C0000000000000494000000000000054C0000000000000494000000000008051C0000000000000444000000000008051C0|255 +01030000000100000005000000000000000000494000000000008051C0000000000000494000000000000054C00000000000004E4000000000000054C00000000000004E4000000000008051C0000000000000494000000000008051C0|255 +010300000001000000050000000000000000004E4000000000008051C00000000000004E4000000000000054C0000000000080514000000000000054C0000000000080514000000000008051C00000000000004E4000000000008051C0|255 +01030000000100000005000000000000000080514000000000008051C0000000000080514000000000000054C0000000000000544000000000000054C0000000000000544000000000008051C0000000000080514000000000008051C0|255 +01030000000100000005000000000000000000544000000000008051C0000000000000544000000000000054C0000000000080564000000000000054C0000000000080564000000000008051C0000000000000544000000000008051C0|255 +01030000000100000005000000000000000000000000000000000054C0000000000000000000000000008056C0000000000000244000000000008056C0000000000000244000000000000054C0000000000000000000000000000054C0|0 +01030000000100000005000000000000000000244000000000000054C0000000000000244000000000008056C0000000000000344000000000008056C0000000000000344000000000000054C0000000000000244000000000000054C0|255 +01030000000100000005000000000000000000344000000000000054C0000000000000344000000000008056C00000000000003E4000000000008056C00000000000003E4000000000000054C0000000000000344000000000000054C0|0 +010300000001000000050000000000000000003E4000000000000054C00000000000003E4000000000008056C0000000000000444000000000008056C0000000000000444000000000000054C00000000000003E4000000000000054C0|255 +01030000000100000005000000000000000000444000000000000054C0000000000000444000000000008056C0000000000000494000000000008056C0000000000000494000000000000054C0000000000000444000000000000054C0|0 +01030000000100000005000000000000000000494000000000000054C0000000000000494000000000008056C00000000000004E4000000000008056C00000000000004E4000000000000054C0000000000000494000000000000054C0|255 +010300000001000000050000000000000000004E4000000000000054C00000000000004E4000000000008056C0000000000080514000000000008056C0000000000080514000000000000054C00000000000004E4000000000000054C0|0 +01030000000100000005000000000000000080514000000000000054C0000000000080514000000000008056C0000000000000544000000000008056C0000000000000544000000000000054C0000000000080514000000000000054C0|255 +01030000000100000005000000000000000000544000000000000054C0000000000000544000000000008056C0000000000080564000000000008056C0000000000080564000000000000054C0000000000000544000000000000054C0|255 diff -Nru postgis-1.5.3/raster/test/regress/loader/Tiled10x10Copy.select.sql postgis-2.0.1/raster/test/regress/loader/Tiled10x10Copy.select.sql --- postgis-1.5.3/raster/test/regress/loader/Tiled10x10Copy.select.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/loader/Tiled10x10Copy.select.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,4 @@ +SELECT srid, scale_x::numeric(16, 10), scale_y::numeric(16, 10), blocksize_x, blocksize_y, same_alignment, regular_blocking, num_bands, pixel_types, nodata_values::numeric(16,10)[], out_db, extent FROM raster_columns WHERE r_table_name = 'loadedrast' AND r_raster_column = 'the_rast'; +SELECT geom, val FROM (SELECT (ST_DumpAsPolygons(the_rast, 1)).* FROM loadedrast) foo; +SELECT geom, val FROM (SELECT (ST_DumpAsPolygons(the_rast, 2)).* FROM loadedrast) foo; +SELECT geom, val FROM (SELECT (ST_DumpAsPolygons(the_rast, 3)).* FROM loadedrast) foo; Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/raster/test/regress/loader/testraster.tif and /tmp/0gD0VaZ8_r/postgis-2.0.1/raster/test/regress/loader/testraster.tif differ diff -Nru postgis-1.5.3/raster/test/regress/rt_above.sql postgis-2.0.1/raster/test/regress/rt_above.sql --- postgis-1.5.3/raster/test/regress/rt_above.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_above.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,37 @@ +----------------------------------------------------------------------- +-- $Id$ +-- +-- Copyright (c) 2009 Sandro Santilli +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +----------------------------------------------------------------------- + +----------------------------------------------------------------------- +-- raster_above +----------------------------------------------------------------------- +SELECT 'raster_above(X, query(1,1))' as op, + count(a.y), + min(a.x) as xmin, + max(a.x) as xmax, + min(a.y) as ymin, + max(a.y) as ymax, + st_extent(a.tile::geometry) +FROM rt_gist_grid_test a, rt_gist_query_test b +WHERE b.x = 1 and b.y = 1 + AND raster_above(a.tile, b.tile); + +----------------------------------------------------------------------- +-- Test |>> above +----------------------------------------------------------------------- + +SELECT 'X |>> query(1,1)' as op, + count(a.y), + min(a.x) as xmin, + max(a.x) as xmax, + min(a.y) as ymin, + max(a.y) as ymax, + st_extent(a.tile::geometry) +FROM rt_gist_grid_test a, rt_gist_query_test b +WHERE b.x = 1 and b.y = 1 + AND a.tile |>> b.tile; diff -Nru postgis-1.5.3/raster/test/regress/rt_above_expected postgis-2.0.1/raster/test/regress/rt_above_expected --- postgis-1.5.3/raster/test/regress/rt_above_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_above_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +raster_above(X, query(1,1))|30|0|9|7|9|BOX(-100 40,100 100) +X |>> query(1,1)|30|0|9|7|9|BOX(-100 40,100 100) diff -Nru postgis-1.5.3/raster/test/regress/rt_addband.sql postgis-2.0.1/raster/test/regress/rt_addband.sql --- postgis-1.5.3/raster/test/regress/rt_addband.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_addband.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,115 @@ +----------------------------------------------------------------------- +-- $Id$ +-- +-- Copyright (c) 2010 Pierre Racine +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +----------------------------------------------------------------------- + +----------------------------------------------------------------------- +--- Test of "ST_AddBand". +----------------------------------------------------------------------- + + +----------------------------------------------------------------------- +--- ST_AddBand +----------------------------------------------------------------------- + +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '1BB', -1, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '1BB', 0, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '1BB', 1, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '1BB', 2, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '1BB', 21.46, NULL), 3, 3); + +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '2BUI', -1, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '2BUI', 0, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '2BUI', 3, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '2BUI', 4, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '2BUI', 21.46, NULL), 3, 3); + +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '4BUI', -1, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '4BUI', 0, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '4BUI', 15, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '4BUI', 16, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '4BUI', 21.46, NULL), 3, 3); + +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '8BSI', -129, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '8BSI', -128, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '8BSI', 0, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '8BSI', 127, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '8BSI', 128, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '8BSI', 21.46, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '8BSI', 210.46, NULL), 3, 3); + +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '8BUI', -1, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '8BUI', 0, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '8BUI', 255, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '8BUI', 256, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '8BUI', 21.46, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '8BUI', 410.46, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '8BUI', 255.9999999, NULL), 3, 3); + +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '16BSI', -32769, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '16BSI', -32768, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '16BSI', 0, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '16BSI', 32767, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '16BSI', 32768, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '16BSI', 21.46, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '16BSI', 210000.46, NULL), 3, 3); + +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '16BUI', -1, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '16BUI', 0, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '16BUI', 65535, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '16BUI', 65537, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '16BUI', 21.46, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '16BUI', 210000.4645643647457, NULL), 3, 3); + +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BSI', -2147483649, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BSI', -2147483648, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BSI', 0, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BSI', 2147483647, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BSI', 2147483648, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BSI', 21.46, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BSI', 210000.4645643647457, NULL), 3, 3); + +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BUI', -1, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BUI', 0, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BUI', 4294967295, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BUI', 4294967296, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BUI', 214294967296, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BUI', 21.46, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BUI', 4294967295.9999999, NULL), 3, 3); + +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BF', 0, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BF', 4294967000, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BF', 4294967000, NULL), 3, 3)::float4; +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BF', 4294967295, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BF', 4294967295, NULL), 3, 3)::float4; +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BF', 4294967296, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BF', 4294967296, NULL), 3, 3)::float4; +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BF', 21.46, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BF', 21.46, NULL), 3, 3)::float4; +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BF', 21003.1, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BF', 21003.1, NULL), 3, 3)::float4; +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BF', 123.456, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BF', 123.456, NULL), 3, 3)::float4; +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BF', 1234.567, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BF', 1234.567, NULL), 3, 3)::float4; +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BF', 210000.4645643647457, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BF', 210000.4645643647457, NULL), 3, 3)::float4; + +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '64BF', -1, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '64BF', 0, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '64BF', 14294967296.123456, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '64BF', 21.46, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '64BF', 21003.1, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '64BF', 123.4567, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '64BF', 1234.567, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '64BF', 210000.4645643647457, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '64BF', 1234.4645643647457, NULL), 3, 3); +SELECT St_Value(ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0,0), 1, '64BF', 1234.5678, NULL), ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, 1), 3, 3); +SELECT St_Value(ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0,0), 1, '64BF', 1234.5678, NULL), ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1), 3, 3); +SELECT St_Value(ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0,0), 1, '64BF', 1234.5678, NULL), ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0)), 3, 3); +-- array version test +SELECT (ST_DumpAsPolygons(newrast,3)).val As b3val FROM (SELECT ST_AddBand(NULL, array_agg(rast)) AS newrast FROM (SELECT ST_AsRaster(ST_Buffer(ST_Point(10,10), 34),200,200, '8BUI',i*30) As rast FROM generate_series(1,3) As i ) As foo ) As foofoo; diff -Nru postgis-1.5.3/raster/test/regress/rt_addband_expected postgis-2.0.1/raster/test/regress/rt_addband_expected --- postgis-1.5.3/raster/test/regress/rt_addband_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_addband_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,92 @@ +0 +0 +1 +1 +1 +0 +0 +3 +3 +3 +0 +0 +15 +15 +15 +-128 +-128 +0 +127 +127 +21 +127 +0 +0 +255 +255 +21 +255 +255 +-32768 +-32768 +0 +32767 +32767 +21 +32767 +0 +0 +65535 +65535 +21 +65535 +-2147483648 +-2147483648 +0 +2147483647 +2147483647 +21 +210000 +0 +0 +4294967295 +4294967295 +4294967295 +21 +4294967295 +0 +4294967040 +4.29497e+9 +4294967296 +4.29497e+9 +4294967296 +4.29497e+9 +21.4599990844727 +21.46 +21003.099609375 +21003.1 +123.456001281738 +123.456 +1234.56701660156 +1234.57 +210000.46875 +210000 +-1 +0 +14294967296.1235 +21.46 +21003.1 +123.4567 +1234.567 +210000.464564365 +1234.46456436475 +NOTICE: rt_raster_copy_band: Second raster has no band +NOTICE: RASTER_copyband: Could not add band to raster. Returning original raster. +1234.5678 +NOTICE: rt_raster_copy_band: Second raster has no band +NOTICE: RASTER_copyband: Could not add band to raster. Returning original raster. +1234.5678 +NOTICE: rt_raster_copy_band: Second raster has no band +NOTICE: RASTER_copyband: Could not add band to raster. Returning original raster. +1234.5678 +90 diff -Nru postgis-1.5.3/raster/test/regress/rt_asgdalraster.sql postgis-2.0.1/raster/test/regress/rt_asgdalraster.sql --- postgis-1.5.3/raster/test/regress/rt_asgdalraster.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_asgdalraster.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,217 @@ +SELECT CASE + WHEN length( + ST_AsGDALRaster( + NULL, + 'GTiff' + ) + ) > 0 + THEN 1 + ELSE 0 +END; +SELECT CASE + WHEN length( + ST_AsGDALRaster( + ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0), 1, '64BF', 123.4567, NULL), + 'GTiff' + ) + ) > 0 + THEN 1 + ELSE 0 +END; +SELECT CASE + WHEN length( + ST_AsGDALRaster( + ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0) + , 1, '64BF', 1234.5678, NULL + ) + , '64BF', 987.654321, NULL + ) + , '64BF', 9876.54321, NULL + ), + 'GTiff' + ) + ) > 0 + THEN 1 + ELSE 0 +END; +SELECT CASE + WHEN length( + ST_AsGDALRaster( + ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0) + , 1, '64BF', 1234.5678, -9999 + ) + , '64BF', 987.654321, -9999 + ) + , '64BF', 9876.54321, -9999 + ), + 'GTiff' + ) + ) > 0 + THEN 1 + ELSE 0 +END; +SELECT CASE + WHEN length( + ST_AsGDALRaster( + ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0), 1, '8BSI', 123, NULL), + 'PNG' + ) + ) > 0 + THEN 1 + ELSE 0 +END; +SELECT CASE + WHEN length( + ST_AsGDALRaster( + ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0), 1, '8BUI', 123, NULL), + 'PNG' + ) + ) > 0 + THEN 1 + ELSE 0 +END; +SELECT CASE + WHEN length( + ST_AsGDALRaster( + ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0), 1, '8BSI', -123, NULL), + 'PNG' + ) + ) > 0 + THEN 1 + ELSE 0 +END; +SELECT CASE + WHEN length( + ST_AsGDALRaster( + ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0), 1, '8BUI', 254, NULL), + 'PNG' + ) + ) > 0 + THEN 1 + ELSE 0 +END; +SELECT CASE + WHEN length( + ST_AsGDALRaster( + ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0) + , 1, '8BSI', 1, -1 + ) + , 2, '8BSI', 11, -1 + ) + , 3, '8BSI', 111, -1 + ), + 'PNG', + ARRAY['ZLEVEL=1'] + ) + ) > 0 + THEN 1 + ELSE 0 +END; +SELECT CASE + WHEN length( + ST_AsGDALRaster( + ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0) + , 1, '8BSI', 1, -1 + ) + , 2, '8BSI', 11, -1 + ) + , 3, '8BSI', 111, -1 + ), + 'PNG', + ARRAY['ZLEVEL=9'] + ) + ) > 0 + THEN 1 + ELSE 0 +END; +SELECT CASE + WHEN length( + ST_AsGDALRaster( + ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0), 1, '8BSI', 123, NULL), + 'JPEG' + ) + ) > 0 + THEN 1 + ELSE 0 +END; +SELECT CASE + WHEN length( + ST_AsGDALRaster( + ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0), 1, '8BUI', 123, NULL), + 'JPEG' + ) + ) > 0 + THEN 1 + ELSE 0 +END; +SELECT CASE + WHEN length( + ST_AsGDALRaster( + ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0), 1, '8BSI', -123, NULL), + 'JPEG' + ) + ) > 0 + THEN 1 + ELSE 0 +END; +SELECT CASE + WHEN length( + ST_AsGDALRaster( + ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0), 1, '8BUI', 254, NULL), + 'JPEG' + ) + ) > 0 + THEN 1 + ELSE 0 +END; +SELECT CASE + WHEN length( + ST_AsGDALRaster( + ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0) + , 1, '8BSI', 1, -1 + ) + , 2, '8BSI', 11, -1 + ) + , 3, '8BSI', 111, -1 + ), + 'JPEG' + ) + ) > 0 + THEN 1 + ELSE 0 +END; +SELECT CASE + WHEN length( + ST_AsGDALRaster( + ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0) + , 1, '8BSI', 1, -1 + ) + , 2, '8BSI', 11, -1 + ) + , 3, '8BSI', 111, -1 + ), + 'JPEG', + ARRAY['QUALITY=90','PROGRESSIVE=ON'] + ) + ) > 0 + THEN 1 + ELSE 0 +END; diff -Nru postgis-1.5.3/raster/test/regress/rt_asgdalraster_expected postgis-2.0.1/raster/test/regress/rt_asgdalraster_expected --- postgis-1.5.3/raster/test/regress/rt_asgdalraster_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_asgdalraster_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,16 @@ +0 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 diff -Nru postgis-1.5.3/raster/test/regress/rt_asjpeg.sql postgis-2.0.1/raster/test/regress/rt_asjpeg.sql --- postgis-1.5.3/raster/test/regress/rt_asjpeg.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_asjpeg.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,113 @@ +SELECT CASE + WHEN length( + ST_AsJPEG( + ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0), 1, '8BSI', 123, NULL) + ) + ) > 0 + THEN 1 + ELSE 0 +END; +SELECT CASE + WHEN length( + ST_AsJPEG( + ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0), 1, '8BUI', 123, NULL) + ) + ) > 0 + THEN 1 + ELSE 0 +END; +SELECT CASE + WHEN length( + ST_AsJPEG( + ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0), 1, '8BSI', -123, NULL) + ) + ) > 0 + THEN 1 + ELSE 0 +END; +SELECT CASE + WHEN length( + ST_AsJPEG( + ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0), 1, '8BUI', 254, NULL) + ) + ) > 0 + THEN 1 + ELSE 0 +END; +SELECT CASE + WHEN length( + ST_AsJPEG( + ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0) + , 1, '8BUI', 1, 255 + ) + , 2, '8BUI', 11, 0 + ) + , 3, '8BUI', 111, 127 + ) + ) + ) > 0 + THEN 1 + ELSE 0 +END; +SELECT CASE + WHEN length( + ST_AsJPEG( + ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0) + , 1, '8BSI', 1, -1 + ) + , 2, '8BSI', 11, -1 + ) + , 3, '8BSI', 111, -1 + ), + ARRAY['QUALITY=90','PROGRESSIVE=ON'] + ) + ) > 0 + THEN 1 + ELSE 0 +END; +SELECT CASE + WHEN length( + ST_AsJPEG( + ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0) + , 1, '8BSI', 1, -1 + ) + , 2, '8BSI', 11, -1 + ) + , 3, '8BSI', 111, -1 + ), + ARRAY[3,1], + 50 + ) + ) > 0 + THEN 1 + ELSE 0 +END; +SELECT CASE + WHEN length( + ST_AsJPEG( + ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0) + , 1, '8BSI', 1, -1 + ) + , 2, '8BSI', 11, -1 + ) + , 3, '8BUI', 111, -1 + ), + ARRAY[3], + 10 + ) + ) > 0 + THEN 1 + ELSE 0 +END; diff -Nru postgis-1.5.3/raster/test/regress/rt_asjpeg_expected postgis-2.0.1/raster/test/regress/rt_asjpeg_expected --- postgis-1.5.3/raster/test/regress/rt_asjpeg_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_asjpeg_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,9 @@ +ERROR: The pixel type of band 1 in the raster is not 8BUI. The JPEG format can only be used with the 8BUI pixel type. +1 +ERROR: The pixel type of band 1 in the raster is not 8BUI. The JPEG format can only be used with the 8BUI pixel type. +1 +1 +ERROR: The pixel type of band 1 in the raster is not 8BUI. The JPEG format can only be used with the 8BUI pixel type. +NOTICE: The JPEG format only permits one or three bands. The first band will be used. +ERROR: The pixel type of band 1 in the raster is not 8BUI. The JPEG format can only be used with the 8BUI pixel type. +1 diff -Nru postgis-1.5.3/raster/test/regress/rt_aspng.sql postgis-2.0.1/raster/test/regress/rt_aspng.sql --- postgis-1.5.3/raster/test/regress/rt_aspng.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_aspng.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,130 @@ +SELECT CASE + WHEN length( + ST_AsPNG( + ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0), 1, '8BSI', 123, NULL) + ) + ) > 0 + THEN 1 + ELSE 0 +END; +SELECT CASE + WHEN length( + ST_AsPNG( + ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0), 1, '8BUI', 123, NULL) + ) + ) > 0 + THEN 1 + ELSE 0 +END; +SELECT CASE + WHEN length( + ST_AsPNG( + ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0), 1, '8BSI', -123, NULL) + ) + ) > 0 + THEN 1 + ELSE 0 +END; +SELECT CASE + WHEN length( + ST_AsPNG( + ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0), 1, '8BUI', 254, NULL) + ) + ) > 0 + THEN 1 + ELSE 0 +END; +SELECT CASE + WHEN length( + ST_AsPNG( + ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0) + , 1, '8BSI', 1, -1 + ) + , 2, '8BSI', 11, -1 + ) + , 3, '8BSI', 111, -1 + ), + ARRAY['ZLEVEL=1'] + ) + ) > 0 + THEN 1 + ELSE 0 +END; +SELECT CASE + WHEN length( + ST_AsPNG( + ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0) + , 1, '8BSI', 1, -1 + ) + , 2, '8BSI', 11, -1 + ) + , 3, '8BSI', 111, -1 + ), + ARRAY['ZLEVEL=9'] + ) + ) > 0 + THEN 1 + ELSE 0 +END; +SELECT CASE + WHEN length( + ST_AsPNG( + ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0) + , 1, '8BSI', 1, 1 + ) + , 2, '8BSI', 11, 1 + ) + , 3, '8BSI', 111, 1 + ), + ARRAY['ZLEVEL=9'] + ) + ) > 0 + THEN 1 + ELSE 0 +END; +SELECT CASE + WHEN length( + ST_AsPNG( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0) + , 1, '8BUI', 1, 1 + ) + , 2, '8BUI', 11, 1 + ), + ARRAY[1], + 6 + ) + ) > 0 + THEN 1 + ELSE 0 +END; +SELECT CASE + WHEN length( + ST_AsPNG( + ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0) + , 1, '8BUI', 1, 1 + ) + , 2, '8BUI', 11, 1 + ) + , 3, '8BUI', 111, 1 + ), + ARRAY[3,1], + 6 + ) + ) > 0 + THEN 1 + ELSE 0 +END; diff -Nru postgis-1.5.3/raster/test/regress/rt_aspng_expected postgis-2.0.1/raster/test/regress/rt_aspng_expected --- postgis-1.5.3/raster/test/regress/rt_aspng_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_aspng_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,10 @@ +ERROR: The pixel type of band 1 in the raster is not 8BUI or 16BUI. The PNG format can only be used with 8BUI and 16BUI pixel types. +1 +ERROR: The pixel type of band 1 in the raster is not 8BUI or 16BUI. The PNG format can only be used with 8BUI and 16BUI pixel types. +1 +ERROR: The pixel type of band 1 in the raster is not 8BUI or 16BUI. The PNG format can only be used with 8BUI and 16BUI pixel types. +ERROR: The pixel type of band 1 in the raster is not 8BUI or 16BUI. The PNG format can only be used with 8BUI and 16BUI pixel types. +ERROR: The pixel type of band 1 in the raster is not 8BUI or 16BUI. The PNG format can only be used with 8BUI and 16BUI pixel types. +1 +NOTICE: The PNG format only permits one, three or four bands. The first band will be used. +1 diff -Nru postgis-1.5.3/raster/test/regress/rt_asraster.sql postgis-2.0.1/raster/test/regress/rt_asraster.sql --- postgis-1.5.3/raster/test/regress/rt_asraster.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_asraster.sql 2012-03-13 16:13:48.000000000 +0000 @@ -0,0 +1,506 @@ +DROP TABLE IF EXISTS raster_asraster_geom; +DROP TABLE IF EXISTS raster_asraster_rast; +DROP TABLE IF EXISTS raster_asraster_dst; + +CREATE TABLE raster_asraster_geom ( + geom geometry +); +CREATE TABLE raster_asraster_rast ( + rast raster +); +CREATE TABLE raster_asraster_dst ( + rid varchar, + rast raster +); + +CREATE OR REPLACE FUNCTION make_test_raster() + RETURNS void + AS $$ + DECLARE + width int := 10; + height int := 10; + x int; + y int; + rast raster; + BEGIN + rast := ST_MakeEmptyRaster(width, height, -500000, 600000, 1000, -1000, 0, 0, 992163); + rast := ST_AddBand(rast, 1, '64BF', 0, 0); + + FOR x IN 1..width LOOP + FOR y IN 1..height LOOP + rast := ST_SetValue(rast, 1, x, y, ((x::double precision * y) + (x + y) + (x + y * x)) / (x + y + 1)); + END LOOP; + END LOOP; + + INSERT INTO raster_asraster_rast VALUES (rast); + + RETURN; + END; + $$ LANGUAGE 'plpgsql'; +SELECT make_test_raster(); +DROP FUNCTION make_test_raster(); + +DELETE FROM "spatial_ref_sys" WHERE srid = 992163; +DELETE FROM "spatial_ref_sys" WHERE srid = 993309; +DELETE FROM "spatial_ref_sys" WHERE srid = 993310; +DELETE FROM "spatial_ref_sys" WHERE srid = 994269; + +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (992163,'EPSG',2163,'PROJCS["unnamed",GEOGCS["unnamed ellipse",DATUM["unknown",SPHEROID["unnamed",6370997,0]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["latitude_of_center",45],PARAMETER["longitude_of_center",-100],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Meter",1],AUTHORITY["EPSG","2163"]]','+proj=laea +lat_0=45 +lon_0=-100 +x_0=0 +y_0=0 +a=6370997 +b=6370997 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (993309,'EPSG',3309,'PROJCS["NAD27 / California Albers",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",34],PARAMETER["standard_parallel_2",40.5],PARAMETER["latitude_of_center",0],PARAMETER["longitude_of_center",-120],PARAMETER["false_easting",0],PARAMETER["false_northing",-4000000],AUTHORITY["EPSG","3309"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=aea +lat_1=34 +lat_2=40.5 +lat_0=0 +lon_0=-120 +x_0=0 +y_0=-4000000 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (993310,'EPSG',3310,'PROJCS["NAD83 / California Albers",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",34],PARAMETER["standard_parallel_2",40.5],PARAMETER["latitude_of_center",0],PARAMETER["longitude_of_center",-120],PARAMETER["false_easting",0],PARAMETER["false_northing",-4000000],AUTHORITY["EPSG","3310"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=aea +lat_1=34 +lat_2=40.5 +lat_0=0 +lon_0=-120 +x_0=0 +y_0=-4000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (994269,'EPSG',4269,'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"]]','+proj=longlat +ellps=GRS80 +datum=NAD83 +no_defs '); + +INSERT INTO raster_asraster_geom VALUES ( +ST_GeomFromText('MULTIPOLYGON(((-172210.499109288 114987.660953018,-175453.086381862 29201.5994536821,-151944.038528546 28257.4637483698,-151755.193144738 64618.6592845297,-129779.244489461 63766.2346307114,-132720.730482521 29365.7452160339,-110176.183408147 28076.2457866343,-113336.283431208 112064.985603184,-135659.619600536 112878.300914729,-134301.95687566 79576.8821948012,-153850.618867315 80395.4252778995,-151346.215838074 112678.410158427,-172210.499109288 114987.660953018)),((-86135.5150847774 77502.7616508612,-87105.1850870571 30678.0039829779,-69362.3449961895 29072.3373203999,-70858.5814585458 78310.0439012805,-86135.5150847774 77502.7616508612)),((-86888.5102830273 96546.8546876945,-86065.7795470885 84169.9977753228,-70801.2145468401 84976.5822106288,-72118.6159803197 97829.7405064492,-86888.5102830273 96546.8546876945)),((-50136.8809020698 111909.445130098,-48631.3614059008 44728.8885465469,-36172.0195739627 45621.806341459,-39695.018962698 109480.225649309,-50136.8809020698 111909.445130098)),((-47695.3501850868 40894.9976787795,-47761.6362577873 29399.0052930373,-34799.4262271112 30293.0638067261,-35717.8219710071 39877.2161100041,-47695.3501850868 40894.9976787795)))', 993310) +); + +-- scale or width & height, pixtype, value and nodata +INSERT INTO raster_asraster_dst (rid, rast) VALUES ( + 1.0, (SELECT ST_AsRaster( + NULL, + 100, 100 + )) +), ( + 1.1, (SELECT ST_AsRaster( + geom, + 100, 100 + ) FROM raster_asraster_geom) +), ( + 1.2, (SELECT ST_AsRaster( + geom, + 100., -100. + ) FROM raster_asraster_geom) +), ( + 1.3, (SELECT ST_AsRaster( + geom, + 500, 500 + ) FROM raster_asraster_geom) +), ( + 1.4, (SELECT ST_AsRaster( + geom, + 1000., -1000. + ) FROM raster_asraster_geom) +), ( + 1.5, (SELECT ST_AsRaster( + geom, + 1000., -1000., + '8BSI' + ) FROM raster_asraster_geom) +), ( + 1.6, (SELECT ST_AsRaster( + geom, + 1000., -1000., + '16BUI' + ) FROM raster_asraster_geom) +), ( + 1.7, (SELECT ST_AsRaster( + geom, + 100., -100., + '32BF' + ) FROM raster_asraster_geom) +), ( + 1.8, (SELECT ST_AsRaster( + geom, + 1000., -1000., + ARRAY['8BSI'] + ) FROM raster_asraster_geom) +), ( + 1.9, (SELECT ST_AsRaster( + geom, + 1000., -1000., + ARRAY['16BUI'] + ) FROM raster_asraster_geom) +), ( + 1.10, (SELECT ST_AsRaster( + geom, + 1000., -1000., + ARRAY['32BF'] + ) FROM raster_asraster_geom) +), ( + 1.11, (SELECT ST_AsRaster( + geom, + 100, 100, + ARRAY['8BSI'] + ) FROM raster_asraster_geom) +), ( + 1.12, (SELECT ST_AsRaster( + geom, + 100, 100, + '16BUI' + ) FROM raster_asraster_geom) +), ( + 1.13, (SELECT ST_AsRaster( + geom, + 100, 100, + ARRAY['32BF'], + ARRAY[255] + ) FROM raster_asraster_geom) +), ( + 1.14, (SELECT ST_AsRaster( + geom, + 100, 100, + ARRAY['32BF'], + ARRAY[255], + ARRAY[1] + ) FROM raster_asraster_geom) +), ( + 1.15, (SELECT ST_AsRaster( + geom, + 100, 100, + ARRAY['32BF'], + ARRAY[255], + NULL + ) FROM raster_asraster_geom) +), ( + 1.16, (SELECT ST_AsRaster( + geom, + 100, 100, + ARRAY['32BF'], + ARRAY[255], + ARRAY[NULL]::double precision[] + ) FROM raster_asraster_geom) +), ( + 1.17, (SELECT ST_AsRaster( + geom, + 1000., -1000., + ARRAY['32BF', '16BUI'], + ARRAY[255, 1], + ARRAY[NULL, 0]::double precision[] + ) FROM raster_asraster_geom) +), ( + 1.18, (SELECT ST_AsRaster( + geom, + 10, 10, + ARRAY['8BUI', '16BUI'], + ARRAY[255, 255], + ARRAY[0, NULL]::double precision[] + ) FROM raster_asraster_geom) +), ( + 1.19, (SELECT ST_AsRaster( + geom, + 1000., -1000., + ARRAY['32BF', '16BUI', '64BF'], + ARRAY[255, 1, -1], + ARRAY[NULL, 0, NULL]::double precision[] + ) FROM raster_asraster_geom) +), ( + 1.20, (SELECT ST_AsRaster( + geom, + 1000., -1000., + ARRAY['1BB', '2BUI'], + ARRAY[1, 1], + ARRAY[1, 0]::double precision[] + ) FROM raster_asraster_geom) +); + +-- upper left +INSERT INTO raster_asraster_dst (rid, rast) VALUES ( + 2.0, (SELECT ST_AsRaster( + NULL, + 1000., -1000., + '8BUI', + 255, + 0, + -175453 + )) +), ( + 2.1, (SELECT ST_AsRaster( + geom, + 1000., -1000., + '8BUI', + 255, + 0, + -175453 + ) FROM raster_asraster_geom) +), ( + 2.2, (SELECT ST_AsRaster( + geom, + 1000., -1000., + '8BUI', + 255, + 0, + -175400, 115000 + ) FROM raster_asraster_geom) +), ( + 2.3, (SELECT ST_AsRaster( + geom, + 1000., -1000., + '8BUI', + 255, + 0, + -170000, 114988 + ) FROM raster_asraster_geom) +), ( + 2.4, (SELECT ST_AsRaster( + geom, + 1000., -1000., + '8BUI', + 255, + 0, + -170000, 110000 + ) FROM raster_asraster_geom) +), ( + 2.5, (SELECT ST_AsRaster( + geom, + 1000., -1000., + '8BUI', + 255, + 0, + -179000, 119000 + ) FROM raster_asraster_geom) +), ( + 2.6, (SELECT ST_AsRaster( + geom, + 100, 100, + '8BUI', + 255, + 0, + -179000, 119000 + ) FROM raster_asraster_geom) +), ( + 2.7, (SELECT ST_AsRaster( + geom, + 100, 100, + ARRAY['8BUI'], + ARRAY[255], + ARRAY[0], + -179000, 119000 + ) FROM raster_asraster_geom) +); + +-- skew +INSERT INTO raster_asraster_dst (rid, rast) VALUES ( + 3.0, (SELECT ST_AsRaster( + NULL, + 100, 100, + '8BUI', + 255, + 0, + NULL, NULL, + 0 + )) +), ( + 3.1, (SELECT ST_AsRaster( + geom, + 100, 100, + '8BUI', + 255, + 0, + NULL, NULL, + 0 + ) FROM raster_asraster_geom) +), ( + 3.2, (SELECT ST_AsRaster( + geom, + 100, 100, + '8BUI', + 255, + 0, + NULL, NULL, + 0, 0 + ) FROM raster_asraster_geom) +), ( + 3.3, (SELECT ST_AsRaster( + geom, + 100, 100, + '8BUI', + 255, + 0, + NULL, NULL, + 1, 0 + ) FROM raster_asraster_geom) +), ( + 3.4, (SELECT ST_AsRaster( + geom, + 100, 100, + '8BUI', + 255, + 0, + NULL, NULL, + 0, 1 + ) FROM raster_asraster_geom) +), ( + 3.5, (SELECT ST_AsRaster( + geom, + 100, 100, + '8BUI', + 255, + 0, + NULL, NULL, + 10, -5 + ) FROM raster_asraster_geom) +), ( + 3.6, (SELECT ST_AsRaster( + geom, + 100, 100, + '8BUI', + 255, + 0, + NULL, NULL, + -5, 10 + ) FROM raster_asraster_geom) +); + +-- snap to grid +INSERT INTO raster_asraster_dst (rid, rast) VALUES ( + 4.0, ( + SELECT ST_AsRaster( + NULL, + rast + ) + FROM raster_asraster_rast + ) +), ( + 4.1, ( + SELECT ST_AsRaster( + geom, + rast + ) + FROM raster_asraster_geom, raster_asraster_rast + ) +), ( + 4.2, ( + SELECT ST_AsRaster( + geom, + rast, + '64BF' + ) + FROM raster_asraster_geom, raster_asraster_rast + ) +), ( + 4.3, ( + SELECT ST_AsRaster( + geom, + rast, + '16BUI', + 13 + ) + FROM raster_asraster_geom, raster_asraster_rast + ) +), ( + 4.4, ( + SELECT ST_AsRaster( + geom, + rast, + '16BUI', + 13, + NULL + ) + FROM raster_asraster_geom, raster_asraster_rast + ) +), ( + 4.5, ( + SELECT ST_AsRaster( + geom, + rast, + ARRAY['16BUI'], + ARRAY[13] + ) + FROM raster_asraster_geom, raster_asraster_rast + ) +), ( + 4.6, ( + SELECT ST_AsRaster( + geom, + rast, + ARRAY['16BUI'], + ARRAY[13], + ARRAY[NULL]::double precision[] + ) + FROM raster_asraster_geom, raster_asraster_rast + ) +), ( + 4.7, ( + SELECT ST_AsRaster( + geom, + rast, + ARRAY['16BUI'], + ARRAY[13], + ARRAY[0] + ) + FROM raster_asraster_geom, raster_asraster_rast + ) +), ( + 4.8, (SELECT ST_AsRaster( + geom, + 1000., -1000., + 0, 0, + ARRAY['16BUI'], + ARRAY[13], + ARRAY[0] + ) + FROM raster_asraster_geom) +), ( + 4.9, (SELECT ST_AsRaster( + geom, + 1000., -1000., + -175453, 114987, + ARRAY['16BUI'], + ARRAY[13], + ARRAY[0] + ) + FROM raster_asraster_geom) +), ( + 4.10, (SELECT ST_AsRaster( + geom, + 1000., -1000., + -100, 100, + ARRAY['16BUI'], + ARRAY[13], + ARRAY[0] + ) + FROM raster_asraster_geom) +), ( + 4.11, (SELECT ST_AsRaster( + geom, + 1000., -1000., + -100, 100, + '16BUI', + 13, + 0 + ) + FROM raster_asraster_geom) +); + +SELECT + rid, + srid, + width, + height, + numbands, + round(scalex::numeric, 3) AS scalex, + round(scaley::numeric, 3) AS scaley, + round(skewx::numeric, 3) AS skewx, + round(skewy::numeric, 3) AS skewy, + round(upperleftx::numeric, 3) AS upperleftx, + round(upperlefty::numeric, 3) AS upperlefty, + pixeltype, + round(nodatavalue::numeric, 3) AS nodatavalue, + count > 0 AS count_check, + round(min::numeric, 3) AS min, + round(max::numeric, 3) AS max, + same_alignment +FROM ( + SELECT + d.rid, + (ST_MetaData(d.rast)).*, + (ST_SummaryStats(d.rast)).*, + (ST_BandMetaData(d.rast)).*, + CASE + WHEN d.rid LIKE '4.%' + THEN ST_SameAlignment(ST_Transform(d.rast, 992163), r.rast) + ELSE NULL + END AS same_alignment + FROM raster_asraster_dst d + CROSS JOIN raster_asraster_rast r + ORDER BY d.rid +) foo; + +DELETE FROM "spatial_ref_sys" WHERE srid = 992163; +DELETE FROM "spatial_ref_sys" WHERE srid = 993309; +DELETE FROM "spatial_ref_sys" WHERE srid = 993310; +DELETE FROM "spatial_ref_sys" WHERE srid = 994269; + +DROP TABLE raster_asraster_geom; +DROP TABLE raster_asraster_rast; +DROP TABLE raster_asraster_dst; diff -Nru postgis-1.5.3/raster/test/regress/rt_asraster_expected postgis-2.0.1/raster/test/regress/rt_asraster_expected --- postgis-1.5.3/raster/test/regress/rt_asraster_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_asraster_expected 2012-06-18 20:32:40.000000000 +0000 @@ -0,0 +1,64 @@ +NOTICE: table "raster_asraster_geom" does not exist, skipping +NOTICE: table "raster_asraster_rast" does not exist, skipping +NOTICE: table "raster_asraster_dst" does not exist, skipping +NOTICE: Imbalanced number of values provided for pixeltype (1), value (1) and nodataval (0). Using the first 0 values of each parameter +NOTICE: Values must be provided for both X and Y when specifying the upper-left corner +NOTICE: The geometry's SRID (993310) is not the same as the raster's SRID (992163). The geometry will be transformed to the raster's projection +NOTICE: The geometry's SRID (993310) is not the same as the raster's SRID (992163). The geometry will be transformed to the raster's projection +NOTICE: The geometry's SRID (993310) is not the same as the raster's SRID (992163). The geometry will be transformed to the raster's projection +NOTICE: The geometry's SRID (993310) is not the same as the raster's SRID (992163). The geometry will be transformed to the raster's projection +NOTICE: The geometry's SRID (993310) is not the same as the raster's SRID (992163). The geometry will be transformed to the raster's projection +NOTICE: The geometry's SRID (993310) is not the same as the raster's SRID (992163). The geometry will be transformed to the raster's projection +NOTICE: The geometry's SRID (993310) is not the same as the raster's SRID (992163). The geometry will be transformed to the raster's projection +NOTICE: The two rasters provided have different scales on the X axis +NOTICE: The two rasters provided have different scales on the X axis +NOTICE: The two rasters provided have different scales on the X axis +NOTICE: The two rasters provided have different scales on the X axis +1.0|||||||||||||||| +1.1|993310|100|100|1|1406.537|-869.114|0.000|0.000|-175453.086|114987.661|8BUI|0.000|t|1.000|1.000| +1.10|993310|141|87|1|1000.000|-1000.000|0.000|0.000|-175453.086|114987.661|32BF|0.000|t|1.000|1.000| +1.11|993310|100|100|1|1406.537|-869.114|0.000|0.000|-175453.086|114987.661|16BSI|0.000|t|1.000|1.000| +1.12|993310|100|100|1|1406.537|-869.114|0.000|0.000|-175453.086|114987.661|16BUI|0.000|t|1.000|1.000| +1.13|993310|100|100|1|1406.537|-869.114|0.000|0.000|-175453.086|114987.661|32BF|0.000|t|255.000|255.000| +1.14|993310|100|100|1|1406.537|-869.114|0.000|0.000|-175453.086|114987.661|32BF|1.000|t|255.000|255.000| +1.15|993310|100|100|1|1406.537|-869.114|0.000|0.000|-175453.086|114987.661|8BUI|0.000|t|1.000|1.000| +1.16|993310|100|100|1|1406.537|-869.114|0.000|0.000|-175453.086|114987.661|32BF||t|0.000|255.000| +1.17|993310|141|87|2|1000.000|-1000.000|0.000|0.000|-175453.086|114987.661|32BF||t|0.000|255.000| +1.18|993310|10|10|2|14065.366|-8691.142|0.000|0.000|-175453.086|114987.661|8BUI|0.000|t|255.000|255.000| +1.19|993310|141|87|3|1000.000|-1000.000|0.000|0.000|-175453.086|114987.661|32BF||t|0.000|255.000| +1.2|993310|1407|869|1|100.000|-100.000|0.000|0.000|-175453.086|114987.661|8BUI|0.000|t|1.000|1.000| +1.20|993310|141|87|2|1000.000|-1000.000|0.000|0.000|-175453.086|114987.661|8BUI|1.000|f||| +1.3|993310|500|500|1|281.307|-173.823|0.000|0.000|-175453.086|114987.661|8BUI|0.000|t|1.000|1.000| +1.4|993310|141|87|1|1000.000|-1000.000|0.000|0.000|-175453.086|114987.661|8BUI|0.000|t|1.000|1.000| +1.5|993310|141|87|1|1000.000|-1000.000|0.000|0.000|-175453.086|114987.661|16BSI|0.000|t|1.000|1.000| +1.6|993310|141|87|1|1000.000|-1000.000|0.000|0.000|-175453.086|114987.661|16BUI|0.000|t|1.000|1.000| +1.7|993310|1407|869|1|100.000|-100.000|0.000|0.000|-175453.086|114987.661|32BF|0.000|t|1.000|1.000| +1.8|993310|141|87|1|1000.000|-1000.000|0.000|0.000|-175453.086|114987.661|16BSI|0.000|t|1.000|1.000| +1.9|993310|141|87|1|1000.000|-1000.000|0.000|0.000|-175453.086|114987.661|16BUI|0.000|t|1.000|1.000| +2.0|||||||||||||||| +2.1|||||||||||||||| +2.2|993310|141|87|1|1000.000|-1000.000|0.000|0.000|-175400.000|115000.000|8BUI|0.000|t|255.000|255.000| +2.3|993310|141|87|1|1000.000|-1000.000|0.000|0.000|-170000.000|114988.000|8BUI|0.000|t|255.000|255.000| +2.4|993310|141|87|1|1000.000|-1000.000|0.000|0.000|-170000.000|110000.000|8BUI|0.000|t|255.000|255.000| +2.5|993310|141|87|1|1000.000|-1000.000|0.000|0.000|-179000.000|119000.000|8BUI|0.000|t|255.000|255.000| +2.6|993310|100|100|1|1406.537|-869.114|0.000|0.000|-179000.000|119000.000|8BUI|0.000|t|255.000|255.000| +2.7|993310|100|100|1|1406.537|-869.114|0.000|0.000|-179000.000|119000.000|8BUI|0.000|t|255.000|255.000| +3.0|||||||||||||||| +3.1|993310|100|100|1|1406.537|-869.114|0.000|0.000|-175453.086|114987.661|8BUI|0.000|t|255.000|255.000| +3.2|993310|100|100|1|1406.537|-869.114|0.000|0.000|-175453.086|114987.661|8BUI|0.000|t|255.000|255.000| +3.3|993310|100|100|1|1406.537|-869.114|1.000|0.000|-175565.609|114987.661|8BUI|0.000|t|255.000|255.000| +3.4|993310|100|100|1|1406.537|-869.114|0.000|1.000|-175453.086|114987.661|8BUI|0.000|t|255.000|255.000| +3.5|993310|101|101|1|1406.537|-869.114|10.000|-5.000|-176465.793|115491.747|8BUI|0.000|t|255.000|255.000| +3.6|993310|100|101|1|1406.537|-869.114|-5.000|10.000|-175453.086|114987.661|8BUI|0.000|t|255.000|255.000| +4.0|||||||||||||||| +4.1|992163|150|117|1|1000.000|-1000.000|0.000|0.000|-1898000.000|-412000.000|8BUI|0.000|t|1.000|1.000|t +4.10|993310|142|88|1|1000.000|-1000.000|0.000|0.000|-176100.000|115100.000|16BUI|0.000|t|13.000|13.000|f +4.11|993310|142|88|1|1000.000|-1000.000|0.000|0.000|-176100.000|115100.000|16BUI|0.000|t|13.000|13.000|f +4.2|992163|150|117|1|1000.000|-1000.000|0.000|0.000|-1898000.000|-412000.000|64BF|0.000|t|1.000|1.000|t +4.3|992163|150|117|1|1000.000|-1000.000|0.000|0.000|-1898000.000|-412000.000|16BUI|0.000|t|13.000|13.000|t +4.4|992163|150|117|1|1000.000|-1000.000|0.000|0.000|-1898000.000|-412000.000|16BUI||t|0.000|13.000|t +4.5|992163|150|117|1|1000.000|-1000.000|0.000|0.000|-1898000.000|-412000.000|16BUI|0.000|t|13.000|13.000|t +4.6|992163|150|117|1|1000.000|-1000.000|0.000|0.000|-1898000.000|-412000.000|16BUI||t|0.000|13.000|t +4.7|992163|150|117|1|1000.000|-1000.000|0.000|0.000|-1898000.000|-412000.000|16BUI|0.000|t|13.000|13.000|t +4.8|993310|142|88|1|1000.000|-1000.000|0.000|0.000|-176000.000|115000.000|16BUI|0.000|t|13.000|13.000|f +4.9|993310|142|88|1|1000.000|-1000.000|0.000|0.000|-176453.000|115987.000|16BUI|0.000|t|13.000|13.000|f diff -Nru postgis-1.5.3/raster/test/regress/rt_astiff.sql postgis-2.0.1/raster/test/regress/rt_astiff.sql --- postgis-1.5.3/raster/test/regress/rt_astiff.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_astiff.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,119 @@ +SELECT CASE + WHEN length( + ST_AsTIFF( + ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0), 1, '64BF', 123.4567, NULL) + ) + ) > 0 + THEN 1 + ELSE 0 +END; +SELECT CASE + WHEN length( + ST_AsTIFF( + ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0) + , 1, '64BF', 1234.5678, NULL + ) + , '64BF', 987.654321, NULL + ) + , '64BF', 9876.54321, NULL + ) + ) + ) > 0 + THEN 1 + ELSE 0 +END; +SELECT CASE + WHEN length( + ST_AsTIFF( + ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0) + , 1, '64BF', 1234.5678, -9999 + ) + , '64BF', 987.654321, -9999 + ) + , '64BF', 9876.54321, -9999 + ) + ) + ) > 0 + THEN 1 + ELSE 0 +END; +SELECT CASE + WHEN length( + ST_AsTIFF( + ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0) + , 1, '64BF', 1234.5678, -9999 + ) + , '64BF', 987.654321, -9999 + ) + , '64BF', 9876.54321, -9999 + ) + , ARRAY[3] + ) + ) > 0 + THEN 1 + ELSE 0 +END; +SELECT CASE + WHEN length( + ST_AsTIFF( + ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0) + , 1, '64BF', 1234.5678, -9999 + ) + , '64BF', 987.654321, -9999 + ) + , '64BF', 9876.54321, -1 + ) + ) + ) > 0 + THEN 1 + ELSE 0 +END; +SELECT CASE + WHEN length( + ST_AsTIFF( + ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0) + , 1, '64BF', 1234.5678, -1 + ) + , '64BF', 987.654321, -9999 + ) + , '64BF', 9876.54321, -9999 + ) + ) + ) > 0 + THEN 1 + ELSE 0 +END; +SELECT CASE + WHEN length( + ST_AsTIFF( + ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0) + , 1, '64BF', 1234.5678, -9999 + ) + , '64BF', 987.654321, -9999 + ) + , '64BF', 9876.54321, -1 + ) + , 'JPEG90' + ) + ) > 0 + THEN 1 + ELSE 0 +END; diff -Nru postgis-1.5.3/raster/test/regress/rt_astiff_expected postgis-2.0.1/raster/test/regress/rt_astiff_expected --- postgis-1.5.3/raster/test/regress/rt_astiff_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_astiff_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,10 @@ +1 +1 +1 +1 +NOTICE: The TIFF format only permits one NODATA value for all bands. The value used will be the last band with a NODATA value. +1 +NOTICE: The TIFF format only permits one NODATA value for all bands. The value used will be the last band with a NODATA value. +NOTICE: The TIFF format only permits one NODATA value for all bands. The value used will be the last band with a NODATA value. +1 +ERROR: The pixel type of band 1 in the raster is not 8BUI. JPEG compression can only be used with the 8BUI pixel type. diff -Nru postgis-1.5.3/raster/test/regress/rt_band.sql postgis-2.0.1/raster/test/regress/rt_band.sql --- postgis-1.5.3/raster/test/regress/rt_band.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_band.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,328 @@ +SELECT ST_Value(ST_Band(ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0, 0), 1, '64BF', 123.4567, NULL), ARRAY[1]), 3, 3); +SELECT ST_Value(ST_Band(ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0, 0), 1, '64BF', 1234.567, NULL), 1), 3, 3); +SELECT ST_Value(ST_Band(ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0, 0), 1, '64BF', 1234.567, NULL)), 3, 3); +SELECT ST_Value( + ST_Band( + ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 1234.5678, NULL + ) + , '64BF', 987.654321, NULL + ) + , '64BF', 9876.54321, NULL + ), + ARRAY[1] + ), +3, 3); +SELECT ST_Value( + ST_Band( + ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 1234.5678, NULL + ) + , '64BF', 987.654321, NULL + ) + , '64BF', 9876.54321, NULL + ), + ARRAY[2] + ), +3, 3); +SELECT ST_Value( + ST_Band( + ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 1234.5678, NULL + ) + , '64BF', 987.654321, NULL + ) + , '64BF', 9876.54321, NULL + ), + ARRAY[3] + ), +3, 3); +SELECT ST_Value( + ST_Band( + ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 1234.5678, NULL + ) + , '64BF', 987.654321, NULL + ) + , '64BF', 9876.54321, NULL + ), + 1 + ), +3, 3); +SELECT ST_Value( + ST_Band( + ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 1234.5678, NULL + ) + , '64BF', 987.654321, NULL + ) + , '64BF', 9876.54321, NULL + ), + 2 + ), +3, 3); +SELECT ST_Value( + ST_Band( + ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 1234.5678, NULL + ) + , '64BF', 987.654321, NULL + ) + , '64BF', 9876.54321, NULL + ), + 3 + ), +3, 3); +SELECT ST_Value( + ST_Band( + ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 1234.5678, NULL + ) + , '64BF', 987.654321, NULL + ) + , '64BF', 9876.54321, NULL + ) + ), +3, 3); +SELECT ST_Value( + ST_Band( + ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 1234.5678, NULL + ) + , '64BF', 987.654321, NULL + ) + , '64BF', 9876.54321, NULL + ), + ARRAY[1,3] + ), +1, 3, 3); +SELECT ST_Value( + ST_Band( + ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 1234.5678, NULL + ) + , '64BF', 987.654321, NULL + ) + , '64BF', 9876.54321, NULL + ), + ARRAY[1,3] + ), +2, 3, 3); +SELECT ST_Value( + ST_Band( + ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 1234.5678, NULL + ) + , '64BF', 987.654321, NULL + ) + , '64BF', 9876.54321, NULL + ), + ARRAY[2,3] + ), +1, 3, 3); +SELECT ST_Value( + ST_Band( + ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 1234.5678, NULL + ) + , '64BF', 987.654321, NULL + ) + , '64BF', 9876.54321, NULL + ), + ARRAY[1,1] + ), +2, 3, 3); +SELECT ST_Value( + ST_Band( + ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 1234.5678, NULL + ) + , '64BF', 987.654321, NULL + ) + , '64BF', 9876.54321, NULL + ), + '1,1' + ), +2, 3, 3); +SELECT ST_Value( + ST_Band( + ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 1234.5678, NULL + ) + , '64BF', 987.654321, NULL + ) + , '64BF', 9876.54321, NULL + ), + '1;1', ';' + ), +2, 3, 3); +SELECT ST_Value( + ST_Band( + ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 1234.5678, NULL + ) + , '64BF', 987.654321, NULL + ) + , '64BF', 9876.54321, NULL + ) + ), +1, 3, 3); +SELECT ST_NumBands( + ST_Band( + ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 1234.5678, NULL + ) + , '64BF', 987.654321, NULL + ) + , '64BF', 9876.54321, NULL + ), + ARRAY[1,1,3,3] + ) +); +SELECT ST_NumBands( + ST_Band( + ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 1234.5678, NULL + ) + , '64BF', 987.654321, NULL + ) + , '64BF', 9876.54321, NULL + ), + ARRAY[1,1,3] + ) +); +SELECT ST_NumBands( + ST_Band( + ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 1234.5678, NULL + ) + , '64BF', 987.654321, NULL + ) + , '64BF', 9876.54321, NULL + ), + ARRAY[1,2] + ) +); +SELECT ST_NumBands( + ST_Band( + ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 1234.5678, NULL + ) + , '64BF', 987.654321, NULL + ) + , '64BF', 9876.54321, NULL + ), + ARRAY[3] + ) +); +SELECT ST_NumBands( + ST_Band( + ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 1234.5678, NULL + ) + , '64BF', 987.654321, NULL + ) + , '64BF', 9876.54321, NULL + ), + 2 + ) +); +SELECT ST_NumBands( + ST_Band( + ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 1234.5678, NULL + ) + , '64BF', 987.654321, NULL + ) + , '64BF', 9876.54321, NULL + ) + ) +); +SELECT ST_NumBands( + ST_Band( + ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 1234.5678, NULL + ) + , '64BF', 987.654321, NULL + ) + , '64BF', 9876.54321, NULL + ) + , ARRAY[1,1,3,999]) +); +SELECT ST_NumBands( + ST_Band( + ST_AddBand( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 1234.5678, NULL + ) + , '64BF', 987.654321, NULL + ) + , '64BF', 9876.54321, NULL + ) + , ARRAY[999]) +); diff -Nru postgis-1.5.3/raster/test/regress/rt_band_expected postgis-2.0.1/raster/test/regress/rt_band_expected --- postgis-1.5.3/raster/test/regress/rt_band_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_band_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,27 @@ +123.4567 +1234.567 +1234.567 +1234.5678 +987.654321 +9876.54321 +1234.5678 +987.654321 +9876.54321 +1234.5678 +1234.5678 +9876.54321 +987.654321 +1234.5678 +1234.5678 +1234.5678 +1234.5678 +4 +3 +2 +1 +1 +1 +NOTICE: Invalid band index (must use 1-based). Returning original raster +3 +NOTICE: Invalid band index (must use 1-based). Returning original raster +3 diff -Nru postgis-1.5.3/raster/test/regress/rt_band_properties.sql postgis-2.0.1/raster/test/regress/rt_band_properties.sql --- postgis-1.5.3/raster/test/regress/rt_band_properties.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_band_properties.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,71 @@ +----------------------------------------------------------------------- +-- $Id$ +-- +-- Copyright (c) 2010 David Zwarg , Pierre Racine +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +----------------------------------------------------------------------- + +----------------------------------------------------------------------- +--- Test of "Set" functions for properties of a raster band. +----------------------------------------------------------------------- + + +----------------------------------------------------------------------- +--- ST_BandPixelType +----------------------------------------------------------------------- + +SELECT + b1pixeltype AS b1expected, b2pixeltype AS b2expected, + st_bandpixeltype(rast, 1) AS b1obtained, st_bandpixeltype(rast, 2) AS b2obtained + FROM rt_band_properties_test +WHERE b1pixeltype != st_bandpixeltype(rast, 1) or b2pixeltype != st_bandpixeltype(rast, 2); + +----------------------------------------------------------------------- +--- ST_BandNoDataValue +----------------------------------------------------------------------- + +SELECT + b1nodatavalue AS b1expected, b2nodatavalue AS b2expected, + st_bandnodatavalue(rast, 1) AS b1obtained, b2nodatavalue != st_bandnodatavalue(rast, 2) + FROM rt_band_properties_test +WHERE b1nodatavalue != st_bandnodatavalue(rast, 1) or b2nodatavalue != st_bandnodatavalue(rast, 2); + + +----------------------------------------------------------------------- +--- ST_BandIsNoData +----------------------------------------------------------------------- +SELECT + st_bandisnodata(rast, 1) + FROM rt_band_properties_test +WHERE id = 3; + +SELECT + st_bandisnodata(rast, 2) + FROM rt_band_properties_test +WHERE id = 3; + + +----------------------------------------------------------------------- +--- ST_SetBandIsNoData +----------------------------------------------------------------------- +SELECT + st_bandisnodata(rast, 1) + FROM rt_band_properties_test +WHERE id = 4; + +SELECT + st_bandisnodata(rast, 1, TRUE) + FROM rt_band_properties_test +WHERE id = 4; + +UPDATE rt_band_properties_test + SET rast = st_setbandisnodata(rast, 1) + WHERE id = 4; + +SELECT + st_bandisnodata(rast, 1) + FROM rt_band_properties_test +WHERE id = 4; + diff -Nru postgis-1.5.3/raster/test/regress/rt_band_properties_expected postgis-2.0.1/raster/test/regress/rt_band_properties_expected --- postgis-1.5.3/raster/test/regress/rt_band_properties_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_band_properties_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,5 @@ +t +f +f +t +t diff -Nru postgis-1.5.3/raster/test/regress/rt_bandmetadata.sql postgis-2.0.1/raster/test/regress/rt_bandmetadata.sql --- postgis-1.5.3/raster/test/regress/rt_bandmetadata.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_bandmetadata.sql 2012-03-13 16:13:48.000000000 +0000 @@ -0,0 +1,125 @@ +CREATE OR REPLACE FUNCTION make_test_raster( + width integer DEFAULT 10, + height integer DEFAULT 10, + ul_x double precision DEFAULT 0, + ul_y double precision DEFAULT 0, + skew_x double precision DEFAULT 0, + skew_y double precision DEFAULT 0, + numbands integer DEFAULT 1, + autofill boolean DEFAULT FALSE +) + RETURNS raster + AS $$ + DECLARE + i int; + x int; + y int; + rast raster; + BEGIN + rast := ST_MakeEmptyRaster(width, height, ul_x, ul_y, 1, 1, skew_x, skew_y, 0); + FOR i IN 1..numbands LOOP + rast := ST_AddBand(rast, i, '8BUI', 0, i); + + IF autofill IS TRUE THEN + FOR x IN 1..width LOOP + FOR y IN 1..height LOOP + rast := ST_SetValue(rast, i, x, y, ((x - 1) * width) + y); + END LOOP; + END LOOP; + END IF; + END LOOP; + + RETURN rast; + END; + $$ LANGUAGE 'plpgsql'; + +SELECT + pixeltype, + round(nodatavalue::numeric, 3), + isoutdb, + path +FROM ST_BandMetaData( + ST_SetBandNoDataValue(make_test_raster(10, 10, 0, 0, 0, 0), NULL) +); + +SELECT + pixeltype, + round(nodatavalue::numeric, 3), + isoutdb, + path +FROM ST_BandMetaData( + make_test_raster(10, 10, 0, 0, 0, 0) +); + +SELECT + pixeltype, + round(nodatavalue::numeric, 3), + isoutdb, + path +FROM ST_BandMetaData( + make_test_raster(10, 10, 0, 0, 0, 0, 2), + 2 +); + +SELECT + pixeltype, + round(nodatavalue::numeric, 3), + isoutdb, + path +FROM ST_BandMetaData( + make_test_raster(10, 10, 0, 0, 0, 0, 3, TRUE), + 3 +); + +SELECT + pixeltype, + round(nodatavalue::numeric, 3), + isoutdb, + path +FROM ST_BandMetaData( + make_test_raster(10, 10, 0, 0, 0, 0, 5, TRUE), + 4 +); + +SELECT + pixeltype, + round(nodatavalue::numeric, 3), + isoutdb, + path +FROM ST_BandMetaData( + make_test_raster(10, 10, 0, 0, 0, 0, 5, TRUE), + 6 +); + +SELECT + bandnum + pixeltype, + round(nodatavalue::numeric, 3), + isoutdb, + path +FROM ST_BandMetaData( + make_test_raster(10, 10, 0, 0, 0, 0, 5, TRUE), + ARRAY[1,2,5] +); + +SELECT + bandnum + pixeltype, + round(nodatavalue::numeric, 3), + isoutdb, + path +FROM ST_BandMetaData( + make_test_raster(10, 10, 0, 0, 0, 0, 5, TRUE), + ARRAY[]::int[] +); + +DROP FUNCTION IF EXISTS make_test_raster( + integer, + integer, + double precision, + double precision, + double precision, + double precision, + integer, + boolean +); diff -Nru postgis-1.5.3/raster/test/regress/rt_bandmetadata_expected postgis-2.0.1/raster/test/regress/rt_bandmetadata_expected --- postgis-1.5.3/raster/test/regress/rt_bandmetadata_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_bandmetadata_expected 2012-03-13 16:13:48.000000000 +0000 @@ -0,0 +1,15 @@ +8BUI||f| +8BUI|1.000|f| +8BUI|2.000|f| +8BUI|3.000|f| +8BUI|4.000|f| +NOTICE: Invalid band index: 6. Indices must be 1-based. Returning NULL +||| +1|1.000|f| +2|2.000|f| +5|5.000|f| +1|1.000|f| +2|2.000|f| +3|3.000|f| +4|4.000|f| +5|5.000|f| diff -Nru postgis-1.5.3/raster/test/regress/rt_below.sql postgis-2.0.1/raster/test/regress/rt_below.sql --- postgis-1.5.3/raster/test/regress/rt_below.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_below.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,38 @@ +----------------------------------------------------------------------- +-- $Id$ +-- +-- Copyright (c) 2009 Sandro Santilli +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +----------------------------------------------------------------------- + +------------------------------------------------------------------- +-- raster_below +----------------------------------------------------------------------- + +SELECT 'raster_below(X, query(1,1))' as op, + count(a.y), + min(a.x) as xmin, + max(a.x) as xmax, + min(a.y) as ymin, + max(a.y) as ymax, + st_extent(a.tile::geometry) +FROM rt_gist_grid_test a, rt_gist_query_test b +WHERE b.x = 1 and b.y = 1 + AND raster_below(a.tile, b.tile); + +----------------------------------------------------------------------- +-- Test <<| operator (below) +----------------------------------------------------------------------- + +SELECT 'X <<| query(1,1)' as op, + count(a.y), + min(a.x) as xmin, + max(a.x) as xmax, + min(a.y) as ymin, + max(a.y) as ymax, + st_extent(a.tile::geometry) +FROM rt_gist_grid_test a, rt_gist_query_test b +WHERE b.x = 1 and b.y = 1 + AND a.tile <<| b.tile; diff -Nru postgis-1.5.3/raster/test/regress/rt_below_expected postgis-2.0.1/raster/test/regress/rt_below_expected --- postgis-1.5.3/raster/test/regress/rt_below_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_below_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +raster_below(X, query(1,1))|30|0|9|0|2|BOX(-100 -100,100 -40) +X <<| query(1,1)|30|0|9|0|2|BOX(-100 -100,100 -40) diff -Nru postgis-1.5.3/raster/test/regress/rt_bytea.sql postgis-2.0.1/raster/test/regress/rt_bytea.sql --- postgis-1.5.3/raster/test/regress/rt_bytea.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_bytea.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,169 @@ +----------------------------------------------------------------------- +-- $Id$ +-- +-- Copyright (c) 2009 Mateusz Loskot +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +----------------------------------------------------------------------- + +CREATE TABLE rt_bytea_test ( + id numeric, + name text, + rast raster + ); + +INSERT INTO rt_bytea_test +VALUES ( 0, '10x20, ip:0.5,0.5 scale:2,3 skew:0,0 srid:10 width:10 height:20', +( +'01' -- little endian (uint8 ndr) +|| +'0000' -- version (uint16 0) +|| +'0000' -- nBands (uint16 0) +|| +'0000000000000040' -- scaleX (float64 2) +|| +'0000000000000840' -- scaleY (float64 3) +|| +'000000000000E03F' -- ipX (float64 0.5) +|| +'000000000000E03F' -- ipY (float64 0.5) +|| +'0000000000000000' -- skewX (float64 0) +|| +'0000000000000000' -- skewY (float64 0) +|| +'0A000000' -- SRID (int32 10) +|| +'0A00' -- width (uint16 10) +|| +'1400' -- height (uint16 20) +)::raster +); + +INSERT INTO rt_bytea_test +VALUES ( 1, '1x1, ip:2.5,2.5 scale:5,5 skew:0,0, srid:1, width:1, height:1', +( +'01' -- little endian (uint8 ndr) +|| +'0000' -- version (uint16 0) +|| +'0000' -- nBands (uint16 0) +|| +'0000000000001440' -- scaleX (float64 5) +|| +'0000000000001440' -- scaleY (float64 5) +|| +'0000000000000440' -- ipX (float64 2.5) +|| +'0000000000000440' -- ipY (float64 2.5) +|| +'0000000000000000' -- skewX (float64 0) +|| +'0000000000000000' -- skewY (float64 0) +|| +'0C000000' -- SRID (int32 12) +|| +'0100' -- width (uint16 1) +|| +'0100' -- height (uint16 1) +)::raster +); + +INSERT INTO rt_bytea_test +VALUES ( 2, '1x1, ip:7.5,2.5 scale:5,5 skew:0,0, srid:0, width:1, height:1', +( +'01' -- little endian (uint8 ndr) +|| +'0000' -- version (uint16 0) +|| +'0000' -- nBands (uint16 0) +|| +'0000000000001440' -- scaleX (float64 5) +|| +'0000000000001440' -- scaleY (float64 5) +|| +'0000000000001E40' -- ipX (float64 2.5) +|| +'0000000000000440' -- ipY (float64 2.5) +|| +'0000000000000000' -- skewX (float64 0) +|| +'0000000000000000' -- skewY (float64 0) +|| +'00000000' -- SRID (int32 0) +|| +'0100' -- width (uint16 1) +|| +'0100' -- height (uint16 1) +)::raster +); + +INSERT INTO rt_bytea_test +VALUES ( 3, '1x1, ip:7.5,2.5 scale:5,5 skew:0,0, srid:-1, width:1, height:1', +( +'01' -- little endian (uint8 ndr) +|| +'0000' -- version (uint16 0) +|| +'0000' -- nBands (uint16 0) +|| +'0000000000001440' -- scaleX (float64 5) +|| +'0000000000001440' -- scaleY (float64 5) +|| +'0000000000001E40' -- ipX (float64 2.5) +|| +'0000000000000440' -- ipY (float64 2.5) +|| +'0000000000000000' -- skewX (float64 0) +|| +'0000000000000000' -- skewY (float64 0) +|| +'FFFFFFFF' -- SRID (int32 -1) +|| +'0100' -- width (uint16 1) +|| +'0100' -- height (uint16 1) +)::raster +); + +----------------------------------------------------------------------- +--- Test HEX +----------------------------------------------------------------------- + +SELECT + id, + name +FROM rt_bytea_test +WHERE + encode(bytea(rast), 'hex') != encode(rast::bytea, 'hex') + ; + +----------------------------------------------------------------------- +--- Test Base64 +----------------------------------------------------------------------- + +SELECT + id, + name +FROM rt_bytea_test +WHERE + encode(bytea(rast), 'base64') != encode(rast::bytea, 'base64') + ; + +----------------------------------------------------------------------- +--- Test Binary +----------------------------------------------------------------------- + +SELECT + id, + name +FROM rt_bytea_test +WHERE + encode(st_asbinary(rast), 'base64') != encode(rast::bytea, 'base64') + ; + +-- Cleanup +DROP TABLE rt_bytea_test; diff -Nru postgis-1.5.3/raster/test/regress/rt_bytea_expected postgis-2.0.1/raster/test/regress/rt_bytea_expected --- postgis-1.5.3/raster/test/regress/rt_bytea_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_bytea_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1 @@ +NOTICE: SRID value -1 converted to the officially unknown SRID value 0 diff -Nru postgis-1.5.3/raster/test/regress/rt_clip.sql postgis-2.0.1/raster/test/regress/rt_clip.sql --- postgis-1.5.3/raster/test/regress/rt_clip.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_clip.sql 2012-06-15 15:29:48.000000000 +0000 @@ -0,0 +1,157 @@ +SET client_min_messages TO warning; + +DROP TABLE IF EXISTS raster_clip; +CREATE TABLE raster_clip ( + rid integer, + rast raster +); +DROP TABLE IF EXISTS geom_clip; +CREATE TABLE geom_clip ( + gid integer, + geom geometry +); +DROP TABLE IF EXISTS raster_clip_out; +CREATE TABLE raster_clip_out ( + tid integer, + rid integer, + gid integer, + rast raster +); + +CREATE OR REPLACE FUNCTION make_test_raster( + rid integer, + width integer DEFAULT 2, + height integer DEFAULT 2, + ul_x double precision DEFAULT 0, + ul_y double precision DEFAULT 0, + skew_x double precision DEFAULT 0, + skew_y double precision DEFAULT 0, + initvalue double precision DEFAULT 1, + nodataval double precision DEFAULT 0 +) + RETURNS void + AS $$ + DECLARE + x int; + y int; + rast raster; + BEGIN + rast := ST_MakeEmptyRaster(width, height, ul_x, ul_y, 1, -1, skew_x, skew_y, 0); + rast := ST_AddBand(rast, 1, '8BUI', initvalue, nodataval); + + INSERT INTO raster_clip VALUES (rid, rast); + + RETURN; + END; + $$ LANGUAGE 'plpgsql'; + +-- Define three rasters +-- The first one 1 band with a novalue defined and one pixel set to nodata value +SELECT make_test_raster(1, 4, 4, 0, 0, 0, 0, 1, 0); +UPDATE raster_clip SET rast = ST_SetValue(rast, 3, 2, NULL) WHERE rid = 1; + +-- The second one 3 bands with a novalue defined for the first two band but not set for the third band and one pixel set to nodata value in every band +SELECT make_test_raster(2, 4, 4, 0, 0, 0, 0, 10, 0); +UPDATE raster_clip SET rast = ST_SetValue(rast, 3, 2, NULL) WHERE rid = 2; +UPDATE raster_clip SET rast = ST_AddBand(rast, '8BUI'::text, 2, 0) WHERE rid = 2; +UPDATE raster_clip SET rast = ST_SetValue(rast, 2, 3, 2, NULL) WHERE rid = 2; +UPDATE raster_clip SET rast = ST_AddBand(rast, '8BUI'::text, 3, NULL) WHERE rid = 2; + +-- The third one 1 band skewed 40 degree, (Can't test this yet as ST_AsRaster() still produces badly aligned raster. See ticket #1574) +--SELECT make_test_raster(3, 4, 4, 0, 0, 0, 0, 1, 0); +--UPDATE raster_clip SET rast = ST_SetSkew(rast, -0.15, -0.15) WHERE rid = 3; +--UPDATE raster_clip SET rast = ST_SetValue(rast, 3, 2, NULL) WHERE rid = 3; + +-- Add a first polygon small and outside the extent of the raster +INSERT INTO geom_clip VALUES (1, ST_Buffer(ST_SetSRID(ST_MakePoint(-1, 1), 0), 0.2)); +-- Add a second polygon small, inside the extent of the raster but in the nodata value pixel +INSERT INTO geom_clip VALUES (2, ST_Buffer(ST_SetSRID(ST_MakePoint(2.5, -1.5), 0), 0.2)); +-- Add a second polygon small but inside the extent of the raster +INSERT INTO geom_clip VALUES (3, ST_Buffer(ST_SetSRID(ST_MakePoint(1.5, -1.5), 0), 0.2)); +-- Add a third polygon big cutting the raster +INSERT INTO geom_clip VALUES (4, ST_Buffer(ST_SetSRID(ST_MakePoint(4, -2.5), 0), 2.8)); +-- Add a fourth polygon englobing the two first rasters +INSERT INTO geom_clip VALUES (5, ST_Buffer(ST_SetSRID(ST_MakePoint(2, -2), 0), 3)); + +DROP FUNCTION make_test_raster(integer, integer, integer, double precision, double precision, double precision, double precision, double precision, double precision); + +-- Test 1 without trimming, without defining a nodata value +INSERT INTO raster_clip_out +SELECT 1, rid, gid, ST_Clip(rast, geom, false) +FROM raster_clip, geom_clip; + +-- Test 2 with trimming, without defining a nodata value +INSERT INTO raster_clip_out +SELECT 2, rid, gid, ST_Clip(rast, geom, true) +FROM raster_clip, geom_clip; + +-- Test 3 without trimming, defining a nodata value +INSERT INTO raster_clip_out +SELECT 3, rid, gid, ST_Clip(rast, geom, ARRAY[255, 254, 253], false) +FROM raster_clip, geom_clip; + +-- Test 4 with trimming, defining a nodata value +INSERT INTO raster_clip_out +SELECT 4, rid, gid, ST_Clip(rast, geom, ARRAY[255, 254, 253], true) +FROM raster_clip, geom_clip; + +-- Display the metadata of the resulting rasters +SELECT + tid, + rid, + gid, + round(upperleftx::numeric, 3) AS upperleftx, + round(upperlefty::numeric, 3) AS upperlefty, + width, + height, + round(scalex::numeric, 3) AS scalex, + round(scaley::numeric, 3) AS scaley, + round(skewx::numeric, 3) AS skewx, + round(skewy::numeric, 3) AS skewy, + srid, + numbands, + pixeltype, + round(nodatavalue::numeric, 3) AS nodatavalue +FROM ( + SELECT tid, + rid, + gid, + (ST_Metadata(rast)).*, + (ST_BandMetadata(rast, 1)).* + FROM raster_clip_out +) AS r; + +-- Display the pixels and the values of the resulting rasters (raster 1) +SELECT + tid, + rid, + gid, + (gvxy).x, + (gvxy).y, + (gvxy).val, + ST_AsText((gvxy).geom) geom +FROM (SELECT tid, rid, gid, ST_PixelAsPolygons(rast) gvxy + FROM raster_clip_out + WHERE rid = 1 +) foo +ORDER BY 1, 2, 3, 4, 5, 7; + +-- Display the pixels and the values of the resulting rasters (raster 2, 3 bands) +SELECT + tid, + rid, + gid, + band, + (gvxy).x, + (gvxy).y, + (gvxy).val, + ST_AsText((gvxy).geom) geom +FROM (SELECT tid, rid, gid, band, ST_PixelAsPolygons(rast, band) gvxy + FROM raster_clip_out, generate_series(1, 3) band + WHERE rid = 2 +) foo +ORDER BY 1, 2, 3, 4, 5, 6, 8; + +DROP TABLE IF EXISTS geom_clip; +DROP TABLE IF EXISTS raster_clip; +DROP TABLE IF EXISTS raster_clip_out; diff -Nru postgis-1.5.3/raster/test/regress/rt_clip_expected postgis-2.0.1/raster/test/regress/rt_clip_expected --- postgis-1.5.3/raster/test/regress/rt_clip_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_clip_expected 2012-06-15 21:58:56.000000000 +0000 @@ -0,0 +1,968 @@ +1|1|1|0.000|0.000|4|4|1.000|-1.000|0.000|0.000|0|1|8BUI|0.000 +1|1|2|0.000|0.000|4|4|1.000|-1.000|0.000|0.000|0|1|8BUI|0.000 +1|1|3|0.000|0.000|4|4|1.000|-1.000|0.000|0.000|0|1|8BUI|0.000 +1|1|4|0.000|0.000|4|4|1.000|-1.000|0.000|0.000|0|1|8BUI|0.000 +1|1|5|0.000|0.000|4|4|1.000|-1.000|0.000|0.000|0|1|8BUI|0.000 +1|2|1|0.000|0.000|4|4|1.000|-1.000|0.000|0.000|0|3|8BUI|0.000 +1|2|2|0.000|0.000|4|4|1.000|-1.000|0.000|0.000|0|3|8BUI|0.000 +1|2|3|0.000|0.000|4|4|1.000|-1.000|0.000|0.000|0|3|8BUI|0.000 +1|2|4|0.000|0.000|4|4|1.000|-1.000|0.000|0.000|0|3|8BUI|0.000 +1|2|5|0.000|0.000|4|4|1.000|-1.000|0.000|0.000|0|3|8BUI|0.000 +2|1|1|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|| +2|1|2|2.000|-1.000|2|2|1.000|-1.000|0.000|0.000|0|1|8BUI|0.000 +2|1|3|1.000|-1.000|2|2|1.000|-1.000|0.000|0.000|0|1|8BUI|0.000 +2|1|4|1.000|0.000|3|4|1.000|-1.000|0.000|0.000|0|1|8BUI|0.000 +2|1|5|0.000|0.000|4|4|1.000|-1.000|0.000|0.000|0|1|8BUI|0.000 +2|2|1|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|| +2|2|2|2.000|-1.000|2|2|1.000|-1.000|0.000|0.000|0|3|8BUI|0.000 +2|2|3|1.000|-1.000|2|2|1.000|-1.000|0.000|0.000|0|3|8BUI|0.000 +2|2|4|1.000|0.000|3|4|1.000|-1.000|0.000|0.000|0|3|8BUI|0.000 +2|2|5|0.000|0.000|4|4|1.000|-1.000|0.000|0.000|0|3|8BUI|0.000 +3|1|1|0.000|0.000|4|4|1.000|-1.000|0.000|0.000|0|1|8BUI|255.000 +3|1|2|0.000|0.000|4|4|1.000|-1.000|0.000|0.000|0|1|8BUI|255.000 +3|1|3|0.000|0.000|4|4|1.000|-1.000|0.000|0.000|0|1|8BUI|255.000 +3|1|4|0.000|0.000|4|4|1.000|-1.000|0.000|0.000|0|1|8BUI|255.000 +3|1|5|0.000|0.000|4|4|1.000|-1.000|0.000|0.000|0|1|8BUI|255.000 +3|2|1|0.000|0.000|4|4|1.000|-1.000|0.000|0.000|0|3|8BUI|255.000 +3|2|2|0.000|0.000|4|4|1.000|-1.000|0.000|0.000|0|3|8BUI|255.000 +3|2|3|0.000|0.000|4|4|1.000|-1.000|0.000|0.000|0|3|8BUI|255.000 +3|2|4|0.000|0.000|4|4|1.000|-1.000|0.000|0.000|0|3|8BUI|255.000 +3|2|5|0.000|0.000|4|4|1.000|-1.000|0.000|0.000|0|3|8BUI|255.000 +4|1|1|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|| +4|1|2|2.000|-1.000|2|2|1.000|-1.000|0.000|0.000|0|1|8BUI|255.000 +4|1|3|1.000|-1.000|2|2|1.000|-1.000|0.000|0.000|0|1|8BUI|255.000 +4|1|4|1.000|0.000|3|4|1.000|-1.000|0.000|0.000|0|1|8BUI|255.000 +4|1|5|0.000|0.000|4|4|1.000|-1.000|0.000|0.000|0|1|8BUI|255.000 +4|2|1|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|| +4|2|2|2.000|-1.000|2|2|1.000|-1.000|0.000|0.000|0|3|8BUI|255.000 +4|2|3|1.000|-1.000|2|2|1.000|-1.000|0.000|0.000|0|3|8BUI|255.000 +4|2|4|1.000|0.000|3|4|1.000|-1.000|0.000|0.000|0|3|8BUI|255.000 +4|2|5|0.000|0.000|4|4|1.000|-1.000|0.000|0.000|0|3|8BUI|255.000 +1|1|1|1|1||POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +1|1|1|1|2||POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +1|1|1|1|3||POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +1|1|1|1|4||POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +1|1|1|2|1||POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +1|1|1|2|2||POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +1|1|1|2|3||POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +1|1|1|2|4||POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +1|1|1|3|1||POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +1|1|1|3|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +1|1|1|3|3||POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +1|1|1|3|4||POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +1|1|1|4|1||POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +1|1|1|4|2||POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +1|1|1|4|3||POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +1|1|1|4|4||POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +1|1|2|1|1||POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +1|1|2|1|2||POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +1|1|2|1|3||POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +1|1|2|1|4||POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +1|1|2|2|1||POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +1|1|2|2|2||POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +1|1|2|2|3||POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +1|1|2|2|4||POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +1|1|2|3|1||POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +1|1|2|3|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +1|1|2|3|3||POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +1|1|2|3|4||POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +1|1|2|4|1||POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +1|1|2|4|2||POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +1|1|2|4|3||POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +1|1|2|4|4||POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +1|1|3|1|1||POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +1|1|3|1|2||POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +1|1|3|1|3||POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +1|1|3|1|4||POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +1|1|3|2|1||POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +1|1|3|2|2|1|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +1|1|3|2|3||POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +1|1|3|2|4||POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +1|1|3|3|1||POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +1|1|3|3|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +1|1|3|3|3||POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +1|1|3|3|4||POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +1|1|3|4|1||POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +1|1|3|4|2||POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +1|1|3|4|3||POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +1|1|3|4|4||POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +1|1|4|1|1||POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +1|1|4|1|2||POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +1|1|4|1|3||POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +1|1|4|1|4||POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +1|1|4|2|1||POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +1|1|4|2|2|1|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +1|1|4|2|3|1|POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +1|1|4|2|4|1|POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +1|1|4|3|1|1|POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +1|1|4|3|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +1|1|4|3|3|1|POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +1|1|4|3|4|1|POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +1|1|4|4|1|1|POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +1|1|4|4|2|1|POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +1|1|4|4|3|1|POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +1|1|4|4|4|1|POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +1|1|5|1|1|1|POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +1|1|5|1|2|1|POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +1|1|5|1|3|1|POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +1|1|5|1|4|1|POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +1|1|5|2|1|1|POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +1|1|5|2|2|1|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +1|1|5|2|3|1|POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +1|1|5|2|4|1|POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +1|1|5|3|1|1|POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +1|1|5|3|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +1|1|5|3|3|1|POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +1|1|5|3|4|1|POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +1|1|5|4|1|1|POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +1|1|5|4|2|1|POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +1|1|5|4|3|1|POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +1|1|5|4|4|1|POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +2|1|2|1|1||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +2|1|2|1|2||POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +2|1|2|2|1||POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +2|1|2|2|2||POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +2|1|3|1|1|1|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +2|1|3|1|2||POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +2|1|3|2|1||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +2|1|3|2|2||POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +2|1|4|1|1||POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +2|1|4|1|2|1|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +2|1|4|1|3|1|POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +2|1|4|1|4|1|POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +2|1|4|2|1|1|POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +2|1|4|2|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +2|1|4|2|3|1|POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +2|1|4|2|4|1|POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +2|1|4|3|1|1|POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +2|1|4|3|2|1|POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +2|1|4|3|3|1|POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +2|1|4|3|4|1|POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +2|1|5|1|1|1|POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +2|1|5|1|2|1|POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +2|1|5|1|3|1|POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +2|1|5|1|4|1|POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +2|1|5|2|1|1|POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +2|1|5|2|2|1|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +2|1|5|2|3|1|POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +2|1|5|2|4|1|POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +2|1|5|3|1|1|POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +2|1|5|3|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +2|1|5|3|3|1|POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +2|1|5|3|4|1|POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +2|1|5|4|1|1|POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +2|1|5|4|2|1|POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +2|1|5|4|3|1|POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +2|1|5|4|4|1|POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +3|1|1|1|1||POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +3|1|1|1|2||POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +3|1|1|1|3||POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +3|1|1|1|4||POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +3|1|1|2|1||POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +3|1|1|2|2||POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +3|1|1|2|3||POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +3|1|1|2|4||POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +3|1|1|3|1||POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +3|1|1|3|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +3|1|1|3|3||POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +3|1|1|3|4||POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +3|1|1|4|1||POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +3|1|1|4|2||POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +3|1|1|4|3||POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +3|1|1|4|4||POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +3|1|2|1|1||POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +3|1|2|1|2||POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +3|1|2|1|3||POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +3|1|2|1|4||POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +3|1|2|2|1||POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +3|1|2|2|2||POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +3|1|2|2|3||POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +3|1|2|2|4||POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +3|1|2|3|1||POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +3|1|2|3|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +3|1|2|3|3||POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +3|1|2|3|4||POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +3|1|2|4|1||POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +3|1|2|4|2||POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +3|1|2|4|3||POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +3|1|2|4|4||POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +3|1|3|1|1||POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +3|1|3|1|2||POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +3|1|3|1|3||POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +3|1|3|1|4||POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +3|1|3|2|1||POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +3|1|3|2|2|1|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +3|1|3|2|3||POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +3|1|3|2|4||POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +3|1|3|3|1||POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +3|1|3|3|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +3|1|3|3|3||POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +3|1|3|3|4||POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +3|1|3|4|1||POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +3|1|3|4|2||POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +3|1|3|4|3||POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +3|1|3|4|4||POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +3|1|4|1|1||POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +3|1|4|1|2||POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +3|1|4|1|3||POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +3|1|4|1|4||POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +3|1|4|2|1||POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +3|1|4|2|2|1|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +3|1|4|2|3|1|POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +3|1|4|2|4|1|POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +3|1|4|3|1|1|POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +3|1|4|3|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +3|1|4|3|3|1|POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +3|1|4|3|4|1|POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +3|1|4|4|1|1|POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +3|1|4|4|2|1|POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +3|1|4|4|3|1|POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +3|1|4|4|4|1|POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +3|1|5|1|1|1|POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +3|1|5|1|2|1|POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +3|1|5|1|3|1|POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +3|1|5|1|4|1|POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +3|1|5|2|1|1|POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +3|1|5|2|2|1|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +3|1|5|2|3|1|POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +3|1|5|2|4|1|POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +3|1|5|3|1|1|POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +3|1|5|3|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +3|1|5|3|3|1|POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +3|1|5|3|4|1|POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +3|1|5|4|1|1|POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +3|1|5|4|2|1|POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +3|1|5|4|3|1|POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +3|1|5|4|4|1|POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +4|1|2|1|1||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +4|1|2|1|2||POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +4|1|2|2|1||POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +4|1|2|2|2||POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +4|1|3|1|1|1|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +4|1|3|1|2||POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +4|1|3|2|1||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +4|1|3|2|2||POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +4|1|4|1|1||POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +4|1|4|1|2|1|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +4|1|4|1|3|1|POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +4|1|4|1|4|1|POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +4|1|4|2|1|1|POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +4|1|4|2|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +4|1|4|2|3|1|POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +4|1|4|2|4|1|POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +4|1|4|3|1|1|POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +4|1|4|3|2|1|POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +4|1|4|3|3|1|POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +4|1|4|3|4|1|POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +4|1|5|1|1|1|POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +4|1|5|1|2|1|POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +4|1|5|1|3|1|POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +4|1|5|1|4|1|POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +4|1|5|2|1|1|POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +4|1|5|2|2|1|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +4|1|5|2|3|1|POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +4|1|5|2|4|1|POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +4|1|5|3|1|1|POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +4|1|5|3|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +4|1|5|3|3|1|POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +4|1|5|3|4|1|POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +4|1|5|4|1|1|POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +4|1|5|4|2|1|POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +4|1|5|4|3|1|POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +4|1|5|4|4|1|POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +1|2|1|1|1|1||POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +1|2|1|1|1|2||POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +1|2|1|1|1|3||POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +1|2|1|1|1|4||POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +1|2|1|1|2|1||POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +1|2|1|1|2|2||POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +1|2|1|1|2|3||POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +1|2|1|1|2|4||POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +1|2|1|1|3|1||POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +1|2|1|1|3|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +1|2|1|1|3|3||POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +1|2|1|1|3|4||POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +1|2|1|1|4|1||POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +1|2|1|1|4|2||POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +1|2|1|1|4|3||POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +1|2|1|1|4|4||POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +1|2|1|2|1|1||POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +1|2|1|2|1|2||POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +1|2|1|2|1|3||POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +1|2|1|2|1|4||POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +1|2|1|2|2|1||POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +1|2|1|2|2|2||POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +1|2|1|2|2|3||POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +1|2|1|2|2|4||POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +1|2|1|2|3|1||POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +1|2|1|2|3|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +1|2|1|2|3|3||POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +1|2|1|2|3|4||POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +1|2|1|2|4|1||POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +1|2|1|2|4|2||POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +1|2|1|2|4|3||POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +1|2|1|2|4|4||POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +1|2|1|3|1|1||POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +1|2|1|3|1|2||POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +1|2|1|3|1|3||POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +1|2|1|3|1|4||POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +1|2|1|3|2|1||POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +1|2|1|3|2|2||POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +1|2|1|3|2|3||POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +1|2|1|3|2|4||POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +1|2|1|3|3|1||POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +1|2|1|3|3|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +1|2|1|3|3|3||POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +1|2|1|3|3|4||POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +1|2|1|3|4|1||POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +1|2|1|3|4|2||POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +1|2|1|3|4|3||POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +1|2|1|3|4|4||POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +1|2|2|1|1|1||POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +1|2|2|1|1|2||POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +1|2|2|1|1|3||POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +1|2|2|1|1|4||POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +1|2|2|1|2|1||POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +1|2|2|1|2|2||POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +1|2|2|1|2|3||POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +1|2|2|1|2|4||POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +1|2|2|1|3|1||POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +1|2|2|1|3|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +1|2|2|1|3|3||POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +1|2|2|1|3|4||POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +1|2|2|1|4|1||POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +1|2|2|1|4|2||POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +1|2|2|1|4|3||POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +1|2|2|1|4|4||POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +1|2|2|2|1|1||POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +1|2|2|2|1|2||POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +1|2|2|2|1|3||POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +1|2|2|2|1|4||POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +1|2|2|2|2|1||POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +1|2|2|2|2|2||POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +1|2|2|2|2|3||POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +1|2|2|2|2|4||POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +1|2|2|2|3|1||POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +1|2|2|2|3|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +1|2|2|2|3|3||POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +1|2|2|2|3|4||POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +1|2|2|2|4|1||POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +1|2|2|2|4|2||POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +1|2|2|2|4|3||POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +1|2|2|2|4|4||POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +1|2|2|3|1|1||POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +1|2|2|3|1|2||POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +1|2|2|3|1|3||POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +1|2|2|3|1|4||POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +1|2|2|3|2|1||POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +1|2|2|3|2|2||POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +1|2|2|3|2|3||POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +1|2|2|3|2|4||POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +1|2|2|3|3|1||POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +1|2|2|3|3|2|3|POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +1|2|2|3|3|3||POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +1|2|2|3|3|4||POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +1|2|2|3|4|1||POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +1|2|2|3|4|2||POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +1|2|2|3|4|3||POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +1|2|2|3|4|4||POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +1|2|3|1|1|1||POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +1|2|3|1|1|2||POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +1|2|3|1|1|3||POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +1|2|3|1|1|4||POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +1|2|3|1|2|1||POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +1|2|3|1|2|2|10|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +1|2|3|1|2|3||POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +1|2|3|1|2|4||POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +1|2|3|1|3|1||POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +1|2|3|1|3|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +1|2|3|1|3|3||POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +1|2|3|1|3|4||POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +1|2|3|1|4|1||POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +1|2|3|1|4|2||POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +1|2|3|1|4|3||POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +1|2|3|1|4|4||POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +1|2|3|2|1|1||POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +1|2|3|2|1|2||POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +1|2|3|2|1|3||POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +1|2|3|2|1|4||POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +1|2|3|2|2|1||POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +1|2|3|2|2|2|2|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +1|2|3|2|2|3||POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +1|2|3|2|2|4||POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +1|2|3|2|3|1||POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +1|2|3|2|3|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +1|2|3|2|3|3||POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +1|2|3|2|3|4||POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +1|2|3|2|4|1||POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +1|2|3|2|4|2||POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +1|2|3|2|4|3||POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +1|2|3|2|4|4||POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +1|2|3|3|1|1||POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +1|2|3|3|1|2||POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +1|2|3|3|1|3||POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +1|2|3|3|1|4||POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +1|2|3|3|2|1||POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +1|2|3|3|2|2|3|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +1|2|3|3|2|3||POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +1|2|3|3|2|4||POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +1|2|3|3|3|1||POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +1|2|3|3|3|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +1|2|3|3|3|3||POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +1|2|3|3|3|4||POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +1|2|3|3|4|1||POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +1|2|3|3|4|2||POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +1|2|3|3|4|3||POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +1|2|3|3|4|4||POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +1|2|4|1|1|1||POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +1|2|4|1|1|2||POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +1|2|4|1|1|3||POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +1|2|4|1|1|4||POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +1|2|4|1|2|1||POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +1|2|4|1|2|2|10|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +1|2|4|1|2|3|10|POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +1|2|4|1|2|4|10|POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +1|2|4|1|3|1|10|POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +1|2|4|1|3|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +1|2|4|1|3|3|10|POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +1|2|4|1|3|4|10|POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +1|2|4|1|4|1|10|POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +1|2|4|1|4|2|10|POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +1|2|4|1|4|3|10|POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +1|2|4|1|4|4|10|POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +1|2|4|2|1|1||POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +1|2|4|2|1|2||POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +1|2|4|2|1|3||POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +1|2|4|2|1|4||POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +1|2|4|2|2|1||POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +1|2|4|2|2|2|2|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +1|2|4|2|2|3|2|POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +1|2|4|2|2|4|2|POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +1|2|4|2|3|1|2|POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +1|2|4|2|3|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +1|2|4|2|3|3|2|POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +1|2|4|2|3|4|2|POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +1|2|4|2|4|1|2|POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +1|2|4|2|4|2|2|POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +1|2|4|2|4|3|2|POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +1|2|4|2|4|4|2|POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +1|2|4|3|1|1||POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +1|2|4|3|1|2||POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +1|2|4|3|1|3||POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +1|2|4|3|1|4||POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +1|2|4|3|2|1||POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +1|2|4|3|2|2|3|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +1|2|4|3|2|3|3|POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +1|2|4|3|2|4|3|POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +1|2|4|3|3|1|3|POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +1|2|4|3|3|2|3|POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +1|2|4|3|3|3|3|POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +1|2|4|3|3|4|3|POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +1|2|4|3|4|1|3|POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +1|2|4|3|4|2|3|POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +1|2|4|3|4|3|3|POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +1|2|4|3|4|4|3|POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +1|2|5|1|1|1|10|POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +1|2|5|1|1|2|10|POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +1|2|5|1|1|3|10|POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +1|2|5|1|1|4|10|POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +1|2|5|1|2|1|10|POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +1|2|5|1|2|2|10|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +1|2|5|1|2|3|10|POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +1|2|5|1|2|4|10|POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +1|2|5|1|3|1|10|POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +1|2|5|1|3|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +1|2|5|1|3|3|10|POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +1|2|5|1|3|4|10|POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +1|2|5|1|4|1|10|POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +1|2|5|1|4|2|10|POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +1|2|5|1|4|3|10|POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +1|2|5|1|4|4|10|POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +1|2|5|2|1|1|2|POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +1|2|5|2|1|2|2|POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +1|2|5|2|1|3|2|POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +1|2|5|2|1|4|2|POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +1|2|5|2|2|1|2|POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +1|2|5|2|2|2|2|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +1|2|5|2|2|3|2|POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +1|2|5|2|2|4|2|POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +1|2|5|2|3|1|2|POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +1|2|5|2|3|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +1|2|5|2|3|3|2|POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +1|2|5|2|3|4|2|POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +1|2|5|2|4|1|2|POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +1|2|5|2|4|2|2|POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +1|2|5|2|4|3|2|POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +1|2|5|2|4|4|2|POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +1|2|5|3|1|1|3|POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +1|2|5|3|1|2|3|POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +1|2|5|3|1|3|3|POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +1|2|5|3|1|4|3|POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +1|2|5|3|2|1|3|POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +1|2|5|3|2|2|3|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +1|2|5|3|2|3|3|POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +1|2|5|3|2|4|3|POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +1|2|5|3|3|1|3|POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +1|2|5|3|3|2|3|POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +1|2|5|3|3|3|3|POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +1|2|5|3|3|4|3|POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +1|2|5|3|4|1|3|POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +1|2|5|3|4|2|3|POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +1|2|5|3|4|3|3|POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +1|2|5|3|4|4|3|POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +2|2|2|1|1|1||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +2|2|2|1|1|2||POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +2|2|2|1|2|1||POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +2|2|2|1|2|2||POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +2|2|2|2|1|1||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +2|2|2|2|1|2||POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +2|2|2|2|2|1||POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +2|2|2|2|2|2||POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +2|2|2|3|1|1|3|POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +2|2|2|3|1|2||POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +2|2|2|3|2|1||POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +2|2|2|3|2|2||POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +2|2|3|1|1|1|10|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +2|2|3|1|1|2||POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +2|2|3|1|2|1||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +2|2|3|1|2|2||POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +2|2|3|2|1|1|2|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +2|2|3|2|1|2||POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +2|2|3|2|2|1||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +2|2|3|2|2|2||POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +2|2|3|3|1|1|3|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +2|2|3|3|1|2||POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +2|2|3|3|2|1||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +2|2|3|3|2|2||POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +2|2|4|1|1|1||POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +2|2|4|1|1|2|10|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +2|2|4|1|1|3|10|POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +2|2|4|1|1|4|10|POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +2|2|4|1|2|1|10|POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +2|2|4|1|2|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +2|2|4|1|2|3|10|POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +2|2|4|1|2|4|10|POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +2|2|4|1|3|1|10|POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +2|2|4|1|3|2|10|POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +2|2|4|1|3|3|10|POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +2|2|4|1|3|4|10|POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +2|2|4|2|1|1||POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +2|2|4|2|1|2|2|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +2|2|4|2|1|3|2|POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +2|2|4|2|1|4|2|POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +2|2|4|2|2|1|2|POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +2|2|4|2|2|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +2|2|4|2|2|3|2|POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +2|2|4|2|2|4|2|POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +2|2|4|2|3|1|2|POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +2|2|4|2|3|2|2|POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +2|2|4|2|3|3|2|POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +2|2|4|2|3|4|2|POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +2|2|4|3|1|1||POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +2|2|4|3|1|2|3|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +2|2|4|3|1|3|3|POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +2|2|4|3|1|4|3|POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +2|2|4|3|2|1|3|POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +2|2|4|3|2|2|3|POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +2|2|4|3|2|3|3|POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +2|2|4|3|2|4|3|POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +2|2|4|3|3|1|3|POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +2|2|4|3|3|2|3|POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +2|2|4|3|3|3|3|POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +2|2|4|3|3|4|3|POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +2|2|5|1|1|1|10|POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +2|2|5|1|1|2|10|POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +2|2|5|1|1|3|10|POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +2|2|5|1|1|4|10|POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +2|2|5|1|2|1|10|POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +2|2|5|1|2|2|10|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +2|2|5|1|2|3|10|POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +2|2|5|1|2|4|10|POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +2|2|5|1|3|1|10|POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +2|2|5|1|3|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +2|2|5|1|3|3|10|POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +2|2|5|1|3|4|10|POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +2|2|5|1|4|1|10|POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +2|2|5|1|4|2|10|POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +2|2|5|1|4|3|10|POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +2|2|5|1|4|4|10|POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +2|2|5|2|1|1|2|POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +2|2|5|2|1|2|2|POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +2|2|5|2|1|3|2|POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +2|2|5|2|1|4|2|POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +2|2|5|2|2|1|2|POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +2|2|5|2|2|2|2|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +2|2|5|2|2|3|2|POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +2|2|5|2|2|4|2|POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +2|2|5|2|3|1|2|POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +2|2|5|2|3|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +2|2|5|2|3|3|2|POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +2|2|5|2|3|4|2|POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +2|2|5|2|4|1|2|POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +2|2|5|2|4|2|2|POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +2|2|5|2|4|3|2|POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +2|2|5|2|4|4|2|POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +2|2|5|3|1|1|3|POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +2|2|5|3|1|2|3|POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +2|2|5|3|1|3|3|POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +2|2|5|3|1|4|3|POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +2|2|5|3|2|1|3|POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +2|2|5|3|2|2|3|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +2|2|5|3|2|3|3|POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +2|2|5|3|2|4|3|POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +2|2|5|3|3|1|3|POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +2|2|5|3|3|2|3|POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +2|2|5|3|3|3|3|POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +2|2|5|3|3|4|3|POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +2|2|5|3|4|1|3|POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +2|2|5|3|4|2|3|POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +2|2|5|3|4|3|3|POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +2|2|5|3|4|4|3|POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +3|2|1|1|1|1||POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +3|2|1|1|1|2||POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +3|2|1|1|1|3||POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +3|2|1|1|1|4||POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +3|2|1|1|2|1||POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +3|2|1|1|2|2||POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +3|2|1|1|2|3||POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +3|2|1|1|2|4||POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +3|2|1|1|3|1||POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +3|2|1|1|3|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +3|2|1|1|3|3||POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +3|2|1|1|3|4||POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +3|2|1|1|4|1||POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +3|2|1|1|4|2||POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +3|2|1|1|4|3||POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +3|2|1|1|4|4||POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +3|2|1|2|1|1||POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +3|2|1|2|1|2||POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +3|2|1|2|1|3||POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +3|2|1|2|1|4||POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +3|2|1|2|2|1||POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +3|2|1|2|2|2||POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +3|2|1|2|2|3||POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +3|2|1|2|2|4||POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +3|2|1|2|3|1||POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +3|2|1|2|3|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +3|2|1|2|3|3||POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +3|2|1|2|3|4||POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +3|2|1|2|4|1||POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +3|2|1|2|4|2||POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +3|2|1|2|4|3||POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +3|2|1|2|4|4||POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +3|2|1|3|1|1||POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +3|2|1|3|1|2||POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +3|2|1|3|1|3||POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +3|2|1|3|1|4||POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +3|2|1|3|2|1||POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +3|2|1|3|2|2||POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +3|2|1|3|2|3||POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +3|2|1|3|2|4||POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +3|2|1|3|3|1||POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +3|2|1|3|3|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +3|2|1|3|3|3||POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +3|2|1|3|3|4||POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +3|2|1|3|4|1||POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +3|2|1|3|4|2||POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +3|2|1|3|4|3||POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +3|2|1|3|4|4||POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +3|2|2|1|1|1||POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +3|2|2|1|1|2||POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +3|2|2|1|1|3||POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +3|2|2|1|1|4||POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +3|2|2|1|2|1||POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +3|2|2|1|2|2||POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +3|2|2|1|2|3||POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +3|2|2|1|2|4||POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +3|2|2|1|3|1||POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +3|2|2|1|3|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +3|2|2|1|3|3||POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +3|2|2|1|3|4||POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +3|2|2|1|4|1||POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +3|2|2|1|4|2||POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +3|2|2|1|4|3||POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +3|2|2|1|4|4||POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +3|2|2|2|1|1||POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +3|2|2|2|1|2||POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +3|2|2|2|1|3||POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +3|2|2|2|1|4||POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +3|2|2|2|2|1||POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +3|2|2|2|2|2||POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +3|2|2|2|2|3||POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +3|2|2|2|2|4||POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +3|2|2|2|3|1||POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +3|2|2|2|3|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +3|2|2|2|3|3||POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +3|2|2|2|3|4||POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +3|2|2|2|4|1||POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +3|2|2|2|4|2||POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +3|2|2|2|4|3||POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +3|2|2|2|4|4||POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +3|2|2|3|1|1||POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +3|2|2|3|1|2||POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +3|2|2|3|1|3||POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +3|2|2|3|1|4||POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +3|2|2|3|2|1||POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +3|2|2|3|2|2||POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +3|2|2|3|2|3||POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +3|2|2|3|2|4||POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +3|2|2|3|3|1||POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +3|2|2|3|3|2|3|POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +3|2|2|3|3|3||POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +3|2|2|3|3|4||POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +3|2|2|3|4|1||POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +3|2|2|3|4|2||POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +3|2|2|3|4|3||POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +3|2|2|3|4|4||POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +3|2|3|1|1|1||POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +3|2|3|1|1|2||POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +3|2|3|1|1|3||POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +3|2|3|1|1|4||POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +3|2|3|1|2|1||POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +3|2|3|1|2|2|10|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +3|2|3|1|2|3||POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +3|2|3|1|2|4||POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +3|2|3|1|3|1||POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +3|2|3|1|3|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +3|2|3|1|3|3||POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +3|2|3|1|3|4||POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +3|2|3|1|4|1||POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +3|2|3|1|4|2||POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +3|2|3|1|4|3||POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +3|2|3|1|4|4||POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +3|2|3|2|1|1||POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +3|2|3|2|1|2||POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +3|2|3|2|1|3||POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +3|2|3|2|1|4||POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +3|2|3|2|2|1||POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +3|2|3|2|2|2|2|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +3|2|3|2|2|3||POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +3|2|3|2|2|4||POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +3|2|3|2|3|1||POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +3|2|3|2|3|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +3|2|3|2|3|3||POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +3|2|3|2|3|4||POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +3|2|3|2|4|1||POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +3|2|3|2|4|2||POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +3|2|3|2|4|3||POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +3|2|3|2|4|4||POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +3|2|3|3|1|1||POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +3|2|3|3|1|2||POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +3|2|3|3|1|3||POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +3|2|3|3|1|4||POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +3|2|3|3|2|1||POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +3|2|3|3|2|2|3|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +3|2|3|3|2|3||POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +3|2|3|3|2|4||POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +3|2|3|3|3|1||POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +3|2|3|3|3|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +3|2|3|3|3|3||POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +3|2|3|3|3|4||POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +3|2|3|3|4|1||POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +3|2|3|3|4|2||POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +3|2|3|3|4|3||POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +3|2|3|3|4|4||POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +3|2|4|1|1|1||POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +3|2|4|1|1|2||POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +3|2|4|1|1|3||POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +3|2|4|1|1|4||POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +3|2|4|1|2|1||POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +3|2|4|1|2|2|10|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +3|2|4|1|2|3|10|POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +3|2|4|1|2|4|10|POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +3|2|4|1|3|1|10|POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +3|2|4|1|3|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +3|2|4|1|3|3|10|POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +3|2|4|1|3|4|10|POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +3|2|4|1|4|1|10|POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +3|2|4|1|4|2|10|POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +3|2|4|1|4|3|10|POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +3|2|4|1|4|4|10|POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +3|2|4|2|1|1||POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +3|2|4|2|1|2||POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +3|2|4|2|1|3||POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +3|2|4|2|1|4||POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +3|2|4|2|2|1||POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +3|2|4|2|2|2|2|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +3|2|4|2|2|3|2|POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +3|2|4|2|2|4|2|POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +3|2|4|2|3|1|2|POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +3|2|4|2|3|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +3|2|4|2|3|3|2|POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +3|2|4|2|3|4|2|POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +3|2|4|2|4|1|2|POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +3|2|4|2|4|2|2|POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +3|2|4|2|4|3|2|POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +3|2|4|2|4|4|2|POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +3|2|4|3|1|1||POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +3|2|4|3|1|2||POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +3|2|4|3|1|3||POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +3|2|4|3|1|4||POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +3|2|4|3|2|1||POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +3|2|4|3|2|2|3|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +3|2|4|3|2|3|3|POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +3|2|4|3|2|4|3|POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +3|2|4|3|3|1|3|POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +3|2|4|3|3|2|3|POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +3|2|4|3|3|3|3|POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +3|2|4|3|3|4|3|POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +3|2|4|3|4|1|3|POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +3|2|4|3|4|2|3|POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +3|2|4|3|4|3|3|POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +3|2|4|3|4|4|3|POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +3|2|5|1|1|1|10|POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +3|2|5|1|1|2|10|POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +3|2|5|1|1|3|10|POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +3|2|5|1|1|4|10|POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +3|2|5|1|2|1|10|POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +3|2|5|1|2|2|10|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +3|2|5|1|2|3|10|POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +3|2|5|1|2|4|10|POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +3|2|5|1|3|1|10|POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +3|2|5|1|3|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +3|2|5|1|3|3|10|POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +3|2|5|1|3|4|10|POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +3|2|5|1|4|1|10|POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +3|2|5|1|4|2|10|POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +3|2|5|1|4|3|10|POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +3|2|5|1|4|4|10|POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +3|2|5|2|1|1|2|POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +3|2|5|2|1|2|2|POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +3|2|5|2|1|3|2|POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +3|2|5|2|1|4|2|POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +3|2|5|2|2|1|2|POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +3|2|5|2|2|2|2|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +3|2|5|2|2|3|2|POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +3|2|5|2|2|4|2|POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +3|2|5|2|3|1|2|POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +3|2|5|2|3|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +3|2|5|2|3|3|2|POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +3|2|5|2|3|4|2|POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +3|2|5|2|4|1|2|POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +3|2|5|2|4|2|2|POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +3|2|5|2|4|3|2|POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +3|2|5|2|4|4|2|POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +3|2|5|3|1|1|3|POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +3|2|5|3|1|2|3|POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +3|2|5|3|1|3|3|POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +3|2|5|3|1|4|3|POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +3|2|5|3|2|1|3|POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +3|2|5|3|2|2|3|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +3|2|5|3|2|3|3|POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +3|2|5|3|2|4|3|POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +3|2|5|3|3|1|3|POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +3|2|5|3|3|2|3|POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +3|2|5|3|3|3|3|POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +3|2|5|3|3|4|3|POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +3|2|5|3|4|1|3|POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +3|2|5|3|4|2|3|POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +3|2|5|3|4|3|3|POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +3|2|5|3|4|4|3|POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +4|2|2|1|1|1||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +4|2|2|1|1|2||POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +4|2|2|1|2|1||POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +4|2|2|1|2|2||POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +4|2|2|2|1|1||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +4|2|2|2|1|2||POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +4|2|2|2|2|1||POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +4|2|2|2|2|2||POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +4|2|2|3|1|1|3|POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +4|2|2|3|1|2||POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +4|2|2|3|2|1||POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +4|2|2|3|2|2||POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +4|2|3|1|1|1|10|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +4|2|3|1|1|2||POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +4|2|3|1|2|1||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +4|2|3|1|2|2||POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +4|2|3|2|1|1|2|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +4|2|3|2|1|2||POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +4|2|3|2|2|1||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +4|2|3|2|2|2||POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +4|2|3|3|1|1|3|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +4|2|3|3|1|2||POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +4|2|3|3|2|1||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +4|2|3|3|2|2||POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +4|2|4|1|1|1||POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +4|2|4|1|1|2|10|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +4|2|4|1|1|3|10|POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +4|2|4|1|1|4|10|POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +4|2|4|1|2|1|10|POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +4|2|4|1|2|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +4|2|4|1|2|3|10|POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +4|2|4|1|2|4|10|POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +4|2|4|1|3|1|10|POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +4|2|4|1|3|2|10|POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +4|2|4|1|3|3|10|POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +4|2|4|1|3|4|10|POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +4|2|4|2|1|1||POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +4|2|4|2|1|2|2|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +4|2|4|2|1|3|2|POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +4|2|4|2|1|4|2|POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +4|2|4|2|2|1|2|POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +4|2|4|2|2|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +4|2|4|2|2|3|2|POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +4|2|4|2|2|4|2|POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +4|2|4|2|3|1|2|POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +4|2|4|2|3|2|2|POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +4|2|4|2|3|3|2|POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +4|2|4|2|3|4|2|POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +4|2|4|3|1|1||POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +4|2|4|3|1|2|3|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +4|2|4|3|1|3|3|POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +4|2|4|3|1|4|3|POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +4|2|4|3|2|1|3|POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +4|2|4|3|2|2|3|POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +4|2|4|3|2|3|3|POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +4|2|4|3|2|4|3|POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +4|2|4|3|3|1|3|POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +4|2|4|3|3|2|3|POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +4|2|4|3|3|3|3|POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +4|2|4|3|3|4|3|POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +4|2|5|1|1|1|10|POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +4|2|5|1|1|2|10|POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +4|2|5|1|1|3|10|POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +4|2|5|1|1|4|10|POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +4|2|5|1|2|1|10|POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +4|2|5|1|2|2|10|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +4|2|5|1|2|3|10|POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +4|2|5|1|2|4|10|POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +4|2|5|1|3|1|10|POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +4|2|5|1|3|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +4|2|5|1|3|3|10|POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +4|2|5|1|3|4|10|POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +4|2|5|1|4|1|10|POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +4|2|5|1|4|2|10|POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +4|2|5|1|4|3|10|POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +4|2|5|1|4|4|10|POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +4|2|5|2|1|1|2|POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +4|2|5|2|1|2|2|POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +4|2|5|2|1|3|2|POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +4|2|5|2|1|4|2|POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +4|2|5|2|2|1|2|POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +4|2|5|2|2|2|2|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +4|2|5|2|2|3|2|POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +4|2|5|2|2|4|2|POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +4|2|5|2|3|1|2|POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +4|2|5|2|3|2||POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +4|2|5|2|3|3|2|POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +4|2|5|2|3|4|2|POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +4|2|5|2|4|1|2|POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +4|2|5|2|4|2|2|POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +4|2|5|2|4|3|2|POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +4|2|5|2|4|4|2|POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) +4|2|5|3|1|1|3|POLYGON((0 0,1 0,1 -1,0 -1,0 0)) +4|2|5|3|1|2|3|POLYGON((0 -1,1 -1,1 -2,0 -2,0 -1)) +4|2|5|3|1|3|3|POLYGON((0 -2,1 -2,1 -3,0 -3,0 -2)) +4|2|5|3|1|4|3|POLYGON((0 -3,1 -3,1 -4,0 -4,0 -3)) +4|2|5|3|2|1|3|POLYGON((1 0,2 0,2 -1,1 -1,1 0)) +4|2|5|3|2|2|3|POLYGON((1 -1,2 -1,2 -2,1 -2,1 -1)) +4|2|5|3|2|3|3|POLYGON((1 -2,2 -2,2 -3,1 -3,1 -2)) +4|2|5|3|2|4|3|POLYGON((1 -3,2 -3,2 -4,1 -4,1 -3)) +4|2|5|3|3|1|3|POLYGON((2 0,3 0,3 -1,2 -1,2 0)) +4|2|5|3|3|2|3|POLYGON((2 -1,3 -1,3 -2,2 -2,2 -1)) +4|2|5|3|3|3|3|POLYGON((2 -2,3 -2,3 -3,2 -3,2 -2)) +4|2|5|3|3|4|3|POLYGON((2 -3,3 -3,3 -4,2 -4,2 -3)) +4|2|5|3|4|1|3|POLYGON((3 0,4 0,4 -1,3 -1,3 0)) +4|2|5|3|4|2|3|POLYGON((3 -1,4 -1,4 -2,3 -2,3 -1)) +4|2|5|3|4|3|3|POLYGON((3 -2,4 -2,4 -3,3 -3,3 -2)) +4|2|5|3|4|4|3|POLYGON((3 -3,4 -3,4 -4,3 -4,3 -3)) diff -Nru postgis-1.5.3/raster/test/regress/rt_contain.sql postgis-2.0.1/raster/test/regress/rt_contain.sql --- postgis-1.5.3/raster/test/regress/rt_contain.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_contain.sql 2012-03-01 16:47:18.000000000 +0000 @@ -0,0 +1,98 @@ +----------------------------------------------------------------------- +-- $Id$ +-- +-- Copyright (c) 2009 Sandro Santilli +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +----------------------------------------------------------------------- + +------------------------------------------------------------------- +-- raster_contain +----------------------------------------------------------------------- + +SELECT 'raster_contain(query(1,1), X)' as op, + count(a.y), + min(a.x) as xmin, + max(a.x) as xmax, + min(a.y) as ymin, + max(a.y) as ymax, + st_extent(a.tile::geometry) +FROM rt_gist_grid_test a, rt_gist_query_test b +WHERE b.x = 1 and b.y = 1 + AND raster_contain(b.tile, a.tile); + +------------------------------------------------------------------- +-- raster_geometry_contain +----------------------------------------------------------------------- + +SELECT 'raster_geometry_contain(query(1,1), X)' as op, + count(a.y), + min(a.x) as xmin, + max(a.x) as xmax, + min(a.y) as ymin, + max(a.y) as ymax, + st_extent(a.tile::geometry) +FROM rt_gist_grid_test a, rt_gist_query_test b +WHERE b.x = 1 and b.y = 1 + AND raster_geometry_contain(b.tile, a.tile::geometry); + +------------------------------------------------------------------- +-- geometry_raster_contain +----------------------------------------------------------------------- + +SELECT 'geometry_raster_contain(query(1,1), X)' as op, + count(a.y), + min(a.x) as xmin, + max(a.x) as xmax, + min(a.y) as ymin, + max(a.y) as ymax, + st_extent(a.tile::geometry) +FROM rt_gist_grid_test a, rt_gist_query_test b +WHERE b.x = 1 and b.y = 1 + AND geometry_raster_contain(b.tile::geometry, a.tile); + +----------------------------------------------------------------------- +-- Test ~ operator (raster contains raster) +----------------------------------------------------------------------- + +SELECT 'query(1,1) ~ X' as op, + count(a.y), + min(a.x) as xmin, + max(a.x) as xmax, + min(a.y) as ymin, + max(a.y) as ymax, + st_extent(a.tile::geometry) +FROM rt_gist_grid_test a, rt_gist_query_test b +WHERE b.x = 1 and b.y = 1 + AND b.tile ~ a.tile; + +----------------------------------------------------------------------- +-- Test ~ operator (raster contains geometry) +----------------------------------------------------------------------- + +SELECT 'query(1,1) ~ X' as op, + count(a.y), + min(a.x) as xmin, + max(a.x) as xmax, + min(a.y) as ymin, + max(a.y) as ymax, + st_extent(a.tile::geometry) +FROM rt_gist_grid_test a, rt_gist_query_test b +WHERE b.x = 1 and b.y = 1 + AND b.tile ~ a.tile::geometry; + +----------------------------------------------------------------------- +-- Test ~ operator (geometry contains raster ) +----------------------------------------------------------------------- + +SELECT 'query(1,1) ~ X' as op, + count(a.y), + min(a.x) as xmin, + max(a.x) as xmax, + min(a.y) as ymin, + max(a.y) as ymax, + st_extent(a.tile::geometry) +FROM rt_gist_grid_test a, rt_gist_query_test b +WHERE b.x = 1 and b.y = 1 + AND b.tile::geometry ~ a.tile; diff -Nru postgis-1.5.3/raster/test/regress/rt_contain_expected postgis-2.0.1/raster/test/regress/rt_contain_expected --- postgis-1.5.3/raster/test/regress/rt_contain_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_contain_expected 2012-03-01 16:47:18.000000000 +0000 @@ -0,0 +1,6 @@ +raster_contain(query(1,1), X)|4|4|5|4|5|BOX(-20 -20,20 20) +raster_geometry_contain(query(1,1), X)|4|4|5|4|5|BOX(-20 -20,20 20) +geometry_raster_contain(query(1,1), X)|4|4|5|4|5|BOX(-20 -20,20 20) +query(1,1) ~ X|4|4|5|4|5|BOX(-20 -20,20 20) +query(1,1) ~ X|4|4|5|4|5|BOX(-20 -20,20 20) +query(1,1) ~ X|4|4|5|4|5|BOX(-20 -20,20 20) diff -Nru postgis-1.5.3/raster/test/regress/rt_contained.sql postgis-2.0.1/raster/test/regress/rt_contained.sql --- postgis-1.5.3/raster/test/regress/rt_contained.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_contained.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,38 @@ +----------------------------------------------------------------------- +-- $Id$ +-- +-- Copyright (c) 2009 Sandro Santilli +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +----------------------------------------------------------------------- + +------------------------------------------------------------------- +-- raster_contained +----------------------------------------------------------------------- + +SELECT 'raster_contained(X, query(1,1))' as op, + count(a.y), + min(a.x) as xmin, + max(a.x) as xmax, + min(a.y) as ymin, + max(a.y) as ymax, + st_extent(a.tile::geometry) +FROM rt_gist_grid_test a, rt_gist_query_test b +WHERE b.x = 1 and b.y = 1 + AND raster_contained(a.tile, b.tile); + +----------------------------------------------------------------------- +-- Test @ operator (contained by) +----------------------------------------------------------------------- + +SELECT 'X @ query(1,1)' as op, + count(a.y), + min(a.x) as xmin, + max(a.x) as xmax, + min(a.y) as ymin, + max(a.y) as ymax, + st_extent(a.tile::geometry) +FROM rt_gist_grid_test a, rt_gist_query_test b +WHERE b.x = 1 and b.y = 1 + AND a.tile @ b.tile; diff -Nru postgis-1.5.3/raster/test/regress/rt_contained_expected postgis-2.0.1/raster/test/regress/rt_contained_expected --- postgis-1.5.3/raster/test/regress/rt_contained_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_contained_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +raster_contained(X, query(1,1))|4|4|5|4|5|BOX(-20 -20,20 20) +X @ query(1,1)|4|4|5|4|5|BOX(-20 -20,20 20) diff -Nru postgis-1.5.3/raster/test/regress/rt_count.sql postgis-2.0.1/raster/test/regress/rt_count.sql --- postgis-1.5.3/raster/test/regress/rt_count.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_count.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,93 @@ +SELECT ST_Count( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) + , 1, TRUE +); +SELECT ST_Count( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) + , 1 +); +SELECT ST_Count( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) + , FALSE +); +SELECT ST_Count( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) +); +BEGIN; +CREATE TEMP TABLE test + ON COMMIT DROP AS + SELECT + rast.rast + FROM ( + SELECT ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) AS rast + ) AS rast + FULL JOIN ( + SELECT generate_series(1, 10) AS id + ) AS id + ON 1 = 1; +SELECT ST_Count('test', 'rast', 1, TRUE); +SELECT ST_Count('test', 'rast', 1, FALSE); +SELECT ST_Count('test', 'rast', 1); +SELECT ST_Count('test', 'rast', FALSE); +SELECT ST_Count('test', 'rast'); +ROLLBACK; diff -Nru postgis-1.5.3/raster/test/regress/rt_count_expected postgis-2.0.1/raster/test/regress/rt_count_expected --- postgis-1.5.3/raster/test/regress/rt_count_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_count_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,11 @@ +2 +2 +100 +2 +BEGIN +20 +1000 +20 +1000 +20 +COMMIT diff -Nru postgis-1.5.3/raster/test/regress/rt_dimensions.sql postgis-2.0.1/raster/test/regress/rt_dimensions.sql --- postgis-1.5.3/raster/test/regress/rt_dimensions.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_dimensions.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,24 @@ +----------------------------------------------------------------------- +-- $Id$ +-- +-- Copyright (c) 2009 Mateusz Loskot +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +----------------------------------------------------------------------- + +----------------------------------------------------------------------- +--- st_width +----------------------------------------------------------------------- + +SELECT id, name, width + FROM rt_properties_test + WHERE st_width(rast) != width; + +----------------------------------------------------------------------- +--- st_height +----------------------------------------------------------------------- + +SELECT id, name, height + FROM rt_properties_test + WHERE st_height(rast) != height; diff -Nru postgis-1.5.3/raster/test/regress/rt_georeference.sql postgis-2.0.1/raster/test/regress/rt_georeference.sql --- postgis-1.5.3/raster/test/regress/rt_georeference.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_georeference.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,266 @@ +----------------------------------------------------------------------- +-- $Id$ +-- +-- Copyright (c) 2009-2010 Mateusz Loskot , David Zwarg +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +----------------------------------------------------------------------- + +----------------------------------------------------------------------- +-- st_georeference (default) +----------------------------------------------------------------------- + +SELECT + replace(st_georeference(rast)::text, E'\n', E'EOL'), + replace(st_georeference(rast)::text, E'\n', E'EOL') = + '2.0000000000EOL0.0000000000EOL0.0000000000EOL3.0000000000EOL0.5000000000EOL0.5000000000EOL' +FROM rt_properties_test +WHERE id = 0; + +SELECT + replace(st_georeference(rast)::text, E'\n', E'EOL'), + replace(st_georeference(rast)::text, E'\n', E'EOL') = + '5.0000000000EOL0.0000000000EOL0.0000000000EOL5.0000000000EOL2.5000000000EOL2.5000000000EOL' +FROM rt_properties_test +WHERE id = 1; + +SELECT + replace(st_georeference(rast)::text, E'\n', E'EOL'), + replace(st_georeference(rast)::text, E'\n', E'EOL') = + '5.0000000000EOL0.0000000000EOL0.0000000000EOL5.0000000000EOL7.5000000000EOL2.5000000000EOL' +FROM rt_properties_test +WHERE id = 2; + + +SELECT + replace(st_georeference(rast)::text, E'\n', E'EOL'), + replace(st_georeference(rast)::text, E'\n', E'EOL') = + '5.0000000000EOL0.0000000000EOL0.0000000000EOL5.0000000000EOL7.5000000000EOL2.5000000000EOL' +FROM rt_properties_test +WHERE id = 3; + +SELECT + replace(st_georeference(rast)::text, E'\n', E'EOL'), + replace(st_georeference(rast)::text, E'\n', E'EOL') = + '5.0000000000EOL1.0000000000EOL1.0000000000EOL5.0000000000EOL7.5000000000EOL2.5000000000EOL' +FROM rt_properties_test +WHERE id = 4; + +SELECT + replace(st_georeference(rast)::text, E'\n', E'EOL'), + replace(st_georeference(rast)::text, E'\n', E'EOL') = + '5.0000000000EOL7.0000000000EOL3.0000000000EOL5.0000000000EOL7.5000000000EOL2.5000000000EOL' +FROM rt_properties_test +WHERE id = 5; + +----------------------------------------------------------------------- +-- st_georeference (GDAL) +----------------------------------------------------------------------- + +SELECT + replace(st_georeference(rast,'GDAL')::text, E'\n', E'EOL'), + replace(st_georeference(rast,'GDAL')::text, E'\n', E'EOL') = + '2.0000000000EOL0.0000000000EOL0.0000000000EOL3.0000000000EOL0.5000000000EOL0.5000000000EOL' +FROM rt_properties_test +WHERE id = 0; + +SELECT + replace(st_georeference(rast,'GDAL')::text, E'\n', E'EOL'), + replace(st_georeference(rast,'GDAL')::text, E'\n', E'EOL') = + '5.0000000000EOL0.0000000000EOL0.0000000000EOL5.0000000000EOL2.5000000000EOL2.5000000000EOL' +FROM rt_properties_test +WHERE id = 1; + +SELECT + replace(st_georeference(rast,'GDAL')::text, E'\n', E'EOL'), + replace(st_georeference(rast,'GDAL')::text, E'\n', E'EOL') = + '5.0000000000EOL0.0000000000EOL0.0000000000EOL5.0000000000EOL7.5000000000EOL2.5000000000EOL' +FROM rt_properties_test +WHERE id = 2; + +SELECT + replace(st_georeference(rast,'GDAL')::text, E'\n', E'EOL'), + replace(st_georeference(rast,'GDAL')::text, E'\n', E'EOL') = + '5.0000000000EOL0.0000000000EOL0.0000000000EOL5.0000000000EOL7.5000000000EOL2.5000000000EOL' +FROM rt_properties_test +WHERE id = 3; + +SELECT + replace(st_georeference(rast,'GDAL')::text, E'\n', E'EOL'), + replace(st_georeference(rast,'GDAL')::text, E'\n', E'EOL') = + '5.0000000000EOL1.0000000000EOL1.0000000000EOL5.0000000000EOL7.5000000000EOL2.5000000000EOL' +FROM rt_properties_test +WHERE id = 4; + +SELECT + replace(st_georeference(rast,'GDAL')::text, E'\n', E'EOL'), + replace(st_georeference(rast,'GDAL')::text, E'\n', E'EOL') = + '5.0000000000EOL7.0000000000EOL3.0000000000EOL5.0000000000EOL7.5000000000EOL2.5000000000EOL' +FROM rt_properties_test +WHERE id = 5; + +----------------------------------------------------------------------- +-- st_georeference (ESRI) +----------------------------------------------------------------------- + +SELECT + replace(st_georeference(rast,'ESRI')::text, E'\n', E'EOL'), + replace(st_georeference(rast,'ESRI')::text, E'\n', E'EOL') = + '2.0000000000EOL0.0000000000EOL0.0000000000EOL3.0000000000EOL1.5000000000EOL2.0000000000EOL' +FROM rt_properties_test +WHERE id = 0; + +SELECT + replace(st_georeference(rast,'ESRI')::text, E'\n', E'EOL'), + replace(st_georeference(rast,'ESRI')::text, E'\n', E'EOL') = + '5.0000000000EOL0.0000000000EOL0.0000000000EOL5.0000000000EOL5.0000000000EOL5.0000000000EOL' +FROM rt_properties_test +WHERE id = 1; + +SELECT + replace(st_georeference(rast,'ESRI')::text, E'\n', E'EOL'), + replace(st_georeference(rast,'ESRI')::text, E'\n', E'EOL') = + '5.0000000000EOL0.0000000000EOL0.0000000000EOL5.0000000000EOL10.0000000000EOL5.0000000000EOL' +FROM rt_properties_test +WHERE id = 2; + +SELECT + replace(st_georeference(rast,'ESRI')::text, E'\n', E'EOL'), + replace(st_georeference(rast,'ESRI')::text, E'\n', E'EOL') = + '5.0000000000EOL0.0000000000EOL0.0000000000EOL5.0000000000EOL10.0000000000EOL5.0000000000EOL' +FROM rt_properties_test +WHERE id = 3; + +SELECT + replace(st_georeference(rast,'ESRI')::text, E'\n', E'EOL'), + replace(st_georeference(rast,'ESRI')::text, E'\n', E'EOL') = + '5.0000000000EOL1.0000000000EOL1.0000000000EOL5.0000000000EOL10.0000000000EOL5.0000000000EOL' +FROM rt_properties_test +WHERE id = 4; + +SELECT + replace(st_georeference(rast,'ESRI')::text, E'\n', E'EOL'), + replace(st_georeference(rast,'ESRI')::text, E'\n', E'EOL') = + '5.0000000000EOL7.0000000000EOL3.0000000000EOL5.0000000000EOL10.0000000000EOL5.0000000000EOL' +FROM rt_properties_test +WHERE id = 5; + + +----------------------------------------------------------------------- +-- st_setgeoreference (error conditions) +----------------------------------------------------------------------- + +SELECT + -- all 6 parameters must be numeric + st_setgeoreference(rast,'4.0000000000 0.0000000000 0.0000000000 6.0000000000 1.5000000000 nodata') IS NULL +FROM rt_properties_test +WHERE id = 0; + +SELECT + -- must have 6 parameters + st_setgeoreference(rast,'2.0000000000 1.0000000000 2.0000000000 3.0000000000 1.5000000000') IS NULL +FROM rt_properties_test +WHERE id = 1; + +SELECT + -- any whitespace accepted between parameters as well as ' ' + st_setgeoreference(rast,E'2.0000000000 1.0000000000\n2.0000000000\t3.0000000000 1.5000000000 2.0000000000') IS NOT NULL +FROM rt_properties_test +WHERE id = 2; + +----------------------------------------------------------------------- +-- st_setgeoreference (warning conditions) +----------------------------------------------------------------------- + +SELECT + -- raster arg is null + st_setgeoreference(null,'4.0000000000 0.0000000000 0.0000000000 6.0000000000 1.5000000000 2.0000000000') IS NULL +FROM rt_properties_test +WHERE id = 0; + +----------------------------------------------------------------------- +-- st_setgeoreference (default) +----------------------------------------------------------------------- + +SELECT + st_scalex(rast) = 2, + st_scaley(rast) = 3, + st_scalex(st_setgeoreference(rast,'4.0000000000 0.0000000000 0.0000000000 6.0000000000 1.5000000000 2.0000000000')) = 4, + st_scaley(st_setgeoreference(rast,'4.0000000000 0.0000000000 0.0000000000 6.0000000000 1.5000000000 2.0000000000')) = 6 +FROM rt_properties_test +WHERE id = 0; + +SELECT + st_skewx(rast) = 0, + st_skewy(rast) = 0, + st_skewx(st_setgeoreference(rast,'2.0000000000 1.0000000000 2.0000000000 3.0000000000 1.5000000000 2.0000000000')) = 2, + st_skewy(st_setgeoreference(rast,'2.0000000000 1.0000000000 2.0000000000 3.0000000000 1.5000000000 2.0000000000')) = 1 +FROM rt_properties_test +WHERE id = 1; + +SELECT + st_upperleftx(rast) = 7.5, + st_upperlefty(rast) = 2.5, + st_upperleftx(st_setgeoreference(rast,'2.0000000000 1.0000000000 2.0000000000 3.0000000000 1.5000000000 2.0000000000')) = 1.5, + st_upperlefty(st_setgeoreference(rast,'2.0000000000 1.0000000000 2.0000000000 3.0000000000 1.5000000000 2.0000000000')) = 2.0 +FROM rt_properties_test +WHERE id = 2; + +----------------------------------------------------------------------- +-- st_setgeoreference (GDAL) +----------------------------------------------------------------------- + +SELECT + st_scalex(rast) = 2, + st_scaley(rast) = 3, + st_scalex(st_setgeoreference(rast,'4.0000000000 0.0000000000 0.0000000000 6.0000000000 1.5000000000 2.0000000000','GDAL')) = 4, + st_scaley(st_setgeoreference(rast,'4.0000000000 0.0000000000 0.0000000000 6.0000000000 1.5000000000 2.0000000000','GDAL')) = 6 +FROM rt_properties_test +WHERE id = 0; + +SELECT + st_skewx(rast) = 0, + st_skewy(rast) = 0, + st_skewx(st_setgeoreference(rast,'2.0000000000 1.0000000000 2.0000000000 3.0000000000 1.5000000000 2.0000000000','GDAL')) = 2, + st_skewy(st_setgeoreference(rast,'2.0000000000 1.0000000000 2.0000000000 3.0000000000 1.5000000000 2.0000000000','GDAL')) = 1 +FROM rt_properties_test +WHERE id = 1; + +SELECT + st_upperleftx(rast) = 7.5, + st_upperlefty(rast) = 2.5, + st_upperleftx(st_setgeoreference(rast,'2.0000000000 1.0000000000 2.0000000000 3.0000000000 1.5000000000 2.0000000000','GDAL')) = 1.5, + st_upperlefty(st_setgeoreference(rast,'2.0000000000 1.0000000000 2.0000000000 3.0000000000 1.5000000000 2.0000000000','GDAL')) = 2.0 +FROM rt_properties_test +WHERE id = 2; + +----------------------------------------------------------------------- +-- st_setgeoreference (ESRI) +----------------------------------------------------------------------- + +SELECT + st_scalex(rast) = 2, + st_scaley(rast) = 3, + st_scalex(st_setgeoreference(rast,'4.0000000000 0.0000000000 0.0000000000 6.0000000000 1.5000000000 2.0000000000','ESRI')) = 4, + st_scaley(st_setgeoreference(rast,'4.0000000000 0.0000000000 0.0000000000 6.0000000000 1.5000000000 2.0000000000','ESRI')) = 6 +FROM rt_properties_test +WHERE id = 0; + +SELECT + st_skewx(rast) = 0, + st_skewy(rast) = 0, + st_skewx(st_setgeoreference(rast,'2.0000000000 1.0000000000 2.0000000000 3.0000000000 1.5000000000 2.0000000000','ESRI')) = 2, + st_skewy(st_setgeoreference(rast,'2.0000000000 1.0000000000 2.0000000000 3.0000000000 1.5000000000 2.0000000000','ESRI')) = 1 +FROM rt_properties_test +WHERE id = 1; + +SELECT + st_upperleftx(rast) = 7.5, + st_upperlefty(rast) = 2.5, + st_upperleftx(st_setgeoreference(rast,'2.0000000000 0.0000000000 0.0000000000 3.0000000000 1.0000000000 2.5000000000','ESRI')) = 0, + st_upperlefty(st_setgeoreference(rast,'2.0000000000 0.0000000000 0.0000000000 3.0000000000 1.0000000000 2.5000000000','ESRI')) = 1 +FROM rt_properties_test +WHERE id = 2; + + diff -Nru postgis-1.5.3/raster/test/regress/rt_georeference_expected postgis-2.0.1/raster/test/regress/rt_georeference_expected --- postgis-1.5.3/raster/test/regress/rt_georeference_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_georeference_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,31 @@ +2.0000000000EOL0.0000000000EOL0.0000000000EOL3.0000000000EOL0.5000000000EOL0.5000000000EOL|t +5.0000000000EOL0.0000000000EOL0.0000000000EOL5.0000000000EOL2.5000000000EOL2.5000000000EOL|t +5.0000000000EOL0.0000000000EOL0.0000000000EOL5.0000000000EOL7.5000000000EOL2.5000000000EOL|t +5.0000000000EOL0.0000000000EOL0.0000000000EOL5.0000000000EOL7.5000000000EOL2.5000000000EOL|t +5.0000000000EOL1.0000000000EOL1.0000000000EOL5.0000000000EOL7.5000000000EOL2.5000000000EOL|t +5.0000000000EOL7.0000000000EOL3.0000000000EOL5.0000000000EOL7.5000000000EOL2.5000000000EOL|t +2.0000000000EOL0.0000000000EOL0.0000000000EOL3.0000000000EOL0.5000000000EOL0.5000000000EOL|t +5.0000000000EOL0.0000000000EOL0.0000000000EOL5.0000000000EOL2.5000000000EOL2.5000000000EOL|t +5.0000000000EOL0.0000000000EOL0.0000000000EOL5.0000000000EOL7.5000000000EOL2.5000000000EOL|t +5.0000000000EOL0.0000000000EOL0.0000000000EOL5.0000000000EOL7.5000000000EOL2.5000000000EOL|t +5.0000000000EOL1.0000000000EOL1.0000000000EOL5.0000000000EOL7.5000000000EOL2.5000000000EOL|t +5.0000000000EOL7.0000000000EOL3.0000000000EOL5.0000000000EOL7.5000000000EOL2.5000000000EOL|t +2.0000000000EOL0.0000000000EOL0.0000000000EOL3.0000000000EOL1.5000000000EOL2.0000000000EOL|t +5.0000000000EOL0.0000000000EOL0.0000000000EOL5.0000000000EOL5.0000000000EOL5.0000000000EOL|t +5.0000000000EOL0.0000000000EOL0.0000000000EOL5.0000000000EOL10.0000000000EOL5.0000000000EOL|t +5.0000000000EOL0.0000000000EOL0.0000000000EOL5.0000000000EOL10.0000000000EOL5.0000000000EOL|t +5.0000000000EOL1.0000000000EOL1.0000000000EOL5.0000000000EOL10.0000000000EOL5.0000000000EOL|t +5.0000000000EOL7.0000000000EOL3.0000000000EOL5.0000000000EOL10.0000000000EOL5.0000000000EOL|t +ERROR: st_setgeoreference requires a string with 6 floating point values. +ERROR: st_setgeoreference requires a string with 6 floating point values. +t +t +t|t|t|t +t|t|t|t +t|t|t|t +t|t|t|t +t|t|t|t +t|t|t|t +t|t|t|t +t|t|t|t +t|t|t|t diff -Nru postgis-1.5.3/raster/test/regress/rt_hasnoband.sql postgis-2.0.1/raster/test/regress/rt_hasnoband.sql --- postgis-1.5.3/raster/test/regress/rt_hasnoband.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_hasnoband.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,13 @@ +----------------------------------------------------------------------- +-- $Id$ +-- +-- Copyright (c) 2011 Jorge Arevalo +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +----------------------------------------------------------------------- + +------------------------------------------------------------------- +-- st_hasnodata +----------------------------------------------------------------------- +select st_hasnoband(rast) from empty_raster_test; \ No newline at end of file diff -Nru postgis-1.5.3/raster/test/regress/rt_hasnoband_expected postgis-2.0.1/raster/test/regress/rt_hasnoband_expected --- postgis-1.5.3/raster/test/regress/rt_hasnoband_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_hasnoband_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1 @@ +t diff -Nru postgis-1.5.3/raster/test/regress/rt_histogram.sql postgis-2.0.1/raster/test/regress/rt_histogram.sql --- postgis-1.5.3/raster/test/regress/rt_histogram.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_histogram.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,297 @@ +SELECT + round(min::numeric, 3), + round(max::numeric, 3), + count, + round(percent::numeric, 3) +FROM ST_Histogram( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) +); +SELECT + round(min::numeric, 3), + round(max::numeric, 3), + count, + round(percent::numeric, 3) +FROM ST_Histogram( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ), + 1, FALSE, 0, ARRAY[]::double precision[], FALSE +); +SELECT + round(min::numeric, 3), + round(max::numeric, 3), + count, + round(percent::numeric, 3) +FROM ST_Histogram( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ), + 1, FALSE, 1, FALSE +); +SELECT + round(min::numeric, 3), + round(max::numeric, 3), + count, + round(percent::numeric, 3) +FROM ST_Histogram( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ), + 1, FALSE, 5 +); +SELECT + round(min::numeric, 3), + round(max::numeric, 3), + count, + round(percent::numeric, 3) +FROM ST_Histogram( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ), + 1, FALSE +); +SELECT + round(min::numeric, 3), + round(max::numeric, 3), + count, + round(percent::numeric, 3) +FROM ST_Histogram( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ), + 1 +); +SELECT + round(min::numeric, 3), + round(max::numeric, 3), + count, + round(percent::numeric, 3) +FROM ST_Histogram( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ), + 1, 0, ARRAY[5]::double precision[], FALSE +); +SELECT + round(min::numeric, 3), + round(max::numeric, 3), + count, + round(percent::numeric, 3) +FROM ST_Histogram( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ), + 1, 3, FALSE +); +SELECT + round(min::numeric, 3), + round(max::numeric, 3), + count, + round(percent::numeric, 3) +FROM ST_Histogram( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ), + 1, 5 +); +SELECT + round(min::numeric, 3), + round(max::numeric, 3), + count, + round(percent::numeric, 3) +FROM ST_Histogram( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ), + 2 +); +BEGIN; +CREATE TEMP TABLE test_histogram + ON COMMIT DROP AS + SELECT + rast.rast + FROM ( + SELECT ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) AS rast + ) AS rast + FULL JOIN ( + SELECT generate_series(1, 10) AS id + ) AS id + ON 1 = 1; +SELECT + round(min::numeric, 3), + round(max::numeric, 3), + count, + round(percent::numeric, 3) +FROM ST_Histogram('test_histogram', 'rast', 1, TRUE, 0, NULL, FALSE); +SELECT + round(min::numeric, 3), + round(max::numeric, 3), + count, + round(percent::numeric, 3) +FROM ST_Histogram('test_histogram', 'rast', 1, TRUE, 0, NULL, FALSE); +SELECT + round(min::numeric, 3), + round(max::numeric, 3), + count, + round(percent::numeric, 3) +FROM ST_Histogram('test_histogram', 'rast', 1, FALSE); +SELECT + round(min::numeric, 3), + round(max::numeric, 3), + count, + round(percent::numeric, 3) +FROM ST_Histogram('test_histogram', 'rast', 1, FALSE, 5, FALSE); +SELECT + round(min::numeric, 3), + round(max::numeric, 3), + count, + round(percent::numeric, 3) +FROM ST_Histogram('test_histogram', 'rast', 1, 10); +SELECT + round(min::numeric, 3), + round(max::numeric, 3), + count, + round(percent::numeric, 3) +FROM ST_Histogram('test_histogram', 'rast', 1, 3, FALSE); +SAVEPOINT test; +SELECT + round(min::numeric, 3), + round(max::numeric, 3), + count, + round(percent::numeric, 3) +FROM ST_Histogram('test_histogram', 'rast', 2, TRUE, 0, NULL, FALSE); +ROLLBACK TO SAVEPOINT test; +RELEASE SAVEPOINT test; +SAVEPOINT test; +SELECT + round(min::numeric, 3), + round(max::numeric, 3), + count, + round(percent::numeric, 3) +FROM ST_Histogram('test1', 'rast', 1, TRUE, 0, NULL, FALSE); +ROLLBACK TO SAVEPOINT test; +RELEASE SAVEPOINT test; +SAVEPOINT test; +SELECT + round(min::numeric, 3), + round(max::numeric, 3), + count, + round(percent::numeric, 3) +FROM ST_Histogram('test_histogram', 'rast1', 1, TRUE, 0, NULL, FALSE); +ROLLBACK TO SAVEPOINT test; +RELEASE SAVEPOINT test; +ROLLBACK; diff -Nru postgis-1.5.3/raster/test/regress/rt_histogram_expected postgis-2.0.1/raster/test/regress/rt_histogram_expected --- postgis-1.5.3/raster/test/regress/rt_histogram_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_histogram_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,83 @@ +-10.000|-3.429|1|0.500 +-3.429|3.142|1|0.500 +-10.000|-8.357|1|0.010 +-8.357|-6.715|0|0.000 +-6.715|-5.072|0|0.000 +-5.072|-3.429|0|0.000 +-3.429|-1.787|0|0.000 +-1.787|-0.144|0|0.000 +-0.144|1.499|98|0.980 +1.499|3.142|1|0.010 +-10.000|3.142|100|-1.000 +-10.000|-7.372|1|0.010 +-7.372|-4.743|0|0.000 +-4.743|-2.115|0|0.000 +-2.115|0.513|98|0.980 +0.513|3.142|1|0.010 +-10.000|-8.357|1|0.010 +-8.357|-6.715|0|0.000 +-6.715|-5.072|0|0.000 +-5.072|-3.429|0|0.000 +-3.429|-1.787|0|0.000 +-1.787|-0.144|0|0.000 +-0.144|1.499|98|0.980 +1.499|3.142|1|0.010 +-10.000|-3.429|1|0.500 +-3.429|3.142|1|0.500 +-10.000|-5.000|1|0.500 +-5.000|0.000|0|0.000 +0.000|5.000|1|0.500 +-10.000|-5.619|1|0.500 +-5.619|-1.239|0|0.000 +-1.239|3.142|1|0.500 +-10.000|-7.372|1|0.500 +-7.372|-4.743|0|0.000 +-4.743|-2.115|0|0.000 +-2.115|0.513|0|0.000 +0.513|3.142|1|0.500 +NOTICE: Invalid band index (must use 1-based). Returning NULL +BEGIN +-10.000|-3.429|10|0.500 +-3.429|3.142|10|0.500 +-10.000|-3.429|10|0.500 +-3.429|3.142|10|0.500 +-10.000|-8.357|10|0.010 +-8.357|-6.715|0|0.000 +-6.715|-5.072|0|0.000 +-5.072|-3.429|0|0.000 +-3.429|-1.787|0|0.000 +-1.787|-0.144|0|0.000 +-0.144|1.499|980|0.980 +1.499|3.142|10|0.010 +-10.000|-7.372|10|0.010 +-7.372|-4.743|0|0.000 +-4.743|-2.115|0|0.000 +-2.115|0.513|980|0.980 +0.513|3.142|10|0.010 +-10.000|-8.686|10|0.500 +-8.686|-7.372|0|0.000 +-7.372|-6.058|0|0.000 +-6.058|-4.743|0|0.000 +-4.743|-3.429|0|0.000 +-3.429|-2.115|0|0.000 +-2.115|-0.801|0|0.000 +-0.801|0.513|0|0.000 +0.513|1.827|0|0.000 +1.827|3.142|10|0.500 +-10.000|-5.619|10|0.500 +-5.619|-1.239|0|0.000 +-1.239|3.142|10|0.500 +SAVEPOINT +NOTICE: Invalid band index (must use 1-based). Returning NULL +ERROR: RASTER_histogramCoverage: Could not get summary stats of coverage +COMMIT +RELEASE +SAVEPOINT +ERROR: relation "test1" does not exist at character 20 +COMMIT +RELEASE +SAVEPOINT +ERROR: column "rast1" does not exist at character 8 +COMMIT +RELEASE +COMMIT diff -Nru postgis-1.5.3/raster/test/regress/rt_intersection.sql postgis-2.0.1/raster/test/regress/rt_intersection.sql --- postgis-1.5.3/raster/test/regress/rt_intersection.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_intersection.sql 2012-03-13 16:13:48.000000000 +0000 @@ -0,0 +1,152 @@ +SET client_min_messages TO warning; + +DROP TABLE IF EXISTS raster_intersection; +CREATE TABLE raster_intersection ( + rid integer, + rast raster +); +DROP TABLE IF EXISTS raster_intersection_out; +CREATE TABLE raster_intersection_out ( + rid1 integer, + rid2 integer, + rast raster +); +CREATE OR REPLACE FUNCTION make_test_raster( + rid integer, + width integer DEFAULT 2, + height integer DEFAULT 2, + ul_x double precision DEFAULT 0, + ul_y double precision DEFAULT 0, + skew_x double precision DEFAULT 0, + skew_y double precision DEFAULT 0, + initvalue double precision DEFAULT 1, + nodataval double precision DEFAULT 0 +) + RETURNS void + AS $$ + DECLARE + x int; + y int; + rast raster; + BEGIN + rast := ST_MakeEmptyRaster(width, height, ul_x, ul_y, 1, 1, skew_x, skew_y, 0); + rast := ST_AddBand(rast, 1, '8BUI', initvalue, nodataval); + + + INSERT INTO raster_intersection VALUES (rid, rast); + + RETURN; + END; + $$ LANGUAGE 'plpgsql'; +-- no skew +SELECT make_test_raster(0, 4, 4, -2, -2); +SELECT make_test_raster(1, 2, 2, 0, 0, 0, 0, 2); +SELECT make_test_raster(2, 2, 2, 1, -1, 0, 0, 3); +SELECT make_test_raster(3, 2, 2, 1, 1, 0, 0, 4); +SELECT make_test_raster(4, 2, 2, 2, 2, 0, 0, 5); + +-- skew +SELECT make_test_raster(10, 4, 4, -2, -2, 0.1, 0.1); +SELECT make_test_raster(11, 4, 4, -0.9, -0.9, 0.1, 0.1, 2); +SELECT make_test_raster(12, 2, 2, -1.9, -1, 0.1, 0.1, 3); +SELECT make_test_raster(13, 2, 2, 0, -1.8, 0.1, 0.1, 4); +SELECT make_test_raster(14, 2, 2, 2, 2, 0.1, 0.1, 5); + +DROP FUNCTION make_test_raster(integer, integer, integer, double precision, double precision, double precision, double precision, double precision, double precision); + +INSERT INTO raster_intersection_out + (SELECT r1.rid, r2.rid, ST_Intersection( + r1.rast, r2.rast + ) + FROM raster_intersection r1 + JOIN raster_intersection r2 + ON r1.rid != r2.rid + WHERE r1.rid = 0 + AND r2.rid BETWEEN 1 AND 9 + ) UNION ALL ( + SELECT r1.rid, r2.rid, ST_Intersection( + r1.rast, r2.rast + ) + FROM raster_intersection r1 + JOIN raster_intersection r2 + ON r1.rid != r2.rid + WHERE r1.rid = 10 + AND r2.rid BETWEEN 11 AND 19) +; + +INSERT INTO raster_intersection_out + (SELECT r1.rid, r2.rid, ST_Intersection( + r1.rast, r2.rast, 'BAND1' + ) + FROM raster_intersection r1 + JOIN raster_intersection r2 + ON r1.rid != r2.rid + WHERE r1.rid = 0 + AND r2.rid BETWEEN 1 AND 9 + ) UNION ALL ( + SELECT r1.rid, r2.rid, ST_Intersection( + r1.rast, r2.rast, 'BAND1' + ) + FROM raster_intersection r1 + JOIN raster_intersection r2 + ON r1.rid != r2.rid + WHERE r1.rid = 10 + AND r2.rid BETWEEN 11 AND 19) +; + +INSERT INTO raster_intersection_out + (SELECT r1.rid, r2.rid, ST_Intersection( + r1.rast, r2.rast, 'BAND2' + ) + FROM raster_intersection r1 + JOIN raster_intersection r2 + ON r1.rid != r2.rid + WHERE r1.rid = 0 + AND r2.rid BETWEEN 1 AND 9 + ) UNION ALL ( + SELECT r1.rid, r2.rid, ST_Intersection( + r1.rast, r2.rast, 'BAND2' + ) + FROM raster_intersection r1 + JOIN raster_intersection r2 + ON r1.rid != r2.rid + WHERE r1.rid = 10 + AND r2.rid BETWEEN 11 AND 19) +; + +SELECT + rid1, + rid2, + round(upperleftx::numeric, 3) AS upperleftx, + round(upperlefty::numeric, 3) AS upperlefty, + width, + height, + round(scalex::numeric, 3) AS scalex, + round(scaley::numeric, 3) AS scaley, + round(skewx::numeric, 3) AS skewx, + round(skewy::numeric, 3) AS skewy, + srid, + numbands, + pixeltype, + round(nodatavalue::numeric, 3) AS nodatavalue, + round(firstvalue::numeric, 3) AS firstvalue, + round(lastvalue::numeric, 3) AS lastvalue +FROM ( + SELECT + rid1, + rid2, + (ST_Metadata(rast)).*, + (ST_BandMetadata(rast, 1)).*, + ST_Value(rast, 1, 1, 1) AS firstvalue, + ST_Value(rast, 1, ST_Width(rast), ST_Height(rast)) AS lastvalue + FROM raster_intersection_out +) AS r; + +-- Display the pixels and the values of the resulting rasters +SELECT rid1, rid2, band, (gvxy).x, (gvxy).y, (gvxy).val, ST_AsText((gvxy).geom) geom +FROM (SELECT rid1, rid2, band, ST_PixelAsPolygons(rast, band) gvxy + FROM raster_intersection_out, generate_series(1, 2) band +) foo; + +DROP TABLE IF EXISTS raster_intersection; +DROP TABLE IF EXISTS raster_intersection_out; diff -Nru postgis-1.5.3/raster/test/regress/rt_intersection_expected postgis-2.0.1/raster/test/regress/rt_intersection_expected --- postgis-1.5.3/raster/test/regress/rt_intersection_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_intersection_expected 2012-03-13 16:13:48.000000000 +0000 @@ -0,0 +1,168 @@ +0|1|0.000|0.000|2|2|1.000|1.000|0.000|0.000|0|2|8BUI|0.000|1.000|1.000 +0|2|1.000|-1.000|1|2|1.000|1.000|0.000|0.000|0|2|8BUI|0.000|1.000|1.000 +0|3|1.000|1.000|1|1|1.000|1.000|0.000|0.000|0|2|8BUI|0.000|1.000|1.000 +0|4|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +10|11|-0.900|-0.900|3|3|1.000|1.000|0.100|0.100|0|2|8BUI|0.000|1.000|1.000 +10|12|-1.900|-1.000|2|2|1.000|1.000|0.100|0.100|0|2|8BUI|0.000|1.000|1.000 +10|13|0.000|-1.800|2|2|1.000|1.000|0.100|0.100|0|2|8BUI|0.000|1.000|1.000 +10|14|||||||||||||| +0|1|0.000|0.000|2|2|1.000|1.000|0.000|0.000|0|1|8BUI|0.000|1.000|1.000 +0|2|1.000|-1.000|1|2|1.000|1.000|0.000|0.000|0|1|8BUI|0.000|1.000|1.000 +0|3|1.000|1.000|1|1|1.000|1.000|0.000|0.000|0|1|8BUI|0.000|1.000|1.000 +0|4|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +10|11|-0.900|-0.900|3|3|1.000|1.000|0.100|0.100|0|1|8BUI|0.000|1.000|1.000 +10|12|-1.900|-1.000|2|2|1.000|1.000|0.100|0.100|0|1|8BUI|0.000|1.000|1.000 +10|13|0.000|-1.800|2|2|1.000|1.000|0.100|0.100|0|1|8BUI|0.000|1.000|1.000 +10|14|||||||||||||| +0|1|0.000|0.000|2|2|1.000|1.000|0.000|0.000|0|1|8BUI|0.000|2.000|2.000 +0|2|1.000|-1.000|1|2|1.000|1.000|0.000|0.000|0|1|8BUI|0.000|3.000|3.000 +0|3|1.000|1.000|1|1|1.000|1.000|0.000|0.000|0|1|8BUI|0.000|4.000|4.000 +0|4|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +10|11|-0.900|-0.900|3|3|1.000|1.000|0.100|0.100|0|1|8BUI|0.000|2.000|2.000 +10|12|-1.900|-1.000|2|2|1.000|1.000|0.100|0.100|0|1|8BUI|0.000|3.000|3.000 +10|13|0.000|-1.800|2|2|1.000|1.000|0.100|0.100|0|1|8BUI|0.000|4.000|4.000 +10|14|||||||||||||| +0|1|1|1|1|1|POLYGON((0 0,1 0,1 1,0 1,0 0)) +0|1|1|1|2|1|POLYGON((0 1,1 1,1 2,0 2,0 1)) +0|1|1|2|1|1|POLYGON((1 0,2 0,2 1,1 1,1 0)) +0|1|1|2|2|1|POLYGON((1 1,2 1,2 2,1 2,1 1)) +0|2|1|1|1|1|POLYGON((1 -1,2 -1,2 0,1 0,1 -1)) +0|2|1|1|2|1|POLYGON((1 0,2 0,2 1,1 1,1 0)) +0|3|1|1|1|1|POLYGON((1 1,2 1,2 2,1 2,1 1)) +10|11|1|1|1|1|POLYGON((-0.9 -0.9,0.1 -0.8,0.2 0.2,-0.8 0.1,-0.9 -0.9)) +10|11|1|1|2|1|POLYGON((-0.8 0.1,0.2 0.2,0.3 1.2,-0.7 1.1,-0.8 0.1)) +10|11|1|1|3|1|POLYGON((-0.7 1.1,0.3 1.2,0.4 2.2,-0.6 2.1,-0.7 1.1)) +10|11|1|2|1|1|POLYGON((0.1 -0.8,1.1 -0.7,1.2 0.3,0.2 0.2,0.1 -0.8)) +10|11|1|2|2|1|POLYGON((0.2 0.2,1.2 0.3,1.3 1.3,0.3 1.2,0.2 0.2)) +10|11|1|2|3|1|POLYGON((0.3 1.2,1.3 1.3,1.4 2.3,0.4 2.2,0.3 1.2)) +10|11|1|3|1|1|POLYGON((1.1 -0.7,2.1 -0.6,2.2 0.4,1.2 0.3,1.1 -0.7)) +10|11|1|3|2|1|POLYGON((1.2 0.3,2.2 0.4,2.3 1.4,1.3 1.3,1.2 0.3)) +10|11|1|3|3|1|POLYGON((1.3 1.3,2.3 1.4,2.4 2.4,1.4 2.3,1.3 1.3)) +10|12|1|1|1|1|POLYGON((-1.9 -1,-0.9 -0.9,-0.8 0.1,-1.8 0,-1.9 -1)) +10|12|1|1|2|1|POLYGON((-1.8 0,-0.8 0.1,-0.7 1.1,-1.7 1,-1.8 0)) +10|12|1|2|1|1|POLYGON((-0.9 -0.9,0.1 -0.8,0.2 0.2,-0.8 0.1,-0.9 -0.9)) +10|12|1|2|2|1|POLYGON((-0.8 0.1,0.2 0.2,0.3 1.2,-0.7 1.1,-0.8 0.1)) +10|13|1|1|1|1|POLYGON((0 -1.8,1 -1.7,1.1 -0.7,0.1 -0.8,0 -1.8)) +10|13|1|1|2|1|POLYGON((0.1 -0.8,1.1 -0.7,1.2 0.3,0.2 0.2,0.1 -0.8)) +10|13|1|2|1|1|POLYGON((1 -1.7,2 -1.6,2.1 -0.6,1.1 -0.7,1 -1.7)) +10|13|1|2|2|1|POLYGON((1.1 -0.7,2.1 -0.6,2.2 0.4,1.2 0.3,1.1 -0.7)) +0|1|1|1|1|1|POLYGON((0 0,1 0,1 1,0 1,0 0)) +0|1|1|1|2|1|POLYGON((0 1,1 1,1 2,0 2,0 1)) +0|1|1|2|1|1|POLYGON((1 0,2 0,2 1,1 1,1 0)) +0|1|1|2|2|1|POLYGON((1 1,2 1,2 2,1 2,1 1)) +0|2|1|1|1|1|POLYGON((1 -1,2 -1,2 0,1 0,1 -1)) +0|2|1|1|2|1|POLYGON((1 0,2 0,2 1,1 1,1 0)) +0|3|1|1|1|1|POLYGON((1 1,2 1,2 2,1 2,1 1)) +10|11|1|1|1|1|POLYGON((-0.9 -0.9,0.1 -0.8,0.2 0.2,-0.8 0.1,-0.9 -0.9)) +10|11|1|1|2|1|POLYGON((-0.8 0.1,0.2 0.2,0.3 1.2,-0.7 1.1,-0.8 0.1)) +10|11|1|1|3|1|POLYGON((-0.7 1.1,0.3 1.2,0.4 2.2,-0.6 2.1,-0.7 1.1)) +10|11|1|2|1|1|POLYGON((0.1 -0.8,1.1 -0.7,1.2 0.3,0.2 0.2,0.1 -0.8)) +10|11|1|2|2|1|POLYGON((0.2 0.2,1.2 0.3,1.3 1.3,0.3 1.2,0.2 0.2)) +10|11|1|2|3|1|POLYGON((0.3 1.2,1.3 1.3,1.4 2.3,0.4 2.2,0.3 1.2)) +10|11|1|3|1|1|POLYGON((1.1 -0.7,2.1 -0.6,2.2 0.4,1.2 0.3,1.1 -0.7)) +10|11|1|3|2|1|POLYGON((1.2 0.3,2.2 0.4,2.3 1.4,1.3 1.3,1.2 0.3)) +10|11|1|3|3|1|POLYGON((1.3 1.3,2.3 1.4,2.4 2.4,1.4 2.3,1.3 1.3)) +10|12|1|1|1|1|POLYGON((-1.9 -1,-0.9 -0.9,-0.8 0.1,-1.8 0,-1.9 -1)) +10|12|1|1|2|1|POLYGON((-1.8 0,-0.8 0.1,-0.7 1.1,-1.7 1,-1.8 0)) +10|12|1|2|1|1|POLYGON((-0.9 -0.9,0.1 -0.8,0.2 0.2,-0.8 0.1,-0.9 -0.9)) +10|12|1|2|2|1|POLYGON((-0.8 0.1,0.2 0.2,0.3 1.2,-0.7 1.1,-0.8 0.1)) +10|13|1|1|1|1|POLYGON((0 -1.8,1 -1.7,1.1 -0.7,0.1 -0.8,0 -1.8)) +10|13|1|1|2|1|POLYGON((0.1 -0.8,1.1 -0.7,1.2 0.3,0.2 0.2,0.1 -0.8)) +10|13|1|2|1|1|POLYGON((1 -1.7,2 -1.6,2.1 -0.6,1.1 -0.7,1 -1.7)) +10|13|1|2|2|1|POLYGON((1.1 -0.7,2.1 -0.6,2.2 0.4,1.2 0.3,1.1 -0.7)) +0|1|1|1|1|2|POLYGON((0 0,1 0,1 1,0 1,0 0)) +0|1|1|1|2|2|POLYGON((0 1,1 1,1 2,0 2,0 1)) +0|1|1|2|1|2|POLYGON((1 0,2 0,2 1,1 1,1 0)) +0|1|1|2|2|2|POLYGON((1 1,2 1,2 2,1 2,1 1)) +0|2|1|1|1|3|POLYGON((1 -1,2 -1,2 0,1 0,1 -1)) +0|2|1|1|2|3|POLYGON((1 0,2 0,2 1,1 1,1 0)) +0|3|1|1|1|4|POLYGON((1 1,2 1,2 2,1 2,1 1)) +10|11|1|1|1|2|POLYGON((-0.9 -0.9,0.1 -0.8,0.2 0.2,-0.8 0.1,-0.9 -0.9)) +10|11|1|1|2|2|POLYGON((-0.8 0.1,0.2 0.2,0.3 1.2,-0.7 1.1,-0.8 0.1)) +10|11|1|1|3|2|POLYGON((-0.7 1.1,0.3 1.2,0.4 2.2,-0.6 2.1,-0.7 1.1)) +10|11|1|2|1|2|POLYGON((0.1 -0.8,1.1 -0.7,1.2 0.3,0.2 0.2,0.1 -0.8)) +10|11|1|2|2|2|POLYGON((0.2 0.2,1.2 0.3,1.3 1.3,0.3 1.2,0.2 0.2)) +10|11|1|2|3|2|POLYGON((0.3 1.2,1.3 1.3,1.4 2.3,0.4 2.2,0.3 1.2)) +10|11|1|3|1|2|POLYGON((1.1 -0.7,2.1 -0.6,2.2 0.4,1.2 0.3,1.1 -0.7)) +10|11|1|3|2|2|POLYGON((1.2 0.3,2.2 0.4,2.3 1.4,1.3 1.3,1.2 0.3)) +10|11|1|3|3|2|POLYGON((1.3 1.3,2.3 1.4,2.4 2.4,1.4 2.3,1.3 1.3)) +10|12|1|1|1|3|POLYGON((-1.9 -1,-0.9 -0.9,-0.8 0.1,-1.8 0,-1.9 -1)) +10|12|1|1|2|3|POLYGON((-1.8 0,-0.8 0.1,-0.7 1.1,-1.7 1,-1.8 0)) +10|12|1|2|1|3|POLYGON((-0.9 -0.9,0.1 -0.8,0.2 0.2,-0.8 0.1,-0.9 -0.9)) +10|12|1|2|2|3|POLYGON((-0.8 0.1,0.2 0.2,0.3 1.2,-0.7 1.1,-0.8 0.1)) +10|13|1|1|1|4|POLYGON((0 -1.8,1 -1.7,1.1 -0.7,0.1 -0.8,0 -1.8)) +10|13|1|1|2|4|POLYGON((0.1 -0.8,1.1 -0.7,1.2 0.3,0.2 0.2,0.1 -0.8)) +10|13|1|2|1|4|POLYGON((1 -1.7,2 -1.6,2.1 -0.6,1.1 -0.7,1 -1.7)) +10|13|1|2|2|4|POLYGON((1.1 -0.7,2.1 -0.6,2.2 0.4,1.2 0.3,1.1 -0.7)) +0|1|2|1|1|2|POLYGON((0 0,1 0,1 1,0 1,0 0)) +0|1|2|1|2|2|POLYGON((0 1,1 1,1 2,0 2,0 1)) +0|1|2|2|1|2|POLYGON((1 0,2 0,2 1,1 1,1 0)) +0|1|2|2|2|2|POLYGON((1 1,2 1,2 2,1 2,1 1)) +0|2|2|1|1|3|POLYGON((1 -1,2 -1,2 0,1 0,1 -1)) +0|2|2|1|2|3|POLYGON((1 0,2 0,2 1,1 1,1 0)) +0|3|2|1|1|4|POLYGON((1 1,2 1,2 2,1 2,1 1)) +10|11|2|1|1|2|POLYGON((-0.9 -0.9,0.1 -0.8,0.2 0.2,-0.8 0.1,-0.9 -0.9)) +10|11|2|1|2|2|POLYGON((-0.8 0.1,0.2 0.2,0.3 1.2,-0.7 1.1,-0.8 0.1)) +10|11|2|1|3|2|POLYGON((-0.7 1.1,0.3 1.2,0.4 2.2,-0.6 2.1,-0.7 1.1)) +10|11|2|2|1|2|POLYGON((0.1 -0.8,1.1 -0.7,1.2 0.3,0.2 0.2,0.1 -0.8)) +10|11|2|2|2|2|POLYGON((0.2 0.2,1.2 0.3,1.3 1.3,0.3 1.2,0.2 0.2)) +10|11|2|2|3|2|POLYGON((0.3 1.2,1.3 1.3,1.4 2.3,0.4 2.2,0.3 1.2)) +10|11|2|3|1|2|POLYGON((1.1 -0.7,2.1 -0.6,2.2 0.4,1.2 0.3,1.1 -0.7)) +10|11|2|3|2|2|POLYGON((1.2 0.3,2.2 0.4,2.3 1.4,1.3 1.3,1.2 0.3)) +10|11|2|3|3|2|POLYGON((1.3 1.3,2.3 1.4,2.4 2.4,1.4 2.3,1.3 1.3)) +10|12|2|1|1|3|POLYGON((-1.9 -1,-0.9 -0.9,-0.8 0.1,-1.8 0,-1.9 -1)) +10|12|2|1|2|3|POLYGON((-1.8 0,-0.8 0.1,-0.7 1.1,-1.7 1,-1.8 0)) +10|12|2|2|1|3|POLYGON((-0.9 -0.9,0.1 -0.8,0.2 0.2,-0.8 0.1,-0.9 -0.9)) +10|12|2|2|2|3|POLYGON((-0.8 0.1,0.2 0.2,0.3 1.2,-0.7 1.1,-0.8 0.1)) +10|13|2|1|1|4|POLYGON((0 -1.8,1 -1.7,1.1 -0.7,0.1 -0.8,0 -1.8)) +10|13|2|1|2|4|POLYGON((0.1 -0.8,1.1 -0.7,1.2 0.3,0.2 0.2,0.1 -0.8)) +10|13|2|2|1|4|POLYGON((1 -1.7,2 -1.6,2.1 -0.6,1.1 -0.7,1 -1.7)) +10|13|2|2|2|4|POLYGON((1.1 -0.7,2.1 -0.6,2.2 0.4,1.2 0.3,1.1 -0.7)) +0|1|2|1|1||POLYGON((0 0,1 0,1 1,0 1,0 0)) +0|1|2|1|2||POLYGON((0 1,1 1,1 2,0 2,0 1)) +0|1|2|2|1||POLYGON((1 0,2 0,2 1,1 1,1 0)) +0|1|2|2|2||POLYGON((1 1,2 1,2 2,1 2,1 1)) +0|2|2|1|1||POLYGON((1 -1,2 -1,2 0,1 0,1 -1)) +0|2|2|1|2||POLYGON((1 0,2 0,2 1,1 1,1 0)) +0|3|2|1|1||POLYGON((1 1,2 1,2 2,1 2,1 1)) +10|11|2|1|1||POLYGON((-0.9 -0.9,0.1 -0.8,0.2 0.2,-0.8 0.1,-0.9 -0.9)) +10|11|2|1|2||POLYGON((-0.8 0.1,0.2 0.2,0.3 1.2,-0.7 1.1,-0.8 0.1)) +10|11|2|1|3||POLYGON((-0.7 1.1,0.3 1.2,0.4 2.2,-0.6 2.1,-0.7 1.1)) +10|11|2|2|1||POLYGON((0.1 -0.8,1.1 -0.7,1.2 0.3,0.2 0.2,0.1 -0.8)) +10|11|2|2|2||POLYGON((0.2 0.2,1.2 0.3,1.3 1.3,0.3 1.2,0.2 0.2)) +10|11|2|2|3||POLYGON((0.3 1.2,1.3 1.3,1.4 2.3,0.4 2.2,0.3 1.2)) +10|11|2|3|1||POLYGON((1.1 -0.7,2.1 -0.6,2.2 0.4,1.2 0.3,1.1 -0.7)) +10|11|2|3|2||POLYGON((1.2 0.3,2.2 0.4,2.3 1.4,1.3 1.3,1.2 0.3)) +10|11|2|3|3||POLYGON((1.3 1.3,2.3 1.4,2.4 2.4,1.4 2.3,1.3 1.3)) +10|12|2|1|1||POLYGON((-1.9 -1,-0.9 -0.9,-0.8 0.1,-1.8 0,-1.9 -1)) +10|12|2|1|2||POLYGON((-1.8 0,-0.8 0.1,-0.7 1.1,-1.7 1,-1.8 0)) +10|12|2|2|1||POLYGON((-0.9 -0.9,0.1 -0.8,0.2 0.2,-0.8 0.1,-0.9 -0.9)) +10|12|2|2|2||POLYGON((-0.8 0.1,0.2 0.2,0.3 1.2,-0.7 1.1,-0.8 0.1)) +10|13|2|1|1||POLYGON((0 -1.8,1 -1.7,1.1 -0.7,0.1 -0.8,0 -1.8)) +10|13|2|1|2||POLYGON((0.1 -0.8,1.1 -0.7,1.2 0.3,0.2 0.2,0.1 -0.8)) +10|13|2|2|1||POLYGON((1 -1.7,2 -1.6,2.1 -0.6,1.1 -0.7,1 -1.7)) +10|13|2|2|2||POLYGON((1.1 -0.7,2.1 -0.6,2.2 0.4,1.2 0.3,1.1 -0.7)) +0|1|2|1|1||POLYGON((0 0,1 0,1 1,0 1,0 0)) +0|1|2|1|2||POLYGON((0 1,1 1,1 2,0 2,0 1)) +0|1|2|2|1||POLYGON((1 0,2 0,2 1,1 1,1 0)) +0|1|2|2|2||POLYGON((1 1,2 1,2 2,1 2,1 1)) +0|2|2|1|1||POLYGON((1 -1,2 -1,2 0,1 0,1 -1)) +0|2|2|1|2||POLYGON((1 0,2 0,2 1,1 1,1 0)) +0|3|2|1|1||POLYGON((1 1,2 1,2 2,1 2,1 1)) +10|11|2|1|1||POLYGON((-0.9 -0.9,0.1 -0.8,0.2 0.2,-0.8 0.1,-0.9 -0.9)) +10|11|2|1|2||POLYGON((-0.8 0.1,0.2 0.2,0.3 1.2,-0.7 1.1,-0.8 0.1)) +10|11|2|1|3||POLYGON((-0.7 1.1,0.3 1.2,0.4 2.2,-0.6 2.1,-0.7 1.1)) +10|11|2|2|1||POLYGON((0.1 -0.8,1.1 -0.7,1.2 0.3,0.2 0.2,0.1 -0.8)) +10|11|2|2|2||POLYGON((0.2 0.2,1.2 0.3,1.3 1.3,0.3 1.2,0.2 0.2)) +10|11|2|2|3||POLYGON((0.3 1.2,1.3 1.3,1.4 2.3,0.4 2.2,0.3 1.2)) +10|11|2|3|1||POLYGON((1.1 -0.7,2.1 -0.6,2.2 0.4,1.2 0.3,1.1 -0.7)) +10|11|2|3|2||POLYGON((1.2 0.3,2.2 0.4,2.3 1.4,1.3 1.3,1.2 0.3)) +10|11|2|3|3||POLYGON((1.3 1.3,2.3 1.4,2.4 2.4,1.4 2.3,1.3 1.3)) +10|12|2|1|1||POLYGON((-1.9 -1,-0.9 -0.9,-0.8 0.1,-1.8 0,-1.9 -1)) +10|12|2|1|2||POLYGON((-1.8 0,-0.8 0.1,-0.7 1.1,-1.7 1,-1.8 0)) +10|12|2|2|1||POLYGON((-0.9 -0.9,0.1 -0.8,0.2 0.2,-0.8 0.1,-0.9 -0.9)) +10|12|2|2|2||POLYGON((-0.8 0.1,0.2 0.2,0.3 1.2,-0.7 1.1,-0.8 0.1)) +10|13|2|1|1||POLYGON((0 -1.8,1 -1.7,1.1 -0.7,0.1 -0.8,0 -1.8)) +10|13|2|1|2||POLYGON((0.1 -0.8,1.1 -0.7,1.2 0.3,0.2 0.2,0.1 -0.8)) +10|13|2|2|1||POLYGON((1 -1.7,2 -1.6,2.1 -0.6,1.1 -0.7,1 -1.7)) +10|13|2|2|2||POLYGON((1.1 -0.7,2.1 -0.6,2.2 0.4,1.2 0.3,1.1 -0.7)) diff -Nru postgis-1.5.3/raster/test/regress/rt_intersects.sql postgis-2.0.1/raster/test/regress/rt_intersects.sql --- postgis-1.5.3/raster/test/regress/rt_intersects.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_intersects.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,444 @@ +DROP TABLE IF EXISTS raster_intersects_rast; +DROP TABLE IF EXISTS raster_intersects_geom; +CREATE TABLE raster_intersects_rast ( + rid integer, + rast raster +); +CREATE TABLE raster_intersects_geom ( + gid integer, + geom geometry +); +CREATE OR REPLACE FUNCTION make_test_raster(rid integer, width integer DEFAULT 2, height integer DEFAULT 2, ul_x double precision DEFAULT 0, ul_y double precision DEFAULT 0, skew_x double precision DEFAULT 0, skew_y double precision DEFAULT 0) + RETURNS void + AS $$ + DECLARE + x int; + y int; + rast raster; + BEGIN + rast := ST_MakeEmptyRaster(width, height, ul_x, ul_y, 1, 1, skew_x, skew_y, 994326); + rast := ST_AddBand(rast, 1, '8BUI', 1, 0); + + + INSERT INTO raster_intersects_rast VALUES (rid, rast); + + RETURN; + END; + $$ LANGUAGE 'plpgsql'; +SELECT make_test_raster(0, 2, 2, -1, -1); +SELECT make_test_raster(1, 2, 2); +SELECT make_test_raster(2, 3, 3); +DROP FUNCTION make_test_raster(integer, integer, integer, double precision, double precision, double precision, double precision); + +INSERT into spatial_ref_sys (srid, auth_name, auth_srid, proj4text, srtext) values (994326, 'epsg', 4326, '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs ', '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"]]'); + +INSERT INTO raster_intersects_rast VALUES (10, ( + SELECT + ST_SetValue(rast, 1, 1, 1, 0) + FROM raster_intersects_rast + WHERE rid = 1 +)); +INSERT INTO raster_intersects_rast VALUES (11, ( + SELECT + ST_SetValue(rast, 1, 2, 1, 0) + FROM raster_intersects_rast + WHERE rid = 1 +)); +INSERT INTO raster_intersects_rast VALUES (12, ( + SELECT + ST_SetValue( + ST_SetValue( + ST_SetValue(rast, 1, 1, 1, 0), + 1, 2, 1, 0 + ), + 1, 1, 2, 0 + ) + FROM raster_intersects_rast + WHERE rid = 1 +)); +INSERT INTO raster_intersects_rast VALUES (13, ( + SELECT + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_SetValue(rast, 1, 1, 1, 0), + 1, 2, 1, 0 + ), + 1, 1, 2, 0 + ), + 1, 2, 2, 0 + ) + FROM raster_intersects_rast + WHERE rid = 1 +)); +INSERT INTO raster_intersects_rast VALUES (14, ( + SELECT + ST_SetUpperLeft(rast, 2, 0) + FROM raster_intersects_rast + WHERE rid = 1 +)); +INSERT INTO raster_intersects_rast VALUES (15, ( + SELECT + ST_SetScale( + ST_SetUpperLeft(rast, 0.1, 0.1), + 0.4, 0.4 + ) + FROM raster_intersects_rast + WHERE rid = 1 +)); +INSERT INTO raster_intersects_rast VALUES (16, ( + SELECT + ST_SetScale( + ST_SetUpperLeft(rast, -0.1, 0.1), + 0.4, 0.4 + ) + FROM raster_intersects_rast + WHERE rid = 1 +)); + +INSERT INTO raster_intersects_rast VALUES (20, ( + SELECT + ST_SetUpperLeft(rast, -2, -2) + FROM raster_intersects_rast + WHERE rid = 2 +)); +INSERT INTO raster_intersects_rast VALUES (21, ( + SELECT + ST_SetValue( + ST_SetValue( + ST_SetValue(rast, 1, 1, 1, 0), + 1, 2, 2, 0 + ), + 1, 3, 3, 0 + ) + FROM raster_intersects_rast + WHERE rid = 20 +)); +INSERT INTO raster_intersects_rast VALUES (22, ( + SELECT + ST_SetValue( + ST_SetValue( + rast, 1, 3, 2, 0 + ), + 1, 2, 3, 0 + ) + FROM raster_intersects_rast + WHERE rid = 21 +)); +INSERT INTO raster_intersects_rast VALUES (23, ( + SELECT + ST_SetValue( + ST_SetValue( + rast, 1, 3, 1, 0 + ), + 1, 1, 3, 0 + ) + FROM raster_intersects_rast + WHERE rid = 22 +)); + +INSERT INTO raster_intersects_rast VALUES (30, ( + SELECT + ST_SetSkew(rast, -0.5, 0.5) + FROM raster_intersects_rast + WHERE rid = 2 +)); +INSERT INTO raster_intersects_rast VALUES (31, ( + SELECT + ST_SetSkew(rast, -1, 1) + FROM raster_intersects_rast + WHERE rid = 2 +)); +INSERT INTO raster_intersects_rast VALUES (32, ( + SELECT + ST_SetSkew(rast, 1, -1) + FROM raster_intersects_rast + WHERE rid = 2 +)); + +SELECT + '1.1', + r1.rid, + r2.rid, + ST_Intersects(r1.rast, NULL, r2.rast, NULL) +FROM raster_intersects_rast r1 +JOIN raster_intersects_rast r2 + ON r1.rid != r2.rid +WHERE r1.rid = 0; + +SELECT + '1.2', + r1.rid, + r2.rid, + ST_Intersects(r1.rast, 1, r2.rast, 1) +FROM raster_intersects_rast r1 +JOIN raster_intersects_rast r2 + ON r1.rid != r2.rid +WHERE r1.rid = 0; + +-- point +INSERT INTO raster_intersects_geom VALUES ( + 1, ( + SELECT ST_SetSRID(ST_MakePoint(0, 0), 994326) + ) +), ( + 2, ( + SELECT ST_SetSRID(ST_MakePoint(0.1, 0.1), 994326) + ) +), ( + 3, ( + SELECT ST_SetSRID(ST_MakePoint(-0.1, -0.1), 994326) + ) +), ( + 4, ( + SELECT ST_SetSRID(ST_MakePoint(-1, -1), 994326) + ) +), ( + 5, ( + SELECT ST_SetSRID(ST_MakePoint(-1.1, -1), 994326) + ) +), ( + 6, ( + SELECT ST_SetSRID(ST_MakePoint(-1, -1.1), 994326) + ) +), ( + 7, ( + SELECT ST_SetSRID(ST_MakePoint(-1.5, -1.5), 994326) + ) +), ( + 8, ( + SELECT ST_SetSRID(ST_MakePoint(3, 3), 994326) + ) +); + +-- multipoint +INSERT INTO raster_intersects_geom VALUES ( + 11, ( + SELECT ST_Collect(geom) FROM raster_intersects_geom WHERE gid BETWEEN 1 AND 10 + ) +), ( + 12, ( + SELECT ST_Collect(geom) FROM raster_intersects_geom WHERE gid BETWEEN 3 AND 10 + ) +), ( + 13, ( + SELECT ST_Collect(geom) FROM raster_intersects_geom WHERE gid BETWEEN 4 AND 10 + ) +), ( + 14, ( + SELECT ST_Collect(geom) FROM raster_intersects_geom WHERE gid BETWEEN 5 AND 10 + ) +), ( + 15, ( + SELECT ST_Collect(geom) FROM raster_intersects_geom WHERE gid BETWEEN 6 AND 10 + ) +); + +-- linestring +INSERT INTO raster_intersects_geom VALUES ( + 21, ( + SELECT ST_SetSRID(ST_MakeLine(ARRAY[ + ST_MakePoint(1, 1), + ST_MakePoint(1, 0) + ]), 994326) + ) +), ( + 22, ( + SELECT ST_SetSRID(ST_MakeLine(ARRAY[ + ST_MakePoint(-1, -1), + ST_MakePoint(1, 1), + ST_MakePoint(1, 0) + ]), 994326) + ) +), ( + 23, ( + SELECT ST_SetSRID(ST_MakeLine(ARRAY[ + ST_MakePoint(-1, -1), + ST_MakePoint(-1, 1), + ST_MakePoint(1, 1), + ST_MakePoint(1, -1) + ]), 994326) + ) +), ( + 24, ( + SELECT ST_SetSRID(ST_MakeLine(ARRAY[ + ST_MakePoint(-1.1, 1.1), + ST_MakePoint(1.1, 1.1), + ST_MakePoint(1.1, -1.1), + ST_MakePoint(-1.1, -1.1), + ST_MakePoint(-1.1, 1.1) + ]), 994326) + ) +), ( + 25, ( + SELECT ST_SetSRID(ST_MakeLine(ARRAY[ + ST_MakePoint(-2, 1), + ST_MakePoint(1, 2), + ST_MakePoint(2, -1), + ST_MakePoint(-1, -2), + ST_MakePoint(-2, 1) + ]), 994326) + ) +), ( + 26, ( + SELECT ST_SetSRID(ST_MakeLine(ARRAY[ + ST_MakePoint(-0.5, 0.5), + ST_MakePoint(0, 0.5), + ST_MakePoint(0, 0), + ST_MakePoint(0, -0.5), + ST_MakePoint(-0.5, 0.5) + ]), 994326) + ) +), ( + 27, ( + SELECT ST_SetSRID(ST_MakeLine(ARRAY[ + ST_MakePoint(0.5, 0.5), + ST_MakePoint(1, 1), + ST_MakePoint(1, 0), + ST_MakePoint(0.5, 0.5) + ]), 994326) + ) +), ( + 28, ( + SELECT ST_SetSRID(ST_MakeLine(ARRAY[ + ST_MakePoint(1, 1), + ST_MakePoint(0, 2), + ST_MakePoint(1, 2), + ST_MakePoint(1, 1) + ]), 994326) + ) +), ( + 29, ( + SELECT ST_SetSRID(ST_MakeLine(ARRAY[ + ST_MakePoint(0, 2), + ST_MakePoint(1, 2), + ST_MakePoint(1, 4), + ST_MakePoint(0, 2) + ]), 994326) + ) +); + +-- polygon +INSERT INTO raster_intersects_geom VALUES ( + 31, ( + SELECT ST_MakePolygon(geom) FROM raster_intersects_geom WHERE gid = 24 + ) +), ( + 32, ( + SELECT ST_MakePolygon(geom) FROM raster_intersects_geom WHERE gid = 25 + ) +), ( + 33, ( + SELECT ST_MakePolygon(geom) FROM raster_intersects_geom WHERE gid = 26 + ) +), ( + 34, ( + SELECT ST_MakePolygon(geom) FROM raster_intersects_geom WHERE gid = 27 + ) +), ( + 35, ( + SELECT ST_MakePolygon(geom) FROM raster_intersects_geom WHERE gid = 28 + ) +), ( + 36, ( + SELECT ST_MakePolygon(geom) FROM raster_intersects_geom WHERE gid = 29 + ) +); + +-- multipolygon +INSERT INTO raster_intersects_geom VALUES ( + 41, ( + SELECT ST_Collect(geom) FROM raster_intersects_geom WHERE gid BETWEEN 31 and 40 + ) +), ( + 42, ( + SELECT ST_Collect(geom) FROM raster_intersects_geom WHERE gid BETWEEN 32 and 40 + ) +), ( + 43, ( + SELECT ST_Collect(geom) FROM raster_intersects_geom WHERE gid BETWEEN 33 and 40 + ) +), ( + 44, ( + SELECT ST_Collect(geom) FROM raster_intersects_geom WHERE gid BETWEEN 34 and 40 + ) +), ( + 45, ( + SELECT ST_Collect(geom) FROM raster_intersects_geom WHERE gid BETWEEN 35 and 40 + ) +), ( + 46, ( + SELECT ST_Collect(geom) FROM raster_intersects_geom WHERE gid BETWEEN 36 and 40 + ) +); + +SELECT + '2.1', + r1.rid, + g1.gid, + ST_GeometryType(g1.geom), + ST_Intersects(r1.rast, g1.geom) +FROM raster_intersects_rast r1 +JOIN raster_intersects_geom g1 + ON 1 = 1 +WHERE r1.rid = 0; + +SELECT + '2.2', + r1.rid, + g1.gid, + ST_GeometryType(g1.geom), + ST_Intersects(g1.geom, r1.rast) +FROM raster_intersects_rast r1 +JOIN raster_intersects_geom g1 + ON 1 = 1 +WHERE r1.rid = 0; + +SELECT + '2.3', + r1.rid, + g1.gid, + ST_GeometryType(g1.geom), + ST_Intersects(r1.rast, g1.geom) +FROM raster_intersects_rast r1 +JOIN raster_intersects_geom g1 + ON 1 = 1 +WHERE r1.rid = 2; + +SELECT + '2.4', + r1.rid, + g1.gid, + ST_GeometryType(g1.geom), + ST_Intersects(g1.geom, r1.rast) +FROM raster_intersects_rast r1 +JOIN raster_intersects_geom g1 + ON 1 = 1 +WHERE r1.rid = 2; + +SELECT + '2.5', + r1.rid, + g1.gid, + ST_GeometryType(g1.geom), + ST_Intersects(r1.rast, g1.geom, 1) +FROM raster_intersects_rast r1 +JOIN raster_intersects_geom g1 + ON 1 = 1 +WHERE r1.rid = 0; + +SELECT + '2.6', + r1.rid, + g1.gid, + ST_GeometryType(g1.geom), + ST_Intersects(r1.rast, g1.geom, 1) +FROM raster_intersects_rast r1 +JOIN raster_intersects_geom g1 + ON 1 = 1 +WHERE r1.rid = 2; + +DELETE FROM spatial_ref_sys WHERE srid = 994326; + +DROP TABLE IF EXISTS raster_intersects_rast; +DROP TABLE IF EXISTS raster_intersects_geom; diff -Nru postgis-1.5.3/raster/test/regress/rt_intersects_expected postgis-2.0.1/raster/test/regress/rt_intersects_expected --- postgis-1.5.3/raster/test/regress/rt_intersects_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_intersects_expected 2012-03-01 22:17:28.000000000 +0000 @@ -0,0 +1,238 @@ +NOTICE: table "raster_intersects_rast" does not exist, skipping +NOTICE: table "raster_intersects_geom" does not exist, skipping +1.1|0|1|t +1.1|0|2|t +1.1|0|10|t +1.1|0|11|t +1.1|0|12|t +1.1|0|13|t +1.1|0|14|f +1.1|0|15|t +1.1|0|16|t +1.1|0|20|t +1.1|0|21|t +1.1|0|22|t +1.1|0|23|t +1.1|0|30|t +1.1|0|31|t +1.1|0|32|t +1.2|0|1|t +1.2|0|2|t +1.2|0|10|t +1.2|0|11|t +1.2|0|12|t +1.2|0|13|f +1.2|0|14|f +1.2|0|15|t +1.2|0|16|t +1.2|0|20|t +1.2|0|21|t +1.2|0|22|t +1.2|0|23|t +1.2|0|30|t +1.2|0|31|t +1.2|0|32|t +2.1|0|1|ST_Point|t +2.1|0|2|ST_Point|t +2.1|0|3|ST_Point|t +2.1|0|4|ST_Point|t +2.1|0|5|ST_Point|f +2.1|0|6|ST_Point|f +2.1|0|7|ST_Point|f +2.1|0|8|ST_Point|f +2.1|0|11|ST_MultiPoint|t +2.1|0|12|ST_MultiPoint|t +2.1|0|13|ST_MultiPoint|t +2.1|0|14|ST_MultiPoint|f +2.1|0|15|ST_MultiPoint|f +2.1|0|21|ST_LineString|t +2.1|0|22|ST_LineString|t +2.1|0|23|ST_LineString|t +2.1|0|24|ST_LineString|f +2.1|0|25|ST_LineString|f +2.1|0|26|ST_LineString|t +2.1|0|27|ST_LineString|t +2.1|0|28|ST_LineString|t +2.1|0|29|ST_LineString|f +2.1|0|31|ST_Polygon|t +2.1|0|32|ST_Polygon|t +2.1|0|33|ST_Polygon|t +2.1|0|34|ST_Polygon|t +2.1|0|35|ST_Polygon|t +2.1|0|36|ST_Polygon|f +2.1|0|41|ST_MultiPolygon|t +2.1|0|42|ST_MultiPolygon|t +2.1|0|43|ST_MultiPolygon|t +2.1|0|44|ST_MultiPolygon|t +2.1|0|45|ST_MultiPolygon|t +2.1|0|46|ST_MultiPolygon|f +2.2|0|1|ST_Point|t +2.2|0|2|ST_Point|t +2.2|0|3|ST_Point|t +2.2|0|4|ST_Point|t +2.2|0|5|ST_Point|f +2.2|0|6|ST_Point|f +2.2|0|7|ST_Point|f +2.2|0|8|ST_Point|f +2.2|0|11|ST_MultiPoint|t +2.2|0|12|ST_MultiPoint|t +2.2|0|13|ST_MultiPoint|t +2.2|0|14|ST_MultiPoint|f +2.2|0|15|ST_MultiPoint|f +2.2|0|21|ST_LineString|t +2.2|0|22|ST_LineString|t +2.2|0|23|ST_LineString|t +2.2|0|24|ST_LineString|f +2.2|0|25|ST_LineString|f +2.2|0|26|ST_LineString|t +2.2|0|27|ST_LineString|t +2.2|0|28|ST_LineString|t +2.2|0|29|ST_LineString|f +2.2|0|31|ST_Polygon|t +2.2|0|32|ST_Polygon|t +2.2|0|33|ST_Polygon|t +2.2|0|34|ST_Polygon|t +2.2|0|35|ST_Polygon|t +2.2|0|36|ST_Polygon|f +2.2|0|41|ST_MultiPolygon|t +2.2|0|42|ST_MultiPolygon|t +2.2|0|43|ST_MultiPolygon|t +2.2|0|44|ST_MultiPolygon|t +2.2|0|45|ST_MultiPolygon|t +2.2|0|46|ST_MultiPolygon|f +2.3|2|1|ST_Point|t +2.3|2|2|ST_Point|t +2.3|2|3|ST_Point|f +2.3|2|4|ST_Point|f +2.3|2|5|ST_Point|f +2.3|2|6|ST_Point|f +2.3|2|7|ST_Point|f +2.3|2|8|ST_Point|t +2.3|2|11|ST_MultiPoint|t +2.3|2|12|ST_MultiPoint|t +2.3|2|13|ST_MultiPoint|t +2.3|2|14|ST_MultiPoint|t +2.3|2|15|ST_MultiPoint|t +2.3|2|21|ST_LineString|t +2.3|2|22|ST_LineString|t +2.3|2|23|ST_LineString|t +2.3|2|24|ST_LineString|t +2.3|2|25|ST_LineString|t +2.3|2|26|ST_LineString|t +2.3|2|27|ST_LineString|t +2.3|2|28|ST_LineString|t +2.3|2|29|ST_LineString|t +2.3|2|31|ST_Polygon|t +2.3|2|32|ST_Polygon|t +2.3|2|33|ST_Polygon|t +2.3|2|34|ST_Polygon|t +2.3|2|35|ST_Polygon|t +2.3|2|36|ST_Polygon|t +2.3|2|41|ST_MultiPolygon|t +2.3|2|42|ST_MultiPolygon|t +2.3|2|43|ST_MultiPolygon|t +2.3|2|44|ST_MultiPolygon|t +2.3|2|45|ST_MultiPolygon|t +2.3|2|46|ST_MultiPolygon|t +2.4|2|1|ST_Point|t +2.4|2|2|ST_Point|t +2.4|2|3|ST_Point|f +2.4|2|4|ST_Point|f +2.4|2|5|ST_Point|f +2.4|2|6|ST_Point|f +2.4|2|7|ST_Point|f +2.4|2|8|ST_Point|t +2.4|2|11|ST_MultiPoint|t +2.4|2|12|ST_MultiPoint|t +2.4|2|13|ST_MultiPoint|t +2.4|2|14|ST_MultiPoint|t +2.4|2|15|ST_MultiPoint|t +2.4|2|21|ST_LineString|t +2.4|2|22|ST_LineString|t +2.4|2|23|ST_LineString|t +2.4|2|24|ST_LineString|t +2.4|2|25|ST_LineString|t +2.4|2|26|ST_LineString|t +2.4|2|27|ST_LineString|t +2.4|2|28|ST_LineString|t +2.4|2|29|ST_LineString|t +2.4|2|31|ST_Polygon|t +2.4|2|32|ST_Polygon|t +2.4|2|33|ST_Polygon|t +2.4|2|34|ST_Polygon|t +2.4|2|35|ST_Polygon|t +2.4|2|36|ST_Polygon|t +2.4|2|41|ST_MultiPolygon|t +2.4|2|42|ST_MultiPolygon|t +2.4|2|43|ST_MultiPolygon|t +2.4|2|44|ST_MultiPolygon|t +2.4|2|45|ST_MultiPolygon|t +2.4|2|46|ST_MultiPolygon|t +2.5|0|1|ST_Point|t +2.5|0|2|ST_Point|t +2.5|0|3|ST_Point|t +2.5|0|4|ST_Point|t +2.5|0|5|ST_Point|f +2.5|0|6|ST_Point|f +2.5|0|7|ST_Point|f +2.5|0|8|ST_Point|f +2.5|0|11|ST_MultiPoint|t +2.5|0|12|ST_MultiPoint|t +2.5|0|13|ST_MultiPoint|t +2.5|0|14|ST_MultiPoint|f +2.5|0|15|ST_MultiPoint|f +2.5|0|21|ST_LineString|t +2.5|0|22|ST_LineString|t +2.5|0|23|ST_LineString|t +2.5|0|24|ST_LineString|f +2.5|0|25|ST_LineString|f +2.5|0|26|ST_LineString|t +2.5|0|27|ST_LineString|t +2.5|0|28|ST_LineString|t +2.5|0|29|ST_LineString|f +2.5|0|31|ST_Polygon|t +2.5|0|32|ST_Polygon|t +2.5|0|33|ST_Polygon|t +2.5|0|34|ST_Polygon|t +2.5|0|35|ST_Polygon|f +2.5|0|36|ST_Polygon|f +2.5|0|41|ST_MultiPolygon|t +2.5|0|42|ST_MultiPolygon|t +2.5|0|43|ST_MultiPolygon|t +2.5|0|44|ST_MultiPolygon|t +2.5|0|45|ST_MultiPolygon|f +2.5|0|46|ST_MultiPolygon|f +2.6|2|1|ST_Point|t +2.6|2|2|ST_Point|t +2.6|2|3|ST_Point|f +2.6|2|4|ST_Point|f +2.6|2|5|ST_Point|f +2.6|2|6|ST_Point|f +2.6|2|7|ST_Point|f +2.6|2|8|ST_Point|t +2.6|2|11|ST_MultiPoint|t +2.6|2|12|ST_MultiPoint|t +2.6|2|13|ST_MultiPoint|t +2.6|2|14|ST_MultiPoint|t +2.6|2|15|ST_MultiPoint|t +2.6|2|21|ST_LineString|t +2.6|2|22|ST_LineString|t +2.6|2|23|ST_LineString|t +2.6|2|24|ST_LineString|t +2.6|2|25|ST_LineString|t +2.6|2|26|ST_LineString|t +2.6|2|27|ST_LineString|t +2.6|2|28|ST_LineString|t +2.6|2|29|ST_LineString|t +2.6|2|31|ST_Polygon|t +2.6|2|32|ST_Polygon|t +2.6|2|33|ST_Polygon|t +2.6|2|34|ST_Polygon|t +2.6|2|35|ST_Polygon|t +2.6|2|36|ST_Polygon|t +2.6|2|41|ST_MultiPolygon|t +2.6|2|42|ST_MultiPolygon|t +2.6|2|43|ST_MultiPolygon|t +2.6|2|44|ST_MultiPolygon|t +2.6|2|45|ST_MultiPolygon|t +2.6|2|46|ST_MultiPolygon|t diff -Nru postgis-1.5.3/raster/test/regress/rt_io.sql postgis-2.0.1/raster/test/regress/rt_io.sql --- postgis-1.5.3/raster/test/regress/rt_io.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_io.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,927 @@ +CREATE TABLE rt_io_test ( + id numeric, + name text, + hexwkb_ndr text, + hexwkb_xdr text, + rast raster + ); + +-- 1x1, no bands, no transform, scale 1:1 +INSERT INTO rt_io_test (id, name, hexwkb_ndr, hexwkb_xdr) +VALUES ( 0, '1x1 no bands, no transform', +( +'01' -- little endian (uint8 ndr) +|| +'0000' -- version (uint16 0) +|| +'0000' -- nBands (uint16 0) +|| +'000000000000F03F' -- scaleX (float64 1) +|| +'000000000000F03F' -- scaleY (float64 1) +|| +'0000000000000000' -- ipX (float64 0) +|| +'0000000000000000' -- ipY (float64 0) +|| +'0000000000000000' -- skewX (float64 0) +|| +'0000000000000000' -- skewY (float64 0) +|| +'0A000000' -- SRID (int32 10) +|| +'0100' -- width (uint16 1) +|| +'0100' -- height (uint16 1) +) +, +( +'00' -- big endian (uint8 xdr) +|| +'0000' -- version (uint16 0) +|| +'0000' -- nBands (uint16 0) +|| +'3FF0000000000000' -- scaleX (float64 1) +|| +'3FF0000000000000' -- scaleY (float64 1) +|| +'0000000000000000' -- ipX (float64 0) +|| +'0000000000000000' -- ipY (float64 0) +|| +'0000000000000000' -- skewX (float64 0) +|| +'0000000000000000' -- skewY (float64 0) +|| +'0000000A' -- SRID (int32 10) +|| +'0001' -- width (uint16 1) +|| +'0001' -- height (uint16 1) +) +); + +-- 1x1, single band of type 1BB, no transform, scale 1:1 +INSERT INTO rt_io_test (id, name, hexwkb_ndr, hexwkb_xdr) +VALUES ( 1, '1x1 single band (1BB) no transform', +( +'01' -- little endian (uint8 ndr) +|| +'0000' -- version (uint16 0) +|| +'0100' -- nBands (uint16 1) +|| +'000000000000F03F' -- scaleX (float64 1) +|| +'000000000000F03F' -- scaleY (float64 1) +|| +'0000000000000000' -- ipX (float64 0) +|| +'0000000000000000' -- ipY (float64 0) +|| +'0000000000000000' -- skewX (float64 0) +|| +'0000000000000000' -- skewY (float64 0) +|| +'0A000000' -- SRID (int32 10) +|| +'0100' -- width (uint16 1) +|| +'0100' -- height (uint16 1) +|| +'00' -- first band type (1BB) +|| +'00' -- novalue==0 +|| +'01' -- pixel(0,0)==1 +) +, +( +'00' -- big endian (uint8 xdr) +|| +'0000' -- version (uint16 0) +|| +'0001' -- nBands (uint16 1) +|| +'3FF0000000000000' -- scaleX (float64 1) +|| +'3FF0000000000000' -- scaleY (float64 1) +|| +'0000000000000000' -- ipX (float64 0) +|| +'0000000000000000' -- ipY (float64 0) +|| +'0000000000000000' -- skewX (float64 0) +|| +'0000000000000000' -- skewY (float64 0) +|| +'0000000A' -- SRID (int32 10) +|| +'0001' -- width (uint16 1) +|| +'0001' -- height (uint16 1) +|| +'00' -- first band type (1BB) +|| +'00' -- novalue==0 +|| +'01' -- pixel(0,0)==1 +) +); + +-- 1x1, single band of type 2BUI, no transform, scale 1:1 +INSERT INTO rt_io_test (id, name, hexwkb_ndr, hexwkb_xdr) +VALUES ( 2, '1x1 single band (2BUI) no transform', +( +'01' -- little endian (uint8 ndr) +|| +'0000' -- version (uint16 0) +|| +'0100' -- nBands (uint16 1) +|| +'000000000000F03F' -- scaleX (float64 1) +|| +'000000000000F03F' -- scaleY (float64 1) +|| +'0000000000000000' -- ipX (float64 0) +|| +'0000000000000000' -- ipY (float64 0) +|| +'0000000000000000' -- skewX (float64 0) +|| +'0000000000000000' -- skewY (float64 0) +|| +'0A000000' -- SRID (int32 10) +|| +'0100' -- width (uint16 1) +|| +'0100' -- height (uint16 1) +|| +'01' -- first band type (2BUI) +|| +'00' -- novalue==0 +|| +'03' -- pixel(0,0)==3 +), +( +'00' -- big endian (uint8 xdr) +|| +'0000' -- version (uint16 0) +|| +'0001' -- nBands (uint16 1) +|| +'3FF0000000000000' -- scaleX (float64 1) +|| +'3FF0000000000000' -- scaleY (float64 1) +|| +'0000000000000000' -- ipX (float64 0) +|| +'0000000000000000' -- ipY (float64 0) +|| +'0000000000000000' -- skewX (float64 0) +|| +'0000000000000000' -- skewY (float64 0) +|| +'0000000A' -- SRID (int32 10) +|| +'0001' -- width (uint16 1) +|| +'0001' -- height (uint16 1) +|| +'01' -- first band type (2BUI) +|| +'00' -- novalue==0 +|| +'03' -- pixel(0,0)==3 +) ); + +-- 1x1, single band of type 4BUI, no transform, scale 1:1 +INSERT INTO rt_io_test (id, name, hexwkb_ndr, hexwkb_xdr) +VALUES ( 3, '1x1 single band (4BUI) no transform', +( +'01' -- little endian (uint8 ndr) +|| +'0000' -- version (uint16 0) +|| +'0100' -- nBands (uint16 1) +|| +'000000000000F03F' -- scaleX (float64 1) +|| +'000000000000F03F' -- scaleY (float64 1) +|| +'0000000000000000' -- ipX (float64 0) +|| +'0000000000000000' -- ipY (float64 0) +|| +'0000000000000000' -- skewX (float64 0) +|| +'0000000000000000' -- skewY (float64 0) +|| +'0A000000' -- SRID (int32 10) +|| +'0100' -- width (uint16 1) +|| +'0100' -- height (uint16 1) +|| +'02' -- first band type (4BUI) +|| +'00' -- novalue==0 +|| +'0F' -- pixel(0,0)==15 +), +( +'00' -- big endian (uint8 xdr) +|| +'0000' -- version (uint16 0) +|| +'0001' -- nBands (uint16 1) +|| +'3FF0000000000000' -- scaleX (float64 1) +|| +'3FF0000000000000' -- scaleY (float64 1) +|| +'0000000000000000' -- ipX (float64 0) +|| +'0000000000000000' -- ipY (float64 0) +|| +'0000000000000000' -- skewX (float64 0) +|| +'0000000000000000' -- skewY (float64 0) +|| +'0000000A' -- SRID (int32 10) +|| +'0001' -- width (uint16 1) +|| +'0001' -- height (uint16 1) +|| +'02' -- first band type (4BUI) +|| +'00' -- novalue==0 +|| +'0F' -- pixel(0,0)==15 +) ); + +-- 1x1, single band of type 8BSI, no transform, scale 1:1 +INSERT INTO rt_io_test (id, name, hexwkb_ndr, hexwkb_xdr) +VALUES ( 4, '1x1 single band (8BSI) no transform', +( +'01' -- little endian (uint8 ndr) +|| +'0000' -- version (uint16 0) +|| +'0100' -- nBands (uint16 1) +|| +'000000000000F03F' -- scaleX (float64 1) +|| +'000000000000F03F' -- scaleY (float64 1) +|| +'0000000000000000' -- ipX (float64 0) +|| +'0000000000000000' -- ipY (float64 0) +|| +'0000000000000000' -- skewX (float64 0) +|| +'0000000000000000' -- skewY (float64 0) +|| +'0A000000' -- SRID (int32 10) +|| +'0100' -- width (uint16 1) +|| +'0100' -- height (uint16 1) +|| +'03' -- first band type (8BSI) +|| +'00' -- novalue==0 +|| +'FF' -- pixel(0,0)==-1 +), +( +'00' -- big endian (uint8 xdr) +|| +'0000' -- version (uint16 0) +|| +'0001' -- nBands (uint16 1) +|| +'3FF0000000000000' -- scaleX (float64 1) +|| +'3FF0000000000000' -- scaleY (float64 1) +|| +'0000000000000000' -- ipX (float64 0) +|| +'0000000000000000' -- ipY (float64 0) +|| +'0000000000000000' -- skewX (float64 0) +|| +'0000000000000000' -- skewY (float64 0) +|| +'0000000A' -- SRID (int32 10) +|| +'0001' -- width (uint16 1) +|| +'0001' -- height (uint16 1) +|| +'03' -- first band type (8BSI) +|| +'00' -- novalue==0 +|| +'FF' -- pixel(0,0)==-1 +) ); + +-- 1x1, single band of type 8BUI, no transform, scale 1:1 +INSERT INTO rt_io_test (id, name, hexwkb_ndr, hexwkb_xdr) +VALUES ( 5, '1x1 single band (8BUI) no transform', +( +'01' -- little endian (uint8 ndr) +|| +'0000' -- version (uint16 0) +|| +'0100' -- nBands (uint16 1) +|| +'000000000000F03F' -- scaleX (float64 1) +|| +'000000000000F03F' -- scaleY (float64 1) +|| +'0000000000000000' -- ipX (float64 0) +|| +'0000000000000000' -- ipY (float64 0) +|| +'0000000000000000' -- skewX (float64 0) +|| +'0000000000000000' -- skewY (float64 0) +|| +'0A000000' -- SRID (int32 10) +|| +'0100' -- width (uint16 1) +|| +'0100' -- height (uint16 1) +|| +'04' -- first band type (8BUI) +|| +'00' -- novalue==0 +|| +'FF' -- pixel(0,0)==255 +), +( +'00' -- big endian (uint8 xdr) +|| +'0000' -- version (uint16 0) +|| +'0001' -- nBands (uint16 1) +|| +'3FF0000000000000' -- scaleX (float64 1) +|| +'3FF0000000000000' -- scaleY (float64 1) +|| +'0000000000000000' -- ipX (float64 0) +|| +'0000000000000000' -- ipY (float64 0) +|| +'0000000000000000' -- skewX (float64 0) +|| +'0000000000000000' -- skewY (float64 0) +|| +'0000000A' -- SRID (int32 10) +|| +'0001' -- width (uint16 1) +|| +'0001' -- height (uint16 1) +|| +'04' -- first band type (8BUI) +|| +'00' -- novalue==0 +|| +'FF' -- pixel(0,0)==255 +) ); + +-- 1x1, single band of type 16BSI, no transform, scale 1:1 +INSERT INTO rt_io_test (id, name, hexwkb_ndr, hexwkb_xdr) +VALUES ( 6, '1x1 single band (16BSI) no transform', +( +'01' -- little endian (uint8 ndr) +|| +'0000' -- version (uint16 0) +|| +'0100' -- nBands (uint16 1) +|| +'000000000000F03F' -- scaleX (float64 1) +|| +'000000000000F03F' -- scaleY (float64 1) +|| +'0000000000000000' -- ipX (float64 0) +|| +'0000000000000000' -- ipY (float64 0) +|| +'0000000000000000' -- skewX (float64 0) +|| +'0000000000000000' -- skewY (float64 0) +|| +'0A000000' -- SRID (int32 10) +|| +'0100' -- width (uint16 1) +|| +'0100' -- height (uint16 1) +|| +'05' -- first band type (16BSI) +|| +'0000' -- novalue==0 +|| +'FFFF' -- pixel(0,0)==-1 +), +( +'00' -- big endian (uint8 xdr) +|| +'0000' -- version (uint16 0) +|| +'0001' -- nBands (uint16 1) +|| +'3FF0000000000000' -- scaleX (float64 1) +|| +'3FF0000000000000' -- scaleY (float64 1) +|| +'0000000000000000' -- ipX (float64 0) +|| +'0000000000000000' -- ipY (float64 0) +|| +'0000000000000000' -- skewX (float64 0) +|| +'0000000000000000' -- skewY (float64 0) +|| +'0000000A' -- SRID (int32 10) +|| +'0001' -- width (uint16 1) +|| +'0001' -- height (uint16 1) +|| +'05' -- first band type (16BSI) +|| +'0000' -- novalue==0 +|| +'FFFF' -- pixel(0,0)==-1 +) ); + +-- 1x1, single band of type 16BUI, no transform, scale 1:1 +INSERT INTO rt_io_test (id, name, hexwkb_ndr, hexwkb_xdr) +VALUES ( 7, '1x1 single band (16BUI) no transform', +( +'01' -- little endian (uint8 ndr) +|| +'0000' -- version (uint16 0) +|| +'0100' -- nBands (uint16 1) +|| +'000000000000F03F' -- scaleX (float64 1) +|| +'000000000000F03F' -- scaleY (float64 1) +|| +'0000000000000000' -- ipX (float64 0) +|| +'0000000000000000' -- ipY (float64 0) +|| +'0000000000000000' -- skewX (float64 0) +|| +'0000000000000000' -- skewY (float64 0) +|| +'0A000000' -- SRID (int32 10) +|| +'0100' -- width (uint16 1) +|| +'0100' -- height (uint16 1) +|| +'06' -- first band type (16BUI) +|| +'0000' -- novalue==0 +|| +'FFFF' -- pixel(0,0)==65535 +), +( +'00' -- big endian (uint8 xdr) +|| +'0000' -- version (uint16 0) +|| +'0001' -- nBands (uint16 1) +|| +'3FF0000000000000' -- scaleX (float64 1) +|| +'3FF0000000000000' -- scaleY (float64 1) +|| +'0000000000000000' -- ipX (float64 0) +|| +'0000000000000000' -- ipY (float64 0) +|| +'0000000000000000' -- skewX (float64 0) +|| +'0000000000000000' -- skewY (float64 0) +|| +'0000000A' -- SRID (int32 10) +|| +'0001' -- width (uint16 1) +|| +'0001' -- height (uint16 1) +|| +'06' -- first band type (16BUI) +|| +'0000' -- novalue==0 +|| +'FFFF' -- pixel(0,0)==65535 +) ); + +-- 1x1, single band of type 32BSI, no transform, scale 1:1 +INSERT INTO rt_io_test (id, name, hexwkb_ndr, hexwkb_xdr) +VALUES ( 8, '1x1 single band (32BSI) no transform', +( +'01' -- little endian (uint8 ndr) +|| +'0000' -- version (uint16 0) +|| +'0100' -- nBands (uint16 1) +|| +'000000000000F03F' -- scaleX (float64 1) +|| +'000000000000F03F' -- scaleY (float64 1) +|| +'0000000000000000' -- ipX (float64 0) +|| +'0000000000000000' -- ipY (float64 0) +|| +'0000000000000000' -- skewX (float64 0) +|| +'0000000000000000' -- skewY (float64 0) +|| +'0A000000' -- SRID (int32 10) +|| +'0100' -- width (uint16 1) +|| +'0100' -- height (uint16 1) +|| +'07' -- first band type (32BSI) +|| +'00000000' -- novalue==0 +|| +'FFFFFFFF' -- pixel(0,0)==-1 ? +), +( +'00' -- big endian (uint8 xdr) +|| +'0000' -- version (uint16 0) +|| +'0001' -- nBands (uint16 1) +|| +'3FF0000000000000' -- scaleX (float64 1) +|| +'3FF0000000000000' -- scaleY (float64 1) +|| +'0000000000000000' -- ipX (float64 0) +|| +'0000000000000000' -- ipY (float64 0) +|| +'0000000000000000' -- skewX (float64 0) +|| +'0000000000000000' -- skewY (float64 0) +|| +'0000000A' -- SRID (int32 10) +|| +'0001' -- width (uint16 1) +|| +'0001' -- height (uint16 1) +|| +'07' -- first band type (32BSI) +|| +'00000000' -- novalue==0 +|| +'FFFFFFFF' -- pixel(0,0)==-1 ? +) ); + +-- 1x1, single band of type 32BUI, no transform, scale 1:1 +INSERT INTO rt_io_test (id, name, hexwkb_ndr, hexwkb_xdr) +VALUES ( 9, '1x1 single band (32BUI) no transform', +( +'01' -- little endian (uint8 ndr) +|| +'0000' -- version (uint16 0) +|| +'0100' -- nBands (uint16 1) +|| +'000000000000F03F' -- scaleX (float64 1) +|| +'000000000000F03F' -- scaleY (float64 1) +|| +'0000000000000000' -- ipX (float64 0) +|| +'0000000000000000' -- ipY (float64 0) +|| +'0000000000000000' -- skewX (float64 0) +|| +'0000000000000000' -- skewY (float64 0) +|| +'0A000000' -- SRID (int32 10) +|| +'0100' -- width (uint16 1) +|| +'0100' -- height (uint16 1) +|| +'08' -- first band type (32BUI) +|| +'00000000' -- novalue==0 +|| +'FFFFFFFF' -- pixel(0,0)=4294967295 +), +( +'00' -- big endian (uint8 xdr) +|| +'0000' -- version (uint16 0) +|| +'0001' -- nBands (uint16 1) +|| +'3FF0000000000000' -- scaleX (float64 1) +|| +'3FF0000000000000' -- scaleY (float64 1) +|| +'0000000000000000' -- ipX (float64 0) +|| +'0000000000000000' -- ipY (float64 0) +|| +'0000000000000000' -- skewX (float64 0) +|| +'0000000000000000' -- skewY (float64 0) +|| +'0000000A' -- SRID (int32 10) +|| +'0001' -- width (uint16 1) +|| +'0001' -- height (uint16 1) +|| +'08' -- first band type (32BUI) +|| +'00000000' -- novalue==0 +|| +'FFFFFFFF' -- pixel(0,0)=4294967295 +) ); + +-- 1x1, single band of type 32BF, no transform, scale 1:1 +INSERT INTO rt_io_test (id, name, hexwkb_ndr, hexwkb_xdr) +VALUES ( 11, '1x1 single band (32BF) no transform', +( +'01' -- little endian (uint8 ndr) +|| +'0000' -- version (uint16 0) +|| +'0100' -- nBands (uint16 1) +|| +'000000000000F03F' -- scaleX (float64 1) +|| +'000000000000F03F' -- scaleY (float64 1) +|| +'0000000000000000' -- ipX (float64 0) +|| +'0000000000000000' -- ipY (float64 0) +|| +'0000000000000000' -- skewX (float64 0) +|| +'0000000000000000' -- skewY (float64 0) +|| +'0A000000' -- SRID (int32 10) +|| +'0100' -- width (uint16 1) +|| +'0100' -- height (uint16 1) +|| +'0A' -- first band type (32BF) +|| +'00000000' -- novalue==0 +|| +'CDCC8C3F' -- pixel(0,0)=1.1 +), +( +'00' -- big endian (uint8 xdr) +|| +'0000' -- version (uint16 0) +|| +'0001' -- nBands (uint16 1) +|| +'3FF0000000000000' -- scaleX (float64 1) +|| +'3FF0000000000000' -- scaleY (float64 1) +|| +'0000000000000000' -- ipX (float64 0) +|| +'0000000000000000' -- ipY (float64 0) +|| +'0000000000000000' -- skewX (float64 0) +|| +'0000000000000000' -- skewY (float64 0) +|| +'0000000A' -- SRID (int32 10) +|| +'0001' -- width (uint16 1) +|| +'0001' -- height (uint16 1) +|| +'0A' -- first band type (32BF) +|| +'00000000' -- novalue==0 +|| +'3F8CCCCD' -- pixel(0,0)=1.1 +) ); + +-- 1x1, single band of type 64BF, no transform, scale 1:1 +INSERT INTO rt_io_test (id, name, hexwkb_ndr, hexwkb_xdr) +VALUES ( 11, '1x1 single band (64BF) no transform', +( +'01' -- little endian (uint8 ndr) +|| +'0000' -- version (uint16 0) +|| +'0100' -- nBands (uint16 1) +|| +'000000000000F03F' -- scaleX (float64 1) +|| +'000000000000F03F' -- scaleY (float64 1) +|| +'0000000000000000' -- ipX (float64 0) +|| +'0000000000000000' -- ipY (float64 0) +|| +'0000000000000000' -- skewX (float64 0) +|| +'0000000000000000' -- skewY (float64 0) +|| +'0A000000' -- SRID (int32 10) +|| +'0100' -- width (uint16 1) +|| +'0100' -- height (uint16 1) +|| +'0B' -- first band type (64BF) +|| +'0000000000000000' -- novalue==0 +|| +'AE47E17A14AE1540' -- pixel(0,0)=5.42 +), +( +'00' -- big endian (uint8 xdr) +|| +'0000' -- version (uint16 0) +|| +'0001' -- nBands (uint16 1) +|| +'3FF0000000000000' -- scaleX (float64 1) +|| +'3FF0000000000000' -- scaleY (float64 1) +|| +'0000000000000000' -- ipX (float64 0) +|| +'0000000000000000' -- ipY (float64 0) +|| +'0000000000000000' -- skewX (float64 0) +|| +'0000000000000000' -- skewY (float64 0) +|| +'0000000A' -- SRID (int32 10) +|| +'0001' -- width (uint16 1) +|| +'0001' -- height (uint16 1) +|| +'0B' -- first band type (64BF) +|| +'0000000000000000' -- novalue==0 +|| +'4015AE147AE147AE' -- pixel(0,0)=5.42 +) ); + +-- 1x1, single band of type 64BF (external: 3:/tmp/t.tif), +-- no transform, scale 1:1 +-- +INSERT INTO rt_io_test (id, name, hexwkb_ndr, hexwkb_xdr) +VALUES ( 12, '1x1 single band (64BF external) no transform', +( +'01' -- little endian (uint8 ndr) +|| +'0000' -- version (uint16 0) +|| +'0100' -- nBands (uint16 1) +|| +'000000000000F03F' -- scaleX (float64 1) +|| +'000000000000F03F' -- scaleY (float64 1) +|| +'0000000000000000' -- ipX (float64 0) +|| +'0000000000000000' -- ipY (float64 0) +|| +'0000000000000000' -- skewX (float64 0) +|| +'0000000000000000' -- skewY (float64 0) +|| +'0A000000' -- SRID (int32 10) +|| +'0100' -- width (uint16 1) +|| +'0100' -- height (uint16 1) +|| +'8B' -- first band type (64BF + ext flag) +|| +'0000000000000000' -- novalue==0 +|| +'03' -- ext band num == 3 +|| +'2F746D702F742E74696600' -- "/tmp/t.tif" +), +( +'00' -- big endian (uint8 xdr) +|| +'0000' -- version (uint16 0) +|| +'0001' -- nBands (uint16 1) +|| +'3FF0000000000000' -- scaleX (float64 1) +|| +'3FF0000000000000' -- scaleY (float64 1) +|| +'0000000000000000' -- ipX (float64 0) +|| +'0000000000000000' -- ipY (float64 0) +|| +'0000000000000000' -- skewX (float64 0) +|| +'0000000000000000' -- skewY (float64 0) +|| +'0000000A' -- SRID (int32 10) +|| +'0001' -- width (uint16 1) +|| +'0001' -- height (uint16 1) +|| +'8B' -- first band type (64BF) +|| +'0000000000000000' -- novalue==0 +|| +'03' -- ext band num == 3 +|| +'2F746D702F742E74696600' -- "/tmp/t.tif" +) ); + +SELECT name, + hexwkb_ndr::raster::text = hexwkb_ndr or hexwkb_ndr::raster::text = hexwkb_xdr as ndr_io, + hexwkb_xdr::raster::text = hexwkb_ndr or hexwkb_xdr::raster::text = hexwkb_xdr as xdr_io +FROM rt_io_test; + +-- Out of range value for 1BB pixeltype +SELECT ( + '01' || -- little endian (uint8 ndr) + '0000' || -- version (uint16 0) + '0100' || -- nBands (uint16 1) + '000000000000F03F' || -- scaleX (float64 1) + '000000000000F03F' || -- scaleY (float64 1) + '0000000000000000' || -- ipX (float64 0) + '0000000000000000' || -- ipY (float64 0) + '0000000000000000' || -- skewX (float64 0) + '0000000000000000' || -- skewY (float64 0) + '0A000000' || -- SRID (int32 10) + '0100' || -- width (uint16 1) + '0100' || -- height (uint16 1) + '00' || -- first band type (1BB) + '00' ||-- novalue==0 + '02' -- pixel(0,0)==2 (out of 0..1 range) +)::raster; + +-- Out of range value for 2BUI pixeltype +SELECT ( + '01' || -- little endian (uint8 ndr) + '0000' || -- version (uint16 0) + '0100' || -- nBands (uint16 1) + '000000000000F03F' || -- scaleX (float64 1) + '000000000000F03F' || -- scaleY (float64 1) + '0000000000000000' || -- ipX (float64 0) + '0000000000000000' || -- ipY (float64 0) + '0000000000000000' || -- skewX (float64 0) + '0000000000000000' || -- skewY (float64 0) + '0A000000' || -- SRID (int32 10) + '0100' || -- width (uint16 1) + '0100' || -- height (uint16 1) + '01' || -- first band type (2BUI) + '00' ||-- novalue==0 + '04' -- pixel(0,0)==4 (out of 0..3 range) +)::raster; + +-- Out of range value for 4BUI pixeltype +SELECT ( + '01' || -- little endian (uint8 ndr) + '0000' || -- version (uint16 0) + '0100' || -- nBands (uint16 1) + '000000000000F03F' || -- scaleX (float64 1) + '000000000000F03F' || -- scaleY (float64 1) + '0000000000000000' || -- ipX (float64 0) + '0000000000000000' || -- ipY (float64 0) + '0000000000000000' || -- skewX (float64 0) + '0000000000000000' || -- skewY (float64 0) + '0A000000' || -- SRID (int32 10) + '0100' || -- width (uint16 1) + '0100' || -- height (uint16 1) + '02' || -- first band type (4BUI) + '00' ||-- novalue==0 + '10' -- pixel(0,0)==16 (out of 0..15 range) +)::raster; + +DROP TABLE rt_io_test; diff -Nru postgis-1.5.3/raster/test/regress/rt_io_expected postgis-2.0.1/raster/test/regress/rt_io_expected --- postgis-1.5.3/raster/test/regress/rt_io_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_io_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,16 @@ +1x1 no bands, no transform|t|t +1x1 single band (1BB) no transform|t|t +1x1 single band (2BUI) no transform|t|t +1x1 single band (4BUI) no transform|t|t +1x1 single band (8BSI) no transform|t|t +1x1 single band (8BUI) no transform|t|t +1x1 single band (16BSI) no transform|t|t +1x1 single band (16BUI) no transform|t|t +1x1 single band (32BSI) no transform|t|t +1x1 single band (32BUI) no transform|t|t +1x1 single band (32BF) no transform|t|t +1x1 single band (64BF) no transform|t|t +1x1 single band (64BF external) no transform|t|t +ERROR: rt_band_from_wkb: Invalid value 2 for pixel of type 1BB +ERROR: rt_band_from_wkb: Invalid value 4 for pixel of type 2BUI +ERROR: rt_band_from_wkb: Invalid value 16 for pixel of type 4BUI diff -Nru postgis-1.5.3/raster/test/regress/rt_isempty.sql postgis-2.0.1/raster/test/regress/rt_isempty.sql --- postgis-1.5.3/raster/test/regress/rt_isempty.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_isempty.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,13 @@ +----------------------------------------------------------------------- +-- $Id$ +-- +-- Copyright (c) 2011 Jorge Arevalo +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +----------------------------------------------------------------------- + +------------------------------------------------------------------- +-- st_isempty +----------------------------------------------------------------------- +select st_isempty(rast) from empty_raster_test; \ No newline at end of file diff -Nru postgis-1.5.3/raster/test/regress/rt_isempty_expected postgis-2.0.1/raster/test/regress/rt_isempty_expected --- postgis-1.5.3/raster/test/regress/rt_isempty_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_isempty_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1 @@ +f diff -Nru postgis-1.5.3/raster/test/regress/rt_left.sql postgis-2.0.1/raster/test/regress/rt_left.sql --- postgis-1.5.3/raster/test/regress/rt_left.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_left.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,38 @@ +----------------------------------------------------------------------- +-- $Id$ +-- +-- Copyright (c) 2009 Sandro Santilli +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +----------------------------------------------------------------------- + +------------------------------------------------------------------- +-- raster_left +----------------------------------------------------------------------- + +SELECT 'raster_left(X, query(1,1))' as op, + count(a.y), + min(a.x) as xmin, + max(a.x) as xmax, + min(a.y) as ymin, + max(a.y) as ymax, + st_extent(a.tile::geometry) +FROM rt_gist_grid_test a, rt_gist_query_test b +WHERE b.x = 1 and b.y = 1 + AND raster_left(a.tile, b.tile); + +----------------------------------------------------------------------- +-- Test << operator (left) +----------------------------------------------------------------------- + +SELECT 'X << query(1,1)' as op, + count(a.y), + min(a.x) as xmin, + max(a.x) as xmax, + min(a.y) as ymin, + max(a.y) as ymax, + st_extent(a.tile::geometry) +FROM rt_gist_grid_test a, rt_gist_query_test b +WHERE b.x = 1 and b.y = 1 + AND a.tile << b.tile; diff -Nru postgis-1.5.3/raster/test/regress/rt_left_expected postgis-2.0.1/raster/test/regress/rt_left_expected --- postgis-1.5.3/raster/test/regress/rt_left_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_left_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +raster_left(X, query(1,1))|30|0|2|0|9|BOX(-100 -100,-40 100) +X << query(1,1)|30|0|2|0|9|BOX(-100 -100,-40 100) diff -Nru postgis-1.5.3/raster/test/regress/rt_mapalgebraexpr.sql postgis-2.0.1/raster/test/regress/rt_mapalgebraexpr.sql --- postgis-1.5.3/raster/test/regress/rt_mapalgebraexpr.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_mapalgebraexpr.sql 2012-06-07 15:58:02.000000000 +0000 @@ -0,0 +1,63 @@ +-- Test NULL raster +SELECT ST_MapAlgebraExpr(NULL, 1, NULL, '[rast] + 20', 2) IS NULL FROM ST_TestRaster(0, 0, -1) rast; + +-- Test empty raster +SELECT 'T1', ST_IsEmpty(ST_MapAlgebraExpr(ST_MakeEmptyRaster(0, 10, 0, 0, 1, 1, 1, 1, 0), 1, NULL, '[rast] + 20', 2)); + +-- Test hasnoband raster +SELECT 'T2', ST_HasNoBand(ST_MapAlgebraExpr(ST_MakeEmptyRaster(10, 10, 0, 0, 1, 1, 1, 1, 0), 1, NULL, '[rast] + 20', 2)); + +-- Test hasnodata value +SELECT 'T3', ST_Value(rast, 1, 1), ST_Value(ST_MapAlgebraExpr(ST_SetBandNoDataValue(rast, NULL), 1, NULL, '[rast] + 20', 2), 1, 1) FROM ST_TestRaster(0, 0, -1) rast; + +-- Test nodata value +SELECT 'T4', ST_Value(rast, 1, 1), ST_Value(ST_MapAlgebraExpr(rast, 1, NULL, '[rast] + 20', 2), 1, 1) FROM ST_TestRaster(0, 0, -1) rast; + +-- Test 'rast' expression +SELECT 'T5', ST_Value(rast, 1, 1), ST_Value(ST_MapAlgebraExpr(rast, 1, NULL, '[rast]', 2), 1, 1) FROM ST_TestRaster(0, 0, -1) rast; +SELECT 'T6', ST_Value(rast, 1, 1), ST_Value(ST_MapAlgebraExpr(ST_SetBandNoDataValue(rast, NULL), 1, NULL, '[rast]'), 1, 1) FROM ST_TestRaster(0, 0, -1) rast; + +-- Test pixeltype +SELECT 'T7', ST_Value(rast, 1, 1), ST_Value(ST_MapAlgebraExpr(rast, 1, '4BUI', '[rast] + 20', 2), 1, 1) FROM ST_TestRaster(0, 0, 100) rast; +SELECT 'T8', ST_Value(rast, 1, 1), ST_Value(ST_MapAlgebraExpr(rast, 1, '4BUId', '[rast] + 20', 2), 1, 1) FROM ST_TestRaster(0, 0, 100) rast; +SELECT 'T9', ST_Value(rast, 1, 1), ST_Value(ST_MapAlgebraExpr(rast, 1, '2BUI', '[rast] + 20', 2), 1, 1) FROM ST_TestRaster(0, 0, 101) rast; + +-- Test '[rast.x]', '[rast.y]' and '[rast.val]' substitutions expression +SELECT 'T10.'||x||'.'||y, ST_Value(rast, x, y), + ST_Value(ST_MapAlgebraExpr(rast, 1, NULL, 'ceil([rast]*[rast.x]/[rast.y]+[rast.val])'), x, y) +FROM ST_TestRaster(0, 0, 10) rast, + generate_series(6, 8) as x, + generate_series(2, 4) as y +ORDER BY x, y; + +-- Test divide by zero; blows up the whole query, not just the SPI +SELECT ST_Value(rast, 1, 1), + ST_Value(ST_MapAlgebraExpr(rast, 1, NULL, '[rast]/0'), 1, 1) +FROM ST_TestRaster(0, 0, 10) rast; + +-- Test evaluations to null (see #1523) +WITH op AS ( select rast AS rin, + ST_MapAlgebraExpr(rast, 1, NULL, 'SELECT g from (select NULL::double precision as g) as foo', 2) + AS rout FROM ST_TestRaster(0, 0, 10) rast ) +SELECT 'T11.1', ST_Value(rin, 1, 1), ST_Value(rout, 1, 1) FROM op; +WITH op AS ( select rast AS rin, + ST_MapAlgebraExpr(rast, 1, NULL, 'SELECT g from (select [rast],NULL::double precision as g) as foo', 2) + AS rout FROM ST_TestRaster(0, 0, 10) rast ) +SELECT 'T11.2', ST_Value(rin, 1, 1), ST_Value(rout, 1, 1) FROM op; + +-- Test pracine's new bug #1638 +SELECT 'T12', + ST_Value(rast, 1, 2) = 1, + ST_Value(rast, 2, 1) = 2, + ST_Value(rast, 4, 3) = 4, + ST_Value(rast, 3, 4) = 3 + FROM ST_MapAlgebraExpr( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 0, 0, 0.001, 0.001, 0, 0, 4269), + '8BUI'::text, + 1, + 0 + ), + '32BUI', + '[rast.x]' + ) AS rast; diff -Nru postgis-1.5.3/raster/test/regress/rt_mapalgebraexpr_2raster.sql postgis-2.0.1/raster/test/regress/rt_mapalgebraexpr_2raster.sql --- postgis-1.5.3/raster/test/regress/rt_mapalgebraexpr_2raster.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_mapalgebraexpr_2raster.sql 2012-03-13 16:13:48.000000000 +0000 @@ -0,0 +1,272 @@ +DROP TABLE IF EXISTS raster_mapalgebra; +CREATE TABLE raster_mapalgebra ( + rid integer, + rast raster +); +DROP TABLE IF EXISTS raster_mapalgebra_out; +CREATE TABLE raster_mapalgebra_out ( + rid1 integer, + rid2 integer, + extent varchar, + rast raster +); +CREATE OR REPLACE FUNCTION make_test_raster( + rid integer, + width integer DEFAULT 2, + height integer DEFAULT 2, + ul_x double precision DEFAULT 0, + ul_y double precision DEFAULT 0, + skew_x double precision DEFAULT 0, + skew_y double precision DEFAULT 0, + initvalue double precision DEFAULT 1, + nodataval double precision DEFAULT 0 +) + RETURNS void + AS $$ + DECLARE + x int; + y int; + rast raster; + BEGIN + rast := ST_MakeEmptyRaster(width, height, ul_x, ul_y, 1, 1, skew_x, skew_y, 0); + rast := ST_AddBand(rast, 1, '8BUI', initvalue, nodataval); + + + INSERT INTO raster_mapalgebra VALUES (rid, rast); + + RETURN; + END; + $$ LANGUAGE 'plpgsql'; +-- no skew +SELECT make_test_raster(0, 4, 4, -2, -2); +SELECT make_test_raster(1, 2, 2, 0, 0, 0, 0, 2); +SELECT make_test_raster(2, 2, 2, 1, -1, 0, 0, 3); +SELECT make_test_raster(3, 2, 2, 1, 1, 0, 0, 4); +SELECT make_test_raster(4, 2, 2, 2, 2, 0, 0, 5); + +-- skew +SELECT make_test_raster(10, 4, 4, -2, -2, 1, -1); +SELECT make_test_raster(11, 2, 2, 0, 0, 1, -1, 2); +SELECT make_test_raster(12, 2, 2, 1, -1, 1, -1, 3); +SELECT make_test_raster(13, 2, 2, 1, 1, 1, -1, 4); +SELECT make_test_raster(14, 2, 2, 2, 2, 1, -1, 5); + +DROP FUNCTION make_test_raster(integer, integer, integer, double precision, double precision, double precision, double precision, double precision, double precision); + +-- INTERSECTION +INSERT INTO raster_mapalgebra_out + (SELECT r1.rid, r2.rid, 'INTERSECTION', st_mapalgebraexpr( + r1.rast, r2.rast, '[rast1.val]', '32BF', 'INTERSECTION' + ) + FROM raster_mapalgebra r1 + JOIN raster_mapalgebra r2 + ON r1.rid != r2.rid + WHERE r1.rid = 0 + AND r2.rid BETWEEN 1 AND 9 + ) UNION ALL ( + SELECT r1.rid, r2.rid, 'INTERSECTION', st_mapalgebraexpr( + r1.rast, r2.rast, '[rast1.val]', '32BF', 'INTERSECTION' + ) + FROM raster_mapalgebra r1 + JOIN raster_mapalgebra r2 + ON r1.rid != r2.rid + WHERE r1.rid = 10 + AND r2.rid BETWEEN 11 AND 19) +; + +INSERT INTO raster_mapalgebra_out + SELECT NULL AS rid, rid, 'INTERSECTION', st_mapalgebraexpr( + NULL::raster, rast, '[rast1.val]', '32BF', 'INTERSECTION' + ) + FROM raster_mapalgebra +; + +INSERT INTO raster_mapalgebra_out + SELECT rid, NULL AS rid, 'INTERSECTION', st_mapalgebraexpr( + rast, NULL::raster, '[rast1.val]', '32BF', 'INTERSECTION' + ) + FROM raster_mapalgebra +; + +INSERT INTO raster_mapalgebra_out + SELECT NULL AS rid, NULL AS rid, 'INTERSECTION', st_mapalgebraexpr( + NULL::raster, NULL::raster, '[rast1.val]', '32BF', 'INTERSECTION' + ) +; + +-- UNION +INSERT INTO raster_mapalgebra_out + (SELECT r1.rid, r2.rid, 'UNION', st_mapalgebraexpr( + r1.rast, r2.rast, '(([rast1.val] + [rast2.val])/2.)::numeric', '32BF', 'UNION', '[rast2.val]', '[rast1.val]', NULL + ) + FROM raster_mapalgebra r1 + JOIN raster_mapalgebra r2 + ON r1.rid != r2.rid + WHERE r1.rid = 0 + AND r2.rid BETWEEN 1 AND 9 + ) UNION ALL ( + SELECT r1.rid, r2.rid, 'UNION', st_mapalgebraexpr( + r1.rast, r2.rast, '(([rast1.val] + [rast2.val])/2.)::numeric', '32BF', 'UNION', '[rast2.val]', '[rast1.val]', NULL + ) + FROM raster_mapalgebra r1 + JOIN raster_mapalgebra r2 + ON r1.rid != r2.rid + WHERE r1.rid = 10 + AND r2.rid BETWEEN 11 AND 19) +; + +INSERT INTO raster_mapalgebra_out + (SELECT r1.rid, r2.rid, 'UNION', st_mapalgebraexpr( + r1.rast, r2.rast, '(([rast1.val] + [rast2.val])/2.)::numeric', '32BF', 'UNION', '100', '200', NULL + ) + FROM raster_mapalgebra r1 + JOIN raster_mapalgebra r2 + ON r1.rid != r2.rid + WHERE r1.rid = 0 + AND r2.rid BETWEEN 1 AND 9 + ) UNION ALL ( + SELECT r1.rid, r2.rid, 'UNION', st_mapalgebraexpr( + r1.rast, r2.rast, '(([rast1.val] + [rast2.val])/2.)::numeric', '32BF', 'UNION', '100', '200', NULL + ) + FROM raster_mapalgebra r1 + JOIN raster_mapalgebra r2 + ON r1.rid != r2.rid + WHERE r1.rid = 10 + AND r2.rid BETWEEN 11 AND 19) +; + +INSERT INTO raster_mapalgebra_out + SELECT NULL AS rid, rid, 'UNION', st_mapalgebraexpr( + NULL::raster, rast, '(([rast1.val] + [rast2.val])/2.)::numeric', '32BF', 'UNION', '[rast2.val]', '[rast1.val]', NULL + ) + FROM raster_mapalgebra +; + +INSERT INTO raster_mapalgebra_out + SELECT rid, NULL AS rid, 'UNION', st_mapalgebraexpr( + rast, NULL::raster, '(([rast1.val] + [rast2.val])/2.)::numeric', '32BF', 'UNION', '[rast2.val]', '[rast1.val]', NULL + ) + FROM raster_mapalgebra +; + +INSERT INTO raster_mapalgebra_out + SELECT NULL AS rid, NULL AS rid, 'UNION', st_mapalgebraexpr( + NULL::raster, NULL::raster, '(([rast1.val] + [rast2.val])/2.)::numeric', '32BF', 'UNION', '[rast2.val]', '[rast1.val]', NULL + ) +; + +-- FIRST +INSERT INTO raster_mapalgebra_out + (SELECT r1.rid, r2.rid, 'FIRST', st_mapalgebraexpr( + r1.rast, r2.rast, 'CASE WHEN [rast2.val] IS NOT NULL THEN NULL ELSE [rast1.val] END', '32BF', 'FIRST', NULL, '[rast1.val]', NULL + ) + FROM raster_mapalgebra r1 + JOIN raster_mapalgebra r2 + ON r1.rid != r2.rid + WHERE r1.rid = 0 + AND r2.rid BETWEEN 1 AND 9 + ) UNION ALL ( + SELECT r1.rid, r2.rid, 'FIRST', st_mapalgebraexpr( + r1.rast, r2.rast, 'CASE WHEN [rast2.val] IS NOT NULL THEN NULL ELSE [rast1.val] END', '32BF', 'FIRST', NULL, '[rast1.val]', NULL + ) + FROM raster_mapalgebra r1 + JOIN raster_mapalgebra r2 + ON r1.rid != r2.rid + WHERE r1.rid = 10 + AND r2.rid BETWEEN 11 AND 19) +; + +INSERT INTO raster_mapalgebra_out + SELECT NULL AS rid, rid, 'FIRST', st_mapalgebraexpr( + NULL::raster, rast, 'CASE WHEN [rast1.val] IS NOT NULL THEN NULL ELSE [rast2.val] END', '32BF', 'FIRST', '[rast2.val]', NULL, NULL + ) + FROM raster_mapalgebra +; + +INSERT INTO raster_mapalgebra_out + SELECT rid, NULL AS rid, 'FIRST', st_mapalgebraexpr( + rast, NULL::raster, 'CASE WHEN [rast2.val] IS NOT NULL THEN NULL ELSE [rast1.val] END', '32BF', 'FIRST', NULL, '[rast1.val]', NULL + ) + FROM raster_mapalgebra +; + +INSERT INTO raster_mapalgebra_out + SELECT NULL AS rid, NULL AS rid, 'FIRST', st_mapalgebraexpr( + NULL::raster, NULL::raster, 'CASE WHEN [rast2.val] IS NOT NULL THEN NULL ELSE [rast1.val] END', '32BF', 'FIRST', NULL, '[rast1.val]', NULL + ) +; + +-- SECOND +INSERT INTO raster_mapalgebra_out + (SELECT r1.rid, r2.rid, 'SECOND', st_mapalgebraexpr( + r1.rast, r2.rast, 'CASE WHEN [rast1.val] IS NOT NULL THEN NULL ELSE [rast2.val] END', '32BF', 'SECOND', '[rast2.val]', NULL, NULL + ) + FROM raster_mapalgebra r1 + JOIN raster_mapalgebra r2 + ON r1.rid != r2.rid + WHERE r1.rid = 0 + AND r2.rid BETWEEN 1 AND 9 + ) UNION ALL ( + SELECT r1.rid, r2.rid, 'SECOND', st_mapalgebraexpr( + r1.rast, r2.rast, 'CASE WHEN [rast1.val] IS NOT NULL THEN NULL ELSE [rast2.val] END', '32BF', 'SECOND', '[rast2.val]', NULL, NULL + ) + FROM raster_mapalgebra r1 + JOIN raster_mapalgebra r2 + ON r1.rid != r2.rid + WHERE r1.rid = 10 + AND r2.rid BETWEEN 11 AND 19) +; + +INSERT INTO raster_mapalgebra_out + SELECT NULL AS rid, rid, 'SECOND', st_mapalgebraexpr( + NULL::raster, rast, 'CASE WHEN [rast1.val] IS NOT NULL THEN NULL ELSE [rast2.val] END', '32BF', 'SECOND', '[rast2.val]', NULL, NULL + ) + FROM raster_mapalgebra +; + +INSERT INTO raster_mapalgebra_out + SELECT rid, NULL AS rid, 'SECOND', st_mapalgebraexpr( + rast, NULL::raster, 'CASE WHEN [rast1.val] IS NOT NULL THEN NULL ELSE [rast2.val] END', '32BF', 'SECOND', '[rast2.val]', NULL, NULL + ) + FROM raster_mapalgebra +; + +INSERT INTO raster_mapalgebra_out + SELECT NULL AS rid, NULL AS rid, 'SECOND', st_mapalgebraexpr( + NULL::raster, NULL::raster, 'CASE WHEN [rast1.val] IS NOT NULL THEN NULL ELSE [rast2.val] END', '32BF', 'SECOND', '[rast2.val]', NULL, NULL + ) +; + +-- output +SELECT + rid1, + rid2, + extent, + round(upperleftx::numeric, 3) AS upperleftx, + round(upperlefty::numeric, 3) AS upperlefty, + width, + height, + round(scalex::numeric, 3) AS scalex, + round(scaley::numeric, 3) AS scaley, + round(skewx::numeric, 3) AS skewx, + round(skewy::numeric, 3) AS skewy, + srid, + numbands, + pixeltype, + round(nodatavalue::numeric, 3) AS nodatavalue, + round(firstvalue::numeric, 3) AS firstvalue, + round(lastvalue::numeric, 3) AS lastvalue +FROM ( + SELECT + rid1, + rid2, + extent, + (ST_Metadata(rast)).*, + (ST_BandMetadata(rast, 1)).*, + ST_Value(rast, 1, 1, 1) AS firstvalue, + ST_Value(rast, 1, ST_Width(rast), ST_Height(rast)) AS lastvalue + FROM raster_mapalgebra_out +) AS r; + +DROP TABLE IF EXISTS raster_mapalgebra; +DROP TABLE IF EXISTS raster_mapalgebra_out; diff -Nru postgis-1.5.3/raster/test/regress/rt_mapalgebraexpr_2raster_expected postgis-2.0.1/raster/test/regress/rt_mapalgebraexpr_2raster_expected --- postgis-1.5.3/raster/test/regress/rt_mapalgebraexpr_2raster_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_mapalgebraexpr_2raster_expected 2012-03-13 16:13:48.000000000 +0000 @@ -0,0 +1,260 @@ +NOTICE: table "raster_mapalgebra" does not exist, skipping +NOTICE: table "raster_mapalgebra_out" does not exist, skipping +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided are NULL. Returning NULL +NOTICE: The two rasters provided are NULL. Returning NULL +NOTICE: The FIRST raster is NULL. Returning NULL +NOTICE: The FIRST raster is NULL. Returning NULL +NOTICE: The FIRST raster is NULL. Returning NULL +NOTICE: The FIRST raster is NULL. Returning NULL +NOTICE: The FIRST raster is NULL. Returning NULL +NOTICE: The FIRST raster is NULL. Returning NULL +NOTICE: The FIRST raster is NULL. Returning NULL +NOTICE: The FIRST raster is NULL. Returning NULL +NOTICE: The FIRST raster is NULL. Returning NULL +NOTICE: The FIRST raster is NULL. Returning NULL +NOTICE: The two rasters provided are NULL. Returning NULL +NOTICE: The SECOND raster is NULL. Returning NULL +NOTICE: The SECOND raster is NULL. Returning NULL +NOTICE: The SECOND raster is NULL. Returning NULL +NOTICE: The SECOND raster is NULL. Returning NULL +NOTICE: The SECOND raster is NULL. Returning NULL +NOTICE: The SECOND raster is NULL. Returning NULL +NOTICE: The SECOND raster is NULL. Returning NULL +NOTICE: The SECOND raster is NULL. Returning NULL +NOTICE: The SECOND raster is NULL. Returning NULL +NOTICE: The SECOND raster is NULL. Returning NULL +NOTICE: The two rasters provided are NULL. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +0|1|INTERSECTION|0.000|0.000|2|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000|1.000|1.000 +0|2|INTERSECTION|1.000|-1.000|1|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000|1.000|1.000 +0|3|INTERSECTION|1.000|1.000|1|1|1.000|1.000|0.000|0.000|0|1|32BF|0.000|1.000|1.000 +0|4|INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +10|11|INTERSECTION|0.000|0.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|1.000|1.000 +10|12|INTERSECTION|1.000|-1.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|1.000|1.000 +10|13|INTERSECTION|1.000|1.000|2|1|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|1.000|1.000 +10|14|INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +|0|INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +|1|INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +|2|INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +|3|INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +|4|INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +|10|INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +|11|INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +|12|INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +|13|INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +|14|INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +0||INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +1||INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +2||INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +3||INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +4||INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +10||INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +11||INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +12||INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +13||INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +14||INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +||INTERSECTION|||||||||||||| +0|1|UNION|-2.000|-2.000|4|4|1.000|1.000|0.000|0.000|0|1|32BF|0.000|1.000|1.500 +0|2|UNION|-2.000|-2.000|5|4|1.000|1.000|0.000|0.000|0|1|32BF|0.000|1.000| +0|3|UNION|-2.000|-2.000|5|5|1.000|1.000|0.000|0.000|0|1|32BF|0.000|1.000|4.000 +0|4|UNION|-2.000|-2.000|6|6|1.000|1.000|0.000|0.000|0|1|32BF|0.000|1.000|5.000 +10|11|UNION|-2.000|-2.000|4|4|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|1.000|1.000 +10|12|UNION|-2.000|-2.000|4|4|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|1.000|1.000 +10|13|UNION|-2.000|-2.000|4|5|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|1.000| +10|14|UNION|-2.000|-2.000|4|6|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|1.000| +0|1|UNION|-2.000|-2.000|4|4|1.000|1.000|0.000|0.000|0|1|32BF|0.000|200.000|1.500 +0|2|UNION|-2.000|-2.000|5|4|1.000|1.000|0.000|0.000|0|1|32BF|0.000|200.000| +0|3|UNION|-2.000|-2.000|5|5|1.000|1.000|0.000|0.000|0|1|32BF|0.000|200.000|100.000 +0|4|UNION|-2.000|-2.000|6|6|1.000|1.000|0.000|0.000|0|1|32BF|0.000|200.000|100.000 +10|11|UNION|-2.000|-2.000|4|4|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|200.000|200.000 +10|12|UNION|-2.000|-2.000|4|4|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|200.000|200.000 +10|13|UNION|-2.000|-2.000|4|5|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|200.000| +10|14|UNION|-2.000|-2.000|4|6|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|200.000| +|0|UNION|-2.000|-2.000|4|4|1.000|1.000|0.000|0.000|0|1|32BF|0.000|1.000|1.000 +|1|UNION|0.000|0.000|2|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000|2.000|2.000 +|2|UNION|1.000|-1.000|2|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000|3.000|3.000 +|3|UNION|1.000|1.000|2|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000|4.000|4.000 +|4|UNION|2.000|2.000|2|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000|5.000|5.000 +|10|UNION|-2.000|-2.000|4|4|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|1.000|1.000 +|11|UNION|0.000|0.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|2.000|2.000 +|12|UNION|1.000|-1.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|3.000|3.000 +|13|UNION|1.000|1.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|4.000|4.000 +|14|UNION|2.000|2.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|5.000|5.000 +0||UNION|-2.000|-2.000|4|4|1.000|1.000|0.000|0.000|0|1|32BF|0.000|1.000|1.000 +1||UNION|0.000|0.000|2|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000|2.000|2.000 +2||UNION|1.000|-1.000|2|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000|3.000|3.000 +3||UNION|1.000|1.000|2|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000|4.000|4.000 +4||UNION|2.000|2.000|2|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000|5.000|5.000 +10||UNION|-2.000|-2.000|4|4|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|1.000|1.000 +11||UNION|0.000|0.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|2.000|2.000 +12||UNION|1.000|-1.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|3.000|3.000 +13||UNION|1.000|1.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|4.000|4.000 +14||UNION|2.000|2.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|5.000|5.000 +||UNION|||||||||||||| +0|1|FIRST|-2.000|-2.000|4|4|1.000|1.000|0.000|0.000|0|1|32BF|0.000|1.000| +0|2|FIRST|-2.000|-2.000|4|4|1.000|1.000|0.000|0.000|0|1|32BF|0.000|1.000|1.000 +0|3|FIRST|-2.000|-2.000|4|4|1.000|1.000|0.000|0.000|0|1|32BF|0.000|1.000| +0|4|FIRST|-2.000|-2.000|4|4|1.000|1.000|0.000|0.000|0|1|32BF|0.000|1.000|1.000 +10|11|FIRST|-2.000|-2.000|4|4|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|1.000|1.000 +10|12|FIRST|-2.000|-2.000|4|4|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|1.000|1.000 +10|13|FIRST|-2.000|-2.000|4|4|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|1.000|1.000 +10|14|FIRST|-2.000|-2.000|4|4|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|1.000|1.000 +|0|FIRST|||||||||||||| +|1|FIRST|||||||||||||| +|2|FIRST|||||||||||||| +|3|FIRST|||||||||||||| +|4|FIRST|||||||||||||| +|10|FIRST|||||||||||||| +|11|FIRST|||||||||||||| +|12|FIRST|||||||||||||| +|13|FIRST|||||||||||||| +|14|FIRST|||||||||||||| +0||FIRST|-2.000|-2.000|4|4|1.000|1.000|0.000|0.000|0|1|32BF|0.000|1.000|1.000 +1||FIRST|0.000|0.000|2|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000|2.000|2.000 +2||FIRST|1.000|-1.000|2|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000|3.000|3.000 +3||FIRST|1.000|1.000|2|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000|4.000|4.000 +4||FIRST|2.000|2.000|2|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000|5.000|5.000 +10||FIRST|-2.000|-2.000|4|4|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|1.000|1.000 +11||FIRST|0.000|0.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|2.000|2.000 +12||FIRST|1.000|-1.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|3.000|3.000 +13||FIRST|1.000|1.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|4.000|4.000 +14||FIRST|2.000|2.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|5.000|5.000 +||FIRST|||||||||||||| +0|1|SECOND|0.000|0.000|2|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000|| +0|2|SECOND|1.000|-1.000|2|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000||3.000 +0|3|SECOND|1.000|1.000|2|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000||4.000 +0|4|SECOND|2.000|2.000|2|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000|5.000|5.000 +10|11|SECOND|0.000|0.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|| +10|12|SECOND|1.000|-1.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|| +10|13|SECOND|1.000|1.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000||4.000 +10|14|SECOND|2.000|2.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|5.000|5.000 +|0|SECOND|-2.000|-2.000|4|4|1.000|1.000|0.000|0.000|0|1|32BF|0.000|1.000|1.000 +|1|SECOND|0.000|0.000|2|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000|2.000|2.000 +|2|SECOND|1.000|-1.000|2|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000|3.000|3.000 +|3|SECOND|1.000|1.000|2|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000|4.000|4.000 +|4|SECOND|2.000|2.000|2|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000|5.000|5.000 +|10|SECOND|-2.000|-2.000|4|4|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|1.000|1.000 +|11|SECOND|0.000|0.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|2.000|2.000 +|12|SECOND|1.000|-1.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|3.000|3.000 +|13|SECOND|1.000|1.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|4.000|4.000 +|14|SECOND|2.000|2.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|5.000|5.000 +0||SECOND|||||||||||||| +1||SECOND|||||||||||||| +2||SECOND|||||||||||||| +3||SECOND|||||||||||||| +4||SECOND|||||||||||||| +10||SECOND|||||||||||||| +11||SECOND|||||||||||||| +12||SECOND|||||||||||||| +13||SECOND|||||||||||||| +14||SECOND|||||||||||||| +||SECOND|||||||||||||| diff -Nru postgis-1.5.3/raster/test/regress/rt_mapalgebraexpr_expected postgis-2.0.1/raster/test/regress/rt_mapalgebraexpr_expected --- postgis-1.5.3/raster/test/regress/rt_mapalgebraexpr_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_mapalgebraexpr_expected 2012-06-07 15:58:02.000000000 +0000 @@ -0,0 +1,26 @@ +NOTICE: Raster is NULL. Returning NULL +t +NOTICE: Raster is empty. Returning an empty raster +T1|t +NOTICE: Raster does not have the required band. Returning a raster without a band +T2|t +T3||19 +T4||2 +T5||2 +T6||-1 +T7|100|15 +T8|100|120 +T9|101|3 +T10.6.2|10|40 +T10.6.3|10|30 +T10.6.4|10|25 +T10.7.2|10|45 +T10.7.3|10|34 +T10.7.4|10|28 +T10.8.2|10|50 +T10.8.3|10|37 +T10.8.4|10|30 +ERROR: division by zero +T11.1|10|2 +T11.2|10|2 +T12|t|t|t|t diff -Nru postgis-1.5.3/raster/test/regress/rt_mapalgebrafct.sql postgis-2.0.1/raster/test/regress/rt_mapalgebrafct.sql --- postgis-1.5.3/raster/test/regress/rt_mapalgebrafct.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_mapalgebrafct.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,35 @@ +-- Test NULL raster +SELECT ST_MapAlgebraFct(NULL, 1, NULL, 'raster_plus_twenty(float, text[])'::regprocedure) IS NULL FROM ST_TestRaster(0, 0, -1) rast; +SELECT ST_MapAlgebraFct(NULL, 1, NULL, 'raster_plus_twenty(float, text[])'::regprocedure, NULL) IS NULL FROM ST_TestRaster(0, 0, -1) rast; + +-- Test empty raster +SELECT ST_IsEmpty(ST_MapAlgebraFct(ST_MakeEmptyRaster(0, 10, 0, 0, 1, 1, 1, 1, 0), 1, NULL, 'raster_plus_twenty(float, text[])'::regprocedure)); +SELECT ST_IsEmpty(ST_MapAlgebraFct(ST_MakeEmptyRaster(0, 10, 0, 0, 1, 1, 1, 1, 0), 1, NULL, 'raster_plus_twenty(float, text[])'::regprocedure, NULL)); + +-- Test hasnoband raster +SELECT ST_HasNoBand(ST_MapAlgebraFct(ST_MakeEmptyRaster(10, 10, 0, 0, 1, 1, 1, 1, 0), 1, NULL, 'raster_plus_twenty(float, text[])'::regprocedure)); +SELECT ST_HasNoBand(ST_MapAlgebraFct(ST_MakeEmptyRaster(10, 10, 0, 0, 1, 1, 1, 1, 0), 1, NULL, 'raster_plus_twenty(float, text[])'::regprocedure, NULL)); + +-- Test hasnodata value +SELECT ST_Value(rast, 1, 1), ST_Value(ST_MapAlgebraFct(ST_SetBandNoDataValue(rast, NULL), 1, NULL, 'raster_plus_twenty(float, text[])'::regprocedure), 1, 1) FROM ST_TestRaster(0, 0, -1) rast; +SELECT ST_Value(rast, 1, 1), ST_Value(ST_MapAlgebraFct(ST_SetBandNoDataValue(rast, NULL), 1, NULL, 'raster_plus_twenty(float, text[])'::regprocedure, NULL), 1, 1) FROM ST_TestRaster(0, 0, -1) rast; + +-- Test user function +SELECT ST_Value(rast, 1, 1), ST_Value(ST_MapAlgebraFct(rast, 1, NULL, 'raster_plus_twenty(float, text[])'::regprocedure), 1, 1) FROM ST_TestRaster(0, 0, -1) rast; +SELECT ST_Value(rast, 1, 1), ST_Value(ST_MapAlgebraFct(ST_SetBandNoDataValue(rast, NULL), 1, NULL, 'raster_plus_twenty(float, text[])'::regprocedure, NULL), 1, 1) FROM ST_TestRaster(0, 0, -1) rast; + +-- Test pixeltype +SELECT ST_Value(rast, 1, 1), ST_Value(ST_MapAlgebraFct(rast, 1, '4BUI', 'raster_plus_twenty(float, text[])'::regprocedure), 1, 1) FROM ST_TestRaster(0, 0, 100) rast; +SELECT ST_Value(rast, 1, 1), ST_Value(ST_MapAlgebraFct(rast, 1, '4BUId', 'raster_plus_twenty(float, text[])'::regprocedure), 1, 1) FROM ST_TestRaster(0, 0, 100) rast; +SELECT ST_Value(rast, 1, 1), ST_Value(ST_MapAlgebraFct(rast, 1, '2BUI', 'raster_plus_twenty(float, text[])'::regprocedure), 1, 1) FROM ST_TestRaster(0, 0, 101) rast; + +-- Test user callbacks +SELECT ST_Value(rast, 1, 1) + 13, ST_Value(ST_MapAlgebraFct(rast, 1, NULL, 'raster_plus_arg1(float, text[])'::regprocedure, '13'), 1, 1) FROM ST_TestRaster(0, 0, 200) AS rast; + +SELECT ST_Value(rast, 1, 1) * 21 + 14, ST_Value(ST_MapAlgebraFct(rast, 1, NULL, 'raster_polynomial(float, text[])'::regprocedure, '21', '14'), 1, 1) FROM ST_TestRaster(0, 0, 300) AS rast; + +-- Test null return from a user function = NODATA cell value +SELECT ST_Value(rast, 1, 1), ST_Value(ST_MapAlgebraFct(rast, 1, NULL, 'raster_nullage(float, text[])'::regprocedure), 1, 1) FROM ST_TestRaster(0, 0, 100) AS rast; + +SELECT ST_Value(rast, 3, 8) + 13 + 3, ST_Value(ST_MapAlgebraFct(rast, 1, NULL, 'raster_x_plus_arg(float, int[], text[])'::regprocedure, '13'), 3, 8) FROM ST_TestRaster(0, 0, 100) AS rast; +SELECT ST_Value(rast, 3, 8) + 13 + 8, ST_Value(ST_MapAlgebraFct(rast, 1, NULL, 'raster_y_plus_arg(float, int[], text[])'::regprocedure, '13'), 3, 8) FROM ST_TestRaster(0, 0, 100) AS rast; diff -Nru postgis-1.5.3/raster/test/regress/rt_mapalgebrafct_2raster.sql postgis-2.0.1/raster/test/regress/rt_mapalgebrafct_2raster.sql --- postgis-1.5.3/raster/test/regress/rt_mapalgebrafct_2raster.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_mapalgebrafct_2raster.sql 2012-03-13 16:13:48.000000000 +0000 @@ -0,0 +1,344 @@ +DROP TABLE IF EXISTS raster_mapalgebra; +CREATE TABLE raster_mapalgebra ( + rid integer, + rast raster +); +DROP TABLE IF EXISTS raster_mapalgebra_out; +CREATE TABLE raster_mapalgebra_out ( + rid1 integer, + rid2 integer, + extent varchar, + rast raster +); +CREATE OR REPLACE FUNCTION make_test_raster( + rid integer, + width integer DEFAULT 2, + height integer DEFAULT 2, + ul_x double precision DEFAULT 0, + ul_y double precision DEFAULT 0, + skew_x double precision DEFAULT 0, + skew_y double precision DEFAULT 0, + initvalue double precision DEFAULT 1, + nodataval double precision DEFAULT 0 +) + RETURNS void + AS $$ + DECLARE + x int; + y int; + rast raster; + BEGIN + rast := ST_MakeEmptyRaster(width, height, ul_x, ul_y, 1, 1, skew_x, skew_y, 0); + rast := ST_AddBand(rast, 1, '8BUI', initvalue, nodataval); + + INSERT INTO raster_mapalgebra VALUES (rid, rast); + + RETURN; + END; + $$ LANGUAGE 'plpgsql'; +-- no skew +SELECT make_test_raster(0, 4, 4, -2, -2); +SELECT make_test_raster(1, 2, 2, 0, 0, 0, 0, 2); +SELECT make_test_raster(2, 2, 2, 1, -1, 0, 0, 3); +SELECT make_test_raster(3, 2, 2, 1, 1, 0, 0, 4); +SELECT make_test_raster(4, 2, 2, 2, 2, 0, 0, 5); + +-- skew +SELECT make_test_raster(10, 4, 4, -2, -2, 1, -1); +SELECT make_test_raster(11, 2, 2, 0, 0, 1, -1, 2); +SELECT make_test_raster(12, 2, 2, 1, -1, 1, -1, 3); +SELECT make_test_raster(13, 2, 2, 1, 1, 1, -1, 4); +SELECT make_test_raster(14, 2, 2, 2, 2, 1, -1, 5); + +DROP FUNCTION IF EXISTS make_test_raster(integer, integer, integer, double precision, double precision, double precision, double precision, double precision, double precision); + +CREATE OR REPLACE FUNCTION raster_mapalgebra_intersection( + rast1 double precision, + rast2 double precision, + xy int[], + VARIADIC userargs text[] +) + RETURNS double precision + AS $$ + DECLARE + BEGIN + IF rast1 IS NOT NULL AND rast2 IS NOT NULL THEN + RETURN rast1; + ELSE + RETURN NULL; + END IF; + + RETURN NULL; + END; + $$ LANGUAGE 'plpgsql' IMMUTABLE; + +CREATE OR REPLACE FUNCTION raster_mapalgebra_union( + rast1 double precision, + rast2 double precision, + VARIADIC userargs text[] +) + RETURNS double precision + AS $$ + DECLARE + BEGIN + CASE + WHEN rast1 IS NOT NULL AND rast2 IS NOT NULL THEN + RETURN ((rast1 + rast2)/2.); + WHEN rast1 IS NULL AND rast2 IS NULL THEN + RETURN NULL; + WHEN rast1 IS NULL THEN + RETURN rast2; + ELSE + RETURN rast1; + END CASE; + + RETURN NULL; + END; + $$ LANGUAGE 'plpgsql' IMMUTABLE; + +CREATE OR REPLACE FUNCTION raster_mapalgebra_first( + rast1 double precision, + rast2 double precision, + VARIADIC userargs text[] +) + RETURNS double precision + AS $$ + DECLARE + BEGIN + CASE + WHEN rast1 IS NOT NULL AND rast2 IS NOT NULL THEN + RETURN NULL; + WHEN rast1 IS NOT NULL THEN + RETURN rast1; + ELSE + RETURN NULL; + END CASE; + + RETURN NULL; + END; + $$ LANGUAGE 'plpgsql' IMMUTABLE; + +CREATE OR REPLACE FUNCTION raster_mapalgebra_second( + rast1 double precision, + rast2 double precision, + VARIADIC userargs text[] +) + RETURNS double precision + AS $$ + DECLARE + BEGIN + CASE + WHEN rast1 IS NOT NULL AND rast2 IS NOT NULL THEN + RETURN NULL; + WHEN rast2 IS NOT NULL THEN + RETURN rast2; + ELSE + RETURN NULL; + END CASE; + + RETURN NULL; + END; + $$ LANGUAGE 'plpgsql'; + +-- INTERSECTION +INSERT INTO raster_mapalgebra_out + (SELECT r1.rid, r2.rid, 'INTERSECTION', st_mapalgebrafct( + r1.rast, r2.rast, 'raster_mapalgebra_intersection(double precision, double precision, int[], text[])'::regprocedure, '32BF', 'INTERSECTION' + ) + FROM raster_mapalgebra r1 + JOIN raster_mapalgebra r2 + ON r1.rid != r2.rid + WHERE r1.rid = 0 + AND r2.rid BETWEEN 1 AND 9 + ) UNION ALL ( + SELECT r1.rid, r2.rid, 'INTERSECTION', st_mapalgebrafct( + r1.rast, r2.rast, 'raster_mapalgebra_intersection(double precision, double precision, int[], text[])'::regprocedure, '32BF', 'INTERSECTION' + ) + FROM raster_mapalgebra r1 + JOIN raster_mapalgebra r2 + ON r1.rid != r2.rid + WHERE r1.rid = 10 + AND r2.rid BETWEEN 11 AND 19) +; + +INSERT INTO raster_mapalgebra_out + SELECT NULL AS rid, rid, 'INTERSECTION', st_mapalgebrafct( + NULL::raster, rast, 'raster_mapalgebra_intersection(double precision, double precision, int[], text[])'::regprocedure, '32BF', 'INTERSECTION' + ) + FROM raster_mapalgebra +; + +INSERT INTO raster_mapalgebra_out + SELECT rid, NULL AS rid, 'INTERSECTION', st_mapalgebrafct( + rast, NULL::raster, 'raster_mapalgebra_intersection(double precision, double precision, int[], text[])'::regprocedure, '32BF', 'INTERSECTION' + ) + FROM raster_mapalgebra +; + +INSERT INTO raster_mapalgebra_out + SELECT NULL AS rid, NULL AS rid, 'INTERSECTION', st_mapalgebrafct( + NULL::raster, NULL::raster, 'raster_mapalgebra_intersection(double precision, double precision, int[], text[])'::regprocedure, '32BF', 'INTERSECTION' + ) +; + +-- UNION +INSERT INTO raster_mapalgebra_out + (SELECT r1.rid, r2.rid, 'UNION', st_mapalgebrafct( + r1.rast, r2.rast, 'raster_mapalgebra_union(double precision, double precision, text[])'::regprocedure, '32BF', 'UNION' + ) + FROM raster_mapalgebra r1 + JOIN raster_mapalgebra r2 + ON r1.rid != r2.rid + WHERE r1.rid = 0 + AND r2.rid BETWEEN 1 AND 9 + ) UNION ALL ( + SELECT r1.rid, r2.rid, 'UNION', st_mapalgebrafct( + r1.rast, r2.rast, 'raster_mapalgebra_union(double precision, double precision, text[])'::regprocedure, '32BF', 'UNION' + ) + FROM raster_mapalgebra r1 + JOIN raster_mapalgebra r2 + ON r1.rid != r2.rid + WHERE r1.rid = 10 + AND r2.rid BETWEEN 11 AND 19) +; + +INSERT INTO raster_mapalgebra_out + SELECT NULL AS rid, rid, 'UNION', st_mapalgebrafct( + NULL::raster, rast, 'raster_mapalgebra_union(double precision, double precision, text[])'::regprocedure, '32BF', 'UNION' + ) + FROM raster_mapalgebra +; + +INSERT INTO raster_mapalgebra_out + SELECT rid, NULL AS rid, 'UNION', st_mapalgebrafct( + rast, NULL::raster, 'raster_mapalgebra_union(double precision, double precision, text[])'::regprocedure, '32BF', 'UNION' + ) + FROM raster_mapalgebra +; + +INSERT INTO raster_mapalgebra_out + SELECT NULL AS rid, NULL AS rid, 'UNION', st_mapalgebrafct( + NULL::raster, NULL::raster, 'raster_mapalgebra_union(double precision, double precision, text[])'::regprocedure, '32BF', 'UNION' + ) +; + +-- FIRST +INSERT INTO raster_mapalgebra_out + (SELECT r1.rid, r2.rid, 'FIRST', st_mapalgebrafct( + r1.rast, r2.rast, 'raster_mapalgebra_first(double precision, double precision, text[])'::regprocedure, '32BF', 'FIRST' + ) + FROM raster_mapalgebra r1 + JOIN raster_mapalgebra r2 + ON r1.rid != r2.rid + WHERE r1.rid = 0 + AND r2.rid BETWEEN 1 AND 9 + ) UNION ALL ( + SELECT r1.rid, r2.rid, 'FIRST', st_mapalgebrafct( + r1.rast, r2.rast, 'raster_mapalgebra_first(double precision, double precision, text[])'::regprocedure, '32BF', 'FIRST' + ) + FROM raster_mapalgebra r1 + JOIN raster_mapalgebra r2 + ON r1.rid != r2.rid + WHERE r1.rid = 10 + AND r2.rid BETWEEN 11 AND 19) +; + +INSERT INTO raster_mapalgebra_out + SELECT NULL AS rid, rid, 'FIRST', st_mapalgebrafct( + NULL::raster, rast, 'raster_mapalgebra_first(double precision, double precision, text[])'::regprocedure, '32BF', 'FIRST' + ) + FROM raster_mapalgebra +; + +INSERT INTO raster_mapalgebra_out + SELECT rid, NULL AS rid, 'FIRST', st_mapalgebrafct( + rast, NULL::raster, 'raster_mapalgebra_first(double precision, double precision, text[])'::regprocedure, '32BF', 'FIRST' + ) + FROM raster_mapalgebra +; + +INSERT INTO raster_mapalgebra_out + SELECT NULL AS rid, NULL AS rid, 'FIRST', st_mapalgebrafct( + NULL::raster, NULL::raster, 'raster_mapalgebra_first(double precision, double precision, text[])'::regprocedure, '32BF', 'FIRST' + ) +; + +-- SECOND +INSERT INTO raster_mapalgebra_out + (SELECT r1.rid, r2.rid, 'SECOND', st_mapalgebrafct( + r1.rast, r2.rast, 'raster_mapalgebra_second(double precision, double precision, text[])'::regprocedure, '32BF', 'SECOND' + ) + FROM raster_mapalgebra r1 + JOIN raster_mapalgebra r2 + ON r1.rid != r2.rid + WHERE r1.rid = 0 + AND r2.rid BETWEEN 1 AND 9 + ) UNION ALL ( + SELECT r1.rid, r2.rid, 'SECOND', st_mapalgebrafct( + r1.rast, r2.rast, 'raster_mapalgebra_second(double precision, double precision, text[])'::regprocedure, '32BF', 'SECOND' + ) + FROM raster_mapalgebra r1 + JOIN raster_mapalgebra r2 + ON r1.rid != r2.rid + WHERE r1.rid = 10 + AND r2.rid BETWEEN 11 AND 19) +; + +INSERT INTO raster_mapalgebra_out + SELECT NULL AS rid, rid, 'SECOND', st_mapalgebrafct( + NULL::raster, rast, 'raster_mapalgebra_second(double precision, double precision, text[])'::regprocedure, '32BF', 'SECOND' + ) + FROM raster_mapalgebra +; + +INSERT INTO raster_mapalgebra_out + SELECT rid, NULL AS rid, 'SECOND', st_mapalgebrafct( + rast, NULL::raster, 'raster_mapalgebra_second(double precision, double precision, text[])'::regprocedure, '32BF', 'SECOND' + ) + FROM raster_mapalgebra +; + +INSERT INTO raster_mapalgebra_out + SELECT NULL AS rid, NULL AS rid, 'SECOND', st_mapalgebrafct( + NULL::raster, NULL::raster, 'raster_mapalgebra_second(double precision, double precision, text[])'::regprocedure, '32BF', 'SECOND' + ) +; + +-- output +SELECT + rid1, + rid2, + extent, + round(upperleftx::numeric, 3) AS upperleftx, + round(upperlefty::numeric, 3) AS upperlefty, + width, + height, + round(scalex::numeric, 3) AS scalex, + round(scaley::numeric, 3) AS scaley, + round(skewx::numeric, 3) AS skewx, + round(skewy::numeric, 3) AS skewy, + srid, + numbands, + pixeltype, + round(nodatavalue::numeric, 3) AS nodatavalue, + round(firstvalue::numeric, 3) AS firstvalue, + round(lastvalue::numeric, 3) AS lastvalue +FROM ( + SELECT + rid1, + rid2, + extent, + (ST_Metadata(rast)).*, + (ST_BandMetadata(rast, 1)).*, + ST_Value(rast, 1, 1, 1) AS firstvalue, + ST_Value(rast, 1, ST_Width(rast), ST_Height(rast)) AS lastvalue + FROM raster_mapalgebra_out +) AS r; + +DROP FUNCTION IF EXISTS raster_mapalgebra_intersection(double precision, double precision, int[], VARIADIC text[]); +DROP FUNCTION IF EXISTS raster_mapalgebra_union(double precision, double precision, VARIADIC text[]); +DROP FUNCTION IF EXISTS raster_mapalgebra_first(double precision, double precision, VARIADIC text[]); +DROP FUNCTION IF EXISTS raster_mapalgebra_second(double precision, double precision, VARIADIC text[]); + +DROP TABLE IF EXISTS raster_mapalgebra; +DROP TABLE IF EXISTS raster_mapalgebra_out; diff -Nru postgis-1.5.3/raster/test/regress/rt_mapalgebrafct_2raster_expected postgis-2.0.1/raster/test/regress/rt_mapalgebrafct_2raster_expected --- postgis-1.5.3/raster/test/regress/rt_mapalgebrafct_2raster_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_mapalgebrafct_2raster_expected 2012-03-13 16:13:48.000000000 +0000 @@ -0,0 +1,270 @@ +NOTICE: table "raster_mapalgebra" does not exist, skipping +NOTICE: table "raster_mapalgebra_out" does not exist, skipping +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided have no intersection. Returning no band raster +NOTICE: The two rasters provided are NULL. Returning NULL +NOTICE: The two rasters provided are NULL. Returning NULL +NOTICE: The FIRST raster is NULL. Returning NULL +NOTICE: The FIRST raster is NULL. Returning NULL +NOTICE: The FIRST raster is NULL. Returning NULL +NOTICE: The FIRST raster is NULL. Returning NULL +NOTICE: The FIRST raster is NULL. Returning NULL +NOTICE: The FIRST raster is NULL. Returning NULL +NOTICE: The FIRST raster is NULL. Returning NULL +NOTICE: The FIRST raster is NULL. Returning NULL +NOTICE: The FIRST raster is NULL. Returning NULL +NOTICE: The FIRST raster is NULL. Returning NULL +NOTICE: The two rasters provided are NULL. Returning NULL +NOTICE: Function provided is VOLATILE. Unless required and for best performance, function should be IMMUTABLE or STABLE +NOTICE: Function provided is VOLATILE. Unless required and for best performance, function should be IMMUTABLE or STABLE +NOTICE: Function provided is VOLATILE. Unless required and for best performance, function should be IMMUTABLE or STABLE +NOTICE: Function provided is VOLATILE. Unless required and for best performance, function should be IMMUTABLE or STABLE +NOTICE: Function provided is VOLATILE. Unless required and for best performance, function should be IMMUTABLE or STABLE +NOTICE: Function provided is VOLATILE. Unless required and for best performance, function should be IMMUTABLE or STABLE +NOTICE: Function provided is VOLATILE. Unless required and for best performance, function should be IMMUTABLE or STABLE +NOTICE: Function provided is VOLATILE. Unless required and for best performance, function should be IMMUTABLE or STABLE +NOTICE: Function provided is VOLATILE. Unless required and for best performance, function should be IMMUTABLE or STABLE +NOTICE: Function provided is VOLATILE. Unless required and for best performance, function should be IMMUTABLE or STABLE +NOTICE: Function provided is VOLATILE. Unless required and for best performance, function should be IMMUTABLE or STABLE +NOTICE: Function provided is VOLATILE. Unless required and for best performance, function should be IMMUTABLE or STABLE +NOTICE: Function provided is VOLATILE. Unless required and for best performance, function should be IMMUTABLE or STABLE +NOTICE: Function provided is VOLATILE. Unless required and for best performance, function should be IMMUTABLE or STABLE +NOTICE: Function provided is VOLATILE. Unless required and for best performance, function should be IMMUTABLE or STABLE +NOTICE: Function provided is VOLATILE. Unless required and for best performance, function should be IMMUTABLE or STABLE +NOTICE: Function provided is VOLATILE. Unless required and for best performance, function should be IMMUTABLE or STABLE +NOTICE: Function provided is VOLATILE. Unless required and for best performance, function should be IMMUTABLE or STABLE +NOTICE: The SECOND raster is NULL. Returning NULL +NOTICE: The SECOND raster is NULL. Returning NULL +NOTICE: The SECOND raster is NULL. Returning NULL +NOTICE: The SECOND raster is NULL. Returning NULL +NOTICE: The SECOND raster is NULL. Returning NULL +NOTICE: The SECOND raster is NULL. Returning NULL +NOTICE: The SECOND raster is NULL. Returning NULL +NOTICE: The SECOND raster is NULL. Returning NULL +NOTICE: The SECOND raster is NULL. Returning NULL +NOTICE: The SECOND raster is NULL. Returning NULL +NOTICE: The two rasters provided are NULL. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Raster provided has no bands +NOTICE: Raster provided has no bands +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +NOTICE: Could not find raster band of index 1 when getting pixel value. Returning NULL +0|1|INTERSECTION|0.000|0.000|2|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000|1.000|1.000 +0|2|INTERSECTION|1.000|-1.000|1|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000|1.000|1.000 +0|3|INTERSECTION|1.000|1.000|1|1|1.000|1.000|0.000|0.000|0|1|32BF|0.000|1.000|1.000 +0|4|INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +10|11|INTERSECTION|0.000|0.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|1.000|1.000 +10|12|INTERSECTION|1.000|-1.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|1.000|1.000 +10|13|INTERSECTION|1.000|1.000|2|1|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|1.000|1.000 +10|14|INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +|0|INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +|1|INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +|2|INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +|3|INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +|4|INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +|10|INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +|11|INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +|12|INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +|13|INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +|14|INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +0||INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +1||INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +2||INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +3||INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +4||INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +10||INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +11||INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +12||INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +13||INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +14||INTERSECTION|0.000|0.000|0|0|0.000|0.000|0.000|0.000|0|0|||| +||INTERSECTION|||||||||||||| +0|1|UNION|-2.000|-2.000|4|4|1.000|1.000|0.000|0.000|0|1|32BF|0.000|1.000|1.500 +0|2|UNION|-2.000|-2.000|5|4|1.000|1.000|0.000|0.000|0|1|32BF|0.000|1.000| +0|3|UNION|-2.000|-2.000|5|5|1.000|1.000|0.000|0.000|0|1|32BF|0.000|1.000|4.000 +0|4|UNION|-2.000|-2.000|6|6|1.000|1.000|0.000|0.000|0|1|32BF|0.000|1.000|5.000 +10|11|UNION|-2.000|-2.000|4|4|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|1.000|1.000 +10|12|UNION|-2.000|-2.000|4|4|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|1.000|1.000 +10|13|UNION|-2.000|-2.000|4|5|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|1.000| +10|14|UNION|-2.000|-2.000|4|6|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|1.000| +|0|UNION|-2.000|-2.000|4|4|1.000|1.000|0.000|0.000|0|1|32BF|0.000|1.000|1.000 +|1|UNION|0.000|0.000|2|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000|2.000|2.000 +|2|UNION|1.000|-1.000|2|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000|3.000|3.000 +|3|UNION|1.000|1.000|2|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000|4.000|4.000 +|4|UNION|2.000|2.000|2|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000|5.000|5.000 +|10|UNION|-2.000|-2.000|4|4|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|1.000|1.000 +|11|UNION|0.000|0.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|2.000|2.000 +|12|UNION|1.000|-1.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|3.000|3.000 +|13|UNION|1.000|1.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|4.000|4.000 +|14|UNION|2.000|2.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|5.000|5.000 +0||UNION|-2.000|-2.000|4|4|1.000|1.000|0.000|0.000|0|1|32BF|0.000|1.000|1.000 +1||UNION|0.000|0.000|2|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000|2.000|2.000 +2||UNION|1.000|-1.000|2|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000|3.000|3.000 +3||UNION|1.000|1.000|2|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000|4.000|4.000 +4||UNION|2.000|2.000|2|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000|5.000|5.000 +10||UNION|-2.000|-2.000|4|4|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|1.000|1.000 +11||UNION|0.000|0.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|2.000|2.000 +12||UNION|1.000|-1.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|3.000|3.000 +13||UNION|1.000|1.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|4.000|4.000 +14||UNION|2.000|2.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|5.000|5.000 +||UNION|||||||||||||| +0|1|FIRST|-2.000|-2.000|4|4|1.000|1.000|0.000|0.000|0|1|32BF|0.000|1.000| +0|2|FIRST|-2.000|-2.000|4|4|1.000|1.000|0.000|0.000|0|1|32BF|0.000|1.000|1.000 +0|3|FIRST|-2.000|-2.000|4|4|1.000|1.000|0.000|0.000|0|1|32BF|0.000|1.000| +0|4|FIRST|-2.000|-2.000|4|4|1.000|1.000|0.000|0.000|0|1|32BF|0.000|1.000|1.000 +10|11|FIRST|-2.000|-2.000|4|4|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|1.000|1.000 +10|12|FIRST|-2.000|-2.000|4|4|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|1.000|1.000 +10|13|FIRST|-2.000|-2.000|4|4|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|1.000|1.000 +10|14|FIRST|-2.000|-2.000|4|4|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|1.000|1.000 +|0|FIRST|||||||||||||| +|1|FIRST|||||||||||||| +|2|FIRST|||||||||||||| +|3|FIRST|||||||||||||| +|4|FIRST|||||||||||||| +|10|FIRST|||||||||||||| +|11|FIRST|||||||||||||| +|12|FIRST|||||||||||||| +|13|FIRST|||||||||||||| +|14|FIRST|||||||||||||| +0||FIRST|-2.000|-2.000|4|4|1.000|1.000|0.000|0.000|0|1|32BF|0.000|1.000|1.000 +1||FIRST|0.000|0.000|2|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000|2.000|2.000 +2||FIRST|1.000|-1.000|2|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000|3.000|3.000 +3||FIRST|1.000|1.000|2|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000|4.000|4.000 +4||FIRST|2.000|2.000|2|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000|5.000|5.000 +10||FIRST|-2.000|-2.000|4|4|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|1.000|1.000 +11||FIRST|0.000|0.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|2.000|2.000 +12||FIRST|1.000|-1.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|3.000|3.000 +13||FIRST|1.000|1.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|4.000|4.000 +14||FIRST|2.000|2.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|5.000|5.000 +||FIRST|||||||||||||| +0|1|SECOND|0.000|0.000|2|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000|| +0|2|SECOND|1.000|-1.000|2|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000||3.000 +0|3|SECOND|1.000|1.000|2|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000||4.000 +0|4|SECOND|2.000|2.000|2|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000|5.000|5.000 +10|11|SECOND|0.000|0.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|| +10|12|SECOND|1.000|-1.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|| +10|13|SECOND|1.000|1.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000||4.000 +10|14|SECOND|2.000|2.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|5.000|5.000 +|0|SECOND|-2.000|-2.000|4|4|1.000|1.000|0.000|0.000|0|1|32BF|0.000|1.000|1.000 +|1|SECOND|0.000|0.000|2|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000|2.000|2.000 +|2|SECOND|1.000|-1.000|2|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000|3.000|3.000 +|3|SECOND|1.000|1.000|2|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000|4.000|4.000 +|4|SECOND|2.000|2.000|2|2|1.000|1.000|0.000|0.000|0|1|32BF|0.000|5.000|5.000 +|10|SECOND|-2.000|-2.000|4|4|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|1.000|1.000 +|11|SECOND|0.000|0.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|2.000|2.000 +|12|SECOND|1.000|-1.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|3.000|3.000 +|13|SECOND|1.000|1.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|4.000|4.000 +|14|SECOND|2.000|2.000|2|2|1.000|1.000|1.000|-1.000|0|1|32BF|0.000|5.000|5.000 +0||SECOND|||||||||||||| +1||SECOND|||||||||||||| +2||SECOND|||||||||||||| +3||SECOND|||||||||||||| +4||SECOND|||||||||||||| +10||SECOND|||||||||||||| +11||SECOND|||||||||||||| +12||SECOND|||||||||||||| +13||SECOND|||||||||||||| +14||SECOND|||||||||||||| +||SECOND|||||||||||||| diff -Nru postgis-1.5.3/raster/test/regress/rt_mapalgebrafct_expected postgis-2.0.1/raster/test/regress/rt_mapalgebrafct_expected --- postgis-1.5.3/raster/test/regress/rt_mapalgebrafct_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_mapalgebrafct_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,124 @@ +WARNING: Raster is NULL. Returning NULL +t +WARNING: Raster is NULL. Returning NULL +t +NOTICE: Raster is empty. Returning an empty raster +t +NOTICE: Raster is empty. Returning an empty raster +t +NOTICE: Raster does not have the required band. Returning a raster without a band +t +NOTICE: Raster does not have the required band. Returning a raster without a band +t +|19 +|19 +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +NOTICE: Pixel value is null. +| +|19 +100|15 +100|120 +101|3 +213|213 +6314|6314 +100| +116|116 +121|121 diff -Nru postgis-1.5.3/raster/test/regress/rt_mapalgebrafctngb.sql postgis-2.0.1/raster/test/regress/rt_mapalgebrafctngb.sql --- postgis-1.5.3/raster/test/regress/rt_mapalgebrafctngb.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_mapalgebrafctngb.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,233 @@ +-- Tests +-- Test NULL Raster. Should be true. +SELECT ST_MapAlgebraFctNgb(NULL, 1, NULL, 1, 1, 'ST_Sum4ma(float[][], text, text[])'::regprocedure, 'NULL', NULL) IS NULL FROM ST_TestRasterNgb(0, 0, -1) rast; + +-- Test empty Raster. Should be true. +SELECT ST_IsEmpty(ST_MapAlgebraFctNgb(ST_MakeEmptyRaster(0, 10, 0, 0, 1, 1, 1, 1, 0), 1, NULL, 1, 1, 'ST_Sum4ma(float[][], text, text[])'::regprocedure, 'NULL', NULL)); + +-- Test has no band raster. Should be true +SELECT ST_HasNoBand(ST_MapAlgebraFctNgb(ST_MakeEmptyRaster(10, 10, 0, 0, 1, 1, 1, 1, 0), 1, NULL, 1, 1, 'ST_Sum4ma(float[][], text, text[])'::regprocedure, 'NULL', NULL)); + +-- Test huge neighborhood. Original raster returned. +SELECT + ST_Value(rast, 2, 2) = 1, + ST_Value(ST_MapAlgebraFctNgb( + rast, 1, NULL, 5, 5, 'ST_Sum4ma(float[][], text, text[])'::regprocedure, 'NULL', NULL + ), 2, 2) = 1 + FROM ST_TestRasterNgb(3, 3, 1) AS rast; + +-- Test negative width neighborhood. Original raster returned. +SELECT + ST_Value(rast, 2, 2) = 1, + ST_Value( + ST_MapAlgebraFctNgb( + rast, 1, NULL, -1, 1, 'ST_Sum4ma(float[][], text, text[])'::regprocedure, 'NULL', NULL + ), 2, 2) = 1 + FROM ST_TestRasterNgb(3, 3, 1) AS rast; + +-- Test negative height neighborhood. Original raster returned. +SELECT + ST_Value(rast, 2, 2) = 1, + ST_Value( + ST_MapAlgebraFctNgb( + rast, 1, NULL, 1, -1, 'ST_Sum4ma(float[][], text, text[])'::regprocedure, 'NULL', NULL + ), 2, 2) = 1 + FROM ST_TestRasterNgb(3, 3, 1) AS rast; + +-- Test has no nodata value. Should return null and 7. +SELECT + ST_Value(rast, 2, 2) IS NULL, + ST_Value( + ST_MapAlgebraFctNgb( + ST_SetBandNoDataValue(rast, NULL), 1, NULL, 1, 1, 'ST_Sum4ma(float[][], text, text[])'::regprocedure, 'NULL', NULL + ), 2, 2) = 7 + FROM ST_SetValue(ST_TestRasterNgb(3, 3, 1), 2, 2, NULL) AS rast; + +---- Test NULL nodatamode. Should return null and null. +SELECT + ST_Value(rast, 2, 2) IS NULL, + ST_Value( + ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'ST_Sum4ma(float[][], text, text[])'::regprocedure, 'NULL', NULL), 2, 2 + ) IS NULL + FROM ST_SetValue(ST_TestRasterNgb(3, 3, 1), 2, 2, NULL) AS rast; + +---- Test default nodatamode (ignore). Should return null and 8. +SELECT + ST_Value(rast, 2, 2) IS NULL, + ST_Value( + ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'ST_Sum4ma(float[][], text, text[])'::regprocedure, NULL, NULL), 2, 2 + ) = 8 + FROM ST_SetValue(ST_TestRasterNgb(3, 3, 1), 2, 2, NULL) AS rast; + +---- Test ignore nodatamode. Should return null and 8. +SELECT + ST_Value(rast, 2, 2) IS NULL, + ST_Value( + ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'ST_Sum4ma(float[][], text, text[])'::regprocedure, 'ignore', NULL), 2, 2 + ) = 8 + FROM ST_SetValue(ST_TestRasterNgb(3, 3, 1), 2, 2, NULL) AS rast; + +---- Test value nodatamode. Should return null and null. +SELECT + ST_Value(rast, 2, 2) IS NULL, + ST_Value( + ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'ST_Sum4ma(float[][], text, text[])'::regprocedure, 'value', NULL), 2, 2 + ) IS NULL + FROM ST_SetValue(ST_TestRasterNgb(3, 3, 1), 2, 2, NULL) AS rast; + +-- Test value nodatamode. Should return null and 9. +SELECT + ST_Value(rast, 1, 1) IS NULL, + ST_Value( + ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'ST_Sum4ma(float[][], text, text[])'::regprocedure, 'value', NULL), 2, 2 + ) = 9 + FROM ST_SetValue(ST_TestRasterNgb(3, 3, 1), 1, 1, NULL) AS rast; + +-- Test value nodatamode. Should return null and 0. +SELECT + ST_Value(rast, 2, 2) IS NULL, + ST_Value( + ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'ST_Sum4ma(float[][], text, text[])'::regprocedure, '-8', NULL), 2, 2 + ) = 0 + FROM ST_SetValue(ST_TestRasterNgb(3, 3, 1), 2, 2, NULL) AS rast; + +-- Test value nodatamode. Should return null and 128. +SELECT + ST_Value(rast, 2, 2) IS NULL, + ST_Value( + ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'ST_Sum4ma(float[][], text, text[])'::regprocedure, '120', NULL), 2, 2 + ) = 128 + FROM ST_SetValue(ST_TestRasterNgb(3, 3, 1), 2, 2, NULL) AS rast; + +-- Test value nodatamode. Should return null and null. +SELECT + ST_Value(rast, 2, 2) IS NULL, + ST_Value( + ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'ST_Sum4ma(float[][], text, text[])'::regprocedure, 'abcd', NULL), 2, 2 + ) IS NULL + FROM ST_SetValue(ST_TestRasterNgb(3, 3, 1), 2, 2, NULL) AS rast; + +-- Test ST_Sum user function. Should be 1 and 9. +SELECT + ST_Value(rast, 2, 2) = 1, + ST_Value( + ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'ST_Sum4ma(float[][], text, text[])'::regprocedure, 'NULL', NULL), 2, 2 + ) = 9 + FROM ST_TestRasterNgb(3, 3, 1) AS rast; + +-- Test ST_Sum user function on a no nodata value raster. Should be null and -1. +SELECT + ST_Value(rast, 2, 2) IS NULL, + ST_Value( + ST_MapAlgebraFctNgb(ST_SetBandNoDataValue(rast, NULL), 1, NULL, 1, 1, 'ST_Sum4ma(float[][], text, text[])'::regprocedure, 'NULL', NULL), 2, 2 + ) = -1 + FROM ST_SetValue(ST_TestRasterNgb(3, 3, 0), 2, 2, NULL) AS rast; + +-- Test pixeltype 1. Should return 2 and 15. +SELECT + ST_Value(rast, 2, 2) = 2, + ST_Value( + ST_MapAlgebraFctNgb(rast, 1, '4BUI', 1, 1, 'ST_Sum4ma(float[][], text, text[])'::regprocedure, 'NULL', NULL), 2, 2 + ) = 15 + FROM ST_SetBandNoDataValue(ST_TestRasterNgb(3, 3, 2), 1, NULL) AS rast; + +-- Test pixeltype 1. No error, changed to 32BF +SELECT + ST_Value(rast, 2, 2) = 2, + ST_Value( + ST_MapAlgebraFctNgb(rast, 1, '4BUId', 1, 1, 'ST_Sum4ma(float[][], text, text[])'::regprocedure, 'NULL', NULL), 2, 2 + ) = 18 + FROM ST_TestRasterNgb(3, 3, 2) AS rast; + +-- Test pixeltype 1. Should return 1 and 3. +SELECT + ST_Value(rast, 2, 2) = 1, + ST_Value( + ST_MapAlgebraFctNgb(rast, 1, '2BUI', 1, 1, 'ST_Sum4ma(float[][], text, text[])'::regprocedure, 'NULL', NULL), 2, 2 + ) = 3 + FROM ST_SetBandNoDataValue(ST_TestRasterNgb(3, 3, 1), 1, NULL) AS rast; + +-- Test that the neighborhood function leaves a border of NODATA +SELECT + COUNT(*) = 1 + FROM (SELECT + (ST_DumpAsPolygons( + ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'ST_Sum4ma(float[][], text, text[])'::regprocedure, 'NULL', NULL) + )).* + FROM ST_TestRasterNgb(5, 5, 1) AS rast) AS foo; + +-- Test that the neighborhood function leaves a border of NODATA +SELECT + ST_Area(geom) = 8, val = 9 + FROM (SELECT + (ST_DumpAsPolygons( + ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'ST_Sum4ma(float[][], text, text[])'::regprocedure, 'NULL', NULL) + )).* + FROM ST_SetValue(ST_TestRasterNgb(5, 5, 1), 1, 1, NULL) AS rast) AS foo; + +-- Test that the neighborhood function leaves a border of NODATA +-- plus a corner where one cell has a value of 8. +SELECT + (ST_Area(geom) = 1 AND val = 8) OR (ST_Area(geom) = 8 AND val = 9) + FROM (SELECT + (ST_DumpAsPolygons( + ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'ST_Sum4ma(float[][], text, text[])'::regprocedure, 'ignore', NULL) + )).* + FROM ST_SetValue(ST_TestRasterNgb(5, 5, 1), 1, 1, NULL) AS rast) AS foo; + +-- Test that the neighborhood function leaves a border of NODATA +-- plus a hole where 9 cells have NODATA +-- This results in a donut: a polygon with a hole. The polygon has +-- an area of 16, with a hole that has an area of 9 +SELECT + ST_NRings(geom) = 2, + ST_NumInteriorRings(geom) = 1, + ST_Area(geom) = 16, + val = 9, + ST_Area(ST_BuildArea(ST_InteriorRingN(geom, 1))) = 9 + FROM (SELECT + (ST_DumpAsPolygons( + ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'ST_Sum4ma(float[][], text, text[])'::regprocedure, 'NULL', NULL) + )).* + FROM ST_SetValue(ST_TestRasterNgb(7, 7, 1), 4, 4, NULL) AS rast) AS foo; + +-- Test that the neighborhood function leaves a border of NODATA, +-- and the center pyramids when summed twice, ignoring NODATA values +SELECT + COUNT(*) = 9, SUM(ST_Area(geom)) = 9, SUM(val) = ((36+54+36) + (54+81+54) + (36+54+36)) + FROM (SELECT + (ST_DumpAsPolygons( + ST_MapAlgebraFctNgb( + ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'ST_Sum4ma(float[][], text, text[])'::regprocedure, 'ignore', NULL), 1, NULL, 1, 1, 'ST_Sum4ma(float[][], text, text[])'::regprocedure, 'ignore', NULL + ) + )).* + FROM ST_TestRasterNgb(5, 5, 1) AS rast) AS foo; + +-- Test that the neighborhood function leaves a border of NODATA, +-- and the center contains one cel when summed twice, replacing NULL with NODATA values +SELECT + COUNT(*) = 1, SUM(ST_Area(geom)) = 1, SUM(val) = 81 + FROM (SELECT + (ST_DumpAsPolygons( + ST_MapAlgebraFctNgb( + ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'ST_Sum4ma(float[][], text, text[])'::regprocedure, 'NULL', NULL), 1, NULL, 1, 1, 'ST_Sum4ma(float[][], text, text[])'::regprocedure, 'NULL', NULL + ) + )).* + FROM ST_TestRasterNgb(5, 5, 1) AS rast) AS foo; + +-- test a user function that nullifies everything +SELECT + ST_Value(rast, 2, 2) = 2, + ST_Value( + ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'ST_Nullage(float[][], text, text[])'::regprocedure, 'NULL', NULL), 2, 2 + ) IS NULL + FROM ST_TestRasterNgb(3, 3, 2) AS rast; + +-- 'dog ate my homework' test +-- raster initialized to one NODATA value, then a literal value passed in as the 'nodatamode' parameter. +-- expect that the cells processed by the neighborhoods would be replaced by the 'nodatamode' parameter value, and not NODATA. +SELECT + ST_Value( + ST_MapAlgebraFctNgb(rast, 1, '8BUI', 1, 1, 'ST_Sum4ma(float[][], text, text[])'::regprocedure, '120', NULL), 2, 2 + ) = 200 +FROM ST_SetValue(ST_SetBandNoDataValue(ST_TestRasterNgb(3, 3, 10), 0), 2, 2, 0) AS rast; diff -Nru postgis-1.5.3/raster/test/regress/rt_mapalgebrafctngb_expected postgis-2.0.1/raster/test/regress/rt_mapalgebrafctngb_expected --- postgis-1.5.3/raster/test/regress/rt_mapalgebrafctngb_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_mapalgebrafctngb_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,36 @@ +WARNING: Raster is NULL. Returning NULL +t +NOTICE: Raster is empty. Returning an empty raster +t +NOTICE: Raster does not have the required band. Returning a raster without a band +t +t| +NOTICE: Neighborhood width is NULL or <= 0. Returning new raster with the original band +t| +NOTICE: Neighborhood height is NULL or <= 0. Returning new raster with the original band +t| +t|t +t|t +NOTICE: Neighborhood NODATA behavior defaulting to 'ignore' +t|t +t|t +t|t +t|t +t|t +t|t +NOTICE: Neighborhood NODATA mode is not recognized. Must be one of 'value', 'ignore', 'NULL', or a numeric value. Returning new raster with the original band +t|t +t|t +t|t +t|t +t|t +t|t +t +t|t +t +t +t|t|t|t|t +t|t|t +t|t|t +t|t +t diff -Nru postgis-1.5.3/raster/test/regress/rt_mapalgebrafctngb_userfunc.sql postgis-2.0.1/raster/test/regress/rt_mapalgebrafctngb_userfunc.sql --- postgis-1.5.3/raster/test/regress/rt_mapalgebrafctngb_userfunc.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_mapalgebrafctngb_userfunc.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,271 @@ +-- test st_max4ma, uniform values +SELECT + ST_Value(rast, 2, 2) = 1, + ST_Value( + ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'st_max4ma(float[][], text, text[])'::regprocedure, NULL, NULL), 2, 2 + ) = 1 + FROM ST_TestRasterNgb(3, 3, 1) AS rast; + +-- test st_max4ma, obvious max value +SELECT + ST_Value(rast, 2, 2) = 1, + ST_Value( + ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'st_max4ma(float[][], text, text[])'::regprocedure, NULL, NULL), 2, 2 + ) = 11 + FROM ST_SetValue(ST_TestRasterNgb(3, 3, 1), 1, 1, 11) AS rast; + +-- test st_max4ma, value substitution +SELECT + ST_Value(rast, 2, 2) = 1, + ST_Value( + ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'st_max4ma(float[][], text, text[])'::regprocedure, '22', NULL), 2, 2 + ) = 22 + FROM ST_SetValue(ST_TestRasterNgb(3, 3, 1), 3, 3, NULL) AS rast; + +-- test st_min4ma, uniform values +SELECT + ST_Value(rast, 2, 2) = 1, + ST_Value( + ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'st_min4ma(float[][], text, text[])'::regprocedure, NULL, NULL), 2, 2 + ) = 1 + FROM ST_TestRasterNgb(3, 3, 1) AS rast; + +-- test st_min4ma, obvious min value +SELECT + ST_Value(rast, 2, 2) = 11, + ST_Value( + ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'st_min4ma(float[][], text, text[])'::regprocedure, NULL, NULL), 2, 2 + ) = 1 + FROM ST_SetValue(ST_TestRasterNgb(3, 3, 11), 1, 1, 1) AS rast; + +-- test st_min4ma, value substitution +SELECT + ST_Value(rast, 2, 2) = 22, + ST_Value( + ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'st_min4ma(float[][], text, text[])'::regprocedure, '2', NULL), 2, 2 + ) = 2 + FROM ST_SetValue(ST_TestRasterNgb(3, 3, 22), 3, 3, NULL) AS rast; + +-- test st_sum4ma happens in rt_mapalgebrafctngb.sql + +-- test st_mean4ma, uniform values +SELECT + ST_Value(rast, 2, 2) = 1, + ST_Value( + ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'st_mean4ma(float[][], text, text[])'::regprocedure, NULL, NULL), 2, 2 + ) = 1 + FROM ST_TestRasterNgb(3, 3, 1) AS rast; + +-- test st_mean4ma, obvious min value +SELECT + ST_Value(rast, 2, 2) = 10, + ST_Value( + ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'st_mean4ma(float[][], text, text[])'::regprocedure, NULL, NULL), 2, 2 + ) = 9 + FROM ST_SetValue(ST_TestRasterNgb(3, 3, 10), 1, 1, 1) AS rast; + +-- test st_mean4ma, value substitution +SELECT + ST_Value(rast, 2, 2) = 10, + ST_Value( + ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'st_mean4ma(float[][], text, text[])'::regprocedure, '1', NULL), 2, 2 + ) = 9 + FROM ST_SetValue(ST_TestRasterNgb(3, 3, 10), 3, 3, NULL) AS rast; + +-- test st_range4ma, uniform values +SELECT + ST_Value(rast, 2, 2) = 1, + ST_Value( + ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'st_range4ma(float[][], text, text[])'::regprocedure, NULL, NULL), 2, 2 + ) = 0 + FROM ST_TestRasterNgb(3, 3, 1) AS rast; + +-- test st_range4ma, obvious min value +SELECT + ST_Value(rast, 2, 2) = 10, + ST_Value( + ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'st_range4ma(float[][], text, text[])'::regprocedure, NULL, NULL), 2, 2 + ) = 9 + FROM ST_SetValue(ST_TestRasterNgb(3, 3, 10), 1, 1, 1) AS rast; + +-- test st_range4ma, value substitution +SELECT + ST_Value(rast, 2, 2) = 10, + ST_Value( + ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'st_range4ma(float[][], text, text[])'::regprocedure, '1', NULL), 2, 2 + ) = 9 + FROM ST_SetValue(ST_TestRasterNgb(3, 3, 10), 3, 3, NULL) AS rast; + +-- test st_slope, flat plane +SELECT + ST_Value(rast, 2, 2) = 1, + ST_Value( + ST_Slope(rast, 1, NULL), 2, 2 + ) = 0 + FROM ST_TestRasterNgb(3, 3, 1) AS rast; + +-- test st_slope, corner spike +SELECT + ST_Value(rast, 2, 2) = 1, + round(degrees(ST_Value( + ST_Slope(rast, 1, NULL), 2, 2 + ))*100000) = 5784902 + FROM ST_SetValue(ST_TestRasterNgb(3, 3, 1), 1, 1, 10) AS rast; + +-- test st_slope, corner droop +SELECT + ST_Value(rast, 2, 2) = 10, + round(degrees(ST_Value( + ST_Slope(rast, 1, NULL), 2, 2 + ))*100000) = 5784902 + FROM ST_SetValue(ST_TestRasterNgb(3, 3, 10), 1, 1, 1) AS rast; + +-- test st_aspect, flat plane +SELECT + ST_Value(rast, 2, 2) = 1, + ST_Value( + ST_Aspect(rast, 1, NULL), 2, 2 + ) = -1 + FROM ST_SetBandNoDataValue(ST_TestRasterNgb(3, 3, 1), NULL) AS rast; + +-- test st_aspect, North +SELECT + ST_Value(rast, 2, 2) = 1, + round(degrees(ST_Value( + ST_Aspect(rast, 1, NULL), 2, 2 + ))*10000) = 0 + FROM ST_SetValue(ST_TestRasterNgb(3, 3, 1), 2, 1, 0) AS rast; + +-- test st_aspect, South +SELECT + ST_Value(rast, 2, 2) = 1, + round(degrees(ST_Value( + ST_Aspect(rast, 1, NULL), 2, 2 + ))*10000) = 1800000 + FROM ST_SetValue(ST_TestRasterNgb(3, 3, 1), 2, 3, 0) AS rast; + +-- test st_aspect, East +SELECT + ST_Value(rast, 2, 2) = 1, + round(degrees(ST_Value( + ST_Aspect(rast, 1, NULL), 2, 2 + ))*10000) = 900000 + FROM ST_SetValue(ST_TestRasterNgb(3, 3, 1), 3, 2, 0) AS rast; + +-- test st_aspect, West +SELECT + ST_Value(rast, 2, 2) = 1, + round(degrees(ST_Value( + ST_Aspect(rast, 1, NULL), 2, 2 + ))*10000) = 2700000 + FROM ST_SetValue(ST_TestRasterNgb(3, 3, 1), 1, 2, 0) AS rast; + +-- test st_hillshade, flat plane +SELECT + ST_Value(rast, 2, 2) = 1, + round(ST_Value( + ST_Hillshade(rast, 1, NULL, 0.0, pi()/4.0, 255), 2, 2 + )*10000) = 1803122 + FROM ST_TestRasterNgb(3, 3, 1) AS rast; + +-- test st_hillshade, known set from: http://webhelp.esri.com/arcgiSDEsktop/9.3/index.cfm?TopicName=How%20Hillshade%20works +SELECT + round(ST_Value( + ST_Hillshade(rast, 1, NULL, radians(315.0), pi()/4.0, 255, 1.0), 2, 2 + )*10000) = 1540287 + FROM ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_SetScale(ST_TestRasterNgb(3, 3, 1), 5), 1, 1, 2450 + ), 2, 1, 2461 + ), 3, 1, 2483 + ), 1, 2, 2452 + ), 2, 2, 2461 + ), 3, 2, 2483 + ), 1, 3, 2447 + ), 2, 3, 2455 + ), 3, 3, 2477 + ) AS rast; + +-- test st_hillshade, defaults on known set from: http://webhelp.esri.com/arcgiSDEsktop/9.3/index.cfm?TopicName=How%20Hillshade%20works +SELECT + round(ST_Value( + ST_Hillshade(rast, 1, NULL, radians(315.0), pi()/4.0), 2, 2 + )*10000) = 1540287 + FROM ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_SetScale(ST_TestRasterNgb(3, 3, 1), 5), 1, 1, 2450 + ), 2, 1, 2461 + ), 3, 1, 2483 + ), 1, 2, 2452 + ), 2, 2, 2461 + ), 3, 2, 2483 + ), 1, 3, 2447 + ), 2, 3, 2455 + ), 3, 3, 2477 + ) AS rast; + +-- test st_distinct4ma, all one value +SELECT + ST_Value(rast, 2, 2) = 10, + ST_Value( + ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'st_distinct4ma(float[][], text, text[])'::regprocedure, '1', NULL), 2, 2 + ) = 1 + FROM ST_TestRasterNgb(3, 3, 10) AS rast; + +-- test st_distinct4ma, three distinct values +SELECT + ST_Value(rast, 2, 2) = 1, + ST_Value( + ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'st_distinct4ma(float[][], text, text[])'::regprocedure, '1', NULL), 2, 2 + ) = 3 + FROM ST_SetValue( + ST_SetValue( + ST_TestRasterNgb(3, 3, 1), 1, 1, 5 + ), 3, 3, 7 + ) AS rast; + +-- test st_stddev4ma, all one value +SELECT + ST_Value(rast, 2, 2) = 10, + ST_Value( + ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'st_stddev4ma(float[][], text, text[])'::regprocedure, '1', NULL), 2, 2 + ) = 0 + FROM ST_TestRasterNgb(3, 3, 10) AS rast; + +-- test st_stddev4ma, values 1-9 +SELECT + ST_Value(rast, 2, 2) = 5, + round(ST_Value( + ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'st_stddev4ma(float[][], text, text[])'::regprocedure, '1', NULL), 2, 2 + ) * 1000000) = 2738613 + FROM ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_TestRasterNgb(3, 3, 1), 2, 1, 2 + ), 3, 1, 3 + ), 1, 2, 4 + ), 2, 2, 5 + ), 3, 2, 6 + ), 1, 3, 7 + ), 2, 3, 8 + ), 3, 3, 9 + ) AS rast; diff -Nru postgis-1.5.3/raster/test/regress/rt_mapalgebrafctngb_userfunc_expected postgis-2.0.1/raster/test/regress/rt_mapalgebrafctngb_userfunc_expected --- postgis-1.5.3/raster/test/regress/rt_mapalgebrafctngb_userfunc_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_mapalgebrafctngb_userfunc_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,35 @@ +NOTICE: Neighborhood NODATA behavior defaulting to 'ignore' +t|t +NOTICE: Neighborhood NODATA behavior defaulting to 'ignore' +t|t +t|t +NOTICE: Neighborhood NODATA behavior defaulting to 'ignore' +t|t +NOTICE: Neighborhood NODATA behavior defaulting to 'ignore' +t|t +t|t +NOTICE: Neighborhood NODATA behavior defaulting to 'ignore' +t|t +NOTICE: Neighborhood NODATA behavior defaulting to 'ignore' +t|t +t|t +NOTICE: Neighborhood NODATA behavior defaulting to 'ignore' +t|t +NOTICE: Neighborhood NODATA behavior defaulting to 'ignore' +t|t +t|t +t|t +t|t +t|t +t|t +t|t +t|t +t|t +t|t +t|t +t +t +t|t +t|t +t|t +t|t diff -Nru postgis-1.5.3/raster/test/regress/rt_metadata.sql postgis-2.0.1/raster/test/regress/rt_metadata.sql --- postgis-1.5.3/raster/test/regress/rt_metadata.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_metadata.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,7 @@ +SELECT * FROM ST_MetaData(NULL); +SELECT * FROM ST_MetaData( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0, 0) + , 1, '64BF', 0, 0 + ) +); diff -Nru postgis-1.5.3/raster/test/regress/rt_metadata_expected postgis-2.0.1/raster/test/regress/rt_metadata_expected --- postgis-1.5.3/raster/test/regress/rt_metadata_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_metadata_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +||||||||| +10|10|10|10|2|2|0|0|0|1 diff -Nru postgis-1.5.3/raster/test/regress/rt_overabove.sql postgis-2.0.1/raster/test/regress/rt_overabove.sql --- postgis-1.5.3/raster/test/regress/rt_overabove.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_overabove.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,38 @@ +----------------------------------------------------------------------- +-- $Id$ +-- +-- Copyright (c) 2009 Sandro Santilli +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +----------------------------------------------------------------------- + +------------------------------------------------------------------- +-- raster_overabove +----------------------------------------------------------------------- + +SELECT 'raster_overabove(X, query(1,1))' as op, + count(a.y), + min(a.x) as xmin, + max(a.x) as xmax, + min(a.y) as ymin, + max(a.y) as ymax, + st_extent(a.tile::geometry) +FROM rt_gist_grid_test a, rt_gist_query_test b +WHERE b.x = 1 and b.y = 1 + AND raster_overabove(a.tile, b.tile); + +----------------------------------------------------------------------- +-- Test |&> operator (overabove) +----------------------------------------------------------------------- + +SELECT 'X |&> query(1,1)' as op, + count(a.y), + min(a.x) as xmin, + max(a.x) as xmax, + min(a.y) as ymin, + max(a.y) as ymax, + st_extent(a.tile::geometry) +FROM rt_gist_grid_test a, rt_gist_query_test b +WHERE b.x = 1 and b.y = 1 + AND a.tile |&> b.tile; diff -Nru postgis-1.5.3/raster/test/regress/rt_overabove_expected postgis-2.0.1/raster/test/regress/rt_overabove_expected --- postgis-1.5.3/raster/test/regress/rt_overabove_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_overabove_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +raster_overabove(X, query(1,1))|60|0|9|4|9|BOX(-100 -20,100 100) +X |&> query(1,1)|60|0|9|4|9|BOX(-100 -20,100 100) diff -Nru postgis-1.5.3/raster/test/regress/rt_overbelow.sql postgis-2.0.1/raster/test/regress/rt_overbelow.sql --- postgis-1.5.3/raster/test/regress/rt_overbelow.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_overbelow.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,38 @@ +----------------------------------------------------------------------- +-- $Id$ +-- +-- Copyright (c) 2009 Sandro Santilli +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +----------------------------------------------------------------------- + +------------------------------------------------------------------- +-- raster_overbelow +----------------------------------------------------------------------- + +SELECT 'raster_overbelow(X, query(1,1))' as op, + count(a.y), + min(a.x) as xmin, + max(a.x) as xmax, + min(a.y) as ymin, + max(a.y) as ymax, + st_extent(a.tile::geometry) +FROM rt_gist_grid_test a, rt_gist_query_test b +WHERE b.x = 1 and b.y = 1 + AND raster_overbelow(a.tile, b.tile); + +----------------------------------------------------------------------- +-- Test &<| operator (overbelow) +----------------------------------------------------------------------- + +SELECT 'X &<| query(1,1)' as op, + count(a.y), + min(a.x) as xmin, + max(a.x) as xmax, + min(a.y) as ymin, + max(a.y) as ymax, + st_extent(a.tile::geometry) +FROM rt_gist_grid_test a, rt_gist_query_test b +WHERE b.x = 1 and b.y = 1 + AND a.tile &<| b.tile; diff -Nru postgis-1.5.3/raster/test/regress/rt_overbelow_expected postgis-2.0.1/raster/test/regress/rt_overbelow_expected --- postgis-1.5.3/raster/test/regress/rt_overbelow_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_overbelow_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +raster_overbelow(X, query(1,1))|60|0|9|0|5|BOX(-100 -100,100 20) +X &<| query(1,1)|60|0|9|0|5|BOX(-100 -100,100 20) diff -Nru postgis-1.5.3/raster/test/regress/rt_overlap.sql postgis-2.0.1/raster/test/regress/rt_overlap.sql --- postgis-1.5.3/raster/test/regress/rt_overlap.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_overlap.sql 2012-03-01 16:47:18.000000000 +0000 @@ -0,0 +1,98 @@ +----------------------------------------------------------------------- +-- $Id$ +-- +-- Copyright (c) 2009 Sandro Santilli +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +----------------------------------------------------------------------- + +------------------------------------------------------------------- +-- raster_overlap +----------------------------------------------------------------------- + +SELECT 'raster_overlap(X, query(1,1))' as op, + count(a.y), + min(a.x) as xmin, + max(a.x) as xmax, + min(a.y) as ymin, + max(a.y) as ymax, + st_extent(a.tile::geometry) +FROM rt_gist_grid_test a, rt_gist_query_test b +WHERE b.x = 1 and b.y = 1 + AND raster_overlap(a.tile, b.tile); + +------------------------------------------------------------------- +-- raster_geometry_overlap +----------------------------------------------------------------------- + +SELECT 'raster_geometry_overlap(X, query(1,1))' as op, + count(a.y), + min(a.x) as xmin, + max(a.x) as xmax, + min(a.y) as ymin, + max(a.y) as ymax, + st_extent(a.tile::geometry) +FROM rt_gist_grid_test a, rt_gist_query_test b +WHERE b.x = 1 and b.y = 1 + AND raster_geometry_overlap(a.tile, b.tile::geometry); + +------------------------------------------------------------------- +-- geometry_raster_overlap +----------------------------------------------------------------------- + +SELECT 'geometry_raster_overlap(X, query(1,1))' as op, + count(a.y), + min(a.x) as xmin, + max(a.x) as xmax, + min(a.y) as ymin, + max(a.y) as ymax, + st_extent(a.tile::geometry) +FROM rt_gist_grid_test a, rt_gist_query_test b +WHERE b.x = 1 and b.y = 1 + AND geometry_raster_overlap(a.tile::geometry, b.tile); + +----------------------------------------------------------------------- +-- Test && operator (overlap) +----------------------------------------------------------------------- + +SELECT 'X && query(1,1)' as op, + count(a.y), + min(a.x) as xmin, + max(a.x) as xmax, + min(a.y) as ymin, + max(a.y) as ymax, + st_extent(a.tile::geometry) +FROM rt_gist_grid_test a, rt_gist_query_test b +WHERE b.x = 1 and b.y = 1 + AND a.tile && b.tile; + +----------------------------------------------------------------------- +-- Test && operator (raster overlap geometry) +----------------------------------------------------------------------- + +SELECT 'X && query(1,1)' as op, + count(a.y), + min(a.x) as xmin, + max(a.x) as xmax, + min(a.y) as ymin, + max(a.y) as ymax, + st_extent(a.tile::geometry) +FROM rt_gist_grid_test a, rt_gist_query_test b +WHERE b.x = 1 and b.y = 1 + AND a.tile && b.tile::geometry; + +----------------------------------------------------------------------- +-- Test && operator (geometry overlap raster) +----------------------------------------------------------------------- + +SELECT 'X && query(1,1)' as op, + count(a.y), + min(a.x) as xmin, + max(a.x) as xmax, + min(a.y) as ymin, + max(a.y) as ymax, + st_extent(a.tile::geometry) +FROM rt_gist_grid_test a, rt_gist_query_test b +WHERE b.x = 1 and b.y = 1 + AND a.tile::geometry && b.tile; \ No newline at end of file diff -Nru postgis-1.5.3/raster/test/regress/rt_overlap_expected postgis-2.0.1/raster/test/regress/rt_overlap_expected --- postgis-1.5.3/raster/test/regress/rt_overlap_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_overlap_expected 2012-03-01 16:47:18.000000000 +0000 @@ -0,0 +1,6 @@ +raster_overlap(X, query(1,1))|16|3|6|3|6|BOX(-40 -40,40 40) +raster_geometry_overlap(X, query(1,1))|16|3|6|3|6|BOX(-40 -40,40 40) +geometry_raster_overlap(X, query(1,1))|16|3|6|3|6|BOX(-40 -40,40 40) +X && query(1,1)|16|3|6|3|6|BOX(-40 -40,40 40) +X && query(1,1)|16|3|6|3|6|BOX(-40 -40,40 40) +X && query(1,1)|16|3|6|3|6|BOX(-40 -40,40 40) diff -Nru postgis-1.5.3/raster/test/regress/rt_overleft.sql postgis-2.0.1/raster/test/regress/rt_overleft.sql --- postgis-1.5.3/raster/test/regress/rt_overleft.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_overleft.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,38 @@ +----------------------------------------------------------------------- +-- $Id$ +-- +-- Copyright (c) 2009 Sandro Santilli +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +----------------------------------------------------------------------- + +----------------------------------------------------------------------- +-- raster_overleft +----------------------------------------------------------------------- + +SELECT 'raster_overleft(X, query(1,1))' as op, + count(a.y), + min(a.x) as xmin, + max(a.x) as xmax, + min(a.y) as ymin, + max(a.y) as ymax, + st_extent(a.tile::geometry) +FROM rt_gist_grid_test a, rt_gist_query_test b +WHERE b.x = 1 and b.y = 1 + AND raster_overleft(a.tile, b.tile); + +----------------------------------------------------------------------- +-- Test &< operator (overleft) +----------------------------------------------------------------------- + +SELECT 'X &< query(1,1)' as op, + count(a.y), + min(a.x) as xmin, + max(a.x) as xmax, + min(a.y) as ymin, + max(a.y) as ymax, + st_extent(a.tile::geometry) +FROM rt_gist_grid_test a, rt_gist_query_test b +WHERE b.x = 1 and b.y = 1 + AND a.tile &< b.tile; diff -Nru postgis-1.5.3/raster/test/regress/rt_overleft_expected postgis-2.0.1/raster/test/regress/rt_overleft_expected --- postgis-1.5.3/raster/test/regress/rt_overleft_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_overleft_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +raster_overleft(X, query(1,1))|60|0|5|0|9|BOX(-100 -100,20 100) +X &< query(1,1)|60|0|5|0|9|BOX(-100 -100,20 100) diff -Nru postgis-1.5.3/raster/test/regress/rt_overright.sql postgis-2.0.1/raster/test/regress/rt_overright.sql --- postgis-1.5.3/raster/test/regress/rt_overright.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_overright.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,37 @@ +----------------------------------------------------------------------- +-- $Id$ +-- +-- Copyright (c) 2009 Sandro Santilli +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +----------------------------------------------------------------------- + +----------------------------------------------------------------------- +-- raster_overright +----------------------------------------------------------------------- +SELECT 'raster_overright(X, query(1,1))' as op, + count(a.y), + min(a.x) as xmin, + max(a.x) as xmax, + min(a.y) as ymin, + max(a.y) as ymax, + st_extent(a.tile::geometry) +FROM rt_gist_grid_test a, rt_gist_query_test b +WHERE b.x = 1 and b.y = 1 + AND raster_overright(a.tile, b.tile); + +----------------------------------------------------------------------- +-- Test &> operator (overright) +----------------------------------------------------------------------- + +SELECT 'X &> query(1,1)' as op, + count(a.y), + min(a.x) as xmin, + max(a.x) as xmax, + min(a.y) as ymin, + max(a.y) as ymax, + st_extent(a.tile::geometry) +FROM rt_gist_grid_test a, rt_gist_query_test b +WHERE b.x = 1 and b.y = 1 + AND a.tile &> b.tile; diff -Nru postgis-1.5.3/raster/test/regress/rt_overright_expected postgis-2.0.1/raster/test/regress/rt_overright_expected --- postgis-1.5.3/raster/test/regress/rt_overright_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_overright_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +raster_overright(X, query(1,1))|60|4|9|0|9|BOX(-20 -100,100 100) +X &> query(1,1)|60|4|9|0|9|BOX(-20 -100,100 100) diff -Nru postgis-1.5.3/raster/test/regress/rt_pixelsize.sql postgis-2.0.1/raster/test/regress/rt_pixelsize.sql --- postgis-1.5.3/raster/test/regress/rt_pixelsize.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_pixelsize.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,24 @@ +----------------------------------------------------------------------- +-- $Id$ +-- +-- Copyright (c) 2011 David Zwarg +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +----------------------------------------------------------------------- + +----------------------------------------------------------------------- +-- st_pixelwidth +----------------------------------------------------------------------- + +SELECT id, name, scalex, skewy + FROM rt_properties_test + WHERE NOT sqrt(scalex*scalex + skewy*skewy) = st_pixelwidth(rast); + +----------------------------------------------------------------------- +-- st_pixelheight +----------------------------------------------------------------------- + +SELECT id, name, scaley, skewx + FROM rt_properties_test + WHERE NOT sqrt(scaley*scaley + skewx*skewx) = st_pixelheight(rast); diff -Nru postgis-1.5.3/raster/test/regress/rt_pixelvalue.sql postgis-2.0.1/raster/test/regress/rt_pixelvalue.sql --- postgis-1.5.3/raster/test/regress/rt_pixelvalue.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_pixelvalue.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,102 @@ +----------------------------------------------------------------------- +-- $Id$ +-- +-- Copyright (c) 2010 Pierre Racine +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +----------------------------------------------------------------------- + +----------------------------------------------------------------------- +-- Test 1 - st_value(rast raster, band integer, x integer, y integer) +----------------------------------------------------------------------- + +SELECT 'test 1.1', id + FROM rt_band_properties_test + WHERE st_value(rast, 1, 1, 1, TRUE) != b1val; + +SELECT 'test 1.2', id + FROM rt_band_properties_test + WHERE st_value(rast, 2, 1, 1, TRUE) != b2val; + +SELECT 'test 1.3', id + FROM rt_band_properties_test + WHERE st_value(rast, 1, 1, 1, FALSE) != b1val; + +SELECT 'test 1.4', id + FROM rt_band_properties_test + WHERE st_value(rast, 1, 1, 1, NULL) != b1val; + +SELECT 'test 1.5', id + FROM rt_band_properties_test + WHERE NOT st_value(rast, 1, 1, NULL, NULL) IS NULL; + +SELECT 'test 1.6', id + FROM rt_band_properties_test + WHERE NOT st_value(rast, 1, NULL, 1, NULL) IS NULL; + +SELECT 'test 1.7', id + FROM rt_band_properties_test + WHERE NOT st_value(st_setbandnodatavalue(rast, b1val), 1, 1, 1, NULL) IS NULL; + +SELECT 'test 1.8', id + FROM rt_band_properties_test + WHERE NOT st_value(st_setbandnodatavalue(rast, b1val), 1, 1, 1, TRUE) IS NULL; + +SELECT 'test 1.9', id + FROM rt_band_properties_test + WHERE st_value(st_setbandnodatavalue(rast, b1val), 1, 1, 1, FALSE) != b1val; + +-- Make sure we return only a warning when getting vlue with out of range pixel coordinates +SELECT 'test 1.10', id + FROM rt_band_properties_test + WHERE NOT st_value(rast, -1, -1) IS NULL; + +----------------------------------------------------------------------- +-- Test 2 - st_value(rast raster, band integer, pt geometry) +----------------------------------------------------------------------- + +SELECT 'test 2.1', id + FROM rt_band_properties_test + WHERE st_value(rast, 1, st_makepoint(st_upperleftx(rast), st_upperlefty(rast))) != b1val; + +SELECT 'test 2.2', id + FROM rt_band_properties_test + WHERE st_value(rast, 2, st_makepoint(st_upperleftx(rast), st_upperlefty(rast))) != b2val; + +----------------------------------------------------------------------- +-- Test 3 - st_pixelaspolygon(rast raster, x integer, y integer) +----------------------------------------------------------------------- + +SELECT 'test 3.1', id + FROM rt_band_properties_test + WHERE st_astext(st_pixelaspolygon(rast, 1, 1)) != geomtxt; + +----------------------------------------------------------------------- +-- Test 4 - st_setvalue(rast raster, band integer, x integer, y integer, val float8) +----------------------------------------------------------------------- + +SELECT 'test 4.1', id + FROM rt_band_properties_test + WHERE st_value(st_setvalue(rast, 1, 1, 1, 5), 1, 1, 1) != 5; + +SELECT 'test 4.2', id + FROM rt_band_properties_test + WHERE NOT st_value(st_setvalue(rast, 1, 1, 1, NULL), 1, 1, 1) IS NULL; + +SELECT 'test 4.3', id + FROM rt_band_properties_test + WHERE st_value(st_setvalue(rast, 1, 1, 1, NULL), 1, 1, 1, FALSE) != st_bandnodatavalue(rast, 1); + +SELECT 'test 4.4', id + FROM rt_band_properties_test + WHERE st_value(st_setvalue(st_setbandnodatavalue(rast, NULL), 1, 1, 1, NULL), 1, 1, 1) != b1val; + +----------------------------------------------------------------------- +-- Test 5 - st_setvalue(rast raster, band integer, pt geometry, val float8) +----------------------------------------------------------------------- + +SELECT 'test 5.1', id + FROM rt_band_properties_test + WHERE st_value(st_setvalue(rast, 1, st_makepoint(st_upperleftx(rast), st_upperlefty(rast)), 3), 1, 1, 1) != 3; + diff -Nru postgis-1.5.3/raster/test/regress/rt_pixelvalue_expected postgis-2.0.1/raster/test/regress/rt_pixelvalue_expected --- postgis-1.5.3/raster/test/regress/rt_pixelvalue_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_pixelvalue_expected 2012-05-14 23:28:50.000000000 +0000 @@ -0,0 +1,8 @@ +NOTICE: Attempting to get pixel value with out of range raster coordinates: (-2, -2) +NOTICE: Attempting to get pixel value with out of range raster coordinates: (-2, -2) +NOTICE: Attempting to get pixel value with out of range raster coordinates: (-2, -2) +NOTICE: Attempting to get pixel value with out of range raster coordinates: (-2, -2) +NOTICE: Raster do not have a nodata value defined. Set band nodata value first. Nodata value not set. Returning original raster +NOTICE: Raster do not have a nodata value defined. Set band nodata value first. Nodata value not set. Returning original raster +NOTICE: Raster do not have a nodata value defined. Set band nodata value first. Nodata value not set. Returning original raster +NOTICE: Raster do not have a nodata value defined. Set band nodata value first. Nodata value not set. Returning original raster diff -Nru postgis-1.5.3/raster/test/regress/rt_quantile.sql postgis-2.0.1/raster/test/regress/rt_quantile.sql --- postgis-1.5.3/raster/test/regress/rt_quantile.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_quantile.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,272 @@ +SELECT + round(quantile::numeric, 3), + round(value::numeric, 3) +FROM ST_Quantile( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) + , 1, FALSE, ARRAY[0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1]::double precision[] +); +SELECT + round(quantile::numeric, 3), + round(value::numeric, 3) +FROM ST_Quantile( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) + , 1, ARRAY[0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1]::double precision[] +); +SELECT + round(quantile::numeric, 3), + round(value::numeric, 3) +FROM ST_Quantile( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ), + 1, FALSE +); +SELECT + round(quantile::numeric, 3), + round(value::numeric, 3) +FROM ST_Quantile( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ), + 1 +); +SELECT + round(quantile::numeric, 3), + round(value::numeric, 3) +FROM ST_Quantile( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ), + ARRAY[0.05, 0.95]::double precision[] +); +SELECT + round(quantile::numeric, 3), + round(value::numeric, 3) +FROM ST_Quantile( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) +); +SELECT round( + ST_Quantile( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ), + 1, FALSE, 0.05 + )::numeric, 3 +); +SELECT round( + ST_Quantile( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ), + 1, 0.95 + )::numeric, 3 +); +SELECT round( + ST_Quantile( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ), + FALSE, 0.7 + )::numeric, 3 +); +SELECT round( + ST_Quantile( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ), + 0.45 + )::numeric, 3 +); +SELECT round( + ST_Quantile( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ), + 2, 0.45 + )::numeric, 3 +); +BEGIN; +CREATE TEMP TABLE test_quantile + ON COMMIT DROP AS + SELECT + rast.rast + FROM ( + SELECT ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) AS rast + ) AS rast + FULL JOIN ( + SELECT generate_series(1, 2) AS id + ) AS id + ON 1 = 1; +SELECT + round(quantile::numeric, 3), + round(value::numeric, 3) +FROM ST_Quantile('test_quantile', 'rast', 1, TRUE, ARRAY[0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1]::double precision[]); +SELECT + round(quantile::numeric, 3), + round(value::numeric, 3) +FROM ST_Quantile('test_quantile', 'rast', 1, TRUE); +SELECT + round(quantile::numeric, 3), + round(value::numeric, 3) +FROM ST_Quantile('test_quantile', 'rast', 1, FALSE, ARRAY[0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1]::double precision[]); +SELECT + round(quantile::numeric, 3), + round(value::numeric, 3) +FROM ST_Quantile('test_quantile', 'rast', 1, FALSE); +SELECT + round(quantile::numeric, 3), + round(value::numeric, 3) +FROM ST_Quantile('test_quantile', 'rast', 1, ARRAY[0.05, 0.95]::double precision[]); +SELECT + round(quantile::numeric, 3), + round(value::numeric, 3) +FROM ST_Quantile('test_quantile', 'rast', ARRAY[0.05, 0.95]::double precision[]); +SELECT round(ST_Quantile('test_quantile', 'rast', 1, FALSE, 0.95)::numeric, 3); +SELECT round(ST_Quantile('test_quantile', 'rast', 1, 0.95)::numeric, 3); +SELECT round(ST_Quantile('test_quantile', 'rast', TRUE, 0.95)::numeric, 3); +SELECT round(ST_Quantile('test_quantile', 'rast', 0.5)::numeric, 3); +SAVEPOINT test; +SELECT round(ST_Quantile('test_quantile', 'rast', 2, 0.5)::numeric, 3); +ROLLBACK TO SAVEPOINT test; +RELEASE SAVEPOINT test; +SAVEPOINT test; +SELECT round(ST_Quantile('test_quantile1', 'rast', 0.5)::numeric, 3); +ROLLBACK TO SAVEPOINT test; +RELEASE SAVEPOINT test; +SAVEPOINT test; +SELECT round(ST_Quantile('test_quantile', 'rast2', 1, 0.5)::numeric, 3); +ROLLBACK TO SAVEPOINT test; +RELEASE SAVEPOINT test; +SAVEPOINT test; +SELECT round(ST_Quantile('test_quantile', 'rast', -1.)::numeric, 3); +ROLLBACK TO SAVEPOINT test; +RELEASE SAVEPOINT test; +ROLLBACK; diff -Nru postgis-1.5.3/raster/test/regress/rt_quantile_expected postgis-2.0.1/raster/test/regress/rt_quantile_expected --- postgis-1.5.3/raster/test/regress/rt_quantile_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_quantile_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,103 @@ +0.000|-10.000 +0.100|0.000 +0.200|0.000 +0.300|0.000 +0.400|0.000 +0.500|0.000 +0.600|0.000 +0.700|0.000 +0.800|0.000 +0.900|0.000 +1.000|3.142 +0.000|-10.000 +0.100|-8.686 +0.200|-7.372 +0.300|-6.058 +0.400|-4.743 +0.500|-3.429 +0.600|-2.115 +0.700|-0.801 +0.800|0.513 +0.900|1.827 +1.000|3.142 +0.000|-10.000 +0.250|0.000 +0.500|0.000 +0.750|0.000 +1.000|3.142 +0.000|-10.000 +0.250|-6.715 +0.500|-3.429 +0.750|-0.144 +1.000|3.142 +0.050|-9.343 +0.950|2.485 +0.000|-10.000 +0.250|-6.715 +0.500|-3.429 +0.750|-0.144 +1.000|3.142 +0.000 +2.485 +0.000 +-4.086 +NOTICE: Invalid band index (must use 1-based). Returning NULL +BEGIN +0.000|-10.000 +0.100|-10.000 +0.200|-10.000 +0.300|-10.000 +0.400|3.142 +0.500|3.142 +0.600|3.142 +0.700|3.142 +0.800|3.142 +0.900|3.142 +1.000|3.142 +0.000|-10.000 +0.250|-10.000 +0.500|3.142 +0.750|3.142 +1.000|3.142 +0.000|-10.000 +0.100|0.000 +0.200|0.000 +0.300|0.000 +0.400|0.000 +0.500|0.000 +0.600|0.000 +0.700|0.000 +0.800|0.000 +0.900|0.000 +1.000|3.142 +0.000|-10.000 +0.250|0.000 +0.500|0.000 +0.750|0.000 +1.000|3.142 +0.050|-10.000 +0.950|3.142 +0.050|-10.000 +0.950|3.142 +0.000 +3.142 +3.142 +3.142 +SAVEPOINT +NOTICE: Invalid band index (must use 1-based). Returning NULL +ERROR: RASTER_quantileCoverage: Could not get summary stats of coverage +COMMIT +RELEASE +SAVEPOINT +ERROR: relation "test_quantile1" does not exist at character 20 +COMMIT +RELEASE +SAVEPOINT +ERROR: column "rast2" does not exist at character 8 +COMMIT +RELEASE +SAVEPOINT +NOTICE: Invalid value for quantile (must be between 0 and 1). Returning NULL +COMMIT +RELEASE +COMMIT diff -Nru postgis-1.5.3/raster/test/regress/rt_reclass.sql postgis-2.0.1/raster/test/regress/rt_reclass.sql --- postgis-1.5.3/raster/test/regress/rt_reclass.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_reclass.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,170 @@ +SELECT + ST_Value(t.rast, 1, 1, 1), + ST_Value(t.rast, 1, 10, 10), + ST_Value(t.rast, 1, 2, 10), + ST_BandNoDataValue(rast, 1) +FROM ( + SELECT ST_Reclass( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0, 0), + 1, '32BUI', 0, 0 + ), + 1, 1, 499 + ), + 10, 10, 12 + ), + ROW(1, '0-100:1-10, 101-500:11-150,501 - 10000: 151-254', '8BUI', 255) + ) AS rast +) AS t; +SELECT + ST_Value(t.rast, 1, 1, 1), + ST_Value(t.rast, 1, 10, 10), + ST_Value(t.rast, 1, 2, 10), + ST_BandNoDataValue(rast, 1), + ST_Value(t.rast, 2, 1, 1), + ST_Value(t.rast, 2, 10, 10), + ST_Value(t.rast, 2, 2, 10), + ST_BandNoDataValue(rast, 2) +FROM ( + SELECT ST_Reclass( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0, 0), + 1, '8BUI', 0, 1 + ), + 2, '32BUI', 0, 0 + ), + 2, 1, 1, 499 + ), + 2, 10, 10, 12 + ), + ROW(2, '0-100:1-10, 101-500:11-150,501 - 10000: 151-254', '8BUI', 255) + ) AS rast +) AS t; +SELECT + ST_Value(t.rast, 1, 1, 1), + ST_Value(t.rast, 1, 10, 10), + ST_Value(t.rast, 1, 2, 10), + ST_BandNoDataValue(rast, 1), + ST_Value(t.rast, 2, 1, 1), + ST_Value(t.rast, 2, 10, 10), + ST_Value(t.rast, 2, 2, 10), + ST_BandNoDataValue(rast, 2) +FROM ( + SELECT ST_Reclass( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0, 0), + 1, '8BUI', 0, 1 + ), + 2, '32BUI', 0, 0 + ), + 2, 1, 1, 499 + ), + 2, 10, 10, 12 + ), + ROW(1, '0:1', '8BUI', 255), + ROW(2, '0-100:1-10, 101-500:11-150,501 - 10000: 151-254', '8BUI', 255) + ) AS rast +) AS t; +SELECT + ST_Value(t.rast, 1, 1, 1), + ST_Value(t.rast, 1, 10, 10), + ST_BandNoDataValue(rast, 1) +FROM ( + SELECT ST_Reclass( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0, 0), + 1, '8BUI', 0, 0 + ), + 1, 1, 1, 255 + ), + 1, 10, 10, 0 + ), + ROW(1, '0-100]:200-255,(100-200]:100-200,(200-255]:0-100', '8BUI', NULL) + ) AS rast +) AS t; +SELECT + ST_Value(t.rast, 1, 1, 1), + ST_Value(t.rast, 1, 10, 10), + ST_BandNoDataValue(rast, 1) +FROM ( + SELECT ST_Reclass( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(100, 100, 10, 10, 2, 2, 0, 0, 0), + 1, '32BF', 1, 0 + ), + 1, 1, 1, 3.14159 + ), + 1, 10, 10, 2.71828 + ), + ROW(1, '-10000--100]:1-50,(-100-1000]:50-150,(1000-10000]:150-254', '8BUI', 0) + ) AS rast +) AS t; +SELECT + ST_Value(t.rast, 1, 1, 1), + ST_Value(t.rast, 1, 10, 10), + ST_BandNoDataValue(rast, 1) +FROM ( + SELECT ST_Reclass( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(100, 100, 10, 10, 2, 2, 0, 0, 0), + 1, '32BF', 1, 0 + ), + 1, 1, 1, 3.14159 + ), + 1, 10, 10, 2.71828 + ), + ROW(1, '-10000--100]:50-1,(-100-1000]:150-50,(1000-10000]:254-150', '8BUI', 0) + ) AS rast +) AS t; +SELECT + ST_Value(t.rast, 1, 1, 1), + ST_Value(t.rast, 1, 10, 10), + ST_BandNoDataValue(rast, 1) +FROM ( + SELECT ST_Reclass( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(100, 100, 10, 10, 2, 2, 0, 0, 0), + 1, '32BF', 1, 0 + ), + 1, 1, 1, 3.14159 + ), + 1, 10, 10, 2.71828 + ), + ROW(1, 'a-100]:50-1,(-100-1000]:150-50,(1000-10000]:254-150', '8BUI', 0) + ) AS rast +) AS t; +SELECT + ST_Value(t.rast, 1, 1, 1), + ST_Value(t.rast, 1, 10, 10), + ST_BandNoDataValue(rast, 1) +FROM ( + SELECT ST_Reclass( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(100, 100, 10, 10, 2, 2, 0, 0, 0), + 1, '32BF', 1, 0 + ), + 1, 1, 1, 3.14159 + ), + 1, 10, 10, 2.71828 + ), + ROW(2, '-10000--100]:50-1,(-100-1000]:150-50,(1000-10000]:254-150', '8BUI', 0) + ) AS rast +) AS t; diff -Nru postgis-1.5.3/raster/test/regress/rt_reclass_expected postgis-2.0.1/raster/test/regress/rt_reclass_expected --- postgis-1.5.3/raster/test/regress/rt_reclass_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_reclass_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,10 @@ +150|2||255 +0|0|0|1|150|2||255 +1|1|1|255|150|2||255 +100|200| +59|59|0 +141|141|0 +NOTICE: Invalid argument for reclassargset. Invalid expression of reclassexpr for reclassarg of index 0 . Returning original raster +3.1415901184082|2.71828007698059|0 +NOTICE: Invalid argument for reclassargset. Invalid band index (must use 1-based) for reclassarg of index 0 . Returning original raster +3.1415901184082|2.71828007698059|0 diff -Nru postgis-1.5.3/raster/test/regress/rt_resample.sql postgis-2.0.1/raster/test/regress/rt_resample.sql --- postgis-1.5.3/raster/test/regress/rt_resample.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_resample.sql 2012-05-04 02:54:14.000000000 +0000 @@ -0,0 +1,601 @@ +DROP TABLE IF EXISTS raster_resample_src; +DROP TABLE IF EXISTS raster_resample_dst; +CREATE TABLE raster_resample_src ( + rast raster +); +CREATE TABLE raster_resample_dst ( + rid varchar, + rast raster +); + +CREATE OR REPLACE FUNCTION make_test_raster() + RETURNS void + AS $$ + DECLARE + width int := 10; + height int := 10; + x int; + y int; + rast raster; + BEGIN + rast := ST_MakeEmptyRaster(width, height, -500000, 600000, 1000, -1000, 0, 0, 992163); + rast := ST_AddBand(rast, 1, '64BF', 0, 0); + + FOR x IN 1..width LOOP + FOR y IN 1..height LOOP + rast := ST_SetValue(rast, 1, x, y, ((x::double precision * y) + (x + y) + (x + y * x)) / (x + y + 1)); + END LOOP; + END LOOP; + + INSERT INTO raster_resample_src VALUES (rast); + + RETURN; + END; + $$ LANGUAGE 'plpgsql'; +SELECT make_test_raster(); +DROP FUNCTION make_test_raster(); + +DELETE FROM "spatial_ref_sys" WHERE srid = 992163; +DELETE FROM "spatial_ref_sys" WHERE srid = 993309; +DELETE FROM "spatial_ref_sys" WHERE srid = 993310; +DELETE FROM "spatial_ref_sys" WHERE srid = 994269; +DELETE FROM "spatial_ref_sys" WHERE srid = 984269; +DELETE FROM "spatial_ref_sys" WHERE srid = 974269; + +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (992163,'EPSG',2163,'PROJCS["unnamed",GEOGCS["unnamed ellipse",DATUM["unknown",SPHEROID["unnamed",6370997,0]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["latitude_of_center",45],PARAMETER["longitude_of_center",-100],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Meter",1],AUTHORITY["EPSG","2163"]]','+proj=laea +lat_0=45 +lon_0=-100 +x_0=0 +y_0=0 +a=6370997 +b=6370997 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (993309,'EPSG',3309,'PROJCS["NAD27 / California Albers",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",34],PARAMETER["standard_parallel_2",40.5],PARAMETER["latitude_of_center",0],PARAMETER["longitude_of_center",-120],PARAMETER["false_easting",0],PARAMETER["false_northing",-4000000],AUTHORITY["EPSG","3309"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=aea +lat_1=34 +lat_2=40.5 +lat_0=0 +lon_0=-120 +x_0=0 +y_0=-4000000 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (993310,'EPSG',3310,'PROJCS["NAD83 / California Albers",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",34],PARAMETER["standard_parallel_2",40.5],PARAMETER["latitude_of_center",0],PARAMETER["longitude_of_center",-120],PARAMETER["false_easting",0],PARAMETER["false_northing",-4000000],AUTHORITY["EPSG","3310"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=aea +lat_1=34 +lat_2=40.5 +lat_0=0 +lon_0=-120 +x_0=0 +y_0=-4000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (994269,'EPSG',4269,'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"]]','+proj=longlat +ellps=GRS80 +datum=NAD83 +no_defs '); + +INSERT INTO "spatial_ref_sys" ("srid","auth_name","srtext","proj4text") VALUES (984269,'EPSG','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"]]','+proj=longlat +ellps=GRS80 +datum=NAD83 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","srtext") VALUES (974269,'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"]]'); + +-- ST_Resample +INSERT INTO raster_resample_dst (rid, rast) VALUES ( + 1.0, (SELECT ST_Resample( + NULL + )) +), ( + 1.1, (SELECT ST_Resample( + rast + ) FROM raster_resample_src) +), ( + 1.2, (SELECT ST_Resample( + rast, + 993310 + ) FROM raster_resample_src) +), ( + 1.3, (SELECT ST_Resample( + rast, + 993309 + ) FROM raster_resample_src) +), ( + 1.4, (SELECT ST_Resample( + rast, + 994269 + ) FROM raster_resample_src) +), ( + 1.5, (SELECT ST_Resample( + rast, + 993310, + 500., 500., + NULL, NULL, + 0, 0, + 'NearestNeighbor', 0.125 + ) FROM raster_resample_src) +), ( + 1.6, (SELECT ST_Resample( + rast, + NULL, + 100., NULL + ) FROM raster_resample_src) +), ( + 1.7, (SELECT ST_Resample( + rast, + NULL, + NULL::double precision, 100. + ) FROM raster_resample_src) +), ( + 1.8, (SELECT ST_Resample( + rast, + NULL, + 500., 500. + ) FROM raster_resample_src) +), ( + 1.9, (SELECT ST_Resample( + rast, + NULL, + 250., 250., + NULL, NULL, + NULL, NULL + ) FROM raster_resample_src) +), ( + 1.10, (SELECT ST_Resample( + rast, + NULL, + 250., 250., + NULL, NULL, + NULL, NULL, + 'Bilinear', 0 + ) FROM raster_resample_src) +), ( + 1.11, (SELECT ST_Resample( + rast, + NULL, + NULL, NULL, + -500000, 600000 + ) FROM raster_resample_src) +), ( + 1.12, (SELECT ST_Resample( + rast, + NULL, + NULL, NULL, + -500001, 600000 + ) FROM raster_resample_src) +), ( + 1.13, (SELECT ST_Resample( + rast, + NULL, + NULL, NULL, + -500000, 600009 + ) FROM raster_resample_src) +), ( + 1.14, (SELECT ST_Resample( + rast, + NULL, + NULL, NULL, + -500100, 599950 + ) FROM raster_resample_src) +), ( + 1.15, (SELECT ST_Resample( + rast, + NULL, + 50., 50., + -290, 7 + ) FROM raster_resample_src) +), ( + 1.16, (SELECT ST_Resample( + rast, + NULL, + 121., 121., + 0, 0 + ) FROM raster_resample_src) +), ( + 1.17, (SELECT ST_Resample( + rast, + 993310, + 50., 50., + -290, 7 + ) FROM raster_resample_src) +), ( + 1.18, (SELECT ST_Resample( + rast, + 993309, + 50., 50., + -290, 7 + ) FROM raster_resample_src) +), ( + 1.19, (SELECT ST_Resample( + rast, + NULL, + NULL, NULL, + NULL, NULL, + 3, 3 + ) FROM raster_resample_src) +), ( + 1.20, (SELECT ST_Resample( + rast, + 993310, + NULL, NULL, + NULL, NULL, + 3, 3, + 'Cubic', 0 + ) FROM raster_resample_src) +), ( + 1.21, (SELECT ST_Resample( + rast, + 993309, + NULL, NULL, + NULL, NULL, + 1, 3, + 'Bilinear' + ) FROM raster_resample_src) +), ( + 1.22, (SELECT ST_Resample( + rast, + 993310, + 500., 500., + NULL, NULL, + 3, 3, + 'Cubic', 0 + ) FROM raster_resample_src) +), ( + 1.23, (SELECT ST_Resample( + rast, + 993310, + 500., 500., + -12048, 14682, + 0, 6, + 'CubicSpline' + ) FROM raster_resample_src) +), ( + 1.24, (SELECT ST_Resample( + rast, + ST_MakeEmptyRaster(5, 5, -654321, 123456, 50, -100, 3, 0, 992163) + ) FROM raster_resample_src) +), ( + 1.25, (SELECT ST_Resample( + rast, + ST_MakeEmptyRaster(5, 5, -654321, 123456, 50, -100, 3, 0, 992163), + TRUE + ) FROM raster_resample_src) +), ( + 1.26, (SELECT ST_Resample( + rast, + 150, 150 + ) FROM raster_resample_src) +), ( + 1.27, (SELECT ST_Resample( + rast, + 150, 150, + 993310 + ) FROM raster_resample_src) +), ( + 1.28, (SELECT ST_Resample( + rast, + ST_MakeEmptyRaster(5, 5, -654321, 123456, 100, 100, 0, 0, 992163), + FALSE + ) FROM raster_resample_src) +), ( + 1.29, (SELECT ST_Resample( + rast, + NULL::raster, + FALSE + ) FROM raster_resample_src) +), ( + 1.30, (SELECT ST_Resample( + rast, + 984269 + ) FROM raster_resample_src) +), ( + 1.31, (SELECT ST_Resample( + rast, + 974269 + ) FROM raster_resample_src) +); + +-- ST_Transform +INSERT INTO raster_resample_dst (rid, rast) VALUES ( + 2.1, (SELECT ST_Transform( + rast, + 993310 + ) FROM raster_resample_src) +), ( + 2.2, (SELECT ST_Transform( + rast, + 993309 + ) FROM raster_resample_src) +), ( + 2.3, (SELECT ST_Transform( + rast, + 994269 + ) FROM raster_resample_src) +), ( + 2.4, (SELECT ST_Transform( + rast, + 993310, NULL + ) FROM raster_resample_src) +), ( + 2.5, (SELECT ST_Transform( + rast, + 993310, 'Bilinear' + ) FROM raster_resample_src) +), ( + 2.6, (SELECT ST_Transform( + rast, + 993310, 'Bilinear', NULL::double precision + ) FROM raster_resample_src) +), ( + 2.7, (SELECT ST_Transform( + rast, + 993310, 'Cubic', 0.0 + ) FROM raster_resample_src) +), ( + 2.8, (SELECT ST_Transform( + rast, + 993310, 'NearestNeighbour', 0.0 + ) FROM raster_resample_src) +), ( + 2.9, (SELECT ST_Transform( + rast, + 993310, 'NearestNeighbor', 0.0 + ) FROM raster_resample_src) +), ( + 2.10, (SELECT ST_Transform( + rast, + 993310, 'NearestNeighbor', 0.125, 500, 500 + ) FROM raster_resample_src) +), ( + 2.11, (SELECT ST_Transform( + rast, + 993309, 'Cubic', 0., 100, 100 + ) FROM raster_resample_src) +), ( + 2.12, (SELECT ST_Transform( + rast, + 993310, 'CubicSpline', 0., 2000, 2000 + ) FROM raster_resample_src) +), ( + 2.13, (SELECT ST_Transform( + rast, + 993310, 'CubicSpline', 0.1, 1500, 1500 + ) FROM raster_resample_src) +), ( + 2.14, (SELECT ST_Transform( + rast, + 993310, 500, 500 + ) FROM raster_resample_src) +), ( + 2.15, (SELECT ST_Transform( + rast, + 993310, 750 + ) FROM raster_resample_src) +); + +-- ST_Rescale +INSERT INTO raster_resample_dst (rid, rast) VALUES ( + 3.1, (SELECT ST_Rescale( + rast, + 100, 100 + ) FROM raster_resample_src) +), ( + 3.2, (SELECT ST_Rescale( + rast, + 100 + ) FROM raster_resample_src) +), ( + 3.3, (SELECT ST_Rescale( + rast, + 0, 0 + ) FROM raster_resample_src) +), ( + 3.4, (SELECT ST_Rescale( + rast, + 0 + ) FROM raster_resample_src) +), ( + 3.5, (SELECT ST_Rescale( + rast, + 100, 100, + 'Bilinear', 0 + ) FROM raster_resample_src) +), ( + 3.6, (SELECT ST_Rescale( + rast, + 150, 125, + 'Cubic' + ) FROM raster_resample_src) +); + +-- ST_Reskew +INSERT INTO raster_resample_dst (rid, rast) VALUES ( + 4.1, (SELECT ST_Reskew( + rast, + 0, 0 + ) FROM raster_resample_src) +), ( + 4.2, (SELECT ST_Reskew( + rast, + 1, 1 + ) FROM raster_resample_src) +), ( + 4.3, (SELECT ST_Reskew( + rast, + 0.5, 0 + ) FROM raster_resample_src) +), ( + 4.4, (SELECT ST_Reskew( + rast, + 10 + ) FROM raster_resample_src) +), ( + 4.5, (SELECT ST_Reskew( + rast, + 10, + 'CubicSpline' + ) FROM raster_resample_src) +), ( + 4.6, (SELECT ST_Reskew( + rast, + 10, + 'Bilinear', 0 + ) FROM raster_resample_src) +); + +-- ST_SnapToGrid +INSERT INTO raster_resample_dst (rid, rast) VALUES ( + 5.1, (SELECT ST_SnapToGrid( + rast, + -500000, 600000 + ) FROM raster_resample_src) +), ( + 5.2, (SELECT ST_SnapToGrid( + rast, + 0, 0 + ) FROM raster_resample_src) +), ( + 5.3, (SELECT ST_SnapToGrid( + rast, + -1, 600000 + ) FROM raster_resample_src) +), ( + 5.4, (SELECT ST_SnapToGrid( + rast, + -500001, 600000 + ) FROM raster_resample_src) +), ( + 5.5, (SELECT ST_SnapToGrid( + rast, + 1, 600000 + ) FROM raster_resample_src) +), ( + 5.6, (SELECT ST_SnapToGrid( + rast, + -500000, -1 + ) FROM raster_resample_src) +), ( + 5.7, (SELECT ST_SnapToGrid( + rast, + -500000, -9 + ) FROM raster_resample_src) +), ( + 5.8, (SELECT ST_SnapToGrid( + rast, + -500000, 1 + ) FROM raster_resample_src) +), ( + 5.9, (SELECT ST_SnapToGrid( + rast, + -500000, 9 + ) FROM raster_resample_src) +), ( + 5.10, (SELECT ST_SnapToGrid( + rast, + -5, 1 + ) FROM raster_resample_src) +), ( + 5.11, (SELECT ST_SnapToGrid( + rast, + 9, -9 + ) FROM raster_resample_src) +), ( + 5.12, (SELECT ST_SnapToGrid( + rast, + -500000, 600000, + 50, 50 + ) FROM raster_resample_src) +), ( + 5.13, (SELECT ST_SnapToGrid( + rast, + 0, 0, + 50, 50 + ) FROM raster_resample_src) +), ( + 5.14, (SELECT ST_SnapToGrid( + rast, + -1, 600000, + 50, 50 + ) FROM raster_resample_src) +), ( + 5.15, (SELECT ST_SnapToGrid( + rast, + -500001, 600000, + 50, 50 + ) FROM raster_resample_src) +), ( + 5.16, (SELECT ST_SnapToGrid( + rast, + 1, 600000, + 50, 50 + ) FROM raster_resample_src) +), ( + 5.17, (SELECT ST_SnapToGrid( + rast, + -500000, -1, + 50, 50 + ) FROM raster_resample_src) +), ( + 5.18, (SELECT ST_SnapToGrid( + rast, + -500000, -9, + 50, 50 + ) FROM raster_resample_src) +), ( + 5.19, (SELECT ST_SnapToGrid( + rast, + -500000, 1, + 50, 50 + ) FROM raster_resample_src) +), ( + 5.20, (SELECT ST_SnapToGrid( + rast, + -500000, 9, + 50, 50 + ) FROM raster_resample_src) +), ( + 5.21, (SELECT ST_SnapToGrid( + rast, + -5, 1, + 50, 50 + ) FROM raster_resample_src) +), ( + 5.22, (SELECT ST_SnapToGrid( + rast, + 9, -9, + 50, 50 + ) FROM raster_resample_src) +), ( + 5.23, (SELECT ST_SnapToGrid( + rast, + 0, 0, + 121 + ) FROM raster_resample_src) +), ( + 5.24, (SELECT ST_SnapToGrid( + rast, + -500000, 1, + 121 + ) FROM raster_resample_src) +), ( + 5.25, (SELECT ST_SnapToGrid( + rast, + -500000, 9, + 121 + ) FROM raster_resample_src) +), ( + 5.26, (SELECT ST_SnapToGrid( + rast, + -5, 1, + 121 + ) FROM raster_resample_src) +), ( + 5.27, (SELECT ST_SnapToGrid( + rast, + 9, -9, + 121 + ) FROM raster_resample_src) +); + +SELECT + rid, + srid, + width, + height, + numbands, + round(scalex::numeric, 3) AS scalex, + round(scaley::numeric, 3) AS scaley, + round(skewx::numeric, 3) AS skewx, + round(skewy::numeric, 3) AS skewy, + round(upperleftx::numeric, 3) AS upperleftx, + round(upperlefty::numeric, 3) AS upperlefty, + count > 0 AS count_check, + round(min::numeric, 3) >= 1.667 AS min_check, + round(max::numeric, 3) <= 100.995 AS max_check +FROM ( + SELECT + rid, + (ST_MetaData(rast)).*, + (ST_SummaryStats(rast)).* + FROM raster_resample_dst + ORDER BY rid +) foo; + +DELETE FROM "spatial_ref_sys" WHERE srid = 992163; +DELETE FROM "spatial_ref_sys" WHERE srid = 993309; +DELETE FROM "spatial_ref_sys" WHERE srid = 993310; +DELETE FROM "spatial_ref_sys" WHERE srid = 994269; +DELETE FROM "spatial_ref_sys" WHERE srid = 984269; +DELETE FROM "spatial_ref_sys" WHERE srid = 974269; + +DROP TABLE raster_resample_src; +DROP TABLE raster_resample_dst; diff -Nru postgis-1.5.3/raster/test/regress/rt_resample_expected postgis-2.0.1/raster/test/regress/rt_resample_expected --- postgis-1.5.3/raster/test/regress/rt_resample_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_resample_expected 2012-05-04 02:54:14.000000000 +0000 @@ -0,0 +1,90 @@ +NOTICE: table "raster_resample_src" does not exist, skipping +NOTICE: table "raster_resample_dst" does not exist, skipping +NOTICE: Values must be provided for both X and Y when specifying the scale. Returning original raster +NOTICE: Values must be provided for both X and Y when specifying the scale. Returning original raster +1.0||||||||||||| +1.1|992163|10|10|1|1000.000|-1000.000|0.000|0.000|-500000.000|600000.000|t|t|t +1.10|992163|40|40|1|250.000|250.000|0.000|0.000|-500000.000|590000.000|t|t|t +1.11|992163|10|10|1|1000.000|-1000.000|0.000|0.000|-500000.000|600000.000|t|t|t +1.12|992163|11|10|1|1000.000|-1000.000|0.000|0.000|-500001.000|600000.000|t|t|t +1.13|992163|10|11|1|1000.000|-1000.000|0.000|0.000|-500000.000|600009.000|t|t|t +1.14|992163|11|11|1|1000.000|-1000.000|0.000|0.000|-500100.000|600950.000|t|t|t +1.15|992163|201|201|1|50.000|50.000|0.000|0.000|-500040.000|589957.000|t|t|t +1.16|992163|84|84|1|121.000|121.000|0.000|0.000|-500093.000|589875.000|t|t|t +1.17|993310|243|243|1|50.000|50.000|0.000|0.000|950710.000|1397157.000|t|t|t +1.18|993309|243|243|1|50.000|50.000|0.000|0.000|950760.000|1396957.000|t|t|t +1.19|992163|10|10|1|1000.000|-1000.000|3.000|3.000|-500030.000|600000.000|t|t|t +1.2|993310|12|12|1|1009.894|-1009.894|0.000|0.000|950732.188|1409281.783|t|t|t +1.20|993310|12|12|1|1009.894|-1009.894|3.000|3.000|950691.792|1409281.783|t|t|t +1.21|993309|12|12|1|1009.916|-1009.916|1.000|3.000|950742.107|1409088.896|t|t|t +1.22|993310|24|24|1|500.000|500.000|3.000|3.000|950657.188|1397356.783|t|t|t +1.23|993310|26|26|1|500.000|500.000|0.000|6.000|950452.000|1396632.000|t|t|t +1.24|992163|207|101|1|50.000|-100.000|3.000|0.000|-500319.000|600056.000|t|t|t +1.25|992163|207|101|1|50.000|-100.000|3.000|0.000|-500319.000|600056.000|t|t|t +1.26|992163|150|150|1|66.667|-66.667|0.000|0.000|-500000.000|600000.000|t|t|t +1.27|993310|150|150|1|80.792|-80.792|0.000|0.000|950732.188|1409281.783|t|t|t +1.28|992163|5|5|1|2064.200|-2291.200|0.000|0.000|-500321.000|601456.000|t|t|t +1.29||||||||||||| +1.3|993309|12|12|1|1009.916|-1009.916|0.000|0.000|950762.305|1409088.896|t|t|t +1.30|984269|12|8|1|0.012|-0.012|0.000|0.000|-107.029|50.206|t|t|t +1.31|974269|12|8|1|0.012|-0.012|0.000|0.000|-107.029|50.206|t|t|t +1.4|994269|12|8|1|0.012|-0.012|0.000|0.000|-107.029|50.206|t|t|t +1.5|993310|24|24|1|500.000|500.000|0.000|0.000|950732.188|1397281.783|t|t|t +1.6|992163|10|10|1|1000.000|-1000.000|0.000|0.000|-500000.000|600000.000|t|t|t +1.7|992163|10|10|1|1000.000|-1000.000|0.000|0.000|-500000.000|600000.000|t|t|t +1.8|992163|20|20|1|500.000|500.000|0.000|0.000|-500000.000|590000.000|t|t|t +1.9|992163|40|40|1|250.000|250.000|0.000|0.000|-500000.000|590000.000|t|t|t +2.1|993310|12|12|1|1009.894|-1009.894|0.000|0.000|950732.188|1409281.783|t|t|t +2.10|993310|24|24|1|500.000|500.000|0.000|0.000|950732.188|1397281.783|t|t|t +2.11|993309|121|121|1|100.000|100.000|0.000|0.000|950762.305|1396988.896|t|t|t +2.12|993310|6|6|1|2000.000|2000.000|0.000|0.000|950732.188|1397281.783|t|t|t +2.13|993310|8|8|1|1500.000|1500.000|0.000|0.000|950732.188|1397281.783|t|t|t +2.14|993310|24|24|1|500.000|500.000|0.000|0.000|950732.188|1397281.783|t|t|t +2.15|993310|16|16|1|750.000|750.000|0.000|0.000|950732.188|1397281.783|t|t|t +2.2|993309|12|12|1|1009.916|-1009.916|0.000|0.000|950762.305|1409088.896|t|t|t +2.3|994269|12|8|1|0.012|-0.012|0.000|0.000|-107.029|50.206|t|t|t +2.4||||||||||||| +2.5|993310|12|12|1|1009.894|-1009.894|0.000|0.000|950732.188|1409281.783|t|t|t +2.6||||||||||||| +2.7|993310|12|12|1|1009.894|-1009.894|0.000|0.000|950732.188|1409281.783|t|t|t +2.8|993310|12|12|1|1009.894|-1009.894|0.000|0.000|950732.188|1409281.783|t|t|t +2.9|993310|12|12|1|1009.894|-1009.894|0.000|0.000|950732.188|1409281.783|t|t|t +3.1|992163|100|100|1|100.000|100.000|0.000|0.000|-500000.000|590000.000|t|t|t +3.2|992163|100|100|1|100.000|100.000|0.000|0.000|-500000.000|590000.000|t|t|t +3.3|992163|10|10|1|1000.000|-1000.000|0.000|0.000|-500000.000|600000.000|t|t|t +3.4|992163|10|10|1|1000.000|-1000.000|0.000|0.000|-500000.000|600000.000|t|t|t +3.5|992163|100|100|1|100.000|100.000|0.000|0.000|-500000.000|590000.000|t|t|t +3.6|992163|67|80|1|150.000|125.000|0.000|0.000|-500000.000|590000.000|t|t|t +4.1|992163|10|10|1|1000.000|-1000.000|0.000|0.000|-500000.000|600000.000|t|t|t +4.2|992163|10|10|1|1000.000|-1000.000|1.000|1.000|-500010.000|600000.000|t|t|t +4.3|992163|10|10|1|1000.000|-1000.000|0.500|0.000|-500010.000|600000.000|t|t|t +4.4|992163|10|10|1|1000.000|-1000.000|10.000|10.000|-500100.000|600000.000|t|t|t +4.5|992163|10|10|1|1000.000|-1000.000|10.000|10.000|-500100.000|600000.000|t|t|t +4.6|992163|10|10|1|1000.000|-1000.000|10.000|10.000|-500100.000|600000.000|t|t|t +5.1|992163|10|10|1|1000.000|-1000.000|0.000|0.000|-500000.000|600000.000|t|t|t +5.10|992163|11|11|1|1000.000|-1000.000|0.000|0.000|-500005.000|600001.000|t|t|t +5.11|992163|11|11|1|1000.000|-1000.000|0.000|0.000|-500991.000|600991.000|t|t|t +5.12|992163|200|200|1|50.000|50.000|0.000|0.000|-500000.000|590000.000|t|t|t +5.13|992163|200|200|1|50.000|50.000|0.000|0.000|-500000.000|590000.000|t|t|t +5.14|992163|201|200|1|50.000|50.000|0.000|0.000|-500001.000|590000.000|t|t|t +5.15|992163|201|200|1|50.000|50.000|0.000|0.000|-500001.000|590000.000|t|t|t +5.16|992163|201|200|1|50.000|50.000|0.000|0.000|-500049.000|590000.000|t|t|t +5.17|992163|200|201|1|50.000|50.000|0.000|0.000|-500000.000|589999.000|t|t|t +5.18|992163|200|201|1|50.000|50.000|0.000|0.000|-500000.000|589991.000|t|t|t +5.19|992163|200|201|1|50.000|50.000|0.000|0.000|-500000.000|589951.000|t|t|t +5.2|992163|10|10|1|1000.000|-1000.000|0.000|0.000|-500000.000|600000.000|t|t|t +5.20|992163|200|201|1|50.000|50.000|0.000|0.000|-500000.000|589959.000|t|t|t +5.21|992163|201|201|1|50.000|50.000|0.000|0.000|-500005.000|589951.000|t|t|t +5.22|992163|201|201|1|50.000|50.000|0.000|0.000|-500041.000|589991.000|t|t|t +5.23|992163|84|84|1|121.000|121.000|0.000|0.000|-500093.000|589875.000|t|t|t +5.24|992163|83|84|1|121.000|121.000|0.000|0.000|-500000.000|589876.000|t|t|t +5.25|992163|83|84|1|121.000|121.000|0.000|0.000|-500000.000|589884.000|t|t|t +5.26|992163|84|84|1|121.000|121.000|0.000|0.000|-500098.000|589876.000|t|t|t +5.27|992163|84|84|1|121.000|121.000|0.000|0.000|-500084.000|589866.000|t|t|t +5.3|992163|11|10|1|1000.000|-1000.000|0.000|0.000|-500001.000|600000.000|t|t|t +5.4|992163|11|10|1|1000.000|-1000.000|0.000|0.000|-500001.000|600000.000|t|t|t +5.5|992163|11|10|1|1000.000|-1000.000|0.000|0.000|-500999.000|600000.000|t|t|t +5.6|992163|10|11|1|1000.000|-1000.000|0.000|0.000|-500000.000|600999.000|t|t|t +5.7|992163|10|11|1|1000.000|-1000.000|0.000|0.000|-500000.000|600991.000|t|t|t +5.8|992163|10|11|1|1000.000|-1000.000|0.000|0.000|-500000.000|600001.000|t|t|t +5.9|992163|10|11|1|1000.000|-1000.000|0.000|0.000|-500000.000|600009.000|t|t|t diff -Nru postgis-1.5.3/raster/test/regress/rt_right.sql postgis-2.0.1/raster/test/regress/rt_right.sql --- postgis-1.5.3/raster/test/regress/rt_right.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_right.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,38 @@ +----------------------------------------------------------------------- +-- $Id$ +-- +-- Copyright (c) 2009 Sandro Santilli +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +----------------------------------------------------------------------- + +------------------------------------------------------------------- +-- raster_right +----------------------------------------------------------------------- + +SELECT 'raster_right(X, query(1,1))' as op, + count(a.y), + min(a.x) as xmin, + max(a.x) as xmax, + min(a.y) as ymin, + max(a.y) as ymax, + st_extent(a.tile::geometry) +FROM rt_gist_grid_test a, rt_gist_query_test b +WHERE b.x = 1 and b.y = 1 + AND raster_right(a.tile, b.tile); + +----------------------------------------------------------------------- +-- Test >> operator (right) +----------------------------------------------------------------------- + +SELECT 'X >> query(1,1)' as op, + count(a.y), + min(a.x) as xmin, + max(a.x) as xmax, + min(a.y) as ymin, + max(a.y) as ymax, + st_extent(a.tile::geometry) +FROM rt_gist_grid_test a, rt_gist_query_test b +WHERE b.x = 1 and b.y = 1 + AND a.tile >> b.tile; diff -Nru postgis-1.5.3/raster/test/regress/rt_right_expected postgis-2.0.1/raster/test/regress/rt_right_expected --- postgis-1.5.3/raster/test/regress/rt_right_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_right_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +raster_right(X, query(1,1))|30|7|9|0|9|BOX(40 -100,100 100) +X >> query(1,1)|30|7|9|0|9|BOX(40 -100,100 100) diff -Nru postgis-1.5.3/raster/test/regress/rt_rotation.sql postgis-2.0.1/raster/test/regress/rt_rotation.sql --- postgis-1.5.3/raster/test/regress/rt_rotation.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_rotation.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,91 @@ +----------------------------------------------------------------------- +-- $Id$ +-- +-- Copyright (c) 2009 Mateusz Loskot +-- Copyright (c) 2011 David Zwarg +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +----------------------------------------------------------------------- + +----------------------------------------------------------------------- +-- st_skewx +----------------------------------------------------------------------- + +SELECT 'T1', id, name, skewx + FROM rt_properties_test + WHERE st_skewx(rast) != skewx; + +----------------------------------------------------------------------- +-- st_skewy +----------------------------------------------------------------------- + +SELECT 'T2', id, name, skewy + FROM rt_properties_test + WHERE st_skewy(rast) != skewy; + +----------------------------------------------------------------------- +-- st_setrotation +----------------------------------------------------------------------- + +SELECT 'T3', id, name, round(st_rotation(rast)*1000000000000) as rotation + FROM rt_properties_test + WHERE st_rotation(rast) != 0; + +INSERT INTO rt_properties_test + (id, name, srid, width, height, scalex, scaley, ipx, ipy, skewx, skewy, rast) + (SELECT id + 100, name, srid, width, height, scalex, scaley, ipx, ipy, skewx, skewy, st_setrotation(rast,0) + FROM rt_properties_test + WHERE st_rotation(rast) != 0); + +UPDATE rt_properties_test + SET scalex = round(st_scalex(rast)*1000000000000), + scaley = round(st_scaley(rast)*1000000000000), + skewx = round(st_skewx(rast)*1000000000000), + skewy = round(st_skewy(rast)*1000000000000), + ipx = round(st_upperleftx(rast)*1000000000000), + ipy = round(st_upperlefty(rast)*1000000000000) + WHERE id > 100; + +SELECT 'T4', id, scalex, scaley, abs(skewx), abs(skewy), st_rotation(rast) + FROM rt_properties_test + WHERE id > 100; + +UPDATE rt_properties_test + SET rast = st_setrotation(rast,pi()/4) + WHERE id > 100; + +UPDATE rt_properties_test + SET scalex = round(st_scalex(rast)*1000000000000), + scaley = round(st_scaley(rast)*1000000000000), + skewx = round(st_skewx(rast)*1000000000000), + skewy = round(st_skewy(rast)*1000000000000), + ipx = round(st_upperleftx(rast)*1000000000000), + ipy = round(st_upperlefty(rast)*1000000000000) + WHERE id > 100; + +SELECT 'T5', id, scalex, scaley, skewx, skewy, + round(st_rotation(rast)*1000000000000) + FROM rt_properties_test + WHERE id > 100; + +UPDATE rt_properties_test + SET rast = st_setrotation(rast,pi()/6) + WHERE id > 100; + +UPDATE rt_properties_test + SET scalex = round(st_scalex(rast)*1000000000000), + scaley = round(st_scaley(rast)*1000000000000), + skewx = round(st_skewx(rast)*1000000000000), + skewy = round(st_skewy(rast)*1000000000000), + ipx = round(st_upperleftx(rast)*1000000000000), + ipy = round(st_upperlefty(rast)*1000000000000) + WHERE id > 100; + +SELECT 'T6', id, scalex, scaley, skewx, skewy, + round(st_rotation(rast)*1000000000000) + FROM rt_properties_test + WHERE id > 100; + +DELETE FROM rt_properties_test + WHERE id > 100; diff -Nru postgis-1.5.3/raster/test/regress/rt_rotation_expected postgis-2.0.1/raster/test/regress/rt_rotation_expected --- postgis-1.5.3/raster/test/regress/rt_rotation_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_rotation_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,8 @@ +T3|4|1x1, ip:7.5,2.5 scale:5,5 skew:1,1, srid:-1, width:1, height:1|-197395559850 +T3|5|1x1, ip:7.5,2.5 scale:5,5 skew:3,7, srid:-1, width:1, height:1|-950546840812 +T4|104|5099019513593|4706787243316|1961161351382|0|0 +T4|105|8602325267043|464990554975|5812381937191|0|0 +T5|104|3605551275464|1941450686788|4714951667914|-3605551275464|785398163397 +T5|105|6082762530298|-3781176708023|4438772657245|-6082762530298|785398163397 +T6|104|4415880433164|3095616647230|4051809172875|-2549509756796|523598775598 +T6|105|7449832212876|-2503497335467|5266165691593|-4301162633521|523598775598 diff -Nru postgis-1.5.3/raster/test/regress/rt_same.sql postgis-2.0.1/raster/test/regress/rt_same.sql --- postgis-1.5.3/raster/test/regress/rt_same.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_same.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,60 @@ +----------------------------------------------------------------------- +-- $Id$ +-- +-- Copyright (c) 2009 Sandro Santilli +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +----------------------------------------------------------------------- + +------------------------------------------------------------------- +-- raster_same +----------------------------------------------------------------------- + +SELECT 'raster_same(X, query(1,1))' as op, + count(a.y), + min(a.x) as xmin, + max(a.x) as xmax, + min(a.y) as ymin, + max(a.y) as ymax, + st_extent(a.tile::geometry) +FROM rt_gist_grid_test a, rt_gist_query_test b +WHERE b.x = 1 and b.y = 1 + AND raster_same(a.tile, b.tile); + +SELECT 'raster_same(X, query(7,7))' as op, + count(a.y), + min(a.x) as xmin, + max(a.x) as xmax, + min(a.y) as ymin, + max(a.y) as ymax, + st_extent(a.tile::geometry) +FROM rt_gist_grid_test a, rt_gist_grid_test b +WHERE b.x = 7 and b.y = 7 + AND raster_same(a.tile, b.tile); + +----------------------------------------------------------------------- +-- Test ~= operator (same) +----------------------------------------------------------------------- + +SELECT 'X ~= query(1,1)' as op, + count(a.y), + min(a.x) as xmin, + max(a.x) as xmax, + min(a.y) as ymin, + max(a.y) as ymax, + st_extent(a.tile::geometry) +FROM rt_gist_grid_test a, rt_gist_query_test b +WHERE b.x = 1 and b.y = 1 + AND a.tile ~= b.tile; + +SELECT 'X ~= tile(7,7)' as op, + count(a.y), + min(a.x) as xmin, + max(a.x) as xmax, + min(a.y) as ymin, + max(a.y) as ymax, + st_extent(a.tile::geometry) +FROM rt_gist_grid_test a, rt_gist_grid_test b +WHERE b.x = 7 and b.y = 7 + AND a.tile ~= b.tile; diff -Nru postgis-1.5.3/raster/test/regress/rt_same_expected postgis-2.0.1/raster/test/regress/rt_same_expected --- postgis-1.5.3/raster/test/regress/rt_same_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_same_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,4 @@ +raster_same(X, query(1,1))|0||||| +raster_same(X, query(7,7))|1|7|7|7|7|BOX(40 40,60 60) +X ~= query(1,1)|0||||| +X ~= tile(7,7)|1|7|7|7|7|BOX(40 40,60 60) diff -Nru postgis-1.5.3/raster/test/regress/rt_samealignment.sql postgis-2.0.1/raster/test/regress/rt_samealignment.sql --- postgis-1.5.3/raster/test/regress/rt_samealignment.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_samealignment.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,40 @@ +SELECT ST_SameAlignment( + ST_MakeEmptyRaster(1, 1, 0, 0, 1, 1, 0, 0), + ST_MakeEmptyRaster(1, 1, 0, 0, 1, 1, 0, 0) +); +SELECT ST_SameAlignment( + ST_MakeEmptyRaster(1, 1, 0, 0, 1, 1, 0, 0), + ST_MakeEmptyRaster(1, 1, 0, 0, 1.1, 1.1, 0, 0) +); +SELECT ST_SameAlignment( + ST_MakeEmptyRaster(1, 1, 0, 0, 1.1, 1.1, 0, 0), + ST_MakeEmptyRaster(1, 1, 0, 0, 1, 1, 0, 0) +); +SELECT ST_SameAlignment( + ST_MakeEmptyRaster(1, 1, 0, 0, 1, 1, 0, 0), + ST_MakeEmptyRaster(1, 1, 0, 0, 1, 1, -0.1, 0) +); +SELECT ST_SameAlignment( + ST_MakeEmptyRaster(1, 1, 0, 0, 1, 1, 0, 0), + ST_MakeEmptyRaster(1, 1, 0, 0, 1, 1, 0, 0.1) +); +SELECT ST_SameAlignment( + ST_MakeEmptyRaster(1, 1, 0, 0, 1, 1, 0, 0), + ST_MakeEmptyRaster(1, 1, 0, 0, 1, 1, -0.1, 0.1) +); +SELECT ST_SameAlignment( + ST_MakeEmptyRaster(1, 1, 0, 0, 1, 1, 0, 0), + ST_MakeEmptyRaster(1, 1, 1, 1, 1, 1, 0, 0) +); +SELECT ST_SameAlignment( + ST_MakeEmptyRaster(1, 1, 0, 0, 1, 1, 0, 0), + ST_MakeEmptyRaster(1, 1, 0.1, 0.1, 1, 1, 0, 0) +); +SELECT ST_SameAlignment( + ST_MakeEmptyRaster(1, 1, 0, 0, 1, 1, -0.1, 0.1), + ST_MakeEmptyRaster(1, 1, 0, 0, 1, 1, -0.1, 0.1) +); +SELECT ST_SameAlignment( + ST_MakeEmptyRaster(1, 1, 0, 0, 1, 1, -0.1, 0.1), + ST_MakeEmptyRaster(1, 1, 0, 0, 1, 1, -0.1, 0) +); diff -Nru postgis-1.5.3/raster/test/regress/rt_samealignment_expected postgis-2.0.1/raster/test/regress/rt_samealignment_expected --- postgis-1.5.3/raster/test/regress/rt_samealignment_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_samealignment_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,16 @@ +t +NOTICE: The two rasters provided have different scales on the X axis +f +NOTICE: The two rasters provided have different scales on the X axis +f +NOTICE: The two rasters provided have different skews on the X axis +f +NOTICE: The two rasters provided have different skews on the Y axis +f +NOTICE: The two rasters provided have different skews on the X axis +f +t +f +t +NOTICE: The two rasters provided have different skews on the Y axis +f diff -Nru postgis-1.5.3/raster/test/regress/rt_scale.sql postgis-2.0.1/raster/test/regress/rt_scale.sql --- postgis-1.5.3/raster/test/regress/rt_scale.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_scale.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,24 @@ +----------------------------------------------------------------------- +-- $Id$ +-- +-- Copyright (c) 2009 Mateusz Loskot +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +----------------------------------------------------------------------- + +----------------------------------------------------------------------- +-- st_scalex +----------------------------------------------------------------------- + +SELECT id, name, scalex + FROM rt_properties_test + WHERE st_scalex(rast) != scalex; + +----------------------------------------------------------------------- +-- st_scalex +----------------------------------------------------------------------- + +SELECT id, name, scaley + FROM rt_properties_test + WHERE st_scaley(rast) != scaley; diff -Nru postgis-1.5.3/raster/test/regress/rt_set_band_properties.sql postgis-2.0.1/raster/test/regress/rt_set_band_properties.sql --- postgis-1.5.3/raster/test/regress/rt_set_band_properties.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_set_band_properties.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,23 @@ +----------------------------------------------------------------------- +-- $Id$ +-- +-- Copyright (c) 2010 David Zwarg +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +----------------------------------------------------------------------- + +----------------------------------------------------------------------- +--- Test of "Set" functions for properties of a raster band. +----------------------------------------------------------------------- + + +----------------------------------------------------------------------- +--- ST_SetBandNoDataValue +----------------------------------------------------------------------- + +SELECT + (b1nodatavalue+1) AS expected, + st_bandnodatavalue(st_setbandnodatavalue(rast, 1, b1nodatavalue+1),1) AS obtained + FROM rt_band_properties_test +WHERE (b1nodatavalue+1) != st_bandnodatavalue(st_setbandnodatavalue(rast, 1, b1nodatavalue+1),1); diff -Nru postgis-1.5.3/raster/test/regress/rt_set_properties.sql postgis-2.0.1/raster/test/regress/rt_set_properties.sql --- postgis-1.5.3/raster/test/regress/rt_set_properties.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_set_properties.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,88 @@ +----------------------------------------------------------------------- +-- $Id$ +-- +-- Copyright (c) 2010 David Zwarg , Pierre Racine +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +----------------------------------------------------------------------- + +----------------------------------------------------------------------- +--- Test of "Set" functions for properties of the raster. +--- (Objective B03a) +----------------------------------------------------------------------- + + +----------------------------------------------------------------------- +--- ST_SetSRID +----------------------------------------------------------------------- + +SELECT + (srid+1) AS expected, + st_srid(st_setsrid(rast,srid+1)) AS obtained + FROM rt_properties_test +WHERE (srid+1) != st_srid(st_setsrid(rast,srid+1)); + + +----------------------------------------------------------------------- +--- ST_SetScale +----------------------------------------------------------------------- + +SELECT + (scalex+2) AS expectedx, + (scaley+3) AS expectedy, + st_scalex(st_setscale(rast,scalex+2,scaley)) AS obtainedx, + st_scaley(st_setscale(rast,scalex,scaley+3)) AS obtainedy + FROM rt_properties_test +WHERE + (scalex+2) != st_scalex(st_setscale(rast,scalex+2,scaley)) OR + (scaley+3) != st_scaley(st_setscale(rast,scalex,scaley+3)); + +SELECT + (scalex+2) AS expectedx, + (scaley+3) AS expectedy, + st_scalex(st_setscale(rast,scalex+2)) AS obtainedx, + st_scaley(st_setscale(rast,scaley+3)) AS obtainedy + FROM rt_properties_test +WHERE + (scalex+2) != st_scalex(st_setscale(rast,scalex+2)) OR + (scaley+3) != st_scaley(st_setscale(rast,scaley+3)); + +----------------------------------------------------------------------- +--- ST_SetSkew +----------------------------------------------------------------------- + +SELECT + (skewx+2) AS expectedx, + (skewy+3) AS expectedy, + st_skewx(st_setskew(rast,skewx+2,skewy)) AS obtainedx, + st_skewy(st_setskew(rast,skewx,skewy+3)) AS obtainedy + FROM rt_properties_test +WHERE + (skewx+2) != st_skewx(st_setskew(rast,skewx+2,skewy)) OR + (skewy+3) != st_skewy(st_setskew(rast,skewx,skewy+3)); + +SELECT + (skewx+2) AS expectedx, + (skewy+3) AS expectedy, + st_skewx(st_setskew(rast,skewx+2)) AS obtainedx, + st_skewy(st_setskew(rast,skewy+3)) AS obtainedy + FROM rt_properties_test +WHERE + (skewx+2) != st_skewx(st_setskew(rast,skewx+2)) OR + (skewy+3) != st_skewy(st_setskew(rast,skewy+3)); + + +----------------------------------------------------------------------- +--- ST_SetUpperLeft +----------------------------------------------------------------------- + +SELECT + (ipx+2) AS expectedx, + (ipy+3) AS expectedy, + st_upperleftx(st_setupperleft(rast,ipx+2,ipy)) AS obtainedx, + st_upperlefty(st_setupperleft(rast,ipx,ipy+3)) AS obtainedy + FROM rt_properties_test +WHERE + (ipx+2) != st_upperleftx(st_setupperleft(rast,ipx+2,ipy)) OR + (ipy+3) != st_upperlefty(st_setupperleft(rast,ipx,ipy+3)); diff -Nru postgis-1.5.3/raster/test/regress/rt_spatial_relationship.sql postgis-2.0.1/raster/test/regress/rt_spatial_relationship.sql --- postgis-1.5.3/raster/test/regress/rt_spatial_relationship.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_spatial_relationship.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,320 @@ +----------------------------------------------------------------------- +-- $Id$ +-- +-- Copyright (c) 2010 Pierre Racine +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +----------------------------------------------------------------------- + +CREATE TABLE rt_spatial_relationship_test ( + rid integer, + description text, + nbband int, + b1pixeltype text, + b1hasnodatavalue boolean, + b1nodatavalue float4, + b1val float4, + b2pixeltype text, + b2hasnodatavalue boolean, + b2nodatavalue float4, + b2val float4, + geomtxt text, + rast raster +); + +INSERT INTO rt_spatial_relationship_test +VALUES ( 1, '1x1, nbband:2 b1pixeltype:4BUI b1hasnodatavalue:true b1nodatavalue:3 b2pixeltype:16BSI b2hasnodatavalue:false b2nodatavalue:13', + 2, --- nbband + '4BUI', true, 3, 2, --- b1pixeltype, b1hasnodatavalue, b1nodatavalue + '16BSI', false, 13, 4, --- b2pixeltype, b2hasnodatavalue, b2nodatavalue + 'POLYGON((782325.5 26744042.5,782330.5 26744045.5,782333.5 26744040.5,782328.5 26744037.5,782325.5 26744042.5))', +( +'01' -- big endian (uint8 xdr) +|| +'0000' -- version (uint16 0) +|| +'0200' -- nBands (uint16 1) +|| +'0000000000001440' -- scaleX (float64 5) +|| +'00000000000014C0' -- scaleY (float64 -5) +|| +'00000000EBDF2741' -- ipX (float64 782325.5) +|| +'000000A84E817941' -- ipY (float64 26744042.5) +|| +'0000000000000840' -- skewX (float64 3) +|| +'0000000000000840' -- skewY (float64 3) +|| +'27690000' -- SRID (int32 26919 - UTM 19N) +|| +'0200' -- width (uint16 1) +|| +'0200' -- height (uint16 1) +|| +'4' -- hasnodatavalue set to true +|| +'2' -- first band type (4BUI) +|| +'04' -- novalue==4 +|| +'01' -- pixel(1,1)==1 +'02' -- pixel(2,1)==2 +'03' -- pixel(1,2)==3 +'04' -- pixel(2,2)==4 +|| +'0' -- hasnodatavalue set to false +|| +'5' -- second band type (16BSI) +|| +'0400' -- novalue==13 +|| +'0100' -- pixel(1,1)==1 +'0200' -- pixel(2,1)==2 +'0300' -- pixel(1,2)==3 +'0400' -- pixel(2,2)==4 +)::raster +); + +INSERT INTO rt_spatial_relationship_test +VALUES ( 2, '1x1, nbband:2 b1pixeltype:4BUI b1hasnodatavalue:true b1nodatavalue:3 b2pixeltype:16BSI b2hasnodatavalue:false b2nodatavalue:13', + 2, --- nbband + '4BUI', true, 3, 2, --- b1pixeltype, b1hasnodatavalue, b1nodatavalue + '16BSI', false, 13, 4, --- b2pixeltype, b2hasnodatavalue, b2nodatavalue + 'POLYGON((-75.5533328537098 49.2824585505576,-75.5525268884758 49.2826703629415,-75.5523150760919 49.2818643977075,-75.553121041326 49.2816525853236,-75.5533328537098 49.2824585505576))', +( +'01' -- little endian (uint8 ndr) +|| +'0000' -- version (uint16 0) +|| +'0200' -- nBands (uint16 0) +|| +'17263529ED684A3F' -- scaleX (float64 0.000805965234044584) +|| +'F9253529ED684ABF' -- scaleY (float64 -0.00080596523404458) +|| +'1C9F33CE69E352C0' -- ipX (float64 -75.5533328537098) +|| +'718F0E9A27A44840' -- ipY (float64 49.2824585505576) +|| +'ED50EB853EC32B3F' -- skewX (float64 0.000211812383858707) +|| +'7550EB853EC32B3F' -- skewY (float64 0.000211812383858704) +|| +'E6100000' -- SRID (int32 4326) +|| +'0200' -- width (uint16 1) +|| +'0200' -- height (uint16 1) +|| +'4' -- hasnodatavalue set to true +|| +'2' -- first band type (4BUI) +|| +'04' -- novalue==4 +|| +'01' -- pixel(1,1)==1 +'02' -- pixel(2,1)==2 +'03' -- pixel(1,2)==3 +'04' -- pixel(2,2)==4 +|| +'0' -- hasnodatavalue set to false +|| +'5' -- second band type (16BSI) +|| +'0400' -- novalue==4 +|| +'0100' -- pixel(1,1)==1 +'0200' -- pixel(2,1)==2 +'0300' -- pixel(1,2)==3 +'0400' -- pixel(2,2)==4 +)::raster +); + +CREATE TABLE rt_spatial_relationship_test_geom ( + geomid int, + forrast int, + geom geometry +); + +-- Insert points for raster no 1 + +INSERT INTO rt_spatial_relationship_test_geom +VALUES ( 1, 1, st_setsrid(st_makepoint(782325.5, 26744042.5), 26919)); + +INSERT INTO rt_spatial_relationship_test_geom +VALUES ( 2, 1, st_setsrid(st_makepoint(782325.5 + 1, 26744042.5), 26919)); + +INSERT INTO rt_spatial_relationship_test_geom +VALUES ( 3, 1, st_setsrid(st_makepoint(782325.5 + 10, 26744042.5 + 10), 26919)); + +INSERT INTO rt_spatial_relationship_test_geom +VALUES ( 4, 1, st_setsrid(st_makepoint(782325.5 + 10, 26744042.5 - 2), 26919)); + +INSERT INTO rt_spatial_relationship_test_geom +VALUES ( 5, 1, st_setsrid(st_makepoint(782325.5 + 5 + 3, 26744042.5 - 5 + 3), 26919)); + +INSERT INTO rt_spatial_relationship_test_geom +VALUES ( 6, 1, st_setsrid(st_makepoint(782325.5 + 2*5 + 0.5*3, 26744042.5 + 2*3 - 0.5*5), 26919)); + +INSERT INTO rt_spatial_relationship_test_geom +VALUES ( 7, 1, st_setsrid(st_makepoint(782325.5 + 1, 26744042.5 - 3), 26919)); + +-- Insert lines for raster no 1 + +INSERT INTO rt_spatial_relationship_test_geom +VALUES ( 11, 1, st_setsrid(st_makeline(ARRAY[st_makepoint(782325.5 + 1, 26744042.5 + 1), + st_makepoint(782325.5 + 11, 26744042.5 + 11)]), 26919)); +INSERT INTO rt_spatial_relationship_test_geom +VALUES ( 12, 1, st_setsrid(st_makeline(ARRAY[st_makepoint(782325.5 - 1, 26744042.5 - 2), + st_makepoint(782325.5 + 5, 26744042.5 + 4)]), 26919)); +INSERT INTO rt_spatial_relationship_test_geom +VALUES ( 13, 1, st_setsrid(st_makeline(ARRAY[st_makepoint(782325.5, 26744042.5 - 10), + st_makepoint(782325.5 + 18, 26744042.5 - 2)]), 26919)); +INSERT INTO rt_spatial_relationship_test_geom +VALUES ( 14, 1, st_setsrid(st_makeline(ARRAY[st_makepoint(782325.5 + 13, 26744042.5 - 3), + st_makepoint(782325.5 + 18, 26744042.5 - 1)]), 26919)); +INSERT INTO rt_spatial_relationship_test_geom +VALUES ( 15, 1, st_setsrid(st_makeline(ARRAY[st_makepoint(782325.5 + 2*5 - 0.3*3, 26744042.5 + 2*3 + 0.3*5), + st_makepoint(782325.5 + 2*5 + 0.5*3, 26744042.5 + 2*3 - 0.5*5) + ]), + 26919)); +INSERT INTO rt_spatial_relationship_test_geom +VALUES ( 16, 1, st_setsrid(st_makeline(ARRAY[st_makepoint(782325.5 + 2*5 + 1.5*3, 26744042.5 + 2*3 - 1.5*5), + st_makepoint(782325.5 + 2*5 + 2.5*3, 26744042.5 + 2*3 - 2.5*5) + ]), + 26919)); +INSERT INTO rt_spatial_relationship_test_geom +VALUES ( 17, 1, st_setsrid(st_makeline(ARRAY[st_makepoint(782325.5 + 2*5 + 1.0*3, 26744042.5 + 2*3 - 1.0*5), + st_makepoint(782325.5 + 2*5 + 1.5*3, 26744042.5 + 2*3 - 1.5*5) + ]), + 26919)); +INSERT INTO rt_spatial_relationship_test_geom +VALUES ( 18, 1, st_setsrid(st_makeline(ARRAY[st_makepoint(782325.5 + 4, 26744042.5 - 8), + st_makepoint(782325.5 + 7, 26744042.5 + 6)]), 26919)); + +-- Insert points for raster no 2 + +INSERT INTO rt_spatial_relationship_test_geom +VALUES ( 31, 2, st_setsrid(st_makepoint(-75.5533328537098, 49.2824585505576), 4326)); + +INSERT INTO rt_spatial_relationship_test_geom +VALUES ( 32, 2, st_setsrid(st_makepoint(-75.5533328537098 + 0.0001, 49.2824585505576), 4326)); + +INSERT INTO rt_spatial_relationship_test_geom +VALUES ( 33, 2, st_setsrid(st_makepoint(-75.5533328537098 + 0.001, 49.2824585505576 + 0.001), 4326)); + +INSERT INTO rt_spatial_relationship_test_geom +VALUES ( 34, 2, st_setsrid(st_makepoint(-75.5533328537098 + 0.0015, 49.2824585505576 - 0.001), 4326)); + +INSERT INTO rt_spatial_relationship_test_geom +VALUES ( 35, 2, st_setsrid(st_makepoint( + -75.5533328537098 + 0.000805965234044584 + 0.000211812383858707, + 49.2824585505576 - 0.00080596523404458 + 0.000211812383858704 + ), 4326)); + +INSERT INTO rt_spatial_relationship_test_geom +VALUES ( 36, 2, st_setsrid(st_makepoint( + -75.5533328537098 + 2.0*0.000805965234044584 + 0.5*0.000211812383858707, + 49.2824585505576 + 2.0*0.000211812383858704 - 0.5*0.00080596523404458 + ), 4326)); + +-- Insert lines for raster no 2 + +INSERT INTO rt_spatial_relationship_test_geom +VALUES ( 41, 2, st_setsrid(st_makeline(ARRAY[ + st_makepoint(-75.5533328537098 + 0.0001, 49.2824585505576 + 0.0001), + st_makepoint(-75.5533328537098 + 0.0011, 49.2824585505576 + 0.0011) + ]), 4326)); + +INSERT INTO rt_spatial_relationship_test_geom +VALUES ( 42, 2, st_setsrid(st_makeline(ARRAY[ + st_makepoint(-75.5533328537098 - 0.0001, 49.2824585505576 - 0.0002), + st_makepoint(-75.5533328537098 + 0.0005, 49.2824585505576 + 0.0004) + ]), 4326)); + +INSERT INTO rt_spatial_relationship_test_geom +VALUES ( 43, 2, st_setsrid(st_makeline(ARRAY[ + st_makepoint(-75.5533328537098, 49.2824585505576 - 0.0015), + st_makepoint(-75.5533328537098 + 0.002, 49.2824585505576 - 0.0004) + ]), 4326)); + +INSERT INTO rt_spatial_relationship_test_geom +VALUES ( 44, 2, st_setsrid(st_makeline(ARRAY[ + st_makepoint(-75.5533328537098 + 0.0014, 49.2824585505576 - 0.0005), + st_makepoint(-75.5533328537098 + 0.002, 49.2824585505576 - 0.0005) + ]), 4326)); + +INSERT INTO rt_spatial_relationship_test_geom +VALUES ( 45, 2, st_setsrid(st_makeline(ARRAY[st_makepoint( + -75.5533328537098 + 2.0*0.000805965234044584 - 0.3*0.000211812383858707, + 49.2824585505576 + 2.0*0.000211812383858704 + 0.3*0.00080596523404458 + ), + st_makepoint( + -75.5533328537098 + 2.0*0.000805965234044584 + 0.5*0.000211812383858707, + 49.2824585505576 + 2.0*0.000211812383858704 - 0.5*0.00080596523404458 + ) + ]), 4326)); + +INSERT INTO rt_spatial_relationship_test_geom +VALUES ( 46, 2, st_setsrid(st_makeline(ARRAY[st_makepoint( + -75.5533328537098 + 2.0*0.000805965234044584 + 1.5*0.000211812383858707, + 49.2824585505576 + 2.0*0.000211812383858704 - 1.5*0.00080596523404458 + ), + st_makepoint( + -75.5533328537098 + 2*0.000805965234044584 + 2.5*0.000211812383858707, + 49.2824585505576 + 2*0.000211812383858704 - 2.5*0.00080596523404458 + ) + ]), 4326)); + +----------------------------------------------------------------------- +-- Test 1 - st_intersect(geometry, raster) +----------------------------------------------------------------------- + +SELECT 'test 1.1', rid, geomid, ST_Intersects(geom, rast) AS intersect + FROM rt_spatial_relationship_test, rt_spatial_relationship_test_geom + WHERE forrast = rid ORDER BY rid, geomid; + +SELECT 'test 1.2', rid, geomid, ST_Intersects(geom, rast) AS intersect + FROM rt_spatial_relationship_test, rt_spatial_relationship_test_geom + WHERE forrast = rid AND ST_Intersects(geom, rast, 1) ORDER BY rid, geomid; + +SELECT 'test 1.3', rid, geomid, ST_Intersects(geom, st_setbandnodatavalue(rast, NULL), 1) + FROM rt_spatial_relationship_test, rt_spatial_relationship_test_geom + WHERE forrast = rid ORDER BY rid, geomid; + +SELECT 'test 1.4', rid, geomid, ST_Intersects(geom, st_setbandnodatavalue(rast, NULL)) + FROM rt_spatial_relationship_test, rt_spatial_relationship_test_geom + WHERE forrast = rid AND ST_Intersects(geom, rast, 1) ORDER BY rid, geomid; + +----------------------------------------------------------------------- +-- Test 2 - st_intersection(raster, geometry) +----------------------------------------------------------------------- +SELECT 'test 2.1', rid, geomid, ST_AsText((gv).geom), (gv).val +FROM (SELECT *, ST_Intersection(geom, rast) gv + FROM rt_spatial_relationship_test, rt_spatial_relationship_test_geom + WHERE forrast = rid + ) foo; + +SELECT 'test 2.2', rid, geomid, ST_AsText((gv).geom), (gv).val +FROM (SELECT *, ST_Intersection(geom, rast) gv + FROM rt_spatial_relationship_test, rt_spatial_relationship_test_geom + WHERE forrast = rid AND ST_Intersects(geom, rast, 1) + ) foo; + +SELECT 'test 2.3', rid, geomid, ST_AsText((gv).geom), (gv).val +FROM (SELECT *, ST_Intersection(geom, st_setbandnodatavalue(rast, NULL)) gv + FROM rt_spatial_relationship_test, rt_spatial_relationship_test_geom + WHERE forrast = rid + ) foo; + +SELECT 'test 2.4', rid, geomid, ST_AsText((gv).geom), (gv).val +FROM (SELECT *, ST_Intersection(geom, st_setbandnodatavalue(rast, NULL)) gv + FROM rt_spatial_relationship_test, rt_spatial_relationship_test_geom + WHERE forrast = rid AND ST_Intersects(geom, st_setbandnodatavalue(rast, NULL), 1) + ) foo; + +DROP TABLE rt_spatial_relationship_test; +DROP TABLE rt_spatial_relationship_test_geom; diff -Nru postgis-1.5.3/raster/test/regress/rt_spatial_relationship_expected postgis-2.0.1/raster/test/regress/rt_spatial_relationship_expected --- postgis-1.5.3/raster/test/regress/rt_spatial_relationship_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_spatial_relationship_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,190 @@ +test 1.1|1|1|t +test 1.1|1|2|t +test 1.1|1|3|f +test 1.1|1|4|t +test 1.1|1|5|t +test 1.1|1|6|t +test 1.1|1|7|f +test 1.1|1|11|f +test 1.1|1|12|t +test 1.1|1|13|t +test 1.1|1|14|t +test 1.1|1|15|t +test 1.1|1|16|t +test 1.1|1|17|t +test 1.1|1|18|t +test 1.1|2|31|t +test 1.1|2|32|t +test 1.1|2|33|f +test 1.1|2|34|t +test 1.1|2|35|t +test 1.1|2|36|f +test 1.1|2|41|f +test 1.1|2|42|t +test 1.1|2|43|t +test 1.1|2|44|t +test 1.1|2|45|f +test 1.1|2|46|f +test 1.2|1|1|t +test 1.2|1|2|t +test 1.2|1|5|t +test 1.2|1|6|t +test 1.2|1|12|t +test 1.2|1|13|t +test 1.2|1|15|t +test 1.2|1|17|t +test 1.2|1|18|t +test 1.2|2|31|t +test 1.2|2|32|t +test 1.2|2|42|t +test 1.2|2|43|t +test 1.3|1|1|t +test 1.3|1|2|t +test 1.3|1|3|f +test 1.3|1|4|t +test 1.3|1|5|t +test 1.3|1|6|t +test 1.3|1|7|f +test 1.3|1|11|f +test 1.3|1|12|t +test 1.3|1|13|t +test 1.3|1|14|t +test 1.3|1|15|t +test 1.3|1|16|t +test 1.3|1|17|t +test 1.3|1|18|t +test 1.3|2|31|t +test 1.3|2|32|t +test 1.3|2|33|f +test 1.3|2|34|t +test 1.3|2|35|t +test 1.3|2|36|f +test 1.3|2|41|f +test 1.3|2|42|t +test 1.3|2|43|t +test 1.3|2|44|t +test 1.3|2|45|f +test 1.3|2|46|f +test 1.4|1|1|t +test 1.4|1|2|t +test 1.4|1|5|t +test 1.4|1|6|t +test 1.4|1|12|t +test 1.4|1|13|t +test 1.4|1|15|t +test 1.4|1|17|t +test 1.4|1|18|t +test 1.4|2|31|t +test 1.4|2|32|t +test 1.4|2|42|t +test 1.4|2|43|t +test 2.1|1|1|POINT(782325.5 26744042.5)|1 +test 2.1|1|2|POINT(782326.5 26744042.5)|1 +test 2.1|1|3|GEOMETRYCOLLECTION EMPTY| +test 2.1|1|4|GEOMETRYCOLLECTION EMPTY| +test 2.1|1|5|POINT(782333.5 26744040.5)|1 +test 2.1|1|5|POINT(782333.5 26744040.5)|2 +test 2.1|1|5|POINT(782333.5 26744040.5)|3 +test 2.1|1|6|POINT(782337 26744046)|2 +test 2.1|1|7|GEOMETRYCOLLECTION EMPTY| +test 2.1|1|11|GEOMETRYCOLLECTION EMPTY| +test 2.1|1|12|LINESTRING(782325.875 26744041.875,782328 26744044)|1 +test 2.1|1|13|LINESTRING(782330.236842105 26744034.6052632,782335.605263158 26744036.9912281)|3 +test 2.1|1|14|GEOMETRYCOLLECTION EMPTY| +test 2.1|1|15|LINESTRING(782337 26744046,782335.5 26744048.5)|2 +test 2.1|1|16|GEOMETRYCOLLECTION EMPTY| +test 2.1|1|17|POINT(782338.5 26744043.5)|2 +test 2.1|1|18|LINESTRING(782330.385245902 26744038.6311475,782331.5 26744043.8333333)|1 +test 2.1|1|18|LINESTRING(782331.5 26744043.8333333,782332.057377049 26744046.4344262)|2 +test 2.1|1|18|LINESTRING(782329.710526316 26744035.4824561,782330.385245902 26744038.6311475)|3 +test 2.1|2|31|POINT(-75.5533328537098 49.2824585505576)|1 +test 2.1|2|32|POINT(-75.5532328537098 49.2824585505576)|1 +test 2.1|2|33|GEOMETRYCOLLECTION EMPTY| +test 2.1|2|34|GEOMETRYCOLLECTION EMPTY| +test 2.1|2|35|GEOMETRYCOLLECTION EMPTY| +test 2.1|2|36|GEOMETRYCOLLECTION EMPTY| +test 2.1|2|41|GEOMETRYCOLLECTION EMPTY| +test 2.1|2|42|LINESTRING(-75.5533120424461 49.2823793618213,-75.5531972042327 49.2824942000347)|1 +test 2.1|2|43|LINESTRING(-75.5529884291587 49.2811479840607,-75.5522356128797 49.2815620330142)|3 +test 2.1|2|44|GEOMETRYCOLLECTION EMPTY| +test 2.1|2|45|GEOMETRYCOLLECTION EMPTY| +test 2.1|2|46|GEOMETRYCOLLECTION EMPTY| +test 2.2|1|1|POINT(782325.5 26744042.5)|1 +test 2.2|1|2|POINT(782326.5 26744042.5)|1 +test 2.2|1|5|POINT(782333.5 26744040.5)|1 +test 2.2|1|5|POINT(782333.5 26744040.5)|2 +test 2.2|1|5|POINT(782333.5 26744040.5)|3 +test 2.2|1|6|POINT(782337 26744046)|2 +test 2.2|1|12|LINESTRING(782325.875 26744041.875,782328 26744044)|1 +test 2.2|1|13|LINESTRING(782330.236842105 26744034.6052632,782335.605263158 26744036.9912281)|3 +test 2.2|1|15|LINESTRING(782337 26744046,782335.5 26744048.5)|2 +test 2.2|1|17|POINT(782338.5 26744043.5)|2 +test 2.2|1|18|LINESTRING(782330.385245902 26744038.6311475,782331.5 26744043.8333333)|1 +test 2.2|1|18|LINESTRING(782331.5 26744043.8333333,782332.057377049 26744046.4344262)|2 +test 2.2|1|18|LINESTRING(782329.710526316 26744035.4824561,782330.385245902 26744038.6311475)|3 +test 2.2|2|31|POINT(-75.5533328537098 49.2824585505576)|1 +test 2.2|2|32|POINT(-75.5532328537098 49.2824585505576)|1 +test 2.2|2|42|LINESTRING(-75.5533120424461 49.2823793618213,-75.5531972042327 49.2824942000347)|1 +test 2.2|2|43|LINESTRING(-75.5529884291587 49.2811479840607,-75.5522356128797 49.2815620330142)|3 +test 2.3|1|1|POINT(782325.5 26744042.5)|1 +test 2.3|1|2|POINT(782326.5 26744042.5)|1 +test 2.3|1|3|GEOMETRYCOLLECTION EMPTY| +test 2.3|1|4|POINT(782335.5 26744040.5)|4 +test 2.3|1|5|POINT(782333.5 26744040.5)|1 +test 2.3|1|5|POINT(782333.5 26744040.5)|2 +test 2.3|1|5|POINT(782333.5 26744040.5)|3 +test 2.3|1|5|POINT(782333.5 26744040.5)|4 +test 2.3|1|6|POINT(782337 26744046)|2 +test 2.3|1|7|GEOMETRYCOLLECTION EMPTY| +test 2.3|1|11|GEOMETRYCOLLECTION EMPTY| +test 2.3|1|12|LINESTRING(782325.875 26744041.875,782328 26744044)|1 +test 2.3|1|13|LINESTRING(782330.236842105 26744034.6052632,782335.605263158 26744036.9912281)|3 +test 2.3|1|13|LINESTRING(782335.605263158 26744036.9912281,782340.973684211 26744039.377193)|4 +test 2.3|1|14|LINESTRING(782338.5 26744039.5,782340.435483871 26744040.2741935)|4 +test 2.3|1|15|LINESTRING(782337 26744046,782335.5 26744048.5)|2 +test 2.3|1|16|LINESTRING(782341.5 26744038.5,782340 26744041)|4 +test 2.3|1|17|POINT(782338.5 26744043.5)|2 +test 2.3|1|17|LINESTRING(782340 26744041,782338.5 26744043.5)|4 +test 2.3|1|18|LINESTRING(782330.385245902 26744038.6311475,782331.5 26744043.8333333)|1 +test 2.3|1|18|LINESTRING(782331.5 26744043.8333333,782332.057377049 26744046.4344262)|2 +test 2.3|1|18|LINESTRING(782329.710526316 26744035.4824561,782330.385245902 26744038.6311475)|3 +test 2.3|2|31|POINT(-75.5533328537098 49.2824585505576)|1 +test 2.3|2|32|POINT(-75.5532328537098 49.2824585505576)|1 +test 2.3|2|33|GEOMETRYCOLLECTION EMPTY| +test 2.3|2|34|POINT(-75.5518328537098 49.2814585505576)|4 +test 2.3|2|35|POINT(-75.5523150760919 49.2818643977074)|4 +test 2.3|2|36|GEOMETRYCOLLECTION EMPTY| +test 2.3|2|41|GEOMETRYCOLLECTION EMPTY| +test 2.3|2|42|LINESTRING(-75.5533120424461 49.2823793618213,-75.5531972042327 49.2824942000347)|1 +test 2.3|2|43|LINESTRING(-75.5529884291587 49.2811479840607,-75.5522356128797 49.2815620330142)|3 +test 2.3|2|43|LINESTRING(-75.5522356128797 49.2815620330142,-75.5514827966006 49.2819760819677)|4 +test 2.3|2|44|LINESTRING(-75.5519328537098 49.2819585505576,-75.5514781892433 49.2819585505576)|4 +test 2.3|2|45|GEOMETRYCOLLECTION EMPTY| +test 2.3|2|46|GEOMETRYCOLLECTION EMPTY| +test 2.4|1|1|POINT(782325.5 26744042.5)|1 +test 2.4|1|2|POINT(782326.5 26744042.5)|1 +test 2.4|1|4|POINT(782335.5 26744040.5)|4 +test 2.4|1|5|POINT(782333.5 26744040.5)|1 +test 2.4|1|5|POINT(782333.5 26744040.5)|2 +test 2.4|1|5|POINT(782333.5 26744040.5)|3 +test 2.4|1|5|POINT(782333.5 26744040.5)|4 +test 2.4|1|6|POINT(782337 26744046)|2 +test 2.4|1|12|LINESTRING(782325.875 26744041.875,782328 26744044)|1 +test 2.4|1|13|LINESTRING(782330.236842105 26744034.6052632,782335.605263158 26744036.9912281)|3 +test 2.4|1|13|LINESTRING(782335.605263158 26744036.9912281,782340.973684211 26744039.377193)|4 +test 2.4|1|14|LINESTRING(782338.5 26744039.5,782340.435483871 26744040.2741935)|4 +test 2.4|1|15|LINESTRING(782337 26744046,782335.5 26744048.5)|2 +test 2.4|1|16|LINESTRING(782341.5 26744038.5,782340 26744041)|4 +test 2.4|1|17|POINT(782338.5 26744043.5)|2 +test 2.4|1|17|LINESTRING(782340 26744041,782338.5 26744043.5)|4 +test 2.4|1|18|LINESTRING(782330.385245902 26744038.6311475,782331.5 26744043.8333333)|1 +test 2.4|1|18|LINESTRING(782331.5 26744043.8333333,782332.057377049 26744046.4344262)|2 +test 2.4|1|18|LINESTRING(782329.710526316 26744035.4824561,782330.385245902 26744038.6311475)|3 +test 2.4|2|31|POINT(-75.5533328537098 49.2824585505576)|1 +test 2.4|2|32|POINT(-75.5532328537098 49.2824585505576)|1 +test 2.4|2|34|POINT(-75.5518328537098 49.2814585505576)|4 +test 2.4|2|35|POINT(-75.5523150760919 49.2818643977074)|4 +test 2.4|2|42|LINESTRING(-75.5533120424461 49.2823793618213,-75.5531972042327 49.2824942000347)|1 +test 2.4|2|43|LINESTRING(-75.5529884291587 49.2811479840607,-75.5522356128797 49.2815620330142)|3 +test 2.4|2|43|LINESTRING(-75.5522356128797 49.2815620330142,-75.5514827966006 49.2819760819677)|4 +test 2.4|2|44|LINESTRING(-75.5519328537098 49.2819585505576,-75.5514781892433 49.2819585505576)|4 diff -Nru postgis-1.5.3/raster/test/regress/rt_summarystats.sql postgis-2.0.1/raster/test/regress/rt_summarystats.sql --- postgis-1.5.3/raster/test/regress/rt_summarystats.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_summarystats.sql 2012-06-17 16:58:29.000000000 +0000 @@ -0,0 +1,209 @@ +SELECT + count, + round(sum::numeric, 3), + round(mean::numeric, 3), + round(stddev::numeric, 3), + round(min::numeric, 3), + round(max::numeric, 3) +FROM ST_SummaryStats( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) + , TRUE +); +SELECT count FROM ST_SummaryStats( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) + , TRUE +); +SELECT count FROM ST_SummaryStats( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) + , FALSE +); +SELECT round(mean::numeric, 3), round(stddev::numeric, 3) FROM ST_SummaryStats( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) + , TRUE +); +SELECT round(mean::numeric, 3), round(stddev::numeric, 3) FROM ST_SummaryStats( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) + , FALSE +); +SELECT round(mean::numeric, 3), round(stddev::numeric, 3) FROM ST_SummaryStats( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) + , 2 +); +SELECT ST_ApproxSummaryStats( + ST_Clip( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 0, 0, 1, 1, 0, 0, 0) + , '16BSI'::text, 0, 0 + ) + , ST_MakeEnvelope(0, 0, 10, 5, 0) + ) + , 1, true, 0.1 +); +SELECT ST_SummaryStats( + ST_AddBand( + ST_MakeEmptyRaster(10, 0, 0, 0, 1, -1, 0, 0, 0) + , '8BUI'::text, 1, 0 + ) +); +BEGIN; +CREATE TEMP TABLE test_summarystats + ON COMMIT DROP AS + SELECT + rast.rast + FROM ( + SELECT ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) AS rast + ) AS rast + FULL JOIN ( + SELECT generate_series(1, 10) AS id + ) AS id + ON 1 = 1; +SELECT + count, + round(sum::numeric, 3), + round(mean::numeric, 3), + round(stddev::numeric, 3), + round(min::numeric, 3), + round(max::numeric, 3) +FROM ST_SummaryStats('test_summarystats', 'rast', 1, TRUE); +SELECT + count, + round(sum::numeric, 3), + round(mean::numeric, 3), + round(stddev::numeric, 3), + round(min::numeric, 3), + round(max::numeric, 3) +FROM ST_SummaryStats('test_summarystats', 'rast', 1, FALSE); +SELECT + count, + round(sum::numeric, 3), + round(mean::numeric, 3), + round(stddev::numeric, 3), + round(min::numeric, 3), + round(max::numeric, 3) +FROM ST_SummaryStats('test_summarystats', 'rast', 1); +SELECT + count, + round(sum::numeric, 3), + round(mean::numeric, 3), + round(stddev::numeric, 3), + round(min::numeric, 3), + round(max::numeric, 3) +FROM ST_SummaryStats('test_summarystats', 'rast'); +SAVEPOINT test; +SELECT + count, + round(sum::numeric, 3), + round(mean::numeric, 3), + round(stddev::numeric, 3), + round(min::numeric, 3), + round(max::numeric, 3) +FROM ST_SummaryStats('test_summarystats', 'rast', 2); +ROLLBACK TO SAVEPOINT test; +RELEASE SAVEPOINT test; +SAVEPOINT test; +SELECT + count, + round(sum::numeric, 3), + round(mean::numeric, 3), + round(stddev::numeric, 3), + round(min::numeric, 3), + round(max::numeric, 3) +FROM ST_SummaryStats('test1', 'rast'); +ROLLBACK TO SAVEPOINT test; +RELEASE SAVEPOINT test; +SAVEPOINT test; +SELECT + count, + round(sum::numeric, 3), + round(mean::numeric, 3), + round(stddev::numeric, 3), + round(min::numeric, 3), + round(max::numeric, 3) +FROM ST_SummaryStats('test_summarystats', 'rast1'); +ROLLBACK TO SAVEPOINT test; +RELEASE SAVEPOINT test; +ROLLBACK; diff -Nru postgis-1.5.3/raster/test/regress/rt_summarystats_expected postgis-2.0.1/raster/test/regress/rt_summarystats_expected --- postgis-1.5.3/raster/test/regress/rt_summarystats_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_summarystats_expected 2012-06-18 20:32:40.000000000 +0000 @@ -0,0 +1,29 @@ +2|-6.858|-3.429|6.571|-10.000|3.142 +2 +100 +-3.429|6.571 +-0.069|1.046 +NOTICE: Invalid band index (must use 1-based). Returning NULL +| +(0,,,,,) +NOTICE: Band is empty as width and/or height is 0 +(0,,,,,) +BEGIN +20|-68.584|-3.429|6.571|-10.000|3.142 +1000|-68.584|-0.069|1.046|-10.000|3.142 +20|-68.584|-3.429|6.571|-10.000|3.142 +20|-68.584|-3.429|6.571|-10.000|3.142 +SAVEPOINT +NOTICE: Invalid band index (must use 1-based). Returning NULL +||||| +COMMIT +RELEASE +SAVEPOINT +ERROR: relation "test1" does not exist at character 20 +COMMIT +RELEASE +SAVEPOINT +ERROR: column "rast1" does not exist at character 8 +COMMIT +RELEASE +COMMIT diff -Nru postgis-1.5.3/raster/test/regress/rt_union.sql postgis-2.0.1/raster/test/regress/rt_union.sql --- postgis-1.5.3/raster/test/regress/rt_union.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_union.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,16 @@ +SELECT '#1 ' as run, ST_AsText((gval).geom), (gval).val::text + FROM (SELECT ST_DumpAsPolygons(ST_Union(rast) ) As gval + FROM ( + SELECT i As rid, ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10*i, 10*i, 2, 2, 0, 0, ST_SRID(ST_Point(0,0) )), + '8BUI'::text, 10*i, 0) As rast + FROM generate_series(0,10) As i ) As foo ) As foofoo ORDER BY (gval).val; + +SELECT '#2 ' As run, ST_AsText((gval).geom), (gval).val::text + FROM (SELECT ST_DumpAsPolygons(ST_Union(rast,'MEAN') ) As gval + FROM ( + SELECT i As rid, ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10*i, 10*i, 2, 2, 0, 0, ST_SRID(ST_Point(0,0) )), + '8BUI'::text, 10*i, 0) As rast + FROM generate_series(0,10) As i ) As foo ) As foofoo + ORDER BY (gval).val LIMIT 2; diff -Nru postgis-1.5.3/raster/test/regress/rt_union_expected postgis-2.0.1/raster/test/regress/rt_union_expected --- postgis-1.5.3/raster/test/regress/rt_union_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_union_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,12 @@ +#1 |POLYGON((10 10,10 30,20 30,20 20,28 20,30 20,30 10,10 10))|10 +#1 |POLYGON((20 20,20 40,30 40,30 30,38 30,40 30,40 20,20 20))|20 +#1 |POLYGON((30 30,30 50,40 50,40 40,48 40,50 40,50 30,30 30))|30 +#1 |POLYGON((40 40,40 60,50 60,50 50,58 50,60 50,60 40,40 40))|40 +#1 |POLYGON((50 50,50 70,60 70,60 60,68 60,70 60,70 50,50 50))|50 +#1 |POLYGON((60 60,60 80,70 80,70 70,78 70,80 70,80 60,60 60))|60 +#1 |POLYGON((70 70,70 90,80 90,80 80,88 80,90 80,90 70,70 70))|70 +#1 |POLYGON((80 80,80 100,90 100,90 90,98 90,100 90,100 80,80 80))|80 +#1 |POLYGON((90 90,90 110,100 110,100 100,108 100,110 100,110 90,90 90))|90 +#1 |POLYGON((100 100,100 120,120 120,120 100,100 100))|100 +#2 |POLYGON((10 10,10 30,20 30,20 20,28 20,30 20,30 10,10 10))|10 +#2 |POLYGON((20 20,20 30,30 30,30 20,20 20))|15 diff -Nru postgis-1.5.3/raster/test/regress/rt_upperleft.sql postgis-2.0.1/raster/test/regress/rt_upperleft.sql --- postgis-1.5.3/raster/test/regress/rt_upperleft.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_upperleft.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,24 @@ +----------------------------------------------------------------------- +-- $Id$ +-- +-- Copyright (c) 2009 Mateusz Loskot +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +----------------------------------------------------------------------- + +----------------------------------------------------------------------- +-- st_upperleftx +----------------------------------------------------------------------- + +SELECT id, name, ipx, st_upperleftx(rast) as ipx_expected + FROM rt_properties_test + WHERE st_upperleftx(rast) != ipx; + +----------------------------------------------------------------------- +-- st_upperlefty +----------------------------------------------------------------------- + +SELECT id, name, ipy, st_upperlefty(rast) as ipy_expected + FROM rt_properties_test + WHERE st_upperlefty(rast) != ipy; diff -Nru postgis-1.5.3/raster/test/regress/rt_utility.sql postgis-2.0.1/raster/test/regress/rt_utility.sql --- postgis-1.5.3/raster/test/regress/rt_utility.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_utility.sql 2012-05-16 18:47:46.000000000 +0000 @@ -0,0 +1,259 @@ +----------------------------------------------------------------------- +-- $Id$ +-- +-- Copyright (c) 2010 Pierre Racine +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +----------------------------------------------------------------------- + +\i create_rt_utility_test.sql + +----------------------------------------------------------------------- +-- Test 1 - st_world2rastercoordx(rast raster, xw float8, yw float8) +----------------------------------------------------------------------- + +SELECT 'test 1.1', id, name + FROM rt_utility_test + WHERE st_world2rastercoordx(rast, + ipx, + ipy + ) != 1; + +SELECT 'test 1.2', id, name + FROM rt_utility_test + WHERE st_world2rastercoordx(rast, + scalex * (width - 1) + skewx * (height - 1) + ipx, + skewy * (width - 1) + scaley * (height - 1) + ipy + ) != width; + +SELECT 'test 1.3', id, name + FROM rt_utility_test + WHERE st_world2rastercoordx(rast, + scalex * width + skewx * height + ipx, + skewy * width + scaley * height + ipy + ) != width + 1; + +----------------------------------------------------------------------- +-- Test 2 - st_world2rastercoordx(rast raster, xw float8) +----------------------------------------------------------------------- + +SELECT 'test 2.1', id, name + FROM rt_utility_test + WHERE skewx = 0 and + st_world2rastercoordx(rast, + ipx + ) != 1; + +SELECT 'test 2.2', id, name + FROM rt_utility_test + WHERE skewx = 0 and + st_world2rastercoordx(rast, + scalex * (width - 1) + ipx + ) != width; + +SELECT 'test 2.3', id, name + FROM rt_utility_test + WHERE skewx = 0 and + st_world2rastercoordx(rast, + scalex * width + ipx + ) != width + 1; + +SELECT 'test 2.4', id, name + FROM rt_utility_test + WHERE st_world2rastercoordx(rast, + ipx + ) != 1; + +----------------------------------------------------------------------- +-- Test 3 - st_world2rastercoordx(rast raster, pt geometry) +----------------------------------------------------------------------- + +SELECT 'test 3.1', id, name + FROM rt_utility_test + WHERE st_world2rastercoordx(rast, + st_makepoint( + ipx, + ipy + ) + ) != 1; + +SELECT 'test 3.2', id, name + FROM rt_utility_test + WHERE st_world2rastercoordx(rast, + st_makepoint( + scalex * (width - 1) + skewx * (height - 1) + ipx, + skewy * (width - 1) + scaley * (height - 1) + ipy + ) + ) != width; + +SELECT 'test 3.3', id, name + FROM rt_utility_test + WHERE st_world2rastercoordx(rast, + st_makepoint( + scalex * width + skewx * height + ipx, + skewy * width + scaley * height + ipy + ) + ) != width + 1; + +----------------------------------------------------------------------- +-- Test 4 - st_world2rastercoordy(rast raster, xw float8, yw float8) +----------------------------------------------------------------------- + +SELECT 'test 4.1', id, name + FROM rt_utility_test + WHERE st_world2rastercoordy(rast, + ipx, + ipy + ) != 1; + +SELECT 'test 4.2', id, name + FROM rt_utility_test + WHERE st_world2rastercoordy(rast, + scalex * (width - 1) + skewx * (height - 1) + ipx, + skewy * (width - 1) + scaley * (height - 1) + ipy + ) != height; + +SELECT 'test 4.3', id, name + FROM rt_utility_test + WHERE st_world2rastercoordy(rast, + scalex * width + skewx * height + ipx, + skewy * width + scaley * height + ipy + ) != height + 1; + +----------------------------------------------------------------------- +-- Test 5 - st_world2rastercoordy(rast raster, yw float8) +----------------------------------------------------------------------- + +SELECT 'test 5.1', id, name + FROM rt_utility_test + WHERE skewy = 0 and + st_world2rastercoordy(rast, + ipy + ) != 1; + +SELECT 'test 5.2', id, name + FROM rt_utility_test + WHERE skewy = 0 and + st_world2rastercoordy(rast, + scaley * (height - 1) + ipy + ) != height; + +SELECT 'test 5.3', id, name + FROM rt_utility_test + WHERE skewy = 0 and + st_world2rastercoordy(rast, + scaley * height + ipy + ) != height + 1; + +SELECT 'test 5.4', id, name + FROM rt_utility_test + WHERE st_world2rastercoordy(rast, + ipy + ) != 1; + + +----------------------------------------------------------------------- +-- Test 6 - st_world2rastercoordy(rast raster, pt geometry) +----------------------------------------------------------------------- + +SELECT 'test 6.1', id, name + FROM rt_utility_test + WHERE st_world2rastercoordy(rast, + st_makepoint( + ipx, + ipy + ) + ) != 1; + +SELECT 'test 6.2', id, name + FROM rt_utility_test + WHERE st_world2rastercoordy(rast, + st_makepoint( + scalex * (width - 1) + skewx * (height - 1) + ipx, + skewy * (width - 1) + scaley * (height - 1) + ipy + ) + ) != height; + +SELECT 'test 6.3', id, name + FROM rt_utility_test + WHERE st_world2rastercoordy(rast, + st_makepoint( + scalex * width + skewx * height + ipx, + skewy * width + scaley * height + ipy + ) + ) != height + 1; + +----------------------------------------------------------------------- +-- Test 7 - st_raster2worldcoordx(rast raster, xr int, yr int) +----------------------------------------------------------------------- + +SELECT 'test 7.1', id, name + FROM rt_utility_test + WHERE st_raster2worldcoordx(rast, 1, 1)::numeric != ipx::numeric; + +SELECT 'test 7.2', id, name + FROM rt_utility_test + WHERE st_raster2worldcoordx(rast, width, height)::numeric != (scalex * (width - 1) + skewx * (height - 1) + ipx)::numeric; + +----------------------------------------------------------------------- +-- Test 8 - st_raster2worldcoordx(rast raster, xr int) +----------------------------------------------------------------------- + +SELECT 'test 8.1', id, name + FROM rt_utility_test + WHERE skewx = 0 and st_raster2worldcoordx(rast, 1)::numeric != ipx::numeric; + +SELECT 'test 8.2', id, name + FROM rt_utility_test + WHERE skewx = 0 and st_raster2worldcoordx(rast, width)::numeric != (scalex * (width - 1) + ipx)::numeric; + +SELECT 'test 8.3', id, name + FROM rt_utility_test + WHERE st_raster2worldcoordx(rast, 1)::numeric != ipx::numeric; + +----------------------------------------------------------------------- +-- Test 9 - st_raster2worldcoordy(rast raster, xr int, yr int) +----------------------------------------------------------------------- + +SELECT 'test 9.1', id, name + FROM rt_utility_test + WHERE st_raster2worldcoordy(rast, 1, 1)::numeric != ipy::numeric; + +SELECT 'test 9.2', id, name + FROM rt_utility_test + WHERE round(st_raster2worldcoordy(rast, width, height)::numeric, 10) != round((skewy * (width - 1) + scaley * (height - 1) + ipy)::numeric, 10); + +----------------------------------------------------------------------- +-- Test 10 - st_raster2worldcoordy(rast raster, yr int) +----------------------------------------------------------------------- + +SELECT 'test 10.1', id, name + FROM rt_utility_test + WHERE skewy = 0 and st_raster2worldcoordy(rast, 1, 1)::numeric != ipy::numeric; + +SELECT 'test 10.2', id, name + FROM rt_utility_test + WHERE skewy = 0 and st_raster2worldcoordy(rast, width, height)::numeric != (scaley * (height - 1) + ipy)::numeric; + +SELECT 'test 10.3', id, name + FROM rt_utility_test + WHERE st_raster2worldcoordy(rast, 1)::numeric != ipy::numeric; + +----------------------------------------------------------------------- +-- Test 11 - st_minpossiblevalue(pixtype text) +----------------------------------------------------------------------- + +SELECT 'test 11.1', st_minpossiblevalue('1BB') = 0.; +SELECT 'test 11.2', st_minpossiblevalue('2BUI') = 0.; +SELECT 'test 11.3', st_minpossiblevalue('4BUI') = 0.; +SELECT 'test 11.4', st_minpossiblevalue('8BUI') = 0.; +SELECT 'test 11.5', st_minpossiblevalue('8BSI') < 0.; +SELECT 'test 11.6', st_minpossiblevalue('16BUI') = 0.; +SELECT 'test 11.7', st_minpossiblevalue('16BSI') < 0.; +SELECT 'test 11.8', st_minpossiblevalue('32BUI') = 0.; +SELECT 'test 11.9', st_minpossiblevalue('32BSI') < 0.; +SELECT 'test 11.10', st_minpossiblevalue('32BF') < 0.; +SELECT 'test 11.11', st_minpossiblevalue('64BF') < 0.; + +DROP TABLE rt_utility_test; diff -Nru postgis-1.5.3/raster/test/regress/rt_utility_expected postgis-2.0.1/raster/test/regress/rt_utility_expected --- postgis-1.5.3/raster/test/regress/rt_utility_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_utility_expected 2012-05-16 18:47:46.000000000 +0000 @@ -0,0 +1,15 @@ +ERROR: RASTER_worldToRasterCoord: Latitude and longitude required for computing pixel row and column of a rotated raster +ERROR: RASTER_worldToRasterCoord: Latitude and longitude required for computing pixel row and column of a rotated raster +ERROR: RASTER_rasterToWorldCoord: Pixel row and column required for computing longitude and latitude of a rotated raster +ERROR: RASTER_rasterToWorldCoord: Pixel row and column required for computing longitude and latitude of a rotated raster +test 11.1|t +test 11.2|t +test 11.3|t +test 11.4|t +test 11.5|t +test 11.6|t +test 11.7|t +test 11.8|t +test 11.9|t +test 11.10|t +test 11.11|t diff -Nru postgis-1.5.3/raster/test/regress/rt_valuecount.sql postgis-2.0.1/raster/test/regress/rt_valuecount.sql --- postgis-1.5.3/raster/test/regress/rt_valuecount.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_valuecount.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,275 @@ +SELECT round(value::numeric, 3), count FROM ST_ValueCount( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) +, 1, TRUE, ARRAY[]::double precision[], 0); +SELECT round(value::numeric, 3), count FROM ST_ValueCount( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) +, 1, TRUE, NULL::double precision[], 0); +SELECT round(value::numeric, 3), count FROM ST_ValueCount( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) +, 1, FALSE, NULL::double precision[], 0); +SELECT round(value::numeric, 3), count FROM ST_ValueCount( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) +, 1, TRUE, NULL::double precision[], 0.1); +SELECT round(value::numeric, 3), count FROM ST_ValueCount( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) +, 1, ARRAY[3.1], 0.1); +SELECT round(value::numeric, 3), count FROM ST_ValueCount( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) +, 1, ARRAY[-10]); +SELECT round(value::numeric, 3), count FROM ST_ValueCount( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) +, ARRAY[-10], 0); +SELECT round(value::numeric, 3), count FROM ST_ValueCount( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) +, ARRAY[-10, 3]); +SELECT ST_ValueCount( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) +, 1, TRUE, 3.14, 0.19); +SELECT ST_ValueCount( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) +, 1, FALSE, 3.14, 0.01); +SELECT ST_ValueCount( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) +, 1, -10, 0.1); +SELECT ST_ValueCount( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) +, 1, -10); +SELECT ST_ValueCount( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) +, -10., 10); +SELECT ST_ValueCount( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) +, 3.14159); +SELECT ST_ValueCount( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) +, 2); +BEGIN; +CREATE TEMP TABLE test + ON COMMIT DROP AS + SELECT + rast.rast + FROM ( + SELECT ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) AS rast + ) AS rast + FULL JOIN ( + SELECT generate_series(1, 10) AS id + ) AS id + ON 1 = 1; +SELECT round(value::numeric, 3), count FROM ST_ValueCount('test', 'rast', 1, FALSE, NULL::double precision[], 0); +SELECT round(value::numeric, 3), count FROM ST_ValueCount('test', 'rast', 1, ARRAY[-10]::double precision[], 0); +SELECT round(value::numeric, 3), count FROM ST_ValueCount('test', 'rast', 1, ARRAY[1]::double precision[]); +SELECT round(value::numeric, 3), count FROM ST_ValueCount('test', 'rast', NULL::double precision[], 0.1); +SELECT round(value::numeric, 3), count FROM ST_ValueCount('test', 'rast', ARRAY[-1, 3.1]::double precision[], 0.1); + +SELECT ST_ValueCount('test', 'rast', 1, TRUE, NULL::double precision, 0); +SELECT ST_ValueCount('test', 'rast', 1, 3.14, 1); +SELECT ST_ValueCount('test', 'rast', 1, -1); +SELECT ST_ValueCount('test', 'rast', 3.1, 0.1); +SELECT ST_ValueCount('test', 'rast', -9.); + +SAVEPOINT test; +SELECT ST_ValueCount('test', 'rast', 2); +ROLLBACK TO SAVEPOINT test; +RELEASE SAVEPOINT test; +SAVEPOINT test; +SELECT ST_ValueCount('test1', 'rast', 2); +ROLLBACK TO SAVEPOINT test; +RELEASE SAVEPOINT test; +SAVEPOINT test; +SELECT ST_ValueCount('test', 'rast1', 2); +ROLLBACK TO SAVEPOINT test; +RELEASE SAVEPOINT test; + +ROLLBACK; diff -Nru postgis-1.5.3/raster/test/regress/rt_valuecount_expected postgis-2.0.1/raster/test/regress/rt_valuecount_expected --- postgis-1.5.3/raster/test/regress/rt_valuecount_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_valuecount_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,48 @@ +-10.000|1 +3.142|1 +-10.000|1 +3.142|1 +-10.000|1 +0.000|98 +3.142|1 +-10.000|1 +3.100|1 +3.100|1 +-10.000|1 +-10.000|1 +-10.000|1 +3.000|0 +1 +1 +1 +1 +1 +1 +NOTICE: Invalid band index (must use 1-based). Returning NULL +BEGIN +-10.000|10 +0.000|980 +3.142|10 +-10.000|10 +1.000|0 +-10.000|10 +3.100|10 +-1.000|0 +3.100|10 +10 +0 +10 +0 +SAVEPOINT +NOTICE: Invalid band index (must use 1-based). Returning NULL +COMMIT +RELEASE +SAVEPOINT +ERROR: relation "test1" does not exist at character 20 +COMMIT +RELEASE +SAVEPOINT +ERROR: column "rast1" does not exist at character 8 +COMMIT +RELEASE +COMMIT diff -Nru postgis-1.5.3/raster/test/regress/rt_valuepercent.sql postgis-2.0.1/raster/test/regress/rt_valuepercent.sql --- postgis-1.5.3/raster/test/regress/rt_valuepercent.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_valuepercent.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,246 @@ +SELECT round(value::numeric, 3), round(percent::numeric, 3) FROM ST_ValuePercent( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) +, 1, TRUE, ARRAY[]::double precision[], 0); +SELECT round(value::numeric, 3), round(percent::numeric, 3) FROM ST_ValuePercent( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) +, 1, TRUE, NULL::double precision[], 0); +SELECT round(value::numeric, 3), round(percent::numeric, 3) FROM ST_ValuePercent( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) +, 1, FALSE, NULL::double precision[], 0); +SELECT round(value::numeric, 3), round(percent::numeric, 3) FROM ST_ValuePercent( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) +, 1, TRUE, NULL::double precision[], 0.1); +SELECT round(value::numeric, 3), round(percent::numeric, 3) FROM ST_ValuePercent( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) +, 1, ARRAY[3.1], 0.1); +SELECT round(value::numeric, 3), round(percent::numeric, 3) FROM ST_ValuePercent( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) +, 1, ARRAY[-10]); +SELECT round(value::numeric, 3), round(percent::numeric, 3) FROM ST_ValuePercent( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) +, ARRAY[-10], 0); +SELECT round(value::numeric, 3), round(percent::numeric, 3) FROM ST_ValuePercent( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) +, ARRAY[-10, 3]); +SELECT round(ST_ValuePercent( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) +, 1, TRUE, 3.14, 0.19)::numeric, 3); +SELECT round(ST_ValuePercent( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) +, 1, FALSE, 3.14, 0.01)::numeric, 3); +SELECT round(ST_ValuePercent( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) +, 1, -10, 0.1)::numeric, 3); +SELECT round(ST_ValuePercent( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) +, 1, -10)::numeric, 3); +SELECT round(ST_ValuePercent( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) +, -10., 10)::numeric, 3); +SELECT round(ST_ValuePercent( + ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) +, 3.14159)::numeric, 3); +BEGIN; +CREATE TEMP TABLE test + ON COMMIT DROP AS + SELECT + rast.rast + FROM ( + SELECT ST_SetValue( + ST_SetValue( + ST_SetValue( + ST_AddBand( + ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0) + , 1, '64BF', 0, 0 + ) + , 1, 1, 1, -10 + ) + , 1, 5, 4, 0 + ) + , 1, 5, 5, 3.14159 + ) AS rast + ) AS rast + FULL JOIN ( + SELECT generate_series(1, 10) AS id + ) AS id + ON 1 = 1; +SELECT round(value::numeric, 3), round(percent::numeric, 3) FROM ST_ValuePercent('test', 'rast', 1, FALSE, NULL::double precision[], 0); +SELECT round(value::numeric, 3), round(percent::numeric, 3) FROM ST_ValuePercent('test', 'rast', 1, ARRAY[-10]::double precision[], 0); +SELECT round(value::numeric, 3), round(percent::numeric, 3) FROM ST_ValuePercent('test', 'rast', 1, ARRAY[1]::double precision[]); +SELECT round(value::numeric, 3), round(percent::numeric, 3) FROM ST_ValuePercent('test', 'rast', NULL::double precision[], 0.1); +SELECT round(value::numeric, 3), round(percent::numeric, 3) FROM ST_ValuePercent('test', 'rast', ARRAY[-1, 3.1]::double precision[], 0.1); + +SELECT round(ST_ValuePercent('test', 'rast', 1, TRUE, NULL::double precision, 0)::numeric, 3); +SELECT round(ST_ValuePercent('test', 'rast', 1, 3.14, 1)::numeric, 3); +SELECT round(ST_ValuePercent('test', 'rast', 1, -1)::numeric, 3); +SELECT round(ST_ValuePercent('test', 'rast', 3.1, 0.1)::numeric, 3); +SELECT round(ST_ValuePercent('test', 'rast', -9.)::numeric, 3); +ROLLBACK; diff -Nru postgis-1.5.3/raster/test/regress/rt_valuepercent_expected postgis-2.0.1/raster/test/regress/rt_valuepercent_expected --- postgis-1.5.3/raster/test/regress/rt_valuepercent_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/rt_valuepercent_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,35 @@ +-10.000|0.500 +3.142|0.500 +-10.000|0.500 +3.142|0.500 +-10.000|0.010 +0.000|0.980 +3.142|0.010 +-10.000|0.500 +3.100|0.500 +3.100|0.500 +-10.000|0.500 +-10.000|0.500 +-10.000|0.500 +3.000|0.000 +0.500 +0.010 +0.500 +0.500 +0.500 +0.500 +BEGIN +-10.000|0.010 +0.000|0.980 +3.142|0.010 +-10.000|0.500 +1.000|0.000 +-10.000|0.500 +3.100|0.500 +-1.000|0.000 +3.100|0.500 +0.500 +0.000 +0.500 +0.000 +COMMIT diff -Nru postgis-1.5.3/raster/test/regress/run_test.in postgis-2.0.1/raster/test/regress/run_test.in --- postgis-1.5.3/raster/test/regress/run_test.in 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/run_test.in 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,518 @@ +#!/bin/sh + +POSTGIS_SRC=@POSTGIS_SRC@ +DB=rtpostgis_reg +DBENABLERS="${POSTGIS_SRC}/postgis/postgis.sql ../../rt_pg/rtpostgis.sql" +SHP2PGSQL=../loader/shp2pgsql +PGSQL2SHP=../loader/pgsql2shp + +################################################### +# +# Usage ./run_test [] +# +# Creates the spatial database '$DB' +# Enables the spatial database with raster +# functionality +# +# Runs the .sql script +# Diffs output against _expected +# +################################################### + +PGOPTIONS="${PGOPTIONS} -c lc_messages=C" +export PGOPTIONS + +PSQL="psql" + +if [ -z "$TMPDIR" ]; then + TMPDIR=/tmp/rtpgis_reg_$$ +fi + +mkdir -p ${TMPDIR} + +VERBOSE=0 +OPT_DROP=yes +OPT_CREATE=yes + +if echo '\c' | grep c >/dev/null 2>&1; then + ECHO_N='echo -n' + ECHO_C='' +else + ECHO_N='echo' + ECHO_C='\c' +fi + +################################################### +# +# Helper functions +# +################################################### + +# Print a single dot +show_progress() +{ + ${ECHO_N} ".${ECHO_C}" +} + +# +# fail +# +fail () +{ + _msg="$1" + _log="$2" + + if [ -z "$_log" ]; then + echo " failed ($_msg)" + elif test "$VERBOSE" -eq "1"; then + echo " failed ($_msg: $_log)" + echo "-----------------------------------------------------------------------------" + cat $_log + echo "-----------------------------------------------------------------------------" + else + echo " failed ($_msg: $_log)" + fi + + FAIL=`expr $FAIL + 1` +} + +# +# run_simple_test +# +# Run an sql script and compare results with the given expected output +# +# SQL input is ${TEST}.sql, expected output is {$TEST}_expected +# +run_simple_test () +{ + _sql="$1" + _expected="$2" + if [ -n "$3" ]; then + _msg="$3: " + else + _msg= + fi + + if [ ! -r "$_sql" ]; then + fail "can't read $_sql" + return 1 + fi + + if [ ! -r "$_expected" ]; then + fail "can't read $_expected" + return 1 + fi + + show_progress + + OUTFILE="${TMPDIR}/test_${RUN}_out" + TMPFILE="${TMPDIR}/test_${RUN}_tmp" + DIFFILE="${TMPDIR}/test_${RUN}_diff" + + # Use intermediate file to prevent MingW buffering problems + ${PSQL} -tA < "${_sql}" ${DB} > ${TMPFILE} 2>&1 + cat ${TMPFILE} \ + | grep -v "^$" \ + | grep -v "^SELECT" \ + | grep -v "^INSERT" \ + | grep -v "^DELETE" \ + | grep -v "^CONTEXT" \ + | grep -v "^UPDATE" \ + | grep -v "^DROP" \ + | grep -v "^CREATE" \ + | grep -v "^SET" \ + | sed -e 's/Infinity/inf/g' -e 's/Inf/inf/g' -e 's/1\.#INF/inf/g' \ + -e 's/[eE]\([+-]\)0\{1,\}\([0-9]\{1,\}\)/e\1\2/g' \ + -e 's/Self-intersection .*/Self-intersection/' \ + -e 's/^ROLLBACK/COMMIT/' \ + > "${OUTFILE}" + rm ${TMPFILE} + + if diff -c "${_expected}" "${OUTFILE}" > ${DIFFILE}; then + #SUCCESS=`expr $SUCCESS + 1` + rm "${OUTFILE}" "${DIFFILE}" # we don't need these anymore + return 0 + else + fail "${_msg}diff expected obtained" "${DIFFILE}" + #rm "${OUTFILE}" # diff is enough + return 1 + fi +} + +# +# run_loader_test +# +# Load a shapefile with different methods, create a 'select *' SQL +# test and run simple test with provided expected output. +# +# SHP input is ${TEST}.shp, expected output is {$TEST}_expected +# +run_loader_test () +{ + _tblname=loadedshp + + # ON_ERROR_STOP is used by psql to return non-0 on an error + _psql_opts="--variable ON_ERROR_STOP=true" + + #echo "SELECT * from ${_tblname}" > ${TEST}.sql + + + # + # Run in HEXWKB insert mode + # + + show_progress + + ${SHP2PGSQL} ${TEST}.shp $_tblname \ + > ${TMPDIR}/loader \ + 2> ${TMPDIR}/loader.err + + if [ $? -gt 0 ]; then + fail "running shp2pgsql" "${TMPDIR}/loader.err" + return 1 + + fi + + show_progress + + ${PSQL} -c "DROP table ${_tblname}" "${DB}" >> ${TMPDIR}/regress_log 2>&1 + ${PSQL} ${_psql_opts} -f ${TMPDIR}/loader "${DB}" > ${TMPDIR}/loader.err 2>&1 + if [ $? -gt 0 ]; then + fail "sourcing shp2pgsql output" "${TMPDIR}/loader.err" + return 1 + fi + + if [ -f "${TEST}-wkb.sql" ]; then + if run_simple_test ${TEST}-wkb.sql ${TEST}-wkb.expected "wkb insert"; then + : + else + return 1 + fi + fi + + + # + # Run in HEXWKB dump mode + # + + show_progress + + ${SHP2PGSQL} -D ${TEST}.shp $_tblname \ + > ${TMPDIR}/loader \ + 2> ${TMPDIR}/loader.err + + if [ $? -gt 0 ]; then + fail "running shp2pgsql -D" "${TMPDIR}/loader.err" + return 1 + + fi + + show_progress + + ${PSQL} -c "DROP table ${_tblname}" "${DB}" >> ${TMPDIR}/regress_log 2>&1 + ${PSQL} ${_psql_opts} -f ${TMPDIR}/loader "${DB}" > ${TMPDIR}/loader.err 2>&1 + if [ $? -gt 0 ]; then + fail "sourcing shp2pgsql -D output" "${TMPDIR}/loader.err" + return 1 + fi + + if [ -f "${TEST}-wkb.sql" ]; then + if run_simple_test ${TEST}-wkb.sql ${TEST}-wkb.expected "wkb dump"; then + : + else + return 1 + fi + fi + + ########################################################### + # + # Dump and compare. + # Do this using WKB mode, as WKT is unable to reproduce + # M values + # + + show_progress + + ${PGSQL2SHP} -f ${TMPDIR}/dumper ${DB} "${_tblname}" > "${TMPDIR}/dumper.err" 2>&1 + if [ $? -gt 0 ]; then + fail "dumping loaded table" "${TMPDIR}/dumper.err" + return 1 + fi + + show_progress + + if diff "${TMPDIR}"/dumper.shp "${TEST}".shp > /dev/null; then + : + else + ls -lL "${TMPDIR}"/dumper.shp "${TEST}".shp > "${TMPDIR}"/dumper.diff + fail "dumping loaded table" "${TMPDIR}/dumper.diff" + return 1 + fi + +# I'm not sure it's safe to compare indexes +# if diff "${TMPDIR}"/dumper.shx "${TEST}".shx; then +# : +# else +# ls -lL "${TMPDIR}"/dumper.shx "${TEST}".shx > "${TMPDIR}"/dumper.diff +# fail "dumping loaded table" "${TMPDIR}/dumper.diff" +# return 1 +# fi + +# Change in attribute sizes would make this fail +# if diff "${TMPDIR}"/dumper.dbf "${TEST}".dbf; then +# : +# else +# ls -lL "${TMPDIR}"/dumper.dbf "${TEST}".dbf > "${TMPDIR}"/dumper.diff +# fail "dumping loaded table" "${TMPDIR}/dumper.diff" +# return 1 +# fi + + + # + # End of dump and compare. + # + ################################################ + + show_progress + + ${SHP2PGSQL} -w ${TEST}.shp $_tblname \ + > ${TMPDIR}/loader \ + 2> ${TMPDIR}/loader.err + + if [ $? -gt 0 ]; then + fail "running shp2pgsql -w" "${TMPDIR}/loader.err" + return 1 + fi + + show_progress + + ${PSQL} -c "DROP table ${_tblname}" "${DB}" >> ${TMPDIR}/regress_log 2>&1 + ${PSQL} ${_psql_opts} -f ${TMPDIR}/loader "${DB}" > ${TMPDIR}/loader.err 2>&1 + if [ $? -gt 0 ]; then + fail "sourcing shp2pgsql -w output" "${TMPDIR}/loader.err" + return 1 + fi + + if [ -f "${TEST}-wkt.sql" ]; then + if run_simple_test ${TEST}-wkt.sql ${TEST}-wkt.expected "wkt insert"; then + : + else + return 1 + fi + fi + + # + # Run in WKT dump mode + # + + show_progress + + ${SHP2PGSQL} -D -w ${TEST}.shp $_tblname \ + > ${TMPDIR}/loader \ + 2> ${TMPDIR}/loader.err + + if [ $? -gt 0 ]; then + fail "running shp2pgsql -D -w" "${TMPDIR}/loader.err" + return 1 + + fi + + show_progress + + ${PSQL} -c "DROP table ${_tblname}" "${DB}" >> ${TMPDIR}/regress_log 2>&1 + ${PSQL} ${_psql_opts} -f ${TMPDIR}/loader "${DB}" > ${TMPDIR}/loader.err 2>&1 + if [ $? -gt 0 ]; then + fail "sourcing shp2pgsql -D -w output" "${TMPDIR}/loader.err" + return 1 + fi + + if [ -f "${TEST}-wkt.sql" ]; then + if run_simple_test ${TEST}-wkt.sql ${TEST}-wkt.expected "wkt dump"; then + : + else + return 1 + fi + fi + + #rm ${TEST}.sql + + return 0; +} + +################################################### +# +# Parse command line opts +# +################################################### + +while [ -n "$1" ]; do + + if test "$1" = "-v"; then + VERBOSE=1 + shift + continue + elif test "$1" = "--nodrop"; then + OPT_DROP=no + shift + continue + elif test "$1" = "--nocreate"; then + OPT_CREATE=no + shift + continue + else + break + fi +done + +if [ -z "$1" ]; then + echo "Usage: $0 [-v] [--nocreate] [--nodrop] []" >&2 + exit 1 +fi + +################################################### +# +# Prepare the database +# +################################################### + +db_exists=`${PSQL} -l | grep -w ${DB}` + +if test -z "$db_exists"; then + + if test x"$OPT_CREATE" = "xyes"; then + echo "Creating spatial db ${DB} " + + createdb "${DB}" > ${TMPDIR}/regress_log + createlang plpgsql "${DB}" >> ${TMPDIR}/regress_log + for f in $DBENABLERS; do + ${PSQL} -f $f "${DB}" >> ${TMPDIR}/regress_log 2>&1 + done + else + + echo "Database ${DB} does not exist" >&2 + echo "Run w/out the --nocreate flag to create it" >&2 + exit 1 + fi +else + if test x"$OPT_CREATE" = "xyes"; then + echo "Database ${DB} already exist." >&2 + echo "Run with the --nocreate flag to use it " \ + "or drop it and try again." >&2 + exit 1 + else + echo "Using existing database ${DB}" + fi +fi + + +libver=`${PSQL} -tAc "select postgis_lib_version()" "${DB}"` +if [ -z "$libver" ]; then + echo + echo " Something went wrong (no postgis installed in ${DB})." + if [ -z "$db_exists" ]; then + echo " For details, check ${TMPDIR}/regress_log" + else + echo " Try dropping the database, it will be recreated" \ + " on next run." + fi + echo + exit 1 +fi + +rtlibver=`${PSQL} -tAc "select postgis_raster_lib_version()" "${DB}"` +if [ -z "$rtlibver" ]; then + echo + echo " Something went wrong (no raster installed in ${DB})." + if [ -z "$db_exists" ]; then + echo " For details, check ${TMPDIR}/regress_log" + else + echo " Try dropping the database, it will be recreated" \ + " on next run." + fi + echo + exit 1 +fi + +################################################### +# +# Report runtime environment +# +################################################### + +geosver=`${PSQL} -tAc "select postgis_geos_version()" "${DB}"` +projver=`${PSQL} -tAc "select postgis_proj_version()" "${DB}"` +libbuilddate=`${PSQL} -tAc "select postgis_lib_build_date()" "${DB}"` +pgsqlver=`${PSQL} -tAc "select version()" "${DB}"` +rtlibbuilddate=`${PSQL} -tAc "select postgis_raster_lib_build_date()" "${DB}"` + +echo "TMPDIR is ${TMPDIR}" + +echo +echo " $pgsqlver" +echo " Postgis $libver - $libbuilddate" +if [ -n "$geosver" ]; then + echo " GEOS: $geosver" +fi +if [ -n "$projver" ]; then + echo " PROJ: $projver" +fi +echo " WKTRaster $rtlibver - $rtlibbuilddate" + +################################################### +# +# Run the tests +# +################################################### + +echo +echo "Running tests" +echo + +RUN=0 +SKIP=0 +FAIL=0 +#SUCCESS=0 +while [ -n "$1" ]; do + TEST="$1"; shift; + + # catch a common mistake (strip trailing .sql) + TEST=`echo "$TEST" | sed 's/\.sql$//'` + + #printf %20s " ${TEST}" + #echo -ne " ${TEST}" + ${ECHO_N} " ${TEST}${ECHO_C}" + + RUN=`expr $RUN + 1` + + # Check .shp *before* .sql as loader test would + # create the .sql + if [ -r "${TEST}.shp" ]; then + if run_loader_test; then + echo " ok" + fi + elif [ -r "${TEST}.sql" ]; then + if run_simple_test ${TEST}.sql ${TEST}_expected; then + echo " ok" + fi + else + echo "Skipped (can't read ${TEST}.sql)" + SKIP=`expr $SKIP + 1` + continue + fi + + +done + +echo +echo "Run tests: $RUN" +#echo "Skipped: $SKIP" +#echo "Successful: $SUCCESS" +echo "Failed: $FAIL" + +if test x"$OPT_DROP" = "xyes" -a x"$OPT_CREATE" = "xyes"; then + sleep 1 + dropdb "${DB}" > /dev/null +else + : echo "Drop database ${DB} manually" +fi + diff -Nru postgis-1.5.3/raster/test/regress/testgdalraster postgis-2.0.1/raster/test/regress/testgdalraster --- postgis-1.5.3/raster/test/regress/testgdalraster 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/testgdalraster 2012-03-07 20:38:53.000000000 +0000 @@ -0,0 +1,164 @@ +#!/bin/bash + +POSTGIS_SRC=../../.. +RTGDAL=${POSTGIS_SRC}/raster/scripts/python/rtgdalraster.py +DB=postgis_reg +DBENABLERS="${POSTGIS_SRC}/postgis/postgis.sql ../../rt_pg/rtpostgis.sql" + +PSQL=`which psql` +GDALINFO=`which gdalinfo` + +OPT_DROP=yes +OPT_CREATE=yes + +# create temp +if [ -z "$TMPDIR" ]; then + TMPDIR=/tmp/pgis_reg_$$ +fi + +mkdir -p ${TMPDIR} +echo "TMPDIR is ${TMPDIR}" +echo + +TESTFILE=${POSTGIS_SRC}/raster/test/regress/testgdalraster.test +EXPECTEDFILE=${POSTGIS_SRC}/raster/test/regress/testgdalraster_expected +CHECKSUMFILE=${TMPDIR}/checksum_log +DIFFFILE=${TMPDIR}/checksum_diff + +# testfile doesn't exist +if [ ! -f $TESTFILE ]; then + exit 1 +fi + +while [ -n "$1" ]; do + if test "$1" = "--nodrop"; then + OPT_DROP=no + shift + continue + elif test "$1" = "--nocreate"; then + OPT_CREATE=no + shift + continue + else + break + fi +done + +# create database +db_exists=`${PSQL} -l | grep -w ${DB}` +if test -z "$db_exists"; then + if test x"$OPT_CREATE" = "xyes"; then + echo "Creating spatial db ${DB} " + + createdb "${DB}" > ${TMPDIR}/regress_log + createlang plpgsql "${DB}" >> ${TMPDIR}/regress_log + for f in $DBENABLERS; do + ${PSQL} -f $f "${DB}" >> ${TMPDIR}/regress_log 2>&1 + done + else + + echo "Database ${DB} does not exist" >&2 + echo "Run w/out the --nocreate flag to create it" >&2 + exit 1 + fi +else + if test x"$OPT_CREATE" = "xyes"; then + echo "Database ${DB} already exist." >&2 + echo "Run with the --nocreate flag to use it " \ + "or drop it and try again." >&2 + exit 1 + else + echo "Using existing database ${DB}" + fi +fi + +libver=`${PSQL} -tAc "select postgis_lib_version()" "${DB}"` +if [ -z "$libver" ]; then + echo + echo " Something went wrong (no postgis installed in ${DB})." + if [ -z "$db_exists" ]; then + echo " For details, check ${TMPDIR}/regress_log" + else + echo " Try dropping the database, it will be recreated" \ + " on next run." + fi + echo + exit 1 +fi + +rtlibver=`${PSQL} -tAc "select postgis_raster_lib_version()" "${DB}"` +if [ -z "$rtlibver" ]; then + echo + echo " Something went wrong (no raster installed in ${DB})." + if [ -z "$db_exists" ]; then + echo " For details, check ${TMPDIR}/regress_log" + else + echo " Try dropping the database, it will be recreated" \ + " on next run." + fi + echo + exit 1 +fi + +LC=`wc -l $TESTFILE | awk '{print $1}'` +for x in `seq $LC`; do + ln=`head -n $x $TESTFILE | tail -n 1` + + FORMAT=GTiff + OPTS= + RASTER= + + while IFS=';' read -ra ELE; do + j=0 + for i in "${ELE[@]}"; do + if [ ${#i} -ne 0 ]; then + case "$j" in + "0") + FORMAT="$i" + ;; + "1") + OPTS="$i" + ;; + "2") + RASTER="$i" + ;; + esac + fi + + let j=j+1 + done + done <<< "$ln" + + if [ ${#RASTER} -eq 0 ]; then + continue + fi + if [ ${#FORMAT} -ne 0 ]; then + FORMAT="-f ${FORMAT}" + fi + if [ ${#OPTS} -ne 0 ]; then + OPTS="-c ${OPTS}" + fi + + #echo "format: "$FORMAT + #echo "opts: "$OPTS + #echo "raster: "$RASTER + + $RTGDAL -d "dbname=${DB}" -r "${RASTER}" ${FORMAT} ${OPTS} -o ${TMPDIR}/q${x} >> ${TMPDIR}/rtgdalraster_log + + $GDALINFO -checksum ${TMPDIR}/q${x} | grep Checksum | cut -c 3- >> ${CHECKSUMFILE} +done + +if test x"$OPT_DROP" = "xyes" -a x"$OPT_CREATE" = "xyes"; then + sleep 1 + dropdb "${DB}" > /dev/null +fi + +echo +if diff -c "${EXPECTEDFILE}" "${CHECKSUMFILE}" > ${DIFFFILE}; then + echo "Test passed." +else + cat ${DIFFFILE} + + echo + echo "Test failed." +fi diff -Nru postgis-1.5.3/raster/test/regress/testgdalraster.test postgis-2.0.1/raster/test/regress/testgdalraster.test --- postgis-1.5.3/raster/test/regress/testgdalraster.test 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/testgdalraster.test 2011-05-24 14:27:08.000000000 +0000 @@ -0,0 +1,15 @@ +;;ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0, -1), 1, '64BF', 123.4567, NULL) +GTiff;;ST_AddBand( ST_AddBand( ST_AddBand( ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,-1) , 1, '64BF', 1234.5678, NULL) , '64BF', 987.654321, NULL) , '64BF', 9876.54321, NULL) +GTiff;;ST_AddBand( ST_AddBand( ST_AddBand( ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0, -1) , 1, '64BF', 1234.5678, -9999) , '64BF', 987.654321, -9999) , '64BF', 9876.54321, -9999) +PNG;;ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0, -1), 1, '8BSI', 123, NULL) +PNG;;ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0, -1), 1, '8BUI', 123, NULL) +PNG;;ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0, -1), 1, '8BSI', -123, NULL) +PNG;;ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0, -1), 1, '8BUI', 254, NULL) +PNG;ZLEVEL=1;ST_AddBand( ST_AddBand( ST_AddBand( ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0, -1) , 1, '8BSI', 1, -1) , 2, '8BSI', 11, -1) , 3, '8BSI', 111, -1) +PNG;ZLEVEL=9;ST_AddBand( ST_AddBand( ST_AddBand( ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0, -1) , 1, '8BSI', 1, -1) , 2, '8BSI', 11, -1) , 3, '8BSI', 111, -1) +JPEG;;ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0, -1), 1, '8BSI', 123, NULL) +JPEG;;ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0, -1), 1, '8BUI', 123, NULL) +JPEG;;ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0, -1), 1, '8BSI', -123, NULL) +JPEG;;ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0, -1), 1, '8BUI', 254, NULL) +JPEG;;ST_AddBand( ST_AddBand( ST_AddBand( ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0, -1) , 1, '8BSI', 1, -1) , 2, '8BSI', 11, -1) , 3, '8BSI', 111, -1) +JPEG;QUALITY=90,PROGRESSIVE=ON;ST_AddBand( ST_AddBand( ST_AddBand( ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0, -1) , 1, '8BSI', 1, -1) , 2, '8BSI', 11, -1) , 3, '8BSI', 111, -1) diff -Nru postgis-1.5.3/raster/test/regress/testgdalraster_expected postgis-2.0.1/raster/test/regress/testgdalraster_expected --- postgis-1.5.3/raster/test/regress/testgdalraster_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/testgdalraster_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,27 @@ +Checksum=39484 +Checksum=64937 +Checksum=32120 +Checksum=13684 +Checksum=64937 +Checksum=32120 +Checksum=13684 +Checksum=39484 +Checksum=39484 +Checksum=28666 +Checksum=53950 +Checksum=40000 +Checksum=46854 +Checksum=35679 +Checksum=40000 +Checksum=46854 +Checksum=35679 +Checksum=39484 +Checksum=39484 +Checksum=28666 +Checksum=53950 +Checksum=40000 +Checksum=46861 +Checksum=35679 +Checksum=40000 +Checksum=46861 +Checksum=35679 diff -Nru postgis-1.5.3/raster/test/regress/tickets.sql postgis-2.0.1/raster/test/regress/tickets.sql --- postgis-1.5.3/raster/test/regress/tickets.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/tickets.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,3 @@ +-- #1485 +SELECT '#1485', count(*) FROM geometry_columns +WHERE f_table_name = 'raster_columns'; diff -Nru postgis-1.5.3/raster/test/regress/tickets_expected postgis-2.0.1/raster/test/regress/tickets_expected --- postgis-1.5.3/raster/test/regress/tickets_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/raster/test/regress/tickets_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1 @@ +#1485|0 diff -Nru postgis-1.5.3/regress/Makefile postgis-2.0.1/regress/Makefile --- postgis-1.5.3/regress/Makefile 2011-06-25 16:29:50.000000000 +0000 +++ postgis-2.0.1/regress/Makefile 1970-01-01 00:00:00.000000000 +0000 @@ -1,99 +0,0 @@ -TMPDIR?=/tmp - -POSTGIS_PGSQL_VERSION=912 -POSTGIS_GEOS_VERSION=32 -POSTGIS_PROJ_VERSION=47 -HAVE_LIBXML2=@HAVE_LIBXML2@ - -# MingW hack: rather than use PGSQL_BINDIR directly, we change -# to the directory and then use "pwd" to return the path. This -# ensures that the returned path is in MSYS format, otherwise -# colons in drive letters will break PATH. -PGSQL_BINDIR=$(shell pushd "/usr/local/pgsql/9.1/bin" > /dev/null && pwd && popd > /dev/null) - -# Where we put our regression installation -srcdir=$(shell pwd) -REGRESS_INSTALLDIR=$(srcdir)/00-regress-install - -# -# Put path from pg_config into front of search path -# -PATH := $(PGSQL_BINDIR):$(PATH) -export PATH - - -TESTS = \ - loader/Point \ - loader/PointM \ - loader/PointZ \ - loader/MultiPoint \ - loader/MultiPointM \ - loader/MultiPointZ \ - loader/Arc \ - loader/ArcM \ - loader/ArcZ \ - loader/Polygon \ - loader/PolygonM \ - loader/PolygonZ \ - regress \ - regress_index \ - regress_index_nulls \ - lwgeom_regress \ - regress_lrs \ - removepoint \ - setpoint \ - simplify \ - snaptogrid \ - affine \ - wkt \ - measures \ - long_xact \ - ctors \ - sql-mm-serialize \ - sql-mm-circularstring \ - sql-mm-compoundcurve \ - sql-mm-curvepoly \ - sql-mm-general \ - sql-mm-multicurve \ - sql-mm-multisurface \ - geojson \ - gml \ - svg \ - kml \ - in_gml \ - in_kml \ - regress_ogc \ - regress_ogc_cover \ - regress_ogc_prep \ - regress_bdpoly \ - regress_proj \ - dumppoints \ - wmsservers \ - tickets - -# Styled buffer only if GEOS >= 3.2 -ifeq ($(shell expr $(POSTGIS_GEOS_VERSION) ">=" 32),1) - TESTS += regress_buffer_params -endif - -# Hausdorff only if GEOS >= 3.2 -ifeq ($(shell expr $(POSTGIS_GEOS_VERSION) ">=" 32),1) - TESTS += hausdorff -endif - - -all: test - -test check: - $(MAKE) -C ../postgis REGRESS=1 DESTDIR=$(REGRESS_INSTALLDIR) install - $(MAKE) -C ../loader REGRESS=1 DESTDIR=$(REGRESS_INSTALLDIR) install - sed 's,$$libdir,$(REGRESS_INSTALLDIR)/lib,g' ../postgis/postgis.sql > postgis.sql - @USE_VERSION=$(POSTGIS_PGSQL_VERSION) ./run_test $(TESTS) - -cleanup: - @sleep 1 - @dropdb postgis_reg > /dev/null - -clean: - rm -rf $(REGRESS_INSTALLDIR) - rm -f postgis.sql diff -Nru postgis-1.5.3/regress/Makefile.in postgis-2.0.1/regress/Makefile.in --- postgis-1.5.3/regress/Makefile.in 2010-01-21 07:19:31.000000000 +0000 +++ postgis-2.0.1/regress/Makefile.in 2012-03-21 21:36:59.000000000 +0000 @@ -1,18 +1,38 @@ +# ********************************************************************** +# * +# * PostGIS - Spatial Types for PostgreSQL +# * http://postgis.refractions.net +# * +# * Copyright (C) 2011-2012 Sandro Santilli +# * Copyright (C) 2009-2011 Paul Ramsey +# * Copyright (C) 2008-2009 Mark Cave-Ayland +# * +# * This is free software; you can redistribute and/or modify it under +# * the terms of the GNU General Public Licence. See the COPYING file. +# * +# ********************************************************************** + +PERL=@PERL@ TMPDIR?=/tmp POSTGIS_PGSQL_VERSION=@POSTGIS_PGSQL_VERSION@ POSTGIS_GEOS_VERSION=@POSTGIS_GEOS_VERSION@ POSTGIS_PROJ_VERSION=@POSTGIS_PROJ_VERSION@ -HAVE_LIBXML2=@HAVE_LIBXML2@ +HAVE_JSON=@HAVE_JSON@ +MINGWBUILD=@MINGWBUILD@ # MingW hack: rather than use PGSQL_BINDIR directly, we change # to the directory and then use "pwd" to return the path. This # ensures that the returned path is in MSYS format, otherwise # colons in drive letters will break PATH. -PGSQL_BINDIR=$(shell pushd "@PGSQL_BINDIR@" > /dev/null && pwd && popd > /dev/null) +PGSQL_BINDIR=$(shell cd "@PGSQL_BINDIR@" && pwd) # Where we put our regression installation -srcdir=$(shell @PWDREGRESS@) +ifeq ($(MINGWBUILD),1) + srcdir=$(shell bash -c "pwd -W") +else + srcdir=$(shell pwd) +endif REGRESS_INSTALLDIR=$(srcdir)/00-regress-install # @@ -35,6 +55,17 @@ loader/Polygon \ loader/PolygonM \ loader/PolygonZ \ + loader/TSTPolygon \ + loader/TSIPolygon \ + loader/TSTIPolygon \ + loader/PointWithSchema \ + loader/NoTransPoint \ + loader/NotReallyMultiPoint \ + loader/MultiToSinglePoint \ + loader/ReprojectPts \ + loader/ReprojectPtsGeog \ + loader/Latin1 \ + binary \ regress \ regress_index \ regress_index_nulls \ @@ -44,9 +75,11 @@ setpoint \ simplify \ snaptogrid \ + summary \ affine \ - wkt \ + empty \ measures \ + legacy \ long_xact \ ctors \ sql-mm-serialize \ @@ -56,39 +89,100 @@ sql-mm-general \ sql-mm-multicurve \ sql-mm-multisurface \ - geojson \ - gml \ - svg \ - kml \ + polyhedralsurface \ + polygonize \ + postgis_type_name \ + out_geometry \ + out_geography \ in_gml \ in_kml \ + iscollection \ regress_ogc \ regress_ogc_cover \ regress_ogc_prep \ regress_bdpoly \ regress_proj \ + regress_management \ + dump \ dumppoints \ wmsservers \ - tickets + wkt \ + wkb \ + tickets \ + typmod \ + remove_repeated_points \ + split \ + relate \ + bestsrid \ + concave_hull -# Styled buffer only if GEOS >= 3.2 ifeq ($(shell expr $(POSTGIS_GEOS_VERSION) ">=" 32),1) - TESTS += regress_buffer_params + # GEOS-3.3 adds: + # ST_HausdorffDistance, ST_Buffer(params) + TESTS += \ + hausdorff \ + regress_buffer_params endif -# Hausdorff only if GEOS >= 3.2 -ifeq ($(shell expr $(POSTGIS_GEOS_VERSION) ">=" 32),1) - TESTS += hausdorff +ifeq ($(shell expr $(POSTGIS_GEOS_VERSION) ">=" 33),1) + # GEOS-3.3 adds: + # ST_RelateMatch, ST_IsValidDetail, ST_SharedPaths , + # ST_Snap, ST_UnaryUnion, ST_MakeClean + TESTS += \ + offsetcurve \ + relatematch \ + isvaliddetail \ + sharedpaths \ + snap \ + node \ + unaryunion \ + clean \ + relate_bnr +endif + +ifeq ($(HAVE_JSON),yes) + # JSON-C adds: + # ST_GeomFromGeoJSON() + TESTS += \ + in_geojson endif +all install uninstall: + +distclean: clean + rm Makefile -all: test +staged-install-topology: + @if test x"@TOPOLOGY@" != "x"; then \ + $(MAKE) -C ../topology REGRESS=1 DESTDIR=$(REGRESS_INSTALLDIR) install; \ + fi + +staged-install-raster: + @if test x"@RASTER@" != "x"; then \ + $(MAKE) -C ../raster/rt_pg REGRESS=1 DESTDIR=$(REGRESS_INSTALLDIR) install; \ + fi -test check: +staged-install: staged-install-raster staged-install-topology $(MAKE) -C ../postgis REGRESS=1 DESTDIR=$(REGRESS_INSTALLDIR) install - $(MAKE) -C ../loader REGRESS=1 DESTDIR=$(REGRESS_INSTALLDIR) install - sed 's,$$libdir,$(REGRESS_INSTALLDIR)/lib,g' ../postgis/postgis.sql > postgis.sql - @USE_VERSION=$(POSTGIS_PGSQL_VERSION) ./run_test $(TESTS) + $(MAKE) -C ../ REGRESS=1 DESTDIR=$(REGRESS_INSTALLDIR) comments-install + $(PERL) -pi.bak -e 's,\$$libdir,$(REGRESS_INSTALLDIR)/lib,g' $(REGRESS_INSTALLDIR)/share/contrib/postgis/*.sql + #$(MAKE) -C ../loader REGRESS=1 DESTDIR=$(REGRESS_INSTALLDIR) install + +test check: staged-install + ./run_test $(RUNTESTFLAGS) $(TESTS) && \ + ./run_test --upgrade $(RUNTESTFLAGS) $(TESTS) + +garden: + createdb postgis_garden + createlang plpgsql postgis_garden + psql -d postgis_garden < ../postgis/postgis.sql + psql -d postgis_garden < ../spatial_ref_sys.sql + @echo '-------------------------------------------------' + @echo 'Regression tests in progress (it will take time)' + @echo 'Result output: ./regress/garden_result.txt' + @echo '-------------------------------------------------' + psql -d postgis_garden < ../doc/postgis_gardentest_${POSTGIS_MAJOR_VERSION}${POSTGIS_MINOR_VERSION}.sql > postgis_garden_result.txt 2>&1 + #dropdb postgis_garden cleanup: @sleep 1 @@ -96,4 +190,3 @@ clean: rm -rf $(REGRESS_INSTALLDIR) - rm -f postgis.sql diff -Nru postgis-1.5.3/regress/README postgis-2.0.1/regress/README --- postgis-1.5.3/regress/README 2008-10-10 04:39:54.000000000 +0000 +++ postgis-2.0.1/regress/README 2012-02-27 22:08:12.000000000 +0000 @@ -15,6 +15,15 @@ 3. Edit regress/Makefile adding to the TESTS variable. Any _expected.in files need to be added to the PREPROC variable. +Optional: + If your test has unusual setup or teardown requirements, you may create + any of the following optional files (they will run in this order): + /regress/-pre.sh + /regress/-pre.sql (run via psql) + (The test itself is run here.) + /regress/-post.sql (run via psql) + /regress/-post.sh + Notes about changes in regression tests introduces with PostGIS 1.1.0 --------------------------------------------------------------------- diff -Nru postgis-1.5.3/regress/affine.sql postgis-2.0.1/regress/affine.sql --- postgis-1.5.3/regress/affine.sql 2007-06-04 23:06:28.000000000 +0000 +++ postgis-2.0.1/regress/affine.sql 2012-02-27 22:08:12.000000000 +0000 @@ -1,102 +1,57 @@ -- Tests for affine transformations - --- translate -select 'translate', asewkt(translate('POINT(0 0)'::geometry, 5, 12)); -select 'translate', asewkt(translate('POINT(0 0 0)'::geometry, -3, -7, 3)); - --- scale -select 'scale', asewkt(scale('POINT(1 1)'::geometry, 5, 5)); -select 'scale', asewkt(scale('POINT(1 1)'::geometry, 3, 2)); -select 'scale', asewkt(scale('POINT(10 20 -5)'::geometry, 4, 2, -8)); - --- rotateZ -select 'rotateZ', asewkt(SnapToGrid(rotateZ('POINT(1 1)'::geometry, pi()), 0.1)); -select 'rotateZ', asewkt(SnapToGrid(rotateZ('POINT(1 1)'::geometry, pi()/2), 0.1)); -select 'rotateZ', asewkt(SnapToGrid(rotateZ('POINT(1 1)'::geometry, pi()+pi()/2), 0.1)); -select 'rotateZ', asewkt(SnapToGrid(rotateZ('POINT(1 1)'::geometry, 2*pi()), 0.1)); - --- rotateY -select 'rotateY', asewkt(SnapToGrid(rotateY('POINT(1 1 1)'::geometry, pi()), 0.1)); -select 'rotateY', asewkt(SnapToGrid(rotateY('POINT(1 1 1)'::geometry, pi()/2), 0.1)); -select 'rotateY', asewkt(SnapToGrid(rotateY('POINT(1 1 1)'::geometry, pi()+pi()/2), 0.1)); -select 'rotateY', asewkt(SnapToGrid(rotateY('POINT(1 1 1)'::geometry, 2*pi()), 0.1)); - --- rotateX -select 'rotateX', asewkt(SnapToGrid(rotateX('POINT(1 1 1)'::geometry, pi()), 0.1)); -select 'rotateX', asewkt(SnapToGrid(rotateX('POINT(1 1 1)'::geometry, pi()/2), 0.1)); -select 'rotateX', asewkt(SnapToGrid(rotateX('POINT(1 1 1)'::geometry, pi()+pi()/2), 0.1)); -select 'rotateX', asewkt(SnapToGrid(rotateX('POINT(1 1 1)'::geometry, 2*pi()), 0.1)); - --- transscale -select 'transscale', asewkt(snapToGrid(transscale('POINT(1 1)'::geometry,1, 1, 1, 1), 0.1)); -select 'transscale', asewkt(snapToGrid(transscale('POINT(2 2)'::geometry,1, 1, 1, 1), 0.1)); -select 'transscale', asewkt(snapToGrid(transscale('POINT(1 1)'::geometry,-1, -1, -1, -1), 0.1)); -select 'transscale', asewkt(snapToGrid(transscale('POINT(1 1)'::geometry,0, 1, 1, 1), 0.1)); -select 'transscale', asewkt(snapToGrid(transscale('POINT(1 1)'::geometry,1, 0, 1, 1), 0.1)); -select 'transscale', asewkt(snapToGrid(transscale('POINT(1 1)'::geometry,1, 1, 0, 1), 0.1)); -select 'transscale', asewkt(snapToGrid(transscale('POINT(1 1)'::geometry,1, 1, 1, 0), 0.1)); -select 'transscale', asewkt(snapToGrid(transscale('POINT(1 1)'::geometry,2, 1, 1, 1), 0.1)); -select 'transscale', asewkt(snapToGrid(transscale('POINT(1 1)'::geometry,1, 2, 1, 1), 0.1)); -select 'transscale', asewkt(snapToGrid(transscale('POINT(1 1)'::geometry,1, 1, 2, 1), 0.1)); -select 'transscale', asewkt(snapToGrid(transscale('POINT(1 1)'::geometry,1, 1, 1, 2), 0.1)); -select 'transscale', asewkt(snapToGrid(transscale('POINT(1 1)'::geometry,2, 3, 5, 7), 0.1)); -select 'transscale', asewkt(snapToGrid(transscale('POINT(1 1 1)'::geometry,2, 3, 5, 7), 0.1)); - --- postgis-users/2006-May/012119.html -select 'transl_bbox', box2d(translate('LINESTRING(0 0, 1 1)'::geometry, 1, 0, 0)); -select 'scale_bbox', box2d(scale('LINESTRING(1 0, 2 1)'::geometry, 2, 0)); -select 'tscale_bbox', box2d(transscale('LINESTRING(1 0, 2 1)'::geometry, 2, 1, 1, 1)); - -select 'rotZ_bbox', box2d(SnapToGrid(rotateZ('LINESTRING(0 0, 1 0)'::geometry, pi()), 0.1)); -select 'rotY_bbox', box2d(SnapToGrid(rotateY('LINESTRING(0 0, 1 0)'::geometry, pi()), 0.1)); - -- Repeat all tests with the new function names. --- translate -select 'translate', ST_asewkt(ST_translate('POINT(0 0)'::geometry, 5, 12)); -select 'translate', ST_asewkt(ST_translate('POINT(0 0 0)'::geometry, -3, -7, 3)); - --- scale -select 'scale', ST_asewkt(ST_scale('POINT(1 1)'::geometry, 5, 5)); -select 'scale', ST_asewkt(ST_scale('POINT(1 1)'::geometry, 3, 2)); -select 'scale', ST_asewkt(ST_scale('POINT(10 20 -5)'::geometry, 4, 2, -8)); - --- rotateZ -select 'rotateZ', ST_asewkt(ST_SnapToGrid(rotateZ('POINT(1 1)'::geometry, pi()), 0.1)); -select 'rotateZ', ST_asewkt(ST_SnapToGrid(rotateZ('POINT(1 1)'::geometry, pi()/2), 0.1)); -select 'rotateZ', ST_asewkt(ST_SnapToGrid(rotateZ('POINT(1 1)'::geometry, pi()+pi()/2), 0.1)); -select 'rotateZ', ST_asewkt(ST_SnapToGrid(rotateZ('POINT(1 1)'::geometry, 2*pi()), 0.1)); - --- rotateY -select 'rotateY', ST_asewkt(ST_SnapToGrid(rotateY('POINT(1 1 1)'::geometry, pi()), 0.1)); -select 'rotateY', ST_asewkt(ST_SnapToGrid(rotateY('POINT(1 1 1)'::geometry, pi()/2), 0.1)); -select 'rotateY', ST_asewkt(ST_SnapToGrid(rotateY('POINT(1 1 1)'::geometry, pi()+pi()/2), 0.1)); -select 'rotateY', ST_asewkt(ST_SnapToGrid(rotateY('POINT(1 1 1)'::geometry, 2*pi()), 0.1)); - --- rotateX -select 'rotateX', ST_asewkt(ST_SnapToGrid(rotateX('POINT(1 1 1)'::geometry, pi()), 0.1)); -select 'rotateX', ST_asewkt(ST_SnapToGrid(rotateX('POINT(1 1 1)'::geometry, pi()/2), 0.1)); -select 'rotateX', ST_asewkt(ST_SnapToGrid(rotateX('POINT(1 1 1)'::geometry, pi()+pi()/2), 0.1)); -select 'rotateX', ST_asewkt(ST_SnapToGrid(rotateX('POINT(1 1 1)'::geometry, 2*pi()), 0.1)); - --- transscale -select 'transscale', ST_asewkt(ST_snapToGrid(transscale('POINT(1 1)'::geometry,1, 1, 1, 1), 0.1)); -select 'transscale', ST_asewkt(ST_snapToGrid(transscale('POINT(2 2)'::geometry,1, 1, 1, 1), 0.1)); -select 'transscale', ST_asewkt(ST_snapToGrid(transscale('POINT(1 1)'::geometry,-1, -1, -1, -1), 0.1)); -select 'transscale', ST_asewkt(ST_snapToGrid(transscale('POINT(1 1)'::geometry,0, 1, 1, 1), 0.1)); -select 'transscale', ST_asewkt(ST_snapToGrid(transscale('POINT(1 1)'::geometry,1, 0, 1, 1), 0.1)); -select 'transscale', ST_asewkt(ST_snapToGrid(transscale('POINT(1 1)'::geometry,1, 1, 0, 1), 0.1)); -select 'transscale', ST_asewkt(ST_snapToGrid(transscale('POINT(1 1)'::geometry,1, 1, 1, 0), 0.1)); -select 'transscale', ST_asewkt(ST_snapToGrid(transscale('POINT(1 1)'::geometry,2, 1, 1, 1), 0.1)); -select 'transscale', ST_asewkt(ST_snapToGrid(transscale('POINT(1 1)'::geometry,1, 2, 1, 1), 0.1)); -select 'transscale', ST_asewkt(ST_snapToGrid(transscale('POINT(1 1)'::geometry,1, 1, 2, 1), 0.1)); -select 'transscale', ST_asewkt(ST_snapToGrid(transscale('POINT(1 1)'::geometry,1, 1, 1, 2), 0.1)); -select 'transscale', ST_asewkt(ST_snapToGrid(transscale('POINT(1 1)'::geometry,2, 3, 5, 7), 0.1)); -select 'transscale', ST_asewkt(ST_snapToGrid(transscale('POINT(1 1 1)'::geometry,2, 3, 5, 7), 0.1)); +-- ST_Translate +select 'ST_Translate', ST_asewkt(ST_Translate('POINT(0 0)'::geometry, 5, 12)); +select 'ST_Translate', ST_asewkt(ST_Translate('POINT(0 0 0)'::geometry, -3, -7, 3)); + +-- ST_Scale +select 'ST_Scale', ST_asewkt(ST_Scale('POINT(1 1)'::geometry, 5, 5)); +select 'ST_Scale', ST_asewkt(ST_Scale('POINT(1 1)'::geometry, 3, 2)); +select 'ST_Scale', ST_asewkt(ST_Scale('POINT(10 20 -5)'::geometry, 4, 2, -8)); + +-- ST_Rotate +select 'ST_Rotate', ST_asewkt(ST_SnapToGrid(ST_Rotate('POINT(1 1)'::geometry, pi()/2, 10.0, 20.0), 0.1)); +select 'ST_Rotate', ST_asewkt(ST_SnapToGrid(ST_Rotate('POINT(1 1)'::geometry, -pi()/2, -1.0, 2.0), 0.1)); +select 'ST_Rotate', ST_asewkt(ST_SnapToGrid(ST_Rotate('POINT(1 1)'::geometry, pi()/2, 'POINT(10 10)'::geometry), 0.1)); +select 'ST_Rotate', ST_asewkt(ST_SnapToGrid(ST_Rotate('POINT(1 1)'::geometry, pi()/2, ST_Centroid('LINESTRING(0 0, 1 0)'::geometry)), 0.1)); + +-- ST_RotateZ +select 'ST_RotateZ', ST_asewkt(ST_SnapToGrid(ST_RotateZ('POINT(1 1)'::geometry, pi()), 0.1)); +select 'ST_RotateZ', ST_asewkt(ST_SnapToGrid(ST_RotateZ('POINT(1 1)'::geometry, pi()/2), 0.1)); +select 'ST_RotateZ', ST_asewkt(ST_SnapToGrid(ST_RotateZ('POINT(1 1)'::geometry, pi()+pi()/2), 0.1)); +select 'ST_RotateZ', ST_asewkt(ST_SnapToGrid(ST_RotateZ('POINT(1 1)'::geometry, 2*pi()), 0.1)); + +-- ST_RotateY +select 'ST_RotateY', ST_asewkt(ST_SnapToGrid(ST_RotateY('POINT(1 1 1)'::geometry, pi()), 0.1)); +select 'ST_RotateY', ST_asewkt(ST_SnapToGrid(ST_RotateY('POINT(1 1 1)'::geometry, pi()/2), 0.1)); +select 'ST_RotateY', ST_asewkt(ST_SnapToGrid(ST_RotateY('POINT(1 1 1)'::geometry, pi()+pi()/2), 0.1)); +select 'ST_RotateY', ST_asewkt(ST_SnapToGrid(ST_RotateY('POINT(1 1 1)'::geometry, 2*pi()), 0.1)); + +-- ST_RotateX +select 'ST_RotateX', ST_asewkt(ST_SnapToGrid(ST_RotateX('POINT(1 1 1)'::geometry, pi()), 0.1)); +select 'ST_RotateX', ST_asewkt(ST_SnapToGrid(ST_RotateX('POINT(1 1 1)'::geometry, pi()/2), 0.1)); +select 'ST_RotateX', ST_asewkt(ST_SnapToGrid(ST_RotateX('POINT(1 1 1)'::geometry, pi()+pi()/2), 0.1)); +select 'ST_RotateX', ST_asewkt(ST_SnapToGrid(ST_RotateX('POINT(1 1 1)'::geometry, 2*pi()), 0.1)); + +-- ST_TransScale +select 'ST_TransScale', ST_asewkt(ST_snapToGrid(ST_TransScale('POINT(1 1)'::geometry,1, 1, 1, 1), 0.1)); +select 'ST_TransScale', ST_asewkt(ST_snapToGrid(ST_TransScale('POINT(2 2)'::geometry,1, 1, 1, 1), 0.1)); +select 'ST_TransScale', ST_asewkt(ST_snapToGrid(ST_TransScale('POINT(1 1)'::geometry,-1, -1, -1, -1), 0.1)); +select 'ST_TransScale', ST_asewkt(ST_snapToGrid(ST_TransScale('POINT(1 1)'::geometry,0, 1, 1, 1), 0.1)); +select 'ST_TransScale', ST_asewkt(ST_snapToGrid(ST_TransScale('POINT(1 1)'::geometry,1, 0, 1, 1), 0.1)); +select 'ST_TransScale', ST_asewkt(ST_snapToGrid(ST_TransScale('POINT(1 1)'::geometry,1, 1, 0, 1), 0.1)); +select 'ST_TransScale', ST_asewkt(ST_snapToGrid(ST_TransScale('POINT(1 1)'::geometry,1, 1, 1, 0), 0.1)); +select 'ST_TransScale', ST_asewkt(ST_snapToGrid(ST_TransScale('POINT(1 1)'::geometry,2, 1, 1, 1), 0.1)); +select 'ST_TransScale', ST_asewkt(ST_snapToGrid(ST_TransScale('POINT(1 1)'::geometry,1, 2, 1, 1), 0.1)); +select 'ST_TransScale', ST_asewkt(ST_snapToGrid(ST_TransScale('POINT(1 1)'::geometry,1, 1, 2, 1), 0.1)); +select 'ST_TransScale', ST_asewkt(ST_snapToGrid(ST_TransScale('POINT(1 1)'::geometry,1, 1, 1, 2), 0.1)); +select 'ST_TransScale', ST_asewkt(ST_snapToGrid(ST_TransScale('POINT(1 1)'::geometry,2, 3, 5, 7), 0.1)); +select 'ST_TransScale', ST_asewkt(ST_snapToGrid(ST_TransScale('POINT(1 1 1)'::geometry,2, 3, 5, 7), 0.1)); -- postgis-users/2006-May/012119.html -select 'transl_bbox', ST_box2d(ST_translate('LINESTRING(0 0, 1 1)'::geometry, 1, 0, 0)); -select 'scale_bbox', ST_box2d(ST_scale('LINESTRING(1 0, 2 1)'::geometry, 2, 0)); -select 'tscale_bbox', ST_box2d(ST_transscale('LINESTRING(1 0, 2 1)'::geometry, 2, 1, 1, 1)); +select 'transl_bbox', box2d(ST_Translate('LINESTRING(0 0, 1 1)'::geometry, 1, 0, 0)); +select 'ST_Scale_bbox', box2d(ST_Scale('LINESTRING(1 0, 2 1)'::geometry, 2, 0)); +select 'ST_Scale_bbox', box2d(ST_TransScale('LINESTRING(1 0, 2 1)'::geometry, 2, 1, 1, 1)); -select 'rotZ_bbox', ST_box2d(ST_SnapToGrid(rotateZ('LINESTRING(0 0, 1 0)'::geometry, pi()), 0.1)); -select 'rotY_bbox', ST_box2d(ST_SnapToGrid(rotateY('LINESTRING(0 0, 1 0)'::geometry, pi()), 0.1)); +select 'ST_RotZ_bbox', box2d(ST_SnapToGrid(ST_RotateZ('LINESTRING(0 0, 1 0)'::geometry, pi()), 0.1)); +select 'ST_RotY_bbox', box2d(ST_SnapToGrid(ST_RotateY('LINESTRING(0 0, 1 0)'::geometry, pi()), 0.1)); diff -Nru postgis-1.5.3/regress/affine_expected postgis-2.0.1/regress/affine_expected --- postgis-1.5.3/regress/affine_expected 2010-12-14 13:14:14.000000000 +0000 +++ postgis-2.0.1/regress/affine_expected 2012-02-27 22:08:12.000000000 +0000 @@ -1,70 +1,39 @@ -translate|POINT(5 12) -translate|POINT(-3 -7 3) -scale|POINT(5 5) -scale|POINT(3 2) -scale|POINT(40 40 40) -rotateZ|POINT(-1 -1) -rotateZ|POINT(-1 1) -rotateZ|POINT(1 -1) -rotateZ|POINT(1 1) -rotateY|POINT(-1 1 -1) -rotateY|POINT(1 1 -1) -rotateY|POINT(-1 1 1) -rotateY|POINT(1 1 1) -rotateX|POINT(1 -1 -1) -rotateX|POINT(1 -1 1) -rotateX|POINT(1 1 -1) -rotateX|POINT(1 1 1) -transscale|POINT(2 2) -transscale|POINT(3 3) -transscale|POINT(0 0) -transscale|POINT(1 2) -transscale|POINT(2 1) -transscale|POINT(0 2) -transscale|POINT(2 0) -transscale|POINT(3 2) -transscale|POINT(2 3) -transscale|POINT(4 2) -transscale|POINT(2 4) -transscale|POINT(15 28) -transscale|POINT(15 28 1) +ST_Translate|POINT(5 12) +ST_Translate|POINT(-3 -7 3) +ST_Scale|POINT(5 5) +ST_Scale|POINT(3 2) +ST_Scale|POINT(40 40 40) +ST_Rotate|POINT(29 11) +ST_Rotate|POINT(-2 0) +ST_Rotate|POINT(19 1) +ST_Rotate|POINT(-0.5 0.5) +ST_RotateZ|POINT(-1 -1) +ST_RotateZ|POINT(-1 1) +ST_RotateZ|POINT(1 -1) +ST_RotateZ|POINT(1 1) +ST_RotateY|POINT(-1 1 -1) +ST_RotateY|POINT(1 1 -1) +ST_RotateY|POINT(-1 1 1) +ST_RotateY|POINT(1 1 1) +ST_RotateX|POINT(1 -1 -1) +ST_RotateX|POINT(1 -1 1) +ST_RotateX|POINT(1 1 -1) +ST_RotateX|POINT(1 1 1) +ST_TransScale|POINT(2 2) +ST_TransScale|POINT(3 3) +ST_TransScale|POINT(0 0) +ST_TransScale|POINT(1 2) +ST_TransScale|POINT(2 1) +ST_TransScale|POINT(0 2) +ST_TransScale|POINT(2 0) +ST_TransScale|POINT(3 2) +ST_TransScale|POINT(2 3) +ST_TransScale|POINT(4 2) +ST_TransScale|POINT(2 4) +ST_TransScale|POINT(15 28) +ST_TransScale|POINT(15 28 1) transl_bbox|BOX(1 0,2 1) -scale_bbox|BOX(2 0,4 0) -tscale_bbox|BOX(3 1,4 2) -rotZ_bbox|BOX(-1 0,0 0) -rotY_bbox|BOX(-1 0,0 0) -translate|POINT(5 12) -translate|POINT(-3 -7 3) -scale|POINT(5 5) -scale|POINT(3 2) -scale|POINT(40 40 40) -rotateZ|POINT(-1 -1) -rotateZ|POINT(-1 1) -rotateZ|POINT(1 -1) -rotateZ|POINT(1 1) -rotateY|POINT(-1 1 -1) -rotateY|POINT(1 1 -1) -rotateY|POINT(-1 1 1) -rotateY|POINT(1 1 1) -rotateX|POINT(1 -1 -1) -rotateX|POINT(1 -1 1) -rotateX|POINT(1 1 -1) -rotateX|POINT(1 1 1) -transscale|POINT(2 2) -transscale|POINT(3 3) -transscale|POINT(0 0) -transscale|POINT(1 2) -transscale|POINT(2 1) -transscale|POINT(0 2) -transscale|POINT(2 0) -transscale|POINT(3 2) -transscale|POINT(2 3) -transscale|POINT(4 2) -transscale|POINT(2 4) -transscale|POINT(15 28) -transscale|POINT(15 28 1) -transl_bbox|BOX(1 0,2 1) -scale_bbox|BOX(2 0,4 0) -tscale_bbox|BOX(3 1,4 2) -rotZ_bbox|BOX(-1 0,0 0) -rotY_bbox|BOX(-1 0,0 0) +ST_Scale_bbox|BOX(2 0,4 0) +ST_Scale_bbox|BOX(3 1,4 2) +ST_RotZ_bbox|BOX(-1 0,0 0) +ST_RotY_bbox|BOX(-1 0,0 0) diff -Nru postgis-1.5.3/regress/bestsrid.sql postgis-2.0.1/regress/bestsrid.sql --- postgis-1.5.3/regress/bestsrid.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/bestsrid.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,25 @@ +-- South lambert +select x, y, _ST_BestSRID(ST_Point(x, y)) +from ( select 0 as x, -70 as y ) as foo ; + +-- North lambert +select x, y, _ST_BestSRID(ST_Point(x, y)) +from ( select 0 as x, 70 as y ) as foo ; + +-- UTM north +select x, 60, _ST_BestSRID(ST_Point(x, 60)) +from generate_series(-177, 177, 6) as x ; +-- Corner cases +select -180, 60, _ST_BestSRID(ST_Point(-180, 60)); +select 180, 60, _ST_BestSRID(ST_Point(180, 60)); + +-- UTM south +select x, -60, _ST_BestSRID(ST_Point(x, -60)) +from generate_series(-177, 177, 6) as x; +-- Corner cases +select -180, -60, _ST_BestSRID(ST_Point(-180, -60)); +select 180, -60, _ST_BestSRID(ST_Point(180, -60)); + +-- World mercator +select 'world', _ST_BestSRID(ST_Point(-160, -40), ST_Point(160, 40)); + diff -Nru postgis-1.5.3/regress/bestsrid_expected postgis-2.0.1/regress/bestsrid_expected --- postgis-1.5.3/regress/bestsrid_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/bestsrid_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,127 @@ +0|-70|999161 +0|70|999061 +-177|60|999001 +-171|60|999002 +-165|60|999003 +-159|60|999004 +-153|60|999005 +-147|60|999006 +-141|60|999007 +-135|60|999008 +-129|60|999009 +-123|60|999010 +-117|60|999011 +-111|60|999012 +-105|60|999013 +-99|60|999014 +-93|60|999015 +-87|60|999016 +-81|60|999017 +-75|60|999018 +-69|60|999019 +-63|60|999020 +-57|60|999021 +-51|60|999022 +-45|60|999023 +-39|60|999024 +-33|60|999025 +-27|60|999026 +-21|60|999027 +-15|60|999028 +-9|60|999029 +-3|60|999030 +3|60|999031 +9|60|999032 +15|60|999033 +21|60|999034 +27|60|999035 +33|60|999036 +39|60|999037 +45|60|999038 +51|60|999039 +57|60|999040 +63|60|999041 +69|60|999042 +75|60|999043 +81|60|999044 +87|60|999045 +93|60|999046 +99|60|999047 +105|60|999048 +111|60|999049 +117|60|999050 +123|60|999051 +129|60|999052 +135|60|999053 +141|60|999054 +147|60|999055 +153|60|999056 +159|60|999057 +165|60|999058 +171|60|999059 +177|60|999060 +-180|60|999001 +180|60|999060 +-177|-60|999101 +-171|-60|999102 +-165|-60|999103 +-159|-60|999104 +-153|-60|999105 +-147|-60|999106 +-141|-60|999107 +-135|-60|999108 +-129|-60|999109 +-123|-60|999110 +-117|-60|999111 +-111|-60|999112 +-105|-60|999113 +-99|-60|999114 +-93|-60|999115 +-87|-60|999116 +-81|-60|999117 +-75|-60|999118 +-69|-60|999119 +-63|-60|999120 +-57|-60|999121 +-51|-60|999122 +-45|-60|999123 +-39|-60|999124 +-33|-60|999125 +-27|-60|999126 +-21|-60|999127 +-15|-60|999128 +-9|-60|999129 +-3|-60|999130 +3|-60|999131 +9|-60|999132 +15|-60|999133 +21|-60|999134 +27|-60|999135 +33|-60|999136 +39|-60|999137 +45|-60|999138 +51|-60|999139 +57|-60|999140 +63|-60|999141 +69|-60|999142 +75|-60|999143 +81|-60|999144 +87|-60|999145 +93|-60|999146 +99|-60|999147 +105|-60|999148 +111|-60|999149 +117|-60|999150 +123|-60|999151 +129|-60|999152 +135|-60|999153 +141|-60|999154 +147|-60|999155 +153|-60|999156 +159|-60|999157 +165|-60|999158 +171|-60|999159 +177|-60|999160 +-180|-60|999101 +180|-60|999160 +world|999000 diff -Nru postgis-1.5.3/regress/binary.sql postgis-2.0.1/regress/binary.sql --- postgis-1.5.3/regress/binary.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/binary.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,54 @@ +SET client_min_messages TO warning; +CREATE SCHEMA tm; + +CREATE TABLE tm.geoms (id serial, g geometry); + +INSERT INTO tm.geoms(g) values ('POINT EMPTY'); +INSERT INTO tm.geoms(g) values ('LINESTRING EMPTY'); +INSERT INTO tm.geoms(g) values ('POLYGON EMPTY'); +INSERT INTO tm.geoms(g) values ('MULTIPOINT EMPTY'); +INSERT INTO tm.geoms(g) values ('MULTILINESTRING EMPTY'); +INSERT INTO tm.geoms(g) values ('MULTIPOLYGON EMPTY'); +INSERT INTO tm.geoms(g) values ('GEOMETRYCOLLECTION EMPTY'); +INSERT INTO tm.geoms(g) values ('CIRCULARSTRING EMPTY'); +INSERT INTO tm.geoms(g) values ('COMPOUNDCURVE EMPTY'); +INSERT INTO tm.geoms(g) values ('CURVEPOLYGON EMPTY'); +INSERT INTO tm.geoms(g) values ('MULTICURVE EMPTY'); +INSERT INTO tm.geoms(g) values ('MULTISURFACE EMPTY'); +INSERT INTO tm.geoms(g) values ('POLYHEDRALSURFACE EMPTY'); +INSERT INTO tm.geoms(g) values ('TRIANGLE EMPTY'); +INSERT INTO tm.geoms(g) values ('TIN EMPTY'); + +-- all zm flags +INSERT INTO tm.geoms(g) +SELECT st_force_3dz(g) FROM tm.geoms WHERE id < 15 ORDER BY id; +INSERT INTO tm.geoms(g) +SELECT st_force_3dm(g) FROM tm.geoms WHERE id < 15 ORDER BY id; +INSERT INTO tm.geoms(g) +SELECT st_force_4d(g) FROM tm.geoms WHERE id < 15 ORDER BY id; + +-- known srid +INSERT INTO tm.geoms(g) +SELECT st_setsrid(g,4326) FROM tm.geoms ORDER BY id; + +COPY tm.geoms TO :tmpfile WITH BINARY; +CREATE TABLE tm.geoms_in AS SELECT * FROM tm.geoms LIMIT 0; +COPY tm.geoms_in FROM :tmpfile WITH BINARY; +SELECT 'geometry', count(*) FROM tm.geoms_in i, tm.geoms o WHERE i.id = o.id + AND ST_OrderingEquals(i.g, o.g); + +CREATE TABLE tm.geogs AS SELECT id,g::geography FROM tm.geoms +WHERE geometrytype(g) NOT LIKE '%CURVE%' + AND geometrytype(g) NOT LIKE '%CIRCULAR%' + AND geometrytype(g) NOT LIKE '%SURFACE%' + AND geometrytype(g) NOT LIKE 'TRIANGLE%' + AND geometrytype(g) NOT LIKE 'TIN%' +; + +COPY tm.geogs TO :tmpfile WITH BINARY; +CREATE TABLE tm.geogs_in AS SELECT * FROM tm.geogs LIMIT 0; +COPY tm.geogs_in FROM :tmpfile WITH BINARY; +SELECT 'geometry', count(*) FROM tm.geogs_in i, tm.geogs o WHERE i.id = o.id + AND ST_OrderingEquals(i.g::geometry, o.g::geometry); + +DROP SCHEMA tm CASCADE; diff -Nru postgis-1.5.3/regress/binary_expected postgis-2.0.1/regress/binary_expected --- postgis-1.5.3/regress/binary_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/binary_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,6 @@ +COPY 114 +COPY 114 +geometry|106 +COPY 56 +COPY 56 +geometry|48 diff -Nru postgis-1.5.3/regress/clean.sql postgis-2.0.1/regress/clean.sql --- postgis-1.5.3/regress/clean.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/clean.sql 2012-05-08 16:47:33.000000000 +0000 @@ -0,0 +1,50 @@ +CREATE TABLE clean_cases (origin varchar, caseno numeric, + orig geometry, + valid geometry); +COPY clean_cases FROM stdin; +RT 1 0103000000010000000700000000000000000000400000000000000040000000000000184000000000000000C000000000000024400000000000000040000000000000244000000000000000C000000000000018400000000000000040000000000000004000000000000000C000000000000000400000000000000040 010600000003000000010300000001000000040000000000000000000040000000000000004000000000000010400000000000000000000000000000004000000000000000C0000000000000004000000000000000400103000000010000000500000000000000000020400000000000000000000000000000184000000000000000C0000000000000104000000000000000000000000000001840000000000000004000000000000020400000000000000000010300000001000000040000000000000000002040000000000000000000000000000024400000000000000040000000000000244000000000000000C000000000000020400000000000000000 +RT 2 01030000000100000007000000000000000000284000000000000000C000000000000028400000000000000040000000000000304000000000000000000000000000002C40000000000000000000000000000032400000000000000040000000000000324000000000000000C0000000000000284000000000000000C0 01030000000200000006000000000000000000284000000000000000C0000000000000284000000000000000400000000000002E40000000000000E03F00000000000032400000000000000040000000000000324000000000000000C0000000000000284000000000000000C0040000000000000000002E40000000000000E03F0000000000002C400000000000000000000000000000304000000000000000000000000000002E40000000000000E03F +RT 3 01030000000100000006000000000000000000004000000000000010400000000000000040000000000000184000000000000010400000000000001040000000000000184000000000000018400000000000001840000000000000104000000000000000400000000000001040 01060000000200000001030000000100000004000000000000000000004000000000000010400000000000000040000000000000184000000000000010400000000000001040000000000000004000000000000010400103000000010000000400000000000000000010400000000000001040000000000000184000000000000018400000000000001840000000000000104000000000000010400000000000001040 +RT 4 01060000000200000001030000000100000007000000000000000000344000000000000000C00000000000003440000000000000004000000000000038400000000000000000000000000000364000000000000000000000000000003A4000000000000000400000000000003A4000000000000000C0000000000000344000000000000000C001030000000100000005000000000000000000344000000000000010C00000000000003A4000000000000010C00000000000003A4000000000000018C0000000000000344000000000000018C0000000000000344000000000000010C0 01060000000200000001030000000200000006000000000000000000344000000000000000C0000000000000344000000000000000400000000000003740000000000000E03F0000000000003A4000000000000000400000000000003A4000000000000000C0000000000000344000000000000000C0040000000000000000003740000000000000E03F00000000000036400000000000000000000000000000384000000000000000000000000000003740000000000000E03F01030000000100000005000000000000000000344000000000000010C00000000000003A4000000000000010C00000000000003A4000000000000018C0000000000000344000000000000018C0000000000000344000000000000010C0 +RT 5 010600000001000000010300000001000000070000000000000000001C4000000000000008400000000000001C400000000000001840000000000000224000000000000014400000000000002640000000000000184000000000000026400000000000000840000000000000224000000000000014400000000000001C400000000000000840 010600000002000000010300000001000000040000000000000000001C4000000000000008400000000000001C400000000000001840000000000000224000000000000014400000000000001C4000000000000008400103000000010000000400000000000000000022400000000000001440000000000000264000000000000018400000000000002640000000000000084000000000000022400000000000001440 +RT 6 010300000001000000090000000000000000002840000000000000104000000000000028400000000000001C40000000000000304000000000000018400000000000002C400000000000001440000000000000304000000000000014400000000000002C40000000000000184000000000000032400000000000001C400000000000003240000000000000104000000000000028400000000000001040 010300000003000000060000000000000000002840000000000000104000000000000028400000000000001C400000000000002E40000000000000194000000000000032400000000000001C400000000000003240000000000000104000000000000028400000000000001040050000000000000000002E4000000000000019400000000000002C4000000000000018400000000000002E400000000000001640000000000000304000000000000018400000000000002E400000000000001940040000000000000000002E4000000000000016400000000000002C400000000000001440000000000000304000000000000014400000000000002E400000000000001640 +RT 7 01060000000100000001030000000100000009000000000000000000244000000000000024400000000000002440000000000000344000000000000034400000000000003440000000000000344000000000000024400000000000003E4000000000000024400000000000003E400000000000003440000000000000344000000000000034400000000000003440000000000000244000000000000024400000000000002440 010700000002000000010300000001000000070000000000000000002440000000000000244000000000000024400000000000003440000000000000344000000000000034400000000000003E4000000000000034400000000000003E40000000000000244000000000000034400000000000002440000000000000244000000000000024400102000000020000000000000000003440000000000000344000000000000034400000000000002440 +RT 7.1 0103000000010000000900000000000000000028C0000000000000244000000000000028C0000000000000344000000000000000C0000000000000344000000000000000C00000000000002440000000000000204000000000000024400000000000002040000000000000344000000000000000C0000000000000344000000000000000C0000000000000244000000000000028C00000000000002440 0107000000020000000103000000010000000700000000000000000028C0000000000000244000000000000028C0000000000000344000000000000000C00000000000003440000000000000204000000000000034400000000000002040000000000000244000000000000000C0000000000000244000000000000028C0000000000000244001020000000200000000000000000000C0000000000000344000000000000000C00000000000002440 +RT 8 0103000000010000000C00000000000000000034C000000000000028C000000000000034C000000000000000C0000000000000000000000000000000C0000000000000000000000000000028C000000000000024C000000000000028C000000000000024C0000000000000204000000000000000000000000000002040000000000000000000000000000000C000000000000039C000000000000000C000000000000039C0000000000000084000000000000034C0000000000000084000000000000034C000000000000028C0 01070000000200000001060000000200000001030000000100000007000000000000000000000000000000000000C0000000000000000000000000000028C000000000000024C000000000000028C000000000000024C000000000000000C000000000000024C0000000000000204000000000000000000000000000002040000000000000000000000000000000C00103000000010000000500000000000000000034C000000000000000C000000000000039C000000000000000C000000000000039C0000000000000084000000000000034C0000000000000084000000000000034C000000000000000C001050000000300000001020000000200000000000000000034C000000000000028C000000000000034C000000000000000C001020000000200000000000000000034C000000000000000C000000000000024C000000000000000C001020000000200000000000000000024C000000000000000C0000000000000000000000000000000C0 +RT 9 0103000000010000000400000000000000000024400000000000003640000000000000244000000000000040400000000000003440000000000000404000000000000034400000000000003640 010300000001000000050000000000000000002440000000000000364000000000000024400000000000004040000000000000344000000000000040400000000000003440000000000000364000000000000024400000000000003640 +RT 9.1 0103000000010000000600000000000000000028C0000000000000364000000000000028C00000000000004040000000000000204000000000000040400000000000002040000000000000364000000000000000C0000000000000364000000000000000C00000000000004540 0106000000030000000103000000010000000400000000000000000028C0000000000000364000000000000028C000000000000040400000000000001CC0000000000000404000000000000028C000000000000036400103000000010000000400000000000000000000C000000000000040400000000000001CC0000000000000404000000000000000C0000000000000454000000000000000C000000000000040400103000000010000000500000000000000000000C00000000000004040000000000000204000000000000040400000000000002040000000000000364000000000000000C0000000000000364000000000000000C00000000000004040 +RT 10 0103000000010000000500000000000000000039C000000000000024400000000000002EC000000000000024400000000000002EC0000000000000344000000000000039C0000000000000344000000000000039C00000000000002440 0103000000010000000500000000000000000039C000000000000024400000000000002EC000000000000024400000000000002EC0000000000000344000000000000039C0000000000000344000000000000039C00000000000002440 +RT 11 0103000000010000000300000000000000008042C00000000000002E4000000000000042C0000000000000304000000000008042C00000000000002E40 LINESTRING(-37 15,-36 16) +RT 12 0103000000020000000500000000000000008040C00000000000002C4000000000008040C000000000000031400000000000003EC000000000000031400000000000003EC00000000000002C4000000000008040C00000000000002C400300000000000000000040C00000000000002E400000000000003FC0000000000000304000000000000040C00000000000002E40 0107000000020000000103000000010000000500000000000000008040C00000000000002C4000000000008040C000000000000031400000000000003EC000000000000031400000000000003EC00000000000002C4000000000008040C00000000000002C4001020000000200000000000000000040C00000000000002E400000000000003FC00000000000003040 +RT 13.1 0103000000010000000900000000000000000039C000000000000039400000000000002EC000000000000039400000000000002EC000000000008041400000000000002EC000000000008041400000000000002EC0000000000080414000000000000039C0000000000080414000000000000039C0000000000080414000000000000039C0000000000000394000000000000039C00000000000003940 0103000000010000000900000000000000000039C000000000000039400000000000002EC000000000000039400000000000002EC000000000008041400000000000002EC000000000008041400000000000002EC0000000000080414000000000000039C0000000000080414000000000000039C0000000000080414000000000000039C0000000000000394000000000000039C00000000000003940 +RT 13.2 0103000000010000000700000000000000000044C000000000000039400000000000003EC000000000000039400000000000003EC000000000008041400000000000003EC000000000008046400000000000003EC0000000000080414000000000000044C0000000000080414000000000000044C00000000000003940 010700000002000000010300000001000000050000000000000000003EC000000000008041400000000000003EC0000000000000394000000000000044C0000000000000394000000000000044C000000000008041400000000000003EC000000000008041400102000000020000000000000000003EC000000000008041400000000000003EC00000000000804640 +RT 14 01030000000100000009000000000000000000004000000000000018C0000000000000004000000000000010C0000000000000104000000000000010C0000000000000204000000000000018C0000000000000244000000000000018C0000000000000244000000000000010C0000000000000204000000000000010C0000000000000104000000000000018C0000000000000004000000000000018C0 01060000000200000001030000000100000006000000000000000000004000000000000018C0000000000000004000000000000010C0000000000000104000000000000010C0000000000000184000000000000014C0000000000000104000000000000018C0000000000000004000000000000018C001030000000100000006000000000000000000184000000000000014C0000000000000204000000000000010C0000000000000244000000000000010C0000000000000244000000000000018C0000000000000204000000000000018C0000000000000184000000000000014C0 +RT 15 0103000000010000000B00000000000000000040400000000000002440000000000000404000000000000034400000000000004540000000000000344000000000000045400000000000002E40000000000000454000000000000024400000000000004A4000000000000024400000000000004A4000000000000034400000000000004540000000000000344000000000000045400000000000002E400000000000004540000000000000244000000000000040400000000000002440 010700000002000000010300000001000000070000000000000000004040000000000000244000000000000040400000000000003440000000000000454000000000000034400000000000004A4000000000000034400000000000004A40000000000000244000000000000045400000000000002440000000000000404000000000000024400105000000020000000102000000020000000000000000004540000000000000344000000000000045400000000000002E4001020000000200000000000000000045400000000000002E4000000000000045400000000000002440 +RT 16.1 010600000002000000010300000001000000050000000000000000003640000000000000364000000000000040400000000000003640000000000000404000000000000040400000000000003640000000000000404000000000000036400000000000003640010300000001000000050000000000000000003B400000000000003B4000000000008042400000000000003B40000000000080424000000000008042400000000000003B4000000000008042400000000000003B400000000000003B40 0106000000020000000103000000010000000700000000000000000040400000000000003B400000000000004040000000000000364000000000000036400000000000003640000000000000364000000000000040400000000000003B4000000000000040400000000000003B400000000000003B4000000000000040400000000000003B40010300000001000000070000000000000000003B4000000000000040400000000000003B4000000000008042400000000000804240000000000080424000000000008042400000000000003B4000000000000040400000000000003B40000000000000404000000000000040400000000000003B400000000000004040 +RT 16.2 0106000000020000000103000000010000000500000000000000008043400000000000003640000000000080484000000000000036400000000000804840000000000000404000000000008043400000000000004040000000000080434000000000000036400103000000010000000500000000000000008047400000000000003A4000000000008049400000000000003A4000000000008049400000000000003E4000000000008047400000000000003E4000000000008047400000000000003A40 0106000000020000000103000000010000000900000000000000008048400000000000003A400000000000804840000000000000364000000000008043400000000000003640000000000080434000000000000040400000000000804840000000000000404000000000008048400000000000003E4000000000008047400000000000003E4000000000008047400000000000003A4000000000008048400000000000003A400103000000010000000500000000000000008048400000000000003E4000000000008049400000000000003E4000000000008049400000000000003A4000000000008048400000000000003A4000000000008048400000000000003E40 +RT 16.3 010600000002000000010300000001000000050000000000000000804A4000000000000036400000000000804F4000000000000036400000000000804F4000000000000040400000000000804A4000000000000040400000000000804A400000000000003640010300000001000000050000000000000000804E400000000000003A400000000000804F400000000000003A400000000000804F400000000000003E400000000000804E400000000000003E400000000000804E400000000000003A40 010700000002000000010300000001000000070000000000000000804F400000000000003A400000000000804F4000000000000036400000000000804A4000000000000036400000000000804A4000000000000040400000000000804F4000000000000040400000000000804F400000000000003E400000000000804F400000000000003A400105000000020000000102000000020000000000000000804E400000000000003A400000000000804F400000000000003A400102000000030000000000000000804F400000000000003E400000000000804E400000000000003E400000000000804E400000000000003A40 +RT 16.4 010600000002000000010300000001000000080000000000000000C0504000000000000036400000000000405340000000000000364000000000004053400000000000003A400000000000C053400000000000003C4000000000004053400000000000003E40000000000040534000000000000040400000000000C0504000000000000040400000000000C050400000000000003640010300000001000000060000000000000000C052400000000000003A4000000000004053400000000000003A400000000000C053400000000000003C4000000000004053400000000000003E400000000000C052400000000000003E400000000000C052400000000000003A40 0107000000020000000103000000010000000800000000000000004053400000000000003A40000000000040534000000000000036400000000000C0504000000000000036400000000000C0504000000000000040400000000000405340000000000000404000000000004053400000000000003E400000000000C053400000000000003C4000000000004053400000000000003A400105000000020000000102000000020000000000000000C052400000000000003A4000000000004053400000000000003A4001020000000300000000000000004053400000000000003E400000000000C052400000000000003E400000000000C052400000000000003A40 +RT 17.1 SRID=12;010300000003000000050000000000000000004E4000000000000014C0000000000000544000000000000014C0000000000000544000000000000034400000000000004E4000000000000034400000000000004E4000000000000014C0050000000000000000804B4000000000000000000000000000805140000000000000000000000000008051400000000000002E400000000000804B400000000000002E400000000000804B40000000000000000005000000000000000040504000000000000014400000000000C0524000000000000014400000000000C0524000000000000024400000000000405040000000000000244000000000004050400000000000001440 SRID=12;0106000000030000000103000000010000000D0000000000000000004E400000000000002E400000000000004E40000000000000344000000000000054400000000000003440000000000000544000000000000014C00000000000004E4000000000000014C00000000000004E40000000000000000000000000008051400000000000000000000000000080514000000000000014400000000000C0524000000000000014400000000000C0524000000000000024400000000000805140000000000000244000000000008051400000000000002E400000000000004E400000000000002E40010300000001000000050000000000000000004E4000000000000000000000000000804B4000000000000000000000000000804B400000000000002E400000000000004E400000000000002E400000000000004E400000000000000000010300000001000000050000000000000000805140000000000000244000000000008051400000000000001440000000000040504000000000000014400000000000405040000000000000244000000000008051400000000000002440 +PG 1 SRID=1;0103000000010000000100000000000000000000000000000000000000 SRID=1;POINT(0 0) +PG 2 SRID=3;LINESTRING(0 0, 0 0) SRID=3;POINT(0 0) +PG 3 SRID=43;MULTILINESTRING((0 0, 10 0),(20 20, 20 20)) SRID=43;GEOMETRYCOLLECTION(LINESTRING(0 0, 10 0),POINT(20 20)) +PG 4 SRID=2;MULTIPOLYGON(((5 3, 7 4, 9 5, 11 6, 13 7, 5 3)),((14 14, 14 14, 14 14, 14 14))) SRID=2;GEOMETRYCOLLECTION(MULTILINESTRING((5 3,7 4),(7 4,9 5),(9 5,11 6),(11 6,13 7)),POINT(14 14)) +PG 5 SRID=4;MULTILINESTRING((5 3 0, 7 4 5, 9 5 3, 11 6 4, 13 7 9, 5 3 0),(14 14 2, 14 14 3, 14 14 4, 14 14 5)) SRID=4;GEOMETRYCOLLECTION(MULTILINESTRING((5 3 0,7 4 3.625),(7 4 3.625,9 5 3.75),(9 5 3.75,11 6 5.375),(11 6 5.375,13 7 9)),POINT(14 14 2)) +\. + +-- PG.1 : polygon with single ring with single point in it +-- to be converted to a POINT +-- + +SELECT origin,caseno, + st_equals(st_collectionextract(st_makevalid(orig),1), st_collectionextract(valid,1)) AND + st_equals(st_collectionextract(st_makevalid(orig),2), st_collectionextract(valid,2)) AND + st_equals(st_collectionextract(st_makevalid(orig),3), st_collectionextract(valid,3)), + st_isvalid(st_makevalid(orig)), -- paranoia + (st_isvaliddetail(orig)).valid + FROM clean_cases; + + +SELECT '#1719.1', ST_AsEWKT(ST_MakeValid('POINT(0 0)')); + +DROP TABLE clean_cases; diff -Nru postgis-1.5.3/regress/clean_expected postgis-2.0.1/regress/clean_expected --- postgis-1.5.3/regress/clean_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/clean_expected 2012-03-27 14:32:33.000000000 +0000 @@ -0,0 +1,29 @@ +RT|1|t|t|f +RT|2|t|t|f +RT|3|t|t|f +RT|4|t|t|f +RT|5|t|t|f +RT|6|t|t|f +RT|7|t|t|f +RT|7.1|t|t|f +RT|8|t|t|f +RT|9|t|t|f +RT|9.1|t|t|f +RT|10|t|t|t +RT|11|t|t|f +RT|12|t|t|f +RT|13.1|t|t|t +RT|13.2|t|t|f +RT|14|t|t|f +RT|15|t|t|f +RT|16.1|t|t|f +RT|16.2|t|t|f +RT|16.3|t|t|f +RT|16.4|t|t|f +RT|17.1|t|t|f +PG|1|t|t|f +PG|2|t|t|f +PG|3|t|t|f +PG|4|t|t|f +PG|5|t|t|f +#1719.1|POINT(0 0) diff -Nru postgis-1.5.3/regress/concave_hull.sql postgis-2.0.1/regress/concave_hull.sql --- postgis-1.5.3/regress/concave_hull.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/concave_hull.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,42 @@ +-- $Id: concave_hull.sql 9324 2012-02-27 22:08:12Z pramsey $ +-- Tests to confirm the concave hull area is <= convex hull and +-- covers the original geometry (can't use covers because always gives topo errors with 3.3 +SELECT + 'ST_ConcaveHull MultiPolygon 0.95', ST_Area(ST_Intersection(geom,ST_ConcaveHull( + geom, 0.95) )) = ST_Area(geom) As encloses_geom, + (ST_Area(ST_ConvexHull(geom)) + - ST_Area(ST_ConcaveHull(geom, 0.95))) < (0.95 * ST_Area(ST_ConvexHull(geom) ) ) As reached_target +FROM ST_Union(ST_GeomFromText('POLYGON((175 150, 20 40, + 50 60, 125 100, 175 150))'), + ST_Buffer(ST_GeomFromText('POINT(110 170)'), 20) + ) As geom; + +SELECT + 'ST_ConcaveHull Lines 0.80', ST_Intersection(geom,ST_ConcaveHull( + geom, 0.80) ) = geom As encloses_geom, + (ST_Area(ST_ConvexHull(geom)) + - ST_Area(ST_ConcaveHull(geom, 0.80))) < (0.80 * ST_Area(ST_ConvexHull(geom) ) ) As reached_target + +FROM ST_GeomFromText('MULTILINESTRING((106 164,30 112,74 70,82 112,130 94, + 130 62,122 40,156 32,162 76,172 88), +(132 178,134 148,128 136,96 128,132 108,150 130, +170 142,174 110,156 96,158 90,158 88), +(22 64,66 28,94 38,94 68,114 76,112 30, +132 10,168 18,178 34,186 52,184 74,190 100, +190 122,182 148,178 170,176 184,156 164,146 178, +132 186,92 182,56 158,36 150,62 150,76 128,88 118))') As geom; + +-- test holes vs. no holes - holes should still enclose but have smaller area than no holes -- +SELECT + 'ST_ConcaveHull Lines 0.80 holes', ST_Intersection(geom,ST_ConcaveHull( + geom, 0.80, true) ) = geom As encloses_geom, + ST_Area(ST_ConcaveHull(geom, 0.80, true)) < ST_Area(ST_ConcaveHull(geom, 0.80)) As reached_target + +FROM ST_GeomFromText('MULTILINESTRING((106 164,30 112,74 70,82 112,130 94, + 130 62,122 40,156 32,162 76,172 88), +(132 178,134 148,128 136,96 128,132 108,150 130, +170 142,174 110,156 96,158 90,158 88), +(22 64,66 28,94 38,94 68,114 76,112 30, +132 10,168 18,178 34,186 52,184 74,190 100, +190 122,182 148,178 170,176 184,156 164,146 178, +132 186,92 182,56 158,36 150,62 150,76 128,88 118))') As geom; diff -Nru postgis-1.5.3/regress/concave_hull_expected postgis-2.0.1/regress/concave_hull_expected --- postgis-1.5.3/regress/concave_hull_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/concave_hull_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,3 @@ +ST_ConcaveHull MultiPolygon 0.95|t|t +ST_ConcaveHull Lines 0.80|t|t +ST_ConcaveHull Lines 0.80 holes|t|t diff -Nru postgis-1.5.3/regress/ctors.sql postgis-2.0.1/regress/ctors.sql --- postgis-1.5.3/regress/ctors.sql 2007-06-04 23:06:28.000000000 +0000 +++ postgis-2.0.1/regress/ctors.sql 2012-02-27 22:08:12.000000000 +0000 @@ -1,30 +1,27 @@ --- postgis-users/2006-July/012764.html -SELECT SRID(collect('SRID=32749;POINT(0 0)', 'SRID=32749;POINT(1 1)')); - -SELECT collect('SRID=32749;POINT(0 0)', 'SRID=32740;POINT(1 1)'); - -select asewkt(makeline('SRID=3;POINT(0 0)', 'SRID=3;POINT(1 1)')); -select makeline('POINT(0 0)', 'SRID=3;POINT(1 1)'); - --- postgis-users/2006-July/012788.html -select makebox2d('SRID=3;POINT(0 0)', 'SRID=3;POINT(1 1)'); -select makebox2d('POINT(0 0)', 'SRID=3;POINT(1 1)'); - -select makebox3d('SRID=3;POINT(0 0)', 'SRID=3;POINT(1 1)'); -select makebox3d('POINT(0 0)', 'SRID=3;POINT(1 1)'); - -- Repeat all tests with the new function names. -- postgis-users/2006-July/012764.html -SELECT ST_SRID(collect('SRID=32749;POINT(0 0)', 'SRID=32749;POINT(1 1)')); +SELECT ST_SRID(ST_Collect('SRID=32749;POINT(0 0)', 'SRID=32749;POINT(1 1)')); -SELECT ST_collect('SRID=32749;POINT(0 0)', 'SRID=32740;POINT(1 1)'); +SELECT ST_Collect('SRID=32749;POINT(0 0)', 'SRID=32740;POINT(1 1)'); -select ST_asewkt(makeline('SRID=3;POINT(0 0)', 'SRID=3;POINT(1 1)')); +select ST_asewkt(ST_makeline('SRID=3;POINT(0 0)', 'SRID=3;POINT(1 1)')); select ST_makeline('POINT(0 0)', 'SRID=3;POINT(1 1)'); +select 'ST_MakeLine1', ST_AsText(ST_MakeLine( + 'POINT(0 0)'::geometry, + 'LINESTRING(1 1, 10 0)'::geometry +)); + +select 'ST_MakeLine_agg1', ST_AsText(ST_MakeLine(g)) from ( + values ('POINT(0 0)'), + ('LINESTRING(1 1, 10 0)'), + ('LINESTRING(10 0, 20 20)'), + ('POINT(40 4)') +) as foo(g); + -- postgis-users/2006-July/012788.html select ST_makebox2d('SRID=3;POINT(0 0)', 'SRID=3;POINT(1 1)'); select ST_makebox2d('POINT(0 0)', 'SRID=3;POINT(1 1)'); -select ST_makebox3d('SRID=3;POINT(0 0)', 'SRID=3;POINT(1 1)'); -select ST_makebox3d('POINT(0 0)', 'SRID=3;POINT(1 1)'); +select ST_3DMakeBox('SRID=3;POINT(0 0)', 'SRID=3;POINT(1 1)'); +select ST_3DMakeBox('POINT(0 0)', 'SRID=3;POINT(1 1)'); diff -Nru postgis-1.5.3/regress/ctors_expected postgis-2.0.1/regress/ctors_expected --- postgis-1.5.3/regress/ctors_expected 2010-12-14 13:14:14.000000000 +0000 +++ postgis-2.0.1/regress/ctors_expected 2012-02-27 22:08:12.000000000 +0000 @@ -2,14 +2,8 @@ ERROR: Operation on mixed SRID geometries SRID=3;LINESTRING(0 0,1 1) ERROR: Operation on mixed SRID geometries -BOX(0 0,1 1) -ERROR: Operation on mixed SRID geometries -BOX3D(0 0 0,1 1 0) -ERROR: Operation on mixed SRID geometries -32749 -ERROR: Operation on mixed SRID geometries -SRID=3;LINESTRING(0 0,1 1) -ERROR: Operation on mixed SRID geometries +ST_MakeLine1|LINESTRING(0 0,1 1,10 0) +ST_MakeLine_agg1|LINESTRING(0 0,1 1,10 0,20 20,40 4) BOX(0 0,1 1) ERROR: Operation on mixed SRID geometries BOX3D(0 0 0,1 1 0) diff -Nru postgis-1.5.3/regress/dump.sql postgis-2.0.1/regress/dump.sql --- postgis-1.5.3/regress/dump.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/dump.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,180 @@ +SELECT 't1', path, ST_AsText(geom) +FROM ( + SELECT (ST_Dump(g.geom)).* + FROM + (SELECT + 'POINT (0 9)'::geometry AS geom + ) AS g + ) j; + +SELECT 't2', path, ST_AsText(geom) +FROM ( + SELECT (ST_Dump(g.geom)).* + FROM + (SELECT + 'LINESTRING ( + 0 0, + 0 9, + 9 9, + 9 0, + 0 0 + )'::geometry AS geom + ) AS g + ) j; + +SELECT 't3', path, ST_AsText(geom) +FROM ( + SELECT (ST_Dump(g.geom)).* + FROM + (SELECT + 'POLYGON (( + 0 0, + 0 9, + 9 9, + 9 0, + 0 0 + ))'::geometry AS geom + ) AS g + ) j; + +SELECT 't4', path, ST_AsText(geom) +FROM ( + SELECT (ST_Dump(g.geom)).* + FROM + (SELECT + 'TRIANGLE (( + 0 0, + 0 9, + 9 0, + 0 0 + ))'::geometry AS geom + ) AS g + ) j; + +SELECT 't5', path, ST_AsText(geom) +FROM ( + SELECT (ST_Dump(g.geom)).* + FROM + (SELECT + 'POLYGON (( + 0 0, + 0 9, + 9 9, + 9 0, + 0 0 + ), ( + 1 1, + 1 3, + 3 2, + 1 1 + ), ( + 7 6, + 6 8, + 8 8, + 7 6 + ))'::geometry AS geom + ) AS g + ) j; + +SELECT 't6', path, ST_AsText(geom) +FROM ( + SELECT (ST_Dump(g.geom)).* + FROM + (SELECT + 'MULTIPOLYGON ((( + 0 0, + 0 3, + 4 3, + 4 0, + 0 0 + )), (( + 2 4, + 1 6, + 4 5, + 2 4 + ), ( + 7 6, + 6 8, + 8 8, + 7 6 + )))'::geometry AS geom + ) AS g + ) j; + +SELECT 't7', path, ST_AsEWKT(geom) +FROM ( + SELECT (ST_Dump(g.geom)).* + FROM + (SELECT + 'POLYHEDRALSURFACE ((( + 0 0 0, + 0 0 1, + 0 1 1, + 0 1 0, + 0 0 0 + )), (( + 0 0 0, + 0 1 0, + 1 1 0, + 1 0 0, + 0 0 0 + )) + )'::geometry AS geom + ) AS g + ) j; + +SELECT 't8', path, ST_AsEWKT(geom) +FROM ( + SELECT (ST_Dump(g.geom)).* + FROM + (SELECT + 'TIN ((( + 0 0 0, + 0 0 1, + 0 1 0, + 0 0 0 + )), (( + 0 0 0, + 0 1 0, + 1 1 0, + 0 0 0 + )) + )'::geometry AS geom + ) AS g + ) j; + +SELECT 't9', path, ST_AsText(geom) +FROM ( + SELECT (ST_Dump(g.geom)).* + FROM + (SELECT + 'GEOMETRYCOLLECTION( + POINT(99 98), + LINESTRING(1 1, 3 3), + POLYGON((0 0, 0 1, 1 1, 0 0)), + POLYGON((0 0, 0 9, 9 9, 9 0, 0 0), (5 5, 5 6, 6 6, 5 5)), + MULTIPOLYGON(((0 0, 0 9, 9 9, 9 0, 0 0), (5 5, 5 6, 6 6, 5 5))) + )'::geometry AS geom + ) AS g + ) j; + +SELECT 't10', count(*) +FROM ST_Dump(' +GEOMETRYCOLLECTION EMPTY +'); + +SELECT 't11', count(*) +FROM ST_Dump(' +GEOMETRYCOLLECTION ( + GEOMETRYCOLLECTION EMPTY, + POINT EMPTY, + LINESTRING EMPTY, + POLYGON EMPTY, + MULTIPOINT EMPTY, + MULTILINESTRING EMPTY, + MULTIPOLYGON EMPTY, + GEOMETRYCOLLECTION ( + GEOMETRYCOLLECTION EMPTY + ) +) +'); diff -Nru postgis-1.5.3/regress/dump_expected postgis-2.0.1/regress/dump_expected --- postgis-1.5.3/regress/dump_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/dump_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,18 @@ +t1|{}|POINT(0 9) +t2|{}|LINESTRING(0 0,0 9,9 9,9 0,0 0) +t3|{}|POLYGON((0 0,0 9,9 9,9 0,0 0)) +t4|{}|TRIANGLE((0 0,0 9,9 0,0 0)) +t5|{}|POLYGON((0 0,0 9,9 9,9 0,0 0),(1 1,1 3,3 2,1 1),(7 6,6 8,8 8,7 6)) +t6|{1}|POLYGON((0 0,0 3,4 3,4 0,0 0)) +t6|{2}|POLYGON((2 4,1 6,4 5,2 4),(7 6,6 8,8 8,7 6)) +t7|{1}|POLYGON((0 0 0,0 0 1,0 1 1,0 1 0,0 0 0)) +t7|{2}|POLYGON((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)) +t8|{1}|TRIANGLE((0 0 0,0 0 1,0 1 0,0 0 0)) +t8|{2}|TRIANGLE((0 0 0,0 1 0,1 1 0,0 0 0)) +t9|{1}|POINT(99 98) +t9|{2}|LINESTRING(1 1,3 3) +t9|{3}|POLYGON((0 0,0 1,1 1,0 0)) +t9|{4}|POLYGON((0 0,0 9,9 9,9 0,0 0),(5 5,5 6,6 6,5 5)) +t9|{5,1}|POLYGON((0 0,0 9,9 9,9 0,0 0),(5 5,5 6,6 6,5 5)) +t10|0 +t11|0 diff -Nru postgis-1.5.3/regress/dumppoints.sql postgis-2.0.1/regress/dumppoints.sql --- postgis-1.5.3/regress/dumppoints.sql 2009-11-16 19:47:33.000000000 +0000 +++ postgis-2.0.1/regress/dumppoints.sql 2012-02-27 22:08:12.000000000 +0000 @@ -37,6 +37,19 @@ ) AS g ) j; +SELECT path, ST_AsText(geom) +FROM ( + SELECT (ST_DumpPoints(g.geom)).* + FROM + (SELECT + 'TRIANGLE (( + 0 0, + 0 9, + 9 0, + 0 0 + ))'::geometry AS geom + ) AS g + ) j; SELECT path, ST_AsText(geom) FROM ( @@ -88,6 +101,48 @@ ) AS g ) j; +SELECT path, ST_AsEWKT(geom) +FROM ( + SELECT (ST_DumpPoints(g.geom)).* + FROM + (SELECT + 'POLYHEDRALSURFACE ((( + 0 0 0, + 0 0 1, + 0 1 1, + 0 1 0, + 0 0 0 + )), (( + 0 0 0, + 0 1 0, + 1 1 0, + 1 0 0, + 0 0 0 + )) + )'::geometry AS geom + ) AS g + ) j; + +SELECT path, ST_AsEWKT(geom) +FROM ( + SELECT (ST_DumpPoints(g.geom)).* + FROM + (SELECT + 'TIN ((( + 0 0 0, + 0 0 1, + 0 1 0, + 0 0 0 + )), (( + 0 0 0, + 0 1 0, + 1 1 0, + 0 0 0 + )) + )'::geometry AS geom + ) AS g + ) j; + SELECT path, ST_AsText(geom) FROM ( SELECT (ST_DumpPoints(g.geom)).* diff -Nru postgis-1.5.3/regress/dumppoints_expected postgis-2.0.1/regress/dumppoints_expected --- postgis-1.5.3/regress/dumppoints_expected 2010-12-14 13:14:14.000000000 +0000 +++ postgis-2.0.1/regress/dumppoints_expected 2012-02-27 22:08:12.000000000 +0000 @@ -11,6 +11,10 @@ {1,5}|POINT(0 0) {1,1}|POINT(0 0) {1,2}|POINT(0 9) +{1,3}|POINT(9 0) +{1,4}|POINT(0 0) +{1,1}|POINT(0 0) +{1,2}|POINT(0 9) {1,3}|POINT(9 9) {1,4}|POINT(9 0) {1,5}|POINT(0 0) @@ -35,6 +39,24 @@ {2,2,2}|POINT(6 8) {2,2,3}|POINT(8 8) {2,2,4}|POINT(7 6) +{1,1,1}|POINT(0 0 0) +{1,1,2}|POINT(0 0 1) +{1,1,3}|POINT(0 1 1) +{1,1,4}|POINT(0 1 0) +{1,1,5}|POINT(0 0 0) +{2,1,1}|POINT(0 0 0) +{2,1,2}|POINT(0 1 0) +{2,1,3}|POINT(1 1 0) +{2,1,4}|POINT(1 0 0) +{2,1,5}|POINT(0 0 0) +{1,1,1}|POINT(0 0 0) +{1,1,2}|POINT(0 0 1) +{1,1,3}|POINT(0 1 0) +{1,1,4}|POINT(0 0 0) +{2,1,1}|POINT(0 0 0) +{2,1,2}|POINT(0 1 0) +{2,1,3}|POINT(1 1 0) +{2,1,4}|POINT(0 0 0) {1,1}|POINT(99 98) {2,1}|POINT(1 1) {2,2}|POINT(3 3) diff -Nru postgis-1.5.3/regress/empty.sql postgis-2.0.1/regress/empty.sql --- postgis-1.5.3/regress/empty.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/empty.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,145 @@ +-- ST_SnapToGrid +SELECT 'T1.1', ST_AsEWKT(ST_SnapToGrid('POINT EMPTY', 1)); +SELECT 'T1.2', ST_AsEWKT(ST_SnapToGrid('LINESTRING EMPTY', 1)); +SELECT 'T1.3', ST_AsEWKT(ST_SnapToGrid('SRID=4326;POLYGON EMPTY', 1)); + +-- ST_Buffer +SELECT 'T2.1', ST_AsEWKT(ST_Buffer('SRID=4326;POINT EMPTY', 0)); +SELECT 'T2.2', ST_AsEWKT(ST_Buffer('SRID=4326;LINESTRING EMPTY', 0)); +SELECT 'T2.3', ST_AsEWKT(ST_Buffer('SRID=4326;MULTIPOLYGON EMPTY', 0)); +WITH b as ( SELECT ST_Buffer('SRID=4326;MULTIPOINT EMPTY', 1) as g ) +SELECT 'T2.4', ST_Srid(g), GeometryType(g) from b; + +-- ST_AsGML (output may need some tweaking) +SELECT 'T3.1', ST_AsGML('POINT EMPTY'); +SELECT 'T3.2', ST_AsGML('LINESTRING EMPTY'); +SELECT 'T3.3', ST_AsGML('POLYGON EMPTY'); +SELECT 'T3.4', ST_AsGML('MULTIPOLYGON EMPTY'); +SELECT 'T3.5', ST_AsGML('MULTILINESTRING EMPTY'); +SELECT 'T3.6', ST_AsGML('GEOMETRYCOLLECTION EMPTY'); +SELECT 'T3.7', ST_AsGML(3,'POINT EMPTY'::geometry); +SELECT 'T3.8', ST_AsGML(3,'LINESTRING EMPTY'::geometry); +SELECT 'T3.9', ST_AsGML(3,'POLYGON EMPTY'::geometry); +SELECT 'T3.10', ST_AsGML(3,'MULTIPOLYGON EMPTY'::geometry); +SELECT 'T3.11', ST_AsGML(3,'MULTILINESTRING EMPTY'::geometry); +SELECT 'T3.12', ST_AsGML(3,'GEOMETRYCOLLECTION EMPTY'::geometry); +SELECT 'T3.13', ST_AsGML(3,'POINT EMPTY'::geometry); +SELECT 'T3.14', ST_AsGML(3,'LINESTRING EMPTY'::geometry); +SELECT 'T3.15', ST_AsGML(3,'POLYGON EMPTY'::geometry); +SELECT 'T3.16', ST_AsGML(3,'MULTIPOLYGON EMPTY'::geometry); +SELECT 'T3.17', ST_AsGML(3,'MULTILINESTRING EMPTY'::geometry); +SELECT 'T3.18', ST_AsGML(3,'GEOMETRYCOLLECTION EMPTY'::geometry); + +-- See http://trac.osgeo.org/postgis/wiki/DevWikiEmptyGeometry + +WITH inp AS (SELECT + 'POLYGON EMPTY'::geometry as empty, + 'POLYGON((0 0, 10 0, 5 5, 0 0))'::geometry as geometry, + 120 as tolerance + ) SELECT 'ST_Buffer(empty, tolerance) == empty', ST_Buffer(empty, tolerance) FROM inp; +WITH inp AS (SELECT + 'POLYGON EMPTY'::geometry as empty, + 'POLYGON((0 0, 10 0, 5 5, 0 0))'::geometry as geometry + ) SELECT 'ST_Union(geometry, empty) == geometry', ST_Union(geometry, empty) FROM inp; +WITH inp AS (SELECT + 'POLYGON EMPTY'::geometry as empty + ) SELECT 'ST_Union(empty, empty) == empty', ST_Union(empty, empty) FROM inp; +WITH inp AS (SELECT + 'POLYGON EMPTY'::geometry as empty, + 'POLYGON((0 0, 10 0, 5 5, 0 0))'::geometry as geometry + ) SELECT 'ST_Intersection(geometry, empty) == geometry', ST_Intersection(geometry, empty) FROM inp; +WITH inp AS (SELECT + 'POLYGON EMPTY'::geometry as empty + ) SELECT 'ST_Intersection(empty, empty) == empty', ST_Intersection(empty, empty) FROM inp; +WITH inp AS (SELECT + 'POLYGON EMPTY'::geometry as empty, + 'POLYGON((0 0, 10 0, 5 5, 0 0))'::geometry as geometry + ) SELECT 'ST_Difference(geometry, empty) == geometry', ST_Difference(geometry, empty) FROM inp; +WITH inp AS (SELECT + 'POLYGON EMPTY'::geometry as empty, + 'POLYGON((0 0, 10 0, 5 5, 0 0))'::geometry as geometry + ) SELECT 'ST_Difference(empty, geometry) == empty', ST_Difference(empty, geometry) FROM inp; +WITH inp AS (SELECT + 'POLYGON EMPTY'::geometry as empty, + 'POLYGON((0 0, 10 0, 5 5, 0 0))'::geometry as geometry + ) SELECT 'ST_Distance(geometry, empty) == NULL', ST_Distance(geometry, empty) FROM inp; +WITH inp AS (SELECT + 'POLYGON EMPTY'::geometry as empty, + 'POLYGON((0 0, 10 0, 5 5, 0 0))'::geometry as geometry, + 120 as tolerance + ) SELECT 'ST_DWithin(geometry, empty, tolerance) == FALSE', ST_DWithin(geometry, empty, tolerance) FROM inp; +WITH inp AS (SELECT + 'POLYGON EMPTY'::geometry as empty, + 'POLYGON((0 0, 10 0, 5 5, 0 0))'::geometry as geometry + ) SELECT 'ST_Within(geometry, empty) == FALSE', ST_Within(geometry, empty) FROM inp; +WITH inp AS (SELECT + 'POLYGON EMPTY'::geometry as empty, + 'POLYGON((0 0, 10 0, 5 5, 0 0))'::geometry as geometry + ) SELECT 'ST_Contains(empty, geometry) == FALSE', ST_Contains(empty, geometry) FROM inp; +WITH inp AS (SELECT + 'POLYGON EMPTY'::geometry as empty, + 'POLYGON((0 0, 10 0, 5 5, 0 0))'::geometry as geometry + ) SELECT 'ST_Within(empty, geometry) == FALSE', ST_Within(empty, geometry) FROM inp; +WITH inp AS (SELECT + 'POLYGON EMPTY'::geometry as empty + ) SELECT 'ST_Contains(empty, empty) == FALSE', ST_Contains(empty, empty) FROM inp; +WITH inp AS (SELECT + 'POLYGON EMPTY'::geometry as empty, + 'POLYGON((0 0, 10 0, 5 5, 0 0))'::geometry as geometry + ) SELECT 'ST_Intersects(geometry, empty) == FALSE', ST_Intersects(geometry, empty) FROM inp; +WITH inp AS (SELECT + 'POLYGON EMPTY'::geometry as empty + ) SELECT 'ST_Intersects(empty, empty) == FALSE', ST_Intersects(empty, empty) FROM inp; +WITH inp AS (SELECT + 'POLYGON EMPTY'::geometry as empty, + 'POLYGON((0 0, 10 0, 5 5, 0 0))'::geometry as geometry + ) SELECT 'ST_Disjoint(empty, empty) == TRUE', ST_Disjoint(empty, empty) FROM inp; +WITH inp AS (SELECT + 'POLYGON EMPTY'::geometry as empty, + 'POLYGON((0 0, 10 0, 5 5, 0 0))'::geometry as geometry + ) SELECT 'ST_Disjoint(geometry, empty) == TRUE', ST_Disjoint(geometry, empty) FROM inp; +WITH inp AS (SELECT + 'POLYGON EMPTY'::geometry as empty1, + 'POINT Z EMPTY'::geometry as empty2 + ) SELECT 'ST_Equals(empty1, empty2) == TRUE', ST_Equals(empty1, empty2) FROM inp; +WITH inp AS (SELECT + 'POLYGON EMPTY'::geometry as empty + ) SELECT 'ST_IsSimple(empty) == TRUE', ST_IsSimple(empty) FROM inp; +WITH inp AS (SELECT + 'POLYGON EMPTY'::geometry as empty + ) SELECT 'ST_IsValid(empty) == TRUE', ST_IsValid(empty) FROM inp; +WITH inp AS (SELECT + 'POLYGON EMPTY'::geometry as empty + ) SELECT 'ST_NumGeometries(empty) == 0', ST_NumGeometries(empty) FROM inp; +WITH inp AS (SELECT + 'POLYGON EMPTY'::geometry as empty + ) SELECT 'ST_NRings(empty) == 0', ST_NRings(empty) FROM inp; +WITH inp AS (SELECT + 'LINESTRING EMPTY'::geometry as empty + ) SELECT 'ST_NumPoints(empty) == 0', ST_NumPoints(empty) FROM inp; +WITH inp AS (SELECT + 'POLYGON EMPTY'::geometry as empty + ) SELECT 'ST_NPoints(empty) == 0', ST_NPoints(empty) FROM inp; +WITH inp AS (SELECT + 'POLYGON EMPTY'::geometry as empty, + 1 as n + ) SELECT 'ST_GeometryN(empty, n) == empty', ST_GeometryN(empty, n) FROM inp; +WITH inp AS (SELECT + 'POLYGON EMPTY'::geometry as empty + ) SELECT 'ST_ExteriorRing(empty) == empty', ST_ExteriorRing(empty) FROM inp; +WITH inp AS (SELECT + 'POLYGON EMPTY'::geometry as empty, + 1 as n + ) SELECT 'ST_InteriorRingN(empty, n) == NULL', ST_InteriorRingN(empty, n) FROM inp; +WITH inp AS (SELECT + 'POLYGON EMPTY'::geometry as empty + ) SELECT 'ST_Area(empty) == 0', ST_Area(empty) FROM inp; +WITH inp AS (SELECT + 'LINESTRING EMPTY'::geometry as empty + ) SELECT 'ST_Length(empty) == 0', ST_Length(empty) FROM inp; + + +-- Operators + +-- same box, see http://trac.osgeo.org/postgis/ticket/1453 +SELECT '~=', 'POINT EMPTY'::geometry ~= 'POINT EMPTY'::geometry; diff -Nru postgis-1.5.3/regress/empty_expected postgis-2.0.1/regress/empty_expected --- postgis-1.5.3/regress/empty_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/empty_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,55 @@ +T1.1|POINT EMPTY +T1.2|LINESTRING EMPTY +T1.3|SRID=4326;POLYGON EMPTY +T2.1|SRID=4326;POLYGON EMPTY +T2.2|SRID=4326;POLYGON EMPTY +T2.3|SRID=4326;POLYGON EMPTY +T2.4|4326|POLYGON +T3.1| +T3.2| +T3.3| +T3.4| +T3.5| +T3.6| +T3.7| +T3.8| +T3.9| +T3.10| +T3.11| +T3.12| +T3.13| +T3.14| +T3.15| +T3.16| +T3.17| +T3.18| +ST_Buffer(empty, tolerance) == empty|010300000000000000 +ST_Union(geometry, empty) == geometry|0103000000010000000400000000000000000000000000000000000000000000000000244000000000000000000000000000001440000000000000144000000000000000000000000000000000 +ST_Union(empty, empty) == empty|010300000000000000 +ST_Intersection(geometry, empty) == geometry|010300000000000000 +ST_Intersection(empty, empty) == empty|010300000000000000 +ST_Difference(geometry, empty) == geometry|0103000000010000000400000000000000000000000000000000000000000000000000244000000000000000000000000000001440000000000000144000000000000000000000000000000000 +ST_Difference(empty, geometry) == empty|010300000000000000 +ST_Distance(geometry, empty) == NULL| +ST_DWithin(geometry, empty, tolerance) == FALSE|f +ST_Within(geometry, empty) == FALSE|f +ST_Contains(empty, geometry) == FALSE|f +ST_Within(empty, geometry) == FALSE|f +ST_Contains(empty, empty) == FALSE|f +ST_Intersects(geometry, empty) == FALSE|f +ST_Intersects(empty, empty) == FALSE|f +ST_Disjoint(empty, empty) == TRUE|t +ST_Disjoint(geometry, empty) == TRUE|t +ST_Equals(empty1, empty2) == TRUE|t +ST_IsSimple(empty) == TRUE|t +ST_IsValid(empty) == TRUE|t +ST_NumGeometries(empty) == 0|0 +ST_NRings(empty) == 0|0 +ST_NumPoints(empty) == 0|0 +ST_NPoints(empty) == 0|0 +ST_GeometryN(empty, n) == empty|010300000000000000 +ST_ExteriorRing(empty) == empty|010200000000000000 +ST_InteriorRingN(empty, n) == NULL| +ST_Area(empty) == 0|0 +ST_Length(empty) == 0|0 +~=|t diff -Nru postgis-1.5.3/regress/geojson.sql postgis-2.0.1/regress/geojson.sql --- postgis-1.5.3/regress/geojson.sql 2009-03-10 19:30:52.000000000 +0000 +++ postgis-2.0.1/regress/geojson.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,205 +0,0 @@ --- --- spatial_ref_sys data --- -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"]],TOWGS84[0,0,0,0,0,0,0],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 27572 : NTF (Paris) / Lambert zone II -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27572,'EPSG',27572,'PROJCS["NTF (Paris) / Lambert zone II",GEOGCS["NTF (Paris)",DATUM["Nouvelle_Triangulation_Francaise_Paris",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936269,AUTHORITY["EPSG","7011"]],TOWGS84[-168,-60,320,0,0,0,0],AUTHORITY["EPSG","6807"]],PRIMEM["Paris",2.33722917,AUTHORITY["EPSG","8903"]],UNIT["grad",0.01570796326794897,AUTHORITY["EPSG","9105"]],AUTHORITY["EPSG","4807"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",52],PARAMETER["central_meridian",0],PARAMETER["scale_factor",0.99987742],PARAMETER["false_easting",600000],PARAMETER["false_northing",2200000],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","27572"]]','+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs '); ---- EPSG 31467 : DHDN / Gauss-Kruger zone 3 -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31467,'EPSG',31467,'PROJCS["DHDN / Gauss-Kruger zone 3",GEOGCS["DHDN",DATUM["Deutsches_Hauptdreiecksnetz",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6314"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4314"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",1],PARAMETER["false_easting",3500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","31467"]]','+proj=tmerc +lat_0=0 +lon_0=9 +k=1.000000 +x_0=3500000 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs '); - - --- Simple output -SELECT 'simple_point', ST_AsGeoJson(GeomFromEWKT('POINT(1 1)')); - - --- Empty Geometry -SELECT 'empty_geom', ST_AsGeoJson(GeomFromEWKT(NULL)); - - --- Precision -SELECT 'precision_01', ST_AsGeoJson(GeomFromEWKT('SRID=4326;POINT(1.1111111 1.1111111)'), 0); -SELECT 'precision_02', ST_AsGeoJson(GeomFromEWKT('SRID=4326;POINT(1.1111111 1.1111111)'), 3); -SELECT 'precision_03', ST_AsGeoJson(GeomFromEWKT('SRID=4326;POINT(1.1111111 1.1111111)'), -2); -SELECT 'precision_04', ST_AsGeoJson(GeomFromEWKT('SRID=4326;POINT(1.1111111 1.1111111)'), 19); - - --- Version -SELECT 'version_01', ST_AsGeoJson(1, GeomFromEWKT('SRID=4326;POINT(1 1)')); -SELECT 'version_02', ST_AsGeoJson(21, GeomFromEWKT('SRID=4326;POINT(1 1)')); -SELECT 'version_03', ST_AsGeoJson(-4, GeomFromEWKT('SRID=4326;POINT(1 1)')); - - --- Short CRS -SELECT 'crs_01', ST_AsGeoJson(GeomFromEWKT('SRID=4326;POINT(1 1)'), 0, 2); -SELECT 'crs_02', ST_AsGeoJson(GeomFromEWKT('SRID=-1;POINT(1 1)'), 0, 2); -SELECT 'crs_03', ST_AsGeoJson(GeomFromEWKT('SRID=27572;POINT(600000 2430000)'), 0, 2); -SELECT 'crs_04', ST_AsGeoJson(GeomFromEWKT('SRID=100000;POINT(600000 2430000)'), 0, 2); - --- Long CRS -SELECT 'crs_05', ST_AsGeoJson(GeomFromEWKT('SRID=4326;POINT(1 1)'), 0, 4); -SELECT 'crs_06', ST_AsGeoJson(GeomFromEWKT('SRID=-1;POINT(1 1)'), 0, 4); -SELECT 'crs_07', ST_AsGeoJson(GeomFromEWKT('SRID=27572;POINT(600000 2430000)'), 0, 4); - --- Bbox -SELECT 'bbox_01', ST_AsGeoJson(GeomFromEWKT('LINESTRING(1 1, 2 2, 3 3, 4 4)'), 0); -SELECT 'bbox_02', ST_AsGeoJson(GeomFromEWKT('LINESTRING(1 1, 2 2, 3 3, 4 4)'), 0, 1); -SELECT 'bbox_03', ST_AsGeoJson(GeomFromEWKT('LINESTRING(1 1, 2 2, 3 3, 4 4)'), 0, 3); -SELECT 'bbox_04', ST_AsGeoJson(GeomFromEWKT('LINESTRING(1 1, 2 2, 3 3, 4 4)'), 0, 5); - - --- CRS and Bbox -SELECT 'options_01', ST_AsGeoJson(GeomFromEWKT('SRID=-1;LINESTRING(1 1, 2 2, 3 3, 4 4)'), 0, 0); -SELECT 'options_02', ST_AsGeoJson(GeomFromEWKT('SRID=4326;LINESTRING(1 1, 2 2, 3 3, 4 4)'), 0); -SELECT 'options_03', ST_AsGeoJson(GeomFromEWKT('SRID=-1;LINESTRING(1 1, 2 2, 3 3, 4 4)'), 0, 1); -SELECT 'options_04', ST_AsGeoJson(GeomFromEWKT('SRID=4326;LINESTRING(1 1, 2 2, 3 3, 4 4)'), 0, 1); -SELECT 'options_05', ST_AsGeoJson(GeomFromEWKT('SRID=-1;LINESTRING(1 1, 2 2, 3 3, 4 4)'), 0, 2); -SELECT 'options_06', ST_AsGeoJson(GeomFromEWKT('SRID=4326;LINESTRING(1 1, 2 2, 3 3, 4 4)'), 0, 2); -SELECT 'options_07', ST_AsGeoJson(GeomFromEWKT('SRID=-1;LINESTRING(1 1, 2 2, 3 3, 4 4)'), 0, 3); -SELECT 'options_08', ST_AsGeoJson(GeomFromEWKT('SRID=4326;LINESTRING(1 1, 2 2, 3 3, 4 4)'), 0, 3); -SELECT 'options_09', ST_AsGeoJson(GeomFromEWKT('SRID=-1;LINESTRING(1 1, 2 2, 3 3, 4 4)'), 0, 4); -SELECT 'options_10', ST_AsGeoJson(GeomFromEWKT('SRID=4326;LINESTRING(1 1, 2 2, 3 3, 4 4)'), 0, 4); -SELECT 'options_10', ST_AsGeoJson(GeomFromEWKT('SRID=-1;LINESTRING(1 1, 2 2, 3 3, 4 4)'), 0, 5); -SELECT 'options_11', ST_AsGeoJson(GeomFromEWKT('SRID=4326;LINESTRING(1 1, 2 2, 3 3, 4 4)'), 0, 5); -SELECT 'options_12', ST_AsGeoJson(GeomFromEWKT('SRID=-1;LINESTRING(1 1, 2 2, 3 3, 4 4)'), 0, 6); -SELECT 'options_13', ST_AsGeoJson(GeomFromEWKT('SRID=4326;LINESTRING(1 1, 2 2, 3 3, 4 4)'), 0, 6); -SELECT 'options_14', ST_AsGeoJson(GeomFromEWKT('SRID=-1;LINESTRING(1 1, 2 2, 3 3, 4 4)'), 0, 7); -SELECT 'options_15', ST_AsGeoJson(GeomFromEWKT('SRID=4326;LINESTRING(1 1, 2 2, 3 3, 4 4)'), 0, 7); - - - --- --- Line --- - --- Geometry from frida project: -SELECT 'line_01', ST_AsGeoJson(GeomFromEWKT('LINESTRING(3429562.6 5799490.68,3429750.99 5799199.87,3429825.45 5799078.39,3429901.8 5798961.45,3429995.54 5798822.93,3430072.89 5798719.46,3430216 5798558.95,3430272.08 5798489.33,3430393.87 5798328.51,3430463.53 5798251.11,3430532.22 5798190.16,3430591.24 5798149.53,3430667.67 5798108.9,3430723.78 5798088.58,3430797.33 5798067.95,3430857.34 5798056.34,3430912.52 5798051.5,3430961.89 5798048.59,3431052.88 5798053.43,3431159.36 5798059.24,3431218.41 5798061.18,3431366.56 5798056.09,3431474.07 5798044.47,3431568.02 5798028.97,3431644.53 5798012.51)'), 2); - -SELECT 'line_02', ST_AsGeoJson(GeomFromEWKT('LINESTRING(3429562.6 5799490.68,3429750.99 5799199.87,3429825.45 5799078.39,3429901.8 5798961.45,3429995.54 5798822.93,3430072.89 5798719.46,3430216 5798558.95,3430272.08 5798489.33,3430393.87 5798328.51,3430463.53 5798251.11,3430532.22 5798190.16,3430591.24 5798149.53,3430667.67 5798108.9,3430723.78 5798088.58,3430797.33 5798067.95,3430857.34 5798056.34,3430912.52 5798051.5,3430961.89 5798048.59,3431052.88 5798053.43,3431159.36 5798059.24,3431218.41 5798061.18,3431366.56 5798056.09,3431474.07 5798044.47,3431568.02 5798028.97,3431644.53 5798012.51)'), 0); - -SELECT 'line_03', ST_AsGeoJson(GeomFromEWKT('LINESTRING(3429562.6 5799490.68,3429750.99 5799199.87,3429825.45 5799078.39,3429901.8 5798961.45,3429995.54 5798822.93,3430072.89 5798719.46,3430216 5798558.95,3430272.08 5798489.33,3430393.87 5798328.51,3430463.53 5798251.11,3430532.22 5798190.16,3430591.24 5798149.53,3430667.67 5798108.9,3430723.78 5798088.58,3430797.33 5798067.95,3430857.34 5798056.34,3430912.52 5798051.5,3430961.89 5798048.59,3431052.88 5798053.43,3431159.36 5798059.24,3431218.41 5798061.18,3431366.56 5798056.09,3431474.07 5798044.47,3431568.02 5798028.97,3431644.53 5798012.51)'), 0, 3); - -SELECT 'line_04', ST_AsGeoJson(GeomFromEWKT('SRID=31467;LINESTRING(3429562.6 5799490.68,3429750.99 5799199.87,3429825.45 5799078.39,3429901.8 5798961.45,3429995.54 5798822.93,3430072.89 5798719.46,3430216 5798558.95,3430272.08 5798489.33,3430393.87 5798328.51,3430463.53 5798251.11,3430532.22 5798190.16,3430591.24 5798149.53,3430667.67 5798108.9,3430723.78 5798088.58,3430797.33 5798067.95,3430857.34 5798056.34,3430912.52 5798051.5,3430961.89 5798048.59,3431052.88 5798053.43,3431159.36 5798059.24,3431218.41 5798061.18,3431366.56 5798056.09,3431474.07 5798044.47,3431568.02 5798028.97,3431644.53 5798012.51)'), 0, 2); - -SELECT 'line_05', ST_AsGeoJson(GeomFromEWKT('SRID=31467;LINESTRING(3429562.6 5799490.68,3429750.99 5799199.87,3429825.45 5799078.39,3429901.8 5798961.45,3429995.54 5798822.93,3430072.89 5798719.46,3430216 5798558.95,3430272.08 5798489.33,3430393.87 5798328.51,3430463.53 5798251.11,3430532.22 5798190.16,3430591.24 5798149.53,3430667.67 5798108.9,3430723.78 5798088.58,3430797.33 5798067.95,3430857.34 5798056.34,3430912.52 5798051.5,3430961.89 5798048.59,3431052.88 5798053.43,3431159.36 5798059.24,3431218.41 5798061.18,3431366.56 5798056.09,3431474.07 5798044.47,3431568.02 5798028.97,3431644.53 5798012.51)'), 0, 3); - - - - --- --- Polygon --- - --- Geometry from frida project: - -SELECT 'polygon_01', ST_AsGeoJson(GeomFromEWKT('POLYGON((3429857.62 5799440.07,3429873.86 5799496.16,3429904.86 5799503.55,3429972.77 5799561.12,3430034.77 5799577.36,3430031.82 5799639.36,3430139.59 5799691.03,3430146.97 5799724.99,3430271.57 5799792.88,3430289.29 5799776.64,3430312.91 5799662.95,3430416.27 5799710.2,3430419.22 5799614.22,3430268.61 5799612.75,3430291.3 5799203.76,3430255.86 5799175.7,3430214.51 5799347,3430183.49 5799355.87,3430180.54 5799366.2,3430146.57 5799367.68,3430142.14 5799349.96,3430065.35 5799375.06,3429961.97 5799426.75,3429857.62 5799440.07))'), 2); - -SELECT 'polygon_02', ST_AsGeoJson(GeomFromEWKT('POLYGON((3429857.62 5799440.07,3429873.86 5799496.16,3429904.86 5799503.55,3429972.77 5799561.12,3430034.77 5799577.36,3430031.82 5799639.36,3430139.59 5799691.03,3430146.97 5799724.99,3430271.57 5799792.88,3430289.29 5799776.64,3430312.91 5799662.95,3430416.27 5799710.2,3430419.22 5799614.22,3430268.61 5799612.75,3430291.3 5799203.76,3430255.86 5799175.7,3430214.51 5799347,3430183.49 5799355.87,3430180.54 5799366.2,3430146.57 5799367.68,3430142.14 5799349.96,3430065.35 5799375.06,3429961.97 5799426.75,3429857.62 5799440.07))'), 0); - -SELECT 'polygon_03', ST_AsGeoJson(GeomFromEWKT('POLYGON((3429857.62 5799440.07,3429873.86 5799496.16,3429904.86 5799503.55,3429972.77 5799561.12,3430034.77 5799577.36,3430031.82 5799639.36,3430139.59 5799691.03,3430146.97 5799724.99,3430271.57 5799792.88,3430289.29 5799776.64,3430312.91 5799662.95,3430416.27 5799710.2,3430419.22 5799614.22,3430268.61 5799612.75,3430291.3 5799203.76,3430255.86 5799175.7,3430214.51 5799347,3430183.49 5799355.87,3430180.54 5799366.2,3430146.57 5799367.68,3430142.14 5799349.96,3430065.35 5799375.06,3429961.97 5799426.75,3429857.62 5799440.07))'), 0, 3); - -SELECT 'polygon_04', ST_AsGeoJson(GeomFromEWKT('SRID=31467;POLYGON((3429857.62 5799440.07,3429873.86 5799496.16,3429904.86 5799503.55,3429972.77 5799561.12,3430034.77 5799577.36,3430031.82 5799639.36,3430139.59 5799691.03,3430146.97 5799724.99,3430271.57 5799792.88,3430289.29 5799776.64,3430312.91 5799662.95,3430416.27 5799710.2,3430419.22 5799614.22,3430268.61 5799612.75,3430291.3 5799203.76,3430255.86 5799175.7,3430214.51 5799347,3430183.49 5799355.87,3430180.54 5799366.2,3430146.57 5799367.68,3430142.14 5799349.96,3430065.35 5799375.06,3429961.97 5799426.75,3429857.62 5799440.07))'), 0, 2); - -SELECT 'polygon_05', ST_AsGeoJson(GeomFromEWKT('SRID=31467;POLYGON((3429857.62 5799440.07,3429873.86 5799496.16,3429904.86 5799503.55,3429972.77 5799561.12,3430034.77 5799577.36,3430031.82 5799639.36,3430139.59 5799691.03,3430146.97 5799724.99,3430271.57 5799792.88,3430289.29 5799776.64,3430312.91 5799662.95,3430416.27 5799710.2,3430419.22 5799614.22,3430268.61 5799612.75,3430291.3 5799203.76,3430255.86 5799175.7,3430214.51 5799347,3430183.49 5799355.87,3430180.54 5799366.2,3430146.57 5799367.68,3430142.14 5799349.96,3430065.35 5799375.06,3429961.97 5799426.75,3429857.62 5799440.07))'), 0, 3); - - - --- --- Multipoint --- - --- SELECT astext(collect(the_geom)) FROM poi WHERE poitypname='Schule'; --- Geometry from frida project: - -SELECT 'multipoint_01', ST_AsGeoJson(GeomFromEWKT('MULTIPOINT(3433276.43 5795308.93,3428545.3 5795827.75,3431576.99 5799084.19,3431724.2 5797152.59,3431984.2 5796564.79,3435147.61 5797649.58,3434660.86 5796941.74,3434674.52 5797030.54,3435714.36 5797022.6,3436368.88 5796951.04,3436730.03 5796768.6,3435538.55 5796267.1,3435847.22 5795917.96,3434312.09 5794846.02,3433121.69 5793670.73,3433176.36 5793489.29,3434316.04 5793940.09,3433222.92 5793040.49,3433416.13 5792891.62,3430717.47 5792600.58,3435384.08 5792877.68,3435229.15 5792177.25,3435120 5792319.07,3435088.72 5792111.21,3434484.89 5792110.2,3435777.91 5792419.49,3435717.37 5794318.12,3436895.13 5794569.43,3437621.86 5793931.6,3435597.14 5793467.9,3435246.51 5793394.63,3434722.1 5793374.87,3434712.16 5793810.3,3434773.28 5793816.87,3434629.91 5793855.31,3434992.34 5794140.1,3434927.13 5794252.29,3434958.58 5794286.16,3435120.48 5794163.36,3435850.1 5791727.49,3435930.75 5791636.32,3436268.87 5791882.68,3437110.23 5791664.12,3435960.34 5790928.2,3433545.81 5789755.43,3439096.86 5790884.26,3438576.87 5795046.69,3438396.95 5794858.59,3438193.25 5794695.6,3438447.92 5796130.77,3440688.22 5793670.37)'), 2); - -SELECT 'multipoint_02', ST_AsGeoJson(GeomFromEWKT('MULTIPOINT(3433276.43 5795308.93,3428545.3 5795827.75,3431576.99 5799084.19,3431724.2 5797152.59,3431984.2 5796564.79,3435147.61 5797649.58,3434660.86 5796941.74,3434674.52 5797030.54,3435714.36 5797022.6,3436368.88 5796951.04,3436730.03 5796768.6,3435538.55 5796267.1,3435847.22 5795917.96,3434312.09 5794846.02,3433121.69 5793670.73,3433176.36 5793489.29,3434316.04 5793940.09,3433222.92 5793040.49,3433416.13 5792891.62,3430717.47 5792600.58,3435384.08 5792877.68,3435229.15 5792177.25,3435120 5792319.07,3435088.72 5792111.21,3434484.89 5792110.2,3435777.91 5792419.49,3435717.37 5794318.12,3436895.13 5794569.43,3437621.86 5793931.6,3435597.14 5793467.9,3435246.51 5793394.63,3434722.1 5793374.87,3434712.16 5793810.3,3434773.28 5793816.87,3434629.91 5793855.31,3434992.34 5794140.1,3434927.13 5794252.29,3434958.58 5794286.16,3435120.48 5794163.36,3435850.1 5791727.49,3435930.75 5791636.32,3436268.87 5791882.68,3437110.23 5791664.12,3435960.34 5790928.2,3433545.81 5789755.43,3439096.86 5790884.26,3438576.87 5795046.69,3438396.95 5794858.59,3438193.25 5794695.6,3438447.92 5796130.77,3440688.22 5793670.37)'), 0); - -SELECT 'multipoint_03', ST_AsGeoJson(GeomFromEWKT('MULTIPOINT(3433276.43 5795308.93,3428545.3 5795827.75,3431576.99 5799084.19,3431724.2 5797152.59,3431984.2 5796564.79,3435147.61 5797649.58,3434660.86 5796941.74,3434674.52 5797030.54,3435714.36 5797022.6,3436368.88 5796951.04,3436730.03 5796768.6,3435538.55 5796267.1,3435847.22 5795917.96,3434312.09 5794846.02,3433121.69 5793670.73,3433176.36 5793489.29,3434316.04 5793940.09,3433222.92 5793040.49,3433416.13 5792891.62,3430717.47 5792600.58,3435384.08 5792877.68,3435229.15 5792177.25,3435120 5792319.07,3435088.72 5792111.21,3434484.89 5792110.2,3435777.91 5792419.49,3435717.37 5794318.12,3436895.13 5794569.43,3437621.86 5793931.6,3435597.14 5793467.9,3435246.51 5793394.63,3434722.1 5793374.87,3434712.16 5793810.3,3434773.28 5793816.87,3434629.91 5793855.31,3434992.34 5794140.1,3434927.13 5794252.29,3434958.58 5794286.16,3435120.48 5794163.36,3435850.1 5791727.49,3435930.75 5791636.32,3436268.87 5791882.68,3437110.23 5791664.12,3435960.34 5790928.2,3433545.81 5789755.43,3439096.86 5790884.26,3438576.87 5795046.69,3438396.95 5794858.59,3438193.25 5794695.6,3438447.92 5796130.77,3440688.22 5793670.37)'), 0, 3); - -SELECT 'multipoint_04', ST_AsGeoJson(GeomFromEWKT('SRID=31467;MULTIPOINT(3433276.43 5795308.93,3428545.3 5795827.75,3431576.99 5799084.19,3431724.2 5797152.59,3431984.2 5796564.79,3435147.61 5797649.58,3434660.86 5796941.74,3434674.52 5797030.54,3435714.36 5797022.6,3436368.88 5796951.04,3436730.03 5796768.6,3435538.55 5796267.1,3435847.22 5795917.96,3434312.09 5794846.02,3433121.69 5793670.73,3433176.36 5793489.29,3434316.04 5793940.09,3433222.92 5793040.49,3433416.13 5792891.62,3430717.47 5792600.58,3435384.08 5792877.68,3435229.15 5792177.25,3435120 5792319.07,3435088.72 5792111.21,3434484.89 5792110.2,3435777.91 5792419.49,3435717.37 5794318.12,3436895.13 5794569.43,3437621.86 5793931.6,3435597.14 5793467.9,3435246.51 5793394.63,3434722.1 5793374.87,3434712.16 5793810.3,3434773.28 5793816.87,3434629.91 5793855.31,3434992.34 5794140.1,3434927.13 5794252.29,3434958.58 5794286.16,3435120.48 5794163.36,3435850.1 5791727.49,3435930.75 5791636.32,3436268.87 5791882.68,3437110.23 5791664.12,3435960.34 5790928.2,3433545.81 5789755.43,3439096.86 5790884.26,3438576.87 5795046.69,3438396.95 5794858.59,3438193.25 5794695.6,3438447.92 5796130.77,3440688.22 5793670.37)'), 0, 2); - -SELECT 'multipoint_05', ST_AsGeoJson(GeomFromEWKT('SRID=31467;MULTIPOINT(3433276.43 5795308.93,3428545.3 5795827.75,3431576.99 5799084.19,3431724.2 5797152.59,3431984.2 5796564.79,3435147.61 5797649.58,3434660.86 5796941.74,3434674.52 5797030.54,3435714.36 5797022.6,3436368.88 5796951.04,3436730.03 5796768.6,3435538.55 5796267.1,3435847.22 5795917.96,3434312.09 5794846.02,3433121.69 5793670.73,3433176.36 5793489.29,3434316.04 5793940.09,3433222.92 5793040.49,3433416.13 5792891.62,3430717.47 5792600.58,3435384.08 5792877.68,3435229.15 5792177.25,3435120 5792319.07,3435088.72 5792111.21,3434484.89 5792110.2,3435777.91 5792419.49,3435717.37 5794318.12,3436895.13 5794569.43,3437621.86 5793931.6,3435597.14 5793467.9,3435246.51 5793394.63,3434722.1 5793374.87,3434712.16 5793810.3,3434773.28 5793816.87,3434629.91 5793855.31,3434992.34 5794140.1,3434927.13 5794252.29,3434958.58 5794286.16,3435120.48 5794163.36,3435850.1 5791727.49,3435930.75 5791636.32,3436268.87 5791882.68,3437110.23 5791664.12,3435960.34 5790928.2,3433545.81 5789755.43,3439096.86 5790884.26,3438576.87 5795046.69,3438396.95 5794858.59,3438193.25 5794695.6,3438447.92 5796130.77,3440688.22 5793670.37)'), 0, 3); - - - --- --- MultiLine --- --- Geometry from frida project: --- SELECT st_astext(st_linemerge(the_geom)) FROM river WHERE glname='Stichkanal'; - -SELECT 'multiline_01', ST_AsGeoJson(GeomFromEWKT('MULTILINESTRING((3429562.6 5799490.68,3429750.99 5799199.87,3429825.45 5799078.39,3429901.8 5798961.45,3429995.54 5798822.93,3430072.89 5798719.46,3430216 5798558.95,3430272.08 5798489.33,3430393.87 5798328.51,3430463.53 5798251.11,3430532.22 5798190.16,3430591.24 5798149.53,3430667.67 5798108.9,3430723.78 5798088.58,3430797.33 5798067.95,3430857.34 5798056.34,3430912.52 5798051.5,3430961.89 5798048.59,3431052.88 5798053.43,3431159.36 5798059.24,3431218.41 5798061.18,3431366.56 5798056.09,3431474.07 5798044.47,3431568.02 5798028.97,3431644.53 5798012.51),(3433260.06 5797002.92,3433234.61 5797070.25,3433138.56 5797278.81,3433074.19 5797398.94,3433033.73 5797461.79,3432961.43 5797551.84,3432882.76 5797626.57,3432780.32 5797701.09,3432706.28 5797743.23,3432542.66 5797808.05,3432360.32 5797842.47,3432258.52 5797836.77,3432197.62 5797837.57,3432081.75 5797865.64,3431876.6 5797945.1,3431865.15 5797948.73),(3431865.15 5797948.73,3431644.53 5798012.51),(3431865.15 5797948.73,3431815.75 5797807.76),(3433260.06 5797002.92,3433361.19 5796788.54,3433467.4 5796572.78,3433670.6 5796160.06),(3433670.6 5796160.06,3433709.27 5796096.88,3433744.46 5796021.84,3433861.98 5795869.38,3434029.1 5795680.43,3434229.42 5795456.34,3434239.36 5795425.11,3434296.02 5795363.18))'), 2); - -SELECT 'multiline_02', ST_AsGeoJson(GeomFromEWKT('MULTILINESTRING((3429562.6 5799490.68,3429750.99 5799199.87,3429825.45 5799078.39,3429901.8 5798961.45,3429995.54 5798822.93,3430072.89 5798719.46,3430216 5798558.95,3430272.08 5798489.33,3430393.87 5798328.51,3430463.53 5798251.11,3430532.22 5798190.16,3430591.24 5798149.53,3430667.67 5798108.9,3430723.78 5798088.58,3430797.33 5798067.95,3430857.34 5798056.34,3430912.52 5798051.5,3430961.89 5798048.59,3431052.88 5798053.43,3431159.36 5798059.24,3431218.41 5798061.18,3431366.56 5798056.09,3431474.07 5798044.47,3431568.02 5798028.97,3431644.53 5798012.51),(3433260.06 5797002.92,3433234.61 5797070.25,3433138.56 5797278.81,3433074.19 5797398.94,3433033.73 5797461.79,3432961.43 5797551.84,3432882.76 5797626.57,3432780.32 5797701.09,3432706.28 5797743.23,3432542.66 5797808.05,3432360.32 5797842.47,3432258.52 5797836.77,3432197.62 5797837.57,3432081.75 5797865.64,3431876.6 5797945.1,3431865.15 5797948.73),(3431865.15 5797948.73,3431644.53 5798012.51),(3431865.15 5797948.73,3431815.75 5797807.76),(3433260.06 5797002.92,3433361.19 5796788.54,3433467.4 5796572.78,3433670.6 5796160.06),(3433670.6 5796160.06,3433709.27 5796096.88,3433744.46 5796021.84,3433861.98 5795869.38,3434029.1 5795680.43,3434229.42 5795456.34,3434239.36 5795425.11,3434296.02 5795363.18))'), 0); - -SELECT 'multiline_03', ST_AsGeoJson(GeomFromEWKT('MULTILINESTRING((3429562.6 5799490.68,3429750.99 5799199.87,3429825.45 5799078.39,3429901.8 5798961.45,3429995.54 5798822.93,3430072.89 5798719.46,3430216 5798558.95,3430272.08 5798489.33,3430393.87 5798328.51,3430463.53 5798251.11,3430532.22 5798190.16,3430591.24 5798149.53,3430667.67 5798108.9,3430723.78 5798088.58,3430797.33 5798067.95,3430857.34 5798056.34,3430912.52 5798051.5,3430961.89 5798048.59,3431052.88 5798053.43,3431159.36 5798059.24,3431218.41 5798061.18,3431366.56 5798056.09,3431474.07 5798044.47,3431568.02 5798028.97,3431644.53 5798012.51),(3433260.06 5797002.92,3433234.61 5797070.25,3433138.56 5797278.81,3433074.19 5797398.94,3433033.73 5797461.79,3432961.43 5797551.84,3432882.76 5797626.57,3432780.32 5797701.09,3432706.28 5797743.23,3432542.66 5797808.05,3432360.32 5797842.47,3432258.52 5797836.77,3432197.62 5797837.57,3432081.75 5797865.64,3431876.6 5797945.1,3431865.15 5797948.73),(3431865.15 5797948.73,3431644.53 5798012.51),(3431865.15 5797948.73,3431815.75 5797807.76),(3433260.06 5797002.92,3433361.19 5796788.54,3433467.4 5796572.78,3433670.6 5796160.06),(3433670.6 5796160.06,3433709.27 5796096.88,3433744.46 5796021.84,3433861.98 5795869.38,3434029.1 5795680.43,3434229.42 5795456.34,3434239.36 5795425.11,3434296.02 5795363.18))'), 0,3); - -SELECT 'multiline_04', ST_AsGeoJson(GeomFromEWKT('SRID=31467;MULTILINESTRING((3429562.6 5799490.68,3429750.99 5799199.87,3429825.45 5799078.39,3429901.8 5798961.45,3429995.54 5798822.93,3430072.89 5798719.46,3430216 5798558.95,3430272.08 5798489.33,3430393.87 5798328.51,3430463.53 5798251.11,3430532.22 5798190.16,3430591.24 5798149.53,3430667.67 5798108.9,3430723.78 5798088.58,3430797.33 5798067.95,3430857.34 5798056.34,3430912.52 5798051.5,3430961.89 5798048.59,3431052.88 5798053.43,3431159.36 5798059.24,3431218.41 5798061.18,3431366.56 5798056.09,3431474.07 5798044.47,3431568.02 5798028.97,3431644.53 5798012.51),(3433260.06 5797002.92,3433234.61 5797070.25,3433138.56 5797278.81,3433074.19 5797398.94,3433033.73 5797461.79,3432961.43 5797551.84,3432882.76 5797626.57,3432780.32 5797701.09,3432706.28 5797743.23,3432542.66 5797808.05,3432360.32 5797842.47,3432258.52 5797836.77,3432197.62 5797837.57,3432081.75 5797865.64,3431876.6 5797945.1,3431865.15 5797948.73),(3431865.15 5797948.73,3431644.53 5798012.51),(3431865.15 5797948.73,3431815.75 5797807.76),(3433260.06 5797002.92,3433361.19 5796788.54,3433467.4 5796572.78,3433670.6 5796160.06),(3433670.6 5796160.06,3433709.27 5796096.88,3433744.46 5796021.84,3433861.98 5795869.38,3434029.1 5795680.43,3434229.42 5795456.34,3434239.36 5795425.11,3434296.02 5795363.18))'),0,2); - -SELECT 'multiline_05', ST_AsGeoJson(GeomFromEWKT('SRID=31467;MULTILINESTRING((3429562.6 5799490.68,3429750.99 5799199.87,3429825.45 5799078.39,3429901.8 5798961.45,3429995.54 5798822.93,3430072.89 5798719.46,3430216 5798558.95,3430272.08 5798489.33,3430393.87 5798328.51,3430463.53 5798251.11,3430532.22 5798190.16,3430591.24 5798149.53,3430667.67 5798108.9,3430723.78 5798088.58,3430797.33 5798067.95,3430857.34 5798056.34,3430912.52 5798051.5,3430961.89 5798048.59,3431052.88 5798053.43,3431159.36 5798059.24,3431218.41 5798061.18,3431366.56 5798056.09,3431474.07 5798044.47,3431568.02 5798028.97,3431644.53 5798012.51),(3433260.06 5797002.92,3433234.61 5797070.25,3433138.56 5797278.81,3433074.19 5797398.94,3433033.73 5797461.79,3432961.43 5797551.84,3432882.76 5797626.57,3432780.32 5797701.09,3432706.28 5797743.23,3432542.66 5797808.05,3432360.32 5797842.47,3432258.52 5797836.77,3432197.62 5797837.57,3432081.75 5797865.64,3431876.6 5797945.1,3431865.15 5797948.73),(3431865.15 5797948.73,3431644.53 5798012.51),(3431865.15 5797948.73,3431815.75 5797807.76),(3433260.06 5797002.92,3433361.19 5796788.54,3433467.4 5796572.78,3433670.6 5796160.06),(3433670.6 5796160.06,3433709.27 5796096.88,3433744.46 5796021.84,3433861.98 5795869.38,3434029.1 5795680.43,3434229.42 5795456.34,3434239.36 5795425.11,3434296.02 5795363.18))'),0,3); - - - --- --- MultiPolygon --- - --- Geometry from frida project: --- Leyer Holz Park --- st_astext(geomunion(the_geom)) FROM park WHERE gfname='Leyer Holz'; - -SELECT 'multipolygon_01', ST_AsGeoJson(GeomFromEWKT('MULTIPOLYGON(((3429699.81 5795851.64,3429736.72 5795796.01,3429754.71 5795768.88,3429996.1 5795489.98,3430100.67 5795435.76,3430122.61 5795446.09,3430138.1 5795560.98,3430311.09 5795559.69,3430309.8 5795470.62,3430329.16 5795416.4,3430326.58 5795399.62,3430157.47 5795418.98,3430156.14 5795407.32,3430139.36 5795396.99,3429983.19 5795394.41,3429976.74 5795420.22,3429789.59 5795418.93,3429643.74 5795475.72,3429635.72 5795615.31,3429484.94 5795556.38,3429315.44 5795496.32,3429326.12 5795748.57,3429129.92 5795704.53,3429176.64 5795776.6,3429100.6 5795797.17,3428900.44 5795742.46,3428896.43 5795779.82,3428805.69 5795953.3,3428897.77 5796025.35,3428897.77 5796225.99,3428696.32 5796199.31,3428681.64 5796217.99,3428680.31 5796290.03,3428290.14 5796351.8,3428389.67 5796413.87,3428837.71 5796561.12,3428991.08 5796495.01,3429076.4 5796760.29,3429428.31 5796723.61,3429474.96 5796690.29,3429696.2 5796600.99,3429658.88 5796429.06,3429536.27 5796363.75,3429529.6 5796333.1,3429446.08 5796253.84,3429699.81 5795851.64)),((3429857.62 5799440.07,3429873.86 5799496.16,3429904.86 5799503.55,3429972.77 5799561.12,3430034.77 5799577.36,3430031.82 5799639.36,3430139.59 5799691.03,3430146.97 5799724.99,3430271.57 5799792.88,3430289.29 5799776.64,3430312.91 5799662.95,3430416.27 5799710.2,3430419.22 5799614.22,3430268.61 5799612.75,3430291.3 5799203.76,3430255.86 5799175.7,3430214.51 5799347,3430183.49 5799355.87,3430180.54 5799366.2,3430146.57 5799367.68,3430142.14 5799349.96,3430065.35 5799375.06,3429961.97 5799426.75,3429857.62 5799440.07)))'), 2); - -SELECT 'multipolygon_02', ST_AsGeoJson(GeomFromEWKT('MULTIPOLYGON(((3429699.81 5795851.64,3429736.72 5795796.01,3429754.71 5795768.88,3429996.1 5795489.98,3430100.67 5795435.76,3430122.61 5795446.09,3430138.1 5795560.98,3430311.09 5795559.69,3430309.8 5795470.62,3430329.16 5795416.4,3430326.58 5795399.62,3430157.47 5795418.98,3430156.14 5795407.32,3430139.36 5795396.99,3429983.19 5795394.41,3429976.74 5795420.22,3429789.59 5795418.93,3429643.74 5795475.72,3429635.72 5795615.31,3429484.94 5795556.38,3429315.44 5795496.32,3429326.12 5795748.57,3429129.92 5795704.53,3429176.64 5795776.6,3429100.6 5795797.17,3428900.44 5795742.46,3428896.43 5795779.82,3428805.69 5795953.3,3428897.77 5796025.35,3428897.77 5796225.99,3428696.32 5796199.31,3428681.64 5796217.99,3428680.31 5796290.03,3428290.14 5796351.8,3428389.67 5796413.87,3428837.71 5796561.12,3428991.08 5796495.01,3429076.4 5796760.29,3429428.31 5796723.61,3429474.96 5796690.29,3429696.2 5796600.99,3429658.88 5796429.06,3429536.27 5796363.75,3429529.6 5796333.1,3429446.08 5796253.84,3429699.81 5795851.64)),((3429857.62 5799440.07,3429873.86 5799496.16,3429904.86 5799503.55,3429972.77 5799561.12,3430034.77 5799577.36,3430031.82 5799639.36,3430139.59 5799691.03,3430146.97 5799724.99,3430271.57 5799792.88,3430289.29 5799776.64,3430312.91 5799662.95,3430416.27 5799710.2,3430419.22 5799614.22,3430268.61 5799612.75,3430291.3 5799203.76,3430255.86 5799175.7,3430214.51 5799347,3430183.49 5799355.87,3430180.54 5799366.2,3430146.57 5799367.68,3430142.14 5799349.96,3430065.35 5799375.06,3429961.97 5799426.75,3429857.62 5799440.07)))'), 0); - -SELECT 'multipolygon_03', ST_AsGeoJson(GeomFromEWKT('MULTIPOLYGON(((3429699.81 5795851.64,3429736.72 5795796.01,3429754.71 5795768.88,3429996.1 5795489.98,3430100.67 5795435.76,3430122.61 5795446.09,3430138.1 5795560.98,3430311.09 5795559.69,3430309.8 5795470.62,3430329.16 5795416.4,3430326.58 5795399.62,3430157.47 5795418.98,3430156.14 5795407.32,3430139.36 5795396.99,3429983.19 5795394.41,3429976.74 5795420.22,3429789.59 5795418.93,3429643.74 5795475.72,3429635.72 5795615.31,3429484.94 5795556.38,3429315.44 5795496.32,3429326.12 5795748.57,3429129.92 5795704.53,3429176.64 5795776.6,3429100.6 5795797.17,3428900.44 5795742.46,3428896.43 5795779.82,3428805.69 5795953.3,3428897.77 5796025.35,3428897.77 5796225.99,3428696.32 5796199.31,3428681.64 5796217.99,3428680.31 5796290.03,3428290.14 5796351.8,3428389.67 5796413.87,3428837.71 5796561.12,3428991.08 5796495.01,3429076.4 5796760.29,3429428.31 5796723.61,3429474.96 5796690.29,3429696.2 5796600.99,3429658.88 5796429.06,3429536.27 5796363.75,3429529.6 5796333.1,3429446.08 5796253.84,3429699.81 5795851.64)),((3429857.62 5799440.07,3429873.86 5799496.16,3429904.86 5799503.55,3429972.77 5799561.12,3430034.77 5799577.36,3430031.82 5799639.36,3430139.59 5799691.03,3430146.97 5799724.99,3430271.57 5799792.88,3430289.29 5799776.64,3430312.91 5799662.95,3430416.27 5799710.2,3430419.22 5799614.22,3430268.61 5799612.75,3430291.3 5799203.76,3430255.86 5799175.7,3430214.51 5799347,3430183.49 5799355.87,3430180.54 5799366.2,3430146.57 5799367.68,3430142.14 5799349.96,3430065.35 5799375.06,3429961.97 5799426.75,3429857.62 5799440.07)))'), 0, 3); - -SELECT 'multipolygon_04', ST_AsGeoJson(GeomFromEWKT('SRID=31467;MULTIPOLYGON(((3429699.81 5795851.64,3429736.72 5795796.01,3429754.71 5795768.88,3429996.1 5795489.98,3430100.67 5795435.76,3430122.61 5795446.09,3430138.1 5795560.98,3430311.09 5795559.69,3430309.8 5795470.62,3430329.16 5795416.4,3430326.58 5795399.62,3430157.47 5795418.98,3430156.14 5795407.32,3430139.36 5795396.99,3429983.19 5795394.41,3429976.74 5795420.22,3429789.59 5795418.93,3429643.74 5795475.72,3429635.72 5795615.31,3429484.94 5795556.38,3429315.44 5795496.32,3429326.12 5795748.57,3429129.92 5795704.53,3429176.64 5795776.6,3429100.6 5795797.17,3428900.44 5795742.46,3428896.43 5795779.82,3428805.69 5795953.3,3428897.77 5796025.35,3428897.77 5796225.99,3428696.32 5796199.31,3428681.64 5796217.99,3428680.31 5796290.03,3428290.14 5796351.8,3428389.67 5796413.87,3428837.71 5796561.12,3428991.08 5796495.01,3429076.4 5796760.29,3429428.31 5796723.61,3429474.96 5796690.29,3429696.2 5796600.99,3429658.88 5796429.06,3429536.27 5796363.75,3429529.6 5796333.1,3429446.08 5796253.84,3429699.81 5795851.64)),((3429857.62 5799440.07,3429873.86 5799496.16,3429904.86 5799503.55,3429972.77 5799561.12,3430034.77 5799577.36,3430031.82 5799639.36,3430139.59 5799691.03,3430146.97 5799724.99,3430271.57 5799792.88,3430289.29 5799776.64,3430312.91 5799662.95,3430416.27 5799710.2,3430419.22 5799614.22,3430268.61 5799612.75,3430291.3 5799203.76,3430255.86 5799175.7,3430214.51 5799347,3430183.49 5799355.87,3430180.54 5799366.2,3430146.57 5799367.68,3430142.14 5799349.96,3430065.35 5799375.06,3429961.97 5799426.75,3429857.62 5799440.07)))'), 0, 2); - -SELECT 'multipolygon_05', ST_AsGeoJson(GeomFromEWKT('SRID=31467;MULTIPOLYGON(((3429699.81 5795851.64,3429736.72 5795796.01,3429754.71 5795768.88,3429996.1 5795489.98,3430100.67 5795435.76,3430122.61 5795446.09,3430138.1 5795560.98,3430311.09 5795559.69,3430309.8 5795470.62,3430329.16 5795416.4,3430326.58 5795399.62,3430157.47 5795418.98,3430156.14 5795407.32,3430139.36 5795396.99,3429983.19 5795394.41,3429976.74 5795420.22,3429789.59 5795418.93,3429643.74 5795475.72,3429635.72 5795615.31,3429484.94 5795556.38,3429315.44 5795496.32,3429326.12 5795748.57,3429129.92 5795704.53,3429176.64 5795776.6,3429100.6 5795797.17,3428900.44 5795742.46,3428896.43 5795779.82,3428805.69 5795953.3,3428897.77 5796025.35,3428897.77 5796225.99,3428696.32 5796199.31,3428681.64 5796217.99,3428680.31 5796290.03,3428290.14 5796351.8,3428389.67 5796413.87,3428837.71 5796561.12,3428991.08 5796495.01,3429076.4 5796760.29,3429428.31 5796723.61,3429474.96 5796690.29,3429696.2 5796600.99,3429658.88 5796429.06,3429536.27 5796363.75,3429529.6 5796333.1,3429446.08 5796253.84,3429699.81 5795851.64)),((3429857.62 5799440.07,3429873.86 5799496.16,3429904.86 5799503.55,3429972.77 5799561.12,3430034.77 5799577.36,3430031.82 5799639.36,3430139.59 5799691.03,3430146.97 5799724.99,3430271.57 5799792.88,3430289.29 5799776.64,3430312.91 5799662.95,3430416.27 5799710.2,3430419.22 5799614.22,3430268.61 5799612.75,3430291.3 5799203.76,3430255.86 5799175.7,3430214.51 5799347,3430183.49 5799355.87,3430180.54 5799366.2,3430146.57 5799367.68,3430142.14 5799349.96,3430065.35 5799375.06,3429961.97 5799426.75,3429857.62 5799440.07)))'), 0, 3); - - - --- --- GeometryCollection --- - --- SELECT astext(collect((SELECT collect(the_geom) FROM poi WHERE poitypname='Schule'), (SELECT collect(st_linemerge(the_geom)) FROM river WHERE glname='Stichkanal'))); - --- Geometry from frida project: -SELECT 'geometrycollection_01', ST_AsGeoJson(GeomFromEWKT('GEOMETRYCOLLECTION(MULTIPOINT(3433276.43 5795308.93,3428545.3 5795827.75,3431576.99 5799084.19,3431724.2 5797152.59,3431984.2 5796564.79,3435147.61 5797649.58,3434660.86 5796941.74,3434674.52 5797030.54,3435714.36 5797022.6,3436368.88 5796951.04,3436730.03 5796768.6,3435538.55 5796267.1,3435847.22 5795917.96,3434312.09 5794846.02,3433121.69 5793670.73,3433176.36 5793489.29,3434316.04 5793940.09,3433222.92 5793040.49,3433416.13 5792891.62,3430717.47 5792600.58,3435384.08 5792877.68,3435229.15 5792177.25,3435120 5792319.07,3435088.72 5792111.21,3434484.89 5792110.2,3435777.91 5792419.49,3435717.37 5794318.12,3436895.13 5794569.43,3437621.86 5793931.6,3435597.14 5793467.9,3435246.51 5793394.63,3434722.1 5793374.87,3434712.16 5793810.3,3434773.28 5793816.87,3434629.91 5793855.31,3434992.34 5794140.1,3434927.13 5794252.29,3434958.58 5794286.16,3435120.48 5794163.36,3435850.1 5791727.49,3435930.75 5791636.32,3436268.87 5791882.68,3437110.23 5791664.12,3435960.34 5790928.2,3433545.81 5789755.43,3439096.86 5790884.26,3438576.87 5795046.69,3438396.95 5794858.59,3438193.25 5794695.6,3438447.92 5796130.77,3440688.22 5793670.37),MULTILINESTRING((3429562.6 5799490.68,3429750.99 5799199.87,3429825.45 5799078.39,3429901.8 5798961.45,3429995.54 5798822.93,3430072.89 5798719.46,3430216 5798558.95,3430272.08 5798489.33,3430393.87 5798328.51,3430463.53 5798251.11,3430532.22 5798190.16,3430591.24 5798149.53,3430667.67 5798108.9,3430723.78 5798088.58,3430797.33 5798067.95,3430857.34 5798056.34,3430912.52 5798051.5,3430961.89 5798048.59,3431052.88 5798053.43,3431159.36 5798059.24,3431218.41 5798061.18,3431366.56 5798056.09,3431474.07 5798044.47,3431568.02 5798028.97,3431644.53 5798012.51),(3433260.06 5797002.92,3433234.61 5797070.25,3433138.56 5797278.81,3433074.19 5797398.94,3433033.73 5797461.79,3432961.43 5797551.84,3432882.76 5797626.57,3432780.32 5797701.09,3432706.28 5797743.23,3432542.66 5797808.05,3432360.32 5797842.47,3432258.52 5797836.77,3432197.62 5797837.57,3432081.75 5797865.64,3431876.6 5797945.1,3431865.15 5797948.73),(3431865.15 5797948.73,3431644.53 5798012.51),(3431865.15 5797948.73,3431815.75 5797807.76),(3433260.06 5797002.92,3433361.19 5796788.54,3433467.4 5796572.78,3433670.6 5796160.06),(3433670.6 5796160.06,3433709.27 5796096.88,3433744.46 5796021.84,3433861.98 5795869.38,3434029.1 5795680.43,3434229.42 5795456.34,3434239.36 5795425.11,3434296.02 5795363.18)))'), 2); - - -SELECT 'geometrycollection_02', ST_AsGeoJson(GeomFromEWKT('GEOMETRYCOLLECTION(MULTIPOINT(3433276.43 5795308.93,3428545.3 5795827.75,3431576.99 5799084.19,3431724.2 5797152.59,3431984.2 5796564.79,3435147.61 5797649.58,3434660.86 5796941.74,3434674.52 5797030.54,3435714.36 5797022.6,3436368.88 5796951.04,3436730.03 5796768.6,3435538.55 5796267.1,3435847.22 5795917.96,3434312.09 5794846.02,3433121.69 5793670.73,3433176.36 5793489.29,3434316.04 5793940.09,3433222.92 5793040.49,3433416.13 5792891.62,3430717.47 5792600.58,3435384.08 5792877.68,3435229.15 5792177.25,3435120 5792319.07,3435088.72 5792111.21,3434484.89 5792110.2,3435777.91 5792419.49,3435717.37 5794318.12,3436895.13 5794569.43,3437621.86 5793931.6,3435597.14 5793467.9,3435246.51 5793394.63,3434722.1 5793374.87,3434712.16 5793810.3,3434773.28 5793816.87,3434629.91 5793855.31,3434992.34 5794140.1,3434927.13 5794252.29,3434958.58 5794286.16,3435120.48 5794163.36,3435850.1 5791727.49,3435930.75 5791636.32,3436268.87 5791882.68,3437110.23 5791664.12,3435960.34 5790928.2,3433545.81 5789755.43,3439096.86 5790884.26,3438576.87 5795046.69,3438396.95 5794858.59,3438193.25 5794695.6,3438447.92 5796130.77,3440688.22 5793670.37),MULTILINESTRING((3429562.6 5799490.68,3429750.99 5799199.87,3429825.45 5799078.39,3429901.8 5798961.45,3429995.54 5798822.93,3430072.89 5798719.46,3430216 5798558.95,3430272.08 5798489.33,3430393.87 5798328.51,3430463.53 5798251.11,3430532.22 5798190.16,3430591.24 5798149.53,3430667.67 5798108.9,3430723.78 5798088.58,3430797.33 5798067.95,3430857.34 5798056.34,3430912.52 5798051.5,3430961.89 5798048.59,3431052.88 5798053.43,3431159.36 5798059.24,3431218.41 5798061.18,3431366.56 5798056.09,3431474.07 5798044.47,3431568.02 5798028.97,3431644.53 5798012.51),(3433260.06 5797002.92,3433234.61 5797070.25,3433138.56 5797278.81,3433074.19 5797398.94,3433033.73 5797461.79,3432961.43 5797551.84,3432882.76 5797626.57,3432780.32 5797701.09,3432706.28 5797743.23,3432542.66 5797808.05,3432360.32 5797842.47,3432258.52 5797836.77,3432197.62 5797837.57,3432081.75 5797865.64,3431876.6 5797945.1,3431865.15 5797948.73),(3431865.15 5797948.73,3431644.53 5798012.51),(3431865.15 5797948.73,3431815.75 5797807.76),(3433260.06 5797002.92,3433361.19 5796788.54,3433467.4 5796572.78,3433670.6 5796160.06),(3433670.6 5796160.06,3433709.27 5796096.88,3433744.46 5796021.84,3433861.98 5795869.38,3434029.1 5795680.43,3434229.42 5795456.34,3434239.36 5795425.11,3434296.02 5795363.18)))'), 0); - -SELECT 'geometrycollection_03', ST_AsGeoJson(GeomFromEWKT('GEOMETRYCOLLECTION(MULTIPOINT(3433276.43 5795308.93,3428545.3 5795827.75,3431576.99 5799084.19,3431724.2 5797152.59,3431984.2 5796564.79,3435147.61 5797649.58,3434660.86 5796941.74,3434674.52 5797030.54,3435714.36 5797022.6,3436368.88 5796951.04,3436730.03 5796768.6,3435538.55 5796267.1,3435847.22 5795917.96,3434312.09 5794846.02,3433121.69 5793670.73,3433176.36 5793489.29,3434316.04 5793940.09,3433222.92 5793040.49,3433416.13 5792891.62,3430717.47 5792600.58,3435384.08 5792877.68,3435229.15 5792177.25,3435120 5792319.07,3435088.72 5792111.21,3434484.89 5792110.2,3435777.91 5792419.49,3435717.37 5794318.12,3436895.13 5794569.43,3437621.86 5793931.6,3435597.14 5793467.9,3435246.51 5793394.63,3434722.1 5793374.87,3434712.16 5793810.3,3434773.28 5793816.87,3434629.91 5793855.31,3434992.34 5794140.1,3434927.13 5794252.29,3434958.58 5794286.16,3435120.48 5794163.36,3435850.1 5791727.49,3435930.75 5791636.32,3436268.87 5791882.68,3437110.23 5791664.12,3435960.34 5790928.2,3433545.81 5789755.43,3439096.86 5790884.26,3438576.87 5795046.69,3438396.95 5794858.59,3438193.25 5794695.6,3438447.92 5796130.77,3440688.22 5793670.37),MULTILINESTRING((3429562.6 5799490.68,3429750.99 5799199.87,3429825.45 5799078.39,3429901.8 5798961.45,3429995.54 5798822.93,3430072.89 5798719.46,3430216 5798558.95,3430272.08 5798489.33,3430393.87 5798328.51,3430463.53 5798251.11,3430532.22 5798190.16,3430591.24 5798149.53,3430667.67 5798108.9,3430723.78 5798088.58,3430797.33 5798067.95,3430857.34 5798056.34,3430912.52 5798051.5,3430961.89 5798048.59,3431052.88 5798053.43,3431159.36 5798059.24,3431218.41 5798061.18,3431366.56 5798056.09,3431474.07 5798044.47,3431568.02 5798028.97,3431644.53 5798012.51),(3433260.06 5797002.92,3433234.61 5797070.25,3433138.56 5797278.81,3433074.19 5797398.94,3433033.73 5797461.79,3432961.43 5797551.84,3432882.76 5797626.57,3432780.32 5797701.09,3432706.28 5797743.23,3432542.66 5797808.05,3432360.32 5797842.47,3432258.52 5797836.77,3432197.62 5797837.57,3432081.75 5797865.64,3431876.6 5797945.1,3431865.15 5797948.73),(3431865.15 5797948.73,3431644.53 5798012.51),(3431865.15 5797948.73,3431815.75 5797807.76),(3433260.06 5797002.92,3433361.19 5796788.54,3433467.4 5796572.78,3433670.6 5796160.06),(3433670.6 5796160.06,3433709.27 5796096.88,3433744.46 5796021.84,3433861.98 5795869.38,3434029.1 5795680.43,3434229.42 5795456.34,3434239.36 5795425.11,3434296.02 5795363.18)))'), 0, 2); - -SELECT 'geometrycollection_04', ST_AsGeoJson(GeomFromEWKT('SRID=31467;GEOMETRYCOLLECTION(MULTIPOINT(3433276.43 5795308.93,3428545.3 5795827.75,3431576.99 5799084.19,3431724.2 5797152.59,3431984.2 5796564.79,3435147.61 5797649.58,3434660.86 5796941.74,3434674.52 5797030.54,3435714.36 5797022.6,3436368.88 5796951.04,3436730.03 5796768.6,3435538.55 5796267.1,3435847.22 5795917.96,3434312.09 5794846.02,3433121.69 5793670.73,3433176.36 5793489.29,3434316.04 5793940.09,3433222.92 5793040.49,3433416.13 5792891.62,3430717.47 5792600.58,3435384.08 5792877.68,3435229.15 5792177.25,3435120 5792319.07,3435088.72 5792111.21,3434484.89 5792110.2,3435777.91 5792419.49,3435717.37 5794318.12,3436895.13 5794569.43,3437621.86 5793931.6,3435597.14 5793467.9,3435246.51 5793394.63,3434722.1 5793374.87,3434712.16 5793810.3,3434773.28 5793816.87,3434629.91 5793855.31,3434992.34 5794140.1,3434927.13 5794252.29,3434958.58 5794286.16,3435120.48 5794163.36,3435850.1 5791727.49,3435930.75 5791636.32,3436268.87 5791882.68,3437110.23 5791664.12,3435960.34 5790928.2,3433545.81 5789755.43,3439096.86 5790884.26,3438576.87 5795046.69,3438396.95 5794858.59,3438193.25 5794695.6,3438447.92 5796130.77,3440688.22 5793670.37),MULTILINESTRING((3429562.6 5799490.68,3429750.99 5799199.87,3429825.45 5799078.39,3429901.8 5798961.45,3429995.54 5798822.93,3430072.89 5798719.46,3430216 5798558.95,3430272.08 5798489.33,3430393.87 5798328.51,3430463.53 5798251.11,3430532.22 5798190.16,3430591.24 5798149.53,3430667.67 5798108.9,3430723.78 5798088.58,3430797.33 5798067.95,3430857.34 5798056.34,3430912.52 5798051.5,3430961.89 5798048.59,3431052.88 5798053.43,3431159.36 5798059.24,3431218.41 5798061.18,3431366.56 5798056.09,3431474.07 5798044.47,3431568.02 5798028.97,3431644.53 5798012.51),(3433260.06 5797002.92,3433234.61 5797070.25,3433138.56 5797278.81,3433074.19 5797398.94,3433033.73 5797461.79,3432961.43 5797551.84,3432882.76 5797626.57,3432780.32 5797701.09,3432706.28 5797743.23,3432542.66 5797808.05,3432360.32 5797842.47,3432258.52 5797836.77,3432197.62 5797837.57,3432081.75 5797865.64,3431876.6 5797945.1,3431865.15 5797948.73),(3431865.15 5797948.73,3431644.53 5798012.51),(3431865.15 5797948.73,3431815.75 5797807.76),(3433260.06 5797002.92,3433361.19 5796788.54,3433467.4 5796572.78,3433670.6 5796160.06),(3433670.6 5796160.06,3433709.27 5796096.88,3433744.46 5796021.84,3433861.98 5795869.38,3434029.1 5795680.43,3434229.42 5795456.34,3434239.36 5795425.11,3434296.02 5795363.18)))'), 0, 2); - -SELECT 'geometrycollection_05', ST_AsGeoJson(GeomFromEWKT('SRID=31467;GEOMETRYCOLLECTION(MULTIPOINT(3433276.43 5795308.93,3428545.3 5795827.75,3431576.99 5799084.19,3431724.2 5797152.59,3431984.2 5796564.79,3435147.61 5797649.58,3434660.86 5796941.74,3434674.52 5797030.54,3435714.36 5797022.6,3436368.88 5796951.04,3436730.03 5796768.6,3435538.55 5796267.1,3435847.22 5795917.96,3434312.09 5794846.02,3433121.69 5793670.73,3433176.36 5793489.29,3434316.04 5793940.09,3433222.92 5793040.49,3433416.13 5792891.62,3430717.47 5792600.58,3435384.08 5792877.68,3435229.15 5792177.25,3435120 5792319.07,3435088.72 5792111.21,3434484.89 5792110.2,3435777.91 5792419.49,3435717.37 5794318.12,3436895.13 5794569.43,3437621.86 5793931.6,3435597.14 5793467.9,3435246.51 5793394.63,3434722.1 5793374.87,3434712.16 5793810.3,3434773.28 5793816.87,3434629.91 5793855.31,3434992.34 5794140.1,3434927.13 5794252.29,3434958.58 5794286.16,3435120.48 5794163.36,3435850.1 5791727.49,3435930.75 5791636.32,3436268.87 5791882.68,3437110.23 5791664.12,3435960.34 5790928.2,3433545.81 5789755.43,3439096.86 5790884.26,3438576.87 5795046.69,3438396.95 5794858.59,3438193.25 5794695.6,3438447.92 5796130.77,3440688.22 5793670.37),MULTILINESTRING((3429562.6 5799490.68,3429750.99 5799199.87,3429825.45 5799078.39,3429901.8 5798961.45,3429995.54 5798822.93,3430072.89 5798719.46,3430216 5798558.95,3430272.08 5798489.33,3430393.87 5798328.51,3430463.53 5798251.11,3430532.22 5798190.16,3430591.24 5798149.53,3430667.67 5798108.9,3430723.78 5798088.58,3430797.33 5798067.95,3430857.34 5798056.34,3430912.52 5798051.5,3430961.89 5798048.59,3431052.88 5798053.43,3431159.36 5798059.24,3431218.41 5798061.18,3431366.56 5798056.09,3431474.07 5798044.47,3431568.02 5798028.97,3431644.53 5798012.51),(3433260.06 5797002.92,3433234.61 5797070.25,3433138.56 5797278.81,3433074.19 5797398.94,3433033.73 5797461.79,3432961.43 5797551.84,3432882.76 5797626.57,3432780.32 5797701.09,3432706.28 5797743.23,3432542.66 5797808.05,3432360.32 5797842.47,3432258.52 5797836.77,3432197.62 5797837.57,3432081.75 5797865.64,3431876.6 5797945.1,3431865.15 5797948.73),(3431865.15 5797948.73,3431644.53 5798012.51),(3431865.15 5797948.73,3431815.75 5797807.76),(3433260.06 5797002.92,3433361.19 5796788.54,3433467.4 5796572.78,3433670.6 5796160.06),(3433670.6 5796160.06,3433709.27 5796096.88,3433744.46 5796021.84,3433861.98 5795869.38,3434029.1 5795680.43,3434229.42 5795456.34,3434239.36 5795425.11,3434296.02 5795363.18)))'), 0, 3); - --- --- Unsupported Geometry --- (From AsKml units test) --- -SELECT 'invalid_01', ST_asGeoJson(GeomFromEWKT('SRID=4326;CIRCULARSTRING(-2 0,0 2,2 0,0 2,2 4)')); -SELECT 'invalid_02', ST_asGeoJson(GeomFromEWKT('SRID=4326;COMPOUNDCURVE(CIRCULARSTRING(0 0,1 1,1 0),(1 0,0 1))')); -SELECT 'invalid_03', ST_asGeoJson(GeomFromEWKT('SRID=4326;CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0))')); -SELECT 'invalid_04', ST_asGeoJson(GeomFromEWKT('SRID=4326;MULTICURVE((5 5,3 5,3 3,0 3),CIRCULARSTRING(0 0,2 1,2 2))')); -SELECT 'invalid_05', ST_asGeoJson(GeomFromEWKT('SRID=4326;MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)),((7 8,10 10,6 14,4 11,7 8)))')); - - --- --- 3D Data --- -SELECT '3D_01', ST_AsGeoJson(GeomFromEWKT('SRID=4326;POINT(1 1 1)')); -SELECT '3D_02', ST_AsGeoJson(GeomFromEWKT('SRID=4326;POINT(1 1 1)'), 0, 3); -SELECT '3D_03', ST_AsGeoJson(GeomFromEWKT('SRID=4326;LINESTRING(1 1 1, 2 2 2, 3 3 3, 4 4 4)'), 0, 3); -SELECT '3D_04', ST_AsGeoJson(GeomFromEWKT('SRID=4326;POLYGON((1 1 1, 2 2 2, 3 3 3, 4 4 4, 5 5 5, 5 0 0, 1 1 1))'), 0, 3); - --- --- Delete inserted spatial data --- -DELETE FROM spatial_ref_sys WHERE srid = 4326; -DELETE FROM spatial_ref_sys WHERE srid = 27572; -DELETE FROM spatial_ref_sys WHERE srid = 31467; diff -Nru postgis-1.5.3/regress/geojson_expected postgis-2.0.1/regress/geojson_expected --- postgis-1.5.3/regress/geojson_expected 2010-12-14 13:14:14.000000000 +0000 +++ postgis-2.0.1/regress/geojson_expected 1970-01-01 00:00:00.000000000 +0000 @@ -1,75 +0,0 @@ -simple_point|{"type":"Point","coordinates":[1,1]} -empty_geom| -precision_01|{"type":"Point","coordinates":[1,1]} -precision_02|{"type":"Point","coordinates":[1.111,1.111]} -precision_03|{"type":"Point","coordinates":[1,1]} -precision_04|{"type":"Point","coordinates":[1.1111111,1.1111111]} -version_01|{"type":"Point","coordinates":[1,1]} -ERROR: Only GeoJSON 1 is supported -ERROR: Only GeoJSON 1 is supported -crs_01|{"type":"Point","crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[1,1]} -crs_02|{"type":"Point","coordinates":[1,1]} -crs_03|{"type":"Point","crs":{"type":"name","properties":{"name":"EPSG:27572"}},"coordinates":[600000,2430000]} -ERROR: SRID 100000 unknown in spatial_ref_sys table -crs_05|{"type":"Point","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG::4326"}},"coordinates":[1,1]} -crs_06|{"type":"Point","coordinates":[1,1]} -crs_07|{"type":"Point","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG::27572"}},"coordinates":[600000,2430000]} -bbox_01|{"type":"LineString","coordinates":[[1,1],[2,2],[3,3],[4,4]]} -bbox_02|{"type":"LineString","bbox":[1,1,4,4],"coordinates":[[1,1],[2,2],[3,3],[4,4]]} -bbox_03|{"type":"LineString","bbox":[1,1,4,4],"coordinates":[[1,1],[2,2],[3,3],[4,4]]} -bbox_04|{"type":"LineString","bbox":[1,1,4,4],"coordinates":[[1,1],[2,2],[3,3],[4,4]]} -options_01|{"type":"LineString","coordinates":[[1,1],[2,2],[3,3],[4,4]]} -options_02|{"type":"LineString","coordinates":[[1,1],[2,2],[3,3],[4,4]]} -options_03|{"type":"LineString","bbox":[1,1,4,4],"coordinates":[[1,1],[2,2],[3,3],[4,4]]} -options_04|{"type":"LineString","bbox":[1,1,4,4],"coordinates":[[1,1],[2,2],[3,3],[4,4]]} -options_05|{"type":"LineString","coordinates":[[1,1],[2,2],[3,3],[4,4]]} -options_06|{"type":"LineString","crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[[1,1],[2,2],[3,3],[4,4]]} -options_07|{"type":"LineString","bbox":[1,1,4,4],"coordinates":[[1,1],[2,2],[3,3],[4,4]]} -options_08|{"type":"LineString","crs":{"type":"name","properties":{"name":"EPSG:4326"}},"bbox":[1,1,4,4],"coordinates":[[1,1],[2,2],[3,3],[4,4]]} -options_09|{"type":"LineString","coordinates":[[1,1],[2,2],[3,3],[4,4]]} -options_10|{"type":"LineString","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG::4326"}},"coordinates":[[1,1],[2,2],[3,3],[4,4]]} -options_10|{"type":"LineString","bbox":[1,1,4,4],"coordinates":[[1,1],[2,2],[3,3],[4,4]]} -options_11|{"type":"LineString","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG::4326"}},"bbox":[1,1,4,4],"coordinates":[[1,1],[2,2],[3,3],[4,4]]} -options_12|{"type":"LineString","coordinates":[[1,1],[2,2],[3,3],[4,4]]} -options_13|{"type":"LineString","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG::4326"}},"coordinates":[[1,1],[2,2],[3,3],[4,4]]} -options_14|{"type":"LineString","bbox":[1,1,4,4],"coordinates":[[1,1],[2,2],[3,3],[4,4]]} -options_15|{"type":"LineString","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG::4326"}},"bbox":[1,1,4,4],"coordinates":[[1,1],[2,2],[3,3],[4,4]]} -line_01|{"type":"LineString","coordinates":[[3429562.6,5799490.68],[3429750.99,5799199.87],[3429825.45,5799078.39],[3429901.8,5798961.45],[3429995.54,5798822.93],[3430072.89,5798719.46],[3430216,5798558.95],[3430272.08,5798489.33],[3430393.87,5798328.51],[3430463.53,5798251.11],[3430532.22,5798190.16],[3430591.24,5798149.53],[3430667.67,5798108.9],[3430723.78,5798088.58],[3430797.33,5798067.95],[3430857.34,5798056.34],[3430912.52,5798051.5],[3430961.89,5798048.59],[3431052.88,5798053.43],[3431159.36,5798059.24],[3431218.41,5798061.18],[3431366.56,5798056.09],[3431474.07,5798044.47],[3431568.02,5798028.97],[3431644.53,5798012.51]]} -line_02|{"type":"LineString","coordinates":[[3429563,5799491],[3429751,5799200],[3429825,5799078],[3429902,5798961],[3429996,5798823],[3430073,5798719],[3430216,5798559],[3430272,5798489],[3430394,5798329],[3430464,5798251],[3430532,5798190],[3430591,5798150],[3430668,5798109],[3430724,5798089],[3430797,5798068],[3430857,5798056],[3430913,5798052],[3430962,5798049],[3431053,5798053],[3431159,5798059],[3431218,5798061],[3431367,5798056],[3431474,5798044],[3431568,5798029],[3431645,5798013]]} -line_03|{"type":"LineString","bbox":[3429563,5798013,3431645,5799491],"coordinates":[[3429563,5799491],[3429751,5799200],[3429825,5799078],[3429902,5798961],[3429996,5798823],[3430073,5798719],[3430216,5798559],[3430272,5798489],[3430394,5798329],[3430464,5798251],[3430532,5798190],[3430591,5798150],[3430668,5798109],[3430724,5798089],[3430797,5798068],[3430857,5798056],[3430913,5798052],[3430962,5798049],[3431053,5798053],[3431159,5798059],[3431218,5798061],[3431367,5798056],[3431474,5798044],[3431568,5798029],[3431645,5798013]]} -line_04|{"type":"LineString","crs":{"type":"name","properties":{"name":"EPSG:31467"}},"coordinates":[[3429563,5799491],[3429751,5799200],[3429825,5799078],[3429902,5798961],[3429996,5798823],[3430073,5798719],[3430216,5798559],[3430272,5798489],[3430394,5798329],[3430464,5798251],[3430532,5798190],[3430591,5798150],[3430668,5798109],[3430724,5798089],[3430797,5798068],[3430857,5798056],[3430913,5798052],[3430962,5798049],[3431053,5798053],[3431159,5798059],[3431218,5798061],[3431367,5798056],[3431474,5798044],[3431568,5798029],[3431645,5798013]]} -line_05|{"type":"LineString","crs":{"type":"name","properties":{"name":"EPSG:31467"}},"bbox":[3429563,5798013,3431645,5799491],"coordinates":[[3429563,5799491],[3429751,5799200],[3429825,5799078],[3429902,5798961],[3429996,5798823],[3430073,5798719],[3430216,5798559],[3430272,5798489],[3430394,5798329],[3430464,5798251],[3430532,5798190],[3430591,5798150],[3430668,5798109],[3430724,5798089],[3430797,5798068],[3430857,5798056],[3430913,5798052],[3430962,5798049],[3431053,5798053],[3431159,5798059],[3431218,5798061],[3431367,5798056],[3431474,5798044],[3431568,5798029],[3431645,5798013]]} -polygon_01|{"type":"Polygon","coordinates":[[[3429857.62,5799440.07],[3429873.86,5799496.16],[3429904.86,5799503.55],[3429972.77,5799561.12],[3430034.77,5799577.36],[3430031.82,5799639.36],[3430139.59,5799691.03],[3430146.97,5799724.99],[3430271.57,5799792.88],[3430289.29,5799776.64],[3430312.91,5799662.95],[3430416.27,5799710.2],[3430419.22,5799614.22],[3430268.61,5799612.75],[3430291.3,5799203.76],[3430255.86,5799175.7],[3430214.51,5799347],[3430183.49,5799355.87],[3430180.54,5799366.2],[3430146.57,5799367.68],[3430142.14,5799349.96],[3430065.35,5799375.06],[3429961.97,5799426.75],[3429857.62,5799440.07]]]} -polygon_02|{"type":"Polygon","coordinates":[[[3429858,5799440],[3429874,5799496],[3429905,5799504],[3429973,5799561],[3430035,5799577],[3430032,5799639],[3430140,5799691],[3430147,5799725],[3430272,5799793],[3430289,5799777],[3430313,5799663],[3430416,5799710],[3430419,5799614],[3430269,5799613],[3430291,5799204],[3430256,5799176],[3430215,5799347],[3430183,5799356],[3430181,5799366],[3430147,5799368],[3430142,5799350],[3430065,5799375],[3429962,5799427],[3429858,5799440]]]} -polygon_03|{"type":"Polygon","bbox":[3429858,5799176,3430419,5799793],"coordinates":[[[3429858,5799440],[3429874,5799496],[3429905,5799504],[3429973,5799561],[3430035,5799577],[3430032,5799639],[3430140,5799691],[3430147,5799725],[3430272,5799793],[3430289,5799777],[3430313,5799663],[3430416,5799710],[3430419,5799614],[3430269,5799613],[3430291,5799204],[3430256,5799176],[3430215,5799347],[3430183,5799356],[3430181,5799366],[3430147,5799368],[3430142,5799350],[3430065,5799375],[3429962,5799427],[3429858,5799440]]]} -polygon_04|{"type":"Polygon","crs":{"type":"name","properties":{"name":"EPSG:31467"}},"coordinates":[[[3429858,5799440],[3429874,5799496],[3429905,5799504],[3429973,5799561],[3430035,5799577],[3430032,5799639],[3430140,5799691],[3430147,5799725],[3430272,5799793],[3430289,5799777],[3430313,5799663],[3430416,5799710],[3430419,5799614],[3430269,5799613],[3430291,5799204],[3430256,5799176],[3430215,5799347],[3430183,5799356],[3430181,5799366],[3430147,5799368],[3430142,5799350],[3430065,5799375],[3429962,5799427],[3429858,5799440]]]} -polygon_05|{"type":"Polygon","crs":{"type":"name","properties":{"name":"EPSG:31467"}},"bbox":[3429858,5799176,3430419,5799793],"coordinates":[[[3429858,5799440],[3429874,5799496],[3429905,5799504],[3429973,5799561],[3430035,5799577],[3430032,5799639],[3430140,5799691],[3430147,5799725],[3430272,5799793],[3430289,5799777],[3430313,5799663],[3430416,5799710],[3430419,5799614],[3430269,5799613],[3430291,5799204],[3430256,5799176],[3430215,5799347],[3430183,5799356],[3430181,5799366],[3430147,5799368],[3430142,5799350],[3430065,5799375],[3429962,5799427],[3429858,5799440]]]} -multipoint_01|{"type":"MultiPoint","coordinates":[[3433276.43,5795308.93],[3428545.3,5795827.75],[3431576.99,5799084.19],[3431724.2,5797152.59],[3431984.2,5796564.79],[3435147.61,5797649.58],[3434660.86,5796941.74],[3434674.52,5797030.54],[3435714.36,5797022.6],[3436368.88,5796951.04],[3436730.03,5796768.6],[3435538.55,5796267.1],[3435847.22,5795917.96],[3434312.09,5794846.02],[3433121.69,5793670.73],[3433176.36,5793489.29],[3434316.04,5793940.09],[3433222.92,5793040.49],[3433416.13,5792891.62],[3430717.47,5792600.58],[3435384.08,5792877.68],[3435229.15,5792177.25],[3435120,5792319.07],[3435088.72,5792111.21],[3434484.89,5792110.2],[3435777.91,5792419.49],[3435717.37,5794318.12],[3436895.13,5794569.43],[3437621.86,5793931.6],[3435597.14,5793467.9],[3435246.51,5793394.63],[3434722.1,5793374.87],[3434712.16,5793810.3],[3434773.28,5793816.87],[3434629.91,5793855.31],[3434992.34,5794140.1],[3434927.13,5794252.29],[3434958.58,5794286.16],[3435120.48,5794163.36],[3435850.1,5791727.49],[3435930.75,5791636.32],[3436268.87,5791882.68],[3437110.23,5791664.12],[3435960.34,5790928.2],[3433545.81,5789755.43],[3439096.86,5790884.26],[3438576.87,5795046.69],[3438396.95,5794858.59],[3438193.25,5794695.6],[3438447.92,5796130.77],[3440688.22,5793670.37]]} -multipoint_02|{"type":"MultiPoint","coordinates":[[3433276,5795309],[3428545,5795828],[3431577,5799084],[3431724,5797153],[3431984,5796565],[3435148,5797650],[3434661,5796942],[3434675,5797031],[3435714,5797023],[3436369,5796951],[3436730,5796769],[3435539,5796267],[3435847,5795918],[3434312,5794846],[3433122,5793671],[3433176,5793489],[3434316,5793940],[3433223,5793040],[3433416,5792892],[3430717,5792601],[3435384,5792878],[3435229,5792177],[3435120,5792319],[3435089,5792111],[3434485,5792110],[3435778,5792419],[3435717,5794318],[3436895,5794569],[3437622,5793932],[3435597,5793468],[3435247,5793395],[3434722,5793375],[3434712,5793810],[3434773,5793817],[3434630,5793855],[3434992,5794140],[3434927,5794252],[3434959,5794286],[3435120,5794163],[3435850,5791727],[3435931,5791636],[3436269,5791883],[3437110,5791664],[3435960,5790928],[3433546,5789755],[3439097,5790884],[3438577,5795047],[3438397,5794859],[3438193,5794696],[3438448,5796131],[3440688,5793670]]} -multipoint_03|{"type":"MultiPoint","bbox":[3428545,5789755,3440688,5799084],"coordinates":[[3433276,5795309],[3428545,5795828],[3431577,5799084],[3431724,5797153],[3431984,5796565],[3435148,5797650],[3434661,5796942],[3434675,5797031],[3435714,5797023],[3436369,5796951],[3436730,5796769],[3435539,5796267],[3435847,5795918],[3434312,5794846],[3433122,5793671],[3433176,5793489],[3434316,5793940],[3433223,5793040],[3433416,5792892],[3430717,5792601],[3435384,5792878],[3435229,5792177],[3435120,5792319],[3435089,5792111],[3434485,5792110],[3435778,5792419],[3435717,5794318],[3436895,5794569],[3437622,5793932],[3435597,5793468],[3435247,5793395],[3434722,5793375],[3434712,5793810],[3434773,5793817],[3434630,5793855],[3434992,5794140],[3434927,5794252],[3434959,5794286],[3435120,5794163],[3435850,5791727],[3435931,5791636],[3436269,5791883],[3437110,5791664],[3435960,5790928],[3433546,5789755],[3439097,5790884],[3438577,5795047],[3438397,5794859],[3438193,5794696],[3438448,5796131],[3440688,5793670]]} -multipoint_04|{"type":"MultiPoint","crs":{"type":"name","properties":{"name":"EPSG:31467"}},"coordinates":[[3433276,5795309],[3428545,5795828],[3431577,5799084],[3431724,5797153],[3431984,5796565],[3435148,5797650],[3434661,5796942],[3434675,5797031],[3435714,5797023],[3436369,5796951],[3436730,5796769],[3435539,5796267],[3435847,5795918],[3434312,5794846],[3433122,5793671],[3433176,5793489],[3434316,5793940],[3433223,5793040],[3433416,5792892],[3430717,5792601],[3435384,5792878],[3435229,5792177],[3435120,5792319],[3435089,5792111],[3434485,5792110],[3435778,5792419],[3435717,5794318],[3436895,5794569],[3437622,5793932],[3435597,5793468],[3435247,5793395],[3434722,5793375],[3434712,5793810],[3434773,5793817],[3434630,5793855],[3434992,5794140],[3434927,5794252],[3434959,5794286],[3435120,5794163],[3435850,5791727],[3435931,5791636],[3436269,5791883],[3437110,5791664],[3435960,5790928],[3433546,5789755],[3439097,5790884],[3438577,5795047],[3438397,5794859],[3438193,5794696],[3438448,5796131],[3440688,5793670]]} -multipoint_05|{"type":"MultiPoint","crs":{"type":"name","properties":{"name":"EPSG:31467"}},"bbox":[3428545,5789755,3440688,5799084],"coordinates":[[3433276,5795309],[3428545,5795828],[3431577,5799084],[3431724,5797153],[3431984,5796565],[3435148,5797650],[3434661,5796942],[3434675,5797031],[3435714,5797023],[3436369,5796951],[3436730,5796769],[3435539,5796267],[3435847,5795918],[3434312,5794846],[3433122,5793671],[3433176,5793489],[3434316,5793940],[3433223,5793040],[3433416,5792892],[3430717,5792601],[3435384,5792878],[3435229,5792177],[3435120,5792319],[3435089,5792111],[3434485,5792110],[3435778,5792419],[3435717,5794318],[3436895,5794569],[3437622,5793932],[3435597,5793468],[3435247,5793395],[3434722,5793375],[3434712,5793810],[3434773,5793817],[3434630,5793855],[3434992,5794140],[3434927,5794252],[3434959,5794286],[3435120,5794163],[3435850,5791727],[3435931,5791636],[3436269,5791883],[3437110,5791664],[3435960,5790928],[3433546,5789755],[3439097,5790884],[3438577,5795047],[3438397,5794859],[3438193,5794696],[3438448,5796131],[3440688,5793670]]} -multiline_01|{"type":"MultiLineString","coordinates":[[[3429562.6,5799490.68],[3429750.99,5799199.87],[3429825.45,5799078.39],[3429901.8,5798961.45],[3429995.54,5798822.93],[3430072.89,5798719.46],[3430216,5798558.95],[3430272.08,5798489.33],[3430393.87,5798328.51],[3430463.53,5798251.11],[3430532.22,5798190.16],[3430591.24,5798149.53],[3430667.67,5798108.9],[3430723.78,5798088.58],[3430797.33,5798067.95],[3430857.34,5798056.34],[3430912.52,5798051.5],[3430961.89,5798048.59],[3431052.88,5798053.43],[3431159.36,5798059.24],[3431218.41,5798061.18],[3431366.56,5798056.09],[3431474.07,5798044.47],[3431568.02,5798028.97],[3431644.53,5798012.51]],[[3433260.06,5797002.92],[3433234.61,5797070.25],[3433138.56,5797278.81],[3433074.19,5797398.94],[3433033.73,5797461.79],[3432961.43,5797551.84],[3432882.76,5797626.57],[3432780.32,5797701.09],[3432706.28,5797743.23],[3432542.66,5797808.05],[3432360.32,5797842.47],[3432258.52,5797836.77],[3432197.62,5797837.57],[3432081.75,5797865.64],[3431876.6,5797945.1],[3431865.15,5797948.73]],[[3431865.15,5797948.73],[3431644.53,5798012.51]],[[3431865.15,5797948.73],[3431815.75,5797807.76]],[[3433260.06,5797002.92],[3433361.19,5796788.54],[3433467.4,5796572.78],[3433670.6,5796160.06]],[[3433670.6,5796160.06],[3433709.27,5796096.88],[3433744.46,5796021.84],[3433861.98,5795869.38],[3434029.1,5795680.43],[3434229.42,5795456.34],[3434239.36,5795425.11],[3434296.02,5795363.18]]]} -multiline_02|{"type":"MultiLineString","coordinates":[[[3429563,5799491],[3429751,5799200],[3429825,5799078],[3429902,5798961],[3429996,5798823],[3430073,5798719],[3430216,5798559],[3430272,5798489],[3430394,5798329],[3430464,5798251],[3430532,5798190],[3430591,5798150],[3430668,5798109],[3430724,5798089],[3430797,5798068],[3430857,5798056],[3430913,5798052],[3430962,5798049],[3431053,5798053],[3431159,5798059],[3431218,5798061],[3431367,5798056],[3431474,5798044],[3431568,5798029],[3431645,5798013]],[[3433260,5797003],[3433235,5797070],[3433139,5797279],[3433074,5797399],[3433034,5797462],[3432961,5797552],[3432883,5797627],[3432780,5797701],[3432706,5797743],[3432543,5797808],[3432360,5797842],[3432259,5797837],[3432198,5797838],[3432082,5797866],[3431877,5797945],[3431865,5797949]],[[3431865,5797949],[3431645,5798013]],[[3431865,5797949],[3431816,5797808]],[[3433260,5797003],[3433361,5796789],[3433467,5796573],[3433671,5796160]],[[3433671,5796160],[3433709,5796097],[3433744,5796022],[3433862,5795869],[3434029,5795680],[3434229,5795456],[3434239,5795425],[3434296,5795363]]]} -multiline_03|{"type":"MultiLineString","bbox":[3429563,5795363,3434296,5799491],"coordinates":[[[3429563,5799491],[3429751,5799200],[3429825,5799078],[3429902,5798961],[3429996,5798823],[3430073,5798719],[3430216,5798559],[3430272,5798489],[3430394,5798329],[3430464,5798251],[3430532,5798190],[3430591,5798150],[3430668,5798109],[3430724,5798089],[3430797,5798068],[3430857,5798056],[3430913,5798052],[3430962,5798049],[3431053,5798053],[3431159,5798059],[3431218,5798061],[3431367,5798056],[3431474,5798044],[3431568,5798029],[3431645,5798013]],[[3433260,5797003],[3433235,5797070],[3433139,5797279],[3433074,5797399],[3433034,5797462],[3432961,5797552],[3432883,5797627],[3432780,5797701],[3432706,5797743],[3432543,5797808],[3432360,5797842],[3432259,5797837],[3432198,5797838],[3432082,5797866],[3431877,5797945],[3431865,5797949]],[[3431865,5797949],[3431645,5798013]],[[3431865,5797949],[3431816,5797808]],[[3433260,5797003],[3433361,5796789],[3433467,5796573],[3433671,5796160]],[[3433671,5796160],[3433709,5796097],[3433744,5796022],[3433862,5795869],[3434029,5795680],[3434229,5795456],[3434239,5795425],[3434296,5795363]]]} -multiline_04|{"type":"MultiLineString","crs":{"type":"name","properties":{"name":"EPSG:31467"}},"coordinates":[[[3429563,5799491],[3429751,5799200],[3429825,5799078],[3429902,5798961],[3429996,5798823],[3430073,5798719],[3430216,5798559],[3430272,5798489],[3430394,5798329],[3430464,5798251],[3430532,5798190],[3430591,5798150],[3430668,5798109],[3430724,5798089],[3430797,5798068],[3430857,5798056],[3430913,5798052],[3430962,5798049],[3431053,5798053],[3431159,5798059],[3431218,5798061],[3431367,5798056],[3431474,5798044],[3431568,5798029],[3431645,5798013]],[[3433260,5797003],[3433235,5797070],[3433139,5797279],[3433074,5797399],[3433034,5797462],[3432961,5797552],[3432883,5797627],[3432780,5797701],[3432706,5797743],[3432543,5797808],[3432360,5797842],[3432259,5797837],[3432198,5797838],[3432082,5797866],[3431877,5797945],[3431865,5797949]],[[3431865,5797949],[3431645,5798013]],[[3431865,5797949],[3431816,5797808]],[[3433260,5797003],[3433361,5796789],[3433467,5796573],[3433671,5796160]],[[3433671,5796160],[3433709,5796097],[3433744,5796022],[3433862,5795869],[3434029,5795680],[3434229,5795456],[3434239,5795425],[3434296,5795363]]]} -multiline_05|{"type":"MultiLineString","crs":{"type":"name","properties":{"name":"EPSG:31467"}},"bbox":[3429563,5795363,3434296,5799491],"coordinates":[[[3429563,5799491],[3429751,5799200],[3429825,5799078],[3429902,5798961],[3429996,5798823],[3430073,5798719],[3430216,5798559],[3430272,5798489],[3430394,5798329],[3430464,5798251],[3430532,5798190],[3430591,5798150],[3430668,5798109],[3430724,5798089],[3430797,5798068],[3430857,5798056],[3430913,5798052],[3430962,5798049],[3431053,5798053],[3431159,5798059],[3431218,5798061],[3431367,5798056],[3431474,5798044],[3431568,5798029],[3431645,5798013]],[[3433260,5797003],[3433235,5797070],[3433139,5797279],[3433074,5797399],[3433034,5797462],[3432961,5797552],[3432883,5797627],[3432780,5797701],[3432706,5797743],[3432543,5797808],[3432360,5797842],[3432259,5797837],[3432198,5797838],[3432082,5797866],[3431877,5797945],[3431865,5797949]],[[3431865,5797949],[3431645,5798013]],[[3431865,5797949],[3431816,5797808]],[[3433260,5797003],[3433361,5796789],[3433467,5796573],[3433671,5796160]],[[3433671,5796160],[3433709,5796097],[3433744,5796022],[3433862,5795869],[3434029,5795680],[3434229,5795456],[3434239,5795425],[3434296,5795363]]]} -multipolygon_01|{"type":"MultiPolygon","coordinates":[[[[3429699.81,5795851.64],[3429736.72,5795796.01],[3429754.71,5795768.88],[3429996.1,5795489.98],[3430100.67,5795435.76],[3430122.61,5795446.09],[3430138.1,5795560.98],[3430311.09,5795559.69],[3430309.8,5795470.62],[3430329.16,5795416.4],[3430326.58,5795399.62],[3430157.47,5795418.98],[3430156.14,5795407.32],[3430139.36,5795396.99],[3429983.19,5795394.41],[3429976.74,5795420.22],[3429789.59,5795418.93],[3429643.74,5795475.72],[3429635.72,5795615.31],[3429484.94,5795556.38],[3429315.44,5795496.32],[3429326.12,5795748.57],[3429129.92,5795704.53],[3429176.64,5795776.6],[3429100.6,5795797.17],[3428900.44,5795742.46],[3428896.43,5795779.82],[3428805.69,5795953.3],[3428897.77,5796025.35],[3428897.77,5796225.99],[3428696.32,5796199.31],[3428681.64,5796217.99],[3428680.31,5796290.03],[3428290.14,5796351.8],[3428389.67,5796413.87],[3428837.71,5796561.12],[3428991.08,5796495.01],[3429076.4,5796760.29],[3429428.31,5796723.61],[3429474.96,5796690.29],[3429696.2,5796600.99],[3429658.88,5796429.06],[3429536.27,5796363.75],[3429529.6,5796333.1],[3429446.08,5796253.84],[3429699.81,5795851.64]]],[[[3429857.62,5799440.07],[3429873.86,5799496.16],[3429904.86,5799503.55],[3429972.77,5799561.12],[3430034.77,5799577.36],[3430031.82,5799639.36],[3430139.59,5799691.03],[3430146.97,5799724.99],[3430271.57,5799792.88],[3430289.29,5799776.64],[3430312.91,5799662.95],[3430416.27,5799710.2],[3430419.22,5799614.22],[3430268.61,5799612.75],[3430291.3,5799203.76],[3430255.86,5799175.7],[3430214.51,5799347],[3430183.49,5799355.87],[3430180.54,5799366.2],[3430146.57,5799367.68],[3430142.14,5799349.96],[3430065.35,5799375.06],[3429961.97,5799426.75],[3429857.62,5799440.07]]]]} -multipolygon_02|{"type":"MultiPolygon","coordinates":[[[[3429700,5795852],[3429737,5795796],[3429755,5795769],[3429996,5795490],[3430101,5795436],[3430123,5795446],[3430138,5795561],[3430311,5795560],[3430310,5795471],[3430329,5795416],[3430327,5795400],[3430157,5795419],[3430156,5795407],[3430139,5795397],[3429983,5795394],[3429977,5795420],[3429790,5795419],[3429644,5795476],[3429636,5795615],[3429485,5795556],[3429315,5795496],[3429326,5795749],[3429130,5795705],[3429177,5795777],[3429101,5795797],[3428900,5795742],[3428896,5795780],[3428806,5795953],[3428898,5796025],[3428898,5796226],[3428696,5796199],[3428682,5796218],[3428680,5796290],[3428290,5796352],[3428390,5796414],[3428838,5796561],[3428991,5796495],[3429076,5796760],[3429428,5796724],[3429475,5796690],[3429696,5796601],[3429659,5796429],[3429536,5796364],[3429530,5796333],[3429446,5796254],[3429700,5795852]]],[[[3429858,5799440],[3429874,5799496],[3429905,5799504],[3429973,5799561],[3430035,5799577],[3430032,5799639],[3430140,5799691],[3430147,5799725],[3430272,5799793],[3430289,5799777],[3430313,5799663],[3430416,5799710],[3430419,5799614],[3430269,5799613],[3430291,5799204],[3430256,5799176],[3430215,5799347],[3430183,5799356],[3430181,5799366],[3430147,5799368],[3430142,5799350],[3430065,5799375],[3429962,5799427],[3429858,5799440]]]]} -multipolygon_03|{"type":"MultiPolygon","bbox":[3428290,5795394,3430419,5799793],"coordinates":[[[[3429700,5795852],[3429737,5795796],[3429755,5795769],[3429996,5795490],[3430101,5795436],[3430123,5795446],[3430138,5795561],[3430311,5795560],[3430310,5795471],[3430329,5795416],[3430327,5795400],[3430157,5795419],[3430156,5795407],[3430139,5795397],[3429983,5795394],[3429977,5795420],[3429790,5795419],[3429644,5795476],[3429636,5795615],[3429485,5795556],[3429315,5795496],[3429326,5795749],[3429130,5795705],[3429177,5795777],[3429101,5795797],[3428900,5795742],[3428896,5795780],[3428806,5795953],[3428898,5796025],[3428898,5796226],[3428696,5796199],[3428682,5796218],[3428680,5796290],[3428290,5796352],[3428390,5796414],[3428838,5796561],[3428991,5796495],[3429076,5796760],[3429428,5796724],[3429475,5796690],[3429696,5796601],[3429659,5796429],[3429536,5796364],[3429530,5796333],[3429446,5796254],[3429700,5795852]]],[[[3429858,5799440],[3429874,5799496],[3429905,5799504],[3429973,5799561],[3430035,5799577],[3430032,5799639],[3430140,5799691],[3430147,5799725],[3430272,5799793],[3430289,5799777],[3430313,5799663],[3430416,5799710],[3430419,5799614],[3430269,5799613],[3430291,5799204],[3430256,5799176],[3430215,5799347],[3430183,5799356],[3430181,5799366],[3430147,5799368],[3430142,5799350],[3430065,5799375],[3429962,5799427],[3429858,5799440]]]]} -multipolygon_04|{"type":"MultiPolygon","crs":{"type":"name","properties":{"name":"EPSG:31467"}},"coordinates":[[[[3429700,5795852],[3429737,5795796],[3429755,5795769],[3429996,5795490],[3430101,5795436],[3430123,5795446],[3430138,5795561],[3430311,5795560],[3430310,5795471],[3430329,5795416],[3430327,5795400],[3430157,5795419],[3430156,5795407],[3430139,5795397],[3429983,5795394],[3429977,5795420],[3429790,5795419],[3429644,5795476],[3429636,5795615],[3429485,5795556],[3429315,5795496],[3429326,5795749],[3429130,5795705],[3429177,5795777],[3429101,5795797],[3428900,5795742],[3428896,5795780],[3428806,5795953],[3428898,5796025],[3428898,5796226],[3428696,5796199],[3428682,5796218],[3428680,5796290],[3428290,5796352],[3428390,5796414],[3428838,5796561],[3428991,5796495],[3429076,5796760],[3429428,5796724],[3429475,5796690],[3429696,5796601],[3429659,5796429],[3429536,5796364],[3429530,5796333],[3429446,5796254],[3429700,5795852]]],[[[3429858,5799440],[3429874,5799496],[3429905,5799504],[3429973,5799561],[3430035,5799577],[3430032,5799639],[3430140,5799691],[3430147,5799725],[3430272,5799793],[3430289,5799777],[3430313,5799663],[3430416,5799710],[3430419,5799614],[3430269,5799613],[3430291,5799204],[3430256,5799176],[3430215,5799347],[3430183,5799356],[3430181,5799366],[3430147,5799368],[3430142,5799350],[3430065,5799375],[3429962,5799427],[3429858,5799440]]]]} -multipolygon_05|{"type":"MultiPolygon","crs":{"type":"name","properties":{"name":"EPSG:31467"}},"bbox":[3428290,5795394,3430419,5799793],"coordinates":[[[[3429700,5795852],[3429737,5795796],[3429755,5795769],[3429996,5795490],[3430101,5795436],[3430123,5795446],[3430138,5795561],[3430311,5795560],[3430310,5795471],[3430329,5795416],[3430327,5795400],[3430157,5795419],[3430156,5795407],[3430139,5795397],[3429983,5795394],[3429977,5795420],[3429790,5795419],[3429644,5795476],[3429636,5795615],[3429485,5795556],[3429315,5795496],[3429326,5795749],[3429130,5795705],[3429177,5795777],[3429101,5795797],[3428900,5795742],[3428896,5795780],[3428806,5795953],[3428898,5796025],[3428898,5796226],[3428696,5796199],[3428682,5796218],[3428680,5796290],[3428290,5796352],[3428390,5796414],[3428838,5796561],[3428991,5796495],[3429076,5796760],[3429428,5796724],[3429475,5796690],[3429696,5796601],[3429659,5796429],[3429536,5796364],[3429530,5796333],[3429446,5796254],[3429700,5795852]]],[[[3429858,5799440],[3429874,5799496],[3429905,5799504],[3429973,5799561],[3430035,5799577],[3430032,5799639],[3430140,5799691],[3430147,5799725],[3430272,5799793],[3430289,5799777],[3430313,5799663],[3430416,5799710],[3430419,5799614],[3430269,5799613],[3430291,5799204],[3430256,5799176],[3430215,5799347],[3430183,5799356],[3430181,5799366],[3430147,5799368],[3430142,5799350],[3430065,5799375],[3429962,5799427],[3429858,5799440]]]]} -geometrycollection_01|{"type":"GeometryCollection","geometries":[{"type":"MultiPoint","coordinates":[[3433276.43,5795308.93],[3428545.3,5795827.75],[3431576.99,5799084.19],[3431724.2,5797152.59],[3431984.2,5796564.79],[3435147.61,5797649.58],[3434660.86,5796941.74],[3434674.52,5797030.54],[3435714.36,5797022.6],[3436368.88,5796951.04],[3436730.03,5796768.6],[3435538.55,5796267.1],[3435847.22,5795917.96],[3434312.09,5794846.02],[3433121.69,5793670.73],[3433176.36,5793489.29],[3434316.04,5793940.09],[3433222.92,5793040.49],[3433416.13,5792891.62],[3430717.47,5792600.58],[3435384.08,5792877.68],[3435229.15,5792177.25],[3435120,5792319.07],[3435088.72,5792111.21],[3434484.89,5792110.2],[3435777.91,5792419.49],[3435717.37,5794318.12],[3436895.13,5794569.43],[3437621.86,5793931.6],[3435597.14,5793467.9],[3435246.51,5793394.63],[3434722.1,5793374.87],[3434712.16,5793810.3],[3434773.28,5793816.87],[3434629.91,5793855.31],[3434992.34,5794140.1],[3434927.13,5794252.29],[3434958.58,5794286.16],[3435120.48,5794163.36],[3435850.1,5791727.49],[3435930.75,5791636.32],[3436268.87,5791882.68],[3437110.23,5791664.12],[3435960.34,5790928.2],[3433545.81,5789755.43],[3439096.86,5790884.26],[3438576.87,5795046.69],[3438396.95,5794858.59],[3438193.25,5794695.6],[3438447.92,5796130.77],[3440688.22,5793670.37]]},{"type":"MultiLineString","coordinates":[[[3429562.6,5799490.68],[3429750.99,5799199.87],[3429825.45,5799078.39],[3429901.8,5798961.45],[3429995.54,5798822.93],[3430072.89,5798719.46],[3430216,5798558.95],[3430272.08,5798489.33],[3430393.87,5798328.51],[3430463.53,5798251.11],[3430532.22,5798190.16],[3430591.24,5798149.53],[3430667.67,5798108.9],[3430723.78,5798088.58],[3430797.33,5798067.95],[3430857.34,5798056.34],[3430912.52,5798051.5],[3430961.89,5798048.59],[3431052.88,5798053.43],[3431159.36,5798059.24],[3431218.41,5798061.18],[3431366.56,5798056.09],[3431474.07,5798044.47],[3431568.02,5798028.97],[3431644.53,5798012.51]],[[3433260.06,5797002.92],[3433234.61,5797070.25],[3433138.56,5797278.81],[3433074.19,5797398.94],[3433033.73,5797461.79],[3432961.43,5797551.84],[3432882.76,5797626.57],[3432780.32,5797701.09],[3432706.28,5797743.23],[3432542.66,5797808.05],[3432360.32,5797842.47],[3432258.52,5797836.77],[3432197.62,5797837.57],[3432081.75,5797865.64],[3431876.6,5797945.1],[3431865.15,5797948.73]],[[3431865.15,5797948.73],[3431644.53,5798012.51]],[[3431865.15,5797948.73],[3431815.75,5797807.76]],[[3433260.06,5797002.92],[3433361.19,5796788.54],[3433467.4,5796572.78],[3433670.6,5796160.06]],[[3433670.6,5796160.06],[3433709.27,5796096.88],[3433744.46,5796021.84],[3433861.98,5795869.38],[3434029.1,5795680.43],[3434229.42,5795456.34],[3434239.36,5795425.11],[3434296.02,5795363.18]]]}]} -geometrycollection_02|{"type":"GeometryCollection","geometries":[{"type":"MultiPoint","coordinates":[[3433276,5795309],[3428545,5795828],[3431577,5799084],[3431724,5797153],[3431984,5796565],[3435148,5797650],[3434661,5796942],[3434675,5797031],[3435714,5797023],[3436369,5796951],[3436730,5796769],[3435539,5796267],[3435847,5795918],[3434312,5794846],[3433122,5793671],[3433176,5793489],[3434316,5793940],[3433223,5793040],[3433416,5792892],[3430717,5792601],[3435384,5792878],[3435229,5792177],[3435120,5792319],[3435089,5792111],[3434485,5792110],[3435778,5792419],[3435717,5794318],[3436895,5794569],[3437622,5793932],[3435597,5793468],[3435247,5793395],[3434722,5793375],[3434712,5793810],[3434773,5793817],[3434630,5793855],[3434992,5794140],[3434927,5794252],[3434959,5794286],[3435120,5794163],[3435850,5791727],[3435931,5791636],[3436269,5791883],[3437110,5791664],[3435960,5790928],[3433546,5789755],[3439097,5790884],[3438577,5795047],[3438397,5794859],[3438193,5794696],[3438448,5796131],[3440688,5793670]]},{"type":"MultiLineString","coordinates":[[[3429563,5799491],[3429751,5799200],[3429825,5799078],[3429902,5798961],[3429996,5798823],[3430073,5798719],[3430216,5798559],[3430272,5798489],[3430394,5798329],[3430464,5798251],[3430532,5798190],[3430591,5798150],[3430668,5798109],[3430724,5798089],[3430797,5798068],[3430857,5798056],[3430913,5798052],[3430962,5798049],[3431053,5798053],[3431159,5798059],[3431218,5798061],[3431367,5798056],[3431474,5798044],[3431568,5798029],[3431645,5798013]],[[3433260,5797003],[3433235,5797070],[3433139,5797279],[3433074,5797399],[3433034,5797462],[3432961,5797552],[3432883,5797627],[3432780,5797701],[3432706,5797743],[3432543,5797808],[3432360,5797842],[3432259,5797837],[3432198,5797838],[3432082,5797866],[3431877,5797945],[3431865,5797949]],[[3431865,5797949],[3431645,5798013]],[[3431865,5797949],[3431816,5797808]],[[3433260,5797003],[3433361,5796789],[3433467,5796573],[3433671,5796160]],[[3433671,5796160],[3433709,5796097],[3433744,5796022],[3433862,5795869],[3434029,5795680],[3434229,5795456],[3434239,5795425],[3434296,5795363]]]}]} -geometrycollection_03|{"type":"GeometryCollection","geometries":[{"type":"MultiPoint","coordinates":[[3433276,5795309],[3428545,5795828],[3431577,5799084],[3431724,5797153],[3431984,5796565],[3435148,5797650],[3434661,5796942],[3434675,5797031],[3435714,5797023],[3436369,5796951],[3436730,5796769],[3435539,5796267],[3435847,5795918],[3434312,5794846],[3433122,5793671],[3433176,5793489],[3434316,5793940],[3433223,5793040],[3433416,5792892],[3430717,5792601],[3435384,5792878],[3435229,5792177],[3435120,5792319],[3435089,5792111],[3434485,5792110],[3435778,5792419],[3435717,5794318],[3436895,5794569],[3437622,5793932],[3435597,5793468],[3435247,5793395],[3434722,5793375],[3434712,5793810],[3434773,5793817],[3434630,5793855],[3434992,5794140],[3434927,5794252],[3434959,5794286],[3435120,5794163],[3435850,5791727],[3435931,5791636],[3436269,5791883],[3437110,5791664],[3435960,5790928],[3433546,5789755],[3439097,5790884],[3438577,5795047],[3438397,5794859],[3438193,5794696],[3438448,5796131],[3440688,5793670]]},{"type":"MultiLineString","coordinates":[[[3429563,5799491],[3429751,5799200],[3429825,5799078],[3429902,5798961],[3429996,5798823],[3430073,5798719],[3430216,5798559],[3430272,5798489],[3430394,5798329],[3430464,5798251],[3430532,5798190],[3430591,5798150],[3430668,5798109],[3430724,5798089],[3430797,5798068],[3430857,5798056],[3430913,5798052],[3430962,5798049],[3431053,5798053],[3431159,5798059],[3431218,5798061],[3431367,5798056],[3431474,5798044],[3431568,5798029],[3431645,5798013]],[[3433260,5797003],[3433235,5797070],[3433139,5797279],[3433074,5797399],[3433034,5797462],[3432961,5797552],[3432883,5797627],[3432780,5797701],[3432706,5797743],[3432543,5797808],[3432360,5797842],[3432259,5797837],[3432198,5797838],[3432082,5797866],[3431877,5797945],[3431865,5797949]],[[3431865,5797949],[3431645,5798013]],[[3431865,5797949],[3431816,5797808]],[[3433260,5797003],[3433361,5796789],[3433467,5796573],[3433671,5796160]],[[3433671,5796160],[3433709,5796097],[3433744,5796022],[3433862,5795869],[3434029,5795680],[3434229,5795456],[3434239,5795425],[3434296,5795363]]]}]} -geometrycollection_04|{"type":"GeometryCollection","crs":{"type":"name","properties":{"name":"EPSG:31467"}},"geometries":[{"type":"MultiPoint","coordinates":[[3433276,5795309],[3428545,5795828],[3431577,5799084],[3431724,5797153],[3431984,5796565],[3435148,5797650],[3434661,5796942],[3434675,5797031],[3435714,5797023],[3436369,5796951],[3436730,5796769],[3435539,5796267],[3435847,5795918],[3434312,5794846],[3433122,5793671],[3433176,5793489],[3434316,5793940],[3433223,5793040],[3433416,5792892],[3430717,5792601],[3435384,5792878],[3435229,5792177],[3435120,5792319],[3435089,5792111],[3434485,5792110],[3435778,5792419],[3435717,5794318],[3436895,5794569],[3437622,5793932],[3435597,5793468],[3435247,5793395],[3434722,5793375],[3434712,5793810],[3434773,5793817],[3434630,5793855],[3434992,5794140],[3434927,5794252],[3434959,5794286],[3435120,5794163],[3435850,5791727],[3435931,5791636],[3436269,5791883],[3437110,5791664],[3435960,5790928],[3433546,5789755],[3439097,5790884],[3438577,5795047],[3438397,5794859],[3438193,5794696],[3438448,5796131],[3440688,5793670]]},{"type":"MultiLineString","coordinates":[[[3429563,5799491],[3429751,5799200],[3429825,5799078],[3429902,5798961],[3429996,5798823],[3430073,5798719],[3430216,5798559],[3430272,5798489],[3430394,5798329],[3430464,5798251],[3430532,5798190],[3430591,5798150],[3430668,5798109],[3430724,5798089],[3430797,5798068],[3430857,5798056],[3430913,5798052],[3430962,5798049],[3431053,5798053],[3431159,5798059],[3431218,5798061],[3431367,5798056],[3431474,5798044],[3431568,5798029],[3431645,5798013]],[[3433260,5797003],[3433235,5797070],[3433139,5797279],[3433074,5797399],[3433034,5797462],[3432961,5797552],[3432883,5797627],[3432780,5797701],[3432706,5797743],[3432543,5797808],[3432360,5797842],[3432259,5797837],[3432198,5797838],[3432082,5797866],[3431877,5797945],[3431865,5797949]],[[3431865,5797949],[3431645,5798013]],[[3431865,5797949],[3431816,5797808]],[[3433260,5797003],[3433361,5796789],[3433467,5796573],[3433671,5796160]],[[3433671,5796160],[3433709,5796097],[3433744,5796022],[3433862,5795869],[3434029,5795680],[3434229,5795456],[3434239,5795425],[3434296,5795363]]]}]} -geometrycollection_05|{"type":"GeometryCollection","crs":{"type":"name","properties":{"name":"EPSG:31467"}},"bbox":[3428545,5789755,3440688,5799491],"geometries":[{"type":"MultiPoint","coordinates":[[3433276,5795309],[3428545,5795828],[3431577,5799084],[3431724,5797153],[3431984,5796565],[3435148,5797650],[3434661,5796942],[3434675,5797031],[3435714,5797023],[3436369,5796951],[3436730,5796769],[3435539,5796267],[3435847,5795918],[3434312,5794846],[3433122,5793671],[3433176,5793489],[3434316,5793940],[3433223,5793040],[3433416,5792892],[3430717,5792601],[3435384,5792878],[3435229,5792177],[3435120,5792319],[3435089,5792111],[3434485,5792110],[3435778,5792419],[3435717,5794318],[3436895,5794569],[3437622,5793932],[3435597,5793468],[3435247,5793395],[3434722,5793375],[3434712,5793810],[3434773,5793817],[3434630,5793855],[3434992,5794140],[3434927,5794252],[3434959,5794286],[3435120,5794163],[3435850,5791727],[3435931,5791636],[3436269,5791883],[3437110,5791664],[3435960,5790928],[3433546,5789755],[3439097,5790884],[3438577,5795047],[3438397,5794859],[3438193,5794696],[3438448,5796131],[3440688,5793670]]},{"type":"MultiLineString","coordinates":[[[3429563,5799491],[3429751,5799200],[3429825,5799078],[3429902,5798961],[3429996,5798823],[3430073,5798719],[3430216,5798559],[3430272,5798489],[3430394,5798329],[3430464,5798251],[3430532,5798190],[3430591,5798150],[3430668,5798109],[3430724,5798089],[3430797,5798068],[3430857,5798056],[3430913,5798052],[3430962,5798049],[3431053,5798053],[3431159,5798059],[3431218,5798061],[3431367,5798056],[3431474,5798044],[3431568,5798029],[3431645,5798013]],[[3433260,5797003],[3433235,5797070],[3433139,5797279],[3433074,5797399],[3433034,5797462],[3432961,5797552],[3432883,5797627],[3432780,5797701],[3432706,5797743],[3432543,5797808],[3432360,5797842],[3432259,5797837],[3432198,5797838],[3432082,5797866],[3431877,5797945],[3431865,5797949]],[[3431865,5797949],[3431645,5798013]],[[3431865,5797949],[3431816,5797808]],[[3433260,5797003],[3433361,5796789],[3433467,5796573],[3433671,5796160]],[[3433671,5796160],[3433709,5796097],[3433744,5796022],[3433862,5795869],[3434029,5795680],[3434229,5795456],[3434239,5795425],[3434296,5795363]]]}]} -ERROR: GeoJson: 'CircularString' geometry type not supported. -ERROR: GeoJson: 'CompoundString' geometry type not supported. -ERROR: GeoJson: 'CurvePolygon' geometry type not supported. -ERROR: GeoJson: 'MultiCurve' geometry type not supported. -ERROR: GeoJson: 'MultiSurface' geometry type not supported. -3D_01|{"type":"Point","coordinates":[1,1,1]} -3D_02|{"type":"Point","crs":{"type":"name","properties":{"name":"EPSG:4326"}},"bbox":[1,1,1,1,1,1],"coordinates":[1,1,1]} -3D_03|{"type":"LineString","crs":{"type":"name","properties":{"name":"EPSG:4326"}},"bbox":[1,1,1,4,4,4],"coordinates":[[1,1,1],[2,2,2],[3,3,3],[4,4,4]]} -3D_04|{"type":"Polygon","crs":{"type":"name","properties":{"name":"EPSG:4326"}},"bbox":[1,0,0,5,5,5],"coordinates":[[[1,1,1],[2,2,2],[3,3,3],[4,4,4],[5,5,5],[5,0,0],[1,1,1]]]} diff -Nru postgis-1.5.3/regress/gml.sql postgis-2.0.1/regress/gml.sql --- postgis-1.5.3/regress/gml.sql 2009-10-29 14:08:16.000000000 +0000 +++ postgis-2.0.1/regress/gml.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,191 +0,0 @@ --- --- spatial_ref_sys data --- -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"]],TOWGS84[0,0,0,0,0,0,0],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 27572 : NTF (Paris) / Lambert zone II -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27572,'EPSG',27572,'PROJCS["NTF (Paris) / Lambert zone II",GEOGCS["NTF (Paris)",DATUM["Nouvelle_Triangulation_Francaise_Paris",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936269,AUTHORITY["EPSG","7011"]],TOWGS84[-168,-60,320,0,0,0,0],AUTHORITY["EPSG","6807"]],PRIMEM["Paris",2.33722917,AUTHORITY["EPSG","8903"]],UNIT["grad",0.01570796326794897,AUTHORITY["EPSG","9105"]],AUTHORITY["EPSG","4807"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",52],PARAMETER["central_meridian",0],PARAMETER["scale_factor",0.99987742],PARAMETER["false_easting",600000],PARAMETER["false_northing",2200000],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","27572"]]','+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs '); ---- EPSG 31467 : DHDN / Gauss-Kruger zone 3 -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31467,'EPSG',31467,'PROJCS["DHDN / Gauss-Kruger zone 3",GEOGCS["DHDN",DATUM["Deutsches_Hauptdreiecksnetz",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6314"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4314"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",1],PARAMETER["false_easting",3500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","31467"]]','+proj=tmerc +lat_0=0 +lon_0=9 +k=1.000000 +x_0=3500000 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs '); - - --- Simple output -SELECT 'simple_point', ST_AsGML(GeomFromEWKT('POINT(1 1)')); - - --- Empty Geometry -SELECT 'empty_geom', ST_AsGML(GeomFromEWKT(NULL)); - - --- Precision -SELECT 'precision_01', ST_AsGML(GeomFromEWKT('SRID=4326;POINT(1.1111111 1.1111111)'), 0); -SELECT 'precision_02', ST_AsGML(GeomFromEWKT('SRID=4326;POINT(1.1111111 1.1111111)'), 3); -SELECT 'precision_03', ST_AsGML(GeomFromEWKT('SRID=4326;POINT(1.1111111 1.1111111)'), -2); -SELECT 'precision_04', ST_AsGML(GeomFromEWKT('SRID=4326;POINT(1.1111111 1.1111111)'), 19); - - --- Version -SELECT 'version_01', ST_AsGML(2, GeomFromEWKT('SRID=4326;POINT(1 1)')); -SELECT 'version_02', ST_AsGML(3, GeomFromEWKT('SRID=4326;POINT(1 1)')); -SELECT 'version_03', ST_AsGML(21, GeomFromEWKT('SRID=4326;POINT(1 1)')); -SELECT 'version_04', ST_AsGML(-4, GeomFromEWKT('SRID=4326;POINT(1 1)')); - --- Option -SELECT 'option_01', ST_AsGML(2, GeomFromEWKT('SRID=4326;POINT(1 1)'), 0, 0); -SELECT 'option_02', ST_AsGML(3, GeomFromEWKT('SRID=4326;POINT(1 1)'), 0, 1); - --- Deegree data -SELECT 'deegree_01', ST_AsGML(3, GeomFromEWKT('SRID=4326;POINT(1 2)'), 0, 0); -SELECT 'deegree_02', ST_AsGML(2, GeomFromEWKT('SRID=4326;POINT(1 2)'), 0, 16); -SELECT 'deegree_03', ST_AsGML(3, GeomFromEWKT('SRID=4326;POINT(1 2)'), 0, 16); -SELECT 'deegree_04', ST_AsGML(3, GeomFromEWKT('SRID=4326;POINT(1 2 3)'), 0, 0); -SELECT 'deegree_05', ST_AsGML(2, GeomFromEWKT('SRID=4326;POINT(1 2 3)'), 0, 16); -SELECT 'deegree_06', ST_AsGML(3, GeomFromEWKT('SRID=4326;POINT(1 2 3)'), 0, 16); -SELECT 'deegree_07', ST_AsGML(3, GeomFromEWKT('SRID=4326;LINESTRING(1 2, 2 3, 4 5)'), 0, 0); -SELECT 'deegree_08', ST_AsGML(2, GeomFromEWKT('SRID=4326;LINESTRING(1 2, 2 3, 4 5)'), 0, 16); -SELECT 'deegree_09', ST_AsGML(3, GeomFromEWKT('SRID=4326;LINESTRING(1 2, 2 3, 4 5)'), 0, 16); -SELECT 'deegree_10', ST_AsGML(3, GeomFromEWKT('SRID=4326;POLYGON((1 2, 2 3, 4 5, 3 2, 1 2))'), 0, 0); -SELECT 'deegree_11', ST_AsGML(2, GeomFromEWKT('SRID=4326;POLYGON((1 2, 2 3, 4 5, 3 2, 1 2))'), 0, 16); -SELECT 'deegree_12', ST_AsGML(3, GeomFromEWKT('SRID=4326;POLYGON((1 2, 2 3, 4 5, 3 2, 1 2))'), 0, 16); -SELECT 'deegree_13', ST_AsGML(3, GeomFromEWKT('SRID=4326;MULTIPOINT(1 2, 2 3, 4 5)'), 0, 0); -SELECT 'deegree_14', ST_AsGML(2, GeomFromEWKT('SRID=4326;MULTIPOINT(1 2, 2 3, 4 5)'), 0, 16); -SELECT 'deegree_15', ST_AsGML(3, GeomFromEWKT('SRID=4326;MULTIPOINT(1 2, 2 3, 4 5)'), 0, 16); -SELECT 'deegree_16', ST_AsGML(3, GeomFromEWKT('SRID=4326;MULTILINESTRING((1 2, 2 3, 4 5))'), 0, 0); -SELECT 'deegree_17', ST_AsGML(2, GeomFromEWKT('SRID=4326;MULTILINESTRING((1 2, 2 3, 4 5))'), 0, 16); -SELECT 'deegree_18', ST_AsGML(3, GeomFromEWKT('SRID=4326;MULTILINESTRING((1 2, 2 3, 4 5))'), 0, 16); -SELECT 'deegree_19', ST_AsGML(3, GeomFromEWKT('SRID=4326;MULTIPOLYGON(((1 2, 2 3, 4 5, 3 2, 1 2)))'), 0, 0); -SELECT 'deegree_20', ST_AsGML(2, GeomFromEWKT('SRID=4326;MULTIPOLYGON(((1 2, 2 3, 4 5, 3 2, 1 2)))'), 0, 16); -SELECT 'deegree_21', ST_AsGML(3, GeomFromEWKT('SRID=4326;MULTIPOLYGON(((1 2, 2 3, 4 5, 3 2, 1 2)))'), 0, 16); -SELECT 'deegree_22', ST_AsGML(3, GeomFromEWKT('SRID=4326;GEOMETRYCOLLECTION(MULTIPOLYGON(((1 2, 2 3, 4 5, 3 2, 1 2))), MULTILINESTRING((1 2, 2 3, 4 5)), MULTIPOINT(1 2, 3 4))'), 0, 0); -SELECT 'deegree_23', ST_AsGML(2, GeomFromEWKT('SRID=4326;GEOMETRYCOLLECTION(MULTIPOLYGON(((1 2, 2 3, 4 5, 3 2, 1 2))), MULTILINESTRING((1 2, 2 3, 4 5)), MULTIPOINT(1 2, 3 4))'), 0, 16); -SELECT 'deegree_24', ST_AsGML(3, GeomFromEWKT('SRID=4326;GEOMETRYCOLLECTION(MULTIPOLYGON(((1 2, 2 3, 4 5, 3 2, 1 2))), MULTILINESTRING((1 2, 2 3, 4 5)), MULTIPOINT(1 2, 3 4))'), 0, 16); - --- --- Line --- - --- Geometry from frida project: -SELECT 'line_01', ST_AsGML(2, GeomFromEWKT('LINESTRING(3429562.6 5799490.68,3429750.99 5799199.87,3429825.45 5799078.39,3429901.8 5798961.45,3429995.54 5798822.93,3430072.89 5798719.46,3430216 5798558.95,3430272.08 5798489.33,3430393.87 5798328.51,3430463.53 5798251.11,3430532.22 5798190.16,3430591.24 5798149.53,3430667.67 5798108.9,3430723.78 5798088.58,3430797.33 5798067.95,3430857.34 5798056.34,3430912.52 5798051.5,3430961.89 5798048.59,3431052.88 5798053.43,3431159.36 5798059.24,3431218.41 5798061.18,3431366.56 5798056.09,3431474.07 5798044.47,3431568.02 5798028.97,3431644.53 5798012.51)'), 2); - -SELECT 'line_02', ST_AsGML(3, GeomFromEWKT('LINESTRING(3429562.6 5799490.68,3429750.99 5799199.87,3429825.45 5799078.39,3429901.8 5798961.45,3429995.54 5798822.93,3430072.89 5798719.46,3430216 5798558.95,3430272.08 5798489.33,3430393.87 5798328.51,3430463.53 5798251.11,3430532.22 5798190.16,3430591.24 5798149.53,3430667.67 5798108.9,3430723.78 5798088.58,3430797.33 5798067.95,3430857.34 5798056.34,3430912.52 5798051.5,3430961.89 5798048.59,3431052.88 5798053.43,3431159.36 5798059.24,3431218.41 5798061.18,3431366.56 5798056.09,3431474.07 5798044.47,3431568.02 5798028.97,3431644.53 5798012.51)'), 2); - - -SELECT 'line_03', ST_AsGML(2, GeomFromEWKT('LINESTRING(3429562.6 5799490.68,3429750.99 5799199.87,3429825.45 5799078.39,3429901.8 5798961.45,3429995.54 5798822.93,3430072.89 5798719.46,3430216 5798558.95,3430272.08 5798489.33,3430393.87 5798328.51,3430463.53 5798251.11,3430532.22 5798190.16,3430591.24 5798149.53,3430667.67 5798108.9,3430723.78 5798088.58,3430797.33 5798067.95,3430857.34 5798056.34,3430912.52 5798051.5,3430961.89 5798048.59,3431052.88 5798053.43,3431159.36 5798059.24,3431218.41 5798061.18,3431366.56 5798056.09,3431474.07 5798044.47,3431568.02 5798028.97,3431644.53 5798012.51)'), 0); - -SELECT 'line_04', ST_AsGML(3, GeomFromEWKT('LINESTRING(3429562.6 5799490.68,3429750.99 5799199.87,3429825.45 5799078.39,3429901.8 5798961.45,3429995.54 5798822.93,3430072.89 5798719.46,3430216 5798558.95,3430272.08 5798489.33,3430393.87 5798328.51,3430463.53 5798251.11,3430532.22 5798190.16,3430591.24 5798149.53,3430667.67 5798108.9,3430723.78 5798088.58,3430797.33 5798067.95,3430857.34 5798056.34,3430912.52 5798051.5,3430961.89 5798048.59,3431052.88 5798053.43,3431159.36 5798059.24,3431218.41 5798061.18,3431366.56 5798056.09,3431474.07 5798044.47,3431568.02 5798028.97,3431644.53 5798012.51)'), 0); - - - --- --- Polygon --- - --- Geometry from frida project: - -SELECT 'polygon_01', ST_AsGML(2, GeomFromEWKT('POLYGON((3429857.62 5799440.07,3429873.86 5799496.16,3429904.86 5799503.55,3429972.77 5799561.12,3430034.77 5799577.36,3430031.82 5799639.36,3430139.59 5799691.03,3430146.97 5799724.99,3430271.57 5799792.88,3430289.29 5799776.64,3430312.91 5799662.95,3430416.27 5799710.2,3430419.22 5799614.22,3430268.61 5799612.75,3430291.3 5799203.76,3430255.86 5799175.7,3430214.51 5799347,3430183.49 5799355.87,3430180.54 5799366.2,3430146.57 5799367.68,3430142.14 5799349.96,3430065.35 5799375.06,3429961.97 5799426.75,3429857.62 5799440.07))'), 2); - -SELECT 'polygon_02', ST_AsGML(3, GeomFromEWKT('POLYGON((3429857.62 5799440.07,3429873.86 5799496.16,3429904.86 5799503.55,3429972.77 5799561.12,3430034.77 5799577.36,3430031.82 5799639.36,3430139.59 5799691.03,3430146.97 5799724.99,3430271.57 5799792.88,3430289.29 5799776.64,3430312.91 5799662.95,3430416.27 5799710.2,3430419.22 5799614.22,3430268.61 5799612.75,3430291.3 5799203.76,3430255.86 5799175.7,3430214.51 5799347,3430183.49 5799355.87,3430180.54 5799366.2,3430146.57 5799367.68,3430142.14 5799349.96,3430065.35 5799375.06,3429961.97 5799426.75,3429857.62 5799440.07))'), 2); - -SELECT 'polygon_03', ST_AsGML(2, GeomFromEWKT('POLYGON((3429857.62 5799440.07,3429873.86 5799496.16,3429904.86 5799503.55,3429972.77 5799561.12,3430034.77 5799577.36,3430031.82 5799639.36,3430139.59 5799691.03,3430146.97 5799724.99,3430271.57 5799792.88,3430289.29 5799776.64,3430312.91 5799662.95,3430416.27 5799710.2,3430419.22 5799614.22,3430268.61 5799612.75,3430291.3 5799203.76,3430255.86 5799175.7,3430214.51 5799347,3430183.49 5799355.87,3430180.54 5799366.2,3430146.57 5799367.68,3430142.14 5799349.96,3430065.35 5799375.06,3429961.97 5799426.75,3429857.62 5799440.07))'), 0); - -SELECT 'polygon_04', ST_AsGML(3, GeomFromEWKT('POLYGON((3429857.62 5799440.07,3429873.86 5799496.16,3429904.86 5799503.55,3429972.77 5799561.12,3430034.77 5799577.36,3430031.82 5799639.36,3430139.59 5799691.03,3430146.97 5799724.99,3430271.57 5799792.88,3430289.29 5799776.64,3430312.91 5799662.95,3430416.27 5799710.2,3430419.22 5799614.22,3430268.61 5799612.75,3430291.3 5799203.76,3430255.86 5799175.7,3430214.51 5799347,3430183.49 5799355.87,3430180.54 5799366.2,3430146.57 5799367.68,3430142.14 5799349.96,3430065.35 5799375.06,3429961.97 5799426.75,3429857.62 5799440.07))'), 0); - - --- --- Multipoint --- - --- SELECT astext(collect(the_geom)) FROM poi WHERE poitypname='Schule'; --- Geometry from frida project: - -SELECT 'multipoint_01', ST_AsGML(2, GeomFromEWKT('MULTIPOINT(3433276.43 5795308.93,3428545.3 5795827.75,3431576.99 5799084.19,3431724.2 5797152.59,3431984.2 5796564.79,3435147.61 5797649.58,3434660.86 5796941.74,3434674.52 5797030.54,3435714.36 5797022.6,3436368.88 5796951.04,3436730.03 5796768.6,3435538.55 5796267.1,3435847.22 5795917.96,3434312.09 5794846.02,3433121.69 5793670.73,3433176.36 5793489.29,3434316.04 5793940.09,3433222.92 5793040.49,3433416.13 5792891.62,3430717.47 5792600.58,3435384.08 5792877.68,3435229.15 5792177.25,3435120 5792319.07,3435088.72 5792111.21,3434484.89 5792110.2,3435777.91 5792419.49,3435717.37 5794318.12,3436895.13 5794569.43,3437621.86 5793931.6,3435597.14 5793467.9,3435246.51 5793394.63,3434722.1 5793374.87,3434712.16 5793810.3,3434773.28 5793816.87,3434629.91 5793855.31,3434992.34 5794140.1,3434927.13 5794252.29,3434958.58 5794286.16,3435120.48 5794163.36,3435850.1 5791727.49,3435930.75 5791636.32,3436268.87 5791882.68,3437110.23 5791664.12,3435960.34 5790928.2,3433545.81 5789755.43,3439096.86 5790884.26,3438576.87 5795046.69,3438396.95 5794858.59,3438193.25 5794695.6,3438447.92 5796130.77,3440688.22 5793670.37)'), 2); - -SELECT 'multipoint_02', ST_AsGML(3, GeomFromEWKT('MULTIPOINT(3433276.43 5795308.93,3428545.3 5795827.75,3431576.99 5799084.19,3431724.2 5797152.59,3431984.2 5796564.79,3435147.61 5797649.58,3434660.86 5796941.74,3434674.52 5797030.54,3435714.36 5797022.6,3436368.88 5796951.04,3436730.03 5796768.6,3435538.55 5796267.1,3435847.22 5795917.96,3434312.09 5794846.02,3433121.69 5793670.73,3433176.36 5793489.29,3434316.04 5793940.09,3433222.92 5793040.49,3433416.13 5792891.62,3430717.47 5792600.58,3435384.08 5792877.68,3435229.15 5792177.25,3435120 5792319.07,3435088.72 5792111.21,3434484.89 5792110.2,3435777.91 5792419.49,3435717.37 5794318.12,3436895.13 5794569.43,3437621.86 5793931.6,3435597.14 5793467.9,3435246.51 5793394.63,3434722.1 5793374.87,3434712.16 5793810.3,3434773.28 5793816.87,3434629.91 5793855.31,3434992.34 5794140.1,3434927.13 5794252.29,3434958.58 5794286.16,3435120.48 5794163.36,3435850.1 5791727.49,3435930.75 5791636.32,3436268.87 5791882.68,3437110.23 5791664.12,3435960.34 5790928.2,3433545.81 5789755.43,3439096.86 5790884.26,3438576.87 5795046.69,3438396.95 5794858.59,3438193.25 5794695.6,3438447.92 5796130.77,3440688.22 5793670.37)'), 2); - - -SELECT 'multipoint_03', ST_AsGML(2, GeomFromEWKT('MULTIPOINT(3433276.43 5795308.93,3428545.3 5795827.75,3431576.99 5799084.19,3431724.2 5797152.59,3431984.2 5796564.79,3435147.61 5797649.58,3434660.86 5796941.74,3434674.52 5797030.54,3435714.36 5797022.6,3436368.88 5796951.04,3436730.03 5796768.6,3435538.55 5796267.1,3435847.22 5795917.96,3434312.09 5794846.02,3433121.69 5793670.73,3433176.36 5793489.29,3434316.04 5793940.09,3433222.92 5793040.49,3433416.13 5792891.62,3430717.47 5792600.58,3435384.08 5792877.68,3435229.15 5792177.25,3435120 5792319.07,3435088.72 5792111.21,3434484.89 5792110.2,3435777.91 5792419.49,3435717.37 5794318.12,3436895.13 5794569.43,3437621.86 5793931.6,3435597.14 5793467.9,3435246.51 5793394.63,3434722.1 5793374.87,3434712.16 5793810.3,3434773.28 5793816.87,3434629.91 5793855.31,3434992.34 5794140.1,3434927.13 5794252.29,3434958.58 5794286.16,3435120.48 5794163.36,3435850.1 5791727.49,3435930.75 5791636.32,3436268.87 5791882.68,3437110.23 5791664.12,3435960.34 5790928.2,3433545.81 5789755.43,3439096.86 5790884.26,3438576.87 5795046.69,3438396.95 5794858.59,3438193.25 5794695.6,3438447.92 5796130.77,3440688.22 5793670.37)'), 0); - -SELECT 'multipoint_04', ST_AsGML(3, GeomFromEWKT('MULTIPOINT(3433276.43 5795308.93,3428545.3 5795827.75,3431576.99 5799084.19,3431724.2 5797152.59,3431984.2 5796564.79,3435147.61 5797649.58,3434660.86 5796941.74,3434674.52 5797030.54,3435714.36 5797022.6,3436368.88 5796951.04,3436730.03 5796768.6,3435538.55 5796267.1,3435847.22 5795917.96,3434312.09 5794846.02,3433121.69 5793670.73,3433176.36 5793489.29,3434316.04 5793940.09,3433222.92 5793040.49,3433416.13 5792891.62,3430717.47 5792600.58,3435384.08 5792877.68,3435229.15 5792177.25,3435120 5792319.07,3435088.72 5792111.21,3434484.89 5792110.2,3435777.91 5792419.49,3435717.37 5794318.12,3436895.13 5794569.43,3437621.86 5793931.6,3435597.14 5793467.9,3435246.51 5793394.63,3434722.1 5793374.87,3434712.16 5793810.3,3434773.28 5793816.87,3434629.91 5793855.31,3434992.34 5794140.1,3434927.13 5794252.29,3434958.58 5794286.16,3435120.48 5794163.36,3435850.1 5791727.49,3435930.75 5791636.32,3436268.87 5791882.68,3437110.23 5791664.12,3435960.34 5790928.2,3433545.81 5789755.43,3439096.86 5790884.26,3438576.87 5795046.69,3438396.95 5794858.59,3438193.25 5794695.6,3438447.92 5796130.77,3440688.22 5793670.37)'), 0); - - - --- --- MultiLine --- --- Geometry from frida project: --- SELECT st_astext(st_linemerge(the_geom)) FROM river WHERE glname='Stichkanal'; - -SELECT 'multiline_01', ST_AsGML(2, GeomFromEWKT('MULTILINESTRING((3429562.6 5799490.68,3429750.99 5799199.87,3429825.45 5799078.39,3429901.8 5798961.45,3429995.54 5798822.93,3430072.89 5798719.46,3430216 5798558.95,3430272.08 5798489.33,3430393.87 5798328.51,3430463.53 5798251.11,3430532.22 5798190.16,3430591.24 5798149.53,3430667.67 5798108.9,3430723.78 5798088.58,3430797.33 5798067.95,3430857.34 5798056.34,3430912.52 5798051.5,3430961.89 5798048.59,3431052.88 5798053.43,3431159.36 5798059.24,3431218.41 5798061.18,3431366.56 5798056.09,3431474.07 5798044.47,3431568.02 5798028.97,3431644.53 5798012.51),(3433260.06 5797002.92,3433234.61 5797070.25,3433138.56 5797278.81,3433074.19 5797398.94,3433033.73 5797461.79,3432961.43 5797551.84,3432882.76 5797626.57,3432780.32 5797701.09,3432706.28 5797743.23,3432542.66 5797808.05,3432360.32 5797842.47,3432258.52 5797836.77,3432197.62 5797837.57,3432081.75 5797865.64,3431876.6 5797945.1,3431865.15 5797948.73),(3431865.15 5797948.73,3431644.53 5798012.51),(3431865.15 5797948.73,3431815.75 5797807.76),(3433260.06 5797002.92,3433361.19 5796788.54,3433467.4 5796572.78,3433670.6 5796160.06),(3433670.6 5796160.06,3433709.27 5796096.88,3433744.46 5796021.84,3433861.98 5795869.38,3434029.1 5795680.43,3434229.42 5795456.34,3434239.36 5795425.11,3434296.02 5795363.18))'), 2); - -SELECT 'multiline_02', ST_AsGML(3, GeomFromEWKT('MULTILINESTRING((3429562.6 5799490.68,3429750.99 5799199.87,3429825.45 5799078.39,3429901.8 5798961.45,3429995.54 5798822.93,3430072.89 5798719.46,3430216 5798558.95,3430272.08 5798489.33,3430393.87 5798328.51,3430463.53 5798251.11,3430532.22 5798190.16,3430591.24 5798149.53,3430667.67 5798108.9,3430723.78 5798088.58,3430797.33 5798067.95,3430857.34 5798056.34,3430912.52 5798051.5,3430961.89 5798048.59,3431052.88 5798053.43,3431159.36 5798059.24,3431218.41 5798061.18,3431366.56 5798056.09,3431474.07 5798044.47,3431568.02 5798028.97,3431644.53 5798012.51),(3433260.06 5797002.92,3433234.61 5797070.25,3433138.56 5797278.81,3433074.19 5797398.94,3433033.73 5797461.79,3432961.43 5797551.84,3432882.76 5797626.57,3432780.32 5797701.09,3432706.28 5797743.23,3432542.66 5797808.05,3432360.32 5797842.47,3432258.52 5797836.77,3432197.62 5797837.57,3432081.75 5797865.64,3431876.6 5797945.1,3431865.15 5797948.73),(3431865.15 5797948.73,3431644.53 5798012.51),(3431865.15 5797948.73,3431815.75 5797807.76),(3433260.06 5797002.92,3433361.19 5796788.54,3433467.4 5796572.78,3433670.6 5796160.06),(3433670.6 5796160.06,3433709.27 5796096.88,3433744.46 5796021.84,3433861.98 5795869.38,3434029.1 5795680.43,3434229.42 5795456.34,3434239.36 5795425.11,3434296.02 5795363.18))'), 2); - -SELECT 'multiline_03', ST_AsGML(2, GeomFromEWKT('MULTILINESTRING((3429562.6 5799490.68,3429750.99 5799199.87,3429825.45 5799078.39,3429901.8 5798961.45,3429995.54 5798822.93,3430072.89 5798719.46,3430216 5798558.95,3430272.08 5798489.33,3430393.87 5798328.51,3430463.53 5798251.11,3430532.22 5798190.16,3430591.24 5798149.53,3430667.67 5798108.9,3430723.78 5798088.58,3430797.33 5798067.95,3430857.34 5798056.34,3430912.52 5798051.5,3430961.89 5798048.59,3431052.88 5798053.43,3431159.36 5798059.24,3431218.41 5798061.18,3431366.56 5798056.09,3431474.07 5798044.47,3431568.02 5798028.97,3431644.53 5798012.51),(3433260.06 5797002.92,3433234.61 5797070.25,3433138.56 5797278.81,3433074.19 5797398.94,3433033.73 5797461.79,3432961.43 5797551.84,3432882.76 5797626.57,3432780.32 5797701.09,3432706.28 5797743.23,3432542.66 5797808.05,3432360.32 5797842.47,3432258.52 5797836.77,3432197.62 5797837.57,3432081.75 5797865.64,3431876.6 5797945.1,3431865.15 5797948.73),(3431865.15 5797948.73,3431644.53 5798012.51),(3431865.15 5797948.73,3431815.75 5797807.76),(3433260.06 5797002.92,3433361.19 5796788.54,3433467.4 5796572.78,3433670.6 5796160.06),(3433670.6 5796160.06,3433709.27 5796096.88,3433744.46 5796021.84,3433861.98 5795869.38,3434029.1 5795680.43,3434229.42 5795456.34,3434239.36 5795425.11,3434296.02 5795363.18))'), 0); - -SELECT 'multiline_04', ST_AsGML(2, GeomFromEWKT('MULTILINESTRING((3429562.6 5799490.68,3429750.99 5799199.87,3429825.45 5799078.39,3429901.8 5798961.45,3429995.54 5798822.93,3430072.89 5798719.46,3430216 5798558.95,3430272.08 5798489.33,3430393.87 5798328.51,3430463.53 5798251.11,3430532.22 5798190.16,3430591.24 5798149.53,3430667.67 5798108.9,3430723.78 5798088.58,3430797.33 5798067.95,3430857.34 5798056.34,3430912.52 5798051.5,3430961.89 5798048.59,3431052.88 5798053.43,3431159.36 5798059.24,3431218.41 5798061.18,3431366.56 5798056.09,3431474.07 5798044.47,3431568.02 5798028.97,3431644.53 5798012.51),(3433260.06 5797002.92,3433234.61 5797070.25,3433138.56 5797278.81,3433074.19 5797398.94,3433033.73 5797461.79,3432961.43 5797551.84,3432882.76 5797626.57,3432780.32 5797701.09,3432706.28 5797743.23,3432542.66 5797808.05,3432360.32 5797842.47,3432258.52 5797836.77,3432197.62 5797837.57,3432081.75 5797865.64,3431876.6 5797945.1,3431865.15 5797948.73),(3431865.15 5797948.73,3431644.53 5798012.51),(3431865.15 5797948.73,3431815.75 5797807.76),(3433260.06 5797002.92,3433361.19 5796788.54,3433467.4 5796572.78,3433670.6 5796160.06),(3433670.6 5796160.06,3433709.27 5796096.88,3433744.46 5796021.84,3433861.98 5795869.38,3434029.1 5795680.43,3434229.42 5795456.34,3434239.36 5795425.11,3434296.02 5795363.18))'), 0); - - - --- --- MultiPolygon --- - --- Geometry from frida project: --- Leyer Holz Park --- st_astext(geomunion(the_geom)) FROM park WHERE gfname='Leyer Holz'; - -SELECT 'multipolygon_01', ST_AsGML(2, GeomFromEWKT('MULTIPOLYGON(((3429699.81 5795851.64,3429736.72 5795796.01,3429754.71 5795768.88,3429996.1 5795489.98,3430100.67 5795435.76,3430122.61 5795446.09,3430138.1 5795560.98,3430311.09 5795559.69,3430309.8 5795470.62,3430329.16 5795416.4,3430326.58 5795399.62,3430157.47 5795418.98,3430156.14 5795407.32,3430139.36 5795396.99,3429983.19 5795394.41,3429976.74 5795420.22,3429789.59 5795418.93,3429643.74 5795475.72,3429635.72 5795615.31,3429484.94 5795556.38,3429315.44 5795496.32,3429326.12 5795748.57,3429129.92 5795704.53,3429176.64 5795776.6,3429100.6 5795797.17,3428900.44 5795742.46,3428896.43 5795779.82,3428805.69 5795953.3,3428897.77 5796025.35,3428897.77 5796225.99,3428696.32 5796199.31,3428681.64 5796217.99,3428680.31 5796290.03,3428290.14 5796351.8,3428389.67 5796413.87,3428837.71 5796561.12,3428991.08 5796495.01,3429076.4 5796760.29,3429428.31 5796723.61,3429474.96 5796690.29,3429696.2 5796600.99,3429658.88 5796429.06,3429536.27 5796363.75,3429529.6 5796333.1,3429446.08 5796253.84,3429699.81 5795851.64)),((3429857.62 5799440.07,3429873.86 5799496.16,3429904.86 5799503.55,3429972.77 5799561.12,3430034.77 5799577.36,3430031.82 5799639.36,3430139.59 5799691.03,3430146.97 5799724.99,3430271.57 5799792.88,3430289.29 5799776.64,3430312.91 5799662.95,3430416.27 5799710.2,3430419.22 5799614.22,3430268.61 5799612.75,3430291.3 5799203.76,3430255.86 5799175.7,3430214.51 5799347,3430183.49 5799355.87,3430180.54 5799366.2,3430146.57 5799367.68,3430142.14 5799349.96,3430065.35 5799375.06,3429961.97 5799426.75,3429857.62 5799440.07)))'), 2); - -SELECT 'multipolygon_02', ST_AsGML(3, GeomFromEWKT('MULTIPOLYGON(((3429699.81 5795851.64,3429736.72 5795796.01,3429754.71 5795768.88,3429996.1 5795489.98,3430100.67 5795435.76,3430122.61 5795446.09,3430138.1 5795560.98,3430311.09 5795559.69,3430309.8 5795470.62,3430329.16 5795416.4,3430326.58 5795399.62,3430157.47 5795418.98,3430156.14 5795407.32,3430139.36 5795396.99,3429983.19 5795394.41,3429976.74 5795420.22,3429789.59 5795418.93,3429643.74 5795475.72,3429635.72 5795615.31,3429484.94 5795556.38,3429315.44 5795496.32,3429326.12 5795748.57,3429129.92 5795704.53,3429176.64 5795776.6,3429100.6 5795797.17,3428900.44 5795742.46,3428896.43 5795779.82,3428805.69 5795953.3,3428897.77 5796025.35,3428897.77 5796225.99,3428696.32 5796199.31,3428681.64 5796217.99,3428680.31 5796290.03,3428290.14 5796351.8,3428389.67 5796413.87,3428837.71 5796561.12,3428991.08 5796495.01,3429076.4 5796760.29,3429428.31 5796723.61,3429474.96 5796690.29,3429696.2 5796600.99,3429658.88 5796429.06,3429536.27 5796363.75,3429529.6 5796333.1,3429446.08 5796253.84,3429699.81 5795851.64)),((3429857.62 5799440.07,3429873.86 5799496.16,3429904.86 5799503.55,3429972.77 5799561.12,3430034.77 5799577.36,3430031.82 5799639.36,3430139.59 5799691.03,3430146.97 5799724.99,3430271.57 5799792.88,3430289.29 5799776.64,3430312.91 5799662.95,3430416.27 5799710.2,3430419.22 5799614.22,3430268.61 5799612.75,3430291.3 5799203.76,3430255.86 5799175.7,3430214.51 5799347,3430183.49 5799355.87,3430180.54 5799366.2,3430146.57 5799367.68,3430142.14 5799349.96,3430065.35 5799375.06,3429961.97 5799426.75,3429857.62 5799440.07)))'), 2); - -SELECT 'multipolygon_03', ST_AsGML(2, GeomFromEWKT('MULTIPOLYGON(((3429699.81 5795851.64,3429736.72 5795796.01,3429754.71 5795768.88,3429996.1 5795489.98,3430100.67 5795435.76,3430122.61 5795446.09,3430138.1 5795560.98,3430311.09 5795559.69,3430309.8 5795470.62,3430329.16 5795416.4,3430326.58 5795399.62,3430157.47 5795418.98,3430156.14 5795407.32,3430139.36 5795396.99,3429983.19 5795394.41,3429976.74 5795420.22,3429789.59 5795418.93,3429643.74 5795475.72,3429635.72 5795615.31,3429484.94 5795556.38,3429315.44 5795496.32,3429326.12 5795748.57,3429129.92 5795704.53,3429176.64 5795776.6,3429100.6 5795797.17,3428900.44 5795742.46,3428896.43 5795779.82,3428805.69 5795953.3,3428897.77 5796025.35,3428897.77 5796225.99,3428696.32 5796199.31,3428681.64 5796217.99,3428680.31 5796290.03,3428290.14 5796351.8,3428389.67 5796413.87,3428837.71 5796561.12,3428991.08 5796495.01,3429076.4 5796760.29,3429428.31 5796723.61,3429474.96 5796690.29,3429696.2 5796600.99,3429658.88 5796429.06,3429536.27 5796363.75,3429529.6 5796333.1,3429446.08 5796253.84,3429699.81 5795851.64)),((3429857.62 5799440.07,3429873.86 5799496.16,3429904.86 5799503.55,3429972.77 5799561.12,3430034.77 5799577.36,3430031.82 5799639.36,3430139.59 5799691.03,3430146.97 5799724.99,3430271.57 5799792.88,3430289.29 5799776.64,3430312.91 5799662.95,3430416.27 5799710.2,3430419.22 5799614.22,3430268.61 5799612.75,3430291.3 5799203.76,3430255.86 5799175.7,3430214.51 5799347,3430183.49 5799355.87,3430180.54 5799366.2,3430146.57 5799367.68,3430142.14 5799349.96,3430065.35 5799375.06,3429961.97 5799426.75,3429857.62 5799440.07)))'), 0); - -SELECT 'multipolygon_04', ST_AsGML(3, GeomFromEWKT('MULTIPOLYGON(((3429699.81 5795851.64,3429736.72 5795796.01,3429754.71 5795768.88,3429996.1 5795489.98,3430100.67 5795435.76,3430122.61 5795446.09,3430138.1 5795560.98,3430311.09 5795559.69,3430309.8 5795470.62,3430329.16 5795416.4,3430326.58 5795399.62,3430157.47 5795418.98,3430156.14 5795407.32,3430139.36 5795396.99,3429983.19 5795394.41,3429976.74 5795420.22,3429789.59 5795418.93,3429643.74 5795475.72,3429635.72 5795615.31,3429484.94 5795556.38,3429315.44 5795496.32,3429326.12 5795748.57,3429129.92 5795704.53,3429176.64 5795776.6,3429100.6 5795797.17,3428900.44 5795742.46,3428896.43 5795779.82,3428805.69 5795953.3,3428897.77 5796025.35,3428897.77 5796225.99,3428696.32 5796199.31,3428681.64 5796217.99,3428680.31 5796290.03,3428290.14 5796351.8,3428389.67 5796413.87,3428837.71 5796561.12,3428991.08 5796495.01,3429076.4 5796760.29,3429428.31 5796723.61,3429474.96 5796690.29,3429696.2 5796600.99,3429658.88 5796429.06,3429536.27 5796363.75,3429529.6 5796333.1,3429446.08 5796253.84,3429699.81 5795851.64)),((3429857.62 5799440.07,3429873.86 5799496.16,3429904.86 5799503.55,3429972.77 5799561.12,3430034.77 5799577.36,3430031.82 5799639.36,3430139.59 5799691.03,3430146.97 5799724.99,3430271.57 5799792.88,3430289.29 5799776.64,3430312.91 5799662.95,3430416.27 5799710.2,3430419.22 5799614.22,3430268.61 5799612.75,3430291.3 5799203.76,3430255.86 5799175.7,3430214.51 5799347,3430183.49 5799355.87,3430180.54 5799366.2,3430146.57 5799367.68,3430142.14 5799349.96,3430065.35 5799375.06,3429961.97 5799426.75,3429857.62 5799440.07)))'), 0); - - --- --- GeometryCollection --- - --- SELECT astext(collect((SELECT collect(the_geom) FROM poi WHERE poitypname='Schule'), (SELECT collect(st_linemerge(the_geom)) FROM river WHERE glname='Stichkanal'))); - --- Geometry from frida project: -SELECT 'geometrycollection_01', ST_AsGML(2, GeomFromEWKT('GEOMETRYCOLLECTION(MULTIPOINT(3433276.43 5795308.93,3428545.3 5795827.75,3431576.99 5799084.19,3431724.2 5797152.59,3431984.2 5796564.79,3435147.61 5797649.58,3434660.86 5796941.74,3434674.52 5797030.54,3435714.36 5797022.6,3436368.88 5796951.04,3436730.03 5796768.6,3435538.55 5796267.1,3435847.22 5795917.96,3434312.09 5794846.02,3433121.69 5793670.73,3433176.36 5793489.29,3434316.04 5793940.09,3433222.92 5793040.49,3433416.13 5792891.62,3430717.47 5792600.58,3435384.08 5792877.68,3435229.15 5792177.25,3435120 5792319.07,3435088.72 5792111.21,3434484.89 5792110.2,3435777.91 5792419.49,3435717.37 5794318.12,3436895.13 5794569.43,3437621.86 5793931.6,3435597.14 5793467.9,3435246.51 5793394.63,3434722.1 5793374.87,3434712.16 5793810.3,3434773.28 5793816.87,3434629.91 5793855.31,3434992.34 5794140.1,3434927.13 5794252.29,3434958.58 5794286.16,3435120.48 5794163.36,3435850.1 5791727.49,3435930.75 5791636.32,3436268.87 5791882.68,3437110.23 5791664.12,3435960.34 5790928.2,3433545.81 5789755.43,3439096.86 5790884.26,3438576.87 5795046.69,3438396.95 5794858.59,3438193.25 5794695.6,3438447.92 5796130.77,3440688.22 5793670.37),MULTILINESTRING((3429562.6 5799490.68,3429750.99 5799199.87,3429825.45 5799078.39,3429901.8 5798961.45,3429995.54 5798822.93,3430072.89 5798719.46,3430216 5798558.95,3430272.08 5798489.33,3430393.87 5798328.51,3430463.53 5798251.11,3430532.22 5798190.16,3430591.24 5798149.53,3430667.67 5798108.9,3430723.78 5798088.58,3430797.33 5798067.95,3430857.34 5798056.34,3430912.52 5798051.5,3430961.89 5798048.59,3431052.88 5798053.43,3431159.36 5798059.24,3431218.41 5798061.18,3431366.56 5798056.09,3431474.07 5798044.47,3431568.02 5798028.97,3431644.53 5798012.51),(3433260.06 5797002.92,3433234.61 5797070.25,3433138.56 5797278.81,3433074.19 5797398.94,3433033.73 5797461.79,3432961.43 5797551.84,3432882.76 5797626.57,3432780.32 5797701.09,3432706.28 5797743.23,3432542.66 5797808.05,3432360.32 5797842.47,3432258.52 5797836.77,3432197.62 5797837.57,3432081.75 5797865.64,3431876.6 5797945.1,3431865.15 5797948.73),(3431865.15 5797948.73,3431644.53 5798012.51),(3431865.15 5797948.73,3431815.75 5797807.76),(3433260.06 5797002.92,3433361.19 5796788.54,3433467.4 5796572.78,3433670.6 5796160.06),(3433670.6 5796160.06,3433709.27 5796096.88,3433744.46 5796021.84,3433861.98 5795869.38,3434029.1 5795680.43,3434229.42 5795456.34,3434239.36 5795425.11,3434296.02 5795363.18)))'), 2); - - -SELECT 'geometrycollection_02', ST_AsGML(3, GeomFromEWKT('GEOMETRYCOLLECTION(MULTIPOINT(3433276.43 5795308.93,3428545.3 5795827.75,3431576.99 5799084.19,3431724.2 5797152.59,3431984.2 5796564.79,3435147.61 5797649.58,3434660.86 5796941.74,3434674.52 5797030.54,3435714.36 5797022.6,3436368.88 5796951.04,3436730.03 5796768.6,3435538.55 5796267.1,3435847.22 5795917.96,3434312.09 5794846.02,3433121.69 5793670.73,3433176.36 5793489.29,3434316.04 5793940.09,3433222.92 5793040.49,3433416.13 5792891.62,3430717.47 5792600.58,3435384.08 5792877.68,3435229.15 5792177.25,3435120 5792319.07,3435088.72 5792111.21,3434484.89 5792110.2,3435777.91 5792419.49,3435717.37 5794318.12,3436895.13 5794569.43,3437621.86 5793931.6,3435597.14 5793467.9,3435246.51 5793394.63,3434722.1 5793374.87,3434712.16 5793810.3,3434773.28 5793816.87,3434629.91 5793855.31,3434992.34 5794140.1,3434927.13 5794252.29,3434958.58 5794286.16,3435120.48 5794163.36,3435850.1 5791727.49,3435930.75 5791636.32,3436268.87 5791882.68,3437110.23 5791664.12,3435960.34 5790928.2,3433545.81 5789755.43,3439096.86 5790884.26,3438576.87 5795046.69,3438396.95 5794858.59,3438193.25 5794695.6,3438447.92 5796130.77,3440688.22 5793670.37),MULTILINESTRING((3429562.6 5799490.68,3429750.99 5799199.87,3429825.45 5799078.39,3429901.8 5798961.45,3429995.54 5798822.93,3430072.89 5798719.46,3430216 5798558.95,3430272.08 5798489.33,3430393.87 5798328.51,3430463.53 5798251.11,3430532.22 5798190.16,3430591.24 5798149.53,3430667.67 5798108.9,3430723.78 5798088.58,3430797.33 5798067.95,3430857.34 5798056.34,3430912.52 5798051.5,3430961.89 5798048.59,3431052.88 5798053.43,3431159.36 5798059.24,3431218.41 5798061.18,3431366.56 5798056.09,3431474.07 5798044.47,3431568.02 5798028.97,3431644.53 5798012.51),(3433260.06 5797002.92,3433234.61 5797070.25,3433138.56 5797278.81,3433074.19 5797398.94,3433033.73 5797461.79,3432961.43 5797551.84,3432882.76 5797626.57,3432780.32 5797701.09,3432706.28 5797743.23,3432542.66 5797808.05,3432360.32 5797842.47,3432258.52 5797836.77,3432197.62 5797837.57,3432081.75 5797865.64,3431876.6 5797945.1,3431865.15 5797948.73),(3431865.15 5797948.73,3431644.53 5798012.51),(3431865.15 5797948.73,3431815.75 5797807.76),(3433260.06 5797002.92,3433361.19 5796788.54,3433467.4 5796572.78,3433670.6 5796160.06),(3433670.6 5796160.06,3433709.27 5796096.88,3433744.46 5796021.84,3433861.98 5795869.38,3434029.1 5795680.43,3434229.42 5795456.34,3434239.36 5795425.11,3434296.02 5795363.18)))'), 2); - - -SELECT 'geometrycollection_03', ST_AsGML(2, GeomFromEWKT('GEOMETRYCOLLECTION(MULTIPOINT(3433276.43 5795308.93,3428545.3 5795827.75,3431576.99 5799084.19,3431724.2 5797152.59,3431984.2 5796564.79,3435147.61 5797649.58,3434660.86 5796941.74,3434674.52 5797030.54,3435714.36 5797022.6,3436368.88 5796951.04,3436730.03 5796768.6,3435538.55 5796267.1,3435847.22 5795917.96,3434312.09 5794846.02,3433121.69 5793670.73,3433176.36 5793489.29,3434316.04 5793940.09,3433222.92 5793040.49,3433416.13 5792891.62,3430717.47 5792600.58,3435384.08 5792877.68,3435229.15 5792177.25,3435120 5792319.07,3435088.72 5792111.21,3434484.89 5792110.2,3435777.91 5792419.49,3435717.37 5794318.12,3436895.13 5794569.43,3437621.86 5793931.6,3435597.14 5793467.9,3435246.51 5793394.63,3434722.1 5793374.87,3434712.16 5793810.3,3434773.28 5793816.87,3434629.91 5793855.31,3434992.34 5794140.1,3434927.13 5794252.29,3434958.58 5794286.16,3435120.48 5794163.36,3435850.1 5791727.49,3435930.75 5791636.32,3436268.87 5791882.68,3437110.23 5791664.12,3435960.34 5790928.2,3433545.81 5789755.43,3439096.86 5790884.26,3438576.87 5795046.69,3438396.95 5794858.59,3438193.25 5794695.6,3438447.92 5796130.77,3440688.22 5793670.37),MULTILINESTRING((3429562.6 5799490.68,3429750.99 5799199.87,3429825.45 5799078.39,3429901.8 5798961.45,3429995.54 5798822.93,3430072.89 5798719.46,3430216 5798558.95,3430272.08 5798489.33,3430393.87 5798328.51,3430463.53 5798251.11,3430532.22 5798190.16,3430591.24 5798149.53,3430667.67 5798108.9,3430723.78 5798088.58,3430797.33 5798067.95,3430857.34 5798056.34,3430912.52 5798051.5,3430961.89 5798048.59,3431052.88 5798053.43,3431159.36 5798059.24,3431218.41 5798061.18,3431366.56 5798056.09,3431474.07 5798044.47,3431568.02 5798028.97,3431644.53 5798012.51),(3433260.06 5797002.92,3433234.61 5797070.25,3433138.56 5797278.81,3433074.19 5797398.94,3433033.73 5797461.79,3432961.43 5797551.84,3432882.76 5797626.57,3432780.32 5797701.09,3432706.28 5797743.23,3432542.66 5797808.05,3432360.32 5797842.47,3432258.52 5797836.77,3432197.62 5797837.57,3432081.75 5797865.64,3431876.6 5797945.1,3431865.15 5797948.73),(3431865.15 5797948.73,3431644.53 5798012.51),(3431865.15 5797948.73,3431815.75 5797807.76),(3433260.06 5797002.92,3433361.19 5796788.54,3433467.4 5796572.78,3433670.6 5796160.06),(3433670.6 5796160.06,3433709.27 5796096.88,3433744.46 5796021.84,3433861.98 5795869.38,3434029.1 5795680.43,3434229.42 5795456.34,3434239.36 5795425.11,3434296.02 5795363.18)))'), 0); - - -SELECT 'geometrycollection_04', ST_AsGML(3, GeomFromEWKT('GEOMETRYCOLLECTION(MULTIPOINT(3433276.43 5795308.93,3428545.3 5795827.75,3431576.99 5799084.19,3431724.2 5797152.59,3431984.2 5796564.79,3435147.61 5797649.58,3434660.86 5796941.74,3434674.52 5797030.54,3435714.36 5797022.6,3436368.88 5796951.04,3436730.03 5796768.6,3435538.55 5796267.1,3435847.22 5795917.96,3434312.09 5794846.02,3433121.69 5793670.73,3433176.36 5793489.29,3434316.04 5793940.09,3433222.92 5793040.49,3433416.13 5792891.62,3430717.47 5792600.58,3435384.08 5792877.68,3435229.15 5792177.25,3435120 5792319.07,3435088.72 5792111.21,3434484.89 5792110.2,3435777.91 5792419.49,3435717.37 5794318.12,3436895.13 5794569.43,3437621.86 5793931.6,3435597.14 5793467.9,3435246.51 5793394.63,3434722.1 5793374.87,3434712.16 5793810.3,3434773.28 5793816.87,3434629.91 5793855.31,3434992.34 5794140.1,3434927.13 5794252.29,3434958.58 5794286.16,3435120.48 5794163.36,3435850.1 5791727.49,3435930.75 5791636.32,3436268.87 5791882.68,3437110.23 5791664.12,3435960.34 5790928.2,3433545.81 5789755.43,3439096.86 5790884.26,3438576.87 5795046.69,3438396.95 5794858.59,3438193.25 5794695.6,3438447.92 5796130.77,3440688.22 5793670.37),MULTILINESTRING((3429562.6 5799490.68,3429750.99 5799199.87,3429825.45 5799078.39,3429901.8 5798961.45,3429995.54 5798822.93,3430072.89 5798719.46,3430216 5798558.95,3430272.08 5798489.33,3430393.87 5798328.51,3430463.53 5798251.11,3430532.22 5798190.16,3430591.24 5798149.53,3430667.67 5798108.9,3430723.78 5798088.58,3430797.33 5798067.95,3430857.34 5798056.34,3430912.52 5798051.5,3430961.89 5798048.59,3431052.88 5798053.43,3431159.36 5798059.24,3431218.41 5798061.18,3431366.56 5798056.09,3431474.07 5798044.47,3431568.02 5798028.97,3431644.53 5798012.51),(3433260.06 5797002.92,3433234.61 5797070.25,3433138.56 5797278.81,3433074.19 5797398.94,3433033.73 5797461.79,3432961.43 5797551.84,3432882.76 5797626.57,3432780.32 5797701.09,3432706.28 5797743.23,3432542.66 5797808.05,3432360.32 5797842.47,3432258.52 5797836.77,3432197.62 5797837.57,3432081.75 5797865.64,3431876.6 5797945.1,3431865.15 5797948.73),(3431865.15 5797948.73,3431644.53 5798012.51),(3431865.15 5797948.73,3431815.75 5797807.76),(3433260.06 5797002.92,3433361.19 5796788.54,3433467.4 5796572.78,3433670.6 5796160.06),(3433670.6 5796160.06,3433709.27 5796096.88,3433744.46 5796021.84,3433861.98 5795869.38,3434029.1 5795680.43,3434229.42 5795456.34,3434239.36 5795425.11,3434296.02 5795363.18)))'), 0); - - -SELECT 'geometrycollection_05', ST_AsGML(2, GeomFromText('GEOMETRYCOLLECTION(LINESTRING(1 2, 3 4), MULTIPOINT(5 6, 7 8), GEOMETRYCOLLECTION(POINT(9 10)))')); - -SELECT 'geometrycollection_06', ST_AsGML(3, GeomFromText('GEOMETRYCOLLECTION(LINESTRING(1 2, 3 4), MULTIPOINT(5 6, 7 8), GEOMETRYCOLLECTION(POINT(9 10)))')); - --- --- Unsupported Geometry --- (From AsKml units test) --- -SELECT 'invalid_01', ST_AsGML(GeomFromEWKT('SRID=4326;CIRCULARSTRING(-2 0,0 2,2 0,0 2,2 4)')); -SELECT 'invalid_02', ST_AsGML(GeomFromEWKT('SRID=4326;COMPOUNDCURVE(CIRCULARSTRING(0 0,1 1,1 0),(1 0,0 1))')); -SELECT 'invalid_03', ST_AsGML(GeomFromEWKT('SRID=4326;CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0))')); -SELECT 'invalid_04', ST_AsGML(GeomFromEWKT('SRID=4326;MULTICURVE((5 5,3 5,3 3,0 3),CIRCULARSTRING(0 0,2 1,2 2))')); -SELECT 'invalid_05', ST_AsGML(GeomFromEWKT('SRID=4326;MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)),((7 8,10 10,6 14,4 11,7 8)))')); - - --- --- 3D Data --- -SELECT '3D_01', ST_AsGML(GeomFromEWKT('SRID=4326;POINT(1 1 1)')); -SELECT '3D_02', ST_AsGML(GeomFromEWKT('SRID=4326;POINT(1 1 1)'), 0); -SELECT '3D_03', ST_AsGML(GeomFromEWKT('SRID=4326;LINESTRING(1 1 1, 2 2 2, 3 3 3, 4 4 4)'), 0); -SELECT '3D_04', ST_AsGML(GeomFromEWKT('SRID=4326;POLYGON((1 1 1, 2 2 2, 3 3 3, 4 4 4, 5 5 5, 5 0 0, 1 1 1))'), 0); - --- --- Delete inserted spatial data --- -DELETE FROM spatial_ref_sys WHERE srid = 4326; -DELETE FROM spatial_ref_sys WHERE srid = 27572; -DELETE FROM spatial_ref_sys WHERE srid = 31467; diff -Nru postgis-1.5.3/regress/gml_expected postgis-2.0.1/regress/gml_expected --- postgis-1.5.3/regress/gml_expected 2010-12-14 13:14:14.000000000 +0000 +++ postgis-2.0.1/regress/gml_expected 1970-01-01 00:00:00.000000000 +0000 @@ -1,71 +0,0 @@ -simple_point|1,1 -empty_geom| -precision_01|1,1 -precision_02|1.111,1.111 -precision_03|1,1 -precision_04|1.1111111,1.1111111 -version_01|1,1 -version_02|1 1 -ERROR: Only GML 2 and GML 3 are supported -ERROR: Only GML 2 and GML 3 are supported -option_01|1,1 -option_02|1 1 -deegree_01|1 2 -deegree_02|1,2 -deegree_03|2 1 -deegree_04|1 2 3 -deegree_05|1,2,3 -deegree_06|2 1 3 -deegree_07|1 2 2 3 4 5 -deegree_08|1,2 2,3 4,5 -deegree_09|2 1 3 2 5 4 -deegree_10|1 2 2 3 4 5 3 2 1 2 -deegree_11|1,2 2,3 4,5 3,2 1,2 -deegree_12|2 1 3 2 5 4 2 3 2 1 -deegree_13|1 22 34 5 -deegree_14|1,22,34,5 -deegree_15|2 13 25 4 -deegree_16|1 2 2 3 4 5 -deegree_17|1,2 2,3 4,5 -deegree_18|2 1 3 2 5 4 -deegree_19|1 2 2 3 4 5 3 2 1 2 -deegree_20|1,2 2,3 4,5 3,2 1,2 -deegree_21|2 1 3 2 5 4 2 3 2 1 -deegree_22|1 2 2 3 4 5 3 2 1 21 2 2 3 4 51 23 4 -deegree_23|1,2 2,3 4,5 3,2 1,21,2 2,3 4,51,23,4 -deegree_24|2 1 3 2 5 4 2 3 2 12 1 3 2 5 42 14 3 -line_01|3429562.6,5799490.68 3429750.99,5799199.87 3429825.45,5799078.39 3429901.8,5798961.45 3429995.54,5798822.93 3430072.89,5798719.46 3430216,5798558.95 3430272.08,5798489.33 3430393.87,5798328.51 3430463.53,5798251.11 3430532.22,5798190.16 3430591.24,5798149.53 3430667.67,5798108.9 3430723.78,5798088.58 3430797.33,5798067.95 3430857.34,5798056.34 3430912.52,5798051.5 3430961.89,5798048.59 3431052.88,5798053.43 3431159.36,5798059.24 3431218.41,5798061.18 3431366.56,5798056.09 3431474.07,5798044.47 3431568.02,5798028.97 3431644.53,5798012.51 -line_02|3429562.6 5799490.68 3429750.99 5799199.87 3429825.45 5799078.39 3429901.8 5798961.45 3429995.54 5798822.93 3430072.89 5798719.46 3430216 5798558.95 3430272.08 5798489.33 3430393.87 5798328.51 3430463.53 5798251.11 3430532.22 5798190.16 3430591.24 5798149.53 3430667.67 5798108.9 3430723.78 5798088.58 3430797.33 5798067.95 3430857.34 5798056.34 3430912.52 5798051.5 3430961.89 5798048.59 3431052.88 5798053.43 3431159.36 5798059.24 3431218.41 5798061.18 3431366.56 5798056.09 3431474.07 5798044.47 3431568.02 5798028.97 3431644.53 5798012.51 -line_03|3429563,5799491 3429751,5799200 3429825,5799078 3429902,5798961 3429996,5798823 3430073,5798719 3430216,5798559 3430272,5798489 3430394,5798329 3430464,5798251 3430532,5798190 3430591,5798150 3430668,5798109 3430724,5798089 3430797,5798068 3430857,5798056 3430913,5798052 3430962,5798049 3431053,5798053 3431159,5798059 3431218,5798061 3431367,5798056 3431474,5798044 3431568,5798029 3431645,5798013 -line_04|3429563 5799491 3429751 5799200 3429825 5799078 3429902 5798961 3429996 5798823 3430073 5798719 3430216 5798559 3430272 5798489 3430394 5798329 3430464 5798251 3430532 5798190 3430591 5798150 3430668 5798109 3430724 5798089 3430797 5798068 3430857 5798056 3430913 5798052 3430962 5798049 3431053 5798053 3431159 5798059 3431218 5798061 3431367 5798056 3431474 5798044 3431568 5798029 3431645 5798013 -polygon_01|3429857.62,5799440.07 3429873.86,5799496.16 3429904.86,5799503.55 3429972.77,5799561.12 3430034.77,5799577.36 3430031.82,5799639.36 3430139.59,5799691.03 3430146.97,5799724.99 3430271.57,5799792.88 3430289.29,5799776.64 3430312.91,5799662.95 3430416.27,5799710.2 3430419.22,5799614.22 3430268.61,5799612.75 3430291.3,5799203.76 3430255.86,5799175.7 3430214.51,5799347 3430183.49,5799355.87 3430180.54,5799366.2 3430146.57,5799367.68 3430142.14,5799349.96 3430065.35,5799375.06 3429961.97,5799426.75 3429857.62,5799440.07 -polygon_02|3429857.62 5799440.07 3429873.86 5799496.16 3429904.86 5799503.55 3429972.77 5799561.12 3430034.77 5799577.36 3430031.82 5799639.36 3430139.59 5799691.03 3430146.97 5799724.99 3430271.57 5799792.88 3430289.29 5799776.64 3430312.91 5799662.95 3430416.27 5799710.2 3430419.22 5799614.22 3430268.61 5799612.75 3430291.3 5799203.76 3430255.86 5799175.7 3430214.51 5799347 3430183.49 5799355.87 3430180.54 5799366.2 3430146.57 5799367.68 3430142.14 5799349.96 3430065.35 5799375.06 3429961.97 5799426.75 3429857.62 5799440.07 -polygon_03|3429858,5799440 3429874,5799496 3429905,5799504 3429973,5799561 3430035,5799577 3430032,5799639 3430140,5799691 3430147,5799725 3430272,5799793 3430289,5799777 3430313,5799663 3430416,5799710 3430419,5799614 3430269,5799613 3430291,5799204 3430256,5799176 3430215,5799347 3430183,5799356 3430181,5799366 3430147,5799368 3430142,5799350 3430065,5799375 3429962,5799427 3429858,5799440 -polygon_04|3429858 5799440 3429874 5799496 3429905 5799504 3429973 5799561 3430035 5799577 3430032 5799639 3430140 5799691 3430147 5799725 3430272 5799793 3430289 5799777 3430313 5799663 3430416 5799710 3430419 5799614 3430269 5799613 3430291 5799204 3430256 5799176 3430215 5799347 3430183 5799356 3430181 5799366 3430147 5799368 3430142 5799350 3430065 5799375 3429962 5799427 3429858 5799440 -multipoint_01|3433276.43,5795308.933428545.3,5795827.753431576.99,5799084.193431724.2,5797152.593431984.2,5796564.793435147.61,5797649.583434660.86,5796941.743434674.52,5797030.543435714.36,5797022.63436368.88,5796951.043436730.03,5796768.63435538.55,5796267.13435847.22,5795917.963434312.09,5794846.023433121.69,5793670.733433176.36,5793489.293434316.04,5793940.093433222.92,5793040.493433416.13,5792891.623430717.47,5792600.583435384.08,5792877.683435229.15,5792177.253435120,5792319.073435088.72,5792111.213434484.89,5792110.23435777.91,5792419.493435717.37,5794318.123436895.13,5794569.433437621.86,5793931.63435597.14,5793467.93435246.51,5793394.633434722.1,5793374.873434712.16,5793810.33434773.28,5793816.873434629.91,5793855.313434992.34,5794140.13434927.13,5794252.293434958.58,5794286.163435120.48,5794163.363435850.1,5791727.493435930.75,5791636.323436268.87,5791882.683437110.23,5791664.123435960.34,5790928.23433545.81,5789755.433439096.86,5790884.263438576.87,5795046.693438396.95,5794858.593438193.25,5794695.63438447.92,5796130.773440688.22,5793670.37 -multipoint_02|3433276.43 5795308.933428545.3 5795827.753431576.99 5799084.193431724.2 5797152.593431984.2 5796564.793435147.61 5797649.583434660.86 5796941.743434674.52 5797030.543435714.36 5797022.63436368.88 5796951.043436730.03 5796768.63435538.55 5796267.13435847.22 5795917.963434312.09 5794846.023433121.69 5793670.733433176.36 5793489.293434316.04 5793940.093433222.92 5793040.493433416.13 5792891.623430717.47 5792600.583435384.08 5792877.683435229.15 5792177.253435120 5792319.073435088.72 5792111.213434484.89 5792110.23435777.91 5792419.493435717.37 5794318.123436895.13 5794569.433437621.86 5793931.63435597.14 5793467.93435246.51 5793394.633434722.1 5793374.873434712.16 5793810.33434773.28 5793816.873434629.91 5793855.313434992.34 5794140.13434927.13 5794252.293434958.58 5794286.163435120.48 5794163.363435850.1 5791727.493435930.75 5791636.323436268.87 5791882.683437110.23 5791664.123435960.34 5790928.23433545.81 5789755.433439096.86 5790884.263438576.87 5795046.693438396.95 5794858.593438193.25 5794695.63438447.92 5796130.773440688.22 5793670.37 -multipoint_03|3433276,57953093428545,57958283431577,57990843431724,57971533431984,57965653435148,57976503434661,57969423434675,57970313435714,57970233436369,57969513436730,57967693435539,57962673435847,57959183434312,57948463433122,57936713433176,57934893434316,57939403433223,57930403433416,57928923430717,57926013435384,57928783435229,57921773435120,57923193435089,57921113434485,57921103435778,57924193435717,57943183436895,57945693437622,57939323435597,57934683435247,57933953434722,57933753434712,57938103434773,57938173434630,57938553434992,57941403434927,57942523434959,57942863435120,57941633435850,57917273435931,57916363436269,57918833437110,57916643435960,57909283433546,57897553439097,57908843438577,57950473438397,57948593438193,57946963438448,57961313440688,5793670 -multipoint_04|3433276 57953093428545 57958283431577 57990843431724 57971533431984 57965653435148 57976503434661 57969423434675 57970313435714 57970233436369 57969513436730 57967693435539 57962673435847 57959183434312 57948463433122 57936713433176 57934893434316 57939403433223 57930403433416 57928923430717 57926013435384 57928783435229 57921773435120 57923193435089 57921113434485 57921103435778 57924193435717 57943183436895 57945693437622 57939323435597 57934683435247 57933953434722 57933753434712 57938103434773 57938173434630 57938553434992 57941403434927 57942523434959 57942863435120 57941633435850 57917273435931 57916363436269 57918833437110 57916643435960 57909283433546 57897553439097 57908843438577 57950473438397 57948593438193 57946963438448 57961313440688 5793670 -multiline_01|3429562.6,5799490.68 3429750.99,5799199.87 3429825.45,5799078.39 3429901.8,5798961.45 3429995.54,5798822.93 3430072.89,5798719.46 3430216,5798558.95 3430272.08,5798489.33 3430393.87,5798328.51 3430463.53,5798251.11 3430532.22,5798190.16 3430591.24,5798149.53 3430667.67,5798108.9 3430723.78,5798088.58 3430797.33,5798067.95 3430857.34,5798056.34 3430912.52,5798051.5 3430961.89,5798048.59 3431052.88,5798053.43 3431159.36,5798059.24 3431218.41,5798061.18 3431366.56,5798056.09 3431474.07,5798044.47 3431568.02,5798028.97 3431644.53,5798012.513433260.06,5797002.92 3433234.61,5797070.25 3433138.56,5797278.81 3433074.19,5797398.94 3433033.73,5797461.79 3432961.43,5797551.84 3432882.76,5797626.57 3432780.32,5797701.09 3432706.28,5797743.23 3432542.66,5797808.05 3432360.32,5797842.47 3432258.52,5797836.77 3432197.62,5797837.57 3432081.75,5797865.64 3431876.6,5797945.1 3431865.15,5797948.733431865.15,5797948.73 3431644.53,5798012.513431865.15,5797948.73 3431815.75,5797807.763433260.06,5797002.92 3433361.19,5796788.54 3433467.4,5796572.78 3433670.6,5796160.063433670.6,5796160.06 3433709.27,5796096.88 3433744.46,5796021.84 3433861.98,5795869.38 3434029.1,5795680.43 3434229.42,5795456.34 3434239.36,5795425.11 3434296.02,5795363.18 -multiline_02|3429562.6 5799490.68 3429750.99 5799199.87 3429825.45 5799078.39 3429901.8 5798961.45 3429995.54 5798822.93 3430072.89 5798719.46 3430216 5798558.95 3430272.08 5798489.33 3430393.87 5798328.51 3430463.53 5798251.11 3430532.22 5798190.16 3430591.24 5798149.53 3430667.67 5798108.9 3430723.78 5798088.58 3430797.33 5798067.95 3430857.34 5798056.34 3430912.52 5798051.5 3430961.89 5798048.59 3431052.88 5798053.43 3431159.36 5798059.24 3431218.41 5798061.18 3431366.56 5798056.09 3431474.07 5798044.47 3431568.02 5798028.97 3431644.53 5798012.513433260.06 5797002.92 3433234.61 5797070.25 3433138.56 5797278.81 3433074.19 5797398.94 3433033.73 5797461.79 3432961.43 5797551.84 3432882.76 5797626.57 3432780.32 5797701.09 3432706.28 5797743.23 3432542.66 5797808.05 3432360.32 5797842.47 3432258.52 5797836.77 3432197.62 5797837.57 3432081.75 5797865.64 3431876.6 5797945.1 3431865.15 5797948.733431865.15 5797948.73 3431644.53 5798012.513431865.15 5797948.73 3431815.75 5797807.763433260.06 5797002.92 3433361.19 5796788.54 3433467.4 5796572.78 3433670.6 5796160.063433670.6 5796160.06 3433709.27 5796096.88 3433744.46 5796021.84 3433861.98 5795869.38 3434029.1 5795680.43 3434229.42 5795456.34 3434239.36 5795425.11 3434296.02 5795363.18 -multiline_03|3429563,5799491 3429751,5799200 3429825,5799078 3429902,5798961 3429996,5798823 3430073,5798719 3430216,5798559 3430272,5798489 3430394,5798329 3430464,5798251 3430532,5798190 3430591,5798150 3430668,5798109 3430724,5798089 3430797,5798068 3430857,5798056 3430913,5798052 3430962,5798049 3431053,5798053 3431159,5798059 3431218,5798061 3431367,5798056 3431474,5798044 3431568,5798029 3431645,57980133433260,5797003 3433235,5797070 3433139,5797279 3433074,5797399 3433034,5797462 3432961,5797552 3432883,5797627 3432780,5797701 3432706,5797743 3432543,5797808 3432360,5797842 3432259,5797837 3432198,5797838 3432082,5797866 3431877,5797945 3431865,57979493431865,5797949 3431645,57980133431865,5797949 3431816,57978083433260,5797003 3433361,5796789 3433467,5796573 3433671,57961603433671,5796160 3433709,5796097 3433744,5796022 3433862,5795869 3434029,5795680 3434229,5795456 3434239,5795425 3434296,5795363 -multiline_04|3429563,5799491 3429751,5799200 3429825,5799078 3429902,5798961 3429996,5798823 3430073,5798719 3430216,5798559 3430272,5798489 3430394,5798329 3430464,5798251 3430532,5798190 3430591,5798150 3430668,5798109 3430724,5798089 3430797,5798068 3430857,5798056 3430913,5798052 3430962,5798049 3431053,5798053 3431159,5798059 3431218,5798061 3431367,5798056 3431474,5798044 3431568,5798029 3431645,57980133433260,5797003 3433235,5797070 3433139,5797279 3433074,5797399 3433034,5797462 3432961,5797552 3432883,5797627 3432780,5797701 3432706,5797743 3432543,5797808 3432360,5797842 3432259,5797837 3432198,5797838 3432082,5797866 3431877,5797945 3431865,57979493431865,5797949 3431645,57980133431865,5797949 3431816,57978083433260,5797003 3433361,5796789 3433467,5796573 3433671,57961603433671,5796160 3433709,5796097 3433744,5796022 3433862,5795869 3434029,5795680 3434229,5795456 3434239,5795425 3434296,5795363 -multipolygon_01|3429699.81,5795851.64 3429736.72,5795796.01 3429754.71,5795768.88 3429996.1,5795489.98 3430100.67,5795435.76 3430122.61,5795446.09 3430138.1,5795560.98 3430311.09,5795559.69 3430309.8,5795470.62 3430329.16,5795416.4 3430326.58,5795399.62 3430157.47,5795418.98 3430156.14,5795407.32 3430139.36,5795396.99 3429983.19,5795394.41 3429976.74,5795420.22 3429789.59,5795418.93 3429643.74,5795475.72 3429635.72,5795615.31 3429484.94,5795556.38 3429315.44,5795496.32 3429326.12,5795748.57 3429129.92,5795704.53 3429176.64,5795776.6 3429100.6,5795797.17 3428900.44,5795742.46 3428896.43,5795779.82 3428805.69,5795953.3 3428897.77,5796025.35 3428897.77,5796225.99 3428696.32,5796199.31 3428681.64,5796217.99 3428680.31,5796290.03 3428290.14,5796351.8 3428389.67,5796413.87 3428837.71,5796561.12 3428991.08,5796495.01 3429076.4,5796760.29 3429428.31,5796723.61 3429474.96,5796690.29 3429696.2,5796600.99 3429658.88,5796429.06 3429536.27,5796363.75 3429529.6,5796333.1 3429446.08,5796253.84 3429699.81,5795851.643429857.62,5799440.07 3429873.86,5799496.16 3429904.86,5799503.55 3429972.77,5799561.12 3430034.77,5799577.36 3430031.82,5799639.36 3430139.59,5799691.03 3430146.97,5799724.99 3430271.57,5799792.88 3430289.29,5799776.64 3430312.91,5799662.95 3430416.27,5799710.2 3430419.22,5799614.22 3430268.61,5799612.75 3430291.3,5799203.76 3430255.86,5799175.7 3430214.51,5799347 3430183.49,5799355.87 3430180.54,5799366.2 3430146.57,5799367.68 3430142.14,5799349.96 3430065.35,5799375.06 3429961.97,5799426.75 3429857.62,5799440.07 -multipolygon_02|3429699.81 5795851.64 3429736.72 5795796.01 3429754.71 5795768.88 3429996.1 5795489.98 3430100.67 5795435.76 3430122.61 5795446.09 3430138.1 5795560.98 3430311.09 5795559.69 3430309.8 5795470.62 3430329.16 5795416.4 3430326.58 5795399.62 3430157.47 5795418.98 3430156.14 5795407.32 3430139.36 5795396.99 3429983.19 5795394.41 3429976.74 5795420.22 3429789.59 5795418.93 3429643.74 5795475.72 3429635.72 5795615.31 3429484.94 5795556.38 3429315.44 5795496.32 3429326.12 5795748.57 3429129.92 5795704.53 3429176.64 5795776.6 3429100.6 5795797.17 3428900.44 5795742.46 3428896.43 5795779.82 3428805.69 5795953.3 3428897.77 5796025.35 3428897.77 5796225.99 3428696.32 5796199.31 3428681.64 5796217.99 3428680.31 5796290.03 3428290.14 5796351.8 3428389.67 5796413.87 3428837.71 5796561.12 3428991.08 5796495.01 3429076.4 5796760.29 3429428.31 5796723.61 3429474.96 5796690.29 3429696.2 5796600.99 3429658.88 5796429.06 3429536.27 5796363.75 3429529.6 5796333.1 3429446.08 5796253.84 3429699.81 5795851.643429857.62 5799440.07 3429873.86 5799496.16 3429904.86 5799503.55 3429972.77 5799561.12 3430034.77 5799577.36 3430031.82 5799639.36 3430139.59 5799691.03 3430146.97 5799724.99 3430271.57 5799792.88 3430289.29 5799776.64 3430312.91 5799662.95 3430416.27 5799710.2 3430419.22 5799614.22 3430268.61 5799612.75 3430291.3 5799203.76 3430255.86 5799175.7 3430214.51 5799347 3430183.49 5799355.87 3430180.54 5799366.2 3430146.57 5799367.68 3430142.14 5799349.96 3430065.35 5799375.06 3429961.97 5799426.75 3429857.62 5799440.07 -multipolygon_03|3429700,5795852 3429737,5795796 3429755,5795769 3429996,5795490 3430101,5795436 3430123,5795446 3430138,5795561 3430311,5795560 3430310,5795471 3430329,5795416 3430327,5795400 3430157,5795419 3430156,5795407 3430139,5795397 3429983,5795394 3429977,5795420 3429790,5795419 3429644,5795476 3429636,5795615 3429485,5795556 3429315,5795496 3429326,5795749 3429130,5795705 3429177,5795777 3429101,5795797 3428900,5795742 3428896,5795780 3428806,5795953 3428898,5796025 3428898,5796226 3428696,5796199 3428682,5796218 3428680,5796290 3428290,5796352 3428390,5796414 3428838,5796561 3428991,5796495 3429076,5796760 3429428,5796724 3429475,5796690 3429696,5796601 3429659,5796429 3429536,5796364 3429530,5796333 3429446,5796254 3429700,57958523429858,5799440 3429874,5799496 3429905,5799504 3429973,5799561 3430035,5799577 3430032,5799639 3430140,5799691 3430147,5799725 3430272,5799793 3430289,5799777 3430313,5799663 3430416,5799710 3430419,5799614 3430269,5799613 3430291,5799204 3430256,5799176 3430215,5799347 3430183,5799356 3430181,5799366 3430147,5799368 3430142,5799350 3430065,5799375 3429962,5799427 3429858,5799440 -multipolygon_04|3429700 5795852 3429737 5795796 3429755 5795769 3429996 5795490 3430101 5795436 3430123 5795446 3430138 5795561 3430311 5795560 3430310 5795471 3430329 5795416 3430327 5795400 3430157 5795419 3430156 5795407 3430139 5795397 3429983 5795394 3429977 5795420 3429790 5795419 3429644 5795476 3429636 5795615 3429485 5795556 3429315 5795496 3429326 5795749 3429130 5795705 3429177 5795777 3429101 5795797 3428900 5795742 3428896 5795780 3428806 5795953 3428898 5796025 3428898 5796226 3428696 5796199 3428682 5796218 3428680 5796290 3428290 5796352 3428390 5796414 3428838 5796561 3428991 5796495 3429076 5796760 3429428 5796724 3429475 5796690 3429696 5796601 3429659 5796429 3429536 5796364 3429530 5796333 3429446 5796254 3429700 57958523429858 5799440 3429874 5799496 3429905 5799504 3429973 5799561 3430035 5799577 3430032 5799639 3430140 5799691 3430147 5799725 3430272 5799793 3430289 5799777 3430313 5799663 3430416 5799710 3430419 5799614 3430269 5799613 3430291 5799204 3430256 5799176 3430215 5799347 3430183 5799356 3430181 5799366 3430147 5799368 3430142 5799350 3430065 5799375 3429962 5799427 3429858 5799440 -geometrycollection_01|3433276.43,5795308.933428545.3,5795827.753431576.99,5799084.193431724.2,5797152.593431984.2,5796564.793435147.61,5797649.583434660.86,5796941.743434674.52,5797030.543435714.36,5797022.63436368.88,5796951.043436730.03,5796768.63435538.55,5796267.13435847.22,5795917.963434312.09,5794846.023433121.69,5793670.733433176.36,5793489.293434316.04,5793940.093433222.92,5793040.493433416.13,5792891.623430717.47,5792600.583435384.08,5792877.683435229.15,5792177.253435120,5792319.073435088.72,5792111.213434484.89,5792110.23435777.91,5792419.493435717.37,5794318.123436895.13,5794569.433437621.86,5793931.63435597.14,5793467.93435246.51,5793394.633434722.1,5793374.873434712.16,5793810.33434773.28,5793816.873434629.91,5793855.313434992.34,5794140.13434927.13,5794252.293434958.58,5794286.163435120.48,5794163.363435850.1,5791727.493435930.75,5791636.323436268.87,5791882.683437110.23,5791664.123435960.34,5790928.23433545.81,5789755.433439096.86,5790884.263438576.87,5795046.693438396.95,5794858.593438193.25,5794695.63438447.92,5796130.773440688.22,5793670.373429562.6,5799490.68 3429750.99,5799199.87 3429825.45,5799078.39 3429901.8,5798961.45 3429995.54,5798822.93 3430072.89,5798719.46 3430216,5798558.95 3430272.08,5798489.33 3430393.87,5798328.51 3430463.53,5798251.11 3430532.22,5798190.16 3430591.24,5798149.53 3430667.67,5798108.9 3430723.78,5798088.58 3430797.33,5798067.95 3430857.34,5798056.34 3430912.52,5798051.5 3430961.89,5798048.59 3431052.88,5798053.43 3431159.36,5798059.24 3431218.41,5798061.18 3431366.56,5798056.09 3431474.07,5798044.47 3431568.02,5798028.97 3431644.53,5798012.513433260.06,5797002.92 3433234.61,5797070.25 3433138.56,5797278.81 3433074.19,5797398.94 3433033.73,5797461.79 3432961.43,5797551.84 3432882.76,5797626.57 3432780.32,5797701.09 3432706.28,5797743.23 3432542.66,5797808.05 3432360.32,5797842.47 3432258.52,5797836.77 3432197.62,5797837.57 3432081.75,5797865.64 3431876.6,5797945.1 3431865.15,5797948.733431865.15,5797948.73 3431644.53,5798012.513431865.15,5797948.73 3431815.75,5797807.763433260.06,5797002.92 3433361.19,5796788.54 3433467.4,5796572.78 3433670.6,5796160.063433670.6,5796160.06 3433709.27,5796096.88 3433744.46,5796021.84 3433861.98,5795869.38 3434029.1,5795680.43 3434229.42,5795456.34 3434239.36,5795425.11 3434296.02,5795363.18 -geometrycollection_02|3433276.43 5795308.933428545.3 5795827.753431576.99 5799084.193431724.2 5797152.593431984.2 5796564.793435147.61 5797649.583434660.86 5796941.743434674.52 5797030.543435714.36 5797022.63436368.88 5796951.043436730.03 5796768.63435538.55 5796267.13435847.22 5795917.963434312.09 5794846.023433121.69 5793670.733433176.36 5793489.293434316.04 5793940.093433222.92 5793040.493433416.13 5792891.623430717.47 5792600.583435384.08 5792877.683435229.15 5792177.253435120 5792319.073435088.72 5792111.213434484.89 5792110.23435777.91 5792419.493435717.37 5794318.123436895.13 5794569.433437621.86 5793931.63435597.14 5793467.93435246.51 5793394.633434722.1 5793374.873434712.16 5793810.33434773.28 5793816.873434629.91 5793855.313434992.34 5794140.13434927.13 5794252.293434958.58 5794286.163435120.48 5794163.363435850.1 5791727.493435930.75 5791636.323436268.87 5791882.683437110.23 5791664.123435960.34 5790928.23433545.81 5789755.433439096.86 5790884.263438576.87 5795046.693438396.95 5794858.593438193.25 5794695.63438447.92 5796130.773440688.22 5793670.373429562.6 5799490.68 3429750.99 5799199.87 3429825.45 5799078.39 3429901.8 5798961.45 3429995.54 5798822.93 3430072.89 5798719.46 3430216 5798558.95 3430272.08 5798489.33 3430393.87 5798328.51 3430463.53 5798251.11 3430532.22 5798190.16 3430591.24 5798149.53 3430667.67 5798108.9 3430723.78 5798088.58 3430797.33 5798067.95 3430857.34 5798056.34 3430912.52 5798051.5 3430961.89 5798048.59 3431052.88 5798053.43 3431159.36 5798059.24 3431218.41 5798061.18 3431366.56 5798056.09 3431474.07 5798044.47 3431568.02 5798028.97 3431644.53 5798012.513433260.06 5797002.92 3433234.61 5797070.25 3433138.56 5797278.81 3433074.19 5797398.94 3433033.73 5797461.79 3432961.43 5797551.84 3432882.76 5797626.57 3432780.32 5797701.09 3432706.28 5797743.23 3432542.66 5797808.05 3432360.32 5797842.47 3432258.52 5797836.77 3432197.62 5797837.57 3432081.75 5797865.64 3431876.6 5797945.1 3431865.15 5797948.733431865.15 5797948.73 3431644.53 5798012.513431865.15 5797948.73 3431815.75 5797807.763433260.06 5797002.92 3433361.19 5796788.54 3433467.4 5796572.78 3433670.6 5796160.063433670.6 5796160.06 3433709.27 5796096.88 3433744.46 5796021.84 3433861.98 5795869.38 3434029.1 5795680.43 3434229.42 5795456.34 3434239.36 5795425.11 3434296.02 5795363.18 -geometrycollection_03|3433276,57953093428545,57958283431577,57990843431724,57971533431984,57965653435148,57976503434661,57969423434675,57970313435714,57970233436369,57969513436730,57967693435539,57962673435847,57959183434312,57948463433122,57936713433176,57934893434316,57939403433223,57930403433416,57928923430717,57926013435384,57928783435229,57921773435120,57923193435089,57921113434485,57921103435778,57924193435717,57943183436895,57945693437622,57939323435597,57934683435247,57933953434722,57933753434712,57938103434773,57938173434630,57938553434992,57941403434927,57942523434959,57942863435120,57941633435850,57917273435931,57916363436269,57918833437110,57916643435960,57909283433546,57897553439097,57908843438577,57950473438397,57948593438193,57946963438448,57961313440688,57936703429563,5799491 3429751,5799200 3429825,5799078 3429902,5798961 3429996,5798823 3430073,5798719 3430216,5798559 3430272,5798489 3430394,5798329 3430464,5798251 3430532,5798190 3430591,5798150 3430668,5798109 3430724,5798089 3430797,5798068 3430857,5798056 3430913,5798052 3430962,5798049 3431053,5798053 3431159,5798059 3431218,5798061 3431367,5798056 3431474,5798044 3431568,5798029 3431645,57980133433260,5797003 3433235,5797070 3433139,5797279 3433074,5797399 3433034,5797462 3432961,5797552 3432883,5797627 3432780,5797701 3432706,5797743 3432543,5797808 3432360,5797842 3432259,5797837 3432198,5797838 3432082,5797866 3431877,5797945 3431865,57979493431865,5797949 3431645,57980133431865,5797949 3431816,57978083433260,5797003 3433361,5796789 3433467,5796573 3433671,57961603433671,5796160 3433709,5796097 3433744,5796022 3433862,5795869 3434029,5795680 3434229,5795456 3434239,5795425 3434296,5795363 -geometrycollection_04|3433276 57953093428545 57958283431577 57990843431724 57971533431984 57965653435148 57976503434661 57969423434675 57970313435714 57970233436369 57969513436730 57967693435539 57962673435847 57959183434312 57948463433122 57936713433176 57934893434316 57939403433223 57930403433416 57928923430717 57926013435384 57928783435229 57921773435120 57923193435089 57921113434485 57921103435778 57924193435717 57943183436895 57945693437622 57939323435597 57934683435247 57933953434722 57933753434712 57938103434773 57938173434630 57938553434992 57941403434927 57942523434959 57942863435120 57941633435850 57917273435931 57916363436269 57918833437110 57916643435960 57909283433546 57897553439097 57908843438577 57950473438397 57948593438193 57946963438448 57961313440688 57936703429563 5799491 3429751 5799200 3429825 5799078 3429902 5798961 3429996 5798823 3430073 5798719 3430216 5798559 3430272 5798489 3430394 5798329 3430464 5798251 3430532 5798190 3430591 5798150 3430668 5798109 3430724 5798089 3430797 5798068 3430857 5798056 3430913 5798052 3430962 5798049 3431053 5798053 3431159 5798059 3431218 5798061 3431367 5798056 3431474 5798044 3431568 5798029 3431645 57980133433260 5797003 3433235 5797070 3433139 5797279 3433074 5797399 3433034 5797462 3432961 5797552 3432883 5797627 3432780 5797701 3432706 5797743 3432543 5797808 3432360 5797842 3432259 5797837 3432198 5797838 3432082 5797866 3431877 5797945 3431865 57979493431865 5797949 3431645 57980133431865 5797949 3431816 57978083433260 5797003 3433361 5796789 3433467 5796573 3433671 57961603433671 5796160 3433709 5796097 3433744 5796022 3433862 5795869 3434029 5795680 3434229 5795456 3434239 5795425 3434296 5795363 -geometrycollection_05|1,2 3,45,67,89,10 -geometrycollection_06|1 2 3 45 67 89 10 -ERROR: geometry_to_gml2: 'CircularString' geometry type not supported -ERROR: geometry_to_gml2: 'CompoundString' geometry type not supported -ERROR: geometry_to_gml2: 'CurvePolygon' geometry type not supported -ERROR: geometry_to_gml2: 'MultiCurve' geometry type not supported -ERROR: geometry_to_gml2: 'MultiSurface' geometry type not supported -3D_01|1,1,1 -3D_02|1,1,1 -3D_03|1,1,1 2,2,2 3,3,3 4,4,4 -3D_04|1,1,1 2,2,2 3,3,3 4,4,4 5,5,5 5,0,0 1,1,1 diff -Nru postgis-1.5.3/regress/in_geojson.sql postgis-2.0.1/regress/in_geojson.sql --- postgis-1.5.3/regress/in_geojson.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/in_geojson.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,12 @@ +-- FromGeoJSON +select 'geomfromgeojson_01',st_asewkt(st_geomfromgeojson(st_asgeojson('SRID=3005;MULTIPOINT(1 1, 1 1)'))); +select 'geomfromgeojson_02',st_astext(st_geomfromgeojson(st_asgeojson('SRID=3005;MULTIPOINT(1 1, 1 1)'))); +select 'geomfromgeojson_03',st_astext(st_geomfromgeojson(st_asgeojson('POINT(1 1)'))); +select 'geomfromgeojson_04',st_astext(st_geomfromgeojson(st_asgeojson('LINESTRING(0 0,1 1)'))); +select 'geomfromgeojson_05',st_astext(st_geomfromgeojson(st_asgeojson('POLYGON((0 0,1 1,1 0,0 0))'))); +select 'geomfromgeojson_06',st_astext(st_geomfromgeojson(st_asgeojson('MULTIPOLYGON(((0 0,1 1,1 0,0 0)))'))); + +-- #1434 +select '#1434: Next two errors'; +select '#1434.1',ST_GeomFromGeoJSON('{ "type": "Point", "crashme": [100.0, 0.0] }'); +select '#1434.2',ST_GeomFromGeoJSON('crashme');; diff -Nru postgis-1.5.3/regress/in_geojson_expected postgis-2.0.1/regress/in_geojson_expected --- postgis-1.5.3/regress/in_geojson_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/in_geojson_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,9 @@ +geomfromgeojson_01|MULTIPOINT(1 1,1 1) +geomfromgeojson_02|MULTIPOINT(1 1,1 1) +geomfromgeojson_03|POINT(1 1) +geomfromgeojson_04|LINESTRING(0 0,1 1) +geomfromgeojson_05|POLYGON((0 0,1 1,1 0,0 0)) +geomfromgeojson_06|MULTIPOLYGON(((0 0,1 1,1 0,0 0))) +#1434: Next two errors +ERROR: Unable to find 'coordinates' in GeoJSON string +ERROR: unexpected character (at offset 0) diff -Nru postgis-1.5.3/regress/in_gml.sql postgis-2.0.1/regress/in_gml.sql --- postgis-1.5.3/regress/in_gml.sql 2011-04-30 08:38:39.000000000 +0000 +++ postgis-2.0.1/regress/in_gml.sql 2012-02-27 22:08:12.000000000 +0000 @@ -179,6 +179,67 @@ +-- +-- LinearRing +-- + +-- 2D LinearRing +SELECT 'linearring_1', ST_AsEWKT(ST_GeomFromGML('1 2 3 4 5 6 1 2')); + +-- srsName handle +SELECT 'linearring_2', ST_AsEWKT(ST_GeomFromGML('1 2 3 4 5 6 1 2')); + +-- ERROR: Last point is not the same as the first one +SELECT 'linearring_3', ST_AsEWKT(ST_GeomFromGML('1 2 3 4 5 6 1 3')); + +-- ERROR: Last point is not the same as the first one in Z +SELECT 'linearring_4', ST_AsEWKT(ST_GeomFromGML('1 2 3 4 5 6 1 3')); + +-- ERROR: Only 3 points +SELECT 'linearring_5', ST_AsEWKT(ST_GeomFromGML('1 2 3 4 1 3')); + +-- ERROR: Empty coordinates +SELECT 'linearring_6', ST_AsEWKT(ST_GeomFromGML('')); +SELECT 'linearring_7', ST_AsEWKT(ST_GeomFromGML('')); + +-- XML not elements handle +SELECT 'linearring_8', ST_AsEWKT(ST_GeomFromGML(' 1 2 3 4 5 6 1 2 ')); + + +-- +-- Triangle +-- + +-- a triangle +SELECT 'triangle_1', ST_AsEWKT(ST_GeomFromGML('1,2 3,4 5,6 1,2')); + +-- srsName handle +SELECT 'triangle_2', ST_AsEWKT(ST_GeomFromGML('1,2 3,4 5,6 1,2')); + +-- ERROR: Last point is not the same as the first one +SELECT 'triangle_3', ST_AsEWKT(ST_GeomFromGML('1,2 3,4 5,6 1,0')); + +-- ERROR: Last point is not the same as the first one in Z +SELECT 'triangle_4', ST_AsEWKT(ST_GeomFromGML('1,2,3 4,5,6 7,8,9 1,2,0')); + +-- ERROR: Only 3 points +SELECT 'triangle_5', ST_AsEWKT(ST_GeomFromGML('1,2 3,4 1,2')); + +-- ERROR: Empty exterior ring coordinates +SELECT 'triangle_6', ST_AsEWKT(ST_GeomFromGML('')); +SELECT 'triangle_7', ST_AsEWKT(ST_GeomFromGML('')); +SELECT 'triangle_8', ST_AsEWKT(ST_GeomFromGML('')); + +-- XML not elements handle +SELECT 'triangle_9', ST_AsEWKT(ST_GeomFromGML(' 1,2 3,4 5,6 1,2')); + +-- planar interpolation +SELECT 'triangle_10', ST_AsEWKT(ST_GeomFromGML('1,2 3,4 5,6 1,2')); + +-- ERROR: interpolation not planar +SELECT 'triangle_11', ST_AsEWKT(ST_GeomFromGML('1,2 3,4 5,6 1,2')); + + -- -- Surface @@ -191,10 +252,10 @@ SELECT 'surface_2', ST_AsEWKT(ST_GeomFromGML('1,2 3,4 5,6 1,2')); -- ERROR: In exterior ring: Last point is not the same as the first one -SELECT 'surface_3', ST_AsEWKT(ST_GeomFromGML('1,2 3,4 5,6 1,0')); +SELECT 'surface_3', ST_AsEWKT(ST_GeomFromGML('1,2 3,4 5,6 1,0')); -- ERROR: In exterior 3D ring: Last point is not the same as the first one in Z -SELECT 'surface_4', ST_AsEWKT(ST_GeomFromGML('1,2,3 4,5,6 7,8,9 1,2,0')); +SELECT 'surface_4', ST_AsEWKT(ST_GeomFromGML('1,2,3 4,5,6 7,8,9 1,2,0')); -- ERROR: Only 3 points in exterior ring SELECT 'surface_5', ST_AsEWKT(ST_GeomFromGML('1,2 3,4 1,2')); @@ -242,7 +303,6 @@ - -- -- MultiPoint -- @@ -389,6 +449,130 @@ -- +-- PolyhedralSurface +-- + +-- 1 ring +SELECT 'polyhedralsurface_1', ST_AsEWKT(ST_GeomFromGML('1 2 3 4 5 6 7 8 9 1 2 3')); + +-- srsName handle +SELECT 'polyhedralsurface_2', ST_AsEWKT(ST_GeomFromGML('1 2 3 4 5 6 7 8 9 1 2 3')); + +-- ERROR: In exterior ring: Last point is not the same as the first one +SELECT 'polyhedralsurface_3', ST_AsEWKT(ST_GeomFromGML('1 2 3 4 5 6 7 8 9 1 0 3')); + +-- ERROR: In exterior 3D ring: Last point is not the same as the first one in Z +SELECT 'polyhedralsurface_4', ST_AsEWKT(ST_GeomFromGML('1 2 3 4 5 6 7 8 9 1 2 0')); + +-- ERROR: Only 3 points in exterior ring +SELECT 'polyhedralsurface_5', ST_AsEWKT(ST_GeomFromGML('1 2 3 4 5 6 1 2 3')); + +-- ERROR: Empty exterior ring coordinates +SELECT 'polyhedralsurface_6', ST_AsEWKT(ST_GeomFromGML('')); +SELECT 'polyhedralsurface_7', ST_AsEWKT(ST_GeomFromGML('')); +SELECT 'polyhedralsurface_8', ST_AsEWKT(ST_GeomFromGML('')); + +-- EMPTY +SELECT 'polyhedralsurface_9', ST_AsEWKT(ST_GeomFromGML('')); +SELECT 'polyhedralsurface_10', ST_AsEWKT(ST_GeomFromGML('')); + +-- 2 rings +SELECT 'polyhedralsurface_11', ST_AsEWKT(ST_GeomFromGML('1 2 3 4 5 6 7 8 9 1 2 310 11 12 13 14 15 16 17 18 10 11 12')); + +-- 2 patches +SELECT 'polyhedralsurface_12', ST_AsEWKT(ST_GeomFromGML('1 2 3 4 5 6 7 8 9 1 2 310 11 12 13 14 15 16 17 18 10 11 12')); + +-- 2 patches & 2 rings +SELECT 'polyhedralsurface_13', ST_AsEWKT(ST_GeomFromGML('1 2 3 4 5 6 7 8 9 1 2 310 11 12 13 14 15 16 17 18 10 11 1219 20 21 22 23 24 25 26 27 19 20 21')); + +-- XML not elements handle +SELECT 'polyhedralsurface_14', ST_AsEWKT(ST_GeomFromGML(' 1 2 3 4 5 6 7 8 9 1 2 3 10 11 12 13 14 15 16 17 18 10 11 12 19 20 21 22 23 24 25 26 27 19 20 21 ')); + +-- Empty interior ring coordinates (even if defined) +SELECT 'polyhedralsurface_15', ST_AsEWKT(ST_GeomFromGML('1 2 3 4 5 6 7 8 9 1 2 3')); + +-- ERROR: Only 3 points in interior ring +SELECT 'polyhedralsurface_16', ST_AsEWKT(ST_GeomFromGML('1 2 3 4 5 6 7 8 9 1 2 310 11 12 13 14 15 16 10 11 12')); + +-- ERROR: In interior ring: Last point is not the same as the first one +SELECT 'polyhedralsurface_17', ST_AsEWKT(ST_GeomFromGML('1 2 3 4 5 6 7 8 9 1 2 310 11 12 13 14 15 16 17 18 10 0 12')); + +-- ERROR: In interior 3D ring: Last point is not the same as the first one in Z +SELECT 'polyhedralsurface_18', ST_AsEWKT(ST_GeomFromGML('1 2 3 4 5 6 7 8 9 1 2 310 11 12 13 14 15 16 17 18 10 11 0')); + +-- 3 rings +SELECT 'polyhedralsurface_19', ST_AsEWKT(ST_GeomFromGML('1 2 3 4 5 6 7 8 9 1 2 310 11 12 13 14 15 16 17 18 10 11 1219 20 21 22 23 24 25 26 27 19 20 21')); + +-- Mixed dimension in rings +SELECT 'polyhedralsurface_20', ST_AsEWKT(ST_GeomFromGML('1 2 3 4 5 6 7 8 9 1 2 310 11 12 13 14 15 10 11')); + +SELECT 'polyhedralsurface_21', ST_AsEWKT(ST_GeomFromGML('1 2 3 4 5 6 1 27 8 9 10 11 12 13 14 15 7 8 9')); + +-- Mixed dimension in patches +SELECT 'polyhedralsurface_22', ST_AsEWKT(ST_GeomFromGML('1 2 3 4 5 6 7 8 9 1 2 310 11 12 13 14 15 10 11')); + +SELECT 'polyhedralsurface_23', ST_AsEWKT(ST_GeomFromGML('1 2 3 4 5 6 1 27 8 9 10 11 12 13 14 15 7 8 9')); + +-- planar interpolation +SELECT 'polyhedralsurface_24', ST_AsEWKT(ST_GeomFromGML('1 2 3 4 5 6 7 8 9 1 2 3')); + +-- ERROR: interpolation not planar +SELECT 'polyhedralsurface_25', ST_AsEWKT(ST_GeomFromGML('1 2 3 4 5 6 7 8 9 1 2 3')); + + +-- +-- Tin and TriangulatedSurface +-- + +-- 1 patch +SELECT 'tin_1', ST_AsEWKT(ST_GeomFromGML('1 2 3 4 5 6 7 8 9 1 2 3')); + +-- srsName handle +SELECT 'tin_2', ST_AsEWKT(ST_GeomFromGML('1 2 3 4 5 6 7 8 9 1 2 3')); + +-- ERROR: Last point is not the same as the first one +SELECT 'tin_3', ST_AsEWKT(ST_GeomFromGML('1 2 3 4 5 6 7 8 9 1 0 3')); + +-- ERROR: Last point is not the same as the first one in Z +SELECT 'tin_4', ST_AsEWKT(ST_GeomFromGML('1 2 3 4 5 6 7 8 9 1 2 0')); + +-- ERROR: Only 3 points in exterior ring +SELECT 'tin_5', ST_AsEWKT(ST_GeomFromGML('1 2 3 4 5 6 1 2 3')); + +-- ERROR: Empty exterior ring coordinates +SELECT 'tin_6', ST_AsEWKT(ST_GeomFromGML('')); +SELECT 'tin_7', ST_AsEWKT(ST_GeomFromGML('')); + +-- EMPTY +SELECT 'tin_8', ST_AsEWKT(ST_GeomFromGML('')); +SELECT 'tin_9', ST_AsEWKT(ST_GeomFromGML('')); +SELECT 'tin_10', ST_AsEWKT(ST_GeomFromGML('')); + +-- 2 patches +SELECT 'tin_11', ST_AsEWKT(ST_GeomFromGML('1 2 3 4 5 6 7 8 9 1 2 310 11 12 13 14 15 16 17 18 10 11 12')); + +-- XML not elements handle +SELECT 'tin_12', ST_AsEWKT(ST_GeomFromGML(' 1 2 3 4 5 6 7 8 9 1 2 3 10 11 12 13 14 15 16 17 18 10 11 12 ')); + +-- 3 patches +SELECT 'tin_13', ST_AsEWKT(ST_GeomFromGML('1 2 3 4 5 6 7 8 9 1 2 310 11 12 13 14 15 16 17 18 10 11 1219 20 21 22 23 24 25 26 27 19 20 21')); + +-- Mixed dimension in patches +SELECT 'tin_14', ST_AsEWKT(ST_GeomFromGML('1 2 3 4 5 6 7 8 9 1 2 310 11 12 13 14 15 10 11')); + +SELECT 'tin_15', ST_AsEWKT(ST_GeomFromGML('1 2 3 4 5 6 1 27 8 9 10 11 12 13 14 15 7 8 9')); + +-- TriangulatedSurface +SELECT 'tin_16', ST_AsEWKT(ST_GeomFromGML('1 2 3 4 5 6 7 8 9 1 2 3')); + +-- trianglePatches +SELECT 'tin_17', ST_AsEWKT(ST_GeomFromGML('1 2 3 4 5 6 7 8 9 1 2 3')); + +SELECT 'tin_18', ST_AsEWKT(ST_GeomFromGML('1 2 3 4 5 6 7 8 9 1 2 3')); + + + +-- -- GeometryCollection -- @@ -446,6 +630,9 @@ SELECT 'srs_6', ST_AsEWKT(ST_GeomFromGML('1 2')); SELECT 'srs_7', ST_AsEWKT(ST_GeomFromGML('1 2')); +-- Use default srsName +SELECT 'srs_8', ST_AsEWKT(ST_GeomFromGML('1 2', 4326)); + -- ERROR not a valid pattern SELECT 'srs_9', ST_AsEWKT(ST_GeomFromGML('1 2')); @@ -870,98 +1057,133 @@ SELECT 'gml_18', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('POLYGON((1 2,3 4,5 6,1 2))')))); -- Polygon GML 3 & SRID lat/lon -SELECT 'gml_19', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('SRID=4326;POLYGON((1 2,3 4,5 6,1 2))')))); +SELECT 'gml_19', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('SRID=4326;POLYGON((1 2,3 4,5 6,1 2))'), 16))); -- Polygon GML 3 - 3D SELECT 'gml_20', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('POLYGON((1 2 3,4 5 6,7 8 9,1 2 3))')))); -- Polygon GML 3 - 3D & SRID lat/lon -SELECT 'gml_21', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('SRID=4326;POLYGON((1 2 3,4 5 6,7 8 9,1 2 3))')))); +SELECT 'gml_21', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('SRID=4326;POLYGON((1 2 3,4 5 6,7 8 9,1 2 3))'), 16))); + +-- Triangle GML 3 +SELECT 'gml_22', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('TRIANGLE((1 2,3 4,5 6,1 2))')))); + +-- Triangle GML 3 & SRID lat/lon +SELECT 'gml_23', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('SRID=4326;TRIANGLE((1 2,3 4,5 6,1 2))'), 16))); + +-- Triangle GML 3 & SRID planar +SELECT 'gml_24', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('SRID=27582;TRIANGLE((1 2,3 4,5 6,1 2))')))); + +-- Triangle GML 3 - 3D +SELECT 'gml_25', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('TRIANGLE((1 2 3,4 5 6,7 8 9,1 2 3))')))); + +-- Triangle GML 3 - 3D & SRID lat/lon +SELECT 'gml_26', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('SRID=4326;TRIANGLE((1 2 3,4 5 6,7 8 9,1 2 3))'), 16))); -- Multipoint GML 2 -SELECT 'gml_22', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(ST_AsEWKT('MULTIPOINT(1 2)')))); +SELECT 'gml_27', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(ST_AsEWKT('MULTIPOINT(1 2)')))); -- Multipoint GML 2 - 3D -SELECT 'gml_23', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(ST_AsEWKT('MULTIPOINT(1 2 3)')))); +SELECT 'gml_28', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(ST_AsEWKT('MULTIPOINT(1 2 3)')))); -- Multipoint GML 2 & SRID planar -SELECT 'gml_24', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(ST_AsEWKT('SRID=27582;MULTIPOINT(1 2)')))); +SELECT 'gml_29', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(ST_AsEWKT('SRID=27582;MULTIPOINT(1 2)')))); -- Multipoint GML 3 -SELECT 'gml_25', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('MULTIPOINT(1 2)')))); +SELECT 'gml_30', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('MULTIPOINT(1 2)')))); -- Multipoint GML 3 & SRID lat/lon -SELECT 'gml_26', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('SRID=4326;MULTIPOINT(1 2)'), 16))); +SELECT 'gml_31', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('SRID=4326;MULTIPOINT(1 2)'), 16))); -- Multipoint GML 3 - 3D -SELECT 'gml_27', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('MULTIPOINT(1 2 3)')))); +SELECT 'gml_32', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('MULTIPOINT(1 2 3)')))); -- Multipoint GML 3 - 3D & SRID lat/lon -SELECT 'gml_28', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('SRID=4326;MULTIPOINT(1 2 3)'), 16))); +SELECT 'gml_33', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('SRID=4326;MULTIPOINT(1 2 3)'), 16))); -- Multilinestring GML 2 -SELECT 'gml_29', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(ST_AsEWKT('MULTILINESTRING((1 2,3 4))')))); +SELECT 'gml_34', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(ST_AsEWKT('MULTILINESTRING((1 2,3 4))')))); -- Multilinestring GML 2 - 3D -SELECT 'gml_30', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(ST_AsEWKT('MULTILINESTRING((1 2 3,4 5 6))')))); +SELECT 'gml_35', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(ST_AsEWKT('MULTILINESTRING((1 2 3,4 5 6))')))); -- Multilinestring GML 2 & SRID planar -SELECT 'gml_31', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(ST_AsEWKT('SRID=27582;MULTILINESTRING((1 2,3 4))')))); +SELECT 'gml_36', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(ST_AsEWKT('SRID=27582;MULTILINESTRING((1 2,3 4))')))); -- Multilinestring GML 3 -SELECT 'gml_32', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('MULTILINESTRING((1 2,3 4))')))); +SELECT 'gml_37', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('MULTILINESTRING((1 2,3 4))')))); -- Multilinestring GML 3 & SRID lat/lon -SELECT 'gml_33', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('SRID=4326;MULTILINESTRING((1 2,3 4))'), 16))); +SELECT 'gml_38', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('SRID=4326;MULTILINESTRING((1 2,3 4))'), 16))); -- Multilinestring GML 3 - 3D -SELECT 'gml_34', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('MULTILINESTRING((1 2 3,4 5 6))')))); +SELECT 'gml_39', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('MULTILINESTRING((1 2 3,4 5 6))')))); -- Multilinestring GML 3 - 3D & SRID lat/lon -SELECT 'gml_35', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('SRID=4326;MULTILINESTRING((1 2 3,4 5 6))'), 16))); +SELECT 'gml_40', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('SRID=4326;MULTILINESTRING((1 2 3,4 5 6))'), 16))); -- Multipolygon GML 2 -SELECT 'gml_36', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(ST_AsEWKT('MULTIPOLYGON(((1 2,3 4,5 6,1 2)))')))); +SELECT 'gml_41', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(ST_AsEWKT('MULTIPOLYGON(((1 2,3 4,5 6,1 2)))')))); -- Multipolygon GML 2 - 3D -SELECT 'gml_37', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(ST_AsEWKT('MULTIPOLYGON(((1 2 3,4 5 6,7 8 9,1 2 3)))')))); +SELECT 'gml_42', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(ST_AsEWKT('MULTIPOLYGON(((1 2 3,4 5 6,7 8 9,1 2 3)))')))); -- Multipolygon GML 2 & SRID planar -SELECT 'gml_38', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(ST_AsEWKT('SRID=27582;MULTIPOLYGON(((1 2,3 4,5 6,1 2)))')))); +SELECT 'gml_43', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(ST_AsEWKT('SRID=27582;MULTIPOLYGON(((1 2,3 4,5 6,1 2)))')))); -- Multipolygon GML 3 -SELECT 'gml_39', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('MULTIPOLYGON(((1 2,3 4,5 6,1 2)))')))); +SELECT 'gml_44', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('MULTIPOLYGON(((1 2,3 4,5 6,1 2)))')))); -- Multipolygon GML 3 & SRID lat/lon -SELECT 'gml_40', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('SRID=4326;MULTIPOLYGON(((1 2,3 4,5 6,1 2)))')))); +SELECT 'gml_45', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('SRID=4326;MULTIPOLYGON(((1 2,3 4,5 6,1 2)))'), 16))); -- Multipolygon GML 3 - 3D -SELECT 'gml_41', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('MULTIPOLYGON(((1 2 3,4 5 6,7 8 9,1 2 3)))')))); +SELECT 'gml_46', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('MULTIPOLYGON(((1 2 3,4 5 6,7 8 9,1 2 3)))')))); + +-- Multipolygon GML 3 - 3D & SRID planar +SELECT 'gml_47', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('SRID=27582;MULTIPOLYGON(((1 2 3,4 5 6,7 8 9,1 2 3)))')))); -- Multipolygon GML 3 - 3D & SRID lat/lon -SELECT 'gml_42', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('SRID=4326;MULTIPOLYGON(((1 2 3,4 5 6,7 8 9,1 2 3)))')))); +SELECT 'gml_48', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('SRID=4326;MULTIPOLYGON(((1 2 3,4 5 6,7 8 9,1 2 3)))'), 16))); + +-- Tin GML 3 +SELECT 'gml_49', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('TIN(((1 2,3 4,5 6,1 2)))')))); + +-- Tin GML 3 & SRID planar +SELECT 'gml_50', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('SRID=27582;TIN(((1 2,3 4,5 6,1 2)))')))); + +-- Tin GML 3 & SRID lat/lon +SELECT 'gml_51', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('SRID=4326;TIN(((1 2,3 4,5 6,1 2)))'), 16))); + +-- Tin GML 3 - 3D +SELECT 'gml_52', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('TIN(((1 2 3,4 5 6,7 8 9,1 2 3)))')))); + +-- Tin GML 3 - 3D & SRID planar +SELECT 'gml_53', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('SRID=27582;TIN(((1 2 3,4 5 6,7 8 9,1 2 3)))')))); + +-- Tin GML 3 - 3D & SRID lat/lon +SELECT 'gml_54', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('SRID=4326;TIN(((1 2 3,4 5 6,7 8 9,1 2 3)))'), 16))); -- Collection GML 2 -SELECT 'gml_43', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(ST_AsEWKT('GEOMETRYCOLLECTION(POINT(1 2))')))); +SELECT 'gml_55', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(ST_AsEWKT('GEOMETRYCOLLECTION(POINT(1 2))')))); -- Collection GML 2 - 3D -SELECT 'gml_44', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(ST_AsEWKT('GEOMETRYCOLLECTION(POINT(1 2 3))')))); +SELECT 'gml_56', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(ST_AsEWKT('GEOMETRYCOLLECTION(POINT(1 2 3))')))); -- Collection GML 2 & SRID planar -SELECT 'gml_45', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(ST_AsEWKT('SRID=27582;GEOMETRYCOLLECTION(POINT(1 2))')))); +SELECT 'gml_57', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(ST_AsEWKT('SRID=27582;GEOMETRYCOLLECTION(POINT(1 2))')))); -- Collection GML 3 -SELECT 'gml_46', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('GEOMETRYCOLLECTION(POINT(1 2))')))); +SELECT 'gml_58', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('GEOMETRYCOLLECTION(POINT(1 2))')))); -- Collection GML 3 & SRID lat/lon -SELECT 'gml_47', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('SRID=4326;GEOMETRYCOLLECTION(POINT(1 2))'), 16))); +SELECT 'gml_59', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('SRID=4326;GEOMETRYCOLLECTION(POINT(1 2))'), 16))); -- Collection GML 3 - 3D -SELECT 'gml_48', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('GEOMETRYCOLLECTION(POINT(1 2 3))')))); +SELECT 'gml_60', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('GEOMETRYCOLLECTION(POINT(1 2 3))')))); -- Collection GML 3 - 3D & SRID lat/lon -SELECT 'gml_49', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('SRID=4326;GEOMETRYCOLLECTION(POINT(1 2 3))'), 16))); - +SELECT 'gml_61', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('SRID=4326;GEOMETRYCOLLECTION(POINT(1 2 3))'), 16))); diff -Nru postgis-1.5.3/regress/in_gml_expected postgis-2.0.1/regress/in_gml_expected --- postgis-1.5.3/regress/in_gml_expected 2011-04-30 08:38:39.000000000 +0000 +++ postgis-2.0.1/regress/in_gml_expected 2012-02-27 22:08:12.000000000 +0000 @@ -4,13 +4,13 @@ ERROR: invalid GML representation point_1|POINT(1 2) ERROR: invalid GML representation -ERROR: invalid GML representation +point_3|POINT EMPTY point_4|SRID=4326;POINT(1 2) linestring_1|LINESTRING(1 2,3 4) ERROR: invalid GML representation linestring_3|SRID=4326;LINESTRING(1 2,3 4) ERROR: invalid GML representation -ERROR: invalid GML representation +linestring_5|LINESTRING EMPTY linestring_6|LINESTRING(1 2,3 4) curve_1|LINESTRING(1 2,3 4) ERROR: invalid GML representation @@ -36,7 +36,7 @@ ERROR: invalid GML representation ERROR: invalid GML representation ERROR: invalid GML representation -ERROR: invalid GML representation +polygon_9|POLYGON EMPTY polygon_10|POLYGON((1 2,3 4,5 6,1 2),(7 8,9 10,11 12,7 8)) polygon_11|POLYGON((1 2,3 4,5 6,1 2),(7 8,9 10,11 12,7 8)) polygon_12|POLYGON((1 2,3 4,5 6,1 2)) @@ -47,6 +47,25 @@ polygon_17|POLYGON((1 2,3 4,5 6,1 2),(7 8,9 10,11 12,7 8)) polygon_18|POLYGON((1 2,4 5,7 8,1 2),(10 11,12 13,14 15,10 11)) polygon_19|POLYGON((1 2,3 4,5 6,1 2),(7 8,10 11,13 14,7 8)) +linearring_1|POLYGON((1 2,3 4,5 6,1 2)) +linearring_2|SRID=4326;POLYGON((1 2,3 4,5 6,1 2)) +ERROR: invalid GML representation +ERROR: invalid GML representation +ERROR: invalid GML representation +ERROR: invalid GML representation +ERROR: invalid GML representation +linearring_8|POLYGON((1 2,3 4,5 6,1 2)) +triangle_1|TRIANGLE((1 2,3 4,5 6,1 2)) +triangle_2|SRID=4326;TRIANGLE((1 2,3 4,5 6,1 2)) +ERROR: invalid GML representation +ERROR: invalid GML representation +ERROR: invalid GML representation +ERROR: invalid GML representation +ERROR: invalid GML representation +triangle_8|TRIANGLE EMPTY +triangle_9|TRIANGLE((1 2,3 4,5 6,1 2)) +triangle_10|TRIANGLE((1 2,3 4,5 6,1 2)) +ERROR: invalid GML representation surface_1|POLYGON((1 2,3 4,5 6,1 2)) surface_2|SRID=4326;POLYGON((1 2,3 4,5 6,1 2)) ERROR: invalid GML representation @@ -112,6 +131,49 @@ msurface_7|MULTIPOLYGON(((1 2,4 5,7 8,1 2)),((10 11,12 13,14 15,10 11))) msurface_8|MULTIPOLYGON(((1 2,3 4,5 6,1 2)),((7 8,10 11,13 14,7 8))) msurface_9|SRID=27582;MULTIPOLYGON(((1 2,3 4,5 6,1 2)),((400000 7000000,400010 7000010,400020 7000020,400000 7000000),(400100 7000100,400110 7000110,400120 7000120,400100 7000100))) +polyhedralsurface_1|POLYHEDRALSURFACE(((1 2 3,4 5 6,7 8 9,1 2 3))) +polyhedralsurface_2|SRID=4326;POLYHEDRALSURFACE(((1 2 3,4 5 6,7 8 9,1 2 3))) +ERROR: invalid GML representation +ERROR: invalid GML representation +ERROR: invalid GML representation +ERROR: invalid GML representation +ERROR: invalid GML representation +ERROR: invalid GML representation +polyhedralsurface_9|POLYHEDRALSURFACE EMPTY +polyhedralsurface_10|POLYHEDRALSURFACE EMPTY +polyhedralsurface_11|POLYHEDRALSURFACE(((1 2 3,4 5 6,7 8 9,1 2 3),(10 11 12,13 14 15,16 17 18,10 11 12))) +polyhedralsurface_12|POLYHEDRALSURFACE(((1 2 3,4 5 6,7 8 9,1 2 3)),((10 11 12,13 14 15,16 17 18,10 11 12))) +polyhedralsurface_13|POLYHEDRALSURFACE(((1 2 3,4 5 6,7 8 9,1 2 3)),((10 11 12,13 14 15,16 17 18,10 11 12),(19 20 21,22 23 24,25 26 27,19 20 21))) +polyhedralsurface_14|POLYHEDRALSURFACE(((1 2 3,4 5 6,7 8 9,1 2 3)),((10 11 12,13 14 15,16 17 18,10 11 12),(19 20 21,22 23 24,25 26 27,19 20 21))) +polyhedralsurface_15|POLYHEDRALSURFACE(((1 2 3,4 5 6,7 8 9,1 2 3))) +ERROR: invalid GML representation +ERROR: invalid GML representation +ERROR: invalid GML representation +polyhedralsurface_19|POLYHEDRALSURFACE(((1 2 3,4 5 6,7 8 9,1 2 3),(10 11 12,13 14 15,16 17 18,10 11 12),(19 20 21,22 23 24,25 26 27,19 20 21))) +polyhedralsurface_20|POLYHEDRALSURFACE(((1 2,4 5,7 8,1 2),(10 11,12 13,14 15,10 11))) +polyhedralsurface_21|POLYHEDRALSURFACE(((1 2,3 4,5 6,1 2),(7 8,10 11,13 14,7 8))) +polyhedralsurface_22|POLYHEDRALSURFACE(((1 2,4 5,7 8,1 2)),((10 11,12 13,14 15,10 11))) +polyhedralsurface_23|POLYHEDRALSURFACE(((1 2,3 4,5 6,1 2)),((7 8,10 11,13 14,7 8))) +polyhedralsurface_24|POLYHEDRALSURFACE(((1 2 3,4 5 6,7 8 9,1 2 3))) +ERROR: invalid GML representation +tin_1|TIN(((1 2 3,4 5 6,7 8 9,1 2 3))) +tin_2|SRID=4326;TIN(((1 2 3,4 5 6,7 8 9,1 2 3))) +ERROR: invalid GML representation +ERROR: invalid GML representation +ERROR: invalid GML representation +ERROR: invalid GML representation +ERROR: invalid GML representation +tin_8|TIN EMPTY +tin_9|TIN EMPTY +tin_10|TIN EMPTY +tin_11|TIN(((1 2 3,4 5 6,7 8 9,1 2 3)),((10 11 12,13 14 15,16 17 18,10 11 12))) +tin_12|TIN(((1 2 3,4 5 6,7 8 9,1 2 3)),((10 11 12,13 14 15,16 17 18,10 11 12))) +tin_13|TIN(((1 2 3,4 5 6,7 8 9,1 2 3)),((10 11 12,13 14 15,16 17 18,10 11 12)),((19 20 21,22 23 24,25 26 27,19 20 21))) +tin_14|TIN(((1 2,4 5,7 8,1 2)),((10 11,12 13,14 15,10 11))) +tin_15|TIN(((1 2,3 4,5 6,1 2)),((7 8,10 11,13 14,7 8))) +tin_16|TIN(((1 2 3,4 5 6,7 8 9,1 2 3))) +tin_17|TIN(((1 2 3,4 5 6,7 8 9,1 2 3))) +tin_18|TIN(((1 2 3,4 5 6,7 8 9,1 2 3))) collection_1|GEOMETRYCOLLECTION(POINT(1 2)) collection_2|GEOMETRYCOLLECTION(POINT(1 2),LINESTRING(3 4,5 6)) collection_3|GEOMETRYCOLLECTION(MULTIPOINT(1 2,3 4)) @@ -133,6 +195,7 @@ srs_5|SRID=4326;POINT(2 1) srs_6|SRID=4326;POINT(2 1) srs_7|SRID=4326;POINT(1 2) +srs_8|SRID=4326;POINT(1 2) ERROR: unknown spatial reference system ERROR: unknown spatial reference system ERROR: unknown spatial reference system @@ -272,34 +335,46 @@ gml_19|SRID=4326;POLYGON((1 2,3 4,5 6,1 2)) gml_20|POLYGON((1 2 3,4 5 6,7 8 9,1 2 3)) gml_21|SRID=4326;POLYGON((1 2 3,4 5 6,7 8 9,1 2 3)) -gml_22|MULTIPOINT(1 2) -gml_23|MULTIPOINT(1 2 3) -gml_24|SRID=27582;MULTIPOINT(1 2) -gml_25|MULTIPOINT(1 2) -gml_26|SRID=4326;MULTIPOINT(1 2) -gml_27|MULTIPOINT(1 2 3) -gml_28|SRID=4326;MULTIPOINT(1 2 3) -gml_29|MULTILINESTRING((1 2,3 4)) -gml_30|MULTILINESTRING((1 2 3,4 5 6)) -gml_31|SRID=27582;MULTILINESTRING((1 2,3 4)) -gml_32|MULTILINESTRING((1 2,3 4)) -gml_33|SRID=4326;MULTILINESTRING((1 2,3 4)) -gml_34|MULTILINESTRING((1 2 3,4 5 6)) -gml_35|SRID=4326;MULTILINESTRING((1 2 3,4 5 6)) -gml_36|MULTIPOLYGON(((1 2,3 4,5 6,1 2))) -gml_37|MULTIPOLYGON(((1 2 3,4 5 6,7 8 9,1 2 3))) -gml_38|SRID=27582;MULTIPOLYGON(((1 2,3 4,5 6,1 2))) -gml_39|MULTIPOLYGON(((1 2,3 4,5 6,1 2))) -gml_40|SRID=4326;MULTIPOLYGON(((1 2,3 4,5 6,1 2))) -gml_41|MULTIPOLYGON(((1 2 3,4 5 6,7 8 9,1 2 3))) -gml_42|SRID=4326;MULTIPOLYGON(((1 2 3,4 5 6,7 8 9,1 2 3))) -gml_43|GEOMETRYCOLLECTION(POINT(1 2)) -gml_44|GEOMETRYCOLLECTION(POINT(1 2 3)) -gml_45|SRID=27582;GEOMETRYCOLLECTION(POINT(1 2)) -gml_46|GEOMETRYCOLLECTION(POINT(1 2)) -gml_47|SRID=4326;GEOMETRYCOLLECTION(POINT(1 2)) -gml_48|GEOMETRYCOLLECTION(POINT(1 2 3)) -gml_49|SRID=4326;GEOMETRYCOLLECTION(POINT(1 2 3)) +gml_22|TRIANGLE((1 2,3 4,5 6,1 2)) +gml_23|SRID=4326;TRIANGLE((1 2,3 4,5 6,1 2)) +gml_24|SRID=27582;TRIANGLE((1 2,3 4,5 6,1 2)) +gml_25|TRIANGLE((1 2 3,4 5 6,7 8 9,1 2 3)) +gml_26|SRID=4326;TRIANGLE((1 2 3,4 5 6,7 8 9,1 2 3)) +gml_27|MULTIPOINT(1 2) +gml_28|MULTIPOINT(1 2 3) +gml_29|SRID=27582;MULTIPOINT(1 2) +gml_30|MULTIPOINT(1 2) +gml_31|SRID=4326;MULTIPOINT(1 2) +gml_32|MULTIPOINT(1 2 3) +gml_33|SRID=4326;MULTIPOINT(1 2 3) +gml_34|MULTILINESTRING((1 2,3 4)) +gml_35|MULTILINESTRING((1 2 3,4 5 6)) +gml_36|SRID=27582;MULTILINESTRING((1 2,3 4)) +gml_37|MULTILINESTRING((1 2,3 4)) +gml_38|SRID=4326;MULTILINESTRING((1 2,3 4)) +gml_39|MULTILINESTRING((1 2 3,4 5 6)) +gml_40|SRID=4326;MULTILINESTRING((1 2 3,4 5 6)) +gml_41|MULTIPOLYGON(((1 2,3 4,5 6,1 2))) +gml_42|MULTIPOLYGON(((1 2 3,4 5 6,7 8 9,1 2 3))) +gml_43|SRID=27582;MULTIPOLYGON(((1 2,3 4,5 6,1 2))) +gml_44|MULTIPOLYGON(((1 2,3 4,5 6,1 2))) +gml_45|SRID=4326;MULTIPOLYGON(((1 2,3 4,5 6,1 2))) +gml_46|MULTIPOLYGON(((1 2 3,4 5 6,7 8 9,1 2 3))) +gml_47|SRID=27582;MULTIPOLYGON(((1 2 3,4 5 6,7 8 9,1 2 3))) +gml_48|SRID=4326;MULTIPOLYGON(((1 2 3,4 5 6,7 8 9,1 2 3))) +gml_49|TIN(((1 2,3 4,5 6,1 2))) +gml_50|SRID=27582;TIN(((1 2,3 4,5 6,1 2))) +gml_51|SRID=4326;TIN(((1 2,3 4,5 6,1 2))) +gml_52|TIN(((1 2 3,4 5 6,7 8 9,1 2 3))) +gml_53|SRID=27582;TIN(((1 2 3,4 5 6,7 8 9,1 2 3))) +gml_54|SRID=4326;TIN(((1 2 3,4 5 6,7 8 9,1 2 3))) +gml_55|GEOMETRYCOLLECTION(POINT(1 2)) +gml_56|GEOMETRYCOLLECTION(POINT(1 2 3)) +gml_57|SRID=27582;GEOMETRYCOLLECTION(POINT(1 2)) +gml_58|GEOMETRYCOLLECTION(POINT(1 2)) +gml_59|SRID=4326;GEOMETRYCOLLECTION(POINT(1 2)) +gml_60|GEOMETRYCOLLECTION(POINT(1 2 3)) +gml_61|SRID=4326;GEOMETRYCOLLECTION(POINT(1 2 3)) coord_1|POINT(1 2) coord_2|POINT(1 2 3) ERROR: invalid GML representation diff -Nru postgis-1.5.3/regress/in_kml.sql postgis-2.0.1/regress/in_kml.sql --- postgis-1.5.3/regress/in_kml.sql 2009-11-08 19:05:50.000000000 +0000 +++ postgis-2.0.1/regress/in_kml.sql 2012-02-27 22:08:12.000000000 +0000 @@ -262,30 +262,22 @@ SELECT 'kml_6', ST_AsEWKT(ST_GeomFromKML(ST_AsKML(ST_AsEWKT('SRID=4326;POLYGON((1 2 3,4 5 6,7 8 9,1 2 3))')))); -- Multipoint ---SELECT 'kml_7', ST_AsEWKT(ST_GeomFromKML(ST_AsKML(ST_AsEWKT('SRID=4326;MULTIPOINT(1 2)')))); +SELECT 'kml_7', ST_AsEWKT(ST_GeomFromKML(ST_AsKML(ST_AsEWKT('SRID=4326;MULTIPOINT(1 2,3 4)')))); -- Multipoint - 3D ---SELECT 'kml_8', ST_AsEWKT(ST_GeomFromKML(ST_AsKML(ST_AsEWKT('SRID=4326;MULTIPOINT(1 2 3)')))); +SELECT 'kml_8', ST_AsEWKT(ST_GeomFromKML(ST_AsKML(ST_AsEWKT('SRID=4326;MULTIPOINT(1 2 3,4 5 6)')))); -- Multilinestring ---SELECT 'kml_9', ST_AsEWKT(ST_GeomFromKML(ST_AsKML(ST_AsEWKT('SRID=4326;MULTILINESTRING((1 2,3 4))')))); +SELECT 'kml_9', ST_AsEWKT(ST_GeomFromKML(ST_AsKML(ST_AsEWKT('SRID=4326;MULTILINESTRING((1 2,3 4),(5 6,7 8))')))); -- Multilinestring - 3D ---SELECT 'kml_10', ST_AsEWKT(ST_GeomFromKML(ST_AsKML(ST_AsEWKT('SRID=4326;MULTILINESTRING((1 2 3,4 5 6))')))); +SELECT 'kml_10', ST_AsEWKT(ST_GeomFromKML(ST_AsKML(ST_AsEWKT('SRID=4326;MULTILINESTRING((1 2 3,4 5 6),(7 8 9,10 11 12))')))); -- Multipolygon ---SELECT 'kml_11', ST_AsEWKT(ST_GeomFromKML(ST_AsKML(ST_AsEWKT('SRID=4326;MULTIPOLYGON(((1 2,3 4,5 6,1 2)))')))); +SELECT 'kml_11', ST_AsEWKT(ST_GeomFromKML(ST_AsKML(ST_AsEWKT('SRID=4326;MULTIPOLYGON(((1 2,3 4,5 6,1 2)),((7 8,9 10,11 12,7 8)))')))); -- Multipolygon - 3D ---SELECT 'kml_12', ST_AsEWKT(ST_GeomFromKML(ST_AsKML(ST_AsEWKT('SRID=4326;MULTIPOLYGON(((1 2 3,4 5 6,7 8 9,1 2 3)))')))); - --- Collection ---SELECT 'kml_13', ST_AsEWKT(ST_GeomFromKML(ST_AsKML(ST_AsEWKT('SRID=4326;GEOMETRYCOLLECTION(POINT(1 2))')))); - --- Collection - 3D ---SELECT 'kml_14', ST_AsEWKT(ST_GeomFromKML(ST_AsKML(ST_AsEWKT('SRID=4326;GEOMETRYCOLLECTION(POINT(1 2 3))')))); - - +SELECT 'kml_12', ST_AsEWKT(ST_GeomFromKML(ST_AsKML(ST_AsEWKT('SRID=4326;MULTIPOLYGON(((1 2 3,4 5 6,7 8 9,1 2 3)),((10 11 12,13 14 15,16 17 18,10 11 12)))')))); -- diff -Nru postgis-1.5.3/regress/in_kml_expected postgis-2.0.1/regress/in_kml_expected --- postgis-1.5.3/regress/in_kml_expected 2010-12-14 13:14:14.000000000 +0000 +++ postgis-2.0.1/regress/in_kml_expected 2012-02-27 22:08:12.000000000 +0000 @@ -27,7 +27,7 @@ polygon_15|SRID=4326;POLYGON((1 2,3 4,5 6,1 2),(7 8,9 10,11 12,7 8),(13 14,15 16,17 18,13 14)) multi_7|SRID=4326;GEOMETRYCOLLECTION(POINT(1 2),LINESTRING(3 4,5 6),POLYGON((7 8,9 10,11 12,7 8))) multi_8|SRID=4326;GEOMETRYCOLLECTION EMPTY -multi_9|SRID=4326;GEOMETRYCOLLECTION(POINT(1 2),GEOMETRYCOLLECTION(LINESTRING(3 4,5 6),POLYGON((7 8,9 10,11 12,7 8)))) +multi_9|SRID=4326;GEOMETRYCOLLECTION(POINT(1 2),LINESTRING(3 4,5 6),POLYGON((7 8,9 10,11 12,7 8))) multi_10|SRID=4326;GEOMETRYCOLLECTION(POINT(1 2),LINESTRING(3 4,5 6),POLYGON((7 8,9 10,11 12,7 8))) ns_1|SRID=4326;POINT(1 2) ns_2|SRID=4326;POINT(1 2) @@ -57,6 +57,12 @@ kml_4|SRID=4326;LINESTRING(1 2 3,4 5 6) kml_5|SRID=4326;POLYGON((1 2,3 4,5 6,1 2)) kml_6|SRID=4326;POLYGON((1 2 3,4 5 6,7 8 9,1 2 3)) +kml_7|SRID=4326;MULTIPOINT(1 2,3 4) +kml_8|SRID=4326;MULTIPOINT(1 2 3,4 5 6) +kml_9|SRID=4326;MULTILINESTRING((1 2,3 4),(5 6,7 8)) +kml_10|SRID=4326;MULTILINESTRING((1 2 3,4 5 6),(7 8 9,10 11 12)) +kml_11|SRID=4326;MULTIPOLYGON(((1 2,3 4,5 6,1 2)),((7 8,9 10,11 12,7 8))) +kml_12|SRID=4326;MULTIPOLYGON(((1 2 3,4 5 6,7 8 9,1 2 3)),((10 11 12,13 14 15,16 17 18,10 11 12))) double_1|SRID=4326;POINT(1 1234567890) double_2|SRID=4326;POINT(1 -1) double_3|SRID=4326;POINT(1 1) diff -Nru postgis-1.5.3/regress/iscollection.sql postgis-2.0.1/regress/iscollection.sql --- postgis-1.5.3/regress/iscollection.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/iscollection.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,28 @@ +-- Ensure there are no false-positives +SELECT 'point', ST_IsCollection('POINT(42 42)'); +SELECT 'poly', ST_IsCollection('POLYGON((0 0, 10 0, 10 10, 0 10, 0 0))'); +SELECT 'line', ST_IsCollection('LINESTRING(0 0, 10 10)'); + +-- PostGIS doesn't support typed empties... +--SELECT 'empty point', ST_IsCollection('POINT EMPTY'); +--SELECT 'empty poly', ST_IsCollection('POLYGON EMPTY'); +--SELECT 'empty line', ST_IsCollection('LINESTRING EMPTY'); + +--Ensure that all collections return true (even if they contain a single geometry). +SELECT 'empty multipoint', ST_IsCollection('MULTIPOINT EMPTY'); +SELECT 'multipoint', ST_IsCollection('MULTIPOINT((0 0))'); +SELECT 'multipoint+', ST_IsCollection('MULTIPOINT((0 0), (42 42))'); + +SELECT 'empty multiline', ST_IsCollection('MULTILINESTRING EMPTY'); +SELECT 'multiline', ST_IsCollection('MULTILINESTRING((0 0, 10 10))'); +SELECT 'multiline+', ST_IsCollection('MULTILINESTRING((0 0, 10 10), (100 100, 142 142))'); + +SELECT 'empty multipoly', ST_IsCollection('MULTIPOLYGON EMPTY'); +SELECT 'multipoly', ST_IsCollection('MULTIPOLYGON(((0 0, 10 0, 10 10, 0 10, 0 0)))'); +SELECT 'multipoly+', ST_IsCollection('MULTIPOLYGON(((0 0, 10 0, 10 10, 0 10, 0 0)), ((100 100, 110 100, 110 110, 100 110, 100 100)))'); + +SELECT 'empty collection', ST_IsCollection('GEOMETRYCOLLECTION EMPTY'); +SELECT 'collection', ST_IsCollection('GEOMETRYCOLLECTION(POINT(0 0))'); +SELECT 'collection+', ST_IsCollection('GEOMETRYCOLLECTION(POINT(0 0), POINT(42 42))'); + + diff -Nru postgis-1.5.3/regress/iscollection_expected postgis-2.0.1/regress/iscollection_expected --- postgis-1.5.3/regress/iscollection_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/iscollection_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,15 @@ +point|f +poly|f +line|f +empty multipoint|t +multipoint|t +multipoint+|t +empty multiline|t +multiline|t +multiline+|t +empty multipoly|t +multipoly|t +multipoly+|t +empty collection|t +collection|t +collection+|t diff -Nru postgis-1.5.3/regress/isvaliddetail.sql postgis-2.0.1/regress/isvaliddetail.sql --- postgis-1.5.3/regress/isvaliddetail.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/isvaliddetail.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,51 @@ +select 1, valid, reason, st_astext(location) FROM ( + SELECT (ST_IsValidDetail('LINESTRING (70 250, 190 340)')).* +) foo; + +select 2, valid, reason, st_astext(location) FROM ( + SELECT (ST_IsValidDetail('LINESTRING (70 250, 70 250)')).* +) foo; + +-- Twisted polygon +select 3, valid, reason, st_astext(location) FROM ( + SELECT (ST_IsValidDetail( +'POLYGON ((70 250, 70 500, 80 400, 40 400, 70 250))' + )).* +) foo; + +-- Twisted polygon is also invalid for ESRI +select 4, valid, reason, st_astext(location) FROM ( + SELECT (ST_IsValidDetail( +'POLYGON ((70 250, 70 500, 80 400, 40 400, 70 250))' + , + 1 -- ESRI flag + )).* +) foo; + +-- Self-touching ring forming hole +select 5, valid, reason, st_astext(location) FROM ( + SELECT (ST_IsValidDetail( +'POLYGON ((70 250, 40 500, 100 400, 70 250, 80 350, 60 350, 70 250))' + , + 0 -- No flags + )).* +) foo; +select '5s', ST_IsValid( +'POLYGON ((70 250, 40 500, 100 400, 70 250, 80 350, 60 350, 70 250))' , 0); +select '5r', ST_IsValidReason( +'POLYGON ((70 250, 40 500, 100 400, 70 250, 80 350, 60 350, 70 250))' , 0); + +-- Self-touching ring forming hole with ESRI flag +select 6, valid, reason, st_astext(location) FROM ( + SELECT (ST_IsValidDetail( +'POLYGON ((70 250, 40 500, 100 400, 70 250, 80 350, 60 350, 70 250))' + , + 1 -- ESRI flag + )).* +) foo; +select '6s', ST_IsValid( +'POLYGON ((70 250, 40 500, 100 400, 70 250, 80 350, 60 350, 70 250))' , 1); +select '5r', ST_IsValidReason( +'POLYGON ((70 250, 40 500, 100 400, 70 250, 80 350, 60 350, 70 250))' , 1); + + diff -Nru postgis-1.5.3/regress/isvaliddetail_expected postgis-2.0.1/regress/isvaliddetail_expected --- postgis-1.5.3/regress/isvaliddetail_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/isvaliddetail_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,10 @@ +1|t|| +2|f|Too few points in geometry component|POINT(70 250) +3|f|Self-intersection|POINT(70 400) +4|f|Self-intersection|POINT(70 400) +5|f|Ring Self-intersection|POINT(70 250) +5s|f +5r|Ring Self-intersection +6|t|| +6s|t +5r|Valid Geometry diff -Nru postgis-1.5.3/regress/kml.sql postgis-2.0.1/regress/kml.sql --- postgis-1.5.3/regress/kml.sql 2009-02-10 08:00:39.000000000 +0000 +++ postgis-2.0.1/regress/kml.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,94 +0,0 @@ --- Regression tests for KML producer --- Written by: Eduin Carrillo --- © 2006 Corporacion Autonoma Regional de Santander - CAS --- http://postgis.refractions.net/pipermail/postgis-devel/2006-December/002376.html - --- SPATIAL INFO NO AVAILABLE -SELECT 'no_srid_01', AsKML(GeomFromEWKT('SRID=1021892;POINT(1000000 1000000)')); - ---- 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"]],TOWGS84[0,0,0,0,0,0,0],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 1021892 : Bogota 1975 / Colombia Bogota zone (deprecated) -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (1021892,'EPSG',1021892,'PROJCS["Bogota 1975 / Colombia Bogota zone (deprecated)",GEOGCS["Bogota 1975",DATUM["Bogota_1975",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[307,304,-318,0,0,0,0],AUTHORITY["EPSG","6218"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4218"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",4.599047222222222],PARAMETER["central_meridian",-74.08091666666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",1000000],PARAMETER["false_northing",1000000],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","21892"]]','+proj=tmerc +lat_0=4.599047222222222 +lon_0=-74.08091666666667 +k=1.000000 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs84=307,304,-318,0,0,0,0 +units=m +no_defs '); - --- NO SRID PROVIDED -SELECT 'no_srid_02', AsKML(GeomFromEWKT('POINT(1 1)')); - --- UNSUPPORTED GEOMETRY TYPES -SELECT 'invalid_01', AsKML(GeomFromEWKT('SRID=4326;CIRCULARSTRING(-2 0,0 2,2 0,0 2,2 4)')); -SELECT 'invalid_02', AsKML(GeomFromEWKT('SRID=4326;COMPOUNDCURVE(CIRCULARSTRING(0 0,1 1,1 0),(1 0,0 1))')); -SELECT 'invalid_03', AsKML(GeomFromEWKT('SRID=4326;CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0))')); -SELECT 'invalid_04', AsKML(GeomFromEWKT('SRID=4326;MULTICURVE((5 5,3 5,3 3,0 3),CIRCULARSTRING(0 0,2 1,2 2))')); -SELECT 'invalid_05', AsKML(GeomFromEWKT('SRID=4326;MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)),((7 8,10 10,6 14,4 11,7 8)))')); - --- PARAMETERS -SELECT 'parameter_01', AsKML(GeomFromEWKT('SRID=4326;POINT(1.1111111111111111 1.1111111111111111)'), 0); -SELECT 'parameter_02', AsKML(GeomFromEWKT('SRID=4326;POINT(1.1111111111111111 1.1111111111111111)'), 16); -SELECT 'parameter_03', AsKML(3,GeomFromEWKT('SRID=4326;POINT(1.1111111111111111 1.1111111111111111)'), 15); - --- SIMPLE FEATURES --- San Felipe de Barajas Fortresses - Cartagena, Colombia (Placemark) http://en.wikipedia.org/wiki/Cartagena%2C_Bol%C3%ADvar -SELECT 'point_01', AsKML(GeomFromEWKT('SRID=4326;POINT(-75.55217297757488 10.42033663453054)'), 3); -SELECT 'point_02', AsKML(GeomFromEWKT('SRID=4326;POINT(-75.55217297757488 10.42033663453054)'), 8); --- Olaya Herrera Airport - Medellin, Colombia (Path) http://en.wikipedia.org/wiki/Olaya_Herrera_Airport -SELECT 'linestring_01', AsKML(GeomFromEWKT('SRID=4326;LINESTRING(-75.58845168747847 6.230811711917435, -75.59257646818483 6.209034252575331)'), 3); -SELECT 'linestring_02', AsKML(GeomFromEWKT('SRID=4326;LINESTRING(-75.58845168747847 6.230811711917435, -75.59257646818483 6.209034252575331)'), 8); --- Unicentro Shopping Centre - Bogota, Colombia (Polygon) http://www.unicentrobogota.com/ -SELECT 'polygon_01', AsKML(SnapToGrid(GeomFromEWKT('SRID=4326;POLYGON((-74.0423991077642 4.70128819450968, -74.04209925973704 4.700950993650923, -74.0420182951016 4.701011516462908, -74.04183483125468 4.700831448835688, -74.0414862905795 4.70114015046422, -74.04132847200927 4.70097698051241, -74.04101990886149 4.701244756502166, -74.0411777421693 4.701425554204853, -74.04087244656924 4.701697127180076, -74.040940643764 4.701773680406961, -74.04089952744008 4.702605660205299, -74.04082413388542 4.702677666010084, -74.04106565350325 4.702949831221687, -74.04087265096442 4.703121094787139, -74.04118884713594 4.7034683330851, -74.04138264686453 4.703308983914091, -74.04173931195382 4.703688847671272, -74.04192370456995 4.703528238994438, -74.0419535628069 4.70355486096117, -74.04230657961881 4.703239478084376, -74.04207492135191 4.702978242710751, -74.0421546959669 4.702907817351857, -74.04195032608129 4.70267512672329, -74.04209558069562 4.702533577124568, -74.04203505048247 4.702466795922, -74.04205318281811 4.702038077671765, -74.04212335562635 4.701974337580458, -74.04198589330784 4.701816901909086, -74.04222167646385 4.70160442413543, -74.04214901975594 4.701519995786457, -74.0423991077642 4.70128819450968))'), 0.000001), 3); -SELECT 'polygon_02', AsKML(GeomFromEWKT('SRID=4326;POLYGON((-74.0423991077642 4.70128819450968, -74.04209925973704 4.700950993650923, -74.0420182951016 4.701011516462908, -74.04183483125468 4.700831448835688, -74.0414862905795 4.70114015046422, -74.04132847200927 4.70097698051241, -74.04101990886149 4.701244756502166, -74.0411777421693 4.701425554204853, -74.04087244656924 4.701697127180076, -74.040940643764 4.701773680406961, -74.04089952744008 4.702605660205299, -74.04082413388542 4.702677666010084, -74.04106565350325 4.702949831221687, -74.04087265096442 4.703121094787139, -74.04118884713594 4.7034683330851, -74.04138264686453 4.703308983914091, -74.04173931195382 4.703688847671272, -74.04192370456995 4.703528238994438, -74.0419535628069 4.70355486096117, -74.04230657961881 4.703239478084376, -74.04207492135191 4.702978242710751, -74.0421546959669 4.702907817351857, -74.04195032608129 4.70267512672329, -74.04209558069562 4.702533577124568, -74.04203505048247 4.702466795922, -74.04205318281811 4.702038077671765, -74.04212335562635 4.701974337580458, -74.04198589330784 4.701816901909086, -74.04222167646385 4.70160442413543, -74.04214901975594 4.701519995786457, -74.0423991077642 4.70128819450968))'), 8); - --- MULTI FEATURES --- Transmilenio mass-transit system Portal Stations - Bogota, Colombia (Placemarks) http://en.wikipedia.org/wiki/List_of_TransMilenio_Stations -SELECT 'multipoint_01', AsKML(GeomFromEWKT('SRID=4326;MULTIPOINT((-74.04603457594773 4.754687006656519),(-74.095833 4.746435),(-74.11037547492613 4.7098754227297),(-74.120148 4.533696))'), 3); -SELECT 'multipoint_02', AsKML(GeomFromEWKT('SRID=4326;MULTIPOINT((-74.04603457594773 4.754687006656519),(-74.095833 4.746435),(-74.11037547492613 4.7098754227297),(-74.120148 4.533696))'), 8); - --- REPROJECTED DATA --- Sun Door Interchange - Bucaramanga, Colombia (Placemark) -SELECT 'projection_01', AsKML(GeomFromEWKT('SRID=1021892;POINT(1106465.31495947 1277689.13470039)'), 0); --- Chicamocha, Suarez and Fonce rivers confluence - Santander, Colombia (Placemark) -SELECT 'projection_02', AsKML(GeomFromEWKT('SRID=1021892;POINT(1097247.52170185 1240255.74263751)'), 0); --- National Astronomical Observatory of Colombia - Bogota, Colombia (Placemark) -SELECT 'projection_03', AsKML(GeomFromEWKT('SRID=1021892;POINT(1000000 1000000)'), 0); - --- Repeat all tests with the new function names. --- NO SRID PROVIDED -SELECT 'no_srid_03', ST_AsKML(ST_GeomFromEWKT('POINT(1 1)')); - --- UNSUPPORTED GEOMETRY TYPES -SELECT 'invalid_06', ST_AsKML(ST_GeomFromEWKT('SRID=4326;CIRCULARSTRING(-2 0,0 2,2 0,0 2,2 4)')); -SELECT 'invalid_07', ST_AsKML(ST_GeomFromEWKT('SRID=4326;COMPOUNDCURVE(CIRCULARSTRING(0 0,1 1,1 0),(1 0,0 1))')); -SELECT 'invalid_08', ST_AsKML(ST_GeomFromEWKT('SRID=4326;CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0))')); -SELECT 'invalid_09', ST_AsKML(ST_GeomFromEWKT('SRID=4326;MULTICURVE((5 5,3 5,3 3,0 3),CIRCULARSTRING(0 0,2 1,2 2))')); -SELECT 'invalid_10', ST_AsKML(ST_GeomFromEWKT('SRID=4326;MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)),((7 8,10 10,6 14,4 11,7 8)))')); - --- PARAMETERS -SELECT 'parameter_04', ST_AsKML(ST_GeomFromEWKT('SRID=4326;POINT(1.1111111111111111 1.1111111111111111)'), 0); -SELECT 'parameter_05', ST_AsKML(ST_GeomFromEWKT('SRID=4326;POINT(1.1111111111111111 1.1111111111111111)'), 16); -SELECT 'parameter_06', ST_AsKML(3,ST_GeomFromEWKT('SRID=4326;POINT(1.1111111111111111 1.1111111111111111)'), 15); - --- SIMPLE FEATURES --- San Felipe de Barajas Fortresses - Cartagena, Colombia (Placemark) http://en.wikipedia.org/wiki/Cartagena%2C_Bol%C3%ADvar -SELECT 'point_03', ST_AsKML(ST_GeomFromEWKT('SRID=4326;POINT(-75.55217297757488 10.42033663453054)')); -SELECT 'point_04', ST_AsKML(ST_GeomFromEWKT('SRID=4326;POINT(-75.55217297757488 10.42033663453054)'), 8); --- Olaya Herrera Airport - Medellin, Colombia (Path) http://en.wikipedia.org/wiki/Olaya_Herrera_Airport -SELECT 'linestring_03', ST_AsKML(ST_GeomFromEWKT('SRID=4326;LINESTRING(-75.58845168747847 6.230811711917435, -75.59257646818483 6.209034252575331)'), 3); -SELECT 'linestring_04', ST_AsKML(ST_GeomFromEWKT('SRID=4326;LINESTRING(-75.58845168747847 6.230811711917435, -75.59257646818483 6.209034252575331)'), 8); --- Unicentro Shopping Centre - Bogota, Colombia (Polygon) http://www.unicentrobogota.com/ -SELECT 'polygon_03', ST_AsKML(ST_SnapToGrid(GeomFromEWKT('SRID=4326;POLYGON((-74.0423991077642 4.70128819450968, -74.04209925973704 4.700950993650923, -74.0420182951016 4.701011516462908, -74.04183483125468 4.700831448835688, -74.0414862905795 4.70114015046422, -74.04132847200927 4.70097698051241, -74.04101990886149 4.701244756502166, -74.0411777421693 4.701425554204853, -74.04087244656924 4.701697127180076, -74.040940643764 4.701773680406961, -74.04089952744008 4.702605660205299, -74.04082413388542 4.702677666010084, -74.04106565350325 4.702949831221687, -74.04087265096442 4.703121094787139, -74.04118884713594 4.7034683330851, -74.04138264686453 4.703308983914091, -74.04173931195382 4.703688847671272, -74.04192370456995 4.703528238994438, -74.0419535628069 4.70355486096117, -74.04230657961881 4.703239478084376, -74.04207492135191 4.702978242710751, -74.0421546959669 4.702907817351857, -74.04195032608129 4.70267512672329, -74.04209558069562 4.702533577124568, -74.04203505048247 4.702466795922, -74.04205318281811 4.702038077671765, -74.04212335562635 4.701974337580458, -74.04198589330784 4.701816901909086, -74.04222167646385 4.70160442413543, -74.04214901975594 4.701519995786457, -74.0423991077642 4.70128819450968))'), 0.000001), 3); -SELECT 'polygon_04', ST_AsKML(ST_GeomFromEWKT('SRID=4326;POLYGON((-74.0423991077642 4.70128819450968, -74.04209925973704 4.700950993650923, -74.0420182951016 4.701011516462908, -74.04183483125468 4.700831448835688, -74.0414862905795 4.70114015046422, -74.04132847200927 4.70097698051241, -74.04101990886149 4.701244756502166, -74.0411777421693 4.701425554204853, -74.04087244656924 4.701697127180076, -74.040940643764 4.701773680406961, -74.04089952744008 4.702605660205299, -74.04082413388542 4.702677666010084, -74.04106565350325 4.702949831221687, -74.04087265096442 4.703121094787139, -74.04118884713594 4.7034683330851, -74.04138264686453 4.703308983914091, -74.04173931195382 4.703688847671272, -74.04192370456995 4.703528238994438, -74.0419535628069 4.70355486096117, -74.04230657961881 4.703239478084376, -74.04207492135191 4.702978242710751, -74.0421546959669 4.702907817351857, -74.04195032608129 4.70267512672329, -74.04209558069562 4.702533577124568, -74.04203505048247 4.702466795922, -74.04205318281811 4.702038077671765, -74.04212335562635 4.701974337580458, -74.04198589330784 4.701816901909086, -74.04222167646385 4.70160442413543, -74.04214901975594 4.701519995786457, -74.0423991077642 4.70128819450968))'), 8); - --- MULTI FEATURES --- Transmilenio mass-transit system Portal Stations - Bogota, Colombia (Placemarks) http://en.wikipedia.org/wiki/List_of_TransMilenio_Stations -SELECT 'multipoint_03', ST_AsKML(ST_GeomFromEWKT('SRID=4326;MULTIPOINT((-74.04603457594773 4.754687006656519),(-74.095833 4.746435),(-74.11037547492613 4.7098754227297),(-74.120148 4.533696))'), 3); -SELECT 'multipoint_04', ST_AsKML(ST_GeomFromEWKT('SRID=4326;MULTIPOINT((-74.04603457594773 4.754687006656519),(-74.095833 4.746435),(-74.11037547492613 4.7098754227297),(-74.120148 4.533696))'), 8); - --- REPROJECTED DATA --- Sun Door Interchange - Bucaramanga, Colombia (Placemark) -SELECT 'projection_04', ST_AsKML(ST_GeomFromEWKT('SRID=1021892;POINT(1106465.31495947 1277689.13470039)'), 3); --- Chicamocha, Suarez and Fonce rivers confluence - Santander, Colombia (Placemark) -SELECT 'projection_05', ST_AsKML(ST_GeomFromEWKT('SRID=1021892;POINT(1097247.52170185 1240255.74263751)'), 8); --- National Astronomical Observatory of Colombia - Bogota, Colombia (Placemark) -SELECT 'projection_06', ST_AsKML(ST_GeomFromEWKT('SRID=1021892;POINT(1000000 1000000)'), 3); - -DELETE FROM spatial_ref_sys WHERE srid = 4326; -DELETE FROM spatial_ref_sys WHERE srid >= 1000000; diff -Nru postgis-1.5.3/regress/kml_expected postgis-2.0.1/regress/kml_expected --- postgis-1.5.3/regress/kml_expected 2010-12-14 13:14:14.000000000 +0000 +++ postgis-2.0.1/regress/kml_expected 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -ERROR: GetProj4StringSPI: Cannot find SRID (4326) in spatial_ref_sys -ERROR: Input geometry has unknown (-1) SRID -ERROR: geometry_to_kml: 'CircularString' geometry type not supported by Google Earth -ERROR: geometry_to_kml: 'CompoundString' geometry type not supported by Google Earth -ERROR: geometry_to_kml: 'CurvePolygon' geometry type not supported by Google Earth -ERROR: geometry_to_kml: 'MultiCurve' geometry type not supported by Google Earth -ERROR: geometry_to_kml: 'MultiSurface' geometry type not supported by Google Earth -parameter_01|1,1 -parameter_02|1.111111111111111,1.111111111111111 -ERROR: Only KML 2 is supported -point_01|-75.552,10.42 -point_02|-75.55217298,10.42033663 -linestring_01|-75.588,6.231 -75.593,6.209 -linestring_02|-75.58845169,6.23081171 -75.59257647,6.20903425 -polygon_01|-74.042,4.701 -74.042,4.701 -74.042,4.701 -74.042,4.701 -74.041,4.701 -74.041,4.701 -74.041,4.701 -74.041,4.701 -74.041,4.702 -74.041,4.702 -74.041,4.703 -74.041,4.703 -74.041,4.703 -74.041,4.703 -74.041,4.703 -74.041,4.703 -74.042,4.704 -74.042,4.704 -74.042,4.704 -74.042,4.703 -74.042,4.703 -74.042,4.703 -74.042,4.703 -74.042,4.703 -74.042,4.702 -74.042,4.702 -74.042,4.702 -74.042,4.702 -74.042,4.702 -74.042,4.702 -74.042,4.701 -polygon_02|-74.04239911,4.70128819 -74.04209926,4.70095099 -74.0420183,4.70101152 -74.04183483,4.70083145 -74.04148629,4.70114015 -74.04132847,4.70097698 -74.04101991,4.70124476 -74.04117774,4.70142555 -74.04087245,4.70169713 -74.04094064,4.70177368 -74.04089953,4.70260566 -74.04082413,4.70267767 -74.04106565,4.70294983 -74.04087265,4.70312109 -74.04118885,4.70346833 -74.04138265,4.70330898 -74.04173931,4.70368885 -74.0419237,4.70352824 -74.04195356,4.70355486 -74.04230658,4.70323948 -74.04207492,4.70297824 -74.0421547,4.70290782 -74.04195033,4.70267513 -74.04209558,4.70253358 -74.04203505,4.7024668 -74.04205318,4.70203808 -74.04212336,4.70197434 -74.04198589,4.7018169 -74.04222168,4.70160442 -74.04214902,4.70152 -74.04239911,4.70128819 -multipoint_01|-74.046,4.755-74.096,4.746-74.11,4.71-74.12,4.534 -multipoint_02|-74.04603458,4.75468701-74.095833,4.746435-74.11037547,4.70987542-74.120148,4.533696 -projection_01|-73,7 -projection_02|-73,7 -projection_03|-74,5 -ERROR: Input geometry has unknown (-1) SRID -ERROR: geometry_to_kml: 'CircularString' geometry type not supported by Google Earth -ERROR: geometry_to_kml: 'CompoundString' geometry type not supported by Google Earth -ERROR: geometry_to_kml: 'CurvePolygon' geometry type not supported by Google Earth -ERROR: geometry_to_kml: 'MultiCurve' geometry type not supported by Google Earth -ERROR: geometry_to_kml: 'MultiSurface' geometry type not supported by Google Earth -parameter_04|1,1 -parameter_05|1.111111111111111,1.111111111111111 -ERROR: Only KML 2 is supported -point_03|-75.552172977574884,10.420336634530541 -point_04|-75.55217298,10.42033663 -linestring_03|-75.588,6.231 -75.593,6.209 -linestring_04|-75.58845169,6.23081171 -75.59257647,6.20903425 -polygon_03|-74.042,4.701 -74.042,4.701 -74.042,4.701 -74.042,4.701 -74.041,4.701 -74.041,4.701 -74.041,4.701 -74.041,4.701 -74.041,4.702 -74.041,4.702 -74.041,4.703 -74.041,4.703 -74.041,4.703 -74.041,4.703 -74.041,4.703 -74.041,4.703 -74.042,4.704 -74.042,4.704 -74.042,4.704 -74.042,4.703 -74.042,4.703 -74.042,4.703 -74.042,4.703 -74.042,4.703 -74.042,4.702 -74.042,4.702 -74.042,4.702 -74.042,4.702 -74.042,4.702 -74.042,4.702 -74.042,4.701 -polygon_04|-74.04239911,4.70128819 -74.04209926,4.70095099 -74.0420183,4.70101152 -74.04183483,4.70083145 -74.04148629,4.70114015 -74.04132847,4.70097698 -74.04101991,4.70124476 -74.04117774,4.70142555 -74.04087245,4.70169713 -74.04094064,4.70177368 -74.04089953,4.70260566 -74.04082413,4.70267767 -74.04106565,4.70294983 -74.04087265,4.70312109 -74.04118885,4.70346833 -74.04138265,4.70330898 -74.04173931,4.70368885 -74.0419237,4.70352824 -74.04195356,4.70355486 -74.04230658,4.70323948 -74.04207492,4.70297824 -74.0421547,4.70290782 -74.04195033,4.70267513 -74.04209558,4.70253358 -74.04203505,4.7024668 -74.04205318,4.70203808 -74.04212336,4.70197434 -74.04198589,4.7018169 -74.04222168,4.70160442 -74.04214902,4.70152 -74.04239911,4.70128819 -multipoint_03|-74.046,4.755-74.096,4.746-74.11,4.71-74.12,4.534 -multipoint_04|-74.04603458,4.75468701-74.095833,4.746435-74.11037547,4.70987542-74.120148,4.533696 -projection_04|-73.114,7.106 -projection_05|-73.1978481,6.76797716 -projection_06|-74.078,4.596 diff -Nru postgis-1.5.3/regress/legacy.sql postgis-2.0.1/regress/legacy.sql --- postgis-1.5.3/regress/legacy.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/legacy.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,54 @@ +-- +-- These tests serve the purpose of ensuring compatibility with +-- old versions of postgis users. +-- +-- Their use rely on loading the legacy.sql script. +-- This file also serves as a testcase for uninstall_legacy.sql +-- + +SET client_min_messages TO WARNING; + +\i 00-regress-install/share/contrib/postgis/legacy.sql + +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"]],TOWGS84[0,0,0,0,0,0,0],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 '); + +SELECT 'Starting up MapServer/Geoserver tests...'; +-- Set up the data table +SELECT 'Setting up the data table...'; +CREATE TABLE wmstest ( id INTEGER ); +SELECT AddGeometryColumn( 'wmstest', 'pt', 4326, 'POLYGON', 2 ); +INSERT INTO wmstest SELECT lon * 100 + lat AS id, st_setsrid(st_buffer(st_makepoint(lon, lat),1.0),4326) AS pt +FROM (select lon, generate_series(-80,80, 5) AS lat FROM (SELECT generate_series(-175, 175, 5) AS lon) AS sq1) AS sq2; +ALTER TABLE wmstest add PRIMARY KEY ( id ); +CREATE INDEX wmstest_geomidx ON wmstest using gist ( pt ); + +-- Geoserver 2.0 NG tests +SELECT 'Running Geoserver 2.0 NG tests...'; +-- Run a Geoserver 2.0 NG metadata query +SELECT 'Geoserver1', TYPE FROM GEOMETRY_COLUMNS WHERE F_TABLE_SCHEMA = 'public' AND F_TABLE_NAME = 'wmstest' AND F_GEOMETRY_COLUMN = 'pt'; +SELECT 'Geoserver2', SRID FROM GEOMETRY_COLUMNS WHERE F_TABLE_SCHEMA = 'public' AND F_TABLE_NAME = 'wmstest' AND F_GEOMETRY_COLUMN = 'pt'; +-- Run a Geoserver 2.0 NG WMS query +SELECT 'Geoserver3', "id",substr(encode(asBinary(force_2d("pt"),'XDR'),'base64'),0,16) as "pt" FROM "public"."wmstest" WHERE "pt" && GeomFromText('POLYGON ((-6.58216065979069 -0.7685569763184591, -6.58216065979069 0.911225433349509, -3.050569931030911 0.911225433349509, -3.050569931030911 -0.7685569763184591, -6.58216065979069 -0.7685569763184591))', 4326); +-- Run a Geoserver 2.0 NG KML query +SELECT 'Geoserver4', count(*) FROM "public"."wmstest" WHERE "pt" && GeomFromText('POLYGON ((-1.504017942347938 24.0332272532341, -1.504017942347938 25.99364254836741, 1.736833353559741 25.99364254836741, 1.736833353559741 24.0332272532341, -1.504017942347938 24.0332272532341))', 4326); +SELECT 'Geoserver5', "id",substr(encode(asBinary(force_2d("pt"),'XDR'),'base64'),0,16) as "pt" FROM "public"."wmstest" WHERE "pt" && GeomFromText('POLYGON ((-1.504017942347938 24.0332272532341, -1.504017942347938 25.99364254836741, 1.736833353559741 25.99364254836741, 1.736833353559741 24.0332272532341, -1.504017942347938 24.0332272532341))', 4326); +SELECT 'Geoserver6', "id",substr(encode(asBinary(force_2d("pt"),'XDR'),'base64'),0,16) as "pt" FROM "public"."wmstest" WHERE "pt" && GeomFromText('POLYGON ((-1.507182836191598 24.031312785172446, -1.507182836191598 25.995557016429064, 1.7399982474034008 25.995557016429064, 1.7399982474034008 24.031312785172446, -1.507182836191598 24.031312785172446))', 4326); + +-- MapServer 5.4 tests +select 'MapServer1', attname from pg_attribute, pg_constraint, pg_class where pg_constraint.conrelid = pg_class.oid and pg_class.oid = pg_attribute.attrelid and pg_constraint.contype = 'p' and pg_constraint.conkey[1] = pg_attribute.attnum and pg_class.relname = 'wmstest' and pg_table_is_visible(pg_class.oid) and pg_constraint.conkey[2] is null; +select 'MapServer2', "id",substr(encode(AsBinary(force_collection(force_2d("pt")),'NDR'),'base64'),0,16) as geom,"id" from wmstest where pt && GeomFromText('POLYGON((-98.5 32,-98.5 39,-91.5 39,-91.5 32,-98.5 32))',find_srid('','wmstest','pt')); + +-- MapServer 5.6 tests +select * from wmstest where false limit 0; +select 'MapServer3', attname from pg_attribute, pg_constraint, pg_class where pg_constraint.conrelid = pg_class.oid and pg_class.oid = pg_attribute.attrelid and pg_constraint.contype = 'p' and pg_constraint.conkey[1] = pg_attribute.attnum and pg_class.relname = 'wmstest' and pg_table_is_visible(pg_class.oid) and pg_constraint.conkey[2] is null; +select 'MapServer4', "id",substr(encode(AsBinary(force_collection(force_2d("pt")),'NDR'),'hex'),0,16) as geom,"id" from wmstest where pt && GeomFromText('POLYGON((-98.5 32,-98.5 39,-91.5 39,-91.5 32,-98.5 32))',find_srid('','wmstest','pt')); + +-- Drop the data table +SELECT 'Removing the data table...'; +DROP TABLE wmstest; +DELETE FROM geometry_columns WHERE f_table_name = 'wmstest' AND f_table_schema = 'public'; +SELECT 'Done.'; + +DELETE FROM spatial_ref_sys WHERE SRID = '4326'; + +\i 00-regress-install/share/contrib/postgis/uninstall_legacy.sql diff -Nru postgis-1.5.3/regress/legacy_expected postgis-2.0.1/regress/legacy_expected --- postgis-1.5.3/regress/legacy_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/legacy_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,21 @@ +Starting up MapServer/Geoserver tests... +Setting up the data table... +public.wmstest.pt SRID:4326 TYPE:POLYGON DIMS:2 +ALTER TABLE +Running Geoserver 2.0 NG tests... +Geoserver1|POLYGON +Geoserver2|4326 +Geoserver3|-500|AAAAAAMAAAABAAA +Geoserver4|1 +Geoserver5|25|AAAAAAMAAAABAAA +Geoserver6|25|AAAAAAMAAAABAAA +MapServer1|id +MapServer2|-9465|AQcAAAABAAAAAQM|-9465 +MapServer2|-9460|AQcAAAABAAAAAQM|-9460 +MapServer3|id +MapServer4|-9465|010700000001000|-9465 +MapServer4|-9460|010700000001000|-9460 +Removing the data table... +Done. +BEGIN +COMMIT diff -Nru postgis-1.5.3/regress/loader/Arc-G.select.expected postgis-2.0.1/regress/loader/Arc-G.select.expected --- postgis-1.5.3/regress/loader/Arc-G.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/Arc-G.select.expected 2011-03-18 18:21:25.000000000 +0000 @@ -0,0 +1,6 @@ +0105000020E61000000200000001020000000200000000000000000000000000000000000000000000000000F03F000000000000F03F0102000000020000000000000000000840000000000000084000000000000010400000000000001040 +0105000020E61000000300000001020000000200000000000000000000000000000000000000000000000000F03F000000000000F03F0102000000020000000000000000000840000000000000084000000000000010400000000000001040010200000003000000000000000000244000000000000024400000000000001440000000000000144000000000000008400000000000000840 +0020000005000010E600000002000000000200000002000000000000000000000000000000003FF00000000000003FF00000000000000000000002000000024008000000000000400800000000000040100000000000004010000000000000 +0020000005000010E600000003000000000200000002000000000000000000000000000000003FF00000000000003FF00000000000000000000002000000024008000000000000400800000000000040100000000000004010000000000000000000000200000003402400000000000040240000000000004014000000000000401400000000000040080000000000004008000000000000 +SRID=4326;MULTILINESTRING((0 0,1 1),(3 3,4 4)) +SRID=4326;MULTILINESTRING((0 0,1 1),(3 3,4 4),(10 10,5 5,3 3)) Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/Arc-G.shp.expected and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/Arc-G.shp.expected differ diff -Nru postgis-1.5.3/regress/loader/Arc-w.select.expected postgis-2.0.1/regress/loader/Arc-w.select.expected --- postgis-1.5.3/regress/loader/Arc-w.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/Arc-w.select.expected 2011-03-18 15:40:31.000000000 +0000 @@ -0,0 +1,6 @@ +01050000000200000001020000000200000000000000000000000000000000000000000000000000F03F000000000000F03F0102000000020000000000000000000840000000000000084000000000000010400000000000001040 +01050000000300000001020000000200000000000000000000000000000000000000000000000000F03F000000000000F03F0102000000020000000000000000000840000000000000084000000000000010400000000000001040010200000003000000000000000000244000000000000024400000000000001440000000000000144000000000000008400000000000000840 +000000000500000002000000000200000002000000000000000000000000000000003FF00000000000003FF00000000000000000000002000000024008000000000000400800000000000040100000000000004010000000000000 +000000000500000003000000000200000002000000000000000000000000000000003FF00000000000003FF00000000000000000000002000000024008000000000000400800000000000040100000000000004010000000000000000000000200000003402400000000000040240000000000004014000000000000401400000000000040080000000000004008000000000000 +MULTILINESTRING((0 0,1 1),(3 3,4 4)) +MULTILINESTRING((0 0,1 1),(3 3,4 4),(10 10,5 5,3 3)) diff -Nru postgis-1.5.3/regress/loader/Arc-wkb.expected postgis-2.0.1/regress/loader/Arc-wkb.expected --- postgis-1.5.3/regress/loader/Arc-wkb.expected 2010-12-14 13:17:16.000000000 +0000 +++ postgis-2.0.1/regress/loader/Arc-wkb.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -01050000000200000001020000000200000000000000000000000000000000000000000000000000F03F000000000000F03F0102000000020000000000000000000840000000000000084000000000000010400000000000001040 -01050000000300000001020000000200000000000000000000000000000000000000000000000000F03F000000000000F03F0102000000020000000000000000000840000000000000084000000000000010400000000000001040010200000003000000000000000000244000000000000024400000000000001440000000000000144000000000000008400000000000000840 -000000000500000002000000000200000002000000000000000000000000000000003FF00000000000003FF00000000000000000000002000000024008000000000000400800000000000040100000000000004010000000000000 -000000000500000003000000000200000002000000000000000000000000000000003FF00000000000003FF00000000000000000000002000000024008000000000000400800000000000040100000000000004010000000000000000000000200000003402400000000000040240000000000004014000000000000401400000000000040080000000000004008000000000000 -MULTILINESTRING((0 0,1 1),(3 3,4 4)) -MULTILINESTRING((0 0,1 1),(3 3,4 4),(10 10,5 5,3 3)) diff -Nru postgis-1.5.3/regress/loader/Arc-wkb.sql postgis-2.0.1/regress/loader/Arc-wkb.sql --- postgis-1.5.3/regress/loader/Arc-wkb.sql 2006-06-17 11:44:12.000000000 +0000 +++ postgis-2.0.1/regress/loader/Arc-wkb.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ - -select ashexewkb(the_geom, 'NDR') from loadedshp; -select ashexewkb(the_geom, 'XDR') from loadedshp; -select asewkt(the_geom) from loadedshp; diff -Nru postgis-1.5.3/regress/loader/Arc-wkt.expected postgis-2.0.1/regress/loader/Arc-wkt.expected --- postgis-1.5.3/regress/loader/Arc-wkt.expected 2010-12-14 13:17:16.000000000 +0000 +++ postgis-2.0.1/regress/loader/Arc-wkt.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -01050000000200000001020000000200000000000000000000000000000000000000000000000000F03F000000000000F03F0102000000020000000000000000000840000000000000084000000000000010400000000000001040 -01050000000300000001020000000200000000000000000000000000000000000000000000000000F03F000000000000F03F0102000000020000000000000000000840000000000000084000000000000010400000000000001040010200000003000000000000000000244000000000000024400000000000001440000000000000144000000000000008400000000000000840 -000000000500000002000000000200000002000000000000000000000000000000003FF00000000000003FF00000000000000000000002000000024008000000000000400800000000000040100000000000004010000000000000 -000000000500000003000000000200000002000000000000000000000000000000003FF00000000000003FF00000000000000000000002000000024008000000000000400800000000000040100000000000004010000000000000000000000200000003402400000000000040240000000000004014000000000000401400000000000040080000000000004008000000000000 -MULTILINESTRING((0 0,1 1),(3 3,4 4)) -MULTILINESTRING((0 0,1 1),(3 3,4 4),(10 10,5 5,3 3)) diff -Nru postgis-1.5.3/regress/loader/Arc-wkt.sql postgis-2.0.1/regress/loader/Arc-wkt.sql --- postgis-1.5.3/regress/loader/Arc-wkt.sql 2006-06-17 11:44:12.000000000 +0000 +++ postgis-2.0.1/regress/loader/Arc-wkt.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ - -select ashexewkb(the_geom, 'NDR') from loadedshp; -select ashexewkb(the_geom, 'XDR') from loadedshp; -select asewkt(the_geom) from loadedshp; diff -Nru postgis-1.5.3/regress/loader/Arc.select.expected postgis-2.0.1/regress/loader/Arc.select.expected --- postgis-1.5.3/regress/loader/Arc.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/Arc.select.expected 2011-03-18 15:40:31.000000000 +0000 @@ -0,0 +1,6 @@ +01050000000200000001020000000200000000000000000000000000000000000000000000000000F03F000000000000F03F0102000000020000000000000000000840000000000000084000000000000010400000000000001040 +01050000000300000001020000000200000000000000000000000000000000000000000000000000F03F000000000000F03F0102000000020000000000000000000840000000000000084000000000000010400000000000001040010200000003000000000000000000244000000000000024400000000000001440000000000000144000000000000008400000000000000840 +000000000500000002000000000200000002000000000000000000000000000000003FF00000000000003FF00000000000000000000002000000024008000000000000400800000000000040100000000000004010000000000000 +000000000500000003000000000200000002000000000000000000000000000000003FF00000000000003FF00000000000000000000002000000024008000000000000400800000000000040100000000000004010000000000000000000000200000003402400000000000040240000000000004014000000000000401400000000000040080000000000004008000000000000 +MULTILINESTRING((0 0,1 1),(3 3,4 4)) +MULTILINESTRING((0 0,1 1),(3 3,4 4),(10 10,5 5,3 3)) diff -Nru postgis-1.5.3/regress/loader/Arc.select.sql postgis-2.0.1/regress/loader/Arc.select.sql --- postgis-1.5.3/regress/loader/Arc.select.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/Arc.select.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,3 @@ +select ST_Ashexewkb(the_geom::geometry, 'NDR') from loadedshp order by 1; +select ST_Ashexewkb(the_geom::geometry, 'XDR') from loadedshp order by 1; +select ST_Asewkt(the_geom::geometry) from loadedshp order by 1; Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/Arc.shp.expected and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/Arc.shp.expected differ diff -Nru postgis-1.5.3/regress/loader/ArcM-G.select.expected postgis-2.0.1/regress/loader/ArcM-G.select.expected --- postgis-1.5.3/regress/loader/ArcM-G.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/ArcM-G.select.expected 2011-03-18 18:21:25.000000000 +0000 @@ -0,0 +1,3 @@ +0105000060E61000000300000001020000400200000000000000000000000000000000000000000000000000F03F000000000000F03F000000000000F03F0000000000000040010200004002000000000000000000084000000000000008400000000000000840000000000000104000000000000010400000000000001040010200004003000000000000000000244000000000000024400000000000001440000000000000144000000000000014400000000000001840000000000000084000000000000008400000000000001C40 +0060000005000010E600000003004000000200000002000000000000000000000000000000003FF00000000000003FF00000000000003FF0000000000000400000000000000000400000020000000240080000000000004008000000000000400800000000000040100000000000004010000000000000401000000000000000400000020000000340240000000000004024000000000000401400000000000040140000000000004014000000000000401800000000000040080000000000004008000000000000401C000000000000 +SRID=4326;MULTILINESTRINGM((0 0 1,1 1 2),(3 3 3,4 4 4),(10 10 5,5 5 6,3 3 7)) Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/ArcM-G.shp.expected and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/ArcM-G.shp.expected differ diff -Nru postgis-1.5.3/regress/loader/ArcM-w.select.expected postgis-2.0.1/regress/loader/ArcM-w.select.expected --- postgis-1.5.3/regress/loader/ArcM-w.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/ArcM-w.select.expected 2011-03-18 15:40:31.000000000 +0000 @@ -0,0 +1,3 @@ +01050000400300000001020000400200000000000000000000000000000000000000000000000000F03F000000000000F03F000000000000F03F0000000000000040010200004002000000000000000000084000000000000008400000000000000840000000000000104000000000000010400000000000001040010200004003000000000000000000244000000000000024400000000000001440000000000000144000000000000014400000000000001840000000000000084000000000000008400000000000001C40 +004000000500000003004000000200000002000000000000000000000000000000003FF00000000000003FF00000000000003FF0000000000000400000000000000000400000020000000240080000000000004008000000000000400800000000000040100000000000004010000000000000401000000000000000400000020000000340240000000000004024000000000000401400000000000040140000000000004014000000000000401800000000000040080000000000004008000000000000401C000000000000 +MULTILINESTRINGM((0 0 1,1 1 2),(3 3 3,4 4 4),(10 10 5,5 5 6,3 3 7)) diff -Nru postgis-1.5.3/regress/loader/ArcM-wkb.expected postgis-2.0.1/regress/loader/ArcM-wkb.expected --- postgis-1.5.3/regress/loader/ArcM-wkb.expected 2010-12-14 13:17:16.000000000 +0000 +++ postgis-2.0.1/regress/loader/ArcM-wkb.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -01050000400300000001020000400200000000000000000000000000000000000000000000000000F03F000000000000F03F000000000000F03F0000000000000040010200004002000000000000000000084000000000000008400000000000000840000000000000104000000000000010400000000000001040010200004003000000000000000000244000000000000024400000000000001440000000000000144000000000000014400000000000001840000000000000084000000000000008400000000000001C40 -004000000500000003004000000200000002000000000000000000000000000000003FF00000000000003FF00000000000003FF0000000000000400000000000000000400000020000000240080000000000004008000000000000400800000000000040100000000000004010000000000000401000000000000000400000020000000340240000000000004024000000000000401400000000000040140000000000004014000000000000401800000000000040080000000000004008000000000000401C000000000000 -MULTILINESTRINGM((0 0 1,1 1 2),(3 3 3,4 4 4),(10 10 5,5 5 6,3 3 7)) diff -Nru postgis-1.5.3/regress/loader/ArcM-wkb.sql postgis-2.0.1/regress/loader/ArcM-wkb.sql --- postgis-1.5.3/regress/loader/ArcM-wkb.sql 2006-06-17 11:44:12.000000000 +0000 +++ postgis-2.0.1/regress/loader/ArcM-wkb.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -select ashexewkb(the_geom, 'NDR') from loadedshp; -select ashexewkb(the_geom, 'XDR') from loadedshp; -select asewkt(the_geom) from loadedshp; diff -Nru postgis-1.5.3/regress/loader/ArcM-wkt.expected postgis-2.0.1/regress/loader/ArcM-wkt.expected --- postgis-1.5.3/regress/loader/ArcM-wkt.expected 2010-12-14 13:17:16.000000000 +0000 +++ postgis-2.0.1/regress/loader/ArcM-wkt.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -01050000000300000001020000000200000000000000000000000000000000000000000000000000F03F000000000000F03F0102000000020000000000000000000840000000000000084000000000000010400000000000001040010200000003000000000000000000244000000000000024400000000000001440000000000000144000000000000008400000000000000840 -000000000500000003000000000200000002000000000000000000000000000000003FF00000000000003FF00000000000000000000002000000024008000000000000400800000000000040100000000000004010000000000000000000000200000003402400000000000040240000000000004014000000000000401400000000000040080000000000004008000000000000 -MULTILINESTRING((0 0,1 1),(3 3,4 4),(10 10,5 5,3 3)) diff -Nru postgis-1.5.3/regress/loader/ArcM-wkt.sql postgis-2.0.1/regress/loader/ArcM-wkt.sql --- postgis-1.5.3/regress/loader/ArcM-wkt.sql 2006-06-17 11:44:12.000000000 +0000 +++ postgis-2.0.1/regress/loader/ArcM-wkt.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -select ashexewkb(the_geom, 'NDR') from loadedshp; -select ashexewkb(the_geom, 'XDR') from loadedshp; -select asewkt(the_geom) from loadedshp; - diff -Nru postgis-1.5.3/regress/loader/ArcM.select.expected postgis-2.0.1/regress/loader/ArcM.select.expected --- postgis-1.5.3/regress/loader/ArcM.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/ArcM.select.expected 2011-03-18 15:40:31.000000000 +0000 @@ -0,0 +1,3 @@ +01050000400300000001020000400200000000000000000000000000000000000000000000000000F03F000000000000F03F000000000000F03F0000000000000040010200004002000000000000000000084000000000000008400000000000000840000000000000104000000000000010400000000000001040010200004003000000000000000000244000000000000024400000000000001440000000000000144000000000000014400000000000001840000000000000084000000000000008400000000000001C40 +004000000500000003004000000200000002000000000000000000000000000000003FF00000000000003FF00000000000003FF0000000000000400000000000000000400000020000000240080000000000004008000000000000400800000000000040100000000000004010000000000000401000000000000000400000020000000340240000000000004024000000000000401400000000000040140000000000004014000000000000401800000000000040080000000000004008000000000000401C000000000000 +MULTILINESTRINGM((0 0 1,1 1 2),(3 3 3,4 4 4),(10 10 5,5 5 6,3 3 7)) diff -Nru postgis-1.5.3/regress/loader/ArcM.select.sql postgis-2.0.1/regress/loader/ArcM.select.sql --- postgis-1.5.3/regress/loader/ArcM.select.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/ArcM.select.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,3 @@ +select ST_Ashexewkb(the_geom::geometry, 'NDR') from loadedshp order by 1; +select ST_Ashexewkb(the_geom::geometry, 'XDR') from loadedshp order by 1; +select ST_Asewkt(the_geom::geometry) from loadedshp order by 1; Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/ArcM.shp.expected and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/ArcM.shp.expected differ diff -Nru postgis-1.5.3/regress/loader/ArcZ-G.select.expected postgis-2.0.1/regress/loader/ArcZ-G.select.expected --- postgis-1.5.3/regress/loader/ArcZ-G.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/ArcZ-G.select.expected 2011-03-18 18:21:25.000000000 +0000 @@ -0,0 +1,3 @@ +01050000E0E61000000300000001020000C00200000000000000000000000000000000000000000000000000F03F0000000000002240000000000000F03F000000000000F03F0000000000000040000000000000204001020000C0020000000000000000000840000000000000084000000000000008400000000000001C40000000000000104000000000000010400000000000001040000000000000184001020000C00300000000000000000024400000000000002440000000000000144000000000000014400000000000001440000000000000144000000000000018400000000000001040000000000000084000000000000008400000000000001C400000000000001040 +00E0000005000010E60000000300C000000200000002000000000000000000000000000000003FF000000000000040220000000000003FF00000000000003FF00000000000004000000000000000402000000000000000C000000200000002400800000000000040080000000000004008000000000000401C000000000000401000000000000040100000000000004010000000000000401800000000000000C0000002000000034024000000000000402400000000000040140000000000004014000000000000401400000000000040140000000000004018000000000000401000000000000040080000000000004008000000000000401C0000000000004010000000000000 +SRID=4326;MULTILINESTRING((0 0 1 9,1 1 2 8),(3 3 3 7,4 4 4 6),(10 10 5 5,5 5 6 4,3 3 7 4)) Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/ArcZ-G.shp.expected and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/ArcZ-G.shp.expected differ diff -Nru postgis-1.5.3/regress/loader/ArcZ-w.select.expected postgis-2.0.1/regress/loader/ArcZ-w.select.expected --- postgis-1.5.3/regress/loader/ArcZ-w.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/ArcZ-w.select.expected 2011-03-18 15:40:31.000000000 +0000 @@ -0,0 +1,3 @@ +01050000C00300000001020000C00200000000000000000000000000000000000000000000000000F03F0000000000002240000000000000F03F000000000000F03F0000000000000040000000000000204001020000C0020000000000000000000840000000000000084000000000000008400000000000001C40000000000000104000000000000010400000000000001040000000000000184001020000C00300000000000000000024400000000000002440000000000000144000000000000014400000000000001440000000000000144000000000000018400000000000001040000000000000084000000000000008400000000000001C400000000000001040 +00C00000050000000300C000000200000002000000000000000000000000000000003FF000000000000040220000000000003FF00000000000003FF00000000000004000000000000000402000000000000000C000000200000002400800000000000040080000000000004008000000000000401C000000000000401000000000000040100000000000004010000000000000401800000000000000C0000002000000034024000000000000402400000000000040140000000000004014000000000000401400000000000040140000000000004018000000000000401000000000000040080000000000004008000000000000401C0000000000004010000000000000 +MULTILINESTRING((0 0 1 9,1 1 2 8),(3 3 3 7,4 4 4 6),(10 10 5 5,5 5 6 4,3 3 7 4)) diff -Nru postgis-1.5.3/regress/loader/ArcZ-wkb.expected postgis-2.0.1/regress/loader/ArcZ-wkb.expected --- postgis-1.5.3/regress/loader/ArcZ-wkb.expected 2010-12-14 13:17:16.000000000 +0000 +++ postgis-2.0.1/regress/loader/ArcZ-wkb.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -1|01050000C00300000001020000C00200000000000000000000000000000000000000000000000000F03F0000000000002240000000000000F03F000000000000F03F0000000000000040000000000000204001020000C0020000000000000000000840000000000000084000000000000008400000000000001C40000000000000104000000000000010400000000000001040000000000000184001020000C00300000000000000000024400000000000002440000000000000144000000000000014400000000000001440000000000000144000000000000018400000000000001040000000000000084000000000000008400000000000001C400000000000001040 diff -Nru postgis-1.5.3/regress/loader/ArcZ-wkt.expected postgis-2.0.1/regress/loader/ArcZ-wkt.expected --- postgis-1.5.3/regress/loader/ArcZ-wkt.expected 2010-12-14 13:17:16.000000000 +0000 +++ postgis-2.0.1/regress/loader/ArcZ-wkt.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -1|01050000800300000001020000800200000000000000000000000000000000000000000000000000F03F000000000000F03F000000000000F03F0000000000000040010200008002000000000000000000084000000000000008400000000000000840000000000000104000000000000010400000000000001040010200008003000000000000000000244000000000000024400000000000001440000000000000144000000000000014400000000000001840000000000000084000000000000008400000000000001C40 diff -Nru postgis-1.5.3/regress/loader/ArcZ.select.expected postgis-2.0.1/regress/loader/ArcZ.select.expected --- postgis-1.5.3/regress/loader/ArcZ.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/ArcZ.select.expected 2011-03-18 15:40:31.000000000 +0000 @@ -0,0 +1,3 @@ +01050000C00300000001020000C00200000000000000000000000000000000000000000000000000F03F0000000000002240000000000000F03F000000000000F03F0000000000000040000000000000204001020000C0020000000000000000000840000000000000084000000000000008400000000000001C40000000000000104000000000000010400000000000001040000000000000184001020000C00300000000000000000024400000000000002440000000000000144000000000000014400000000000001440000000000000144000000000000018400000000000001040000000000000084000000000000008400000000000001C400000000000001040 +00C00000050000000300C000000200000002000000000000000000000000000000003FF000000000000040220000000000003FF00000000000003FF00000000000004000000000000000402000000000000000C000000200000002400800000000000040080000000000004008000000000000401C000000000000401000000000000040100000000000004010000000000000401800000000000000C0000002000000034024000000000000402400000000000040140000000000004014000000000000401400000000000040140000000000004018000000000000401000000000000040080000000000004008000000000000401C0000000000004010000000000000 +MULTILINESTRING((0 0 1 9,1 1 2 8),(3 3 3 7,4 4 4 6),(10 10 5 5,5 5 6 4,3 3 7 4)) diff -Nru postgis-1.5.3/regress/loader/ArcZ.select.sql postgis-2.0.1/regress/loader/ArcZ.select.sql --- postgis-1.5.3/regress/loader/ArcZ.select.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/ArcZ.select.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,3 @@ +select ST_Ashexewkb(the_geom::geometry, 'NDR') from loadedshp order by 1; +select ST_Ashexewkb(the_geom::geometry, 'XDR') from loadedshp order by 1; +select ST_Asewkt(the_geom::geometry) from loadedshp order by 1; Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/ArcZ.shp.expected and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/ArcZ.shp.expected differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/Latin1.dbf and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/Latin1.dbf differ diff -Nru postgis-1.5.3/regress/loader/Latin1.opts postgis-2.0.1/regress/loader/Latin1.opts --- postgis-1.5.3/regress/loader/Latin1.opts 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/Latin1.opts 2011-03-18 19:13:26.000000000 +0000 @@ -0,0 +1,2 @@ +# The DBF contains a string with Norweigan characters. +-W LATIN1 diff -Nru postgis-1.5.3/regress/loader/Latin1.select.expected postgis-2.0.1/regress/loader/Latin1.select.expected --- postgis-1.5.3/regress/loader/Latin1.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/Latin1.select.expected 2011-05-20 20:18:59.000000000 +0000 @@ -0,0 +1 @@ +1|TÃ¥rneby in VÃ¥ler I Solør kommune diff -Nru postgis-1.5.3/regress/loader/Latin1.select.sql postgis-2.0.1/regress/loader/Latin1.select.sql --- postgis-1.5.3/regress/loader/Latin1.select.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/Latin1.select.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +SET CLIENT_ENCODING to UTF8; +SELECT * FROM loadedshp; diff -Nru postgis-1.5.3/regress/loader/MultiPoint-G.select.expected postgis-2.0.1/regress/loader/MultiPoint-G.select.expected --- postgis-1.5.3/regress/loader/MultiPoint-G.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/MultiPoint-G.select.expected 2011-03-18 18:21:25.000000000 +0000 @@ -0,0 +1 @@ +SRID=4326;MULTIPOINT(0 1,9 -1,9 -1) Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/MultiPoint-G.shp.expected and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/MultiPoint-G.shp.expected differ diff -Nru postgis-1.5.3/regress/loader/MultiPoint-w.select.expected postgis-2.0.1/regress/loader/MultiPoint-w.select.expected --- postgis-1.5.3/regress/loader/MultiPoint-w.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/MultiPoint-w.select.expected 2011-03-18 15:40:31.000000000 +0000 @@ -0,0 +1 @@ +MULTIPOINT(0 1,9 -1,9 -1) diff -Nru postgis-1.5.3/regress/loader/MultiPoint-wkb.expected postgis-2.0.1/regress/loader/MultiPoint-wkb.expected --- postgis-1.5.3/regress/loader/MultiPoint-wkb.expected 2010-12-14 13:17:16.000000000 +0000 +++ postgis-2.0.1/regress/loader/MultiPoint-wkb.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -MULTIPOINT(0 1,9 -1,9 -1) diff -Nru postgis-1.5.3/regress/loader/MultiPoint-wkb.sql postgis-2.0.1/regress/loader/MultiPoint-wkb.sql --- postgis-1.5.3/regress/loader/MultiPoint-wkb.sql 2006-06-17 11:44:12.000000000 +0000 +++ postgis-2.0.1/regress/loader/MultiPoint-wkb.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -select asewkt(the_geom) from loadedshp; - diff -Nru postgis-1.5.3/regress/loader/MultiPoint-wkt.expected postgis-2.0.1/regress/loader/MultiPoint-wkt.expected --- postgis-1.5.3/regress/loader/MultiPoint-wkt.expected 2010-12-14 13:17:16.000000000 +0000 +++ postgis-2.0.1/regress/loader/MultiPoint-wkt.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -MULTIPOINT(0 1,9 -1,9 -1) diff -Nru postgis-1.5.3/regress/loader/MultiPoint-wkt.sql postgis-2.0.1/regress/loader/MultiPoint-wkt.sql --- postgis-1.5.3/regress/loader/MultiPoint-wkt.sql 2006-06-17 11:44:12.000000000 +0000 +++ postgis-2.0.1/regress/loader/MultiPoint-wkt.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -select asewkt(the_geom) from loadedshp; - diff -Nru postgis-1.5.3/regress/loader/MultiPoint.select.expected postgis-2.0.1/regress/loader/MultiPoint.select.expected --- postgis-1.5.3/regress/loader/MultiPoint.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/MultiPoint.select.expected 2011-03-18 15:40:31.000000000 +0000 @@ -0,0 +1 @@ +MULTIPOINT(0 1,9 -1,9 -1) diff -Nru postgis-1.5.3/regress/loader/MultiPoint.select.sql postgis-2.0.1/regress/loader/MultiPoint.select.sql --- postgis-1.5.3/regress/loader/MultiPoint.select.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/MultiPoint.select.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +select ST_Asewkt(the_geom::geometry) from loadedshp; + Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/MultiPoint.shp.expected and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/MultiPoint.shp.expected differ diff -Nru postgis-1.5.3/regress/loader/MultiPointM-G.select.expected postgis-2.0.1/regress/loader/MultiPointM-G.select.expected --- postgis-1.5.3/regress/loader/MultiPointM-G.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/MultiPointM-G.select.expected 2011-03-18 18:21:25.000000000 +0000 @@ -0,0 +1 @@ +SRID=4326;MULTIPOINTM(0 1 3,9 -1 -3,9 -1 -123) Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/MultiPointM-G.shp.expected and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/MultiPointM-G.shp.expected differ diff -Nru postgis-1.5.3/regress/loader/MultiPointM-w.select.expected postgis-2.0.1/regress/loader/MultiPointM-w.select.expected --- postgis-1.5.3/regress/loader/MultiPointM-w.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/MultiPointM-w.select.expected 2011-03-18 15:40:31.000000000 +0000 @@ -0,0 +1 @@ +MULTIPOINTM(0 1 3,9 -1 -3,9 -1 -123) diff -Nru postgis-1.5.3/regress/loader/MultiPointM-wkb.expected postgis-2.0.1/regress/loader/MultiPointM-wkb.expected --- postgis-1.5.3/regress/loader/MultiPointM-wkb.expected 2010-12-14 13:17:16.000000000 +0000 +++ postgis-2.0.1/regress/loader/MultiPointM-wkb.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -MULTIPOINTM(0 1 3,9 -1 -3,9 -1 -123) diff -Nru postgis-1.5.3/regress/loader/MultiPointM-wkb.sql postgis-2.0.1/regress/loader/MultiPointM-wkb.sql --- postgis-1.5.3/regress/loader/MultiPointM-wkb.sql 2006-06-17 11:44:12.000000000 +0000 +++ postgis-2.0.1/regress/loader/MultiPointM-wkb.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -select asewkt(the_geom) from loadedshp; - diff -Nru postgis-1.5.3/regress/loader/MultiPointM-wkt.expected postgis-2.0.1/regress/loader/MultiPointM-wkt.expected --- postgis-1.5.3/regress/loader/MultiPointM-wkt.expected 2010-12-14 13:17:16.000000000 +0000 +++ postgis-2.0.1/regress/loader/MultiPointM-wkt.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -MULTIPOINT(0 1,9 -1,9 -1) diff -Nru postgis-1.5.3/regress/loader/MultiPointM-wkt.sql postgis-2.0.1/regress/loader/MultiPointM-wkt.sql --- postgis-1.5.3/regress/loader/MultiPointM-wkt.sql 2006-06-17 11:44:12.000000000 +0000 +++ postgis-2.0.1/regress/loader/MultiPointM-wkt.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -select asewkt(the_geom) from loadedshp; - diff -Nru postgis-1.5.3/regress/loader/MultiPointM.select.expected postgis-2.0.1/regress/loader/MultiPointM.select.expected --- postgis-1.5.3/regress/loader/MultiPointM.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/MultiPointM.select.expected 2011-03-18 15:40:31.000000000 +0000 @@ -0,0 +1 @@ +MULTIPOINTM(0 1 3,9 -1 -3,9 -1 -123) diff -Nru postgis-1.5.3/regress/loader/MultiPointM.select.sql postgis-2.0.1/regress/loader/MultiPointM.select.sql --- postgis-1.5.3/regress/loader/MultiPointM.select.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/MultiPointM.select.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +select ST_Asewkt(the_geom::geometry) from loadedshp; + Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/MultiPointM.shp.expected and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/MultiPointM.shp.expected differ diff -Nru postgis-1.5.3/regress/loader/MultiPointZ-G.select.expected postgis-2.0.1/regress/loader/MultiPointZ-G.select.expected --- postgis-1.5.3/regress/loader/MultiPointZ-G.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/MultiPointZ-G.select.expected 2011-03-18 18:21:25.000000000 +0000 @@ -0,0 +1 @@ +SRID=4326;MULTIPOINT(0 1 2 3,9 -1 -2 -3,9 -1 -20 -123) Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/MultiPointZ-G.shp.expected and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/MultiPointZ-G.shp.expected differ diff -Nru postgis-1.5.3/regress/loader/MultiPointZ-w.select.expected postgis-2.0.1/regress/loader/MultiPointZ-w.select.expected --- postgis-1.5.3/regress/loader/MultiPointZ-w.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/MultiPointZ-w.select.expected 2011-03-18 15:40:31.000000000 +0000 @@ -0,0 +1 @@ +MULTIPOINT(0 1 2 3,9 -1 -2 -3,9 -1 -20 -123) diff -Nru postgis-1.5.3/regress/loader/MultiPointZ-wkb.expected postgis-2.0.1/regress/loader/MultiPointZ-wkb.expected --- postgis-1.5.3/regress/loader/MultiPointZ-wkb.expected 2010-12-14 13:17:16.000000000 +0000 +++ postgis-2.0.1/regress/loader/MultiPointZ-wkb.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -MULTIPOINT(0 1 2 3,9 -1 -2 -3,9 -1 -20 -123) diff -Nru postgis-1.5.3/regress/loader/MultiPointZ-wkb.sql postgis-2.0.1/regress/loader/MultiPointZ-wkb.sql --- postgis-1.5.3/regress/loader/MultiPointZ-wkb.sql 2006-06-17 11:44:12.000000000 +0000 +++ postgis-2.0.1/regress/loader/MultiPointZ-wkb.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -select asewkt(the_geom) from loadedshp; - diff -Nru postgis-1.5.3/regress/loader/MultiPointZ-wkt.expected postgis-2.0.1/regress/loader/MultiPointZ-wkt.expected --- postgis-1.5.3/regress/loader/MultiPointZ-wkt.expected 2010-12-14 13:17:16.000000000 +0000 +++ postgis-2.0.1/regress/loader/MultiPointZ-wkt.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -MULTIPOINT(0 1 2,9 -1 -2,9 -1 -20) diff -Nru postgis-1.5.3/regress/loader/MultiPointZ-wkt.sql postgis-2.0.1/regress/loader/MultiPointZ-wkt.sql --- postgis-1.5.3/regress/loader/MultiPointZ-wkt.sql 2006-06-17 11:44:12.000000000 +0000 +++ postgis-2.0.1/regress/loader/MultiPointZ-wkt.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -select asewkt(the_geom) from loadedshp; - diff -Nru postgis-1.5.3/regress/loader/MultiPointZ.select.expected postgis-2.0.1/regress/loader/MultiPointZ.select.expected --- postgis-1.5.3/regress/loader/MultiPointZ.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/MultiPointZ.select.expected 2011-03-18 15:40:31.000000000 +0000 @@ -0,0 +1 @@ +MULTIPOINT(0 1 2 3,9 -1 -2 -3,9 -1 -20 -123) diff -Nru postgis-1.5.3/regress/loader/MultiPointZ.select.sql postgis-2.0.1/regress/loader/MultiPointZ.select.sql --- postgis-1.5.3/regress/loader/MultiPointZ.select.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/MultiPointZ.select.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +select ST_Asewkt(the_geom::geometry) from loadedshp; + Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/MultiPointZ.shp.expected and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/MultiPointZ.shp.expected differ diff -Nru postgis-1.5.3/regress/loader/MultiToSinglePoint-w.select.expected postgis-2.0.1/regress/loader/MultiToSinglePoint-w.select.expected --- postgis-1.5.3/regress/loader/MultiToSinglePoint-w.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/MultiToSinglePoint-w.select.expected 2012-06-08 17:16:28.000000000 +0000 @@ -0,0 +1,66 @@ +POINT(580936.14282 819465.26182) +POINT(506358.89382 607539.2573) +POINT(630565.96358 527840.45893) +POINT(315456.49222 345306.81409) +POINT(471022.70077 736736.49304) +POINT(500018.60921 615679.27508) +POINT(219498.72249 315980.37513) +POINT(319224.66926 318928.06245) +POINT(568650.77442 460462.13034) +POINT(556409.11354 729253.3099) +POINT(513863.46763 702618.74217) +POINT(578737.93901 752848.93601) +POINT(574438.60845 769113.19633) +POINT(542424.35101 668316.88013) +POINT(400265.83533 734407.0336) +POINT(451759.863 412686.10072) +POINT(569910.58361 459856.20941) +POINT(463382.92261 699974.01989) +POINT(604477.02181 740527.99913) +POINT(507899.65188 708318.27556) +POINT(417174.24178 505305.09095) +POINT(577806.69953 694316.9334) +POINT(576210.38329 714992.28805) +POINT(577656.9425 695830.7359) +POINT(581803.77911 693852.46425) +POINT(483239.07014 239264.86823) +POINT(584627.38842 693322.92413) +POINT(531622.19236 716647.0409) +POINT(581975.3656 694284.04885) +POINT(446160.13588 550892.86503) +POINT(529311.59037 610942.50619) +POINT(581808.72699 695841.70311) +POINT(504782.46851 615893.18621) +POINT(622500.15625 752230.03026) +POINT(349366.22234 363016.92123) +POINT(594903.33074 545923.43693) +POINT(441308.57019 229022.74901) +POINT(605633.26966 771823.45975) +POINT(318054.39683 406677.96877) +POINT(606814.49094 683559.83739) +POINT(427202.24558 526355.92112) +POINT(585605.65458 428734.29996) +POINT(348498.22029 696622.25466) +POINT(447753.88823 552268.21802) +POINT(562081.95051 696159.34758) +POINT(449917.46153 516567.92252) +POINT(509151.60704 594632.16326) +POINT(565466.43528 673573.12364) +POINT(492421.36236 719117.79927) +POINT(613346.49996 691449.74754) +POINT(341505.39323 347633.86011) +POINT(335130.10922 221738.45857) +POINT(520476.8592 607380.89342) +POINT(610931.06529 690104.94336) +POINT(577692.98162 695342.84069) +POINT(623744.42521 697297.79934) +POINT(439667.9941 646984.2557) +POINT(507141.1403 606418.24612) +POINT(575383.92723 737533.32187) +POINT(413215.49525 523736.83631) +POINT(561887.18089 504214.42238) +POINT(583428.22076 759656.92773) +POINT(421018.92505 813910.21541) +POINT(621373.92981 690044.79287) +POINT(470983.15933 620692.73333) +POINT(508947.75836 706720.50714) Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/MultiToSinglePoint.dbf and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/MultiToSinglePoint.dbf differ diff -Nru postgis-1.5.3/regress/loader/MultiToSinglePoint.opts postgis-2.0.1/regress/loader/MultiToSinglePoint.opts --- postgis-1.5.3/regress/loader/MultiToSinglePoint.opts 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/MultiToSinglePoint.opts 2011-03-18 15:40:31.000000000 +0000 @@ -0,0 +1,4 @@ +# These points are in a multipoint shapefile even though they're all single points. +# That used to break, so you sould be able to use the -S parameter to force them to +# load into a POINT table rather than a MULTIPOINT. +-S diff -Nru postgis-1.5.3/regress/loader/MultiToSinglePoint.select.expected postgis-2.0.1/regress/loader/MultiToSinglePoint.select.expected --- postgis-1.5.3/regress/loader/MultiToSinglePoint.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/MultiToSinglePoint.select.expected 2012-06-08 17:16:28.000000000 +0000 @@ -0,0 +1,66 @@ +POINT(580936.14282 819465.26182) +POINT(506358.89382 607539.2573) +POINT(630565.96358 527840.45893) +POINT(315456.49222 345306.81409) +POINT(471022.70077 736736.49304) +POINT(500018.60921 615679.27508) +POINT(219498.72249 315980.37513) +POINT(319224.66926 318928.06245) +POINT(568650.77442 460462.13034) +POINT(556409.11354 729253.3099) +POINT(513863.46763 702618.74217) +POINT(578737.93901 752848.93601) +POINT(574438.60845 769113.19633) +POINT(542424.35101 668316.88013) +POINT(400265.83533 734407.0336) +POINT(451759.863 412686.10072) +POINT(569910.58361 459856.20941) +POINT(463382.92261 699974.01989) +POINT(604477.02181 740527.99913) +POINT(507899.65188 708318.27556) +POINT(417174.24178 505305.09095) +POINT(577806.69953 694316.9334) +POINT(576210.38329 714992.28805) +POINT(577656.9425 695830.7359) +POINT(581803.77911 693852.46425) +POINT(483239.07014 239264.86823) +POINT(584627.38842 693322.92413) +POINT(531622.19236 716647.0409) +POINT(581975.3656 694284.04885) +POINT(446160.13588 550892.86503) +POINT(529311.59037 610942.50619) +POINT(581808.72699 695841.70311) +POINT(504782.46851 615893.18621) +POINT(622500.15625 752230.03026) +POINT(349366.22234 363016.92123) +POINT(594903.33074 545923.43693) +POINT(441308.57019 229022.74901) +POINT(605633.26966 771823.45975) +POINT(318054.39683 406677.96877) +POINT(606814.49094 683559.83739) +POINT(427202.24558 526355.92112) +POINT(585605.65458 428734.29996) +POINT(348498.22029 696622.25466) +POINT(447753.88823 552268.21802) +POINT(562081.95051 696159.34758) +POINT(449917.46153 516567.92252) +POINT(509151.60704 594632.16326) +POINT(565466.43528 673573.12364) +POINT(492421.36236 719117.79927) +POINT(613346.49996 691449.74754) +POINT(341505.39323 347633.86011) +POINT(335130.10922 221738.45857) +POINT(520476.8592 607380.89342) +POINT(610931.06529 690104.94336) +POINT(577692.98162 695342.84069) +POINT(623744.42521 697297.79934) +POINT(439667.9941 646984.2557) +POINT(507141.1403 606418.24612) +POINT(575383.92723 737533.32187) +POINT(413215.49525 523736.83631) +POINT(561887.18089 504214.42238) +POINT(583428.22076 759656.92773) +POINT(421018.92505 813910.21541) +POINT(621373.92981 690044.79287) +POINT(470983.15933 620692.73333) +POINT(508947.75836 706720.50714) diff -Nru postgis-1.5.3/regress/loader/MultiToSinglePoint.select.sql postgis-2.0.1/regress/loader/MultiToSinglePoint.select.sql --- postgis-1.5.3/regress/loader/MultiToSinglePoint.select.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/MultiToSinglePoint.select.sql 2012-06-08 17:16:28.000000000 +0000 @@ -0,0 +1,2 @@ +select ST_Asewkt(ST_SnapToGrid(the_geom,0.00001)) from loadedshp; + Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/MultiToSinglePoint.shp and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/MultiToSinglePoint.shp differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/MultiToSinglePoint.shp.expected and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/MultiToSinglePoint.shp.expected differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/MultiToSinglePoint.shx and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/MultiToSinglePoint.shx differ diff -Nru postgis-1.5.3/regress/loader/NoTransPoint-w.select.expected postgis-2.0.1/regress/loader/NoTransPoint-w.select.expected --- postgis-1.5.3/regress/loader/NoTransPoint-w.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/NoTransPoint-w.select.expected 2011-03-18 15:40:31.000000000 +0000 @@ -0,0 +1,3 @@ +POINT(0 1) +POINT(9 -1) +POINT(9 -1) Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/NoTransPoint.dbf and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/NoTransPoint.dbf differ diff -Nru postgis-1.5.3/regress/loader/NoTransPoint.opts postgis-2.0.1/regress/loader/NoTransPoint.opts --- postgis-1.5.3/regress/loader/NoTransPoint.opts 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/NoTransPoint.opts 2011-03-16 17:16:47.000000000 +0000 @@ -0,0 +1,5 @@ +# Ideally we'd use a shapefile with an invalid geometry, so you could see that the +# "don't use a transaction" version successfully inserts every row except that one. +# However as of this writing, we don't have such a shapefile, so this test just +# shows that it doesn't break anything to use the flag. +-e diff -Nru postgis-1.5.3/regress/loader/NoTransPoint.select.expected postgis-2.0.1/regress/loader/NoTransPoint.select.expected --- postgis-1.5.3/regress/loader/NoTransPoint.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/NoTransPoint.select.expected 2011-03-18 15:40:31.000000000 +0000 @@ -0,0 +1,3 @@ +POINT(0 1) +POINT(9 -1) +POINT(9 -1) diff -Nru postgis-1.5.3/regress/loader/NoTransPoint.select.sql postgis-2.0.1/regress/loader/NoTransPoint.select.sql --- postgis-1.5.3/regress/loader/NoTransPoint.select.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/NoTransPoint.select.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +select ST_Asewkt(the_geom) from loadedshp; + Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/NoTransPoint.shp and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/NoTransPoint.shp differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/NoTransPoint.shp.expected and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/NoTransPoint.shp.expected differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/NoTransPoint.shx and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/NoTransPoint.shx differ diff -Nru postgis-1.5.3/regress/loader/NotReallyMultiPoint-w.select.expected postgis-2.0.1/regress/loader/NotReallyMultiPoint-w.select.expected --- postgis-1.5.3/regress/loader/NotReallyMultiPoint-w.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/NotReallyMultiPoint-w.select.expected 2012-06-08 17:16:28.000000000 +0000 @@ -0,0 +1,66 @@ +MULTIPOINT(580936.14282 819465.26182) +MULTIPOINT(506358.89382 607539.2573) +MULTIPOINT(630565.96358 527840.45893) +MULTIPOINT(315456.49222 345306.81409) +MULTIPOINT(471022.70077 736736.49304) +MULTIPOINT(500018.60921 615679.27508) +MULTIPOINT(219498.72249 315980.37513) +MULTIPOINT(319224.66926 318928.06245) +MULTIPOINT(568650.77442 460462.13034) +MULTIPOINT(556409.11354 729253.3099) +MULTIPOINT(513863.46763 702618.74217) +MULTIPOINT(578737.93901 752848.93601) +MULTIPOINT(574438.60845 769113.19633) +MULTIPOINT(542424.35101 668316.88013) +MULTIPOINT(400265.83533 734407.0336) +MULTIPOINT(451759.863 412686.10072) +MULTIPOINT(569910.58361 459856.20941) +MULTIPOINT(463382.92261 699974.01989) +MULTIPOINT(604477.02181 740527.99913) +MULTIPOINT(507899.65188 708318.27556) +MULTIPOINT(417174.24178 505305.09095) +MULTIPOINT(577806.69953 694316.9334) +MULTIPOINT(576210.38329 714992.28805) +MULTIPOINT(577656.9425 695830.7359) +MULTIPOINT(581803.77911 693852.46425) +MULTIPOINT(483239.07014 239264.86823) +MULTIPOINT(584627.38842 693322.92413) +MULTIPOINT(531622.19236 716647.0409) +MULTIPOINT(581975.3656 694284.04885) +MULTIPOINT(446160.13588 550892.86503) +MULTIPOINT(529311.59037 610942.50619) +MULTIPOINT(581808.72699 695841.70311) +MULTIPOINT(504782.46851 615893.18621) +MULTIPOINT(622500.15625 752230.03026) +MULTIPOINT(349366.22234 363016.92123) +MULTIPOINT(594903.33074 545923.43693) +MULTIPOINT(441308.57019 229022.74901) +MULTIPOINT(605633.26966 771823.45975) +MULTIPOINT(318054.39683 406677.96877) +MULTIPOINT(606814.49094 683559.83739) +MULTIPOINT(427202.24558 526355.92112) +MULTIPOINT(585605.65458 428734.29996) +MULTIPOINT(348498.22029 696622.25466) +MULTIPOINT(447753.88823 552268.21802) +MULTIPOINT(562081.95051 696159.34758) +MULTIPOINT(449917.46153 516567.92252) +MULTIPOINT(509151.60704 594632.16326) +MULTIPOINT(565466.43528 673573.12364) +MULTIPOINT(492421.36236 719117.79927) +MULTIPOINT(613346.49996 691449.74754) +MULTIPOINT(341505.39323 347633.86011) +MULTIPOINT(335130.10922 221738.45857) +MULTIPOINT(520476.8592 607380.89342) +MULTIPOINT(610931.06529 690104.94336) +MULTIPOINT(577692.98162 695342.84069) +MULTIPOINT(623744.42521 697297.79934) +MULTIPOINT(439667.9941 646984.2557) +MULTIPOINT(507141.1403 606418.24612) +MULTIPOINT(575383.92723 737533.32187) +MULTIPOINT(413215.49525 523736.83631) +MULTIPOINT(561887.18089 504214.42238) +MULTIPOINT(583428.22076 759656.92773) +MULTIPOINT(421018.92505 813910.21541) +MULTIPOINT(621373.92981 690044.79287) +MULTIPOINT(470983.15933 620692.73333) +MULTIPOINT(508947.75836 706720.50714) Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/NotReallyMultiPoint.dbf and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/NotReallyMultiPoint.dbf differ diff -Nru postgis-1.5.3/regress/loader/NotReallyMultiPoint.select.expected postgis-2.0.1/regress/loader/NotReallyMultiPoint.select.expected --- postgis-1.5.3/regress/loader/NotReallyMultiPoint.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/NotReallyMultiPoint.select.expected 2012-06-08 17:16:28.000000000 +0000 @@ -0,0 +1,66 @@ +MULTIPOINT(580936.14282 819465.26182) +MULTIPOINT(506358.89382 607539.2573) +MULTIPOINT(630565.96358 527840.45893) +MULTIPOINT(315456.49222 345306.81409) +MULTIPOINT(471022.70077 736736.49304) +MULTIPOINT(500018.60921 615679.27508) +MULTIPOINT(219498.72249 315980.37513) +MULTIPOINT(319224.66926 318928.06245) +MULTIPOINT(568650.77442 460462.13034) +MULTIPOINT(556409.11354 729253.3099) +MULTIPOINT(513863.46763 702618.74217) +MULTIPOINT(578737.93901 752848.93601) +MULTIPOINT(574438.60845 769113.19633) +MULTIPOINT(542424.35101 668316.88013) +MULTIPOINT(400265.83533 734407.0336) +MULTIPOINT(451759.863 412686.10072) +MULTIPOINT(569910.58361 459856.20941) +MULTIPOINT(463382.92261 699974.01989) +MULTIPOINT(604477.02181 740527.99913) +MULTIPOINT(507899.65188 708318.27556) +MULTIPOINT(417174.24178 505305.09095) +MULTIPOINT(577806.69953 694316.9334) +MULTIPOINT(576210.38329 714992.28805) +MULTIPOINT(577656.9425 695830.7359) +MULTIPOINT(581803.77911 693852.46425) +MULTIPOINT(483239.07014 239264.86823) +MULTIPOINT(584627.38842 693322.92413) +MULTIPOINT(531622.19236 716647.0409) +MULTIPOINT(581975.3656 694284.04885) +MULTIPOINT(446160.13588 550892.86503) +MULTIPOINT(529311.59037 610942.50619) +MULTIPOINT(581808.72699 695841.70311) +MULTIPOINT(504782.46851 615893.18621) +MULTIPOINT(622500.15625 752230.03026) +MULTIPOINT(349366.22234 363016.92123) +MULTIPOINT(594903.33074 545923.43693) +MULTIPOINT(441308.57019 229022.74901) +MULTIPOINT(605633.26966 771823.45975) +MULTIPOINT(318054.39683 406677.96877) +MULTIPOINT(606814.49094 683559.83739) +MULTIPOINT(427202.24558 526355.92112) +MULTIPOINT(585605.65458 428734.29996) +MULTIPOINT(348498.22029 696622.25466) +MULTIPOINT(447753.88823 552268.21802) +MULTIPOINT(562081.95051 696159.34758) +MULTIPOINT(449917.46153 516567.92252) +MULTIPOINT(509151.60704 594632.16326) +MULTIPOINT(565466.43528 673573.12364) +MULTIPOINT(492421.36236 719117.79927) +MULTIPOINT(613346.49996 691449.74754) +MULTIPOINT(341505.39323 347633.86011) +MULTIPOINT(335130.10922 221738.45857) +MULTIPOINT(520476.8592 607380.89342) +MULTIPOINT(610931.06529 690104.94336) +MULTIPOINT(577692.98162 695342.84069) +MULTIPOINT(623744.42521 697297.79934) +MULTIPOINT(439667.9941 646984.2557) +MULTIPOINT(507141.1403 606418.24612) +MULTIPOINT(575383.92723 737533.32187) +MULTIPOINT(413215.49525 523736.83631) +MULTIPOINT(561887.18089 504214.42238) +MULTIPOINT(583428.22076 759656.92773) +MULTIPOINT(421018.92505 813910.21541) +MULTIPOINT(621373.92981 690044.79287) +MULTIPOINT(470983.15933 620692.73333) +MULTIPOINT(508947.75836 706720.50714) diff -Nru postgis-1.5.3/regress/loader/NotReallyMultiPoint.select.sql postgis-2.0.1/regress/loader/NotReallyMultiPoint.select.sql --- postgis-1.5.3/regress/loader/NotReallyMultiPoint.select.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/NotReallyMultiPoint.select.sql 2012-06-08 17:16:28.000000000 +0000 @@ -0,0 +1,2 @@ +select ST_Asewkt(ST_SnapToGrid(the_geom,0.00001)) from loadedshp; + Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/NotReallyMultiPoint.shp and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/NotReallyMultiPoint.shp differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/NotReallyMultiPoint.shp.expected and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/NotReallyMultiPoint.shp.expected differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/NotReallyMultiPoint.shx and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/NotReallyMultiPoint.shx differ diff -Nru postgis-1.5.3/regress/loader/Point-G.select.expected postgis-2.0.1/regress/loader/Point-G.select.expected --- postgis-1.5.3/regress/loader/Point-G.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/Point-G.select.expected 2011-03-18 18:21:25.000000000 +0000 @@ -0,0 +1,3 @@ +SRID=4326;POINT(0 1) +SRID=4326;POINT(9 -1) +SRID=4326;POINT(9 -1) Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/Point-G.shp.expected and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/Point-G.shp.expected differ diff -Nru postgis-1.5.3/regress/loader/Point-w.select.expected postgis-2.0.1/regress/loader/Point-w.select.expected --- postgis-1.5.3/regress/loader/Point-w.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/Point-w.select.expected 2011-03-18 15:40:31.000000000 +0000 @@ -0,0 +1,3 @@ +POINT(0 1) +POINT(9 -1) +POINT(9 -1) diff -Nru postgis-1.5.3/regress/loader/Point-wkb.expected postgis-2.0.1/regress/loader/Point-wkb.expected --- postgis-1.5.3/regress/loader/Point-wkb.expected 2010-12-14 13:17:16.000000000 +0000 +++ postgis-2.0.1/regress/loader/Point-wkb.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -POINT(0 1) -POINT(9 -1) -POINT(9 -1) diff -Nru postgis-1.5.3/regress/loader/Point-wkb.sql postgis-2.0.1/regress/loader/Point-wkb.sql --- postgis-1.5.3/regress/loader/Point-wkb.sql 2006-06-17 11:44:12.000000000 +0000 +++ postgis-2.0.1/regress/loader/Point-wkb.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -select asewkt(the_geom) from loadedshp; - diff -Nru postgis-1.5.3/regress/loader/Point-wkt.expected postgis-2.0.1/regress/loader/Point-wkt.expected --- postgis-1.5.3/regress/loader/Point-wkt.expected 2010-12-14 13:17:16.000000000 +0000 +++ postgis-2.0.1/regress/loader/Point-wkt.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -POINT(0 1) -POINT(9 -1) -POINT(9 -1) diff -Nru postgis-1.5.3/regress/loader/Point-wkt.sql postgis-2.0.1/regress/loader/Point-wkt.sql --- postgis-1.5.3/regress/loader/Point-wkt.sql 2006-06-17 11:44:12.000000000 +0000 +++ postgis-2.0.1/regress/loader/Point-wkt.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -select asewkt(the_geom) from loadedshp; - diff -Nru postgis-1.5.3/regress/loader/Point.select.expected postgis-2.0.1/regress/loader/Point.select.expected --- postgis-1.5.3/regress/loader/Point.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/Point.select.expected 2011-03-18 15:40:31.000000000 +0000 @@ -0,0 +1,3 @@ +POINT(0 1) +POINT(9 -1) +POINT(9 -1) diff -Nru postgis-1.5.3/regress/loader/Point.select.sql postgis-2.0.1/regress/loader/Point.select.sql --- postgis-1.5.3/regress/loader/Point.select.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/Point.select.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +select ST_Asewkt(the_geom::geometry) from loadedshp order by 1; + Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/Point.shp.expected and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/Point.shp.expected differ diff -Nru postgis-1.5.3/regress/loader/PointM-G.select.expected postgis-2.0.1/regress/loader/PointM-G.select.expected --- postgis-1.5.3/regress/loader/PointM-G.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/PointM-G.select.expected 2011-07-20 19:53:57.000000000 +0000 @@ -0,0 +1,3 @@ +SRID=4326;POINTM(0 1 3) +SRID=4326;POINTM(9 -1 -123) +SRID=4326;POINTM(9 -1 -3) Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/PointM-G.shp.expected and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/PointM-G.shp.expected differ diff -Nru postgis-1.5.3/regress/loader/PointM-w.select.expected postgis-2.0.1/regress/loader/PointM-w.select.expected --- postgis-1.5.3/regress/loader/PointM-w.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/PointM-w.select.expected 2011-07-20 19:53:57.000000000 +0000 @@ -0,0 +1,3 @@ +POINTM(0 1 3) +POINTM(9 -1 -123) +POINTM(9 -1 -3) diff -Nru postgis-1.5.3/regress/loader/PointM-wkb.expected postgis-2.0.1/regress/loader/PointM-wkb.expected --- postgis-1.5.3/regress/loader/PointM-wkb.expected 2010-12-14 13:17:16.000000000 +0000 +++ postgis-2.0.1/regress/loader/PointM-wkb.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -POINTM(0 1 3) -POINTM(9 -1 -3) -POINTM(9 -1 -123) diff -Nru postgis-1.5.3/regress/loader/PointM-wkb.sql postgis-2.0.1/regress/loader/PointM-wkb.sql --- postgis-1.5.3/regress/loader/PointM-wkb.sql 2006-06-17 11:44:12.000000000 +0000 +++ postgis-2.0.1/regress/loader/PointM-wkb.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -select asewkt(the_geom) from loadedshp; diff -Nru postgis-1.5.3/regress/loader/PointM-wkt.expected postgis-2.0.1/regress/loader/PointM-wkt.expected --- postgis-1.5.3/regress/loader/PointM-wkt.expected 2010-12-14 13:17:16.000000000 +0000 +++ postgis-2.0.1/regress/loader/PointM-wkt.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -POINT(0 1) -POINT(9 -1) -POINT(9 -1) diff -Nru postgis-1.5.3/regress/loader/PointM-wkt.sql postgis-2.0.1/regress/loader/PointM-wkt.sql --- postgis-1.5.3/regress/loader/PointM-wkt.sql 2006-06-17 11:44:12.000000000 +0000 +++ postgis-2.0.1/regress/loader/PointM-wkt.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -select asewkt(the_geom) from loadedshp; diff -Nru postgis-1.5.3/regress/loader/PointM.select.expected postgis-2.0.1/regress/loader/PointM.select.expected --- postgis-1.5.3/regress/loader/PointM.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/PointM.select.expected 2011-07-20 19:53:57.000000000 +0000 @@ -0,0 +1,3 @@ +POINTM(0 1 3) +POINTM(9 -1 -123) +POINTM(9 -1 -3) diff -Nru postgis-1.5.3/regress/loader/PointM.select.sql postgis-2.0.1/regress/loader/PointM.select.sql --- postgis-1.5.3/regress/loader/PointM.select.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/PointM.select.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1 @@ +select ST_Asewkt(the_geom::geometry) from loadedshp order by 1; Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/PointM.shp.expected and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/PointM.shp.expected differ diff -Nru postgis-1.5.3/regress/loader/PointWithSchema-post.sql postgis-2.0.1/regress/loader/PointWithSchema-post.sql --- postgis-1.5.3/regress/loader/PointWithSchema-post.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/PointWithSchema-post.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,3 @@ +DROP TABLE IF EXISTS pgreg.loadedshp; +--DELETE FROM geometry_columns WHERE f_table_schema='pgreg'; +DROP SCHEMA pgreg; diff -Nru postgis-1.5.3/regress/loader/PointWithSchema-pre.sql postgis-2.0.1/regress/loader/PointWithSchema-pre.sql --- postgis-1.5.3/regress/loader/PointWithSchema-pre.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/PointWithSchema-pre.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1 @@ +CREATE SCHEMA pgreg; Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/PointWithSchema.dbf and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/PointWithSchema.dbf differ diff -Nru postgis-1.5.3/regress/loader/PointWithSchema.opts postgis-2.0.1/regress/loader/PointWithSchema.opts --- postgis-1.5.3/regress/loader/PointWithSchema.opts 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/PointWithSchema.opts 2011-03-18 17:36:01.000000000 +0000 @@ -0,0 +1,2 @@ +# Test loading a table with a schema. +-g the_geom loader/PointWithSchema pgreg.loadedshp diff -Nru postgis-1.5.3/regress/loader/PointWithSchema.select.expected postgis-2.0.1/regress/loader/PointWithSchema.select.expected --- postgis-1.5.3/regress/loader/PointWithSchema.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/PointWithSchema.select.expected 2011-03-18 19:56:16.000000000 +0000 @@ -0,0 +1,3 @@ +POINT(0 1) +POINT(9 -1) +POINT(9 -1) diff -Nru postgis-1.5.3/regress/loader/PointWithSchema.select.sql postgis-2.0.1/regress/loader/PointWithSchema.select.sql --- postgis-1.5.3/regress/loader/PointWithSchema.select.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/PointWithSchema.select.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +select ST_Asewkt(the_geom) from pgreg.loadedshp order by 1; + Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/PointWithSchema.shp and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/PointWithSchema.shp differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/PointWithSchema.shx and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/PointWithSchema.shx differ diff -Nru postgis-1.5.3/regress/loader/PointZ-G.select.expected postgis-2.0.1/regress/loader/PointZ-G.select.expected --- postgis-1.5.3/regress/loader/PointZ-G.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/PointZ-G.select.expected 2011-07-23 21:34:10.000000000 +0000 @@ -0,0 +1,3 @@ +SRID=4326;POINT(0 1 2 3) +SRID=4326;POINT(9 -1 -2 -3) +SRID=4326;POINT(9 -1 -20 -123) Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/PointZ-G.shp.expected and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/PointZ-G.shp.expected differ diff -Nru postgis-1.5.3/regress/loader/PointZ-w.select.expected postgis-2.0.1/regress/loader/PointZ-w.select.expected --- postgis-1.5.3/regress/loader/PointZ-w.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/PointZ-w.select.expected 2011-07-23 21:34:10.000000000 +0000 @@ -0,0 +1,3 @@ +POINT(0 1 2 3) +POINT(9 -1 -2 -3) +POINT(9 -1 -20 -123) diff -Nru postgis-1.5.3/regress/loader/PointZ-wkb.expected postgis-2.0.1/regress/loader/PointZ-wkb.expected --- postgis-1.5.3/regress/loader/PointZ-wkb.expected 2010-12-14 13:17:16.000000000 +0000 +++ postgis-2.0.1/regress/loader/PointZ-wkb.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -POINT(0 1 2 3) -POINT(9 -1 -2 -3) -POINT(9 -1 -20 -123) diff -Nru postgis-1.5.3/regress/loader/PointZ-wkb.sql postgis-2.0.1/regress/loader/PointZ-wkb.sql --- postgis-1.5.3/regress/loader/PointZ-wkb.sql 2006-06-17 11:44:12.000000000 +0000 +++ postgis-2.0.1/regress/loader/PointZ-wkb.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -select asewkt(the_geom) from loadedshp; diff -Nru postgis-1.5.3/regress/loader/PointZ-wkt.expected postgis-2.0.1/regress/loader/PointZ-wkt.expected --- postgis-1.5.3/regress/loader/PointZ-wkt.expected 2010-12-14 13:17:16.000000000 +0000 +++ postgis-2.0.1/regress/loader/PointZ-wkt.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -POINT(0 1 2) -POINT(9 -1 -2) -POINT(9 -1 -20) diff -Nru postgis-1.5.3/regress/loader/PointZ-wkt.sql postgis-2.0.1/regress/loader/PointZ-wkt.sql --- postgis-1.5.3/regress/loader/PointZ-wkt.sql 2006-06-17 11:44:12.000000000 +0000 +++ postgis-2.0.1/regress/loader/PointZ-wkt.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -select asewkt(the_geom) from loadedshp; diff -Nru postgis-1.5.3/regress/loader/PointZ.select.expected postgis-2.0.1/regress/loader/PointZ.select.expected --- postgis-1.5.3/regress/loader/PointZ.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/PointZ.select.expected 2011-07-23 21:34:10.000000000 +0000 @@ -0,0 +1,3 @@ +POINT(0 1 2 3) +POINT(9 -1 -2 -3) +POINT(9 -1 -20 -123) diff -Nru postgis-1.5.3/regress/loader/PointZ.select.sql postgis-2.0.1/regress/loader/PointZ.select.sql --- postgis-1.5.3/regress/loader/PointZ.select.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/PointZ.select.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1 @@ +select ST_Asewkt(the_geom::geometry) from loadedshp order by 1; Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/PointZ.shp.expected and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/PointZ.shp.expected differ diff -Nru postgis-1.5.3/regress/loader/Polygon-G.select.expected postgis-2.0.1/regress/loader/Polygon-G.select.expected --- postgis-1.5.3/regress/loader/Polygon-G.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/Polygon-G.select.expected 2011-03-18 18:21:25.000000000 +0000 @@ -0,0 +1 @@ +SRID=4326;MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(5 5,8 5,8 8,5 8,5 5)),((-1 -1,-1 -10,-10 -10,-10 -1,-1 -1),(-5 -5,-8 -5,-8 -8,-5 -8,-5 -5))) Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/Polygon-G.shp.expected and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/Polygon-G.shp.expected differ diff -Nru postgis-1.5.3/regress/loader/Polygon-w.select.expected postgis-2.0.1/regress/loader/Polygon-w.select.expected --- postgis-1.5.3/regress/loader/Polygon-w.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/Polygon-w.select.expected 2011-03-18 15:40:31.000000000 +0000 @@ -0,0 +1 @@ +MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(5 5,8 5,8 8,5 8,5 5)),((-1 -1,-1 -10,-10 -10,-10 -1,-1 -1),(-5 -5,-8 -5,-8 -8,-5 -8,-5 -5))) diff -Nru postgis-1.5.3/regress/loader/Polygon-wkb.expected postgis-2.0.1/regress/loader/Polygon-wkb.expected --- postgis-1.5.3/regress/loader/Polygon-wkb.expected 2010-12-14 13:17:16.000000000 +0000 +++ postgis-2.0.1/regress/loader/Polygon-wkb.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(5 5,8 5,8 8,5 8,5 5)),((-1 -1,-1 -10,-10 -10,-10 -1,-1 -1),(-5 -5,-8 -5,-8 -8,-5 -8,-5 -5))) diff -Nru postgis-1.5.3/regress/loader/Polygon-wkb.sql postgis-2.0.1/regress/loader/Polygon-wkb.sql --- postgis-1.5.3/regress/loader/Polygon-wkb.sql 2006-06-17 11:44:12.000000000 +0000 +++ postgis-2.0.1/regress/loader/Polygon-wkb.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -select asewkt(the_geom) from loadedshp; - diff -Nru postgis-1.5.3/regress/loader/Polygon-wkt.expected postgis-2.0.1/regress/loader/Polygon-wkt.expected --- postgis-1.5.3/regress/loader/Polygon-wkt.expected 2010-12-14 13:17:16.000000000 +0000 +++ postgis-2.0.1/regress/loader/Polygon-wkt.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(5 5,8 5,8 8,5 8,5 5)),((-1 -1,-1 -10,-10 -10,-10 -1,-1 -1),(-5 -5,-8 -5,-8 -8,-5 -8,-5 -5))) diff -Nru postgis-1.5.3/regress/loader/Polygon-wkt.sql postgis-2.0.1/regress/loader/Polygon-wkt.sql --- postgis-1.5.3/regress/loader/Polygon-wkt.sql 2006-06-17 11:44:12.000000000 +0000 +++ postgis-2.0.1/regress/loader/Polygon-wkt.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -select asewkt(the_geom) from loadedshp; - diff -Nru postgis-1.5.3/regress/loader/Polygon.select.expected postgis-2.0.1/regress/loader/Polygon.select.expected --- postgis-1.5.3/regress/loader/Polygon.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/Polygon.select.expected 2011-03-18 15:40:31.000000000 +0000 @@ -0,0 +1 @@ +MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(5 5,8 5,8 8,5 8,5 5)),((-1 -1,-1 -10,-10 -10,-10 -1,-1 -1),(-5 -5,-8 -5,-8 -8,-5 -8,-5 -5))) diff -Nru postgis-1.5.3/regress/loader/Polygon.select.sql postgis-2.0.1/regress/loader/Polygon.select.sql --- postgis-1.5.3/regress/loader/Polygon.select.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/Polygon.select.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +select ST_Asewkt(the_geom::geometry) from loadedshp; + Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/Polygon.shp.expected and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/Polygon.shp.expected differ diff -Nru postgis-1.5.3/regress/loader/PolygonM-G.select.expected postgis-2.0.1/regress/loader/PolygonM-G.select.expected --- postgis-1.5.3/regress/loader/PolygonM-G.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/PolygonM-G.select.expected 2011-03-18 18:21:25.000000000 +0000 @@ -0,0 +1 @@ +SRID=4326;MULTIPOLYGONM(((0 0 1,0 10 7,10 10 5,10 0 3,0 0 1),(5 5 9,8 5 15,8 8 13,5 8 11,5 5 9)),((-1 -1 -1,-1 -10 -7,-10 -10 -5,-10 -1 -3,-1 -1 -1),(-5 -5 -9,-8 -5 -15,-8 -8 -13,-5 -8 -11,-5 -5 -9))) Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/PolygonM-G.shp.expected and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/PolygonM-G.shp.expected differ diff -Nru postgis-1.5.3/regress/loader/PolygonM-w.select.expected postgis-2.0.1/regress/loader/PolygonM-w.select.expected --- postgis-1.5.3/regress/loader/PolygonM-w.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/PolygonM-w.select.expected 2011-03-18 15:40:31.000000000 +0000 @@ -0,0 +1 @@ +MULTIPOLYGONM(((0 0 1,0 10 7,10 10 5,10 0 3,0 0 1),(5 5 9,8 5 15,8 8 13,5 8 11,5 5 9)),((-1 -1 -1,-1 -10 -7,-10 -10 -5,-10 -1 -3,-1 -1 -1),(-5 -5 -9,-8 -5 -15,-8 -8 -13,-5 -8 -11,-5 -5 -9))) diff -Nru postgis-1.5.3/regress/loader/PolygonM-wkb.expected postgis-2.0.1/regress/loader/PolygonM-wkb.expected --- postgis-1.5.3/regress/loader/PolygonM-wkb.expected 2010-12-14 13:17:16.000000000 +0000 +++ postgis-2.0.1/regress/loader/PolygonM-wkb.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -MULTIPOLYGONM(((0 0 1,0 10 7,10 10 5,10 0 3,0 0 1),(5 5 9,8 5 15,8 8 13,5 8 11,5 5 9)),((-1 -1 -1,-1 -10 -7,-10 -10 -5,-10 -1 -3,-1 -1 -1),(-5 -5 -9,-8 -5 -15,-8 -8 -13,-5 -8 -11,-5 -5 -9))) diff -Nru postgis-1.5.3/regress/loader/PolygonM-wkb.sql postgis-2.0.1/regress/loader/PolygonM-wkb.sql --- postgis-1.5.3/regress/loader/PolygonM-wkb.sql 2006-06-17 11:44:12.000000000 +0000 +++ postgis-2.0.1/regress/loader/PolygonM-wkb.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -select asewkt(the_geom) from loadedshp; - diff -Nru postgis-1.5.3/regress/loader/PolygonM-wkt.expected postgis-2.0.1/regress/loader/PolygonM-wkt.expected --- postgis-1.5.3/regress/loader/PolygonM-wkt.expected 2010-12-14 13:17:16.000000000 +0000 +++ postgis-2.0.1/regress/loader/PolygonM-wkt.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(5 5,8 5,8 8,5 8,5 5)),((-1 -1,-1 -10,-10 -10,-10 -1,-1 -1),(-5 -5,-8 -5,-8 -8,-5 -8,-5 -5))) diff -Nru postgis-1.5.3/regress/loader/PolygonM-wkt.sql postgis-2.0.1/regress/loader/PolygonM-wkt.sql --- postgis-1.5.3/regress/loader/PolygonM-wkt.sql 2006-06-17 11:44:12.000000000 +0000 +++ postgis-2.0.1/regress/loader/PolygonM-wkt.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -select asewkt(the_geom) from loadedshp; - diff -Nru postgis-1.5.3/regress/loader/PolygonM.select.expected postgis-2.0.1/regress/loader/PolygonM.select.expected --- postgis-1.5.3/regress/loader/PolygonM.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/PolygonM.select.expected 2011-03-18 15:40:31.000000000 +0000 @@ -0,0 +1 @@ +MULTIPOLYGONM(((0 0 1,0 10 7,10 10 5,10 0 3,0 0 1),(5 5 9,8 5 15,8 8 13,5 8 11,5 5 9)),((-1 -1 -1,-1 -10 -7,-10 -10 -5,-10 -1 -3,-1 -1 -1),(-5 -5 -9,-8 -5 -15,-8 -8 -13,-5 -8 -11,-5 -5 -9))) diff -Nru postgis-1.5.3/regress/loader/PolygonM.select.sql postgis-2.0.1/regress/loader/PolygonM.select.sql --- postgis-1.5.3/regress/loader/PolygonM.select.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/PolygonM.select.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +select ST_Asewkt(the_geom::geometry) from loadedshp; + Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/PolygonM.shp.expected and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/PolygonM.shp.expected differ diff -Nru postgis-1.5.3/regress/loader/PolygonZ-G.select.expected postgis-2.0.1/regress/loader/PolygonZ-G.select.expected --- postgis-1.5.3/regress/loader/PolygonZ-G.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/PolygonZ-G.select.expected 2011-03-18 18:21:25.000000000 +0000 @@ -0,0 +1 @@ +SRID=4326;MULTIPOLYGON(((0 0 0 1,0 10 6 7,10 10 4 5,10 0 2 3,0 0 0 1),(5 5 8 9,8 5 14 15,8 8 12 13,5 8 10 11,5 5 8 9)),((-1 -1 -1 -1,-1 -10 -6 -7,-10 -10 -4 -5,-10 -1 -2 -3,-1 -1 -1 -1),(-5 -5 -8 -9,-8 -5 -14 -15,-8 -8 -12 -13,-5 -8 -10 -11,-5 -5 -8 -9))) Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/PolygonZ-G.shp.expected and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/PolygonZ-G.shp.expected differ diff -Nru postgis-1.5.3/regress/loader/PolygonZ-w.select.expected postgis-2.0.1/regress/loader/PolygonZ-w.select.expected --- postgis-1.5.3/regress/loader/PolygonZ-w.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/PolygonZ-w.select.expected 2011-03-18 15:40:31.000000000 +0000 @@ -0,0 +1 @@ +MULTIPOLYGON(((0 0 0 1,0 10 6 7,10 10 4 5,10 0 2 3,0 0 0 1),(5 5 8 9,8 5 14 15,8 8 12 13,5 8 10 11,5 5 8 9)),((-1 -1 -1 -1,-1 -10 -6 -7,-10 -10 -4 -5,-10 -1 -2 -3,-1 -1 -1 -1),(-5 -5 -8 -9,-8 -5 -14 -15,-8 -8 -12 -13,-5 -8 -10 -11,-5 -5 -8 -9))) diff -Nru postgis-1.5.3/regress/loader/PolygonZ-wkb.expected postgis-2.0.1/regress/loader/PolygonZ-wkb.expected --- postgis-1.5.3/regress/loader/PolygonZ-wkb.expected 2010-12-14 13:17:16.000000000 +0000 +++ postgis-2.0.1/regress/loader/PolygonZ-wkb.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -MULTIPOLYGON(((0 0 0 1,0 10 6 7,10 10 4 5,10 0 2 3,0 0 0 1),(5 5 8 9,8 5 14 15,8 8 12 13,5 8 10 11,5 5 8 9)),((-1 -1 -1 -1,-1 -10 -6 -7,-10 -10 -4 -5,-10 -1 -2 -3,-1 -1 -1 -1),(-5 -5 -8 -9,-8 -5 -14 -15,-8 -8 -12 -13,-5 -8 -10 -11,-5 -5 -8 -9))) diff -Nru postgis-1.5.3/regress/loader/PolygonZ-wkb.sql postgis-2.0.1/regress/loader/PolygonZ-wkb.sql --- postgis-1.5.3/regress/loader/PolygonZ-wkb.sql 2006-06-17 11:44:12.000000000 +0000 +++ postgis-2.0.1/regress/loader/PolygonZ-wkb.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -select asewkt(the_geom) from loadedshp; - diff -Nru postgis-1.5.3/regress/loader/PolygonZ-wkt.expected postgis-2.0.1/regress/loader/PolygonZ-wkt.expected --- postgis-1.5.3/regress/loader/PolygonZ-wkt.expected 2010-12-14 13:17:16.000000000 +0000 +++ postgis-2.0.1/regress/loader/PolygonZ-wkt.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -MULTIPOLYGON(((0 0 0,0 10 6,10 10 4,10 0 2,0 0 0),(5 5 8,8 5 14,8 8 12,5 8 10,5 5 8)),((-1 -1 -1,-1 -10 -6,-10 -10 -4,-10 -1 -2,-1 -1 -1),(-5 -5 -8,-8 -5 -14,-8 -8 -12,-5 -8 -10,-5 -5 -8))) diff -Nru postgis-1.5.3/regress/loader/PolygonZ-wkt.sql postgis-2.0.1/regress/loader/PolygonZ-wkt.sql --- postgis-1.5.3/regress/loader/PolygonZ-wkt.sql 2006-06-17 11:44:12.000000000 +0000 +++ postgis-2.0.1/regress/loader/PolygonZ-wkt.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -select asewkt(the_geom) from loadedshp; - diff -Nru postgis-1.5.3/regress/loader/PolygonZ.select.expected postgis-2.0.1/regress/loader/PolygonZ.select.expected --- postgis-1.5.3/regress/loader/PolygonZ.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/PolygonZ.select.expected 2011-03-18 15:40:31.000000000 +0000 @@ -0,0 +1 @@ +MULTIPOLYGON(((0 0 0 1,0 10 6 7,10 10 4 5,10 0 2 3,0 0 0 1),(5 5 8 9,8 5 14 15,8 8 12 13,5 8 10 11,5 5 8 9)),((-1 -1 -1 -1,-1 -10 -6 -7,-10 -10 -4 -5,-10 -1 -2 -3,-1 -1 -1 -1),(-5 -5 -8 -9,-8 -5 -14 -15,-8 -8 -12 -13,-5 -8 -10 -11,-5 -5 -8 -9))) diff -Nru postgis-1.5.3/regress/loader/PolygonZ.select.sql postgis-2.0.1/regress/loader/PolygonZ.select.sql --- postgis-1.5.3/regress/loader/PolygonZ.select.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/PolygonZ.select.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +select ST_Asewkt(the_geom::geometry) from loadedshp; + Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/PolygonZ.shp.expected and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/PolygonZ.shp.expected differ diff -Nru postgis-1.5.3/regress/loader/README postgis-2.0.1/regress/loader/README --- postgis-1.5.3/regress/loader/README 2006-06-17 11:44:12.000000000 +0000 +++ postgis-2.0.1/regress/loader/README 2012-02-27 22:08:12.000000000 +0000 @@ -1,13 +1,43 @@ -Sat Jun 17 11:40:38 CEST 2006 --strk; +A loader test requires, at a minimum, a dbf file: -The ../run_test script will load a provided shapefile using both DUMP and INSERT -mode and both WKT and WKB modes into a table name 'loadedshp'. -After each WKB load, the -wkb.sql test, if available, will be run -and output compared to -wkb.expected -After each WKT load, the -wkt.sql test, if available, will be run -and output compared to -wkt.expected -We need two separate tests for WKB and WKT as the WKT mode will not support M values. - -Also, the tester script will dump the WKB loaded table and compare the resulting -shapefile with the original one (only .shp, .dbf is not compared as field sizes are not -retained, we might use a dbf viewer for that, but that's not currently implemented) +.dbf + +Most tests will use a shapefile, so these files as well: + +.shp +.shx + +The loader will be run against the dbf/shapefile with no command-line flags, +then the output will be run via psql to insert the table into PostGIS. + +If there is no .opts file, the loader is then run with the -D flag, +and the output again run via psql. + +See ../README for a description of optional setup/teardown script files. + +The following are optional files for each loader test: + +.opts - If this exists, the first line that does not begin with a # + is read and passed as command line arguments to the loader. This + allows testing any arbitrary command line arguments (-s, -G, etc). + NOTE: When this file exists, this test is NOT run a second time + with -D, because -D can conflict with some arguments. + +.sql.expected - If this exists, the output of the loader is compared + with this file before running it via psql. + +.select.sql and +.select.expected - If these are present, after the loader output is + loaded into the database, the query in .select.sql is run and + the psql output is compared with .select.expected. + +.select.sql and +-w.select.expected - If these are present, the loader is also run with + the -w flag to produce WKT output rather than WKB output. The query + in .select.sql is run again and compared against + -w.select.expected. + +.shp.expected - If this is present, the dumper is run (after running + the WKB version, not the WKT version, as WKT can lose precision) + and the .shp file produced by the dumper is compared with + .shp.expected. diff -Nru postgis-1.5.3/regress/loader/ReprojectPts-post.sql postgis-2.0.1/regress/loader/ReprojectPts-post.sql --- postgis-1.5.3/regress/loader/ReprojectPts-post.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/ReprojectPts-post.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +-- Cleanup +DELETE FROM spatial_ref_sys; diff -Nru postgis-1.5.3/regress/loader/ReprojectPts-pre.sql postgis-2.0.1/regress/loader/ReprojectPts-pre.sql --- postgis-1.5.3/regress/loader/ReprojectPts-pre.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/ReprojectPts-pre.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,10 @@ +--- +--- 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 -Nru postgis-1.5.3/regress/loader/ReprojectPts-w.select.expected postgis-2.0.1/regress/loader/ReprojectPts-w.select.expected --- postgis-1.5.3/regress/loader/ReprojectPts-w.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/ReprojectPts-w.select.expected 2011-03-28 20:21:46.000000000 +0000 @@ -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) Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/ReprojectPts.dbf and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/ReprojectPts.dbf differ diff -Nru postgis-1.5.3/regress/loader/ReprojectPts.opts postgis-2.0.1/regress/loader/ReprojectPts.opts --- postgis-1.5.3/regress/loader/ReprojectPts.opts 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/ReprojectPts.opts 2011-12-19 19:21:26.000000000 +0000 @@ -0,0 +1,3 @@ +# 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. +-S -s 2260:4326 diff -Nru postgis-1.5.3/regress/loader/ReprojectPts.select.expected postgis-2.0.1/regress/loader/ReprojectPts.select.expected --- postgis-1.5.3/regress/loader/ReprojectPts.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/ReprojectPts.select.expected 2011-03-28 20:21:46.000000000 +0000 @@ -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 -Nru postgis-1.5.3/regress/loader/ReprojectPts.select.sql postgis-2.0.1/regress/loader/ReprojectPts.select.sql --- postgis-1.5.3/regress/loader/ReprojectPts.select.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/ReprojectPts.select.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +select ST_Asewkt(ST_SnapToGrid(the_geom,0.00000001)) from loadedshp; + Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/ReprojectPts.shp and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/ReprojectPts.shp differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/ReprojectPts.shx and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/ReprojectPts.shx differ diff -Nru postgis-1.5.3/regress/loader/ReprojectPtsGeog-post.sql postgis-2.0.1/regress/loader/ReprojectPtsGeog-post.sql --- postgis-1.5.3/regress/loader/ReprojectPtsGeog-post.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/ReprojectPtsGeog-post.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +-- cleanup +DELETE FROM spatial_ref_sys; diff -Nru postgis-1.5.3/regress/loader/ReprojectPtsGeog-pre.sql postgis-2.0.1/regress/loader/ReprojectPtsGeog-pre.sql --- postgis-1.5.3/regress/loader/ReprojectPtsGeog-pre.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/ReprojectPtsGeog-pre.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,10 @@ +--- +--- 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 -Nru postgis-1.5.3/regress/loader/ReprojectPtsGeog-w.select.expected postgis-2.0.1/regress/loader/ReprojectPtsGeog-w.select.expected --- postgis-1.5.3/regress/loader/ReprojectPtsGeog-w.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/ReprojectPtsGeog-w.select.expected 2011-03-28 20:21:46.000000000 +0000 @@ -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) Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/ReprojectPtsGeog.dbf and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/ReprojectPtsGeog.dbf differ diff -Nru postgis-1.5.3/regress/loader/ReprojectPtsGeog.opts postgis-2.0.1/regress/loader/ReprojectPtsGeog.opts --- postgis-1.5.3/regress/loader/ReprojectPtsGeog.opts 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/ReprojectPtsGeog.opts 2011-12-19 19:21:26.000000000 +0000 @@ -0,0 +1,3 @@ +# This happens to be a multipoint shapefile that has only single points, so use -S. +# It is in NJ State Plane NAD83, using the -G flag will reproject to 4326. +-S -s 2260:4326 -G diff -Nru postgis-1.5.3/regress/loader/ReprojectPtsGeog.select.expected postgis-2.0.1/regress/loader/ReprojectPtsGeog.select.expected --- postgis-1.5.3/regress/loader/ReprojectPtsGeog.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/ReprojectPtsGeog.select.expected 2011-03-28 20:21:46.000000000 +0000 @@ -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 -Nru postgis-1.5.3/regress/loader/ReprojectPtsGeog.select.sql postgis-2.0.1/regress/loader/ReprojectPtsGeog.select.sql --- postgis-1.5.3/regress/loader/ReprojectPtsGeog.select.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/ReprojectPtsGeog.select.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +select ST_Asewkt(ST_SnapToGrid(the_geom::geometry,0.00000001)) from loadedshp; + Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/ReprojectPtsGeog.shp and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/ReprojectPtsGeog.shp differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/ReprojectPtsGeog.shx and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/ReprojectPtsGeog.shx differ diff -Nru postgis-1.5.3/regress/loader/TSIPolygon-w.select.expected postgis-2.0.1/regress/loader/TSIPolygon-w.select.expected --- postgis-1.5.3/regress/loader/TSIPolygon-w.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/TSIPolygon-w.select.expected 2011-03-18 15:40:31.000000000 +0000 @@ -0,0 +1 @@ +MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(5 5,8 5,8 8,5 8,5 5)),((-1 -1,-1 -10,-10 -10,-10 -1,-1 -1),(-5 -5,-8 -5,-8 -8,-5 -8,-5 -5))) Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/TSIPolygon.dbf and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/TSIPolygon.dbf differ diff -Nru postgis-1.5.3/regress/loader/TSIPolygon.opts postgis-2.0.1/regress/loader/TSIPolygon.opts --- postgis-1.5.3/regress/loader/TSIPolygon.opts 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/TSIPolygon.opts 2011-03-16 14:06:54.000000000 +0000 @@ -0,0 +1,6 @@ +# You cannot create a test tablespace because tablespaces need to be directories that +# are owned by the postgres user, which is rarely the same as the user running the test, +# and you can't chown without sudo, so we gave up on trying to have a test that proves +# the -T and -X parameters work. However we can at least test that they don't cause +# any problems, which is what this test is for. +-X pg_default diff -Nru postgis-1.5.3/regress/loader/TSIPolygon.select.expected postgis-2.0.1/regress/loader/TSIPolygon.select.expected --- postgis-1.5.3/regress/loader/TSIPolygon.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/TSIPolygon.select.expected 2011-03-18 15:40:31.000000000 +0000 @@ -0,0 +1 @@ +MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(5 5,8 5,8 8,5 8,5 5)),((-1 -1,-1 -10,-10 -10,-10 -1,-1 -1),(-5 -5,-8 -5,-8 -8,-5 -8,-5 -5))) diff -Nru postgis-1.5.3/regress/loader/TSIPolygon.select.sql postgis-2.0.1/regress/loader/TSIPolygon.select.sql --- postgis-1.5.3/regress/loader/TSIPolygon.select.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/TSIPolygon.select.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +select ST_Asewkt(the_geom) from loadedshp; + Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/TSIPolygon.shp and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/TSIPolygon.shp differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/TSIPolygon.shp.expected and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/TSIPolygon.shp.expected differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/TSIPolygon.shx and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/TSIPolygon.shx differ diff -Nru postgis-1.5.3/regress/loader/TSTIPolygon-w.select.expected postgis-2.0.1/regress/loader/TSTIPolygon-w.select.expected --- postgis-1.5.3/regress/loader/TSTIPolygon-w.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/TSTIPolygon-w.select.expected 2011-03-18 15:40:31.000000000 +0000 @@ -0,0 +1 @@ +MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(5 5,8 5,8 8,5 8,5 5)),((-1 -1,-1 -10,-10 -10,-10 -1,-1 -1),(-5 -5,-8 -5,-8 -8,-5 -8,-5 -5))) Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/TSTIPolygon.dbf and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/TSTIPolygon.dbf differ diff -Nru postgis-1.5.3/regress/loader/TSTIPolygon.opts postgis-2.0.1/regress/loader/TSTIPolygon.opts --- postgis-1.5.3/regress/loader/TSTIPolygon.opts 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/TSTIPolygon.opts 2011-03-16 14:06:54.000000000 +0000 @@ -0,0 +1,6 @@ +# You cannot create a test tablespace because tablespaces need to be directories that +# are owned by the postgres user, which is rarely the same as the user running the test, +# and you can't chown without sudo, so we gave up on trying to have a test that proves +# the -T and -X parameters work. However we can at least test that they don't cause +# any problems, which is what this test is for. +-T pg_default -X pg_default diff -Nru postgis-1.5.3/regress/loader/TSTIPolygon.select.expected postgis-2.0.1/regress/loader/TSTIPolygon.select.expected --- postgis-1.5.3/regress/loader/TSTIPolygon.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/TSTIPolygon.select.expected 2011-03-18 15:40:31.000000000 +0000 @@ -0,0 +1 @@ +MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(5 5,8 5,8 8,5 8,5 5)),((-1 -1,-1 -10,-10 -10,-10 -1,-1 -1),(-5 -5,-8 -5,-8 -8,-5 -8,-5 -5))) diff -Nru postgis-1.5.3/regress/loader/TSTIPolygon.select.sql postgis-2.0.1/regress/loader/TSTIPolygon.select.sql --- postgis-1.5.3/regress/loader/TSTIPolygon.select.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/TSTIPolygon.select.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +select ST_Asewkt(the_geom) from loadedshp; + Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/TSTIPolygon.shp and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/TSTIPolygon.shp differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/TSTIPolygon.shp.expected and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/TSTIPolygon.shp.expected differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/TSTIPolygon.shx and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/TSTIPolygon.shx differ diff -Nru postgis-1.5.3/regress/loader/TSTPolygon-w.select.expected postgis-2.0.1/regress/loader/TSTPolygon-w.select.expected --- postgis-1.5.3/regress/loader/TSTPolygon-w.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/TSTPolygon-w.select.expected 2011-03-18 15:40:31.000000000 +0000 @@ -0,0 +1 @@ +MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(5 5,8 5,8 8,5 8,5 5)),((-1 -1,-1 -10,-10 -10,-10 -1,-1 -1),(-5 -5,-8 -5,-8 -8,-5 -8,-5 -5))) Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/TSTPolygon.dbf and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/TSTPolygon.dbf differ diff -Nru postgis-1.5.3/regress/loader/TSTPolygon.opts postgis-2.0.1/regress/loader/TSTPolygon.opts --- postgis-1.5.3/regress/loader/TSTPolygon.opts 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/TSTPolygon.opts 2011-03-16 14:06:54.000000000 +0000 @@ -0,0 +1,6 @@ +# You cannot create a test tablespace because tablespaces need to be directories that +# are owned by the postgres user, which is rarely the same as the user running the test, +# and you can't chown without sudo, so we gave up on trying to have a test that proves +# the -T and -X parameters work. However we can at least test that they don't cause +# any problems, which is what this test is for. +-T pg_default diff -Nru postgis-1.5.3/regress/loader/TSTPolygon.select.expected postgis-2.0.1/regress/loader/TSTPolygon.select.expected --- postgis-1.5.3/regress/loader/TSTPolygon.select.expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/TSTPolygon.select.expected 2011-03-18 15:40:31.000000000 +0000 @@ -0,0 +1 @@ +MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(5 5,8 5,8 8,5 8,5 5)),((-1 -1,-1 -10,-10 -10,-10 -1,-1 -1),(-5 -5,-8 -5,-8 -8,-5 -8,-5 -5))) diff -Nru postgis-1.5.3/regress/loader/TSTPolygon.select.sql postgis-2.0.1/regress/loader/TSTPolygon.select.sql --- postgis-1.5.3/regress/loader/TSTPolygon.select.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/loader/TSTPolygon.select.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +select ST_Asewkt(the_geom) from loadedshp; + Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/TSTPolygon.shp and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/TSTPolygon.shp differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/TSTPolygon.shp.expected and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/TSTPolygon.shp.expected differ Binary files /tmp/HcVx0HqX4E/postgis-1.5.3/regress/loader/TSTPolygon.shx and /tmp/0gD0VaZ8_r/postgis-2.0.1/regress/loader/TSTPolygon.shx differ diff -Nru postgis-1.5.3/regress/lwgeom_regress.sql postgis-2.0.1/regress/lwgeom_regress.sql --- postgis-1.5.3/regress/lwgeom_regress.sql 2007-06-04 23:06:28.000000000 +0000 +++ postgis-2.0.1/regress/lwgeom_regress.sql 2012-02-27 22:08:12.000000000 +0000 @@ -82,38 +82,21 @@ INSERT INTO test_data VALUES (-12, 'POLYGON((0 0.1 -0.01,0.2 10.3 -0.02,10.4 10.5 -0.03,10.7 0.6 -0.04,0 0.1 -0.01),(2 2 -0.01,2 3 -0.01,3 3 -0.01,3 2 -0.01,2 2 -0.01))', '0080000003000000020000000500000000000000003FB999999999999ABF847AE147AE147B3FC999999999999A402499999999999ABF947AE147AE147B4024CCCCCCCCCCCD4025000000000000BF9EB851EB851EB840256666666666663FE3333333333333BFA47AE147AE147B00000000000000003FB999999999999ABF847AE147AE147B0000000540000000000000004000000000000000BF847AE147AE147B40000000000000004008000000000000BF847AE147AE147B40080000000000004008000000000000BF847AE147AE147B40080000000000004000000000000000BF847AE147AE147B40000000000000004000000000000000BF847AE147AE147B', '0103000080020000000500000000000000000000009A9999999999B93F7B14AE47E17A84BF9A9999999999C93F9A999999999924407B14AE47E17A94BFCDCCCCCCCCCC24400000000000002540B81E85EB51B89EBF6666666666662540333333333333E33F7B14AE47E17AA4BF00000000000000009A9999999999B93F7B14AE47E17A84BF05000000000000000000004000000000000000407B14AE47E17A84BF000000000000004000000000000008407B14AE47E17A84BF000000000000084000000000000008407B14AE47E17A84BF000000000000084000000000000000407B14AE47E17A84BF000000000000004000000000000000407B14AE47E17A84BF'); INSERT INTO test_data VALUES (-13, 'POLYGON((0 0.1 -0.01,0.2 10.3 -0.02,10.4 10.5 -0.03,10.7 0.6 -0.04,0 0.1 -0.01),(2 2 -0.01,2 3 -0.01,3 3 -0.01,3 2 -0.01,2 2 -0.01),(4 2 0,4 3 0,5 3 0,5 2 0,4 2 0))', '0080000003000000030000000500000000000000003FB999999999999ABF847AE147AE147B3FC999999999999A402499999999999ABF947AE147AE147B4024CCCCCCCCCCCD4025000000000000BF9EB851EB851EB840256666666666663FE3333333333333BFA47AE147AE147B00000000000000003FB999999999999ABF847AE147AE147B0000000540000000000000004000000000000000BF847AE147AE147B40000000000000004008000000000000BF847AE147AE147B40080000000000004008000000000000BF847AE147AE147B40080000000000004000000000000000BF847AE147AE147B40000000000000004000000000000000BF847AE147AE147B00000005401000000000000040000000000000000000000000000000401000000000000040080000000000000000000000000000401400000000000040080000000000000000000000000000401400000000000040000000000000000000000000000000401000000000000040000000000000000000000000000000', '0103000080030000000500000000000000000000009A9999999999B93F7B14AE47E17A84BF9A9999999999C93F9A999999999924407B14AE47E17A94BFCDCCCCCCCCCC24400000000000002540B81E85EB51B89EBF6666666666662540333333333333E33F7B14AE47E17AA4BF00000000000000009A9999999999B93F7B14AE47E17A84BF05000000000000000000004000000000000000407B14AE47E17A84BF000000000000004000000000000008407B14AE47E17A84BF000000000000084000000000000008407B14AE47E17A84BF000000000000084000000000000000407B14AE47E17A84BF000000000000004000000000000000407B14AE47E17A84BF05000000000000000000104000000000000000400000000000000000000000000000104000000000000008400000000000000000000000000000144000000000000008400000000000000000000000000000144000000000000000400000000000000000000000000000104000000000000000400000000000000000'); - -SELECT id,wkt FROM test_data WHERE - asEWKT(geometry(wkt)) != wkt OR - asEWKT(geometry(wkb_xdr)) != wkt OR - asEWKT(geometry(wkb_ndr)) != wkt OR - asBinary(geometry(wkb_ndr)) != asBinary(geometry(wkb_xdr)) OR - asBinary(geometry(wkt)) != asBinary(geometry(wkb_xdr)); - - -SELECT extent(geometry(wkb_ndr)) from test_data; -SELECT extent3d(geometry(wkb_ndr)) from test_data; -SELECT mem_size(collect(force_2d(geometry(wkb_ndr)))) from test_data; -SELECT mem_size(collect(force_3dz(geometry(wkb_ndr)))) from test_data; -SELECT mem_size(collect(force_4d(force_2d(geometry(wkb_ndr))))) from test_data; -SELECT mem_size(collect(force_3dm(geometry(wkb_ndr)))) from test_data; -SELECT mem_size(collect(force_2d(force_4d(force_3dm(force_3dz(force_2d(geometry(wkb_ndr)))))))) from test_data; - -- SELECT id,wkt FROM test_data WHERE - ST_asEWKT(ST_geometry(wkt)) != wkt OR - ST_asEWKT(ST_geometry(wkb_xdr)) != wkt OR - ST_asEWKT(ST_geometry(wkb_ndr)) != wkt OR - ST_asBinary(ST_geometry(wkb_ndr)) != ST_asBinary(ST_geometry(wkb_xdr)) OR - ST_asBinary(ST_geometry(wkt)) != ST_asBinary(ST_geometry(wkb_xdr)); + ST_asEWKT(geometry(wkt)) != wkt OR + ST_asEWKT(geometry(wkb_xdr)) != wkt OR + ST_asEWKT(geometry(wkb_ndr)) != wkt OR + ST_asBinary(geometry(wkb_ndr)) != ST_asBinary(geometry(wkb_xdr)) OR + ST_asBinary(geometry(wkt)) != ST_asBinary(geometry(wkb_xdr)); -SELECT ST_extent(ST_geometry(wkb_ndr)) from test_data; -SELECT ST_extent3d(ST_geometry(wkb_ndr)) from test_data; -SELECT ST_mem_size(ST_collect(ST_force_2d(ST_geometry(wkb_ndr)))) from test_data; -SELECT ST_mem_size(ST_collect(ST_force_3dz(ST_geometry(wkb_ndr)))) from test_data; -SELECT ST_mem_size(ST_collect(ST_force_4d(ST_force_2d(ST_geometry(wkb_ndr))))) from test_data; -SELECT ST_mem_size(ST_collect(ST_force_3dm(ST_geometry(wkb_ndr)))) from test_data; -SELECT ST_mem_size(ST_collect(ST_force_2d(ST_force_4d(ST_force_3dm(ST_force_3dz(ST_force_2d(ST_geometry(wkb_ndr)))))))) from test_data; +SELECT ST_extent(geometry(wkb_ndr)) from test_data; +SELECT ST_3DExtent(geometry(wkb_ndr)) from test_data; +SELECT ST_mem_size(ST_collect(ST_force_2d(geometry(wkb_ndr)))) from test_data; +SELECT ST_mem_size(ST_collect(ST_force_3dz(geometry(wkb_ndr)))) from test_data; +SELECT ST_mem_size(ST_collect(ST_force_4d(ST_force_2d(geometry(wkb_ndr))))) from test_data; +SELECT ST_mem_size(ST_collect(ST_force_3dm(geometry(wkb_ndr)))) from test_data; +SELECT ST_mem_size(ST_collect(ST_force_2d(ST_force_4d(ST_force_3dm(ST_force_3dz(ST_force_2d(geometry(wkb_ndr)))))))) from test_data; DROP TABLE test_data; diff -Nru postgis-1.5.3/regress/lwgeom_regress_expected postgis-2.0.1/regress/lwgeom_regress_expected --- postgis-1.5.3/regress/lwgeom_regress_expected 2010-12-14 13:14:14.000000000 +0000 +++ postgis-2.0.1/regress/lwgeom_regress_expected 2012-02-27 22:08:12.000000000 +0000 @@ -1,14 +1,7 @@ BOX(0 0.1,11 12) BOX3D(0 0.1 -55,11 12 12) -10431 -15063 -19695 -15063 -10431 -BOX(0 0.1,11 12) -BOX3D(0 0.1 -55,11 12 12) -10431 -15063 -19695 -15063 -10431 +11184 +15824 +20464 +15824 +11184 diff -Nru postgis-1.5.3/regress/measures.sql postgis-2.0.1/regress/measures.sql --- postgis-1.5.3/regress/measures.sql 2010-12-30 18:43:56.000000000 +0000 +++ postgis-2.0.1/regress/measures.sql 2012-02-27 22:08:12.000000000 +0000 @@ -1,51 +1,31 @@ -select '113', area2d('MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) ,( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7, 5 7, 5 5),(1 1,2 1, 2 2, 1 2, 1 1) ) )'::GEOMETRY) as value; -select '114', perimeter2d('MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) ,( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7, 5 7, 5 5),(1 1,2 1, 2 2, 1 2, 1 1) ) )'::GEOMETRY) as value; - -select '115', perimeter3d('MULTIPOLYGON( ((0 0 0, 10 0 0, 10 10 0, 0 10 0, 0 0 0)),( (0 0 0, 10 0 0, 10 10 0, 0 10 0, 0 0 0),(5 5 0, 7 5 0, 7 7 0, 5 7 0, 5 5 0) ) ,( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1, 5 7 1, 5 5 1),(1 1 1,2 1 1, 2 2 1, 1 2 1, 1 1 1) ) )'::GEOMETRY) as value; - - -select '116', length2d('MULTILINESTRING((0 0, 1 1),(0 0, 1 1, 2 2) )'::GEOMETRY) as value; -select '117', length3d('MULTILINESTRING((0 0, 1 1),(0 0, 1 1, 2 2) )'::GEOMETRY) as value; -select '118', length3d('MULTILINESTRING((0 0 0, 1 1 1),(0 0 0, 1 1 1, 2 2 2) )'::GEOMETRY) as value; - -select '134', distance('POINT(1 2)', 'POINT(1 2)'); -select '135', distance('POINT(5 0)', 'POINT(10 12)'); - -select '136', distance('POINT(0 0)', translate('POINT(0 0)', 5, 12, 0)); - --- postgis-users/2006-May/012174.html -select 'dist', distance(a,b), ST_distance(b,a) from ( - select 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))'::geometry as a, - 'POLYGON((11 0, 11 10, 20 10, 20 0, 11 0), - (15 5, 15 8, 17 8, 17 5, 15 5))'::geometry as b - ) as foo; - --- Apply the same tests using the new function names. select '113', ST_area2d('MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) ,( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7, 5 7, 5 5),(1 1,2 1, 2 2, 1 2, 1 1) ) )'::GEOMETRY) as value; select '114', ST_perimeter2d('MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) ,( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7, 5 7, 5 5),(1 1,2 1, 2 2, 1 2, 1 1) ) )'::GEOMETRY) as value; -select '115', ST_perimeter3d('MULTIPOLYGON( ((0 0 0, 10 0 0, 10 10 0, 0 10 0, 0 0 0)),( (0 0 0, 10 0 0, 10 10 0, 0 10 0, 0 0 0),(5 5 0, 7 5 0, 7 7 0, 5 7 0, 5 5 0) ) ,( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1, 5 7 1, 5 5 1),(1 1 1,2 1 1, 2 2 1, 1 2 1, 1 1 1) ) )'::GEOMETRY) as value; +select '115', ST_3DPerimeter('MULTIPOLYGON( ((0 0 0, 10 0 0, 10 10 0, 0 10 0, 0 0 0)),( (0 0 0, 10 0 0, 10 10 0, 0 10 0, 0 0 0),(5 5 0, 7 5 0, 7 7 0, 5 7 0, 5 5 0) ) ,( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1, 5 7 1, 5 5 1),(1 1 1,2 1 1, 2 2 1, 1 2 1, 1 1 1) ) )'::GEOMETRY) as value; select '116', ST_length2d('MULTILINESTRING((0 0, 1 1),(0 0, 1 1, 2 2) )'::GEOMETRY) as value; -select '117', ST_length3d('MULTILINESTRING((0 0, 1 1),(0 0, 1 1, 2 2) )'::GEOMETRY) as value; -select '118', ST_length3d('MULTILINESTRING((0 0 0, 1 1 1),(0 0 0, 1 1 1, 2 2 2) )'::GEOMETRY) as value; +select '117', ST_3dlength('MULTILINESTRING((0 0, 1 1),(0 0, 1 1, 2 2) )'::GEOMETRY) as value; +select '118', ST_3dlength('MULTILINESTRING((0 0 0, 1 1 1),(0 0 0, 1 1 1, 2 2 2) )'::GEOMETRY) as value; -select '134', ST_distance('POINT(1 2)', 'POINT(1 2)'); -select '135', ST_distance('POINT(5 0)', 'POINT(10 12)'); +select '134', ST_Distance('POINT(1 2)', 'POINT(1 2)'); +select '135', ST_Distance('POINT(5 0)', 'POINT(10 12)'); -select '136', ST_distance('POINT(0 0)', ST_translate('POINT(0 0)', 5, 12, 0)); +select '136', ST_Distance('POINT(0 0)', ST_translate('POINT(0 0)', 5, 12, 0)); -- postgis-users/2006-May/012174.html -select 'dist', ST_distance(a,b), ST_distance(b,a) from ( +select 'dist', ST_Distance(a,b), ST_Distance(b,a) from ( select 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))'::geometry as a, 'POLYGON((11 0, 11 10, 20 10, 20 0, 11 0), (15 5, 15 8, 17 8, 17 5, 15 5))'::geometry as b ) as foo; +--#1502 +SELECT '#1502', ST_Dwithin(a,b,0.0) from +(SELECT 'LINESTRING(-97364 -97364, 9736.4 9736.4)'::geometry a, 'POINT(0 0)'::geometry b ) foo; --st_shortestline @@ -92,23 +72,17 @@ (15 5, 15 8, 17 8, 17 5, 15 5))'::geometry as b ) as foo; - - - - - select 'distancetest1', - st_distance(a, b), - st_maxdistance(a, b), - st_astext(st_shortestline(a,b)), - st_astext(st_shortestline(b,a)), - st_astext(st_longestline(a,b)), - st_astext(st_longestline(b,a)) from ( - select geomfromtext('MULTILINESTRING((17 16, 16 17, 17 18, 17 17, 17 16), (28 35,29 39, 30 35))') as a, - geomfromtext('MULTIPOLYGON(((-1 -1, -1 25, 25 25, 25 -1, -1 -1), (14 14,14 19,19 19,19 14,14 14)), - ((33 35,33 40, 35 40, 35 35, 33 35)))') as b - ) as foo; - + ST_Distance(a, b), + st_maxdistance(a, b), + st_astext(st_shortestline(a,b)), + st_astext(st_shortestline(b,a)), + st_astext(st_longestline(a,b)), + st_astext(st_longestline(b,a)) from ( +select + ST_GeomFromText('MULTILINESTRING((17 16, 16 17, 17 18, 17 17, 17 16), (28 35,29 39, 30 35))') as a, + ST_GeomFromText('MULTIPOLYGON(((-1 -1, -1 25, 25 25, 25 -1, -1 -1), (14 14,14 19,19 19,19 14,14 14)),((33 35,33 40, 35 40, 35 35, 33 35)))') as b +) as foo; select 'distancetest2', ST_Distance(a, b), @@ -120,90 +94,149 @@ st_astext(st_longestline(a,b)), st_astext(st_longestline(b,a)) from ( select - geomfromtext('LINESTRING(-40 -20 , 4 2)') as a, - geomfromtext('LINESTRING(-10 20, 1 -2)') as b + ST_GeomFromText('LINESTRING(-40 -20 , 4 2)') as a, + ST_GeomFromText('LINESTRING(-10 20, 1 -2)') as b ) as foo; - select 'distancepoly1', - st_distance(a, b), - st_maxdistance(a, b), - st_astext(st_shortestline(a,b)), - st_astext(st_shortestline(b,a)), - st_astext(st_longestline(a,b)), - st_astext(st_longestline(b,a)) from ( - select geomfromtext('MULTIPOLYGON(((17 16, 16 17, 17 18, 17 17, 17 16)), ((28 35,29 39, 30 35, 28 35)))') as a, - geomfromtext('MULTIPOLYGON(((-1 -1, -1 25, 25 25, 25 -1, -1 -1), (14 14,14 19,19 19,19 14,14 14)), - ((33 35,33 40, 35 40, 35 35, 33 35)))') as b - ) as foo; - - + ST_Distance(a, b), + st_maxdistance(a, b), + st_astext(st_shortestline(a,b)), + st_astext(st_shortestline(b,a)), + st_astext(st_longestline(a,b)), + st_astext(st_longestline(b,a)) from ( +select + ST_GeomFromText('MULTIPOLYGON(((17 16, 16 17, 17 18, 17 17, 17 16)), ((28 35,29 39, 30 35, 28 35)))') as a, + ST_GeomFromText('MULTIPOLYGON(((-1 -1, -1 25, 25 25, 25 -1, -1 -1), (14 14,14 19,19 19,19 14,14 14)),((33 35,33 40, 35 40, 35 35, 33 35)))') as b +) as foo; select 'distancepoly2', - st_distance(a, b), + ST_Distance(a, b), st_maxdistance(a, b), st_astext(st_shortestline(a,b)), st_astext(st_shortestline(b,a)), st_astext(st_longestline(a,b)), st_astext(st_longestline(b,a)) from ( - select geomfromtext('POLYGON((17 14, 16 17, 17 18, 17 17, 17 14))') as a, - geomfromtext('POLYGON((-1 -1, -1 25, 25 25, 25 -1, -1 -1), (14 14,14 19,19 19,19 14,14 14))') as b + select ST_GeomFromText('POLYGON((17 14, 16 17, 17 18, 17 17, 17 14))') as a, + ST_GeomFromText('POLYGON((-1 -1, -1 25, 25 25, 25 -1, -1 -1), (14 14,14 19,19 19,19 14,14 14))') as b ) as foo; select 'distancepoly3', - st_distance(a, b), + ST_Distance(a, b), st_maxdistance(a, b), st_astext(st_shortestline(a,b)), st_astext(st_shortestline(b,a)), st_astext(st_longestline(a,b)), st_astext(st_longestline(b,a)) from ( - select geomfromtext('POLYGON((17 16, 16 17, 17 19, 17 17, 17 16))') as a, - geomfromtext('POLYGON((-1 -1, -1 25, 25 25, 25 -1, -1 -1), (14 14,14 19,19 19,19 14,14 14))') as b + select ST_GeomFromText('POLYGON((17 16, 16 17, 17 19, 17 17, 17 16))') as a, + ST_GeomFromText('POLYGON((-1 -1, -1 25, 25 25, 25 -1, -1 -1), (14 14,14 19,19 19,19 14,14 14))') as b ) as foo; select 'distancepoly4', - st_distance(a, b), + ST_Distance(a, b), st_maxdistance(a, b), st_astext(st_shortestline(a,b)), st_astext(st_shortestline(b,a)), st_astext(st_longestline(a,b)), st_astext(st_longestline(b,a)) from ( - select geomfromtext('POLYGON((17 16, 16 17, 16 20, 18 20, 18 17, 17 16))') as a, - geomfromtext('POLYGON((-1 -1, -1 25, 25 25, 25 -1, -1 -1), (14 14,14 19,19 19,19 14,14 14))') as b + select ST_GeomFromText('POLYGON((17 16, 16 17, 16 20, 18 20, 18 17, 17 16))') as a, + ST_GeomFromText('POLYGON((-1 -1, -1 25, 25 25, 25 -1, -1 -1), (14 14,14 19,19 19,19 14,14 14))') as b ) as foo; select 'distancepoly5', - st_distance(a, b), + ST_Distance(a, b), st_maxdistance(a, b), st_astext(st_shortestline(a,b)), st_astext(st_shortestline(b,a)), st_astext(st_longestline(a,b)), st_astext(st_longestline(b,a)) from ( - select geomfromtext('POLYGON((17 12, 16 17, 17 18, 17 17, 17 12))') as a, - geomfromtext('POLYGON((-1 -1, -1 25, 25 25, 25 -1, -1 -1), (14 14,14 19,19 19,19 14,14 14))') as b + select ST_GeomFromText('POLYGON((17 12, 16 17, 17 18, 17 17, 17 12))') as a, + ST_GeomFromText('POLYGON((-1 -1, -1 25, 25 25, 25 -1, -1 -1), (14 14,14 19,19 19,19 14,14 14))') as b ) as foo; select 'distancepoly6', - st_distance(a, b), + ST_Distance(a, b), st_maxdistance(a, b), st_astext(st_shortestline(a,b)), st_astext(st_shortestline(b,a)), st_astext(st_longestline(a,b)), st_astext(st_longestline(b,a)) from ( - select geomfromtext('POLYGON((2 2, 2 3, 3 3, 3 2, 2 2))') as a, - geomfromtext('POLYGON((-1 -1, -1 25, 25 25, 25 -1, -1 -1), (14 14,14 19,19 19,19 14,14 14))') as b + select ST_GeomFromText('POLYGON((2 2, 2 3, 3 3, 3 2, 2 2))') as a, + ST_GeomFromText('POLYGON((-1 -1, -1 25, 25 25, 25 -1, -1 -1), (14 14,14 19,19 19,19 14,14 14))') as b ) as foo; +--3D Distance functions + +SELECT '3dDistancetest1', + ST_3DDistance(a,b), + ST_3DMaxDistance(a,b), + ST_3DDWithin(a,b,5), + ST_3DDFullyWithin(a,b,5), + ST_ASEWKT(ST_3DShortestline(a,b)), + ST_ASEWKT(ST_3DClosestpoint(a,b)), + ST_ASEWKT(ST_3DLongestline(a,b)) FROM ( + SELECT 'POINT(1 1 1)'::geometry as a, 'POINT(3 2 7)'::geometry as b + ) as foo; + + +SELECT '3dDistancetest2', + ST_3DDistance(a,b), + ST_3DMaxDistance(a,b), + ST_3DDWithin(a,b,5), + ST_3DDFullyWithin(a,b,5), + ST_ASEWKT(ST_3DShortestline(a,b)), + ST_ASEWKT(ST_3DClosestpoint(a,b)), + ST_ASEWKT(ST_3DLongestline(a,b)) FROM ( + SELECT 'POINT(1 1 1)'::geometry as a, 'LINESTRING(0 0 0, 2 2 2)'::geometry as b + ) as foo; + + +SELECT '3dDistancetest3', + ST_3DDistance(a,b), + ST_3DMaxDistance(a,b), + ST_3DDWithin(a,b,5), + ST_3DDFullyWithin(a,b,5), + ST_ASEWKT(ST_SnapToGrid(ST_3DShortestline(a,b), 1e-14)), + ST_ASEWKT(ST_3DClosestpoint(a,b)), + ST_ASEWKT(ST_3DLongestline(a,b)) FROM ( + SELECT 'POINT(1 1 1)'::geometry as a, 'LINESTRING(5 2 6, -3 -2 4)'::geometry as b + ) as foo; + + +SELECT '3dDistancetest4', + ST_3DDistance(a,b), + ST_3DMaxDistance(a,b), + ST_3DDWithin(a,b,5), + ST_3DDFullyWithin(a,b,5), + ST_ASEWKT(ST_3DShortestline(a,b)), + ST_ASEWKT(ST_3DClosestpoint(a,b)), + ST_ASEWKT(ST_3DLongestline(a,b)) FROM ( + SELECT 'LINESTRING(1 1 3, 5 7 8)'::geometry as a, 'POINT(1 1 1)'::geometry as b + ) as foo; + SELECT '3dDistancetest5', + ST_3DDistance(a,b), + ST_3DMaxDistance(a,b), + ST_3DDWithin(a,b,5), + ST_3DDFullyWithin(a,b,5), + ST_ASEWKT(ST_3DShortestline(a,b)), + ST_ASEWKT(ST_3DClosestpoint(a,b)), + ST_ASEWKT(ST_3DLongestline(a,b)) FROM ( + SELECT 'LINESTRING(1 0 5, 11 0 5)'::geometry as a, 'LINESTRING(5 2 0, 5 2 10, 5 0 13)'::geometry as b + ) as foo; + +SELECT '3dDistancetest6', + ST_3DDistance(a,b) FROM ( + SELECT 'LINESTRING(1 1 1 , 2 2 2)'::geometry as a, 'POLYGON((0 0 0, 2 2 2, 3 3 3, 0 0 0))'::geometry as b) as foo; -- Area of an empty polygon select 'emptyPolyArea', st_area('POLYGON EMPTY'); @@ -225,3 +258,6 @@ -- Area of an empty collection select 'emptyCollectionArea', st_area('GEOMETRYCOLLECTION EMPTY'); + +-- +select 'spheroidLength1', round(st_length_spheroid('MULTILINESTRING((-118.584 38.374,-118.583 38.5),(-71.05957 42.3589 , -71.061 43))'::geometry,'SPHEROID["GRS_1980",6378137,298.257222101]'::spheroid)::numeric,5); diff -Nru postgis-1.5.3/regress/measures_expected postgis-2.0.1/regress/measures_expected --- postgis-1.5.3/regress/measures_expected 2010-12-30 18:43:56.000000000 +0000 +++ postgis-2.0.1/regress/measures_expected 2012-02-27 22:08:12.000000000 +0000 @@ -8,16 +8,7 @@ 135|13 136|13 dist|1|1 -113|291 -114|140 -115|140 -116|4.24264068711929 -117|4.24264068711929 -118|5.19615242270663 -134|0 -135|13 -136|13 -dist|1|1 +#1502|t st_shortestline_134|LINESTRING(1 2,1 2) st_shortestline_135|LINESTRING(5 0,10 12) st_shortestline_136|LINESTRING(0 0,5 12) @@ -38,6 +29,12 @@ distancepoly4|0|28.3196045170126|LINESTRING(16 19,16 19)|LINESTRING(16 19,16 19)|LINESTRING(18 20,-1 -1)|LINESTRING(-1 -1,18 20) distancepoly5|0|26.1725046566048|LINESTRING(17 12,17 12)|LINESTRING(17 12,17 12)|LINESTRING(17 18,-1 -1)|LINESTRING(-1 -1,17 18) distancepoly6|0|32.5269119345812|LINESTRING(2 2,2 2)|LINESTRING(2 2,2 2)|LINESTRING(2 2,25 25)|LINESTRING(25 25,2 2) +3dDistancetest1|6.40312423743285|6.40312423743285|f|f|LINESTRING(1 1 1,3 2 7)|POINT(1 1 1)|LINESTRING(1 1 1,3 2 7) +3dDistancetest2|0|1.73205080756888|t|t|LINESTRING(1 1 1,1 1 1)|POINT(1 1 1)|LINESTRING(1 1 1,0 0 0) +3dDistancetest3|4.09994192757944|6.48074069840786|t|f|LINESTRING(1 1 1,0.61904761904762 -0.19047619047619 4.90476190476191)|POINT(1 1 1)|LINESTRING(1 1 1,5 2 6) +3dDistancetest4|2|10.0498756211209|t|f|LINESTRING(1 1 3,1 1 1)|POINT(1 1 3)|LINESTRING(5 7 8,1 1 1) +3dDistancetest5|2|10|t|f|LINESTRING(5 0 5,5 2 5)|POINT(5 0 5)|LINESTRING(11 0 5,5 0 13) +3dDistancetest6|0 emptyPolyArea|0 emptyLineArea|0 emptyPointArea|0 @@ -45,3 +42,4 @@ emptyMultiLineArea|0 emptyMultiPointArea|0 emptyCollectionArea|0 +spheroidLength1|85204.52077 diff -Nru postgis-1.5.3/regress/node.sql postgis-2.0.1/regress/node.sql --- postgis-1.5.3/regress/node.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/node.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,14 @@ +-- Node two crossing lines +select 't1', st_asewkt(st_node( +'SRID=10;MULTILINESTRING((0 0, 10 0),(5 -5, 5 5))' +)); + +-- Node two overlapping lines +select 't2', st_asewkt(st_node( +'SRID=10;MULTILINESTRING((0 0, 10 0, 20 0),(25 0, 15 0, 8 0))' +)); + +-- Node a self-intersecting line +-- NOTE: requires GEOS 3.3.2 which is still unreleased at time of writing +-- see http://trac.osgeo.org/geos/ticket/482 +--select st_node('SRID=10;LINESTRING(0 0, 10 10, 0 10, 10 0)'); diff -Nru postgis-1.5.3/regress/node_expected postgis-2.0.1/regress/node_expected --- postgis-1.5.3/regress/node_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/node_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +t1|SRID=10;MULTILINESTRING((0 0,5 0),(5 -5,5 0),(5 0,10 0),(5 0,5 5)) +t2|SRID=10;MULTILINESTRING((0 0,8 0),(8 0,10 0,15 0,20 0),(20 0,25 0)) diff -Nru postgis-1.5.3/regress/offsetcurve.sql postgis-2.0.1/regress/offsetcurve.sql --- postgis-1.5.3/regress/offsetcurve.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/offsetcurve.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,53 @@ +\set VERBOSITY terse +set client_min_messages to NOTICE; +SELECT 't0', ST_OffsetCurve('POINT(0 0)', 10); +SELECT 't0', ST_AsEWKT(ST_OffsetCurve('SRID=42;LINESTRING(0 0, 10 0)', 0)); +SELECT 't1', ST_AsEWKT(ST_OffsetCurve('SRID=42;LINESTRING(0 0, 10 0)', 10)); +SELECT 't2', ST_AsEWKT(ST_OffsetCurve('SRID=42;LINESTRING(0 0, 10 0)', -10)); +SELECT 't3', ST_AsEWKT(ST_OffsetCurve('SRID=42;LINESTRING(10 0, 0 0)', 10)); +SELECT 't4', ST_AsEWKT(ST_OffsetCurve('SRID=42;LINESTRING(10 0, 0 0)', -10)); +SELECT 't5', ST_AsEWKT(ST_SnapToGrid(ST_OffsetCurve( + 'SRID=42;LINESTRING(0 0, 10 0, 10 10)', -10), +1)); +SELECT 't5b', ST_AsEWKT(ST_OffsetCurve( + 'SRID=42;LINESTRING(0 0, 10 0, 10 10)', 10)); +SELECT 't6', ST_AsEWKT(ST_SnapToGrid(ST_OffsetCurve( + 'SRID=42;LINESTRING(0 0, 10 0, 10 10)', -10, + 'quad_segs=2'), +1)); +SELECT 't7', ST_AsEWKT(ST_OffsetCurve( + 'SRID=42;LINESTRING(0 0, 10 0, 10 10)', -10, + 'join=bevel') +); +SELECT 't8', ST_AsEWKT(ST_SnapToGrid(ST_OffsetCurve( + 'SRID=42;LINESTRING(0 0, 10 0, 10 10)', -10, + 'quad_segs=2 join=mitre'), +1)); +SELECT 't9', ST_AsEWKT(ST_SnapToGrid(ST_OffsetCurve( + 'SRID=42;LINESTRING(0 0, 10 0, 5 10)', -10, + 'quad_segs=2 join=mitre mitre_limit=1'), +1)); +SELECT 't10', ST_AsEWKT(ST_SnapToGrid(ST_OffsetCurve( + 'SRID=42;LINESTRING(0 0, 10 0, 5 10)', 2, + 'quad_segs=2 join=mitre mitre_limit=1'), +1)); +SELECT 't10b', ST_AsEWKT(ST_SnapToGrid(ST_OffsetCurve( + 'SRID=42;LINESTRING(0 0, 10 0, 5 10)', 2, + 'quad_segs=2 join=miter miter_limit=1'), +1)); +SELECT 't11', ST_AsEWKT(ST_SnapToGrid(ST_OffsetCurve( + 'LINESTRING(36 38,38 35,41 34,42 33,45 32,47 28,50 28,52 32,57 33)', 2, + 'join=mitre'), +0.2)); +SELECT 't12', ST_AsEWKT(ST_SnapToGrid(ST_OffsetCurve( + 'LINESTRING(36 38,38 35,41 34,42 33,45 32,47 28,50 28,52 32,57 33)', -2, + 'join=mitre'), +0.2)); +SELECT 't13', ST_AsEWKT(ST_OffsetCurve( + 'LINESTRING(0 0,0 20, 10 20, 10 10, 0 10)', 2, + 'join=mitre' +)); +SELECT 't14', ST_AsEWKT(ST_OffsetCurve( + 'LINESTRING(0 0,0 20, 10 20, 10 10, 0 10)', -2, + '' +)); diff -Nru postgis-1.5.3/regress/offsetcurve_expected postgis-2.0.1/regress/offsetcurve_expected --- postgis-1.5.3/regress/offsetcurve_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/offsetcurve_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,18 @@ +ERROR: ST_OffsetCurve only works with LineStrings +t0|SRID=42;LINESTRING(0 0,10 0) +t1|SRID=42;LINESTRING(0 10,10 10) +t2|SRID=42;LINESTRING(10 -10,0 -10) +t3|SRID=42;LINESTRING(10 -10,0 -10) +t4|SRID=42;LINESTRING(0 10,10 10) +t5|SRID=42;LINESTRING(20 10,20 0,20 -2,19 -4,18 -6,17 -7,16 -8,14 -9,12 -10,10 -10,0 -10) +t5b|SRID=42;LINESTRING EMPTY +t6|SRID=42;LINESTRING(20 10,20 0,17 -7,10 -10,0 -10) +t7|SRID=42;LINESTRING(20 10,20 0,10 -10,0 -10) +t8|SRID=42;LINESTRING(20 10,20 -10,0 -10) +t9|SRID=42;LINESTRING(14 14,21 -1,16 -9,0 -10) +t10|SRID=42;LINESTRING(0 2,7 2,3 9) +t10b|SRID=42;LINESTRING(0 2,7 2,3 9) +t11|LINESTRING(37.6 39.2,39.2 36.6,42 35.8,43 34.8,46.4 33.6,48.2 30,48.8 30,50.6 33.8,56.6 35) +t12|LINESTRING(57.4 31,53.4 30.2,51.2 26,45.8 26,43.6 30.4,41 31.2,40 32.2,36.8 33.4,34.4 36.8) +t13|LINESTRING(-2 0,-2 22,12 22,12 8,2 8) +t14|MULTILINESTRING((2 12,8 12,8 18,2 18,2 12),(2 8,2 0)) diff -Nru postgis-1.5.3/regress/out_geography.sql postgis-2.0.1/regress/out_geography.sql --- postgis-1.5.3/regress/out_geography.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/out_geography.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,144 @@ + +-- +-- spatial_ref_sys data +-- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","proj4text") VALUES (4326,'EPSG',4326,'+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs '); + +INSERT INTO "spatial_ref_sys" ("srid", "proj4text") VALUES (102189, '+proj=tmerc +lat_0=4.599047222222222 +lon_0=-74.08091666666667 +k=1.000000 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs84=307,304,-318,0,0,0,0 +units=m +no_defs '); + + +-- +-- GML +-- + +-- Empty Geometry +SELECT 'gml_empty_geom', ST_AsGML(geography(GeomFromEWKT(NULL))); + +-- Precision +SELECT 'gml_precision_01', ST_AsGML(geography(GeomFromEWKT('SRID=4326;POINT(1.1111111 1.1111111)')), -2); +SELECT 'gml_precision_02', ST_AsGML(geography(GeomFromEWKT('SRID=4326;POINT(1.1111111 1.1111111)')), 19); + +-- Version +SELECT 'gml_version_01', ST_AsGML(2, geography(GeomFromEWKT('SRID=4326;POINT(1 1)'))); +SELECT 'gml_version_02', ST_AsGML(3, geography(GeomFromEWKT('SRID=4326;POINT(1 1)'))); +SELECT 'gml_version_03', ST_AsGML(21, geography(GeomFromEWKT('SRID=4326;POINT(1 1)'))); +SELECT 'gml_version_04', ST_AsGML(-4, geography(GeomFromEWKT('SRID=4326;POINT(1 1)'))); + +-- Option +SELECT 'gml_option_01', ST_AsGML(2, geography(GeomFromEWKT('SRID=4326;POINT(1 1)')), 0, 0); +SELECT 'gml_option_02', ST_AsGML(3, geography(GeomFromEWKT('SRID=4326;POINT(1 1)')), 0, 1); +SELECT 'gml_option_03', ST_AsGML(3, geography(GeomFromEWKT('SRID=4326;POINT(1 1)')), 0, 2); + +-- Deegree data +SELECT 'gml_deegree_01', ST_AsGML(2, geography(GeomFromEWKT('SRID=4326;POINT(1 2)')), 0, 0); +SELECT 'gml_deegree_02', ST_AsGML(2, geography(GeomFromEWKT('SRID=4326;POINT(1 2)')), 0, 1); +SELECT 'gml_deegree_03', ST_AsGML(3, geography(GeomFromEWKT('SRID=4326;POINT(1 2)')), 0, 0); +SELECT 'gml_deegree_04', ST_AsGML(3, geography(GeomFromEWKT('SRID=4326;POINT(1 2)')), 0, 1); + +-- Prefix +SELECT 'gml_prefix_01', ST_AsGML(2, geography(GeomFromEWKT('SRID=4326;POINT(1 2)')), 0, 0, ''); +SELECT 'gml_prefix_02', ST_AsGML(3, geography(GeomFromEWKT('SRID=4326;POINT(1 2)')), 0, 0, ''); +SELECT 'gml_prefix_03', ST_AsGML(2, geography(GeomFromEWKT('SRID=4326;POINT(1 2)')), 0, 0, 'foo'); +SELECT 'gml_prefix_04', ST_AsGML(3, geography(GeomFromEWKT('SRID=4326;POINT(1 2)')), 0, 0, 'foo'); + + +-- +-- KML +-- + +-- SRID +SELECT 'kml_srid_01', ST_AsKML(geography(GeomFromEWKT('SRID=10;POINT(0 1)'))); +SELECT 'kml_srid_02', ST_AsKML(geography(GeomFromEWKT('POINT(0 1)'))); + +-- Empty Geometry +SELECT 'kml_empty_geom', ST_AsKML(geography(GeomFromEWKT(NULL))); + +-- Precision +SELECT 'kml_precision_01', ST_AsKML(geography(GeomFromEWKT('SRID=4326;POINT(1.1111111 1.1111111)')), -2); +SELECT 'kml_precision_02', ST_AsKML(geography(GeomFromEWKT('SRID=4326;POINT(1.1111111 1.1111111)')), 19); + +-- Version +SELECT 'kml_version_01', ST_AsKML(2, geography(GeomFromEWKT('SRID=4326;POINT(1 1)'))); +SELECT 'kml_version_02', ST_AsKML(3, geography(GeomFromEWKT('SRID=4326;POINT(1 1)'))); +SELECT 'kml_version_03', ST_AsKML(-4, geography(GeomFromEWKT('SRID=4326;POINT(1 1)'))); + +-- Prefix +SELECT 'kml_prefix_01', ST_AsKML(2, geography(GeomFromEWKT('SRID=4326;POINT(1 2)')), 0, ''); +SELECT 'kml_prefix_02', ST_AsKML(2, geography(GeomFromEWKT('SRID=4326;POINT(1 2)')), 0, 'kml'); + +-- Projected +-- National Astronomical Observatory of Colombia - Bogota, Colombia (Placemark) +SELECT 'kml_projection_01', ST_AsKML(geography(GeomFromEWKT('SRID=102189;POINT(1000000 1000000)')), 3); + + +-- +-- SVG +-- + +-- Empty Geometry +SELECT 'svg_empty_geom', ST_AsSVG(geography(GeomFromEWKT(NULL))); + +-- Option +SELECT 'svg_option_01', ST_AsSVG(geography(GeomFromEWKT('LINESTRING(1 1, 4 4, 5 7)')), 0); +SELECT 'svg_option_02', ST_AsSVG(geography(GeomFromEWKT('LINESTRING(1 1, 4 4, 5 7)')), 1); +SELECT 'svg_option_03', ST_AsSVG(geography(GeomFromEWKT('LINESTRING(1 1, 4 4, 5 7)')), 0, 0); +SELECT 'svg_option_04', ST_AsSVG(geography(GeomFromEWKT('LINESTRING(1 1, 4 4, 5 7)')), 1, 0); + +-- Precision +SELECT 'svg_precision_01', ST_AsSVG(geography(GeomFromEWKT('POINT(1.1111111 1.1111111)')), 1, -2); +SELECT 'svg_precision_02', ST_AsSVG(geography(GeomFromEWKT('POINT(1.1111111 1.1111111)')), 1, 19); + + +-- +-- GeoJson +-- + +-- Empty Geometry +SELECT 'geojson_empty_geom', ST_AsGeoJson(geography(GeomFromEWKT(NULL))); + +-- Precision +SELECT 'geojson_precision_01', ST_AsGeoJson(geography(GeomFromEWKT('SRID=4326;POINT(1.1111111 1.1111111)')), -2); +SELECT 'geojson_precision_02', ST_AsGeoJson(geography(GeomFromEWKT('SRID=4326;POINT(1.1111111 1.1111111)')), 19); + +-- Version +SELECT 'geojson_version_01', ST_AsGeoJson(1, geography(GeomFromEWKT('SRID=4326;POINT(1 1)'))); +SELECT 'geojson_version_02', ST_AsGeoJson(21, geography(GeomFromEWKT('SRID=4326;POINT(1 1)'))); +SELECT 'geojson_version_03', ST_AsGeoJson(-4, geography(GeomFromEWKT('SRID=4326;POINT(1 1)'))); + +-- CRS +SELECT 'geojson_crs_01', ST_AsGeoJson(geography(GeomFromEWKT('SRID=4326;POINT(1 1)')), 0, 2); +SELECT 'geojson_crs_02', ST_AsGeoJson(geography(GeomFromEWKT('POINT(1 1)')), 0, 2); +SELECT 'geojson_crs_03', ST_AsGeoJson(geography(GeomFromEWKT('SRID=4326;POINT(1 1)')), 0, 4); +SELECT 'geojson_crs_04', ST_AsGeoJson(geography(GeomFromEWKT('POINT(1 1)')), 0, 4); +SELECT 'geojson_crs_05', ST_AsGeoJson(geography(GeomFromEWKT('SRID=1;POINT(1 1)')), 0, 2); +SELECT 'geojson_crs_06', ST_AsGeoJson(geography(GeomFromEWKT('SRID=1;POINT(1 1)')), 0, 4); + +-- Bbox +SELECT 'geojson_bbox_01', ST_AsGeoJson(geography(GeomFromEWKT('LINESTRING(1 1, 2 2, 3 3, 4 4)')), 0); +SELECT 'geojson_bbox_02', ST_AsGeoJson(geography(GeomFromEWKT('LINESTRING(1 1, 2 2, 3 3, 4 4)')), 0, 1); +SELECT 'geojson_bbox_03', ST_AsGeoJson(geography(GeomFromEWKT('LINESTRING(1 1, 2 2, 3 3, 4 4)')), 0, 3); +SELECT 'geojson_bbox_04', ST_AsGeoJson(geography(GeomFromEWKT('LINESTRING(1 1, 2 2, 3 3, 4 4)')), 0, 5); + +-- CRS and Bbox +SELECT 'geojson_options_01', ST_AsGeoJson(geography(GeomFromEWKT('LINESTRING(1 1, 2 2, 3 3, 4 4)')), 0, 0); +SELECT 'geojson_options_02', ST_AsGeoJson(geography(GeomFromEWKT('SRID=4326;LINESTRING(1 1, 2 2, 3 3, 4 4)')), 0); +SELECT 'geojson_options_03', ST_AsGeoJson(geography(GeomFromEWKT('LINESTRING(1 1, 2 2, 3 3, 4 4)')), 0, 1); +SELECT 'geojson_options_04', ST_AsGeoJson(geography(GeomFromEWKT('SRID=4326;LINESTRING(1 1, 2 2, 3 3, 4 4)')), 0, 1); +SELECT 'geojson_options_05', ST_AsGeoJson(geography(GeomFromEWKT('LINESTRING(1 1, 2 2, 3 3, 4 4)')), 0, 2); +SELECT 'geojson_options_06', ST_AsGeoJson(geography(GeomFromEWKT('SRID=4326;LINESTRING(1 1, 2 2, 3 3, 4 4)')), 0, 2); +SELECT 'geojson_options_07', ST_AsGeoJson(geography(GeomFromEWKT('LINESTRING(1 1, 2 2, 3 3, 4 4)')), 0, 3); +SELECT 'geojson_options_08', ST_AsGeoJson(geography(GeomFromEWKT('SRID=4326;LINESTRING(1 1, 2 2, 3 3, 4 4)')), 0, 3); +SELECT 'geojson_options_09', ST_AsGeoJson(geography(GeomFromEWKT('LINESTRING(1 1, 2 2, 3 3, 4 4)')), 0, 4); +SELECT 'geojson_options_10', ST_AsGeoJson(geography(GeomFromEWKT('SRID=4326;LINESTRING(1 1, 2 2, 3 3, 4 4)')), 0, 4); +SELECT 'geojson_options_11', ST_AsGeoJson(geography(GeomFromEWKT('LINESTRING(1 1, 2 2, 3 3, 4 4)')), 0, 5); +SELECT 'geojson_options_12', ST_AsGeoJson(geography(GeomFromEWKT('SRID=4326;LINESTRING(1 1, 2 2, 3 3, 4 4)')), 0, 5); +SELECT 'geojson_options_13', ST_AsGeoJson(geography(GeomFromEWKT('LINESTRING(1 1, 2 2, 3 3, 4 4)')), 0, 6); +SELECT 'geojson_options_14', ST_AsGeoJson(geography(GeomFromEWKT('SRID=4326;LINESTRING(1 1, 2 2, 3 3, 4 4)')), 0, 6); +SELECT 'geojson_options_15', ST_AsGeoJson(geography(GeomFromEWKT('LINESTRING(1 1, 2 2, 3 3, 4 4)')), 0, 7); +SELECT 'geojson_options_16', ST_AsGeoJson(geography(GeomFromEWKT('SRID=4326;LINESTRING(1 1, 2 2, 3 3, 4 4)')), 0, 7); + + +-- +-- Delete inserted spatial data +-- +DELETE FROM spatial_ref_sys; diff -Nru postgis-1.5.3/regress/out_geography_expected postgis-2.0.1/regress/out_geography_expected --- postgis-1.5.3/regress/out_geography_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/out_geography_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,68 @@ +gml_empty_geom| +gml_precision_01|1,1 +gml_precision_02|1.1111111,1.1111111 +gml_version_01|1,1 +gml_version_02|1 1 +ERROR: Only GML 2 and GML 3 are supported +ERROR: Only GML 2 and GML 3 are supported +gml_option_01|1,1 +gml_option_02|1 1 +gml_option_03|1 1 +gml_deegree_01|1,2 +gml_deegree_02|1,2 +gml_deegree_03|1 2 +gml_deegree_04|2 1 +gml_prefix_01|1,2 +gml_prefix_02|1 2 +gml_prefix_03|1,2 +gml_prefix_04|1 2 +ERROR: GetProj4StringSPI: Cannot find SRID (10) in spatial_ref_sys +kml_srid_02|0,1 +kml_empty_geom| +kml_precision_01|1,1 +kml_precision_02|1.1111111,1.1111111 +kml_version_01|1,1 +ERROR: Only KML 2 is supported +ERROR: Only KML 2 is supported +kml_prefix_01|1,2 +kml_prefix_02|1,2 +ERROR: Only lon/lat coordinate systems are supported in geography. +svg_empty_geom| +svg_option_01|M 1 -1 L 4 -4 5 -7 +svg_option_02|M 1 -1 l 3 -3 1 -3 +svg_option_03|M 1 -1 L 4 -4 5 -7 +svg_option_04|M 1 -1 l 3 -3 1 -3 +svg_precision_01|x="1" y="-1" +svg_precision_02|x="1.1111111" y="-1.1111111" +geojson_empty_geom| +geojson_precision_01|{"type":"Point","coordinates":[1,1]} +geojson_precision_02|{"type":"Point","coordinates":[1.1111111,1.1111111]} +geojson_version_01|{"type":"Point","coordinates":[1,1]} +ERROR: Only GeoJSON 1 is supported +ERROR: Only GeoJSON 1 is supported +geojson_crs_01|{"type":"Point","crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[1,1]} +geojson_crs_02|{"type":"Point","crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[1,1]} +geojson_crs_03|{"type":"Point","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG::4326"}},"coordinates":[1,1]} +geojson_crs_04|{"type":"Point","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG::4326"}},"coordinates":[1,1]} +ERROR: GetProj4StringSPI: Cannot find SRID (1) in spatial_ref_sys +ERROR: GetProj4StringSPI: Cannot find SRID (1) in spatial_ref_sys +geojson_bbox_01|{"type":"LineString","coordinates":[[1,1],[2,2],[3,3],[4,4]]} +geojson_bbox_02|{"type":"LineString","bbox":[1,1,4,4],"coordinates":[[1,1],[2,2],[3,3],[4,4]]} +geojson_bbox_03|{"type":"LineString","crs":{"type":"name","properties":{"name":"EPSG:4326"}},"bbox":[1,1,4,4],"coordinates":[[1,1],[2,2],[3,3],[4,4]]} +geojson_bbox_04|{"type":"LineString","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG::4326"}},"bbox":[1,1,4,4],"coordinates":[[1,1],[2,2],[3,3],[4,4]]} +geojson_options_01|{"type":"LineString","coordinates":[[1,1],[2,2],[3,3],[4,4]]} +geojson_options_02|{"type":"LineString","coordinates":[[1,1],[2,2],[3,3],[4,4]]} +geojson_options_03|{"type":"LineString","bbox":[1,1,4,4],"coordinates":[[1,1],[2,2],[3,3],[4,4]]} +geojson_options_04|{"type":"LineString","bbox":[1,1,4,4],"coordinates":[[1,1],[2,2],[3,3],[4,4]]} +geojson_options_05|{"type":"LineString","crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[[1,1],[2,2],[3,3],[4,4]]} +geojson_options_06|{"type":"LineString","crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[[1,1],[2,2],[3,3],[4,4]]} +geojson_options_07|{"type":"LineString","crs":{"type":"name","properties":{"name":"EPSG:4326"}},"bbox":[1,1,4,4],"coordinates":[[1,1],[2,2],[3,3],[4,4]]} +geojson_options_08|{"type":"LineString","crs":{"type":"name","properties":{"name":"EPSG:4326"}},"bbox":[1,1,4,4],"coordinates":[[1,1],[2,2],[3,3],[4,4]]} +geojson_options_09|{"type":"LineString","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG::4326"}},"coordinates":[[1,1],[2,2],[3,3],[4,4]]} +geojson_options_10|{"type":"LineString","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG::4326"}},"coordinates":[[1,1],[2,2],[3,3],[4,4]]} +geojson_options_11|{"type":"LineString","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG::4326"}},"bbox":[1,1,4,4],"coordinates":[[1,1],[2,2],[3,3],[4,4]]} +geojson_options_12|{"type":"LineString","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG::4326"}},"bbox":[1,1,4,4],"coordinates":[[1,1],[2,2],[3,3],[4,4]]} +geojson_options_13|{"type":"LineString","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG::4326"}},"coordinates":[[1,1],[2,2],[3,3],[4,4]]} +geojson_options_14|{"type":"LineString","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG::4326"}},"coordinates":[[1,1],[2,2],[3,3],[4,4]]} +geojson_options_15|{"type":"LineString","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG::4326"}},"bbox":[1,1,4,4],"coordinates":[[1,1],[2,2],[3,3],[4,4]]} +geojson_options_16|{"type":"LineString","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG::4326"}},"bbox":[1,1,4,4],"coordinates":[[1,1],[2,2],[3,3],[4,4]]} diff -Nru postgis-1.5.3/regress/out_geometry.sql postgis-2.0.1/regress/out_geometry.sql --- postgis-1.5.3/regress/out_geometry.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/out_geometry.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,152 @@ +-- +-- spatial_ref_sys data +-- +DELETE FROM "spatial_ref_sys"; +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","proj4text") VALUES (4326,'EPSG',4326,'+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs '); + +--- EPSG 1021892 : Bogota 1975 / Colombia Bogota zone (deprecated) +INSERT INTO "spatial_ref_sys" ("srid", "proj4text") VALUES (102189, '+proj=tmerc +lat_0=4.599047222222222 +lon_0=-74.08091666666667 +k=1.000000 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs84=307,304,-318,0,0,0,0 +units=m +no_defs '); + + +-- +-- GML +-- + +-- Empty Geometry +SELECT 'gml_empty_geom', ST_AsGML(GeomFromEWKT(NULL)); + +-- Precision +SELECT 'gml_precision_01', ST_AsGML(GeomFromEWKT('SRID=4326;POINT(1.1111111 1.1111111)'), -2); +SELECT 'gml_precision_02', ST_AsGML(GeomFromEWKT('SRID=4326;POINT(1.1111111 1.1111111)'), 19); + +-- Version +SELECT 'gml_version_01', ST_AsGML(2, GeomFromEWKT('SRID=4326;POINT(1 1)')); +SELECT 'gml_version_02', ST_AsGML(3, GeomFromEWKT('SRID=4326;POINT(1 1)')); +SELECT 'gml_version_03', ST_AsGML(21, GeomFromEWKT('SRID=4326;POINT(1 1)')); +SELECT 'gml_version_04', ST_AsGML(-4, GeomFromEWKT('SRID=4326;POINT(1 1)')); + +-- Option +SELECT 'gml_option_01', ST_AsGML(2, GeomFromEWKT('SRID=4326;POINT(1 1)'), 0, 0); +SELECT 'gml_option_02', ST_AsGML(3, GeomFromEWKT('SRID=4326;POINT(1 1)'), 0, 1); +SELECT 'gml_option_03', ST_AsGML(3, GeomFromEWKT('SRID=4326;POINT(1 1)'), 0, 2); + +-- Deegree data +SELECT 'gml_deegree_01', ST_AsGML(3, GeomFromEWKT('SRID=4326;POINT(1 2)'), 0, 0); +SELECT 'gml_deegree_02', ST_AsGML(2, GeomFromEWKT('SRID=4326;POINT(1 2)'), 0, 16); +SELECT 'gml_deegree_03', ST_AsGML(3, GeomFromEWKT('SRID=4326;POINT(1 2)'), 0, 16); +SELECT 'gml_deegree_04', ST_AsGML(3, GeomFromEWKT('SRID=4326;POINT(1 2 3)'), 0, 0); +SELECT 'gml_deegree_05', ST_AsGML(2, GeomFromEWKT('SRID=4326;POINT(1 2 3)'), 0, 16); +SELECT 'gml_deegree_06', ST_AsGML(3, GeomFromEWKT('SRID=4326;POINT(1 2 3)'), 0, 16); + +-- Prefix +SELECT 'gml_prefix_01', ST_AsGML(2, GeomFromEWKT('SRID=4326;POINT(1 2)'), 0, 16, ''); +SELECT 'gml_prefix_02', ST_AsGML(3, GeomFromEWKT('SRID=4326;POINT(1 2)'), 0, 16, ''); +SELECT 'gml_prefix_03', ST_AsGML(2, GeomFromEWKT('SRID=4326;POINT(1 2)'), 0, 16, 'foo'); +SELECT 'gml_prefix_04', ST_AsGML(3, GeomFromEWKT('SRID=4326;POINT(1 2)'), 0, 16, 'foo'); + +-- LineString +SELECT 'gml_shortline_01', ST_AsGML(3, GeomFromEWKT('LINESTRING(1 2, 3 4)'), 0, 6, ''); +SELECT 'gml_shortline_02', ST_AsGML(3, GeomFromEWKT('LINESTRING(1 2, 3 4)'), 0, 2, ''); +SELECT 'gml_shortline_03', ST_AsGML(3, GeomFromEWKT('MULTILINESTRING((1 2, 3 4), (5 6, 7 8))'), 0, 6, ''); +SELECT 'gml_shortline_04', ST_AsGML(3, GeomFromEWKT('MULTILINESTRING((1 2, 3 4), (5 6, 7 8))'), 0, 2, ''); + +-- +-- KML +-- + +-- SRID +SELECT 'kml_srid_01', ST_AsKML(GeomFromEWKT('SRID=10;POINT(0 1)')); +SELECT 'kml_srid_02', ST_AsKML(GeomFromEWKT('POINT(0 1)')); + +-- Empty Geometry +SELECT 'kml_empty_geom', ST_AsKML(GeomFromEWKT(NULL)); + +-- Precision +SELECT 'kml_precision_01', ST_AsKML(ST_GeomFromEWKT('SRID=4326;POINT(1.1111111 1.1111111)'), -2); +SELECT 'kml_precision_02', ST_AsKML(ST_GeomFromEWKT('SRID=4326;POINT(1.1111111 1.1111111)'), 19); + +-- Version +SELECT 'kml_version_01', ST_AsKML(2, GeomFromEWKT('SRID=4326;POINT(1 1)')); +SELECT 'kml_version_02', ST_AsKML(3, GeomFromEWKT('SRID=4326;POINT(1 1)')); +SELECT 'kml_version_03', ST_AsKML(-4, GeomFromEWKT('SRID=4326;POINT(1 1)')); + +-- Prefix +SELECT 'kml_prefix_01', ST_AsKML(2, GeomFromEWKT('SRID=4326;POINT(1 2)'), 0, ''); +SELECT 'kml_prefix_02', ST_AsKML(2, GeomFromEWKT('SRID=4326;POINT(1 2)'), 0, 'kml'); + +-- Projected +-- National Astronomical Observatory of Colombia - Bogota, Colombia (Placemark) +SELECT 'kml_projection_01', ST_AsKML(ST_GeomFromEWKT('SRID=102189;POINT(1000000 1000000)'), 3); + + +-- +-- SVG +-- + +-- Empty Geometry +SELECT 'svg_empty_geom', ST_AsSVG(GeomFromEWKT(NULL)); + +-- Option +SELECT 'svg_option_01', ST_AsSVG(GeomFromEWKT('LINESTRING(1 1, 4 4, 5 7)'), 0); +SELECT 'svg_option_02', ST_AsSVG(GeomFromEWKT('LINESTRING(1 1, 4 4, 5 7)'), 1); +SELECT 'svg_option_03', ST_AsSVG(GeomFromEWKT('LINESTRING(1 1, 4 4, 5 7)'), 0, 0); +SELECT 'svg_option_04', ST_AsSVG(GeomFromEWKT('LINESTRING(1 1, 4 4, 5 7)'), 1, 0); + +-- Precision +SELECT 'svg_precision_01', ST_AsSVG(GeomFromEWKT('POINT(1.1111111 1.1111111)'), 1, -2); +SELECT 'svg_precision_02', ST_AsSVG(GeomFromEWKT('POINT(1.1111111 1.1111111)'), 1, 19); + + +-- +-- GeoJson +-- + +-- Empty Geometry +SELECT 'geojson_empty_geom', ST_AsGeoJson(GeomFromEWKT(NULL)); + +-- Precision +SELECT 'geojson_precision_01', ST_AsGeoJson(GeomFromEWKT('SRID=4326;POINT(1.1111111 1.1111111)'), -2); +SELECT 'geojson_precision_02', ST_AsGeoJson(GeomFromEWKT('SRID=4326;POINT(1.1111111 1.1111111)'), 19); + +-- Version +SELECT 'geojson_version_01', ST_AsGeoJson(1, GeomFromEWKT('SRID=4326;POINT(1 1)')); +SELECT 'geojson_version_02', ST_AsGeoJson(21, GeomFromEWKT('SRID=4326;POINT(1 1)')); +SELECT 'geojson_version_03', ST_AsGeoJson(-4, GeomFromEWKT('SRID=4326;POINT(1 1)')); + +-- CRS +SELECT 'geojson_crs_01', ST_AsGeoJson(GeomFromEWKT('SRID=4326;POINT(1 1)'), 0, 2); +SELECT 'geojson_crs_02', ST_AsGeoJson(GeomFromEWKT('SRID=0;POINT(1 1)'), 0, 2); +SELECT 'geojson_crs_03', ST_AsGeoJson(GeomFromEWKT('SRID=4326;POINT(1 1)'), 0, 4); +SELECT 'geojson_crs_04', ST_AsGeoJson(GeomFromEWKT('SRID=0;POINT(1 1)'), 0, 4); +SELECT 'geojson_crs_05', ST_AsGeoJson(GeomFromEWKT('SRID=1;POINT(1 1)'), 0, 2); +SELECT 'geojson_crs_06', ST_AsGeoJson(GeomFromEWKT('SRID=1;POINT(1 1)'), 0, 4); + +-- Bbox +SELECT 'geojson_bbox_01', ST_AsGeoJson(GeomFromEWKT('LINESTRING(1 1, 2 2, 3 3, 4 4)'), 0); +SELECT 'geojson_bbox_02', ST_AsGeoJson(GeomFromEWKT('LINESTRING(1 1, 2 2, 3 3, 4 4)'), 0, 1); +SELECT 'geojson_bbox_03', ST_AsGeoJson(GeomFromEWKT('LINESTRING(1 1, 2 2, 3 3, 4 4)'), 0, 3); +SELECT 'geojson_bbox_04', ST_AsGeoJson(GeomFromEWKT('LINESTRING(1 1, 2 2, 3 3, 4 4)'), 0, 5); + +-- CRS and Bbox +SELECT 'geojson_options_01', ST_AsGeoJson(GeomFromEWKT('SRID=0;LINESTRING(1 1, 2 2, 3 3, 4 4)'), 0, 0); +SELECT 'geojson_options_02', ST_AsGeoJson(GeomFromEWKT('SRID=4326;LINESTRING(1 1, 2 2, 3 3, 4 4)'), 0); +SELECT 'geojson_options_03', ST_AsGeoJson(GeomFromEWKT('SRID=0;LINESTRING(1 1, 2 2, 3 3, 4 4)'), 0, 1); +SELECT 'geojson_options_04', ST_AsGeoJson(GeomFromEWKT('SRID=4326;LINESTRING(1 1, 2 2, 3 3, 4 4)'), 0, 1); +SELECT 'geojson_options_05', ST_AsGeoJson(GeomFromEWKT('SRID=0;LINESTRING(1 1, 2 2, 3 3, 4 4)'), 0, 2); +SELECT 'geojson_options_06', ST_AsGeoJson(GeomFromEWKT('SRID=4326;LINESTRING(1 1, 2 2, 3 3, 4 4)'), 0, 2); +SELECT 'geojson_options_07', ST_AsGeoJson(GeomFromEWKT('SRID=0;LINESTRING(1 1, 2 2, 3 3, 4 4)'), 0, 3); +SELECT 'geojson_options_08', ST_AsGeoJson(GeomFromEWKT('SRID=4326;LINESTRING(1 1, 2 2, 3 3, 4 4)'), 0, 3); +SELECT 'geojson_options_09', ST_AsGeoJson(GeomFromEWKT('SRID=0;LINESTRING(1 1, 2 2, 3 3, 4 4)'), 0, 4); +SELECT 'geojson_options_10', ST_AsGeoJson(GeomFromEWKT('SRID=4326;LINESTRING(1 1, 2 2, 3 3, 4 4)'), 0, 4); +SELECT 'geojson_options_11', ST_AsGeoJson(GeomFromEWKT('SRID=0;LINESTRING(1 1, 2 2, 3 3, 4 4)'), 0, 5); +SELECT 'geojson_options_12', ST_AsGeoJson(GeomFromEWKT('SRID=4326;LINESTRING(1 1, 2 2, 3 3, 4 4)'), 0, 5); +SELECT 'geojson_options_13', ST_AsGeoJson(GeomFromEWKT('SRID=0;LINESTRING(1 1, 2 2, 3 3, 4 4)'), 0, 6); +SELECT 'geojson_options_14', ST_AsGeoJson(GeomFromEWKT('SRID=4326;LINESTRING(1 1, 2 2, 3 3, 4 4)'), 0, 6); +SELECT 'geojson_options_15', ST_AsGeoJson(GeomFromEWKT('SRID=0;LINESTRING(1 1, 2 2, 3 3, 4 4)'), 0, 7); +SELECT 'geojson_options_16', ST_AsGeoJson(GeomFromEWKT('SRID=4326;LINESTRING(1 1, 2 2, 3 3, 4 4)'), 0, 7); + + +-- +-- Delete inserted spatial data +-- +DELETE FROM spatial_ref_sys; diff -Nru postgis-1.5.3/regress/out_geometry_expected postgis-2.0.1/regress/out_geometry_expected --- postgis-1.5.3/regress/out_geometry_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/out_geometry_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,74 @@ +gml_empty_geom| +gml_precision_01|1,1 +gml_precision_02|1.1111111,1.1111111 +gml_version_01|1,1 +gml_version_02|1 1 +ERROR: Only GML 2 and GML 3 are supported +ERROR: Only GML 2 and GML 3 are supported +gml_option_01|1,1 +gml_option_02|1 1 +gml_option_03|1 1 +gml_deegree_01|1 2 +gml_deegree_02|1,2 +gml_deegree_03|2 1 +gml_deegree_04|1 2 3 +gml_deegree_05|1,2,3 +gml_deegree_06|2 1 3 +gml_prefix_01|1,2 +gml_prefix_02|2 1 +gml_prefix_03|1,2 +gml_prefix_04|2 1 +gml_shortline_01|1 2 3 4 +gml_shortline_02|1 2 3 4 +gml_shortline_03|1 2 3 45 6 7 8 +gml_shortline_04|1 2 3 45 6 7 8 +ERROR: GetProj4StringSPI: Cannot find SRID (10) in spatial_ref_sys +ERROR: Input geometry has unknown (0) SRID +kml_empty_geom| +kml_precision_01|1,1 +kml_precision_02|1.1111111,1.1111111 +kml_version_01|1,1 +ERROR: Only KML 2 is supported +ERROR: Only KML 2 is supported +kml_prefix_01|1,2 +kml_prefix_02|1,2 +kml_projection_01|-74.078,4.596 +svg_empty_geom| +svg_option_01|M 1 -1 L 4 -4 5 -7 +svg_option_02|M 1 -1 l 3 -3 1 -3 +svg_option_03|M 1 -1 L 4 -4 5 -7 +svg_option_04|M 1 -1 l 3 -3 1 -3 +svg_precision_01|x="1" y="-1" +svg_precision_02|x="1.1111111" y="-1.1111111" +geojson_empty_geom| +geojson_precision_01|{"type":"Point","coordinates":[1,1]} +geojson_precision_02|{"type":"Point","coordinates":[1.1111111,1.1111111]} +geojson_version_01|{"type":"Point","coordinates":[1,1]} +ERROR: Only GeoJSON 1 is supported +ERROR: Only GeoJSON 1 is supported +geojson_crs_01|{"type":"Point","crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[1,1]} +geojson_crs_02|{"type":"Point","coordinates":[1,1]} +geojson_crs_03|{"type":"Point","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG::4326"}},"coordinates":[1,1]} +geojson_crs_04|{"type":"Point","coordinates":[1,1]} +ERROR: SRID 1 unknown in spatial_ref_sys table +ERROR: SRID 1 unknown in spatial_ref_sys table +geojson_bbox_01|{"type":"LineString","coordinates":[[1,1],[2,2],[3,3],[4,4]]} +geojson_bbox_02|{"type":"LineString","bbox":[1,1,4,4],"coordinates":[[1,1],[2,2],[3,3],[4,4]]} +geojson_bbox_03|{"type":"LineString","bbox":[1,1,4,4],"coordinates":[[1,1],[2,2],[3,3],[4,4]]} +geojson_bbox_04|{"type":"LineString","bbox":[1,1,4,4],"coordinates":[[1,1],[2,2],[3,3],[4,4]]} +geojson_options_01|{"type":"LineString","coordinates":[[1,1],[2,2],[3,3],[4,4]]} +geojson_options_02|{"type":"LineString","coordinates":[[1,1],[2,2],[3,3],[4,4]]} +geojson_options_03|{"type":"LineString","bbox":[1,1,4,4],"coordinates":[[1,1],[2,2],[3,3],[4,4]]} +geojson_options_04|{"type":"LineString","bbox":[1,1,4,4],"coordinates":[[1,1],[2,2],[3,3],[4,4]]} +geojson_options_05|{"type":"LineString","coordinates":[[1,1],[2,2],[3,3],[4,4]]} +geojson_options_06|{"type":"LineString","crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[[1,1],[2,2],[3,3],[4,4]]} +geojson_options_07|{"type":"LineString","bbox":[1,1,4,4],"coordinates":[[1,1],[2,2],[3,3],[4,4]]} +geojson_options_08|{"type":"LineString","crs":{"type":"name","properties":{"name":"EPSG:4326"}},"bbox":[1,1,4,4],"coordinates":[[1,1],[2,2],[3,3],[4,4]]} +geojson_options_09|{"type":"LineString","coordinates":[[1,1],[2,2],[3,3],[4,4]]} +geojson_options_10|{"type":"LineString","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG::4326"}},"coordinates":[[1,1],[2,2],[3,3],[4,4]]} +geojson_options_11|{"type":"LineString","bbox":[1,1,4,4],"coordinates":[[1,1],[2,2],[3,3],[4,4]]} +geojson_options_12|{"type":"LineString","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG::4326"}},"bbox":[1,1,4,4],"coordinates":[[1,1],[2,2],[3,3],[4,4]]} +geojson_options_13|{"type":"LineString","coordinates":[[1,1],[2,2],[3,3],[4,4]]} +geojson_options_14|{"type":"LineString","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG::4326"}},"coordinates":[[1,1],[2,2],[3,3],[4,4]]} +geojson_options_15|{"type":"LineString","bbox":[1,1,4,4],"coordinates":[[1,1],[2,2],[3,3],[4,4]]} +geojson_options_16|{"type":"LineString","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG::4326"}},"bbox":[1,1,4,4],"coordinates":[[1,1],[2,2],[3,3],[4,4]]} diff -Nru postgis-1.5.3/regress/polygonize.sql postgis-2.0.1/regress/polygonize.sql --- postgis-1.5.3/regress/polygonize.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/polygonize.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,13 @@ +SELECT 1, ST_AsText(ST_Polygonize( +'GEOMETRYCOLLECTION( + MULTILINESTRING( + (1656318.45 4833344.45,1656321.79 4833339.62,1656312.54 4833333.49), + (1656312.54 4833333.49,1656309.68 4833337.07) + ), + LINESTRING(1656309.68 4833337.07,1656318.45 4833344.45) +)'::geometry)); + +-- See ticket #1602 +SELECT 2, ST_AsEWKT(ST_Polygonize( +'MULTILINESTRING((0 0 0, 0 10 0, 10 10 0),(10 10 0, 10 0 5, 0 0 0))' +::geometry)); diff -Nru postgis-1.5.3/regress/polygonize_expected postgis-2.0.1/regress/polygonize_expected --- postgis-1.5.3/regress/polygonize_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/polygonize_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +1|GEOMETRYCOLLECTION(POLYGON((1656318.45 4833344.45,1656321.79 4833339.62,1656312.54 4833333.49,1656309.68 4833337.07,1656318.45 4833344.45))) +2|GEOMETRYCOLLECTION(POLYGON((0 0 0,0 10 0,10 10 0,10 0 5,0 0 0))) diff -Nru postgis-1.5.3/regress/polyhedralsurface.sql postgis-2.0.1/regress/polyhedralsurface.sql --- postgis-1.5.3/regress/polyhedralsurface.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/polyhedralsurface.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,30 @@ +-- ST_Dimension on 2D: not closed +SELECT 'dimension_01', ST_Dimension('POLYHEDRALSURFACE(((0 0,0 0,0 1,0 0)))'::geometry); +SELECT 'dimension_02', ST_Dimension('GEOMETRYCOLLECTION(POLYHEDRALSURFACE(((0 0,0 0,0 1,0 0))))'::geometry); + +-- ST_Dimension on 3D: closed +SELECT 'dimension_03', ST_Dimension('POLYHEDRALSURFACE(((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))'::geometry); +SELECT 'dimension_04', ST_Dimension('GEOMETRYCOLLECTION(POLYHEDRALSURFACE(((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0))))'::geometry); + +-- ST_Dimension on 4D: closed +SELECT 'dimension_05', ST_Dimension('POLYHEDRALSURFACE(((0 0 0 0,0 0 1 0,0 1 0 2,0 0 0 0)),((0 0 0 0,0 1 0 0,1 0 0 4,0 0 0 0)),((0 0 0 0,1 0 0 0,0 0 1 6,0 0 0 0)),((1 0 0 0,0 1 0 0,0 0 1 0,1 0 0 0)))'::geometry); +SELECT 'dimension_06', ST_Dimension('GEOMETRYCOLLECTION(POLYHEDRALSURFACE(((0 0 0 0,0 0 1 0,0 1 0 2,0 0 0 0)),((0 0 0 0,0 1 0 0,1 0 0 4,0 0 0 0)),((0 0 0 0,1 0 0 0,0 0 1 6,0 0 0 0)),((1 0 0 0,0 1 0 0,0 0 1 0,1 0 0 0))))'::geometry); + +-- ST_Dimension on 3D: invalid polyedron (a single edge is shared 3 times) +SELECT 'dimension_07', ST_Dimension('POLYHEDRALSURFACE(((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,0 1 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))'::geometry); + +-- ST_Dimension on 3D: invalid polyedron (redundant point inside each face) +SELECT 'dimension_08', ST_Dimension('POLYHEDRALSURFACE(((0 0 0,1 0 0,1 0 0,0 0 0)),((0 0 1,1 0 1,1 0 1,0 0 1)),((0 0 2,1 0 2,1 0 2,0 0 2)),((0 0 3,1 0 3,1 0 3,0 0 3)))'::geometry); + + +-- ST_NumPatches +SELECT 'numpatches_01', ST_NumPatches('POLYHEDRALSURFACE EMPTY'::geometry); +SELECT 'numpatches_02', ST_NumPatches('POLYHEDRALSURFACE(((0 0,0 0,0 1,0 0)))'::geometry); +SELECT 'numpatches_03', ST_NumPatches('POLYHEDRALSURFACE(((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))'::geometry); + +-- ST_PatchN +SELECT 'patchN_01', ST_AsEWKT(ST_patchN('POLYHEDRALSURFACE EMPTY'::geometry, 1)); +SELECT 'patchN_02', ST_AsEWKT(ST_patchN('POLYHEDRALSURFACE(((0 0,0 0,0 1,0 0)))'::geometry, 1)); +SELECT 'patchN_03', ST_AsEWKT(ST_patchN('POLYHEDRALSURFACE(((0 0,0 0,0 1,0 0)))'::geometry, 0)); +SELECT 'patchN_04', ST_AsEWKT(ST_patchN('POLYHEDRALSURFACE(((0 0,0 0,0 1,0 0)))'::geometry, 2)); +SELECT 'patchN_05', ST_AsEWKT(ST_patchN('POLYHEDRALSURFACE(((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))'::geometry, 2)); diff -Nru postgis-1.5.3/regress/polyhedralsurface_expected postgis-2.0.1/regress/polyhedralsurface_expected --- postgis-1.5.3/regress/polyhedralsurface_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/polyhedralsurface_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,16 @@ +dimension_01|2 +dimension_02|2 +dimension_03|3 +dimension_04|3 +dimension_05|3 +dimension_06|3 +dimension_07|2 +dimension_08|2 +numpatches_01|0 +numpatches_02|1 +numpatches_03|4 +patchN_01| +patchN_02|POLYGON((0 0,0 0,0 1,0 0)) +patchN_03| +patchN_04| +patchN_05|POLYGON((0 0 0,0 1 0,1 0 0,0 0 0)) diff -Nru postgis-1.5.3/regress/postgis_type_name.sql postgis-2.0.1/regress/postgis_type_name.sql --- postgis-1.5.3/regress/postgis_type_name.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/postgis_type_name.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,180 @@ +SELECT 'POINT(0)', postgis_type_name('POINT', 0); +SELECT 'POINT(1)', postgis_type_name('POINT', 1); +SELECT 'POINT(2)', postgis_type_name('POINT', 2); +SELECT 'POINT(3)', postgis_type_name('POINT', 3); +SELECT 'POINT(4)', postgis_type_name('POINT', 4); +SELECT 'POINT(5)', postgis_type_name('POINT', 5); +SELECT 'POINTM(2)', postgis_type_name('POINTM', 2); +SELECT 'POINTM(3)', postgis_type_name('POINTM', 3); +SELECT 'POINTZ(3)', postgis_type_name('POINTZ', 3); +SELECT 'POINTZM(3)', postgis_type_name('POINTZM', 3); +SELECT 'POINTZM(4)', postgis_type_name('POINTZM', 4); + +SELECT 'LINESTRING(0)', postgis_type_name('LINESTRING', 0); +SELECT 'LINESTRING(1)', postgis_type_name('LINESTRING', 1); +SELECT 'LINESTRING(2)', postgis_type_name('LINESTRING', 2); +SELECT 'LINESTRING(3)', postgis_type_name('LINESTRING', 3); +SELECT 'LINESTRING(4)', postgis_type_name('LINESTRING', 4); +SELECT 'LINESTRING(5)', postgis_type_name('LINESTRING', 5); +SELECT 'LINESTRINGM(2)', postgis_type_name('LINESTRINGM', 2); +SELECT 'LINESTRINGM(3)', postgis_type_name('LINESTRINGM', 3); +SELECT 'LINESTRINGZ(3)', postgis_type_name('LINESTRINGZ', 3); +SELECT 'LINESTRINGZM(3)', postgis_type_name('LINESTRINGZM', 3); +SELECT 'LINESTRINGZM(4)', postgis_type_name('LINESTRINGZM', 4); + +SELECT 'POLYGON(0)', postgis_type_name('POLYGON', 0); +SELECT 'POLYGON(1)', postgis_type_name('POLYGON', 1); +SELECT 'POLYGON(2)', postgis_type_name('POLYGON', 2); +SELECT 'POLYGON(3)', postgis_type_name('POLYGON', 3); +SELECT 'POLYGON(4)', postgis_type_name('POLYGON', 4); +SELECT 'POLYGON(5)', postgis_type_name('POLYGON', 5); +SELECT 'POLYGONM(2)', postgis_type_name('POLYGONM', 2); +SELECT 'POLYGONM(3)', postgis_type_name('POLYGONM', 3); +SELECT 'POLYGONZ(3)', postgis_type_name('POLYGONZ', 3); +SELECT 'POLYGONZM(3)', postgis_type_name('POLYGONZM', 3); +SELECT 'POLYGONZM(4)', postgis_type_name('POLYGONZM', 4); + +SELECT 'MULTIPOINT(0)', postgis_type_name('MULTIPOINT', 0); +SELECT 'MULTIPOINT(1)', postgis_type_name('MULTIPOINT', 1); +SELECT 'MULTIPOINT(2)', postgis_type_name('MULTIPOINT', 2); +SELECT 'MULTIPOINT(3)', postgis_type_name('MULTIPOINT', 3); +SELECT 'MULTIPOINT(4)', postgis_type_name('MULTIPOINT', 4); +SELECT 'MULTIPOINT(5)', postgis_type_name('MULTIPOINT', 5); +SELECT 'MULTIPOINTM(2)', postgis_type_name('MULTIPOINTM', 2); +SELECT 'MULTIPOINTM(3)', postgis_type_name('MULTIPOINTM', 3); +SELECT 'MULTIPOINTZ(3)', postgis_type_name('MULTIPOINTZ', 3); +SELECT 'MULTIPOINTZM(3)', postgis_type_name('MULTIPOINTZM', 3); +SELECT 'MULTIPOINTZM(4)', postgis_type_name('MULTIPOINTZM', 4); + +SELECT 'MULTILINESTRING(0)', postgis_type_name('MULTILINESTRING', 0); +SELECT 'MULTILINESTRING(1)', postgis_type_name('MULTILINESTRING', 1); +SELECT 'MULTILINESTRING(2)', postgis_type_name('MULTILINESTRING', 2); +SELECT 'MULTILINESTRING(3)', postgis_type_name('MULTILINESTRING', 3); +SELECT 'MULTILINESTRING(4)', postgis_type_name('MULTILINESTRING', 4); +SELECT 'MULTILINESTRING(5)', postgis_type_name('MULTILINESTRING', 5); +SELECT 'MULTILINESTRINGM(2)', postgis_type_name('MULTILINESTRINGM', 2); +SELECT 'MULTILINESTRINGM(3)', postgis_type_name('MULTILINESTRINGM', 3); +SELECT 'MULTILINESTRINGZ(3)', postgis_type_name('MULTILINESTRINGZ', 3); +SELECT 'MULTILINESTRINGZM(3)', postgis_type_name('MULTILINESTRINGZM', 3); +SELECT 'MULTILINESTRINGZM(4)', postgis_type_name('MULTILINESTRINGZM', 4); + +SELECT 'MULTIPOLYGON(0)', postgis_type_name('MULTIPOLYGON', 0); +SELECT 'MULTIPOLYGON(1)', postgis_type_name('MULTIPOLYGON', 1); +SELECT 'MULTIPOLYGON(2)', postgis_type_name('MULTIPOLYGON', 2); +SELECT 'MULTIPOLYGON(3)', postgis_type_name('MULTIPOLYGON', 3); +SELECT 'MULTIPOLYGON(4)', postgis_type_name('MULTIPOLYGON', 4); +SELECT 'MULTIPOLYGON(5)', postgis_type_name('MULTIPOLYGON', 5); +SELECT 'MULTIPOLYGONM(2)', postgis_type_name('MULTIPOLYGONM', 2); +SELECT 'MULTIPOLYGONM(3)', postgis_type_name('MULTIPOLYGONM', 3); +SELECT 'MULTIPOLYGONZ(3)', postgis_type_name('MULTIPOLYGONZ', 3); +SELECT 'MULTIPOLYGONZM(3)', postgis_type_name('MULTIPOLYGONZM', 3); +SELECT 'MULTIPOLYGONZM(4)', postgis_type_name('MULTIPOLYGONZM', 4); + +SELECT 'GEOMETRYCOLLECTION(0)', postgis_type_name('GEOMETRYCOLLECTION', 0); +SELECT 'GEOMETRYCOLLECTION(1)', postgis_type_name('GEOMETRYCOLLECTION', 1); +SELECT 'GEOMETRYCOLLECTION(2)', postgis_type_name('GEOMETRYCOLLECTION', 2); +SELECT 'GEOMETRYCOLLECTION(3)', postgis_type_name('GEOMETRYCOLLECTION', 3); +SELECT 'GEOMETRYCOLLECTION(4)', postgis_type_name('GEOMETRYCOLLECTION', 4); +SELECT 'GEOMETRYCOLLECTION(5)', postgis_type_name('GEOMETRYCOLLECTION', 5); +SELECT 'GEOMETRYCOLLECTIONM(2)', postgis_type_name('GEOMETRYCOLLECTIONM', 2); +SELECT 'GEOMETRYCOLLECTIONM(3)', postgis_type_name('GEOMETRYCOLLECTIONM', 3); +SELECT 'GEOMETRYCOLLECTIONZ(3)', postgis_type_name('GEOMETRYCOLLECTIONZ', 3); +SELECT 'GEOMETRYCOLLECTIONZM(3)', postgis_type_name('GEOMETRYCOLLECTIONZM', 3); +SELECT 'GEOMETRYCOLLECTIONZM(4)', postgis_type_name('GEOMETRYCOLLECTIONZM', 4); + +SELECT 'CIRCULARSTRING(0)', postgis_type_name('CIRCULARSTRING', 0); +SELECT 'CIRCULARSTRING(1)', postgis_type_name('CIRCULARSTRING', 1); +SELECT 'CIRCULARSTRING(2)', postgis_type_name('CIRCULARSTRING', 2); +SELECT 'CIRCULARSTRING(3)', postgis_type_name('CIRCULARSTRING', 3); +SELECT 'CIRCULARSTRING(4)', postgis_type_name('CIRCULARSTRING', 4); +SELECT 'CIRCULARSTRING(5)', postgis_type_name('CIRCULARSTRING', 5); +SELECT 'CIRCULARSTRINGM(2)', postgis_type_name('CIRCULARSTRINGM', 2); +SELECT 'CIRCULARSTRINGM(3)', postgis_type_name('CIRCULARSTRINGM', 3); +SELECT 'CIRCULARSTRINGZ(3)', postgis_type_name('CIRCULARSTRINGZ', 3); +SELECT 'CIRCULARSTRINGZM(3)', postgis_type_name('CIRCULARSTRINGZM', 3); +SELECT 'CIRCULARSTRINGZM(4)', postgis_type_name('CIRCULARSTRINGZM', 4); + +SELECT 'COMPOUNDCURVE(0)', postgis_type_name('COMPOUNDCURVE', 0); +SELECT 'COMPOUNDCURVE(1)', postgis_type_name('COMPOUNDCURVE', 1); +SELECT 'COMPOUNDCURVE(2)', postgis_type_name('COMPOUNDCURVE', 2); +SELECT 'COMPOUNDCURVE(3)', postgis_type_name('COMPOUNDCURVE', 3); +SELECT 'COMPOUNDCURVE(4)', postgis_type_name('COMPOUNDCURVE', 4); +SELECT 'COMPOUNDCURVE(5)', postgis_type_name('COMPOUNDCURVE', 5); +SELECT 'COMPOUNDCURVEM(2)', postgis_type_name('COMPOUNDCURVEM', 2); +SELECT 'COMPOUNDCURVEM(3)', postgis_type_name('COMPOUNDCURVEM', 3); +SELECT 'COMPOUNDCURVEZ(3)', postgis_type_name('COMPOUNDCURVEZ', 3); +SELECT 'COMPOUNDCURVEZM(3)', postgis_type_name('COMPOUNDCURVEZM', 3); +SELECT 'COMPOUNDCURVEZM(4)', postgis_type_name('COMPOUNDCURVEZM', 4); + +SELECT 'CURVEPOLYGON(0)', postgis_type_name('CURVEPOLYGON', 0); +SELECT 'CURVEPOLYGON(1)', postgis_type_name('CURVEPOLYGON', 1); +SELECT 'CURVEPOLYGON(2)', postgis_type_name('CURVEPOLYGON', 2); +SELECT 'CURVEPOLYGON(3)', postgis_type_name('CURVEPOLYGON', 3); +SELECT 'CURVEPOLYGON(4)', postgis_type_name('CURVEPOLYGON', 4); +SELECT 'CURVEPOLYGON(5)', postgis_type_name('CURVEPOLYGON', 5); +SELECT 'CURVEPOLYGONM(2)', postgis_type_name('CURVEPOLYGONM', 2); +SELECT 'CURVEPOLYGONM(3)', postgis_type_name('CURVEPOLYGONM', 3); +SELECT 'CURVEPOLYGONZ(3)', postgis_type_name('CURVEPOLYGONZ', 3); +SELECT 'CURVEPOLYGONZM(3)', postgis_type_name('CURVEPOLYGONZM', 3); +SELECT 'CURVEPOLYGONZM(4)', postgis_type_name('CURVEPOLYGONZM', 4); + +SELECT 'MULTICURVE(0)', postgis_type_name('MULTICURVE', 0); +SELECT 'MULTICURVE(1)', postgis_type_name('MULTICURVE', 1); +SELECT 'MULTICURVE(2)', postgis_type_name('MULTICURVE', 2); +SELECT 'MULTICURVE(3)', postgis_type_name('MULTICURVE', 3); +SELECT 'MULTICURVE(4)', postgis_type_name('MULTICURVE', 4); +SELECT 'MULTICURVE(5)', postgis_type_name('MULTICURVE', 5); +SELECT 'MULTICURVEM(2)', postgis_type_name('MULTICURVEM', 2); +SELECT 'MULTICURVEM(3)', postgis_type_name('MULTICURVEM', 3); +SELECT 'MULTICURVEZ(3)', postgis_type_name('MULTICURVEZ', 3); +SELECT 'MULTICURVEZM(3)', postgis_type_name('MULTICURVEZM', 3); +SELECT 'MULTICURVEZM(4)', postgis_type_name('MULTICURVEZM', 4); + +SELECT 'MULTISURFACE(0)', postgis_type_name('MULTISURFACE', 0); +SELECT 'MULTISURFACE(1)', postgis_type_name('MULTISURFACE', 1); +SELECT 'MULTISURFACE(2)', postgis_type_name('MULTISURFACE', 2); +SELECT 'MULTISURFACE(3)', postgis_type_name('MULTISURFACE', 3); +SELECT 'MULTISURFACE(4)', postgis_type_name('MULTISURFACE', 4); +SELECT 'MULTISURFACE(5)', postgis_type_name('MULTISURFACE', 5); +SELECT 'MULTISURFACEM(2)', postgis_type_name('MULTISURFACEM', 2); +SELECT 'MULTISURFACEM(3)', postgis_type_name('MULTISURFACEM', 3); +SELECT 'MULTISURFACEZ(3)', postgis_type_name('MULTISURFACEZ', 3); +SELECT 'MULTISURFACEZM(3)', postgis_type_name('MULTISURFACEZM', 3); +SELECT 'MULTISURFACEZM(4)', postgis_type_name('MULTISURFACEZM', 4); + +SELECT 'POLYHEDRALSURFACE(0)', postgis_type_name('POLYHEDRALSURFACE', 0); +SELECT 'POLYHEDRALSURFACE(1)', postgis_type_name('POLYHEDRALSURFACE', 1); +SELECT 'POLYHEDRALSURFACE(2)', postgis_type_name('POLYHEDRALSURFACE', 2); +SELECT 'POLYHEDRALSURFACE(3)', postgis_type_name('POLYHEDRALSURFACE', 3); +SELECT 'POLYHEDRALSURFACE(4)', postgis_type_name('POLYHEDRALSURFACE', 4); +SELECT 'POLYHEDRALSURFACE(5)', postgis_type_name('POLYHEDRALSURFACE', 5); +SELECT 'POLYHEDRALSURFACEM(2)', postgis_type_name('POLYHEDRALSURFACEM', 2); +SELECT 'POLYHEDRALSURFACEM(3)', postgis_type_name('POLYHEDRALSURFACEM', 3); +SELECT 'POLYHEDRALSURFACEZ(3)', postgis_type_name('POLYHEDRALSURFACEZ', 3); +SELECT 'POLYHEDRALSURFACEZM(3)', postgis_type_name('POLYHEDRALSURFACEZM', 3); +SELECT 'POLYHEDRALSURFACEZM(4)', postgis_type_name('POLYHEDRALSURFACEZM', 4); + +SELECT 'TRIANGLE(0)', postgis_type_name('TRIANGLE', 0); +SELECT 'TRIANGLE(1)', postgis_type_name('TRIANGLE', 1); +SELECT 'TRIANGLE(2)', postgis_type_name('TRIANGLE', 2); +SELECT 'TRIANGLE(3)', postgis_type_name('TRIANGLE', 3); +SELECT 'TRIANGLE(4)', postgis_type_name('TRIANGLE', 4); +SELECT 'TRIANGLE(5)', postgis_type_name('TRIANGLE', 5); +SELECT 'TRIANGLEM(2)', postgis_type_name('TRIANGLEM', 2); +SELECT 'TRIANGLEM(3)', postgis_type_name('TRIANGLEM', 3); +SELECT 'TRIANGLEZ(3)', postgis_type_name('TRIANGLEZ', 3); +SELECT 'TRIANGLEZM(3)', postgis_type_name('TRIANGLEZM', 3); +SELECT 'TRIANGLEZM(4)', postgis_type_name('TRIANGLEZM', 4); + +SELECT 'TIN(0)', postgis_type_name('TIN', 0); +SELECT 'TIN(1)', postgis_type_name('TIN', 1); +SELECT 'TIN(2)', postgis_type_name('TIN', 2); +SELECT 'TIN(3)', postgis_type_name('TIN', 3); +SELECT 'TIN(4)', postgis_type_name('TIN', 4); +SELECT 'TIN(5)', postgis_type_name('TIN', 5); +SELECT 'TINM(2)', postgis_type_name('TINM', 2); +SELECT 'TINM(3)', postgis_type_name('TINM', 3); +SELECT 'TINZ(3)', postgis_type_name('TINZ', 3); +SELECT 'TINZM(3)', postgis_type_name('TINZM', 3); +SELECT 'TINZM(4)', postgis_type_name('TINZM', 4); + diff -Nru postgis-1.5.3/regress/postgis_type_name_expected postgis-2.0.1/regress/postgis_type_name_expected --- postgis-1.5.3/regress/postgis_type_name_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/postgis_type_name_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,165 @@ +POINT(0)| +POINT(1)| +POINT(2)|Point +POINT(3)|PointZ +POINT(4)|PointZM +POINT(5)| +POINTM(2)| +POINTM(3)|PointM +POINTZ(3)|PointZ +POINTZM(3)| +POINTZM(4)|PointZM +LINESTRING(0)| +LINESTRING(1)| +LINESTRING(2)|LineString +LINESTRING(3)|LineStringZ +LINESTRING(4)|LineStringZM +LINESTRING(5)| +LINESTRINGM(2)| +LINESTRINGM(3)|LineStringM +LINESTRINGZ(3)|LineStringZ +LINESTRINGZM(3)| +LINESTRINGZM(4)|LineStringZM +POLYGON(0)| +POLYGON(1)| +POLYGON(2)|Polygon +POLYGON(3)|PolygonZ +POLYGON(4)|PolygonZM +POLYGON(5)| +POLYGONM(2)| +POLYGONM(3)|PolygonM +POLYGONZ(3)|PolygonZ +POLYGONZM(3)| +POLYGONZM(4)|PolygonZM +MULTIPOINT(0)| +MULTIPOINT(1)| +MULTIPOINT(2)|MultiPoint +MULTIPOINT(3)|MultiPointZ +MULTIPOINT(4)|MultiPointZM +MULTIPOINT(5)| +MULTIPOINTM(2)| +MULTIPOINTM(3)|MultiPointM +MULTIPOINTZ(3)|MultiPointZ +MULTIPOINTZM(3)| +MULTIPOINTZM(4)|MultiPointZM +MULTILINESTRING(0)| +MULTILINESTRING(1)| +MULTILINESTRING(2)|MultiLineString +MULTILINESTRING(3)|MultiLineStringZ +MULTILINESTRING(4)|MultiLineStringZM +MULTILINESTRING(5)| +MULTILINESTRINGM(2)| +MULTILINESTRINGM(3)|MultiLineStringM +MULTILINESTRINGZ(3)|MultiLineStringZ +MULTILINESTRINGZM(3)| +MULTILINESTRINGZM(4)|MultiLineStringZM +MULTIPOLYGON(0)| +MULTIPOLYGON(1)| +MULTIPOLYGON(2)|MultiPolygon +MULTIPOLYGON(3)|MultiPolygonZ +MULTIPOLYGON(4)|MultiPolygonZM +MULTIPOLYGON(5)| +MULTIPOLYGONM(2)| +MULTIPOLYGONM(3)|MultiPolygonM +MULTIPOLYGONZ(3)|MultiPolygonZ +MULTIPOLYGONZM(3)| +MULTIPOLYGONZM(4)|MultiPolygonZM +GEOMETRYCOLLECTION(0)| +GEOMETRYCOLLECTION(1)| +GEOMETRYCOLLECTION(2)|GeometryCollection +GEOMETRYCOLLECTION(3)|GeometryCollectionZ +GEOMETRYCOLLECTION(4)|GeometryCollectionZM +GEOMETRYCOLLECTION(5)| +GEOMETRYCOLLECTIONM(2)| +GEOMETRYCOLLECTIONM(3)|GeometryCollectionM +GEOMETRYCOLLECTIONZ(3)|GeometryCollectionZ +GEOMETRYCOLLECTIONZM(3)| +GEOMETRYCOLLECTIONZM(4)|GeometryCollectionZM +CIRCULARSTRING(0)| +CIRCULARSTRING(1)| +CIRCULARSTRING(2)|CircularString +CIRCULARSTRING(3)|CircularStringZ +CIRCULARSTRING(4)|CircularStringZM +CIRCULARSTRING(5)| +CIRCULARSTRINGM(2)| +CIRCULARSTRINGM(3)|CircularStringM +CIRCULARSTRINGZ(3)|CircularStringZ +CIRCULARSTRINGZM(3)| +CIRCULARSTRINGZM(4)|CircularStringZM +COMPOUNDCURVE(0)| +COMPOUNDCURVE(1)| +COMPOUNDCURVE(2)|CompoundCurve +COMPOUNDCURVE(3)|CompoundCurveZ +COMPOUNDCURVE(4)|CompoundCurveZM +COMPOUNDCURVE(5)| +COMPOUNDCURVEM(2)| +COMPOUNDCURVEM(3)|CompoundCurveM +COMPOUNDCURVEZ(3)|CompoundCurveZ +COMPOUNDCURVEZM(3)| +COMPOUNDCURVEZM(4)|CompoundCurveZM +CURVEPOLYGON(0)| +CURVEPOLYGON(1)| +CURVEPOLYGON(2)|CurvePolygon +CURVEPOLYGON(3)|CurvePolygonZ +CURVEPOLYGON(4)|CurvePolygonZM +CURVEPOLYGON(5)| +CURVEPOLYGONM(2)| +CURVEPOLYGONM(3)|CurvePolygonM +CURVEPOLYGONZ(3)|CurvePolygonZ +CURVEPOLYGONZM(3)| +CURVEPOLYGONZM(4)|CurvePolygonZM +MULTICURVE(0)| +MULTICURVE(1)| +MULTICURVE(2)|MultiCurve +MULTICURVE(3)|MultiCurveZ +MULTICURVE(4)|MultiCurveZM +MULTICURVE(5)| +MULTICURVEM(2)| +MULTICURVEM(3)|MultiCurveM +MULTICURVEZ(3)|MultiCurveZ +MULTICURVEZM(3)| +MULTICURVEZM(4)|MultiCurveZM +MULTISURFACE(0)| +MULTISURFACE(1)| +MULTISURFACE(2)|MultiSurface +MULTISURFACE(3)|MultiSurfaceZ +MULTISURFACE(4)|MultiSurfaceZM +MULTISURFACE(5)| +MULTISURFACEM(2)| +MULTISURFACEM(3)|MultiSurfaceM +MULTISURFACEZ(3)|MultiSurfaceZ +MULTISURFACEZM(3)| +MULTISURFACEZM(4)|MultiSurfaceZM +POLYHEDRALSURFACE(0)| +POLYHEDRALSURFACE(1)| +POLYHEDRALSURFACE(2)|PolyhedralSurface +POLYHEDRALSURFACE(3)|PolyhedralSurfaceZ +POLYHEDRALSURFACE(4)|PolyhedralSurfaceZM +POLYHEDRALSURFACE(5)| +POLYHEDRALSURFACEM(2)| +POLYHEDRALSURFACEM(3)|PolyhedralSurfaceM +POLYHEDRALSURFACEZ(3)|PolyhedralSurfaceZ +POLYHEDRALSURFACEZM(3)| +POLYHEDRALSURFACEZM(4)|PolyhedralSurfaceZM +TRIANGLE(0)| +TRIANGLE(1)| +TRIANGLE(2)|Triangle +TRIANGLE(3)|TriangleZ +TRIANGLE(4)|TriangleZM +TRIANGLE(5)| +TRIANGLEM(2)| +TRIANGLEM(3)|TriangleM +TRIANGLEZ(3)|TriangleZ +TRIANGLEZM(3)| +TRIANGLEZM(4)|TriangleZM +TIN(0)| +TIN(1)| +TIN(2)|Tin +TIN(3)|TinZ +TIN(4)|TinZM +TIN(5)| +TINM(2)| +TINM(3)|TinM +TINZ(3)|TinZ +TINZM(3)| +TINZM(4)|TinZM diff -Nru postgis-1.5.3/regress/regress.sql postgis-2.0.1/regress/regress.sql --- postgis-1.5.3/regress/regress.sql 2009-11-17 20:03:50.000000000 +0000 +++ postgis-2.0.1/regress/regress.sql 2012-06-12 08:29:01.000000000 +0000 @@ -85,43 +85,43 @@ select '59',ST_asewkt('POINT(1 2 3, 4 5 6)'::GEOMETRY); select '60',ST_asewkt('POINT(1 2 3 4 5 6 7)'::GEOMETRY); select '61',ST_asewkt('LINESTRING(1 1)'::GEOMETRY); ---select '62',replace(ST_asewkt('POINT( 1e700 0)'::GEOMETRY), 'Infinity', 'inf'); ---select '63',replace(ST_asewkt('POINT( -1e700 0)'::GEOMETRY), 'Infinity', 'inf'); -select '62',ST_asewkt('POINT( 1e700 0)'::GEOMETRY); -select '63',ST_asewkt('POINT( -1e700 0)'::GEOMETRY); +select '62',regexp_replace(ST_asewkt('POINT( 1e700 0)'::GEOMETRY), E'(Infinity|1\.#INF)', 'inf'); +select '63',regexp_replace(ST_asewkt('POINT( -1e700 0)'::GEOMETRY), E'(Infinity|1\.#INF)', 'inf'); +--select '62',ST_asewkt('POINT( 1e700 0)'::GEOMETRY); +--select '63',ST_asewkt('POINT( -1e700 0)'::GEOMETRY); select '64',ST_asewkt('MULTIPOINT(1 1, 2 2'::GEOMETRY); --- is_same() testing select '65','POINT(1 1)'::GEOMETRY ~= 'POINT(1 1)'::GEOMETRY as bool; -select '65a',st_orderingequals('POINT(1 1)'::GEOMETRY,'POINT(1 1)'::GEOMETRY) as bool; +select '65a',ST_OrderingEquals('POINT(1 1)'::GEOMETRY,'POINT(1 1)'::GEOMETRY) as bool; select '66','POINT(1 1 0)'::GEOMETRY ~= 'POINT(1 1)'::GEOMETRY as bool; -select '66a',st_orderingequals('POINT(1 1 0)'::GEOMETRY,'POINT(1 1)'::GEOMETRY) as bool; +select '66a',ST_OrderingEquals('POINT(1 1 0)'::GEOMETRY,'POINT(1 1)'::GEOMETRY) as bool; select '67','POINT(1 1 0)'::GEOMETRY ~= 'POINT(1 1 0)'::GEOMETRY as bool; -select '67a',st_orderingequals('POINT(1 1 0)'::GEOMETRY,'POINT(1 1 0)'::GEOMETRY) as bool; +select '67a',ST_OrderingEquals('POINT(1 1 0)'::GEOMETRY,'POINT(1 1 0)'::GEOMETRY) as bool; select '68','MULTIPOINT(1 1,2 2)'::GEOMETRY ~= 'MULTIPOINT(1 1,2 2)'::GEOMETRY as bool; -select '68a',st_orderingequals('MULTIPOINT(1 1,2 2)'::GEOMETRY,'MULTIPOINT(1 1,2 2)'::GEOMETRY) as bool; +select '68a',ST_OrderingEquals('MULTIPOINT(1 1,2 2)'::GEOMETRY,'MULTIPOINT(1 1,2 2)'::GEOMETRY) as bool; select '69','MULTIPOINT(2 2, 1 1)'::GEOMETRY ~= 'MULTIPOINT(1 1,2 2)'::GEOMETRY as bool; -select '69a',st_orderingequals('MULTIPOINT(2 2, 1 1)'::GEOMETRY,'MULTIPOINT(1 1,2 2)'::GEOMETRY) as bool; +select '69a',ST_OrderingEquals('MULTIPOINT(2 2, 1 1)'::GEOMETRY,'MULTIPOINT(1 1,2 2)'::GEOMETRY) as bool; select '70','GEOMETRYCOLLECTION(POINT( 1 2 3),POINT(4 5 6))'::GEOMETRY ~= 'GEOMETRYCOLLECTION(POINT( 4 5 6),POINT(1 2 3))'::GEOMETRY as bool; -select '70a',st_orderingequals('GEOMETRYCOLLECTION(POINT( 1 2 3),POINT(4 5 6))'::GEOMETRY,'GEOMETRYCOLLECTION(POINT( 4 5 6),POINT(1 2 3))'::GEOMETRY) as bool; +select '70a',ST_OrderingEquals('GEOMETRYCOLLECTION(POINT( 1 2 3),POINT(4 5 6))'::GEOMETRY,'GEOMETRYCOLLECTION(POINT( 4 5 6),POINT(1 2 3))'::GEOMETRY) as bool; select '71','MULTIPOINT(4 5 6, 1 2 3)'::GEOMETRY ~= 'GEOMETRYCOLLECTION(POINT( 4 5 6),POINT(1 2 3))'::GEOMETRY as bool; -select '71a',st_orderingequals('MULTIPOINT(4 5 6, 1 2 3)'::GEOMETRY,'GEOMETRYCOLLECTION(POINT( 4 5 6),POINT(1 2 3))'::GEOMETRY) as bool; +select '71a',ST_OrderingEquals('MULTIPOINT(4 5 6, 1 2 3)'::GEOMETRY,'GEOMETRYCOLLECTION(POINT( 4 5 6),POINT(1 2 3))'::GEOMETRY) as bool; select '72','MULTIPOINT(1 2 3, 4 5 6)'::GEOMETRY ~= 'GEOMETRYCOLLECTION(POINT( 4 5 6),POINT(1 2 3))'::GEOMETRY as bool; -select '72a',st_orderingequals('MULTIPOINT(1 2 3, 4 5 6)'::GEOMETRY,'GEOMETRYCOLLECTION(POINT( 4 5 6),POINT(1 2 3))'::GEOMETRY) as bool; +select '72a',ST_OrderingEquals('MULTIPOINT(1 2 3, 4 5 6)'::GEOMETRY,'GEOMETRYCOLLECTION(POINT( 4 5 6),POINT(1 2 3))'::GEOMETRY) as bool; select '73','MULTIPOINT(1 2 3, 4 5 6)'::GEOMETRY ~= 'GEOMETRYCOLLECTION(MULTIPOINT(1 2 3, 4 5 6))'::GEOMETRY as bool; -select '73a',st_orderingequals('MULTIPOINT(1 2 3, 4 5 6)'::GEOMETRY,'GEOMETRYCOLLECTION(MULTIPOINT(1 2 3, 4 5 6))'::GEOMETRY) as bool; +select '73a',ST_OrderingEquals('MULTIPOINT(1 2 3, 4 5 6)'::GEOMETRY,'GEOMETRYCOLLECTION(MULTIPOINT(1 2 3, 4 5 6))'::GEOMETRY) as bool; select '74','LINESTRING(1 1,2 2)'::GEOMETRY ~= 'POINT(1 1)'::GEOMETRY as bool; -select '74a',st_orderingequals('LINESTRING(1 1,2 2)'::GEOMETRY,'POINT(1 1)'::GEOMETRY) as bool; +select '74a',ST_OrderingEquals('LINESTRING(1 1,2 2)'::GEOMETRY,'POINT(1 1)'::GEOMETRY) as bool; select '75','LINESTRING(1 1, 2 2)'::GEOMETRY ~= 'LINESTRING(2 2, 1 1)'::GEOMETRY as bool; -select '75a',st_orderingequals('LINESTRING(1 1, 2 2)'::GEOMETRY,'LINESTRING(2 2, 1 1)'::GEOMETRY) as bool; +select '75a',ST_OrderingEquals('LINESTRING(1 1, 2 2)'::GEOMETRY,'LINESTRING(2 2, 1 1)'::GEOMETRY) as bool; select '76','LINESTRING(1 1, 2 2)'::GEOMETRY ~= 'LINESTRING(1 1, 2 2, 3 3)'::GEOMETRY as bool; -select '76a',st_orderingequals('LINESTRING(1 1, 2 2)'::GEOMETRY,'LINESTRING(1 1, 2 2, 3 3)'::GEOMETRY) as bool; +select '76a',ST_OrderingEquals('LINESTRING(1 1, 2 2)'::GEOMETRY,'LINESTRING(1 1, 2 2, 3 3)'::GEOMETRY) as bool; --- operator testing (testing is on the BOUNDING BOX (2d), not the actual geometries) @@ -174,28 +174,21 @@ --- function testing --- conversion function -select '106',ST_box3d('MULTIPOINT(0 0, 7 7)'::GEOMETRY) as bvol; -select '106_',box3d('MULTIPOINT(0 0, 7 7)'::GEOMETRY) as bvol; +select '106',box3d('MULTIPOINT(0 0, 7 7)'::GEOMETRY) as bvol; -- box3d only type is only used for indexing -- NEVER use one yourself -select '107',ST_asewkt(ST_geometry('BOX3D(0 0 0, 7 7 7 )'::BOX3D)); +select '107',ST_AsEWKT(geometry('BOX3D(0 0 0, 7 7 7 )'::BOX3D)); --- debug function testing -select '108',ST_npoints('MULTIPOINT(0 0, 7 7)'::GEOMETRY) as value; -select '108_',npoints('MULTIPOINT(0 0, 7 7)'::GEOMETRY) as value; -select '109',ST_npoints('GEOMETRYCOLLECTION(POINT(1 1), LINESTRING( 1 1 , 2 2, 3 3))'::GEOMETRY) as value; -select '109_',npoints('GEOMETRYCOLLECTION(POINT(1 1), LINESTRING( 1 1 , 2 2, 3 3))'::GEOMETRY) as value; +select '108',ST_NPoints('MULTIPOINT(0 0, 7 7)'::GEOMETRY) as value; +select '109',ST_NPoints('GEOMETRYCOLLECTION(POINT(1 1), LINESTRING( 1 1 , 2 2, 3 3))'::GEOMETRY) as value; -select '110', ST_nrings('MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) ,( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7, 5 7, 5 5),(1 1,2 1, 2 2, 1 2, 1 1) ) )'::GEOMETRY) as value; -select '110_', nrings('MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) ,( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7, 5 7, 5 5),(1 1,2 1, 2 2, 1 2, 1 1) ) )'::GEOMETRY) as value; +select '110', ST_NRings('MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) ,( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7, 5 7, 5 5),(1 1,2 1, 2 2, 1 2, 1 1) ) )'::GEOMETRY) as value; -select '111', ST_mem_size(dropBBOX('MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) ,( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7, 5 7, 5 5),(1 1,2 1, 2 2, 1 2, 1 1) ) )'::GEOMETRY)) as value; -select '111_', mem_size(dropBBOX('MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) ,( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7, 5 7, 5 5),(1 1,2 1, 2 2, 1 2, 1 1) ) )'::GEOMETRY)) as value; +select '111', ST_mem_size(PostGIS_DropBBOX('MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) ,( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7, 5 7, 5 5),(1 1,2 1, 2 2, 1 2, 1 1) ) )'::GEOMETRY)) as value; - -select '112',ST_numgeometries('GEOMETRYCOLLECTION(POINT(1 1), LINESTRING( 1 1 , 2 2, 3 3),MULTIPOINT(1 1, 2 2))'::GEOMETRY) as value; -select '112_',numgeometries('GEOMETRYCOLLECTION(POINT(1 1), LINESTRING( 1 1 , 2 2, 3 3),MULTIPOINT(1 1, 2 2))'::GEOMETRY) as value; +select '112',ST_NumGeometries('GEOMETRYCOLLECTION(POINT(1 1), LINESTRING( 1 1 , 2 2, 3 3),MULTIPOINT(1 1, 2 2))'::GEOMETRY) as value; ---selection @@ -210,8 +203,7 @@ ---test basic ops on this -select '121',ST_box3d(a) as box3d_a, ST_box3d(b) as box3d_b from TEST; -select '121_',box3d(a) as box3d_a, box3d(b) as box3d_b from TEST; +select '121',box3d(a) as box3d_a, box3d(b) as box3d_b from TEST; select '122',a <= 1000000; +DELETE FROM spatial_ref_sys WHERE srid >= 100000; diff -Nru postgis-1.5.3/regress/regress_proj_expected postgis-2.0.1/regress/regress_proj_expected --- postgis-1.5.3/regress/regress_proj_expected 2010-12-14 13:14:14.000000000 +0000 +++ postgis-2.0.1/regress/regress_proj_expected 2012-02-27 22:08:12.000000000 +0000 @@ -1,18 +1,9 @@ 0|EMPTY -1|SRID=1000001;POINT(574600 5316780) -2|SRID=1000001;POINT(574600 5316780 171) -3|SRID=1000001;POINT(574600 5316780 171 -500) -4|SRID=1000001;LINESTRING(574600 5316780,573140 5427940) -5|SRID=1000001;LINESTRING(574600 5316780 0 0,573140 5427940 0 0) +1|SRID=100001;POINT(574600 5316780) +2|SRID=100001;POINT(574600 5316780 171) +3|SRID=100001;POINT(574600 5316780 171 -500) +4|SRID=100001;LINESTRING(574600 5316780,573140 5427940) +5|SRID=100001;LINESTRING(574600 5316780 0 0,573140 5427940 0 0) 6|16.00000000|48.00000000 -ERROR: Input geometry has unknown (-1) SRID -8|SRID=1000002;POINT(0 0) -0|EMPTY -1|SRID=1000001;POINT(574600 5316780) -2|SRID=1000001;POINT(574600 5316780 171) -3|SRID=1000001;POINT(574600 5316780 171 -500) -4|SRID=1000001;LINESTRING(574600 5316780,573140 5427940) -5|SRID=1000001;LINESTRING(574600 5316780 0 0,573140 5427940 0 0) -6|16.00000000|48.00000000 -ERROR: Input geometry has unknown (-1) SRID -8|SRID=1000002;POINT(0 0) +ERROR: Input geometry has unknown (0) SRID +8|SRID=100002;POINT(0 0) diff -Nru postgis-1.5.3/regress/relate.sql postgis-2.0.1/regress/relate.sql --- postgis-1.5.3/regress/relate.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/relate.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,555 @@ +SELECT '1', ST_Relate('POLYGON((0 0,80 0,80 80,0 80,0 0))','POLYGON((100 200,100 140,180 140,180 200,100 200))'); +SELECT '2', ST_Relate('POLYGON((0 0,140 0,140 140,0 140,0 0))','POLYGON((140 0,0 0,0 140,140 140,140 0))'); +SELECT '3', ST_Relate('POLYGON((40 60,360 60,360 300,40 300,40 60))','POLYGON((120 100,280 100,280 240,120 240,120 100))'); +SELECT '4', ST_Relate('POLYGON((40 60,420 60,420 320,40 320,40 60),(200 140,160 220,260 200,200 140))','POLYGON((80 100,360 100,360 280,80 280,80 100))'); +SELECT '5', ST_Relate('POLYGON((0 280,0 0,260 0,260 280,0 280),(220 240,40 240,40 40,220 40,220 240))','POLYGON((20 260,240 260,240 20,20 20,20 260),(160 180,80 180,120 120,160 180))'); +SELECT '6', ST_Relate('POLYGON((60 80,200 80,200 220,60 220,60 80))','POLYGON((120 140,260 140,260 260,120 260,120 140))'); +SELECT '7', ST_Relate('POLYGON((60 220,220 220,140 140,60 220))','POLYGON((100 180,180 180,180 100,100 100,100 180))'); +SELECT '8', ST_Relate('POLYGON((40 40,180 40,180 180,40 180,40 40))','POLYGON((180 40,40 180,160 280,300 140,180 40))'); +SELECT '9', ST_Relate('POLYGON((100 60,140 100,100 140,60 100,100 60))','MULTIPOLYGON(((80 40,120 40,120 80,80 80,80 40)),((120 80,160 80,160 120,120 120,120 80)),((80 120,120 120,120 160,80 160,80 120)),((40 80,80 80,80 120,40 120,40 80)))'); +SELECT '10', ST_Relate('POLYGON((40 280,200 280,200 100,40 100,40 280),(100 220,120 220,120 200,100 180,100 220))','POLYGON((40 280,180 260,180 120,60 120,40 280))'); +SELECT '11', ST_Relate('POLYGON((0 200,0 0,200 0,200 200,0 200),(20 180,130 180,130 30,20 30,20 180))','POLYGON((60 90,130 90,130 30,60 30,60 90))'); +SELECT '12', ST_Relate('POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))','POLYGON((270 90,200 50,150 80,210 120,270 90))'); +SELECT '13', ST_Relate('POLYGON((100 60,140 100,100 140,60 100,100 60))','MULTIPOLYGON(((80 40,120 40,120 80,80 80,80 40)),((120 80,160 80,160 120,120 120,120 80)),((80 120,120 120,120 160,80 160,80 120)),((40 80,80 80,80 120,40 120,40 80)))'); +SELECT '14', ST_Relate('LINESTRING(100 120,100 240)','POLYGON((40 60,160 60,160 180,40 180,40 60))'); +SELECT '15', ST_Relate('LINESTRING(80 80,140 140,200 200)','POLYGON((40 40,140 40,140 140,40 140,40 40))'); +SELECT '16', ST_Relate('LINESTRING(70 50,70 150)','MULTIPOLYGON(((0 0,0 100,140 100,140 0,0 0)),((20 170,70 100,130 170,20 170)))'); +SELECT '17', ST_Relate('LINESTRING(60 160,150 70)','POLYGON((190 190,360 20,20 20,190 190),(110 110,250 100,140 30,110 110))'); +SELECT '18', ST_Relate('LINESTRING(60 160,150 70)','POLYGON((190 190,360 20,20 20,190 190),(111 110,250 100,140 30,111 110))'); +SELECT '19', ST_Relate('LINESTRING(80 110,170 110)','POLYGON((20 200,20 20,240 20,240 200,20 200),(130 110,60 40,60 180,130 110),(130 180,130 40,200 110,130 180))'); +SELECT '20', ST_Relate('LINESTRING(80 110,170 110)','POLYGON((20 200,20 20,240 20,240 200,20 200),(130 110,60 40,60 180,130 110),(130 180,131 40,200 110,130 180))'); +SELECT '21', ST_Relate('LINESTRING(160 70,320 230)','MULTIPOLYGON(((140 110,260 110,170 20,50 20,140 110)),((300 270,420 270,340 190,220 190,300 270)))'); +SELECT '22', ST_Relate('LINESTRING(100 140,100 40)','MULTIPOLYGON(((20 80,180 79,100 0,20 80)),((20 160,180 160,100 80,20 160)))'); +SELECT '23', ST_Relate('LINESTRING(100 140,100 40)','MULTIPOLYGON(((20 80,180 80,100 0,20 80)),((20 160,180 160,100 80,20 160)))'); +SELECT '24', ST_Relate('LINESTRING(110 60,20 150,200 150,110 60)','POLYGON((20 20,200 20,110 110,20 20))'); +SELECT '25', ST_Relate('LINESTRING(0 0,0 50,50 50,50 0,0 0)','MULTILINESTRING((0 0,0 50),(0 50,50 50),(50 50,50 0),(50 0,0 0))'); +SELECT '26', ST_Relate('LINESTRING(40 180,140 180)','MULTIPOLYGON(((20 320,180 320,180 180,20 180,20 320)),((20 180,20 80,180 80,180 180,20 180)))'); +SELECT '27', ST_Relate('LINESTRING(40 180,140 180)','MULTIPOLYGON(((20 320,180 320,180 180,20 180,20 320)),((60 180,60 80,180 80,180 180,60 180)))'); +SELECT '28', ST_Relate('LINESTRING(0 0,60 0,60 60,60 0,120 0)','MULTILINESTRING((0 0,60 0),(60 0,120 0),(60 0,60 60))'); +SELECT '29', ST_Relate('LINESTRING(60 0,20 80,100 80,80 120,40 140)','LINESTRING(140 300,220 160,260 200,240 260)'); +SELECT '30', ST_Relate('LINESTRING(60 0,20 80,100 80,80 120,40 140)','LINESTRING(60 40,140 40,140 160,0 160)'); +SELECT '31', ST_Relate('LINESTRING(60 0,20 80,100 80,80 120,40 140)','LINESTRING(140 280,240 280,240 180,140 180,140 280)'); +SELECT '32', ST_Relate('LINESTRING(140 0,0 0,40 60,0 120,60 200,220 160,220 40)','LINESTRING(80 140,180 100,160 40,100 40,60 100,80 140)'); +SELECT '33', ST_Relate('LINESTRING(20 20,80 80)','LINESTRING(20 20,80 80)'); +SELECT '34', ST_Relate('LINESTRING(40 40,160 160,200 60,60 140)','LINESTRING(40 40,160 160,200 60,60 140)'); +SELECT '35', ST_Relate('LINESTRING(40 40,200 40)','LINESTRING(200 40,140 40,40 40)'); +SELECT '36', ST_Relate('LINESTRING(0 0,110 0,60 0)','LINESTRING(0 0,110 0)'); +SELECT '37', ST_Relate('LINESTRING(0 0,0 50,50 50,50 0,0 0)','MULTILINESTRING((0 0,0 50),(0 50,50 50),(50 50,50 0),(50 0,0 0))'); +SELECT '38', ST_Relate('LINESTRING(0 0,80 0,80 60,80 0,170 0)','MULTILINESTRING((0 0,170 0),(80 0,80 60))'); +SELECT '39', ST_Relate('LINESTRING(80 100,180 200)','LINESTRING(80 180,180 120)'); +SELECT '40', ST_Relate('LINESTRING(40 40,100 100,160 160)','LINESTRING(160 60,100 100,60 140)'); +SELECT '41', ST_Relate('LINESTRING(40 40,100 100,180 100,180 180,100 180,100 100)','LINESTRING(140 60,60 140)'); +SELECT '42', ST_Relate('LINESTRING(40 40,180 180,100 180,100 100)','LINESTRING(140 60,60 140)'); +SELECT '43', ST_Relate('LINESTRING(20 110,200 110)','LINESTRING(200 200,20 20,200 20,110 110,20 200,110 200,110 110)'); +SELECT '44', ST_Relate('LINESTRING(80 90,50 50,0 0)','LINESTRING(0 0,100 100)'); +SELECT '45', ST_Relate('LINESTRING(40 140,240 140)','LINESTRING(40 140,100 140,80 80,120 60,100 140,160 140,160 100,200 100,160 140,240 140)'); +SELECT '46', ST_Relate('LINESTRING(20 20,100 20,20 20)','LINESTRING(60 20,200 20)'); +SELECT '47', ST_Relate('LINESTRING(40 60,180 60,180 140,100 140,100 60,220 60,220 180,80 180,80 60,280 60)','LINESTRING(140 60,180 60,220 60,260 60)'); +SELECT '48', ST_Relate('POINT(20 20)','POLYGON((60 120,60 40,160 40,160 120,60 120))'); +SELECT '49', ST_Relate('MULTIPOINT(0 20,40 20)','POLYGON((20 40,20 0,60 0,60 40,20 40))'); +SELECT '50', ST_Relate('MULTIPOINT(0 20,20 20)','POLYGON((20 40,20 0,60 0,60 40,20 40))'); +SELECT '51', ST_Relate('MULTIPOINT(20 20,40 20)','POLYGON((20 40,20 0,60 0,60 40,20 40))'); +SELECT '52', ST_Relate('MULTIPOINT(80 260,140 260,180 260)','POLYGON((40 320,140 320,140 200,40 200,40 320))'); +SELECT '53', ST_Relate('POINT(40 40)','MULTIPOLYGON(((0 40,0 0,40 0,40 40,0 40)),((40 80,40 40,80 40,80 80,40 80)))'); +SELECT '54', ST_Relate('POINT(60 120)','LINESTRING(40 40,120 120,200 120)'); +SELECT '55', ST_Relate('POINT(40 40)','LINESTRING(40 40,100 100,160 100)'); +SELECT '56', ST_Relate('POINT(60 60)','LINESTRING(40 40,100 100)'); +SELECT '57', ST_Relate('MULTIPOINT(40 40,100 40)','LINESTRING(40 40,80 80)'); +SELECT '58', ST_Relate('MULTIPOINT(40 40,60 60)','LINESTRING(40 40,80 80)'); +SELECT '59', ST_Relate('MULTIPOINT(60 60,100 100)','LINESTRING(40 40,80 80)'); +SELECT '60', ST_Relate('MULTIPOINT(60 60,100 100)','LINESTRING(40 40,80 80)'); +SELECT '61', ST_Relate('MULTIPOINT(60 60,100 100)','LINESTRING(40 40,60 60,80 80)'); +SELECT '62', ST_Relate('POINT(20 20)','POINT(20 20)'); +SELECT '63', ST_Relate('POINT(20 20)','POINT(20 30)'); +SELECT '64', ST_Relate('MULTIPOINT(40 40,80 60,40 100)','MULTIPOINT(40 40,80 60,120 100)'); +SELECT '65', ST_Relate('MULTIPOINT(40 40,80 60,120 100)','MULTIPOINT(40 40,80 60,120 100)'); +SELECT '66', ST_Relate('POLYGON((100 100,100 200,200 200,200 100,100 100))','POLYGON((100 100,1e+15 110,1e+15 100,100 100))'); +SELECT '67', ST_Relate('POLYGON((120 100,120 200,200 200,200 100,120 100))','POLYGON((100 100,1e+15 110,1e+15 100,100 100))'); +SELECT '68', ST_Relate('POLYGON((20 20,20 100,120 100,140 20,20 20))','POLYGON((20 20,20 100,120 100,140 20,20 20))'); +SELECT '69', ST_Relate('POLYGON((20 20,20 100,120 100,140 20,20 20))','POLYGON((20 20,140 20,120 100,20 100,20 20))'); +SELECT '70', ST_Relate('POLYGON((20 20,20 100,120 100,140 20,20 20))','POLYGON((120 100,140 20,20 20,20 100,120 100))'); +SELECT '71', ST_Relate('POLYGON((20 20,20 100,120 100,140 20,20 20))','POLYGON((20 100,60 100,120 100,140 20,80 20,20 20,20 100))'); +SELECT '72', ST_Relate('POLYGON((0 0,80 0,80 80,0 80,0 0))','POLYGON((100 200,100 140,180 140,180 200,100 200))'); +SELECT '73', ST_Relate('POLYGON((140 120,160 20,20 20,20 120,140 120))','POLYGON((140 120,140 200,240 200,240 120,140 120))'); +SELECT '74', ST_Relate('POLYGON((140 120,160 20,20 20,20 120,140 120))','POLYGON((80 180,140 260,260 200,200 60,80 180))'); +SELECT '75', ST_Relate('POLYGON((140 120,160 20,20 20,20 120,140 120))','POLYGON((240 80,140 120,180 240,280 200,240 80))'); +SELECT '76', ST_Relate('POLYGON((140 160,20 20,270 20,150 160,230 40,60 40,140 160))','POLYGON((140 40,180 80,120 100,140 40))'); +SELECT '77', ST_Relate('POLYGON((140 160,20 20,270 20,150 160,230 40,60 40,140 160))','POLYGON((120 100,180 80,130 40,120 100))'); +SELECT '78', ST_Relate('POLYGON((20 20,180 20,140 140,20 140,20 20))','POLYGON((180 100,80 200,180 280,260 200,180 100))'); +SELECT '79', ST_Relate('POLYGON((140 120,160 20,20 20,20 120,140 120))','POLYGON((140 140,20 120,0 220,120 240,140 140))'); +SELECT '80', ST_Relate('POLYGON((160 200,210 70,120 70,160 200))','POLYGON((160 200,260 40,70 40,160 200,20 20,310 20,160 200))'); +SELECT '81', ST_Relate('POLYGON((110 140,200 70,200 160,110 140))','POLYGON((110 140,110 50,60 50,60 90,160 190,20 110,20 20,200 20,110 140))'); +SELECT '82', ST_Relate('POLYGON((20 120,20 20,260 20,260 120,200 40,140 120,80 40,20 120))','POLYGON((20 120,20 240,260 240,260 120,200 200,140 120,80 200,20 120))'); +SELECT '83', ST_Relate('POLYGON((20 120,20 20,260 20,260 120,180 40,140 120,100 40,20 120))','POLYGON((20 120,300 120,140 240,20 120))'); +SELECT '84', ST_Relate('POLYGON((20 20,20 300,280 300,280 260,220 260,60 100,60 60,280 60,280 20,20 20))','POLYGON((100 140,160 80,280 180,200 240,220 160,160 200,180 120,100 140))'); +SELECT '85', ST_Relate('POLYGON((20 20,20 300,280 300,280 260,220 260,60 100,60 60,280 60,280 20,20 20))','POLYGON((260 200,180 80,120 160,200 160,180 220,260 200))'); +SELECT '86', ST_Relate('POLYGON((20 20,280 20,280 140,220 60,140 140,80 60,20 140,20 20))','POLYGON((0 140,300 140,140 240,0 140))'); +SELECT '87', ST_Relate('POLYGON((20 20,280 20,280 140,220 60,140 140,80 60,20 140,20 20))','POLYGON((20 240,20 140,320 140,180 240,20 240))'); +SELECT '88', ST_Relate('POLYGON((20 20,280 20,280 140,220 60,140 140,80 60,20 140,20 20))','POLYGON((20 240,20 140,80 180,140 140,220 180,280 140,280 240,20 240))'); +SELECT '89', ST_Relate('POLYGON((120 120,180 60,20 20,20 120,120 120))','POLYGON((120 120,220 20,280 20,240 160,120 120))'); +SELECT '90', ST_Relate('POLYGON((140 120,160 20,20 20,20 120,140 120))','POLYGON((140 120,160 20,260 120,220 200,140 120))'); +SELECT '91', ST_Relate('POLYGON((20 140,120 40,20 40,20 140))','POLYGON((190 140,190 20,140 20,20 140,190 140))'); +SELECT '92', ST_Relate('POLYGON((120 120,180 60,20 20,20 120,120 120))','POLYGON((300 20,220 20,120 120,260 160,300 20))'); +SELECT '93', ST_Relate('POLYGON((140 120,160 20,20 20,20 120,140 120))','POLYGON((140 120,240 160,280 60,160 20,140 120))'); +SELECT '94', ST_Relate('POLYGON((120 120,180 60,20 20,20 120,120 120))','POLYGON((280 60,180 60,120 120,260 180,280 60))'); +SELECT '95', ST_Relate('POLYGON((140 120,160 20,20 20,20 120,140 120))','POLYGON((120 200,120 120,40 120,40 200,120 200))'); +SELECT '96', ST_Relate('POLYGON((140 120,160 20,20 20,20 120,140 120))','POLYGON((160 220,140 120,60 120,40 220,160 220))'); +SELECT '97', ST_Relate('POLYGON((140 120,160 20,20 20,20 120,140 120))','POLYGON((140 120,20 120,20 220,140 220,140 120))'); +SELECT '98', ST_Relate('POLYGON((120 120,180 60,20 20,20 120,120 120))','POLYGON((320 20,220 20,80 160,240 140,320 20))'); +SELECT '99', ST_Relate('POLYGON((20 20,20 180,220 180,220 20,20 20))','POLYGON((60 40,60 140,180 140,180 40,60 40))'); +SELECT '100', ST_Relate('POLYGON((20 20,20 180,220 180,220 20,20 20))','POLYGON((20 20,80 140,160 60,20 20))'); +SELECT '101', ST_Relate('POLYGON((20 20,20 180,220 180,220 20,20 20))','POLYGON((160 60,20 20,100 140,160 60))'); +SELECT '102', ST_Relate('POLYGON((20 20,20 180,220 180,220 20,20 20))','POLYGON((20 100,140 160,160 40,20 100))'); +SELECT '103', ST_Relate('POLYGON((20 20,20 180,220 180,220 20,20 20))','POLYGON((160 40,20 100,160 160,160 40))'); +SELECT '104', ST_Relate('POLYGON((20 20,20 180,220 180,220 20,20 20))','POLYGON((20 180,180 120,80 40,20 180))'); +SELECT '105', ST_Relate('POLYGON((20 20,20 180,220 180,220 20,20 20))','POLYGON((180 120,100 40,20 180,180 120))'); +SELECT '106', ST_Relate('POLYGON((20 20,20 180,220 180,220 20,20 20))','POLYGON((20 20,140 40,140 120,20 160,80 80,20 20))'); +SELECT '107', ST_Relate('POLYGON((20 20,20 180,220 180,220 20,20 20))','POLYGON((20 20,140 40,140 140,20 180,80 100,20 20))'); +SELECT '108', ST_Relate('POLYGON((20 20,20 180,220 180,220 20,20 20))','POLYGON((40 180,60 100,180 100,200 180,120 120,40 180))'); +SELECT '109', ST_Relate('POLYGON((20 20,20 180,220 180,220 20,20 20))','POLYGON((20 180,60 80,180 80,220 180,120 120,20 180))'); +SELECT '110', ST_Relate('POLYGON((20 20,20 180,220 180,220 20,20 20))','POLYGON((40 60,20 180,100 100,140 180,160 120,220 100,140 40,40 60))'); +SELECT '111', ST_Relate('POLYGON((20 20,20 180,220 180,220 20,20 20))','POLYGON((60 100,180 100,220 180,120 140,20 180,60 100))'); +SELECT '112', ST_Relate('POLYGON((20 20,20 180,220 180,220 20,20 20))','POLYGON((20 20,20 140,120 120,120 40,20 20))'); +SELECT '113', ST_Relate('POLYGON((20 20,20 180,220 180,220 20,20 20))','POLYGON((20 20,20 180,140 140,140 60,20 20))'); +SELECT '114', ST_Relate('POLYGON((20 20,20 180,220 180,220 20,20 20))','POLYGON((20 20,120 40,120 120,20 140,20 20))'); +SELECT '115', ST_Relate('POLYGON((20 20,20 180,220 180,220 20,20 20))','POLYGON((120 40,20 20,20 140,120 120,120 40))'); +SELECT '116', ST_Relate('POLYGON((20 20,20 180,220 180,220 20,20 20))','POLYGON((20 20,140 60,140 140,20 180,20 20))'); +SELECT '117', ST_Relate('POLYGON((20 20,20 180,220 180,220 20,20 20))','POLYGON((140 60,20 20,20 180,140 140,140 60))'); +SELECT '118', ST_Relate('POLYGON((20 20,20 180,220 180,220 20,20 20))','POLYGON((20 20,60 120,140 120,180 20,20 20))'); +SELECT '119', ST_Relate('POLYGON((20 20,20 180,220 180,220 20,20 20))','POLYGON((20 40,120 40,120 120,20 140,20 40))'); +SELECT '120', ST_Relate('POLYGON((20 20,20 180,220 180,220 20,20 20))','POLYGON((20 20,20 180,60 120,100 180,140 120,220 180,200 120,140 60,20 20))'); +SELECT '121', ST_Relate('POLYGON((150 150,330 150,250 70,70 70,150 150))','POLYGON((150 150,270 150,140 20,20 20,150 150))'); +SELECT '122', ST_Relate('POLYGON((150 150,270 150,330 150,250 70,190 70,70 70,150 150))','POLYGON((150 150,270 150,190 70,140 20,20 20,70 70,150 150))'); +SELECT '123', ST_Relate('POLYGON((20 20,60 50,20 40,60 70,20 60,60 90,20 90,70 110,20 130,80 130,20 150,80 160,20 170,80 180,20 200,80 200,30 240,80 220,50 260,100 220,100 260,120 220,130 260,140 220,150 280,150 190,160 280,170 190,180 280,190 190,200 280,210 190,220 280,230 190,240 260,250 230,260 260,260 220,290 270,290 220,330 260,300 210,340 240,290 180,340 210,290 170,350 170,240 150,350 150,240 140,350 130,240 120,350 120,240 110,350 110,240 100,350 100,240 90,350 90,240 80,350 80,300 70,340 60,290 60,340 40,300 50,340 20,270 60,310 20,250 60,270 20,230 60,240 20,210 60,210 20,190 70,190 20,180 90,170 20,160 90,150 20,140 90,130 20,120 90,110 20,100 90,100 20,90 60,80 20,70 40,20 20))','POLYGON((190 140,140 130,200 160,130 150,210 170,130 170,210 180,120 190,220 200,120 200,250 210,120 210,250 220,120 220,250 230,120 240,230 240,120 250,240 260,120 260,240 270,120 270,270 290,120 290,230 300,150 310,250 310,180 320,250 320,200 360,260 330,240 360,280 320,290 370,290 320,320 360,310 320,360 360,310 310,380 340,310 290,390 330,310 280,410 310,310 270,420 280,310 260,430 250,300 250,440 240,300 240,450 230,280 220,440 220,280 210,440 210,300 200,430 190,300 190,440 180,330 180,430 150,320 180,420 130,300 180,410 120,280 180,400 110,280 170,390 90,280 160,400 70,270 160,450 30,260 160,420 30,250 160,390 30,240 160,370 30,230 160,360 30,230 150,330 50,240 130,330 30,230 130,310 30,220 130,280 30,230 100,270 40,220 110,250 30,210 130,240 30,210 100,220 40,200 90,200 20,190 100,180 30,20 20,180 40,20 30,180 50,20 50,180 60,30 60,180 70,20 70,170 80,80 80,170 90,20 80,180 100,40 100,200 110,60 110,200 120,120 120,190 140))'); +SELECT '124', ST_Relate('POLYGON((70 150,20 160,110 160,20 180,100 200,20 200,190 210,20 210,160 220,20 220,150 230,60 240,180 250,20 260,170 260,60 270,160 270,100 310,170 280,200 260,180 230,210 260,130 330,230 250,210 290,240 250,230 210,260 300,250 230,270 300,270 240,300 340,280 250,320 330,290 250,340 350,290 240,350 360,270 190,350 340,290 200,350 330,300 190,360 320,310 190,360 300,320 200,360 280,330 200,360 260,340 200,370 260,340 180,390 290,340 170,400 260,350 170,400 250,350 160,410 240,350 150,400 170,350 140,310 170,340 140,270 180,330 140,260 170,310 140,240 170,290 140,200 190,270 140,180 190,260 140,170 190,260 130,170 180,250 130,170 170,240 120,170 160,210 120,170 150,210 110,340 130,230 110,420 140,220 100,410 130,220 90,400 120,220 80,390 110,220 70,420 110,240 70,420 100,260 70,420 90,280 70,430 80,230 60,430 60,270 50,450 40,210 50,370 40,260 40,460 30,160 40,210 60,200 110,190 60,190 120,170 50,180 130,150 30,170 130,140 20,160 120,130 20,160 150,120 20,160 170,110 20,160 190,100 20,150 190,90 20,140 180,80 20,120 140,70 20,120 150,60 20,110 150,50 20,100 140,50 30,90 130,40 30,80 120,30 30,80 130,30 40,80 140,20 40,70 140,40 90,60 130,20 90,60 140,20 130,70 150))','POLYGON((190 140,140 130,200 160,130 150,210 170,130 170,210 180,120 190,220 200,120 200,250 210,120 210,250 220,120 220,250 230,120 240,230 240,120 250,240 260,120 260,240 270,120 270,270 290,120 290,230 300,150 310,250 310,180 320,250 320,200 360,260 330,240 360,280 320,290 370,290 320,320 360,310 320,360 360,310 310,380 340,310 290,390 330,310 280,410 310,310 270,420 280,310 260,430 250,300 250,440 240,300 240,450 230,280 220,440 220,280 210,440 210,300 200,430 190,300 190,440 180,330 180,430 150,320 180,420 130,300 180,410 120,280 180,400 110,280 170,390 90,280 160,400 70,270 160,450 30,260 160,420 30,250 160,390 30,240 160,370 30,230 160,360 30,230 150,330 50,240 130,330 30,230 130,310 30,220 130,280 30,230 100,270 40,220 110,250 30,210 130,240 30,210 100,220 40,200 90,200 20,190 100,180 30,20 20,180 40,20 30,180 50,20 50,180 60,30 60,180 70,20 70,170 80,80 80,170 90,20 80,180 100,40 100,200 110,60 110,200 120,120 120,190 140))'); +SELECT '125', ST_Relate('POLYGON((60 160,220 160,220 20,60 20,60 160))','POLYGON((60 160,20 200,260 200,220 160,140 80,60 160))'); +SELECT '126', ST_Relate('POLYGON((60 160,220 160,220 20,60 20,60 160))','POLYGON((60 160,20 200,260 200,140 80,60 160))'); +SELECT '127', ST_Relate('POLYGON((60 160,220 160,220 20,60 20,60 160))','POLYGON((20 200,140 80,260 200,20 200))'); +SELECT '128', ST_Relate('POLYGON((60 160,220 160,220 20,60 20,60 160))','POLYGON((20 200,60 160,140 80,220 160,260 200,20 200))'); +SELECT '129', ST_Relate('POLYGON((60 160,220 160,220 20,60 20,60 160))','POLYGON((20 200,60 160,140 80,260 200,20 200))'); +SELECT '130', ST_Relate('POLYGON((0 0,0 200,200 200,200 0,0 0))','POLYGON((100 100,1000000 110,10000000 100,100 100))'); +SELECT '131', ST_Relate('POLYGON((100 0,100 200,200 200,200 0,100 0))','POLYGON((100 100,1000000 110,10000000 100,100 100))'); +SELECT '132', ST_Relate('POLYGON((120 0,120 200,200 200,200 0,120 0))','POLYGON((100 100,1000000 110,10000000 100,100 100))'); +SELECT '133', ST_Relate('POLYGON((0 0,0 200,110 200,110 0,0 0))','POLYGON((100 100,1000000 110,10000000 100,100 100))'); +SELECT '134', ST_Relate('POLYGON((100 100,100 200,200 200,200 100,100 100))','POLYGON((100 100,2100 110,2100 100,100 100))'); +SELECT '135', ST_Relate('POLYGON((100 100,100 200,200 200,200 100,100 100))','POLYGON((100 100,2101 110,2101 100,100 100))'); +SELECT '136', ST_Relate('POLYGON((100 100,200 200,200 100,100 100))','POLYGON((100 100,2101 110,2101 100,100 100))'); +SELECT '137', ST_Relate('POLYGON((100 100,100 200,200 200,200 100,100 100))','POLYGON((100 100,1000000 110,1000000 100,100 100))'); +SELECT '138', ST_Relate('POLYGON((120 100,120 200,200 200,200 100,120 100))','POLYGON((100 100,500 110,500 100,100 100))'); +SELECT '139', ST_Relate('POLYGON((120 100,120 200,200 200,200 100,120 100))','POLYGON((100 100,501 110,501 100,100 100))'); +SELECT '140', ST_Relate('POLYGON((120 100,130 200,200 200,200 100,120 100))','POLYGON((100 100,501 110,501 100,100 100))'); +SELECT '141', ST_Relate('POLYGON((120 100,17 200,200 200,200 100,120 100))','POLYGON((100 100,501 110,501 100,100 100))'); +SELECT '142', ST_Relate('POLYGON((120 100,120 200,200 200,200 100,120 100))','POLYGON((100 100,1000000 110,1000000 100,100 100))'); +SELECT '143', ST_Relate('POLYGON((101 99,101 1000000,102 1000000,101 99))','POLYGON((100 100,1000000 110,1000000 100,100 100))'); +SELECT '144', ST_Relate('POLYGON((100 100,200 101,200 100,100 100))','POLYGON((100 100,2101 110,2101 100,100 100))'); +SELECT '145', ST_Relate('POLYGON((16 319,150 39,25 302,160 20,265 20,127 317,16 319))','POLYGON((10 307,22 307,153 34,22 34,10 307))'); +SELECT '146', ST_Relate('POLYGON((160 200,210 70,120 70,160 200))','POLYGON((160 200,310 20,20 20,160 200),(160 200,260 40,70 40,160 200))'); +SELECT '147', ST_Relate('POLYGON((170 120,240 100,260 50,190 70,170 120))','POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))'); +SELECT '148', ST_Relate('POLYGON((270 90,200 50,150 80,210 120,270 90))','POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))'); +SELECT '149', ST_Relate('POLYGON((170 120,260 100,240 60,150 80,170 120))','POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))'); +SELECT '150', ST_Relate('POLYGON((220 120,270 80,200 60,160 100,220 120))','POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))'); +SELECT '151', ST_Relate('POLYGON((260 50,180 70,180 110,260 90,260 50))','POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))'); +SELECT '152', ST_Relate('POLYGON((230 110,290 80,190 60,140 90,230 110))','POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))'); +SELECT '153', ST_Relate('POLYGON((170 120,330 120,260 50,100 50,170 120))','POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))'); +SELECT '154', ST_Relate('POLYGON((170 120,330 120,280 70,120 70,170 120))','POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))'); +SELECT '155', ST_Relate('POLYGON((170 120,300 120,250 70,120 70,170 120))','POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))'); +SELECT '156', ST_Relate('POLYGON((190 100,310 100,260 50,140 50,190 100))','POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))'); +SELECT '157', ST_Relate('POLYGON((280 130,360 130,270 40,190 40,280 130))','POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,250 120,180 50,100 50,170 120))'); +SELECT '158', ST_Relate('POLYGON((220 80,180 40,80 40,170 130,270 130,230 90,300 90,250 30,280 30,390 140,150 140,40 30,230 30,280 80,220 80))','POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,250 120,180 50,100 50,170 120))'); +SELECT '159', ST_Relate('POLYGON((260 130,360 130,280 40,170 40,260 130))','POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,250 120,180 50,100 50,170 120))'); +SELECT '160', ST_Relate('POLYGON((240 110,340 110,290 60,190 60,240 110))','POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,250 120,180 50,100 50,170 120))'); +SELECT '161', ST_Relate('POLYGON((250 120,350 120,280 50,180 50,250 120))','POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,250 120,180 50,100 50,170 120))'); +SELECT '162', ST_Relate('POLYGON((230 210,230 20,20 20,20 210,230 210),(120 180,50 50,200 50,120 180))','POLYGON((230 210,230 20,20 20,20 210,230 210),(120 180,50 50,200 50,120 180))'); +SELECT '163', ST_Relate('POLYGON((230 210,230 20,20 20,20 210,230 210),(140 40,40 40,40 170,140 40),(110 190,210 190,210 50,110 190))','POLYGON((230 210,230 20,20 20,20 210,230 210),(140 40,40 40,40 170,140 40),(110 190,210 190,210 50,110 190))'); +SELECT '164', ST_Relate('POLYGON((280 190,330 150,200 110,150 150,280 190))','MULTIPOLYGON(((140 110,260 110,170 20,50 20,140 110)),((300 270,420 270,340 190,220 190,300 270)))'); +SELECT '165', ST_Relate('POLYGON((80 190,220 190,140 110,0 110,80 190))','MULTIPOLYGON(((140 110,260 110,170 20,50 20,140 110)),((300 270,420 270,340 190,220 190,300 270)))'); +SELECT '166', ST_Relate('POLYGON((330 150,200 110,150 150,280 190,330 150))','MULTIPOLYGON(((140 110,260 110,170 20,50 20,140 110)),((300 270,420 270,340 190,220 190,300 270)))'); +SELECT '167', ST_Relate('POLYGON((290 190,340 150,220 120,170 170,290 190))','MULTIPOLYGON(((140 110,260 110,170 20,50 20,140 110)),((300 270,420 270,340 190,220 190,300 270)))'); +SELECT '168', ST_Relate('POLYGON((220 190,340 190,260 110,140 110,220 190))','MULTIPOLYGON(((140 110,260 110,170 20,50 20,140 110)),((300 270,420 270,340 190,220 190,300 270)))'); +SELECT '169', ST_Relate('POLYGON((140 190,220 190,100 70,20 70,140 190))','MULTIPOLYGON(((140 110,260 110,170 20,50 20,140 110)),((300 270,420 270,340 190,220 190,300 270)))'); +SELECT '170', ST_Relate('POLYGON((140 220,60 140,140 60,220 140,140 220))','MULTIPOLYGON(((100 20,180 20,180 100,100 100,100 20)),((20 100,100 100,100 180,20 180,20 100)),((100 180,180 180,180 260,100 260,100 180)),((180 100,260 100,260 180,180 180,180 100)))'); +SELECT '171', ST_Relate('MULTIPOLYGON(((110 110,70 200,150 200,110 110)),((110 110,150 20,70 20,110 110)))','MULTIPOLYGON(((110 110,160 160,210 110,160 60,110 110)),((110 110,60 60,10 110,60 160,110 110)))'); +SELECT '172', ST_Relate('MULTIPOLYGON(((110 110,70 200,150 200,110 110),(110 110,100 180,120 180,110 110)),((110 110,150 20,70 20,110 110),(110 110,120 40,100 40,110 110)))','MULTIPOLYGON(((110 110,160 160,210 110,160 60,110 110),(110 110,160 130,160 90,110 110)),((110 110,60 60,10 110,60 160,110 110),(110 110,60 90,60 130,110 110)))'); +SELECT '173', ST_Relate('MULTIPOLYGON(((110 110,70 200,200 200,110 110),(110 110,100 180,120 180,110 110)),((110 110,200 20,70 20,110 110),(110 110,120 40,100 40,110 110)))','MULTIPOLYGON(((110 110,160 160,210 110,160 60,110 110),(110 110,160 130,160 90,110 110)),((110 110,60 60,10 110,60 160,110 110),(110 110,60 90,60 130,110 110)))'); +SELECT '174', ST_Relate('MULTIPOLYGON(((110 110,20 200,200 200,110 110),(110 110,100 180,120 180,110 110)),((110 110,200 20,20 20,110 110),(110 110,120 40,100 40,110 110)))','MULTIPOLYGON(((110 110,160 160,210 110,160 60,110 110),(110 110,160 130,160 90,110 110)),((110 110,60 60,10 110,60 160,110 110),(110 110,60 90,60 130,110 110)))'); +SELECT '175', ST_Relate('MULTIPOLYGON(((110 110,70 200,200 200,110 110),(110 110,100 180,120 180,110 110)),((110 110,200 20,70 20,110 110),(110 110,120 40,100 40,110 110)))','MULTIPOLYGON(((110 110,160 160,210 110,160 60,110 110),(110 110,160 130,160 90,110 110)),((110 110,60 60,10 110,60 160,110 110),(110 110,60 90,60 130,110 110)))'); +SELECT '176', ST_Relate('MULTIPOLYGON(((110 110,70 200,200 200,110 110),(110 110,100 180,120 180,110 110)),((110 110,200 20,70 20,110 110),(110 110,120 40,100 40,110 110)))','MULTIPOLYGON(((110 110,70 200,210 110,70 20,110 110),(110 110,110 140,150 110,110 80,110 110)),((110 110,60 60,10 110,60 160,110 110),(110 110,60 90,60 130,110 110)))'); +SELECT '177', ST_Relate('POLYGON((100 60,140 100,100 140,60 100,100 60))','MULTIPOLYGON(((80 40,120 40,120 80,80 80,80 40)),((120 80,160 80,160 120,120 120,120 80)),((80 120,120 120,120 160,80 160,80 120)),((40 80,80 80,80 120,40 120,40 80)))'); +SELECT '178', ST_Relate('LINESTRING(150 150,40 230)','POLYGON((150 150,410 150,280 20,20 20,150 150))'); +SELECT '179', ST_Relate('LINESTRING(40 40,50 130,130 130)','POLYGON((150 150,410 150,280 20,20 20,150 150))'); +SELECT '180', ST_Relate('LINESTRING(40 230,150 150)','POLYGON((150 150,410 150,280 20,20 20,150 150))'); +SELECT '181', ST_Relate('LINESTRING(210 150,330 150)','POLYGON((150 150,410 150,280 20,20 20,150 150))'); +SELECT '182', ST_Relate('LINESTRING(200 150,310 150,360 220)','POLYGON((150 150,410 150,280 20,20 20,150 150))'); +SELECT '183', ST_Relate('LINESTRING(180 150,250 150,230 250,370 250,410 150)','POLYGON((150 150,410 150,280 20,20 20,150 150))'); +SELECT '184', ST_Relate('LINESTRING(210 210,220 150,320 150,370 210)','POLYGON((150 150,410 150,280 20,20 20,150 150))'); +SELECT '185', ST_Relate('LINESTRING(20 60,150 60)','POLYGON((150 150,410 150,280 20,20 20,150 150))'); +SELECT '186', ST_Relate('LINESTRING(60 90,310 180)','POLYGON((150 150,410 150,280 20,20 20,150 150))'); +SELECT '187', ST_Relate('LINESTRING(90 210,210 90)','POLYGON((150 150,410 150,280 20,20 20,150 150))'); +SELECT '188', ST_Relate('LINESTRING(290 10,130 170)','POLYGON((150 150,410 150,280 20,20 20,150 150))'); +SELECT '189', ST_Relate('LINESTRING(30 100,100 100,180 100)','POLYGON((150 150,410 150,280 20,20 20,150 150))'); +SELECT '190', ST_Relate('LINESTRING(20 100,100 100,360 100,410 100)','POLYGON((150 150,410 150,280 20,20 20,150 150))'); +SELECT '191', ST_Relate('LINESTRING(90 210,150 150,210 90)','POLYGON((150 150,410 150,280 20,20 20,150 150))'); +SELECT '192', ST_Relate('LINESTRING(180 90,280 120)','POLYGON((150 150,410 150,280 20,20 20,150 150))'); +SELECT '193', ST_Relate('LINESTRING(70 70,80 20)','POLYGON((150 150,410 150,280 20,20 20,150 150))'); +SELECT '194', ST_Relate('LINESTRING(130 20,150 60)','POLYGON((150 150,410 150,280 20,20 20,150 150))'); +SELECT '195', ST_Relate('LINESTRING(70 70,80 20,140 20,150 60)','POLYGON((150 150,410 150,280 20,20 20,150 150))'); +SELECT '196', ST_Relate('LINESTRING(170 50,170 20,240 20,260 60)','POLYGON((150 150,410 150,280 20,20 20,150 150))'); +SELECT '197', ST_Relate('LINESTRING(50 100,140 190,280 190)','POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))'); +SELECT '198', ST_Relate('LINESTRING(140 60,180 100,290 100)','POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))'); +SELECT '199', ST_Relate('LINESTRING(170 120,210 80,270 80)','POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))'); +SELECT '200', ST_Relate('LINESTRING(170 120,260 50)','POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))'); +SELECT '201', ST_Relate('LINESTRING(190 90,190 270)','POLYGON((190 190,360 20,20 20,190 190),(190 190,280 50,100 50,190 190))'); +SELECT '202', ST_Relate('LINESTRING(60 160,150 70)','POLYGON((190 190,360 20,20 20,190 190),(110 110,250 100,140 30,110 110))'); +SELECT '203', ST_Relate('LINESTRING(60 160,150 70)','POLYGON((190 190,20 20,360 20,190 190),(250 100,110 110,140 30,250 100))'); +SELECT '204', ST_Relate('LINESTRING(60 160,150 70)','POLYGON((190 190,20 20,360 20,190 190),(250 100,110 110,140 30,250 100))'); +SELECT '205', ST_Relate('LINESTRING(190 90,190 190,190 270)','POLYGON((190 190,360 20,20 20,190 190),(190 190,280 50,100 50,190 190))'); +SELECT '206', ST_Relate('LINESTRING(60 160,110 110,150 70)','POLYGON((190 190,360 20,20 20,190 190),(110 110,250 100,140 30,110 110))'); +SELECT '207', ST_Relate('LINESTRING(60 160,110 110,150 70)','POLYGON((190 190,20 20,360 20,190 190),(250 100,110 110,140 30,250 100))'); +SELECT '208', ST_Relate('LINESTRING(60 160,110 110,150 70)','POLYGON((190 190,110 110,20 20,360 20,190 190),(250 100,110 110,140 30,250 100))'); +SELECT '209', ST_Relate('LINESTRING(130 110,180 110,190 60)','POLYGON((20 200,240 200,240 20,20 20,20 200),(130 110,60 180,60 40,130 110),(130 110,200 40,200 180,130 110))'); +SELECT '210', ST_Relate('LINESTRING(80 110,180 110)','POLYGON((20 200,240 200,240 20,20 20,20 200),(130 110,60 180,60 40,130 110),(130 110,200 40,200 180,130 110))'); +SELECT '211', ST_Relate('LINESTRING(80 110,180 110)','POLYGON((20 200,20 20,240 20,240 200,20 200),(60 180,130 110,60 40,60 180),(130 110,200 40,200 180,130 110))'); +SELECT '212', ST_Relate('LINESTRING(80 110,170 110)','POLYGON((20 200,20 20,240 20,240 200,20 200),(130 110,60 40,60 180,130 110),(130 180,130 40,200 110,130 180))'); +SELECT '213', ST_Relate('LINESTRING(80 110,130 110,170 110)','POLYGON((20 200,20 20,240 20,240 200,20 200),(130 110,60 40,60 180,130 110),(130 180,130 40,200 110,130 180))'); +SELECT '214', ST_Relate('LINESTRING(80 110,130 110,180 110)','POLYGON((20 200,240 200,240 20,20 20,20 200),(130 110,60 180,60 40,130 110),(130 110,200 40,200 180,130 110))'); +SELECT '215', ST_Relate('LINESTRING(80 110,130 110,180 110)','POLYGON((20 200,20 20,240 20,240 200,20 200),(60 180,130 110,60 40,60 180),(130 110,200 40,200 180,130 110))'); +SELECT '216', ST_Relate('LINESTRING(80 110,130 110,170 110)','POLYGON((20 200,20 20,240 20,240 200,20 200),(130 110,60 40,60 180,130 110),(130 180,130 40,200 110,130 180))'); +SELECT '217', ST_Relate('LINESTRING(160 70,320 230)','MULTIPOLYGON(((140 110,260 110,170 20,50 20,140 110)),((300 270,420 270,340 190,220 190,300 270)))'); +SELECT '218', ST_Relate('LINESTRING(160 70,200 110,280 190,320 230)','MULTIPOLYGON(((140 110,260 110,170 20,50 20,140 110)),((300 270,420 270,340 190,220 190,300 270)))'); +SELECT '219', ST_Relate('LINESTRING(70 50,70 150)','MULTIPOLYGON(((0 0,0 100,140 100,140 0,0 0)),((20 170,70 100,130 170,20 170)))'); +SELECT '220', ST_Relate('LINESTRING(110 110,20 200,200 200,110 110)','POLYGON((20 20,200 20,110 110,20 20))'); +SELECT '221', ST_Relate('LINESTRING(150 70,160 110,200 60,150 70)','POLYGON((20 20,200 20,110 110,20 20))'); +SELECT '222', ST_Relate('LINESTRING(80 60,120 40,120 70,80 60)','POLYGON((110 110,200 20,20 20,110 110),(110 90,50 30,170 30,110 90))'); +SELECT '223', ST_Relate('LINESTRING(20 20,200 20,110 110,20 20)','POLYGON((20 20,200 20,110 110,20 20))'); +SELECT '224', ST_Relate('LINESTRING(110 90,170 30,50 30,110 90)','POLYGON((110 110,200 20,20 20,110 110),(110 90,50 30,170 30,110 90))'); +SELECT '225', ST_Relate('LINESTRING(110 110,170 50,170 110,110 110)','POLYGON((110 110,200 20,20 20,110 110),(110 90,50 30,170 30,110 90))'); +SELECT '226', ST_Relate('LINESTRING(110 90,70 50,130 50,110 90)','POLYGON((110 110,200 20,20 20,110 110),(110 90,50 30,170 30,110 90))'); +SELECT '227', ST_Relate('LINESTRING(110 60,20 150,200 150,110 60)','POLYGON((20 20,200 20,110 110,20 20))'); +SELECT '228', ST_Relate('LINESTRING(110 130,110 70,200 100,110 130)','POLYGON((110 110,200 20,20 20,110 110),(110 90,50 30,170 30,110 90))'); +SELECT '229', ST_Relate('LINESTRING(110 90,160 40,60 40,110 90)','POLYGON((20 20,200 20,110 110,20 20))'); +SELECT '230', ST_Relate('LINESTRING(110 100,40 30,180 30,110 100)','POLYGON((110 110,200 20,20 20,110 110),(110 90,60 40,160 40,110 90))'); +SELECT '231', ST_Relate('LINESTRING(110 110,180 30,40 30,110 110)','POLYGON((110 110,200 20,20 20,110 110),(110 90,60 40,160 40,110 90))'); +SELECT '232', ST_Relate('LINESTRING(110 90,180 30,40 30,110 90)','POLYGON((110 110,200 20,20 20,110 110),(110 90,60 40,160 40,110 90))'); +SELECT '233', ST_Relate('LINESTRING(110 90,50 30,180 30,110 90)','POLYGON((110 110,200 20,20 20,110 110),(110 90,60 40,160 40,110 90))'); +SELECT '234', ST_Relate('LINESTRING(110 110,200 200,200 110,110 200)','POLYGON((110 110,200 20,20 20,110 110))'); +SELECT '235', ST_Relate('LINESTRING(110 110,200 200,110 110,20 200,20 110,200 110)','POLYGON((110 110,200 20,20 20,110 110))'); +SELECT '236', ST_Relate('LINESTRING(110 110,20 110,200 110,50 110,110 170)','POLYGON((110 110,200 20,20 20,110 110))'); +SELECT '237', ST_Relate('LINESTRING(110 110,20 200,110 200,110 110,200 200)','POLYGON((110 110,200 20,20 20,110 110))'); +SELECT '238', ST_Relate('LINESTRING(110 110,170 50,20 200,20 110,200 110)','POLYGON((110 110,200 20,20 20,110 110))'); +SELECT '239', ST_Relate('LINESTRING(110 110,180 40,110 40,110 180)','POLYGON((110 110,200 20,20 20,110 110))'); +SELECT '240', ST_Relate('LINESTRING(110 60,50 30,170 30,90 70)','POLYGON((110 110,200 20,20 20,110 110))'); +SELECT '241', ST_Relate('LINESTRING(110 110,180 40,110 40,110 110,70 40)','POLYGON((110 110,200 20,20 20,110 110))'); +SELECT '242', ST_Relate('LINESTRING(230 70,170 120,190 60,140 60,170 120,270 90)','POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))'); +SELECT '243', ST_Relate('MULTILINESTRING((20 110,200 110),(200 200,110 110,20 210,110 110))','POLYGON((110 110,200 20,20 20,110 110))'); +SELECT '244', ST_Relate('MULTILINESTRING((20 110,200 110),(60 180,60 110,160 110,110 110))','POLYGON((110 110,200 20,20 20,110 110))'); +SELECT '245', ST_Relate('MULTILINESTRING((20 110,200 110),(200 200,110 110,20 200,110 200,110 110))','POLYGON((110 110,200 20,20 20,110 110))'); +SELECT '246', ST_Relate('MULTILINESTRING((20 110,200 110),(110 50,110 170,110 70,110 150,200 150))','POLYGON((110 110,200 20,20 20,110 110))'); +SELECT '247', ST_Relate('MULTILINESTRING((20 110,200 110),(50 110,170 110,110 170,110 50,110 170,110 50))','POLYGON((110 110,200 20,20 20,110 110))'); +SELECT '248', ST_Relate('MULTILINESTRING((20 110,200 110),(110 60,110 160,200 160))','POLYGON((110 110,200 20,20 20,110 110))'); +SELECT '249', ST_Relate('MULTILINESTRING((20 110,200 110),(110 60,110 160,200 160))','POLYGON((110 110,200 20,20 20,110 110))'); +SELECT '250', ST_Relate('MULTILINESTRING((110 100,40 30,180 30),(170 30,110 90,50 30))','POLYGON((110 110,200 20,20 20,110 110))'); +SELECT '251', ST_Relate('MULTILINESTRING((110 110,60 40,70 20,150 20,170 40),(180 30,40 30,110 80))','POLYGON((110 110,200 20,20 20,110 110))'); +SELECT '252', ST_Relate('MULTILINESTRING((20 110,200 110,200 160),(110 110,200 110,200 70,20 150))','MULTIPOLYGON(((110 110,20 20,200 20,110 110)),((110 110,20 200,200 200,110 110)))'); +SELECT '253', ST_Relate('MULTILINESTRING((20 160,70 110,150 110,200 160),(110 110,20 110,50 80,70 110,200 110))','MULTIPOLYGON(((110 110,20 20,200 20,110 110)),((110 110,20 200,200 200,110 110)))'); +SELECT '254', ST_Relate('MULTILINESTRING((20 110,200 110),(110 110,20 170,20 130,200 90))','MULTIPOLYGON(((110 110,20 20,200 20,110 110)),((110 110,20 200,200 200,110 110)))'); +SELECT '255', ST_Relate('LINESTRING(0 0,0 50,50 50,50 0,0 0)','MULTILINESTRING((0 0,0 50),(0 50,50 50),(50 50,50 0),(50 0,0 0))'); +SELECT '256', ST_Relate('LINESTRING(40 180,140 180)','MULTIPOLYGON(((20 320,180 320,180 180,20 180,20 320)),((20 180,20 80,180 80,180 180,20 180)))'); +SELECT '257', ST_Relate('LINESTRING(40 180,140 180)','MULTIPOLYGON(((20 320,180 320,180 180,20 180,20 320)),((60 180,60 80,180 80,180 180,60 180)))'); +SELECT '258', ST_Relate('LINESTRING(0 0,60 0,60 60,60 0,120 0)','MULTILINESTRING((0 0,60 0),(60 0,120 0),(60 0,60 60))'); +SELECT '259', ST_Relate('LINESTRING(40 40,120 120)','LINESTRING(40 40,60 120)'); +SELECT '260', ST_Relate('LINESTRING(40 40,120 120)','LINESTRING(60 240,40 40)'); +SELECT '261', ST_Relate('LINESTRING(40 40,180 180)','LINESTRING(120 120,20 200)'); +SELECT '262', ST_Relate('LINESTRING(40 40,120 120)','LINESTRING(60 240,120 120)'); +SELECT '263', ST_Relate('LINESTRING(40 40,180 180)','LINESTRING(20 180,140 140)'); +SELECT '264', ST_Relate('LINESTRING(40 40,120 120)','LINESTRING(40 120,120 40)'); +SELECT '265', ST_Relate('LINESTRING(40 40,100 100)','LINESTRING(40 40,100 100)'); +SELECT '266', ST_Relate('LINESTRING(40 40,100 100)','LINESTRING(100 100,40 40)'); +SELECT '267', ST_Relate('LINESTRING(40 40,120 120)','LINESTRING(40 120,120 160)'); +SELECT '268', ST_Relate('LINESTRING(20 20,180 180)','LINESTRING(20 20,180 180)'); +SELECT '269', ST_Relate('LINESTRING(20 20,180 180)','LINESTRING(20 20,110 110)'); +SELECT '270', ST_Relate('LINESTRING(20 20,180 180)','LINESTRING(50 50,140 140)'); +SELECT '271', ST_Relate('LINESTRING(180 180,40 40)','LINESTRING(120 120,260 260)'); +SELECT '272', ST_Relate('LINESTRING(40 40,180 180)','LINESTRING(260 260,120 120)'); +SELECT '273', ST_Relate('LINESTRING(40 40,180 180)','LINESTRING(120 120,260 260)'); +SELECT '274', ST_Relate('LINESTRING(40 40,100 100,200 120,80 240)','LINESTRING(40 40,20 100,40 160,20 200)'); +SELECT '275', ST_Relate('LINESTRING(40 40,100 100,200 120,80 240)','LINESTRING(20 200,40 160,20 100,40 40)'); +SELECT '276', ST_Relate('LINESTRING(80 240,200 120,100 100,40 40)','LINESTRING(20 200,40 160,20 100,40 40)'); +SELECT '277', ST_Relate('LINESTRING(60 60,60 230,140 230,250 160)','LINESTRING(20 20,60 60,250 160,310 230)'); +SELECT '278', ST_Relate('LINESTRING(60 60,60 230,140 230,250 160)','LINESTRING(20 20,110 110,200 110,320 230)'); +SELECT '279', ST_Relate('LINESTRING(60 110,60 250,360 210)','LINESTRING(60 110,110 160,250 160,310 160,360 210)'); +SELECT '280', ST_Relate('LINESTRING(60 110,60 250,360 210)','LINESTRING(360 210,310 160,110 160,60 110)'); +SELECT '281', ST_Relate('LINESTRING(40 40,100 100,200 120,80 240)','LINESTRING(160 160,240 240)'); +SELECT '282', ST_Relate('LINESTRING(40 40,100 100,200 120,80 240)','LINESTRING(240 240,160 160)'); +SELECT '283', ST_Relate('LINESTRING(60 60,60 230,140 230,250 160)','LINESTRING(60 150,110 100,170 100,110 230)'); +SELECT '284', ST_Relate('LINESTRING(60 60,60 230,140 230,250 160)','LINESTRING(60 110,110 160,250 160,310 160,360 210)'); +SELECT '285', ST_Relate('LINESTRING(40 40,100 100,200 120,80 240)','LINESTRING(200 120,200 190,150 240,200 240)'); +SELECT '286', ST_Relate('LINESTRING(40 40,100 100,200 120,80 240)','LINESTRING(200 240,150 240,200 200,200 120)'); +SELECT '287', ST_Relate('LINESTRING(60 60,60 230,140 230,250 160)','LINESTRING(60 230,80 140,120 140,140 230)'); +SELECT '288', ST_Relate('LINESTRING(60 110,200 110,250 160,300 210)','LINESTRING(60 110,110 160,250 160,310 160,360 210)'); +SELECT '289', ST_Relate('LINESTRING(60 110,200 110,250 160,300 210,360 210)','LINESTRING(60 110,110 160,250 160,310 160,360 210)'); +SELECT '290', ST_Relate('LINESTRING(60 110,220 110,250 160,280 110)','LINESTRING(60 110,110 160,250 160,310 160,360 210)'); +SELECT '291', ST_Relate('LINESTRING(60 110,150 110,200 160,250 110,360 110,360 210)','LINESTRING(60 110,110 160,250 160,310 160,360 210)'); +SELECT '292', ST_Relate('LINESTRING(130 160,160 110,220 110,250 160,250 210)','LINESTRING(60 110,110 160,250 160,310 160,360 210)'); +SELECT '293', ST_Relate('LINESTRING(130 160,160 110,190 110,230 210)','LINESTRING(60 110,110 160,250 160,310 160,360 210)'); +SELECT '294', ST_Relate('LINESTRING(130 160,160 110,200 110,230 160,260 210,360 210)','LINESTRING(60 110,110 160,250 160,310 160,360 210)'); +SELECT '295', ST_Relate('LINESTRING(130 160,160 110,200 110,230 160,260 210,360 210,380 210)','LINESTRING(60 110,110 160,250 160,310 160,360 210)'); +SELECT '296', ST_Relate('LINESTRING(130 160,160 110,200 110,230 160,260 210,380 210)','LINESTRING(60 110,110 160,250 160,310 160,360 210)'); +SELECT '297', ST_Relate('LINESTRING(110 160,160 110,200 110,250 160,250 210)','LINESTRING(60 110,110 160,250 160,310 160,360 210)'); +SELECT '298', ST_Relate('LINESTRING(110 160,180 110,250 160,320 110)','LINESTRING(60 110,110 160,250 160,310 160,360 210)'); +SELECT '299', ST_Relate('LINESTRING(140 160,180 80,220 160,250 80)','LINESTRING(60 110,110 160,250 160,310 160,360 210)'); +SELECT '300', ST_Relate('LINESTRING(40 40,100 100,200 120,130 190)','LINESTRING(20 130,70 130,160 40)'); +SELECT '301', ST_Relate('LINESTRING(40 40,100 100,200 120,130 190)','LINESTRING(40 160,40 100,110 40,170 40)'); +SELECT '302', ST_Relate('LINESTRING(130 110,180 160,230 110,280 160,330 110)','LINESTRING(60 110,110 160,250 160,310 160,360 210)'); +SELECT '303', ST_Relate('LINESTRING(40 40,100 100,200 120,130 190)','LINESTRING(30 140,80 140,100 100,200 30)'); +SELECT '304', ST_Relate('LINESTRING(110 110,110 160,180 110,250 160,250 110)','LINESTRING(60 110,110 160,250 160,310 160,360 210)'); +SELECT '305', ST_Relate('LINESTRING(20 20,80 80,160 80,240 80,300 140)','LINESTRING(20 60,60 60,60 140,80 80,100 20,140 140,180 20,200 80,220 20,240 80,300 80,270 110,200 110)'); +SELECT '306', ST_Relate('LINESTRING(20 20,230 20,20 30,170 30,20 40,230 40,20 50,230 60,60 60,230 70,20 70,180 80,60 80,230 90,20 90,230 100,30 100,210 110,20 110,80 120,20 130,170 130,90 120,230 130,170 140,230 140,80 150,160 140,20 140,70 150,20 150,230 160,80 160,230 170,20 160,180 170,20 170,230 180,20 180,40 190,230 190,20 200,230 200)','LINESTRING(30 210,30 60,40 210,40 30,50 190,50 20,60 160,60 50,70 220,70 50,80 20,80 210,90 50,90 150,100 30,100 210,110 20,110 190,120 50,120 180,130 210,120 20,140 210,130 50,150 210,130 20,160 210,140 30,170 210,150 20,180 210,160 20,190 210,180 80,170 50,170 20,180 70,180 20,190 190,190 30,200 210,200 30,210 210,210 20,220 150,220 20)'); +SELECT '307', ST_Relate('LINESTRING(40 40,100 100,200 120,80 240)','LINESTRING(40 40,100 100,200 120,80 240)'); +SELECT '308', ST_Relate('LINESTRING(40 40,100 100,200 120,80 240)','LINESTRING(80 240,200 120,100 100,40 40)'); +SELECT '309', ST_Relate('LINESTRING(40 40,100 100,200 120,80 240)','LINESTRING(80 240,120 200,200 120,100 100,80 80,40 40)'); +SELECT '310', ST_Relate('LINESTRING(40 40,100 100,200 120,80 240)','LINESTRING(260 210,240 130,280 120,260 40)'); +SELECT '311', ST_Relate('LINESTRING(100 20,20 20,20 160,210 160,210 20,110 20,50 120,120 150,200 150)','LINESTRING(140 130,100 110,120 60,170 60)'); +SELECT '312', ST_Relate('LINESTRING(60 110,110 160,250 160,310 160,360 210)','LINESTRING(60 110,110 160,250 160,310 160,360 210)'); +SELECT '313', ST_Relate('LINESTRING(60 110,110 160,310 160,360 210)','LINESTRING(60 110,110 160,250 160,310 160,360 210)'); +SELECT '314', ST_Relate('LINESTRING(60 110,110 160,250 160,310 160,360 210)','LINESTRING(60 110,110 160,250 160)'); +SELECT '315', ST_Relate('LINESTRING(60 110,110 160,250 160,310 160,360 210)','LINESTRING(110 160,310 160,340 190)'); +SELECT '316', ST_Relate('LINESTRING(60 110,110 160,250 160,310 160,360 210)','LINESTRING(140 160,250 160,310 160,340 190)'); +SELECT '317', ST_Relate('LINESTRING(60 110,110 160,250 160,310 160,360 210)','LINESTRING(110 160,250 160,310 160)'); +SELECT '318', ST_Relate('LINESTRING(40 40,100 100,200 120,80 240)','LINESTRING(200 120,100 100,40 40,140 80,200 40)'); +SELECT '319', ST_Relate('LINESTRING(40 40,100 100,200 120,80 240)','LINESTRING(280 240,240 140,200 120,100 100,40 40)'); +SELECT '320', ST_Relate('LINESTRING(40 40,100 100,200 120,80 240)','LINESTRING(80 190,140 140,40 40)'); +SELECT '321', ST_Relate('LINESTRING(40 40,100 100,200 120,80 240)','LINESTRING(240 200,200 260,80 240,140 180)'); +SELECT '322', ST_Relate('LINESTRING(40 40,100 100,200 120,80 240)','LINESTRING(140 180,80 240,200 260,240 200)'); +SELECT '323', ST_Relate('LINESTRING(40 40,100 100,200 120,80 240)','LINESTRING(280 240,240 140,200 120,80 240)'); +SELECT '324', ST_Relate('LINESTRING(20 20,80 80,160 80,240 80,300 140)','LINESTRING(20 80,120 80,200 80,260 20)'); +SELECT '325', ST_Relate('LINESTRING(40 40,100 100,200 120,80 240)','LINESTRING(100 100,200 120,240 140,280 240)'); +SELECT '326', ST_Relate('LINESTRING(40 40,100 100,200 120,80 240)','LINESTRING(280 240,240 140,200 120,100 100)'); +SELECT '327', ST_Relate('LINESTRING(20 20,80 80,160 80,240 80,300 140)','LINESTRING(80 20,80 80,240 80,300 20)'); +SELECT '328', ST_Relate('LINESTRING(20 20,80 80,160 80,240 80,300 140)','LINESTRING(20 80,80 80,120 80,140 140,160 80,200 80,220 20,240 80,270 110,300 80)'); +SELECT '329', ST_Relate('LINESTRING(100 100,20 180,180 180)','LINESTRING(100 100,180 20,20 20,100 100)'); +SELECT '330', ST_Relate('LINESTRING(20 100,180 100,100 180)','LINESTRING(100 100,180 20,20 20,100 100)'); +SELECT '331', ST_Relate('LINESTRING(100 40,100 160,180 160)','LINESTRING(100 100,180 20,20 20,100 100)'); +SELECT '332', ST_Relate('LINESTRING(20 100,100 100,180 100,100 180)','LINESTRING(100 100,180 20,20 20,100 100)'); +SELECT '333', ST_Relate('LINESTRING(100 100,160 40)','LINESTRING(100 100,180 20,20 20,100 100)'); +SELECT '334', ST_Relate('LINESTRING(100 100,180 20)','LINESTRING(100 100,180 20,20 20,100 100)'); +SELECT '335', ST_Relate('LINESTRING(60 60,100 100,140 60)','LINESTRING(100 100,180 20,20 20,100 100)'); +SELECT '336', ST_Relate('LINESTRING(100 100,190 10,190 100)','LINESTRING(100 100,180 20,20 20,100 100)'); +SELECT '337', ST_Relate('LINESTRING(100 100,160 40,160 100)','LINESTRING(100 100,180 20,20 20,100 100)'); +SELECT '338', ST_Relate('LINESTRING(60 140,160 40,160 140)','LINESTRING(100 100,180 20,20 20,100 100)'); +SELECT '339', ST_Relate('LINESTRING(20 20,140 140)','LINESTRING(80 80,20 80,140 80,80 20,80 140)'); +SELECT '340', ST_Relate('LINESTRING(20 20,140 140)','LINESTRING(80 80,20 80,140 80)'); +SELECT '341', ST_Relate('LINESTRING(20 20,140 140)','LINESTRING(80 80,140 80,80 20,80 140)'); +SELECT '342', ST_Relate('LINESTRING(20 20,140 140)','LINESTRING(80 80,20 80,140 80,80 20,80 80)'); +SELECT '343', ST_Relate('LINESTRING(20 20,140 140)','LINESTRING(80 80,20 80,140 80,80 80)'); +SELECT '344', ST_Relate('LINESTRING(20 20,140 140)','LINESTRING(80 80,20 80,20 140,140 20,80 20,80 80)'); +SELECT '345', ST_Relate('LINESTRING(20 20,140 140)','LINESTRING(20 140,140 20,100 20,100 80)'); +SELECT '346', ST_Relate('LINESTRING(20 20,140 140)','LINESTRING(140 80,20 80,120 80,80 20,80 140)'); +SELECT '347', ST_Relate('LINESTRING(20 20,140 140)','LINESTRING(140 80,20 80,140 80)'); +SELECT '348', ST_Relate('LINESTRING(20 20,140 140)','LINESTRING(140 80,20 80,80 140,80 20)'); +SELECT '349', ST_Relate('LINESTRING(20 20,140 140)','LINESTRING(140 80,80 80,20 80,50 140,50 60)'); +SELECT '350', ST_Relate('LINESTRING(20 20,140 140)','LINESTRING(140 80,20 80,120 80,80 20,80 80,80 140)'); +SELECT '351', ST_Relate('LINESTRING(20 20,140 140)','LINESTRING(140 80,20 80,80 80,140 80)'); +SELECT '352', ST_Relate('LINESTRING(20 20,140 140)','LINESTRING(140 80,20 80,80 140,80 80,80 20)'); +SELECT '353', ST_Relate('LINESTRING(130 150,220 150,220 240)','LINESTRING(130 240,130 150,220 20,50 20,130 150)'); +SELECT '354', ST_Relate('LINESTRING(30 150,130 150,250 150)','LINESTRING(130 240,130 150,220 20,50 20,130 150)'); +SELECT '355', ST_Relate('LINESTRING(30 150,250 150)','LINESTRING(130 240,130 150,220 20,50 20,130 150)'); +SELECT '356', ST_Relate('LINESTRING(30 150,130 150,250 150)','LINESTRING(130 240,130 20,30 20,130 150)'); +SELECT '357', ST_Relate('LINESTRING(30 150,250 150)','LINESTRING(120 240,120 20,20 20,120 170)'); +SELECT '358', ST_Relate('LINESTRING(200 200,20 20,200 20,110 110,20 200,110 200,110 110)','LINESTRING(110 110,200 110)'); +SELECT '359', ST_Relate('LINESTRING(110 110,200 110)','LINESTRING(200 200,20 20,200 20,110 110,20 200,110 200,110 110)'); +SELECT '360', ST_Relate('LINESTRING(20 110,200 110)','LINESTRING(200 200,20 20,200 20,110 110,20 200,110 200,110 110)'); +SELECT '361', ST_Relate('LINESTRING(200 200,20 20,200 20,110 110,20 200,110 200,110 110)','LINESTRING(20 110,200 110)'); +SELECT '362', ST_Relate('LINESTRING(90 200,90 130,110 110,150 200)','LINESTRING(200 200,20 20,200 20,20 200,20 130,90 130)'); +SELECT '363', ST_Relate('LINESTRING(200 110,110 110,90 130,90 200)','LINESTRING(200 200,20 20,200 20,20 200,20 130,90 130)'); +SELECT '364', ST_Relate('LINESTRING(80 80,150 80,210 80)','MULTILINESTRING((20 20,140 140),(20 140,140 20))'); +SELECT '365', ST_Relate('LINESTRING(40 80,160 200,260 20,40 80)','LINESTRING(40 80,160 200,260 20,40 80)'); +SELECT '366', ST_Relate('LINESTRING(40 80,160 200,260 20,40 80)','LINESTRING(40 80,260 20,160 200,40 80)'); +SELECT '367', ST_Relate('LINESTRING(40 80,160 200,260 20,40 80)','LINESTRING(260 20,40 80,160 200,260 20)'); +SELECT '368', ST_Relate('LINESTRING(40 80,160 200,260 20,40 80)','LINESTRING(100 140,160 200,260 20,40 80,100 140)'); +SELECT '369', ST_Relate('LINESTRING(100 100,180 20,20 20,100 100)','LINESTRING(100 100,180 180,20 180,100 100)'); +SELECT '370', ST_Relate('LINESTRING(40 150,40 40,150 40,150 150,40 150)','LINESTRING(40 150,150 40,170 20,170 190,40 150)'); +SELECT '371', ST_Relate('LINESTRING(100 100,180 20,20 20,100 100)','LINESTRING(180 100,20 100,100 180,180 100)'); +SELECT '372', ST_Relate('LINESTRING(100 100,180 20,20 20,100 100)','LINESTRING(180 180,100 100,20 180,180 180)'); +SELECT '373', ST_Relate('LINESTRING(20 180,100 100,20 20,20 180)','LINESTRING(100 20,100 180,180 100,100 20)'); +SELECT '374', ST_Relate('LINESTRING(40 150,40 40,150 40,150 150,40 150)','LINESTRING(170 20,20 170,170 170,170 20)'); +SELECT '375', ST_Relate('LINESTRING(40 150,40 40,150 40,150 150,40 150)','LINESTRING(40 150,150 150,90 210,40 150)'); +SELECT '376', ST_Relate('LINESTRING(40 150,40 40,150 40,150 150,40 150)','LINESTRING(20 150,170 150,90 230,20 150)'); +SELECT '377', ST_Relate('LINESTRING(40 150,40 40,150 40,150 150,40 150)','LINESTRING(40 150,150 150,150 40,20 40,20 150,40 150)'); +SELECT '378', ST_Relate('LINESTRING(110 110,200 20,20 20,110 110)','LINESTRING(110 110,200 200,110 110,20 200,20 110,200 110)'); +SELECT '379', ST_Relate('LINESTRING(110 110,200 20,20 20,110 110)','LINESTRING(110 110,20 110,200 110,50 110,110 170)'); +SELECT '380', ST_Relate('LINESTRING(110 110,200 20,20 20,110 110)','LINESTRING(110 110,20 200,110 200,110 110,200 200)'); +SELECT '381', ST_Relate('LINESTRING(110 110,200 20,20 20,110 110)','LINESTRING(200 20,20 200,200 200,110 110,110 40)'); +SELECT '382', ST_Relate('LINESTRING(110 110,200 20,20 20,110 110)','LINESTRING(200 20,20 200,200 200,20 20)'); +SELECT '383', ST_Relate('LINESTRING(110 110,20 110,110 20,20 20,110 110)','LINESTRING(110 110,200 200,110 200,200 110,110 110)'); +SELECT '384', ST_Relate('LINESTRING(20 120,120 120,20 20,120 20,20 120)','LINESTRING(170 100,70 100,170 170,70 170,170 100)'); +SELECT '385', ST_Relate('LINESTRING(20 110,110 110,20 20,110 20,20 110)','LINESTRING(110 160,70 110,60 160,20 130,110 160)'); +SELECT '386', ST_Relate('LINESTRING(20 200,200 200,20 20,200 20,20 200)','LINESTRING(20 110,200 110,200 160,20 60,20 110)'); +SELECT '387', ST_Relate('LINESTRING(20 110,110 110,20 20,110 20,20 110)','LINESTRING(200 200,110 110,200 110,110 200,200 200)'); +SELECT '388', ST_Relate('LINESTRING(20 120,120 120,20 20,120 20,20 120)','LINESTRING(220 120,120 20,220 20,120 120,220 120)'); +SELECT '389', ST_Relate('MULTILINESTRING((70 20,20 90,70 170),(70 170,120 90,70 20))','MULTILINESTRING((70 20,20 90,70 170),(70 170,120 90,70 20))'); +SELECT '390', ST_Relate('MULTILINESTRING((20 20,90 20,170 20),(90 20,90 80,90 140))','MULTILINESTRING((20 20,90 20,170 20),(90 20,90 80,90 140))'); +SELECT '391', ST_Relate('MULTILINESTRING((20 20,90 20,170 20),(90 20,90 80,90 140))','MULTILINESTRING((90 140,90 60,90 20),(170 20,130 20,20 20))'); +SELECT '392', ST_Relate('MULTILINESTRING((20 20,90 20,170 20),(90 20,90 80,90 140))','MULTILINESTRING((90 20,170 100,170 140),(170 60,90 20,20 60),(130 100,130 60,90 20,50 90))'); +SELECT '393', ST_Relate('MULTILINESTRING((20 20,90 20,170 20),(90 20,90 80,90 140))','MULTILINESTRING((90 20,170 100,170 140),(130 140,130 60,90 20,20 90,90 20,130 60,170 60))'); +SELECT '394', ST_Relate('MULTILINESTRING((20 20,90 20,170 20),(90 20,90 80,90 140))','MULTILINESTRING((90 20,170 100,170 140),(170 60,90 20,20 60))'); +SELECT '395', ST_Relate('MULTILINESTRING((20 20,90 20,170 20),(90 20,90 80,90 140))','MULTILINESTRING((90 20,170 100,170 140),(170 60,90 20,20 60),(130 100,90 20))'); +SELECT '396', ST_Relate('MULTILINESTRING((20 20,90 20,170 20),(90 20,90 80,90 140))','MULTILINESTRING((90 20,170 100,170 140),(170 60,90 20,20 60),(120 100,170 100,90 20))'); +SELECT '397', ST_Relate('MULTILINESTRING((20 20,90 20,170 20),(90 20,90 80,90 140))','MULTILINESTRING((90 20,170 100,170 140),(170 60,90 20,20 60),(120 100,170 100,90 20))'); +SELECT '398', ST_Relate('MULTILINESTRING((20 20,90 20,170 20),(90 20,90 80,90 140))','MULTILINESTRING((90 20,170 100,170 140),(130 140,130 60,90 20,20 90,90 20))'); +SELECT '399', ST_Relate('MULTILINESTRING((20 20,90 20,170 20),(90 20,90 80,90 140))','MULTILINESTRING((90 20,170 100,170 140),(170 60,90 20,20 60,20 140,90 20))'); +SELECT '400', ST_Relate('MULTILINESTRING((20 20,90 90,20 160),(90 160,90 20))','MULTILINESTRING((160 160,90 90,160 20),(160 120,120 120,90 90,160 60))'); +SELECT '401', ST_Relate('MULTILINESTRING((20 20,90 90,20 160),(90 160,90 20))','MULTILINESTRING((160 160,90 90,160 20),(160 120,120 120,90 90,120 60,160 60))'); +SELECT '402', ST_Relate('MULTILINESTRING((20 20,90 90,20 160),(90 160,90 20))','MULTILINESTRING((160 160,90 90,160 20),(160 120,90 90,160 60))'); +SELECT '403', ST_Relate('POINT(20 20)','POLYGON((60 120,60 40,160 40,160 120,60 120))'); +SELECT '404', ST_Relate('POINT(70 170)','POLYGON((110 230,80 160,20 160,20 20,200 20,200 160,140 160,110 230))'); +SELECT '405', ST_Relate('POINT(110 130)','POLYGON((20 160,80 160,110 100,140 160,200 160,200 20,20 20,20 160))'); +SELECT '406', ST_Relate('POINT(100 70)','POLYGON((20 150,100 150,40 50,170 50,110 150,190 150,190 20,20 20,20 150))'); +SELECT '407', ST_Relate('POINT(100 70)','POLYGON((20 150,100 150,40 50,160 50,100 150,180 150,180 20,20 20,20 150))'); +SELECT '408', ST_Relate('POINT(60 120)','POLYGON((60 120,60 40,160 40,160 120,60 120))'); +SELECT '409', ST_Relate('POINT(110 120)','POLYGON((60 120,60 40,160 40,160 120,60 120))'); +SELECT '410', ST_Relate('POINT(160 120)','POLYGON((60 120,60 40,160 40,160 120,60 120))'); +SELECT '411', ST_Relate('POINT(100 150)','POLYGON((20 150,100 150,40 50,160 50,100 150,180 150,180 20,20 20,20 150))'); +SELECT '412', ST_Relate('POINT(100 80)','POLYGON((60 120,60 40,160 40,160 120,60 120))'); +SELECT '413', ST_Relate('POINT(60 160)','POLYGON((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))'); +SELECT '414', ST_Relate('POINT(190 90)','POLYGON((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))'); +SELECT '415', ST_Relate('POINT(190 190)','POLYGON((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))'); +SELECT '416', ST_Relate('POINT(360 20)','POLYGON((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))'); +SELECT '417', ST_Relate('POINT(130 130)','POLYGON((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))'); +SELECT '418', ST_Relate('POINT(280 50)','POLYGON((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))'); +SELECT '419', ST_Relate('POINT(150 100)','POLYGON((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))'); +SELECT '420', ST_Relate('POINT(100 50)','POLYGON((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))'); +SELECT '421', ST_Relate('POINT(140 120)','POLYGON((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))'); +SELECT '422', ST_Relate('POINT(190 50)','POLYGON((190 190,360 20,20 20,190 190),(90 50,150 110,190 50,90 50),(190 50,230 110,290 50,190 50))'); +SELECT '423', ST_Relate('POINT(180 90)','POLYGON((190 190,360 20,20 20,190 190),(180 140,180 40,80 40,180 140),(180 90,210 140,310 40,230 40,180 90))'); +SELECT '424', ST_Relate('MULTIPOINT(20 80,110 160,20 160)','POLYGON((60 120,60 40,160 40,160 120,60 120))'); +SELECT '425', ST_Relate('MULTIPOINT(20 80,60 120,20 160)','POLYGON((60 120,60 40,160 40,160 120,60 120))'); +SELECT '426', ST_Relate('MULTIPOINT(10 80,110 170,110 120)','POLYGON((60 120,60 40,160 40,160 120,60 120))'); +SELECT '427', ST_Relate('MULTIPOINT(10 80,110 170,160 120)','POLYGON((60 120,60 40,160 40,160 120,60 120))'); +SELECT '428', ST_Relate('MULTIPOINT(20 120,60 120,110 120,160 120,200 120)','POLYGON((60 120,60 40,160 40,160 120,60 120))'); +SELECT '429', ST_Relate('MULTIPOINT(60 120,110 120,160 120)','POLYGON((60 120,60 40,160 40,160 120,60 120))'); +SELECT '430', ST_Relate('MULTIPOINT(60 120,160 120,160 40,60 40)','POLYGON((60 120,60 40,160 40,160 120,60 120))'); +SELECT '431', ST_Relate('MULTIPOINT(20 150,60 120,110 80)','POLYGON((60 120,60 40,160 40,160 120,60 120))'); +SELECT '432', ST_Relate('MULTIPOINT(110 80,160 120,200 160)','POLYGON((60 120,60 40,160 40,160 120,60 120))'); +SELECT '433', ST_Relate('MULTIPOINT(110 80,110 120,110 160)','POLYGON((60 120,60 40,160 40,160 120,60 120))'); +SELECT '434', ST_Relate('MULTIPOINT(110 170,110 80)','POLYGON((60 120,60 40,160 40,160 120,60 120))'); +SELECT '435', ST_Relate('MULTIPOINT(60 120,160 120,110 80,110 170)','POLYGON((60 120,60 40,160 40,160 120,60 120))'); +SELECT '436', ST_Relate('MULTIPOINT(90 80,130 80)','POLYGON((60 120,60 40,160 40,160 120,60 120))'); +SELECT '437', ST_Relate('MULTIPOINT(60 120,160 120,110 80)','POLYGON((60 120,60 40,160 40,160 120,60 120))'); +SELECT '438', ST_Relate('MULTIPOINT(40 170,40 90,130 170)','POLYGON((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))'); +SELECT '439', ST_Relate('MULTIPOINT(90 170,280 170,190 90)','POLYGON((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))'); +SELECT '440', ST_Relate('MULTIPOINT(190 110,150 70,230 70)','POLYGON((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))'); +SELECT '441', ST_Relate('POINT(100 100)','MULTIPOLYGON(((20 100,20 20,100 20,100 100,20 100)),((100 180,100 100,180 100,180 180,100 180)))'); +SELECT '442', ST_Relate('POINT(20 100)','MULTIPOLYGON(((20 100,20 20,100 20,100 100,20 100)),((100 180,100 100,180 100,180 180,100 180)))'); +SELECT '443', ST_Relate('POINT(60 100)','MULTIPOLYGON(((20 100,20 20,100 20,100 100,20 100)),((100 180,100 100,180 100,180 180,100 180)))'); +SELECT '444', ST_Relate('POINT(110 110)','MULTIPOLYGON(((110 110,20 200,200 200,110 110),(110 110,80 180,140 180,110 110)),((110 110,20 20,200 20,110 110),(110 110,80 40,140 40,110 110)))'); +SELECT '445', ST_Relate('POINT(110 200)','LINESTRING(90 80,160 150,300 150,340 150,340 240)'); +SELECT '446', ST_Relate('POINT(90 80)','LINESTRING(90 80,160 150,300 150,340 150,340 240)'); +SELECT '447', ST_Relate('POINT(340 240)','LINESTRING(90 80,160 150,300 150,340 150,340 240)'); +SELECT '448', ST_Relate('POINT(230 150)','LINESTRING(90 80,160 150,300 150,340 150,340 240)'); +SELECT '449', ST_Relate('POINT(160 150)','LINESTRING(90 80,160 150,300 150,340 150,340 240)'); +SELECT '450', ST_Relate('POINT(90 150)','LINESTRING(150 150,20 20,280 20,150 150)'); +SELECT '451', ST_Relate('POINT(150 80)','LINESTRING(150 150,20 20,280 20,150 150)'); +SELECT '452', ST_Relate('POINT(150 150)','LINESTRING(150 150,20 20,280 20,150 150)'); +SELECT '453', ST_Relate('POINT(100 20)','LINESTRING(150 150,20 20,280 20,150 150)'); +SELECT '454', ST_Relate('POINT(20 20)','LINESTRING(150 150,20 20,280 20,150 150)'); +SELECT '455', ST_Relate('POINT(220 220)','LINESTRING(110 110,220 20,20 20,110 110,220 220)'); +SELECT '456', ST_Relate('POINT(110 110)','LINESTRING(110 110,220 20,20 20,110 110,220 220)'); +SELECT '457', ST_Relate('POINT(110 110)','LINESTRING(110 110,220 20,20 20,220 220)'); +SELECT '458', ST_Relate('POINT(110 20)','LINESTRING(110 110,220 20,20 20,220 220)'); +SELECT '459', ST_Relate('POINT(220 20)','LINESTRING(110 110,220 20,20 20,220 220)'); +SELECT '460', ST_Relate('POINT(110 20)','LINESTRING(220 220,20 20,220 20,110 110)'); +SELECT '461', ST_Relate('POINT(20 20)','LINESTRING(220 220,20 20,220 20,110 110)'); +SELECT '462', ST_Relate('POINT(20 110)','LINESTRING(20 200,20 20,110 20,20 110,110 200)'); +SELECT '463', ST_Relate('POINT(20 200)','LINESTRING(20 200,200 20,20 20,200 200)'); +SELECT '464', ST_Relate('POINT(110 110)','LINESTRING(20 200,200 20,140 20,140 80,80 140,20 140)'); +SELECT '465', ST_Relate('POINT(110 110)','LINESTRING(20 200,200 20,20 20,200 200)'); +SELECT '466', ST_Relate('POINT(80 140)','LINESTRING(20 200,110 110,200 20,140 20,140 80,110 110,80 140,20 140)'); +SELECT '467', ST_Relate('POINT(110 110)','LINESTRING(20 200,110 110,200 20,140 20,140 80,110 110,80 140,20 140)'); +SELECT '468', ST_Relate('POINT(110 110)','LINESTRING(20 200,200 20,140 20,140 80,110 110,80 140,20 140)'); +SELECT '469', ST_Relate('POINT(110 110)','LINESTRING(20 200,110 110,200 20,20 20,110 110,200 200)'); +SELECT '470', ST_Relate('POINT(110 110)','LINESTRING(20 200,200 20,20 20,110 110,200 200)'); +SELECT '471', ST_Relate('POINT(110 110)','LINESTRING(20 200,110 110,20 20,200 20,110 110,200 200)'); +SELECT '472', ST_Relate('POINT(110 110)','LINESTRING(110 110,110 200,20 200,110 110,200 20,140 20,140 80,110 110,80 140,20 140)'); +SELECT '473', ST_Relate('POINT(110 110)','LINESTRING(110 110,110 200,20 200,200 20,140 20,140 80,110 110,80 140,20 140)'); +SELECT '474', ST_Relate('POINT(110 110)','LINESTRING(110 110,110 200,20 200,200 20,140 20,140 80,80 140,20 140)'); +SELECT '475', ST_Relate('POINT(110 110)','LINESTRING(110 110,110 200,20 200,110 110,200 20,20 20,110 110,200 200)'); +SELECT '476', ST_Relate('POINT(110 110)','LINESTRING(110 110,110 200,20 200,200 20,20 20,110 110,200 200)'); +SELECT '477', ST_Relate('POINT(110 110)','LINESTRING(110 110,110 200,20 200,200 20,20 20,200 200)'); +SELECT '478', ST_Relate('POINT(110 110)','LINESTRING(110 110,110 200,20 200,110 110,20 20,200 20,110 110,200 200)'); +SELECT '479', ST_Relate('POINT(110 110)','LINESTRING(110 110,110 200,20 200,200 20,200 110,110 110,200 200)'); +SELECT '480', ST_Relate('POINT(110 110)','LINESTRING(200 200,110 110,20 20,200 20,110 110,20 200,110 200,110 110)'); +SELECT '481', ST_Relate('POINT(110 110)','LINESTRING(200 200,20 20,200 20,110 110,20 200,110 200,110 110)'); +SELECT '482', ST_Relate('POINT(110 110)','LINESTRING(200 200,20 20,200 20,20 200,110 200,110 110)'); +SELECT '483', ST_Relate('POINT(110 110)','LINESTRING(200 200,110 110,200 20,20 20,110 110,20 200,110 200,110 110)'); +SELECT '484', ST_Relate('POINT(110 110)','LINESTRING(200 200,20 20,20 110,110 110,20 200,110 200,110 110)'); +SELECT '485', ST_Relate('POINT(110 160)','LINESTRING(110 160,200 250,110 250,110 160,110 110,110 20,20 20,110 110)'); +SELECT '486', ST_Relate('POINT(110 160)','LINESTRING(110 160,200 250,110 250,110 110,110 20,20 20,110 110)'); +SELECT '487', ST_Relate('POINT(110 110)','LINESTRING(110 160,200 250,110 250,110 160,110 110,110 20,20 20,110 110)'); +SELECT '488', ST_Relate('POINT(110 110)','LINESTRING(110 160,200 250,110 250,110 160,110 20,20 20,110 110)'); +SELECT '489', ST_Relate('POINT(110 110)','LINESTRING(110 110,200 200,110 200,110 110,110 20,20 20,110 110)'); +SELECT '490', ST_Relate('POINT(110 110)','LINESTRING(110 110,200 200,110 200,110 20,20 20,110 110)'); +SELECT '491', ST_Relate('POINT(140 200)','LINESTRING(110 110,200 200,110 200,110 110,110 20,20 20,110 110)'); +SELECT '492', ST_Relate('POINT(110 200)','LINESTRING(110 110,200 200,110 200,110 110,110 20,20 20,110 110)'); +SELECT '493', ST_Relate('POINT(110 110)','LINESTRING(110 110,200 200,110 200,110 110,110 20,200 20,110 110)'); +SELECT '494', ST_Relate('POINT(140 200)','LINESTRING(110 110,200 200,110 200,110 110,110 20,200 20,110 110)'); +SELECT '495', ST_Relate('POINT(110 200)','LINESTRING(110 110,200 200,110 200,110 110,110 20,200 20,110 110)'); +SELECT '496', ST_Relate('POINT(90 130)','LINESTRING(90 130,20 130,20 200,90 130,200 20,20 20,200 200)'); +SELECT '497', ST_Relate('POINT(110 110)','LINESTRING(90 130,20 130,20 200,90 130,200 20,20 20,200 200)'); +SELECT '498', ST_Relate('POINT(90 130)','LINESTRING(90 130,20 130,20 200,200 20,20 20,200 200)'); +SELECT '499', ST_Relate('POINT(110 110)','LINESTRING(90 130,20 130,20 200,200 20,20 20,200 200)'); +SELECT '500', ST_Relate('POINT(90 130)','LINESTRING(200 200,20 20,200 20,90 130,20 200,20 130,90 130)'); +SELECT '501', ST_Relate('POINT(110 110)','LINESTRING(200 200,20 20,200 20,90 130,20 200,20 130,90 130)'); +SELECT '502', ST_Relate('POINT(90 130)','LINESTRING(200 200,20 20,200 20,20 200,20 130,90 130)'); +SELECT '503', ST_Relate('POINT(110 110)','LINESTRING(200 200,20 20,200 20,20 200,20 130,90 130)'); +SELECT '504', ST_Relate('POINT(110 110)','LINESTRING(110 110,20 130,20 200,110 110,200 20,20 20,110 110,200 200,200 130,110 110)'); +SELECT '505', ST_Relate('POINT(110 110)','LINESTRING(110 110,20 130,20 200,200 20,20 20,200 200,200 130,110 110)'); +SELECT '506', ST_Relate('POINT(110 110)','LINESTRING(110 110,80 200,20 200,110 110,200 20,20 20,110 110,200 200,140 200,110 110)'); +SELECT '507', ST_Relate('POINT(110 110)','LINESTRING(110 110,80 200,20 200,200 20,20 20,200 200,140 200,110 110)'); +SELECT '508', ST_Relate('POINT(110 110)','LINESTRING(200 200,20 20,200 20,20 200,200 200)'); +SELECT '509', ST_Relate('POINT(110 110)','LINESTRING(200 200,110 110,20 20,200 20,110 110,20 200,200 200)'); +SELECT '510', ST_Relate('POINT(110 110)','LINESTRING(200 200,110 110,200 20,20 20,110 110,20 200,200 200)'); +SELECT '511', ST_Relate('POINT(90 130)','LINESTRING(90 130,20 130,20 200,90 130,110 110,200 20,20 20,110 110,200 200,90 130)'); +SELECT '512', ST_Relate('POINT(90 130)','LINESTRING(90 130,20 130,20 200,110 110,200 20,20 20,110 110,200 200,90 130)'); +SELECT '513', ST_Relate('POINT(90 130)','LINESTRING(90 130,90 200,20 200,90 130,110 110,200 20,20 20,110 110,200 200,90 130)'); +SELECT '514', ST_Relate('POINT(90 130)','LINESTRING(90 130,90 200,20 200,200 20,20 20,200 200,90 130)'); +SELECT '515', ST_Relate('POINT(90 130)','LINESTRING(90 130,90 200,20 200,110 110,200 20,20 20,110 110,200 200,90 130)'); +SELECT '516', ST_Relate('POINT(90 130)','LINESTRING(90 130,90 200,20 200,200 20,20 20,200 200,90 130)'); +SELECT '517', ST_Relate('POINT(110 110)','LINESTRING(90 130,90 200,20 200,200 20,20 20,200 200,90 130)'); +SELECT '518', ST_Relate('POINT(110 200)','LINESTRING(110 200,110 110,20 20,200 20,110 110,110 200,200 200)'); +SELECT '519', ST_Relate('POINT(110 150)','LINESTRING(110 200,110 110,20 20,200 20,110 110,110 200,200 200)'); +SELECT '520', ST_Relate('POINT(110 110)','LINESTRING(110 200,110 110,20 20,200 20,110 110,110 200,200 200)'); +SELECT '521', ST_Relate('POINT(110 200)','LINESTRING(110 200,110 110,20 20,200 20,110 110,110 200)'); +SELECT '522', ST_Relate('POINT(110 150)','LINESTRING(110 200,110 110,20 20,200 20,110 110,110 200)'); +SELECT '523', ST_Relate('POINT(110 110)','LINESTRING(110 200,110 110,20 20,200 20,110 110,110 200)'); +SELECT '524', ST_Relate('POINT(110 150)','LINESTRING(20 200,110 200,110 110,20 20,200 20,110 110,110 200,200 200)'); +SELECT '525', ST_Relate('POINT(110 110)','LINESTRING(20 200,110 200,110 110,20 20,200 20,110 110,110 200,200 200)'); +SELECT '526', ST_Relate('POINT(110 200)','LINESTRING(20 200,110 200,110 110,20 20,200 20,110 110,110 200,200 200)'); +SELECT '527', ST_Relate('MULTIPOINT(50 250,90 220,130 190)','LINESTRING(90 80,160 150,300 150,340 150,340 240)'); +SELECT '528', ST_Relate('MULTIPOINT(180 180,230 130,280 80)','LINESTRING(90 80,160 150,300 150,340 150,340 240)'); +SELECT '529', ST_Relate('MULTIPOINT(50 120,90 80,130 40)','LINESTRING(90 80,160 150,300 150,340 150,340 240)'); +SELECT '530', ST_Relate('MULTIPOINT(300 280,340 240,380 200)','LINESTRING(90 80,160 150,300 150,340 150,340 240)'); +SELECT '531', ST_Relate('MULTIPOINT(230 150,260 120,290 90)','LINESTRING(90 80,160 150,300 150,340 150,340 240)'); +SELECT '532', ST_Relate('MULTIPOINT(200 190,240 150,270 110)','LINESTRING(90 80,160 150,300 150,340 150,340 240)'); +SELECT '533', ST_Relate('MULTIPOINT(160 150,190 120,220 90)','LINESTRING(90 80,160 150,300 150,340 150,340 240)'); +SELECT '534', ST_Relate('MULTIPOINT(120 190,160 150,200 110)','LINESTRING(90 80,160 150,300 150,340 150,340 240)'); +SELECT '535', ST_Relate('MULTIPOINT(90 80,160 150,340 240)','LINESTRING(90 80,160 150,300 150,340 150,340 240)'); +SELECT '536', ST_Relate('MULTIPOINT(90 80,160 150,300 150)','LINESTRING(90 80,160 150,300 150,340 150,340 240)'); +SELECT '537', ST_Relate('MULTIPOINT(90 80,160 150,240 150)','LINESTRING(90 80,160 150,300 150,340 150,340 240)'); +SELECT '538', ST_Relate('MULTIPOINT(90 80,130 120,210 150)','LINESTRING(90 80,160 150,300 150,340 150,340 240)'); +SELECT '539', ST_Relate('MULTIPOINT(130 120,210 150,340 200)','LINESTRING(90 80,160 150,300 150,340 150,340 240)'); +SELECT '540', ST_Relate('MULTIPOINT(160 150,240 150,340 210)','LINESTRING(90 80,160 150,300 150,340 150,340 240)'); +SELECT '541', ST_Relate('MULTIPOINT(160 150,300 150,340 150)','LINESTRING(90 80,160 150,300 150,340 150,340 240)'); +SELECT '542', ST_Relate('MULTIPOINT(160 150,240 150,340 240)','LINESTRING(90 80,160 150,300 150,340 150,340 240)'); +SELECT '543', ST_Relate('POINT(20 20)','POINT(20 20)'); +SELECT '544', ST_Relate('POINT(20 20)','POINT(40 60)'); +SELECT '545', ST_Relate('POINT(40 40)','MULTIPOINT(20 20,80 80,20 120)'); +SELECT '546', ST_Relate('POINT(20 20)','MULTIPOINT(20 20,80 80,20 120)'); +SELECT '547', ST_Relate('MULTIPOINT(40 40,80 60,120 100)','MULTIPOINT(40 40,80 60,120 100)'); +SELECT '548', ST_Relate('MULTIPOINT(40 40,80 60,120 100)','MULTIPOINT(40 40,120 100,80 60)'); +SELECT '549', ST_Relate('MULTIPOINT(40 40,60 100,100 60,120 120)','MULTIPOINT(20 120,60 60,100 100,140 40)'); +SELECT '550', ST_Relate('MULTIPOINT(20 20,80 70,140 120,200 170)','MULTIPOINT(20 20,80 70,140 120,200 170)'); +SELECT '551', ST_Relate('MULTIPOINT(20 20,140 120,80 70,200 170)','MULTIPOINT(80 70,20 20,200 170,140 120)'); +SELECT '552', ST_Relate('MULTIPOINT(20 20,80 70,140 120,200 170)','MULTIPOINT(80 70,140 120)'); +SELECT '553', ST_Relate('MULTIPOINT(80 70,20 20,200 170,140 120)','MULTIPOINT(140 120,80 70)'); +SELECT '554', ST_Relate('MULTIPOINT(80 70,20 20,200 170,140 120)','MULTIPOINT(80 170,140 120,200 80)'); +SELECT '555', ST_Relate('MULTIPOINT(80 70,20 20,200 170,140 120)','MULTIPOINT(80 170,140 120,200 80,80 70)'); diff -Nru postgis-1.5.3/regress/relate_bnr.sql postgis-2.0.1/regress/relate_bnr.sql --- postgis-1.5.3/regress/relate_bnr.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/relate_bnr.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,557 @@ +SELECT '1', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((0 0,80 0,80 80,0 80,0 0))'::geometry as a, 'POLYGON((100 200,100 140,180 140,180 200,100 200))'::geometry as b) as f; +SELECT '2', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((0 0,140 0,140 140,0 140,0 0))'::geometry as a, 'POLYGON((140 0,0 0,0 140,140 140,140 0))'::geometry as b) as f; +SELECT '3', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((40 60,360 60,360 300,40 300,40 60))'::geometry as a, 'POLYGON((120 100,280 100,280 240,120 240,120 100))'::geometry as b) as f; +SELECT '4', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((40 60,420 60,420 320,40 320,40 60),(200 140,160 220,260 200,200 140))'::geometry as a, 'POLYGON((80 100,360 100,360 280,80 280,80 100))'::geometry as b) as f; +SELECT '5', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((0 280,0 0,260 0,260 280,0 280),(220 240,40 240,40 40,220 40,220 240))'::geometry as a, 'POLYGON((20 260,240 260,240 20,20 20,20 260),(160 180,80 180,120 120,160 180))'::geometry as b) as f; +SELECT '6', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((60 80,200 80,200 220,60 220,60 80))'::geometry as a, 'POLYGON((120 140,260 140,260 260,120 260,120 140))'::geometry as b) as f; +SELECT '7', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((60 220,220 220,140 140,60 220))'::geometry as a, 'POLYGON((100 180,180 180,180 100,100 100,100 180))'::geometry as b) as f; +SELECT '8', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((40 40,180 40,180 180,40 180,40 40))'::geometry as a, 'POLYGON((180 40,40 180,160 280,300 140,180 40))'::geometry as b) as f; +SELECT '9', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((100 60,140 100,100 140,60 100,100 60))'::geometry as a, 'MULTIPOLYGON(((80 40,120 40,120 80,80 80,80 40)),((120 80,160 80,160 120,120 120,120 80)),((80 120,120 120,120 160,80 160,80 120)),((40 80,80 80,80 120,40 120,40 80)))'::geometry as b) as f; +SELECT '10', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((40 280,200 280,200 100,40 100,40 280),(100 220,120 220,120 200,100 180,100 220))'::geometry as a, 'POLYGON((40 280,180 260,180 120,60 120,40 280))'::geometry as b) as f; +SELECT '11', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((0 200,0 0,200 0,200 200,0 200),(20 180,130 180,130 30,20 30,20 180))'::geometry as a, 'POLYGON((60 90,130 90,130 30,60 30,60 90))'::geometry as b) as f; +SELECT '12', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))'::geometry as a, 'POLYGON((270 90,200 50,150 80,210 120,270 90))'::geometry as b) as f; +SELECT '13', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((100 60,140 100,100 140,60 100,100 60))'::geometry as a, 'MULTIPOLYGON(((80 40,120 40,120 80,80 80,80 40)),((120 80,160 80,160 120,120 120,120 80)),((80 120,120 120,120 160,80 160,80 120)),((40 80,80 80,80 120,40 120,40 80)))'::geometry as b) as f; +SELECT '14', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(100 120,100 240)'::geometry as a, 'POLYGON((40 60,160 60,160 180,40 180,40 60))'::geometry as b) as f; +SELECT '15', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(80 80,140 140,200 200)'::geometry as a, 'POLYGON((40 40,140 40,140 140,40 140,40 40))'::geometry as b) as f; +SELECT '16', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(70 50,70 150)'::geometry as a, 'MULTIPOLYGON(((0 0,0 100,140 100,140 0,0 0)),((20 170,70 100,130 170,20 170)))'::geometry as b) as f; +SELECT '17', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(60 160,150 70)'::geometry as a, 'POLYGON((190 190,360 20,20 20,190 190),(110 110,250 100,140 30,110 110))'::geometry as b) as f; +SELECT '18', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(60 160,150 70)'::geometry as a, 'POLYGON((190 190,360 20,20 20,190 190),(111 110,250 100,140 30,111 110))'::geometry as b) as f; +SELECT '19', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(80 110,170 110)'::geometry as a, 'POLYGON((20 200,20 20,240 20,240 200,20 200),(130 110,60 40,60 180,130 110),(130 180,130 40,200 110,130 180))'::geometry as b) as f; +SELECT '20', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(80 110,170 110)'::geometry as a, 'POLYGON((20 200,20 20,240 20,240 200,20 200),(130 110,60 40,60 180,130 110),(130 180,131 40,200 110,130 180))'::geometry as b) as f; +SELECT '21', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(160 70,320 230)'::geometry as a, 'MULTIPOLYGON(((140 110,260 110,170 20,50 20,140 110)),((300 270,420 270,340 190,220 190,300 270)))'::geometry as b) as f; +SELECT '22', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(100 140,100 40)'::geometry as a, 'MULTIPOLYGON(((20 80,180 79,100 0,20 80)),((20 160,180 160,100 80,20 160)))'::geometry as b) as f; +SELECT '23', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(100 140,100 40)'::geometry as a, 'MULTIPOLYGON(((20 80,180 80,100 0,20 80)),((20 160,180 160,100 80,20 160)))'::geometry as b) as f; +SELECT '24', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(110 60,20 150,200 150,110 60)'::geometry as a, 'POLYGON((20 20,200 20,110 110,20 20))'::geometry as b) as f; +SELECT '25', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(0 0,0 50,50 50,50 0,0 0)'::geometry as a, 'MULTILINESTRING((0 0,0 50),(0 50,50 50),(50 50,50 0),(50 0,0 0))'::geometry as b) as f; +SELECT '26', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 180,140 180)'::geometry as a, 'MULTIPOLYGON(((20 320,180 320,180 180,20 180,20 320)),((20 180,20 80,180 80,180 180,20 180)))'::geometry as b) as f; +SELECT '27', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 180,140 180)'::geometry as a, 'MULTIPOLYGON(((20 320,180 320,180 180,20 180,20 320)),((60 180,60 80,180 80,180 180,60 180)))'::geometry as b) as f; +SELECT '28', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(0 0,60 0,60 60,60 0,120 0)'::geometry as a, 'MULTILINESTRING((0 0,60 0),(60 0,120 0),(60 0,60 60))'::geometry as b) as f; +SELECT '29', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(60 0,20 80,100 80,80 120,40 140)'::geometry as a, 'LINESTRING(140 300,220 160,260 200,240 260)'::geometry as b) as f; +SELECT '30', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(60 0,20 80,100 80,80 120,40 140)'::geometry as a, 'LINESTRING(60 40,140 40,140 160,0 160)'::geometry as b) as f; +SELECT '31', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(60 0,20 80,100 80,80 120,40 140)'::geometry as a, 'LINESTRING(140 280,240 280,240 180,140 180,140 280)'::geometry as b) as f; +SELECT '32', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(140 0,0 0,40 60,0 120,60 200,220 160,220 40)'::geometry as a, 'LINESTRING(80 140,180 100,160 40,100 40,60 100,80 140)'::geometry as b) as f; +SELECT '33', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(20 20,80 80)'::geometry as a, 'LINESTRING(20 20,80 80)'::geometry as b) as f; +SELECT '34', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 40,160 160,200 60,60 140)'::geometry as a, 'LINESTRING(40 40,160 160,200 60,60 140)'::geometry as b) as f; +SELECT '35', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 40,200 40)'::geometry as a, 'LINESTRING(200 40,140 40,40 40)'::geometry as b) as f; +SELECT '36', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(0 0,110 0,60 0)'::geometry as a, 'LINESTRING(0 0,110 0)'::geometry as b) as f; +SELECT '37', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(0 0,0 50,50 50,50 0,0 0)'::geometry as a, 'MULTILINESTRING((0 0,0 50),(0 50,50 50),(50 50,50 0),(50 0,0 0))'::geometry as b) as f; +SELECT '38', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(0 0,80 0,80 60,80 0,170 0)'::geometry as a, 'MULTILINESTRING((0 0,170 0),(80 0,80 60))'::geometry as b) as f; +SELECT '39', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(80 100,180 200)'::geometry as a, 'LINESTRING(80 180,180 120)'::geometry as b) as f; +SELECT '40', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 40,100 100,160 160)'::geometry as a, 'LINESTRING(160 60,100 100,60 140)'::geometry as b) as f; +SELECT '41', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 40,100 100,180 100,180 180,100 180,100 100)'::geometry as a, 'LINESTRING(140 60,60 140)'::geometry as b) as f; +SELECT '42', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 40,180 180,100 180,100 100)'::geometry as a, 'LINESTRING(140 60,60 140)'::geometry as b) as f; +SELECT '43', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(20 110,200 110)'::geometry as a, 'LINESTRING(200 200,20 20,200 20,110 110,20 200,110 200,110 110)'::geometry as b) as f; +SELECT '44', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(80 90,50 50,0 0)'::geometry as a, 'LINESTRING(0 0,100 100)'::geometry as b) as f; +SELECT '45', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 140,240 140)'::geometry as a, 'LINESTRING(40 140,100 140,80 80,120 60,100 140,160 140,160 100,200 100,160 140,240 140)'::geometry as b) as f; +SELECT '46', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(20 20,100 20,20 20)'::geometry as a, 'LINESTRING(60 20,200 20)'::geometry as b) as f; +SELECT '47', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 60,180 60,180 140,100 140,100 60,220 60,220 180,80 180,80 60,280 60)'::geometry as a, 'LINESTRING(140 60,180 60,220 60,260 60)'::geometry as b) as f; +SELECT '48', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(20 20)'::geometry as a, 'POLYGON((60 120,60 40,160 40,160 120,60 120))'::geometry as b) as f; +SELECT '49', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(0 20,40 20)'::geometry as a, 'POLYGON((20 40,20 0,60 0,60 40,20 40))'::geometry as b) as f; +SELECT '50', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(0 20,20 20)'::geometry as a, 'POLYGON((20 40,20 0,60 0,60 40,20 40))'::geometry as b) as f; +SELECT '51', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(20 20,40 20)'::geometry as a, 'POLYGON((20 40,20 0,60 0,60 40,20 40))'::geometry as b) as f; +SELECT '52', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(80 260,140 260,180 260)'::geometry as a, 'POLYGON((40 320,140 320,140 200,40 200,40 320))'::geometry as b) as f; +SELECT '53', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(40 40)'::geometry as a, 'MULTIPOLYGON(((0 40,0 0,40 0,40 40,0 40)),((40 80,40 40,80 40,80 80,40 80)))'::geometry as b) as f; +SELECT '54', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(60 120)'::geometry as a, 'LINESTRING(40 40,120 120,200 120)'::geometry as b) as f; +SELECT '55', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(40 40)'::geometry as a, 'LINESTRING(40 40,100 100,160 100)'::geometry as b) as f; +SELECT '56', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(60 60)'::geometry as a, 'LINESTRING(40 40,100 100)'::geometry as b) as f; +SELECT '57', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(40 40,100 40)'::geometry as a, 'LINESTRING(40 40,80 80)'::geometry as b) as f; +SELECT '58', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(40 40,60 60)'::geometry as a, 'LINESTRING(40 40,80 80)'::geometry as b) as f; +SELECT '59', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(60 60,100 100)'::geometry as a, 'LINESTRING(40 40,80 80)'::geometry as b) as f; +SELECT '60', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(60 60,100 100)'::geometry as a, 'LINESTRING(40 40,80 80)'::geometry as b) as f; +SELECT '61', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(60 60,100 100)'::geometry as a, 'LINESTRING(40 40,60 60,80 80)'::geometry as b) as f; +SELECT '62', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(20 20)'::geometry as a, 'POINT(20 20)'::geometry as b) as f; +SELECT '63', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(20 20)'::geometry as a, 'POINT(20 30)'::geometry as b) as f; +SELECT '64', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(40 40,80 60,40 100)'::geometry as a, 'MULTIPOINT(40 40,80 60,120 100)'::geometry as b) as f; +SELECT '65', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(40 40,80 60,120 100)'::geometry as a, 'MULTIPOINT(40 40,80 60,120 100)'::geometry as b) as f; +SELECT '66', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((100 100,100 200,200 200,200 100,100 100))'::geometry as a, 'POLYGON((100 100,1e+15 110,1e+15 100,100 100))'::geometry as b) as f; +SELECT '67', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((120 100,120 200,200 200,200 100,120 100))'::geometry as a, 'POLYGON((100 100,1e+15 110,1e+15 100,100 100))'::geometry as b) as f; +SELECT '68', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((20 20,20 100,120 100,140 20,20 20))'::geometry as a, 'POLYGON((20 20,20 100,120 100,140 20,20 20))'::geometry as b) as f; +SELECT '69', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((20 20,20 100,120 100,140 20,20 20))'::geometry as a, 'POLYGON((20 20,140 20,120 100,20 100,20 20))'::geometry as b) as f; +SELECT '70', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((20 20,20 100,120 100,140 20,20 20))'::geometry as a, 'POLYGON((120 100,140 20,20 20,20 100,120 100))'::geometry as b) as f; +SELECT '71', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((20 20,20 100,120 100,140 20,20 20))'::geometry as a, 'POLYGON((20 100,60 100,120 100,140 20,80 20,20 20,20 100))'::geometry as b) as f; +SELECT '72', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((0 0,80 0,80 80,0 80,0 0))'::geometry as a, 'POLYGON((100 200,100 140,180 140,180 200,100 200))'::geometry as b) as f; +SELECT '73', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((140 120,160 20,20 20,20 120,140 120))'::geometry as a, 'POLYGON((140 120,140 200,240 200,240 120,140 120))'::geometry as b) as f; +SELECT '74', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((140 120,160 20,20 20,20 120,140 120))'::geometry as a, 'POLYGON((80 180,140 260,260 200,200 60,80 180))'::geometry as b) as f; +SELECT '75', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((140 120,160 20,20 20,20 120,140 120))'::geometry as a, 'POLYGON((240 80,140 120,180 240,280 200,240 80))'::geometry as b) as f; +SELECT '76', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((140 160,20 20,270 20,150 160,230 40,60 40,140 160))'::geometry as a, 'POLYGON((140 40,180 80,120 100,140 40))'::geometry as b) as f; +SELECT '77', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((140 160,20 20,270 20,150 160,230 40,60 40,140 160))'::geometry as a, 'POLYGON((120 100,180 80,130 40,120 100))'::geometry as b) as f; +SELECT '78', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((20 20,180 20,140 140,20 140,20 20))'::geometry as a, 'POLYGON((180 100,80 200,180 280,260 200,180 100))'::geometry as b) as f; +SELECT '79', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((140 120,160 20,20 20,20 120,140 120))'::geometry as a, 'POLYGON((140 140,20 120,0 220,120 240,140 140))'::geometry as b) as f; +SELECT '80', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((160 200,210 70,120 70,160 200))'::geometry as a, 'POLYGON((160 200,260 40,70 40,160 200,20 20,310 20,160 200))'::geometry as b) as f; +SELECT '81', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((110 140,200 70,200 160,110 140))'::geometry as a, 'POLYGON((110 140,110 50,60 50,60 90,160 190,20 110,20 20,200 20,110 140))'::geometry as b) as f; +SELECT '82', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((20 120,20 20,260 20,260 120,200 40,140 120,80 40,20 120))'::geometry as a, 'POLYGON((20 120,20 240,260 240,260 120,200 200,140 120,80 200,20 120))'::geometry as b) as f; +SELECT '83', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((20 120,20 20,260 20,260 120,180 40,140 120,100 40,20 120))'::geometry as a, 'POLYGON((20 120,300 120,140 240,20 120))'::geometry as b) as f; +SELECT '84', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((20 20,20 300,280 300,280 260,220 260,60 100,60 60,280 60,280 20,20 20))'::geometry as a, 'POLYGON((100 140,160 80,280 180,200 240,220 160,160 200,180 120,100 140))'::geometry as b) as f; +SELECT '85', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((20 20,20 300,280 300,280 260,220 260,60 100,60 60,280 60,280 20,20 20))'::geometry as a, 'POLYGON((260 200,180 80,120 160,200 160,180 220,260 200))'::geometry as b) as f; +SELECT '86', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((20 20,280 20,280 140,220 60,140 140,80 60,20 140,20 20))'::geometry as a, 'POLYGON((0 140,300 140,140 240,0 140))'::geometry as b) as f; +SELECT '87', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((20 20,280 20,280 140,220 60,140 140,80 60,20 140,20 20))'::geometry as a, 'POLYGON((20 240,20 140,320 140,180 240,20 240))'::geometry as b) as f; +SELECT '88', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((20 20,280 20,280 140,220 60,140 140,80 60,20 140,20 20))'::geometry as a, 'POLYGON((20 240,20 140,80 180,140 140,220 180,280 140,280 240,20 240))'::geometry as b) as f; +SELECT '89', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((120 120,180 60,20 20,20 120,120 120))'::geometry as a, 'POLYGON((120 120,220 20,280 20,240 160,120 120))'::geometry as b) as f; +SELECT '90', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((140 120,160 20,20 20,20 120,140 120))'::geometry as a, 'POLYGON((140 120,160 20,260 120,220 200,140 120))'::geometry as b) as f; +SELECT '91', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((20 140,120 40,20 40,20 140))'::geometry as a, 'POLYGON((190 140,190 20,140 20,20 140,190 140))'::geometry as b) as f; +SELECT '92', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((120 120,180 60,20 20,20 120,120 120))'::geometry as a, 'POLYGON((300 20,220 20,120 120,260 160,300 20))'::geometry as b) as f; +SELECT '93', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((140 120,160 20,20 20,20 120,140 120))'::geometry as a, 'POLYGON((140 120,240 160,280 60,160 20,140 120))'::geometry as b) as f; +SELECT '94', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((120 120,180 60,20 20,20 120,120 120))'::geometry as a, 'POLYGON((280 60,180 60,120 120,260 180,280 60))'::geometry as b) as f; +SELECT '95', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((140 120,160 20,20 20,20 120,140 120))'::geometry as a, 'POLYGON((120 200,120 120,40 120,40 200,120 200))'::geometry as b) as f; +SELECT '96', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((140 120,160 20,20 20,20 120,140 120))'::geometry as a, 'POLYGON((160 220,140 120,60 120,40 220,160 220))'::geometry as b) as f; +SELECT '97', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((140 120,160 20,20 20,20 120,140 120))'::geometry as a, 'POLYGON((140 120,20 120,20 220,140 220,140 120))'::geometry as b) as f; +SELECT '98', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((120 120,180 60,20 20,20 120,120 120))'::geometry as a, 'POLYGON((320 20,220 20,80 160,240 140,320 20))'::geometry as b) as f; +SELECT '99', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((20 20,20 180,220 180,220 20,20 20))'::geometry as a, 'POLYGON((60 40,60 140,180 140,180 40,60 40))'::geometry as b) as f; +SELECT '100', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((20 20,20 180,220 180,220 20,20 20))'::geometry as a, 'POLYGON((20 20,80 140,160 60,20 20))'::geometry as b) as f; +SELECT '101', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((20 20,20 180,220 180,220 20,20 20))'::geometry as a, 'POLYGON((160 60,20 20,100 140,160 60))'::geometry as b) as f; +SELECT '102', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((20 20,20 180,220 180,220 20,20 20))'::geometry as a, 'POLYGON((20 100,140 160,160 40,20 100))'::geometry as b) as f; +SELECT '103', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((20 20,20 180,220 180,220 20,20 20))'::geometry as a, 'POLYGON((160 40,20 100,160 160,160 40))'::geometry as b) as f; +SELECT '104', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((20 20,20 180,220 180,220 20,20 20))'::geometry as a, 'POLYGON((20 180,180 120,80 40,20 180))'::geometry as b) as f; +SELECT '105', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((20 20,20 180,220 180,220 20,20 20))'::geometry as a, 'POLYGON((180 120,100 40,20 180,180 120))'::geometry as b) as f; +SELECT '106', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((20 20,20 180,220 180,220 20,20 20))'::geometry as a, 'POLYGON((20 20,140 40,140 120,20 160,80 80,20 20))'::geometry as b) as f; +SELECT '107', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((20 20,20 180,220 180,220 20,20 20))'::geometry as a, 'POLYGON((20 20,140 40,140 140,20 180,80 100,20 20))'::geometry as b) as f; +SELECT '108', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((20 20,20 180,220 180,220 20,20 20))'::geometry as a, 'POLYGON((40 180,60 100,180 100,200 180,120 120,40 180))'::geometry as b) as f; +SELECT '109', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((20 20,20 180,220 180,220 20,20 20))'::geometry as a, 'POLYGON((20 180,60 80,180 80,220 180,120 120,20 180))'::geometry as b) as f; +SELECT '110', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((20 20,20 180,220 180,220 20,20 20))'::geometry as a, 'POLYGON((40 60,20 180,100 100,140 180,160 120,220 100,140 40,40 60))'::geometry as b) as f; +SELECT '111', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((20 20,20 180,220 180,220 20,20 20))'::geometry as a, 'POLYGON((60 100,180 100,220 180,120 140,20 180,60 100))'::geometry as b) as f; +SELECT '112', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((20 20,20 180,220 180,220 20,20 20))'::geometry as a, 'POLYGON((20 20,20 140,120 120,120 40,20 20))'::geometry as b) as f; +SELECT '113', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((20 20,20 180,220 180,220 20,20 20))'::geometry as a, 'POLYGON((20 20,20 180,140 140,140 60,20 20))'::geometry as b) as f; +SELECT '114', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((20 20,20 180,220 180,220 20,20 20))'::geometry as a, 'POLYGON((20 20,120 40,120 120,20 140,20 20))'::geometry as b) as f; +SELECT '115', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((20 20,20 180,220 180,220 20,20 20))'::geometry as a, 'POLYGON((120 40,20 20,20 140,120 120,120 40))'::geometry as b) as f; +SELECT '116', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((20 20,20 180,220 180,220 20,20 20))'::geometry as a, 'POLYGON((20 20,140 60,140 140,20 180,20 20))'::geometry as b) as f; +SELECT '117', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((20 20,20 180,220 180,220 20,20 20))'::geometry as a, 'POLYGON((140 60,20 20,20 180,140 140,140 60))'::geometry as b) as f; +SELECT '118', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((20 20,20 180,220 180,220 20,20 20))'::geometry as a, 'POLYGON((20 20,60 120,140 120,180 20,20 20))'::geometry as b) as f; +SELECT '119', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((20 20,20 180,220 180,220 20,20 20))'::geometry as a, 'POLYGON((20 40,120 40,120 120,20 140,20 40))'::geometry as b) as f; +SELECT '120', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((20 20,20 180,220 180,220 20,20 20))'::geometry as a, 'POLYGON((20 20,20 180,60 120,100 180,140 120,220 180,200 120,140 60,20 20))'::geometry as b) as f; +SELECT '121', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((150 150,330 150,250 70,70 70,150 150))'::geometry as a, 'POLYGON((150 150,270 150,140 20,20 20,150 150))'::geometry as b) as f; +SELECT '122', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((150 150,270 150,330 150,250 70,190 70,70 70,150 150))'::geometry as a, 'POLYGON((150 150,270 150,190 70,140 20,20 20,70 70,150 150))'::geometry as b) as f; +SELECT '123', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((20 20,60 50,20 40,60 70,20 60,60 90,20 90,70 110,20 130,80 130,20 150,80 160,20 170,80 180,20 200,80 200,30 240,80 220,50 260,100 220,100 260,120 220,130 260,140 220,150 280,150 190,160 280,170 190,180 280,190 190,200 280,210 190,220 280,230 190,240 260,250 230,260 260,260 220,290 270,290 220,330 260,300 210,340 240,290 180,340 210,290 170,350 170,240 150,350 150,240 140,350 130,240 120,350 120,240 110,350 110,240 100,350 100,240 90,350 90,240 80,350 80,300 70,340 60,290 60,340 40,300 50,340 20,270 60,310 20,250 60,270 20,230 60,240 20,210 60,210 20,190 70,190 20,180 90,170 20,160 90,150 20,140 90,130 20,120 90,110 20,100 90,100 20,90 60,80 20,70 40,20 20))'::geometry as a, 'POLYGON((190 140,140 130,200 160,130 150,210 170,130 170,210 180,120 190,220 200,120 200,250 210,120 210,250 220,120 220,250 230,120 240,230 240,120 250,240 260,120 260,240 270,120 270,270 290,120 290,230 300,150 310,250 310,180 320,250 320,200 360,260 330,240 360,280 320,290 370,290 320,320 360,310 320,360 360,310 310,380 340,310 290,390 330,310 280,410 310,310 270,420 280,310 260,430 250,300 250,440 240,300 240,450 230,280 220,440 220,280 210,440 210,300 200,430 190,300 190,440 180,330 180,430 150,320 180,420 130,300 180,410 120,280 180,400 110,280 170,390 90,280 160,400 70,270 160,450 30,260 160,420 30,250 160,390 30,240 160,370 30,230 160,360 30,230 150,330 50,240 130,330 30,230 130,310 30,220 130,280 30,230 100,270 40,220 110,250 30,210 130,240 30,210 100,220 40,200 90,200 20,190 100,180 30,20 20,180 40,20 30,180 50,20 50,180 60,30 60,180 70,20 70,170 80,80 80,170 90,20 80,180 100,40 100,200 110,60 110,200 120,120 120,190 140))'::geometry as b) as f; +SELECT '124', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((70 150,20 160,110 160,20 180,100 200,20 200,190 210,20 210,160 220,20 220,150 230,60 240,180 250,20 260,170 260,60 270,160 270,100 310,170 280,200 260,180 230,210 260,130 330,230 250,210 290,240 250,230 210,260 300,250 230,270 300,270 240,300 340,280 250,320 330,290 250,340 350,290 240,350 360,270 190,350 340,290 200,350 330,300 190,360 320,310 190,360 300,320 200,360 280,330 200,360 260,340 200,370 260,340 180,390 290,340 170,400 260,350 170,400 250,350 160,410 240,350 150,400 170,350 140,310 170,340 140,270 180,330 140,260 170,310 140,240 170,290 140,200 190,270 140,180 190,260 140,170 190,260 130,170 180,250 130,170 170,240 120,170 160,210 120,170 150,210 110,340 130,230 110,420 140,220 100,410 130,220 90,400 120,220 80,390 110,220 70,420 110,240 70,420 100,260 70,420 90,280 70,430 80,230 60,430 60,270 50,450 40,210 50,370 40,260 40,460 30,160 40,210 60,200 110,190 60,190 120,170 50,180 130,150 30,170 130,140 20,160 120,130 20,160 150,120 20,160 170,110 20,160 190,100 20,150 190,90 20,140 180,80 20,120 140,70 20,120 150,60 20,110 150,50 20,100 140,50 30,90 130,40 30,80 120,30 30,80 130,30 40,80 140,20 40,70 140,40 90,60 130,20 90,60 140,20 130,70 150))'::geometry as a, 'POLYGON((190 140,140 130,200 160,130 150,210 170,130 170,210 180,120 190,220 200,120 200,250 210,120 210,250 220,120 220,250 230,120 240,230 240,120 250,240 260,120 260,240 270,120 270,270 290,120 290,230 300,150 310,250 310,180 320,250 320,200 360,260 330,240 360,280 320,290 370,290 320,320 360,310 320,360 360,310 310,380 340,310 290,390 330,310 280,410 310,310 270,420 280,310 260,430 250,300 250,440 240,300 240,450 230,280 220,440 220,280 210,440 210,300 200,430 190,300 190,440 180,330 180,430 150,320 180,420 130,300 180,410 120,280 180,400 110,280 170,390 90,280 160,400 70,270 160,450 30,260 160,420 30,250 160,390 30,240 160,370 30,230 160,360 30,230 150,330 50,240 130,330 30,230 130,310 30,220 130,280 30,230 100,270 40,220 110,250 30,210 130,240 30,210 100,220 40,200 90,200 20,190 100,180 30,20 20,180 40,20 30,180 50,20 50,180 60,30 60,180 70,20 70,170 80,80 80,170 90,20 80,180 100,40 100,200 110,60 110,200 120,120 120,190 140))'::geometry as b) as f; +SELECT '125', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((60 160,220 160,220 20,60 20,60 160))'::geometry as a, 'POLYGON((60 160,20 200,260 200,220 160,140 80,60 160))'::geometry as b) as f; +SELECT '126', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((60 160,220 160,220 20,60 20,60 160))'::geometry as a, 'POLYGON((60 160,20 200,260 200,140 80,60 160))'::geometry as b) as f; +SELECT '127', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((60 160,220 160,220 20,60 20,60 160))'::geometry as a, 'POLYGON((20 200,140 80,260 200,20 200))'::geometry as b) as f; +SELECT '128', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((60 160,220 160,220 20,60 20,60 160))'::geometry as a, 'POLYGON((20 200,60 160,140 80,220 160,260 200,20 200))'::geometry as b) as f; +SELECT '129', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((60 160,220 160,220 20,60 20,60 160))'::geometry as a, 'POLYGON((20 200,60 160,140 80,260 200,20 200))'::geometry as b) as f; +SELECT '130', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((0 0,0 200,200 200,200 0,0 0))'::geometry as a, 'POLYGON((100 100,1000000 110,10000000 100,100 100))'::geometry as b) as f; +SELECT '131', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((100 0,100 200,200 200,200 0,100 0))'::geometry as a, 'POLYGON((100 100,1000000 110,10000000 100,100 100))'::geometry as b) as f; +SELECT '132', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((120 0,120 200,200 200,200 0,120 0))'::geometry as a, 'POLYGON((100 100,1000000 110,10000000 100,100 100))'::geometry as b) as f; +SELECT '133', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((0 0,0 200,110 200,110 0,0 0))'::geometry as a, 'POLYGON((100 100,1000000 110,10000000 100,100 100))'::geometry as b) as f; +SELECT '134', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((100 100,100 200,200 200,200 100,100 100))'::geometry as a, 'POLYGON((100 100,2100 110,2100 100,100 100))'::geometry as b) as f; +SELECT '135', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((100 100,100 200,200 200,200 100,100 100))'::geometry as a, 'POLYGON((100 100,2101 110,2101 100,100 100))'::geometry as b) as f; +SELECT '136', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((100 100,200 200,200 100,100 100))'::geometry as a, 'POLYGON((100 100,2101 110,2101 100,100 100))'::geometry as b) as f; +SELECT '137', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((100 100,100 200,200 200,200 100,100 100))'::geometry as a, 'POLYGON((100 100,1000000 110,1000000 100,100 100))'::geometry as b) as f; +SELECT '138', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((120 100,120 200,200 200,200 100,120 100))'::geometry as a, 'POLYGON((100 100,500 110,500 100,100 100))'::geometry as b) as f; +SELECT '139', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((120 100,120 200,200 200,200 100,120 100))'::geometry as a, 'POLYGON((100 100,501 110,501 100,100 100))'::geometry as b) as f; +SELECT '140', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((120 100,130 200,200 200,200 100,120 100))'::geometry as a, 'POLYGON((100 100,501 110,501 100,100 100))'::geometry as b) as f; +SELECT '141', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((120 100,17 200,200 200,200 100,120 100))'::geometry as a, 'POLYGON((100 100,501 110,501 100,100 100))'::geometry as b) as f; +SELECT '142', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((120 100,120 200,200 200,200 100,120 100))'::geometry as a, 'POLYGON((100 100,1000000 110,1000000 100,100 100))'::geometry as b) as f; +SELECT '143', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((101 99,101 1000000,102 1000000,101 99))'::geometry as a, 'POLYGON((100 100,1000000 110,1000000 100,100 100))'::geometry as b) as f; +SELECT '144', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((100 100,200 101,200 100,100 100))'::geometry as a, 'POLYGON((100 100,2101 110,2101 100,100 100))'::geometry as b) as f; +SELECT '145', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((16 319,150 39,25 302,160 20,265 20,127 317,16 319))'::geometry as a, 'POLYGON((10 307,22 307,153 34,22 34,10 307))'::geometry as b) as f; +SELECT '146', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((160 200,210 70,120 70,160 200))'::geometry as a, 'POLYGON((160 200,310 20,20 20,160 200),(160 200,260 40,70 40,160 200))'::geometry as b) as f; +SELECT '147', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((170 120,240 100,260 50,190 70,170 120))'::geometry as a, 'POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))'::geometry as b) as f; +SELECT '148', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((270 90,200 50,150 80,210 120,270 90))'::geometry as a, 'POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))'::geometry as b) as f; +SELECT '149', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((170 120,260 100,240 60,150 80,170 120))'::geometry as a, 'POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))'::geometry as b) as f; +SELECT '150', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((220 120,270 80,200 60,160 100,220 120))'::geometry as a, 'POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))'::geometry as b) as f; +SELECT '151', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((260 50,180 70,180 110,260 90,260 50))'::geometry as a, 'POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))'::geometry as b) as f; +SELECT '152', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((230 110,290 80,190 60,140 90,230 110))'::geometry as a, 'POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))'::geometry as b) as f; +SELECT '153', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((170 120,330 120,260 50,100 50,170 120))'::geometry as a, 'POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))'::geometry as b) as f; +SELECT '154', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((170 120,330 120,280 70,120 70,170 120))'::geometry as a, 'POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))'::geometry as b) as f; +SELECT '155', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((170 120,300 120,250 70,120 70,170 120))'::geometry as a, 'POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))'::geometry as b) as f; +SELECT '156', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((190 100,310 100,260 50,140 50,190 100))'::geometry as a, 'POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))'::geometry as b) as f; +SELECT '157', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((280 130,360 130,270 40,190 40,280 130))'::geometry as a, 'POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,250 120,180 50,100 50,170 120))'::geometry as b) as f; +SELECT '158', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((220 80,180 40,80 40,170 130,270 130,230 90,300 90,250 30,280 30,390 140,150 140,40 30,230 30,280 80,220 80))'::geometry as a, 'POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,250 120,180 50,100 50,170 120))'::geometry as b) as f; +SELECT '159', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((260 130,360 130,280 40,170 40,260 130))'::geometry as a, 'POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,250 120,180 50,100 50,170 120))'::geometry as b) as f; +SELECT '160', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((240 110,340 110,290 60,190 60,240 110))'::geometry as a, 'POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,250 120,180 50,100 50,170 120))'::geometry as b) as f; +SELECT '161', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((250 120,350 120,280 50,180 50,250 120))'::geometry as a, 'POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,250 120,180 50,100 50,170 120))'::geometry as b) as f; +SELECT '162', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((230 210,230 20,20 20,20 210,230 210),(120 180,50 50,200 50,120 180))'::geometry as a, 'POLYGON((230 210,230 20,20 20,20 210,230 210),(120 180,50 50,200 50,120 180))'::geometry as b) as f; +SELECT '163', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((230 210,230 20,20 20,20 210,230 210),(140 40,40 40,40 170,140 40),(110 190,210 190,210 50,110 190))'::geometry as a, 'POLYGON((230 210,230 20,20 20,20 210,230 210),(140 40,40 40,40 170,140 40),(110 190,210 190,210 50,110 190))'::geometry as b) as f; +SELECT '164', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((280 190,330 150,200 110,150 150,280 190))'::geometry as a, 'MULTIPOLYGON(((140 110,260 110,170 20,50 20,140 110)),((300 270,420 270,340 190,220 190,300 270)))'::geometry as b) as f; +SELECT '165', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((80 190,220 190,140 110,0 110,80 190))'::geometry as a, 'MULTIPOLYGON(((140 110,260 110,170 20,50 20,140 110)),((300 270,420 270,340 190,220 190,300 270)))'::geometry as b) as f; +SELECT '166', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((330 150,200 110,150 150,280 190,330 150))'::geometry as a, 'MULTIPOLYGON(((140 110,260 110,170 20,50 20,140 110)),((300 270,420 270,340 190,220 190,300 270)))'::geometry as b) as f; +SELECT '167', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((290 190,340 150,220 120,170 170,290 190))'::geometry as a, 'MULTIPOLYGON(((140 110,260 110,170 20,50 20,140 110)),((300 270,420 270,340 190,220 190,300 270)))'::geometry as b) as f; +SELECT '168', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((220 190,340 190,260 110,140 110,220 190))'::geometry as a, 'MULTIPOLYGON(((140 110,260 110,170 20,50 20,140 110)),((300 270,420 270,340 190,220 190,300 270)))'::geometry as b) as f; +SELECT '169', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((140 190,220 190,100 70,20 70,140 190))'::geometry as a, 'MULTIPOLYGON(((140 110,260 110,170 20,50 20,140 110)),((300 270,420 270,340 190,220 190,300 270)))'::geometry as b) as f; +SELECT '170', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((140 220,60 140,140 60,220 140,140 220))'::geometry as a, 'MULTIPOLYGON(((100 20,180 20,180 100,100 100,100 20)),((20 100,100 100,100 180,20 180,20 100)),((100 180,180 180,180 260,100 260,100 180)),((180 100,260 100,260 180,180 180,180 100)))'::geometry as b) as f; +SELECT '171', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOLYGON(((110 110,70 200,150 200,110 110)),((110 110,150 20,70 20,110 110)))'::geometry as a, 'MULTIPOLYGON(((110 110,160 160,210 110,160 60,110 110)),((110 110,60 60,10 110,60 160,110 110)))'::geometry as b) as f; +SELECT '172', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOLYGON(((110 110,70 200,150 200,110 110),(110 110,100 180,120 180,110 110)),((110 110,150 20,70 20,110 110),(110 110,120 40,100 40,110 110)))'::geometry as a, 'MULTIPOLYGON(((110 110,160 160,210 110,160 60,110 110),(110 110,160 130,160 90,110 110)),((110 110,60 60,10 110,60 160,110 110),(110 110,60 90,60 130,110 110)))'::geometry as b) as f; +SELECT '173', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOLYGON(((110 110,70 200,200 200,110 110),(110 110,100 180,120 180,110 110)),((110 110,200 20,70 20,110 110),(110 110,120 40,100 40,110 110)))'::geometry as a, 'MULTIPOLYGON(((110 110,160 160,210 110,160 60,110 110),(110 110,160 130,160 90,110 110)),((110 110,60 60,10 110,60 160,110 110),(110 110,60 90,60 130,110 110)))'::geometry as b) as f; +SELECT '174', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOLYGON(((110 110,20 200,200 200,110 110),(110 110,100 180,120 180,110 110)),((110 110,200 20,20 20,110 110),(110 110,120 40,100 40,110 110)))'::geometry as a, 'MULTIPOLYGON(((110 110,160 160,210 110,160 60,110 110),(110 110,160 130,160 90,110 110)),((110 110,60 60,10 110,60 160,110 110),(110 110,60 90,60 130,110 110)))'::geometry as b) as f; +SELECT '175', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOLYGON(((110 110,70 200,200 200,110 110),(110 110,100 180,120 180,110 110)),((110 110,200 20,70 20,110 110),(110 110,120 40,100 40,110 110)))'::geometry as a, 'MULTIPOLYGON(((110 110,160 160,210 110,160 60,110 110),(110 110,160 130,160 90,110 110)),((110 110,60 60,10 110,60 160,110 110),(110 110,60 90,60 130,110 110)))'::geometry as b) as f; +SELECT '176', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOLYGON(((110 110,70 200,200 200,110 110),(110 110,100 180,120 180,110 110)),((110 110,200 20,70 20,110 110),(110 110,120 40,100 40,110 110)))'::geometry as a, 'MULTIPOLYGON(((110 110,70 200,210 110,70 20,110 110),(110 110,110 140,150 110,110 80,110 110)),((110 110,60 60,10 110,60 160,110 110),(110 110,60 90,60 130,110 110)))'::geometry as b) as f; +SELECT '177', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POLYGON((100 60,140 100,100 140,60 100,100 60))'::geometry as a, 'MULTIPOLYGON(((80 40,120 40,120 80,80 80,80 40)),((120 80,160 80,160 120,120 120,120 80)),((80 120,120 120,120 160,80 160,80 120)),((40 80,80 80,80 120,40 120,40 80)))'::geometry as b) as f; +SELECT '178', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(150 150,40 230)'::geometry as a, 'POLYGON((150 150,410 150,280 20,20 20,150 150))'::geometry as b) as f; +SELECT '179', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 40,50 130,130 130)'::geometry as a, 'POLYGON((150 150,410 150,280 20,20 20,150 150))'::geometry as b) as f; +SELECT '180', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 230,150 150)'::geometry as a, 'POLYGON((150 150,410 150,280 20,20 20,150 150))'::geometry as b) as f; +SELECT '181', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(210 150,330 150)'::geometry as a, 'POLYGON((150 150,410 150,280 20,20 20,150 150))'::geometry as b) as f; +SELECT '182', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(200 150,310 150,360 220)'::geometry as a, 'POLYGON((150 150,410 150,280 20,20 20,150 150))'::geometry as b) as f; +SELECT '183', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(180 150,250 150,230 250,370 250,410 150)'::geometry as a, 'POLYGON((150 150,410 150,280 20,20 20,150 150))'::geometry as b) as f; +SELECT '184', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(210 210,220 150,320 150,370 210)'::geometry as a, 'POLYGON((150 150,410 150,280 20,20 20,150 150))'::geometry as b) as f; +SELECT '185', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(20 60,150 60)'::geometry as a, 'POLYGON((150 150,410 150,280 20,20 20,150 150))'::geometry as b) as f; +SELECT '186', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(60 90,310 180)'::geometry as a, 'POLYGON((150 150,410 150,280 20,20 20,150 150))'::geometry as b) as f; +SELECT '187', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(90 210,210 90)'::geometry as a, 'POLYGON((150 150,410 150,280 20,20 20,150 150))'::geometry as b) as f; +SELECT '188', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(290 10,130 170)'::geometry as a, 'POLYGON((150 150,410 150,280 20,20 20,150 150))'::geometry as b) as f; +SELECT '189', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(30 100,100 100,180 100)'::geometry as a, 'POLYGON((150 150,410 150,280 20,20 20,150 150))'::geometry as b) as f; +SELECT '190', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(20 100,100 100,360 100,410 100)'::geometry as a, 'POLYGON((150 150,410 150,280 20,20 20,150 150))'::geometry as b) as f; +SELECT '191', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(90 210,150 150,210 90)'::geometry as a, 'POLYGON((150 150,410 150,280 20,20 20,150 150))'::geometry as b) as f; +SELECT '192', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(180 90,280 120)'::geometry as a, 'POLYGON((150 150,410 150,280 20,20 20,150 150))'::geometry as b) as f; +SELECT '193', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(70 70,80 20)'::geometry as a, 'POLYGON((150 150,410 150,280 20,20 20,150 150))'::geometry as b) as f; +SELECT '194', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(130 20,150 60)'::geometry as a, 'POLYGON((150 150,410 150,280 20,20 20,150 150))'::geometry as b) as f; +SELECT '195', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(70 70,80 20,140 20,150 60)'::geometry as a, 'POLYGON((150 150,410 150,280 20,20 20,150 150))'::geometry as b) as f; +SELECT '196', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(170 50,170 20,240 20,260 60)'::geometry as a, 'POLYGON((150 150,410 150,280 20,20 20,150 150))'::geometry as b) as f; +SELECT '197', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(50 100,140 190,280 190)'::geometry as a, 'POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))'::geometry as b) as f; +SELECT '198', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(140 60,180 100,290 100)'::geometry as a, 'POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))'::geometry as b) as f; +SELECT '199', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(170 120,210 80,270 80)'::geometry as a, 'POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))'::geometry as b) as f; +SELECT '200', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(170 120,260 50)'::geometry as a, 'POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))'::geometry as b) as f; +SELECT '201', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(190 90,190 270)'::geometry as a, 'POLYGON((190 190,360 20,20 20,190 190),(190 190,280 50,100 50,190 190))'::geometry as b) as f; +SELECT '202', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(60 160,150 70)'::geometry as a, 'POLYGON((190 190,360 20,20 20,190 190),(110 110,250 100,140 30,110 110))'::geometry as b) as f; +SELECT '203', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(60 160,150 70)'::geometry as a, 'POLYGON((190 190,20 20,360 20,190 190),(250 100,110 110,140 30,250 100))'::geometry as b) as f; +SELECT '204', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(60 160,150 70)'::geometry as a, 'POLYGON((190 190,20 20,360 20,190 190),(250 100,110 110,140 30,250 100))'::geometry as b) as f; +SELECT '205', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(190 90,190 190,190 270)'::geometry as a, 'POLYGON((190 190,360 20,20 20,190 190),(190 190,280 50,100 50,190 190))'::geometry as b) as f; +SELECT '206', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(60 160,110 110,150 70)'::geometry as a, 'POLYGON((190 190,360 20,20 20,190 190),(110 110,250 100,140 30,110 110))'::geometry as b) as f; +SELECT '207', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(60 160,110 110,150 70)'::geometry as a, 'POLYGON((190 190,20 20,360 20,190 190),(250 100,110 110,140 30,250 100))'::geometry as b) as f; +SELECT '208', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(60 160,110 110,150 70)'::geometry as a, 'POLYGON((190 190,110 110,20 20,360 20,190 190),(250 100,110 110,140 30,250 100))'::geometry as b) as f; +SELECT '209', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(130 110,180 110,190 60)'::geometry as a, 'POLYGON((20 200,240 200,240 20,20 20,20 200),(130 110,60 180,60 40,130 110),(130 110,200 40,200 180,130 110))'::geometry as b) as f; +SELECT '210', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(80 110,180 110)'::geometry as a, 'POLYGON((20 200,240 200,240 20,20 20,20 200),(130 110,60 180,60 40,130 110),(130 110,200 40,200 180,130 110))'::geometry as b) as f; +SELECT '211', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(80 110,180 110)'::geometry as a, 'POLYGON((20 200,20 20,240 20,240 200,20 200),(60 180,130 110,60 40,60 180),(130 110,200 40,200 180,130 110))'::geometry as b) as f; +SELECT '212', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(80 110,170 110)'::geometry as a, 'POLYGON((20 200,20 20,240 20,240 200,20 200),(130 110,60 40,60 180,130 110),(130 180,130 40,200 110,130 180))'::geometry as b) as f; +SELECT '213', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(80 110,130 110,170 110)'::geometry as a, 'POLYGON((20 200,20 20,240 20,240 200,20 200),(130 110,60 40,60 180,130 110),(130 180,130 40,200 110,130 180))'::geometry as b) as f; +SELECT '214', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(80 110,130 110,180 110)'::geometry as a, 'POLYGON((20 200,240 200,240 20,20 20,20 200),(130 110,60 180,60 40,130 110),(130 110,200 40,200 180,130 110))'::geometry as b) as f; +SELECT '215', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(80 110,130 110,180 110)'::geometry as a, 'POLYGON((20 200,20 20,240 20,240 200,20 200),(60 180,130 110,60 40,60 180),(130 110,200 40,200 180,130 110))'::geometry as b) as f; +SELECT '216', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(80 110,130 110,170 110)'::geometry as a, 'POLYGON((20 200,20 20,240 20,240 200,20 200),(130 110,60 40,60 180,130 110),(130 180,130 40,200 110,130 180))'::geometry as b) as f; +SELECT '217', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(160 70,320 230)'::geometry as a, 'MULTIPOLYGON(((140 110,260 110,170 20,50 20,140 110)),((300 270,420 270,340 190,220 190,300 270)))'::geometry as b) as f; +SELECT '218', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(160 70,200 110,280 190,320 230)'::geometry as a, 'MULTIPOLYGON(((140 110,260 110,170 20,50 20,140 110)),((300 270,420 270,340 190,220 190,300 270)))'::geometry as b) as f; +SELECT '219', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(70 50,70 150)'::geometry as a, 'MULTIPOLYGON(((0 0,0 100,140 100,140 0,0 0)),((20 170,70 100,130 170,20 170)))'::geometry as b) as f; +SELECT '220', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(110 110,20 200,200 200,110 110)'::geometry as a, 'POLYGON((20 20,200 20,110 110,20 20))'::geometry as b) as f; +SELECT '221', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(150 70,160 110,200 60,150 70)'::geometry as a, 'POLYGON((20 20,200 20,110 110,20 20))'::geometry as b) as f; +SELECT '222', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(80 60,120 40,120 70,80 60)'::geometry as a, 'POLYGON((110 110,200 20,20 20,110 110),(110 90,50 30,170 30,110 90))'::geometry as b) as f; +SELECT '223', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(20 20,200 20,110 110,20 20)'::geometry as a, 'POLYGON((20 20,200 20,110 110,20 20))'::geometry as b) as f; +SELECT '224', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(110 90,170 30,50 30,110 90)'::geometry as a, 'POLYGON((110 110,200 20,20 20,110 110),(110 90,50 30,170 30,110 90))'::geometry as b) as f; +SELECT '225', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(110 110,170 50,170 110,110 110)'::geometry as a, 'POLYGON((110 110,200 20,20 20,110 110),(110 90,50 30,170 30,110 90))'::geometry as b) as f; +SELECT '226', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(110 90,70 50,130 50,110 90)'::geometry as a, 'POLYGON((110 110,200 20,20 20,110 110),(110 90,50 30,170 30,110 90))'::geometry as b) as f; +SELECT '227', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(110 60,20 150,200 150,110 60)'::geometry as a, 'POLYGON((20 20,200 20,110 110,20 20))'::geometry as b) as f; +SELECT '228', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(110 130,110 70,200 100,110 130)'::geometry as a, 'POLYGON((110 110,200 20,20 20,110 110),(110 90,50 30,170 30,110 90))'::geometry as b) as f; +SELECT '229', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(110 90,160 40,60 40,110 90)'::geometry as a, 'POLYGON((20 20,200 20,110 110,20 20))'::geometry as b) as f; +SELECT '230', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(110 100,40 30,180 30,110 100)'::geometry as a, 'POLYGON((110 110,200 20,20 20,110 110),(110 90,60 40,160 40,110 90))'::geometry as b) as f; +SELECT '231', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(110 110,180 30,40 30,110 110)'::geometry as a, 'POLYGON((110 110,200 20,20 20,110 110),(110 90,60 40,160 40,110 90))'::geometry as b) as f; +SELECT '232', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(110 90,180 30,40 30,110 90)'::geometry as a, 'POLYGON((110 110,200 20,20 20,110 110),(110 90,60 40,160 40,110 90))'::geometry as b) as f; +SELECT '233', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(110 90,50 30,180 30,110 90)'::geometry as a, 'POLYGON((110 110,200 20,20 20,110 110),(110 90,60 40,160 40,110 90))'::geometry as b) as f; +SELECT '234', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(110 110,200 200,200 110,110 200)'::geometry as a, 'POLYGON((110 110,200 20,20 20,110 110))'::geometry as b) as f; +SELECT '235', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(110 110,200 200,110 110,20 200,20 110,200 110)'::geometry as a, 'POLYGON((110 110,200 20,20 20,110 110))'::geometry as b) as f; +SELECT '236', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(110 110,20 110,200 110,50 110,110 170)'::geometry as a, 'POLYGON((110 110,200 20,20 20,110 110))'::geometry as b) as f; +SELECT '237', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(110 110,20 200,110 200,110 110,200 200)'::geometry as a, 'POLYGON((110 110,200 20,20 20,110 110))'::geometry as b) as f; +SELECT '238', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(110 110,170 50,20 200,20 110,200 110)'::geometry as a, 'POLYGON((110 110,200 20,20 20,110 110))'::geometry as b) as f; +SELECT '239', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(110 110,180 40,110 40,110 180)'::geometry as a, 'POLYGON((110 110,200 20,20 20,110 110))'::geometry as b) as f; +SELECT '240', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(110 60,50 30,170 30,90 70)'::geometry as a, 'POLYGON((110 110,200 20,20 20,110 110))'::geometry as b) as f; +SELECT '241', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(110 110,180 40,110 40,110 110,70 40)'::geometry as a, 'POLYGON((110 110,200 20,20 20,110 110))'::geometry as b) as f; +SELECT '242', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(230 70,170 120,190 60,140 60,170 120,270 90)'::geometry as a, 'POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))'::geometry as b) as f; +SELECT '243', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTILINESTRING((20 110,200 110),(200 200,110 110,20 210,110 110))'::geometry as a, 'POLYGON((110 110,200 20,20 20,110 110))'::geometry as b) as f; +SELECT '244', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTILINESTRING((20 110,200 110),(60 180,60 110,160 110,110 110))'::geometry as a, 'POLYGON((110 110,200 20,20 20,110 110))'::geometry as b) as f; +SELECT '245', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTILINESTRING((20 110,200 110),(200 200,110 110,20 200,110 200,110 110))'::geometry as a, 'POLYGON((110 110,200 20,20 20,110 110))'::geometry as b) as f; +SELECT '246', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTILINESTRING((20 110,200 110),(110 50,110 170,110 70,110 150,200 150))'::geometry as a, 'POLYGON((110 110,200 20,20 20,110 110))'::geometry as b) as f; +SELECT '247', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTILINESTRING((20 110,200 110),(50 110,170 110,110 170,110 50,110 170,110 50))'::geometry as a, 'POLYGON((110 110,200 20,20 20,110 110))'::geometry as b) as f; +SELECT '248', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTILINESTRING((20 110,200 110),(110 60,110 160,200 160))'::geometry as a, 'POLYGON((110 110,200 20,20 20,110 110))'::geometry as b) as f; +SELECT '249', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTILINESTRING((20 110,200 110),(110 60,110 160,200 160))'::geometry as a, 'POLYGON((110 110,200 20,20 20,110 110))'::geometry as b) as f; +SELECT '250', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTILINESTRING((110 100,40 30,180 30),(170 30,110 90,50 30))'::geometry as a, 'POLYGON((110 110,200 20,20 20,110 110))'::geometry as b) as f; +SELECT '251', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTILINESTRING((110 110,60 40,70 20,150 20,170 40),(180 30,40 30,110 80))'::geometry as a, 'POLYGON((110 110,200 20,20 20,110 110))'::geometry as b) as f; +SELECT '252', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTILINESTRING((20 110,200 110,200 160),(110 110,200 110,200 70,20 150))'::geometry as a, 'MULTIPOLYGON(((110 110,20 20,200 20,110 110)),((110 110,20 200,200 200,110 110)))'::geometry as b) as f; +SELECT '253', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTILINESTRING((20 160,70 110,150 110,200 160),(110 110,20 110,50 80,70 110,200 110))'::geometry as a, 'MULTIPOLYGON(((110 110,20 20,200 20,110 110)),((110 110,20 200,200 200,110 110)))'::geometry as b) as f; +SELECT '254', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTILINESTRING((20 110,200 110),(110 110,20 170,20 130,200 90))'::geometry as a, 'MULTIPOLYGON(((110 110,20 20,200 20,110 110)),((110 110,20 200,200 200,110 110)))'::geometry as b) as f; +SELECT '255', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(0 0,0 50,50 50,50 0,0 0)'::geometry as a, 'MULTILINESTRING((0 0,0 50),(0 50,50 50),(50 50,50 0),(50 0,0 0))'::geometry as b) as f; +SELECT '256', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 180,140 180)'::geometry as a, 'MULTIPOLYGON(((20 320,180 320,180 180,20 180,20 320)),((20 180,20 80,180 80,180 180,20 180)))'::geometry as b) as f; +SELECT '257', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 180,140 180)'::geometry as a, 'MULTIPOLYGON(((20 320,180 320,180 180,20 180,20 320)),((60 180,60 80,180 80,180 180,60 180)))'::geometry as b) as f; +SELECT '258', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(0 0,60 0,60 60,60 0,120 0)'::geometry as a, 'MULTILINESTRING((0 0,60 0),(60 0,120 0),(60 0,60 60))'::geometry as b) as f; +SELECT '259', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 40,120 120)'::geometry as a, 'LINESTRING(40 40,60 120)'::geometry as b) as f; +SELECT '260', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 40,120 120)'::geometry as a, 'LINESTRING(60 240,40 40)'::geometry as b) as f; +SELECT '261', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 40,180 180)'::geometry as a, 'LINESTRING(120 120,20 200)'::geometry as b) as f; +SELECT '262', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 40,120 120)'::geometry as a, 'LINESTRING(60 240,120 120)'::geometry as b) as f; +SELECT '263', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 40,180 180)'::geometry as a, 'LINESTRING(20 180,140 140)'::geometry as b) as f; +SELECT '264', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 40,120 120)'::geometry as a, 'LINESTRING(40 120,120 40)'::geometry as b) as f; +SELECT '265', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 40,100 100)'::geometry as a, 'LINESTRING(40 40,100 100)'::geometry as b) as f; +SELECT '266', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 40,100 100)'::geometry as a, 'LINESTRING(100 100,40 40)'::geometry as b) as f; +SELECT '267', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 40,120 120)'::geometry as a, 'LINESTRING(40 120,120 160)'::geometry as b) as f; +SELECT '268', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(20 20,180 180)'::geometry as a, 'LINESTRING(20 20,180 180)'::geometry as b) as f; +SELECT '269', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(20 20,180 180)'::geometry as a, 'LINESTRING(20 20,110 110)'::geometry as b) as f; +SELECT '270', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(20 20,180 180)'::geometry as a, 'LINESTRING(50 50,140 140)'::geometry as b) as f; +SELECT '271', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(180 180,40 40)'::geometry as a, 'LINESTRING(120 120,260 260)'::geometry as b) as f; +SELECT '272', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 40,180 180)'::geometry as a, 'LINESTRING(260 260,120 120)'::geometry as b) as f; +SELECT '273', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 40,180 180)'::geometry as a, 'LINESTRING(120 120,260 260)'::geometry as b) as f; +SELECT '274', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 40,100 100,200 120,80 240)'::geometry as a, 'LINESTRING(40 40,20 100,40 160,20 200)'::geometry as b) as f; +SELECT '275', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 40,100 100,200 120,80 240)'::geometry as a, 'LINESTRING(20 200,40 160,20 100,40 40)'::geometry as b) as f; +SELECT '276', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(80 240,200 120,100 100,40 40)'::geometry as a, 'LINESTRING(20 200,40 160,20 100,40 40)'::geometry as b) as f; +SELECT '277', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(60 60,60 230,140 230,250 160)'::geometry as a, 'LINESTRING(20 20,60 60,250 160,310 230)'::geometry as b) as f; +SELECT '278', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(60 60,60 230,140 230,250 160)'::geometry as a, 'LINESTRING(20 20,110 110,200 110,320 230)'::geometry as b) as f; +SELECT '279', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(60 110,60 250,360 210)'::geometry as a, 'LINESTRING(60 110,110 160,250 160,310 160,360 210)'::geometry as b) as f; +SELECT '280', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(60 110,60 250,360 210)'::geometry as a, 'LINESTRING(360 210,310 160,110 160,60 110)'::geometry as b) as f; +SELECT '281', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 40,100 100,200 120,80 240)'::geometry as a, 'LINESTRING(160 160,240 240)'::geometry as b) as f; +SELECT '282', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 40,100 100,200 120,80 240)'::geometry as a, 'LINESTRING(240 240,160 160)'::geometry as b) as f; +SELECT '283', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(60 60,60 230,140 230,250 160)'::geometry as a, 'LINESTRING(60 150,110 100,170 100,110 230)'::geometry as b) as f; +SELECT '284', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(60 60,60 230,140 230,250 160)'::geometry as a, 'LINESTRING(60 110,110 160,250 160,310 160,360 210)'::geometry as b) as f; +SELECT '285', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 40,100 100,200 120,80 240)'::geometry as a, 'LINESTRING(200 120,200 190,150 240,200 240)'::geometry as b) as f; +SELECT '286', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 40,100 100,200 120,80 240)'::geometry as a, 'LINESTRING(200 240,150 240,200 200,200 120)'::geometry as b) as f; +SELECT '287', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(60 60,60 230,140 230,250 160)'::geometry as a, 'LINESTRING(60 230,80 140,120 140,140 230)'::geometry as b) as f; +SELECT '288', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(60 110,200 110,250 160,300 210)'::geometry as a, 'LINESTRING(60 110,110 160,250 160,310 160,360 210)'::geometry as b) as f; +SELECT '289', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(60 110,200 110,250 160,300 210,360 210)'::geometry as a, 'LINESTRING(60 110,110 160,250 160,310 160,360 210)'::geometry as b) as f; +SELECT '290', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(60 110,220 110,250 160,280 110)'::geometry as a, 'LINESTRING(60 110,110 160,250 160,310 160,360 210)'::geometry as b) as f; +SELECT '291', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(60 110,150 110,200 160,250 110,360 110,360 210)'::geometry as a, 'LINESTRING(60 110,110 160,250 160,310 160,360 210)'::geometry as b) as f; +SELECT '292', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(130 160,160 110,220 110,250 160,250 210)'::geometry as a, 'LINESTRING(60 110,110 160,250 160,310 160,360 210)'::geometry as b) as f; +SELECT '293', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(130 160,160 110,190 110,230 210)'::geometry as a, 'LINESTRING(60 110,110 160,250 160,310 160,360 210)'::geometry as b) as f; +SELECT '294', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(130 160,160 110,200 110,230 160,260 210,360 210)'::geometry as a, 'LINESTRING(60 110,110 160,250 160,310 160,360 210)'::geometry as b) as f; +SELECT '295', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(130 160,160 110,200 110,230 160,260 210,360 210,380 210)'::geometry as a, 'LINESTRING(60 110,110 160,250 160,310 160,360 210)'::geometry as b) as f; +SELECT '296', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(130 160,160 110,200 110,230 160,260 210,380 210)'::geometry as a, 'LINESTRING(60 110,110 160,250 160,310 160,360 210)'::geometry as b) as f; +SELECT '297', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(110 160,160 110,200 110,250 160,250 210)'::geometry as a, 'LINESTRING(60 110,110 160,250 160,310 160,360 210)'::geometry as b) as f; +SELECT '298', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(110 160,180 110,250 160,320 110)'::geometry as a, 'LINESTRING(60 110,110 160,250 160,310 160,360 210)'::geometry as b) as f; +SELECT '299', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(140 160,180 80,220 160,250 80)'::geometry as a, 'LINESTRING(60 110,110 160,250 160,310 160,360 210)'::geometry as b) as f; +SELECT '300', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 40,100 100,200 120,130 190)'::geometry as a, 'LINESTRING(20 130,70 130,160 40)'::geometry as b) as f; +SELECT '301', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 40,100 100,200 120,130 190)'::geometry as a, 'LINESTRING(40 160,40 100,110 40,170 40)'::geometry as b) as f; +SELECT '302', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(130 110,180 160,230 110,280 160,330 110)'::geometry as a, 'LINESTRING(60 110,110 160,250 160,310 160,360 210)'::geometry as b) as f; +SELECT '303', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 40,100 100,200 120,130 190)'::geometry as a, 'LINESTRING(30 140,80 140,100 100,200 30)'::geometry as b) as f; +SELECT '304', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(110 110,110 160,180 110,250 160,250 110)'::geometry as a, 'LINESTRING(60 110,110 160,250 160,310 160,360 210)'::geometry as b) as f; +SELECT '305', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(20 20,80 80,160 80,240 80,300 140)'::geometry as a, 'LINESTRING(20 60,60 60,60 140,80 80,100 20,140 140,180 20,200 80,220 20,240 80,300 80,270 110,200 110)'::geometry as b) as f; +SELECT '306', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(20 20,230 20,20 30,170 30,20 40,230 40,20 50,230 60,60 60,230 70,20 70,180 80,60 80,230 90,20 90,230 100,30 100,210 110,20 110,80 120,20 130,170 130,90 120,230 130,170 140,230 140,80 150,160 140,20 140,70 150,20 150,230 160,80 160,230 170,20 160,180 170,20 170,230 180,20 180,40 190,230 190,20 200,230 200)'::geometry as a, 'LINESTRING(30 210,30 60,40 210,40 30,50 190,50 20,60 160,60 50,70 220,70 50,80 20,80 210,90 50,90 150,100 30,100 210,110 20,110 190,120 50,120 180,130 210,120 20,140 210,130 50,150 210,130 20,160 210,140 30,170 210,150 20,180 210,160 20,190 210,180 80,170 50,170 20,180 70,180 20,190 190,190 30,200 210,200 30,210 210,210 20,220 150,220 20)'::geometry as b) as f; +SELECT '307', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 40,100 100,200 120,80 240)'::geometry as a, 'LINESTRING(40 40,100 100,200 120,80 240)'::geometry as b) as f; +SELECT '308', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 40,100 100,200 120,80 240)'::geometry as a, 'LINESTRING(80 240,200 120,100 100,40 40)'::geometry as b) as f; +SELECT '309', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 40,100 100,200 120,80 240)'::geometry as a, 'LINESTRING(80 240,120 200,200 120,100 100,80 80,40 40)'::geometry as b) as f; +SELECT '310', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 40,100 100,200 120,80 240)'::geometry as a, 'LINESTRING(260 210,240 130,280 120,260 40)'::geometry as b) as f; +SELECT '311', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(100 20,20 20,20 160,210 160,210 20,110 20,50 120,120 150,200 150)'::geometry as a, 'LINESTRING(140 130,100 110,120 60,170 60)'::geometry as b) as f; +SELECT '312', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(60 110,110 160,250 160,310 160,360 210)'::geometry as a, 'LINESTRING(60 110,110 160,250 160,310 160,360 210)'::geometry as b) as f; +SELECT '313', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(60 110,110 160,310 160,360 210)'::geometry as a, 'LINESTRING(60 110,110 160,250 160,310 160,360 210)'::geometry as b) as f; +SELECT '314', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(60 110,110 160,250 160,310 160,360 210)'::geometry as a, 'LINESTRING(60 110,110 160,250 160)'::geometry as b) as f; +SELECT '315', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(60 110,110 160,250 160,310 160,360 210)'::geometry as a, 'LINESTRING(110 160,310 160,340 190)'::geometry as b) as f; +SELECT '316', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(60 110,110 160,250 160,310 160,360 210)'::geometry as a, 'LINESTRING(140 160,250 160,310 160,340 190)'::geometry as b) as f; +SELECT '317', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(60 110,110 160,250 160,310 160,360 210)'::geometry as a, 'LINESTRING(110 160,250 160,310 160)'::geometry as b) as f; +SELECT '318', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 40,100 100,200 120,80 240)'::geometry as a, 'LINESTRING(200 120,100 100,40 40,140 80,200 40)'::geometry as b) as f; +SELECT '319', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 40,100 100,200 120,80 240)'::geometry as a, 'LINESTRING(280 240,240 140,200 120,100 100,40 40)'::geometry as b) as f; +SELECT '320', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 40,100 100,200 120,80 240)'::geometry as a, 'LINESTRING(80 190,140 140,40 40)'::geometry as b) as f; +SELECT '321', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 40,100 100,200 120,80 240)'::geometry as a, 'LINESTRING(240 200,200 260,80 240,140 180)'::geometry as b) as f; +SELECT '322', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 40,100 100,200 120,80 240)'::geometry as a, 'LINESTRING(140 180,80 240,200 260,240 200)'::geometry as b) as f; +SELECT '323', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 40,100 100,200 120,80 240)'::geometry as a, 'LINESTRING(280 240,240 140,200 120,80 240)'::geometry as b) as f; +SELECT '324', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(20 20,80 80,160 80,240 80,300 140)'::geometry as a, 'LINESTRING(20 80,120 80,200 80,260 20)'::geometry as b) as f; +SELECT '325', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 40,100 100,200 120,80 240)'::geometry as a, 'LINESTRING(100 100,200 120,240 140,280 240)'::geometry as b) as f; +SELECT '326', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 40,100 100,200 120,80 240)'::geometry as a, 'LINESTRING(280 240,240 140,200 120,100 100)'::geometry as b) as f; +SELECT '327', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(20 20,80 80,160 80,240 80,300 140)'::geometry as a, 'LINESTRING(80 20,80 80,240 80,300 20)'::geometry as b) as f; +SELECT '328', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(20 20,80 80,160 80,240 80,300 140)'::geometry as a, 'LINESTRING(20 80,80 80,120 80,140 140,160 80,200 80,220 20,240 80,270 110,300 80)'::geometry as b) as f; +SELECT '329', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(100 100,20 180,180 180)'::geometry as a, 'LINESTRING(100 100,180 20,20 20,100 100)'::geometry as b) as f; +SELECT '330', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(20 100,180 100,100 180)'::geometry as a, 'LINESTRING(100 100,180 20,20 20,100 100)'::geometry as b) as f; +SELECT '331', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(100 40,100 160,180 160)'::geometry as a, 'LINESTRING(100 100,180 20,20 20,100 100)'::geometry as b) as f; +SELECT '332', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(20 100,100 100,180 100,100 180)'::geometry as a, 'LINESTRING(100 100,180 20,20 20,100 100)'::geometry as b) as f; +SELECT '333', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(100 100,160 40)'::geometry as a, 'LINESTRING(100 100,180 20,20 20,100 100)'::geometry as b) as f; +SELECT '334', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(100 100,180 20)'::geometry as a, 'LINESTRING(100 100,180 20,20 20,100 100)'::geometry as b) as f; +SELECT '335', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(60 60,100 100,140 60)'::geometry as a, 'LINESTRING(100 100,180 20,20 20,100 100)'::geometry as b) as f; +SELECT '336', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(100 100,190 10,190 100)'::geometry as a, 'LINESTRING(100 100,180 20,20 20,100 100)'::geometry as b) as f; +SELECT '337', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(100 100,160 40,160 100)'::geometry as a, 'LINESTRING(100 100,180 20,20 20,100 100)'::geometry as b) as f; +SELECT '338', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(60 140,160 40,160 140)'::geometry as a, 'LINESTRING(100 100,180 20,20 20,100 100)'::geometry as b) as f; +SELECT '339', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(20 20,140 140)'::geometry as a, 'LINESTRING(80 80,20 80,140 80,80 20,80 140)'::geometry as b) as f; +SELECT '340', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(20 20,140 140)'::geometry as a, 'LINESTRING(80 80,20 80,140 80)'::geometry as b) as f; +SELECT '341', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(20 20,140 140)'::geometry as a, 'LINESTRING(80 80,140 80,80 20,80 140)'::geometry as b) as f; +SELECT '342', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(20 20,140 140)'::geometry as a, 'LINESTRING(80 80,20 80,140 80,80 20,80 80)'::geometry as b) as f; +SELECT '343', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(20 20,140 140)'::geometry as a, 'LINESTRING(80 80,20 80,140 80,80 80)'::geometry as b) as f; +SELECT '344', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(20 20,140 140)'::geometry as a, 'LINESTRING(80 80,20 80,20 140,140 20,80 20,80 80)'::geometry as b) as f; +SELECT '345', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(20 20,140 140)'::geometry as a, 'LINESTRING(20 140,140 20,100 20,100 80)'::geometry as b) as f; +SELECT '346', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(20 20,140 140)'::geometry as a, 'LINESTRING(140 80,20 80,120 80,80 20,80 140)'::geometry as b) as f; +SELECT '347', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(20 20,140 140)'::geometry as a, 'LINESTRING(140 80,20 80,140 80)'::geometry as b) as f; +SELECT '348', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(20 20,140 140)'::geometry as a, 'LINESTRING(140 80,20 80,80 140,80 20)'::geometry as b) as f; +SELECT '349', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(20 20,140 140)'::geometry as a, 'LINESTRING(140 80,80 80,20 80,50 140,50 60)'::geometry as b) as f; +SELECT '350', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(20 20,140 140)'::geometry as a, 'LINESTRING(140 80,20 80,120 80,80 20,80 80,80 140)'::geometry as b) as f; +SELECT '351', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(20 20,140 140)'::geometry as a, 'LINESTRING(140 80,20 80,80 80,140 80)'::geometry as b) as f; +SELECT '352', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(20 20,140 140)'::geometry as a, 'LINESTRING(140 80,20 80,80 140,80 80,80 20)'::geometry as b) as f; +SELECT '353', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(130 150,220 150,220 240)'::geometry as a, 'LINESTRING(130 240,130 150,220 20,50 20,130 150)'::geometry as b) as f; +SELECT '354', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(30 150,130 150,250 150)'::geometry as a, 'LINESTRING(130 240,130 150,220 20,50 20,130 150)'::geometry as b) as f; +SELECT '355', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(30 150,250 150)'::geometry as a, 'LINESTRING(130 240,130 150,220 20,50 20,130 150)'::geometry as b) as f; +SELECT '356', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(30 150,130 150,250 150)'::geometry as a, 'LINESTRING(130 240,130 20,30 20,130 150)'::geometry as b) as f; +SELECT '357', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(30 150,250 150)'::geometry as a, 'LINESTRING(120 240,120 20,20 20,120 170)'::geometry as b) as f; +SELECT '358', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(200 200,20 20,200 20,110 110,20 200,110 200,110 110)'::geometry as a, 'LINESTRING(110 110,200 110)'::geometry as b) as f; +SELECT '359', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(110 110,200 110)'::geometry as a, 'LINESTRING(200 200,20 20,200 20,110 110,20 200,110 200,110 110)'::geometry as b) as f; +SELECT '360', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(20 110,200 110)'::geometry as a, 'LINESTRING(200 200,20 20,200 20,110 110,20 200,110 200,110 110)'::geometry as b) as f; +SELECT '361', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(200 200,20 20,200 20,110 110,20 200,110 200,110 110)'::geometry as a, 'LINESTRING(20 110,200 110)'::geometry as b) as f; +SELECT '362', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(90 200,90 130,110 110,150 200)'::geometry as a, 'LINESTRING(200 200,20 20,200 20,20 200,20 130,90 130)'::geometry as b) as f; +SELECT '363', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(200 110,110 110,90 130,90 200)'::geometry as a, 'LINESTRING(200 200,20 20,200 20,20 200,20 130,90 130)'::geometry as b) as f; +SELECT '364', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(80 80,150 80,210 80)'::geometry as a, 'MULTILINESTRING((20 20,140 140),(20 140,140 20))'::geometry as b) as f; +SELECT '365', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 80,160 200,260 20,40 80)'::geometry as a, 'LINESTRING(40 80,160 200,260 20,40 80)'::geometry as b) as f; +SELECT '366', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 80,160 200,260 20,40 80)'::geometry as a, 'LINESTRING(40 80,260 20,160 200,40 80)'::geometry as b) as f; +SELECT '367', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 80,160 200,260 20,40 80)'::geometry as a, 'LINESTRING(260 20,40 80,160 200,260 20)'::geometry as b) as f; +SELECT '368', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 80,160 200,260 20,40 80)'::geometry as a, 'LINESTRING(100 140,160 200,260 20,40 80,100 140)'::geometry as b) as f; +SELECT '369', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(100 100,180 20,20 20,100 100)'::geometry as a, 'LINESTRING(100 100,180 180,20 180,100 100)'::geometry as b) as f; +SELECT '370', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 150,40 40,150 40,150 150,40 150)'::geometry as a, 'LINESTRING(40 150,150 40,170 20,170 190,40 150)'::geometry as b) as f; +SELECT '371', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(100 100,180 20,20 20,100 100)'::geometry as a, 'LINESTRING(180 100,20 100,100 180,180 100)'::geometry as b) as f; +SELECT '372', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(100 100,180 20,20 20,100 100)'::geometry as a, 'LINESTRING(180 180,100 100,20 180,180 180)'::geometry as b) as f; +SELECT '373', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(20 180,100 100,20 20,20 180)'::geometry as a, 'LINESTRING(100 20,100 180,180 100,100 20)'::geometry as b) as f; +SELECT '374', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 150,40 40,150 40,150 150,40 150)'::geometry as a, 'LINESTRING(170 20,20 170,170 170,170 20)'::geometry as b) as f; +SELECT '375', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 150,40 40,150 40,150 150,40 150)'::geometry as a, 'LINESTRING(40 150,150 150,90 210,40 150)'::geometry as b) as f; +SELECT '376', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 150,40 40,150 40,150 150,40 150)'::geometry as a, 'LINESTRING(20 150,170 150,90 230,20 150)'::geometry as b) as f; +SELECT '377', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(40 150,40 40,150 40,150 150,40 150)'::geometry as a, 'LINESTRING(40 150,150 150,150 40,20 40,20 150,40 150)'::geometry as b) as f; +SELECT '378', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(110 110,200 20,20 20,110 110)'::geometry as a, 'LINESTRING(110 110,200 200,110 110,20 200,20 110,200 110)'::geometry as b) as f; +SELECT '379', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(110 110,200 20,20 20,110 110)'::geometry as a, 'LINESTRING(110 110,20 110,200 110,50 110,110 170)'::geometry as b) as f; +SELECT '380', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(110 110,200 20,20 20,110 110)'::geometry as a, 'LINESTRING(110 110,20 200,110 200,110 110,200 200)'::geometry as b) as f; +SELECT '381', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(110 110,200 20,20 20,110 110)'::geometry as a, 'LINESTRING(200 20,20 200,200 200,110 110,110 40)'::geometry as b) as f; +SELECT '382', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(110 110,200 20,20 20,110 110)'::geometry as a, 'LINESTRING(200 20,20 200,200 200,20 20)'::geometry as b) as f; +SELECT '383', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(110 110,20 110,110 20,20 20,110 110)'::geometry as a, 'LINESTRING(110 110,200 200,110 200,200 110,110 110)'::geometry as b) as f; +SELECT '384', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(20 120,120 120,20 20,120 20,20 120)'::geometry as a, 'LINESTRING(170 100,70 100,170 170,70 170,170 100)'::geometry as b) as f; +SELECT '385', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(20 110,110 110,20 20,110 20,20 110)'::geometry as a, 'LINESTRING(110 160,70 110,60 160,20 130,110 160)'::geometry as b) as f; +SELECT '386', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(20 200,200 200,20 20,200 20,20 200)'::geometry as a, 'LINESTRING(20 110,200 110,200 160,20 60,20 110)'::geometry as b) as f; +SELECT '387', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(20 110,110 110,20 20,110 20,20 110)'::geometry as a, 'LINESTRING(200 200,110 110,200 110,110 200,200 200)'::geometry as b) as f; +SELECT '388', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'LINESTRING(20 120,120 120,20 20,120 20,20 120)'::geometry as a, 'LINESTRING(220 120,120 20,220 20,120 120,220 120)'::geometry as b) as f; +SELECT '389', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTILINESTRING((70 20,20 90,70 170),(70 170,120 90,70 20))'::geometry as a, 'MULTILINESTRING((70 20,20 90,70 170),(70 170,120 90,70 20))'::geometry as b) as f; +SELECT '390', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTILINESTRING((20 20,90 20,170 20),(90 20,90 80,90 140))'::geometry as a, 'MULTILINESTRING((20 20,90 20,170 20),(90 20,90 80,90 140))'::geometry as b) as f; +SELECT '391', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTILINESTRING((20 20,90 20,170 20),(90 20,90 80,90 140))'::geometry as a, 'MULTILINESTRING((90 140,90 60,90 20),(170 20,130 20,20 20))'::geometry as b) as f; +SELECT '392', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTILINESTRING((20 20,90 20,170 20),(90 20,90 80,90 140))'::geometry as a, 'MULTILINESTRING((90 20,170 100,170 140),(170 60,90 20,20 60),(130 100,130 60,90 20,50 90))'::geometry as b) as f; +SELECT '393', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTILINESTRING((20 20,90 20,170 20),(90 20,90 80,90 140))'::geometry as a, 'MULTILINESTRING((90 20,170 100,170 140),(130 140,130 60,90 20,20 90,90 20,130 60,170 60))'::geometry as b) as f; +SELECT '394', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTILINESTRING((20 20,90 20,170 20),(90 20,90 80,90 140))'::geometry as a, 'MULTILINESTRING((90 20,170 100,170 140),(170 60,90 20,20 60))'::geometry as b) as f; +SELECT '395', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTILINESTRING((20 20,90 20,170 20),(90 20,90 80,90 140))'::geometry as a, 'MULTILINESTRING((90 20,170 100,170 140),(170 60,90 20,20 60),(130 100,90 20))'::geometry as b) as f; +SELECT '396', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTILINESTRING((20 20,90 20,170 20),(90 20,90 80,90 140))'::geometry as a, 'MULTILINESTRING((90 20,170 100,170 140),(170 60,90 20,20 60),(120 100,170 100,90 20))'::geometry as b) as f; +SELECT '397', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTILINESTRING((20 20,90 20,170 20),(90 20,90 80,90 140))'::geometry as a, 'MULTILINESTRING((90 20,170 100,170 140),(170 60,90 20,20 60),(120 100,170 100,90 20))'::geometry as b) as f; +SELECT '398', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTILINESTRING((20 20,90 20,170 20),(90 20,90 80,90 140))'::geometry as a, 'MULTILINESTRING((90 20,170 100,170 140),(130 140,130 60,90 20,20 90,90 20))'::geometry as b) as f; +SELECT '399', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTILINESTRING((20 20,90 20,170 20),(90 20,90 80,90 140))'::geometry as a, 'MULTILINESTRING((90 20,170 100,170 140),(170 60,90 20,20 60,20 140,90 20))'::geometry as b) as f; +SELECT '400', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTILINESTRING((20 20,90 90,20 160),(90 160,90 20))'::geometry as a, 'MULTILINESTRING((160 160,90 90,160 20),(160 120,120 120,90 90,160 60))'::geometry as b) as f; +SELECT '401', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTILINESTRING((20 20,90 90,20 160),(90 160,90 20))'::geometry as a, 'MULTILINESTRING((160 160,90 90,160 20),(160 120,120 120,90 90,120 60,160 60))'::geometry as b) as f; +SELECT '402', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTILINESTRING((20 20,90 90,20 160),(90 160,90 20))'::geometry as a, 'MULTILINESTRING((160 160,90 90,160 20),(160 120,90 90,160 60))'::geometry as b) as f; +SELECT '403', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(20 20)'::geometry as a, 'POLYGON((60 120,60 40,160 40,160 120,60 120))'::geometry as b) as f; +SELECT '404', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(70 170)'::geometry as a, 'POLYGON((110 230,80 160,20 160,20 20,200 20,200 160,140 160,110 230))'::geometry as b) as f; +SELECT '405', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 130)'::geometry as a, 'POLYGON((20 160,80 160,110 100,140 160,200 160,200 20,20 20,20 160))'::geometry as b) as f; +SELECT '406', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(100 70)'::geometry as a, 'POLYGON((20 150,100 150,40 50,170 50,110 150,190 150,190 20,20 20,20 150))'::geometry as b) as f; +SELECT '407', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(100 70)'::geometry as a, 'POLYGON((20 150,100 150,40 50,160 50,100 150,180 150,180 20,20 20,20 150))'::geometry as b) as f; +SELECT '408', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(60 120)'::geometry as a, 'POLYGON((60 120,60 40,160 40,160 120,60 120))'::geometry as b) as f; +SELECT '409', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 120)'::geometry as a, 'POLYGON((60 120,60 40,160 40,160 120,60 120))'::geometry as b) as f; +SELECT '410', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(160 120)'::geometry as a, 'POLYGON((60 120,60 40,160 40,160 120,60 120))'::geometry as b) as f; +SELECT '411', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(100 150)'::geometry as a, 'POLYGON((20 150,100 150,40 50,160 50,100 150,180 150,180 20,20 20,20 150))'::geometry as b) as f; +SELECT '412', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(100 80)'::geometry as a, 'POLYGON((60 120,60 40,160 40,160 120,60 120))'::geometry as b) as f; +SELECT '413', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(60 160)'::geometry as a, 'POLYGON((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))'::geometry as b) as f; +SELECT '414', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(190 90)'::geometry as a, 'POLYGON((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))'::geometry as b) as f; +SELECT '415', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(190 190)'::geometry as a, 'POLYGON((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))'::geometry as b) as f; +SELECT '416', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(360 20)'::geometry as a, 'POLYGON((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))'::geometry as b) as f; +SELECT '417', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(130 130)'::geometry as a, 'POLYGON((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))'::geometry as b) as f; +SELECT '418', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(280 50)'::geometry as a, 'POLYGON((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))'::geometry as b) as f; +SELECT '419', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(150 100)'::geometry as a, 'POLYGON((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))'::geometry as b) as f; +SELECT '420', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(100 50)'::geometry as a, 'POLYGON((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))'::geometry as b) as f; +SELECT '421', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(140 120)'::geometry as a, 'POLYGON((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))'::geometry as b) as f; +SELECT '422', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(190 50)'::geometry as a, 'POLYGON((190 190,360 20,20 20,190 190),(90 50,150 110,190 50,90 50),(190 50,230 110,290 50,190 50))'::geometry as b) as f; +SELECT '423', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(180 90)'::geometry as a, 'POLYGON((190 190,360 20,20 20,190 190),(180 140,180 40,80 40,180 140),(180 90,210 140,310 40,230 40,180 90))'::geometry as b) as f; +SELECT '424', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(20 80,110 160,20 160)'::geometry as a, 'POLYGON((60 120,60 40,160 40,160 120,60 120))'::geometry as b) as f; +SELECT '425', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(20 80,60 120,20 160)'::geometry as a, 'POLYGON((60 120,60 40,160 40,160 120,60 120))'::geometry as b) as f; +SELECT '426', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(10 80,110 170,110 120)'::geometry as a, 'POLYGON((60 120,60 40,160 40,160 120,60 120))'::geometry as b) as f; +SELECT '427', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(10 80,110 170,160 120)'::geometry as a, 'POLYGON((60 120,60 40,160 40,160 120,60 120))'::geometry as b) as f; +SELECT '428', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(20 120,60 120,110 120,160 120,200 120)'::geometry as a, 'POLYGON((60 120,60 40,160 40,160 120,60 120))'::geometry as b) as f; +SELECT '429', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(60 120,110 120,160 120)'::geometry as a, 'POLYGON((60 120,60 40,160 40,160 120,60 120))'::geometry as b) as f; +SELECT '430', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(60 120,160 120,160 40,60 40)'::geometry as a, 'POLYGON((60 120,60 40,160 40,160 120,60 120))'::geometry as b) as f; +SELECT '431', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(20 150,60 120,110 80)'::geometry as a, 'POLYGON((60 120,60 40,160 40,160 120,60 120))'::geometry as b) as f; +SELECT '432', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(110 80,160 120,200 160)'::geometry as a, 'POLYGON((60 120,60 40,160 40,160 120,60 120))'::geometry as b) as f; +SELECT '433', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(110 80,110 120,110 160)'::geometry as a, 'POLYGON((60 120,60 40,160 40,160 120,60 120))'::geometry as b) as f; +SELECT '434', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(110 170,110 80)'::geometry as a, 'POLYGON((60 120,60 40,160 40,160 120,60 120))'::geometry as b) as f; +SELECT '435', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(60 120,160 120,110 80,110 170)'::geometry as a, 'POLYGON((60 120,60 40,160 40,160 120,60 120))'::geometry as b) as f; +SELECT '436', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(90 80,130 80)'::geometry as a, 'POLYGON((60 120,60 40,160 40,160 120,60 120))'::geometry as b) as f; +SELECT '437', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(60 120,160 120,110 80)'::geometry as a, 'POLYGON((60 120,60 40,160 40,160 120,60 120))'::geometry as b) as f; +SELECT '438', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(40 170,40 90,130 170)'::geometry as a, 'POLYGON((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))'::geometry as b) as f; +SELECT '439', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(90 170,280 170,190 90)'::geometry as a, 'POLYGON((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))'::geometry as b) as f; +SELECT '440', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(190 110,150 70,230 70)'::geometry as a, 'POLYGON((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))'::geometry as b) as f; +SELECT '441', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(100 100)'::geometry as a, 'MULTIPOLYGON(((20 100,20 20,100 20,100 100,20 100)),((100 180,100 100,180 100,180 180,100 180)))'::geometry as b) as f; +SELECT '442', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(20 100)'::geometry as a, 'MULTIPOLYGON(((20 100,20 20,100 20,100 100,20 100)),((100 180,100 100,180 100,180 180,100 180)))'::geometry as b) as f; +SELECT '443', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(60 100)'::geometry as a, 'MULTIPOLYGON(((20 100,20 20,100 20,100 100,20 100)),((100 180,100 100,180 100,180 180,100 180)))'::geometry as b) as f; +SELECT '444', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'MULTIPOLYGON(((110 110,20 200,200 200,110 110),(110 110,80 180,140 180,110 110)),((110 110,20 20,200 20,110 110),(110 110,80 40,140 40,110 110)))'::geometry as b) as f; +SELECT '445', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 200)'::geometry as a, 'LINESTRING(90 80,160 150,300 150,340 150,340 240)'::geometry as b) as f; +SELECT '446', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(90 80)'::geometry as a, 'LINESTRING(90 80,160 150,300 150,340 150,340 240)'::geometry as b) as f; +SELECT '447', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(340 240)'::geometry as a, 'LINESTRING(90 80,160 150,300 150,340 150,340 240)'::geometry as b) as f; +SELECT '448', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(230 150)'::geometry as a, 'LINESTRING(90 80,160 150,300 150,340 150,340 240)'::geometry as b) as f; +SELECT '449', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(160 150)'::geometry as a, 'LINESTRING(90 80,160 150,300 150,340 150,340 240)'::geometry as b) as f; +SELECT '450', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(90 150)'::geometry as a, 'LINESTRING(150 150,20 20,280 20,150 150)'::geometry as b) as f; +SELECT '451', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(150 80)'::geometry as a, 'LINESTRING(150 150,20 20,280 20,150 150)'::geometry as b) as f; +SELECT '452', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(150 150)'::geometry as a, 'LINESTRING(150 150,20 20,280 20,150 150)'::geometry as b) as f; +SELECT '453', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(100 20)'::geometry as a, 'LINESTRING(150 150,20 20,280 20,150 150)'::geometry as b) as f; +SELECT '454', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(20 20)'::geometry as a, 'LINESTRING(150 150,20 20,280 20,150 150)'::geometry as b) as f; +SELECT '455', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(220 220)'::geometry as a, 'LINESTRING(110 110,220 20,20 20,110 110,220 220)'::geometry as b) as f; +SELECT '456', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'LINESTRING(110 110,220 20,20 20,110 110,220 220)'::geometry as b) as f; +SELECT '457', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'LINESTRING(110 110,220 20,20 20,220 220)'::geometry as b) as f; +SELECT '458', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 20)'::geometry as a, 'LINESTRING(110 110,220 20,20 20,220 220)'::geometry as b) as f; +SELECT '459', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(220 20)'::geometry as a, 'LINESTRING(110 110,220 20,20 20,220 220)'::geometry as b) as f; +SELECT '460', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 20)'::geometry as a, 'LINESTRING(220 220,20 20,220 20,110 110)'::geometry as b) as f; +SELECT '461', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(20 20)'::geometry as a, 'LINESTRING(220 220,20 20,220 20,110 110)'::geometry as b) as f; +SELECT '462', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(20 110)'::geometry as a, 'LINESTRING(20 200,20 20,110 20,20 110,110 200)'::geometry as b) as f; +SELECT '463', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(20 200)'::geometry as a, 'LINESTRING(20 200,200 20,20 20,200 200)'::geometry as b) as f; +SELECT '464', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'LINESTRING(20 200,200 20,140 20,140 80,80 140,20 140)'::geometry as b) as f; +SELECT '465', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'LINESTRING(20 200,200 20,20 20,200 200)'::geometry as b) as f; +SELECT '466', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(80 140)'::geometry as a, 'LINESTRING(20 200,110 110,200 20,140 20,140 80,110 110,80 140,20 140)'::geometry as b) as f; +SELECT '467', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'LINESTRING(20 200,110 110,200 20,140 20,140 80,110 110,80 140,20 140)'::geometry as b) as f; +SELECT '468', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'LINESTRING(20 200,200 20,140 20,140 80,110 110,80 140,20 140)'::geometry as b) as f; +SELECT '469', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'LINESTRING(20 200,110 110,200 20,20 20,110 110,200 200)'::geometry as b) as f; +SELECT '470', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'LINESTRING(20 200,200 20,20 20,110 110,200 200)'::geometry as b) as f; +SELECT '471', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'LINESTRING(20 200,110 110,20 20,200 20,110 110,200 200)'::geometry as b) as f; +SELECT '472', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'LINESTRING(110 110,110 200,20 200,110 110,200 20,140 20,140 80,110 110,80 140,20 140)'::geometry as b) as f; +SELECT '473', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'LINESTRING(110 110,110 200,20 200,200 20,140 20,140 80,110 110,80 140,20 140)'::geometry as b) as f; +SELECT '474', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'LINESTRING(110 110,110 200,20 200,200 20,140 20,140 80,80 140,20 140)'::geometry as b) as f; +SELECT '475', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'LINESTRING(110 110,110 200,20 200,110 110,200 20,20 20,110 110,200 200)'::geometry as b) as f; +SELECT '476', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'LINESTRING(110 110,110 200,20 200,200 20,20 20,110 110,200 200)'::geometry as b) as f; +SELECT '477', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'LINESTRING(110 110,110 200,20 200,200 20,20 20,200 200)'::geometry as b) as f; +SELECT '478', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'LINESTRING(110 110,110 200,20 200,110 110,20 20,200 20,110 110,200 200)'::geometry as b) as f; +SELECT '479', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'LINESTRING(110 110,110 200,20 200,200 20,200 110,110 110,200 200)'::geometry as b) as f; +SELECT '480', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'LINESTRING(200 200,110 110,20 20,200 20,110 110,20 200,110 200,110 110)'::geometry as b) as f; +SELECT '481', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'LINESTRING(200 200,20 20,200 20,110 110,20 200,110 200,110 110)'::geometry as b) as f; +SELECT '482', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'LINESTRING(200 200,20 20,200 20,20 200,110 200,110 110)'::geometry as b) as f; +SELECT '483', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'LINESTRING(200 200,110 110,200 20,20 20,110 110,20 200,110 200,110 110)'::geometry as b) as f; +SELECT '484', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'LINESTRING(200 200,20 20,20 110,110 110,20 200,110 200,110 110)'::geometry as b) as f; +SELECT '485', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 160)'::geometry as a, 'LINESTRING(110 160,200 250,110 250,110 160,110 110,110 20,20 20,110 110)'::geometry as b) as f; +SELECT '486', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 160)'::geometry as a, 'LINESTRING(110 160,200 250,110 250,110 110,110 20,20 20,110 110)'::geometry as b) as f; +SELECT '487', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'LINESTRING(110 160,200 250,110 250,110 160,110 110,110 20,20 20,110 110)'::geometry as b) as f; +SELECT '488', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'LINESTRING(110 160,200 250,110 250,110 160,110 20,20 20,110 110)'::geometry as b) as f; +SELECT '489', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'LINESTRING(110 110,200 200,110 200,110 110,110 20,20 20,110 110)'::geometry as b) as f; +SELECT '490', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'LINESTRING(110 110,200 200,110 200,110 20,20 20,110 110)'::geometry as b) as f; +SELECT '491', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(140 200)'::geometry as a, 'LINESTRING(110 110,200 200,110 200,110 110,110 20,20 20,110 110)'::geometry as b) as f; +SELECT '492', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 200)'::geometry as a, 'LINESTRING(110 110,200 200,110 200,110 110,110 20,20 20,110 110)'::geometry as b) as f; +SELECT '493', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'LINESTRING(110 110,200 200,110 200,110 110,110 20,200 20,110 110)'::geometry as b) as f; +SELECT '494', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(140 200)'::geometry as a, 'LINESTRING(110 110,200 200,110 200,110 110,110 20,200 20,110 110)'::geometry as b) as f; +SELECT '495', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 200)'::geometry as a, 'LINESTRING(110 110,200 200,110 200,110 110,110 20,200 20,110 110)'::geometry as b) as f; +SELECT '496', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(90 130)'::geometry as a, 'LINESTRING(90 130,20 130,20 200,90 130,200 20,20 20,200 200)'::geometry as b) as f; +SELECT '497', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'LINESTRING(90 130,20 130,20 200,90 130,200 20,20 20,200 200)'::geometry as b) as f; +SELECT '498', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(90 130)'::geometry as a, 'LINESTRING(90 130,20 130,20 200,200 20,20 20,200 200)'::geometry as b) as f; +SELECT '499', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'LINESTRING(90 130,20 130,20 200,200 20,20 20,200 200)'::geometry as b) as f; +SELECT '500', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(90 130)'::geometry as a, 'LINESTRING(200 200,20 20,200 20,90 130,20 200,20 130,90 130)'::geometry as b) as f; +SELECT '501', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'LINESTRING(200 200,20 20,200 20,90 130,20 200,20 130,90 130)'::geometry as b) as f; +SELECT '502', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(90 130)'::geometry as a, 'LINESTRING(200 200,20 20,200 20,20 200,20 130,90 130)'::geometry as b) as f; +SELECT '503', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'LINESTRING(200 200,20 20,200 20,20 200,20 130,90 130)'::geometry as b) as f; +SELECT '504', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'LINESTRING(110 110,20 130,20 200,110 110,200 20,20 20,110 110,200 200,200 130,110 110)'::geometry as b) as f; +SELECT '505', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'LINESTRING(110 110,20 130,20 200,200 20,20 20,200 200,200 130,110 110)'::geometry as b) as f; +SELECT '506', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'LINESTRING(110 110,80 200,20 200,110 110,200 20,20 20,110 110,200 200,140 200,110 110)'::geometry as b) as f; +SELECT '507', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'LINESTRING(110 110,80 200,20 200,200 20,20 20,200 200,140 200,110 110)'::geometry as b) as f; +SELECT '508', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'LINESTRING(200 200,20 20,200 20,20 200,200 200)'::geometry as b) as f; +SELECT '509', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'LINESTRING(200 200,110 110,20 20,200 20,110 110,20 200,200 200)'::geometry as b) as f; +SELECT '510', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'LINESTRING(200 200,110 110,200 20,20 20,110 110,20 200,200 200)'::geometry as b) as f; +SELECT '511', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(90 130)'::geometry as a, 'LINESTRING(90 130,20 130,20 200,90 130,110 110,200 20,20 20,110 110,200 200,90 130)'::geometry as b) as f; +SELECT '512', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(90 130)'::geometry as a, 'LINESTRING(90 130,20 130,20 200,110 110,200 20,20 20,110 110,200 200,90 130)'::geometry as b) as f; +SELECT '513', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(90 130)'::geometry as a, 'LINESTRING(90 130,90 200,20 200,90 130,110 110,200 20,20 20,110 110,200 200,90 130)'::geometry as b) as f; +SELECT '514', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(90 130)'::geometry as a, 'LINESTRING(90 130,90 200,20 200,200 20,20 20,200 200,90 130)'::geometry as b) as f; +SELECT '515', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(90 130)'::geometry as a, 'LINESTRING(90 130,90 200,20 200,110 110,200 20,20 20,110 110,200 200,90 130)'::geometry as b) as f; +SELECT '516', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(90 130)'::geometry as a, 'LINESTRING(90 130,90 200,20 200,200 20,20 20,200 200,90 130)'::geometry as b) as f; +SELECT '517', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'LINESTRING(90 130,90 200,20 200,200 20,20 20,200 200,90 130)'::geometry as b) as f; +SELECT '518', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 200)'::geometry as a, 'LINESTRING(110 200,110 110,20 20,200 20,110 110,110 200,200 200)'::geometry as b) as f; +SELECT '519', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 150)'::geometry as a, 'LINESTRING(110 200,110 110,20 20,200 20,110 110,110 200,200 200)'::geometry as b) as f; +SELECT '520', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'LINESTRING(110 200,110 110,20 20,200 20,110 110,110 200,200 200)'::geometry as b) as f; +SELECT '521', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 200)'::geometry as a, 'LINESTRING(110 200,110 110,20 20,200 20,110 110,110 200)'::geometry as b) as f; +SELECT '522', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 150)'::geometry as a, 'LINESTRING(110 200,110 110,20 20,200 20,110 110,110 200)'::geometry as b) as f; +SELECT '523', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'LINESTRING(110 200,110 110,20 20,200 20,110 110,110 200)'::geometry as b) as f; +SELECT '524', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 150)'::geometry as a, 'LINESTRING(20 200,110 200,110 110,20 20,200 20,110 110,110 200,200 200)'::geometry as b) as f; +SELECT '525', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 110)'::geometry as a, 'LINESTRING(20 200,110 200,110 110,20 20,200 20,110 110,110 200,200 200)'::geometry as b) as f; +SELECT '526', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(110 200)'::geometry as a, 'LINESTRING(20 200,110 200,110 110,20 20,200 20,110 110,110 200,200 200)'::geometry as b) as f; +SELECT '527', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(50 250,90 220,130 190)'::geometry as a, 'LINESTRING(90 80,160 150,300 150,340 150,340 240)'::geometry as b) as f; +SELECT '528', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(180 180,230 130,280 80)'::geometry as a, 'LINESTRING(90 80,160 150,300 150,340 150,340 240)'::geometry as b) as f; +SELECT '529', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(50 120,90 80,130 40)'::geometry as a, 'LINESTRING(90 80,160 150,300 150,340 150,340 240)'::geometry as b) as f; +SELECT '530', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(300 280,340 240,380 200)'::geometry as a, 'LINESTRING(90 80,160 150,300 150,340 150,340 240)'::geometry as b) as f; +SELECT '531', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(230 150,260 120,290 90)'::geometry as a, 'LINESTRING(90 80,160 150,300 150,340 150,340 240)'::geometry as b) as f; +SELECT '532', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(200 190,240 150,270 110)'::geometry as a, 'LINESTRING(90 80,160 150,300 150,340 150,340 240)'::geometry as b) as f; +SELECT '533', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(160 150,190 120,220 90)'::geometry as a, 'LINESTRING(90 80,160 150,300 150,340 150,340 240)'::geometry as b) as f; +SELECT '534', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(120 190,160 150,200 110)'::geometry as a, 'LINESTRING(90 80,160 150,300 150,340 150,340 240)'::geometry as b) as f; +SELECT '535', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(90 80,160 150,340 240)'::geometry as a, 'LINESTRING(90 80,160 150,300 150,340 150,340 240)'::geometry as b) as f; +SELECT '536', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(90 80,160 150,300 150)'::geometry as a, 'LINESTRING(90 80,160 150,300 150,340 150,340 240)'::geometry as b) as f; +SELECT '537', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(90 80,160 150,240 150)'::geometry as a, 'LINESTRING(90 80,160 150,300 150,340 150,340 240)'::geometry as b) as f; +SELECT '538', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(90 80,130 120,210 150)'::geometry as a, 'LINESTRING(90 80,160 150,300 150,340 150,340 240)'::geometry as b) as f; +SELECT '539', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(130 120,210 150,340 200)'::geometry as a, 'LINESTRING(90 80,160 150,300 150,340 150,340 240)'::geometry as b) as f; +SELECT '540', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(160 150,240 150,340 210)'::geometry as a, 'LINESTRING(90 80,160 150,300 150,340 150,340 240)'::geometry as b) as f; +SELECT '541', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(160 150,300 150,340 150)'::geometry as a, 'LINESTRING(90 80,160 150,300 150,340 150,340 240)'::geometry as b) as f; +SELECT '542', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(160 150,240 150,340 240)'::geometry as a, 'LINESTRING(90 80,160 150,300 150,340 150,340 240)'::geometry as b) as f; +SELECT '543', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(20 20)'::geometry as a, 'POINT(20 20)'::geometry as b) as f; +SELECT '544', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(20 20)'::geometry as a, 'POINT(40 60)'::geometry as b) as f; +SELECT '545', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(40 40)'::geometry as a, 'MULTIPOINT(20 20,80 80,20 120)'::geometry as b) as f; +SELECT '546', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'POINT(20 20)'::geometry as a, 'MULTIPOINT(20 20,80 80,20 120)'::geometry as b) as f; +SELECT '547', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(40 40,80 60,120 100)'::geometry as a, 'MULTIPOINT(40 40,80 60,120 100)'::geometry as b) as f; +SELECT '548', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(40 40,80 60,120 100)'::geometry as a, 'MULTIPOINT(40 40,120 100,80 60)'::geometry as b) as f; +SELECT '549', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(40 40,60 100,100 60,120 120)'::geometry as a, 'MULTIPOINT(20 120,60 60,100 100,140 40)'::geometry as b) as f; +SELECT '550', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(20 20,80 70,140 120,200 170)'::geometry as a, 'MULTIPOINT(20 20,80 70,140 120,200 170)'::geometry as b) as f; +SELECT '551', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(20 20,140 120,80 70,200 170)'::geometry as a, 'MULTIPOINT(80 70,20 20,200 170,140 120)'::geometry as b) as f; +SELECT '552', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(20 20,80 70,140 120,200 170)'::geometry as a, 'MULTIPOINT(80 70,140 120)'::geometry as b) as f; +SELECT '553', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(80 70,20 20,200 170,140 120)'::geometry as a, 'MULTIPOINT(140 120,80 70)'::geometry as b) as f; +SELECT '554', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(80 70,20 20,200 170,140 120)'::geometry as a, 'MULTIPOINT(80 170,140 120,200 80)'::geometry as b) as f; +SELECT '555', st_relate(a,b,1) as r1, st_relate(a,b,2) as r2, st_relate(a,b,3) as r3, st_relate(a,b,4) as r4 FROM (select 'MULTIPOINT(80 70,20 20,200 170,140 120)'::geometry as a, 'MULTIPOINT(80 170,140 120,200 80,80 70)'::geometry as b) as f; + +SELECT st_relate('POINT(0 0)', 'POINT(1 0)', 5); diff -Nru postgis-1.5.3/regress/relate_bnr_expected postgis-2.0.1/regress/relate_bnr_expected --- postgis-1.5.3/regress/relate_bnr_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/relate_bnr_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,556 @@ +1|FF2FF1212|FF2FF1212|FF2FF1212|FF2FF1212 +2|2FFF1FFF2|2FFF1FFF2|2FFF0FFF2|2FFF1FFF2 +3|212FF1FF2|212FF1FF2|212FF1FF2|212FF1FF2 +4|2121F12F2|2121F12F2|2121F12F2|2121F12F2 +5|2121F1212|2121F1212|2121F1212|2121F1212 +6|212101212|212101212|212101212|212101212 +7|212101212|212101212|2F2F002F2|212101212 +8|212101212|212101212|2F2F002F2|212101212 +9|21210F212|21210F212|2F200F202|21210F212 +10|2121012F2|2121012F2|2F210F2F2|2121012F2 +11|FF2F11212|FF2F11212|1F2F01202|FF2F11212 +12|FF2F01212|FF2F01212|FF2F01202|FF2F01212 +13|21210F212|21210F212|2F200F202|21210F212 +14|1010F0212|1010F0212|101FFF202|1010F0212 +15|1010F0212|1010F0212|101FFF202|1010F0212 +16|10F0FF212|10F0FF212|10FFFF202|10F0FF212 +17|F01FF0212|F01FF0212|F01FFF202|F01FF0212 +18|101FF0212|101FF0212|101FFF202|101FF0212 +19|F01FF0212|F01FF0212|F01FFF212|F01FF0212 +20|101FF0212|101FF0212|101FFF212|101FF0212 +21|1010FF212|1010FF212|101FFF202|1010FF212 +22|1010FF212|1010FF212|101FFF202|1010FF212 +23|10F0FF212|10F0FF212|10FFFF202|10F0FF212 +24|101FFF212|1010FF212|101FFF202|101FFF212 +25|1FFFFFFF2|10FF0FFF2|1FFFFFFF2|1FFFFFFF2 +26|1FF0FF212|F1F0FF212|01FFFF212|1FF0FF212 +27|11F00F212|F1F00F212|11FFFF212|11F00F212 +28|10FF0FFF2|10FF0FFF2|1FFFFFFF2|10FF0FFF2 +29|FF1FF0102|FF1FF0102|FF1FF0102|FF1FF0102 +30|FF1FF0102|FF1FF0102|FF1FFF1F2|FF1FF0102 +31|FF1FF01F2|FF1FF01F2|FF1FF01F2|FF1FF01F2 +32|FF1FF01F2|FF1FF0102|FF1FFF1F2|FF1FF01F2 +33|1FFF0FFF2|1FFF0FFF2|1FFFFFFF2|1FFF0FFF2 +34|1FFF0FFF2|1FFF0FFF2|1FFFFFFF2|1FFF0FFF2 +35|1FFF0FFF2|1FFF0FFF2|1FFFFFFF2|1FFF0FFF2 +36|10F00FFF2|10F00FFF2|1FFFFFFF2|10F00FFF2 +37|1FFFFFFF2|10FF0FFF2|1FFFFFFF2|1FFFFFFF2 +38|10FF0FFF2|10FF0FFF2|1FFFFFFF2|10FF0FFF2 +39|0F1FF0102|0F1FF0102|0F1FFF1F2|0F1FF0102 +40|0F1FF0102|0F1FF0102|0F1FFF1F2|0F1FF0102 +41|FF10F0102|FF10F0102|0F1FFF1F2|FF10F0102 +42|FF10F0102|FF10F0102|0F1FFF1F2|FF10F0102 +43|F01FF0102|F01FF0102|0F1FFF1F2|F01FF0102 +44|1F1F00102|1F1F00102|1F1FFF1F2|1F1F00102 +45|1FFF0F1F2|1FFF0F1F2|1FFFFF1F2|1FFF0F1F2 +46|101FFF102|101FF0102|1F1FFF1F2|101FFF102 +47|101FF0FF2|101FF0FF2|1F1FFFFF2|101FF0FF2 +48|FF0FFF212|FF0FFF212|FF0FFF212|FF0FFF212 +49|0F0FFF212|0F0FFF212|0F0FFF212|0F0FFF212 +50|F00FFF212|F00FFF212|F00FFF212|F00FFF212 +51|00FFFF212|00FFFF212|00FFFF212|00FFFF212 +52|000FFF212|000FFF212|000FFF212|000FFF212 +53|F0FFFF212|F0FFFF212|F0FFFF212|F0FFFF212 +54|FF0FFF102|FF0FFF102|FF0FFF1F2|FF0FFF102 +55|F0FFFF102|F0FFFF102|0FFFFF1F2|F0FFFF102 +56|0FFFFF102|0FFFFF102|0FFFFF1F2|0FFFFF102 +57|F00FFF102|F00FFF102|0F0FFF1F2|F00FFF102 +58|00FFFF102|00FFFF102|0FFFFF1F2|00FFFF102 +59|0F0FFF102|0F0FFF102|0F0FFF1F2|0F0FFF102 +60|0F0FFF102|0F0FFF102|0F0FFF1F2|0F0FFF102 +61|0F0FFF102|0F0FFF102|0F0FFF1F2|0F0FFF102 +62|0FFFFFFF2|0FFFFFFF2|0FFFFFFF2|0FFFFFFF2 +63|FF0FFF0F2|FF0FFF0F2|FF0FFF0F2|FF0FFF0F2 +64|0F0FFF0F2|0F0FFF0F2|0F0FFF0F2|0F0FFF0F2 +65|0FFFFFFF2|0FFFFFFF2|0FFFFFFF2|0FFFFFFF2 +66|212111212|212111212|212101212|212111212 +67|212111212|212111212|212101212|212111212 +68|2FFF1FFF2|2FFF1FFF2|2FFF0FFF2|2FFF1FFF2 +69|2FFF1FFF2|2FFF1FFF2|2FFF0FFF2|2FFF1FFF2 +70|2FFF1FFF2|2FFF1FFF2|2FFF0FFF2|2FFF1FFF2 +71|2FFF1FFF2|2FFF1FFF2|2FFF0FFF2|2FFF1FFF2 +72|FF2FF1212|FF2FF1212|FF2FF1212|FF2FF1212 +73|FF2F01212|FF2F01212|FF2F0F2F2|FF2F01212 +74|FF2F01212|FF2F01212|FF2F0F202|FF2F01212 +75|FF2F01212|FF2F01212|FF2F0F202|FF2F01212 +76|FF2F01212|FF2F01212|FF2F002F2|FF2F01212 +77|FF2F01212|FF2F01212|FF2F00202|FF2F01212 +78|FF2F01212|FF2F01212|FF2F00202|FF2F01212 +79|FF2F01212|FF2F01212|FF2F00202|FF2F01212 +80|FF2F01212|FF2F01212|FF2F0F2F2|FF2F01212 +81|FF2F01212|FF2F01212|FF2F0F2F2|FF2F01212 +82|FF2F01212|FF2F01212|FF2F0F2F2|FF2F01212 +83|FF2F01212|FF2F01212|FF2F0F2F2|FF2F01212 +84|FF2F01212|FF2F01212|FF2F002F2|FF2F01212 +85|FF2F01212|FF2F01212|FF2F00202|FF2F01212 +86|FF2F01212|FF2F01212|FF2F00202|FF2F01212 +87|FF2F01212|FF2F01212|FF2F00202|FF2F01212 +88|FF2F01212|FF2F01212|FF2F00202|FF2F01212 +89|FF2F11212|FF2F11212|1F2F0F2F2|FF2F11212 +90|FF2F11212|FF2F11212|1F2F0F2F2|FF2F11212 +91|FF2F11212|FF2F11212|1F2F0F202|FF2F11212 +92|FF2F11212|FF2F11212|1F2F0F202|FF2F11212 +93|FF2F11212|FF2F11212|1F2F0F2F2|FF2F11212 +94|FF2F11212|FF2F11212|1F2F0F202|FF2F11212 +95|FF2F11212|FF2F11212|1F2F00202|FF2F11212 +96|FF2F11212|FF2F11212|1F2F0F202|FF2F11212 +97|FF2F11212|FF2F11212|1F2F0F2F2|FF2F11212 +98|FF2F11212|FF2F11212|1F2F0F202|FF2F11212 +99|212FF1FF2|212FF1FF2|212FF1FF2|212FF1FF2 +100|212F01FF2|212F01FF2|2F2F0FFF2|212F01FF2 +101|212F01FF2|212F01FF2|202F0FFF2|212F01FF2 +102|212F01FF2|212F01FF2|2F2F00FF2|212F01FF2 +103|212F01FF2|212F01FF2|202F00FF2|212F01FF2 +104|212F01FF2|212F01FF2|2F2F00FF2|212F01FF2 +105|212F01FF2|212F01FF2|202F00FF2|212F01FF2 +106|212F01FF2|212F01FF2|2F2F0FFF2|212F01FF2 +107|212F01FF2|212F01FF2|2F2F0FFF2|212F01FF2 +108|212F01FF2|212F01FF2|2F2F00FF2|212F01FF2 +109|212F01FF2|212F01FF2|2F2F00FF2|212F01FF2 +110|212F01FF2|212F01FF2|202F00FF2|212F01FF2 +111|212F01FF2|212F01FF2|202F00FF2|212F01FF2 +112|212F11FF2|212F11FF2|2F2F0FFF2|212F11FF2 +113|212F11FF2|212F11FF2|2F2F0FFF2|212F11FF2 +114|212F11FF2|212F11FF2|2F2F0FFF2|212F11FF2 +115|212F11FF2|212F11FF2|202F0FFF2|212F11FF2 +116|212F11FF2|212F11FF2|2F2F0FFF2|212F11FF2 +117|212F11FF2|212F11FF2|202F0FFF2|212F11FF2 +118|212F11FF2|212F11FF2|2F2F0FFF2|212F11FF2 +119|212F11FF2|212F11FF2|2F2F00FF2|212F11FF2 +120|212F11FF2|212F11FF2|2F2F0FFF2|212F11FF2 +121|212111212|212111212|212101212|212111212 +122|212111212|212111212|2F2F0F2F2|212111212 +123|212101212|212101212|212101212|212101212 +124|212111212|212111212|212101212|212111212 +125|212101212|212101212|2F2F0F2F2|212101212 +126|212101212|212101212|2F2F0F2F2|212101212 +127|212101212|212101212|2F2F0F202|212101212 +128|212101212|212101212|2F2F0F202|212101212 +129|212101212|212101212|2F2F0F202|212101212 +130|212101212|212101212|212101212|212101212 +131|212101212|212101212|212101212|212101212 +132|212101212|212101212|212101212|212101212 +133|212101212|212101212|212101212|212101212 +134|212111212|212111212|212101212|212111212 +135|212111212|212111212|212101212|212111212 +136|212111212|212111212|212101212|212111212 +137|212111212|212111212|212101212|212111212 +138|212111212|212111212|212101212|212111212 +139|212111212|212111212|212101212|212111212 +140|212111212|212111212|212101212|212111212 +141|212111212|212111212|212101212|212111212 +142|212111212|212111212|212101212|212111212 +143|212101212|212101212|212101212|212101212 +144|212111212|212111212|212101212|212111212 +145|212101212|212101212|212101212|212101212 +146|FF2F01212|FF2F01212|FF2F0F2F2|FF2F01212 +147|FF2F01212|FF2F01212|FF2F0F212|FF2F01212 +148|FF2F01212|FF2F01212|FF2F00212|FF2F01212 +149|FF2F01212|FF2F01212|FF2F0F212|FF2F01212 +150|FF2F01212|FF2F01212|FF2F0F212|FF2F01212 +151|FF2F01212|FF2F01212|FF2F0F212|FF2F01212 +152|FF2F01212|FF2F01212|FF2F00212|FF2F01212 +153|FF2F1F212|FF2F1F212|1F2F0F212|FF2F1F212 +154|FF2F11212|FF2F11212|1F2F0F212|FF2F11212 +155|FF2F11212|FF2F11212|1F2F0F212|FF2F11212 +156|FF2F11212|FF2F11212|1F2F00212|FF2F11212 +157|2FF1FF212|2FF1FF212|2FF1FF212|2FF1FF212 +158|2FF1FF212|2FF1FF212|2FF1FF212|2FF1FF212 +159|2FF11F212|2FF11F212|2FF00F212|2FF11F212 +160|2FF11F212|2FF11F212|2FFF0F212|2FF11F212 +161|2FF11F212|2FF11F212|2FFF0F212|2FF11F212 +162|2FFF1FFF2|2FFF1FFF2|2FFF0FFF2|2FFF1FFF2 +163|2FFF1FFF2|2FFF1FFF2|2FFF0FFF2|2FFF1FFF2 +164|FF2F01212|FF2F01212|FF2F0F202|FF2F01212 +165|FF2F01212|FF2F01212|FF2F00202|FF2F01212 +166|FF2F01212|FF2F01212|FF2F00202|FF2F01212 +167|FF2F01212|FF2F01212|FF2F0F212|FF2F01212 +168|FF2F11212|FF2F11212|1F2F0F202|FF2F11212 +169|FF2F11212|FF2F11212|1F2F00202|FF2F11212 +170|21210F212|21210F212|2F200F202|21210F212 +171|FF2F01212|FF2F01212|FF2F0F2F2|FF2F01212 +172|FF2F01212|FF2F01212|FF2F0F2F2|FF2F01212 +173|FF2F11212|FF2F11212|1F2F0F2F2|FF2F11212 +174|FF2F11212|FF2F11212|1F2F0F2F2|FF2F11212 +175|FF2F11212|FF2F11212|1F2F0F2F2|FF2F11212 +176|212111212|212111212|212101212|212111212 +177|21210F212|21210F212|2F200F202|21210F212 +178|FF1F00212|FF1F00212|F01FFF2F2|FF1F00212 +179|FF1F0F212|FF1F0F212|F01FFF202|FF1F0F212 +180|FF1F00212|FF1F00212|F01FFF2F2|FF1F00212 +181|F1FF0F212|F1FF0F212|10FFFF202|F1FF0F212 +182|F11F00212|F11F00212|101FFF202|F11F00212 +183|F11F0F212|F11F0F212|101FFF202|F11F0F212 +184|F11FF0212|F11FF0212|101FFF202|F11FF0212 +185|1010F0212|1010F0212|101FFF202|1010F0212 +186|101FF0212|101FF0212|101FFF202|101FF0212 +187|1010F0212|1010F0212|101FFF2F2|1010F0212 +188|101FF0212|101FF0212|101FFF2F2|101FF0212 +189|1010F0212|1010F0212|101FFF202|1010F0212 +190|101FF0212|101FF0212|101FFF202|101FF0212 +191|1010F0212|1010F0212|101FFF2F2|1010F0212 +192|1FF0FF212|1FF0FF212|1FFFFF212|1FF0FF212 +193|1FFF0F212|1FFF0F212|10FFFF202|1FFF0F212 +194|1FF00F212|1FF00F212|10FFFF202|1FF00F212 +195|11F00F212|11F00F212|10FFFF202|11F00F212 +196|11F0FF212|11F0FF212|10FFFF202|11F0FF212 +197|FF1FF0212|FF1FF0212|FF1FFF212|FF1FF0212 +198|FF1FF0212|FF1FF0212|FF1FFF212|FF1FF0212 +199|FF1F00212|FF1F00212|F01FFF212|FF1F00212 +200|FF1F0F212|FF1F0F212|F01FFF212|FF1F0F212 +201|F01FF0212|F01FF0212|F01FFF2F2|F01FF0212 +202|F01FF0212|F01FF0212|F01FFF202|F01FF0212 +203|F01FF0212|F01FF0212|101FFF202|F01FF0212 +204|F01FF0212|F01FF0212|101FFF202|F01FF0212 +205|F01FF0212|F01FF0212|F01FFF2F2|F01FF0212 +206|F01FF0212|F01FF0212|F01FFF202|F01FF0212 +207|F01FF0212|F01FF0212|0F1FFF202|F01FF0212 +208|F01FF0212|F01FF0212|0F1FFF202|F01FF0212 +209|FF1F00212|FF1F00212|F01FFF212|FF1F00212 +210|F01FF0212|F01FF0212|F01FFF212|F01FF0212 +211|F01FF0212|F01FF0212|F01FFF212|F01FF0212 +212|F01FF0212|F01FF0212|F01FFF212|F01FF0212 +213|F01FF0212|F01FF0212|F01FFF212|F01FF0212 +214|F01FF0212|F01FF0212|F01FFF212|F01FF0212 +215|F01FF0212|F01FF0212|F01FFF212|F01FF0212 +216|F01FF0212|F01FF0212|F01FFF212|F01FF0212 +217|1010FF212|1010FF212|101FFF202|1010FF212 +218|1010FF212|1010FF212|101FFF202|1010FF212 +219|10F0FF212|10F0FF212|10FFFF202|10F0FF212 +220|F01FFF212|FF1F0F212|F01FFF202|F01FFF212 +221|F01FFF212|FF1F0F212|F01FFF202|F01FFF212 +222|F01FFF212|FF1F0F212|F01FFF212|F01FFF212 +223|F1FFFF2F2|F1FF0F2F2|10FFFF2F2|F1FFFF2F2 +224|F1FFFF212|F1FF0F212|10FFFF212|F1FFFF212 +225|F11FFF212|F11F0F212|101FFF212|F11FFF212 +226|F11FFF212|F11F0F212|101FFF212|F11FFF212 +227|101FFF212|1010FF212|101FFF202|101FFF212 +228|101FFF212|101FF0212|101FFF2F2|101FFF212 +229|1FFFFF212|1FF0FF212|1FFFFF212|1FFFFF212 +230|1FFFFF212|1FF0FF212|1FFFFF212|1FFFFF212 +231|10FFFF212|1FFF0F212|10FFFF212|10FFFF212 +232|10FFFF212|1FFF0F212|10FFFF212|10FFFF212 +233|11FFFF212|11FF0F212|10FFFF212|11FFFF212 +234|FF1F00212|FF1F00212|F01FFF2F2|FF1F00212 +235|FF1F00212|FF1F00212|F01FFF2F2|FF1F00212 +236|FF1F00212|FF1F00212|F01FFF2F2|FF1F00212 +237|FF1F00212|FF1F00212|F01FFF2F2|FF1F00212 +238|F11F00212|F11F00212|101FFF2F2|F11F00212 +239|111F00212|111F00212|101FFF2F2|111F00212 +240|1FF0FF212|1FF0FF212|1FFFFF212|1FF0FF212 +241|11F00F212|11F00F212|10FFFF2F2|11F00F212 +242|F01FF0212|F01FF0212|F01FFF212|F01FF0212 +243|FF1F00212|FF1F00212|F01FFF2F2|FF1F00212 +244|FF1F00212|FF1F00212|F01FFF2F2|FF1F00212 +245|FF1F00212|FF1F00212|F01FFF2F2|FF1F00212 +246|1010F0212|1010F0212|101FFF2F2|1010F0212 +247|1010F0212|1010F0212|101FFF2F2|1010F0212 +248|1010F0212|1010F0212|101FFF2F2|1010F0212 +249|1010F0212|1010F0212|101FFF2F2|1010F0212 +250|1FF0FF212|1FF0FF212|1FFFFF212|1FF0FF212 +251|11F00F212|11F00F212|10FFFF2F2|11F00F212 +252|FF1F00212|FF1F00212|F01FFF2F2|FF1F00212 +253|FF1F00212|FF1F00212|F01FFF2F2|FF1F00212 +254|FF1F00212|FF1F00212|F01FFF2F2|FF1F00212 +255|1FFFFFFF2|10FF0FFF2|1FFFFFFF2|1FFFFFFF2 +256|1FF0FF212|F1F0FF212|01FFFF212|1FF0FF212 +257|11F00F212|F1F00F212|11FFFF212|11F00F212 +258|10FF0FFF2|10FF0FFF2|1FFFFFFF2|10FF0FFF2 +259|FF1F00102|FF1F00102|0F1FFF1F2|FF1F00102 +260|FF1F00102|FF1F00102|0F1FFF1F2|FF1F00102 +261|F01FF0102|F01FF0102|0F1FFF1F2|F01FF0102 +262|FF1F00102|FF1F00102|0F1FFF1F2|FF1F00102 +263|F01FF0102|F01FF0102|0F1FFF1F2|F01FF0102 +264|0F1FF0102|0F1FF0102|0F1FFF1F2|0F1FF0102 +265|1FFF0FFF2|1FFF0FFF2|1FFFFFFF2|1FFF0FFF2 +266|1FFF0FFF2|1FFF0FFF2|1FFFFFFF2|1FFF0FFF2 +267|FF1FF0102|FF1FF0102|FF1FFF1F2|FF1FF0102 +268|1FFF0FFF2|1FFF0FFF2|1FFFFFFF2|1FFF0FFF2 +269|101F00FF2|101F00FF2|1F1FFFFF2|101F00FF2 +270|101FF0FF2|101FF0FF2|1F1FFFFF2|101FF0FF2 +271|1010F0102|1010F0102|1F1FFF1F2|1010F0102 +272|1010F0102|1010F0102|1F1FFF1F2|1010F0102 +273|1010F0102|1010F0102|1F1FFF1F2|1010F0102 +274|FF1F00102|FF1F00102|0F1FFF1F2|FF1F00102 +275|FF1F00102|FF1F00102|0F1FFF1F2|FF1F00102 +276|FF1F00102|FF1F00102|0F1FFF1F2|FF1F00102 +277|FF10FF102|FF10FF102|0F1FFF1F2|FF10FF102 +278|FF10FF102|FF10FF102|0F1FFF1F2|FF10FF102 +279|FF1F0F1F2|FF1F0F1F2|0F1FFF1F2|FF1F0F1F2 +280|FF1F0F1F2|FF1F0F1F2|0F1FFF1F2|FF1F0F1F2 +281|F01FF0102|F01FF0102|0F1FFF1F2|F01FF0102 +282|F01FF0102|F01FF0102|0F1FFF1F2|F01FF0102 +283|F01FF01F2|F01FF01F2|0F1FFF1F2|F01FF01F2 +284|F010F0102|F010F0102|0F1FFF1F2|F010F0102 +285|F01FF0102|F01FF0102|0F1FFF1F2|F01FF0102 +286|F01FF0102|F01FF0102|0F1FFF1F2|F01FF0102 +287|F01FF01F2|F01FF01F2|0F1FFF1F2|F01FF01F2 +288|0F1F00102|0F1F00102|0F1FFF1F2|0F1F00102 +289|0F1F0F1F2|0F1F0F1F2|0F1FFF1F2|0F1F0F1F2 +290|0F1F00102|0F1F00102|0F1FFF1F2|0F1F00102 +291|0F1F0F1F2|0F1F0F1F2|0F1FFF1F2|0F1F0F1F2 +292|0F10F0102|0F10F0102|0F1FFF1F2|0F10F0102 +293|0F10F0102|0F10F0102|0F1FFF1F2|0F10F0102 +294|0F100F102|0F100F102|0F1FFF1F2|0F100F102 +295|0010F0102|0010F0102|0F1FFF1F2|0010F0102 +296|0010F0102|0010F0102|0F1FFF1F2|0010F0102 +297|0F10F0102|0F10F0102|0F1FFF1F2|0F10F0102 +298|0F10F0102|0F10F0102|0F1FFF1F2|0F10F0102 +299|0F10F0102|0F10F0102|0F1FFF1F2|0F10F0102 +300|0F1FF0102|0F1FF0102|0F1FFF1F2|0F1FF0102 +301|0F1FF0102|0F1FF0102|0F1FFF1F2|0F1FF0102 +302|0F1FF0102|0F1FF0102|0F1FFF1F2|0F1FF0102 +303|0F1FF0102|0F1FF0102|0F1FFF1F2|0F1FF0102 +304|0F1FF0102|0F1FF0102|0F1FFF1F2|0F1FF0102 +305|0F1FF0102|0F1FF0102|0F1FFF1F2|0F1FF0102 +306|001FF0102|001FF0102|0F1FFF1F2|001FF0102 +307|1FFF0FFF2|1FFF0FFF2|1FFFFFFF2|1FFF0FFF2 +308|1FFF0FFF2|1FFF0FFF2|1FFFFFFF2|1FFF0FFF2 +309|1FFF0FFF2|1FFF0FFF2|1FFFFFFF2|1FFF0FFF2 +310|FF1FF0102|FF1FF0102|FF1FF0102|FF1FF0102 +311|FF1FF0102|FF1FF0102|FF1FFF1F2|FF1FF0102 +312|1FFF0FFF2|1FFF0FFF2|1FFFFFFF2|1FFF0FFF2 +313|1FFF0FFF2|1FFF0FFF2|1FFFFFFF2|1FFF0FFF2 +314|101F00FF2|101F00FF2|1F1FFFFF2|101F00FF2 +315|101FF0FF2|101FF0FF2|1F1FFFFF2|101FF0FF2 +316|101FF0FF2|101FF0FF2|1F1FFFFF2|101FF0FF2 +317|101FF0FF2|101FF0FF2|1F1FFFFF2|101FF0FF2 +318|1010F0102|1010F0102|1F1FFF1F2|1010F0102 +319|1F1F00102|1F1F00102|1F1FFF1F2|1F1F00102 +320|1F1F00102|1F1F00102|1F1FFF1F2|1F1F00102 +321|1010F0102|1010F0102|1F1FFF1F2|1010F0102 +322|1010F0102|1010F0102|1F1FFF1F2|1010F0102 +323|1F1F00102|1F1F00102|1F1FFF1F2|1F1F00102 +324|1F1FF0102|1F1FF0102|1F1FFF1F2|1F1FF0102 +325|101FF0102|101FF0102|1F1FFF1F2|101FF0102 +326|101FF0102|101FF0102|1F1FFF1F2|101FF0102 +327|1F1FF0102|1F1FF0102|1F1FFF1F2|1F1FF0102 +328|1F1FF0102|1F1FF0102|1F1FFF1F2|1F1FF0102 +329|FF10F01F2|FF1F001F2|0F1FFF1F2|FF10F01F2 +330|0F1FF01F2|F01FF01F2|0F1FFF1F2|0F1FF01F2 +331|0F1FF01F2|F01FF01F2|0F1FFF1F2|0F1FF01F2 +332|0F1FF01F2|F01FF01F2|0F1FFF1F2|0F1FF01F2 +333|1FF0FF1F2|1FF00F1F2|1FFFFF1F2|1FF0FF1F2 +334|1FF0FF1F2|1FF00F1F2|1FFFFF1F2|1FF0FF1F2 +335|1FF0FF1F2|10F0FF1F2|1FFFFF1F2|1FF0FF1F2 +336|1F10F01F2|1F1F001F2|1F1FFF1F2|1F10F01F2 +337|1F10F01F2|1F1F001F2|1F1FFF1F2|1F10F01F2 +338|1F1FF01F2|101FF01F2|1F1FFF1F2|1F1FF01F2 +339|F01FF0102|F01FF0102|0F1FFF1F2|F01FF0102 +340|F01FF0102|F01FF0102|0F1FFF1F2|F01FF0102 +341|F01FF0102|F01FF0102|0F1FFF1F2|F01FF0102 +342|0F1FF01F2|F01FF01F2|0F1FFF1F2|0F1FF01F2 +343|0F1FF01F2|F01FF01F2|0F1FFF1F2|0F1FF01F2 +344|0F1FF01F2|F01FF01F2|0F1FFF1F2|0F1FF01F2 +345|0F1FF0102|0F1FF0102|0F1FFF1F2|0F1FF0102 +346|0F1FF0102|0F1FF0102|0F1FFF1F2|0F1FF0102 +347|0F1FF01F2|0F1FF0102|0F1FFF1F2|0F1FF01F2 +348|0F1FF0102|0F1FF0102|0F1FFF1F2|0F1FF0102 +349|0F1FF0102|0F1FF0102|0F1FFF1F2|0F1FF0102 +350|0F1FF0102|0F1FF0102|0F1FFF1F2|0F1FF0102 +351|0F1FF01F2|0F1FF0102|0F1FFF1F2|0F1FF01F2 +352|0F1FF0102|0F1FF0102|0F1FFF1F2|0F1FF0102 +353|FF1F00102|FF1F00102|0F1FFF1F2|FF1F00102 +354|F01FF0102|F01FF0102|0F1FFF1F2|F01FF0102 +355|F01FF0102|F01FF0102|0F1FFF1F2|F01FF0102 +356|F01FF0102|F01FF0102|0F1FFF1F2|F01FF0102 +357|0F1FF0102|0F1FF0102|0F1FFF1F2|0F1FF0102 +358|FF1F00102|FF1F00102|0F1FFF1F2|FF1F00102 +359|FF1F00102|FF1F00102|0F1FFF1F2|FF1F00102 +360|F01FF0102|F01FF0102|0F1FFF1F2|F01FF0102 +361|FF10F0102|FF10F0102|0F1FFF1F2|FF10F0102 +362|101FF0102|101FF0102|1F1FFF1F2|101FF0102 +363|101FF0102|101FF0102|1F1FFF1F2|101FF0102 +364|FF10F0102|FF10F0102|0F1FFF1F2|FF10F0102 +365|1FFFFFFF2|1FFF0FFF2|1FFFFFFF2|1FFFFFFF2 +366|1FFFFFFF2|1FFF0FFF2|1FFFFFFF2|1FFFFFFF2 +367|1FFFFFFF2|10F0FFFF2|1FFFFFFF2|1FFFFFFF2 +368|1FFFFFFF2|10F0FFFF2|1FFFFFFF2|1FFFFFFF2 +369|0F1FFF1F2|FF1F0F1F2|0F1FFF1F2|0F1FFF1F2 +370|0F1FFF1F2|0F1F0F1F2|0F1FFF1F2|0F1FFF1F2 +371|0F1FFF1F2|FF10FF102|0F1FFF1F2|0F1FFF1F2 +372|0F1FFF1F2|FF10FF102|0F1FFF1F2|0F1FFF1F2 +373|0F1FFF1F2|0F1FF0102|0F1FFF1F2|0F1FFF1F2 +374|0F1FFF1F2|0F10FF102|0F1FFF1F2|0F1FFF1F2 +375|1F1FFF1F2|1F1F0F1F2|1F1FFF1F2|1F1FFF1F2 +376|1F1FFF1F2|1F10FF102|1F1FFF1F2|1F1FFF1F2 +377|1F1FFF1F2|1F1F0F1F2|1F1FFF1F2|1F1FFF1F2 +378|F01FFF102|FF1F0F102|0F1FFF1F2|F01FFF102 +379|F01FFF102|FF1F0F102|0F1FFF1F2|F01FFF102 +380|F01FFF102|FF1F0F102|0F1FFF1F2|F01FFF102 +381|101FFF102|1010FF102|1F1FFF1F2|101FFF102 +382|101FFF1F2|1010FF1F2|1F1FFF1F2|101FFF1F2 +383|0F1FFF1F2|FF1F0F1F2|0F1FFF1F2|0F1FFF1F2 +384|0F1FFF1F2|0F1FF0102|0F1FFF1F2|0F1FFF1F2 +385|0F1FFF1F2|0F1FF0102|0F1FFF1F2|0F1FFF1F2 +386|0F1FFF1F2|0F1FF0102|0F1FFF1F2|0F1FFF1F2 +387|0F1FFF1F2|0F1FF0102|0F1FFF1F2|0F1FFF1F2 +388|0F1FFF1F2|0F1FF0102|0F1FFF1F2|0F1FFF1F2 +389|1FFFFFFF2|1FFF0FFF2|1FFFFFFF2|1FFFFFFF2 +390|1FFF0FFF2|1FFF0FFF2|1FFFFFFF2|1FFF0FFF2 +391|1FFF0FFF2|1FFF0FFF2|1FFFFFFF2|1FFF0FFF2 +392|FF1F00102|FF1F00102|0F1FFF1F2|FF1F00102 +393|FF1F00102|FF1F00102|0F1FFF1F2|FF1F00102 +394|FF1F00102|FF1F00102|0F1FFF1F2|FF1F00102 +395|FF10F0102|FF1F00102|0F1FFF1F2|FF10F0102 +396|FF10F0102|FF1F00102|0F1FFF1F2|FF10F0102 +397|FF10F0102|FF1F00102|0F1FFF1F2|FF10F0102 +398|FF10F0102|FF1F00102|0F1FFF1F2|FF10F0102 +399|FF10F0102|FF1F00102|0F1FFF1F2|FF10F0102 +400|0F1FF0102|0F1FF0102|0F1FFF1F2|0F1FF0102 +401|0F1FF0102|0F1FF0102|0F1FFF1F2|0F1FF0102 +402|0F1FF0102|0F1FF0102|0F1FFF1F2|0F1FF0102 +403|FF0FFF212|FF0FFF212|FF0FFF212|FF0FFF212 +404|FF0FFF212|FF0FFF212|FF0FFF212|FF0FFF212 +405|FF0FFF212|FF0FFF212|FF0FFF212|FF0FFF212 +406|FF0FFF212|FF0FFF212|FF0FFF212|FF0FFF212 +407|FF0FFF212|FF0FFF212|FF0FFF212|FF0FFF212 +408|F0FFFF212|F0FFFF212|F0FFFF212|F0FFFF212 +409|F0FFFF212|F0FFFF212|F0FFFF212|F0FFFF212 +410|F0FFFF212|F0FFFF212|F0FFFF212|F0FFFF212 +411|F0FFFF212|F0FFFF212|F0FFFF212|F0FFFF212 +412|0FFFFF212|0FFFFF212|0FFFFF212|0FFFFF212 +413|FF0FFF212|FF0FFF212|FF0FFF212|FF0FFF212 +414|FF0FFF212|FF0FFF212|FF0FFF212|FF0FFF212 +415|F0FFFF212|F0FFFF212|F0FFFF212|F0FFFF212 +416|F0FFFF212|F0FFFF212|F0FFFF212|F0FFFF212 +417|F0FFFF212|F0FFFF212|F0FFFF212|F0FFFF212 +418|F0FFFF212|F0FFFF212|F0FFFF212|F0FFFF212 +419|F0FFFF212|F0FFFF212|F0FFFF212|F0FFFF212 +420|F0FFFF212|F0FFFF212|F0FFFF212|F0FFFF212 +421|0FFFFF212|0FFFFF212|0FFFFF212|0FFFFF212 +422|F0FFFF212|F0FFFF212|F0FFFF212|F0FFFF212 +423|F0FFFF212|F0FFFF212|F0FFFF212|F0FFFF212 +424|FF0FFF212|FF0FFF212|FF0FFF212|FF0FFF212 +425|F00FFF212|F00FFF212|F00FFF212|F00FFF212 +426|F00FFF212|F00FFF212|F00FFF212|F00FFF212 +427|F00FFF212|F00FFF212|F00FFF212|F00FFF212 +428|F00FFF212|F00FFF212|F00FFF212|F00FFF212 +429|F0FFFF212|F0FFFF212|F0FFFF212|F0FFFF212 +430|F0FFFF212|F0FFFF212|F0FFFF212|F0FFFF212 +431|000FFF212|000FFF212|000FFF212|000FFF212 +432|000FFF212|000FFF212|000FFF212|000FFF212 +433|000FFF212|000FFF212|000FFF212|000FFF212 +434|0F0FFF212|0F0FFF212|0F0FFF212|0F0FFF212 +435|000FFF212|000FFF212|000FFF212|000FFF212 +436|0FFFFF212|0FFFFF212|0FFFFF212|0FFFFF212 +437|00FFFF212|00FFFF212|00FFFF212|00FFFF212 +438|FF0FFF212|FF0FFF212|FF0FFF212|FF0FFF212 +439|FF0FFF212|FF0FFF212|FF0FFF212|FF0FFF212 +440|FF0FFF212|FF0FFF212|FF0FFF212|FF0FFF212 +441|F0FFFF212|F0FFFF212|F0FFFF212|F0FFFF212 +442|F0FFFF212|F0FFFF212|F0FFFF212|F0FFFF212 +443|F0FFFF212|F0FFFF212|F0FFFF212|F0FFFF212 +444|F0FFFF212|F0FFFF212|F0FFFF212|F0FFFF212 +445|FF0FFF102|FF0FFF102|FF0FFF1F2|FF0FFF102 +446|F0FFFF102|F0FFFF102|0FFFFF1F2|F0FFFF102 +447|F0FFFF102|F0FFFF102|0FFFFF1F2|F0FFFF102 +448|0FFFFF102|0FFFFF102|0FFFFF1F2|0FFFFF102 +449|0FFFFF102|0FFFFF102|0FFFFF1F2|0FFFFF102 +450|FF0FFF1F2|FF0FFF102|FF0FFF1F2|FF0FFF1F2 +451|FF0FFF1F2|FF0FFF102|FF0FFF1F2|FF0FFF1F2 +452|0FFFFF1F2|F0FFFF1F2|0FFFFF1F2|0FFFFF1F2 +453|0FFFFF1F2|0FFFFF102|0FFFFF1F2|0FFFFF1F2 +454|0FFFFF1F2|0FFFFF102|0FFFFF1F2|0FFFFF1F2 +455|F0FFFF102|F0FFFF102|0FFFFF1F2|F0FFFF102 +456|F0FFFF102|F0FFFF102|0FFFFF1F2|F0FFFF102 +457|F0FFFF102|F0FFFF102|0FFFFF1F2|F0FFFF102 +458|0FFFFF102|0FFFFF102|0FFFFF1F2|0FFFFF102 +459|0FFFFF102|0FFFFF102|0FFFFF1F2|0FFFFF102 +460|0FFFFF102|0FFFFF102|0FFFFF1F2|0FFFFF102 +461|0FFFFF102|0FFFFF102|0FFFFF1F2|0FFFFF102 +462|0FFFFF102|0FFFFF102|0FFFFF1F2|0FFFFF102 +463|F0FFFF102|F0FFFF102|0FFFFF1F2|F0FFFF102 +464|0FFFFF102|0FFFFF102|0FFFFF1F2|0FFFFF102 +465|0FFFFF102|0FFFFF102|0FFFFF1F2|0FFFFF102 +466|0FFFFF102|0FFFFF102|0FFFFF1F2|0FFFFF102 +467|0FFFFF102|0FFFFF102|0FFFFF1F2|0FFFFF102 +468|0FFFFF102|0FFFFF102|0FFFFF1F2|0FFFFF102 +469|0FFFFF102|0FFFFF102|0FFFFF1F2|0FFFFF102 +470|0FFFFF102|0FFFFF102|0FFFFF1F2|0FFFFF102 +471|0FFFFF102|0FFFFF102|0FFFFF1F2|0FFFFF102 +472|F0FFFF102|F0FFFF102|0FFFFF1F2|F0FFFF102 +473|F0FFFF102|F0FFFF102|0FFFFF1F2|F0FFFF102 +474|F0FFFF102|F0FFFF102|0FFFFF1F2|F0FFFF102 +475|F0FFFF102|F0FFFF102|0FFFFF1F2|F0FFFF102 +476|F0FFFF102|F0FFFF102|0FFFFF1F2|F0FFFF102 +477|F0FFFF102|F0FFFF102|0FFFFF1F2|F0FFFF102 +478|F0FFFF102|F0FFFF102|0FFFFF1F2|F0FFFF102 +479|F0FFFF102|F0FFFF102|0FFFFF1F2|F0FFFF102 +480|F0FFFF102|F0FFFF102|0FFFFF1F2|F0FFFF102 +481|F0FFFF102|F0FFFF102|0FFFFF1F2|F0FFFF102 +482|F0FFFF102|F0FFFF102|0FFFFF1F2|F0FFFF102 +483|F0FFFF102|F0FFFF102|0FFFFF1F2|F0FFFF102 +484|F0FFFF102|F0FFFF102|0FFFFF1F2|F0FFFF102 +485|F0FFFF102|F0FFFF102|0FFFFF1F2|F0FFFF102 +486|F0FFFF102|F0FFFF102|0FFFFF1F2|F0FFFF102 +487|F0FFFF102|F0FFFF102|0FFFFF1F2|F0FFFF102 +488|F0FFFF102|F0FFFF102|0FFFFF1F2|F0FFFF102 +489|0FFFFF1F2|F0FFFF1F2|0FFFFF1F2|0FFFFF1F2 +490|0FFFFF1F2|F0FFFF1F2|0FFFFF1F2|0FFFFF1F2 +491|0FFFFF1F2|0FFFFF102|0FFFFF1F2|0FFFFF1F2 +492|0FFFFF1F2|0FFFFF102|0FFFFF1F2|0FFFFF1F2 +493|0FFFFF1F2|F0FFFF1F2|0FFFFF1F2|0FFFFF1F2 +494|0FFFFF1F2|0FFFFF102|0FFFFF1F2|0FFFFF1F2 +495|0FFFFF1F2|0FFFFF102|0FFFFF1F2|0FFFFF1F2 +496|F0FFFF102|F0FFFF102|0FFFFF1F2|F0FFFF102 +497|0FFFFF102|0FFFFF102|0FFFFF1F2|0FFFFF102 +498|F0FFFF102|F0FFFF102|0FFFFF1F2|F0FFFF102 +499|0FFFFF102|0FFFFF102|0FFFFF1F2|0FFFFF102 +500|F0FFFF102|F0FFFF102|0FFFFF1F2|F0FFFF102 +501|0FFFFF102|0FFFFF102|0FFFFF1F2|0FFFFF102 +502|F0FFFF102|F0FFFF102|0FFFFF1F2|F0FFFF102 +503|0FFFFF102|0FFFFF102|0FFFFF1F2|0FFFFF102 +504|0FFFFF1F2|F0FFFF1F2|0FFFFF1F2|0FFFFF1F2 +505|0FFFFF1F2|F0FFFF1F2|0FFFFF1F2|0FFFFF1F2 +506|0FFFFF1F2|F0FFFF1F2|0FFFFF1F2|0FFFFF1F2 +507|0FFFFF1F2|F0FFFF1F2|0FFFFF1F2|0FFFFF1F2 +508|0FFFFF1F2|0FFFFF102|0FFFFF1F2|0FFFFF1F2 +509|0FFFFF1F2|0FFFFF102|0FFFFF1F2|0FFFFF1F2 +510|0FFFFF1F2|0FFFFF102|0FFFFF1F2|0FFFFF1F2 +511|0FFFFF1F2|F0FFFF1F2|0FFFFF1F2|0FFFFF1F2 +512|0FFFFF1F2|F0FFFF1F2|0FFFFF1F2|0FFFFF1F2 +513|0FFFFF1F2|F0FFFF1F2|0FFFFF1F2|0FFFFF1F2 +514|0FFFFF1F2|F0FFFF1F2|0FFFFF1F2|0FFFFF1F2 +515|0FFFFF1F2|F0FFFF1F2|0FFFFF1F2|0FFFFF1F2 +516|0FFFFF1F2|F0FFFF1F2|0FFFFF1F2|0FFFFF1F2 +517|0FFFFF1F2|0FFFFF102|0FFFFF1F2|0FFFFF1F2 +518|F0FFFF102|F0FFFF102|0FFFFF1F2|F0FFFF102 +519|0FFFFF102|0FFFFF102|0FFFFF1F2|0FFFFF102 +520|0FFFFF102|0FFFFF102|0FFFFF1F2|0FFFFF102 +521|0FFFFF1F2|F0FFFF1F2|0FFFFF1F2|0FFFFF1F2 +522|0FFFFF1F2|0FFFFF102|0FFFFF1F2|0FFFFF1F2 +523|0FFFFF1F2|0FFFFF102|0FFFFF1F2|0FFFFF1F2 +524|0FFFFF102|0FFFFF102|0FFFFF1F2|0FFFFF102 +525|0FFFFF102|0FFFFF102|0FFFFF1F2|0FFFFF102 +526|0FFFFF102|0FFFFF102|0FFFFF1F2|0FFFFF102 +527|FF0FFF102|FF0FFF102|FF0FFF1F2|FF0FFF102 +528|FF0FFF102|FF0FFF102|FF0FFF1F2|FF0FFF102 +529|F00FFF102|F00FFF102|0F0FFF1F2|F00FFF102 +530|F00FFF102|F00FFF102|0F0FFF1F2|F00FFF102 +531|0F0FFF102|0F0FFF102|0F0FFF1F2|0F0FFF102 +532|0F0FFF102|0F0FFF102|0F0FFF1F2|0F0FFF102 +533|0F0FFF102|0F0FFF102|0F0FFF1F2|0F0FFF102 +534|0F0FFF102|0F0FFF102|0F0FFF1F2|0F0FFF102 +535|00FFFF1F2|00FFFF1F2|0FFFFF1F2|00FFFF1F2 +536|00FFFF102|00FFFF102|0FFFFF1F2|00FFFF102 +537|00FFFF102|00FFFF102|0FFFFF1F2|00FFFF102 +538|00FFFF102|00FFFF102|0FFFFF1F2|00FFFF102 +539|0FFFFF102|0FFFFF102|0FFFFF1F2|0FFFFF102 +540|0FFFFF102|0FFFFF102|0FFFFF1F2|0FFFFF102 +541|0FFFFF102|0FFFFF102|0FFFFF1F2|0FFFFF102 +542|00FFFF102|00FFFF102|0FFFFF1F2|00FFFF102 +543|0FFFFFFF2|0FFFFFFF2|0FFFFFFF2|0FFFFFFF2 +544|FF0FFF0F2|FF0FFF0F2|FF0FFF0F2|FF0FFF0F2 +545|FF0FFF0F2|FF0FFF0F2|FF0FFF0F2|FF0FFF0F2 +546|0FFFFF0F2|0FFFFF0F2|0FFFFF0F2|0FFFFF0F2 +547|0FFFFFFF2|0FFFFFFF2|0FFFFFFF2|0FFFFFFF2 +548|0FFFFFFF2|0FFFFFFF2|0FFFFFFF2|0FFFFFFF2 +549|FF0FFF0F2|FF0FFF0F2|FF0FFF0F2|FF0FFF0F2 +550|0FFFFFFF2|0FFFFFFF2|0FFFFFFF2|0FFFFFFF2 +551|0FFFFFFF2|0FFFFFFF2|0FFFFFFF2|0FFFFFFF2 +552|0F0FFFFF2|0F0FFFFF2|0F0FFFFF2|0F0FFFFF2 +553|0F0FFFFF2|0F0FFFFF2|0F0FFFFF2|0F0FFFFF2 +554|0F0FFF0F2|0F0FFF0F2|0F0FFF0F2|0F0FFF0F2 +555|0F0FFF0F2|0F0FFF0F2|0F0FFF0F2|0F0FFF0F2 +ERROR: GEOSRelate: Invalid boundary node rule 5 diff -Nru postgis-1.5.3/regress/relate_expected postgis-2.0.1/regress/relate_expected --- postgis-1.5.3/regress/relate_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/relate_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,555 @@ +1|FF2FF1212 +2|2FFF1FFF2 +3|212FF1FF2 +4|2121F12F2 +5|2121F1212 +6|212101212 +7|212101212 +8|212101212 +9|21210F212 +10|2121012F2 +11|FF2F11212 +12|FF2F01212 +13|21210F212 +14|1010F0212 +15|1010F0212 +16|10F0FF212 +17|F01FF0212 +18|101FF0212 +19|F01FF0212 +20|101FF0212 +21|1010FF212 +22|1010FF212 +23|10F0FF212 +24|101FFF212 +25|1FFFFFFF2 +26|1FF0FF212 +27|11F00F212 +28|10FF0FFF2 +29|FF1FF0102 +30|FF1FF0102 +31|FF1FF01F2 +32|FF1FF01F2 +33|1FFF0FFF2 +34|1FFF0FFF2 +35|1FFF0FFF2 +36|10F00FFF2 +37|1FFFFFFF2 +38|10FF0FFF2 +39|0F1FF0102 +40|0F1FF0102 +41|FF10F0102 +42|FF10F0102 +43|F01FF0102 +44|1F1F00102 +45|1FFF0F1F2 +46|101FFF102 +47|101FF0FF2 +48|FF0FFF212 +49|0F0FFF212 +50|F00FFF212 +51|00FFFF212 +52|000FFF212 +53|F0FFFF212 +54|FF0FFF102 +55|F0FFFF102 +56|0FFFFF102 +57|F00FFF102 +58|00FFFF102 +59|0F0FFF102 +60|0F0FFF102 +61|0F0FFF102 +62|0FFFFFFF2 +63|FF0FFF0F2 +64|0F0FFF0F2 +65|0FFFFFFF2 +66|212111212 +67|212111212 +68|2FFF1FFF2 +69|2FFF1FFF2 +70|2FFF1FFF2 +71|2FFF1FFF2 +72|FF2FF1212 +73|FF2F01212 +74|FF2F01212 +75|FF2F01212 +76|FF2F01212 +77|FF2F01212 +78|FF2F01212 +79|FF2F01212 +80|FF2F01212 +81|FF2F01212 +82|FF2F01212 +83|FF2F01212 +84|FF2F01212 +85|FF2F01212 +86|FF2F01212 +87|FF2F01212 +88|FF2F01212 +89|FF2F11212 +90|FF2F11212 +91|FF2F11212 +92|FF2F11212 +93|FF2F11212 +94|FF2F11212 +95|FF2F11212 +96|FF2F11212 +97|FF2F11212 +98|FF2F11212 +99|212FF1FF2 +100|212F01FF2 +101|212F01FF2 +102|212F01FF2 +103|212F01FF2 +104|212F01FF2 +105|212F01FF2 +106|212F01FF2 +107|212F01FF2 +108|212F01FF2 +109|212F01FF2 +110|212F01FF2 +111|212F01FF2 +112|212F11FF2 +113|212F11FF2 +114|212F11FF2 +115|212F11FF2 +116|212F11FF2 +117|212F11FF2 +118|212F11FF2 +119|212F11FF2 +120|212F11FF2 +121|212111212 +122|212111212 +123|212101212 +124|212111212 +125|212101212 +126|212101212 +127|212101212 +128|212101212 +129|212101212 +130|212101212 +131|212101212 +132|212101212 +133|212101212 +134|212111212 +135|212111212 +136|212111212 +137|212111212 +138|212111212 +139|212111212 +140|212111212 +141|212111212 +142|212111212 +143|212101212 +144|212111212 +145|212101212 +146|FF2F01212 +147|FF2F01212 +148|FF2F01212 +149|FF2F01212 +150|FF2F01212 +151|FF2F01212 +152|FF2F01212 +153|FF2F1F212 +154|FF2F11212 +155|FF2F11212 +156|FF2F11212 +157|2FF1FF212 +158|2FF1FF212 +159|2FF11F212 +160|2FF11F212 +161|2FF11F212 +162|2FFF1FFF2 +163|2FFF1FFF2 +164|FF2F01212 +165|FF2F01212 +166|FF2F01212 +167|FF2F01212 +168|FF2F11212 +169|FF2F11212 +170|21210F212 +171|FF2F01212 +172|FF2F01212 +173|FF2F11212 +174|FF2F11212 +175|FF2F11212 +176|212111212 +177|21210F212 +178|FF1F00212 +179|FF1F0F212 +180|FF1F00212 +181|F1FF0F212 +182|F11F00212 +183|F11F0F212 +184|F11FF0212 +185|1010F0212 +186|101FF0212 +187|1010F0212 +188|101FF0212 +189|1010F0212 +190|101FF0212 +191|1010F0212 +192|1FF0FF212 +193|1FFF0F212 +194|1FF00F212 +195|11F00F212 +196|11F0FF212 +197|FF1FF0212 +198|FF1FF0212 +199|FF1F00212 +200|FF1F0F212 +201|F01FF0212 +202|F01FF0212 +203|F01FF0212 +204|F01FF0212 +205|F01FF0212 +206|F01FF0212 +207|F01FF0212 +208|F01FF0212 +209|FF1F00212 +210|F01FF0212 +211|F01FF0212 +212|F01FF0212 +213|F01FF0212 +214|F01FF0212 +215|F01FF0212 +216|F01FF0212 +217|1010FF212 +218|1010FF212 +219|10F0FF212 +220|F01FFF212 +221|F01FFF212 +222|F01FFF212 +223|F1FFFF2F2 +224|F1FFFF212 +225|F11FFF212 +226|F11FFF212 +227|101FFF212 +228|101FFF212 +229|1FFFFF212 +230|1FFFFF212 +231|10FFFF212 +232|10FFFF212 +233|11FFFF212 +234|FF1F00212 +235|FF1F00212 +236|FF1F00212 +237|FF1F00212 +238|F11F00212 +239|111F00212 +240|1FF0FF212 +241|11F00F212 +242|F01FF0212 +243|FF1F00212 +244|FF1F00212 +245|FF1F00212 +246|1010F0212 +247|1010F0212 +248|1010F0212 +249|1010F0212 +250|1FF0FF212 +251|11F00F212 +252|FF1F00212 +253|FF1F00212 +254|FF1F00212 +255|1FFFFFFF2 +256|1FF0FF212 +257|11F00F212 +258|10FF0FFF2 +259|FF1F00102 +260|FF1F00102 +261|F01FF0102 +262|FF1F00102 +263|F01FF0102 +264|0F1FF0102 +265|1FFF0FFF2 +266|1FFF0FFF2 +267|FF1FF0102 +268|1FFF0FFF2 +269|101F00FF2 +270|101FF0FF2 +271|1010F0102 +272|1010F0102 +273|1010F0102 +274|FF1F00102 +275|FF1F00102 +276|FF1F00102 +277|FF10FF102 +278|FF10FF102 +279|FF1F0F1F2 +280|FF1F0F1F2 +281|F01FF0102 +282|F01FF0102 +283|F01FF01F2 +284|F010F0102 +285|F01FF0102 +286|F01FF0102 +287|F01FF01F2 +288|0F1F00102 +289|0F1F0F1F2 +290|0F1F00102 +291|0F1F0F1F2 +292|0F10F0102 +293|0F10F0102 +294|0F100F102 +295|0010F0102 +296|0010F0102 +297|0F10F0102 +298|0F10F0102 +299|0F10F0102 +300|0F1FF0102 +301|0F1FF0102 +302|0F1FF0102 +303|0F1FF0102 +304|0F1FF0102 +305|0F1FF0102 +306|001FF0102 +307|1FFF0FFF2 +308|1FFF0FFF2 +309|1FFF0FFF2 +310|FF1FF0102 +311|FF1FF0102 +312|1FFF0FFF2 +313|1FFF0FFF2 +314|101F00FF2 +315|101FF0FF2 +316|101FF0FF2 +317|101FF0FF2 +318|1010F0102 +319|1F1F00102 +320|1F1F00102 +321|1010F0102 +322|1010F0102 +323|1F1F00102 +324|1F1FF0102 +325|101FF0102 +326|101FF0102 +327|1F1FF0102 +328|1F1FF0102 +329|FF10F01F2 +330|0F1FF01F2 +331|0F1FF01F2 +332|0F1FF01F2 +333|1FF0FF1F2 +334|1FF0FF1F2 +335|1FF0FF1F2 +336|1F10F01F2 +337|1F10F01F2 +338|1F1FF01F2 +339|F01FF0102 +340|F01FF0102 +341|F01FF0102 +342|0F1FF01F2 +343|0F1FF01F2 +344|0F1FF01F2 +345|0F1FF0102 +346|0F1FF0102 +347|0F1FF01F2 +348|0F1FF0102 +349|0F1FF0102 +350|0F1FF0102 +351|0F1FF01F2 +352|0F1FF0102 +353|FF1F00102 +354|F01FF0102 +355|F01FF0102 +356|F01FF0102 +357|0F1FF0102 +358|FF1F00102 +359|FF1F00102 +360|F01FF0102 +361|FF10F0102 +362|101FF0102 +363|101FF0102 +364|FF10F0102 +365|1FFFFFFF2 +366|1FFFFFFF2 +367|1FFFFFFF2 +368|1FFFFFFF2 +369|0F1FFF1F2 +370|0F1FFF1F2 +371|0F1FFF1F2 +372|0F1FFF1F2 +373|0F1FFF1F2 +374|0F1FFF1F2 +375|1F1FFF1F2 +376|1F1FFF1F2 +377|1F1FFF1F2 +378|F01FFF102 +379|F01FFF102 +380|F01FFF102 +381|101FFF102 +382|101FFF1F2 +383|0F1FFF1F2 +384|0F1FFF1F2 +385|0F1FFF1F2 +386|0F1FFF1F2 +387|0F1FFF1F2 +388|0F1FFF1F2 +389|1FFFFFFF2 +390|1FFF0FFF2 +391|1FFF0FFF2 +392|FF1F00102 +393|FF1F00102 +394|FF1F00102 +395|FF10F0102 +396|FF10F0102 +397|FF10F0102 +398|FF10F0102 +399|FF10F0102 +400|0F1FF0102 +401|0F1FF0102 +402|0F1FF0102 +403|FF0FFF212 +404|FF0FFF212 +405|FF0FFF212 +406|FF0FFF212 +407|FF0FFF212 +408|F0FFFF212 +409|F0FFFF212 +410|F0FFFF212 +411|F0FFFF212 +412|0FFFFF212 +413|FF0FFF212 +414|FF0FFF212 +415|F0FFFF212 +416|F0FFFF212 +417|F0FFFF212 +418|F0FFFF212 +419|F0FFFF212 +420|F0FFFF212 +421|0FFFFF212 +422|F0FFFF212 +423|F0FFFF212 +424|FF0FFF212 +425|F00FFF212 +426|F00FFF212 +427|F00FFF212 +428|F00FFF212 +429|F0FFFF212 +430|F0FFFF212 +431|000FFF212 +432|000FFF212 +433|000FFF212 +434|0F0FFF212 +435|000FFF212 +436|0FFFFF212 +437|00FFFF212 +438|FF0FFF212 +439|FF0FFF212 +440|FF0FFF212 +441|F0FFFF212 +442|F0FFFF212 +443|F0FFFF212 +444|F0FFFF212 +445|FF0FFF102 +446|F0FFFF102 +447|F0FFFF102 +448|0FFFFF102 +449|0FFFFF102 +450|FF0FFF1F2 +451|FF0FFF1F2 +452|0FFFFF1F2 +453|0FFFFF1F2 +454|0FFFFF1F2 +455|F0FFFF102 +456|F0FFFF102 +457|F0FFFF102 +458|0FFFFF102 +459|0FFFFF102 +460|0FFFFF102 +461|0FFFFF102 +462|0FFFFF102 +463|F0FFFF102 +464|0FFFFF102 +465|0FFFFF102 +466|0FFFFF102 +467|0FFFFF102 +468|0FFFFF102 +469|0FFFFF102 +470|0FFFFF102 +471|0FFFFF102 +472|F0FFFF102 +473|F0FFFF102 +474|F0FFFF102 +475|F0FFFF102 +476|F0FFFF102 +477|F0FFFF102 +478|F0FFFF102 +479|F0FFFF102 +480|F0FFFF102 +481|F0FFFF102 +482|F0FFFF102 +483|F0FFFF102 +484|F0FFFF102 +485|F0FFFF102 +486|F0FFFF102 +487|F0FFFF102 +488|F0FFFF102 +489|0FFFFF1F2 +490|0FFFFF1F2 +491|0FFFFF1F2 +492|0FFFFF1F2 +493|0FFFFF1F2 +494|0FFFFF1F2 +495|0FFFFF1F2 +496|F0FFFF102 +497|0FFFFF102 +498|F0FFFF102 +499|0FFFFF102 +500|F0FFFF102 +501|0FFFFF102 +502|F0FFFF102 +503|0FFFFF102 +504|0FFFFF1F2 +505|0FFFFF1F2 +506|0FFFFF1F2 +507|0FFFFF1F2 +508|0FFFFF1F2 +509|0FFFFF1F2 +510|0FFFFF1F2 +511|0FFFFF1F2 +512|0FFFFF1F2 +513|0FFFFF1F2 +514|0FFFFF1F2 +515|0FFFFF1F2 +516|0FFFFF1F2 +517|0FFFFF1F2 +518|F0FFFF102 +519|0FFFFF102 +520|0FFFFF102 +521|0FFFFF1F2 +522|0FFFFF1F2 +523|0FFFFF1F2 +524|0FFFFF102 +525|0FFFFF102 +526|0FFFFF102 +527|FF0FFF102 +528|FF0FFF102 +529|F00FFF102 +530|F00FFF102 +531|0F0FFF102 +532|0F0FFF102 +533|0F0FFF102 +534|0F0FFF102 +535|00FFFF1F2 +536|00FFFF102 +537|00FFFF102 +538|00FFFF102 +539|0FFFFF102 +540|0FFFFF102 +541|0FFFFF102 +542|00FFFF102 +543|0FFFFFFF2 +544|FF0FFF0F2 +545|FF0FFF0F2 +546|0FFFFF0F2 +547|0FFFFFFF2 +548|0FFFFFFF2 +549|FF0FFF0F2 +550|0FFFFFFF2 +551|0FFFFFFF2 +552|0F0FFFFF2 +553|0F0FFFFF2 +554|0F0FFF0F2 +555|0F0FFF0F2 diff -Nru postgis-1.5.3/regress/relate_test postgis-2.0.1/regress/relate_test --- postgis-1.5.3/regress/relate_test 2003-06-12 22:25:04.000000000 +0000 +++ postgis-2.0.1/regress/relate_test 1970-01-01 00:00:00.000000000 +0000 @@ -1,565 +0,0 @@ -BEGIN; - -CREATE TABLE "relate_test" ( - "g1" geometry, - "g2" geometry, - "result" text -); - - -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((0 0,80 0,80 80,0 80,0 0))','SRID=-1;POLYGON((100 200,100 140,180 140,180 200,100 200))','FF2FF1212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((0 0,140 0,140 140,0 140,0 0))','SRID=-1;POLYGON((140 0,0 0,0 140,140 140,140 0))','2FFF1FFF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((40 60,360 60,360 300,40 300,40 60))','SRID=-1;POLYGON((120 100,280 100,280 240,120 240,120 100))','212FF1FF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((40 60,420 60,420 320,40 320,40 60),(200 140,160 220,260 200,200 140))','SRID=-1;POLYGON((80 100,360 100,360 280,80 280,80 100))','2121F12F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((0 280,0 0,260 0,260 280,0 280),(220 240,40 240,40 40,220 40,220 240))','SRID=-1;POLYGON((20 260,240 260,240 20,20 20,20 260),(160 180,80 180,120 120,160 180))','2121F1212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((60 80,200 80,200 220,60 220,60 80))','SRID=-1;POLYGON((120 140,260 140,260 260,120 260,120 140))','212101212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((60 220,220 220,140 140,60 220))','SRID=-1;POLYGON((100 180,180 180,180 100,100 100,100 180))','212101212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((40 40,180 40,180 180,40 180,40 40))','SRID=-1;POLYGON((180 40,40 180,160 280,300 140,180 40))','212101212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((100 60,140 100,100 140,60 100,100 60))','SRID=-1;MULTIPOLYGON(((80 40,120 40,120 80,80 80,80 40)),((120 80,160 80,160 120,120 120,120 80)),((80 120,120 120,120 160,80 160,80 120)),((40 80,80 80,80 120,40 120,40 80)))','21210F212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((40 280,200 280,200 100,40 100,40 280),(100 220,120 220,120 200,100 180,100 220))','SRID=-1;POLYGON((40 280,180 260,180 120,60 120,40 280))','2121012F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((0 200,0 0,200 0,200 200,0 200),(20 180,130 180,130 30,20 30,20 180))','SRID=-1;POLYGON((60 90,130 90,130 30,60 30,60 90))','FF2F11212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))','SRID=-1;POLYGON((270 90,200 50,150 80,210 120,270 90))','FF2F01212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((100 60,140 100,100 140,60 100,100 60))','SRID=-1;MULTIPOLYGON(((80 40,120 40,120 80,80 80,80 40)),((120 80,160 80,160 120,120 120,120 80)),((80 120,120 120,120 160,80 160,80 120)),((40 80,80 80,80 120,40 120,40 80)))','21210F212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(100 120,100 240)','SRID=-1;POLYGON((40 60,160 60,160 180,40 180,40 60))','1010F0212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(80 80,140 140,200 200)','SRID=-1;POLYGON((40 40,140 40,140 140,40 140,40 40))','1010F0212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(70 50,70 150)','SRID=-1;MULTIPOLYGON(((0 0,0 100,140 100,140 0,0 0)),((20 170,70 100,130 170,20 170)))','10F0FF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(60 160,150 70)','SRID=-1;POLYGON((190 190,360 20,20 20,190 190),(110 110,250 100,140 30,110 110))','F01FF0212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(60 160,150 70)','SRID=-1;POLYGON((190 190,360 20,20 20,190 190),(111 110,250 100,140 30,111 110))','101FF0212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(80 110,170 110)','SRID=-1;POLYGON((20 200,20 20,240 20,240 200,20 200),(130 110,60 40,60 180,130 110),(130 180,130 40,200 110,130 180))','F01FF0212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(80 110,170 110)','SRID=-1;POLYGON((20 200,20 20,240 20,240 200,20 200),(130 110,60 40,60 180,130 110),(130 180,131 40,200 110,130 180))','101FF0212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(160 70,320 230)','SRID=-1;MULTIPOLYGON(((140 110,260 110,170 20,50 20,140 110)),((300 270,420 270,340 190,220 190,300 270)))','1010FF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(100 140,100 40)','SRID=-1;MULTIPOLYGON(((20 80,180 79,100 0,20 80)),((20 160,180 160,100 80,20 160)))','1010FF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(100 140,100 40)','SRID=-1;MULTIPOLYGON(((20 80,180 80,100 0,20 80)),((20 160,180 160,100 80,20 160)))','10F0FF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(110 60,20 150,200 150,110 60)','SRID=-1;POLYGON((20 20,200 20,110 110,20 20))','101FFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(0 0,0 50,50 50,50 0,0 0)','SRID=-1;MULTILINESTRING((0 0,0 50),(0 50,50 50),(50 50,50 0),(50 0,0 0))','1FFFFFFF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 180,140 180)','SRID=-1;MULTIPOLYGON(((20 320,180 320,180 180,20 180,20 320)),((20 180,20 80,180 80,180 180,20 180)))','1FF0FF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 180,140 180)','SRID=-1;MULTIPOLYGON(((20 320,180 320,180 180,20 180,20 320)),((60 180,60 80,180 80,180 180,60 180)))','11F00F212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(0 0,60 0,60 60,60 0,120 0)','SRID=-1;MULTILINESTRING((0 0,60 0),(60 0,120 0),(60 0,60 60))','10FF0FFF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(60 0,20 80,100 80,80 120,40 140)','SRID=-1;LINESTRING(140 300,220 160,260 200,240 260)','FF1FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(60 0,20 80,100 80,80 120,40 140)','SRID=-1;LINESTRING(60 40,140 40,140 160,0 160)','FF1FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(60 0,20 80,100 80,80 120,40 140)','SRID=-1;LINESTRING(140 280,240 280,240 180,140 180,140 280)','FF1FF01F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(140 0,0 0,40 60,0 120,60 200,220 160,220 40)','SRID=-1;LINESTRING(80 140,180 100,160 40,100 40,60 100,80 140)','FF1FF01F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(20 20,80 80)','SRID=-1;LINESTRING(20 20,80 80)','1FFF0FFF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 40,160 160,200 60,60 140)','SRID=-1;LINESTRING(40 40,160 160,200 60,60 140)','1FFF0FFF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 40,200 40)','SRID=-1;LINESTRING(200 40,140 40,40 40)','1FFF0FFF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(0 0,110 0,60 0)','SRID=-1;LINESTRING(0 0,110 0)','10F00FFF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(0 0,0 50,50 50,50 0,0 0)','SRID=-1;MULTILINESTRING((0 0,0 50),(0 50,50 50),(50 50,50 0),(50 0,0 0))','1FFFFFFF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(0 0,80 0,80 60,80 0,170 0)','SRID=-1;MULTILINESTRING((0 0,170 0),(80 0,80 60))','10FF0FFF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(80 100,180 200)','SRID=-1;LINESTRING(80 180,180 120)','0F1FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 40,100 100,160 160)','SRID=-1;LINESTRING(160 60,100 100,60 140)','0F1FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 40,100 100,180 100,180 180,100 180,100 100)','SRID=-1;LINESTRING(140 60,60 140)','FF10F0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 40,180 180,100 180,100 100)','SRID=-1;LINESTRING(140 60,60 140)','FF10F0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(20 110,200 110)','SRID=-1;LINESTRING(200 200,20 20,200 20,110 110,20 200,110 200,110 110)','F01FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(80 90,50 50,0 0)','SRID=-1;LINESTRING(0 0,100 100)','1F1F00102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 140,240 140)','SRID=-1;LINESTRING(40 140,100 140,80 80,120 60,100 140,160 140,160 100,200 100,160 140,240 140)','1FFF0F1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(20 20,100 20,20 20)','SRID=-1;LINESTRING(60 20,200 20)','101FFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 60,180 60,180 140,100 140,100 60,220 60,220 180,80 180,80 60,280 60)','SRID=-1;LINESTRING(140 60,180 60,220 60,260 60)','101FF0FF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(20 20)','SRID=-1;POLYGON((60 120,60 40,160 40,160 120,60 120))','FF0FFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(0 20,40 20)','SRID=-1;POLYGON((20 40,20 0,60 0,60 40,20 40))','0F0FFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(0 20,20 20)','SRID=-1;POLYGON((20 40,20 0,60 0,60 40,20 40))','F00FFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(20 20,40 20)','SRID=-1;POLYGON((20 40,20 0,60 0,60 40,20 40))','00FFFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(80 260,140 260,180 260)','SRID=-1;POLYGON((40 320,140 320,140 200,40 200,40 320))','000FFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(40 40)','SRID=-1;MULTIPOLYGON(((0 40,0 0,40 0,40 40,0 40)),((40 80,40 40,80 40,80 80,40 80)))','F0FFFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(60 120)','SRID=-1;LINESTRING(40 40,120 120,200 120)','FF0FFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(40 40)','SRID=-1;LINESTRING(40 40,100 100,160 100)','F0FFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(60 60)','SRID=-1;LINESTRING(40 40,100 100)','0FFFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(40 40,100 40)','SRID=-1;LINESTRING(40 40,80 80)','F00FFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(40 40,60 60)','SRID=-1;LINESTRING(40 40,80 80)','00FFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(60 60,100 100)','SRID=-1;LINESTRING(40 40,80 80)','0F0FFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(60 60,100 100)','SRID=-1;LINESTRING(40 40,80 80)','0F0FFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(60 60,100 100)','SRID=-1;LINESTRING(40 40,60 60,80 80)','0F0FFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(20 20)','SRID=-1;POINT(20 20)','0FFFFFFF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(20 20)','SRID=-1;POINT(20 30)','FF0FFF0F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(40 40,80 60,40 100)','SRID=-1;MULTIPOINT(40 40,80 60,120 100)','0F0FFF0F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(40 40,80 60,120 100)','SRID=-1;MULTIPOINT(40 40,80 60,120 100)','0FFFFFFF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((100 100,100 200,200 200,200 100,100 100))','SRID=-1;POLYGON((100 100,1e+15 110,1e+15 100,100 100))','212111212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((120 100,120 200,200 200,200 100,120 100))','SRID=-1;POLYGON((100 100,1e+15 110,1e+15 100,100 100))','212111212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((20 20,20 100,120 100,140 20,20 20))','SRID=-1;POLYGON((20 20,20 100,120 100,140 20,20 20))','2FFF1FFF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((20 20,20 100,120 100,140 20,20 20))','SRID=-1;POLYGON((20 20,140 20,120 100,20 100,20 20))','2FFF1FFF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((20 20,20 100,120 100,140 20,20 20))','SRID=-1;POLYGON((120 100,140 20,20 20,20 100,120 100))','2FFF1FFF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((20 20,20 100,120 100,140 20,20 20))','SRID=-1;POLYGON((20 100,60 100,120 100,140 20,80 20,20 20,20 100))','2FFF1FFF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((0 0,80 0,80 80,0 80,0 0))','SRID=-1;POLYGON((100 200,100 140,180 140,180 200,100 200))','FF2FF1212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((140 120,160 20,20 20,20 120,140 120))','SRID=-1;POLYGON((140 120,140 200,240 200,240 120,140 120))','FF2F01212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((140 120,160 20,20 20,20 120,140 120))','SRID=-1;POLYGON((80 180,140 260,260 200,200 60,80 180))','FF2F01212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((140 120,160 20,20 20,20 120,140 120))','SRID=-1;POLYGON((240 80,140 120,180 240,280 200,240 80))','FF2F01212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((140 160,20 20,270 20,150 160,230 40,60 40,140 160))','SRID=-1;POLYGON((140 40,180 80,120 100,140 40))','FF2F01212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((140 160,20 20,270 20,150 160,230 40,60 40,140 160))','SRID=-1;POLYGON((120 100,180 80,130 40,120 100))','FF2F01212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((20 20,180 20,140 140,20 140,20 20))','SRID=-1;POLYGON((180 100,80 200,180 280,260 200,180 100))','FF2F01212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((140 120,160 20,20 20,20 120,140 120))','SRID=-1;POLYGON((140 140,20 120,0 220,120 240,140 140))','FF2F01212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((160 200,210 70,120 70,160 200))','SRID=-1;POLYGON((160 200,260 40,70 40,160 200,20 20,310 20,160 200))','FF2F01212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((110 140,200 70,200 160,110 140))','SRID=-1;POLYGON((110 140,110 50,60 50,60 90,160 190,20 110,20 20,200 20,110 140))','FF2F01212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((20 120,20 20,260 20,260 120,200 40,140 120,80 40,20 120))','SRID=-1;POLYGON((20 120,20 240,260 240,260 120,200 200,140 120,80 200,20 120))','FF2F01212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((20 120,20 20,260 20,260 120,180 40,140 120,100 40,20 120))','SRID=-1;POLYGON((20 120,300 120,140 240,20 120))','FF2F01212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((20 20,20 300,280 300,280 260,220 260,60 100,60 60,280 60,280 20,20 20))','SRID=-1;POLYGON((100 140,160 80,280 180,200 240,220 160,160 200,180 120,100 140))','FF2F01212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((20 20,20 300,280 300,280 260,220 260,60 100,60 60,280 60,280 20,20 20))','SRID=-1;POLYGON((260 200,180 80,120 160,200 160,180 220,260 200))','FF2F01212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((20 20,280 20,280 140,220 60,140 140,80 60,20 140,20 20))','SRID=-1;POLYGON((0 140,300 140,140 240,0 140))','FF2F01212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((20 20,280 20,280 140,220 60,140 140,80 60,20 140,20 20))','SRID=-1;POLYGON((20 240,20 140,320 140,180 240,20 240))','FF2F01212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((20 20,280 20,280 140,220 60,140 140,80 60,20 140,20 20))','SRID=-1;POLYGON((20 240,20 140,80 180,140 140,220 180,280 140,280 240,20 240))','FF2F01212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((120 120,180 60,20 20,20 120,120 120))','SRID=-1;POLYGON((120 120,220 20,280 20,240 160,120 120))','FF2F11212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((140 120,160 20,20 20,20 120,140 120))','SRID=-1;POLYGON((140 120,160 20,260 120,220 200,140 120))','FF2F11212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((20 140,120 40,20 40,20 140))','SRID=-1;POLYGON((190 140,190 20,140 20,20 140,190 140))','FF2F11212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((120 120,180 60,20 20,20 120,120 120))','SRID=-1;POLYGON((300 20,220 20,120 120,260 160,300 20))','FF2F11212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((140 120,160 20,20 20,20 120,140 120))','SRID=-1;POLYGON((140 120,240 160,280 60,160 20,140 120))','FF2F11212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((120 120,180 60,20 20,20 120,120 120))','SRID=-1;POLYGON((280 60,180 60,120 120,260 180,280 60))','FF2F11212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((140 120,160 20,20 20,20 120,140 120))','SRID=-1;POLYGON((120 200,120 120,40 120,40 200,120 200))','FF2F11212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((140 120,160 20,20 20,20 120,140 120))','SRID=-1;POLYGON((160 220,140 120,60 120,40 220,160 220))','FF2F11212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((140 120,160 20,20 20,20 120,140 120))','SRID=-1;POLYGON((140 120,20 120,20 220,140 220,140 120))','FF2F11212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((120 120,180 60,20 20,20 120,120 120))','SRID=-1;POLYGON((320 20,220 20,80 160,240 140,320 20))','FF2F11212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((20 20,20 180,220 180,220 20,20 20))','SRID=-1;POLYGON((60 40,60 140,180 140,180 40,60 40))','212FF1FF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((20 20,20 180,220 180,220 20,20 20))','SRID=-1;POLYGON((20 20,80 140,160 60,20 20))','212F01FF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((20 20,20 180,220 180,220 20,20 20))','SRID=-1;POLYGON((160 60,20 20,100 140,160 60))','212F01FF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((20 20,20 180,220 180,220 20,20 20))','SRID=-1;POLYGON((20 100,140 160,160 40,20 100))','212F01FF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((20 20,20 180,220 180,220 20,20 20))','SRID=-1;POLYGON((160 40,20 100,160 160,160 40))','212F01FF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((20 20,20 180,220 180,220 20,20 20))','SRID=-1;POLYGON((20 180,180 120,80 40,20 180))','212F01FF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((20 20,20 180,220 180,220 20,20 20))','SRID=-1;POLYGON((180 120,100 40,20 180,180 120))','212F01FF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((20 20,20 180,220 180,220 20,20 20))','SRID=-1;POLYGON((20 20,140 40,140 120,20 160,80 80,20 20))','212F01FF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((20 20,20 180,220 180,220 20,20 20))','SRID=-1;POLYGON((20 20,140 40,140 140,20 180,80 100,20 20))','212F01FF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((20 20,20 180,220 180,220 20,20 20))','SRID=-1;POLYGON((40 180,60 100,180 100,200 180,120 120,40 180))','212F01FF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((20 20,20 180,220 180,220 20,20 20))','SRID=-1;POLYGON((20 180,60 80,180 80,220 180,120 120,20 180))','212F01FF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((20 20,20 180,220 180,220 20,20 20))','SRID=-1;POLYGON((40 60,20 180,100 100,140 180,160 120,220 100,140 40,40 60))','212F01FF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((20 20,20 180,220 180,220 20,20 20))','SRID=-1;POLYGON((60 100,180 100,220 180,120 140,20 180,60 100))','212F01FF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((20 20,20 180,220 180,220 20,20 20))','SRID=-1;POLYGON((20 20,20 140,120 120,120 40,20 20))','212F11FF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((20 20,20 180,220 180,220 20,20 20))','SRID=-1;POLYGON((20 20,20 180,140 140,140 60,20 20))','212F11FF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((20 20,20 180,220 180,220 20,20 20))','SRID=-1;POLYGON((20 20,120 40,120 120,20 140,20 20))','212F11FF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((20 20,20 180,220 180,220 20,20 20))','SRID=-1;POLYGON((120 40,20 20,20 140,120 120,120 40))','212F11FF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((20 20,20 180,220 180,220 20,20 20))','SRID=-1;POLYGON((20 20,140 60,140 140,20 180,20 20))','212F11FF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((20 20,20 180,220 180,220 20,20 20))','SRID=-1;POLYGON((140 60,20 20,20 180,140 140,140 60))','212F11FF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((20 20,20 180,220 180,220 20,20 20))','SRID=-1;POLYGON((20 20,60 120,140 120,180 20,20 20))','212F11FF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((20 20,20 180,220 180,220 20,20 20))','SRID=-1;POLYGON((20 40,120 40,120 120,20 140,20 40))','212F11FF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((20 20,20 180,220 180,220 20,20 20))','SRID=-1;POLYGON((20 20,20 180,60 120,100 180,140 120,220 180,200 120,140 60,20 20))','212F11FF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((150 150,330 150,250 70,70 70,150 150))','SRID=-1;POLYGON((150 150,270 150,140 20,20 20,150 150))','212111212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((150 150,270 150,330 150,250 70,190 70,70 70,150 150))','SRID=-1;POLYGON((150 150,270 150,190 70,140 20,20 20,70 70,150 150))','212111212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((20 20,60 50,20 40,60 70,20 60,60 90,20 90,70 110,20 130,80 130,20 150,80 160,20 170,80 180,20 200,80 200,30 240,80 220,50 260,100 220,100 260,120 220,130 260,140 220,150 280,150 190,160 280,170 190,180 280,190 190,200 280,210 190,220 280,230 190,240 260,250 230,260 260,260 220,290 270,290 220,330 260,300 210,340 240,290 180,340 210,290 170,350 170,240 150,350 150,240 140,350 130,240 120,350 120,240 110,350 110,240 100,350 100,240 90,350 90,240 80,350 80,300 70,340 60,290 60,340 40,300 50,340 20,270 60,310 20,250 60,270 20,230 60,240 20,210 60,210 20,190 70,190 20,180 90,170 20,160 90,150 20,140 90,130 20,120 90,110 20,100 90,100 20,90 60,80 20,70 40,20 20))','SRID=-1;POLYGON((190 140,140 130,200 160,130 150,210 170,130 170,210 180,120 190,220 200,120 200,250 210,120 210,250 220,120 220,250 230,120 240,230 240,120 250,240 260,120 260,240 270,120 270,270 290,120 290,230 300,150 310,250 310,180 320,250 320,200 360,260 330,240 360,280 320,290 370,290 320,320 360,310 320,360 360,310 310,380 340,310 290,390 330,310 280,410 310,310 270,420 280,310 260,430 250,300 250,440 240,300 240,450 230,280 220,440 220,280 210,440 210,300 200,430 190,300 190,440 180,330 180,430 150,320 180,420 130,300 180,410 120,280 180,400 110,280 170,390 90,280 160,400 70,270 160,450 30,260 160,420 30,250 160,390 30,240 160,370 30,230 160,360 30,230 150,330 50,240 130,330 30,230 130,310 30,220 130,280 30,230 100,270 40,220 110,250 30,210 130,240 30,210 100,220 40,200 90,200 20,190 100,180 30,20 20,180 40,20 30,180 50,20 50,180 60,30 60,180 70,20 70,170 80,80 80,170 90,20 80,180 100,40 100,200 110,60 110,200 120,120 120,190 140))','212101212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((70 150,20 160,110 160,20 180,100 200,20 200,190 210,20 210,160 220,20 220,150 230,60 240,180 250,20 260,170 260,60 270,160 270,100 310,170 280,200 260,180 230,210 260,130 330,230 250,210 290,240 250,230 210,260 300,250 230,270 300,270 240,300 340,280 250,320 330,290 250,340 350,290 240,350 360,270 190,350 340,290 200,350 330,300 190,360 320,310 190,360 300,320 200,360 280,330 200,360 260,340 200,370 260,340 180,390 290,340 170,400 260,350 170,400 250,350 160,410 240,350 150,400 170,350 140,310 170,340 140,270 180,330 140,260 170,310 140,240 170,290 140,200 190,270 140,180 190,260 140,170 190,260 130,170 180,250 130,170 170,240 120,170 160,210 120,170 150,210 110,340 130,230 110,420 140,220 100,410 130,220 90,400 120,220 80,390 110,220 70,420 110,240 70,420 100,260 70,420 90,280 70,430 80,230 60,430 60,270 50,450 40,210 50,370 40,260 40,460 30,160 40,210 60,200 110,190 60,190 120,170 50,180 130,150 30,170 130,140 20,160 120,130 20,160 150,120 20,160 170,110 20,160 190,100 20,150 190,90 20,140 180,80 20,120 140,70 20,120 150,60 20,110 150,50 20,100 140,50 30,90 130,40 30,80 120,30 30,80 130,30 40,80 140,20 40,70 140,40 90,60 130,20 90,60 140,20 130,70 150))','SRID=-1;POLYGON((190 140,140 130,200 160,130 150,210 170,130 170,210 180,120 190,220 200,120 200,250 210,120 210,250 220,120 220,250 230,120 240,230 240,120 250,240 260,120 260,240 270,120 270,270 290,120 290,230 300,150 310,250 310,180 320,250 320,200 360,260 330,240 360,280 320,290 370,290 320,320 360,310 320,360 360,310 310,380 340,310 290,390 330,310 280,410 310,310 270,420 280,310 260,430 250,300 250,440 240,300 240,450 230,280 220,440 220,280 210,440 210,300 200,430 190,300 190,440 180,330 180,430 150,320 180,420 130,300 180,410 120,280 180,400 110,280 170,390 90,280 160,400 70,270 160,450 30,260 160,420 30,250 160,390 30,240 160,370 30,230 160,360 30,230 150,330 50,240 130,330 30,230 130,310 30,220 130,280 30,230 100,270 40,220 110,250 30,210 130,240 30,210 100,220 40,200 90,200 20,190 100,180 30,20 20,180 40,20 30,180 50,20 50,180 60,30 60,180 70,20 70,170 80,80 80,170 90,20 80,180 100,40 100,200 110,60 110,200 120,120 120,190 140))','212111212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((60 160,220 160,220 20,60 20,60 160))','SRID=-1;POLYGON((60 160,20 200,260 200,220 160,140 80,60 160))','212101212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((60 160,220 160,220 20,60 20,60 160))','SRID=-1;POLYGON((60 160,20 200,260 200,140 80,60 160))','212101212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((60 160,220 160,220 20,60 20,60 160))','SRID=-1;POLYGON((20 200,140 80,260 200,20 200))','212101212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((60 160,220 160,220 20,60 20,60 160))','SRID=-1;POLYGON((20 200,60 160,140 80,220 160,260 200,20 200))','212101212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((60 160,220 160,220 20,60 20,60 160))','SRID=-1;POLYGON((20 200,60 160,140 80,260 200,20 200))','212101212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((0 0,0 200,200 200,200 0,0 0))','SRID=-1;POLYGON((100 100,1000000 110,10000000 100,100 100))','212101212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((100 0,100 200,200 200,200 0,100 0))','SRID=-1;POLYGON((100 100,1000000 110,10000000 100,100 100))','212101212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((120 0,120 200,200 200,200 0,120 0))','SRID=-1;POLYGON((100 100,1000000 110,10000000 100,100 100))','212101212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((0 0,0 200,110 200,110 0,0 0))','SRID=-1;POLYGON((100 100,1000000 110,10000000 100,100 100))','212101212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((100 100,100 200,200 200,200 100,100 100))','SRID=-1;POLYGON((100 100,2100 110,2100 100,100 100))','212111212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((100 100,100 200,200 200,200 100,100 100))','SRID=-1;POLYGON((100 100,2101 110,2101 100,100 100))','212111212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((100 100,200 200,200 100,100 100))','SRID=-1;POLYGON((100 100,2101 110,2101 100,100 100))','212111212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((100 100,100 200,200 200,200 100,100 100))','SRID=-1;POLYGON((100 100,1000000 110,1000000 100,100 100))','212111212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((120 100,120 200,200 200,200 100,120 100))','SRID=-1;POLYGON((100 100,500 110,500 100,100 100))','212111212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((120 100,120 200,200 200,200 100,120 100))','SRID=-1;POLYGON((100 100,501 110,501 100,100 100))','212111212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((120 100,130 200,200 200,200 100,120 100))','SRID=-1;POLYGON((100 100,501 110,501 100,100 100))','212111212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((120 100,17 200,200 200,200 100,120 100))','SRID=-1;POLYGON((100 100,501 110,501 100,100 100))','212111212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((120 100,120 200,200 200,200 100,120 100))','SRID=-1;POLYGON((100 100,1000000 110,1000000 100,100 100))','212111212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((101 99,101 1000000,102 1000000,101 99))','SRID=-1;POLYGON((100 100,1000000 110,1000000 100,100 100))','212101212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((100 100,200 101,200 100,100 100))','SRID=-1;POLYGON((100 100,2101 110,2101 100,100 100))','212111212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((16 319,150 39,25 302,160 20,265 20,127 317,16 319))','SRID=-1;POLYGON((10 307,22 307,153 34,22 34,10 307))','212101212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((160 200,210 70,120 70,160 200))','SRID=-1;POLYGON((160 200,310 20,20 20,160 200),(160 200,260 40,70 40,160 200))','FF2F01212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((170 120,240 100,260 50,190 70,170 120))','SRID=-1;POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))','FF2F01212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((270 90,200 50,150 80,210 120,270 90))','SRID=-1;POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))','FF2F01212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((170 120,260 100,240 60,150 80,170 120))','SRID=-1;POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))','FF2F01212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((220 120,270 80,200 60,160 100,220 120))','SRID=-1;POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))','FF2F01212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((260 50,180 70,180 110,260 90,260 50))','SRID=-1;POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))','FF2F01212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((230 110,290 80,190 60,140 90,230 110))','SRID=-1;POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))','FF2F01212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((170 120,330 120,260 50,100 50,170 120))','SRID=-1;POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))','FF2F1F212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((170 120,330 120,280 70,120 70,170 120))','SRID=-1;POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))','FF2F11212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((170 120,300 120,250 70,120 70,170 120))','SRID=-1;POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))','FF2F11212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((190 100,310 100,260 50,140 50,190 100))','SRID=-1;POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))','FF2F11212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((280 130,360 130,270 40,190 40,280 130))','SRID=-1;POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,250 120,180 50,100 50,170 120))','2FF1FF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((220 80,180 40,80 40,170 130,270 130,230 90,300 90,250 30,280 30,390 140,150 140,40 30,230 30,280 80,220 80))','SRID=-1;POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,250 120,180 50,100 50,170 120))','2FF1FF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((260 130,360 130,280 40,170 40,260 130))','SRID=-1;POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,250 120,180 50,100 50,170 120))','2FF11F212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((240 110,340 110,290 60,190 60,240 110))','SRID=-1;POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,250 120,180 50,100 50,170 120))','2FF11F212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((250 120,350 120,280 50,180 50,250 120))','SRID=-1;POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,250 120,180 50,100 50,170 120))','2FF11F212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((230 210,230 20,20 20,20 210,230 210),(120 180,50 50,200 50,120 180))','SRID=-1;POLYGON((230 210,230 20,20 20,20 210,230 210),(120 180,50 50,200 50,120 180))','2FFF1FFF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((230 210,230 20,20 20,20 210,230 210),(140 40,40 40,40 170,140 40),(110 190,210 190,210 50,110 190))','SRID=-1;POLYGON((230 210,230 20,20 20,20 210,230 210),(140 40,40 40,40 170,140 40),(110 190,210 190,210 50,110 190))','2FFF1FFF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((280 190,330 150,200 110,150 150,280 190))','SRID=-1;MULTIPOLYGON(((140 110,260 110,170 20,50 20,140 110)),((300 270,420 270,340 190,220 190,300 270)))','FF2F01212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((80 190,220 190,140 110,0 110,80 190))','SRID=-1;MULTIPOLYGON(((140 110,260 110,170 20,50 20,140 110)),((300 270,420 270,340 190,220 190,300 270)))','FF2F01212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((330 150,200 110,150 150,280 190,330 150))','SRID=-1;MULTIPOLYGON(((140 110,260 110,170 20,50 20,140 110)),((300 270,420 270,340 190,220 190,300 270)))','FF2F01212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((290 190,340 150,220 120,170 170,290 190))','SRID=-1;MULTIPOLYGON(((140 110,260 110,170 20,50 20,140 110)),((300 270,420 270,340 190,220 190,300 270)))','FF2F01212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((220 190,340 190,260 110,140 110,220 190))','SRID=-1;MULTIPOLYGON(((140 110,260 110,170 20,50 20,140 110)),((300 270,420 270,340 190,220 190,300 270)))','FF2F11212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((140 190,220 190,100 70,20 70,140 190))','SRID=-1;MULTIPOLYGON(((140 110,260 110,170 20,50 20,140 110)),((300 270,420 270,340 190,220 190,300 270)))','FF2F11212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((140 220,60 140,140 60,220 140,140 220))','SRID=-1;MULTIPOLYGON(((100 20,180 20,180 100,100 100,100 20)),((20 100,100 100,100 180,20 180,20 100)),((100 180,180 180,180 260,100 260,100 180)),((180 100,260 100,260 180,180 180,180 100)))','21210F212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOLYGON(((110 110,70 200,150 200,110 110)),((110 110,150 20,70 20,110 110)))','SRID=-1;MULTIPOLYGON(((110 110,160 160,210 110,160 60,110 110)),((110 110,60 60,10 110,60 160,110 110)))','FF2F01212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOLYGON(((110 110,70 200,150 200,110 110),(110 110,100 180,120 180,110 110)),((110 110,150 20,70 20,110 110),(110 110,120 40,100 40,110 110)))','SRID=-1;MULTIPOLYGON(((110 110,160 160,210 110,160 60,110 110),(110 110,160 130,160 90,110 110)),((110 110,60 60,10 110,60 160,110 110),(110 110,60 90,60 130,110 110)))','FF2F01212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOLYGON(((110 110,70 200,200 200,110 110),(110 110,100 180,120 180,110 110)),((110 110,200 20,70 20,110 110),(110 110,120 40,100 40,110 110)))','SRID=-1;MULTIPOLYGON(((110 110,160 160,210 110,160 60,110 110),(110 110,160 130,160 90,110 110)),((110 110,60 60,10 110,60 160,110 110),(110 110,60 90,60 130,110 110)))','FF2F11212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOLYGON(((110 110,20 200,200 200,110 110),(110 110,100 180,120 180,110 110)),((110 110,200 20,20 20,110 110),(110 110,120 40,100 40,110 110)))','SRID=-1;MULTIPOLYGON(((110 110,160 160,210 110,160 60,110 110),(110 110,160 130,160 90,110 110)),((110 110,60 60,10 110,60 160,110 110),(110 110,60 90,60 130,110 110)))','FF2F11212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOLYGON(((110 110,70 200,200 200,110 110),(110 110,100 180,120 180,110 110)),((110 110,200 20,70 20,110 110),(110 110,120 40,100 40,110 110)))','SRID=-1;MULTIPOLYGON(((110 110,160 160,210 110,160 60,110 110),(110 110,160 130,160 90,110 110)),((110 110,60 60,10 110,60 160,110 110),(110 110,60 90,60 130,110 110)))','FF2F11212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOLYGON(((110 110,70 200,200 200,110 110),(110 110,100 180,120 180,110 110)),((110 110,200 20,70 20,110 110),(110 110,120 40,100 40,110 110)))','SRID=-1;MULTIPOLYGON(((110 110,70 200,210 110,70 20,110 110),(110 110,110 140,150 110,110 80,110 110)),((110 110,60 60,10 110,60 160,110 110),(110 110,60 90,60 130,110 110)))','212111212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POLYGON((100 60,140 100,100 140,60 100,100 60))','SRID=-1;MULTIPOLYGON(((80 40,120 40,120 80,80 80,80 40)),((120 80,160 80,160 120,120 120,120 80)),((80 120,120 120,120 160,80 160,80 120)),((40 80,80 80,80 120,40 120,40 80)))','21210F212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(150 150,40 230)','SRID=-1;POLYGON((150 150,410 150,280 20,20 20,150 150))','FF1F00212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 40,50 130,130 130)','SRID=-1;POLYGON((150 150,410 150,280 20,20 20,150 150))','FF1F0F212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 230,150 150)','SRID=-1;POLYGON((150 150,410 150,280 20,20 20,150 150))','FF1F00212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(210 150,330 150)','SRID=-1;POLYGON((150 150,410 150,280 20,20 20,150 150))','F1FF0F212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(200 150,310 150,360 220)','SRID=-1;POLYGON((150 150,410 150,280 20,20 20,150 150))','F11F00212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(180 150,250 150,230 250,370 250,410 150)','SRID=-1;POLYGON((150 150,410 150,280 20,20 20,150 150))','F11F0F212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(210 210,220 150,320 150,370 210)','SRID=-1;POLYGON((150 150,410 150,280 20,20 20,150 150))','F11FF0212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(20 60,150 60)','SRID=-1;POLYGON((150 150,410 150,280 20,20 20,150 150))','1010F0212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(60 90,310 180)','SRID=-1;POLYGON((150 150,410 150,280 20,20 20,150 150))','101FF0212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(90 210,210 90)','SRID=-1;POLYGON((150 150,410 150,280 20,20 20,150 150))','1010F0212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(290 10,130 170)','SRID=-1;POLYGON((150 150,410 150,280 20,20 20,150 150))','101FF0212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(30 100,100 100,180 100)','SRID=-1;POLYGON((150 150,410 150,280 20,20 20,150 150))','1010F0212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(20 100,100 100,360 100,410 100)','SRID=-1;POLYGON((150 150,410 150,280 20,20 20,150 150))','101FF0212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(90 210,150 150,210 90)','SRID=-1;POLYGON((150 150,410 150,280 20,20 20,150 150))','1010F0212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(180 90,280 120)','SRID=-1;POLYGON((150 150,410 150,280 20,20 20,150 150))','1FF0FF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(70 70,80 20)','SRID=-1;POLYGON((150 150,410 150,280 20,20 20,150 150))','1FFF0F212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(130 20,150 60)','SRID=-1;POLYGON((150 150,410 150,280 20,20 20,150 150))','1FF00F212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(70 70,80 20,140 20,150 60)','SRID=-1;POLYGON((150 150,410 150,280 20,20 20,150 150))','11F00F212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(170 50,170 20,240 20,260 60)','SRID=-1;POLYGON((150 150,410 150,280 20,20 20,150 150))','11F0FF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(50 100,140 190,280 190)','SRID=-1;POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))','FF1FF0212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(140 60,180 100,290 100)','SRID=-1;POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))','FF1FF0212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(170 120,210 80,270 80)','SRID=-1;POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))','FF1F00212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(170 120,260 50)','SRID=-1;POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))','FF1F0F212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(190 90,190 270)','SRID=-1;POLYGON((190 190,360 20,20 20,190 190),(190 190,280 50,100 50,190 190))','F01FF0212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(60 160,150 70)','SRID=-1;POLYGON((190 190,360 20,20 20,190 190),(110 110,250 100,140 30,110 110))','F01FF0212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(60 160,150 70)','SRID=-1;POLYGON((190 190,20 20,360 20,190 190),(250 100,110 110,140 30,250 100))','F01FF0212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(60 160,150 70)','SRID=-1;POLYGON((190 190,20 20,360 20,190 190),(250 100,110 110,140 30,250 100))','F01FF0212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(190 90,190 190,190 270)','SRID=-1;POLYGON((190 190,360 20,20 20,190 190),(190 190,280 50,100 50,190 190))','F01FF0212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(60 160,110 110,150 70)','SRID=-1;POLYGON((190 190,360 20,20 20,190 190),(110 110,250 100,140 30,110 110))','F01FF0212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(60 160,110 110,150 70)','SRID=-1;POLYGON((190 190,20 20,360 20,190 190),(250 100,110 110,140 30,250 100))','F01FF0212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(60 160,110 110,150 70)','SRID=-1;POLYGON((190 190,110 110,20 20,360 20,190 190),(250 100,110 110,140 30,250 100))','F01FF0212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(130 110,180 110,190 60)','SRID=-1;POLYGON((20 200,240 200,240 20,20 20,20 200),(130 110,60 180,60 40,130 110),(130 110,200 40,200 180,130 110))','FF1F00212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(80 110,180 110)','SRID=-1;POLYGON((20 200,240 200,240 20,20 20,20 200),(130 110,60 180,60 40,130 110),(130 110,200 40,200 180,130 110))','F01FF0212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(80 110,180 110)','SRID=-1;POLYGON((20 200,20 20,240 20,240 200,20 200),(60 180,130 110,60 40,60 180),(130 110,200 40,200 180,130 110))','F01FF0212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(80 110,170 110)','SRID=-1;POLYGON((20 200,20 20,240 20,240 200,20 200),(130 110,60 40,60 180,130 110),(130 180,130 40,200 110,130 180))','F01FF0212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(80 110,130 110,170 110)','SRID=-1;POLYGON((20 200,20 20,240 20,240 200,20 200),(130 110,60 40,60 180,130 110),(130 180,130 40,200 110,130 180))','F01FF0212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(80 110,130 110,180 110)','SRID=-1;POLYGON((20 200,240 200,240 20,20 20,20 200),(130 110,60 180,60 40,130 110),(130 110,200 40,200 180,130 110))','F01FF0212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(80 110,130 110,180 110)','SRID=-1;POLYGON((20 200,20 20,240 20,240 200,20 200),(60 180,130 110,60 40,60 180),(130 110,200 40,200 180,130 110))','F01FF0212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(80 110,130 110,170 110)','SRID=-1;POLYGON((20 200,20 20,240 20,240 200,20 200),(130 110,60 40,60 180,130 110),(130 180,130 40,200 110,130 180))','F01FF0212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(160 70,320 230)','SRID=-1;MULTIPOLYGON(((140 110,260 110,170 20,50 20,140 110)),((300 270,420 270,340 190,220 190,300 270)))','1010FF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(160 70,200 110,280 190,320 230)','SRID=-1;MULTIPOLYGON(((140 110,260 110,170 20,50 20,140 110)),((300 270,420 270,340 190,220 190,300 270)))','1010FF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(70 50,70 150)','SRID=-1;MULTIPOLYGON(((0 0,0 100,140 100,140 0,0 0)),((20 170,70 100,130 170,20 170)))','10F0FF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(110 110,20 200,200 200,110 110)','SRID=-1;POLYGON((20 20,200 20,110 110,20 20))','F01FFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(150 70,160 110,200 60,150 70)','SRID=-1;POLYGON((20 20,200 20,110 110,20 20))','F01FFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(80 60,120 40,120 70,80 60)','SRID=-1;POLYGON((110 110,200 20,20 20,110 110),(110 90,50 30,170 30,110 90))','F01FFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(20 20,200 20,110 110,20 20)','SRID=-1;POLYGON((20 20,200 20,110 110,20 20))','F1FFFF2F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(110 90,170 30,50 30,110 90)','SRID=-1;POLYGON((110 110,200 20,20 20,110 110),(110 90,50 30,170 30,110 90))','F1FFFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(110 110,170 50,170 110,110 110)','SRID=-1;POLYGON((110 110,200 20,20 20,110 110),(110 90,50 30,170 30,110 90))','F11FFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(110 90,70 50,130 50,110 90)','SRID=-1;POLYGON((110 110,200 20,20 20,110 110),(110 90,50 30,170 30,110 90))','F11FFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(110 60,20 150,200 150,110 60)','SRID=-1;POLYGON((20 20,200 20,110 110,20 20))','101FFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(110 130,110 70,200 100,110 130)','SRID=-1;POLYGON((110 110,200 20,20 20,110 110),(110 90,50 30,170 30,110 90))','101FFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(110 90,160 40,60 40,110 90)','SRID=-1;POLYGON((20 20,200 20,110 110,20 20))','1FFFFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(110 100,40 30,180 30,110 100)','SRID=-1;POLYGON((110 110,200 20,20 20,110 110),(110 90,60 40,160 40,110 90))','1FFFFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(110 110,180 30,40 30,110 110)','SRID=-1;POLYGON((110 110,200 20,20 20,110 110),(110 90,60 40,160 40,110 90))','10FFFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(110 90,180 30,40 30,110 90)','SRID=-1;POLYGON((110 110,200 20,20 20,110 110),(110 90,60 40,160 40,110 90))','10FFFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(110 90,50 30,180 30,110 90)','SRID=-1;POLYGON((110 110,200 20,20 20,110 110),(110 90,60 40,160 40,110 90))','11FFFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(110 110,200 200,200 110,110 200)','SRID=-1;POLYGON((110 110,200 20,20 20,110 110))','FF1F00212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(110 110,200 200,110 110,20 200,20 110,200 110)','SRID=-1;POLYGON((110 110,200 20,20 20,110 110))','FF1F00212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(110 110,20 110,200 110,50 110,110 170)','SRID=-1;POLYGON((110 110,200 20,20 20,110 110))','FF1F00212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(110 110,20 200,110 200,110 110,200 200)','SRID=-1;POLYGON((110 110,200 20,20 20,110 110))','FF1F00212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(110 110,170 50,20 200,20 110,200 110)','SRID=-1;POLYGON((110 110,200 20,20 20,110 110))','F11F00212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(110 110,180 40,110 40,110 180)','SRID=-1;POLYGON((110 110,200 20,20 20,110 110))','111F00212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(110 60,50 30,170 30,90 70)','SRID=-1;POLYGON((110 110,200 20,20 20,110 110))','1FF0FF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(110 110,180 40,110 40,110 110,70 40)','SRID=-1;POLYGON((110 110,200 20,20 20,110 110))','11F00F212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(230 70,170 120,190 60,140 60,170 120,270 90)','SRID=-1;POLYGON((150 150,410 150,280 20,20 20,150 150),(170 120,330 120,260 50,100 50,170 120))','F01FF0212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTILINESTRING((20 110,200 110),(200 200,110 110,20 210,110 110))','SRID=-1;POLYGON((110 110,200 20,20 20,110 110))','FF1F00212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTILINESTRING((20 110,200 110),(60 180,60 110,160 110,110 110))','SRID=-1;POLYGON((110 110,200 20,20 20,110 110))','FF1F00212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTILINESTRING((20 110,200 110),(200 200,110 110,20 200,110 200,110 110))','SRID=-1;POLYGON((110 110,200 20,20 20,110 110))','FF1F00212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTILINESTRING((20 110,200 110),(110 50,110 170,110 70,110 150,200 150))','SRID=-1;POLYGON((110 110,200 20,20 20,110 110))','1010F0212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTILINESTRING((20 110,200 110),(50 110,170 110,110 170,110 50,110 170,110 50))','SRID=-1;POLYGON((110 110,200 20,20 20,110 110))','1010F0212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTILINESTRING((20 110,200 110),(110 60,110 160,200 160))','SRID=-1;POLYGON((110 110,200 20,20 20,110 110))','1010F0212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTILINESTRING((20 110,200 110),(110 60,110 160,200 160))','SRID=-1;POLYGON((110 110,200 20,20 20,110 110))','1010F0212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTILINESTRING((110 100,40 30,180 30),(170 30,110 90,50 30))','SRID=-1;POLYGON((110 110,200 20,20 20,110 110))','1FF0FF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTILINESTRING((110 110,60 40,70 20,150 20,170 40),(180 30,40 30,110 80))','SRID=-1;POLYGON((110 110,200 20,20 20,110 110))','11F00F212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTILINESTRING((20 110,200 110,200 160),(110 110,200 110,200 70,20 150))','SRID=-1;MULTIPOLYGON(((110 110,20 20,200 20,110 110)),((110 110,20 200,200 200,110 110)))','FF1F00212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTILINESTRING((20 160,70 110,150 110,200 160),(110 110,20 110,50 80,70 110,200 110))','SRID=-1;MULTIPOLYGON(((110 110,20 20,200 20,110 110)),((110 110,20 200,200 200,110 110)))','FF1F00212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTILINESTRING((20 110,200 110),(110 110,20 170,20 130,200 90))','SRID=-1;MULTIPOLYGON(((110 110,20 20,200 20,110 110)),((110 110,20 200,200 200,110 110)))','FF1F00212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(0 0,0 50,50 50,50 0,0 0)','SRID=-1;MULTILINESTRING((0 0,0 50),(0 50,50 50),(50 50,50 0),(50 0,0 0))','1FFFFFFF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 180,140 180)','SRID=-1;MULTIPOLYGON(((20 320,180 320,180 180,20 180,20 320)),((20 180,20 80,180 80,180 180,20 180)))','1FF0FF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 180,140 180)','SRID=-1;MULTIPOLYGON(((20 320,180 320,180 180,20 180,20 320)),((60 180,60 80,180 80,180 180,60 180)))','11F00F212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(0 0,60 0,60 60,60 0,120 0)','SRID=-1;MULTILINESTRING((0 0,60 0),(60 0,120 0),(60 0,60 60))','10FF0FFF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 40,120 120)','SRID=-1;LINESTRING(40 40,60 120)','FF1F00102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 40,120 120)','SRID=-1;LINESTRING(60 240,40 40)','FF1F00102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 40,180 180)','SRID=-1;LINESTRING(120 120,20 200)','F01FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 40,120 120)','SRID=-1;LINESTRING(60 240,120 120)','FF1F00102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 40,180 180)','SRID=-1;LINESTRING(20 180,140 140)','F01FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 40,120 120)','SRID=-1;LINESTRING(40 120,120 40)','0F1FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 40,100 100)','SRID=-1;LINESTRING(40 40,100 100)','1FFF0FFF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 40,100 100)','SRID=-1;LINESTRING(100 100,40 40)','1FFF0FFF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 40,120 120)','SRID=-1;LINESTRING(40 120,120 160)','FF1FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(20 20,180 180)','SRID=-1;LINESTRING(20 20,180 180)','1FFF0FFF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(20 20,180 180)','SRID=-1;LINESTRING(20 20,110 110)','101F00FF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(20 20,180 180)','SRID=-1;LINESTRING(50 50,140 140)','101FF0FF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(180 180,40 40)','SRID=-1;LINESTRING(120 120,260 260)','1010F0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 40,180 180)','SRID=-1;LINESTRING(260 260,120 120)','1010F0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 40,180 180)','SRID=-1;LINESTRING(120 120,260 260)','1010F0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 40,100 100,200 120,80 240)','SRID=-1;LINESTRING(40 40,20 100,40 160,20 200)','FF1F00102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 40,100 100,200 120,80 240)','SRID=-1;LINESTRING(20 200,40 160,20 100,40 40)','FF1F00102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(80 240,200 120,100 100,40 40)','SRID=-1;LINESTRING(20 200,40 160,20 100,40 40)','FF1F00102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(60 60,60 230,140 230,250 160)','SRID=-1;LINESTRING(20 20,60 60,250 160,310 230)','FF10FF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(60 60,60 230,140 230,250 160)','SRID=-1;LINESTRING(20 20,110 110,200 110,320 230)','FF10FF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(60 110,60 250,360 210)','SRID=-1;LINESTRING(60 110,110 160,250 160,310 160,360 210)','FF1F0F1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(60 110,60 250,360 210)','SRID=-1;LINESTRING(360 210,310 160,110 160,60 110)','FF1F0F1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 40,100 100,200 120,80 240)','SRID=-1;LINESTRING(160 160,240 240)','F01FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 40,100 100,200 120,80 240)','SRID=-1;LINESTRING(240 240,160 160)','F01FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(60 60,60 230,140 230,250 160)','SRID=-1;LINESTRING(60 150,110 100,170 100,110 230)','F01FF01F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(60 60,60 230,140 230,250 160)','SRID=-1;LINESTRING(60 110,110 160,250 160,310 160,360 210)','F010F0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 40,100 100,200 120,80 240)','SRID=-1;LINESTRING(200 120,200 190,150 240,200 240)','F01FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 40,100 100,200 120,80 240)','SRID=-1;LINESTRING(200 240,150 240,200 200,200 120)','F01FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(60 60,60 230,140 230,250 160)','SRID=-1;LINESTRING(60 230,80 140,120 140,140 230)','F01FF01F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(60 110,200 110,250 160,300 210)','SRID=-1;LINESTRING(60 110,110 160,250 160,310 160,360 210)','0F1F00102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(60 110,200 110,250 160,300 210,360 210)','SRID=-1;LINESTRING(60 110,110 160,250 160,310 160,360 210)','0F1F0F1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(60 110,220 110,250 160,280 110)','SRID=-1;LINESTRING(60 110,110 160,250 160,310 160,360 210)','0F1F00102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(60 110,150 110,200 160,250 110,360 110,360 210)','SRID=-1;LINESTRING(60 110,110 160,250 160,310 160,360 210)','0F1F0F1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(130 160,160 110,220 110,250 160,250 210)','SRID=-1;LINESTRING(60 110,110 160,250 160,310 160,360 210)','0F10F0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(130 160,160 110,190 110,230 210)','SRID=-1;LINESTRING(60 110,110 160,250 160,310 160,360 210)','0F10F0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(130 160,160 110,200 110,230 160,260 210,360 210)','SRID=-1;LINESTRING(60 110,110 160,250 160,310 160,360 210)','0F100F102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(130 160,160 110,200 110,230 160,260 210,360 210,380 210)','SRID=-1;LINESTRING(60 110,110 160,250 160,310 160,360 210)','0010F0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(130 160,160 110,200 110,230 160,260 210,380 210)','SRID=-1;LINESTRING(60 110,110 160,250 160,310 160,360 210)','0010F0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(110 160,160 110,200 110,250 160,250 210)','SRID=-1;LINESTRING(60 110,110 160,250 160,310 160,360 210)','0F10F0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(110 160,180 110,250 160,320 110)','SRID=-1;LINESTRING(60 110,110 160,250 160,310 160,360 210)','0F10F0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(140 160,180 80,220 160,250 80)','SRID=-1;LINESTRING(60 110,110 160,250 160,310 160,360 210)','0F10F0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 40,100 100,200 120,130 190)','SRID=-1;LINESTRING(20 130,70 130,160 40)','0F1FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 40,100 100,200 120,130 190)','SRID=-1;LINESTRING(40 160,40 100,110 40,170 40)','0F1FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(130 110,180 160,230 110,280 160,330 110)','SRID=-1;LINESTRING(60 110,110 160,250 160,310 160,360 210)','0F1FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 40,100 100,200 120,130 190)','SRID=-1;LINESTRING(30 140,80 140,100 100,200 30)','0F1FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(110 110,110 160,180 110,250 160,250 110)','SRID=-1;LINESTRING(60 110,110 160,250 160,310 160,360 210)','0F1FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(20 20,80 80,160 80,240 80,300 140)','SRID=-1;LINESTRING(20 60,60 60,60 140,80 80,100 20,140 140,180 20,200 80,220 20,240 80,300 80,270 110,200 110)','0F1FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(20 20,230 20,20 30,170 30,20 40,230 40,20 50,230 60,60 60,230 70,20 70,180 80,60 80,230 90,20 90,230 100,30 100,210 110,20 110,80 120,20 130,170 130,90 120,230 130,170 140,230 140,80 150,160 140,20 140,70 150,20 150,230 160,80 160,230 170,20 160,180 170,20 170,230 180,20 180,40 190,230 190,20 200,230 200)','SRID=-1;LINESTRING(30 210,30 60,40 210,40 30,50 190,50 20,60 160,60 50,70 220,70 50,80 20,80 210,90 50,90 150,100 30,100 210,110 20,110 190,120 50,120 180,130 210,120 20,140 210,130 50,150 210,130 20,160 210,140 30,170 210,150 20,180 210,160 20,190 210,180 80,170 50,170 20,180 70,180 20,190 190,190 30,200 210,200 30,210 210,210 20,220 150,220 20)','001FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 40,100 100,200 120,80 240)','SRID=-1;LINESTRING(40 40,100 100,200 120,80 240)','1FFF0FFF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 40,100 100,200 120,80 240)','SRID=-1;LINESTRING(80 240,200 120,100 100,40 40)','1FFF0FFF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 40,100 100,200 120,80 240)','SRID=-1;LINESTRING(80 240,120 200,200 120,100 100,80 80,40 40)','1FFF0FFF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 40,100 100,200 120,80 240)','SRID=-1;LINESTRING(260 210,240 130,280 120,260 40)','FF1FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(100 20,20 20,20 160,210 160,210 20,110 20,50 120,120 150,200 150)','SRID=-1;LINESTRING(140 130,100 110,120 60,170 60)','FF1FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(60 110,110 160,250 160,310 160,360 210)','SRID=-1;LINESTRING(60 110,110 160,250 160,310 160,360 210)','1FFF0FFF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(60 110,110 160,310 160,360 210)','SRID=-1;LINESTRING(60 110,110 160,250 160,310 160,360 210)','1FFF0FFF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(60 110,110 160,250 160,310 160,360 210)','SRID=-1;LINESTRING(60 110,110 160,250 160)','101F00FF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(60 110,110 160,250 160,310 160,360 210)','SRID=-1;LINESTRING(110 160,310 160,340 190)','101FF0FF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(60 110,110 160,250 160,310 160,360 210)','SRID=-1;LINESTRING(140 160,250 160,310 160,340 190)','101FF0FF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(60 110,110 160,250 160,310 160,360 210)','SRID=-1;LINESTRING(110 160,250 160,310 160)','101FF0FF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 40,100 100,200 120,80 240)','SRID=-1;LINESTRING(200 120,100 100,40 40,140 80,200 40)','1010F0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 40,100 100,200 120,80 240)','SRID=-1;LINESTRING(280 240,240 140,200 120,100 100,40 40)','1F1F00102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 40,100 100,200 120,80 240)','SRID=-1;LINESTRING(80 190,140 140,40 40)','1F1F00102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 40,100 100,200 120,80 240)','SRID=-1;LINESTRING(240 200,200 260,80 240,140 180)','1010F0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 40,100 100,200 120,80 240)','SRID=-1;LINESTRING(140 180,80 240,200 260,240 200)','1010F0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 40,100 100,200 120,80 240)','SRID=-1;LINESTRING(280 240,240 140,200 120,80 240)','1F1F00102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(20 20,80 80,160 80,240 80,300 140)','SRID=-1;LINESTRING(20 80,120 80,200 80,260 20)','1F1FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 40,100 100,200 120,80 240)','SRID=-1;LINESTRING(100 100,200 120,240 140,280 240)','101FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 40,100 100,200 120,80 240)','SRID=-1;LINESTRING(280 240,240 140,200 120,100 100)','101FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(20 20,80 80,160 80,240 80,300 140)','SRID=-1;LINESTRING(80 20,80 80,240 80,300 20)','1F1FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(20 20,80 80,160 80,240 80,300 140)','SRID=-1;LINESTRING(20 80,80 80,120 80,140 140,160 80,200 80,220 20,240 80,270 110,300 80)','1F1FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(100 100,20 180,180 180)','SRID=-1;LINESTRING(100 100,180 20,20 20,100 100)','FF10F01F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(20 100,180 100,100 180)','SRID=-1;LINESTRING(100 100,180 20,20 20,100 100)','0F1FF01F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(100 40,100 160,180 160)','SRID=-1;LINESTRING(100 100,180 20,20 20,100 100)','0F1FF01F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(20 100,100 100,180 100,100 180)','SRID=-1;LINESTRING(100 100,180 20,20 20,100 100)','0F1FF01F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(100 100,160 40)','SRID=-1;LINESTRING(100 100,180 20,20 20,100 100)','1FF0FF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(100 100,180 20)','SRID=-1;LINESTRING(100 100,180 20,20 20,100 100)','1FF0FF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(60 60,100 100,140 60)','SRID=-1;LINESTRING(100 100,180 20,20 20,100 100)','1FF0FF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(100 100,190 10,190 100)','SRID=-1;LINESTRING(100 100,180 20,20 20,100 100)','1F10F01F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(100 100,160 40,160 100)','SRID=-1;LINESTRING(100 100,180 20,20 20,100 100)','1F10F01F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(60 140,160 40,160 140)','SRID=-1;LINESTRING(100 100,180 20,20 20,100 100)','1F1FF01F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(20 20,140 140)','SRID=-1;LINESTRING(80 80,20 80,140 80,80 20,80 140)','F01FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(20 20,140 140)','SRID=-1;LINESTRING(80 80,20 80,140 80)','F01FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(20 20,140 140)','SRID=-1;LINESTRING(80 80,140 80,80 20,80 140)','F01FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(20 20,140 140)','SRID=-1;LINESTRING(80 80,20 80,140 80,80 20,80 80)','0F1FF01F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(20 20,140 140)','SRID=-1;LINESTRING(80 80,20 80,140 80,80 80)','0F1FF01F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(20 20,140 140)','SRID=-1;LINESTRING(80 80,20 80,20 140,140 20,80 20,80 80)','0F1FF01F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(20 20,140 140)','SRID=-1;LINESTRING(20 140,140 20,100 20,100 80)','0F1FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(20 20,140 140)','SRID=-1;LINESTRING(140 80,20 80,120 80,80 20,80 140)','0F1FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(20 20,140 140)','SRID=-1;LINESTRING(140 80,20 80,140 80)','0F1FF01F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(20 20,140 140)','SRID=-1;LINESTRING(140 80,20 80,80 140,80 20)','0F1FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(20 20,140 140)','SRID=-1;LINESTRING(140 80,80 80,20 80,50 140,50 60)','0F1FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(20 20,140 140)','SRID=-1;LINESTRING(140 80,20 80,120 80,80 20,80 80,80 140)','0F1FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(20 20,140 140)','SRID=-1;LINESTRING(140 80,20 80,80 80,140 80)','0F1FF01F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(20 20,140 140)','SRID=-1;LINESTRING(140 80,20 80,80 140,80 80,80 20)','0F1FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(130 150,220 150,220 240)','SRID=-1;LINESTRING(130 240,130 150,220 20,50 20,130 150)','FF1F00102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(30 150,130 150,250 150)','SRID=-1;LINESTRING(130 240,130 150,220 20,50 20,130 150)','F01FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(30 150,250 150)','SRID=-1;LINESTRING(130 240,130 150,220 20,50 20,130 150)','F01FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(30 150,130 150,250 150)','SRID=-1;LINESTRING(130 240,130 20,30 20,130 150)','F01FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(30 150,250 150)','SRID=-1;LINESTRING(120 240,120 20,20 20,120 170)','0F1FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(200 200,20 20,200 20,110 110,20 200,110 200,110 110)','SRID=-1;LINESTRING(110 110,200 110)','FF1F00102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(110 110,200 110)','SRID=-1;LINESTRING(200 200,20 20,200 20,110 110,20 200,110 200,110 110)','FF1F00102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(20 110,200 110)','SRID=-1;LINESTRING(200 200,20 20,200 20,110 110,20 200,110 200,110 110)','F01FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(200 200,20 20,200 20,110 110,20 200,110 200,110 110)','SRID=-1;LINESTRING(20 110,200 110)','FF10F0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(90 200,90 130,110 110,150 200)','SRID=-1;LINESTRING(200 200,20 20,200 20,20 200,20 130,90 130)','101FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(200 110,110 110,90 130,90 200)','SRID=-1;LINESTRING(200 200,20 20,200 20,20 200,20 130,90 130)','101FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(80 80,150 80,210 80)','SRID=-1;MULTILINESTRING((20 20,140 140),(20 140,140 20))','FF10F0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 80,160 200,260 20,40 80)','SRID=-1;LINESTRING(40 80,160 200,260 20,40 80)','1FFFFFFF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 80,160 200,260 20,40 80)','SRID=-1;LINESTRING(40 80,260 20,160 200,40 80)','1FFFFFFF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 80,160 200,260 20,40 80)','SRID=-1;LINESTRING(260 20,40 80,160 200,260 20)','1FFFFFFF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 80,160 200,260 20,40 80)','SRID=-1;LINESTRING(100 140,160 200,260 20,40 80,100 140)','1FFFFFFF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(100 100,180 20,20 20,100 100)','SRID=-1;LINESTRING(100 100,180 180,20 180,100 100)','0F1FFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 150,40 40,150 40,150 150,40 150)','SRID=-1;LINESTRING(40 150,150 40,170 20,170 190,40 150)','0F1FFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(100 100,180 20,20 20,100 100)','SRID=-1;LINESTRING(180 100,20 100,100 180,180 100)','0F1FFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(100 100,180 20,20 20,100 100)','SRID=-1;LINESTRING(180 180,100 100,20 180,180 180)','0F1FFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(20 180,100 100,20 20,20 180)','SRID=-1;LINESTRING(100 20,100 180,180 100,100 20)','0F1FFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 150,40 40,150 40,150 150,40 150)','SRID=-1;LINESTRING(170 20,20 170,170 170,170 20)','0F1FFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 150,40 40,150 40,150 150,40 150)','SRID=-1;LINESTRING(40 150,150 150,90 210,40 150)','1F1FFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 150,40 40,150 40,150 150,40 150)','SRID=-1;LINESTRING(20 150,170 150,90 230,20 150)','1F1FFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(40 150,40 40,150 40,150 150,40 150)','SRID=-1;LINESTRING(40 150,150 150,150 40,20 40,20 150,40 150)','1F1FFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(110 110,200 20,20 20,110 110)','SRID=-1;LINESTRING(110 110,200 200,110 110,20 200,20 110,200 110)','F01FFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(110 110,200 20,20 20,110 110)','SRID=-1;LINESTRING(110 110,20 110,200 110,50 110,110 170)','F01FFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(110 110,200 20,20 20,110 110)','SRID=-1;LINESTRING(110 110,20 200,110 200,110 110,200 200)','F01FFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(110 110,200 20,20 20,110 110)','SRID=-1;LINESTRING(200 20,20 200,200 200,110 110,110 40)','101FFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(110 110,200 20,20 20,110 110)','SRID=-1;LINESTRING(200 20,20 200,200 200,20 20)','101FFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(110 110,20 110,110 20,20 20,110 110)','SRID=-1;LINESTRING(110 110,200 200,110 200,200 110,110 110)','0F1FFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(20 120,120 120,20 20,120 20,20 120)','SRID=-1;LINESTRING(170 100,70 100,170 170,70 170,170 100)','0F1FFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(20 110,110 110,20 20,110 20,20 110)','SRID=-1;LINESTRING(110 160,70 110,60 160,20 130,110 160)','0F1FFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(20 200,200 200,20 20,200 20,20 200)','SRID=-1;LINESTRING(20 110,200 110,200 160,20 60,20 110)','0F1FFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(20 110,110 110,20 20,110 20,20 110)','SRID=-1;LINESTRING(200 200,110 110,200 110,110 200,200 200)','0F1FFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;LINESTRING(20 120,120 120,20 20,120 20,20 120)','SRID=-1;LINESTRING(220 120,120 20,220 20,120 120,220 120)','0F1FFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTILINESTRING((70 20,20 90,70 170),(70 170,120 90,70 20))','SRID=-1;MULTILINESTRING((70 20,20 90,70 170),(70 170,120 90,70 20))','1FFFFFFF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTILINESTRING((20 20,90 20,170 20),(90 20,90 80,90 140))','SRID=-1;MULTILINESTRING((20 20,90 20,170 20),(90 20,90 80,90 140))','1FFF0FFF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTILINESTRING((20 20,90 20,170 20),(90 20,90 80,90 140))','SRID=-1;MULTILINESTRING((90 140,90 60,90 20),(170 20,130 20,20 20))','1FFF0FFF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTILINESTRING((20 20,90 20,170 20),(90 20,90 80,90 140))','SRID=-1;MULTILINESTRING((90 20,170 100,170 140),(170 60,90 20,20 60),(130 100,130 60,90 20,50 90))','FF1F00102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTILINESTRING((20 20,90 20,170 20),(90 20,90 80,90 140))','SRID=-1;MULTILINESTRING((90 20,170 100,170 140),(130 140,130 60,90 20,20 90,90 20,130 60,170 60))','FF1F00102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTILINESTRING((20 20,90 20,170 20),(90 20,90 80,90 140))','SRID=-1;MULTILINESTRING((90 20,170 100,170 140),(170 60,90 20,20 60))','FF1F00102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTILINESTRING((20 20,90 20,170 20),(90 20,90 80,90 140))','SRID=-1;MULTILINESTRING((90 20,170 100,170 140),(170 60,90 20,20 60),(130 100,90 20))','FF10F0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTILINESTRING((20 20,90 20,170 20),(90 20,90 80,90 140))','SRID=-1;MULTILINESTRING((90 20,170 100,170 140),(170 60,90 20,20 60),(120 100,170 100,90 20))','FF10F0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTILINESTRING((20 20,90 20,170 20),(90 20,90 80,90 140))','SRID=-1;MULTILINESTRING((90 20,170 100,170 140),(170 60,90 20,20 60),(120 100,170 100,90 20))','FF10F0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTILINESTRING((20 20,90 20,170 20),(90 20,90 80,90 140))','SRID=-1;MULTILINESTRING((90 20,170 100,170 140),(130 140,130 60,90 20,20 90,90 20))','FF10F0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTILINESTRING((20 20,90 20,170 20),(90 20,90 80,90 140))','SRID=-1;MULTILINESTRING((90 20,170 100,170 140),(170 60,90 20,20 60,20 140,90 20))','FF10F0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTILINESTRING((20 20,90 90,20 160),(90 160,90 20))','SRID=-1;MULTILINESTRING((160 160,90 90,160 20),(160 120,120 120,90 90,160 60))','0F1FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTILINESTRING((20 20,90 90,20 160),(90 160,90 20))','SRID=-1;MULTILINESTRING((160 160,90 90,160 20),(160 120,120 120,90 90,120 60,160 60))','0F1FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTILINESTRING((20 20,90 90,20 160),(90 160,90 20))','SRID=-1;MULTILINESTRING((160 160,90 90,160 20),(160 120,90 90,160 60))','0F1FF0102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(20 20)','SRID=-1;POLYGON((60 120,60 40,160 40,160 120,60 120))','FF0FFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(70 170)','SRID=-1;POLYGON((110 230,80 160,20 160,20 20,200 20,200 160,140 160,110 230))','FF0FFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 130)','SRID=-1;POLYGON((20 160,80 160,110 100,140 160,200 160,200 20,20 20,20 160))','FF0FFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(100 70)','SRID=-1;POLYGON((20 150,100 150,40 50,170 50,110 150,190 150,190 20,20 20,20 150))','FF0FFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(100 70)','SRID=-1;POLYGON((20 150,100 150,40 50,160 50,100 150,180 150,180 20,20 20,20 150))','FF0FFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(60 120)','SRID=-1;POLYGON((60 120,60 40,160 40,160 120,60 120))','F0FFFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 120)','SRID=-1;POLYGON((60 120,60 40,160 40,160 120,60 120))','F0FFFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(160 120)','SRID=-1;POLYGON((60 120,60 40,160 40,160 120,60 120))','F0FFFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(100 150)','SRID=-1;POLYGON((20 150,100 150,40 50,160 50,100 150,180 150,180 20,20 20,20 150))','F0FFFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(100 80)','SRID=-1;POLYGON((60 120,60 40,160 40,160 120,60 120))','0FFFFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(60 160)','SRID=-1;POLYGON((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))','FF0FFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(190 90)','SRID=-1;POLYGON((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))','FF0FFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(190 190)','SRID=-1;POLYGON((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))','F0FFFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(360 20)','SRID=-1;POLYGON((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))','F0FFFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(130 130)','SRID=-1;POLYGON((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))','F0FFFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(280 50)','SRID=-1;POLYGON((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))','F0FFFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(150 100)','SRID=-1;POLYGON((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))','F0FFFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(100 50)','SRID=-1;POLYGON((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))','F0FFFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(140 120)','SRID=-1;POLYGON((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))','0FFFFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(190 50)','SRID=-1;POLYGON((190 190,360 20,20 20,190 190),(90 50,150 110,190 50,90 50),(190 50,230 110,290 50,190 50))','F0FFFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(180 90)','SRID=-1;POLYGON((190 190,360 20,20 20,190 190),(180 140,180 40,80 40,180 140),(180 90,210 140,310 40,230 40,180 90))','F0FFFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(20 80,110 160,20 160)','SRID=-1;POLYGON((60 120,60 40,160 40,160 120,60 120))','FF0FFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(20 80,60 120,20 160)','SRID=-1;POLYGON((60 120,60 40,160 40,160 120,60 120))','F00FFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(10 80,110 170,110 120)','SRID=-1;POLYGON((60 120,60 40,160 40,160 120,60 120))','F00FFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(10 80,110 170,160 120)','SRID=-1;POLYGON((60 120,60 40,160 40,160 120,60 120))','F00FFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(20 120,60 120,110 120,160 120,200 120)','SRID=-1;POLYGON((60 120,60 40,160 40,160 120,60 120))','F00FFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(60 120,110 120,160 120)','SRID=-1;POLYGON((60 120,60 40,160 40,160 120,60 120))','F0FFFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(60 120,160 120,160 40,60 40)','SRID=-1;POLYGON((60 120,60 40,160 40,160 120,60 120))','F0FFFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(20 150,60 120,110 80)','SRID=-1;POLYGON((60 120,60 40,160 40,160 120,60 120))','000FFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(110 80,160 120,200 160)','SRID=-1;POLYGON((60 120,60 40,160 40,160 120,60 120))','000FFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(110 80,110 120,110 160)','SRID=-1;POLYGON((60 120,60 40,160 40,160 120,60 120))','000FFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(110 170,110 80)','SRID=-1;POLYGON((60 120,60 40,160 40,160 120,60 120))','0F0FFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(60 120,160 120,110 80,110 170)','SRID=-1;POLYGON((60 120,60 40,160 40,160 120,60 120))','000FFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(90 80,130 80)','SRID=-1;POLYGON((60 120,60 40,160 40,160 120,60 120))','0FFFFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(60 120,160 120,110 80)','SRID=-1;POLYGON((60 120,60 40,160 40,160 120,60 120))','00FFFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(40 170,40 90,130 170)','SRID=-1;POLYGON((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))','FF0FFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(90 170,280 170,190 90)','SRID=-1;POLYGON((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))','FF0FFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(190 110,150 70,230 70)','SRID=-1;POLYGON((190 190,360 20,20 20,190 190),(280 50,100 50,190 140,280 50))','FF0FFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(100 100)','SRID=-1;MULTIPOLYGON(((20 100,20 20,100 20,100 100,20 100)),((100 180,100 100,180 100,180 180,100 180)))','F0FFFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(20 100)','SRID=-1;MULTIPOLYGON(((20 100,20 20,100 20,100 100,20 100)),((100 180,100 100,180 100,180 180,100 180)))','F0FFFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(60 100)','SRID=-1;MULTIPOLYGON(((20 100,20 20,100 20,100 100,20 100)),((100 180,100 100,180 100,180 180,100 180)))','F0FFFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;MULTIPOLYGON(((110 110,20 200,200 200,110 110),(110 110,80 180,140 180,110 110)),((110 110,20 20,200 20,110 110),(110 110,80 40,140 40,110 110)))','F0FFFF212'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 200)','SRID=-1;LINESTRING(90 80,160 150,300 150,340 150,340 240)','FF0FFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(90 80)','SRID=-1;LINESTRING(90 80,160 150,300 150,340 150,340 240)','F0FFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(340 240)','SRID=-1;LINESTRING(90 80,160 150,300 150,340 150,340 240)','F0FFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(230 150)','SRID=-1;LINESTRING(90 80,160 150,300 150,340 150,340 240)','0FFFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(160 150)','SRID=-1;LINESTRING(90 80,160 150,300 150,340 150,340 240)','0FFFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(90 150)','SRID=-1;LINESTRING(150 150,20 20,280 20,150 150)','FF0FFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(150 80)','SRID=-1;LINESTRING(150 150,20 20,280 20,150 150)','FF0FFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(150 150)','SRID=-1;LINESTRING(150 150,20 20,280 20,150 150)','0FFFFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(100 20)','SRID=-1;LINESTRING(150 150,20 20,280 20,150 150)','0FFFFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(20 20)','SRID=-1;LINESTRING(150 150,20 20,280 20,150 150)','0FFFFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(220 220)','SRID=-1;LINESTRING(110 110,220 20,20 20,110 110,220 220)','F0FFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;LINESTRING(110 110,220 20,20 20,110 110,220 220)','F0FFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;LINESTRING(110 110,220 20,20 20,220 220)','F0FFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 20)','SRID=-1;LINESTRING(110 110,220 20,20 20,220 220)','0FFFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(220 20)','SRID=-1;LINESTRING(110 110,220 20,20 20,220 220)','0FFFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 20)','SRID=-1;LINESTRING(220 220,20 20,220 20,110 110)','0FFFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(20 20)','SRID=-1;LINESTRING(220 220,20 20,220 20,110 110)','0FFFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(20 110)','SRID=-1;LINESTRING(20 200,20 20,110 20,20 110,110 200)','0FFFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(20 200)','SRID=-1;LINESTRING(20 200,200 20,20 20,200 200)','F0FFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;LINESTRING(20 200,200 20,140 20,140 80,80 140,20 140)','0FFFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;LINESTRING(20 200,200 20,20 20,200 200)','0FFFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(80 140)','SRID=-1;LINESTRING(20 200,110 110,200 20,140 20,140 80,110 110,80 140,20 140)','0FFFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;LINESTRING(20 200,110 110,200 20,140 20,140 80,110 110,80 140,20 140)','0FFFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;LINESTRING(20 200,200 20,140 20,140 80,110 110,80 140,20 140)','0FFFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;LINESTRING(20 200,110 110,200 20,20 20,110 110,200 200)','0FFFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;LINESTRING(20 200,200 20,20 20,110 110,200 200)','0FFFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;LINESTRING(20 200,110 110,20 20,200 20,110 110,200 200)','0FFFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;LINESTRING(110 110,110 200,20 200,110 110,200 20,140 20,140 80,110 110,80 140,20 140)','F0FFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;LINESTRING(110 110,110 200,20 200,200 20,140 20,140 80,110 110,80 140,20 140)','F0FFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;LINESTRING(110 110,110 200,20 200,200 20,140 20,140 80,80 140,20 140)','F0FFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;LINESTRING(110 110,110 200,20 200,110 110,200 20,20 20,110 110,200 200)','F0FFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;LINESTRING(110 110,110 200,20 200,200 20,20 20,110 110,200 200)','F0FFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;LINESTRING(110 110,110 200,20 200,200 20,20 20,200 200)','F0FFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;LINESTRING(110 110,110 200,20 200,110 110,20 20,200 20,110 110,200 200)','F0FFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;LINESTRING(110 110,110 200,20 200,200 20,200 110,110 110,200 200)','F0FFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;LINESTRING(200 200,110 110,20 20,200 20,110 110,20 200,110 200,110 110)','F0FFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;LINESTRING(200 200,20 20,200 20,110 110,20 200,110 200,110 110)','F0FFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;LINESTRING(200 200,20 20,200 20,20 200,110 200,110 110)','F0FFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;LINESTRING(200 200,110 110,200 20,20 20,110 110,20 200,110 200,110 110)','F0FFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;LINESTRING(200 200,20 20,20 110,110 110,20 200,110 200,110 110)','F0FFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 160)','SRID=-1;LINESTRING(110 160,200 250,110 250,110 160,110 110,110 20,20 20,110 110)','F0FFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 160)','SRID=-1;LINESTRING(110 160,200 250,110 250,110 110,110 20,20 20,110 110)','F0FFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;LINESTRING(110 160,200 250,110 250,110 160,110 110,110 20,20 20,110 110)','F0FFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;LINESTRING(110 160,200 250,110 250,110 160,110 20,20 20,110 110)','F0FFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;LINESTRING(110 110,200 200,110 200,110 110,110 20,20 20,110 110)','0FFFFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;LINESTRING(110 110,200 200,110 200,110 20,20 20,110 110)','0FFFFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(140 200)','SRID=-1;LINESTRING(110 110,200 200,110 200,110 110,110 20,20 20,110 110)','0FFFFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 200)','SRID=-1;LINESTRING(110 110,200 200,110 200,110 110,110 20,20 20,110 110)','0FFFFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;LINESTRING(110 110,200 200,110 200,110 110,110 20,200 20,110 110)','0FFFFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(140 200)','SRID=-1;LINESTRING(110 110,200 200,110 200,110 110,110 20,200 20,110 110)','0FFFFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 200)','SRID=-1;LINESTRING(110 110,200 200,110 200,110 110,110 20,200 20,110 110)','0FFFFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(90 130)','SRID=-1;LINESTRING(90 130,20 130,20 200,90 130,200 20,20 20,200 200)','F0FFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;LINESTRING(90 130,20 130,20 200,90 130,200 20,20 20,200 200)','0FFFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(90 130)','SRID=-1;LINESTRING(90 130,20 130,20 200,200 20,20 20,200 200)','F0FFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;LINESTRING(90 130,20 130,20 200,200 20,20 20,200 200)','0FFFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(90 130)','SRID=-1;LINESTRING(200 200,20 20,200 20,90 130,20 200,20 130,90 130)','F0FFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;LINESTRING(200 200,20 20,200 20,90 130,20 200,20 130,90 130)','0FFFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(90 130)','SRID=-1;LINESTRING(200 200,20 20,200 20,20 200,20 130,90 130)','F0FFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;LINESTRING(200 200,20 20,200 20,20 200,20 130,90 130)','0FFFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;LINESTRING(110 110,20 130,20 200,110 110,200 20,20 20,110 110,200 200,200 130,110 110)','0FFFFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;LINESTRING(110 110,20 130,20 200,200 20,20 20,200 200,200 130,110 110)','0FFFFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;LINESTRING(110 110,80 200,20 200,110 110,200 20,20 20,110 110,200 200,140 200,110 110)','0FFFFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;LINESTRING(110 110,80 200,20 200,200 20,20 20,200 200,140 200,110 110)','0FFFFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;LINESTRING(200 200,20 20,200 20,20 200,200 200)','0FFFFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;LINESTRING(200 200,110 110,20 20,200 20,110 110,20 200,200 200)','0FFFFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;LINESTRING(200 200,110 110,200 20,20 20,110 110,20 200,200 200)','0FFFFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(90 130)','SRID=-1;LINESTRING(90 130,20 130,20 200,90 130,110 110,200 20,20 20,110 110,200 200,90 130)','0FFFFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(90 130)','SRID=-1;LINESTRING(90 130,20 130,20 200,110 110,200 20,20 20,110 110,200 200,90 130)','0FFFFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(90 130)','SRID=-1;LINESTRING(90 130,90 200,20 200,90 130,110 110,200 20,20 20,110 110,200 200,90 130)','0FFFFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(90 130)','SRID=-1;LINESTRING(90 130,90 200,20 200,200 20,20 20,200 200,90 130)','0FFFFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(90 130)','SRID=-1;LINESTRING(90 130,90 200,20 200,110 110,200 20,20 20,110 110,200 200,90 130)','0FFFFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(90 130)','SRID=-1;LINESTRING(90 130,90 200,20 200,200 20,20 20,200 200,90 130)','0FFFFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;LINESTRING(90 130,90 200,20 200,200 20,20 20,200 200,90 130)','0FFFFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 200)','SRID=-1;LINESTRING(110 200,110 110,20 20,200 20,110 110,110 200,200 200)','F0FFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 150)','SRID=-1;LINESTRING(110 200,110 110,20 20,200 20,110 110,110 200,200 200)','0FFFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;LINESTRING(110 200,110 110,20 20,200 20,110 110,110 200,200 200)','0FFFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 200)','SRID=-1;LINESTRING(110 200,110 110,20 20,200 20,110 110,110 200)','0FFFFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 150)','SRID=-1;LINESTRING(110 200,110 110,20 20,200 20,110 110,110 200)','0FFFFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;LINESTRING(110 200,110 110,20 20,200 20,110 110,110 200)','0FFFFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 150)','SRID=-1;LINESTRING(20 200,110 200,110 110,20 20,200 20,110 110,110 200,200 200)','0FFFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 110)','SRID=-1;LINESTRING(20 200,110 200,110 110,20 20,200 20,110 110,110 200,200 200)','0FFFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(110 200)','SRID=-1;LINESTRING(20 200,110 200,110 110,20 20,200 20,110 110,110 200,200 200)','0FFFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(50 250,90 220,130 190)','SRID=-1;LINESTRING(90 80,160 150,300 150,340 150,340 240)','FF0FFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(180 180,230 130,280 80)','SRID=-1;LINESTRING(90 80,160 150,300 150,340 150,340 240)','FF0FFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(50 120,90 80,130 40)','SRID=-1;LINESTRING(90 80,160 150,300 150,340 150,340 240)','F00FFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(300 280,340 240,380 200)','SRID=-1;LINESTRING(90 80,160 150,300 150,340 150,340 240)','F00FFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(230 150,260 120,290 90)','SRID=-1;LINESTRING(90 80,160 150,300 150,340 150,340 240)','0F0FFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(200 190,240 150,270 110)','SRID=-1;LINESTRING(90 80,160 150,300 150,340 150,340 240)','0F0FFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(160 150,190 120,220 90)','SRID=-1;LINESTRING(90 80,160 150,300 150,340 150,340 240)','0F0FFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(120 190,160 150,200 110)','SRID=-1;LINESTRING(90 80,160 150,300 150,340 150,340 240)','0F0FFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(90 80,160 150,340 240)','SRID=-1;LINESTRING(90 80,160 150,300 150,340 150,340 240)','00FFFF1F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(90 80,160 150,300 150)','SRID=-1;LINESTRING(90 80,160 150,300 150,340 150,340 240)','00FFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(90 80,160 150,240 150)','SRID=-1;LINESTRING(90 80,160 150,300 150,340 150,340 240)','00FFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(90 80,130 120,210 150)','SRID=-1;LINESTRING(90 80,160 150,300 150,340 150,340 240)','00FFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(130 120,210 150,340 200)','SRID=-1;LINESTRING(90 80,160 150,300 150,340 150,340 240)','0FFFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(160 150,240 150,340 210)','SRID=-1;LINESTRING(90 80,160 150,300 150,340 150,340 240)','0FFFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(160 150,300 150,340 150)','SRID=-1;LINESTRING(90 80,160 150,300 150,340 150,340 240)','0FFFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(160 150,240 150,340 240)','SRID=-1;LINESTRING(90 80,160 150,300 150,340 150,340 240)','00FFFF102'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(20 20)','SRID=-1;POINT(20 20)','0FFFFFFF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(20 20)','SRID=-1;POINT(40 60)','FF0FFF0F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(40 40)','SRID=-1;MULTIPOINT(20 20,80 80,20 120)','FF0FFF0F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;POINT(20 20)','SRID=-1;MULTIPOINT(20 20,80 80,20 120)','0FFFFF0F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(40 40,80 60,120 100)','SRID=-1;MULTIPOINT(40 40,80 60,120 100)','0FFFFFFF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(40 40,80 60,120 100)','SRID=-1;MULTIPOINT(40 40,120 100,80 60)','0FFFFFFF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(40 40,60 100,100 60,120 120)','SRID=-1;MULTIPOINT(20 120,60 60,100 100,140 40)','FF0FFF0F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(20 20,80 70,140 120,200 170)','SRID=-1;MULTIPOINT(20 20,80 70,140 120,200 170)','0FFFFFFF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(20 20,140 120,80 70,200 170)','SRID=-1;MULTIPOINT(80 70,20 20,200 170,140 120)','0FFFFFFF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(20 20,80 70,140 120,200 170)','SRID=-1;MULTIPOINT(80 70,140 120)','0F0FFFFF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(80 70,20 20,200 170,140 120)','SRID=-1;MULTIPOINT(140 120,80 70)','0F0FFFFF2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(80 70,20 20,200 170,140 120)','SRID=-1;MULTIPOINT(80 170,140 120,200 80)','0F0FFF0F2'); -INSERT INTO "relate_test" VALUES ('SRID=-1;MULTIPOINT(80 70,20 20,200 170,140 120)','SRID=-1;MULTIPOINT(80 170,140 120,200 80,80 70)','0F0FFF0F2'); -COMMIT; diff -Nru postgis-1.5.3/regress/relatematch.sql postgis-2.0.1/regress/relatematch.sql --- postgis-1.5.3/regress/relatematch.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/relatematch.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,12 @@ +SELECT a, b, ST_RelateMatch(a,b) FROM + ( SELECT '101202FFF'::text as a, 'TTTTTTFFF'::text as b) as f; +SELECT a, b, ST_RelateMatch(a,b) FROM + ( SELECT '101202FFF'::text as a, 'T0T2TTFFF'::text as b) as f; +SELECT a, b, ST_RelateMatch(a,b) FROM + ( SELECT '101202FFF'::text as a, '101202FFF'::text as b) as f; +SELECT a, b, ST_RelateMatch(a,b) FROM + ( SELECT '101202FFF'::text as a, '101102FFF'::text as b) as f; +SELECT a, b, ST_RelateMatch(a,b) FROM + ( SELECT 'FFFFFFFFF'::text as a, '1FFFFFFFF'::text as b) as f; +SELECT a, b, ST_RelateMatch(a,b) FROM + ( SELECT 'FFFFFFFFF'::text as a, '*FFFFFFFF'::text as b) as f; diff -Nru postgis-1.5.3/regress/relatematch_expected postgis-2.0.1/regress/relatematch_expected --- postgis-1.5.3/regress/relatematch_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/relatematch_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,6 @@ +101202FFF|TTTTTTFFF|t +101202FFF|T0T2TTFFF|t +101202FFF|101202FFF|t +101202FFF|101102FFF|f +FFFFFFFFF|1FFFFFFFF|f +FFFFFFFFF|*FFFFFFFF|t diff -Nru postgis-1.5.3/regress/remove_repeated_points.sql postgis-2.0.1/regress/remove_repeated_points.sql --- postgis-1.5.3/regress/remove_repeated_points.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/remove_repeated_points.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,22 @@ +SELECT 0, ST_AsText(ST_RemoveRepeatedPoints('GEOMETRYCOLLECTION EMPTY')); +SELECT 1, ST_AsText(ST_RemoveRepeatedPoints('LINESTRING(0 0, 1 1, 1 1, 2 2)')); +SELECT 2, ST_AsText(ST_RemoveRepeatedPoints('LINESTRING(0 0, 1 1, 1 1, 2 2, 2 2, 2 2, 2 2, 3 3, 3 3)')); +SELECT 3, ST_AsText(ST_RemoveRepeatedPoints('MULTILINESTRING((0 0, 1 1, 1 1, 2 2, 2 2, 2 2, 2 2, 3 3, 3 3),(5 5, 5 5, 5 5, 4 4, 2 2))')); +SELECT 4, ST_AsText(ST_RemoveRepeatedPoints('POLYGON((0 0, 10 0, 10 10, 10 10, 0 10, 0 10, 0 10, 0 0, 0 0, 0 0),(5 5, 5 5, 5 8, 8 8, 8 8, 8 8, 8 5,8 5, 5 5, 5 5, 5 5, 5 5, 5 5))')); +SELECT 5, ST_AsText(ST_RemoveRepeatedPoints('MULTIPOLYGON(((0 0, 10 0, 10 10, 10 10, 0 10, 0 10, 0 10, 0 0, 0 0, 0 0),(5 5, 5 5, 5 8, 8 8, 8 8, 8 8, 8 5,8 5, 5 5, 5 5, 5 5, 5 5, 5 5)),((50 50, 50 50, 50 50, 50 60, 50 60, 50 60, 60 60, 60 50, 60 50, 50 50),(55 55, 55 58, 58 58, 58 55, 58 55, 55 55)))')); +SELECT 6, ST_AsText(ST_RemoveRepeatedPoints('MULTIPOINT(0 0, 10 0, 10 10, 10 10, 0 10, 0 10, 0 10, 0 0, 0 0, 0 0,5 5, 5 5, 5 8, 8 8, 8 8, 8 8, 8 5,8 5, 5 5, 5 5, 5 5, 5 5, 5 5,50 50, 50 50, 50 50, 50 60, 50 60, 50 60, 60 60, 60 50, 60 50, 50 50,55 55, 55 58, 58 58, 58 55, 58 55, 55 55)')); +SELECT 7, ST_AsText(ST_RemoveRepeatedPoints('GEOMETRYCOLLECTION(MULTIPOINT(0 0, 10 0, 10 10, 10 10, 0 10, 0 10, 0 10, 0 0, 0 0, 0 0,5 5, 5 5, 5 8, 8 8, 8 8, 8 8, 8 5,8 5, 5 5, 5 5, 5 5, 5 5, 5 5,50 50, 50 50, 50 50, 50 60, 50 60, 50 60, 60 60, 60 50, 60 50, 50 50,55 55, 55 58, 58 58, 58 55, 58 55, 55 55),MULTIPOLYGON(((0 0, 10 0, 10 10, 10 10, 0 10, 0 10, 0 10, 0 0, 0 0, 0 0),(5 5, 5 5, 5 8, 8 8, 8 8, 8 8, 8 5,8 5, 5 5, 5 5, 5 5, 5 5, 5 5)),((50 50, 50 50, 50 50, 50 60, 50 60, 50 60, 60 60, 60 50, 60 50, 50 50),(55 55, 55 58, 58 58, 58 55, 58 55, 55 55))))')); +SELECT 8, ST_AsText(ST_RemoveRepeatedPoints('POINT(0 0)')); +SELECT 9, ST_AsText(ST_RemoveRepeatedPoints('CURVEPOLYGON(CIRCULARSTRING( + -2 0 0 0, + -1 -1 1 2, + 0 0 2 4, + 1 -1 3 6, + 2 0 4 8, + 0 2 2 4, + -2 0 0 0), + (-1 0 1 2, 0 0.5 2 4, + 1 0 3 6, 0 1 3 4, -1 0 1 2))')); +SELECT 10, ST_AsText(ST_RemoveRepeatedPoints('LINESTRING(0 0, 0 0)')); +SELECT 11, ST_AsText(ST_RemoveRepeatedPoints('LINESTRING(0 0, 0 0, 0 0, 0 0, 0 0)')); +SELECT 12, ST_SRID(ST_RemoveRepeatedPoints('SRID=3;LINESTRING(0 0, 0 0, 0 0, 0 0, 0 0)')); diff -Nru postgis-1.5.3/regress/remove_repeated_points_expected postgis-2.0.1/regress/remove_repeated_points_expected --- postgis-1.5.3/regress/remove_repeated_points_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/remove_repeated_points_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,13 @@ +0|GEOMETRYCOLLECTION EMPTY +1|LINESTRING(0 0,1 1,2 2) +2|LINESTRING(0 0,1 1,2 2,3 3) +3|MULTILINESTRING((0 0,1 1,2 2,3 3),(5 5,4 4,2 2)) +4|POLYGON((0 0,10 0,10 10,0 10,0 0),(5 5,5 8,8 8,8 5,5 5)) +5|MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0),(5 5,5 8,8 8,8 5,5 5)),((50 50,50 60,60 60,60 50,50 50),(55 55,55 58,58 58,58 55,55 55))) +6|MULTIPOINT(0 0,10 0,10 10,0 10,5 5,5 8,8 8,8 5,50 50,50 60,60 60,60 50,55 55,55 58,58 58,58 55) +7|GEOMETRYCOLLECTION(MULTIPOINT(0 0,10 0,10 10,0 10,5 5,5 8,8 8,8 5,50 50,50 60,60 60,60 50,55 55,55 58,58 58,58 55),MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0),(5 5,5 8,8 8,8 5,5 5)),((50 50,50 60,60 60,60 50,50 50),(55 55,55 58,58 58,58 55,55 55)))) +8|POINT(0 0) +9|CURVEPOLYGON ZM (CIRCULARSTRING ZM (-2 0 0 0,-1 -1 1 2,0 0 2 4,1 -1 3 6,2 0 4 8,0 2 2 4,-2 0 0 0),(-1 0 1 2,0 0.5 2 4,1 0 3 6,0 1 3 4,-1 0 1 2)) +10|LINESTRING(0 0,0 0) +11|LINESTRING(0 0,0 0) +12|3 diff -Nru postgis-1.5.3/regress/removepoint.sql postgis-2.0.1/regress/removepoint.sql --- postgis-1.5.3/regress/removepoint.sql 2007-06-04 23:06:28.000000000 +0000 +++ postgis-2.0.1/regress/removepoint.sql 2012-02-27 22:08:12.000000000 +0000 @@ -1,26 +1,3 @@ --- Can't remove points from a 2-point linestring -SELECT removepoint('LINESTRING(0 0, 1 1)', 0); - --- Out of range indexes -SELECT removepoint('LINESTRING(0 0, 1 1, 2 2)', 3); -SELECT removepoint('LINESTRING(0 0, 1 1, 2 2)', -1); - --- Removing first/last points -SELECT asewkt(removepoint('LINESTRING(0 0, 1 1, 2 2)', 0)); -SELECT asewkt(removepoint('LINESTRING(0 0, 1 1, 2 2)', 2)); - --- Removing first/last points with higher dimension -SELECT asewkt(removepoint('LINESTRING(0 0 0, 1 1 1, 2 2 2)', 0)); -SELECT asewkt(removepoint('LINESTRING(0 0 0, 1 1 1, 2 2 2)', 2)); -SELECT asewkt(removepoint('LINESTRINGM(0 0 0, 1 1 1, 2 2 2)', 0)); -SELECT asewkt(removepoint('LINESTRINGM(0 0 0, 1 1 1, 2 2 2)', 2)); -SELECT asewkt(removepoint('LINESTRING(0 0 0 0, 1 1 1 1, 2 2 2 2)', 0)); -SELECT asewkt(removepoint('LINESTRING(0 0 0 0, 1 1 1 1, 2 2 2 2)', 2)); - --- Removing intermediate points with higher dimension -SELECT asewkt(removepoint('LINESTRING(0 0 0 0, 1 1 1 1, 2 2 2 2, 3 3 3 3, 4 4 4 4, 5 5 5 5, 6 6 6 6, 7 7 7 7)', 2)); -SELECT asewkt(removepoint('LINESTRING(0 0 0 0, 1 1 1 1, 2 2 2 2, 3 3 3 3, 4 4 4 4, 5 5 5 5, 6 6 6 6, 7 7 7 7)', 4)); - -- Repeat tests for new function names. -- Can't remove points from a 2-point linestring SELECT ST_removepoint('LINESTRING(0 0, 1 1)', 0); diff -Nru postgis-1.5.3/regress/removepoint_expected postgis-2.0.1/regress/removepoint_expected --- postgis-1.5.3/regress/removepoint_expected 2010-12-14 13:14:14.000000000 +0000 +++ postgis-2.0.1/regress/removepoint_expected 2012-02-27 22:08:12.000000000 +0000 @@ -11,16 +11,3 @@ LINESTRING(0 0 0 0,1 1 1 1) LINESTRING(0 0 0 0,1 1 1 1,3 3 3 3,4 4 4 4,5 5 5 5,6 6 6 6,7 7 7 7) LINESTRING(0 0 0 0,1 1 1 1,2 2 2 2,3 3 3 3,5 5 5 5,6 6 6 6,7 7 7 7) -ERROR: Can't remove points from a single segment line -ERROR: Point index out of range (0..2) -ERROR: Point index out of range (0..2) -LINESTRING(1 1,2 2) -LINESTRING(0 0,1 1) -LINESTRING(1 1 1,2 2 2) -LINESTRING(0 0 0,1 1 1) -LINESTRINGM(1 1 1,2 2 2) -LINESTRINGM(0 0 0,1 1 1) -LINESTRING(1 1 1 1,2 2 2 2) -LINESTRING(0 0 0 0,1 1 1 1) -LINESTRING(0 0 0 0,1 1 1 1,3 3 3 3,4 4 4 4,5 5 5 5,6 6 6 6,7 7 7 7) -LINESTRING(0 0 0 0,1 1 1 1,2 2 2 2,3 3 3 3,5 5 5 5,6 6 6 6,7 7 7 7) diff -Nru postgis-1.5.3/regress/run_test postgis-2.0.1/regress/run_test --- postgis-1.5.3/regress/run_test 2010-02-02 23:47:46.000000000 +0000 +++ postgis-2.0.1/regress/run_test 2012-05-16 19:39:26.000000000 +0000 @@ -5,8 +5,12 @@ # TODO: get this part generated by ./configure. For now # we must make sure this matches REGRESS_INSTALLDIR in # Makefile.in. -SHP2PGSQL=00-regress-install/bin/shp2pgsql -PGSQL2SHP=00-regress-install/bin/pgsql2shp +SHP2PGSQL=../loader/shp2pgsql +PGSQL2SHP=../loader/pgsql2shp + +# raster2pgsql is relative to the place where this script +# would be called: raster/test/regress +RASTER2PGSQL=../../loader/raster2pgsql ################################################### # @@ -25,28 +29,36 @@ # Set the locale to "C" so error messages match # Save original locale to set back ORIG_LC_ALL=$LC_ALL +ORIG_LANG=$LANG export LC_ALL=C +export LANG=C -if [ -n "$USE_VERSION" ]; then - if [ "$USE_VERSION" -gt 74 ]; then - PGOPTIONS="${PGOPTIONS} -c lc_messages=C" - export PGOPTIONS - fi -fi - +PGOPTIONS="${PGOPTIONS} -c lc_messages=C" +export PGOPTIONS +REGDIR=`dirname $0` +REGDIR=`cd "${REGDIR}" && pwd` +STAGED_INSTALL_DIR="${REGDIR}/00-regress-install" +STAGED_SCRIPTS_DIR="${STAGED_INSTALL_DIR}/share/contrib/postgis" PSQL="psql" if [ -z "$TMPDIR" ]; then - TMPDIR=/tmp/pgis_reg_$$ + TMPDIR=/tmp/pgis_reg fi -mkdir -p ${TMPDIR} +mkdir -p ${TMPDIR}/tmp +chmod 777 ${TMPDIR}/tmp VERBOSE=0 +OPT_CLEAN=no OPT_DROP=yes OPT_CREATE=yes +OPT_UPGRADE=no +OPT_WITH_TOPO=no +OPT_WITH_RASTER=no +OPT_EXPECT=no +OPT_EXTENSIONS=no if echo '\c' | grep c >/dev/null 2>&1; then ECHO_N='echo -n' @@ -62,10 +74,37 @@ # ################################################### +# +# start_test +# +start_test () +{ + TEST="$1" + ${ECHO_N} " ${TEST} ${ECHO_C}" + RUN=`expr $RUN + 1` + show_progress +} + +# Print a single dot +echo_inline() +{ + msg="$1" + ${ECHO_N} "${msg}${ECHO_C}" +} + # Print a single dot show_progress() { - ${ECHO_N} ".${ECHO_C}" + echo_inline "." +} + +# +# pass +# +pass () +{ + msg="${1}" + echo " ok ${msg}" } # @@ -91,6 +130,40 @@ } # +# run_simple_sql +# +# Run an sql script and hide results unless it fails. +# +# SQL input file name is $1 +# +run_simple_sql () +{ + _sql="$1" + + if [ ! -r "$_sql" ]; then + fail "can't read $_sql" + return 1 + fi + + TMPFILE="${TMPDIR}/test_${RUN}_tmp" + + # Dump output to a temp file. + ${PSQL} -v "VERBOSITY=terse" -tXA < "${_sql}" ${DB} > ${TMPFILE} 2>&1 + # Check if psql errored out. + if [ $? -gt 0 ]; then + fail "Unable to run sql script $_sql" "${TMPFILE}" + return 1 + fi + # Check if psql produced any error output. + grep "^ERROR:" "${TMPFILE}" + if [ $? -eq 0 ]; then + fail "Errors while running sql script $_sql" "${TMPFILE}" + return 1 + fi + rm ${TMPFILE} +} + +# # run_simple_test # # Run an sql script and compare results with the given expected output @@ -112,250 +185,627 @@ return 1 fi - if [ ! -r "$_expected" ]; then - fail "can't read $_expected" - return 1 + if test x"$OPT_EXPECT" = "xno"; then + if [ ! -r "$_expected" ]; then + fail "can't read $_expected" + return 1 + fi fi show_progress OUTFILE="${TMPDIR}/test_${RUN}_out" - TMPFILE="${TMPDIR}/test_${RUN}_tmp" + BETMPDIR="${TMPDIR}/pgis_reg_tmp/" + TMPFILE="${BETMPDIR}/test_${RUN}_tmp" DIFFILE="${TMPDIR}/test_${RUN}_diff" - # Use intermediate file to prevent MingW buffering problems - ${PSQL} -tXA < "${_sql}" ${DB} > ${TMPFILE} 2>&1 - cat ${TMPFILE} \ - | grep -v "^$" \ - | grep -v "^INSERT" \ - | grep -v "^DELETE" \ - | grep -v "^CONTEXT" \ - | grep -v "^UPDATE" \ - | grep -v "^DROP" \ - | grep -v "^CREATE" \ - | grep -v "^SET" \ - | grep -v "^LINE [0-9]" \ - | grep -v "^ *^$" \ - | sed 's/Infinity/inf/g;s/Inf/inf/g;s/1\.#INF/inf/g' \ - | sed 's/[eE]\([+-]\)0\{1,\}\([0-9]\{1,\}\)/e\1\2/g' \ - | sed 's/Self-intersection .*/Self-intersection/' \ - | sed 's/^ROLLBACK/COMMIT/' \ + mkdir -p "${BETMPDIR}" + chmod 777 "${BETMPDIR}" + + # Use only one call to sed to work around MSYS buffering problem + # and use fewer calls to grep for the same problem. MSYS only accepts + # about 16 redirects before hanging. + ${PSQL} -v "VERBOSITY=terse" -v "tmpfile='${TMPFILE}'" -tXA ${DB} < "${_sql}" 2>&1 \ + | grep --binary-files=text -v "^$" \ + | grep --binary-files=text -v "^\(INSERT\|DELETE\|UPDATE\|SELECT\)" \ + | grep --binary-files=text -v "^\(CONTEXT\|RESET\|ANALYZE\)" \ + | grep --binary-files=text -v "^\(DROP\|CREATE\|VACUUM\)" \ + | grep --binary-files=text -v "^\(SET\|TRUNCATE\)" \ + | grep --binary-files=text -v "^LINE [0-9]" \ + | grep --binary-files=text -v "^ *^$" \ + | sed -e 's/Infinity/inf/g' -e 's/Inf/inf/g' -e 's/1\.#INF/inf/g' \ + -e 's/[eE]\([+-]\)0\{1,\}\([0-9]\{1,\}\)/e\1\2/g' \ + -e 's/Self-intersection .*/Self-intersection/' \ + -e 's/^ROLLBACK/COMMIT/' \ > "${OUTFILE}" - rm ${TMPFILE} - if diff -c "${_expected}" "${OUTFILE}" > ${DIFFILE}; then - #SUCCESS=`expr $SUCCESS + 1` - rm "${OUTFILE}" "${DIFFILE}" # we don't need these anymore - return 0 + rm -rf "${BETMPDIR}" # should we keep these ? + + if test x"$OPT_EXPECT" = "xyes"; then + echo_inline " expected" + cp "${OUTFILE}" "${_expected}" else - fail "${_msg}diff expected obtained" "${DIFFILE}" - rm "${OUTFILE}" # diff is enough - return 1 + if diff -u "${_expected}" "${OUTFILE}" > ${DIFFILE}; then + #SUCCESS=`expr $SUCCESS + 1` + rm "${OUTFILE}" "${DIFFILE}" # we don't need these anymore + return 0 + else + fail "${_msg}diff expected obtained" "${DIFFILE}" + # rm "${OUTFILE}" # diff is enough + return 1 + fi fi } +# Drop a table if exists +drop_table_if_exists() +{ + tblname="$1" + ${PSQL} -c "DROP TABLE IF EXISTS ${tblname}" "${DB}" >> ${TMPDIR}/regress_log 2>&1 +} + # -# run_loader_test +# This runs the loader once and checks the output of it. +# It will NOT run if neither the expected SQL nor the expected +# select results file exists, unless you pass true for the final +# parameter. # -# Load a shapefile with different methods, create a 'select *' SQL -# test and run simple test with provided expected output. -# -# SHP input is ${TEST}.shp, expected output is {$TEST}_expected +# $1 - Description of this run of the loader, used for error messages. +# $2 - Table name to load into. +# $3 - The name of the file containing what the +# SQL generated by shp2pgsql should look like. +# $4 - The name of the file containing the expected results of +# SELECT geom FROM _tblname should look like. +# $5 - Command line options for shp2pgsql. +# $6 - If you pass true, this will run the loader even if neither +# of the expected results files exists (though of course +# the results won't be compared with anything). # -run_loader_test () +run_loader_and_check_output() { - _tblname=loadedshp - + _description=$1 + _tblname=$2 + _expected_sql_file=$3 + _expected_select_results_file=$4 + _loader_options=$5 + _run_always=$6 # ON_ERROR_STOP is used by psql to return non-0 on an error _psql_opts="--no-psqlrc --variable ON_ERROR_STOP=true" - #echo "SELECT * from ${_tblname}" > ${TEST}.sql + if [ -n "$_run_always" -o -r "$_expected_sql_file" -o -r "$_expected_select_results_file" ]; then + show_progress + # Produce the output SQL file. + ${SHP2PGSQL} $_loader_options -g the_geom ${TEST}.shp $_tblname \ + > ${TMPDIR}/loader.out \ + 2> ${TMPDIR}/loader.err + if [ $? -gt 0 ]; then + fail " $_description: running shp2pgsql" "${TMPDIR}/loader.err" + return 1 + fi - # - # Run in HEXWKB insert mode - # + # Compare the output SQL file with the expected if there is one. + if [ -r $_expected_sql_file ]; then + show_progress + if diff "${TMPDIR}/loader.out" "$_expected_sql_file" > /dev/null; then + : + else + fail " $_description: actual SQL does not match expected.", \ + "${TMPDIR}/loader.out" + fi + fi - show_progress + # Run the loader SQL script. + show_progress + ${PSQL} ${_psql_opts} -f ${TMPDIR}/loader.out "${DB}" > ${TMPDIR}/loader.err 2>&1 + if [ $? -gt 0 ]; then + fail " $_description: running shp2pgsql output" "${TMPDIR}/loader.err" + return 1 + fi - ${SHP2PGSQL} ${TEST}.shp $_tblname \ - > ${TMPDIR}/loader \ - 2> ${TMPDIR}/loader.err + # Run the select script (if there is one) + if [ -r "${TEST}.select.sql" ]; then + if run_simple_test "${TEST}.select.sql" "$_expected_select_results_file" "$_description"; then + : + else + # That will have already called fail, so just return an error. + return 1 + fi + fi + fi + return 0 +} - if [ $? -gt 0 ]; then - fail "running shp2pgsql" "${TMPDIR}/loader.err" - return 1 +# +# This runs the dumper once and checks the output of it. +# It will NOT run if the expected shp file does not exist, unless +# you pass true for the final parameter. +# +# $1 - Description of this run of the dumper, used for error messages. +# $2 - Table name to dump from. +# $3 - "Expected" .shp file to compare with. +# $3 - If you pass true, this will run the loader even if neither +# of the expected results files exists (though of course +# the results won't be compared with anything). +# +run_dumper_and_check_output() +{ + _description=$1 + _tblname=$2 + _expected_shp_file=$3 + _run_always=$4 + + if [ -n "$_run_always" -o -r "$_expected_shp_file" ]; then + show_progress + ${PGSQL2SHP} -f ${TMPDIR}/dumper ${DB} "${_tblname}" > "${TMPDIR}/dumper.err" 2>&1 + if [ $? -gt 0 ]; then + fail "$_description: dumping loaded table" "${TMPDIR}/dumper.err" + return 1 + fi + # Compare with expected output if there is any. + if [ -r $_expected_shp_file ]; then + show_progress + if diff "${TMPDIR}"/dumper.shp "$_expected_shp_file" > /dev/null; then + : + else + ls -lL "${TMPDIR}"/dumper.shp "$_expected_shp_file" > "${TMPDIR}"/dumper.diff + fail "$_description: dumping loaded table" "${TMPDIR}/dumper.diff" + return 1 + fi + fi fi + return 0 +} - show_progress +# +# run_loader_test +# +# Load a shapefile with different methods, create a 'select *' SQL +# test and run simple test with provided expected output. +# +# SHP input is ${TEST}.shp, expected output is {$TEST}.expected +# +run_loader_test () +{ + # See if there is a custom command-line options file + _custom_opts="" + if [ -r ${TEST}.opts ]; then + _custom_opts=`grep -v ^\s*# ${TEST}.opts` + fi - # MingW hack: use tr to strip off any trailing CR/LFs introduce by MingW which confuse expr - if [ `${PSQL} -t -A -c "SELECT count(*) FROM pg_tables WHERE tablename = '${_tblname}'" "${DB}" | tr -d '\r\n'` -gt 0 ]; then - ${PSQL} -c "DROP TABLE ${_tblname}" "${DB}" >> ${TMPDIR}/regress_log 2>&1 + tblname="loadedshp" + + # If we have some expected files to compare with, run in wkt mode. + if run_loader_and_check_output "wkt test" "${tblname}" "${TEST}-w.sql.expected" "${TEST}-w.select.expected" \ + "-w $_custom_opts"; then + : + else + return 1 fi + drop_table_if_exists "${tblname}" >> ${TMPDIR}/regress_log 2>&1 - ${PSQL} ${_psql_opts} -f ${TMPDIR}/loader "${DB}" > ${TMPDIR}/loader.err 2>&1 - if [ $? -gt 0 ]; then - fail "sourcing shp2pgsql output" "${TMPDIR}/loader.err" + # If we have some expected files to compare with, run in geography mode. + if run_loader_and_check_output "geog test" "${tblname}" "${TEST}-G.sql.expected" "${TEST}-G.select.expected" \ + "-G $_custom_opts"; then + : + else + return 1 + fi + # If we have some expected files to compare with, run the dumper and compare shape files. + if run_dumper_and_check_output "dumper geog test" "${tblname}" "${TEST}-G.shp.expected"; then + : + else return 1 fi + drop_table_if_exists "${tblname}" >> ${TMPDIR}/regress_log 2>&1 - if [ -f "${TEST}-wkb.sql" ]; then - if run_simple_test ${TEST}-wkb.sql ${TEST}-wkb.expected "wkb insert"; then + # Always run in wkb ("normal") mode, even if there are no expected files to compare with. + if run_loader_and_check_output "wkb test" "${tblname}" "${TEST}.sql.expected" "${TEST}.select.expected" \ + "$_custom_opts" "true"; then + : + else + return 1 + fi + # If we have some expected files to compare with, run the dumper and compare shape files. + if run_dumper_and_check_output "dumper wkb test" "${tblname}" "${TEST}.shp.expected"; then + : + else + return 1 + fi + drop_table_if_exists "${tblname}" >> ${TMPDIR}/regress_log 2>&1 + + # Some custom parameters can be incompatible with -D. + if [ -z "$_custom_opts" ]; then + # If we have some expected files to compare with, run in wkt dump mode. + if run_loader_and_check_output "wkt dump test" "${tblname}" "${TEST}-wD.sql.expected" \ + "${TEST}-w.select.expected" "-w -D"; then : else return 1 fi - fi + drop_table_if_exists "${tblname}" >> ${TMPDIR}/regress_log 2>&1 + # If we have some expected files to compare with, run in wkt dump mode. + if run_loader_and_check_output "geog dump test" "${tblname}" "${TEST}-GD.sql.expected" \ + "${TEST}-G.select.expected" "-G -D"; then + : + else + return 1 + fi + drop_table_if_exists "${tblname}" >> ${TMPDIR}/regress_log 2>&1 - # - # Run in HEXWKB dump mode - # + # If we have some expected files to compare with, run in wkb dump mode. + if run_loader_and_check_output "wkb dump test" "${tblname}" "${TEST}-D.sql.expected" \ + "${TEST}.select.expected" "-D"; then + : + else + return 1 + fi + drop_table_if_exists "${tblname}" >> ${TMPDIR}/regress_log 2>&1 + fi - show_progress + return 0 +} - ${SHP2PGSQL} -D ${TEST}.shp $_tblname \ - > ${TMPDIR}/loader \ - 2> ${TMPDIR}/loader.err +# +# This runs the loader once and checks the output of it. +# It will NOT run if neither the expected SQL nor the expected +# select results file exists, unless you pass true for the final +# parameter. +# +# $1 - Description of this run of the loader, used for error messages. +# $2 - Table name to load into. +# $3 - The name of the file containing what the +# SQL generated by shp2pgsql should look like. +# $4 - The name of the file containing the expected results of +# SELECT rast FROM _tblname should look like. +# $5 - Command line options for raster2pgsql. +# $6 - If you pass true, this will run the loader even if neither +# of the expected results files exists (though of course +# the results won't be compared with anything). +# +run_raster_loader_and_check_output() +{ + _description=$1 + _tblname=$2 + _expected_sql_file=$3 + _expected_select_results_file=$4 + _loader_options=$5 + _run_always=$6 + # ON_ERROR_STOP is used by psql to return non-0 on an error + _psql_opts="--no-psqlrc --variable ON_ERROR_STOP=true" - if [ $? -gt 0 ]; then - fail "running shp2pgsql -D" "${TMPDIR}/loader.err" - return 1 + if [ -n "$_run_always" -o -r "$_expected_sql_file" -o -r "$_expected_select_results_file" ]; then + show_progress - fi + # Produce the output SQL file. + ${RASTER2PGSQL} $_loader_options -C -f the_rast ${TEST}.tif $_tblname \ + > ${TMPDIR}/loader.out \ + 2> ${TMPDIR}/loader.err - show_progress + if [ $? -gt 0 ]; then + fail " $_description: running raster2pgsql" "${TMPDIR}/loader.err" + return 1 + fi - ${PSQL} -c "DROP table ${_tblname}" "${DB}" >> ${TMPDIR}/regress_log 2>&1 - ${PSQL} ${_psql_opts} -f ${TMPDIR}/loader "${DB}" > ${TMPDIR}/loader.err 2>&1 - if [ $? -gt 0 ]; then - fail "sourcing shp2pgsql -D output" "${TMPDIR}/loader.err" - return 1 - fi + # Compare the output SQL file with the expected if there is one. + if [ -r $_expected_sql_file ]; then + show_progress + if diff -w "${TMPDIR}/loader.out" "$_expected_sql_file" > /dev/null; then + : + else + fail " $_description: actual SQL does not match expected.", \ + "${TMPDIR}/loader.out" + fi + fi - if [ -f "${TEST}-wkb.sql" ]; then - if run_simple_test ${TEST}-wkb.sql ${TEST}-wkb.expected "wkb dump"; then - : - else + # Run the loader SQL script. + show_progress + ${PSQL} ${_psql_opts} -f ${TMPDIR}/loader.out "${DB}" > ${TMPDIR}/loader.err 2>&1 + if [ $? -gt 0 ]; then + fail " $_description: running raster2pgsql output" "${TMPDIR}/loader.err" return 1 fi - fi - - ########################################################### - # - # Dump and compare. - # Do this using WKB mode, as WKT is unable to reproduce - # M values - # - show_progress + # Run the select script (if there is one) + if [ -r "${TEST}.select.sql" ]; then + if run_simple_test "${TEST}.select.sql" "$_expected_select_results_file" "$_description"; then + : + else + # That will have already called fail, so just return an error. + return 1 + fi + fi + fi + return 0 +} - ${PGSQL2SHP} -f ${TMPDIR}/dumper ${DB} "${_tblname}" > "${TMPDIR}/dumper.err" 2>&1 - if [ $? -gt 0 ]; then - fail "dumping loaded table" "${TMPDIR}/dumper.err" - return 1 +# +# run_raster_loader_test +# +# Load a raster with different methods +# +# raster input is ${TEST}.tif, expected output is {$TEST}.expected +# +run_raster_loader_test () +{ + # See if there is a custom command-line options file + _custom_opts="" + if [ -r ${TEST}.opts ]; then + _custom_opts=`grep -v ^\s*# ${TEST}.opts` fi - show_progress + tblname="loadedrast" - if diff "${TMPDIR}"/dumper.shp "${TEST}".shp > /dev/null; then + if run_raster_loader_and_check_output "test" "${tblname}" "${TEST}.sql.expected" "${TEST}.select.expected" \ + "$_custom_opts" "true"; then : else - ls -lL "${TMPDIR}"/dumper.shp "${TEST}".shp > "${TMPDIR}"/dumper.diff - fail "dumping loaded table" "${TMPDIR}/dumper.diff" return 1 fi + drop_table_if_exists "${tblname}" >> ${TMPDIR}/regress_log 2>&1 -# I'm not sure it's safe to compare indexes -# if diff "${TMPDIR}"/dumper.shx "${TEST}".shx; then -# : -# else -# ls -lL "${TMPDIR}"/dumper.shx "${TEST}".shx > "${TMPDIR}"/dumper.diff -# fail "dumping loaded table" "${TMPDIR}/dumper.diff" -# return 1 -# fi - -# Change in attribute sizes would make this fail -# if diff "${TMPDIR}"/dumper.dbf "${TEST}".dbf; then -# : -# else -# ls -lL "${TMPDIR}"/dumper.dbf "${TEST}".dbf > "${TMPDIR}"/dumper.diff -# fail "dumping loaded table" "${TMPDIR}/dumper.diff" -# return 1 -# fi - - - # - # End of dump and compare. - # - ################################################ - - show_progress + return 0 +} - ${SHP2PGSQL} -w ${TEST}.shp $_tblname \ - > ${TMPDIR}/loader \ - 2> ${TMPDIR}/loader.err +# Log an initialization error and optionally drop the db +init_db_error () +{ + echo + echo " Something went wrong during db initialization ($1)." + if test "$VERBOSE" -eq "1"; then + echo " Last 5 lines of ${TMPDIR}/regress_log follow:" + echo "-----------------------------------------------------------------------------" + tail -5 ${TMPDIR}/regress_log + echo "-----------------------------------------------------------------------------" + else + echo " For details, check ${TMPDIR}/regress_log" + fi + echo - if [ $? -gt 0 ]; then - fail "running shp2pgsql -w" "${TMPDIR}/loader.err" - return 1 + if test x"$OPT_DROP" = "xyes" -a x"$OPT_CREATE" = "xyes"; then + dropdb "${DB}" > /dev/null + else + : echo "Drop database ${DB} manually" fi - show_progress + exit 1 +} - ${PSQL} -c "DROP table ${_tblname}" "${DB}" >> ${TMPDIR}/regress_log 2>&1 - ${PSQL} ${_psql_opts} -f ${TMPDIR}/loader "${DB}" > ${TMPDIR}/loader.err 2>&1 +# Count database objects +count_db_objects () +{ + ${PSQL} ${_psql_opts} -tAc "WITH counts as ( + select count(*) from pg_type union all + select count(*) from pg_proc union all + select count(*) from pg_cast union all + select count(*) from pg_aggregate union all + select count(*) from pg_operator union all + select count(*) from pg_opclass union all + select count(*) from pg_namespace + where nspname NOT LIKE 'pg_%' union all + select count(*) from pg_opfamily ) + select sum(count) from counts;" "${DB}" if [ $? -gt 0 ]; then - fail "sourcing shp2pgsql -w output" "${TMPDIR}/loader.err" - return 1 + init_db_error $1 fi +} - if [ -f "${TEST}-wkt.sql" ]; then - if run_simple_test ${TEST}-wkt.sql ${TEST}-wkt.expected "wkt insert"; then - : - else - return 1 - fi - fi +# Prepare the database for spatial operations (extension method) +prepare_spatial_extensions () +{ + echo "Preparing spatial db ${DB} using EXTENSION" - # - # Run in WKT dump mode - # + # ON_ERROR_STOP is used by psql to return non-0 on an error + _psql_opts="--no-psqlrc --variable ON_ERROR_STOP=true" - show_progress + ${PSQL} ${_psql_opts} -c "CREATE EXTENSION postgis" "${DB}" \ + >> ${TMPDIR}/regress_log 2>&1 || init_db_error "core extension" - ${SHP2PGSQL} -D -w ${TEST}.shp $_tblname \ - > ${TMPDIR}/loader \ - 2> ${TMPDIR}/loader.err + # NOTE: "postgis" extension includes raster... - if [ $? -gt 0 ]; then - fail "running shp2pgsql -D -w" "${TMPDIR}/loader.err" - return 1 + if test x"$OPT_WITH_TOPO" = "xyes"; then # { + ${PSQL} ${_psql_opts} -c "CREATE EXTENSION postgis_topology" "${DB}" \ + >> ${TMPDIR}/regress_log 2>&1 || init_db_error "topology extension" + fi # } - fi +} - show_progress +# Prepare the database for spatial operations (old method) +prepare_spatial () +{ + echo "Preparing spatial db ${DB} " - ${PSQL} -c "DROP table ${_tblname}" "${DB}" >> ${TMPDIR}/regress_log 2>&1 - ${PSQL} ${_psql_opts} -f ${TMPDIR}/loader "${DB}" > ${TMPDIR}/loader.err 2>&1 - if [ $? -gt 0 ]; then - fail "sourcing shp2pgsql -D -w output" "${TMPDIR}/loader.err" - return 1 - fi + # ON_ERROR_STOP is used by psql to return non-0 on an error + _psql_opts="--no-psqlrc --variable ON_ERROR_STOP=true" - if [ -f "${TEST}-wkt.sql" ]; then - if run_simple_test ${TEST}-wkt.sql ${TEST}-wkt.expected "wkt dump"; then - : + ${PSQL} ${_psql_opts} -Xf ${STAGED_SCRIPTS_DIR}/postgis.sql "${DB}" \ + >> ${TMPDIR}/regress_log 2>&1 || init_db_error "core module" + + if test -e ${STAGED_SCRIPTS_DIR}/postgis_comments.sql; then # { + ${PSQL} ${_psql_opts} -Xf ${STAGED_SCRIPTS_DIR}/postgis_comments.sql \ + "${DB}" >> ${TMPDIR}/regress_log 2>&1 || init_db_error "core comments" + fi # } + + if test x"$OPT_WITH_TOPO" = "xyes"; then # { + SCRIPT=${STAGED_SCRIPTS_DIR}/topology.sql + if test -e ${SCRIPT}; then + echo "Adding topology support" + ${PSQL} ${_psql_opts} -Xf ${REGDIR}/../topology/topology.sql "${DB}" \ + >> ${TMPDIR}/regress_log 2>&1 || init_db_error "topology module" else - return 1 + echo "${SCRIPT} not found" >&2 + exit 1 fi - fi + if test -e ${STAGED_SCRIPTS_DIR}/topology_comments.sql; then + ${PSQL} ${_psql_opts} -Xf ${STAGED_SCRIPTS_DIR}/topology_comments.sql \ + "${DB}" >> ${TMPDIR}/regress_log 2>&1 || \ + init_db_error "topology comments" + fi + fi # } + + if test x"$OPT_WITH_RASTER" = "xyes"; then # { + SCRIPT=${STAGED_SCRIPTS_DIR}/rtpostgis.sql + if test -e ${SCRIPT}; then + echo "Adding raster support" + ${PSQL} ${_psql_opts} -Xf ${SCRIPT} "${DB}" \ + >> ${TMPDIR}/regress_log 2>&1 || init_db_error "raster module" + else + echo "${SCRIPT} not found" >&2 + exit 1 + fi + if test -e ${STAGED_SCRIPTS_DIR}/raster_comments.sql; then + ${PSQL} ${_psql_opts} -Xf ${STAGED_SCRIPTS_DIR}/raster_comments.sql \ + "${DB}" >> ${TMPDIR}/regress_log 2>&1 || \ + init_db_error "raster comments" + fi + fi # } +} + +# Create the spatial database +create_spatial () +{ + echo "Creating spatial db ${DB} " + + createdb --encoding=UTF-8 --template=template0 --lc-collate="C" "${DB}" > ${TMPDIR}/regress_log 2>&1 + if [ $? -gt 0 ]; then # { + fail "createdb failed" "${TMPDIR}/regress_log" + exit 1 + fi # } + createlang plpgsql "${DB}" >> ${TMPDIR}/regress_log + + # Count database objects before installing anything + object_count_pre=$(count_db_objects "counting object before postgis install") + + if test x"$OPT_EXTENSIONS" = "xyes"; then # { + prepare_spatial_extensions + else # }{ + prepare_spatial + fi # } +} + +# Upgrade an existing database (soft upgrade) +upgrade_spatial () +{ + echo "Upgrading spatial db ${DB} " + + SCRIPT=${STAGED_SCRIPTS_DIR}/postgis_upgrade_*_minor.sql + if test -e ${SCRIPT}; then + echo "Upgrading core" + ${PSQL} ${_psql_opts} -Xf ${SCRIPT} "${DB}" >> ${TMPDIR}/regress_log 2>&1 || init_db_error "core upgrade" + else + echo "${SCRIPT} not found" >&2 + exit 1 + fi + + if test x"$OPT_WITH_TOPO" = "xyes"; then + SCRIPT=${STAGED_SCRIPTS_DIR}/topology_upgrade_*_minor.sql + if test -e ${SCRIPT}; then + echo "Upgrading topology" + ${PSQL} ${_psql_opts} -Xf ${SCRIPT} "${DB}" >> ${TMPDIR}/regress_log 2>&1 || init_db_error "topology upgrade" + else + echo "${SCRIPT} not found" >&2 + exit 1 + fi + fi + + if test x"$OPT_WITH_RASTER" = "xyes"; then + SCRIPT=${STAGED_SCRIPTS_DIR}/rtpostgis_upgrade_*_minor.sql + if test -e ${SCRIPT}; then + echo "Upgrading raster" + ${PSQL} ${_psql_opts} -Xf ${SCRIPT} "${DB}" >> ${TMPDIR}/regress_log 2>&1 || init_db_error "raster upgrade" + else + echo "${SCRIPT} not found" >&2 + exit 1 + fi + fi +} + +drop_spatial_extensions() +{ + #echo "Dropping spatial from ${DB} using EXTENSION" + + # ON_ERROR_STOP is used by psql to return non-0 on an error + _psql_opts="--no-psqlrc --variable ON_ERROR_STOP=true" - #rm ${TEST}.sql + if test x"$OPT_WITH_TOPO" = "xyes"; then + ${PSQL} ${_psql_opts} -c "DROP EXTENSION postgis_topology;" \ + "${DB}" > ${TMPDIR}/uninstall.log 2> ${TMPDIR}/uninstall.err + if [ $? -gt 0 ]; then # { + fail "DROP EXTENSION postgis_topology failed" "${TMPDIR}/uninstall.err" + ok=no + fi # } + show_progress # on to core uninstall + fi + + ${PSQL} ${_psql_opts} -c "DROP EXTENSION postgis;" \ + "${DB}" > ${TMPDIR}/uninstall.log 2> ${TMPDIR}/uninstall.err + if [ $? -gt 0 ]; then # { + fail "DROP EXTENSION postgis failed" "${TMPDIR}/uninstall.err" + fi # } - return 0; + test x"$ok" = "xyes" + return $? +} + +drop_spatial() +{ + #echo "Dropping spatial from ${DB}" + + ok=yes + + if test x"$OPT_WITH_TOPO" = "xyes"; then + ${PSQL} ${_psql_opts} -Xf ${STAGED_SCRIPTS_DIR}/uninstall_topology.sql \ + "${DB}" > ${TMPDIR}/uninstall.log 2> ${TMPDIR}/uninstall.err + if [ $? -gt 0 ]; then # { + fail "uninstall_topology.sql failed" "${TMPDIR}/uninstall.err" + ok=no + fi # } + show_progress # on to raster uninstall + fi + + if test x"$OPT_WITH_RASTER" = "xyes"; then + ${PSQL} ${_psql_opts} -Xf ${STAGED_SCRIPTS_DIR}/uninstall_rtpostgis.sql \ + "${DB}" > ${TMPDIR}/uninstall.log 2> ${TMPDIR}/uninstall.err + if [ $? -gt 0 ]; then # { + fail "uninstall_rtpostgis.sql failed" "${TMPDIR}/uninstall.err" + ok=no + fi # } + show_progress # on to postgis uninstall + fi + + ${PSQL} ${_psql_opts} -Xf ${STAGED_SCRIPTS_DIR}/uninstall_postgis.sql \ + "${DB}" > ${TMPDIR}/uninstall.log 2> ${TMPDIR}/uninstall.err + if [ $? -gt 0 ]; then # { + fail "uninstall_postgis.sql failed" "${TMPDIR}/uninstall.err" + fi # } + + test x"$ok" = "xyes" + return $? +} + +# Drop spatial from an existing database +uninstall_spatial() +{ + start_test "uninstall" + if test x"$OPT_EXTENSIONS" = "xyes"; then # { + ok=drop_spatial_extensions + else # }{ + ok=drop_spatial + fi # } + + + if $ok; then # { + show_progress # on to objects count + object_count_post=$(count_db_objects "counting object after postgis uninstall") + if test ${object_count_pre} != ${object_count_post}; then # { + fail "Count of object before install (${object_count_pre}) != count after uninstall (${object_count_post})" + else + pass "(${object_count_pre})" + fi # } + + fi # } } ################################################### @@ -378,13 +828,46 @@ OPT_CREATE=no shift continue + elif test "$1" = "--expect"; then + OPT_EXPECT=yes + shift + continue + elif test "$1" = "--extensions"; then + OPT_EXTENSIONS=yes + shift + continue + elif test "$1" = "--upgrade"; then + OPT_UPGRADE=yes + shift + continue + elif test "$1" = "--topology"; then + OPT_WITH_TOPO=yes + shift + continue + elif test "$1" = "--raster"; then + OPT_WITH_RASTER=yes + shift + continue + elif test "$1" = "--clean"; then + OPT_CLEAN=yes + shift + continue else break fi done if [ -z "$1" ]; then - echo "Usage: $0 [-v] [--nocreate] [--nodrop] []" >&2 + echo "Usage: $0 [] []" >&2 + echo "Options:" >&2 + echo " -v be verbose about failures" >&2 + echo " --nocreate do not create the regression database on start" >&2 + echo " --upgrade source the upgrade scripts on start" >&2 + echo " --nodrop do not drop the regression database on exit" >&2 + echo " --raster load also raster extension" >&2 + echo " --topology load also topology extension" >&2 + echo " --clean cleanup test logs on exit" >&2 + echo " --expect save obtained output as expected" >&2 exit 1 fi @@ -399,11 +882,7 @@ if test -z "$db_exists"; then if test x"$OPT_CREATE" = "xyes"; then - echo "Creating spatial db ${DB} " - - createdb "${DB}" > ${TMPDIR}/regress_log - createlang plpgsql "${DB}" >> ${TMPDIR}/regress_log - ${PSQL} -f postgis.sql "${DB}" >> ${TMPDIR}/regress_log 2>&1 + create_spatial else echo "Database ${DB} does not exist" >&2 @@ -421,6 +900,10 @@ fi fi +if test x"$OPT_UPGRADE" = "xyes"; then + upgrade_spatial +fi + libver=`${PSQL} -tAc "select postgis_lib_version()" "${DB}"` if [ -z "$libver" ]; then @@ -442,6 +925,10 @@ geosver=`${PSQL} -tAc "select postgis_geos_version()" "${DB}"` projver=`${PSQL} -tAc "select postgis_proj_version()" "${DB}"` +if test x"$OPT_WITH_RASTER" = "xyes"; then + gdalver=`${PSQL} -tAc "select postgis_gdal_version()" "${DB}"` +fi +svnrev=`${PSQL} -tAc "select postgis_svn_version()" "${DB}"` libbuilddate=`${PSQL} -tAc "select postgis_lib_build_date()" "${DB}"` pgsqlver=`${PSQL} -tAc "select version()" "${DB}"` @@ -450,13 +937,16 @@ echo echo " $pgsqlver" -echo " Postgis $libver - $libbuilddate" +echo " Postgis $libver - r${svnrev} - $libbuilddate" if [ -n "$geosver" ]; then echo " GEOS: $geosver" fi if [ -n "$projver" ]; then echo " PROJ: $projver" fi +if [ -n "$gdalver" ]; then + echo " GDAL: $gdalver" +fi ################################################### # @@ -478,37 +968,111 @@ # catch a common mistake (strip trailing .sql) TEST=`echo "$TEST" | sed 's/\.sql$//'` - #printf %20s " ${TEST}" - #echo -ne " ${TEST}" - ${ECHO_N} " ${TEST}${ECHO_C}" + start_test "${TEST}" - RUN=`expr $RUN + 1` + # Check for a "-pre.sh" file in case there are non-SQL setup tasks needed before + # the test can be run. + if [ -r "${TEST}-pre.sh" ]; then + "${TEST}-pre.sh" + if [ $? -gt 0 ]; then + fail " setup script failed" + continue + else + show_progress + fi + fi + + # Check for a "-pre.sql" file in case there is setup SQL needed before + # the test can be run. + if [ -r "${TEST}-pre.sql" ]; then + if run_simple_sql "${TEST}-pre.sql"; then + show_progress + else + continue + fi + fi - # Check .shp *before* .sql as loader test would + # Check .dbf *before* .sql as loader test could # create the .sql - if [ -r "${TEST}.shp" ]; then + # Check for .dbf not just .shp since the loader can load + # .dbf files without a .shp. + if [ -r "${TEST}.dbf" ]; then if run_loader_test; then - echo " ok" + pass + fi + # Check .tif *before* .sql as loader test could + # create the .sql + elif [ -r "${TEST}.tif" ]; then + if run_raster_loader_test; then + pass fi elif [ -r "${TEST}.sql" ]; then if run_simple_test ${TEST}.sql ${TEST}_expected; then - echo " ok" + pass fi else - echo "Skipped (can't read ${TEST}.sql)" + echo " skipped (can't read ${TEST}.sql)" SKIP=`expr $SKIP + 1` continue fi + # Check for a "-post.sql" file in case there is teardown SQL needed after + # the test has been run. + if [ -r "${TEST}-post.sql" ]; then + if ! run_simple_sql "${TEST}-post.sql"; then + echo " ... but cleanup sql failed!" + fi + fi + + # Check for a "-post.sh" file in case there are non-SQL teardown tasks needed after + # the test has been run. + if [ -r "${TEST}-post.sh" ]; then + "${TEST}-post.sh" + if [ $? -gt 0 ]; then + echo " ... but cleanup script failed!" + fi + fi done +################################################### +# +# Uninstall postgis (serves as an uninstall test) +# +################################################### + +# We only test uninstall if we've been asked to drop +# and we did create +# and nobody requested raster or topology +# (until they have an uninstall script themself) +if test x"$OPT_DROP" = "xyes" \ + -a x"$object_count_pre" != "x" +then # { + uninstall_spatial +fi # } + +################################################### +# +# Summary report +# +################################################### + echo echo "Run tests: $RUN" #echo "Skipped: $SKIP" #echo "Successful: $SUCCESS" echo "Failed: $FAIL" +if test x"$OPT_CLEAN" = "xyes"; then + rm -f "${TMPDIR}"/dumper.* + rm -f "${TMPDIR}/loader.*" + rm -f "${TMPDIR}/regress_log" + rm -f "${TMPDIR}"/uninstall.* + rm -f "${TMPDIR}"/tmp/test_* + rmdir -p "${TMPDIR}/tmp/" 2> /dev/null + rmdir -p "${TMPDIR}" 2> /dev/null +fi + if test x"$OPT_DROP" = "xyes" -a x"$OPT_CREATE" = "xyes"; then sleep 1 dropdb "${DB}" > /dev/null @@ -518,3 +1082,6 @@ # Set the locale back to the original export LC_ALL=$ORIG_LC_ALL +export LANG=$ORIG_LANG + +exit $FAIL diff -Nru postgis-1.5.3/regress/setpoint.sql postgis-2.0.1/regress/setpoint.sql --- postgis-1.5.3/regress/setpoint.sql 2007-06-04 23:06:28.000000000 +0000 +++ postgis-2.0.1/regress/setpoint.sql 2012-02-27 22:08:12.000000000 +0000 @@ -1,29 +1,3 @@ --- Out of range indexes -SELECT SetPoint('LINESTRING(0 0, 1 1, 2 2)', 3, 'POINT(9 9)'); -SELECT SetPoint('LINESTRING(0 0, 1 1, 2 2)', -1, 'POINT(9 9)'); - --- Invalid inputs -SELECT SetPoint('MULTIPOINT(0 0, 1 1, 2 2)', 3, 'POINT(9 9)'); -SELECT SetPoint('LINESTRING(0 0, 1 1, 2 2)', -1, 'MULTIPOINT(9 9, 0 0)'); - --- Replacing 3dz line with 3dm point -SELECT asewkt(SetPoint('LINESTRING(-1 -1 -1, 1 1 1, 2 2 2)', 0, 'POINT(90 91 92)')); - --- Replacing 3dm line with 3dz point -SELECT asewkt(SetPoint('LINESTRINGM(0 0 0, 1 1 1, 2 2 2)', 1, 'POINTM(90 91 92)')); - --- Replacing 3dm line with 4d point -SELECT asewkt(SetPoint('LINESTRINGM(0 0 0, 1 1 1, 2 2 2)', 2, 'POINT(90 91 92 93)')); - --- Replacing 3dz line with 4d point -SELECT asewkt(SetPoint('LINESTRING(0 0 0, 1 1 1, 2 2 2)', 1, 'POINT(90 91 92 93)')); - --- Replacing 4d line with 2d/3dm/3dz/4d point -SELECT asewkt(SetPoint('LINESTRING(0 0 0 0, 1 1 1 1, 2 2 2 2, 4 4 4 4)', 3, 'POINT(90 91)')); -SELECT asewkt(SetPoint('LINESTRING(0 0 0 0, 1 1 1 1, 2 2 2 2, 4 4 4 4)', 2, 'POINT(90 91 92)')); -SELECT asewkt(SetPoint('LINESTRING(0 0 0 0, 1 1 1 1, 2 2 2 2, 4 4 4 4)', 1, 'POINTM(90 91 92)')); -SELECT asewkt(SetPoint('LINESTRING(0 0 0 0, 1 1 1 1, 2 2 2 2, 4 4 4 4)', 0, 'POINT(90 91 92 93)')); - -- Repeat all tests with new function names. -- Out of range indexes SELECT ST_SetPoint('LINESTRING(0 0, 1 1, 2 2)', 3, 'POINT(9 9)'); diff -Nru postgis-1.5.3/regress/setpoint_expected postgis-2.0.1/regress/setpoint_expected --- postgis-1.5.3/regress/setpoint_expected 2010-12-14 13:14:14.000000000 +0000 +++ postgis-2.0.1/regress/setpoint_expected 2012-02-27 22:08:12.000000000 +0000 @@ -10,15 +10,3 @@ LINESTRING(0 0 0 0,1 1 1 1,90 91 92 0,4 4 4 4) LINESTRING(0 0 0 0,90 91 0 92,2 2 2 2,4 4 4 4) LINESTRING(90 91 92 93,1 1 1 1,2 2 2 2,4 4 4 4) -ERROR: Point index out of range (0..2) -ERROR: Point index out of range (0..2) -ERROR: First argument must be a LINESTRING -ERROR: Third argument must be a POINT -LINESTRING(90 91 92,1 1 1,2 2 2) -LINESTRINGM(0 0 0,90 91 92,2 2 2) -LINESTRINGM(0 0 0,1 1 1,90 91 93) -LINESTRING(0 0 0,90 91 92,2 2 2) -LINESTRING(0 0 0 0,1 1 1 1,2 2 2 2,90 91 0 0) -LINESTRING(0 0 0 0,1 1 1 1,90 91 92 0,4 4 4 4) -LINESTRING(0 0 0 0,90 91 0 92,2 2 2 2,4 4 4 4) -LINESTRING(90 91 92 93,1 1 1 1,2 2 2 2,4 4 4 4) diff -Nru postgis-1.5.3/regress/sharedpaths.sql postgis-2.0.1/regress/sharedpaths.sql --- postgis-1.5.3/regress/sharedpaths.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/sharedpaths.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,42 @@ +-- SRIDs are checked! +select 't1', st_asewkt(st_sharedpaths( + 'SRID=10;LINESTRING(0 0, 10 0)', 'SRID=5;LINESTRING(0 0, 100 0)' +)); + +-- SRIDs are retained +select 't2', st_asewkt(st_sharedpaths( + 'SRID=10;LINESTRING(0 0, 10 0)', 'SRID=10;LINESTRING(0 0, 10 0)' +)); + +-- Opposite direction +select 't3', st_asewkt(st_sharedpaths( + 'LINESTRING(0 0, 10 0)', 'LINESTRING(10 0, 0 0)' +)); + +-- Disjoint +select 't4', st_asewkt(st_sharedpaths( + 'LINESTRING(0 0, 10 0)', 'LINESTRING(20 0, 30 0)' +)); + +-- Mixed +select 't5', st_asewkt(st_sharedpaths( + 'LINESTRING(0 0, 100 0)', 'LINESTRING(20 0, 30 0, 30 50, 80 0, 70 0)' +)); + +-- bug #670 +select 't6', st_sharedpaths( + '0101000020E6100000F771D98DE33826C00000000000004440'::geometry, + '0103000020E61000000100000021000000F771D98DE33820C00000000000004E409610DB16675620C00EC34AD715B54D407AF7FF56CFAD20C008E817B00C6D4D40A8B32666C03B21C017D34B39A92A4D40C096A1DAC5FA21C03309329378F04C4050BE087388E322C06D501336B7C04C401412394E16ED23C061A149F23A9D4C402C7E04EB3A0D25C0A86740E260874C40F471D98DE33826C00000000000804C40BC65AE308C6427C0A86740E260874C40D5D179CDB08428C060A149F23A9D4C409A25AAA83E8E29C06C501336B7C04C402A4D114101772AC03209329378F04C4043308CB506362BC016D34B39A92A4D4072ECB2C4F7C32BC007E817B00C6D4D4057D3D704601B2CC00DC34AD715B54D40F771D98DE3382CC0FFFFFFFFFFFF4D4059D3D704601B2CC0F13CB528EA4A4E4076ECB2C4F7C32BC0F717E84FF3924E4049308CB506362BC0E82CB4C656D54E40324D114101772AC0CCF6CD6C870F4F40A325AAA83E8E29C093AFECC9483F4F40DFD179CDB08428C09F5EB60DC5624F40C665AE308C6427C05898BF1D9F784F40FD71D98DE33826C00000000000804F40347E04EB3A0D25C05898BF1D9F784F401B12394E16ED23C0A05EB60DC5624F4056BE087388E322C094AFECC9483F4F40C496A1DAC5FA21C0CEF6CD6C870F4F40ABB32666C03B21C0EA2CB4C656D54E407CF7FF56CFAD20C0F917E84FF3924E409710DB16675620C0F33CB528EA4A4E40F771D98DE33820C00000000000004E40'::geometry +); + +-- RT 1 +select 't7', st_asewkt(st_sharedpaths( + 'MULTILINESTRING((1 3,4 2,7 2,7 5),(13 10,14 7,11 6,15 5))', + 'LINESTRING(2 1,4 2,7 2,8 3,10 6,11 6,14 7,16 9)' +)); + +-- RT 2 +select 't8', st_asewkt(st_sharedpaths( + 'MULTILINESTRING((1 3,4 2,7 2,7 5,13 10,14 7,11 6,15 5))', + 'LINESTRING(2 1,4 2,7 2,8 3,10 6,11 6,14 7,16 9)' +)); diff -Nru postgis-1.5.3/regress/sharedpaths_expected postgis-2.0.1/regress/sharedpaths_expected --- postgis-1.5.3/regress/sharedpaths_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/sharedpaths_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,8 @@ +ERROR: Operation on mixed SRID geometries +t2|SRID=10;GEOMETRYCOLLECTION(MULTILINESTRING((0 0,10 0)),MULTILINESTRING EMPTY) +t3|GEOMETRYCOLLECTION(MULTILINESTRING EMPTY,MULTILINESTRING((0 0,10 0))) +t4|GEOMETRYCOLLECTION(MULTILINESTRING EMPTY,MULTILINESTRING EMPTY) +t5|GEOMETRYCOLLECTION(MULTILINESTRING((20 0,30 0)),MULTILINESTRING((70 0,80 0))) +ERROR: GEOSSharedPaths: IllegalArgumentException: Geometry is not lineal +t7|GEOMETRYCOLLECTION(MULTILINESTRING((4 2,7 2)),MULTILINESTRING((14 7,11 6))) +t8|GEOMETRYCOLLECTION(MULTILINESTRING((4 2,7 2)),MULTILINESTRING((14 7,11 6))) diff -Nru postgis-1.5.3/regress/simplify.sql postgis-2.0.1/regress/simplify.sql --- postgis-1.5.3/regress/simplify.sql 2007-06-04 23:06:28.000000000 +0000 +++ postgis-2.0.1/regress/simplify.sql 2012-03-22 15:07:11.000000000 +0000 @@ -1,18 +1,11 @@ -SELECT '1', astext(simplify('LINESTRING(0 0, 0 10, 0 51, 50 20, 30 20, 7 32)', 2)); -SELECT '2', astext(simplify('LINESTRING(0 0 3, 0 10 6, 0 51 1, 50 20 6, 30 20 9, 7 32 10)', 2)); -SELECT '3', astext(simplify('LINESTRINGM(0 0 3, 0 10 6, 0 51 1, 50 20 6, 30 20 9, 7 32 10)', 2)); -SELECT '4', astext(simplify('LINESTRING(0 0 3 2, 0 10 6 1, 0 51 1 6, 50 20 6 7, 30 20 9 9, 7 32 10 5)', 2)); -SELECT '5', astext(simplify('MULTIPOINT(0 0 3 2, 0 10 6 1, 0 51 1 6, 50 20 6 7, 30 20 9 9, 7 32 10 5)', 20)); -SELECT '6', astext(simplify('MULTILINESTRING((0 0 3 2, 0 10 6 1, 0 51 1 6, 50 20 6 7, 30 20 9 9, 7 32 10 5), (0 0 4 3, 1 1 2 3, 20 20 5 30))', 20)); -SELECT '7', astext(simplify('POLYGON((0 0 3 2, 0 10 6 1, 0 51 1 6, 50 20 6 7, 30 20 9 9, 7 32 10 5, 0 0 3 2), (1 1 4 3, 1 3 2 3, 18 18 5 30, 1 1 4 3))', 20)); -SELECT '8', astext(simplify('POLYGON((0 0 3 2, 0 10 6 1, 0 51 1 6, 50 20 6 7, 30 20 9 9, 7 32 10 5, 0 0 3 2), (1 1 4 3, 1 3 2 3, 18 18 5 30, 1 1 4 3))', 1)); - -- Repeat all tests with the new function names. -SELECT '1', ST_astext(ST_simplify('LINESTRING(0 0, 0 10, 0 51, 50 20, 30 20, 7 32)', 2)); -SELECT '2', ST_astext(ST_simplify('LINESTRING(0 0 3, 0 10 6, 0 51 1, 50 20 6, 30 20 9, 7 32 10)', 2)); -SELECT '3', ST_astext(ST_simplify('LINESTRINGM(0 0 3, 0 10 6, 0 51 1, 50 20 6, 30 20 9, 7 32 10)', 2)); -SELECT '4', ST_astext(ST_simplify('LINESTRING(0 0 3 2, 0 10 6 1, 0 51 1 6, 50 20 6 7, 30 20 9 9, 7 32 10 5)', 2)); -SELECT '5', ST_astext(ST_simplify('MULTIPOINT(0 0 3 2, 0 10 6 1, 0 51 1 6, 50 20 6 7, 30 20 9 9, 7 32 10 5)', 20)); -SELECT '6', ST_astext(ST_simplify('MULTILINESTRING((0 0 3 2, 0 10 6 1, 0 51 1 6, 50 20 6 7, 30 20 9 9, 7 32 10 5), (0 0 4 3, 1 1 2 3, 20 20 5 30))', 20)); -SELECT '7', ST_astext(ST_simplify('POLYGON((0 0 3 2, 0 10 6 1, 0 51 1 6, 50 20 6 7, 30 20 9 9, 7 32 10 5, 0 0 3 2), (1 1 4 3, 1 3 2 3, 18 18 5 30, 1 1 4 3))', 20)); -SELECT '8', ST_astext(ST_simplify('POLYGON((0 0 3 2, 0 10 6 1, 0 51 1 6, 50 20 6 7, 30 20 9 9, 7 32 10 5, 0 0 3 2), (1 1 4 3, 1 3 2 3, 18 18 5 30, 1 1 4 3))', 1)); +SELECT '1', ST_astext(ST_Simplify('LINESTRING(0 0, 0 10, 0 51, 50 20, 30 20, 7 32)', 2)); +SELECT '2', ST_astext(ST_Simplify('LINESTRING(0 0 3, 0 10 6, 0 51 1, 50 20 6, 30 20 9, 7 32 10)', 2)); +SELECT '3', ST_astext(ST_Simplify('LINESTRINGM(0 0 3, 0 10 6, 0 51 1, 50 20 6, 30 20 9, 7 32 10)', 2)); +SELECT '4', ST_astext(ST_Simplify('LINESTRING(0 0 3 2, 0 10 6 1, 0 51 1 6, 50 20 6 7, 30 20 9 9, 7 32 10 5)', 2)); +SELECT '5', ST_astext(ST_Simplify('MULTIPOINT(0 0 3 2, 0 10 6 1, 0 51 1 6, 50 20 6 7, 30 20 9 9, 7 32 10 5)', 20)); +SELECT '6', ST_astext(ST_Simplify('MULTILINESTRING((0 0 3 2, 0 10 6 1, 0 51 1 6, 50 20 6 7, 30 20 9 9, 7 32 10 5), (0 0 4 3, 1 1 2 3, 20 20 5 30))', 20)); +SELECT '7', ST_astext(ST_Simplify('POLYGON((0 0 3 2, 0 10 6 1, 0 51 1 6, 50 20 6 7, 30 20 9 9, 7 32 10 5, 0 0 3 2), (1 1 4 3, 1 3 2 3, 18 18 5 30, 1 1 4 3))', 20)); +SELECT '8', ST_astext(ST_Simplify('POLYGON((0 0 3 2, 0 10 6 1, 0 51 1 6, 50 20 6 7, 30 20 9 9, 7 32 10 5, 0 0 3 2), (1 1 4 3, 1 3 2 3, 18 18 5 30, 1 1 4 3))', 1)); + +SELECT '9', ST_astext(ST_Simplify('POLYGON((0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 5 6, 6 6, 8 5, 5 5))', 20)); diff -Nru postgis-1.5.3/regress/simplify_expected postgis-2.0.1/regress/simplify_expected --- postgis-1.5.3/regress/simplify_expected 2010-12-14 13:14:14.000000000 +0000 +++ postgis-2.0.1/regress/simplify_expected 2012-03-22 15:07:11.000000000 +0000 @@ -1,16 +1,9 @@ 1|LINESTRING(0 0,0 51,50 20,30 20,7 32) -2|LINESTRING(0 0,0 51,50 20,30 20,7 32) -3|LINESTRING(0 0,0 51,50 20,30 20,7 32) -4|LINESTRING(0 0,0 51,50 20,30 20,7 32) -5|MULTIPOINT(0 0,0 10,0 51,50 20,30 20,7 32) -6|MULTILINESTRING((0 0,0 51,50 20,7 32),(0 0,20 20)) -7|POLYGON((0 0,0 51,50 20,7 32,0 0)) -8|POLYGON((0 0,0 51,50 20,30 20,7 32,0 0),(1 1,1 3,18 18,1 1)) -1|LINESTRING(0 0,0 51,50 20,30 20,7 32) -2|LINESTRING(0 0,0 51,50 20,30 20,7 32) -3|LINESTRING(0 0,0 51,50 20,30 20,7 32) -4|LINESTRING(0 0,0 51,50 20,30 20,7 32) -5|MULTIPOINT(0 0,0 10,0 51,50 20,30 20,7 32) -6|MULTILINESTRING((0 0,0 51,50 20,7 32),(0 0,20 20)) -7|POLYGON((0 0,0 51,50 20,7 32,0 0)) -8|POLYGON((0 0,0 51,50 20,30 20,7 32,0 0),(1 1,1 3,18 18,1 1)) +2|LINESTRING Z (0 0 3,0 51 1,50 20 6,30 20 9,7 32 10) +3|LINESTRING M (0 0 3,0 51 1,50 20 6,30 20 9,7 32 10) +4|LINESTRING ZM (0 0 3 2,0 51 1 6,50 20 6 7,30 20 9 9,7 32 10 5) +5|MULTIPOINT ZM (0 0 3 2,0 10 6 1,0 51 1 6,50 20 6 7,30 20 9 9,7 32 10 5) +6|MULTILINESTRING ZM ((0 0 3 2,0 51 1 6,50 20 6 7,7 32 10 5),(0 0 4 3,20 20 5 30)) +7|POLYGON ZM ((0 0 3 2,0 51 1 6,50 20 6 7,7 32 10 5,0 0 3 2)) +8|POLYGON ZM ((0 0 3 2,0 51 1 6,50 20 6 7,30 20 9 9,7 32 10 5,0 0 3 2),(1 1 4 3,1 3 2 3,18 18 5 30,1 1 4 3)) +9|POLYGON((0 0,10 10,0 0)) diff -Nru postgis-1.5.3/regress/snap.sql postgis-2.0.1/regress/snap.sql --- postgis-1.5.3/regress/snap.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/snap.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,26 @@ +-- SRIDs are checked! +select 't1', st_asewkt(st_snap( + 'SRID=10;LINESTRING(0 0, 10 0)', 'SRID=5;LINESTRING(0 0, 100 0)', 0 +)); + +-- SRIDs are retained +select 't2', st_asewkt(st_snap( + 'SRID=10;LINESTRING(0 0, 10 0)', 'SRID=10;LINESTRING(0 0, 9 0)', 1 +)); + +-- Segment snapping +select 't3', st_asewkt(st_snap( + 'LINESTRING(0 0, 10 0)', 'LINESTRING(5 -1, 5 -10)', 2 +)); + +-- Vertex snapping +select 't4', st_asewkt(st_snap( + 'LINESTRING(0 0, 10 0)', 'POINT(11 0)', 2 +)); + +-- http://sourceforge.net/mailarchive/forum.php?thread_name=4CE841B8.4090702@cgf.upv.es&forum_name=jts-topo-suite-user +select 't5', st_asewkt(st_snap( + 'LINESTRING (70 250, 190 340)', + 'POLYGON ((230 340, 300 340, 300 240, 230 240, 230 340))', + 50 +)); diff -Nru postgis-1.5.3/regress/snap_expected postgis-2.0.1/regress/snap_expected --- postgis-1.5.3/regress/snap_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/snap_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,5 @@ +ERROR: Operation on mixed SRID geometries +t2|SRID=10;LINESTRING(0 0,9 0,10 0) +t3|LINESTRING(0 0,5 -1,10 0) +t4|LINESTRING(0 0,11 0) +t5|LINESTRING(70 250,230 340) diff -Nru postgis-1.5.3/regress/snaptogrid.sql postgis-2.0.1/regress/snaptogrid.sql --- postgis-1.5.3/regress/snaptogrid.sql 2007-06-04 23:06:28.000000000 +0000 +++ postgis-2.0.1/regress/snaptogrid.sql 2012-02-27 22:08:12.000000000 +0000 @@ -2,11 +2,6 @@ -- postgis-users/2006-January/010870.html CREATE TEMP TABLE tmp (orig geometry); INSERT INTO tmp (orig) VALUES ('01020000207D18000007000000D7A3701D641B3FC18B6CE7FB5A721841FA7E6A9C5E1B3FC191ED7C3F9872184139B4C816591B3FC1E3A59BC4D472184104560E4D891A3FC177BE9F1ABF7118417B14AEA7961A3FC18716D94E0C711841022B8716671B3FC1C74B370939721841D7A3701D641B3FC18B6CE7FB5A721841'); -SELECT snaptogrid(orig, 0.001) ~= snaptogrid(snaptogrid(orig, 0.001), 0.001) FROM tmp; -SELECT snaptogrid(orig, 0.005) ~= snaptogrid(snaptogrid(orig, 0.005), 0.005) FROM tmp; -SELECT snaptogrid(orig, 0.002) ~= snaptogrid(snaptogrid(orig, 0.002), 0.002) FROM tmp; -SELECT snaptogrid(orig, 0.003) ~= snaptogrid(snaptogrid(orig, 0.003), 0.003) FROM tmp; -SELECT snaptogrid(orig, 0.0002) ~= snaptogrid(snaptogrid(orig, 0.0002), 0.0002) FROM tmp; -- Repeat tests with new function names. SELECT ST_snaptogrid(orig, 0.001) ~= ST_snaptogrid(ST_snaptogrid(orig, 0.001), 0.001) FROM tmp; diff -Nru postgis-1.5.3/regress/snaptogrid_expected postgis-2.0.1/regress/snaptogrid_expected --- postgis-1.5.3/regress/snaptogrid_expected 2010-12-14 13:14:14.000000000 +0000 +++ postgis-2.0.1/regress/snaptogrid_expected 2012-02-27 22:08:12.000000000 +0000 @@ -3,8 +3,3 @@ t t t -t -t -t -t -t diff -Nru postgis-1.5.3/regress/split.sql postgis-2.0.1/regress/split.sql --- postgis-1.5.3/regress/split.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/split.sql 2012-04-12 07:21:38.000000000 +0000 @@ -0,0 +1,72 @@ +-- Split line by point of different SRID +select st_split('SRID=10;LINESTRING(0 0, 10 0)', 'SRID=5;POINT(5 1)'); + +-- Split line by point on the line interior +select '1',st_asewkt(st_split('SRID=10;LINESTRING(0 0, 10 0)', 'SRID=10;POINT(5 0)')); +select '1.1',st_asewkt(st_split('SRID=10;LINESTRING(10 0, 0 0)', 'SRID=10;POINT(5 0)')); + +-- Split line by point on the line boundary +select '2',st_asewkt(st_split('SRID=10;LINESTRING(0 0, 10 0)', 'SRID=10;POINT(10 0)')); + +-- Split line by point on the line exterior +select '3',st_asewkt(st_split('SRID=10;LINESTRING(0 0, 10 0)', 'SRID=10;POINT(5 1)')); + +-- Split line by line of different SRID +select st_split('SRID=10;LINESTRING(0 0, 10 0)', 'SRID=5;LINESTRING(5 1, 10 1)'); + +-- Split line by disjoint line +select '4', st_asewkt(ST_Split('SRID=10;LINESTRING(0 0, 10 0)', 'SRID=10;LINESTRING(20 0, 20 20)')); + +-- Split line by touching line +select '5', st_asewkt(ST_Split('SRID=10;LINESTRING(0 0, 10 0)', 'SRID=10;LINESTRING(10 -5, 10 5)')); + +-- Split line by crossing line +select '6', st_asewkt(ST_Split('SRID=10;LINESTRING(0 0, 10 0)', 'SRID=10;LINESTRING(5 -5, 5 5)')); + +-- Split line by multiply-crossing line +select '7', st_asewkt(ST_Split('SRID=10;LINESTRING(0 0, 10 0, 10 10, 0 10, 0 20, 10 20)', 'SRID=10;LINESTRING(5 -5, 5 25)')); + +-- Split line by overlapping line (1) +select '8.1', st_asewkt(ST_Split('SRID=10;LINESTRING(0 0, 10 0)', 'SRID=10;LINESTRING(5 0, 20 0)')); +-- Split line by contained line (2) +select '8.2', st_asewkt(ST_Split('SRID=10;LINESTRING(0 0, 10 0)', 'SRID=10;LINESTRING(5 0, 8 0)')); + +-- Split exterior-only polygon by crossing line +select '20', st_asewkt(ST_Split('SRID=12;POLYGON((0 0, 10 0, 10 10, 0 10, 0 0))', 'SRID=12;LINESTRING(5 -5, 5 15)')); + +-- Split single-hole polygon by line crossing both exterior and hole +select '21', st_asewkt(ST_Split('SRID=12;POLYGON((0 0, 10 0, 10 10, 0 10, 0 0),(2 2, 8 2, 8 8, 2 8, 2 2))', 'SRID=12;LINESTRING(5 -5, 5 15)')); + +-- Split single-hole polygon by line crossing only exterior +select '22', st_asewkt(ST_Split('SRID=12;POLYGON((0 0, 10 0, 10 10, 0 10, 0 0),(5 2, 8 2, 8 8, 5 8, 5 2))', 'SRID=12;LINESTRING(2 -5, 2 15)')); + +-- Split double-hole polygon by line crossing exterior and both holes +select '23', st_asewkt(ST_Split('SRID=12;POLYGON((0 0, 10 0, 10 10, 0 10, 0 0),(2 2, 8 2, 8 4, 2 4, 2 2),(2 6,8 6,8 8,2 8,2 6))', 'SRID=12;LINESTRING(5 -5, 5 15)')); + +-- Split multiline by line crossing both +select '30', st_asewkt(st_split('SRID=10;MULTILINESTRING((0 0, 10 0),(0 5, 10 5))', 'SRID=10;LINESTRING(5 -5, 5 10)')); + +-- Split multiline by line crossing only one of them +select '31', st_asewkt(st_split('SRID=10;MULTILINESTRING((0 0, 10 0),(0 5, 10 5))', 'SRID=10;LINESTRING(5 -5, 5 2)')); + +-- Split multiline by disjoint line +select '32', st_asewkt(st_split('SRID=10;MULTILINESTRING((0 0, 10 0),(0 5, 10 5))', 'SRID=10;LINESTRING(5 10, 5 20)')); + +-- Split multiline by point on one of them +select '40', st_asewkt(st_split('SRID=10;MULTILINESTRING((0 0, 10 0),(0 5, 10 5))', 'SRID=10;POINT(5 0)')); + +-- Split multipolygon by line +select '50', st_asewkt(ST_Split('SRID=12;MULTIPOLYGON(((0 0, 10 0, 10 10, 0 10, 0 0),(2 2, 8 2, 8 4, 2 4, 2 2),(2 6,8 6,8 8,2 8,2 6)),((20 0,20 10, 30 10, 30 0, 20 0),(25 5, 28 5, 25 8, 25 5)))', 'SRID=12;LINESTRING(5 -5, 5 15)')); + +-- Split geometrycollection by line +select '60', st_asewkt(ST_Split('SRID=12;GEOMETRYCOLLECTION(MULTIPOLYGON(((0 0, 10 0, 10 10, 0 10, 0 0),(2 2, 8 2, 8 4, 2 4, 2 2),(2 6,8 6,8 8,2 8,2 6)),((20 0,20 10, 30 10, 30 0, 20 0),(25 5, 28 5, 25 8, 25 5))),MULTILINESTRING((0 0, 10 0),(0 5, 10 5)))', 'SRID=12;LINESTRING(5 -5, 5 15)')); + +-- Split 3d line by 2d line +select '70', st_asewkt(ST_Split('SRID=11;LINESTRING(1691983.26 4874594.81 312.24, 1691984.86 4874593.69 312.24, 1691979.54 4874586.09 312.24, 1691978.03 4874587.16 298.36)', 'SRID=11;LINESTRING(1691978.0 4874589.0,1691982.0 4874588.53, 1691982.0 4874591.0)')); + +-- Split collapsed line by point +-- See http://trac.osgeo.org/postgis/ticket/1772 +select '80', st_asewkt(ST_Split('LINESTRING(0 1, 0 1, 0 1)', 'POINT(0 1)')); +select '81', st_asewkt(ST_Split('LINESTRING(0 1, 0 1)', 'POINT(0 1)')); + +-- TODO: split line by collapsed line diff -Nru postgis-1.5.3/regress/split_expected postgis-2.0.1/regress/split_expected --- postgis-1.5.3/regress/split_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/split_expected 2012-04-12 07:21:38.000000000 +0000 @@ -0,0 +1,25 @@ +ERROR: Operation on mixed SRID geometries +1|SRID=10;GEOMETRYCOLLECTION(LINESTRING(0 0,5 0),LINESTRING(5 0,10 0)) +1.1|SRID=10;GEOMETRYCOLLECTION(LINESTRING(10 0,5 0),LINESTRING(5 0,0 0)) +2|SRID=10;GEOMETRYCOLLECTION(LINESTRING(0 0,10 0)) +3|SRID=10;GEOMETRYCOLLECTION(LINESTRING(0 0,10 0)) +ERROR: Operation on mixed SRID geometries +4|SRID=10;GEOMETRYCOLLECTION(LINESTRING(0 0,10 0)) +5|SRID=10;GEOMETRYCOLLECTION(LINESTRING(0 0,10 0)) +6|SRID=10;GEOMETRYCOLLECTION(LINESTRING(0 0,5 0),LINESTRING(5 0,10 0)) +7|SRID=10;GEOMETRYCOLLECTION(LINESTRING(0 0,5 0),LINESTRING(5 0,10 0,10 10,5 10),LINESTRING(5 10,0 10,0 20,5 20),LINESTRING(5 20,10 20)) +ERROR: Splitter line has linear intersection with input +ERROR: Splitter line has linear intersection with input +20|SRID=12;GEOMETRYCOLLECTION(POLYGON((5 0,0 0,0 10,5 10,5 0)),POLYGON((5 10,10 10,10 0,5 0,5 10))) +21|SRID=12;GEOMETRYCOLLECTION(POLYGON((5 0,0 0,0 10,5 10,5 8,2 8,2 2,5 2,5 0)),POLYGON((5 10,10 10,10 0,5 0,5 2,8 2,8 8,5 8,5 10))) +22|SRID=12;GEOMETRYCOLLECTION(POLYGON((2 0,0 0,0 10,2 10,2 0)),POLYGON((2 10,10 10,10 0,2 0,2 10),(5 2,8 2,8 8,5 8,5 2))) +23|SRID=12;GEOMETRYCOLLECTION(POLYGON((5 0,0 0,0 10,5 10,5 8,2 8,2 6,5 6,5 4,2 4,2 2,5 2,5 0)),POLYGON((5 10,10 10,10 0,5 0,5 2,8 2,8 4,5 4,5 6,8 6,8 8,5 8,5 10))) +30|SRID=10;GEOMETRYCOLLECTION(LINESTRING(0 0,5 0),LINESTRING(5 0,10 0),LINESTRING(0 5,5 5),LINESTRING(5 5,10 5)) +31|SRID=10;GEOMETRYCOLLECTION(LINESTRING(0 0,5 0),LINESTRING(5 0,10 0),LINESTRING(0 5,10 5)) +32|SRID=10;GEOMETRYCOLLECTION(LINESTRING(0 0,10 0),LINESTRING(0 5,10 5)) +40|SRID=10;GEOMETRYCOLLECTION(LINESTRING(0 0,5 0),LINESTRING(5 0,10 0),LINESTRING(0 5,10 5)) +50|SRID=12;GEOMETRYCOLLECTION(POLYGON((5 0,0 0,0 10,5 10,5 8,2 8,2 6,5 6,5 4,2 4,2 2,5 2,5 0)),POLYGON((5 10,10 10,10 0,5 0,5 2,8 2,8 4,5 4,5 6,8 6,8 8,5 8,5 10)),POLYGON((20 0,20 10,30 10,30 0,20 0),(25 5,28 5,25 8,25 5))) +60|SRID=12;GEOMETRYCOLLECTION(POLYGON((5 0,0 0,0 10,5 10,5 8,2 8,2 6,5 6,5 4,2 4,2 2,5 2,5 0)),POLYGON((5 10,10 10,10 0,5 0,5 2,8 2,8 4,5 4,5 6,8 6,8 8,5 8,5 10)),POLYGON((20 0,20 10,30 10,30 0,20 0),(25 5,28 5,25 8,25 5)),LINESTRING(0 0,5 0),LINESTRING(5 0,10 0),LINESTRING(0 5,5 5),LINESTRING(5 5,10 5)) +70|SRID=11;GEOMETRYCOLLECTION(LINESTRING(1691983.26 4874594.81 312.24,1691984.86 4874593.69 312.24,1691982 4874589.60428571 312.24),LINESTRING(1691982 4874589.60428571 312.24,1691981.30515131 4874588.61164472 312.24),LINESTRING(1691981.30515131 4874588.61164472 312.24,1691979.54 4874586.09 312.24,1691978.03 4874587.16 298.36)) +80|GEOMETRYCOLLECTION(LINESTRING(0 1,0 1,0 1)) +81|GEOMETRYCOLLECTION(LINESTRING(0 1,0 1)) diff -Nru postgis-1.5.3/regress/sql-mm-circularstring.sql postgis-2.0.1/regress/sql-mm-circularstring.sql --- postgis-1.5.3/regress/sql-mm-circularstring.sql 2010-12-14 01:04:20.000000000 +0000 +++ postgis-2.0.1/regress/sql-mm-circularstring.sql 2012-02-27 22:08:12.000000000 +0000 @@ -1,390 +1,281 @@ -SELECT 'ndims01', ndims(geomfromewkt('CIRCULARSTRING( - 0 0 0 0, - 0.26794919243112270647255365849413 1 3 -2, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2)')); -SELECT 'geometrytype01', geometrytype(geomfromewkt('CIRCULARSTRING( - 0 0 0 0, - 0.26794919243112270647255365849413 1 3 -2, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2)')); -SELECT 'ndims02', ndims(geomfromewkt('CIRCULARSTRING( - 0 0 0, - 0.26794919243112270647255365849413 1 3, - 0.5857864376269049511981127579 1.4142135623730950488016887242097 1)')); -SELECT 'geometrytype02', geometrytype(geomfromewkt('CIRCULARSTRING( - 0 0 0, - 0.26794919243112270647255365849413 1 3, - 0.5857864376269049511981127579 1.4142135623730950488016887242097 1)')); -SELECT 'ndims03', ndims(geomfromewkt('CIRCULARSTRINGM( - 0 0 0, - 0.26794919243112270647255365849413 1 -2, - 0.5857864376269049511981127579 1.4142135623730950488016887242097 2)')); -SELECT 'geometrytype03', geometrytype(geomfromewkt('CIRCULARSTRINGM( - 0 0 0, - 0.26794919243112270647255365849413 1 -2, - 0.5857864376269049511981127579 1.4142135623730950488016887242097 2)')); -SELECT 'ndims04', ndims(geomfromewkt('CIRCULARSTRING( - 0 0, - 0.26794919243112270647255365849413 1, - 0.5857864376269049511981127579 1.4142135623730950488016887242097)')); -SELECT 'geometrytype04', geometrytype(geomfromewkt('CIRCULARSTRING( - 0 0, - 0.26794919243112270647255365849413 1, - 0.5857864376269049511981127579 1.4142135623730950488016887242097)')); - -SELECT 'isClosed01', isClosed(geomfromewkt('CIRCULARSTRING( - 0 -2, - -2 0, - 0 2, - 2 0, - 0 -2)')); -SELECT 'isSimple01', isSimple(geomfromewkt('CIRCULARSTRING( - 0 -2, - -2 0, - 0 2, - 2 0, - 0 -2)')); -SELECT 'isRing01', isRing(geomfromewkt('CIRCULARSTRING( - 0 -2, - -2 0, - 0 2, - 2 0, - 0 -2)')); -SELECT 'isClosed02', isClosed(geomfromewkt('CIRCULARSTRING( - 0 -2, - -2 0, - 0 2, - -2 0, - 2 -2, - -2 0, - -2 -2, - -2 0, - 0 -2)')); -SELECT 'isSimple02', isSimple(geomfromewkt('CIRCULARSTRING( - 0 -2, - -2 0, - 0 2, - -2 0, - 2 -2, - -2 0, - -2 -2, - -2 0, - 0 -2)')); -SELECT 'isRing02', isRing(geomfromewkt('CIRCULARSTRING( - 0 -2, - -2 0, - 0 2, - -2 0, - 2 -2, - -2 0, - -2 -2, - -2 0, - 0 -2)')); - --- Repeat tests with new function names. -SELECT 'ndims01', ST_ndims(ST_geomfromewkt('CIRCULARSTRING( - 0 0 0 0, - 0.26794919243112270647255365849413 1 3 -2, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2)')); -SELECT 'geometrytype01', geometrytype(ST_geomfromewkt('CIRCULARSTRING( - 0 0 0 0, - 0.26794919243112270647255365849413 1 3 -2, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2)')); -SELECT 'ndims02', ST_ndims(ST_geomfromewkt('CIRCULARSTRING( - 0 0 0, - 0.26794919243112270647255365849413 1 3, - 0.5857864376269049511981127579 1.4142135623730950488016887242097 1)')); -SELECT 'geometrytype02', geometrytype(ST_geomfromewkt('CIRCULARSTRING( - 0 0 0, - 0.26794919243112270647255365849413 1 3, - 0.5857864376269049511981127579 1.4142135623730950488016887242097 1)')); -SELECT 'ndims03', ST_ndims(ST_geomfromewkt('CIRCULARSTRINGM( - 0 0 0, - 0.26794919243112270647255365849413 1 -2, - 0.5857864376269049511981127579 1.4142135623730950488016887242097 2)')); -SELECT 'geometrytype03', geometrytype(ST_geomfromewkt('CIRCULARSTRINGM( - 0 0 0, - 0.26794919243112270647255365849413 1 -2, - 0.5857864376269049511981127579 1.4142135623730950488016887242097 2)')); -SELECT 'ndims04', ST_ndims(ST_geomfromewkt('CIRCULARSTRING( - 0 0, - 0.26794919243112270647255365849413 1, - 0.5857864376269049511981127579 1.4142135623730950488016887242097)')); -SELECT 'geometrytype04', geometrytype(ST_geomfromewkt('CIRCULARSTRING( - 0 0, - 0.26794919243112270647255365849413 1, - 0.5857864376269049511981127579 1.4142135623730950488016887242097)')); - -SELECT 'isClosed01', ST_isClosed(ST_geomfromewkt('CIRCULARSTRING( - 0 -2, - -2 0, - 0 2, - 2 0, - 0 -2)')); -SELECT 'isSimple01', ST_isSimple(ST_geomfromewkt('CIRCULARSTRING( - 0 -2, - -2 0, - 0 2, - 2 0, - 0 -2)')); -SELECT 'isRing01', ST_isRing(ST_geomfromewkt('CIRCULARSTRING( - 0 -2, - -2 0, - 0 2, - 2 0, - 0 -2)')); -SELECT 'isClosed02', ST_isClosed(ST_geomfromewkt('CIRCULARSTRING( - 0 -2, - -2 0, - 0 2, - -2 0, - 2 -2, - -2 0, - -2 -2, - -2 0, - 0 -2)')); -SELECT 'isSimple02', ST_isSimple(ST_geomfromewkt('CIRCULARSTRING( - 0 -2, - -2 0, - 0 2, - -2 0, - 2 -2, - -2 0, - -2 -2, - -2 0, - 0 -2)')); -SELECT 'isRing02', ST_isRing(ST_geomfromewkt('CIRCULARSTRING( - 0 -2, - -2 0, - 0 2, - -2 0, - 2 -2, - -2 0, - -2 -2, - -2 0, - 0 -2)')); - -CREATE TABLE public.circularstring (id INTEGER, description VARCHAR); -SELECT AddGeometryColumn('public', 'circularstring', 'the_geom_2d', -1, 'CIRCULARSTRING', 2); -SELECT AddGeometryColumn('public', 'circularstring', 'the_geom_3dm', -1, 'CIRCULARSTRINGM', 3); -SELECT AddGeometryColumn('public', 'circularstring', 'the_geom_3dz', -1, 'CIRCULARSTRING', 3); -SELECT AddGeometryColumn('public', 'circularstring', 'the_geom_4d', -1, 'CIRCULARSTRING', 4); - -INSERT INTO public.circularstring ( - id, - description - ) VALUES ( - 1, - '180-135 degrees'); -UPDATE public.circularstring - SET the_geom_4d = geomfromewkt('CIRCULARSTRING( - 0 0 0 0, - 0.26794919243112270647255365849413 1 3 -2, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2)') - WHERE id = 1; -UPDATE public.circularstring - SET the_geom_3dz = geomfromewkt('CIRCULARSTRING( - 0 0 0, - 0.26794919243112270647255365849413 1 3, - 0.5857864376269049511981127579 1.4142135623730950488016887242097 1)') - WHERE id = 1; -UPDATE public.circularstring - SET the_geom_3dm = geomfromewkt('CIRCULARSTRINGM( - 0 0 0, - 0.26794919243112270647255365849413 1 -2, - 0.5857864376269049511981127579 1.4142135623730950488016887242097 2)') - WHERE id = 1; -UPDATE public.circularstring - SET the_geom_2d = geomfromewkt('CIRCULARSTRING( - 0 0, - 0.26794919243112270647255365849413 1, - 0.5857864376269049511981127579 1.4142135623730950488016887242097)') - WHERE id = 1; - -INSERT INTO public.circularstring ( - id, - description - ) VALUES ( - 2, - '2-segment string'); -UPDATE public.circularstring - SET the_geom_4d = geomfromewkt('CIRCULARSTRING( - -5 0 0 4, - 0 5 1 3, - 5 0 2 2, - 10 -5 3 1, - 15 0 4 0)') - WHERE id = 2; -UPDATE public.circularstring - SET the_geom_3dz = geomfromewkt('CIRCULARSTRING( - -5 0 0, - 0 5 1, - 5 0 2, - 10 -5 3, - 15 0 4)') - WHERE id = 2; -UPDATE public.circularstring - SET the_geom_3dm = geomfromewkt('CIRCULARSTRINGM( - -5 0 4, - 0 5 3, - 5 0 2, - 10 -5 1, - 15 0 0)') - WHERE id = 2; -UPDATE public.circularstring - SET the_geom_2d = geomfromewkt('CIRCULARSTRING( - -5 0, - 0 5, - 5 0, - 10 -5, - 15 0)') - WHERE id = 2; - -SELECT 'astext01', astext(the_geom_2d) FROM public.circularstring; -SELECT 'astext02', astext(the_geom_3dm) FROM public.circularstring; -SELECT 'astext03', astext(the_geom_3dz) FROM public.circularstring; -SELECT 'astext04', astext(the_geom_4d) FROM public.circularstring; - -SELECT 'asewkt01', asewkt(the_geom_2d) FROM public.circularstring; -SELECT 'asewkt02', asewkt(the_geom_3dm) FROM public.circularstring; -SELECT 'asewkt03', asewkt(the_geom_3dz) FROM public.circularstring; -SELECT 'asewkt04', asewkt(the_geom_4d) FROM public.circularstring; - --- These tests will fail on different architectures --- We need a way to handle multiple byte orderings ---SELECT 'asbinary01', encode(asbinary(the_geom_2d), 'hex') FROM public.circularstring; ---SELECT 'asbinary02', encode(asbinary(the_geom_3dm), 'hex') FROM public.circularstring; ---SELECT 'asbinary03', encode(asbinary(the_geom_3dz), 'hex') FROM public.circularstring; ---SELECT 'asbinary04', encode(asbinary(the_geom_4d), 'hex') FROM public.circularstring; --- ---SELECT 'asewkb01', encode(asewkb(the_geom_2d), 'hex') FROM public.circularstring; ---SELECT 'asewkb02', encode(asewkb(the_geom_3dm), 'hex') FROM public.circularstring; ---SELECT 'asewkb03', encode(asewkb(the_geom_3dz), 'hex') FROM public.circularstring; ---SELECT 'asewkb04', encode(asewkb(the_geom_4d), 'hex') FROM public.circularstring; - -SELECT 'ST_CurveToLine-201', asewkt(snapToGrid(ST_CurveToLine(the_geom_2d, 2), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.circularstring; -SELECT 'ST_CurveToLine-202', asewkt(snapToGrid(ST_CurveToLine(the_geom_3dm, 2), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.circularstring; -SELECT 'ST_CurveToLine-203', asewkt(snapToGrid(ST_CurveToLine(the_geom_3dz, 2), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.circularstring; -SELECT 'ST_CurveToLine-204', asewkt(snapToGrid(ST_CurveToLine(the_geom_4d, 2), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.circularstring; - -SELECT 'ST_CurveToLine-401', asewkt(snapToGrid(ST_CurveToLine(the_geom_2d, 4), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.circularstring; -SELECT 'ST_CurveToLine-402', asewkt(snapToGrid(ST_CurveToLine(the_geom_3dm, 4), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.circularstring; -SELECT 'ST_CurveToLine-403', asewkt(snapToGrid(ST_CurveToLine(the_geom_3dz, 4), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.circularstring; -SELECT 'ST_CurveToLine-404', asewkt(snapToGrid(ST_CurveToLine(the_geom_4d, 4), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.circularstring; - -SELECT 'ST_CurveToLine01', asewkt(snapToGrid(ST_CurveToLine(the_geom_2d), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.circularstring; -SELECT 'ST_CurveToLine02', asewkt(snapToGrid(ST_CurveToLine(the_geom_3dm), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.circularstring; -SELECT 'ST_CurveToLine03', asewkt(snapToGrid(ST_CurveToLine(the_geom_3dz), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.circularstring; -SELECT 'ST_CurveToLine04', asewkt(snapToGrid(ST_CurveToLine(the_geom_4d), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.circularstring; - ---Removed due to discrepencies between hardware ---SELECT 'box2d01', box2d(the_geom_2d) FROM public.circularstring; ---SELECT 'box2d02', box2d(the_geom_3dm) FROM public.circularstring; ---SELECT 'box2d03', box2d(the_geom_3dz) FROM public.circularstring; ---SELECT 'box2d04', box2d(the_geom_4d) FROM public.circularstring; - ---SELECT 'box3d01', box3d(the_geom_2d) FROM public.circularstring; ---SELECT 'box3d02', box3d(the_geom_3dm) FROM public.circularstring; ---SELECT 'box3d03', box3d(the_geom_3dz) FROM public.circularstring; ---SELECT 'box3d04', box3d(the_geom_4d) FROM public.circularstring; - -SELECT 'isValid01', isValid(the_geom_2d) FROM public.circularstring; -SELECT 'isValid02', isValid(the_geom_3dm) FROM public.circularstring; -SELECT 'isValid03', isValid(the_geom_3dz) FROM public.circularstring; -SELECT 'isValid04', isValid(the_geom_4d) FROM public.circularstring; - -SELECT 'dimension01', dimension(the_geom_2d) FROM public.circularstring; -SELECT 'dimension02', dimension(the_geom_3dm) FROM public.circularstring; -SELECT 'dimension03', dimension(the_geom_3dz) FROM public.circularstring; -SELECT 'dimension04', dimension(the_geom_4d) FROM public.circularstring; - -SELECT 'SRID01', SRID(the_geom_2d) FROM public.circularstring; -SELECT 'SRID02', SRID(the_geom_3dm) FROM public.circularstring; -SELECT 'SRID03', SRID(the_geom_3dz) FROM public.circularstring; -SELECT 'SRID04', SRID(the_geom_4d) FROM public.circularstring; - -SELECT 'accessors01', isEmpty(the_geom_2d), isSimple(the_geom_2d), isClosed(the_geom_2d), isRing(the_geom_2d) FROM public.circularstring; -SELECT 'accessors02', isEmpty(the_geom_3dm), isSimple(the_geom_3dm), isClosed(the_geom_3dm), isRing(the_geom_3dm) FROM public.circularstring; -SELECT 'accessors03', isEmpty(the_geom_3dz), isSimple(the_geom_3dz), isClosed(the_geom_3dz), isRing(the_geom_3dz) FROM public.circularstring; -SELECT 'accessors04', isEmpty(the_geom_4d), isSimple(the_geom_4d), isClosed(the_geom_4d), isRing(the_geom_4d) FROM public.circularstring; - -SELECT 'envelope01', asText(snapToGrid(envelope(the_geom_2d), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.circularstring; -SELECT 'envelope02', asText(snapToGrid(envelope(the_geom_3dm), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.circularstring; -SELECT 'envelope03', asText(snapToGrid(envelope(the_geom_3dz), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.circularstring; -SELECT 'envelope04', asText(snapToGrid(envelope(the_geom_4d), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.circularstring; - --- TODO: ST_SnapToGrid is required to remove platform dependent precision --- issues. Until ST_SnapToGrid is updated to work against curves, these --- tests cannot be run. ---SELECT 'ST_LineToCurve01', asewkt(ST_LineToCurve(ST_CurveToLine(the_geom_2d))) FROM public.circularstring; ---SELECT 'ST_LineToCurve02', asewkt(ST_LineToCurve(ST_CurveToLine(the_geom_3dm))) FROM public.circularstring; ---SELECT 'ST_LineToCurve03', asewkt(ST_LineToCurve(ST_CurveToLine(the_geom_3dz))) FROM public.circularstring; ---SELECT 'ST_LineToCurve04', asewkt(ST_LineToCurve(ST_CurveToLine(the_geom_4d))) FROM public.circularstring; - --- Repeat tests with new function names. -SELECT 'astext01', ST_astext(the_geom_2d) FROM public.circularstring; -SELECT 'astext02', ST_astext(the_geom_3dm) FROM public.circularstring; -SELECT 'astext03', ST_astext(the_geom_3dz) FROM public.circularstring; -SELECT 'astext04', ST_astext(the_geom_4d) FROM public.circularstring; - -SELECT 'asewkt01', ST_asewkt(the_geom_2d) FROM public.circularstring; -SELECT 'asewkt02', ST_asewkt(the_geom_3dm) FROM public.circularstring; -SELECT 'asewkt03', ST_asewkt(the_geom_3dz) FROM public.circularstring; -SELECT 'asewkt04', ST_asewkt(the_geom_4d) FROM public.circularstring; - --- These tests will fail on different architectures --- We need a way to handle multiple byte orderings ---SELECT 'asbinary01', encode(ST_asbinary(the_geom_2d), 'hex') FROM public.circularstring; ---SELECT 'asbinary02', encode(ST_asbinary(the_geom_3dm), 'hex') FROM public.circularstring; ---SELECT 'asbinary03', encode(ST_asbinary(the_geom_3dz), 'hex') FROM public.circularstring; ---SELECT 'asbinary04', encode(ST_asbinary(the_geom_4d), 'hex') FROM public.circularstring; --- ---SELECT 'asewkb01', encode(ST_asewkb(the_geom_2d), 'hex') FROM public.circularstring; ---SELECT 'asewkb02', encode(ST_asewkb(the_geom_3dm), 'hex') FROM public.circularstring; ---SELECT 'asewkb03', encode(ST_asewkb(the_geom_3dz), 'hex') FROM public.circularstring; ---SELECT 'asewkb04', encode(ST_asewkb(the_geom_4d), 'hex') FROM public.circularstring; - ---Removed due to discrepencies between hardware ---SELECT 'box2d01', ST_box2d(the_geom_2d) FROM public.circularstring; ---SELECT 'box2d02', ST_box2d(the_geom_3dm) FROM public.circularstring; ---SELECT 'box2d03', ST_box2d(the_geom_3dz) FROM public.circularstring; ---SELECT 'box2d04', ST_box2d(the_geom_4d) FROM public.circularstring; - ---SELECT 'box3d01', ST_box3d(the_geom_2d) FROM public.circularstring; ---SELECT 'box3d02', ST_box3d(the_geom_3dm) FROM public.circularstring; ---SELECT 'box3d03', ST_box3d(the_geom_3dz) FROM public.circularstring; ---SELECT 'box3d04', ST_box3d(the_geom_4d) FROM public.circularstring; - -SELECT 'isValid01', ST_isValid(the_geom_2d) FROM public.circularstring; -SELECT 'isValid02', ST_isValid(the_geom_3dm) FROM public.circularstring; -SELECT 'isValid03', ST_isValid(the_geom_3dz) FROM public.circularstring; -SELECT 'isValid04', ST_isValid(the_geom_4d) FROM public.circularstring; - -SELECT 'dimension01', ST_dimension(the_geom_2d) FROM public.circularstring; -SELECT 'dimension02', ST_dimension(the_geom_3dm) FROM public.circularstring; -SELECT 'dimension03', ST_dimension(the_geom_3dz) FROM public.circularstring; -SELECT 'dimension04', ST_dimension(the_geom_4d) FROM public.circularstring; - -SELECT 'SRID01', ST_SRID(the_geom_2d) FROM public.circularstring; -SELECT 'SRID02', ST_SRID(the_geom_3dm) FROM public.circularstring; -SELECT 'SRID03', ST_SRID(the_geom_3dz) FROM public.circularstring; -SELECT 'SRID04', ST_SRID(the_geom_4d) FROM public.circularstring; - -SELECT 'accessors01', ST_isEmpty(the_geom_2d), ST_isSimple(the_geom_2d), ST_isClosed(the_geom_2d), ST_isRing(the_geom_2d) FROM public.circularstring; -SELECT 'accessors02', ST_isEmpty(the_geom_3dm), ST_isSimple(the_geom_3dm), ST_isClosed(the_geom_3dm), ST_isRing(the_geom_3dm) FROM public.circularstring; -SELECT 'accessors03', ST_isEmpty(the_geom_3dz), ST_isSimple(the_geom_3dz), ST_isClosed(the_geom_3dz), ST_isRing(the_geom_3dz) FROM public.circularstring; -SELECT 'accessors04', ST_isEmpty(the_geom_4d), ST_isSimple(the_geom_4d), ST_isClosed(the_geom_4d), ST_isRing(the_geom_4d) FROM public.circularstring; - -SELECT 'envelope01', ST_asText(ST_snapToGrid(envelope(the_geom_2d), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.circularstring; -SELECT 'envelope02', ST_asText(ST_snapToGrid(envelope(the_geom_3dm), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.circularstring; -SELECT 'envelope03', ST_asText(ST_snapToGrid(envelope(the_geom_3dz), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.circularstring; -SELECT 'envelope04', ST_asText(ST_snapToGrid(envelope(the_geom_4d), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.circularstring; - -SELECT DropGeometryColumn('public', 'circularstring', 'the_geom_4d'); -SELECT DropGeometryColumn('public', 'circularstring', 'the_geom_3dz'); -SELECT DropGeometryColumn('public', 'circularstring', 'the_geom_3dm'); -SELECT DropGeometryColumn('public', 'circularstring', 'the_geom_2d'); -DROP TABLE public.circularstring; -SELECT ST_asText(ST_box2d('CIRCULARSTRING(220268.439465645 150415.359530563,220227.333322076 150505.561285879,220227.353105332 150406.434743975)'::geometry)); -SELECT ST_NumPoints(ST_GeomFromEWKT('CIRCULARSTRING(0 0,2 0, 2 1, 2 3, 4 3)')); - -SELECT ST_BOX2D('CIRCULARSTRING(10 2,12 2,14 2)'::geometry); +SET client_min_messages TO warning; + +SELECT 'ndims01', ST_ndims(ST_geomfromewkt('CIRCULARSTRING( + 0 0 0 0, + 0.26794919243112270647255365849413 1 3 -2, + 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2)')); +SELECT 'geometrytype01', geometrytype(ST_geomfromewkt('CIRCULARSTRING( + 0 0 0 0, + 0.26794919243112270647255365849413 1 3 -2, + 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2)')); +SELECT 'ndims02', ST_ndims(ST_geomfromewkt('CIRCULARSTRING( + 0 0 0, + 0.26794919243112270647255365849413 1 3, + 0.5857864376269049511981127579 1.4142135623730950488016887242097 1)')); +SELECT 'geometrytype02', geometrytype(ST_geomfromewkt('CIRCULARSTRING( + 0 0 0, + 0.26794919243112270647255365849413 1 3, + 0.5857864376269049511981127579 1.4142135623730950488016887242097 1)')); +SELECT 'ndims03', ST_ndims(ST_geomfromewkt('CIRCULARSTRINGM( + 0 0 0, + 0.26794919243112270647255365849413 1 -2, + 0.5857864376269049511981127579 1.4142135623730950488016887242097 2)')); +SELECT 'geometrytype03', geometrytype(ST_geomfromewkt('CIRCULARSTRINGM( + 0 0 0, + 0.26794919243112270647255365849413 1 -2, + 0.5857864376269049511981127579 1.4142135623730950488016887242097 2)')); +SELECT 'ndims04', ST_ndims(ST_geomfromewkt('CIRCULARSTRING( + 0 0, + 0.26794919243112270647255365849413 1, + 0.5857864376269049511981127579 1.4142135623730950488016887242097)')); +SELECT 'geometrytype04', geometrytype(ST_geomfromewkt('CIRCULARSTRING( + 0 0, + 0.26794919243112270647255365849413 1, + 0.5857864376269049511981127579 1.4142135623730950488016887242097)')); + +SELECT 'isClosed01', ST_isClosed(ST_geomfromewkt('CIRCULARSTRING( + 0 -2, + -2 0, + 0 2, + 2 0, + 0 -2)')); +SELECT 'isSimple01', ST_isSimple(ST_geomfromewkt('CIRCULARSTRING( + 0 -2, + -2 0, + 0 2, + 2 0, + 0 -2)')); +SELECT 'isRing01', ST_isRing(ST_geomfromewkt('CIRCULARSTRING( + 0 -2, + -2 0, + 0 2, + 2 0, + 0 -2)')); +SELECT 'isClosed02', ST_isClosed(ST_geomfromewkt('CIRCULARSTRING( + 0 -2, + -2 0, + 0 2, + -2 0, + 2 -2, + -2 0, + -2 -2, + -2 0, + 0 -2)')); +SELECT 'isSimple02', ST_isSimple(ST_geomfromewkt('CIRCULARSTRING( + 0 -2, + -2 0, + 0 2, + -2 0, + 2 -2, + -2 0, + -2 -2, + -2 0, + 0 -2)')); +SELECT 'isRing02', ST_isRing(ST_geomfromewkt('CIRCULARSTRING( + 0 -2, + -2 0, + 0 2, + -2 0, + 2 -2, + -2 0, + -2 -2, + -2 0, + 0 -2)')); + +CREATE TABLE public.circularstring (id INTEGER, description VARCHAR, +the_geom_2d GEOMETRY(CIRCULARSTRING), +the_geom_3dm GEOMETRY(CIRCULARSTRINGM), +the_geom_3dz GEOMETRY(CIRCULARSTRINGZ), +the_geom_4d GEOMETRY(CIRCULARSTRINGZM)); + +INSERT INTO public.circularstring ( + id, + description + ) VALUES ( + 1, + '180-135 degrees'); +UPDATE public.circularstring + SET the_geom_4d = ST_Geomfromewkt('CIRCULARSTRING( + 0 0 0 0, + 0.26794919243112270647255365849413 1 3 -2, + 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2)') + WHERE id = 1; +UPDATE public.circularstring + SET the_geom_3dz = ST_Geomfromewkt('CIRCULARSTRING( + 0 0 0, + 0.26794919243112270647255365849413 1 3, + 0.5857864376269049511981127579 1.4142135623730950488016887242097 1)') + WHERE id = 1; +UPDATE public.circularstring + SET the_geom_3dm = ST_Geomfromewkt('CIRCULARSTRINGM( + 0 0 0, + 0.26794919243112270647255365849413 1 -2, + 0.5857864376269049511981127579 1.4142135623730950488016887242097 2)') + WHERE id = 1; +UPDATE public.circularstring + SET the_geom_2d = ST_Geomfromewkt('CIRCULARSTRING( + 0 0, + 0.26794919243112270647255365849413 1, + 0.5857864376269049511981127579 1.4142135623730950488016887242097)') + WHERE id = 1; + +INSERT INTO public.circularstring ( + id, + description + ) VALUES ( + 2, + '2-segment string'); +UPDATE public.circularstring + SET the_geom_4d = ST_Geomfromewkt('CIRCULARSTRING( + -5 0 0 4, + 0 5 1 3, + 5 0 2 2, + 10 -5 3 1, + 15 0 4 0)') + WHERE id = 2; +UPDATE public.circularstring + SET the_geom_3dz = ST_Geomfromewkt('CIRCULARSTRING( + -5 0 0, + 0 5 1, + 5 0 2, + 10 -5 3, + 15 0 4)') + WHERE id = 2; +UPDATE public.circularstring + SET the_geom_3dm = ST_Geomfromewkt('CIRCULARSTRINGM( + -5 0 4, + 0 5 3, + 5 0 2, + 10 -5 1, + 15 0 0)') + WHERE id = 2; +UPDATE public.circularstring + SET the_geom_2d = ST_Geomfromewkt('CIRCULARSTRING( + -5 0, + 0 5, + 5 0, + 10 -5, + 15 0)') + WHERE id = 2; + +SELECT 'astext01', ST_astext(the_geom_2d) FROM public.circularstring; +SELECT 'astext02', ST_astext(the_geom_3dm) FROM public.circularstring; +SELECT 'astext03', ST_astext(the_geom_3dz) FROM public.circularstring; +SELECT 'astext04', ST_astext(the_geom_4d) FROM public.circularstring; + +SELECT 'asewkt01', ST_asewkt(the_geom_2d) FROM public.circularstring; +SELECT 'asewkt02', ST_asewkt(the_geom_3dm) FROM public.circularstring; +SELECT 'asewkt03', ST_asewkt(the_geom_3dz) FROM public.circularstring; +SELECT 'asewkt04', ST_asewkt(the_geom_4d) FROM public.circularstring; + +-- These tests will fail on different architectures +-- We need a way to handle multiple byte orderings +--SELECT 'asbinary01', encode(asbinary(the_geom_2d), 'hex') FROM public.circularstring; +--SELECT 'asbinary02', encode(asbinary(the_geom_3dm), 'hex') FROM public.circularstring; +--SELECT 'asbinary03', encode(asbinary(the_geom_3dz), 'hex') FROM public.circularstring; +--SELECT 'asbinary04', encode(asbinary(the_geom_4d), 'hex') FROM public.circularstring; +-- +--SELECT 'asewkb01', encode(asewkb(the_geom_2d), 'hex') FROM public.circularstring; +--SELECT 'asewkb02', encode(asewkb(the_geom_3dm), 'hex') FROM public.circularstring; +--SELECT 'asewkb03', encode(asewkb(the_geom_3dz), 'hex') FROM public.circularstring; +--SELECT 'asewkb04', encode(asewkb(the_geom_4d), 'hex') FROM public.circularstring; + +SELECT 'ST_CurveToLine-201', ST_asewkt( ST_SnapToGrid(ST_CurveToLine(the_geom_2d, 2), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.circularstring; +SELECT 'ST_CurveToLine-202', ST_asewkt( ST_SnapToGrid(ST_CurveToLine(the_geom_3dm, 2), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.circularstring; +SELECT 'ST_CurveToLine-203', ST_asewkt( ST_SnapToGrid(ST_CurveToLine(the_geom_3dz, 2), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.circularstring; +SELECT 'ST_CurveToLine-204', ST_asewkt( ST_SnapToGrid(ST_CurveToLine(the_geom_4d, 2), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.circularstring; + +SELECT 'ST_CurveToLine-401', ST_asewkt( ST_SnapToGrid(ST_CurveToLine(the_geom_2d, 4), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.circularstring; +SELECT 'ST_CurveToLine-402', ST_asewkt( ST_SnapToGrid(ST_CurveToLine(the_geom_3dm, 4), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.circularstring; +SELECT 'ST_CurveToLine-403', ST_asewkt( ST_SnapToGrid(ST_CurveToLine(the_geom_3dz, 4), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.circularstring; +SELECT 'ST_CurveToLine-404', ST_asewkt( ST_SnapToGrid(ST_CurveToLine(the_geom_4d, 4), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.circularstring; + +SELECT 'ST_CurveToLine01', ST_asewkt( ST_SnapToGrid(ST_CurveToLine(the_geom_2d), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.circularstring; +SELECT 'ST_CurveToLine02', ST_asewkt( ST_SnapToGrid(ST_CurveToLine(the_geom_3dm), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.circularstring; +SELECT 'ST_CurveToLine03', ST_asewkt( ST_SnapToGrid(ST_CurveToLine(the_geom_3dz), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.circularstring; +SELECT 'ST_CurveToLine04', ST_asewkt( ST_SnapToGrid(ST_CurveToLine(the_geom_4d), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.circularstring; + +--Removed due to discrepencies between hardware +--SELECT 'box2d01', box2d(the_geom_2d) FROM public.circularstring; +--SELECT 'box2d02', box2d(the_geom_3dm) FROM public.circularstring; +--SELECT 'box2d03', box2d(the_geom_3dz) FROM public.circularstring; +--SELECT 'box2d04', box2d(the_geom_4d) FROM public.circularstring; + +--SELECT 'box3d01', box3d(the_geom_2d) FROM public.circularstring; +--SELECT 'box3d02', box3d(the_geom_3dm) FROM public.circularstring; +--SELECT 'box3d03', box3d(the_geom_3dz) FROM public.circularstring; +--SELECT 'box3d04', box3d(the_geom_4d) FROM public.circularstring; +-- TODO: ST_SnapToGrid is required to remove platform dependent precision +-- issues. Until ST_SnapToGrid is updated to work against curves, these +-- tests cannot be run. +--SELECT 'ST_LineToCurve01', ST_asewkt(ST_LineToCurve(ST_CurveToLine(the_geom_2d))) FROM public.circularstring; +--SELECT 'ST_LineToCurve02', ST_asewkt(ST_LineToCurve(ST_CurveToLine(the_geom_3dm))) FROM public.circularstring; +--SELECT 'ST_LineToCurve03', ST_asewkt(ST_LineToCurve(ST_CurveToLine(the_geom_3dz))) FROM public.circularstring; +--SELECT 'ST_LineToCurve04', ST_asewkt(ST_LineToCurve(ST_CurveToLine(the_geom_4d))) FROM public.circularstring; + +-- Repeat tests with new function names. +SELECT 'astext01', ST_astext(the_geom_2d) FROM public.circularstring; +SELECT 'astext02', ST_astext(the_geom_3dm) FROM public.circularstring; +SELECT 'astext03', ST_astext(the_geom_3dz) FROM public.circularstring; +SELECT 'astext04', ST_astext(the_geom_4d) FROM public.circularstring; + +SELECT 'asewkt01', ST_asewkt(the_geom_2d) FROM public.circularstring; +SELECT 'asewkt02', ST_asewkt(the_geom_3dm) FROM public.circularstring; +SELECT 'asewkt03', ST_asewkt(the_geom_3dz) FROM public.circularstring; +SELECT 'asewkt04', ST_asewkt(the_geom_4d) FROM public.circularstring; + +-- These tests will fail on different architectures +-- We need a way to handle multiple byte orderings +--SELECT 'asbinary01', encode(ST_asbinary(the_geom_2d), 'hex') FROM public.circularstring; +--SELECT 'asbinary02', encode(ST_asbinary(the_geom_3dm), 'hex') FROM public.circularstring; +--SELECT 'asbinary03', encode(ST_asbinary(the_geom_3dz), 'hex') FROM public.circularstring; +--SELECT 'asbinary04', encode(ST_asbinary(the_geom_4d), 'hex') FROM public.circularstring; +-- +--SELECT 'asewkb01', encode(ST_asewkb(the_geom_2d), 'hex') FROM public.circularstring; +--SELECT 'asewkb02', encode(ST_asewkb(the_geom_3dm), 'hex') FROM public.circularstring; +--SELECT 'asewkb03', encode(ST_asewkb(the_geom_3dz), 'hex') FROM public.circularstring; +--SELECT 'asewkb04', encode(ST_asewkb(the_geom_4d), 'hex') FROM public.circularstring; + +--Removed due to discrepencies between hardware +--SELECT 'box2d01', box2d(the_geom_2d) FROM public.circularstring; +--SELECT 'box2d02', box2d(the_geom_3dm) FROM public.circularstring; +--SELECT 'box2d03', box2d(the_geom_3dz) FROM public.circularstring; +--SELECT 'box2d04', box2d(the_geom_4d) FROM public.circularstring; + +--SELECT 'box3d01', box3d(the_geom_2d) FROM public.circularstring; +--SELECT 'box3d02', box3d(the_geom_3dm) FROM public.circularstring; +--SELECT 'box3d03', box3d(the_geom_3dz) FROM public.circularstring; +--SELECT 'box3d04', box3d(the_geom_4d) FROM public.circularstring; + +SELECT 'isValid01', ST_isValid(the_geom_2d) FROM public.circularstring; +SELECT 'isValid02', ST_isValid(the_geom_3dm) FROM public.circularstring; +SELECT 'isValid03', ST_isValid(the_geom_3dz) FROM public.circularstring; +SELECT 'isValid04', ST_isValid(the_geom_4d) FROM public.circularstring; + +SELECT 'dimension01', ST_dimension(the_geom_2d) FROM public.circularstring; +SELECT 'dimension02', ST_dimension(the_geom_3dm) FROM public.circularstring; +SELECT 'dimension03', ST_dimension(the_geom_3dz) FROM public.circularstring; +SELECT 'dimension04', ST_dimension(the_geom_4d) FROM public.circularstring; + +SELECT 'SRID01', ST_SRID(the_geom_2d) FROM public.circularstring; +SELECT 'SRID02', ST_SRID(the_geom_3dm) FROM public.circularstring; +SELECT 'SRID03', ST_SRID(the_geom_3dz) FROM public.circularstring; +SELECT 'SRID04', ST_SRID(the_geom_4d) FROM public.circularstring; + +SELECT 'accessors01', ST_IsEmpty(the_geom_2d), ST_isSimple(the_geom_2d), ST_isClosed(the_geom_2d), ST_isRing(the_geom_2d) FROM public.circularstring; +SELECT 'accessors02', ST_IsEmpty(the_geom_3dm), ST_isSimple(the_geom_3dm), ST_isClosed(the_geom_3dm), ST_isRing(the_geom_3dm) FROM public.circularstring; +SELECT 'accessors03', ST_IsEmpty(the_geom_3dz), ST_isSimple(the_geom_3dz), ST_isClosed(the_geom_3dz), ST_isRing(the_geom_3dz) FROM public.circularstring; +SELECT 'accessors04', ST_IsEmpty(the_geom_4d), ST_isSimple(the_geom_4d), ST_isClosed(the_geom_4d), ST_isRing(the_geom_4d) FROM public.circularstring; + +SELECT 'envelope01', ST_AsText(ST_SnapToGrid(ST_Envelope(the_geom_2d), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.circularstring; +SELECT 'envelope02', ST_AsText(ST_SnapToGrid(ST_Envelope(the_geom_3dm), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.circularstring; +SELECT 'envelope03', ST_AsText(ST_SnapToGrid(ST_Envelope(the_geom_3dz), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.circularstring; +SELECT 'envelope04', ST_AsText(ST_SnapToGrid(ST_Envelope(the_geom_4d), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.circularstring; + +SELECT DropGeometryColumn('public', 'circularstring', 'the_geom_4d'); +SELECT DropGeometryColumn('public', 'circularstring', 'the_geom_3dz'); +SELECT DropGeometryColumn('public', 'circularstring', 'the_geom_3dm'); +SELECT DropGeometryColumn('public', 'circularstring', 'the_geom_2d'); +DROP TABLE public.circularstring; +SELECT ST_AsText(st_snaptogrid(box2d('CIRCULARSTRING(220268.439465645 150415.359530563,220227.333322076 150505.561285879,220227.353105332 150406.434743975)'::geometry),0.0001)); +SELECT 'npoints_is_null',ST_NumPoints(ST_GeomFromEWKT('CIRCULARSTRING(0 0,2 0, 2 1, 2 3, 4 3)')); diff -Nru postgis-1.5.3/regress/sql-mm-circularstring_expected postgis-2.0.1/regress/sql-mm-circularstring_expected --- postgis-1.5.3/regress/sql-mm-circularstring_expected 2011-06-24 03:51:11.000000000 +0000 +++ postgis-2.0.1/regress/sql-mm-circularstring_expected 2012-02-27 22:08:12.000000000 +0000 @@ -12,32 +12,14 @@ isClosed02|t ERROR: Exception in LWGEOM2GEOS: curved geometry not supported. ERROR: isring() should only be called on a LINE -ndims01|4 -geometrytype01|CIRCULARSTRING -ndims02|3 -geometrytype02|CIRCULARSTRING -ndims03|3 -geometrytype03|CIRCULARSTRINGM -ndims04|2 -geometrytype04|CIRCULARSTRING -isClosed01|t -ERROR: Exception in LWGEOM2GEOS: curved geometry not supported. -ERROR: isring() should only be called on a LINE -isClosed02|t -ERROR: Exception in LWGEOM2GEOS: curved geometry not supported. -ERROR: isring() should only be called on a LINE -public.circularstring.the_geom_2d SRID:-1 TYPE:CIRCULARSTRING DIMS:2 -public.circularstring.the_geom_3dm SRID:-1 TYPE:CIRCULARSTRINGM DIMS:3 -public.circularstring.the_geom_3dz SRID:-1 TYPE:CIRCULARSTRING DIMS:3 -public.circularstring.the_geom_4d SRID:-1 TYPE:CIRCULARSTRING DIMS:4 astext01|CIRCULARSTRING(0 0,0.267949192431123 1,0.585786437626905 1.4142135623731) astext01|CIRCULARSTRING(-5 0,0 5,5 0,10 -5,15 0) -astext02|CIRCULARSTRING(0 0,0.267949192431123 1,0.585786437626905 1.4142135623731) -astext02|CIRCULARSTRING(-5 0,0 5,5 0,10 -5,15 0) -astext03|CIRCULARSTRING(0 0,0.267949192431123 1,0.585786437626905 1.4142135623731) -astext03|CIRCULARSTRING(-5 0,0 5,5 0,10 -5,15 0) -astext04|CIRCULARSTRING(0 0,0.267949192431123 1,0.585786437626905 1.4142135623731) -astext04|CIRCULARSTRING(-5 0,0 5,5 0,10 -5,15 0) +astext02|CIRCULARSTRING M (0 0 0,0.267949192431123 1 -2,0.585786437626905 1.4142135623731 2) +astext02|CIRCULARSTRING M (-5 0 4,0 5 3,5 0 2,10 -5 1,15 0 0) +astext03|CIRCULARSTRING Z (0 0 0,0.267949192431123 1 3,0.585786437626905 1.4142135623731 1) +astext03|CIRCULARSTRING Z (-5 0 0,0 5 1,5 0 2,10 -5 3,15 0 4) +astext04|CIRCULARSTRING ZM (0 0 0 0,0.267949192431123 1 3 -2,0.585786437626905 1.4142135623731 1 2) +astext04|CIRCULARSTRING ZM (-5 0 0 4,0 5 1 3,5 0 2 2,10 -5 3 1,15 0 4 0) asewkt01|CIRCULARSTRING(0 0,0.267949192431123 1,0.585786437626905 1.4142135623731) asewkt01|CIRCULARSTRING(-5 0,0 5,5 0,10 -5,15 0) asewkt02|CIRCULARSTRINGM(0 0 0,0.267949192431123 1 -2,0.585786437626905 1.4142135623731 2) @@ -70,46 +52,14 @@ ST_CurveToLine03|LINESTRING(-5 0 0,-4.99397728 0.24533837 0.03125,-4.97592363 0.4900857 0.0625,-4.94588255 0.73365237 0.09375,-4.9039264 0.97545161 0.125,-4.85015627 1.2149009 0.15625,-4.78470168 1.45142339 0.1875,-4.70772033 1.68444927 0.21875,-4.61939766 1.91341716 0.25,-4.51994647 2.13777547 0.28125,-4.40960632 2.35698368 0.3125,-4.28864305 2.57051372 0.34375,-4.15734806 2.77785117 0.375,-4.01603766 2.97849652 0.40625,-3.86505227 3.17196642 0.4375,-3.70475563 3.35779477 0.46875,-3.53553391 3.53553391 0.5,-3.35779477 3.70475563 0.53125,-3.17196642 3.86505227 0.5625,-2.97849652 4.01603766 0.59375,-2.77785117 4.15734806 0.625,-2.57051372 4.28864305 0.65625,-2.35698368 4.40960632 0.6875,-2.13777547 4.51994647 0.71875,-1.91341716 4.61939766 0.75,-1.68444927 4.70772033 0.78125,-1.45142339 4.78470168 0.8125,-1.2149009 4.85015627 0.84375,-0.97545161 4.9039264 0.875,-0.73365237 4.94588255 0.90625,-0.4900857 4.97592363 0.9375,-0.24533837 4.99397728 0.96875,0 5 1,0.24533837 4.99397728 1.03125,0.4900857 4.97592363 1.0625,0.73365237 4.94588255 1.09375,0.97545161 4.9039264 1.125,1.2149009 4.85015627 1.15625,1.45142339 4.78470168 1.1875,1.68444927 4.70772033 1.21875,1.91341716 4.61939766 1.25,2.13777547 4.51994647 1.28125,2.35698368 4.40960632 1.3125,2.57051372 4.28864305 1.34375,2.77785117 4.15734806 1.375,2.97849652 4.01603766 1.40625,3.17196642 3.86505227 1.4375,3.35779477 3.70475563 1.46875,3.53553391 3.53553391 1.5,3.70475563 3.35779477 1.53125,3.86505227 3.17196642 1.5625,4.01603766 2.97849652 1.59375,4.15734806 2.77785117 1.625,4.28864305 2.57051372 1.65625,4.40960632 2.35698368 1.6875,4.51994647 2.13777547 1.71875,4.61939766 1.91341716 1.75,4.70772033 1.68444927 1.78125,4.78470168 1.45142339 1.8125,4.85015627 1.2149009 1.84375,4.9039264 0.97545161 1.875,4.94588255 0.73365237 1.90625,4.97592363 0.4900857 1.9375,4.99397728 0.24533837 1.96875,5 0 2,5.00602272 -0.24533837 2.03125,5.02407637 -0.4900857 2.0625,5.05411745 -0.73365237 2.09375,5.0960736 -0.97545161 2.125,5.14984373 -1.2149009 2.15625,5.21529832 -1.45142339 2.1875,5.29227967 -1.68444927 2.21875,5.38060234 -1.91341716 2.25,5.48005353 -2.13777547 2.28125,5.59039368 -2.35698368 2.3125,5.71135695 -2.57051372 2.34375,5.84265194 -2.77785117 2.375,5.98396234 -2.97849652 2.40625,6.13494773 -3.17196642 2.4375,6.29524437 -3.35779477 2.46875,6.46446609 -3.53553391 2.5,6.64220523 -3.70475563 2.53125,6.82803358 -3.86505227 2.5625,7.02150348 -4.01603766 2.59375,7.22214883 -4.15734806 2.625,7.42948628 -4.28864305 2.65625,7.64301632 -4.40960632 2.6875,7.86222453 -4.51994647 2.71875,8.08658284 -4.61939766 2.75,8.31555073 -4.70772033 2.78125,8.54857661 -4.78470168 2.8125,8.7850991 -4.85015627 2.84375,9.02454839 -4.9039264 2.875,9.26634763 -4.94588255 2.90625,9.5099143 -4.97592363 2.9375,9.75466163 -4.99397728 2.96875,10 -5 3,10.24533837 -4.99397728 3.03125,10.4900857 -4.97592363 3.0625,10.73365237 -4.94588255 3.09375,10.97545161 -4.9039264 3.125,11.2149009 -4.85015627 3.15625,11.45142339 -4.78470168 3.1875,11.68444927 -4.70772033 3.21875,11.91341716 -4.61939766 3.25,12.13777547 -4.51994647 3.28125,12.35698368 -4.40960632 3.3125,12.57051372 -4.28864305 3.34375,12.77785117 -4.15734806 3.375,12.97849652 -4.01603766 3.40625,13.17196642 -3.86505227 3.4375,13.35779477 -3.70475563 3.46875,13.53553391 -3.53553391 3.5,13.70475563 -3.35779477 3.53125,13.86505227 -3.17196642 3.5625,14.01603766 -2.97849652 3.59375,14.15734806 -2.77785117 3.625,14.28864305 -2.57051372 3.65625,14.40960632 -2.35698368 3.6875,14.51994647 -2.13777547 3.71875,14.61939766 -1.91341716 3.75,14.70772033 -1.68444927 3.78125,14.78470168 -1.45142339 3.8125,14.85015627 -1.2149009 3.84375,14.9039264 -0.97545161 3.875,14.94588255 -0.73365237 3.90625,14.97592363 -0.4900857 3.9375,14.99397728 -0.24533837 3.96875,15 0 4) ST_CurveToLine04|LINESTRING(0 0 0 0,0.00240909 0.09813535 0.28125 -0.1875,0.00963055 0.19603428 0.5625 -0.375,0.02164698 0.29346095 0.84375 -0.5625,0.03842944 0.39018064 1.125 -0.75,0.05993749 0.48596036 1.40625 -0.9375,0.08611933 0.58056935 1.6875 -1.125,0.11691187 0.67377971 1.96875 -1.3125,0.15224093 0.76536686 2.25 -1.5,0.19202141 0.85511019 2.53125 -1.6875,0.23615747 0.94279347 2.8125 -1.875,0.28454278 1.02820549 2.875 -1.75,0.33706078 1.11114047 2.5 -1,0.39358494 1.19139861 2.125 -0.25,0.45397909 1.26878657 1.75 0.5,0.51809775 1.34311791 1.375 1.25,0.58578644 1.41421356 1 2) ST_CurveToLine04|LINESTRING(-5 0 0 4,-4.99397728 0.24533837 0.03125 3.96875,-4.97592363 0.4900857 0.0625 3.9375,-4.94588255 0.73365237 0.09375 3.90625,-4.9039264 0.97545161 0.125 3.875,-4.85015627 1.2149009 0.15625 3.84375,-4.78470168 1.45142339 0.1875 3.8125,-4.70772033 1.68444927 0.21875 3.78125,-4.61939766 1.91341716 0.25 3.75,-4.51994647 2.13777547 0.28125 3.71875,-4.40960632 2.35698368 0.3125 3.6875,-4.28864305 2.57051372 0.34375 3.65625,-4.15734806 2.77785117 0.375 3.625,-4.01603766 2.97849652 0.40625 3.59375,-3.86505227 3.17196642 0.4375 3.5625,-3.70475563 3.35779477 0.46875 3.53125,-3.53553391 3.53553391 0.5 3.5,-3.35779477 3.70475563 0.53125 3.46875,-3.17196642 3.86505227 0.5625 3.4375,-2.97849652 4.01603766 0.59375 3.40625,-2.77785117 4.15734806 0.625 3.375,-2.57051372 4.28864305 0.65625 3.34375,-2.35698368 4.40960632 0.6875 3.3125,-2.13777547 4.51994647 0.71875 3.28125,-1.91341716 4.61939766 0.75 3.25,-1.68444927 4.70772033 0.78125 3.21875,-1.45142339 4.78470168 0.8125 3.1875,-1.2149009 4.85015627 0.84375 3.15625,-0.97545161 4.9039264 0.875 3.125,-0.73365237 4.94588255 0.90625 3.09375,-0.4900857 4.97592363 0.9375 3.0625,-0.24533837 4.99397728 0.96875 3.03125,0 5 1 3,0.24533837 4.99397728 1.03125 2.96875,0.4900857 4.97592363 1.0625 2.9375,0.73365237 4.94588255 1.09375 2.90625,0.97545161 4.9039264 1.125 2.875,1.2149009 4.85015627 1.15625 2.84375,1.45142339 4.78470168 1.1875 2.8125,1.68444927 4.70772033 1.21875 2.78125,1.91341716 4.61939766 1.25 2.75,2.13777547 4.51994647 1.28125 2.71875,2.35698368 4.40960632 1.3125 2.6875,2.57051372 4.28864305 1.34375 2.65625,2.77785117 4.15734806 1.375 2.625,2.97849652 4.01603766 1.40625 2.59375,3.17196642 3.86505227 1.4375 2.5625,3.35779477 3.70475563 1.46875 2.53125,3.53553391 3.53553391 1.5 2.5,3.70475563 3.35779477 1.53125 2.46875,3.86505227 3.17196642 1.5625 2.4375,4.01603766 2.97849652 1.59375 2.40625,4.15734806 2.77785117 1.625 2.375,4.28864305 2.57051372 1.65625 2.34375,4.40960632 2.35698368 1.6875 2.3125,4.51994647 2.13777547 1.71875 2.28125,4.61939766 1.91341716 1.75 2.25,4.70772033 1.68444927 1.78125 2.21875,4.78470168 1.45142339 1.8125 2.1875,4.85015627 1.2149009 1.84375 2.15625,4.9039264 0.97545161 1.875 2.125,4.94588255 0.73365237 1.90625 2.09375,4.97592363 0.4900857 1.9375 2.0625,4.99397728 0.24533837 1.96875 2.03125,5 0 2 2,5.00602272 -0.24533837 2.03125 1.96875,5.02407637 -0.4900857 2.0625 1.9375,5.05411745 -0.73365237 2.09375 1.90625,5.0960736 -0.97545161 2.125 1.875,5.14984373 -1.2149009 2.15625 1.84375,5.21529832 -1.45142339 2.1875 1.8125,5.29227967 -1.68444927 2.21875 1.78125,5.38060234 -1.91341716 2.25 1.75,5.48005353 -2.13777547 2.28125 1.71875,5.59039368 -2.35698368 2.3125 1.6875,5.71135695 -2.57051372 2.34375 1.65625,5.84265194 -2.77785117 2.375 1.625,5.98396234 -2.97849652 2.40625 1.59375,6.13494773 -3.17196642 2.4375 1.5625,6.29524437 -3.35779477 2.46875 1.53125,6.46446609 -3.53553391 2.5 1.5,6.64220523 -3.70475563 2.53125 1.46875,6.82803358 -3.86505227 2.5625 1.4375,7.02150348 -4.01603766 2.59375 1.40625,7.22214883 -4.15734806 2.625 1.375,7.42948628 -4.28864305 2.65625 1.34375,7.64301632 -4.40960632 2.6875 1.3125,7.86222453 -4.51994647 2.71875 1.28125,8.08658284 -4.61939766 2.75 1.25,8.31555073 -4.70772033 2.78125 1.21875,8.54857661 -4.78470168 2.8125 1.1875,8.7850991 -4.85015627 2.84375 1.15625,9.02454839 -4.9039264 2.875 1.125,9.26634763 -4.94588255 2.90625 1.09375,9.5099143 -4.97592363 2.9375 1.0625,9.75466163 -4.99397728 2.96875 1.03125,10 -5 3 1,10.24533837 -4.99397728 3.03125 0.96875,10.4900857 -4.97592363 3.0625 0.9375,10.73365237 -4.94588255 3.09375 0.90625,10.97545161 -4.9039264 3.125 0.875,11.2149009 -4.85015627 3.15625 0.84375,11.45142339 -4.78470168 3.1875 0.8125,11.68444927 -4.70772033 3.21875 0.78125,11.91341716 -4.61939766 3.25 0.75,12.13777547 -4.51994647 3.28125 0.71875,12.35698368 -4.40960632 3.3125 0.6875,12.57051372 -4.28864305 3.34375 0.65625,12.77785117 -4.15734806 3.375 0.625,12.97849652 -4.01603766 3.40625 0.59375,13.17196642 -3.86505227 3.4375 0.5625,13.35779477 -3.70475563 3.46875 0.53125,13.53553391 -3.53553391 3.5 0.5,13.70475563 -3.35779477 3.53125 0.46875,13.86505227 -3.17196642 3.5625 0.4375,14.01603766 -2.97849652 3.59375 0.40625,14.15734806 -2.77785117 3.625 0.375,14.28864305 -2.57051372 3.65625 0.34375,14.40960632 -2.35698368 3.6875 0.3125,14.51994647 -2.13777547 3.71875 0.28125,14.61939766 -1.91341716 3.75 0.25,14.70772033 -1.68444927 3.78125 0.21875,14.78470168 -1.45142339 3.8125 0.1875,14.85015627 -1.2149009 3.84375 0.15625,14.9039264 -0.97545161 3.875 0.125,14.94588255 -0.73365237 3.90625 0.09375,14.97592363 -0.4900857 3.9375 0.0625,14.99397728 -0.24533837 3.96875 0.03125,15 0 4 0) -ERROR: Exception in LWGEOM2GEOS: curved geometry not supported. -ERROR: Exception in LWGEOM2GEOS: curved geometry not supported. -ERROR: Exception in LWGEOM2GEOS: curved geometry not supported. -ERROR: Exception in LWGEOM2GEOS: curved geometry not supported. -dimension01|1 -dimension01|1 -dimension02|1 -dimension02|1 -dimension03|1 -dimension03|1 -dimension04|1 -dimension04|1 -SRID01|-1 -SRID01|-1 -SRID02|-1 -SRID02|-1 -SRID03|-1 -SRID03|-1 -SRID04|-1 -SRID04|-1 -ERROR: Exception in LWGEOM2GEOS: curved geometry not supported. -ERROR: Exception in LWGEOM2GEOS: curved geometry not supported. -ERROR: Exception in LWGEOM2GEOS: curved geometry not supported. -ERROR: Exception in LWGEOM2GEOS: curved geometry not supported. -envelope01|POLYGON((0 0,0 1.41421356,0.58578644 1.41421356,0.58578644 0,0 0)) -envelope01|POLYGON((-5 -5,-5 5,15 5,15 -5,-5 -5)) -envelope02|POLYGON((0 0,0 1.41421356,0.58578644 1.41421356,0.58578644 0,0 0)) -envelope02|POLYGON((-5 -5,-5 5,15 5,15 -5,-5 -5)) -envelope03|POLYGON((0 0,0 1.41421356,0.58578644 1.41421356,0.58578644 0,0 0)) -envelope03|POLYGON((-5 -5,-5 5,15 5,15 -5,-5 -5)) -envelope04|POLYGON((0 0,0 1.41421356,0.58578644 1.41421356,0.58578644 0,0 0)) -envelope04|POLYGON((-5 -5,-5 5,15 5,15 -5,-5 -5)) astext01|CIRCULARSTRING(0 0,0.267949192431123 1,0.585786437626905 1.4142135623731) astext01|CIRCULARSTRING(-5 0,0 5,5 0,10 -5,15 0) -astext02|CIRCULARSTRING(0 0,0.267949192431123 1,0.585786437626905 1.4142135623731) -astext02|CIRCULARSTRING(-5 0,0 5,5 0,10 -5,15 0) -astext03|CIRCULARSTRING(0 0,0.267949192431123 1,0.585786437626905 1.4142135623731) -astext03|CIRCULARSTRING(-5 0,0 5,5 0,10 -5,15 0) -astext04|CIRCULARSTRING(0 0,0.267949192431123 1,0.585786437626905 1.4142135623731) -astext04|CIRCULARSTRING(-5 0,0 5,5 0,10 -5,15 0) +astext02|CIRCULARSTRING M (0 0 0,0.267949192431123 1 -2,0.585786437626905 1.4142135623731 2) +astext02|CIRCULARSTRING M (-5 0 4,0 5 3,5 0 2,10 -5 1,15 0 0) +astext03|CIRCULARSTRING Z (0 0 0,0.267949192431123 1 3,0.585786437626905 1.4142135623731 1) +astext03|CIRCULARSTRING Z (-5 0 0,0 5 1,5 0 2,10 -5 3,15 0 4) +astext04|CIRCULARSTRING ZM (0 0 0 0,0.267949192431123 1 3 -2,0.585786437626905 1.4142135623731 1 2) +astext04|CIRCULARSTRING ZM (-5 0 0 4,0 5 1 3,5 0 2 2,10 -5 3 1,15 0 4 0) asewkt01|CIRCULARSTRING(0 0,0.267949192431123 1,0.585786437626905 1.4142135623731) asewkt01|CIRCULARSTRING(-5 0,0 5,5 0,10 -5,15 0) asewkt02|CIRCULARSTRINGM(0 0 0,0.267949192431123 1 -2,0.585786437626905 1.4142135623731 2) @@ -130,14 +80,14 @@ dimension03|1 dimension04|1 dimension04|1 -SRID01|-1 -SRID01|-1 -SRID02|-1 -SRID02|-1 -SRID03|-1 -SRID03|-1 -SRID04|-1 -SRID04|-1 +SRID01|0 +SRID01|0 +SRID02|0 +SRID02|0 +SRID03|0 +SRID03|0 +SRID04|0 +SRID04|0 ERROR: Exception in LWGEOM2GEOS: curved geometry not supported. ERROR: Exception in LWGEOM2GEOS: curved geometry not supported. ERROR: Exception in LWGEOM2GEOS: curved geometry not supported. @@ -154,6 +104,5 @@ public.circularstring.the_geom_3dz effectively removed. public.circularstring.the_geom_3dm effectively removed. public.circularstring.the_geom_2d effectively removed. -POLYGON((220187.375 150406.421875,220187.375 150506.71875,220288.828125 150506.71875,220288.828125 150406.421875,220187.375 150406.421875)) -5 -BOX(10 2,14 2) +POLYGON((220187.3821 150406.4347,220187.3821 150506.7171,220288.8159 150506.7171,220288.8159 150406.4347,220187.3821 150406.4347)) +npoints_is_null| diff -Nru postgis-1.5.3/regress/sql-mm-compoundcurve.sql postgis-2.0.1/regress/sql-mm-compoundcurve.sql --- postgis-1.5.3/regress/sql-mm-compoundcurve.sql 2009-08-07 03:38:24.000000000 +0000 +++ postgis-2.0.1/regress/sql-mm-compoundcurve.sql 2012-02-27 22:08:12.000000000 +0000 @@ -1,323 +1,324 @@ -SELECT 'ndims01', ndims(geomfromewkt('COMPOUNDCURVE(CIRCULARSTRING( - 0 0 0 0, - 0.26794919243112270647255365849413 1 3 -2, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2), - (0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2, - 2 0 0 0, - 0 0 0 0))')); -SELECT 'geometrytype01', geometrytype(geomfromewkt('COMPOUNDCURVE(CIRCULARSTRING( - 0 0 0 0, - 0.26794919243112270647255365849413 1 3 -2, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2), - (0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2, - 2 0 0 0, - 0 0 0 0))')); -SELECT 'ndims02', ndims(geomfromewkt('COMPOUNDCURVE(CIRCULARSTRING( - 0 0 0, - 0.26794919243112270647255365849413 1 3, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1), - (0.5857864376269049511983112757903 1.4142135623730950488016887242097 1, - 2 0 0, - 0 0 0))')); -SELECT 'geometrytype02', geometrytype(geomfromewkt('COMPOUNDCURVE(CIRCULARSTRING( - 0 0 0, - 0.26794919243112270647255365849413 1 3, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1), - (0.5857864376269049511983112757903 1.4142135623730950488016887242097 1, - 2 0 0, - 0 0 0))')); -SELECT 'ndims03', ndims(geomfromewkt('COMPOUNDCURVEM(CIRCULARSTRING( - 0 0 0, - 0.26794919243112270647255365849413 1 -2, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097 2), - (0.5857864376269049511983112757903 1.4142135623730950488016887242097 2, - 2 0 0, - 0 0 0))')); -SELECT 'geometrytype03', geometrytype(geomfromewkt('COMPOUNDCURVEM(CIRCULARSTRING( - 0 0 0, - 0.26794919243112270647255365849413 1 -2, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097 2), - (0.5857864376269049511983112757903 1.4142135623730950488016887242097 2, - 2 0 0, - 0 0 0))')); -SELECT 'ndims04', ndims(geomfromewkt('COMPOUNDCURVE(CIRCULARSTRING( - 0 0, - 0.26794919243112270647255365849413 1, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097), - (0.5857864376269049511983112757903 1.4142135623730950488016887242097, - 2 0, - 0 0))')); -SELECT 'geometrytype04', geometrytype(geomfromewkt('COMPOUNDCURVE(CIRCULARSTRING( - 0 0, - 0.26794919243112270647255365849413 1, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097), - (0.5857864376269049511983112757903 1.4142135623730950488016887242097, - 2 0, - 0 0))')); - --- Repeat tests with new function names. -SELECT 'ndims01', ST_ndims(ST_geomfromewkt('COMPOUNDCURVE(CIRCULARSTRING( - 0 0 0 0, - 0.26794919243112270647255365849413 1 3 -2, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2), - (0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2, - 2 0 0 0, - 0 0 0 0))')); -SELECT 'geometrytype01', geometrytype(ST_geomfromewkt('COMPOUNDCURVE(CIRCULARSTRING( - 0 0 0 0, - 0.26794919243112270647255365849413 1 3 -2, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2), - (0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2, - 2 0 0 0, - 0 0 0 0))')); -SELECT 'ndims02', ST_ndims(ST_geomfromewkt('COMPOUNDCURVE(CIRCULARSTRING( - 0 0 0, - 0.26794919243112270647255365849413 1 3, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1), - (0.5857864376269049511983112757903 1.4142135623730950488016887242097 1, - 2 0 0, - 0 0 0))')); -SELECT 'geometrytype02', geometrytype(ST_geomfromewkt('COMPOUNDCURVE(CIRCULARSTRING( - 0 0 0, - 0.26794919243112270647255365849413 1 3, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1), - (0.5857864376269049511983112757903 1.4142135623730950488016887242097 1, - 2 0 0, - 0 0 0))')); -SELECT 'ndims03', ST_ndims(ST_geomfromewkt('COMPOUNDCURVEM(CIRCULARSTRING( - 0 0 0, - 0.26794919243112270647255365849413 1 -2, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097 2), - (0.5857864376269049511983112757903 1.4142135623730950488016887242097 2, - 2 0 0, - 0 0 0))')); -SELECT 'geometrytype03', geometrytype(ST_geomfromewkt('COMPOUNDCURVEM(CIRCULARSTRING( - 0 0 0, - 0.26794919243112270647255365849413 1 -2, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097 2), - (0.5857864376269049511983112757903 1.4142135623730950488016887242097 2, - 2 0 0, - 0 0 0))')); -SELECT 'ndims04', ST_ndims(ST_geomfromewkt('COMPOUNDCURVE(CIRCULARSTRING( - 0 0, - 0.26794919243112270647255365849413 1, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097), - (0.5857864376269049511983112757903 1.4142135623730950488016887242097, - 2 0, - 0 0))')); -SELECT 'geometrytype04', geometrytype(ST_geomfromewkt('COMPOUNDCURVE(CIRCULARSTRING( - 0 0, - 0.26794919243112270647255365849413 1, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097), - (0.5857864376269049511983112757903 1.4142135623730950488016887242097, - 2 0, - 0 0))')); - -CREATE TABLE public.compoundcurve (id INTEGER, description VARCHAR); -SELECT AddGeometryColumn('public', 'compoundcurve', 'the_geom_2d', -1, 'COMPOUNDCURVE', 2); -SELECT AddGeometryColumn('public', 'compoundcurve', 'the_geom_3dm', -1, 'COMPOUNDCURVEM', 3); -SELECT AddGeometryColumn('public', 'compoundcurve', 'the_geom_3dz', -1, 'COMPOUNDCURVE', 3); -SELECT AddGeometryColumn('public', 'compoundcurve', 'the_geom_4d', -1, 'COMPOUNDCURVE', 4); - -INSERT INTO public.compoundcurve ( - id, - description - ) VALUES ( - 2, - 'compoundcurve'); -UPDATE public.compoundcurve - SET the_geom_4d = geomfromewkt('COMPOUNDCURVE(CIRCULARSTRING( - 0 0 0 0, - 0.26794919243112270647255365849413 1 3 -2, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2), - (0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2, - 2 0 0 0, - 0 0 0 0))'); -UPDATE public.compoundcurve - SET the_geom_3dz = geomfromewkt('COMPOUNDCURVE(CIRCULARSTRING( - 0 0 0, - 0.26794919243112270647255365849413 1 3, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1), - (0.5857864376269049511983112757903 1.4142135623730950488016887242097 1, - 2 0 0, - 0 0 0))'); -UPDATE public.compoundcurve - SET the_geom_3dm = geomfromewkt('COMPOUNDCURVEM(CIRCULARSTRING( - 0 0 0, - 0.26794919243112270647255365849413 1 -2, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097 2), - (0.5857864376269049511983112757903 1.4142135623730950488016887242097 2, - 2 0 0, - 0 0 0))'); -UPDATE public.compoundcurve - SET the_geom_2d = geomfromewkt('COMPOUNDCURVE(CIRCULARSTRING( - 0 0, - 0.26794919243112270647255365849413 1, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097), - (0.5857864376269049511983112757903 1.4142135623730950488016887242097, - 2 0, - 0 0))'); - -SELECT 'astext01', astext(the_geom_2d) FROM public.compoundcurve; -SELECT 'astext02', astext(the_geom_3dm) FROM public.compoundcurve; -SELECT 'astext03', astext(the_geom_3dz) FROM public.compoundcurve; -SELECT 'astext04', astext(the_geom_4d) FROM public.compoundcurve; - -SELECT 'asewkt01', asewkt(the_geom_2d) FROM public.compoundcurve; -SELECT 'asewkt02', asewkt(the_geom_3dm) FROM public.compoundcurve; -SELECT 'asewkt03', asewkt(the_geom_3dz) FROM public.compoundcurve; -SELECT 'asewkt04', asewkt(the_geom_4d) FROM public.compoundcurve; - --- These tests will fail on different architectures --- We need a way to handle multiple byte orderings ---SELECT 'asbinary01', encode(asbinary(the_geom_2d), 'hex') FROM public.compoundcurve; ---SELECT 'asbinary02', encode(asbinary(the_geom_3dm), 'hex') FROM public.compoundcurve; ---SELECT 'asbinary03', encode(asbinary(the_geom_3dz), 'hex') FROM public.compoundcurve; ---SELECT 'asbinary04', encode(asbinary(the_geom_4d), 'hex') FROM public.compoundcurve; --- ---SELECT 'asewkb01', encode(asewkb(the_geom_2d), 'hex') FROM public.compoundcurve; ---SELECT 'asewkb02', encode(asewkb(the_geom_3dm), 'hex') FROM public.compoundcurve; ---SELECT 'asewkb03', encode(asewkb(the_geom_3dz), 'hex') FROM public.compoundcurve; ---SELECT 'asewkb04', encode(asewkb(the_geom_4d), 'hex') FROM public.compoundcurve; - -SELECT 'ST_CurveToLine-201', asewkt(snapToGrid(ST_CurveToLine(the_geom_2d, 2), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; -SELECT 'ST_CurveToLine-202', asewkt(snapToGrid(ST_CurveToLine(the_geom_3dm, 2), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; -SELECT 'ST_CurveToLine-203', asewkt(snapToGrid(ST_CurveToLine(the_geom_3dz, 2), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; -SELECT 'ST_CurveToLine-204', asewkt(snapToGrid(ST_CurveToLine(the_geom_4d, 2), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; - -SELECT 'ST_CurveToLine-401', asewkt(snapToGrid(ST_CurveToLine(the_geom_2d, 4), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; -SELECT 'ST_CurveToLine-402', asewkt(snapToGrid(ST_CurveToLine(the_geom_3dm, 4), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; -SELECT 'ST_CurveToLine-403', asewkt(snapToGrid(ST_CurveToLine(the_geom_3dz, 4), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; -SELECT 'ST_CurveToLine-404', asewkt(snapToGrid(ST_CurveToLine(the_geom_4d, 4), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; - -SELECT 'ST_CurveToLine01', asewkt(snapToGrid(ST_CurveToLine(the_geom_2d), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; -SELECT 'ST_CurveToLine02', asewkt(snapToGrid(ST_CurveToLine(the_geom_3dm), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; -SELECT 'ST_CurveToLine03', asewkt(snapToGrid(ST_CurveToLine(the_geom_3dz), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; -SELECT 'ST_CurveToLine04', asewkt(snapToGrid(ST_CurveToLine(the_geom_4d), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; - --- Removed due to discrepencies between hardware ---SELECT 'box2d01', box2d(the_geom_2d) FROM public.compoundcurve; ---SELECT 'box2d02', box2d(the_geom_3dm) FROM public.compoundcurve; ---SELECT 'box2d03', box2d(the_geom_3dz) FROM public.compoundcurve; ---SELECT 'box2d04', box2d(the_geom_4d) FROM public.compoundcurve; - ---SELECT 'box3d01', box3d(the_geom_2d) FROM public.compoundcurve; ---SELECT 'box3d02', box3d(the_geom_3dm) FROM public.compoundcurve; ---SELECT 'box3d03', box3d(the_geom_3dz) FROM public.compoundcurve; ---SELECT 'box3d04', box3d(the_geom_4d) FROM public.compoundcurve; - -SELECT 'isValid01', isValid(the_geom_2d) FROM public.compoundcurve; -SELECT 'isValid02', isValid(the_geom_3dm) FROM public.compoundcurve; -SELECT 'isValid03', isValid(the_geom_3dz) FROM public.compoundcurve; -SELECT 'isValid04', isValid(the_geom_4d) FROM public.compoundcurve; - -SELECT 'dimension01', dimension(the_geom_2d) FROM public.compoundcurve; -SELECT 'dimension02', dimension(the_geom_3dm) FROM public.compoundcurve; -SELECT 'dimension03', dimension(the_geom_3dz) FROM public.compoundcurve; -SELECT 'dimension04', dimension(the_geom_4d) FROM public.compoundcurve; - -SELECT 'SRID01', SRID(the_geom_2d) FROM public.compoundcurve; -SELECT 'SRID02', SRID(the_geom_3dm) FROM public.compoundcurve; -SELECT 'SRID03', SRID(the_geom_3dz) FROM public.compoundcurve; -SELECT 'SRID04', SRID(the_geom_4d) FROM public.compoundcurve; - -SELECT 'accessor01', isEmpty(the_geom_2d), isSimple(the_geom_2d), isClosed(the_geom_2d), isRing(the_geom_2d) FROM public.compoundcurve; -SELECT 'accessor02', isEmpty(the_geom_3dm), isSimple(the_geom_3dm), isClosed(the_geom_3dm), isRing(the_geom_3dm) FROM public.compoundcurve; -SELECT 'accessor03', isEmpty(the_geom_3dz), isSimple(the_geom_3dz), isClosed(the_geom_3dz), isRing(the_geom_3dz) FROM public.compoundcurve; -SELECT 'accessor04', isEmpty(the_geom_4d), isSimple(the_geom_4d), isClosed(the_geom_4d), isRing(the_geom_4d) FROM public.compoundcurve; - -SELECT 'envelope01', asText(snapToGrid(envelope(the_geom_2d), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; -SELECT 'envelope02', asText(snapToGrid(envelope(the_geom_3dm), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; -SELECT 'envelope03', asText(snapToGrid(envelope(the_geom_3dz), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; -SELECT 'envelope04', asText(snapToGrid(envelope(the_geom_4d), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; - --- TODO: ST_SnapToGrid is required to remove platform dependent precision --- issues. Until ST_SnapToGrid is updated to work against curves, these --- tests cannot be run. ---SELECT 'ST_LineToCurve', asewkt(ST_LineToCurve(ST_CurveToLine(the_geom_2d))) FROM public.compoundcurve; ---SELECT 'ST_LineToCurve', asewkt(ST_LineToCurve(ST_CurveToLine(the_geom_3dm))) FROM public.compoundcurve; ---SELECT 'ST_LineToCurve', asewkt(ST_LineToCurve(ST_CurveToLine(the_geom_3dz))) FROM public.compoundcurve; ---SELECT 'ST_LineToCurve', asewkt(ST_LineToCurve(ST_CurveToLine(the_geom_4d))) FROM public.compoundcurve; - --- Repeat tests on new function names. -SELECT 'astext01', ST_astext(the_geom_2d) FROM public.compoundcurve; -SELECT 'astext02', ST_astext(the_geom_3dm) FROM public.compoundcurve; -SELECT 'astext03', ST_astext(the_geom_3dz) FROM public.compoundcurve; -SELECT 'astext04', ST_astext(the_geom_4d) FROM public.compoundcurve; - -SELECT 'asewkt01', ST_asewkt(the_geom_2d) FROM public.compoundcurve; -SELECT 'asewkt02', ST_asewkt(the_geom_3dm) FROM public.compoundcurve; -SELECT 'asewkt03', ST_asewkt(the_geom_3dz) FROM public.compoundcurve; -SELECT 'asewkt04', ST_asewkt(the_geom_4d) FROM public.compoundcurve; - ---SELECT 'asbinary01', encode(ST_asbinary(the_geom_2d), 'hex') FROM public.compoundcurve; ---SELECT 'asbinary02', encode(ST_asbinary(the_geom_3dm), 'hex') FROM public.compoundcurve; ---SELECT 'asbinary03', encode(ST_asbinary(the_geom_3dz), 'hex') FROM public.compoundcurve; ---SELECT 'asbinary04', encode(ST_asbinary(the_geom_4d), 'hex') FROM public.compoundcurve; --- ---SELECT 'asewkb01', encode(ST_asewkb(the_geom_2d), 'hex') FROM public.compoundcurve; ---SELECT 'asewkb02', encode(ST_asewkb(the_geom_3dm), 'hex') FROM public.compoundcurve; ---SELECT 'asewkb03', encode(ST_asewkb(the_geom_3dz), 'hex') FROM public.compoundcurve; ---SELECT 'asewkb04', encode(ST_asewkb(the_geom_4d), 'hex') FROM public.compoundcurve; - --- Removed due to discrepencies between hardware ---SELECT 'box2d01', ST_box2d(the_geom_2d) FROM public.compoundcurve; ---SELECT 'box2d02', ST_box2d(the_geom_3dm) FROM public.compoundcurve; ---SELECT 'box2d03', ST_box2d(the_geom_3dz) FROM public.compoundcurve; ---SELECT 'box2d04', ST_box2d(the_geom_4d) FROM public.compoundcurve; - ---SELECT 'box3d01', ST_box3d(the_geom_2d) FROM public.compoundcurve; ---SELECT 'box3d02', ST_box3d(the_geom_3dm) FROM public.compoundcurve; ---SELECT 'box3d03', ST_box3d(the_geom_3dz) FROM public.compoundcurve; ---SELECT 'box3d04', ST_box3d(the_geom_4d) FROM public.compoundcurve; - -SELECT 'isValid01', ST_isValid(the_geom_2d) FROM public.compoundcurve; -SELECT 'isValid02', ST_isValid(the_geom_3dm) FROM public.compoundcurve; -SELECT 'isValid03', ST_isValid(the_geom_3dz) FROM public.compoundcurve; -SELECT 'isValid04', ST_isValid(the_geom_4d) FROM public.compoundcurve; - -SELECT 'dimension01', ST_dimension(the_geom_2d) FROM public.compoundcurve; -SELECT 'dimension02', ST_dimension(the_geom_3dm) FROM public.compoundcurve; -SELECT 'dimension03', ST_dimension(the_geom_3dz) FROM public.compoundcurve; -SELECT 'dimension04', ST_dimension(the_geom_4d) FROM public.compoundcurve; - -SELECT 'SRID01', ST_SRID(the_geom_2d) FROM public.compoundcurve; -SELECT 'SRID02', ST_SRID(the_geom_3dm) FROM public.compoundcurve; -SELECT 'SRID03', ST_SRID(the_geom_3dz) FROM public.compoundcurve; -SELECT 'SRID04', ST_SRID(the_geom_4d) FROM public.compoundcurve; - -SELECT 'accessor01', ST_isEmpty(the_geom_2d), ST_isSimple(the_geom_2d), ST_isClosed(the_geom_2d), ST_isRing(the_geom_2d) FROM public.compoundcurve; -SELECT 'accessor02', ST_isEmpty(the_geom_3dm), ST_isSimple(the_geom_3dm), ST_isClosed(the_geom_3dm), ST_isRing(the_geom_3dm) FROM public.compoundcurve; -SELECT 'accessor03', ST_isEmpty(the_geom_3dz), ST_isSimple(the_geom_3dz), ST_isClosed(the_geom_3dz), ST_isRing(the_geom_3dz) FROM public.compoundcurve; -SELECT 'accessor04', ST_isEmpty(the_geom_4d), ST_isSimple(the_geom_4d), ST_isClosed(the_geom_4d), ST_isRing(the_geom_4d) FROM public.compoundcurve; - -SELECT 'envelope01', ST_asText(ST_snapToGrid(ST_envelope(the_geom_2d), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; -SELECT 'envelope02', ST_asText(ST_snapToGrid(ST_envelope(the_geom_3dm), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; -SELECT 'envelope03', ST_asText(ST_snapToGrid(ST_envelope(the_geom_3dz), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; -SELECT 'envelope04', ST_asText(ST_snapToGrid(ST_envelope(the_geom_4d), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; - -SELECT DropGeometryColumn('public', 'compoundcurve', 'the_geom_4d'); -SELECT DropGeometryColumn('public', 'compoundcurve', 'the_geom_3dz'); -SELECT DropGeometryColumn('public', 'compoundcurve', 'the_geom_3dm'); -SELECT DropGeometryColumn('public', 'compoundcurve', 'the_geom_2d'); -DROP TABLE public.compoundcurve; - -SELECT 'valid wkt compound curve 1', ST_GeomFromEWKT('COMPOUNDCURVE((153.72942375 -27.21757040, 152.29285719 -29.23940482, 154.74034096 -30.51635287),(154.74034096 -30.51635287, 152.39926953 -32.16574411, 155.11278414 -34.08116619, 151.86720784 -35.62414508))'); -SELECT 'valid wkt compound curve 2', ST_GeomFromEWKT('COMPOUNDCURVE((153.72942375 -27.21757040, 152.29285719 -29.23940482, 154.74034096 -30.51635287, 152.39926953 -32.16574411, 155.11278414 -34.08116619, 151.86720784 -35.62414508))'); -SELECT 'valid wkt compound curve 3', ST_GeomFromEWKT('COMPOUNDCURVE((151.60117699 -27.32398274, 151.22873381 -35.94338210, 150.74987829 -27.80283826))'); -SELECT 'valid wkt compound curve 4', ST_GeomFromEWKT('COMPOUNDCURVE((153.72942375 -27.21757040, 152.29285719 -29.23940482, 154.74034096 -30.51635287),CIRCULARSTRING(154.74034096 -30.51635287, 154.74034096 -30.51635287, 152.39926953 -32.16574411, 155.11278414 -34.08116619, 151.86720784 -35.62414508))'); -SELECT 'valid wkt compound curve 5', ST_GeomFromEWKT('COMPOUNDCURVE(CIRCULARSTRING(157.87950492 -27.59001358, 156.01728901 -28.28169378, 155.59163966 -26.52589021),(155.59163966 -26.52589021, 153.72942375 -27.21757040, 152.29285719 -29.23940482, 154.74034096 -30.51635287),CIRCULARSTRING(154.74034096 -30.51635287, 154.74034096 -30.51635287, 152.39926953 -32.16574411, 155.11278414 -34.08116619, 151.86720784 -35.62414508))'); -SELECT 'invalid wkt compound curve 1', ST_GeomFromEWKT('COMPOUNDCURVE((153.72942375 -27.21757040, 152.29285719 -29.23940482, 154.74034096 -30.51635287),(152.39926953 -32.16574411, 155.11278414 -34.08116619, 151.86720784 -35.62414508))'); -SELECT 'invalid wkt compound curve 2', ST_GeomFromEWKT('COMPOUNDCURVE((153.72942375 -27.21757040, 152.29285719 -29.23940482),CIRCULARSTRING(154.74034096 -30.51635287, 154.74034096 -30.51635287, 152.39926953 -32.16574411, 155.11278414 -34.08116619, 151.86720784 -35.62414508))'); -SELECT 'invalid wkt compound curve 3', ST_GeomFromEWKT('COMPOUNDCURVE(CIRCULARSTRING(157.87950492 -27.59001358, 156.01728901 -28.28169378, 155.59163966 -26.52589021, 153.72942375 -27.21757040),(153.72942375 -27.21757040, 152.29285719 -29.23940482),CIRCULARSTRING(154.74034096 -30.51635287, 154.74034096 -30.51635287, 152.39926953 -32.16574411, 155.11278414 -34.08116619, 151.86720784 -35.62414508))'); -SELECT 'valid wkb compound curve 1', ST_asEWKT(ST_GeomFromEWKB(decode('0109000000020000000102000000030000009FE5797057376340E09398B1B2373BC05AAE0A165F0963409F6760A2493D3DC0DB6286DFB057634082D8A1B32F843EC0010200000004000000DB6286DFB057634082D8A1B32F843EC075B4E4D0C60C634031FA5D1A371540C0D7197CED9B636340A3CB59A7630A41C050F4A72AC0FB6240974769FCE3CF41C0', 'hex'))); -SELECT 'valid wkb compound curve 2', ST_asEWKT(ST_GeomFromEWKB(decode('0109000000010000000102000000060000009FE5797057376340E09398B1B2373BC05AAE0A165F0963409F6760A2493D3DC0DB6286DFB057634082D8A1B32F843EC075B4E4D0C60C634031FA5D1A371540C0D7197CED9B636340A3CB59A7630A41C050F4A72AC0FB6240974769FCE3CF41C0', 'hex'))); -SELECT 'valid wkb compound curve 3', ST_asEWKT(ST_GeomFromEWKB(decode('0109000000010000000102000000030000000CE586D73CF36240BBC46888F0523BC0102E91C951E76240DF90A1BEC0F841C0F970C100FFD7624074ADE6CE86CD3BC0', 'hex'))); -SELECT 'valid wkb compound curve 4', ST_asEWKT(ST_GeomFromEWKB(decode('0109000000020000000102000000030000009FE5797057376340E09398B1B2373BC05AAE0A165F0963409F6760A2493D3DC0DB6286DFB057634082D8A1B32F843EC0010800000005000000DB6286DFB057634082D8A1B32F843EC0DB6286DFB057634082D8A1B32F843EC075B4E4D0C60C634031FA5D1A371540C0D7197CED9B636340A3CB59A7630A41C050F4A72AC0FB6240974769FCE3CF41C0', 'hex'))); -SELECT 'valid wkb compound curve 5', ST_asEWKT(ST_GeomFromEWKB(decode('010900000003000000010800000003000000468280E724BC6340BF4B46210B973BC0F890AEA18D8063402D9664151D483CC0EED64BB6EE726340903CA5BDA0863AC0010200000004000000EED64BB6EE726340903CA5BDA0863AC09FE5797057376340E09398B1B2373BC05AAE0A165F0963409F6760A2493D3DC0DB6286DFB057634082D8A1B32F843EC0010800000005000000DB6286DFB057634082D8A1B32F843EC0DB6286DFB057634082D8A1B32F843EC075B4E4D0C60C634031FA5D1A371540C0D7197CED9B636340A3CB59A7630A41C050F4A72AC0FB6240974769FCE3CF41C0', 'hex'))); -SELECT 'null response', ST_NumPoints(ST_GeomFromEWKT('COMPOUNDCURVE(CIRCULARSTRING(0 0,2 0, 2 1, 2 3, 4 3),(4 3, 4 5, 1 4, 0 0))')); -SELECT 'minpoints issues - pass', GeomFromText('COMPOUNDCURVE((0 0,1 1))'); -SELECT 'minpoints issues - pass', GeomFromText('COMPOUNDCURVE(CIRCULARSTRING(0 0,0 1,1 1))'); -SELECT 'minpoints issues - fail', GeomFromText('COMPOUNDCURVE(CIRCULARSTRING(0 0,1 1))'); -SELECT 'minpoints issues - fail', GeomFromText('COMPOUNDCURVE(CIRCULARSTRING(0 0))'); -SELECT 'minpoints issues - fail', GeomFromText('COMPOUNDCURVE((0 0),(0 0,1 1))'); +SELECT 'ndims01', ST_NDims(ST_Geomfromewkt('COMPOUNDCURVE(CIRCULARSTRING( + 0 0 0 0, + 0.26794919243112270647255365849413 1 3 -2, + 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2), + (0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2, + 2 0 0 0, + 0 0 0 0))')); +SELECT 'geometrytype01', geometrytype(ST_Geomfromewkt('COMPOUNDCURVE(CIRCULARSTRING( + 0 0 0 0, + 0.26794919243112270647255365849413 1 3 -2, + 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2), + (0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2, + 2 0 0 0, + 0 0 0 0))')); +SELECT 'ndims02', ST_NDims(ST_Geomfromewkt('COMPOUNDCURVE(CIRCULARSTRING( + 0 0 0, + 0.26794919243112270647255365849413 1 3, + 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1), + (0.5857864376269049511983112757903 1.4142135623730950488016887242097 1, + 2 0 0, + 0 0 0))')); +SELECT 'geometrytype02', geometrytype(ST_Geomfromewkt('COMPOUNDCURVE(CIRCULARSTRING( + 0 0 0, + 0.26794919243112270647255365849413 1 3, + 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1), + (0.5857864376269049511983112757903 1.4142135623730950488016887242097 1, + 2 0 0, + 0 0 0))')); +SELECT 'ndims03', ST_NDims(ST_Geomfromewkt('COMPOUNDCURVEM(CIRCULARSTRING( + 0 0 0, + 0.26794919243112270647255365849413 1 -2, + 0.5857864376269049511983112757903 1.4142135623730950488016887242097 2), + (0.5857864376269049511983112757903 1.4142135623730950488016887242097 2, + 2 0 0, + 0 0 0))')); +SELECT 'geometrytype03', geometrytype(ST_Geomfromewkt('COMPOUNDCURVEM(CIRCULARSTRING( + 0 0 0, + 0.26794919243112270647255365849413 1 -2, + 0.5857864376269049511983112757903 1.4142135623730950488016887242097 2), + (0.5857864376269049511983112757903 1.4142135623730950488016887242097 2, + 2 0 0, + 0 0 0))')); +SELECT 'ndims04', ST_NDims(ST_Geomfromewkt('COMPOUNDCURVE(CIRCULARSTRING( + 0 0, + 0.26794919243112270647255365849413 1, + 0.5857864376269049511983112757903 1.4142135623730950488016887242097), + (0.5857864376269049511983112757903 1.4142135623730950488016887242097, + 2 0, + 0 0))')); +SELECT 'geometrytype04', geometrytype(ST_Geomfromewkt('COMPOUNDCURVE(CIRCULARSTRING( + 0 0, + 0.26794919243112270647255365849413 1, + 0.5857864376269049511983112757903 1.4142135623730950488016887242097), + (0.5857864376269049511983112757903 1.4142135623730950488016887242097, + 2 0, + 0 0))')); + +-- Repeat tests with new function names. +SELECT 'ndims01', ST_NDims(ST_geomfromewkt('COMPOUNDCURVE(CIRCULARSTRING( + 0 0 0 0, + 0.26794919243112270647255365849413 1 3 -2, + 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2), + (0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2, + 2 0 0 0, + 0 0 0 0))')); +SELECT 'geometrytype01', geometrytype(ST_geomfromewkt('COMPOUNDCURVE(CIRCULARSTRING( + 0 0 0 0, + 0.26794919243112270647255365849413 1 3 -2, + 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2), + (0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2, + 2 0 0 0, + 0 0 0 0))')); +SELECT 'ndims02', ST_NDims(ST_geomfromewkt('COMPOUNDCURVE(CIRCULARSTRING( + 0 0 0, + 0.26794919243112270647255365849413 1 3, + 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1), + (0.5857864376269049511983112757903 1.4142135623730950488016887242097 1, + 2 0 0, + 0 0 0))')); +SELECT 'geometrytype02', geometrytype(ST_geomfromewkt('COMPOUNDCURVE(CIRCULARSTRING( + 0 0 0, + 0.26794919243112270647255365849413 1 3, + 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1), + (0.5857864376269049511983112757903 1.4142135623730950488016887242097 1, + 2 0 0, + 0 0 0))')); +SELECT 'ndims03', ST_NDims(ST_geomfromewkt('COMPOUNDCURVEM(CIRCULARSTRING( + 0 0 0, + 0.26794919243112270647255365849413 1 -2, + 0.5857864376269049511983112757903 1.4142135623730950488016887242097 2), + (0.5857864376269049511983112757903 1.4142135623730950488016887242097 2, + 2 0 0, + 0 0 0))')); +SELECT 'geometrytype03', geometrytype(ST_geomfromewkt('COMPOUNDCURVEM(CIRCULARSTRING( + 0 0 0, + 0.26794919243112270647255365849413 1 -2, + 0.5857864376269049511983112757903 1.4142135623730950488016887242097 2), + (0.5857864376269049511983112757903 1.4142135623730950488016887242097 2, + 2 0 0, + 0 0 0))')); +SELECT 'ndims04', ST_NDims(ST_geomfromewkt('COMPOUNDCURVE(CIRCULARSTRING( + 0 0, + 0.26794919243112270647255365849413 1, + 0.5857864376269049511983112757903 1.4142135623730950488016887242097), + (0.5857864376269049511983112757903 1.4142135623730950488016887242097, + 2 0, + 0 0))')); +SELECT 'geometrytype04', geometrytype(ST_geomfromewkt('COMPOUNDCURVE(CIRCULARSTRING( + 0 0, + 0.26794919243112270647255365849413 1, + 0.5857864376269049511983112757903 1.4142135623730950488016887242097), + (0.5857864376269049511983112757903 1.4142135623730950488016887242097, + 2 0, + 0 0))')); + +CREATE TABLE public.compoundcurve (id INTEGER, description VARCHAR, +the_geom_2d GEOMETRY(COMPOUNDCURVE), +the_geom_3dm GEOMETRY(COMPOUNDCURVEM), +the_geom_3dz GEOMETRY(COMPOUNDCURVEZ), +the_geom_4d GEOMETRY(COMPOUNDCURVEZM) +); + +INSERT INTO public.compoundcurve ( + id, + description + ) VALUES ( + 2, + 'compoundcurve'); +UPDATE public.compoundcurve + SET the_geom_4d = ST_Geomfromewkt('COMPOUNDCURVE(CIRCULARSTRING( + 0 0 0 0, + 0.26794919243112270647255365849413 1 3 -2, + 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2), + (0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2, + 2 0 0 0, + 0 0 0 0))'); +UPDATE public.compoundcurve + SET the_geom_3dz = ST_Geomfromewkt('COMPOUNDCURVE(CIRCULARSTRING( + 0 0 0, + 0.26794919243112270647255365849413 1 3, + 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1), + (0.5857864376269049511983112757903 1.4142135623730950488016887242097 1, + 2 0 0, + 0 0 0))'); +UPDATE public.compoundcurve + SET the_geom_3dm = ST_Geomfromewkt('COMPOUNDCURVEM(CIRCULARSTRING( + 0 0 0, + 0.26794919243112270647255365849413 1 -2, + 0.5857864376269049511983112757903 1.4142135623730950488016887242097 2), + (0.5857864376269049511983112757903 1.4142135623730950488016887242097 2, + 2 0 0, + 0 0 0))'); +UPDATE public.compoundcurve + SET the_geom_2d = ST_Geomfromewkt('COMPOUNDCURVE(CIRCULARSTRING( + 0 0, + 0.26794919243112270647255365849413 1, + 0.5857864376269049511983112757903 1.4142135623730950488016887242097), + (0.5857864376269049511983112757903 1.4142135623730950488016887242097, + 2 0, + 0 0))'); + +SELECT 'astext01', ST_Astext(the_geom_2d) FROM public.compoundcurve; +SELECT 'astext02', ST_Astext(the_geom_3dm) FROM public.compoundcurve; +SELECT 'astext03', ST_Astext(the_geom_3dz) FROM public.compoundcurve; +SELECT 'astext04', ST_Astext(the_geom_4d) FROM public.compoundcurve; + +SELECT 'asewkt01', ST_Asewkt(the_geom_2d) FROM public.compoundcurve; +SELECT 'asewkt02', ST_Asewkt(the_geom_3dm) FROM public.compoundcurve; +SELECT 'asewkt03', ST_Asewkt(the_geom_3dz) FROM public.compoundcurve; +SELECT 'asewkt04', ST_Asewkt(the_geom_4d) FROM public.compoundcurve; + +-- These tests will fail on different architectures +-- We need a way to handle multiple byte orderings +--SELECT 'asbinary01', encode(asbinary(the_geom_2d), 'hex') FROM public.compoundcurve; +--SELECT 'asbinary02', encode(asbinary(the_geom_3dm), 'hex') FROM public.compoundcurve; +--SELECT 'asbinary03', encode(asbinary(the_geom_3dz), 'hex') FROM public.compoundcurve; +--SELECT 'asbinary04', encode(asbinary(the_geom_4d), 'hex') FROM public.compoundcurve; +-- +--SELECT 'asewkb01', encode(asewkb(the_geom_2d), 'hex') FROM public.compoundcurve; +--SELECT 'asewkb02', encode(asewkb(the_geom_3dm), 'hex') FROM public.compoundcurve; +--SELECT 'asewkb03', encode(asewkb(the_geom_3dz), 'hex') FROM public.compoundcurve; +--SELECT 'asewkb04', encode(asewkb(the_geom_4d), 'hex') FROM public.compoundcurve; + +SELECT 'ST_CurveToLine-201', ST_Asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_2d, 2), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; +SELECT 'ST_CurveToLine-202', ST_Asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_3dm, 2), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; +SELECT 'ST_CurveToLine-203', ST_Asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_3dz, 2), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; +SELECT 'ST_CurveToLine-204', ST_Asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_4d, 2), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; + +SELECT 'ST_CurveToLine-401', ST_Asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_2d, 4), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; +SELECT 'ST_CurveToLine-402', ST_Asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_3dm, 4), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; +SELECT 'ST_CurveToLine-403', ST_Asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_3dz, 4), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; +SELECT 'ST_CurveToLine-404', ST_Asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_4d, 4), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; + +SELECT 'ST_CurveToLine01', ST_Asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_2d), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; +SELECT 'ST_CurveToLine02', ST_Asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_3dm), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; +SELECT 'ST_CurveToLine03', ST_Asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_3dz), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; +SELECT 'ST_CurveToLine04', ST_Asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_4d), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; + +-- Removed due to discrepencies between hardware +--SELECT 'box2d01', box2d(the_geom_2d) FROM public.compoundcurve; +--SELECT 'box2d02', box2d(the_geom_3dm) FROM public.compoundcurve; +--SELECT 'box2d03', box2d(the_geom_3dz) FROM public.compoundcurve; +--SELECT 'box2d04', box2d(the_geom_4d) FROM public.compoundcurve; + +--SELECT 'box3d01', box3d(the_geom_2d) FROM public.compoundcurve; +--SELECT 'box3d02', box3d(the_geom_3dm) FROM public.compoundcurve; +--SELECT 'box3d03', box3d(the_geom_3dz) FROM public.compoundcurve; +--SELECT 'box3d04', box3d(the_geom_4d) FROM public.compoundcurve; + +-- SELECT 'isValid01', isValid(the_geom_2d) FROM public.compoundcurve; +-- SELECT 'isValid02', isValid(the_geom_3dm) FROM public.compoundcurve; +-- SELECT 'isValid03', isValid(the_geom_3dz) FROM public.compoundcurve; +-- SELECT 'isValid04', isValid(the_geom_4d) FROM public.compoundcurve; + +-- SELECT 'dimension01', dimension(the_geom_2d) FROM public.compoundcurve; +-- SELECT 'dimension02', dimension(the_geom_3dm) FROM public.compoundcurve; +-- SELECT 'dimension03', dimension(the_geom_3dz) FROM public.compoundcurve; +-- SELECT 'dimension04', dimension(the_geom_4d) FROM public.compoundcurve; + +-- SELECT 'SRID01', ST_SRID(the_geom_2d) FROM public.compoundcurve; +-- SELECT 'SRID02', ST_SRID(the_geom_3dm) FROM public.compoundcurve; +-- SELECT 'SRID03', ST_SRID(the_geom_3dz) FROM public.compoundcurve; +-- SELECT 'SRID04', ST_SRID(the_geom_4d) FROM public.compoundcurve; + +-- SELECT 'accessor01', isEmpty(the_geom_2d), isSimple(the_geom_2d), isClosed(the_geom_2d), isRing(the_geom_2d) FROM public.compoundcurve; +-- SELECT 'accessor02', isEmpty(the_geom_3dm), isSimple(the_geom_3dm), isClosed(the_geom_3dm), isRing(the_geom_3dm) FROM public.compoundcurve; +-- SELECT 'accessor03', isEmpty(the_geom_3dz), isSimple(the_geom_3dz), isClosed(the_geom_3dz), isRing(the_geom_3dz) FROM public.compoundcurve; +-- SELECT 'accessor04', isEmpty(the_geom_4d), isSimple(the_geom_4d), isClosed(the_geom_4d), isRing(the_geom_4d) FROM public.compoundcurve; + +-- SELECT 'envelope01', ST_AsText(ST_SnapToGrid(envelope(the_geom_2d), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; +-- SELECT 'envelope02', ST_AsText(ST_SnapToGrid(envelope(the_geom_3dm), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; +-- SELECT 'envelope03', ST_AsText(ST_SnapToGrid(envelope(the_geom_3dz), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; +-- SELECT 'envelope04', ST_AsText(ST_SnapToGrid(envelope(the_geom_4d), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; + +-- TODO: ST_SnapToGrid is required to remove platform dependent precision +-- issues. Until ST_SnapToGrid is updated to work against curves, these +-- tests cannot be run. +--SELECT 'ST_LineToCurve', ST_Asewkt(ST_LineToCurve(ST_CurveToLine(the_geom_2d))) FROM public.compoundcurve; +--SELECT 'ST_LineToCurve', ST_Asewkt(ST_LineToCurve(ST_CurveToLine(the_geom_3dm))) FROM public.compoundcurve; +--SELECT 'ST_LineToCurve', ST_Asewkt(ST_LineToCurve(ST_CurveToLine(the_geom_3dz))) FROM public.compoundcurve; +--SELECT 'ST_LineToCurve', ST_Asewkt(ST_LineToCurve(ST_CurveToLine(the_geom_4d))) FROM public.compoundcurve; + +-- Repeat tests on new function names. +SELECT 'astext01', ST_astext(the_geom_2d) FROM public.compoundcurve; +SELECT 'astext02', ST_astext(the_geom_3dm) FROM public.compoundcurve; +SELECT 'astext03', ST_astext(the_geom_3dz) FROM public.compoundcurve; +SELECT 'astext04', ST_astext(the_geom_4d) FROM public.compoundcurve; + +SELECT 'asewkt01', ST_asewkt(the_geom_2d) FROM public.compoundcurve; +SELECT 'asewkt02', ST_asewkt(the_geom_3dm) FROM public.compoundcurve; +SELECT 'asewkt03', ST_asewkt(the_geom_3dz) FROM public.compoundcurve; +SELECT 'asewkt04', ST_asewkt(the_geom_4d) FROM public.compoundcurve; + +--SELECT 'asbinary01', encode(ST_asbinary(the_geom_2d), 'hex') FROM public.compoundcurve; +--SELECT 'asbinary02', encode(ST_asbinary(the_geom_3dm), 'hex') FROM public.compoundcurve; +--SELECT 'asbinary03', encode(ST_asbinary(the_geom_3dz), 'hex') FROM public.compoundcurve; +--SELECT 'asbinary04', encode(ST_asbinary(the_geom_4d), 'hex') FROM public.compoundcurve; +-- +--SELECT 'asewkb01', encode(ST_asewkb(the_geom_2d), 'hex') FROM public.compoundcurve; +--SELECT 'asewkb02', encode(ST_asewkb(the_geom_3dm), 'hex') FROM public.compoundcurve; +--SELECT 'asewkb03', encode(ST_asewkb(the_geom_3dz), 'hex') FROM public.compoundcurve; +--SELECT 'asewkb04', encode(ST_asewkb(the_geom_4d), 'hex') FROM public.compoundcurve; + +-- Removed due to discrepencies between hardware +--SELECT 'box2d01', ST_box2d(the_geom_2d) FROM public.compoundcurve; +--SELECT 'box2d02', ST_box2d(the_geom_3dm) FROM public.compoundcurve; +--SELECT 'box2d03', ST_box2d(the_geom_3dz) FROM public.compoundcurve; +--SELECT 'box2d04', ST_box2d(the_geom_4d) FROM public.compoundcurve; + +--SELECT 'box3d01', ST_box3d(the_geom_2d) FROM public.compoundcurve; +--SELECT 'box3d02', ST_box3d(the_geom_3dm) FROM public.compoundcurve; +--SELECT 'box3d03', ST_box3d(the_geom_3dz) FROM public.compoundcurve; +--SELECT 'box3d04', ST_box3d(the_geom_4d) FROM public.compoundcurve; + +SELECT 'isValid01', ST_isValid(the_geom_2d) FROM public.compoundcurve; +SELECT 'isValid02', ST_isValid(the_geom_3dm) FROM public.compoundcurve; +SELECT 'isValid03', ST_isValid(the_geom_3dz) FROM public.compoundcurve; +SELECT 'isValid04', ST_isValid(the_geom_4d) FROM public.compoundcurve; + +SELECT 'dimension01', ST_dimension(the_geom_2d) FROM public.compoundcurve; +SELECT 'dimension02', ST_dimension(the_geom_3dm) FROM public.compoundcurve; +SELECT 'dimension03', ST_dimension(the_geom_3dz) FROM public.compoundcurve; +SELECT 'dimension04', ST_dimension(the_geom_4d) FROM public.compoundcurve; + +SELECT 'SRID01', ST_SRID(the_geom_2d) FROM public.compoundcurve; +SELECT 'SRID02', ST_SRID(the_geom_3dm) FROM public.compoundcurve; +SELECT 'SRID03', ST_SRID(the_geom_3dz) FROM public.compoundcurve; +SELECT 'SRID04', ST_SRID(the_geom_4d) FROM public.compoundcurve; + +SELECT 'accessor01', ST_isEmpty(the_geom_2d), ST_isSimple(the_geom_2d), ST_isClosed(the_geom_2d), ST_isRing(the_geom_2d) FROM public.compoundcurve; +SELECT 'accessor02', ST_isEmpty(the_geom_3dm), ST_isSimple(the_geom_3dm), ST_isClosed(the_geom_3dm), ST_isRing(the_geom_3dm) FROM public.compoundcurve; +SELECT 'accessor03', ST_isEmpty(the_geom_3dz), ST_isSimple(the_geom_3dz), ST_isClosed(the_geom_3dz), ST_isRing(the_geom_3dz) FROM public.compoundcurve; +SELECT 'accessor04', ST_isEmpty(the_geom_4d), ST_isSimple(the_geom_4d), ST_isClosed(the_geom_4d), ST_isRing(the_geom_4d) FROM public.compoundcurve; + +SELECT 'envelope01', ST_asText(ST_snapToGrid(ST_envelope(the_geom_2d), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; +SELECT 'envelope02', ST_asText(ST_snapToGrid(ST_envelope(the_geom_3dm), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; +SELECT 'envelope03', ST_asText(ST_snapToGrid(ST_envelope(the_geom_3dz), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; +SELECT 'envelope04', ST_asText(ST_snapToGrid(ST_envelope(the_geom_4d), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.compoundcurve; + +SELECT DropGeometryColumn('public', 'compoundcurve', 'the_geom_4d'); +SELECT DropGeometryColumn('public', 'compoundcurve', 'the_geom_3dz'); +SELECT DropGeometryColumn('public', 'compoundcurve', 'the_geom_3dm'); +SELECT DropGeometryColumn('public', 'compoundcurve', 'the_geom_2d'); +DROP TABLE public.compoundcurve; + +SELECT 'valid wkt compound curve 1', ST_GeomFromEWKT('COMPOUNDCURVE((153.72942375 -27.21757040, 152.29285719 -29.23940482, 154.74034096 -30.51635287),(154.74034096 -30.51635287, 152.39926953 -32.16574411, 155.11278414 -34.08116619, 151.86720784 -35.62414508))'); +SELECT 'valid wkt compound curve 2', ST_GeomFromEWKT('COMPOUNDCURVE((153.72942375 -27.21757040, 152.29285719 -29.23940482, 154.74034096 -30.51635287, 152.39926953 -32.16574411, 155.11278414 -34.08116619, 151.86720784 -35.62414508))'); +SELECT 'valid wkt compound curve 3', ST_GeomFromEWKT('COMPOUNDCURVE((151.60117699 -27.32398274, 151.22873381 -35.94338210, 150.74987829 -27.80283826))'); +SELECT 'valid wkt compound curve 4', ST_GeomFromEWKT('COMPOUNDCURVE((153.72942375 -27.21757040, 152.29285719 -29.23940482, 154.74034096 -30.51635287),CIRCULARSTRING(154.74034096 -30.51635287, 154.74034096 -30.51635287, 152.39926953 -32.16574411, 155.11278414 -34.08116619, 151.86720784 -35.62414508))'); +SELECT 'valid wkt compound curve 5', ST_GeomFromEWKT('COMPOUNDCURVE(CIRCULARSTRING(157.87950492 -27.59001358, 156.01728901 -28.28169378, 155.59163966 -26.52589021),(155.59163966 -26.52589021, 153.72942375 -27.21757040, 152.29285719 -29.23940482, 154.74034096 -30.51635287),CIRCULARSTRING(154.74034096 -30.51635287, 154.74034096 -30.51635287, 152.39926953 -32.16574411, 155.11278414 -34.08116619, 151.86720784 -35.62414508))'); +SELECT 'invalid wkt compound curve 1', ST_GeomFromEWKT('COMPOUNDCURVE((153.72942375 -27.21757040, 152.29285719 -29.23940482, 154.74034096 -30.51635287),(152.39926953 -32.16574411, 155.11278414 -34.08116619, 151.86720784 -35.62414508))'); +SELECT 'invalid wkt compound curve 2', ST_GeomFromEWKT('COMPOUNDCURVE((153.72942375 -27.21757040, 152.29285719 -29.23940482),CIRCULARSTRING(154.74034096 -30.51635287, 154.74034096 -30.51635287, 152.39926953 -32.16574411, 155.11278414 -34.08116619, 151.86720784 -35.62414508))'); +SELECT 'invalid wkt compound curve 3', ST_GeomFromEWKT('COMPOUNDCURVE(CIRCULARSTRING(157.87950492 -27.59001358, 156.01728901 -28.28169378, 155.59163966 -26.52589021, 153.72942375 -27.21757040),(153.72942375 -27.21757040, 152.29285719 -29.23940482),CIRCULARSTRING(154.74034096 -30.51635287, 154.74034096 -30.51635287, 152.39926953 -32.16574411, 155.11278414 -34.08116619, 151.86720784 -35.62414508))'); +SELECT 'valid wkb compound curve 1', ST_asEWKT(ST_GeomFromEWKB(decode('0109000000020000000102000000030000009FE5797057376340E09398B1B2373BC05AAE0A165F0963409F6760A2493D3DC0DB6286DFB057634082D8A1B32F843EC0010200000004000000DB6286DFB057634082D8A1B32F843EC075B4E4D0C60C634031FA5D1A371540C0D7197CED9B636340A3CB59A7630A41C050F4A72AC0FB6240974769FCE3CF41C0', 'hex'))); +SELECT 'valid wkb compound curve 2', ST_asEWKT(ST_GeomFromEWKB(decode('0109000000010000000102000000060000009FE5797057376340E09398B1B2373BC05AAE0A165F0963409F6760A2493D3DC0DB6286DFB057634082D8A1B32F843EC075B4E4D0C60C634031FA5D1A371540C0D7197CED9B636340A3CB59A7630A41C050F4A72AC0FB6240974769FCE3CF41C0', 'hex'))); +SELECT 'valid wkb compound curve 3', ST_asEWKT(ST_GeomFromEWKB(decode('0109000000010000000102000000030000000CE586D73CF36240BBC46888F0523BC0102E91C951E76240DF90A1BEC0F841C0F970C100FFD7624074ADE6CE86CD3BC0', 'hex'))); +SELECT 'valid wkb compound curve 4', ST_asEWKT(ST_GeomFromEWKB(decode('0109000000020000000102000000030000009FE5797057376340E09398B1B2373BC05AAE0A165F0963409F6760A2493D3DC0DB6286DFB057634082D8A1B32F843EC0010800000005000000DB6286DFB057634082D8A1B32F843EC0DB6286DFB057634082D8A1B32F843EC075B4E4D0C60C634031FA5D1A371540C0D7197CED9B636340A3CB59A7630A41C050F4A72AC0FB6240974769FCE3CF41C0', 'hex'))); +SELECT 'valid wkb compound curve 5', ST_asEWKT(ST_GeomFromEWKB(decode('010900000003000000010800000003000000468280E724BC6340BF4B46210B973BC0F890AEA18D8063402D9664151D483CC0EED64BB6EE726340903CA5BDA0863AC0010200000004000000EED64BB6EE726340903CA5BDA0863AC09FE5797057376340E09398B1B2373BC05AAE0A165F0963409F6760A2493D3DC0DB6286DFB057634082D8A1B32F843EC0010800000005000000DB6286DFB057634082D8A1B32F843EC0DB6286DFB057634082D8A1B32F843EC075B4E4D0C60C634031FA5D1A371540C0D7197CED9B636340A3CB59A7630A41C050F4A72AC0FB6240974769FCE3CF41C0', 'hex'))); +SELECT 'null response', ST_NumPoints(ST_GeomFromEWKT('COMPOUNDCURVE(CIRCULARSTRING(0 0,2 0, 2 1, 2 3, 4 3),(4 3, 4 5, 1 4, 0 0))')); +SELECT 'minpoints issues - pass', ST_GeomFromText('COMPOUNDCURVE((0 0,1 1))'); +SELECT 'minpoints issues - pass', ST_GeomFromText('COMPOUNDCURVE(CIRCULARSTRING(0 0,0 1,1 1))'); +SELECT 'minpoints issues - fail', ST_GeomFromText('COMPOUNDCURVE(CIRCULARSTRING(0 0,1 1))'); +SELECT 'minpoints issues - fail', ST_GeomFromText('COMPOUNDCURVE(CIRCULARSTRING(0 0))'); +SELECT 'minpoints issues - fail', ST_GeomFromText('COMPOUNDCURVE((0 0),(0 0,1 1))'); diff -Nru postgis-1.5.3/regress/sql-mm-compoundcurve_expected postgis-2.0.1/regress/sql-mm-compoundcurve_expected --- postgis-1.5.3/regress/sql-mm-compoundcurve_expected 2010-12-14 13:14:14.000000000 +0000 +++ postgis-2.0.1/regress/sql-mm-compoundcurve_expected 2012-02-27 22:08:12.000000000 +0000 @@ -14,16 +14,12 @@ geometrytype03|COMPOUNDCURVEM ndims04|2 geometrytype04|COMPOUNDCURVE -public.compoundcurve.the_geom_2d SRID:-1 TYPE:COMPOUNDCURVE DIMS:2 -public.compoundcurve.the_geom_3dm SRID:-1 TYPE:COMPOUNDCURVEM DIMS:3 -public.compoundcurve.the_geom_3dz SRID:-1 TYPE:COMPOUNDCURVE DIMS:3 -public.compoundcurve.the_geom_4d SRID:-1 TYPE:COMPOUNDCURVE DIMS:4 astext01|COMPOUNDCURVE(CIRCULARSTRING(0 0,0.267949192431123 1,0.585786437626905 1.4142135623731),(0.585786437626905 1.4142135623731,2 0,0 0)) -astext02|COMPOUNDCURVE(CIRCULARSTRING(0 0,0.267949192431123 1,0.585786437626905 1.4142135623731),(0.585786437626905 1.4142135623731,2 0,0 0)) -astext03|COMPOUNDCURVE(CIRCULARSTRING(0 0,0.267949192431123 1,0.585786437626905 1.4142135623731),(0.585786437626905 1.4142135623731,2 0,0 0)) -astext04|COMPOUNDCURVE(CIRCULARSTRING(0 0,0.267949192431123 1,0.585786437626905 1.4142135623731),(0.585786437626905 1.4142135623731,2 0,0 0)) +astext02|COMPOUNDCURVE M (CIRCULARSTRING M (0 0 0,0.267949192431123 1 -2,0.585786437626905 1.4142135623731 2),(0.585786437626905 1.4142135623731 2,2 0 0,0 0 0)) +astext03|COMPOUNDCURVE Z (CIRCULARSTRING Z (0 0 0,0.267949192431123 1 3,0.585786437626905 1.4142135623731 1),(0.585786437626905 1.4142135623731 1,2 0 0,0 0 0)) +astext04|COMPOUNDCURVE ZM (CIRCULARSTRING ZM (0 0 0 0,0.267949192431123 1 3 -2,0.585786437626905 1.4142135623731 1 2),(0.585786437626905 1.4142135623731 1 2,2 0 0 0,0 0 0 0)) asewkt01|COMPOUNDCURVE(CIRCULARSTRING(0 0,0.267949192431123 1,0.585786437626905 1.4142135623731),(0.585786437626905 1.4142135623731,2 0,0 0)) -asewkt02|COMPOUNDCURVEM(CIRCULARSTRING(0 0 0,0.267949192431123 1 -2,0.585786437626905 1.4142135623731 2),(0.585786437626905 1.4142135623731 2,2 0 0,0 0 0)) +asewkt02|COMPOUNDCURVEM(CIRCULARSTRINGM(0 0 0,0.267949192431123 1 -2,0.585786437626905 1.4142135623731 2),(0.585786437626905 1.4142135623731 2,2 0 0,0 0 0)) asewkt03|COMPOUNDCURVE(CIRCULARSTRING(0 0 0,0.267949192431123 1 3,0.585786437626905 1.4142135623731 1),(0.585786437626905 1.4142135623731 1,2 0 0,0 0 0)) asewkt04|COMPOUNDCURVE(CIRCULARSTRING(0 0 0 0,0.267949192431123 1 3 -2,0.585786437626905 1.4142135623731 1 2),(0.585786437626905 1.4142135623731 1 2,2 0 0 0,0 0 0 0)) ST_CurveToLine-201|LINESTRING(0 0,0.58578644 1.41421356,2 0,0 0) @@ -38,32 +34,12 @@ ST_CurveToLine02|LINESTRINGM(0 0 0,0.00240909 0.09813535 -0.1875,0.00963055 0.19603428 -0.375,0.02164698 0.29346095 -0.5625,0.03842944 0.39018064 -0.75,0.05993749 0.48596036 -0.9375,0.08611933 0.58056935 -1.125,0.11691187 0.67377971 -1.3125,0.15224093 0.76536686 -1.5,0.19202141 0.85511019 -1.6875,0.23615747 0.94279347 -1.875,0.28454278 1.02820549 -1.75,0.33706078 1.11114047 -1,0.39358494 1.19139861 -0.25,0.45397909 1.26878657 0.5,0.51809775 1.34311791 1.25,0.58578644 1.41421356 2,2 0 0,0 0 0) ST_CurveToLine03|LINESTRING(0 0 0,0.00240909 0.09813535 0.28125,0.00963055 0.19603428 0.5625,0.02164698 0.29346095 0.84375,0.03842944 0.39018064 1.125,0.05993749 0.48596036 1.40625,0.08611933 0.58056935 1.6875,0.11691187 0.67377971 1.96875,0.15224093 0.76536686 2.25,0.19202141 0.85511019 2.53125,0.23615747 0.94279347 2.8125,0.28454278 1.02820549 2.875,0.33706078 1.11114047 2.5,0.39358494 1.19139861 2.125,0.45397909 1.26878657 1.75,0.51809775 1.34311791 1.375,0.58578644 1.41421356 1,2 0 0,0 0 0) ST_CurveToLine04|LINESTRING(0 0 0 0,0.00240909 0.09813535 0.28125 -0.1875,0.00963055 0.19603428 0.5625 -0.375,0.02164698 0.29346095 0.84375 -0.5625,0.03842944 0.39018064 1.125 -0.75,0.05993749 0.48596036 1.40625 -0.9375,0.08611933 0.58056935 1.6875 -1.125,0.11691187 0.67377971 1.96875 -1.3125,0.15224093 0.76536686 2.25 -1.5,0.19202141 0.85511019 2.53125 -1.6875,0.23615747 0.94279347 2.8125 -1.875,0.28454278 1.02820549 2.875 -1.75,0.33706078 1.11114047 2.5 -1,0.39358494 1.19139861 2.125 -0.25,0.45397909 1.26878657 1.75 0.5,0.51809775 1.34311791 1.375 1.25,0.58578644 1.41421356 1 2,2 0 0 0,0 0 0 0) -ERROR: Exception in LWGEOM2GEOS: curved geometry not supported. -ERROR: Exception in LWGEOM2GEOS: curved geometry not supported. -ERROR: Exception in LWGEOM2GEOS: curved geometry not supported. -ERROR: Exception in LWGEOM2GEOS: curved geometry not supported. -dimension01|1 -dimension02|1 -dimension03|1 -dimension04|1 -SRID01|-1 -SRID02|-1 -SRID03|-1 -SRID04|-1 -ERROR: Exception in LWGEOM2GEOS: curved geometry not supported. -ERROR: Exception in LWGEOM2GEOS: curved geometry not supported. -ERROR: Exception in LWGEOM2GEOS: curved geometry not supported. -ERROR: Exception in LWGEOM2GEOS: curved geometry not supported. -envelope01|POLYGON((0 0,0 1.41421356,2 1.41421356,2 0,0 0)) -envelope02|POLYGON((0 0,0 1.41421356,2 1.41421356,2 0,0 0)) -envelope03|POLYGON((0 0,0 1.41421356,2 1.41421356,2 0,0 0)) -envelope04|POLYGON((0 0,0 1.41421356,2 1.41421356,2 0,0 0)) astext01|COMPOUNDCURVE(CIRCULARSTRING(0 0,0.267949192431123 1,0.585786437626905 1.4142135623731),(0.585786437626905 1.4142135623731,2 0,0 0)) -astext02|COMPOUNDCURVE(CIRCULARSTRING(0 0,0.267949192431123 1,0.585786437626905 1.4142135623731),(0.585786437626905 1.4142135623731,2 0,0 0)) -astext03|COMPOUNDCURVE(CIRCULARSTRING(0 0,0.267949192431123 1,0.585786437626905 1.4142135623731),(0.585786437626905 1.4142135623731,2 0,0 0)) -astext04|COMPOUNDCURVE(CIRCULARSTRING(0 0,0.267949192431123 1,0.585786437626905 1.4142135623731),(0.585786437626905 1.4142135623731,2 0,0 0)) +astext02|COMPOUNDCURVE M (CIRCULARSTRING M (0 0 0,0.267949192431123 1 -2,0.585786437626905 1.4142135623731 2),(0.585786437626905 1.4142135623731 2,2 0 0,0 0 0)) +astext03|COMPOUNDCURVE Z (CIRCULARSTRING Z (0 0 0,0.267949192431123 1 3,0.585786437626905 1.4142135623731 1),(0.585786437626905 1.4142135623731 1,2 0 0,0 0 0)) +astext04|COMPOUNDCURVE ZM (CIRCULARSTRING ZM (0 0 0 0,0.267949192431123 1 3 -2,0.585786437626905 1.4142135623731 1 2),(0.585786437626905 1.4142135623731 1 2,2 0 0 0,0 0 0 0)) asewkt01|COMPOUNDCURVE(CIRCULARSTRING(0 0,0.267949192431123 1,0.585786437626905 1.4142135623731),(0.585786437626905 1.4142135623731,2 0,0 0)) -asewkt02|COMPOUNDCURVEM(CIRCULARSTRING(0 0 0,0.267949192431123 1 -2,0.585786437626905 1.4142135623731 2),(0.585786437626905 1.4142135623731 2,2 0 0,0 0 0)) +asewkt02|COMPOUNDCURVEM(CIRCULARSTRINGM(0 0 0,0.267949192431123 1 -2,0.585786437626905 1.4142135623731 2),(0.585786437626905 1.4142135623731 2,2 0 0,0 0 0)) asewkt03|COMPOUNDCURVE(CIRCULARSTRING(0 0 0,0.267949192431123 1 3,0.585786437626905 1.4142135623731 1),(0.585786437626905 1.4142135623731 1,2 0 0,0 0 0)) asewkt04|COMPOUNDCURVE(CIRCULARSTRING(0 0 0 0,0.267949192431123 1 3 -2,0.585786437626905 1.4142135623731 1 2),(0.585786437626905 1.4142135623731 1 2,2 0 0 0,0 0 0 0)) ERROR: Exception in LWGEOM2GEOS: curved geometry not supported. @@ -74,10 +50,10 @@ dimension02|1 dimension03|1 dimension04|1 -SRID01|-1 -SRID02|-1 -SRID03|-1 -SRID04|-1 +SRID01|0 +SRID02|0 +SRID03|0 +SRID04|0 ERROR: Exception in LWGEOM2GEOS: curved geometry not supported. ERROR: Exception in LWGEOM2GEOS: curved geometry not supported. ERROR: Exception in LWGEOM2GEOS: curved geometry not supported. @@ -96,11 +72,8 @@ valid wkt compound curve 4|0109000000020000000102000000030000009FE5797057376340E09398B1B2373BC05AAE0A165F0963409F6760A2493D3DC0DB6286DFB057634082D8A1B32F843EC0010800000005000000DB6286DFB057634082D8A1B32F843EC0DB6286DFB057634082D8A1B32F843EC075B4E4D0C60C634031FA5D1A371540C0D7197CED9B636340A3CB59A7630A41C050F4A72AC0FB6240974769FCE3CF41C0 valid wkt compound curve 5|010900000003000000010800000003000000468280E724BC6340BF4B46210B973BC0F890AEA18D8063402D9664151D483CC0EED64BB6EE726340903CA5BDA0863AC0010200000004000000EED64BB6EE726340903CA5BDA0863AC09FE5797057376340E09398B1B2373BC05AAE0A165F0963409F6760A2493D3DC0DB6286DFB057634082D8A1B32F843EC0010800000005000000DB6286DFB057634082D8A1B32F843EC0DB6286DFB057634082D8A1B32F843EC075B4E4D0C60C634031FA5D1A371540C0D7197CED9B636340A3CB59A7630A41C050F4A72AC0FB6240974769FCE3CF41C0 ERROR: incontinuous compound curve -HINT: "....23940482, 154.74034096 -30.51635287)" <-- parse error at position 95 within geometry ERROR: incontinuous compound curve -HINT: "....21757040, 152.29285719 -29.23940482)" <-- parse error at position 68 within geometry ERROR: geometry must have an odd number of points -HINT: "....52589021, 153.72942375 -27.21757040)" <-- parse error at position 136 within geometry valid wkb compound curve 1|COMPOUNDCURVE((153.72942375 -27.2175704,152.29285719 -29.23940482,154.74034096 -30.51635287),(154.74034096 -30.51635287,152.39926953 -32.16574411,155.11278414 -34.08116619,151.86720784 -35.62414508)) valid wkb compound curve 2|COMPOUNDCURVE((153.72942375 -27.2175704,152.29285719 -29.23940482,154.74034096 -30.51635287,152.39926953 -32.16574411,155.11278414 -34.08116619,151.86720784 -35.62414508)) valid wkb compound curve 3|COMPOUNDCURVE((151.60117699 -27.32398274,151.22873381 -35.9433821,150.74987829 -27.80283826)) @@ -109,9 +82,6 @@ null response| minpoints issues - pass|01090000000100000001020000000200000000000000000000000000000000000000000000000000F03F000000000000F03F minpoints issues - pass|010900000001000000010800000003000000000000000000000000000000000000000000000000000000000000000000F03F000000000000F03F000000000000F03F -ERROR: geometry must have an odd number of points -HINT: "COMPOUNDCURVE(CIRCULARSTRING(0 0,1 1)" <-- parse error at position 37 within geometry ERROR: geometry requires more points -HINT: "COMPOUNDCURVE(CIRCULARSTRING(0 0)" <-- parse error at position 33 within geometry ERROR: geometry requires more points -HINT: "COMPOUNDCURVE((0 0)" <-- parse error at position 19 within geometry +ERROR: geometry requires more points diff -Nru postgis-1.5.3/regress/sql-mm-curvepoly.sql postgis-2.0.1/regress/sql-mm-curvepoly.sql --- postgis-1.5.3/regress/sql-mm-curvepoly.sql 2009-07-02 08:31:24.000000000 +0000 +++ postgis-2.0.1/regress/sql-mm-curvepoly.sql 2012-02-27 22:08:12.000000000 +0000 @@ -1,507 +1,342 @@ -SELECT 'ndims01', ndims(geomfromewkt('CURVEPOLYGON(CIRCULARSTRING( - -2 0 0 0, - -1 -1 1 2, - 0 0 2 4, - 1 -1 3 6, - 2 0 4 8, - 0 2 2 4, - -2 0 0 0), - (-1 0 1 2, - 0 0.5 2 4, - 1 0 3 6, - 0 1 3 4, - -1 0 1 2))')); -SELECT 'geometrytype01', geometrytype(geomfromewkt('CURVEPOLYGON(CIRCULARSTRING( - -2 0 0 0, - -1 -1 1 2, - 0 0 2 4, - 1 -1 3 6, - 2 0 4 8, - 0 2 2 4, - -2 0 0 0), - (-1 0 1 2, - 0 0.5 2 4, - 1 0 3 6, - 0 1 3 4, - -1 0 1 2))')); -SELECT 'ndims02', ndims(geomfromewkt('CURVEPOLYGON(CIRCULARSTRING( - -2 0 0, - -1 -1 1, - 0 0 2, - 1 -1 3, - 2 0 4, - 0 2 2, - -2 0 0), - (-1 0 1, - 0 0.5 2, - 1 0 3, - 0 1 3, - -1 0 1))')); -SELECT 'geometrytype02', geometrytype(geomfromewkt('CURVEPOLYGON(CIRCULARSTRING( - -2 0 0, - -1 -1 1, - 0 0 2, - 1 -1 3, - 2 0 4, - 0 2 2, - -2 0 0), - (-1 0 1, - 0 0.5 2, - 1 0 3, - 0 1 3, - -1 0 1))')); -SELECT 'ndims03', ndims(geomfromewkt('CURVEPOLYGONM(CIRCULARSTRING( - -2 0 0, - -1 -1 2, - 0 0 4, - 1 -1 6, - 2 0 8, - 0 2 4, - -2 0 0), - (-1 0 2, - 0 0.5 4, - 1 0 6, - 0 1 4, - -1 0 2))')); -SELECT 'geometrytype03', geometrytype(geomfromewkt('CURVEPOLYGONM(CIRCULARSTRING( - -2 0 0, - -1 -1 2, - 0 0 4, - 1 -1 6, - 2 0 8, - 0 2 4, - -2 0 0), - (-1 0 2, - 0 0.5 4, - 1 0 6, - 0 1 4, - -1 0 2))')); -SELECT 'ndims04', ndims(geomfromewkt('CURVEPOLYGON(CIRCULARSTRING( - -2 0, - -1 -1, - 0 0, - 1 -1, - 2 0, - 0 2, - -2 0), - (-1 0, - 0 0.5, - 1 0, - 0 1, - -1 0))')); -SELECT 'geometrytype04', geometrytype(geomfromewkt('CURVEPOLYGON(CIRCULARSTRING( - -2 0, - -1 -1, - 0 0, - 1 -1, - 2 0, - 0 2, - -2 0), - (-1 0, - 0 0.5, - 1 0, - 0 1, - -1 0))')); -SELECT 'ndims05', ndims(geomfromewkt('CURVEPOLYGON( - COMPOUNDCURVE( - (5 5 1 0,5 0 1 1,0 0 1 2,0 5 1 3), - CIRCULARSTRING(0 5 1 3,1.5 7.5 1 4,5 5 1 0)), - (1.5 5 2 0,2.5 6 3 1,3.5 5 2 2,1.5 5 2 0), - COMPOUNDCURVE( - CIRCULARSTRING(1.5 2 2 0,1 2.5 3 1,3.5 2 2 2), - (3.5 2 2 2,3.5 4 1 3,1.5 4 1 4,1.5 2 2 0)))')); - - --- Repeat tests with new function names. -SELECT 'ndims01', ST_ndims(ST_geomfromewkt('CURVEPOLYGON(CIRCULARSTRING( - -2 0 0 0, - -1 -1 1 2, - 0 0 2 4, - 1 -1 3 6, - 2 0 4 8, - 0 2 2 4, - -2 0 0 0), - (-1 0 1 2, - 0 0.5 2 4, - 1 0 3 6, - 0 1 3 4, - -1 0 1 2))')); -SELECT 'geometrytype01', geometrytype(ST_geomfromewkt('CURVEPOLYGON(CIRCULARSTRING( - -2 0 0 0, - -1 -1 1 2, - 0 0 2 4, - 1 -1 3 6, - 2 0 4 8, - 0 2 2 4, - -2 0 0 0), - (-1 0 1 2, - 0 0.5 2 4, - 1 0 3 6, - 0 1 3 4, - -1 0 1 2))')); -SELECT 'ndims02', ST_ndims(ST_geomfromewkt('CURVEPOLYGON(CIRCULARSTRING( - -2 0 0, - -1 -1 1, - 0 0 2, - 1 -1 3, - 2 0 4, - 0 2 2, - -2 0 0), - (-1 0 1, - 0 0.5 2, - 1 0 3, - 0 1 3, - -1 0 1))')); -SELECT 'geometrytype02', geometrytype(ST_geomfromewkt('CURVEPOLYGON(CIRCULARSTRING( - -2 0 0, - -1 -1 1, - 0 0 2, - 1 -1 3, - 2 0 4, - 0 2 2, - -2 0 0), - (-1 0 1, - 0 0.5 2, - 1 0 3, - 0 1 3, - -1 0 1))')); -SELECT 'ndims03', ST_ndims(ST_geomfromewkt('CURVEPOLYGONM(CIRCULARSTRING( - -2 0 0, - -1 -1 2, - 0 0 4, - 1 -1 6, - 2 0 8, - 0 2 4, - -2 0 0), - (-1 0 2, - 0 0.5 4, - 1 0 6, - 0 1 4, - -1 0 2))')); -SELECT 'geometrytype03', geometrytype(ST_geomfromewkt('CURVEPOLYGONM(CIRCULARSTRING( - -2 0 0, - -1 -1 2, - 0 0 4, - 1 -1 6, - 2 0 8, - 0 2 4, - -2 0 0), - (-1 0 2, - 0 0.5 4, - 1 0 6, - 0 1 4, - -1 0 2))')); -SELECT 'ndims04', ST_ndims(ST_geomfromewkt('CURVEPOLYGON(CIRCULARSTRING( - -2 0, - -1 -1, - 0 0, - 1 -1, - 2 0, - 0 2, - -2 0), - (-1 0, - 0 0.5, - 1 0, - 0 1, - -1 0))')); -SELECT 'geometrytype04', geometrytype(ST_geomfromewkt('CURVEPOLYGON(CIRCULARSTRING( - -2 0, - -1 -1, - 0 0, - 1 -1, - 2 0, - 0 2, - -2 0), - (-1 0, - 0 0.5, - 1 0, - 0 1, - -1 0))')); - -CREATE TABLE public.curvepolygon (id INTEGER, description VARCHAR); -SELECT AddGeometryColumn('public', 'curvepolygon', 'the_geom_2d', -1, 'CURVEPOLYGON', 2); -SELECT AddGeometryColumn('public', 'curvepolygon', 'the_geom_3dm', -1, 'CURVEPOLYGONM', 3); -SELECT AddGeometryColumn('public', 'curvepolygon', 'the_geom_3dz', -1, 'CURVEPOLYGON', 3); -SELECT AddGeometryColumn('public', 'curvepolygon', 'the_geom_4d', -1, 'CURVEPOLYGON', 4); - -INSERT INTO public.curvepolygon ( - id, - description - ) VALUES ( - 1, 'curvepolygon'); -UPDATE public.curvepolygon - SET the_geom_4d = geomfromewkt('CURVEPOLYGON(CIRCULARSTRING( - -2 0 0 0, - -1 -1 1 2, - 0 0 2 4, - 1 -1 3 6, - 2 0 4 8, - 0 2 2 4, - -2 0 0 0), - (-1 0 1 2, - 0 0.5 2 4, - 1 0 3 6, - 0 1 3 4, - -1 0 1 2))'); -UPDATE public.curvepolygon - SET the_geom_3dz = geomfromewkt('CURVEPOLYGON(CIRCULARSTRING( - -2 0 0, - -1 -1 1, - 0 0 2, - 1 -1 3, - 2 0 4, - 0 2 2, - -2 0 0), - (-1 0 1, - 0 0.5 2, - 1 0 3, - 0 1 3, - -1 0 1))'); -UPDATE public.curvepolygon - SET the_geom_3dm = geomfromewkt('CURVEPOLYGONM(CIRCULARSTRING( - -2 0 0, - -1 -1 2, - 0 0 4, - 1 -1 6, - 2 0 8, - 0 2 4, - -2 0 0), - (-1 0 2, - 0 0.5 4, - 1 0 6, - 0 1 4, - -1 0 2))'); -UPDATE public.curvepolygon - SET the_geom_2d = geomfromewkt('CURVEPOLYGON(CIRCULARSTRING( - -2 0, - -1 -1, - 0 0, - 1 -1, - 2 0, - 0 2, - -2 0), - (-1 0, - 0 0.5, - 1 0, - 0 1, - -1 0))'); - -SELECT 'astext01', astext(the_geom_2d) FROM public.curvepolygon; -SELECT 'astext02', astext(the_geom_3dm) FROM public.curvepolygon; -SELECT 'astext03', astext(the_geom_3dz) FROM public.curvepolygon; -SELECT 'astext04', astext(the_geom_4d) FROM public.curvepolygon; - -SELECT 'asewkt01', asewkt(the_geom_2d) FROM public.curvepolygon; -SELECT 'asewkt02', asewkt(the_geom_3dm) FROM public.curvepolygon; -SELECT 'asewkt03', asewkt(the_geom_3dz) FROM public.curvepolygon; -SELECT 'asewkt04', asewkt(the_geom_4d) FROM public.curvepolygon; - --- These tests will fail on different architectures --- We need a way to handle multiple byte orderings ---SELECT 'asbinary01', encode(asbinary(the_geom_2d), 'hex') FROM public.curvepolygon; ---SELECT 'asbinary02', encode(asbinary(the_geom_3dm), 'hex') FROM public.curvepolygon; ---SELECT 'asbinary03', encode(asbinary(the_geom_3dz), 'hex') FROM public.curvepolygon; ---SELECT 'asbinary04', encode(asbinary(the_geom_4d), 'hex') FROM public.curvepolygon; --- ---SELECT 'asewkb01', encode(asewkb(the_geom_2d), 'hex') FROM public.curvepolygon; ---SELECT 'asewkb02', encode(asewkb(the_geom_3dm), 'hex') FROM public.curvepolygon; ---SELECT 'asewkb03', encode(asewkb(the_geom_3dz), 'hex') FROM public.curvepolygon; ---SELECT 'asewkb04', encode(asewkb(the_geom_4d), 'hex') FROM public.curvepolygon; - -SELECT 'ST_CurveToLine-201', asewkt(snapToGrid(ST_CurveToLine(the_geom_2d, 2), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.curvepolygon; -SELECT 'ST_CurveToLine-202', asewkt(snapToGrid(ST_CurveToLine(the_geom_3dm, 2), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.curvepolygon; -SELECT 'ST_CurveToLine-203', asewkt(snapToGrid(ST_CurveToLine(the_geom_3dz, 2), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.curvepolygon; -SELECT 'ST_CurveToLine-204', asewkt(snapToGrid(ST_CurveToLine(the_geom_4d, 2), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.curvepolygon; - -SELECT 'ST_CurveToLine-401', asewkt(snapToGrid(ST_CurveToLine(the_geom_2d, 4), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.curvepolygon; -SELECT 'ST_CurveToLine-402', asewkt(snapToGrid(ST_CurveToLine(the_geom_3dm, 4), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.curvepolygon; -SELECT 'ST_CurveToLine-403', asewkt(snapToGrid(ST_CurveToLine(the_geom_3dz, 4), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.curvepolygon; -SELECT 'ST_CurveToLine-404', asewkt(snapToGrid(ST_CurveToLine(the_geom_4d, 4), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.curvepolygon; - -SELECT 'ST_CurveToLine01', asewkt(snapToGrid(ST_CurveToLine(the_geom_2d), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.curvepolygon; -SELECT 'ST_CurveToLine02', asewkt(snapToGrid(ST_CurveToLine(the_geom_3dm), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.curvepolygon; -SELECT 'ST_CurveToLine03', asewkt(snapToGrid(ST_CurveToLine(the_geom_3dz), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.curvepolygon; -SELECT 'ST_CurveToLine04', asewkt(snapToGrid(ST_CurveToLine(the_geom_4d), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.curvepolygon; - --- Removed due to descrepencies between hardware ---SELECT 'box2d01', box2d(the_geom_2d) FROM public.curvepolygon; ---SELECT 'box2d02', box2d(the_geom_3dm) FROM public.curvepolygon; ---SELECT 'box2d03', box2d(the_geom_3dz) FROM public.curvepolygon; ---SELECT 'box2d04', box2d(the_geom_4d) FROM public.curvepolygon; - ---SELECT 'box3d01', box3d(the_geom_2d) FROM public.curvepolygon; ---SELECT 'box3d02', box3d(the_geom_3dm) FROM public.curvepolygon; ---SELECT 'box3d03', box3d(the_geom_3dz) FROM public.curvepolygon; ---SELECT 'box3d04', box3d(the_geom_4d) FROM public.curvepolygon; - -SELECT 'isValid01', isValid(the_geom_2d) FROM public.curvepolygon; -SELECT 'isValid02', isValid(the_geom_3dm) FROM public.curvepolygon; -SELECT 'isValid03', isValid(the_geom_3dz) FROM public.curvepolygon; -SELECT 'isValid04', isValid(the_geom_4d) FROM public.curvepolygon; - -SELECT 'dimension01', dimension(the_geom_2d) FROM public.curvepolygon; -SELECT 'dimension02', dimension(the_geom_3dm) FROM public.curvepolygon; -SELECT 'dimension03', dimension(the_geom_3dz) FROM public.curvepolygon; -SELECT 'dimension04', dimension(the_geom_4d) FROM public.curvepolygon; - -SELECT 'SRID01', SRID(the_geom_2d) FROM public.curvepolygon; -SELECT 'SRID02', SRID(the_geom_3dm) FROM public.curvepolygon; -SELECT 'SRID03', SRID(the_geom_3dz) FROM public.curvepolygon; -SELECT 'SRID04', SRID(the_geom_4d) FROM public.curvepolygon; - -SELECT 'envelope01', asText(snapToGrid(envelope(the_geom_2d), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.curvepolygon; -SELECT 'envelope02', asText(snapToGrid(envelope(the_geom_3dm), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.curvepolygon; -SELECT 'envelope03', asText(snapToGrid(envelope(the_geom_3dz), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.curvepolygon; -SELECT 'envelope04', asText(snapToGrid(envelope(the_geom_4d), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.curvepolygon; - -SELECT 'startPoint01', (startPoint(the_geom_2d) is null) FROM public.curvepolygon; -SELECT 'startPoint02', (startPoint(the_geom_3dm) is null) FROM public.curvepolygon; -SELECT 'startPoint03', (startPoint(the_geom_3dz) is null) FROM public.curvepolygon; -SELECT 'startPoint04', (startPoint(the_geom_4d) is null) FROM public.curvepolygon; - -SELECT 'endPoint01', (endPoint(the_geom_2d) is null) FROM public.curvepolygon; -SELECT 'endPoint02', (endPoint(the_geom_3dm) is null) FROM public.curvepolygon; -SELECT 'endPoint03', (endPoint(the_geom_3dz) is null) FROM public.curvepolygon; -SELECT 'endPoint04', (endPoint(the_geom_4d) is null) FROM public.curvepolygon; - -SELECT 'exteriorRing01', asEWKT(exteriorRing(the_geom_2d)) FROM public.curvepolygon; -SELECT 'exteriorRing02', asEWKT(exteriorRing(the_geom_3dm)) FROM public.curvepolygon; -SELECT 'exteriorRing03', asEWKT(exteriorRing(the_geom_3dz)) FROM public.curvepolygon; -SELECT 'exteriorRing04', asEWKT(exteriorRing(the_geom_4d)) FROM public.curvepolygon; - -SELECT 'numInteriorRings01', numInteriorRings(the_geom_2d) FROM public.curvepolygon; -SELECT 'numInteriorRings02', numInteriorRings(the_geom_3dm) FROM public.curvepolygon; -SELECT 'numInteriorRings03', numInteriorRings(the_geom_3dz) FROM public.curvepolygon; -SELECT 'numInteriorRings04', numInteriorRings(the_geom_4d) FROM public.curvepolygon; - -SELECT 'interiorRingN-101', asEWKT(interiorRingN(the_geom_2d, 1)) FROM public.curvepolygon; -SELECT 'interiorRingN-102', asEWKT(interiorRingN(the_geom_3dm, 1)) FROM public.curvepolygon; -SELECT 'interiorRingN-103', asEWKT(interiorRingN(the_geom_3dz, 1)) FROM public.curvepolygon; -SELECT 'interiorRingN-104', asEWKT(interiorRingN(the_geom_4d, 1)) FROM public.curvepolygon; - -SELECT 'interiorRingN-201', asEWKT(interiorRingN(the_geom_2d, 2)) FROM public.curvepolygon; -SELECT 'interiorRingN-202', asEWKT(interiorRingN(the_geom_3dm, 2)) FROM public.curvepolygon; -SELECT 'interiorRingN-203', asEWKT(interiorRingN(the_geom_3dz, 2)) FROM public.curvepolygon; -SELECT 'interiorRingN-204', asEWKT(interiorRingN(the_geom_4d, 2)) FROM public.curvepolygon; - --- TODO: ST_SnapToGrid is required to remove platform dependent precision --- issues. Until ST_SnapToGrid is updated to work against curves, these --- tests cannot be run. ---SELECT 'ST_LineToCurve01', asewkt(ST_LineToCurve(ST_CurveToLine(the_geom_2d))) FROM public.curvepolygon; ---SELECT 'ST_LineToCurve02', asewkt(ST_LineToCurve(ST_CurveToLine(the_geom_3dm))) FROM public.curvepolygon; ---SELECT 'ST_LineToCurve03', asewkt(ST_LineToCurve(ST_CurveToLine(the_geom_3dz))) FROM public.curvepolygon; ---SELECT 'ST_LineToCurve04', asewkt(ST_LineToCurve(ST_CurveToLine(the_geom_4d))) FROM public.curvepolygon; - --- Repeat tests with new function names. -SELECT 'astext01', ST_astext(the_geom_2d) FROM public.curvepolygon; -SELECT 'astext02', ST_astext(the_geom_3dm) FROM public.curvepolygon; -SELECT 'astext03', ST_astext(the_geom_3dz) FROM public.curvepolygon; -SELECT 'astext04', ST_astext(the_geom_4d) FROM public.curvepolygon; - -SELECT 'asewkt01', ST_asewkt(the_geom_2d) FROM public.curvepolygon; -SELECT 'asewkt02', ST_asewkt(the_geom_3dm) FROM public.curvepolygon; -SELECT 'asewkt03', ST_asewkt(the_geom_3dz) FROM public.curvepolygon; -SELECT 'asewkt04', ST_asewkt(the_geom_4d) FROM public.curvepolygon; - --- These tests will fail on different architectures --- We need a way to handle multiple byte orderings ---SELECT 'asbinary01', encode(ST_asbinary(the_geom_2d), 'hex') FROM public.curvepolygon; ---SELECT 'asbinary02', encode(ST_asbinary(the_geom_3dm), 'hex') FROM public.curvepolygon; ---SELECT 'asbinary03', encode(ST_asbinary(the_geom_3dz), 'hex') FROM public.curvepolygon; ---SELECT 'asbinary04', encode(ST_asbinary(the_geom_4d), 'hex') FROM public.curvepolygon; --- ---SELECT 'asewkb01', encode(ST_asewkb(the_geom_2d), 'hex') FROM public.curvepolygon; ---SELECT 'asewkb02', encode(ST_asewkb(the_geom_3dm), 'hex') FROM public.curvepolygon; ---SELECT 'asewkb03', encode(ST_asewkb(the_geom_3dz), 'hex') FROM public.curvepolygon; ---SELECT 'asewkb04', encode(ST_asewkb(the_geom_4d), 'hex') FROM public.curvepolygon; - --- Removed due to descrepencies between hardware ---SELECT 'box2d01', ST_box2d(the_geom_2d) FROM public.curvepolygon; ---SELECT 'box2d02', ST_box2d(the_geom_3dm) FROM public.curvepolygon; ---SELECT 'box2d03', ST_box2d(the_geom_3dz) FROM public.curvepolygon; ---SELECT 'box2d04', ST_box2d(the_geom_4d) FROM public.curvepolygon; - ---SELECT 'box3d01', ST_box3d(the_geom_2d) FROM public.curvepolygon; ---SELECT 'box3d02', ST_box3d(the_geom_3dm) FROM public.curvepolygon; ---SELECT 'box3d03', ST_box3d(the_geom_3dz) FROM public.curvepolygon; ---SELECT 'box3d04', ST_box3d(the_geom_4d) FROM public.curvepolygon; - -SELECT 'isValid01', ST_isValid(the_geom_2d) FROM public.curvepolygon; -SELECT 'isValid02', ST_isValid(the_geom_3dm) FROM public.curvepolygon; -SELECT 'isValid03', ST_isValid(the_geom_3dz) FROM public.curvepolygon; -SELECT 'isValid04', ST_isValid(the_geom_4d) FROM public.curvepolygon; - -SELECT 'dimension01', ST_dimension(the_geom_2d) FROM public.curvepolygon; -SELECT 'dimension02', ST_dimension(the_geom_3dm) FROM public.curvepolygon; -SELECT 'dimension03', ST_dimension(the_geom_3dz) FROM public.curvepolygon; -SELECT 'dimension04', ST_dimension(the_geom_4d) FROM public.curvepolygon; - -SELECT 'SRID01', ST_SRID(the_geom_2d) FROM public.curvepolygon; -SELECT 'SRID02', ST_SRID(the_geom_3dm) FROM public.curvepolygon; -SELECT 'SRID03', ST_SRID(the_geom_3dz) FROM public.curvepolygon; -SELECT 'SRID04', ST_SRID(the_geom_4d) FROM public.curvepolygon; - -SELECT 'envelope01', ST_asText(ST_snapToGrid(ST_envelope(the_geom_2d), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.curvepolygon; -SELECT 'envelope02', ST_asText(ST_snapToGrid(ST_envelope(the_geom_3dm), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.curvepolygon; -SELECT 'envelope03', ST_asText(ST_snapToGrid(ST_envelope(the_geom_3dz), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.curvepolygon; -SELECT 'envelope04', ST_asText(ST_snapToGrid(ST_envelope(the_geom_4d), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.curvepolygon; - -SELECT 'startPoint01', (ST_startPoint(the_geom_2d) is null) FROM public.curvepolygon; -SELECT 'startPoint02', (ST_startPoint(the_geom_3dm) is null) FROM public.curvepolygon; -SELECT 'startPoint03', (ST_startPoint(the_geom_3dz) is null) FROM public.curvepolygon; -SELECT 'startPoint04', (ST_startPoint(the_geom_4d) is null) FROM public.curvepolygon; - -SELECT 'endPoint01', (ST_endPoint(the_geom_2d) is null) FROM public.curvepolygon; -SELECT 'endPoint02', (ST_endPoint(the_geom_3dm) is null) FROM public.curvepolygon; -SELECT 'endPoint03', (ST_endPoint(the_geom_3dz) is null) FROM public.curvepolygon; -SELECT 'endPoint04', (ST_endPoint(the_geom_4d) is null) FROM public.curvepolygon; - -SELECT 'exteriorRing01', ST_asEWKT(ST_exteriorRing(the_geom_2d)) FROM public.curvepolygon; -SELECT 'exteriorRing02', ST_asEWKT(ST_exteriorRing(the_geom_3dm)) FROM public.curvepolygon; -SELECT 'exteriorRing03', ST_asEWKT(ST_exteriorRing(the_geom_3dz)) FROM public.curvepolygon; -SELECT 'exteriorRing04', ST_asEWKT(ST_exteriorRing(the_geom_4d)) FROM public.curvepolygon; - -SELECT 'numInteriorRings01', ST_numInteriorRings(the_geom_2d) FROM public.curvepolygon; -SELECT 'numInteriorRings02', ST_numInteriorRings(the_geom_3dm) FROM public.curvepolygon; -SELECT 'numInteriorRings03', ST_numInteriorRings(the_geom_3dz) FROM public.curvepolygon; -SELECT 'numInteriorRings04', ST_numInteriorRings(the_geom_4d) FROM public.curvepolygon; - -SELECT 'interiorRingN-101', ST_asEWKT(ST_interiorRingN(the_geom_2d, 1)) FROM public.curvepolygon; -SELECT 'interiorRingN-102', ST_asEWKT(ST_interiorRingN(the_geom_3dm, 1)) FROM public.curvepolygon; -SELECT 'interiorRingN-103', ST_asEWKT(ST_interiorRingN(the_geom_3dz, 1)) FROM public.curvepolygon; -SELECT 'interiorRingN-104', ST_asEWKT(ST_interiorRingN(the_geom_4d, 1)) FROM public.curvepolygon; - -SELECT 'interiorRingN-201', ST_asEWKT(ST_interiorRingN(the_geom_2d, 2)) FROM public.curvepolygon; -SELECT 'interiorRingN-202', ST_asEWKT(ST_interiorRingN(the_geom_3dm, 2)) FROM public.curvepolygon; -SELECT 'interiorRingN-203', ST_asEWKT(ST_interiorRingN(the_geom_3dz, 2)) FROM public.curvepolygon; -SELECT 'interiorRingN-204', ST_asEWKT(ST_interiorRingN(the_geom_4d, 2)) FROM public.curvepolygon; - -SELECT DropGeometryColumn('public', 'curvepolygon', 'the_geom_2d'); -SELECT DropGeometryColumn('public', 'curvepolygon', 'the_geom_3dm'); -SELECT DropGeometryColumn('public', 'curvepolygon', 'the_geom_3dz'); -SELECT DropGeometryColumn('public', 'curvepolygon', 'the_geom_4d'); -DROP TABLE public.curvepolygon; - -SELECT 'valid wkt curve polygon 1', ST_GeomFromEWKT('CURVEPOLYGON((143.62025166838282 -30.037497356076827, 142.92857147299705 -32.75101196874403, 145.96132309891922 -34.985671061528784, 149.57565307617188 -33.41153335571289, 149.41972407584802 -29.824672680573517, 146.1209416055467 -30.19711586270431, 143.62025166838282 -30.037497356076827))'); -SELECT 'valid wkt curve polygon 2', ST_GeomFromEWKT('CURVEPOLYGON((143.62025166838282 -30.037497356076827, 142.92857147299705 -32.75101196874403, 145.96132309891922 -34.985671061528784, 149.57565307617188 -33.41153335571289, 149.41972407584802 -29.824672680573517, 146.1209416055467 -30.19711586270431, 143.62025166838282 -30.037497356076827),(144.84399355252685 -31.26123924022086, 144.20551952601693 -32.27215644886158, 145.55230712890625 -33.49203872680664, 147.97080993652344 -32.03618621826172, 146.38697244992585 -31.47406391572417, 144.84399355252685 -31.26123924022086))'); -SELECT 'valid wkt curve polygon 3', ST_GeomFromEWKT('CURVEPOLYGON(CIRCULARSTRING(143.62025166838282 -30.037497356076827, 142.92857147299705 -32.75101196874403, 145.96132309891922 -34.985671061528784, 149.57565307617188 -33.41153335571289, 149.41972407584802 -29.824672680573517, 146.1209416055467 -30.19711586270431, 143.62025166838282 -30.037497356076827))'); -SELECT 'valid wkt curve polygon 4', - ST_GeomFromEWKT('CURVEPOLYGON(CIRCULARSTRING(143.62025166838282 -30.037497356076827, 142.92857147299705 -32.75101196874403, 145.96132309891922 -34.985671061528784, 149.57565307617188 -33.41153335571289, 149.41972407584802 -29.824672680573517, 146.1209416055467 -30.19711586270431, 143.62025166838282 -30.037497356076827),(144.84399355252685 -31.26123924022086, 144.20551952601693 -32.27215644886158, 145.55230712890625 -33.49203872680664, 147.97080993652344 -32.03618621826172, 146.38697244992585 -31.47406391572417, 144.84399355252685 -31.26123924022086))'); -SELECT 'valid wkt curve polygon 5', ST_GeomFromEWKT('CURVEPOLYGON((143.62025166838282 -30.037497356076827, 142.92857147299705 -32.75101196874403, 145.96132309891922 -34.985671061528784, 149.57565307617188 -33.41153335571289, 149.41972407584802 -29.824672680573517, 146.1209416055467 -30.19711586270431, 143.62025166838282 -30.037497356076827),COMPOUNDCURVE(CIRCULARSTRING(144.84399355252685 -31.26123924022086, 144.20551952601693 -32.27215644886158, 145.55230712890625 -33.49203872680664), (145.55230712890625 -33.49203872680664, 147.97080993652344 -32.03618621826172),CIRCULARSTRING(147.97080993652344 -32.03618621826172, 146.38697244992585 -31.47406391572417, 144.84399355252685 -31.26123924022086)))'); -SELECT 'invalid wkt curve polygon 4', ST_GeomFromEWKT('CURVEPOLYGON((143.62025166838282 -30.037497356076827, 142.92857147299705 -32.75101196874403, 145.96132309891922 -34.985671061528784, 149.57565307617188 -33.41153335571289, 149.41972407584802 -29.824672680573517, 146.1209416055467 -30.19711586270431, 143.62025166838282 -30.037497356076))'); -SELECT 'invalid wkt curve polygon 5', ST_GeomFromEWKT('CURVEPOLYGON((143.62025166838282 -30.037497356076827, 142.92857147299705 -32.75101196874403, 145.96132309891922 -34.985671061528784, 149.57565307617188 -33.41153335571289, 149.41972407584802 -29.824672680573517, 146.1209416055467 -30.19711586270431, 143.62025166838282 -30.037497356076827),(144.84399355252685 -31.26123924022086, 144.20551952601693 -32.27215644886158, 145.55230712890625 -33.49203872680664, 147.97080993652344 -32.03618621826172, 146.38697244992585 -31.47406391572417))'); -SELECT 'invalid wkt curve polygon 6', ST_GeomFromEWKT('CURVEPOLYGON((143.62025166838282 -30.037497356076827, 142.92857147299705 -32.75101196874403, 145.96132309891922 -34.985671061528784, 149.57565307617188 -33.41153335571289, 149.41972407584802 -29.824672680573517, 146.1209416055467 -30.19711586270431),(144.84399355252685 -31.26123924022086, 144.20551952601693 -32.27215644886158, 145.55230712890625 -33.49203872680664, 147.97080993652344 -32.03618621826172, 146.38697244992585 -31.47406391572417, 144.84399355252685 -31.26123924022086))'); -SELECT 'invalid wkt curve polygon 7', ST_GeomFromEWKT('CURVEPOLYGON(CIRCULARSTRING(143.62025166838282 -30.037497356076827, 142.92857147299705 -32.75101196874403, 145.96132309891922 -34.985671061528784, 149.57565307617188 -33.41153335571289, 149.41972407584802 -29.824672680573517, 143.62025166838282 -30.037497356076827))'); -SELECT 'invalid wkt curve polygon 8', ST_GeomFromEWKT('CURVEPOLYGON(CIRCULARSTRING(143.62025166838282 -30.037497356076827, 142.92857147299705 -32.75101196874403, 145.96132309891922 -34.985671061528784, 149.57565307617188 -33.41153335571289, 149.41972407584802 -29.824672680573517, 146.1209416055467 -30.19711586270431),(144.84399355252685 -31.26123924022086, 144.20551952601693 -32.27215644886158, 145.55230712890625 -33.49203872680664, 147.97080993652344 -32.03618621826172, 146.38697244992585 -31.47406391572417, 144.84399355252685 -31.26123924022086))'); -SELECT 'invalid wkt curve polygon 9', ST_GeomFromEWKT('CURVEPOLYGON((143.62025166838282 -30.037497356076827, 142.92857147299705 -32.75101196874403, 145.96132309891922 -34.985671061528784, 149.57565307617188 -33.41153335571289, 149.41972407584802 -29.824672680573517, 146.1209416055467 -30.19711586270431, 143.62025166838282 -30.037497356076827),COMPOUNDCURVE(CIRCULARSTRING(144.84399355252685 -31.26123924022086, 144.20551952601693 -32.27215644886158, 145.55230712890625 -33.49203872680664),CIRCULARSTRING(147.97080993652344 -32.03618621826172, 146.38697244992585 -31.47406391572417, 144.84399355252685 -31.26123924022086))'); -SELECT 'invalid wkt curve polygon a', ST_GeomFromEWKT('CURVEPOLYGON((143.62025166838282 -30.037497356076827, 142.92857147299705 -32.75101196874403, 145.96132309891922 -34.985671061528784, 149.57565307617188 -33.41153335571289, 149.41972407584802 -29.824672680573517, 146.1209416055467 -30.19711586270431, 143.62025166838282 -30.037497356076827),COMPOUNDCURVE(CIRCULARSTRING(144.84399355252685 -31.26123924022086, 144.20551952601693 -32.27215644886158, 145.55230712890625 -33.49203872680664),(145.55230712890625 -33.49203872680664, 147.97080993652344 -32.03618621826172),CIRCULARSTRING(147.97080993652344 -32.03618621826172, 146.38697244992585 -31.47406391572417, 144.84399355252685 -30.76123924022086))'); -SELECT 'invalid wkt curve polygon b', ST_GeomFromEWKT('CURVEPOLYGON((143.62025166838282 -30.037497356076827, 142.92857147299705 -32.75101196874403, 145.96132309891922 -34.985671061528784, 149.57565307617188 -33.41153335571289, 149.41972407584802 -29.824672680573517, 146.1209416055467 -30.19711586270431, 143.62025166838282 -30.037497356076827),COMPOUNDCURVE(CIRCULARSTRING(144.84399355252685 -31.26123924022086, 144.20551952601693 -32.27215644886158, 145.55230712890625 -33.49203872680664),(145.55230712890625 -33.49203872680664),CIRCULARSTRING(147.97080993652344 -32.03618621826172, 146.38697244992585 -31.47406391572417, 144.84399355252685 -31.26123924022086))'); -SELECT 'valid ewkb curve polygon 1', ST_asEWKT(ST_GeomFromEWKB(decode('010d00000001000000010200000007000000ccdf061ad9f3614054093e6d99093ec0ab9085dbb6dd614081540229216040c0ebd7a828c33e62409bf026782a7e41c0000000c06bb2624000000020adb440c08e632f616ead6240c9f7b0bf1dd33dc09011eec0de4362407dd6672f76323ec0ccdf061ad9f3614054093e6d99093ec0', 'hex'))); -SELECT 'valid ewkb curve polygon 2', ST_asEWKT(ST_GeomFromEWKB(decode('010d00000002000000010200000007000000ccdf061ad9f3614054093e6d99093ec0ab9085dbb6dd614081540229216040c0ebd7a828c33e62409bf026782a7e41c0000000c06bb2624000000020adb440c08e632f616ead6240c9f7b0bf1dd33dc09011eec0de4362407dd6672f76323ec0ccdf061ad9f3614054093e6d99093ec00102000000060000006844c4fe011b6240342e2993e0423fc0d45daf9d93066240c4a0c305d62240c000000080ac31624000000020fbbe40c0000000e0107f6240000000c0a10440c04e1c0c14624c6240bf3fb6405c793fc06844c4fe011b6240342e2993e0423fc0', 'hex'))); -SELECT 'valid ewkb curve polygon 3', ST_asEWKT(ST_GeomFromEWKB(decode('010d00000001000000010800000007000000ccdf061ad9f3614054093e6d99093ec0ab9085dbb6dd614081540229216040c0ebd7a828c33e62409bf026782a7e41c0000000c06bb2624000000020adb440c08e632f616ead6240c9f7b0bf1dd33dc09011eec0de4362407dd6672f76323ec0ccdf061ad9f3614054093e6d99093ec0', 'hex'))); -SELECT 'valid ewkb curve polygon 4', ST_asEWKT(ST_GeomFromEWKB(decode('010d00000002000000010800000007000000ccdf061ad9f3614054093e6d99093ec0ab9085dbb6dd614081540229216040c0ebd7a828c33e62409bf026782a7e41c0000000c06bb2624000000020adb440c08e632f616ead6240c9f7b0bf1dd33dc09011eec0de4362407dd6672f76323ec0ccdf061ad9f3614054093e6d99093ec00102000000060000006844c4fe011b6240342e2993e0423fc0d45daf9d93066240c4a0c305d62240c000000080ac31624000000020fbbe40c0000000e0107f6240000000c0a10440c04e1c0c14624c6240bf3fb6405c793fc06844c4fe011b6240342e2993e0423fc0', 'hex'))); -SELECT 'valid ewkb curve polygon 5', ST_asEWKT(ST_GeomFromEWKB(decode('010d00000002000000010200000007000000ccdf061ad9f3614054093e6d99093ec0ab9085dbb6dd614081540229216040c0ebd7a828c33e62409bf026782a7e41c0000000c06bb2624000000020adb440c08e632f616ead6240c9f7b0bf1dd33dc09011eec0de4362407dd6672f76323ec0ccdf061ad9f3614054093e6d99093ec00109000000030000000108000000030000006844c4fe011b6240342e2993e0423fc0d45daf9d93066240c4a0c305d62240c000000080ac31624000000020fbbe40c001020000000200000000000080ac31624000000020fbbe40c0000000e0107f6240000000c0a10440c0010800000003000000000000e0107f6240000000c0a10440c04e1c0c14624c6240bf3fb6405c793fc06844c4fe011b6240342e2993e0423fc0', 'hex'))); -SELECT ST_GeomFromEWKT('CURVEPOLYGON(COMPOUNDCURVE(CIRCULARSTRING(0 0,2 0, 2 1, 2 3, 4 3),(4 3, 4 5, 1 4, 0 0)), CIRCULARSTRING(1.7 1, 1.4 0.4, 1.7 1) )'); -SELECT ST_GeomFromEWKT('CURVEPOLYGON(COMPOUNDCURVE(CIRCULARSTRING(0 0,2 0, 2 1, 2 3, 4 3),(4 3, 4 5, 1 4, 0 0)), (1.7 1, 1.4 0.4, 1.7 1) )'); -SELECT ST_GeomFromEWKT('CURVEPOLYGON(COMPOUNDCURVE(CIRCULARSTRING(0 0,2 0, 2 1, 2 3, 4 3),(4 3, 0 0)), CIRCULARSTRING(1.7 1, 1.4 0.4, 1.7 1) )'); -SELECT 'null response', ST_NumPoints(ST_GeomFromEWKT('CURVEPOLYGON(COMPOUNDCURVE(CIRCULARSTRING(0 0,2 0, 2 1, 2 3, 4 3),(4 3, 4 5, 1 4, 0 0)), CIRCULARSTRING(1.7 1, 1.4 0.4, 1.7 1) )')); +-- Repeat tests with new function names. +SELECT 'ndims01', ST_ndims(ST_geomfromewkt('CURVEPOLYGON(CIRCULARSTRING( + -2 0 0 0, + -1 -1 1 2, + 0 0 2 4, + 1 -1 3 6, + 2 0 4 8, + 0 2 2 4, + -2 0 0 0), + (-1 0 1 2, + 0 0.5 2 4, + 1 0 3 6, + 0 1 3 4, + -1 0 1 2))')); +SELECT 'geometrytype01', geometrytype(ST_geomfromewkt('CURVEPOLYGON(CIRCULARSTRING( + -2 0 0 0, + -1 -1 1 2, + 0 0 2 4, + 1 -1 3 6, + 2 0 4 8, + 0 2 2 4, + -2 0 0 0), + (-1 0 1 2, + 0 0.5 2 4, + 1 0 3 6, + 0 1 3 4, + -1 0 1 2))')); +SELECT 'ndims02', ST_ndims(ST_geomfromewkt('CURVEPOLYGON(CIRCULARSTRING( + -2 0 0, + -1 -1 1, + 0 0 2, + 1 -1 3, + 2 0 4, + 0 2 2, + -2 0 0), + (-1 0 1, + 0 0.5 2, + 1 0 3, + 0 1 3, + -1 0 1))')); +SELECT 'geometrytype02', geometrytype(ST_geomfromewkt('CURVEPOLYGON(CIRCULARSTRING( + -2 0 0, + -1 -1 1, + 0 0 2, + 1 -1 3, + 2 0 4, + 0 2 2, + -2 0 0), + (-1 0 1, + 0 0.5 2, + 1 0 3, + 0 1 3, + -1 0 1))')); +SELECT 'ndims03', ST_ndims(ST_geomfromewkt('CURVEPOLYGONM(CIRCULARSTRING( + -2 0 0, + -1 -1 2, + 0 0 4, + 1 -1 6, + 2 0 8, + 0 2 4, + -2 0 0), + (-1 0 2, + 0 0.5 4, + 1 0 6, + 0 1 4, + -1 0 2))')); +SELECT 'geometrytype03', geometrytype(ST_geomfromewkt('CURVEPOLYGONM(CIRCULARSTRING( + -2 0 0, + -1 -1 2, + 0 0 4, + 1 -1 6, + 2 0 8, + 0 2 4, + -2 0 0), + (-1 0 2, + 0 0.5 4, + 1 0 6, + 0 1 4, + -1 0 2))')); +SELECT 'ndims04', ST_ndims(ST_geomfromewkt('CURVEPOLYGON(CIRCULARSTRING( + -2 0, + -1 -1, + 0 0, + 1 -1, + 2 0, + 0 2, + -2 0), + (-1 0, + 0 0.5, + 1 0, + 0 1, + -1 0))')); +SELECT 'geometrytype04', geometrytype(ST_geomfromewkt('CURVEPOLYGON(CIRCULARSTRING( + -2 0, + -1 -1, + 0 0, + 1 -1, + 2 0, + 0 2, + -2 0), + (-1 0, + 0 0.5, + 1 0, + 0 1, + -1 0))')); + +SELECT 'ndims05', ST_Ndims(ST_geomfromewkt('CURVEPOLYGON( + COMPOUNDCURVE( + (5 5 1 0,5 0 1 1,0 0 1 2,0 5 1 3), + CIRCULARSTRING(0 5 1 3,1.5 7.5 1 4,5 5 1 0)), + (1.5 5 2 0,2.5 6 3 1,3.5 5 2 2,1.5 5 2 0), + COMPOUNDCURVE( + CIRCULARSTRING(1.5 2 2 0,1 2.5 3 1,3.5 2 2 2), + (3.5 2 2 2,3.5 4 1 3,1.5 4 1 4,1.5 2 2 0)))')); + +CREATE TABLE public.curvepolygon (id INTEGER, description VARCHAR, +the_geom_2d GEOMETRY(CURVEPOLYGON), +the_geom_3dm GEOMETRY(CURVEPOLYGONM), +the_geom_3dz GEOMETRY(CURVEPOLYGONZ), +the_geom_4d GEOMETRY(CURVEPOLYGONZM)); + +INSERT INTO public.curvepolygon ( + id, + description + ) VALUES ( + 1, 'curvepolygon'); +UPDATE public.curvepolygon + SET the_geom_4d = ST_Geomfromewkt('CURVEPOLYGON(CIRCULARSTRING( + -2 0 0 0, + -1 -1 1 2, + 0 0 2 4, + 1 -1 3 6, + 2 0 4 8, + 0 2 2 4, + -2 0 0 0), + (-1 0 1 2, + 0 0.5 2 4, + 1 0 3 6, + 0 1 3 4, + -1 0 1 2))'); +UPDATE public.curvepolygon + SET the_geom_3dz = ST_Geomfromewkt('CURVEPOLYGON(CIRCULARSTRING( + -2 0 0, + -1 -1 1, + 0 0 2, + 1 -1 3, + 2 0 4, + 0 2 2, + -2 0 0), + (-1 0 1, + 0 0.5 2, + 1 0 3, + 0 1 3, + -1 0 1))'); +UPDATE public.curvepolygon + SET the_geom_3dm = ST_Geomfromewkt('CURVEPOLYGONM(CIRCULARSTRING( + -2 0 0, + -1 -1 2, + 0 0 4, + 1 -1 6, + 2 0 8, + 0 2 4, + -2 0 0), + (-1 0 2, + 0 0.5 4, + 1 0 6, + 0 1 4, + -1 0 2))'); +UPDATE public.curvepolygon + SET the_geom_2d = ST_Geomfromewkt('CURVEPOLYGON(CIRCULARSTRING( + -2 0, + -1 -1, + 0 0, + 1 -1, + 2 0, + 0 2, + -2 0), + (-1 0, + 0 0.5, + 1 0, + 0 1, + -1 0))'); + +-- These tests will fail on different architectures +-- We need a way to handle multiple byte orderings +--SELECT 'asbinary01', encode(asbinary(the_geom_2d), 'hex') FROM public.curvepolygon; +--SELECT 'asbinary02', encode(asbinary(the_geom_3dm), 'hex') FROM public.curvepolygon; +--SELECT 'asbinary03', encode(asbinary(the_geom_3dz), 'hex') FROM public.curvepolygon; +--SELECT 'asbinary04', encode(asbinary(the_geom_4d), 'hex') FROM public.curvepolygon; +-- +--SELECT 'asewkb01', encode(asewkb(the_geom_2d), 'hex') FROM public.curvepolygon; +--SELECT 'asewkb02', encode(asewkb(the_geom_3dm), 'hex') FROM public.curvepolygon; +--SELECT 'asewkb03', encode(asewkb(the_geom_3dz), 'hex') FROM public.curvepolygon; +--SELECT 'asewkb04', encode(asewkb(the_geom_4d), 'hex') FROM public.curvepolygon; + +SELECT 'ST_CurveToLine-201',ST_asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_2d, 2), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.curvepolygon; +SELECT 'ST_CurveToLine-202',ST_asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_3dm, 2), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.curvepolygon; +SELECT 'ST_CurveToLine-203',ST_asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_3dz, 2), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.curvepolygon; +SELECT 'ST_CurveToLine-204',ST_asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_4d, 2), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.curvepolygon; + +SELECT 'ST_CurveToLine-401',ST_asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_2d, 4), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.curvepolygon; +SELECT 'ST_CurveToLine-402',ST_asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_3dm, 4), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.curvepolygon; +SELECT 'ST_CurveToLine-403',ST_asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_3dz, 4), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.curvepolygon; +SELECT 'ST_CurveToLine-404',ST_asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_4d, 4), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.curvepolygon; + +SELECT 'ST_CurveToLine01',ST_asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_2d), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.curvepolygon; +SELECT 'ST_CurveToLine02',ST_asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_3dm), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.curvepolygon; +SELECT 'ST_CurveToLine03',ST_asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_3dz), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.curvepolygon; +SELECT 'ST_CurveToLine04',ST_asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_4d), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.curvepolygon; + +-- Removed due to descrepencies between hardware +--SELECT 'box2d01', box2d(the_geom_2d) FROM public.curvepolygon; +--SELECT 'box2d02', box2d(the_geom_3dm) FROM public.curvepolygon; +--SELECT 'box2d03', box2d(the_geom_3dz) FROM public.curvepolygon; +--SELECT 'box2d04', box2d(the_geom_4d) FROM public.curvepolygon; + +--SELECT 'box3d01', box3d(the_geom_2d) FROM public.curvepolygon; +--SELECT 'box3d02', box3d(the_geom_3dm) FROM public.curvepolygon; +--SELECT 'box3d03', box3d(the_geom_3dz) FROM public.curvepolygon; +--SELECT 'box3d04', box3d(the_geom_4d) FROM public.curvepolygon; + +-- TODO: ST_SnapToGrid is required to remove platform dependent precision +-- issues. Until ST_SnapToGrid is updated to work against curves, these +-- tests cannot be run. +--SELECT 'ST_LineToCurve01',ST_asewkt(ST_LineToCurve(ST_CurveToLine(the_geom_2d))) FROM public.curvepolygon; +--SELECT 'ST_LineToCurve02',ST_asewkt(ST_LineToCurve(ST_CurveToLine(the_geom_3dm))) FROM public.curvepolygon; +--SELECT 'ST_LineToCurve03',ST_asewkt(ST_LineToCurve(ST_CurveToLine(the_geom_3dz))) FROM public.curvepolygon; +--SELECT 'ST_LineToCurve04',ST_asewkt(ST_LineToCurve(ST_CurveToLine(the_geom_4d))) FROM public.curvepolygon; + +-- Repeat tests with new function names. +SELECT 'astext01', ST_astext(the_geom_2d) FROM public.curvepolygon; +SELECT 'astext02', ST_astext(the_geom_3dm) FROM public.curvepolygon; +SELECT 'astext03', ST_astext(the_geom_3dz) FROM public.curvepolygon; +SELECT 'astext04', ST_astext(the_geom_4d) FROM public.curvepolygon; + +SELECT 'asewkt01', ST_asewkt(the_geom_2d) FROM public.curvepolygon; +SELECT 'asewkt02', ST_asewkt(the_geom_3dm) FROM public.curvepolygon; +SELECT 'asewkt03', ST_asewkt(the_geom_3dz) FROM public.curvepolygon; +SELECT 'asewkt04', ST_asewkt(the_geom_4d) FROM public.curvepolygon; + +-- These tests will fail on different architectures +-- We need a way to handle multiple byte orderings +--SELECT 'asbinary01', encode(ST_asbinary(the_geom_2d), 'hex') FROM public.curvepolygon; +--SELECT 'asbinary02', encode(ST_asbinary(the_geom_3dm), 'hex') FROM public.curvepolygon; +--SELECT 'asbinary03', encode(ST_asbinary(the_geom_3dz), 'hex') FROM public.curvepolygon; +--SELECT 'asbinary04', encode(ST_asbinary(the_geom_4d), 'hex') FROM public.curvepolygon; +-- +--SELECT 'asewkb01', encode(ST_asewkb(the_geom_2d), 'hex') FROM public.curvepolygon; +--SELECT 'asewkb02', encode(ST_asewkb(the_geom_3dm), 'hex') FROM public.curvepolygon; +--SELECT 'asewkb03', encode(ST_asewkb(the_geom_3dz), 'hex') FROM public.curvepolygon; +--SELECT 'asewkb04', encode(ST_asewkb(the_geom_4d), 'hex') FROM public.curvepolygon; + +-- Removed due to descrepencies between hardware +--SELECT 'box2d01', ST_box2d(the_geom_2d) FROM public.curvepolygon; +--SELECT 'box2d02', ST_box2d(the_geom_3dm) FROM public.curvepolygon; +--SELECT 'box2d03', ST_box2d(the_geom_3dz) FROM public.curvepolygon; +--SELECT 'box2d04', ST_box2d(the_geom_4d) FROM public.curvepolygon; + +--SELECT 'box3d01', ST_box3d(the_geom_2d) FROM public.curvepolygon; +--SELECT 'box3d02', ST_box3d(the_geom_3dm) FROM public.curvepolygon; +--SELECT 'box3d03', ST_box3d(the_geom_3dz) FROM public.curvepolygon; +--SELECT 'box3d04', ST_box3d(the_geom_4d) FROM public.curvepolygon; + +SELECT 'isValid01', ST_isValid(the_geom_2d) FROM public.curvepolygon; +SELECT 'isValid02', ST_isValid(the_geom_3dm) FROM public.curvepolygon; +SELECT 'isValid03', ST_isValid(the_geom_3dz) FROM public.curvepolygon; +SELECT 'isValid04', ST_isValid(the_geom_4d) FROM public.curvepolygon; + +SELECT 'dimension01', ST_dimension(the_geom_2d) FROM public.curvepolygon; +SELECT 'dimension02', ST_dimension(the_geom_3dm) FROM public.curvepolygon; +SELECT 'dimension03', ST_dimension(the_geom_3dz) FROM public.curvepolygon; +SELECT 'dimension04', ST_dimension(the_geom_4d) FROM public.curvepolygon; + +SELECT 'SRID01', ST_SRID(the_geom_2d) FROM public.curvepolygon; +SELECT 'SRID02', ST_SRID(the_geom_3dm) FROM public.curvepolygon; +SELECT 'SRID03', ST_SRID(the_geom_3dz) FROM public.curvepolygon; +SELECT 'SRID04', ST_SRID(the_geom_4d) FROM public.curvepolygon; + +SELECT 'envelope01', ST_asText(ST_snapToGrid(ST_envelope(the_geom_2d), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.curvepolygon; +SELECT 'envelope02', ST_asText(ST_snapToGrid(ST_envelope(the_geom_3dm), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.curvepolygon; +SELECT 'envelope03', ST_asText(ST_snapToGrid(ST_envelope(the_geom_3dz), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.curvepolygon; +SELECT 'envelope04', ST_asText(ST_snapToGrid(ST_envelope(the_geom_4d), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.curvepolygon; + +SELECT 'startPoint01', (ST_startPoint(the_geom_2d) is null) FROM public.curvepolygon; +SELECT 'startPoint02', (ST_startPoint(the_geom_3dm) is null) FROM public.curvepolygon; +SELECT 'startPoint03', (ST_startPoint(the_geom_3dz) is null) FROM public.curvepolygon; +SELECT 'startPoint04', (ST_startPoint(the_geom_4d) is null) FROM public.curvepolygon; + +SELECT 'endPoint01', (ST_endPoint(the_geom_2d) is null) FROM public.curvepolygon; +SELECT 'endPoint02', (ST_endPoint(the_geom_3dm) is null) FROM public.curvepolygon; +SELECT 'endPoint03', (ST_endPoint(the_geom_3dz) is null) FROM public.curvepolygon; +SELECT 'endPoint04', (ST_endPoint(the_geom_4d) is null) FROM public.curvepolygon; + +SELECT 'exteriorRing01', ST_asEWKT(ST_exteriorRing(the_geom_2d)) FROM public.curvepolygon; +SELECT 'exteriorRing02', ST_asEWKT(ST_exteriorRing(the_geom_3dm)) FROM public.curvepolygon; +SELECT 'exteriorRing03', ST_asEWKT(ST_exteriorRing(the_geom_3dz)) FROM public.curvepolygon; +SELECT 'exteriorRing04', ST_asEWKT(ST_exteriorRing(the_geom_4d)) FROM public.curvepolygon; + +SELECT 'numInteriorRings01', ST_numInteriorRings(the_geom_2d) FROM public.curvepolygon; +SELECT 'numInteriorRings02', ST_numInteriorRings(the_geom_3dm) FROM public.curvepolygon; +SELECT 'numInteriorRings03', ST_numInteriorRings(the_geom_3dz) FROM public.curvepolygon; +SELECT 'numInteriorRings04', ST_numInteriorRings(the_geom_4d) FROM public.curvepolygon; + +SELECT 'interiorRingN-101', ST_asEWKT(ST_interiorRingN(the_geom_2d, 1)) FROM public.curvepolygon; +SELECT 'interiorRingN-102', ST_asEWKT(ST_interiorRingN(the_geom_3dm, 1)) FROM public.curvepolygon; +SELECT 'interiorRingN-103', ST_asEWKT(ST_interiorRingN(the_geom_3dz, 1)) FROM public.curvepolygon; +SELECT 'interiorRingN-104', ST_asEWKT(ST_interiorRingN(the_geom_4d, 1)) FROM public.curvepolygon; + +SELECT 'interiorRingN-201', ST_asEWKT(ST_interiorRingN(the_geom_2d, 2)) FROM public.curvepolygon; +SELECT 'interiorRingN-202', ST_asEWKT(ST_interiorRingN(the_geom_3dm, 2)) FROM public.curvepolygon; +SELECT 'interiorRingN-203', ST_asEWKT(ST_interiorRingN(the_geom_3dz, 2)) FROM public.curvepolygon; +SELECT 'interiorRingN-204', ST_asEWKT(ST_interiorRingN(the_geom_4d, 2)) FROM public.curvepolygon; + +SELECT DropGeometryColumn('public', 'curvepolygon', 'the_geom_2d'); +SELECT DropGeometryColumn('public', 'curvepolygon', 'the_geom_3dm'); +SELECT DropGeometryColumn('public', 'curvepolygon', 'the_geom_3dz'); +SELECT DropGeometryColumn('public', 'curvepolygon', 'the_geom_4d'); +DROP TABLE public.curvepolygon; + +SELECT 'valid wkt curve polygon 1', ST_GeomFromEWKT('CURVEPOLYGON((143.62025166838282 -30.037497356076827, 142.92857147299705 -32.75101196874403, 145.96132309891922 -34.985671061528784, 149.57565307617188 -33.41153335571289, 149.41972407584802 -29.824672680573517, 146.1209416055467 -30.19711586270431, 143.62025166838282 -30.037497356076827))'); +SELECT 'valid wkt curve polygon 2', ST_GeomFromEWKT('CURVEPOLYGON((143.62025166838282 -30.037497356076827, 142.92857147299705 -32.75101196874403, 145.96132309891922 -34.985671061528784, 149.57565307617188 -33.41153335571289, 149.41972407584802 -29.824672680573517, 146.1209416055467 -30.19711586270431, 143.62025166838282 -30.037497356076827),(144.84399355252685 -31.26123924022086, 144.20551952601693 -32.27215644886158, 145.55230712890625 -33.49203872680664, 147.97080993652344 -32.03618621826172, 146.38697244992585 -31.47406391572417, 144.84399355252685 -31.26123924022086))'); +SELECT 'valid wkt curve polygon 3', ST_GeomFromEWKT('CURVEPOLYGON(CIRCULARSTRING(143.62025166838282 -30.037497356076827, 142.92857147299705 -32.75101196874403, 145.96132309891922 -34.985671061528784, 149.57565307617188 -33.41153335571289, 149.41972407584802 -29.824672680573517, 146.1209416055467 -30.19711586270431, 143.62025166838282 -30.037497356076827))'); +SELECT 'valid wkt curve polygon 4', + ST_GeomFromEWKT('CURVEPOLYGON(CIRCULARSTRING(143.62025166838282 -30.037497356076827, 142.92857147299705 -32.75101196874403, 145.96132309891922 -34.985671061528784, 149.57565307617188 -33.41153335571289, 149.41972407584802 -29.824672680573517, 146.1209416055467 -30.19711586270431, 143.62025166838282 -30.037497356076827),(144.84399355252685 -31.26123924022086, 144.20551952601693 -32.27215644886158, 145.55230712890625 -33.49203872680664, 147.97080993652344 -32.03618621826172, 146.38697244992585 -31.47406391572417, 144.84399355252685 -31.26123924022086))'); +SELECT 'valid wkt curve polygon 5', ST_GeomFromEWKT('CURVEPOLYGON((143.62025166838282 -30.037497356076827, 142.92857147299705 -32.75101196874403, 145.96132309891922 -34.985671061528784, 149.57565307617188 -33.41153335571289, 149.41972407584802 -29.824672680573517, 146.1209416055467 -30.19711586270431, 143.62025166838282 -30.037497356076827),COMPOUNDCURVE(CIRCULARSTRING(144.84399355252685 -31.26123924022086, 144.20551952601693 -32.27215644886158, 145.55230712890625 -33.49203872680664), (145.55230712890625 -33.49203872680664, 147.97080993652344 -32.03618621826172),CIRCULARSTRING(147.97080993652344 -32.03618621826172, 146.38697244992585 -31.47406391572417, 144.84399355252685 -31.26123924022086)))'); +SELECT 'invalid wkt curve polygon 4', ST_GeomFromEWKT('CURVEPOLYGON((143.62025166838282 -30.037497356076827, 142.92857147299705 -32.75101196874403, 145.96132309891922 -34.985671061528784, 149.57565307617188 -33.41153335571289, 149.41972407584802 -29.824672680573517, 146.1209416055467 -30.19711586270431, 143.62025166838282 -30.037497356076))'); +SELECT 'invalid wkt curve polygon 5', ST_GeomFromEWKT('CURVEPOLYGON((143.62025166838282 -30.037497356076827, 142.92857147299705 -32.75101196874403, 145.96132309891922 -34.985671061528784, 149.57565307617188 -33.41153335571289, 149.41972407584802 -29.824672680573517, 146.1209416055467 -30.19711586270431, 143.62025166838282 -30.037497356076827),(144.84399355252685 -31.26123924022086, 144.20551952601693 -32.27215644886158, 145.55230712890625 -33.49203872680664, 147.97080993652344 -32.03618621826172, 146.38697244992585 -31.47406391572417))'); +SELECT 'invalid wkt curve polygon 6', ST_GeomFromEWKT('CURVEPOLYGON((143.62025166838282 -30.037497356076827, 142.92857147299705 -32.75101196874403, 145.96132309891922 -34.985671061528784, 149.57565307617188 -33.41153335571289, 149.41972407584802 -29.824672680573517, 146.1209416055467 -30.19711586270431),(144.84399355252685 -31.26123924022086, 144.20551952601693 -32.27215644886158, 145.55230712890625 -33.49203872680664, 147.97080993652344 -32.03618621826172, 146.38697244992585 -31.47406391572417, 144.84399355252685 -31.26123924022086))'); +SELECT 'invalid wkt curve polygon 7', ST_GeomFromEWKT('CURVEPOLYGON(CIRCULARSTRING(143.62025166838282 -30.037497356076827, 142.92857147299705 -32.75101196874403, 145.96132309891922 -34.985671061528784, 149.57565307617188 -33.41153335571289, 149.41972407584802 -29.824672680573517, 143.62025166838282 -30.037497356076827))'); +SELECT 'invalid wkt curve polygon 8', ST_GeomFromEWKT('CURVEPOLYGON(CIRCULARSTRING(143.62025166838282 -30.037497356076827, 142.92857147299705 -32.75101196874403, 145.96132309891922 -34.985671061528784, 149.57565307617188 -33.41153335571289, 149.41972407584802 -29.824672680573517, 146.1209416055467 -30.19711586270431),(144.84399355252685 -31.26123924022086, 144.20551952601693 -32.27215644886158, 145.55230712890625 -33.49203872680664, 147.97080993652344 -32.03618621826172, 146.38697244992585 -31.47406391572417, 144.84399355252685 -31.26123924022086))'); +SELECT 'invalid wkt curve polygon 9', ST_GeomFromEWKT('CURVEPOLYGON((143.62025166838282 -30.037497356076827, 142.92857147299705 -32.75101196874403, 145.96132309891922 -34.985671061528784, 149.57565307617188 -33.41153335571289, 149.41972407584802 -29.824672680573517, 146.1209416055467 -30.19711586270431, 143.62025166838282 -30.037497356076827),COMPOUNDCURVE(CIRCULARSTRING(144.84399355252685 -31.26123924022086, 144.20551952601693 -32.27215644886158, 145.55230712890625 -33.49203872680664),CIRCULARSTRING(147.97080993652344 -32.03618621826172, 146.38697244992585 -31.47406391572417, 144.84399355252685 -31.26123924022086))'); +SELECT 'invalid wkt curve polygon a', ST_GeomFromEWKT('CURVEPOLYGON((143.62025166838282 -30.037497356076827, 142.92857147299705 -32.75101196874403, 145.96132309891922 -34.985671061528784, 149.57565307617188 -33.41153335571289, 149.41972407584802 -29.824672680573517, 146.1209416055467 -30.19711586270431, 143.62025166838282 -30.037497356076827),COMPOUNDCURVE(CIRCULARSTRING(144.84399355252685 -31.26123924022086, 144.20551952601693 -32.27215644886158, 145.55230712890625 -33.49203872680664),(145.55230712890625 -33.49203872680664, 147.97080993652344 -32.03618621826172),CIRCULARSTRING(147.97080993652344 -32.03618621826172, 146.38697244992585 -31.47406391572417, 144.84399355252685 -30.76123924022086))'); +SELECT 'invalid wkt curve polygon b', ST_GeomFromEWKT('CURVEPOLYGON((143.62025166838282 -30.037497356076827, 142.92857147299705 -32.75101196874403, 145.96132309891922 -34.985671061528784, 149.57565307617188 -33.41153335571289, 149.41972407584802 -29.824672680573517, 146.1209416055467 -30.19711586270431, 143.62025166838282 -30.037497356076827),COMPOUNDCURVE(CIRCULARSTRING(144.84399355252685 -31.26123924022086, 144.20551952601693 -32.27215644886158, 145.55230712890625 -33.49203872680664),(145.55230712890625 -33.49203872680664),CIRCULARSTRING(147.97080993652344 -32.03618621826172, 146.38697244992585 -31.47406391572417, 144.84399355252685 -31.26123924022086))'); +SELECT 'valid ewkb curve polygon 1', ST_asEWKT(ST_GeomFromEWKB(decode('010a00000001000000010200000007000000ccdf061ad9f3614054093e6d99093ec0ab9085dbb6dd614081540229216040c0ebd7a828c33e62409bf026782a7e41c0000000c06bb2624000000020adb440c08e632f616ead6240c9f7b0bf1dd33dc09011eec0de4362407dd6672f76323ec0ccdf061ad9f3614054093e6d99093ec0', 'hex'))); +SELECT 'valid ewkb curve polygon 2', ST_asEWKT(ST_GeomFromEWKB(decode('010a00000002000000010200000007000000ccdf061ad9f3614054093e6d99093ec0ab9085dbb6dd614081540229216040c0ebd7a828c33e62409bf026782a7e41c0000000c06bb2624000000020adb440c08e632f616ead6240c9f7b0bf1dd33dc09011eec0de4362407dd6672f76323ec0ccdf061ad9f3614054093e6d99093ec00102000000060000006844c4fe011b6240342e2993e0423fc0d45daf9d93066240c4a0c305d62240c000000080ac31624000000020fbbe40c0000000e0107f6240000000c0a10440c04e1c0c14624c6240bf3fb6405c793fc06844c4fe011b6240342e2993e0423fc0', 'hex'))); +SELECT 'valid ewkb curve polygon 3', ST_asEWKT(ST_GeomFromEWKB(decode('010a00000001000000010800000007000000ccdf061ad9f3614054093e6d99093ec0ab9085dbb6dd614081540229216040c0ebd7a828c33e62409bf026782a7e41c0000000c06bb2624000000020adb440c08e632f616ead6240c9f7b0bf1dd33dc09011eec0de4362407dd6672f76323ec0ccdf061ad9f3614054093e6d99093ec0', 'hex'))); +SELECT 'valid ewkb curve polygon 4', ST_asEWKT(ST_GeomFromEWKB(decode('010a00000002000000010800000007000000ccdf061ad9f3614054093e6d99093ec0ab9085dbb6dd614081540229216040c0ebd7a828c33e62409bf026782a7e41c0000000c06bb2624000000020adb440c08e632f616ead6240c9f7b0bf1dd33dc09011eec0de4362407dd6672f76323ec0ccdf061ad9f3614054093e6d99093ec00102000000060000006844c4fe011b6240342e2993e0423fc0d45daf9d93066240c4a0c305d62240c000000080ac31624000000020fbbe40c0000000e0107f6240000000c0a10440c04e1c0c14624c6240bf3fb6405c793fc06844c4fe011b6240342e2993e0423fc0', 'hex'))); +SELECT 'valid ewkb curve polygon 5', ST_asEWKT(ST_GeomFromEWKB(decode('010a00000002000000010200000007000000ccdf061ad9f3614054093e6d99093ec0ab9085dbb6dd614081540229216040c0ebd7a828c33e62409bf026782a7e41c0000000c06bb2624000000020adb440c08e632f616ead6240c9f7b0bf1dd33dc09011eec0de4362407dd6672f76323ec0ccdf061ad9f3614054093e6d99093ec00109000000030000000108000000030000006844c4fe011b6240342e2993e0423fc0d45daf9d93066240c4a0c305d62240c000000080ac31624000000020fbbe40c001020000000200000000000080ac31624000000020fbbe40c0000000e0107f6240000000c0a10440c0010800000003000000000000e0107f6240000000c0a10440c04e1c0c14624c6240bf3fb6405c793fc06844c4fe011b6240342e2993e0423fc0', 'hex'))); +SELECT 'valid curve 6', ST_GeomFromText('CURVEPOLYGON(COMPOUNDCURVE(CIRCULARSTRING(0 0,2 0, 2 1, 2 3, 4 3),(4 3, 4 5, 1 4, 0 0)), CIRCULARSTRING(1.7 1, 1.4 0.4, 1.7 1) )'); +SELECT 'valid curve 7', ST_GeomFromText('CURVEPOLYGON(COMPOUNDCURVE(CIRCULARSTRING(0 0,2 0, 2 1, 2 3, 4 3),(4 3, 4 5, 1 4, 0 0)), (1.7 1, 1.4 0.4, 1.7 1) )'); +SELECT 'valid curve 8', ST_GeomFromText('CURVEPOLYGON(COMPOUNDCURVE(CIRCULARSTRING(0 0,2 0, 2 1, 2 3, 4 3),(4 3, 0 0)), CIRCULARSTRING(1.7 1, 1.4 0.4, 1.7 1) )'); +SELECT 'null response', ST_NumPoints(ST_GeomFromEWKT('CURVEPOLYGON(COMPOUNDCURVE(CIRCULARSTRING(0 0,2 0, 2 1, 2 3, 4 3),(4 3, 4 5, 1 4, 0 0)), CIRCULARSTRING(1.7 1, 1.4 0.4, 1.7 1) )')); diff -Nru postgis-1.5.3/regress/sql-mm-curvepoly_expected postgis-2.0.1/regress/sql-mm-curvepoly_expected --- postgis-1.5.3/regress/sql-mm-curvepoly_expected 2011-06-24 03:51:11.000000000 +0000 +++ postgis-2.0.1/regress/sql-mm-curvepoly_expected 2012-02-27 22:08:12.000000000 +0000 @@ -7,26 +7,6 @@ ndims04|2 geometrytype04|CURVEPOLYGON ndims05|4 -ndims01|4 -geometrytype01|CURVEPOLYGON -ndims02|3 -geometrytype02|CURVEPOLYGON -ndims03|3 -geometrytype03|CURVEPOLYGONM -ndims04|2 -geometrytype04|CURVEPOLYGON -public.curvepolygon.the_geom_2d SRID:-1 TYPE:CURVEPOLYGON DIMS:2 -public.curvepolygon.the_geom_3dm SRID:-1 TYPE:CURVEPOLYGONM DIMS:3 -public.curvepolygon.the_geom_3dz SRID:-1 TYPE:CURVEPOLYGON DIMS:3 -public.curvepolygon.the_geom_4d SRID:-1 TYPE:CURVEPOLYGON DIMS:4 -astext01|CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)) -astext02|CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)) -astext03|CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)) -astext04|CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)) -asewkt01|CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)) -asewkt02|CURVEPOLYGONM(CIRCULARSTRING(-2 0 0,-1 -1 2,0 0 4,1 -1 6,2 0 8,0 2 4,-2 0 0),(-1 0 2,0 0.5 4,1 0 6,0 1 4,-1 0 2)) -asewkt03|CURVEPOLYGON(CIRCULARSTRING(-2 0 0,-1 -1 1,0 0 2,1 -1 3,2 0 4,0 2 2,-2 0 0),(-1 0 1,0 0.5 2,1 0 3,0 1 3,-1 0 1)) -asewkt04|CURVEPOLYGON(CIRCULARSTRING(-2 0 0 0,-1 -1 1 2,0 0 2 4,1 -1 3 6,2 0 4 8,0 2 2 4,-2 0 0 0),(-1 0 1 2,0 0.5 2 4,1 0 3 6,0 1 3 4,-1 0 1 2)) ST_CurveToLine-201|POLYGON((-2 0,-1.70710678 -0.70710678,-1 -1,-0.29289322 -0.70710678,0 0,0.29289322 -0.70710678,1 -1,1.70710678 -0.70710678,2 0,1.41421356 1.41421356,0 2,-1.41421356 1.41421356,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)) ST_CurveToLine-202|POLYGONM((-2 0 0,-1.70710678 -0.70710678 1,-1 -1 2,-0.29289322 -0.70710678 3,0 0 4,0.29289322 -0.70710678 5,1 -1 6,1.70710678 -0.70710678 7,2 0 8,1.41421356 1.41421356 6,0 2 4,-1.41421356 1.41421356 2,-2 0 0),(-1 0 2,0 0.5 4,1 0 6,0 1 4,-1 0 2)) ST_CurveToLine-203|POLYGON((-2 0 0,-1.70710678 -0.70710678 0.5,-1 -1 1,-0.29289322 -0.70710678 1.5,0 0 2,0.29289322 -0.70710678 2.5,1 -1 3,1.70710678 -0.70710678 3.5,2 0 4,1.41421356 1.41421356 3,0 2 2,-1.41421356 1.41421356 1,-2 0 0),(-1 0 1,0 0.5 2,1 0 3,0 1 3,-1 0 1)) @@ -39,52 +19,12 @@ ST_CurveToLine02|POLYGONM((-2 0 0,-1.99879546 -0.04906767 0.0625,-1.99518473 -0.09801714 0.125,-1.98917651 -0.14673047 0.1875,-1.98078528 -0.19509032 0.25,-1.97003125 -0.24298018 0.3125,-1.95694034 -0.29028468 0.375,-1.94154407 -0.33688985 0.4375,-1.92387953 -0.38268343 0.5,-1.90398929 -0.42755509 0.5625,-1.88192126 -0.47139674 0.625,-1.85772861 -0.51410274 0.6875,-1.83146961 -0.55557023 0.75,-1.80320753 -0.5956993 0.8125,-1.77301045 -0.63439328 0.875,-1.74095113 -0.67155895 0.9375,-1.70710678 -0.70710678 1,-1.67155895 -0.74095113 1.0625,-1.63439328 -0.77301045 1.125,-1.5956993 -0.80320753 1.1875,-1.55557023 -0.83146961 1.25,-1.51410274 -0.85772861 1.3125,-1.47139674 -0.88192126 1.375,-1.42755509 -0.90398929 1.4375,-1.38268343 -0.92387953 1.5,-1.33688985 -0.94154407 1.5625,-1.29028468 -0.95694034 1.625,-1.24298018 -0.97003125 1.6875,-1.19509032 -0.98078528 1.75,-1.14673047 -0.98917651 1.8125,-1.09801714 -0.99518473 1.875,-1.04906767 -0.99879546 1.9375,-1 -1 2,-0.95093233 -0.99879546 2.0625,-0.90198286 -0.99518473 2.125,-0.85326953 -0.98917651 2.1875,-0.80490968 -0.98078528 2.25,-0.75701982 -0.97003125 2.3125,-0.70971532 -0.95694034 2.375,-0.66311015 -0.94154407 2.4375,-0.61731657 -0.92387953 2.5,-0.57244491 -0.90398929 2.5625,-0.52860326 -0.88192126 2.625,-0.48589726 -0.85772861 2.6875,-0.44442977 -0.83146961 2.75,-0.4043007 -0.80320753 2.8125,-0.36560672 -0.77301045 2.875,-0.32844105 -0.74095113 2.9375,-0.29289322 -0.70710678 3,-0.25904887 -0.67155895 3.0625,-0.22698955 -0.63439328 3.125,-0.19679247 -0.5956993 3.1875,-0.16853039 -0.55557023 3.25,-0.14227139 -0.51410274 3.3125,-0.11807874 -0.47139674 3.375,-0.09601071 -0.42755509 3.4375,-0.07612047 -0.38268343 3.5,-0.05845593 -0.33688985 3.5625,-0.04305966 -0.29028468 3.625,-0.02996875 -0.24298018 3.6875,-0.01921472 -0.19509032 3.75,-0.01082349 -0.14673047 3.8125,-0.00481527 -0.09801714 3.875,-0.00120454 -0.04906767 3.9375,0 0 4,0.00120454 -0.04906767 4.0625,0.00481527 -0.09801714 4.125,0.01082349 -0.14673047 4.1875,0.01921472 -0.19509032 4.25,0.02996875 -0.24298018 4.3125,0.04305966 -0.29028468 4.375,0.05845593 -0.33688985 4.4375,0.07612047 -0.38268343 4.5,0.09601071 -0.42755509 4.5625,0.11807874 -0.47139674 4.625,0.14227139 -0.51410274 4.6875,0.16853039 -0.55557023 4.75,0.19679247 -0.5956993 4.8125,0.22698955 -0.63439328 4.875,0.25904887 -0.67155895 4.9375,0.29289322 -0.70710678 5,0.32844105 -0.74095113 5.0625,0.36560672 -0.77301045 5.125,0.4043007 -0.80320753 5.1875,0.44442977 -0.83146961 5.25,0.48589726 -0.85772861 5.3125,0.52860326 -0.88192126 5.375,0.57244491 -0.90398929 5.4375,0.61731657 -0.92387953 5.5,0.66311015 -0.94154407 5.5625,0.70971532 -0.95694034 5.625,0.75701982 -0.97003125 5.6875,0.80490968 -0.98078528 5.75,0.85326953 -0.98917651 5.8125,0.90198286 -0.99518473 5.875,0.95093233 -0.99879546 5.9375,1 -1 6,1.04906767 -0.99879546 6.0625,1.09801714 -0.99518473 6.125,1.14673047 -0.98917651 6.1875,1.19509032 -0.98078528 6.25,1.24298018 -0.97003125 6.3125,1.29028468 -0.95694034 6.375,1.33688985 -0.94154407 6.4375,1.38268343 -0.92387953 6.5,1.42755509 -0.90398929 6.5625,1.47139674 -0.88192126 6.625,1.51410274 -0.85772861 6.6875,1.55557023 -0.83146961 6.75,1.5956993 -0.80320753 6.8125,1.63439328 -0.77301045 6.875,1.67155895 -0.74095113 6.9375,1.70710678 -0.70710678 7,1.74095113 -0.67155895 7.0625,1.77301045 -0.63439328 7.125,1.80320753 -0.5956993 7.1875,1.83146961 -0.55557023 7.25,1.85772861 -0.51410274 7.3125,1.88192126 -0.47139674 7.375,1.90398929 -0.42755509 7.4375,1.92387953 -0.38268343 7.5,1.94154407 -0.33688985 7.5625,1.95694034 -0.29028468 7.625,1.97003125 -0.24298018 7.6875,1.98078528 -0.19509032 7.75,1.98917651 -0.14673047 7.8125,1.99518473 -0.09801714 7.875,1.99879546 -0.04906767 7.9375,2 0 8,1.99759091 0.09813535 7.875,1.99036945 0.19603428 7.75,1.97835302 0.29346095 7.625,1.96157056 0.39018064 7.5,1.94006251 0.48596036 7.375,1.91388067 0.58056935 7.25,1.88308813 0.67377971 7.125,1.84775907 0.76536686 7,1.80797859 0.85511019 6.875,1.76384253 0.94279347 6.75,1.71545722 1.02820549 6.625,1.66293922 1.11114047 6.5,1.60641506 1.19139861 6.375,1.54602091 1.26878657 6.25,1.48190225 1.34311791 6.125,1.41421356 1.41421356 6,1.34311791 1.48190225 5.875,1.26878657 1.54602091 5.75,1.19139861 1.60641506 5.625,1.11114047 1.66293922 5.5,1.02820549 1.71545722 5.375,0.94279347 1.76384253 5.25,0.85511019 1.80797859 5.125,0.76536686 1.84775907 5,0.67377971 1.88308813 4.875,0.58056935 1.91388067 4.75,0.48596036 1.94006251 4.625,0.39018064 1.96157056 4.5,0.29346095 1.97835302 4.375,0.19603428 1.99036945 4.25,0.09813535 1.99759091 4.125,0 2 4,-0.09813535 1.99759091 3.875,-0.19603428 1.99036945 3.75,-0.29346095 1.97835302 3.625,-0.39018064 1.96157056 3.5,-0.48596036 1.94006251 3.375,-0.58056935 1.91388067 3.25,-0.67377971 1.88308813 3.125,-0.76536686 1.84775907 3,-0.85511019 1.80797859 2.875,-0.94279347 1.76384253 2.75,-1.02820549 1.71545722 2.625,-1.11114047 1.66293922 2.5,-1.19139861 1.60641506 2.375,-1.26878657 1.54602091 2.25,-1.34311791 1.48190225 2.125,-1.41421356 1.41421356 2,-1.48190225 1.34311791 1.875,-1.54602091 1.26878657 1.75,-1.60641506 1.19139861 1.625,-1.66293922 1.11114047 1.5,-1.71545722 1.02820549 1.375,-1.76384253 0.94279347 1.25,-1.80797859 0.85511019 1.125,-1.84775907 0.76536686 1,-1.88308813 0.67377971 0.875,-1.91388067 0.58056935 0.75,-1.94006251 0.48596036 0.625,-1.96157056 0.39018064 0.5,-1.97835302 0.29346095 0.375,-1.99036945 0.19603428 0.25,-1.99759091 0.09813535 0.125,-2 0 0),(-1 0 2,0 0.5 4,1 0 6,0 1 4,-1 0 2)) ST_CurveToLine03|POLYGON((-2 0 0,-1.99879546 -0.04906767 0.03125,-1.99518473 -0.09801714 0.0625,-1.98917651 -0.14673047 0.09375,-1.98078528 -0.19509032 0.125,-1.97003125 -0.24298018 0.15625,-1.95694034 -0.29028468 0.1875,-1.94154407 -0.33688985 0.21875,-1.92387953 -0.38268343 0.25,-1.90398929 -0.42755509 0.28125,-1.88192126 -0.47139674 0.3125,-1.85772861 -0.51410274 0.34375,-1.83146961 -0.55557023 0.375,-1.80320753 -0.5956993 0.40625,-1.77301045 -0.63439328 0.4375,-1.74095113 -0.67155895 0.46875,-1.70710678 -0.70710678 0.5,-1.67155895 -0.74095113 0.53125,-1.63439328 -0.77301045 0.5625,-1.5956993 -0.80320753 0.59375,-1.55557023 -0.83146961 0.625,-1.51410274 -0.85772861 0.65625,-1.47139674 -0.88192126 0.6875,-1.42755509 -0.90398929 0.71875,-1.38268343 -0.92387953 0.75,-1.33688985 -0.94154407 0.78125,-1.29028468 -0.95694034 0.8125,-1.24298018 -0.97003125 0.84375,-1.19509032 -0.98078528 0.875,-1.14673047 -0.98917651 0.90625,-1.09801714 -0.99518473 0.9375,-1.04906767 -0.99879546 0.96875,-1 -1 1,-0.95093233 -0.99879546 1.03125,-0.90198286 -0.99518473 1.0625,-0.85326953 -0.98917651 1.09375,-0.80490968 -0.98078528 1.125,-0.75701982 -0.97003125 1.15625,-0.70971532 -0.95694034 1.1875,-0.66311015 -0.94154407 1.21875,-0.61731657 -0.92387953 1.25,-0.57244491 -0.90398929 1.28125,-0.52860326 -0.88192126 1.3125,-0.48589726 -0.85772861 1.34375,-0.44442977 -0.83146961 1.375,-0.4043007 -0.80320753 1.40625,-0.36560672 -0.77301045 1.4375,-0.32844105 -0.74095113 1.46875,-0.29289322 -0.70710678 1.5,-0.25904887 -0.67155895 1.53125,-0.22698955 -0.63439328 1.5625,-0.19679247 -0.5956993 1.59375,-0.16853039 -0.55557023 1.625,-0.14227139 -0.51410274 1.65625,-0.11807874 -0.47139674 1.6875,-0.09601071 -0.42755509 1.71875,-0.07612047 -0.38268343 1.75,-0.05845593 -0.33688985 1.78125,-0.04305966 -0.29028468 1.8125,-0.02996875 -0.24298018 1.84375,-0.01921472 -0.19509032 1.875,-0.01082349 -0.14673047 1.90625,-0.00481527 -0.09801714 1.9375,-0.00120454 -0.04906767 1.96875,0 0 2,0.00120454 -0.04906767 2.03125,0.00481527 -0.09801714 2.0625,0.01082349 -0.14673047 2.09375,0.01921472 -0.19509032 2.125,0.02996875 -0.24298018 2.15625,0.04305966 -0.29028468 2.1875,0.05845593 -0.33688985 2.21875,0.07612047 -0.38268343 2.25,0.09601071 -0.42755509 2.28125,0.11807874 -0.47139674 2.3125,0.14227139 -0.51410274 2.34375,0.16853039 -0.55557023 2.375,0.19679247 -0.5956993 2.40625,0.22698955 -0.63439328 2.4375,0.25904887 -0.67155895 2.46875,0.29289322 -0.70710678 2.5,0.32844105 -0.74095113 2.53125,0.36560672 -0.77301045 2.5625,0.4043007 -0.80320753 2.59375,0.44442977 -0.83146961 2.625,0.48589726 -0.85772861 2.65625,0.52860326 -0.88192126 2.6875,0.57244491 -0.90398929 2.71875,0.61731657 -0.92387953 2.75,0.66311015 -0.94154407 2.78125,0.70971532 -0.95694034 2.8125,0.75701982 -0.97003125 2.84375,0.80490968 -0.98078528 2.875,0.85326953 -0.98917651 2.90625,0.90198286 -0.99518473 2.9375,0.95093233 -0.99879546 2.96875,1 -1 3,1.04906767 -0.99879546 3.03125,1.09801714 -0.99518473 3.0625,1.14673047 -0.98917651 3.09375,1.19509032 -0.98078528 3.125,1.24298018 -0.97003125 3.15625,1.29028468 -0.95694034 3.1875,1.33688985 -0.94154407 3.21875,1.38268343 -0.92387953 3.25,1.42755509 -0.90398929 3.28125,1.47139674 -0.88192126 3.3125,1.51410274 -0.85772861 3.34375,1.55557023 -0.83146961 3.375,1.5956993 -0.80320753 3.40625,1.63439328 -0.77301045 3.4375,1.67155895 -0.74095113 3.46875,1.70710678 -0.70710678 3.5,1.74095113 -0.67155895 3.53125,1.77301045 -0.63439328 3.5625,1.80320753 -0.5956993 3.59375,1.83146961 -0.55557023 3.625,1.85772861 -0.51410274 3.65625,1.88192126 -0.47139674 3.6875,1.90398929 -0.42755509 3.71875,1.92387953 -0.38268343 3.75,1.94154407 -0.33688985 3.78125,1.95694034 -0.29028468 3.8125,1.97003125 -0.24298018 3.84375,1.98078528 -0.19509032 3.875,1.98917651 -0.14673047 3.90625,1.99518473 -0.09801714 3.9375,1.99879546 -0.04906767 3.96875,2 0 4,1.99759091 0.09813535 3.9375,1.99036945 0.19603428 3.875,1.97835302 0.29346095 3.8125,1.96157056 0.39018064 3.75,1.94006251 0.48596036 3.6875,1.91388067 0.58056935 3.625,1.88308813 0.67377971 3.5625,1.84775907 0.76536686 3.5,1.80797859 0.85511019 3.4375,1.76384253 0.94279347 3.375,1.71545722 1.02820549 3.3125,1.66293922 1.11114047 3.25,1.60641506 1.19139861 3.1875,1.54602091 1.26878657 3.125,1.48190225 1.34311791 3.0625,1.41421356 1.41421356 3,1.34311791 1.48190225 2.9375,1.26878657 1.54602091 2.875,1.19139861 1.60641506 2.8125,1.11114047 1.66293922 2.75,1.02820549 1.71545722 2.6875,0.94279347 1.76384253 2.625,0.85511019 1.80797859 2.5625,0.76536686 1.84775907 2.5,0.67377971 1.88308813 2.4375,0.58056935 1.91388067 2.375,0.48596036 1.94006251 2.3125,0.39018064 1.96157056 2.25,0.29346095 1.97835302 2.1875,0.19603428 1.99036945 2.125,0.09813535 1.99759091 2.0625,0 2 2,-0.09813535 1.99759091 1.9375,-0.19603428 1.99036945 1.875,-0.29346095 1.97835302 1.8125,-0.39018064 1.96157056 1.75,-0.48596036 1.94006251 1.6875,-0.58056935 1.91388067 1.625,-0.67377971 1.88308813 1.5625,-0.76536686 1.84775907 1.5,-0.85511019 1.80797859 1.4375,-0.94279347 1.76384253 1.375,-1.02820549 1.71545722 1.3125,-1.11114047 1.66293922 1.25,-1.19139861 1.60641506 1.1875,-1.26878657 1.54602091 1.125,-1.34311791 1.48190225 1.0625,-1.41421356 1.41421356 1,-1.48190225 1.34311791 0.9375,-1.54602091 1.26878657 0.875,-1.60641506 1.19139861 0.8125,-1.66293922 1.11114047 0.75,-1.71545722 1.02820549 0.6875,-1.76384253 0.94279347 0.625,-1.80797859 0.85511019 0.5625,-1.84775907 0.76536686 0.5,-1.88308813 0.67377971 0.4375,-1.91388067 0.58056935 0.375,-1.94006251 0.48596036 0.3125,-1.96157056 0.39018064 0.25,-1.97835302 0.29346095 0.1875,-1.99036945 0.19603428 0.125,-1.99759091 0.09813535 0.0625,-2 0 0),(-1 0 1,0 0.5 2,1 0 3,0 1 3,-1 0 1)) ST_CurveToLine04|POLYGON((-2 0 0 0,-1.99879546 -0.04906767 0.03125 0.0625,-1.99518473 -0.09801714 0.0625 0.125,-1.98917651 -0.14673047 0.09375 0.1875,-1.98078528 -0.19509032 0.125 0.25,-1.97003125 -0.24298018 0.15625 0.3125,-1.95694034 -0.29028468 0.1875 0.375,-1.94154407 -0.33688985 0.21875 0.4375,-1.92387953 -0.38268343 0.25 0.5,-1.90398929 -0.42755509 0.28125 0.5625,-1.88192126 -0.47139674 0.3125 0.625,-1.85772861 -0.51410274 0.34375 0.6875,-1.83146961 -0.55557023 0.375 0.75,-1.80320753 -0.5956993 0.40625 0.8125,-1.77301045 -0.63439328 0.4375 0.875,-1.74095113 -0.67155895 0.46875 0.9375,-1.70710678 -0.70710678 0.5 1,-1.67155895 -0.74095113 0.53125 1.0625,-1.63439328 -0.77301045 0.5625 1.125,-1.5956993 -0.80320753 0.59375 1.1875,-1.55557023 -0.83146961 0.625 1.25,-1.51410274 -0.85772861 0.65625 1.3125,-1.47139674 -0.88192126 0.6875 1.375,-1.42755509 -0.90398929 0.71875 1.4375,-1.38268343 -0.92387953 0.75 1.5,-1.33688985 -0.94154407 0.78125 1.5625,-1.29028468 -0.95694034 0.8125 1.625,-1.24298018 -0.97003125 0.84375 1.6875,-1.19509032 -0.98078528 0.875 1.75,-1.14673047 -0.98917651 0.90625 1.8125,-1.09801714 -0.99518473 0.9375 1.875,-1.04906767 -0.99879546 0.96875 1.9375,-1 -1 1 2,-0.95093233 -0.99879546 1.03125 2.0625,-0.90198286 -0.99518473 1.0625 2.125,-0.85326953 -0.98917651 1.09375 2.1875,-0.80490968 -0.98078528 1.125 2.25,-0.75701982 -0.97003125 1.15625 2.3125,-0.70971532 -0.95694034 1.1875 2.375,-0.66311015 -0.94154407 1.21875 2.4375,-0.61731657 -0.92387953 1.25 2.5,-0.57244491 -0.90398929 1.28125 2.5625,-0.52860326 -0.88192126 1.3125 2.625,-0.48589726 -0.85772861 1.34375 2.6875,-0.44442977 -0.83146961 1.375 2.75,-0.4043007 -0.80320753 1.40625 2.8125,-0.36560672 -0.77301045 1.4375 2.875,-0.32844105 -0.74095113 1.46875 2.9375,-0.29289322 -0.70710678 1.5 3,-0.25904887 -0.67155895 1.53125 3.0625,-0.22698955 -0.63439328 1.5625 3.125,-0.19679247 -0.5956993 1.59375 3.1875,-0.16853039 -0.55557023 1.625 3.25,-0.14227139 -0.51410274 1.65625 3.3125,-0.11807874 -0.47139674 1.6875 3.375,-0.09601071 -0.42755509 1.71875 3.4375,-0.07612047 -0.38268343 1.75 3.5,-0.05845593 -0.33688985 1.78125 3.5625,-0.04305966 -0.29028468 1.8125 3.625,-0.02996875 -0.24298018 1.84375 3.6875,-0.01921472 -0.19509032 1.875 3.75,-0.01082349 -0.14673047 1.90625 3.8125,-0.00481527 -0.09801714 1.9375 3.875,-0.00120454 -0.04906767 1.96875 3.9375,0 0 2 4,0.00120454 -0.04906767 2.03125 4.0625,0.00481527 -0.09801714 2.0625 4.125,0.01082349 -0.14673047 2.09375 4.1875,0.01921472 -0.19509032 2.125 4.25,0.02996875 -0.24298018 2.15625 4.3125,0.04305966 -0.29028468 2.1875 4.375,0.05845593 -0.33688985 2.21875 4.4375,0.07612047 -0.38268343 2.25 4.5,0.09601071 -0.42755509 2.28125 4.5625,0.11807874 -0.47139674 2.3125 4.625,0.14227139 -0.51410274 2.34375 4.6875,0.16853039 -0.55557023 2.375 4.75,0.19679247 -0.5956993 2.40625 4.8125,0.22698955 -0.63439328 2.4375 4.875,0.25904887 -0.67155895 2.46875 4.9375,0.29289322 -0.70710678 2.5 5,0.32844105 -0.74095113 2.53125 5.0625,0.36560672 -0.77301045 2.5625 5.125,0.4043007 -0.80320753 2.59375 5.1875,0.44442977 -0.83146961 2.625 5.25,0.48589726 -0.85772861 2.65625 5.3125,0.52860326 -0.88192126 2.6875 5.375,0.57244491 -0.90398929 2.71875 5.4375,0.61731657 -0.92387953 2.75 5.5,0.66311015 -0.94154407 2.78125 5.5625,0.70971532 -0.95694034 2.8125 5.625,0.75701982 -0.97003125 2.84375 5.6875,0.80490968 -0.98078528 2.875 5.75,0.85326953 -0.98917651 2.90625 5.8125,0.90198286 -0.99518473 2.9375 5.875,0.95093233 -0.99879546 2.96875 5.9375,1 -1 3 6,1.04906767 -0.99879546 3.03125 6.0625,1.09801714 -0.99518473 3.0625 6.125,1.14673047 -0.98917651 3.09375 6.1875,1.19509032 -0.98078528 3.125 6.25,1.24298018 -0.97003125 3.15625 6.3125,1.29028468 -0.95694034 3.1875 6.375,1.33688985 -0.94154407 3.21875 6.4375,1.38268343 -0.92387953 3.25 6.5,1.42755509 -0.90398929 3.28125 6.5625,1.47139674 -0.88192126 3.3125 6.625,1.51410274 -0.85772861 3.34375 6.6875,1.55557023 -0.83146961 3.375 6.75,1.5956993 -0.80320753 3.40625 6.8125,1.63439328 -0.77301045 3.4375 6.875,1.67155895 -0.74095113 3.46875 6.9375,1.70710678 -0.70710678 3.5 7,1.74095113 -0.67155895 3.53125 7.0625,1.77301045 -0.63439328 3.5625 7.125,1.80320753 -0.5956993 3.59375 7.1875,1.83146961 -0.55557023 3.625 7.25,1.85772861 -0.51410274 3.65625 7.3125,1.88192126 -0.47139674 3.6875 7.375,1.90398929 -0.42755509 3.71875 7.4375,1.92387953 -0.38268343 3.75 7.5,1.94154407 -0.33688985 3.78125 7.5625,1.95694034 -0.29028468 3.8125 7.625,1.97003125 -0.24298018 3.84375 7.6875,1.98078528 -0.19509032 3.875 7.75,1.98917651 -0.14673047 3.90625 7.8125,1.99518473 -0.09801714 3.9375 7.875,1.99879546 -0.04906767 3.96875 7.9375,2 0 4 8,1.99759091 0.09813535 3.9375 7.875,1.99036945 0.19603428 3.875 7.75,1.97835302 0.29346095 3.8125 7.625,1.96157056 0.39018064 3.75 7.5,1.94006251 0.48596036 3.6875 7.375,1.91388067 0.58056935 3.625 7.25,1.88308813 0.67377971 3.5625 7.125,1.84775907 0.76536686 3.5 7,1.80797859 0.85511019 3.4375 6.875,1.76384253 0.94279347 3.375 6.75,1.71545722 1.02820549 3.3125 6.625,1.66293922 1.11114047 3.25 6.5,1.60641506 1.19139861 3.1875 6.375,1.54602091 1.26878657 3.125 6.25,1.48190225 1.34311791 3.0625 6.125,1.41421356 1.41421356 3 6,1.34311791 1.48190225 2.9375 5.875,1.26878657 1.54602091 2.875 5.75,1.19139861 1.60641506 2.8125 5.625,1.11114047 1.66293922 2.75 5.5,1.02820549 1.71545722 2.6875 5.375,0.94279347 1.76384253 2.625 5.25,0.85511019 1.80797859 2.5625 5.125,0.76536686 1.84775907 2.5 5,0.67377971 1.88308813 2.4375 4.875,0.58056935 1.91388067 2.375 4.75,0.48596036 1.94006251 2.3125 4.625,0.39018064 1.96157056 2.25 4.5,0.29346095 1.97835302 2.1875 4.375,0.19603428 1.99036945 2.125 4.25,0.09813535 1.99759091 2.0625 4.125,0 2 2 4,-0.09813535 1.99759091 1.9375 3.875,-0.19603428 1.99036945 1.875 3.75,-0.29346095 1.97835302 1.8125 3.625,-0.39018064 1.96157056 1.75 3.5,-0.48596036 1.94006251 1.6875 3.375,-0.58056935 1.91388067 1.625 3.25,-0.67377971 1.88308813 1.5625 3.125,-0.76536686 1.84775907 1.5 3,-0.85511019 1.80797859 1.4375 2.875,-0.94279347 1.76384253 1.375 2.75,-1.02820549 1.71545722 1.3125 2.625,-1.11114047 1.66293922 1.25 2.5,-1.19139861 1.60641506 1.1875 2.375,-1.26878657 1.54602091 1.125 2.25,-1.34311791 1.48190225 1.0625 2.125,-1.41421356 1.41421356 1 2,-1.48190225 1.34311791 0.9375 1.875,-1.54602091 1.26878657 0.875 1.75,-1.60641506 1.19139861 0.8125 1.625,-1.66293922 1.11114047 0.75 1.5,-1.71545722 1.02820549 0.6875 1.375,-1.76384253 0.94279347 0.625 1.25,-1.80797859 0.85511019 0.5625 1.125,-1.84775907 0.76536686 0.5 1,-1.88308813 0.67377971 0.4375 0.875,-1.91388067 0.58056935 0.375 0.75,-1.94006251 0.48596036 0.3125 0.625,-1.96157056 0.39018064 0.25 0.5,-1.97835302 0.29346095 0.1875 0.375,-1.99036945 0.19603428 0.125 0.25,-1.99759091 0.09813535 0.0625 0.125,-2 0 0 0),(-1 0 1 2,0 0.5 2 4,1 0 3 6,0 1 3 4,-1 0 1 2)) -ERROR: Exception in LWGEOM2GEOS: curved geometry not supported. -ERROR: Exception in LWGEOM2GEOS: curved geometry not supported. -ERROR: Exception in LWGEOM2GEOS: curved geometry not supported. -ERROR: Exception in LWGEOM2GEOS: curved geometry not supported. -dimension01|2 -dimension02|2 -dimension03|2 -dimension04|2 -SRID01|-1 -SRID02|-1 -SRID03|-1 -SRID04|-1 -envelope01|POLYGON((-2 -1,-2 2,2 2,2 -1,-2 -1)) -envelope02|POLYGON((-2 -1,-2 2,2 2,2 -1,-2 -1)) -envelope03|POLYGON((-2 -1,-2 2,2 2,2 -1,-2 -1)) -envelope04|POLYGON((-2 -1,-2 2,2 2,2 -1,-2 -1)) -startPoint01|t -startPoint02|t -startPoint03|t -startPoint04|t -endPoint01|t -endPoint02|t -endPoint03|t -endPoint04|t -exteriorRing01|CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0) -exteriorRing02|CIRCULARSTRINGM(-2 0 0,-1 -1 2,0 0 4,1 -1 6,2 0 8,0 2 4,-2 0 0) -exteriorRing03|CIRCULARSTRING(-2 0 0,-1 -1 1,0 0 2,1 -1 3,2 0 4,0 2 2,-2 0 0) -exteriorRing04|CIRCULARSTRING(-2 0 0 0,-1 -1 1 2,0 0 2 4,1 -1 3 6,2 0 4 8,0 2 2 4,-2 0 0 0) -numInteriorRings01|1 -numInteriorRings02|1 -numInteriorRings03|1 -numInteriorRings04|1 -interiorRingN-101|LINESTRING(-1 0,0 0.5,1 0,0 1,-1 0) -interiorRingN-102|LINESTRINGM(-1 0 2,0 0.5 4,1 0 6,0 1 4,-1 0 2) -interiorRingN-103|LINESTRING(-1 0 1,0 0.5 2,1 0 3,0 1 3,-1 0 1) -interiorRingN-104|LINESTRING(-1 0 1 2,0 0.5 2 4,1 0 3 6,0 1 3 4,-1 0 1 2) -interiorRingN-201| -interiorRingN-202| -interiorRingN-203| -interiorRingN-204| astext01|CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)) -astext02|CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)) -astext03|CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)) -astext04|CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)) +astext02|CURVEPOLYGON M (CIRCULARSTRING M (-2 0 0,-1 -1 2,0 0 4,1 -1 6,2 0 8,0 2 4,-2 0 0),(-1 0 2,0 0.5 4,1 0 6,0 1 4,-1 0 2)) +astext03|CURVEPOLYGON Z (CIRCULARSTRING Z (-2 0 0,-1 -1 1,0 0 2,1 -1 3,2 0 4,0 2 2,-2 0 0),(-1 0 1,0 0.5 2,1 0 3,0 1 3,-1 0 1)) +astext04|CURVEPOLYGON ZM (CIRCULARSTRING ZM (-2 0 0 0,-1 -1 1 2,0 0 2 4,1 -1 3 6,2 0 4 8,0 2 2 4,-2 0 0 0),(-1 0 1 2,0 0.5 2 4,1 0 3 6,0 1 3 4,-1 0 1 2)) asewkt01|CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)) -asewkt02|CURVEPOLYGONM(CIRCULARSTRING(-2 0 0,-1 -1 2,0 0 4,1 -1 6,2 0 8,0 2 4,-2 0 0),(-1 0 2,0 0.5 4,1 0 6,0 1 4,-1 0 2)) +asewkt02|CURVEPOLYGONM(CIRCULARSTRINGM(-2 0 0,-1 -1 2,0 0 4,1 -1 6,2 0 8,0 2 4,-2 0 0),(-1 0 2,0 0.5 4,1 0 6,0 1 4,-1 0 2)) asewkt03|CURVEPOLYGON(CIRCULARSTRING(-2 0 0,-1 -1 1,0 0 2,1 -1 3,2 0 4,0 2 2,-2 0 0),(-1 0 1,0 0.5 2,1 0 3,0 1 3,-1 0 1)) asewkt04|CURVEPOLYGON(CIRCULARSTRING(-2 0 0 0,-1 -1 1 2,0 0 2 4,1 -1 3 6,2 0 4 8,0 2 2 4,-2 0 0 0),(-1 0 1 2,0 0.5 2 4,1 0 3 6,0 1 3 4,-1 0 1 2)) ERROR: Exception in LWGEOM2GEOS: curved geometry not supported. @@ -95,10 +35,10 @@ dimension02|2 dimension03|2 dimension04|2 -SRID01|-1 -SRID02|-1 -SRID03|-1 -SRID04|-1 +SRID01|0 +SRID02|0 +SRID03|0 +SRID04|0 envelope01|POLYGON((-2 -1,-2 2,2 2,2 -1,-2 -1)) envelope02|POLYGON((-2 -1,-2 2,2 2,2 -1,-2 -1)) envelope03|POLYGON((-2 -1,-2 2,2 2,2 -1,-2 -1)) @@ -131,34 +71,25 @@ public.curvepolygon.the_geom_3dm effectively removed. public.curvepolygon.the_geom_3dz effectively removed. public.curvepolygon.the_geom_4d effectively removed. -valid wkt curve polygon 1|010D00000001000000010200000007000000CCDF061AD9F3614054093E6D99093EC0AB9085DBB6DD614081540229216040C0EBD7A828C33E62409BF026782A7E41C0000000C06BB2624000000020ADB440C08E632F616EAD6240C9F7B0BF1DD33DC09011EEC0DE4362407DD6672F76323EC0CCDF061AD9F3614054093E6D99093EC0 -valid wkt curve polygon 2|010D00000002000000010200000007000000CCDF061AD9F3614054093E6D99093EC0AB9085DBB6DD614081540229216040C0EBD7A828C33E62409BF026782A7E41C0000000C06BB2624000000020ADB440C08E632F616EAD6240C9F7B0BF1DD33DC09011EEC0DE4362407DD6672F76323EC0CCDF061AD9F3614054093E6D99093EC00102000000060000006844C4FE011B6240342E2993E0423FC0D45DAF9D93066240C4A0C305D62240C000000080AC31624000000020FBBE40C0000000E0107F6240000000C0A10440C04E1C0C14624C6240BF3FB6405C793FC06844C4FE011B6240342E2993E0423FC0 -valid wkt curve polygon 3|010D00000001000000010800000007000000CCDF061AD9F3614054093E6D99093EC0AB9085DBB6DD614081540229216040C0EBD7A828C33E62409BF026782A7E41C0000000C06BB2624000000020ADB440C08E632F616EAD6240C9F7B0BF1DD33DC09011EEC0DE4362407DD6672F76323EC0CCDF061AD9F3614054093E6D99093EC0 -valid wkt curve polygon 4|010D00000002000000010800000007000000CCDF061AD9F3614054093E6D99093EC0AB9085DBB6DD614081540229216040C0EBD7A828C33E62409BF026782A7E41C0000000C06BB2624000000020ADB440C08E632F616EAD6240C9F7B0BF1DD33DC09011EEC0DE4362407DD6672F76323EC0CCDF061AD9F3614054093E6D99093EC00102000000060000006844C4FE011B6240342E2993E0423FC0D45DAF9D93066240C4A0C305D62240C000000080AC31624000000020FBBE40C0000000E0107F6240000000C0A10440C04E1C0C14624C6240BF3FB6405C793FC06844C4FE011B6240342E2993E0423FC0 -valid wkt curve polygon 5|010D00000002000000010200000007000000CCDF061AD9F3614054093E6D99093EC0AB9085DBB6DD614081540229216040C0EBD7A828C33E62409BF026782A7E41C0000000C06BB2624000000020ADB440C08E632F616EAD6240C9F7B0BF1DD33DC09011EEC0DE4362407DD6672F76323EC0CCDF061AD9F3614054093E6D99093EC00109000000030000000108000000030000006844C4FE011B6240342E2993E0423FC0D45DAF9D93066240C4A0C305D62240C000000080AC31624000000020FBBE40C001020000000200000000000080AC31624000000020FBBE40C0000000E0107F6240000000C0A10440C0010800000003000000000000E0107F6240000000C0A10440C04E1C0C14624C6240BF3FB6405C793FC06844C4FE011B6240342E2993E0423FC0 +valid wkt curve polygon 1|010A00000001000000010200000007000000CCDF061AD9F3614054093E6D99093EC0AB9085DBB6DD614081540229216040C0EBD7A828C33E62409BF026782A7E41C0000000C06BB2624000000020ADB440C08E632F616EAD6240C9F7B0BF1DD33DC09011EEC0DE4362407DD6672F76323EC0CCDF061AD9F3614054093E6D99093EC0 +valid wkt curve polygon 2|010A00000002000000010200000007000000CCDF061AD9F3614054093E6D99093EC0AB9085DBB6DD614081540229216040C0EBD7A828C33E62409BF026782A7E41C0000000C06BB2624000000020ADB440C08E632F616EAD6240C9F7B0BF1DD33DC09011EEC0DE4362407DD6672F76323EC0CCDF061AD9F3614054093E6D99093EC00102000000060000006844C4FE011B6240342E2993E0423FC0D45DAF9D93066240C4A0C305D62240C000000080AC31624000000020FBBE40C0000000E0107F6240000000C0A10440C04E1C0C14624C6240BF3FB6405C793FC06844C4FE011B6240342E2993E0423FC0 +valid wkt curve polygon 3|010A00000001000000010800000007000000CCDF061AD9F3614054093E6D99093EC0AB9085DBB6DD614081540229216040C0EBD7A828C33E62409BF026782A7E41C0000000C06BB2624000000020ADB440C08E632F616EAD6240C9F7B0BF1DD33DC09011EEC0DE4362407DD6672F76323EC0CCDF061AD9F3614054093E6D99093EC0 +valid wkt curve polygon 4|010A00000002000000010800000007000000CCDF061AD9F3614054093E6D99093EC0AB9085DBB6DD614081540229216040C0EBD7A828C33E62409BF026782A7E41C0000000C06BB2624000000020ADB440C08E632F616EAD6240C9F7B0BF1DD33DC09011EEC0DE4362407DD6672F76323EC0CCDF061AD9F3614054093E6D99093EC00102000000060000006844C4FE011B6240342E2993E0423FC0D45DAF9D93066240C4A0C305D62240C000000080AC31624000000020FBBE40C0000000E0107F6240000000C0A10440C04E1C0C14624C6240BF3FB6405C793FC06844C4FE011B6240342E2993E0423FC0 +valid wkt curve polygon 5|010A00000002000000010200000007000000CCDF061AD9F3614054093E6D99093EC0AB9085DBB6DD614081540229216040C0EBD7A828C33E62409BF026782A7E41C0000000C06BB2624000000020ADB440C08E632F616EAD6240C9F7B0BF1DD33DC09011EEC0DE4362407DD6672F76323EC0CCDF061AD9F3614054093E6D99093EC00109000000030000000108000000030000006844C4FE011B6240342E2993E0423FC0D45DAF9D93066240C4A0C305D62240C000000080AC31624000000020FBBE40C001020000000200000000000080AC31624000000020FBBE40C0000000E0107F6240000000C0A10440C0010800000003000000000000E0107F6240000000C0A10440C04E1C0C14624C6240BF3FB6405C793FC06844C4FE011B6240342E2993E0423FC0 ERROR: geometry contains non-closed rings -HINT: "... 143.62025166838282 -30.037497356076)" <-- parse error at position 286 within geometry ERROR: geometry contains non-closed rings -HINT: "...46.38697244992585 -31.47406391572417)" <-- parse error at position 485 within geometry ERROR: geometry contains non-closed rings -HINT: "...146.1209416055467 -30.19711586270431)" <-- parse error at position 249 within geometry ERROR: geometry must have an odd number of points -HINT: "...3.62025166838282 -30.037497356076827)" <-- parse error at position 265 within geometry -ERROR: geometry contains non-closed rings -HINT: "...146.1209416055467 -30.19711586270431)" <-- parse error at position 263 within geometry +ERROR: geometry must have an odd number of points ERROR: incontinuous compound curve -HINT: "...45.55230712890625 -33.49203872680664)" <-- parse error at position 435 within geometry ERROR: geometry contains non-closed rings -HINT: "...4.84399355252685 -30.76123924022086))" <-- parse error at position 647 within geometry ERROR: geometry requires more points -HINT: "...45.55230712890625 -33.49203872680664)" <-- parse error at position 475 within geometry valid ewkb curve polygon 1|CURVEPOLYGON((143.620251668383 -30.0374973560768,142.928571472997 -32.751011968744,145.961323098919 -34.9856710615288,149.575653076172 -33.4115333557129,149.419724075848 -29.8246726805735,146.120941605547 -30.1971158627043,143.620251668383 -30.0374973560768)) valid ewkb curve polygon 2|CURVEPOLYGON((143.620251668383 -30.0374973560768,142.928571472997 -32.751011968744,145.961323098919 -34.9856710615288,149.575653076172 -33.4115333557129,149.419724075848 -29.8246726805735,146.120941605547 -30.1971158627043,143.620251668383 -30.0374973560768),(144.843993552527 -31.2612392402209,144.205519526017 -32.2721564488616,145.552307128906 -33.4920387268066,147.970809936523 -32.0361862182617,146.386972449926 -31.4740639157242,144.843993552527 -31.2612392402209)) valid ewkb curve polygon 3|CURVEPOLYGON(CIRCULARSTRING(143.620251668383 -30.0374973560768,142.928571472997 -32.751011968744,145.961323098919 -34.9856710615288,149.575653076172 -33.4115333557129,149.419724075848 -29.8246726805735,146.120941605547 -30.1971158627043,143.620251668383 -30.0374973560768)) valid ewkb curve polygon 4|CURVEPOLYGON(CIRCULARSTRING(143.620251668383 -30.0374973560768,142.928571472997 -32.751011968744,145.961323098919 -34.9856710615288,149.575653076172 -33.4115333557129,149.419724075848 -29.8246726805735,146.120941605547 -30.1971158627043,143.620251668383 -30.0374973560768),(144.843993552527 -31.2612392402209,144.205519526017 -32.2721564488616,145.552307128906 -33.4920387268066,147.970809936523 -32.0361862182617,146.386972449926 -31.4740639157242,144.843993552527 -31.2612392402209)) valid ewkb curve polygon 5|CURVEPOLYGON((143.620251668383 -30.0374973560768,142.928571472997 -32.751011968744,145.961323098919 -34.9856710615288,149.575653076172 -33.4115333557129,149.419724075848 -29.8246726805735,146.120941605547 -30.1971158627043,143.620251668383 -30.0374973560768),COMPOUNDCURVE(CIRCULARSTRING(144.843993552527 -31.2612392402209,144.205519526017 -32.2721564488616,145.552307128906 -33.4920387268066),(145.552307128906 -33.4920387268066,147.970809936523 -32.0361862182617),CIRCULARSTRING(147.970809936523 -32.0361862182617,146.386972449926 -31.4740639157242,144.843993552527 -31.2612392402209))) -010D0000000200000001090000000200000001080000000500000000000000000000000000000000000000000000000000004000000000000000000000000000000040000000000000F03F00000000000000400000000000000840000000000000104000000000000008400102000000040000000000000000001040000000000000084000000000000010400000000000001440000000000000F03F000000000000104000000000000000000000000000000000010800000003000000333333333333FB3F000000000000F03F666666666666F63F9A9999999999D93F333333333333FB3F000000000000F03F +valid curve 6|010A0000000200000001090000000200000001080000000500000000000000000000000000000000000000000000000000004000000000000000000000000000000040000000000000F03F00000000000000400000000000000840000000000000104000000000000008400102000000040000000000000000001040000000000000084000000000000010400000000000001440000000000000F03F000000000000104000000000000000000000000000000000010800000003000000333333333333FB3F000000000000F03F666666666666F63F9A9999999999D93F333333333333FB3F000000000000F03F ERROR: geometry requires more points -HINT: "...1 4, 0 0)), (1.7 1, 1.4 0.4, 1.7 1) )" <-- parse error at position 114 within geometry -010D0000000200000001090000000200000001080000000500000000000000000000000000000000000000000000000000004000000000000000000000000000000040000000000000F03F00000000000000400000000000000840000000000000104000000000000008400102000000020000000000000000001040000000000000084000000000000000000000000000000000010800000003000000333333333333FB3F000000000000F03F666666666666F63F9A9999999999D93F333333333333FB3F000000000000F03F +valid curve 8|010A0000000200000001090000000200000001080000000500000000000000000000000000000000000000000000000000004000000000000000000000000000000040000000000000F03F00000000000000400000000000000840000000000000104000000000000008400102000000020000000000000000001040000000000000084000000000000000000000000000000000010800000003000000333333333333FB3F000000000000F03F666666666666F63F9A9999999999D93F333333333333FB3F000000000000F03F null response| diff -Nru postgis-1.5.3/regress/sql-mm-general.sql postgis-2.0.1/regress/sql-mm-general.sql --- postgis-1.5.3/regress/sql-mm-general.sql 2009-02-02 06:01:27.000000000 +0000 +++ postgis-2.0.1/regress/sql-mm-general.sql 2012-02-27 22:08:12.000000000 +0000 @@ -1,86 +1,86 @@ -SELECT ST_HasArc(geomfromtext('POINT(0 0)')); -SELECT ST_HasArc(geomfromtext('LINESTRING(0 0, 1 1, 1 0)')); -SELECT ST_HasArc(geomfromewkt('CIRCULARSTRING( - 0 0 0 0, - 0.26794919243112270647255365849413 1 3 -2, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2)')); -SELECT ST_HasArc(geomfromewkt('COMPOUNDCURVE(CIRCULARSTRING( - 0 0 0 0, - 0.26794919243112270647255365849413 1 3 -2, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2), - (0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2, - 2 0 0 0, - 0 0 0 0))')); -SELECT ST_HasArc(geomfromewkt('POLYGON( - (-10 -10, 10 -10, 10 10, -10 10, -10 -10), - (5 0, 0 5, -5 0, 0 -5, 5 0))')); -SELECT ST_HasArc(geomfromewkt('CURVEPOLYGON(CIRCULARSTRING( - -2 0 0 0, - -1 -1 1 2, - 0 0 2 4, - 1 -1 3 6, - 2 0 4 8, - 0 2 2 4, - -2 0 0 0), - (-1 0 1 2, - 0 0.5 2 4, - 1 0 3 6, - 0 1 3 4, - -1 0 1 2))')); -SELECT ST_HasArc(geomfromewkt('MULTIPOINT((0 0), (3 2))')); -SELECT ST_HasArc(geomfromewkt('MULTILINESTRING( - (0 0, 3 2), - (4 8, 9 8), - (2 9, 4 8))')); -SELECT ST_HasArc(geomfromewkt('MULTICURVE( - (0 0, 3 2), - (4 8, 9 8), - (2 9, 4 8))')); -SELECT ST_HasArc(geomfromewkt('MULTICURVE(( - 5 5 1 3, - 3 5 2 2, - 3 3 3 1, - 0 3 1 1) - ,CIRCULARSTRING( - 0 0 0 0, - 0.26794919243112270647255365849413 1 3 -2, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2))')); -SELECT ST_HasArc(geomfromewkt('MULTIPOLYGON( - ((-10 -10, 10 -10, 10 10, -10 10, -10 -10), - (5 0, 0 5, -5 0, 0 -5, 5 0)), - ((9 2, 3 8, 9 4, 9 2)))')); -SELECT ST_HasArc(geomfromewkt('MULTISURFACE( - ((-10 -10, 10 -10, 10 10, -10 10, -10 -10), - (5 0, 0 5, -5 0, 0 -5, 5 0)), - ((9 2, 3 8, 9 4, 9 2)))')); -SELECT ST_HasArc(geomfromewkt('MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING( - -2 0 0 0, - -1 -1 1 2, - 0 0 2 4, - 1 -1 3 6, - 2 0 4 8, - 0 2 2 4, - -2 0 0 0), - (-1 0 1 2, - 0 0.5 2 4, - 1 0 3 6, - 0 1 3 4, - -1 0 1 2)), - ((7 8 7 8, - 10 10 5 5, - 6 14 3 1, - 4 11 4 6, - 7 8 7 8), - (9 9 7 8, - 8 12 7 8, - 7 10 7 8, - 9 9 7 8)))')); -SELECT ST_AsEWKT(ST_LineToCurve('LINESTRING( - -13151357.927248 3913656.64539871, - -13151419.0845266 3913664.12016378, - -13151441.323537 3913666.61175286, - -13151456.8908442 3913666.61175286, - -13151476.9059536 3913666.61175286, - -13151496.921063 3913666.61175287, - -13151521.3839744 3913666.61175287, - -13151591.4368571 3913665.36595828)')); +SELECT ST_HasArc(ST_GeomFromText('POINT(0 0)')); +SELECT ST_HasArc(ST_GeomFromText('LINESTRING(0 0, 1 1, 1 0)')); +SELECT ST_HasArc(ST_GeomFromEWKT('CIRCULARSTRING( + 0 0 0 0, + 0.26794919243112270647255365849413 1 3 -2, + 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2)')); +SELECT ST_HasArc(ST_GeomFromEWKT('COMPOUNDCURVE(CIRCULARSTRING( + 0 0 0 0, + 0.26794919243112270647255365849413 1 3 -2, + 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2), + (0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2, + 2 0 0 0, + 0 0 0 0))')); +SELECT ST_HasArc(ST_GeomFromEWKT('POLYGON( + (-10 -10, 10 -10, 10 10, -10 10, -10 -10), + (5 0, 0 5, -5 0, 0 -5, 5 0))')); +SELECT ST_HasArc(ST_GeomFromEWKT('CURVEPOLYGON(CIRCULARSTRING( + -2 0 0 0, + -1 -1 1 2, + 0 0 2 4, + 1 -1 3 6, + 2 0 4 8, + 0 2 2 4, + -2 0 0 0), + (-1 0 1 2, + 0 0.5 2 4, + 1 0 3 6, + 0 1 3 4, + -1 0 1 2))')); +SELECT ST_HasArc(ST_GeomFromEWKT('MULTIPOINT((0 0), (3 2))')); +SELECT ST_HasArc(ST_GeomFromEWKT('MULTILINESTRING( + (0 0, 3 2), + (4 8, 9 8), + (2 9, 4 8))')); +SELECT ST_HasArc(ST_GeomFromEWKT('MULTICURVE( + (0 0, 3 2), + (4 8, 9 8), + (2 9, 4 8))')); +SELECT ST_HasArc(ST_GeomFromEWKT('MULTICURVE(( + 5 5 1 3, + 3 5 2 2, + 3 3 3 1, + 0 3 1 1) + ,CIRCULARSTRING( + 0 0 0 0, + 0.26794919243112270647255365849413 1 3 -2, + 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2))')); +SELECT ST_HasArc(ST_GeomFromEWKT('MULTIPOLYGON( + ((-10 -10, 10 -10, 10 10, -10 10, -10 -10), + (5 0, 0 5, -5 0, 0 -5, 5 0)), + ((9 2, 3 8, 9 4, 9 2)))')); +SELECT ST_HasArc(ST_GeomFromEWKT('MULTISURFACE( + ((-10 -10, 10 -10, 10 10, -10 10, -10 -10), + (5 0, 0 5, -5 0, 0 -5, 5 0)), + ((9 2, 3 8, 9 4, 9 2)))')); +SELECT ST_HasArc(ST_GeomFromEWKT('MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING( + -2 0 0 0, + -1 -1 1 2, + 0 0 2 4, + 1 -1 3 6, + 2 0 4 8, + 0 2 2 4, + -2 0 0 0), + (-1 0 1 2, + 0 0.5 2 4, + 1 0 3 6, + 0 1 3 4, + -1 0 1 2)), + ((7 8 7 8, + 10 10 5 5, + 6 14 3 1, + 4 11 4 6, + 7 8 7 8), + (9 9 7 8, + 8 12 7 8, + 7 10 7 8, + 9 9 7 8)))')); +SELECT ST_AsEWKT(ST_LineToCurve('LINESTRING( + -13151357.927248 3913656.64539871, + -13151419.0845266 3913664.12016378, + -13151441.323537 3913666.61175286, + -13151456.8908442 3913666.61175286, + -13151476.9059536 3913666.61175286, + -13151496.921063 3913666.61175287, + -13151521.3839744 3913666.61175287, + -13151591.4368571 3913665.36595828)')); diff -Nru postgis-1.5.3/regress/sql-mm-multicurve.sql postgis-2.0.1/regress/sql-mm-multicurve.sql --- postgis-1.5.3/regress/sql-mm-multicurve.sql 2007-08-09 16:56:37.000000000 +0000 +++ postgis-2.0.1/regress/sql-mm-multicurve.sql 2012-02-27 22:08:12.000000000 +0000 @@ -1,345 +1,236 @@ -SELECT 'ndims01', ndims(geomfromewkt('MULTICURVE(( - 5 5 1 3, - 3 5 2 2, - 3 3 3 1, - 0 3 1 1) - ,CIRCULARSTRING( - 0 0 0 0, - 0.26794919243112270647255365849413 1 3 -2, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2))')); -SELECT 'geometrytype01', geometrytype(geomfromewkt('MULTICURVE(( - 5 5 1 3, - 3 5 2 2, - 3 3 3 1, - 0 3 1 1) - ,CIRCULARSTRING( - 0 0 0 0, - 0.26794919243112270647255365849413 1 3 -2, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2))')); -SELECT 'ndims02', ndims(geomfromewkt('MULTICURVE(( - 5 5 1, - 3 5 2, - 3 3 3, - 0 3 1) - ,CIRCULARSTRING( - 0 0 0, - 0.26794919243112270647255365849413 1 3, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1))')); -SELECT 'geometrytype02', geometrytype(geomfromewkt('MULTICURVE(( - 5 5 1, - 3 5 2, - 3 3 3, - 0 3 1) - ,CIRCULARSTRING( - 0 0 0, - 0.26794919243112270647255365849413 1 3, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1))')); -SELECT 'ndims03', ndims(geomfromewkt('MULTICURVEM(( - 5 5 3, - 3 5 2, - 3 3 1, - 0 3 1) - ,CIRCULARSTRING( - 0 0 0, - 0.26794919243112270647255365849413 1 -2, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097 2))')); -SELECT 'geometrytype03', geometrytype(geomfromewkt('MULTICURVEM(( - 5 5 3, - 3 5 2, - 3 3 1, - 0 3 1) - ,CIRCULARSTRING( - 0 0 0, - 0.26794919243112270647255365849413 1 -2, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097 2))')); -SELECT 'ndims04', ndims(geomfromewkt('MULTICURVE(( - 5 5, - 3 5, - 3 3, - 0 3) - ,CIRCULARSTRING( - 0 0, - 0.26794919243112270647255365849413 1, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097))')); -SELECT 'geometrytype04', geometrytype(geomfromewkt('MULTICURVE(( - 5 5, - 3 5, - 3 3, - 0 3) - ,CIRCULARSTRING( - 0 0, - 0.26794919243112270647255365849413 1, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097))')); - --- Repeat the tests with the new function names. -SELECT 'ndims01', ST_ndims(ST_geomfromewkt('MULTICURVE(( - 5 5 1 3, - 3 5 2 2, - 3 3 3 1, - 0 3 1 1) - ,CIRCULARSTRING( - 0 0 0 0, - 0.26794919243112270647255365849413 1 3 -2, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2))')); -SELECT 'geometrytype01', geometrytype(ST_geomfromewkt('MULTICURVE(( - 5 5 1 3, - 3 5 2 2, - 3 3 3 1, - 0 3 1 1) - ,CIRCULARSTRING( - 0 0 0 0, - 0.26794919243112270647255365849413 1 3 -2, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2))')); -SELECT 'ndims02', ST_ndims(ST_geomfromewkt('MULTICURVE(( - 5 5 1, - 3 5 2, - 3 3 3, - 0 3 1) - ,CIRCULARSTRING( - 0 0 0, - 0.26794919243112270647255365849413 1 3, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1))')); -SELECT 'geometrytype02', geometrytype(ST_geomfromewkt('MULTICURVE(( - 5 5 1, - 3 5 2, - 3 3 3, - 0 3 1) - ,CIRCULARSTRING( - 0 0 0, - 0.26794919243112270647255365849413 1 3, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1))')); -SELECT 'ndims03', ST_ndims(ST_geomfromewkt('MULTICURVEM(( - 5 5 3, - 3 5 2, - 3 3 1, - 0 3 1) - ,CIRCULARSTRING( - 0 0 0, - 0.26794919243112270647255365849413 1 -2, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097 2))')); -SELECT 'geometrytype03', geometrytype(ST_geomfromewkt('MULTICURVEM(( - 5 5 3, - 3 5 2, - 3 3 1, - 0 3 1) - ,CIRCULARSTRING( - 0 0 0, - 0.26794919243112270647255365849413 1 -2, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097 2))')); -SELECT 'ndims04', ST_ndims(ST_geomfromewkt('MULTICURVE(( - 5 5, - 3 5, - 3 3, - 0 3) - ,CIRCULARSTRING( - 0 0, - 0.26794919243112270647255365849413 1, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097))')); -SELECT 'geometrytype04', geometrytype(ST_geomfromewkt('MULTICURVE(( - 5 5, - 3 5, - 3 3, - 0 3) - ,CIRCULARSTRING( - 0 0, - 0.26794919243112270647255365849413 1, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097))')); - -CREATE TABLE public.multicurve (id INTEGER, description VARCHAR); -SELECT AddGeometryColumn('public', 'multicurve', 'the_geom_2d', -1, 'MULTICURVE', 2); -SELECT AddGeometryColumn('public', 'multicurve', 'the_geom_3dm', -1, 'MULTICURVEM', 3); -SELECT AddGeometryColumn('public', 'multicurve', 'the_geom_3dz', -1, 'MULTICURVE', 3); -SELECT AddGeometryColumn('public', 'multicurve', 'the_geom_4d', -1, 'MULTICURVE', 4); - -INSERT INTO public.multicurve ( - id, - description - ) VALUES ( - 1, 'multicurve'); -UPDATE public.multicurve - SET the_geom_4d = geomfromewkt('MULTICURVE(( - 5 5 1 3, - 3 5 2 2, - 3 3 3 1, - 0 3 1 1) - ,CIRCULARSTRING( - 0 0 0 0, - 0.26794919243112270647255365849413 1 3 -2, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2))'); -UPDATE public.multicurve - SET the_geom_3dz = geomfromewkt('MULTICURVE(( - 5 5 1, - 3 5 2, - 3 3 3, - 0 3 1) - ,CIRCULARSTRING( - 0 0 0, - 0.26794919243112270647255365849413 1 3, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1))'); -UPDATE public.multicurve - SET the_geom_3dm = geomfromewkt('MULTICURVEM(( - 5 5 3, - 3 5 2, - 3 3 1, - 0 3 1) - ,CIRCULARSTRING( - 0 0 0, - 0.26794919243112270647255365849413 1 -2, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097 2))'); -UPDATE public.multicurve - SET the_geom_2d = geomfromewkt('MULTICURVE(( - 5 5, - 3 5, - 3 3, - 0 3) - ,CIRCULARSTRING( - 0 0, - 0.26794919243112270647255365849413 1, - 0.5857864376269049511983112757903 1.4142135623730950488016887242097))'); - -SELECT 'astext01', astext(the_geom_2d) FROM public.multicurve; -SELECT 'astext02', astext(the_geom_3dm) FROM public.multicurve; -SELECT 'astext03', astext(the_geom_3dz) FROM public.multicurve; -SELECT 'astext04', astext(the_geom_4d) FROM public.multicurve; - -SELECT 'asewkt01', asewkt(the_geom_2d) FROM public.multicurve; -SELECT 'asewkt02', asewkt(the_geom_3dm) FROM public.multicurve; -SELECT 'asewkt03', asewkt(the_geom_3dz) FROM public.multicurve; -SELECT 'asewkt04', asewkt(the_geom_4d) FROM public.multicurve; - --- These tests will fail on different architectures --- We need a way to handle multiple byte orderings ---SELECT 'asbinary01', encode(asbinary(the_geom_2d), 'hex') FROM public.multicurve; ---SELECT 'asbinary02', encode(asbinary(the_geom_3dm), 'hex') FROM public.multicurve; ---SELECT 'asbinary03', encode(asbinary(the_geom_3dz), 'hex') FROM public.multicurve; ---SELECT 'asbinary04', encode(asbinary(the_geom_4d), 'hex') FROM public.multicurve; --- ---SELECT 'asewkb01', encode(asewkb(the_geom_2d), 'hex') FROM public.multicurve; ---SELECT 'asewkb02', encode(asewkb(the_geom_3dm), 'hex') FROM public.multicurve; ---SELECT 'asewkb03', encode(asewkb(the_geom_3dz), 'hex') FROM public.multicurve; ---SELECT 'asewkb04', encode(asewkb(the_geom_4d), 'hex') FROM public.multicurve; - -SELECT 'ST_CurveToLine-201', asewkt(snapToGrid(ST_CurveToLine(the_geom_2d, 2), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multicurve; -SELECT 'ST_CurveToLine-202', asewkt(snapToGrid(ST_CurveToLine(the_geom_3dm, 2), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multicurve; -SELECT 'ST_CurveToLine-203', asewkt(snapToGrid(ST_CurveToLine(the_geom_3dz, 2), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multicurve; -SELECT 'ST_CurveToLine-204', asewkt(snapToGrid(ST_CurveToLine(the_geom_4d, 2), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multicurve; - -SELECT 'ST_CurveToLine-401', asewkt(snapToGrid(ST_CurveToLine(the_geom_2d, 4), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multicurve; -SELECT 'ST_CurveToLine-402', asewkt(snapToGrid(ST_CurveToLine(the_geom_3dm, 4), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multicurve; -SELECT 'ST_CurveToLine-403', asewkt(snapToGrid(ST_CurveToLine(the_geom_3dz, 4), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multicurve; -SELECT 'ST_CurveToLine-404', asewkt(snapToGrid(ST_CurveToLine(the_geom_4d, 4), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multicurve; - -SELECT 'ST_CurveToLine01', asewkt(snapToGrid(ST_CurveToLine(the_geom_2d), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multicurve; -SELECT 'ST_CurveToLine02', asewkt(snapToGrid(ST_CurveToLine(the_geom_3dm), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multicurve; -SELECT 'ST_CurveToLine03', asewkt(snapToGrid(ST_CurveToLine(the_geom_3dz), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multicurve; -SELECT 'ST_CurveToLine04', asewkt(snapToGrid(ST_CurveToLine(the_geom_4d), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multicurve; - --- Removed due to descrepencies between hardware ---SELECT 'box2d01', box2d(the_geom_2d) FROM public.multicurve; ---SELECT 'box2d02', box2d(the_geom_3dm) FROM public.multicurve; ---SELECT 'box2d03', box2d(the_geom_3dz) FROM public.multicurve; ---SELECT 'box2d04', box2d(the_geom_4d) FROM public.multicurve; - ---SELECT 'box3d01', box3d(the_geom_2d) FROM public.multicurve; ---SELECT 'box3d02', box3d(the_geom_3dm) FROM public.multicurve; ---SELECT 'box3d03', box3d(the_geom_3dz) FROM public.multicurve; ---SELECT 'box3d04', box3d(the_geom_4d) FROM public.multicurve; - -SELECT 'isValid01', isValid(the_geom_2d) FROM public.multicurve; -SELECT 'isValid02', isValid(the_geom_3dm) FROM public.multicurve; -SELECT 'isValid03', isValid(the_geom_3dz) FROM public.multicurve; -SELECT 'isValid04', isValid(the_geom_4d) FROM public.multicurve; - -SELECT 'dimension01', dimension(the_geom_2d) FROM public.multicurve; -SELECT 'dimension02', dimension(the_geom_3dm) FROM public.multicurve; -SELECT 'dimension03', dimension(the_geom_3dz) FROM public.multicurve; -SELECT 'dimension04', dimension(the_geom_4d) FROM public.multicurve; - -SELECT 'numGeometries01', numGeometries(the_geom_2d) FROM public.multicurve; -SELECT 'numGeometries02', numGeometries(the_geom_3dm) FROM public.multicurve; -SELECT 'numGeometries03', numGeometries(the_geom_3dz) FROM public.multicurve; -SELECT 'numGeometries04', numGeometries(the_geom_4d) FROM public.multicurve; - -SELECT 'geometryN-201', asEWKT(geometryN(the_geom_2d, 2)) FROM public.multicurve; -SELECT 'geometryN-202', asEWKT(geometryN(the_geom_3dm, 2)) FROM public.multicurve; -SELECT 'geometryN-203', asEWKT(geometryN(the_geom_3dz, 2)) FROM public.multicurve; -SELECT 'geometryN-204', asEWKT(geometryN(the_geom_4d, 2)) FROM public.multicurve; - -SELECT 'geometryN-301', (asEWKT(geometryN(the_geom_2d, 3)) is null) FROM public.multicurve; -SELECT 'geometryN-302', (asEWKT(geometryN(the_geom_3dm, 3)) is null) FROM public.multicurve; -SELECT 'geometryN-303', (asEWKT(geometryN(the_geom_3dz, 3)) is null) FROM public.multicurve; -SELECT 'geometryN-304', (asEWKT(geometryN(the_geom_4d, 3)) is null) FROM public.multicurve; - --- TODO: ST_SnapToGrid is required to remove platform dependent precision --- issues. Until ST_SnapToGrid is updated to work against curves, these --- tests cannot be run. ---SELECT 'ST_LineToCurve01', asewkt(ST_LineToCurve(ST_CurveToLine(the_geom_2d))) FROM public.multicurve; ---SELECT 'ST_LineToCurve02', asewkt(ST_LineToCurve(ST_CurveToLine(the_geom_3dm))) FROM public.multicurve; ---SELECT 'ST_LineToCurve03', asewkt(ST_LineToCurve(ST_CurveToLine(the_geom_3dz))) FROM public.multicurve; ---SELECT 'ST_LineToCurve04', asewkt(ST_LineToCurve(ST_CurveToLine(the_geom_4d))) FROM public.multicurve; - --- Repeat all tests with the new function names. -SELECT 'astext01', ST_astext(the_geom_2d) FROM public.multicurve; -SELECT 'astext02', ST_astext(the_geom_3dm) FROM public.multicurve; -SELECT 'astext03', ST_astext(the_geom_3dz) FROM public.multicurve; -SELECT 'astext04', ST_astext(the_geom_4d) FROM public.multicurve; - -SELECT 'asewkt01', ST_asewkt(the_geom_2d) FROM public.multicurve; -SELECT 'asewkt02', ST_asewkt(the_geom_3dm) FROM public.multicurve; -SELECT 'asewkt03', ST_asewkt(the_geom_3dz) FROM public.multicurve; -SELECT 'asewkt04', ST_asewkt(the_geom_4d) FROM public.multicurve; - --- These tests will fail on different architectures --- We need a way to handle multiple byte orderings ---SELECT 'asbinary01', encode(ST_asbinary(the_geom_2d), 'hex') FROM public.multicurve; ---SELECT 'asbinary02', encode(ST_asbinary(the_geom_3dm), 'hex') FROM public.multicurve; ---SELECT 'asbinary03', encode(ST_asbinary(the_geom_3dz), 'hex') FROM public.multicurve; ---SELECT 'asbinary04', encode(ST_asbinary(the_geom_4d), 'hex') FROM public.multicurve; --- ---SELECT 'asewkb01', encode(ST_asewkb(the_geom_2d), 'hex') FROM public.multicurve; ---SELECT 'asewkb02', encode(ST_asewkb(the_geom_3dm), 'hex') FROM public.multicurve; ---SELECT 'asewkb03', encode(ST_asewkb(the_geom_3dz), 'hex') FROM public.multicurve; ---SELECT 'asewkb04', encode(ST_asewkb(the_geom_4d), 'hex') FROM public.multicurve; - --- Removed due to descrepencies between hardware ---SELECT 'box2d01', ST_box2d(the_geom_2d) FROM public.multicurve; ---SELECT 'box2d02', ST_box2d(the_geom_3dm) FROM public.multicurve; ---SELECT 'box2d03', ST_box2d(the_geom_3dz) FROM public.multicurve; ---SELECT 'box2d04', ST_box2d(the_geom_4d) FROM public.multicurve; - ---SELECT 'box3d01', ST_box3d(the_geom_2d) FROM public.multicurve; ---SELECT 'box3d02', ST_box3d(the_geom_3dm) FROM public.multicurve; ---SELECT 'box3d03', ST_box3d(the_geom_3dz) FROM public.multicurve; ---SELECT 'box3d04', ST_box3d(the_geom_4d) FROM public.multicurve; - -SELECT 'isValid01', ST_isValid(the_geom_2d) FROM public.multicurve; -SELECT 'isValid02', ST_isValid(the_geom_3dm) FROM public.multicurve; -SELECT 'isValid03', ST_isValid(the_geom_3dz) FROM public.multicurve; -SELECT 'isValid04', ST_isValid(the_geom_4d) FROM public.multicurve; - -SELECT 'dimension01', ST_dimension(the_geom_2d) FROM public.multicurve; -SELECT 'dimension02', ST_dimension(the_geom_3dm) FROM public.multicurve; -SELECT 'dimension03', ST_dimension(the_geom_3dz) FROM public.multicurve; -SELECT 'dimension04', ST_dimension(the_geom_4d) FROM public.multicurve; - -SELECT 'numGeometries01', ST_numGeometries(the_geom_2d) FROM public.multicurve; -SELECT 'numGeometries02', ST_numGeometries(the_geom_3dm) FROM public.multicurve; -SELECT 'numGeometries03', ST_numGeometries(the_geom_3dz) FROM public.multicurve; -SELECT 'numGeometries04', ST_numGeometries(the_geom_4d) FROM public.multicurve; - -SELECT 'geometryN-201', ST_asEWKT(ST_geometryN(the_geom_2d, 2)) FROM public.multicurve; -SELECT 'geometryN-202', ST_asEWKT(ST_geometryN(the_geom_3dm, 2)) FROM public.multicurve; -SELECT 'geometryN-203', ST_asEWKT(ST_geometryN(the_geom_3dz, 2)) FROM public.multicurve; -SELECT 'geometryN-204', ST_asEWKT(ST_geometryN(the_geom_4d, 2)) FROM public.multicurve; - -SELECT 'geometryN-301', (ST_asEWKT(ST_geometryN(the_geom_2d, 3)) is null) FROM public.multicurve; -SELECT 'geometryN-302', (ST_asEWKT(ST_geometryN(the_geom_3dm, 3)) is null) FROM public.multicurve; -SELECT 'geometryN-303', (ST_asEWKT(ST_geometryN(the_geom_3dz, 3)) is null) FROM public.multicurve; -SELECT 'geometryN-304', (ST_asEWKT(ST_geometryN(the_geom_4d, 3)) is null) FROM public.multicurve; - -SELECT DropGeometryColumn('public', 'multicurve', 'the_geom_2d'); -SELECT DropGeometryColumn('public', 'multicurve', 'the_geom_3dm'); -SELECT DropGeometryColumn('public', 'multicurve', 'the_geom_3dz'); -SELECT DropGeometryColumn('public', 'multicurve', 'the_geom_4d'); -DROP TABLE public.multicurve; - +-- Repeat the tests with the new function names. +SELECT 'ndims01', ST_ndims(ST_geomfromewkt('MULTICURVE(( + 5 5 1 3, + 3 5 2 2, + 3 3 3 1, + 0 3 1 1) + ,CIRCULARSTRING( + 0 0 0 0, + 0.26794919243112270647255365849413 1 3 -2, + 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2))')); +SELECT 'geometrytype01', geometrytype(ST_geomfromewkt('MULTICURVE(( + 5 5 1 3, + 3 5 2 2, + 3 3 3 1, + 0 3 1 1) + ,CIRCULARSTRING( + 0 0 0 0, + 0.26794919243112270647255365849413 1 3 -2, + 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2))')); +SELECT 'ndims02', ST_ndims(ST_geomfromewkt('MULTICURVE(( + 5 5 1, + 3 5 2, + 3 3 3, + 0 3 1) + ,CIRCULARSTRING( + 0 0 0, + 0.26794919243112270647255365849413 1 3, + 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1))')); +SELECT 'geometrytype02', geometrytype(ST_geomfromewkt('MULTICURVE(( + 5 5 1, + 3 5 2, + 3 3 3, + 0 3 1) + ,CIRCULARSTRING( + 0 0 0, + 0.26794919243112270647255365849413 1 3, + 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1))')); +SELECT 'ndims03', ST_ndims(ST_geomfromewkt('MULTICURVEM(( + 5 5 3, + 3 5 2, + 3 3 1, + 0 3 1) + ,CIRCULARSTRING( + 0 0 0, + 0.26794919243112270647255365849413 1 -2, + 0.5857864376269049511983112757903 1.4142135623730950488016887242097 2))')); +SELECT 'geometrytype03', geometrytype(ST_geomfromewkt('MULTICURVEM(( + 5 5 3, + 3 5 2, + 3 3 1, + 0 3 1) + ,CIRCULARSTRING( + 0 0 0, + 0.26794919243112270647255365849413 1 -2, + 0.5857864376269049511983112757903 1.4142135623730950488016887242097 2))')); +SELECT 'ndims04', ST_ndims(ST_geomfromewkt('MULTICURVE(( + 5 5, + 3 5, + 3 3, + 0 3) + ,CIRCULARSTRING( + 0 0, + 0.26794919243112270647255365849413 1, + 0.5857864376269049511983112757903 1.4142135623730950488016887242097))')); +SELECT 'geometrytype04', geometrytype(ST_geomfromewkt('MULTICURVE(( + 5 5, + 3 5, + 3 3, + 0 3) + ,CIRCULARSTRING( + 0 0, + 0.26794919243112270647255365849413 1, + 0.5857864376269049511983112757903 1.4142135623730950488016887242097))')); + +CREATE TABLE public.multicurve (id INTEGER, description VARCHAR, +the_geom_2d GEOMETRY(MULTICURVE), +the_geom_3dm GEOMETRY(MULTICURVEM), +the_geom_3dz GEOMETRY(MULTICURVEZ), +the_geom_4d GEOMETRY(MULTICURVEZM)); + +INSERT INTO public.multicurve ( + id, + description + ) VALUES ( + 1, 'multicurve'); +UPDATE public.multicurve + SET the_geom_4d = ST_Geomfromewkt('MULTICURVE(( + 5 5 1 3, + 3 5 2 2, + 3 3 3 1, + 0 3 1 1) + ,CIRCULARSTRING( + 0 0 0 0, + 0.26794919243112270647255365849413 1 3 -2, + 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1 2))'); +UPDATE public.multicurve + SET the_geom_3dz = ST_Geomfromewkt('MULTICURVE(( + 5 5 1, + 3 5 2, + 3 3 3, + 0 3 1) + ,CIRCULARSTRING( + 0 0 0, + 0.26794919243112270647255365849413 1 3, + 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1))'); +UPDATE public.multicurve + SET the_geom_3dm = ST_Geomfromewkt('MULTICURVEM(( + 5 5 3, + 3 5 2, + 3 3 1, + 0 3 1) + ,CIRCULARSTRING( + 0 0 0, + 0.26794919243112270647255365849413 1 -2, + 0.5857864376269049511983112757903 1.4142135623730950488016887242097 2))'); +UPDATE public.multicurve + SET the_geom_2d = ST_Geomfromewkt('MULTICURVE(( + 5 5, + 3 5, + 3 3, + 0 3) + ,CIRCULARSTRING( + 0 0, + 0.26794919243112270647255365849413 1, + 0.5857864376269049511983112757903 1.4142135623730950488016887242097))'); + +-- These tests will fail on different architectures +-- We need a way to handle multiple byte orderings +--SELECT 'asbinary01', encode(asbinary(the_geom_2d), 'hex') FROM public.multicurve; +--SELECT 'asbinary02', encode(asbinary(the_geom_3dm), 'hex') FROM public.multicurve; +--SELECT 'asbinary03', encode(asbinary(the_geom_3dz), 'hex') FROM public.multicurve; +--SELECT 'asbinary04', encode(asbinary(the_geom_4d), 'hex') FROM public.multicurve; +-- +--SELECT 'asewkb01', encode(asewkb(the_geom_2d), 'hex') FROM public.multicurve; +--SELECT 'asewkb02', encode(asewkb(the_geom_3dm), 'hex') FROM public.multicurve; +--SELECT 'asewkb03', encode(asewkb(the_geom_3dz), 'hex') FROM public.multicurve; +--SELECT 'asewkb04', encode(asewkb(the_geom_4d), 'hex') FROM public.multicurve; + +SELECT 'ST_CurveToLine-201', ST_Asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_2d, 2), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multicurve; +SELECT 'ST_CurveToLine-202', ST_Asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_3dm, 2), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multicurve; +SELECT 'ST_CurveToLine-203', ST_Asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_3dz, 2), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multicurve; +SELECT 'ST_CurveToLine-204', ST_Asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_4d, 2), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multicurve; + +SELECT 'ST_CurveToLine-401', ST_Asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_2d, 4), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multicurve; +SELECT 'ST_CurveToLine-402', ST_Asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_3dm, 4), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multicurve; +SELECT 'ST_CurveToLine-403', ST_Asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_3dz, 4), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multicurve; +SELECT 'ST_CurveToLine-404', ST_Asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_4d, 4), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multicurve; + +SELECT 'ST_CurveToLine01', ST_Asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_2d), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multicurve; +SELECT 'ST_CurveToLine02', ST_Asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_3dm), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multicurve; +SELECT 'ST_CurveToLine03', ST_Asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_3dz), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multicurve; +SELECT 'ST_CurveToLine04', ST_Asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_4d), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multicurve; + +-- Removed due to descrepencies between hardware +--SELECT 'box2d01', box2d(the_geom_2d) FROM public.multicurve; +--SELECT 'box2d02', box2d(the_geom_3dm) FROM public.multicurve; +--SELECT 'box2d03', box2d(the_geom_3dz) FROM public.multicurve; +--SELECT 'box2d04', box2d(the_geom_4d) FROM public.multicurve; + +--SELECT 'box3d01', box3d(the_geom_2d) FROM public.multicurve; +--SELECT 'box3d02', box3d(the_geom_3dm) FROM public.multicurve; +--SELECT 'box3d03', box3d(the_geom_3dz) FROM public.multicurve; +--SELECT 'box3d04', box3d(the_geom_4d) FROM public.multicurve; +-- TODO: ST_SnapToGrid is required to remove platform dependent precision +-- issues. Until ST_SnapToGrid is updated to work against curves, these +-- tests cannot be run. +--SELECT 'ST_LineToCurve01', ST_Asewkt(ST_LineToCurve(ST_CurveToLine(the_geom_2d))) FROM public.multicurve; +--SELECT 'ST_LineToCurve02', ST_Asewkt(ST_LineToCurve(ST_CurveToLine(the_geom_3dm))) FROM public.multicurve; +--SELECT 'ST_LineToCurve03', ST_Asewkt(ST_LineToCurve(ST_CurveToLine(the_geom_3dz))) FROM public.multicurve; +--SELECT 'ST_LineToCurve04', ST_Asewkt(ST_LineToCurve(ST_CurveToLine(the_geom_4d))) FROM public.multicurve; + +-- Repeat all tests with the new function names. +SELECT 'astext01', ST_astext(the_geom_2d) FROM public.multicurve; +SELECT 'astext02', ST_astext(the_geom_3dm) FROM public.multicurve; +SELECT 'astext03', ST_astext(the_geom_3dz) FROM public.multicurve; +SELECT 'astext04', ST_astext(the_geom_4d) FROM public.multicurve; + +SELECT 'asewkt01', ST_asewkt(the_geom_2d) FROM public.multicurve; +SELECT 'asewkt02', ST_asewkt(the_geom_3dm) FROM public.multicurve; +SELECT 'asewkt03', ST_asewkt(the_geom_3dz) FROM public.multicurve; +SELECT 'asewkt04', ST_asewkt(the_geom_4d) FROM public.multicurve; + +-- These tests will fail on different architectures +-- We need a way to handle multiple byte orderings +--SELECT 'asbinary01', encode(ST_asbinary(the_geom_2d), 'hex') FROM public.multicurve; +--SELECT 'asbinary02', encode(ST_asbinary(the_geom_3dm), 'hex') FROM public.multicurve; +--SELECT 'asbinary03', encode(ST_asbinary(the_geom_3dz), 'hex') FROM public.multicurve; +--SELECT 'asbinary04', encode(ST_asbinary(the_geom_4d), 'hex') FROM public.multicurve; +-- +--SELECT 'asewkb01', encode(ST_asewkb(the_geom_2d), 'hex') FROM public.multicurve; +--SELECT 'asewkb02', encode(ST_asewkb(the_geom_3dm), 'hex') FROM public.multicurve; +--SELECT 'asewkb03', encode(ST_asewkb(the_geom_3dz), 'hex') FROM public.multicurve; +--SELECT 'asewkb04', encode(ST_asewkb(the_geom_4d), 'hex') FROM public.multicurve; + +-- Removed due to descrepencies between hardware +--SELECT 'box2d01', ST_box2d(the_geom_2d) FROM public.multicurve; +--SELECT 'box2d02', ST_box2d(the_geom_3dm) FROM public.multicurve; +--SELECT 'box2d03', ST_box2d(the_geom_3dz) FROM public.multicurve; +--SELECT 'box2d04', ST_box2d(the_geom_4d) FROM public.multicurve; + +--SELECT 'box3d01', ST_box3d(the_geom_2d) FROM public.multicurve; +--SELECT 'box3d02', ST_box3d(the_geom_3dm) FROM public.multicurve; +--SELECT 'box3d03', ST_box3d(the_geom_3dz) FROM public.multicurve; +--SELECT 'box3d04', ST_box3d(the_geom_4d) FROM public.multicurve; + +SELECT 'isValid01', ST_isValid(the_geom_2d) FROM public.multicurve; +SELECT 'isValid02', ST_isValid(the_geom_3dm) FROM public.multicurve; +SELECT 'isValid03', ST_isValid(the_geom_3dz) FROM public.multicurve; +SELECT 'isValid04', ST_isValid(the_geom_4d) FROM public.multicurve; + +SELECT 'dimension01', ST_dimension(the_geom_2d) FROM public.multicurve; +SELECT 'dimension02', ST_dimension(the_geom_3dm) FROM public.multicurve; +SELECT 'dimension03', ST_dimension(the_geom_3dz) FROM public.multicurve; +SELECT 'dimension04', ST_dimension(the_geom_4d) FROM public.multicurve; + +SELECT 'numGeometries01', ST_numGeometries(the_geom_2d) FROM public.multicurve; +SELECT 'numGeometries02', ST_numGeometries(the_geom_3dm) FROM public.multicurve; +SELECT 'numGeometries03', ST_numGeometries(the_geom_3dz) FROM public.multicurve; +SELECT 'numGeometries04', ST_numGeometries(the_geom_4d) FROM public.multicurve; + +SELECT 'geometryN-201', ST_asEWKT(ST_geometryN(the_geom_2d, 2)) FROM public.multicurve; +SELECT 'geometryN-202', ST_asEWKT(ST_geometryN(the_geom_3dm, 2)) FROM public.multicurve; +SELECT 'geometryN-203', ST_asEWKT(ST_geometryN(the_geom_3dz, 2)) FROM public.multicurve; +SELECT 'geometryN-204', ST_asEWKT(ST_geometryN(the_geom_4d, 2)) FROM public.multicurve; + +SELECT 'geometryN-301', (ST_asEWKT(ST_geometryN(the_geom_2d, 3)) is null) FROM public.multicurve; +SELECT 'geometryN-302', (ST_asEWKT(ST_geometryN(the_geom_3dm, 3)) is null) FROM public.multicurve; +SELECT 'geometryN-303', (ST_asEWKT(ST_geometryN(the_geom_3dz, 3)) is null) FROM public.multicurve; +SELECT 'geometryN-304', (ST_asEWKT(ST_geometryN(the_geom_4d, 3)) is null) FROM public.multicurve; + +SELECT DropGeometryColumn('public', 'multicurve', 'the_geom_2d'); +SELECT DropGeometryColumn('public', 'multicurve', 'the_geom_3dm'); +SELECT DropGeometryColumn('public', 'multicurve', 'the_geom_3dz'); +SELECT DropGeometryColumn('public', 'multicurve', 'the_geom_4d'); +DROP TABLE public.multicurve; + diff -Nru postgis-1.5.3/regress/sql-mm-multicurve_expected postgis-2.0.1/regress/sql-mm-multicurve_expected --- postgis-1.5.3/regress/sql-mm-multicurve_expected 2010-12-14 13:14:14.000000000 +0000 +++ postgis-2.0.1/regress/sql-mm-multicurve_expected 2012-02-27 22:08:12.000000000 +0000 @@ -6,26 +6,6 @@ geometrytype03|MULTICURVEM ndims04|2 geometrytype04|MULTICURVE -ndims01|4 -geometrytype01|MULTICURVE -ndims02|3 -geometrytype02|MULTICURVE -ndims03|3 -geometrytype03|MULTICURVEM -ndims04|2 -geometrytype04|MULTICURVE -public.multicurve.the_geom_2d SRID:-1 TYPE:MULTICURVE DIMS:2 -public.multicurve.the_geom_3dm SRID:-1 TYPE:MULTICURVEM DIMS:3 -public.multicurve.the_geom_3dz SRID:-1 TYPE:MULTICURVE DIMS:3 -public.multicurve.the_geom_4d SRID:-1 TYPE:MULTICURVE DIMS:4 -astext01|MULTICURVE((5 5,3 5,3 3,0 3),CIRCULARSTRING(0 0,0.267949192431123 1,0.585786437626905 1.4142135623731)) -astext02|MULTICURVE((5 5,3 5,3 3,0 3),CIRCULARSTRING(0 0,0.267949192431123 1,0.585786437626905 1.4142135623731)) -astext03|MULTICURVE((5 5,3 5,3 3,0 3),CIRCULARSTRING(0 0,0.267949192431123 1,0.585786437626905 1.4142135623731)) -astext04|MULTICURVE((5 5,3 5,3 3,0 3),CIRCULARSTRING(0 0,0.267949192431123 1,0.585786437626905 1.4142135623731)) -asewkt01|MULTICURVE((5 5,3 5,3 3,0 3),CIRCULARSTRING(0 0,0.267949192431123 1,0.585786437626905 1.4142135623731)) -asewkt02|MULTICURVEM((5 5 3,3 5 2,3 3 1,0 3 1),CIRCULARSTRING(0 0 0,0.267949192431123 1 -2,0.585786437626905 1.4142135623731 2)) -asewkt03|MULTICURVE((5 5 1,3 5 2,3 3 3,0 3 1),CIRCULARSTRING(0 0 0,0.267949192431123 1 3,0.585786437626905 1.4142135623731 1)) -asewkt04|MULTICURVE((5 5 1 3,3 5 2 2,3 3 3 1,0 3 1 1),CIRCULARSTRING(0 0 0 0,0.267949192431123 1 3 -2,0.585786437626905 1.4142135623731 1 2)) ST_CurveToLine-201|MULTILINESTRING((5 5,3 5,3 3,0 3),(0 0,0.58578644 1.41421356)) ST_CurveToLine-202|MULTILINESTRINGM((5 5 3,3 5 2,3 3 1,0 3 1),(0 0 0,0.58578644 1.41421356 2)) ST_CurveToLine-203|MULTILINESTRING((5 5 1,3 5 2,3 3 3,0 3 1),(0 0 0,0.58578644 1.41421356 1)) @@ -38,32 +18,12 @@ ST_CurveToLine02|MULTILINESTRINGM((5 5 3,3 5 2,3 3 1,0 3 1),(0 0 0,0.00240909 0.09813535 -0.1875,0.00963055 0.19603428 -0.375,0.02164698 0.29346095 -0.5625,0.03842944 0.39018064 -0.75,0.05993749 0.48596036 -0.9375,0.08611933 0.58056935 -1.125,0.11691187 0.67377971 -1.3125,0.15224093 0.76536686 -1.5,0.19202141 0.85511019 -1.6875,0.23615747 0.94279347 -1.875,0.28454278 1.02820549 -1.75,0.33706078 1.11114047 -1,0.39358494 1.19139861 -0.25,0.45397909 1.26878657 0.5,0.51809775 1.34311791 1.25,0.58578644 1.41421356 2)) ST_CurveToLine03|MULTILINESTRING((5 5 1,3 5 2,3 3 3,0 3 1),(0 0 0,0.00240909 0.09813535 0.28125,0.00963055 0.19603428 0.5625,0.02164698 0.29346095 0.84375,0.03842944 0.39018064 1.125,0.05993749 0.48596036 1.40625,0.08611933 0.58056935 1.6875,0.11691187 0.67377971 1.96875,0.15224093 0.76536686 2.25,0.19202141 0.85511019 2.53125,0.23615747 0.94279347 2.8125,0.28454278 1.02820549 2.875,0.33706078 1.11114047 2.5,0.39358494 1.19139861 2.125,0.45397909 1.26878657 1.75,0.51809775 1.34311791 1.375,0.58578644 1.41421356 1)) ST_CurveToLine04|MULTILINESTRING((5 5 1 3,3 5 2 2,3 3 3 1,0 3 1 1),(0 0 0 0,0.00240909 0.09813535 0.28125 -0.1875,0.00963055 0.19603428 0.5625 -0.375,0.02164698 0.29346095 0.84375 -0.5625,0.03842944 0.39018064 1.125 -0.75,0.05993749 0.48596036 1.40625 -0.9375,0.08611933 0.58056935 1.6875 -1.125,0.11691187 0.67377971 1.96875 -1.3125,0.15224093 0.76536686 2.25 -1.5,0.19202141 0.85511019 2.53125 -1.6875,0.23615747 0.94279347 2.8125 -1.875,0.28454278 1.02820549 2.875 -1.75,0.33706078 1.11114047 2.5 -1,0.39358494 1.19139861 2.125 -0.25,0.45397909 1.26878657 1.75 0.5,0.51809775 1.34311791 1.375 1.25,0.58578644 1.41421356 1 2)) -ERROR: Exception in LWGEOM2GEOS: curved geometry not supported. -ERROR: Exception in LWGEOM2GEOS: curved geometry not supported. -ERROR: Exception in LWGEOM2GEOS: curved geometry not supported. -ERROR: Exception in LWGEOM2GEOS: curved geometry not supported. -dimension01|1 -dimension02|1 -dimension03|1 -dimension04|1 -numGeometries01|2 -numGeometries02|2 -numGeometries03|2 -numGeometries04|2 -geometryN-201|CIRCULARSTRING(0 0,0.267949192431123 1,0.585786437626905 1.4142135623731) -geometryN-202|CIRCULARSTRINGM(0 0 0,0.267949192431123 1 -2,0.585786437626905 1.4142135623731 2) -geometryN-203|CIRCULARSTRING(0 0 0,0.267949192431123 1 3,0.585786437626905 1.4142135623731 1) -geometryN-204|CIRCULARSTRING(0 0 0 0,0.267949192431123 1 3 -2,0.585786437626905 1.4142135623731 1 2) -geometryN-301|t -geometryN-302|t -geometryN-303|t -geometryN-304|t astext01|MULTICURVE((5 5,3 5,3 3,0 3),CIRCULARSTRING(0 0,0.267949192431123 1,0.585786437626905 1.4142135623731)) -astext02|MULTICURVE((5 5,3 5,3 3,0 3),CIRCULARSTRING(0 0,0.267949192431123 1,0.585786437626905 1.4142135623731)) -astext03|MULTICURVE((5 5,3 5,3 3,0 3),CIRCULARSTRING(0 0,0.267949192431123 1,0.585786437626905 1.4142135623731)) -astext04|MULTICURVE((5 5,3 5,3 3,0 3),CIRCULARSTRING(0 0,0.267949192431123 1,0.585786437626905 1.4142135623731)) +astext02|MULTICURVE M ((5 5 3,3 5 2,3 3 1,0 3 1),CIRCULARSTRING M (0 0 0,0.267949192431123 1 -2,0.585786437626905 1.4142135623731 2)) +astext03|MULTICURVE Z ((5 5 1,3 5 2,3 3 3,0 3 1),CIRCULARSTRING Z (0 0 0,0.267949192431123 1 3,0.585786437626905 1.4142135623731 1)) +astext04|MULTICURVE ZM ((5 5 1 3,3 5 2 2,3 3 3 1,0 3 1 1),CIRCULARSTRING ZM (0 0 0 0,0.267949192431123 1 3 -2,0.585786437626905 1.4142135623731 1 2)) asewkt01|MULTICURVE((5 5,3 5,3 3,0 3),CIRCULARSTRING(0 0,0.267949192431123 1,0.585786437626905 1.4142135623731)) -asewkt02|MULTICURVEM((5 5 3,3 5 2,3 3 1,0 3 1),CIRCULARSTRING(0 0 0,0.267949192431123 1 -2,0.585786437626905 1.4142135623731 2)) +asewkt02|MULTICURVEM((5 5 3,3 5 2,3 3 1,0 3 1),CIRCULARSTRINGM(0 0 0,0.267949192431123 1 -2,0.585786437626905 1.4142135623731 2)) asewkt03|MULTICURVE((5 5 1,3 5 2,3 3 3,0 3 1),CIRCULARSTRING(0 0 0,0.267949192431123 1 3,0.585786437626905 1.4142135623731 1)) asewkt04|MULTICURVE((5 5 1 3,3 5 2 2,3 3 3 1,0 3 1 1),CIRCULARSTRING(0 0 0 0,0.267949192431123 1 3 -2,0.585786437626905 1.4142135623731 1 2)) ERROR: Exception in LWGEOM2GEOS: curved geometry not supported. diff -Nru postgis-1.5.3/regress/sql-mm-multisurface.sql postgis-2.0.1/regress/sql-mm-multisurface.sql --- postgis-1.5.3/regress/sql-mm-multisurface.sql 2007-08-09 16:56:37.000000000 +0000 +++ postgis-2.0.1/regress/sql-mm-multisurface.sql 2012-02-27 22:08:12.000000000 +0000 @@ -1,558 +1,351 @@ -SELECT 'ndims01', ndims(geomfromewkt('MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING( - -2 0 0 0, - -1 -1 1 2, - 0 0 2 4, - 1 -1 3 6, - 2 0 4 8, - 0 2 2 4, - -2 0 0 0), - (-1 0 1 2, - 0 0.5 2 4, - 1 0 3 6, - 0 1 3 4, - -1 0 1 2)), - ((7 8 7 8, - 10 10 5 5, - 6 14 3 1, - 4 11 4 6, - 7 8 7 8)))')); -SELECT 'geometrytype01', geometrytype(geomfromewkt('MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING( - -2 0 0 0, - -1 -1 1 2, - 0 0 2 4, - 1 -1 3 6, - 2 0 4 8, - 0 2 2 4, - -2 0 0 0), - (-1 0 1 2, - 0 0.5 2 4, - 1 0 3 6, - 0 1 3 4, - -1 0 1 2)), - ((7 8 7 8, - 10 10 5 5, - 6 14 3 1, - 4 11 4 6, - 7 8 7 8), - (9 9 7 8, - 8 12 7 8, - 7 10 7 8, - 9 9 7 8)))')); -SELECT 'ndims02', ndims(geomfromewkt('MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING( - -2 0 0, - -1 -1 1, - 0 0 2, - 1 -1 3, - 2 0 4, - 0 2 2, - -2 0 0), - (-1 0 1, - 0 0.5 2, - 1 0 3, - 0 1 3, - -1 0 1)), - ((7 8 7, - 10 10 5, - 6 14 3, - 4 11 4, - 7 8 7), - (9 9 7, - 8 12 7, - 7 10 7, - 9 9 7)))')); -SELECT 'geometrytype02', geometrytype(geomfromewkt('MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING( - -2 0 0, - -1 -1 1, - 0 0 2, - 1 -1 3, - 2 0 4, - 0 2 2, - -2 0 0), - (-1 0 1, - 0 0.5 2, - 1 0 3, - 0 1 3, - -1 0 1)), - ((7 8 7, - 10 10 5, - 6 14 3, - 4 11 4, - 7 8 7), - (9 9 7, - 8 12 7, - 7 10 7, - 9 9 7)))')); -SELECT 'ndims03', ndims(geomfromewkt('MULTISURFACEM(CURVEPOLYGON(CIRCULARSTRING( - -2 0 0, - -1 -1 2, - 0 0 4, - 1 -1 6, - 2 0 8, - 0 2 4, - -2 0 0), - (-1 0 2, - 0 0.5 4, - 1 0 6, - 0 1 4, - -1 0 2)), - ((7 8 8, - 10 10 5, - 6 14 1, - 4 11 6, - 7 8 8), - (9 9 8, - 8 12 8, - 7 10 8, - 9 9 8)))')); -SELECT 'geometrytype03', geometrytype(geomfromewkt('MULTISURFACEM(CURVEPOLYGON(CIRCULARSTRING( - -2 0 0, - -1 -1 2, - 0 0 4, - 1 -1 6, - 2 0 8, - 0 2 4, - -2 0 0), - (-1 0 2, - 0 0.5 4, - 1 0 6, - 0 1 4, - -1 0 2)), - ((7 8 8, - 10 10 5, - 6 14 1, - 4 11 6, - 7 8 8)))')); -SELECT 'ndims04', ndims(geomfromewkt('MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING( - -2 0, - -1 -1, - 0 0, - 1 -1, - 2 0, - 0 2, - -2 0), - (-1 0, - 0 0.5, - 1 0, - 0 1, - -1 0)), - ((7 8, - 10 10, - 6 14, - 4 11, - 7 8)))')); -SELECT 'geometrytype04', geometrytype(geomfromewkt('MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING( - -2 0, - -1 -1, - 0 0, - 1 -1, - 2 0, - 0 2, - -2 0), - (-1 0, - 0 0.5, - 1 0, - 0 1, - -1 0)), - ((7 8, - 10 10, - 6 14, - 4 11, - 7 8)))')); - --- Repeat these tests with the new function names. -SELECT 'ndims01', ST_ndims(ST_geomfromewkt('MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING( - -2 0 0 0, - -1 -1 1 2, - 0 0 2 4, - 1 -1 3 6, - 2 0 4 8, - 0 2 2 4, - -2 0 0 0), - (-1 0 1 2, - 0 0.5 2 4, - 1 0 3 6, - 0 1 3 4, - -1 0 1 2)), - ((7 8 7 8, - 10 10 5 5, - 6 14 3 1, - 4 11 4 6, - 7 8 7 8)))')); -SELECT 'geometrytype01', geometrytype(ST_geomfromewkt('MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING( - -2 0 0 0, - -1 -1 1 2, - 0 0 2 4, - 1 -1 3 6, - 2 0 4 8, - 0 2 2 4, - -2 0 0 0), - (-1 0 1 2, - 0 0.5 2 4, - 1 0 3 6, - 0 1 3 4, - -1 0 1 2)), - ((7 8 7 8, - 10 10 5 5, - 6 14 3 1, - 4 11 4 6, - 7 8 7 8), - (9 9 7 8, - 8 12 7 8, - 7 10 7 8, - 9 9 7 8)))')); -SELECT 'ndims02', ST_ndims(ST_geomfromewkt('MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING( - -2 0 0, - -1 -1 1, - 0 0 2, - 1 -1 3, - 2 0 4, - 0 2 2, - -2 0 0), - (-1 0 1, - 0 0.5 2, - 1 0 3, - 0 1 3, - -1 0 1)), - ((7 8 7, - 10 10 5, - 6 14 3, - 4 11 4, - 7 8 7), - (9 9 7, - 8 12 7, - 7 10 7, - 9 9 7)))')); -SELECT 'geometrytype02', geometrytype(ST_geomfromewkt('MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING( - -2 0 0, - -1 -1 1, - 0 0 2, - 1 -1 3, - 2 0 4, - 0 2 2, - -2 0 0), - (-1 0 1, - 0 0.5 2, - 1 0 3, - 0 1 3, - -1 0 1)), - ((7 8 7, - 10 10 5, - 6 14 3, - 4 11 4, - 7 8 7), - (9 9 7, - 8 12 7, - 7 10 7, - 9 9 7)))')); -SELECT 'ndims03', ST_ndims(ST_geomfromewkt('MULTISURFACEM(CURVEPOLYGON(CIRCULARSTRING( - -2 0 0, - -1 -1 2, - 0 0 4, - 1 -1 6, - 2 0 8, - 0 2 4, - -2 0 0), - (-1 0 2, - 0 0.5 4, - 1 0 6, - 0 1 4, - -1 0 2)), - ((7 8 8, - 10 10 5, - 6 14 1, - 4 11 6, - 7 8 8), - (9 9 8, - 8 12 8, - 7 10 8, - 9 9 8)))')); -SELECT 'geometrytype03', geometrytype(ST_geomfromewkt('MULTISURFACEM(CURVEPOLYGON(CIRCULARSTRING( - -2 0 0, - -1 -1 2, - 0 0 4, - 1 -1 6, - 2 0 8, - 0 2 4, - -2 0 0), - (-1 0 2, - 0 0.5 4, - 1 0 6, - 0 1 4, - -1 0 2)), - ((7 8 8, - 10 10 5, - 6 14 1, - 4 11 6, - 7 8 8)))')); -SELECT 'ndims04', ST_ndims(ST_geomfromewkt('MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING( - -2 0, - -1 -1, - 0 0, - 1 -1, - 2 0, - 0 2, - -2 0), - (-1 0, - 0 0.5, - 1 0, - 0 1, - -1 0)), - ((7 8, - 10 10, - 6 14, - 4 11, - 7 8)))')); -SELECT 'geometrytype04', geometrytype(ST_geomfromewkt('MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING( - -2 0, - -1 -1, - 0 0, - 1 -1, - 2 0, - 0 2, - -2 0), - (-1 0, - 0 0.5, - 1 0, - 0 1, - -1 0)), - ((7 8, - 10 10, - 6 14, - 4 11, - 7 8)))')); - -CREATE TABLE public.multisurface (id INTEGER, description VARCHAR); -SELECT AddGeometryColumn('public', 'multisurface', 'the_geom_2d', -1, 'MULTISURFACE', 2); -SELECT AddGeometryColumn('public', 'multisurface', 'the_geom_3dm', -1, 'MULTISURFACEM', 3); -SELECT AddGeometryColumn('public', 'multisurface', 'the_geom_3dz', -1, 'MULTISURFACE', 3); -SELECT AddGeometryColumn('public', 'multisurface', 'the_geom_4d', -1, 'MULTISURFACE', 4); - -INSERT INTO public.multisurface ( - id, description - ) VALUES ( - 1, 'multisurface'); -UPDATE public.multisurface - SET the_geom_4d = ST_geomfromewkt('MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING( - -2 0 0 0, - -1 -1 1 2, - 0 0 2 4, - 1 -1 3 6, - 2 0 4 8, - 0 2 2 4, - -2 0 0 0), - (-1 0 1 2, - 0 0.5 2 4, - 1 0 3 6, - 0 1 3 4, - -1 0 1 2)), - ((7 8 7 8, - 10 10 5 5, - 6 14 3 1, - 4 11 4 6, - 7 8 7 8)))') - WHERE id = 1; -UPDATE public.multisurface - SET the_geom_3dz = ST_geomfromewkt('MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING( - -2 0 0, - -1 -1 1, - 0 0 2, - 1 -1 3, - 2 0 4, - 0 2 2, - -2 0 0), - (-1 0 1, - 0 0.5 2, - 1 0 3, - 0 1 3, - -1 0 1)), - ((7 8 7, - 10 10 5, - 6 14 3, - 4 11 4, - 7 8 7)))') - WHERE id = 1; -UPDATE public.multisurface - SET the_geom_3dm = ST_geomfromewkt('MULTISURFACEM(CURVEPOLYGON(CIRCULARSTRING( - -2 0 0, - -1 -1 2, - 0 0 4, - 1 -1 6, - 2 0 8, - 0 2 4, - -2 0 0), - (-1 0 2, - 0 0.5 4, - 1 0 6, - 0 1 4, - -1 0 2)), - ((7 8 8, - 10 10 5, - 6 14 1, - 4 11 6, - 7 8 8)))') - WHERE id = 1; -UPDATE public.multisurface - SET the_geom_2d = ST_geomfromewkt('MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING( - -2 0, - -1 -1, - 0 0, - 1 -1, - 2 0, - 0 2, - -2 0), - (-1 0, - 0 0.5, - 1 0, - 0 1, - -1 0)), - ((7 8, - 10 10, - 6 14, - 4 11, - 7 8)))') - WHERE id = 1; - -SELECT 'astext01', astext(the_geom_2d) FROM public.multisurface; -SELECT 'astext02', astext(the_geom_3dm) FROM public.multisurface; -SELECT 'astext03', astext(the_geom_3dz) FROM public.multisurface; -SELECT 'astext04', astext(the_geom_4d) FROM public.multisurface; - -SELECT 'asewkt01', asewkt(the_geom_2d) FROM public.multisurface; -SELECT 'asewkt02', asewkt(the_geom_3dm) FROM public.multisurface; -SELECT 'asewkt03', asewkt(the_geom_3dz) FROM public.multisurface; -SELECT 'asewkt04', asewkt(the_geom_4d) FROM public.multisurface; - --- These tests will fail on different architectures --- We need a way to handle multiple byte orderings ---SELECT 'asbinary01', encode(asbinary(the_geom_2d), 'hex') FROM public.multisurface; ---SELECT 'asbinary02', encode(asbinary(the_geom_3dm), 'hex') FROM public.multisurface; ---SELECT 'asbinary03', encode(asbinary(the_geom_3dz), 'hex') FROM public.multisurface; ---SELECT 'asbinary04', encode(asbinary(the_geom_4d), 'hex') FROM public.multisurface; --- ---SELECT 'asewkb01', encode(asewkb(the_geom_2d), 'hex') FROM public.multisurface; ---SELECT 'asewkb02', encode(asewkb(the_geom_3dm), 'hex') FROM public.multisurface; ---SELECT 'asewkb03', encode(asewkb(the_geom_3dz), 'hex') FROM public.multisurface; ---SELECT 'asewkb04', encode(asewkb(the_geom_4d), 'hex') FROM public.multisurface; - -SELECT 'ST_CurveToLine-201', asewkt(snapToGrid(ST_CurveToLine(the_geom_2d, 2), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multisurface; -SELECT 'ST_CurveToLine-202', asewkt(snapToGrid(ST_CurveToLine(the_geom_3dm, 2), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multisurface; -SELECT 'ST_CurveToLine-203', asewkt(snapToGrid(ST_CurveToLine(the_geom_3dz, 2), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multisurface; -SELECT 'ST_CurveToLine-204', asewkt(snapToGrid(ST_CurveToLine(the_geom_4d, 2), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multisurface; - -SELECT 'ST_CurveToLine-401', asewkt(snapToGrid(ST_CurveToLine(the_geom_2d, 4), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multisurface; -SELECT 'ST_CurveToLine-402', asewkt(snapToGrid(ST_CurveToLine(the_geom_3dm, 4), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multisurface; -SELECT 'ST_CurveToLine-403', asewkt(snapToGrid(ST_CurveToLine(the_geom_3dz, 4), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multisurface; -SELECT 'ST_CurveToLine-404', asewkt(snapToGrid(ST_CurveToLine(the_geom_4d, 4), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multisurface; - -SELECT 'ST_CurveToLine01', asewkt(snapToGrid(ST_CurveToLine(the_geom_2d), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multisurface; -SELECT 'ST_CurveToLine02', asewkt(snapToGrid(ST_CurveToLine(the_geom_3dm), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multisurface; -SELECT 'ST_CurveToLine03', asewkt(snapToGrid(ST_CurveToLine(the_geom_3dz), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multisurface; -SELECT 'ST_CurveToLine04', asewkt(snapToGrid(ST_CurveToLine(the_geom_4d), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multisurface; - -SELECT 'box2d01', box2d(the_geom_2d) FROM public.multisurface; -SELECT 'box2d02', box2d(the_geom_3dm) FROM public.multisurface; -SELECT 'box2d03', box2d(the_geom_3dz) FROM public.multisurface; -SELECT 'box2d04', box2d(the_geom_4d) FROM public.multisurface; - -SELECT 'box3d01', box3d(the_geom_2d) FROM public.multisurface; -SELECT 'box3d02', box3d(the_geom_3dm) FROM public.multisurface; -SELECT 'box3d03', box3d(the_geom_3dz) FROM public.multisurface; -SELECT 'box3d04', box3d(the_geom_4d) FROM public.multisurface; - -SELECT 'isValid01', isValid(the_geom_2d) FROM public.multisurface; -SELECT 'isValid02', isValid(the_geom_3dm) FROM public.multisurface; -SELECT 'isValid03', isValid(the_geom_3dz) FROM public.multisurface; -SELECT 'isValid04', isValid(the_geom_4d) FROM public.multisurface; - -SELECT 'dimension01', dimension(the_geom_2d) FROM public.multisurface; -SELECT 'dimension02', dimension(the_geom_3dm) FROM public.multisurface; -SELECT 'dimension03', dimension(the_geom_3dz) FROM public.multisurface; -SELECT 'dimension04', dimension(the_geom_4d) FROM public.multisurface; - -SELECT 'numGeometries01', numGeometries(the_geom_2d) FROM public.multisurface; -SELECT 'numGeometries02', numGeometries(the_geom_3dm) FROM public.multisurface; -SELECT 'numGeometries03', numGeometries(the_geom_3dz) FROM public.multisurface; -SELECT 'numGeometries04', numGeometries(the_geom_4d) FROM public.multisurface; - -SELECT 'geometryN-201', asEWKT(geometryN(the_geom_2d, 2)) FROM public.multisurface; -SELECT 'geometryN-202', asEWKT(geometryN(the_geom_3dm, 2)) FROM public.multisurface; -SELECT 'geometryN-203', asEWKT(geometryN(the_geom_3dz, 2)) FROM public.multisurface; -SELECT 'geometryN-204', asEWKT(geometryN(the_geom_4d, 2)) FROM public.multisurface; - -SELECT 'geometryN-301', (geometryN(the_geom_2d, 3) is null) FROM public.multisurface; -SELECT 'geometryN-302', (geometryN(the_geom_3dm, 3) is null) FROM public.multisurface; -SELECT 'geometryN-303', (geometryN(the_geom_3dz, 3) is null) FROM public.multisurface; -SELECT 'geometryN-304', (geometryN(the_geom_4d, 3) is null) FROM public.multisurface; - --- TODO: ST_SnapToGrid is required to remove platform dependent precision --- issues. Until ST_SnapToGrid is updated to work against curves, these --- tests cannot be run. ---SELECT 'ST_LineToCurve01', asewkt(ST_LineToCurve(ST_CurveToLine(the_geom_2d))) FROM public.multisurface; ---SELECT 'ST_LineToCurve02', asewkt(ST_LineToCurve(ST_CurveToLine(the_geom_3dm))) FROM public.multisurface; ---SELECT 'ST_LineToCurve03', asewkt(ST_LineToCurve(ST_CurveToLine(the_geom_3dz))) FROM public.multisurface; ---SELECT 'ST_LineToCurve04', asewkt(ST_LineToCurve(ST_CurveToLine(the_geom_4d))) FROM public.multisurface; - --- Repeat tests with new function names. -SELECT 'astext01', ST_astext(the_geom_2d) FROM public.multisurface; -SELECT 'astext02', ST_astext(the_geom_3dm) FROM public.multisurface; -SELECT 'astext03', ST_astext(the_geom_3dz) FROM public.multisurface; -SELECT 'astext04', ST_astext(the_geom_4d) FROM public.multisurface; - -SELECT 'asewkt01', ST_asewkt(the_geom_2d) FROM public.multisurface; -SELECT 'asewkt02', ST_asewkt(the_geom_3dm) FROM public.multisurface; -SELECT 'asewkt03', ST_asewkt(the_geom_3dz) FROM public.multisurface; -SELECT 'asewkt04', ST_asewkt(the_geom_4d) FROM public.multisurface; - --- These tests will fail on different architectures --- We need a way to handle multiple byte orderings ---SELECT 'asbinary01', encode(ST_asbinary(the_geom_2d), 'hex') FROM public.multisurface; ---SELECT 'asbinary02', encode(ST_asbinary(the_geom_3dm), 'hex') FROM public.multisurface; ---SELECT 'asbinary03', encode(ST_asbinary(the_geom_3dz), 'hex') FROM public.multisurface; ---SELECT 'asbinary04', encode(ST_asbinary(the_geom_4d), 'hex') FROM public.multisurface; --- ---SELECT 'asewkb01', encode(ST_asewkb(the_geom_2d), 'hex') FROM public.multisurface; ---SELECT 'asewkb02', encode(ST_asewkb(the_geom_3dm), 'hex') FROM public.multisurface; ---SELECT 'asewkb03', encode(ST_asewkb(the_geom_3dz), 'hex') FROM public.multisurface; ---SELECT 'asewkb04', encode(ST_asewkb(the_geom_4d), 'hex') FROM public.multisurface; - -SELECT 'box2d01', ST_box2d(the_geom_2d) FROM public.multisurface; -SELECT 'box2d02', ST_box2d(the_geom_3dm) FROM public.multisurface; -SELECT 'box2d03', ST_box2d(the_geom_3dz) FROM public.multisurface; -SELECT 'box2d04', ST_box2d(the_geom_4d) FROM public.multisurface; - -SELECT 'box3d01', ST_box3d(the_geom_2d) FROM public.multisurface; -SELECT 'box3d02', ST_box3d(the_geom_3dm) FROM public.multisurface; -SELECT 'box3d03', ST_box3d(the_geom_3dz) FROM public.multisurface; -SELECT 'box3d04', ST_box3d(the_geom_4d) FROM public.multisurface; - -SELECT 'isValid01', ST_isValid(the_geom_2d) FROM public.multisurface; -SELECT 'isValid02', ST_isValid(the_geom_3dm) FROM public.multisurface; -SELECT 'isValid03', ST_isValid(the_geom_3dz) FROM public.multisurface; -SELECT 'isValid04', ST_isValid(the_geom_4d) FROM public.multisurface; - -SELECT 'dimension01', ST_dimension(the_geom_2d) FROM public.multisurface; -SELECT 'dimension02', ST_dimension(the_geom_3dm) FROM public.multisurface; -SELECT 'dimension03', ST_dimension(the_geom_3dz) FROM public.multisurface; -SELECT 'dimension04', ST_dimension(the_geom_4d) FROM public.multisurface; - -SELECT 'numGeometries01', ST_numGeometries(the_geom_2d) FROM public.multisurface; -SELECT 'numGeometries02', ST_numGeometries(the_geom_3dm) FROM public.multisurface; -SELECT 'numGeometries03', ST_numGeometries(the_geom_3dz) FROM public.multisurface; -SELECT 'numGeometries04', ST_numGeometries(the_geom_4d) FROM public.multisurface; - -SELECT 'geometryN-201', ST_asEWKT(ST_geometryN(the_geom_2d, 2)) FROM public.multisurface; -SELECT 'geometryN-202', ST_asEWKT(ST_geometryN(the_geom_3dm, 2)) FROM public.multisurface; -SELECT 'geometryN-203', ST_asEWKT(ST_geometryN(the_geom_3dz, 2)) FROM public.multisurface; -SELECT 'geometryN-204', ST_asEWKT(ST_geometryN(the_geom_4d, 2)) FROM public.multisurface; - -SELECT 'geometryN-301', (ST_geometryN(the_geom_2d, 3) is null) FROM public.multisurface; -SELECT 'geometryN-302', (ST_geometryN(the_geom_3dm, 3) is null) FROM public.multisurface; -SELECT 'geometryN-303', (ST_geometryN(the_geom_3dz, 3) is null) FROM public.multisurface; -SELECT 'geometryN-304', (ST_geometryN(the_geom_4d, 3) is null) FROM public.multisurface; - -SELECT DropGeometryColumn('public', 'multisurface', 'the_geom_2d'); -SELECT DropGeometryColumn('public', 'multisurface', 'the_geom_3dm'); -SELECT DropGeometryColumn('public', 'multisurface', 'the_geom_3dz'); -SELECT DropGeometryColumn('public', 'multisurface', 'the_geom_4d'); -DROP TABLE public.multisurface; - +-- Repeat these tests with the new function names. +SELECT 'ndims01', ST_ndims(ST_geomfromewkt('MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING( + -2 0 0 0, + -1 -1 1 2, + 0 0 2 4, + 1 -1 3 6, + 2 0 4 8, + 0 2 2 4, + -2 0 0 0), + (-1 0 1 2, + 0 0.5 2 4, + 1 0 3 6, + 0 1 3 4, + -1 0 1 2)), + ((7 8 7 8, + 10 10 5 5, + 6 14 3 1, + 4 11 4 6, + 7 8 7 8)))')); +SELECT 'geometrytype01', geometrytype(ST_geomfromewkt('MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING( + -2 0 0 0, + -1 -1 1 2, + 0 0 2 4, + 1 -1 3 6, + 2 0 4 8, + 0 2 2 4, + -2 0 0 0), + (-1 0 1 2, + 0 0.5 2 4, + 1 0 3 6, + 0 1 3 4, + -1 0 1 2)), + ((7 8 7 8, + 10 10 5 5, + 6 14 3 1, + 4 11 4 6, + 7 8 7 8), + (9 9 7 8, + 8 12 7 8, + 7 10 7 8, + 9 9 7 8)))')); +SELECT 'ndims02', ST_ndims(ST_geomfromewkt('MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING( + -2 0 0, + -1 -1 1, + 0 0 2, + 1 -1 3, + 2 0 4, + 0 2 2, + -2 0 0), + (-1 0 1, + 0 0.5 2, + 1 0 3, + 0 1 3, + -1 0 1)), + ((7 8 7, + 10 10 5, + 6 14 3, + 4 11 4, + 7 8 7), + (9 9 7, + 8 12 7, + 7 10 7, + 9 9 7)))')); +SELECT 'geometrytype02', geometrytype(ST_geomfromewkt('MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING( + -2 0 0, + -1 -1 1, + 0 0 2, + 1 -1 3, + 2 0 4, + 0 2 2, + -2 0 0), + (-1 0 1, + 0 0.5 2, + 1 0 3, + 0 1 3, + -1 0 1)), + ((7 8 7, + 10 10 5, + 6 14 3, + 4 11 4, + 7 8 7), + (9 9 7, + 8 12 7, + 7 10 7, + 9 9 7)))')); +SELECT 'ndims03', ST_ndims(ST_geomfromewkt('MULTISURFACEM(CURVEPOLYGON(CIRCULARSTRING( + -2 0 0, + -1 -1 2, + 0 0 4, + 1 -1 6, + 2 0 8, + 0 2 4, + -2 0 0), + (-1 0 2, + 0 0.5 4, + 1 0 6, + 0 1 4, + -1 0 2)), + ((7 8 8, + 10 10 5, + 6 14 1, + 4 11 6, + 7 8 8), + (9 9 8, + 8 12 8, + 7 10 8, + 9 9 8)))')); +SELECT 'geometrytype03', geometrytype(ST_geomfromewkt('MULTISURFACEM(CURVEPOLYGON(CIRCULARSTRING( + -2 0 0, + -1 -1 2, + 0 0 4, + 1 -1 6, + 2 0 8, + 0 2 4, + -2 0 0), + (-1 0 2, + 0 0.5 4, + 1 0 6, + 0 1 4, + -1 0 2)), + ((7 8 8, + 10 10 5, + 6 14 1, + 4 11 6, + 7 8 8)))')); +SELECT 'ndims04', ST_ndims(ST_geomfromewkt('MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING( + -2 0, + -1 -1, + 0 0, + 1 -1, + 2 0, + 0 2, + -2 0), + (-1 0, + 0 0.5, + 1 0, + 0 1, + -1 0)), + ((7 8, + 10 10, + 6 14, + 4 11, + 7 8)))')); +SELECT 'geometrytype04', geometrytype(ST_geomfromewkt('MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING( + -2 0, + -1 -1, + 0 0, + 1 -1, + 2 0, + 0 2, + -2 0), + (-1 0, + 0 0.5, + 1 0, + 0 1, + -1 0)), + ((7 8, + 10 10, + 6 14, + 4 11, + 7 8)))')); + +CREATE TABLE public.multisurface (id INTEGER, description VARCHAR, +the_geom_2d GEOMETRY(MULTISURFACE), +the_geom_3dm GEOMETRY(MULTISURFACEM), +the_geom_3dz GEOMETRY(MULTISURFACEZ), +the_geom_4d GEOMETRY(MULTISURFACEZM)); + +INSERT INTO public.multisurface ( + id, description + ) VALUES ( + 1, 'multisurface'); +UPDATE public.multisurface + SET the_geom_4d = ST_geomfromewkt('MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING( + -2 0 0 0, + -1 -1 1 2, + 0 0 2 4, + 1 -1 3 6, + 2 0 4 8, + 0 2 2 4, + -2 0 0 0), + (-1 0 1 2, + 0 0.5 2 4, + 1 0 3 6, + 0 1 3 4, + -1 0 1 2)), + ((7 8 7 8, + 10 10 5 5, + 6 14 3 1, + 4 11 4 6, + 7 8 7 8)))') + WHERE id = 1; +UPDATE public.multisurface + SET the_geom_3dz = ST_geomfromewkt('MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING( + -2 0 0, + -1 -1 1, + 0 0 2, + 1 -1 3, + 2 0 4, + 0 2 2, + -2 0 0), + (-1 0 1, + 0 0.5 2, + 1 0 3, + 0 1 3, + -1 0 1)), + ((7 8 7, + 10 10 5, + 6 14 3, + 4 11 4, + 7 8 7)))') + WHERE id = 1; +UPDATE public.multisurface + SET the_geom_3dm = ST_geomfromewkt('MULTISURFACEM(CURVEPOLYGON(CIRCULARSTRING( + -2 0 0, + -1 -1 2, + 0 0 4, + 1 -1 6, + 2 0 8, + 0 2 4, + -2 0 0), + (-1 0 2, + 0 0.5 4, + 1 0 6, + 0 1 4, + -1 0 2)), + ((7 8 8, + 10 10 5, + 6 14 1, + 4 11 6, + 7 8 8)))') + WHERE id = 1; +UPDATE public.multisurface + SET the_geom_2d = ST_geomfromewkt('MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING( + -2 0, + -1 -1, + 0 0, + 1 -1, + 2 0, + 0 2, + -2 0), + (-1 0, + 0 0.5, + 1 0, + 0 1, + -1 0)), + ((7 8, + 10 10, + 6 14, + 4 11, + 7 8)))') + WHERE id = 1; +-- These tests will fail on different architectures +-- We need a way to handle multiple byte orderings +--SELECT 'asbinary01', encode(asbinary(the_geom_2d), 'hex') FROM public.multisurface; +--SELECT 'asbinary02', encode(asbinary(the_geom_3dm), 'hex') FROM public.multisurface; +--SELECT 'asbinary03', encode(asbinary(the_geom_3dz), 'hex') FROM public.multisurface; +--SELECT 'asbinary04', encode(asbinary(the_geom_4d), 'hex') FROM public.multisurface; +-- +--SELECT 'asewkb01', encode(asewkb(the_geom_2d), 'hex') FROM public.multisurface; +--SELECT 'asewkb02', encode(asewkb(the_geom_3dm), 'hex') FROM public.multisurface; +--SELECT 'asewkb03', encode(asewkb(the_geom_3dz), 'hex') FROM public.multisurface; +--SELECT 'asewkb04', encode(asewkb(the_geom_4d), 'hex') FROM public.multisurface; + +SELECT 'ST_CurveToLine-201', ST_Asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_2d, 2), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multisurface; +SELECT 'ST_CurveToLine-202', ST_Asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_3dm, 2), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multisurface; +SELECT 'ST_CurveToLine-203', ST_Asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_3dz, 2), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multisurface; +SELECT 'ST_CurveToLine-204', ST_Asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_4d, 2), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multisurface; + +SELECT 'ST_CurveToLine-401', ST_Asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_2d, 4), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multisurface; +SELECT 'ST_CurveToLine-402', ST_Asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_3dm, 4), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multisurface; +SELECT 'ST_CurveToLine-403', ST_Asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_3dz, 4), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multisurface; +SELECT 'ST_CurveToLine-404', ST_Asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_4d, 4), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multisurface; + +SELECT 'ST_CurveToLine01', ST_Asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_2d), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multisurface; +SELECT 'ST_CurveToLine02', ST_Asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_3dm), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multisurface; +SELECT 'ST_CurveToLine03', ST_Asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_3dz), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multisurface; +SELECT 'ST_CurveToLine04', ST_Asewkt(ST_SnapToGrid(ST_CurveToLine(the_geom_4d), 'POINT(0 0 0 0)'::geometry, 1e-8, 1e-8, 1e-8, 1e-8)) FROM public.multisurface; + +-- TODO: ST_SnapToGrid is required to remove platform dependent precision +-- issues. Until ST_SnapToGrid is updated to work against curves, these +-- tests cannot be run. +--SELECT 'ST_LineToCurve01', ST_Asewkt(ST_LineToCurve(ST_CurveToLine(the_geom_2d))) FROM public.multisurface; +--SELECT 'ST_LineToCurve02', ST_Asewkt(ST_LineToCurve(ST_CurveToLine(the_geom_3dm))) FROM public.multisurface; +--SELECT 'ST_LineToCurve03', ST_Asewkt(ST_LineToCurve(ST_CurveToLine(the_geom_3dz))) FROM public.multisurface; +--SELECT 'ST_LineToCurve04', ST_Asewkt(ST_LineToCurve(ST_CurveToLine(the_geom_4d))) FROM public.multisurface; + +-- Repeat tests with new function names. +SELECT 'astext01', ST_astext(the_geom_2d) FROM public.multisurface; +SELECT 'astext02', ST_astext(the_geom_3dm) FROM public.multisurface; +SELECT 'astext03', ST_astext(the_geom_3dz) FROM public.multisurface; +SELECT 'astext04', ST_astext(the_geom_4d) FROM public.multisurface; + +SELECT 'asewkt01', ST_asewkt(the_geom_2d) FROM public.multisurface; +SELECT 'asewkt02', ST_asewkt(the_geom_3dm) FROM public.multisurface; +SELECT 'asewkt03', ST_asewkt(the_geom_3dz) FROM public.multisurface; +SELECT 'asewkt04', ST_asewkt(the_geom_4d) FROM public.multisurface; + +-- These tests will fail on different architectures +-- We need a way to handle multiple byte orderings +--SELECT 'asbinary01', encode(ST_asbinary(the_geom_2d), 'hex') FROM public.multisurface; +--SELECT 'asbinary02', encode(ST_asbinary(the_geom_3dm), 'hex') FROM public.multisurface; +--SELECT 'asbinary03', encode(ST_asbinary(the_geom_3dz), 'hex') FROM public.multisurface; +--SELECT 'asbinary04', encode(ST_asbinary(the_geom_4d), 'hex') FROM public.multisurface; +-- +--SELECT 'asewkb01', encode(ST_asewkb(the_geom_2d), 'hex') FROM public.multisurface; +--SELECT 'asewkb02', encode(ST_asewkb(the_geom_3dm), 'hex') FROM public.multisurface; +--SELECT 'asewkb03', encode(ST_asewkb(the_geom_3dz), 'hex') FROM public.multisurface; +--SELECT 'asewkb04', encode(ST_asewkb(the_geom_4d), 'hex') FROM public.multisurface; + +SELECT 'box2d01', box2d(the_geom_2d) FROM public.multisurface; +SELECT 'box2d02', box2d(the_geom_3dm) FROM public.multisurface; +SELECT 'box2d03', box2d(the_geom_3dz) FROM public.multisurface; +SELECT 'box2d04', box2d(the_geom_4d) FROM public.multisurface; + +SELECT 'box3d01', box3d(the_geom_2d) FROM public.multisurface; +SELECT 'box3d02', box3d(the_geom_3dm) FROM public.multisurface; +SELECT 'box3d03', box3d(the_geom_3dz) FROM public.multisurface; +SELECT 'box3d04', box3d(the_geom_4d) FROM public.multisurface; + +SELECT 'isValid01', ST_IsValid(the_geom_2d) FROM public.multisurface; +SELECT 'isValid02', ST_IsValid(the_geom_3dm) FROM public.multisurface; +SELECT 'isValid03', ST_IsValid(the_geom_3dz) FROM public.multisurface; +SELECT 'isValid04', ST_IsValid(the_geom_4d) FROM public.multisurface; + +SELECT 'dimension01', ST_dimension(the_geom_2d) FROM public.multisurface; +SELECT 'dimension02', ST_dimension(the_geom_3dm) FROM public.multisurface; +SELECT 'dimension03', ST_dimension(the_geom_3dz) FROM public.multisurface; +SELECT 'dimension04', ST_dimension(the_geom_4d) FROM public.multisurface; + +SELECT 'numGeometries01', ST_numGeometries(the_geom_2d) FROM public.multisurface; +SELECT 'numGeometries02', ST_numGeometries(the_geom_3dm) FROM public.multisurface; +SELECT 'numGeometries03', ST_numGeometries(the_geom_3dz) FROM public.multisurface; +SELECT 'numGeometries04', ST_numGeometries(the_geom_4d) FROM public.multisurface; + +SELECT 'geometryN-201', ST_asEWKT(ST_geometryN(the_geom_2d, 2)) FROM public.multisurface; +SELECT 'geometryN-202', ST_asEWKT(ST_geometryN(the_geom_3dm, 2)) FROM public.multisurface; +SELECT 'geometryN-203', ST_asEWKT(ST_geometryN(the_geom_3dz, 2)) FROM public.multisurface; +SELECT 'geometryN-204', ST_asEWKT(ST_geometryN(the_geom_4d, 2)) FROM public.multisurface; + +SELECT 'geometryN-301', (ST_geometryN(the_geom_2d, 3) is null) FROM public.multisurface; +SELECT 'geometryN-302', (ST_geometryN(the_geom_3dm, 3) is null) FROM public.multisurface; +SELECT 'geometryN-303', (ST_geometryN(the_geom_3dz, 3) is null) FROM public.multisurface; +SELECT 'geometryN-304', (ST_geometryN(the_geom_4d, 3) is null) FROM public.multisurface; + +SELECT DropGeometryColumn('public', 'multisurface', 'the_geom_2d'); +SELECT DropGeometryColumn('public', 'multisurface', 'the_geom_3dm'); +SELECT DropGeometryColumn('public', 'multisurface', 'the_geom_3dz'); +SELECT DropGeometryColumn('public', 'multisurface', 'the_geom_4d'); +DROP TABLE public.multisurface; + diff -Nru postgis-1.5.3/regress/sql-mm-multisurface_expected postgis-2.0.1/regress/sql-mm-multisurface_expected --- postgis-1.5.3/regress/sql-mm-multisurface_expected 2011-06-24 03:51:11.000000000 +0000 +++ postgis-2.0.1/regress/sql-mm-multisurface_expected 2012-02-27 22:08:12.000000000 +0000 @@ -6,26 +6,6 @@ geometrytype03|MULTISURFACEM ndims04|2 geometrytype04|MULTISURFACE -ndims01|4 -geometrytype01|MULTISURFACE -ndims02|3 -geometrytype02|MULTISURFACE -ndims03|3 -geometrytype03|MULTISURFACEM -ndims04|2 -geometrytype04|MULTISURFACE -public.multisurface.the_geom_2d SRID:-1 TYPE:MULTISURFACE DIMS:2 -public.multisurface.the_geom_3dm SRID:-1 TYPE:MULTISURFACEM DIMS:3 -public.multisurface.the_geom_3dz SRID:-1 TYPE:MULTISURFACE DIMS:3 -public.multisurface.the_geom_4d SRID:-1 TYPE:MULTISURFACE DIMS:4 -astext01|MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)),((7 8,10 10,6 14,4 11,7 8))) -astext02|MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)),((7 8,10 10,6 14,4 11,7 8))) -astext03|MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)),((7 8,10 10,6 14,4 11,7 8))) -astext04|MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)),((7 8,10 10,6 14,4 11,7 8))) -asewkt01|MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)),((7 8,10 10,6 14,4 11,7 8))) -asewkt02|MULTISURFACEM(CURVEPOLYGON(CIRCULARSTRING(-2 0 0,-1 -1 2,0 0 4,1 -1 6,2 0 8,0 2 4,-2 0 0),(-1 0 2,0 0.5 4,1 0 6,0 1 4,-1 0 2)),((7 8 8,10 10 5,6 14 1,4 11 6,7 8 8))) -asewkt03|MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-2 0 0,-1 -1 1,0 0 2,1 -1 3,2 0 4,0 2 2,-2 0 0),(-1 0 1,0 0.5 2,1 0 3,0 1 3,-1 0 1)),((7 8 7,10 10 5,6 14 3,4 11 4,7 8 7))) -asewkt04|MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-2 0 0 0,-1 -1 1 2,0 0 2 4,1 -1 3 6,2 0 4 8,0 2 2 4,-2 0 0 0),(-1 0 1 2,0 0.5 2 4,1 0 3 6,0 1 3 4,-1 0 1 2)),((7 8 7 8,10 10 5 5,6 14 3 1,4 11 4 6,7 8 7 8))) ST_CurveToLine-201|MULTIPOLYGON(((-2 0,-1.70710678 -0.70710678,-1 -1,-0.29289322 -0.70710678,0 0,0.29289322 -0.70710678,1 -1,1.70710678 -0.70710678,2 0,1.41421356 1.41421356,0 2,-1.41421356 1.41421356,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)),((7 8,10 10,6 14,4 11,7 8))) ST_CurveToLine-202|MULTIPOLYGONM(((-2 0 0,-1.70710678 -0.70710678 1,-1 -1 2,-0.29289322 -0.70710678 3,0 0 4,0.29289322 -0.70710678 5,1 -1 6,1.70710678 -0.70710678 7,2 0 8,1.41421356 1.41421356 6,0 2 4,-1.41421356 1.41421356 2,-2 0 0),(-1 0 2,0 0.5 4,1 0 6,0 1 4,-1 0 2)),((7 8 8,10 10 5,6 14 1,4 11 6,7 8 8))) ST_CurveToLine-203|MULTIPOLYGON(((-2 0 0,-1.70710678 -0.70710678 0.5,-1 -1 1,-0.29289322 -0.70710678 1.5,0 0 2,0.29289322 -0.70710678 2.5,1 -1 3,1.70710678 -0.70710678 3.5,2 0 4,1.41421356 1.41421356 3,0 2 2,-1.41421356 1.41421356 1,-2 0 0),(-1 0 1,0 0.5 2,1 0 3,0 1 3,-1 0 1)),((7 8 7,10 10 5,6 14 3,4 11 4,7 8 7))) @@ -38,40 +18,12 @@ ST_CurveToLine02|MULTIPOLYGONM(((-2 0 0,-1.99879546 -0.04906767 0.0625,-1.99518473 -0.09801714 0.125,-1.98917651 -0.14673047 0.1875,-1.98078528 -0.19509032 0.25,-1.97003125 -0.24298018 0.3125,-1.95694034 -0.29028468 0.375,-1.94154407 -0.33688985 0.4375,-1.92387953 -0.38268343 0.5,-1.90398929 -0.42755509 0.5625,-1.88192126 -0.47139674 0.625,-1.85772861 -0.51410274 0.6875,-1.83146961 -0.55557023 0.75,-1.80320753 -0.5956993 0.8125,-1.77301045 -0.63439328 0.875,-1.74095113 -0.67155895 0.9375,-1.70710678 -0.70710678 1,-1.67155895 -0.74095113 1.0625,-1.63439328 -0.77301045 1.125,-1.5956993 -0.80320753 1.1875,-1.55557023 -0.83146961 1.25,-1.51410274 -0.85772861 1.3125,-1.47139674 -0.88192126 1.375,-1.42755509 -0.90398929 1.4375,-1.38268343 -0.92387953 1.5,-1.33688985 -0.94154407 1.5625,-1.29028468 -0.95694034 1.625,-1.24298018 -0.97003125 1.6875,-1.19509032 -0.98078528 1.75,-1.14673047 -0.98917651 1.8125,-1.09801714 -0.99518473 1.875,-1.04906767 -0.99879546 1.9375,-1 -1 2,-0.95093233 -0.99879546 2.0625,-0.90198286 -0.99518473 2.125,-0.85326953 -0.98917651 2.1875,-0.80490968 -0.98078528 2.25,-0.75701982 -0.97003125 2.3125,-0.70971532 -0.95694034 2.375,-0.66311015 -0.94154407 2.4375,-0.61731657 -0.92387953 2.5,-0.57244491 -0.90398929 2.5625,-0.52860326 -0.88192126 2.625,-0.48589726 -0.85772861 2.6875,-0.44442977 -0.83146961 2.75,-0.4043007 -0.80320753 2.8125,-0.36560672 -0.77301045 2.875,-0.32844105 -0.74095113 2.9375,-0.29289322 -0.70710678 3,-0.25904887 -0.67155895 3.0625,-0.22698955 -0.63439328 3.125,-0.19679247 -0.5956993 3.1875,-0.16853039 -0.55557023 3.25,-0.14227139 -0.51410274 3.3125,-0.11807874 -0.47139674 3.375,-0.09601071 -0.42755509 3.4375,-0.07612047 -0.38268343 3.5,-0.05845593 -0.33688985 3.5625,-0.04305966 -0.29028468 3.625,-0.02996875 -0.24298018 3.6875,-0.01921472 -0.19509032 3.75,-0.01082349 -0.14673047 3.8125,-0.00481527 -0.09801714 3.875,-0.00120454 -0.04906767 3.9375,0 0 4,0.00120454 -0.04906767 4.0625,0.00481527 -0.09801714 4.125,0.01082349 -0.14673047 4.1875,0.01921472 -0.19509032 4.25,0.02996875 -0.24298018 4.3125,0.04305966 -0.29028468 4.375,0.05845593 -0.33688985 4.4375,0.07612047 -0.38268343 4.5,0.09601071 -0.42755509 4.5625,0.11807874 -0.47139674 4.625,0.14227139 -0.51410274 4.6875,0.16853039 -0.55557023 4.75,0.19679247 -0.5956993 4.8125,0.22698955 -0.63439328 4.875,0.25904887 -0.67155895 4.9375,0.29289322 -0.70710678 5,0.32844105 -0.74095113 5.0625,0.36560672 -0.77301045 5.125,0.4043007 -0.80320753 5.1875,0.44442977 -0.83146961 5.25,0.48589726 -0.85772861 5.3125,0.52860326 -0.88192126 5.375,0.57244491 -0.90398929 5.4375,0.61731657 -0.92387953 5.5,0.66311015 -0.94154407 5.5625,0.70971532 -0.95694034 5.625,0.75701982 -0.97003125 5.6875,0.80490968 -0.98078528 5.75,0.85326953 -0.98917651 5.8125,0.90198286 -0.99518473 5.875,0.95093233 -0.99879546 5.9375,1 -1 6,1.04906767 -0.99879546 6.0625,1.09801714 -0.99518473 6.125,1.14673047 -0.98917651 6.1875,1.19509032 -0.98078528 6.25,1.24298018 -0.97003125 6.3125,1.29028468 -0.95694034 6.375,1.33688985 -0.94154407 6.4375,1.38268343 -0.92387953 6.5,1.42755509 -0.90398929 6.5625,1.47139674 -0.88192126 6.625,1.51410274 -0.85772861 6.6875,1.55557023 -0.83146961 6.75,1.5956993 -0.80320753 6.8125,1.63439328 -0.77301045 6.875,1.67155895 -0.74095113 6.9375,1.70710678 -0.70710678 7,1.74095113 -0.67155895 7.0625,1.77301045 -0.63439328 7.125,1.80320753 -0.5956993 7.1875,1.83146961 -0.55557023 7.25,1.85772861 -0.51410274 7.3125,1.88192126 -0.47139674 7.375,1.90398929 -0.42755509 7.4375,1.92387953 -0.38268343 7.5,1.94154407 -0.33688985 7.5625,1.95694034 -0.29028468 7.625,1.97003125 -0.24298018 7.6875,1.98078528 -0.19509032 7.75,1.98917651 -0.14673047 7.8125,1.99518473 -0.09801714 7.875,1.99879546 -0.04906767 7.9375,2 0 8,1.99759091 0.09813535 7.875,1.99036945 0.19603428 7.75,1.97835302 0.29346095 7.625,1.96157056 0.39018064 7.5,1.94006251 0.48596036 7.375,1.91388067 0.58056935 7.25,1.88308813 0.67377971 7.125,1.84775907 0.76536686 7,1.80797859 0.85511019 6.875,1.76384253 0.94279347 6.75,1.71545722 1.02820549 6.625,1.66293922 1.11114047 6.5,1.60641506 1.19139861 6.375,1.54602091 1.26878657 6.25,1.48190225 1.34311791 6.125,1.41421356 1.41421356 6,1.34311791 1.48190225 5.875,1.26878657 1.54602091 5.75,1.19139861 1.60641506 5.625,1.11114047 1.66293922 5.5,1.02820549 1.71545722 5.375,0.94279347 1.76384253 5.25,0.85511019 1.80797859 5.125,0.76536686 1.84775907 5,0.67377971 1.88308813 4.875,0.58056935 1.91388067 4.75,0.48596036 1.94006251 4.625,0.39018064 1.96157056 4.5,0.29346095 1.97835302 4.375,0.19603428 1.99036945 4.25,0.09813535 1.99759091 4.125,0 2 4,-0.09813535 1.99759091 3.875,-0.19603428 1.99036945 3.75,-0.29346095 1.97835302 3.625,-0.39018064 1.96157056 3.5,-0.48596036 1.94006251 3.375,-0.58056935 1.91388067 3.25,-0.67377971 1.88308813 3.125,-0.76536686 1.84775907 3,-0.85511019 1.80797859 2.875,-0.94279347 1.76384253 2.75,-1.02820549 1.71545722 2.625,-1.11114047 1.66293922 2.5,-1.19139861 1.60641506 2.375,-1.26878657 1.54602091 2.25,-1.34311791 1.48190225 2.125,-1.41421356 1.41421356 2,-1.48190225 1.34311791 1.875,-1.54602091 1.26878657 1.75,-1.60641506 1.19139861 1.625,-1.66293922 1.11114047 1.5,-1.71545722 1.02820549 1.375,-1.76384253 0.94279347 1.25,-1.80797859 0.85511019 1.125,-1.84775907 0.76536686 1,-1.88308813 0.67377971 0.875,-1.91388067 0.58056935 0.75,-1.94006251 0.48596036 0.625,-1.96157056 0.39018064 0.5,-1.97835302 0.29346095 0.375,-1.99036945 0.19603428 0.25,-1.99759091 0.09813535 0.125,-2 0 0),(-1 0 2,0 0.5 4,1 0 6,0 1 4,-1 0 2)),((7 8 8,10 10 5,6 14 1,4 11 6,7 8 8))) ST_CurveToLine03|MULTIPOLYGON(((-2 0 0,-1.99879546 -0.04906767 0.03125,-1.99518473 -0.09801714 0.0625,-1.98917651 -0.14673047 0.09375,-1.98078528 -0.19509032 0.125,-1.97003125 -0.24298018 0.15625,-1.95694034 -0.29028468 0.1875,-1.94154407 -0.33688985 0.21875,-1.92387953 -0.38268343 0.25,-1.90398929 -0.42755509 0.28125,-1.88192126 -0.47139674 0.3125,-1.85772861 -0.51410274 0.34375,-1.83146961 -0.55557023 0.375,-1.80320753 -0.5956993 0.40625,-1.77301045 -0.63439328 0.4375,-1.74095113 -0.67155895 0.46875,-1.70710678 -0.70710678 0.5,-1.67155895 -0.74095113 0.53125,-1.63439328 -0.77301045 0.5625,-1.5956993 -0.80320753 0.59375,-1.55557023 -0.83146961 0.625,-1.51410274 -0.85772861 0.65625,-1.47139674 -0.88192126 0.6875,-1.42755509 -0.90398929 0.71875,-1.38268343 -0.92387953 0.75,-1.33688985 -0.94154407 0.78125,-1.29028468 -0.95694034 0.8125,-1.24298018 -0.97003125 0.84375,-1.19509032 -0.98078528 0.875,-1.14673047 -0.98917651 0.90625,-1.09801714 -0.99518473 0.9375,-1.04906767 -0.99879546 0.96875,-1 -1 1,-0.95093233 -0.99879546 1.03125,-0.90198286 -0.99518473 1.0625,-0.85326953 -0.98917651 1.09375,-0.80490968 -0.98078528 1.125,-0.75701982 -0.97003125 1.15625,-0.70971532 -0.95694034 1.1875,-0.66311015 -0.94154407 1.21875,-0.61731657 -0.92387953 1.25,-0.57244491 -0.90398929 1.28125,-0.52860326 -0.88192126 1.3125,-0.48589726 -0.85772861 1.34375,-0.44442977 -0.83146961 1.375,-0.4043007 -0.80320753 1.40625,-0.36560672 -0.77301045 1.4375,-0.32844105 -0.74095113 1.46875,-0.29289322 -0.70710678 1.5,-0.25904887 -0.67155895 1.53125,-0.22698955 -0.63439328 1.5625,-0.19679247 -0.5956993 1.59375,-0.16853039 -0.55557023 1.625,-0.14227139 -0.51410274 1.65625,-0.11807874 -0.47139674 1.6875,-0.09601071 -0.42755509 1.71875,-0.07612047 -0.38268343 1.75,-0.05845593 -0.33688985 1.78125,-0.04305966 -0.29028468 1.8125,-0.02996875 -0.24298018 1.84375,-0.01921472 -0.19509032 1.875,-0.01082349 -0.14673047 1.90625,-0.00481527 -0.09801714 1.9375,-0.00120454 -0.04906767 1.96875,0 0 2,0.00120454 -0.04906767 2.03125,0.00481527 -0.09801714 2.0625,0.01082349 -0.14673047 2.09375,0.01921472 -0.19509032 2.125,0.02996875 -0.24298018 2.15625,0.04305966 -0.29028468 2.1875,0.05845593 -0.33688985 2.21875,0.07612047 -0.38268343 2.25,0.09601071 -0.42755509 2.28125,0.11807874 -0.47139674 2.3125,0.14227139 -0.51410274 2.34375,0.16853039 -0.55557023 2.375,0.19679247 -0.5956993 2.40625,0.22698955 -0.63439328 2.4375,0.25904887 -0.67155895 2.46875,0.29289322 -0.70710678 2.5,0.32844105 -0.74095113 2.53125,0.36560672 -0.77301045 2.5625,0.4043007 -0.80320753 2.59375,0.44442977 -0.83146961 2.625,0.48589726 -0.85772861 2.65625,0.52860326 -0.88192126 2.6875,0.57244491 -0.90398929 2.71875,0.61731657 -0.92387953 2.75,0.66311015 -0.94154407 2.78125,0.70971532 -0.95694034 2.8125,0.75701982 -0.97003125 2.84375,0.80490968 -0.98078528 2.875,0.85326953 -0.98917651 2.90625,0.90198286 -0.99518473 2.9375,0.95093233 -0.99879546 2.96875,1 -1 3,1.04906767 -0.99879546 3.03125,1.09801714 -0.99518473 3.0625,1.14673047 -0.98917651 3.09375,1.19509032 -0.98078528 3.125,1.24298018 -0.97003125 3.15625,1.29028468 -0.95694034 3.1875,1.33688985 -0.94154407 3.21875,1.38268343 -0.92387953 3.25,1.42755509 -0.90398929 3.28125,1.47139674 -0.88192126 3.3125,1.51410274 -0.85772861 3.34375,1.55557023 -0.83146961 3.375,1.5956993 -0.80320753 3.40625,1.63439328 -0.77301045 3.4375,1.67155895 -0.74095113 3.46875,1.70710678 -0.70710678 3.5,1.74095113 -0.67155895 3.53125,1.77301045 -0.63439328 3.5625,1.80320753 -0.5956993 3.59375,1.83146961 -0.55557023 3.625,1.85772861 -0.51410274 3.65625,1.88192126 -0.47139674 3.6875,1.90398929 -0.42755509 3.71875,1.92387953 -0.38268343 3.75,1.94154407 -0.33688985 3.78125,1.95694034 -0.29028468 3.8125,1.97003125 -0.24298018 3.84375,1.98078528 -0.19509032 3.875,1.98917651 -0.14673047 3.90625,1.99518473 -0.09801714 3.9375,1.99879546 -0.04906767 3.96875,2 0 4,1.99759091 0.09813535 3.9375,1.99036945 0.19603428 3.875,1.97835302 0.29346095 3.8125,1.96157056 0.39018064 3.75,1.94006251 0.48596036 3.6875,1.91388067 0.58056935 3.625,1.88308813 0.67377971 3.5625,1.84775907 0.76536686 3.5,1.80797859 0.85511019 3.4375,1.76384253 0.94279347 3.375,1.71545722 1.02820549 3.3125,1.66293922 1.11114047 3.25,1.60641506 1.19139861 3.1875,1.54602091 1.26878657 3.125,1.48190225 1.34311791 3.0625,1.41421356 1.41421356 3,1.34311791 1.48190225 2.9375,1.26878657 1.54602091 2.875,1.19139861 1.60641506 2.8125,1.11114047 1.66293922 2.75,1.02820549 1.71545722 2.6875,0.94279347 1.76384253 2.625,0.85511019 1.80797859 2.5625,0.76536686 1.84775907 2.5,0.67377971 1.88308813 2.4375,0.58056935 1.91388067 2.375,0.48596036 1.94006251 2.3125,0.39018064 1.96157056 2.25,0.29346095 1.97835302 2.1875,0.19603428 1.99036945 2.125,0.09813535 1.99759091 2.0625,0 2 2,-0.09813535 1.99759091 1.9375,-0.19603428 1.99036945 1.875,-0.29346095 1.97835302 1.8125,-0.39018064 1.96157056 1.75,-0.48596036 1.94006251 1.6875,-0.58056935 1.91388067 1.625,-0.67377971 1.88308813 1.5625,-0.76536686 1.84775907 1.5,-0.85511019 1.80797859 1.4375,-0.94279347 1.76384253 1.375,-1.02820549 1.71545722 1.3125,-1.11114047 1.66293922 1.25,-1.19139861 1.60641506 1.1875,-1.26878657 1.54602091 1.125,-1.34311791 1.48190225 1.0625,-1.41421356 1.41421356 1,-1.48190225 1.34311791 0.9375,-1.54602091 1.26878657 0.875,-1.60641506 1.19139861 0.8125,-1.66293922 1.11114047 0.75,-1.71545722 1.02820549 0.6875,-1.76384253 0.94279347 0.625,-1.80797859 0.85511019 0.5625,-1.84775907 0.76536686 0.5,-1.88308813 0.67377971 0.4375,-1.91388067 0.58056935 0.375,-1.94006251 0.48596036 0.3125,-1.96157056 0.39018064 0.25,-1.97835302 0.29346095 0.1875,-1.99036945 0.19603428 0.125,-1.99759091 0.09813535 0.0625,-2 0 0),(-1 0 1,0 0.5 2,1 0 3,0 1 3,-1 0 1)),((7 8 7,10 10 5,6 14 3,4 11 4,7 8 7))) ST_CurveToLine04|MULTIPOLYGON(((-2 0 0 0,-1.99879546 -0.04906767 0.03125 0.0625,-1.99518473 -0.09801714 0.0625 0.125,-1.98917651 -0.14673047 0.09375 0.1875,-1.98078528 -0.19509032 0.125 0.25,-1.97003125 -0.24298018 0.15625 0.3125,-1.95694034 -0.29028468 0.1875 0.375,-1.94154407 -0.33688985 0.21875 0.4375,-1.92387953 -0.38268343 0.25 0.5,-1.90398929 -0.42755509 0.28125 0.5625,-1.88192126 -0.47139674 0.3125 0.625,-1.85772861 -0.51410274 0.34375 0.6875,-1.83146961 -0.55557023 0.375 0.75,-1.80320753 -0.5956993 0.40625 0.8125,-1.77301045 -0.63439328 0.4375 0.875,-1.74095113 -0.67155895 0.46875 0.9375,-1.70710678 -0.70710678 0.5 1,-1.67155895 -0.74095113 0.53125 1.0625,-1.63439328 -0.77301045 0.5625 1.125,-1.5956993 -0.80320753 0.59375 1.1875,-1.55557023 -0.83146961 0.625 1.25,-1.51410274 -0.85772861 0.65625 1.3125,-1.47139674 -0.88192126 0.6875 1.375,-1.42755509 -0.90398929 0.71875 1.4375,-1.38268343 -0.92387953 0.75 1.5,-1.33688985 -0.94154407 0.78125 1.5625,-1.29028468 -0.95694034 0.8125 1.625,-1.24298018 -0.97003125 0.84375 1.6875,-1.19509032 -0.98078528 0.875 1.75,-1.14673047 -0.98917651 0.90625 1.8125,-1.09801714 -0.99518473 0.9375 1.875,-1.04906767 -0.99879546 0.96875 1.9375,-1 -1 1 2,-0.95093233 -0.99879546 1.03125 2.0625,-0.90198286 -0.99518473 1.0625 2.125,-0.85326953 -0.98917651 1.09375 2.1875,-0.80490968 -0.98078528 1.125 2.25,-0.75701982 -0.97003125 1.15625 2.3125,-0.70971532 -0.95694034 1.1875 2.375,-0.66311015 -0.94154407 1.21875 2.4375,-0.61731657 -0.92387953 1.25 2.5,-0.57244491 -0.90398929 1.28125 2.5625,-0.52860326 -0.88192126 1.3125 2.625,-0.48589726 -0.85772861 1.34375 2.6875,-0.44442977 -0.83146961 1.375 2.75,-0.4043007 -0.80320753 1.40625 2.8125,-0.36560672 -0.77301045 1.4375 2.875,-0.32844105 -0.74095113 1.46875 2.9375,-0.29289322 -0.70710678 1.5 3,-0.25904887 -0.67155895 1.53125 3.0625,-0.22698955 -0.63439328 1.5625 3.125,-0.19679247 -0.5956993 1.59375 3.1875,-0.16853039 -0.55557023 1.625 3.25,-0.14227139 -0.51410274 1.65625 3.3125,-0.11807874 -0.47139674 1.6875 3.375,-0.09601071 -0.42755509 1.71875 3.4375,-0.07612047 -0.38268343 1.75 3.5,-0.05845593 -0.33688985 1.78125 3.5625,-0.04305966 -0.29028468 1.8125 3.625,-0.02996875 -0.24298018 1.84375 3.6875,-0.01921472 -0.19509032 1.875 3.75,-0.01082349 -0.14673047 1.90625 3.8125,-0.00481527 -0.09801714 1.9375 3.875,-0.00120454 -0.04906767 1.96875 3.9375,0 0 2 4,0.00120454 -0.04906767 2.03125 4.0625,0.00481527 -0.09801714 2.0625 4.125,0.01082349 -0.14673047 2.09375 4.1875,0.01921472 -0.19509032 2.125 4.25,0.02996875 -0.24298018 2.15625 4.3125,0.04305966 -0.29028468 2.1875 4.375,0.05845593 -0.33688985 2.21875 4.4375,0.07612047 -0.38268343 2.25 4.5,0.09601071 -0.42755509 2.28125 4.5625,0.11807874 -0.47139674 2.3125 4.625,0.14227139 -0.51410274 2.34375 4.6875,0.16853039 -0.55557023 2.375 4.75,0.19679247 -0.5956993 2.40625 4.8125,0.22698955 -0.63439328 2.4375 4.875,0.25904887 -0.67155895 2.46875 4.9375,0.29289322 -0.70710678 2.5 5,0.32844105 -0.74095113 2.53125 5.0625,0.36560672 -0.77301045 2.5625 5.125,0.4043007 -0.80320753 2.59375 5.1875,0.44442977 -0.83146961 2.625 5.25,0.48589726 -0.85772861 2.65625 5.3125,0.52860326 -0.88192126 2.6875 5.375,0.57244491 -0.90398929 2.71875 5.4375,0.61731657 -0.92387953 2.75 5.5,0.66311015 -0.94154407 2.78125 5.5625,0.70971532 -0.95694034 2.8125 5.625,0.75701982 -0.97003125 2.84375 5.6875,0.80490968 -0.98078528 2.875 5.75,0.85326953 -0.98917651 2.90625 5.8125,0.90198286 -0.99518473 2.9375 5.875,0.95093233 -0.99879546 2.96875 5.9375,1 -1 3 6,1.04906767 -0.99879546 3.03125 6.0625,1.09801714 -0.99518473 3.0625 6.125,1.14673047 -0.98917651 3.09375 6.1875,1.19509032 -0.98078528 3.125 6.25,1.24298018 -0.97003125 3.15625 6.3125,1.29028468 -0.95694034 3.1875 6.375,1.33688985 -0.94154407 3.21875 6.4375,1.38268343 -0.92387953 3.25 6.5,1.42755509 -0.90398929 3.28125 6.5625,1.47139674 -0.88192126 3.3125 6.625,1.51410274 -0.85772861 3.34375 6.6875,1.55557023 -0.83146961 3.375 6.75,1.5956993 -0.80320753 3.40625 6.8125,1.63439328 -0.77301045 3.4375 6.875,1.67155895 -0.74095113 3.46875 6.9375,1.70710678 -0.70710678 3.5 7,1.74095113 -0.67155895 3.53125 7.0625,1.77301045 -0.63439328 3.5625 7.125,1.80320753 -0.5956993 3.59375 7.1875,1.83146961 -0.55557023 3.625 7.25,1.85772861 -0.51410274 3.65625 7.3125,1.88192126 -0.47139674 3.6875 7.375,1.90398929 -0.42755509 3.71875 7.4375,1.92387953 -0.38268343 3.75 7.5,1.94154407 -0.33688985 3.78125 7.5625,1.95694034 -0.29028468 3.8125 7.625,1.97003125 -0.24298018 3.84375 7.6875,1.98078528 -0.19509032 3.875 7.75,1.98917651 -0.14673047 3.90625 7.8125,1.99518473 -0.09801714 3.9375 7.875,1.99879546 -0.04906767 3.96875 7.9375,2 0 4 8,1.99759091 0.09813535 3.9375 7.875,1.99036945 0.19603428 3.875 7.75,1.97835302 0.29346095 3.8125 7.625,1.96157056 0.39018064 3.75 7.5,1.94006251 0.48596036 3.6875 7.375,1.91388067 0.58056935 3.625 7.25,1.88308813 0.67377971 3.5625 7.125,1.84775907 0.76536686 3.5 7,1.80797859 0.85511019 3.4375 6.875,1.76384253 0.94279347 3.375 6.75,1.71545722 1.02820549 3.3125 6.625,1.66293922 1.11114047 3.25 6.5,1.60641506 1.19139861 3.1875 6.375,1.54602091 1.26878657 3.125 6.25,1.48190225 1.34311791 3.0625 6.125,1.41421356 1.41421356 3 6,1.34311791 1.48190225 2.9375 5.875,1.26878657 1.54602091 2.875 5.75,1.19139861 1.60641506 2.8125 5.625,1.11114047 1.66293922 2.75 5.5,1.02820549 1.71545722 2.6875 5.375,0.94279347 1.76384253 2.625 5.25,0.85511019 1.80797859 2.5625 5.125,0.76536686 1.84775907 2.5 5,0.67377971 1.88308813 2.4375 4.875,0.58056935 1.91388067 2.375 4.75,0.48596036 1.94006251 2.3125 4.625,0.39018064 1.96157056 2.25 4.5,0.29346095 1.97835302 2.1875 4.375,0.19603428 1.99036945 2.125 4.25,0.09813535 1.99759091 2.0625 4.125,0 2 2 4,-0.09813535 1.99759091 1.9375 3.875,-0.19603428 1.99036945 1.875 3.75,-0.29346095 1.97835302 1.8125 3.625,-0.39018064 1.96157056 1.75 3.5,-0.48596036 1.94006251 1.6875 3.375,-0.58056935 1.91388067 1.625 3.25,-0.67377971 1.88308813 1.5625 3.125,-0.76536686 1.84775907 1.5 3,-0.85511019 1.80797859 1.4375 2.875,-0.94279347 1.76384253 1.375 2.75,-1.02820549 1.71545722 1.3125 2.625,-1.11114047 1.66293922 1.25 2.5,-1.19139861 1.60641506 1.1875 2.375,-1.26878657 1.54602091 1.125 2.25,-1.34311791 1.48190225 1.0625 2.125,-1.41421356 1.41421356 1 2,-1.48190225 1.34311791 0.9375 1.875,-1.54602091 1.26878657 0.875 1.75,-1.60641506 1.19139861 0.8125 1.625,-1.66293922 1.11114047 0.75 1.5,-1.71545722 1.02820549 0.6875 1.375,-1.76384253 0.94279347 0.625 1.25,-1.80797859 0.85511019 0.5625 1.125,-1.84775907 0.76536686 0.5 1,-1.88308813 0.67377971 0.4375 0.875,-1.91388067 0.58056935 0.375 0.75,-1.94006251 0.48596036 0.3125 0.625,-1.96157056 0.39018064 0.25 0.5,-1.97835302 0.29346095 0.1875 0.375,-1.99036945 0.19603428 0.125 0.25,-1.99759091 0.09813535 0.0625 0.125,-2 0 0 0),(-1 0 1 2,0 0.5 2 4,1 0 3 6,0 1 3 4,-1 0 1 2)),((7 8 7 8,10 10 5 5,6 14 3 1,4 11 4 6,7 8 7 8))) -box2d01|BOX(-2 -1,10 14) -box2d02|BOX(-2 -1,10 14) -box2d03|BOX(-2 -1,10 14) -box2d04|BOX(-2 -1,10 14) -box3d01|BOX3D(-2 -1 0,10 14 0) -box3d02|BOX3D(-2 -1 0,10 14 0) -box3d03|BOX3D(-2 -1 0,10 14 7) -box3d04|BOX3D(-2 -1 0,10 14 7) -ERROR: Exception in LWGEOM2GEOS: curved geometry not supported. -ERROR: Exception in LWGEOM2GEOS: curved geometry not supported. -ERROR: Exception in LWGEOM2GEOS: curved geometry not supported. -ERROR: Exception in LWGEOM2GEOS: curved geometry not supported. -dimension01|2 -dimension02|2 -dimension03|2 -dimension04|2 -numGeometries01|2 -numGeometries02|2 -numGeometries03|2 -numGeometries04|2 -geometryN-201|POLYGON((7 8,10 10,6 14,4 11,7 8)) -geometryN-202|POLYGONM((7 8 8,10 10 5,6 14 1,4 11 6,7 8 8)) -geometryN-203|POLYGON((7 8 7,10 10 5,6 14 3,4 11 4,7 8 7)) -geometryN-204|POLYGON((7 8 7 8,10 10 5 5,6 14 3 1,4 11 4 6,7 8 7 8)) -geometryN-301|t -geometryN-302|t -geometryN-303|t -geometryN-304|t astext01|MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)),((7 8,10 10,6 14,4 11,7 8))) -astext02|MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)),((7 8,10 10,6 14,4 11,7 8))) -astext03|MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)),((7 8,10 10,6 14,4 11,7 8))) -astext04|MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)),((7 8,10 10,6 14,4 11,7 8))) +astext02|MULTISURFACE M (CURVEPOLYGON M (CIRCULARSTRING M (-2 0 0,-1 -1 2,0 0 4,1 -1 6,2 0 8,0 2 4,-2 0 0),(-1 0 2,0 0.5 4,1 0 6,0 1 4,-1 0 2)),((7 8 8,10 10 5,6 14 1,4 11 6,7 8 8))) +astext03|MULTISURFACE Z (CURVEPOLYGON Z (CIRCULARSTRING Z (-2 0 0,-1 -1 1,0 0 2,1 -1 3,2 0 4,0 2 2,-2 0 0),(-1 0 1,0 0.5 2,1 0 3,0 1 3,-1 0 1)),((7 8 7,10 10 5,6 14 3,4 11 4,7 8 7))) +astext04|MULTISURFACE ZM (CURVEPOLYGON ZM (CIRCULARSTRING ZM (-2 0 0 0,-1 -1 1 2,0 0 2 4,1 -1 3 6,2 0 4 8,0 2 2 4,-2 0 0 0),(-1 0 1 2,0 0.5 2 4,1 0 3 6,0 1 3 4,-1 0 1 2)),((7 8 7 8,10 10 5 5,6 14 3 1,4 11 4 6,7 8 7 8))) asewkt01|MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)),((7 8,10 10,6 14,4 11,7 8))) -asewkt02|MULTISURFACEM(CURVEPOLYGON(CIRCULARSTRING(-2 0 0,-1 -1 2,0 0 4,1 -1 6,2 0 8,0 2 4,-2 0 0),(-1 0 2,0 0.5 4,1 0 6,0 1 4,-1 0 2)),((7 8 8,10 10 5,6 14 1,4 11 6,7 8 8))) +asewkt02|MULTISURFACEM(CURVEPOLYGONM(CIRCULARSTRINGM(-2 0 0,-1 -1 2,0 0 4,1 -1 6,2 0 8,0 2 4,-2 0 0),(-1 0 2,0 0.5 4,1 0 6,0 1 4,-1 0 2)),((7 8 8,10 10 5,6 14 1,4 11 6,7 8 8))) asewkt03|MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-2 0 0,-1 -1 1,0 0 2,1 -1 3,2 0 4,0 2 2,-2 0 0),(-1 0 1,0 0.5 2,1 0 3,0 1 3,-1 0 1)),((7 8 7,10 10 5,6 14 3,4 11 4,7 8 7))) asewkt04|MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-2 0 0 0,-1 -1 1 2,0 0 2 4,1 -1 3 6,2 0 4 8,0 2 2 4,-2 0 0 0),(-1 0 1 2,0 0.5 2 4,1 0 3 6,0 1 3 4,-1 0 1 2)),((7 8 7 8,10 10 5 5,6 14 3 1,4 11 4 6,7 8 7 8))) box2d01|BOX(-2 -1,10 14) diff -Nru postgis-1.5.3/regress/sql-mm-serialize.sql postgis-2.0.1/regress/sql-mm-serialize.sql --- postgis-1.5.3/regress/sql-mm-serialize.sql 2009-03-10 00:29:32.000000000 +0000 +++ postgis-2.0.1/regress/sql-mm-serialize.sql 2012-02-27 22:08:12.000000000 +0000 @@ -1,164 +1,164 @@ - -CREATE TABLE serialize_test ( - id INTEGER, - description VARCHAR, - ewkt VARCHAR, - serialized TEXT); - -INSERT INTO serialize_test ( - id, description, ewkt, serialized - ) VALUES ( - 1, 'Circular String', - 'CIRCULARSTRING(-2 0,0 2,2 0,0 2,2 4)', - '01080000000500000000000000000000C0000000000000000000000000000000000000000000000040000000000000004000000000000000000000000000000000000000000000004000000000000000400000000000001040'); -INSERT INTO serialize_test ( - id, description, ewkt, serialized - ) VALUES ( - 2, 'Circular String, SRID=4326', - 'SRID=4326;CIRCULARSTRING(-2 0,0 2,2 0,0 2,2 4)', - '0108000020E61000000500000000000000000000C0000000000000000000000000000000000000000000000040000000000000004000000000000000000000000000000000000000000000004000000000000000400000000000001040'); -INSERT INTO serialize_test ( - id, description, ewkt, serialized - ) VALUES ( - 3, 'Circular String 3dz, SRID=4326', - 'SRID=4326;CIRCULARSTRING(-2 0 1,0 2 1,2 0 1,0 2 1,2 4 1)', - '01080000A0E61000000500000000000000000000C00000000000000000000000000000F03F00000000000000000000000000000040000000000000F03F00000000000000400000000000000000000000000000F03F00000000000000000000000000000040000000000000F03F00000000000000400000000000001040000000000000F03F'); -INSERT INTO serialize_test ( - id, description, ewkt, serialized - ) VALUES ( - 4, 'Circular String 3dm, SRID=4326', - 'SRID=4326;CIRCULARSTRINGM(-2 0 1,0 2 1,2 0 1,0 2 1,2 4 1)', - '0108000060E61000000500000000000000000000C00000000000000000000000000000F03F00000000000000000000000000000040000000000000F03F00000000000000400000000000000000000000000000F03F00000000000000000000000000000040000000000000F03F00000000000000400000000000001040000000000000F03F'); -INSERT INTO serialize_test ( - id, description, ewkt, serialized - ) VALUES ( - 5, 'Circular String 4d, SRID=4326', - 'SRID=4326;CIRCULARSTRING(-2 0 1 0,0 2 1 0,2 0 1 0,0 2 1 0,2 4 1 0)', - '01080000E0E61000000500000000000000000000C00000000000000000000000000000F03F000000000000000000000000000000000000000000000040000000000000F03F000000000000000000000000000000400000000000000000000000000000F03F000000000000000000000000000000000000000000000040000000000000F03F000000000000000000000000000000400000000000001040000000000000F03F0000000000000000'); -INSERT INTO serialize_test ( - id, description, ewkt, serialized - ) VALUES ( - 6, 'Compound Curve', - 'COMPOUNDCURVE(CIRCULARSTRING(0 0,1 1,1 0),(1 0,0 1))', - '01090000000200000001080000000300000000000000000000000000000000000000000000000000F03F000000000000F03F000000000000F03F0000000000000000010200000002000000000000000000F03F00000000000000000000000000000000000000000000F03F'); -INSERT INTO serialize_test ( - id, description, ewkt, serialized - ) VALUES ( - 7, 'Compound Curve, SRID=4326', - 'SRID=4326;COMPOUNDCURVE(CIRCULARSTRING(0 0,1 1,1 0),(1 0,0 1))', - '0109000020E61000000200000001080000000300000000000000000000000000000000000000000000000000F03F000000000000F03F000000000000F03F0000000000000000010200000002000000000000000000F03F00000000000000000000000000000000000000000000F03F'); -INSERT INTO serialize_test ( - id, description, ewkt, serialized - ) VALUES ( - 8, 'Compound Curve 3dz, SRID=4326', - 'SRID=4326;COMPOUNDCURVE(CIRCULARSTRING(0 0 2,1 1 2,1 0 2),(1 0 2,0 1 2))', - '01090000A0E610000002000000010800008003000000000000000000000000000000000000000000000000000040000000000000F03F000000000000F03F0000000000000040000000000000F03F00000000000000000000000000000040010200008002000000000000000000F03F000000000000000000000000000000400000000000000000000000000000F03F0000000000000040'); -INSERT INTO serialize_test ( - id, description, ewkt, serialized - ) VALUES ( - 9, 'Compound Curve 3dm, SRID=4326', - 'SRID=4326;COMPOUNDCURVEM(CIRCULARSTRING(0 0 2,1 1 2,1 0 2),(1 0 2,0 1 2))', - '0109000060E610000002000000010800004003000000000000000000000000000000000000000000000000000040000000000000F03F000000000000F03F0000000000000040000000000000F03F00000000000000000000000000000040010200004002000000000000000000F03F000000000000000000000000000000400000000000000000000000000000F03F0000000000000040'); -INSERT INTO serialize_test ( - id, description, ewkt, serialized - ) VALUES ( - 10, 'Compound Curve 4d, SRID=4326', - 'SRID=4326;COMPOUNDCURVE(CIRCULARSTRING(0 0 2 5,1 1 2 5,1 0 2 5),(1 0 2 5,0 1 2 2))', - '01090000E0E61000000200000001080000C0030000000000000000000000000000000000000000000000000000400000000000001440000000000000F03F000000000000F03F00000000000000400000000000001440000000000000F03F00000000000000000000000000000040000000000000144001020000C002000000000000000000F03F0000000000000000000000000000004000000000000014400000000000000000000000000000F03F00000000000000400000000000000040'); -INSERT INTO serialize_test( - id, description, ewkt, serialized - ) VALUES ( - 11, 'Curve Polygon', - 'CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0))', - '010D0000000200000001080000000700000000000000000000C00000000000000000000000000000F0BF000000000000F0BF00000000000000000000000000000000000000000000F03F000000000000F0BF000000000000004000000000000000000000000000000000000000000000004000000000000000C00000000000000000010200000005000000000000000000F0BF00000000000000000000000000000000000000000000E03F000000000000F03F00000000000000000000000000000000000000000000F03F000000000000F0BF0000000000000000'); -INSERT INTO serialize_test( - id, description, ewkt, serialized - ) VALUES ( - 12, 'Curve Polygon, SRID=4326', - 'SRID=4326;CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0))', - '010D000020E61000000200000001080000000700000000000000000000C00000000000000000000000000000F0BF000000000000F0BF00000000000000000000000000000000000000000000F03F000000000000F0BF000000000000004000000000000000000000000000000000000000000000004000000000000000C00000000000000000010200000005000000000000000000F0BF00000000000000000000000000000000000000000000E03F000000000000F03F00000000000000000000000000000000000000000000F03F000000000000F0BF0000000000000000'); -INSERT INTO serialize_test( - id, description, ewkt, serialized - ) VALUES ( - 13, 'Curve Polygon 3dz, SRID=4326', - 'SRID=4326;CURVEPOLYGON(CIRCULARSTRING(-2 0 0,-1 -1 1,0 0 2,1 -1 3,2 0 4,0 2 2,-2 0 0),(-1 0 1,0 0.5 2,1 0 3,0 1 3,-1 0 1))', - '010D0000A0E61000000200000001080000800700000000000000000000C000000000000000000000000000000000000000000000F0BF000000000000F0BF000000000000F03F000000000000000000000000000000000000000000000040000000000000F03F000000000000F0BF000000000000084000000000000000400000000000000000000000000000104000000000000000000000000000000040000000000000004000000000000000C000000000000000000000000000000000010200008005000000000000000000F0BF0000000000000000000000000000F03F0000000000000000000000000000E03F0000000000000040000000000000F03F000000000000000000000000000008400000000000000000000000000000F03F0000000000000840000000000000F0BF0000000000000000000000000000F03F'); -INSERT INTO serialize_test( - id, description, ewkt, serialized - ) VALUES ( - 14, 'Curve Polygon 3dm, SRID=4326', - 'SRID=4326;CURVEPOLYGONM(CIRCULARSTRING(-2 0 0,-1 -1 2,0 0 4,1 -1 6,2 0 8,0 2 4,-2 0 0),(-1 0 2,0 0.5 4,1 0 6,0 1 4,-1 0 2))', - '010D000060E61000000200000001080000400700000000000000000000C000000000000000000000000000000000000000000000F0BF000000000000F0BF0000000000000040000000000000000000000000000000000000000000001040000000000000F03F000000000000F0BF000000000000184000000000000000400000000000000000000000000000204000000000000000000000000000000040000000000000104000000000000000C000000000000000000000000000000000010200004005000000000000000000F0BF000000000000000000000000000000400000000000000000000000000000E03F0000000000001040000000000000F03F000000000000000000000000000018400000000000000000000000000000F03F0000000000001040000000000000F0BF00000000000000000000000000000040'); -INSERT INTO serialize_test( - id, description, ewkt, serialized - ) VALUES ( - 15, 'Curve Polygon 4d, SRID=4326', - 'SRID=4326;CURVEPOLYGON(CIRCULARSTRING(-2 0 0 0,-1 -1 1 2,0 0 2 4,1 -1 3 6,2 0 4 8,0 2 2 4,-2 0 0 0),(-1 0 1 2,0 0.5 2 4,1 0 3 6,0 1 3 4,-1 0 1 2))', - '010D0000E0E61000000200000001080000C00700000000000000000000C0000000000000000000000000000000000000000000000000000000000000F0BF000000000000F0BF000000000000F03F00000000000000400000000000000000000000000000000000000000000000400000000000001040000000000000F03F000000000000F0BF000000000000084000000000000018400000000000000040000000000000000000000000000010400000000000002040000000000000000000000000000000400000000000000040000000000000104000000000000000C000000000000000000000000000000000000000000000000001020000C005000000000000000000F0BF0000000000000000000000000000F03F00000000000000400000000000000000000000000000E03F00000000000000400000000000001040000000000000F03F0000000000000000000000000000084000000000000018400000000000000000000000000000F03F00000000000008400000000000001040000000000000F0BF0000000000000000000000000000F03F0000000000000040'); -INSERT INTO serialize_test( - id, description, ewkt, serialized - ) VALUES ( - 16, 'Multi Curve', - 'MULTICURVE((5 5,3 5,3 3,0 3),CIRCULARSTRING(0 0,2 1,2 2))', - '010E0000000200000001020000000400000000000000000014400000000000001440000000000000084000000000000014400000000000000840000000000000084000000000000000000000000000000840010800000003000000000000000000000000000000000000000000000000000040000000000000F03F00000000000000400000000000000040'); -INSERT INTO serialize_test( - id, description, ewkt, serialized - ) VALUES ( - 17, 'Multi Curve, SRID=4326', - 'SRID=4326;MULTICURVE((5 5,3 5,3 3,0 3),CIRCULARSTRING(0 0,2 1,2 2))', - '010E000020E61000000200000001020000000400000000000000000014400000000000001440000000000000084000000000000014400000000000000840000000000000084000000000000000000000000000000840010800000003000000000000000000000000000000000000000000000000000040000000000000F03F00000000000000400000000000000040'); -INSERT INTO serialize_test( - id, description, ewkt, serialized - ) VALUES ( - 18, 'Multi Curve 3dz, SRID=4326', - 'SRID=4326;MULTICURVE((5 5 1,3 5 2,3 3 3,0 3 1),CIRCULARSTRING(0 0 0,2 1 3,2 2 1))', - '010E0000A0E61000000200000001020000800400000000000000000014400000000000001440000000000000F03F00000000000008400000000000001440000000000000004000000000000008400000000000000840000000000000084000000000000000000000000000000840000000000000F03F0108000080030000000000000000000000000000000000000000000000000000000000000000000040000000000000F03F000000000000084000000000000000400000000000000040000000000000F03F'); -INSERT INTO serialize_test( - id, description, ewkt, serialized - ) VALUES ( - 19, 'Multi Curve 3dm, SRID=4326', - 'SRID=4326;MULTICURVEM((5 5 3,3 5 2,3 3 1,0 3 1),CIRCULARSTRING(0 0 0,2 1 -2,2 2 2))', - '010E000060E61000000200000001020000400400000000000000000014400000000000001440000000000000084000000000000008400000000000001440000000000000004000000000000008400000000000000840000000000000F03F00000000000000000000000000000840000000000000F03F0108000040030000000000000000000000000000000000000000000000000000000000000000000040000000000000F03F00000000000000C0000000000000004000000000000000400000000000000040'); -INSERT INTO serialize_test( - id, description, ewkt, serialized - ) VALUES ( - 20, 'Multi Curve 4d, SRID=4326', - 'SRID=4326;MULTICURVE((5 5 1 3,3 5 2 2,3 3 3 1,0 3 1 1),CIRCULARSTRING(0 0 0 0,2 1 3 -2,2 2 1 2))', - '010E0000E0E61000000200000001020000C00400000000000000000014400000000000001440000000000000F03F00000000000008400000000000000840000000000000144000000000000000400000000000000040000000000000084000000000000008400000000000000840000000000000F03F00000000000000000000000000000840000000000000F03F000000000000F03F01080000C00300000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000F03F000000000000084000000000000000C000000000000000400000000000000040000000000000F03F0000000000000040'); -INSERT INTO serialize_test( - id, description, ewkt, serialized - ) VALUES ( - 21, 'Multi Surface', - 'MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)),((7 8,10 10,6 14,4 11,7 8)))', - '010F00000002000000010D0000000200000001080000000700000000000000000000C00000000000000000000000000000F0BF000000000000F0BF00000000000000000000000000000000000000000000F03F000000000000F0BF000000000000004000000000000000000000000000000000000000000000004000000000000000C00000000000000000010200000005000000000000000000F0BF00000000000000000000000000000000000000000000E03F000000000000F03F00000000000000000000000000000000000000000000F03F000000000000F0BF0000000000000000010300000001000000050000000000000000001C4000000000000020400000000000002440000000000000244000000000000018400000000000002C40000000000000104000000000000026400000000000001C400000000000002040'); -INSERT INTO serialize_test( - id, description, ewkt, serialized - ) VALUES ( - 22, 'Multi Surface, SRID=4326', - 'SRID=4326;MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)),((7 8,10 10,6 14,4 11,7 8)))', - '010F000020E610000002000000010D0000000200000001080000000700000000000000000000C00000000000000000000000000000F0BF000000000000F0BF00000000000000000000000000000000000000000000F03F000000000000F0BF000000000000004000000000000000000000000000000000000000000000004000000000000000C00000000000000000010200000005000000000000000000F0BF00000000000000000000000000000000000000000000E03F000000000000F03F00000000000000000000000000000000000000000000F03F000000000000F0BF0000000000000000010300000001000000050000000000000000001C4000000000000020400000000000002440000000000000244000000000000018400000000000002C40000000000000104000000000000026400000000000001C400000000000002040'); -INSERT INTO serialize_test( - id, description, ewkt, serialized - ) VALUES ( - 23, 'Multi Surface 3dz, SRID=4326', - 'SRID=4326;MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-2 0 0,-1 -1 1,0 0 2,1 -1 3,2 0 4,0 2 2,-2 0 0),(-1 0 1,0 0.5 2,1 0 3,0 1 3,-1 0 1)),((7 8 7,10 10 5,6 14 3,4 11 4,7 8 7)))', - '010F0000A0E610000002000000010D0000800200000001080000800700000000000000000000C000000000000000000000000000000000000000000000F0BF000000000000F0BF000000000000F03F000000000000000000000000000000000000000000000040000000000000F03F000000000000F0BF000000000000084000000000000000400000000000000000000000000000104000000000000000000000000000000040000000000000004000000000000000C000000000000000000000000000000000010200008005000000000000000000F0BF0000000000000000000000000000F03F0000000000000000000000000000E03F0000000000000040000000000000F03F000000000000000000000000000008400000000000000000000000000000F03F0000000000000840000000000000F0BF0000000000000000000000000000F03F010300008001000000050000000000000000001C4000000000000020400000000000001C4000000000000024400000000000002440000000000000144000000000000018400000000000002C4000000000000008400000000000001040000000000000264000000000000010400000000000001C4000000000000020400000000000001C40'); -INSERT INTO serialize_test( - id, description, ewkt, serialized - ) VALUES ( - 24, 'Multi Surface 3dm, SRID=4326', - 'SRID=4326;MULTISURFACEM(CURVEPOLYGON(CIRCULARSTRING(-2 0 0,-1 -1 2,0 0 4,1 -1 6,2 0 8,0 2 4,-2 0 0),(-1 0 2,0 0.5 4,1 0 6,0 1 4,-1 0 2)),((7 8 8,10 10 5,6 14 1,4 11 6,7 8 8)))', - '010F000060E610000002000000010D0000400200000001080000400700000000000000000000C000000000000000000000000000000000000000000000F0BF000000000000F0BF0000000000000040000000000000000000000000000000000000000000001040000000000000F03F000000000000F0BF000000000000184000000000000000400000000000000000000000000000204000000000000000000000000000000040000000000000104000000000000000C000000000000000000000000000000000010200004005000000000000000000F0BF000000000000000000000000000000400000000000000000000000000000E03F0000000000001040000000000000F03F000000000000000000000000000018400000000000000000000000000000F03F0000000000001040000000000000F0BF00000000000000000000000000000040010300004001000000050000000000000000001C400000000000002040000000000000204000000000000024400000000000002440000000000000144000000000000018400000000000002C40000000000000F03F0000000000001040000000000000264000000000000018400000000000001C4000000000000020400000000000002040'); -INSERT INTO serialize_test( - id, description, ewkt, serialized - ) VALUES ( - 25, 'Multi Surface 4d, SRID=4326', - 'SRID=4326;MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-2 0 0 0,-1 -1 1 2,0 0 2 4,1 -1 3 6,2 0 4 8,0 2 2 4,-2 0 0 0),(-1 0 1 2,0 0.5 2 4,1 0 3 6,0 1 3 4,-1 0 1 2)),((7 8 7 8,10 10 5 5,6 14 3 1,4 11 4 6,7 8 7 8)))', - '010F0000E0E610000002000000010D0000C00200000001080000C00700000000000000000000C0000000000000000000000000000000000000000000000000000000000000F0BF000000000000F0BF000000000000F03F00000000000000400000000000000000000000000000000000000000000000400000000000001040000000000000F03F000000000000F0BF000000000000084000000000000018400000000000000040000000000000000000000000000010400000000000002040000000000000000000000000000000400000000000000040000000000000104000000000000000C000000000000000000000000000000000000000000000000001020000C005000000000000000000F0BF0000000000000000000000000000F03F00000000000000400000000000000000000000000000E03F00000000000000400000000000001040000000000000F03F0000000000000000000000000000084000000000000018400000000000000000000000000000F03F00000000000008400000000000001040000000000000F0BF0000000000000000000000000000F03F000000000000004001030000C001000000050000000000000000001C4000000000000020400000000000001C400000000000002040000000000000244000000000000024400000000000001440000000000000144000000000000018400000000000002C400000000000000840000000000000F03F00000000000010400000000000002640000000000000104000000000000018400000000000001C4000000000000020400000000000001C400000000000002040'); - - - -SELECT id, CASE WHEN ewkt = ST_asEWKT(serialized::geometry) THEN 'pass' ELSE 'fail' END AS result FROM serialize_test ORDER BY id; -SELECT id, CASE WHEN ST_asEWKB(geomFromEWKT(ewkt)) = serialized THEN 'pass' ELSE 'fail' END AS result FROM serialize_test ORDER BY id; - -DROP TABLE serialize_test; + +CREATE TABLE serialize_test ( + id INTEGER, + description VARCHAR, + ewkt VARCHAR, + serialized TEXT); + +INSERT INTO serialize_test ( + id, description, ewkt, serialized + ) VALUES ( + 1, 'Circular String', + 'CIRCULARSTRING(-2 0,0 2,2 0,0 2,2 4)', + '01080000000500000000000000000000C0000000000000000000000000000000000000000000000040000000000000004000000000000000000000000000000000000000000000004000000000000000400000000000001040'); +INSERT INTO serialize_test ( + id, description, ewkt, serialized + ) VALUES ( + 2, 'Circular String, SRID=4326', + 'SRID=4326;CIRCULARSTRING(-2 0,0 2,2 0,0 2,2 4)', + '0108000020E61000000500000000000000000000C0000000000000000000000000000000000000000000000040000000000000004000000000000000000000000000000000000000000000004000000000000000400000000000001040'); +INSERT INTO serialize_test ( + id, description, ewkt, serialized + ) VALUES ( + 3, 'Circular String 3dz, SRID=4326', + 'SRID=4326;CIRCULARSTRING(-2 0 1,0 2 1,2 0 1,0 2 1,2 4 1)', + '01080000A0E61000000500000000000000000000C00000000000000000000000000000F03F00000000000000000000000000000040000000000000F03F00000000000000400000000000000000000000000000F03F00000000000000000000000000000040000000000000F03F00000000000000400000000000001040000000000000F03F'); +INSERT INTO serialize_test ( + id, description, ewkt, serialized + ) VALUES ( + 4, 'Circular String 3dm, SRID=4326', + 'SRID=4326;CIRCULARSTRINGM(-2 0 1,0 2 1,2 0 1,0 2 1,2 4 1)', + '0108000060E61000000500000000000000000000C00000000000000000000000000000F03F00000000000000000000000000000040000000000000F03F00000000000000400000000000000000000000000000F03F00000000000000000000000000000040000000000000F03F00000000000000400000000000001040000000000000F03F'); +INSERT INTO serialize_test ( + id, description, ewkt, serialized + ) VALUES ( + 5, 'Circular String 4d, SRID=4326', + 'SRID=4326;CIRCULARSTRING(-2 0 1 0,0 2 1 0,2 0 1 0,0 2 1 0,2 4 1 0)', + '01080000E0E61000000500000000000000000000C00000000000000000000000000000F03F000000000000000000000000000000000000000000000040000000000000F03F000000000000000000000000000000400000000000000000000000000000F03F000000000000000000000000000000000000000000000040000000000000F03F000000000000000000000000000000400000000000001040000000000000F03F0000000000000000'); +INSERT INTO serialize_test ( + id, description, ewkt, serialized + ) VALUES ( + 6, 'Compound Curve', + 'COMPOUNDCURVE(CIRCULARSTRING(0 0,1 1,1 0),(1 0,0 1))', + '01090000000200000001080000000300000000000000000000000000000000000000000000000000F03F000000000000F03F000000000000F03F0000000000000000010200000002000000000000000000F03F00000000000000000000000000000000000000000000F03F'); +INSERT INTO serialize_test ( + id, description, ewkt, serialized + ) VALUES ( + 7, 'Compound Curve, SRID=4326', + 'SRID=4326;COMPOUNDCURVE(CIRCULARSTRING(0 0,1 1,1 0),(1 0,0 1))', + '0109000020E61000000200000001080000000300000000000000000000000000000000000000000000000000F03F000000000000F03F000000000000F03F0000000000000000010200000002000000000000000000F03F00000000000000000000000000000000000000000000F03F'); +INSERT INTO serialize_test ( + id, description, ewkt, serialized + ) VALUES ( + 8, 'Compound Curve 3dz, SRID=4326', + 'SRID=4326;COMPOUNDCURVE(CIRCULARSTRING(0 0 2,1 1 2,1 0 2),(1 0 2,0 1 2))', + '01090000A0E610000002000000010800008003000000000000000000000000000000000000000000000000000040000000000000F03F000000000000F03F0000000000000040000000000000F03F00000000000000000000000000000040010200008002000000000000000000F03F000000000000000000000000000000400000000000000000000000000000F03F0000000000000040'); +INSERT INTO serialize_test ( + id, description, ewkt, serialized + ) VALUES ( + 9, 'Compound Curve 3dm, SRID=4326', + 'SRID=4326;COMPOUNDCURVEM(CIRCULARSTRINGM(0 0 2,1 1 2,1 0 2),(1 0 2,0 1 2))', + '0109000060E610000002000000010800004003000000000000000000000000000000000000000000000000000040000000000000F03F000000000000F03F0000000000000040000000000000F03F00000000000000000000000000000040010200004002000000000000000000F03F000000000000000000000000000000400000000000000000000000000000F03F0000000000000040'); +INSERT INTO serialize_test ( + id, description, ewkt, serialized + ) VALUES ( + 10, 'Compound Curve 4d, SRID=4326', + 'SRID=4326;COMPOUNDCURVE(CIRCULARSTRING(0 0 2 5,1 1 2 5,1 0 2 5),(1 0 2 5,0 1 2 2))', + '01090000E0E61000000200000001080000C0030000000000000000000000000000000000000000000000000000400000000000001440000000000000F03F000000000000F03F00000000000000400000000000001440000000000000F03F00000000000000000000000000000040000000000000144001020000C002000000000000000000F03F0000000000000000000000000000004000000000000014400000000000000000000000000000F03F00000000000000400000000000000040'); +INSERT INTO serialize_test( + id, description, ewkt, serialized + ) VALUES ( + 11, 'Curve Polygon', + 'CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0))', + '010A0000000200000001080000000700000000000000000000C00000000000000000000000000000F0BF000000000000F0BF00000000000000000000000000000000000000000000F03F000000000000F0BF000000000000004000000000000000000000000000000000000000000000004000000000000000C00000000000000000010200000005000000000000000000F0BF00000000000000000000000000000000000000000000E03F000000000000F03F00000000000000000000000000000000000000000000F03F000000000000F0BF0000000000000000'); +INSERT INTO serialize_test( + id, description, ewkt, serialized + ) VALUES ( + 12, 'Curve Polygon, SRID=4326', + 'SRID=4326;CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0))', + '010A000020E61000000200000001080000000700000000000000000000C00000000000000000000000000000F0BF000000000000F0BF00000000000000000000000000000000000000000000F03F000000000000F0BF000000000000004000000000000000000000000000000000000000000000004000000000000000C00000000000000000010200000005000000000000000000F0BF00000000000000000000000000000000000000000000E03F000000000000F03F00000000000000000000000000000000000000000000F03F000000000000F0BF0000000000000000'); +INSERT INTO serialize_test( + id, description, ewkt, serialized + ) VALUES ( + 13, 'Curve Polygon 3dz, SRID=4326', + 'SRID=4326;CURVEPOLYGON(CIRCULARSTRING(-2 0 0,-1 -1 1,0 0 2,1 -1 3,2 0 4,0 2 2,-2 0 0),(-1 0 1,0 0.5 2,1 0 3,0 1 3,-1 0 1))', + '010A0000A0E61000000200000001080000800700000000000000000000C000000000000000000000000000000000000000000000F0BF000000000000F0BF000000000000F03F000000000000000000000000000000000000000000000040000000000000F03F000000000000F0BF000000000000084000000000000000400000000000000000000000000000104000000000000000000000000000000040000000000000004000000000000000C000000000000000000000000000000000010200008005000000000000000000F0BF0000000000000000000000000000F03F0000000000000000000000000000E03F0000000000000040000000000000F03F000000000000000000000000000008400000000000000000000000000000F03F0000000000000840000000000000F0BF0000000000000000000000000000F03F'); +INSERT INTO serialize_test( + id, description, ewkt, serialized + ) VALUES ( + 14, 'Curve Polygon 3dm, SRID=4326', + 'SRID=4326;CURVEPOLYGONM(CIRCULARSTRINGM(-2 0 0,-1 -1 2,0 0 4,1 -1 6,2 0 8,0 2 4,-2 0 0),(-1 0 2,0 0.5 4,1 0 6,0 1 4,-1 0 2))', + '010A000060E61000000200000001080000400700000000000000000000C000000000000000000000000000000000000000000000F0BF000000000000F0BF0000000000000040000000000000000000000000000000000000000000001040000000000000F03F000000000000F0BF000000000000184000000000000000400000000000000000000000000000204000000000000000000000000000000040000000000000104000000000000000C000000000000000000000000000000000010200004005000000000000000000F0BF000000000000000000000000000000400000000000000000000000000000E03F0000000000001040000000000000F03F000000000000000000000000000018400000000000000000000000000000F03F0000000000001040000000000000F0BF00000000000000000000000000000040'); +INSERT INTO serialize_test( + id, description, ewkt, serialized + ) VALUES ( + 15, 'Curve Polygon 4d, SRID=4326', + 'SRID=4326;CURVEPOLYGON(CIRCULARSTRING(-2 0 0 0,-1 -1 1 2,0 0 2 4,1 -1 3 6,2 0 4 8,0 2 2 4,-2 0 0 0),(-1 0 1 2,0 0.5 2 4,1 0 3 6,0 1 3 4,-1 0 1 2))', + '010A0000E0E61000000200000001080000C00700000000000000000000C0000000000000000000000000000000000000000000000000000000000000F0BF000000000000F0BF000000000000F03F00000000000000400000000000000000000000000000000000000000000000400000000000001040000000000000F03F000000000000F0BF000000000000084000000000000018400000000000000040000000000000000000000000000010400000000000002040000000000000000000000000000000400000000000000040000000000000104000000000000000C000000000000000000000000000000000000000000000000001020000C005000000000000000000F0BF0000000000000000000000000000F03F00000000000000400000000000000000000000000000E03F00000000000000400000000000001040000000000000F03F0000000000000000000000000000084000000000000018400000000000000000000000000000F03F00000000000008400000000000001040000000000000F0BF0000000000000000000000000000F03F0000000000000040'); +INSERT INTO serialize_test( + id, description, ewkt, serialized + ) VALUES ( + 16, 'Multi Curve', + 'MULTICURVE((5 5,3 5,3 3,0 3),CIRCULARSTRING(0 0,2 1,2 2))', + '010B0000000200000001020000000400000000000000000014400000000000001440000000000000084000000000000014400000000000000840000000000000084000000000000000000000000000000840010800000003000000000000000000000000000000000000000000000000000040000000000000F03F00000000000000400000000000000040'); +INSERT INTO serialize_test( + id, description, ewkt, serialized + ) VALUES ( + 17, 'Multi Curve, SRID=4326', + 'SRID=4326;MULTICURVE((5 5,3 5,3 3,0 3),CIRCULARSTRING(0 0,2 1,2 2))', + '010B000020E61000000200000001020000000400000000000000000014400000000000001440000000000000084000000000000014400000000000000840000000000000084000000000000000000000000000000840010800000003000000000000000000000000000000000000000000000000000040000000000000F03F00000000000000400000000000000040'); +INSERT INTO serialize_test( + id, description, ewkt, serialized + ) VALUES ( + 18, 'Multi Curve 3dz, SRID=4326', + 'SRID=4326;MULTICURVE((5 5 1,3 5 2,3 3 3,0 3 1),CIRCULARSTRING(0 0 0,2 1 3,2 2 1))', + '010B0000A0E61000000200000001020000800400000000000000000014400000000000001440000000000000F03F00000000000008400000000000001440000000000000004000000000000008400000000000000840000000000000084000000000000000000000000000000840000000000000F03F0108000080030000000000000000000000000000000000000000000000000000000000000000000040000000000000F03F000000000000084000000000000000400000000000000040000000000000F03F'); +INSERT INTO serialize_test( + id, description, ewkt, serialized + ) VALUES ( + 19, 'Multi Curve 3dm, SRID=4326', + 'SRID=4326;MULTICURVEM((5 5 3,3 5 2,3 3 1,0 3 1),CIRCULARSTRINGM(0 0 0,2 1 -2,2 2 2))', + '010B000060E61000000200000001020000400400000000000000000014400000000000001440000000000000084000000000000008400000000000001440000000000000004000000000000008400000000000000840000000000000F03F00000000000000000000000000000840000000000000F03F0108000040030000000000000000000000000000000000000000000000000000000000000000000040000000000000F03F00000000000000C0000000000000004000000000000000400000000000000040'); +INSERT INTO serialize_test( + id, description, ewkt, serialized + ) VALUES ( + 20, 'Multi Curve 4d, SRID=4326', + 'SRID=4326;MULTICURVE((5 5 1 3,3 5 2 2,3 3 3 1,0 3 1 1),CIRCULARSTRING(0 0 0 0,2 1 3 -2,2 2 1 2))', + '010B0000E0E61000000200000001020000C00400000000000000000014400000000000001440000000000000F03F00000000000008400000000000000840000000000000144000000000000000400000000000000040000000000000084000000000000008400000000000000840000000000000F03F00000000000000000000000000000840000000000000F03F000000000000F03F01080000C00300000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000F03F000000000000084000000000000000C000000000000000400000000000000040000000000000F03F0000000000000040'); +INSERT INTO serialize_test( + id, description, ewkt, serialized + ) VALUES ( + 21, 'Multi Surface', + 'MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)),((7 8,10 10,6 14,4 11,7 8)))', + '010C00000002000000010A0000000200000001080000000700000000000000000000C00000000000000000000000000000F0BF000000000000F0BF00000000000000000000000000000000000000000000F03F000000000000F0BF000000000000004000000000000000000000000000000000000000000000004000000000000000C00000000000000000010200000005000000000000000000F0BF00000000000000000000000000000000000000000000E03F000000000000F03F00000000000000000000000000000000000000000000F03F000000000000F0BF0000000000000000010300000001000000050000000000000000001C4000000000000020400000000000002440000000000000244000000000000018400000000000002C40000000000000104000000000000026400000000000001C400000000000002040'); +INSERT INTO serialize_test( + id, description, ewkt, serialized + ) VALUES ( + 22, 'Multi Surface, SRID=4326', + 'SRID=4326;MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)),((7 8,10 10,6 14,4 11,7 8)))', + '010C000020E610000002000000010A0000000200000001080000000700000000000000000000C00000000000000000000000000000F0BF000000000000F0BF00000000000000000000000000000000000000000000F03F000000000000F0BF000000000000004000000000000000000000000000000000000000000000004000000000000000C00000000000000000010200000005000000000000000000F0BF00000000000000000000000000000000000000000000E03F000000000000F03F00000000000000000000000000000000000000000000F03F000000000000F0BF0000000000000000010300000001000000050000000000000000001C4000000000000020400000000000002440000000000000244000000000000018400000000000002C40000000000000104000000000000026400000000000001C400000000000002040'); +INSERT INTO serialize_test( + id, description, ewkt, serialized + ) VALUES ( + 23, 'Multi Surface 3dz, SRID=4326', + 'SRID=4326;MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-2 0 0,-1 -1 1,0 0 2,1 -1 3,2 0 4,0 2 2,-2 0 0),(-1 0 1,0 0.5 2,1 0 3,0 1 3,-1 0 1)),((7 8 7,10 10 5,6 14 3,4 11 4,7 8 7)))', + '010C0000A0E610000002000000010A0000800200000001080000800700000000000000000000C000000000000000000000000000000000000000000000F0BF000000000000F0BF000000000000F03F000000000000000000000000000000000000000000000040000000000000F03F000000000000F0BF000000000000084000000000000000400000000000000000000000000000104000000000000000000000000000000040000000000000004000000000000000C000000000000000000000000000000000010200008005000000000000000000F0BF0000000000000000000000000000F03F0000000000000000000000000000E03F0000000000000040000000000000F03F000000000000000000000000000008400000000000000000000000000000F03F0000000000000840000000000000F0BF0000000000000000000000000000F03F010300008001000000050000000000000000001C4000000000000020400000000000001C4000000000000024400000000000002440000000000000144000000000000018400000000000002C4000000000000008400000000000001040000000000000264000000000000010400000000000001C4000000000000020400000000000001C40'); +INSERT INTO serialize_test( + id, description, ewkt, serialized + ) VALUES ( + 24, 'Multi Surface 3dm, SRID=4326', + 'SRID=4326;MULTISURFACEM(CURVEPOLYGONM(CIRCULARSTRINGM(-2 0 0,-1 -1 2,0 0 4,1 -1 6,2 0 8,0 2 4,-2 0 0),(-1 0 2,0 0.5 4,1 0 6,0 1 4,-1 0 2)),((7 8 8,10 10 5,6 14 1,4 11 6,7 8 8)))', + '010C000060E610000002000000010A0000400200000001080000400700000000000000000000C000000000000000000000000000000000000000000000F0BF000000000000F0BF0000000000000040000000000000000000000000000000000000000000001040000000000000F03F000000000000F0BF000000000000184000000000000000400000000000000000000000000000204000000000000000000000000000000040000000000000104000000000000000C000000000000000000000000000000000010200004005000000000000000000F0BF000000000000000000000000000000400000000000000000000000000000E03F0000000000001040000000000000F03F000000000000000000000000000018400000000000000000000000000000F03F0000000000001040000000000000F0BF00000000000000000000000000000040010300004001000000050000000000000000001C400000000000002040000000000000204000000000000024400000000000002440000000000000144000000000000018400000000000002C40000000000000F03F0000000000001040000000000000264000000000000018400000000000001C4000000000000020400000000000002040'); +INSERT INTO serialize_test( + id, description, ewkt, serialized + ) VALUES ( + 25, 'Multi Surface 4d, SRID=4326', + 'SRID=4326;MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-2 0 0 0,-1 -1 1 2,0 0 2 4,1 -1 3 6,2 0 4 8,0 2 2 4,-2 0 0 0),(-1 0 1 2,0 0.5 2 4,1 0 3 6,0 1 3 4,-1 0 1 2)),((7 8 7 8,10 10 5 5,6 14 3 1,4 11 4 6,7 8 7 8)))', + '010C0000E0E610000002000000010A0000C00200000001080000C00700000000000000000000C0000000000000000000000000000000000000000000000000000000000000F0BF000000000000F0BF000000000000F03F00000000000000400000000000000000000000000000000000000000000000400000000000001040000000000000F03F000000000000F0BF000000000000084000000000000018400000000000000040000000000000000000000000000010400000000000002040000000000000000000000000000000400000000000000040000000000000104000000000000000C000000000000000000000000000000000000000000000000001020000C005000000000000000000F0BF0000000000000000000000000000F03F00000000000000400000000000000000000000000000E03F00000000000000400000000000001040000000000000F03F0000000000000000000000000000084000000000000018400000000000000000000000000000F03F00000000000008400000000000001040000000000000F0BF0000000000000000000000000000F03F000000000000004001030000C001000000050000000000000000001C4000000000000020400000000000001C400000000000002040000000000000244000000000000024400000000000001440000000000000144000000000000018400000000000002C400000000000000840000000000000F03F00000000000010400000000000002640000000000000104000000000000018400000000000001C4000000000000020400000000000001C400000000000002040'); + + + +SELECT id, CASE WHEN ewkt = ST_asEWKT(serialized::geometry) THEN 'pass' ELSE 'fail' END AS result FROM serialize_test ORDER BY id; +SELECT id, CASE WHEN ST_asEWKB(geomFromEWKT(ewkt)) = serialized THEN 'pass' ELSE 'fail' END AS result FROM serialize_test ORDER BY id; + +DROP TABLE serialize_test; diff -Nru postgis-1.5.3/regress/summary.sql postgis-2.0.1/regress/summary.sql --- postgis-1.5.3/regress/summary.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/summary.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,17 @@ +SELECT 'T1', ST_Summary('POINT(0 0)'::geometry); +SELECT 'T1B', ST_Summary(postgis_addbbox('POINT(0 0)'::geometry)); +SELECT 'T1S', ST_Summary('SRID=4326;POINT(0 0)'::geometry); +SELECT 'T1M', ST_Summary('POINTM(0 0 0)'::geometry); +SELECT 'T1Z', ST_Summary('POINT(0 0 0)'::geometry); +SELECT 'T1ZM', ST_Summary('POINT(0 0 0 0)'::geometry); +SELECT 'T1ZMB', ST_Summary(postgis_addbbox('POINT(0 0 0 0)'::geometry)); +SELECT 'T1ZMBS', ST_Summary(postgis_addbbox( + 'SRID=4326;POINT(0 0 0 0)'::geometry)); +SELECT 'T3', ST_Summary('MULTIPOINT(0 0)'::geometry); +SELECT 'T4', ST_Summary('SRID=4326;MULTIPOINT(0 0)'::geometry); +SELECT 'T5', ST_Summary('GEOMETRYCOLLECTION( + MULTILINESTRING((0 0, 1 0),(2 0, 4 4)),MULTIPOINT(0 0) +)'::geometry); +SELECT 'T6', ST_Summary('SRID=4326;GEOMETRYCOLLECTION( + MULTILINESTRING((0 0, 1 0),(2 0, 4 4)),MULTIPOINT(0 0) +)'::geometry); diff -Nru postgis-1.5.3/regress/summary_expected postgis-2.0.1/regress/summary_expected --- postgis-1.5.3/regress/summary_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/summary_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,24 @@ +T1|Point[] +T1B|Point[B] +T1S|Point[] +T1M|Point[M] +T1Z|Point[Z] +T1ZM|Point[ZM] +T1ZMB|Point[ZMB] +T1ZMBS|Point[ZMB] +T3|MultiPoint[B] with 1 elements + Point[] +T4|MultiPoint[B] with 1 elements + Point[] +T5|GeometryCollection[B] with 2 elements + MultiLineString[] with 2 elements + LineString[] with 2 points + LineString[] with 2 points + MultiPoint[] with 1 elements + Point[] +T6|GeometryCollection[B] with 2 elements + MultiLineString[] with 2 elements + LineString[] with 2 points + LineString[] with 2 points + MultiPoint[] with 1 elements + Point[] diff -Nru postgis-1.5.3/regress/svg.sql postgis-2.0.1/regress/svg.sql --- postgis-1.5.3/regress/svg.sql 2010-02-06 10:49:00.000000000 +0000 +++ postgis-2.0.1/regress/svg.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,159 +0,0 @@ --- --- spatial_ref_sys data --- -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"]],TOWGS84[0,0,0,0,0,0,0],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 27572 : NTF (Paris) / Lambert zone II -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27572,'EPSG',27572,'PROJCS["NTF (Paris) / Lambert zone II",GEOGCS["NTF (Paris)",DATUM["Nouvelle_Triangulation_Francaise_Paris",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936269,AUTHORITY["EPSG","7011"]],TOWGS84[-168,-60,320,0,0,0,0],AUTHORITY["EPSG","6807"]],PRIMEM["Paris",2.33722917,AUTHORITY["EPSG","8903"]],UNIT["grad",0.01570796326794897,AUTHORITY["EPSG","9105"]],AUTHORITY["EPSG","4807"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",52],PARAMETER["central_meridian",0],PARAMETER["scale_factor",0.99987742],PARAMETER["false_easting",600000],PARAMETER["false_northing",2200000],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","27572"]]','+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs '); ---- EPSG 31467 : DHDN / Gauss-Kruger zone 3 -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31467,'EPSG',31467,'PROJCS["DHDN / Gauss-Kruger zone 3",GEOGCS["DHDN",DATUM["Deutsches_Hauptdreiecksnetz",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6314"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4314"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",1],PARAMETER["false_easting",3500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","31467"]]','+proj=tmerc +lat_0=0 +lon_0=9 +k=1.000000 +x_0=3500000 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs '); - - --- Simple output -SELECT 'simple_point', ST_AsSVG(GeomFromEWKT('POINT(1 1)')); - - --- Empty Geometry -SELECT 'empty_geom', ST_AsSVG(GeomFromEWKT(NULL)); - --- Option -SELECT 'option_01', ST_AsSVG(GeomFromEWKT('SRID=4326;LINESTRING(1 1, 4 4, 5 7)'), 0); -SELECT 'option_02', ST_AsSVG(GeomFromEWKT('SRID=4326;LINESTRING(1 1, 4 4, 5 7)'), 1); -SELECT 'option_03', ST_AsSVG(GeomFromEWKT('SRID=4326;LINESTRING(1 1, 4 4, 5 7)'), 0, 0); -SELECT 'option_04', ST_AsSVG(GeomFromEWKT('SRID=4326;LINESTRING(1 1, 4 4, 5 7)'), 1, 0); - --- Precision -SELECT 'precision_01', ST_AsSVG(GeomFromEWKT('SRID=4326;POINT(1.1111111 1.1111111)'), 0); -SELECT 'precision_02', ST_AsSVG(GeomFromEWKT('SRID=4326;POINT(1.1111111 1.1111111)'), 3); -SELECT 'precision_03', ST_AsSVG(GeomFromEWKT('SRID=4326;POINT(1.1111111 1.1111111)'), -2); -SELECT 'precision_04', ST_AsSVG(GeomFromEWKT('SRID=4326;POINT(1.1111111 1.1111111)'), 19); - - - --- --- Line --- - --- Geometry from frida project: -SELECT 'line_01', ST_AsSVG(GeomFromEWKT('LINESTRING(3429562.6 5799490.68,3429750.99 5799199.87,3429825.45 5799078.39,3429901.8 5798961.45,3429995.54 5798822.93,3430072.89 5798719.46,3430216 5798558.95,3430272.08 5798489.33,3430393.87 5798328.51,3430463.53 5798251.11,3430532.22 5798190.16,3430591.24 5798149.53,3430667.67 5798108.9,3430723.78 5798088.58,3430797.33 5798067.95,3430857.34 5798056.34,3430912.52 5798051.5,3430961.89 5798048.59,3431052.88 5798053.43,3431159.36 5798059.24,3431218.41 5798061.18,3431366.56 5798056.09,3431474.07 5798044.47,3431568.02 5798028.97,3431644.53 5798012.51)'), 0, 2); - -SELECT 'line_02', ST_AsSVG(GeomFromEWKT('LINESTRING(3429562.6 5799490.68,3429750.99 5799199.87,3429825.45 5799078.39,3429901.8 5798961.45,3429995.54 5798822.93,3430072.89 5798719.46,3430216 5798558.95,3430272.08 5798489.33,3430393.87 5798328.51,3430463.53 5798251.11,3430532.22 5798190.16,3430591.24 5798149.53,3430667.67 5798108.9,3430723.78 5798088.58,3430797.33 5798067.95,3430857.34 5798056.34,3430912.52 5798051.5,3430961.89 5798048.59,3431052.88 5798053.43,3431159.36 5798059.24,3431218.41 5798061.18,3431366.56 5798056.09,3431474.07 5798044.47,3431568.02 5798028.97,3431644.53 5798012.51)'), 1, 2); - - -SELECT 'line_03', ST_AsSVG(GeomFromEWKT('LINESTRING(3429562.6 5799490.68,3429750.99 5799199.87,3429825.45 5799078.39,3429901.8 5798961.45,3429995.54 5798822.93,3430072.89 5798719.46,3430216 5798558.95,3430272.08 5798489.33,3430393.87 5798328.51,3430463.53 5798251.11,3430532.22 5798190.16,3430591.24 5798149.53,3430667.67 5798108.9,3430723.78 5798088.58,3430797.33 5798067.95,3430857.34 5798056.34,3430912.52 5798051.5,3430961.89 5798048.59,3431052.88 5798053.43,3431159.36 5798059.24,3431218.41 5798061.18,3431366.56 5798056.09,3431474.07 5798044.47,3431568.02 5798028.97,3431644.53 5798012.51)'), 0, 0); - -SELECT 'line_04', ST_AsSVG(GeomFromEWKT('LINESTRING(3429562.6 5799490.68,3429750.99 5799199.87,3429825.45 5799078.39,3429901.8 5798961.45,3429995.54 5798822.93,3430072.89 5798719.46,3430216 5798558.95,3430272.08 5798489.33,3430393.87 5798328.51,3430463.53 5798251.11,3430532.22 5798190.16,3430591.24 5798149.53,3430667.67 5798108.9,3430723.78 5798088.58,3430797.33 5798067.95,3430857.34 5798056.34,3430912.52 5798051.5,3430961.89 5798048.59,3431052.88 5798053.43,3431159.36 5798059.24,3431218.41 5798061.18,3431366.56 5798056.09,3431474.07 5798044.47,3431568.02 5798028.97,3431644.53 5798012.51)'), 1, 0); - - - --- --- Polygon --- - --- Geometry from frida project: - -SELECT 'polygon_01', ST_AsSVG(GeomFromEWKT('POLYGON((3429857.62 5799440.07,3429873.86 5799496.16,3429904.86 5799503.55,3429972.77 5799561.12,3430034.77 5799577.36,3430031.82 5799639.36,3430139.59 5799691.03,3430146.97 5799724.99,3430271.57 5799792.88,3430289.29 5799776.64,3430312.91 5799662.95,3430416.27 5799710.2,3430419.22 5799614.22,3430268.61 5799612.75,3430291.3 5799203.76,3430255.86 5799175.7,3430214.51 5799347,3430183.49 5799355.87,3430180.54 5799366.2,3430146.57 5799367.68,3430142.14 5799349.96,3430065.35 5799375.06,3429961.97 5799426.75,3429857.62 5799440.07))'), 0, 2); - -SELECT 'polygon_02', ST_AsSVG(GeomFromEWKT('POLYGON((3429857.62 5799440.07,3429873.86 5799496.16,3429904.86 5799503.55,3429972.77 5799561.12,3430034.77 5799577.36,3430031.82 5799639.36,3430139.59 5799691.03,3430146.97 5799724.99,3430271.57 5799792.88,3430289.29 5799776.64,3430312.91 5799662.95,3430416.27 5799710.2,3430419.22 5799614.22,3430268.61 5799612.75,3430291.3 5799203.76,3430255.86 5799175.7,3430214.51 5799347,3430183.49 5799355.87,3430180.54 5799366.2,3430146.57 5799367.68,3430142.14 5799349.96,3430065.35 5799375.06,3429961.97 5799426.75,3429857.62 5799440.07))'), 1, 2); - -SELECT 'polygon_03', ST_AsSVG(GeomFromEWKT('POLYGON((3429857.62 5799440.07,3429873.86 5799496.16,3429904.86 5799503.55,3429972.77 5799561.12,3430034.77 5799577.36,3430031.82 5799639.36,3430139.59 5799691.03,3430146.97 5799724.99,3430271.57 5799792.88,3430289.29 5799776.64,3430312.91 5799662.95,3430416.27 5799710.2,3430419.22 5799614.22,3430268.61 5799612.75,3430291.3 5799203.76,3430255.86 5799175.7,3430214.51 5799347,3430183.49 5799355.87,3430180.54 5799366.2,3430146.57 5799367.68,3430142.14 5799349.96,3430065.35 5799375.06,3429961.97 5799426.75,3429857.62 5799440.07))'), 0, 0); - -SELECT 'polygon_04', ST_AsSVG(GeomFromEWKT('POLYGON((3429857.62 5799440.07,3429873.86 5799496.16,3429904.86 5799503.55,3429972.77 5799561.12,3430034.77 5799577.36,3430031.82 5799639.36,3430139.59 5799691.03,3430146.97 5799724.99,3430271.57 5799792.88,3430289.29 5799776.64,3430312.91 5799662.95,3430416.27 5799710.2,3430419.22 5799614.22,3430268.61 5799612.75,3430291.3 5799203.76,3430255.86 5799175.7,3430214.51 5799347,3430183.49 5799355.87,3430180.54 5799366.2,3430146.57 5799367.68,3430142.14 5799349.96,3430065.35 5799375.06,3429961.97 5799426.75,3429857.62 5799440.07))'), 1, 0); - - --- --- Multipoint --- - --- SELECT astext(collect(the_geom)) FROM poi WHERE poitypname='Schule'; --- Geometry from frida project: - -SELECT 'multipoint_01', ST_AsSVG(GeomFromEWKT('MULTIPOINT(3433276.43 5795308.93,3428545.3 5795827.75,3431576.99 5799084.19,3431724.2 5797152.59,3431984.2 5796564.79,3435147.61 5797649.58,3434660.86 5796941.74,3434674.52 5797030.54,3435714.36 5797022.6,3436368.88 5796951.04,3436730.03 5796768.6,3435538.55 5796267.1,3435847.22 5795917.96,3434312.09 5794846.02,3433121.69 5793670.73,3433176.36 5793489.29,3434316.04 5793940.09,3433222.92 5793040.49,3433416.13 5792891.62,3430717.47 5792600.58,3435384.08 5792877.68,3435229.15 5792177.25,3435120 5792319.07,3435088.72 5792111.21,3434484.89 5792110.2,3435777.91 5792419.49,3435717.37 5794318.12,3436895.13 5794569.43,3437621.86 5793931.6,3435597.14 5793467.9,3435246.51 5793394.63,3434722.1 5793374.87,3434712.16 5793810.3,3434773.28 5793816.87,3434629.91 5793855.31,3434992.34 5794140.1,3434927.13 5794252.29,3434958.58 5794286.16,3435120.48 5794163.36,3435850.1 5791727.49,3435930.75 5791636.32,3436268.87 5791882.68,3437110.23 5791664.12,3435960.34 5790928.2,3433545.81 5789755.43,3439096.86 5790884.26,3438576.87 5795046.69,3438396.95 5794858.59,3438193.25 5794695.6,3438447.92 5796130.77,3440688.22 5793670.37)'), 0, 2); - -SELECT 'multipoint_02', ST_AsSVG(GeomFromEWKT('MULTIPOINT(3433276.43 5795308.93,3428545.3 5795827.75,3431576.99 5799084.19,3431724.2 5797152.59,3431984.2 5796564.79,3435147.61 5797649.58,3434660.86 5796941.74,3434674.52 5797030.54,3435714.36 5797022.6,3436368.88 5796951.04,3436730.03 5796768.6,3435538.55 5796267.1,3435847.22 5795917.96,3434312.09 5794846.02,3433121.69 5793670.73,3433176.36 5793489.29,3434316.04 5793940.09,3433222.92 5793040.49,3433416.13 5792891.62,3430717.47 5792600.58,3435384.08 5792877.68,3435229.15 5792177.25,3435120 5792319.07,3435088.72 5792111.21,3434484.89 5792110.2,3435777.91 5792419.49,3435717.37 5794318.12,3436895.13 5794569.43,3437621.86 5793931.6,3435597.14 5793467.9,3435246.51 5793394.63,3434722.1 5793374.87,3434712.16 5793810.3,3434773.28 5793816.87,3434629.91 5793855.31,3434992.34 5794140.1,3434927.13 5794252.29,3434958.58 5794286.16,3435120.48 5794163.36,3435850.1 5791727.49,3435930.75 5791636.32,3436268.87 5791882.68,3437110.23 5791664.12,3435960.34 5790928.2,3433545.81 5789755.43,3439096.86 5790884.26,3438576.87 5795046.69,3438396.95 5794858.59,3438193.25 5794695.6,3438447.92 5796130.77,3440688.22 5793670.37)'), 1, 2); - - -SELECT 'multipoint_03', ST_AsSVG(GeomFromEWKT('MULTIPOINT(3433276.43 5795308.93,3428545.3 5795827.75,3431576.99 5799084.19,3431724.2 5797152.59,3431984.2 5796564.79,3435147.61 5797649.58,3434660.86 5796941.74,3434674.52 5797030.54,3435714.36 5797022.6,3436368.88 5796951.04,3436730.03 5796768.6,3435538.55 5796267.1,3435847.22 5795917.96,3434312.09 5794846.02,3433121.69 5793670.73,3433176.36 5793489.29,3434316.04 5793940.09,3433222.92 5793040.49,3433416.13 5792891.62,3430717.47 5792600.58,3435384.08 5792877.68,3435229.15 5792177.25,3435120 5792319.07,3435088.72 5792111.21,3434484.89 5792110.2,3435777.91 5792419.49,3435717.37 5794318.12,3436895.13 5794569.43,3437621.86 5793931.6,3435597.14 5793467.9,3435246.51 5793394.63,3434722.1 5793374.87,3434712.16 5793810.3,3434773.28 5793816.87,3434629.91 5793855.31,3434992.34 5794140.1,3434927.13 5794252.29,3434958.58 5794286.16,3435120.48 5794163.36,3435850.1 5791727.49,3435930.75 5791636.32,3436268.87 5791882.68,3437110.23 5791664.12,3435960.34 5790928.2,3433545.81 5789755.43,3439096.86 5790884.26,3438576.87 5795046.69,3438396.95 5794858.59,3438193.25 5794695.6,3438447.92 5796130.77,3440688.22 5793670.37)'), 0, 0); - -SELECT 'multipoint_04', ST_AsSVG(GeomFromEWKT('MULTIPOINT(3433276.43 5795308.93,3428545.3 5795827.75,3431576.99 5799084.19,3431724.2 5797152.59,3431984.2 5796564.79,3435147.61 5797649.58,3434660.86 5796941.74,3434674.52 5797030.54,3435714.36 5797022.6,3436368.88 5796951.04,3436730.03 5796768.6,3435538.55 5796267.1,3435847.22 5795917.96,3434312.09 5794846.02,3433121.69 5793670.73,3433176.36 5793489.29,3434316.04 5793940.09,3433222.92 5793040.49,3433416.13 5792891.62,3430717.47 5792600.58,3435384.08 5792877.68,3435229.15 5792177.25,3435120 5792319.07,3435088.72 5792111.21,3434484.89 5792110.2,3435777.91 5792419.49,3435717.37 5794318.12,3436895.13 5794569.43,3437621.86 5793931.6,3435597.14 5793467.9,3435246.51 5793394.63,3434722.1 5793374.87,3434712.16 5793810.3,3434773.28 5793816.87,3434629.91 5793855.31,3434992.34 5794140.1,3434927.13 5794252.29,3434958.58 5794286.16,3435120.48 5794163.36,3435850.1 5791727.49,3435930.75 5791636.32,3436268.87 5791882.68,3437110.23 5791664.12,3435960.34 5790928.2,3433545.81 5789755.43,3439096.86 5790884.26,3438576.87 5795046.69,3438396.95 5794858.59,3438193.25 5794695.6,3438447.92 5796130.77,3440688.22 5793670.37)'), 1, 0); - - - --- --- MultiLine --- --- Geometry from frida project: --- SELECT st_astext(st_linemerge(the_geom)) FROM river WHERE glname='Stichkanal'; - -SELECT 'multiline_01', ST_AsSVG(GeomFromEWKT('MULTILINESTRING((3429562.6 5799490.68,3429750.99 5799199.87,3429825.45 5799078.39,3429901.8 5798961.45,3429995.54 5798822.93,3430072.89 5798719.46,3430216 5798558.95,3430272.08 5798489.33,3430393.87 5798328.51,3430463.53 5798251.11,3430532.22 5798190.16,3430591.24 5798149.53,3430667.67 5798108.9,3430723.78 5798088.58,3430797.33 5798067.95,3430857.34 5798056.34,3430912.52 5798051.5,3430961.89 5798048.59,3431052.88 5798053.43,3431159.36 5798059.24,3431218.41 5798061.18,3431366.56 5798056.09,3431474.07 5798044.47,3431568.02 5798028.97,3431644.53 5798012.51),(3433260.06 5797002.92,3433234.61 5797070.25,3433138.56 5797278.81,3433074.19 5797398.94,3433033.73 5797461.79,3432961.43 5797551.84,3432882.76 5797626.57,3432780.32 5797701.09,3432706.28 5797743.23,3432542.66 5797808.05,3432360.32 5797842.47,3432258.52 5797836.77,3432197.62 5797837.57,3432081.75 5797865.64,3431876.6 5797945.1,3431865.15 5797948.73),(3431865.15 5797948.73,3431644.53 5798012.51),(3431865.15 5797948.73,3431815.75 5797807.76),(3433260.06 5797002.92,3433361.19 5796788.54,3433467.4 5796572.78,3433670.6 5796160.06),(3433670.6 5796160.06,3433709.27 5796096.88,3433744.46 5796021.84,3433861.98 5795869.38,3434029.1 5795680.43,3434229.42 5795456.34,3434239.36 5795425.11,3434296.02 5795363.18))'), 0, 2); - -SELECT 'multiline_02', ST_AsSVG(GeomFromEWKT('MULTILINESTRING((3429562.6 5799490.68,3429750.99 5799199.87,3429825.45 5799078.39,3429901.8 5798961.45,3429995.54 5798822.93,3430072.89 5798719.46,3430216 5798558.95,3430272.08 5798489.33,3430393.87 5798328.51,3430463.53 5798251.11,3430532.22 5798190.16,3430591.24 5798149.53,3430667.67 5798108.9,3430723.78 5798088.58,3430797.33 5798067.95,3430857.34 5798056.34,3430912.52 5798051.5,3430961.89 5798048.59,3431052.88 5798053.43,3431159.36 5798059.24,3431218.41 5798061.18,3431366.56 5798056.09,3431474.07 5798044.47,3431568.02 5798028.97,3431644.53 5798012.51),(3433260.06 5797002.92,3433234.61 5797070.25,3433138.56 5797278.81,3433074.19 5797398.94,3433033.73 5797461.79,3432961.43 5797551.84,3432882.76 5797626.57,3432780.32 5797701.09,3432706.28 5797743.23,3432542.66 5797808.05,3432360.32 5797842.47,3432258.52 5797836.77,3432197.62 5797837.57,3432081.75 5797865.64,3431876.6 5797945.1,3431865.15 5797948.73),(3431865.15 5797948.73,3431644.53 5798012.51),(3431865.15 5797948.73,3431815.75 5797807.76),(3433260.06 5797002.92,3433361.19 5796788.54,3433467.4 5796572.78,3433670.6 5796160.06),(3433670.6 5796160.06,3433709.27 5796096.88,3433744.46 5796021.84,3433861.98 5795869.38,3434029.1 5795680.43,3434229.42 5795456.34,3434239.36 5795425.11,3434296.02 5795363.18))'), 1, 2); - -SELECT 'multiline_03', ST_AsSVG(GeomFromEWKT('MULTILINESTRING((3429562.6 5799490.68,3429750.99 5799199.87,3429825.45 5799078.39,3429901.8 5798961.45,3429995.54 5798822.93,3430072.89 5798719.46,3430216 5798558.95,3430272.08 5798489.33,3430393.87 5798328.51,3430463.53 5798251.11,3430532.22 5798190.16,3430591.24 5798149.53,3430667.67 5798108.9,3430723.78 5798088.58,3430797.33 5798067.95,3430857.34 5798056.34,3430912.52 5798051.5,3430961.89 5798048.59,3431052.88 5798053.43,3431159.36 5798059.24,3431218.41 5798061.18,3431366.56 5798056.09,3431474.07 5798044.47,3431568.02 5798028.97,3431644.53 5798012.51),(3433260.06 5797002.92,3433234.61 5797070.25,3433138.56 5797278.81,3433074.19 5797398.94,3433033.73 5797461.79,3432961.43 5797551.84,3432882.76 5797626.57,3432780.32 5797701.09,3432706.28 5797743.23,3432542.66 5797808.05,3432360.32 5797842.47,3432258.52 5797836.77,3432197.62 5797837.57,3432081.75 5797865.64,3431876.6 5797945.1,3431865.15 5797948.73),(3431865.15 5797948.73,3431644.53 5798012.51),(3431865.15 5797948.73,3431815.75 5797807.76),(3433260.06 5797002.92,3433361.19 5796788.54,3433467.4 5796572.78,3433670.6 5796160.06),(3433670.6 5796160.06,3433709.27 5796096.88,3433744.46 5796021.84,3433861.98 5795869.38,3434029.1 5795680.43,3434229.42 5795456.34,3434239.36 5795425.11,3434296.02 5795363.18))'), 0, 0); - -SELECT 'multiline_04', ST_AsSVG(GeomFromEWKT('MULTILINESTRING((3429562.6 5799490.68,3429750.99 5799199.87,3429825.45 5799078.39,3429901.8 5798961.45,3429995.54 5798822.93,3430072.89 5798719.46,3430216 5798558.95,3430272.08 5798489.33,3430393.87 5798328.51,3430463.53 5798251.11,3430532.22 5798190.16,3430591.24 5798149.53,3430667.67 5798108.9,3430723.78 5798088.58,3430797.33 5798067.95,3430857.34 5798056.34,3430912.52 5798051.5,3430961.89 5798048.59,3431052.88 5798053.43,3431159.36 5798059.24,3431218.41 5798061.18,3431366.56 5798056.09,3431474.07 5798044.47,3431568.02 5798028.97,3431644.53 5798012.51),(3433260.06 5797002.92,3433234.61 5797070.25,3433138.56 5797278.81,3433074.19 5797398.94,3433033.73 5797461.79,3432961.43 5797551.84,3432882.76 5797626.57,3432780.32 5797701.09,3432706.28 5797743.23,3432542.66 5797808.05,3432360.32 5797842.47,3432258.52 5797836.77,3432197.62 5797837.57,3432081.75 5797865.64,3431876.6 5797945.1,3431865.15 5797948.73),(3431865.15 5797948.73,3431644.53 5798012.51),(3431865.15 5797948.73,3431815.75 5797807.76),(3433260.06 5797002.92,3433361.19 5796788.54,3433467.4 5796572.78,3433670.6 5796160.06),(3433670.6 5796160.06,3433709.27 5796096.88,3433744.46 5796021.84,3433861.98 5795869.38,3434029.1 5795680.43,3434229.42 5795456.34,3434239.36 5795425.11,3434296.02 5795363.18))'), 1, 0); - - - --- --- MultiPolygon --- - --- Geometry from frida project: --- Leyer Holz Park --- st_astext(geomunion(the_geom)) FROM park WHERE gfname='Leyer Holz'; - -SELECT 'multipolygon_01', ST_AsSVG(GeomFromEWKT('MULTIPOLYGON(((3429699.81 5795851.64,3429736.72 5795796.01,3429754.71 5795768.88,3429996.1 5795489.98,3430100.67 5795435.76,3430122.61 5795446.09,3430138.1 5795560.98,3430311.09 5795559.69,3430309.8 5795470.62,3430329.16 5795416.4,3430326.58 5795399.62,3430157.47 5795418.98,3430156.14 5795407.32,3430139.36 5795396.99,3429983.19 5795394.41,3429976.74 5795420.22,3429789.59 5795418.93,3429643.74 5795475.72,3429635.72 5795615.31,3429484.94 5795556.38,3429315.44 5795496.32,3429326.12 5795748.57,3429129.92 5795704.53,3429176.64 5795776.6,3429100.6 5795797.17,3428900.44 5795742.46,3428896.43 5795779.82,3428805.69 5795953.3,3428897.77 5796025.35,3428897.77 5796225.99,3428696.32 5796199.31,3428681.64 5796217.99,3428680.31 5796290.03,3428290.14 5796351.8,3428389.67 5796413.87,3428837.71 5796561.12,3428991.08 5796495.01,3429076.4 5796760.29,3429428.31 5796723.61,3429474.96 5796690.29,3429696.2 5796600.99,3429658.88 5796429.06,3429536.27 5796363.75,3429529.6 5796333.1,3429446.08 5796253.84,3429699.81 5795851.64)),((3429857.62 5799440.07,3429873.86 5799496.16,3429904.86 5799503.55,3429972.77 5799561.12,3430034.77 5799577.36,3430031.82 5799639.36,3430139.59 5799691.03,3430146.97 5799724.99,3430271.57 5799792.88,3430289.29 5799776.64,3430312.91 5799662.95,3430416.27 5799710.2,3430419.22 5799614.22,3430268.61 5799612.75,3430291.3 5799203.76,3430255.86 5799175.7,3430214.51 5799347,3430183.49 5799355.87,3430180.54 5799366.2,3430146.57 5799367.68,3430142.14 5799349.96,3430065.35 5799375.06,3429961.97 5799426.75,3429857.62 5799440.07)))'), 0, 2); - -SELECT 'multipolygon_02', ST_AsSVG(GeomFromEWKT('MULTIPOLYGON(((3429699.81 5795851.64,3429736.72 5795796.01,3429754.71 5795768.88,3429996.1 5795489.98,3430100.67 5795435.76,3430122.61 5795446.09,3430138.1 5795560.98,3430311.09 5795559.69,3430309.8 5795470.62,3430329.16 5795416.4,3430326.58 5795399.62,3430157.47 5795418.98,3430156.14 5795407.32,3430139.36 5795396.99,3429983.19 5795394.41,3429976.74 5795420.22,3429789.59 5795418.93,3429643.74 5795475.72,3429635.72 5795615.31,3429484.94 5795556.38,3429315.44 5795496.32,3429326.12 5795748.57,3429129.92 5795704.53,3429176.64 5795776.6,3429100.6 5795797.17,3428900.44 5795742.46,3428896.43 5795779.82,3428805.69 5795953.3,3428897.77 5796025.35,3428897.77 5796225.99,3428696.32 5796199.31,3428681.64 5796217.99,3428680.31 5796290.03,3428290.14 5796351.8,3428389.67 5796413.87,3428837.71 5796561.12,3428991.08 5796495.01,3429076.4 5796760.29,3429428.31 5796723.61,3429474.96 5796690.29,3429696.2 5796600.99,3429658.88 5796429.06,3429536.27 5796363.75,3429529.6 5796333.1,3429446.08 5796253.84,3429699.81 5795851.64)),((3429857.62 5799440.07,3429873.86 5799496.16,3429904.86 5799503.55,3429972.77 5799561.12,3430034.77 5799577.36,3430031.82 5799639.36,3430139.59 5799691.03,3430146.97 5799724.99,3430271.57 5799792.88,3430289.29 5799776.64,3430312.91 5799662.95,3430416.27 5799710.2,3430419.22 5799614.22,3430268.61 5799612.75,3430291.3 5799203.76,3430255.86 5799175.7,3430214.51 5799347,3430183.49 5799355.87,3430180.54 5799366.2,3430146.57 5799367.68,3430142.14 5799349.96,3430065.35 5799375.06,3429961.97 5799426.75,3429857.62 5799440.07)))'), 1, 2); - -SELECT 'multipolygon_03', ST_AsSVG(GeomFromEWKT('MULTIPOLYGON(((3429699.81 5795851.64,3429736.72 5795796.01,3429754.71 5795768.88,3429996.1 5795489.98,3430100.67 5795435.76,3430122.61 5795446.09,3430138.1 5795560.98,3430311.09 5795559.69,3430309.8 5795470.62,3430329.16 5795416.4,3430326.58 5795399.62,3430157.47 5795418.98,3430156.14 5795407.32,3430139.36 5795396.99,3429983.19 5795394.41,3429976.74 5795420.22,3429789.59 5795418.93,3429643.74 5795475.72,3429635.72 5795615.31,3429484.94 5795556.38,3429315.44 5795496.32,3429326.12 5795748.57,3429129.92 5795704.53,3429176.64 5795776.6,3429100.6 5795797.17,3428900.44 5795742.46,3428896.43 5795779.82,3428805.69 5795953.3,3428897.77 5796025.35,3428897.77 5796225.99,3428696.32 5796199.31,3428681.64 5796217.99,3428680.31 5796290.03,3428290.14 5796351.8,3428389.67 5796413.87,3428837.71 5796561.12,3428991.08 5796495.01,3429076.4 5796760.29,3429428.31 5796723.61,3429474.96 5796690.29,3429696.2 5796600.99,3429658.88 5796429.06,3429536.27 5796363.75,3429529.6 5796333.1,3429446.08 5796253.84,3429699.81 5795851.64)),((3429857.62 5799440.07,3429873.86 5799496.16,3429904.86 5799503.55,3429972.77 5799561.12,3430034.77 5799577.36,3430031.82 5799639.36,3430139.59 5799691.03,3430146.97 5799724.99,3430271.57 5799792.88,3430289.29 5799776.64,3430312.91 5799662.95,3430416.27 5799710.2,3430419.22 5799614.22,3430268.61 5799612.75,3430291.3 5799203.76,3430255.86 5799175.7,3430214.51 5799347,3430183.49 5799355.87,3430180.54 5799366.2,3430146.57 5799367.68,3430142.14 5799349.96,3430065.35 5799375.06,3429961.97 5799426.75,3429857.62 5799440.07)))'), 0, 0); - -SELECT 'multipolygon_04', ST_AsSVG(GeomFromEWKT('MULTIPOLYGON(((3429699.81 5795851.64,3429736.72 5795796.01,3429754.71 5795768.88,3429996.1 5795489.98,3430100.67 5795435.76,3430122.61 5795446.09,3430138.1 5795560.98,3430311.09 5795559.69,3430309.8 5795470.62,3430329.16 5795416.4,3430326.58 5795399.62,3430157.47 5795418.98,3430156.14 5795407.32,3430139.36 5795396.99,3429983.19 5795394.41,3429976.74 5795420.22,3429789.59 5795418.93,3429643.74 5795475.72,3429635.72 5795615.31,3429484.94 5795556.38,3429315.44 5795496.32,3429326.12 5795748.57,3429129.92 5795704.53,3429176.64 5795776.6,3429100.6 5795797.17,3428900.44 5795742.46,3428896.43 5795779.82,3428805.69 5795953.3,3428897.77 5796025.35,3428897.77 5796225.99,3428696.32 5796199.31,3428681.64 5796217.99,3428680.31 5796290.03,3428290.14 5796351.8,3428389.67 5796413.87,3428837.71 5796561.12,3428991.08 5796495.01,3429076.4 5796760.29,3429428.31 5796723.61,3429474.96 5796690.29,3429696.2 5796600.99,3429658.88 5796429.06,3429536.27 5796363.75,3429529.6 5796333.1,3429446.08 5796253.84,3429699.81 5795851.64)),((3429857.62 5799440.07,3429873.86 5799496.16,3429904.86 5799503.55,3429972.77 5799561.12,3430034.77 5799577.36,3430031.82 5799639.36,3430139.59 5799691.03,3430146.97 5799724.99,3430271.57 5799792.88,3430289.29 5799776.64,3430312.91 5799662.95,3430416.27 5799710.2,3430419.22 5799614.22,3430268.61 5799612.75,3430291.3 5799203.76,3430255.86 5799175.7,3430214.51 5799347,3430183.49 5799355.87,3430180.54 5799366.2,3430146.57 5799367.68,3430142.14 5799349.96,3430065.35 5799375.06,3429961.97 5799426.75,3429857.62 5799440.07)))'), 1, 0); - - --- --- GeometryCollection --- - --- SELECT astext(collect((SELECT collect(the_geom) FROM poi WHERE poitypname='Schule'), (SELECT collect(st_linemerge(the_geom)) FROM river WHERE glname='Stichkanal'))); - --- Geometry from frida project: -SELECT 'geometrycollection_01', ST_AsSVG(GeomFromEWKT('GEOMETRYCOLLECTION(MULTIPOINT(3433276.43 5795308.93,3428545.3 5795827.75,3431576.99 5799084.19,3431724.2 5797152.59,3431984.2 5796564.79,3435147.61 5797649.58,3434660.86 5796941.74,3434674.52 5797030.54,3435714.36 5797022.6,3436368.88 5796951.04,3436730.03 5796768.6,3435538.55 5796267.1,3435847.22 5795917.96,3434312.09 5794846.02,3433121.69 5793670.73,3433176.36 5793489.29,3434316.04 5793940.09,3433222.92 5793040.49,3433416.13 5792891.62,3430717.47 5792600.58,3435384.08 5792877.68,3435229.15 5792177.25,3435120 5792319.07,3435088.72 5792111.21,3434484.89 5792110.2,3435777.91 5792419.49,3435717.37 5794318.12,3436895.13 5794569.43,3437621.86 5793931.6,3435597.14 5793467.9,3435246.51 5793394.63,3434722.1 5793374.87,3434712.16 5793810.3,3434773.28 5793816.87,3434629.91 5793855.31,3434992.34 5794140.1,3434927.13 5794252.29,3434958.58 5794286.16,3435120.48 5794163.36,3435850.1 5791727.49,3435930.75 5791636.32,3436268.87 5791882.68,3437110.23 5791664.12,3435960.34 5790928.2,3433545.81 5789755.43,3439096.86 5790884.26,3438576.87 5795046.69,3438396.95 5794858.59,3438193.25 5794695.6,3438447.92 5796130.77,3440688.22 5793670.37),MULTILINESTRING((3429562.6 5799490.68,3429750.99 5799199.87,3429825.45 5799078.39,3429901.8 5798961.45,3429995.54 5798822.93,3430072.89 5798719.46,3430216 5798558.95,3430272.08 5798489.33,3430393.87 5798328.51,3430463.53 5798251.11,3430532.22 5798190.16,3430591.24 5798149.53,3430667.67 5798108.9,3430723.78 5798088.58,3430797.33 5798067.95,3430857.34 5798056.34,3430912.52 5798051.5,3430961.89 5798048.59,3431052.88 5798053.43,3431159.36 5798059.24,3431218.41 5798061.18,3431366.56 5798056.09,3431474.07 5798044.47,3431568.02 5798028.97,3431644.53 5798012.51),(3433260.06 5797002.92,3433234.61 5797070.25,3433138.56 5797278.81,3433074.19 5797398.94,3433033.73 5797461.79,3432961.43 5797551.84,3432882.76 5797626.57,3432780.32 5797701.09,3432706.28 5797743.23,3432542.66 5797808.05,3432360.32 5797842.47,3432258.52 5797836.77,3432197.62 5797837.57,3432081.75 5797865.64,3431876.6 5797945.1,3431865.15 5797948.73),(3431865.15 5797948.73,3431644.53 5798012.51),(3431865.15 5797948.73,3431815.75 5797807.76),(3433260.06 5797002.92,3433361.19 5796788.54,3433467.4 5796572.78,3433670.6 5796160.06),(3433670.6 5796160.06,3433709.27 5796096.88,3433744.46 5796021.84,3433861.98 5795869.38,3434029.1 5795680.43,3434229.42 5795456.34,3434239.36 5795425.11,3434296.02 5795363.18)))'), 0, 2); - - -SELECT 'geometrycollection_02', ST_AsSVG(GeomFromEWKT('GEOMETRYCOLLECTION(MULTIPOINT(3433276.43 5795308.93,3428545.3 5795827.75,3431576.99 5799084.19,3431724.2 5797152.59,3431984.2 5796564.79,3435147.61 5797649.58,3434660.86 5796941.74,3434674.52 5797030.54,3435714.36 5797022.6,3436368.88 5796951.04,3436730.03 5796768.6,3435538.55 5796267.1,3435847.22 5795917.96,3434312.09 5794846.02,3433121.69 5793670.73,3433176.36 5793489.29,3434316.04 5793940.09,3433222.92 5793040.49,3433416.13 5792891.62,3430717.47 5792600.58,3435384.08 5792877.68,3435229.15 5792177.25,3435120 5792319.07,3435088.72 5792111.21,3434484.89 5792110.2,3435777.91 5792419.49,3435717.37 5794318.12,3436895.13 5794569.43,3437621.86 5793931.6,3435597.14 5793467.9,3435246.51 5793394.63,3434722.1 5793374.87,3434712.16 5793810.3,3434773.28 5793816.87,3434629.91 5793855.31,3434992.34 5794140.1,3434927.13 5794252.29,3434958.58 5794286.16,3435120.48 5794163.36,3435850.1 5791727.49,3435930.75 5791636.32,3436268.87 5791882.68,3437110.23 5791664.12,3435960.34 5790928.2,3433545.81 5789755.43,3439096.86 5790884.26,3438576.87 5795046.69,3438396.95 5794858.59,3438193.25 5794695.6,3438447.92 5796130.77,3440688.22 5793670.37),MULTILINESTRING((3429562.6 5799490.68,3429750.99 5799199.87,3429825.45 5799078.39,3429901.8 5798961.45,3429995.54 5798822.93,3430072.89 5798719.46,3430216 5798558.95,3430272.08 5798489.33,3430393.87 5798328.51,3430463.53 5798251.11,3430532.22 5798190.16,3430591.24 5798149.53,3430667.67 5798108.9,3430723.78 5798088.58,3430797.33 5798067.95,3430857.34 5798056.34,3430912.52 5798051.5,3430961.89 5798048.59,3431052.88 5798053.43,3431159.36 5798059.24,3431218.41 5798061.18,3431366.56 5798056.09,3431474.07 5798044.47,3431568.02 5798028.97,3431644.53 5798012.51),(3433260.06 5797002.92,3433234.61 5797070.25,3433138.56 5797278.81,3433074.19 5797398.94,3433033.73 5797461.79,3432961.43 5797551.84,3432882.76 5797626.57,3432780.32 5797701.09,3432706.28 5797743.23,3432542.66 5797808.05,3432360.32 5797842.47,3432258.52 5797836.77,3432197.62 5797837.57,3432081.75 5797865.64,3431876.6 5797945.1,3431865.15 5797948.73),(3431865.15 5797948.73,3431644.53 5798012.51),(3431865.15 5797948.73,3431815.75 5797807.76),(3433260.06 5797002.92,3433361.19 5796788.54,3433467.4 5796572.78,3433670.6 5796160.06),(3433670.6 5796160.06,3433709.27 5796096.88,3433744.46 5796021.84,3433861.98 5795869.38,3434029.1 5795680.43,3434229.42 5795456.34,3434239.36 5795425.11,3434296.02 5795363.18)))'), 1, 2); - - -SELECT 'geometrycollection_03', ST_AsSVG(GeomFromEWKT('GEOMETRYCOLLECTION(MULTIPOINT(3433276.43 5795308.93,3428545.3 5795827.75,3431576.99 5799084.19,3431724.2 5797152.59,3431984.2 5796564.79,3435147.61 5797649.58,3434660.86 5796941.74,3434674.52 5797030.54,3435714.36 5797022.6,3436368.88 5796951.04,3436730.03 5796768.6,3435538.55 5796267.1,3435847.22 5795917.96,3434312.09 5794846.02,3433121.69 5793670.73,3433176.36 5793489.29,3434316.04 5793940.09,3433222.92 5793040.49,3433416.13 5792891.62,3430717.47 5792600.58,3435384.08 5792877.68,3435229.15 5792177.25,3435120 5792319.07,3435088.72 5792111.21,3434484.89 5792110.2,3435777.91 5792419.49,3435717.37 5794318.12,3436895.13 5794569.43,3437621.86 5793931.6,3435597.14 5793467.9,3435246.51 5793394.63,3434722.1 5793374.87,3434712.16 5793810.3,3434773.28 5793816.87,3434629.91 5793855.31,3434992.34 5794140.1,3434927.13 5794252.29,3434958.58 5794286.16,3435120.48 5794163.36,3435850.1 5791727.49,3435930.75 5791636.32,3436268.87 5791882.68,3437110.23 5791664.12,3435960.34 5790928.2,3433545.81 5789755.43,3439096.86 5790884.26,3438576.87 5795046.69,3438396.95 5794858.59,3438193.25 5794695.6,3438447.92 5796130.77,3440688.22 5793670.37),MULTILINESTRING((3429562.6 5799490.68,3429750.99 5799199.87,3429825.45 5799078.39,3429901.8 5798961.45,3429995.54 5798822.93,3430072.89 5798719.46,3430216 5798558.95,3430272.08 5798489.33,3430393.87 5798328.51,3430463.53 5798251.11,3430532.22 5798190.16,3430591.24 5798149.53,3430667.67 5798108.9,3430723.78 5798088.58,3430797.33 5798067.95,3430857.34 5798056.34,3430912.52 5798051.5,3430961.89 5798048.59,3431052.88 5798053.43,3431159.36 5798059.24,3431218.41 5798061.18,3431366.56 5798056.09,3431474.07 5798044.47,3431568.02 5798028.97,3431644.53 5798012.51),(3433260.06 5797002.92,3433234.61 5797070.25,3433138.56 5797278.81,3433074.19 5797398.94,3433033.73 5797461.79,3432961.43 5797551.84,3432882.76 5797626.57,3432780.32 5797701.09,3432706.28 5797743.23,3432542.66 5797808.05,3432360.32 5797842.47,3432258.52 5797836.77,3432197.62 5797837.57,3432081.75 5797865.64,3431876.6 5797945.1,3431865.15 5797948.73),(3431865.15 5797948.73,3431644.53 5798012.51),(3431865.15 5797948.73,3431815.75 5797807.76),(3433260.06 5797002.92,3433361.19 5796788.54,3433467.4 5796572.78,3433670.6 5796160.06),(3433670.6 5796160.06,3433709.27 5796096.88,3433744.46 5796021.84,3433861.98 5795869.38,3434029.1 5795680.43,3434229.42 5795456.34,3434239.36 5795425.11,3434296.02 5795363.18)))'), 0, 0); - - -SELECT 'geometrycollection_04', ST_AsSVG(GeomFromEWKT('GEOMETRYCOLLECTION(MULTIPOINT(3433276.43 5795308.93,3428545.3 5795827.75,3431576.99 5799084.19,3431724.2 5797152.59,3431984.2 5796564.79,3435147.61 5797649.58,3434660.86 5796941.74,3434674.52 5797030.54,3435714.36 5797022.6,3436368.88 5796951.04,3436730.03 5796768.6,3435538.55 5796267.1,3435847.22 5795917.96,3434312.09 5794846.02,3433121.69 5793670.73,3433176.36 5793489.29,3434316.04 5793940.09,3433222.92 5793040.49,3433416.13 5792891.62,3430717.47 5792600.58,3435384.08 5792877.68,3435229.15 5792177.25,3435120 5792319.07,3435088.72 5792111.21,3434484.89 5792110.2,3435777.91 5792419.49,3435717.37 5794318.12,3436895.13 5794569.43,3437621.86 5793931.6,3435597.14 5793467.9,3435246.51 5793394.63,3434722.1 5793374.87,3434712.16 5793810.3,3434773.28 5793816.87,3434629.91 5793855.31,3434992.34 5794140.1,3434927.13 5794252.29,3434958.58 5794286.16,3435120.48 5794163.36,3435850.1 5791727.49,3435930.75 5791636.32,3436268.87 5791882.68,3437110.23 5791664.12,3435960.34 5790928.2,3433545.81 5789755.43,3439096.86 5790884.26,3438576.87 5795046.69,3438396.95 5794858.59,3438193.25 5794695.6,3438447.92 5796130.77,3440688.22 5793670.37),MULTILINESTRING((3429562.6 5799490.68,3429750.99 5799199.87,3429825.45 5799078.39,3429901.8 5798961.45,3429995.54 5798822.93,3430072.89 5798719.46,3430216 5798558.95,3430272.08 5798489.33,3430393.87 5798328.51,3430463.53 5798251.11,3430532.22 5798190.16,3430591.24 5798149.53,3430667.67 5798108.9,3430723.78 5798088.58,3430797.33 5798067.95,3430857.34 5798056.34,3430912.52 5798051.5,3430961.89 5798048.59,3431052.88 5798053.43,3431159.36 5798059.24,3431218.41 5798061.18,3431366.56 5798056.09,3431474.07 5798044.47,3431568.02 5798028.97,3431644.53 5798012.51),(3433260.06 5797002.92,3433234.61 5797070.25,3433138.56 5797278.81,3433074.19 5797398.94,3433033.73 5797461.79,3432961.43 5797551.84,3432882.76 5797626.57,3432780.32 5797701.09,3432706.28 5797743.23,3432542.66 5797808.05,3432360.32 5797842.47,3432258.52 5797836.77,3432197.62 5797837.57,3432081.75 5797865.64,3431876.6 5797945.1,3431865.15 5797948.73),(3431865.15 5797948.73,3431644.53 5798012.51),(3431865.15 5797948.73,3431815.75 5797807.76),(3433260.06 5797002.92,3433361.19 5796788.54,3433467.4 5796572.78,3433670.6 5796160.06),(3433670.6 5796160.06,3433709.27 5796096.88,3433744.46 5796021.84,3433861.98 5795869.38,3434029.1 5795680.43,3434229.42 5795456.34,3434239.36 5795425.11,3434296.02 5795363.18)))'), 1, 0); --- --- Unsupported Geometry --- (From AsKml units test) --- -SELECT 'invalid_01', ST_AsSVG(GeomFromEWKT('SRID=4326;CIRCULARSTRING(-2 0,0 2,2 0,0 2,2 4)')); -SELECT 'invalid_02', ST_AsSVG(GeomFromEWKT('SRID=4326;COMPOUNDCURVE(CIRCULARSTRING(0 0,1 1,1 0),(1 0,0 1))')); -SELECT 'invalid_03', ST_AsSVG(GeomFromEWKT('SRID=4326;CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0))')); -SELECT 'invalid_04', ST_AsSVG(GeomFromEWKT('SRID=4326;MULTICURVE((5 5,3 5,3 3,0 3),CIRCULARSTRING(0 0,2 1,2 2))')); -SELECT 'invalid_05', ST_AsSVG(GeomFromEWKT('SRID=4326;MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)),((7 8,10 10,6 14,4 11,7 8)))')); - - --- --- 3D Data --- -SELECT '3D_01', ST_AsSVG(GeomFromEWKT('SRID=4326;POINT(1 1 1)')); -SELECT '3D_02', ST_AsSVG(GeomFromEWKT('SRID=4326;POINT(1 1 1)'), 0); -SELECT '3D_03', ST_AsSVG(GeomFromEWKT('SRID=4326;LINESTRING(1 1 1, 2 2 2, 3 3 3, 4 4 4)'), 0); -SELECT '3D_04', ST_AsSVG(GeomFromEWKT('SRID=4326;POLYGON((1 1 1, 2 2 2, 3 3 3, 4 4 4, 5 5 5, 5 0 0, 1 1 1))'), 0); - - --- EMPTY GEOMETRYCOLLECTION #409 -SELECT '#409', ST_AsSVG(GeomFromEWKT('GEOMETRYCOLLECTION EMPTY')); - --- --- Delete inserted spatial data --- -DELETE FROM spatial_ref_sys WHERE srid = 4326; -DELETE FROM spatial_ref_sys WHERE srid = 27572; -DELETE FROM spatial_ref_sys WHERE srid = 31467; diff -Nru postgis-1.5.3/regress/svg_expected postgis-2.0.1/regress/svg_expected --- postgis-1.5.3/regress/svg_expected 2010-12-14 13:14:14.000000000 +0000 +++ postgis-2.0.1/regress/svg_expected 1970-01-01 00:00:00.000000000 +0000 @@ -1,44 +0,0 @@ -simple_point|cx="1" cy="-1" -empty_geom| -option_01|M 1 -1 L 4 -4 5 -7 -option_02|M 1 -1 l 3 -3 1 -3 -option_03|M 1 -1 L 4 -4 5 -7 -option_04|M 1 -1 l 3 -3 1 -3 -precision_01|cx="1.1111111" cy="-1.1111111" -precision_02|x="1.1111111" y="-1.1111111" -precision_03|x="1.1111111" y="-1.1111111" -precision_04|x="1.1111111" y="-1.1111111" -line_01|M 3429562.6 -5799490.68 L 3429750.99 -5799199.87 3429825.45 -5799078.39 3429901.8 -5798961.45 3429995.54 -5798822.93 3430072.89 -5798719.46 3430216 -5798558.95 3430272.08 -5798489.33 3430393.87 -5798328.51 3430463.53 -5798251.11 3430532.22 -5798190.16 3430591.24 -5798149.53 3430667.67 -5798108.9 3430723.78 -5798088.58 3430797.33 -5798067.95 3430857.34 -5798056.34 3430912.52 -5798051.5 3430961.89 -5798048.59 3431052.88 -5798053.43 3431159.36 -5798059.24 3431218.41 -5798061.18 3431366.56 -5798056.09 3431474.07 -5798044.47 3431568.02 -5798028.97 3431644.53 -5798012.51 -line_02|M 3429562.6 -5799490.68 l 188.39 290.81 74.46 121.48 76.35 116.94 93.74 138.52 77.35 103.47 143.11 160.51 56.08 69.62 121.79 160.82 69.66 77.4 68.69 60.95 59.02 40.63 76.43 40.63 56.11 20.32 73.55 20.63 60.01 11.61 55.18 4.84 49.37 2.91 90.99 -4.84 106.48 -5.81 59.05 -1.94 148.15 5.09 107.51 11.62 93.95 15.5 76.51 16.46 -line_03|M 3429563 -5799491 L 3429751 -5799200 3429825 -5799078 3429902 -5798961 3429996 -5798823 3430073 -5798719 3430216 -5798559 3430272 -5798489 3430394 -5798329 3430464 -5798251 3430532 -5798190 3430591 -5798150 3430668 -5798109 3430724 -5798089 3430797 -5798068 3430857 -5798056 3430913 -5798052 3430962 -5798049 3431053 -5798053 3431159 -5798059 3431218 -5798061 3431367 -5798056 3431474 -5798044 3431568 -5798029 3431645 -5798013 -line_04|M 3429563 -5799491 l 188 291 74 121 76 117 94 139 77 103 143 161 56 70 122 161 70 77 69 61 59 41 76 41 56 20 74 21 60 12 55 5 49 3 91 -5 106 -6 59 -2 148 5 108 12 94 16 77 16 -polygon_01|M 3429857.62 -5799440.07 L 3429873.86 -5799496.16 3429904.86 -5799503.55 3429972.77 -5799561.12 3430034.77 -5799577.36 3430031.82 -5799639.36 3430139.59 -5799691.03 3430146.97 -5799724.99 3430271.57 -5799792.88 3430289.29 -5799776.64 3430312.91 -5799662.95 3430416.27 -5799710.2 3430419.22 -5799614.22 3430268.61 -5799612.75 3430291.3 -5799203.76 3430255.86 -5799175.7 3430214.51 -5799347 3430183.49 -5799355.87 3430180.54 -5799366.2 3430146.57 -5799367.68 3430142.14 -5799349.96 3430065.35 -5799375.06 3429961.97 -5799426.75 Z -polygon_02|M 3429857.62 -5799440.07 l 16.24 -56.09 31 -7.39 67.91 -57.57 62 -16.24 -2.95 -62 107.77 -51.67 7.38 -33.96 124.6 -67.89 17.72 16.24 23.62 113.69 103.36 -47.25 2.95 95.98 -150.61 1.47 22.69 408.99 -35.44 28.06 -41.35 -171.3 -31.02 -8.87 -2.95 -10.33 -33.97 -1.48 -4.43 17.72 -76.79 -25.1 -103.38 -51.69 z -polygon_03|M 3429858 -5799440 L 3429874 -5799496 3429905 -5799504 3429973 -5799561 3430035 -5799577 3430032 -5799639 3430140 -5799691 3430147 -5799725 3430272 -5799793 3430289 -5799777 3430313 -5799663 3430416 -5799710 3430419 -5799614 3430269 -5799613 3430291 -5799204 3430256 -5799176 3430215 -5799347 3430183 -5799356 3430181 -5799366 3430147 -5799368 3430142 -5799350 3430065 -5799375 3429962 -5799427 Z -polygon_04|M 3429858 -5799440 l 16 -56 31 -7 68 -58 62 -16 -3 -62 108 -52 7 -34 125 -68 18 16 24 114 103 -47 3 96 -151 1 23 409 -35 28 -41 -171 -31 -9 -3 -10 -34 -1 -4 18 -77 -25 -103 -52 z -multipoint_01|cx="3433276.43" cy="-5795308.93",cx="3428545.3" cy="-5795827.75",cx="3431576.99" cy="-5799084.19",cx="3431724.2" cy="-5797152.59",cx="3431984.2" cy="-5796564.79",cx="3435147.61" cy="-5797649.58",cx="3434660.86" cy="-5796941.74",cx="3434674.52" cy="-5797030.54",cx="3435714.36" cy="-5797022.6",cx="3436368.88" cy="-5796951.04",cx="3436730.03" cy="-5796768.6",cx="3435538.55" cy="-5796267.1",cx="3435847.22" cy="-5795917.96",cx="3434312.09" cy="-5794846.02",cx="3433121.69" cy="-5793670.73",cx="3433176.36" cy="-5793489.29",cx="3434316.04" cy="-5793940.09",cx="3433222.92" cy="-5793040.49",cx="3433416.13" cy="-5792891.62",cx="3430717.47" cy="-5792600.58",cx="3435384.08" cy="-5792877.68",cx="3435229.15" cy="-5792177.25",cx="3435120" cy="-5792319.07",cx="3435088.72" cy="-5792111.21",cx="3434484.89" cy="-5792110.2",cx="3435777.91" cy="-5792419.49",cx="3435717.37" cy="-5794318.12",cx="3436895.13" cy="-5794569.43",cx="3437621.86" cy="-5793931.6",cx="3435597.14" cy="-5793467.9",cx="3435246.51" cy="-5793394.63",cx="3434722.1" cy="-5793374.87",cx="3434712.16" cy="-5793810.3",cx="3434773.28" cy="-5793816.87",cx="3434629.91" cy="-5793855.31",cx="3434992.34" cy="-5794140.1",cx="3434927.13" cy="-5794252.29",cx="3434958.58" cy="-5794286.16",cx="3435120.48" cy="-5794163.36",cx="3435850.1" cy="-5791727.49",cx="3435930.75" cy="-5791636.32",cx="3436268.87" cy="-5791882.68",cx="3437110.23" cy="-5791664.12",cx="3435960.34" cy="-5790928.2",cx="3433545.81" cy="-5789755.43",cx="3439096.86" cy="-5790884.26",cx="3438576.87" cy="-5795046.69",cx="3438396.95" cy="-5794858.59",cx="3438193.25" cy="-5794695.6",cx="3438447.92" cy="-5796130.77",cx="3440688.22" cy="-5793670.37" -multipoint_02|x="3433276.43" y="-5795308.93",x="3428545.3" y="-5795827.75",x="3431576.99" y="-5799084.19",x="3431724.2" y="-5797152.59",x="3431984.2" y="-5796564.79",x="3435147.61" y="-5797649.58",x="3434660.86" y="-5796941.74",x="3434674.52" y="-5797030.54",x="3435714.36" y="-5797022.6",x="3436368.88" y="-5796951.04",x="3436730.03" y="-5796768.6",x="3435538.55" y="-5796267.1",x="3435847.22" y="-5795917.96",x="3434312.09" y="-5794846.02",x="3433121.69" y="-5793670.73",x="3433176.36" y="-5793489.29",x="3434316.04" y="-5793940.09",x="3433222.92" y="-5793040.49",x="3433416.13" y="-5792891.62",x="3430717.47" y="-5792600.58",x="3435384.08" y="-5792877.68",x="3435229.15" y="-5792177.25",x="3435120" y="-5792319.07",x="3435088.72" y="-5792111.21",x="3434484.89" y="-5792110.2",x="3435777.91" y="-5792419.49",x="3435717.37" y="-5794318.12",x="3436895.13" y="-5794569.43",x="3437621.86" y="-5793931.6",x="3435597.14" y="-5793467.9",x="3435246.51" y="-5793394.63",x="3434722.1" y="-5793374.87",x="3434712.16" y="-5793810.3",x="3434773.28" y="-5793816.87",x="3434629.91" y="-5793855.31",x="3434992.34" y="-5794140.1",x="3434927.13" y="-5794252.29",x="3434958.58" y="-5794286.16",x="3435120.48" y="-5794163.36",x="3435850.1" y="-5791727.49",x="3435930.75" y="-5791636.32",x="3436268.87" y="-5791882.68",x="3437110.23" y="-5791664.12",x="3435960.34" y="-5790928.2",x="3433545.81" y="-5789755.43",x="3439096.86" y="-5790884.26",x="3438576.87" y="-5795046.69",x="3438396.95" y="-5794858.59",x="3438193.25" y="-5794695.6",x="3438447.92" y="-5796130.77",x="3440688.22" y="-5793670.37" -multipoint_03|cx="3433276" cy="-5795309",cx="3428545" cy="-5795828",cx="3431577" cy="-5799084",cx="3431724" cy="-5797153",cx="3431984" cy="-5796565",cx="3435148" cy="-5797650",cx="3434661" cy="-5796942",cx="3434675" cy="-5797031",cx="3435714" cy="-5797023",cx="3436369" cy="-5796951",cx="3436730" cy="-5796769",cx="3435539" cy="-5796267",cx="3435847" cy="-5795918",cx="3434312" cy="-5794846",cx="3433122" cy="-5793671",cx="3433176" cy="-5793489",cx="3434316" cy="-5793940",cx="3433223" cy="-5793040",cx="3433416" cy="-5792892",cx="3430717" cy="-5792601",cx="3435384" cy="-5792878",cx="3435229" cy="-5792177",cx="3435120" cy="-5792319",cx="3435089" cy="-5792111",cx="3434485" cy="-5792110",cx="3435778" cy="-5792419",cx="3435717" cy="-5794318",cx="3436895" cy="-5794569",cx="3437622" cy="-5793932",cx="3435597" cy="-5793468",cx="3435247" cy="-5793395",cx="3434722" cy="-5793375",cx="3434712" cy="-5793810",cx="3434773" cy="-5793817",cx="3434630" cy="-5793855",cx="3434992" cy="-5794140",cx="3434927" cy="-5794252",cx="3434959" cy="-5794286",cx="3435120" cy="-5794163",cx="3435850" cy="-5791727",cx="3435931" cy="-5791636",cx="3436269" cy="-5791883",cx="3437110" cy="-5791664",cx="3435960" cy="-5790928",cx="3433546" cy="-5789755",cx="3439097" cy="-5790884",cx="3438577" cy="-5795047",cx="3438397" cy="-5794859",cx="3438193" cy="-5794696",cx="3438448" cy="-5796131",cx="3440688" cy="-5793670" -multipoint_04|x="3433276" y="-5795309",x="3428545" y="-5795828",x="3431577" y="-5799084",x="3431724" y="-5797153",x="3431984" y="-5796565",x="3435148" y="-5797650",x="3434661" y="-5796942",x="3434675" y="-5797031",x="3435714" y="-5797023",x="3436369" y="-5796951",x="3436730" y="-5796769",x="3435539" y="-5796267",x="3435847" y="-5795918",x="3434312" y="-5794846",x="3433122" y="-5793671",x="3433176" y="-5793489",x="3434316" y="-5793940",x="3433223" y="-5793040",x="3433416" y="-5792892",x="3430717" y="-5792601",x="3435384" y="-5792878",x="3435229" y="-5792177",x="3435120" y="-5792319",x="3435089" y="-5792111",x="3434485" y="-5792110",x="3435778" y="-5792419",x="3435717" y="-5794318",x="3436895" y="-5794569",x="3437622" y="-5793932",x="3435597" y="-5793468",x="3435247" y="-5793395",x="3434722" y="-5793375",x="3434712" y="-5793810",x="3434773" y="-5793817",x="3434630" y="-5793855",x="3434992" y="-5794140",x="3434927" y="-5794252",x="3434959" y="-5794286",x="3435120" y="-5794163",x="3435850" y="-5791727",x="3435931" y="-5791636",x="3436269" y="-5791883",x="3437110" y="-5791664",x="3435960" y="-5790928",x="3433546" y="-5789755",x="3439097" y="-5790884",x="3438577" y="-5795047",x="3438397" y="-5794859",x="3438193" y="-5794696",x="3438448" y="-5796131",x="3440688" y="-5793670" -multiline_01|M 3429562.6 -5799490.68 L 3429750.99 -5799199.87 3429825.45 -5799078.39 3429901.8 -5798961.45 3429995.54 -5798822.93 3430072.89 -5798719.46 3430216 -5798558.95 3430272.08 -5798489.33 3430393.87 -5798328.51 3430463.53 -5798251.11 3430532.22 -5798190.16 3430591.24 -5798149.53 3430667.67 -5798108.9 3430723.78 -5798088.58 3430797.33 -5798067.95 3430857.34 -5798056.34 3430912.52 -5798051.5 3430961.89 -5798048.59 3431052.88 -5798053.43 3431159.36 -5798059.24 3431218.41 -5798061.18 3431366.56 -5798056.09 3431474.07 -5798044.47 3431568.02 -5798028.97 3431644.53 -5798012.51 M 3433260.06 -5797002.92 L 3433234.61 -5797070.25 3433138.56 -5797278.81 3433074.19 -5797398.94 3433033.73 -5797461.79 3432961.43 -5797551.84 3432882.76 -5797626.57 3432780.32 -5797701.09 3432706.28 -5797743.23 3432542.66 -5797808.05 3432360.32 -5797842.47 3432258.52 -5797836.77 3432197.62 -5797837.57 3432081.75 -5797865.64 3431876.6 -5797945.1 3431865.15 -5797948.73 M 3431865.15 -5797948.73 L 3431644.53 -5798012.51 M 3431865.15 -5797948.73 L 3431815.75 -5797807.76 M 3433260.06 -5797002.92 L 3433361.19 -5796788.54 3433467.4 -5796572.78 3433670.6 -5796160.06 M 3433670.6 -5796160.06 L 3433709.27 -5796096.88 3433744.46 -5796021.84 3433861.98 -5795869.38 3434029.1 -5795680.43 3434229.42 -5795456.34 3434239.36 -5795425.11 3434296.02 -5795363.18 -multiline_02|M 3429562.6 -5799490.68 l 188.39 290.81 74.46 121.48 76.35 116.94 93.74 138.52 77.35 103.47 143.11 160.51 56.08 69.62 121.79 160.82 69.66 77.4 68.69 60.95 59.02 40.63 76.43 40.63 56.11 20.32 73.55 20.63 60.01 11.61 55.18 4.84 49.37 2.91 90.99 -4.84 106.48 -5.81 59.05 -1.94 148.15 5.09 107.51 11.62 93.95 15.5 76.51 16.46 M 3433260.06 -5797002.92 l -25.45 -67.33 -96.05 -208.56 -64.37 -120.13 -40.46 -62.85 -72.3 -90.05 -78.67 -74.73 -102.44 -74.52 -74.04 -42.14 -163.62 -64.82 -182.34 -34.42 -101.8 5.7 -60.9 -0.8 -115.87 -28.07 -205.15 -79.46 -11.45 -3.63 M 3431865.15 -5797948.73 l -220.62 -63.78 M 3431865.15 -5797948.73 l -49.4 140.97 M 3433260.06 -5797002.92 l 101.13 214.38 106.21 215.76 203.2 412.72 M 3433670.6 -5796160.06 l 38.67 63.18 35.19 75.04 117.52 152.46 167.12 188.95 200.32 224.09 9.94 31.23 56.66 61.93 -multiline_03|M 3429563 -5799491 L 3429751 -5799200 3429825 -5799078 3429902 -5798961 3429996 -5798823 3430073 -5798719 3430216 -5798559 3430272 -5798489 3430394 -5798329 3430464 -5798251 3430532 -5798190 3430591 -5798150 3430668 -5798109 3430724 -5798089 3430797 -5798068 3430857 -5798056 3430913 -5798052 3430962 -5798049 3431053 -5798053 3431159 -5798059 3431218 -5798061 3431367 -5798056 3431474 -5798044 3431568 -5798029 3431645 -5798013 M 3433260 -5797003 L 3433235 -5797070 3433139 -5797279 3433074 -5797399 3433034 -5797462 3432961 -5797552 3432883 -5797627 3432780 -5797701 3432706 -5797743 3432543 -5797808 3432360 -5797842 3432259 -5797837 3432198 -5797838 3432082 -5797866 3431877 -5797945 3431865 -5797949 M 3431865 -5797949 L 3431645 -5798013 M 3431865 -5797949 L 3431816 -5797808 M 3433260 -5797003 L 3433361 -5796789 3433467 -5796573 3433671 -5796160 M 3433671 -5796160 L 3433709 -5796097 3433744 -5796022 3433862 -5795869 3434029 -5795680 3434229 -5795456 3434239 -5795425 3434296 -5795363 -multiline_04|M 3429563 -5799491 l 188 291 74 121 76 117 94 139 77 103 143 161 56 70 122 161 70 77 69 61 59 41 76 41 56 20 74 21 60 12 55 5 49 3 91 -5 106 -6 59 -2 148 5 108 12 94 16 77 16 M 3433260 -5797003 l -25 -67 -96 -209 -64 -120 -40 -63 -72 -90 -79 -75 -102 -75 -74 -42 -164 -65 -182 -34 -102 6 -61 -1 -116 -28 -205 -79 -11 -4 M 3431865 -5797949 l -221 -64 M 3431865 -5797949 l -49 141 M 3433260 -5797003 l 101 214 106 216 203 413 M 3433671 -5796160 l 39 63 35 75 118 152 167 189 200 224 10 31 57 62 -multipolygon_01|M 3429699.81 -5795851.64 L 3429736.72 -5795796.01 3429754.71 -5795768.88 3429996.1 -5795489.98 3430100.67 -5795435.76 3430122.61 -5795446.09 3430138.1 -5795560.98 3430311.09 -5795559.69 3430309.8 -5795470.62 3430329.16 -5795416.4 3430326.58 -5795399.62 3430157.47 -5795418.98 3430156.14 -5795407.32 3430139.36 -5795396.99 3429983.19 -5795394.41 3429976.74 -5795420.22 3429789.59 -5795418.93 3429643.74 -5795475.72 3429635.72 -5795615.31 3429484.94 -5795556.38 3429315.44 -5795496.32 3429326.12 -5795748.57 3429129.92 -5795704.53 3429176.64 -5795776.6 3429100.6 -5795797.17 3428900.44 -5795742.46 3428896.43 -5795779.82 3428805.69 -5795953.3 3428897.77 -5796025.35 3428897.77 -5796225.99 3428696.32 -5796199.31 3428681.64 -5796217.99 3428680.31 -5796290.03 3428290.14 -5796351.8 3428389.67 -5796413.87 3428837.71 -5796561.12 3428991.08 -5796495.01 3429076.4 -5796760.29 3429428.31 -5796723.61 3429474.96 -5796690.29 3429696.2 -5796600.99 3429658.88 -5796429.06 3429536.27 -5796363.75 3429529.6 -5796333.1 3429446.08 -5796253.84 Z M 3429857.62 -5799440.07 L 3429873.86 -5799496.16 3429904.86 -5799503.55 3429972.77 -5799561.12 3430034.77 -5799577.36 3430031.82 -5799639.36 3430139.59 -5799691.03 3430146.97 -5799724.99 3430271.57 -5799792.88 3430289.29 -5799776.64 3430312.91 -5799662.95 3430416.27 -5799710.2 3430419.22 -5799614.22 3430268.61 -5799612.75 3430291.3 -5799203.76 3430255.86 -5799175.7 3430214.51 -5799347 3430183.49 -5799355.87 3430180.54 -5799366.2 3430146.57 -5799367.68 3430142.14 -5799349.96 3430065.35 -5799375.06 3429961.97 -5799426.75 Z -multipolygon_02|M 3429699.81 -5795851.64 l 36.91 55.63 17.99 27.13 241.39 278.9 104.57 54.22 21.94 -10.33 15.49 -114.89 172.99 1.29 -1.29 89.07 19.36 54.22 -2.58 16.78 -169.11 -19.36 -1.33 11.66 -16.78 10.33 -156.17 2.58 -6.45 -25.81 -187.15 1.29 -145.85 -56.79 -8.02 -139.59 -150.78 58.93 -169.5 60.06 10.68 -252.25 -196.2 44.04 46.72 -72.07 -76.04 -20.57 -200.16 54.71 -4.01 -37.36 -90.74 -173.48 92.08 -72.05 0 -200.64 -201.45 26.68 -14.68 -18.68 -1.33 -72.04 -390.17 -61.77 99.53 -62.07 448.04 -147.25 153.37 66.11 85.32 -265.28 351.91 36.68 46.65 33.32 221.24 89.3 -37.32 171.93 -122.61 65.31 -6.67 30.65 -83.52 79.26 z M 3429857.62 -5799440.07 l 16.24 -56.09 31 -7.39 67.91 -57.57 62 -16.24 -2.95 -62 107.77 -51.67 7.38 -33.96 124.6 -67.89 17.72 16.24 23.62 113.69 103.36 -47.25 2.95 95.98 -150.61 1.47 22.69 408.99 -35.44 28.06 -41.35 -171.3 -31.02 -8.87 -2.95 -10.33 -33.97 -1.48 -4.43 17.72 -76.79 -25.1 -103.38 -51.69 z -multipolygon_03|M 3429700 -5795852 L 3429737 -5795796 3429755 -5795769 3429996 -5795490 3430101 -5795436 3430123 -5795446 3430138 -5795561 3430311 -5795560 3430310 -5795471 3430329 -5795416 3430327 -5795400 3430157 -5795419 3430156 -5795407 3430139 -5795397 3429983 -5795394 3429977 -5795420 3429790 -5795419 3429644 -5795476 3429636 -5795615 3429485 -5795556 3429315 -5795496 3429326 -5795749 3429130 -5795705 3429177 -5795777 3429101 -5795797 3428900 -5795742 3428896 -5795780 3428806 -5795953 3428898 -5796025 3428898 -5796226 3428696 -5796199 3428682 -5796218 3428680 -5796290 3428290 -5796352 3428390 -5796414 3428838 -5796561 3428991 -5796495 3429076 -5796760 3429428 -5796724 3429475 -5796690 3429696 -5796601 3429659 -5796429 3429536 -5796364 3429530 -5796333 3429446 -5796254 Z M 3429858 -5799440 L 3429874 -5799496 3429905 -5799504 3429973 -5799561 3430035 -5799577 3430032 -5799639 3430140 -5799691 3430147 -5799725 3430272 -5799793 3430289 -5799777 3430313 -5799663 3430416 -5799710 3430419 -5799614 3430269 -5799613 3430291 -5799204 3430256 -5799176 3430215 -5799347 3430183 -5799356 3430181 -5799366 3430147 -5799368 3430142 -5799350 3430065 -5799375 3429962 -5799427 Z -multipolygon_04|M 3429700 -5795852 l 37 56 18 27 241 279 105 54 22 -10 15 -115 173 1 -1 89 19 54 -3 17 -169 -19 -1 12 -17 10 -156 3 -6 -26 -187 1 -146 -57 -8 -140 -151 59 -170 60 11 -252 -196 44 47 -72 -76 -21 -200 55 -4 -37 -91 -173 92 -72 0 -201 -201 27 -15 -19 -1 -72 -390 -62 100 -62 448 -147 153 66 85 -265 352 37 47 33 221 89 -37 172 -123 65 -7 31 -84 79 z M 3429858 -5799440 l 16 -56 31 -7 68 -58 62 -16 -3 -62 108 -52 7 -34 125 -68 18 16 24 114 103 -47 3 96 -151 1 23 409 -35 28 -41 -171 -31 -9 -3 -10 -34 -1 -4 18 -77 -25 -103 -52 z -geometrycollection_01|cx="3433276.43" cy="-5795308.93",cx="3428545.3" cy="-5795827.75",cx="3431576.99" cy="-5799084.19",cx="3431724.2" cy="-5797152.59",cx="3431984.2" cy="-5796564.79",cx="3435147.61" cy="-5797649.58",cx="3434660.86" cy="-5796941.74",cx="3434674.52" cy="-5797030.54",cx="3435714.36" cy="-5797022.6",cx="3436368.88" cy="-5796951.04",cx="3436730.03" cy="-5796768.6",cx="3435538.55" cy="-5796267.1",cx="3435847.22" cy="-5795917.96",cx="3434312.09" cy="-5794846.02",cx="3433121.69" cy="-5793670.73",cx="3433176.36" cy="-5793489.29",cx="3434316.04" cy="-5793940.09",cx="3433222.92" cy="-5793040.49",cx="3433416.13" cy="-5792891.62",cx="3430717.47" cy="-5792600.58",cx="3435384.08" cy="-5792877.68",cx="3435229.15" cy="-5792177.25",cx="3435120" cy="-5792319.07",cx="3435088.72" cy="-5792111.21",cx="3434484.89" cy="-5792110.2",cx="3435777.91" cy="-5792419.49",cx="3435717.37" cy="-5794318.12",cx="3436895.13" cy="-5794569.43",cx="3437621.86" cy="-5793931.6",cx="3435597.14" cy="-5793467.9",cx="3435246.51" cy="-5793394.63",cx="3434722.1" cy="-5793374.87",cx="3434712.16" cy="-5793810.3",cx="3434773.28" cy="-5793816.87",cx="3434629.91" cy="-5793855.31",cx="3434992.34" cy="-5794140.1",cx="3434927.13" cy="-5794252.29",cx="3434958.58" cy="-5794286.16",cx="3435120.48" cy="-5794163.36",cx="3435850.1" cy="-5791727.49",cx="3435930.75" cy="-5791636.32",cx="3436268.87" cy="-5791882.68",cx="3437110.23" cy="-5791664.12",cx="3435960.34" cy="-5790928.2",cx="3433545.81" cy="-5789755.43",cx="3439096.86" cy="-5790884.26",cx="3438576.87" cy="-5795046.69",cx="3438396.95" cy="-5794858.59",cx="3438193.25" cy="-5794695.6",cx="3438447.92" cy="-5796130.77",cx="3440688.22" cy="-5793670.37";M 3429562.6 -5799490.68 L 3429750.99 -5799199.87 3429825.45 -5799078.39 3429901.8 -5798961.45 3429995.54 -5798822.93 3430072.89 -5798719.46 3430216 -5798558.95 3430272.08 -5798489.33 3430393.87 -5798328.51 3430463.53 -5798251.11 3430532.22 -5798190.16 3430591.24 -5798149.53 3430667.67 -5798108.9 3430723.78 -5798088.58 3430797.33 -5798067.95 3430857.34 -5798056.34 3430912.52 -5798051.5 3430961.89 -5798048.59 3431052.88 -5798053.43 3431159.36 -5798059.24 3431218.41 -5798061.18 3431366.56 -5798056.09 3431474.07 -5798044.47 3431568.02 -5798028.97 3431644.53 -5798012.51 M 3433260.06 -5797002.92 L 3433234.61 -5797070.25 3433138.56 -5797278.81 3433074.19 -5797398.94 3433033.73 -5797461.79 3432961.43 -5797551.84 3432882.76 -5797626.57 3432780.32 -5797701.09 3432706.28 -5797743.23 3432542.66 -5797808.05 3432360.32 -5797842.47 3432258.52 -5797836.77 3432197.62 -5797837.57 3432081.75 -5797865.64 3431876.6 -5797945.1 3431865.15 -5797948.73 M 3431865.15 -5797948.73 L 3431644.53 -5798012.51 M 3431865.15 -5797948.73 L 3431815.75 -5797807.76 M 3433260.06 -5797002.92 L 3433361.19 -5796788.54 3433467.4 -5796572.78 3433670.6 -5796160.06 M 3433670.6 -5796160.06 L 3433709.27 -5796096.88 3433744.46 -5796021.84 3433861.98 -5795869.38 3434029.1 -5795680.43 3434229.42 -5795456.34 3434239.36 -5795425.11 3434296.02 -5795363.18 -geometrycollection_02|x="3433276.43" y="-5795308.93",x="3428545.3" y="-5795827.75",x="3431576.99" y="-5799084.19",x="3431724.2" y="-5797152.59",x="3431984.2" y="-5796564.79",x="3435147.61" y="-5797649.58",x="3434660.86" y="-5796941.74",x="3434674.52" y="-5797030.54",x="3435714.36" y="-5797022.6",x="3436368.88" y="-5796951.04",x="3436730.03" y="-5796768.6",x="3435538.55" y="-5796267.1",x="3435847.22" y="-5795917.96",x="3434312.09" y="-5794846.02",x="3433121.69" y="-5793670.73",x="3433176.36" y="-5793489.29",x="3434316.04" y="-5793940.09",x="3433222.92" y="-5793040.49",x="3433416.13" y="-5792891.62",x="3430717.47" y="-5792600.58",x="3435384.08" y="-5792877.68",x="3435229.15" y="-5792177.25",x="3435120" y="-5792319.07",x="3435088.72" y="-5792111.21",x="3434484.89" y="-5792110.2",x="3435777.91" y="-5792419.49",x="3435717.37" y="-5794318.12",x="3436895.13" y="-5794569.43",x="3437621.86" y="-5793931.6",x="3435597.14" y="-5793467.9",x="3435246.51" y="-5793394.63",x="3434722.1" y="-5793374.87",x="3434712.16" y="-5793810.3",x="3434773.28" y="-5793816.87",x="3434629.91" y="-5793855.31",x="3434992.34" y="-5794140.1",x="3434927.13" y="-5794252.29",x="3434958.58" y="-5794286.16",x="3435120.48" y="-5794163.36",x="3435850.1" y="-5791727.49",x="3435930.75" y="-5791636.32",x="3436268.87" y="-5791882.68",x="3437110.23" y="-5791664.12",x="3435960.34" y="-5790928.2",x="3433545.81" y="-5789755.43",x="3439096.86" y="-5790884.26",x="3438576.87" y="-5795046.69",x="3438396.95" y="-5794858.59",x="3438193.25" y="-5794695.6",x="3438447.92" y="-5796130.77",x="3440688.22" y="-5793670.37";M 3429562.6 -5799490.68 l 188.39 290.81 74.46 121.48 76.35 116.94 93.74 138.52 77.35 103.47 143.11 160.51 56.08 69.62 121.79 160.82 69.66 77.4 68.69 60.95 59.02 40.63 76.43 40.63 56.11 20.32 73.55 20.63 60.01 11.61 55.18 4.84 49.37 2.91 90.99 -4.84 106.48 -5.81 59.05 -1.94 148.15 5.09 107.51 11.62 93.95 15.5 76.51 16.46 M 3433260.06 -5797002.92 l -25.45 -67.33 -96.05 -208.56 -64.37 -120.13 -40.46 -62.85 -72.3 -90.05 -78.67 -74.73 -102.44 -74.52 -74.04 -42.14 -163.62 -64.82 -182.34 -34.42 -101.8 5.7 -60.9 -0.8 -115.87 -28.07 -205.15 -79.46 -11.45 -3.63 M 3431865.15 -5797948.73 l -220.62 -63.78 M 3431865.15 -5797948.73 l -49.4 140.97 M 3433260.06 -5797002.92 l 101.13 214.38 106.21 215.76 203.2 412.72 M 3433670.6 -5796160.06 l 38.67 63.18 35.19 75.04 117.52 152.46 167.12 188.95 200.32 224.09 9.94 31.23 56.66 61.93 -geometrycollection_03|cx="3433276" cy="-5795309",cx="3428545" cy="-5795828",cx="3431577" cy="-5799084",cx="3431724" cy="-5797153",cx="3431984" cy="-5796565",cx="3435148" cy="-5797650",cx="3434661" cy="-5796942",cx="3434675" cy="-5797031",cx="3435714" cy="-5797023",cx="3436369" cy="-5796951",cx="3436730" cy="-5796769",cx="3435539" cy="-5796267",cx="3435847" cy="-5795918",cx="3434312" cy="-5794846",cx="3433122" cy="-5793671",cx="3433176" cy="-5793489",cx="3434316" cy="-5793940",cx="3433223" cy="-5793040",cx="3433416" cy="-5792892",cx="3430717" cy="-5792601",cx="3435384" cy="-5792878",cx="3435229" cy="-5792177",cx="3435120" cy="-5792319",cx="3435089" cy="-5792111",cx="3434485" cy="-5792110",cx="3435778" cy="-5792419",cx="3435717" cy="-5794318",cx="3436895" cy="-5794569",cx="3437622" cy="-5793932",cx="3435597" cy="-5793468",cx="3435247" cy="-5793395",cx="3434722" cy="-5793375",cx="3434712" cy="-5793810",cx="3434773" cy="-5793817",cx="3434630" cy="-5793855",cx="3434992" cy="-5794140",cx="3434927" cy="-5794252",cx="3434959" cy="-5794286",cx="3435120" cy="-5794163",cx="3435850" cy="-5791727",cx="3435931" cy="-5791636",cx="3436269" cy="-5791883",cx="3437110" cy="-5791664",cx="3435960" cy="-5790928",cx="3433546" cy="-5789755",cx="3439097" cy="-5790884",cx="3438577" cy="-5795047",cx="3438397" cy="-5794859",cx="3438193" cy="-5794696",cx="3438448" cy="-5796131",cx="3440688" cy="-5793670";M 3429563 -5799491 L 3429751 -5799200 3429825 -5799078 3429902 -5798961 3429996 -5798823 3430073 -5798719 3430216 -5798559 3430272 -5798489 3430394 -5798329 3430464 -5798251 3430532 -5798190 3430591 -5798150 3430668 -5798109 3430724 -5798089 3430797 -5798068 3430857 -5798056 3430913 -5798052 3430962 -5798049 3431053 -5798053 3431159 -5798059 3431218 -5798061 3431367 -5798056 3431474 -5798044 3431568 -5798029 3431645 -5798013 M 3433260 -5797003 L 3433235 -5797070 3433139 -5797279 3433074 -5797399 3433034 -5797462 3432961 -5797552 3432883 -5797627 3432780 -5797701 3432706 -5797743 3432543 -5797808 3432360 -5797842 3432259 -5797837 3432198 -5797838 3432082 -5797866 3431877 -5797945 3431865 -5797949 M 3431865 -5797949 L 3431645 -5798013 M 3431865 -5797949 L 3431816 -5797808 M 3433260 -5797003 L 3433361 -5796789 3433467 -5796573 3433671 -5796160 M 3433671 -5796160 L 3433709 -5796097 3433744 -5796022 3433862 -5795869 3434029 -5795680 3434229 -5795456 3434239 -5795425 3434296 -5795363 -geometrycollection_04|x="3433276" y="-5795309",x="3428545" y="-5795828",x="3431577" y="-5799084",x="3431724" y="-5797153",x="3431984" y="-5796565",x="3435148" y="-5797650",x="3434661" y="-5796942",x="3434675" y="-5797031",x="3435714" y="-5797023",x="3436369" y="-5796951",x="3436730" y="-5796769",x="3435539" y="-5796267",x="3435847" y="-5795918",x="3434312" y="-5794846",x="3433122" y="-5793671",x="3433176" y="-5793489",x="3434316" y="-5793940",x="3433223" y="-5793040",x="3433416" y="-5792892",x="3430717" y="-5792601",x="3435384" y="-5792878",x="3435229" y="-5792177",x="3435120" y="-5792319",x="3435089" y="-5792111",x="3434485" y="-5792110",x="3435778" y="-5792419",x="3435717" y="-5794318",x="3436895" y="-5794569",x="3437622" y="-5793932",x="3435597" y="-5793468",x="3435247" y="-5793395",x="3434722" y="-5793375",x="3434712" y="-5793810",x="3434773" y="-5793817",x="3434630" y="-5793855",x="3434992" y="-5794140",x="3434927" y="-5794252",x="3434959" y="-5794286",x="3435120" y="-5794163",x="3435850" y="-5791727",x="3435931" y="-5791636",x="3436269" y="-5791883",x="3437110" y="-5791664",x="3435960" y="-5790928",x="3433546" y="-5789755",x="3439097" y="-5790884",x="3438577" y="-5795047",x="3438397" y="-5794859",x="3438193" y="-5794696",x="3438448" y="-5796131",x="3440688" y="-5793670";M 3429563 -5799491 l 188 291 74 121 76 117 94 139 77 103 143 161 56 70 122 161 70 77 69 61 59 41 76 41 56 20 74 21 60 12 55 5 49 3 91 -5 106 -6 59 -2 148 5 108 12 94 16 77 16 M 3433260 -5797003 l -25 -67 -96 -209 -64 -120 -40 -63 -72 -90 -79 -75 -102 -75 -74 -42 -164 -65 -182 -34 -102 6 -61 -1 -116 -28 -205 -79 -11 -4 M 3431865 -5797949 l -221 -64 M 3431865 -5797949 l -49 141 M 3433260 -5797003 l 101 214 106 216 203 413 M 3433671 -5796160 l 39 63 35 75 118 152 167 189 200 224 10 31 57 62 -ERROR: ST_AsSVG: 'CircularString' geometry type not supported. -ERROR: ST_AsSVG: 'CompoundString' geometry type not supported. -ERROR: ST_AsSVG: 'CurvePolygon' geometry type not supported. -ERROR: ST_AsSVG: 'MultiCurve' geometry type not supported. -ERROR: ST_AsSVG: 'MultiSurface' geometry type not supported. -3D_01|cx="1" cy="-1" -3D_02|cx="1" cy="-1" -3D_03|M 1 -1 L 2 -2 3 -3 4 -4 -3D_04|M 1 -1 L 2 -2 3 -3 4 -4 5 -5 5 0 Z -#409| diff -Nru postgis-1.5.3/regress/tickets.sql postgis-2.0.1/regress/tickets.sql --- postgis-1.5.3/regress/tickets.sql 2011-05-12 21:46:31.000000000 +0000 +++ postgis-2.0.1/regress/tickets.sql 2012-05-04 08:06:16.000000000 +0000 @@ -3,11 +3,17 @@ -- referenced by bug number for historical interest. -- +-- NOTE: some tests _require_ spatial_ref_sys entries. +-- In particular, the GML output ones want auth_name and auth_srid too, +-- so we provide one for EPSG:4326 DELETE FROM spatial_ref_sys; INSERT INTO spatial_ref_sys ( srid, proj4text ) VALUES ( 32611, '+proj=utm +zone=11 +ellps=WGS84 +datum=WGS84 +units=m +no_defs' ); -INSERT INTO spatial_ref_sys ( srid, proj4text ) VALUES ( 4326, '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs' ); +INSERT INTO spatial_ref_sys ( auth_name, auth_srid, srid, proj4text ) VALUES ( 'EPSG', 4326, 4326, '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs' ); INSERT INTO spatial_ref_sys ( srid, proj4text ) VALUES ( 32602, '+proj=utm +zone=2 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ' ); INSERT INTO spatial_ref_sys ( srid, proj4text ) VALUES ( 32702, '+proj=utm +zone=2 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ' ); +INSERT INTO spatial_ref_sys ( srid, proj4text ) VALUES ( 3395, '+proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ' ); + +INSERT INTO spatial_ref_sys (srid,proj4text) VALUES (32707,'+proj=utm +zone=7 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); -- #2 -- @@ -52,7 +58,7 @@ SELECT '#65', ST_AsGML(ST_GeometryFromText('CURVEPOLYGON(CIRCULARSTRING(4 2,3 -1.0,1 -1,-1.0 4,4 2))')); -- #66 -- -SELECT '#66', ST_AsText((ST_Dump(ST_GeomFromEWKT('CIRCULARSTRING(0 0 1,1 1 2,2 2 3)'))).geom); +SELECT '#66', ST_AsText((ST_Dump(ST_GeomFromEWKT('CIRCULARSTRING(0 0,1 1,2 2)'))).geom); -- #68 -- SELECT '#68a', ST_AsText(ST_Shift_Longitude(ST_GeomFromText('MULTIPOINT(1 3, 4 5)'))); @@ -65,7 +71,7 @@ SELECT '#70', ST_NPoints(ST_LinetoCurve(ST_Buffer('POINT(1 2)',3))); -- #73 -- -SELECT '#73', ST_AsText(ST_Force_Collection(ST_GeomFromEWKT('CIRCULARSTRING(1 1 2, 2 3 2, 4 5 2, 6 7 2, 5 6 2)'))); +SELECT '#73', ST_AsText(ST_Force_Collection(ST_GeomFromEWKT('CIRCULARSTRING(1 1, 2 3, 4 5, 6 7, 5 6)'))); -- #80 -- SELECT '#80', ST_AsText(ST_Multi('MULTILINESTRING((0 0,1 1))')); @@ -86,7 +92,7 @@ SELECT '#116', ST_AsText('010300000000000000'); -- #122 -- -SELECT '#122', ST_SnapToGrid(ST_GeomFromText('CIRCULARSTRING(220268 150415,220227 150505,220227 150406)'), 0.1); +SELECT '#122', ST_AsText(ST_SnapToGrid(ST_GeomFromText('CIRCULARSTRING(220268 150415,220227 150505,220227 150406)'), 0.1)); -- #124 -- SELECT '#124a', ST_AsText(ST_GeomFromEWKT('COMPOUNDCURVE(CIRCULARSTRING(0 0,1 1,1 0),(1 0,30 5),CIRCULARSTRING(30 5,34 56,67 89))')); @@ -117,7 +123,7 @@ -- #168 -- -SELECT '#168', ST_NPoints(g), ST_AsText(g) +SELECT '#168', ST_NPoints(g), ST_AsText(g), ST_isValidReason(g) FROM ( VALUES ('01060000C00100000001030000C00100000003000000E3D9107E234F5041A3DB66BC97A30F4122ACEF440DAF9440FFFFFFFFFFFFEFFFE3D9107E234F5041A3DB66BC97A30F4122ACEF440DAF9440FFFFFFFFFFFFEFFFE3D9107E234F5041A3DB66BC97A30F4122ACEF440DAF9440FFFFFFFFFFFFEFFF'::geometry) ) AS v(g); @@ -130,11 +136,11 @@ SELECT '#178b', ST_XMax(ST_MakeBox2D(ST_Point(5, 5), ST_Point(0, 0))); -- #179 -- -SELECT '#179a', ST_MakeLine_GArray(ARRAY[NULL,NULL,NULL,NULL]); +SELECT '#179a', ST_MakeLine(ARRAY[NULL,NULL,NULL,NULL]); SELECT '#179b', ST_MakeLine(ARRAY[NULL,NULL,NULL,NULL]); -- #183 -- -SELECT '#183', ST_AsText(ST_LineToCurve(ST_LineMerge(ST_Collect(ST_CurveToLine(ST_GeomFromEWKT('CIRCULARSTRING(0 0, 1 1, 1 0)')),ST_GeomFromEWKT('LINESTRING(1 0, 0 1)') )))); +SELECT '#183', ST_AsText(ST_SnapToGrid(ST_LineToCurve(ST_LineMerge(ST_Collect(ST_CurveToLine(ST_GeomFromEWKT('CIRCULARSTRING(0 0, 1 1, 1 0)')),ST_GeomFromEWKT('LINESTRING(1 0, 0 1)') ))), 1E-10)); -- #210 -- SELECT '#210a', ST_Union(ARRAY[NULL,NULL,NULL,NULL]) ; @@ -224,7 +230,7 @@ ST_GeomFromText('LINESTRING(25 169,89 114,40 70,86 43)') As line1, ST_GeomFromText('LINESTRING(2.99 90.16,71 74,20 140,171 154)') As line2 ) As foo; -- #277 -- -SELECT '#277', ST_AsGML(2, GeomFromText('POINT(1 1e308)')); +SELECT '#277', ST_AsGML(2, ST_GeomFromText('POINT(1 1e308)')); -- #299 -- SELECT '#299', round(ST_Y(geometry(ST_Intersection(ST_GeographyFromText('POINT(1.2456 2)'), ST_GeographyFromText('POINT(1.2456 2)'))))); @@ -251,22 +257,38 @@ END IF; zone:=floor((ST_X(geomgeog)+180)/6)+1; + IF ( zone > 60 ) THEN zone := 60; END IF; RETURN zone+pref; END; $BODY$ LANGUAGE 'plpgsql' IMMUTABLE COST 100; -SELECT ST_AsText(the_geog) as the_pt, ST_Area(ST_Buffer(the_geog,10)) As the_area, - ST_Area(geography(ST_Transform(ST_Buffer(ST_Transform(geometry(the_geog),utm_srid),10),4326))) As geog_utm_area -FROM (SELECT geography(ST_SetSRID(ST_Point(i*10,j*10),4326)) As the_geog, utmzone(ST_SetSRID(ST_Point(i*10,j*10),4326)) As utm_srid - FROM generate_series(-17,17) As i - CROSS JOIN generate_series(-8,8) As j -) As foo -WHERE ST_Area(ST_Buffer(the_geog,10)) NOT between 310 and 314 +CREATE TABLE utm_dots ( the_geog geography, utm_srid integer); +INSERT INTO utm_dots SELECT geography(ST_SetSRID(ST_Point(i*10,j*10),4326)) As the_geog, utmzone(ST_SetSRID(ST_Point(i*10,j*10),4326)) As utm_srid FROM generate_series(-17,17) As i CROSS JOIN generate_series(-8,8) As j; + +SELECT ST_AsText(the_geog) as the_pt, + utm_srid, + ST_Area(ST_Buffer(the_geog,10)) As the_area, + ST_Area(geography(ST_Transform(ST_Buffer(ST_Transform(geometry(the_geog),utm_srid),10),4326))) As geog_utm_area +FROM utm_dots +WHERE ST_Area(ST_Buffer(the_geog,10)) NOT between 307 and 314 LIMIT 10; +SELECT '#304.a', Count(*) FROM utm_dots WHERE ST_DWithin(the_geog, 'POINT(0 0)'::geography, 3000000); + +CREATE INDEX utm_dots_gix ON utm_dots USING GIST (the_geog); +SELECT '#304.b', Count(*) FROM utm_dots WHERE ST_DWithin(the_geog, 'POINT(0 0)'::geography, 300000); + DROP FUNCTION utmzone(geometry); +DROP TABLE utm_dots; + +-- #408 -- +SELECT '#408', st_isvalidreason('0105000020E0670000010000000102000020E06700000100000016DA52BA62A04141FFF3AD290B735241'); +SELECT '#408.1', st_isvalid('01050000000100000001020000000100000000000000000000000000000000000000'); +SELECT '#408.2', st_isvalidreason('01020000000100000000000000000000000000000000000000'); +SELECT '#408.3', st_isvalid('0106000020BB0B000001000000010300000005000000D6000000000000C0F1A138410AD7A3103190524114AE4721F7A138410000000030905241713D0A57FAA1384185EB51982C9052417B14AE87FAA13841000000402A905241AE47E13AFBA1384114AE474128905241EC51B81EFDA138413D0AD7632690524152B81E85FFA13841D7A3707D2590524152B81E4500A23841713D0A072590524100000000FFA13841713D0AF724905241CDCCCCCCFFA13841CDCCCC0C249052419A99991901A238419A999919249052411F85EBD101A23841D7A3704D23905241E17A14AE02A23841A4703D3A2290524185EB51F808A23841000000D021905241E17A14EE0BA238413333335321905241666666A615A23841B81E85AB1F905241713D0AD710A23841B81E858B1E905241666666260CA2384114AE4731209052410AD7A37009A23841CDCCCCEC20905241AE47E13A06A23841EC51B87E219052419A9999D903A23841EC51B80E21905241EC51B8DE08A238418FC2F5681F905241666666660EA23841A4703D9A1D9052413D0AD7A30FA2384114AE47A11C9052413333333311A23841000000101C90524148E17A1414A23841333333931A905241EC51B81E1AA23841EC51B89E1890524185EB51381CA23841D7A370BD17905241295C8FC220A2384185EB51C816905241C3F528DC2BA238418FC2F5E814905241E17A14EE2EA23841EC51B8FE13905241AE47E1FA2BA23841EC51B8EE119052415C8FC2F52BA2384185EB51C810905241333333332EA2384114AE4701109052417B14AEC73BA238410AD7A3300D905241CDCCCCCC43A238417B14AE870B905241CDCCCC4C45A23841A4703D3A0B9052413D0AD7A34DA238411F85EB810A905241295C8F8250A23841CDCCCCBC09905241000000C053A238410AD7A36009905241A4703D0A5CA2384114AE4751099052418FC2F5A866A23841A4703D4A0A9052410000008069A2384114AE47B10A9052415C8FC2B573A23841B81E851B0D905241AE47E1FA76A23841666666C60D9052417B14AE077BA238411F85EB510E905241AE47E1FA7FA23841666666E60E9052415C8FC2358DA23841000000F010905241EC51B85E95A2384148E17A14119052417B14AE4795A23841CDCCCCCC1090524114AE47E18CA2384185EB51F80F90524148E17AD480A2384114AE47A10E9052413D0AD76383A23841713D0AF70C9052417B14AEC784A23841A4703D8A0C9052410000000086A23841A4703D0A0B9052411F85EB9187A23841B81E851B09905241F6285CCF86A2384100000010099052417B14AE4787A2384185EB51180890524114AE472186A23841CDCCCCFC079052410AD7A3B086A23841C3F5280C07905241333333B385A23841CDCCCC0C07905241000000407EA2384152B81E15079052419A9999197BA23841A4703D2A079052416666666673A2384114AE47710790524114AE47A16EA238413D0AD7F30690524114AE472170A238418FC2F5D8059052413D0AD72372A2384185EB511806905241A4703DCA71A23841D7A3707D05905241EC51B8DE7EA238411F85EBD104905241E17A14AE76A23841333333E30390524185EB51B875A23841713D0A47029052415C8FC2F576A23841D7A3703D029052419A99999976A2384114AE475101905241333333B378A23841EC51B83E019052410AD7A3307CA238410AD7A320019052418FC2F52885A23841295C8FD20090524148E17A9483A238416666664600905241295C8FC276A238411F85EB9100905241CDCCCC4C76A2384100000070FF8F5241AE47E13A76A2384133333343FF8F52417B14AE0783A23841D7A370FDFE8F5241E17A14AE81A23841C3F5283CFE8F52415C8FC2357DA2384114AE47A1FE8F5241CDCCCC8C7BA238415C8FC275FD8F524148E17AD47FA238417B14AE17FD8F5241000000807EA238413D0AD7A3FC8F5241713D0AD776A2384133333363FD8F5241CDCCCC8C73A2384152B81EF5FD8F5241E17A14AE70A2384114AE4711FE8F524185EB51B870A23841B81E852BFF8F524152B81E056CA2384114AE4731FF8F5241B81E856B6BA2384152B81E25FE8F5241AE47E13A69A23841E17A142EFE8F52419A99995962A238415C8FC275FE8F52415C8FC27562A238411F85EB710090524114AE47A15BA23841EC51B86E00905241EC51B85E5BA238419A9999E902905241295C8F025BA238417B14AE8704905241A4703D8A54A23841713D0A7704905241C3F5285C51A2384148E17A44049052418FC2F5E84CA23841A4703D4A049052410AD7A3304CA2384148E17A94049052419A9999994CA238413D0AD7F305905241AE47E1FA49A2384114AE471106905241EC51B85E49A23841AE47E1FA07905241AE47E13A43A238415C8FC255099052416666662644A23841D7A3707D0A9052415C8FC2F53FA23841CDCCCC2C0B90524185EB517839A2384185EB51380C90524152B81E4532A23841D7A370DD099052419A9999592FA2384152B81E4509905241D7A3707D2AA23841B81E857B089052415C8FC27526A238416666667608905241EC51B81E26A238417B14AE7707905241295C8F0226A23841F6285C1F07905241666666A61CA23841CDCCCC6C07905241713D0A1716A23841B81E856B07905241B81E85EB15A2384100000040079052411F85EB1108A2384114AE4741079052415C8FC23505A2384148E17AC40790524152B81E0506A23841EC51B84E09905241713D0A5707A23841AE47E10A0A905241EC51B81E12A2384152B81EA50890524152B81E4521A23841F6285CDF0890524148E17A1427A23841EC51B80E099052415C8FC2B52AA2384185EB5168099052413D0AD7E32FA23841CDCCCC3C0A9052413D0AD7A331A23841333333930A90524185EB51F833A238410AD7A3B00B9052411F85EB5135A23841EC51B8AE0B90524185EB513836A23841333333530D9052410000004030A238415C8FC2B50E905241000000802FA238415C8FC2750E9052410000008028A238419A9999B90E905241F6285C0F28A23841333333630E90524114AE47E123A23841333333730E905241D7A3707D23A2384152B81E750E9052410000008023A2384185EB51E80E905241D7A370BD1EA23841713D0A170F9052419A9999991EA23841333333830F9052419A9999991CA238411F85EB810F90524152B81E450EA2384152B81E750F9052417B14AE470AA23841EC51B89E0F905241B81E85EB05A238410AD7A3F00F905241D7A3707DFFA138417B14AEF71090524185EB51F8FDA138413D0AD72311905241295C8F02FAA13841EC51B83E11905241713D0A17EFA13841E17A145E129052417B14AE87CBA1384152B81E05179052418FC2F528C0A13841D7A3709D17905241D7A370BDC0A13841F6285C5F18905241295C8F82CBA138419A9999F917905241AE47E1BAD7A138415C8FC255169052411F85EB91E0A13841000000401590524114AE47A1E2A1384185EB5108159052415C8FC235ECA13841C3F5286C13905241C3F528DCF4A13841000000701290524152B81E45F5A138415C8FC2A51290524100000040F6A13841CDCCCC7C129052417B14AE47FBA138410000000012905241EC51B85E00A2384185EB51A8119052413D0AD7A305A238419A99990911905241EC51B81E0AA238411F85EB611090524148E17A940EA23841A4703D0A1090524152B81E0514A2384152B81EE50F905241F6285CCF15A238410AD7A3E00F9052417B14AEC718A23841CDCCCCDC0F9052419A9999191AA238415C8FC2E50F905241EC51B81E20A238415C8FC2E50F90524148E17A1420A23841333333C30F9052417B14AE8729A23841713D0AA70F905241000000002AA238413D0AD733119052411F85EB9129A23841C3F528EC12905241E17A142E28A238419A999919149052418FC2F5A825A23841CDCCCC1C15905241C3F5285C21A2384114AE473116905241F6285C4F1BA2384152B81E4517905241D7A3707D1AA2384148E17A1417905241C3F5285C19A23841D7A3702D179052413333333318A23841B81E85CB17905241000000C017A2384185EB5108189052413D0AD72310A238419A9999F91790524148E17A5410A2384148E17AD41690524148E17AD40DA2384152B81ED516905241B81E85AB09A23841F6285C1F179052418FC2F5A809A2384185EB51C8179052418FC2F56808A238417B14AEC7179052410000008008A2384185EB515818905241AE47E1BA16A23841F6285C6F189052410AD7A33017A23841C3F5289C18905241000000C012A23841AE47E10A1A9052411F85EB5110A238413D0AD7131B905241000000800DA238415C8FC2451C90524148E17A140DA23841A4703D4A1C9052413D0AD7230BA2384148E17A141E905241295C8F4205A23841295C8F421E905241F6285C4F00A238419A9999691E905241C3F5289CFDA13841AE47E16A1E905241D7A370FDFDA1384114AE47711F90524185EB51F801A23841B81E855B1F905241A4703D0A05A23841CDCCCCAC1F905241E17A14AE02A23841EC51B89E20905241295C8F82FFA138419A9999E9219052419A999919FEA1384185EB5188239052410AD7A330FAA13841E17A14DE25905241C3F5281CF9A13841F6285CFF26905241AE47E13AF8A138415C8FC2E527905241CDCCCC8CF7A1384185EB51B82890524185EB51F8F7A138413333334329905241C3F5281CF6A138418FC2F5182C905241A4703D4AF5A13841EC51B8BE2C905241CDCCCC0CF4A13841713D0AF72E90524185EB5138F3A13841000000502F905241000000C0F1A138410AD7A3103190524111000000CDCCCC4C6AA23841713D0A170A905241CDCCCC4C6FA238411F85EB710790524148E17A947AA2384114AE47410890524185EB51387BA23841D7A370ED07905241666666267BA23841713D0A7707905241EC51B85E7EA2384114AE476107905241E17A14AE7EA2384114AE473108905241713D0A5785A23841CDCCCCBC089052410AD7A33083A23841F6285C9F0B9052413333337382A23841666666460C90524148E17AD481A23841333333D30C90524114AE472181A23841333333730D905241AE47E1BA7FA23841CDCCCC3C0E9052418FC2F56876A238415C8FC2050D90524185EB513872A238418FC2F5D80B90524185EB513870A23841EC51B82E0B905241CDCCCC4C6AA23841713D0A170A90524113000000A4703DCA6BA238415C8FC295FF8F5241B81E856B74A238410AD7A380FF8F5241EC51B89E74A23841E17A149E00905241AE47E1BA74A23841F6285C4F019052419A99995974A23841295C8F520290524148E17AD473A2384114AE47B10390524152B81EC572A2384114AE4701059052417B14AE476DA23841AE47E1DA04905241F6285C8F6DA23841333333A303905241000000006CA2384152B81E9503905241EC51B81E69A23841A4703D7A039052410AD7A3B068A23841B81E85AB049052415C8FC2F55CA23841CDCCCC8C0490524152B81E455DA238411F85EB0103905241333333B35DA23841AE47E1DA00905241EC51B85E67A23841C3F528FC009052410AD7A3B067A23841CDCCCCCCFF8F524185EB51B86BA23841333333C3FF8F5241A4703DCA6BA238415C8FC295FF8F5241020000003D0AD7A346A238413D0AD7E3099052413D0AD7A346A238413D0AD7E309905241100000007B14AEC74DA238410AD7A3B008905241EC51B85E4EA23841B81E850B079052413D0AD7234FA23841C3F528DC0490524185EB51385CA23841EC51B8EE04905241B81E852B60A23841A4703DDA049052410000008066A23841A4703DFA049052411F85EB116AA23841CDCCCC0C05905241CDCCCC8C6EA23841A4703D5A05905241A4703D0A6CA238417B14AE37079052411F85EBD16AA23841A4703DCA07905241AE47E1FA68A23841E17A14FE08905241295C8F0268A238410AD7A320099052419A99999963A23841AE47E10A099052415C8FC2B55AA23841333333C30890524114AE476156A23841CDCCCCBC089052417B14AEC74DA238410AD7A3B008905241'); +SELECT '#408.4', st_isvalidreason('0106000020BB0B000001000000010300000005000000D6000000000000C0F1A138410AD7A3103190524114AE4721F7A138410000000030905241713D0A57FAA1384185EB51982C9052417B14AE87FAA13841000000402A905241AE47E13AFBA1384114AE474128905241EC51B81EFDA138413D0AD7632690524152B81E85FFA13841D7A3707D2590524152B81E4500A23841713D0A072590524100000000FFA13841713D0AF724905241CDCCCCCCFFA13841CDCCCC0C249052419A99991901A238419A999919249052411F85EBD101A23841D7A3704D23905241E17A14AE02A23841A4703D3A2290524185EB51F808A23841000000D021905241E17A14EE0BA238413333335321905241666666A615A23841B81E85AB1F905241713D0AD710A23841B81E858B1E905241666666260CA2384114AE4731209052410AD7A37009A23841CDCCCCEC20905241AE47E13A06A23841EC51B87E219052419A9999D903A23841EC51B80E21905241EC51B8DE08A238418FC2F5681F905241666666660EA23841A4703D9A1D9052413D0AD7A30FA2384114AE47A11C9052413333333311A23841000000101C90524148E17A1414A23841333333931A905241EC51B81E1AA23841EC51B89E1890524185EB51381CA23841D7A370BD17905241295C8FC220A2384185EB51C816905241C3F528DC2BA238418FC2F5E814905241E17A14EE2EA23841EC51B8FE13905241AE47E1FA2BA23841EC51B8EE119052415C8FC2F52BA2384185EB51C810905241333333332EA2384114AE4701109052417B14AEC73BA238410AD7A3300D905241CDCCCCCC43A238417B14AE870B905241CDCCCC4C45A23841A4703D3A0B9052413D0AD7A34DA238411F85EB810A905241295C8F8250A23841CDCCCCBC09905241000000C053A238410AD7A36009905241A4703D0A5CA2384114AE4751099052418FC2F5A866A23841A4703D4A0A9052410000008069A2384114AE47B10A9052415C8FC2B573A23841B81E851B0D905241AE47E1FA76A23841666666C60D9052417B14AE077BA238411F85EB510E905241AE47E1FA7FA23841666666E60E9052415C8FC2358DA23841000000F010905241EC51B85E95A2384148E17A14119052417B14AE4795A23841CDCCCCCC1090524114AE47E18CA2384185EB51F80F90524148E17AD480A2384114AE47A10E9052413D0AD76383A23841713D0AF70C9052417B14AEC784A23841A4703D8A0C9052410000000086A23841A4703D0A0B9052411F85EB9187A23841B81E851B09905241F6285CCF86A2384100000010099052417B14AE4787A2384185EB51180890524114AE472186A23841CDCCCCFC079052410AD7A3B086A23841C3F5280C07905241333333B385A23841CDCCCC0C07905241000000407EA2384152B81E15079052419A9999197BA23841A4703D2A079052416666666673A2384114AE47710790524114AE47A16EA238413D0AD7F30690524114AE472170A238418FC2F5D8059052413D0AD72372A2384185EB511806905241A4703DCA71A23841D7A3707D05905241EC51B8DE7EA238411F85EBD104905241E17A14AE76A23841333333E30390524185EB51B875A23841713D0A47029052415C8FC2F576A23841D7A3703D029052419A99999976A2384114AE475101905241333333B378A23841EC51B83E019052410AD7A3307CA238410AD7A320019052418FC2F52885A23841295C8FD20090524148E17A9483A238416666664600905241295C8FC276A238411F85EB9100905241CDCCCC4C76A2384100000070FF8F5241AE47E13A76A2384133333343FF8F52417B14AE0783A23841D7A370FDFE8F5241E17A14AE81A23841C3F5283CFE8F52415C8FC2357DA2384114AE47A1FE8F5241CDCCCC8C7BA238415C8FC275FD8F524148E17AD47FA238417B14AE17FD8F5241000000807EA238413D0AD7A3FC8F5241713D0AD776A2384133333363FD8F5241CDCCCC8C73A2384152B81EF5FD8F5241E17A14AE70A2384114AE4711FE8F524185EB51B870A23841B81E852BFF8F524152B81E056CA2384114AE4731FF8F5241B81E856B6BA2384152B81E25FE8F5241AE47E13A69A23841E17A142EFE8F52419A99995962A238415C8FC275FE8F52415C8FC27562A238411F85EB710090524114AE47A15BA23841EC51B86E00905241EC51B85E5BA238419A9999E902905241295C8F025BA238417B14AE8704905241A4703D8A54A23841713D0A7704905241C3F5285C51A2384148E17A44049052418FC2F5E84CA23841A4703D4A049052410AD7A3304CA2384148E17A94049052419A9999994CA238413D0AD7F305905241AE47E1FA49A2384114AE471106905241EC51B85E49A23841AE47E1FA07905241AE47E13A43A238415C8FC255099052416666662644A23841D7A3707D0A9052415C8FC2F53FA23841CDCCCC2C0B90524185EB517839A2384185EB51380C90524152B81E4532A23841D7A370DD099052419A9999592FA2384152B81E4509905241D7A3707D2AA23841B81E857B089052415C8FC27526A238416666667608905241EC51B81E26A238417B14AE7707905241295C8F0226A23841F6285C1F07905241666666A61CA23841CDCCCC6C07905241713D0A1716A23841B81E856B07905241B81E85EB15A2384100000040079052411F85EB1108A2384114AE4741079052415C8FC23505A2384148E17AC40790524152B81E0506A23841EC51B84E09905241713D0A5707A23841AE47E10A0A905241EC51B81E12A2384152B81EA50890524152B81E4521A23841F6285CDF0890524148E17A1427A23841EC51B80E099052415C8FC2B52AA2384185EB5168099052413D0AD7E32FA23841CDCCCC3C0A9052413D0AD7A331A23841333333930A90524185EB51F833A238410AD7A3B00B9052411F85EB5135A23841EC51B8AE0B90524185EB513836A23841333333530D9052410000004030A238415C8FC2B50E905241000000802FA238415C8FC2750E9052410000008028A238419A9999B90E905241F6285C0F28A23841333333630E90524114AE47E123A23841333333730E905241D7A3707D23A2384152B81E750E9052410000008023A2384185EB51E80E905241D7A370BD1EA23841713D0A170F9052419A9999991EA23841333333830F9052419A9999991CA238411F85EB810F90524152B81E450EA2384152B81E750F9052417B14AE470AA23841EC51B89E0F905241B81E85EB05A238410AD7A3F00F905241D7A3707DFFA138417B14AEF71090524185EB51F8FDA138413D0AD72311905241295C8F02FAA13841EC51B83E11905241713D0A17EFA13841E17A145E129052417B14AE87CBA1384152B81E05179052418FC2F528C0A13841D7A3709D17905241D7A370BDC0A13841F6285C5F18905241295C8F82CBA138419A9999F917905241AE47E1BAD7A138415C8FC255169052411F85EB91E0A13841000000401590524114AE47A1E2A1384185EB5108159052415C8FC235ECA13841C3F5286C13905241C3F528DCF4A13841000000701290524152B81E45F5A138415C8FC2A51290524100000040F6A13841CDCCCC7C129052417B14AE47FBA138410000000012905241EC51B85E00A2384185EB51A8119052413D0AD7A305A238419A99990911905241EC51B81E0AA238411F85EB611090524148E17A940EA23841A4703D0A1090524152B81E0514A2384152B81EE50F905241F6285CCF15A238410AD7A3E00F9052417B14AEC718A23841CDCCCCDC0F9052419A9999191AA238415C8FC2E50F905241EC51B81E20A238415C8FC2E50F90524148E17A1420A23841333333C30F9052417B14AE8729A23841713D0AA70F905241000000002AA238413D0AD733119052411F85EB9129A23841C3F528EC12905241E17A142E28A238419A999919149052418FC2F5A825A23841CDCCCC1C15905241C3F5285C21A2384114AE473116905241F6285C4F1BA2384152B81E4517905241D7A3707D1AA2384148E17A1417905241C3F5285C19A23841D7A3702D179052413333333318A23841B81E85CB17905241000000C017A2384185EB5108189052413D0AD72310A238419A9999F91790524148E17A5410A2384148E17AD41690524148E17AD40DA2384152B81ED516905241B81E85AB09A23841F6285C1F179052418FC2F5A809A2384185EB51C8179052418FC2F56808A238417B14AEC7179052410000008008A2384185EB515818905241AE47E1BA16A23841F6285C6F189052410AD7A33017A23841C3F5289C18905241000000C012A23841AE47E10A1A9052411F85EB5110A238413D0AD7131B905241000000800DA238415C8FC2451C90524148E17A140DA23841A4703D4A1C9052413D0AD7230BA2384148E17A141E905241295C8F4205A23841295C8F421E905241F6285C4F00A238419A9999691E905241C3F5289CFDA13841AE47E16A1E905241D7A370FDFDA1384114AE47711F90524185EB51F801A23841B81E855B1F905241A4703D0A05A23841CDCCCCAC1F905241E17A14AE02A23841EC51B89E20905241295C8F82FFA138419A9999E9219052419A999919FEA1384185EB5188239052410AD7A330FAA13841E17A14DE25905241C3F5281CF9A13841F6285CFF26905241AE47E13AF8A138415C8FC2E527905241CDCCCC8CF7A1384185EB51B82890524185EB51F8F7A138413333334329905241C3F5281CF6A138418FC2F5182C905241A4703D4AF5A13841EC51B8BE2C905241CDCCCC0CF4A13841713D0AF72E90524185EB5138F3A13841000000502F905241000000C0F1A138410AD7A3103190524111000000CDCCCC4C6AA23841713D0A170A905241CDCCCC4C6FA238411F85EB710790524148E17A947AA2384114AE47410890524185EB51387BA23841D7A370ED07905241666666267BA23841713D0A7707905241EC51B85E7EA2384114AE476107905241E17A14AE7EA2384114AE473108905241713D0A5785A23841CDCCCCBC089052410AD7A33083A23841F6285C9F0B9052413333337382A23841666666460C90524148E17AD481A23841333333D30C90524114AE472181A23841333333730D905241AE47E1BA7FA23841CDCCCC3C0E9052418FC2F56876A238415C8FC2050D90524185EB513872A238418FC2F5D80B90524185EB513870A23841EC51B82E0B905241CDCCCC4C6AA23841713D0A170A90524113000000A4703DCA6BA238415C8FC295FF8F5241B81E856B74A238410AD7A380FF8F5241EC51B89E74A23841E17A149E00905241AE47E1BA74A23841F6285C4F019052419A99995974A23841295C8F520290524148E17AD473A2384114AE47B10390524152B81EC572A2384114AE4701059052417B14AE476DA23841AE47E1DA04905241F6285C8F6DA23841333333A303905241000000006CA2384152B81E9503905241EC51B81E69A23841A4703D7A039052410AD7A3B068A23841B81E85AB049052415C8FC2F55CA23841CDCCCC8C0490524152B81E455DA238411F85EB0103905241333333B35DA23841AE47E1DA00905241EC51B85E67A23841C3F528FC009052410AD7A3B067A23841CDCCCCCCFF8F524185EB51B86BA23841333333C3FF8F5241A4703DCA6BA238415C8FC295FF8F5241020000003D0AD7A346A238413D0AD7E3099052413D0AD7A346A238413D0AD7E309905241100000007B14AEC74DA238410AD7A3B008905241EC51B85E4EA23841B81E850B079052413D0AD7234FA23841C3F528DC0490524185EB51385CA23841EC51B8EE04905241B81E852B60A23841A4703DDA049052410000008066A23841A4703DFA049052411F85EB116AA23841CDCCCC0C05905241CDCCCC8C6EA23841A4703D5A05905241A4703D0A6CA238417B14AE37079052411F85EBD16AA23841A4703DCA07905241AE47E1FA68A23841E17A14FE08905241295C8F0268A238410AD7A320099052419A99999963A23841AE47E10A099052415C8FC2B55AA23841333333C30890524114AE476156A23841CDCCCCBC089052417B14AEC74DA238410AD7A3B008905241'); -- #457 -- SELECT '#457.1', st_astext(st_collectionExtract('POINT(0 0)', 1)); @@ -279,22 +301,384 @@ SELECT '#457.8', st_astext(st_collectionExtract('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))', 2)); SELECT '#457.9', st_astext(st_collectionExtract('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))', 3)); +-- #835 -- +SELECT '#835.1', st_astext(st_collectionExtract('POLYGON EMPTY', 1)); +SELECT '#835.2', st_astext(st_collectionExtract('POLYGON EMPTY', 2)); +SELECT '#835.3', st_astext(st_collectionExtract('POLYGON EMPTY', 3)); +SELECT '#835.4', st_astext(st_collectionExtract('LINESTRING EMPTY', 1)); +SELECT '#835.5', st_astext(st_collectionExtract('LINESTRING EMPTY', 2)); +SELECT '#835.6', st_astext(st_collectionExtract('LINESTRING EMPTY', 3)); +SELECT '#835.7', st_astext(st_collectionExtract('POINT EMPTY', 1)); +SELECT '#835.8', st_astext(st_collectionExtract('POINT EMPTY', 2)); +SELECT '#835.9', st_astext(st_collectionExtract('POINT EMPTY', 3)); +SELECT '#835.10', st_astext(st_collectionExtract('GEOMETRYCOLLECTION EMPTY', 1)); +SELECT '#835.11', st_astext(st_collectionExtract('GEOMETRYCOLLECTION EMPTY', 2)); +SELECT '#835.12', st_astext(st_collectionExtract('GEOMETRYCOLLECTION EMPTY', 3)); + -- #650 -- SELECT '#650', ST_AsText(ST_Collect(ARRAY[ST_MakePoint(0,0), ST_MakePoint(1,1), null, ST_MakePoint(2,2)])); +-- #662 -- +--SELECT '#662', ST_MakePolygon(ST_AddPoint(ST_AddPoint(ST_MakeLine(ST_SetSRID(ST_MakePointM(i+m,j,m),4326),ST_SetSRID(ST_MakePointM(j+m,i-m,m),4326)),ST_SetSRID(ST_MakePointM(i,j,m),4326)),ST_SetSRID(ST_MakePointM(i+m,j,m),4326))) As the_geom FROM generate_series(-10,50,20) As i CROSS JOIN generate_series(50,70, 20) As j CROSS JOIN generate_series(1,2) As m ORDER BY i, j, m, i*j*m LIMIT 1; + +-- #667 -- +SELECT '#667', ST_AsEWKT(ST_LineToCurve(ST_Buffer(ST_SetSRID(ST_Point(i,j),4326), j))) As the_geom FROM generate_series(-10,50,10) As i CROSS JOIN generate_series(40,70, 20) As j ORDER BY i, j, i*j LIMIT 1; + +-- #677 -- +SELECT '#677',round(ST_Distance_Spheroid(ST_GeomFromEWKT('MULTIPOLYGON(((-10 40,-10 55,-10 70,5 40,-10 40)))'), ST_GeomFromEWKT('MULTIPOINT(20 40,20 55,20 70,35 40,35 55,35 70,50 40,50 55,50 70)'), 'SPHEROID["GRS_1980",6378137,298.257222101]')) As result; + +-- #680 -- +SELECT '#680', encode(ST_AsBinary(geography(foo1.the_geom)),'hex') As result FROM ((SELECT ST_SetSRID(ST_MakePointM(i,j,m),4326) As the_geom FROM generate_series(-10,50,10) As i CROSS JOIN generate_series(50,70, 20) AS j CROSS JOIN generate_series(1,2) As m ORDER BY i, j, i*j*m)) As foo1 LIMIT 1; + +-- #681 -- +SELECT '#681a', ST_AsGML(ST_GeomFromText('POINT EMPTY', 4326)); +SELECT '#681b', ST_AsGML(ST_GeomFromText('POLYGON EMPTY', 4326)); +SELECT '#681c', ST_AsGML(ST_GeomFromText('LINESTRING EMPTY', 4326)); +SELECT '#681d', ST_AsGML(ST_GeomFromText('MULTIPOINT EMPTY', 4326)); +SELECT '#681e', ST_AsGML(ST_GeomFromText('MULTILINESTRING EMPTY', 4326)); +SELECT '#681f', ST_AsGML(ST_GeomFromText('MULTIPOLYGON EMPTY', 4326)); +SELECT '#681g', ST_AsGML(ST_GeomFromText('GEOMETRYCOLLECTION EMPTY', 4326)); + + +-- #682 -- +SELECT '#682', ST_Buffer(ST_GeomFromText('POLYGON EMPTY',4326) , 0.5); + +-- #683 -- +SELECT '#683', ST_BuildArea(ST_GeomFromText('POINT EMPTY',4326)); + +-- #684 -- +SELECT '#684', ST_Centroid(ST_GeomFromText('POLYGON EMPTY',4326)); + +-- #685 -- +SELECT '#685', ST_ConvexHull(ST_GeomFromText('POLYGON EMPTY',4326)); + +-- #686 -- +SELECT '#686', ST_COLLECT(ST_GeomFromText('POLYGON EMPTY',4326),ST_GeomFromText('TRIANGLE EMPTY',4326)); + +-- #687 -- +SELECT '#687', ST_DFullyWithin(ST_GeomFromText('LINESTRING(-10 50,50 -10)',4326), ST_GeomFromText('POLYGON EMPTY',4326),5); + +-- #689 -- +SELECT '#689', ST_CoveredBy(ST_GeomFromText('POLYGON EMPTY'), ST_GeomFromText('LINESTRING(-10 50,50 -10)')); + +-- #690 -- +SELECT '#690'; +SELECT ST_MakeLine(ST_GeomFromText('POINT(-11.1111111 40)'), ST_GeomFromText('LINESTRING(-11.1111111 70,70 -11.1111111)')) As result; + +-- #693 -- +SELECT '#693a', ST_GeomFromEWKT('SRID=4326;POLYGONM((-71.1319 42.2503 1,-71.132 42.2502 3,-71.1323 42.2504 -2,-71.1322 42.2505 1,-71.1319 42.2503 0))'); +SELECT '#693b', ST_GeomFromEWKT('SRID=4326;POLYGONM((-71.1319 42.2512 0,-71.1318 42.2511 20,-71.1317 42.2511 -20,-71.1317 42.251 5,-71.1317 42.2509 4,-71.132 42.2511 6,-71.1319 42.2512 30))'); + +-- #694 -- +SELECT '#694'; +SELECT ST_MakePolygon('POINT(1 2)'::geometry); + +-- #695 -- +SELECT '#695'; +SELECT ST_RemovePoint('POINT(-11.1111111 40)'::geometry, 1); + +-- #696 -- +SELECT '#696',ST_Segmentize(ST_GeomFromEWKT('PolyhedralSurface( ((0 0 0, 0 0 1, 0 1 1, 0 1 0, 0 0 0)), ((0 0 0, 0 1 0, 1 1 0, 1 0 0, 0 0 0)), ((0 0 0, 1 0 0, 1 0 1, 0 0 1, 0 0 0)), ((1 1 0, 1 1 1, 1 0 1, 1 0 0, 1 1 0)), ((0 1 0, 0 1 1, 1 1 1, 1 1 0, 0 1 0)), ((0 0 1, 1 0 1, 1 1 1, 0 1 1, 0 0 1)) )'), 0.5); + +-- #720 -- +SELECT '#720', ST_AsText(ST_SnapTogrid(ST_Transform(ST_GeomFromText('MULTIPOINT(-10 40,-10 55,-10 70,5 40,5 55,5 70,20 40,20 55,20 70,35 40,35 55,35 70,50 40,50 55,50 70)',4326), 3395), 0.01)); + +-- #723 -- +SELECT '#723', + ST_SnapToGrid( ST_Intersection(a.geog, b.geog)::geometry, 0.00001) +FROM (VALUES (ST_GeogFromText('SRID=4326;POINT(-11.1111111 40)') ), (ST_GeogFromText('SRID=4326;POINT(-11.1111111 55)') ) ) As a(geog) CROSS JOIN ( VALUES (ST_GeogFromText('SRID=4326;POINT(-11.1111111 40)') ), (ST_GeogFromText('SRID=4326;POINT(-11.1111111 55)') )) As b(geog); + +-- #729 -- +--SELECT '#729',ST_MakeLine(foo1.the_geom) As result FROM ((SELECT ST_GeomFromText('POINT EMPTY',4326) As the_geom UNION ALL SELECT ST_GeomFromText('MULTIPOINT EMPTY',4326) As the_geom UNION ALL SELECT ST_GeomFromText('MULTIPOLYGON EMPTY',4326) As the_geom UNION ALL SELECT ST_GeomFromText('LINESTRING EMPTY',4326) As the_geom UNION ALL SELECT ST_GeomFromText('MULTILINESTRING EMPTY',4326) As the_geom ) ) As foo1; + +-- #804 +SELECT '#804', ST_AsGML(3, 'SRID=4326;POINT(0 0)'::geometry, 0, 1); + + -- #845 SELECT '#845', ST_Intersects('POINT(169.69960846592 -46.5061209281002)'::geometry, 'POLYGON((169.699607857174 -46.5061218662,169.699607857174 -46.5061195965597,169.699608806526 -46.5061195965597,169.699608806526 -46.5061218662,169.699607857174 -46.5061218662))'::geometry); +-- #834 +SELECT '#834', ST_AsEWKT(ST_Intersection('LINESTRING(0 0,0 10,10 10,10 0)', 'LINESTRING(10 10 4,10 0 5,0 0 5)')); + -- #884 -- CREATE TABLE foo (id integer, the_geom geometry); -INSERT INTO foo VALUES (1, st_geomfromtext('MULTIPOLYGON(((-113.6 35.4,-113.6 35.8,-113.2 35.8,-113.2 35.4,-113.6 35.4),(-113.5 35.5,-113.3 35.5,-113.3 35.7,-113.5 35.7,-113.5 35.5)))', -1)); -INSERT INTO foo VALUES (2, st_geomfromtext('MULTIPOLYGON(((-113.7 35.3,-113.7 35.9,-113.1 35.9,-113.1 35.3,-113.7 35.3),(-113.6 35.4,-113.2 35.4,-113.2 35.8,-113.6 35.8,-113.6 35.4)),((-113.5 35.5,-113.5 35.7,-113.3 35.7,-113.3 35.5,-113.5 35.5)))', -1)); +INSERT INTO foo VALUES (1, st_geomfromtext('MULTIPOLYGON(((-113.6 35.4,-113.6 35.8,-113.2 35.8,-113.2 35.4,-113.6 35.4),(-113.5 35.5,-113.3 35.5,-113.3 35.7,-113.5 35.7,-113.5 35.5)))')); +INSERT INTO foo VALUES (2, st_geomfromtext('MULTIPOLYGON(((-113.7 35.3,-113.7 35.9,-113.1 35.9,-113.1 35.3,-113.7 35.3),(-113.6 35.4,-113.2 35.4,-113.2 35.8,-113.6 35.8,-113.6 35.4)),((-113.5 35.5,-113.5 35.7,-113.3 35.7,-113.3 35.5,-113.5 35.5)))')); select '#884', id, ST_Within( -ST_GeomFromText('POINT (-113.4 35.6)', -1), the_geom +ST_GeomFromText('POINT (-113.4 35.6)'), the_geom ) from foo; +select '#938', 'POLYGON EMPTY'::geometry::box2d; + DROP TABLE foo; +-- #668 -- +select '#668',box2d('CIRCULARSTRING(10 2,12 2,14 2)'::geometry) as b; + +-- #711 -- +select '#711', ST_GeoHash(ST_GeomFromText('POLYGON EMPTY',4326)); + +-- #712 -- +SELECT '#712',ST_IsValid(ST_GeomFromText('POLYGON EMPTY',4326)); + +-- #756 +WITH inp AS ( SELECT 'LINESTRING(0 0, 1 1)'::geometry as s, + 'LINESTRING EMPTY'::geometry as e ) + SELECT '#756.1', ST_Equals(s, st_multi(s)), + ST_Equals(s, st_collect(s, e)) + FROM inp; + + +-- #1023 -- +select '#1023', 'POINT(10 4)'::geometry = 'POINT(10 4)'::geometry; +select '#1023.a', 'POINT(10 4)'::geometry = 'POINT(10 5)'::geometry; +select '#1023.b', postgis_addbbox('POINT(10 4)'::geometry) = 'POINT(10 4)'::geometry; + +-- #1069 -- +select '#1060', ST_Relate(ST_GeomFromText('POINT EMPTY',4326), ST_GeomFromText('POINT EMPTY',4326)) As result; + +-- #1273 -- +WITH p AS ( SELECT 'POINT(832694.188 816254.625)'::geometry as g ) +SELECT '#1273', st_equals(p.g, postgis_addbbox(p.g)) from p; + +-- Another for #1273 -- +WITH p AS ( SELECT 'MULTIPOINT((832694.188 816254.625))'::geometry as g ) +SELECT '#1273.1', st_equals(p.g, postgis_dropbbox(p.g)) from p; + +-- #877, #818 +create table t(g geometry); +select '#877.1', st_estimated_extent('t','g'); +analyze t; +select '#877.2', st_estimated_extent('public', 't','g'); +insert into t(g) values ('LINESTRING(-10 -50, 20 30)'); +select '#877.3', st_estimated_extent('t','g'); +analyze t; +select '#877.4', st_estimated_extent('t','g'); +truncate t; +select '#818.1', st_estimated_extent('t','g'); +drop table t; + +-- #1320 +SELECT '<#1320>'; +CREATE TABLE A ( geom geometry(MultiPolygon, 4326), + geog geography(MultiPolygon, 4326) ); +-- Valid inserts +INSERT INTO a(geog) VALUES('SRID=4326;MULTIPOLYGON (((0 0, 10 0, 10 10, 0 0)))'::geography); +INSERT INTO a(geom) VALUES('SRID=4326;MULTIPOLYGON (((0 0, 10 0, 10 10, 0 0)))'::geometry); +SELECT '#1320.geog.1', geometrytype(geog::geometry), st_srid(geog::geometry) FROM a where geog is not null; +SELECT '#1320.geom.1', geometrytype(geom), st_srid(geom) FROM a where geom is not null; +-- Type mismatches is not allowed +INSERT INTO a(geog) VALUES('SRID=4326;POLYGON ((0 0, 10 0, 10 10, 0 0))'::geography); +INSERT INTO a(geom) VALUES('SRID=4326;POLYGON ((0 0, 10 0, 10 10, 0 0))'::geometry); +SELECT '#1320.geog.2', geometrytype(geog::geometry), st_srid(geog::geometry) FROM a where geog is not null; +SELECT '#1320.geom.2', geometrytype(geom), st_srid(geom) FROM a where geom is not null; +-- Even if it's a trigger changing the type +CREATE OR REPLACE FUNCTION triga() RETURNS trigger AS +$$ BEGIN + NEW.geom = ST_GeometryN(New.geom,1); + NEW.geog = ST_GeometryN(New.geog::geometry,1)::geography; + RETURN NEW; +END; $$ language plpgsql VOLATILE; +CREATE TRIGGER triga_before + BEFORE INSERT ON a FOR EACH ROW + EXECUTE PROCEDURE triga(); +INSERT INTO a(geog) VALUES('SRID=4326;MULTIPOLYGON (((0 0, 10 0, 10 10, 0 0)))'::geography); +INSERT INTO a(geom) VALUES('SRID=4326;MULTIPOLYGON (((0 0, 10 0, 10 10, 0 0)))'::geometry); +SELECT '#1320.geog.3', geometrytype(geog::geometry), st_srid(geog::geometry) FROM a where geog is not null; +SELECT '#1320.geom.3', geometrytype(geom), st_srid(geom) FROM a where geom is not null; +DROP TABLE A; +DROP FUNCTION triga(); +SELECT ''; + +-- st_AsText POLYGON((0 0,10 0,10 10,0 0)) + + +-- #1344 +select '#1344', octet_length(ST_AsEWKB(st_makeline(g))) FROM ( values ('POINT(0 0)'::geometry ) ) as foo(g); + +-- #1385 +SELECT '#1385', ST_Extent(g) FROM ( select null::geometry as g ) as foo; + +-- #657 +SELECT '#657.1',Round(ST_X(ST_Project('POINT(175 10)'::geography, 2000000, 3.1415/2)::GEOMETRY)::numeric,2); +SELECT '#657.2',Round(ST_Distance(ST_Project('POINT(10 10)'::geography, 10, 0), 'POINT(10 10)'::geography)::numeric,2); +SELECT '#657.3',ST_DWithin(ST_Project('POINT(10 10)'::geography, 2000, pi()/2), 'POINT(10 10)'::geography, 2000); + +-- #1305 +SELECT '#1305.1',ST_AsText(ST_Project('POINT(10 10)'::geography, 0, 0)); +WITH pts AS ( SELECT 'POINT(0 45)'::geography AS s, 'POINT(45 45)'::geography AS e ) +SELECT '#1305.2',abs(ST_Distance(e, ST_Project(s, ST_Distance(s, e), ST_Azimuth(s, e)))) < 0.001 FROM pts; +SELECT '#1305.3',ST_Azimuth('POINT(0 45)'::geography, 'POINT(0 45)'::geography) IS NULL; + +-- #1445 +SELECT '01060000400200000001040000400100000001010000400000000000000000000000000000000000000000000000000101000040000000000000F03F000000000000F03F000000000000F03F'::geometry; +SELECT '01050000400200000001040000400100000001010000400000000000000000000000000000000000000000000000000101000040000000000000F03F000000000000F03F000000000000F03F'::geometry; +SELECT '01040000400200000001040000400100000001010000400000000000000000000000000000000000000000000000000101000040000000000000F03F000000000000F03F000000000000F03F'::geometry; +SELECT '01090000400200000001040000400100000001010000400000000000000000000000000000000000000000000000000101000040000000000000F03F000000000000F03F000000000000F03F'::geometry; +SELECT '010B0000400200000001040000400100000001010000400000000000000000000000000000000000000000000000000101000040000000000000F03F000000000000F03F000000000000F03F'::geometry; +SELECT '010C0000400200000001040000400100000001010000400000000000000000000000000000000000000000000000000101000040000000000000F03F000000000000F03F000000000000F03F'::geometry; + + +-- #1453 +SELECT '#1453.1', ST_OrderingEquals('POINT EMPTY', 'POINT EMPTY'); +SELECT '#1453.2', ST_OrderingEquals('POINT EMPTY', 'POINT Z EMPTY'); + +-- #1454 +with inp as ( select 'MULTILINESTRING((0 0, 2 0))'::geometry as g ) +SELECT '#1454', st_orderingequals(g,g) from inp; + +-- #1414 +SELECT '#1414', st_astext(st_force_3dz('CURVEPOLYGON EMPTY')); + +-- #1478 +SELECT '#1478', 'SRID=1;POINT EMPTY'::geometry::text::geometry; + +-- #745 +SELECT '#745', ST_AsEWKT(ST_Split('POLYGON((-72 42 1,-70 43 1,-71 41 1,-72 42 1))', + 'LINESTRING(-10 40 1,-9 41 1)')); + +-- #1450 +SELECT '#1450', GeometryType('POINT(0 0)'::geography), GeometryType('POLYGON EMPTY'::geography); + +-- #1482 +select '#1482', ST_Srid('POINT(0 0)'::geography(point, 0)::geometry); + +-- #852 +CREATE TABLE cacheable (id int, g geometry); +COPY cacheable FROM STDIN; +1 POINT(0.5 0.5000000000001) +2 POINT(0.5 0.5000000000001) +\. +select '#852.1', id, -- first run is not cached, consequent are cached + st_intersects(g, 'POLYGON((0 0, 10 10, 1 0, 0 0))'::geometry), + st_intersects(g, 'POLYGON((0 0, 1 1, 1 0, 0 0))'::geometry) from cacheable; +UPDATE cacheable SET g = 'POINT(0.5 0.5)'; +-- New select, new cache +select '#852.2', id, -- first run is not cached, consequent are cached + st_intersects(g, 'POLYGON((0 0, 10 10, 1 0, 0 0))'::geometry), + st_intersects(g, 'POLYGON((0 0, 1 1, 1 0, 0 0))'::geometry) from cacheable; +DROP TABLE cacheable; + +-- #1489 +with inp AS ( SELECT + st_multi('POINT EMPTY'::geometry) as mp, + st_multi('LINESTRING EMPTY'::geometry) as ml, + st_multi('POLYGON EMPTY'::geometry) as ma, + st_multi('GEOMETRYCOLLECTION EMPTY'::geometry) as mm +) select '#1489', + st_astext(mp), st_numgeometries(mp), + st_astext(ml), st_numgeometries(ml), + st_astext(ma), st_numgeometries(ma), + st_astext(mm), st_numgeometries(mm) +FROM inp; + +-- #1150 +insert into spatial_ref_sys (srid, proj4text) values (500001,NULL); +insert into spatial_ref_sys (srid, proj4text) values (500002, '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs'); +select '#1150', st_astext(st_transform('SRID=500002;POINT(0 0)',500001)); + +-- #1038 +select '#1038', ST_AsSVG('POLYGON EMPTY'::geometry); + +-- #1042 +select '#1042',round((st_ymax(st_minimumboundingcircle('LINESTRING(-1 -1, 1 1)')) * st_xmax(st_minimumboundingcircle('LINESTRING(-1 -1, 1 1)')))::numeric,0); + +-- #1170 -- +SELECT '#1170', ST_Y(ST_Intersection( ST_GeogFromText( 'POINT(0 90)'), ST_GeogFromText( 'POINT(0 90)' ))::geometry); + +-- #1264 -- +SELECT '#1264', ST_DWithin('POLYGON((-10 -10, -10 10, 10 10, 10 -10, -10 -10))'::geography, 'POINT(0 0)'::geography, 0); + +-- #1398 +select '#1398a', st_astext(st_snaptogrid(st_project('POINT(-120 45)'::geography, 100000, radians(45))::geometry,0.000001)); +select '#1398b', st_astext(st_snaptogrid(st_project('POINT(20 85)'::geography, 2000000, radians(0.1))::geometry,0.000001)); + +-- #1543 +with inp as ( select +'0105000000020000000102000000040000000000000000000000000000000000000000000000000024400000000000000000000000000000244000000000000024400000000000000000000000000000000001020000000100000000000000000000000000000000000000' +::geometry as g ) +select '#1543', st_astext(g), st_astext(st_buildarea(g)) from inp; + +-- #1578 +with inp as ( + select ST_Collect('POLYGON EMPTY', 'POLYGON EMPTY') as mp, + 'POINT(0 0)'::geometry as p +) +select '#1578', _st_within(p, mp), _st_intersects(p, mp) FROM inp; + +-- #1580 +select '#1580.1', ST_Summary(ST_Transform('SRID=4326;POINT(0 0)'::geometry, 3395)); +select '#1580.2', ST_Transform('SRID=4326;POINT(180 90)'::geometry, 3395); -- fails +select '#1580.3', ST_Summary(ST_Transform('SRID=4326;POINT(0 0)'::geometry, 3395)); + +-- #1596 -- +CREATE TABLE road_pg (ID INTEGER, NAME VARCHAR(32)); +SELECT '#1596.1', AddGeometryColumn( 'road_pg','roads_geom', 3395, 'POINT', 2 ); +SELECT '#1596.2', UpdateGeometrySRID( 'road_pg','roads_geom', 330000); +SELECT '#1596.3', srid FROM geometry_columns + WHERE f_table_name = 'road_pg' AND f_geometry_column = 'roads_geom'; +SELECT '#1596.4', UpdateGeometrySRID( 'road_pg','roads_geom', 999000); +SELECT '#1596.5', srid FROM geometry_columns + WHERE f_table_name = 'road_pg' AND f_geometry_column = 'roads_geom'; +SELECT '#1596.6', UpdateGeometrySRID( 'road_pg','roads_geom', -1); +SELECT '#1596.7', srid FROM geometry_columns + WHERE f_table_name = 'road_pg' AND f_geometry_column = 'roads_geom'; +DROP TABLE road_pg; + +-- #1596 +WITH inp AS ( SELECT + 'POLYGON((-176 -22,-176 -21,-175 -21,-175 -22,-176 -22))'::geography as a, + 'POINT(-176 -22)'::geography as p +) SELECT '#1596', ST_Summary(ST_Intersection(a,p)) FROM inp; + +-- #1695 +SELECT '#1695', ST_AsEWKT(ST_SnapToGrid('MULTIPOLYGON(((0 0, 10 0, 10 10, 0 10, 0 0)))'::geometry, 20)); + +-- #1697 -- +CREATE TABLE eg(g geography, gm geometry); +CREATE INDEX egi on eg using gist (g); +CREATE INDEX egind on eg using gist (gm gist_geometry_ops_nd); +INSERT INTO eg (g, gm) + select 'POINT EMPTY'::geography, + 'POINT EMPTY'::geometry + from generate_series(1,1024); +SELECT '#1697.1', count(*) FROM eg WHERE g && 'POINT(0 0)'::geography; +SELECT '#1697.2', count(*) FROM eg WHERE gm && 'POINT(0 0)'::geometry; +SELECT '#1697.3', count(*) FROM eg WHERE gm ~= 'POINT EMPTY'::geometry; +DROP TABLE eg; + +-- #1734 -- +create table eg (g geography); +create index egi on eg using gist (g); +INSERT INTO eg(g) VALUES (NULL); +INSERT INTO eg (g) VALUES ('POINT(0 0)'::geography); +INSERT INTO eg (g) select 'POINT(0 0)'::geography + FROM generate_series(1,1024); +SELECT '#1734.1', count(*) FROM eg; +DROP table eg; + +-- #1755 -- +select '#1755', st_geographyFromText('SRID=4326;Point(85 35 0)'); + +-- #1776 -- +with inp as ( SELECT + 'POLYGON EMPTY'::geometry as A, + 'POLYGON((0 0, 10 0, 10 10, 0 0))'::geometry as B ) +SELECT '#1776', + ST_AsText(ST_SymDifference(A,B)), ST_AsText(ST_SymDifference(B, A)) +FROM inp; + +-- #1791 -- +with inp as ( SELECT + '010100000000000000004065C0041AD965BE5554C0'::geometry as a, + '010100000001000000004065C0041AD965BE5554C0'::geometry as b +) SELECT '#1791', round(ST_Azimuth(a,b)*10)/10 from inp; + + +-- #1799 -- +SELECT '#1799', ST_Segmentize('LINESTRING(0 0, 10 0)'::geometry, 0); + -- Clean up DELETE FROM spatial_ref_sys; diff -Nru postgis-1.5.3/regress/tickets_expected postgis-2.0.1/regress/tickets_expected --- postgis-1.5.3/regress/tickets_expected 2011-05-12 21:46:31.000000000 +0000 +++ postgis-2.0.1/regress/tickets_expected 2012-05-04 08:06:16.000000000 +0000 @@ -1,47 +1,48 @@ #2|POLYGON((1 1,1 2,2 2,3 2,3 1,2 1,1 1)) #11|0 +NOTICE: ST_Locate_Between_Measures and ST_Locate_Along_Measure are deprecated. Use ST_LocateAlong and ST_LocateBetween. #21|SRID=31293;POINTM(6220.13 5337367.145 4566) t -ERROR: AddGeometryColumns() - invalid SRID +ERROR: AddGeometryColumn() - invalid SRID #44|t|t #58|220187|150406|220289|150507 -ERROR: geometry_to_gml2: 'CurvePolygon' geometry type not supported +ERROR: lwgeom_to_gml2: 'CurvePolygon' geometry type not supported #66|CIRCULARSTRING(0 0,1 1,2 2) #68a|MULTIPOINT(1 3,4 5) -ERROR: lwgeom.c:924: unsupported geom type: CircularString +ERROR: lwgeom_longitude_shift: unsupported geom type: CircularString #69|CIRCULARSTRING(220269 150417,220228 150507,220228 150408) -#70|5 +#70|3 #73|GEOMETRYCOLLECTION(CIRCULARSTRING(1 1,2 3,4 5,6 7,5 6)) #80|MULTILINESTRING((0 0,1 1)) #83|MULTICURVE(CIRCULARSTRING(220268 150415,220227 150505,220227 150406)) ERROR: Unsupported geometry type: CircularString #112|GEOMETRYCOLLECTION(POINT(-10 50)) +NOTICE: ST_Locate_Between_Measures and ST_Locate_Along_Measure are deprecated. Use ST_LocateAlong and ST_LocateBetween. ERROR: Geometry argument does not have an 'M' ordinate #116|POLYGON EMPTY -ERROR: lwgeom_grid: Unsupported geometry type: CircularString +#122|CIRCULARSTRING(220268 150415,220227 150505,220227 150406) #124a|COMPOUNDCURVE(CIRCULARSTRING(0 0,1 1,1 0),(1 0,30 5),CIRCULARSTRING(30 5,34 56,67 89)) ERROR: incontinuous compound curve -HINT: "...IRCULARSTRING(0 0,1 1,1 0),(1 0,30 6)" <-- parse error at position 52 within geometry -#145a|0107000020E610000000000000 +#145a|0103000020E610000000000000 #145b|0 #146|0|t|GEOMETRYCOLLECTION(LINESTRING(0 0,-1 -1),MULTIPOINT(1 2,2 3)) -ERROR: geometry contains non-closed rings +ERROR: Invalid hex string, length (267) has to be a multiple of two! #157|ST_Polygon|POLYGON #157|ST_Point|POINT #157|ST_Polygon|POLYGON #157|ST_CurvePolygon|CURVEPOLYGON #157|ST_CircularString|CIRCULARSTRING -#168|3|MULTIPOLYGON(((4275341.96977851 259186.966993061,4275341.96977851 259186.966993061,4275341.96977851 259186.966993061))) +#168|3|MULTIPOLYGON ZM (((4275341.96977851 259186.966993061 1323.76295828331 -1.79769313486232e+308,4275341.96977851 259186.966993061 1323.76295828331 -1.79769313486232e+308,4275341.96977851 259186.966993061 1323.76295828331 -1.79769313486232e+308)))|IllegalArgumentException: Invalid number of points in LinearRing found 3 - must be 0 or >= 4 #175|SRID=26915;POINT(482020 4984378) #178a|0 #178b|5 -NOTICE: No points in input array +NOTICE: No points or linestrings in input array #179a| -NOTICE: No points in input array +NOTICE: No points or linestrings in input array #179b| -#183|COMPOUNDCURVE(CIRCULARSTRING(0 0,0.500000000000184 1.20710678118655,1 0),(1 0,0 1)) +#183|CIRCULARSTRING(0 0,0.5 1.2071067812,0 1) #210a| -NOTICE: No points in input array +NOTICE: No points or linestrings in input array #210b| #213|17 #234|COMPOUNDCURVE((0 0,1 1)) @@ -63,16 +64,159 @@ #277|1,1e+308 #299|2 #304 +#304.a|21 +#304.b|1 +#408|Too few points in geometry component[2310341.45565344 4836396.65124226] +NOTICE: Too few points in geometry component at or near point 0 0 +#408.1|f +#408.2|Too few points in geometry component[0 0] +NOTICE: IllegalArgumentException: Invalid number of points in LinearRing found 2 - must be 0 or >= 4 +#408.3|f +#408.4|IllegalArgumentException: Invalid number of points in LinearRing found 2 - must be 0 or >= 4 #457.1|POINT(0 0) -#457.2| -#457.3| -#457.4| +#457.2|LINESTRING EMPTY +#457.3|POLYGON EMPTY +#457.4|POINT EMPTY #457.5|LINESTRING(0 0,1 1) -#457.6| -#457.7| -#457.8| +#457.6|POLYGON EMPTY +#457.7|POINT EMPTY +#457.8|LINESTRING EMPTY #457.9|POLYGON((0 0,1 0,1 1,0 1,0 0)) +#835.1|POINT EMPTY +#835.2|LINESTRING EMPTY +#835.3|POLYGON EMPTY +#835.4|POINT EMPTY +#835.5|LINESTRING EMPTY +#835.6|POLYGON EMPTY +#835.7|POINT EMPTY +#835.8|LINESTRING EMPTY +#835.9|POLYGON EMPTY +#835.10|MULTIPOINT EMPTY +#835.11|MULTILINESTRING EMPTY +#835.12|MULTIPOLYGON EMPTY #650|MULTIPOINT(0 0,1 1,2 2) +#667|SRID=4326;CURVEPOLYGON(CIRCULARSTRING(30 40,-49.2314112161292 32.1963871193548,30 40)) +#677|1121395 +#680|01d107000000000000000024c000000000000049400000000000000040 +#681a| +#681b| +#681c| +#681d| +#681e| +#681f| +#681g| +#682|0103000020E610000000000000 +#683|0103000020E610000000000000 +#684|0103000020E610000000000000 +#685|0103000020E610000000000000 +#686|0107000020E610000000000000 +#687|f +#689|f +#690 +010200000003000000F771D98DE33826C00000000000004440F771D98DE33826C000000000008051400000000000805140F771D98DE33826C0 +#693a|0103000060E61000000100000005000000EA95B20C71C851C02B1895D409204540000000000000F03F9CC420B072C851C0C7BAB88D062045400000000000000840B1506B9A77C851C08E75711B0D20454000000000000000C0FF21FDF675C851C0F2D24D6210204540000000000000F03FEA95B20C71C851C02B1895D4092045400000000000000000 +#693b|0103000060E61000000100000007000000EA95B20C71C851C0AA605452272045400000000000000000386744696FC851C04703780B2420454000000000000034408638D6C56DC851C04703780B2420454000000000000034C08638D6C56DC851C0E3A59BC42020454000000000000014408638D6C56DC851C08048BF7D1D20454000000000000010409CC420B072C851C04703780B242045400000000000001840EA95B20C71C851C0AA605452272045400000000000003E40 +#694 +ERROR: Shell is not a line +#695 +ERROR: First argument must be a LINESTRING +#696|010F000080060000000103000080010000000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000F03F0000000000000000000000000000F03F000000000000F03F0000000000000000000000000000F03F0000000000000000000000000000000000000000000000000000000000000000010300008001000000050000000000000000000000000000000000000000000000000000000000000000000000000000000000F03F0000000000000000000000000000F03F000000000000F03F0000000000000000000000000000F03F0000000000000000000000000000000000000000000000000000000000000000000000000000000001030000800100000005000000000000000000000000000000000000000000000000000000000000000000F03F00000000000000000000000000000000000000000000F03F0000000000000000000000000000F03F00000000000000000000000000000000000000000000F03F00000000000000000000000000000000000000000000000001030000800100000005000000000000000000F03F000000000000F03F0000000000000000000000000000F03F000000000000F03F000000000000F03F000000000000F03F0000000000000000000000000000F03F000000000000F03F00000000000000000000000000000000000000000000F03F000000000000F03F0000000000000000010300008001000000050000000000000000000000000000000000F03F00000000000000000000000000000000000000000000F03F000000000000F03F000000000000F03F000000000000F03F000000000000F03F000000000000F03F000000000000F03F00000000000000000000000000000000000000000000F03F00000000000000000103000080010000000500000000000000000000000000000000000000000000000000F03F000000000000F03F0000000000000000000000000000F03F000000000000F03F000000000000F03F000000000000F03F0000000000000000000000000000F03F000000000000F03F00000000000000000000000000000000000000000000F03F +#720|MULTIPOINT(-1113194.91 4838471.4,-1113194.91 7326837.72,-1113194.91 11028513.63,556597.45 4838471.4,556597.45 7326837.72,556597.45 11028513.63,2226389.82 4838471.4,2226389.82 7326837.72,2226389.82 11028513.63,3896182.18 4838471.4,3896182.18 7326837.72,3896182.18 11028513.63,5565974.54 4838471.4,5565974.54 7326837.72,5565974.54 11028513.63) +#723|0101000020E61000006284F068E33826C00000000000004440 +#723|0107000020E610000000000000 +#723|0107000020E610000000000000 +#723|0101000020E61000006284F068E33826C00100000000804B40 +#804|0 0 #845|t +#834|GEOMETRYCOLLECTION(POINT(0 0 5),LINESTRING(10 10 5,10 0 5)) #884|1|f #884|2|t +#938| +#668|BOX(10 2,14 2) +#711| +#712|t +#756.1|t|t +#1023|t +#1023.a|f +#1023.b|t +#1060|FFFFFFFF2 +#1273|t +#1273.1|t +NOTICE: ""."t"."g" is empty or not analyzed +#877.1| +NOTICE: "public"."t"."g" is empty or not analyzed +#877.2| +NOTICE: ""."t"."g" is empty or not analyzed +#877.3| +#877.4|BOX(-10 -50,20 30) +NOTICE: ""."t"."g" is empty or not analyzed +#818.1| +<#1320> +#1320.geog.1|MULTIPOLYGON|4326 +#1320.geom.1|MULTIPOLYGON|4326 +ERROR: Geometry type (Polygon) does not match column type (MultiPolygon) +ERROR: Geometry type (Polygon) does not match column type (MultiPolygon) +#1320.geog.2|MULTIPOLYGON|4326 +#1320.geom.2|MULTIPOLYGON|4326 +ERROR: Geometry type (Polygon) does not match column type (MultiPolygon) +ERROR: Geometry type (Polygon) does not match column type (MultiPolygon) +#1320.geog.3|MULTIPOLYGON|4326 +#1320.geom.3|MULTIPOLYGON|4326 + +#1344|25 +#1385| +#657.1|-166.78 +#657.2|10.00 +#657.3|t +#1305.1|POINT(10 10) +#1305.2|t +#1305.3|t +ERROR: MultiPolygon cannot contain MultiPoint element at character 8 +ERROR: MultiLineString cannot contain MultiPoint element at character 8 +ERROR: MultiPoint cannot contain MultiPoint element at character 8 +ERROR: CompoundCurve cannot contain MultiPoint element at character 8 +ERROR: MultiCurve cannot contain MultiPoint element at character 8 +ERROR: MultiSurface cannot contain MultiPoint element at character 8 +#1453.1|t +#1453.2|f +#1454|t +#1414|CURVEPOLYGON Z EMPTY +#1478|01040000200100000000000000 +#745|GEOMETRYCOLLECTION(POLYGON((-72 42 1,-70 43 1,-71 41 1,-72 42 1))) +#1450|POINT|POLYGON +#1482|4326 +#852.1|1|f|f +#852.1|2|f|f +#852.2|1|t|t +#852.2|2|t|t +#1489|MULTIPOINT EMPTY|0|MULTILINESTRING EMPTY|0|MULTIPOLYGON EMPTY|0|GEOMETRYCOLLECTION EMPTY|0 +ERROR: AddToPROJ4SRSCache: could not parse proj4 string '' +#1038| +#1042|2 +#1170|90 +#1264|t +#1398a|POINT(-119.093153 45.632669) +#1398b|POINT(-160.137654 77.091608) +#1543|MULTILINESTRING((0 0,10 0,10 10,0 0),(0 0))|POLYGON((0 0,10 10,10 0,0 0)) +#1578|f|f +#1580.1|Point[B] +ERROR: transform: couldn't project point (180 90 0): tolerance condition error (-20) +#1580.3|Point[B] +#1596.1|public.road_pg.roads_geom SRID:3395 TYPE:POINT DIMS:2 +ERROR: invalid SRID: 330000 not found in spatial_ref_sys +#1596.3|3395 +ERROR: invalid SRID: 999000 not found in spatial_ref_sys +#1596.5|3395 +NOTICE: SRID value -1 converted to the officially unknown SRID value 0 +#1596.6|public.road_pg.roads_geom SRID changed to 0 +#1596.7|0 +#1596|Point[BG] +#1695|MULTIPOLYGON EMPTY +#1697.1|0 +#1697.2|0 +#1697.3|1024 +#1734.1|1026 +#1755|01010000A0E6100000000000000040554000000000008041400000000000000000 +#1776|POLYGON((0 0,10 0,10 10,0 0))|POLYGON((0 0,10 0,10 10,0 0)) +#1791|4.7 +ERROR: ST_Segmentize: invalid max_distance 0 (must be >= 0) diff -Nru postgis-1.5.3/regress/typmod.sql postgis-2.0.1/regress/typmod.sql --- postgis-1.5.3/regress/typmod.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/typmod.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,403 @@ +SET client_min_messages TO warning; +\set VERBOSITY terse + +CREATE SCHEMA tm; + +-- Test construction of typed tables + +CREATE TABLE tm.circularstring (id serial, g geometry(circularstring) ); +CREATE TABLE tm.circularstring0 (id serial, g geometry(circularstring, 0) ); +CREATE TABLE tm.circularstring4326 (id serial, g geometry(circularstring, 4326) ); +CREATE TABLE tm.circularstringm (id serial, g geometry(circularstringm) ); +CREATE TABLE tm.circularstringm0 (id serial, g geometry(circularstringm, 0) ); +CREATE TABLE tm.circularstringm4326 (id serial, g geometry(circularstringm, 4326) ); +CREATE TABLE tm.circularstringz (id serial, g geometry(circularstringz) ); +CREATE TABLE tm.circularstringz0 (id serial, g geometry(circularstringz, 0) ); +CREATE TABLE tm.circularstringz4326 (id serial, g geometry(circularstringz, 4326) ); +CREATE TABLE tm.circularstringzm (id serial, g geometry(circularstringzm) ); +CREATE TABLE tm.circularstringzm0 (id serial, g geometry(circularstringzm, 0) ); +CREATE TABLE tm.circularstringzm4326 (id serial, g geometry(circularstringzm, 4326) ); + +CREATE TABLE tm.compoundcurve (id serial, g geometry(compoundcurve) ); +CREATE TABLE tm.compoundcurve0 (id serial, g geometry(compoundcurve, 0) ); +CREATE TABLE tm.compoundcurve4326 (id serial, g geometry(compoundcurve, 4326) ); +CREATE TABLE tm.compoundcurvem (id serial, g geometry(compoundcurvem) ); +CREATE TABLE tm.compoundcurvem0 (id serial, g geometry(compoundcurvem, 0) ); +CREATE TABLE tm.compoundcurvem4326 (id serial, g geometry(compoundcurvem, 4326) ); +CREATE TABLE tm.compoundcurvez (id serial, g geometry(compoundcurvez) ); +CREATE TABLE tm.compoundcurvez0 (id serial, g geometry(compoundcurvez, 0) ); +CREATE TABLE tm.compoundcurvez4326 (id serial, g geometry(compoundcurvez, 4326) ); +CREATE TABLE tm.compoundcurvezm (id serial, g geometry(compoundcurvezm) ); +CREATE TABLE tm.compoundcurvezm0 (id serial, g geometry(compoundcurvezm, 0) ); +CREATE TABLE tm.compoundcurvezm4326 (id serial, g geometry(compoundcurvezm, 4326) ); + +CREATE TABLE tm.curvepolygon (id serial, g geometry(curvepolygon) ); +CREATE TABLE tm.curvepolygon0 (id serial, g geometry(curvepolygon, 0) ); +CREATE TABLE tm.curvepolygon4326 (id serial, g geometry(curvepolygon, 4326) ); +CREATE TABLE tm.curvepolygonm (id serial, g geometry(curvepolygonm) ); +CREATE TABLE tm.curvepolygonm0 (id serial, g geometry(curvepolygonm, 0) ); +CREATE TABLE tm.curvepolygonm4326 (id serial, g geometry(curvepolygonm, 4326) ); +CREATE TABLE tm.curvepolygonz (id serial, g geometry(curvepolygonz) ); +CREATE TABLE tm.curvepolygonz0 (id serial, g geometry(curvepolygonz, 0) ); +CREATE TABLE tm.curvepolygonz4326 (id serial, g geometry(curvepolygonz, 4326) ); +CREATE TABLE tm.curvepolygonzm (id serial, g geometry(curvepolygonzm) ); +CREATE TABLE tm.curvepolygonzm0 (id serial, g geometry(curvepolygonzm, 0) ); +CREATE TABLE tm.curvepolygonzm4326 (id serial, g geometry(curvepolygonzm, 4326) ); + +CREATE TABLE tm.geometry (id serial, g geometry(geometry), gg geography(geometry) ); +CREATE TABLE tm.geometry0 (id serial, g geometry(geometry, 0), gg geography(geometry, 0) ); +CREATE TABLE tm.geometry4326 (id serial, g geometry(geometry, 4326), gg geography(geometry, 4326) ); +CREATE TABLE tm.geometrym (id serial, g geometry(geometrym), gg geography(geometrym) ); +CREATE TABLE tm.geometrym0 (id serial, g geometry(geometrym, 0), gg geography(geometrym, 0) ); +CREATE TABLE tm.geometrym4326 (id serial, g geometry(geometrym, 4326), gg geography(geometrym, 4326) ); +CREATE TABLE tm.geometryz (id serial, g geometry(geometryz), gg geography(geometryz) ); +CREATE TABLE tm.geometryz0 (id serial, g geometry(geometryz, 0), gg geography(geometryz, 0) ); +CREATE TABLE tm.geometryz4326 (id serial, g geometry(geometryz, 4326), gg geography(geometryz, 4326) ); +CREATE TABLE tm.geometryzm (id serial, g geometry(geometryzm), gg geography(geometryzm) ); +CREATE TABLE tm.geometryzm0 (id serial, g geometry(geometryzm, 0), gg geography(geometryzm, 0) ); +CREATE TABLE tm.geometryzm4326 (id serial, g geometry(geometryzm, 4326), gg geography(geometryzm, 4326) ); + +CREATE TABLE tm.geometrycollection (id serial, g geometry(geometrycollection), gg geography(geometrycollection) ); +CREATE TABLE tm.geometrycollection0 (id serial, g geometry(geometrycollection, 0), gg geography(geometrycollection, 0) ); +CREATE TABLE tm.geometrycollection4326 (id serial, g geometry(geometrycollection, 4326), gg geography(geometrycollection, 4326) ); +CREATE TABLE tm.geometrycollectionm (id serial, g geometry(geometrycollectionm), gg geography(geometrycollectionm) ); +CREATE TABLE tm.geometrycollectionm0 (id serial, g geometry(geometrycollectionm, 0), gg geography(geometrycollectionm, 0) ); +CREATE TABLE tm.geometrycollectionm4326 (id serial, g geometry(geometrycollectionm, 4326), gg geography(geometrycollectionm, 4326) ); +CREATE TABLE tm.geometrycollectionz (id serial, g geometry(geometrycollectionz), gg geography(geometrycollectionz) ); +CREATE TABLE tm.geometrycollectionz0 (id serial, g geometry(geometrycollectionz, 0), gg geography(geometrycollectionz, 0) ); +CREATE TABLE tm.geometrycollectionz4326 (id serial, g geometry(geometrycollectionz, 4326), gg geography(geometrycollectionz, 4326) ); +CREATE TABLE tm.geometrycollectionzm (id serial, g geometry(geometrycollectionzm), gg geography(geometrycollectionzm) ); +CREATE TABLE tm.geometrycollectionzm0 (id serial, g geometry(geometrycollectionzm, 0), gg geography(geometrycollectionzm, 0) ); +CREATE TABLE tm.geometrycollectionzm4326 (id serial, g geometry(geometrycollectionzm, 4326), gg geography(geometrycollectionzm, 4326) ); + +CREATE TABLE tm.linestring (id serial, g geometry(linestring), gg geography(linestring) ); +CREATE TABLE tm.linestring0 (id serial, g geometry(linestring, 0), gg geography(linestring, 0) ); +CREATE TABLE tm.linestring4326 (id serial, g geometry(linestring, 4326), gg geography(linestring, 4326) ); +CREATE TABLE tm.linestringm (id serial, g geometry(linestringm), gg geography(linestringm) ); +CREATE TABLE tm.linestringm0 (id serial, g geometry(linestringm, 0), gg geography(linestringm, 0) ); +CREATE TABLE tm.linestringm4326 (id serial, g geometry(linestringm, 4326), gg geography(linestringm, 4326) ); +CREATE TABLE tm.linestringz (id serial, g geometry(linestringz), gg geography(linestringz) ); +CREATE TABLE tm.linestringz0 (id serial, g geometry(linestringz, 0), gg geography(linestringz, 0) ); +CREATE TABLE tm.linestringz4326 (id serial, g geometry(linestringz, 4326), gg geography(linestringz, 4326) ); +CREATE TABLE tm.linestringzm (id serial, g geometry(linestringzm), gg geography(linestringzm) ); +CREATE TABLE tm.linestringzm0 (id serial, g geometry(linestringzm, 0), gg geography(linestringzm, 0) ); +CREATE TABLE tm.linestringzm4326 (id serial, g geometry(linestringzm, 4326), gg geography(linestringzm, 4326) ); + +CREATE TABLE tm.multicurve (id serial, g geometry(multicurve) ); +CREATE TABLE tm.multicurve0 (id serial, g geometry(multicurve, 0) ); +CREATE TABLE tm.multicurve4326 (id serial, g geometry(multicurve, 4326) ); +CREATE TABLE tm.multicurvem (id serial, g geometry(multicurvem) ); +CREATE TABLE tm.multicurvem0 (id serial, g geometry(multicurvem, 0) ); +CREATE TABLE tm.multicurvem4326 (id serial, g geometry(multicurvem, 4326) ); +CREATE TABLE tm.multicurvez (id serial, g geometry(multicurvez) ); +CREATE TABLE tm.multicurvez0 (id serial, g geometry(multicurvez, 0) ); +CREATE TABLE tm.multicurvez4326 (id serial, g geometry(multicurvez, 4326) ); +CREATE TABLE tm.multicurvezm (id serial, g geometry(multicurvezm) ); +CREATE TABLE tm.multicurvezm0 (id serial, g geometry(multicurvezm, 0) ); +CREATE TABLE tm.multicurvezm4326 (id serial, g geometry(multicurvezm, 4326) ); + +CREATE TABLE tm.multilinestring (id serial, g geometry(multilinestring), gg geography(multilinestring) ); +CREATE TABLE tm.multilinestring0 (id serial, g geometry(multilinestring, 0), gg geography(multilinestring, 0) ); +CREATE TABLE tm.multilinestring4326 (id serial, g geometry(multilinestring, 4326), gg geography(multilinestring, 4326) ); +CREATE TABLE tm.multilinestringm (id serial, g geometry(multilinestringm), gg geography(multilinestringm) ); +CREATE TABLE tm.multilinestringm0 (id serial, g geometry(multilinestringm, 0), gg geography(multilinestringm, 0) ); +CREATE TABLE tm.multilinestringm4326 (id serial, g geometry(multilinestringm, 4326), gg geography(multilinestringm, 4326) ); +CREATE TABLE tm.multilinestringz (id serial, g geometry(multilinestringz), gg geography(multilinestringz) ); +CREATE TABLE tm.multilinestringz0 (id serial, g geometry(multilinestringz, 0), gg geography(multilinestringz, 0) ); +CREATE TABLE tm.multilinestringz4326 (id serial, g geometry(multilinestringz, 4326), gg geography(multilinestringz, 4326) ); +CREATE TABLE tm.multilinestringzm (id serial, g geometry(multilinestringzm), gg geography(multilinestringzm) ); +CREATE TABLE tm.multilinestringzm0 (id serial, g geometry(multilinestringzm, 0), gg geography(multilinestringzm, 0) ); +CREATE TABLE tm.multilinestringzm4326 (id serial, g geometry(multilinestringzm, 4326), gg geography(multilinestringzm, 4326) ); + +CREATE TABLE tm.multipolygon (id serial, g geometry(multipolygon), gg geography(multipolygon) ); +CREATE TABLE tm.multipolygon0 (id serial, g geometry(multipolygon, 0), gg geography(multipolygon, 0) ); +CREATE TABLE tm.multipolygon4326 (id serial, g geometry(multipolygon, 4326), gg geography(multipolygon, 4326) ); +CREATE TABLE tm.multipolygonm (id serial, g geometry(multipolygonm), gg geography(multipolygonm) ); +CREATE TABLE tm.multipolygonm0 (id serial, g geometry(multipolygonm, 0), gg geography(multipolygonm, 0) ); +CREATE TABLE tm.multipolygonm4326 (id serial, g geometry(multipolygonm, 4326), gg geography(multipolygonm, 4326) ); +CREATE TABLE tm.multipolygonz (id serial, g geometry(multipolygonz), gg geography(multipolygonz) ); +CREATE TABLE tm.multipolygonz0 (id serial, g geometry(multipolygonz, 0), gg geography(multipolygonz, 0) ); +CREATE TABLE tm.multipolygonz4326 (id serial, g geometry(multipolygonz, 4326), gg geography(multipolygonz, 4326) ); +CREATE TABLE tm.multipolygonzm (id serial, g geometry(multipolygonzm), gg geography(multipolygonzm) ); +CREATE TABLE tm.multipolygonzm0 (id serial, g geometry(multipolygonzm, 0), gg geography(multipolygonzm, 0) ); +CREATE TABLE tm.multipolygonzm4326 (id serial, g geometry(multipolygonzm, 4326), gg geography(multipolygonzm, 4326) ); + +CREATE TABLE tm.multipoint (id serial, g geometry(multipoint), gg geography(multipoint) ); +CREATE TABLE tm.multipoint0 (id serial, g geometry(multipoint, 0), gg geography(multipoint, 0) ); +CREATE TABLE tm.multipoint4326 (id serial, g geometry(multipoint, 4326), gg geography(multipoint, 4326) ); +CREATE TABLE tm.multipointm (id serial, g geometry(multipointm), gg geography(multipointm) ); +CREATE TABLE tm.multipointm0 (id serial, g geometry(multipointm, 0), gg geography(multipointm, 0) ); +CREATE TABLE tm.multipointm4326 (id serial, g geometry(multipointm, 4326), gg geography(multipointm, 4326) ); +CREATE TABLE tm.multipointz (id serial, g geometry(multipointz), gg geography(multipointz) ); +CREATE TABLE tm.multipointz0 (id serial, g geometry(multipointz, 0), gg geography(multipointz, 0) ); +CREATE TABLE tm.multipointz4326 (id serial, g geometry(multipointz, 4326), gg geography(multipointz, 4326) ); +CREATE TABLE tm.multipointzm (id serial, g geometry(multipointzm), gg geography(multipointzm) ); +CREATE TABLE tm.multipointzm0 (id serial, g geometry(multipointzm, 0), gg geography(multipointzm, 0) ); +CREATE TABLE tm.multipointzm4326 (id serial, g geometry(multipointzm, 4326), gg geography(multipointzm, 4326) ); + +CREATE TABLE tm.multisurface (id serial, g geometry(multisurface) ); +CREATE TABLE tm.multisurface0 (id serial, g geometry(multisurface, 0) ); +CREATE TABLE tm.multisurface4326 (id serial, g geometry(multisurface, 4326) ); +CREATE TABLE tm.multisurfacem (id serial, g geometry(multisurfacem) ); +CREATE TABLE tm.multisurfacem0 (id serial, g geometry(multisurfacem, 0) ); +CREATE TABLE tm.multisurfacem4326 (id serial, g geometry(multisurfacem, 4326) ); +CREATE TABLE tm.multisurfacez (id serial, g geometry(multisurfacez) ); +CREATE TABLE tm.multisurfacez0 (id serial, g geometry(multisurfacez, 0) ); +CREATE TABLE tm.multisurfacez4326 (id serial, g geometry(multisurfacez, 4326) ); +CREATE TABLE tm.multisurfacezm (id serial, g geometry(multisurfacezm) ); +CREATE TABLE tm.multisurfacezm0 (id serial, g geometry(multisurfacezm, 0) ); +CREATE TABLE tm.multisurfacezm4326 (id serial, g geometry(multisurfacezm, 4326) ); + +CREATE TABLE tm.point (id serial, g geometry(point), gg geography(point) ); +CREATE TABLE tm.point0 (id serial, g geometry(point, 0), gg geography(point, 0) ); +CREATE TABLE tm.point4326 (id serial, g geometry(point, 4326), gg geography(point, 4326) ); +CREATE TABLE tm.pointm (id serial, g geometry(pointm), gg geography(pointm) ); +CREATE TABLE tm.pointm0 (id serial, g geometry(pointm, 0), gg geography(pointm, 0) ); +CREATE TABLE tm.pointm4326 (id serial, g geometry(pointm, 4326), gg geography(pointm, 4326) ); +CREATE TABLE tm.pointz (id serial, g geometry(pointz), gg geography(pointz) ); +CREATE TABLE tm.pointz0 (id serial, g geometry(pointz, 0), gg geography(pointz, 0) ); +CREATE TABLE tm.pointz4326 (id serial, g geometry(pointz, 4326), gg geography(pointz, 4326) ); +CREATE TABLE tm.pointzm (id serial, g geometry(pointzm), gg geography(pointzm) ); +CREATE TABLE tm.pointzm0 (id serial, g geometry(pointzm, 0), gg geography(pointzm, 0) ); +CREATE TABLE tm.pointzm4326 (id serial, g geometry(pointzm, 4326), gg geography(pointzm, 4326) ); + +CREATE TABLE tm.polygon (id serial, g geometry(polygon), gg geography(polygon) ); +CREATE TABLE tm.polygon0 (id serial, g geometry(polygon, 0), gg geography(polygon, 0) ); +CREATE TABLE tm.polygon4326 (id serial, g geometry(polygon, 4326), gg geography(polygon, 4326) ); +CREATE TABLE tm.polygonm (id serial, g geometry(polygonm), gg geography(polygonm) ); +CREATE TABLE tm.polygonm0 (id serial, g geometry(polygonm, 0), gg geography(polygonm, 0) ); +CREATE TABLE tm.polygonm4326 (id serial, g geometry(polygonm, 4326), gg geography(polygonm, 4326) ); +CREATE TABLE tm.polygonz (id serial, g geometry(polygonz), gg geography(polygonz) ); +CREATE TABLE tm.polygonz0 (id serial, g geometry(polygonz, 0), gg geography(polygonz, 0) ); +CREATE TABLE tm.polygonz4326 (id serial, g geometry(polygonz, 4326), gg geography(polygonz, 4326) ); +CREATE TABLE tm.polygonzm (id serial, g geometry(polygonzm), gg geography(polygonzm) ); +CREATE TABLE tm.polygonzm0 (id serial, g geometry(polygonzm, 0), gg geography(polygonzm, 0) ); +CREATE TABLE tm.polygonzm4326 (id serial, g geometry(polygonzm, 4326), gg geography(polygonzm, 4326) ); + +CREATE TABLE tm.polyhedralsurface (id serial, g geometry(polyhedralsurface) ); +CREATE TABLE tm.polyhedralsurface0 (id serial, g geometry(polyhedralsurface, 0) ); +CREATE TABLE tm.polyhedralsurface4326 (id serial, g geometry(polyhedralsurface, 4326) ); +CREATE TABLE tm.polyhedralsurfacem (id serial, g geometry(polyhedralsurfacem) ); +CREATE TABLE tm.polyhedralsurfacem0 (id serial, g geometry(polyhedralsurfacem, 0) ); +CREATE TABLE tm.polyhedralsurfacem4326 (id serial, g geometry(polyhedralsurfacem, 4326) ); +CREATE TABLE tm.polyhedralsurfacez (id serial, g geometry(polyhedralsurfacez) ); +CREATE TABLE tm.polyhedralsurfacez0 (id serial, g geometry(polyhedralsurfacez, 0) ); +CREATE TABLE tm.polyhedralsurfacez4326 (id serial, g geometry(polyhedralsurfacez, 4326) ); +CREATE TABLE tm.polyhedralsurfacezm (id serial, g geometry(polyhedralsurfacezm) ); +CREATE TABLE tm.polyhedralsurfacezm0 (id serial, g geometry(polyhedralsurfacezm, 0) ); +CREATE TABLE tm.polyhedralsurfacezm4326 (id serial, g geometry(polyhedralsurfacezm, 4326) ); + +CREATE TABLE tm.tin (id serial, g geometry(tin) ); +CREATE TABLE tm.tin0 (id serial, g geometry(tin, 0) ); +CREATE TABLE tm.tin4326 (id serial, g geometry(tin, 4326) ); +CREATE TABLE tm.tinm (id serial, g geometry(tinm) ); +CREATE TABLE tm.tinm0 (id serial, g geometry(tinm, 0) ); +CREATE TABLE tm.tinm4326 (id serial, g geometry(tinm, 4326) ); +CREATE TABLE tm.tinz (id serial, g geometry(tinz) ); +CREATE TABLE tm.tinz0 (id serial, g geometry(tinz, 0) ); +CREATE TABLE tm.tinz4326 (id serial, g geometry(tinz, 4326) ); +CREATE TABLE tm.tinzm (id serial, g geometry(tinzm) ); +CREATE TABLE tm.tinzm0 (id serial, g geometry(tinzm, 0) ); +CREATE TABLE tm.tinzm4326 (id serial, g geometry(tinzm, 4326) ); + +CREATE TABLE tm.triangle (id serial, g geometry(triangle) ); +CREATE TABLE tm.triangle0 (id serial, g geometry(triangle, 0) ); +CREATE TABLE tm.triangle4326 (id serial, g geometry(triangle, 4326) ); +CREATE TABLE tm.trianglem (id serial, g geometry(trianglem) ); +CREATE TABLE tm.trianglem0 (id serial, g geometry(trianglem, 0) ); +CREATE TABLE tm.trianglem4326 (id serial, g geometry(trianglem, 4326) ); +CREATE TABLE tm.trianglez (id serial, g geometry(trianglez) ); +CREATE TABLE tm.trianglez0 (id serial, g geometry(trianglez, 0) ); +CREATE TABLE tm.trianglez4326 (id serial, g geometry(trianglez, 4326) ); +CREATE TABLE tm.trianglezm (id serial, g geometry(trianglezm) ); +CREATE TABLE tm.trianglezm0 (id serial, g geometry(trianglezm, 0) ); +CREATE TABLE tm.trianglezm4326 (id serial, g geometry(trianglezm, 4326) ); + +SELECT 'g', + f_table_name, f_geometry_column, + coord_dimension, srid, type +from geometry_columns ORDER BY f_table_name; + +SELECT 'gg', + f_table_name, f_geography_column, + coord_dimension, srid, type +from geography_columns ORDER BY f_table_name; + +SELECT distinct 'catalog-schema', f_table_catalog,f_table_schema FROM geometry_columns +UNION +SELECT distinct 'catalog-schema', f_table_catalog,f_table_schema FROM geography_columns +; + +CREATE TABLE tm.types (id serial, g geometry); + +INSERT INTO tm.types(g) values ('POINT EMPTY'); +INSERT INTO tm.types(g) values ('LINESTRING EMPTY'); +INSERT INTO tm.types(g) values ('POLYGON EMPTY'); +INSERT INTO tm.types(g) values ('MULTIPOINT EMPTY'); +INSERT INTO tm.types(g) values ('MULTILINESTRING EMPTY'); +INSERT INTO tm.types(g) values ('MULTIPOLYGON EMPTY'); +INSERT INTO tm.types(g) values ('GEOMETRYCOLLECTION EMPTY'); +INSERT INTO tm.types(g) values ('CIRCULARSTRING EMPTY'); +INSERT INTO tm.types(g) values ('COMPOUNDCURVE EMPTY'); +INSERT INTO tm.types(g) values ('CURVEPOLYGON EMPTY'); +INSERT INTO tm.types(g) values ('MULTICURVE EMPTY'); +INSERT INTO tm.types(g) values ('MULTISURFACE EMPTY'); +INSERT INTO tm.types(g) values ('POLYHEDRALSURFACE EMPTY'); +INSERT INTO tm.types(g) values ('TRIANGLE EMPTY'); +INSERT INTO tm.types(g) values ('TIN EMPTY'); + +-- all zm flags +INSERT INTO tm.types(g) +SELECT st_force_3dz(g) FROM tm.types WHERE id < 15 ORDER BY id; +INSERT INTO tm.types(g) +SELECT st_force_3dm(g) FROM tm.types WHERE id < 15 ORDER BY id; +INSERT INTO tm.types(g) +SELECT st_force_4d(g) FROM tm.types WHERE id < 15 ORDER BY id; + +-- known srid +INSERT INTO tm.types(g) +SELECT st_setsrid(g,4326) FROM tm.types ORDER BY id; + +-- Now try to insert each type into each table +CREATE FUNCTION tm.insert_all(tmpfile_prefix text) +RETURNS TABLE(out_where varchar, out_srid int, out_type varchar, out_flags varchar, out_status text) +AS +$$ +DECLARE + sql text; + rec RECORD; + rec2 RECORD; + tmpfile text; + cnt INT; + hasgeog BOOL; +BEGIN + + tmpfile := tmpfile_prefix; + + FOR rec2 IN SELECT * from tm.types ORDER BY id + LOOP + tmpfile := tmpfile_prefix || rec2.id; + sql := 'COPY ( SELECT g FROM tm.types WHERE id = ' || rec2.id || ') TO ' + || quote_literal(tmpfile) + || ' WITH BINARY '; + EXECUTE sql; + END LOOP; + + FOR rec IN SELECT * from geometry_columns + WHERE f_table_name != 'types' ORDER BY 3 + LOOP + out_where := rec.f_table_name; + + hasgeog := rec.type NOT LIKE '%CURVE%' + AND rec.type NOT LIKE '%CIRCULAR%' + AND rec.type NOT LIKE '%SURFACE%' + AND rec.type NOT LIKE 'TRIANGLE%' + AND rec.type NOT LIKE 'TIN%'; + + FOR rec2 IN SELECT * from tm.types ORDER BY id + LOOP + out_srid := ST_Srid(rec2.g); + out_type := substr(ST_GeometryType(rec2.g), 4); + out_flags := ST_zmflag(rec2.g); + BEGIN + sql := 'INSERT INTO ' + || quote_ident(rec.f_table_schema) + || '.' || quote_ident(rec.f_table_name) + || '(g) VALUES (' + || quote_literal(rec2.g::text) + || ');'; + EXECUTE sql; + out_status := 'OK'; + EXCEPTION + WHEN OTHERS THEN + out_status := 'KO'; -- || SQLERRM; + END; + + -- binary insertion { + tmpfile := tmpfile_prefix || rec2.id; + sql := 'COPY ' + || quote_ident(rec.f_table_schema) + || '.' || quote_ident(rec.f_table_name) + || '(g) FROM ' + || quote_literal(tmpfile) || ' WITH BINARY '; + BEGIN + EXECUTE sql; + out_status := out_status || '-BOK'; + EXCEPTION + WHEN OTHERS THEN + out_status := out_status || '-BKO'; + END; + -- } + + + IF NOT hasgeog THEN + RETURN NEXT; + CONTINUE; + END IF; + + BEGIN + sql := 'INSERT INTO ' + || quote_ident(rec.f_table_schema) + || '.' || quote_ident(rec.f_table_name) + || '(gg) VALUES (' + || quote_literal(rec2.g::text) + || ');'; + EXECUTE sql; + out_status := out_status || '-GOK'; + EXCEPTION + WHEN OTHERS THEN + out_status := out_status || '-GKO:'; + END; + + -- binary insertion (geography) { + sql := 'COPY ' + || quote_ident(rec.f_table_schema) + || '.' || quote_ident(rec.f_table_name) + || '(gg) FROM ' + || quote_literal(tmpfile) || ' WITH BINARY '; + BEGIN + EXECUTE sql; + out_status := out_status || '-BGOK'; + EXCEPTION + WHEN OTHERS THEN + out_status := out_status || '-BGKO'; -- || SQLERRM; + END; + -- } + + RETURN NEXT; + END LOOP; + + -- Count number of geometries in the table + sql := 'SELECT count(g) FROM ' + || quote_ident(rec.f_table_schema) + || '.' || quote_ident(rec.f_table_name); + EXECUTE sql INTO STRICT cnt; + + out_srid := NULL; + out_type := 'COUNT'; + out_flags := cnt; + out_status := NULL; + RETURN NEXT; + + IF hasgeog THEN + -- Count number of geographies in the table + sql := 'SELECT count(gg) FROM ' + || quote_ident(rec.f_table_schema) + || '.' || quote_ident(rec.f_table_name); + EXECUTE sql INTO STRICT cnt; + + out_srid := NULL; + out_type := 'GCOUNT'; + out_flags := cnt; + out_status := NULL; + RETURN NEXT; + END IF; + + END LOOP; +END; +$$ LANGUAGE 'plpgsql'; + +SELECT * FROM tm.insert_all(:tmpfile); + +DROP SCHEMA tm CASCADE; + diff -Nru postgis-1.5.3/regress/typmod_expected postgis-2.0.1/regress/typmod_expected --- postgis-1.5.3/regress/typmod_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/typmod_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,22465 @@ +g|circularstring|g|2|0|CIRCULARSTRING +g|circularstring0|g|2|0|CIRCULARSTRING +g|circularstring4326|g|2|4326|CIRCULARSTRING +g|circularstringm|g|3|0|CIRCULARSTRINGM +g|circularstringm0|g|3|0|CIRCULARSTRINGM +g|circularstringm4326|g|3|4326|CIRCULARSTRINGM +g|circularstringz|g|3|0|CIRCULARSTRING +g|circularstringz0|g|3|0|CIRCULARSTRING +g|circularstringz4326|g|3|4326|CIRCULARSTRING +g|circularstringzm|g|4|0|CIRCULARSTRING +g|circularstringzm0|g|4|0|CIRCULARSTRING +g|circularstringzm4326|g|4|4326|CIRCULARSTRING +g|compoundcurve|g|2|0|COMPOUNDCURVE +g|compoundcurve0|g|2|0|COMPOUNDCURVE +g|compoundcurve4326|g|2|4326|COMPOUNDCURVE +g|compoundcurvem|g|3|0|COMPOUNDCURVEM +g|compoundcurvem0|g|3|0|COMPOUNDCURVEM +g|compoundcurvem4326|g|3|4326|COMPOUNDCURVEM +g|compoundcurvez|g|3|0|COMPOUNDCURVE +g|compoundcurvez0|g|3|0|COMPOUNDCURVE +g|compoundcurvez4326|g|3|4326|COMPOUNDCURVE +g|compoundcurvezm|g|4|0|COMPOUNDCURVE +g|compoundcurvezm0|g|4|0|COMPOUNDCURVE +g|compoundcurvezm4326|g|4|4326|COMPOUNDCURVE +g|curvepolygon|g|2|0|CURVEPOLYGON +g|curvepolygon0|g|2|0|CURVEPOLYGON +g|curvepolygon4326|g|2|4326|CURVEPOLYGON +g|curvepolygonm|g|3|0|CURVEPOLYGONM +g|curvepolygonm0|g|3|0|CURVEPOLYGONM +g|curvepolygonm4326|g|3|4326|CURVEPOLYGONM +g|curvepolygonz|g|3|0|CURVEPOLYGON +g|curvepolygonz0|g|3|0|CURVEPOLYGON +g|curvepolygonz4326|g|3|4326|CURVEPOLYGON +g|curvepolygonzm|g|4|0|CURVEPOLYGON +g|curvepolygonzm0|g|4|0|CURVEPOLYGON +g|curvepolygonzm4326|g|4|4326|CURVEPOLYGON +g|geometry|g|2|0|GEOMETRY +g|geometry0|g|2|0|GEOMETRY +g|geometry4326|g|2|4326|GEOMETRY +g|geometrycollection|g|2|0|GEOMETRYCOLLECTION +g|geometrycollection0|g|2|0|GEOMETRYCOLLECTION +g|geometrycollection4326|g|2|4326|GEOMETRYCOLLECTION +g|geometrycollectionm|g|3|0|GEOMETRYCOLLECTIONM +g|geometrycollectionm0|g|3|0|GEOMETRYCOLLECTIONM +g|geometrycollectionm4326|g|3|4326|GEOMETRYCOLLECTIONM +g|geometrycollectionz|g|3|0|GEOMETRYCOLLECTION +g|geometrycollectionz0|g|3|0|GEOMETRYCOLLECTION +g|geometrycollectionz4326|g|3|4326|GEOMETRYCOLLECTION +g|geometrycollectionzm|g|4|0|GEOMETRYCOLLECTION +g|geometrycollectionzm0|g|4|0|GEOMETRYCOLLECTION +g|geometrycollectionzm4326|g|4|4326|GEOMETRYCOLLECTION +g|geometrym|g|3|0|GEOMETRYM +g|geometrym0|g|3|0|GEOMETRYM +g|geometrym4326|g|3|4326|GEOMETRYM +g|geometryz|g|3|0|GEOMETRY +g|geometryz0|g|3|0|GEOMETRY +g|geometryz4326|g|3|4326|GEOMETRY +g|geometryzm|g|4|0|GEOMETRY +g|geometryzm0|g|4|0|GEOMETRY +g|geometryzm4326|g|4|4326|GEOMETRY +g|linestring|g|2|0|LINESTRING +g|linestring0|g|2|0|LINESTRING +g|linestring4326|g|2|4326|LINESTRING +g|linestringm|g|3|0|LINESTRINGM +g|linestringm0|g|3|0|LINESTRINGM +g|linestringm4326|g|3|4326|LINESTRINGM +g|linestringz|g|3|0|LINESTRING +g|linestringz0|g|3|0|LINESTRING +g|linestringz4326|g|3|4326|LINESTRING +g|linestringzm|g|4|0|LINESTRING +g|linestringzm0|g|4|0|LINESTRING +g|linestringzm4326|g|4|4326|LINESTRING +g|multicurve|g|2|0|MULTICURVE +g|multicurve0|g|2|0|MULTICURVE +g|multicurve4326|g|2|4326|MULTICURVE +g|multicurvem|g|3|0|MULTICURVEM +g|multicurvem0|g|3|0|MULTICURVEM +g|multicurvem4326|g|3|4326|MULTICURVEM +g|multicurvez|g|3|0|MULTICURVE +g|multicurvez0|g|3|0|MULTICURVE +g|multicurvez4326|g|3|4326|MULTICURVE +g|multicurvezm|g|4|0|MULTICURVE +g|multicurvezm0|g|4|0|MULTICURVE +g|multicurvezm4326|g|4|4326|MULTICURVE +g|multilinestring|g|2|0|MULTILINESTRING +g|multilinestring0|g|2|0|MULTILINESTRING +g|multilinestring4326|g|2|4326|MULTILINESTRING +g|multilinestringm|g|3|0|MULTILINESTRINGM +g|multilinestringm0|g|3|0|MULTILINESTRINGM +g|multilinestringm4326|g|3|4326|MULTILINESTRINGM +g|multilinestringz|g|3|0|MULTILINESTRING +g|multilinestringz0|g|3|0|MULTILINESTRING +g|multilinestringz4326|g|3|4326|MULTILINESTRING +g|multilinestringzm|g|4|0|MULTILINESTRING +g|multilinestringzm0|g|4|0|MULTILINESTRING +g|multilinestringzm4326|g|4|4326|MULTILINESTRING +g|multipoint|g|2|0|MULTIPOINT +g|multipoint0|g|2|0|MULTIPOINT +g|multipoint4326|g|2|4326|MULTIPOINT +g|multipointm|g|3|0|MULTIPOINTM +g|multipointm0|g|3|0|MULTIPOINTM +g|multipointm4326|g|3|4326|MULTIPOINTM +g|multipointz|g|3|0|MULTIPOINT +g|multipointz0|g|3|0|MULTIPOINT +g|multipointz4326|g|3|4326|MULTIPOINT +g|multipointzm|g|4|0|MULTIPOINT +g|multipointzm0|g|4|0|MULTIPOINT +g|multipointzm4326|g|4|4326|MULTIPOINT +g|multipolygon|g|2|0|MULTIPOLYGON +g|multipolygon0|g|2|0|MULTIPOLYGON +g|multipolygon4326|g|2|4326|MULTIPOLYGON +g|multipolygonm|g|3|0|MULTIPOLYGONM +g|multipolygonm0|g|3|0|MULTIPOLYGONM +g|multipolygonm4326|g|3|4326|MULTIPOLYGONM +g|multipolygonz|g|3|0|MULTIPOLYGON +g|multipolygonz0|g|3|0|MULTIPOLYGON +g|multipolygonz4326|g|3|4326|MULTIPOLYGON +g|multipolygonzm|g|4|0|MULTIPOLYGON +g|multipolygonzm0|g|4|0|MULTIPOLYGON +g|multipolygonzm4326|g|4|4326|MULTIPOLYGON +g|multisurface|g|2|0|MULTISURFACE +g|multisurface0|g|2|0|MULTISURFACE +g|multisurface4326|g|2|4326|MULTISURFACE +g|multisurfacem|g|3|0|MULTISURFACEM +g|multisurfacem0|g|3|0|MULTISURFACEM +g|multisurfacem4326|g|3|4326|MULTISURFACEM +g|multisurfacez|g|3|0|MULTISURFACE +g|multisurfacez0|g|3|0|MULTISURFACE +g|multisurfacez4326|g|3|4326|MULTISURFACE +g|multisurfacezm|g|4|0|MULTISURFACE +g|multisurfacezm0|g|4|0|MULTISURFACE +g|multisurfacezm4326|g|4|4326|MULTISURFACE +g|point|g|2|0|POINT +g|point0|g|2|0|POINT +g|point4326|g|2|4326|POINT +g|pointm|g|3|0|POINTM +g|pointm0|g|3|0|POINTM +g|pointm4326|g|3|4326|POINTM +g|pointz|g|3|0|POINT +g|pointz0|g|3|0|POINT +g|pointz4326|g|3|4326|POINT +g|pointzm|g|4|0|POINT +g|pointzm0|g|4|0|POINT +g|pointzm4326|g|4|4326|POINT +g|polygon|g|2|0|POLYGON +g|polygon0|g|2|0|POLYGON +g|polygon4326|g|2|4326|POLYGON +g|polygonm|g|3|0|POLYGONM +g|polygonm0|g|3|0|POLYGONM +g|polygonm4326|g|3|4326|POLYGONM +g|polygonz|g|3|0|POLYGON +g|polygonz0|g|3|0|POLYGON +g|polygonz4326|g|3|4326|POLYGON +g|polygonzm|g|4|0|POLYGON +g|polygonzm0|g|4|0|POLYGON +g|polygonzm4326|g|4|4326|POLYGON +g|polyhedralsurface|g|2|0|POLYHEDRALSURFACE +g|polyhedralsurface0|g|2|0|POLYHEDRALSURFACE +g|polyhedralsurface4326|g|2|4326|POLYHEDRALSURFACE +g|polyhedralsurfacem|g|3|0|POLYHEDRALSURFACEM +g|polyhedralsurfacem0|g|3|0|POLYHEDRALSURFACEM +g|polyhedralsurfacem4326|g|3|4326|POLYHEDRALSURFACEM +g|polyhedralsurfacez|g|3|0|POLYHEDRALSURFACE +g|polyhedralsurfacez0|g|3|0|POLYHEDRALSURFACE +g|polyhedralsurfacez4326|g|3|4326|POLYHEDRALSURFACE +g|polyhedralsurfacezm|g|4|0|POLYHEDRALSURFACE +g|polyhedralsurfacezm0|g|4|0|POLYHEDRALSURFACE +g|polyhedralsurfacezm4326|g|4|4326|POLYHEDRALSURFACE +g|tin|g|2|0|TIN +g|tin0|g|2|0|TIN +g|tin4326|g|2|4326|TIN +g|tinm|g|3|0|TINM +g|tinm0|g|3|0|TINM +g|tinm4326|g|3|4326|TINM +g|tinz|g|3|0|TIN +g|tinz0|g|3|0|TIN +g|tinz4326|g|3|4326|TIN +g|tinzm|g|4|0|TIN +g|tinzm0|g|4|0|TIN +g|tinzm4326|g|4|4326|TIN +g|triangle|g|2|0|TRIANGLE +g|triangle0|g|2|0|TRIANGLE +g|triangle4326|g|2|4326|TRIANGLE +g|trianglem|g|3|0|TRIANGLEM +g|trianglem0|g|3|0|TRIANGLEM +g|trianglem4326|g|3|4326|TRIANGLEM +g|trianglez|g|3|0|TRIANGLE +g|trianglez0|g|3|0|TRIANGLE +g|trianglez4326|g|3|4326|TRIANGLE +g|trianglezm|g|4|0|TRIANGLE +g|trianglezm0|g|4|0|TRIANGLE +g|trianglezm4326|g|4|4326|TRIANGLE +gg|geometry|gg|2|4326|Geometry +gg|geometry0|gg|2|4326|Geometry +gg|geometry4326|gg|2|4326|Geometry +gg|geometrycollection|gg|2|4326|GeometryCollection +gg|geometrycollection0|gg|2|4326|GeometryCollection +gg|geometrycollection4326|gg|2|4326|GeometryCollection +gg|geometrycollectionm|gg|3|4326|GeometryCollectionM +gg|geometrycollectionm0|gg|3|4326|GeometryCollectionM +gg|geometrycollectionm4326|gg|3|4326|GeometryCollectionM +gg|geometrycollectionz|gg|3|4326|GeometryCollectionZ +gg|geometrycollectionz0|gg|3|4326|GeometryCollectionZ +gg|geometrycollectionz4326|gg|3|4326|GeometryCollectionZ +gg|geometrycollectionzm|gg|4|4326|GeometryCollectionZM +gg|geometrycollectionzm0|gg|4|4326|GeometryCollectionZM +gg|geometrycollectionzm4326|gg|4|4326|GeometryCollectionZM +gg|geometrym|gg|3|4326|GeometryM +gg|geometrym0|gg|3|4326|GeometryM +gg|geometrym4326|gg|3|4326|GeometryM +gg|geometryz|gg|3|4326|GeometryZ +gg|geometryz0|gg|3|4326|GeometryZ +gg|geometryz4326|gg|3|4326|GeometryZ +gg|geometryzm|gg|4|4326|GeometryZM +gg|geometryzm0|gg|4|4326|GeometryZM +gg|geometryzm4326|gg|4|4326|GeometryZM +gg|linestring|gg|2|4326|LineString +gg|linestring0|gg|2|4326|LineString +gg|linestring4326|gg|2|4326|LineString +gg|linestringm|gg|3|4326|LineStringM +gg|linestringm0|gg|3|4326|LineStringM +gg|linestringm4326|gg|3|4326|LineStringM +gg|linestringz|gg|3|4326|LineStringZ +gg|linestringz0|gg|3|4326|LineStringZ +gg|linestringz4326|gg|3|4326|LineStringZ +gg|linestringzm|gg|4|4326|LineStringZM +gg|linestringzm0|gg|4|4326|LineStringZM +gg|linestringzm4326|gg|4|4326|LineStringZM +gg|multilinestring|gg|2|4326|MultiLineString +gg|multilinestring0|gg|2|4326|MultiLineString +gg|multilinestring4326|gg|2|4326|MultiLineString +gg|multilinestringm|gg|3|4326|MultiLineStringM +gg|multilinestringm0|gg|3|4326|MultiLineStringM +gg|multilinestringm4326|gg|3|4326|MultiLineStringM +gg|multilinestringz|gg|3|4326|MultiLineStringZ +gg|multilinestringz0|gg|3|4326|MultiLineStringZ +gg|multilinestringz4326|gg|3|4326|MultiLineStringZ +gg|multilinestringzm|gg|4|4326|MultiLineStringZM +gg|multilinestringzm0|gg|4|4326|MultiLineStringZM +gg|multilinestringzm4326|gg|4|4326|MultiLineStringZM +gg|multipoint|gg|2|4326|MultiPoint +gg|multipoint0|gg|2|4326|MultiPoint +gg|multipoint4326|gg|2|4326|MultiPoint +gg|multipointm|gg|3|4326|MultiPointM +gg|multipointm0|gg|3|4326|MultiPointM +gg|multipointm4326|gg|3|4326|MultiPointM +gg|multipointz|gg|3|4326|MultiPointZ +gg|multipointz0|gg|3|4326|MultiPointZ +gg|multipointz4326|gg|3|4326|MultiPointZ +gg|multipointzm|gg|4|4326|MultiPointZM +gg|multipointzm0|gg|4|4326|MultiPointZM +gg|multipointzm4326|gg|4|4326|MultiPointZM +gg|multipolygon|gg|2|4326|MultiPolygon +gg|multipolygon0|gg|2|4326|MultiPolygon +gg|multipolygon4326|gg|2|4326|MultiPolygon +gg|multipolygonm|gg|3|4326|MultiPolygonM +gg|multipolygonm0|gg|3|4326|MultiPolygonM +gg|multipolygonm4326|gg|3|4326|MultiPolygonM +gg|multipolygonz|gg|3|4326|MultiPolygonZ +gg|multipolygonz0|gg|3|4326|MultiPolygonZ +gg|multipolygonz4326|gg|3|4326|MultiPolygonZ +gg|multipolygonzm|gg|4|4326|MultiPolygonZM +gg|multipolygonzm0|gg|4|4326|MultiPolygonZM +gg|multipolygonzm4326|gg|4|4326|MultiPolygonZM +gg|point|gg|2|4326|Point +gg|point0|gg|2|4326|Point +gg|point4326|gg|2|4326|Point +gg|pointm|gg|3|4326|PointM +gg|pointm0|gg|3|4326|PointM +gg|pointm4326|gg|3|4326|PointM +gg|pointz|gg|3|4326|PointZ +gg|pointz0|gg|3|4326|PointZ +gg|pointz4326|gg|3|4326|PointZ +gg|pointzm|gg|4|4326|PointZM +gg|pointzm0|gg|4|4326|PointZM +gg|pointzm4326|gg|4|4326|PointZM +gg|polygon|gg|2|4326|Polygon +gg|polygon0|gg|2|4326|Polygon +gg|polygon4326|gg|2|4326|Polygon +gg|polygonm|gg|3|4326|PolygonM +gg|polygonm0|gg|3|4326|PolygonM +gg|polygonm4326|gg|3|4326|PolygonM +gg|polygonz|gg|3|4326|PolygonZ +gg|polygonz0|gg|3|4326|PolygonZ +gg|polygonz4326|gg|3|4326|PolygonZ +gg|polygonzm|gg|4|4326|PolygonZM +gg|polygonzm0|gg|4|4326|PolygonZM +gg|polygonzm4326|gg|4|4326|PolygonZM +catalog-schema|postgis_reg|tm +circularstring|0|Point|0|KO-BKO +circularstring|0|LineString|0|KO-BKO +circularstring|0|Polygon|0|KO-BKO +circularstring|0|MultiPoint|0|KO-BKO +circularstring|0|MultiLineString|0|KO-BKO +circularstring|0|MultiPolygon|0|KO-BKO +circularstring|0|GeometryCollection|0|KO-BKO +circularstring|0|CircularString|0|OK-BOK +circularstring|0|CompoundCurve|0|KO-BKO +circularstring|0|CurvePolygon|0|KO-BKO +circularstring|0|MultiCurve|0|KO-BKO +circularstring|0|MultiSurface|0|KO-BKO +circularstring|0|PolyhedralSurface|0|KO-BKO +circularstring|0|Triangle|0|KO-BKO +circularstring|0|Tin|0|KO-BKO +circularstring|0|Point|2|KO-BKO +circularstring|0|LineString|2|KO-BKO +circularstring|0|Polygon|2|KO-BKO +circularstring|0|MultiPoint|2|KO-BKO +circularstring|0|MultiLineString|2|KO-BKO +circularstring|0|MultiPolygon|2|KO-BKO +circularstring|0|GeometryCollection|2|KO-BKO +circularstring|0|CircularString|2|KO-BKO +circularstring|0|CompoundCurve|2|KO-BKO +circularstring|0|CurvePolygon|2|KO-BKO +circularstring|0|MultiCurve|2|KO-BKO +circularstring|0|MultiSurface|2|KO-BKO +circularstring|0|PolyhedralSurface|2|KO-BKO +circularstring|0|Triangle|2|KO-BKO +circularstring|0|Point|1|KO-BKO +circularstring|0|LineString|1|KO-BKO +circularstring|0|Polygon|1|KO-BKO +circularstring|0|MultiPoint|1|KO-BKO +circularstring|0|MultiLineString|1|KO-BKO +circularstring|0|MultiPolygon|1|KO-BKO +circularstring|0|GeometryCollection|1|KO-BKO +circularstring|0|CircularString|1|KO-BKO +circularstring|0|CompoundCurve|1|KO-BKO +circularstring|0|CurvePolygon|1|KO-BKO +circularstring|0|MultiCurve|1|KO-BKO +circularstring|0|MultiSurface|1|KO-BKO +circularstring|0|PolyhedralSurface|1|KO-BKO +circularstring|0|Triangle|1|KO-BKO +circularstring|0|Point|3|KO-BKO +circularstring|0|LineString|3|KO-BKO +circularstring|0|Polygon|3|KO-BKO +circularstring|0|MultiPoint|3|KO-BKO +circularstring|0|MultiLineString|3|KO-BKO +circularstring|0|MultiPolygon|3|KO-BKO +circularstring|0|GeometryCollection|3|KO-BKO +circularstring|0|CircularString|3|KO-BKO +circularstring|0|CompoundCurve|3|KO-BKO +circularstring|0|CurvePolygon|3|KO-BKO +circularstring|0|MultiCurve|3|KO-BKO +circularstring|0|MultiSurface|3|KO-BKO +circularstring|0|PolyhedralSurface|3|KO-BKO +circularstring|0|Triangle|3|KO-BKO +circularstring|4326|Point|0|KO-BKO +circularstring|4326|LineString|0|KO-BKO +circularstring|4326|Polygon|0|KO-BKO +circularstring|4326|MultiPoint|0|KO-BKO +circularstring|4326|MultiLineString|0|KO-BKO +circularstring|4326|MultiPolygon|0|KO-BKO +circularstring|4326|GeometryCollection|0|KO-BKO +circularstring|4326|CircularString|0|OK-BOK +circularstring|4326|CompoundCurve|0|KO-BKO +circularstring|4326|CurvePolygon|0|KO-BKO +circularstring|4326|MultiCurve|0|KO-BKO +circularstring|4326|MultiSurface|0|KO-BKO +circularstring|4326|PolyhedralSurface|0|KO-BKO +circularstring|4326|Triangle|0|KO-BKO +circularstring|4326|Tin|0|KO-BKO +circularstring|4326|Point|2|KO-BKO +circularstring|4326|LineString|2|KO-BKO +circularstring|4326|Polygon|2|KO-BKO +circularstring|4326|MultiPoint|2|KO-BKO +circularstring|4326|MultiLineString|2|KO-BKO +circularstring|4326|MultiPolygon|2|KO-BKO +circularstring|4326|GeometryCollection|2|KO-BKO +circularstring|4326|CircularString|2|KO-BKO +circularstring|4326|CompoundCurve|2|KO-BKO +circularstring|4326|CurvePolygon|2|KO-BKO +circularstring|4326|MultiCurve|2|KO-BKO +circularstring|4326|MultiSurface|2|KO-BKO +circularstring|4326|PolyhedralSurface|2|KO-BKO +circularstring|4326|Triangle|2|KO-BKO +circularstring|4326|Point|1|KO-BKO +circularstring|4326|LineString|1|KO-BKO +circularstring|4326|Polygon|1|KO-BKO +circularstring|4326|MultiPoint|1|KO-BKO +circularstring|4326|MultiLineString|1|KO-BKO +circularstring|4326|MultiPolygon|1|KO-BKO +circularstring|4326|GeometryCollection|1|KO-BKO +circularstring|4326|CircularString|1|KO-BKO +circularstring|4326|CompoundCurve|1|KO-BKO +circularstring|4326|CurvePolygon|1|KO-BKO +circularstring|4326|MultiCurve|1|KO-BKO +circularstring|4326|MultiSurface|1|KO-BKO +circularstring|4326|PolyhedralSurface|1|KO-BKO +circularstring|4326|Triangle|1|KO-BKO +circularstring|4326|Point|3|KO-BKO +circularstring|4326|LineString|3|KO-BKO +circularstring|4326|Polygon|3|KO-BKO +circularstring|4326|MultiPoint|3|KO-BKO +circularstring|4326|MultiLineString|3|KO-BKO +circularstring|4326|MultiPolygon|3|KO-BKO +circularstring|4326|GeometryCollection|3|KO-BKO +circularstring|4326|CircularString|3|KO-BKO +circularstring|4326|CompoundCurve|3|KO-BKO +circularstring|4326|CurvePolygon|3|KO-BKO +circularstring|4326|MultiCurve|3|KO-BKO +circularstring|4326|MultiSurface|3|KO-BKO +circularstring|4326|PolyhedralSurface|3|KO-BKO +circularstring|4326|Triangle|3|KO-BKO +circularstring||COUNT|4| +circularstring0|0|Point|0|KO-BKO +circularstring0|0|LineString|0|KO-BKO +circularstring0|0|Polygon|0|KO-BKO +circularstring0|0|MultiPoint|0|KO-BKO +circularstring0|0|MultiLineString|0|KO-BKO +circularstring0|0|MultiPolygon|0|KO-BKO +circularstring0|0|GeometryCollection|0|KO-BKO +circularstring0|0|CircularString|0|OK-BOK +circularstring0|0|CompoundCurve|0|KO-BKO +circularstring0|0|CurvePolygon|0|KO-BKO +circularstring0|0|MultiCurve|0|KO-BKO +circularstring0|0|MultiSurface|0|KO-BKO +circularstring0|0|PolyhedralSurface|0|KO-BKO +circularstring0|0|Triangle|0|KO-BKO +circularstring0|0|Tin|0|KO-BKO +circularstring0|0|Point|2|KO-BKO +circularstring0|0|LineString|2|KO-BKO +circularstring0|0|Polygon|2|KO-BKO +circularstring0|0|MultiPoint|2|KO-BKO +circularstring0|0|MultiLineString|2|KO-BKO +circularstring0|0|MultiPolygon|2|KO-BKO +circularstring0|0|GeometryCollection|2|KO-BKO +circularstring0|0|CircularString|2|KO-BKO +circularstring0|0|CompoundCurve|2|KO-BKO +circularstring0|0|CurvePolygon|2|KO-BKO +circularstring0|0|MultiCurve|2|KO-BKO +circularstring0|0|MultiSurface|2|KO-BKO +circularstring0|0|PolyhedralSurface|2|KO-BKO +circularstring0|0|Triangle|2|KO-BKO +circularstring0|0|Point|1|KO-BKO +circularstring0|0|LineString|1|KO-BKO +circularstring0|0|Polygon|1|KO-BKO +circularstring0|0|MultiPoint|1|KO-BKO +circularstring0|0|MultiLineString|1|KO-BKO +circularstring0|0|MultiPolygon|1|KO-BKO +circularstring0|0|GeometryCollection|1|KO-BKO +circularstring0|0|CircularString|1|KO-BKO +circularstring0|0|CompoundCurve|1|KO-BKO +circularstring0|0|CurvePolygon|1|KO-BKO +circularstring0|0|MultiCurve|1|KO-BKO +circularstring0|0|MultiSurface|1|KO-BKO +circularstring0|0|PolyhedralSurface|1|KO-BKO +circularstring0|0|Triangle|1|KO-BKO +circularstring0|0|Point|3|KO-BKO +circularstring0|0|LineString|3|KO-BKO +circularstring0|0|Polygon|3|KO-BKO +circularstring0|0|MultiPoint|3|KO-BKO +circularstring0|0|MultiLineString|3|KO-BKO +circularstring0|0|MultiPolygon|3|KO-BKO +circularstring0|0|GeometryCollection|3|KO-BKO +circularstring0|0|CircularString|3|KO-BKO +circularstring0|0|CompoundCurve|3|KO-BKO +circularstring0|0|CurvePolygon|3|KO-BKO +circularstring0|0|MultiCurve|3|KO-BKO +circularstring0|0|MultiSurface|3|KO-BKO +circularstring0|0|PolyhedralSurface|3|KO-BKO +circularstring0|0|Triangle|3|KO-BKO +circularstring0|4326|Point|0|KO-BKO +circularstring0|4326|LineString|0|KO-BKO +circularstring0|4326|Polygon|0|KO-BKO +circularstring0|4326|MultiPoint|0|KO-BKO +circularstring0|4326|MultiLineString|0|KO-BKO +circularstring0|4326|MultiPolygon|0|KO-BKO +circularstring0|4326|GeometryCollection|0|KO-BKO +circularstring0|4326|CircularString|0|OK-BOK +circularstring0|4326|CompoundCurve|0|KO-BKO +circularstring0|4326|CurvePolygon|0|KO-BKO +circularstring0|4326|MultiCurve|0|KO-BKO +circularstring0|4326|MultiSurface|0|KO-BKO +circularstring0|4326|PolyhedralSurface|0|KO-BKO +circularstring0|4326|Triangle|0|KO-BKO +circularstring0|4326|Tin|0|KO-BKO +circularstring0|4326|Point|2|KO-BKO +circularstring0|4326|LineString|2|KO-BKO +circularstring0|4326|Polygon|2|KO-BKO +circularstring0|4326|MultiPoint|2|KO-BKO +circularstring0|4326|MultiLineString|2|KO-BKO +circularstring0|4326|MultiPolygon|2|KO-BKO +circularstring0|4326|GeometryCollection|2|KO-BKO +circularstring0|4326|CircularString|2|KO-BKO +circularstring0|4326|CompoundCurve|2|KO-BKO +circularstring0|4326|CurvePolygon|2|KO-BKO +circularstring0|4326|MultiCurve|2|KO-BKO +circularstring0|4326|MultiSurface|2|KO-BKO +circularstring0|4326|PolyhedralSurface|2|KO-BKO +circularstring0|4326|Triangle|2|KO-BKO +circularstring0|4326|Point|1|KO-BKO +circularstring0|4326|LineString|1|KO-BKO +circularstring0|4326|Polygon|1|KO-BKO +circularstring0|4326|MultiPoint|1|KO-BKO +circularstring0|4326|MultiLineString|1|KO-BKO +circularstring0|4326|MultiPolygon|1|KO-BKO +circularstring0|4326|GeometryCollection|1|KO-BKO +circularstring0|4326|CircularString|1|KO-BKO +circularstring0|4326|CompoundCurve|1|KO-BKO +circularstring0|4326|CurvePolygon|1|KO-BKO +circularstring0|4326|MultiCurve|1|KO-BKO +circularstring0|4326|MultiSurface|1|KO-BKO +circularstring0|4326|PolyhedralSurface|1|KO-BKO +circularstring0|4326|Triangle|1|KO-BKO +circularstring0|4326|Point|3|KO-BKO +circularstring0|4326|LineString|3|KO-BKO +circularstring0|4326|Polygon|3|KO-BKO +circularstring0|4326|MultiPoint|3|KO-BKO +circularstring0|4326|MultiLineString|3|KO-BKO +circularstring0|4326|MultiPolygon|3|KO-BKO +circularstring0|4326|GeometryCollection|3|KO-BKO +circularstring0|4326|CircularString|3|KO-BKO +circularstring0|4326|CompoundCurve|3|KO-BKO +circularstring0|4326|CurvePolygon|3|KO-BKO +circularstring0|4326|MultiCurve|3|KO-BKO +circularstring0|4326|MultiSurface|3|KO-BKO +circularstring0|4326|PolyhedralSurface|3|KO-BKO +circularstring0|4326|Triangle|3|KO-BKO +circularstring0||COUNT|4| +circularstring4326|0|Point|0|KO-BKO +circularstring4326|0|LineString|0|KO-BKO +circularstring4326|0|Polygon|0|KO-BKO +circularstring4326|0|MultiPoint|0|KO-BKO +circularstring4326|0|MultiLineString|0|KO-BKO +circularstring4326|0|MultiPolygon|0|KO-BKO +circularstring4326|0|GeometryCollection|0|KO-BKO +circularstring4326|0|CircularString|0|KO-BKO +circularstring4326|0|CompoundCurve|0|KO-BKO +circularstring4326|0|CurvePolygon|0|KO-BKO +circularstring4326|0|MultiCurve|0|KO-BKO +circularstring4326|0|MultiSurface|0|KO-BKO +circularstring4326|0|PolyhedralSurface|0|KO-BKO +circularstring4326|0|Triangle|0|KO-BKO +circularstring4326|0|Tin|0|KO-BKO +circularstring4326|0|Point|2|KO-BKO +circularstring4326|0|LineString|2|KO-BKO +circularstring4326|0|Polygon|2|KO-BKO +circularstring4326|0|MultiPoint|2|KO-BKO +circularstring4326|0|MultiLineString|2|KO-BKO +circularstring4326|0|MultiPolygon|2|KO-BKO +circularstring4326|0|GeometryCollection|2|KO-BKO +circularstring4326|0|CircularString|2|KO-BKO +circularstring4326|0|CompoundCurve|2|KO-BKO +circularstring4326|0|CurvePolygon|2|KO-BKO +circularstring4326|0|MultiCurve|2|KO-BKO +circularstring4326|0|MultiSurface|2|KO-BKO +circularstring4326|0|PolyhedralSurface|2|KO-BKO +circularstring4326|0|Triangle|2|KO-BKO +circularstring4326|0|Point|1|KO-BKO +circularstring4326|0|LineString|1|KO-BKO +circularstring4326|0|Polygon|1|KO-BKO +circularstring4326|0|MultiPoint|1|KO-BKO +circularstring4326|0|MultiLineString|1|KO-BKO +circularstring4326|0|MultiPolygon|1|KO-BKO +circularstring4326|0|GeometryCollection|1|KO-BKO +circularstring4326|0|CircularString|1|KO-BKO +circularstring4326|0|CompoundCurve|1|KO-BKO +circularstring4326|0|CurvePolygon|1|KO-BKO +circularstring4326|0|MultiCurve|1|KO-BKO +circularstring4326|0|MultiSurface|1|KO-BKO +circularstring4326|0|PolyhedralSurface|1|KO-BKO +circularstring4326|0|Triangle|1|KO-BKO +circularstring4326|0|Point|3|KO-BKO +circularstring4326|0|LineString|3|KO-BKO +circularstring4326|0|Polygon|3|KO-BKO +circularstring4326|0|MultiPoint|3|KO-BKO +circularstring4326|0|MultiLineString|3|KO-BKO +circularstring4326|0|MultiPolygon|3|KO-BKO +circularstring4326|0|GeometryCollection|3|KO-BKO +circularstring4326|0|CircularString|3|KO-BKO +circularstring4326|0|CompoundCurve|3|KO-BKO +circularstring4326|0|CurvePolygon|3|KO-BKO +circularstring4326|0|MultiCurve|3|KO-BKO +circularstring4326|0|MultiSurface|3|KO-BKO +circularstring4326|0|PolyhedralSurface|3|KO-BKO +circularstring4326|0|Triangle|3|KO-BKO +circularstring4326|4326|Point|0|KO-BKO +circularstring4326|4326|LineString|0|KO-BKO +circularstring4326|4326|Polygon|0|KO-BKO +circularstring4326|4326|MultiPoint|0|KO-BKO +circularstring4326|4326|MultiLineString|0|KO-BKO +circularstring4326|4326|MultiPolygon|0|KO-BKO +circularstring4326|4326|GeometryCollection|0|KO-BKO +circularstring4326|4326|CircularString|0|OK-BOK +circularstring4326|4326|CompoundCurve|0|KO-BKO +circularstring4326|4326|CurvePolygon|0|KO-BKO +circularstring4326|4326|MultiCurve|0|KO-BKO +circularstring4326|4326|MultiSurface|0|KO-BKO +circularstring4326|4326|PolyhedralSurface|0|KO-BKO +circularstring4326|4326|Triangle|0|KO-BKO +circularstring4326|4326|Tin|0|KO-BKO +circularstring4326|4326|Point|2|KO-BKO +circularstring4326|4326|LineString|2|KO-BKO +circularstring4326|4326|Polygon|2|KO-BKO +circularstring4326|4326|MultiPoint|2|KO-BKO +circularstring4326|4326|MultiLineString|2|KO-BKO +circularstring4326|4326|MultiPolygon|2|KO-BKO +circularstring4326|4326|GeometryCollection|2|KO-BKO +circularstring4326|4326|CircularString|2|KO-BKO +circularstring4326|4326|CompoundCurve|2|KO-BKO +circularstring4326|4326|CurvePolygon|2|KO-BKO +circularstring4326|4326|MultiCurve|2|KO-BKO +circularstring4326|4326|MultiSurface|2|KO-BKO +circularstring4326|4326|PolyhedralSurface|2|KO-BKO +circularstring4326|4326|Triangle|2|KO-BKO +circularstring4326|4326|Point|1|KO-BKO +circularstring4326|4326|LineString|1|KO-BKO +circularstring4326|4326|Polygon|1|KO-BKO +circularstring4326|4326|MultiPoint|1|KO-BKO +circularstring4326|4326|MultiLineString|1|KO-BKO +circularstring4326|4326|MultiPolygon|1|KO-BKO +circularstring4326|4326|GeometryCollection|1|KO-BKO +circularstring4326|4326|CircularString|1|KO-BKO +circularstring4326|4326|CompoundCurve|1|KO-BKO +circularstring4326|4326|CurvePolygon|1|KO-BKO +circularstring4326|4326|MultiCurve|1|KO-BKO +circularstring4326|4326|MultiSurface|1|KO-BKO +circularstring4326|4326|PolyhedralSurface|1|KO-BKO +circularstring4326|4326|Triangle|1|KO-BKO +circularstring4326|4326|Point|3|KO-BKO +circularstring4326|4326|LineString|3|KO-BKO +circularstring4326|4326|Polygon|3|KO-BKO +circularstring4326|4326|MultiPoint|3|KO-BKO +circularstring4326|4326|MultiLineString|3|KO-BKO +circularstring4326|4326|MultiPolygon|3|KO-BKO +circularstring4326|4326|GeometryCollection|3|KO-BKO +circularstring4326|4326|CircularString|3|KO-BKO +circularstring4326|4326|CompoundCurve|3|KO-BKO +circularstring4326|4326|CurvePolygon|3|KO-BKO +circularstring4326|4326|MultiCurve|3|KO-BKO +circularstring4326|4326|MultiSurface|3|KO-BKO +circularstring4326|4326|PolyhedralSurface|3|KO-BKO +circularstring4326|4326|Triangle|3|KO-BKO +circularstring4326||COUNT|2| +circularstringm|0|Point|0|KO-BKO +circularstringm|0|LineString|0|KO-BKO +circularstringm|0|Polygon|0|KO-BKO +circularstringm|0|MultiPoint|0|KO-BKO +circularstringm|0|MultiLineString|0|KO-BKO +circularstringm|0|MultiPolygon|0|KO-BKO +circularstringm|0|GeometryCollection|0|KO-BKO +circularstringm|0|CircularString|0|KO-BKO +circularstringm|0|CompoundCurve|0|KO-BKO +circularstringm|0|CurvePolygon|0|KO-BKO +circularstringm|0|MultiCurve|0|KO-BKO +circularstringm|0|MultiSurface|0|KO-BKO +circularstringm|0|PolyhedralSurface|0|KO-BKO +circularstringm|0|Triangle|0|KO-BKO +circularstringm|0|Tin|0|KO-BKO +circularstringm|0|Point|2|KO-BKO +circularstringm|0|LineString|2|KO-BKO +circularstringm|0|Polygon|2|KO-BKO +circularstringm|0|MultiPoint|2|KO-BKO +circularstringm|0|MultiLineString|2|KO-BKO +circularstringm|0|MultiPolygon|2|KO-BKO +circularstringm|0|GeometryCollection|2|KO-BKO +circularstringm|0|CircularString|2|KO-BKO +circularstringm|0|CompoundCurve|2|KO-BKO +circularstringm|0|CurvePolygon|2|KO-BKO +circularstringm|0|MultiCurve|2|KO-BKO +circularstringm|0|MultiSurface|2|KO-BKO +circularstringm|0|PolyhedralSurface|2|KO-BKO +circularstringm|0|Triangle|2|KO-BKO +circularstringm|0|Point|1|KO-BKO +circularstringm|0|LineString|1|KO-BKO +circularstringm|0|Polygon|1|KO-BKO +circularstringm|0|MultiPoint|1|KO-BKO +circularstringm|0|MultiLineString|1|KO-BKO +circularstringm|0|MultiPolygon|1|KO-BKO +circularstringm|0|GeometryCollection|1|KO-BKO +circularstringm|0|CircularString|1|OK-BOK +circularstringm|0|CompoundCurve|1|KO-BKO +circularstringm|0|CurvePolygon|1|KO-BKO +circularstringm|0|MultiCurve|1|KO-BKO +circularstringm|0|MultiSurface|1|KO-BKO +circularstringm|0|PolyhedralSurface|1|KO-BKO +circularstringm|0|Triangle|1|KO-BKO +circularstringm|0|Point|3|KO-BKO +circularstringm|0|LineString|3|KO-BKO +circularstringm|0|Polygon|3|KO-BKO +circularstringm|0|MultiPoint|3|KO-BKO +circularstringm|0|MultiLineString|3|KO-BKO +circularstringm|0|MultiPolygon|3|KO-BKO +circularstringm|0|GeometryCollection|3|KO-BKO +circularstringm|0|CircularString|3|KO-BKO +circularstringm|0|CompoundCurve|3|KO-BKO +circularstringm|0|CurvePolygon|3|KO-BKO +circularstringm|0|MultiCurve|3|KO-BKO +circularstringm|0|MultiSurface|3|KO-BKO +circularstringm|0|PolyhedralSurface|3|KO-BKO +circularstringm|0|Triangle|3|KO-BKO +circularstringm|4326|Point|0|KO-BKO +circularstringm|4326|LineString|0|KO-BKO +circularstringm|4326|Polygon|0|KO-BKO +circularstringm|4326|MultiPoint|0|KO-BKO +circularstringm|4326|MultiLineString|0|KO-BKO +circularstringm|4326|MultiPolygon|0|KO-BKO +circularstringm|4326|GeometryCollection|0|KO-BKO +circularstringm|4326|CircularString|0|KO-BKO +circularstringm|4326|CompoundCurve|0|KO-BKO +circularstringm|4326|CurvePolygon|0|KO-BKO +circularstringm|4326|MultiCurve|0|KO-BKO +circularstringm|4326|MultiSurface|0|KO-BKO +circularstringm|4326|PolyhedralSurface|0|KO-BKO +circularstringm|4326|Triangle|0|KO-BKO +circularstringm|4326|Tin|0|KO-BKO +circularstringm|4326|Point|2|KO-BKO +circularstringm|4326|LineString|2|KO-BKO +circularstringm|4326|Polygon|2|KO-BKO +circularstringm|4326|MultiPoint|2|KO-BKO +circularstringm|4326|MultiLineString|2|KO-BKO +circularstringm|4326|MultiPolygon|2|KO-BKO +circularstringm|4326|GeometryCollection|2|KO-BKO +circularstringm|4326|CircularString|2|KO-BKO +circularstringm|4326|CompoundCurve|2|KO-BKO +circularstringm|4326|CurvePolygon|2|KO-BKO +circularstringm|4326|MultiCurve|2|KO-BKO +circularstringm|4326|MultiSurface|2|KO-BKO +circularstringm|4326|PolyhedralSurface|2|KO-BKO +circularstringm|4326|Triangle|2|KO-BKO +circularstringm|4326|Point|1|KO-BKO +circularstringm|4326|LineString|1|KO-BKO +circularstringm|4326|Polygon|1|KO-BKO +circularstringm|4326|MultiPoint|1|KO-BKO +circularstringm|4326|MultiLineString|1|KO-BKO +circularstringm|4326|MultiPolygon|1|KO-BKO +circularstringm|4326|GeometryCollection|1|KO-BKO +circularstringm|4326|CircularString|1|OK-BOK +circularstringm|4326|CompoundCurve|1|KO-BKO +circularstringm|4326|CurvePolygon|1|KO-BKO +circularstringm|4326|MultiCurve|1|KO-BKO +circularstringm|4326|MultiSurface|1|KO-BKO +circularstringm|4326|PolyhedralSurface|1|KO-BKO +circularstringm|4326|Triangle|1|KO-BKO +circularstringm|4326|Point|3|KO-BKO +circularstringm|4326|LineString|3|KO-BKO +circularstringm|4326|Polygon|3|KO-BKO +circularstringm|4326|MultiPoint|3|KO-BKO +circularstringm|4326|MultiLineString|3|KO-BKO +circularstringm|4326|MultiPolygon|3|KO-BKO +circularstringm|4326|GeometryCollection|3|KO-BKO +circularstringm|4326|CircularString|3|KO-BKO +circularstringm|4326|CompoundCurve|3|KO-BKO +circularstringm|4326|CurvePolygon|3|KO-BKO +circularstringm|4326|MultiCurve|3|KO-BKO +circularstringm|4326|MultiSurface|3|KO-BKO +circularstringm|4326|PolyhedralSurface|3|KO-BKO +circularstringm|4326|Triangle|3|KO-BKO +circularstringm||COUNT|4| +circularstringm0|0|Point|0|KO-BKO +circularstringm0|0|LineString|0|KO-BKO +circularstringm0|0|Polygon|0|KO-BKO +circularstringm0|0|MultiPoint|0|KO-BKO +circularstringm0|0|MultiLineString|0|KO-BKO +circularstringm0|0|MultiPolygon|0|KO-BKO +circularstringm0|0|GeometryCollection|0|KO-BKO +circularstringm0|0|CircularString|0|KO-BKO +circularstringm0|0|CompoundCurve|0|KO-BKO +circularstringm0|0|CurvePolygon|0|KO-BKO +circularstringm0|0|MultiCurve|0|KO-BKO +circularstringm0|0|MultiSurface|0|KO-BKO +circularstringm0|0|PolyhedralSurface|0|KO-BKO +circularstringm0|0|Triangle|0|KO-BKO +circularstringm0|0|Tin|0|KO-BKO +circularstringm0|0|Point|2|KO-BKO +circularstringm0|0|LineString|2|KO-BKO +circularstringm0|0|Polygon|2|KO-BKO +circularstringm0|0|MultiPoint|2|KO-BKO +circularstringm0|0|MultiLineString|2|KO-BKO +circularstringm0|0|MultiPolygon|2|KO-BKO +circularstringm0|0|GeometryCollection|2|KO-BKO +circularstringm0|0|CircularString|2|KO-BKO +circularstringm0|0|CompoundCurve|2|KO-BKO +circularstringm0|0|CurvePolygon|2|KO-BKO +circularstringm0|0|MultiCurve|2|KO-BKO +circularstringm0|0|MultiSurface|2|KO-BKO +circularstringm0|0|PolyhedralSurface|2|KO-BKO +circularstringm0|0|Triangle|2|KO-BKO +circularstringm0|0|Point|1|KO-BKO +circularstringm0|0|LineString|1|KO-BKO +circularstringm0|0|Polygon|1|KO-BKO +circularstringm0|0|MultiPoint|1|KO-BKO +circularstringm0|0|MultiLineString|1|KO-BKO +circularstringm0|0|MultiPolygon|1|KO-BKO +circularstringm0|0|GeometryCollection|1|KO-BKO +circularstringm0|0|CircularString|1|OK-BOK +circularstringm0|0|CompoundCurve|1|KO-BKO +circularstringm0|0|CurvePolygon|1|KO-BKO +circularstringm0|0|MultiCurve|1|KO-BKO +circularstringm0|0|MultiSurface|1|KO-BKO +circularstringm0|0|PolyhedralSurface|1|KO-BKO +circularstringm0|0|Triangle|1|KO-BKO +circularstringm0|0|Point|3|KO-BKO +circularstringm0|0|LineString|3|KO-BKO +circularstringm0|0|Polygon|3|KO-BKO +circularstringm0|0|MultiPoint|3|KO-BKO +circularstringm0|0|MultiLineString|3|KO-BKO +circularstringm0|0|MultiPolygon|3|KO-BKO +circularstringm0|0|GeometryCollection|3|KO-BKO +circularstringm0|0|CircularString|3|KO-BKO +circularstringm0|0|CompoundCurve|3|KO-BKO +circularstringm0|0|CurvePolygon|3|KO-BKO +circularstringm0|0|MultiCurve|3|KO-BKO +circularstringm0|0|MultiSurface|3|KO-BKO +circularstringm0|0|PolyhedralSurface|3|KO-BKO +circularstringm0|0|Triangle|3|KO-BKO +circularstringm0|4326|Point|0|KO-BKO +circularstringm0|4326|LineString|0|KO-BKO +circularstringm0|4326|Polygon|0|KO-BKO +circularstringm0|4326|MultiPoint|0|KO-BKO +circularstringm0|4326|MultiLineString|0|KO-BKO +circularstringm0|4326|MultiPolygon|0|KO-BKO +circularstringm0|4326|GeometryCollection|0|KO-BKO +circularstringm0|4326|CircularString|0|KO-BKO +circularstringm0|4326|CompoundCurve|0|KO-BKO +circularstringm0|4326|CurvePolygon|0|KO-BKO +circularstringm0|4326|MultiCurve|0|KO-BKO +circularstringm0|4326|MultiSurface|0|KO-BKO +circularstringm0|4326|PolyhedralSurface|0|KO-BKO +circularstringm0|4326|Triangle|0|KO-BKO +circularstringm0|4326|Tin|0|KO-BKO +circularstringm0|4326|Point|2|KO-BKO +circularstringm0|4326|LineString|2|KO-BKO +circularstringm0|4326|Polygon|2|KO-BKO +circularstringm0|4326|MultiPoint|2|KO-BKO +circularstringm0|4326|MultiLineString|2|KO-BKO +circularstringm0|4326|MultiPolygon|2|KO-BKO +circularstringm0|4326|GeometryCollection|2|KO-BKO +circularstringm0|4326|CircularString|2|KO-BKO +circularstringm0|4326|CompoundCurve|2|KO-BKO +circularstringm0|4326|CurvePolygon|2|KO-BKO +circularstringm0|4326|MultiCurve|2|KO-BKO +circularstringm0|4326|MultiSurface|2|KO-BKO +circularstringm0|4326|PolyhedralSurface|2|KO-BKO +circularstringm0|4326|Triangle|2|KO-BKO +circularstringm0|4326|Point|1|KO-BKO +circularstringm0|4326|LineString|1|KO-BKO +circularstringm0|4326|Polygon|1|KO-BKO +circularstringm0|4326|MultiPoint|1|KO-BKO +circularstringm0|4326|MultiLineString|1|KO-BKO +circularstringm0|4326|MultiPolygon|1|KO-BKO +circularstringm0|4326|GeometryCollection|1|KO-BKO +circularstringm0|4326|CircularString|1|OK-BOK +circularstringm0|4326|CompoundCurve|1|KO-BKO +circularstringm0|4326|CurvePolygon|1|KO-BKO +circularstringm0|4326|MultiCurve|1|KO-BKO +circularstringm0|4326|MultiSurface|1|KO-BKO +circularstringm0|4326|PolyhedralSurface|1|KO-BKO +circularstringm0|4326|Triangle|1|KO-BKO +circularstringm0|4326|Point|3|KO-BKO +circularstringm0|4326|LineString|3|KO-BKO +circularstringm0|4326|Polygon|3|KO-BKO +circularstringm0|4326|MultiPoint|3|KO-BKO +circularstringm0|4326|MultiLineString|3|KO-BKO +circularstringm0|4326|MultiPolygon|3|KO-BKO +circularstringm0|4326|GeometryCollection|3|KO-BKO +circularstringm0|4326|CircularString|3|KO-BKO +circularstringm0|4326|CompoundCurve|3|KO-BKO +circularstringm0|4326|CurvePolygon|3|KO-BKO +circularstringm0|4326|MultiCurve|3|KO-BKO +circularstringm0|4326|MultiSurface|3|KO-BKO +circularstringm0|4326|PolyhedralSurface|3|KO-BKO +circularstringm0|4326|Triangle|3|KO-BKO +circularstringm0||COUNT|4| +circularstringm4326|0|Point|0|KO-BKO +circularstringm4326|0|LineString|0|KO-BKO +circularstringm4326|0|Polygon|0|KO-BKO +circularstringm4326|0|MultiPoint|0|KO-BKO +circularstringm4326|0|MultiLineString|0|KO-BKO +circularstringm4326|0|MultiPolygon|0|KO-BKO +circularstringm4326|0|GeometryCollection|0|KO-BKO +circularstringm4326|0|CircularString|0|KO-BKO +circularstringm4326|0|CompoundCurve|0|KO-BKO +circularstringm4326|0|CurvePolygon|0|KO-BKO +circularstringm4326|0|MultiCurve|0|KO-BKO +circularstringm4326|0|MultiSurface|0|KO-BKO +circularstringm4326|0|PolyhedralSurface|0|KO-BKO +circularstringm4326|0|Triangle|0|KO-BKO +circularstringm4326|0|Tin|0|KO-BKO +circularstringm4326|0|Point|2|KO-BKO +circularstringm4326|0|LineString|2|KO-BKO +circularstringm4326|0|Polygon|2|KO-BKO +circularstringm4326|0|MultiPoint|2|KO-BKO +circularstringm4326|0|MultiLineString|2|KO-BKO +circularstringm4326|0|MultiPolygon|2|KO-BKO +circularstringm4326|0|GeometryCollection|2|KO-BKO +circularstringm4326|0|CircularString|2|KO-BKO +circularstringm4326|0|CompoundCurve|2|KO-BKO +circularstringm4326|0|CurvePolygon|2|KO-BKO +circularstringm4326|0|MultiCurve|2|KO-BKO +circularstringm4326|0|MultiSurface|2|KO-BKO +circularstringm4326|0|PolyhedralSurface|2|KO-BKO +circularstringm4326|0|Triangle|2|KO-BKO +circularstringm4326|0|Point|1|KO-BKO +circularstringm4326|0|LineString|1|KO-BKO +circularstringm4326|0|Polygon|1|KO-BKO +circularstringm4326|0|MultiPoint|1|KO-BKO +circularstringm4326|0|MultiLineString|1|KO-BKO +circularstringm4326|0|MultiPolygon|1|KO-BKO +circularstringm4326|0|GeometryCollection|1|KO-BKO +circularstringm4326|0|CircularString|1|KO-BKO +circularstringm4326|0|CompoundCurve|1|KO-BKO +circularstringm4326|0|CurvePolygon|1|KO-BKO +circularstringm4326|0|MultiCurve|1|KO-BKO +circularstringm4326|0|MultiSurface|1|KO-BKO +circularstringm4326|0|PolyhedralSurface|1|KO-BKO +circularstringm4326|0|Triangle|1|KO-BKO +circularstringm4326|0|Point|3|KO-BKO +circularstringm4326|0|LineString|3|KO-BKO +circularstringm4326|0|Polygon|3|KO-BKO +circularstringm4326|0|MultiPoint|3|KO-BKO +circularstringm4326|0|MultiLineString|3|KO-BKO +circularstringm4326|0|MultiPolygon|3|KO-BKO +circularstringm4326|0|GeometryCollection|3|KO-BKO +circularstringm4326|0|CircularString|3|KO-BKO +circularstringm4326|0|CompoundCurve|3|KO-BKO +circularstringm4326|0|CurvePolygon|3|KO-BKO +circularstringm4326|0|MultiCurve|3|KO-BKO +circularstringm4326|0|MultiSurface|3|KO-BKO +circularstringm4326|0|PolyhedralSurface|3|KO-BKO +circularstringm4326|0|Triangle|3|KO-BKO +circularstringm4326|4326|Point|0|KO-BKO +circularstringm4326|4326|LineString|0|KO-BKO +circularstringm4326|4326|Polygon|0|KO-BKO +circularstringm4326|4326|MultiPoint|0|KO-BKO +circularstringm4326|4326|MultiLineString|0|KO-BKO +circularstringm4326|4326|MultiPolygon|0|KO-BKO +circularstringm4326|4326|GeometryCollection|0|KO-BKO +circularstringm4326|4326|CircularString|0|KO-BKO +circularstringm4326|4326|CompoundCurve|0|KO-BKO +circularstringm4326|4326|CurvePolygon|0|KO-BKO +circularstringm4326|4326|MultiCurve|0|KO-BKO +circularstringm4326|4326|MultiSurface|0|KO-BKO +circularstringm4326|4326|PolyhedralSurface|0|KO-BKO +circularstringm4326|4326|Triangle|0|KO-BKO +circularstringm4326|4326|Tin|0|KO-BKO +circularstringm4326|4326|Point|2|KO-BKO +circularstringm4326|4326|LineString|2|KO-BKO +circularstringm4326|4326|Polygon|2|KO-BKO +circularstringm4326|4326|MultiPoint|2|KO-BKO +circularstringm4326|4326|MultiLineString|2|KO-BKO +circularstringm4326|4326|MultiPolygon|2|KO-BKO +circularstringm4326|4326|GeometryCollection|2|KO-BKO +circularstringm4326|4326|CircularString|2|KO-BKO +circularstringm4326|4326|CompoundCurve|2|KO-BKO +circularstringm4326|4326|CurvePolygon|2|KO-BKO +circularstringm4326|4326|MultiCurve|2|KO-BKO +circularstringm4326|4326|MultiSurface|2|KO-BKO +circularstringm4326|4326|PolyhedralSurface|2|KO-BKO +circularstringm4326|4326|Triangle|2|KO-BKO +circularstringm4326|4326|Point|1|KO-BKO +circularstringm4326|4326|LineString|1|KO-BKO +circularstringm4326|4326|Polygon|1|KO-BKO +circularstringm4326|4326|MultiPoint|1|KO-BKO +circularstringm4326|4326|MultiLineString|1|KO-BKO +circularstringm4326|4326|MultiPolygon|1|KO-BKO +circularstringm4326|4326|GeometryCollection|1|KO-BKO +circularstringm4326|4326|CircularString|1|OK-BOK +circularstringm4326|4326|CompoundCurve|1|KO-BKO +circularstringm4326|4326|CurvePolygon|1|KO-BKO +circularstringm4326|4326|MultiCurve|1|KO-BKO +circularstringm4326|4326|MultiSurface|1|KO-BKO +circularstringm4326|4326|PolyhedralSurface|1|KO-BKO +circularstringm4326|4326|Triangle|1|KO-BKO +circularstringm4326|4326|Point|3|KO-BKO +circularstringm4326|4326|LineString|3|KO-BKO +circularstringm4326|4326|Polygon|3|KO-BKO +circularstringm4326|4326|MultiPoint|3|KO-BKO +circularstringm4326|4326|MultiLineString|3|KO-BKO +circularstringm4326|4326|MultiPolygon|3|KO-BKO +circularstringm4326|4326|GeometryCollection|3|KO-BKO +circularstringm4326|4326|CircularString|3|KO-BKO +circularstringm4326|4326|CompoundCurve|3|KO-BKO +circularstringm4326|4326|CurvePolygon|3|KO-BKO +circularstringm4326|4326|MultiCurve|3|KO-BKO +circularstringm4326|4326|MultiSurface|3|KO-BKO +circularstringm4326|4326|PolyhedralSurface|3|KO-BKO +circularstringm4326|4326|Triangle|3|KO-BKO +circularstringm4326||COUNT|2| +circularstringz|0|Point|0|KO-BKO +circularstringz|0|LineString|0|KO-BKO +circularstringz|0|Polygon|0|KO-BKO +circularstringz|0|MultiPoint|0|KO-BKO +circularstringz|0|MultiLineString|0|KO-BKO +circularstringz|0|MultiPolygon|0|KO-BKO +circularstringz|0|GeometryCollection|0|KO-BKO +circularstringz|0|CircularString|0|KO-BKO +circularstringz|0|CompoundCurve|0|KO-BKO +circularstringz|0|CurvePolygon|0|KO-BKO +circularstringz|0|MultiCurve|0|KO-BKO +circularstringz|0|MultiSurface|0|KO-BKO +circularstringz|0|PolyhedralSurface|0|KO-BKO +circularstringz|0|Triangle|0|KO-BKO +circularstringz|0|Tin|0|KO-BKO +circularstringz|0|Point|2|KO-BKO +circularstringz|0|LineString|2|KO-BKO +circularstringz|0|Polygon|2|KO-BKO +circularstringz|0|MultiPoint|2|KO-BKO +circularstringz|0|MultiLineString|2|KO-BKO +circularstringz|0|MultiPolygon|2|KO-BKO +circularstringz|0|GeometryCollection|2|KO-BKO +circularstringz|0|CircularString|2|OK-BOK +circularstringz|0|CompoundCurve|2|KO-BKO +circularstringz|0|CurvePolygon|2|KO-BKO +circularstringz|0|MultiCurve|2|KO-BKO +circularstringz|0|MultiSurface|2|KO-BKO +circularstringz|0|PolyhedralSurface|2|KO-BKO +circularstringz|0|Triangle|2|KO-BKO +circularstringz|0|Point|1|KO-BKO +circularstringz|0|LineString|1|KO-BKO +circularstringz|0|Polygon|1|KO-BKO +circularstringz|0|MultiPoint|1|KO-BKO +circularstringz|0|MultiLineString|1|KO-BKO +circularstringz|0|MultiPolygon|1|KO-BKO +circularstringz|0|GeometryCollection|1|KO-BKO +circularstringz|0|CircularString|1|KO-BKO +circularstringz|0|CompoundCurve|1|KO-BKO +circularstringz|0|CurvePolygon|1|KO-BKO +circularstringz|0|MultiCurve|1|KO-BKO +circularstringz|0|MultiSurface|1|KO-BKO +circularstringz|0|PolyhedralSurface|1|KO-BKO +circularstringz|0|Triangle|1|KO-BKO +circularstringz|0|Point|3|KO-BKO +circularstringz|0|LineString|3|KO-BKO +circularstringz|0|Polygon|3|KO-BKO +circularstringz|0|MultiPoint|3|KO-BKO +circularstringz|0|MultiLineString|3|KO-BKO +circularstringz|0|MultiPolygon|3|KO-BKO +circularstringz|0|GeometryCollection|3|KO-BKO +circularstringz|0|CircularString|3|KO-BKO +circularstringz|0|CompoundCurve|3|KO-BKO +circularstringz|0|CurvePolygon|3|KO-BKO +circularstringz|0|MultiCurve|3|KO-BKO +circularstringz|0|MultiSurface|3|KO-BKO +circularstringz|0|PolyhedralSurface|3|KO-BKO +circularstringz|0|Triangle|3|KO-BKO +circularstringz|4326|Point|0|KO-BKO +circularstringz|4326|LineString|0|KO-BKO +circularstringz|4326|Polygon|0|KO-BKO +circularstringz|4326|MultiPoint|0|KO-BKO +circularstringz|4326|MultiLineString|0|KO-BKO +circularstringz|4326|MultiPolygon|0|KO-BKO +circularstringz|4326|GeometryCollection|0|KO-BKO +circularstringz|4326|CircularString|0|KO-BKO +circularstringz|4326|CompoundCurve|0|KO-BKO +circularstringz|4326|CurvePolygon|0|KO-BKO +circularstringz|4326|MultiCurve|0|KO-BKO +circularstringz|4326|MultiSurface|0|KO-BKO +circularstringz|4326|PolyhedralSurface|0|KO-BKO +circularstringz|4326|Triangle|0|KO-BKO +circularstringz|4326|Tin|0|KO-BKO +circularstringz|4326|Point|2|KO-BKO +circularstringz|4326|LineString|2|KO-BKO +circularstringz|4326|Polygon|2|KO-BKO +circularstringz|4326|MultiPoint|2|KO-BKO +circularstringz|4326|MultiLineString|2|KO-BKO +circularstringz|4326|MultiPolygon|2|KO-BKO +circularstringz|4326|GeometryCollection|2|KO-BKO +circularstringz|4326|CircularString|2|OK-BOK +circularstringz|4326|CompoundCurve|2|KO-BKO +circularstringz|4326|CurvePolygon|2|KO-BKO +circularstringz|4326|MultiCurve|2|KO-BKO +circularstringz|4326|MultiSurface|2|KO-BKO +circularstringz|4326|PolyhedralSurface|2|KO-BKO +circularstringz|4326|Triangle|2|KO-BKO +circularstringz|4326|Point|1|KO-BKO +circularstringz|4326|LineString|1|KO-BKO +circularstringz|4326|Polygon|1|KO-BKO +circularstringz|4326|MultiPoint|1|KO-BKO +circularstringz|4326|MultiLineString|1|KO-BKO +circularstringz|4326|MultiPolygon|1|KO-BKO +circularstringz|4326|GeometryCollection|1|KO-BKO +circularstringz|4326|CircularString|1|KO-BKO +circularstringz|4326|CompoundCurve|1|KO-BKO +circularstringz|4326|CurvePolygon|1|KO-BKO +circularstringz|4326|MultiCurve|1|KO-BKO +circularstringz|4326|MultiSurface|1|KO-BKO +circularstringz|4326|PolyhedralSurface|1|KO-BKO +circularstringz|4326|Triangle|1|KO-BKO +circularstringz|4326|Point|3|KO-BKO +circularstringz|4326|LineString|3|KO-BKO +circularstringz|4326|Polygon|3|KO-BKO +circularstringz|4326|MultiPoint|3|KO-BKO +circularstringz|4326|MultiLineString|3|KO-BKO +circularstringz|4326|MultiPolygon|3|KO-BKO +circularstringz|4326|GeometryCollection|3|KO-BKO +circularstringz|4326|CircularString|3|KO-BKO +circularstringz|4326|CompoundCurve|3|KO-BKO +circularstringz|4326|CurvePolygon|3|KO-BKO +circularstringz|4326|MultiCurve|3|KO-BKO +circularstringz|4326|MultiSurface|3|KO-BKO +circularstringz|4326|PolyhedralSurface|3|KO-BKO +circularstringz|4326|Triangle|3|KO-BKO +circularstringz||COUNT|4| +circularstringz0|0|Point|0|KO-BKO +circularstringz0|0|LineString|0|KO-BKO +circularstringz0|0|Polygon|0|KO-BKO +circularstringz0|0|MultiPoint|0|KO-BKO +circularstringz0|0|MultiLineString|0|KO-BKO +circularstringz0|0|MultiPolygon|0|KO-BKO +circularstringz0|0|GeometryCollection|0|KO-BKO +circularstringz0|0|CircularString|0|KO-BKO +circularstringz0|0|CompoundCurve|0|KO-BKO +circularstringz0|0|CurvePolygon|0|KO-BKO +circularstringz0|0|MultiCurve|0|KO-BKO +circularstringz0|0|MultiSurface|0|KO-BKO +circularstringz0|0|PolyhedralSurface|0|KO-BKO +circularstringz0|0|Triangle|0|KO-BKO +circularstringz0|0|Tin|0|KO-BKO +circularstringz0|0|Point|2|KO-BKO +circularstringz0|0|LineString|2|KO-BKO +circularstringz0|0|Polygon|2|KO-BKO +circularstringz0|0|MultiPoint|2|KO-BKO +circularstringz0|0|MultiLineString|2|KO-BKO +circularstringz0|0|MultiPolygon|2|KO-BKO +circularstringz0|0|GeometryCollection|2|KO-BKO +circularstringz0|0|CircularString|2|OK-BOK +circularstringz0|0|CompoundCurve|2|KO-BKO +circularstringz0|0|CurvePolygon|2|KO-BKO +circularstringz0|0|MultiCurve|2|KO-BKO +circularstringz0|0|MultiSurface|2|KO-BKO +circularstringz0|0|PolyhedralSurface|2|KO-BKO +circularstringz0|0|Triangle|2|KO-BKO +circularstringz0|0|Point|1|KO-BKO +circularstringz0|0|LineString|1|KO-BKO +circularstringz0|0|Polygon|1|KO-BKO +circularstringz0|0|MultiPoint|1|KO-BKO +circularstringz0|0|MultiLineString|1|KO-BKO +circularstringz0|0|MultiPolygon|1|KO-BKO +circularstringz0|0|GeometryCollection|1|KO-BKO +circularstringz0|0|CircularString|1|KO-BKO +circularstringz0|0|CompoundCurve|1|KO-BKO +circularstringz0|0|CurvePolygon|1|KO-BKO +circularstringz0|0|MultiCurve|1|KO-BKO +circularstringz0|0|MultiSurface|1|KO-BKO +circularstringz0|0|PolyhedralSurface|1|KO-BKO +circularstringz0|0|Triangle|1|KO-BKO +circularstringz0|0|Point|3|KO-BKO +circularstringz0|0|LineString|3|KO-BKO +circularstringz0|0|Polygon|3|KO-BKO +circularstringz0|0|MultiPoint|3|KO-BKO +circularstringz0|0|MultiLineString|3|KO-BKO +circularstringz0|0|MultiPolygon|3|KO-BKO +circularstringz0|0|GeometryCollection|3|KO-BKO +circularstringz0|0|CircularString|3|KO-BKO +circularstringz0|0|CompoundCurve|3|KO-BKO +circularstringz0|0|CurvePolygon|3|KO-BKO +circularstringz0|0|MultiCurve|3|KO-BKO +circularstringz0|0|MultiSurface|3|KO-BKO +circularstringz0|0|PolyhedralSurface|3|KO-BKO +circularstringz0|0|Triangle|3|KO-BKO +circularstringz0|4326|Point|0|KO-BKO +circularstringz0|4326|LineString|0|KO-BKO +circularstringz0|4326|Polygon|0|KO-BKO +circularstringz0|4326|MultiPoint|0|KO-BKO +circularstringz0|4326|MultiLineString|0|KO-BKO +circularstringz0|4326|MultiPolygon|0|KO-BKO +circularstringz0|4326|GeometryCollection|0|KO-BKO +circularstringz0|4326|CircularString|0|KO-BKO +circularstringz0|4326|CompoundCurve|0|KO-BKO +circularstringz0|4326|CurvePolygon|0|KO-BKO +circularstringz0|4326|MultiCurve|0|KO-BKO +circularstringz0|4326|MultiSurface|0|KO-BKO +circularstringz0|4326|PolyhedralSurface|0|KO-BKO +circularstringz0|4326|Triangle|0|KO-BKO +circularstringz0|4326|Tin|0|KO-BKO +circularstringz0|4326|Point|2|KO-BKO +circularstringz0|4326|LineString|2|KO-BKO +circularstringz0|4326|Polygon|2|KO-BKO +circularstringz0|4326|MultiPoint|2|KO-BKO +circularstringz0|4326|MultiLineString|2|KO-BKO +circularstringz0|4326|MultiPolygon|2|KO-BKO +circularstringz0|4326|GeometryCollection|2|KO-BKO +circularstringz0|4326|CircularString|2|OK-BOK +circularstringz0|4326|CompoundCurve|2|KO-BKO +circularstringz0|4326|CurvePolygon|2|KO-BKO +circularstringz0|4326|MultiCurve|2|KO-BKO +circularstringz0|4326|MultiSurface|2|KO-BKO +circularstringz0|4326|PolyhedralSurface|2|KO-BKO +circularstringz0|4326|Triangle|2|KO-BKO +circularstringz0|4326|Point|1|KO-BKO +circularstringz0|4326|LineString|1|KO-BKO +circularstringz0|4326|Polygon|1|KO-BKO +circularstringz0|4326|MultiPoint|1|KO-BKO +circularstringz0|4326|MultiLineString|1|KO-BKO +circularstringz0|4326|MultiPolygon|1|KO-BKO +circularstringz0|4326|GeometryCollection|1|KO-BKO +circularstringz0|4326|CircularString|1|KO-BKO +circularstringz0|4326|CompoundCurve|1|KO-BKO +circularstringz0|4326|CurvePolygon|1|KO-BKO +circularstringz0|4326|MultiCurve|1|KO-BKO +circularstringz0|4326|MultiSurface|1|KO-BKO +circularstringz0|4326|PolyhedralSurface|1|KO-BKO +circularstringz0|4326|Triangle|1|KO-BKO +circularstringz0|4326|Point|3|KO-BKO +circularstringz0|4326|LineString|3|KO-BKO +circularstringz0|4326|Polygon|3|KO-BKO +circularstringz0|4326|MultiPoint|3|KO-BKO +circularstringz0|4326|MultiLineString|3|KO-BKO +circularstringz0|4326|MultiPolygon|3|KO-BKO +circularstringz0|4326|GeometryCollection|3|KO-BKO +circularstringz0|4326|CircularString|3|KO-BKO +circularstringz0|4326|CompoundCurve|3|KO-BKO +circularstringz0|4326|CurvePolygon|3|KO-BKO +circularstringz0|4326|MultiCurve|3|KO-BKO +circularstringz0|4326|MultiSurface|3|KO-BKO +circularstringz0|4326|PolyhedralSurface|3|KO-BKO +circularstringz0|4326|Triangle|3|KO-BKO +circularstringz0||COUNT|4| +circularstringz4326|0|Point|0|KO-BKO +circularstringz4326|0|LineString|0|KO-BKO +circularstringz4326|0|Polygon|0|KO-BKO +circularstringz4326|0|MultiPoint|0|KO-BKO +circularstringz4326|0|MultiLineString|0|KO-BKO +circularstringz4326|0|MultiPolygon|0|KO-BKO +circularstringz4326|0|GeometryCollection|0|KO-BKO +circularstringz4326|0|CircularString|0|KO-BKO +circularstringz4326|0|CompoundCurve|0|KO-BKO +circularstringz4326|0|CurvePolygon|0|KO-BKO +circularstringz4326|0|MultiCurve|0|KO-BKO +circularstringz4326|0|MultiSurface|0|KO-BKO +circularstringz4326|0|PolyhedralSurface|0|KO-BKO +circularstringz4326|0|Triangle|0|KO-BKO +circularstringz4326|0|Tin|0|KO-BKO +circularstringz4326|0|Point|2|KO-BKO +circularstringz4326|0|LineString|2|KO-BKO +circularstringz4326|0|Polygon|2|KO-BKO +circularstringz4326|0|MultiPoint|2|KO-BKO +circularstringz4326|0|MultiLineString|2|KO-BKO +circularstringz4326|0|MultiPolygon|2|KO-BKO +circularstringz4326|0|GeometryCollection|2|KO-BKO +circularstringz4326|0|CircularString|2|KO-BKO +circularstringz4326|0|CompoundCurve|2|KO-BKO +circularstringz4326|0|CurvePolygon|2|KO-BKO +circularstringz4326|0|MultiCurve|2|KO-BKO +circularstringz4326|0|MultiSurface|2|KO-BKO +circularstringz4326|0|PolyhedralSurface|2|KO-BKO +circularstringz4326|0|Triangle|2|KO-BKO +circularstringz4326|0|Point|1|KO-BKO +circularstringz4326|0|LineString|1|KO-BKO +circularstringz4326|0|Polygon|1|KO-BKO +circularstringz4326|0|MultiPoint|1|KO-BKO +circularstringz4326|0|MultiLineString|1|KO-BKO +circularstringz4326|0|MultiPolygon|1|KO-BKO +circularstringz4326|0|GeometryCollection|1|KO-BKO +circularstringz4326|0|CircularString|1|KO-BKO +circularstringz4326|0|CompoundCurve|1|KO-BKO +circularstringz4326|0|CurvePolygon|1|KO-BKO +circularstringz4326|0|MultiCurve|1|KO-BKO +circularstringz4326|0|MultiSurface|1|KO-BKO +circularstringz4326|0|PolyhedralSurface|1|KO-BKO +circularstringz4326|0|Triangle|1|KO-BKO +circularstringz4326|0|Point|3|KO-BKO +circularstringz4326|0|LineString|3|KO-BKO +circularstringz4326|0|Polygon|3|KO-BKO +circularstringz4326|0|MultiPoint|3|KO-BKO +circularstringz4326|0|MultiLineString|3|KO-BKO +circularstringz4326|0|MultiPolygon|3|KO-BKO +circularstringz4326|0|GeometryCollection|3|KO-BKO +circularstringz4326|0|CircularString|3|KO-BKO +circularstringz4326|0|CompoundCurve|3|KO-BKO +circularstringz4326|0|CurvePolygon|3|KO-BKO +circularstringz4326|0|MultiCurve|3|KO-BKO +circularstringz4326|0|MultiSurface|3|KO-BKO +circularstringz4326|0|PolyhedralSurface|3|KO-BKO +circularstringz4326|0|Triangle|3|KO-BKO +circularstringz4326|4326|Point|0|KO-BKO +circularstringz4326|4326|LineString|0|KO-BKO +circularstringz4326|4326|Polygon|0|KO-BKO +circularstringz4326|4326|MultiPoint|0|KO-BKO +circularstringz4326|4326|MultiLineString|0|KO-BKO +circularstringz4326|4326|MultiPolygon|0|KO-BKO +circularstringz4326|4326|GeometryCollection|0|KO-BKO +circularstringz4326|4326|CircularString|0|KO-BKO +circularstringz4326|4326|CompoundCurve|0|KO-BKO +circularstringz4326|4326|CurvePolygon|0|KO-BKO +circularstringz4326|4326|MultiCurve|0|KO-BKO +circularstringz4326|4326|MultiSurface|0|KO-BKO +circularstringz4326|4326|PolyhedralSurface|0|KO-BKO +circularstringz4326|4326|Triangle|0|KO-BKO +circularstringz4326|4326|Tin|0|KO-BKO +circularstringz4326|4326|Point|2|KO-BKO +circularstringz4326|4326|LineString|2|KO-BKO +circularstringz4326|4326|Polygon|2|KO-BKO +circularstringz4326|4326|MultiPoint|2|KO-BKO +circularstringz4326|4326|MultiLineString|2|KO-BKO +circularstringz4326|4326|MultiPolygon|2|KO-BKO +circularstringz4326|4326|GeometryCollection|2|KO-BKO +circularstringz4326|4326|CircularString|2|OK-BOK +circularstringz4326|4326|CompoundCurve|2|KO-BKO +circularstringz4326|4326|CurvePolygon|2|KO-BKO +circularstringz4326|4326|MultiCurve|2|KO-BKO +circularstringz4326|4326|MultiSurface|2|KO-BKO +circularstringz4326|4326|PolyhedralSurface|2|KO-BKO +circularstringz4326|4326|Triangle|2|KO-BKO +circularstringz4326|4326|Point|1|KO-BKO +circularstringz4326|4326|LineString|1|KO-BKO +circularstringz4326|4326|Polygon|1|KO-BKO +circularstringz4326|4326|MultiPoint|1|KO-BKO +circularstringz4326|4326|MultiLineString|1|KO-BKO +circularstringz4326|4326|MultiPolygon|1|KO-BKO +circularstringz4326|4326|GeometryCollection|1|KO-BKO +circularstringz4326|4326|CircularString|1|KO-BKO +circularstringz4326|4326|CompoundCurve|1|KO-BKO +circularstringz4326|4326|CurvePolygon|1|KO-BKO +circularstringz4326|4326|MultiCurve|1|KO-BKO +circularstringz4326|4326|MultiSurface|1|KO-BKO +circularstringz4326|4326|PolyhedralSurface|1|KO-BKO +circularstringz4326|4326|Triangle|1|KO-BKO +circularstringz4326|4326|Point|3|KO-BKO +circularstringz4326|4326|LineString|3|KO-BKO +circularstringz4326|4326|Polygon|3|KO-BKO +circularstringz4326|4326|MultiPoint|3|KO-BKO +circularstringz4326|4326|MultiLineString|3|KO-BKO +circularstringz4326|4326|MultiPolygon|3|KO-BKO +circularstringz4326|4326|GeometryCollection|3|KO-BKO +circularstringz4326|4326|CircularString|3|KO-BKO +circularstringz4326|4326|CompoundCurve|3|KO-BKO +circularstringz4326|4326|CurvePolygon|3|KO-BKO +circularstringz4326|4326|MultiCurve|3|KO-BKO +circularstringz4326|4326|MultiSurface|3|KO-BKO +circularstringz4326|4326|PolyhedralSurface|3|KO-BKO +circularstringz4326|4326|Triangle|3|KO-BKO +circularstringz4326||COUNT|2| +circularstringzm|0|Point|0|KO-BKO +circularstringzm|0|LineString|0|KO-BKO +circularstringzm|0|Polygon|0|KO-BKO +circularstringzm|0|MultiPoint|0|KO-BKO +circularstringzm|0|MultiLineString|0|KO-BKO +circularstringzm|0|MultiPolygon|0|KO-BKO +circularstringzm|0|GeometryCollection|0|KO-BKO +circularstringzm|0|CircularString|0|KO-BKO +circularstringzm|0|CompoundCurve|0|KO-BKO +circularstringzm|0|CurvePolygon|0|KO-BKO +circularstringzm|0|MultiCurve|0|KO-BKO +circularstringzm|0|MultiSurface|0|KO-BKO +circularstringzm|0|PolyhedralSurface|0|KO-BKO +circularstringzm|0|Triangle|0|KO-BKO +circularstringzm|0|Tin|0|KO-BKO +circularstringzm|0|Point|2|KO-BKO +circularstringzm|0|LineString|2|KO-BKO +circularstringzm|0|Polygon|2|KO-BKO +circularstringzm|0|MultiPoint|2|KO-BKO +circularstringzm|0|MultiLineString|2|KO-BKO +circularstringzm|0|MultiPolygon|2|KO-BKO +circularstringzm|0|GeometryCollection|2|KO-BKO +circularstringzm|0|CircularString|2|KO-BKO +circularstringzm|0|CompoundCurve|2|KO-BKO +circularstringzm|0|CurvePolygon|2|KO-BKO +circularstringzm|0|MultiCurve|2|KO-BKO +circularstringzm|0|MultiSurface|2|KO-BKO +circularstringzm|0|PolyhedralSurface|2|KO-BKO +circularstringzm|0|Triangle|2|KO-BKO +circularstringzm|0|Point|1|KO-BKO +circularstringzm|0|LineString|1|KO-BKO +circularstringzm|0|Polygon|1|KO-BKO +circularstringzm|0|MultiPoint|1|KO-BKO +circularstringzm|0|MultiLineString|1|KO-BKO +circularstringzm|0|MultiPolygon|1|KO-BKO +circularstringzm|0|GeometryCollection|1|KO-BKO +circularstringzm|0|CircularString|1|KO-BKO +circularstringzm|0|CompoundCurve|1|KO-BKO +circularstringzm|0|CurvePolygon|1|KO-BKO +circularstringzm|0|MultiCurve|1|KO-BKO +circularstringzm|0|MultiSurface|1|KO-BKO +circularstringzm|0|PolyhedralSurface|1|KO-BKO +circularstringzm|0|Triangle|1|KO-BKO +circularstringzm|0|Point|3|KO-BKO +circularstringzm|0|LineString|3|KO-BKO +circularstringzm|0|Polygon|3|KO-BKO +circularstringzm|0|MultiPoint|3|KO-BKO +circularstringzm|0|MultiLineString|3|KO-BKO +circularstringzm|0|MultiPolygon|3|KO-BKO +circularstringzm|0|GeometryCollection|3|KO-BKO +circularstringzm|0|CircularString|3|OK-BOK +circularstringzm|0|CompoundCurve|3|KO-BKO +circularstringzm|0|CurvePolygon|3|KO-BKO +circularstringzm|0|MultiCurve|3|KO-BKO +circularstringzm|0|MultiSurface|3|KO-BKO +circularstringzm|0|PolyhedralSurface|3|KO-BKO +circularstringzm|0|Triangle|3|KO-BKO +circularstringzm|4326|Point|0|KO-BKO +circularstringzm|4326|LineString|0|KO-BKO +circularstringzm|4326|Polygon|0|KO-BKO +circularstringzm|4326|MultiPoint|0|KO-BKO +circularstringzm|4326|MultiLineString|0|KO-BKO +circularstringzm|4326|MultiPolygon|0|KO-BKO +circularstringzm|4326|GeometryCollection|0|KO-BKO +circularstringzm|4326|CircularString|0|KO-BKO +circularstringzm|4326|CompoundCurve|0|KO-BKO +circularstringzm|4326|CurvePolygon|0|KO-BKO +circularstringzm|4326|MultiCurve|0|KO-BKO +circularstringzm|4326|MultiSurface|0|KO-BKO +circularstringzm|4326|PolyhedralSurface|0|KO-BKO +circularstringzm|4326|Triangle|0|KO-BKO +circularstringzm|4326|Tin|0|KO-BKO +circularstringzm|4326|Point|2|KO-BKO +circularstringzm|4326|LineString|2|KO-BKO +circularstringzm|4326|Polygon|2|KO-BKO +circularstringzm|4326|MultiPoint|2|KO-BKO +circularstringzm|4326|MultiLineString|2|KO-BKO +circularstringzm|4326|MultiPolygon|2|KO-BKO +circularstringzm|4326|GeometryCollection|2|KO-BKO +circularstringzm|4326|CircularString|2|KO-BKO +circularstringzm|4326|CompoundCurve|2|KO-BKO +circularstringzm|4326|CurvePolygon|2|KO-BKO +circularstringzm|4326|MultiCurve|2|KO-BKO +circularstringzm|4326|MultiSurface|2|KO-BKO +circularstringzm|4326|PolyhedralSurface|2|KO-BKO +circularstringzm|4326|Triangle|2|KO-BKO +circularstringzm|4326|Point|1|KO-BKO +circularstringzm|4326|LineString|1|KO-BKO +circularstringzm|4326|Polygon|1|KO-BKO +circularstringzm|4326|MultiPoint|1|KO-BKO +circularstringzm|4326|MultiLineString|1|KO-BKO +circularstringzm|4326|MultiPolygon|1|KO-BKO +circularstringzm|4326|GeometryCollection|1|KO-BKO +circularstringzm|4326|CircularString|1|KO-BKO +circularstringzm|4326|CompoundCurve|1|KO-BKO +circularstringzm|4326|CurvePolygon|1|KO-BKO +circularstringzm|4326|MultiCurve|1|KO-BKO +circularstringzm|4326|MultiSurface|1|KO-BKO +circularstringzm|4326|PolyhedralSurface|1|KO-BKO +circularstringzm|4326|Triangle|1|KO-BKO +circularstringzm|4326|Point|3|KO-BKO +circularstringzm|4326|LineString|3|KO-BKO +circularstringzm|4326|Polygon|3|KO-BKO +circularstringzm|4326|MultiPoint|3|KO-BKO +circularstringzm|4326|MultiLineString|3|KO-BKO +circularstringzm|4326|MultiPolygon|3|KO-BKO +circularstringzm|4326|GeometryCollection|3|KO-BKO +circularstringzm|4326|CircularString|3|OK-BOK +circularstringzm|4326|CompoundCurve|3|KO-BKO +circularstringzm|4326|CurvePolygon|3|KO-BKO +circularstringzm|4326|MultiCurve|3|KO-BKO +circularstringzm|4326|MultiSurface|3|KO-BKO +circularstringzm|4326|PolyhedralSurface|3|KO-BKO +circularstringzm|4326|Triangle|3|KO-BKO +circularstringzm||COUNT|4| +circularstringzm0|0|Point|0|KO-BKO +circularstringzm0|0|LineString|0|KO-BKO +circularstringzm0|0|Polygon|0|KO-BKO +circularstringzm0|0|MultiPoint|0|KO-BKO +circularstringzm0|0|MultiLineString|0|KO-BKO +circularstringzm0|0|MultiPolygon|0|KO-BKO +circularstringzm0|0|GeometryCollection|0|KO-BKO +circularstringzm0|0|CircularString|0|KO-BKO +circularstringzm0|0|CompoundCurve|0|KO-BKO +circularstringzm0|0|CurvePolygon|0|KO-BKO +circularstringzm0|0|MultiCurve|0|KO-BKO +circularstringzm0|0|MultiSurface|0|KO-BKO +circularstringzm0|0|PolyhedralSurface|0|KO-BKO +circularstringzm0|0|Triangle|0|KO-BKO +circularstringzm0|0|Tin|0|KO-BKO +circularstringzm0|0|Point|2|KO-BKO +circularstringzm0|0|LineString|2|KO-BKO +circularstringzm0|0|Polygon|2|KO-BKO +circularstringzm0|0|MultiPoint|2|KO-BKO +circularstringzm0|0|MultiLineString|2|KO-BKO +circularstringzm0|0|MultiPolygon|2|KO-BKO +circularstringzm0|0|GeometryCollection|2|KO-BKO +circularstringzm0|0|CircularString|2|KO-BKO +circularstringzm0|0|CompoundCurve|2|KO-BKO +circularstringzm0|0|CurvePolygon|2|KO-BKO +circularstringzm0|0|MultiCurve|2|KO-BKO +circularstringzm0|0|MultiSurface|2|KO-BKO +circularstringzm0|0|PolyhedralSurface|2|KO-BKO +circularstringzm0|0|Triangle|2|KO-BKO +circularstringzm0|0|Point|1|KO-BKO +circularstringzm0|0|LineString|1|KO-BKO +circularstringzm0|0|Polygon|1|KO-BKO +circularstringzm0|0|MultiPoint|1|KO-BKO +circularstringzm0|0|MultiLineString|1|KO-BKO +circularstringzm0|0|MultiPolygon|1|KO-BKO +circularstringzm0|0|GeometryCollection|1|KO-BKO +circularstringzm0|0|CircularString|1|KO-BKO +circularstringzm0|0|CompoundCurve|1|KO-BKO +circularstringzm0|0|CurvePolygon|1|KO-BKO +circularstringzm0|0|MultiCurve|1|KO-BKO +circularstringzm0|0|MultiSurface|1|KO-BKO +circularstringzm0|0|PolyhedralSurface|1|KO-BKO +circularstringzm0|0|Triangle|1|KO-BKO +circularstringzm0|0|Point|3|KO-BKO +circularstringzm0|0|LineString|3|KO-BKO +circularstringzm0|0|Polygon|3|KO-BKO +circularstringzm0|0|MultiPoint|3|KO-BKO +circularstringzm0|0|MultiLineString|3|KO-BKO +circularstringzm0|0|MultiPolygon|3|KO-BKO +circularstringzm0|0|GeometryCollection|3|KO-BKO +circularstringzm0|0|CircularString|3|OK-BOK +circularstringzm0|0|CompoundCurve|3|KO-BKO +circularstringzm0|0|CurvePolygon|3|KO-BKO +circularstringzm0|0|MultiCurve|3|KO-BKO +circularstringzm0|0|MultiSurface|3|KO-BKO +circularstringzm0|0|PolyhedralSurface|3|KO-BKO +circularstringzm0|0|Triangle|3|KO-BKO +circularstringzm0|4326|Point|0|KO-BKO +circularstringzm0|4326|LineString|0|KO-BKO +circularstringzm0|4326|Polygon|0|KO-BKO +circularstringzm0|4326|MultiPoint|0|KO-BKO +circularstringzm0|4326|MultiLineString|0|KO-BKO +circularstringzm0|4326|MultiPolygon|0|KO-BKO +circularstringzm0|4326|GeometryCollection|0|KO-BKO +circularstringzm0|4326|CircularString|0|KO-BKO +circularstringzm0|4326|CompoundCurve|0|KO-BKO +circularstringzm0|4326|CurvePolygon|0|KO-BKO +circularstringzm0|4326|MultiCurve|0|KO-BKO +circularstringzm0|4326|MultiSurface|0|KO-BKO +circularstringzm0|4326|PolyhedralSurface|0|KO-BKO +circularstringzm0|4326|Triangle|0|KO-BKO +circularstringzm0|4326|Tin|0|KO-BKO +circularstringzm0|4326|Point|2|KO-BKO +circularstringzm0|4326|LineString|2|KO-BKO +circularstringzm0|4326|Polygon|2|KO-BKO +circularstringzm0|4326|MultiPoint|2|KO-BKO +circularstringzm0|4326|MultiLineString|2|KO-BKO +circularstringzm0|4326|MultiPolygon|2|KO-BKO +circularstringzm0|4326|GeometryCollection|2|KO-BKO +circularstringzm0|4326|CircularString|2|KO-BKO +circularstringzm0|4326|CompoundCurve|2|KO-BKO +circularstringzm0|4326|CurvePolygon|2|KO-BKO +circularstringzm0|4326|MultiCurve|2|KO-BKO +circularstringzm0|4326|MultiSurface|2|KO-BKO +circularstringzm0|4326|PolyhedralSurface|2|KO-BKO +circularstringzm0|4326|Triangle|2|KO-BKO +circularstringzm0|4326|Point|1|KO-BKO +circularstringzm0|4326|LineString|1|KO-BKO +circularstringzm0|4326|Polygon|1|KO-BKO +circularstringzm0|4326|MultiPoint|1|KO-BKO +circularstringzm0|4326|MultiLineString|1|KO-BKO +circularstringzm0|4326|MultiPolygon|1|KO-BKO +circularstringzm0|4326|GeometryCollection|1|KO-BKO +circularstringzm0|4326|CircularString|1|KO-BKO +circularstringzm0|4326|CompoundCurve|1|KO-BKO +circularstringzm0|4326|CurvePolygon|1|KO-BKO +circularstringzm0|4326|MultiCurve|1|KO-BKO +circularstringzm0|4326|MultiSurface|1|KO-BKO +circularstringzm0|4326|PolyhedralSurface|1|KO-BKO +circularstringzm0|4326|Triangle|1|KO-BKO +circularstringzm0|4326|Point|3|KO-BKO +circularstringzm0|4326|LineString|3|KO-BKO +circularstringzm0|4326|Polygon|3|KO-BKO +circularstringzm0|4326|MultiPoint|3|KO-BKO +circularstringzm0|4326|MultiLineString|3|KO-BKO +circularstringzm0|4326|MultiPolygon|3|KO-BKO +circularstringzm0|4326|GeometryCollection|3|KO-BKO +circularstringzm0|4326|CircularString|3|OK-BOK +circularstringzm0|4326|CompoundCurve|3|KO-BKO +circularstringzm0|4326|CurvePolygon|3|KO-BKO +circularstringzm0|4326|MultiCurve|3|KO-BKO +circularstringzm0|4326|MultiSurface|3|KO-BKO +circularstringzm0|4326|PolyhedralSurface|3|KO-BKO +circularstringzm0|4326|Triangle|3|KO-BKO +circularstringzm0||COUNT|4| +circularstringzm4326|0|Point|0|KO-BKO +circularstringzm4326|0|LineString|0|KO-BKO +circularstringzm4326|0|Polygon|0|KO-BKO +circularstringzm4326|0|MultiPoint|0|KO-BKO +circularstringzm4326|0|MultiLineString|0|KO-BKO +circularstringzm4326|0|MultiPolygon|0|KO-BKO +circularstringzm4326|0|GeometryCollection|0|KO-BKO +circularstringzm4326|0|CircularString|0|KO-BKO +circularstringzm4326|0|CompoundCurve|0|KO-BKO +circularstringzm4326|0|CurvePolygon|0|KO-BKO +circularstringzm4326|0|MultiCurve|0|KO-BKO +circularstringzm4326|0|MultiSurface|0|KO-BKO +circularstringzm4326|0|PolyhedralSurface|0|KO-BKO +circularstringzm4326|0|Triangle|0|KO-BKO +circularstringzm4326|0|Tin|0|KO-BKO +circularstringzm4326|0|Point|2|KO-BKO +circularstringzm4326|0|LineString|2|KO-BKO +circularstringzm4326|0|Polygon|2|KO-BKO +circularstringzm4326|0|MultiPoint|2|KO-BKO +circularstringzm4326|0|MultiLineString|2|KO-BKO +circularstringzm4326|0|MultiPolygon|2|KO-BKO +circularstringzm4326|0|GeometryCollection|2|KO-BKO +circularstringzm4326|0|CircularString|2|KO-BKO +circularstringzm4326|0|CompoundCurve|2|KO-BKO +circularstringzm4326|0|CurvePolygon|2|KO-BKO +circularstringzm4326|0|MultiCurve|2|KO-BKO +circularstringzm4326|0|MultiSurface|2|KO-BKO +circularstringzm4326|0|PolyhedralSurface|2|KO-BKO +circularstringzm4326|0|Triangle|2|KO-BKO +circularstringzm4326|0|Point|1|KO-BKO +circularstringzm4326|0|LineString|1|KO-BKO +circularstringzm4326|0|Polygon|1|KO-BKO +circularstringzm4326|0|MultiPoint|1|KO-BKO +circularstringzm4326|0|MultiLineString|1|KO-BKO +circularstringzm4326|0|MultiPolygon|1|KO-BKO +circularstringzm4326|0|GeometryCollection|1|KO-BKO +circularstringzm4326|0|CircularString|1|KO-BKO +circularstringzm4326|0|CompoundCurve|1|KO-BKO +circularstringzm4326|0|CurvePolygon|1|KO-BKO +circularstringzm4326|0|MultiCurve|1|KO-BKO +circularstringzm4326|0|MultiSurface|1|KO-BKO +circularstringzm4326|0|PolyhedralSurface|1|KO-BKO +circularstringzm4326|0|Triangle|1|KO-BKO +circularstringzm4326|0|Point|3|KO-BKO +circularstringzm4326|0|LineString|3|KO-BKO +circularstringzm4326|0|Polygon|3|KO-BKO +circularstringzm4326|0|MultiPoint|3|KO-BKO +circularstringzm4326|0|MultiLineString|3|KO-BKO +circularstringzm4326|0|MultiPolygon|3|KO-BKO +circularstringzm4326|0|GeometryCollection|3|KO-BKO +circularstringzm4326|0|CircularString|3|KO-BKO +circularstringzm4326|0|CompoundCurve|3|KO-BKO +circularstringzm4326|0|CurvePolygon|3|KO-BKO +circularstringzm4326|0|MultiCurve|3|KO-BKO +circularstringzm4326|0|MultiSurface|3|KO-BKO +circularstringzm4326|0|PolyhedralSurface|3|KO-BKO +circularstringzm4326|0|Triangle|3|KO-BKO +circularstringzm4326|4326|Point|0|KO-BKO +circularstringzm4326|4326|LineString|0|KO-BKO +circularstringzm4326|4326|Polygon|0|KO-BKO +circularstringzm4326|4326|MultiPoint|0|KO-BKO +circularstringzm4326|4326|MultiLineString|0|KO-BKO +circularstringzm4326|4326|MultiPolygon|0|KO-BKO +circularstringzm4326|4326|GeometryCollection|0|KO-BKO +circularstringzm4326|4326|CircularString|0|KO-BKO +circularstringzm4326|4326|CompoundCurve|0|KO-BKO +circularstringzm4326|4326|CurvePolygon|0|KO-BKO +circularstringzm4326|4326|MultiCurve|0|KO-BKO +circularstringzm4326|4326|MultiSurface|0|KO-BKO +circularstringzm4326|4326|PolyhedralSurface|0|KO-BKO +circularstringzm4326|4326|Triangle|0|KO-BKO +circularstringzm4326|4326|Tin|0|KO-BKO +circularstringzm4326|4326|Point|2|KO-BKO +circularstringzm4326|4326|LineString|2|KO-BKO +circularstringzm4326|4326|Polygon|2|KO-BKO +circularstringzm4326|4326|MultiPoint|2|KO-BKO +circularstringzm4326|4326|MultiLineString|2|KO-BKO +circularstringzm4326|4326|MultiPolygon|2|KO-BKO +circularstringzm4326|4326|GeometryCollection|2|KO-BKO +circularstringzm4326|4326|CircularString|2|KO-BKO +circularstringzm4326|4326|CompoundCurve|2|KO-BKO +circularstringzm4326|4326|CurvePolygon|2|KO-BKO +circularstringzm4326|4326|MultiCurve|2|KO-BKO +circularstringzm4326|4326|MultiSurface|2|KO-BKO +circularstringzm4326|4326|PolyhedralSurface|2|KO-BKO +circularstringzm4326|4326|Triangle|2|KO-BKO +circularstringzm4326|4326|Point|1|KO-BKO +circularstringzm4326|4326|LineString|1|KO-BKO +circularstringzm4326|4326|Polygon|1|KO-BKO +circularstringzm4326|4326|MultiPoint|1|KO-BKO +circularstringzm4326|4326|MultiLineString|1|KO-BKO +circularstringzm4326|4326|MultiPolygon|1|KO-BKO +circularstringzm4326|4326|GeometryCollection|1|KO-BKO +circularstringzm4326|4326|CircularString|1|KO-BKO +circularstringzm4326|4326|CompoundCurve|1|KO-BKO +circularstringzm4326|4326|CurvePolygon|1|KO-BKO +circularstringzm4326|4326|MultiCurve|1|KO-BKO +circularstringzm4326|4326|MultiSurface|1|KO-BKO +circularstringzm4326|4326|PolyhedralSurface|1|KO-BKO +circularstringzm4326|4326|Triangle|1|KO-BKO +circularstringzm4326|4326|Point|3|KO-BKO +circularstringzm4326|4326|LineString|3|KO-BKO +circularstringzm4326|4326|Polygon|3|KO-BKO +circularstringzm4326|4326|MultiPoint|3|KO-BKO +circularstringzm4326|4326|MultiLineString|3|KO-BKO +circularstringzm4326|4326|MultiPolygon|3|KO-BKO +circularstringzm4326|4326|GeometryCollection|3|KO-BKO +circularstringzm4326|4326|CircularString|3|OK-BOK +circularstringzm4326|4326|CompoundCurve|3|KO-BKO +circularstringzm4326|4326|CurvePolygon|3|KO-BKO +circularstringzm4326|4326|MultiCurve|3|KO-BKO +circularstringzm4326|4326|MultiSurface|3|KO-BKO +circularstringzm4326|4326|PolyhedralSurface|3|KO-BKO +circularstringzm4326|4326|Triangle|3|KO-BKO +circularstringzm4326||COUNT|2| +compoundcurve|0|Point|0|KO-BKO +compoundcurve|0|LineString|0|KO-BKO +compoundcurve|0|Polygon|0|KO-BKO +compoundcurve|0|MultiPoint|0|KO-BKO +compoundcurve|0|MultiLineString|0|KO-BKO +compoundcurve|0|MultiPolygon|0|KO-BKO +compoundcurve|0|GeometryCollection|0|KO-BKO +compoundcurve|0|CircularString|0|KO-BKO +compoundcurve|0|CompoundCurve|0|OK-BOK +compoundcurve|0|CurvePolygon|0|KO-BKO +compoundcurve|0|MultiCurve|0|KO-BKO +compoundcurve|0|MultiSurface|0|KO-BKO +compoundcurve|0|PolyhedralSurface|0|KO-BKO +compoundcurve|0|Triangle|0|KO-BKO +compoundcurve|0|Tin|0|KO-BKO +compoundcurve|0|Point|2|KO-BKO +compoundcurve|0|LineString|2|KO-BKO +compoundcurve|0|Polygon|2|KO-BKO +compoundcurve|0|MultiPoint|2|KO-BKO +compoundcurve|0|MultiLineString|2|KO-BKO +compoundcurve|0|MultiPolygon|2|KO-BKO +compoundcurve|0|GeometryCollection|2|KO-BKO +compoundcurve|0|CircularString|2|KO-BKO +compoundcurve|0|CompoundCurve|2|KO-BKO +compoundcurve|0|CurvePolygon|2|KO-BKO +compoundcurve|0|MultiCurve|2|KO-BKO +compoundcurve|0|MultiSurface|2|KO-BKO +compoundcurve|0|PolyhedralSurface|2|KO-BKO +compoundcurve|0|Triangle|2|KO-BKO +compoundcurve|0|Point|1|KO-BKO +compoundcurve|0|LineString|1|KO-BKO +compoundcurve|0|Polygon|1|KO-BKO +compoundcurve|0|MultiPoint|1|KO-BKO +compoundcurve|0|MultiLineString|1|KO-BKO +compoundcurve|0|MultiPolygon|1|KO-BKO +compoundcurve|0|GeometryCollection|1|KO-BKO +compoundcurve|0|CircularString|1|KO-BKO +compoundcurve|0|CompoundCurve|1|KO-BKO +compoundcurve|0|CurvePolygon|1|KO-BKO +compoundcurve|0|MultiCurve|1|KO-BKO +compoundcurve|0|MultiSurface|1|KO-BKO +compoundcurve|0|PolyhedralSurface|1|KO-BKO +compoundcurve|0|Triangle|1|KO-BKO +compoundcurve|0|Point|3|KO-BKO +compoundcurve|0|LineString|3|KO-BKO +compoundcurve|0|Polygon|3|KO-BKO +compoundcurve|0|MultiPoint|3|KO-BKO +compoundcurve|0|MultiLineString|3|KO-BKO +compoundcurve|0|MultiPolygon|3|KO-BKO +compoundcurve|0|GeometryCollection|3|KO-BKO +compoundcurve|0|CircularString|3|KO-BKO +compoundcurve|0|CompoundCurve|3|KO-BKO +compoundcurve|0|CurvePolygon|3|KO-BKO +compoundcurve|0|MultiCurve|3|KO-BKO +compoundcurve|0|MultiSurface|3|KO-BKO +compoundcurve|0|PolyhedralSurface|3|KO-BKO +compoundcurve|0|Triangle|3|KO-BKO +compoundcurve|4326|Point|0|KO-BKO +compoundcurve|4326|LineString|0|KO-BKO +compoundcurve|4326|Polygon|0|KO-BKO +compoundcurve|4326|MultiPoint|0|KO-BKO +compoundcurve|4326|MultiLineString|0|KO-BKO +compoundcurve|4326|MultiPolygon|0|KO-BKO +compoundcurve|4326|GeometryCollection|0|KO-BKO +compoundcurve|4326|CircularString|0|KO-BKO +compoundcurve|4326|CompoundCurve|0|OK-BOK +compoundcurve|4326|CurvePolygon|0|KO-BKO +compoundcurve|4326|MultiCurve|0|KO-BKO +compoundcurve|4326|MultiSurface|0|KO-BKO +compoundcurve|4326|PolyhedralSurface|0|KO-BKO +compoundcurve|4326|Triangle|0|KO-BKO +compoundcurve|4326|Tin|0|KO-BKO +compoundcurve|4326|Point|2|KO-BKO +compoundcurve|4326|LineString|2|KO-BKO +compoundcurve|4326|Polygon|2|KO-BKO +compoundcurve|4326|MultiPoint|2|KO-BKO +compoundcurve|4326|MultiLineString|2|KO-BKO +compoundcurve|4326|MultiPolygon|2|KO-BKO +compoundcurve|4326|GeometryCollection|2|KO-BKO +compoundcurve|4326|CircularString|2|KO-BKO +compoundcurve|4326|CompoundCurve|2|KO-BKO +compoundcurve|4326|CurvePolygon|2|KO-BKO +compoundcurve|4326|MultiCurve|2|KO-BKO +compoundcurve|4326|MultiSurface|2|KO-BKO +compoundcurve|4326|PolyhedralSurface|2|KO-BKO +compoundcurve|4326|Triangle|2|KO-BKO +compoundcurve|4326|Point|1|KO-BKO +compoundcurve|4326|LineString|1|KO-BKO +compoundcurve|4326|Polygon|1|KO-BKO +compoundcurve|4326|MultiPoint|1|KO-BKO +compoundcurve|4326|MultiLineString|1|KO-BKO +compoundcurve|4326|MultiPolygon|1|KO-BKO +compoundcurve|4326|GeometryCollection|1|KO-BKO +compoundcurve|4326|CircularString|1|KO-BKO +compoundcurve|4326|CompoundCurve|1|KO-BKO +compoundcurve|4326|CurvePolygon|1|KO-BKO +compoundcurve|4326|MultiCurve|1|KO-BKO +compoundcurve|4326|MultiSurface|1|KO-BKO +compoundcurve|4326|PolyhedralSurface|1|KO-BKO +compoundcurve|4326|Triangle|1|KO-BKO +compoundcurve|4326|Point|3|KO-BKO +compoundcurve|4326|LineString|3|KO-BKO +compoundcurve|4326|Polygon|3|KO-BKO +compoundcurve|4326|MultiPoint|3|KO-BKO +compoundcurve|4326|MultiLineString|3|KO-BKO +compoundcurve|4326|MultiPolygon|3|KO-BKO +compoundcurve|4326|GeometryCollection|3|KO-BKO +compoundcurve|4326|CircularString|3|KO-BKO +compoundcurve|4326|CompoundCurve|3|KO-BKO +compoundcurve|4326|CurvePolygon|3|KO-BKO +compoundcurve|4326|MultiCurve|3|KO-BKO +compoundcurve|4326|MultiSurface|3|KO-BKO +compoundcurve|4326|PolyhedralSurface|3|KO-BKO +compoundcurve|4326|Triangle|3|KO-BKO +compoundcurve||COUNT|4| +compoundcurve0|0|Point|0|KO-BKO +compoundcurve0|0|LineString|0|KO-BKO +compoundcurve0|0|Polygon|0|KO-BKO +compoundcurve0|0|MultiPoint|0|KO-BKO +compoundcurve0|0|MultiLineString|0|KO-BKO +compoundcurve0|0|MultiPolygon|0|KO-BKO +compoundcurve0|0|GeometryCollection|0|KO-BKO +compoundcurve0|0|CircularString|0|KO-BKO +compoundcurve0|0|CompoundCurve|0|OK-BOK +compoundcurve0|0|CurvePolygon|0|KO-BKO +compoundcurve0|0|MultiCurve|0|KO-BKO +compoundcurve0|0|MultiSurface|0|KO-BKO +compoundcurve0|0|PolyhedralSurface|0|KO-BKO +compoundcurve0|0|Triangle|0|KO-BKO +compoundcurve0|0|Tin|0|KO-BKO +compoundcurve0|0|Point|2|KO-BKO +compoundcurve0|0|LineString|2|KO-BKO +compoundcurve0|0|Polygon|2|KO-BKO +compoundcurve0|0|MultiPoint|2|KO-BKO +compoundcurve0|0|MultiLineString|2|KO-BKO +compoundcurve0|0|MultiPolygon|2|KO-BKO +compoundcurve0|0|GeometryCollection|2|KO-BKO +compoundcurve0|0|CircularString|2|KO-BKO +compoundcurve0|0|CompoundCurve|2|KO-BKO +compoundcurve0|0|CurvePolygon|2|KO-BKO +compoundcurve0|0|MultiCurve|2|KO-BKO +compoundcurve0|0|MultiSurface|2|KO-BKO +compoundcurve0|0|PolyhedralSurface|2|KO-BKO +compoundcurve0|0|Triangle|2|KO-BKO +compoundcurve0|0|Point|1|KO-BKO +compoundcurve0|0|LineString|1|KO-BKO +compoundcurve0|0|Polygon|1|KO-BKO +compoundcurve0|0|MultiPoint|1|KO-BKO +compoundcurve0|0|MultiLineString|1|KO-BKO +compoundcurve0|0|MultiPolygon|1|KO-BKO +compoundcurve0|0|GeometryCollection|1|KO-BKO +compoundcurve0|0|CircularString|1|KO-BKO +compoundcurve0|0|CompoundCurve|1|KO-BKO +compoundcurve0|0|CurvePolygon|1|KO-BKO +compoundcurve0|0|MultiCurve|1|KO-BKO +compoundcurve0|0|MultiSurface|1|KO-BKO +compoundcurve0|0|PolyhedralSurface|1|KO-BKO +compoundcurve0|0|Triangle|1|KO-BKO +compoundcurve0|0|Point|3|KO-BKO +compoundcurve0|0|LineString|3|KO-BKO +compoundcurve0|0|Polygon|3|KO-BKO +compoundcurve0|0|MultiPoint|3|KO-BKO +compoundcurve0|0|MultiLineString|3|KO-BKO +compoundcurve0|0|MultiPolygon|3|KO-BKO +compoundcurve0|0|GeometryCollection|3|KO-BKO +compoundcurve0|0|CircularString|3|KO-BKO +compoundcurve0|0|CompoundCurve|3|KO-BKO +compoundcurve0|0|CurvePolygon|3|KO-BKO +compoundcurve0|0|MultiCurve|3|KO-BKO +compoundcurve0|0|MultiSurface|3|KO-BKO +compoundcurve0|0|PolyhedralSurface|3|KO-BKO +compoundcurve0|0|Triangle|3|KO-BKO +compoundcurve0|4326|Point|0|KO-BKO +compoundcurve0|4326|LineString|0|KO-BKO +compoundcurve0|4326|Polygon|0|KO-BKO +compoundcurve0|4326|MultiPoint|0|KO-BKO +compoundcurve0|4326|MultiLineString|0|KO-BKO +compoundcurve0|4326|MultiPolygon|0|KO-BKO +compoundcurve0|4326|GeometryCollection|0|KO-BKO +compoundcurve0|4326|CircularString|0|KO-BKO +compoundcurve0|4326|CompoundCurve|0|OK-BOK +compoundcurve0|4326|CurvePolygon|0|KO-BKO +compoundcurve0|4326|MultiCurve|0|KO-BKO +compoundcurve0|4326|MultiSurface|0|KO-BKO +compoundcurve0|4326|PolyhedralSurface|0|KO-BKO +compoundcurve0|4326|Triangle|0|KO-BKO +compoundcurve0|4326|Tin|0|KO-BKO +compoundcurve0|4326|Point|2|KO-BKO +compoundcurve0|4326|LineString|2|KO-BKO +compoundcurve0|4326|Polygon|2|KO-BKO +compoundcurve0|4326|MultiPoint|2|KO-BKO +compoundcurve0|4326|MultiLineString|2|KO-BKO +compoundcurve0|4326|MultiPolygon|2|KO-BKO +compoundcurve0|4326|GeometryCollection|2|KO-BKO +compoundcurve0|4326|CircularString|2|KO-BKO +compoundcurve0|4326|CompoundCurve|2|KO-BKO +compoundcurve0|4326|CurvePolygon|2|KO-BKO +compoundcurve0|4326|MultiCurve|2|KO-BKO +compoundcurve0|4326|MultiSurface|2|KO-BKO +compoundcurve0|4326|PolyhedralSurface|2|KO-BKO +compoundcurve0|4326|Triangle|2|KO-BKO +compoundcurve0|4326|Point|1|KO-BKO +compoundcurve0|4326|LineString|1|KO-BKO +compoundcurve0|4326|Polygon|1|KO-BKO +compoundcurve0|4326|MultiPoint|1|KO-BKO +compoundcurve0|4326|MultiLineString|1|KO-BKO +compoundcurve0|4326|MultiPolygon|1|KO-BKO +compoundcurve0|4326|GeometryCollection|1|KO-BKO +compoundcurve0|4326|CircularString|1|KO-BKO +compoundcurve0|4326|CompoundCurve|1|KO-BKO +compoundcurve0|4326|CurvePolygon|1|KO-BKO +compoundcurve0|4326|MultiCurve|1|KO-BKO +compoundcurve0|4326|MultiSurface|1|KO-BKO +compoundcurve0|4326|PolyhedralSurface|1|KO-BKO +compoundcurve0|4326|Triangle|1|KO-BKO +compoundcurve0|4326|Point|3|KO-BKO +compoundcurve0|4326|LineString|3|KO-BKO +compoundcurve0|4326|Polygon|3|KO-BKO +compoundcurve0|4326|MultiPoint|3|KO-BKO +compoundcurve0|4326|MultiLineString|3|KO-BKO +compoundcurve0|4326|MultiPolygon|3|KO-BKO +compoundcurve0|4326|GeometryCollection|3|KO-BKO +compoundcurve0|4326|CircularString|3|KO-BKO +compoundcurve0|4326|CompoundCurve|3|KO-BKO +compoundcurve0|4326|CurvePolygon|3|KO-BKO +compoundcurve0|4326|MultiCurve|3|KO-BKO +compoundcurve0|4326|MultiSurface|3|KO-BKO +compoundcurve0|4326|PolyhedralSurface|3|KO-BKO +compoundcurve0|4326|Triangle|3|KO-BKO +compoundcurve0||COUNT|4| +compoundcurve4326|0|Point|0|KO-BKO +compoundcurve4326|0|LineString|0|KO-BKO +compoundcurve4326|0|Polygon|0|KO-BKO +compoundcurve4326|0|MultiPoint|0|KO-BKO +compoundcurve4326|0|MultiLineString|0|KO-BKO +compoundcurve4326|0|MultiPolygon|0|KO-BKO +compoundcurve4326|0|GeometryCollection|0|KO-BKO +compoundcurve4326|0|CircularString|0|KO-BKO +compoundcurve4326|0|CompoundCurve|0|KO-BKO +compoundcurve4326|0|CurvePolygon|0|KO-BKO +compoundcurve4326|0|MultiCurve|0|KO-BKO +compoundcurve4326|0|MultiSurface|0|KO-BKO +compoundcurve4326|0|PolyhedralSurface|0|KO-BKO +compoundcurve4326|0|Triangle|0|KO-BKO +compoundcurve4326|0|Tin|0|KO-BKO +compoundcurve4326|0|Point|2|KO-BKO +compoundcurve4326|0|LineString|2|KO-BKO +compoundcurve4326|0|Polygon|2|KO-BKO +compoundcurve4326|0|MultiPoint|2|KO-BKO +compoundcurve4326|0|MultiLineString|2|KO-BKO +compoundcurve4326|0|MultiPolygon|2|KO-BKO +compoundcurve4326|0|GeometryCollection|2|KO-BKO +compoundcurve4326|0|CircularString|2|KO-BKO +compoundcurve4326|0|CompoundCurve|2|KO-BKO +compoundcurve4326|0|CurvePolygon|2|KO-BKO +compoundcurve4326|0|MultiCurve|2|KO-BKO +compoundcurve4326|0|MultiSurface|2|KO-BKO +compoundcurve4326|0|PolyhedralSurface|2|KO-BKO +compoundcurve4326|0|Triangle|2|KO-BKO +compoundcurve4326|0|Point|1|KO-BKO +compoundcurve4326|0|LineString|1|KO-BKO +compoundcurve4326|0|Polygon|1|KO-BKO +compoundcurve4326|0|MultiPoint|1|KO-BKO +compoundcurve4326|0|MultiLineString|1|KO-BKO +compoundcurve4326|0|MultiPolygon|1|KO-BKO +compoundcurve4326|0|GeometryCollection|1|KO-BKO +compoundcurve4326|0|CircularString|1|KO-BKO +compoundcurve4326|0|CompoundCurve|1|KO-BKO +compoundcurve4326|0|CurvePolygon|1|KO-BKO +compoundcurve4326|0|MultiCurve|1|KO-BKO +compoundcurve4326|0|MultiSurface|1|KO-BKO +compoundcurve4326|0|PolyhedralSurface|1|KO-BKO +compoundcurve4326|0|Triangle|1|KO-BKO +compoundcurve4326|0|Point|3|KO-BKO +compoundcurve4326|0|LineString|3|KO-BKO +compoundcurve4326|0|Polygon|3|KO-BKO +compoundcurve4326|0|MultiPoint|3|KO-BKO +compoundcurve4326|0|MultiLineString|3|KO-BKO +compoundcurve4326|0|MultiPolygon|3|KO-BKO +compoundcurve4326|0|GeometryCollection|3|KO-BKO +compoundcurve4326|0|CircularString|3|KO-BKO +compoundcurve4326|0|CompoundCurve|3|KO-BKO +compoundcurve4326|0|CurvePolygon|3|KO-BKO +compoundcurve4326|0|MultiCurve|3|KO-BKO +compoundcurve4326|0|MultiSurface|3|KO-BKO +compoundcurve4326|0|PolyhedralSurface|3|KO-BKO +compoundcurve4326|0|Triangle|3|KO-BKO +compoundcurve4326|4326|Point|0|KO-BKO +compoundcurve4326|4326|LineString|0|KO-BKO +compoundcurve4326|4326|Polygon|0|KO-BKO +compoundcurve4326|4326|MultiPoint|0|KO-BKO +compoundcurve4326|4326|MultiLineString|0|KO-BKO +compoundcurve4326|4326|MultiPolygon|0|KO-BKO +compoundcurve4326|4326|GeometryCollection|0|KO-BKO +compoundcurve4326|4326|CircularString|0|KO-BKO +compoundcurve4326|4326|CompoundCurve|0|OK-BOK +compoundcurve4326|4326|CurvePolygon|0|KO-BKO +compoundcurve4326|4326|MultiCurve|0|KO-BKO +compoundcurve4326|4326|MultiSurface|0|KO-BKO +compoundcurve4326|4326|PolyhedralSurface|0|KO-BKO +compoundcurve4326|4326|Triangle|0|KO-BKO +compoundcurve4326|4326|Tin|0|KO-BKO +compoundcurve4326|4326|Point|2|KO-BKO +compoundcurve4326|4326|LineString|2|KO-BKO +compoundcurve4326|4326|Polygon|2|KO-BKO +compoundcurve4326|4326|MultiPoint|2|KO-BKO +compoundcurve4326|4326|MultiLineString|2|KO-BKO +compoundcurve4326|4326|MultiPolygon|2|KO-BKO +compoundcurve4326|4326|GeometryCollection|2|KO-BKO +compoundcurve4326|4326|CircularString|2|KO-BKO +compoundcurve4326|4326|CompoundCurve|2|KO-BKO +compoundcurve4326|4326|CurvePolygon|2|KO-BKO +compoundcurve4326|4326|MultiCurve|2|KO-BKO +compoundcurve4326|4326|MultiSurface|2|KO-BKO +compoundcurve4326|4326|PolyhedralSurface|2|KO-BKO +compoundcurve4326|4326|Triangle|2|KO-BKO +compoundcurve4326|4326|Point|1|KO-BKO +compoundcurve4326|4326|LineString|1|KO-BKO +compoundcurve4326|4326|Polygon|1|KO-BKO +compoundcurve4326|4326|MultiPoint|1|KO-BKO +compoundcurve4326|4326|MultiLineString|1|KO-BKO +compoundcurve4326|4326|MultiPolygon|1|KO-BKO +compoundcurve4326|4326|GeometryCollection|1|KO-BKO +compoundcurve4326|4326|CircularString|1|KO-BKO +compoundcurve4326|4326|CompoundCurve|1|KO-BKO +compoundcurve4326|4326|CurvePolygon|1|KO-BKO +compoundcurve4326|4326|MultiCurve|1|KO-BKO +compoundcurve4326|4326|MultiSurface|1|KO-BKO +compoundcurve4326|4326|PolyhedralSurface|1|KO-BKO +compoundcurve4326|4326|Triangle|1|KO-BKO +compoundcurve4326|4326|Point|3|KO-BKO +compoundcurve4326|4326|LineString|3|KO-BKO +compoundcurve4326|4326|Polygon|3|KO-BKO +compoundcurve4326|4326|MultiPoint|3|KO-BKO +compoundcurve4326|4326|MultiLineString|3|KO-BKO +compoundcurve4326|4326|MultiPolygon|3|KO-BKO +compoundcurve4326|4326|GeometryCollection|3|KO-BKO +compoundcurve4326|4326|CircularString|3|KO-BKO +compoundcurve4326|4326|CompoundCurve|3|KO-BKO +compoundcurve4326|4326|CurvePolygon|3|KO-BKO +compoundcurve4326|4326|MultiCurve|3|KO-BKO +compoundcurve4326|4326|MultiSurface|3|KO-BKO +compoundcurve4326|4326|PolyhedralSurface|3|KO-BKO +compoundcurve4326|4326|Triangle|3|KO-BKO +compoundcurve4326||COUNT|2| +compoundcurvem|0|Point|0|KO-BKO +compoundcurvem|0|LineString|0|KO-BKO +compoundcurvem|0|Polygon|0|KO-BKO +compoundcurvem|0|MultiPoint|0|KO-BKO +compoundcurvem|0|MultiLineString|0|KO-BKO +compoundcurvem|0|MultiPolygon|0|KO-BKO +compoundcurvem|0|GeometryCollection|0|KO-BKO +compoundcurvem|0|CircularString|0|KO-BKO +compoundcurvem|0|CompoundCurve|0|KO-BKO +compoundcurvem|0|CurvePolygon|0|KO-BKO +compoundcurvem|0|MultiCurve|0|KO-BKO +compoundcurvem|0|MultiSurface|0|KO-BKO +compoundcurvem|0|PolyhedralSurface|0|KO-BKO +compoundcurvem|0|Triangle|0|KO-BKO +compoundcurvem|0|Tin|0|KO-BKO +compoundcurvem|0|Point|2|KO-BKO +compoundcurvem|0|LineString|2|KO-BKO +compoundcurvem|0|Polygon|2|KO-BKO +compoundcurvem|0|MultiPoint|2|KO-BKO +compoundcurvem|0|MultiLineString|2|KO-BKO +compoundcurvem|0|MultiPolygon|2|KO-BKO +compoundcurvem|0|GeometryCollection|2|KO-BKO +compoundcurvem|0|CircularString|2|KO-BKO +compoundcurvem|0|CompoundCurve|2|KO-BKO +compoundcurvem|0|CurvePolygon|2|KO-BKO +compoundcurvem|0|MultiCurve|2|KO-BKO +compoundcurvem|0|MultiSurface|2|KO-BKO +compoundcurvem|0|PolyhedralSurface|2|KO-BKO +compoundcurvem|0|Triangle|2|KO-BKO +compoundcurvem|0|Point|1|KO-BKO +compoundcurvem|0|LineString|1|KO-BKO +compoundcurvem|0|Polygon|1|KO-BKO +compoundcurvem|0|MultiPoint|1|KO-BKO +compoundcurvem|0|MultiLineString|1|KO-BKO +compoundcurvem|0|MultiPolygon|1|KO-BKO +compoundcurvem|0|GeometryCollection|1|KO-BKO +compoundcurvem|0|CircularString|1|KO-BKO +compoundcurvem|0|CompoundCurve|1|OK-BOK +compoundcurvem|0|CurvePolygon|1|KO-BKO +compoundcurvem|0|MultiCurve|1|KO-BKO +compoundcurvem|0|MultiSurface|1|KO-BKO +compoundcurvem|0|PolyhedralSurface|1|KO-BKO +compoundcurvem|0|Triangle|1|KO-BKO +compoundcurvem|0|Point|3|KO-BKO +compoundcurvem|0|LineString|3|KO-BKO +compoundcurvem|0|Polygon|3|KO-BKO +compoundcurvem|0|MultiPoint|3|KO-BKO +compoundcurvem|0|MultiLineString|3|KO-BKO +compoundcurvem|0|MultiPolygon|3|KO-BKO +compoundcurvem|0|GeometryCollection|3|KO-BKO +compoundcurvem|0|CircularString|3|KO-BKO +compoundcurvem|0|CompoundCurve|3|KO-BKO +compoundcurvem|0|CurvePolygon|3|KO-BKO +compoundcurvem|0|MultiCurve|3|KO-BKO +compoundcurvem|0|MultiSurface|3|KO-BKO +compoundcurvem|0|PolyhedralSurface|3|KO-BKO +compoundcurvem|0|Triangle|3|KO-BKO +compoundcurvem|4326|Point|0|KO-BKO +compoundcurvem|4326|LineString|0|KO-BKO +compoundcurvem|4326|Polygon|0|KO-BKO +compoundcurvem|4326|MultiPoint|0|KO-BKO +compoundcurvem|4326|MultiLineString|0|KO-BKO +compoundcurvem|4326|MultiPolygon|0|KO-BKO +compoundcurvem|4326|GeometryCollection|0|KO-BKO +compoundcurvem|4326|CircularString|0|KO-BKO +compoundcurvem|4326|CompoundCurve|0|KO-BKO +compoundcurvem|4326|CurvePolygon|0|KO-BKO +compoundcurvem|4326|MultiCurve|0|KO-BKO +compoundcurvem|4326|MultiSurface|0|KO-BKO +compoundcurvem|4326|PolyhedralSurface|0|KO-BKO +compoundcurvem|4326|Triangle|0|KO-BKO +compoundcurvem|4326|Tin|0|KO-BKO +compoundcurvem|4326|Point|2|KO-BKO +compoundcurvem|4326|LineString|2|KO-BKO +compoundcurvem|4326|Polygon|2|KO-BKO +compoundcurvem|4326|MultiPoint|2|KO-BKO +compoundcurvem|4326|MultiLineString|2|KO-BKO +compoundcurvem|4326|MultiPolygon|2|KO-BKO +compoundcurvem|4326|GeometryCollection|2|KO-BKO +compoundcurvem|4326|CircularString|2|KO-BKO +compoundcurvem|4326|CompoundCurve|2|KO-BKO +compoundcurvem|4326|CurvePolygon|2|KO-BKO +compoundcurvem|4326|MultiCurve|2|KO-BKO +compoundcurvem|4326|MultiSurface|2|KO-BKO +compoundcurvem|4326|PolyhedralSurface|2|KO-BKO +compoundcurvem|4326|Triangle|2|KO-BKO +compoundcurvem|4326|Point|1|KO-BKO +compoundcurvem|4326|LineString|1|KO-BKO +compoundcurvem|4326|Polygon|1|KO-BKO +compoundcurvem|4326|MultiPoint|1|KO-BKO +compoundcurvem|4326|MultiLineString|1|KO-BKO +compoundcurvem|4326|MultiPolygon|1|KO-BKO +compoundcurvem|4326|GeometryCollection|1|KO-BKO +compoundcurvem|4326|CircularString|1|KO-BKO +compoundcurvem|4326|CompoundCurve|1|OK-BOK +compoundcurvem|4326|CurvePolygon|1|KO-BKO +compoundcurvem|4326|MultiCurve|1|KO-BKO +compoundcurvem|4326|MultiSurface|1|KO-BKO +compoundcurvem|4326|PolyhedralSurface|1|KO-BKO +compoundcurvem|4326|Triangle|1|KO-BKO +compoundcurvem|4326|Point|3|KO-BKO +compoundcurvem|4326|LineString|3|KO-BKO +compoundcurvem|4326|Polygon|3|KO-BKO +compoundcurvem|4326|MultiPoint|3|KO-BKO +compoundcurvem|4326|MultiLineString|3|KO-BKO +compoundcurvem|4326|MultiPolygon|3|KO-BKO +compoundcurvem|4326|GeometryCollection|3|KO-BKO +compoundcurvem|4326|CircularString|3|KO-BKO +compoundcurvem|4326|CompoundCurve|3|KO-BKO +compoundcurvem|4326|CurvePolygon|3|KO-BKO +compoundcurvem|4326|MultiCurve|3|KO-BKO +compoundcurvem|4326|MultiSurface|3|KO-BKO +compoundcurvem|4326|PolyhedralSurface|3|KO-BKO +compoundcurvem|4326|Triangle|3|KO-BKO +compoundcurvem||COUNT|4| +compoundcurvem0|0|Point|0|KO-BKO +compoundcurvem0|0|LineString|0|KO-BKO +compoundcurvem0|0|Polygon|0|KO-BKO +compoundcurvem0|0|MultiPoint|0|KO-BKO +compoundcurvem0|0|MultiLineString|0|KO-BKO +compoundcurvem0|0|MultiPolygon|0|KO-BKO +compoundcurvem0|0|GeometryCollection|0|KO-BKO +compoundcurvem0|0|CircularString|0|KO-BKO +compoundcurvem0|0|CompoundCurve|0|KO-BKO +compoundcurvem0|0|CurvePolygon|0|KO-BKO +compoundcurvem0|0|MultiCurve|0|KO-BKO +compoundcurvem0|0|MultiSurface|0|KO-BKO +compoundcurvem0|0|PolyhedralSurface|0|KO-BKO +compoundcurvem0|0|Triangle|0|KO-BKO +compoundcurvem0|0|Tin|0|KO-BKO +compoundcurvem0|0|Point|2|KO-BKO +compoundcurvem0|0|LineString|2|KO-BKO +compoundcurvem0|0|Polygon|2|KO-BKO +compoundcurvem0|0|MultiPoint|2|KO-BKO +compoundcurvem0|0|MultiLineString|2|KO-BKO +compoundcurvem0|0|MultiPolygon|2|KO-BKO +compoundcurvem0|0|GeometryCollection|2|KO-BKO +compoundcurvem0|0|CircularString|2|KO-BKO +compoundcurvem0|0|CompoundCurve|2|KO-BKO +compoundcurvem0|0|CurvePolygon|2|KO-BKO +compoundcurvem0|0|MultiCurve|2|KO-BKO +compoundcurvem0|0|MultiSurface|2|KO-BKO +compoundcurvem0|0|PolyhedralSurface|2|KO-BKO +compoundcurvem0|0|Triangle|2|KO-BKO +compoundcurvem0|0|Point|1|KO-BKO +compoundcurvem0|0|LineString|1|KO-BKO +compoundcurvem0|0|Polygon|1|KO-BKO +compoundcurvem0|0|MultiPoint|1|KO-BKO +compoundcurvem0|0|MultiLineString|1|KO-BKO +compoundcurvem0|0|MultiPolygon|1|KO-BKO +compoundcurvem0|0|GeometryCollection|1|KO-BKO +compoundcurvem0|0|CircularString|1|KO-BKO +compoundcurvem0|0|CompoundCurve|1|OK-BOK +compoundcurvem0|0|CurvePolygon|1|KO-BKO +compoundcurvem0|0|MultiCurve|1|KO-BKO +compoundcurvem0|0|MultiSurface|1|KO-BKO +compoundcurvem0|0|PolyhedralSurface|1|KO-BKO +compoundcurvem0|0|Triangle|1|KO-BKO +compoundcurvem0|0|Point|3|KO-BKO +compoundcurvem0|0|LineString|3|KO-BKO +compoundcurvem0|0|Polygon|3|KO-BKO +compoundcurvem0|0|MultiPoint|3|KO-BKO +compoundcurvem0|0|MultiLineString|3|KO-BKO +compoundcurvem0|0|MultiPolygon|3|KO-BKO +compoundcurvem0|0|GeometryCollection|3|KO-BKO +compoundcurvem0|0|CircularString|3|KO-BKO +compoundcurvem0|0|CompoundCurve|3|KO-BKO +compoundcurvem0|0|CurvePolygon|3|KO-BKO +compoundcurvem0|0|MultiCurve|3|KO-BKO +compoundcurvem0|0|MultiSurface|3|KO-BKO +compoundcurvem0|0|PolyhedralSurface|3|KO-BKO +compoundcurvem0|0|Triangle|3|KO-BKO +compoundcurvem0|4326|Point|0|KO-BKO +compoundcurvem0|4326|LineString|0|KO-BKO +compoundcurvem0|4326|Polygon|0|KO-BKO +compoundcurvem0|4326|MultiPoint|0|KO-BKO +compoundcurvem0|4326|MultiLineString|0|KO-BKO +compoundcurvem0|4326|MultiPolygon|0|KO-BKO +compoundcurvem0|4326|GeometryCollection|0|KO-BKO +compoundcurvem0|4326|CircularString|0|KO-BKO +compoundcurvem0|4326|CompoundCurve|0|KO-BKO +compoundcurvem0|4326|CurvePolygon|0|KO-BKO +compoundcurvem0|4326|MultiCurve|0|KO-BKO +compoundcurvem0|4326|MultiSurface|0|KO-BKO +compoundcurvem0|4326|PolyhedralSurface|0|KO-BKO +compoundcurvem0|4326|Triangle|0|KO-BKO +compoundcurvem0|4326|Tin|0|KO-BKO +compoundcurvem0|4326|Point|2|KO-BKO +compoundcurvem0|4326|LineString|2|KO-BKO +compoundcurvem0|4326|Polygon|2|KO-BKO +compoundcurvem0|4326|MultiPoint|2|KO-BKO +compoundcurvem0|4326|MultiLineString|2|KO-BKO +compoundcurvem0|4326|MultiPolygon|2|KO-BKO +compoundcurvem0|4326|GeometryCollection|2|KO-BKO +compoundcurvem0|4326|CircularString|2|KO-BKO +compoundcurvem0|4326|CompoundCurve|2|KO-BKO +compoundcurvem0|4326|CurvePolygon|2|KO-BKO +compoundcurvem0|4326|MultiCurve|2|KO-BKO +compoundcurvem0|4326|MultiSurface|2|KO-BKO +compoundcurvem0|4326|PolyhedralSurface|2|KO-BKO +compoundcurvem0|4326|Triangle|2|KO-BKO +compoundcurvem0|4326|Point|1|KO-BKO +compoundcurvem0|4326|LineString|1|KO-BKO +compoundcurvem0|4326|Polygon|1|KO-BKO +compoundcurvem0|4326|MultiPoint|1|KO-BKO +compoundcurvem0|4326|MultiLineString|1|KO-BKO +compoundcurvem0|4326|MultiPolygon|1|KO-BKO +compoundcurvem0|4326|GeometryCollection|1|KO-BKO +compoundcurvem0|4326|CircularString|1|KO-BKO +compoundcurvem0|4326|CompoundCurve|1|OK-BOK +compoundcurvem0|4326|CurvePolygon|1|KO-BKO +compoundcurvem0|4326|MultiCurve|1|KO-BKO +compoundcurvem0|4326|MultiSurface|1|KO-BKO +compoundcurvem0|4326|PolyhedralSurface|1|KO-BKO +compoundcurvem0|4326|Triangle|1|KO-BKO +compoundcurvem0|4326|Point|3|KO-BKO +compoundcurvem0|4326|LineString|3|KO-BKO +compoundcurvem0|4326|Polygon|3|KO-BKO +compoundcurvem0|4326|MultiPoint|3|KO-BKO +compoundcurvem0|4326|MultiLineString|3|KO-BKO +compoundcurvem0|4326|MultiPolygon|3|KO-BKO +compoundcurvem0|4326|GeometryCollection|3|KO-BKO +compoundcurvem0|4326|CircularString|3|KO-BKO +compoundcurvem0|4326|CompoundCurve|3|KO-BKO +compoundcurvem0|4326|CurvePolygon|3|KO-BKO +compoundcurvem0|4326|MultiCurve|3|KO-BKO +compoundcurvem0|4326|MultiSurface|3|KO-BKO +compoundcurvem0|4326|PolyhedralSurface|3|KO-BKO +compoundcurvem0|4326|Triangle|3|KO-BKO +compoundcurvem0||COUNT|4| +compoundcurvem4326|0|Point|0|KO-BKO +compoundcurvem4326|0|LineString|0|KO-BKO +compoundcurvem4326|0|Polygon|0|KO-BKO +compoundcurvem4326|0|MultiPoint|0|KO-BKO +compoundcurvem4326|0|MultiLineString|0|KO-BKO +compoundcurvem4326|0|MultiPolygon|0|KO-BKO +compoundcurvem4326|0|GeometryCollection|0|KO-BKO +compoundcurvem4326|0|CircularString|0|KO-BKO +compoundcurvem4326|0|CompoundCurve|0|KO-BKO +compoundcurvem4326|0|CurvePolygon|0|KO-BKO +compoundcurvem4326|0|MultiCurve|0|KO-BKO +compoundcurvem4326|0|MultiSurface|0|KO-BKO +compoundcurvem4326|0|PolyhedralSurface|0|KO-BKO +compoundcurvem4326|0|Triangle|0|KO-BKO +compoundcurvem4326|0|Tin|0|KO-BKO +compoundcurvem4326|0|Point|2|KO-BKO +compoundcurvem4326|0|LineString|2|KO-BKO +compoundcurvem4326|0|Polygon|2|KO-BKO +compoundcurvem4326|0|MultiPoint|2|KO-BKO +compoundcurvem4326|0|MultiLineString|2|KO-BKO +compoundcurvem4326|0|MultiPolygon|2|KO-BKO +compoundcurvem4326|0|GeometryCollection|2|KO-BKO +compoundcurvem4326|0|CircularString|2|KO-BKO +compoundcurvem4326|0|CompoundCurve|2|KO-BKO +compoundcurvem4326|0|CurvePolygon|2|KO-BKO +compoundcurvem4326|0|MultiCurve|2|KO-BKO +compoundcurvem4326|0|MultiSurface|2|KO-BKO +compoundcurvem4326|0|PolyhedralSurface|2|KO-BKO +compoundcurvem4326|0|Triangle|2|KO-BKO +compoundcurvem4326|0|Point|1|KO-BKO +compoundcurvem4326|0|LineString|1|KO-BKO +compoundcurvem4326|0|Polygon|1|KO-BKO +compoundcurvem4326|0|MultiPoint|1|KO-BKO +compoundcurvem4326|0|MultiLineString|1|KO-BKO +compoundcurvem4326|0|MultiPolygon|1|KO-BKO +compoundcurvem4326|0|GeometryCollection|1|KO-BKO +compoundcurvem4326|0|CircularString|1|KO-BKO +compoundcurvem4326|0|CompoundCurve|1|KO-BKO +compoundcurvem4326|0|CurvePolygon|1|KO-BKO +compoundcurvem4326|0|MultiCurve|1|KO-BKO +compoundcurvem4326|0|MultiSurface|1|KO-BKO +compoundcurvem4326|0|PolyhedralSurface|1|KO-BKO +compoundcurvem4326|0|Triangle|1|KO-BKO +compoundcurvem4326|0|Point|3|KO-BKO +compoundcurvem4326|0|LineString|3|KO-BKO +compoundcurvem4326|0|Polygon|3|KO-BKO +compoundcurvem4326|0|MultiPoint|3|KO-BKO +compoundcurvem4326|0|MultiLineString|3|KO-BKO +compoundcurvem4326|0|MultiPolygon|3|KO-BKO +compoundcurvem4326|0|GeometryCollection|3|KO-BKO +compoundcurvem4326|0|CircularString|3|KO-BKO +compoundcurvem4326|0|CompoundCurve|3|KO-BKO +compoundcurvem4326|0|CurvePolygon|3|KO-BKO +compoundcurvem4326|0|MultiCurve|3|KO-BKO +compoundcurvem4326|0|MultiSurface|3|KO-BKO +compoundcurvem4326|0|PolyhedralSurface|3|KO-BKO +compoundcurvem4326|0|Triangle|3|KO-BKO +compoundcurvem4326|4326|Point|0|KO-BKO +compoundcurvem4326|4326|LineString|0|KO-BKO +compoundcurvem4326|4326|Polygon|0|KO-BKO +compoundcurvem4326|4326|MultiPoint|0|KO-BKO +compoundcurvem4326|4326|MultiLineString|0|KO-BKO +compoundcurvem4326|4326|MultiPolygon|0|KO-BKO +compoundcurvem4326|4326|GeometryCollection|0|KO-BKO +compoundcurvem4326|4326|CircularString|0|KO-BKO +compoundcurvem4326|4326|CompoundCurve|0|KO-BKO +compoundcurvem4326|4326|CurvePolygon|0|KO-BKO +compoundcurvem4326|4326|MultiCurve|0|KO-BKO +compoundcurvem4326|4326|MultiSurface|0|KO-BKO +compoundcurvem4326|4326|PolyhedralSurface|0|KO-BKO +compoundcurvem4326|4326|Triangle|0|KO-BKO +compoundcurvem4326|4326|Tin|0|KO-BKO +compoundcurvem4326|4326|Point|2|KO-BKO +compoundcurvem4326|4326|LineString|2|KO-BKO +compoundcurvem4326|4326|Polygon|2|KO-BKO +compoundcurvem4326|4326|MultiPoint|2|KO-BKO +compoundcurvem4326|4326|MultiLineString|2|KO-BKO +compoundcurvem4326|4326|MultiPolygon|2|KO-BKO +compoundcurvem4326|4326|GeometryCollection|2|KO-BKO +compoundcurvem4326|4326|CircularString|2|KO-BKO +compoundcurvem4326|4326|CompoundCurve|2|KO-BKO +compoundcurvem4326|4326|CurvePolygon|2|KO-BKO +compoundcurvem4326|4326|MultiCurve|2|KO-BKO +compoundcurvem4326|4326|MultiSurface|2|KO-BKO +compoundcurvem4326|4326|PolyhedralSurface|2|KO-BKO +compoundcurvem4326|4326|Triangle|2|KO-BKO +compoundcurvem4326|4326|Point|1|KO-BKO +compoundcurvem4326|4326|LineString|1|KO-BKO +compoundcurvem4326|4326|Polygon|1|KO-BKO +compoundcurvem4326|4326|MultiPoint|1|KO-BKO +compoundcurvem4326|4326|MultiLineString|1|KO-BKO +compoundcurvem4326|4326|MultiPolygon|1|KO-BKO +compoundcurvem4326|4326|GeometryCollection|1|KO-BKO +compoundcurvem4326|4326|CircularString|1|KO-BKO +compoundcurvem4326|4326|CompoundCurve|1|OK-BOK +compoundcurvem4326|4326|CurvePolygon|1|KO-BKO +compoundcurvem4326|4326|MultiCurve|1|KO-BKO +compoundcurvem4326|4326|MultiSurface|1|KO-BKO +compoundcurvem4326|4326|PolyhedralSurface|1|KO-BKO +compoundcurvem4326|4326|Triangle|1|KO-BKO +compoundcurvem4326|4326|Point|3|KO-BKO +compoundcurvem4326|4326|LineString|3|KO-BKO +compoundcurvem4326|4326|Polygon|3|KO-BKO +compoundcurvem4326|4326|MultiPoint|3|KO-BKO +compoundcurvem4326|4326|MultiLineString|3|KO-BKO +compoundcurvem4326|4326|MultiPolygon|3|KO-BKO +compoundcurvem4326|4326|GeometryCollection|3|KO-BKO +compoundcurvem4326|4326|CircularString|3|KO-BKO +compoundcurvem4326|4326|CompoundCurve|3|KO-BKO +compoundcurvem4326|4326|CurvePolygon|3|KO-BKO +compoundcurvem4326|4326|MultiCurve|3|KO-BKO +compoundcurvem4326|4326|MultiSurface|3|KO-BKO +compoundcurvem4326|4326|PolyhedralSurface|3|KO-BKO +compoundcurvem4326|4326|Triangle|3|KO-BKO +compoundcurvem4326||COUNT|2| +compoundcurvez|0|Point|0|KO-BKO +compoundcurvez|0|LineString|0|KO-BKO +compoundcurvez|0|Polygon|0|KO-BKO +compoundcurvez|0|MultiPoint|0|KO-BKO +compoundcurvez|0|MultiLineString|0|KO-BKO +compoundcurvez|0|MultiPolygon|0|KO-BKO +compoundcurvez|0|GeometryCollection|0|KO-BKO +compoundcurvez|0|CircularString|0|KO-BKO +compoundcurvez|0|CompoundCurve|0|KO-BKO +compoundcurvez|0|CurvePolygon|0|KO-BKO +compoundcurvez|0|MultiCurve|0|KO-BKO +compoundcurvez|0|MultiSurface|0|KO-BKO +compoundcurvez|0|PolyhedralSurface|0|KO-BKO +compoundcurvez|0|Triangle|0|KO-BKO +compoundcurvez|0|Tin|0|KO-BKO +compoundcurvez|0|Point|2|KO-BKO +compoundcurvez|0|LineString|2|KO-BKO +compoundcurvez|0|Polygon|2|KO-BKO +compoundcurvez|0|MultiPoint|2|KO-BKO +compoundcurvez|0|MultiLineString|2|KO-BKO +compoundcurvez|0|MultiPolygon|2|KO-BKO +compoundcurvez|0|GeometryCollection|2|KO-BKO +compoundcurvez|0|CircularString|2|KO-BKO +compoundcurvez|0|CompoundCurve|2|OK-BOK +compoundcurvez|0|CurvePolygon|2|KO-BKO +compoundcurvez|0|MultiCurve|2|KO-BKO +compoundcurvez|0|MultiSurface|2|KO-BKO +compoundcurvez|0|PolyhedralSurface|2|KO-BKO +compoundcurvez|0|Triangle|2|KO-BKO +compoundcurvez|0|Point|1|KO-BKO +compoundcurvez|0|LineString|1|KO-BKO +compoundcurvez|0|Polygon|1|KO-BKO +compoundcurvez|0|MultiPoint|1|KO-BKO +compoundcurvez|0|MultiLineString|1|KO-BKO +compoundcurvez|0|MultiPolygon|1|KO-BKO +compoundcurvez|0|GeometryCollection|1|KO-BKO +compoundcurvez|0|CircularString|1|KO-BKO +compoundcurvez|0|CompoundCurve|1|KO-BKO +compoundcurvez|0|CurvePolygon|1|KO-BKO +compoundcurvez|0|MultiCurve|1|KO-BKO +compoundcurvez|0|MultiSurface|1|KO-BKO +compoundcurvez|0|PolyhedralSurface|1|KO-BKO +compoundcurvez|0|Triangle|1|KO-BKO +compoundcurvez|0|Point|3|KO-BKO +compoundcurvez|0|LineString|3|KO-BKO +compoundcurvez|0|Polygon|3|KO-BKO +compoundcurvez|0|MultiPoint|3|KO-BKO +compoundcurvez|0|MultiLineString|3|KO-BKO +compoundcurvez|0|MultiPolygon|3|KO-BKO +compoundcurvez|0|GeometryCollection|3|KO-BKO +compoundcurvez|0|CircularString|3|KO-BKO +compoundcurvez|0|CompoundCurve|3|KO-BKO +compoundcurvez|0|CurvePolygon|3|KO-BKO +compoundcurvez|0|MultiCurve|3|KO-BKO +compoundcurvez|0|MultiSurface|3|KO-BKO +compoundcurvez|0|PolyhedralSurface|3|KO-BKO +compoundcurvez|0|Triangle|3|KO-BKO +compoundcurvez|4326|Point|0|KO-BKO +compoundcurvez|4326|LineString|0|KO-BKO +compoundcurvez|4326|Polygon|0|KO-BKO +compoundcurvez|4326|MultiPoint|0|KO-BKO +compoundcurvez|4326|MultiLineString|0|KO-BKO +compoundcurvez|4326|MultiPolygon|0|KO-BKO +compoundcurvez|4326|GeometryCollection|0|KO-BKO +compoundcurvez|4326|CircularString|0|KO-BKO +compoundcurvez|4326|CompoundCurve|0|KO-BKO +compoundcurvez|4326|CurvePolygon|0|KO-BKO +compoundcurvez|4326|MultiCurve|0|KO-BKO +compoundcurvez|4326|MultiSurface|0|KO-BKO +compoundcurvez|4326|PolyhedralSurface|0|KO-BKO +compoundcurvez|4326|Triangle|0|KO-BKO +compoundcurvez|4326|Tin|0|KO-BKO +compoundcurvez|4326|Point|2|KO-BKO +compoundcurvez|4326|LineString|2|KO-BKO +compoundcurvez|4326|Polygon|2|KO-BKO +compoundcurvez|4326|MultiPoint|2|KO-BKO +compoundcurvez|4326|MultiLineString|2|KO-BKO +compoundcurvez|4326|MultiPolygon|2|KO-BKO +compoundcurvez|4326|GeometryCollection|2|KO-BKO +compoundcurvez|4326|CircularString|2|KO-BKO +compoundcurvez|4326|CompoundCurve|2|OK-BOK +compoundcurvez|4326|CurvePolygon|2|KO-BKO +compoundcurvez|4326|MultiCurve|2|KO-BKO +compoundcurvez|4326|MultiSurface|2|KO-BKO +compoundcurvez|4326|PolyhedralSurface|2|KO-BKO +compoundcurvez|4326|Triangle|2|KO-BKO +compoundcurvez|4326|Point|1|KO-BKO +compoundcurvez|4326|LineString|1|KO-BKO +compoundcurvez|4326|Polygon|1|KO-BKO +compoundcurvez|4326|MultiPoint|1|KO-BKO +compoundcurvez|4326|MultiLineString|1|KO-BKO +compoundcurvez|4326|MultiPolygon|1|KO-BKO +compoundcurvez|4326|GeometryCollection|1|KO-BKO +compoundcurvez|4326|CircularString|1|KO-BKO +compoundcurvez|4326|CompoundCurve|1|KO-BKO +compoundcurvez|4326|CurvePolygon|1|KO-BKO +compoundcurvez|4326|MultiCurve|1|KO-BKO +compoundcurvez|4326|MultiSurface|1|KO-BKO +compoundcurvez|4326|PolyhedralSurface|1|KO-BKO +compoundcurvez|4326|Triangle|1|KO-BKO +compoundcurvez|4326|Point|3|KO-BKO +compoundcurvez|4326|LineString|3|KO-BKO +compoundcurvez|4326|Polygon|3|KO-BKO +compoundcurvez|4326|MultiPoint|3|KO-BKO +compoundcurvez|4326|MultiLineString|3|KO-BKO +compoundcurvez|4326|MultiPolygon|3|KO-BKO +compoundcurvez|4326|GeometryCollection|3|KO-BKO +compoundcurvez|4326|CircularString|3|KO-BKO +compoundcurvez|4326|CompoundCurve|3|KO-BKO +compoundcurvez|4326|CurvePolygon|3|KO-BKO +compoundcurvez|4326|MultiCurve|3|KO-BKO +compoundcurvez|4326|MultiSurface|3|KO-BKO +compoundcurvez|4326|PolyhedralSurface|3|KO-BKO +compoundcurvez|4326|Triangle|3|KO-BKO +compoundcurvez||COUNT|4| +compoundcurvez0|0|Point|0|KO-BKO +compoundcurvez0|0|LineString|0|KO-BKO +compoundcurvez0|0|Polygon|0|KO-BKO +compoundcurvez0|0|MultiPoint|0|KO-BKO +compoundcurvez0|0|MultiLineString|0|KO-BKO +compoundcurvez0|0|MultiPolygon|0|KO-BKO +compoundcurvez0|0|GeometryCollection|0|KO-BKO +compoundcurvez0|0|CircularString|0|KO-BKO +compoundcurvez0|0|CompoundCurve|0|KO-BKO +compoundcurvez0|0|CurvePolygon|0|KO-BKO +compoundcurvez0|0|MultiCurve|0|KO-BKO +compoundcurvez0|0|MultiSurface|0|KO-BKO +compoundcurvez0|0|PolyhedralSurface|0|KO-BKO +compoundcurvez0|0|Triangle|0|KO-BKO +compoundcurvez0|0|Tin|0|KO-BKO +compoundcurvez0|0|Point|2|KO-BKO +compoundcurvez0|0|LineString|2|KO-BKO +compoundcurvez0|0|Polygon|2|KO-BKO +compoundcurvez0|0|MultiPoint|2|KO-BKO +compoundcurvez0|0|MultiLineString|2|KO-BKO +compoundcurvez0|0|MultiPolygon|2|KO-BKO +compoundcurvez0|0|GeometryCollection|2|KO-BKO +compoundcurvez0|0|CircularString|2|KO-BKO +compoundcurvez0|0|CompoundCurve|2|OK-BOK +compoundcurvez0|0|CurvePolygon|2|KO-BKO +compoundcurvez0|0|MultiCurve|2|KO-BKO +compoundcurvez0|0|MultiSurface|2|KO-BKO +compoundcurvez0|0|PolyhedralSurface|2|KO-BKO +compoundcurvez0|0|Triangle|2|KO-BKO +compoundcurvez0|0|Point|1|KO-BKO +compoundcurvez0|0|LineString|1|KO-BKO +compoundcurvez0|0|Polygon|1|KO-BKO +compoundcurvez0|0|MultiPoint|1|KO-BKO +compoundcurvez0|0|MultiLineString|1|KO-BKO +compoundcurvez0|0|MultiPolygon|1|KO-BKO +compoundcurvez0|0|GeometryCollection|1|KO-BKO +compoundcurvez0|0|CircularString|1|KO-BKO +compoundcurvez0|0|CompoundCurve|1|KO-BKO +compoundcurvez0|0|CurvePolygon|1|KO-BKO +compoundcurvez0|0|MultiCurve|1|KO-BKO +compoundcurvez0|0|MultiSurface|1|KO-BKO +compoundcurvez0|0|PolyhedralSurface|1|KO-BKO +compoundcurvez0|0|Triangle|1|KO-BKO +compoundcurvez0|0|Point|3|KO-BKO +compoundcurvez0|0|LineString|3|KO-BKO +compoundcurvez0|0|Polygon|3|KO-BKO +compoundcurvez0|0|MultiPoint|3|KO-BKO +compoundcurvez0|0|MultiLineString|3|KO-BKO +compoundcurvez0|0|MultiPolygon|3|KO-BKO +compoundcurvez0|0|GeometryCollection|3|KO-BKO +compoundcurvez0|0|CircularString|3|KO-BKO +compoundcurvez0|0|CompoundCurve|3|KO-BKO +compoundcurvez0|0|CurvePolygon|3|KO-BKO +compoundcurvez0|0|MultiCurve|3|KO-BKO +compoundcurvez0|0|MultiSurface|3|KO-BKO +compoundcurvez0|0|PolyhedralSurface|3|KO-BKO +compoundcurvez0|0|Triangle|3|KO-BKO +compoundcurvez0|4326|Point|0|KO-BKO +compoundcurvez0|4326|LineString|0|KO-BKO +compoundcurvez0|4326|Polygon|0|KO-BKO +compoundcurvez0|4326|MultiPoint|0|KO-BKO +compoundcurvez0|4326|MultiLineString|0|KO-BKO +compoundcurvez0|4326|MultiPolygon|0|KO-BKO +compoundcurvez0|4326|GeometryCollection|0|KO-BKO +compoundcurvez0|4326|CircularString|0|KO-BKO +compoundcurvez0|4326|CompoundCurve|0|KO-BKO +compoundcurvez0|4326|CurvePolygon|0|KO-BKO +compoundcurvez0|4326|MultiCurve|0|KO-BKO +compoundcurvez0|4326|MultiSurface|0|KO-BKO +compoundcurvez0|4326|PolyhedralSurface|0|KO-BKO +compoundcurvez0|4326|Triangle|0|KO-BKO +compoundcurvez0|4326|Tin|0|KO-BKO +compoundcurvez0|4326|Point|2|KO-BKO +compoundcurvez0|4326|LineString|2|KO-BKO +compoundcurvez0|4326|Polygon|2|KO-BKO +compoundcurvez0|4326|MultiPoint|2|KO-BKO +compoundcurvez0|4326|MultiLineString|2|KO-BKO +compoundcurvez0|4326|MultiPolygon|2|KO-BKO +compoundcurvez0|4326|GeometryCollection|2|KO-BKO +compoundcurvez0|4326|CircularString|2|KO-BKO +compoundcurvez0|4326|CompoundCurve|2|OK-BOK +compoundcurvez0|4326|CurvePolygon|2|KO-BKO +compoundcurvez0|4326|MultiCurve|2|KO-BKO +compoundcurvez0|4326|MultiSurface|2|KO-BKO +compoundcurvez0|4326|PolyhedralSurface|2|KO-BKO +compoundcurvez0|4326|Triangle|2|KO-BKO +compoundcurvez0|4326|Point|1|KO-BKO +compoundcurvez0|4326|LineString|1|KO-BKO +compoundcurvez0|4326|Polygon|1|KO-BKO +compoundcurvez0|4326|MultiPoint|1|KO-BKO +compoundcurvez0|4326|MultiLineString|1|KO-BKO +compoundcurvez0|4326|MultiPolygon|1|KO-BKO +compoundcurvez0|4326|GeometryCollection|1|KO-BKO +compoundcurvez0|4326|CircularString|1|KO-BKO +compoundcurvez0|4326|CompoundCurve|1|KO-BKO +compoundcurvez0|4326|CurvePolygon|1|KO-BKO +compoundcurvez0|4326|MultiCurve|1|KO-BKO +compoundcurvez0|4326|MultiSurface|1|KO-BKO +compoundcurvez0|4326|PolyhedralSurface|1|KO-BKO +compoundcurvez0|4326|Triangle|1|KO-BKO +compoundcurvez0|4326|Point|3|KO-BKO +compoundcurvez0|4326|LineString|3|KO-BKO +compoundcurvez0|4326|Polygon|3|KO-BKO +compoundcurvez0|4326|MultiPoint|3|KO-BKO +compoundcurvez0|4326|MultiLineString|3|KO-BKO +compoundcurvez0|4326|MultiPolygon|3|KO-BKO +compoundcurvez0|4326|GeometryCollection|3|KO-BKO +compoundcurvez0|4326|CircularString|3|KO-BKO +compoundcurvez0|4326|CompoundCurve|3|KO-BKO +compoundcurvez0|4326|CurvePolygon|3|KO-BKO +compoundcurvez0|4326|MultiCurve|3|KO-BKO +compoundcurvez0|4326|MultiSurface|3|KO-BKO +compoundcurvez0|4326|PolyhedralSurface|3|KO-BKO +compoundcurvez0|4326|Triangle|3|KO-BKO +compoundcurvez0||COUNT|4| +compoundcurvez4326|0|Point|0|KO-BKO +compoundcurvez4326|0|LineString|0|KO-BKO +compoundcurvez4326|0|Polygon|0|KO-BKO +compoundcurvez4326|0|MultiPoint|0|KO-BKO +compoundcurvez4326|0|MultiLineString|0|KO-BKO +compoundcurvez4326|0|MultiPolygon|0|KO-BKO +compoundcurvez4326|0|GeometryCollection|0|KO-BKO +compoundcurvez4326|0|CircularString|0|KO-BKO +compoundcurvez4326|0|CompoundCurve|0|KO-BKO +compoundcurvez4326|0|CurvePolygon|0|KO-BKO +compoundcurvez4326|0|MultiCurve|0|KO-BKO +compoundcurvez4326|0|MultiSurface|0|KO-BKO +compoundcurvez4326|0|PolyhedralSurface|0|KO-BKO +compoundcurvez4326|0|Triangle|0|KO-BKO +compoundcurvez4326|0|Tin|0|KO-BKO +compoundcurvez4326|0|Point|2|KO-BKO +compoundcurvez4326|0|LineString|2|KO-BKO +compoundcurvez4326|0|Polygon|2|KO-BKO +compoundcurvez4326|0|MultiPoint|2|KO-BKO +compoundcurvez4326|0|MultiLineString|2|KO-BKO +compoundcurvez4326|0|MultiPolygon|2|KO-BKO +compoundcurvez4326|0|GeometryCollection|2|KO-BKO +compoundcurvez4326|0|CircularString|2|KO-BKO +compoundcurvez4326|0|CompoundCurve|2|KO-BKO +compoundcurvez4326|0|CurvePolygon|2|KO-BKO +compoundcurvez4326|0|MultiCurve|2|KO-BKO +compoundcurvez4326|0|MultiSurface|2|KO-BKO +compoundcurvez4326|0|PolyhedralSurface|2|KO-BKO +compoundcurvez4326|0|Triangle|2|KO-BKO +compoundcurvez4326|0|Point|1|KO-BKO +compoundcurvez4326|0|LineString|1|KO-BKO +compoundcurvez4326|0|Polygon|1|KO-BKO +compoundcurvez4326|0|MultiPoint|1|KO-BKO +compoundcurvez4326|0|MultiLineString|1|KO-BKO +compoundcurvez4326|0|MultiPolygon|1|KO-BKO +compoundcurvez4326|0|GeometryCollection|1|KO-BKO +compoundcurvez4326|0|CircularString|1|KO-BKO +compoundcurvez4326|0|CompoundCurve|1|KO-BKO +compoundcurvez4326|0|CurvePolygon|1|KO-BKO +compoundcurvez4326|0|MultiCurve|1|KO-BKO +compoundcurvez4326|0|MultiSurface|1|KO-BKO +compoundcurvez4326|0|PolyhedralSurface|1|KO-BKO +compoundcurvez4326|0|Triangle|1|KO-BKO +compoundcurvez4326|0|Point|3|KO-BKO +compoundcurvez4326|0|LineString|3|KO-BKO +compoundcurvez4326|0|Polygon|3|KO-BKO +compoundcurvez4326|0|MultiPoint|3|KO-BKO +compoundcurvez4326|0|MultiLineString|3|KO-BKO +compoundcurvez4326|0|MultiPolygon|3|KO-BKO +compoundcurvez4326|0|GeometryCollection|3|KO-BKO +compoundcurvez4326|0|CircularString|3|KO-BKO +compoundcurvez4326|0|CompoundCurve|3|KO-BKO +compoundcurvez4326|0|CurvePolygon|3|KO-BKO +compoundcurvez4326|0|MultiCurve|3|KO-BKO +compoundcurvez4326|0|MultiSurface|3|KO-BKO +compoundcurvez4326|0|PolyhedralSurface|3|KO-BKO +compoundcurvez4326|0|Triangle|3|KO-BKO +compoundcurvez4326|4326|Point|0|KO-BKO +compoundcurvez4326|4326|LineString|0|KO-BKO +compoundcurvez4326|4326|Polygon|0|KO-BKO +compoundcurvez4326|4326|MultiPoint|0|KO-BKO +compoundcurvez4326|4326|MultiLineString|0|KO-BKO +compoundcurvez4326|4326|MultiPolygon|0|KO-BKO +compoundcurvez4326|4326|GeometryCollection|0|KO-BKO +compoundcurvez4326|4326|CircularString|0|KO-BKO +compoundcurvez4326|4326|CompoundCurve|0|KO-BKO +compoundcurvez4326|4326|CurvePolygon|0|KO-BKO +compoundcurvez4326|4326|MultiCurve|0|KO-BKO +compoundcurvez4326|4326|MultiSurface|0|KO-BKO +compoundcurvez4326|4326|PolyhedralSurface|0|KO-BKO +compoundcurvez4326|4326|Triangle|0|KO-BKO +compoundcurvez4326|4326|Tin|0|KO-BKO +compoundcurvez4326|4326|Point|2|KO-BKO +compoundcurvez4326|4326|LineString|2|KO-BKO +compoundcurvez4326|4326|Polygon|2|KO-BKO +compoundcurvez4326|4326|MultiPoint|2|KO-BKO +compoundcurvez4326|4326|MultiLineString|2|KO-BKO +compoundcurvez4326|4326|MultiPolygon|2|KO-BKO +compoundcurvez4326|4326|GeometryCollection|2|KO-BKO +compoundcurvez4326|4326|CircularString|2|KO-BKO +compoundcurvez4326|4326|CompoundCurve|2|OK-BOK +compoundcurvez4326|4326|CurvePolygon|2|KO-BKO +compoundcurvez4326|4326|MultiCurve|2|KO-BKO +compoundcurvez4326|4326|MultiSurface|2|KO-BKO +compoundcurvez4326|4326|PolyhedralSurface|2|KO-BKO +compoundcurvez4326|4326|Triangle|2|KO-BKO +compoundcurvez4326|4326|Point|1|KO-BKO +compoundcurvez4326|4326|LineString|1|KO-BKO +compoundcurvez4326|4326|Polygon|1|KO-BKO +compoundcurvez4326|4326|MultiPoint|1|KO-BKO +compoundcurvez4326|4326|MultiLineString|1|KO-BKO +compoundcurvez4326|4326|MultiPolygon|1|KO-BKO +compoundcurvez4326|4326|GeometryCollection|1|KO-BKO +compoundcurvez4326|4326|CircularString|1|KO-BKO +compoundcurvez4326|4326|CompoundCurve|1|KO-BKO +compoundcurvez4326|4326|CurvePolygon|1|KO-BKO +compoundcurvez4326|4326|MultiCurve|1|KO-BKO +compoundcurvez4326|4326|MultiSurface|1|KO-BKO +compoundcurvez4326|4326|PolyhedralSurface|1|KO-BKO +compoundcurvez4326|4326|Triangle|1|KO-BKO +compoundcurvez4326|4326|Point|3|KO-BKO +compoundcurvez4326|4326|LineString|3|KO-BKO +compoundcurvez4326|4326|Polygon|3|KO-BKO +compoundcurvez4326|4326|MultiPoint|3|KO-BKO +compoundcurvez4326|4326|MultiLineString|3|KO-BKO +compoundcurvez4326|4326|MultiPolygon|3|KO-BKO +compoundcurvez4326|4326|GeometryCollection|3|KO-BKO +compoundcurvez4326|4326|CircularString|3|KO-BKO +compoundcurvez4326|4326|CompoundCurve|3|KO-BKO +compoundcurvez4326|4326|CurvePolygon|3|KO-BKO +compoundcurvez4326|4326|MultiCurve|3|KO-BKO +compoundcurvez4326|4326|MultiSurface|3|KO-BKO +compoundcurvez4326|4326|PolyhedralSurface|3|KO-BKO +compoundcurvez4326|4326|Triangle|3|KO-BKO +compoundcurvez4326||COUNT|2| +compoundcurvezm|0|Point|0|KO-BKO +compoundcurvezm|0|LineString|0|KO-BKO +compoundcurvezm|0|Polygon|0|KO-BKO +compoundcurvezm|0|MultiPoint|0|KO-BKO +compoundcurvezm|0|MultiLineString|0|KO-BKO +compoundcurvezm|0|MultiPolygon|0|KO-BKO +compoundcurvezm|0|GeometryCollection|0|KO-BKO +compoundcurvezm|0|CircularString|0|KO-BKO +compoundcurvezm|0|CompoundCurve|0|KO-BKO +compoundcurvezm|0|CurvePolygon|0|KO-BKO +compoundcurvezm|0|MultiCurve|0|KO-BKO +compoundcurvezm|0|MultiSurface|0|KO-BKO +compoundcurvezm|0|PolyhedralSurface|0|KO-BKO +compoundcurvezm|0|Triangle|0|KO-BKO +compoundcurvezm|0|Tin|0|KO-BKO +compoundcurvezm|0|Point|2|KO-BKO +compoundcurvezm|0|LineString|2|KO-BKO +compoundcurvezm|0|Polygon|2|KO-BKO +compoundcurvezm|0|MultiPoint|2|KO-BKO +compoundcurvezm|0|MultiLineString|2|KO-BKO +compoundcurvezm|0|MultiPolygon|2|KO-BKO +compoundcurvezm|0|GeometryCollection|2|KO-BKO +compoundcurvezm|0|CircularString|2|KO-BKO +compoundcurvezm|0|CompoundCurve|2|KO-BKO +compoundcurvezm|0|CurvePolygon|2|KO-BKO +compoundcurvezm|0|MultiCurve|2|KO-BKO +compoundcurvezm|0|MultiSurface|2|KO-BKO +compoundcurvezm|0|PolyhedralSurface|2|KO-BKO +compoundcurvezm|0|Triangle|2|KO-BKO +compoundcurvezm|0|Point|1|KO-BKO +compoundcurvezm|0|LineString|1|KO-BKO +compoundcurvezm|0|Polygon|1|KO-BKO +compoundcurvezm|0|MultiPoint|1|KO-BKO +compoundcurvezm|0|MultiLineString|1|KO-BKO +compoundcurvezm|0|MultiPolygon|1|KO-BKO +compoundcurvezm|0|GeometryCollection|1|KO-BKO +compoundcurvezm|0|CircularString|1|KO-BKO +compoundcurvezm|0|CompoundCurve|1|KO-BKO +compoundcurvezm|0|CurvePolygon|1|KO-BKO +compoundcurvezm|0|MultiCurve|1|KO-BKO +compoundcurvezm|0|MultiSurface|1|KO-BKO +compoundcurvezm|0|PolyhedralSurface|1|KO-BKO +compoundcurvezm|0|Triangle|1|KO-BKO +compoundcurvezm|0|Point|3|KO-BKO +compoundcurvezm|0|LineString|3|KO-BKO +compoundcurvezm|0|Polygon|3|KO-BKO +compoundcurvezm|0|MultiPoint|3|KO-BKO +compoundcurvezm|0|MultiLineString|3|KO-BKO +compoundcurvezm|0|MultiPolygon|3|KO-BKO +compoundcurvezm|0|GeometryCollection|3|KO-BKO +compoundcurvezm|0|CircularString|3|KO-BKO +compoundcurvezm|0|CompoundCurve|3|OK-BOK +compoundcurvezm|0|CurvePolygon|3|KO-BKO +compoundcurvezm|0|MultiCurve|3|KO-BKO +compoundcurvezm|0|MultiSurface|3|KO-BKO +compoundcurvezm|0|PolyhedralSurface|3|KO-BKO +compoundcurvezm|0|Triangle|3|KO-BKO +compoundcurvezm|4326|Point|0|KO-BKO +compoundcurvezm|4326|LineString|0|KO-BKO +compoundcurvezm|4326|Polygon|0|KO-BKO +compoundcurvezm|4326|MultiPoint|0|KO-BKO +compoundcurvezm|4326|MultiLineString|0|KO-BKO +compoundcurvezm|4326|MultiPolygon|0|KO-BKO +compoundcurvezm|4326|GeometryCollection|0|KO-BKO +compoundcurvezm|4326|CircularString|0|KO-BKO +compoundcurvezm|4326|CompoundCurve|0|KO-BKO +compoundcurvezm|4326|CurvePolygon|0|KO-BKO +compoundcurvezm|4326|MultiCurve|0|KO-BKO +compoundcurvezm|4326|MultiSurface|0|KO-BKO +compoundcurvezm|4326|PolyhedralSurface|0|KO-BKO +compoundcurvezm|4326|Triangle|0|KO-BKO +compoundcurvezm|4326|Tin|0|KO-BKO +compoundcurvezm|4326|Point|2|KO-BKO +compoundcurvezm|4326|LineString|2|KO-BKO +compoundcurvezm|4326|Polygon|2|KO-BKO +compoundcurvezm|4326|MultiPoint|2|KO-BKO +compoundcurvezm|4326|MultiLineString|2|KO-BKO +compoundcurvezm|4326|MultiPolygon|2|KO-BKO +compoundcurvezm|4326|GeometryCollection|2|KO-BKO +compoundcurvezm|4326|CircularString|2|KO-BKO +compoundcurvezm|4326|CompoundCurve|2|KO-BKO +compoundcurvezm|4326|CurvePolygon|2|KO-BKO +compoundcurvezm|4326|MultiCurve|2|KO-BKO +compoundcurvezm|4326|MultiSurface|2|KO-BKO +compoundcurvezm|4326|PolyhedralSurface|2|KO-BKO +compoundcurvezm|4326|Triangle|2|KO-BKO +compoundcurvezm|4326|Point|1|KO-BKO +compoundcurvezm|4326|LineString|1|KO-BKO +compoundcurvezm|4326|Polygon|1|KO-BKO +compoundcurvezm|4326|MultiPoint|1|KO-BKO +compoundcurvezm|4326|MultiLineString|1|KO-BKO +compoundcurvezm|4326|MultiPolygon|1|KO-BKO +compoundcurvezm|4326|GeometryCollection|1|KO-BKO +compoundcurvezm|4326|CircularString|1|KO-BKO +compoundcurvezm|4326|CompoundCurve|1|KO-BKO +compoundcurvezm|4326|CurvePolygon|1|KO-BKO +compoundcurvezm|4326|MultiCurve|1|KO-BKO +compoundcurvezm|4326|MultiSurface|1|KO-BKO +compoundcurvezm|4326|PolyhedralSurface|1|KO-BKO +compoundcurvezm|4326|Triangle|1|KO-BKO +compoundcurvezm|4326|Point|3|KO-BKO +compoundcurvezm|4326|LineString|3|KO-BKO +compoundcurvezm|4326|Polygon|3|KO-BKO +compoundcurvezm|4326|MultiPoint|3|KO-BKO +compoundcurvezm|4326|MultiLineString|3|KO-BKO +compoundcurvezm|4326|MultiPolygon|3|KO-BKO +compoundcurvezm|4326|GeometryCollection|3|KO-BKO +compoundcurvezm|4326|CircularString|3|KO-BKO +compoundcurvezm|4326|CompoundCurve|3|OK-BOK +compoundcurvezm|4326|CurvePolygon|3|KO-BKO +compoundcurvezm|4326|MultiCurve|3|KO-BKO +compoundcurvezm|4326|MultiSurface|3|KO-BKO +compoundcurvezm|4326|PolyhedralSurface|3|KO-BKO +compoundcurvezm|4326|Triangle|3|KO-BKO +compoundcurvezm||COUNT|4| +compoundcurvezm0|0|Point|0|KO-BKO +compoundcurvezm0|0|LineString|0|KO-BKO +compoundcurvezm0|0|Polygon|0|KO-BKO +compoundcurvezm0|0|MultiPoint|0|KO-BKO +compoundcurvezm0|0|MultiLineString|0|KO-BKO +compoundcurvezm0|0|MultiPolygon|0|KO-BKO +compoundcurvezm0|0|GeometryCollection|0|KO-BKO +compoundcurvezm0|0|CircularString|0|KO-BKO +compoundcurvezm0|0|CompoundCurve|0|KO-BKO +compoundcurvezm0|0|CurvePolygon|0|KO-BKO +compoundcurvezm0|0|MultiCurve|0|KO-BKO +compoundcurvezm0|0|MultiSurface|0|KO-BKO +compoundcurvezm0|0|PolyhedralSurface|0|KO-BKO +compoundcurvezm0|0|Triangle|0|KO-BKO +compoundcurvezm0|0|Tin|0|KO-BKO +compoundcurvezm0|0|Point|2|KO-BKO +compoundcurvezm0|0|LineString|2|KO-BKO +compoundcurvezm0|0|Polygon|2|KO-BKO +compoundcurvezm0|0|MultiPoint|2|KO-BKO +compoundcurvezm0|0|MultiLineString|2|KO-BKO +compoundcurvezm0|0|MultiPolygon|2|KO-BKO +compoundcurvezm0|0|GeometryCollection|2|KO-BKO +compoundcurvezm0|0|CircularString|2|KO-BKO +compoundcurvezm0|0|CompoundCurve|2|KO-BKO +compoundcurvezm0|0|CurvePolygon|2|KO-BKO +compoundcurvezm0|0|MultiCurve|2|KO-BKO +compoundcurvezm0|0|MultiSurface|2|KO-BKO +compoundcurvezm0|0|PolyhedralSurface|2|KO-BKO +compoundcurvezm0|0|Triangle|2|KO-BKO +compoundcurvezm0|0|Point|1|KO-BKO +compoundcurvezm0|0|LineString|1|KO-BKO +compoundcurvezm0|0|Polygon|1|KO-BKO +compoundcurvezm0|0|MultiPoint|1|KO-BKO +compoundcurvezm0|0|MultiLineString|1|KO-BKO +compoundcurvezm0|0|MultiPolygon|1|KO-BKO +compoundcurvezm0|0|GeometryCollection|1|KO-BKO +compoundcurvezm0|0|CircularString|1|KO-BKO +compoundcurvezm0|0|CompoundCurve|1|KO-BKO +compoundcurvezm0|0|CurvePolygon|1|KO-BKO +compoundcurvezm0|0|MultiCurve|1|KO-BKO +compoundcurvezm0|0|MultiSurface|1|KO-BKO +compoundcurvezm0|0|PolyhedralSurface|1|KO-BKO +compoundcurvezm0|0|Triangle|1|KO-BKO +compoundcurvezm0|0|Point|3|KO-BKO +compoundcurvezm0|0|LineString|3|KO-BKO +compoundcurvezm0|0|Polygon|3|KO-BKO +compoundcurvezm0|0|MultiPoint|3|KO-BKO +compoundcurvezm0|0|MultiLineString|3|KO-BKO +compoundcurvezm0|0|MultiPolygon|3|KO-BKO +compoundcurvezm0|0|GeometryCollection|3|KO-BKO +compoundcurvezm0|0|CircularString|3|KO-BKO +compoundcurvezm0|0|CompoundCurve|3|OK-BOK +compoundcurvezm0|0|CurvePolygon|3|KO-BKO +compoundcurvezm0|0|MultiCurve|3|KO-BKO +compoundcurvezm0|0|MultiSurface|3|KO-BKO +compoundcurvezm0|0|PolyhedralSurface|3|KO-BKO +compoundcurvezm0|0|Triangle|3|KO-BKO +compoundcurvezm0|4326|Point|0|KO-BKO +compoundcurvezm0|4326|LineString|0|KO-BKO +compoundcurvezm0|4326|Polygon|0|KO-BKO +compoundcurvezm0|4326|MultiPoint|0|KO-BKO +compoundcurvezm0|4326|MultiLineString|0|KO-BKO +compoundcurvezm0|4326|MultiPolygon|0|KO-BKO +compoundcurvezm0|4326|GeometryCollection|0|KO-BKO +compoundcurvezm0|4326|CircularString|0|KO-BKO +compoundcurvezm0|4326|CompoundCurve|0|KO-BKO +compoundcurvezm0|4326|CurvePolygon|0|KO-BKO +compoundcurvezm0|4326|MultiCurve|0|KO-BKO +compoundcurvezm0|4326|MultiSurface|0|KO-BKO +compoundcurvezm0|4326|PolyhedralSurface|0|KO-BKO +compoundcurvezm0|4326|Triangle|0|KO-BKO +compoundcurvezm0|4326|Tin|0|KO-BKO +compoundcurvezm0|4326|Point|2|KO-BKO +compoundcurvezm0|4326|LineString|2|KO-BKO +compoundcurvezm0|4326|Polygon|2|KO-BKO +compoundcurvezm0|4326|MultiPoint|2|KO-BKO +compoundcurvezm0|4326|MultiLineString|2|KO-BKO +compoundcurvezm0|4326|MultiPolygon|2|KO-BKO +compoundcurvezm0|4326|GeometryCollection|2|KO-BKO +compoundcurvezm0|4326|CircularString|2|KO-BKO +compoundcurvezm0|4326|CompoundCurve|2|KO-BKO +compoundcurvezm0|4326|CurvePolygon|2|KO-BKO +compoundcurvezm0|4326|MultiCurve|2|KO-BKO +compoundcurvezm0|4326|MultiSurface|2|KO-BKO +compoundcurvezm0|4326|PolyhedralSurface|2|KO-BKO +compoundcurvezm0|4326|Triangle|2|KO-BKO +compoundcurvezm0|4326|Point|1|KO-BKO +compoundcurvezm0|4326|LineString|1|KO-BKO +compoundcurvezm0|4326|Polygon|1|KO-BKO +compoundcurvezm0|4326|MultiPoint|1|KO-BKO +compoundcurvezm0|4326|MultiLineString|1|KO-BKO +compoundcurvezm0|4326|MultiPolygon|1|KO-BKO +compoundcurvezm0|4326|GeometryCollection|1|KO-BKO +compoundcurvezm0|4326|CircularString|1|KO-BKO +compoundcurvezm0|4326|CompoundCurve|1|KO-BKO +compoundcurvezm0|4326|CurvePolygon|1|KO-BKO +compoundcurvezm0|4326|MultiCurve|1|KO-BKO +compoundcurvezm0|4326|MultiSurface|1|KO-BKO +compoundcurvezm0|4326|PolyhedralSurface|1|KO-BKO +compoundcurvezm0|4326|Triangle|1|KO-BKO +compoundcurvezm0|4326|Point|3|KO-BKO +compoundcurvezm0|4326|LineString|3|KO-BKO +compoundcurvezm0|4326|Polygon|3|KO-BKO +compoundcurvezm0|4326|MultiPoint|3|KO-BKO +compoundcurvezm0|4326|MultiLineString|3|KO-BKO +compoundcurvezm0|4326|MultiPolygon|3|KO-BKO +compoundcurvezm0|4326|GeometryCollection|3|KO-BKO +compoundcurvezm0|4326|CircularString|3|KO-BKO +compoundcurvezm0|4326|CompoundCurve|3|OK-BOK +compoundcurvezm0|4326|CurvePolygon|3|KO-BKO +compoundcurvezm0|4326|MultiCurve|3|KO-BKO +compoundcurvezm0|4326|MultiSurface|3|KO-BKO +compoundcurvezm0|4326|PolyhedralSurface|3|KO-BKO +compoundcurvezm0|4326|Triangle|3|KO-BKO +compoundcurvezm0||COUNT|4| +compoundcurvezm4326|0|Point|0|KO-BKO +compoundcurvezm4326|0|LineString|0|KO-BKO +compoundcurvezm4326|0|Polygon|0|KO-BKO +compoundcurvezm4326|0|MultiPoint|0|KO-BKO +compoundcurvezm4326|0|MultiLineString|0|KO-BKO +compoundcurvezm4326|0|MultiPolygon|0|KO-BKO +compoundcurvezm4326|0|GeometryCollection|0|KO-BKO +compoundcurvezm4326|0|CircularString|0|KO-BKO +compoundcurvezm4326|0|CompoundCurve|0|KO-BKO +compoundcurvezm4326|0|CurvePolygon|0|KO-BKO +compoundcurvezm4326|0|MultiCurve|0|KO-BKO +compoundcurvezm4326|0|MultiSurface|0|KO-BKO +compoundcurvezm4326|0|PolyhedralSurface|0|KO-BKO +compoundcurvezm4326|0|Triangle|0|KO-BKO +compoundcurvezm4326|0|Tin|0|KO-BKO +compoundcurvezm4326|0|Point|2|KO-BKO +compoundcurvezm4326|0|LineString|2|KO-BKO +compoundcurvezm4326|0|Polygon|2|KO-BKO +compoundcurvezm4326|0|MultiPoint|2|KO-BKO +compoundcurvezm4326|0|MultiLineString|2|KO-BKO +compoundcurvezm4326|0|MultiPolygon|2|KO-BKO +compoundcurvezm4326|0|GeometryCollection|2|KO-BKO +compoundcurvezm4326|0|CircularString|2|KO-BKO +compoundcurvezm4326|0|CompoundCurve|2|KO-BKO +compoundcurvezm4326|0|CurvePolygon|2|KO-BKO +compoundcurvezm4326|0|MultiCurve|2|KO-BKO +compoundcurvezm4326|0|MultiSurface|2|KO-BKO +compoundcurvezm4326|0|PolyhedralSurface|2|KO-BKO +compoundcurvezm4326|0|Triangle|2|KO-BKO +compoundcurvezm4326|0|Point|1|KO-BKO +compoundcurvezm4326|0|LineString|1|KO-BKO +compoundcurvezm4326|0|Polygon|1|KO-BKO +compoundcurvezm4326|0|MultiPoint|1|KO-BKO +compoundcurvezm4326|0|MultiLineString|1|KO-BKO +compoundcurvezm4326|0|MultiPolygon|1|KO-BKO +compoundcurvezm4326|0|GeometryCollection|1|KO-BKO +compoundcurvezm4326|0|CircularString|1|KO-BKO +compoundcurvezm4326|0|CompoundCurve|1|KO-BKO +compoundcurvezm4326|0|CurvePolygon|1|KO-BKO +compoundcurvezm4326|0|MultiCurve|1|KO-BKO +compoundcurvezm4326|0|MultiSurface|1|KO-BKO +compoundcurvezm4326|0|PolyhedralSurface|1|KO-BKO +compoundcurvezm4326|0|Triangle|1|KO-BKO +compoundcurvezm4326|0|Point|3|KO-BKO +compoundcurvezm4326|0|LineString|3|KO-BKO +compoundcurvezm4326|0|Polygon|3|KO-BKO +compoundcurvezm4326|0|MultiPoint|3|KO-BKO +compoundcurvezm4326|0|MultiLineString|3|KO-BKO +compoundcurvezm4326|0|MultiPolygon|3|KO-BKO +compoundcurvezm4326|0|GeometryCollection|3|KO-BKO +compoundcurvezm4326|0|CircularString|3|KO-BKO +compoundcurvezm4326|0|CompoundCurve|3|KO-BKO +compoundcurvezm4326|0|CurvePolygon|3|KO-BKO +compoundcurvezm4326|0|MultiCurve|3|KO-BKO +compoundcurvezm4326|0|MultiSurface|3|KO-BKO +compoundcurvezm4326|0|PolyhedralSurface|3|KO-BKO +compoundcurvezm4326|0|Triangle|3|KO-BKO +compoundcurvezm4326|4326|Point|0|KO-BKO +compoundcurvezm4326|4326|LineString|0|KO-BKO +compoundcurvezm4326|4326|Polygon|0|KO-BKO +compoundcurvezm4326|4326|MultiPoint|0|KO-BKO +compoundcurvezm4326|4326|MultiLineString|0|KO-BKO +compoundcurvezm4326|4326|MultiPolygon|0|KO-BKO +compoundcurvezm4326|4326|GeometryCollection|0|KO-BKO +compoundcurvezm4326|4326|CircularString|0|KO-BKO +compoundcurvezm4326|4326|CompoundCurve|0|KO-BKO +compoundcurvezm4326|4326|CurvePolygon|0|KO-BKO +compoundcurvezm4326|4326|MultiCurve|0|KO-BKO +compoundcurvezm4326|4326|MultiSurface|0|KO-BKO +compoundcurvezm4326|4326|PolyhedralSurface|0|KO-BKO +compoundcurvezm4326|4326|Triangle|0|KO-BKO +compoundcurvezm4326|4326|Tin|0|KO-BKO +compoundcurvezm4326|4326|Point|2|KO-BKO +compoundcurvezm4326|4326|LineString|2|KO-BKO +compoundcurvezm4326|4326|Polygon|2|KO-BKO +compoundcurvezm4326|4326|MultiPoint|2|KO-BKO +compoundcurvezm4326|4326|MultiLineString|2|KO-BKO +compoundcurvezm4326|4326|MultiPolygon|2|KO-BKO +compoundcurvezm4326|4326|GeometryCollection|2|KO-BKO +compoundcurvezm4326|4326|CircularString|2|KO-BKO +compoundcurvezm4326|4326|CompoundCurve|2|KO-BKO +compoundcurvezm4326|4326|CurvePolygon|2|KO-BKO +compoundcurvezm4326|4326|MultiCurve|2|KO-BKO +compoundcurvezm4326|4326|MultiSurface|2|KO-BKO +compoundcurvezm4326|4326|PolyhedralSurface|2|KO-BKO +compoundcurvezm4326|4326|Triangle|2|KO-BKO +compoundcurvezm4326|4326|Point|1|KO-BKO +compoundcurvezm4326|4326|LineString|1|KO-BKO +compoundcurvezm4326|4326|Polygon|1|KO-BKO +compoundcurvezm4326|4326|MultiPoint|1|KO-BKO +compoundcurvezm4326|4326|MultiLineString|1|KO-BKO +compoundcurvezm4326|4326|MultiPolygon|1|KO-BKO +compoundcurvezm4326|4326|GeometryCollection|1|KO-BKO +compoundcurvezm4326|4326|CircularString|1|KO-BKO +compoundcurvezm4326|4326|CompoundCurve|1|KO-BKO +compoundcurvezm4326|4326|CurvePolygon|1|KO-BKO +compoundcurvezm4326|4326|MultiCurve|1|KO-BKO +compoundcurvezm4326|4326|MultiSurface|1|KO-BKO +compoundcurvezm4326|4326|PolyhedralSurface|1|KO-BKO +compoundcurvezm4326|4326|Triangle|1|KO-BKO +compoundcurvezm4326|4326|Point|3|KO-BKO +compoundcurvezm4326|4326|LineString|3|KO-BKO +compoundcurvezm4326|4326|Polygon|3|KO-BKO +compoundcurvezm4326|4326|MultiPoint|3|KO-BKO +compoundcurvezm4326|4326|MultiLineString|3|KO-BKO +compoundcurvezm4326|4326|MultiPolygon|3|KO-BKO +compoundcurvezm4326|4326|GeometryCollection|3|KO-BKO +compoundcurvezm4326|4326|CircularString|3|KO-BKO +compoundcurvezm4326|4326|CompoundCurve|3|OK-BOK +compoundcurvezm4326|4326|CurvePolygon|3|KO-BKO +compoundcurvezm4326|4326|MultiCurve|3|KO-BKO +compoundcurvezm4326|4326|MultiSurface|3|KO-BKO +compoundcurvezm4326|4326|PolyhedralSurface|3|KO-BKO +compoundcurvezm4326|4326|Triangle|3|KO-BKO +compoundcurvezm4326||COUNT|2| +curvepolygon|0|Point|0|KO-BKO +curvepolygon|0|LineString|0|KO-BKO +curvepolygon|0|Polygon|0|KO-BKO +curvepolygon|0|MultiPoint|0|KO-BKO +curvepolygon|0|MultiLineString|0|KO-BKO +curvepolygon|0|MultiPolygon|0|KO-BKO +curvepolygon|0|GeometryCollection|0|KO-BKO +curvepolygon|0|CircularString|0|KO-BKO +curvepolygon|0|CompoundCurve|0|KO-BKO +curvepolygon|0|CurvePolygon|0|OK-BOK +curvepolygon|0|MultiCurve|0|KO-BKO +curvepolygon|0|MultiSurface|0|KO-BKO +curvepolygon|0|PolyhedralSurface|0|KO-BKO +curvepolygon|0|Triangle|0|KO-BKO +curvepolygon|0|Tin|0|KO-BKO +curvepolygon|0|Point|2|KO-BKO +curvepolygon|0|LineString|2|KO-BKO +curvepolygon|0|Polygon|2|KO-BKO +curvepolygon|0|MultiPoint|2|KO-BKO +curvepolygon|0|MultiLineString|2|KO-BKO +curvepolygon|0|MultiPolygon|2|KO-BKO +curvepolygon|0|GeometryCollection|2|KO-BKO +curvepolygon|0|CircularString|2|KO-BKO +curvepolygon|0|CompoundCurve|2|KO-BKO +curvepolygon|0|CurvePolygon|2|KO-BKO +curvepolygon|0|MultiCurve|2|KO-BKO +curvepolygon|0|MultiSurface|2|KO-BKO +curvepolygon|0|PolyhedralSurface|2|KO-BKO +curvepolygon|0|Triangle|2|KO-BKO +curvepolygon|0|Point|1|KO-BKO +curvepolygon|0|LineString|1|KO-BKO +curvepolygon|0|Polygon|1|KO-BKO +curvepolygon|0|MultiPoint|1|KO-BKO +curvepolygon|0|MultiLineString|1|KO-BKO +curvepolygon|0|MultiPolygon|1|KO-BKO +curvepolygon|0|GeometryCollection|1|KO-BKO +curvepolygon|0|CircularString|1|KO-BKO +curvepolygon|0|CompoundCurve|1|KO-BKO +curvepolygon|0|CurvePolygon|1|KO-BKO +curvepolygon|0|MultiCurve|1|KO-BKO +curvepolygon|0|MultiSurface|1|KO-BKO +curvepolygon|0|PolyhedralSurface|1|KO-BKO +curvepolygon|0|Triangle|1|KO-BKO +curvepolygon|0|Point|3|KO-BKO +curvepolygon|0|LineString|3|KO-BKO +curvepolygon|0|Polygon|3|KO-BKO +curvepolygon|0|MultiPoint|3|KO-BKO +curvepolygon|0|MultiLineString|3|KO-BKO +curvepolygon|0|MultiPolygon|3|KO-BKO +curvepolygon|0|GeometryCollection|3|KO-BKO +curvepolygon|0|CircularString|3|KO-BKO +curvepolygon|0|CompoundCurve|3|KO-BKO +curvepolygon|0|CurvePolygon|3|KO-BKO +curvepolygon|0|MultiCurve|3|KO-BKO +curvepolygon|0|MultiSurface|3|KO-BKO +curvepolygon|0|PolyhedralSurface|3|KO-BKO +curvepolygon|0|Triangle|3|KO-BKO +curvepolygon|4326|Point|0|KO-BKO +curvepolygon|4326|LineString|0|KO-BKO +curvepolygon|4326|Polygon|0|KO-BKO +curvepolygon|4326|MultiPoint|0|KO-BKO +curvepolygon|4326|MultiLineString|0|KO-BKO +curvepolygon|4326|MultiPolygon|0|KO-BKO +curvepolygon|4326|GeometryCollection|0|KO-BKO +curvepolygon|4326|CircularString|0|KO-BKO +curvepolygon|4326|CompoundCurve|0|KO-BKO +curvepolygon|4326|CurvePolygon|0|OK-BOK +curvepolygon|4326|MultiCurve|0|KO-BKO +curvepolygon|4326|MultiSurface|0|KO-BKO +curvepolygon|4326|PolyhedralSurface|0|KO-BKO +curvepolygon|4326|Triangle|0|KO-BKO +curvepolygon|4326|Tin|0|KO-BKO +curvepolygon|4326|Point|2|KO-BKO +curvepolygon|4326|LineString|2|KO-BKO +curvepolygon|4326|Polygon|2|KO-BKO +curvepolygon|4326|MultiPoint|2|KO-BKO +curvepolygon|4326|MultiLineString|2|KO-BKO +curvepolygon|4326|MultiPolygon|2|KO-BKO +curvepolygon|4326|GeometryCollection|2|KO-BKO +curvepolygon|4326|CircularString|2|KO-BKO +curvepolygon|4326|CompoundCurve|2|KO-BKO +curvepolygon|4326|CurvePolygon|2|KO-BKO +curvepolygon|4326|MultiCurve|2|KO-BKO +curvepolygon|4326|MultiSurface|2|KO-BKO +curvepolygon|4326|PolyhedralSurface|2|KO-BKO +curvepolygon|4326|Triangle|2|KO-BKO +curvepolygon|4326|Point|1|KO-BKO +curvepolygon|4326|LineString|1|KO-BKO +curvepolygon|4326|Polygon|1|KO-BKO +curvepolygon|4326|MultiPoint|1|KO-BKO +curvepolygon|4326|MultiLineString|1|KO-BKO +curvepolygon|4326|MultiPolygon|1|KO-BKO +curvepolygon|4326|GeometryCollection|1|KO-BKO +curvepolygon|4326|CircularString|1|KO-BKO +curvepolygon|4326|CompoundCurve|1|KO-BKO +curvepolygon|4326|CurvePolygon|1|KO-BKO +curvepolygon|4326|MultiCurve|1|KO-BKO +curvepolygon|4326|MultiSurface|1|KO-BKO +curvepolygon|4326|PolyhedralSurface|1|KO-BKO +curvepolygon|4326|Triangle|1|KO-BKO +curvepolygon|4326|Point|3|KO-BKO +curvepolygon|4326|LineString|3|KO-BKO +curvepolygon|4326|Polygon|3|KO-BKO +curvepolygon|4326|MultiPoint|3|KO-BKO +curvepolygon|4326|MultiLineString|3|KO-BKO +curvepolygon|4326|MultiPolygon|3|KO-BKO +curvepolygon|4326|GeometryCollection|3|KO-BKO +curvepolygon|4326|CircularString|3|KO-BKO +curvepolygon|4326|CompoundCurve|3|KO-BKO +curvepolygon|4326|CurvePolygon|3|KO-BKO +curvepolygon|4326|MultiCurve|3|KO-BKO +curvepolygon|4326|MultiSurface|3|KO-BKO +curvepolygon|4326|PolyhedralSurface|3|KO-BKO +curvepolygon|4326|Triangle|3|KO-BKO +curvepolygon||COUNT|4| +curvepolygon0|0|Point|0|KO-BKO +curvepolygon0|0|LineString|0|KO-BKO +curvepolygon0|0|Polygon|0|KO-BKO +curvepolygon0|0|MultiPoint|0|KO-BKO +curvepolygon0|0|MultiLineString|0|KO-BKO +curvepolygon0|0|MultiPolygon|0|KO-BKO +curvepolygon0|0|GeometryCollection|0|KO-BKO +curvepolygon0|0|CircularString|0|KO-BKO +curvepolygon0|0|CompoundCurve|0|KO-BKO +curvepolygon0|0|CurvePolygon|0|OK-BOK +curvepolygon0|0|MultiCurve|0|KO-BKO +curvepolygon0|0|MultiSurface|0|KO-BKO +curvepolygon0|0|PolyhedralSurface|0|KO-BKO +curvepolygon0|0|Triangle|0|KO-BKO +curvepolygon0|0|Tin|0|KO-BKO +curvepolygon0|0|Point|2|KO-BKO +curvepolygon0|0|LineString|2|KO-BKO +curvepolygon0|0|Polygon|2|KO-BKO +curvepolygon0|0|MultiPoint|2|KO-BKO +curvepolygon0|0|MultiLineString|2|KO-BKO +curvepolygon0|0|MultiPolygon|2|KO-BKO +curvepolygon0|0|GeometryCollection|2|KO-BKO +curvepolygon0|0|CircularString|2|KO-BKO +curvepolygon0|0|CompoundCurve|2|KO-BKO +curvepolygon0|0|CurvePolygon|2|KO-BKO +curvepolygon0|0|MultiCurve|2|KO-BKO +curvepolygon0|0|MultiSurface|2|KO-BKO +curvepolygon0|0|PolyhedralSurface|2|KO-BKO +curvepolygon0|0|Triangle|2|KO-BKO +curvepolygon0|0|Point|1|KO-BKO +curvepolygon0|0|LineString|1|KO-BKO +curvepolygon0|0|Polygon|1|KO-BKO +curvepolygon0|0|MultiPoint|1|KO-BKO +curvepolygon0|0|MultiLineString|1|KO-BKO +curvepolygon0|0|MultiPolygon|1|KO-BKO +curvepolygon0|0|GeometryCollection|1|KO-BKO +curvepolygon0|0|CircularString|1|KO-BKO +curvepolygon0|0|CompoundCurve|1|KO-BKO +curvepolygon0|0|CurvePolygon|1|KO-BKO +curvepolygon0|0|MultiCurve|1|KO-BKO +curvepolygon0|0|MultiSurface|1|KO-BKO +curvepolygon0|0|PolyhedralSurface|1|KO-BKO +curvepolygon0|0|Triangle|1|KO-BKO +curvepolygon0|0|Point|3|KO-BKO +curvepolygon0|0|LineString|3|KO-BKO +curvepolygon0|0|Polygon|3|KO-BKO +curvepolygon0|0|MultiPoint|3|KO-BKO +curvepolygon0|0|MultiLineString|3|KO-BKO +curvepolygon0|0|MultiPolygon|3|KO-BKO +curvepolygon0|0|GeometryCollection|3|KO-BKO +curvepolygon0|0|CircularString|3|KO-BKO +curvepolygon0|0|CompoundCurve|3|KO-BKO +curvepolygon0|0|CurvePolygon|3|KO-BKO +curvepolygon0|0|MultiCurve|3|KO-BKO +curvepolygon0|0|MultiSurface|3|KO-BKO +curvepolygon0|0|PolyhedralSurface|3|KO-BKO +curvepolygon0|0|Triangle|3|KO-BKO +curvepolygon0|4326|Point|0|KO-BKO +curvepolygon0|4326|LineString|0|KO-BKO +curvepolygon0|4326|Polygon|0|KO-BKO +curvepolygon0|4326|MultiPoint|0|KO-BKO +curvepolygon0|4326|MultiLineString|0|KO-BKO +curvepolygon0|4326|MultiPolygon|0|KO-BKO +curvepolygon0|4326|GeometryCollection|0|KO-BKO +curvepolygon0|4326|CircularString|0|KO-BKO +curvepolygon0|4326|CompoundCurve|0|KO-BKO +curvepolygon0|4326|CurvePolygon|0|OK-BOK +curvepolygon0|4326|MultiCurve|0|KO-BKO +curvepolygon0|4326|MultiSurface|0|KO-BKO +curvepolygon0|4326|PolyhedralSurface|0|KO-BKO +curvepolygon0|4326|Triangle|0|KO-BKO +curvepolygon0|4326|Tin|0|KO-BKO +curvepolygon0|4326|Point|2|KO-BKO +curvepolygon0|4326|LineString|2|KO-BKO +curvepolygon0|4326|Polygon|2|KO-BKO +curvepolygon0|4326|MultiPoint|2|KO-BKO +curvepolygon0|4326|MultiLineString|2|KO-BKO +curvepolygon0|4326|MultiPolygon|2|KO-BKO +curvepolygon0|4326|GeometryCollection|2|KO-BKO +curvepolygon0|4326|CircularString|2|KO-BKO +curvepolygon0|4326|CompoundCurve|2|KO-BKO +curvepolygon0|4326|CurvePolygon|2|KO-BKO +curvepolygon0|4326|MultiCurve|2|KO-BKO +curvepolygon0|4326|MultiSurface|2|KO-BKO +curvepolygon0|4326|PolyhedralSurface|2|KO-BKO +curvepolygon0|4326|Triangle|2|KO-BKO +curvepolygon0|4326|Point|1|KO-BKO +curvepolygon0|4326|LineString|1|KO-BKO +curvepolygon0|4326|Polygon|1|KO-BKO +curvepolygon0|4326|MultiPoint|1|KO-BKO +curvepolygon0|4326|MultiLineString|1|KO-BKO +curvepolygon0|4326|MultiPolygon|1|KO-BKO +curvepolygon0|4326|GeometryCollection|1|KO-BKO +curvepolygon0|4326|CircularString|1|KO-BKO +curvepolygon0|4326|CompoundCurve|1|KO-BKO +curvepolygon0|4326|CurvePolygon|1|KO-BKO +curvepolygon0|4326|MultiCurve|1|KO-BKO +curvepolygon0|4326|MultiSurface|1|KO-BKO +curvepolygon0|4326|PolyhedralSurface|1|KO-BKO +curvepolygon0|4326|Triangle|1|KO-BKO +curvepolygon0|4326|Point|3|KO-BKO +curvepolygon0|4326|LineString|3|KO-BKO +curvepolygon0|4326|Polygon|3|KO-BKO +curvepolygon0|4326|MultiPoint|3|KO-BKO +curvepolygon0|4326|MultiLineString|3|KO-BKO +curvepolygon0|4326|MultiPolygon|3|KO-BKO +curvepolygon0|4326|GeometryCollection|3|KO-BKO +curvepolygon0|4326|CircularString|3|KO-BKO +curvepolygon0|4326|CompoundCurve|3|KO-BKO +curvepolygon0|4326|CurvePolygon|3|KO-BKO +curvepolygon0|4326|MultiCurve|3|KO-BKO +curvepolygon0|4326|MultiSurface|3|KO-BKO +curvepolygon0|4326|PolyhedralSurface|3|KO-BKO +curvepolygon0|4326|Triangle|3|KO-BKO +curvepolygon0||COUNT|4| +curvepolygon4326|0|Point|0|KO-BKO +curvepolygon4326|0|LineString|0|KO-BKO +curvepolygon4326|0|Polygon|0|KO-BKO +curvepolygon4326|0|MultiPoint|0|KO-BKO +curvepolygon4326|0|MultiLineString|0|KO-BKO +curvepolygon4326|0|MultiPolygon|0|KO-BKO +curvepolygon4326|0|GeometryCollection|0|KO-BKO +curvepolygon4326|0|CircularString|0|KO-BKO +curvepolygon4326|0|CompoundCurve|0|KO-BKO +curvepolygon4326|0|CurvePolygon|0|KO-BKO +curvepolygon4326|0|MultiCurve|0|KO-BKO +curvepolygon4326|0|MultiSurface|0|KO-BKO +curvepolygon4326|0|PolyhedralSurface|0|KO-BKO +curvepolygon4326|0|Triangle|0|KO-BKO +curvepolygon4326|0|Tin|0|KO-BKO +curvepolygon4326|0|Point|2|KO-BKO +curvepolygon4326|0|LineString|2|KO-BKO +curvepolygon4326|0|Polygon|2|KO-BKO +curvepolygon4326|0|MultiPoint|2|KO-BKO +curvepolygon4326|0|MultiLineString|2|KO-BKO +curvepolygon4326|0|MultiPolygon|2|KO-BKO +curvepolygon4326|0|GeometryCollection|2|KO-BKO +curvepolygon4326|0|CircularString|2|KO-BKO +curvepolygon4326|0|CompoundCurve|2|KO-BKO +curvepolygon4326|0|CurvePolygon|2|KO-BKO +curvepolygon4326|0|MultiCurve|2|KO-BKO +curvepolygon4326|0|MultiSurface|2|KO-BKO +curvepolygon4326|0|PolyhedralSurface|2|KO-BKO +curvepolygon4326|0|Triangle|2|KO-BKO +curvepolygon4326|0|Point|1|KO-BKO +curvepolygon4326|0|LineString|1|KO-BKO +curvepolygon4326|0|Polygon|1|KO-BKO +curvepolygon4326|0|MultiPoint|1|KO-BKO +curvepolygon4326|0|MultiLineString|1|KO-BKO +curvepolygon4326|0|MultiPolygon|1|KO-BKO +curvepolygon4326|0|GeometryCollection|1|KO-BKO +curvepolygon4326|0|CircularString|1|KO-BKO +curvepolygon4326|0|CompoundCurve|1|KO-BKO +curvepolygon4326|0|CurvePolygon|1|KO-BKO +curvepolygon4326|0|MultiCurve|1|KO-BKO +curvepolygon4326|0|MultiSurface|1|KO-BKO +curvepolygon4326|0|PolyhedralSurface|1|KO-BKO +curvepolygon4326|0|Triangle|1|KO-BKO +curvepolygon4326|0|Point|3|KO-BKO +curvepolygon4326|0|LineString|3|KO-BKO +curvepolygon4326|0|Polygon|3|KO-BKO +curvepolygon4326|0|MultiPoint|3|KO-BKO +curvepolygon4326|0|MultiLineString|3|KO-BKO +curvepolygon4326|0|MultiPolygon|3|KO-BKO +curvepolygon4326|0|GeometryCollection|3|KO-BKO +curvepolygon4326|0|CircularString|3|KO-BKO +curvepolygon4326|0|CompoundCurve|3|KO-BKO +curvepolygon4326|0|CurvePolygon|3|KO-BKO +curvepolygon4326|0|MultiCurve|3|KO-BKO +curvepolygon4326|0|MultiSurface|3|KO-BKO +curvepolygon4326|0|PolyhedralSurface|3|KO-BKO +curvepolygon4326|0|Triangle|3|KO-BKO +curvepolygon4326|4326|Point|0|KO-BKO +curvepolygon4326|4326|LineString|0|KO-BKO +curvepolygon4326|4326|Polygon|0|KO-BKO +curvepolygon4326|4326|MultiPoint|0|KO-BKO +curvepolygon4326|4326|MultiLineString|0|KO-BKO +curvepolygon4326|4326|MultiPolygon|0|KO-BKO +curvepolygon4326|4326|GeometryCollection|0|KO-BKO +curvepolygon4326|4326|CircularString|0|KO-BKO +curvepolygon4326|4326|CompoundCurve|0|KO-BKO +curvepolygon4326|4326|CurvePolygon|0|OK-BOK +curvepolygon4326|4326|MultiCurve|0|KO-BKO +curvepolygon4326|4326|MultiSurface|0|KO-BKO +curvepolygon4326|4326|PolyhedralSurface|0|KO-BKO +curvepolygon4326|4326|Triangle|0|KO-BKO +curvepolygon4326|4326|Tin|0|KO-BKO +curvepolygon4326|4326|Point|2|KO-BKO +curvepolygon4326|4326|LineString|2|KO-BKO +curvepolygon4326|4326|Polygon|2|KO-BKO +curvepolygon4326|4326|MultiPoint|2|KO-BKO +curvepolygon4326|4326|MultiLineString|2|KO-BKO +curvepolygon4326|4326|MultiPolygon|2|KO-BKO +curvepolygon4326|4326|GeometryCollection|2|KO-BKO +curvepolygon4326|4326|CircularString|2|KO-BKO +curvepolygon4326|4326|CompoundCurve|2|KO-BKO +curvepolygon4326|4326|CurvePolygon|2|KO-BKO +curvepolygon4326|4326|MultiCurve|2|KO-BKO +curvepolygon4326|4326|MultiSurface|2|KO-BKO +curvepolygon4326|4326|PolyhedralSurface|2|KO-BKO +curvepolygon4326|4326|Triangle|2|KO-BKO +curvepolygon4326|4326|Point|1|KO-BKO +curvepolygon4326|4326|LineString|1|KO-BKO +curvepolygon4326|4326|Polygon|1|KO-BKO +curvepolygon4326|4326|MultiPoint|1|KO-BKO +curvepolygon4326|4326|MultiLineString|1|KO-BKO +curvepolygon4326|4326|MultiPolygon|1|KO-BKO +curvepolygon4326|4326|GeometryCollection|1|KO-BKO +curvepolygon4326|4326|CircularString|1|KO-BKO +curvepolygon4326|4326|CompoundCurve|1|KO-BKO +curvepolygon4326|4326|CurvePolygon|1|KO-BKO +curvepolygon4326|4326|MultiCurve|1|KO-BKO +curvepolygon4326|4326|MultiSurface|1|KO-BKO +curvepolygon4326|4326|PolyhedralSurface|1|KO-BKO +curvepolygon4326|4326|Triangle|1|KO-BKO +curvepolygon4326|4326|Point|3|KO-BKO +curvepolygon4326|4326|LineString|3|KO-BKO +curvepolygon4326|4326|Polygon|3|KO-BKO +curvepolygon4326|4326|MultiPoint|3|KO-BKO +curvepolygon4326|4326|MultiLineString|3|KO-BKO +curvepolygon4326|4326|MultiPolygon|3|KO-BKO +curvepolygon4326|4326|GeometryCollection|3|KO-BKO +curvepolygon4326|4326|CircularString|3|KO-BKO +curvepolygon4326|4326|CompoundCurve|3|KO-BKO +curvepolygon4326|4326|CurvePolygon|3|KO-BKO +curvepolygon4326|4326|MultiCurve|3|KO-BKO +curvepolygon4326|4326|MultiSurface|3|KO-BKO +curvepolygon4326|4326|PolyhedralSurface|3|KO-BKO +curvepolygon4326|4326|Triangle|3|KO-BKO +curvepolygon4326||COUNT|2| +curvepolygonm|0|Point|0|KO-BKO +curvepolygonm|0|LineString|0|KO-BKO +curvepolygonm|0|Polygon|0|KO-BKO +curvepolygonm|0|MultiPoint|0|KO-BKO +curvepolygonm|0|MultiLineString|0|KO-BKO +curvepolygonm|0|MultiPolygon|0|KO-BKO +curvepolygonm|0|GeometryCollection|0|KO-BKO +curvepolygonm|0|CircularString|0|KO-BKO +curvepolygonm|0|CompoundCurve|0|KO-BKO +curvepolygonm|0|CurvePolygon|0|KO-BKO +curvepolygonm|0|MultiCurve|0|KO-BKO +curvepolygonm|0|MultiSurface|0|KO-BKO +curvepolygonm|0|PolyhedralSurface|0|KO-BKO +curvepolygonm|0|Triangle|0|KO-BKO +curvepolygonm|0|Tin|0|KO-BKO +curvepolygonm|0|Point|2|KO-BKO +curvepolygonm|0|LineString|2|KO-BKO +curvepolygonm|0|Polygon|2|KO-BKO +curvepolygonm|0|MultiPoint|2|KO-BKO +curvepolygonm|0|MultiLineString|2|KO-BKO +curvepolygonm|0|MultiPolygon|2|KO-BKO +curvepolygonm|0|GeometryCollection|2|KO-BKO +curvepolygonm|0|CircularString|2|KO-BKO +curvepolygonm|0|CompoundCurve|2|KO-BKO +curvepolygonm|0|CurvePolygon|2|KO-BKO +curvepolygonm|0|MultiCurve|2|KO-BKO +curvepolygonm|0|MultiSurface|2|KO-BKO +curvepolygonm|0|PolyhedralSurface|2|KO-BKO +curvepolygonm|0|Triangle|2|KO-BKO +curvepolygonm|0|Point|1|KO-BKO +curvepolygonm|0|LineString|1|KO-BKO +curvepolygonm|0|Polygon|1|KO-BKO +curvepolygonm|0|MultiPoint|1|KO-BKO +curvepolygonm|0|MultiLineString|1|KO-BKO +curvepolygonm|0|MultiPolygon|1|KO-BKO +curvepolygonm|0|GeometryCollection|1|KO-BKO +curvepolygonm|0|CircularString|1|KO-BKO +curvepolygonm|0|CompoundCurve|1|KO-BKO +curvepolygonm|0|CurvePolygon|1|OK-BOK +curvepolygonm|0|MultiCurve|1|KO-BKO +curvepolygonm|0|MultiSurface|1|KO-BKO +curvepolygonm|0|PolyhedralSurface|1|KO-BKO +curvepolygonm|0|Triangle|1|KO-BKO +curvepolygonm|0|Point|3|KO-BKO +curvepolygonm|0|LineString|3|KO-BKO +curvepolygonm|0|Polygon|3|KO-BKO +curvepolygonm|0|MultiPoint|3|KO-BKO +curvepolygonm|0|MultiLineString|3|KO-BKO +curvepolygonm|0|MultiPolygon|3|KO-BKO +curvepolygonm|0|GeometryCollection|3|KO-BKO +curvepolygonm|0|CircularString|3|KO-BKO +curvepolygonm|0|CompoundCurve|3|KO-BKO +curvepolygonm|0|CurvePolygon|3|KO-BKO +curvepolygonm|0|MultiCurve|3|KO-BKO +curvepolygonm|0|MultiSurface|3|KO-BKO +curvepolygonm|0|PolyhedralSurface|3|KO-BKO +curvepolygonm|0|Triangle|3|KO-BKO +curvepolygonm|4326|Point|0|KO-BKO +curvepolygonm|4326|LineString|0|KO-BKO +curvepolygonm|4326|Polygon|0|KO-BKO +curvepolygonm|4326|MultiPoint|0|KO-BKO +curvepolygonm|4326|MultiLineString|0|KO-BKO +curvepolygonm|4326|MultiPolygon|0|KO-BKO +curvepolygonm|4326|GeometryCollection|0|KO-BKO +curvepolygonm|4326|CircularString|0|KO-BKO +curvepolygonm|4326|CompoundCurve|0|KO-BKO +curvepolygonm|4326|CurvePolygon|0|KO-BKO +curvepolygonm|4326|MultiCurve|0|KO-BKO +curvepolygonm|4326|MultiSurface|0|KO-BKO +curvepolygonm|4326|PolyhedralSurface|0|KO-BKO +curvepolygonm|4326|Triangle|0|KO-BKO +curvepolygonm|4326|Tin|0|KO-BKO +curvepolygonm|4326|Point|2|KO-BKO +curvepolygonm|4326|LineString|2|KO-BKO +curvepolygonm|4326|Polygon|2|KO-BKO +curvepolygonm|4326|MultiPoint|2|KO-BKO +curvepolygonm|4326|MultiLineString|2|KO-BKO +curvepolygonm|4326|MultiPolygon|2|KO-BKO +curvepolygonm|4326|GeometryCollection|2|KO-BKO +curvepolygonm|4326|CircularString|2|KO-BKO +curvepolygonm|4326|CompoundCurve|2|KO-BKO +curvepolygonm|4326|CurvePolygon|2|KO-BKO +curvepolygonm|4326|MultiCurve|2|KO-BKO +curvepolygonm|4326|MultiSurface|2|KO-BKO +curvepolygonm|4326|PolyhedralSurface|2|KO-BKO +curvepolygonm|4326|Triangle|2|KO-BKO +curvepolygonm|4326|Point|1|KO-BKO +curvepolygonm|4326|LineString|1|KO-BKO +curvepolygonm|4326|Polygon|1|KO-BKO +curvepolygonm|4326|MultiPoint|1|KO-BKO +curvepolygonm|4326|MultiLineString|1|KO-BKO +curvepolygonm|4326|MultiPolygon|1|KO-BKO +curvepolygonm|4326|GeometryCollection|1|KO-BKO +curvepolygonm|4326|CircularString|1|KO-BKO +curvepolygonm|4326|CompoundCurve|1|KO-BKO +curvepolygonm|4326|CurvePolygon|1|OK-BOK +curvepolygonm|4326|MultiCurve|1|KO-BKO +curvepolygonm|4326|MultiSurface|1|KO-BKO +curvepolygonm|4326|PolyhedralSurface|1|KO-BKO +curvepolygonm|4326|Triangle|1|KO-BKO +curvepolygonm|4326|Point|3|KO-BKO +curvepolygonm|4326|LineString|3|KO-BKO +curvepolygonm|4326|Polygon|3|KO-BKO +curvepolygonm|4326|MultiPoint|3|KO-BKO +curvepolygonm|4326|MultiLineString|3|KO-BKO +curvepolygonm|4326|MultiPolygon|3|KO-BKO +curvepolygonm|4326|GeometryCollection|3|KO-BKO +curvepolygonm|4326|CircularString|3|KO-BKO +curvepolygonm|4326|CompoundCurve|3|KO-BKO +curvepolygonm|4326|CurvePolygon|3|KO-BKO +curvepolygonm|4326|MultiCurve|3|KO-BKO +curvepolygonm|4326|MultiSurface|3|KO-BKO +curvepolygonm|4326|PolyhedralSurface|3|KO-BKO +curvepolygonm|4326|Triangle|3|KO-BKO +curvepolygonm||COUNT|4| +curvepolygonm0|0|Point|0|KO-BKO +curvepolygonm0|0|LineString|0|KO-BKO +curvepolygonm0|0|Polygon|0|KO-BKO +curvepolygonm0|0|MultiPoint|0|KO-BKO +curvepolygonm0|0|MultiLineString|0|KO-BKO +curvepolygonm0|0|MultiPolygon|0|KO-BKO +curvepolygonm0|0|GeometryCollection|0|KO-BKO +curvepolygonm0|0|CircularString|0|KO-BKO +curvepolygonm0|0|CompoundCurve|0|KO-BKO +curvepolygonm0|0|CurvePolygon|0|KO-BKO +curvepolygonm0|0|MultiCurve|0|KO-BKO +curvepolygonm0|0|MultiSurface|0|KO-BKO +curvepolygonm0|0|PolyhedralSurface|0|KO-BKO +curvepolygonm0|0|Triangle|0|KO-BKO +curvepolygonm0|0|Tin|0|KO-BKO +curvepolygonm0|0|Point|2|KO-BKO +curvepolygonm0|0|LineString|2|KO-BKO +curvepolygonm0|0|Polygon|2|KO-BKO +curvepolygonm0|0|MultiPoint|2|KO-BKO +curvepolygonm0|0|MultiLineString|2|KO-BKO +curvepolygonm0|0|MultiPolygon|2|KO-BKO +curvepolygonm0|0|GeometryCollection|2|KO-BKO +curvepolygonm0|0|CircularString|2|KO-BKO +curvepolygonm0|0|CompoundCurve|2|KO-BKO +curvepolygonm0|0|CurvePolygon|2|KO-BKO +curvepolygonm0|0|MultiCurve|2|KO-BKO +curvepolygonm0|0|MultiSurface|2|KO-BKO +curvepolygonm0|0|PolyhedralSurface|2|KO-BKO +curvepolygonm0|0|Triangle|2|KO-BKO +curvepolygonm0|0|Point|1|KO-BKO +curvepolygonm0|0|LineString|1|KO-BKO +curvepolygonm0|0|Polygon|1|KO-BKO +curvepolygonm0|0|MultiPoint|1|KO-BKO +curvepolygonm0|0|MultiLineString|1|KO-BKO +curvepolygonm0|0|MultiPolygon|1|KO-BKO +curvepolygonm0|0|GeometryCollection|1|KO-BKO +curvepolygonm0|0|CircularString|1|KO-BKO +curvepolygonm0|0|CompoundCurve|1|KO-BKO +curvepolygonm0|0|CurvePolygon|1|OK-BOK +curvepolygonm0|0|MultiCurve|1|KO-BKO +curvepolygonm0|0|MultiSurface|1|KO-BKO +curvepolygonm0|0|PolyhedralSurface|1|KO-BKO +curvepolygonm0|0|Triangle|1|KO-BKO +curvepolygonm0|0|Point|3|KO-BKO +curvepolygonm0|0|LineString|3|KO-BKO +curvepolygonm0|0|Polygon|3|KO-BKO +curvepolygonm0|0|MultiPoint|3|KO-BKO +curvepolygonm0|0|MultiLineString|3|KO-BKO +curvepolygonm0|0|MultiPolygon|3|KO-BKO +curvepolygonm0|0|GeometryCollection|3|KO-BKO +curvepolygonm0|0|CircularString|3|KO-BKO +curvepolygonm0|0|CompoundCurve|3|KO-BKO +curvepolygonm0|0|CurvePolygon|3|KO-BKO +curvepolygonm0|0|MultiCurve|3|KO-BKO +curvepolygonm0|0|MultiSurface|3|KO-BKO +curvepolygonm0|0|PolyhedralSurface|3|KO-BKO +curvepolygonm0|0|Triangle|3|KO-BKO +curvepolygonm0|4326|Point|0|KO-BKO +curvepolygonm0|4326|LineString|0|KO-BKO +curvepolygonm0|4326|Polygon|0|KO-BKO +curvepolygonm0|4326|MultiPoint|0|KO-BKO +curvepolygonm0|4326|MultiLineString|0|KO-BKO +curvepolygonm0|4326|MultiPolygon|0|KO-BKO +curvepolygonm0|4326|GeometryCollection|0|KO-BKO +curvepolygonm0|4326|CircularString|0|KO-BKO +curvepolygonm0|4326|CompoundCurve|0|KO-BKO +curvepolygonm0|4326|CurvePolygon|0|KO-BKO +curvepolygonm0|4326|MultiCurve|0|KO-BKO +curvepolygonm0|4326|MultiSurface|0|KO-BKO +curvepolygonm0|4326|PolyhedralSurface|0|KO-BKO +curvepolygonm0|4326|Triangle|0|KO-BKO +curvepolygonm0|4326|Tin|0|KO-BKO +curvepolygonm0|4326|Point|2|KO-BKO +curvepolygonm0|4326|LineString|2|KO-BKO +curvepolygonm0|4326|Polygon|2|KO-BKO +curvepolygonm0|4326|MultiPoint|2|KO-BKO +curvepolygonm0|4326|MultiLineString|2|KO-BKO +curvepolygonm0|4326|MultiPolygon|2|KO-BKO +curvepolygonm0|4326|GeometryCollection|2|KO-BKO +curvepolygonm0|4326|CircularString|2|KO-BKO +curvepolygonm0|4326|CompoundCurve|2|KO-BKO +curvepolygonm0|4326|CurvePolygon|2|KO-BKO +curvepolygonm0|4326|MultiCurve|2|KO-BKO +curvepolygonm0|4326|MultiSurface|2|KO-BKO +curvepolygonm0|4326|PolyhedralSurface|2|KO-BKO +curvepolygonm0|4326|Triangle|2|KO-BKO +curvepolygonm0|4326|Point|1|KO-BKO +curvepolygonm0|4326|LineString|1|KO-BKO +curvepolygonm0|4326|Polygon|1|KO-BKO +curvepolygonm0|4326|MultiPoint|1|KO-BKO +curvepolygonm0|4326|MultiLineString|1|KO-BKO +curvepolygonm0|4326|MultiPolygon|1|KO-BKO +curvepolygonm0|4326|GeometryCollection|1|KO-BKO +curvepolygonm0|4326|CircularString|1|KO-BKO +curvepolygonm0|4326|CompoundCurve|1|KO-BKO +curvepolygonm0|4326|CurvePolygon|1|OK-BOK +curvepolygonm0|4326|MultiCurve|1|KO-BKO +curvepolygonm0|4326|MultiSurface|1|KO-BKO +curvepolygonm0|4326|PolyhedralSurface|1|KO-BKO +curvepolygonm0|4326|Triangle|1|KO-BKO +curvepolygonm0|4326|Point|3|KO-BKO +curvepolygonm0|4326|LineString|3|KO-BKO +curvepolygonm0|4326|Polygon|3|KO-BKO +curvepolygonm0|4326|MultiPoint|3|KO-BKO +curvepolygonm0|4326|MultiLineString|3|KO-BKO +curvepolygonm0|4326|MultiPolygon|3|KO-BKO +curvepolygonm0|4326|GeometryCollection|3|KO-BKO +curvepolygonm0|4326|CircularString|3|KO-BKO +curvepolygonm0|4326|CompoundCurve|3|KO-BKO +curvepolygonm0|4326|CurvePolygon|3|KO-BKO +curvepolygonm0|4326|MultiCurve|3|KO-BKO +curvepolygonm0|4326|MultiSurface|3|KO-BKO +curvepolygonm0|4326|PolyhedralSurface|3|KO-BKO +curvepolygonm0|4326|Triangle|3|KO-BKO +curvepolygonm0||COUNT|4| +curvepolygonm4326|0|Point|0|KO-BKO +curvepolygonm4326|0|LineString|0|KO-BKO +curvepolygonm4326|0|Polygon|0|KO-BKO +curvepolygonm4326|0|MultiPoint|0|KO-BKO +curvepolygonm4326|0|MultiLineString|0|KO-BKO +curvepolygonm4326|0|MultiPolygon|0|KO-BKO +curvepolygonm4326|0|GeometryCollection|0|KO-BKO +curvepolygonm4326|0|CircularString|0|KO-BKO +curvepolygonm4326|0|CompoundCurve|0|KO-BKO +curvepolygonm4326|0|CurvePolygon|0|KO-BKO +curvepolygonm4326|0|MultiCurve|0|KO-BKO +curvepolygonm4326|0|MultiSurface|0|KO-BKO +curvepolygonm4326|0|PolyhedralSurface|0|KO-BKO +curvepolygonm4326|0|Triangle|0|KO-BKO +curvepolygonm4326|0|Tin|0|KO-BKO +curvepolygonm4326|0|Point|2|KO-BKO +curvepolygonm4326|0|LineString|2|KO-BKO +curvepolygonm4326|0|Polygon|2|KO-BKO +curvepolygonm4326|0|MultiPoint|2|KO-BKO +curvepolygonm4326|0|MultiLineString|2|KO-BKO +curvepolygonm4326|0|MultiPolygon|2|KO-BKO +curvepolygonm4326|0|GeometryCollection|2|KO-BKO +curvepolygonm4326|0|CircularString|2|KO-BKO +curvepolygonm4326|0|CompoundCurve|2|KO-BKO +curvepolygonm4326|0|CurvePolygon|2|KO-BKO +curvepolygonm4326|0|MultiCurve|2|KO-BKO +curvepolygonm4326|0|MultiSurface|2|KO-BKO +curvepolygonm4326|0|PolyhedralSurface|2|KO-BKO +curvepolygonm4326|0|Triangle|2|KO-BKO +curvepolygonm4326|0|Point|1|KO-BKO +curvepolygonm4326|0|LineString|1|KO-BKO +curvepolygonm4326|0|Polygon|1|KO-BKO +curvepolygonm4326|0|MultiPoint|1|KO-BKO +curvepolygonm4326|0|MultiLineString|1|KO-BKO +curvepolygonm4326|0|MultiPolygon|1|KO-BKO +curvepolygonm4326|0|GeometryCollection|1|KO-BKO +curvepolygonm4326|0|CircularString|1|KO-BKO +curvepolygonm4326|0|CompoundCurve|1|KO-BKO +curvepolygonm4326|0|CurvePolygon|1|KO-BKO +curvepolygonm4326|0|MultiCurve|1|KO-BKO +curvepolygonm4326|0|MultiSurface|1|KO-BKO +curvepolygonm4326|0|PolyhedralSurface|1|KO-BKO +curvepolygonm4326|0|Triangle|1|KO-BKO +curvepolygonm4326|0|Point|3|KO-BKO +curvepolygonm4326|0|LineString|3|KO-BKO +curvepolygonm4326|0|Polygon|3|KO-BKO +curvepolygonm4326|0|MultiPoint|3|KO-BKO +curvepolygonm4326|0|MultiLineString|3|KO-BKO +curvepolygonm4326|0|MultiPolygon|3|KO-BKO +curvepolygonm4326|0|GeometryCollection|3|KO-BKO +curvepolygonm4326|0|CircularString|3|KO-BKO +curvepolygonm4326|0|CompoundCurve|3|KO-BKO +curvepolygonm4326|0|CurvePolygon|3|KO-BKO +curvepolygonm4326|0|MultiCurve|3|KO-BKO +curvepolygonm4326|0|MultiSurface|3|KO-BKO +curvepolygonm4326|0|PolyhedralSurface|3|KO-BKO +curvepolygonm4326|0|Triangle|3|KO-BKO +curvepolygonm4326|4326|Point|0|KO-BKO +curvepolygonm4326|4326|LineString|0|KO-BKO +curvepolygonm4326|4326|Polygon|0|KO-BKO +curvepolygonm4326|4326|MultiPoint|0|KO-BKO +curvepolygonm4326|4326|MultiLineString|0|KO-BKO +curvepolygonm4326|4326|MultiPolygon|0|KO-BKO +curvepolygonm4326|4326|GeometryCollection|0|KO-BKO +curvepolygonm4326|4326|CircularString|0|KO-BKO +curvepolygonm4326|4326|CompoundCurve|0|KO-BKO +curvepolygonm4326|4326|CurvePolygon|0|KO-BKO +curvepolygonm4326|4326|MultiCurve|0|KO-BKO +curvepolygonm4326|4326|MultiSurface|0|KO-BKO +curvepolygonm4326|4326|PolyhedralSurface|0|KO-BKO +curvepolygonm4326|4326|Triangle|0|KO-BKO +curvepolygonm4326|4326|Tin|0|KO-BKO +curvepolygonm4326|4326|Point|2|KO-BKO +curvepolygonm4326|4326|LineString|2|KO-BKO +curvepolygonm4326|4326|Polygon|2|KO-BKO +curvepolygonm4326|4326|MultiPoint|2|KO-BKO +curvepolygonm4326|4326|MultiLineString|2|KO-BKO +curvepolygonm4326|4326|MultiPolygon|2|KO-BKO +curvepolygonm4326|4326|GeometryCollection|2|KO-BKO +curvepolygonm4326|4326|CircularString|2|KO-BKO +curvepolygonm4326|4326|CompoundCurve|2|KO-BKO +curvepolygonm4326|4326|CurvePolygon|2|KO-BKO +curvepolygonm4326|4326|MultiCurve|2|KO-BKO +curvepolygonm4326|4326|MultiSurface|2|KO-BKO +curvepolygonm4326|4326|PolyhedralSurface|2|KO-BKO +curvepolygonm4326|4326|Triangle|2|KO-BKO +curvepolygonm4326|4326|Point|1|KO-BKO +curvepolygonm4326|4326|LineString|1|KO-BKO +curvepolygonm4326|4326|Polygon|1|KO-BKO +curvepolygonm4326|4326|MultiPoint|1|KO-BKO +curvepolygonm4326|4326|MultiLineString|1|KO-BKO +curvepolygonm4326|4326|MultiPolygon|1|KO-BKO +curvepolygonm4326|4326|GeometryCollection|1|KO-BKO +curvepolygonm4326|4326|CircularString|1|KO-BKO +curvepolygonm4326|4326|CompoundCurve|1|KO-BKO +curvepolygonm4326|4326|CurvePolygon|1|OK-BOK +curvepolygonm4326|4326|MultiCurve|1|KO-BKO +curvepolygonm4326|4326|MultiSurface|1|KO-BKO +curvepolygonm4326|4326|PolyhedralSurface|1|KO-BKO +curvepolygonm4326|4326|Triangle|1|KO-BKO +curvepolygonm4326|4326|Point|3|KO-BKO +curvepolygonm4326|4326|LineString|3|KO-BKO +curvepolygonm4326|4326|Polygon|3|KO-BKO +curvepolygonm4326|4326|MultiPoint|3|KO-BKO +curvepolygonm4326|4326|MultiLineString|3|KO-BKO +curvepolygonm4326|4326|MultiPolygon|3|KO-BKO +curvepolygonm4326|4326|GeometryCollection|3|KO-BKO +curvepolygonm4326|4326|CircularString|3|KO-BKO +curvepolygonm4326|4326|CompoundCurve|3|KO-BKO +curvepolygonm4326|4326|CurvePolygon|3|KO-BKO +curvepolygonm4326|4326|MultiCurve|3|KO-BKO +curvepolygonm4326|4326|MultiSurface|3|KO-BKO +curvepolygonm4326|4326|PolyhedralSurface|3|KO-BKO +curvepolygonm4326|4326|Triangle|3|KO-BKO +curvepolygonm4326||COUNT|2| +curvepolygonz|0|Point|0|KO-BKO +curvepolygonz|0|LineString|0|KO-BKO +curvepolygonz|0|Polygon|0|KO-BKO +curvepolygonz|0|MultiPoint|0|KO-BKO +curvepolygonz|0|MultiLineString|0|KO-BKO +curvepolygonz|0|MultiPolygon|0|KO-BKO +curvepolygonz|0|GeometryCollection|0|KO-BKO +curvepolygonz|0|CircularString|0|KO-BKO +curvepolygonz|0|CompoundCurve|0|KO-BKO +curvepolygonz|0|CurvePolygon|0|KO-BKO +curvepolygonz|0|MultiCurve|0|KO-BKO +curvepolygonz|0|MultiSurface|0|KO-BKO +curvepolygonz|0|PolyhedralSurface|0|KO-BKO +curvepolygonz|0|Triangle|0|KO-BKO +curvepolygonz|0|Tin|0|KO-BKO +curvepolygonz|0|Point|2|KO-BKO +curvepolygonz|0|LineString|2|KO-BKO +curvepolygonz|0|Polygon|2|KO-BKO +curvepolygonz|0|MultiPoint|2|KO-BKO +curvepolygonz|0|MultiLineString|2|KO-BKO +curvepolygonz|0|MultiPolygon|2|KO-BKO +curvepolygonz|0|GeometryCollection|2|KO-BKO +curvepolygonz|0|CircularString|2|KO-BKO +curvepolygonz|0|CompoundCurve|2|KO-BKO +curvepolygonz|0|CurvePolygon|2|OK-BOK +curvepolygonz|0|MultiCurve|2|KO-BKO +curvepolygonz|0|MultiSurface|2|KO-BKO +curvepolygonz|0|PolyhedralSurface|2|KO-BKO +curvepolygonz|0|Triangle|2|KO-BKO +curvepolygonz|0|Point|1|KO-BKO +curvepolygonz|0|LineString|1|KO-BKO +curvepolygonz|0|Polygon|1|KO-BKO +curvepolygonz|0|MultiPoint|1|KO-BKO +curvepolygonz|0|MultiLineString|1|KO-BKO +curvepolygonz|0|MultiPolygon|1|KO-BKO +curvepolygonz|0|GeometryCollection|1|KO-BKO +curvepolygonz|0|CircularString|1|KO-BKO +curvepolygonz|0|CompoundCurve|1|KO-BKO +curvepolygonz|0|CurvePolygon|1|KO-BKO +curvepolygonz|0|MultiCurve|1|KO-BKO +curvepolygonz|0|MultiSurface|1|KO-BKO +curvepolygonz|0|PolyhedralSurface|1|KO-BKO +curvepolygonz|0|Triangle|1|KO-BKO +curvepolygonz|0|Point|3|KO-BKO +curvepolygonz|0|LineString|3|KO-BKO +curvepolygonz|0|Polygon|3|KO-BKO +curvepolygonz|0|MultiPoint|3|KO-BKO +curvepolygonz|0|MultiLineString|3|KO-BKO +curvepolygonz|0|MultiPolygon|3|KO-BKO +curvepolygonz|0|GeometryCollection|3|KO-BKO +curvepolygonz|0|CircularString|3|KO-BKO +curvepolygonz|0|CompoundCurve|3|KO-BKO +curvepolygonz|0|CurvePolygon|3|KO-BKO +curvepolygonz|0|MultiCurve|3|KO-BKO +curvepolygonz|0|MultiSurface|3|KO-BKO +curvepolygonz|0|PolyhedralSurface|3|KO-BKO +curvepolygonz|0|Triangle|3|KO-BKO +curvepolygonz|4326|Point|0|KO-BKO +curvepolygonz|4326|LineString|0|KO-BKO +curvepolygonz|4326|Polygon|0|KO-BKO +curvepolygonz|4326|MultiPoint|0|KO-BKO +curvepolygonz|4326|MultiLineString|0|KO-BKO +curvepolygonz|4326|MultiPolygon|0|KO-BKO +curvepolygonz|4326|GeometryCollection|0|KO-BKO +curvepolygonz|4326|CircularString|0|KO-BKO +curvepolygonz|4326|CompoundCurve|0|KO-BKO +curvepolygonz|4326|CurvePolygon|0|KO-BKO +curvepolygonz|4326|MultiCurve|0|KO-BKO +curvepolygonz|4326|MultiSurface|0|KO-BKO +curvepolygonz|4326|PolyhedralSurface|0|KO-BKO +curvepolygonz|4326|Triangle|0|KO-BKO +curvepolygonz|4326|Tin|0|KO-BKO +curvepolygonz|4326|Point|2|KO-BKO +curvepolygonz|4326|LineString|2|KO-BKO +curvepolygonz|4326|Polygon|2|KO-BKO +curvepolygonz|4326|MultiPoint|2|KO-BKO +curvepolygonz|4326|MultiLineString|2|KO-BKO +curvepolygonz|4326|MultiPolygon|2|KO-BKO +curvepolygonz|4326|GeometryCollection|2|KO-BKO +curvepolygonz|4326|CircularString|2|KO-BKO +curvepolygonz|4326|CompoundCurve|2|KO-BKO +curvepolygonz|4326|CurvePolygon|2|OK-BOK +curvepolygonz|4326|MultiCurve|2|KO-BKO +curvepolygonz|4326|MultiSurface|2|KO-BKO +curvepolygonz|4326|PolyhedralSurface|2|KO-BKO +curvepolygonz|4326|Triangle|2|KO-BKO +curvepolygonz|4326|Point|1|KO-BKO +curvepolygonz|4326|LineString|1|KO-BKO +curvepolygonz|4326|Polygon|1|KO-BKO +curvepolygonz|4326|MultiPoint|1|KO-BKO +curvepolygonz|4326|MultiLineString|1|KO-BKO +curvepolygonz|4326|MultiPolygon|1|KO-BKO +curvepolygonz|4326|GeometryCollection|1|KO-BKO +curvepolygonz|4326|CircularString|1|KO-BKO +curvepolygonz|4326|CompoundCurve|1|KO-BKO +curvepolygonz|4326|CurvePolygon|1|KO-BKO +curvepolygonz|4326|MultiCurve|1|KO-BKO +curvepolygonz|4326|MultiSurface|1|KO-BKO +curvepolygonz|4326|PolyhedralSurface|1|KO-BKO +curvepolygonz|4326|Triangle|1|KO-BKO +curvepolygonz|4326|Point|3|KO-BKO +curvepolygonz|4326|LineString|3|KO-BKO +curvepolygonz|4326|Polygon|3|KO-BKO +curvepolygonz|4326|MultiPoint|3|KO-BKO +curvepolygonz|4326|MultiLineString|3|KO-BKO +curvepolygonz|4326|MultiPolygon|3|KO-BKO +curvepolygonz|4326|GeometryCollection|3|KO-BKO +curvepolygonz|4326|CircularString|3|KO-BKO +curvepolygonz|4326|CompoundCurve|3|KO-BKO +curvepolygonz|4326|CurvePolygon|3|KO-BKO +curvepolygonz|4326|MultiCurve|3|KO-BKO +curvepolygonz|4326|MultiSurface|3|KO-BKO +curvepolygonz|4326|PolyhedralSurface|3|KO-BKO +curvepolygonz|4326|Triangle|3|KO-BKO +curvepolygonz||COUNT|4| +curvepolygonz0|0|Point|0|KO-BKO +curvepolygonz0|0|LineString|0|KO-BKO +curvepolygonz0|0|Polygon|0|KO-BKO +curvepolygonz0|0|MultiPoint|0|KO-BKO +curvepolygonz0|0|MultiLineString|0|KO-BKO +curvepolygonz0|0|MultiPolygon|0|KO-BKO +curvepolygonz0|0|GeometryCollection|0|KO-BKO +curvepolygonz0|0|CircularString|0|KO-BKO +curvepolygonz0|0|CompoundCurve|0|KO-BKO +curvepolygonz0|0|CurvePolygon|0|KO-BKO +curvepolygonz0|0|MultiCurve|0|KO-BKO +curvepolygonz0|0|MultiSurface|0|KO-BKO +curvepolygonz0|0|PolyhedralSurface|0|KO-BKO +curvepolygonz0|0|Triangle|0|KO-BKO +curvepolygonz0|0|Tin|0|KO-BKO +curvepolygonz0|0|Point|2|KO-BKO +curvepolygonz0|0|LineString|2|KO-BKO +curvepolygonz0|0|Polygon|2|KO-BKO +curvepolygonz0|0|MultiPoint|2|KO-BKO +curvepolygonz0|0|MultiLineString|2|KO-BKO +curvepolygonz0|0|MultiPolygon|2|KO-BKO +curvepolygonz0|0|GeometryCollection|2|KO-BKO +curvepolygonz0|0|CircularString|2|KO-BKO +curvepolygonz0|0|CompoundCurve|2|KO-BKO +curvepolygonz0|0|CurvePolygon|2|OK-BOK +curvepolygonz0|0|MultiCurve|2|KO-BKO +curvepolygonz0|0|MultiSurface|2|KO-BKO +curvepolygonz0|0|PolyhedralSurface|2|KO-BKO +curvepolygonz0|0|Triangle|2|KO-BKO +curvepolygonz0|0|Point|1|KO-BKO +curvepolygonz0|0|LineString|1|KO-BKO +curvepolygonz0|0|Polygon|1|KO-BKO +curvepolygonz0|0|MultiPoint|1|KO-BKO +curvepolygonz0|0|MultiLineString|1|KO-BKO +curvepolygonz0|0|MultiPolygon|1|KO-BKO +curvepolygonz0|0|GeometryCollection|1|KO-BKO +curvepolygonz0|0|CircularString|1|KO-BKO +curvepolygonz0|0|CompoundCurve|1|KO-BKO +curvepolygonz0|0|CurvePolygon|1|KO-BKO +curvepolygonz0|0|MultiCurve|1|KO-BKO +curvepolygonz0|0|MultiSurface|1|KO-BKO +curvepolygonz0|0|PolyhedralSurface|1|KO-BKO +curvepolygonz0|0|Triangle|1|KO-BKO +curvepolygonz0|0|Point|3|KO-BKO +curvepolygonz0|0|LineString|3|KO-BKO +curvepolygonz0|0|Polygon|3|KO-BKO +curvepolygonz0|0|MultiPoint|3|KO-BKO +curvepolygonz0|0|MultiLineString|3|KO-BKO +curvepolygonz0|0|MultiPolygon|3|KO-BKO +curvepolygonz0|0|GeometryCollection|3|KO-BKO +curvepolygonz0|0|CircularString|3|KO-BKO +curvepolygonz0|0|CompoundCurve|3|KO-BKO +curvepolygonz0|0|CurvePolygon|3|KO-BKO +curvepolygonz0|0|MultiCurve|3|KO-BKO +curvepolygonz0|0|MultiSurface|3|KO-BKO +curvepolygonz0|0|PolyhedralSurface|3|KO-BKO +curvepolygonz0|0|Triangle|3|KO-BKO +curvepolygonz0|4326|Point|0|KO-BKO +curvepolygonz0|4326|LineString|0|KO-BKO +curvepolygonz0|4326|Polygon|0|KO-BKO +curvepolygonz0|4326|MultiPoint|0|KO-BKO +curvepolygonz0|4326|MultiLineString|0|KO-BKO +curvepolygonz0|4326|MultiPolygon|0|KO-BKO +curvepolygonz0|4326|GeometryCollection|0|KO-BKO +curvepolygonz0|4326|CircularString|0|KO-BKO +curvepolygonz0|4326|CompoundCurve|0|KO-BKO +curvepolygonz0|4326|CurvePolygon|0|KO-BKO +curvepolygonz0|4326|MultiCurve|0|KO-BKO +curvepolygonz0|4326|MultiSurface|0|KO-BKO +curvepolygonz0|4326|PolyhedralSurface|0|KO-BKO +curvepolygonz0|4326|Triangle|0|KO-BKO +curvepolygonz0|4326|Tin|0|KO-BKO +curvepolygonz0|4326|Point|2|KO-BKO +curvepolygonz0|4326|LineString|2|KO-BKO +curvepolygonz0|4326|Polygon|2|KO-BKO +curvepolygonz0|4326|MultiPoint|2|KO-BKO +curvepolygonz0|4326|MultiLineString|2|KO-BKO +curvepolygonz0|4326|MultiPolygon|2|KO-BKO +curvepolygonz0|4326|GeometryCollection|2|KO-BKO +curvepolygonz0|4326|CircularString|2|KO-BKO +curvepolygonz0|4326|CompoundCurve|2|KO-BKO +curvepolygonz0|4326|CurvePolygon|2|OK-BOK +curvepolygonz0|4326|MultiCurve|2|KO-BKO +curvepolygonz0|4326|MultiSurface|2|KO-BKO +curvepolygonz0|4326|PolyhedralSurface|2|KO-BKO +curvepolygonz0|4326|Triangle|2|KO-BKO +curvepolygonz0|4326|Point|1|KO-BKO +curvepolygonz0|4326|LineString|1|KO-BKO +curvepolygonz0|4326|Polygon|1|KO-BKO +curvepolygonz0|4326|MultiPoint|1|KO-BKO +curvepolygonz0|4326|MultiLineString|1|KO-BKO +curvepolygonz0|4326|MultiPolygon|1|KO-BKO +curvepolygonz0|4326|GeometryCollection|1|KO-BKO +curvepolygonz0|4326|CircularString|1|KO-BKO +curvepolygonz0|4326|CompoundCurve|1|KO-BKO +curvepolygonz0|4326|CurvePolygon|1|KO-BKO +curvepolygonz0|4326|MultiCurve|1|KO-BKO +curvepolygonz0|4326|MultiSurface|1|KO-BKO +curvepolygonz0|4326|PolyhedralSurface|1|KO-BKO +curvepolygonz0|4326|Triangle|1|KO-BKO +curvepolygonz0|4326|Point|3|KO-BKO +curvepolygonz0|4326|LineString|3|KO-BKO +curvepolygonz0|4326|Polygon|3|KO-BKO +curvepolygonz0|4326|MultiPoint|3|KO-BKO +curvepolygonz0|4326|MultiLineString|3|KO-BKO +curvepolygonz0|4326|MultiPolygon|3|KO-BKO +curvepolygonz0|4326|GeometryCollection|3|KO-BKO +curvepolygonz0|4326|CircularString|3|KO-BKO +curvepolygonz0|4326|CompoundCurve|3|KO-BKO +curvepolygonz0|4326|CurvePolygon|3|KO-BKO +curvepolygonz0|4326|MultiCurve|3|KO-BKO +curvepolygonz0|4326|MultiSurface|3|KO-BKO +curvepolygonz0|4326|PolyhedralSurface|3|KO-BKO +curvepolygonz0|4326|Triangle|3|KO-BKO +curvepolygonz0||COUNT|4| +curvepolygonz4326|0|Point|0|KO-BKO +curvepolygonz4326|0|LineString|0|KO-BKO +curvepolygonz4326|0|Polygon|0|KO-BKO +curvepolygonz4326|0|MultiPoint|0|KO-BKO +curvepolygonz4326|0|MultiLineString|0|KO-BKO +curvepolygonz4326|0|MultiPolygon|0|KO-BKO +curvepolygonz4326|0|GeometryCollection|0|KO-BKO +curvepolygonz4326|0|CircularString|0|KO-BKO +curvepolygonz4326|0|CompoundCurve|0|KO-BKO +curvepolygonz4326|0|CurvePolygon|0|KO-BKO +curvepolygonz4326|0|MultiCurve|0|KO-BKO +curvepolygonz4326|0|MultiSurface|0|KO-BKO +curvepolygonz4326|0|PolyhedralSurface|0|KO-BKO +curvepolygonz4326|0|Triangle|0|KO-BKO +curvepolygonz4326|0|Tin|0|KO-BKO +curvepolygonz4326|0|Point|2|KO-BKO +curvepolygonz4326|0|LineString|2|KO-BKO +curvepolygonz4326|0|Polygon|2|KO-BKO +curvepolygonz4326|0|MultiPoint|2|KO-BKO +curvepolygonz4326|0|MultiLineString|2|KO-BKO +curvepolygonz4326|0|MultiPolygon|2|KO-BKO +curvepolygonz4326|0|GeometryCollection|2|KO-BKO +curvepolygonz4326|0|CircularString|2|KO-BKO +curvepolygonz4326|0|CompoundCurve|2|KO-BKO +curvepolygonz4326|0|CurvePolygon|2|KO-BKO +curvepolygonz4326|0|MultiCurve|2|KO-BKO +curvepolygonz4326|0|MultiSurface|2|KO-BKO +curvepolygonz4326|0|PolyhedralSurface|2|KO-BKO +curvepolygonz4326|0|Triangle|2|KO-BKO +curvepolygonz4326|0|Point|1|KO-BKO +curvepolygonz4326|0|LineString|1|KO-BKO +curvepolygonz4326|0|Polygon|1|KO-BKO +curvepolygonz4326|0|MultiPoint|1|KO-BKO +curvepolygonz4326|0|MultiLineString|1|KO-BKO +curvepolygonz4326|0|MultiPolygon|1|KO-BKO +curvepolygonz4326|0|GeometryCollection|1|KO-BKO +curvepolygonz4326|0|CircularString|1|KO-BKO +curvepolygonz4326|0|CompoundCurve|1|KO-BKO +curvepolygonz4326|0|CurvePolygon|1|KO-BKO +curvepolygonz4326|0|MultiCurve|1|KO-BKO +curvepolygonz4326|0|MultiSurface|1|KO-BKO +curvepolygonz4326|0|PolyhedralSurface|1|KO-BKO +curvepolygonz4326|0|Triangle|1|KO-BKO +curvepolygonz4326|0|Point|3|KO-BKO +curvepolygonz4326|0|LineString|3|KO-BKO +curvepolygonz4326|0|Polygon|3|KO-BKO +curvepolygonz4326|0|MultiPoint|3|KO-BKO +curvepolygonz4326|0|MultiLineString|3|KO-BKO +curvepolygonz4326|0|MultiPolygon|3|KO-BKO +curvepolygonz4326|0|GeometryCollection|3|KO-BKO +curvepolygonz4326|0|CircularString|3|KO-BKO +curvepolygonz4326|0|CompoundCurve|3|KO-BKO +curvepolygonz4326|0|CurvePolygon|3|KO-BKO +curvepolygonz4326|0|MultiCurve|3|KO-BKO +curvepolygonz4326|0|MultiSurface|3|KO-BKO +curvepolygonz4326|0|PolyhedralSurface|3|KO-BKO +curvepolygonz4326|0|Triangle|3|KO-BKO +curvepolygonz4326|4326|Point|0|KO-BKO +curvepolygonz4326|4326|LineString|0|KO-BKO +curvepolygonz4326|4326|Polygon|0|KO-BKO +curvepolygonz4326|4326|MultiPoint|0|KO-BKO +curvepolygonz4326|4326|MultiLineString|0|KO-BKO +curvepolygonz4326|4326|MultiPolygon|0|KO-BKO +curvepolygonz4326|4326|GeometryCollection|0|KO-BKO +curvepolygonz4326|4326|CircularString|0|KO-BKO +curvepolygonz4326|4326|CompoundCurve|0|KO-BKO +curvepolygonz4326|4326|CurvePolygon|0|KO-BKO +curvepolygonz4326|4326|MultiCurve|0|KO-BKO +curvepolygonz4326|4326|MultiSurface|0|KO-BKO +curvepolygonz4326|4326|PolyhedralSurface|0|KO-BKO +curvepolygonz4326|4326|Triangle|0|KO-BKO +curvepolygonz4326|4326|Tin|0|KO-BKO +curvepolygonz4326|4326|Point|2|KO-BKO +curvepolygonz4326|4326|LineString|2|KO-BKO +curvepolygonz4326|4326|Polygon|2|KO-BKO +curvepolygonz4326|4326|MultiPoint|2|KO-BKO +curvepolygonz4326|4326|MultiLineString|2|KO-BKO +curvepolygonz4326|4326|MultiPolygon|2|KO-BKO +curvepolygonz4326|4326|GeometryCollection|2|KO-BKO +curvepolygonz4326|4326|CircularString|2|KO-BKO +curvepolygonz4326|4326|CompoundCurve|2|KO-BKO +curvepolygonz4326|4326|CurvePolygon|2|OK-BOK +curvepolygonz4326|4326|MultiCurve|2|KO-BKO +curvepolygonz4326|4326|MultiSurface|2|KO-BKO +curvepolygonz4326|4326|PolyhedralSurface|2|KO-BKO +curvepolygonz4326|4326|Triangle|2|KO-BKO +curvepolygonz4326|4326|Point|1|KO-BKO +curvepolygonz4326|4326|LineString|1|KO-BKO +curvepolygonz4326|4326|Polygon|1|KO-BKO +curvepolygonz4326|4326|MultiPoint|1|KO-BKO +curvepolygonz4326|4326|MultiLineString|1|KO-BKO +curvepolygonz4326|4326|MultiPolygon|1|KO-BKO +curvepolygonz4326|4326|GeometryCollection|1|KO-BKO +curvepolygonz4326|4326|CircularString|1|KO-BKO +curvepolygonz4326|4326|CompoundCurve|1|KO-BKO +curvepolygonz4326|4326|CurvePolygon|1|KO-BKO +curvepolygonz4326|4326|MultiCurve|1|KO-BKO +curvepolygonz4326|4326|MultiSurface|1|KO-BKO +curvepolygonz4326|4326|PolyhedralSurface|1|KO-BKO +curvepolygonz4326|4326|Triangle|1|KO-BKO +curvepolygonz4326|4326|Point|3|KO-BKO +curvepolygonz4326|4326|LineString|3|KO-BKO +curvepolygonz4326|4326|Polygon|3|KO-BKO +curvepolygonz4326|4326|MultiPoint|3|KO-BKO +curvepolygonz4326|4326|MultiLineString|3|KO-BKO +curvepolygonz4326|4326|MultiPolygon|3|KO-BKO +curvepolygonz4326|4326|GeometryCollection|3|KO-BKO +curvepolygonz4326|4326|CircularString|3|KO-BKO +curvepolygonz4326|4326|CompoundCurve|3|KO-BKO +curvepolygonz4326|4326|CurvePolygon|3|KO-BKO +curvepolygonz4326|4326|MultiCurve|3|KO-BKO +curvepolygonz4326|4326|MultiSurface|3|KO-BKO +curvepolygonz4326|4326|PolyhedralSurface|3|KO-BKO +curvepolygonz4326|4326|Triangle|3|KO-BKO +curvepolygonz4326||COUNT|2| +curvepolygonzm|0|Point|0|KO-BKO +curvepolygonzm|0|LineString|0|KO-BKO +curvepolygonzm|0|Polygon|0|KO-BKO +curvepolygonzm|0|MultiPoint|0|KO-BKO +curvepolygonzm|0|MultiLineString|0|KO-BKO +curvepolygonzm|0|MultiPolygon|0|KO-BKO +curvepolygonzm|0|GeometryCollection|0|KO-BKO +curvepolygonzm|0|CircularString|0|KO-BKO +curvepolygonzm|0|CompoundCurve|0|KO-BKO +curvepolygonzm|0|CurvePolygon|0|KO-BKO +curvepolygonzm|0|MultiCurve|0|KO-BKO +curvepolygonzm|0|MultiSurface|0|KO-BKO +curvepolygonzm|0|PolyhedralSurface|0|KO-BKO +curvepolygonzm|0|Triangle|0|KO-BKO +curvepolygonzm|0|Tin|0|KO-BKO +curvepolygonzm|0|Point|2|KO-BKO +curvepolygonzm|0|LineString|2|KO-BKO +curvepolygonzm|0|Polygon|2|KO-BKO +curvepolygonzm|0|MultiPoint|2|KO-BKO +curvepolygonzm|0|MultiLineString|2|KO-BKO +curvepolygonzm|0|MultiPolygon|2|KO-BKO +curvepolygonzm|0|GeometryCollection|2|KO-BKO +curvepolygonzm|0|CircularString|2|KO-BKO +curvepolygonzm|0|CompoundCurve|2|KO-BKO +curvepolygonzm|0|CurvePolygon|2|KO-BKO +curvepolygonzm|0|MultiCurve|2|KO-BKO +curvepolygonzm|0|MultiSurface|2|KO-BKO +curvepolygonzm|0|PolyhedralSurface|2|KO-BKO +curvepolygonzm|0|Triangle|2|KO-BKO +curvepolygonzm|0|Point|1|KO-BKO +curvepolygonzm|0|LineString|1|KO-BKO +curvepolygonzm|0|Polygon|1|KO-BKO +curvepolygonzm|0|MultiPoint|1|KO-BKO +curvepolygonzm|0|MultiLineString|1|KO-BKO +curvepolygonzm|0|MultiPolygon|1|KO-BKO +curvepolygonzm|0|GeometryCollection|1|KO-BKO +curvepolygonzm|0|CircularString|1|KO-BKO +curvepolygonzm|0|CompoundCurve|1|KO-BKO +curvepolygonzm|0|CurvePolygon|1|KO-BKO +curvepolygonzm|0|MultiCurve|1|KO-BKO +curvepolygonzm|0|MultiSurface|1|KO-BKO +curvepolygonzm|0|PolyhedralSurface|1|KO-BKO +curvepolygonzm|0|Triangle|1|KO-BKO +curvepolygonzm|0|Point|3|KO-BKO +curvepolygonzm|0|LineString|3|KO-BKO +curvepolygonzm|0|Polygon|3|KO-BKO +curvepolygonzm|0|MultiPoint|3|KO-BKO +curvepolygonzm|0|MultiLineString|3|KO-BKO +curvepolygonzm|0|MultiPolygon|3|KO-BKO +curvepolygonzm|0|GeometryCollection|3|KO-BKO +curvepolygonzm|0|CircularString|3|KO-BKO +curvepolygonzm|0|CompoundCurve|3|KO-BKO +curvepolygonzm|0|CurvePolygon|3|OK-BOK +curvepolygonzm|0|MultiCurve|3|KO-BKO +curvepolygonzm|0|MultiSurface|3|KO-BKO +curvepolygonzm|0|PolyhedralSurface|3|KO-BKO +curvepolygonzm|0|Triangle|3|KO-BKO +curvepolygonzm|4326|Point|0|KO-BKO +curvepolygonzm|4326|LineString|0|KO-BKO +curvepolygonzm|4326|Polygon|0|KO-BKO +curvepolygonzm|4326|MultiPoint|0|KO-BKO +curvepolygonzm|4326|MultiLineString|0|KO-BKO +curvepolygonzm|4326|MultiPolygon|0|KO-BKO +curvepolygonzm|4326|GeometryCollection|0|KO-BKO +curvepolygonzm|4326|CircularString|0|KO-BKO +curvepolygonzm|4326|CompoundCurve|0|KO-BKO +curvepolygonzm|4326|CurvePolygon|0|KO-BKO +curvepolygonzm|4326|MultiCurve|0|KO-BKO +curvepolygonzm|4326|MultiSurface|0|KO-BKO +curvepolygonzm|4326|PolyhedralSurface|0|KO-BKO +curvepolygonzm|4326|Triangle|0|KO-BKO +curvepolygonzm|4326|Tin|0|KO-BKO +curvepolygonzm|4326|Point|2|KO-BKO +curvepolygonzm|4326|LineString|2|KO-BKO +curvepolygonzm|4326|Polygon|2|KO-BKO +curvepolygonzm|4326|MultiPoint|2|KO-BKO +curvepolygonzm|4326|MultiLineString|2|KO-BKO +curvepolygonzm|4326|MultiPolygon|2|KO-BKO +curvepolygonzm|4326|GeometryCollection|2|KO-BKO +curvepolygonzm|4326|CircularString|2|KO-BKO +curvepolygonzm|4326|CompoundCurve|2|KO-BKO +curvepolygonzm|4326|CurvePolygon|2|KO-BKO +curvepolygonzm|4326|MultiCurve|2|KO-BKO +curvepolygonzm|4326|MultiSurface|2|KO-BKO +curvepolygonzm|4326|PolyhedralSurface|2|KO-BKO +curvepolygonzm|4326|Triangle|2|KO-BKO +curvepolygonzm|4326|Point|1|KO-BKO +curvepolygonzm|4326|LineString|1|KO-BKO +curvepolygonzm|4326|Polygon|1|KO-BKO +curvepolygonzm|4326|MultiPoint|1|KO-BKO +curvepolygonzm|4326|MultiLineString|1|KO-BKO +curvepolygonzm|4326|MultiPolygon|1|KO-BKO +curvepolygonzm|4326|GeometryCollection|1|KO-BKO +curvepolygonzm|4326|CircularString|1|KO-BKO +curvepolygonzm|4326|CompoundCurve|1|KO-BKO +curvepolygonzm|4326|CurvePolygon|1|KO-BKO +curvepolygonzm|4326|MultiCurve|1|KO-BKO +curvepolygonzm|4326|MultiSurface|1|KO-BKO +curvepolygonzm|4326|PolyhedralSurface|1|KO-BKO +curvepolygonzm|4326|Triangle|1|KO-BKO +curvepolygonzm|4326|Point|3|KO-BKO +curvepolygonzm|4326|LineString|3|KO-BKO +curvepolygonzm|4326|Polygon|3|KO-BKO +curvepolygonzm|4326|MultiPoint|3|KO-BKO +curvepolygonzm|4326|MultiLineString|3|KO-BKO +curvepolygonzm|4326|MultiPolygon|3|KO-BKO +curvepolygonzm|4326|GeometryCollection|3|KO-BKO +curvepolygonzm|4326|CircularString|3|KO-BKO +curvepolygonzm|4326|CompoundCurve|3|KO-BKO +curvepolygonzm|4326|CurvePolygon|3|OK-BOK +curvepolygonzm|4326|MultiCurve|3|KO-BKO +curvepolygonzm|4326|MultiSurface|3|KO-BKO +curvepolygonzm|4326|PolyhedralSurface|3|KO-BKO +curvepolygonzm|4326|Triangle|3|KO-BKO +curvepolygonzm||COUNT|4| +curvepolygonzm0|0|Point|0|KO-BKO +curvepolygonzm0|0|LineString|0|KO-BKO +curvepolygonzm0|0|Polygon|0|KO-BKO +curvepolygonzm0|0|MultiPoint|0|KO-BKO +curvepolygonzm0|0|MultiLineString|0|KO-BKO +curvepolygonzm0|0|MultiPolygon|0|KO-BKO +curvepolygonzm0|0|GeometryCollection|0|KO-BKO +curvepolygonzm0|0|CircularString|0|KO-BKO +curvepolygonzm0|0|CompoundCurve|0|KO-BKO +curvepolygonzm0|0|CurvePolygon|0|KO-BKO +curvepolygonzm0|0|MultiCurve|0|KO-BKO +curvepolygonzm0|0|MultiSurface|0|KO-BKO +curvepolygonzm0|0|PolyhedralSurface|0|KO-BKO +curvepolygonzm0|0|Triangle|0|KO-BKO +curvepolygonzm0|0|Tin|0|KO-BKO +curvepolygonzm0|0|Point|2|KO-BKO +curvepolygonzm0|0|LineString|2|KO-BKO +curvepolygonzm0|0|Polygon|2|KO-BKO +curvepolygonzm0|0|MultiPoint|2|KO-BKO +curvepolygonzm0|0|MultiLineString|2|KO-BKO +curvepolygonzm0|0|MultiPolygon|2|KO-BKO +curvepolygonzm0|0|GeometryCollection|2|KO-BKO +curvepolygonzm0|0|CircularString|2|KO-BKO +curvepolygonzm0|0|CompoundCurve|2|KO-BKO +curvepolygonzm0|0|CurvePolygon|2|KO-BKO +curvepolygonzm0|0|MultiCurve|2|KO-BKO +curvepolygonzm0|0|MultiSurface|2|KO-BKO +curvepolygonzm0|0|PolyhedralSurface|2|KO-BKO +curvepolygonzm0|0|Triangle|2|KO-BKO +curvepolygonzm0|0|Point|1|KO-BKO +curvepolygonzm0|0|LineString|1|KO-BKO +curvepolygonzm0|0|Polygon|1|KO-BKO +curvepolygonzm0|0|MultiPoint|1|KO-BKO +curvepolygonzm0|0|MultiLineString|1|KO-BKO +curvepolygonzm0|0|MultiPolygon|1|KO-BKO +curvepolygonzm0|0|GeometryCollection|1|KO-BKO +curvepolygonzm0|0|CircularString|1|KO-BKO +curvepolygonzm0|0|CompoundCurve|1|KO-BKO +curvepolygonzm0|0|CurvePolygon|1|KO-BKO +curvepolygonzm0|0|MultiCurve|1|KO-BKO +curvepolygonzm0|0|MultiSurface|1|KO-BKO +curvepolygonzm0|0|PolyhedralSurface|1|KO-BKO +curvepolygonzm0|0|Triangle|1|KO-BKO +curvepolygonzm0|0|Point|3|KO-BKO +curvepolygonzm0|0|LineString|3|KO-BKO +curvepolygonzm0|0|Polygon|3|KO-BKO +curvepolygonzm0|0|MultiPoint|3|KO-BKO +curvepolygonzm0|0|MultiLineString|3|KO-BKO +curvepolygonzm0|0|MultiPolygon|3|KO-BKO +curvepolygonzm0|0|GeometryCollection|3|KO-BKO +curvepolygonzm0|0|CircularString|3|KO-BKO +curvepolygonzm0|0|CompoundCurve|3|KO-BKO +curvepolygonzm0|0|CurvePolygon|3|OK-BOK +curvepolygonzm0|0|MultiCurve|3|KO-BKO +curvepolygonzm0|0|MultiSurface|3|KO-BKO +curvepolygonzm0|0|PolyhedralSurface|3|KO-BKO +curvepolygonzm0|0|Triangle|3|KO-BKO +curvepolygonzm0|4326|Point|0|KO-BKO +curvepolygonzm0|4326|LineString|0|KO-BKO +curvepolygonzm0|4326|Polygon|0|KO-BKO +curvepolygonzm0|4326|MultiPoint|0|KO-BKO +curvepolygonzm0|4326|MultiLineString|0|KO-BKO +curvepolygonzm0|4326|MultiPolygon|0|KO-BKO +curvepolygonzm0|4326|GeometryCollection|0|KO-BKO +curvepolygonzm0|4326|CircularString|0|KO-BKO +curvepolygonzm0|4326|CompoundCurve|0|KO-BKO +curvepolygonzm0|4326|CurvePolygon|0|KO-BKO +curvepolygonzm0|4326|MultiCurve|0|KO-BKO +curvepolygonzm0|4326|MultiSurface|0|KO-BKO +curvepolygonzm0|4326|PolyhedralSurface|0|KO-BKO +curvepolygonzm0|4326|Triangle|0|KO-BKO +curvepolygonzm0|4326|Tin|0|KO-BKO +curvepolygonzm0|4326|Point|2|KO-BKO +curvepolygonzm0|4326|LineString|2|KO-BKO +curvepolygonzm0|4326|Polygon|2|KO-BKO +curvepolygonzm0|4326|MultiPoint|2|KO-BKO +curvepolygonzm0|4326|MultiLineString|2|KO-BKO +curvepolygonzm0|4326|MultiPolygon|2|KO-BKO +curvepolygonzm0|4326|GeometryCollection|2|KO-BKO +curvepolygonzm0|4326|CircularString|2|KO-BKO +curvepolygonzm0|4326|CompoundCurve|2|KO-BKO +curvepolygonzm0|4326|CurvePolygon|2|KO-BKO +curvepolygonzm0|4326|MultiCurve|2|KO-BKO +curvepolygonzm0|4326|MultiSurface|2|KO-BKO +curvepolygonzm0|4326|PolyhedralSurface|2|KO-BKO +curvepolygonzm0|4326|Triangle|2|KO-BKO +curvepolygonzm0|4326|Point|1|KO-BKO +curvepolygonzm0|4326|LineString|1|KO-BKO +curvepolygonzm0|4326|Polygon|1|KO-BKO +curvepolygonzm0|4326|MultiPoint|1|KO-BKO +curvepolygonzm0|4326|MultiLineString|1|KO-BKO +curvepolygonzm0|4326|MultiPolygon|1|KO-BKO +curvepolygonzm0|4326|GeometryCollection|1|KO-BKO +curvepolygonzm0|4326|CircularString|1|KO-BKO +curvepolygonzm0|4326|CompoundCurve|1|KO-BKO +curvepolygonzm0|4326|CurvePolygon|1|KO-BKO +curvepolygonzm0|4326|MultiCurve|1|KO-BKO +curvepolygonzm0|4326|MultiSurface|1|KO-BKO +curvepolygonzm0|4326|PolyhedralSurface|1|KO-BKO +curvepolygonzm0|4326|Triangle|1|KO-BKO +curvepolygonzm0|4326|Point|3|KO-BKO +curvepolygonzm0|4326|LineString|3|KO-BKO +curvepolygonzm0|4326|Polygon|3|KO-BKO +curvepolygonzm0|4326|MultiPoint|3|KO-BKO +curvepolygonzm0|4326|MultiLineString|3|KO-BKO +curvepolygonzm0|4326|MultiPolygon|3|KO-BKO +curvepolygonzm0|4326|GeometryCollection|3|KO-BKO +curvepolygonzm0|4326|CircularString|3|KO-BKO +curvepolygonzm0|4326|CompoundCurve|3|KO-BKO +curvepolygonzm0|4326|CurvePolygon|3|OK-BOK +curvepolygonzm0|4326|MultiCurve|3|KO-BKO +curvepolygonzm0|4326|MultiSurface|3|KO-BKO +curvepolygonzm0|4326|PolyhedralSurface|3|KO-BKO +curvepolygonzm0|4326|Triangle|3|KO-BKO +curvepolygonzm0||COUNT|4| +curvepolygonzm4326|0|Point|0|KO-BKO +curvepolygonzm4326|0|LineString|0|KO-BKO +curvepolygonzm4326|0|Polygon|0|KO-BKO +curvepolygonzm4326|0|MultiPoint|0|KO-BKO +curvepolygonzm4326|0|MultiLineString|0|KO-BKO +curvepolygonzm4326|0|MultiPolygon|0|KO-BKO +curvepolygonzm4326|0|GeometryCollection|0|KO-BKO +curvepolygonzm4326|0|CircularString|0|KO-BKO +curvepolygonzm4326|0|CompoundCurve|0|KO-BKO +curvepolygonzm4326|0|CurvePolygon|0|KO-BKO +curvepolygonzm4326|0|MultiCurve|0|KO-BKO +curvepolygonzm4326|0|MultiSurface|0|KO-BKO +curvepolygonzm4326|0|PolyhedralSurface|0|KO-BKO +curvepolygonzm4326|0|Triangle|0|KO-BKO +curvepolygonzm4326|0|Tin|0|KO-BKO +curvepolygonzm4326|0|Point|2|KO-BKO +curvepolygonzm4326|0|LineString|2|KO-BKO +curvepolygonzm4326|0|Polygon|2|KO-BKO +curvepolygonzm4326|0|MultiPoint|2|KO-BKO +curvepolygonzm4326|0|MultiLineString|2|KO-BKO +curvepolygonzm4326|0|MultiPolygon|2|KO-BKO +curvepolygonzm4326|0|GeometryCollection|2|KO-BKO +curvepolygonzm4326|0|CircularString|2|KO-BKO +curvepolygonzm4326|0|CompoundCurve|2|KO-BKO +curvepolygonzm4326|0|CurvePolygon|2|KO-BKO +curvepolygonzm4326|0|MultiCurve|2|KO-BKO +curvepolygonzm4326|0|MultiSurface|2|KO-BKO +curvepolygonzm4326|0|PolyhedralSurface|2|KO-BKO +curvepolygonzm4326|0|Triangle|2|KO-BKO +curvepolygonzm4326|0|Point|1|KO-BKO +curvepolygonzm4326|0|LineString|1|KO-BKO +curvepolygonzm4326|0|Polygon|1|KO-BKO +curvepolygonzm4326|0|MultiPoint|1|KO-BKO +curvepolygonzm4326|0|MultiLineString|1|KO-BKO +curvepolygonzm4326|0|MultiPolygon|1|KO-BKO +curvepolygonzm4326|0|GeometryCollection|1|KO-BKO +curvepolygonzm4326|0|CircularString|1|KO-BKO +curvepolygonzm4326|0|CompoundCurve|1|KO-BKO +curvepolygonzm4326|0|CurvePolygon|1|KO-BKO +curvepolygonzm4326|0|MultiCurve|1|KO-BKO +curvepolygonzm4326|0|MultiSurface|1|KO-BKO +curvepolygonzm4326|0|PolyhedralSurface|1|KO-BKO +curvepolygonzm4326|0|Triangle|1|KO-BKO +curvepolygonzm4326|0|Point|3|KO-BKO +curvepolygonzm4326|0|LineString|3|KO-BKO +curvepolygonzm4326|0|Polygon|3|KO-BKO +curvepolygonzm4326|0|MultiPoint|3|KO-BKO +curvepolygonzm4326|0|MultiLineString|3|KO-BKO +curvepolygonzm4326|0|MultiPolygon|3|KO-BKO +curvepolygonzm4326|0|GeometryCollection|3|KO-BKO +curvepolygonzm4326|0|CircularString|3|KO-BKO +curvepolygonzm4326|0|CompoundCurve|3|KO-BKO +curvepolygonzm4326|0|CurvePolygon|3|KO-BKO +curvepolygonzm4326|0|MultiCurve|3|KO-BKO +curvepolygonzm4326|0|MultiSurface|3|KO-BKO +curvepolygonzm4326|0|PolyhedralSurface|3|KO-BKO +curvepolygonzm4326|0|Triangle|3|KO-BKO +curvepolygonzm4326|4326|Point|0|KO-BKO +curvepolygonzm4326|4326|LineString|0|KO-BKO +curvepolygonzm4326|4326|Polygon|0|KO-BKO +curvepolygonzm4326|4326|MultiPoint|0|KO-BKO +curvepolygonzm4326|4326|MultiLineString|0|KO-BKO +curvepolygonzm4326|4326|MultiPolygon|0|KO-BKO +curvepolygonzm4326|4326|GeometryCollection|0|KO-BKO +curvepolygonzm4326|4326|CircularString|0|KO-BKO +curvepolygonzm4326|4326|CompoundCurve|0|KO-BKO +curvepolygonzm4326|4326|CurvePolygon|0|KO-BKO +curvepolygonzm4326|4326|MultiCurve|0|KO-BKO +curvepolygonzm4326|4326|MultiSurface|0|KO-BKO +curvepolygonzm4326|4326|PolyhedralSurface|0|KO-BKO +curvepolygonzm4326|4326|Triangle|0|KO-BKO +curvepolygonzm4326|4326|Tin|0|KO-BKO +curvepolygonzm4326|4326|Point|2|KO-BKO +curvepolygonzm4326|4326|LineString|2|KO-BKO +curvepolygonzm4326|4326|Polygon|2|KO-BKO +curvepolygonzm4326|4326|MultiPoint|2|KO-BKO +curvepolygonzm4326|4326|MultiLineString|2|KO-BKO +curvepolygonzm4326|4326|MultiPolygon|2|KO-BKO +curvepolygonzm4326|4326|GeometryCollection|2|KO-BKO +curvepolygonzm4326|4326|CircularString|2|KO-BKO +curvepolygonzm4326|4326|CompoundCurve|2|KO-BKO +curvepolygonzm4326|4326|CurvePolygon|2|KO-BKO +curvepolygonzm4326|4326|MultiCurve|2|KO-BKO +curvepolygonzm4326|4326|MultiSurface|2|KO-BKO +curvepolygonzm4326|4326|PolyhedralSurface|2|KO-BKO +curvepolygonzm4326|4326|Triangle|2|KO-BKO +curvepolygonzm4326|4326|Point|1|KO-BKO +curvepolygonzm4326|4326|LineString|1|KO-BKO +curvepolygonzm4326|4326|Polygon|1|KO-BKO +curvepolygonzm4326|4326|MultiPoint|1|KO-BKO +curvepolygonzm4326|4326|MultiLineString|1|KO-BKO +curvepolygonzm4326|4326|MultiPolygon|1|KO-BKO +curvepolygonzm4326|4326|GeometryCollection|1|KO-BKO +curvepolygonzm4326|4326|CircularString|1|KO-BKO +curvepolygonzm4326|4326|CompoundCurve|1|KO-BKO +curvepolygonzm4326|4326|CurvePolygon|1|KO-BKO +curvepolygonzm4326|4326|MultiCurve|1|KO-BKO +curvepolygonzm4326|4326|MultiSurface|1|KO-BKO +curvepolygonzm4326|4326|PolyhedralSurface|1|KO-BKO +curvepolygonzm4326|4326|Triangle|1|KO-BKO +curvepolygonzm4326|4326|Point|3|KO-BKO +curvepolygonzm4326|4326|LineString|3|KO-BKO +curvepolygonzm4326|4326|Polygon|3|KO-BKO +curvepolygonzm4326|4326|MultiPoint|3|KO-BKO +curvepolygonzm4326|4326|MultiLineString|3|KO-BKO +curvepolygonzm4326|4326|MultiPolygon|3|KO-BKO +curvepolygonzm4326|4326|GeometryCollection|3|KO-BKO +curvepolygonzm4326|4326|CircularString|3|KO-BKO +curvepolygonzm4326|4326|CompoundCurve|3|KO-BKO +curvepolygonzm4326|4326|CurvePolygon|3|OK-BOK +curvepolygonzm4326|4326|MultiCurve|3|KO-BKO +curvepolygonzm4326|4326|MultiSurface|3|KO-BKO +curvepolygonzm4326|4326|PolyhedralSurface|3|KO-BKO +curvepolygonzm4326|4326|Triangle|3|KO-BKO +curvepolygonzm4326||COUNT|2| +geometry|0|Point|0|OK-BOK-GOK-BGOK +geometry|0|LineString|0|OK-BOK-GOK-BGOK +geometry|0|Polygon|0|OK-BOK-GOK-BGOK +geometry|0|MultiPoint|0|OK-BOK-GOK-BGOK +geometry|0|MultiLineString|0|OK-BOK-GOK-BGOK +geometry|0|MultiPolygon|0|OK-BOK-GOK-BGOK +geometry|0|GeometryCollection|0|OK-BOK-GOK-BGOK +geometry|0|CircularString|0|OK-BOK-GKO:-BGKO +geometry|0|CompoundCurve|0|OK-BOK-GKO:-BGKO +geometry|0|CurvePolygon|0|OK-BOK-GKO:-BGKO +geometry|0|MultiCurve|0|OK-BOK-GKO:-BGKO +geometry|0|MultiSurface|0|OK-BOK-GKO:-BGKO +geometry|0|PolyhedralSurface|0|OK-BOK-GKO:-BGKO +geometry|0|Triangle|0|OK-BOK-GKO:-BGKO +geometry|0|Tin|0|OK-BOK-GKO:-BGKO +geometry|0|Point|2|KO-BKO-GKO:-BGKO +geometry|0|LineString|2|KO-BKO-GKO:-BGKO +geometry|0|Polygon|2|KO-BKO-GKO:-BGKO +geometry|0|MultiPoint|2|KO-BKO-GKO:-BGKO +geometry|0|MultiLineString|2|KO-BKO-GKO:-BGKO +geometry|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +geometry|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +geometry|0|CircularString|2|KO-BKO-GKO:-BGKO +geometry|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometry|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometry|0|MultiCurve|2|KO-BKO-GKO:-BGKO +geometry|0|MultiSurface|2|KO-BKO-GKO:-BGKO +geometry|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometry|0|Triangle|2|KO-BKO-GKO:-BGKO +geometry|0|Point|1|KO-BKO-GKO:-BGKO +geometry|0|LineString|1|KO-BKO-GKO:-BGKO +geometry|0|Polygon|1|KO-BKO-GKO:-BGKO +geometry|0|MultiPoint|1|KO-BKO-GKO:-BGKO +geometry|0|MultiLineString|1|KO-BKO-GKO:-BGKO +geometry|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +geometry|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +geometry|0|CircularString|1|KO-BKO-GKO:-BGKO +geometry|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometry|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometry|0|MultiCurve|1|KO-BKO-GKO:-BGKO +geometry|0|MultiSurface|1|KO-BKO-GKO:-BGKO +geometry|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometry|0|Triangle|1|KO-BKO-GKO:-BGKO +geometry|0|Point|3|KO-BKO-GKO:-BGKO +geometry|0|LineString|3|KO-BKO-GKO:-BGKO +geometry|0|Polygon|3|KO-BKO-GKO:-BGKO +geometry|0|MultiPoint|3|KO-BKO-GKO:-BGKO +geometry|0|MultiLineString|3|KO-BKO-GKO:-BGKO +geometry|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +geometry|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +geometry|0|CircularString|3|KO-BKO-GKO:-BGKO +geometry|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometry|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometry|0|MultiCurve|3|KO-BKO-GKO:-BGKO +geometry|0|MultiSurface|3|KO-BKO-GKO:-BGKO +geometry|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometry|0|Triangle|3|KO-BKO-GKO:-BGKO +geometry|4326|Point|0|OK-BOK-GOK-BGOK +geometry|4326|LineString|0|OK-BOK-GOK-BGOK +geometry|4326|Polygon|0|OK-BOK-GOK-BGOK +geometry|4326|MultiPoint|0|OK-BOK-GOK-BGOK +geometry|4326|MultiLineString|0|OK-BOK-GOK-BGOK +geometry|4326|MultiPolygon|0|OK-BOK-GOK-BGOK +geometry|4326|GeometryCollection|0|OK-BOK-GOK-BGOK +geometry|4326|CircularString|0|OK-BOK-GKO:-BGKO +geometry|4326|CompoundCurve|0|OK-BOK-GKO:-BGKO +geometry|4326|CurvePolygon|0|OK-BOK-GKO:-BGKO +geometry|4326|MultiCurve|0|OK-BOK-GKO:-BGKO +geometry|4326|MultiSurface|0|OK-BOK-GKO:-BGKO +geometry|4326|PolyhedralSurface|0|OK-BOK-GKO:-BGKO +geometry|4326|Triangle|0|OK-BOK-GKO:-BGKO +geometry|4326|Tin|0|OK-BOK-GKO:-BGKO +geometry|4326|Point|2|KO-BKO-GKO:-BGKO +geometry|4326|LineString|2|KO-BKO-GKO:-BGKO +geometry|4326|Polygon|2|KO-BKO-GKO:-BGKO +geometry|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +geometry|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +geometry|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +geometry|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +geometry|4326|CircularString|2|KO-BKO-GKO:-BGKO +geometry|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometry|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometry|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +geometry|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +geometry|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometry|4326|Triangle|2|KO-BKO-GKO:-BGKO +geometry|4326|Point|1|KO-BKO-GKO:-BGKO +geometry|4326|LineString|1|KO-BKO-GKO:-BGKO +geometry|4326|Polygon|1|KO-BKO-GKO:-BGKO +geometry|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +geometry|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +geometry|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +geometry|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +geometry|4326|CircularString|1|KO-BKO-GKO:-BGKO +geometry|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometry|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometry|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +geometry|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +geometry|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometry|4326|Triangle|1|KO-BKO-GKO:-BGKO +geometry|4326|Point|3|KO-BKO-GKO:-BGKO +geometry|4326|LineString|3|KO-BKO-GKO:-BGKO +geometry|4326|Polygon|3|KO-BKO-GKO:-BGKO +geometry|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +geometry|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +geometry|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +geometry|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +geometry|4326|CircularString|3|KO-BKO-GKO:-BGKO +geometry|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometry|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometry|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +geometry|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +geometry|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometry|4326|Triangle|3|KO-BKO-GKO:-BGKO +geometry||COUNT|60| +geometry||GCOUNT|28| +geometry0|0|Point|0|OK-BOK-GOK-BGOK +geometry0|0|LineString|0|OK-BOK-GOK-BGOK +geometry0|0|Polygon|0|OK-BOK-GOK-BGOK +geometry0|0|MultiPoint|0|OK-BOK-GOK-BGOK +geometry0|0|MultiLineString|0|OK-BOK-GOK-BGOK +geometry0|0|MultiPolygon|0|OK-BOK-GOK-BGOK +geometry0|0|GeometryCollection|0|OK-BOK-GOK-BGOK +geometry0|0|CircularString|0|OK-BOK-GKO:-BGKO +geometry0|0|CompoundCurve|0|OK-BOK-GKO:-BGKO +geometry0|0|CurvePolygon|0|OK-BOK-GKO:-BGKO +geometry0|0|MultiCurve|0|OK-BOK-GKO:-BGKO +geometry0|0|MultiSurface|0|OK-BOK-GKO:-BGKO +geometry0|0|PolyhedralSurface|0|OK-BOK-GKO:-BGKO +geometry0|0|Triangle|0|OK-BOK-GKO:-BGKO +geometry0|0|Tin|0|OK-BOK-GKO:-BGKO +geometry0|0|Point|2|KO-BKO-GKO:-BGKO +geometry0|0|LineString|2|KO-BKO-GKO:-BGKO +geometry0|0|Polygon|2|KO-BKO-GKO:-BGKO +geometry0|0|MultiPoint|2|KO-BKO-GKO:-BGKO +geometry0|0|MultiLineString|2|KO-BKO-GKO:-BGKO +geometry0|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +geometry0|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +geometry0|0|CircularString|2|KO-BKO-GKO:-BGKO +geometry0|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometry0|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometry0|0|MultiCurve|2|KO-BKO-GKO:-BGKO +geometry0|0|MultiSurface|2|KO-BKO-GKO:-BGKO +geometry0|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometry0|0|Triangle|2|KO-BKO-GKO:-BGKO +geometry0|0|Point|1|KO-BKO-GKO:-BGKO +geometry0|0|LineString|1|KO-BKO-GKO:-BGKO +geometry0|0|Polygon|1|KO-BKO-GKO:-BGKO +geometry0|0|MultiPoint|1|KO-BKO-GKO:-BGKO +geometry0|0|MultiLineString|1|KO-BKO-GKO:-BGKO +geometry0|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +geometry0|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +geometry0|0|CircularString|1|KO-BKO-GKO:-BGKO +geometry0|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometry0|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometry0|0|MultiCurve|1|KO-BKO-GKO:-BGKO +geometry0|0|MultiSurface|1|KO-BKO-GKO:-BGKO +geometry0|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometry0|0|Triangle|1|KO-BKO-GKO:-BGKO +geometry0|0|Point|3|KO-BKO-GKO:-BGKO +geometry0|0|LineString|3|KO-BKO-GKO:-BGKO +geometry0|0|Polygon|3|KO-BKO-GKO:-BGKO +geometry0|0|MultiPoint|3|KO-BKO-GKO:-BGKO +geometry0|0|MultiLineString|3|KO-BKO-GKO:-BGKO +geometry0|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +geometry0|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +geometry0|0|CircularString|3|KO-BKO-GKO:-BGKO +geometry0|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometry0|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometry0|0|MultiCurve|3|KO-BKO-GKO:-BGKO +geometry0|0|MultiSurface|3|KO-BKO-GKO:-BGKO +geometry0|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometry0|0|Triangle|3|KO-BKO-GKO:-BGKO +geometry0|4326|Point|0|OK-BOK-GOK-BGOK +geometry0|4326|LineString|0|OK-BOK-GOK-BGOK +geometry0|4326|Polygon|0|OK-BOK-GOK-BGOK +geometry0|4326|MultiPoint|0|OK-BOK-GOK-BGOK +geometry0|4326|MultiLineString|0|OK-BOK-GOK-BGOK +geometry0|4326|MultiPolygon|0|OK-BOK-GOK-BGOK +geometry0|4326|GeometryCollection|0|OK-BOK-GOK-BGOK +geometry0|4326|CircularString|0|OK-BOK-GKO:-BGKO +geometry0|4326|CompoundCurve|0|OK-BOK-GKO:-BGKO +geometry0|4326|CurvePolygon|0|OK-BOK-GKO:-BGKO +geometry0|4326|MultiCurve|0|OK-BOK-GKO:-BGKO +geometry0|4326|MultiSurface|0|OK-BOK-GKO:-BGKO +geometry0|4326|PolyhedralSurface|0|OK-BOK-GKO:-BGKO +geometry0|4326|Triangle|0|OK-BOK-GKO:-BGKO +geometry0|4326|Tin|0|OK-BOK-GKO:-BGKO +geometry0|4326|Point|2|KO-BKO-GKO:-BGKO +geometry0|4326|LineString|2|KO-BKO-GKO:-BGKO +geometry0|4326|Polygon|2|KO-BKO-GKO:-BGKO +geometry0|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +geometry0|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +geometry0|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +geometry0|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +geometry0|4326|CircularString|2|KO-BKO-GKO:-BGKO +geometry0|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometry0|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometry0|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +geometry0|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +geometry0|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometry0|4326|Triangle|2|KO-BKO-GKO:-BGKO +geometry0|4326|Point|1|KO-BKO-GKO:-BGKO +geometry0|4326|LineString|1|KO-BKO-GKO:-BGKO +geometry0|4326|Polygon|1|KO-BKO-GKO:-BGKO +geometry0|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +geometry0|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +geometry0|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +geometry0|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +geometry0|4326|CircularString|1|KO-BKO-GKO:-BGKO +geometry0|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometry0|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometry0|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +geometry0|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +geometry0|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometry0|4326|Triangle|1|KO-BKO-GKO:-BGKO +geometry0|4326|Point|3|KO-BKO-GKO:-BGKO +geometry0|4326|LineString|3|KO-BKO-GKO:-BGKO +geometry0|4326|Polygon|3|KO-BKO-GKO:-BGKO +geometry0|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +geometry0|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +geometry0|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +geometry0|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +geometry0|4326|CircularString|3|KO-BKO-GKO:-BGKO +geometry0|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometry0|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometry0|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +geometry0|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +geometry0|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometry0|4326|Triangle|3|KO-BKO-GKO:-BGKO +geometry0||COUNT|60| +geometry0||GCOUNT|28| +geometry4326|0|Point|0|KO-BKO-GOK-BGOK +geometry4326|0|LineString|0|KO-BKO-GOK-BGOK +geometry4326|0|Polygon|0|KO-BKO-GOK-BGOK +geometry4326|0|MultiPoint|0|KO-BKO-GOK-BGOK +geometry4326|0|MultiLineString|0|KO-BKO-GOK-BGOK +geometry4326|0|MultiPolygon|0|KO-BKO-GOK-BGOK +geometry4326|0|GeometryCollection|0|KO-BKO-GOK-BGOK +geometry4326|0|CircularString|0|KO-BKO-GKO:-BGKO +geometry4326|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometry4326|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometry4326|0|MultiCurve|0|KO-BKO-GKO:-BGKO +geometry4326|0|MultiSurface|0|KO-BKO-GKO:-BGKO +geometry4326|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometry4326|0|Triangle|0|KO-BKO-GKO:-BGKO +geometry4326|0|Tin|0|KO-BKO-GKO:-BGKO +geometry4326|0|Point|2|KO-BKO-GKO:-BGKO +geometry4326|0|LineString|2|KO-BKO-GKO:-BGKO +geometry4326|0|Polygon|2|KO-BKO-GKO:-BGKO +geometry4326|0|MultiPoint|2|KO-BKO-GKO:-BGKO +geometry4326|0|MultiLineString|2|KO-BKO-GKO:-BGKO +geometry4326|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +geometry4326|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +geometry4326|0|CircularString|2|KO-BKO-GKO:-BGKO +geometry4326|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometry4326|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometry4326|0|MultiCurve|2|KO-BKO-GKO:-BGKO +geometry4326|0|MultiSurface|2|KO-BKO-GKO:-BGKO +geometry4326|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometry4326|0|Triangle|2|KO-BKO-GKO:-BGKO +geometry4326|0|Point|1|KO-BKO-GKO:-BGKO +geometry4326|0|LineString|1|KO-BKO-GKO:-BGKO +geometry4326|0|Polygon|1|KO-BKO-GKO:-BGKO +geometry4326|0|MultiPoint|1|KO-BKO-GKO:-BGKO +geometry4326|0|MultiLineString|1|KO-BKO-GKO:-BGKO +geometry4326|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +geometry4326|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +geometry4326|0|CircularString|1|KO-BKO-GKO:-BGKO +geometry4326|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometry4326|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometry4326|0|MultiCurve|1|KO-BKO-GKO:-BGKO +geometry4326|0|MultiSurface|1|KO-BKO-GKO:-BGKO +geometry4326|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometry4326|0|Triangle|1|KO-BKO-GKO:-BGKO +geometry4326|0|Point|3|KO-BKO-GKO:-BGKO +geometry4326|0|LineString|3|KO-BKO-GKO:-BGKO +geometry4326|0|Polygon|3|KO-BKO-GKO:-BGKO +geometry4326|0|MultiPoint|3|KO-BKO-GKO:-BGKO +geometry4326|0|MultiLineString|3|KO-BKO-GKO:-BGKO +geometry4326|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +geometry4326|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +geometry4326|0|CircularString|3|KO-BKO-GKO:-BGKO +geometry4326|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometry4326|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometry4326|0|MultiCurve|3|KO-BKO-GKO:-BGKO +geometry4326|0|MultiSurface|3|KO-BKO-GKO:-BGKO +geometry4326|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometry4326|0|Triangle|3|KO-BKO-GKO:-BGKO +geometry4326|4326|Point|0|OK-BOK-GOK-BGOK +geometry4326|4326|LineString|0|OK-BOK-GOK-BGOK +geometry4326|4326|Polygon|0|OK-BOK-GOK-BGOK +geometry4326|4326|MultiPoint|0|OK-BOK-GOK-BGOK +geometry4326|4326|MultiLineString|0|OK-BOK-GOK-BGOK +geometry4326|4326|MultiPolygon|0|OK-BOK-GOK-BGOK +geometry4326|4326|GeometryCollection|0|OK-BOK-GOK-BGOK +geometry4326|4326|CircularString|0|OK-BOK-GKO:-BGKO +geometry4326|4326|CompoundCurve|0|OK-BOK-GKO:-BGKO +geometry4326|4326|CurvePolygon|0|OK-BOK-GKO:-BGKO +geometry4326|4326|MultiCurve|0|OK-BOK-GKO:-BGKO +geometry4326|4326|MultiSurface|0|OK-BOK-GKO:-BGKO +geometry4326|4326|PolyhedralSurface|0|OK-BOK-GKO:-BGKO +geometry4326|4326|Triangle|0|OK-BOK-GKO:-BGKO +geometry4326|4326|Tin|0|OK-BOK-GKO:-BGKO +geometry4326|4326|Point|2|KO-BKO-GKO:-BGKO +geometry4326|4326|LineString|2|KO-BKO-GKO:-BGKO +geometry4326|4326|Polygon|2|KO-BKO-GKO:-BGKO +geometry4326|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +geometry4326|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +geometry4326|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +geometry4326|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +geometry4326|4326|CircularString|2|KO-BKO-GKO:-BGKO +geometry4326|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometry4326|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometry4326|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +geometry4326|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +geometry4326|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometry4326|4326|Triangle|2|KO-BKO-GKO:-BGKO +geometry4326|4326|Point|1|KO-BKO-GKO:-BGKO +geometry4326|4326|LineString|1|KO-BKO-GKO:-BGKO +geometry4326|4326|Polygon|1|KO-BKO-GKO:-BGKO +geometry4326|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +geometry4326|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +geometry4326|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +geometry4326|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +geometry4326|4326|CircularString|1|KO-BKO-GKO:-BGKO +geometry4326|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometry4326|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometry4326|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +geometry4326|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +geometry4326|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometry4326|4326|Triangle|1|KO-BKO-GKO:-BGKO +geometry4326|4326|Point|3|KO-BKO-GKO:-BGKO +geometry4326|4326|LineString|3|KO-BKO-GKO:-BGKO +geometry4326|4326|Polygon|3|KO-BKO-GKO:-BGKO +geometry4326|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +geometry4326|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +geometry4326|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +geometry4326|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +geometry4326|4326|CircularString|3|KO-BKO-GKO:-BGKO +geometry4326|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometry4326|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometry4326|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +geometry4326|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +geometry4326|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometry4326|4326|Triangle|3|KO-BKO-GKO:-BGKO +geometry4326||COUNT|30| +geometry4326||GCOUNT|28| +geometrycollection|0|Point|0|KO-BKO-GKO:-BGKO +geometrycollection|0|LineString|0|KO-BKO-GKO:-BGKO +geometrycollection|0|Polygon|0|KO-BKO-GKO:-BGKO +geometrycollection|0|MultiPoint|0|KO-BKO-GKO:-BGKO +geometrycollection|0|MultiLineString|0|KO-BKO-GKO:-BGKO +geometrycollection|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +geometrycollection|0|GeometryCollection|0|OK-BOK-GOK-BGOK +geometrycollection|0|CircularString|0|KO-BKO-GKO:-BGKO +geometrycollection|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometrycollection|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometrycollection|0|MultiCurve|0|KO-BKO-GKO:-BGKO +geometrycollection|0|MultiSurface|0|KO-BKO-GKO:-BGKO +geometrycollection|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometrycollection|0|Triangle|0|KO-BKO-GKO:-BGKO +geometrycollection|0|Tin|0|KO-BKO-GKO:-BGKO +geometrycollection|0|Point|2|KO-BKO-GKO:-BGKO +geometrycollection|0|LineString|2|KO-BKO-GKO:-BGKO +geometrycollection|0|Polygon|2|KO-BKO-GKO:-BGKO +geometrycollection|0|MultiPoint|2|KO-BKO-GKO:-BGKO +geometrycollection|0|MultiLineString|2|KO-BKO-GKO:-BGKO +geometrycollection|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +geometrycollection|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +geometrycollection|0|CircularString|2|KO-BKO-GKO:-BGKO +geometrycollection|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometrycollection|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometrycollection|0|MultiCurve|2|KO-BKO-GKO:-BGKO +geometrycollection|0|MultiSurface|2|KO-BKO-GKO:-BGKO +geometrycollection|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometrycollection|0|Triangle|2|KO-BKO-GKO:-BGKO +geometrycollection|0|Point|1|KO-BKO-GKO:-BGKO +geometrycollection|0|LineString|1|KO-BKO-GKO:-BGKO +geometrycollection|0|Polygon|1|KO-BKO-GKO:-BGKO +geometrycollection|0|MultiPoint|1|KO-BKO-GKO:-BGKO +geometrycollection|0|MultiLineString|1|KO-BKO-GKO:-BGKO +geometrycollection|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +geometrycollection|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +geometrycollection|0|CircularString|1|KO-BKO-GKO:-BGKO +geometrycollection|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometrycollection|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometrycollection|0|MultiCurve|1|KO-BKO-GKO:-BGKO +geometrycollection|0|MultiSurface|1|KO-BKO-GKO:-BGKO +geometrycollection|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometrycollection|0|Triangle|1|KO-BKO-GKO:-BGKO +geometrycollection|0|Point|3|KO-BKO-GKO:-BGKO +geometrycollection|0|LineString|3|KO-BKO-GKO:-BGKO +geometrycollection|0|Polygon|3|KO-BKO-GKO:-BGKO +geometrycollection|0|MultiPoint|3|KO-BKO-GKO:-BGKO +geometrycollection|0|MultiLineString|3|KO-BKO-GKO:-BGKO +geometrycollection|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +geometrycollection|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +geometrycollection|0|CircularString|3|KO-BKO-GKO:-BGKO +geometrycollection|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometrycollection|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometrycollection|0|MultiCurve|3|KO-BKO-GKO:-BGKO +geometrycollection|0|MultiSurface|3|KO-BKO-GKO:-BGKO +geometrycollection|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometrycollection|0|Triangle|3|KO-BKO-GKO:-BGKO +geometrycollection|4326|Point|0|KO-BKO-GKO:-BGKO +geometrycollection|4326|LineString|0|KO-BKO-GKO:-BGKO +geometrycollection|4326|Polygon|0|KO-BKO-GKO:-BGKO +geometrycollection|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +geometrycollection|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +geometrycollection|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +geometrycollection|4326|GeometryCollection|0|OK-BOK-GOK-BGOK +geometrycollection|4326|CircularString|0|KO-BKO-GKO:-BGKO +geometrycollection|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometrycollection|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometrycollection|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +geometrycollection|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +geometrycollection|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometrycollection|4326|Triangle|0|KO-BKO-GKO:-BGKO +geometrycollection|4326|Tin|0|KO-BKO-GKO:-BGKO +geometrycollection|4326|Point|2|KO-BKO-GKO:-BGKO +geometrycollection|4326|LineString|2|KO-BKO-GKO:-BGKO +geometrycollection|4326|Polygon|2|KO-BKO-GKO:-BGKO +geometrycollection|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +geometrycollection|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +geometrycollection|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +geometrycollection|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +geometrycollection|4326|CircularString|2|KO-BKO-GKO:-BGKO +geometrycollection|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometrycollection|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometrycollection|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +geometrycollection|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +geometrycollection|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometrycollection|4326|Triangle|2|KO-BKO-GKO:-BGKO +geometrycollection|4326|Point|1|KO-BKO-GKO:-BGKO +geometrycollection|4326|LineString|1|KO-BKO-GKO:-BGKO +geometrycollection|4326|Polygon|1|KO-BKO-GKO:-BGKO +geometrycollection|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +geometrycollection|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +geometrycollection|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +geometrycollection|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +geometrycollection|4326|CircularString|1|KO-BKO-GKO:-BGKO +geometrycollection|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometrycollection|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometrycollection|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +geometrycollection|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +geometrycollection|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometrycollection|4326|Triangle|1|KO-BKO-GKO:-BGKO +geometrycollection|4326|Point|3|KO-BKO-GKO:-BGKO +geometrycollection|4326|LineString|3|KO-BKO-GKO:-BGKO +geometrycollection|4326|Polygon|3|KO-BKO-GKO:-BGKO +geometrycollection|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +geometrycollection|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +geometrycollection|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +geometrycollection|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +geometrycollection|4326|CircularString|3|KO-BKO-GKO:-BGKO +geometrycollection|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometrycollection|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometrycollection|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +geometrycollection|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +geometrycollection|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometrycollection|4326|Triangle|3|KO-BKO-GKO:-BGKO +geometrycollection||COUNT|4| +geometrycollection||GCOUNT|4| +geometrycollection0|0|Point|0|KO-BKO-GKO:-BGKO +geometrycollection0|0|LineString|0|KO-BKO-GKO:-BGKO +geometrycollection0|0|Polygon|0|KO-BKO-GKO:-BGKO +geometrycollection0|0|MultiPoint|0|KO-BKO-GKO:-BGKO +geometrycollection0|0|MultiLineString|0|KO-BKO-GKO:-BGKO +geometrycollection0|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +geometrycollection0|0|GeometryCollection|0|OK-BOK-GOK-BGOK +geometrycollection0|0|CircularString|0|KO-BKO-GKO:-BGKO +geometrycollection0|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometrycollection0|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometrycollection0|0|MultiCurve|0|KO-BKO-GKO:-BGKO +geometrycollection0|0|MultiSurface|0|KO-BKO-GKO:-BGKO +geometrycollection0|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometrycollection0|0|Triangle|0|KO-BKO-GKO:-BGKO +geometrycollection0|0|Tin|0|KO-BKO-GKO:-BGKO +geometrycollection0|0|Point|2|KO-BKO-GKO:-BGKO +geometrycollection0|0|LineString|2|KO-BKO-GKO:-BGKO +geometrycollection0|0|Polygon|2|KO-BKO-GKO:-BGKO +geometrycollection0|0|MultiPoint|2|KO-BKO-GKO:-BGKO +geometrycollection0|0|MultiLineString|2|KO-BKO-GKO:-BGKO +geometrycollection0|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +geometrycollection0|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +geometrycollection0|0|CircularString|2|KO-BKO-GKO:-BGKO +geometrycollection0|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometrycollection0|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometrycollection0|0|MultiCurve|2|KO-BKO-GKO:-BGKO +geometrycollection0|0|MultiSurface|2|KO-BKO-GKO:-BGKO +geometrycollection0|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometrycollection0|0|Triangle|2|KO-BKO-GKO:-BGKO +geometrycollection0|0|Point|1|KO-BKO-GKO:-BGKO +geometrycollection0|0|LineString|1|KO-BKO-GKO:-BGKO +geometrycollection0|0|Polygon|1|KO-BKO-GKO:-BGKO +geometrycollection0|0|MultiPoint|1|KO-BKO-GKO:-BGKO +geometrycollection0|0|MultiLineString|1|KO-BKO-GKO:-BGKO +geometrycollection0|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +geometrycollection0|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +geometrycollection0|0|CircularString|1|KO-BKO-GKO:-BGKO +geometrycollection0|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometrycollection0|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometrycollection0|0|MultiCurve|1|KO-BKO-GKO:-BGKO +geometrycollection0|0|MultiSurface|1|KO-BKO-GKO:-BGKO +geometrycollection0|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometrycollection0|0|Triangle|1|KO-BKO-GKO:-BGKO +geometrycollection0|0|Point|3|KO-BKO-GKO:-BGKO +geometrycollection0|0|LineString|3|KO-BKO-GKO:-BGKO +geometrycollection0|0|Polygon|3|KO-BKO-GKO:-BGKO +geometrycollection0|0|MultiPoint|3|KO-BKO-GKO:-BGKO +geometrycollection0|0|MultiLineString|3|KO-BKO-GKO:-BGKO +geometrycollection0|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +geometrycollection0|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +geometrycollection0|0|CircularString|3|KO-BKO-GKO:-BGKO +geometrycollection0|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometrycollection0|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometrycollection0|0|MultiCurve|3|KO-BKO-GKO:-BGKO +geometrycollection0|0|MultiSurface|3|KO-BKO-GKO:-BGKO +geometrycollection0|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometrycollection0|0|Triangle|3|KO-BKO-GKO:-BGKO +geometrycollection0|4326|Point|0|KO-BKO-GKO:-BGKO +geometrycollection0|4326|LineString|0|KO-BKO-GKO:-BGKO +geometrycollection0|4326|Polygon|0|KO-BKO-GKO:-BGKO +geometrycollection0|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +geometrycollection0|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +geometrycollection0|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +geometrycollection0|4326|GeometryCollection|0|OK-BOK-GOK-BGOK +geometrycollection0|4326|CircularString|0|KO-BKO-GKO:-BGKO +geometrycollection0|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometrycollection0|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometrycollection0|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +geometrycollection0|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +geometrycollection0|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometrycollection0|4326|Triangle|0|KO-BKO-GKO:-BGKO +geometrycollection0|4326|Tin|0|KO-BKO-GKO:-BGKO +geometrycollection0|4326|Point|2|KO-BKO-GKO:-BGKO +geometrycollection0|4326|LineString|2|KO-BKO-GKO:-BGKO +geometrycollection0|4326|Polygon|2|KO-BKO-GKO:-BGKO +geometrycollection0|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +geometrycollection0|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +geometrycollection0|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +geometrycollection0|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +geometrycollection0|4326|CircularString|2|KO-BKO-GKO:-BGKO +geometrycollection0|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometrycollection0|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometrycollection0|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +geometrycollection0|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +geometrycollection0|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometrycollection0|4326|Triangle|2|KO-BKO-GKO:-BGKO +geometrycollection0|4326|Point|1|KO-BKO-GKO:-BGKO +geometrycollection0|4326|LineString|1|KO-BKO-GKO:-BGKO +geometrycollection0|4326|Polygon|1|KO-BKO-GKO:-BGKO +geometrycollection0|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +geometrycollection0|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +geometrycollection0|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +geometrycollection0|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +geometrycollection0|4326|CircularString|1|KO-BKO-GKO:-BGKO +geometrycollection0|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometrycollection0|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometrycollection0|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +geometrycollection0|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +geometrycollection0|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometrycollection0|4326|Triangle|1|KO-BKO-GKO:-BGKO +geometrycollection0|4326|Point|3|KO-BKO-GKO:-BGKO +geometrycollection0|4326|LineString|3|KO-BKO-GKO:-BGKO +geometrycollection0|4326|Polygon|3|KO-BKO-GKO:-BGKO +geometrycollection0|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +geometrycollection0|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +geometrycollection0|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +geometrycollection0|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +geometrycollection0|4326|CircularString|3|KO-BKO-GKO:-BGKO +geometrycollection0|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometrycollection0|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometrycollection0|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +geometrycollection0|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +geometrycollection0|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometrycollection0|4326|Triangle|3|KO-BKO-GKO:-BGKO +geometrycollection0||COUNT|4| +geometrycollection0||GCOUNT|4| +geometrycollection4326|0|Point|0|KO-BKO-GKO:-BGKO +geometrycollection4326|0|LineString|0|KO-BKO-GKO:-BGKO +geometrycollection4326|0|Polygon|0|KO-BKO-GKO:-BGKO +geometrycollection4326|0|MultiPoint|0|KO-BKO-GKO:-BGKO +geometrycollection4326|0|MultiLineString|0|KO-BKO-GKO:-BGKO +geometrycollection4326|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +geometrycollection4326|0|GeometryCollection|0|KO-BKO-GOK-BGOK +geometrycollection4326|0|CircularString|0|KO-BKO-GKO:-BGKO +geometrycollection4326|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometrycollection4326|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometrycollection4326|0|MultiCurve|0|KO-BKO-GKO:-BGKO +geometrycollection4326|0|MultiSurface|0|KO-BKO-GKO:-BGKO +geometrycollection4326|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometrycollection4326|0|Triangle|0|KO-BKO-GKO:-BGKO +geometrycollection4326|0|Tin|0|KO-BKO-GKO:-BGKO +geometrycollection4326|0|Point|2|KO-BKO-GKO:-BGKO +geometrycollection4326|0|LineString|2|KO-BKO-GKO:-BGKO +geometrycollection4326|0|Polygon|2|KO-BKO-GKO:-BGKO +geometrycollection4326|0|MultiPoint|2|KO-BKO-GKO:-BGKO +geometrycollection4326|0|MultiLineString|2|KO-BKO-GKO:-BGKO +geometrycollection4326|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +geometrycollection4326|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +geometrycollection4326|0|CircularString|2|KO-BKO-GKO:-BGKO +geometrycollection4326|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometrycollection4326|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometrycollection4326|0|MultiCurve|2|KO-BKO-GKO:-BGKO +geometrycollection4326|0|MultiSurface|2|KO-BKO-GKO:-BGKO +geometrycollection4326|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometrycollection4326|0|Triangle|2|KO-BKO-GKO:-BGKO +geometrycollection4326|0|Point|1|KO-BKO-GKO:-BGKO +geometrycollection4326|0|LineString|1|KO-BKO-GKO:-BGKO +geometrycollection4326|0|Polygon|1|KO-BKO-GKO:-BGKO +geometrycollection4326|0|MultiPoint|1|KO-BKO-GKO:-BGKO +geometrycollection4326|0|MultiLineString|1|KO-BKO-GKO:-BGKO +geometrycollection4326|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +geometrycollection4326|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +geometrycollection4326|0|CircularString|1|KO-BKO-GKO:-BGKO +geometrycollection4326|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometrycollection4326|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometrycollection4326|0|MultiCurve|1|KO-BKO-GKO:-BGKO +geometrycollection4326|0|MultiSurface|1|KO-BKO-GKO:-BGKO +geometrycollection4326|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometrycollection4326|0|Triangle|1|KO-BKO-GKO:-BGKO +geometrycollection4326|0|Point|3|KO-BKO-GKO:-BGKO +geometrycollection4326|0|LineString|3|KO-BKO-GKO:-BGKO +geometrycollection4326|0|Polygon|3|KO-BKO-GKO:-BGKO +geometrycollection4326|0|MultiPoint|3|KO-BKO-GKO:-BGKO +geometrycollection4326|0|MultiLineString|3|KO-BKO-GKO:-BGKO +geometrycollection4326|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +geometrycollection4326|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +geometrycollection4326|0|CircularString|3|KO-BKO-GKO:-BGKO +geometrycollection4326|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometrycollection4326|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometrycollection4326|0|MultiCurve|3|KO-BKO-GKO:-BGKO +geometrycollection4326|0|MultiSurface|3|KO-BKO-GKO:-BGKO +geometrycollection4326|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometrycollection4326|0|Triangle|3|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|Point|0|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|LineString|0|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|Polygon|0|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|GeometryCollection|0|OK-BOK-GOK-BGOK +geometrycollection4326|4326|CircularString|0|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|Triangle|0|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|Tin|0|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|Point|2|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|LineString|2|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|Polygon|2|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|CircularString|2|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|Triangle|2|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|Point|1|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|LineString|1|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|Polygon|1|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|CircularString|1|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|Triangle|1|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|Point|3|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|LineString|3|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|Polygon|3|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|CircularString|3|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometrycollection4326|4326|Triangle|3|KO-BKO-GKO:-BGKO +geometrycollection4326||COUNT|2| +geometrycollection4326||GCOUNT|4| +geometrycollectionm|0|Point|0|KO-BKO-GKO:-BGKO +geometrycollectionm|0|LineString|0|KO-BKO-GKO:-BGKO +geometrycollectionm|0|Polygon|0|KO-BKO-GKO:-BGKO +geometrycollectionm|0|MultiPoint|0|KO-BKO-GKO:-BGKO +geometrycollectionm|0|MultiLineString|0|KO-BKO-GKO:-BGKO +geometrycollectionm|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +geometrycollectionm|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +geometrycollectionm|0|CircularString|0|KO-BKO-GKO:-BGKO +geometrycollectionm|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometrycollectionm|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometrycollectionm|0|MultiCurve|0|KO-BKO-GKO:-BGKO +geometrycollectionm|0|MultiSurface|0|KO-BKO-GKO:-BGKO +geometrycollectionm|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometrycollectionm|0|Triangle|0|KO-BKO-GKO:-BGKO +geometrycollectionm|0|Tin|0|KO-BKO-GKO:-BGKO +geometrycollectionm|0|Point|2|KO-BKO-GKO:-BGKO +geometrycollectionm|0|LineString|2|KO-BKO-GKO:-BGKO +geometrycollectionm|0|Polygon|2|KO-BKO-GKO:-BGKO +geometrycollectionm|0|MultiPoint|2|KO-BKO-GKO:-BGKO +geometrycollectionm|0|MultiLineString|2|KO-BKO-GKO:-BGKO +geometrycollectionm|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +geometrycollectionm|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +geometrycollectionm|0|CircularString|2|KO-BKO-GKO:-BGKO +geometrycollectionm|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometrycollectionm|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometrycollectionm|0|MultiCurve|2|KO-BKO-GKO:-BGKO +geometrycollectionm|0|MultiSurface|2|KO-BKO-GKO:-BGKO +geometrycollectionm|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometrycollectionm|0|Triangle|2|KO-BKO-GKO:-BGKO +geometrycollectionm|0|Point|1|KO-BKO-GKO:-BGKO +geometrycollectionm|0|LineString|1|KO-BKO-GKO:-BGKO +geometrycollectionm|0|Polygon|1|KO-BKO-GKO:-BGKO +geometrycollectionm|0|MultiPoint|1|KO-BKO-GKO:-BGKO +geometrycollectionm|0|MultiLineString|1|KO-BKO-GKO:-BGKO +geometrycollectionm|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +geometrycollectionm|0|GeometryCollection|1|OK-BOK-GOK-BGOK +geometrycollectionm|0|CircularString|1|KO-BKO-GKO:-BGKO +geometrycollectionm|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometrycollectionm|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometrycollectionm|0|MultiCurve|1|KO-BKO-GKO:-BGKO +geometrycollectionm|0|MultiSurface|1|KO-BKO-GKO:-BGKO +geometrycollectionm|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometrycollectionm|0|Triangle|1|KO-BKO-GKO:-BGKO +geometrycollectionm|0|Point|3|KO-BKO-GKO:-BGKO +geometrycollectionm|0|LineString|3|KO-BKO-GKO:-BGKO +geometrycollectionm|0|Polygon|3|KO-BKO-GKO:-BGKO +geometrycollectionm|0|MultiPoint|3|KO-BKO-GKO:-BGKO +geometrycollectionm|0|MultiLineString|3|KO-BKO-GKO:-BGKO +geometrycollectionm|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +geometrycollectionm|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +geometrycollectionm|0|CircularString|3|KO-BKO-GKO:-BGKO +geometrycollectionm|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometrycollectionm|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometrycollectionm|0|MultiCurve|3|KO-BKO-GKO:-BGKO +geometrycollectionm|0|MultiSurface|3|KO-BKO-GKO:-BGKO +geometrycollectionm|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometrycollectionm|0|Triangle|3|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|Point|0|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|LineString|0|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|Polygon|0|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|CircularString|0|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|Triangle|0|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|Tin|0|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|Point|2|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|LineString|2|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|Polygon|2|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|CircularString|2|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|Triangle|2|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|Point|1|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|LineString|1|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|Polygon|1|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|GeometryCollection|1|OK-BOK-GOK-BGOK +geometrycollectionm|4326|CircularString|1|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|Triangle|1|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|Point|3|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|LineString|3|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|Polygon|3|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|CircularString|3|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometrycollectionm|4326|Triangle|3|KO-BKO-GKO:-BGKO +geometrycollectionm||COUNT|4| +geometrycollectionm||GCOUNT|4| +geometrycollectionm0|0|Point|0|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|LineString|0|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|Polygon|0|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|MultiPoint|0|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|MultiLineString|0|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|CircularString|0|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|MultiCurve|0|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|MultiSurface|0|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|Triangle|0|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|Tin|0|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|Point|2|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|LineString|2|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|Polygon|2|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|MultiPoint|2|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|MultiLineString|2|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|CircularString|2|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|MultiCurve|2|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|MultiSurface|2|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|Triangle|2|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|Point|1|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|LineString|1|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|Polygon|1|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|MultiPoint|1|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|MultiLineString|1|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|GeometryCollection|1|OK-BOK-GOK-BGOK +geometrycollectionm0|0|CircularString|1|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|MultiCurve|1|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|MultiSurface|1|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|Triangle|1|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|Point|3|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|LineString|3|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|Polygon|3|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|MultiPoint|3|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|MultiLineString|3|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|CircularString|3|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|MultiCurve|3|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|MultiSurface|3|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometrycollectionm0|0|Triangle|3|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|Point|0|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|LineString|0|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|Polygon|0|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|CircularString|0|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|Triangle|0|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|Tin|0|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|Point|2|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|LineString|2|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|Polygon|2|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|CircularString|2|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|Triangle|2|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|Point|1|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|LineString|1|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|Polygon|1|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|GeometryCollection|1|OK-BOK-GOK-BGOK +geometrycollectionm0|4326|CircularString|1|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|Triangle|1|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|Point|3|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|LineString|3|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|Polygon|3|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|CircularString|3|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometrycollectionm0|4326|Triangle|3|KO-BKO-GKO:-BGKO +geometrycollectionm0||COUNT|4| +geometrycollectionm0||GCOUNT|4| +geometrycollectionm4326|0|Point|0|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|LineString|0|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|Polygon|0|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|MultiPoint|0|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|MultiLineString|0|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|CircularString|0|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|MultiCurve|0|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|MultiSurface|0|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|Triangle|0|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|Tin|0|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|Point|2|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|LineString|2|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|Polygon|2|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|MultiPoint|2|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|MultiLineString|2|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|CircularString|2|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|MultiCurve|2|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|MultiSurface|2|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|Triangle|2|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|Point|1|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|LineString|1|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|Polygon|1|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|MultiPoint|1|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|MultiLineString|1|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|GeometryCollection|1|KO-BKO-GOK-BGOK +geometrycollectionm4326|0|CircularString|1|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|MultiCurve|1|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|MultiSurface|1|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|Triangle|1|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|Point|3|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|LineString|3|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|Polygon|3|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|MultiPoint|3|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|MultiLineString|3|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|CircularString|3|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|MultiCurve|3|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|MultiSurface|3|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometrycollectionm4326|0|Triangle|3|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|Point|0|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|LineString|0|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|Polygon|0|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|CircularString|0|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|Triangle|0|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|Tin|0|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|Point|2|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|LineString|2|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|Polygon|2|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|CircularString|2|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|Triangle|2|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|Point|1|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|LineString|1|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|Polygon|1|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|GeometryCollection|1|OK-BOK-GOK-BGOK +geometrycollectionm4326|4326|CircularString|1|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|Triangle|1|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|Point|3|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|LineString|3|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|Polygon|3|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|CircularString|3|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometrycollectionm4326|4326|Triangle|3|KO-BKO-GKO:-BGKO +geometrycollectionm4326||COUNT|2| +geometrycollectionm4326||GCOUNT|4| +geometrycollectionz|0|Point|0|KO-BKO-GKO:-BGKO +geometrycollectionz|0|LineString|0|KO-BKO-GKO:-BGKO +geometrycollectionz|0|Polygon|0|KO-BKO-GKO:-BGKO +geometrycollectionz|0|MultiPoint|0|KO-BKO-GKO:-BGKO +geometrycollectionz|0|MultiLineString|0|KO-BKO-GKO:-BGKO +geometrycollectionz|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +geometrycollectionz|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +geometrycollectionz|0|CircularString|0|KO-BKO-GKO:-BGKO +geometrycollectionz|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometrycollectionz|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometrycollectionz|0|MultiCurve|0|KO-BKO-GKO:-BGKO +geometrycollectionz|0|MultiSurface|0|KO-BKO-GKO:-BGKO +geometrycollectionz|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometrycollectionz|0|Triangle|0|KO-BKO-GKO:-BGKO +geometrycollectionz|0|Tin|0|KO-BKO-GKO:-BGKO +geometrycollectionz|0|Point|2|KO-BKO-GKO:-BGKO +geometrycollectionz|0|LineString|2|KO-BKO-GKO:-BGKO +geometrycollectionz|0|Polygon|2|KO-BKO-GKO:-BGKO +geometrycollectionz|0|MultiPoint|2|KO-BKO-GKO:-BGKO +geometrycollectionz|0|MultiLineString|2|KO-BKO-GKO:-BGKO +geometrycollectionz|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +geometrycollectionz|0|GeometryCollection|2|OK-BOK-GOK-BGOK +geometrycollectionz|0|CircularString|2|KO-BKO-GKO:-BGKO +geometrycollectionz|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometrycollectionz|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometrycollectionz|0|MultiCurve|2|KO-BKO-GKO:-BGKO +geometrycollectionz|0|MultiSurface|2|KO-BKO-GKO:-BGKO +geometrycollectionz|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometrycollectionz|0|Triangle|2|KO-BKO-GKO:-BGKO +geometrycollectionz|0|Point|1|KO-BKO-GKO:-BGKO +geometrycollectionz|0|LineString|1|KO-BKO-GKO:-BGKO +geometrycollectionz|0|Polygon|1|KO-BKO-GKO:-BGKO +geometrycollectionz|0|MultiPoint|1|KO-BKO-GKO:-BGKO +geometrycollectionz|0|MultiLineString|1|KO-BKO-GKO:-BGKO +geometrycollectionz|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +geometrycollectionz|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +geometrycollectionz|0|CircularString|1|KO-BKO-GKO:-BGKO +geometrycollectionz|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometrycollectionz|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometrycollectionz|0|MultiCurve|1|KO-BKO-GKO:-BGKO +geometrycollectionz|0|MultiSurface|1|KO-BKO-GKO:-BGKO +geometrycollectionz|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometrycollectionz|0|Triangle|1|KO-BKO-GKO:-BGKO +geometrycollectionz|0|Point|3|KO-BKO-GKO:-BGKO +geometrycollectionz|0|LineString|3|KO-BKO-GKO:-BGKO +geometrycollectionz|0|Polygon|3|KO-BKO-GKO:-BGKO +geometrycollectionz|0|MultiPoint|3|KO-BKO-GKO:-BGKO +geometrycollectionz|0|MultiLineString|3|KO-BKO-GKO:-BGKO +geometrycollectionz|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +geometrycollectionz|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +geometrycollectionz|0|CircularString|3|KO-BKO-GKO:-BGKO +geometrycollectionz|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometrycollectionz|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometrycollectionz|0|MultiCurve|3|KO-BKO-GKO:-BGKO +geometrycollectionz|0|MultiSurface|3|KO-BKO-GKO:-BGKO +geometrycollectionz|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometrycollectionz|0|Triangle|3|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|Point|0|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|LineString|0|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|Polygon|0|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|CircularString|0|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|Triangle|0|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|Tin|0|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|Point|2|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|LineString|2|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|Polygon|2|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|GeometryCollection|2|OK-BOK-GOK-BGOK +geometrycollectionz|4326|CircularString|2|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|Triangle|2|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|Point|1|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|LineString|1|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|Polygon|1|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|CircularString|1|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|Triangle|1|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|Point|3|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|LineString|3|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|Polygon|3|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|CircularString|3|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometrycollectionz|4326|Triangle|3|KO-BKO-GKO:-BGKO +geometrycollectionz||COUNT|4| +geometrycollectionz||GCOUNT|4| +geometrycollectionz0|0|Point|0|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|LineString|0|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|Polygon|0|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|MultiPoint|0|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|MultiLineString|0|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|CircularString|0|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|MultiCurve|0|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|MultiSurface|0|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|Triangle|0|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|Tin|0|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|Point|2|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|LineString|2|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|Polygon|2|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|MultiPoint|2|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|MultiLineString|2|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|GeometryCollection|2|OK-BOK-GOK-BGOK +geometrycollectionz0|0|CircularString|2|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|MultiCurve|2|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|MultiSurface|2|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|Triangle|2|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|Point|1|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|LineString|1|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|Polygon|1|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|MultiPoint|1|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|MultiLineString|1|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|CircularString|1|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|MultiCurve|1|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|MultiSurface|1|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|Triangle|1|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|Point|3|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|LineString|3|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|Polygon|3|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|MultiPoint|3|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|MultiLineString|3|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|CircularString|3|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|MultiCurve|3|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|MultiSurface|3|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometrycollectionz0|0|Triangle|3|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|Point|0|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|LineString|0|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|Polygon|0|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|CircularString|0|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|Triangle|0|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|Tin|0|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|Point|2|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|LineString|2|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|Polygon|2|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|GeometryCollection|2|OK-BOK-GOK-BGOK +geometrycollectionz0|4326|CircularString|2|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|Triangle|2|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|Point|1|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|LineString|1|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|Polygon|1|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|CircularString|1|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|Triangle|1|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|Point|3|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|LineString|3|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|Polygon|3|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|CircularString|3|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometrycollectionz0|4326|Triangle|3|KO-BKO-GKO:-BGKO +geometrycollectionz0||COUNT|4| +geometrycollectionz0||GCOUNT|4| +geometrycollectionz4326|0|Point|0|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|LineString|0|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|Polygon|0|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|MultiPoint|0|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|MultiLineString|0|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|CircularString|0|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|MultiCurve|0|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|MultiSurface|0|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|Triangle|0|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|Tin|0|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|Point|2|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|LineString|2|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|Polygon|2|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|MultiPoint|2|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|MultiLineString|2|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|GeometryCollection|2|KO-BKO-GOK-BGOK +geometrycollectionz4326|0|CircularString|2|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|MultiCurve|2|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|MultiSurface|2|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|Triangle|2|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|Point|1|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|LineString|1|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|Polygon|1|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|MultiPoint|1|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|MultiLineString|1|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|CircularString|1|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|MultiCurve|1|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|MultiSurface|1|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|Triangle|1|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|Point|3|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|LineString|3|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|Polygon|3|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|MultiPoint|3|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|MultiLineString|3|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|CircularString|3|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|MultiCurve|3|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|MultiSurface|3|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometrycollectionz4326|0|Triangle|3|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|Point|0|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|LineString|0|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|Polygon|0|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|CircularString|0|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|Triangle|0|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|Tin|0|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|Point|2|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|LineString|2|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|Polygon|2|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|GeometryCollection|2|OK-BOK-GOK-BGOK +geometrycollectionz4326|4326|CircularString|2|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|Triangle|2|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|Point|1|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|LineString|1|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|Polygon|1|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|CircularString|1|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|Triangle|1|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|Point|3|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|LineString|3|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|Polygon|3|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|CircularString|3|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometrycollectionz4326|4326|Triangle|3|KO-BKO-GKO:-BGKO +geometrycollectionz4326||COUNT|2| +geometrycollectionz4326||GCOUNT|4| +geometrycollectionzm|0|Point|0|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|LineString|0|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|Polygon|0|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|MultiPoint|0|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|MultiLineString|0|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|CircularString|0|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|MultiCurve|0|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|MultiSurface|0|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|Triangle|0|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|Tin|0|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|Point|2|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|LineString|2|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|Polygon|2|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|MultiPoint|2|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|MultiLineString|2|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|CircularString|2|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|MultiCurve|2|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|MultiSurface|2|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|Triangle|2|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|Point|1|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|LineString|1|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|Polygon|1|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|MultiPoint|1|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|MultiLineString|1|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|CircularString|1|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|MultiCurve|1|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|MultiSurface|1|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|Triangle|1|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|Point|3|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|LineString|3|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|Polygon|3|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|MultiPoint|3|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|MultiLineString|3|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|GeometryCollection|3|OK-BOK-GOK-BGOK +geometrycollectionzm|0|CircularString|3|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|MultiCurve|3|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|MultiSurface|3|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometrycollectionzm|0|Triangle|3|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|Point|0|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|LineString|0|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|Polygon|0|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|CircularString|0|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|Triangle|0|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|Tin|0|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|Point|2|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|LineString|2|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|Polygon|2|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|CircularString|2|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|Triangle|2|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|Point|1|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|LineString|1|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|Polygon|1|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|CircularString|1|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|Triangle|1|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|Point|3|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|LineString|3|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|Polygon|3|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|GeometryCollection|3|OK-BOK-GOK-BGOK +geometrycollectionzm|4326|CircularString|3|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometrycollectionzm|4326|Triangle|3|KO-BKO-GKO:-BGKO +geometrycollectionzm||COUNT|4| +geometrycollectionzm||GCOUNT|4| +geometrycollectionzm0|0|Point|0|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|LineString|0|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|Polygon|0|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|MultiPoint|0|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|MultiLineString|0|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|CircularString|0|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|MultiCurve|0|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|MultiSurface|0|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|Triangle|0|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|Tin|0|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|Point|2|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|LineString|2|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|Polygon|2|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|MultiPoint|2|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|MultiLineString|2|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|CircularString|2|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|MultiCurve|2|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|MultiSurface|2|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|Triangle|2|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|Point|1|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|LineString|1|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|Polygon|1|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|MultiPoint|1|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|MultiLineString|1|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|CircularString|1|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|MultiCurve|1|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|MultiSurface|1|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|Triangle|1|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|Point|3|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|LineString|3|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|Polygon|3|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|MultiPoint|3|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|MultiLineString|3|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|GeometryCollection|3|OK-BOK-GOK-BGOK +geometrycollectionzm0|0|CircularString|3|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|MultiCurve|3|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|MultiSurface|3|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometrycollectionzm0|0|Triangle|3|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|Point|0|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|LineString|0|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|Polygon|0|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|CircularString|0|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|Triangle|0|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|Tin|0|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|Point|2|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|LineString|2|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|Polygon|2|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|CircularString|2|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|Triangle|2|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|Point|1|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|LineString|1|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|Polygon|1|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|CircularString|1|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|Triangle|1|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|Point|3|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|LineString|3|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|Polygon|3|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|GeometryCollection|3|OK-BOK-GOK-BGOK +geometrycollectionzm0|4326|CircularString|3|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometrycollectionzm0|4326|Triangle|3|KO-BKO-GKO:-BGKO +geometrycollectionzm0||COUNT|4| +geometrycollectionzm0||GCOUNT|4| +geometrycollectionzm4326|0|Point|0|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|LineString|0|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|Polygon|0|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|MultiPoint|0|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|MultiLineString|0|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|CircularString|0|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|MultiCurve|0|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|MultiSurface|0|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|Triangle|0|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|Tin|0|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|Point|2|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|LineString|2|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|Polygon|2|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|MultiPoint|2|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|MultiLineString|2|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|CircularString|2|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|MultiCurve|2|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|MultiSurface|2|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|Triangle|2|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|Point|1|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|LineString|1|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|Polygon|1|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|MultiPoint|1|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|MultiLineString|1|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|CircularString|1|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|MultiCurve|1|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|MultiSurface|1|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|Triangle|1|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|Point|3|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|LineString|3|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|Polygon|3|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|MultiPoint|3|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|MultiLineString|3|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|GeometryCollection|3|KO-BKO-GOK-BGOK +geometrycollectionzm4326|0|CircularString|3|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|MultiCurve|3|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|MultiSurface|3|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|0|Triangle|3|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|Point|0|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|LineString|0|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|Polygon|0|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|CircularString|0|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|Triangle|0|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|Tin|0|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|Point|2|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|LineString|2|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|Polygon|2|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|CircularString|2|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|Triangle|2|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|Point|1|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|LineString|1|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|Polygon|1|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|CircularString|1|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|Triangle|1|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|Point|3|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|LineString|3|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|Polygon|3|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|GeometryCollection|3|OK-BOK-GOK-BGOK +geometrycollectionzm4326|4326|CircularString|3|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometrycollectionzm4326|4326|Triangle|3|KO-BKO-GKO:-BGKO +geometrycollectionzm4326||COUNT|2| +geometrycollectionzm4326||GCOUNT|4| +geometrym|0|Point|0|KO-BKO-GKO:-BGKO +geometrym|0|LineString|0|KO-BKO-GKO:-BGKO +geometrym|0|Polygon|0|KO-BKO-GKO:-BGKO +geometrym|0|MultiPoint|0|KO-BKO-GKO:-BGKO +geometrym|0|MultiLineString|0|KO-BKO-GKO:-BGKO +geometrym|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +geometrym|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +geometrym|0|CircularString|0|KO-BKO-GKO:-BGKO +geometrym|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometrym|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometrym|0|MultiCurve|0|KO-BKO-GKO:-BGKO +geometrym|0|MultiSurface|0|KO-BKO-GKO:-BGKO +geometrym|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometrym|0|Triangle|0|KO-BKO-GKO:-BGKO +geometrym|0|Tin|0|KO-BKO-GKO:-BGKO +geometrym|0|Point|2|KO-BKO-GKO:-BGKO +geometrym|0|LineString|2|KO-BKO-GKO:-BGKO +geometrym|0|Polygon|2|KO-BKO-GKO:-BGKO +geometrym|0|MultiPoint|2|KO-BKO-GKO:-BGKO +geometrym|0|MultiLineString|2|KO-BKO-GKO:-BGKO +geometrym|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +geometrym|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +geometrym|0|CircularString|2|KO-BKO-GKO:-BGKO +geometrym|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometrym|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometrym|0|MultiCurve|2|KO-BKO-GKO:-BGKO +geometrym|0|MultiSurface|2|KO-BKO-GKO:-BGKO +geometrym|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometrym|0|Triangle|2|KO-BKO-GKO:-BGKO +geometrym|0|Point|1|OK-BOK-GOK-BGOK +geometrym|0|LineString|1|OK-BOK-GOK-BGOK +geometrym|0|Polygon|1|OK-BOK-GOK-BGOK +geometrym|0|MultiPoint|1|OK-BOK-GOK-BGOK +geometrym|0|MultiLineString|1|OK-BOK-GOK-BGOK +geometrym|0|MultiPolygon|1|OK-BOK-GOK-BGOK +geometrym|0|GeometryCollection|1|OK-BOK-GOK-BGOK +geometrym|0|CircularString|1|OK-BOK-GKO:-BGKO +geometrym|0|CompoundCurve|1|OK-BOK-GKO:-BGKO +geometrym|0|CurvePolygon|1|OK-BOK-GKO:-BGKO +geometrym|0|MultiCurve|1|OK-BOK-GKO:-BGKO +geometrym|0|MultiSurface|1|OK-BOK-GKO:-BGKO +geometrym|0|PolyhedralSurface|1|OK-BOK-GKO:-BGKO +geometrym|0|Triangle|1|OK-BOK-GKO:-BGKO +geometrym|0|Point|3|KO-BKO-GKO:-BGKO +geometrym|0|LineString|3|KO-BKO-GKO:-BGKO +geometrym|0|Polygon|3|KO-BKO-GKO:-BGKO +geometrym|0|MultiPoint|3|KO-BKO-GKO:-BGKO +geometrym|0|MultiLineString|3|KO-BKO-GKO:-BGKO +geometrym|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +geometrym|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +geometrym|0|CircularString|3|KO-BKO-GKO:-BGKO +geometrym|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometrym|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometrym|0|MultiCurve|3|KO-BKO-GKO:-BGKO +geometrym|0|MultiSurface|3|KO-BKO-GKO:-BGKO +geometrym|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometrym|0|Triangle|3|KO-BKO-GKO:-BGKO +geometrym|4326|Point|0|KO-BKO-GKO:-BGKO +geometrym|4326|LineString|0|KO-BKO-GKO:-BGKO +geometrym|4326|Polygon|0|KO-BKO-GKO:-BGKO +geometrym|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +geometrym|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +geometrym|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +geometrym|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +geometrym|4326|CircularString|0|KO-BKO-GKO:-BGKO +geometrym|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometrym|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometrym|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +geometrym|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +geometrym|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometrym|4326|Triangle|0|KO-BKO-GKO:-BGKO +geometrym|4326|Tin|0|KO-BKO-GKO:-BGKO +geometrym|4326|Point|2|KO-BKO-GKO:-BGKO +geometrym|4326|LineString|2|KO-BKO-GKO:-BGKO +geometrym|4326|Polygon|2|KO-BKO-GKO:-BGKO +geometrym|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +geometrym|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +geometrym|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +geometrym|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +geometrym|4326|CircularString|2|KO-BKO-GKO:-BGKO +geometrym|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometrym|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometrym|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +geometrym|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +geometrym|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometrym|4326|Triangle|2|KO-BKO-GKO:-BGKO +geometrym|4326|Point|1|OK-BOK-GOK-BGOK +geometrym|4326|LineString|1|OK-BOK-GOK-BGOK +geometrym|4326|Polygon|1|OK-BOK-GOK-BGOK +geometrym|4326|MultiPoint|1|OK-BOK-GOK-BGOK +geometrym|4326|MultiLineString|1|OK-BOK-GOK-BGOK +geometrym|4326|MultiPolygon|1|OK-BOK-GOK-BGOK +geometrym|4326|GeometryCollection|1|OK-BOK-GOK-BGOK +geometrym|4326|CircularString|1|OK-BOK-GKO:-BGKO +geometrym|4326|CompoundCurve|1|OK-BOK-GKO:-BGKO +geometrym|4326|CurvePolygon|1|OK-BOK-GKO:-BGKO +geometrym|4326|MultiCurve|1|OK-BOK-GKO:-BGKO +geometrym|4326|MultiSurface|1|OK-BOK-GKO:-BGKO +geometrym|4326|PolyhedralSurface|1|OK-BOK-GKO:-BGKO +geometrym|4326|Triangle|1|OK-BOK-GKO:-BGKO +geometrym|4326|Point|3|KO-BKO-GKO:-BGKO +geometrym|4326|LineString|3|KO-BKO-GKO:-BGKO +geometrym|4326|Polygon|3|KO-BKO-GKO:-BGKO +geometrym|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +geometrym|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +geometrym|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +geometrym|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +geometrym|4326|CircularString|3|KO-BKO-GKO:-BGKO +geometrym|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometrym|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometrym|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +geometrym|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +geometrym|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometrym|4326|Triangle|3|KO-BKO-GKO:-BGKO +geometrym||COUNT|56| +geometrym||GCOUNT|28| +geometrym0|0|Point|0|KO-BKO-GKO:-BGKO +geometrym0|0|LineString|0|KO-BKO-GKO:-BGKO +geometrym0|0|Polygon|0|KO-BKO-GKO:-BGKO +geometrym0|0|MultiPoint|0|KO-BKO-GKO:-BGKO +geometrym0|0|MultiLineString|0|KO-BKO-GKO:-BGKO +geometrym0|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +geometrym0|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +geometrym0|0|CircularString|0|KO-BKO-GKO:-BGKO +geometrym0|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometrym0|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometrym0|0|MultiCurve|0|KO-BKO-GKO:-BGKO +geometrym0|0|MultiSurface|0|KO-BKO-GKO:-BGKO +geometrym0|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometrym0|0|Triangle|0|KO-BKO-GKO:-BGKO +geometrym0|0|Tin|0|KO-BKO-GKO:-BGKO +geometrym0|0|Point|2|KO-BKO-GKO:-BGKO +geometrym0|0|LineString|2|KO-BKO-GKO:-BGKO +geometrym0|0|Polygon|2|KO-BKO-GKO:-BGKO +geometrym0|0|MultiPoint|2|KO-BKO-GKO:-BGKO +geometrym0|0|MultiLineString|2|KO-BKO-GKO:-BGKO +geometrym0|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +geometrym0|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +geometrym0|0|CircularString|2|KO-BKO-GKO:-BGKO +geometrym0|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometrym0|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometrym0|0|MultiCurve|2|KO-BKO-GKO:-BGKO +geometrym0|0|MultiSurface|2|KO-BKO-GKO:-BGKO +geometrym0|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometrym0|0|Triangle|2|KO-BKO-GKO:-BGKO +geometrym0|0|Point|1|OK-BOK-GOK-BGOK +geometrym0|0|LineString|1|OK-BOK-GOK-BGOK +geometrym0|0|Polygon|1|OK-BOK-GOK-BGOK +geometrym0|0|MultiPoint|1|OK-BOK-GOK-BGOK +geometrym0|0|MultiLineString|1|OK-BOK-GOK-BGOK +geometrym0|0|MultiPolygon|1|OK-BOK-GOK-BGOK +geometrym0|0|GeometryCollection|1|OK-BOK-GOK-BGOK +geometrym0|0|CircularString|1|OK-BOK-GKO:-BGKO +geometrym0|0|CompoundCurve|1|OK-BOK-GKO:-BGKO +geometrym0|0|CurvePolygon|1|OK-BOK-GKO:-BGKO +geometrym0|0|MultiCurve|1|OK-BOK-GKO:-BGKO +geometrym0|0|MultiSurface|1|OK-BOK-GKO:-BGKO +geometrym0|0|PolyhedralSurface|1|OK-BOK-GKO:-BGKO +geometrym0|0|Triangle|1|OK-BOK-GKO:-BGKO +geometrym0|0|Point|3|KO-BKO-GKO:-BGKO +geometrym0|0|LineString|3|KO-BKO-GKO:-BGKO +geometrym0|0|Polygon|3|KO-BKO-GKO:-BGKO +geometrym0|0|MultiPoint|3|KO-BKO-GKO:-BGKO +geometrym0|0|MultiLineString|3|KO-BKO-GKO:-BGKO +geometrym0|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +geometrym0|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +geometrym0|0|CircularString|3|KO-BKO-GKO:-BGKO +geometrym0|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometrym0|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometrym0|0|MultiCurve|3|KO-BKO-GKO:-BGKO +geometrym0|0|MultiSurface|3|KO-BKO-GKO:-BGKO +geometrym0|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometrym0|0|Triangle|3|KO-BKO-GKO:-BGKO +geometrym0|4326|Point|0|KO-BKO-GKO:-BGKO +geometrym0|4326|LineString|0|KO-BKO-GKO:-BGKO +geometrym0|4326|Polygon|0|KO-BKO-GKO:-BGKO +geometrym0|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +geometrym0|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +geometrym0|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +geometrym0|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +geometrym0|4326|CircularString|0|KO-BKO-GKO:-BGKO +geometrym0|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometrym0|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometrym0|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +geometrym0|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +geometrym0|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometrym0|4326|Triangle|0|KO-BKO-GKO:-BGKO +geometrym0|4326|Tin|0|KO-BKO-GKO:-BGKO +geometrym0|4326|Point|2|KO-BKO-GKO:-BGKO +geometrym0|4326|LineString|2|KO-BKO-GKO:-BGKO +geometrym0|4326|Polygon|2|KO-BKO-GKO:-BGKO +geometrym0|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +geometrym0|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +geometrym0|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +geometrym0|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +geometrym0|4326|CircularString|2|KO-BKO-GKO:-BGKO +geometrym0|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometrym0|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometrym0|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +geometrym0|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +geometrym0|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometrym0|4326|Triangle|2|KO-BKO-GKO:-BGKO +geometrym0|4326|Point|1|OK-BOK-GOK-BGOK +geometrym0|4326|LineString|1|OK-BOK-GOK-BGOK +geometrym0|4326|Polygon|1|OK-BOK-GOK-BGOK +geometrym0|4326|MultiPoint|1|OK-BOK-GOK-BGOK +geometrym0|4326|MultiLineString|1|OK-BOK-GOK-BGOK +geometrym0|4326|MultiPolygon|1|OK-BOK-GOK-BGOK +geometrym0|4326|GeometryCollection|1|OK-BOK-GOK-BGOK +geometrym0|4326|CircularString|1|OK-BOK-GKO:-BGKO +geometrym0|4326|CompoundCurve|1|OK-BOK-GKO:-BGKO +geometrym0|4326|CurvePolygon|1|OK-BOK-GKO:-BGKO +geometrym0|4326|MultiCurve|1|OK-BOK-GKO:-BGKO +geometrym0|4326|MultiSurface|1|OK-BOK-GKO:-BGKO +geometrym0|4326|PolyhedralSurface|1|OK-BOK-GKO:-BGKO +geometrym0|4326|Triangle|1|OK-BOK-GKO:-BGKO +geometrym0|4326|Point|3|KO-BKO-GKO:-BGKO +geometrym0|4326|LineString|3|KO-BKO-GKO:-BGKO +geometrym0|4326|Polygon|3|KO-BKO-GKO:-BGKO +geometrym0|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +geometrym0|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +geometrym0|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +geometrym0|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +geometrym0|4326|CircularString|3|KO-BKO-GKO:-BGKO +geometrym0|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometrym0|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometrym0|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +geometrym0|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +geometrym0|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometrym0|4326|Triangle|3|KO-BKO-GKO:-BGKO +geometrym0||COUNT|56| +geometrym0||GCOUNT|28| +geometrym4326|0|Point|0|KO-BKO-GKO:-BGKO +geometrym4326|0|LineString|0|KO-BKO-GKO:-BGKO +geometrym4326|0|Polygon|0|KO-BKO-GKO:-BGKO +geometrym4326|0|MultiPoint|0|KO-BKO-GKO:-BGKO +geometrym4326|0|MultiLineString|0|KO-BKO-GKO:-BGKO +geometrym4326|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +geometrym4326|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +geometrym4326|0|CircularString|0|KO-BKO-GKO:-BGKO +geometrym4326|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometrym4326|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometrym4326|0|MultiCurve|0|KO-BKO-GKO:-BGKO +geometrym4326|0|MultiSurface|0|KO-BKO-GKO:-BGKO +geometrym4326|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometrym4326|0|Triangle|0|KO-BKO-GKO:-BGKO +geometrym4326|0|Tin|0|KO-BKO-GKO:-BGKO +geometrym4326|0|Point|2|KO-BKO-GKO:-BGKO +geometrym4326|0|LineString|2|KO-BKO-GKO:-BGKO +geometrym4326|0|Polygon|2|KO-BKO-GKO:-BGKO +geometrym4326|0|MultiPoint|2|KO-BKO-GKO:-BGKO +geometrym4326|0|MultiLineString|2|KO-BKO-GKO:-BGKO +geometrym4326|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +geometrym4326|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +geometrym4326|0|CircularString|2|KO-BKO-GKO:-BGKO +geometrym4326|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometrym4326|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometrym4326|0|MultiCurve|2|KO-BKO-GKO:-BGKO +geometrym4326|0|MultiSurface|2|KO-BKO-GKO:-BGKO +geometrym4326|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometrym4326|0|Triangle|2|KO-BKO-GKO:-BGKO +geometrym4326|0|Point|1|KO-BKO-GOK-BGOK +geometrym4326|0|LineString|1|KO-BKO-GOK-BGOK +geometrym4326|0|Polygon|1|KO-BKO-GOK-BGOK +geometrym4326|0|MultiPoint|1|KO-BKO-GOK-BGOK +geometrym4326|0|MultiLineString|1|KO-BKO-GOK-BGOK +geometrym4326|0|MultiPolygon|1|KO-BKO-GOK-BGOK +geometrym4326|0|GeometryCollection|1|KO-BKO-GOK-BGOK +geometrym4326|0|CircularString|1|KO-BKO-GKO:-BGKO +geometrym4326|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometrym4326|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometrym4326|0|MultiCurve|1|KO-BKO-GKO:-BGKO +geometrym4326|0|MultiSurface|1|KO-BKO-GKO:-BGKO +geometrym4326|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometrym4326|0|Triangle|1|KO-BKO-GKO:-BGKO +geometrym4326|0|Point|3|KO-BKO-GKO:-BGKO +geometrym4326|0|LineString|3|KO-BKO-GKO:-BGKO +geometrym4326|0|Polygon|3|KO-BKO-GKO:-BGKO +geometrym4326|0|MultiPoint|3|KO-BKO-GKO:-BGKO +geometrym4326|0|MultiLineString|3|KO-BKO-GKO:-BGKO +geometrym4326|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +geometrym4326|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +geometrym4326|0|CircularString|3|KO-BKO-GKO:-BGKO +geometrym4326|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometrym4326|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometrym4326|0|MultiCurve|3|KO-BKO-GKO:-BGKO +geometrym4326|0|MultiSurface|3|KO-BKO-GKO:-BGKO +geometrym4326|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometrym4326|0|Triangle|3|KO-BKO-GKO:-BGKO +geometrym4326|4326|Point|0|KO-BKO-GKO:-BGKO +geometrym4326|4326|LineString|0|KO-BKO-GKO:-BGKO +geometrym4326|4326|Polygon|0|KO-BKO-GKO:-BGKO +geometrym4326|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +geometrym4326|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +geometrym4326|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +geometrym4326|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +geometrym4326|4326|CircularString|0|KO-BKO-GKO:-BGKO +geometrym4326|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometrym4326|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometrym4326|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +geometrym4326|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +geometrym4326|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometrym4326|4326|Triangle|0|KO-BKO-GKO:-BGKO +geometrym4326|4326|Tin|0|KO-BKO-GKO:-BGKO +geometrym4326|4326|Point|2|KO-BKO-GKO:-BGKO +geometrym4326|4326|LineString|2|KO-BKO-GKO:-BGKO +geometrym4326|4326|Polygon|2|KO-BKO-GKO:-BGKO +geometrym4326|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +geometrym4326|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +geometrym4326|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +geometrym4326|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +geometrym4326|4326|CircularString|2|KO-BKO-GKO:-BGKO +geometrym4326|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometrym4326|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometrym4326|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +geometrym4326|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +geometrym4326|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometrym4326|4326|Triangle|2|KO-BKO-GKO:-BGKO +geometrym4326|4326|Point|1|OK-BOK-GOK-BGOK +geometrym4326|4326|LineString|1|OK-BOK-GOK-BGOK +geometrym4326|4326|Polygon|1|OK-BOK-GOK-BGOK +geometrym4326|4326|MultiPoint|1|OK-BOK-GOK-BGOK +geometrym4326|4326|MultiLineString|1|OK-BOK-GOK-BGOK +geometrym4326|4326|MultiPolygon|1|OK-BOK-GOK-BGOK +geometrym4326|4326|GeometryCollection|1|OK-BOK-GOK-BGOK +geometrym4326|4326|CircularString|1|OK-BOK-GKO:-BGKO +geometrym4326|4326|CompoundCurve|1|OK-BOK-GKO:-BGKO +geometrym4326|4326|CurvePolygon|1|OK-BOK-GKO:-BGKO +geometrym4326|4326|MultiCurve|1|OK-BOK-GKO:-BGKO +geometrym4326|4326|MultiSurface|1|OK-BOK-GKO:-BGKO +geometrym4326|4326|PolyhedralSurface|1|OK-BOK-GKO:-BGKO +geometrym4326|4326|Triangle|1|OK-BOK-GKO:-BGKO +geometrym4326|4326|Point|3|KO-BKO-GKO:-BGKO +geometrym4326|4326|LineString|3|KO-BKO-GKO:-BGKO +geometrym4326|4326|Polygon|3|KO-BKO-GKO:-BGKO +geometrym4326|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +geometrym4326|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +geometrym4326|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +geometrym4326|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +geometrym4326|4326|CircularString|3|KO-BKO-GKO:-BGKO +geometrym4326|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometrym4326|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometrym4326|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +geometrym4326|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +geometrym4326|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometrym4326|4326|Triangle|3|KO-BKO-GKO:-BGKO +geometrym4326||COUNT|28| +geometrym4326||GCOUNT|28| +geometryz|0|Point|0|KO-BKO-GKO:-BGKO +geometryz|0|LineString|0|KO-BKO-GKO:-BGKO +geometryz|0|Polygon|0|KO-BKO-GKO:-BGKO +geometryz|0|MultiPoint|0|KO-BKO-GKO:-BGKO +geometryz|0|MultiLineString|0|KO-BKO-GKO:-BGKO +geometryz|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +geometryz|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +geometryz|0|CircularString|0|KO-BKO-GKO:-BGKO +geometryz|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometryz|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometryz|0|MultiCurve|0|KO-BKO-GKO:-BGKO +geometryz|0|MultiSurface|0|KO-BKO-GKO:-BGKO +geometryz|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometryz|0|Triangle|0|KO-BKO-GKO:-BGKO +geometryz|0|Tin|0|KO-BKO-GKO:-BGKO +geometryz|0|Point|2|OK-BOK-GOK-BGOK +geometryz|0|LineString|2|OK-BOK-GOK-BGOK +geometryz|0|Polygon|2|OK-BOK-GOK-BGOK +geometryz|0|MultiPoint|2|OK-BOK-GOK-BGOK +geometryz|0|MultiLineString|2|OK-BOK-GOK-BGOK +geometryz|0|MultiPolygon|2|OK-BOK-GOK-BGOK +geometryz|0|GeometryCollection|2|OK-BOK-GOK-BGOK +geometryz|0|CircularString|2|OK-BOK-GKO:-BGKO +geometryz|0|CompoundCurve|2|OK-BOK-GKO:-BGKO +geometryz|0|CurvePolygon|2|OK-BOK-GKO:-BGKO +geometryz|0|MultiCurve|2|OK-BOK-GKO:-BGKO +geometryz|0|MultiSurface|2|OK-BOK-GKO:-BGKO +geometryz|0|PolyhedralSurface|2|OK-BOK-GKO:-BGKO +geometryz|0|Triangle|2|OK-BOK-GKO:-BGKO +geometryz|0|Point|1|KO-BKO-GKO:-BGKO +geometryz|0|LineString|1|KO-BKO-GKO:-BGKO +geometryz|0|Polygon|1|KO-BKO-GKO:-BGKO +geometryz|0|MultiPoint|1|KO-BKO-GKO:-BGKO +geometryz|0|MultiLineString|1|KO-BKO-GKO:-BGKO +geometryz|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +geometryz|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +geometryz|0|CircularString|1|KO-BKO-GKO:-BGKO +geometryz|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometryz|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometryz|0|MultiCurve|1|KO-BKO-GKO:-BGKO +geometryz|0|MultiSurface|1|KO-BKO-GKO:-BGKO +geometryz|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometryz|0|Triangle|1|KO-BKO-GKO:-BGKO +geometryz|0|Point|3|KO-BKO-GKO:-BGKO +geometryz|0|LineString|3|KO-BKO-GKO:-BGKO +geometryz|0|Polygon|3|KO-BKO-GKO:-BGKO +geometryz|0|MultiPoint|3|KO-BKO-GKO:-BGKO +geometryz|0|MultiLineString|3|KO-BKO-GKO:-BGKO +geometryz|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +geometryz|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +geometryz|0|CircularString|3|KO-BKO-GKO:-BGKO +geometryz|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometryz|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometryz|0|MultiCurve|3|KO-BKO-GKO:-BGKO +geometryz|0|MultiSurface|3|KO-BKO-GKO:-BGKO +geometryz|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometryz|0|Triangle|3|KO-BKO-GKO:-BGKO +geometryz|4326|Point|0|KO-BKO-GKO:-BGKO +geometryz|4326|LineString|0|KO-BKO-GKO:-BGKO +geometryz|4326|Polygon|0|KO-BKO-GKO:-BGKO +geometryz|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +geometryz|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +geometryz|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +geometryz|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +geometryz|4326|CircularString|0|KO-BKO-GKO:-BGKO +geometryz|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometryz|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometryz|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +geometryz|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +geometryz|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometryz|4326|Triangle|0|KO-BKO-GKO:-BGKO +geometryz|4326|Tin|0|KO-BKO-GKO:-BGKO +geometryz|4326|Point|2|OK-BOK-GOK-BGOK +geometryz|4326|LineString|2|OK-BOK-GOK-BGOK +geometryz|4326|Polygon|2|OK-BOK-GOK-BGOK +geometryz|4326|MultiPoint|2|OK-BOK-GOK-BGOK +geometryz|4326|MultiLineString|2|OK-BOK-GOK-BGOK +geometryz|4326|MultiPolygon|2|OK-BOK-GOK-BGOK +geometryz|4326|GeometryCollection|2|OK-BOK-GOK-BGOK +geometryz|4326|CircularString|2|OK-BOK-GKO:-BGKO +geometryz|4326|CompoundCurve|2|OK-BOK-GKO:-BGKO +geometryz|4326|CurvePolygon|2|OK-BOK-GKO:-BGKO +geometryz|4326|MultiCurve|2|OK-BOK-GKO:-BGKO +geometryz|4326|MultiSurface|2|OK-BOK-GKO:-BGKO +geometryz|4326|PolyhedralSurface|2|OK-BOK-GKO:-BGKO +geometryz|4326|Triangle|2|OK-BOK-GKO:-BGKO +geometryz|4326|Point|1|KO-BKO-GKO:-BGKO +geometryz|4326|LineString|1|KO-BKO-GKO:-BGKO +geometryz|4326|Polygon|1|KO-BKO-GKO:-BGKO +geometryz|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +geometryz|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +geometryz|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +geometryz|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +geometryz|4326|CircularString|1|KO-BKO-GKO:-BGKO +geometryz|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometryz|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometryz|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +geometryz|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +geometryz|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometryz|4326|Triangle|1|KO-BKO-GKO:-BGKO +geometryz|4326|Point|3|KO-BKO-GKO:-BGKO +geometryz|4326|LineString|3|KO-BKO-GKO:-BGKO +geometryz|4326|Polygon|3|KO-BKO-GKO:-BGKO +geometryz|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +geometryz|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +geometryz|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +geometryz|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +geometryz|4326|CircularString|3|KO-BKO-GKO:-BGKO +geometryz|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometryz|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometryz|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +geometryz|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +geometryz|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometryz|4326|Triangle|3|KO-BKO-GKO:-BGKO +geometryz||COUNT|56| +geometryz||GCOUNT|28| +geometryz0|0|Point|0|KO-BKO-GKO:-BGKO +geometryz0|0|LineString|0|KO-BKO-GKO:-BGKO +geometryz0|0|Polygon|0|KO-BKO-GKO:-BGKO +geometryz0|0|MultiPoint|0|KO-BKO-GKO:-BGKO +geometryz0|0|MultiLineString|0|KO-BKO-GKO:-BGKO +geometryz0|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +geometryz0|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +geometryz0|0|CircularString|0|KO-BKO-GKO:-BGKO +geometryz0|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometryz0|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometryz0|0|MultiCurve|0|KO-BKO-GKO:-BGKO +geometryz0|0|MultiSurface|0|KO-BKO-GKO:-BGKO +geometryz0|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometryz0|0|Triangle|0|KO-BKO-GKO:-BGKO +geometryz0|0|Tin|0|KO-BKO-GKO:-BGKO +geometryz0|0|Point|2|OK-BOK-GOK-BGOK +geometryz0|0|LineString|2|OK-BOK-GOK-BGOK +geometryz0|0|Polygon|2|OK-BOK-GOK-BGOK +geometryz0|0|MultiPoint|2|OK-BOK-GOK-BGOK +geometryz0|0|MultiLineString|2|OK-BOK-GOK-BGOK +geometryz0|0|MultiPolygon|2|OK-BOK-GOK-BGOK +geometryz0|0|GeometryCollection|2|OK-BOK-GOK-BGOK +geometryz0|0|CircularString|2|OK-BOK-GKO:-BGKO +geometryz0|0|CompoundCurve|2|OK-BOK-GKO:-BGKO +geometryz0|0|CurvePolygon|2|OK-BOK-GKO:-BGKO +geometryz0|0|MultiCurve|2|OK-BOK-GKO:-BGKO +geometryz0|0|MultiSurface|2|OK-BOK-GKO:-BGKO +geometryz0|0|PolyhedralSurface|2|OK-BOK-GKO:-BGKO +geometryz0|0|Triangle|2|OK-BOK-GKO:-BGKO +geometryz0|0|Point|1|KO-BKO-GKO:-BGKO +geometryz0|0|LineString|1|KO-BKO-GKO:-BGKO +geometryz0|0|Polygon|1|KO-BKO-GKO:-BGKO +geometryz0|0|MultiPoint|1|KO-BKO-GKO:-BGKO +geometryz0|0|MultiLineString|1|KO-BKO-GKO:-BGKO +geometryz0|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +geometryz0|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +geometryz0|0|CircularString|1|KO-BKO-GKO:-BGKO +geometryz0|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometryz0|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometryz0|0|MultiCurve|1|KO-BKO-GKO:-BGKO +geometryz0|0|MultiSurface|1|KO-BKO-GKO:-BGKO +geometryz0|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometryz0|0|Triangle|1|KO-BKO-GKO:-BGKO +geometryz0|0|Point|3|KO-BKO-GKO:-BGKO +geometryz0|0|LineString|3|KO-BKO-GKO:-BGKO +geometryz0|0|Polygon|3|KO-BKO-GKO:-BGKO +geometryz0|0|MultiPoint|3|KO-BKO-GKO:-BGKO +geometryz0|0|MultiLineString|3|KO-BKO-GKO:-BGKO +geometryz0|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +geometryz0|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +geometryz0|0|CircularString|3|KO-BKO-GKO:-BGKO +geometryz0|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometryz0|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometryz0|0|MultiCurve|3|KO-BKO-GKO:-BGKO +geometryz0|0|MultiSurface|3|KO-BKO-GKO:-BGKO +geometryz0|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometryz0|0|Triangle|3|KO-BKO-GKO:-BGKO +geometryz0|4326|Point|0|KO-BKO-GKO:-BGKO +geometryz0|4326|LineString|0|KO-BKO-GKO:-BGKO +geometryz0|4326|Polygon|0|KO-BKO-GKO:-BGKO +geometryz0|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +geometryz0|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +geometryz0|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +geometryz0|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +geometryz0|4326|CircularString|0|KO-BKO-GKO:-BGKO +geometryz0|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometryz0|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometryz0|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +geometryz0|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +geometryz0|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometryz0|4326|Triangle|0|KO-BKO-GKO:-BGKO +geometryz0|4326|Tin|0|KO-BKO-GKO:-BGKO +geometryz0|4326|Point|2|OK-BOK-GOK-BGOK +geometryz0|4326|LineString|2|OK-BOK-GOK-BGOK +geometryz0|4326|Polygon|2|OK-BOK-GOK-BGOK +geometryz0|4326|MultiPoint|2|OK-BOK-GOK-BGOK +geometryz0|4326|MultiLineString|2|OK-BOK-GOK-BGOK +geometryz0|4326|MultiPolygon|2|OK-BOK-GOK-BGOK +geometryz0|4326|GeometryCollection|2|OK-BOK-GOK-BGOK +geometryz0|4326|CircularString|2|OK-BOK-GKO:-BGKO +geometryz0|4326|CompoundCurve|2|OK-BOK-GKO:-BGKO +geometryz0|4326|CurvePolygon|2|OK-BOK-GKO:-BGKO +geometryz0|4326|MultiCurve|2|OK-BOK-GKO:-BGKO +geometryz0|4326|MultiSurface|2|OK-BOK-GKO:-BGKO +geometryz0|4326|PolyhedralSurface|2|OK-BOK-GKO:-BGKO +geometryz0|4326|Triangle|2|OK-BOK-GKO:-BGKO +geometryz0|4326|Point|1|KO-BKO-GKO:-BGKO +geometryz0|4326|LineString|1|KO-BKO-GKO:-BGKO +geometryz0|4326|Polygon|1|KO-BKO-GKO:-BGKO +geometryz0|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +geometryz0|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +geometryz0|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +geometryz0|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +geometryz0|4326|CircularString|1|KO-BKO-GKO:-BGKO +geometryz0|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometryz0|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometryz0|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +geometryz0|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +geometryz0|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometryz0|4326|Triangle|1|KO-BKO-GKO:-BGKO +geometryz0|4326|Point|3|KO-BKO-GKO:-BGKO +geometryz0|4326|LineString|3|KO-BKO-GKO:-BGKO +geometryz0|4326|Polygon|3|KO-BKO-GKO:-BGKO +geometryz0|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +geometryz0|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +geometryz0|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +geometryz0|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +geometryz0|4326|CircularString|3|KO-BKO-GKO:-BGKO +geometryz0|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometryz0|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometryz0|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +geometryz0|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +geometryz0|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometryz0|4326|Triangle|3|KO-BKO-GKO:-BGKO +geometryz0||COUNT|56| +geometryz0||GCOUNT|28| +geometryz4326|0|Point|0|KO-BKO-GKO:-BGKO +geometryz4326|0|LineString|0|KO-BKO-GKO:-BGKO +geometryz4326|0|Polygon|0|KO-BKO-GKO:-BGKO +geometryz4326|0|MultiPoint|0|KO-BKO-GKO:-BGKO +geometryz4326|0|MultiLineString|0|KO-BKO-GKO:-BGKO +geometryz4326|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +geometryz4326|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +geometryz4326|0|CircularString|0|KO-BKO-GKO:-BGKO +geometryz4326|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometryz4326|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometryz4326|0|MultiCurve|0|KO-BKO-GKO:-BGKO +geometryz4326|0|MultiSurface|0|KO-BKO-GKO:-BGKO +geometryz4326|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometryz4326|0|Triangle|0|KO-BKO-GKO:-BGKO +geometryz4326|0|Tin|0|KO-BKO-GKO:-BGKO +geometryz4326|0|Point|2|KO-BKO-GOK-BGOK +geometryz4326|0|LineString|2|KO-BKO-GOK-BGOK +geometryz4326|0|Polygon|2|KO-BKO-GOK-BGOK +geometryz4326|0|MultiPoint|2|KO-BKO-GOK-BGOK +geometryz4326|0|MultiLineString|2|KO-BKO-GOK-BGOK +geometryz4326|0|MultiPolygon|2|KO-BKO-GOK-BGOK +geometryz4326|0|GeometryCollection|2|KO-BKO-GOK-BGOK +geometryz4326|0|CircularString|2|KO-BKO-GKO:-BGKO +geometryz4326|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometryz4326|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometryz4326|0|MultiCurve|2|KO-BKO-GKO:-BGKO +geometryz4326|0|MultiSurface|2|KO-BKO-GKO:-BGKO +geometryz4326|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometryz4326|0|Triangle|2|KO-BKO-GKO:-BGKO +geometryz4326|0|Point|1|KO-BKO-GKO:-BGKO +geometryz4326|0|LineString|1|KO-BKO-GKO:-BGKO +geometryz4326|0|Polygon|1|KO-BKO-GKO:-BGKO +geometryz4326|0|MultiPoint|1|KO-BKO-GKO:-BGKO +geometryz4326|0|MultiLineString|1|KO-BKO-GKO:-BGKO +geometryz4326|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +geometryz4326|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +geometryz4326|0|CircularString|1|KO-BKO-GKO:-BGKO +geometryz4326|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometryz4326|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometryz4326|0|MultiCurve|1|KO-BKO-GKO:-BGKO +geometryz4326|0|MultiSurface|1|KO-BKO-GKO:-BGKO +geometryz4326|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometryz4326|0|Triangle|1|KO-BKO-GKO:-BGKO +geometryz4326|0|Point|3|KO-BKO-GKO:-BGKO +geometryz4326|0|LineString|3|KO-BKO-GKO:-BGKO +geometryz4326|0|Polygon|3|KO-BKO-GKO:-BGKO +geometryz4326|0|MultiPoint|3|KO-BKO-GKO:-BGKO +geometryz4326|0|MultiLineString|3|KO-BKO-GKO:-BGKO +geometryz4326|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +geometryz4326|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +geometryz4326|0|CircularString|3|KO-BKO-GKO:-BGKO +geometryz4326|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometryz4326|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometryz4326|0|MultiCurve|3|KO-BKO-GKO:-BGKO +geometryz4326|0|MultiSurface|3|KO-BKO-GKO:-BGKO +geometryz4326|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometryz4326|0|Triangle|3|KO-BKO-GKO:-BGKO +geometryz4326|4326|Point|0|KO-BKO-GKO:-BGKO +geometryz4326|4326|LineString|0|KO-BKO-GKO:-BGKO +geometryz4326|4326|Polygon|0|KO-BKO-GKO:-BGKO +geometryz4326|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +geometryz4326|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +geometryz4326|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +geometryz4326|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +geometryz4326|4326|CircularString|0|KO-BKO-GKO:-BGKO +geometryz4326|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometryz4326|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometryz4326|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +geometryz4326|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +geometryz4326|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometryz4326|4326|Triangle|0|KO-BKO-GKO:-BGKO +geometryz4326|4326|Tin|0|KO-BKO-GKO:-BGKO +geometryz4326|4326|Point|2|OK-BOK-GOK-BGOK +geometryz4326|4326|LineString|2|OK-BOK-GOK-BGOK +geometryz4326|4326|Polygon|2|OK-BOK-GOK-BGOK +geometryz4326|4326|MultiPoint|2|OK-BOK-GOK-BGOK +geometryz4326|4326|MultiLineString|2|OK-BOK-GOK-BGOK +geometryz4326|4326|MultiPolygon|2|OK-BOK-GOK-BGOK +geometryz4326|4326|GeometryCollection|2|OK-BOK-GOK-BGOK +geometryz4326|4326|CircularString|2|OK-BOK-GKO:-BGKO +geometryz4326|4326|CompoundCurve|2|OK-BOK-GKO:-BGKO +geometryz4326|4326|CurvePolygon|2|OK-BOK-GKO:-BGKO +geometryz4326|4326|MultiCurve|2|OK-BOK-GKO:-BGKO +geometryz4326|4326|MultiSurface|2|OK-BOK-GKO:-BGKO +geometryz4326|4326|PolyhedralSurface|2|OK-BOK-GKO:-BGKO +geometryz4326|4326|Triangle|2|OK-BOK-GKO:-BGKO +geometryz4326|4326|Point|1|KO-BKO-GKO:-BGKO +geometryz4326|4326|LineString|1|KO-BKO-GKO:-BGKO +geometryz4326|4326|Polygon|1|KO-BKO-GKO:-BGKO +geometryz4326|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +geometryz4326|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +geometryz4326|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +geometryz4326|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +geometryz4326|4326|CircularString|1|KO-BKO-GKO:-BGKO +geometryz4326|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometryz4326|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometryz4326|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +geometryz4326|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +geometryz4326|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometryz4326|4326|Triangle|1|KO-BKO-GKO:-BGKO +geometryz4326|4326|Point|3|KO-BKO-GKO:-BGKO +geometryz4326|4326|LineString|3|KO-BKO-GKO:-BGKO +geometryz4326|4326|Polygon|3|KO-BKO-GKO:-BGKO +geometryz4326|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +geometryz4326|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +geometryz4326|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +geometryz4326|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +geometryz4326|4326|CircularString|3|KO-BKO-GKO:-BGKO +geometryz4326|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometryz4326|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometryz4326|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +geometryz4326|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +geometryz4326|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometryz4326|4326|Triangle|3|KO-BKO-GKO:-BGKO +geometryz4326||COUNT|28| +geometryz4326||GCOUNT|28| +geometryzm|0|Point|0|KO-BKO-GKO:-BGKO +geometryzm|0|LineString|0|KO-BKO-GKO:-BGKO +geometryzm|0|Polygon|0|KO-BKO-GKO:-BGKO +geometryzm|0|MultiPoint|0|KO-BKO-GKO:-BGKO +geometryzm|0|MultiLineString|0|KO-BKO-GKO:-BGKO +geometryzm|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +geometryzm|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +geometryzm|0|CircularString|0|KO-BKO-GKO:-BGKO +geometryzm|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometryzm|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometryzm|0|MultiCurve|0|KO-BKO-GKO:-BGKO +geometryzm|0|MultiSurface|0|KO-BKO-GKO:-BGKO +geometryzm|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometryzm|0|Triangle|0|KO-BKO-GKO:-BGKO +geometryzm|0|Tin|0|KO-BKO-GKO:-BGKO +geometryzm|0|Point|2|KO-BKO-GKO:-BGKO +geometryzm|0|LineString|2|KO-BKO-GKO:-BGKO +geometryzm|0|Polygon|2|KO-BKO-GKO:-BGKO +geometryzm|0|MultiPoint|2|KO-BKO-GKO:-BGKO +geometryzm|0|MultiLineString|2|KO-BKO-GKO:-BGKO +geometryzm|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +geometryzm|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +geometryzm|0|CircularString|2|KO-BKO-GKO:-BGKO +geometryzm|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometryzm|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometryzm|0|MultiCurve|2|KO-BKO-GKO:-BGKO +geometryzm|0|MultiSurface|2|KO-BKO-GKO:-BGKO +geometryzm|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometryzm|0|Triangle|2|KO-BKO-GKO:-BGKO +geometryzm|0|Point|1|KO-BKO-GKO:-BGKO +geometryzm|0|LineString|1|KO-BKO-GKO:-BGKO +geometryzm|0|Polygon|1|KO-BKO-GKO:-BGKO +geometryzm|0|MultiPoint|1|KO-BKO-GKO:-BGKO +geometryzm|0|MultiLineString|1|KO-BKO-GKO:-BGKO +geometryzm|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +geometryzm|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +geometryzm|0|CircularString|1|KO-BKO-GKO:-BGKO +geometryzm|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometryzm|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometryzm|0|MultiCurve|1|KO-BKO-GKO:-BGKO +geometryzm|0|MultiSurface|1|KO-BKO-GKO:-BGKO +geometryzm|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometryzm|0|Triangle|1|KO-BKO-GKO:-BGKO +geometryzm|0|Point|3|OK-BOK-GOK-BGOK +geometryzm|0|LineString|3|OK-BOK-GOK-BGOK +geometryzm|0|Polygon|3|OK-BOK-GOK-BGOK +geometryzm|0|MultiPoint|3|OK-BOK-GOK-BGOK +geometryzm|0|MultiLineString|3|OK-BOK-GOK-BGOK +geometryzm|0|MultiPolygon|3|OK-BOK-GOK-BGOK +geometryzm|0|GeometryCollection|3|OK-BOK-GOK-BGOK +geometryzm|0|CircularString|3|OK-BOK-GKO:-BGKO +geometryzm|0|CompoundCurve|3|OK-BOK-GKO:-BGKO +geometryzm|0|CurvePolygon|3|OK-BOK-GKO:-BGKO +geometryzm|0|MultiCurve|3|OK-BOK-GKO:-BGKO +geometryzm|0|MultiSurface|3|OK-BOK-GKO:-BGKO +geometryzm|0|PolyhedralSurface|3|OK-BOK-GKO:-BGKO +geometryzm|0|Triangle|3|OK-BOK-GKO:-BGKO +geometryzm|4326|Point|0|KO-BKO-GKO:-BGKO +geometryzm|4326|LineString|0|KO-BKO-GKO:-BGKO +geometryzm|4326|Polygon|0|KO-BKO-GKO:-BGKO +geometryzm|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +geometryzm|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +geometryzm|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +geometryzm|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +geometryzm|4326|CircularString|0|KO-BKO-GKO:-BGKO +geometryzm|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometryzm|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometryzm|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +geometryzm|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +geometryzm|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometryzm|4326|Triangle|0|KO-BKO-GKO:-BGKO +geometryzm|4326|Tin|0|KO-BKO-GKO:-BGKO +geometryzm|4326|Point|2|KO-BKO-GKO:-BGKO +geometryzm|4326|LineString|2|KO-BKO-GKO:-BGKO +geometryzm|4326|Polygon|2|KO-BKO-GKO:-BGKO +geometryzm|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +geometryzm|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +geometryzm|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +geometryzm|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +geometryzm|4326|CircularString|2|KO-BKO-GKO:-BGKO +geometryzm|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometryzm|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometryzm|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +geometryzm|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +geometryzm|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometryzm|4326|Triangle|2|KO-BKO-GKO:-BGKO +geometryzm|4326|Point|1|KO-BKO-GKO:-BGKO +geometryzm|4326|LineString|1|KO-BKO-GKO:-BGKO +geometryzm|4326|Polygon|1|KO-BKO-GKO:-BGKO +geometryzm|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +geometryzm|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +geometryzm|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +geometryzm|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +geometryzm|4326|CircularString|1|KO-BKO-GKO:-BGKO +geometryzm|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometryzm|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometryzm|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +geometryzm|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +geometryzm|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometryzm|4326|Triangle|1|KO-BKO-GKO:-BGKO +geometryzm|4326|Point|3|OK-BOK-GOK-BGOK +geometryzm|4326|LineString|3|OK-BOK-GOK-BGOK +geometryzm|4326|Polygon|3|OK-BOK-GOK-BGOK +geometryzm|4326|MultiPoint|3|OK-BOK-GOK-BGOK +geometryzm|4326|MultiLineString|3|OK-BOK-GOK-BGOK +geometryzm|4326|MultiPolygon|3|OK-BOK-GOK-BGOK +geometryzm|4326|GeometryCollection|3|OK-BOK-GOK-BGOK +geometryzm|4326|CircularString|3|OK-BOK-GKO:-BGKO +geometryzm|4326|CompoundCurve|3|OK-BOK-GKO:-BGKO +geometryzm|4326|CurvePolygon|3|OK-BOK-GKO:-BGKO +geometryzm|4326|MultiCurve|3|OK-BOK-GKO:-BGKO +geometryzm|4326|MultiSurface|3|OK-BOK-GKO:-BGKO +geometryzm|4326|PolyhedralSurface|3|OK-BOK-GKO:-BGKO +geometryzm|4326|Triangle|3|OK-BOK-GKO:-BGKO +geometryzm||COUNT|56| +geometryzm||GCOUNT|28| +geometryzm0|0|Point|0|KO-BKO-GKO:-BGKO +geometryzm0|0|LineString|0|KO-BKO-GKO:-BGKO +geometryzm0|0|Polygon|0|KO-BKO-GKO:-BGKO +geometryzm0|0|MultiPoint|0|KO-BKO-GKO:-BGKO +geometryzm0|0|MultiLineString|0|KO-BKO-GKO:-BGKO +geometryzm0|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +geometryzm0|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +geometryzm0|0|CircularString|0|KO-BKO-GKO:-BGKO +geometryzm0|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometryzm0|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometryzm0|0|MultiCurve|0|KO-BKO-GKO:-BGKO +geometryzm0|0|MultiSurface|0|KO-BKO-GKO:-BGKO +geometryzm0|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometryzm0|0|Triangle|0|KO-BKO-GKO:-BGKO +geometryzm0|0|Tin|0|KO-BKO-GKO:-BGKO +geometryzm0|0|Point|2|KO-BKO-GKO:-BGKO +geometryzm0|0|LineString|2|KO-BKO-GKO:-BGKO +geometryzm0|0|Polygon|2|KO-BKO-GKO:-BGKO +geometryzm0|0|MultiPoint|2|KO-BKO-GKO:-BGKO +geometryzm0|0|MultiLineString|2|KO-BKO-GKO:-BGKO +geometryzm0|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +geometryzm0|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +geometryzm0|0|CircularString|2|KO-BKO-GKO:-BGKO +geometryzm0|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometryzm0|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometryzm0|0|MultiCurve|2|KO-BKO-GKO:-BGKO +geometryzm0|0|MultiSurface|2|KO-BKO-GKO:-BGKO +geometryzm0|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometryzm0|0|Triangle|2|KO-BKO-GKO:-BGKO +geometryzm0|0|Point|1|KO-BKO-GKO:-BGKO +geometryzm0|0|LineString|1|KO-BKO-GKO:-BGKO +geometryzm0|0|Polygon|1|KO-BKO-GKO:-BGKO +geometryzm0|0|MultiPoint|1|KO-BKO-GKO:-BGKO +geometryzm0|0|MultiLineString|1|KO-BKO-GKO:-BGKO +geometryzm0|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +geometryzm0|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +geometryzm0|0|CircularString|1|KO-BKO-GKO:-BGKO +geometryzm0|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometryzm0|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometryzm0|0|MultiCurve|1|KO-BKO-GKO:-BGKO +geometryzm0|0|MultiSurface|1|KO-BKO-GKO:-BGKO +geometryzm0|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometryzm0|0|Triangle|1|KO-BKO-GKO:-BGKO +geometryzm0|0|Point|3|OK-BOK-GOK-BGOK +geometryzm0|0|LineString|3|OK-BOK-GOK-BGOK +geometryzm0|0|Polygon|3|OK-BOK-GOK-BGOK +geometryzm0|0|MultiPoint|3|OK-BOK-GOK-BGOK +geometryzm0|0|MultiLineString|3|OK-BOK-GOK-BGOK +geometryzm0|0|MultiPolygon|3|OK-BOK-GOK-BGOK +geometryzm0|0|GeometryCollection|3|OK-BOK-GOK-BGOK +geometryzm0|0|CircularString|3|OK-BOK-GKO:-BGKO +geometryzm0|0|CompoundCurve|3|OK-BOK-GKO:-BGKO +geometryzm0|0|CurvePolygon|3|OK-BOK-GKO:-BGKO +geometryzm0|0|MultiCurve|3|OK-BOK-GKO:-BGKO +geometryzm0|0|MultiSurface|3|OK-BOK-GKO:-BGKO +geometryzm0|0|PolyhedralSurface|3|OK-BOK-GKO:-BGKO +geometryzm0|0|Triangle|3|OK-BOK-GKO:-BGKO +geometryzm0|4326|Point|0|KO-BKO-GKO:-BGKO +geometryzm0|4326|LineString|0|KO-BKO-GKO:-BGKO +geometryzm0|4326|Polygon|0|KO-BKO-GKO:-BGKO +geometryzm0|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +geometryzm0|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +geometryzm0|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +geometryzm0|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +geometryzm0|4326|CircularString|0|KO-BKO-GKO:-BGKO +geometryzm0|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometryzm0|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometryzm0|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +geometryzm0|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +geometryzm0|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometryzm0|4326|Triangle|0|KO-BKO-GKO:-BGKO +geometryzm0|4326|Tin|0|KO-BKO-GKO:-BGKO +geometryzm0|4326|Point|2|KO-BKO-GKO:-BGKO +geometryzm0|4326|LineString|2|KO-BKO-GKO:-BGKO +geometryzm0|4326|Polygon|2|KO-BKO-GKO:-BGKO +geometryzm0|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +geometryzm0|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +geometryzm0|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +geometryzm0|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +geometryzm0|4326|CircularString|2|KO-BKO-GKO:-BGKO +geometryzm0|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometryzm0|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometryzm0|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +geometryzm0|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +geometryzm0|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometryzm0|4326|Triangle|2|KO-BKO-GKO:-BGKO +geometryzm0|4326|Point|1|KO-BKO-GKO:-BGKO +geometryzm0|4326|LineString|1|KO-BKO-GKO:-BGKO +geometryzm0|4326|Polygon|1|KO-BKO-GKO:-BGKO +geometryzm0|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +geometryzm0|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +geometryzm0|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +geometryzm0|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +geometryzm0|4326|CircularString|1|KO-BKO-GKO:-BGKO +geometryzm0|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometryzm0|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometryzm0|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +geometryzm0|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +geometryzm0|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometryzm0|4326|Triangle|1|KO-BKO-GKO:-BGKO +geometryzm0|4326|Point|3|OK-BOK-GOK-BGOK +geometryzm0|4326|LineString|3|OK-BOK-GOK-BGOK +geometryzm0|4326|Polygon|3|OK-BOK-GOK-BGOK +geometryzm0|4326|MultiPoint|3|OK-BOK-GOK-BGOK +geometryzm0|4326|MultiLineString|3|OK-BOK-GOK-BGOK +geometryzm0|4326|MultiPolygon|3|OK-BOK-GOK-BGOK +geometryzm0|4326|GeometryCollection|3|OK-BOK-GOK-BGOK +geometryzm0|4326|CircularString|3|OK-BOK-GKO:-BGKO +geometryzm0|4326|CompoundCurve|3|OK-BOK-GKO:-BGKO +geometryzm0|4326|CurvePolygon|3|OK-BOK-GKO:-BGKO +geometryzm0|4326|MultiCurve|3|OK-BOK-GKO:-BGKO +geometryzm0|4326|MultiSurface|3|OK-BOK-GKO:-BGKO +geometryzm0|4326|PolyhedralSurface|3|OK-BOK-GKO:-BGKO +geometryzm0|4326|Triangle|3|OK-BOK-GKO:-BGKO +geometryzm0||COUNT|56| +geometryzm0||GCOUNT|28| +geometryzm4326|0|Point|0|KO-BKO-GKO:-BGKO +geometryzm4326|0|LineString|0|KO-BKO-GKO:-BGKO +geometryzm4326|0|Polygon|0|KO-BKO-GKO:-BGKO +geometryzm4326|0|MultiPoint|0|KO-BKO-GKO:-BGKO +geometryzm4326|0|MultiLineString|0|KO-BKO-GKO:-BGKO +geometryzm4326|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +geometryzm4326|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +geometryzm4326|0|CircularString|0|KO-BKO-GKO:-BGKO +geometryzm4326|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometryzm4326|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometryzm4326|0|MultiCurve|0|KO-BKO-GKO:-BGKO +geometryzm4326|0|MultiSurface|0|KO-BKO-GKO:-BGKO +geometryzm4326|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometryzm4326|0|Triangle|0|KO-BKO-GKO:-BGKO +geometryzm4326|0|Tin|0|KO-BKO-GKO:-BGKO +geometryzm4326|0|Point|2|KO-BKO-GKO:-BGKO +geometryzm4326|0|LineString|2|KO-BKO-GKO:-BGKO +geometryzm4326|0|Polygon|2|KO-BKO-GKO:-BGKO +geometryzm4326|0|MultiPoint|2|KO-BKO-GKO:-BGKO +geometryzm4326|0|MultiLineString|2|KO-BKO-GKO:-BGKO +geometryzm4326|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +geometryzm4326|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +geometryzm4326|0|CircularString|2|KO-BKO-GKO:-BGKO +geometryzm4326|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometryzm4326|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometryzm4326|0|MultiCurve|2|KO-BKO-GKO:-BGKO +geometryzm4326|0|MultiSurface|2|KO-BKO-GKO:-BGKO +geometryzm4326|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometryzm4326|0|Triangle|2|KO-BKO-GKO:-BGKO +geometryzm4326|0|Point|1|KO-BKO-GKO:-BGKO +geometryzm4326|0|LineString|1|KO-BKO-GKO:-BGKO +geometryzm4326|0|Polygon|1|KO-BKO-GKO:-BGKO +geometryzm4326|0|MultiPoint|1|KO-BKO-GKO:-BGKO +geometryzm4326|0|MultiLineString|1|KO-BKO-GKO:-BGKO +geometryzm4326|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +geometryzm4326|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +geometryzm4326|0|CircularString|1|KO-BKO-GKO:-BGKO +geometryzm4326|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometryzm4326|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometryzm4326|0|MultiCurve|1|KO-BKO-GKO:-BGKO +geometryzm4326|0|MultiSurface|1|KO-BKO-GKO:-BGKO +geometryzm4326|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometryzm4326|0|Triangle|1|KO-BKO-GKO:-BGKO +geometryzm4326|0|Point|3|KO-BKO-GOK-BGOK +geometryzm4326|0|LineString|3|KO-BKO-GOK-BGOK +geometryzm4326|0|Polygon|3|KO-BKO-GOK-BGOK +geometryzm4326|0|MultiPoint|3|KO-BKO-GOK-BGOK +geometryzm4326|0|MultiLineString|3|KO-BKO-GOK-BGOK +geometryzm4326|0|MultiPolygon|3|KO-BKO-GOK-BGOK +geometryzm4326|0|GeometryCollection|3|KO-BKO-GOK-BGOK +geometryzm4326|0|CircularString|3|KO-BKO-GKO:-BGKO +geometryzm4326|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +geometryzm4326|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +geometryzm4326|0|MultiCurve|3|KO-BKO-GKO:-BGKO +geometryzm4326|0|MultiSurface|3|KO-BKO-GKO:-BGKO +geometryzm4326|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +geometryzm4326|0|Triangle|3|KO-BKO-GKO:-BGKO +geometryzm4326|4326|Point|0|KO-BKO-GKO:-BGKO +geometryzm4326|4326|LineString|0|KO-BKO-GKO:-BGKO +geometryzm4326|4326|Polygon|0|KO-BKO-GKO:-BGKO +geometryzm4326|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +geometryzm4326|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +geometryzm4326|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +geometryzm4326|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +geometryzm4326|4326|CircularString|0|KO-BKO-GKO:-BGKO +geometryzm4326|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +geometryzm4326|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +geometryzm4326|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +geometryzm4326|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +geometryzm4326|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +geometryzm4326|4326|Triangle|0|KO-BKO-GKO:-BGKO +geometryzm4326|4326|Tin|0|KO-BKO-GKO:-BGKO +geometryzm4326|4326|Point|2|KO-BKO-GKO:-BGKO +geometryzm4326|4326|LineString|2|KO-BKO-GKO:-BGKO +geometryzm4326|4326|Polygon|2|KO-BKO-GKO:-BGKO +geometryzm4326|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +geometryzm4326|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +geometryzm4326|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +geometryzm4326|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +geometryzm4326|4326|CircularString|2|KO-BKO-GKO:-BGKO +geometryzm4326|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +geometryzm4326|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +geometryzm4326|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +geometryzm4326|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +geometryzm4326|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +geometryzm4326|4326|Triangle|2|KO-BKO-GKO:-BGKO +geometryzm4326|4326|Point|1|KO-BKO-GKO:-BGKO +geometryzm4326|4326|LineString|1|KO-BKO-GKO:-BGKO +geometryzm4326|4326|Polygon|1|KO-BKO-GKO:-BGKO +geometryzm4326|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +geometryzm4326|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +geometryzm4326|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +geometryzm4326|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +geometryzm4326|4326|CircularString|1|KO-BKO-GKO:-BGKO +geometryzm4326|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +geometryzm4326|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +geometryzm4326|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +geometryzm4326|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +geometryzm4326|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +geometryzm4326|4326|Triangle|1|KO-BKO-GKO:-BGKO +geometryzm4326|4326|Point|3|OK-BOK-GOK-BGOK +geometryzm4326|4326|LineString|3|OK-BOK-GOK-BGOK +geometryzm4326|4326|Polygon|3|OK-BOK-GOK-BGOK +geometryzm4326|4326|MultiPoint|3|OK-BOK-GOK-BGOK +geometryzm4326|4326|MultiLineString|3|OK-BOK-GOK-BGOK +geometryzm4326|4326|MultiPolygon|3|OK-BOK-GOK-BGOK +geometryzm4326|4326|GeometryCollection|3|OK-BOK-GOK-BGOK +geometryzm4326|4326|CircularString|3|OK-BOK-GKO:-BGKO +geometryzm4326|4326|CompoundCurve|3|OK-BOK-GKO:-BGKO +geometryzm4326|4326|CurvePolygon|3|OK-BOK-GKO:-BGKO +geometryzm4326|4326|MultiCurve|3|OK-BOK-GKO:-BGKO +geometryzm4326|4326|MultiSurface|3|OK-BOK-GKO:-BGKO +geometryzm4326|4326|PolyhedralSurface|3|OK-BOK-GKO:-BGKO +geometryzm4326|4326|Triangle|3|OK-BOK-GKO:-BGKO +geometryzm4326||COUNT|28| +geometryzm4326||GCOUNT|28| +linestring|0|Point|0|KO-BKO-GKO:-BGKO +linestring|0|LineString|0|OK-BOK-GOK-BGOK +linestring|0|Polygon|0|KO-BKO-GKO:-BGKO +linestring|0|MultiPoint|0|KO-BKO-GKO:-BGKO +linestring|0|MultiLineString|0|KO-BKO-GKO:-BGKO +linestring|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +linestring|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +linestring|0|CircularString|0|KO-BKO-GKO:-BGKO +linestring|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +linestring|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +linestring|0|MultiCurve|0|KO-BKO-GKO:-BGKO +linestring|0|MultiSurface|0|KO-BKO-GKO:-BGKO +linestring|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +linestring|0|Triangle|0|KO-BKO-GKO:-BGKO +linestring|0|Tin|0|KO-BKO-GKO:-BGKO +linestring|0|Point|2|KO-BKO-GKO:-BGKO +linestring|0|LineString|2|KO-BKO-GKO:-BGKO +linestring|0|Polygon|2|KO-BKO-GKO:-BGKO +linestring|0|MultiPoint|2|KO-BKO-GKO:-BGKO +linestring|0|MultiLineString|2|KO-BKO-GKO:-BGKO +linestring|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +linestring|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +linestring|0|CircularString|2|KO-BKO-GKO:-BGKO +linestring|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +linestring|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +linestring|0|MultiCurve|2|KO-BKO-GKO:-BGKO +linestring|0|MultiSurface|2|KO-BKO-GKO:-BGKO +linestring|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +linestring|0|Triangle|2|KO-BKO-GKO:-BGKO +linestring|0|Point|1|KO-BKO-GKO:-BGKO +linestring|0|LineString|1|KO-BKO-GKO:-BGKO +linestring|0|Polygon|1|KO-BKO-GKO:-BGKO +linestring|0|MultiPoint|1|KO-BKO-GKO:-BGKO +linestring|0|MultiLineString|1|KO-BKO-GKO:-BGKO +linestring|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +linestring|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +linestring|0|CircularString|1|KO-BKO-GKO:-BGKO +linestring|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +linestring|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +linestring|0|MultiCurve|1|KO-BKO-GKO:-BGKO +linestring|0|MultiSurface|1|KO-BKO-GKO:-BGKO +linestring|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +linestring|0|Triangle|1|KO-BKO-GKO:-BGKO +linestring|0|Point|3|KO-BKO-GKO:-BGKO +linestring|0|LineString|3|KO-BKO-GKO:-BGKO +linestring|0|Polygon|3|KO-BKO-GKO:-BGKO +linestring|0|MultiPoint|3|KO-BKO-GKO:-BGKO +linestring|0|MultiLineString|3|KO-BKO-GKO:-BGKO +linestring|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +linestring|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +linestring|0|CircularString|3|KO-BKO-GKO:-BGKO +linestring|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +linestring|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +linestring|0|MultiCurve|3|KO-BKO-GKO:-BGKO +linestring|0|MultiSurface|3|KO-BKO-GKO:-BGKO +linestring|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +linestring|0|Triangle|3|KO-BKO-GKO:-BGKO +linestring|4326|Point|0|KO-BKO-GKO:-BGKO +linestring|4326|LineString|0|OK-BOK-GOK-BGOK +linestring|4326|Polygon|0|KO-BKO-GKO:-BGKO +linestring|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +linestring|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +linestring|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +linestring|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +linestring|4326|CircularString|0|KO-BKO-GKO:-BGKO +linestring|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +linestring|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +linestring|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +linestring|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +linestring|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +linestring|4326|Triangle|0|KO-BKO-GKO:-BGKO +linestring|4326|Tin|0|KO-BKO-GKO:-BGKO +linestring|4326|Point|2|KO-BKO-GKO:-BGKO +linestring|4326|LineString|2|KO-BKO-GKO:-BGKO +linestring|4326|Polygon|2|KO-BKO-GKO:-BGKO +linestring|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +linestring|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +linestring|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +linestring|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +linestring|4326|CircularString|2|KO-BKO-GKO:-BGKO +linestring|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +linestring|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +linestring|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +linestring|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +linestring|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +linestring|4326|Triangle|2|KO-BKO-GKO:-BGKO +linestring|4326|Point|1|KO-BKO-GKO:-BGKO +linestring|4326|LineString|1|KO-BKO-GKO:-BGKO +linestring|4326|Polygon|1|KO-BKO-GKO:-BGKO +linestring|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +linestring|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +linestring|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +linestring|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +linestring|4326|CircularString|1|KO-BKO-GKO:-BGKO +linestring|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +linestring|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +linestring|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +linestring|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +linestring|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +linestring|4326|Triangle|1|KO-BKO-GKO:-BGKO +linestring|4326|Point|3|KO-BKO-GKO:-BGKO +linestring|4326|LineString|3|KO-BKO-GKO:-BGKO +linestring|4326|Polygon|3|KO-BKO-GKO:-BGKO +linestring|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +linestring|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +linestring|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +linestring|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +linestring|4326|CircularString|3|KO-BKO-GKO:-BGKO +linestring|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +linestring|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +linestring|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +linestring|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +linestring|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +linestring|4326|Triangle|3|KO-BKO-GKO:-BGKO +linestring||COUNT|4| +linestring||GCOUNT|4| +linestring0|0|Point|0|KO-BKO-GKO:-BGKO +linestring0|0|LineString|0|OK-BOK-GOK-BGOK +linestring0|0|Polygon|0|KO-BKO-GKO:-BGKO +linestring0|0|MultiPoint|0|KO-BKO-GKO:-BGKO +linestring0|0|MultiLineString|0|KO-BKO-GKO:-BGKO +linestring0|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +linestring0|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +linestring0|0|CircularString|0|KO-BKO-GKO:-BGKO +linestring0|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +linestring0|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +linestring0|0|MultiCurve|0|KO-BKO-GKO:-BGKO +linestring0|0|MultiSurface|0|KO-BKO-GKO:-BGKO +linestring0|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +linestring0|0|Triangle|0|KO-BKO-GKO:-BGKO +linestring0|0|Tin|0|KO-BKO-GKO:-BGKO +linestring0|0|Point|2|KO-BKO-GKO:-BGKO +linestring0|0|LineString|2|KO-BKO-GKO:-BGKO +linestring0|0|Polygon|2|KO-BKO-GKO:-BGKO +linestring0|0|MultiPoint|2|KO-BKO-GKO:-BGKO +linestring0|0|MultiLineString|2|KO-BKO-GKO:-BGKO +linestring0|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +linestring0|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +linestring0|0|CircularString|2|KO-BKO-GKO:-BGKO +linestring0|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +linestring0|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +linestring0|0|MultiCurve|2|KO-BKO-GKO:-BGKO +linestring0|0|MultiSurface|2|KO-BKO-GKO:-BGKO +linestring0|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +linestring0|0|Triangle|2|KO-BKO-GKO:-BGKO +linestring0|0|Point|1|KO-BKO-GKO:-BGKO +linestring0|0|LineString|1|KO-BKO-GKO:-BGKO +linestring0|0|Polygon|1|KO-BKO-GKO:-BGKO +linestring0|0|MultiPoint|1|KO-BKO-GKO:-BGKO +linestring0|0|MultiLineString|1|KO-BKO-GKO:-BGKO +linestring0|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +linestring0|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +linestring0|0|CircularString|1|KO-BKO-GKO:-BGKO +linestring0|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +linestring0|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +linestring0|0|MultiCurve|1|KO-BKO-GKO:-BGKO +linestring0|0|MultiSurface|1|KO-BKO-GKO:-BGKO +linestring0|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +linestring0|0|Triangle|1|KO-BKO-GKO:-BGKO +linestring0|0|Point|3|KO-BKO-GKO:-BGKO +linestring0|0|LineString|3|KO-BKO-GKO:-BGKO +linestring0|0|Polygon|3|KO-BKO-GKO:-BGKO +linestring0|0|MultiPoint|3|KO-BKO-GKO:-BGKO +linestring0|0|MultiLineString|3|KO-BKO-GKO:-BGKO +linestring0|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +linestring0|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +linestring0|0|CircularString|3|KO-BKO-GKO:-BGKO +linestring0|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +linestring0|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +linestring0|0|MultiCurve|3|KO-BKO-GKO:-BGKO +linestring0|0|MultiSurface|3|KO-BKO-GKO:-BGKO +linestring0|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +linestring0|0|Triangle|3|KO-BKO-GKO:-BGKO +linestring0|4326|Point|0|KO-BKO-GKO:-BGKO +linestring0|4326|LineString|0|OK-BOK-GOK-BGOK +linestring0|4326|Polygon|0|KO-BKO-GKO:-BGKO +linestring0|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +linestring0|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +linestring0|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +linestring0|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +linestring0|4326|CircularString|0|KO-BKO-GKO:-BGKO +linestring0|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +linestring0|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +linestring0|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +linestring0|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +linestring0|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +linestring0|4326|Triangle|0|KO-BKO-GKO:-BGKO +linestring0|4326|Tin|0|KO-BKO-GKO:-BGKO +linestring0|4326|Point|2|KO-BKO-GKO:-BGKO +linestring0|4326|LineString|2|KO-BKO-GKO:-BGKO +linestring0|4326|Polygon|2|KO-BKO-GKO:-BGKO +linestring0|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +linestring0|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +linestring0|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +linestring0|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +linestring0|4326|CircularString|2|KO-BKO-GKO:-BGKO +linestring0|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +linestring0|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +linestring0|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +linestring0|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +linestring0|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +linestring0|4326|Triangle|2|KO-BKO-GKO:-BGKO +linestring0|4326|Point|1|KO-BKO-GKO:-BGKO +linestring0|4326|LineString|1|KO-BKO-GKO:-BGKO +linestring0|4326|Polygon|1|KO-BKO-GKO:-BGKO +linestring0|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +linestring0|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +linestring0|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +linestring0|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +linestring0|4326|CircularString|1|KO-BKO-GKO:-BGKO +linestring0|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +linestring0|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +linestring0|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +linestring0|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +linestring0|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +linestring0|4326|Triangle|1|KO-BKO-GKO:-BGKO +linestring0|4326|Point|3|KO-BKO-GKO:-BGKO +linestring0|4326|LineString|3|KO-BKO-GKO:-BGKO +linestring0|4326|Polygon|3|KO-BKO-GKO:-BGKO +linestring0|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +linestring0|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +linestring0|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +linestring0|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +linestring0|4326|CircularString|3|KO-BKO-GKO:-BGKO +linestring0|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +linestring0|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +linestring0|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +linestring0|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +linestring0|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +linestring0|4326|Triangle|3|KO-BKO-GKO:-BGKO +linestring0||COUNT|4| +linestring0||GCOUNT|4| +linestring4326|0|Point|0|KO-BKO-GKO:-BGKO +linestring4326|0|LineString|0|KO-BKO-GOK-BGOK +linestring4326|0|Polygon|0|KO-BKO-GKO:-BGKO +linestring4326|0|MultiPoint|0|KO-BKO-GKO:-BGKO +linestring4326|0|MultiLineString|0|KO-BKO-GKO:-BGKO +linestring4326|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +linestring4326|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +linestring4326|0|CircularString|0|KO-BKO-GKO:-BGKO +linestring4326|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +linestring4326|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +linestring4326|0|MultiCurve|0|KO-BKO-GKO:-BGKO +linestring4326|0|MultiSurface|0|KO-BKO-GKO:-BGKO +linestring4326|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +linestring4326|0|Triangle|0|KO-BKO-GKO:-BGKO +linestring4326|0|Tin|0|KO-BKO-GKO:-BGKO +linestring4326|0|Point|2|KO-BKO-GKO:-BGKO +linestring4326|0|LineString|2|KO-BKO-GKO:-BGKO +linestring4326|0|Polygon|2|KO-BKO-GKO:-BGKO +linestring4326|0|MultiPoint|2|KO-BKO-GKO:-BGKO +linestring4326|0|MultiLineString|2|KO-BKO-GKO:-BGKO +linestring4326|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +linestring4326|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +linestring4326|0|CircularString|2|KO-BKO-GKO:-BGKO +linestring4326|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +linestring4326|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +linestring4326|0|MultiCurve|2|KO-BKO-GKO:-BGKO +linestring4326|0|MultiSurface|2|KO-BKO-GKO:-BGKO +linestring4326|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +linestring4326|0|Triangle|2|KO-BKO-GKO:-BGKO +linestring4326|0|Point|1|KO-BKO-GKO:-BGKO +linestring4326|0|LineString|1|KO-BKO-GKO:-BGKO +linestring4326|0|Polygon|1|KO-BKO-GKO:-BGKO +linestring4326|0|MultiPoint|1|KO-BKO-GKO:-BGKO +linestring4326|0|MultiLineString|1|KO-BKO-GKO:-BGKO +linestring4326|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +linestring4326|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +linestring4326|0|CircularString|1|KO-BKO-GKO:-BGKO +linestring4326|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +linestring4326|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +linestring4326|0|MultiCurve|1|KO-BKO-GKO:-BGKO +linestring4326|0|MultiSurface|1|KO-BKO-GKO:-BGKO +linestring4326|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +linestring4326|0|Triangle|1|KO-BKO-GKO:-BGKO +linestring4326|0|Point|3|KO-BKO-GKO:-BGKO +linestring4326|0|LineString|3|KO-BKO-GKO:-BGKO +linestring4326|0|Polygon|3|KO-BKO-GKO:-BGKO +linestring4326|0|MultiPoint|3|KO-BKO-GKO:-BGKO +linestring4326|0|MultiLineString|3|KO-BKO-GKO:-BGKO +linestring4326|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +linestring4326|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +linestring4326|0|CircularString|3|KO-BKO-GKO:-BGKO +linestring4326|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +linestring4326|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +linestring4326|0|MultiCurve|3|KO-BKO-GKO:-BGKO +linestring4326|0|MultiSurface|3|KO-BKO-GKO:-BGKO +linestring4326|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +linestring4326|0|Triangle|3|KO-BKO-GKO:-BGKO +linestring4326|4326|Point|0|KO-BKO-GKO:-BGKO +linestring4326|4326|LineString|0|OK-BOK-GOK-BGOK +linestring4326|4326|Polygon|0|KO-BKO-GKO:-BGKO +linestring4326|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +linestring4326|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +linestring4326|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +linestring4326|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +linestring4326|4326|CircularString|0|KO-BKO-GKO:-BGKO +linestring4326|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +linestring4326|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +linestring4326|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +linestring4326|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +linestring4326|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +linestring4326|4326|Triangle|0|KO-BKO-GKO:-BGKO +linestring4326|4326|Tin|0|KO-BKO-GKO:-BGKO +linestring4326|4326|Point|2|KO-BKO-GKO:-BGKO +linestring4326|4326|LineString|2|KO-BKO-GKO:-BGKO +linestring4326|4326|Polygon|2|KO-BKO-GKO:-BGKO +linestring4326|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +linestring4326|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +linestring4326|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +linestring4326|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +linestring4326|4326|CircularString|2|KO-BKO-GKO:-BGKO +linestring4326|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +linestring4326|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +linestring4326|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +linestring4326|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +linestring4326|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +linestring4326|4326|Triangle|2|KO-BKO-GKO:-BGKO +linestring4326|4326|Point|1|KO-BKO-GKO:-BGKO +linestring4326|4326|LineString|1|KO-BKO-GKO:-BGKO +linestring4326|4326|Polygon|1|KO-BKO-GKO:-BGKO +linestring4326|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +linestring4326|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +linestring4326|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +linestring4326|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +linestring4326|4326|CircularString|1|KO-BKO-GKO:-BGKO +linestring4326|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +linestring4326|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +linestring4326|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +linestring4326|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +linestring4326|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +linestring4326|4326|Triangle|1|KO-BKO-GKO:-BGKO +linestring4326|4326|Point|3|KO-BKO-GKO:-BGKO +linestring4326|4326|LineString|3|KO-BKO-GKO:-BGKO +linestring4326|4326|Polygon|3|KO-BKO-GKO:-BGKO +linestring4326|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +linestring4326|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +linestring4326|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +linestring4326|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +linestring4326|4326|CircularString|3|KO-BKO-GKO:-BGKO +linestring4326|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +linestring4326|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +linestring4326|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +linestring4326|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +linestring4326|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +linestring4326|4326|Triangle|3|KO-BKO-GKO:-BGKO +linestring4326||COUNT|2| +linestring4326||GCOUNT|4| +linestringm|0|Point|0|KO-BKO-GKO:-BGKO +linestringm|0|LineString|0|KO-BKO-GKO:-BGKO +linestringm|0|Polygon|0|KO-BKO-GKO:-BGKO +linestringm|0|MultiPoint|0|KO-BKO-GKO:-BGKO +linestringm|0|MultiLineString|0|KO-BKO-GKO:-BGKO +linestringm|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +linestringm|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +linestringm|0|CircularString|0|KO-BKO-GKO:-BGKO +linestringm|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +linestringm|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +linestringm|0|MultiCurve|0|KO-BKO-GKO:-BGKO +linestringm|0|MultiSurface|0|KO-BKO-GKO:-BGKO +linestringm|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +linestringm|0|Triangle|0|KO-BKO-GKO:-BGKO +linestringm|0|Tin|0|KO-BKO-GKO:-BGKO +linestringm|0|Point|2|KO-BKO-GKO:-BGKO +linestringm|0|LineString|2|KO-BKO-GKO:-BGKO +linestringm|0|Polygon|2|KO-BKO-GKO:-BGKO +linestringm|0|MultiPoint|2|KO-BKO-GKO:-BGKO +linestringm|0|MultiLineString|2|KO-BKO-GKO:-BGKO +linestringm|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +linestringm|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +linestringm|0|CircularString|2|KO-BKO-GKO:-BGKO +linestringm|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +linestringm|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +linestringm|0|MultiCurve|2|KO-BKO-GKO:-BGKO +linestringm|0|MultiSurface|2|KO-BKO-GKO:-BGKO +linestringm|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +linestringm|0|Triangle|2|KO-BKO-GKO:-BGKO +linestringm|0|Point|1|KO-BKO-GKO:-BGKO +linestringm|0|LineString|1|OK-BOK-GOK-BGOK +linestringm|0|Polygon|1|KO-BKO-GKO:-BGKO +linestringm|0|MultiPoint|1|KO-BKO-GKO:-BGKO +linestringm|0|MultiLineString|1|KO-BKO-GKO:-BGKO +linestringm|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +linestringm|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +linestringm|0|CircularString|1|KO-BKO-GKO:-BGKO +linestringm|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +linestringm|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +linestringm|0|MultiCurve|1|KO-BKO-GKO:-BGKO +linestringm|0|MultiSurface|1|KO-BKO-GKO:-BGKO +linestringm|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +linestringm|0|Triangle|1|KO-BKO-GKO:-BGKO +linestringm|0|Point|3|KO-BKO-GKO:-BGKO +linestringm|0|LineString|3|KO-BKO-GKO:-BGKO +linestringm|0|Polygon|3|KO-BKO-GKO:-BGKO +linestringm|0|MultiPoint|3|KO-BKO-GKO:-BGKO +linestringm|0|MultiLineString|3|KO-BKO-GKO:-BGKO +linestringm|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +linestringm|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +linestringm|0|CircularString|3|KO-BKO-GKO:-BGKO +linestringm|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +linestringm|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +linestringm|0|MultiCurve|3|KO-BKO-GKO:-BGKO +linestringm|0|MultiSurface|3|KO-BKO-GKO:-BGKO +linestringm|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +linestringm|0|Triangle|3|KO-BKO-GKO:-BGKO +linestringm|4326|Point|0|KO-BKO-GKO:-BGKO +linestringm|4326|LineString|0|KO-BKO-GKO:-BGKO +linestringm|4326|Polygon|0|KO-BKO-GKO:-BGKO +linestringm|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +linestringm|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +linestringm|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +linestringm|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +linestringm|4326|CircularString|0|KO-BKO-GKO:-BGKO +linestringm|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +linestringm|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +linestringm|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +linestringm|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +linestringm|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +linestringm|4326|Triangle|0|KO-BKO-GKO:-BGKO +linestringm|4326|Tin|0|KO-BKO-GKO:-BGKO +linestringm|4326|Point|2|KO-BKO-GKO:-BGKO +linestringm|4326|LineString|2|KO-BKO-GKO:-BGKO +linestringm|4326|Polygon|2|KO-BKO-GKO:-BGKO +linestringm|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +linestringm|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +linestringm|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +linestringm|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +linestringm|4326|CircularString|2|KO-BKO-GKO:-BGKO +linestringm|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +linestringm|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +linestringm|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +linestringm|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +linestringm|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +linestringm|4326|Triangle|2|KO-BKO-GKO:-BGKO +linestringm|4326|Point|1|KO-BKO-GKO:-BGKO +linestringm|4326|LineString|1|OK-BOK-GOK-BGOK +linestringm|4326|Polygon|1|KO-BKO-GKO:-BGKO +linestringm|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +linestringm|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +linestringm|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +linestringm|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +linestringm|4326|CircularString|1|KO-BKO-GKO:-BGKO +linestringm|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +linestringm|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +linestringm|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +linestringm|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +linestringm|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +linestringm|4326|Triangle|1|KO-BKO-GKO:-BGKO +linestringm|4326|Point|3|KO-BKO-GKO:-BGKO +linestringm|4326|LineString|3|KO-BKO-GKO:-BGKO +linestringm|4326|Polygon|3|KO-BKO-GKO:-BGKO +linestringm|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +linestringm|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +linestringm|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +linestringm|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +linestringm|4326|CircularString|3|KO-BKO-GKO:-BGKO +linestringm|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +linestringm|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +linestringm|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +linestringm|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +linestringm|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +linestringm|4326|Triangle|3|KO-BKO-GKO:-BGKO +linestringm||COUNT|4| +linestringm||GCOUNT|4| +linestringm0|0|Point|0|KO-BKO-GKO:-BGKO +linestringm0|0|LineString|0|KO-BKO-GKO:-BGKO +linestringm0|0|Polygon|0|KO-BKO-GKO:-BGKO +linestringm0|0|MultiPoint|0|KO-BKO-GKO:-BGKO +linestringm0|0|MultiLineString|0|KO-BKO-GKO:-BGKO +linestringm0|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +linestringm0|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +linestringm0|0|CircularString|0|KO-BKO-GKO:-BGKO +linestringm0|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +linestringm0|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +linestringm0|0|MultiCurve|0|KO-BKO-GKO:-BGKO +linestringm0|0|MultiSurface|0|KO-BKO-GKO:-BGKO +linestringm0|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +linestringm0|0|Triangle|0|KO-BKO-GKO:-BGKO +linestringm0|0|Tin|0|KO-BKO-GKO:-BGKO +linestringm0|0|Point|2|KO-BKO-GKO:-BGKO +linestringm0|0|LineString|2|KO-BKO-GKO:-BGKO +linestringm0|0|Polygon|2|KO-BKO-GKO:-BGKO +linestringm0|0|MultiPoint|2|KO-BKO-GKO:-BGKO +linestringm0|0|MultiLineString|2|KO-BKO-GKO:-BGKO +linestringm0|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +linestringm0|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +linestringm0|0|CircularString|2|KO-BKO-GKO:-BGKO +linestringm0|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +linestringm0|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +linestringm0|0|MultiCurve|2|KO-BKO-GKO:-BGKO +linestringm0|0|MultiSurface|2|KO-BKO-GKO:-BGKO +linestringm0|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +linestringm0|0|Triangle|2|KO-BKO-GKO:-BGKO +linestringm0|0|Point|1|KO-BKO-GKO:-BGKO +linestringm0|0|LineString|1|OK-BOK-GOK-BGOK +linestringm0|0|Polygon|1|KO-BKO-GKO:-BGKO +linestringm0|0|MultiPoint|1|KO-BKO-GKO:-BGKO +linestringm0|0|MultiLineString|1|KO-BKO-GKO:-BGKO +linestringm0|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +linestringm0|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +linestringm0|0|CircularString|1|KO-BKO-GKO:-BGKO +linestringm0|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +linestringm0|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +linestringm0|0|MultiCurve|1|KO-BKO-GKO:-BGKO +linestringm0|0|MultiSurface|1|KO-BKO-GKO:-BGKO +linestringm0|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +linestringm0|0|Triangle|1|KO-BKO-GKO:-BGKO +linestringm0|0|Point|3|KO-BKO-GKO:-BGKO +linestringm0|0|LineString|3|KO-BKO-GKO:-BGKO +linestringm0|0|Polygon|3|KO-BKO-GKO:-BGKO +linestringm0|0|MultiPoint|3|KO-BKO-GKO:-BGKO +linestringm0|0|MultiLineString|3|KO-BKO-GKO:-BGKO +linestringm0|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +linestringm0|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +linestringm0|0|CircularString|3|KO-BKO-GKO:-BGKO +linestringm0|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +linestringm0|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +linestringm0|0|MultiCurve|3|KO-BKO-GKO:-BGKO +linestringm0|0|MultiSurface|3|KO-BKO-GKO:-BGKO +linestringm0|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +linestringm0|0|Triangle|3|KO-BKO-GKO:-BGKO +linestringm0|4326|Point|0|KO-BKO-GKO:-BGKO +linestringm0|4326|LineString|0|KO-BKO-GKO:-BGKO +linestringm0|4326|Polygon|0|KO-BKO-GKO:-BGKO +linestringm0|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +linestringm0|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +linestringm0|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +linestringm0|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +linestringm0|4326|CircularString|0|KO-BKO-GKO:-BGKO +linestringm0|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +linestringm0|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +linestringm0|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +linestringm0|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +linestringm0|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +linestringm0|4326|Triangle|0|KO-BKO-GKO:-BGKO +linestringm0|4326|Tin|0|KO-BKO-GKO:-BGKO +linestringm0|4326|Point|2|KO-BKO-GKO:-BGKO +linestringm0|4326|LineString|2|KO-BKO-GKO:-BGKO +linestringm0|4326|Polygon|2|KO-BKO-GKO:-BGKO +linestringm0|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +linestringm0|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +linestringm0|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +linestringm0|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +linestringm0|4326|CircularString|2|KO-BKO-GKO:-BGKO +linestringm0|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +linestringm0|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +linestringm0|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +linestringm0|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +linestringm0|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +linestringm0|4326|Triangle|2|KO-BKO-GKO:-BGKO +linestringm0|4326|Point|1|KO-BKO-GKO:-BGKO +linestringm0|4326|LineString|1|OK-BOK-GOK-BGOK +linestringm0|4326|Polygon|1|KO-BKO-GKO:-BGKO +linestringm0|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +linestringm0|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +linestringm0|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +linestringm0|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +linestringm0|4326|CircularString|1|KO-BKO-GKO:-BGKO +linestringm0|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +linestringm0|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +linestringm0|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +linestringm0|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +linestringm0|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +linestringm0|4326|Triangle|1|KO-BKO-GKO:-BGKO +linestringm0|4326|Point|3|KO-BKO-GKO:-BGKO +linestringm0|4326|LineString|3|KO-BKO-GKO:-BGKO +linestringm0|4326|Polygon|3|KO-BKO-GKO:-BGKO +linestringm0|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +linestringm0|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +linestringm0|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +linestringm0|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +linestringm0|4326|CircularString|3|KO-BKO-GKO:-BGKO +linestringm0|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +linestringm0|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +linestringm0|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +linestringm0|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +linestringm0|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +linestringm0|4326|Triangle|3|KO-BKO-GKO:-BGKO +linestringm0||COUNT|4| +linestringm0||GCOUNT|4| +linestringm4326|0|Point|0|KO-BKO-GKO:-BGKO +linestringm4326|0|LineString|0|KO-BKO-GKO:-BGKO +linestringm4326|0|Polygon|0|KO-BKO-GKO:-BGKO +linestringm4326|0|MultiPoint|0|KO-BKO-GKO:-BGKO +linestringm4326|0|MultiLineString|0|KO-BKO-GKO:-BGKO +linestringm4326|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +linestringm4326|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +linestringm4326|0|CircularString|0|KO-BKO-GKO:-BGKO +linestringm4326|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +linestringm4326|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +linestringm4326|0|MultiCurve|0|KO-BKO-GKO:-BGKO +linestringm4326|0|MultiSurface|0|KO-BKO-GKO:-BGKO +linestringm4326|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +linestringm4326|0|Triangle|0|KO-BKO-GKO:-BGKO +linestringm4326|0|Tin|0|KO-BKO-GKO:-BGKO +linestringm4326|0|Point|2|KO-BKO-GKO:-BGKO +linestringm4326|0|LineString|2|KO-BKO-GKO:-BGKO +linestringm4326|0|Polygon|2|KO-BKO-GKO:-BGKO +linestringm4326|0|MultiPoint|2|KO-BKO-GKO:-BGKO +linestringm4326|0|MultiLineString|2|KO-BKO-GKO:-BGKO +linestringm4326|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +linestringm4326|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +linestringm4326|0|CircularString|2|KO-BKO-GKO:-BGKO +linestringm4326|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +linestringm4326|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +linestringm4326|0|MultiCurve|2|KO-BKO-GKO:-BGKO +linestringm4326|0|MultiSurface|2|KO-BKO-GKO:-BGKO +linestringm4326|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +linestringm4326|0|Triangle|2|KO-BKO-GKO:-BGKO +linestringm4326|0|Point|1|KO-BKO-GKO:-BGKO +linestringm4326|0|LineString|1|KO-BKO-GOK-BGOK +linestringm4326|0|Polygon|1|KO-BKO-GKO:-BGKO +linestringm4326|0|MultiPoint|1|KO-BKO-GKO:-BGKO +linestringm4326|0|MultiLineString|1|KO-BKO-GKO:-BGKO +linestringm4326|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +linestringm4326|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +linestringm4326|0|CircularString|1|KO-BKO-GKO:-BGKO +linestringm4326|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +linestringm4326|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +linestringm4326|0|MultiCurve|1|KO-BKO-GKO:-BGKO +linestringm4326|0|MultiSurface|1|KO-BKO-GKO:-BGKO +linestringm4326|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +linestringm4326|0|Triangle|1|KO-BKO-GKO:-BGKO +linestringm4326|0|Point|3|KO-BKO-GKO:-BGKO +linestringm4326|0|LineString|3|KO-BKO-GKO:-BGKO +linestringm4326|0|Polygon|3|KO-BKO-GKO:-BGKO +linestringm4326|0|MultiPoint|3|KO-BKO-GKO:-BGKO +linestringm4326|0|MultiLineString|3|KO-BKO-GKO:-BGKO +linestringm4326|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +linestringm4326|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +linestringm4326|0|CircularString|3|KO-BKO-GKO:-BGKO +linestringm4326|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +linestringm4326|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +linestringm4326|0|MultiCurve|3|KO-BKO-GKO:-BGKO +linestringm4326|0|MultiSurface|3|KO-BKO-GKO:-BGKO +linestringm4326|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +linestringm4326|0|Triangle|3|KO-BKO-GKO:-BGKO +linestringm4326|4326|Point|0|KO-BKO-GKO:-BGKO +linestringm4326|4326|LineString|0|KO-BKO-GKO:-BGKO +linestringm4326|4326|Polygon|0|KO-BKO-GKO:-BGKO +linestringm4326|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +linestringm4326|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +linestringm4326|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +linestringm4326|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +linestringm4326|4326|CircularString|0|KO-BKO-GKO:-BGKO +linestringm4326|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +linestringm4326|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +linestringm4326|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +linestringm4326|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +linestringm4326|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +linestringm4326|4326|Triangle|0|KO-BKO-GKO:-BGKO +linestringm4326|4326|Tin|0|KO-BKO-GKO:-BGKO +linestringm4326|4326|Point|2|KO-BKO-GKO:-BGKO +linestringm4326|4326|LineString|2|KO-BKO-GKO:-BGKO +linestringm4326|4326|Polygon|2|KO-BKO-GKO:-BGKO +linestringm4326|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +linestringm4326|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +linestringm4326|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +linestringm4326|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +linestringm4326|4326|CircularString|2|KO-BKO-GKO:-BGKO +linestringm4326|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +linestringm4326|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +linestringm4326|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +linestringm4326|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +linestringm4326|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +linestringm4326|4326|Triangle|2|KO-BKO-GKO:-BGKO +linestringm4326|4326|Point|1|KO-BKO-GKO:-BGKO +linestringm4326|4326|LineString|1|OK-BOK-GOK-BGOK +linestringm4326|4326|Polygon|1|KO-BKO-GKO:-BGKO +linestringm4326|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +linestringm4326|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +linestringm4326|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +linestringm4326|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +linestringm4326|4326|CircularString|1|KO-BKO-GKO:-BGKO +linestringm4326|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +linestringm4326|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +linestringm4326|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +linestringm4326|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +linestringm4326|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +linestringm4326|4326|Triangle|1|KO-BKO-GKO:-BGKO +linestringm4326|4326|Point|3|KO-BKO-GKO:-BGKO +linestringm4326|4326|LineString|3|KO-BKO-GKO:-BGKO +linestringm4326|4326|Polygon|3|KO-BKO-GKO:-BGKO +linestringm4326|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +linestringm4326|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +linestringm4326|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +linestringm4326|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +linestringm4326|4326|CircularString|3|KO-BKO-GKO:-BGKO +linestringm4326|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +linestringm4326|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +linestringm4326|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +linestringm4326|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +linestringm4326|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +linestringm4326|4326|Triangle|3|KO-BKO-GKO:-BGKO +linestringm4326||COUNT|2| +linestringm4326||GCOUNT|4| +linestringz|0|Point|0|KO-BKO-GKO:-BGKO +linestringz|0|LineString|0|KO-BKO-GKO:-BGKO +linestringz|0|Polygon|0|KO-BKO-GKO:-BGKO +linestringz|0|MultiPoint|0|KO-BKO-GKO:-BGKO +linestringz|0|MultiLineString|0|KO-BKO-GKO:-BGKO +linestringz|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +linestringz|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +linestringz|0|CircularString|0|KO-BKO-GKO:-BGKO +linestringz|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +linestringz|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +linestringz|0|MultiCurve|0|KO-BKO-GKO:-BGKO +linestringz|0|MultiSurface|0|KO-BKO-GKO:-BGKO +linestringz|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +linestringz|0|Triangle|0|KO-BKO-GKO:-BGKO +linestringz|0|Tin|0|KO-BKO-GKO:-BGKO +linestringz|0|Point|2|KO-BKO-GKO:-BGKO +linestringz|0|LineString|2|OK-BOK-GOK-BGOK +linestringz|0|Polygon|2|KO-BKO-GKO:-BGKO +linestringz|0|MultiPoint|2|KO-BKO-GKO:-BGKO +linestringz|0|MultiLineString|2|KO-BKO-GKO:-BGKO +linestringz|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +linestringz|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +linestringz|0|CircularString|2|KO-BKO-GKO:-BGKO +linestringz|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +linestringz|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +linestringz|0|MultiCurve|2|KO-BKO-GKO:-BGKO +linestringz|0|MultiSurface|2|KO-BKO-GKO:-BGKO +linestringz|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +linestringz|0|Triangle|2|KO-BKO-GKO:-BGKO +linestringz|0|Point|1|KO-BKO-GKO:-BGKO +linestringz|0|LineString|1|KO-BKO-GKO:-BGKO +linestringz|0|Polygon|1|KO-BKO-GKO:-BGKO +linestringz|0|MultiPoint|1|KO-BKO-GKO:-BGKO +linestringz|0|MultiLineString|1|KO-BKO-GKO:-BGKO +linestringz|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +linestringz|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +linestringz|0|CircularString|1|KO-BKO-GKO:-BGKO +linestringz|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +linestringz|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +linestringz|0|MultiCurve|1|KO-BKO-GKO:-BGKO +linestringz|0|MultiSurface|1|KO-BKO-GKO:-BGKO +linestringz|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +linestringz|0|Triangle|1|KO-BKO-GKO:-BGKO +linestringz|0|Point|3|KO-BKO-GKO:-BGKO +linestringz|0|LineString|3|KO-BKO-GKO:-BGKO +linestringz|0|Polygon|3|KO-BKO-GKO:-BGKO +linestringz|0|MultiPoint|3|KO-BKO-GKO:-BGKO +linestringz|0|MultiLineString|3|KO-BKO-GKO:-BGKO +linestringz|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +linestringz|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +linestringz|0|CircularString|3|KO-BKO-GKO:-BGKO +linestringz|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +linestringz|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +linestringz|0|MultiCurve|3|KO-BKO-GKO:-BGKO +linestringz|0|MultiSurface|3|KO-BKO-GKO:-BGKO +linestringz|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +linestringz|0|Triangle|3|KO-BKO-GKO:-BGKO +linestringz|4326|Point|0|KO-BKO-GKO:-BGKO +linestringz|4326|LineString|0|KO-BKO-GKO:-BGKO +linestringz|4326|Polygon|0|KO-BKO-GKO:-BGKO +linestringz|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +linestringz|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +linestringz|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +linestringz|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +linestringz|4326|CircularString|0|KO-BKO-GKO:-BGKO +linestringz|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +linestringz|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +linestringz|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +linestringz|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +linestringz|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +linestringz|4326|Triangle|0|KO-BKO-GKO:-BGKO +linestringz|4326|Tin|0|KO-BKO-GKO:-BGKO +linestringz|4326|Point|2|KO-BKO-GKO:-BGKO +linestringz|4326|LineString|2|OK-BOK-GOK-BGOK +linestringz|4326|Polygon|2|KO-BKO-GKO:-BGKO +linestringz|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +linestringz|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +linestringz|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +linestringz|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +linestringz|4326|CircularString|2|KO-BKO-GKO:-BGKO +linestringz|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +linestringz|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +linestringz|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +linestringz|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +linestringz|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +linestringz|4326|Triangle|2|KO-BKO-GKO:-BGKO +linestringz|4326|Point|1|KO-BKO-GKO:-BGKO +linestringz|4326|LineString|1|KO-BKO-GKO:-BGKO +linestringz|4326|Polygon|1|KO-BKO-GKO:-BGKO +linestringz|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +linestringz|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +linestringz|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +linestringz|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +linestringz|4326|CircularString|1|KO-BKO-GKO:-BGKO +linestringz|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +linestringz|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +linestringz|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +linestringz|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +linestringz|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +linestringz|4326|Triangle|1|KO-BKO-GKO:-BGKO +linestringz|4326|Point|3|KO-BKO-GKO:-BGKO +linestringz|4326|LineString|3|KO-BKO-GKO:-BGKO +linestringz|4326|Polygon|3|KO-BKO-GKO:-BGKO +linestringz|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +linestringz|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +linestringz|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +linestringz|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +linestringz|4326|CircularString|3|KO-BKO-GKO:-BGKO +linestringz|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +linestringz|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +linestringz|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +linestringz|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +linestringz|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +linestringz|4326|Triangle|3|KO-BKO-GKO:-BGKO +linestringz||COUNT|4| +linestringz||GCOUNT|4| +linestringz0|0|Point|0|KO-BKO-GKO:-BGKO +linestringz0|0|LineString|0|KO-BKO-GKO:-BGKO +linestringz0|0|Polygon|0|KO-BKO-GKO:-BGKO +linestringz0|0|MultiPoint|0|KO-BKO-GKO:-BGKO +linestringz0|0|MultiLineString|0|KO-BKO-GKO:-BGKO +linestringz0|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +linestringz0|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +linestringz0|0|CircularString|0|KO-BKO-GKO:-BGKO +linestringz0|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +linestringz0|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +linestringz0|0|MultiCurve|0|KO-BKO-GKO:-BGKO +linestringz0|0|MultiSurface|0|KO-BKO-GKO:-BGKO +linestringz0|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +linestringz0|0|Triangle|0|KO-BKO-GKO:-BGKO +linestringz0|0|Tin|0|KO-BKO-GKO:-BGKO +linestringz0|0|Point|2|KO-BKO-GKO:-BGKO +linestringz0|0|LineString|2|OK-BOK-GOK-BGOK +linestringz0|0|Polygon|2|KO-BKO-GKO:-BGKO +linestringz0|0|MultiPoint|2|KO-BKO-GKO:-BGKO +linestringz0|0|MultiLineString|2|KO-BKO-GKO:-BGKO +linestringz0|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +linestringz0|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +linestringz0|0|CircularString|2|KO-BKO-GKO:-BGKO +linestringz0|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +linestringz0|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +linestringz0|0|MultiCurve|2|KO-BKO-GKO:-BGKO +linestringz0|0|MultiSurface|2|KO-BKO-GKO:-BGKO +linestringz0|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +linestringz0|0|Triangle|2|KO-BKO-GKO:-BGKO +linestringz0|0|Point|1|KO-BKO-GKO:-BGKO +linestringz0|0|LineString|1|KO-BKO-GKO:-BGKO +linestringz0|0|Polygon|1|KO-BKO-GKO:-BGKO +linestringz0|0|MultiPoint|1|KO-BKO-GKO:-BGKO +linestringz0|0|MultiLineString|1|KO-BKO-GKO:-BGKO +linestringz0|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +linestringz0|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +linestringz0|0|CircularString|1|KO-BKO-GKO:-BGKO +linestringz0|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +linestringz0|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +linestringz0|0|MultiCurve|1|KO-BKO-GKO:-BGKO +linestringz0|0|MultiSurface|1|KO-BKO-GKO:-BGKO +linestringz0|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +linestringz0|0|Triangle|1|KO-BKO-GKO:-BGKO +linestringz0|0|Point|3|KO-BKO-GKO:-BGKO +linestringz0|0|LineString|3|KO-BKO-GKO:-BGKO +linestringz0|0|Polygon|3|KO-BKO-GKO:-BGKO +linestringz0|0|MultiPoint|3|KO-BKO-GKO:-BGKO +linestringz0|0|MultiLineString|3|KO-BKO-GKO:-BGKO +linestringz0|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +linestringz0|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +linestringz0|0|CircularString|3|KO-BKO-GKO:-BGKO +linestringz0|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +linestringz0|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +linestringz0|0|MultiCurve|3|KO-BKO-GKO:-BGKO +linestringz0|0|MultiSurface|3|KO-BKO-GKO:-BGKO +linestringz0|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +linestringz0|0|Triangle|3|KO-BKO-GKO:-BGKO +linestringz0|4326|Point|0|KO-BKO-GKO:-BGKO +linestringz0|4326|LineString|0|KO-BKO-GKO:-BGKO +linestringz0|4326|Polygon|0|KO-BKO-GKO:-BGKO +linestringz0|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +linestringz0|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +linestringz0|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +linestringz0|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +linestringz0|4326|CircularString|0|KO-BKO-GKO:-BGKO +linestringz0|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +linestringz0|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +linestringz0|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +linestringz0|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +linestringz0|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +linestringz0|4326|Triangle|0|KO-BKO-GKO:-BGKO +linestringz0|4326|Tin|0|KO-BKO-GKO:-BGKO +linestringz0|4326|Point|2|KO-BKO-GKO:-BGKO +linestringz0|4326|LineString|2|OK-BOK-GOK-BGOK +linestringz0|4326|Polygon|2|KO-BKO-GKO:-BGKO +linestringz0|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +linestringz0|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +linestringz0|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +linestringz0|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +linestringz0|4326|CircularString|2|KO-BKO-GKO:-BGKO +linestringz0|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +linestringz0|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +linestringz0|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +linestringz0|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +linestringz0|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +linestringz0|4326|Triangle|2|KO-BKO-GKO:-BGKO +linestringz0|4326|Point|1|KO-BKO-GKO:-BGKO +linestringz0|4326|LineString|1|KO-BKO-GKO:-BGKO +linestringz0|4326|Polygon|1|KO-BKO-GKO:-BGKO +linestringz0|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +linestringz0|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +linestringz0|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +linestringz0|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +linestringz0|4326|CircularString|1|KO-BKO-GKO:-BGKO +linestringz0|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +linestringz0|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +linestringz0|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +linestringz0|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +linestringz0|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +linestringz0|4326|Triangle|1|KO-BKO-GKO:-BGKO +linestringz0|4326|Point|3|KO-BKO-GKO:-BGKO +linestringz0|4326|LineString|3|KO-BKO-GKO:-BGKO +linestringz0|4326|Polygon|3|KO-BKO-GKO:-BGKO +linestringz0|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +linestringz0|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +linestringz0|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +linestringz0|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +linestringz0|4326|CircularString|3|KO-BKO-GKO:-BGKO +linestringz0|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +linestringz0|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +linestringz0|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +linestringz0|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +linestringz0|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +linestringz0|4326|Triangle|3|KO-BKO-GKO:-BGKO +linestringz0||COUNT|4| +linestringz0||GCOUNT|4| +linestringz4326|0|Point|0|KO-BKO-GKO:-BGKO +linestringz4326|0|LineString|0|KO-BKO-GKO:-BGKO +linestringz4326|0|Polygon|0|KO-BKO-GKO:-BGKO +linestringz4326|0|MultiPoint|0|KO-BKO-GKO:-BGKO +linestringz4326|0|MultiLineString|0|KO-BKO-GKO:-BGKO +linestringz4326|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +linestringz4326|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +linestringz4326|0|CircularString|0|KO-BKO-GKO:-BGKO +linestringz4326|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +linestringz4326|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +linestringz4326|0|MultiCurve|0|KO-BKO-GKO:-BGKO +linestringz4326|0|MultiSurface|0|KO-BKO-GKO:-BGKO +linestringz4326|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +linestringz4326|0|Triangle|0|KO-BKO-GKO:-BGKO +linestringz4326|0|Tin|0|KO-BKO-GKO:-BGKO +linestringz4326|0|Point|2|KO-BKO-GKO:-BGKO +linestringz4326|0|LineString|2|KO-BKO-GOK-BGOK +linestringz4326|0|Polygon|2|KO-BKO-GKO:-BGKO +linestringz4326|0|MultiPoint|2|KO-BKO-GKO:-BGKO +linestringz4326|0|MultiLineString|2|KO-BKO-GKO:-BGKO +linestringz4326|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +linestringz4326|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +linestringz4326|0|CircularString|2|KO-BKO-GKO:-BGKO +linestringz4326|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +linestringz4326|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +linestringz4326|0|MultiCurve|2|KO-BKO-GKO:-BGKO +linestringz4326|0|MultiSurface|2|KO-BKO-GKO:-BGKO +linestringz4326|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +linestringz4326|0|Triangle|2|KO-BKO-GKO:-BGKO +linestringz4326|0|Point|1|KO-BKO-GKO:-BGKO +linestringz4326|0|LineString|1|KO-BKO-GKO:-BGKO +linestringz4326|0|Polygon|1|KO-BKO-GKO:-BGKO +linestringz4326|0|MultiPoint|1|KO-BKO-GKO:-BGKO +linestringz4326|0|MultiLineString|1|KO-BKO-GKO:-BGKO +linestringz4326|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +linestringz4326|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +linestringz4326|0|CircularString|1|KO-BKO-GKO:-BGKO +linestringz4326|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +linestringz4326|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +linestringz4326|0|MultiCurve|1|KO-BKO-GKO:-BGKO +linestringz4326|0|MultiSurface|1|KO-BKO-GKO:-BGKO +linestringz4326|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +linestringz4326|0|Triangle|1|KO-BKO-GKO:-BGKO +linestringz4326|0|Point|3|KO-BKO-GKO:-BGKO +linestringz4326|0|LineString|3|KO-BKO-GKO:-BGKO +linestringz4326|0|Polygon|3|KO-BKO-GKO:-BGKO +linestringz4326|0|MultiPoint|3|KO-BKO-GKO:-BGKO +linestringz4326|0|MultiLineString|3|KO-BKO-GKO:-BGKO +linestringz4326|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +linestringz4326|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +linestringz4326|0|CircularString|3|KO-BKO-GKO:-BGKO +linestringz4326|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +linestringz4326|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +linestringz4326|0|MultiCurve|3|KO-BKO-GKO:-BGKO +linestringz4326|0|MultiSurface|3|KO-BKO-GKO:-BGKO +linestringz4326|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +linestringz4326|0|Triangle|3|KO-BKO-GKO:-BGKO +linestringz4326|4326|Point|0|KO-BKO-GKO:-BGKO +linestringz4326|4326|LineString|0|KO-BKO-GKO:-BGKO +linestringz4326|4326|Polygon|0|KO-BKO-GKO:-BGKO +linestringz4326|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +linestringz4326|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +linestringz4326|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +linestringz4326|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +linestringz4326|4326|CircularString|0|KO-BKO-GKO:-BGKO +linestringz4326|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +linestringz4326|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +linestringz4326|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +linestringz4326|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +linestringz4326|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +linestringz4326|4326|Triangle|0|KO-BKO-GKO:-BGKO +linestringz4326|4326|Tin|0|KO-BKO-GKO:-BGKO +linestringz4326|4326|Point|2|KO-BKO-GKO:-BGKO +linestringz4326|4326|LineString|2|OK-BOK-GOK-BGOK +linestringz4326|4326|Polygon|2|KO-BKO-GKO:-BGKO +linestringz4326|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +linestringz4326|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +linestringz4326|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +linestringz4326|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +linestringz4326|4326|CircularString|2|KO-BKO-GKO:-BGKO +linestringz4326|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +linestringz4326|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +linestringz4326|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +linestringz4326|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +linestringz4326|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +linestringz4326|4326|Triangle|2|KO-BKO-GKO:-BGKO +linestringz4326|4326|Point|1|KO-BKO-GKO:-BGKO +linestringz4326|4326|LineString|1|KO-BKO-GKO:-BGKO +linestringz4326|4326|Polygon|1|KO-BKO-GKO:-BGKO +linestringz4326|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +linestringz4326|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +linestringz4326|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +linestringz4326|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +linestringz4326|4326|CircularString|1|KO-BKO-GKO:-BGKO +linestringz4326|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +linestringz4326|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +linestringz4326|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +linestringz4326|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +linestringz4326|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +linestringz4326|4326|Triangle|1|KO-BKO-GKO:-BGKO +linestringz4326|4326|Point|3|KO-BKO-GKO:-BGKO +linestringz4326|4326|LineString|3|KO-BKO-GKO:-BGKO +linestringz4326|4326|Polygon|3|KO-BKO-GKO:-BGKO +linestringz4326|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +linestringz4326|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +linestringz4326|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +linestringz4326|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +linestringz4326|4326|CircularString|3|KO-BKO-GKO:-BGKO +linestringz4326|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +linestringz4326|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +linestringz4326|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +linestringz4326|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +linestringz4326|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +linestringz4326|4326|Triangle|3|KO-BKO-GKO:-BGKO +linestringz4326||COUNT|2| +linestringz4326||GCOUNT|4| +linestringzm|0|Point|0|KO-BKO-GKO:-BGKO +linestringzm|0|LineString|0|KO-BKO-GKO:-BGKO +linestringzm|0|Polygon|0|KO-BKO-GKO:-BGKO +linestringzm|0|MultiPoint|0|KO-BKO-GKO:-BGKO +linestringzm|0|MultiLineString|0|KO-BKO-GKO:-BGKO +linestringzm|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +linestringzm|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +linestringzm|0|CircularString|0|KO-BKO-GKO:-BGKO +linestringzm|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +linestringzm|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +linestringzm|0|MultiCurve|0|KO-BKO-GKO:-BGKO +linestringzm|0|MultiSurface|0|KO-BKO-GKO:-BGKO +linestringzm|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +linestringzm|0|Triangle|0|KO-BKO-GKO:-BGKO +linestringzm|0|Tin|0|KO-BKO-GKO:-BGKO +linestringzm|0|Point|2|KO-BKO-GKO:-BGKO +linestringzm|0|LineString|2|KO-BKO-GKO:-BGKO +linestringzm|0|Polygon|2|KO-BKO-GKO:-BGKO +linestringzm|0|MultiPoint|2|KO-BKO-GKO:-BGKO +linestringzm|0|MultiLineString|2|KO-BKO-GKO:-BGKO +linestringzm|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +linestringzm|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +linestringzm|0|CircularString|2|KO-BKO-GKO:-BGKO +linestringzm|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +linestringzm|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +linestringzm|0|MultiCurve|2|KO-BKO-GKO:-BGKO +linestringzm|0|MultiSurface|2|KO-BKO-GKO:-BGKO +linestringzm|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +linestringzm|0|Triangle|2|KO-BKO-GKO:-BGKO +linestringzm|0|Point|1|KO-BKO-GKO:-BGKO +linestringzm|0|LineString|1|KO-BKO-GKO:-BGKO +linestringzm|0|Polygon|1|KO-BKO-GKO:-BGKO +linestringzm|0|MultiPoint|1|KO-BKO-GKO:-BGKO +linestringzm|0|MultiLineString|1|KO-BKO-GKO:-BGKO +linestringzm|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +linestringzm|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +linestringzm|0|CircularString|1|KO-BKO-GKO:-BGKO +linestringzm|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +linestringzm|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +linestringzm|0|MultiCurve|1|KO-BKO-GKO:-BGKO +linestringzm|0|MultiSurface|1|KO-BKO-GKO:-BGKO +linestringzm|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +linestringzm|0|Triangle|1|KO-BKO-GKO:-BGKO +linestringzm|0|Point|3|KO-BKO-GKO:-BGKO +linestringzm|0|LineString|3|OK-BOK-GOK-BGOK +linestringzm|0|Polygon|3|KO-BKO-GKO:-BGKO +linestringzm|0|MultiPoint|3|KO-BKO-GKO:-BGKO +linestringzm|0|MultiLineString|3|KO-BKO-GKO:-BGKO +linestringzm|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +linestringzm|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +linestringzm|0|CircularString|3|KO-BKO-GKO:-BGKO +linestringzm|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +linestringzm|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +linestringzm|0|MultiCurve|3|KO-BKO-GKO:-BGKO +linestringzm|0|MultiSurface|3|KO-BKO-GKO:-BGKO +linestringzm|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +linestringzm|0|Triangle|3|KO-BKO-GKO:-BGKO +linestringzm|4326|Point|0|KO-BKO-GKO:-BGKO +linestringzm|4326|LineString|0|KO-BKO-GKO:-BGKO +linestringzm|4326|Polygon|0|KO-BKO-GKO:-BGKO +linestringzm|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +linestringzm|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +linestringzm|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +linestringzm|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +linestringzm|4326|CircularString|0|KO-BKO-GKO:-BGKO +linestringzm|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +linestringzm|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +linestringzm|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +linestringzm|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +linestringzm|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +linestringzm|4326|Triangle|0|KO-BKO-GKO:-BGKO +linestringzm|4326|Tin|0|KO-BKO-GKO:-BGKO +linestringzm|4326|Point|2|KO-BKO-GKO:-BGKO +linestringzm|4326|LineString|2|KO-BKO-GKO:-BGKO +linestringzm|4326|Polygon|2|KO-BKO-GKO:-BGKO +linestringzm|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +linestringzm|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +linestringzm|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +linestringzm|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +linestringzm|4326|CircularString|2|KO-BKO-GKO:-BGKO +linestringzm|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +linestringzm|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +linestringzm|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +linestringzm|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +linestringzm|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +linestringzm|4326|Triangle|2|KO-BKO-GKO:-BGKO +linestringzm|4326|Point|1|KO-BKO-GKO:-BGKO +linestringzm|4326|LineString|1|KO-BKO-GKO:-BGKO +linestringzm|4326|Polygon|1|KO-BKO-GKO:-BGKO +linestringzm|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +linestringzm|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +linestringzm|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +linestringzm|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +linestringzm|4326|CircularString|1|KO-BKO-GKO:-BGKO +linestringzm|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +linestringzm|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +linestringzm|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +linestringzm|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +linestringzm|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +linestringzm|4326|Triangle|1|KO-BKO-GKO:-BGKO +linestringzm|4326|Point|3|KO-BKO-GKO:-BGKO +linestringzm|4326|LineString|3|OK-BOK-GOK-BGOK +linestringzm|4326|Polygon|3|KO-BKO-GKO:-BGKO +linestringzm|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +linestringzm|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +linestringzm|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +linestringzm|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +linestringzm|4326|CircularString|3|KO-BKO-GKO:-BGKO +linestringzm|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +linestringzm|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +linestringzm|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +linestringzm|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +linestringzm|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +linestringzm|4326|Triangle|3|KO-BKO-GKO:-BGKO +linestringzm||COUNT|4| +linestringzm||GCOUNT|4| +linestringzm0|0|Point|0|KO-BKO-GKO:-BGKO +linestringzm0|0|LineString|0|KO-BKO-GKO:-BGKO +linestringzm0|0|Polygon|0|KO-BKO-GKO:-BGKO +linestringzm0|0|MultiPoint|0|KO-BKO-GKO:-BGKO +linestringzm0|0|MultiLineString|0|KO-BKO-GKO:-BGKO +linestringzm0|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +linestringzm0|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +linestringzm0|0|CircularString|0|KO-BKO-GKO:-BGKO +linestringzm0|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +linestringzm0|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +linestringzm0|0|MultiCurve|0|KO-BKO-GKO:-BGKO +linestringzm0|0|MultiSurface|0|KO-BKO-GKO:-BGKO +linestringzm0|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +linestringzm0|0|Triangle|0|KO-BKO-GKO:-BGKO +linestringzm0|0|Tin|0|KO-BKO-GKO:-BGKO +linestringzm0|0|Point|2|KO-BKO-GKO:-BGKO +linestringzm0|0|LineString|2|KO-BKO-GKO:-BGKO +linestringzm0|0|Polygon|2|KO-BKO-GKO:-BGKO +linestringzm0|0|MultiPoint|2|KO-BKO-GKO:-BGKO +linestringzm0|0|MultiLineString|2|KO-BKO-GKO:-BGKO +linestringzm0|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +linestringzm0|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +linestringzm0|0|CircularString|2|KO-BKO-GKO:-BGKO +linestringzm0|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +linestringzm0|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +linestringzm0|0|MultiCurve|2|KO-BKO-GKO:-BGKO +linestringzm0|0|MultiSurface|2|KO-BKO-GKO:-BGKO +linestringzm0|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +linestringzm0|0|Triangle|2|KO-BKO-GKO:-BGKO +linestringzm0|0|Point|1|KO-BKO-GKO:-BGKO +linestringzm0|0|LineString|1|KO-BKO-GKO:-BGKO +linestringzm0|0|Polygon|1|KO-BKO-GKO:-BGKO +linestringzm0|0|MultiPoint|1|KO-BKO-GKO:-BGKO +linestringzm0|0|MultiLineString|1|KO-BKO-GKO:-BGKO +linestringzm0|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +linestringzm0|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +linestringzm0|0|CircularString|1|KO-BKO-GKO:-BGKO +linestringzm0|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +linestringzm0|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +linestringzm0|0|MultiCurve|1|KO-BKO-GKO:-BGKO +linestringzm0|0|MultiSurface|1|KO-BKO-GKO:-BGKO +linestringzm0|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +linestringzm0|0|Triangle|1|KO-BKO-GKO:-BGKO +linestringzm0|0|Point|3|KO-BKO-GKO:-BGKO +linestringzm0|0|LineString|3|OK-BOK-GOK-BGOK +linestringzm0|0|Polygon|3|KO-BKO-GKO:-BGKO +linestringzm0|0|MultiPoint|3|KO-BKO-GKO:-BGKO +linestringzm0|0|MultiLineString|3|KO-BKO-GKO:-BGKO +linestringzm0|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +linestringzm0|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +linestringzm0|0|CircularString|3|KO-BKO-GKO:-BGKO +linestringzm0|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +linestringzm0|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +linestringzm0|0|MultiCurve|3|KO-BKO-GKO:-BGKO +linestringzm0|0|MultiSurface|3|KO-BKO-GKO:-BGKO +linestringzm0|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +linestringzm0|0|Triangle|3|KO-BKO-GKO:-BGKO +linestringzm0|4326|Point|0|KO-BKO-GKO:-BGKO +linestringzm0|4326|LineString|0|KO-BKO-GKO:-BGKO +linestringzm0|4326|Polygon|0|KO-BKO-GKO:-BGKO +linestringzm0|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +linestringzm0|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +linestringzm0|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +linestringzm0|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +linestringzm0|4326|CircularString|0|KO-BKO-GKO:-BGKO +linestringzm0|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +linestringzm0|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +linestringzm0|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +linestringzm0|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +linestringzm0|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +linestringzm0|4326|Triangle|0|KO-BKO-GKO:-BGKO +linestringzm0|4326|Tin|0|KO-BKO-GKO:-BGKO +linestringzm0|4326|Point|2|KO-BKO-GKO:-BGKO +linestringzm0|4326|LineString|2|KO-BKO-GKO:-BGKO +linestringzm0|4326|Polygon|2|KO-BKO-GKO:-BGKO +linestringzm0|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +linestringzm0|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +linestringzm0|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +linestringzm0|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +linestringzm0|4326|CircularString|2|KO-BKO-GKO:-BGKO +linestringzm0|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +linestringzm0|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +linestringzm0|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +linestringzm0|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +linestringzm0|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +linestringzm0|4326|Triangle|2|KO-BKO-GKO:-BGKO +linestringzm0|4326|Point|1|KO-BKO-GKO:-BGKO +linestringzm0|4326|LineString|1|KO-BKO-GKO:-BGKO +linestringzm0|4326|Polygon|1|KO-BKO-GKO:-BGKO +linestringzm0|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +linestringzm0|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +linestringzm0|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +linestringzm0|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +linestringzm0|4326|CircularString|1|KO-BKO-GKO:-BGKO +linestringzm0|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +linestringzm0|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +linestringzm0|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +linestringzm0|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +linestringzm0|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +linestringzm0|4326|Triangle|1|KO-BKO-GKO:-BGKO +linestringzm0|4326|Point|3|KO-BKO-GKO:-BGKO +linestringzm0|4326|LineString|3|OK-BOK-GOK-BGOK +linestringzm0|4326|Polygon|3|KO-BKO-GKO:-BGKO +linestringzm0|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +linestringzm0|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +linestringzm0|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +linestringzm0|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +linestringzm0|4326|CircularString|3|KO-BKO-GKO:-BGKO +linestringzm0|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +linestringzm0|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +linestringzm0|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +linestringzm0|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +linestringzm0|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +linestringzm0|4326|Triangle|3|KO-BKO-GKO:-BGKO +linestringzm0||COUNT|4| +linestringzm0||GCOUNT|4| +linestringzm4326|0|Point|0|KO-BKO-GKO:-BGKO +linestringzm4326|0|LineString|0|KO-BKO-GKO:-BGKO +linestringzm4326|0|Polygon|0|KO-BKO-GKO:-BGKO +linestringzm4326|0|MultiPoint|0|KO-BKO-GKO:-BGKO +linestringzm4326|0|MultiLineString|0|KO-BKO-GKO:-BGKO +linestringzm4326|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +linestringzm4326|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +linestringzm4326|0|CircularString|0|KO-BKO-GKO:-BGKO +linestringzm4326|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +linestringzm4326|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +linestringzm4326|0|MultiCurve|0|KO-BKO-GKO:-BGKO +linestringzm4326|0|MultiSurface|0|KO-BKO-GKO:-BGKO +linestringzm4326|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +linestringzm4326|0|Triangle|0|KO-BKO-GKO:-BGKO +linestringzm4326|0|Tin|0|KO-BKO-GKO:-BGKO +linestringzm4326|0|Point|2|KO-BKO-GKO:-BGKO +linestringzm4326|0|LineString|2|KO-BKO-GKO:-BGKO +linestringzm4326|0|Polygon|2|KO-BKO-GKO:-BGKO +linestringzm4326|0|MultiPoint|2|KO-BKO-GKO:-BGKO +linestringzm4326|0|MultiLineString|2|KO-BKO-GKO:-BGKO +linestringzm4326|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +linestringzm4326|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +linestringzm4326|0|CircularString|2|KO-BKO-GKO:-BGKO +linestringzm4326|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +linestringzm4326|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +linestringzm4326|0|MultiCurve|2|KO-BKO-GKO:-BGKO +linestringzm4326|0|MultiSurface|2|KO-BKO-GKO:-BGKO +linestringzm4326|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +linestringzm4326|0|Triangle|2|KO-BKO-GKO:-BGKO +linestringzm4326|0|Point|1|KO-BKO-GKO:-BGKO +linestringzm4326|0|LineString|1|KO-BKO-GKO:-BGKO +linestringzm4326|0|Polygon|1|KO-BKO-GKO:-BGKO +linestringzm4326|0|MultiPoint|1|KO-BKO-GKO:-BGKO +linestringzm4326|0|MultiLineString|1|KO-BKO-GKO:-BGKO +linestringzm4326|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +linestringzm4326|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +linestringzm4326|0|CircularString|1|KO-BKO-GKO:-BGKO +linestringzm4326|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +linestringzm4326|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +linestringzm4326|0|MultiCurve|1|KO-BKO-GKO:-BGKO +linestringzm4326|0|MultiSurface|1|KO-BKO-GKO:-BGKO +linestringzm4326|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +linestringzm4326|0|Triangle|1|KO-BKO-GKO:-BGKO +linestringzm4326|0|Point|3|KO-BKO-GKO:-BGKO +linestringzm4326|0|LineString|3|KO-BKO-GOK-BGOK +linestringzm4326|0|Polygon|3|KO-BKO-GKO:-BGKO +linestringzm4326|0|MultiPoint|3|KO-BKO-GKO:-BGKO +linestringzm4326|0|MultiLineString|3|KO-BKO-GKO:-BGKO +linestringzm4326|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +linestringzm4326|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +linestringzm4326|0|CircularString|3|KO-BKO-GKO:-BGKO +linestringzm4326|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +linestringzm4326|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +linestringzm4326|0|MultiCurve|3|KO-BKO-GKO:-BGKO +linestringzm4326|0|MultiSurface|3|KO-BKO-GKO:-BGKO +linestringzm4326|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +linestringzm4326|0|Triangle|3|KO-BKO-GKO:-BGKO +linestringzm4326|4326|Point|0|KO-BKO-GKO:-BGKO +linestringzm4326|4326|LineString|0|KO-BKO-GKO:-BGKO +linestringzm4326|4326|Polygon|0|KO-BKO-GKO:-BGKO +linestringzm4326|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +linestringzm4326|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +linestringzm4326|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +linestringzm4326|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +linestringzm4326|4326|CircularString|0|KO-BKO-GKO:-BGKO +linestringzm4326|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +linestringzm4326|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +linestringzm4326|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +linestringzm4326|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +linestringzm4326|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +linestringzm4326|4326|Triangle|0|KO-BKO-GKO:-BGKO +linestringzm4326|4326|Tin|0|KO-BKO-GKO:-BGKO +linestringzm4326|4326|Point|2|KO-BKO-GKO:-BGKO +linestringzm4326|4326|LineString|2|KO-BKO-GKO:-BGKO +linestringzm4326|4326|Polygon|2|KO-BKO-GKO:-BGKO +linestringzm4326|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +linestringzm4326|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +linestringzm4326|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +linestringzm4326|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +linestringzm4326|4326|CircularString|2|KO-BKO-GKO:-BGKO +linestringzm4326|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +linestringzm4326|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +linestringzm4326|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +linestringzm4326|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +linestringzm4326|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +linestringzm4326|4326|Triangle|2|KO-BKO-GKO:-BGKO +linestringzm4326|4326|Point|1|KO-BKO-GKO:-BGKO +linestringzm4326|4326|LineString|1|KO-BKO-GKO:-BGKO +linestringzm4326|4326|Polygon|1|KO-BKO-GKO:-BGKO +linestringzm4326|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +linestringzm4326|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +linestringzm4326|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +linestringzm4326|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +linestringzm4326|4326|CircularString|1|KO-BKO-GKO:-BGKO +linestringzm4326|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +linestringzm4326|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +linestringzm4326|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +linestringzm4326|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +linestringzm4326|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +linestringzm4326|4326|Triangle|1|KO-BKO-GKO:-BGKO +linestringzm4326|4326|Point|3|KO-BKO-GKO:-BGKO +linestringzm4326|4326|LineString|3|OK-BOK-GOK-BGOK +linestringzm4326|4326|Polygon|3|KO-BKO-GKO:-BGKO +linestringzm4326|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +linestringzm4326|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +linestringzm4326|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +linestringzm4326|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +linestringzm4326|4326|CircularString|3|KO-BKO-GKO:-BGKO +linestringzm4326|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +linestringzm4326|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +linestringzm4326|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +linestringzm4326|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +linestringzm4326|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +linestringzm4326|4326|Triangle|3|KO-BKO-GKO:-BGKO +linestringzm4326||COUNT|2| +linestringzm4326||GCOUNT|4| +multicurve|0|Point|0|KO-BKO +multicurve|0|LineString|0|KO-BKO +multicurve|0|Polygon|0|KO-BKO +multicurve|0|MultiPoint|0|KO-BKO +multicurve|0|MultiLineString|0|KO-BKO +multicurve|0|MultiPolygon|0|KO-BKO +multicurve|0|GeometryCollection|0|KO-BKO +multicurve|0|CircularString|0|KO-BKO +multicurve|0|CompoundCurve|0|KO-BKO +multicurve|0|CurvePolygon|0|KO-BKO +multicurve|0|MultiCurve|0|OK-BOK +multicurve|0|MultiSurface|0|KO-BKO +multicurve|0|PolyhedralSurface|0|KO-BKO +multicurve|0|Triangle|0|KO-BKO +multicurve|0|Tin|0|KO-BKO +multicurve|0|Point|2|KO-BKO +multicurve|0|LineString|2|KO-BKO +multicurve|0|Polygon|2|KO-BKO +multicurve|0|MultiPoint|2|KO-BKO +multicurve|0|MultiLineString|2|KO-BKO +multicurve|0|MultiPolygon|2|KO-BKO +multicurve|0|GeometryCollection|2|KO-BKO +multicurve|0|CircularString|2|KO-BKO +multicurve|0|CompoundCurve|2|KO-BKO +multicurve|0|CurvePolygon|2|KO-BKO +multicurve|0|MultiCurve|2|KO-BKO +multicurve|0|MultiSurface|2|KO-BKO +multicurve|0|PolyhedralSurface|2|KO-BKO +multicurve|0|Triangle|2|KO-BKO +multicurve|0|Point|1|KO-BKO +multicurve|0|LineString|1|KO-BKO +multicurve|0|Polygon|1|KO-BKO +multicurve|0|MultiPoint|1|KO-BKO +multicurve|0|MultiLineString|1|KO-BKO +multicurve|0|MultiPolygon|1|KO-BKO +multicurve|0|GeometryCollection|1|KO-BKO +multicurve|0|CircularString|1|KO-BKO +multicurve|0|CompoundCurve|1|KO-BKO +multicurve|0|CurvePolygon|1|KO-BKO +multicurve|0|MultiCurve|1|KO-BKO +multicurve|0|MultiSurface|1|KO-BKO +multicurve|0|PolyhedralSurface|1|KO-BKO +multicurve|0|Triangle|1|KO-BKO +multicurve|0|Point|3|KO-BKO +multicurve|0|LineString|3|KO-BKO +multicurve|0|Polygon|3|KO-BKO +multicurve|0|MultiPoint|3|KO-BKO +multicurve|0|MultiLineString|3|KO-BKO +multicurve|0|MultiPolygon|3|KO-BKO +multicurve|0|GeometryCollection|3|KO-BKO +multicurve|0|CircularString|3|KO-BKO +multicurve|0|CompoundCurve|3|KO-BKO +multicurve|0|CurvePolygon|3|KO-BKO +multicurve|0|MultiCurve|3|KO-BKO +multicurve|0|MultiSurface|3|KO-BKO +multicurve|0|PolyhedralSurface|3|KO-BKO +multicurve|0|Triangle|3|KO-BKO +multicurve|4326|Point|0|KO-BKO +multicurve|4326|LineString|0|KO-BKO +multicurve|4326|Polygon|0|KO-BKO +multicurve|4326|MultiPoint|0|KO-BKO +multicurve|4326|MultiLineString|0|KO-BKO +multicurve|4326|MultiPolygon|0|KO-BKO +multicurve|4326|GeometryCollection|0|KO-BKO +multicurve|4326|CircularString|0|KO-BKO +multicurve|4326|CompoundCurve|0|KO-BKO +multicurve|4326|CurvePolygon|0|KO-BKO +multicurve|4326|MultiCurve|0|OK-BOK +multicurve|4326|MultiSurface|0|KO-BKO +multicurve|4326|PolyhedralSurface|0|KO-BKO +multicurve|4326|Triangle|0|KO-BKO +multicurve|4326|Tin|0|KO-BKO +multicurve|4326|Point|2|KO-BKO +multicurve|4326|LineString|2|KO-BKO +multicurve|4326|Polygon|2|KO-BKO +multicurve|4326|MultiPoint|2|KO-BKO +multicurve|4326|MultiLineString|2|KO-BKO +multicurve|4326|MultiPolygon|2|KO-BKO +multicurve|4326|GeometryCollection|2|KO-BKO +multicurve|4326|CircularString|2|KO-BKO +multicurve|4326|CompoundCurve|2|KO-BKO +multicurve|4326|CurvePolygon|2|KO-BKO +multicurve|4326|MultiCurve|2|KO-BKO +multicurve|4326|MultiSurface|2|KO-BKO +multicurve|4326|PolyhedralSurface|2|KO-BKO +multicurve|4326|Triangle|2|KO-BKO +multicurve|4326|Point|1|KO-BKO +multicurve|4326|LineString|1|KO-BKO +multicurve|4326|Polygon|1|KO-BKO +multicurve|4326|MultiPoint|1|KO-BKO +multicurve|4326|MultiLineString|1|KO-BKO +multicurve|4326|MultiPolygon|1|KO-BKO +multicurve|4326|GeometryCollection|1|KO-BKO +multicurve|4326|CircularString|1|KO-BKO +multicurve|4326|CompoundCurve|1|KO-BKO +multicurve|4326|CurvePolygon|1|KO-BKO +multicurve|4326|MultiCurve|1|KO-BKO +multicurve|4326|MultiSurface|1|KO-BKO +multicurve|4326|PolyhedralSurface|1|KO-BKO +multicurve|4326|Triangle|1|KO-BKO +multicurve|4326|Point|3|KO-BKO +multicurve|4326|LineString|3|KO-BKO +multicurve|4326|Polygon|3|KO-BKO +multicurve|4326|MultiPoint|3|KO-BKO +multicurve|4326|MultiLineString|3|KO-BKO +multicurve|4326|MultiPolygon|3|KO-BKO +multicurve|4326|GeometryCollection|3|KO-BKO +multicurve|4326|CircularString|3|KO-BKO +multicurve|4326|CompoundCurve|3|KO-BKO +multicurve|4326|CurvePolygon|3|KO-BKO +multicurve|4326|MultiCurve|3|KO-BKO +multicurve|4326|MultiSurface|3|KO-BKO +multicurve|4326|PolyhedralSurface|3|KO-BKO +multicurve|4326|Triangle|3|KO-BKO +multicurve||COUNT|4| +multicurve0|0|Point|0|KO-BKO +multicurve0|0|LineString|0|KO-BKO +multicurve0|0|Polygon|0|KO-BKO +multicurve0|0|MultiPoint|0|KO-BKO +multicurve0|0|MultiLineString|0|KO-BKO +multicurve0|0|MultiPolygon|0|KO-BKO +multicurve0|0|GeometryCollection|0|KO-BKO +multicurve0|0|CircularString|0|KO-BKO +multicurve0|0|CompoundCurve|0|KO-BKO +multicurve0|0|CurvePolygon|0|KO-BKO +multicurve0|0|MultiCurve|0|OK-BOK +multicurve0|0|MultiSurface|0|KO-BKO +multicurve0|0|PolyhedralSurface|0|KO-BKO +multicurve0|0|Triangle|0|KO-BKO +multicurve0|0|Tin|0|KO-BKO +multicurve0|0|Point|2|KO-BKO +multicurve0|0|LineString|2|KO-BKO +multicurve0|0|Polygon|2|KO-BKO +multicurve0|0|MultiPoint|2|KO-BKO +multicurve0|0|MultiLineString|2|KO-BKO +multicurve0|0|MultiPolygon|2|KO-BKO +multicurve0|0|GeometryCollection|2|KO-BKO +multicurve0|0|CircularString|2|KO-BKO +multicurve0|0|CompoundCurve|2|KO-BKO +multicurve0|0|CurvePolygon|2|KO-BKO +multicurve0|0|MultiCurve|2|KO-BKO +multicurve0|0|MultiSurface|2|KO-BKO +multicurve0|0|PolyhedralSurface|2|KO-BKO +multicurve0|0|Triangle|2|KO-BKO +multicurve0|0|Point|1|KO-BKO +multicurve0|0|LineString|1|KO-BKO +multicurve0|0|Polygon|1|KO-BKO +multicurve0|0|MultiPoint|1|KO-BKO +multicurve0|0|MultiLineString|1|KO-BKO +multicurve0|0|MultiPolygon|1|KO-BKO +multicurve0|0|GeometryCollection|1|KO-BKO +multicurve0|0|CircularString|1|KO-BKO +multicurve0|0|CompoundCurve|1|KO-BKO +multicurve0|0|CurvePolygon|1|KO-BKO +multicurve0|0|MultiCurve|1|KO-BKO +multicurve0|0|MultiSurface|1|KO-BKO +multicurve0|0|PolyhedralSurface|1|KO-BKO +multicurve0|0|Triangle|1|KO-BKO +multicurve0|0|Point|3|KO-BKO +multicurve0|0|LineString|3|KO-BKO +multicurve0|0|Polygon|3|KO-BKO +multicurve0|0|MultiPoint|3|KO-BKO +multicurve0|0|MultiLineString|3|KO-BKO +multicurve0|0|MultiPolygon|3|KO-BKO +multicurve0|0|GeometryCollection|3|KO-BKO +multicurve0|0|CircularString|3|KO-BKO +multicurve0|0|CompoundCurve|3|KO-BKO +multicurve0|0|CurvePolygon|3|KO-BKO +multicurve0|0|MultiCurve|3|KO-BKO +multicurve0|0|MultiSurface|3|KO-BKO +multicurve0|0|PolyhedralSurface|3|KO-BKO +multicurve0|0|Triangle|3|KO-BKO +multicurve0|4326|Point|0|KO-BKO +multicurve0|4326|LineString|0|KO-BKO +multicurve0|4326|Polygon|0|KO-BKO +multicurve0|4326|MultiPoint|0|KO-BKO +multicurve0|4326|MultiLineString|0|KO-BKO +multicurve0|4326|MultiPolygon|0|KO-BKO +multicurve0|4326|GeometryCollection|0|KO-BKO +multicurve0|4326|CircularString|0|KO-BKO +multicurve0|4326|CompoundCurve|0|KO-BKO +multicurve0|4326|CurvePolygon|0|KO-BKO +multicurve0|4326|MultiCurve|0|OK-BOK +multicurve0|4326|MultiSurface|0|KO-BKO +multicurve0|4326|PolyhedralSurface|0|KO-BKO +multicurve0|4326|Triangle|0|KO-BKO +multicurve0|4326|Tin|0|KO-BKO +multicurve0|4326|Point|2|KO-BKO +multicurve0|4326|LineString|2|KO-BKO +multicurve0|4326|Polygon|2|KO-BKO +multicurve0|4326|MultiPoint|2|KO-BKO +multicurve0|4326|MultiLineString|2|KO-BKO +multicurve0|4326|MultiPolygon|2|KO-BKO +multicurve0|4326|GeometryCollection|2|KO-BKO +multicurve0|4326|CircularString|2|KO-BKO +multicurve0|4326|CompoundCurve|2|KO-BKO +multicurve0|4326|CurvePolygon|2|KO-BKO +multicurve0|4326|MultiCurve|2|KO-BKO +multicurve0|4326|MultiSurface|2|KO-BKO +multicurve0|4326|PolyhedralSurface|2|KO-BKO +multicurve0|4326|Triangle|2|KO-BKO +multicurve0|4326|Point|1|KO-BKO +multicurve0|4326|LineString|1|KO-BKO +multicurve0|4326|Polygon|1|KO-BKO +multicurve0|4326|MultiPoint|1|KO-BKO +multicurve0|4326|MultiLineString|1|KO-BKO +multicurve0|4326|MultiPolygon|1|KO-BKO +multicurve0|4326|GeometryCollection|1|KO-BKO +multicurve0|4326|CircularString|1|KO-BKO +multicurve0|4326|CompoundCurve|1|KO-BKO +multicurve0|4326|CurvePolygon|1|KO-BKO +multicurve0|4326|MultiCurve|1|KO-BKO +multicurve0|4326|MultiSurface|1|KO-BKO +multicurve0|4326|PolyhedralSurface|1|KO-BKO +multicurve0|4326|Triangle|1|KO-BKO +multicurve0|4326|Point|3|KO-BKO +multicurve0|4326|LineString|3|KO-BKO +multicurve0|4326|Polygon|3|KO-BKO +multicurve0|4326|MultiPoint|3|KO-BKO +multicurve0|4326|MultiLineString|3|KO-BKO +multicurve0|4326|MultiPolygon|3|KO-BKO +multicurve0|4326|GeometryCollection|3|KO-BKO +multicurve0|4326|CircularString|3|KO-BKO +multicurve0|4326|CompoundCurve|3|KO-BKO +multicurve0|4326|CurvePolygon|3|KO-BKO +multicurve0|4326|MultiCurve|3|KO-BKO +multicurve0|4326|MultiSurface|3|KO-BKO +multicurve0|4326|PolyhedralSurface|3|KO-BKO +multicurve0|4326|Triangle|3|KO-BKO +multicurve0||COUNT|4| +multicurve4326|0|Point|0|KO-BKO +multicurve4326|0|LineString|0|KO-BKO +multicurve4326|0|Polygon|0|KO-BKO +multicurve4326|0|MultiPoint|0|KO-BKO +multicurve4326|0|MultiLineString|0|KO-BKO +multicurve4326|0|MultiPolygon|0|KO-BKO +multicurve4326|0|GeometryCollection|0|KO-BKO +multicurve4326|0|CircularString|0|KO-BKO +multicurve4326|0|CompoundCurve|0|KO-BKO +multicurve4326|0|CurvePolygon|0|KO-BKO +multicurve4326|0|MultiCurve|0|KO-BKO +multicurve4326|0|MultiSurface|0|KO-BKO +multicurve4326|0|PolyhedralSurface|0|KO-BKO +multicurve4326|0|Triangle|0|KO-BKO +multicurve4326|0|Tin|0|KO-BKO +multicurve4326|0|Point|2|KO-BKO +multicurve4326|0|LineString|2|KO-BKO +multicurve4326|0|Polygon|2|KO-BKO +multicurve4326|0|MultiPoint|2|KO-BKO +multicurve4326|0|MultiLineString|2|KO-BKO +multicurve4326|0|MultiPolygon|2|KO-BKO +multicurve4326|0|GeometryCollection|2|KO-BKO +multicurve4326|0|CircularString|2|KO-BKO +multicurve4326|0|CompoundCurve|2|KO-BKO +multicurve4326|0|CurvePolygon|2|KO-BKO +multicurve4326|0|MultiCurve|2|KO-BKO +multicurve4326|0|MultiSurface|2|KO-BKO +multicurve4326|0|PolyhedralSurface|2|KO-BKO +multicurve4326|0|Triangle|2|KO-BKO +multicurve4326|0|Point|1|KO-BKO +multicurve4326|0|LineString|1|KO-BKO +multicurve4326|0|Polygon|1|KO-BKO +multicurve4326|0|MultiPoint|1|KO-BKO +multicurve4326|0|MultiLineString|1|KO-BKO +multicurve4326|0|MultiPolygon|1|KO-BKO +multicurve4326|0|GeometryCollection|1|KO-BKO +multicurve4326|0|CircularString|1|KO-BKO +multicurve4326|0|CompoundCurve|1|KO-BKO +multicurve4326|0|CurvePolygon|1|KO-BKO +multicurve4326|0|MultiCurve|1|KO-BKO +multicurve4326|0|MultiSurface|1|KO-BKO +multicurve4326|0|PolyhedralSurface|1|KO-BKO +multicurve4326|0|Triangle|1|KO-BKO +multicurve4326|0|Point|3|KO-BKO +multicurve4326|0|LineString|3|KO-BKO +multicurve4326|0|Polygon|3|KO-BKO +multicurve4326|0|MultiPoint|3|KO-BKO +multicurve4326|0|MultiLineString|3|KO-BKO +multicurve4326|0|MultiPolygon|3|KO-BKO +multicurve4326|0|GeometryCollection|3|KO-BKO +multicurve4326|0|CircularString|3|KO-BKO +multicurve4326|0|CompoundCurve|3|KO-BKO +multicurve4326|0|CurvePolygon|3|KO-BKO +multicurve4326|0|MultiCurve|3|KO-BKO +multicurve4326|0|MultiSurface|3|KO-BKO +multicurve4326|0|PolyhedralSurface|3|KO-BKO +multicurve4326|0|Triangle|3|KO-BKO +multicurve4326|4326|Point|0|KO-BKO +multicurve4326|4326|LineString|0|KO-BKO +multicurve4326|4326|Polygon|0|KO-BKO +multicurve4326|4326|MultiPoint|0|KO-BKO +multicurve4326|4326|MultiLineString|0|KO-BKO +multicurve4326|4326|MultiPolygon|0|KO-BKO +multicurve4326|4326|GeometryCollection|0|KO-BKO +multicurve4326|4326|CircularString|0|KO-BKO +multicurve4326|4326|CompoundCurve|0|KO-BKO +multicurve4326|4326|CurvePolygon|0|KO-BKO +multicurve4326|4326|MultiCurve|0|OK-BOK +multicurve4326|4326|MultiSurface|0|KO-BKO +multicurve4326|4326|PolyhedralSurface|0|KO-BKO +multicurve4326|4326|Triangle|0|KO-BKO +multicurve4326|4326|Tin|0|KO-BKO +multicurve4326|4326|Point|2|KO-BKO +multicurve4326|4326|LineString|2|KO-BKO +multicurve4326|4326|Polygon|2|KO-BKO +multicurve4326|4326|MultiPoint|2|KO-BKO +multicurve4326|4326|MultiLineString|2|KO-BKO +multicurve4326|4326|MultiPolygon|2|KO-BKO +multicurve4326|4326|GeometryCollection|2|KO-BKO +multicurve4326|4326|CircularString|2|KO-BKO +multicurve4326|4326|CompoundCurve|2|KO-BKO +multicurve4326|4326|CurvePolygon|2|KO-BKO +multicurve4326|4326|MultiCurve|2|KO-BKO +multicurve4326|4326|MultiSurface|2|KO-BKO +multicurve4326|4326|PolyhedralSurface|2|KO-BKO +multicurve4326|4326|Triangle|2|KO-BKO +multicurve4326|4326|Point|1|KO-BKO +multicurve4326|4326|LineString|1|KO-BKO +multicurve4326|4326|Polygon|1|KO-BKO +multicurve4326|4326|MultiPoint|1|KO-BKO +multicurve4326|4326|MultiLineString|1|KO-BKO +multicurve4326|4326|MultiPolygon|1|KO-BKO +multicurve4326|4326|GeometryCollection|1|KO-BKO +multicurve4326|4326|CircularString|1|KO-BKO +multicurve4326|4326|CompoundCurve|1|KO-BKO +multicurve4326|4326|CurvePolygon|1|KO-BKO +multicurve4326|4326|MultiCurve|1|KO-BKO +multicurve4326|4326|MultiSurface|1|KO-BKO +multicurve4326|4326|PolyhedralSurface|1|KO-BKO +multicurve4326|4326|Triangle|1|KO-BKO +multicurve4326|4326|Point|3|KO-BKO +multicurve4326|4326|LineString|3|KO-BKO +multicurve4326|4326|Polygon|3|KO-BKO +multicurve4326|4326|MultiPoint|3|KO-BKO +multicurve4326|4326|MultiLineString|3|KO-BKO +multicurve4326|4326|MultiPolygon|3|KO-BKO +multicurve4326|4326|GeometryCollection|3|KO-BKO +multicurve4326|4326|CircularString|3|KO-BKO +multicurve4326|4326|CompoundCurve|3|KO-BKO +multicurve4326|4326|CurvePolygon|3|KO-BKO +multicurve4326|4326|MultiCurve|3|KO-BKO +multicurve4326|4326|MultiSurface|3|KO-BKO +multicurve4326|4326|PolyhedralSurface|3|KO-BKO +multicurve4326|4326|Triangle|3|KO-BKO +multicurve4326||COUNT|2| +multicurvem|0|Point|0|KO-BKO +multicurvem|0|LineString|0|KO-BKO +multicurvem|0|Polygon|0|KO-BKO +multicurvem|0|MultiPoint|0|KO-BKO +multicurvem|0|MultiLineString|0|KO-BKO +multicurvem|0|MultiPolygon|0|KO-BKO +multicurvem|0|GeometryCollection|0|KO-BKO +multicurvem|0|CircularString|0|KO-BKO +multicurvem|0|CompoundCurve|0|KO-BKO +multicurvem|0|CurvePolygon|0|KO-BKO +multicurvem|0|MultiCurve|0|KO-BKO +multicurvem|0|MultiSurface|0|KO-BKO +multicurvem|0|PolyhedralSurface|0|KO-BKO +multicurvem|0|Triangle|0|KO-BKO +multicurvem|0|Tin|0|KO-BKO +multicurvem|0|Point|2|KO-BKO +multicurvem|0|LineString|2|KO-BKO +multicurvem|0|Polygon|2|KO-BKO +multicurvem|0|MultiPoint|2|KO-BKO +multicurvem|0|MultiLineString|2|KO-BKO +multicurvem|0|MultiPolygon|2|KO-BKO +multicurvem|0|GeometryCollection|2|KO-BKO +multicurvem|0|CircularString|2|KO-BKO +multicurvem|0|CompoundCurve|2|KO-BKO +multicurvem|0|CurvePolygon|2|KO-BKO +multicurvem|0|MultiCurve|2|KO-BKO +multicurvem|0|MultiSurface|2|KO-BKO +multicurvem|0|PolyhedralSurface|2|KO-BKO +multicurvem|0|Triangle|2|KO-BKO +multicurvem|0|Point|1|KO-BKO +multicurvem|0|LineString|1|KO-BKO +multicurvem|0|Polygon|1|KO-BKO +multicurvem|0|MultiPoint|1|KO-BKO +multicurvem|0|MultiLineString|1|KO-BKO +multicurvem|0|MultiPolygon|1|KO-BKO +multicurvem|0|GeometryCollection|1|KO-BKO +multicurvem|0|CircularString|1|KO-BKO +multicurvem|0|CompoundCurve|1|KO-BKO +multicurvem|0|CurvePolygon|1|KO-BKO +multicurvem|0|MultiCurve|1|OK-BOK +multicurvem|0|MultiSurface|1|KO-BKO +multicurvem|0|PolyhedralSurface|1|KO-BKO +multicurvem|0|Triangle|1|KO-BKO +multicurvem|0|Point|3|KO-BKO +multicurvem|0|LineString|3|KO-BKO +multicurvem|0|Polygon|3|KO-BKO +multicurvem|0|MultiPoint|3|KO-BKO +multicurvem|0|MultiLineString|3|KO-BKO +multicurvem|0|MultiPolygon|3|KO-BKO +multicurvem|0|GeometryCollection|3|KO-BKO +multicurvem|0|CircularString|3|KO-BKO +multicurvem|0|CompoundCurve|3|KO-BKO +multicurvem|0|CurvePolygon|3|KO-BKO +multicurvem|0|MultiCurve|3|KO-BKO +multicurvem|0|MultiSurface|3|KO-BKO +multicurvem|0|PolyhedralSurface|3|KO-BKO +multicurvem|0|Triangle|3|KO-BKO +multicurvem|4326|Point|0|KO-BKO +multicurvem|4326|LineString|0|KO-BKO +multicurvem|4326|Polygon|0|KO-BKO +multicurvem|4326|MultiPoint|0|KO-BKO +multicurvem|4326|MultiLineString|0|KO-BKO +multicurvem|4326|MultiPolygon|0|KO-BKO +multicurvem|4326|GeometryCollection|0|KO-BKO +multicurvem|4326|CircularString|0|KO-BKO +multicurvem|4326|CompoundCurve|0|KO-BKO +multicurvem|4326|CurvePolygon|0|KO-BKO +multicurvem|4326|MultiCurve|0|KO-BKO +multicurvem|4326|MultiSurface|0|KO-BKO +multicurvem|4326|PolyhedralSurface|0|KO-BKO +multicurvem|4326|Triangle|0|KO-BKO +multicurvem|4326|Tin|0|KO-BKO +multicurvem|4326|Point|2|KO-BKO +multicurvem|4326|LineString|2|KO-BKO +multicurvem|4326|Polygon|2|KO-BKO +multicurvem|4326|MultiPoint|2|KO-BKO +multicurvem|4326|MultiLineString|2|KO-BKO +multicurvem|4326|MultiPolygon|2|KO-BKO +multicurvem|4326|GeometryCollection|2|KO-BKO +multicurvem|4326|CircularString|2|KO-BKO +multicurvem|4326|CompoundCurve|2|KO-BKO +multicurvem|4326|CurvePolygon|2|KO-BKO +multicurvem|4326|MultiCurve|2|KO-BKO +multicurvem|4326|MultiSurface|2|KO-BKO +multicurvem|4326|PolyhedralSurface|2|KO-BKO +multicurvem|4326|Triangle|2|KO-BKO +multicurvem|4326|Point|1|KO-BKO +multicurvem|4326|LineString|1|KO-BKO +multicurvem|4326|Polygon|1|KO-BKO +multicurvem|4326|MultiPoint|1|KO-BKO +multicurvem|4326|MultiLineString|1|KO-BKO +multicurvem|4326|MultiPolygon|1|KO-BKO +multicurvem|4326|GeometryCollection|1|KO-BKO +multicurvem|4326|CircularString|1|KO-BKO +multicurvem|4326|CompoundCurve|1|KO-BKO +multicurvem|4326|CurvePolygon|1|KO-BKO +multicurvem|4326|MultiCurve|1|OK-BOK +multicurvem|4326|MultiSurface|1|KO-BKO +multicurvem|4326|PolyhedralSurface|1|KO-BKO +multicurvem|4326|Triangle|1|KO-BKO +multicurvem|4326|Point|3|KO-BKO +multicurvem|4326|LineString|3|KO-BKO +multicurvem|4326|Polygon|3|KO-BKO +multicurvem|4326|MultiPoint|3|KO-BKO +multicurvem|4326|MultiLineString|3|KO-BKO +multicurvem|4326|MultiPolygon|3|KO-BKO +multicurvem|4326|GeometryCollection|3|KO-BKO +multicurvem|4326|CircularString|3|KO-BKO +multicurvem|4326|CompoundCurve|3|KO-BKO +multicurvem|4326|CurvePolygon|3|KO-BKO +multicurvem|4326|MultiCurve|3|KO-BKO +multicurvem|4326|MultiSurface|3|KO-BKO +multicurvem|4326|PolyhedralSurface|3|KO-BKO +multicurvem|4326|Triangle|3|KO-BKO +multicurvem||COUNT|4| +multicurvem0|0|Point|0|KO-BKO +multicurvem0|0|LineString|0|KO-BKO +multicurvem0|0|Polygon|0|KO-BKO +multicurvem0|0|MultiPoint|0|KO-BKO +multicurvem0|0|MultiLineString|0|KO-BKO +multicurvem0|0|MultiPolygon|0|KO-BKO +multicurvem0|0|GeometryCollection|0|KO-BKO +multicurvem0|0|CircularString|0|KO-BKO +multicurvem0|0|CompoundCurve|0|KO-BKO +multicurvem0|0|CurvePolygon|0|KO-BKO +multicurvem0|0|MultiCurve|0|KO-BKO +multicurvem0|0|MultiSurface|0|KO-BKO +multicurvem0|0|PolyhedralSurface|0|KO-BKO +multicurvem0|0|Triangle|0|KO-BKO +multicurvem0|0|Tin|0|KO-BKO +multicurvem0|0|Point|2|KO-BKO +multicurvem0|0|LineString|2|KO-BKO +multicurvem0|0|Polygon|2|KO-BKO +multicurvem0|0|MultiPoint|2|KO-BKO +multicurvem0|0|MultiLineString|2|KO-BKO +multicurvem0|0|MultiPolygon|2|KO-BKO +multicurvem0|0|GeometryCollection|2|KO-BKO +multicurvem0|0|CircularString|2|KO-BKO +multicurvem0|0|CompoundCurve|2|KO-BKO +multicurvem0|0|CurvePolygon|2|KO-BKO +multicurvem0|0|MultiCurve|2|KO-BKO +multicurvem0|0|MultiSurface|2|KO-BKO +multicurvem0|0|PolyhedralSurface|2|KO-BKO +multicurvem0|0|Triangle|2|KO-BKO +multicurvem0|0|Point|1|KO-BKO +multicurvem0|0|LineString|1|KO-BKO +multicurvem0|0|Polygon|1|KO-BKO +multicurvem0|0|MultiPoint|1|KO-BKO +multicurvem0|0|MultiLineString|1|KO-BKO +multicurvem0|0|MultiPolygon|1|KO-BKO +multicurvem0|0|GeometryCollection|1|KO-BKO +multicurvem0|0|CircularString|1|KO-BKO +multicurvem0|0|CompoundCurve|1|KO-BKO +multicurvem0|0|CurvePolygon|1|KO-BKO +multicurvem0|0|MultiCurve|1|OK-BOK +multicurvem0|0|MultiSurface|1|KO-BKO +multicurvem0|0|PolyhedralSurface|1|KO-BKO +multicurvem0|0|Triangle|1|KO-BKO +multicurvem0|0|Point|3|KO-BKO +multicurvem0|0|LineString|3|KO-BKO +multicurvem0|0|Polygon|3|KO-BKO +multicurvem0|0|MultiPoint|3|KO-BKO +multicurvem0|0|MultiLineString|3|KO-BKO +multicurvem0|0|MultiPolygon|3|KO-BKO +multicurvem0|0|GeometryCollection|3|KO-BKO +multicurvem0|0|CircularString|3|KO-BKO +multicurvem0|0|CompoundCurve|3|KO-BKO +multicurvem0|0|CurvePolygon|3|KO-BKO +multicurvem0|0|MultiCurve|3|KO-BKO +multicurvem0|0|MultiSurface|3|KO-BKO +multicurvem0|0|PolyhedralSurface|3|KO-BKO +multicurvem0|0|Triangle|3|KO-BKO +multicurvem0|4326|Point|0|KO-BKO +multicurvem0|4326|LineString|0|KO-BKO +multicurvem0|4326|Polygon|0|KO-BKO +multicurvem0|4326|MultiPoint|0|KO-BKO +multicurvem0|4326|MultiLineString|0|KO-BKO +multicurvem0|4326|MultiPolygon|0|KO-BKO +multicurvem0|4326|GeometryCollection|0|KO-BKO +multicurvem0|4326|CircularString|0|KO-BKO +multicurvem0|4326|CompoundCurve|0|KO-BKO +multicurvem0|4326|CurvePolygon|0|KO-BKO +multicurvem0|4326|MultiCurve|0|KO-BKO +multicurvem0|4326|MultiSurface|0|KO-BKO +multicurvem0|4326|PolyhedralSurface|0|KO-BKO +multicurvem0|4326|Triangle|0|KO-BKO +multicurvem0|4326|Tin|0|KO-BKO +multicurvem0|4326|Point|2|KO-BKO +multicurvem0|4326|LineString|2|KO-BKO +multicurvem0|4326|Polygon|2|KO-BKO +multicurvem0|4326|MultiPoint|2|KO-BKO +multicurvem0|4326|MultiLineString|2|KO-BKO +multicurvem0|4326|MultiPolygon|2|KO-BKO +multicurvem0|4326|GeometryCollection|2|KO-BKO +multicurvem0|4326|CircularString|2|KO-BKO +multicurvem0|4326|CompoundCurve|2|KO-BKO +multicurvem0|4326|CurvePolygon|2|KO-BKO +multicurvem0|4326|MultiCurve|2|KO-BKO +multicurvem0|4326|MultiSurface|2|KO-BKO +multicurvem0|4326|PolyhedralSurface|2|KO-BKO +multicurvem0|4326|Triangle|2|KO-BKO +multicurvem0|4326|Point|1|KO-BKO +multicurvem0|4326|LineString|1|KO-BKO +multicurvem0|4326|Polygon|1|KO-BKO +multicurvem0|4326|MultiPoint|1|KO-BKO +multicurvem0|4326|MultiLineString|1|KO-BKO +multicurvem0|4326|MultiPolygon|1|KO-BKO +multicurvem0|4326|GeometryCollection|1|KO-BKO +multicurvem0|4326|CircularString|1|KO-BKO +multicurvem0|4326|CompoundCurve|1|KO-BKO +multicurvem0|4326|CurvePolygon|1|KO-BKO +multicurvem0|4326|MultiCurve|1|OK-BOK +multicurvem0|4326|MultiSurface|1|KO-BKO +multicurvem0|4326|PolyhedralSurface|1|KO-BKO +multicurvem0|4326|Triangle|1|KO-BKO +multicurvem0|4326|Point|3|KO-BKO +multicurvem0|4326|LineString|3|KO-BKO +multicurvem0|4326|Polygon|3|KO-BKO +multicurvem0|4326|MultiPoint|3|KO-BKO +multicurvem0|4326|MultiLineString|3|KO-BKO +multicurvem0|4326|MultiPolygon|3|KO-BKO +multicurvem0|4326|GeometryCollection|3|KO-BKO +multicurvem0|4326|CircularString|3|KO-BKO +multicurvem0|4326|CompoundCurve|3|KO-BKO +multicurvem0|4326|CurvePolygon|3|KO-BKO +multicurvem0|4326|MultiCurve|3|KO-BKO +multicurvem0|4326|MultiSurface|3|KO-BKO +multicurvem0|4326|PolyhedralSurface|3|KO-BKO +multicurvem0|4326|Triangle|3|KO-BKO +multicurvem0||COUNT|4| +multicurvem4326|0|Point|0|KO-BKO +multicurvem4326|0|LineString|0|KO-BKO +multicurvem4326|0|Polygon|0|KO-BKO +multicurvem4326|0|MultiPoint|0|KO-BKO +multicurvem4326|0|MultiLineString|0|KO-BKO +multicurvem4326|0|MultiPolygon|0|KO-BKO +multicurvem4326|0|GeometryCollection|0|KO-BKO +multicurvem4326|0|CircularString|0|KO-BKO +multicurvem4326|0|CompoundCurve|0|KO-BKO +multicurvem4326|0|CurvePolygon|0|KO-BKO +multicurvem4326|0|MultiCurve|0|KO-BKO +multicurvem4326|0|MultiSurface|0|KO-BKO +multicurvem4326|0|PolyhedralSurface|0|KO-BKO +multicurvem4326|0|Triangle|0|KO-BKO +multicurvem4326|0|Tin|0|KO-BKO +multicurvem4326|0|Point|2|KO-BKO +multicurvem4326|0|LineString|2|KO-BKO +multicurvem4326|0|Polygon|2|KO-BKO +multicurvem4326|0|MultiPoint|2|KO-BKO +multicurvem4326|0|MultiLineString|2|KO-BKO +multicurvem4326|0|MultiPolygon|2|KO-BKO +multicurvem4326|0|GeometryCollection|2|KO-BKO +multicurvem4326|0|CircularString|2|KO-BKO +multicurvem4326|0|CompoundCurve|2|KO-BKO +multicurvem4326|0|CurvePolygon|2|KO-BKO +multicurvem4326|0|MultiCurve|2|KO-BKO +multicurvem4326|0|MultiSurface|2|KO-BKO +multicurvem4326|0|PolyhedralSurface|2|KO-BKO +multicurvem4326|0|Triangle|2|KO-BKO +multicurvem4326|0|Point|1|KO-BKO +multicurvem4326|0|LineString|1|KO-BKO +multicurvem4326|0|Polygon|1|KO-BKO +multicurvem4326|0|MultiPoint|1|KO-BKO +multicurvem4326|0|MultiLineString|1|KO-BKO +multicurvem4326|0|MultiPolygon|1|KO-BKO +multicurvem4326|0|GeometryCollection|1|KO-BKO +multicurvem4326|0|CircularString|1|KO-BKO +multicurvem4326|0|CompoundCurve|1|KO-BKO +multicurvem4326|0|CurvePolygon|1|KO-BKO +multicurvem4326|0|MultiCurve|1|KO-BKO +multicurvem4326|0|MultiSurface|1|KO-BKO +multicurvem4326|0|PolyhedralSurface|1|KO-BKO +multicurvem4326|0|Triangle|1|KO-BKO +multicurvem4326|0|Point|3|KO-BKO +multicurvem4326|0|LineString|3|KO-BKO +multicurvem4326|0|Polygon|3|KO-BKO +multicurvem4326|0|MultiPoint|3|KO-BKO +multicurvem4326|0|MultiLineString|3|KO-BKO +multicurvem4326|0|MultiPolygon|3|KO-BKO +multicurvem4326|0|GeometryCollection|3|KO-BKO +multicurvem4326|0|CircularString|3|KO-BKO +multicurvem4326|0|CompoundCurve|3|KO-BKO +multicurvem4326|0|CurvePolygon|3|KO-BKO +multicurvem4326|0|MultiCurve|3|KO-BKO +multicurvem4326|0|MultiSurface|3|KO-BKO +multicurvem4326|0|PolyhedralSurface|3|KO-BKO +multicurvem4326|0|Triangle|3|KO-BKO +multicurvem4326|4326|Point|0|KO-BKO +multicurvem4326|4326|LineString|0|KO-BKO +multicurvem4326|4326|Polygon|0|KO-BKO +multicurvem4326|4326|MultiPoint|0|KO-BKO +multicurvem4326|4326|MultiLineString|0|KO-BKO +multicurvem4326|4326|MultiPolygon|0|KO-BKO +multicurvem4326|4326|GeometryCollection|0|KO-BKO +multicurvem4326|4326|CircularString|0|KO-BKO +multicurvem4326|4326|CompoundCurve|0|KO-BKO +multicurvem4326|4326|CurvePolygon|0|KO-BKO +multicurvem4326|4326|MultiCurve|0|KO-BKO +multicurvem4326|4326|MultiSurface|0|KO-BKO +multicurvem4326|4326|PolyhedralSurface|0|KO-BKO +multicurvem4326|4326|Triangle|0|KO-BKO +multicurvem4326|4326|Tin|0|KO-BKO +multicurvem4326|4326|Point|2|KO-BKO +multicurvem4326|4326|LineString|2|KO-BKO +multicurvem4326|4326|Polygon|2|KO-BKO +multicurvem4326|4326|MultiPoint|2|KO-BKO +multicurvem4326|4326|MultiLineString|2|KO-BKO +multicurvem4326|4326|MultiPolygon|2|KO-BKO +multicurvem4326|4326|GeometryCollection|2|KO-BKO +multicurvem4326|4326|CircularString|2|KO-BKO +multicurvem4326|4326|CompoundCurve|2|KO-BKO +multicurvem4326|4326|CurvePolygon|2|KO-BKO +multicurvem4326|4326|MultiCurve|2|KO-BKO +multicurvem4326|4326|MultiSurface|2|KO-BKO +multicurvem4326|4326|PolyhedralSurface|2|KO-BKO +multicurvem4326|4326|Triangle|2|KO-BKO +multicurvem4326|4326|Point|1|KO-BKO +multicurvem4326|4326|LineString|1|KO-BKO +multicurvem4326|4326|Polygon|1|KO-BKO +multicurvem4326|4326|MultiPoint|1|KO-BKO +multicurvem4326|4326|MultiLineString|1|KO-BKO +multicurvem4326|4326|MultiPolygon|1|KO-BKO +multicurvem4326|4326|GeometryCollection|1|KO-BKO +multicurvem4326|4326|CircularString|1|KO-BKO +multicurvem4326|4326|CompoundCurve|1|KO-BKO +multicurvem4326|4326|CurvePolygon|1|KO-BKO +multicurvem4326|4326|MultiCurve|1|OK-BOK +multicurvem4326|4326|MultiSurface|1|KO-BKO +multicurvem4326|4326|PolyhedralSurface|1|KO-BKO +multicurvem4326|4326|Triangle|1|KO-BKO +multicurvem4326|4326|Point|3|KO-BKO +multicurvem4326|4326|LineString|3|KO-BKO +multicurvem4326|4326|Polygon|3|KO-BKO +multicurvem4326|4326|MultiPoint|3|KO-BKO +multicurvem4326|4326|MultiLineString|3|KO-BKO +multicurvem4326|4326|MultiPolygon|3|KO-BKO +multicurvem4326|4326|GeometryCollection|3|KO-BKO +multicurvem4326|4326|CircularString|3|KO-BKO +multicurvem4326|4326|CompoundCurve|3|KO-BKO +multicurvem4326|4326|CurvePolygon|3|KO-BKO +multicurvem4326|4326|MultiCurve|3|KO-BKO +multicurvem4326|4326|MultiSurface|3|KO-BKO +multicurvem4326|4326|PolyhedralSurface|3|KO-BKO +multicurvem4326|4326|Triangle|3|KO-BKO +multicurvem4326||COUNT|2| +multicurvez|0|Point|0|KO-BKO +multicurvez|0|LineString|0|KO-BKO +multicurvez|0|Polygon|0|KO-BKO +multicurvez|0|MultiPoint|0|KO-BKO +multicurvez|0|MultiLineString|0|KO-BKO +multicurvez|0|MultiPolygon|0|KO-BKO +multicurvez|0|GeometryCollection|0|KO-BKO +multicurvez|0|CircularString|0|KO-BKO +multicurvez|0|CompoundCurve|0|KO-BKO +multicurvez|0|CurvePolygon|0|KO-BKO +multicurvez|0|MultiCurve|0|KO-BKO +multicurvez|0|MultiSurface|0|KO-BKO +multicurvez|0|PolyhedralSurface|0|KO-BKO +multicurvez|0|Triangle|0|KO-BKO +multicurvez|0|Tin|0|KO-BKO +multicurvez|0|Point|2|KO-BKO +multicurvez|0|LineString|2|KO-BKO +multicurvez|0|Polygon|2|KO-BKO +multicurvez|0|MultiPoint|2|KO-BKO +multicurvez|0|MultiLineString|2|KO-BKO +multicurvez|0|MultiPolygon|2|KO-BKO +multicurvez|0|GeometryCollection|2|KO-BKO +multicurvez|0|CircularString|2|KO-BKO +multicurvez|0|CompoundCurve|2|KO-BKO +multicurvez|0|CurvePolygon|2|KO-BKO +multicurvez|0|MultiCurve|2|OK-BOK +multicurvez|0|MultiSurface|2|KO-BKO +multicurvez|0|PolyhedralSurface|2|KO-BKO +multicurvez|0|Triangle|2|KO-BKO +multicurvez|0|Point|1|KO-BKO +multicurvez|0|LineString|1|KO-BKO +multicurvez|0|Polygon|1|KO-BKO +multicurvez|0|MultiPoint|1|KO-BKO +multicurvez|0|MultiLineString|1|KO-BKO +multicurvez|0|MultiPolygon|1|KO-BKO +multicurvez|0|GeometryCollection|1|KO-BKO +multicurvez|0|CircularString|1|KO-BKO +multicurvez|0|CompoundCurve|1|KO-BKO +multicurvez|0|CurvePolygon|1|KO-BKO +multicurvez|0|MultiCurve|1|KO-BKO +multicurvez|0|MultiSurface|1|KO-BKO +multicurvez|0|PolyhedralSurface|1|KO-BKO +multicurvez|0|Triangle|1|KO-BKO +multicurvez|0|Point|3|KO-BKO +multicurvez|0|LineString|3|KO-BKO +multicurvez|0|Polygon|3|KO-BKO +multicurvez|0|MultiPoint|3|KO-BKO +multicurvez|0|MultiLineString|3|KO-BKO +multicurvez|0|MultiPolygon|3|KO-BKO +multicurvez|0|GeometryCollection|3|KO-BKO +multicurvez|0|CircularString|3|KO-BKO +multicurvez|0|CompoundCurve|3|KO-BKO +multicurvez|0|CurvePolygon|3|KO-BKO +multicurvez|0|MultiCurve|3|KO-BKO +multicurvez|0|MultiSurface|3|KO-BKO +multicurvez|0|PolyhedralSurface|3|KO-BKO +multicurvez|0|Triangle|3|KO-BKO +multicurvez|4326|Point|0|KO-BKO +multicurvez|4326|LineString|0|KO-BKO +multicurvez|4326|Polygon|0|KO-BKO +multicurvez|4326|MultiPoint|0|KO-BKO +multicurvez|4326|MultiLineString|0|KO-BKO +multicurvez|4326|MultiPolygon|0|KO-BKO +multicurvez|4326|GeometryCollection|0|KO-BKO +multicurvez|4326|CircularString|0|KO-BKO +multicurvez|4326|CompoundCurve|0|KO-BKO +multicurvez|4326|CurvePolygon|0|KO-BKO +multicurvez|4326|MultiCurve|0|KO-BKO +multicurvez|4326|MultiSurface|0|KO-BKO +multicurvez|4326|PolyhedralSurface|0|KO-BKO +multicurvez|4326|Triangle|0|KO-BKO +multicurvez|4326|Tin|0|KO-BKO +multicurvez|4326|Point|2|KO-BKO +multicurvez|4326|LineString|2|KO-BKO +multicurvez|4326|Polygon|2|KO-BKO +multicurvez|4326|MultiPoint|2|KO-BKO +multicurvez|4326|MultiLineString|2|KO-BKO +multicurvez|4326|MultiPolygon|2|KO-BKO +multicurvez|4326|GeometryCollection|2|KO-BKO +multicurvez|4326|CircularString|2|KO-BKO +multicurvez|4326|CompoundCurve|2|KO-BKO +multicurvez|4326|CurvePolygon|2|KO-BKO +multicurvez|4326|MultiCurve|2|OK-BOK +multicurvez|4326|MultiSurface|2|KO-BKO +multicurvez|4326|PolyhedralSurface|2|KO-BKO +multicurvez|4326|Triangle|2|KO-BKO +multicurvez|4326|Point|1|KO-BKO +multicurvez|4326|LineString|1|KO-BKO +multicurvez|4326|Polygon|1|KO-BKO +multicurvez|4326|MultiPoint|1|KO-BKO +multicurvez|4326|MultiLineString|1|KO-BKO +multicurvez|4326|MultiPolygon|1|KO-BKO +multicurvez|4326|GeometryCollection|1|KO-BKO +multicurvez|4326|CircularString|1|KO-BKO +multicurvez|4326|CompoundCurve|1|KO-BKO +multicurvez|4326|CurvePolygon|1|KO-BKO +multicurvez|4326|MultiCurve|1|KO-BKO +multicurvez|4326|MultiSurface|1|KO-BKO +multicurvez|4326|PolyhedralSurface|1|KO-BKO +multicurvez|4326|Triangle|1|KO-BKO +multicurvez|4326|Point|3|KO-BKO +multicurvez|4326|LineString|3|KO-BKO +multicurvez|4326|Polygon|3|KO-BKO +multicurvez|4326|MultiPoint|3|KO-BKO +multicurvez|4326|MultiLineString|3|KO-BKO +multicurvez|4326|MultiPolygon|3|KO-BKO +multicurvez|4326|GeometryCollection|3|KO-BKO +multicurvez|4326|CircularString|3|KO-BKO +multicurvez|4326|CompoundCurve|3|KO-BKO +multicurvez|4326|CurvePolygon|3|KO-BKO +multicurvez|4326|MultiCurve|3|KO-BKO +multicurvez|4326|MultiSurface|3|KO-BKO +multicurvez|4326|PolyhedralSurface|3|KO-BKO +multicurvez|4326|Triangle|3|KO-BKO +multicurvez||COUNT|4| +multicurvez0|0|Point|0|KO-BKO +multicurvez0|0|LineString|0|KO-BKO +multicurvez0|0|Polygon|0|KO-BKO +multicurvez0|0|MultiPoint|0|KO-BKO +multicurvez0|0|MultiLineString|0|KO-BKO +multicurvez0|0|MultiPolygon|0|KO-BKO +multicurvez0|0|GeometryCollection|0|KO-BKO +multicurvez0|0|CircularString|0|KO-BKO +multicurvez0|0|CompoundCurve|0|KO-BKO +multicurvez0|0|CurvePolygon|0|KO-BKO +multicurvez0|0|MultiCurve|0|KO-BKO +multicurvez0|0|MultiSurface|0|KO-BKO +multicurvez0|0|PolyhedralSurface|0|KO-BKO +multicurvez0|0|Triangle|0|KO-BKO +multicurvez0|0|Tin|0|KO-BKO +multicurvez0|0|Point|2|KO-BKO +multicurvez0|0|LineString|2|KO-BKO +multicurvez0|0|Polygon|2|KO-BKO +multicurvez0|0|MultiPoint|2|KO-BKO +multicurvez0|0|MultiLineString|2|KO-BKO +multicurvez0|0|MultiPolygon|2|KO-BKO +multicurvez0|0|GeometryCollection|2|KO-BKO +multicurvez0|0|CircularString|2|KO-BKO +multicurvez0|0|CompoundCurve|2|KO-BKO +multicurvez0|0|CurvePolygon|2|KO-BKO +multicurvez0|0|MultiCurve|2|OK-BOK +multicurvez0|0|MultiSurface|2|KO-BKO +multicurvez0|0|PolyhedralSurface|2|KO-BKO +multicurvez0|0|Triangle|2|KO-BKO +multicurvez0|0|Point|1|KO-BKO +multicurvez0|0|LineString|1|KO-BKO +multicurvez0|0|Polygon|1|KO-BKO +multicurvez0|0|MultiPoint|1|KO-BKO +multicurvez0|0|MultiLineString|1|KO-BKO +multicurvez0|0|MultiPolygon|1|KO-BKO +multicurvez0|0|GeometryCollection|1|KO-BKO +multicurvez0|0|CircularString|1|KO-BKO +multicurvez0|0|CompoundCurve|1|KO-BKO +multicurvez0|0|CurvePolygon|1|KO-BKO +multicurvez0|0|MultiCurve|1|KO-BKO +multicurvez0|0|MultiSurface|1|KO-BKO +multicurvez0|0|PolyhedralSurface|1|KO-BKO +multicurvez0|0|Triangle|1|KO-BKO +multicurvez0|0|Point|3|KO-BKO +multicurvez0|0|LineString|3|KO-BKO +multicurvez0|0|Polygon|3|KO-BKO +multicurvez0|0|MultiPoint|3|KO-BKO +multicurvez0|0|MultiLineString|3|KO-BKO +multicurvez0|0|MultiPolygon|3|KO-BKO +multicurvez0|0|GeometryCollection|3|KO-BKO +multicurvez0|0|CircularString|3|KO-BKO +multicurvez0|0|CompoundCurve|3|KO-BKO +multicurvez0|0|CurvePolygon|3|KO-BKO +multicurvez0|0|MultiCurve|3|KO-BKO +multicurvez0|0|MultiSurface|3|KO-BKO +multicurvez0|0|PolyhedralSurface|3|KO-BKO +multicurvez0|0|Triangle|3|KO-BKO +multicurvez0|4326|Point|0|KO-BKO +multicurvez0|4326|LineString|0|KO-BKO +multicurvez0|4326|Polygon|0|KO-BKO +multicurvez0|4326|MultiPoint|0|KO-BKO +multicurvez0|4326|MultiLineString|0|KO-BKO +multicurvez0|4326|MultiPolygon|0|KO-BKO +multicurvez0|4326|GeometryCollection|0|KO-BKO +multicurvez0|4326|CircularString|0|KO-BKO +multicurvez0|4326|CompoundCurve|0|KO-BKO +multicurvez0|4326|CurvePolygon|0|KO-BKO +multicurvez0|4326|MultiCurve|0|KO-BKO +multicurvez0|4326|MultiSurface|0|KO-BKO +multicurvez0|4326|PolyhedralSurface|0|KO-BKO +multicurvez0|4326|Triangle|0|KO-BKO +multicurvez0|4326|Tin|0|KO-BKO +multicurvez0|4326|Point|2|KO-BKO +multicurvez0|4326|LineString|2|KO-BKO +multicurvez0|4326|Polygon|2|KO-BKO +multicurvez0|4326|MultiPoint|2|KO-BKO +multicurvez0|4326|MultiLineString|2|KO-BKO +multicurvez0|4326|MultiPolygon|2|KO-BKO +multicurvez0|4326|GeometryCollection|2|KO-BKO +multicurvez0|4326|CircularString|2|KO-BKO +multicurvez0|4326|CompoundCurve|2|KO-BKO +multicurvez0|4326|CurvePolygon|2|KO-BKO +multicurvez0|4326|MultiCurve|2|OK-BOK +multicurvez0|4326|MultiSurface|2|KO-BKO +multicurvez0|4326|PolyhedralSurface|2|KO-BKO +multicurvez0|4326|Triangle|2|KO-BKO +multicurvez0|4326|Point|1|KO-BKO +multicurvez0|4326|LineString|1|KO-BKO +multicurvez0|4326|Polygon|1|KO-BKO +multicurvez0|4326|MultiPoint|1|KO-BKO +multicurvez0|4326|MultiLineString|1|KO-BKO +multicurvez0|4326|MultiPolygon|1|KO-BKO +multicurvez0|4326|GeometryCollection|1|KO-BKO +multicurvez0|4326|CircularString|1|KO-BKO +multicurvez0|4326|CompoundCurve|1|KO-BKO +multicurvez0|4326|CurvePolygon|1|KO-BKO +multicurvez0|4326|MultiCurve|1|KO-BKO +multicurvez0|4326|MultiSurface|1|KO-BKO +multicurvez0|4326|PolyhedralSurface|1|KO-BKO +multicurvez0|4326|Triangle|1|KO-BKO +multicurvez0|4326|Point|3|KO-BKO +multicurvez0|4326|LineString|3|KO-BKO +multicurvez0|4326|Polygon|3|KO-BKO +multicurvez0|4326|MultiPoint|3|KO-BKO +multicurvez0|4326|MultiLineString|3|KO-BKO +multicurvez0|4326|MultiPolygon|3|KO-BKO +multicurvez0|4326|GeometryCollection|3|KO-BKO +multicurvez0|4326|CircularString|3|KO-BKO +multicurvez0|4326|CompoundCurve|3|KO-BKO +multicurvez0|4326|CurvePolygon|3|KO-BKO +multicurvez0|4326|MultiCurve|3|KO-BKO +multicurvez0|4326|MultiSurface|3|KO-BKO +multicurvez0|4326|PolyhedralSurface|3|KO-BKO +multicurvez0|4326|Triangle|3|KO-BKO +multicurvez0||COUNT|4| +multicurvez4326|0|Point|0|KO-BKO +multicurvez4326|0|LineString|0|KO-BKO +multicurvez4326|0|Polygon|0|KO-BKO +multicurvez4326|0|MultiPoint|0|KO-BKO +multicurvez4326|0|MultiLineString|0|KO-BKO +multicurvez4326|0|MultiPolygon|0|KO-BKO +multicurvez4326|0|GeometryCollection|0|KO-BKO +multicurvez4326|0|CircularString|0|KO-BKO +multicurvez4326|0|CompoundCurve|0|KO-BKO +multicurvez4326|0|CurvePolygon|0|KO-BKO +multicurvez4326|0|MultiCurve|0|KO-BKO +multicurvez4326|0|MultiSurface|0|KO-BKO +multicurvez4326|0|PolyhedralSurface|0|KO-BKO +multicurvez4326|0|Triangle|0|KO-BKO +multicurvez4326|0|Tin|0|KO-BKO +multicurvez4326|0|Point|2|KO-BKO +multicurvez4326|0|LineString|2|KO-BKO +multicurvez4326|0|Polygon|2|KO-BKO +multicurvez4326|0|MultiPoint|2|KO-BKO +multicurvez4326|0|MultiLineString|2|KO-BKO +multicurvez4326|0|MultiPolygon|2|KO-BKO +multicurvez4326|0|GeometryCollection|2|KO-BKO +multicurvez4326|0|CircularString|2|KO-BKO +multicurvez4326|0|CompoundCurve|2|KO-BKO +multicurvez4326|0|CurvePolygon|2|KO-BKO +multicurvez4326|0|MultiCurve|2|KO-BKO +multicurvez4326|0|MultiSurface|2|KO-BKO +multicurvez4326|0|PolyhedralSurface|2|KO-BKO +multicurvez4326|0|Triangle|2|KO-BKO +multicurvez4326|0|Point|1|KO-BKO +multicurvez4326|0|LineString|1|KO-BKO +multicurvez4326|0|Polygon|1|KO-BKO +multicurvez4326|0|MultiPoint|1|KO-BKO +multicurvez4326|0|MultiLineString|1|KO-BKO +multicurvez4326|0|MultiPolygon|1|KO-BKO +multicurvez4326|0|GeometryCollection|1|KO-BKO +multicurvez4326|0|CircularString|1|KO-BKO +multicurvez4326|0|CompoundCurve|1|KO-BKO +multicurvez4326|0|CurvePolygon|1|KO-BKO +multicurvez4326|0|MultiCurve|1|KO-BKO +multicurvez4326|0|MultiSurface|1|KO-BKO +multicurvez4326|0|PolyhedralSurface|1|KO-BKO +multicurvez4326|0|Triangle|1|KO-BKO +multicurvez4326|0|Point|3|KO-BKO +multicurvez4326|0|LineString|3|KO-BKO +multicurvez4326|0|Polygon|3|KO-BKO +multicurvez4326|0|MultiPoint|3|KO-BKO +multicurvez4326|0|MultiLineString|3|KO-BKO +multicurvez4326|0|MultiPolygon|3|KO-BKO +multicurvez4326|0|GeometryCollection|3|KO-BKO +multicurvez4326|0|CircularString|3|KO-BKO +multicurvez4326|0|CompoundCurve|3|KO-BKO +multicurvez4326|0|CurvePolygon|3|KO-BKO +multicurvez4326|0|MultiCurve|3|KO-BKO +multicurvez4326|0|MultiSurface|3|KO-BKO +multicurvez4326|0|PolyhedralSurface|3|KO-BKO +multicurvez4326|0|Triangle|3|KO-BKO +multicurvez4326|4326|Point|0|KO-BKO +multicurvez4326|4326|LineString|0|KO-BKO +multicurvez4326|4326|Polygon|0|KO-BKO +multicurvez4326|4326|MultiPoint|0|KO-BKO +multicurvez4326|4326|MultiLineString|0|KO-BKO +multicurvez4326|4326|MultiPolygon|0|KO-BKO +multicurvez4326|4326|GeometryCollection|0|KO-BKO +multicurvez4326|4326|CircularString|0|KO-BKO +multicurvez4326|4326|CompoundCurve|0|KO-BKO +multicurvez4326|4326|CurvePolygon|0|KO-BKO +multicurvez4326|4326|MultiCurve|0|KO-BKO +multicurvez4326|4326|MultiSurface|0|KO-BKO +multicurvez4326|4326|PolyhedralSurface|0|KO-BKO +multicurvez4326|4326|Triangle|0|KO-BKO +multicurvez4326|4326|Tin|0|KO-BKO +multicurvez4326|4326|Point|2|KO-BKO +multicurvez4326|4326|LineString|2|KO-BKO +multicurvez4326|4326|Polygon|2|KO-BKO +multicurvez4326|4326|MultiPoint|2|KO-BKO +multicurvez4326|4326|MultiLineString|2|KO-BKO +multicurvez4326|4326|MultiPolygon|2|KO-BKO +multicurvez4326|4326|GeometryCollection|2|KO-BKO +multicurvez4326|4326|CircularString|2|KO-BKO +multicurvez4326|4326|CompoundCurve|2|KO-BKO +multicurvez4326|4326|CurvePolygon|2|KO-BKO +multicurvez4326|4326|MultiCurve|2|OK-BOK +multicurvez4326|4326|MultiSurface|2|KO-BKO +multicurvez4326|4326|PolyhedralSurface|2|KO-BKO +multicurvez4326|4326|Triangle|2|KO-BKO +multicurvez4326|4326|Point|1|KO-BKO +multicurvez4326|4326|LineString|1|KO-BKO +multicurvez4326|4326|Polygon|1|KO-BKO +multicurvez4326|4326|MultiPoint|1|KO-BKO +multicurvez4326|4326|MultiLineString|1|KO-BKO +multicurvez4326|4326|MultiPolygon|1|KO-BKO +multicurvez4326|4326|GeometryCollection|1|KO-BKO +multicurvez4326|4326|CircularString|1|KO-BKO +multicurvez4326|4326|CompoundCurve|1|KO-BKO +multicurvez4326|4326|CurvePolygon|1|KO-BKO +multicurvez4326|4326|MultiCurve|1|KO-BKO +multicurvez4326|4326|MultiSurface|1|KO-BKO +multicurvez4326|4326|PolyhedralSurface|1|KO-BKO +multicurvez4326|4326|Triangle|1|KO-BKO +multicurvez4326|4326|Point|3|KO-BKO +multicurvez4326|4326|LineString|3|KO-BKO +multicurvez4326|4326|Polygon|3|KO-BKO +multicurvez4326|4326|MultiPoint|3|KO-BKO +multicurvez4326|4326|MultiLineString|3|KO-BKO +multicurvez4326|4326|MultiPolygon|3|KO-BKO +multicurvez4326|4326|GeometryCollection|3|KO-BKO +multicurvez4326|4326|CircularString|3|KO-BKO +multicurvez4326|4326|CompoundCurve|3|KO-BKO +multicurvez4326|4326|CurvePolygon|3|KO-BKO +multicurvez4326|4326|MultiCurve|3|KO-BKO +multicurvez4326|4326|MultiSurface|3|KO-BKO +multicurvez4326|4326|PolyhedralSurface|3|KO-BKO +multicurvez4326|4326|Triangle|3|KO-BKO +multicurvez4326||COUNT|2| +multicurvezm|0|Point|0|KO-BKO +multicurvezm|0|LineString|0|KO-BKO +multicurvezm|0|Polygon|0|KO-BKO +multicurvezm|0|MultiPoint|0|KO-BKO +multicurvezm|0|MultiLineString|0|KO-BKO +multicurvezm|0|MultiPolygon|0|KO-BKO +multicurvezm|0|GeometryCollection|0|KO-BKO +multicurvezm|0|CircularString|0|KO-BKO +multicurvezm|0|CompoundCurve|0|KO-BKO +multicurvezm|0|CurvePolygon|0|KO-BKO +multicurvezm|0|MultiCurve|0|KO-BKO +multicurvezm|0|MultiSurface|0|KO-BKO +multicurvezm|0|PolyhedralSurface|0|KO-BKO +multicurvezm|0|Triangle|0|KO-BKO +multicurvezm|0|Tin|0|KO-BKO +multicurvezm|0|Point|2|KO-BKO +multicurvezm|0|LineString|2|KO-BKO +multicurvezm|0|Polygon|2|KO-BKO +multicurvezm|0|MultiPoint|2|KO-BKO +multicurvezm|0|MultiLineString|2|KO-BKO +multicurvezm|0|MultiPolygon|2|KO-BKO +multicurvezm|0|GeometryCollection|2|KO-BKO +multicurvezm|0|CircularString|2|KO-BKO +multicurvezm|0|CompoundCurve|2|KO-BKO +multicurvezm|0|CurvePolygon|2|KO-BKO +multicurvezm|0|MultiCurve|2|KO-BKO +multicurvezm|0|MultiSurface|2|KO-BKO +multicurvezm|0|PolyhedralSurface|2|KO-BKO +multicurvezm|0|Triangle|2|KO-BKO +multicurvezm|0|Point|1|KO-BKO +multicurvezm|0|LineString|1|KO-BKO +multicurvezm|0|Polygon|1|KO-BKO +multicurvezm|0|MultiPoint|1|KO-BKO +multicurvezm|0|MultiLineString|1|KO-BKO +multicurvezm|0|MultiPolygon|1|KO-BKO +multicurvezm|0|GeometryCollection|1|KO-BKO +multicurvezm|0|CircularString|1|KO-BKO +multicurvezm|0|CompoundCurve|1|KO-BKO +multicurvezm|0|CurvePolygon|1|KO-BKO +multicurvezm|0|MultiCurve|1|KO-BKO +multicurvezm|0|MultiSurface|1|KO-BKO +multicurvezm|0|PolyhedralSurface|1|KO-BKO +multicurvezm|0|Triangle|1|KO-BKO +multicurvezm|0|Point|3|KO-BKO +multicurvezm|0|LineString|3|KO-BKO +multicurvezm|0|Polygon|3|KO-BKO +multicurvezm|0|MultiPoint|3|KO-BKO +multicurvezm|0|MultiLineString|3|KO-BKO +multicurvezm|0|MultiPolygon|3|KO-BKO +multicurvezm|0|GeometryCollection|3|KO-BKO +multicurvezm|0|CircularString|3|KO-BKO +multicurvezm|0|CompoundCurve|3|KO-BKO +multicurvezm|0|CurvePolygon|3|KO-BKO +multicurvezm|0|MultiCurve|3|OK-BOK +multicurvezm|0|MultiSurface|3|KO-BKO +multicurvezm|0|PolyhedralSurface|3|KO-BKO +multicurvezm|0|Triangle|3|KO-BKO +multicurvezm|4326|Point|0|KO-BKO +multicurvezm|4326|LineString|0|KO-BKO +multicurvezm|4326|Polygon|0|KO-BKO +multicurvezm|4326|MultiPoint|0|KO-BKO +multicurvezm|4326|MultiLineString|0|KO-BKO +multicurvezm|4326|MultiPolygon|0|KO-BKO +multicurvezm|4326|GeometryCollection|0|KO-BKO +multicurvezm|4326|CircularString|0|KO-BKO +multicurvezm|4326|CompoundCurve|0|KO-BKO +multicurvezm|4326|CurvePolygon|0|KO-BKO +multicurvezm|4326|MultiCurve|0|KO-BKO +multicurvezm|4326|MultiSurface|0|KO-BKO +multicurvezm|4326|PolyhedralSurface|0|KO-BKO +multicurvezm|4326|Triangle|0|KO-BKO +multicurvezm|4326|Tin|0|KO-BKO +multicurvezm|4326|Point|2|KO-BKO +multicurvezm|4326|LineString|2|KO-BKO +multicurvezm|4326|Polygon|2|KO-BKO +multicurvezm|4326|MultiPoint|2|KO-BKO +multicurvezm|4326|MultiLineString|2|KO-BKO +multicurvezm|4326|MultiPolygon|2|KO-BKO +multicurvezm|4326|GeometryCollection|2|KO-BKO +multicurvezm|4326|CircularString|2|KO-BKO +multicurvezm|4326|CompoundCurve|2|KO-BKO +multicurvezm|4326|CurvePolygon|2|KO-BKO +multicurvezm|4326|MultiCurve|2|KO-BKO +multicurvezm|4326|MultiSurface|2|KO-BKO +multicurvezm|4326|PolyhedralSurface|2|KO-BKO +multicurvezm|4326|Triangle|2|KO-BKO +multicurvezm|4326|Point|1|KO-BKO +multicurvezm|4326|LineString|1|KO-BKO +multicurvezm|4326|Polygon|1|KO-BKO +multicurvezm|4326|MultiPoint|1|KO-BKO +multicurvezm|4326|MultiLineString|1|KO-BKO +multicurvezm|4326|MultiPolygon|1|KO-BKO +multicurvezm|4326|GeometryCollection|1|KO-BKO +multicurvezm|4326|CircularString|1|KO-BKO +multicurvezm|4326|CompoundCurve|1|KO-BKO +multicurvezm|4326|CurvePolygon|1|KO-BKO +multicurvezm|4326|MultiCurve|1|KO-BKO +multicurvezm|4326|MultiSurface|1|KO-BKO +multicurvezm|4326|PolyhedralSurface|1|KO-BKO +multicurvezm|4326|Triangle|1|KO-BKO +multicurvezm|4326|Point|3|KO-BKO +multicurvezm|4326|LineString|3|KO-BKO +multicurvezm|4326|Polygon|3|KO-BKO +multicurvezm|4326|MultiPoint|3|KO-BKO +multicurvezm|4326|MultiLineString|3|KO-BKO +multicurvezm|4326|MultiPolygon|3|KO-BKO +multicurvezm|4326|GeometryCollection|3|KO-BKO +multicurvezm|4326|CircularString|3|KO-BKO +multicurvezm|4326|CompoundCurve|3|KO-BKO +multicurvezm|4326|CurvePolygon|3|KO-BKO +multicurvezm|4326|MultiCurve|3|OK-BOK +multicurvezm|4326|MultiSurface|3|KO-BKO +multicurvezm|4326|PolyhedralSurface|3|KO-BKO +multicurvezm|4326|Triangle|3|KO-BKO +multicurvezm||COUNT|4| +multicurvezm0|0|Point|0|KO-BKO +multicurvezm0|0|LineString|0|KO-BKO +multicurvezm0|0|Polygon|0|KO-BKO +multicurvezm0|0|MultiPoint|0|KO-BKO +multicurvezm0|0|MultiLineString|0|KO-BKO +multicurvezm0|0|MultiPolygon|0|KO-BKO +multicurvezm0|0|GeometryCollection|0|KO-BKO +multicurvezm0|0|CircularString|0|KO-BKO +multicurvezm0|0|CompoundCurve|0|KO-BKO +multicurvezm0|0|CurvePolygon|0|KO-BKO +multicurvezm0|0|MultiCurve|0|KO-BKO +multicurvezm0|0|MultiSurface|0|KO-BKO +multicurvezm0|0|PolyhedralSurface|0|KO-BKO +multicurvezm0|0|Triangle|0|KO-BKO +multicurvezm0|0|Tin|0|KO-BKO +multicurvezm0|0|Point|2|KO-BKO +multicurvezm0|0|LineString|2|KO-BKO +multicurvezm0|0|Polygon|2|KO-BKO +multicurvezm0|0|MultiPoint|2|KO-BKO +multicurvezm0|0|MultiLineString|2|KO-BKO +multicurvezm0|0|MultiPolygon|2|KO-BKO +multicurvezm0|0|GeometryCollection|2|KO-BKO +multicurvezm0|0|CircularString|2|KO-BKO +multicurvezm0|0|CompoundCurve|2|KO-BKO +multicurvezm0|0|CurvePolygon|2|KO-BKO +multicurvezm0|0|MultiCurve|2|KO-BKO +multicurvezm0|0|MultiSurface|2|KO-BKO +multicurvezm0|0|PolyhedralSurface|2|KO-BKO +multicurvezm0|0|Triangle|2|KO-BKO +multicurvezm0|0|Point|1|KO-BKO +multicurvezm0|0|LineString|1|KO-BKO +multicurvezm0|0|Polygon|1|KO-BKO +multicurvezm0|0|MultiPoint|1|KO-BKO +multicurvezm0|0|MultiLineString|1|KO-BKO +multicurvezm0|0|MultiPolygon|1|KO-BKO +multicurvezm0|0|GeometryCollection|1|KO-BKO +multicurvezm0|0|CircularString|1|KO-BKO +multicurvezm0|0|CompoundCurve|1|KO-BKO +multicurvezm0|0|CurvePolygon|1|KO-BKO +multicurvezm0|0|MultiCurve|1|KO-BKO +multicurvezm0|0|MultiSurface|1|KO-BKO +multicurvezm0|0|PolyhedralSurface|1|KO-BKO +multicurvezm0|0|Triangle|1|KO-BKO +multicurvezm0|0|Point|3|KO-BKO +multicurvezm0|0|LineString|3|KO-BKO +multicurvezm0|0|Polygon|3|KO-BKO +multicurvezm0|0|MultiPoint|3|KO-BKO +multicurvezm0|0|MultiLineString|3|KO-BKO +multicurvezm0|0|MultiPolygon|3|KO-BKO +multicurvezm0|0|GeometryCollection|3|KO-BKO +multicurvezm0|0|CircularString|3|KO-BKO +multicurvezm0|0|CompoundCurve|3|KO-BKO +multicurvezm0|0|CurvePolygon|3|KO-BKO +multicurvezm0|0|MultiCurve|3|OK-BOK +multicurvezm0|0|MultiSurface|3|KO-BKO +multicurvezm0|0|PolyhedralSurface|3|KO-BKO +multicurvezm0|0|Triangle|3|KO-BKO +multicurvezm0|4326|Point|0|KO-BKO +multicurvezm0|4326|LineString|0|KO-BKO +multicurvezm0|4326|Polygon|0|KO-BKO +multicurvezm0|4326|MultiPoint|0|KO-BKO +multicurvezm0|4326|MultiLineString|0|KO-BKO +multicurvezm0|4326|MultiPolygon|0|KO-BKO +multicurvezm0|4326|GeometryCollection|0|KO-BKO +multicurvezm0|4326|CircularString|0|KO-BKO +multicurvezm0|4326|CompoundCurve|0|KO-BKO +multicurvezm0|4326|CurvePolygon|0|KO-BKO +multicurvezm0|4326|MultiCurve|0|KO-BKO +multicurvezm0|4326|MultiSurface|0|KO-BKO +multicurvezm0|4326|PolyhedralSurface|0|KO-BKO +multicurvezm0|4326|Triangle|0|KO-BKO +multicurvezm0|4326|Tin|0|KO-BKO +multicurvezm0|4326|Point|2|KO-BKO +multicurvezm0|4326|LineString|2|KO-BKO +multicurvezm0|4326|Polygon|2|KO-BKO +multicurvezm0|4326|MultiPoint|2|KO-BKO +multicurvezm0|4326|MultiLineString|2|KO-BKO +multicurvezm0|4326|MultiPolygon|2|KO-BKO +multicurvezm0|4326|GeometryCollection|2|KO-BKO +multicurvezm0|4326|CircularString|2|KO-BKO +multicurvezm0|4326|CompoundCurve|2|KO-BKO +multicurvezm0|4326|CurvePolygon|2|KO-BKO +multicurvezm0|4326|MultiCurve|2|KO-BKO +multicurvezm0|4326|MultiSurface|2|KO-BKO +multicurvezm0|4326|PolyhedralSurface|2|KO-BKO +multicurvezm0|4326|Triangle|2|KO-BKO +multicurvezm0|4326|Point|1|KO-BKO +multicurvezm0|4326|LineString|1|KO-BKO +multicurvezm0|4326|Polygon|1|KO-BKO +multicurvezm0|4326|MultiPoint|1|KO-BKO +multicurvezm0|4326|MultiLineString|1|KO-BKO +multicurvezm0|4326|MultiPolygon|1|KO-BKO +multicurvezm0|4326|GeometryCollection|1|KO-BKO +multicurvezm0|4326|CircularString|1|KO-BKO +multicurvezm0|4326|CompoundCurve|1|KO-BKO +multicurvezm0|4326|CurvePolygon|1|KO-BKO +multicurvezm0|4326|MultiCurve|1|KO-BKO +multicurvezm0|4326|MultiSurface|1|KO-BKO +multicurvezm0|4326|PolyhedralSurface|1|KO-BKO +multicurvezm0|4326|Triangle|1|KO-BKO +multicurvezm0|4326|Point|3|KO-BKO +multicurvezm0|4326|LineString|3|KO-BKO +multicurvezm0|4326|Polygon|3|KO-BKO +multicurvezm0|4326|MultiPoint|3|KO-BKO +multicurvezm0|4326|MultiLineString|3|KO-BKO +multicurvezm0|4326|MultiPolygon|3|KO-BKO +multicurvezm0|4326|GeometryCollection|3|KO-BKO +multicurvezm0|4326|CircularString|3|KO-BKO +multicurvezm0|4326|CompoundCurve|3|KO-BKO +multicurvezm0|4326|CurvePolygon|3|KO-BKO +multicurvezm0|4326|MultiCurve|3|OK-BOK +multicurvezm0|4326|MultiSurface|3|KO-BKO +multicurvezm0|4326|PolyhedralSurface|3|KO-BKO +multicurvezm0|4326|Triangle|3|KO-BKO +multicurvezm0||COUNT|4| +multicurvezm4326|0|Point|0|KO-BKO +multicurvezm4326|0|LineString|0|KO-BKO +multicurvezm4326|0|Polygon|0|KO-BKO +multicurvezm4326|0|MultiPoint|0|KO-BKO +multicurvezm4326|0|MultiLineString|0|KO-BKO +multicurvezm4326|0|MultiPolygon|0|KO-BKO +multicurvezm4326|0|GeometryCollection|0|KO-BKO +multicurvezm4326|0|CircularString|0|KO-BKO +multicurvezm4326|0|CompoundCurve|0|KO-BKO +multicurvezm4326|0|CurvePolygon|0|KO-BKO +multicurvezm4326|0|MultiCurve|0|KO-BKO +multicurvezm4326|0|MultiSurface|0|KO-BKO +multicurvezm4326|0|PolyhedralSurface|0|KO-BKO +multicurvezm4326|0|Triangle|0|KO-BKO +multicurvezm4326|0|Tin|0|KO-BKO +multicurvezm4326|0|Point|2|KO-BKO +multicurvezm4326|0|LineString|2|KO-BKO +multicurvezm4326|0|Polygon|2|KO-BKO +multicurvezm4326|0|MultiPoint|2|KO-BKO +multicurvezm4326|0|MultiLineString|2|KO-BKO +multicurvezm4326|0|MultiPolygon|2|KO-BKO +multicurvezm4326|0|GeometryCollection|2|KO-BKO +multicurvezm4326|0|CircularString|2|KO-BKO +multicurvezm4326|0|CompoundCurve|2|KO-BKO +multicurvezm4326|0|CurvePolygon|2|KO-BKO +multicurvezm4326|0|MultiCurve|2|KO-BKO +multicurvezm4326|0|MultiSurface|2|KO-BKO +multicurvezm4326|0|PolyhedralSurface|2|KO-BKO +multicurvezm4326|0|Triangle|2|KO-BKO +multicurvezm4326|0|Point|1|KO-BKO +multicurvezm4326|0|LineString|1|KO-BKO +multicurvezm4326|0|Polygon|1|KO-BKO +multicurvezm4326|0|MultiPoint|1|KO-BKO +multicurvezm4326|0|MultiLineString|1|KO-BKO +multicurvezm4326|0|MultiPolygon|1|KO-BKO +multicurvezm4326|0|GeometryCollection|1|KO-BKO +multicurvezm4326|0|CircularString|1|KO-BKO +multicurvezm4326|0|CompoundCurve|1|KO-BKO +multicurvezm4326|0|CurvePolygon|1|KO-BKO +multicurvezm4326|0|MultiCurve|1|KO-BKO +multicurvezm4326|0|MultiSurface|1|KO-BKO +multicurvezm4326|0|PolyhedralSurface|1|KO-BKO +multicurvezm4326|0|Triangle|1|KO-BKO +multicurvezm4326|0|Point|3|KO-BKO +multicurvezm4326|0|LineString|3|KO-BKO +multicurvezm4326|0|Polygon|3|KO-BKO +multicurvezm4326|0|MultiPoint|3|KO-BKO +multicurvezm4326|0|MultiLineString|3|KO-BKO +multicurvezm4326|0|MultiPolygon|3|KO-BKO +multicurvezm4326|0|GeometryCollection|3|KO-BKO +multicurvezm4326|0|CircularString|3|KO-BKO +multicurvezm4326|0|CompoundCurve|3|KO-BKO +multicurvezm4326|0|CurvePolygon|3|KO-BKO +multicurvezm4326|0|MultiCurve|3|KO-BKO +multicurvezm4326|0|MultiSurface|3|KO-BKO +multicurvezm4326|0|PolyhedralSurface|3|KO-BKO +multicurvezm4326|0|Triangle|3|KO-BKO +multicurvezm4326|4326|Point|0|KO-BKO +multicurvezm4326|4326|LineString|0|KO-BKO +multicurvezm4326|4326|Polygon|0|KO-BKO +multicurvezm4326|4326|MultiPoint|0|KO-BKO +multicurvezm4326|4326|MultiLineString|0|KO-BKO +multicurvezm4326|4326|MultiPolygon|0|KO-BKO +multicurvezm4326|4326|GeometryCollection|0|KO-BKO +multicurvezm4326|4326|CircularString|0|KO-BKO +multicurvezm4326|4326|CompoundCurve|0|KO-BKO +multicurvezm4326|4326|CurvePolygon|0|KO-BKO +multicurvezm4326|4326|MultiCurve|0|KO-BKO +multicurvezm4326|4326|MultiSurface|0|KO-BKO +multicurvezm4326|4326|PolyhedralSurface|0|KO-BKO +multicurvezm4326|4326|Triangle|0|KO-BKO +multicurvezm4326|4326|Tin|0|KO-BKO +multicurvezm4326|4326|Point|2|KO-BKO +multicurvezm4326|4326|LineString|2|KO-BKO +multicurvezm4326|4326|Polygon|2|KO-BKO +multicurvezm4326|4326|MultiPoint|2|KO-BKO +multicurvezm4326|4326|MultiLineString|2|KO-BKO +multicurvezm4326|4326|MultiPolygon|2|KO-BKO +multicurvezm4326|4326|GeometryCollection|2|KO-BKO +multicurvezm4326|4326|CircularString|2|KO-BKO +multicurvezm4326|4326|CompoundCurve|2|KO-BKO +multicurvezm4326|4326|CurvePolygon|2|KO-BKO +multicurvezm4326|4326|MultiCurve|2|KO-BKO +multicurvezm4326|4326|MultiSurface|2|KO-BKO +multicurvezm4326|4326|PolyhedralSurface|2|KO-BKO +multicurvezm4326|4326|Triangle|2|KO-BKO +multicurvezm4326|4326|Point|1|KO-BKO +multicurvezm4326|4326|LineString|1|KO-BKO +multicurvezm4326|4326|Polygon|1|KO-BKO +multicurvezm4326|4326|MultiPoint|1|KO-BKO +multicurvezm4326|4326|MultiLineString|1|KO-BKO +multicurvezm4326|4326|MultiPolygon|1|KO-BKO +multicurvezm4326|4326|GeometryCollection|1|KO-BKO +multicurvezm4326|4326|CircularString|1|KO-BKO +multicurvezm4326|4326|CompoundCurve|1|KO-BKO +multicurvezm4326|4326|CurvePolygon|1|KO-BKO +multicurvezm4326|4326|MultiCurve|1|KO-BKO +multicurvezm4326|4326|MultiSurface|1|KO-BKO +multicurvezm4326|4326|PolyhedralSurface|1|KO-BKO +multicurvezm4326|4326|Triangle|1|KO-BKO +multicurvezm4326|4326|Point|3|KO-BKO +multicurvezm4326|4326|LineString|3|KO-BKO +multicurvezm4326|4326|Polygon|3|KO-BKO +multicurvezm4326|4326|MultiPoint|3|KO-BKO +multicurvezm4326|4326|MultiLineString|3|KO-BKO +multicurvezm4326|4326|MultiPolygon|3|KO-BKO +multicurvezm4326|4326|GeometryCollection|3|KO-BKO +multicurvezm4326|4326|CircularString|3|KO-BKO +multicurvezm4326|4326|CompoundCurve|3|KO-BKO +multicurvezm4326|4326|CurvePolygon|3|KO-BKO +multicurvezm4326|4326|MultiCurve|3|OK-BOK +multicurvezm4326|4326|MultiSurface|3|KO-BKO +multicurvezm4326|4326|PolyhedralSurface|3|KO-BKO +multicurvezm4326|4326|Triangle|3|KO-BKO +multicurvezm4326||COUNT|2| +multilinestring|0|Point|0|KO-BKO-GKO:-BGKO +multilinestring|0|LineString|0|KO-BKO-GKO:-BGKO +multilinestring|0|Polygon|0|KO-BKO-GKO:-BGKO +multilinestring|0|MultiPoint|0|KO-BKO-GKO:-BGKO +multilinestring|0|MultiLineString|0|OK-BOK-GOK-BGOK +multilinestring|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +multilinestring|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +multilinestring|0|CircularString|0|KO-BKO-GKO:-BGKO +multilinestring|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +multilinestring|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +multilinestring|0|MultiCurve|0|KO-BKO-GKO:-BGKO +multilinestring|0|MultiSurface|0|KO-BKO-GKO:-BGKO +multilinestring|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multilinestring|0|Triangle|0|KO-BKO-GKO:-BGKO +multilinestring|0|Tin|0|KO-BKO-GKO:-BGKO +multilinestring|0|Point|2|KO-BKO-GKO:-BGKO +multilinestring|0|LineString|2|KO-BKO-GKO:-BGKO +multilinestring|0|Polygon|2|KO-BKO-GKO:-BGKO +multilinestring|0|MultiPoint|2|KO-BKO-GKO:-BGKO +multilinestring|0|MultiLineString|2|KO-BKO-GKO:-BGKO +multilinestring|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +multilinestring|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +multilinestring|0|CircularString|2|KO-BKO-GKO:-BGKO +multilinestring|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +multilinestring|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +multilinestring|0|MultiCurve|2|KO-BKO-GKO:-BGKO +multilinestring|0|MultiSurface|2|KO-BKO-GKO:-BGKO +multilinestring|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multilinestring|0|Triangle|2|KO-BKO-GKO:-BGKO +multilinestring|0|Point|1|KO-BKO-GKO:-BGKO +multilinestring|0|LineString|1|KO-BKO-GKO:-BGKO +multilinestring|0|Polygon|1|KO-BKO-GKO:-BGKO +multilinestring|0|MultiPoint|1|KO-BKO-GKO:-BGKO +multilinestring|0|MultiLineString|1|KO-BKO-GKO:-BGKO +multilinestring|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +multilinestring|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +multilinestring|0|CircularString|1|KO-BKO-GKO:-BGKO +multilinestring|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +multilinestring|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +multilinestring|0|MultiCurve|1|KO-BKO-GKO:-BGKO +multilinestring|0|MultiSurface|1|KO-BKO-GKO:-BGKO +multilinestring|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multilinestring|0|Triangle|1|KO-BKO-GKO:-BGKO +multilinestring|0|Point|3|KO-BKO-GKO:-BGKO +multilinestring|0|LineString|3|KO-BKO-GKO:-BGKO +multilinestring|0|Polygon|3|KO-BKO-GKO:-BGKO +multilinestring|0|MultiPoint|3|KO-BKO-GKO:-BGKO +multilinestring|0|MultiLineString|3|KO-BKO-GKO:-BGKO +multilinestring|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +multilinestring|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +multilinestring|0|CircularString|3|KO-BKO-GKO:-BGKO +multilinestring|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +multilinestring|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +multilinestring|0|MultiCurve|3|KO-BKO-GKO:-BGKO +multilinestring|0|MultiSurface|3|KO-BKO-GKO:-BGKO +multilinestring|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multilinestring|0|Triangle|3|KO-BKO-GKO:-BGKO +multilinestring|4326|Point|0|KO-BKO-GKO:-BGKO +multilinestring|4326|LineString|0|KO-BKO-GKO:-BGKO +multilinestring|4326|Polygon|0|KO-BKO-GKO:-BGKO +multilinestring|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +multilinestring|4326|MultiLineString|0|OK-BOK-GOK-BGOK +multilinestring|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +multilinestring|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +multilinestring|4326|CircularString|0|KO-BKO-GKO:-BGKO +multilinestring|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +multilinestring|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +multilinestring|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +multilinestring|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +multilinestring|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multilinestring|4326|Triangle|0|KO-BKO-GKO:-BGKO +multilinestring|4326|Tin|0|KO-BKO-GKO:-BGKO +multilinestring|4326|Point|2|KO-BKO-GKO:-BGKO +multilinestring|4326|LineString|2|KO-BKO-GKO:-BGKO +multilinestring|4326|Polygon|2|KO-BKO-GKO:-BGKO +multilinestring|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +multilinestring|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +multilinestring|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +multilinestring|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +multilinestring|4326|CircularString|2|KO-BKO-GKO:-BGKO +multilinestring|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +multilinestring|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +multilinestring|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +multilinestring|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +multilinestring|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multilinestring|4326|Triangle|2|KO-BKO-GKO:-BGKO +multilinestring|4326|Point|1|KO-BKO-GKO:-BGKO +multilinestring|4326|LineString|1|KO-BKO-GKO:-BGKO +multilinestring|4326|Polygon|1|KO-BKO-GKO:-BGKO +multilinestring|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +multilinestring|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +multilinestring|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +multilinestring|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +multilinestring|4326|CircularString|1|KO-BKO-GKO:-BGKO +multilinestring|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +multilinestring|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +multilinestring|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +multilinestring|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +multilinestring|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multilinestring|4326|Triangle|1|KO-BKO-GKO:-BGKO +multilinestring|4326|Point|3|KO-BKO-GKO:-BGKO +multilinestring|4326|LineString|3|KO-BKO-GKO:-BGKO +multilinestring|4326|Polygon|3|KO-BKO-GKO:-BGKO +multilinestring|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +multilinestring|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +multilinestring|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +multilinestring|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +multilinestring|4326|CircularString|3|KO-BKO-GKO:-BGKO +multilinestring|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +multilinestring|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +multilinestring|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +multilinestring|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +multilinestring|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multilinestring|4326|Triangle|3|KO-BKO-GKO:-BGKO +multilinestring||COUNT|4| +multilinestring||GCOUNT|4| +multilinestring0|0|Point|0|KO-BKO-GKO:-BGKO +multilinestring0|0|LineString|0|KO-BKO-GKO:-BGKO +multilinestring0|0|Polygon|0|KO-BKO-GKO:-BGKO +multilinestring0|0|MultiPoint|0|KO-BKO-GKO:-BGKO +multilinestring0|0|MultiLineString|0|OK-BOK-GOK-BGOK +multilinestring0|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +multilinestring0|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +multilinestring0|0|CircularString|0|KO-BKO-GKO:-BGKO +multilinestring0|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +multilinestring0|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +multilinestring0|0|MultiCurve|0|KO-BKO-GKO:-BGKO +multilinestring0|0|MultiSurface|0|KO-BKO-GKO:-BGKO +multilinestring0|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multilinestring0|0|Triangle|0|KO-BKO-GKO:-BGKO +multilinestring0|0|Tin|0|KO-BKO-GKO:-BGKO +multilinestring0|0|Point|2|KO-BKO-GKO:-BGKO +multilinestring0|0|LineString|2|KO-BKO-GKO:-BGKO +multilinestring0|0|Polygon|2|KO-BKO-GKO:-BGKO +multilinestring0|0|MultiPoint|2|KO-BKO-GKO:-BGKO +multilinestring0|0|MultiLineString|2|KO-BKO-GKO:-BGKO +multilinestring0|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +multilinestring0|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +multilinestring0|0|CircularString|2|KO-BKO-GKO:-BGKO +multilinestring0|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +multilinestring0|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +multilinestring0|0|MultiCurve|2|KO-BKO-GKO:-BGKO +multilinestring0|0|MultiSurface|2|KO-BKO-GKO:-BGKO +multilinestring0|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multilinestring0|0|Triangle|2|KO-BKO-GKO:-BGKO +multilinestring0|0|Point|1|KO-BKO-GKO:-BGKO +multilinestring0|0|LineString|1|KO-BKO-GKO:-BGKO +multilinestring0|0|Polygon|1|KO-BKO-GKO:-BGKO +multilinestring0|0|MultiPoint|1|KO-BKO-GKO:-BGKO +multilinestring0|0|MultiLineString|1|KO-BKO-GKO:-BGKO +multilinestring0|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +multilinestring0|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +multilinestring0|0|CircularString|1|KO-BKO-GKO:-BGKO +multilinestring0|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +multilinestring0|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +multilinestring0|0|MultiCurve|1|KO-BKO-GKO:-BGKO +multilinestring0|0|MultiSurface|1|KO-BKO-GKO:-BGKO +multilinestring0|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multilinestring0|0|Triangle|1|KO-BKO-GKO:-BGKO +multilinestring0|0|Point|3|KO-BKO-GKO:-BGKO +multilinestring0|0|LineString|3|KO-BKO-GKO:-BGKO +multilinestring0|0|Polygon|3|KO-BKO-GKO:-BGKO +multilinestring0|0|MultiPoint|3|KO-BKO-GKO:-BGKO +multilinestring0|0|MultiLineString|3|KO-BKO-GKO:-BGKO +multilinestring0|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +multilinestring0|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +multilinestring0|0|CircularString|3|KO-BKO-GKO:-BGKO +multilinestring0|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +multilinestring0|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +multilinestring0|0|MultiCurve|3|KO-BKO-GKO:-BGKO +multilinestring0|0|MultiSurface|3|KO-BKO-GKO:-BGKO +multilinestring0|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multilinestring0|0|Triangle|3|KO-BKO-GKO:-BGKO +multilinestring0|4326|Point|0|KO-BKO-GKO:-BGKO +multilinestring0|4326|LineString|0|KO-BKO-GKO:-BGKO +multilinestring0|4326|Polygon|0|KO-BKO-GKO:-BGKO +multilinestring0|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +multilinestring0|4326|MultiLineString|0|OK-BOK-GOK-BGOK +multilinestring0|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +multilinestring0|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +multilinestring0|4326|CircularString|0|KO-BKO-GKO:-BGKO +multilinestring0|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +multilinestring0|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +multilinestring0|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +multilinestring0|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +multilinestring0|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multilinestring0|4326|Triangle|0|KO-BKO-GKO:-BGKO +multilinestring0|4326|Tin|0|KO-BKO-GKO:-BGKO +multilinestring0|4326|Point|2|KO-BKO-GKO:-BGKO +multilinestring0|4326|LineString|2|KO-BKO-GKO:-BGKO +multilinestring0|4326|Polygon|2|KO-BKO-GKO:-BGKO +multilinestring0|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +multilinestring0|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +multilinestring0|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +multilinestring0|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +multilinestring0|4326|CircularString|2|KO-BKO-GKO:-BGKO +multilinestring0|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +multilinestring0|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +multilinestring0|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +multilinestring0|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +multilinestring0|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multilinestring0|4326|Triangle|2|KO-BKO-GKO:-BGKO +multilinestring0|4326|Point|1|KO-BKO-GKO:-BGKO +multilinestring0|4326|LineString|1|KO-BKO-GKO:-BGKO +multilinestring0|4326|Polygon|1|KO-BKO-GKO:-BGKO +multilinestring0|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +multilinestring0|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +multilinestring0|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +multilinestring0|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +multilinestring0|4326|CircularString|1|KO-BKO-GKO:-BGKO +multilinestring0|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +multilinestring0|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +multilinestring0|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +multilinestring0|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +multilinestring0|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multilinestring0|4326|Triangle|1|KO-BKO-GKO:-BGKO +multilinestring0|4326|Point|3|KO-BKO-GKO:-BGKO +multilinestring0|4326|LineString|3|KO-BKO-GKO:-BGKO +multilinestring0|4326|Polygon|3|KO-BKO-GKO:-BGKO +multilinestring0|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +multilinestring0|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +multilinestring0|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +multilinestring0|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +multilinestring0|4326|CircularString|3|KO-BKO-GKO:-BGKO +multilinestring0|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +multilinestring0|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +multilinestring0|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +multilinestring0|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +multilinestring0|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multilinestring0|4326|Triangle|3|KO-BKO-GKO:-BGKO +multilinestring0||COUNT|4| +multilinestring0||GCOUNT|4| +multilinestring4326|0|Point|0|KO-BKO-GKO:-BGKO +multilinestring4326|0|LineString|0|KO-BKO-GKO:-BGKO +multilinestring4326|0|Polygon|0|KO-BKO-GKO:-BGKO +multilinestring4326|0|MultiPoint|0|KO-BKO-GKO:-BGKO +multilinestring4326|0|MultiLineString|0|KO-BKO-GOK-BGOK +multilinestring4326|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +multilinestring4326|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +multilinestring4326|0|CircularString|0|KO-BKO-GKO:-BGKO +multilinestring4326|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +multilinestring4326|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +multilinestring4326|0|MultiCurve|0|KO-BKO-GKO:-BGKO +multilinestring4326|0|MultiSurface|0|KO-BKO-GKO:-BGKO +multilinestring4326|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multilinestring4326|0|Triangle|0|KO-BKO-GKO:-BGKO +multilinestring4326|0|Tin|0|KO-BKO-GKO:-BGKO +multilinestring4326|0|Point|2|KO-BKO-GKO:-BGKO +multilinestring4326|0|LineString|2|KO-BKO-GKO:-BGKO +multilinestring4326|0|Polygon|2|KO-BKO-GKO:-BGKO +multilinestring4326|0|MultiPoint|2|KO-BKO-GKO:-BGKO +multilinestring4326|0|MultiLineString|2|KO-BKO-GKO:-BGKO +multilinestring4326|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +multilinestring4326|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +multilinestring4326|0|CircularString|2|KO-BKO-GKO:-BGKO +multilinestring4326|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +multilinestring4326|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +multilinestring4326|0|MultiCurve|2|KO-BKO-GKO:-BGKO +multilinestring4326|0|MultiSurface|2|KO-BKO-GKO:-BGKO +multilinestring4326|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multilinestring4326|0|Triangle|2|KO-BKO-GKO:-BGKO +multilinestring4326|0|Point|1|KO-BKO-GKO:-BGKO +multilinestring4326|0|LineString|1|KO-BKO-GKO:-BGKO +multilinestring4326|0|Polygon|1|KO-BKO-GKO:-BGKO +multilinestring4326|0|MultiPoint|1|KO-BKO-GKO:-BGKO +multilinestring4326|0|MultiLineString|1|KO-BKO-GKO:-BGKO +multilinestring4326|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +multilinestring4326|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +multilinestring4326|0|CircularString|1|KO-BKO-GKO:-BGKO +multilinestring4326|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +multilinestring4326|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +multilinestring4326|0|MultiCurve|1|KO-BKO-GKO:-BGKO +multilinestring4326|0|MultiSurface|1|KO-BKO-GKO:-BGKO +multilinestring4326|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multilinestring4326|0|Triangle|1|KO-BKO-GKO:-BGKO +multilinestring4326|0|Point|3|KO-BKO-GKO:-BGKO +multilinestring4326|0|LineString|3|KO-BKO-GKO:-BGKO +multilinestring4326|0|Polygon|3|KO-BKO-GKO:-BGKO +multilinestring4326|0|MultiPoint|3|KO-BKO-GKO:-BGKO +multilinestring4326|0|MultiLineString|3|KO-BKO-GKO:-BGKO +multilinestring4326|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +multilinestring4326|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +multilinestring4326|0|CircularString|3|KO-BKO-GKO:-BGKO +multilinestring4326|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +multilinestring4326|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +multilinestring4326|0|MultiCurve|3|KO-BKO-GKO:-BGKO +multilinestring4326|0|MultiSurface|3|KO-BKO-GKO:-BGKO +multilinestring4326|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multilinestring4326|0|Triangle|3|KO-BKO-GKO:-BGKO +multilinestring4326|4326|Point|0|KO-BKO-GKO:-BGKO +multilinestring4326|4326|LineString|0|KO-BKO-GKO:-BGKO +multilinestring4326|4326|Polygon|0|KO-BKO-GKO:-BGKO +multilinestring4326|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +multilinestring4326|4326|MultiLineString|0|OK-BOK-GOK-BGOK +multilinestring4326|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +multilinestring4326|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +multilinestring4326|4326|CircularString|0|KO-BKO-GKO:-BGKO +multilinestring4326|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +multilinestring4326|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +multilinestring4326|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +multilinestring4326|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +multilinestring4326|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multilinestring4326|4326|Triangle|0|KO-BKO-GKO:-BGKO +multilinestring4326|4326|Tin|0|KO-BKO-GKO:-BGKO +multilinestring4326|4326|Point|2|KO-BKO-GKO:-BGKO +multilinestring4326|4326|LineString|2|KO-BKO-GKO:-BGKO +multilinestring4326|4326|Polygon|2|KO-BKO-GKO:-BGKO +multilinestring4326|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +multilinestring4326|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +multilinestring4326|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +multilinestring4326|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +multilinestring4326|4326|CircularString|2|KO-BKO-GKO:-BGKO +multilinestring4326|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +multilinestring4326|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +multilinestring4326|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +multilinestring4326|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +multilinestring4326|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multilinestring4326|4326|Triangle|2|KO-BKO-GKO:-BGKO +multilinestring4326|4326|Point|1|KO-BKO-GKO:-BGKO +multilinestring4326|4326|LineString|1|KO-BKO-GKO:-BGKO +multilinestring4326|4326|Polygon|1|KO-BKO-GKO:-BGKO +multilinestring4326|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +multilinestring4326|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +multilinestring4326|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +multilinestring4326|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +multilinestring4326|4326|CircularString|1|KO-BKO-GKO:-BGKO +multilinestring4326|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +multilinestring4326|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +multilinestring4326|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +multilinestring4326|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +multilinestring4326|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multilinestring4326|4326|Triangle|1|KO-BKO-GKO:-BGKO +multilinestring4326|4326|Point|3|KO-BKO-GKO:-BGKO +multilinestring4326|4326|LineString|3|KO-BKO-GKO:-BGKO +multilinestring4326|4326|Polygon|3|KO-BKO-GKO:-BGKO +multilinestring4326|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +multilinestring4326|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +multilinestring4326|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +multilinestring4326|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +multilinestring4326|4326|CircularString|3|KO-BKO-GKO:-BGKO +multilinestring4326|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +multilinestring4326|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +multilinestring4326|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +multilinestring4326|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +multilinestring4326|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multilinestring4326|4326|Triangle|3|KO-BKO-GKO:-BGKO +multilinestring4326||COUNT|2| +multilinestring4326||GCOUNT|4| +multilinestringm|0|Point|0|KO-BKO-GKO:-BGKO +multilinestringm|0|LineString|0|KO-BKO-GKO:-BGKO +multilinestringm|0|Polygon|0|KO-BKO-GKO:-BGKO +multilinestringm|0|MultiPoint|0|KO-BKO-GKO:-BGKO +multilinestringm|0|MultiLineString|0|KO-BKO-GKO:-BGKO +multilinestringm|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +multilinestringm|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +multilinestringm|0|CircularString|0|KO-BKO-GKO:-BGKO +multilinestringm|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +multilinestringm|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +multilinestringm|0|MultiCurve|0|KO-BKO-GKO:-BGKO +multilinestringm|0|MultiSurface|0|KO-BKO-GKO:-BGKO +multilinestringm|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multilinestringm|0|Triangle|0|KO-BKO-GKO:-BGKO +multilinestringm|0|Tin|0|KO-BKO-GKO:-BGKO +multilinestringm|0|Point|2|KO-BKO-GKO:-BGKO +multilinestringm|0|LineString|2|KO-BKO-GKO:-BGKO +multilinestringm|0|Polygon|2|KO-BKO-GKO:-BGKO +multilinestringm|0|MultiPoint|2|KO-BKO-GKO:-BGKO +multilinestringm|0|MultiLineString|2|KO-BKO-GKO:-BGKO +multilinestringm|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +multilinestringm|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +multilinestringm|0|CircularString|2|KO-BKO-GKO:-BGKO +multilinestringm|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +multilinestringm|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +multilinestringm|0|MultiCurve|2|KO-BKO-GKO:-BGKO +multilinestringm|0|MultiSurface|2|KO-BKO-GKO:-BGKO +multilinestringm|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multilinestringm|0|Triangle|2|KO-BKO-GKO:-BGKO +multilinestringm|0|Point|1|KO-BKO-GKO:-BGKO +multilinestringm|0|LineString|1|KO-BKO-GKO:-BGKO +multilinestringm|0|Polygon|1|KO-BKO-GKO:-BGKO +multilinestringm|0|MultiPoint|1|KO-BKO-GKO:-BGKO +multilinestringm|0|MultiLineString|1|OK-BOK-GOK-BGOK +multilinestringm|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +multilinestringm|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +multilinestringm|0|CircularString|1|KO-BKO-GKO:-BGKO +multilinestringm|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +multilinestringm|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +multilinestringm|0|MultiCurve|1|KO-BKO-GKO:-BGKO +multilinestringm|0|MultiSurface|1|KO-BKO-GKO:-BGKO +multilinestringm|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multilinestringm|0|Triangle|1|KO-BKO-GKO:-BGKO +multilinestringm|0|Point|3|KO-BKO-GKO:-BGKO +multilinestringm|0|LineString|3|KO-BKO-GKO:-BGKO +multilinestringm|0|Polygon|3|KO-BKO-GKO:-BGKO +multilinestringm|0|MultiPoint|3|KO-BKO-GKO:-BGKO +multilinestringm|0|MultiLineString|3|KO-BKO-GKO:-BGKO +multilinestringm|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +multilinestringm|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +multilinestringm|0|CircularString|3|KO-BKO-GKO:-BGKO +multilinestringm|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +multilinestringm|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +multilinestringm|0|MultiCurve|3|KO-BKO-GKO:-BGKO +multilinestringm|0|MultiSurface|3|KO-BKO-GKO:-BGKO +multilinestringm|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multilinestringm|0|Triangle|3|KO-BKO-GKO:-BGKO +multilinestringm|4326|Point|0|KO-BKO-GKO:-BGKO +multilinestringm|4326|LineString|0|KO-BKO-GKO:-BGKO +multilinestringm|4326|Polygon|0|KO-BKO-GKO:-BGKO +multilinestringm|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +multilinestringm|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +multilinestringm|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +multilinestringm|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +multilinestringm|4326|CircularString|0|KO-BKO-GKO:-BGKO +multilinestringm|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +multilinestringm|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +multilinestringm|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +multilinestringm|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +multilinestringm|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multilinestringm|4326|Triangle|0|KO-BKO-GKO:-BGKO +multilinestringm|4326|Tin|0|KO-BKO-GKO:-BGKO +multilinestringm|4326|Point|2|KO-BKO-GKO:-BGKO +multilinestringm|4326|LineString|2|KO-BKO-GKO:-BGKO +multilinestringm|4326|Polygon|2|KO-BKO-GKO:-BGKO +multilinestringm|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +multilinestringm|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +multilinestringm|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +multilinestringm|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +multilinestringm|4326|CircularString|2|KO-BKO-GKO:-BGKO +multilinestringm|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +multilinestringm|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +multilinestringm|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +multilinestringm|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +multilinestringm|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multilinestringm|4326|Triangle|2|KO-BKO-GKO:-BGKO +multilinestringm|4326|Point|1|KO-BKO-GKO:-BGKO +multilinestringm|4326|LineString|1|KO-BKO-GKO:-BGKO +multilinestringm|4326|Polygon|1|KO-BKO-GKO:-BGKO +multilinestringm|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +multilinestringm|4326|MultiLineString|1|OK-BOK-GOK-BGOK +multilinestringm|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +multilinestringm|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +multilinestringm|4326|CircularString|1|KO-BKO-GKO:-BGKO +multilinestringm|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +multilinestringm|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +multilinestringm|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +multilinestringm|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +multilinestringm|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multilinestringm|4326|Triangle|1|KO-BKO-GKO:-BGKO +multilinestringm|4326|Point|3|KO-BKO-GKO:-BGKO +multilinestringm|4326|LineString|3|KO-BKO-GKO:-BGKO +multilinestringm|4326|Polygon|3|KO-BKO-GKO:-BGKO +multilinestringm|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +multilinestringm|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +multilinestringm|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +multilinestringm|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +multilinestringm|4326|CircularString|3|KO-BKO-GKO:-BGKO +multilinestringm|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +multilinestringm|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +multilinestringm|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +multilinestringm|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +multilinestringm|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multilinestringm|4326|Triangle|3|KO-BKO-GKO:-BGKO +multilinestringm||COUNT|4| +multilinestringm||GCOUNT|4| +multilinestringm0|0|Point|0|KO-BKO-GKO:-BGKO +multilinestringm0|0|LineString|0|KO-BKO-GKO:-BGKO +multilinestringm0|0|Polygon|0|KO-BKO-GKO:-BGKO +multilinestringm0|0|MultiPoint|0|KO-BKO-GKO:-BGKO +multilinestringm0|0|MultiLineString|0|KO-BKO-GKO:-BGKO +multilinestringm0|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +multilinestringm0|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +multilinestringm0|0|CircularString|0|KO-BKO-GKO:-BGKO +multilinestringm0|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +multilinestringm0|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +multilinestringm0|0|MultiCurve|0|KO-BKO-GKO:-BGKO +multilinestringm0|0|MultiSurface|0|KO-BKO-GKO:-BGKO +multilinestringm0|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multilinestringm0|0|Triangle|0|KO-BKO-GKO:-BGKO +multilinestringm0|0|Tin|0|KO-BKO-GKO:-BGKO +multilinestringm0|0|Point|2|KO-BKO-GKO:-BGKO +multilinestringm0|0|LineString|2|KO-BKO-GKO:-BGKO +multilinestringm0|0|Polygon|2|KO-BKO-GKO:-BGKO +multilinestringm0|0|MultiPoint|2|KO-BKO-GKO:-BGKO +multilinestringm0|0|MultiLineString|2|KO-BKO-GKO:-BGKO +multilinestringm0|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +multilinestringm0|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +multilinestringm0|0|CircularString|2|KO-BKO-GKO:-BGKO +multilinestringm0|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +multilinestringm0|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +multilinestringm0|0|MultiCurve|2|KO-BKO-GKO:-BGKO +multilinestringm0|0|MultiSurface|2|KO-BKO-GKO:-BGKO +multilinestringm0|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multilinestringm0|0|Triangle|2|KO-BKO-GKO:-BGKO +multilinestringm0|0|Point|1|KO-BKO-GKO:-BGKO +multilinestringm0|0|LineString|1|KO-BKO-GKO:-BGKO +multilinestringm0|0|Polygon|1|KO-BKO-GKO:-BGKO +multilinestringm0|0|MultiPoint|1|KO-BKO-GKO:-BGKO +multilinestringm0|0|MultiLineString|1|OK-BOK-GOK-BGOK +multilinestringm0|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +multilinestringm0|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +multilinestringm0|0|CircularString|1|KO-BKO-GKO:-BGKO +multilinestringm0|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +multilinestringm0|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +multilinestringm0|0|MultiCurve|1|KO-BKO-GKO:-BGKO +multilinestringm0|0|MultiSurface|1|KO-BKO-GKO:-BGKO +multilinestringm0|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multilinestringm0|0|Triangle|1|KO-BKO-GKO:-BGKO +multilinestringm0|0|Point|3|KO-BKO-GKO:-BGKO +multilinestringm0|0|LineString|3|KO-BKO-GKO:-BGKO +multilinestringm0|0|Polygon|3|KO-BKO-GKO:-BGKO +multilinestringm0|0|MultiPoint|3|KO-BKO-GKO:-BGKO +multilinestringm0|0|MultiLineString|3|KO-BKO-GKO:-BGKO +multilinestringm0|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +multilinestringm0|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +multilinestringm0|0|CircularString|3|KO-BKO-GKO:-BGKO +multilinestringm0|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +multilinestringm0|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +multilinestringm0|0|MultiCurve|3|KO-BKO-GKO:-BGKO +multilinestringm0|0|MultiSurface|3|KO-BKO-GKO:-BGKO +multilinestringm0|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multilinestringm0|0|Triangle|3|KO-BKO-GKO:-BGKO +multilinestringm0|4326|Point|0|KO-BKO-GKO:-BGKO +multilinestringm0|4326|LineString|0|KO-BKO-GKO:-BGKO +multilinestringm0|4326|Polygon|0|KO-BKO-GKO:-BGKO +multilinestringm0|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +multilinestringm0|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +multilinestringm0|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +multilinestringm0|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +multilinestringm0|4326|CircularString|0|KO-BKO-GKO:-BGKO +multilinestringm0|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +multilinestringm0|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +multilinestringm0|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +multilinestringm0|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +multilinestringm0|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multilinestringm0|4326|Triangle|0|KO-BKO-GKO:-BGKO +multilinestringm0|4326|Tin|0|KO-BKO-GKO:-BGKO +multilinestringm0|4326|Point|2|KO-BKO-GKO:-BGKO +multilinestringm0|4326|LineString|2|KO-BKO-GKO:-BGKO +multilinestringm0|4326|Polygon|2|KO-BKO-GKO:-BGKO +multilinestringm0|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +multilinestringm0|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +multilinestringm0|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +multilinestringm0|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +multilinestringm0|4326|CircularString|2|KO-BKO-GKO:-BGKO +multilinestringm0|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +multilinestringm0|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +multilinestringm0|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +multilinestringm0|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +multilinestringm0|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multilinestringm0|4326|Triangle|2|KO-BKO-GKO:-BGKO +multilinestringm0|4326|Point|1|KO-BKO-GKO:-BGKO +multilinestringm0|4326|LineString|1|KO-BKO-GKO:-BGKO +multilinestringm0|4326|Polygon|1|KO-BKO-GKO:-BGKO +multilinestringm0|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +multilinestringm0|4326|MultiLineString|1|OK-BOK-GOK-BGOK +multilinestringm0|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +multilinestringm0|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +multilinestringm0|4326|CircularString|1|KO-BKO-GKO:-BGKO +multilinestringm0|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +multilinestringm0|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +multilinestringm0|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +multilinestringm0|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +multilinestringm0|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multilinestringm0|4326|Triangle|1|KO-BKO-GKO:-BGKO +multilinestringm0|4326|Point|3|KO-BKO-GKO:-BGKO +multilinestringm0|4326|LineString|3|KO-BKO-GKO:-BGKO +multilinestringm0|4326|Polygon|3|KO-BKO-GKO:-BGKO +multilinestringm0|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +multilinestringm0|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +multilinestringm0|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +multilinestringm0|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +multilinestringm0|4326|CircularString|3|KO-BKO-GKO:-BGKO +multilinestringm0|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +multilinestringm0|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +multilinestringm0|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +multilinestringm0|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +multilinestringm0|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multilinestringm0|4326|Triangle|3|KO-BKO-GKO:-BGKO +multilinestringm0||COUNT|4| +multilinestringm0||GCOUNT|4| +multilinestringm4326|0|Point|0|KO-BKO-GKO:-BGKO +multilinestringm4326|0|LineString|0|KO-BKO-GKO:-BGKO +multilinestringm4326|0|Polygon|0|KO-BKO-GKO:-BGKO +multilinestringm4326|0|MultiPoint|0|KO-BKO-GKO:-BGKO +multilinestringm4326|0|MultiLineString|0|KO-BKO-GKO:-BGKO +multilinestringm4326|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +multilinestringm4326|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +multilinestringm4326|0|CircularString|0|KO-BKO-GKO:-BGKO +multilinestringm4326|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +multilinestringm4326|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +multilinestringm4326|0|MultiCurve|0|KO-BKO-GKO:-BGKO +multilinestringm4326|0|MultiSurface|0|KO-BKO-GKO:-BGKO +multilinestringm4326|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multilinestringm4326|0|Triangle|0|KO-BKO-GKO:-BGKO +multilinestringm4326|0|Tin|0|KO-BKO-GKO:-BGKO +multilinestringm4326|0|Point|2|KO-BKO-GKO:-BGKO +multilinestringm4326|0|LineString|2|KO-BKO-GKO:-BGKO +multilinestringm4326|0|Polygon|2|KO-BKO-GKO:-BGKO +multilinestringm4326|0|MultiPoint|2|KO-BKO-GKO:-BGKO +multilinestringm4326|0|MultiLineString|2|KO-BKO-GKO:-BGKO +multilinestringm4326|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +multilinestringm4326|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +multilinestringm4326|0|CircularString|2|KO-BKO-GKO:-BGKO +multilinestringm4326|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +multilinestringm4326|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +multilinestringm4326|0|MultiCurve|2|KO-BKO-GKO:-BGKO +multilinestringm4326|0|MultiSurface|2|KO-BKO-GKO:-BGKO +multilinestringm4326|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multilinestringm4326|0|Triangle|2|KO-BKO-GKO:-BGKO +multilinestringm4326|0|Point|1|KO-BKO-GKO:-BGKO +multilinestringm4326|0|LineString|1|KO-BKO-GKO:-BGKO +multilinestringm4326|0|Polygon|1|KO-BKO-GKO:-BGKO +multilinestringm4326|0|MultiPoint|1|KO-BKO-GKO:-BGKO +multilinestringm4326|0|MultiLineString|1|KO-BKO-GOK-BGOK +multilinestringm4326|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +multilinestringm4326|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +multilinestringm4326|0|CircularString|1|KO-BKO-GKO:-BGKO +multilinestringm4326|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +multilinestringm4326|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +multilinestringm4326|0|MultiCurve|1|KO-BKO-GKO:-BGKO +multilinestringm4326|0|MultiSurface|1|KO-BKO-GKO:-BGKO +multilinestringm4326|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multilinestringm4326|0|Triangle|1|KO-BKO-GKO:-BGKO +multilinestringm4326|0|Point|3|KO-BKO-GKO:-BGKO +multilinestringm4326|0|LineString|3|KO-BKO-GKO:-BGKO +multilinestringm4326|0|Polygon|3|KO-BKO-GKO:-BGKO +multilinestringm4326|0|MultiPoint|3|KO-BKO-GKO:-BGKO +multilinestringm4326|0|MultiLineString|3|KO-BKO-GKO:-BGKO +multilinestringm4326|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +multilinestringm4326|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +multilinestringm4326|0|CircularString|3|KO-BKO-GKO:-BGKO +multilinestringm4326|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +multilinestringm4326|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +multilinestringm4326|0|MultiCurve|3|KO-BKO-GKO:-BGKO +multilinestringm4326|0|MultiSurface|3|KO-BKO-GKO:-BGKO +multilinestringm4326|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multilinestringm4326|0|Triangle|3|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|Point|0|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|LineString|0|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|Polygon|0|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|CircularString|0|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|Triangle|0|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|Tin|0|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|Point|2|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|LineString|2|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|Polygon|2|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|CircularString|2|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|Triangle|2|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|Point|1|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|LineString|1|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|Polygon|1|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|MultiLineString|1|OK-BOK-GOK-BGOK +multilinestringm4326|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|CircularString|1|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|Triangle|1|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|Point|3|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|LineString|3|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|Polygon|3|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|CircularString|3|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multilinestringm4326|4326|Triangle|3|KO-BKO-GKO:-BGKO +multilinestringm4326||COUNT|2| +multilinestringm4326||GCOUNT|4| +multilinestringz|0|Point|0|KO-BKO-GKO:-BGKO +multilinestringz|0|LineString|0|KO-BKO-GKO:-BGKO +multilinestringz|0|Polygon|0|KO-BKO-GKO:-BGKO +multilinestringz|0|MultiPoint|0|KO-BKO-GKO:-BGKO +multilinestringz|0|MultiLineString|0|KO-BKO-GKO:-BGKO +multilinestringz|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +multilinestringz|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +multilinestringz|0|CircularString|0|KO-BKO-GKO:-BGKO +multilinestringz|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +multilinestringz|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +multilinestringz|0|MultiCurve|0|KO-BKO-GKO:-BGKO +multilinestringz|0|MultiSurface|0|KO-BKO-GKO:-BGKO +multilinestringz|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multilinestringz|0|Triangle|0|KO-BKO-GKO:-BGKO +multilinestringz|0|Tin|0|KO-BKO-GKO:-BGKO +multilinestringz|0|Point|2|KO-BKO-GKO:-BGKO +multilinestringz|0|LineString|2|KO-BKO-GKO:-BGKO +multilinestringz|0|Polygon|2|KO-BKO-GKO:-BGKO +multilinestringz|0|MultiPoint|2|KO-BKO-GKO:-BGKO +multilinestringz|0|MultiLineString|2|OK-BOK-GOK-BGOK +multilinestringz|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +multilinestringz|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +multilinestringz|0|CircularString|2|KO-BKO-GKO:-BGKO +multilinestringz|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +multilinestringz|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +multilinestringz|0|MultiCurve|2|KO-BKO-GKO:-BGKO +multilinestringz|0|MultiSurface|2|KO-BKO-GKO:-BGKO +multilinestringz|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multilinestringz|0|Triangle|2|KO-BKO-GKO:-BGKO +multilinestringz|0|Point|1|KO-BKO-GKO:-BGKO +multilinestringz|0|LineString|1|KO-BKO-GKO:-BGKO +multilinestringz|0|Polygon|1|KO-BKO-GKO:-BGKO +multilinestringz|0|MultiPoint|1|KO-BKO-GKO:-BGKO +multilinestringz|0|MultiLineString|1|KO-BKO-GKO:-BGKO +multilinestringz|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +multilinestringz|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +multilinestringz|0|CircularString|1|KO-BKO-GKO:-BGKO +multilinestringz|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +multilinestringz|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +multilinestringz|0|MultiCurve|1|KO-BKO-GKO:-BGKO +multilinestringz|0|MultiSurface|1|KO-BKO-GKO:-BGKO +multilinestringz|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multilinestringz|0|Triangle|1|KO-BKO-GKO:-BGKO +multilinestringz|0|Point|3|KO-BKO-GKO:-BGKO +multilinestringz|0|LineString|3|KO-BKO-GKO:-BGKO +multilinestringz|0|Polygon|3|KO-BKO-GKO:-BGKO +multilinestringz|0|MultiPoint|3|KO-BKO-GKO:-BGKO +multilinestringz|0|MultiLineString|3|KO-BKO-GKO:-BGKO +multilinestringz|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +multilinestringz|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +multilinestringz|0|CircularString|3|KO-BKO-GKO:-BGKO +multilinestringz|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +multilinestringz|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +multilinestringz|0|MultiCurve|3|KO-BKO-GKO:-BGKO +multilinestringz|0|MultiSurface|3|KO-BKO-GKO:-BGKO +multilinestringz|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multilinestringz|0|Triangle|3|KO-BKO-GKO:-BGKO +multilinestringz|4326|Point|0|KO-BKO-GKO:-BGKO +multilinestringz|4326|LineString|0|KO-BKO-GKO:-BGKO +multilinestringz|4326|Polygon|0|KO-BKO-GKO:-BGKO +multilinestringz|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +multilinestringz|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +multilinestringz|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +multilinestringz|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +multilinestringz|4326|CircularString|0|KO-BKO-GKO:-BGKO +multilinestringz|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +multilinestringz|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +multilinestringz|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +multilinestringz|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +multilinestringz|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multilinestringz|4326|Triangle|0|KO-BKO-GKO:-BGKO +multilinestringz|4326|Tin|0|KO-BKO-GKO:-BGKO +multilinestringz|4326|Point|2|KO-BKO-GKO:-BGKO +multilinestringz|4326|LineString|2|KO-BKO-GKO:-BGKO +multilinestringz|4326|Polygon|2|KO-BKO-GKO:-BGKO +multilinestringz|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +multilinestringz|4326|MultiLineString|2|OK-BOK-GOK-BGOK +multilinestringz|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +multilinestringz|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +multilinestringz|4326|CircularString|2|KO-BKO-GKO:-BGKO +multilinestringz|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +multilinestringz|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +multilinestringz|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +multilinestringz|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +multilinestringz|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multilinestringz|4326|Triangle|2|KO-BKO-GKO:-BGKO +multilinestringz|4326|Point|1|KO-BKO-GKO:-BGKO +multilinestringz|4326|LineString|1|KO-BKO-GKO:-BGKO +multilinestringz|4326|Polygon|1|KO-BKO-GKO:-BGKO +multilinestringz|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +multilinestringz|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +multilinestringz|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +multilinestringz|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +multilinestringz|4326|CircularString|1|KO-BKO-GKO:-BGKO +multilinestringz|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +multilinestringz|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +multilinestringz|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +multilinestringz|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +multilinestringz|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multilinestringz|4326|Triangle|1|KO-BKO-GKO:-BGKO +multilinestringz|4326|Point|3|KO-BKO-GKO:-BGKO +multilinestringz|4326|LineString|3|KO-BKO-GKO:-BGKO +multilinestringz|4326|Polygon|3|KO-BKO-GKO:-BGKO +multilinestringz|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +multilinestringz|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +multilinestringz|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +multilinestringz|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +multilinestringz|4326|CircularString|3|KO-BKO-GKO:-BGKO +multilinestringz|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +multilinestringz|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +multilinestringz|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +multilinestringz|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +multilinestringz|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multilinestringz|4326|Triangle|3|KO-BKO-GKO:-BGKO +multilinestringz||COUNT|4| +multilinestringz||GCOUNT|4| +multilinestringz0|0|Point|0|KO-BKO-GKO:-BGKO +multilinestringz0|0|LineString|0|KO-BKO-GKO:-BGKO +multilinestringz0|0|Polygon|0|KO-BKO-GKO:-BGKO +multilinestringz0|0|MultiPoint|0|KO-BKO-GKO:-BGKO +multilinestringz0|0|MultiLineString|0|KO-BKO-GKO:-BGKO +multilinestringz0|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +multilinestringz0|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +multilinestringz0|0|CircularString|0|KO-BKO-GKO:-BGKO +multilinestringz0|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +multilinestringz0|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +multilinestringz0|0|MultiCurve|0|KO-BKO-GKO:-BGKO +multilinestringz0|0|MultiSurface|0|KO-BKO-GKO:-BGKO +multilinestringz0|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multilinestringz0|0|Triangle|0|KO-BKO-GKO:-BGKO +multilinestringz0|0|Tin|0|KO-BKO-GKO:-BGKO +multilinestringz0|0|Point|2|KO-BKO-GKO:-BGKO +multilinestringz0|0|LineString|2|KO-BKO-GKO:-BGKO +multilinestringz0|0|Polygon|2|KO-BKO-GKO:-BGKO +multilinestringz0|0|MultiPoint|2|KO-BKO-GKO:-BGKO +multilinestringz0|0|MultiLineString|2|OK-BOK-GOK-BGOK +multilinestringz0|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +multilinestringz0|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +multilinestringz0|0|CircularString|2|KO-BKO-GKO:-BGKO +multilinestringz0|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +multilinestringz0|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +multilinestringz0|0|MultiCurve|2|KO-BKO-GKO:-BGKO +multilinestringz0|0|MultiSurface|2|KO-BKO-GKO:-BGKO +multilinestringz0|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multilinestringz0|0|Triangle|2|KO-BKO-GKO:-BGKO +multilinestringz0|0|Point|1|KO-BKO-GKO:-BGKO +multilinestringz0|0|LineString|1|KO-BKO-GKO:-BGKO +multilinestringz0|0|Polygon|1|KO-BKO-GKO:-BGKO +multilinestringz0|0|MultiPoint|1|KO-BKO-GKO:-BGKO +multilinestringz0|0|MultiLineString|1|KO-BKO-GKO:-BGKO +multilinestringz0|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +multilinestringz0|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +multilinestringz0|0|CircularString|1|KO-BKO-GKO:-BGKO +multilinestringz0|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +multilinestringz0|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +multilinestringz0|0|MultiCurve|1|KO-BKO-GKO:-BGKO +multilinestringz0|0|MultiSurface|1|KO-BKO-GKO:-BGKO +multilinestringz0|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multilinestringz0|0|Triangle|1|KO-BKO-GKO:-BGKO +multilinestringz0|0|Point|3|KO-BKO-GKO:-BGKO +multilinestringz0|0|LineString|3|KO-BKO-GKO:-BGKO +multilinestringz0|0|Polygon|3|KO-BKO-GKO:-BGKO +multilinestringz0|0|MultiPoint|3|KO-BKO-GKO:-BGKO +multilinestringz0|0|MultiLineString|3|KO-BKO-GKO:-BGKO +multilinestringz0|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +multilinestringz0|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +multilinestringz0|0|CircularString|3|KO-BKO-GKO:-BGKO +multilinestringz0|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +multilinestringz0|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +multilinestringz0|0|MultiCurve|3|KO-BKO-GKO:-BGKO +multilinestringz0|0|MultiSurface|3|KO-BKO-GKO:-BGKO +multilinestringz0|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multilinestringz0|0|Triangle|3|KO-BKO-GKO:-BGKO +multilinestringz0|4326|Point|0|KO-BKO-GKO:-BGKO +multilinestringz0|4326|LineString|0|KO-BKO-GKO:-BGKO +multilinestringz0|4326|Polygon|0|KO-BKO-GKO:-BGKO +multilinestringz0|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +multilinestringz0|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +multilinestringz0|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +multilinestringz0|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +multilinestringz0|4326|CircularString|0|KO-BKO-GKO:-BGKO +multilinestringz0|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +multilinestringz0|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +multilinestringz0|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +multilinestringz0|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +multilinestringz0|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multilinestringz0|4326|Triangle|0|KO-BKO-GKO:-BGKO +multilinestringz0|4326|Tin|0|KO-BKO-GKO:-BGKO +multilinestringz0|4326|Point|2|KO-BKO-GKO:-BGKO +multilinestringz0|4326|LineString|2|KO-BKO-GKO:-BGKO +multilinestringz0|4326|Polygon|2|KO-BKO-GKO:-BGKO +multilinestringz0|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +multilinestringz0|4326|MultiLineString|2|OK-BOK-GOK-BGOK +multilinestringz0|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +multilinestringz0|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +multilinestringz0|4326|CircularString|2|KO-BKO-GKO:-BGKO +multilinestringz0|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +multilinestringz0|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +multilinestringz0|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +multilinestringz0|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +multilinestringz0|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multilinestringz0|4326|Triangle|2|KO-BKO-GKO:-BGKO +multilinestringz0|4326|Point|1|KO-BKO-GKO:-BGKO +multilinestringz0|4326|LineString|1|KO-BKO-GKO:-BGKO +multilinestringz0|4326|Polygon|1|KO-BKO-GKO:-BGKO +multilinestringz0|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +multilinestringz0|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +multilinestringz0|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +multilinestringz0|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +multilinestringz0|4326|CircularString|1|KO-BKO-GKO:-BGKO +multilinestringz0|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +multilinestringz0|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +multilinestringz0|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +multilinestringz0|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +multilinestringz0|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multilinestringz0|4326|Triangle|1|KO-BKO-GKO:-BGKO +multilinestringz0|4326|Point|3|KO-BKO-GKO:-BGKO +multilinestringz0|4326|LineString|3|KO-BKO-GKO:-BGKO +multilinestringz0|4326|Polygon|3|KO-BKO-GKO:-BGKO +multilinestringz0|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +multilinestringz0|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +multilinestringz0|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +multilinestringz0|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +multilinestringz0|4326|CircularString|3|KO-BKO-GKO:-BGKO +multilinestringz0|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +multilinestringz0|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +multilinestringz0|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +multilinestringz0|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +multilinestringz0|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multilinestringz0|4326|Triangle|3|KO-BKO-GKO:-BGKO +multilinestringz0||COUNT|4| +multilinestringz0||GCOUNT|4| +multilinestringz4326|0|Point|0|KO-BKO-GKO:-BGKO +multilinestringz4326|0|LineString|0|KO-BKO-GKO:-BGKO +multilinestringz4326|0|Polygon|0|KO-BKO-GKO:-BGKO +multilinestringz4326|0|MultiPoint|0|KO-BKO-GKO:-BGKO +multilinestringz4326|0|MultiLineString|0|KO-BKO-GKO:-BGKO +multilinestringz4326|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +multilinestringz4326|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +multilinestringz4326|0|CircularString|0|KO-BKO-GKO:-BGKO +multilinestringz4326|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +multilinestringz4326|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +multilinestringz4326|0|MultiCurve|0|KO-BKO-GKO:-BGKO +multilinestringz4326|0|MultiSurface|0|KO-BKO-GKO:-BGKO +multilinestringz4326|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multilinestringz4326|0|Triangle|0|KO-BKO-GKO:-BGKO +multilinestringz4326|0|Tin|0|KO-BKO-GKO:-BGKO +multilinestringz4326|0|Point|2|KO-BKO-GKO:-BGKO +multilinestringz4326|0|LineString|2|KO-BKO-GKO:-BGKO +multilinestringz4326|0|Polygon|2|KO-BKO-GKO:-BGKO +multilinestringz4326|0|MultiPoint|2|KO-BKO-GKO:-BGKO +multilinestringz4326|0|MultiLineString|2|KO-BKO-GOK-BGOK +multilinestringz4326|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +multilinestringz4326|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +multilinestringz4326|0|CircularString|2|KO-BKO-GKO:-BGKO +multilinestringz4326|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +multilinestringz4326|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +multilinestringz4326|0|MultiCurve|2|KO-BKO-GKO:-BGKO +multilinestringz4326|0|MultiSurface|2|KO-BKO-GKO:-BGKO +multilinestringz4326|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multilinestringz4326|0|Triangle|2|KO-BKO-GKO:-BGKO +multilinestringz4326|0|Point|1|KO-BKO-GKO:-BGKO +multilinestringz4326|0|LineString|1|KO-BKO-GKO:-BGKO +multilinestringz4326|0|Polygon|1|KO-BKO-GKO:-BGKO +multilinestringz4326|0|MultiPoint|1|KO-BKO-GKO:-BGKO +multilinestringz4326|0|MultiLineString|1|KO-BKO-GKO:-BGKO +multilinestringz4326|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +multilinestringz4326|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +multilinestringz4326|0|CircularString|1|KO-BKO-GKO:-BGKO +multilinestringz4326|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +multilinestringz4326|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +multilinestringz4326|0|MultiCurve|1|KO-BKO-GKO:-BGKO +multilinestringz4326|0|MultiSurface|1|KO-BKO-GKO:-BGKO +multilinestringz4326|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multilinestringz4326|0|Triangle|1|KO-BKO-GKO:-BGKO +multilinestringz4326|0|Point|3|KO-BKO-GKO:-BGKO +multilinestringz4326|0|LineString|3|KO-BKO-GKO:-BGKO +multilinestringz4326|0|Polygon|3|KO-BKO-GKO:-BGKO +multilinestringz4326|0|MultiPoint|3|KO-BKO-GKO:-BGKO +multilinestringz4326|0|MultiLineString|3|KO-BKO-GKO:-BGKO +multilinestringz4326|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +multilinestringz4326|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +multilinestringz4326|0|CircularString|3|KO-BKO-GKO:-BGKO +multilinestringz4326|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +multilinestringz4326|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +multilinestringz4326|0|MultiCurve|3|KO-BKO-GKO:-BGKO +multilinestringz4326|0|MultiSurface|3|KO-BKO-GKO:-BGKO +multilinestringz4326|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multilinestringz4326|0|Triangle|3|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|Point|0|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|LineString|0|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|Polygon|0|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|CircularString|0|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|Triangle|0|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|Tin|0|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|Point|2|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|LineString|2|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|Polygon|2|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|MultiLineString|2|OK-BOK-GOK-BGOK +multilinestringz4326|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|CircularString|2|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|Triangle|2|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|Point|1|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|LineString|1|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|Polygon|1|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|CircularString|1|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|Triangle|1|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|Point|3|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|LineString|3|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|Polygon|3|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|CircularString|3|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multilinestringz4326|4326|Triangle|3|KO-BKO-GKO:-BGKO +multilinestringz4326||COUNT|2| +multilinestringz4326||GCOUNT|4| +multilinestringzm|0|Point|0|KO-BKO-GKO:-BGKO +multilinestringzm|0|LineString|0|KO-BKO-GKO:-BGKO +multilinestringzm|0|Polygon|0|KO-BKO-GKO:-BGKO +multilinestringzm|0|MultiPoint|0|KO-BKO-GKO:-BGKO +multilinestringzm|0|MultiLineString|0|KO-BKO-GKO:-BGKO +multilinestringzm|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +multilinestringzm|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +multilinestringzm|0|CircularString|0|KO-BKO-GKO:-BGKO +multilinestringzm|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +multilinestringzm|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +multilinestringzm|0|MultiCurve|0|KO-BKO-GKO:-BGKO +multilinestringzm|0|MultiSurface|0|KO-BKO-GKO:-BGKO +multilinestringzm|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multilinestringzm|0|Triangle|0|KO-BKO-GKO:-BGKO +multilinestringzm|0|Tin|0|KO-BKO-GKO:-BGKO +multilinestringzm|0|Point|2|KO-BKO-GKO:-BGKO +multilinestringzm|0|LineString|2|KO-BKO-GKO:-BGKO +multilinestringzm|0|Polygon|2|KO-BKO-GKO:-BGKO +multilinestringzm|0|MultiPoint|2|KO-BKO-GKO:-BGKO +multilinestringzm|0|MultiLineString|2|KO-BKO-GKO:-BGKO +multilinestringzm|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +multilinestringzm|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +multilinestringzm|0|CircularString|2|KO-BKO-GKO:-BGKO +multilinestringzm|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +multilinestringzm|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +multilinestringzm|0|MultiCurve|2|KO-BKO-GKO:-BGKO +multilinestringzm|0|MultiSurface|2|KO-BKO-GKO:-BGKO +multilinestringzm|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multilinestringzm|0|Triangle|2|KO-BKO-GKO:-BGKO +multilinestringzm|0|Point|1|KO-BKO-GKO:-BGKO +multilinestringzm|0|LineString|1|KO-BKO-GKO:-BGKO +multilinestringzm|0|Polygon|1|KO-BKO-GKO:-BGKO +multilinestringzm|0|MultiPoint|1|KO-BKO-GKO:-BGKO +multilinestringzm|0|MultiLineString|1|KO-BKO-GKO:-BGKO +multilinestringzm|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +multilinestringzm|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +multilinestringzm|0|CircularString|1|KO-BKO-GKO:-BGKO +multilinestringzm|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +multilinestringzm|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +multilinestringzm|0|MultiCurve|1|KO-BKO-GKO:-BGKO +multilinestringzm|0|MultiSurface|1|KO-BKO-GKO:-BGKO +multilinestringzm|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multilinestringzm|0|Triangle|1|KO-BKO-GKO:-BGKO +multilinestringzm|0|Point|3|KO-BKO-GKO:-BGKO +multilinestringzm|0|LineString|3|KO-BKO-GKO:-BGKO +multilinestringzm|0|Polygon|3|KO-BKO-GKO:-BGKO +multilinestringzm|0|MultiPoint|3|KO-BKO-GKO:-BGKO +multilinestringzm|0|MultiLineString|3|OK-BOK-GOK-BGOK +multilinestringzm|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +multilinestringzm|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +multilinestringzm|0|CircularString|3|KO-BKO-GKO:-BGKO +multilinestringzm|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +multilinestringzm|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +multilinestringzm|0|MultiCurve|3|KO-BKO-GKO:-BGKO +multilinestringzm|0|MultiSurface|3|KO-BKO-GKO:-BGKO +multilinestringzm|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multilinestringzm|0|Triangle|3|KO-BKO-GKO:-BGKO +multilinestringzm|4326|Point|0|KO-BKO-GKO:-BGKO +multilinestringzm|4326|LineString|0|KO-BKO-GKO:-BGKO +multilinestringzm|4326|Polygon|0|KO-BKO-GKO:-BGKO +multilinestringzm|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +multilinestringzm|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +multilinestringzm|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +multilinestringzm|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +multilinestringzm|4326|CircularString|0|KO-BKO-GKO:-BGKO +multilinestringzm|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +multilinestringzm|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +multilinestringzm|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +multilinestringzm|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +multilinestringzm|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multilinestringzm|4326|Triangle|0|KO-BKO-GKO:-BGKO +multilinestringzm|4326|Tin|0|KO-BKO-GKO:-BGKO +multilinestringzm|4326|Point|2|KO-BKO-GKO:-BGKO +multilinestringzm|4326|LineString|2|KO-BKO-GKO:-BGKO +multilinestringzm|4326|Polygon|2|KO-BKO-GKO:-BGKO +multilinestringzm|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +multilinestringzm|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +multilinestringzm|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +multilinestringzm|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +multilinestringzm|4326|CircularString|2|KO-BKO-GKO:-BGKO +multilinestringzm|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +multilinestringzm|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +multilinestringzm|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +multilinestringzm|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +multilinestringzm|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multilinestringzm|4326|Triangle|2|KO-BKO-GKO:-BGKO +multilinestringzm|4326|Point|1|KO-BKO-GKO:-BGKO +multilinestringzm|4326|LineString|1|KO-BKO-GKO:-BGKO +multilinestringzm|4326|Polygon|1|KO-BKO-GKO:-BGKO +multilinestringzm|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +multilinestringzm|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +multilinestringzm|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +multilinestringzm|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +multilinestringzm|4326|CircularString|1|KO-BKO-GKO:-BGKO +multilinestringzm|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +multilinestringzm|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +multilinestringzm|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +multilinestringzm|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +multilinestringzm|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multilinestringzm|4326|Triangle|1|KO-BKO-GKO:-BGKO +multilinestringzm|4326|Point|3|KO-BKO-GKO:-BGKO +multilinestringzm|4326|LineString|3|KO-BKO-GKO:-BGKO +multilinestringzm|4326|Polygon|3|KO-BKO-GKO:-BGKO +multilinestringzm|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +multilinestringzm|4326|MultiLineString|3|OK-BOK-GOK-BGOK +multilinestringzm|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +multilinestringzm|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +multilinestringzm|4326|CircularString|3|KO-BKO-GKO:-BGKO +multilinestringzm|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +multilinestringzm|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +multilinestringzm|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +multilinestringzm|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +multilinestringzm|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multilinestringzm|4326|Triangle|3|KO-BKO-GKO:-BGKO +multilinestringzm||COUNT|4| +multilinestringzm||GCOUNT|4| +multilinestringzm0|0|Point|0|KO-BKO-GKO:-BGKO +multilinestringzm0|0|LineString|0|KO-BKO-GKO:-BGKO +multilinestringzm0|0|Polygon|0|KO-BKO-GKO:-BGKO +multilinestringzm0|0|MultiPoint|0|KO-BKO-GKO:-BGKO +multilinestringzm0|0|MultiLineString|0|KO-BKO-GKO:-BGKO +multilinestringzm0|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +multilinestringzm0|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +multilinestringzm0|0|CircularString|0|KO-BKO-GKO:-BGKO +multilinestringzm0|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +multilinestringzm0|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +multilinestringzm0|0|MultiCurve|0|KO-BKO-GKO:-BGKO +multilinestringzm0|0|MultiSurface|0|KO-BKO-GKO:-BGKO +multilinestringzm0|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multilinestringzm0|0|Triangle|0|KO-BKO-GKO:-BGKO +multilinestringzm0|0|Tin|0|KO-BKO-GKO:-BGKO +multilinestringzm0|0|Point|2|KO-BKO-GKO:-BGKO +multilinestringzm0|0|LineString|2|KO-BKO-GKO:-BGKO +multilinestringzm0|0|Polygon|2|KO-BKO-GKO:-BGKO +multilinestringzm0|0|MultiPoint|2|KO-BKO-GKO:-BGKO +multilinestringzm0|0|MultiLineString|2|KO-BKO-GKO:-BGKO +multilinestringzm0|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +multilinestringzm0|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +multilinestringzm0|0|CircularString|2|KO-BKO-GKO:-BGKO +multilinestringzm0|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +multilinestringzm0|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +multilinestringzm0|0|MultiCurve|2|KO-BKO-GKO:-BGKO +multilinestringzm0|0|MultiSurface|2|KO-BKO-GKO:-BGKO +multilinestringzm0|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multilinestringzm0|0|Triangle|2|KO-BKO-GKO:-BGKO +multilinestringzm0|0|Point|1|KO-BKO-GKO:-BGKO +multilinestringzm0|0|LineString|1|KO-BKO-GKO:-BGKO +multilinestringzm0|0|Polygon|1|KO-BKO-GKO:-BGKO +multilinestringzm0|0|MultiPoint|1|KO-BKO-GKO:-BGKO +multilinestringzm0|0|MultiLineString|1|KO-BKO-GKO:-BGKO +multilinestringzm0|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +multilinestringzm0|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +multilinestringzm0|0|CircularString|1|KO-BKO-GKO:-BGKO +multilinestringzm0|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +multilinestringzm0|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +multilinestringzm0|0|MultiCurve|1|KO-BKO-GKO:-BGKO +multilinestringzm0|0|MultiSurface|1|KO-BKO-GKO:-BGKO +multilinestringzm0|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multilinestringzm0|0|Triangle|1|KO-BKO-GKO:-BGKO +multilinestringzm0|0|Point|3|KO-BKO-GKO:-BGKO +multilinestringzm0|0|LineString|3|KO-BKO-GKO:-BGKO +multilinestringzm0|0|Polygon|3|KO-BKO-GKO:-BGKO +multilinestringzm0|0|MultiPoint|3|KO-BKO-GKO:-BGKO +multilinestringzm0|0|MultiLineString|3|OK-BOK-GOK-BGOK +multilinestringzm0|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +multilinestringzm0|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +multilinestringzm0|0|CircularString|3|KO-BKO-GKO:-BGKO +multilinestringzm0|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +multilinestringzm0|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +multilinestringzm0|0|MultiCurve|3|KO-BKO-GKO:-BGKO +multilinestringzm0|0|MultiSurface|3|KO-BKO-GKO:-BGKO +multilinestringzm0|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multilinestringzm0|0|Triangle|3|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|Point|0|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|LineString|0|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|Polygon|0|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|CircularString|0|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|Triangle|0|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|Tin|0|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|Point|2|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|LineString|2|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|Polygon|2|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|CircularString|2|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|Triangle|2|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|Point|1|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|LineString|1|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|Polygon|1|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|CircularString|1|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|Triangle|1|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|Point|3|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|LineString|3|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|Polygon|3|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|MultiLineString|3|OK-BOK-GOK-BGOK +multilinestringzm0|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|CircularString|3|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multilinestringzm0|4326|Triangle|3|KO-BKO-GKO:-BGKO +multilinestringzm0||COUNT|4| +multilinestringzm0||GCOUNT|4| +multilinestringzm4326|0|Point|0|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|LineString|0|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|Polygon|0|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|MultiPoint|0|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|MultiLineString|0|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|CircularString|0|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|MultiCurve|0|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|MultiSurface|0|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|Triangle|0|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|Tin|0|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|Point|2|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|LineString|2|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|Polygon|2|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|MultiPoint|2|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|MultiLineString|2|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|CircularString|2|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|MultiCurve|2|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|MultiSurface|2|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|Triangle|2|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|Point|1|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|LineString|1|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|Polygon|1|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|MultiPoint|1|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|MultiLineString|1|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|CircularString|1|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|MultiCurve|1|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|MultiSurface|1|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|Triangle|1|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|Point|3|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|LineString|3|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|Polygon|3|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|MultiPoint|3|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|MultiLineString|3|KO-BKO-GOK-BGOK +multilinestringzm4326|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|CircularString|3|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|MultiCurve|3|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|MultiSurface|3|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multilinestringzm4326|0|Triangle|3|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|Point|0|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|LineString|0|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|Polygon|0|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|CircularString|0|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|Triangle|0|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|Tin|0|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|Point|2|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|LineString|2|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|Polygon|2|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|CircularString|2|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|Triangle|2|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|Point|1|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|LineString|1|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|Polygon|1|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|CircularString|1|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|Triangle|1|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|Point|3|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|LineString|3|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|Polygon|3|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|MultiLineString|3|OK-BOK-GOK-BGOK +multilinestringzm4326|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|CircularString|3|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multilinestringzm4326|4326|Triangle|3|KO-BKO-GKO:-BGKO +multilinestringzm4326||COUNT|2| +multilinestringzm4326||GCOUNT|4| +multipoint|0|Point|0|OK-BOK-GOK-BGOK +multipoint|0|LineString|0|KO-BKO-GKO:-BGKO +multipoint|0|Polygon|0|KO-BKO-GKO:-BGKO +multipoint|0|MultiPoint|0|OK-BOK-GOK-BGOK +multipoint|0|MultiLineString|0|KO-BKO-GKO:-BGKO +multipoint|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +multipoint|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipoint|0|CircularString|0|KO-BKO-GKO:-BGKO +multipoint|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipoint|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipoint|0|MultiCurve|0|KO-BKO-GKO:-BGKO +multipoint|0|MultiSurface|0|KO-BKO-GKO:-BGKO +multipoint|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipoint|0|Triangle|0|KO-BKO-GKO:-BGKO +multipoint|0|Tin|0|KO-BKO-GKO:-BGKO +multipoint|0|Point|2|KO-BKO-GKO:-BGKO +multipoint|0|LineString|2|KO-BKO-GKO:-BGKO +multipoint|0|Polygon|2|KO-BKO-GKO:-BGKO +multipoint|0|MultiPoint|2|KO-BKO-GKO:-BGKO +multipoint|0|MultiLineString|2|KO-BKO-GKO:-BGKO +multipoint|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +multipoint|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipoint|0|CircularString|2|KO-BKO-GKO:-BGKO +multipoint|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipoint|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipoint|0|MultiCurve|2|KO-BKO-GKO:-BGKO +multipoint|0|MultiSurface|2|KO-BKO-GKO:-BGKO +multipoint|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipoint|0|Triangle|2|KO-BKO-GKO:-BGKO +multipoint|0|Point|1|KO-BKO-GKO:-BGKO +multipoint|0|LineString|1|KO-BKO-GKO:-BGKO +multipoint|0|Polygon|1|KO-BKO-GKO:-BGKO +multipoint|0|MultiPoint|1|KO-BKO-GKO:-BGKO +multipoint|0|MultiLineString|1|KO-BKO-GKO:-BGKO +multipoint|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +multipoint|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipoint|0|CircularString|1|KO-BKO-GKO:-BGKO +multipoint|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipoint|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipoint|0|MultiCurve|1|KO-BKO-GKO:-BGKO +multipoint|0|MultiSurface|1|KO-BKO-GKO:-BGKO +multipoint|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipoint|0|Triangle|1|KO-BKO-GKO:-BGKO +multipoint|0|Point|3|KO-BKO-GKO:-BGKO +multipoint|0|LineString|3|KO-BKO-GKO:-BGKO +multipoint|0|Polygon|3|KO-BKO-GKO:-BGKO +multipoint|0|MultiPoint|3|KO-BKO-GKO:-BGKO +multipoint|0|MultiLineString|3|KO-BKO-GKO:-BGKO +multipoint|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +multipoint|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipoint|0|CircularString|3|KO-BKO-GKO:-BGKO +multipoint|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipoint|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipoint|0|MultiCurve|3|KO-BKO-GKO:-BGKO +multipoint|0|MultiSurface|3|KO-BKO-GKO:-BGKO +multipoint|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipoint|0|Triangle|3|KO-BKO-GKO:-BGKO +multipoint|4326|Point|0|OK-BOK-GOK-BGOK +multipoint|4326|LineString|0|KO-BKO-GKO:-BGKO +multipoint|4326|Polygon|0|KO-BKO-GKO:-BGKO +multipoint|4326|MultiPoint|0|OK-BOK-GOK-BGOK +multipoint|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +multipoint|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +multipoint|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipoint|4326|CircularString|0|KO-BKO-GKO:-BGKO +multipoint|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipoint|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipoint|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +multipoint|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +multipoint|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipoint|4326|Triangle|0|KO-BKO-GKO:-BGKO +multipoint|4326|Tin|0|KO-BKO-GKO:-BGKO +multipoint|4326|Point|2|KO-BKO-GKO:-BGKO +multipoint|4326|LineString|2|KO-BKO-GKO:-BGKO +multipoint|4326|Polygon|2|KO-BKO-GKO:-BGKO +multipoint|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +multipoint|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +multipoint|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +multipoint|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipoint|4326|CircularString|2|KO-BKO-GKO:-BGKO +multipoint|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipoint|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipoint|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +multipoint|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +multipoint|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipoint|4326|Triangle|2|KO-BKO-GKO:-BGKO +multipoint|4326|Point|1|KO-BKO-GKO:-BGKO +multipoint|4326|LineString|1|KO-BKO-GKO:-BGKO +multipoint|4326|Polygon|1|KO-BKO-GKO:-BGKO +multipoint|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +multipoint|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +multipoint|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +multipoint|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipoint|4326|CircularString|1|KO-BKO-GKO:-BGKO +multipoint|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipoint|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipoint|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +multipoint|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +multipoint|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipoint|4326|Triangle|1|KO-BKO-GKO:-BGKO +multipoint|4326|Point|3|KO-BKO-GKO:-BGKO +multipoint|4326|LineString|3|KO-BKO-GKO:-BGKO +multipoint|4326|Polygon|3|KO-BKO-GKO:-BGKO +multipoint|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +multipoint|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +multipoint|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +multipoint|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipoint|4326|CircularString|3|KO-BKO-GKO:-BGKO +multipoint|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipoint|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipoint|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +multipoint|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +multipoint|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipoint|4326|Triangle|3|KO-BKO-GKO:-BGKO +multipoint||COUNT|8| +multipoint||GCOUNT|8| +multipoint0|0|Point|0|OK-BOK-GOK-BGOK +multipoint0|0|LineString|0|KO-BKO-GKO:-BGKO +multipoint0|0|Polygon|0|KO-BKO-GKO:-BGKO +multipoint0|0|MultiPoint|0|OK-BOK-GOK-BGOK +multipoint0|0|MultiLineString|0|KO-BKO-GKO:-BGKO +multipoint0|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +multipoint0|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipoint0|0|CircularString|0|KO-BKO-GKO:-BGKO +multipoint0|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipoint0|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipoint0|0|MultiCurve|0|KO-BKO-GKO:-BGKO +multipoint0|0|MultiSurface|0|KO-BKO-GKO:-BGKO +multipoint0|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipoint0|0|Triangle|0|KO-BKO-GKO:-BGKO +multipoint0|0|Tin|0|KO-BKO-GKO:-BGKO +multipoint0|0|Point|2|KO-BKO-GKO:-BGKO +multipoint0|0|LineString|2|KO-BKO-GKO:-BGKO +multipoint0|0|Polygon|2|KO-BKO-GKO:-BGKO +multipoint0|0|MultiPoint|2|KO-BKO-GKO:-BGKO +multipoint0|0|MultiLineString|2|KO-BKO-GKO:-BGKO +multipoint0|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +multipoint0|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipoint0|0|CircularString|2|KO-BKO-GKO:-BGKO +multipoint0|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipoint0|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipoint0|0|MultiCurve|2|KO-BKO-GKO:-BGKO +multipoint0|0|MultiSurface|2|KO-BKO-GKO:-BGKO +multipoint0|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipoint0|0|Triangle|2|KO-BKO-GKO:-BGKO +multipoint0|0|Point|1|KO-BKO-GKO:-BGKO +multipoint0|0|LineString|1|KO-BKO-GKO:-BGKO +multipoint0|0|Polygon|1|KO-BKO-GKO:-BGKO +multipoint0|0|MultiPoint|1|KO-BKO-GKO:-BGKO +multipoint0|0|MultiLineString|1|KO-BKO-GKO:-BGKO +multipoint0|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +multipoint0|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipoint0|0|CircularString|1|KO-BKO-GKO:-BGKO +multipoint0|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipoint0|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipoint0|0|MultiCurve|1|KO-BKO-GKO:-BGKO +multipoint0|0|MultiSurface|1|KO-BKO-GKO:-BGKO +multipoint0|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipoint0|0|Triangle|1|KO-BKO-GKO:-BGKO +multipoint0|0|Point|3|KO-BKO-GKO:-BGKO +multipoint0|0|LineString|3|KO-BKO-GKO:-BGKO +multipoint0|0|Polygon|3|KO-BKO-GKO:-BGKO +multipoint0|0|MultiPoint|3|KO-BKO-GKO:-BGKO +multipoint0|0|MultiLineString|3|KO-BKO-GKO:-BGKO +multipoint0|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +multipoint0|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipoint0|0|CircularString|3|KO-BKO-GKO:-BGKO +multipoint0|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipoint0|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipoint0|0|MultiCurve|3|KO-BKO-GKO:-BGKO +multipoint0|0|MultiSurface|3|KO-BKO-GKO:-BGKO +multipoint0|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipoint0|0|Triangle|3|KO-BKO-GKO:-BGKO +multipoint0|4326|Point|0|OK-BOK-GOK-BGOK +multipoint0|4326|LineString|0|KO-BKO-GKO:-BGKO +multipoint0|4326|Polygon|0|KO-BKO-GKO:-BGKO +multipoint0|4326|MultiPoint|0|OK-BOK-GOK-BGOK +multipoint0|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +multipoint0|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +multipoint0|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipoint0|4326|CircularString|0|KO-BKO-GKO:-BGKO +multipoint0|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipoint0|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipoint0|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +multipoint0|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +multipoint0|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipoint0|4326|Triangle|0|KO-BKO-GKO:-BGKO +multipoint0|4326|Tin|0|KO-BKO-GKO:-BGKO +multipoint0|4326|Point|2|KO-BKO-GKO:-BGKO +multipoint0|4326|LineString|2|KO-BKO-GKO:-BGKO +multipoint0|4326|Polygon|2|KO-BKO-GKO:-BGKO +multipoint0|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +multipoint0|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +multipoint0|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +multipoint0|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipoint0|4326|CircularString|2|KO-BKO-GKO:-BGKO +multipoint0|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipoint0|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipoint0|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +multipoint0|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +multipoint0|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipoint0|4326|Triangle|2|KO-BKO-GKO:-BGKO +multipoint0|4326|Point|1|KO-BKO-GKO:-BGKO +multipoint0|4326|LineString|1|KO-BKO-GKO:-BGKO +multipoint0|4326|Polygon|1|KO-BKO-GKO:-BGKO +multipoint0|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +multipoint0|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +multipoint0|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +multipoint0|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipoint0|4326|CircularString|1|KO-BKO-GKO:-BGKO +multipoint0|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipoint0|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipoint0|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +multipoint0|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +multipoint0|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipoint0|4326|Triangle|1|KO-BKO-GKO:-BGKO +multipoint0|4326|Point|3|KO-BKO-GKO:-BGKO +multipoint0|4326|LineString|3|KO-BKO-GKO:-BGKO +multipoint0|4326|Polygon|3|KO-BKO-GKO:-BGKO +multipoint0|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +multipoint0|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +multipoint0|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +multipoint0|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipoint0|4326|CircularString|3|KO-BKO-GKO:-BGKO +multipoint0|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipoint0|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipoint0|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +multipoint0|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +multipoint0|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipoint0|4326|Triangle|3|KO-BKO-GKO:-BGKO +multipoint0||COUNT|8| +multipoint0||GCOUNT|8| +multipoint4326|0|Point|0|KO-BKO-GOK-BGOK +multipoint4326|0|LineString|0|KO-BKO-GKO:-BGKO +multipoint4326|0|Polygon|0|KO-BKO-GKO:-BGKO +multipoint4326|0|MultiPoint|0|KO-BKO-GOK-BGOK +multipoint4326|0|MultiLineString|0|KO-BKO-GKO:-BGKO +multipoint4326|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +multipoint4326|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipoint4326|0|CircularString|0|KO-BKO-GKO:-BGKO +multipoint4326|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipoint4326|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipoint4326|0|MultiCurve|0|KO-BKO-GKO:-BGKO +multipoint4326|0|MultiSurface|0|KO-BKO-GKO:-BGKO +multipoint4326|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipoint4326|0|Triangle|0|KO-BKO-GKO:-BGKO +multipoint4326|0|Tin|0|KO-BKO-GKO:-BGKO +multipoint4326|0|Point|2|KO-BKO-GKO:-BGKO +multipoint4326|0|LineString|2|KO-BKO-GKO:-BGKO +multipoint4326|0|Polygon|2|KO-BKO-GKO:-BGKO +multipoint4326|0|MultiPoint|2|KO-BKO-GKO:-BGKO +multipoint4326|0|MultiLineString|2|KO-BKO-GKO:-BGKO +multipoint4326|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +multipoint4326|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipoint4326|0|CircularString|2|KO-BKO-GKO:-BGKO +multipoint4326|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipoint4326|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipoint4326|0|MultiCurve|2|KO-BKO-GKO:-BGKO +multipoint4326|0|MultiSurface|2|KO-BKO-GKO:-BGKO +multipoint4326|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipoint4326|0|Triangle|2|KO-BKO-GKO:-BGKO +multipoint4326|0|Point|1|KO-BKO-GKO:-BGKO +multipoint4326|0|LineString|1|KO-BKO-GKO:-BGKO +multipoint4326|0|Polygon|1|KO-BKO-GKO:-BGKO +multipoint4326|0|MultiPoint|1|KO-BKO-GKO:-BGKO +multipoint4326|0|MultiLineString|1|KO-BKO-GKO:-BGKO +multipoint4326|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +multipoint4326|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipoint4326|0|CircularString|1|KO-BKO-GKO:-BGKO +multipoint4326|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipoint4326|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipoint4326|0|MultiCurve|1|KO-BKO-GKO:-BGKO +multipoint4326|0|MultiSurface|1|KO-BKO-GKO:-BGKO +multipoint4326|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipoint4326|0|Triangle|1|KO-BKO-GKO:-BGKO +multipoint4326|0|Point|3|KO-BKO-GKO:-BGKO +multipoint4326|0|LineString|3|KO-BKO-GKO:-BGKO +multipoint4326|0|Polygon|3|KO-BKO-GKO:-BGKO +multipoint4326|0|MultiPoint|3|KO-BKO-GKO:-BGKO +multipoint4326|0|MultiLineString|3|KO-BKO-GKO:-BGKO +multipoint4326|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +multipoint4326|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipoint4326|0|CircularString|3|KO-BKO-GKO:-BGKO +multipoint4326|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipoint4326|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipoint4326|0|MultiCurve|3|KO-BKO-GKO:-BGKO +multipoint4326|0|MultiSurface|3|KO-BKO-GKO:-BGKO +multipoint4326|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipoint4326|0|Triangle|3|KO-BKO-GKO:-BGKO +multipoint4326|4326|Point|0|OK-BOK-GOK-BGOK +multipoint4326|4326|LineString|0|KO-BKO-GKO:-BGKO +multipoint4326|4326|Polygon|0|KO-BKO-GKO:-BGKO +multipoint4326|4326|MultiPoint|0|OK-BOK-GOK-BGOK +multipoint4326|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +multipoint4326|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +multipoint4326|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipoint4326|4326|CircularString|0|KO-BKO-GKO:-BGKO +multipoint4326|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipoint4326|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipoint4326|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +multipoint4326|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +multipoint4326|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipoint4326|4326|Triangle|0|KO-BKO-GKO:-BGKO +multipoint4326|4326|Tin|0|KO-BKO-GKO:-BGKO +multipoint4326|4326|Point|2|KO-BKO-GKO:-BGKO +multipoint4326|4326|LineString|2|KO-BKO-GKO:-BGKO +multipoint4326|4326|Polygon|2|KO-BKO-GKO:-BGKO +multipoint4326|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +multipoint4326|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +multipoint4326|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +multipoint4326|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipoint4326|4326|CircularString|2|KO-BKO-GKO:-BGKO +multipoint4326|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipoint4326|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipoint4326|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +multipoint4326|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +multipoint4326|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipoint4326|4326|Triangle|2|KO-BKO-GKO:-BGKO +multipoint4326|4326|Point|1|KO-BKO-GKO:-BGKO +multipoint4326|4326|LineString|1|KO-BKO-GKO:-BGKO +multipoint4326|4326|Polygon|1|KO-BKO-GKO:-BGKO +multipoint4326|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +multipoint4326|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +multipoint4326|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +multipoint4326|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipoint4326|4326|CircularString|1|KO-BKO-GKO:-BGKO +multipoint4326|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipoint4326|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipoint4326|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +multipoint4326|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +multipoint4326|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipoint4326|4326|Triangle|1|KO-BKO-GKO:-BGKO +multipoint4326|4326|Point|3|KO-BKO-GKO:-BGKO +multipoint4326|4326|LineString|3|KO-BKO-GKO:-BGKO +multipoint4326|4326|Polygon|3|KO-BKO-GKO:-BGKO +multipoint4326|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +multipoint4326|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +multipoint4326|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +multipoint4326|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipoint4326|4326|CircularString|3|KO-BKO-GKO:-BGKO +multipoint4326|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipoint4326|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipoint4326|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +multipoint4326|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +multipoint4326|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipoint4326|4326|Triangle|3|KO-BKO-GKO:-BGKO +multipoint4326||COUNT|4| +multipoint4326||GCOUNT|8| +multipointm|0|Point|0|KO-BKO-GKO:-BGKO +multipointm|0|LineString|0|KO-BKO-GKO:-BGKO +multipointm|0|Polygon|0|KO-BKO-GKO:-BGKO +multipointm|0|MultiPoint|0|KO-BKO-GKO:-BGKO +multipointm|0|MultiLineString|0|KO-BKO-GKO:-BGKO +multipointm|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +multipointm|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipointm|0|CircularString|0|KO-BKO-GKO:-BGKO +multipointm|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipointm|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipointm|0|MultiCurve|0|KO-BKO-GKO:-BGKO +multipointm|0|MultiSurface|0|KO-BKO-GKO:-BGKO +multipointm|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipointm|0|Triangle|0|KO-BKO-GKO:-BGKO +multipointm|0|Tin|0|KO-BKO-GKO:-BGKO +multipointm|0|Point|2|KO-BKO-GKO:-BGKO +multipointm|0|LineString|2|KO-BKO-GKO:-BGKO +multipointm|0|Polygon|2|KO-BKO-GKO:-BGKO +multipointm|0|MultiPoint|2|KO-BKO-GKO:-BGKO +multipointm|0|MultiLineString|2|KO-BKO-GKO:-BGKO +multipointm|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +multipointm|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipointm|0|CircularString|2|KO-BKO-GKO:-BGKO +multipointm|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipointm|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipointm|0|MultiCurve|2|KO-BKO-GKO:-BGKO +multipointm|0|MultiSurface|2|KO-BKO-GKO:-BGKO +multipointm|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipointm|0|Triangle|2|KO-BKO-GKO:-BGKO +multipointm|0|Point|1|OK-BOK-GOK-BGOK +multipointm|0|LineString|1|KO-BKO-GKO:-BGKO +multipointm|0|Polygon|1|KO-BKO-GKO:-BGKO +multipointm|0|MultiPoint|1|OK-BOK-GOK-BGOK +multipointm|0|MultiLineString|1|KO-BKO-GKO:-BGKO +multipointm|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +multipointm|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipointm|0|CircularString|1|KO-BKO-GKO:-BGKO +multipointm|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipointm|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipointm|0|MultiCurve|1|KO-BKO-GKO:-BGKO +multipointm|0|MultiSurface|1|KO-BKO-GKO:-BGKO +multipointm|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipointm|0|Triangle|1|KO-BKO-GKO:-BGKO +multipointm|0|Point|3|KO-BKO-GKO:-BGKO +multipointm|0|LineString|3|KO-BKO-GKO:-BGKO +multipointm|0|Polygon|3|KO-BKO-GKO:-BGKO +multipointm|0|MultiPoint|3|KO-BKO-GKO:-BGKO +multipointm|0|MultiLineString|3|KO-BKO-GKO:-BGKO +multipointm|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +multipointm|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipointm|0|CircularString|3|KO-BKO-GKO:-BGKO +multipointm|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipointm|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipointm|0|MultiCurve|3|KO-BKO-GKO:-BGKO +multipointm|0|MultiSurface|3|KO-BKO-GKO:-BGKO +multipointm|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipointm|0|Triangle|3|KO-BKO-GKO:-BGKO +multipointm|4326|Point|0|KO-BKO-GKO:-BGKO +multipointm|4326|LineString|0|KO-BKO-GKO:-BGKO +multipointm|4326|Polygon|0|KO-BKO-GKO:-BGKO +multipointm|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +multipointm|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +multipointm|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +multipointm|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipointm|4326|CircularString|0|KO-BKO-GKO:-BGKO +multipointm|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipointm|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipointm|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +multipointm|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +multipointm|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipointm|4326|Triangle|0|KO-BKO-GKO:-BGKO +multipointm|4326|Tin|0|KO-BKO-GKO:-BGKO +multipointm|4326|Point|2|KO-BKO-GKO:-BGKO +multipointm|4326|LineString|2|KO-BKO-GKO:-BGKO +multipointm|4326|Polygon|2|KO-BKO-GKO:-BGKO +multipointm|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +multipointm|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +multipointm|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +multipointm|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipointm|4326|CircularString|2|KO-BKO-GKO:-BGKO +multipointm|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipointm|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipointm|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +multipointm|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +multipointm|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipointm|4326|Triangle|2|KO-BKO-GKO:-BGKO +multipointm|4326|Point|1|OK-BOK-GOK-BGOK +multipointm|4326|LineString|1|KO-BKO-GKO:-BGKO +multipointm|4326|Polygon|1|KO-BKO-GKO:-BGKO +multipointm|4326|MultiPoint|1|OK-BOK-GOK-BGOK +multipointm|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +multipointm|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +multipointm|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipointm|4326|CircularString|1|KO-BKO-GKO:-BGKO +multipointm|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipointm|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipointm|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +multipointm|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +multipointm|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipointm|4326|Triangle|1|KO-BKO-GKO:-BGKO +multipointm|4326|Point|3|KO-BKO-GKO:-BGKO +multipointm|4326|LineString|3|KO-BKO-GKO:-BGKO +multipointm|4326|Polygon|3|KO-BKO-GKO:-BGKO +multipointm|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +multipointm|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +multipointm|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +multipointm|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipointm|4326|CircularString|3|KO-BKO-GKO:-BGKO +multipointm|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipointm|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipointm|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +multipointm|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +multipointm|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipointm|4326|Triangle|3|KO-BKO-GKO:-BGKO +multipointm||COUNT|8| +multipointm||GCOUNT|8| +multipointm0|0|Point|0|KO-BKO-GKO:-BGKO +multipointm0|0|LineString|0|KO-BKO-GKO:-BGKO +multipointm0|0|Polygon|0|KO-BKO-GKO:-BGKO +multipointm0|0|MultiPoint|0|KO-BKO-GKO:-BGKO +multipointm0|0|MultiLineString|0|KO-BKO-GKO:-BGKO +multipointm0|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +multipointm0|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipointm0|0|CircularString|0|KO-BKO-GKO:-BGKO +multipointm0|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipointm0|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipointm0|0|MultiCurve|0|KO-BKO-GKO:-BGKO +multipointm0|0|MultiSurface|0|KO-BKO-GKO:-BGKO +multipointm0|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipointm0|0|Triangle|0|KO-BKO-GKO:-BGKO +multipointm0|0|Tin|0|KO-BKO-GKO:-BGKO +multipointm0|0|Point|2|KO-BKO-GKO:-BGKO +multipointm0|0|LineString|2|KO-BKO-GKO:-BGKO +multipointm0|0|Polygon|2|KO-BKO-GKO:-BGKO +multipointm0|0|MultiPoint|2|KO-BKO-GKO:-BGKO +multipointm0|0|MultiLineString|2|KO-BKO-GKO:-BGKO +multipointm0|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +multipointm0|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipointm0|0|CircularString|2|KO-BKO-GKO:-BGKO +multipointm0|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipointm0|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipointm0|0|MultiCurve|2|KO-BKO-GKO:-BGKO +multipointm0|0|MultiSurface|2|KO-BKO-GKO:-BGKO +multipointm0|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipointm0|0|Triangle|2|KO-BKO-GKO:-BGKO +multipointm0|0|Point|1|OK-BOK-GOK-BGOK +multipointm0|0|LineString|1|KO-BKO-GKO:-BGKO +multipointm0|0|Polygon|1|KO-BKO-GKO:-BGKO +multipointm0|0|MultiPoint|1|OK-BOK-GOK-BGOK +multipointm0|0|MultiLineString|1|KO-BKO-GKO:-BGKO +multipointm0|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +multipointm0|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipointm0|0|CircularString|1|KO-BKO-GKO:-BGKO +multipointm0|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipointm0|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipointm0|0|MultiCurve|1|KO-BKO-GKO:-BGKO +multipointm0|0|MultiSurface|1|KO-BKO-GKO:-BGKO +multipointm0|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipointm0|0|Triangle|1|KO-BKO-GKO:-BGKO +multipointm0|0|Point|3|KO-BKO-GKO:-BGKO +multipointm0|0|LineString|3|KO-BKO-GKO:-BGKO +multipointm0|0|Polygon|3|KO-BKO-GKO:-BGKO +multipointm0|0|MultiPoint|3|KO-BKO-GKO:-BGKO +multipointm0|0|MultiLineString|3|KO-BKO-GKO:-BGKO +multipointm0|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +multipointm0|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipointm0|0|CircularString|3|KO-BKO-GKO:-BGKO +multipointm0|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipointm0|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipointm0|0|MultiCurve|3|KO-BKO-GKO:-BGKO +multipointm0|0|MultiSurface|3|KO-BKO-GKO:-BGKO +multipointm0|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipointm0|0|Triangle|3|KO-BKO-GKO:-BGKO +multipointm0|4326|Point|0|KO-BKO-GKO:-BGKO +multipointm0|4326|LineString|0|KO-BKO-GKO:-BGKO +multipointm0|4326|Polygon|0|KO-BKO-GKO:-BGKO +multipointm0|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +multipointm0|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +multipointm0|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +multipointm0|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipointm0|4326|CircularString|0|KO-BKO-GKO:-BGKO +multipointm0|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipointm0|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipointm0|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +multipointm0|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +multipointm0|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipointm0|4326|Triangle|0|KO-BKO-GKO:-BGKO +multipointm0|4326|Tin|0|KO-BKO-GKO:-BGKO +multipointm0|4326|Point|2|KO-BKO-GKO:-BGKO +multipointm0|4326|LineString|2|KO-BKO-GKO:-BGKO +multipointm0|4326|Polygon|2|KO-BKO-GKO:-BGKO +multipointm0|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +multipointm0|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +multipointm0|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +multipointm0|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipointm0|4326|CircularString|2|KO-BKO-GKO:-BGKO +multipointm0|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipointm0|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipointm0|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +multipointm0|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +multipointm0|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipointm0|4326|Triangle|2|KO-BKO-GKO:-BGKO +multipointm0|4326|Point|1|OK-BOK-GOK-BGOK +multipointm0|4326|LineString|1|KO-BKO-GKO:-BGKO +multipointm0|4326|Polygon|1|KO-BKO-GKO:-BGKO +multipointm0|4326|MultiPoint|1|OK-BOK-GOK-BGOK +multipointm0|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +multipointm0|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +multipointm0|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipointm0|4326|CircularString|1|KO-BKO-GKO:-BGKO +multipointm0|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipointm0|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipointm0|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +multipointm0|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +multipointm0|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipointm0|4326|Triangle|1|KO-BKO-GKO:-BGKO +multipointm0|4326|Point|3|KO-BKO-GKO:-BGKO +multipointm0|4326|LineString|3|KO-BKO-GKO:-BGKO +multipointm0|4326|Polygon|3|KO-BKO-GKO:-BGKO +multipointm0|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +multipointm0|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +multipointm0|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +multipointm0|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipointm0|4326|CircularString|3|KO-BKO-GKO:-BGKO +multipointm0|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipointm0|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipointm0|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +multipointm0|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +multipointm0|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipointm0|4326|Triangle|3|KO-BKO-GKO:-BGKO +multipointm0||COUNT|8| +multipointm0||GCOUNT|8| +multipointm4326|0|Point|0|KO-BKO-GKO:-BGKO +multipointm4326|0|LineString|0|KO-BKO-GKO:-BGKO +multipointm4326|0|Polygon|0|KO-BKO-GKO:-BGKO +multipointm4326|0|MultiPoint|0|KO-BKO-GKO:-BGKO +multipointm4326|0|MultiLineString|0|KO-BKO-GKO:-BGKO +multipointm4326|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +multipointm4326|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipointm4326|0|CircularString|0|KO-BKO-GKO:-BGKO +multipointm4326|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipointm4326|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipointm4326|0|MultiCurve|0|KO-BKO-GKO:-BGKO +multipointm4326|0|MultiSurface|0|KO-BKO-GKO:-BGKO +multipointm4326|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipointm4326|0|Triangle|0|KO-BKO-GKO:-BGKO +multipointm4326|0|Tin|0|KO-BKO-GKO:-BGKO +multipointm4326|0|Point|2|KO-BKO-GKO:-BGKO +multipointm4326|0|LineString|2|KO-BKO-GKO:-BGKO +multipointm4326|0|Polygon|2|KO-BKO-GKO:-BGKO +multipointm4326|0|MultiPoint|2|KO-BKO-GKO:-BGKO +multipointm4326|0|MultiLineString|2|KO-BKO-GKO:-BGKO +multipointm4326|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +multipointm4326|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipointm4326|0|CircularString|2|KO-BKO-GKO:-BGKO +multipointm4326|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipointm4326|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipointm4326|0|MultiCurve|2|KO-BKO-GKO:-BGKO +multipointm4326|0|MultiSurface|2|KO-BKO-GKO:-BGKO +multipointm4326|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipointm4326|0|Triangle|2|KO-BKO-GKO:-BGKO +multipointm4326|0|Point|1|KO-BKO-GOK-BGOK +multipointm4326|0|LineString|1|KO-BKO-GKO:-BGKO +multipointm4326|0|Polygon|1|KO-BKO-GKO:-BGKO +multipointm4326|0|MultiPoint|1|KO-BKO-GOK-BGOK +multipointm4326|0|MultiLineString|1|KO-BKO-GKO:-BGKO +multipointm4326|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +multipointm4326|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipointm4326|0|CircularString|1|KO-BKO-GKO:-BGKO +multipointm4326|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipointm4326|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipointm4326|0|MultiCurve|1|KO-BKO-GKO:-BGKO +multipointm4326|0|MultiSurface|1|KO-BKO-GKO:-BGKO +multipointm4326|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipointm4326|0|Triangle|1|KO-BKO-GKO:-BGKO +multipointm4326|0|Point|3|KO-BKO-GKO:-BGKO +multipointm4326|0|LineString|3|KO-BKO-GKO:-BGKO +multipointm4326|0|Polygon|3|KO-BKO-GKO:-BGKO +multipointm4326|0|MultiPoint|3|KO-BKO-GKO:-BGKO +multipointm4326|0|MultiLineString|3|KO-BKO-GKO:-BGKO +multipointm4326|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +multipointm4326|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipointm4326|0|CircularString|3|KO-BKO-GKO:-BGKO +multipointm4326|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipointm4326|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipointm4326|0|MultiCurve|3|KO-BKO-GKO:-BGKO +multipointm4326|0|MultiSurface|3|KO-BKO-GKO:-BGKO +multipointm4326|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipointm4326|0|Triangle|3|KO-BKO-GKO:-BGKO +multipointm4326|4326|Point|0|KO-BKO-GKO:-BGKO +multipointm4326|4326|LineString|0|KO-BKO-GKO:-BGKO +multipointm4326|4326|Polygon|0|KO-BKO-GKO:-BGKO +multipointm4326|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +multipointm4326|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +multipointm4326|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +multipointm4326|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipointm4326|4326|CircularString|0|KO-BKO-GKO:-BGKO +multipointm4326|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipointm4326|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipointm4326|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +multipointm4326|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +multipointm4326|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipointm4326|4326|Triangle|0|KO-BKO-GKO:-BGKO +multipointm4326|4326|Tin|0|KO-BKO-GKO:-BGKO +multipointm4326|4326|Point|2|KO-BKO-GKO:-BGKO +multipointm4326|4326|LineString|2|KO-BKO-GKO:-BGKO +multipointm4326|4326|Polygon|2|KO-BKO-GKO:-BGKO +multipointm4326|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +multipointm4326|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +multipointm4326|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +multipointm4326|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipointm4326|4326|CircularString|2|KO-BKO-GKO:-BGKO +multipointm4326|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipointm4326|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipointm4326|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +multipointm4326|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +multipointm4326|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipointm4326|4326|Triangle|2|KO-BKO-GKO:-BGKO +multipointm4326|4326|Point|1|OK-BOK-GOK-BGOK +multipointm4326|4326|LineString|1|KO-BKO-GKO:-BGKO +multipointm4326|4326|Polygon|1|KO-BKO-GKO:-BGKO +multipointm4326|4326|MultiPoint|1|OK-BOK-GOK-BGOK +multipointm4326|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +multipointm4326|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +multipointm4326|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipointm4326|4326|CircularString|1|KO-BKO-GKO:-BGKO +multipointm4326|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipointm4326|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipointm4326|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +multipointm4326|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +multipointm4326|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipointm4326|4326|Triangle|1|KO-BKO-GKO:-BGKO +multipointm4326|4326|Point|3|KO-BKO-GKO:-BGKO +multipointm4326|4326|LineString|3|KO-BKO-GKO:-BGKO +multipointm4326|4326|Polygon|3|KO-BKO-GKO:-BGKO +multipointm4326|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +multipointm4326|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +multipointm4326|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +multipointm4326|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipointm4326|4326|CircularString|3|KO-BKO-GKO:-BGKO +multipointm4326|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipointm4326|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipointm4326|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +multipointm4326|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +multipointm4326|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipointm4326|4326|Triangle|3|KO-BKO-GKO:-BGKO +multipointm4326||COUNT|4| +multipointm4326||GCOUNT|8| +multipointz|0|Point|0|KO-BKO-GKO:-BGKO +multipointz|0|LineString|0|KO-BKO-GKO:-BGKO +multipointz|0|Polygon|0|KO-BKO-GKO:-BGKO +multipointz|0|MultiPoint|0|KO-BKO-GKO:-BGKO +multipointz|0|MultiLineString|0|KO-BKO-GKO:-BGKO +multipointz|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +multipointz|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipointz|0|CircularString|0|KO-BKO-GKO:-BGKO +multipointz|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipointz|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipointz|0|MultiCurve|0|KO-BKO-GKO:-BGKO +multipointz|0|MultiSurface|0|KO-BKO-GKO:-BGKO +multipointz|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipointz|0|Triangle|0|KO-BKO-GKO:-BGKO +multipointz|0|Tin|0|KO-BKO-GKO:-BGKO +multipointz|0|Point|2|OK-BOK-GOK-BGOK +multipointz|0|LineString|2|KO-BKO-GKO:-BGKO +multipointz|0|Polygon|2|KO-BKO-GKO:-BGKO +multipointz|0|MultiPoint|2|OK-BOK-GOK-BGOK +multipointz|0|MultiLineString|2|KO-BKO-GKO:-BGKO +multipointz|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +multipointz|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipointz|0|CircularString|2|KO-BKO-GKO:-BGKO +multipointz|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipointz|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipointz|0|MultiCurve|2|KO-BKO-GKO:-BGKO +multipointz|0|MultiSurface|2|KO-BKO-GKO:-BGKO +multipointz|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipointz|0|Triangle|2|KO-BKO-GKO:-BGKO +multipointz|0|Point|1|KO-BKO-GKO:-BGKO +multipointz|0|LineString|1|KO-BKO-GKO:-BGKO +multipointz|0|Polygon|1|KO-BKO-GKO:-BGKO +multipointz|0|MultiPoint|1|KO-BKO-GKO:-BGKO +multipointz|0|MultiLineString|1|KO-BKO-GKO:-BGKO +multipointz|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +multipointz|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipointz|0|CircularString|1|KO-BKO-GKO:-BGKO +multipointz|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipointz|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipointz|0|MultiCurve|1|KO-BKO-GKO:-BGKO +multipointz|0|MultiSurface|1|KO-BKO-GKO:-BGKO +multipointz|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipointz|0|Triangle|1|KO-BKO-GKO:-BGKO +multipointz|0|Point|3|KO-BKO-GKO:-BGKO +multipointz|0|LineString|3|KO-BKO-GKO:-BGKO +multipointz|0|Polygon|3|KO-BKO-GKO:-BGKO +multipointz|0|MultiPoint|3|KO-BKO-GKO:-BGKO +multipointz|0|MultiLineString|3|KO-BKO-GKO:-BGKO +multipointz|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +multipointz|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipointz|0|CircularString|3|KO-BKO-GKO:-BGKO +multipointz|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipointz|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipointz|0|MultiCurve|3|KO-BKO-GKO:-BGKO +multipointz|0|MultiSurface|3|KO-BKO-GKO:-BGKO +multipointz|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipointz|0|Triangle|3|KO-BKO-GKO:-BGKO +multipointz|4326|Point|0|KO-BKO-GKO:-BGKO +multipointz|4326|LineString|0|KO-BKO-GKO:-BGKO +multipointz|4326|Polygon|0|KO-BKO-GKO:-BGKO +multipointz|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +multipointz|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +multipointz|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +multipointz|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipointz|4326|CircularString|0|KO-BKO-GKO:-BGKO +multipointz|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipointz|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipointz|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +multipointz|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +multipointz|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipointz|4326|Triangle|0|KO-BKO-GKO:-BGKO +multipointz|4326|Tin|0|KO-BKO-GKO:-BGKO +multipointz|4326|Point|2|OK-BOK-GOK-BGOK +multipointz|4326|LineString|2|KO-BKO-GKO:-BGKO +multipointz|4326|Polygon|2|KO-BKO-GKO:-BGKO +multipointz|4326|MultiPoint|2|OK-BOK-GOK-BGOK +multipointz|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +multipointz|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +multipointz|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipointz|4326|CircularString|2|KO-BKO-GKO:-BGKO +multipointz|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipointz|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipointz|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +multipointz|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +multipointz|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipointz|4326|Triangle|2|KO-BKO-GKO:-BGKO +multipointz|4326|Point|1|KO-BKO-GKO:-BGKO +multipointz|4326|LineString|1|KO-BKO-GKO:-BGKO +multipointz|4326|Polygon|1|KO-BKO-GKO:-BGKO +multipointz|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +multipointz|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +multipointz|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +multipointz|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipointz|4326|CircularString|1|KO-BKO-GKO:-BGKO +multipointz|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipointz|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipointz|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +multipointz|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +multipointz|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipointz|4326|Triangle|1|KO-BKO-GKO:-BGKO +multipointz|4326|Point|3|KO-BKO-GKO:-BGKO +multipointz|4326|LineString|3|KO-BKO-GKO:-BGKO +multipointz|4326|Polygon|3|KO-BKO-GKO:-BGKO +multipointz|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +multipointz|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +multipointz|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +multipointz|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipointz|4326|CircularString|3|KO-BKO-GKO:-BGKO +multipointz|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipointz|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipointz|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +multipointz|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +multipointz|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipointz|4326|Triangle|3|KO-BKO-GKO:-BGKO +multipointz||COUNT|8| +multipointz||GCOUNT|8| +multipointz0|0|Point|0|KO-BKO-GKO:-BGKO +multipointz0|0|LineString|0|KO-BKO-GKO:-BGKO +multipointz0|0|Polygon|0|KO-BKO-GKO:-BGKO +multipointz0|0|MultiPoint|0|KO-BKO-GKO:-BGKO +multipointz0|0|MultiLineString|0|KO-BKO-GKO:-BGKO +multipointz0|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +multipointz0|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipointz0|0|CircularString|0|KO-BKO-GKO:-BGKO +multipointz0|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipointz0|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipointz0|0|MultiCurve|0|KO-BKO-GKO:-BGKO +multipointz0|0|MultiSurface|0|KO-BKO-GKO:-BGKO +multipointz0|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipointz0|0|Triangle|0|KO-BKO-GKO:-BGKO +multipointz0|0|Tin|0|KO-BKO-GKO:-BGKO +multipointz0|0|Point|2|OK-BOK-GOK-BGOK +multipointz0|0|LineString|2|KO-BKO-GKO:-BGKO +multipointz0|0|Polygon|2|KO-BKO-GKO:-BGKO +multipointz0|0|MultiPoint|2|OK-BOK-GOK-BGOK +multipointz0|0|MultiLineString|2|KO-BKO-GKO:-BGKO +multipointz0|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +multipointz0|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipointz0|0|CircularString|2|KO-BKO-GKO:-BGKO +multipointz0|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipointz0|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipointz0|0|MultiCurve|2|KO-BKO-GKO:-BGKO +multipointz0|0|MultiSurface|2|KO-BKO-GKO:-BGKO +multipointz0|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipointz0|0|Triangle|2|KO-BKO-GKO:-BGKO +multipointz0|0|Point|1|KO-BKO-GKO:-BGKO +multipointz0|0|LineString|1|KO-BKO-GKO:-BGKO +multipointz0|0|Polygon|1|KO-BKO-GKO:-BGKO +multipointz0|0|MultiPoint|1|KO-BKO-GKO:-BGKO +multipointz0|0|MultiLineString|1|KO-BKO-GKO:-BGKO +multipointz0|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +multipointz0|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipointz0|0|CircularString|1|KO-BKO-GKO:-BGKO +multipointz0|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipointz0|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipointz0|0|MultiCurve|1|KO-BKO-GKO:-BGKO +multipointz0|0|MultiSurface|1|KO-BKO-GKO:-BGKO +multipointz0|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipointz0|0|Triangle|1|KO-BKO-GKO:-BGKO +multipointz0|0|Point|3|KO-BKO-GKO:-BGKO +multipointz0|0|LineString|3|KO-BKO-GKO:-BGKO +multipointz0|0|Polygon|3|KO-BKO-GKO:-BGKO +multipointz0|0|MultiPoint|3|KO-BKO-GKO:-BGKO +multipointz0|0|MultiLineString|3|KO-BKO-GKO:-BGKO +multipointz0|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +multipointz0|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipointz0|0|CircularString|3|KO-BKO-GKO:-BGKO +multipointz0|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipointz0|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipointz0|0|MultiCurve|3|KO-BKO-GKO:-BGKO +multipointz0|0|MultiSurface|3|KO-BKO-GKO:-BGKO +multipointz0|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipointz0|0|Triangle|3|KO-BKO-GKO:-BGKO +multipointz0|4326|Point|0|KO-BKO-GKO:-BGKO +multipointz0|4326|LineString|0|KO-BKO-GKO:-BGKO +multipointz0|4326|Polygon|0|KO-BKO-GKO:-BGKO +multipointz0|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +multipointz0|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +multipointz0|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +multipointz0|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipointz0|4326|CircularString|0|KO-BKO-GKO:-BGKO +multipointz0|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipointz0|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipointz0|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +multipointz0|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +multipointz0|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipointz0|4326|Triangle|0|KO-BKO-GKO:-BGKO +multipointz0|4326|Tin|0|KO-BKO-GKO:-BGKO +multipointz0|4326|Point|2|OK-BOK-GOK-BGOK +multipointz0|4326|LineString|2|KO-BKO-GKO:-BGKO +multipointz0|4326|Polygon|2|KO-BKO-GKO:-BGKO +multipointz0|4326|MultiPoint|2|OK-BOK-GOK-BGOK +multipointz0|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +multipointz0|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +multipointz0|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipointz0|4326|CircularString|2|KO-BKO-GKO:-BGKO +multipointz0|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipointz0|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipointz0|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +multipointz0|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +multipointz0|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipointz0|4326|Triangle|2|KO-BKO-GKO:-BGKO +multipointz0|4326|Point|1|KO-BKO-GKO:-BGKO +multipointz0|4326|LineString|1|KO-BKO-GKO:-BGKO +multipointz0|4326|Polygon|1|KO-BKO-GKO:-BGKO +multipointz0|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +multipointz0|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +multipointz0|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +multipointz0|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipointz0|4326|CircularString|1|KO-BKO-GKO:-BGKO +multipointz0|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipointz0|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipointz0|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +multipointz0|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +multipointz0|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipointz0|4326|Triangle|1|KO-BKO-GKO:-BGKO +multipointz0|4326|Point|3|KO-BKO-GKO:-BGKO +multipointz0|4326|LineString|3|KO-BKO-GKO:-BGKO +multipointz0|4326|Polygon|3|KO-BKO-GKO:-BGKO +multipointz0|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +multipointz0|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +multipointz0|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +multipointz0|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipointz0|4326|CircularString|3|KO-BKO-GKO:-BGKO +multipointz0|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipointz0|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipointz0|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +multipointz0|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +multipointz0|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipointz0|4326|Triangle|3|KO-BKO-GKO:-BGKO +multipointz0||COUNT|8| +multipointz0||GCOUNT|8| +multipointz4326|0|Point|0|KO-BKO-GKO:-BGKO +multipointz4326|0|LineString|0|KO-BKO-GKO:-BGKO +multipointz4326|0|Polygon|0|KO-BKO-GKO:-BGKO +multipointz4326|0|MultiPoint|0|KO-BKO-GKO:-BGKO +multipointz4326|0|MultiLineString|0|KO-BKO-GKO:-BGKO +multipointz4326|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +multipointz4326|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipointz4326|0|CircularString|0|KO-BKO-GKO:-BGKO +multipointz4326|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipointz4326|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipointz4326|0|MultiCurve|0|KO-BKO-GKO:-BGKO +multipointz4326|0|MultiSurface|0|KO-BKO-GKO:-BGKO +multipointz4326|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipointz4326|0|Triangle|0|KO-BKO-GKO:-BGKO +multipointz4326|0|Tin|0|KO-BKO-GKO:-BGKO +multipointz4326|0|Point|2|KO-BKO-GOK-BGOK +multipointz4326|0|LineString|2|KO-BKO-GKO:-BGKO +multipointz4326|0|Polygon|2|KO-BKO-GKO:-BGKO +multipointz4326|0|MultiPoint|2|KO-BKO-GOK-BGOK +multipointz4326|0|MultiLineString|2|KO-BKO-GKO:-BGKO +multipointz4326|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +multipointz4326|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipointz4326|0|CircularString|2|KO-BKO-GKO:-BGKO +multipointz4326|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipointz4326|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipointz4326|0|MultiCurve|2|KO-BKO-GKO:-BGKO +multipointz4326|0|MultiSurface|2|KO-BKO-GKO:-BGKO +multipointz4326|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipointz4326|0|Triangle|2|KO-BKO-GKO:-BGKO +multipointz4326|0|Point|1|KO-BKO-GKO:-BGKO +multipointz4326|0|LineString|1|KO-BKO-GKO:-BGKO +multipointz4326|0|Polygon|1|KO-BKO-GKO:-BGKO +multipointz4326|0|MultiPoint|1|KO-BKO-GKO:-BGKO +multipointz4326|0|MultiLineString|1|KO-BKO-GKO:-BGKO +multipointz4326|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +multipointz4326|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipointz4326|0|CircularString|1|KO-BKO-GKO:-BGKO +multipointz4326|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipointz4326|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipointz4326|0|MultiCurve|1|KO-BKO-GKO:-BGKO +multipointz4326|0|MultiSurface|1|KO-BKO-GKO:-BGKO +multipointz4326|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipointz4326|0|Triangle|1|KO-BKO-GKO:-BGKO +multipointz4326|0|Point|3|KO-BKO-GKO:-BGKO +multipointz4326|0|LineString|3|KO-BKO-GKO:-BGKO +multipointz4326|0|Polygon|3|KO-BKO-GKO:-BGKO +multipointz4326|0|MultiPoint|3|KO-BKO-GKO:-BGKO +multipointz4326|0|MultiLineString|3|KO-BKO-GKO:-BGKO +multipointz4326|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +multipointz4326|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipointz4326|0|CircularString|3|KO-BKO-GKO:-BGKO +multipointz4326|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipointz4326|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipointz4326|0|MultiCurve|3|KO-BKO-GKO:-BGKO +multipointz4326|0|MultiSurface|3|KO-BKO-GKO:-BGKO +multipointz4326|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipointz4326|0|Triangle|3|KO-BKO-GKO:-BGKO +multipointz4326|4326|Point|0|KO-BKO-GKO:-BGKO +multipointz4326|4326|LineString|0|KO-BKO-GKO:-BGKO +multipointz4326|4326|Polygon|0|KO-BKO-GKO:-BGKO +multipointz4326|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +multipointz4326|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +multipointz4326|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +multipointz4326|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipointz4326|4326|CircularString|0|KO-BKO-GKO:-BGKO +multipointz4326|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipointz4326|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipointz4326|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +multipointz4326|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +multipointz4326|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipointz4326|4326|Triangle|0|KO-BKO-GKO:-BGKO +multipointz4326|4326|Tin|0|KO-BKO-GKO:-BGKO +multipointz4326|4326|Point|2|OK-BOK-GOK-BGOK +multipointz4326|4326|LineString|2|KO-BKO-GKO:-BGKO +multipointz4326|4326|Polygon|2|KO-BKO-GKO:-BGKO +multipointz4326|4326|MultiPoint|2|OK-BOK-GOK-BGOK +multipointz4326|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +multipointz4326|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +multipointz4326|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipointz4326|4326|CircularString|2|KO-BKO-GKO:-BGKO +multipointz4326|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipointz4326|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipointz4326|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +multipointz4326|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +multipointz4326|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipointz4326|4326|Triangle|2|KO-BKO-GKO:-BGKO +multipointz4326|4326|Point|1|KO-BKO-GKO:-BGKO +multipointz4326|4326|LineString|1|KO-BKO-GKO:-BGKO +multipointz4326|4326|Polygon|1|KO-BKO-GKO:-BGKO +multipointz4326|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +multipointz4326|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +multipointz4326|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +multipointz4326|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipointz4326|4326|CircularString|1|KO-BKO-GKO:-BGKO +multipointz4326|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipointz4326|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipointz4326|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +multipointz4326|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +multipointz4326|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipointz4326|4326|Triangle|1|KO-BKO-GKO:-BGKO +multipointz4326|4326|Point|3|KO-BKO-GKO:-BGKO +multipointz4326|4326|LineString|3|KO-BKO-GKO:-BGKO +multipointz4326|4326|Polygon|3|KO-BKO-GKO:-BGKO +multipointz4326|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +multipointz4326|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +multipointz4326|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +multipointz4326|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipointz4326|4326|CircularString|3|KO-BKO-GKO:-BGKO +multipointz4326|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipointz4326|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipointz4326|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +multipointz4326|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +multipointz4326|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipointz4326|4326|Triangle|3|KO-BKO-GKO:-BGKO +multipointz4326||COUNT|4| +multipointz4326||GCOUNT|8| +multipointzm|0|Point|0|KO-BKO-GKO:-BGKO +multipointzm|0|LineString|0|KO-BKO-GKO:-BGKO +multipointzm|0|Polygon|0|KO-BKO-GKO:-BGKO +multipointzm|0|MultiPoint|0|KO-BKO-GKO:-BGKO +multipointzm|0|MultiLineString|0|KO-BKO-GKO:-BGKO +multipointzm|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +multipointzm|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipointzm|0|CircularString|0|KO-BKO-GKO:-BGKO +multipointzm|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipointzm|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipointzm|0|MultiCurve|0|KO-BKO-GKO:-BGKO +multipointzm|0|MultiSurface|0|KO-BKO-GKO:-BGKO +multipointzm|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipointzm|0|Triangle|0|KO-BKO-GKO:-BGKO +multipointzm|0|Tin|0|KO-BKO-GKO:-BGKO +multipointzm|0|Point|2|KO-BKO-GKO:-BGKO +multipointzm|0|LineString|2|KO-BKO-GKO:-BGKO +multipointzm|0|Polygon|2|KO-BKO-GKO:-BGKO +multipointzm|0|MultiPoint|2|KO-BKO-GKO:-BGKO +multipointzm|0|MultiLineString|2|KO-BKO-GKO:-BGKO +multipointzm|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +multipointzm|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipointzm|0|CircularString|2|KO-BKO-GKO:-BGKO +multipointzm|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipointzm|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipointzm|0|MultiCurve|2|KO-BKO-GKO:-BGKO +multipointzm|0|MultiSurface|2|KO-BKO-GKO:-BGKO +multipointzm|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipointzm|0|Triangle|2|KO-BKO-GKO:-BGKO +multipointzm|0|Point|1|KO-BKO-GKO:-BGKO +multipointzm|0|LineString|1|KO-BKO-GKO:-BGKO +multipointzm|0|Polygon|1|KO-BKO-GKO:-BGKO +multipointzm|0|MultiPoint|1|KO-BKO-GKO:-BGKO +multipointzm|0|MultiLineString|1|KO-BKO-GKO:-BGKO +multipointzm|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +multipointzm|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipointzm|0|CircularString|1|KO-BKO-GKO:-BGKO +multipointzm|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipointzm|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipointzm|0|MultiCurve|1|KO-BKO-GKO:-BGKO +multipointzm|0|MultiSurface|1|KO-BKO-GKO:-BGKO +multipointzm|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipointzm|0|Triangle|1|KO-BKO-GKO:-BGKO +multipointzm|0|Point|3|OK-BOK-GOK-BGOK +multipointzm|0|LineString|3|KO-BKO-GKO:-BGKO +multipointzm|0|Polygon|3|KO-BKO-GKO:-BGKO +multipointzm|0|MultiPoint|3|OK-BOK-GOK-BGOK +multipointzm|0|MultiLineString|3|KO-BKO-GKO:-BGKO +multipointzm|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +multipointzm|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipointzm|0|CircularString|3|KO-BKO-GKO:-BGKO +multipointzm|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipointzm|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipointzm|0|MultiCurve|3|KO-BKO-GKO:-BGKO +multipointzm|0|MultiSurface|3|KO-BKO-GKO:-BGKO +multipointzm|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipointzm|0|Triangle|3|KO-BKO-GKO:-BGKO +multipointzm|4326|Point|0|KO-BKO-GKO:-BGKO +multipointzm|4326|LineString|0|KO-BKO-GKO:-BGKO +multipointzm|4326|Polygon|0|KO-BKO-GKO:-BGKO +multipointzm|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +multipointzm|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +multipointzm|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +multipointzm|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipointzm|4326|CircularString|0|KO-BKO-GKO:-BGKO +multipointzm|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipointzm|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipointzm|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +multipointzm|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +multipointzm|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipointzm|4326|Triangle|0|KO-BKO-GKO:-BGKO +multipointzm|4326|Tin|0|KO-BKO-GKO:-BGKO +multipointzm|4326|Point|2|KO-BKO-GKO:-BGKO +multipointzm|4326|LineString|2|KO-BKO-GKO:-BGKO +multipointzm|4326|Polygon|2|KO-BKO-GKO:-BGKO +multipointzm|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +multipointzm|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +multipointzm|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +multipointzm|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipointzm|4326|CircularString|2|KO-BKO-GKO:-BGKO +multipointzm|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipointzm|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipointzm|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +multipointzm|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +multipointzm|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipointzm|4326|Triangle|2|KO-BKO-GKO:-BGKO +multipointzm|4326|Point|1|KO-BKO-GKO:-BGKO +multipointzm|4326|LineString|1|KO-BKO-GKO:-BGKO +multipointzm|4326|Polygon|1|KO-BKO-GKO:-BGKO +multipointzm|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +multipointzm|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +multipointzm|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +multipointzm|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipointzm|4326|CircularString|1|KO-BKO-GKO:-BGKO +multipointzm|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipointzm|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipointzm|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +multipointzm|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +multipointzm|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipointzm|4326|Triangle|1|KO-BKO-GKO:-BGKO +multipointzm|4326|Point|3|OK-BOK-GOK-BGOK +multipointzm|4326|LineString|3|KO-BKO-GKO:-BGKO +multipointzm|4326|Polygon|3|KO-BKO-GKO:-BGKO +multipointzm|4326|MultiPoint|3|OK-BOK-GOK-BGOK +multipointzm|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +multipointzm|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +multipointzm|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipointzm|4326|CircularString|3|KO-BKO-GKO:-BGKO +multipointzm|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipointzm|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipointzm|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +multipointzm|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +multipointzm|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipointzm|4326|Triangle|3|KO-BKO-GKO:-BGKO +multipointzm||COUNT|8| +multipointzm||GCOUNT|8| +multipointzm0|0|Point|0|KO-BKO-GKO:-BGKO +multipointzm0|0|LineString|0|KO-BKO-GKO:-BGKO +multipointzm0|0|Polygon|0|KO-BKO-GKO:-BGKO +multipointzm0|0|MultiPoint|0|KO-BKO-GKO:-BGKO +multipointzm0|0|MultiLineString|0|KO-BKO-GKO:-BGKO +multipointzm0|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +multipointzm0|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipointzm0|0|CircularString|0|KO-BKO-GKO:-BGKO +multipointzm0|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipointzm0|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipointzm0|0|MultiCurve|0|KO-BKO-GKO:-BGKO +multipointzm0|0|MultiSurface|0|KO-BKO-GKO:-BGKO +multipointzm0|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipointzm0|0|Triangle|0|KO-BKO-GKO:-BGKO +multipointzm0|0|Tin|0|KO-BKO-GKO:-BGKO +multipointzm0|0|Point|2|KO-BKO-GKO:-BGKO +multipointzm0|0|LineString|2|KO-BKO-GKO:-BGKO +multipointzm0|0|Polygon|2|KO-BKO-GKO:-BGKO +multipointzm0|0|MultiPoint|2|KO-BKO-GKO:-BGKO +multipointzm0|0|MultiLineString|2|KO-BKO-GKO:-BGKO +multipointzm0|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +multipointzm0|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipointzm0|0|CircularString|2|KO-BKO-GKO:-BGKO +multipointzm0|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipointzm0|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipointzm0|0|MultiCurve|2|KO-BKO-GKO:-BGKO +multipointzm0|0|MultiSurface|2|KO-BKO-GKO:-BGKO +multipointzm0|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipointzm0|0|Triangle|2|KO-BKO-GKO:-BGKO +multipointzm0|0|Point|1|KO-BKO-GKO:-BGKO +multipointzm0|0|LineString|1|KO-BKO-GKO:-BGKO +multipointzm0|0|Polygon|1|KO-BKO-GKO:-BGKO +multipointzm0|0|MultiPoint|1|KO-BKO-GKO:-BGKO +multipointzm0|0|MultiLineString|1|KO-BKO-GKO:-BGKO +multipointzm0|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +multipointzm0|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipointzm0|0|CircularString|1|KO-BKO-GKO:-BGKO +multipointzm0|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipointzm0|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipointzm0|0|MultiCurve|1|KO-BKO-GKO:-BGKO +multipointzm0|0|MultiSurface|1|KO-BKO-GKO:-BGKO +multipointzm0|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipointzm0|0|Triangle|1|KO-BKO-GKO:-BGKO +multipointzm0|0|Point|3|OK-BOK-GOK-BGOK +multipointzm0|0|LineString|3|KO-BKO-GKO:-BGKO +multipointzm0|0|Polygon|3|KO-BKO-GKO:-BGKO +multipointzm0|0|MultiPoint|3|OK-BOK-GOK-BGOK +multipointzm0|0|MultiLineString|3|KO-BKO-GKO:-BGKO +multipointzm0|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +multipointzm0|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipointzm0|0|CircularString|3|KO-BKO-GKO:-BGKO +multipointzm0|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipointzm0|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipointzm0|0|MultiCurve|3|KO-BKO-GKO:-BGKO +multipointzm0|0|MultiSurface|3|KO-BKO-GKO:-BGKO +multipointzm0|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipointzm0|0|Triangle|3|KO-BKO-GKO:-BGKO +multipointzm0|4326|Point|0|KO-BKO-GKO:-BGKO +multipointzm0|4326|LineString|0|KO-BKO-GKO:-BGKO +multipointzm0|4326|Polygon|0|KO-BKO-GKO:-BGKO +multipointzm0|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +multipointzm0|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +multipointzm0|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +multipointzm0|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipointzm0|4326|CircularString|0|KO-BKO-GKO:-BGKO +multipointzm0|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipointzm0|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipointzm0|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +multipointzm0|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +multipointzm0|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipointzm0|4326|Triangle|0|KO-BKO-GKO:-BGKO +multipointzm0|4326|Tin|0|KO-BKO-GKO:-BGKO +multipointzm0|4326|Point|2|KO-BKO-GKO:-BGKO +multipointzm0|4326|LineString|2|KO-BKO-GKO:-BGKO +multipointzm0|4326|Polygon|2|KO-BKO-GKO:-BGKO +multipointzm0|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +multipointzm0|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +multipointzm0|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +multipointzm0|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipointzm0|4326|CircularString|2|KO-BKO-GKO:-BGKO +multipointzm0|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipointzm0|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipointzm0|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +multipointzm0|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +multipointzm0|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipointzm0|4326|Triangle|2|KO-BKO-GKO:-BGKO +multipointzm0|4326|Point|1|KO-BKO-GKO:-BGKO +multipointzm0|4326|LineString|1|KO-BKO-GKO:-BGKO +multipointzm0|4326|Polygon|1|KO-BKO-GKO:-BGKO +multipointzm0|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +multipointzm0|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +multipointzm0|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +multipointzm0|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipointzm0|4326|CircularString|1|KO-BKO-GKO:-BGKO +multipointzm0|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipointzm0|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipointzm0|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +multipointzm0|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +multipointzm0|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipointzm0|4326|Triangle|1|KO-BKO-GKO:-BGKO +multipointzm0|4326|Point|3|OK-BOK-GOK-BGOK +multipointzm0|4326|LineString|3|KO-BKO-GKO:-BGKO +multipointzm0|4326|Polygon|3|KO-BKO-GKO:-BGKO +multipointzm0|4326|MultiPoint|3|OK-BOK-GOK-BGOK +multipointzm0|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +multipointzm0|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +multipointzm0|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipointzm0|4326|CircularString|3|KO-BKO-GKO:-BGKO +multipointzm0|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipointzm0|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipointzm0|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +multipointzm0|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +multipointzm0|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipointzm0|4326|Triangle|3|KO-BKO-GKO:-BGKO +multipointzm0||COUNT|8| +multipointzm0||GCOUNT|8| +multipointzm4326|0|Point|0|KO-BKO-GKO:-BGKO +multipointzm4326|0|LineString|0|KO-BKO-GKO:-BGKO +multipointzm4326|0|Polygon|0|KO-BKO-GKO:-BGKO +multipointzm4326|0|MultiPoint|0|KO-BKO-GKO:-BGKO +multipointzm4326|0|MultiLineString|0|KO-BKO-GKO:-BGKO +multipointzm4326|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +multipointzm4326|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipointzm4326|0|CircularString|0|KO-BKO-GKO:-BGKO +multipointzm4326|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipointzm4326|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipointzm4326|0|MultiCurve|0|KO-BKO-GKO:-BGKO +multipointzm4326|0|MultiSurface|0|KO-BKO-GKO:-BGKO +multipointzm4326|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipointzm4326|0|Triangle|0|KO-BKO-GKO:-BGKO +multipointzm4326|0|Tin|0|KO-BKO-GKO:-BGKO +multipointzm4326|0|Point|2|KO-BKO-GKO:-BGKO +multipointzm4326|0|LineString|2|KO-BKO-GKO:-BGKO +multipointzm4326|0|Polygon|2|KO-BKO-GKO:-BGKO +multipointzm4326|0|MultiPoint|2|KO-BKO-GKO:-BGKO +multipointzm4326|0|MultiLineString|2|KO-BKO-GKO:-BGKO +multipointzm4326|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +multipointzm4326|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipointzm4326|0|CircularString|2|KO-BKO-GKO:-BGKO +multipointzm4326|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipointzm4326|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipointzm4326|0|MultiCurve|2|KO-BKO-GKO:-BGKO +multipointzm4326|0|MultiSurface|2|KO-BKO-GKO:-BGKO +multipointzm4326|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipointzm4326|0|Triangle|2|KO-BKO-GKO:-BGKO +multipointzm4326|0|Point|1|KO-BKO-GKO:-BGKO +multipointzm4326|0|LineString|1|KO-BKO-GKO:-BGKO +multipointzm4326|0|Polygon|1|KO-BKO-GKO:-BGKO +multipointzm4326|0|MultiPoint|1|KO-BKO-GKO:-BGKO +multipointzm4326|0|MultiLineString|1|KO-BKO-GKO:-BGKO +multipointzm4326|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +multipointzm4326|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipointzm4326|0|CircularString|1|KO-BKO-GKO:-BGKO +multipointzm4326|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipointzm4326|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipointzm4326|0|MultiCurve|1|KO-BKO-GKO:-BGKO +multipointzm4326|0|MultiSurface|1|KO-BKO-GKO:-BGKO +multipointzm4326|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipointzm4326|0|Triangle|1|KO-BKO-GKO:-BGKO +multipointzm4326|0|Point|3|KO-BKO-GOK-BGOK +multipointzm4326|0|LineString|3|KO-BKO-GKO:-BGKO +multipointzm4326|0|Polygon|3|KO-BKO-GKO:-BGKO +multipointzm4326|0|MultiPoint|3|KO-BKO-GOK-BGOK +multipointzm4326|0|MultiLineString|3|KO-BKO-GKO:-BGKO +multipointzm4326|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +multipointzm4326|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipointzm4326|0|CircularString|3|KO-BKO-GKO:-BGKO +multipointzm4326|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipointzm4326|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipointzm4326|0|MultiCurve|3|KO-BKO-GKO:-BGKO +multipointzm4326|0|MultiSurface|3|KO-BKO-GKO:-BGKO +multipointzm4326|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipointzm4326|0|Triangle|3|KO-BKO-GKO:-BGKO +multipointzm4326|4326|Point|0|KO-BKO-GKO:-BGKO +multipointzm4326|4326|LineString|0|KO-BKO-GKO:-BGKO +multipointzm4326|4326|Polygon|0|KO-BKO-GKO:-BGKO +multipointzm4326|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +multipointzm4326|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +multipointzm4326|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +multipointzm4326|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipointzm4326|4326|CircularString|0|KO-BKO-GKO:-BGKO +multipointzm4326|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipointzm4326|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipointzm4326|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +multipointzm4326|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +multipointzm4326|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipointzm4326|4326|Triangle|0|KO-BKO-GKO:-BGKO +multipointzm4326|4326|Tin|0|KO-BKO-GKO:-BGKO +multipointzm4326|4326|Point|2|KO-BKO-GKO:-BGKO +multipointzm4326|4326|LineString|2|KO-BKO-GKO:-BGKO +multipointzm4326|4326|Polygon|2|KO-BKO-GKO:-BGKO +multipointzm4326|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +multipointzm4326|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +multipointzm4326|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +multipointzm4326|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipointzm4326|4326|CircularString|2|KO-BKO-GKO:-BGKO +multipointzm4326|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipointzm4326|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipointzm4326|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +multipointzm4326|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +multipointzm4326|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipointzm4326|4326|Triangle|2|KO-BKO-GKO:-BGKO +multipointzm4326|4326|Point|1|KO-BKO-GKO:-BGKO +multipointzm4326|4326|LineString|1|KO-BKO-GKO:-BGKO +multipointzm4326|4326|Polygon|1|KO-BKO-GKO:-BGKO +multipointzm4326|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +multipointzm4326|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +multipointzm4326|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +multipointzm4326|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipointzm4326|4326|CircularString|1|KO-BKO-GKO:-BGKO +multipointzm4326|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipointzm4326|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipointzm4326|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +multipointzm4326|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +multipointzm4326|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipointzm4326|4326|Triangle|1|KO-BKO-GKO:-BGKO +multipointzm4326|4326|Point|3|OK-BOK-GOK-BGOK +multipointzm4326|4326|LineString|3|KO-BKO-GKO:-BGKO +multipointzm4326|4326|Polygon|3|KO-BKO-GKO:-BGKO +multipointzm4326|4326|MultiPoint|3|OK-BOK-GOK-BGOK +multipointzm4326|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +multipointzm4326|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +multipointzm4326|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipointzm4326|4326|CircularString|3|KO-BKO-GKO:-BGKO +multipointzm4326|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipointzm4326|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipointzm4326|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +multipointzm4326|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +multipointzm4326|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipointzm4326|4326|Triangle|3|KO-BKO-GKO:-BGKO +multipointzm4326||COUNT|4| +multipointzm4326||GCOUNT|8| +multipolygon|0|Point|0|KO-BKO-GKO:-BGKO +multipolygon|0|LineString|0|KO-BKO-GKO:-BGKO +multipolygon|0|Polygon|0|KO-BKO-GKO:-BGKO +multipolygon|0|MultiPoint|0|KO-BKO-GKO:-BGKO +multipolygon|0|MultiLineString|0|KO-BKO-GKO:-BGKO +multipolygon|0|MultiPolygon|0|OK-BOK-GOK-BGOK +multipolygon|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipolygon|0|CircularString|0|KO-BKO-GKO:-BGKO +multipolygon|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipolygon|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipolygon|0|MultiCurve|0|KO-BKO-GKO:-BGKO +multipolygon|0|MultiSurface|0|KO-BKO-GKO:-BGKO +multipolygon|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipolygon|0|Triangle|0|KO-BKO-GKO:-BGKO +multipolygon|0|Tin|0|KO-BKO-GKO:-BGKO +multipolygon|0|Point|2|KO-BKO-GKO:-BGKO +multipolygon|0|LineString|2|KO-BKO-GKO:-BGKO +multipolygon|0|Polygon|2|KO-BKO-GKO:-BGKO +multipolygon|0|MultiPoint|2|KO-BKO-GKO:-BGKO +multipolygon|0|MultiLineString|2|KO-BKO-GKO:-BGKO +multipolygon|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +multipolygon|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipolygon|0|CircularString|2|KO-BKO-GKO:-BGKO +multipolygon|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipolygon|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipolygon|0|MultiCurve|2|KO-BKO-GKO:-BGKO +multipolygon|0|MultiSurface|2|KO-BKO-GKO:-BGKO +multipolygon|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipolygon|0|Triangle|2|KO-BKO-GKO:-BGKO +multipolygon|0|Point|1|KO-BKO-GKO:-BGKO +multipolygon|0|LineString|1|KO-BKO-GKO:-BGKO +multipolygon|0|Polygon|1|KO-BKO-GKO:-BGKO +multipolygon|0|MultiPoint|1|KO-BKO-GKO:-BGKO +multipolygon|0|MultiLineString|1|KO-BKO-GKO:-BGKO +multipolygon|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +multipolygon|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipolygon|0|CircularString|1|KO-BKO-GKO:-BGKO +multipolygon|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipolygon|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipolygon|0|MultiCurve|1|KO-BKO-GKO:-BGKO +multipolygon|0|MultiSurface|1|KO-BKO-GKO:-BGKO +multipolygon|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipolygon|0|Triangle|1|KO-BKO-GKO:-BGKO +multipolygon|0|Point|3|KO-BKO-GKO:-BGKO +multipolygon|0|LineString|3|KO-BKO-GKO:-BGKO +multipolygon|0|Polygon|3|KO-BKO-GKO:-BGKO +multipolygon|0|MultiPoint|3|KO-BKO-GKO:-BGKO +multipolygon|0|MultiLineString|3|KO-BKO-GKO:-BGKO +multipolygon|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +multipolygon|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipolygon|0|CircularString|3|KO-BKO-GKO:-BGKO +multipolygon|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipolygon|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipolygon|0|MultiCurve|3|KO-BKO-GKO:-BGKO +multipolygon|0|MultiSurface|3|KO-BKO-GKO:-BGKO +multipolygon|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipolygon|0|Triangle|3|KO-BKO-GKO:-BGKO +multipolygon|4326|Point|0|KO-BKO-GKO:-BGKO +multipolygon|4326|LineString|0|KO-BKO-GKO:-BGKO +multipolygon|4326|Polygon|0|KO-BKO-GKO:-BGKO +multipolygon|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +multipolygon|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +multipolygon|4326|MultiPolygon|0|OK-BOK-GOK-BGOK +multipolygon|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipolygon|4326|CircularString|0|KO-BKO-GKO:-BGKO +multipolygon|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipolygon|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipolygon|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +multipolygon|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +multipolygon|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipolygon|4326|Triangle|0|KO-BKO-GKO:-BGKO +multipolygon|4326|Tin|0|KO-BKO-GKO:-BGKO +multipolygon|4326|Point|2|KO-BKO-GKO:-BGKO +multipolygon|4326|LineString|2|KO-BKO-GKO:-BGKO +multipolygon|4326|Polygon|2|KO-BKO-GKO:-BGKO +multipolygon|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +multipolygon|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +multipolygon|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +multipolygon|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipolygon|4326|CircularString|2|KO-BKO-GKO:-BGKO +multipolygon|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipolygon|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipolygon|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +multipolygon|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +multipolygon|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipolygon|4326|Triangle|2|KO-BKO-GKO:-BGKO +multipolygon|4326|Point|1|KO-BKO-GKO:-BGKO +multipolygon|4326|LineString|1|KO-BKO-GKO:-BGKO +multipolygon|4326|Polygon|1|KO-BKO-GKO:-BGKO +multipolygon|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +multipolygon|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +multipolygon|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +multipolygon|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipolygon|4326|CircularString|1|KO-BKO-GKO:-BGKO +multipolygon|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipolygon|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipolygon|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +multipolygon|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +multipolygon|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipolygon|4326|Triangle|1|KO-BKO-GKO:-BGKO +multipolygon|4326|Point|3|KO-BKO-GKO:-BGKO +multipolygon|4326|LineString|3|KO-BKO-GKO:-BGKO +multipolygon|4326|Polygon|3|KO-BKO-GKO:-BGKO +multipolygon|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +multipolygon|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +multipolygon|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +multipolygon|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipolygon|4326|CircularString|3|KO-BKO-GKO:-BGKO +multipolygon|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipolygon|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipolygon|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +multipolygon|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +multipolygon|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipolygon|4326|Triangle|3|KO-BKO-GKO:-BGKO +multipolygon||COUNT|4| +multipolygon||GCOUNT|4| +multipolygon0|0|Point|0|KO-BKO-GKO:-BGKO +multipolygon0|0|LineString|0|KO-BKO-GKO:-BGKO +multipolygon0|0|Polygon|0|KO-BKO-GKO:-BGKO +multipolygon0|0|MultiPoint|0|KO-BKO-GKO:-BGKO +multipolygon0|0|MultiLineString|0|KO-BKO-GKO:-BGKO +multipolygon0|0|MultiPolygon|0|OK-BOK-GOK-BGOK +multipolygon0|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipolygon0|0|CircularString|0|KO-BKO-GKO:-BGKO +multipolygon0|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipolygon0|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipolygon0|0|MultiCurve|0|KO-BKO-GKO:-BGKO +multipolygon0|0|MultiSurface|0|KO-BKO-GKO:-BGKO +multipolygon0|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipolygon0|0|Triangle|0|KO-BKO-GKO:-BGKO +multipolygon0|0|Tin|0|KO-BKO-GKO:-BGKO +multipolygon0|0|Point|2|KO-BKO-GKO:-BGKO +multipolygon0|0|LineString|2|KO-BKO-GKO:-BGKO +multipolygon0|0|Polygon|2|KO-BKO-GKO:-BGKO +multipolygon0|0|MultiPoint|2|KO-BKO-GKO:-BGKO +multipolygon0|0|MultiLineString|2|KO-BKO-GKO:-BGKO +multipolygon0|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +multipolygon0|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipolygon0|0|CircularString|2|KO-BKO-GKO:-BGKO +multipolygon0|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipolygon0|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipolygon0|0|MultiCurve|2|KO-BKO-GKO:-BGKO +multipolygon0|0|MultiSurface|2|KO-BKO-GKO:-BGKO +multipolygon0|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipolygon0|0|Triangle|2|KO-BKO-GKO:-BGKO +multipolygon0|0|Point|1|KO-BKO-GKO:-BGKO +multipolygon0|0|LineString|1|KO-BKO-GKO:-BGKO +multipolygon0|0|Polygon|1|KO-BKO-GKO:-BGKO +multipolygon0|0|MultiPoint|1|KO-BKO-GKO:-BGKO +multipolygon0|0|MultiLineString|1|KO-BKO-GKO:-BGKO +multipolygon0|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +multipolygon0|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipolygon0|0|CircularString|1|KO-BKO-GKO:-BGKO +multipolygon0|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipolygon0|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipolygon0|0|MultiCurve|1|KO-BKO-GKO:-BGKO +multipolygon0|0|MultiSurface|1|KO-BKO-GKO:-BGKO +multipolygon0|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipolygon0|0|Triangle|1|KO-BKO-GKO:-BGKO +multipolygon0|0|Point|3|KO-BKO-GKO:-BGKO +multipolygon0|0|LineString|3|KO-BKO-GKO:-BGKO +multipolygon0|0|Polygon|3|KO-BKO-GKO:-BGKO +multipolygon0|0|MultiPoint|3|KO-BKO-GKO:-BGKO +multipolygon0|0|MultiLineString|3|KO-BKO-GKO:-BGKO +multipolygon0|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +multipolygon0|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipolygon0|0|CircularString|3|KO-BKO-GKO:-BGKO +multipolygon0|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipolygon0|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipolygon0|0|MultiCurve|3|KO-BKO-GKO:-BGKO +multipolygon0|0|MultiSurface|3|KO-BKO-GKO:-BGKO +multipolygon0|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipolygon0|0|Triangle|3|KO-BKO-GKO:-BGKO +multipolygon0|4326|Point|0|KO-BKO-GKO:-BGKO +multipolygon0|4326|LineString|0|KO-BKO-GKO:-BGKO +multipolygon0|4326|Polygon|0|KO-BKO-GKO:-BGKO +multipolygon0|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +multipolygon0|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +multipolygon0|4326|MultiPolygon|0|OK-BOK-GOK-BGOK +multipolygon0|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipolygon0|4326|CircularString|0|KO-BKO-GKO:-BGKO +multipolygon0|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipolygon0|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipolygon0|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +multipolygon0|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +multipolygon0|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipolygon0|4326|Triangle|0|KO-BKO-GKO:-BGKO +multipolygon0|4326|Tin|0|KO-BKO-GKO:-BGKO +multipolygon0|4326|Point|2|KO-BKO-GKO:-BGKO +multipolygon0|4326|LineString|2|KO-BKO-GKO:-BGKO +multipolygon0|4326|Polygon|2|KO-BKO-GKO:-BGKO +multipolygon0|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +multipolygon0|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +multipolygon0|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +multipolygon0|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipolygon0|4326|CircularString|2|KO-BKO-GKO:-BGKO +multipolygon0|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipolygon0|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipolygon0|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +multipolygon0|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +multipolygon0|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipolygon0|4326|Triangle|2|KO-BKO-GKO:-BGKO +multipolygon0|4326|Point|1|KO-BKO-GKO:-BGKO +multipolygon0|4326|LineString|1|KO-BKO-GKO:-BGKO +multipolygon0|4326|Polygon|1|KO-BKO-GKO:-BGKO +multipolygon0|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +multipolygon0|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +multipolygon0|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +multipolygon0|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipolygon0|4326|CircularString|1|KO-BKO-GKO:-BGKO +multipolygon0|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipolygon0|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipolygon0|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +multipolygon0|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +multipolygon0|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipolygon0|4326|Triangle|1|KO-BKO-GKO:-BGKO +multipolygon0|4326|Point|3|KO-BKO-GKO:-BGKO +multipolygon0|4326|LineString|3|KO-BKO-GKO:-BGKO +multipolygon0|4326|Polygon|3|KO-BKO-GKO:-BGKO +multipolygon0|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +multipolygon0|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +multipolygon0|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +multipolygon0|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipolygon0|4326|CircularString|3|KO-BKO-GKO:-BGKO +multipolygon0|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipolygon0|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipolygon0|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +multipolygon0|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +multipolygon0|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipolygon0|4326|Triangle|3|KO-BKO-GKO:-BGKO +multipolygon0||COUNT|4| +multipolygon0||GCOUNT|4| +multipolygon4326|0|Point|0|KO-BKO-GKO:-BGKO +multipolygon4326|0|LineString|0|KO-BKO-GKO:-BGKO +multipolygon4326|0|Polygon|0|KO-BKO-GKO:-BGKO +multipolygon4326|0|MultiPoint|0|KO-BKO-GKO:-BGKO +multipolygon4326|0|MultiLineString|0|KO-BKO-GKO:-BGKO +multipolygon4326|0|MultiPolygon|0|KO-BKO-GOK-BGOK +multipolygon4326|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipolygon4326|0|CircularString|0|KO-BKO-GKO:-BGKO +multipolygon4326|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipolygon4326|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipolygon4326|0|MultiCurve|0|KO-BKO-GKO:-BGKO +multipolygon4326|0|MultiSurface|0|KO-BKO-GKO:-BGKO +multipolygon4326|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipolygon4326|0|Triangle|0|KO-BKO-GKO:-BGKO +multipolygon4326|0|Tin|0|KO-BKO-GKO:-BGKO +multipolygon4326|0|Point|2|KO-BKO-GKO:-BGKO +multipolygon4326|0|LineString|2|KO-BKO-GKO:-BGKO +multipolygon4326|0|Polygon|2|KO-BKO-GKO:-BGKO +multipolygon4326|0|MultiPoint|2|KO-BKO-GKO:-BGKO +multipolygon4326|0|MultiLineString|2|KO-BKO-GKO:-BGKO +multipolygon4326|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +multipolygon4326|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipolygon4326|0|CircularString|2|KO-BKO-GKO:-BGKO +multipolygon4326|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipolygon4326|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipolygon4326|0|MultiCurve|2|KO-BKO-GKO:-BGKO +multipolygon4326|0|MultiSurface|2|KO-BKO-GKO:-BGKO +multipolygon4326|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipolygon4326|0|Triangle|2|KO-BKO-GKO:-BGKO +multipolygon4326|0|Point|1|KO-BKO-GKO:-BGKO +multipolygon4326|0|LineString|1|KO-BKO-GKO:-BGKO +multipolygon4326|0|Polygon|1|KO-BKO-GKO:-BGKO +multipolygon4326|0|MultiPoint|1|KO-BKO-GKO:-BGKO +multipolygon4326|0|MultiLineString|1|KO-BKO-GKO:-BGKO +multipolygon4326|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +multipolygon4326|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipolygon4326|0|CircularString|1|KO-BKO-GKO:-BGKO +multipolygon4326|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipolygon4326|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipolygon4326|0|MultiCurve|1|KO-BKO-GKO:-BGKO +multipolygon4326|0|MultiSurface|1|KO-BKO-GKO:-BGKO +multipolygon4326|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipolygon4326|0|Triangle|1|KO-BKO-GKO:-BGKO +multipolygon4326|0|Point|3|KO-BKO-GKO:-BGKO +multipolygon4326|0|LineString|3|KO-BKO-GKO:-BGKO +multipolygon4326|0|Polygon|3|KO-BKO-GKO:-BGKO +multipolygon4326|0|MultiPoint|3|KO-BKO-GKO:-BGKO +multipolygon4326|0|MultiLineString|3|KO-BKO-GKO:-BGKO +multipolygon4326|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +multipolygon4326|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipolygon4326|0|CircularString|3|KO-BKO-GKO:-BGKO +multipolygon4326|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipolygon4326|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipolygon4326|0|MultiCurve|3|KO-BKO-GKO:-BGKO +multipolygon4326|0|MultiSurface|3|KO-BKO-GKO:-BGKO +multipolygon4326|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipolygon4326|0|Triangle|3|KO-BKO-GKO:-BGKO +multipolygon4326|4326|Point|0|KO-BKO-GKO:-BGKO +multipolygon4326|4326|LineString|0|KO-BKO-GKO:-BGKO +multipolygon4326|4326|Polygon|0|KO-BKO-GKO:-BGKO +multipolygon4326|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +multipolygon4326|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +multipolygon4326|4326|MultiPolygon|0|OK-BOK-GOK-BGOK +multipolygon4326|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipolygon4326|4326|CircularString|0|KO-BKO-GKO:-BGKO +multipolygon4326|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipolygon4326|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipolygon4326|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +multipolygon4326|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +multipolygon4326|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipolygon4326|4326|Triangle|0|KO-BKO-GKO:-BGKO +multipolygon4326|4326|Tin|0|KO-BKO-GKO:-BGKO +multipolygon4326|4326|Point|2|KO-BKO-GKO:-BGKO +multipolygon4326|4326|LineString|2|KO-BKO-GKO:-BGKO +multipolygon4326|4326|Polygon|2|KO-BKO-GKO:-BGKO +multipolygon4326|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +multipolygon4326|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +multipolygon4326|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +multipolygon4326|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipolygon4326|4326|CircularString|2|KO-BKO-GKO:-BGKO +multipolygon4326|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipolygon4326|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipolygon4326|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +multipolygon4326|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +multipolygon4326|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipolygon4326|4326|Triangle|2|KO-BKO-GKO:-BGKO +multipolygon4326|4326|Point|1|KO-BKO-GKO:-BGKO +multipolygon4326|4326|LineString|1|KO-BKO-GKO:-BGKO +multipolygon4326|4326|Polygon|1|KO-BKO-GKO:-BGKO +multipolygon4326|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +multipolygon4326|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +multipolygon4326|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +multipolygon4326|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipolygon4326|4326|CircularString|1|KO-BKO-GKO:-BGKO +multipolygon4326|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipolygon4326|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipolygon4326|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +multipolygon4326|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +multipolygon4326|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipolygon4326|4326|Triangle|1|KO-BKO-GKO:-BGKO +multipolygon4326|4326|Point|3|KO-BKO-GKO:-BGKO +multipolygon4326|4326|LineString|3|KO-BKO-GKO:-BGKO +multipolygon4326|4326|Polygon|3|KO-BKO-GKO:-BGKO +multipolygon4326|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +multipolygon4326|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +multipolygon4326|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +multipolygon4326|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipolygon4326|4326|CircularString|3|KO-BKO-GKO:-BGKO +multipolygon4326|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipolygon4326|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipolygon4326|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +multipolygon4326|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +multipolygon4326|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipolygon4326|4326|Triangle|3|KO-BKO-GKO:-BGKO +multipolygon4326||COUNT|2| +multipolygon4326||GCOUNT|4| +multipolygonm|0|Point|0|KO-BKO-GKO:-BGKO +multipolygonm|0|LineString|0|KO-BKO-GKO:-BGKO +multipolygonm|0|Polygon|0|KO-BKO-GKO:-BGKO +multipolygonm|0|MultiPoint|0|KO-BKO-GKO:-BGKO +multipolygonm|0|MultiLineString|0|KO-BKO-GKO:-BGKO +multipolygonm|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +multipolygonm|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipolygonm|0|CircularString|0|KO-BKO-GKO:-BGKO +multipolygonm|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipolygonm|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipolygonm|0|MultiCurve|0|KO-BKO-GKO:-BGKO +multipolygonm|0|MultiSurface|0|KO-BKO-GKO:-BGKO +multipolygonm|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipolygonm|0|Triangle|0|KO-BKO-GKO:-BGKO +multipolygonm|0|Tin|0|KO-BKO-GKO:-BGKO +multipolygonm|0|Point|2|KO-BKO-GKO:-BGKO +multipolygonm|0|LineString|2|KO-BKO-GKO:-BGKO +multipolygonm|0|Polygon|2|KO-BKO-GKO:-BGKO +multipolygonm|0|MultiPoint|2|KO-BKO-GKO:-BGKO +multipolygonm|0|MultiLineString|2|KO-BKO-GKO:-BGKO +multipolygonm|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +multipolygonm|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipolygonm|0|CircularString|2|KO-BKO-GKO:-BGKO +multipolygonm|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipolygonm|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipolygonm|0|MultiCurve|2|KO-BKO-GKO:-BGKO +multipolygonm|0|MultiSurface|2|KO-BKO-GKO:-BGKO +multipolygonm|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipolygonm|0|Triangle|2|KO-BKO-GKO:-BGKO +multipolygonm|0|Point|1|KO-BKO-GKO:-BGKO +multipolygonm|0|LineString|1|KO-BKO-GKO:-BGKO +multipolygonm|0|Polygon|1|KO-BKO-GKO:-BGKO +multipolygonm|0|MultiPoint|1|KO-BKO-GKO:-BGKO +multipolygonm|0|MultiLineString|1|KO-BKO-GKO:-BGKO +multipolygonm|0|MultiPolygon|1|OK-BOK-GOK-BGOK +multipolygonm|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipolygonm|0|CircularString|1|KO-BKO-GKO:-BGKO +multipolygonm|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipolygonm|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipolygonm|0|MultiCurve|1|KO-BKO-GKO:-BGKO +multipolygonm|0|MultiSurface|1|KO-BKO-GKO:-BGKO +multipolygonm|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipolygonm|0|Triangle|1|KO-BKO-GKO:-BGKO +multipolygonm|0|Point|3|KO-BKO-GKO:-BGKO +multipolygonm|0|LineString|3|KO-BKO-GKO:-BGKO +multipolygonm|0|Polygon|3|KO-BKO-GKO:-BGKO +multipolygonm|0|MultiPoint|3|KO-BKO-GKO:-BGKO +multipolygonm|0|MultiLineString|3|KO-BKO-GKO:-BGKO +multipolygonm|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +multipolygonm|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipolygonm|0|CircularString|3|KO-BKO-GKO:-BGKO +multipolygonm|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipolygonm|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipolygonm|0|MultiCurve|3|KO-BKO-GKO:-BGKO +multipolygonm|0|MultiSurface|3|KO-BKO-GKO:-BGKO +multipolygonm|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipolygonm|0|Triangle|3|KO-BKO-GKO:-BGKO +multipolygonm|4326|Point|0|KO-BKO-GKO:-BGKO +multipolygonm|4326|LineString|0|KO-BKO-GKO:-BGKO +multipolygonm|4326|Polygon|0|KO-BKO-GKO:-BGKO +multipolygonm|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +multipolygonm|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +multipolygonm|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +multipolygonm|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipolygonm|4326|CircularString|0|KO-BKO-GKO:-BGKO +multipolygonm|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipolygonm|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipolygonm|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +multipolygonm|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +multipolygonm|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipolygonm|4326|Triangle|0|KO-BKO-GKO:-BGKO +multipolygonm|4326|Tin|0|KO-BKO-GKO:-BGKO +multipolygonm|4326|Point|2|KO-BKO-GKO:-BGKO +multipolygonm|4326|LineString|2|KO-BKO-GKO:-BGKO +multipolygonm|4326|Polygon|2|KO-BKO-GKO:-BGKO +multipolygonm|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +multipolygonm|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +multipolygonm|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +multipolygonm|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipolygonm|4326|CircularString|2|KO-BKO-GKO:-BGKO +multipolygonm|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipolygonm|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipolygonm|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +multipolygonm|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +multipolygonm|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipolygonm|4326|Triangle|2|KO-BKO-GKO:-BGKO +multipolygonm|4326|Point|1|KO-BKO-GKO:-BGKO +multipolygonm|4326|LineString|1|KO-BKO-GKO:-BGKO +multipolygonm|4326|Polygon|1|KO-BKO-GKO:-BGKO +multipolygonm|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +multipolygonm|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +multipolygonm|4326|MultiPolygon|1|OK-BOK-GOK-BGOK +multipolygonm|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipolygonm|4326|CircularString|1|KO-BKO-GKO:-BGKO +multipolygonm|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipolygonm|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipolygonm|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +multipolygonm|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +multipolygonm|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipolygonm|4326|Triangle|1|KO-BKO-GKO:-BGKO +multipolygonm|4326|Point|3|KO-BKO-GKO:-BGKO +multipolygonm|4326|LineString|3|KO-BKO-GKO:-BGKO +multipolygonm|4326|Polygon|3|KO-BKO-GKO:-BGKO +multipolygonm|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +multipolygonm|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +multipolygonm|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +multipolygonm|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipolygonm|4326|CircularString|3|KO-BKO-GKO:-BGKO +multipolygonm|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipolygonm|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipolygonm|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +multipolygonm|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +multipolygonm|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipolygonm|4326|Triangle|3|KO-BKO-GKO:-BGKO +multipolygonm||COUNT|4| +multipolygonm||GCOUNT|4| +multipolygonm0|0|Point|0|KO-BKO-GKO:-BGKO +multipolygonm0|0|LineString|0|KO-BKO-GKO:-BGKO +multipolygonm0|0|Polygon|0|KO-BKO-GKO:-BGKO +multipolygonm0|0|MultiPoint|0|KO-BKO-GKO:-BGKO +multipolygonm0|0|MultiLineString|0|KO-BKO-GKO:-BGKO +multipolygonm0|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +multipolygonm0|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipolygonm0|0|CircularString|0|KO-BKO-GKO:-BGKO +multipolygonm0|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipolygonm0|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipolygonm0|0|MultiCurve|0|KO-BKO-GKO:-BGKO +multipolygonm0|0|MultiSurface|0|KO-BKO-GKO:-BGKO +multipolygonm0|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipolygonm0|0|Triangle|0|KO-BKO-GKO:-BGKO +multipolygonm0|0|Tin|0|KO-BKO-GKO:-BGKO +multipolygonm0|0|Point|2|KO-BKO-GKO:-BGKO +multipolygonm0|0|LineString|2|KO-BKO-GKO:-BGKO +multipolygonm0|0|Polygon|2|KO-BKO-GKO:-BGKO +multipolygonm0|0|MultiPoint|2|KO-BKO-GKO:-BGKO +multipolygonm0|0|MultiLineString|2|KO-BKO-GKO:-BGKO +multipolygonm0|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +multipolygonm0|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipolygonm0|0|CircularString|2|KO-BKO-GKO:-BGKO +multipolygonm0|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipolygonm0|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipolygonm0|0|MultiCurve|2|KO-BKO-GKO:-BGKO +multipolygonm0|0|MultiSurface|2|KO-BKO-GKO:-BGKO +multipolygonm0|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipolygonm0|0|Triangle|2|KO-BKO-GKO:-BGKO +multipolygonm0|0|Point|1|KO-BKO-GKO:-BGKO +multipolygonm0|0|LineString|1|KO-BKO-GKO:-BGKO +multipolygonm0|0|Polygon|1|KO-BKO-GKO:-BGKO +multipolygonm0|0|MultiPoint|1|KO-BKO-GKO:-BGKO +multipolygonm0|0|MultiLineString|1|KO-BKO-GKO:-BGKO +multipolygonm0|0|MultiPolygon|1|OK-BOK-GOK-BGOK +multipolygonm0|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipolygonm0|0|CircularString|1|KO-BKO-GKO:-BGKO +multipolygonm0|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipolygonm0|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipolygonm0|0|MultiCurve|1|KO-BKO-GKO:-BGKO +multipolygonm0|0|MultiSurface|1|KO-BKO-GKO:-BGKO +multipolygonm0|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipolygonm0|0|Triangle|1|KO-BKO-GKO:-BGKO +multipolygonm0|0|Point|3|KO-BKO-GKO:-BGKO +multipolygonm0|0|LineString|3|KO-BKO-GKO:-BGKO +multipolygonm0|0|Polygon|3|KO-BKO-GKO:-BGKO +multipolygonm0|0|MultiPoint|3|KO-BKO-GKO:-BGKO +multipolygonm0|0|MultiLineString|3|KO-BKO-GKO:-BGKO +multipolygonm0|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +multipolygonm0|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipolygonm0|0|CircularString|3|KO-BKO-GKO:-BGKO +multipolygonm0|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipolygonm0|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipolygonm0|0|MultiCurve|3|KO-BKO-GKO:-BGKO +multipolygonm0|0|MultiSurface|3|KO-BKO-GKO:-BGKO +multipolygonm0|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipolygonm0|0|Triangle|3|KO-BKO-GKO:-BGKO +multipolygonm0|4326|Point|0|KO-BKO-GKO:-BGKO +multipolygonm0|4326|LineString|0|KO-BKO-GKO:-BGKO +multipolygonm0|4326|Polygon|0|KO-BKO-GKO:-BGKO +multipolygonm0|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +multipolygonm0|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +multipolygonm0|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +multipolygonm0|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipolygonm0|4326|CircularString|0|KO-BKO-GKO:-BGKO +multipolygonm0|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipolygonm0|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipolygonm0|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +multipolygonm0|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +multipolygonm0|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipolygonm0|4326|Triangle|0|KO-BKO-GKO:-BGKO +multipolygonm0|4326|Tin|0|KO-BKO-GKO:-BGKO +multipolygonm0|4326|Point|2|KO-BKO-GKO:-BGKO +multipolygonm0|4326|LineString|2|KO-BKO-GKO:-BGKO +multipolygonm0|4326|Polygon|2|KO-BKO-GKO:-BGKO +multipolygonm0|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +multipolygonm0|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +multipolygonm0|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +multipolygonm0|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipolygonm0|4326|CircularString|2|KO-BKO-GKO:-BGKO +multipolygonm0|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipolygonm0|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipolygonm0|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +multipolygonm0|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +multipolygonm0|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipolygonm0|4326|Triangle|2|KO-BKO-GKO:-BGKO +multipolygonm0|4326|Point|1|KO-BKO-GKO:-BGKO +multipolygonm0|4326|LineString|1|KO-BKO-GKO:-BGKO +multipolygonm0|4326|Polygon|1|KO-BKO-GKO:-BGKO +multipolygonm0|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +multipolygonm0|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +multipolygonm0|4326|MultiPolygon|1|OK-BOK-GOK-BGOK +multipolygonm0|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipolygonm0|4326|CircularString|1|KO-BKO-GKO:-BGKO +multipolygonm0|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipolygonm0|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipolygonm0|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +multipolygonm0|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +multipolygonm0|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipolygonm0|4326|Triangle|1|KO-BKO-GKO:-BGKO +multipolygonm0|4326|Point|3|KO-BKO-GKO:-BGKO +multipolygonm0|4326|LineString|3|KO-BKO-GKO:-BGKO +multipolygonm0|4326|Polygon|3|KO-BKO-GKO:-BGKO +multipolygonm0|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +multipolygonm0|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +multipolygonm0|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +multipolygonm0|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipolygonm0|4326|CircularString|3|KO-BKO-GKO:-BGKO +multipolygonm0|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipolygonm0|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipolygonm0|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +multipolygonm0|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +multipolygonm0|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipolygonm0|4326|Triangle|3|KO-BKO-GKO:-BGKO +multipolygonm0||COUNT|4| +multipolygonm0||GCOUNT|4| +multipolygonm4326|0|Point|0|KO-BKO-GKO:-BGKO +multipolygonm4326|0|LineString|0|KO-BKO-GKO:-BGKO +multipolygonm4326|0|Polygon|0|KO-BKO-GKO:-BGKO +multipolygonm4326|0|MultiPoint|0|KO-BKO-GKO:-BGKO +multipolygonm4326|0|MultiLineString|0|KO-BKO-GKO:-BGKO +multipolygonm4326|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +multipolygonm4326|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipolygonm4326|0|CircularString|0|KO-BKO-GKO:-BGKO +multipolygonm4326|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipolygonm4326|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipolygonm4326|0|MultiCurve|0|KO-BKO-GKO:-BGKO +multipolygonm4326|0|MultiSurface|0|KO-BKO-GKO:-BGKO +multipolygonm4326|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipolygonm4326|0|Triangle|0|KO-BKO-GKO:-BGKO +multipolygonm4326|0|Tin|0|KO-BKO-GKO:-BGKO +multipolygonm4326|0|Point|2|KO-BKO-GKO:-BGKO +multipolygonm4326|0|LineString|2|KO-BKO-GKO:-BGKO +multipolygonm4326|0|Polygon|2|KO-BKO-GKO:-BGKO +multipolygonm4326|0|MultiPoint|2|KO-BKO-GKO:-BGKO +multipolygonm4326|0|MultiLineString|2|KO-BKO-GKO:-BGKO +multipolygonm4326|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +multipolygonm4326|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipolygonm4326|0|CircularString|2|KO-BKO-GKO:-BGKO +multipolygonm4326|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipolygonm4326|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipolygonm4326|0|MultiCurve|2|KO-BKO-GKO:-BGKO +multipolygonm4326|0|MultiSurface|2|KO-BKO-GKO:-BGKO +multipolygonm4326|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipolygonm4326|0|Triangle|2|KO-BKO-GKO:-BGKO +multipolygonm4326|0|Point|1|KO-BKO-GKO:-BGKO +multipolygonm4326|0|LineString|1|KO-BKO-GKO:-BGKO +multipolygonm4326|0|Polygon|1|KO-BKO-GKO:-BGKO +multipolygonm4326|0|MultiPoint|1|KO-BKO-GKO:-BGKO +multipolygonm4326|0|MultiLineString|1|KO-BKO-GKO:-BGKO +multipolygonm4326|0|MultiPolygon|1|KO-BKO-GOK-BGOK +multipolygonm4326|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipolygonm4326|0|CircularString|1|KO-BKO-GKO:-BGKO +multipolygonm4326|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipolygonm4326|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipolygonm4326|0|MultiCurve|1|KO-BKO-GKO:-BGKO +multipolygonm4326|0|MultiSurface|1|KO-BKO-GKO:-BGKO +multipolygonm4326|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipolygonm4326|0|Triangle|1|KO-BKO-GKO:-BGKO +multipolygonm4326|0|Point|3|KO-BKO-GKO:-BGKO +multipolygonm4326|0|LineString|3|KO-BKO-GKO:-BGKO +multipolygonm4326|0|Polygon|3|KO-BKO-GKO:-BGKO +multipolygonm4326|0|MultiPoint|3|KO-BKO-GKO:-BGKO +multipolygonm4326|0|MultiLineString|3|KO-BKO-GKO:-BGKO +multipolygonm4326|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +multipolygonm4326|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipolygonm4326|0|CircularString|3|KO-BKO-GKO:-BGKO +multipolygonm4326|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipolygonm4326|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipolygonm4326|0|MultiCurve|3|KO-BKO-GKO:-BGKO +multipolygonm4326|0|MultiSurface|3|KO-BKO-GKO:-BGKO +multipolygonm4326|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipolygonm4326|0|Triangle|3|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|Point|0|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|LineString|0|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|Polygon|0|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|CircularString|0|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|Triangle|0|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|Tin|0|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|Point|2|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|LineString|2|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|Polygon|2|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|CircularString|2|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|Triangle|2|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|Point|1|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|LineString|1|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|Polygon|1|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|MultiPolygon|1|OK-BOK-GOK-BGOK +multipolygonm4326|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|CircularString|1|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|Triangle|1|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|Point|3|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|LineString|3|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|Polygon|3|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|CircularString|3|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipolygonm4326|4326|Triangle|3|KO-BKO-GKO:-BGKO +multipolygonm4326||COUNT|2| +multipolygonm4326||GCOUNT|4| +multipolygonz|0|Point|0|KO-BKO-GKO:-BGKO +multipolygonz|0|LineString|0|KO-BKO-GKO:-BGKO +multipolygonz|0|Polygon|0|KO-BKO-GKO:-BGKO +multipolygonz|0|MultiPoint|0|KO-BKO-GKO:-BGKO +multipolygonz|0|MultiLineString|0|KO-BKO-GKO:-BGKO +multipolygonz|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +multipolygonz|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipolygonz|0|CircularString|0|KO-BKO-GKO:-BGKO +multipolygonz|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipolygonz|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipolygonz|0|MultiCurve|0|KO-BKO-GKO:-BGKO +multipolygonz|0|MultiSurface|0|KO-BKO-GKO:-BGKO +multipolygonz|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipolygonz|0|Triangle|0|KO-BKO-GKO:-BGKO +multipolygonz|0|Tin|0|KO-BKO-GKO:-BGKO +multipolygonz|0|Point|2|KO-BKO-GKO:-BGKO +multipolygonz|0|LineString|2|KO-BKO-GKO:-BGKO +multipolygonz|0|Polygon|2|KO-BKO-GKO:-BGKO +multipolygonz|0|MultiPoint|2|KO-BKO-GKO:-BGKO +multipolygonz|0|MultiLineString|2|KO-BKO-GKO:-BGKO +multipolygonz|0|MultiPolygon|2|OK-BOK-GOK-BGOK +multipolygonz|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipolygonz|0|CircularString|2|KO-BKO-GKO:-BGKO +multipolygonz|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipolygonz|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipolygonz|0|MultiCurve|2|KO-BKO-GKO:-BGKO +multipolygonz|0|MultiSurface|2|KO-BKO-GKO:-BGKO +multipolygonz|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipolygonz|0|Triangle|2|KO-BKO-GKO:-BGKO +multipolygonz|0|Point|1|KO-BKO-GKO:-BGKO +multipolygonz|0|LineString|1|KO-BKO-GKO:-BGKO +multipolygonz|0|Polygon|1|KO-BKO-GKO:-BGKO +multipolygonz|0|MultiPoint|1|KO-BKO-GKO:-BGKO +multipolygonz|0|MultiLineString|1|KO-BKO-GKO:-BGKO +multipolygonz|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +multipolygonz|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipolygonz|0|CircularString|1|KO-BKO-GKO:-BGKO +multipolygonz|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipolygonz|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipolygonz|0|MultiCurve|1|KO-BKO-GKO:-BGKO +multipolygonz|0|MultiSurface|1|KO-BKO-GKO:-BGKO +multipolygonz|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipolygonz|0|Triangle|1|KO-BKO-GKO:-BGKO +multipolygonz|0|Point|3|KO-BKO-GKO:-BGKO +multipolygonz|0|LineString|3|KO-BKO-GKO:-BGKO +multipolygonz|0|Polygon|3|KO-BKO-GKO:-BGKO +multipolygonz|0|MultiPoint|3|KO-BKO-GKO:-BGKO +multipolygonz|0|MultiLineString|3|KO-BKO-GKO:-BGKO +multipolygonz|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +multipolygonz|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipolygonz|0|CircularString|3|KO-BKO-GKO:-BGKO +multipolygonz|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipolygonz|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipolygonz|0|MultiCurve|3|KO-BKO-GKO:-BGKO +multipolygonz|0|MultiSurface|3|KO-BKO-GKO:-BGKO +multipolygonz|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipolygonz|0|Triangle|3|KO-BKO-GKO:-BGKO +multipolygonz|4326|Point|0|KO-BKO-GKO:-BGKO +multipolygonz|4326|LineString|0|KO-BKO-GKO:-BGKO +multipolygonz|4326|Polygon|0|KO-BKO-GKO:-BGKO +multipolygonz|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +multipolygonz|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +multipolygonz|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +multipolygonz|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipolygonz|4326|CircularString|0|KO-BKO-GKO:-BGKO +multipolygonz|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipolygonz|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipolygonz|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +multipolygonz|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +multipolygonz|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipolygonz|4326|Triangle|0|KO-BKO-GKO:-BGKO +multipolygonz|4326|Tin|0|KO-BKO-GKO:-BGKO +multipolygonz|4326|Point|2|KO-BKO-GKO:-BGKO +multipolygonz|4326|LineString|2|KO-BKO-GKO:-BGKO +multipolygonz|4326|Polygon|2|KO-BKO-GKO:-BGKO +multipolygonz|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +multipolygonz|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +multipolygonz|4326|MultiPolygon|2|OK-BOK-GOK-BGOK +multipolygonz|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipolygonz|4326|CircularString|2|KO-BKO-GKO:-BGKO +multipolygonz|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipolygonz|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipolygonz|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +multipolygonz|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +multipolygonz|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipolygonz|4326|Triangle|2|KO-BKO-GKO:-BGKO +multipolygonz|4326|Point|1|KO-BKO-GKO:-BGKO +multipolygonz|4326|LineString|1|KO-BKO-GKO:-BGKO +multipolygonz|4326|Polygon|1|KO-BKO-GKO:-BGKO +multipolygonz|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +multipolygonz|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +multipolygonz|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +multipolygonz|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipolygonz|4326|CircularString|1|KO-BKO-GKO:-BGKO +multipolygonz|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipolygonz|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipolygonz|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +multipolygonz|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +multipolygonz|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipolygonz|4326|Triangle|1|KO-BKO-GKO:-BGKO +multipolygonz|4326|Point|3|KO-BKO-GKO:-BGKO +multipolygonz|4326|LineString|3|KO-BKO-GKO:-BGKO +multipolygonz|4326|Polygon|3|KO-BKO-GKO:-BGKO +multipolygonz|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +multipolygonz|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +multipolygonz|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +multipolygonz|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipolygonz|4326|CircularString|3|KO-BKO-GKO:-BGKO +multipolygonz|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipolygonz|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipolygonz|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +multipolygonz|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +multipolygonz|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipolygonz|4326|Triangle|3|KO-BKO-GKO:-BGKO +multipolygonz||COUNT|4| +multipolygonz||GCOUNT|4| +multipolygonz0|0|Point|0|KO-BKO-GKO:-BGKO +multipolygonz0|0|LineString|0|KO-BKO-GKO:-BGKO +multipolygonz0|0|Polygon|0|KO-BKO-GKO:-BGKO +multipolygonz0|0|MultiPoint|0|KO-BKO-GKO:-BGKO +multipolygonz0|0|MultiLineString|0|KO-BKO-GKO:-BGKO +multipolygonz0|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +multipolygonz0|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipolygonz0|0|CircularString|0|KO-BKO-GKO:-BGKO +multipolygonz0|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipolygonz0|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipolygonz0|0|MultiCurve|0|KO-BKO-GKO:-BGKO +multipolygonz0|0|MultiSurface|0|KO-BKO-GKO:-BGKO +multipolygonz0|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipolygonz0|0|Triangle|0|KO-BKO-GKO:-BGKO +multipolygonz0|0|Tin|0|KO-BKO-GKO:-BGKO +multipolygonz0|0|Point|2|KO-BKO-GKO:-BGKO +multipolygonz0|0|LineString|2|KO-BKO-GKO:-BGKO +multipolygonz0|0|Polygon|2|KO-BKO-GKO:-BGKO +multipolygonz0|0|MultiPoint|2|KO-BKO-GKO:-BGKO +multipolygonz0|0|MultiLineString|2|KO-BKO-GKO:-BGKO +multipolygonz0|0|MultiPolygon|2|OK-BOK-GOK-BGOK +multipolygonz0|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipolygonz0|0|CircularString|2|KO-BKO-GKO:-BGKO +multipolygonz0|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipolygonz0|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipolygonz0|0|MultiCurve|2|KO-BKO-GKO:-BGKO +multipolygonz0|0|MultiSurface|2|KO-BKO-GKO:-BGKO +multipolygonz0|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipolygonz0|0|Triangle|2|KO-BKO-GKO:-BGKO +multipolygonz0|0|Point|1|KO-BKO-GKO:-BGKO +multipolygonz0|0|LineString|1|KO-BKO-GKO:-BGKO +multipolygonz0|0|Polygon|1|KO-BKO-GKO:-BGKO +multipolygonz0|0|MultiPoint|1|KO-BKO-GKO:-BGKO +multipolygonz0|0|MultiLineString|1|KO-BKO-GKO:-BGKO +multipolygonz0|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +multipolygonz0|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipolygonz0|0|CircularString|1|KO-BKO-GKO:-BGKO +multipolygonz0|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipolygonz0|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipolygonz0|0|MultiCurve|1|KO-BKO-GKO:-BGKO +multipolygonz0|0|MultiSurface|1|KO-BKO-GKO:-BGKO +multipolygonz0|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipolygonz0|0|Triangle|1|KO-BKO-GKO:-BGKO +multipolygonz0|0|Point|3|KO-BKO-GKO:-BGKO +multipolygonz0|0|LineString|3|KO-BKO-GKO:-BGKO +multipolygonz0|0|Polygon|3|KO-BKO-GKO:-BGKO +multipolygonz0|0|MultiPoint|3|KO-BKO-GKO:-BGKO +multipolygonz0|0|MultiLineString|3|KO-BKO-GKO:-BGKO +multipolygonz0|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +multipolygonz0|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipolygonz0|0|CircularString|3|KO-BKO-GKO:-BGKO +multipolygonz0|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipolygonz0|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipolygonz0|0|MultiCurve|3|KO-BKO-GKO:-BGKO +multipolygonz0|0|MultiSurface|3|KO-BKO-GKO:-BGKO +multipolygonz0|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipolygonz0|0|Triangle|3|KO-BKO-GKO:-BGKO +multipolygonz0|4326|Point|0|KO-BKO-GKO:-BGKO +multipolygonz0|4326|LineString|0|KO-BKO-GKO:-BGKO +multipolygonz0|4326|Polygon|0|KO-BKO-GKO:-BGKO +multipolygonz0|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +multipolygonz0|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +multipolygonz0|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +multipolygonz0|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipolygonz0|4326|CircularString|0|KO-BKO-GKO:-BGKO +multipolygonz0|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipolygonz0|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipolygonz0|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +multipolygonz0|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +multipolygonz0|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipolygonz0|4326|Triangle|0|KO-BKO-GKO:-BGKO +multipolygonz0|4326|Tin|0|KO-BKO-GKO:-BGKO +multipolygonz0|4326|Point|2|KO-BKO-GKO:-BGKO +multipolygonz0|4326|LineString|2|KO-BKO-GKO:-BGKO +multipolygonz0|4326|Polygon|2|KO-BKO-GKO:-BGKO +multipolygonz0|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +multipolygonz0|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +multipolygonz0|4326|MultiPolygon|2|OK-BOK-GOK-BGOK +multipolygonz0|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipolygonz0|4326|CircularString|2|KO-BKO-GKO:-BGKO +multipolygonz0|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipolygonz0|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipolygonz0|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +multipolygonz0|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +multipolygonz0|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipolygonz0|4326|Triangle|2|KO-BKO-GKO:-BGKO +multipolygonz0|4326|Point|1|KO-BKO-GKO:-BGKO +multipolygonz0|4326|LineString|1|KO-BKO-GKO:-BGKO +multipolygonz0|4326|Polygon|1|KO-BKO-GKO:-BGKO +multipolygonz0|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +multipolygonz0|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +multipolygonz0|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +multipolygonz0|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipolygonz0|4326|CircularString|1|KO-BKO-GKO:-BGKO +multipolygonz0|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipolygonz0|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipolygonz0|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +multipolygonz0|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +multipolygonz0|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipolygonz0|4326|Triangle|1|KO-BKO-GKO:-BGKO +multipolygonz0|4326|Point|3|KO-BKO-GKO:-BGKO +multipolygonz0|4326|LineString|3|KO-BKO-GKO:-BGKO +multipolygonz0|4326|Polygon|3|KO-BKO-GKO:-BGKO +multipolygonz0|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +multipolygonz0|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +multipolygonz0|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +multipolygonz0|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipolygonz0|4326|CircularString|3|KO-BKO-GKO:-BGKO +multipolygonz0|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipolygonz0|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipolygonz0|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +multipolygonz0|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +multipolygonz0|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipolygonz0|4326|Triangle|3|KO-BKO-GKO:-BGKO +multipolygonz0||COUNT|4| +multipolygonz0||GCOUNT|4| +multipolygonz4326|0|Point|0|KO-BKO-GKO:-BGKO +multipolygonz4326|0|LineString|0|KO-BKO-GKO:-BGKO +multipolygonz4326|0|Polygon|0|KO-BKO-GKO:-BGKO +multipolygonz4326|0|MultiPoint|0|KO-BKO-GKO:-BGKO +multipolygonz4326|0|MultiLineString|0|KO-BKO-GKO:-BGKO +multipolygonz4326|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +multipolygonz4326|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipolygonz4326|0|CircularString|0|KO-BKO-GKO:-BGKO +multipolygonz4326|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipolygonz4326|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipolygonz4326|0|MultiCurve|0|KO-BKO-GKO:-BGKO +multipolygonz4326|0|MultiSurface|0|KO-BKO-GKO:-BGKO +multipolygonz4326|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipolygonz4326|0|Triangle|0|KO-BKO-GKO:-BGKO +multipolygonz4326|0|Tin|0|KO-BKO-GKO:-BGKO +multipolygonz4326|0|Point|2|KO-BKO-GKO:-BGKO +multipolygonz4326|0|LineString|2|KO-BKO-GKO:-BGKO +multipolygonz4326|0|Polygon|2|KO-BKO-GKO:-BGKO +multipolygonz4326|0|MultiPoint|2|KO-BKO-GKO:-BGKO +multipolygonz4326|0|MultiLineString|2|KO-BKO-GKO:-BGKO +multipolygonz4326|0|MultiPolygon|2|KO-BKO-GOK-BGOK +multipolygonz4326|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipolygonz4326|0|CircularString|2|KO-BKO-GKO:-BGKO +multipolygonz4326|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipolygonz4326|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipolygonz4326|0|MultiCurve|2|KO-BKO-GKO:-BGKO +multipolygonz4326|0|MultiSurface|2|KO-BKO-GKO:-BGKO +multipolygonz4326|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipolygonz4326|0|Triangle|2|KO-BKO-GKO:-BGKO +multipolygonz4326|0|Point|1|KO-BKO-GKO:-BGKO +multipolygonz4326|0|LineString|1|KO-BKO-GKO:-BGKO +multipolygonz4326|0|Polygon|1|KO-BKO-GKO:-BGKO +multipolygonz4326|0|MultiPoint|1|KO-BKO-GKO:-BGKO +multipolygonz4326|0|MultiLineString|1|KO-BKO-GKO:-BGKO +multipolygonz4326|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +multipolygonz4326|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipolygonz4326|0|CircularString|1|KO-BKO-GKO:-BGKO +multipolygonz4326|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipolygonz4326|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipolygonz4326|0|MultiCurve|1|KO-BKO-GKO:-BGKO +multipolygonz4326|0|MultiSurface|1|KO-BKO-GKO:-BGKO +multipolygonz4326|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipolygonz4326|0|Triangle|1|KO-BKO-GKO:-BGKO +multipolygonz4326|0|Point|3|KO-BKO-GKO:-BGKO +multipolygonz4326|0|LineString|3|KO-BKO-GKO:-BGKO +multipolygonz4326|0|Polygon|3|KO-BKO-GKO:-BGKO +multipolygonz4326|0|MultiPoint|3|KO-BKO-GKO:-BGKO +multipolygonz4326|0|MultiLineString|3|KO-BKO-GKO:-BGKO +multipolygonz4326|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +multipolygonz4326|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipolygonz4326|0|CircularString|3|KO-BKO-GKO:-BGKO +multipolygonz4326|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipolygonz4326|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipolygonz4326|0|MultiCurve|3|KO-BKO-GKO:-BGKO +multipolygonz4326|0|MultiSurface|3|KO-BKO-GKO:-BGKO +multipolygonz4326|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipolygonz4326|0|Triangle|3|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|Point|0|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|LineString|0|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|Polygon|0|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|CircularString|0|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|Triangle|0|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|Tin|0|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|Point|2|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|LineString|2|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|Polygon|2|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|MultiPolygon|2|OK-BOK-GOK-BGOK +multipolygonz4326|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|CircularString|2|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|Triangle|2|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|Point|1|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|LineString|1|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|Polygon|1|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|CircularString|1|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|Triangle|1|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|Point|3|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|LineString|3|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|Polygon|3|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|CircularString|3|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipolygonz4326|4326|Triangle|3|KO-BKO-GKO:-BGKO +multipolygonz4326||COUNT|2| +multipolygonz4326||GCOUNT|4| +multipolygonzm|0|Point|0|KO-BKO-GKO:-BGKO +multipolygonzm|0|LineString|0|KO-BKO-GKO:-BGKO +multipolygonzm|0|Polygon|0|KO-BKO-GKO:-BGKO +multipolygonzm|0|MultiPoint|0|KO-BKO-GKO:-BGKO +multipolygonzm|0|MultiLineString|0|KO-BKO-GKO:-BGKO +multipolygonzm|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +multipolygonzm|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipolygonzm|0|CircularString|0|KO-BKO-GKO:-BGKO +multipolygonzm|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipolygonzm|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipolygonzm|0|MultiCurve|0|KO-BKO-GKO:-BGKO +multipolygonzm|0|MultiSurface|0|KO-BKO-GKO:-BGKO +multipolygonzm|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipolygonzm|0|Triangle|0|KO-BKO-GKO:-BGKO +multipolygonzm|0|Tin|0|KO-BKO-GKO:-BGKO +multipolygonzm|0|Point|2|KO-BKO-GKO:-BGKO +multipolygonzm|0|LineString|2|KO-BKO-GKO:-BGKO +multipolygonzm|0|Polygon|2|KO-BKO-GKO:-BGKO +multipolygonzm|0|MultiPoint|2|KO-BKO-GKO:-BGKO +multipolygonzm|0|MultiLineString|2|KO-BKO-GKO:-BGKO +multipolygonzm|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +multipolygonzm|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipolygonzm|0|CircularString|2|KO-BKO-GKO:-BGKO +multipolygonzm|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipolygonzm|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipolygonzm|0|MultiCurve|2|KO-BKO-GKO:-BGKO +multipolygonzm|0|MultiSurface|2|KO-BKO-GKO:-BGKO +multipolygonzm|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipolygonzm|0|Triangle|2|KO-BKO-GKO:-BGKO +multipolygonzm|0|Point|1|KO-BKO-GKO:-BGKO +multipolygonzm|0|LineString|1|KO-BKO-GKO:-BGKO +multipolygonzm|0|Polygon|1|KO-BKO-GKO:-BGKO +multipolygonzm|0|MultiPoint|1|KO-BKO-GKO:-BGKO +multipolygonzm|0|MultiLineString|1|KO-BKO-GKO:-BGKO +multipolygonzm|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +multipolygonzm|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipolygonzm|0|CircularString|1|KO-BKO-GKO:-BGKO +multipolygonzm|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipolygonzm|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipolygonzm|0|MultiCurve|1|KO-BKO-GKO:-BGKO +multipolygonzm|0|MultiSurface|1|KO-BKO-GKO:-BGKO +multipolygonzm|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipolygonzm|0|Triangle|1|KO-BKO-GKO:-BGKO +multipolygonzm|0|Point|3|KO-BKO-GKO:-BGKO +multipolygonzm|0|LineString|3|KO-BKO-GKO:-BGKO +multipolygonzm|0|Polygon|3|KO-BKO-GKO:-BGKO +multipolygonzm|0|MultiPoint|3|KO-BKO-GKO:-BGKO +multipolygonzm|0|MultiLineString|3|KO-BKO-GKO:-BGKO +multipolygonzm|0|MultiPolygon|3|OK-BOK-GOK-BGOK +multipolygonzm|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipolygonzm|0|CircularString|3|KO-BKO-GKO:-BGKO +multipolygonzm|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipolygonzm|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipolygonzm|0|MultiCurve|3|KO-BKO-GKO:-BGKO +multipolygonzm|0|MultiSurface|3|KO-BKO-GKO:-BGKO +multipolygonzm|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipolygonzm|0|Triangle|3|KO-BKO-GKO:-BGKO +multipolygonzm|4326|Point|0|KO-BKO-GKO:-BGKO +multipolygonzm|4326|LineString|0|KO-BKO-GKO:-BGKO +multipolygonzm|4326|Polygon|0|KO-BKO-GKO:-BGKO +multipolygonzm|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +multipolygonzm|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +multipolygonzm|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +multipolygonzm|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipolygonzm|4326|CircularString|0|KO-BKO-GKO:-BGKO +multipolygonzm|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipolygonzm|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipolygonzm|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +multipolygonzm|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +multipolygonzm|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipolygonzm|4326|Triangle|0|KO-BKO-GKO:-BGKO +multipolygonzm|4326|Tin|0|KO-BKO-GKO:-BGKO +multipolygonzm|4326|Point|2|KO-BKO-GKO:-BGKO +multipolygonzm|4326|LineString|2|KO-BKO-GKO:-BGKO +multipolygonzm|4326|Polygon|2|KO-BKO-GKO:-BGKO +multipolygonzm|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +multipolygonzm|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +multipolygonzm|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +multipolygonzm|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipolygonzm|4326|CircularString|2|KO-BKO-GKO:-BGKO +multipolygonzm|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipolygonzm|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipolygonzm|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +multipolygonzm|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +multipolygonzm|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipolygonzm|4326|Triangle|2|KO-BKO-GKO:-BGKO +multipolygonzm|4326|Point|1|KO-BKO-GKO:-BGKO +multipolygonzm|4326|LineString|1|KO-BKO-GKO:-BGKO +multipolygonzm|4326|Polygon|1|KO-BKO-GKO:-BGKO +multipolygonzm|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +multipolygonzm|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +multipolygonzm|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +multipolygonzm|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipolygonzm|4326|CircularString|1|KO-BKO-GKO:-BGKO +multipolygonzm|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipolygonzm|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipolygonzm|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +multipolygonzm|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +multipolygonzm|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipolygonzm|4326|Triangle|1|KO-BKO-GKO:-BGKO +multipolygonzm|4326|Point|3|KO-BKO-GKO:-BGKO +multipolygonzm|4326|LineString|3|KO-BKO-GKO:-BGKO +multipolygonzm|4326|Polygon|3|KO-BKO-GKO:-BGKO +multipolygonzm|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +multipolygonzm|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +multipolygonzm|4326|MultiPolygon|3|OK-BOK-GOK-BGOK +multipolygonzm|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipolygonzm|4326|CircularString|3|KO-BKO-GKO:-BGKO +multipolygonzm|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipolygonzm|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipolygonzm|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +multipolygonzm|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +multipolygonzm|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipolygonzm|4326|Triangle|3|KO-BKO-GKO:-BGKO +multipolygonzm||COUNT|4| +multipolygonzm||GCOUNT|4| +multipolygonzm0|0|Point|0|KO-BKO-GKO:-BGKO +multipolygonzm0|0|LineString|0|KO-BKO-GKO:-BGKO +multipolygonzm0|0|Polygon|0|KO-BKO-GKO:-BGKO +multipolygonzm0|0|MultiPoint|0|KO-BKO-GKO:-BGKO +multipolygonzm0|0|MultiLineString|0|KO-BKO-GKO:-BGKO +multipolygonzm0|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +multipolygonzm0|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipolygonzm0|0|CircularString|0|KO-BKO-GKO:-BGKO +multipolygonzm0|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipolygonzm0|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipolygonzm0|0|MultiCurve|0|KO-BKO-GKO:-BGKO +multipolygonzm0|0|MultiSurface|0|KO-BKO-GKO:-BGKO +multipolygonzm0|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipolygonzm0|0|Triangle|0|KO-BKO-GKO:-BGKO +multipolygonzm0|0|Tin|0|KO-BKO-GKO:-BGKO +multipolygonzm0|0|Point|2|KO-BKO-GKO:-BGKO +multipolygonzm0|0|LineString|2|KO-BKO-GKO:-BGKO +multipolygonzm0|0|Polygon|2|KO-BKO-GKO:-BGKO +multipolygonzm0|0|MultiPoint|2|KO-BKO-GKO:-BGKO +multipolygonzm0|0|MultiLineString|2|KO-BKO-GKO:-BGKO +multipolygonzm0|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +multipolygonzm0|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipolygonzm0|0|CircularString|2|KO-BKO-GKO:-BGKO +multipolygonzm0|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipolygonzm0|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipolygonzm0|0|MultiCurve|2|KO-BKO-GKO:-BGKO +multipolygonzm0|0|MultiSurface|2|KO-BKO-GKO:-BGKO +multipolygonzm0|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipolygonzm0|0|Triangle|2|KO-BKO-GKO:-BGKO +multipolygonzm0|0|Point|1|KO-BKO-GKO:-BGKO +multipolygonzm0|0|LineString|1|KO-BKO-GKO:-BGKO +multipolygonzm0|0|Polygon|1|KO-BKO-GKO:-BGKO +multipolygonzm0|0|MultiPoint|1|KO-BKO-GKO:-BGKO +multipolygonzm0|0|MultiLineString|1|KO-BKO-GKO:-BGKO +multipolygonzm0|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +multipolygonzm0|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipolygonzm0|0|CircularString|1|KO-BKO-GKO:-BGKO +multipolygonzm0|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipolygonzm0|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipolygonzm0|0|MultiCurve|1|KO-BKO-GKO:-BGKO +multipolygonzm0|0|MultiSurface|1|KO-BKO-GKO:-BGKO +multipolygonzm0|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipolygonzm0|0|Triangle|1|KO-BKO-GKO:-BGKO +multipolygonzm0|0|Point|3|KO-BKO-GKO:-BGKO +multipolygonzm0|0|LineString|3|KO-BKO-GKO:-BGKO +multipolygonzm0|0|Polygon|3|KO-BKO-GKO:-BGKO +multipolygonzm0|0|MultiPoint|3|KO-BKO-GKO:-BGKO +multipolygonzm0|0|MultiLineString|3|KO-BKO-GKO:-BGKO +multipolygonzm0|0|MultiPolygon|3|OK-BOK-GOK-BGOK +multipolygonzm0|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipolygonzm0|0|CircularString|3|KO-BKO-GKO:-BGKO +multipolygonzm0|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipolygonzm0|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipolygonzm0|0|MultiCurve|3|KO-BKO-GKO:-BGKO +multipolygonzm0|0|MultiSurface|3|KO-BKO-GKO:-BGKO +multipolygonzm0|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipolygonzm0|0|Triangle|3|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|Point|0|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|LineString|0|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|Polygon|0|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|CircularString|0|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|Triangle|0|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|Tin|0|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|Point|2|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|LineString|2|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|Polygon|2|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|CircularString|2|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|Triangle|2|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|Point|1|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|LineString|1|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|Polygon|1|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|CircularString|1|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|Triangle|1|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|Point|3|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|LineString|3|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|Polygon|3|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|MultiPolygon|3|OK-BOK-GOK-BGOK +multipolygonzm0|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|CircularString|3|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipolygonzm0|4326|Triangle|3|KO-BKO-GKO:-BGKO +multipolygonzm0||COUNT|4| +multipolygonzm0||GCOUNT|4| +multipolygonzm4326|0|Point|0|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|LineString|0|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|Polygon|0|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|MultiPoint|0|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|MultiLineString|0|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|CircularString|0|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|MultiCurve|0|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|MultiSurface|0|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|Triangle|0|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|Tin|0|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|Point|2|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|LineString|2|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|Polygon|2|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|MultiPoint|2|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|MultiLineString|2|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|CircularString|2|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|MultiCurve|2|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|MultiSurface|2|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|Triangle|2|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|Point|1|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|LineString|1|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|Polygon|1|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|MultiPoint|1|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|MultiLineString|1|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|CircularString|1|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|MultiCurve|1|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|MultiSurface|1|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|Triangle|1|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|Point|3|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|LineString|3|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|Polygon|3|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|MultiPoint|3|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|MultiLineString|3|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|MultiPolygon|3|KO-BKO-GOK-BGOK +multipolygonzm4326|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|CircularString|3|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|MultiCurve|3|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|MultiSurface|3|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipolygonzm4326|0|Triangle|3|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|Point|0|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|LineString|0|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|Polygon|0|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|CircularString|0|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|Triangle|0|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|Tin|0|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|Point|2|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|LineString|2|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|Polygon|2|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|CircularString|2|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|Triangle|2|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|Point|1|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|LineString|1|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|Polygon|1|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|CircularString|1|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|Triangle|1|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|Point|3|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|LineString|3|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|Polygon|3|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|MultiPolygon|3|OK-BOK-GOK-BGOK +multipolygonzm4326|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|CircularString|3|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +multipolygonzm4326|4326|Triangle|3|KO-BKO-GKO:-BGKO +multipolygonzm4326||COUNT|2| +multipolygonzm4326||GCOUNT|4| +multisurface|0|Point|0|KO-BKO +multisurface|0|LineString|0|KO-BKO +multisurface|0|Polygon|0|KO-BKO +multisurface|0|MultiPoint|0|KO-BKO +multisurface|0|MultiLineString|0|KO-BKO +multisurface|0|MultiPolygon|0|KO-BKO +multisurface|0|GeometryCollection|0|KO-BKO +multisurface|0|CircularString|0|KO-BKO +multisurface|0|CompoundCurve|0|KO-BKO +multisurface|0|CurvePolygon|0|KO-BKO +multisurface|0|MultiCurve|0|KO-BKO +multisurface|0|MultiSurface|0|OK-BOK +multisurface|0|PolyhedralSurface|0|KO-BKO +multisurface|0|Triangle|0|KO-BKO +multisurface|0|Tin|0|KO-BKO +multisurface|0|Point|2|KO-BKO +multisurface|0|LineString|2|KO-BKO +multisurface|0|Polygon|2|KO-BKO +multisurface|0|MultiPoint|2|KO-BKO +multisurface|0|MultiLineString|2|KO-BKO +multisurface|0|MultiPolygon|2|KO-BKO +multisurface|0|GeometryCollection|2|KO-BKO +multisurface|0|CircularString|2|KO-BKO +multisurface|0|CompoundCurve|2|KO-BKO +multisurface|0|CurvePolygon|2|KO-BKO +multisurface|0|MultiCurve|2|KO-BKO +multisurface|0|MultiSurface|2|KO-BKO +multisurface|0|PolyhedralSurface|2|KO-BKO +multisurface|0|Triangle|2|KO-BKO +multisurface|0|Point|1|KO-BKO +multisurface|0|LineString|1|KO-BKO +multisurface|0|Polygon|1|KO-BKO +multisurface|0|MultiPoint|1|KO-BKO +multisurface|0|MultiLineString|1|KO-BKO +multisurface|0|MultiPolygon|1|KO-BKO +multisurface|0|GeometryCollection|1|KO-BKO +multisurface|0|CircularString|1|KO-BKO +multisurface|0|CompoundCurve|1|KO-BKO +multisurface|0|CurvePolygon|1|KO-BKO +multisurface|0|MultiCurve|1|KO-BKO +multisurface|0|MultiSurface|1|KO-BKO +multisurface|0|PolyhedralSurface|1|KO-BKO +multisurface|0|Triangle|1|KO-BKO +multisurface|0|Point|3|KO-BKO +multisurface|0|LineString|3|KO-BKO +multisurface|0|Polygon|3|KO-BKO +multisurface|0|MultiPoint|3|KO-BKO +multisurface|0|MultiLineString|3|KO-BKO +multisurface|0|MultiPolygon|3|KO-BKO +multisurface|0|GeometryCollection|3|KO-BKO +multisurface|0|CircularString|3|KO-BKO +multisurface|0|CompoundCurve|3|KO-BKO +multisurface|0|CurvePolygon|3|KO-BKO +multisurface|0|MultiCurve|3|KO-BKO +multisurface|0|MultiSurface|3|KO-BKO +multisurface|0|PolyhedralSurface|3|KO-BKO +multisurface|0|Triangle|3|KO-BKO +multisurface|4326|Point|0|KO-BKO +multisurface|4326|LineString|0|KO-BKO +multisurface|4326|Polygon|0|KO-BKO +multisurface|4326|MultiPoint|0|KO-BKO +multisurface|4326|MultiLineString|0|KO-BKO +multisurface|4326|MultiPolygon|0|KO-BKO +multisurface|4326|GeometryCollection|0|KO-BKO +multisurface|4326|CircularString|0|KO-BKO +multisurface|4326|CompoundCurve|0|KO-BKO +multisurface|4326|CurvePolygon|0|KO-BKO +multisurface|4326|MultiCurve|0|KO-BKO +multisurface|4326|MultiSurface|0|OK-BOK +multisurface|4326|PolyhedralSurface|0|KO-BKO +multisurface|4326|Triangle|0|KO-BKO +multisurface|4326|Tin|0|KO-BKO +multisurface|4326|Point|2|KO-BKO +multisurface|4326|LineString|2|KO-BKO +multisurface|4326|Polygon|2|KO-BKO +multisurface|4326|MultiPoint|2|KO-BKO +multisurface|4326|MultiLineString|2|KO-BKO +multisurface|4326|MultiPolygon|2|KO-BKO +multisurface|4326|GeometryCollection|2|KO-BKO +multisurface|4326|CircularString|2|KO-BKO +multisurface|4326|CompoundCurve|2|KO-BKO +multisurface|4326|CurvePolygon|2|KO-BKO +multisurface|4326|MultiCurve|2|KO-BKO +multisurface|4326|MultiSurface|2|KO-BKO +multisurface|4326|PolyhedralSurface|2|KO-BKO +multisurface|4326|Triangle|2|KO-BKO +multisurface|4326|Point|1|KO-BKO +multisurface|4326|LineString|1|KO-BKO +multisurface|4326|Polygon|1|KO-BKO +multisurface|4326|MultiPoint|1|KO-BKO +multisurface|4326|MultiLineString|1|KO-BKO +multisurface|4326|MultiPolygon|1|KO-BKO +multisurface|4326|GeometryCollection|1|KO-BKO +multisurface|4326|CircularString|1|KO-BKO +multisurface|4326|CompoundCurve|1|KO-BKO +multisurface|4326|CurvePolygon|1|KO-BKO +multisurface|4326|MultiCurve|1|KO-BKO +multisurface|4326|MultiSurface|1|KO-BKO +multisurface|4326|PolyhedralSurface|1|KO-BKO +multisurface|4326|Triangle|1|KO-BKO +multisurface|4326|Point|3|KO-BKO +multisurface|4326|LineString|3|KO-BKO +multisurface|4326|Polygon|3|KO-BKO +multisurface|4326|MultiPoint|3|KO-BKO +multisurface|4326|MultiLineString|3|KO-BKO +multisurface|4326|MultiPolygon|3|KO-BKO +multisurface|4326|GeometryCollection|3|KO-BKO +multisurface|4326|CircularString|3|KO-BKO +multisurface|4326|CompoundCurve|3|KO-BKO +multisurface|4326|CurvePolygon|3|KO-BKO +multisurface|4326|MultiCurve|3|KO-BKO +multisurface|4326|MultiSurface|3|KO-BKO +multisurface|4326|PolyhedralSurface|3|KO-BKO +multisurface|4326|Triangle|3|KO-BKO +multisurface||COUNT|4| +multisurface0|0|Point|0|KO-BKO +multisurface0|0|LineString|0|KO-BKO +multisurface0|0|Polygon|0|KO-BKO +multisurface0|0|MultiPoint|0|KO-BKO +multisurface0|0|MultiLineString|0|KO-BKO +multisurface0|0|MultiPolygon|0|KO-BKO +multisurface0|0|GeometryCollection|0|KO-BKO +multisurface0|0|CircularString|0|KO-BKO +multisurface0|0|CompoundCurve|0|KO-BKO +multisurface0|0|CurvePolygon|0|KO-BKO +multisurface0|0|MultiCurve|0|KO-BKO +multisurface0|0|MultiSurface|0|OK-BOK +multisurface0|0|PolyhedralSurface|0|KO-BKO +multisurface0|0|Triangle|0|KO-BKO +multisurface0|0|Tin|0|KO-BKO +multisurface0|0|Point|2|KO-BKO +multisurface0|0|LineString|2|KO-BKO +multisurface0|0|Polygon|2|KO-BKO +multisurface0|0|MultiPoint|2|KO-BKO +multisurface0|0|MultiLineString|2|KO-BKO +multisurface0|0|MultiPolygon|2|KO-BKO +multisurface0|0|GeometryCollection|2|KO-BKO +multisurface0|0|CircularString|2|KO-BKO +multisurface0|0|CompoundCurve|2|KO-BKO +multisurface0|0|CurvePolygon|2|KO-BKO +multisurface0|0|MultiCurve|2|KO-BKO +multisurface0|0|MultiSurface|2|KO-BKO +multisurface0|0|PolyhedralSurface|2|KO-BKO +multisurface0|0|Triangle|2|KO-BKO +multisurface0|0|Point|1|KO-BKO +multisurface0|0|LineString|1|KO-BKO +multisurface0|0|Polygon|1|KO-BKO +multisurface0|0|MultiPoint|1|KO-BKO +multisurface0|0|MultiLineString|1|KO-BKO +multisurface0|0|MultiPolygon|1|KO-BKO +multisurface0|0|GeometryCollection|1|KO-BKO +multisurface0|0|CircularString|1|KO-BKO +multisurface0|0|CompoundCurve|1|KO-BKO +multisurface0|0|CurvePolygon|1|KO-BKO +multisurface0|0|MultiCurve|1|KO-BKO +multisurface0|0|MultiSurface|1|KO-BKO +multisurface0|0|PolyhedralSurface|1|KO-BKO +multisurface0|0|Triangle|1|KO-BKO +multisurface0|0|Point|3|KO-BKO +multisurface0|0|LineString|3|KO-BKO +multisurface0|0|Polygon|3|KO-BKO +multisurface0|0|MultiPoint|3|KO-BKO +multisurface0|0|MultiLineString|3|KO-BKO +multisurface0|0|MultiPolygon|3|KO-BKO +multisurface0|0|GeometryCollection|3|KO-BKO +multisurface0|0|CircularString|3|KO-BKO +multisurface0|0|CompoundCurve|3|KO-BKO +multisurface0|0|CurvePolygon|3|KO-BKO +multisurface0|0|MultiCurve|3|KO-BKO +multisurface0|0|MultiSurface|3|KO-BKO +multisurface0|0|PolyhedralSurface|3|KO-BKO +multisurface0|0|Triangle|3|KO-BKO +multisurface0|4326|Point|0|KO-BKO +multisurface0|4326|LineString|0|KO-BKO +multisurface0|4326|Polygon|0|KO-BKO +multisurface0|4326|MultiPoint|0|KO-BKO +multisurface0|4326|MultiLineString|0|KO-BKO +multisurface0|4326|MultiPolygon|0|KO-BKO +multisurface0|4326|GeometryCollection|0|KO-BKO +multisurface0|4326|CircularString|0|KO-BKO +multisurface0|4326|CompoundCurve|0|KO-BKO +multisurface0|4326|CurvePolygon|0|KO-BKO +multisurface0|4326|MultiCurve|0|KO-BKO +multisurface0|4326|MultiSurface|0|OK-BOK +multisurface0|4326|PolyhedralSurface|0|KO-BKO +multisurface0|4326|Triangle|0|KO-BKO +multisurface0|4326|Tin|0|KO-BKO +multisurface0|4326|Point|2|KO-BKO +multisurface0|4326|LineString|2|KO-BKO +multisurface0|4326|Polygon|2|KO-BKO +multisurface0|4326|MultiPoint|2|KO-BKO +multisurface0|4326|MultiLineString|2|KO-BKO +multisurface0|4326|MultiPolygon|2|KO-BKO +multisurface0|4326|GeometryCollection|2|KO-BKO +multisurface0|4326|CircularString|2|KO-BKO +multisurface0|4326|CompoundCurve|2|KO-BKO +multisurface0|4326|CurvePolygon|2|KO-BKO +multisurface0|4326|MultiCurve|2|KO-BKO +multisurface0|4326|MultiSurface|2|KO-BKO +multisurface0|4326|PolyhedralSurface|2|KO-BKO +multisurface0|4326|Triangle|2|KO-BKO +multisurface0|4326|Point|1|KO-BKO +multisurface0|4326|LineString|1|KO-BKO +multisurface0|4326|Polygon|1|KO-BKO +multisurface0|4326|MultiPoint|1|KO-BKO +multisurface0|4326|MultiLineString|1|KO-BKO +multisurface0|4326|MultiPolygon|1|KO-BKO +multisurface0|4326|GeometryCollection|1|KO-BKO +multisurface0|4326|CircularString|1|KO-BKO +multisurface0|4326|CompoundCurve|1|KO-BKO +multisurface0|4326|CurvePolygon|1|KO-BKO +multisurface0|4326|MultiCurve|1|KO-BKO +multisurface0|4326|MultiSurface|1|KO-BKO +multisurface0|4326|PolyhedralSurface|1|KO-BKO +multisurface0|4326|Triangle|1|KO-BKO +multisurface0|4326|Point|3|KO-BKO +multisurface0|4326|LineString|3|KO-BKO +multisurface0|4326|Polygon|3|KO-BKO +multisurface0|4326|MultiPoint|3|KO-BKO +multisurface0|4326|MultiLineString|3|KO-BKO +multisurface0|4326|MultiPolygon|3|KO-BKO +multisurface0|4326|GeometryCollection|3|KO-BKO +multisurface0|4326|CircularString|3|KO-BKO +multisurface0|4326|CompoundCurve|3|KO-BKO +multisurface0|4326|CurvePolygon|3|KO-BKO +multisurface0|4326|MultiCurve|3|KO-BKO +multisurface0|4326|MultiSurface|3|KO-BKO +multisurface0|4326|PolyhedralSurface|3|KO-BKO +multisurface0|4326|Triangle|3|KO-BKO +multisurface0||COUNT|4| +multisurface4326|0|Point|0|KO-BKO +multisurface4326|0|LineString|0|KO-BKO +multisurface4326|0|Polygon|0|KO-BKO +multisurface4326|0|MultiPoint|0|KO-BKO +multisurface4326|0|MultiLineString|0|KO-BKO +multisurface4326|0|MultiPolygon|0|KO-BKO +multisurface4326|0|GeometryCollection|0|KO-BKO +multisurface4326|0|CircularString|0|KO-BKO +multisurface4326|0|CompoundCurve|0|KO-BKO +multisurface4326|0|CurvePolygon|0|KO-BKO +multisurface4326|0|MultiCurve|0|KO-BKO +multisurface4326|0|MultiSurface|0|KO-BKO +multisurface4326|0|PolyhedralSurface|0|KO-BKO +multisurface4326|0|Triangle|0|KO-BKO +multisurface4326|0|Tin|0|KO-BKO +multisurface4326|0|Point|2|KO-BKO +multisurface4326|0|LineString|2|KO-BKO +multisurface4326|0|Polygon|2|KO-BKO +multisurface4326|0|MultiPoint|2|KO-BKO +multisurface4326|0|MultiLineString|2|KO-BKO +multisurface4326|0|MultiPolygon|2|KO-BKO +multisurface4326|0|GeometryCollection|2|KO-BKO +multisurface4326|0|CircularString|2|KO-BKO +multisurface4326|0|CompoundCurve|2|KO-BKO +multisurface4326|0|CurvePolygon|2|KO-BKO +multisurface4326|0|MultiCurve|2|KO-BKO +multisurface4326|0|MultiSurface|2|KO-BKO +multisurface4326|0|PolyhedralSurface|2|KO-BKO +multisurface4326|0|Triangle|2|KO-BKO +multisurface4326|0|Point|1|KO-BKO +multisurface4326|0|LineString|1|KO-BKO +multisurface4326|0|Polygon|1|KO-BKO +multisurface4326|0|MultiPoint|1|KO-BKO +multisurface4326|0|MultiLineString|1|KO-BKO +multisurface4326|0|MultiPolygon|1|KO-BKO +multisurface4326|0|GeometryCollection|1|KO-BKO +multisurface4326|0|CircularString|1|KO-BKO +multisurface4326|0|CompoundCurve|1|KO-BKO +multisurface4326|0|CurvePolygon|1|KO-BKO +multisurface4326|0|MultiCurve|1|KO-BKO +multisurface4326|0|MultiSurface|1|KO-BKO +multisurface4326|0|PolyhedralSurface|1|KO-BKO +multisurface4326|0|Triangle|1|KO-BKO +multisurface4326|0|Point|3|KO-BKO +multisurface4326|0|LineString|3|KO-BKO +multisurface4326|0|Polygon|3|KO-BKO +multisurface4326|0|MultiPoint|3|KO-BKO +multisurface4326|0|MultiLineString|3|KO-BKO +multisurface4326|0|MultiPolygon|3|KO-BKO +multisurface4326|0|GeometryCollection|3|KO-BKO +multisurface4326|0|CircularString|3|KO-BKO +multisurface4326|0|CompoundCurve|3|KO-BKO +multisurface4326|0|CurvePolygon|3|KO-BKO +multisurface4326|0|MultiCurve|3|KO-BKO +multisurface4326|0|MultiSurface|3|KO-BKO +multisurface4326|0|PolyhedralSurface|3|KO-BKO +multisurface4326|0|Triangle|3|KO-BKO +multisurface4326|4326|Point|0|KO-BKO +multisurface4326|4326|LineString|0|KO-BKO +multisurface4326|4326|Polygon|0|KO-BKO +multisurface4326|4326|MultiPoint|0|KO-BKO +multisurface4326|4326|MultiLineString|0|KO-BKO +multisurface4326|4326|MultiPolygon|0|KO-BKO +multisurface4326|4326|GeometryCollection|0|KO-BKO +multisurface4326|4326|CircularString|0|KO-BKO +multisurface4326|4326|CompoundCurve|0|KO-BKO +multisurface4326|4326|CurvePolygon|0|KO-BKO +multisurface4326|4326|MultiCurve|0|KO-BKO +multisurface4326|4326|MultiSurface|0|OK-BOK +multisurface4326|4326|PolyhedralSurface|0|KO-BKO +multisurface4326|4326|Triangle|0|KO-BKO +multisurface4326|4326|Tin|0|KO-BKO +multisurface4326|4326|Point|2|KO-BKO +multisurface4326|4326|LineString|2|KO-BKO +multisurface4326|4326|Polygon|2|KO-BKO +multisurface4326|4326|MultiPoint|2|KO-BKO +multisurface4326|4326|MultiLineString|2|KO-BKO +multisurface4326|4326|MultiPolygon|2|KO-BKO +multisurface4326|4326|GeometryCollection|2|KO-BKO +multisurface4326|4326|CircularString|2|KO-BKO +multisurface4326|4326|CompoundCurve|2|KO-BKO +multisurface4326|4326|CurvePolygon|2|KO-BKO +multisurface4326|4326|MultiCurve|2|KO-BKO +multisurface4326|4326|MultiSurface|2|KO-BKO +multisurface4326|4326|PolyhedralSurface|2|KO-BKO +multisurface4326|4326|Triangle|2|KO-BKO +multisurface4326|4326|Point|1|KO-BKO +multisurface4326|4326|LineString|1|KO-BKO +multisurface4326|4326|Polygon|1|KO-BKO +multisurface4326|4326|MultiPoint|1|KO-BKO +multisurface4326|4326|MultiLineString|1|KO-BKO +multisurface4326|4326|MultiPolygon|1|KO-BKO +multisurface4326|4326|GeometryCollection|1|KO-BKO +multisurface4326|4326|CircularString|1|KO-BKO +multisurface4326|4326|CompoundCurve|1|KO-BKO +multisurface4326|4326|CurvePolygon|1|KO-BKO +multisurface4326|4326|MultiCurve|1|KO-BKO +multisurface4326|4326|MultiSurface|1|KO-BKO +multisurface4326|4326|PolyhedralSurface|1|KO-BKO +multisurface4326|4326|Triangle|1|KO-BKO +multisurface4326|4326|Point|3|KO-BKO +multisurface4326|4326|LineString|3|KO-BKO +multisurface4326|4326|Polygon|3|KO-BKO +multisurface4326|4326|MultiPoint|3|KO-BKO +multisurface4326|4326|MultiLineString|3|KO-BKO +multisurface4326|4326|MultiPolygon|3|KO-BKO +multisurface4326|4326|GeometryCollection|3|KO-BKO +multisurface4326|4326|CircularString|3|KO-BKO +multisurface4326|4326|CompoundCurve|3|KO-BKO +multisurface4326|4326|CurvePolygon|3|KO-BKO +multisurface4326|4326|MultiCurve|3|KO-BKO +multisurface4326|4326|MultiSurface|3|KO-BKO +multisurface4326|4326|PolyhedralSurface|3|KO-BKO +multisurface4326|4326|Triangle|3|KO-BKO +multisurface4326||COUNT|2| +multisurfacem|0|Point|0|KO-BKO +multisurfacem|0|LineString|0|KO-BKO +multisurfacem|0|Polygon|0|KO-BKO +multisurfacem|0|MultiPoint|0|KO-BKO +multisurfacem|0|MultiLineString|0|KO-BKO +multisurfacem|0|MultiPolygon|0|KO-BKO +multisurfacem|0|GeometryCollection|0|KO-BKO +multisurfacem|0|CircularString|0|KO-BKO +multisurfacem|0|CompoundCurve|0|KO-BKO +multisurfacem|0|CurvePolygon|0|KO-BKO +multisurfacem|0|MultiCurve|0|KO-BKO +multisurfacem|0|MultiSurface|0|KO-BKO +multisurfacem|0|PolyhedralSurface|0|KO-BKO +multisurfacem|0|Triangle|0|KO-BKO +multisurfacem|0|Tin|0|KO-BKO +multisurfacem|0|Point|2|KO-BKO +multisurfacem|0|LineString|2|KO-BKO +multisurfacem|0|Polygon|2|KO-BKO +multisurfacem|0|MultiPoint|2|KO-BKO +multisurfacem|0|MultiLineString|2|KO-BKO +multisurfacem|0|MultiPolygon|2|KO-BKO +multisurfacem|0|GeometryCollection|2|KO-BKO +multisurfacem|0|CircularString|2|KO-BKO +multisurfacem|0|CompoundCurve|2|KO-BKO +multisurfacem|0|CurvePolygon|2|KO-BKO +multisurfacem|0|MultiCurve|2|KO-BKO +multisurfacem|0|MultiSurface|2|KO-BKO +multisurfacem|0|PolyhedralSurface|2|KO-BKO +multisurfacem|0|Triangle|2|KO-BKO +multisurfacem|0|Point|1|KO-BKO +multisurfacem|0|LineString|1|KO-BKO +multisurfacem|0|Polygon|1|KO-BKO +multisurfacem|0|MultiPoint|1|KO-BKO +multisurfacem|0|MultiLineString|1|KO-BKO +multisurfacem|0|MultiPolygon|1|KO-BKO +multisurfacem|0|GeometryCollection|1|KO-BKO +multisurfacem|0|CircularString|1|KO-BKO +multisurfacem|0|CompoundCurve|1|KO-BKO +multisurfacem|0|CurvePolygon|1|KO-BKO +multisurfacem|0|MultiCurve|1|KO-BKO +multisurfacem|0|MultiSurface|1|OK-BOK +multisurfacem|0|PolyhedralSurface|1|KO-BKO +multisurfacem|0|Triangle|1|KO-BKO +multisurfacem|0|Point|3|KO-BKO +multisurfacem|0|LineString|3|KO-BKO +multisurfacem|0|Polygon|3|KO-BKO +multisurfacem|0|MultiPoint|3|KO-BKO +multisurfacem|0|MultiLineString|3|KO-BKO +multisurfacem|0|MultiPolygon|3|KO-BKO +multisurfacem|0|GeometryCollection|3|KO-BKO +multisurfacem|0|CircularString|3|KO-BKO +multisurfacem|0|CompoundCurve|3|KO-BKO +multisurfacem|0|CurvePolygon|3|KO-BKO +multisurfacem|0|MultiCurve|3|KO-BKO +multisurfacem|0|MultiSurface|3|KO-BKO +multisurfacem|0|PolyhedralSurface|3|KO-BKO +multisurfacem|0|Triangle|3|KO-BKO +multisurfacem|4326|Point|0|KO-BKO +multisurfacem|4326|LineString|0|KO-BKO +multisurfacem|4326|Polygon|0|KO-BKO +multisurfacem|4326|MultiPoint|0|KO-BKO +multisurfacem|4326|MultiLineString|0|KO-BKO +multisurfacem|4326|MultiPolygon|0|KO-BKO +multisurfacem|4326|GeometryCollection|0|KO-BKO +multisurfacem|4326|CircularString|0|KO-BKO +multisurfacem|4326|CompoundCurve|0|KO-BKO +multisurfacem|4326|CurvePolygon|0|KO-BKO +multisurfacem|4326|MultiCurve|0|KO-BKO +multisurfacem|4326|MultiSurface|0|KO-BKO +multisurfacem|4326|PolyhedralSurface|0|KO-BKO +multisurfacem|4326|Triangle|0|KO-BKO +multisurfacem|4326|Tin|0|KO-BKO +multisurfacem|4326|Point|2|KO-BKO +multisurfacem|4326|LineString|2|KO-BKO +multisurfacem|4326|Polygon|2|KO-BKO +multisurfacem|4326|MultiPoint|2|KO-BKO +multisurfacem|4326|MultiLineString|2|KO-BKO +multisurfacem|4326|MultiPolygon|2|KO-BKO +multisurfacem|4326|GeometryCollection|2|KO-BKO +multisurfacem|4326|CircularString|2|KO-BKO +multisurfacem|4326|CompoundCurve|2|KO-BKO +multisurfacem|4326|CurvePolygon|2|KO-BKO +multisurfacem|4326|MultiCurve|2|KO-BKO +multisurfacem|4326|MultiSurface|2|KO-BKO +multisurfacem|4326|PolyhedralSurface|2|KO-BKO +multisurfacem|4326|Triangle|2|KO-BKO +multisurfacem|4326|Point|1|KO-BKO +multisurfacem|4326|LineString|1|KO-BKO +multisurfacem|4326|Polygon|1|KO-BKO +multisurfacem|4326|MultiPoint|1|KO-BKO +multisurfacem|4326|MultiLineString|1|KO-BKO +multisurfacem|4326|MultiPolygon|1|KO-BKO +multisurfacem|4326|GeometryCollection|1|KO-BKO +multisurfacem|4326|CircularString|1|KO-BKO +multisurfacem|4326|CompoundCurve|1|KO-BKO +multisurfacem|4326|CurvePolygon|1|KO-BKO +multisurfacem|4326|MultiCurve|1|KO-BKO +multisurfacem|4326|MultiSurface|1|OK-BOK +multisurfacem|4326|PolyhedralSurface|1|KO-BKO +multisurfacem|4326|Triangle|1|KO-BKO +multisurfacem|4326|Point|3|KO-BKO +multisurfacem|4326|LineString|3|KO-BKO +multisurfacem|4326|Polygon|3|KO-BKO +multisurfacem|4326|MultiPoint|3|KO-BKO +multisurfacem|4326|MultiLineString|3|KO-BKO +multisurfacem|4326|MultiPolygon|3|KO-BKO +multisurfacem|4326|GeometryCollection|3|KO-BKO +multisurfacem|4326|CircularString|3|KO-BKO +multisurfacem|4326|CompoundCurve|3|KO-BKO +multisurfacem|4326|CurvePolygon|3|KO-BKO +multisurfacem|4326|MultiCurve|3|KO-BKO +multisurfacem|4326|MultiSurface|3|KO-BKO +multisurfacem|4326|PolyhedralSurface|3|KO-BKO +multisurfacem|4326|Triangle|3|KO-BKO +multisurfacem||COUNT|4| +multisurfacem0|0|Point|0|KO-BKO +multisurfacem0|0|LineString|0|KO-BKO +multisurfacem0|0|Polygon|0|KO-BKO +multisurfacem0|0|MultiPoint|0|KO-BKO +multisurfacem0|0|MultiLineString|0|KO-BKO +multisurfacem0|0|MultiPolygon|0|KO-BKO +multisurfacem0|0|GeometryCollection|0|KO-BKO +multisurfacem0|0|CircularString|0|KO-BKO +multisurfacem0|0|CompoundCurve|0|KO-BKO +multisurfacem0|0|CurvePolygon|0|KO-BKO +multisurfacem0|0|MultiCurve|0|KO-BKO +multisurfacem0|0|MultiSurface|0|KO-BKO +multisurfacem0|0|PolyhedralSurface|0|KO-BKO +multisurfacem0|0|Triangle|0|KO-BKO +multisurfacem0|0|Tin|0|KO-BKO +multisurfacem0|0|Point|2|KO-BKO +multisurfacem0|0|LineString|2|KO-BKO +multisurfacem0|0|Polygon|2|KO-BKO +multisurfacem0|0|MultiPoint|2|KO-BKO +multisurfacem0|0|MultiLineString|2|KO-BKO +multisurfacem0|0|MultiPolygon|2|KO-BKO +multisurfacem0|0|GeometryCollection|2|KO-BKO +multisurfacem0|0|CircularString|2|KO-BKO +multisurfacem0|0|CompoundCurve|2|KO-BKO +multisurfacem0|0|CurvePolygon|2|KO-BKO +multisurfacem0|0|MultiCurve|2|KO-BKO +multisurfacem0|0|MultiSurface|2|KO-BKO +multisurfacem0|0|PolyhedralSurface|2|KO-BKO +multisurfacem0|0|Triangle|2|KO-BKO +multisurfacem0|0|Point|1|KO-BKO +multisurfacem0|0|LineString|1|KO-BKO +multisurfacem0|0|Polygon|1|KO-BKO +multisurfacem0|0|MultiPoint|1|KO-BKO +multisurfacem0|0|MultiLineString|1|KO-BKO +multisurfacem0|0|MultiPolygon|1|KO-BKO +multisurfacem0|0|GeometryCollection|1|KO-BKO +multisurfacem0|0|CircularString|1|KO-BKO +multisurfacem0|0|CompoundCurve|1|KO-BKO +multisurfacem0|0|CurvePolygon|1|KO-BKO +multisurfacem0|0|MultiCurve|1|KO-BKO +multisurfacem0|0|MultiSurface|1|OK-BOK +multisurfacem0|0|PolyhedralSurface|1|KO-BKO +multisurfacem0|0|Triangle|1|KO-BKO +multisurfacem0|0|Point|3|KO-BKO +multisurfacem0|0|LineString|3|KO-BKO +multisurfacem0|0|Polygon|3|KO-BKO +multisurfacem0|0|MultiPoint|3|KO-BKO +multisurfacem0|0|MultiLineString|3|KO-BKO +multisurfacem0|0|MultiPolygon|3|KO-BKO +multisurfacem0|0|GeometryCollection|3|KO-BKO +multisurfacem0|0|CircularString|3|KO-BKO +multisurfacem0|0|CompoundCurve|3|KO-BKO +multisurfacem0|0|CurvePolygon|3|KO-BKO +multisurfacem0|0|MultiCurve|3|KO-BKO +multisurfacem0|0|MultiSurface|3|KO-BKO +multisurfacem0|0|PolyhedralSurface|3|KO-BKO +multisurfacem0|0|Triangle|3|KO-BKO +multisurfacem0|4326|Point|0|KO-BKO +multisurfacem0|4326|LineString|0|KO-BKO +multisurfacem0|4326|Polygon|0|KO-BKO +multisurfacem0|4326|MultiPoint|0|KO-BKO +multisurfacem0|4326|MultiLineString|0|KO-BKO +multisurfacem0|4326|MultiPolygon|0|KO-BKO +multisurfacem0|4326|GeometryCollection|0|KO-BKO +multisurfacem0|4326|CircularString|0|KO-BKO +multisurfacem0|4326|CompoundCurve|0|KO-BKO +multisurfacem0|4326|CurvePolygon|0|KO-BKO +multisurfacem0|4326|MultiCurve|0|KO-BKO +multisurfacem0|4326|MultiSurface|0|KO-BKO +multisurfacem0|4326|PolyhedralSurface|0|KO-BKO +multisurfacem0|4326|Triangle|0|KO-BKO +multisurfacem0|4326|Tin|0|KO-BKO +multisurfacem0|4326|Point|2|KO-BKO +multisurfacem0|4326|LineString|2|KO-BKO +multisurfacem0|4326|Polygon|2|KO-BKO +multisurfacem0|4326|MultiPoint|2|KO-BKO +multisurfacem0|4326|MultiLineString|2|KO-BKO +multisurfacem0|4326|MultiPolygon|2|KO-BKO +multisurfacem0|4326|GeometryCollection|2|KO-BKO +multisurfacem0|4326|CircularString|2|KO-BKO +multisurfacem0|4326|CompoundCurve|2|KO-BKO +multisurfacem0|4326|CurvePolygon|2|KO-BKO +multisurfacem0|4326|MultiCurve|2|KO-BKO +multisurfacem0|4326|MultiSurface|2|KO-BKO +multisurfacem0|4326|PolyhedralSurface|2|KO-BKO +multisurfacem0|4326|Triangle|2|KO-BKO +multisurfacem0|4326|Point|1|KO-BKO +multisurfacem0|4326|LineString|1|KO-BKO +multisurfacem0|4326|Polygon|1|KO-BKO +multisurfacem0|4326|MultiPoint|1|KO-BKO +multisurfacem0|4326|MultiLineString|1|KO-BKO +multisurfacem0|4326|MultiPolygon|1|KO-BKO +multisurfacem0|4326|GeometryCollection|1|KO-BKO +multisurfacem0|4326|CircularString|1|KO-BKO +multisurfacem0|4326|CompoundCurve|1|KO-BKO +multisurfacem0|4326|CurvePolygon|1|KO-BKO +multisurfacem0|4326|MultiCurve|1|KO-BKO +multisurfacem0|4326|MultiSurface|1|OK-BOK +multisurfacem0|4326|PolyhedralSurface|1|KO-BKO +multisurfacem0|4326|Triangle|1|KO-BKO +multisurfacem0|4326|Point|3|KO-BKO +multisurfacem0|4326|LineString|3|KO-BKO +multisurfacem0|4326|Polygon|3|KO-BKO +multisurfacem0|4326|MultiPoint|3|KO-BKO +multisurfacem0|4326|MultiLineString|3|KO-BKO +multisurfacem0|4326|MultiPolygon|3|KO-BKO +multisurfacem0|4326|GeometryCollection|3|KO-BKO +multisurfacem0|4326|CircularString|3|KO-BKO +multisurfacem0|4326|CompoundCurve|3|KO-BKO +multisurfacem0|4326|CurvePolygon|3|KO-BKO +multisurfacem0|4326|MultiCurve|3|KO-BKO +multisurfacem0|4326|MultiSurface|3|KO-BKO +multisurfacem0|4326|PolyhedralSurface|3|KO-BKO +multisurfacem0|4326|Triangle|3|KO-BKO +multisurfacem0||COUNT|4| +multisurfacem4326|0|Point|0|KO-BKO +multisurfacem4326|0|LineString|0|KO-BKO +multisurfacem4326|0|Polygon|0|KO-BKO +multisurfacem4326|0|MultiPoint|0|KO-BKO +multisurfacem4326|0|MultiLineString|0|KO-BKO +multisurfacem4326|0|MultiPolygon|0|KO-BKO +multisurfacem4326|0|GeometryCollection|0|KO-BKO +multisurfacem4326|0|CircularString|0|KO-BKO +multisurfacem4326|0|CompoundCurve|0|KO-BKO +multisurfacem4326|0|CurvePolygon|0|KO-BKO +multisurfacem4326|0|MultiCurve|0|KO-BKO +multisurfacem4326|0|MultiSurface|0|KO-BKO +multisurfacem4326|0|PolyhedralSurface|0|KO-BKO +multisurfacem4326|0|Triangle|0|KO-BKO +multisurfacem4326|0|Tin|0|KO-BKO +multisurfacem4326|0|Point|2|KO-BKO +multisurfacem4326|0|LineString|2|KO-BKO +multisurfacem4326|0|Polygon|2|KO-BKO +multisurfacem4326|0|MultiPoint|2|KO-BKO +multisurfacem4326|0|MultiLineString|2|KO-BKO +multisurfacem4326|0|MultiPolygon|2|KO-BKO +multisurfacem4326|0|GeometryCollection|2|KO-BKO +multisurfacem4326|0|CircularString|2|KO-BKO +multisurfacem4326|0|CompoundCurve|2|KO-BKO +multisurfacem4326|0|CurvePolygon|2|KO-BKO +multisurfacem4326|0|MultiCurve|2|KO-BKO +multisurfacem4326|0|MultiSurface|2|KO-BKO +multisurfacem4326|0|PolyhedralSurface|2|KO-BKO +multisurfacem4326|0|Triangle|2|KO-BKO +multisurfacem4326|0|Point|1|KO-BKO +multisurfacem4326|0|LineString|1|KO-BKO +multisurfacem4326|0|Polygon|1|KO-BKO +multisurfacem4326|0|MultiPoint|1|KO-BKO +multisurfacem4326|0|MultiLineString|1|KO-BKO +multisurfacem4326|0|MultiPolygon|1|KO-BKO +multisurfacem4326|0|GeometryCollection|1|KO-BKO +multisurfacem4326|0|CircularString|1|KO-BKO +multisurfacem4326|0|CompoundCurve|1|KO-BKO +multisurfacem4326|0|CurvePolygon|1|KO-BKO +multisurfacem4326|0|MultiCurve|1|KO-BKO +multisurfacem4326|0|MultiSurface|1|KO-BKO +multisurfacem4326|0|PolyhedralSurface|1|KO-BKO +multisurfacem4326|0|Triangle|1|KO-BKO +multisurfacem4326|0|Point|3|KO-BKO +multisurfacem4326|0|LineString|3|KO-BKO +multisurfacem4326|0|Polygon|3|KO-BKO +multisurfacem4326|0|MultiPoint|3|KO-BKO +multisurfacem4326|0|MultiLineString|3|KO-BKO +multisurfacem4326|0|MultiPolygon|3|KO-BKO +multisurfacem4326|0|GeometryCollection|3|KO-BKO +multisurfacem4326|0|CircularString|3|KO-BKO +multisurfacem4326|0|CompoundCurve|3|KO-BKO +multisurfacem4326|0|CurvePolygon|3|KO-BKO +multisurfacem4326|0|MultiCurve|3|KO-BKO +multisurfacem4326|0|MultiSurface|3|KO-BKO +multisurfacem4326|0|PolyhedralSurface|3|KO-BKO +multisurfacem4326|0|Triangle|3|KO-BKO +multisurfacem4326|4326|Point|0|KO-BKO +multisurfacem4326|4326|LineString|0|KO-BKO +multisurfacem4326|4326|Polygon|0|KO-BKO +multisurfacem4326|4326|MultiPoint|0|KO-BKO +multisurfacem4326|4326|MultiLineString|0|KO-BKO +multisurfacem4326|4326|MultiPolygon|0|KO-BKO +multisurfacem4326|4326|GeometryCollection|0|KO-BKO +multisurfacem4326|4326|CircularString|0|KO-BKO +multisurfacem4326|4326|CompoundCurve|0|KO-BKO +multisurfacem4326|4326|CurvePolygon|0|KO-BKO +multisurfacem4326|4326|MultiCurve|0|KO-BKO +multisurfacem4326|4326|MultiSurface|0|KO-BKO +multisurfacem4326|4326|PolyhedralSurface|0|KO-BKO +multisurfacem4326|4326|Triangle|0|KO-BKO +multisurfacem4326|4326|Tin|0|KO-BKO +multisurfacem4326|4326|Point|2|KO-BKO +multisurfacem4326|4326|LineString|2|KO-BKO +multisurfacem4326|4326|Polygon|2|KO-BKO +multisurfacem4326|4326|MultiPoint|2|KO-BKO +multisurfacem4326|4326|MultiLineString|2|KO-BKO +multisurfacem4326|4326|MultiPolygon|2|KO-BKO +multisurfacem4326|4326|GeometryCollection|2|KO-BKO +multisurfacem4326|4326|CircularString|2|KO-BKO +multisurfacem4326|4326|CompoundCurve|2|KO-BKO +multisurfacem4326|4326|CurvePolygon|2|KO-BKO +multisurfacem4326|4326|MultiCurve|2|KO-BKO +multisurfacem4326|4326|MultiSurface|2|KO-BKO +multisurfacem4326|4326|PolyhedralSurface|2|KO-BKO +multisurfacem4326|4326|Triangle|2|KO-BKO +multisurfacem4326|4326|Point|1|KO-BKO +multisurfacem4326|4326|LineString|1|KO-BKO +multisurfacem4326|4326|Polygon|1|KO-BKO +multisurfacem4326|4326|MultiPoint|1|KO-BKO +multisurfacem4326|4326|MultiLineString|1|KO-BKO +multisurfacem4326|4326|MultiPolygon|1|KO-BKO +multisurfacem4326|4326|GeometryCollection|1|KO-BKO +multisurfacem4326|4326|CircularString|1|KO-BKO +multisurfacem4326|4326|CompoundCurve|1|KO-BKO +multisurfacem4326|4326|CurvePolygon|1|KO-BKO +multisurfacem4326|4326|MultiCurve|1|KO-BKO +multisurfacem4326|4326|MultiSurface|1|OK-BOK +multisurfacem4326|4326|PolyhedralSurface|1|KO-BKO +multisurfacem4326|4326|Triangle|1|KO-BKO +multisurfacem4326|4326|Point|3|KO-BKO +multisurfacem4326|4326|LineString|3|KO-BKO +multisurfacem4326|4326|Polygon|3|KO-BKO +multisurfacem4326|4326|MultiPoint|3|KO-BKO +multisurfacem4326|4326|MultiLineString|3|KO-BKO +multisurfacem4326|4326|MultiPolygon|3|KO-BKO +multisurfacem4326|4326|GeometryCollection|3|KO-BKO +multisurfacem4326|4326|CircularString|3|KO-BKO +multisurfacem4326|4326|CompoundCurve|3|KO-BKO +multisurfacem4326|4326|CurvePolygon|3|KO-BKO +multisurfacem4326|4326|MultiCurve|3|KO-BKO +multisurfacem4326|4326|MultiSurface|3|KO-BKO +multisurfacem4326|4326|PolyhedralSurface|3|KO-BKO +multisurfacem4326|4326|Triangle|3|KO-BKO +multisurfacem4326||COUNT|2| +multisurfacez|0|Point|0|KO-BKO +multisurfacez|0|LineString|0|KO-BKO +multisurfacez|0|Polygon|0|KO-BKO +multisurfacez|0|MultiPoint|0|KO-BKO +multisurfacez|0|MultiLineString|0|KO-BKO +multisurfacez|0|MultiPolygon|0|KO-BKO +multisurfacez|0|GeometryCollection|0|KO-BKO +multisurfacez|0|CircularString|0|KO-BKO +multisurfacez|0|CompoundCurve|0|KO-BKO +multisurfacez|0|CurvePolygon|0|KO-BKO +multisurfacez|0|MultiCurve|0|KO-BKO +multisurfacez|0|MultiSurface|0|KO-BKO +multisurfacez|0|PolyhedralSurface|0|KO-BKO +multisurfacez|0|Triangle|0|KO-BKO +multisurfacez|0|Tin|0|KO-BKO +multisurfacez|0|Point|2|KO-BKO +multisurfacez|0|LineString|2|KO-BKO +multisurfacez|0|Polygon|2|KO-BKO +multisurfacez|0|MultiPoint|2|KO-BKO +multisurfacez|0|MultiLineString|2|KO-BKO +multisurfacez|0|MultiPolygon|2|KO-BKO +multisurfacez|0|GeometryCollection|2|KO-BKO +multisurfacez|0|CircularString|2|KO-BKO +multisurfacez|0|CompoundCurve|2|KO-BKO +multisurfacez|0|CurvePolygon|2|KO-BKO +multisurfacez|0|MultiCurve|2|KO-BKO +multisurfacez|0|MultiSurface|2|OK-BOK +multisurfacez|0|PolyhedralSurface|2|KO-BKO +multisurfacez|0|Triangle|2|KO-BKO +multisurfacez|0|Point|1|KO-BKO +multisurfacez|0|LineString|1|KO-BKO +multisurfacez|0|Polygon|1|KO-BKO +multisurfacez|0|MultiPoint|1|KO-BKO +multisurfacez|0|MultiLineString|1|KO-BKO +multisurfacez|0|MultiPolygon|1|KO-BKO +multisurfacez|0|GeometryCollection|1|KO-BKO +multisurfacez|0|CircularString|1|KO-BKO +multisurfacez|0|CompoundCurve|1|KO-BKO +multisurfacez|0|CurvePolygon|1|KO-BKO +multisurfacez|0|MultiCurve|1|KO-BKO +multisurfacez|0|MultiSurface|1|KO-BKO +multisurfacez|0|PolyhedralSurface|1|KO-BKO +multisurfacez|0|Triangle|1|KO-BKO +multisurfacez|0|Point|3|KO-BKO +multisurfacez|0|LineString|3|KO-BKO +multisurfacez|0|Polygon|3|KO-BKO +multisurfacez|0|MultiPoint|3|KO-BKO +multisurfacez|0|MultiLineString|3|KO-BKO +multisurfacez|0|MultiPolygon|3|KO-BKO +multisurfacez|0|GeometryCollection|3|KO-BKO +multisurfacez|0|CircularString|3|KO-BKO +multisurfacez|0|CompoundCurve|3|KO-BKO +multisurfacez|0|CurvePolygon|3|KO-BKO +multisurfacez|0|MultiCurve|3|KO-BKO +multisurfacez|0|MultiSurface|3|KO-BKO +multisurfacez|0|PolyhedralSurface|3|KO-BKO +multisurfacez|0|Triangle|3|KO-BKO +multisurfacez|4326|Point|0|KO-BKO +multisurfacez|4326|LineString|0|KO-BKO +multisurfacez|4326|Polygon|0|KO-BKO +multisurfacez|4326|MultiPoint|0|KO-BKO +multisurfacez|4326|MultiLineString|0|KO-BKO +multisurfacez|4326|MultiPolygon|0|KO-BKO +multisurfacez|4326|GeometryCollection|0|KO-BKO +multisurfacez|4326|CircularString|0|KO-BKO +multisurfacez|4326|CompoundCurve|0|KO-BKO +multisurfacez|4326|CurvePolygon|0|KO-BKO +multisurfacez|4326|MultiCurve|0|KO-BKO +multisurfacez|4326|MultiSurface|0|KO-BKO +multisurfacez|4326|PolyhedralSurface|0|KO-BKO +multisurfacez|4326|Triangle|0|KO-BKO +multisurfacez|4326|Tin|0|KO-BKO +multisurfacez|4326|Point|2|KO-BKO +multisurfacez|4326|LineString|2|KO-BKO +multisurfacez|4326|Polygon|2|KO-BKO +multisurfacez|4326|MultiPoint|2|KO-BKO +multisurfacez|4326|MultiLineString|2|KO-BKO +multisurfacez|4326|MultiPolygon|2|KO-BKO +multisurfacez|4326|GeometryCollection|2|KO-BKO +multisurfacez|4326|CircularString|2|KO-BKO +multisurfacez|4326|CompoundCurve|2|KO-BKO +multisurfacez|4326|CurvePolygon|2|KO-BKO +multisurfacez|4326|MultiCurve|2|KO-BKO +multisurfacez|4326|MultiSurface|2|OK-BOK +multisurfacez|4326|PolyhedralSurface|2|KO-BKO +multisurfacez|4326|Triangle|2|KO-BKO +multisurfacez|4326|Point|1|KO-BKO +multisurfacez|4326|LineString|1|KO-BKO +multisurfacez|4326|Polygon|1|KO-BKO +multisurfacez|4326|MultiPoint|1|KO-BKO +multisurfacez|4326|MultiLineString|1|KO-BKO +multisurfacez|4326|MultiPolygon|1|KO-BKO +multisurfacez|4326|GeometryCollection|1|KO-BKO +multisurfacez|4326|CircularString|1|KO-BKO +multisurfacez|4326|CompoundCurve|1|KO-BKO +multisurfacez|4326|CurvePolygon|1|KO-BKO +multisurfacez|4326|MultiCurve|1|KO-BKO +multisurfacez|4326|MultiSurface|1|KO-BKO +multisurfacez|4326|PolyhedralSurface|1|KO-BKO +multisurfacez|4326|Triangle|1|KO-BKO +multisurfacez|4326|Point|3|KO-BKO +multisurfacez|4326|LineString|3|KO-BKO +multisurfacez|4326|Polygon|3|KO-BKO +multisurfacez|4326|MultiPoint|3|KO-BKO +multisurfacez|4326|MultiLineString|3|KO-BKO +multisurfacez|4326|MultiPolygon|3|KO-BKO +multisurfacez|4326|GeometryCollection|3|KO-BKO +multisurfacez|4326|CircularString|3|KO-BKO +multisurfacez|4326|CompoundCurve|3|KO-BKO +multisurfacez|4326|CurvePolygon|3|KO-BKO +multisurfacez|4326|MultiCurve|3|KO-BKO +multisurfacez|4326|MultiSurface|3|KO-BKO +multisurfacez|4326|PolyhedralSurface|3|KO-BKO +multisurfacez|4326|Triangle|3|KO-BKO +multisurfacez||COUNT|4| +multisurfacez0|0|Point|0|KO-BKO +multisurfacez0|0|LineString|0|KO-BKO +multisurfacez0|0|Polygon|0|KO-BKO +multisurfacez0|0|MultiPoint|0|KO-BKO +multisurfacez0|0|MultiLineString|0|KO-BKO +multisurfacez0|0|MultiPolygon|0|KO-BKO +multisurfacez0|0|GeometryCollection|0|KO-BKO +multisurfacez0|0|CircularString|0|KO-BKO +multisurfacez0|0|CompoundCurve|0|KO-BKO +multisurfacez0|0|CurvePolygon|0|KO-BKO +multisurfacez0|0|MultiCurve|0|KO-BKO +multisurfacez0|0|MultiSurface|0|KO-BKO +multisurfacez0|0|PolyhedralSurface|0|KO-BKO +multisurfacez0|0|Triangle|0|KO-BKO +multisurfacez0|0|Tin|0|KO-BKO +multisurfacez0|0|Point|2|KO-BKO +multisurfacez0|0|LineString|2|KO-BKO +multisurfacez0|0|Polygon|2|KO-BKO +multisurfacez0|0|MultiPoint|2|KO-BKO +multisurfacez0|0|MultiLineString|2|KO-BKO +multisurfacez0|0|MultiPolygon|2|KO-BKO +multisurfacez0|0|GeometryCollection|2|KO-BKO +multisurfacez0|0|CircularString|2|KO-BKO +multisurfacez0|0|CompoundCurve|2|KO-BKO +multisurfacez0|0|CurvePolygon|2|KO-BKO +multisurfacez0|0|MultiCurve|2|KO-BKO +multisurfacez0|0|MultiSurface|2|OK-BOK +multisurfacez0|0|PolyhedralSurface|2|KO-BKO +multisurfacez0|0|Triangle|2|KO-BKO +multisurfacez0|0|Point|1|KO-BKO +multisurfacez0|0|LineString|1|KO-BKO +multisurfacez0|0|Polygon|1|KO-BKO +multisurfacez0|0|MultiPoint|1|KO-BKO +multisurfacez0|0|MultiLineString|1|KO-BKO +multisurfacez0|0|MultiPolygon|1|KO-BKO +multisurfacez0|0|GeometryCollection|1|KO-BKO +multisurfacez0|0|CircularString|1|KO-BKO +multisurfacez0|0|CompoundCurve|1|KO-BKO +multisurfacez0|0|CurvePolygon|1|KO-BKO +multisurfacez0|0|MultiCurve|1|KO-BKO +multisurfacez0|0|MultiSurface|1|KO-BKO +multisurfacez0|0|PolyhedralSurface|1|KO-BKO +multisurfacez0|0|Triangle|1|KO-BKO +multisurfacez0|0|Point|3|KO-BKO +multisurfacez0|0|LineString|3|KO-BKO +multisurfacez0|0|Polygon|3|KO-BKO +multisurfacez0|0|MultiPoint|3|KO-BKO +multisurfacez0|0|MultiLineString|3|KO-BKO +multisurfacez0|0|MultiPolygon|3|KO-BKO +multisurfacez0|0|GeometryCollection|3|KO-BKO +multisurfacez0|0|CircularString|3|KO-BKO +multisurfacez0|0|CompoundCurve|3|KO-BKO +multisurfacez0|0|CurvePolygon|3|KO-BKO +multisurfacez0|0|MultiCurve|3|KO-BKO +multisurfacez0|0|MultiSurface|3|KO-BKO +multisurfacez0|0|PolyhedralSurface|3|KO-BKO +multisurfacez0|0|Triangle|3|KO-BKO +multisurfacez0|4326|Point|0|KO-BKO +multisurfacez0|4326|LineString|0|KO-BKO +multisurfacez0|4326|Polygon|0|KO-BKO +multisurfacez0|4326|MultiPoint|0|KO-BKO +multisurfacez0|4326|MultiLineString|0|KO-BKO +multisurfacez0|4326|MultiPolygon|0|KO-BKO +multisurfacez0|4326|GeometryCollection|0|KO-BKO +multisurfacez0|4326|CircularString|0|KO-BKO +multisurfacez0|4326|CompoundCurve|0|KO-BKO +multisurfacez0|4326|CurvePolygon|0|KO-BKO +multisurfacez0|4326|MultiCurve|0|KO-BKO +multisurfacez0|4326|MultiSurface|0|KO-BKO +multisurfacez0|4326|PolyhedralSurface|0|KO-BKO +multisurfacez0|4326|Triangle|0|KO-BKO +multisurfacez0|4326|Tin|0|KO-BKO +multisurfacez0|4326|Point|2|KO-BKO +multisurfacez0|4326|LineString|2|KO-BKO +multisurfacez0|4326|Polygon|2|KO-BKO +multisurfacez0|4326|MultiPoint|2|KO-BKO +multisurfacez0|4326|MultiLineString|2|KO-BKO +multisurfacez0|4326|MultiPolygon|2|KO-BKO +multisurfacez0|4326|GeometryCollection|2|KO-BKO +multisurfacez0|4326|CircularString|2|KO-BKO +multisurfacez0|4326|CompoundCurve|2|KO-BKO +multisurfacez0|4326|CurvePolygon|2|KO-BKO +multisurfacez0|4326|MultiCurve|2|KO-BKO +multisurfacez0|4326|MultiSurface|2|OK-BOK +multisurfacez0|4326|PolyhedralSurface|2|KO-BKO +multisurfacez0|4326|Triangle|2|KO-BKO +multisurfacez0|4326|Point|1|KO-BKO +multisurfacez0|4326|LineString|1|KO-BKO +multisurfacez0|4326|Polygon|1|KO-BKO +multisurfacez0|4326|MultiPoint|1|KO-BKO +multisurfacez0|4326|MultiLineString|1|KO-BKO +multisurfacez0|4326|MultiPolygon|1|KO-BKO +multisurfacez0|4326|GeometryCollection|1|KO-BKO +multisurfacez0|4326|CircularString|1|KO-BKO +multisurfacez0|4326|CompoundCurve|1|KO-BKO +multisurfacez0|4326|CurvePolygon|1|KO-BKO +multisurfacez0|4326|MultiCurve|1|KO-BKO +multisurfacez0|4326|MultiSurface|1|KO-BKO +multisurfacez0|4326|PolyhedralSurface|1|KO-BKO +multisurfacez0|4326|Triangle|1|KO-BKO +multisurfacez0|4326|Point|3|KO-BKO +multisurfacez0|4326|LineString|3|KO-BKO +multisurfacez0|4326|Polygon|3|KO-BKO +multisurfacez0|4326|MultiPoint|3|KO-BKO +multisurfacez0|4326|MultiLineString|3|KO-BKO +multisurfacez0|4326|MultiPolygon|3|KO-BKO +multisurfacez0|4326|GeometryCollection|3|KO-BKO +multisurfacez0|4326|CircularString|3|KO-BKO +multisurfacez0|4326|CompoundCurve|3|KO-BKO +multisurfacez0|4326|CurvePolygon|3|KO-BKO +multisurfacez0|4326|MultiCurve|3|KO-BKO +multisurfacez0|4326|MultiSurface|3|KO-BKO +multisurfacez0|4326|PolyhedralSurface|3|KO-BKO +multisurfacez0|4326|Triangle|3|KO-BKO +multisurfacez0||COUNT|4| +multisurfacez4326|0|Point|0|KO-BKO +multisurfacez4326|0|LineString|0|KO-BKO +multisurfacez4326|0|Polygon|0|KO-BKO +multisurfacez4326|0|MultiPoint|0|KO-BKO +multisurfacez4326|0|MultiLineString|0|KO-BKO +multisurfacez4326|0|MultiPolygon|0|KO-BKO +multisurfacez4326|0|GeometryCollection|0|KO-BKO +multisurfacez4326|0|CircularString|0|KO-BKO +multisurfacez4326|0|CompoundCurve|0|KO-BKO +multisurfacez4326|0|CurvePolygon|0|KO-BKO +multisurfacez4326|0|MultiCurve|0|KO-BKO +multisurfacez4326|0|MultiSurface|0|KO-BKO +multisurfacez4326|0|PolyhedralSurface|0|KO-BKO +multisurfacez4326|0|Triangle|0|KO-BKO +multisurfacez4326|0|Tin|0|KO-BKO +multisurfacez4326|0|Point|2|KO-BKO +multisurfacez4326|0|LineString|2|KO-BKO +multisurfacez4326|0|Polygon|2|KO-BKO +multisurfacez4326|0|MultiPoint|2|KO-BKO +multisurfacez4326|0|MultiLineString|2|KO-BKO +multisurfacez4326|0|MultiPolygon|2|KO-BKO +multisurfacez4326|0|GeometryCollection|2|KO-BKO +multisurfacez4326|0|CircularString|2|KO-BKO +multisurfacez4326|0|CompoundCurve|2|KO-BKO +multisurfacez4326|0|CurvePolygon|2|KO-BKO +multisurfacez4326|0|MultiCurve|2|KO-BKO +multisurfacez4326|0|MultiSurface|2|KO-BKO +multisurfacez4326|0|PolyhedralSurface|2|KO-BKO +multisurfacez4326|0|Triangle|2|KO-BKO +multisurfacez4326|0|Point|1|KO-BKO +multisurfacez4326|0|LineString|1|KO-BKO +multisurfacez4326|0|Polygon|1|KO-BKO +multisurfacez4326|0|MultiPoint|1|KO-BKO +multisurfacez4326|0|MultiLineString|1|KO-BKO +multisurfacez4326|0|MultiPolygon|1|KO-BKO +multisurfacez4326|0|GeometryCollection|1|KO-BKO +multisurfacez4326|0|CircularString|1|KO-BKO +multisurfacez4326|0|CompoundCurve|1|KO-BKO +multisurfacez4326|0|CurvePolygon|1|KO-BKO +multisurfacez4326|0|MultiCurve|1|KO-BKO +multisurfacez4326|0|MultiSurface|1|KO-BKO +multisurfacez4326|0|PolyhedralSurface|1|KO-BKO +multisurfacez4326|0|Triangle|1|KO-BKO +multisurfacez4326|0|Point|3|KO-BKO +multisurfacez4326|0|LineString|3|KO-BKO +multisurfacez4326|0|Polygon|3|KO-BKO +multisurfacez4326|0|MultiPoint|3|KO-BKO +multisurfacez4326|0|MultiLineString|3|KO-BKO +multisurfacez4326|0|MultiPolygon|3|KO-BKO +multisurfacez4326|0|GeometryCollection|3|KO-BKO +multisurfacez4326|0|CircularString|3|KO-BKO +multisurfacez4326|0|CompoundCurve|3|KO-BKO +multisurfacez4326|0|CurvePolygon|3|KO-BKO +multisurfacez4326|0|MultiCurve|3|KO-BKO +multisurfacez4326|0|MultiSurface|3|KO-BKO +multisurfacez4326|0|PolyhedralSurface|3|KO-BKO +multisurfacez4326|0|Triangle|3|KO-BKO +multisurfacez4326|4326|Point|0|KO-BKO +multisurfacez4326|4326|LineString|0|KO-BKO +multisurfacez4326|4326|Polygon|0|KO-BKO +multisurfacez4326|4326|MultiPoint|0|KO-BKO +multisurfacez4326|4326|MultiLineString|0|KO-BKO +multisurfacez4326|4326|MultiPolygon|0|KO-BKO +multisurfacez4326|4326|GeometryCollection|0|KO-BKO +multisurfacez4326|4326|CircularString|0|KO-BKO +multisurfacez4326|4326|CompoundCurve|0|KO-BKO +multisurfacez4326|4326|CurvePolygon|0|KO-BKO +multisurfacez4326|4326|MultiCurve|0|KO-BKO +multisurfacez4326|4326|MultiSurface|0|KO-BKO +multisurfacez4326|4326|PolyhedralSurface|0|KO-BKO +multisurfacez4326|4326|Triangle|0|KO-BKO +multisurfacez4326|4326|Tin|0|KO-BKO +multisurfacez4326|4326|Point|2|KO-BKO +multisurfacez4326|4326|LineString|2|KO-BKO +multisurfacez4326|4326|Polygon|2|KO-BKO +multisurfacez4326|4326|MultiPoint|2|KO-BKO +multisurfacez4326|4326|MultiLineString|2|KO-BKO +multisurfacez4326|4326|MultiPolygon|2|KO-BKO +multisurfacez4326|4326|GeometryCollection|2|KO-BKO +multisurfacez4326|4326|CircularString|2|KO-BKO +multisurfacez4326|4326|CompoundCurve|2|KO-BKO +multisurfacez4326|4326|CurvePolygon|2|KO-BKO +multisurfacez4326|4326|MultiCurve|2|KO-BKO +multisurfacez4326|4326|MultiSurface|2|OK-BOK +multisurfacez4326|4326|PolyhedralSurface|2|KO-BKO +multisurfacez4326|4326|Triangle|2|KO-BKO +multisurfacez4326|4326|Point|1|KO-BKO +multisurfacez4326|4326|LineString|1|KO-BKO +multisurfacez4326|4326|Polygon|1|KO-BKO +multisurfacez4326|4326|MultiPoint|1|KO-BKO +multisurfacez4326|4326|MultiLineString|1|KO-BKO +multisurfacez4326|4326|MultiPolygon|1|KO-BKO +multisurfacez4326|4326|GeometryCollection|1|KO-BKO +multisurfacez4326|4326|CircularString|1|KO-BKO +multisurfacez4326|4326|CompoundCurve|1|KO-BKO +multisurfacez4326|4326|CurvePolygon|1|KO-BKO +multisurfacez4326|4326|MultiCurve|1|KO-BKO +multisurfacez4326|4326|MultiSurface|1|KO-BKO +multisurfacez4326|4326|PolyhedralSurface|1|KO-BKO +multisurfacez4326|4326|Triangle|1|KO-BKO +multisurfacez4326|4326|Point|3|KO-BKO +multisurfacez4326|4326|LineString|3|KO-BKO +multisurfacez4326|4326|Polygon|3|KO-BKO +multisurfacez4326|4326|MultiPoint|3|KO-BKO +multisurfacez4326|4326|MultiLineString|3|KO-BKO +multisurfacez4326|4326|MultiPolygon|3|KO-BKO +multisurfacez4326|4326|GeometryCollection|3|KO-BKO +multisurfacez4326|4326|CircularString|3|KO-BKO +multisurfacez4326|4326|CompoundCurve|3|KO-BKO +multisurfacez4326|4326|CurvePolygon|3|KO-BKO +multisurfacez4326|4326|MultiCurve|3|KO-BKO +multisurfacez4326|4326|MultiSurface|3|KO-BKO +multisurfacez4326|4326|PolyhedralSurface|3|KO-BKO +multisurfacez4326|4326|Triangle|3|KO-BKO +multisurfacez4326||COUNT|2| +multisurfacezm|0|Point|0|KO-BKO +multisurfacezm|0|LineString|0|KO-BKO +multisurfacezm|0|Polygon|0|KO-BKO +multisurfacezm|0|MultiPoint|0|KO-BKO +multisurfacezm|0|MultiLineString|0|KO-BKO +multisurfacezm|0|MultiPolygon|0|KO-BKO +multisurfacezm|0|GeometryCollection|0|KO-BKO +multisurfacezm|0|CircularString|0|KO-BKO +multisurfacezm|0|CompoundCurve|0|KO-BKO +multisurfacezm|0|CurvePolygon|0|KO-BKO +multisurfacezm|0|MultiCurve|0|KO-BKO +multisurfacezm|0|MultiSurface|0|KO-BKO +multisurfacezm|0|PolyhedralSurface|0|KO-BKO +multisurfacezm|0|Triangle|0|KO-BKO +multisurfacezm|0|Tin|0|KO-BKO +multisurfacezm|0|Point|2|KO-BKO +multisurfacezm|0|LineString|2|KO-BKO +multisurfacezm|0|Polygon|2|KO-BKO +multisurfacezm|0|MultiPoint|2|KO-BKO +multisurfacezm|0|MultiLineString|2|KO-BKO +multisurfacezm|0|MultiPolygon|2|KO-BKO +multisurfacezm|0|GeometryCollection|2|KO-BKO +multisurfacezm|0|CircularString|2|KO-BKO +multisurfacezm|0|CompoundCurve|2|KO-BKO +multisurfacezm|0|CurvePolygon|2|KO-BKO +multisurfacezm|0|MultiCurve|2|KO-BKO +multisurfacezm|0|MultiSurface|2|KO-BKO +multisurfacezm|0|PolyhedralSurface|2|KO-BKO +multisurfacezm|0|Triangle|2|KO-BKO +multisurfacezm|0|Point|1|KO-BKO +multisurfacezm|0|LineString|1|KO-BKO +multisurfacezm|0|Polygon|1|KO-BKO +multisurfacezm|0|MultiPoint|1|KO-BKO +multisurfacezm|0|MultiLineString|1|KO-BKO +multisurfacezm|0|MultiPolygon|1|KO-BKO +multisurfacezm|0|GeometryCollection|1|KO-BKO +multisurfacezm|0|CircularString|1|KO-BKO +multisurfacezm|0|CompoundCurve|1|KO-BKO +multisurfacezm|0|CurvePolygon|1|KO-BKO +multisurfacezm|0|MultiCurve|1|KO-BKO +multisurfacezm|0|MultiSurface|1|KO-BKO +multisurfacezm|0|PolyhedralSurface|1|KO-BKO +multisurfacezm|0|Triangle|1|KO-BKO +multisurfacezm|0|Point|3|KO-BKO +multisurfacezm|0|LineString|3|KO-BKO +multisurfacezm|0|Polygon|3|KO-BKO +multisurfacezm|0|MultiPoint|3|KO-BKO +multisurfacezm|0|MultiLineString|3|KO-BKO +multisurfacezm|0|MultiPolygon|3|KO-BKO +multisurfacezm|0|GeometryCollection|3|KO-BKO +multisurfacezm|0|CircularString|3|KO-BKO +multisurfacezm|0|CompoundCurve|3|KO-BKO +multisurfacezm|0|CurvePolygon|3|KO-BKO +multisurfacezm|0|MultiCurve|3|KO-BKO +multisurfacezm|0|MultiSurface|3|OK-BOK +multisurfacezm|0|PolyhedralSurface|3|KO-BKO +multisurfacezm|0|Triangle|3|KO-BKO +multisurfacezm|4326|Point|0|KO-BKO +multisurfacezm|4326|LineString|0|KO-BKO +multisurfacezm|4326|Polygon|0|KO-BKO +multisurfacezm|4326|MultiPoint|0|KO-BKO +multisurfacezm|4326|MultiLineString|0|KO-BKO +multisurfacezm|4326|MultiPolygon|0|KO-BKO +multisurfacezm|4326|GeometryCollection|0|KO-BKO +multisurfacezm|4326|CircularString|0|KO-BKO +multisurfacezm|4326|CompoundCurve|0|KO-BKO +multisurfacezm|4326|CurvePolygon|0|KO-BKO +multisurfacezm|4326|MultiCurve|0|KO-BKO +multisurfacezm|4326|MultiSurface|0|KO-BKO +multisurfacezm|4326|PolyhedralSurface|0|KO-BKO +multisurfacezm|4326|Triangle|0|KO-BKO +multisurfacezm|4326|Tin|0|KO-BKO +multisurfacezm|4326|Point|2|KO-BKO +multisurfacezm|4326|LineString|2|KO-BKO +multisurfacezm|4326|Polygon|2|KO-BKO +multisurfacezm|4326|MultiPoint|2|KO-BKO +multisurfacezm|4326|MultiLineString|2|KO-BKO +multisurfacezm|4326|MultiPolygon|2|KO-BKO +multisurfacezm|4326|GeometryCollection|2|KO-BKO +multisurfacezm|4326|CircularString|2|KO-BKO +multisurfacezm|4326|CompoundCurve|2|KO-BKO +multisurfacezm|4326|CurvePolygon|2|KO-BKO +multisurfacezm|4326|MultiCurve|2|KO-BKO +multisurfacezm|4326|MultiSurface|2|KO-BKO +multisurfacezm|4326|PolyhedralSurface|2|KO-BKO +multisurfacezm|4326|Triangle|2|KO-BKO +multisurfacezm|4326|Point|1|KO-BKO +multisurfacezm|4326|LineString|1|KO-BKO +multisurfacezm|4326|Polygon|1|KO-BKO +multisurfacezm|4326|MultiPoint|1|KO-BKO +multisurfacezm|4326|MultiLineString|1|KO-BKO +multisurfacezm|4326|MultiPolygon|1|KO-BKO +multisurfacezm|4326|GeometryCollection|1|KO-BKO +multisurfacezm|4326|CircularString|1|KO-BKO +multisurfacezm|4326|CompoundCurve|1|KO-BKO +multisurfacezm|4326|CurvePolygon|1|KO-BKO +multisurfacezm|4326|MultiCurve|1|KO-BKO +multisurfacezm|4326|MultiSurface|1|KO-BKO +multisurfacezm|4326|PolyhedralSurface|1|KO-BKO +multisurfacezm|4326|Triangle|1|KO-BKO +multisurfacezm|4326|Point|3|KO-BKO +multisurfacezm|4326|LineString|3|KO-BKO +multisurfacezm|4326|Polygon|3|KO-BKO +multisurfacezm|4326|MultiPoint|3|KO-BKO +multisurfacezm|4326|MultiLineString|3|KO-BKO +multisurfacezm|4326|MultiPolygon|3|KO-BKO +multisurfacezm|4326|GeometryCollection|3|KO-BKO +multisurfacezm|4326|CircularString|3|KO-BKO +multisurfacezm|4326|CompoundCurve|3|KO-BKO +multisurfacezm|4326|CurvePolygon|3|KO-BKO +multisurfacezm|4326|MultiCurve|3|KO-BKO +multisurfacezm|4326|MultiSurface|3|OK-BOK +multisurfacezm|4326|PolyhedralSurface|3|KO-BKO +multisurfacezm|4326|Triangle|3|KO-BKO +multisurfacezm||COUNT|4| +multisurfacezm0|0|Point|0|KO-BKO +multisurfacezm0|0|LineString|0|KO-BKO +multisurfacezm0|0|Polygon|0|KO-BKO +multisurfacezm0|0|MultiPoint|0|KO-BKO +multisurfacezm0|0|MultiLineString|0|KO-BKO +multisurfacezm0|0|MultiPolygon|0|KO-BKO +multisurfacezm0|0|GeometryCollection|0|KO-BKO +multisurfacezm0|0|CircularString|0|KO-BKO +multisurfacezm0|0|CompoundCurve|0|KO-BKO +multisurfacezm0|0|CurvePolygon|0|KO-BKO +multisurfacezm0|0|MultiCurve|0|KO-BKO +multisurfacezm0|0|MultiSurface|0|KO-BKO +multisurfacezm0|0|PolyhedralSurface|0|KO-BKO +multisurfacezm0|0|Triangle|0|KO-BKO +multisurfacezm0|0|Tin|0|KO-BKO +multisurfacezm0|0|Point|2|KO-BKO +multisurfacezm0|0|LineString|2|KO-BKO +multisurfacezm0|0|Polygon|2|KO-BKO +multisurfacezm0|0|MultiPoint|2|KO-BKO +multisurfacezm0|0|MultiLineString|2|KO-BKO +multisurfacezm0|0|MultiPolygon|2|KO-BKO +multisurfacezm0|0|GeometryCollection|2|KO-BKO +multisurfacezm0|0|CircularString|2|KO-BKO +multisurfacezm0|0|CompoundCurve|2|KO-BKO +multisurfacezm0|0|CurvePolygon|2|KO-BKO +multisurfacezm0|0|MultiCurve|2|KO-BKO +multisurfacezm0|0|MultiSurface|2|KO-BKO +multisurfacezm0|0|PolyhedralSurface|2|KO-BKO +multisurfacezm0|0|Triangle|2|KO-BKO +multisurfacezm0|0|Point|1|KO-BKO +multisurfacezm0|0|LineString|1|KO-BKO +multisurfacezm0|0|Polygon|1|KO-BKO +multisurfacezm0|0|MultiPoint|1|KO-BKO +multisurfacezm0|0|MultiLineString|1|KO-BKO +multisurfacezm0|0|MultiPolygon|1|KO-BKO +multisurfacezm0|0|GeometryCollection|1|KO-BKO +multisurfacezm0|0|CircularString|1|KO-BKO +multisurfacezm0|0|CompoundCurve|1|KO-BKO +multisurfacezm0|0|CurvePolygon|1|KO-BKO +multisurfacezm0|0|MultiCurve|1|KO-BKO +multisurfacezm0|0|MultiSurface|1|KO-BKO +multisurfacezm0|0|PolyhedralSurface|1|KO-BKO +multisurfacezm0|0|Triangle|1|KO-BKO +multisurfacezm0|0|Point|3|KO-BKO +multisurfacezm0|0|LineString|3|KO-BKO +multisurfacezm0|0|Polygon|3|KO-BKO +multisurfacezm0|0|MultiPoint|3|KO-BKO +multisurfacezm0|0|MultiLineString|3|KO-BKO +multisurfacezm0|0|MultiPolygon|3|KO-BKO +multisurfacezm0|0|GeometryCollection|3|KO-BKO +multisurfacezm0|0|CircularString|3|KO-BKO +multisurfacezm0|0|CompoundCurve|3|KO-BKO +multisurfacezm0|0|CurvePolygon|3|KO-BKO +multisurfacezm0|0|MultiCurve|3|KO-BKO +multisurfacezm0|0|MultiSurface|3|OK-BOK +multisurfacezm0|0|PolyhedralSurface|3|KO-BKO +multisurfacezm0|0|Triangle|3|KO-BKO +multisurfacezm0|4326|Point|0|KO-BKO +multisurfacezm0|4326|LineString|0|KO-BKO +multisurfacezm0|4326|Polygon|0|KO-BKO +multisurfacezm0|4326|MultiPoint|0|KO-BKO +multisurfacezm0|4326|MultiLineString|0|KO-BKO +multisurfacezm0|4326|MultiPolygon|0|KO-BKO +multisurfacezm0|4326|GeometryCollection|0|KO-BKO +multisurfacezm0|4326|CircularString|0|KO-BKO +multisurfacezm0|4326|CompoundCurve|0|KO-BKO +multisurfacezm0|4326|CurvePolygon|0|KO-BKO +multisurfacezm0|4326|MultiCurve|0|KO-BKO +multisurfacezm0|4326|MultiSurface|0|KO-BKO +multisurfacezm0|4326|PolyhedralSurface|0|KO-BKO +multisurfacezm0|4326|Triangle|0|KO-BKO +multisurfacezm0|4326|Tin|0|KO-BKO +multisurfacezm0|4326|Point|2|KO-BKO +multisurfacezm0|4326|LineString|2|KO-BKO +multisurfacezm0|4326|Polygon|2|KO-BKO +multisurfacezm0|4326|MultiPoint|2|KO-BKO +multisurfacezm0|4326|MultiLineString|2|KO-BKO +multisurfacezm0|4326|MultiPolygon|2|KO-BKO +multisurfacezm0|4326|GeometryCollection|2|KO-BKO +multisurfacezm0|4326|CircularString|2|KO-BKO +multisurfacezm0|4326|CompoundCurve|2|KO-BKO +multisurfacezm0|4326|CurvePolygon|2|KO-BKO +multisurfacezm0|4326|MultiCurve|2|KO-BKO +multisurfacezm0|4326|MultiSurface|2|KO-BKO +multisurfacezm0|4326|PolyhedralSurface|2|KO-BKO +multisurfacezm0|4326|Triangle|2|KO-BKO +multisurfacezm0|4326|Point|1|KO-BKO +multisurfacezm0|4326|LineString|1|KO-BKO +multisurfacezm0|4326|Polygon|1|KO-BKO +multisurfacezm0|4326|MultiPoint|1|KO-BKO +multisurfacezm0|4326|MultiLineString|1|KO-BKO +multisurfacezm0|4326|MultiPolygon|1|KO-BKO +multisurfacezm0|4326|GeometryCollection|1|KO-BKO +multisurfacezm0|4326|CircularString|1|KO-BKO +multisurfacezm0|4326|CompoundCurve|1|KO-BKO +multisurfacezm0|4326|CurvePolygon|1|KO-BKO +multisurfacezm0|4326|MultiCurve|1|KO-BKO +multisurfacezm0|4326|MultiSurface|1|KO-BKO +multisurfacezm0|4326|PolyhedralSurface|1|KO-BKO +multisurfacezm0|4326|Triangle|1|KO-BKO +multisurfacezm0|4326|Point|3|KO-BKO +multisurfacezm0|4326|LineString|3|KO-BKO +multisurfacezm0|4326|Polygon|3|KO-BKO +multisurfacezm0|4326|MultiPoint|3|KO-BKO +multisurfacezm0|4326|MultiLineString|3|KO-BKO +multisurfacezm0|4326|MultiPolygon|3|KO-BKO +multisurfacezm0|4326|GeometryCollection|3|KO-BKO +multisurfacezm0|4326|CircularString|3|KO-BKO +multisurfacezm0|4326|CompoundCurve|3|KO-BKO +multisurfacezm0|4326|CurvePolygon|3|KO-BKO +multisurfacezm0|4326|MultiCurve|3|KO-BKO +multisurfacezm0|4326|MultiSurface|3|OK-BOK +multisurfacezm0|4326|PolyhedralSurface|3|KO-BKO +multisurfacezm0|4326|Triangle|3|KO-BKO +multisurfacezm0||COUNT|4| +multisurfacezm4326|0|Point|0|KO-BKO +multisurfacezm4326|0|LineString|0|KO-BKO +multisurfacezm4326|0|Polygon|0|KO-BKO +multisurfacezm4326|0|MultiPoint|0|KO-BKO +multisurfacezm4326|0|MultiLineString|0|KO-BKO +multisurfacezm4326|0|MultiPolygon|0|KO-BKO +multisurfacezm4326|0|GeometryCollection|0|KO-BKO +multisurfacezm4326|0|CircularString|0|KO-BKO +multisurfacezm4326|0|CompoundCurve|0|KO-BKO +multisurfacezm4326|0|CurvePolygon|0|KO-BKO +multisurfacezm4326|0|MultiCurve|0|KO-BKO +multisurfacezm4326|0|MultiSurface|0|KO-BKO +multisurfacezm4326|0|PolyhedralSurface|0|KO-BKO +multisurfacezm4326|0|Triangle|0|KO-BKO +multisurfacezm4326|0|Tin|0|KO-BKO +multisurfacezm4326|0|Point|2|KO-BKO +multisurfacezm4326|0|LineString|2|KO-BKO +multisurfacezm4326|0|Polygon|2|KO-BKO +multisurfacezm4326|0|MultiPoint|2|KO-BKO +multisurfacezm4326|0|MultiLineString|2|KO-BKO +multisurfacezm4326|0|MultiPolygon|2|KO-BKO +multisurfacezm4326|0|GeometryCollection|2|KO-BKO +multisurfacezm4326|0|CircularString|2|KO-BKO +multisurfacezm4326|0|CompoundCurve|2|KO-BKO +multisurfacezm4326|0|CurvePolygon|2|KO-BKO +multisurfacezm4326|0|MultiCurve|2|KO-BKO +multisurfacezm4326|0|MultiSurface|2|KO-BKO +multisurfacezm4326|0|PolyhedralSurface|2|KO-BKO +multisurfacezm4326|0|Triangle|2|KO-BKO +multisurfacezm4326|0|Point|1|KO-BKO +multisurfacezm4326|0|LineString|1|KO-BKO +multisurfacezm4326|0|Polygon|1|KO-BKO +multisurfacezm4326|0|MultiPoint|1|KO-BKO +multisurfacezm4326|0|MultiLineString|1|KO-BKO +multisurfacezm4326|0|MultiPolygon|1|KO-BKO +multisurfacezm4326|0|GeometryCollection|1|KO-BKO +multisurfacezm4326|0|CircularString|1|KO-BKO +multisurfacezm4326|0|CompoundCurve|1|KO-BKO +multisurfacezm4326|0|CurvePolygon|1|KO-BKO +multisurfacezm4326|0|MultiCurve|1|KO-BKO +multisurfacezm4326|0|MultiSurface|1|KO-BKO +multisurfacezm4326|0|PolyhedralSurface|1|KO-BKO +multisurfacezm4326|0|Triangle|1|KO-BKO +multisurfacezm4326|0|Point|3|KO-BKO +multisurfacezm4326|0|LineString|3|KO-BKO +multisurfacezm4326|0|Polygon|3|KO-BKO +multisurfacezm4326|0|MultiPoint|3|KO-BKO +multisurfacezm4326|0|MultiLineString|3|KO-BKO +multisurfacezm4326|0|MultiPolygon|3|KO-BKO +multisurfacezm4326|0|GeometryCollection|3|KO-BKO +multisurfacezm4326|0|CircularString|3|KO-BKO +multisurfacezm4326|0|CompoundCurve|3|KO-BKO +multisurfacezm4326|0|CurvePolygon|3|KO-BKO +multisurfacezm4326|0|MultiCurve|3|KO-BKO +multisurfacezm4326|0|MultiSurface|3|KO-BKO +multisurfacezm4326|0|PolyhedralSurface|3|KO-BKO +multisurfacezm4326|0|Triangle|3|KO-BKO +multisurfacezm4326|4326|Point|0|KO-BKO +multisurfacezm4326|4326|LineString|0|KO-BKO +multisurfacezm4326|4326|Polygon|0|KO-BKO +multisurfacezm4326|4326|MultiPoint|0|KO-BKO +multisurfacezm4326|4326|MultiLineString|0|KO-BKO +multisurfacezm4326|4326|MultiPolygon|0|KO-BKO +multisurfacezm4326|4326|GeometryCollection|0|KO-BKO +multisurfacezm4326|4326|CircularString|0|KO-BKO +multisurfacezm4326|4326|CompoundCurve|0|KO-BKO +multisurfacezm4326|4326|CurvePolygon|0|KO-BKO +multisurfacezm4326|4326|MultiCurve|0|KO-BKO +multisurfacezm4326|4326|MultiSurface|0|KO-BKO +multisurfacezm4326|4326|PolyhedralSurface|0|KO-BKO +multisurfacezm4326|4326|Triangle|0|KO-BKO +multisurfacezm4326|4326|Tin|0|KO-BKO +multisurfacezm4326|4326|Point|2|KO-BKO +multisurfacezm4326|4326|LineString|2|KO-BKO +multisurfacezm4326|4326|Polygon|2|KO-BKO +multisurfacezm4326|4326|MultiPoint|2|KO-BKO +multisurfacezm4326|4326|MultiLineString|2|KO-BKO +multisurfacezm4326|4326|MultiPolygon|2|KO-BKO +multisurfacezm4326|4326|GeometryCollection|2|KO-BKO +multisurfacezm4326|4326|CircularString|2|KO-BKO +multisurfacezm4326|4326|CompoundCurve|2|KO-BKO +multisurfacezm4326|4326|CurvePolygon|2|KO-BKO +multisurfacezm4326|4326|MultiCurve|2|KO-BKO +multisurfacezm4326|4326|MultiSurface|2|KO-BKO +multisurfacezm4326|4326|PolyhedralSurface|2|KO-BKO +multisurfacezm4326|4326|Triangle|2|KO-BKO +multisurfacezm4326|4326|Point|1|KO-BKO +multisurfacezm4326|4326|LineString|1|KO-BKO +multisurfacezm4326|4326|Polygon|1|KO-BKO +multisurfacezm4326|4326|MultiPoint|1|KO-BKO +multisurfacezm4326|4326|MultiLineString|1|KO-BKO +multisurfacezm4326|4326|MultiPolygon|1|KO-BKO +multisurfacezm4326|4326|GeometryCollection|1|KO-BKO +multisurfacezm4326|4326|CircularString|1|KO-BKO +multisurfacezm4326|4326|CompoundCurve|1|KO-BKO +multisurfacezm4326|4326|CurvePolygon|1|KO-BKO +multisurfacezm4326|4326|MultiCurve|1|KO-BKO +multisurfacezm4326|4326|MultiSurface|1|KO-BKO +multisurfacezm4326|4326|PolyhedralSurface|1|KO-BKO +multisurfacezm4326|4326|Triangle|1|KO-BKO +multisurfacezm4326|4326|Point|3|KO-BKO +multisurfacezm4326|4326|LineString|3|KO-BKO +multisurfacezm4326|4326|Polygon|3|KO-BKO +multisurfacezm4326|4326|MultiPoint|3|KO-BKO +multisurfacezm4326|4326|MultiLineString|3|KO-BKO +multisurfacezm4326|4326|MultiPolygon|3|KO-BKO +multisurfacezm4326|4326|GeometryCollection|3|KO-BKO +multisurfacezm4326|4326|CircularString|3|KO-BKO +multisurfacezm4326|4326|CompoundCurve|3|KO-BKO +multisurfacezm4326|4326|CurvePolygon|3|KO-BKO +multisurfacezm4326|4326|MultiCurve|3|KO-BKO +multisurfacezm4326|4326|MultiSurface|3|OK-BOK +multisurfacezm4326|4326|PolyhedralSurface|3|KO-BKO +multisurfacezm4326|4326|Triangle|3|KO-BKO +multisurfacezm4326||COUNT|2| +point|0|Point|0|KO-BKO-GKO:-BGKO +point|0|LineString|0|KO-BKO-GKO:-BGKO +point|0|Polygon|0|KO-BKO-GKO:-BGKO +point|0|MultiPoint|0|KO-BKO-GKO:-BGKO +point|0|MultiLineString|0|KO-BKO-GKO:-BGKO +point|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +point|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +point|0|CircularString|0|KO-BKO-GKO:-BGKO +point|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +point|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +point|0|MultiCurve|0|KO-BKO-GKO:-BGKO +point|0|MultiSurface|0|KO-BKO-GKO:-BGKO +point|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +point|0|Triangle|0|KO-BKO-GKO:-BGKO +point|0|Tin|0|KO-BKO-GKO:-BGKO +point|0|Point|2|KO-BKO-GKO:-BGKO +point|0|LineString|2|KO-BKO-GKO:-BGKO +point|0|Polygon|2|KO-BKO-GKO:-BGKO +point|0|MultiPoint|2|KO-BKO-GKO:-BGKO +point|0|MultiLineString|2|KO-BKO-GKO:-BGKO +point|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +point|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +point|0|CircularString|2|KO-BKO-GKO:-BGKO +point|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +point|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +point|0|MultiCurve|2|KO-BKO-GKO:-BGKO +point|0|MultiSurface|2|KO-BKO-GKO:-BGKO +point|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +point|0|Triangle|2|KO-BKO-GKO:-BGKO +point|0|Point|1|KO-BKO-GKO:-BGKO +point|0|LineString|1|KO-BKO-GKO:-BGKO +point|0|Polygon|1|KO-BKO-GKO:-BGKO +point|0|MultiPoint|1|KO-BKO-GKO:-BGKO +point|0|MultiLineString|1|KO-BKO-GKO:-BGKO +point|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +point|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +point|0|CircularString|1|KO-BKO-GKO:-BGKO +point|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +point|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +point|0|MultiCurve|1|KO-BKO-GKO:-BGKO +point|0|MultiSurface|1|KO-BKO-GKO:-BGKO +point|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +point|0|Triangle|1|KO-BKO-GKO:-BGKO +point|0|Point|3|KO-BKO-GKO:-BGKO +point|0|LineString|3|KO-BKO-GKO:-BGKO +point|0|Polygon|3|KO-BKO-GKO:-BGKO +point|0|MultiPoint|3|KO-BKO-GKO:-BGKO +point|0|MultiLineString|3|KO-BKO-GKO:-BGKO +point|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +point|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +point|0|CircularString|3|KO-BKO-GKO:-BGKO +point|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +point|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +point|0|MultiCurve|3|KO-BKO-GKO:-BGKO +point|0|MultiSurface|3|KO-BKO-GKO:-BGKO +point|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +point|0|Triangle|3|KO-BKO-GKO:-BGKO +point|4326|Point|0|KO-BKO-GKO:-BGKO +point|4326|LineString|0|KO-BKO-GKO:-BGKO +point|4326|Polygon|0|KO-BKO-GKO:-BGKO +point|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +point|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +point|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +point|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +point|4326|CircularString|0|KO-BKO-GKO:-BGKO +point|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +point|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +point|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +point|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +point|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +point|4326|Triangle|0|KO-BKO-GKO:-BGKO +point|4326|Tin|0|KO-BKO-GKO:-BGKO +point|4326|Point|2|KO-BKO-GKO:-BGKO +point|4326|LineString|2|KO-BKO-GKO:-BGKO +point|4326|Polygon|2|KO-BKO-GKO:-BGKO +point|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +point|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +point|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +point|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +point|4326|CircularString|2|KO-BKO-GKO:-BGKO +point|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +point|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +point|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +point|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +point|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +point|4326|Triangle|2|KO-BKO-GKO:-BGKO +point|4326|Point|1|KO-BKO-GKO:-BGKO +point|4326|LineString|1|KO-BKO-GKO:-BGKO +point|4326|Polygon|1|KO-BKO-GKO:-BGKO +point|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +point|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +point|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +point|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +point|4326|CircularString|1|KO-BKO-GKO:-BGKO +point|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +point|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +point|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +point|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +point|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +point|4326|Triangle|1|KO-BKO-GKO:-BGKO +point|4326|Point|3|KO-BKO-GKO:-BGKO +point|4326|LineString|3|KO-BKO-GKO:-BGKO +point|4326|Polygon|3|KO-BKO-GKO:-BGKO +point|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +point|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +point|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +point|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +point|4326|CircularString|3|KO-BKO-GKO:-BGKO +point|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +point|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +point|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +point|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +point|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +point|4326|Triangle|3|KO-BKO-GKO:-BGKO +point||COUNT|0| +point||GCOUNT|0| +point0|0|Point|0|KO-BKO-GKO:-BGKO +point0|0|LineString|0|KO-BKO-GKO:-BGKO +point0|0|Polygon|0|KO-BKO-GKO:-BGKO +point0|0|MultiPoint|0|KO-BKO-GKO:-BGKO +point0|0|MultiLineString|0|KO-BKO-GKO:-BGKO +point0|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +point0|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +point0|0|CircularString|0|KO-BKO-GKO:-BGKO +point0|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +point0|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +point0|0|MultiCurve|0|KO-BKO-GKO:-BGKO +point0|0|MultiSurface|0|KO-BKO-GKO:-BGKO +point0|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +point0|0|Triangle|0|KO-BKO-GKO:-BGKO +point0|0|Tin|0|KO-BKO-GKO:-BGKO +point0|0|Point|2|KO-BKO-GKO:-BGKO +point0|0|LineString|2|KO-BKO-GKO:-BGKO +point0|0|Polygon|2|KO-BKO-GKO:-BGKO +point0|0|MultiPoint|2|KO-BKO-GKO:-BGKO +point0|0|MultiLineString|2|KO-BKO-GKO:-BGKO +point0|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +point0|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +point0|0|CircularString|2|KO-BKO-GKO:-BGKO +point0|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +point0|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +point0|0|MultiCurve|2|KO-BKO-GKO:-BGKO +point0|0|MultiSurface|2|KO-BKO-GKO:-BGKO +point0|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +point0|0|Triangle|2|KO-BKO-GKO:-BGKO +point0|0|Point|1|KO-BKO-GKO:-BGKO +point0|0|LineString|1|KO-BKO-GKO:-BGKO +point0|0|Polygon|1|KO-BKO-GKO:-BGKO +point0|0|MultiPoint|1|KO-BKO-GKO:-BGKO +point0|0|MultiLineString|1|KO-BKO-GKO:-BGKO +point0|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +point0|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +point0|0|CircularString|1|KO-BKO-GKO:-BGKO +point0|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +point0|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +point0|0|MultiCurve|1|KO-BKO-GKO:-BGKO +point0|0|MultiSurface|1|KO-BKO-GKO:-BGKO +point0|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +point0|0|Triangle|1|KO-BKO-GKO:-BGKO +point0|0|Point|3|KO-BKO-GKO:-BGKO +point0|0|LineString|3|KO-BKO-GKO:-BGKO +point0|0|Polygon|3|KO-BKO-GKO:-BGKO +point0|0|MultiPoint|3|KO-BKO-GKO:-BGKO +point0|0|MultiLineString|3|KO-BKO-GKO:-BGKO +point0|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +point0|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +point0|0|CircularString|3|KO-BKO-GKO:-BGKO +point0|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +point0|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +point0|0|MultiCurve|3|KO-BKO-GKO:-BGKO +point0|0|MultiSurface|3|KO-BKO-GKO:-BGKO +point0|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +point0|0|Triangle|3|KO-BKO-GKO:-BGKO +point0|4326|Point|0|KO-BKO-GKO:-BGKO +point0|4326|LineString|0|KO-BKO-GKO:-BGKO +point0|4326|Polygon|0|KO-BKO-GKO:-BGKO +point0|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +point0|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +point0|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +point0|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +point0|4326|CircularString|0|KO-BKO-GKO:-BGKO +point0|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +point0|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +point0|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +point0|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +point0|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +point0|4326|Triangle|0|KO-BKO-GKO:-BGKO +point0|4326|Tin|0|KO-BKO-GKO:-BGKO +point0|4326|Point|2|KO-BKO-GKO:-BGKO +point0|4326|LineString|2|KO-BKO-GKO:-BGKO +point0|4326|Polygon|2|KO-BKO-GKO:-BGKO +point0|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +point0|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +point0|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +point0|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +point0|4326|CircularString|2|KO-BKO-GKO:-BGKO +point0|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +point0|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +point0|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +point0|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +point0|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +point0|4326|Triangle|2|KO-BKO-GKO:-BGKO +point0|4326|Point|1|KO-BKO-GKO:-BGKO +point0|4326|LineString|1|KO-BKO-GKO:-BGKO +point0|4326|Polygon|1|KO-BKO-GKO:-BGKO +point0|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +point0|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +point0|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +point0|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +point0|4326|CircularString|1|KO-BKO-GKO:-BGKO +point0|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +point0|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +point0|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +point0|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +point0|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +point0|4326|Triangle|1|KO-BKO-GKO:-BGKO +point0|4326|Point|3|KO-BKO-GKO:-BGKO +point0|4326|LineString|3|KO-BKO-GKO:-BGKO +point0|4326|Polygon|3|KO-BKO-GKO:-BGKO +point0|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +point0|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +point0|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +point0|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +point0|4326|CircularString|3|KO-BKO-GKO:-BGKO +point0|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +point0|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +point0|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +point0|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +point0|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +point0|4326|Triangle|3|KO-BKO-GKO:-BGKO +point0||COUNT|0| +point0||GCOUNT|0| +point4326|0|Point|0|KO-BKO-GKO:-BGKO +point4326|0|LineString|0|KO-BKO-GKO:-BGKO +point4326|0|Polygon|0|KO-BKO-GKO:-BGKO +point4326|0|MultiPoint|0|KO-BKO-GKO:-BGKO +point4326|0|MultiLineString|0|KO-BKO-GKO:-BGKO +point4326|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +point4326|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +point4326|0|CircularString|0|KO-BKO-GKO:-BGKO +point4326|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +point4326|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +point4326|0|MultiCurve|0|KO-BKO-GKO:-BGKO +point4326|0|MultiSurface|0|KO-BKO-GKO:-BGKO +point4326|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +point4326|0|Triangle|0|KO-BKO-GKO:-BGKO +point4326|0|Tin|0|KO-BKO-GKO:-BGKO +point4326|0|Point|2|KO-BKO-GKO:-BGKO +point4326|0|LineString|2|KO-BKO-GKO:-BGKO +point4326|0|Polygon|2|KO-BKO-GKO:-BGKO +point4326|0|MultiPoint|2|KO-BKO-GKO:-BGKO +point4326|0|MultiLineString|2|KO-BKO-GKO:-BGKO +point4326|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +point4326|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +point4326|0|CircularString|2|KO-BKO-GKO:-BGKO +point4326|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +point4326|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +point4326|0|MultiCurve|2|KO-BKO-GKO:-BGKO +point4326|0|MultiSurface|2|KO-BKO-GKO:-BGKO +point4326|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +point4326|0|Triangle|2|KO-BKO-GKO:-BGKO +point4326|0|Point|1|KO-BKO-GKO:-BGKO +point4326|0|LineString|1|KO-BKO-GKO:-BGKO +point4326|0|Polygon|1|KO-BKO-GKO:-BGKO +point4326|0|MultiPoint|1|KO-BKO-GKO:-BGKO +point4326|0|MultiLineString|1|KO-BKO-GKO:-BGKO +point4326|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +point4326|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +point4326|0|CircularString|1|KO-BKO-GKO:-BGKO +point4326|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +point4326|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +point4326|0|MultiCurve|1|KO-BKO-GKO:-BGKO +point4326|0|MultiSurface|1|KO-BKO-GKO:-BGKO +point4326|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +point4326|0|Triangle|1|KO-BKO-GKO:-BGKO +point4326|0|Point|3|KO-BKO-GKO:-BGKO +point4326|0|LineString|3|KO-BKO-GKO:-BGKO +point4326|0|Polygon|3|KO-BKO-GKO:-BGKO +point4326|0|MultiPoint|3|KO-BKO-GKO:-BGKO +point4326|0|MultiLineString|3|KO-BKO-GKO:-BGKO +point4326|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +point4326|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +point4326|0|CircularString|3|KO-BKO-GKO:-BGKO +point4326|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +point4326|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +point4326|0|MultiCurve|3|KO-BKO-GKO:-BGKO +point4326|0|MultiSurface|3|KO-BKO-GKO:-BGKO +point4326|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +point4326|0|Triangle|3|KO-BKO-GKO:-BGKO +point4326|4326|Point|0|KO-BKO-GKO:-BGKO +point4326|4326|LineString|0|KO-BKO-GKO:-BGKO +point4326|4326|Polygon|0|KO-BKO-GKO:-BGKO +point4326|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +point4326|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +point4326|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +point4326|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +point4326|4326|CircularString|0|KO-BKO-GKO:-BGKO +point4326|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +point4326|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +point4326|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +point4326|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +point4326|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +point4326|4326|Triangle|0|KO-BKO-GKO:-BGKO +point4326|4326|Tin|0|KO-BKO-GKO:-BGKO +point4326|4326|Point|2|KO-BKO-GKO:-BGKO +point4326|4326|LineString|2|KO-BKO-GKO:-BGKO +point4326|4326|Polygon|2|KO-BKO-GKO:-BGKO +point4326|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +point4326|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +point4326|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +point4326|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +point4326|4326|CircularString|2|KO-BKO-GKO:-BGKO +point4326|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +point4326|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +point4326|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +point4326|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +point4326|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +point4326|4326|Triangle|2|KO-BKO-GKO:-BGKO +point4326|4326|Point|1|KO-BKO-GKO:-BGKO +point4326|4326|LineString|1|KO-BKO-GKO:-BGKO +point4326|4326|Polygon|1|KO-BKO-GKO:-BGKO +point4326|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +point4326|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +point4326|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +point4326|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +point4326|4326|CircularString|1|KO-BKO-GKO:-BGKO +point4326|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +point4326|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +point4326|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +point4326|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +point4326|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +point4326|4326|Triangle|1|KO-BKO-GKO:-BGKO +point4326|4326|Point|3|KO-BKO-GKO:-BGKO +point4326|4326|LineString|3|KO-BKO-GKO:-BGKO +point4326|4326|Polygon|3|KO-BKO-GKO:-BGKO +point4326|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +point4326|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +point4326|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +point4326|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +point4326|4326|CircularString|3|KO-BKO-GKO:-BGKO +point4326|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +point4326|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +point4326|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +point4326|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +point4326|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +point4326|4326|Triangle|3|KO-BKO-GKO:-BGKO +point4326||COUNT|0| +point4326||GCOUNT|0| +pointm|0|Point|0|KO-BKO-GKO:-BGKO +pointm|0|LineString|0|KO-BKO-GKO:-BGKO +pointm|0|Polygon|0|KO-BKO-GKO:-BGKO +pointm|0|MultiPoint|0|KO-BKO-GKO:-BGKO +pointm|0|MultiLineString|0|KO-BKO-GKO:-BGKO +pointm|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +pointm|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +pointm|0|CircularString|0|KO-BKO-GKO:-BGKO +pointm|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +pointm|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +pointm|0|MultiCurve|0|KO-BKO-GKO:-BGKO +pointm|0|MultiSurface|0|KO-BKO-GKO:-BGKO +pointm|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +pointm|0|Triangle|0|KO-BKO-GKO:-BGKO +pointm|0|Tin|0|KO-BKO-GKO:-BGKO +pointm|0|Point|2|KO-BKO-GKO:-BGKO +pointm|0|LineString|2|KO-BKO-GKO:-BGKO +pointm|0|Polygon|2|KO-BKO-GKO:-BGKO +pointm|0|MultiPoint|2|KO-BKO-GKO:-BGKO +pointm|0|MultiLineString|2|KO-BKO-GKO:-BGKO +pointm|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +pointm|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +pointm|0|CircularString|2|KO-BKO-GKO:-BGKO +pointm|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +pointm|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +pointm|0|MultiCurve|2|KO-BKO-GKO:-BGKO +pointm|0|MultiSurface|2|KO-BKO-GKO:-BGKO +pointm|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +pointm|0|Triangle|2|KO-BKO-GKO:-BGKO +pointm|0|Point|1|KO-BKO-GKO:-BGKO +pointm|0|LineString|1|KO-BKO-GKO:-BGKO +pointm|0|Polygon|1|KO-BKO-GKO:-BGKO +pointm|0|MultiPoint|1|KO-BKO-GKO:-BGKO +pointm|0|MultiLineString|1|KO-BKO-GKO:-BGKO +pointm|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +pointm|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +pointm|0|CircularString|1|KO-BKO-GKO:-BGKO +pointm|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +pointm|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +pointm|0|MultiCurve|1|KO-BKO-GKO:-BGKO +pointm|0|MultiSurface|1|KO-BKO-GKO:-BGKO +pointm|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +pointm|0|Triangle|1|KO-BKO-GKO:-BGKO +pointm|0|Point|3|KO-BKO-GKO:-BGKO +pointm|0|LineString|3|KO-BKO-GKO:-BGKO +pointm|0|Polygon|3|KO-BKO-GKO:-BGKO +pointm|0|MultiPoint|3|KO-BKO-GKO:-BGKO +pointm|0|MultiLineString|3|KO-BKO-GKO:-BGKO +pointm|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +pointm|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +pointm|0|CircularString|3|KO-BKO-GKO:-BGKO +pointm|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +pointm|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +pointm|0|MultiCurve|3|KO-BKO-GKO:-BGKO +pointm|0|MultiSurface|3|KO-BKO-GKO:-BGKO +pointm|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +pointm|0|Triangle|3|KO-BKO-GKO:-BGKO +pointm|4326|Point|0|KO-BKO-GKO:-BGKO +pointm|4326|LineString|0|KO-BKO-GKO:-BGKO +pointm|4326|Polygon|0|KO-BKO-GKO:-BGKO +pointm|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +pointm|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +pointm|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +pointm|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +pointm|4326|CircularString|0|KO-BKO-GKO:-BGKO +pointm|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +pointm|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +pointm|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +pointm|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +pointm|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +pointm|4326|Triangle|0|KO-BKO-GKO:-BGKO +pointm|4326|Tin|0|KO-BKO-GKO:-BGKO +pointm|4326|Point|2|KO-BKO-GKO:-BGKO +pointm|4326|LineString|2|KO-BKO-GKO:-BGKO +pointm|4326|Polygon|2|KO-BKO-GKO:-BGKO +pointm|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +pointm|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +pointm|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +pointm|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +pointm|4326|CircularString|2|KO-BKO-GKO:-BGKO +pointm|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +pointm|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +pointm|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +pointm|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +pointm|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +pointm|4326|Triangle|2|KO-BKO-GKO:-BGKO +pointm|4326|Point|1|KO-BKO-GKO:-BGKO +pointm|4326|LineString|1|KO-BKO-GKO:-BGKO +pointm|4326|Polygon|1|KO-BKO-GKO:-BGKO +pointm|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +pointm|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +pointm|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +pointm|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +pointm|4326|CircularString|1|KO-BKO-GKO:-BGKO +pointm|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +pointm|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +pointm|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +pointm|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +pointm|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +pointm|4326|Triangle|1|KO-BKO-GKO:-BGKO +pointm|4326|Point|3|KO-BKO-GKO:-BGKO +pointm|4326|LineString|3|KO-BKO-GKO:-BGKO +pointm|4326|Polygon|3|KO-BKO-GKO:-BGKO +pointm|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +pointm|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +pointm|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +pointm|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +pointm|4326|CircularString|3|KO-BKO-GKO:-BGKO +pointm|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +pointm|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +pointm|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +pointm|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +pointm|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +pointm|4326|Triangle|3|KO-BKO-GKO:-BGKO +pointm||COUNT|0| +pointm||GCOUNT|0| +pointm0|0|Point|0|KO-BKO-GKO:-BGKO +pointm0|0|LineString|0|KO-BKO-GKO:-BGKO +pointm0|0|Polygon|0|KO-BKO-GKO:-BGKO +pointm0|0|MultiPoint|0|KO-BKO-GKO:-BGKO +pointm0|0|MultiLineString|0|KO-BKO-GKO:-BGKO +pointm0|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +pointm0|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +pointm0|0|CircularString|0|KO-BKO-GKO:-BGKO +pointm0|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +pointm0|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +pointm0|0|MultiCurve|0|KO-BKO-GKO:-BGKO +pointm0|0|MultiSurface|0|KO-BKO-GKO:-BGKO +pointm0|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +pointm0|0|Triangle|0|KO-BKO-GKO:-BGKO +pointm0|0|Tin|0|KO-BKO-GKO:-BGKO +pointm0|0|Point|2|KO-BKO-GKO:-BGKO +pointm0|0|LineString|2|KO-BKO-GKO:-BGKO +pointm0|0|Polygon|2|KO-BKO-GKO:-BGKO +pointm0|0|MultiPoint|2|KO-BKO-GKO:-BGKO +pointm0|0|MultiLineString|2|KO-BKO-GKO:-BGKO +pointm0|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +pointm0|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +pointm0|0|CircularString|2|KO-BKO-GKO:-BGKO +pointm0|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +pointm0|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +pointm0|0|MultiCurve|2|KO-BKO-GKO:-BGKO +pointm0|0|MultiSurface|2|KO-BKO-GKO:-BGKO +pointm0|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +pointm0|0|Triangle|2|KO-BKO-GKO:-BGKO +pointm0|0|Point|1|KO-BKO-GKO:-BGKO +pointm0|0|LineString|1|KO-BKO-GKO:-BGKO +pointm0|0|Polygon|1|KO-BKO-GKO:-BGKO +pointm0|0|MultiPoint|1|KO-BKO-GKO:-BGKO +pointm0|0|MultiLineString|1|KO-BKO-GKO:-BGKO +pointm0|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +pointm0|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +pointm0|0|CircularString|1|KO-BKO-GKO:-BGKO +pointm0|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +pointm0|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +pointm0|0|MultiCurve|1|KO-BKO-GKO:-BGKO +pointm0|0|MultiSurface|1|KO-BKO-GKO:-BGKO +pointm0|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +pointm0|0|Triangle|1|KO-BKO-GKO:-BGKO +pointm0|0|Point|3|KO-BKO-GKO:-BGKO +pointm0|0|LineString|3|KO-BKO-GKO:-BGKO +pointm0|0|Polygon|3|KO-BKO-GKO:-BGKO +pointm0|0|MultiPoint|3|KO-BKO-GKO:-BGKO +pointm0|0|MultiLineString|3|KO-BKO-GKO:-BGKO +pointm0|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +pointm0|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +pointm0|0|CircularString|3|KO-BKO-GKO:-BGKO +pointm0|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +pointm0|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +pointm0|0|MultiCurve|3|KO-BKO-GKO:-BGKO +pointm0|0|MultiSurface|3|KO-BKO-GKO:-BGKO +pointm0|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +pointm0|0|Triangle|3|KO-BKO-GKO:-BGKO +pointm0|4326|Point|0|KO-BKO-GKO:-BGKO +pointm0|4326|LineString|0|KO-BKO-GKO:-BGKO +pointm0|4326|Polygon|0|KO-BKO-GKO:-BGKO +pointm0|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +pointm0|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +pointm0|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +pointm0|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +pointm0|4326|CircularString|0|KO-BKO-GKO:-BGKO +pointm0|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +pointm0|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +pointm0|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +pointm0|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +pointm0|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +pointm0|4326|Triangle|0|KO-BKO-GKO:-BGKO +pointm0|4326|Tin|0|KO-BKO-GKO:-BGKO +pointm0|4326|Point|2|KO-BKO-GKO:-BGKO +pointm0|4326|LineString|2|KO-BKO-GKO:-BGKO +pointm0|4326|Polygon|2|KO-BKO-GKO:-BGKO +pointm0|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +pointm0|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +pointm0|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +pointm0|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +pointm0|4326|CircularString|2|KO-BKO-GKO:-BGKO +pointm0|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +pointm0|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +pointm0|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +pointm0|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +pointm0|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +pointm0|4326|Triangle|2|KO-BKO-GKO:-BGKO +pointm0|4326|Point|1|KO-BKO-GKO:-BGKO +pointm0|4326|LineString|1|KO-BKO-GKO:-BGKO +pointm0|4326|Polygon|1|KO-BKO-GKO:-BGKO +pointm0|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +pointm0|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +pointm0|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +pointm0|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +pointm0|4326|CircularString|1|KO-BKO-GKO:-BGKO +pointm0|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +pointm0|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +pointm0|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +pointm0|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +pointm0|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +pointm0|4326|Triangle|1|KO-BKO-GKO:-BGKO +pointm0|4326|Point|3|KO-BKO-GKO:-BGKO +pointm0|4326|LineString|3|KO-BKO-GKO:-BGKO +pointm0|4326|Polygon|3|KO-BKO-GKO:-BGKO +pointm0|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +pointm0|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +pointm0|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +pointm0|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +pointm0|4326|CircularString|3|KO-BKO-GKO:-BGKO +pointm0|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +pointm0|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +pointm0|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +pointm0|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +pointm0|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +pointm0|4326|Triangle|3|KO-BKO-GKO:-BGKO +pointm0||COUNT|0| +pointm0||GCOUNT|0| +pointm4326|0|Point|0|KO-BKO-GKO:-BGKO +pointm4326|0|LineString|0|KO-BKO-GKO:-BGKO +pointm4326|0|Polygon|0|KO-BKO-GKO:-BGKO +pointm4326|0|MultiPoint|0|KO-BKO-GKO:-BGKO +pointm4326|0|MultiLineString|0|KO-BKO-GKO:-BGKO +pointm4326|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +pointm4326|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +pointm4326|0|CircularString|0|KO-BKO-GKO:-BGKO +pointm4326|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +pointm4326|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +pointm4326|0|MultiCurve|0|KO-BKO-GKO:-BGKO +pointm4326|0|MultiSurface|0|KO-BKO-GKO:-BGKO +pointm4326|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +pointm4326|0|Triangle|0|KO-BKO-GKO:-BGKO +pointm4326|0|Tin|0|KO-BKO-GKO:-BGKO +pointm4326|0|Point|2|KO-BKO-GKO:-BGKO +pointm4326|0|LineString|2|KO-BKO-GKO:-BGKO +pointm4326|0|Polygon|2|KO-BKO-GKO:-BGKO +pointm4326|0|MultiPoint|2|KO-BKO-GKO:-BGKO +pointm4326|0|MultiLineString|2|KO-BKO-GKO:-BGKO +pointm4326|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +pointm4326|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +pointm4326|0|CircularString|2|KO-BKO-GKO:-BGKO +pointm4326|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +pointm4326|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +pointm4326|0|MultiCurve|2|KO-BKO-GKO:-BGKO +pointm4326|0|MultiSurface|2|KO-BKO-GKO:-BGKO +pointm4326|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +pointm4326|0|Triangle|2|KO-BKO-GKO:-BGKO +pointm4326|0|Point|1|KO-BKO-GKO:-BGKO +pointm4326|0|LineString|1|KO-BKO-GKO:-BGKO +pointm4326|0|Polygon|1|KO-BKO-GKO:-BGKO +pointm4326|0|MultiPoint|1|KO-BKO-GKO:-BGKO +pointm4326|0|MultiLineString|1|KO-BKO-GKO:-BGKO +pointm4326|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +pointm4326|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +pointm4326|0|CircularString|1|KO-BKO-GKO:-BGKO +pointm4326|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +pointm4326|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +pointm4326|0|MultiCurve|1|KO-BKO-GKO:-BGKO +pointm4326|0|MultiSurface|1|KO-BKO-GKO:-BGKO +pointm4326|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +pointm4326|0|Triangle|1|KO-BKO-GKO:-BGKO +pointm4326|0|Point|3|KO-BKO-GKO:-BGKO +pointm4326|0|LineString|3|KO-BKO-GKO:-BGKO +pointm4326|0|Polygon|3|KO-BKO-GKO:-BGKO +pointm4326|0|MultiPoint|3|KO-BKO-GKO:-BGKO +pointm4326|0|MultiLineString|3|KO-BKO-GKO:-BGKO +pointm4326|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +pointm4326|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +pointm4326|0|CircularString|3|KO-BKO-GKO:-BGKO +pointm4326|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +pointm4326|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +pointm4326|0|MultiCurve|3|KO-BKO-GKO:-BGKO +pointm4326|0|MultiSurface|3|KO-BKO-GKO:-BGKO +pointm4326|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +pointm4326|0|Triangle|3|KO-BKO-GKO:-BGKO +pointm4326|4326|Point|0|KO-BKO-GKO:-BGKO +pointm4326|4326|LineString|0|KO-BKO-GKO:-BGKO +pointm4326|4326|Polygon|0|KO-BKO-GKO:-BGKO +pointm4326|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +pointm4326|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +pointm4326|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +pointm4326|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +pointm4326|4326|CircularString|0|KO-BKO-GKO:-BGKO +pointm4326|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +pointm4326|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +pointm4326|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +pointm4326|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +pointm4326|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +pointm4326|4326|Triangle|0|KO-BKO-GKO:-BGKO +pointm4326|4326|Tin|0|KO-BKO-GKO:-BGKO +pointm4326|4326|Point|2|KO-BKO-GKO:-BGKO +pointm4326|4326|LineString|2|KO-BKO-GKO:-BGKO +pointm4326|4326|Polygon|2|KO-BKO-GKO:-BGKO +pointm4326|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +pointm4326|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +pointm4326|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +pointm4326|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +pointm4326|4326|CircularString|2|KO-BKO-GKO:-BGKO +pointm4326|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +pointm4326|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +pointm4326|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +pointm4326|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +pointm4326|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +pointm4326|4326|Triangle|2|KO-BKO-GKO:-BGKO +pointm4326|4326|Point|1|KO-BKO-GKO:-BGKO +pointm4326|4326|LineString|1|KO-BKO-GKO:-BGKO +pointm4326|4326|Polygon|1|KO-BKO-GKO:-BGKO +pointm4326|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +pointm4326|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +pointm4326|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +pointm4326|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +pointm4326|4326|CircularString|1|KO-BKO-GKO:-BGKO +pointm4326|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +pointm4326|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +pointm4326|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +pointm4326|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +pointm4326|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +pointm4326|4326|Triangle|1|KO-BKO-GKO:-BGKO +pointm4326|4326|Point|3|KO-BKO-GKO:-BGKO +pointm4326|4326|LineString|3|KO-BKO-GKO:-BGKO +pointm4326|4326|Polygon|3|KO-BKO-GKO:-BGKO +pointm4326|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +pointm4326|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +pointm4326|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +pointm4326|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +pointm4326|4326|CircularString|3|KO-BKO-GKO:-BGKO +pointm4326|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +pointm4326|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +pointm4326|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +pointm4326|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +pointm4326|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +pointm4326|4326|Triangle|3|KO-BKO-GKO:-BGKO +pointm4326||COUNT|0| +pointm4326||GCOUNT|0| +pointz|0|Point|0|KO-BKO-GKO:-BGKO +pointz|0|LineString|0|KO-BKO-GKO:-BGKO +pointz|0|Polygon|0|KO-BKO-GKO:-BGKO +pointz|0|MultiPoint|0|KO-BKO-GKO:-BGKO +pointz|0|MultiLineString|0|KO-BKO-GKO:-BGKO +pointz|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +pointz|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +pointz|0|CircularString|0|KO-BKO-GKO:-BGKO +pointz|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +pointz|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +pointz|0|MultiCurve|0|KO-BKO-GKO:-BGKO +pointz|0|MultiSurface|0|KO-BKO-GKO:-BGKO +pointz|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +pointz|0|Triangle|0|KO-BKO-GKO:-BGKO +pointz|0|Tin|0|KO-BKO-GKO:-BGKO +pointz|0|Point|2|KO-BKO-GKO:-BGKO +pointz|0|LineString|2|KO-BKO-GKO:-BGKO +pointz|0|Polygon|2|KO-BKO-GKO:-BGKO +pointz|0|MultiPoint|2|KO-BKO-GKO:-BGKO +pointz|0|MultiLineString|2|KO-BKO-GKO:-BGKO +pointz|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +pointz|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +pointz|0|CircularString|2|KO-BKO-GKO:-BGKO +pointz|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +pointz|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +pointz|0|MultiCurve|2|KO-BKO-GKO:-BGKO +pointz|0|MultiSurface|2|KO-BKO-GKO:-BGKO +pointz|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +pointz|0|Triangle|2|KO-BKO-GKO:-BGKO +pointz|0|Point|1|KO-BKO-GKO:-BGKO +pointz|0|LineString|1|KO-BKO-GKO:-BGKO +pointz|0|Polygon|1|KO-BKO-GKO:-BGKO +pointz|0|MultiPoint|1|KO-BKO-GKO:-BGKO +pointz|0|MultiLineString|1|KO-BKO-GKO:-BGKO +pointz|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +pointz|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +pointz|0|CircularString|1|KO-BKO-GKO:-BGKO +pointz|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +pointz|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +pointz|0|MultiCurve|1|KO-BKO-GKO:-BGKO +pointz|0|MultiSurface|1|KO-BKO-GKO:-BGKO +pointz|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +pointz|0|Triangle|1|KO-BKO-GKO:-BGKO +pointz|0|Point|3|KO-BKO-GKO:-BGKO +pointz|0|LineString|3|KO-BKO-GKO:-BGKO +pointz|0|Polygon|3|KO-BKO-GKO:-BGKO +pointz|0|MultiPoint|3|KO-BKO-GKO:-BGKO +pointz|0|MultiLineString|3|KO-BKO-GKO:-BGKO +pointz|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +pointz|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +pointz|0|CircularString|3|KO-BKO-GKO:-BGKO +pointz|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +pointz|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +pointz|0|MultiCurve|3|KO-BKO-GKO:-BGKO +pointz|0|MultiSurface|3|KO-BKO-GKO:-BGKO +pointz|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +pointz|0|Triangle|3|KO-BKO-GKO:-BGKO +pointz|4326|Point|0|KO-BKO-GKO:-BGKO +pointz|4326|LineString|0|KO-BKO-GKO:-BGKO +pointz|4326|Polygon|0|KO-BKO-GKO:-BGKO +pointz|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +pointz|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +pointz|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +pointz|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +pointz|4326|CircularString|0|KO-BKO-GKO:-BGKO +pointz|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +pointz|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +pointz|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +pointz|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +pointz|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +pointz|4326|Triangle|0|KO-BKO-GKO:-BGKO +pointz|4326|Tin|0|KO-BKO-GKO:-BGKO +pointz|4326|Point|2|KO-BKO-GKO:-BGKO +pointz|4326|LineString|2|KO-BKO-GKO:-BGKO +pointz|4326|Polygon|2|KO-BKO-GKO:-BGKO +pointz|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +pointz|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +pointz|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +pointz|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +pointz|4326|CircularString|2|KO-BKO-GKO:-BGKO +pointz|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +pointz|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +pointz|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +pointz|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +pointz|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +pointz|4326|Triangle|2|KO-BKO-GKO:-BGKO +pointz|4326|Point|1|KO-BKO-GKO:-BGKO +pointz|4326|LineString|1|KO-BKO-GKO:-BGKO +pointz|4326|Polygon|1|KO-BKO-GKO:-BGKO +pointz|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +pointz|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +pointz|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +pointz|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +pointz|4326|CircularString|1|KO-BKO-GKO:-BGKO +pointz|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +pointz|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +pointz|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +pointz|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +pointz|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +pointz|4326|Triangle|1|KO-BKO-GKO:-BGKO +pointz|4326|Point|3|KO-BKO-GKO:-BGKO +pointz|4326|LineString|3|KO-BKO-GKO:-BGKO +pointz|4326|Polygon|3|KO-BKO-GKO:-BGKO +pointz|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +pointz|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +pointz|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +pointz|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +pointz|4326|CircularString|3|KO-BKO-GKO:-BGKO +pointz|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +pointz|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +pointz|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +pointz|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +pointz|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +pointz|4326|Triangle|3|KO-BKO-GKO:-BGKO +pointz||COUNT|0| +pointz||GCOUNT|0| +pointz0|0|Point|0|KO-BKO-GKO:-BGKO +pointz0|0|LineString|0|KO-BKO-GKO:-BGKO +pointz0|0|Polygon|0|KO-BKO-GKO:-BGKO +pointz0|0|MultiPoint|0|KO-BKO-GKO:-BGKO +pointz0|0|MultiLineString|0|KO-BKO-GKO:-BGKO +pointz0|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +pointz0|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +pointz0|0|CircularString|0|KO-BKO-GKO:-BGKO +pointz0|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +pointz0|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +pointz0|0|MultiCurve|0|KO-BKO-GKO:-BGKO +pointz0|0|MultiSurface|0|KO-BKO-GKO:-BGKO +pointz0|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +pointz0|0|Triangle|0|KO-BKO-GKO:-BGKO +pointz0|0|Tin|0|KO-BKO-GKO:-BGKO +pointz0|0|Point|2|KO-BKO-GKO:-BGKO +pointz0|0|LineString|2|KO-BKO-GKO:-BGKO +pointz0|0|Polygon|2|KO-BKO-GKO:-BGKO +pointz0|0|MultiPoint|2|KO-BKO-GKO:-BGKO +pointz0|0|MultiLineString|2|KO-BKO-GKO:-BGKO +pointz0|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +pointz0|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +pointz0|0|CircularString|2|KO-BKO-GKO:-BGKO +pointz0|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +pointz0|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +pointz0|0|MultiCurve|2|KO-BKO-GKO:-BGKO +pointz0|0|MultiSurface|2|KO-BKO-GKO:-BGKO +pointz0|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +pointz0|0|Triangle|2|KO-BKO-GKO:-BGKO +pointz0|0|Point|1|KO-BKO-GKO:-BGKO +pointz0|0|LineString|1|KO-BKO-GKO:-BGKO +pointz0|0|Polygon|1|KO-BKO-GKO:-BGKO +pointz0|0|MultiPoint|1|KO-BKO-GKO:-BGKO +pointz0|0|MultiLineString|1|KO-BKO-GKO:-BGKO +pointz0|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +pointz0|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +pointz0|0|CircularString|1|KO-BKO-GKO:-BGKO +pointz0|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +pointz0|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +pointz0|0|MultiCurve|1|KO-BKO-GKO:-BGKO +pointz0|0|MultiSurface|1|KO-BKO-GKO:-BGKO +pointz0|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +pointz0|0|Triangle|1|KO-BKO-GKO:-BGKO +pointz0|0|Point|3|KO-BKO-GKO:-BGKO +pointz0|0|LineString|3|KO-BKO-GKO:-BGKO +pointz0|0|Polygon|3|KO-BKO-GKO:-BGKO +pointz0|0|MultiPoint|3|KO-BKO-GKO:-BGKO +pointz0|0|MultiLineString|3|KO-BKO-GKO:-BGKO +pointz0|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +pointz0|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +pointz0|0|CircularString|3|KO-BKO-GKO:-BGKO +pointz0|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +pointz0|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +pointz0|0|MultiCurve|3|KO-BKO-GKO:-BGKO +pointz0|0|MultiSurface|3|KO-BKO-GKO:-BGKO +pointz0|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +pointz0|0|Triangle|3|KO-BKO-GKO:-BGKO +pointz0|4326|Point|0|KO-BKO-GKO:-BGKO +pointz0|4326|LineString|0|KO-BKO-GKO:-BGKO +pointz0|4326|Polygon|0|KO-BKO-GKO:-BGKO +pointz0|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +pointz0|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +pointz0|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +pointz0|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +pointz0|4326|CircularString|0|KO-BKO-GKO:-BGKO +pointz0|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +pointz0|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +pointz0|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +pointz0|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +pointz0|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +pointz0|4326|Triangle|0|KO-BKO-GKO:-BGKO +pointz0|4326|Tin|0|KO-BKO-GKO:-BGKO +pointz0|4326|Point|2|KO-BKO-GKO:-BGKO +pointz0|4326|LineString|2|KO-BKO-GKO:-BGKO +pointz0|4326|Polygon|2|KO-BKO-GKO:-BGKO +pointz0|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +pointz0|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +pointz0|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +pointz0|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +pointz0|4326|CircularString|2|KO-BKO-GKO:-BGKO +pointz0|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +pointz0|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +pointz0|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +pointz0|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +pointz0|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +pointz0|4326|Triangle|2|KO-BKO-GKO:-BGKO +pointz0|4326|Point|1|KO-BKO-GKO:-BGKO +pointz0|4326|LineString|1|KO-BKO-GKO:-BGKO +pointz0|4326|Polygon|1|KO-BKO-GKO:-BGKO +pointz0|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +pointz0|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +pointz0|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +pointz0|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +pointz0|4326|CircularString|1|KO-BKO-GKO:-BGKO +pointz0|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +pointz0|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +pointz0|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +pointz0|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +pointz0|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +pointz0|4326|Triangle|1|KO-BKO-GKO:-BGKO +pointz0|4326|Point|3|KO-BKO-GKO:-BGKO +pointz0|4326|LineString|3|KO-BKO-GKO:-BGKO +pointz0|4326|Polygon|3|KO-BKO-GKO:-BGKO +pointz0|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +pointz0|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +pointz0|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +pointz0|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +pointz0|4326|CircularString|3|KO-BKO-GKO:-BGKO +pointz0|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +pointz0|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +pointz0|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +pointz0|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +pointz0|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +pointz0|4326|Triangle|3|KO-BKO-GKO:-BGKO +pointz0||COUNT|0| +pointz0||GCOUNT|0| +pointz4326|0|Point|0|KO-BKO-GKO:-BGKO +pointz4326|0|LineString|0|KO-BKO-GKO:-BGKO +pointz4326|0|Polygon|0|KO-BKO-GKO:-BGKO +pointz4326|0|MultiPoint|0|KO-BKO-GKO:-BGKO +pointz4326|0|MultiLineString|0|KO-BKO-GKO:-BGKO +pointz4326|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +pointz4326|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +pointz4326|0|CircularString|0|KO-BKO-GKO:-BGKO +pointz4326|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +pointz4326|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +pointz4326|0|MultiCurve|0|KO-BKO-GKO:-BGKO +pointz4326|0|MultiSurface|0|KO-BKO-GKO:-BGKO +pointz4326|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +pointz4326|0|Triangle|0|KO-BKO-GKO:-BGKO +pointz4326|0|Tin|0|KO-BKO-GKO:-BGKO +pointz4326|0|Point|2|KO-BKO-GKO:-BGKO +pointz4326|0|LineString|2|KO-BKO-GKO:-BGKO +pointz4326|0|Polygon|2|KO-BKO-GKO:-BGKO +pointz4326|0|MultiPoint|2|KO-BKO-GKO:-BGKO +pointz4326|0|MultiLineString|2|KO-BKO-GKO:-BGKO +pointz4326|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +pointz4326|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +pointz4326|0|CircularString|2|KO-BKO-GKO:-BGKO +pointz4326|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +pointz4326|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +pointz4326|0|MultiCurve|2|KO-BKO-GKO:-BGKO +pointz4326|0|MultiSurface|2|KO-BKO-GKO:-BGKO +pointz4326|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +pointz4326|0|Triangle|2|KO-BKO-GKO:-BGKO +pointz4326|0|Point|1|KO-BKO-GKO:-BGKO +pointz4326|0|LineString|1|KO-BKO-GKO:-BGKO +pointz4326|0|Polygon|1|KO-BKO-GKO:-BGKO +pointz4326|0|MultiPoint|1|KO-BKO-GKO:-BGKO +pointz4326|0|MultiLineString|1|KO-BKO-GKO:-BGKO +pointz4326|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +pointz4326|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +pointz4326|0|CircularString|1|KO-BKO-GKO:-BGKO +pointz4326|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +pointz4326|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +pointz4326|0|MultiCurve|1|KO-BKO-GKO:-BGKO +pointz4326|0|MultiSurface|1|KO-BKO-GKO:-BGKO +pointz4326|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +pointz4326|0|Triangle|1|KO-BKO-GKO:-BGKO +pointz4326|0|Point|3|KO-BKO-GKO:-BGKO +pointz4326|0|LineString|3|KO-BKO-GKO:-BGKO +pointz4326|0|Polygon|3|KO-BKO-GKO:-BGKO +pointz4326|0|MultiPoint|3|KO-BKO-GKO:-BGKO +pointz4326|0|MultiLineString|3|KO-BKO-GKO:-BGKO +pointz4326|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +pointz4326|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +pointz4326|0|CircularString|3|KO-BKO-GKO:-BGKO +pointz4326|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +pointz4326|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +pointz4326|0|MultiCurve|3|KO-BKO-GKO:-BGKO +pointz4326|0|MultiSurface|3|KO-BKO-GKO:-BGKO +pointz4326|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +pointz4326|0|Triangle|3|KO-BKO-GKO:-BGKO +pointz4326|4326|Point|0|KO-BKO-GKO:-BGKO +pointz4326|4326|LineString|0|KO-BKO-GKO:-BGKO +pointz4326|4326|Polygon|0|KO-BKO-GKO:-BGKO +pointz4326|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +pointz4326|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +pointz4326|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +pointz4326|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +pointz4326|4326|CircularString|0|KO-BKO-GKO:-BGKO +pointz4326|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +pointz4326|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +pointz4326|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +pointz4326|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +pointz4326|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +pointz4326|4326|Triangle|0|KO-BKO-GKO:-BGKO +pointz4326|4326|Tin|0|KO-BKO-GKO:-BGKO +pointz4326|4326|Point|2|KO-BKO-GKO:-BGKO +pointz4326|4326|LineString|2|KO-BKO-GKO:-BGKO +pointz4326|4326|Polygon|2|KO-BKO-GKO:-BGKO +pointz4326|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +pointz4326|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +pointz4326|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +pointz4326|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +pointz4326|4326|CircularString|2|KO-BKO-GKO:-BGKO +pointz4326|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +pointz4326|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +pointz4326|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +pointz4326|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +pointz4326|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +pointz4326|4326|Triangle|2|KO-BKO-GKO:-BGKO +pointz4326|4326|Point|1|KO-BKO-GKO:-BGKO +pointz4326|4326|LineString|1|KO-BKO-GKO:-BGKO +pointz4326|4326|Polygon|1|KO-BKO-GKO:-BGKO +pointz4326|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +pointz4326|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +pointz4326|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +pointz4326|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +pointz4326|4326|CircularString|1|KO-BKO-GKO:-BGKO +pointz4326|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +pointz4326|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +pointz4326|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +pointz4326|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +pointz4326|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +pointz4326|4326|Triangle|1|KO-BKO-GKO:-BGKO +pointz4326|4326|Point|3|KO-BKO-GKO:-BGKO +pointz4326|4326|LineString|3|KO-BKO-GKO:-BGKO +pointz4326|4326|Polygon|3|KO-BKO-GKO:-BGKO +pointz4326|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +pointz4326|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +pointz4326|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +pointz4326|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +pointz4326|4326|CircularString|3|KO-BKO-GKO:-BGKO +pointz4326|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +pointz4326|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +pointz4326|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +pointz4326|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +pointz4326|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +pointz4326|4326|Triangle|3|KO-BKO-GKO:-BGKO +pointz4326||COUNT|0| +pointz4326||GCOUNT|0| +pointzm|0|Point|0|KO-BKO-GKO:-BGKO +pointzm|0|LineString|0|KO-BKO-GKO:-BGKO +pointzm|0|Polygon|0|KO-BKO-GKO:-BGKO +pointzm|0|MultiPoint|0|KO-BKO-GKO:-BGKO +pointzm|0|MultiLineString|0|KO-BKO-GKO:-BGKO +pointzm|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +pointzm|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +pointzm|0|CircularString|0|KO-BKO-GKO:-BGKO +pointzm|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +pointzm|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +pointzm|0|MultiCurve|0|KO-BKO-GKO:-BGKO +pointzm|0|MultiSurface|0|KO-BKO-GKO:-BGKO +pointzm|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +pointzm|0|Triangle|0|KO-BKO-GKO:-BGKO +pointzm|0|Tin|0|KO-BKO-GKO:-BGKO +pointzm|0|Point|2|KO-BKO-GKO:-BGKO +pointzm|0|LineString|2|KO-BKO-GKO:-BGKO +pointzm|0|Polygon|2|KO-BKO-GKO:-BGKO +pointzm|0|MultiPoint|2|KO-BKO-GKO:-BGKO +pointzm|0|MultiLineString|2|KO-BKO-GKO:-BGKO +pointzm|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +pointzm|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +pointzm|0|CircularString|2|KO-BKO-GKO:-BGKO +pointzm|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +pointzm|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +pointzm|0|MultiCurve|2|KO-BKO-GKO:-BGKO +pointzm|0|MultiSurface|2|KO-BKO-GKO:-BGKO +pointzm|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +pointzm|0|Triangle|2|KO-BKO-GKO:-BGKO +pointzm|0|Point|1|KO-BKO-GKO:-BGKO +pointzm|0|LineString|1|KO-BKO-GKO:-BGKO +pointzm|0|Polygon|1|KO-BKO-GKO:-BGKO +pointzm|0|MultiPoint|1|KO-BKO-GKO:-BGKO +pointzm|0|MultiLineString|1|KO-BKO-GKO:-BGKO +pointzm|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +pointzm|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +pointzm|0|CircularString|1|KO-BKO-GKO:-BGKO +pointzm|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +pointzm|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +pointzm|0|MultiCurve|1|KO-BKO-GKO:-BGKO +pointzm|0|MultiSurface|1|KO-BKO-GKO:-BGKO +pointzm|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +pointzm|0|Triangle|1|KO-BKO-GKO:-BGKO +pointzm|0|Point|3|KO-BKO-GKO:-BGKO +pointzm|0|LineString|3|KO-BKO-GKO:-BGKO +pointzm|0|Polygon|3|KO-BKO-GKO:-BGKO +pointzm|0|MultiPoint|3|KO-BKO-GKO:-BGKO +pointzm|0|MultiLineString|3|KO-BKO-GKO:-BGKO +pointzm|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +pointzm|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +pointzm|0|CircularString|3|KO-BKO-GKO:-BGKO +pointzm|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +pointzm|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +pointzm|0|MultiCurve|3|KO-BKO-GKO:-BGKO +pointzm|0|MultiSurface|3|KO-BKO-GKO:-BGKO +pointzm|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +pointzm|0|Triangle|3|KO-BKO-GKO:-BGKO +pointzm|4326|Point|0|KO-BKO-GKO:-BGKO +pointzm|4326|LineString|0|KO-BKO-GKO:-BGKO +pointzm|4326|Polygon|0|KO-BKO-GKO:-BGKO +pointzm|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +pointzm|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +pointzm|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +pointzm|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +pointzm|4326|CircularString|0|KO-BKO-GKO:-BGKO +pointzm|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +pointzm|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +pointzm|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +pointzm|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +pointzm|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +pointzm|4326|Triangle|0|KO-BKO-GKO:-BGKO +pointzm|4326|Tin|0|KO-BKO-GKO:-BGKO +pointzm|4326|Point|2|KO-BKO-GKO:-BGKO +pointzm|4326|LineString|2|KO-BKO-GKO:-BGKO +pointzm|4326|Polygon|2|KO-BKO-GKO:-BGKO +pointzm|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +pointzm|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +pointzm|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +pointzm|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +pointzm|4326|CircularString|2|KO-BKO-GKO:-BGKO +pointzm|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +pointzm|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +pointzm|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +pointzm|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +pointzm|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +pointzm|4326|Triangle|2|KO-BKO-GKO:-BGKO +pointzm|4326|Point|1|KO-BKO-GKO:-BGKO +pointzm|4326|LineString|1|KO-BKO-GKO:-BGKO +pointzm|4326|Polygon|1|KO-BKO-GKO:-BGKO +pointzm|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +pointzm|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +pointzm|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +pointzm|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +pointzm|4326|CircularString|1|KO-BKO-GKO:-BGKO +pointzm|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +pointzm|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +pointzm|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +pointzm|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +pointzm|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +pointzm|4326|Triangle|1|KO-BKO-GKO:-BGKO +pointzm|4326|Point|3|KO-BKO-GKO:-BGKO +pointzm|4326|LineString|3|KO-BKO-GKO:-BGKO +pointzm|4326|Polygon|3|KO-BKO-GKO:-BGKO +pointzm|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +pointzm|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +pointzm|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +pointzm|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +pointzm|4326|CircularString|3|KO-BKO-GKO:-BGKO +pointzm|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +pointzm|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +pointzm|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +pointzm|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +pointzm|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +pointzm|4326|Triangle|3|KO-BKO-GKO:-BGKO +pointzm||COUNT|0| +pointzm||GCOUNT|0| +pointzm0|0|Point|0|KO-BKO-GKO:-BGKO +pointzm0|0|LineString|0|KO-BKO-GKO:-BGKO +pointzm0|0|Polygon|0|KO-BKO-GKO:-BGKO +pointzm0|0|MultiPoint|0|KO-BKO-GKO:-BGKO +pointzm0|0|MultiLineString|0|KO-BKO-GKO:-BGKO +pointzm0|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +pointzm0|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +pointzm0|0|CircularString|0|KO-BKO-GKO:-BGKO +pointzm0|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +pointzm0|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +pointzm0|0|MultiCurve|0|KO-BKO-GKO:-BGKO +pointzm0|0|MultiSurface|0|KO-BKO-GKO:-BGKO +pointzm0|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +pointzm0|0|Triangle|0|KO-BKO-GKO:-BGKO +pointzm0|0|Tin|0|KO-BKO-GKO:-BGKO +pointzm0|0|Point|2|KO-BKO-GKO:-BGKO +pointzm0|0|LineString|2|KO-BKO-GKO:-BGKO +pointzm0|0|Polygon|2|KO-BKO-GKO:-BGKO +pointzm0|0|MultiPoint|2|KO-BKO-GKO:-BGKO +pointzm0|0|MultiLineString|2|KO-BKO-GKO:-BGKO +pointzm0|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +pointzm0|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +pointzm0|0|CircularString|2|KO-BKO-GKO:-BGKO +pointzm0|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +pointzm0|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +pointzm0|0|MultiCurve|2|KO-BKO-GKO:-BGKO +pointzm0|0|MultiSurface|2|KO-BKO-GKO:-BGKO +pointzm0|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +pointzm0|0|Triangle|2|KO-BKO-GKO:-BGKO +pointzm0|0|Point|1|KO-BKO-GKO:-BGKO +pointzm0|0|LineString|1|KO-BKO-GKO:-BGKO +pointzm0|0|Polygon|1|KO-BKO-GKO:-BGKO +pointzm0|0|MultiPoint|1|KO-BKO-GKO:-BGKO +pointzm0|0|MultiLineString|1|KO-BKO-GKO:-BGKO +pointzm0|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +pointzm0|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +pointzm0|0|CircularString|1|KO-BKO-GKO:-BGKO +pointzm0|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +pointzm0|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +pointzm0|0|MultiCurve|1|KO-BKO-GKO:-BGKO +pointzm0|0|MultiSurface|1|KO-BKO-GKO:-BGKO +pointzm0|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +pointzm0|0|Triangle|1|KO-BKO-GKO:-BGKO +pointzm0|0|Point|3|KO-BKO-GKO:-BGKO +pointzm0|0|LineString|3|KO-BKO-GKO:-BGKO +pointzm0|0|Polygon|3|KO-BKO-GKO:-BGKO +pointzm0|0|MultiPoint|3|KO-BKO-GKO:-BGKO +pointzm0|0|MultiLineString|3|KO-BKO-GKO:-BGKO +pointzm0|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +pointzm0|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +pointzm0|0|CircularString|3|KO-BKO-GKO:-BGKO +pointzm0|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +pointzm0|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +pointzm0|0|MultiCurve|3|KO-BKO-GKO:-BGKO +pointzm0|0|MultiSurface|3|KO-BKO-GKO:-BGKO +pointzm0|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +pointzm0|0|Triangle|3|KO-BKO-GKO:-BGKO +pointzm0|4326|Point|0|KO-BKO-GKO:-BGKO +pointzm0|4326|LineString|0|KO-BKO-GKO:-BGKO +pointzm0|4326|Polygon|0|KO-BKO-GKO:-BGKO +pointzm0|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +pointzm0|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +pointzm0|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +pointzm0|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +pointzm0|4326|CircularString|0|KO-BKO-GKO:-BGKO +pointzm0|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +pointzm0|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +pointzm0|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +pointzm0|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +pointzm0|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +pointzm0|4326|Triangle|0|KO-BKO-GKO:-BGKO +pointzm0|4326|Tin|0|KO-BKO-GKO:-BGKO +pointzm0|4326|Point|2|KO-BKO-GKO:-BGKO +pointzm0|4326|LineString|2|KO-BKO-GKO:-BGKO +pointzm0|4326|Polygon|2|KO-BKO-GKO:-BGKO +pointzm0|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +pointzm0|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +pointzm0|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +pointzm0|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +pointzm0|4326|CircularString|2|KO-BKO-GKO:-BGKO +pointzm0|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +pointzm0|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +pointzm0|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +pointzm0|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +pointzm0|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +pointzm0|4326|Triangle|2|KO-BKO-GKO:-BGKO +pointzm0|4326|Point|1|KO-BKO-GKO:-BGKO +pointzm0|4326|LineString|1|KO-BKO-GKO:-BGKO +pointzm0|4326|Polygon|1|KO-BKO-GKO:-BGKO +pointzm0|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +pointzm0|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +pointzm0|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +pointzm0|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +pointzm0|4326|CircularString|1|KO-BKO-GKO:-BGKO +pointzm0|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +pointzm0|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +pointzm0|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +pointzm0|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +pointzm0|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +pointzm0|4326|Triangle|1|KO-BKO-GKO:-BGKO +pointzm0|4326|Point|3|KO-BKO-GKO:-BGKO +pointzm0|4326|LineString|3|KO-BKO-GKO:-BGKO +pointzm0|4326|Polygon|3|KO-BKO-GKO:-BGKO +pointzm0|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +pointzm0|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +pointzm0|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +pointzm0|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +pointzm0|4326|CircularString|3|KO-BKO-GKO:-BGKO +pointzm0|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +pointzm0|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +pointzm0|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +pointzm0|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +pointzm0|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +pointzm0|4326|Triangle|3|KO-BKO-GKO:-BGKO +pointzm0||COUNT|0| +pointzm0||GCOUNT|0| +pointzm4326|0|Point|0|KO-BKO-GKO:-BGKO +pointzm4326|0|LineString|0|KO-BKO-GKO:-BGKO +pointzm4326|0|Polygon|0|KO-BKO-GKO:-BGKO +pointzm4326|0|MultiPoint|0|KO-BKO-GKO:-BGKO +pointzm4326|0|MultiLineString|0|KO-BKO-GKO:-BGKO +pointzm4326|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +pointzm4326|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +pointzm4326|0|CircularString|0|KO-BKO-GKO:-BGKO +pointzm4326|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +pointzm4326|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +pointzm4326|0|MultiCurve|0|KO-BKO-GKO:-BGKO +pointzm4326|0|MultiSurface|0|KO-BKO-GKO:-BGKO +pointzm4326|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +pointzm4326|0|Triangle|0|KO-BKO-GKO:-BGKO +pointzm4326|0|Tin|0|KO-BKO-GKO:-BGKO +pointzm4326|0|Point|2|KO-BKO-GKO:-BGKO +pointzm4326|0|LineString|2|KO-BKO-GKO:-BGKO +pointzm4326|0|Polygon|2|KO-BKO-GKO:-BGKO +pointzm4326|0|MultiPoint|2|KO-BKO-GKO:-BGKO +pointzm4326|0|MultiLineString|2|KO-BKO-GKO:-BGKO +pointzm4326|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +pointzm4326|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +pointzm4326|0|CircularString|2|KO-BKO-GKO:-BGKO +pointzm4326|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +pointzm4326|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +pointzm4326|0|MultiCurve|2|KO-BKO-GKO:-BGKO +pointzm4326|0|MultiSurface|2|KO-BKO-GKO:-BGKO +pointzm4326|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +pointzm4326|0|Triangle|2|KO-BKO-GKO:-BGKO +pointzm4326|0|Point|1|KO-BKO-GKO:-BGKO +pointzm4326|0|LineString|1|KO-BKO-GKO:-BGKO +pointzm4326|0|Polygon|1|KO-BKO-GKO:-BGKO +pointzm4326|0|MultiPoint|1|KO-BKO-GKO:-BGKO +pointzm4326|0|MultiLineString|1|KO-BKO-GKO:-BGKO +pointzm4326|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +pointzm4326|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +pointzm4326|0|CircularString|1|KO-BKO-GKO:-BGKO +pointzm4326|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +pointzm4326|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +pointzm4326|0|MultiCurve|1|KO-BKO-GKO:-BGKO +pointzm4326|0|MultiSurface|1|KO-BKO-GKO:-BGKO +pointzm4326|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +pointzm4326|0|Triangle|1|KO-BKO-GKO:-BGKO +pointzm4326|0|Point|3|KO-BKO-GKO:-BGKO +pointzm4326|0|LineString|3|KO-BKO-GKO:-BGKO +pointzm4326|0|Polygon|3|KO-BKO-GKO:-BGKO +pointzm4326|0|MultiPoint|3|KO-BKO-GKO:-BGKO +pointzm4326|0|MultiLineString|3|KO-BKO-GKO:-BGKO +pointzm4326|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +pointzm4326|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +pointzm4326|0|CircularString|3|KO-BKO-GKO:-BGKO +pointzm4326|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +pointzm4326|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +pointzm4326|0|MultiCurve|3|KO-BKO-GKO:-BGKO +pointzm4326|0|MultiSurface|3|KO-BKO-GKO:-BGKO +pointzm4326|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +pointzm4326|0|Triangle|3|KO-BKO-GKO:-BGKO +pointzm4326|4326|Point|0|KO-BKO-GKO:-BGKO +pointzm4326|4326|LineString|0|KO-BKO-GKO:-BGKO +pointzm4326|4326|Polygon|0|KO-BKO-GKO:-BGKO +pointzm4326|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +pointzm4326|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +pointzm4326|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +pointzm4326|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +pointzm4326|4326|CircularString|0|KO-BKO-GKO:-BGKO +pointzm4326|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +pointzm4326|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +pointzm4326|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +pointzm4326|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +pointzm4326|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +pointzm4326|4326|Triangle|0|KO-BKO-GKO:-BGKO +pointzm4326|4326|Tin|0|KO-BKO-GKO:-BGKO +pointzm4326|4326|Point|2|KO-BKO-GKO:-BGKO +pointzm4326|4326|LineString|2|KO-BKO-GKO:-BGKO +pointzm4326|4326|Polygon|2|KO-BKO-GKO:-BGKO +pointzm4326|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +pointzm4326|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +pointzm4326|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +pointzm4326|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +pointzm4326|4326|CircularString|2|KO-BKO-GKO:-BGKO +pointzm4326|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +pointzm4326|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +pointzm4326|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +pointzm4326|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +pointzm4326|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +pointzm4326|4326|Triangle|2|KO-BKO-GKO:-BGKO +pointzm4326|4326|Point|1|KO-BKO-GKO:-BGKO +pointzm4326|4326|LineString|1|KO-BKO-GKO:-BGKO +pointzm4326|4326|Polygon|1|KO-BKO-GKO:-BGKO +pointzm4326|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +pointzm4326|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +pointzm4326|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +pointzm4326|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +pointzm4326|4326|CircularString|1|KO-BKO-GKO:-BGKO +pointzm4326|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +pointzm4326|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +pointzm4326|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +pointzm4326|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +pointzm4326|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +pointzm4326|4326|Triangle|1|KO-BKO-GKO:-BGKO +pointzm4326|4326|Point|3|KO-BKO-GKO:-BGKO +pointzm4326|4326|LineString|3|KO-BKO-GKO:-BGKO +pointzm4326|4326|Polygon|3|KO-BKO-GKO:-BGKO +pointzm4326|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +pointzm4326|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +pointzm4326|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +pointzm4326|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +pointzm4326|4326|CircularString|3|KO-BKO-GKO:-BGKO +pointzm4326|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +pointzm4326|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +pointzm4326|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +pointzm4326|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +pointzm4326|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +pointzm4326|4326|Triangle|3|KO-BKO-GKO:-BGKO +pointzm4326||COUNT|0| +pointzm4326||GCOUNT|0| +polygon|0|Point|0|KO-BKO-GKO:-BGKO +polygon|0|LineString|0|KO-BKO-GKO:-BGKO +polygon|0|Polygon|0|OK-BOK-GOK-BGOK +polygon|0|MultiPoint|0|KO-BKO-GKO:-BGKO +polygon|0|MultiLineString|0|KO-BKO-GKO:-BGKO +polygon|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +polygon|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +polygon|0|CircularString|0|KO-BKO-GKO:-BGKO +polygon|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +polygon|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +polygon|0|MultiCurve|0|KO-BKO-GKO:-BGKO +polygon|0|MultiSurface|0|KO-BKO-GKO:-BGKO +polygon|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +polygon|0|Triangle|0|KO-BKO-GKO:-BGKO +polygon|0|Tin|0|KO-BKO-GKO:-BGKO +polygon|0|Point|2|KO-BKO-GKO:-BGKO +polygon|0|LineString|2|KO-BKO-GKO:-BGKO +polygon|0|Polygon|2|KO-BKO-GKO:-BGKO +polygon|0|MultiPoint|2|KO-BKO-GKO:-BGKO +polygon|0|MultiLineString|2|KO-BKO-GKO:-BGKO +polygon|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +polygon|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +polygon|0|CircularString|2|KO-BKO-GKO:-BGKO +polygon|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +polygon|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +polygon|0|MultiCurve|2|KO-BKO-GKO:-BGKO +polygon|0|MultiSurface|2|KO-BKO-GKO:-BGKO +polygon|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +polygon|0|Triangle|2|KO-BKO-GKO:-BGKO +polygon|0|Point|1|KO-BKO-GKO:-BGKO +polygon|0|LineString|1|KO-BKO-GKO:-BGKO +polygon|0|Polygon|1|KO-BKO-GKO:-BGKO +polygon|0|MultiPoint|1|KO-BKO-GKO:-BGKO +polygon|0|MultiLineString|1|KO-BKO-GKO:-BGKO +polygon|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +polygon|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +polygon|0|CircularString|1|KO-BKO-GKO:-BGKO +polygon|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +polygon|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +polygon|0|MultiCurve|1|KO-BKO-GKO:-BGKO +polygon|0|MultiSurface|1|KO-BKO-GKO:-BGKO +polygon|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +polygon|0|Triangle|1|KO-BKO-GKO:-BGKO +polygon|0|Point|3|KO-BKO-GKO:-BGKO +polygon|0|LineString|3|KO-BKO-GKO:-BGKO +polygon|0|Polygon|3|KO-BKO-GKO:-BGKO +polygon|0|MultiPoint|3|KO-BKO-GKO:-BGKO +polygon|0|MultiLineString|3|KO-BKO-GKO:-BGKO +polygon|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +polygon|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +polygon|0|CircularString|3|KO-BKO-GKO:-BGKO +polygon|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +polygon|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +polygon|0|MultiCurve|3|KO-BKO-GKO:-BGKO +polygon|0|MultiSurface|3|KO-BKO-GKO:-BGKO +polygon|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +polygon|0|Triangle|3|KO-BKO-GKO:-BGKO +polygon|4326|Point|0|KO-BKO-GKO:-BGKO +polygon|4326|LineString|0|KO-BKO-GKO:-BGKO +polygon|4326|Polygon|0|OK-BOK-GOK-BGOK +polygon|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +polygon|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +polygon|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +polygon|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +polygon|4326|CircularString|0|KO-BKO-GKO:-BGKO +polygon|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +polygon|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +polygon|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +polygon|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +polygon|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +polygon|4326|Triangle|0|KO-BKO-GKO:-BGKO +polygon|4326|Tin|0|KO-BKO-GKO:-BGKO +polygon|4326|Point|2|KO-BKO-GKO:-BGKO +polygon|4326|LineString|2|KO-BKO-GKO:-BGKO +polygon|4326|Polygon|2|KO-BKO-GKO:-BGKO +polygon|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +polygon|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +polygon|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +polygon|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +polygon|4326|CircularString|2|KO-BKO-GKO:-BGKO +polygon|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +polygon|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +polygon|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +polygon|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +polygon|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +polygon|4326|Triangle|2|KO-BKO-GKO:-BGKO +polygon|4326|Point|1|KO-BKO-GKO:-BGKO +polygon|4326|LineString|1|KO-BKO-GKO:-BGKO +polygon|4326|Polygon|1|KO-BKO-GKO:-BGKO +polygon|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +polygon|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +polygon|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +polygon|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +polygon|4326|CircularString|1|KO-BKO-GKO:-BGKO +polygon|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +polygon|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +polygon|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +polygon|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +polygon|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +polygon|4326|Triangle|1|KO-BKO-GKO:-BGKO +polygon|4326|Point|3|KO-BKO-GKO:-BGKO +polygon|4326|LineString|3|KO-BKO-GKO:-BGKO +polygon|4326|Polygon|3|KO-BKO-GKO:-BGKO +polygon|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +polygon|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +polygon|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +polygon|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +polygon|4326|CircularString|3|KO-BKO-GKO:-BGKO +polygon|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +polygon|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +polygon|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +polygon|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +polygon|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +polygon|4326|Triangle|3|KO-BKO-GKO:-BGKO +polygon||COUNT|4| +polygon||GCOUNT|4| +polygon0|0|Point|0|KO-BKO-GKO:-BGKO +polygon0|0|LineString|0|KO-BKO-GKO:-BGKO +polygon0|0|Polygon|0|OK-BOK-GOK-BGOK +polygon0|0|MultiPoint|0|KO-BKO-GKO:-BGKO +polygon0|0|MultiLineString|0|KO-BKO-GKO:-BGKO +polygon0|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +polygon0|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +polygon0|0|CircularString|0|KO-BKO-GKO:-BGKO +polygon0|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +polygon0|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +polygon0|0|MultiCurve|0|KO-BKO-GKO:-BGKO +polygon0|0|MultiSurface|0|KO-BKO-GKO:-BGKO +polygon0|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +polygon0|0|Triangle|0|KO-BKO-GKO:-BGKO +polygon0|0|Tin|0|KO-BKO-GKO:-BGKO +polygon0|0|Point|2|KO-BKO-GKO:-BGKO +polygon0|0|LineString|2|KO-BKO-GKO:-BGKO +polygon0|0|Polygon|2|KO-BKO-GKO:-BGKO +polygon0|0|MultiPoint|2|KO-BKO-GKO:-BGKO +polygon0|0|MultiLineString|2|KO-BKO-GKO:-BGKO +polygon0|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +polygon0|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +polygon0|0|CircularString|2|KO-BKO-GKO:-BGKO +polygon0|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +polygon0|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +polygon0|0|MultiCurve|2|KO-BKO-GKO:-BGKO +polygon0|0|MultiSurface|2|KO-BKO-GKO:-BGKO +polygon0|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +polygon0|0|Triangle|2|KO-BKO-GKO:-BGKO +polygon0|0|Point|1|KO-BKO-GKO:-BGKO +polygon0|0|LineString|1|KO-BKO-GKO:-BGKO +polygon0|0|Polygon|1|KO-BKO-GKO:-BGKO +polygon0|0|MultiPoint|1|KO-BKO-GKO:-BGKO +polygon0|0|MultiLineString|1|KO-BKO-GKO:-BGKO +polygon0|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +polygon0|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +polygon0|0|CircularString|1|KO-BKO-GKO:-BGKO +polygon0|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +polygon0|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +polygon0|0|MultiCurve|1|KO-BKO-GKO:-BGKO +polygon0|0|MultiSurface|1|KO-BKO-GKO:-BGKO +polygon0|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +polygon0|0|Triangle|1|KO-BKO-GKO:-BGKO +polygon0|0|Point|3|KO-BKO-GKO:-BGKO +polygon0|0|LineString|3|KO-BKO-GKO:-BGKO +polygon0|0|Polygon|3|KO-BKO-GKO:-BGKO +polygon0|0|MultiPoint|3|KO-BKO-GKO:-BGKO +polygon0|0|MultiLineString|3|KO-BKO-GKO:-BGKO +polygon0|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +polygon0|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +polygon0|0|CircularString|3|KO-BKO-GKO:-BGKO +polygon0|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +polygon0|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +polygon0|0|MultiCurve|3|KO-BKO-GKO:-BGKO +polygon0|0|MultiSurface|3|KO-BKO-GKO:-BGKO +polygon0|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +polygon0|0|Triangle|3|KO-BKO-GKO:-BGKO +polygon0|4326|Point|0|KO-BKO-GKO:-BGKO +polygon0|4326|LineString|0|KO-BKO-GKO:-BGKO +polygon0|4326|Polygon|0|OK-BOK-GOK-BGOK +polygon0|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +polygon0|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +polygon0|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +polygon0|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +polygon0|4326|CircularString|0|KO-BKO-GKO:-BGKO +polygon0|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +polygon0|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +polygon0|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +polygon0|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +polygon0|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +polygon0|4326|Triangle|0|KO-BKO-GKO:-BGKO +polygon0|4326|Tin|0|KO-BKO-GKO:-BGKO +polygon0|4326|Point|2|KO-BKO-GKO:-BGKO +polygon0|4326|LineString|2|KO-BKO-GKO:-BGKO +polygon0|4326|Polygon|2|KO-BKO-GKO:-BGKO +polygon0|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +polygon0|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +polygon0|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +polygon0|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +polygon0|4326|CircularString|2|KO-BKO-GKO:-BGKO +polygon0|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +polygon0|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +polygon0|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +polygon0|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +polygon0|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +polygon0|4326|Triangle|2|KO-BKO-GKO:-BGKO +polygon0|4326|Point|1|KO-BKO-GKO:-BGKO +polygon0|4326|LineString|1|KO-BKO-GKO:-BGKO +polygon0|4326|Polygon|1|KO-BKO-GKO:-BGKO +polygon0|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +polygon0|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +polygon0|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +polygon0|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +polygon0|4326|CircularString|1|KO-BKO-GKO:-BGKO +polygon0|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +polygon0|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +polygon0|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +polygon0|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +polygon0|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +polygon0|4326|Triangle|1|KO-BKO-GKO:-BGKO +polygon0|4326|Point|3|KO-BKO-GKO:-BGKO +polygon0|4326|LineString|3|KO-BKO-GKO:-BGKO +polygon0|4326|Polygon|3|KO-BKO-GKO:-BGKO +polygon0|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +polygon0|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +polygon0|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +polygon0|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +polygon0|4326|CircularString|3|KO-BKO-GKO:-BGKO +polygon0|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +polygon0|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +polygon0|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +polygon0|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +polygon0|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +polygon0|4326|Triangle|3|KO-BKO-GKO:-BGKO +polygon0||COUNT|4| +polygon0||GCOUNT|4| +polygon4326|0|Point|0|KO-BKO-GKO:-BGKO +polygon4326|0|LineString|0|KO-BKO-GKO:-BGKO +polygon4326|0|Polygon|0|KO-BKO-GOK-BGOK +polygon4326|0|MultiPoint|0|KO-BKO-GKO:-BGKO +polygon4326|0|MultiLineString|0|KO-BKO-GKO:-BGKO +polygon4326|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +polygon4326|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +polygon4326|0|CircularString|0|KO-BKO-GKO:-BGKO +polygon4326|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +polygon4326|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +polygon4326|0|MultiCurve|0|KO-BKO-GKO:-BGKO +polygon4326|0|MultiSurface|0|KO-BKO-GKO:-BGKO +polygon4326|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +polygon4326|0|Triangle|0|KO-BKO-GKO:-BGKO +polygon4326|0|Tin|0|KO-BKO-GKO:-BGKO +polygon4326|0|Point|2|KO-BKO-GKO:-BGKO +polygon4326|0|LineString|2|KO-BKO-GKO:-BGKO +polygon4326|0|Polygon|2|KO-BKO-GKO:-BGKO +polygon4326|0|MultiPoint|2|KO-BKO-GKO:-BGKO +polygon4326|0|MultiLineString|2|KO-BKO-GKO:-BGKO +polygon4326|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +polygon4326|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +polygon4326|0|CircularString|2|KO-BKO-GKO:-BGKO +polygon4326|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +polygon4326|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +polygon4326|0|MultiCurve|2|KO-BKO-GKO:-BGKO +polygon4326|0|MultiSurface|2|KO-BKO-GKO:-BGKO +polygon4326|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +polygon4326|0|Triangle|2|KO-BKO-GKO:-BGKO +polygon4326|0|Point|1|KO-BKO-GKO:-BGKO +polygon4326|0|LineString|1|KO-BKO-GKO:-BGKO +polygon4326|0|Polygon|1|KO-BKO-GKO:-BGKO +polygon4326|0|MultiPoint|1|KO-BKO-GKO:-BGKO +polygon4326|0|MultiLineString|1|KO-BKO-GKO:-BGKO +polygon4326|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +polygon4326|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +polygon4326|0|CircularString|1|KO-BKO-GKO:-BGKO +polygon4326|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +polygon4326|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +polygon4326|0|MultiCurve|1|KO-BKO-GKO:-BGKO +polygon4326|0|MultiSurface|1|KO-BKO-GKO:-BGKO +polygon4326|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +polygon4326|0|Triangle|1|KO-BKO-GKO:-BGKO +polygon4326|0|Point|3|KO-BKO-GKO:-BGKO +polygon4326|0|LineString|3|KO-BKO-GKO:-BGKO +polygon4326|0|Polygon|3|KO-BKO-GKO:-BGKO +polygon4326|0|MultiPoint|3|KO-BKO-GKO:-BGKO +polygon4326|0|MultiLineString|3|KO-BKO-GKO:-BGKO +polygon4326|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +polygon4326|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +polygon4326|0|CircularString|3|KO-BKO-GKO:-BGKO +polygon4326|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +polygon4326|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +polygon4326|0|MultiCurve|3|KO-BKO-GKO:-BGKO +polygon4326|0|MultiSurface|3|KO-BKO-GKO:-BGKO +polygon4326|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +polygon4326|0|Triangle|3|KO-BKO-GKO:-BGKO +polygon4326|4326|Point|0|KO-BKO-GKO:-BGKO +polygon4326|4326|LineString|0|KO-BKO-GKO:-BGKO +polygon4326|4326|Polygon|0|OK-BOK-GOK-BGOK +polygon4326|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +polygon4326|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +polygon4326|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +polygon4326|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +polygon4326|4326|CircularString|0|KO-BKO-GKO:-BGKO +polygon4326|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +polygon4326|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +polygon4326|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +polygon4326|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +polygon4326|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +polygon4326|4326|Triangle|0|KO-BKO-GKO:-BGKO +polygon4326|4326|Tin|0|KO-BKO-GKO:-BGKO +polygon4326|4326|Point|2|KO-BKO-GKO:-BGKO +polygon4326|4326|LineString|2|KO-BKO-GKO:-BGKO +polygon4326|4326|Polygon|2|KO-BKO-GKO:-BGKO +polygon4326|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +polygon4326|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +polygon4326|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +polygon4326|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +polygon4326|4326|CircularString|2|KO-BKO-GKO:-BGKO +polygon4326|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +polygon4326|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +polygon4326|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +polygon4326|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +polygon4326|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +polygon4326|4326|Triangle|2|KO-BKO-GKO:-BGKO +polygon4326|4326|Point|1|KO-BKO-GKO:-BGKO +polygon4326|4326|LineString|1|KO-BKO-GKO:-BGKO +polygon4326|4326|Polygon|1|KO-BKO-GKO:-BGKO +polygon4326|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +polygon4326|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +polygon4326|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +polygon4326|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +polygon4326|4326|CircularString|1|KO-BKO-GKO:-BGKO +polygon4326|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +polygon4326|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +polygon4326|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +polygon4326|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +polygon4326|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +polygon4326|4326|Triangle|1|KO-BKO-GKO:-BGKO +polygon4326|4326|Point|3|KO-BKO-GKO:-BGKO +polygon4326|4326|LineString|3|KO-BKO-GKO:-BGKO +polygon4326|4326|Polygon|3|KO-BKO-GKO:-BGKO +polygon4326|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +polygon4326|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +polygon4326|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +polygon4326|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +polygon4326|4326|CircularString|3|KO-BKO-GKO:-BGKO +polygon4326|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +polygon4326|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +polygon4326|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +polygon4326|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +polygon4326|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +polygon4326|4326|Triangle|3|KO-BKO-GKO:-BGKO +polygon4326||COUNT|2| +polygon4326||GCOUNT|4| +polygonm|0|Point|0|KO-BKO-GKO:-BGKO +polygonm|0|LineString|0|KO-BKO-GKO:-BGKO +polygonm|0|Polygon|0|KO-BKO-GKO:-BGKO +polygonm|0|MultiPoint|0|KO-BKO-GKO:-BGKO +polygonm|0|MultiLineString|0|KO-BKO-GKO:-BGKO +polygonm|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +polygonm|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +polygonm|0|CircularString|0|KO-BKO-GKO:-BGKO +polygonm|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +polygonm|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +polygonm|0|MultiCurve|0|KO-BKO-GKO:-BGKO +polygonm|0|MultiSurface|0|KO-BKO-GKO:-BGKO +polygonm|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +polygonm|0|Triangle|0|KO-BKO-GKO:-BGKO +polygonm|0|Tin|0|KO-BKO-GKO:-BGKO +polygonm|0|Point|2|KO-BKO-GKO:-BGKO +polygonm|0|LineString|2|KO-BKO-GKO:-BGKO +polygonm|0|Polygon|2|KO-BKO-GKO:-BGKO +polygonm|0|MultiPoint|2|KO-BKO-GKO:-BGKO +polygonm|0|MultiLineString|2|KO-BKO-GKO:-BGKO +polygonm|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +polygonm|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +polygonm|0|CircularString|2|KO-BKO-GKO:-BGKO +polygonm|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +polygonm|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +polygonm|0|MultiCurve|2|KO-BKO-GKO:-BGKO +polygonm|0|MultiSurface|2|KO-BKO-GKO:-BGKO +polygonm|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +polygonm|0|Triangle|2|KO-BKO-GKO:-BGKO +polygonm|0|Point|1|KO-BKO-GKO:-BGKO +polygonm|0|LineString|1|KO-BKO-GKO:-BGKO +polygonm|0|Polygon|1|OK-BOK-GOK-BGOK +polygonm|0|MultiPoint|1|KO-BKO-GKO:-BGKO +polygonm|0|MultiLineString|1|KO-BKO-GKO:-BGKO +polygonm|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +polygonm|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +polygonm|0|CircularString|1|KO-BKO-GKO:-BGKO +polygonm|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +polygonm|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +polygonm|0|MultiCurve|1|KO-BKO-GKO:-BGKO +polygonm|0|MultiSurface|1|KO-BKO-GKO:-BGKO +polygonm|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +polygonm|0|Triangle|1|KO-BKO-GKO:-BGKO +polygonm|0|Point|3|KO-BKO-GKO:-BGKO +polygonm|0|LineString|3|KO-BKO-GKO:-BGKO +polygonm|0|Polygon|3|KO-BKO-GKO:-BGKO +polygonm|0|MultiPoint|3|KO-BKO-GKO:-BGKO +polygonm|0|MultiLineString|3|KO-BKO-GKO:-BGKO +polygonm|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +polygonm|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +polygonm|0|CircularString|3|KO-BKO-GKO:-BGKO +polygonm|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +polygonm|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +polygonm|0|MultiCurve|3|KO-BKO-GKO:-BGKO +polygonm|0|MultiSurface|3|KO-BKO-GKO:-BGKO +polygonm|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +polygonm|0|Triangle|3|KO-BKO-GKO:-BGKO +polygonm|4326|Point|0|KO-BKO-GKO:-BGKO +polygonm|4326|LineString|0|KO-BKO-GKO:-BGKO +polygonm|4326|Polygon|0|KO-BKO-GKO:-BGKO +polygonm|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +polygonm|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +polygonm|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +polygonm|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +polygonm|4326|CircularString|0|KO-BKO-GKO:-BGKO +polygonm|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +polygonm|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +polygonm|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +polygonm|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +polygonm|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +polygonm|4326|Triangle|0|KO-BKO-GKO:-BGKO +polygonm|4326|Tin|0|KO-BKO-GKO:-BGKO +polygonm|4326|Point|2|KO-BKO-GKO:-BGKO +polygonm|4326|LineString|2|KO-BKO-GKO:-BGKO +polygonm|4326|Polygon|2|KO-BKO-GKO:-BGKO +polygonm|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +polygonm|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +polygonm|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +polygonm|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +polygonm|4326|CircularString|2|KO-BKO-GKO:-BGKO +polygonm|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +polygonm|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +polygonm|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +polygonm|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +polygonm|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +polygonm|4326|Triangle|2|KO-BKO-GKO:-BGKO +polygonm|4326|Point|1|KO-BKO-GKO:-BGKO +polygonm|4326|LineString|1|KO-BKO-GKO:-BGKO +polygonm|4326|Polygon|1|OK-BOK-GOK-BGOK +polygonm|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +polygonm|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +polygonm|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +polygonm|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +polygonm|4326|CircularString|1|KO-BKO-GKO:-BGKO +polygonm|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +polygonm|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +polygonm|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +polygonm|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +polygonm|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +polygonm|4326|Triangle|1|KO-BKO-GKO:-BGKO +polygonm|4326|Point|3|KO-BKO-GKO:-BGKO +polygonm|4326|LineString|3|KO-BKO-GKO:-BGKO +polygonm|4326|Polygon|3|KO-BKO-GKO:-BGKO +polygonm|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +polygonm|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +polygonm|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +polygonm|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +polygonm|4326|CircularString|3|KO-BKO-GKO:-BGKO +polygonm|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +polygonm|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +polygonm|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +polygonm|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +polygonm|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +polygonm|4326|Triangle|3|KO-BKO-GKO:-BGKO +polygonm||COUNT|4| +polygonm||GCOUNT|4| +polygonm0|0|Point|0|KO-BKO-GKO:-BGKO +polygonm0|0|LineString|0|KO-BKO-GKO:-BGKO +polygonm0|0|Polygon|0|KO-BKO-GKO:-BGKO +polygonm0|0|MultiPoint|0|KO-BKO-GKO:-BGKO +polygonm0|0|MultiLineString|0|KO-BKO-GKO:-BGKO +polygonm0|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +polygonm0|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +polygonm0|0|CircularString|0|KO-BKO-GKO:-BGKO +polygonm0|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +polygonm0|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +polygonm0|0|MultiCurve|0|KO-BKO-GKO:-BGKO +polygonm0|0|MultiSurface|0|KO-BKO-GKO:-BGKO +polygonm0|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +polygonm0|0|Triangle|0|KO-BKO-GKO:-BGKO +polygonm0|0|Tin|0|KO-BKO-GKO:-BGKO +polygonm0|0|Point|2|KO-BKO-GKO:-BGKO +polygonm0|0|LineString|2|KO-BKO-GKO:-BGKO +polygonm0|0|Polygon|2|KO-BKO-GKO:-BGKO +polygonm0|0|MultiPoint|2|KO-BKO-GKO:-BGKO +polygonm0|0|MultiLineString|2|KO-BKO-GKO:-BGKO +polygonm0|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +polygonm0|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +polygonm0|0|CircularString|2|KO-BKO-GKO:-BGKO +polygonm0|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +polygonm0|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +polygonm0|0|MultiCurve|2|KO-BKO-GKO:-BGKO +polygonm0|0|MultiSurface|2|KO-BKO-GKO:-BGKO +polygonm0|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +polygonm0|0|Triangle|2|KO-BKO-GKO:-BGKO +polygonm0|0|Point|1|KO-BKO-GKO:-BGKO +polygonm0|0|LineString|1|KO-BKO-GKO:-BGKO +polygonm0|0|Polygon|1|OK-BOK-GOK-BGOK +polygonm0|0|MultiPoint|1|KO-BKO-GKO:-BGKO +polygonm0|0|MultiLineString|1|KO-BKO-GKO:-BGKO +polygonm0|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +polygonm0|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +polygonm0|0|CircularString|1|KO-BKO-GKO:-BGKO +polygonm0|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +polygonm0|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +polygonm0|0|MultiCurve|1|KO-BKO-GKO:-BGKO +polygonm0|0|MultiSurface|1|KO-BKO-GKO:-BGKO +polygonm0|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +polygonm0|0|Triangle|1|KO-BKO-GKO:-BGKO +polygonm0|0|Point|3|KO-BKO-GKO:-BGKO +polygonm0|0|LineString|3|KO-BKO-GKO:-BGKO +polygonm0|0|Polygon|3|KO-BKO-GKO:-BGKO +polygonm0|0|MultiPoint|3|KO-BKO-GKO:-BGKO +polygonm0|0|MultiLineString|3|KO-BKO-GKO:-BGKO +polygonm0|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +polygonm0|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +polygonm0|0|CircularString|3|KO-BKO-GKO:-BGKO +polygonm0|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +polygonm0|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +polygonm0|0|MultiCurve|3|KO-BKO-GKO:-BGKO +polygonm0|0|MultiSurface|3|KO-BKO-GKO:-BGKO +polygonm0|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +polygonm0|0|Triangle|3|KO-BKO-GKO:-BGKO +polygonm0|4326|Point|0|KO-BKO-GKO:-BGKO +polygonm0|4326|LineString|0|KO-BKO-GKO:-BGKO +polygonm0|4326|Polygon|0|KO-BKO-GKO:-BGKO +polygonm0|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +polygonm0|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +polygonm0|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +polygonm0|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +polygonm0|4326|CircularString|0|KO-BKO-GKO:-BGKO +polygonm0|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +polygonm0|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +polygonm0|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +polygonm0|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +polygonm0|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +polygonm0|4326|Triangle|0|KO-BKO-GKO:-BGKO +polygonm0|4326|Tin|0|KO-BKO-GKO:-BGKO +polygonm0|4326|Point|2|KO-BKO-GKO:-BGKO +polygonm0|4326|LineString|2|KO-BKO-GKO:-BGKO +polygonm0|4326|Polygon|2|KO-BKO-GKO:-BGKO +polygonm0|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +polygonm0|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +polygonm0|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +polygonm0|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +polygonm0|4326|CircularString|2|KO-BKO-GKO:-BGKO +polygonm0|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +polygonm0|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +polygonm0|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +polygonm0|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +polygonm0|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +polygonm0|4326|Triangle|2|KO-BKO-GKO:-BGKO +polygonm0|4326|Point|1|KO-BKO-GKO:-BGKO +polygonm0|4326|LineString|1|KO-BKO-GKO:-BGKO +polygonm0|4326|Polygon|1|OK-BOK-GOK-BGOK +polygonm0|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +polygonm0|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +polygonm0|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +polygonm0|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +polygonm0|4326|CircularString|1|KO-BKO-GKO:-BGKO +polygonm0|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +polygonm0|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +polygonm0|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +polygonm0|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +polygonm0|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +polygonm0|4326|Triangle|1|KO-BKO-GKO:-BGKO +polygonm0|4326|Point|3|KO-BKO-GKO:-BGKO +polygonm0|4326|LineString|3|KO-BKO-GKO:-BGKO +polygonm0|4326|Polygon|3|KO-BKO-GKO:-BGKO +polygonm0|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +polygonm0|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +polygonm0|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +polygonm0|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +polygonm0|4326|CircularString|3|KO-BKO-GKO:-BGKO +polygonm0|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +polygonm0|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +polygonm0|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +polygonm0|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +polygonm0|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +polygonm0|4326|Triangle|3|KO-BKO-GKO:-BGKO +polygonm0||COUNT|4| +polygonm0||GCOUNT|4| +polygonm4326|0|Point|0|KO-BKO-GKO:-BGKO +polygonm4326|0|LineString|0|KO-BKO-GKO:-BGKO +polygonm4326|0|Polygon|0|KO-BKO-GKO:-BGKO +polygonm4326|0|MultiPoint|0|KO-BKO-GKO:-BGKO +polygonm4326|0|MultiLineString|0|KO-BKO-GKO:-BGKO +polygonm4326|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +polygonm4326|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +polygonm4326|0|CircularString|0|KO-BKO-GKO:-BGKO +polygonm4326|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +polygonm4326|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +polygonm4326|0|MultiCurve|0|KO-BKO-GKO:-BGKO +polygonm4326|0|MultiSurface|0|KO-BKO-GKO:-BGKO +polygonm4326|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +polygonm4326|0|Triangle|0|KO-BKO-GKO:-BGKO +polygonm4326|0|Tin|0|KO-BKO-GKO:-BGKO +polygonm4326|0|Point|2|KO-BKO-GKO:-BGKO +polygonm4326|0|LineString|2|KO-BKO-GKO:-BGKO +polygonm4326|0|Polygon|2|KO-BKO-GKO:-BGKO +polygonm4326|0|MultiPoint|2|KO-BKO-GKO:-BGKO +polygonm4326|0|MultiLineString|2|KO-BKO-GKO:-BGKO +polygonm4326|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +polygonm4326|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +polygonm4326|0|CircularString|2|KO-BKO-GKO:-BGKO +polygonm4326|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +polygonm4326|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +polygonm4326|0|MultiCurve|2|KO-BKO-GKO:-BGKO +polygonm4326|0|MultiSurface|2|KO-BKO-GKO:-BGKO +polygonm4326|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +polygonm4326|0|Triangle|2|KO-BKO-GKO:-BGKO +polygonm4326|0|Point|1|KO-BKO-GKO:-BGKO +polygonm4326|0|LineString|1|KO-BKO-GKO:-BGKO +polygonm4326|0|Polygon|1|KO-BKO-GOK-BGOK +polygonm4326|0|MultiPoint|1|KO-BKO-GKO:-BGKO +polygonm4326|0|MultiLineString|1|KO-BKO-GKO:-BGKO +polygonm4326|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +polygonm4326|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +polygonm4326|0|CircularString|1|KO-BKO-GKO:-BGKO +polygonm4326|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +polygonm4326|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +polygonm4326|0|MultiCurve|1|KO-BKO-GKO:-BGKO +polygonm4326|0|MultiSurface|1|KO-BKO-GKO:-BGKO +polygonm4326|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +polygonm4326|0|Triangle|1|KO-BKO-GKO:-BGKO +polygonm4326|0|Point|3|KO-BKO-GKO:-BGKO +polygonm4326|0|LineString|3|KO-BKO-GKO:-BGKO +polygonm4326|0|Polygon|3|KO-BKO-GKO:-BGKO +polygonm4326|0|MultiPoint|3|KO-BKO-GKO:-BGKO +polygonm4326|0|MultiLineString|3|KO-BKO-GKO:-BGKO +polygonm4326|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +polygonm4326|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +polygonm4326|0|CircularString|3|KO-BKO-GKO:-BGKO +polygonm4326|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +polygonm4326|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +polygonm4326|0|MultiCurve|3|KO-BKO-GKO:-BGKO +polygonm4326|0|MultiSurface|3|KO-BKO-GKO:-BGKO +polygonm4326|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +polygonm4326|0|Triangle|3|KO-BKO-GKO:-BGKO +polygonm4326|4326|Point|0|KO-BKO-GKO:-BGKO +polygonm4326|4326|LineString|0|KO-BKO-GKO:-BGKO +polygonm4326|4326|Polygon|0|KO-BKO-GKO:-BGKO +polygonm4326|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +polygonm4326|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +polygonm4326|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +polygonm4326|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +polygonm4326|4326|CircularString|0|KO-BKO-GKO:-BGKO +polygonm4326|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +polygonm4326|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +polygonm4326|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +polygonm4326|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +polygonm4326|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +polygonm4326|4326|Triangle|0|KO-BKO-GKO:-BGKO +polygonm4326|4326|Tin|0|KO-BKO-GKO:-BGKO +polygonm4326|4326|Point|2|KO-BKO-GKO:-BGKO +polygonm4326|4326|LineString|2|KO-BKO-GKO:-BGKO +polygonm4326|4326|Polygon|2|KO-BKO-GKO:-BGKO +polygonm4326|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +polygonm4326|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +polygonm4326|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +polygonm4326|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +polygonm4326|4326|CircularString|2|KO-BKO-GKO:-BGKO +polygonm4326|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +polygonm4326|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +polygonm4326|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +polygonm4326|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +polygonm4326|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +polygonm4326|4326|Triangle|2|KO-BKO-GKO:-BGKO +polygonm4326|4326|Point|1|KO-BKO-GKO:-BGKO +polygonm4326|4326|LineString|1|KO-BKO-GKO:-BGKO +polygonm4326|4326|Polygon|1|OK-BOK-GOK-BGOK +polygonm4326|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +polygonm4326|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +polygonm4326|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +polygonm4326|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +polygonm4326|4326|CircularString|1|KO-BKO-GKO:-BGKO +polygonm4326|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +polygonm4326|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +polygonm4326|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +polygonm4326|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +polygonm4326|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +polygonm4326|4326|Triangle|1|KO-BKO-GKO:-BGKO +polygonm4326|4326|Point|3|KO-BKO-GKO:-BGKO +polygonm4326|4326|LineString|3|KO-BKO-GKO:-BGKO +polygonm4326|4326|Polygon|3|KO-BKO-GKO:-BGKO +polygonm4326|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +polygonm4326|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +polygonm4326|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +polygonm4326|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +polygonm4326|4326|CircularString|3|KO-BKO-GKO:-BGKO +polygonm4326|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +polygonm4326|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +polygonm4326|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +polygonm4326|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +polygonm4326|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +polygonm4326|4326|Triangle|3|KO-BKO-GKO:-BGKO +polygonm4326||COUNT|2| +polygonm4326||GCOUNT|4| +polygonz|0|Point|0|KO-BKO-GKO:-BGKO +polygonz|0|LineString|0|KO-BKO-GKO:-BGKO +polygonz|0|Polygon|0|KO-BKO-GKO:-BGKO +polygonz|0|MultiPoint|0|KO-BKO-GKO:-BGKO +polygonz|0|MultiLineString|0|KO-BKO-GKO:-BGKO +polygonz|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +polygonz|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +polygonz|0|CircularString|0|KO-BKO-GKO:-BGKO +polygonz|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +polygonz|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +polygonz|0|MultiCurve|0|KO-BKO-GKO:-BGKO +polygonz|0|MultiSurface|0|KO-BKO-GKO:-BGKO +polygonz|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +polygonz|0|Triangle|0|KO-BKO-GKO:-BGKO +polygonz|0|Tin|0|KO-BKO-GKO:-BGKO +polygonz|0|Point|2|KO-BKO-GKO:-BGKO +polygonz|0|LineString|2|KO-BKO-GKO:-BGKO +polygonz|0|Polygon|2|OK-BOK-GOK-BGOK +polygonz|0|MultiPoint|2|KO-BKO-GKO:-BGKO +polygonz|0|MultiLineString|2|KO-BKO-GKO:-BGKO +polygonz|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +polygonz|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +polygonz|0|CircularString|2|KO-BKO-GKO:-BGKO +polygonz|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +polygonz|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +polygonz|0|MultiCurve|2|KO-BKO-GKO:-BGKO +polygonz|0|MultiSurface|2|KO-BKO-GKO:-BGKO +polygonz|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +polygonz|0|Triangle|2|KO-BKO-GKO:-BGKO +polygonz|0|Point|1|KO-BKO-GKO:-BGKO +polygonz|0|LineString|1|KO-BKO-GKO:-BGKO +polygonz|0|Polygon|1|KO-BKO-GKO:-BGKO +polygonz|0|MultiPoint|1|KO-BKO-GKO:-BGKO +polygonz|0|MultiLineString|1|KO-BKO-GKO:-BGKO +polygonz|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +polygonz|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +polygonz|0|CircularString|1|KO-BKO-GKO:-BGKO +polygonz|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +polygonz|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +polygonz|0|MultiCurve|1|KO-BKO-GKO:-BGKO +polygonz|0|MultiSurface|1|KO-BKO-GKO:-BGKO +polygonz|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +polygonz|0|Triangle|1|KO-BKO-GKO:-BGKO +polygonz|0|Point|3|KO-BKO-GKO:-BGKO +polygonz|0|LineString|3|KO-BKO-GKO:-BGKO +polygonz|0|Polygon|3|KO-BKO-GKO:-BGKO +polygonz|0|MultiPoint|3|KO-BKO-GKO:-BGKO +polygonz|0|MultiLineString|3|KO-BKO-GKO:-BGKO +polygonz|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +polygonz|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +polygonz|0|CircularString|3|KO-BKO-GKO:-BGKO +polygonz|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +polygonz|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +polygonz|0|MultiCurve|3|KO-BKO-GKO:-BGKO +polygonz|0|MultiSurface|3|KO-BKO-GKO:-BGKO +polygonz|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +polygonz|0|Triangle|3|KO-BKO-GKO:-BGKO +polygonz|4326|Point|0|KO-BKO-GKO:-BGKO +polygonz|4326|LineString|0|KO-BKO-GKO:-BGKO +polygonz|4326|Polygon|0|KO-BKO-GKO:-BGKO +polygonz|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +polygonz|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +polygonz|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +polygonz|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +polygonz|4326|CircularString|0|KO-BKO-GKO:-BGKO +polygonz|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +polygonz|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +polygonz|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +polygonz|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +polygonz|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +polygonz|4326|Triangle|0|KO-BKO-GKO:-BGKO +polygonz|4326|Tin|0|KO-BKO-GKO:-BGKO +polygonz|4326|Point|2|KO-BKO-GKO:-BGKO +polygonz|4326|LineString|2|KO-BKO-GKO:-BGKO +polygonz|4326|Polygon|2|OK-BOK-GOK-BGOK +polygonz|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +polygonz|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +polygonz|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +polygonz|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +polygonz|4326|CircularString|2|KO-BKO-GKO:-BGKO +polygonz|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +polygonz|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +polygonz|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +polygonz|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +polygonz|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +polygonz|4326|Triangle|2|KO-BKO-GKO:-BGKO +polygonz|4326|Point|1|KO-BKO-GKO:-BGKO +polygonz|4326|LineString|1|KO-BKO-GKO:-BGKO +polygonz|4326|Polygon|1|KO-BKO-GKO:-BGKO +polygonz|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +polygonz|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +polygonz|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +polygonz|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +polygonz|4326|CircularString|1|KO-BKO-GKO:-BGKO +polygonz|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +polygonz|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +polygonz|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +polygonz|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +polygonz|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +polygonz|4326|Triangle|1|KO-BKO-GKO:-BGKO +polygonz|4326|Point|3|KO-BKO-GKO:-BGKO +polygonz|4326|LineString|3|KO-BKO-GKO:-BGKO +polygonz|4326|Polygon|3|KO-BKO-GKO:-BGKO +polygonz|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +polygonz|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +polygonz|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +polygonz|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +polygonz|4326|CircularString|3|KO-BKO-GKO:-BGKO +polygonz|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +polygonz|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +polygonz|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +polygonz|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +polygonz|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +polygonz|4326|Triangle|3|KO-BKO-GKO:-BGKO +polygonz||COUNT|4| +polygonz||GCOUNT|4| +polygonz0|0|Point|0|KO-BKO-GKO:-BGKO +polygonz0|0|LineString|0|KO-BKO-GKO:-BGKO +polygonz0|0|Polygon|0|KO-BKO-GKO:-BGKO +polygonz0|0|MultiPoint|0|KO-BKO-GKO:-BGKO +polygonz0|0|MultiLineString|0|KO-BKO-GKO:-BGKO +polygonz0|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +polygonz0|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +polygonz0|0|CircularString|0|KO-BKO-GKO:-BGKO +polygonz0|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +polygonz0|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +polygonz0|0|MultiCurve|0|KO-BKO-GKO:-BGKO +polygonz0|0|MultiSurface|0|KO-BKO-GKO:-BGKO +polygonz0|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +polygonz0|0|Triangle|0|KO-BKO-GKO:-BGKO +polygonz0|0|Tin|0|KO-BKO-GKO:-BGKO +polygonz0|0|Point|2|KO-BKO-GKO:-BGKO +polygonz0|0|LineString|2|KO-BKO-GKO:-BGKO +polygonz0|0|Polygon|2|OK-BOK-GOK-BGOK +polygonz0|0|MultiPoint|2|KO-BKO-GKO:-BGKO +polygonz0|0|MultiLineString|2|KO-BKO-GKO:-BGKO +polygonz0|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +polygonz0|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +polygonz0|0|CircularString|2|KO-BKO-GKO:-BGKO +polygonz0|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +polygonz0|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +polygonz0|0|MultiCurve|2|KO-BKO-GKO:-BGKO +polygonz0|0|MultiSurface|2|KO-BKO-GKO:-BGKO +polygonz0|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +polygonz0|0|Triangle|2|KO-BKO-GKO:-BGKO +polygonz0|0|Point|1|KO-BKO-GKO:-BGKO +polygonz0|0|LineString|1|KO-BKO-GKO:-BGKO +polygonz0|0|Polygon|1|KO-BKO-GKO:-BGKO +polygonz0|0|MultiPoint|1|KO-BKO-GKO:-BGKO +polygonz0|0|MultiLineString|1|KO-BKO-GKO:-BGKO +polygonz0|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +polygonz0|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +polygonz0|0|CircularString|1|KO-BKO-GKO:-BGKO +polygonz0|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +polygonz0|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +polygonz0|0|MultiCurve|1|KO-BKO-GKO:-BGKO +polygonz0|0|MultiSurface|1|KO-BKO-GKO:-BGKO +polygonz0|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +polygonz0|0|Triangle|1|KO-BKO-GKO:-BGKO +polygonz0|0|Point|3|KO-BKO-GKO:-BGKO +polygonz0|0|LineString|3|KO-BKO-GKO:-BGKO +polygonz0|0|Polygon|3|KO-BKO-GKO:-BGKO +polygonz0|0|MultiPoint|3|KO-BKO-GKO:-BGKO +polygonz0|0|MultiLineString|3|KO-BKO-GKO:-BGKO +polygonz0|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +polygonz0|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +polygonz0|0|CircularString|3|KO-BKO-GKO:-BGKO +polygonz0|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +polygonz0|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +polygonz0|0|MultiCurve|3|KO-BKO-GKO:-BGKO +polygonz0|0|MultiSurface|3|KO-BKO-GKO:-BGKO +polygonz0|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +polygonz0|0|Triangle|3|KO-BKO-GKO:-BGKO +polygonz0|4326|Point|0|KO-BKO-GKO:-BGKO +polygonz0|4326|LineString|0|KO-BKO-GKO:-BGKO +polygonz0|4326|Polygon|0|KO-BKO-GKO:-BGKO +polygonz0|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +polygonz0|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +polygonz0|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +polygonz0|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +polygonz0|4326|CircularString|0|KO-BKO-GKO:-BGKO +polygonz0|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +polygonz0|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +polygonz0|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +polygonz0|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +polygonz0|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +polygonz0|4326|Triangle|0|KO-BKO-GKO:-BGKO +polygonz0|4326|Tin|0|KO-BKO-GKO:-BGKO +polygonz0|4326|Point|2|KO-BKO-GKO:-BGKO +polygonz0|4326|LineString|2|KO-BKO-GKO:-BGKO +polygonz0|4326|Polygon|2|OK-BOK-GOK-BGOK +polygonz0|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +polygonz0|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +polygonz0|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +polygonz0|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +polygonz0|4326|CircularString|2|KO-BKO-GKO:-BGKO +polygonz0|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +polygonz0|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +polygonz0|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +polygonz0|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +polygonz0|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +polygonz0|4326|Triangle|2|KO-BKO-GKO:-BGKO +polygonz0|4326|Point|1|KO-BKO-GKO:-BGKO +polygonz0|4326|LineString|1|KO-BKO-GKO:-BGKO +polygonz0|4326|Polygon|1|KO-BKO-GKO:-BGKO +polygonz0|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +polygonz0|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +polygonz0|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +polygonz0|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +polygonz0|4326|CircularString|1|KO-BKO-GKO:-BGKO +polygonz0|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +polygonz0|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +polygonz0|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +polygonz0|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +polygonz0|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +polygonz0|4326|Triangle|1|KO-BKO-GKO:-BGKO +polygonz0|4326|Point|3|KO-BKO-GKO:-BGKO +polygonz0|4326|LineString|3|KO-BKO-GKO:-BGKO +polygonz0|4326|Polygon|3|KO-BKO-GKO:-BGKO +polygonz0|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +polygonz0|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +polygonz0|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +polygonz0|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +polygonz0|4326|CircularString|3|KO-BKO-GKO:-BGKO +polygonz0|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +polygonz0|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +polygonz0|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +polygonz0|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +polygonz0|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +polygonz0|4326|Triangle|3|KO-BKO-GKO:-BGKO +polygonz0||COUNT|4| +polygonz0||GCOUNT|4| +polygonz4326|0|Point|0|KO-BKO-GKO:-BGKO +polygonz4326|0|LineString|0|KO-BKO-GKO:-BGKO +polygonz4326|0|Polygon|0|KO-BKO-GKO:-BGKO +polygonz4326|0|MultiPoint|0|KO-BKO-GKO:-BGKO +polygonz4326|0|MultiLineString|0|KO-BKO-GKO:-BGKO +polygonz4326|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +polygonz4326|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +polygonz4326|0|CircularString|0|KO-BKO-GKO:-BGKO +polygonz4326|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +polygonz4326|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +polygonz4326|0|MultiCurve|0|KO-BKO-GKO:-BGKO +polygonz4326|0|MultiSurface|0|KO-BKO-GKO:-BGKO +polygonz4326|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +polygonz4326|0|Triangle|0|KO-BKO-GKO:-BGKO +polygonz4326|0|Tin|0|KO-BKO-GKO:-BGKO +polygonz4326|0|Point|2|KO-BKO-GKO:-BGKO +polygonz4326|0|LineString|2|KO-BKO-GKO:-BGKO +polygonz4326|0|Polygon|2|KO-BKO-GOK-BGOK +polygonz4326|0|MultiPoint|2|KO-BKO-GKO:-BGKO +polygonz4326|0|MultiLineString|2|KO-BKO-GKO:-BGKO +polygonz4326|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +polygonz4326|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +polygonz4326|0|CircularString|2|KO-BKO-GKO:-BGKO +polygonz4326|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +polygonz4326|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +polygonz4326|0|MultiCurve|2|KO-BKO-GKO:-BGKO +polygonz4326|0|MultiSurface|2|KO-BKO-GKO:-BGKO +polygonz4326|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +polygonz4326|0|Triangle|2|KO-BKO-GKO:-BGKO +polygonz4326|0|Point|1|KO-BKO-GKO:-BGKO +polygonz4326|0|LineString|1|KO-BKO-GKO:-BGKO +polygonz4326|0|Polygon|1|KO-BKO-GKO:-BGKO +polygonz4326|0|MultiPoint|1|KO-BKO-GKO:-BGKO +polygonz4326|0|MultiLineString|1|KO-BKO-GKO:-BGKO +polygonz4326|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +polygonz4326|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +polygonz4326|0|CircularString|1|KO-BKO-GKO:-BGKO +polygonz4326|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +polygonz4326|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +polygonz4326|0|MultiCurve|1|KO-BKO-GKO:-BGKO +polygonz4326|0|MultiSurface|1|KO-BKO-GKO:-BGKO +polygonz4326|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +polygonz4326|0|Triangle|1|KO-BKO-GKO:-BGKO +polygonz4326|0|Point|3|KO-BKO-GKO:-BGKO +polygonz4326|0|LineString|3|KO-BKO-GKO:-BGKO +polygonz4326|0|Polygon|3|KO-BKO-GKO:-BGKO +polygonz4326|0|MultiPoint|3|KO-BKO-GKO:-BGKO +polygonz4326|0|MultiLineString|3|KO-BKO-GKO:-BGKO +polygonz4326|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +polygonz4326|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +polygonz4326|0|CircularString|3|KO-BKO-GKO:-BGKO +polygonz4326|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +polygonz4326|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +polygonz4326|0|MultiCurve|3|KO-BKO-GKO:-BGKO +polygonz4326|0|MultiSurface|3|KO-BKO-GKO:-BGKO +polygonz4326|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +polygonz4326|0|Triangle|3|KO-BKO-GKO:-BGKO +polygonz4326|4326|Point|0|KO-BKO-GKO:-BGKO +polygonz4326|4326|LineString|0|KO-BKO-GKO:-BGKO +polygonz4326|4326|Polygon|0|KO-BKO-GKO:-BGKO +polygonz4326|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +polygonz4326|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +polygonz4326|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +polygonz4326|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +polygonz4326|4326|CircularString|0|KO-BKO-GKO:-BGKO +polygonz4326|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +polygonz4326|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +polygonz4326|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +polygonz4326|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +polygonz4326|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +polygonz4326|4326|Triangle|0|KO-BKO-GKO:-BGKO +polygonz4326|4326|Tin|0|KO-BKO-GKO:-BGKO +polygonz4326|4326|Point|2|KO-BKO-GKO:-BGKO +polygonz4326|4326|LineString|2|KO-BKO-GKO:-BGKO +polygonz4326|4326|Polygon|2|OK-BOK-GOK-BGOK +polygonz4326|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +polygonz4326|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +polygonz4326|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +polygonz4326|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +polygonz4326|4326|CircularString|2|KO-BKO-GKO:-BGKO +polygonz4326|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +polygonz4326|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +polygonz4326|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +polygonz4326|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +polygonz4326|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +polygonz4326|4326|Triangle|2|KO-BKO-GKO:-BGKO +polygonz4326|4326|Point|1|KO-BKO-GKO:-BGKO +polygonz4326|4326|LineString|1|KO-BKO-GKO:-BGKO +polygonz4326|4326|Polygon|1|KO-BKO-GKO:-BGKO +polygonz4326|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +polygonz4326|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +polygonz4326|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +polygonz4326|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +polygonz4326|4326|CircularString|1|KO-BKO-GKO:-BGKO +polygonz4326|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +polygonz4326|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +polygonz4326|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +polygonz4326|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +polygonz4326|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +polygonz4326|4326|Triangle|1|KO-BKO-GKO:-BGKO +polygonz4326|4326|Point|3|KO-BKO-GKO:-BGKO +polygonz4326|4326|LineString|3|KO-BKO-GKO:-BGKO +polygonz4326|4326|Polygon|3|KO-BKO-GKO:-BGKO +polygonz4326|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +polygonz4326|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +polygonz4326|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +polygonz4326|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +polygonz4326|4326|CircularString|3|KO-BKO-GKO:-BGKO +polygonz4326|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +polygonz4326|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +polygonz4326|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +polygonz4326|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +polygonz4326|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +polygonz4326|4326|Triangle|3|KO-BKO-GKO:-BGKO +polygonz4326||COUNT|2| +polygonz4326||GCOUNT|4| +polygonzm|0|Point|0|KO-BKO-GKO:-BGKO +polygonzm|0|LineString|0|KO-BKO-GKO:-BGKO +polygonzm|0|Polygon|0|KO-BKO-GKO:-BGKO +polygonzm|0|MultiPoint|0|KO-BKO-GKO:-BGKO +polygonzm|0|MultiLineString|0|KO-BKO-GKO:-BGKO +polygonzm|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +polygonzm|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +polygonzm|0|CircularString|0|KO-BKO-GKO:-BGKO +polygonzm|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +polygonzm|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +polygonzm|0|MultiCurve|0|KO-BKO-GKO:-BGKO +polygonzm|0|MultiSurface|0|KO-BKO-GKO:-BGKO +polygonzm|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +polygonzm|0|Triangle|0|KO-BKO-GKO:-BGKO +polygonzm|0|Tin|0|KO-BKO-GKO:-BGKO +polygonzm|0|Point|2|KO-BKO-GKO:-BGKO +polygonzm|0|LineString|2|KO-BKO-GKO:-BGKO +polygonzm|0|Polygon|2|KO-BKO-GKO:-BGKO +polygonzm|0|MultiPoint|2|KO-BKO-GKO:-BGKO +polygonzm|0|MultiLineString|2|KO-BKO-GKO:-BGKO +polygonzm|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +polygonzm|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +polygonzm|0|CircularString|2|KO-BKO-GKO:-BGKO +polygonzm|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +polygonzm|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +polygonzm|0|MultiCurve|2|KO-BKO-GKO:-BGKO +polygonzm|0|MultiSurface|2|KO-BKO-GKO:-BGKO +polygonzm|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +polygonzm|0|Triangle|2|KO-BKO-GKO:-BGKO +polygonzm|0|Point|1|KO-BKO-GKO:-BGKO +polygonzm|0|LineString|1|KO-BKO-GKO:-BGKO +polygonzm|0|Polygon|1|KO-BKO-GKO:-BGKO +polygonzm|0|MultiPoint|1|KO-BKO-GKO:-BGKO +polygonzm|0|MultiLineString|1|KO-BKO-GKO:-BGKO +polygonzm|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +polygonzm|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +polygonzm|0|CircularString|1|KO-BKO-GKO:-BGKO +polygonzm|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +polygonzm|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +polygonzm|0|MultiCurve|1|KO-BKO-GKO:-BGKO +polygonzm|0|MultiSurface|1|KO-BKO-GKO:-BGKO +polygonzm|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +polygonzm|0|Triangle|1|KO-BKO-GKO:-BGKO +polygonzm|0|Point|3|KO-BKO-GKO:-BGKO +polygonzm|0|LineString|3|KO-BKO-GKO:-BGKO +polygonzm|0|Polygon|3|OK-BOK-GOK-BGOK +polygonzm|0|MultiPoint|3|KO-BKO-GKO:-BGKO +polygonzm|0|MultiLineString|3|KO-BKO-GKO:-BGKO +polygonzm|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +polygonzm|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +polygonzm|0|CircularString|3|KO-BKO-GKO:-BGKO +polygonzm|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +polygonzm|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +polygonzm|0|MultiCurve|3|KO-BKO-GKO:-BGKO +polygonzm|0|MultiSurface|3|KO-BKO-GKO:-BGKO +polygonzm|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +polygonzm|0|Triangle|3|KO-BKO-GKO:-BGKO +polygonzm|4326|Point|0|KO-BKO-GKO:-BGKO +polygonzm|4326|LineString|0|KO-BKO-GKO:-BGKO +polygonzm|4326|Polygon|0|KO-BKO-GKO:-BGKO +polygonzm|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +polygonzm|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +polygonzm|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +polygonzm|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +polygonzm|4326|CircularString|0|KO-BKO-GKO:-BGKO +polygonzm|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +polygonzm|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +polygonzm|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +polygonzm|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +polygonzm|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +polygonzm|4326|Triangle|0|KO-BKO-GKO:-BGKO +polygonzm|4326|Tin|0|KO-BKO-GKO:-BGKO +polygonzm|4326|Point|2|KO-BKO-GKO:-BGKO +polygonzm|4326|LineString|2|KO-BKO-GKO:-BGKO +polygonzm|4326|Polygon|2|KO-BKO-GKO:-BGKO +polygonzm|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +polygonzm|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +polygonzm|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +polygonzm|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +polygonzm|4326|CircularString|2|KO-BKO-GKO:-BGKO +polygonzm|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +polygonzm|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +polygonzm|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +polygonzm|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +polygonzm|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +polygonzm|4326|Triangle|2|KO-BKO-GKO:-BGKO +polygonzm|4326|Point|1|KO-BKO-GKO:-BGKO +polygonzm|4326|LineString|1|KO-BKO-GKO:-BGKO +polygonzm|4326|Polygon|1|KO-BKO-GKO:-BGKO +polygonzm|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +polygonzm|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +polygonzm|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +polygonzm|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +polygonzm|4326|CircularString|1|KO-BKO-GKO:-BGKO +polygonzm|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +polygonzm|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +polygonzm|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +polygonzm|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +polygonzm|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +polygonzm|4326|Triangle|1|KO-BKO-GKO:-BGKO +polygonzm|4326|Point|3|KO-BKO-GKO:-BGKO +polygonzm|4326|LineString|3|KO-BKO-GKO:-BGKO +polygonzm|4326|Polygon|3|OK-BOK-GOK-BGOK +polygonzm|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +polygonzm|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +polygonzm|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +polygonzm|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +polygonzm|4326|CircularString|3|KO-BKO-GKO:-BGKO +polygonzm|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +polygonzm|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +polygonzm|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +polygonzm|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +polygonzm|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +polygonzm|4326|Triangle|3|KO-BKO-GKO:-BGKO +polygonzm||COUNT|4| +polygonzm||GCOUNT|4| +polygonzm0|0|Point|0|KO-BKO-GKO:-BGKO +polygonzm0|0|LineString|0|KO-BKO-GKO:-BGKO +polygonzm0|0|Polygon|0|KO-BKO-GKO:-BGKO +polygonzm0|0|MultiPoint|0|KO-BKO-GKO:-BGKO +polygonzm0|0|MultiLineString|0|KO-BKO-GKO:-BGKO +polygonzm0|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +polygonzm0|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +polygonzm0|0|CircularString|0|KO-BKO-GKO:-BGKO +polygonzm0|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +polygonzm0|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +polygonzm0|0|MultiCurve|0|KO-BKO-GKO:-BGKO +polygonzm0|0|MultiSurface|0|KO-BKO-GKO:-BGKO +polygonzm0|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +polygonzm0|0|Triangle|0|KO-BKO-GKO:-BGKO +polygonzm0|0|Tin|0|KO-BKO-GKO:-BGKO +polygonzm0|0|Point|2|KO-BKO-GKO:-BGKO +polygonzm0|0|LineString|2|KO-BKO-GKO:-BGKO +polygonzm0|0|Polygon|2|KO-BKO-GKO:-BGKO +polygonzm0|0|MultiPoint|2|KO-BKO-GKO:-BGKO +polygonzm0|0|MultiLineString|2|KO-BKO-GKO:-BGKO +polygonzm0|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +polygonzm0|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +polygonzm0|0|CircularString|2|KO-BKO-GKO:-BGKO +polygonzm0|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +polygonzm0|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +polygonzm0|0|MultiCurve|2|KO-BKO-GKO:-BGKO +polygonzm0|0|MultiSurface|2|KO-BKO-GKO:-BGKO +polygonzm0|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +polygonzm0|0|Triangle|2|KO-BKO-GKO:-BGKO +polygonzm0|0|Point|1|KO-BKO-GKO:-BGKO +polygonzm0|0|LineString|1|KO-BKO-GKO:-BGKO +polygonzm0|0|Polygon|1|KO-BKO-GKO:-BGKO +polygonzm0|0|MultiPoint|1|KO-BKO-GKO:-BGKO +polygonzm0|0|MultiLineString|1|KO-BKO-GKO:-BGKO +polygonzm0|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +polygonzm0|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +polygonzm0|0|CircularString|1|KO-BKO-GKO:-BGKO +polygonzm0|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +polygonzm0|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +polygonzm0|0|MultiCurve|1|KO-BKO-GKO:-BGKO +polygonzm0|0|MultiSurface|1|KO-BKO-GKO:-BGKO +polygonzm0|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +polygonzm0|0|Triangle|1|KO-BKO-GKO:-BGKO +polygonzm0|0|Point|3|KO-BKO-GKO:-BGKO +polygonzm0|0|LineString|3|KO-BKO-GKO:-BGKO +polygonzm0|0|Polygon|3|OK-BOK-GOK-BGOK +polygonzm0|0|MultiPoint|3|KO-BKO-GKO:-BGKO +polygonzm0|0|MultiLineString|3|KO-BKO-GKO:-BGKO +polygonzm0|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +polygonzm0|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +polygonzm0|0|CircularString|3|KO-BKO-GKO:-BGKO +polygonzm0|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +polygonzm0|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +polygonzm0|0|MultiCurve|3|KO-BKO-GKO:-BGKO +polygonzm0|0|MultiSurface|3|KO-BKO-GKO:-BGKO +polygonzm0|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +polygonzm0|0|Triangle|3|KO-BKO-GKO:-BGKO +polygonzm0|4326|Point|0|KO-BKO-GKO:-BGKO +polygonzm0|4326|LineString|0|KO-BKO-GKO:-BGKO +polygonzm0|4326|Polygon|0|KO-BKO-GKO:-BGKO +polygonzm0|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +polygonzm0|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +polygonzm0|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +polygonzm0|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +polygonzm0|4326|CircularString|0|KO-BKO-GKO:-BGKO +polygonzm0|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +polygonzm0|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +polygonzm0|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +polygonzm0|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +polygonzm0|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +polygonzm0|4326|Triangle|0|KO-BKO-GKO:-BGKO +polygonzm0|4326|Tin|0|KO-BKO-GKO:-BGKO +polygonzm0|4326|Point|2|KO-BKO-GKO:-BGKO +polygonzm0|4326|LineString|2|KO-BKO-GKO:-BGKO +polygonzm0|4326|Polygon|2|KO-BKO-GKO:-BGKO +polygonzm0|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +polygonzm0|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +polygonzm0|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +polygonzm0|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +polygonzm0|4326|CircularString|2|KO-BKO-GKO:-BGKO +polygonzm0|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +polygonzm0|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +polygonzm0|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +polygonzm0|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +polygonzm0|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +polygonzm0|4326|Triangle|2|KO-BKO-GKO:-BGKO +polygonzm0|4326|Point|1|KO-BKO-GKO:-BGKO +polygonzm0|4326|LineString|1|KO-BKO-GKO:-BGKO +polygonzm0|4326|Polygon|1|KO-BKO-GKO:-BGKO +polygonzm0|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +polygonzm0|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +polygonzm0|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +polygonzm0|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +polygonzm0|4326|CircularString|1|KO-BKO-GKO:-BGKO +polygonzm0|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +polygonzm0|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +polygonzm0|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +polygonzm0|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +polygonzm0|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +polygonzm0|4326|Triangle|1|KO-BKO-GKO:-BGKO +polygonzm0|4326|Point|3|KO-BKO-GKO:-BGKO +polygonzm0|4326|LineString|3|KO-BKO-GKO:-BGKO +polygonzm0|4326|Polygon|3|OK-BOK-GOK-BGOK +polygonzm0|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +polygonzm0|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +polygonzm0|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +polygonzm0|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +polygonzm0|4326|CircularString|3|KO-BKO-GKO:-BGKO +polygonzm0|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +polygonzm0|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +polygonzm0|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +polygonzm0|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +polygonzm0|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +polygonzm0|4326|Triangle|3|KO-BKO-GKO:-BGKO +polygonzm0||COUNT|4| +polygonzm0||GCOUNT|4| +polygonzm4326|0|Point|0|KO-BKO-GKO:-BGKO +polygonzm4326|0|LineString|0|KO-BKO-GKO:-BGKO +polygonzm4326|0|Polygon|0|KO-BKO-GKO:-BGKO +polygonzm4326|0|MultiPoint|0|KO-BKO-GKO:-BGKO +polygonzm4326|0|MultiLineString|0|KO-BKO-GKO:-BGKO +polygonzm4326|0|MultiPolygon|0|KO-BKO-GKO:-BGKO +polygonzm4326|0|GeometryCollection|0|KO-BKO-GKO:-BGKO +polygonzm4326|0|CircularString|0|KO-BKO-GKO:-BGKO +polygonzm4326|0|CompoundCurve|0|KO-BKO-GKO:-BGKO +polygonzm4326|0|CurvePolygon|0|KO-BKO-GKO:-BGKO +polygonzm4326|0|MultiCurve|0|KO-BKO-GKO:-BGKO +polygonzm4326|0|MultiSurface|0|KO-BKO-GKO:-BGKO +polygonzm4326|0|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +polygonzm4326|0|Triangle|0|KO-BKO-GKO:-BGKO +polygonzm4326|0|Tin|0|KO-BKO-GKO:-BGKO +polygonzm4326|0|Point|2|KO-BKO-GKO:-BGKO +polygonzm4326|0|LineString|2|KO-BKO-GKO:-BGKO +polygonzm4326|0|Polygon|2|KO-BKO-GKO:-BGKO +polygonzm4326|0|MultiPoint|2|KO-BKO-GKO:-BGKO +polygonzm4326|0|MultiLineString|2|KO-BKO-GKO:-BGKO +polygonzm4326|0|MultiPolygon|2|KO-BKO-GKO:-BGKO +polygonzm4326|0|GeometryCollection|2|KO-BKO-GKO:-BGKO +polygonzm4326|0|CircularString|2|KO-BKO-GKO:-BGKO +polygonzm4326|0|CompoundCurve|2|KO-BKO-GKO:-BGKO +polygonzm4326|0|CurvePolygon|2|KO-BKO-GKO:-BGKO +polygonzm4326|0|MultiCurve|2|KO-BKO-GKO:-BGKO +polygonzm4326|0|MultiSurface|2|KO-BKO-GKO:-BGKO +polygonzm4326|0|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +polygonzm4326|0|Triangle|2|KO-BKO-GKO:-BGKO +polygonzm4326|0|Point|1|KO-BKO-GKO:-BGKO +polygonzm4326|0|LineString|1|KO-BKO-GKO:-BGKO +polygonzm4326|0|Polygon|1|KO-BKO-GKO:-BGKO +polygonzm4326|0|MultiPoint|1|KO-BKO-GKO:-BGKO +polygonzm4326|0|MultiLineString|1|KO-BKO-GKO:-BGKO +polygonzm4326|0|MultiPolygon|1|KO-BKO-GKO:-BGKO +polygonzm4326|0|GeometryCollection|1|KO-BKO-GKO:-BGKO +polygonzm4326|0|CircularString|1|KO-BKO-GKO:-BGKO +polygonzm4326|0|CompoundCurve|1|KO-BKO-GKO:-BGKO +polygonzm4326|0|CurvePolygon|1|KO-BKO-GKO:-BGKO +polygonzm4326|0|MultiCurve|1|KO-BKO-GKO:-BGKO +polygonzm4326|0|MultiSurface|1|KO-BKO-GKO:-BGKO +polygonzm4326|0|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +polygonzm4326|0|Triangle|1|KO-BKO-GKO:-BGKO +polygonzm4326|0|Point|3|KO-BKO-GKO:-BGKO +polygonzm4326|0|LineString|3|KO-BKO-GKO:-BGKO +polygonzm4326|0|Polygon|3|KO-BKO-GOK-BGOK +polygonzm4326|0|MultiPoint|3|KO-BKO-GKO:-BGKO +polygonzm4326|0|MultiLineString|3|KO-BKO-GKO:-BGKO +polygonzm4326|0|MultiPolygon|3|KO-BKO-GKO:-BGKO +polygonzm4326|0|GeometryCollection|3|KO-BKO-GKO:-BGKO +polygonzm4326|0|CircularString|3|KO-BKO-GKO:-BGKO +polygonzm4326|0|CompoundCurve|3|KO-BKO-GKO:-BGKO +polygonzm4326|0|CurvePolygon|3|KO-BKO-GKO:-BGKO +polygonzm4326|0|MultiCurve|3|KO-BKO-GKO:-BGKO +polygonzm4326|0|MultiSurface|3|KO-BKO-GKO:-BGKO +polygonzm4326|0|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +polygonzm4326|0|Triangle|3|KO-BKO-GKO:-BGKO +polygonzm4326|4326|Point|0|KO-BKO-GKO:-BGKO +polygonzm4326|4326|LineString|0|KO-BKO-GKO:-BGKO +polygonzm4326|4326|Polygon|0|KO-BKO-GKO:-BGKO +polygonzm4326|4326|MultiPoint|0|KO-BKO-GKO:-BGKO +polygonzm4326|4326|MultiLineString|0|KO-BKO-GKO:-BGKO +polygonzm4326|4326|MultiPolygon|0|KO-BKO-GKO:-BGKO +polygonzm4326|4326|GeometryCollection|0|KO-BKO-GKO:-BGKO +polygonzm4326|4326|CircularString|0|KO-BKO-GKO:-BGKO +polygonzm4326|4326|CompoundCurve|0|KO-BKO-GKO:-BGKO +polygonzm4326|4326|CurvePolygon|0|KO-BKO-GKO:-BGKO +polygonzm4326|4326|MultiCurve|0|KO-BKO-GKO:-BGKO +polygonzm4326|4326|MultiSurface|0|KO-BKO-GKO:-BGKO +polygonzm4326|4326|PolyhedralSurface|0|KO-BKO-GKO:-BGKO +polygonzm4326|4326|Triangle|0|KO-BKO-GKO:-BGKO +polygonzm4326|4326|Tin|0|KO-BKO-GKO:-BGKO +polygonzm4326|4326|Point|2|KO-BKO-GKO:-BGKO +polygonzm4326|4326|LineString|2|KO-BKO-GKO:-BGKO +polygonzm4326|4326|Polygon|2|KO-BKO-GKO:-BGKO +polygonzm4326|4326|MultiPoint|2|KO-BKO-GKO:-BGKO +polygonzm4326|4326|MultiLineString|2|KO-BKO-GKO:-BGKO +polygonzm4326|4326|MultiPolygon|2|KO-BKO-GKO:-BGKO +polygonzm4326|4326|GeometryCollection|2|KO-BKO-GKO:-BGKO +polygonzm4326|4326|CircularString|2|KO-BKO-GKO:-BGKO +polygonzm4326|4326|CompoundCurve|2|KO-BKO-GKO:-BGKO +polygonzm4326|4326|CurvePolygon|2|KO-BKO-GKO:-BGKO +polygonzm4326|4326|MultiCurve|2|KO-BKO-GKO:-BGKO +polygonzm4326|4326|MultiSurface|2|KO-BKO-GKO:-BGKO +polygonzm4326|4326|PolyhedralSurface|2|KO-BKO-GKO:-BGKO +polygonzm4326|4326|Triangle|2|KO-BKO-GKO:-BGKO +polygonzm4326|4326|Point|1|KO-BKO-GKO:-BGKO +polygonzm4326|4326|LineString|1|KO-BKO-GKO:-BGKO +polygonzm4326|4326|Polygon|1|KO-BKO-GKO:-BGKO +polygonzm4326|4326|MultiPoint|1|KO-BKO-GKO:-BGKO +polygonzm4326|4326|MultiLineString|1|KO-BKO-GKO:-BGKO +polygonzm4326|4326|MultiPolygon|1|KO-BKO-GKO:-BGKO +polygonzm4326|4326|GeometryCollection|1|KO-BKO-GKO:-BGKO +polygonzm4326|4326|CircularString|1|KO-BKO-GKO:-BGKO +polygonzm4326|4326|CompoundCurve|1|KO-BKO-GKO:-BGKO +polygonzm4326|4326|CurvePolygon|1|KO-BKO-GKO:-BGKO +polygonzm4326|4326|MultiCurve|1|KO-BKO-GKO:-BGKO +polygonzm4326|4326|MultiSurface|1|KO-BKO-GKO:-BGKO +polygonzm4326|4326|PolyhedralSurface|1|KO-BKO-GKO:-BGKO +polygonzm4326|4326|Triangle|1|KO-BKO-GKO:-BGKO +polygonzm4326|4326|Point|3|KO-BKO-GKO:-BGKO +polygonzm4326|4326|LineString|3|KO-BKO-GKO:-BGKO +polygonzm4326|4326|Polygon|3|OK-BOK-GOK-BGOK +polygonzm4326|4326|MultiPoint|3|KO-BKO-GKO:-BGKO +polygonzm4326|4326|MultiLineString|3|KO-BKO-GKO:-BGKO +polygonzm4326|4326|MultiPolygon|3|KO-BKO-GKO:-BGKO +polygonzm4326|4326|GeometryCollection|3|KO-BKO-GKO:-BGKO +polygonzm4326|4326|CircularString|3|KO-BKO-GKO:-BGKO +polygonzm4326|4326|CompoundCurve|3|KO-BKO-GKO:-BGKO +polygonzm4326|4326|CurvePolygon|3|KO-BKO-GKO:-BGKO +polygonzm4326|4326|MultiCurve|3|KO-BKO-GKO:-BGKO +polygonzm4326|4326|MultiSurface|3|KO-BKO-GKO:-BGKO +polygonzm4326|4326|PolyhedralSurface|3|KO-BKO-GKO:-BGKO +polygonzm4326|4326|Triangle|3|KO-BKO-GKO:-BGKO +polygonzm4326||COUNT|2| +polygonzm4326||GCOUNT|4| +polyhedralsurface|0|Point|0|KO-BKO +polyhedralsurface|0|LineString|0|KO-BKO +polyhedralsurface|0|Polygon|0|KO-BKO +polyhedralsurface|0|MultiPoint|0|KO-BKO +polyhedralsurface|0|MultiLineString|0|KO-BKO +polyhedralsurface|0|MultiPolygon|0|KO-BKO +polyhedralsurface|0|GeometryCollection|0|KO-BKO +polyhedralsurface|0|CircularString|0|KO-BKO +polyhedralsurface|0|CompoundCurve|0|KO-BKO +polyhedralsurface|0|CurvePolygon|0|KO-BKO +polyhedralsurface|0|MultiCurve|0|KO-BKO +polyhedralsurface|0|MultiSurface|0|KO-BKO +polyhedralsurface|0|PolyhedralSurface|0|OK-BOK +polyhedralsurface|0|Triangle|0|KO-BKO +polyhedralsurface|0|Tin|0|KO-BKO +polyhedralsurface|0|Point|2|KO-BKO +polyhedralsurface|0|LineString|2|KO-BKO +polyhedralsurface|0|Polygon|2|KO-BKO +polyhedralsurface|0|MultiPoint|2|KO-BKO +polyhedralsurface|0|MultiLineString|2|KO-BKO +polyhedralsurface|0|MultiPolygon|2|KO-BKO +polyhedralsurface|0|GeometryCollection|2|KO-BKO +polyhedralsurface|0|CircularString|2|KO-BKO +polyhedralsurface|0|CompoundCurve|2|KO-BKO +polyhedralsurface|0|CurvePolygon|2|KO-BKO +polyhedralsurface|0|MultiCurve|2|KO-BKO +polyhedralsurface|0|MultiSurface|2|KO-BKO +polyhedralsurface|0|PolyhedralSurface|2|KO-BKO +polyhedralsurface|0|Triangle|2|KO-BKO +polyhedralsurface|0|Point|1|KO-BKO +polyhedralsurface|0|LineString|1|KO-BKO +polyhedralsurface|0|Polygon|1|KO-BKO +polyhedralsurface|0|MultiPoint|1|KO-BKO +polyhedralsurface|0|MultiLineString|1|KO-BKO +polyhedralsurface|0|MultiPolygon|1|KO-BKO +polyhedralsurface|0|GeometryCollection|1|KO-BKO +polyhedralsurface|0|CircularString|1|KO-BKO +polyhedralsurface|0|CompoundCurve|1|KO-BKO +polyhedralsurface|0|CurvePolygon|1|KO-BKO +polyhedralsurface|0|MultiCurve|1|KO-BKO +polyhedralsurface|0|MultiSurface|1|KO-BKO +polyhedralsurface|0|PolyhedralSurface|1|KO-BKO +polyhedralsurface|0|Triangle|1|KO-BKO +polyhedralsurface|0|Point|3|KO-BKO +polyhedralsurface|0|LineString|3|KO-BKO +polyhedralsurface|0|Polygon|3|KO-BKO +polyhedralsurface|0|MultiPoint|3|KO-BKO +polyhedralsurface|0|MultiLineString|3|KO-BKO +polyhedralsurface|0|MultiPolygon|3|KO-BKO +polyhedralsurface|0|GeometryCollection|3|KO-BKO +polyhedralsurface|0|CircularString|3|KO-BKO +polyhedralsurface|0|CompoundCurve|3|KO-BKO +polyhedralsurface|0|CurvePolygon|3|KO-BKO +polyhedralsurface|0|MultiCurve|3|KO-BKO +polyhedralsurface|0|MultiSurface|3|KO-BKO +polyhedralsurface|0|PolyhedralSurface|3|KO-BKO +polyhedralsurface|0|Triangle|3|KO-BKO +polyhedralsurface|4326|Point|0|KO-BKO +polyhedralsurface|4326|LineString|0|KO-BKO +polyhedralsurface|4326|Polygon|0|KO-BKO +polyhedralsurface|4326|MultiPoint|0|KO-BKO +polyhedralsurface|4326|MultiLineString|0|KO-BKO +polyhedralsurface|4326|MultiPolygon|0|KO-BKO +polyhedralsurface|4326|GeometryCollection|0|KO-BKO +polyhedralsurface|4326|CircularString|0|KO-BKO +polyhedralsurface|4326|CompoundCurve|0|KO-BKO +polyhedralsurface|4326|CurvePolygon|0|KO-BKO +polyhedralsurface|4326|MultiCurve|0|KO-BKO +polyhedralsurface|4326|MultiSurface|0|KO-BKO +polyhedralsurface|4326|PolyhedralSurface|0|OK-BOK +polyhedralsurface|4326|Triangle|0|KO-BKO +polyhedralsurface|4326|Tin|0|KO-BKO +polyhedralsurface|4326|Point|2|KO-BKO +polyhedralsurface|4326|LineString|2|KO-BKO +polyhedralsurface|4326|Polygon|2|KO-BKO +polyhedralsurface|4326|MultiPoint|2|KO-BKO +polyhedralsurface|4326|MultiLineString|2|KO-BKO +polyhedralsurface|4326|MultiPolygon|2|KO-BKO +polyhedralsurface|4326|GeometryCollection|2|KO-BKO +polyhedralsurface|4326|CircularString|2|KO-BKO +polyhedralsurface|4326|CompoundCurve|2|KO-BKO +polyhedralsurface|4326|CurvePolygon|2|KO-BKO +polyhedralsurface|4326|MultiCurve|2|KO-BKO +polyhedralsurface|4326|MultiSurface|2|KO-BKO +polyhedralsurface|4326|PolyhedralSurface|2|KO-BKO +polyhedralsurface|4326|Triangle|2|KO-BKO +polyhedralsurface|4326|Point|1|KO-BKO +polyhedralsurface|4326|LineString|1|KO-BKO +polyhedralsurface|4326|Polygon|1|KO-BKO +polyhedralsurface|4326|MultiPoint|1|KO-BKO +polyhedralsurface|4326|MultiLineString|1|KO-BKO +polyhedralsurface|4326|MultiPolygon|1|KO-BKO +polyhedralsurface|4326|GeometryCollection|1|KO-BKO +polyhedralsurface|4326|CircularString|1|KO-BKO +polyhedralsurface|4326|CompoundCurve|1|KO-BKO +polyhedralsurface|4326|CurvePolygon|1|KO-BKO +polyhedralsurface|4326|MultiCurve|1|KO-BKO +polyhedralsurface|4326|MultiSurface|1|KO-BKO +polyhedralsurface|4326|PolyhedralSurface|1|KO-BKO +polyhedralsurface|4326|Triangle|1|KO-BKO +polyhedralsurface|4326|Point|3|KO-BKO +polyhedralsurface|4326|LineString|3|KO-BKO +polyhedralsurface|4326|Polygon|3|KO-BKO +polyhedralsurface|4326|MultiPoint|3|KO-BKO +polyhedralsurface|4326|MultiLineString|3|KO-BKO +polyhedralsurface|4326|MultiPolygon|3|KO-BKO +polyhedralsurface|4326|GeometryCollection|3|KO-BKO +polyhedralsurface|4326|CircularString|3|KO-BKO +polyhedralsurface|4326|CompoundCurve|3|KO-BKO +polyhedralsurface|4326|CurvePolygon|3|KO-BKO +polyhedralsurface|4326|MultiCurve|3|KO-BKO +polyhedralsurface|4326|MultiSurface|3|KO-BKO +polyhedralsurface|4326|PolyhedralSurface|3|KO-BKO +polyhedralsurface|4326|Triangle|3|KO-BKO +polyhedralsurface||COUNT|4| +polyhedralsurface0|0|Point|0|KO-BKO +polyhedralsurface0|0|LineString|0|KO-BKO +polyhedralsurface0|0|Polygon|0|KO-BKO +polyhedralsurface0|0|MultiPoint|0|KO-BKO +polyhedralsurface0|0|MultiLineString|0|KO-BKO +polyhedralsurface0|0|MultiPolygon|0|KO-BKO +polyhedralsurface0|0|GeometryCollection|0|KO-BKO +polyhedralsurface0|0|CircularString|0|KO-BKO +polyhedralsurface0|0|CompoundCurve|0|KO-BKO +polyhedralsurface0|0|CurvePolygon|0|KO-BKO +polyhedralsurface0|0|MultiCurve|0|KO-BKO +polyhedralsurface0|0|MultiSurface|0|KO-BKO +polyhedralsurface0|0|PolyhedralSurface|0|OK-BOK +polyhedralsurface0|0|Triangle|0|KO-BKO +polyhedralsurface0|0|Tin|0|KO-BKO +polyhedralsurface0|0|Point|2|KO-BKO +polyhedralsurface0|0|LineString|2|KO-BKO +polyhedralsurface0|0|Polygon|2|KO-BKO +polyhedralsurface0|0|MultiPoint|2|KO-BKO +polyhedralsurface0|0|MultiLineString|2|KO-BKO +polyhedralsurface0|0|MultiPolygon|2|KO-BKO +polyhedralsurface0|0|GeometryCollection|2|KO-BKO +polyhedralsurface0|0|CircularString|2|KO-BKO +polyhedralsurface0|0|CompoundCurve|2|KO-BKO +polyhedralsurface0|0|CurvePolygon|2|KO-BKO +polyhedralsurface0|0|MultiCurve|2|KO-BKO +polyhedralsurface0|0|MultiSurface|2|KO-BKO +polyhedralsurface0|0|PolyhedralSurface|2|KO-BKO +polyhedralsurface0|0|Triangle|2|KO-BKO +polyhedralsurface0|0|Point|1|KO-BKO +polyhedralsurface0|0|LineString|1|KO-BKO +polyhedralsurface0|0|Polygon|1|KO-BKO +polyhedralsurface0|0|MultiPoint|1|KO-BKO +polyhedralsurface0|0|MultiLineString|1|KO-BKO +polyhedralsurface0|0|MultiPolygon|1|KO-BKO +polyhedralsurface0|0|GeometryCollection|1|KO-BKO +polyhedralsurface0|0|CircularString|1|KO-BKO +polyhedralsurface0|0|CompoundCurve|1|KO-BKO +polyhedralsurface0|0|CurvePolygon|1|KO-BKO +polyhedralsurface0|0|MultiCurve|1|KO-BKO +polyhedralsurface0|0|MultiSurface|1|KO-BKO +polyhedralsurface0|0|PolyhedralSurface|1|KO-BKO +polyhedralsurface0|0|Triangle|1|KO-BKO +polyhedralsurface0|0|Point|3|KO-BKO +polyhedralsurface0|0|LineString|3|KO-BKO +polyhedralsurface0|0|Polygon|3|KO-BKO +polyhedralsurface0|0|MultiPoint|3|KO-BKO +polyhedralsurface0|0|MultiLineString|3|KO-BKO +polyhedralsurface0|0|MultiPolygon|3|KO-BKO +polyhedralsurface0|0|GeometryCollection|3|KO-BKO +polyhedralsurface0|0|CircularString|3|KO-BKO +polyhedralsurface0|0|CompoundCurve|3|KO-BKO +polyhedralsurface0|0|CurvePolygon|3|KO-BKO +polyhedralsurface0|0|MultiCurve|3|KO-BKO +polyhedralsurface0|0|MultiSurface|3|KO-BKO +polyhedralsurface0|0|PolyhedralSurface|3|KO-BKO +polyhedralsurface0|0|Triangle|3|KO-BKO +polyhedralsurface0|4326|Point|0|KO-BKO +polyhedralsurface0|4326|LineString|0|KO-BKO +polyhedralsurface0|4326|Polygon|0|KO-BKO +polyhedralsurface0|4326|MultiPoint|0|KO-BKO +polyhedralsurface0|4326|MultiLineString|0|KO-BKO +polyhedralsurface0|4326|MultiPolygon|0|KO-BKO +polyhedralsurface0|4326|GeometryCollection|0|KO-BKO +polyhedralsurface0|4326|CircularString|0|KO-BKO +polyhedralsurface0|4326|CompoundCurve|0|KO-BKO +polyhedralsurface0|4326|CurvePolygon|0|KO-BKO +polyhedralsurface0|4326|MultiCurve|0|KO-BKO +polyhedralsurface0|4326|MultiSurface|0|KO-BKO +polyhedralsurface0|4326|PolyhedralSurface|0|OK-BOK +polyhedralsurface0|4326|Triangle|0|KO-BKO +polyhedralsurface0|4326|Tin|0|KO-BKO +polyhedralsurface0|4326|Point|2|KO-BKO +polyhedralsurface0|4326|LineString|2|KO-BKO +polyhedralsurface0|4326|Polygon|2|KO-BKO +polyhedralsurface0|4326|MultiPoint|2|KO-BKO +polyhedralsurface0|4326|MultiLineString|2|KO-BKO +polyhedralsurface0|4326|MultiPolygon|2|KO-BKO +polyhedralsurface0|4326|GeometryCollection|2|KO-BKO +polyhedralsurface0|4326|CircularString|2|KO-BKO +polyhedralsurface0|4326|CompoundCurve|2|KO-BKO +polyhedralsurface0|4326|CurvePolygon|2|KO-BKO +polyhedralsurface0|4326|MultiCurve|2|KO-BKO +polyhedralsurface0|4326|MultiSurface|2|KO-BKO +polyhedralsurface0|4326|PolyhedralSurface|2|KO-BKO +polyhedralsurface0|4326|Triangle|2|KO-BKO +polyhedralsurface0|4326|Point|1|KO-BKO +polyhedralsurface0|4326|LineString|1|KO-BKO +polyhedralsurface0|4326|Polygon|1|KO-BKO +polyhedralsurface0|4326|MultiPoint|1|KO-BKO +polyhedralsurface0|4326|MultiLineString|1|KO-BKO +polyhedralsurface0|4326|MultiPolygon|1|KO-BKO +polyhedralsurface0|4326|GeometryCollection|1|KO-BKO +polyhedralsurface0|4326|CircularString|1|KO-BKO +polyhedralsurface0|4326|CompoundCurve|1|KO-BKO +polyhedralsurface0|4326|CurvePolygon|1|KO-BKO +polyhedralsurface0|4326|MultiCurve|1|KO-BKO +polyhedralsurface0|4326|MultiSurface|1|KO-BKO +polyhedralsurface0|4326|PolyhedralSurface|1|KO-BKO +polyhedralsurface0|4326|Triangle|1|KO-BKO +polyhedralsurface0|4326|Point|3|KO-BKO +polyhedralsurface0|4326|LineString|3|KO-BKO +polyhedralsurface0|4326|Polygon|3|KO-BKO +polyhedralsurface0|4326|MultiPoint|3|KO-BKO +polyhedralsurface0|4326|MultiLineString|3|KO-BKO +polyhedralsurface0|4326|MultiPolygon|3|KO-BKO +polyhedralsurface0|4326|GeometryCollection|3|KO-BKO +polyhedralsurface0|4326|CircularString|3|KO-BKO +polyhedralsurface0|4326|CompoundCurve|3|KO-BKO +polyhedralsurface0|4326|CurvePolygon|3|KO-BKO +polyhedralsurface0|4326|MultiCurve|3|KO-BKO +polyhedralsurface0|4326|MultiSurface|3|KO-BKO +polyhedralsurface0|4326|PolyhedralSurface|3|KO-BKO +polyhedralsurface0|4326|Triangle|3|KO-BKO +polyhedralsurface0||COUNT|4| +polyhedralsurface4326|0|Point|0|KO-BKO +polyhedralsurface4326|0|LineString|0|KO-BKO +polyhedralsurface4326|0|Polygon|0|KO-BKO +polyhedralsurface4326|0|MultiPoint|0|KO-BKO +polyhedralsurface4326|0|MultiLineString|0|KO-BKO +polyhedralsurface4326|0|MultiPolygon|0|KO-BKO +polyhedralsurface4326|0|GeometryCollection|0|KO-BKO +polyhedralsurface4326|0|CircularString|0|KO-BKO +polyhedralsurface4326|0|CompoundCurve|0|KO-BKO +polyhedralsurface4326|0|CurvePolygon|0|KO-BKO +polyhedralsurface4326|0|MultiCurve|0|KO-BKO +polyhedralsurface4326|0|MultiSurface|0|KO-BKO +polyhedralsurface4326|0|PolyhedralSurface|0|KO-BKO +polyhedralsurface4326|0|Triangle|0|KO-BKO +polyhedralsurface4326|0|Tin|0|KO-BKO +polyhedralsurface4326|0|Point|2|KO-BKO +polyhedralsurface4326|0|LineString|2|KO-BKO +polyhedralsurface4326|0|Polygon|2|KO-BKO +polyhedralsurface4326|0|MultiPoint|2|KO-BKO +polyhedralsurface4326|0|MultiLineString|2|KO-BKO +polyhedralsurface4326|0|MultiPolygon|2|KO-BKO +polyhedralsurface4326|0|GeometryCollection|2|KO-BKO +polyhedralsurface4326|0|CircularString|2|KO-BKO +polyhedralsurface4326|0|CompoundCurve|2|KO-BKO +polyhedralsurface4326|0|CurvePolygon|2|KO-BKO +polyhedralsurface4326|0|MultiCurve|2|KO-BKO +polyhedralsurface4326|0|MultiSurface|2|KO-BKO +polyhedralsurface4326|0|PolyhedralSurface|2|KO-BKO +polyhedralsurface4326|0|Triangle|2|KO-BKO +polyhedralsurface4326|0|Point|1|KO-BKO +polyhedralsurface4326|0|LineString|1|KO-BKO +polyhedralsurface4326|0|Polygon|1|KO-BKO +polyhedralsurface4326|0|MultiPoint|1|KO-BKO +polyhedralsurface4326|0|MultiLineString|1|KO-BKO +polyhedralsurface4326|0|MultiPolygon|1|KO-BKO +polyhedralsurface4326|0|GeometryCollection|1|KO-BKO +polyhedralsurface4326|0|CircularString|1|KO-BKO +polyhedralsurface4326|0|CompoundCurve|1|KO-BKO +polyhedralsurface4326|0|CurvePolygon|1|KO-BKO +polyhedralsurface4326|0|MultiCurve|1|KO-BKO +polyhedralsurface4326|0|MultiSurface|1|KO-BKO +polyhedralsurface4326|0|PolyhedralSurface|1|KO-BKO +polyhedralsurface4326|0|Triangle|1|KO-BKO +polyhedralsurface4326|0|Point|3|KO-BKO +polyhedralsurface4326|0|LineString|3|KO-BKO +polyhedralsurface4326|0|Polygon|3|KO-BKO +polyhedralsurface4326|0|MultiPoint|3|KO-BKO +polyhedralsurface4326|0|MultiLineString|3|KO-BKO +polyhedralsurface4326|0|MultiPolygon|3|KO-BKO +polyhedralsurface4326|0|GeometryCollection|3|KO-BKO +polyhedralsurface4326|0|CircularString|3|KO-BKO +polyhedralsurface4326|0|CompoundCurve|3|KO-BKO +polyhedralsurface4326|0|CurvePolygon|3|KO-BKO +polyhedralsurface4326|0|MultiCurve|3|KO-BKO +polyhedralsurface4326|0|MultiSurface|3|KO-BKO +polyhedralsurface4326|0|PolyhedralSurface|3|KO-BKO +polyhedralsurface4326|0|Triangle|3|KO-BKO +polyhedralsurface4326|4326|Point|0|KO-BKO +polyhedralsurface4326|4326|LineString|0|KO-BKO +polyhedralsurface4326|4326|Polygon|0|KO-BKO +polyhedralsurface4326|4326|MultiPoint|0|KO-BKO +polyhedralsurface4326|4326|MultiLineString|0|KO-BKO +polyhedralsurface4326|4326|MultiPolygon|0|KO-BKO +polyhedralsurface4326|4326|GeometryCollection|0|KO-BKO +polyhedralsurface4326|4326|CircularString|0|KO-BKO +polyhedralsurface4326|4326|CompoundCurve|0|KO-BKO +polyhedralsurface4326|4326|CurvePolygon|0|KO-BKO +polyhedralsurface4326|4326|MultiCurve|0|KO-BKO +polyhedralsurface4326|4326|MultiSurface|0|KO-BKO +polyhedralsurface4326|4326|PolyhedralSurface|0|OK-BOK +polyhedralsurface4326|4326|Triangle|0|KO-BKO +polyhedralsurface4326|4326|Tin|0|KO-BKO +polyhedralsurface4326|4326|Point|2|KO-BKO +polyhedralsurface4326|4326|LineString|2|KO-BKO +polyhedralsurface4326|4326|Polygon|2|KO-BKO +polyhedralsurface4326|4326|MultiPoint|2|KO-BKO +polyhedralsurface4326|4326|MultiLineString|2|KO-BKO +polyhedralsurface4326|4326|MultiPolygon|2|KO-BKO +polyhedralsurface4326|4326|GeometryCollection|2|KO-BKO +polyhedralsurface4326|4326|CircularString|2|KO-BKO +polyhedralsurface4326|4326|CompoundCurve|2|KO-BKO +polyhedralsurface4326|4326|CurvePolygon|2|KO-BKO +polyhedralsurface4326|4326|MultiCurve|2|KO-BKO +polyhedralsurface4326|4326|MultiSurface|2|KO-BKO +polyhedralsurface4326|4326|PolyhedralSurface|2|KO-BKO +polyhedralsurface4326|4326|Triangle|2|KO-BKO +polyhedralsurface4326|4326|Point|1|KO-BKO +polyhedralsurface4326|4326|LineString|1|KO-BKO +polyhedralsurface4326|4326|Polygon|1|KO-BKO +polyhedralsurface4326|4326|MultiPoint|1|KO-BKO +polyhedralsurface4326|4326|MultiLineString|1|KO-BKO +polyhedralsurface4326|4326|MultiPolygon|1|KO-BKO +polyhedralsurface4326|4326|GeometryCollection|1|KO-BKO +polyhedralsurface4326|4326|CircularString|1|KO-BKO +polyhedralsurface4326|4326|CompoundCurve|1|KO-BKO +polyhedralsurface4326|4326|CurvePolygon|1|KO-BKO +polyhedralsurface4326|4326|MultiCurve|1|KO-BKO +polyhedralsurface4326|4326|MultiSurface|1|KO-BKO +polyhedralsurface4326|4326|PolyhedralSurface|1|KO-BKO +polyhedralsurface4326|4326|Triangle|1|KO-BKO +polyhedralsurface4326|4326|Point|3|KO-BKO +polyhedralsurface4326|4326|LineString|3|KO-BKO +polyhedralsurface4326|4326|Polygon|3|KO-BKO +polyhedralsurface4326|4326|MultiPoint|3|KO-BKO +polyhedralsurface4326|4326|MultiLineString|3|KO-BKO +polyhedralsurface4326|4326|MultiPolygon|3|KO-BKO +polyhedralsurface4326|4326|GeometryCollection|3|KO-BKO +polyhedralsurface4326|4326|CircularString|3|KO-BKO +polyhedralsurface4326|4326|CompoundCurve|3|KO-BKO +polyhedralsurface4326|4326|CurvePolygon|3|KO-BKO +polyhedralsurface4326|4326|MultiCurve|3|KO-BKO +polyhedralsurface4326|4326|MultiSurface|3|KO-BKO +polyhedralsurface4326|4326|PolyhedralSurface|3|KO-BKO +polyhedralsurface4326|4326|Triangle|3|KO-BKO +polyhedralsurface4326||COUNT|2| +polyhedralsurfacem|0|Point|0|KO-BKO +polyhedralsurfacem|0|LineString|0|KO-BKO +polyhedralsurfacem|0|Polygon|0|KO-BKO +polyhedralsurfacem|0|MultiPoint|0|KO-BKO +polyhedralsurfacem|0|MultiLineString|0|KO-BKO +polyhedralsurfacem|0|MultiPolygon|0|KO-BKO +polyhedralsurfacem|0|GeometryCollection|0|KO-BKO +polyhedralsurfacem|0|CircularString|0|KO-BKO +polyhedralsurfacem|0|CompoundCurve|0|KO-BKO +polyhedralsurfacem|0|CurvePolygon|0|KO-BKO +polyhedralsurfacem|0|MultiCurve|0|KO-BKO +polyhedralsurfacem|0|MultiSurface|0|KO-BKO +polyhedralsurfacem|0|PolyhedralSurface|0|KO-BKO +polyhedralsurfacem|0|Triangle|0|KO-BKO +polyhedralsurfacem|0|Tin|0|KO-BKO +polyhedralsurfacem|0|Point|2|KO-BKO +polyhedralsurfacem|0|LineString|2|KO-BKO +polyhedralsurfacem|0|Polygon|2|KO-BKO +polyhedralsurfacem|0|MultiPoint|2|KO-BKO +polyhedralsurfacem|0|MultiLineString|2|KO-BKO +polyhedralsurfacem|0|MultiPolygon|2|KO-BKO +polyhedralsurfacem|0|GeometryCollection|2|KO-BKO +polyhedralsurfacem|0|CircularString|2|KO-BKO +polyhedralsurfacem|0|CompoundCurve|2|KO-BKO +polyhedralsurfacem|0|CurvePolygon|2|KO-BKO +polyhedralsurfacem|0|MultiCurve|2|KO-BKO +polyhedralsurfacem|0|MultiSurface|2|KO-BKO +polyhedralsurfacem|0|PolyhedralSurface|2|KO-BKO +polyhedralsurfacem|0|Triangle|2|KO-BKO +polyhedralsurfacem|0|Point|1|KO-BKO +polyhedralsurfacem|0|LineString|1|KO-BKO +polyhedralsurfacem|0|Polygon|1|KO-BKO +polyhedralsurfacem|0|MultiPoint|1|KO-BKO +polyhedralsurfacem|0|MultiLineString|1|KO-BKO +polyhedralsurfacem|0|MultiPolygon|1|KO-BKO +polyhedralsurfacem|0|GeometryCollection|1|KO-BKO +polyhedralsurfacem|0|CircularString|1|KO-BKO +polyhedralsurfacem|0|CompoundCurve|1|KO-BKO +polyhedralsurfacem|0|CurvePolygon|1|KO-BKO +polyhedralsurfacem|0|MultiCurve|1|KO-BKO +polyhedralsurfacem|0|MultiSurface|1|KO-BKO +polyhedralsurfacem|0|PolyhedralSurface|1|OK-BOK +polyhedralsurfacem|0|Triangle|1|KO-BKO +polyhedralsurfacem|0|Point|3|KO-BKO +polyhedralsurfacem|0|LineString|3|KO-BKO +polyhedralsurfacem|0|Polygon|3|KO-BKO +polyhedralsurfacem|0|MultiPoint|3|KO-BKO +polyhedralsurfacem|0|MultiLineString|3|KO-BKO +polyhedralsurfacem|0|MultiPolygon|3|KO-BKO +polyhedralsurfacem|0|GeometryCollection|3|KO-BKO +polyhedralsurfacem|0|CircularString|3|KO-BKO +polyhedralsurfacem|0|CompoundCurve|3|KO-BKO +polyhedralsurfacem|0|CurvePolygon|3|KO-BKO +polyhedralsurfacem|0|MultiCurve|3|KO-BKO +polyhedralsurfacem|0|MultiSurface|3|KO-BKO +polyhedralsurfacem|0|PolyhedralSurface|3|KO-BKO +polyhedralsurfacem|0|Triangle|3|KO-BKO +polyhedralsurfacem|4326|Point|0|KO-BKO +polyhedralsurfacem|4326|LineString|0|KO-BKO +polyhedralsurfacem|4326|Polygon|0|KO-BKO +polyhedralsurfacem|4326|MultiPoint|0|KO-BKO +polyhedralsurfacem|4326|MultiLineString|0|KO-BKO +polyhedralsurfacem|4326|MultiPolygon|0|KO-BKO +polyhedralsurfacem|4326|GeometryCollection|0|KO-BKO +polyhedralsurfacem|4326|CircularString|0|KO-BKO +polyhedralsurfacem|4326|CompoundCurve|0|KO-BKO +polyhedralsurfacem|4326|CurvePolygon|0|KO-BKO +polyhedralsurfacem|4326|MultiCurve|0|KO-BKO +polyhedralsurfacem|4326|MultiSurface|0|KO-BKO +polyhedralsurfacem|4326|PolyhedralSurface|0|KO-BKO +polyhedralsurfacem|4326|Triangle|0|KO-BKO +polyhedralsurfacem|4326|Tin|0|KO-BKO +polyhedralsurfacem|4326|Point|2|KO-BKO +polyhedralsurfacem|4326|LineString|2|KO-BKO +polyhedralsurfacem|4326|Polygon|2|KO-BKO +polyhedralsurfacem|4326|MultiPoint|2|KO-BKO +polyhedralsurfacem|4326|MultiLineString|2|KO-BKO +polyhedralsurfacem|4326|MultiPolygon|2|KO-BKO +polyhedralsurfacem|4326|GeometryCollection|2|KO-BKO +polyhedralsurfacem|4326|CircularString|2|KO-BKO +polyhedralsurfacem|4326|CompoundCurve|2|KO-BKO +polyhedralsurfacem|4326|CurvePolygon|2|KO-BKO +polyhedralsurfacem|4326|MultiCurve|2|KO-BKO +polyhedralsurfacem|4326|MultiSurface|2|KO-BKO +polyhedralsurfacem|4326|PolyhedralSurface|2|KO-BKO +polyhedralsurfacem|4326|Triangle|2|KO-BKO +polyhedralsurfacem|4326|Point|1|KO-BKO +polyhedralsurfacem|4326|LineString|1|KO-BKO +polyhedralsurfacem|4326|Polygon|1|KO-BKO +polyhedralsurfacem|4326|MultiPoint|1|KO-BKO +polyhedralsurfacem|4326|MultiLineString|1|KO-BKO +polyhedralsurfacem|4326|MultiPolygon|1|KO-BKO +polyhedralsurfacem|4326|GeometryCollection|1|KO-BKO +polyhedralsurfacem|4326|CircularString|1|KO-BKO +polyhedralsurfacem|4326|CompoundCurve|1|KO-BKO +polyhedralsurfacem|4326|CurvePolygon|1|KO-BKO +polyhedralsurfacem|4326|MultiCurve|1|KO-BKO +polyhedralsurfacem|4326|MultiSurface|1|KO-BKO +polyhedralsurfacem|4326|PolyhedralSurface|1|OK-BOK +polyhedralsurfacem|4326|Triangle|1|KO-BKO +polyhedralsurfacem|4326|Point|3|KO-BKO +polyhedralsurfacem|4326|LineString|3|KO-BKO +polyhedralsurfacem|4326|Polygon|3|KO-BKO +polyhedralsurfacem|4326|MultiPoint|3|KO-BKO +polyhedralsurfacem|4326|MultiLineString|3|KO-BKO +polyhedralsurfacem|4326|MultiPolygon|3|KO-BKO +polyhedralsurfacem|4326|GeometryCollection|3|KO-BKO +polyhedralsurfacem|4326|CircularString|3|KO-BKO +polyhedralsurfacem|4326|CompoundCurve|3|KO-BKO +polyhedralsurfacem|4326|CurvePolygon|3|KO-BKO +polyhedralsurfacem|4326|MultiCurve|3|KO-BKO +polyhedralsurfacem|4326|MultiSurface|3|KO-BKO +polyhedralsurfacem|4326|PolyhedralSurface|3|KO-BKO +polyhedralsurfacem|4326|Triangle|3|KO-BKO +polyhedralsurfacem||COUNT|4| +polyhedralsurfacem0|0|Point|0|KO-BKO +polyhedralsurfacem0|0|LineString|0|KO-BKO +polyhedralsurfacem0|0|Polygon|0|KO-BKO +polyhedralsurfacem0|0|MultiPoint|0|KO-BKO +polyhedralsurfacem0|0|MultiLineString|0|KO-BKO +polyhedralsurfacem0|0|MultiPolygon|0|KO-BKO +polyhedralsurfacem0|0|GeometryCollection|0|KO-BKO +polyhedralsurfacem0|0|CircularString|0|KO-BKO +polyhedralsurfacem0|0|CompoundCurve|0|KO-BKO +polyhedralsurfacem0|0|CurvePolygon|0|KO-BKO +polyhedralsurfacem0|0|MultiCurve|0|KO-BKO +polyhedralsurfacem0|0|MultiSurface|0|KO-BKO +polyhedralsurfacem0|0|PolyhedralSurface|0|KO-BKO +polyhedralsurfacem0|0|Triangle|0|KO-BKO +polyhedralsurfacem0|0|Tin|0|KO-BKO +polyhedralsurfacem0|0|Point|2|KO-BKO +polyhedralsurfacem0|0|LineString|2|KO-BKO +polyhedralsurfacem0|0|Polygon|2|KO-BKO +polyhedralsurfacem0|0|MultiPoint|2|KO-BKO +polyhedralsurfacem0|0|MultiLineString|2|KO-BKO +polyhedralsurfacem0|0|MultiPolygon|2|KO-BKO +polyhedralsurfacem0|0|GeometryCollection|2|KO-BKO +polyhedralsurfacem0|0|CircularString|2|KO-BKO +polyhedralsurfacem0|0|CompoundCurve|2|KO-BKO +polyhedralsurfacem0|0|CurvePolygon|2|KO-BKO +polyhedralsurfacem0|0|MultiCurve|2|KO-BKO +polyhedralsurfacem0|0|MultiSurface|2|KO-BKO +polyhedralsurfacem0|0|PolyhedralSurface|2|KO-BKO +polyhedralsurfacem0|0|Triangle|2|KO-BKO +polyhedralsurfacem0|0|Point|1|KO-BKO +polyhedralsurfacem0|0|LineString|1|KO-BKO +polyhedralsurfacem0|0|Polygon|1|KO-BKO +polyhedralsurfacem0|0|MultiPoint|1|KO-BKO +polyhedralsurfacem0|0|MultiLineString|1|KO-BKO +polyhedralsurfacem0|0|MultiPolygon|1|KO-BKO +polyhedralsurfacem0|0|GeometryCollection|1|KO-BKO +polyhedralsurfacem0|0|CircularString|1|KO-BKO +polyhedralsurfacem0|0|CompoundCurve|1|KO-BKO +polyhedralsurfacem0|0|CurvePolygon|1|KO-BKO +polyhedralsurfacem0|0|MultiCurve|1|KO-BKO +polyhedralsurfacem0|0|MultiSurface|1|KO-BKO +polyhedralsurfacem0|0|PolyhedralSurface|1|OK-BOK +polyhedralsurfacem0|0|Triangle|1|KO-BKO +polyhedralsurfacem0|0|Point|3|KO-BKO +polyhedralsurfacem0|0|LineString|3|KO-BKO +polyhedralsurfacem0|0|Polygon|3|KO-BKO +polyhedralsurfacem0|0|MultiPoint|3|KO-BKO +polyhedralsurfacem0|0|MultiLineString|3|KO-BKO +polyhedralsurfacem0|0|MultiPolygon|3|KO-BKO +polyhedralsurfacem0|0|GeometryCollection|3|KO-BKO +polyhedralsurfacem0|0|CircularString|3|KO-BKO +polyhedralsurfacem0|0|CompoundCurve|3|KO-BKO +polyhedralsurfacem0|0|CurvePolygon|3|KO-BKO +polyhedralsurfacem0|0|MultiCurve|3|KO-BKO +polyhedralsurfacem0|0|MultiSurface|3|KO-BKO +polyhedralsurfacem0|0|PolyhedralSurface|3|KO-BKO +polyhedralsurfacem0|0|Triangle|3|KO-BKO +polyhedralsurfacem0|4326|Point|0|KO-BKO +polyhedralsurfacem0|4326|LineString|0|KO-BKO +polyhedralsurfacem0|4326|Polygon|0|KO-BKO +polyhedralsurfacem0|4326|MultiPoint|0|KO-BKO +polyhedralsurfacem0|4326|MultiLineString|0|KO-BKO +polyhedralsurfacem0|4326|MultiPolygon|0|KO-BKO +polyhedralsurfacem0|4326|GeometryCollection|0|KO-BKO +polyhedralsurfacem0|4326|CircularString|0|KO-BKO +polyhedralsurfacem0|4326|CompoundCurve|0|KO-BKO +polyhedralsurfacem0|4326|CurvePolygon|0|KO-BKO +polyhedralsurfacem0|4326|MultiCurve|0|KO-BKO +polyhedralsurfacem0|4326|MultiSurface|0|KO-BKO +polyhedralsurfacem0|4326|PolyhedralSurface|0|KO-BKO +polyhedralsurfacem0|4326|Triangle|0|KO-BKO +polyhedralsurfacem0|4326|Tin|0|KO-BKO +polyhedralsurfacem0|4326|Point|2|KO-BKO +polyhedralsurfacem0|4326|LineString|2|KO-BKO +polyhedralsurfacem0|4326|Polygon|2|KO-BKO +polyhedralsurfacem0|4326|MultiPoint|2|KO-BKO +polyhedralsurfacem0|4326|MultiLineString|2|KO-BKO +polyhedralsurfacem0|4326|MultiPolygon|2|KO-BKO +polyhedralsurfacem0|4326|GeometryCollection|2|KO-BKO +polyhedralsurfacem0|4326|CircularString|2|KO-BKO +polyhedralsurfacem0|4326|CompoundCurve|2|KO-BKO +polyhedralsurfacem0|4326|CurvePolygon|2|KO-BKO +polyhedralsurfacem0|4326|MultiCurve|2|KO-BKO +polyhedralsurfacem0|4326|MultiSurface|2|KO-BKO +polyhedralsurfacem0|4326|PolyhedralSurface|2|KO-BKO +polyhedralsurfacem0|4326|Triangle|2|KO-BKO +polyhedralsurfacem0|4326|Point|1|KO-BKO +polyhedralsurfacem0|4326|LineString|1|KO-BKO +polyhedralsurfacem0|4326|Polygon|1|KO-BKO +polyhedralsurfacem0|4326|MultiPoint|1|KO-BKO +polyhedralsurfacem0|4326|MultiLineString|1|KO-BKO +polyhedralsurfacem0|4326|MultiPolygon|1|KO-BKO +polyhedralsurfacem0|4326|GeometryCollection|1|KO-BKO +polyhedralsurfacem0|4326|CircularString|1|KO-BKO +polyhedralsurfacem0|4326|CompoundCurve|1|KO-BKO +polyhedralsurfacem0|4326|CurvePolygon|1|KO-BKO +polyhedralsurfacem0|4326|MultiCurve|1|KO-BKO +polyhedralsurfacem0|4326|MultiSurface|1|KO-BKO +polyhedralsurfacem0|4326|PolyhedralSurface|1|OK-BOK +polyhedralsurfacem0|4326|Triangle|1|KO-BKO +polyhedralsurfacem0|4326|Point|3|KO-BKO +polyhedralsurfacem0|4326|LineString|3|KO-BKO +polyhedralsurfacem0|4326|Polygon|3|KO-BKO +polyhedralsurfacem0|4326|MultiPoint|3|KO-BKO +polyhedralsurfacem0|4326|MultiLineString|3|KO-BKO +polyhedralsurfacem0|4326|MultiPolygon|3|KO-BKO +polyhedralsurfacem0|4326|GeometryCollection|3|KO-BKO +polyhedralsurfacem0|4326|CircularString|3|KO-BKO +polyhedralsurfacem0|4326|CompoundCurve|3|KO-BKO +polyhedralsurfacem0|4326|CurvePolygon|3|KO-BKO +polyhedralsurfacem0|4326|MultiCurve|3|KO-BKO +polyhedralsurfacem0|4326|MultiSurface|3|KO-BKO +polyhedralsurfacem0|4326|PolyhedralSurface|3|KO-BKO +polyhedralsurfacem0|4326|Triangle|3|KO-BKO +polyhedralsurfacem0||COUNT|4| +polyhedralsurfacem4326|0|Point|0|KO-BKO +polyhedralsurfacem4326|0|LineString|0|KO-BKO +polyhedralsurfacem4326|0|Polygon|0|KO-BKO +polyhedralsurfacem4326|0|MultiPoint|0|KO-BKO +polyhedralsurfacem4326|0|MultiLineString|0|KO-BKO +polyhedralsurfacem4326|0|MultiPolygon|0|KO-BKO +polyhedralsurfacem4326|0|GeometryCollection|0|KO-BKO +polyhedralsurfacem4326|0|CircularString|0|KO-BKO +polyhedralsurfacem4326|0|CompoundCurve|0|KO-BKO +polyhedralsurfacem4326|0|CurvePolygon|0|KO-BKO +polyhedralsurfacem4326|0|MultiCurve|0|KO-BKO +polyhedralsurfacem4326|0|MultiSurface|0|KO-BKO +polyhedralsurfacem4326|0|PolyhedralSurface|0|KO-BKO +polyhedralsurfacem4326|0|Triangle|0|KO-BKO +polyhedralsurfacem4326|0|Tin|0|KO-BKO +polyhedralsurfacem4326|0|Point|2|KO-BKO +polyhedralsurfacem4326|0|LineString|2|KO-BKO +polyhedralsurfacem4326|0|Polygon|2|KO-BKO +polyhedralsurfacem4326|0|MultiPoint|2|KO-BKO +polyhedralsurfacem4326|0|MultiLineString|2|KO-BKO +polyhedralsurfacem4326|0|MultiPolygon|2|KO-BKO +polyhedralsurfacem4326|0|GeometryCollection|2|KO-BKO +polyhedralsurfacem4326|0|CircularString|2|KO-BKO +polyhedralsurfacem4326|0|CompoundCurve|2|KO-BKO +polyhedralsurfacem4326|0|CurvePolygon|2|KO-BKO +polyhedralsurfacem4326|0|MultiCurve|2|KO-BKO +polyhedralsurfacem4326|0|MultiSurface|2|KO-BKO +polyhedralsurfacem4326|0|PolyhedralSurface|2|KO-BKO +polyhedralsurfacem4326|0|Triangle|2|KO-BKO +polyhedralsurfacem4326|0|Point|1|KO-BKO +polyhedralsurfacem4326|0|LineString|1|KO-BKO +polyhedralsurfacem4326|0|Polygon|1|KO-BKO +polyhedralsurfacem4326|0|MultiPoint|1|KO-BKO +polyhedralsurfacem4326|0|MultiLineString|1|KO-BKO +polyhedralsurfacem4326|0|MultiPolygon|1|KO-BKO +polyhedralsurfacem4326|0|GeometryCollection|1|KO-BKO +polyhedralsurfacem4326|0|CircularString|1|KO-BKO +polyhedralsurfacem4326|0|CompoundCurve|1|KO-BKO +polyhedralsurfacem4326|0|CurvePolygon|1|KO-BKO +polyhedralsurfacem4326|0|MultiCurve|1|KO-BKO +polyhedralsurfacem4326|0|MultiSurface|1|KO-BKO +polyhedralsurfacem4326|0|PolyhedralSurface|1|KO-BKO +polyhedralsurfacem4326|0|Triangle|1|KO-BKO +polyhedralsurfacem4326|0|Point|3|KO-BKO +polyhedralsurfacem4326|0|LineString|3|KO-BKO +polyhedralsurfacem4326|0|Polygon|3|KO-BKO +polyhedralsurfacem4326|0|MultiPoint|3|KO-BKO +polyhedralsurfacem4326|0|MultiLineString|3|KO-BKO +polyhedralsurfacem4326|0|MultiPolygon|3|KO-BKO +polyhedralsurfacem4326|0|GeometryCollection|3|KO-BKO +polyhedralsurfacem4326|0|CircularString|3|KO-BKO +polyhedralsurfacem4326|0|CompoundCurve|3|KO-BKO +polyhedralsurfacem4326|0|CurvePolygon|3|KO-BKO +polyhedralsurfacem4326|0|MultiCurve|3|KO-BKO +polyhedralsurfacem4326|0|MultiSurface|3|KO-BKO +polyhedralsurfacem4326|0|PolyhedralSurface|3|KO-BKO +polyhedralsurfacem4326|0|Triangle|3|KO-BKO +polyhedralsurfacem4326|4326|Point|0|KO-BKO +polyhedralsurfacem4326|4326|LineString|0|KO-BKO +polyhedralsurfacem4326|4326|Polygon|0|KO-BKO +polyhedralsurfacem4326|4326|MultiPoint|0|KO-BKO +polyhedralsurfacem4326|4326|MultiLineString|0|KO-BKO +polyhedralsurfacem4326|4326|MultiPolygon|0|KO-BKO +polyhedralsurfacem4326|4326|GeometryCollection|0|KO-BKO +polyhedralsurfacem4326|4326|CircularString|0|KO-BKO +polyhedralsurfacem4326|4326|CompoundCurve|0|KO-BKO +polyhedralsurfacem4326|4326|CurvePolygon|0|KO-BKO +polyhedralsurfacem4326|4326|MultiCurve|0|KO-BKO +polyhedralsurfacem4326|4326|MultiSurface|0|KO-BKO +polyhedralsurfacem4326|4326|PolyhedralSurface|0|KO-BKO +polyhedralsurfacem4326|4326|Triangle|0|KO-BKO +polyhedralsurfacem4326|4326|Tin|0|KO-BKO +polyhedralsurfacem4326|4326|Point|2|KO-BKO +polyhedralsurfacem4326|4326|LineString|2|KO-BKO +polyhedralsurfacem4326|4326|Polygon|2|KO-BKO +polyhedralsurfacem4326|4326|MultiPoint|2|KO-BKO +polyhedralsurfacem4326|4326|MultiLineString|2|KO-BKO +polyhedralsurfacem4326|4326|MultiPolygon|2|KO-BKO +polyhedralsurfacem4326|4326|GeometryCollection|2|KO-BKO +polyhedralsurfacem4326|4326|CircularString|2|KO-BKO +polyhedralsurfacem4326|4326|CompoundCurve|2|KO-BKO +polyhedralsurfacem4326|4326|CurvePolygon|2|KO-BKO +polyhedralsurfacem4326|4326|MultiCurve|2|KO-BKO +polyhedralsurfacem4326|4326|MultiSurface|2|KO-BKO +polyhedralsurfacem4326|4326|PolyhedralSurface|2|KO-BKO +polyhedralsurfacem4326|4326|Triangle|2|KO-BKO +polyhedralsurfacem4326|4326|Point|1|KO-BKO +polyhedralsurfacem4326|4326|LineString|1|KO-BKO +polyhedralsurfacem4326|4326|Polygon|1|KO-BKO +polyhedralsurfacem4326|4326|MultiPoint|1|KO-BKO +polyhedralsurfacem4326|4326|MultiLineString|1|KO-BKO +polyhedralsurfacem4326|4326|MultiPolygon|1|KO-BKO +polyhedralsurfacem4326|4326|GeometryCollection|1|KO-BKO +polyhedralsurfacem4326|4326|CircularString|1|KO-BKO +polyhedralsurfacem4326|4326|CompoundCurve|1|KO-BKO +polyhedralsurfacem4326|4326|CurvePolygon|1|KO-BKO +polyhedralsurfacem4326|4326|MultiCurve|1|KO-BKO +polyhedralsurfacem4326|4326|MultiSurface|1|KO-BKO +polyhedralsurfacem4326|4326|PolyhedralSurface|1|OK-BOK +polyhedralsurfacem4326|4326|Triangle|1|KO-BKO +polyhedralsurfacem4326|4326|Point|3|KO-BKO +polyhedralsurfacem4326|4326|LineString|3|KO-BKO +polyhedralsurfacem4326|4326|Polygon|3|KO-BKO +polyhedralsurfacem4326|4326|MultiPoint|3|KO-BKO +polyhedralsurfacem4326|4326|MultiLineString|3|KO-BKO +polyhedralsurfacem4326|4326|MultiPolygon|3|KO-BKO +polyhedralsurfacem4326|4326|GeometryCollection|3|KO-BKO +polyhedralsurfacem4326|4326|CircularString|3|KO-BKO +polyhedralsurfacem4326|4326|CompoundCurve|3|KO-BKO +polyhedralsurfacem4326|4326|CurvePolygon|3|KO-BKO +polyhedralsurfacem4326|4326|MultiCurve|3|KO-BKO +polyhedralsurfacem4326|4326|MultiSurface|3|KO-BKO +polyhedralsurfacem4326|4326|PolyhedralSurface|3|KO-BKO +polyhedralsurfacem4326|4326|Triangle|3|KO-BKO +polyhedralsurfacem4326||COUNT|2| +polyhedralsurfacez|0|Point|0|KO-BKO +polyhedralsurfacez|0|LineString|0|KO-BKO +polyhedralsurfacez|0|Polygon|0|KO-BKO +polyhedralsurfacez|0|MultiPoint|0|KO-BKO +polyhedralsurfacez|0|MultiLineString|0|KO-BKO +polyhedralsurfacez|0|MultiPolygon|0|KO-BKO +polyhedralsurfacez|0|GeometryCollection|0|KO-BKO +polyhedralsurfacez|0|CircularString|0|KO-BKO +polyhedralsurfacez|0|CompoundCurve|0|KO-BKO +polyhedralsurfacez|0|CurvePolygon|0|KO-BKO +polyhedralsurfacez|0|MultiCurve|0|KO-BKO +polyhedralsurfacez|0|MultiSurface|0|KO-BKO +polyhedralsurfacez|0|PolyhedralSurface|0|KO-BKO +polyhedralsurfacez|0|Triangle|0|KO-BKO +polyhedralsurfacez|0|Tin|0|KO-BKO +polyhedralsurfacez|0|Point|2|KO-BKO +polyhedralsurfacez|0|LineString|2|KO-BKO +polyhedralsurfacez|0|Polygon|2|KO-BKO +polyhedralsurfacez|0|MultiPoint|2|KO-BKO +polyhedralsurfacez|0|MultiLineString|2|KO-BKO +polyhedralsurfacez|0|MultiPolygon|2|KO-BKO +polyhedralsurfacez|0|GeometryCollection|2|KO-BKO +polyhedralsurfacez|0|CircularString|2|KO-BKO +polyhedralsurfacez|0|CompoundCurve|2|KO-BKO +polyhedralsurfacez|0|CurvePolygon|2|KO-BKO +polyhedralsurfacez|0|MultiCurve|2|KO-BKO +polyhedralsurfacez|0|MultiSurface|2|KO-BKO +polyhedralsurfacez|0|PolyhedralSurface|2|OK-BOK +polyhedralsurfacez|0|Triangle|2|KO-BKO +polyhedralsurfacez|0|Point|1|KO-BKO +polyhedralsurfacez|0|LineString|1|KO-BKO +polyhedralsurfacez|0|Polygon|1|KO-BKO +polyhedralsurfacez|0|MultiPoint|1|KO-BKO +polyhedralsurfacez|0|MultiLineString|1|KO-BKO +polyhedralsurfacez|0|MultiPolygon|1|KO-BKO +polyhedralsurfacez|0|GeometryCollection|1|KO-BKO +polyhedralsurfacez|0|CircularString|1|KO-BKO +polyhedralsurfacez|0|CompoundCurve|1|KO-BKO +polyhedralsurfacez|0|CurvePolygon|1|KO-BKO +polyhedralsurfacez|0|MultiCurve|1|KO-BKO +polyhedralsurfacez|0|MultiSurface|1|KO-BKO +polyhedralsurfacez|0|PolyhedralSurface|1|KO-BKO +polyhedralsurfacez|0|Triangle|1|KO-BKO +polyhedralsurfacez|0|Point|3|KO-BKO +polyhedralsurfacez|0|LineString|3|KO-BKO +polyhedralsurfacez|0|Polygon|3|KO-BKO +polyhedralsurfacez|0|MultiPoint|3|KO-BKO +polyhedralsurfacez|0|MultiLineString|3|KO-BKO +polyhedralsurfacez|0|MultiPolygon|3|KO-BKO +polyhedralsurfacez|0|GeometryCollection|3|KO-BKO +polyhedralsurfacez|0|CircularString|3|KO-BKO +polyhedralsurfacez|0|CompoundCurve|3|KO-BKO +polyhedralsurfacez|0|CurvePolygon|3|KO-BKO +polyhedralsurfacez|0|MultiCurve|3|KO-BKO +polyhedralsurfacez|0|MultiSurface|3|KO-BKO +polyhedralsurfacez|0|PolyhedralSurface|3|KO-BKO +polyhedralsurfacez|0|Triangle|3|KO-BKO +polyhedralsurfacez|4326|Point|0|KO-BKO +polyhedralsurfacez|4326|LineString|0|KO-BKO +polyhedralsurfacez|4326|Polygon|0|KO-BKO +polyhedralsurfacez|4326|MultiPoint|0|KO-BKO +polyhedralsurfacez|4326|MultiLineString|0|KO-BKO +polyhedralsurfacez|4326|MultiPolygon|0|KO-BKO +polyhedralsurfacez|4326|GeometryCollection|0|KO-BKO +polyhedralsurfacez|4326|CircularString|0|KO-BKO +polyhedralsurfacez|4326|CompoundCurve|0|KO-BKO +polyhedralsurfacez|4326|CurvePolygon|0|KO-BKO +polyhedralsurfacez|4326|MultiCurve|0|KO-BKO +polyhedralsurfacez|4326|MultiSurface|0|KO-BKO +polyhedralsurfacez|4326|PolyhedralSurface|0|KO-BKO +polyhedralsurfacez|4326|Triangle|0|KO-BKO +polyhedralsurfacez|4326|Tin|0|KO-BKO +polyhedralsurfacez|4326|Point|2|KO-BKO +polyhedralsurfacez|4326|LineString|2|KO-BKO +polyhedralsurfacez|4326|Polygon|2|KO-BKO +polyhedralsurfacez|4326|MultiPoint|2|KO-BKO +polyhedralsurfacez|4326|MultiLineString|2|KO-BKO +polyhedralsurfacez|4326|MultiPolygon|2|KO-BKO +polyhedralsurfacez|4326|GeometryCollection|2|KO-BKO +polyhedralsurfacez|4326|CircularString|2|KO-BKO +polyhedralsurfacez|4326|CompoundCurve|2|KO-BKO +polyhedralsurfacez|4326|CurvePolygon|2|KO-BKO +polyhedralsurfacez|4326|MultiCurve|2|KO-BKO +polyhedralsurfacez|4326|MultiSurface|2|KO-BKO +polyhedralsurfacez|4326|PolyhedralSurface|2|OK-BOK +polyhedralsurfacez|4326|Triangle|2|KO-BKO +polyhedralsurfacez|4326|Point|1|KO-BKO +polyhedralsurfacez|4326|LineString|1|KO-BKO +polyhedralsurfacez|4326|Polygon|1|KO-BKO +polyhedralsurfacez|4326|MultiPoint|1|KO-BKO +polyhedralsurfacez|4326|MultiLineString|1|KO-BKO +polyhedralsurfacez|4326|MultiPolygon|1|KO-BKO +polyhedralsurfacez|4326|GeometryCollection|1|KO-BKO +polyhedralsurfacez|4326|CircularString|1|KO-BKO +polyhedralsurfacez|4326|CompoundCurve|1|KO-BKO +polyhedralsurfacez|4326|CurvePolygon|1|KO-BKO +polyhedralsurfacez|4326|MultiCurve|1|KO-BKO +polyhedralsurfacez|4326|MultiSurface|1|KO-BKO +polyhedralsurfacez|4326|PolyhedralSurface|1|KO-BKO +polyhedralsurfacez|4326|Triangle|1|KO-BKO +polyhedralsurfacez|4326|Point|3|KO-BKO +polyhedralsurfacez|4326|LineString|3|KO-BKO +polyhedralsurfacez|4326|Polygon|3|KO-BKO +polyhedralsurfacez|4326|MultiPoint|3|KO-BKO +polyhedralsurfacez|4326|MultiLineString|3|KO-BKO +polyhedralsurfacez|4326|MultiPolygon|3|KO-BKO +polyhedralsurfacez|4326|GeometryCollection|3|KO-BKO +polyhedralsurfacez|4326|CircularString|3|KO-BKO +polyhedralsurfacez|4326|CompoundCurve|3|KO-BKO +polyhedralsurfacez|4326|CurvePolygon|3|KO-BKO +polyhedralsurfacez|4326|MultiCurve|3|KO-BKO +polyhedralsurfacez|4326|MultiSurface|3|KO-BKO +polyhedralsurfacez|4326|PolyhedralSurface|3|KO-BKO +polyhedralsurfacez|4326|Triangle|3|KO-BKO +polyhedralsurfacez||COUNT|4| +polyhedralsurfacez0|0|Point|0|KO-BKO +polyhedralsurfacez0|0|LineString|0|KO-BKO +polyhedralsurfacez0|0|Polygon|0|KO-BKO +polyhedralsurfacez0|0|MultiPoint|0|KO-BKO +polyhedralsurfacez0|0|MultiLineString|0|KO-BKO +polyhedralsurfacez0|0|MultiPolygon|0|KO-BKO +polyhedralsurfacez0|0|GeometryCollection|0|KO-BKO +polyhedralsurfacez0|0|CircularString|0|KO-BKO +polyhedralsurfacez0|0|CompoundCurve|0|KO-BKO +polyhedralsurfacez0|0|CurvePolygon|0|KO-BKO +polyhedralsurfacez0|0|MultiCurve|0|KO-BKO +polyhedralsurfacez0|0|MultiSurface|0|KO-BKO +polyhedralsurfacez0|0|PolyhedralSurface|0|KO-BKO +polyhedralsurfacez0|0|Triangle|0|KO-BKO +polyhedralsurfacez0|0|Tin|0|KO-BKO +polyhedralsurfacez0|0|Point|2|KO-BKO +polyhedralsurfacez0|0|LineString|2|KO-BKO +polyhedralsurfacez0|0|Polygon|2|KO-BKO +polyhedralsurfacez0|0|MultiPoint|2|KO-BKO +polyhedralsurfacez0|0|MultiLineString|2|KO-BKO +polyhedralsurfacez0|0|MultiPolygon|2|KO-BKO +polyhedralsurfacez0|0|GeometryCollection|2|KO-BKO +polyhedralsurfacez0|0|CircularString|2|KO-BKO +polyhedralsurfacez0|0|CompoundCurve|2|KO-BKO +polyhedralsurfacez0|0|CurvePolygon|2|KO-BKO +polyhedralsurfacez0|0|MultiCurve|2|KO-BKO +polyhedralsurfacez0|0|MultiSurface|2|KO-BKO +polyhedralsurfacez0|0|PolyhedralSurface|2|OK-BOK +polyhedralsurfacez0|0|Triangle|2|KO-BKO +polyhedralsurfacez0|0|Point|1|KO-BKO +polyhedralsurfacez0|0|LineString|1|KO-BKO +polyhedralsurfacez0|0|Polygon|1|KO-BKO +polyhedralsurfacez0|0|MultiPoint|1|KO-BKO +polyhedralsurfacez0|0|MultiLineString|1|KO-BKO +polyhedralsurfacez0|0|MultiPolygon|1|KO-BKO +polyhedralsurfacez0|0|GeometryCollection|1|KO-BKO +polyhedralsurfacez0|0|CircularString|1|KO-BKO +polyhedralsurfacez0|0|CompoundCurve|1|KO-BKO +polyhedralsurfacez0|0|CurvePolygon|1|KO-BKO +polyhedralsurfacez0|0|MultiCurve|1|KO-BKO +polyhedralsurfacez0|0|MultiSurface|1|KO-BKO +polyhedralsurfacez0|0|PolyhedralSurface|1|KO-BKO +polyhedralsurfacez0|0|Triangle|1|KO-BKO +polyhedralsurfacez0|0|Point|3|KO-BKO +polyhedralsurfacez0|0|LineString|3|KO-BKO +polyhedralsurfacez0|0|Polygon|3|KO-BKO +polyhedralsurfacez0|0|MultiPoint|3|KO-BKO +polyhedralsurfacez0|0|MultiLineString|3|KO-BKO +polyhedralsurfacez0|0|MultiPolygon|3|KO-BKO +polyhedralsurfacez0|0|GeometryCollection|3|KO-BKO +polyhedralsurfacez0|0|CircularString|3|KO-BKO +polyhedralsurfacez0|0|CompoundCurve|3|KO-BKO +polyhedralsurfacez0|0|CurvePolygon|3|KO-BKO +polyhedralsurfacez0|0|MultiCurve|3|KO-BKO +polyhedralsurfacez0|0|MultiSurface|3|KO-BKO +polyhedralsurfacez0|0|PolyhedralSurface|3|KO-BKO +polyhedralsurfacez0|0|Triangle|3|KO-BKO +polyhedralsurfacez0|4326|Point|0|KO-BKO +polyhedralsurfacez0|4326|LineString|0|KO-BKO +polyhedralsurfacez0|4326|Polygon|0|KO-BKO +polyhedralsurfacez0|4326|MultiPoint|0|KO-BKO +polyhedralsurfacez0|4326|MultiLineString|0|KO-BKO +polyhedralsurfacez0|4326|MultiPolygon|0|KO-BKO +polyhedralsurfacez0|4326|GeometryCollection|0|KO-BKO +polyhedralsurfacez0|4326|CircularString|0|KO-BKO +polyhedralsurfacez0|4326|CompoundCurve|0|KO-BKO +polyhedralsurfacez0|4326|CurvePolygon|0|KO-BKO +polyhedralsurfacez0|4326|MultiCurve|0|KO-BKO +polyhedralsurfacez0|4326|MultiSurface|0|KO-BKO +polyhedralsurfacez0|4326|PolyhedralSurface|0|KO-BKO +polyhedralsurfacez0|4326|Triangle|0|KO-BKO +polyhedralsurfacez0|4326|Tin|0|KO-BKO +polyhedralsurfacez0|4326|Point|2|KO-BKO +polyhedralsurfacez0|4326|LineString|2|KO-BKO +polyhedralsurfacez0|4326|Polygon|2|KO-BKO +polyhedralsurfacez0|4326|MultiPoint|2|KO-BKO +polyhedralsurfacez0|4326|MultiLineString|2|KO-BKO +polyhedralsurfacez0|4326|MultiPolygon|2|KO-BKO +polyhedralsurfacez0|4326|GeometryCollection|2|KO-BKO +polyhedralsurfacez0|4326|CircularString|2|KO-BKO +polyhedralsurfacez0|4326|CompoundCurve|2|KO-BKO +polyhedralsurfacez0|4326|CurvePolygon|2|KO-BKO +polyhedralsurfacez0|4326|MultiCurve|2|KO-BKO +polyhedralsurfacez0|4326|MultiSurface|2|KO-BKO +polyhedralsurfacez0|4326|PolyhedralSurface|2|OK-BOK +polyhedralsurfacez0|4326|Triangle|2|KO-BKO +polyhedralsurfacez0|4326|Point|1|KO-BKO +polyhedralsurfacez0|4326|LineString|1|KO-BKO +polyhedralsurfacez0|4326|Polygon|1|KO-BKO +polyhedralsurfacez0|4326|MultiPoint|1|KO-BKO +polyhedralsurfacez0|4326|MultiLineString|1|KO-BKO +polyhedralsurfacez0|4326|MultiPolygon|1|KO-BKO +polyhedralsurfacez0|4326|GeometryCollection|1|KO-BKO +polyhedralsurfacez0|4326|CircularString|1|KO-BKO +polyhedralsurfacez0|4326|CompoundCurve|1|KO-BKO +polyhedralsurfacez0|4326|CurvePolygon|1|KO-BKO +polyhedralsurfacez0|4326|MultiCurve|1|KO-BKO +polyhedralsurfacez0|4326|MultiSurface|1|KO-BKO +polyhedralsurfacez0|4326|PolyhedralSurface|1|KO-BKO +polyhedralsurfacez0|4326|Triangle|1|KO-BKO +polyhedralsurfacez0|4326|Point|3|KO-BKO +polyhedralsurfacez0|4326|LineString|3|KO-BKO +polyhedralsurfacez0|4326|Polygon|3|KO-BKO +polyhedralsurfacez0|4326|MultiPoint|3|KO-BKO +polyhedralsurfacez0|4326|MultiLineString|3|KO-BKO +polyhedralsurfacez0|4326|MultiPolygon|3|KO-BKO +polyhedralsurfacez0|4326|GeometryCollection|3|KO-BKO +polyhedralsurfacez0|4326|CircularString|3|KO-BKO +polyhedralsurfacez0|4326|CompoundCurve|3|KO-BKO +polyhedralsurfacez0|4326|CurvePolygon|3|KO-BKO +polyhedralsurfacez0|4326|MultiCurve|3|KO-BKO +polyhedralsurfacez0|4326|MultiSurface|3|KO-BKO +polyhedralsurfacez0|4326|PolyhedralSurface|3|KO-BKO +polyhedralsurfacez0|4326|Triangle|3|KO-BKO +polyhedralsurfacez0||COUNT|4| +polyhedralsurfacez4326|0|Point|0|KO-BKO +polyhedralsurfacez4326|0|LineString|0|KO-BKO +polyhedralsurfacez4326|0|Polygon|0|KO-BKO +polyhedralsurfacez4326|0|MultiPoint|0|KO-BKO +polyhedralsurfacez4326|0|MultiLineString|0|KO-BKO +polyhedralsurfacez4326|0|MultiPolygon|0|KO-BKO +polyhedralsurfacez4326|0|GeometryCollection|0|KO-BKO +polyhedralsurfacez4326|0|CircularString|0|KO-BKO +polyhedralsurfacez4326|0|CompoundCurve|0|KO-BKO +polyhedralsurfacez4326|0|CurvePolygon|0|KO-BKO +polyhedralsurfacez4326|0|MultiCurve|0|KO-BKO +polyhedralsurfacez4326|0|MultiSurface|0|KO-BKO +polyhedralsurfacez4326|0|PolyhedralSurface|0|KO-BKO +polyhedralsurfacez4326|0|Triangle|0|KO-BKO +polyhedralsurfacez4326|0|Tin|0|KO-BKO +polyhedralsurfacez4326|0|Point|2|KO-BKO +polyhedralsurfacez4326|0|LineString|2|KO-BKO +polyhedralsurfacez4326|0|Polygon|2|KO-BKO +polyhedralsurfacez4326|0|MultiPoint|2|KO-BKO +polyhedralsurfacez4326|0|MultiLineString|2|KO-BKO +polyhedralsurfacez4326|0|MultiPolygon|2|KO-BKO +polyhedralsurfacez4326|0|GeometryCollection|2|KO-BKO +polyhedralsurfacez4326|0|CircularString|2|KO-BKO +polyhedralsurfacez4326|0|CompoundCurve|2|KO-BKO +polyhedralsurfacez4326|0|CurvePolygon|2|KO-BKO +polyhedralsurfacez4326|0|MultiCurve|2|KO-BKO +polyhedralsurfacez4326|0|MultiSurface|2|KO-BKO +polyhedralsurfacez4326|0|PolyhedralSurface|2|KO-BKO +polyhedralsurfacez4326|0|Triangle|2|KO-BKO +polyhedralsurfacez4326|0|Point|1|KO-BKO +polyhedralsurfacez4326|0|LineString|1|KO-BKO +polyhedralsurfacez4326|0|Polygon|1|KO-BKO +polyhedralsurfacez4326|0|MultiPoint|1|KO-BKO +polyhedralsurfacez4326|0|MultiLineString|1|KO-BKO +polyhedralsurfacez4326|0|MultiPolygon|1|KO-BKO +polyhedralsurfacez4326|0|GeometryCollection|1|KO-BKO +polyhedralsurfacez4326|0|CircularString|1|KO-BKO +polyhedralsurfacez4326|0|CompoundCurve|1|KO-BKO +polyhedralsurfacez4326|0|CurvePolygon|1|KO-BKO +polyhedralsurfacez4326|0|MultiCurve|1|KO-BKO +polyhedralsurfacez4326|0|MultiSurface|1|KO-BKO +polyhedralsurfacez4326|0|PolyhedralSurface|1|KO-BKO +polyhedralsurfacez4326|0|Triangle|1|KO-BKO +polyhedralsurfacez4326|0|Point|3|KO-BKO +polyhedralsurfacez4326|0|LineString|3|KO-BKO +polyhedralsurfacez4326|0|Polygon|3|KO-BKO +polyhedralsurfacez4326|0|MultiPoint|3|KO-BKO +polyhedralsurfacez4326|0|MultiLineString|3|KO-BKO +polyhedralsurfacez4326|0|MultiPolygon|3|KO-BKO +polyhedralsurfacez4326|0|GeometryCollection|3|KO-BKO +polyhedralsurfacez4326|0|CircularString|3|KO-BKO +polyhedralsurfacez4326|0|CompoundCurve|3|KO-BKO +polyhedralsurfacez4326|0|CurvePolygon|3|KO-BKO +polyhedralsurfacez4326|0|MultiCurve|3|KO-BKO +polyhedralsurfacez4326|0|MultiSurface|3|KO-BKO +polyhedralsurfacez4326|0|PolyhedralSurface|3|KO-BKO +polyhedralsurfacez4326|0|Triangle|3|KO-BKO +polyhedralsurfacez4326|4326|Point|0|KO-BKO +polyhedralsurfacez4326|4326|LineString|0|KO-BKO +polyhedralsurfacez4326|4326|Polygon|0|KO-BKO +polyhedralsurfacez4326|4326|MultiPoint|0|KO-BKO +polyhedralsurfacez4326|4326|MultiLineString|0|KO-BKO +polyhedralsurfacez4326|4326|MultiPolygon|0|KO-BKO +polyhedralsurfacez4326|4326|GeometryCollection|0|KO-BKO +polyhedralsurfacez4326|4326|CircularString|0|KO-BKO +polyhedralsurfacez4326|4326|CompoundCurve|0|KO-BKO +polyhedralsurfacez4326|4326|CurvePolygon|0|KO-BKO +polyhedralsurfacez4326|4326|MultiCurve|0|KO-BKO +polyhedralsurfacez4326|4326|MultiSurface|0|KO-BKO +polyhedralsurfacez4326|4326|PolyhedralSurface|0|KO-BKO +polyhedralsurfacez4326|4326|Triangle|0|KO-BKO +polyhedralsurfacez4326|4326|Tin|0|KO-BKO +polyhedralsurfacez4326|4326|Point|2|KO-BKO +polyhedralsurfacez4326|4326|LineString|2|KO-BKO +polyhedralsurfacez4326|4326|Polygon|2|KO-BKO +polyhedralsurfacez4326|4326|MultiPoint|2|KO-BKO +polyhedralsurfacez4326|4326|MultiLineString|2|KO-BKO +polyhedralsurfacez4326|4326|MultiPolygon|2|KO-BKO +polyhedralsurfacez4326|4326|GeometryCollection|2|KO-BKO +polyhedralsurfacez4326|4326|CircularString|2|KO-BKO +polyhedralsurfacez4326|4326|CompoundCurve|2|KO-BKO +polyhedralsurfacez4326|4326|CurvePolygon|2|KO-BKO +polyhedralsurfacez4326|4326|MultiCurve|2|KO-BKO +polyhedralsurfacez4326|4326|MultiSurface|2|KO-BKO +polyhedralsurfacez4326|4326|PolyhedralSurface|2|OK-BOK +polyhedralsurfacez4326|4326|Triangle|2|KO-BKO +polyhedralsurfacez4326|4326|Point|1|KO-BKO +polyhedralsurfacez4326|4326|LineString|1|KO-BKO +polyhedralsurfacez4326|4326|Polygon|1|KO-BKO +polyhedralsurfacez4326|4326|MultiPoint|1|KO-BKO +polyhedralsurfacez4326|4326|MultiLineString|1|KO-BKO +polyhedralsurfacez4326|4326|MultiPolygon|1|KO-BKO +polyhedralsurfacez4326|4326|GeometryCollection|1|KO-BKO +polyhedralsurfacez4326|4326|CircularString|1|KO-BKO +polyhedralsurfacez4326|4326|CompoundCurve|1|KO-BKO +polyhedralsurfacez4326|4326|CurvePolygon|1|KO-BKO +polyhedralsurfacez4326|4326|MultiCurve|1|KO-BKO +polyhedralsurfacez4326|4326|MultiSurface|1|KO-BKO +polyhedralsurfacez4326|4326|PolyhedralSurface|1|KO-BKO +polyhedralsurfacez4326|4326|Triangle|1|KO-BKO +polyhedralsurfacez4326|4326|Point|3|KO-BKO +polyhedralsurfacez4326|4326|LineString|3|KO-BKO +polyhedralsurfacez4326|4326|Polygon|3|KO-BKO +polyhedralsurfacez4326|4326|MultiPoint|3|KO-BKO +polyhedralsurfacez4326|4326|MultiLineString|3|KO-BKO +polyhedralsurfacez4326|4326|MultiPolygon|3|KO-BKO +polyhedralsurfacez4326|4326|GeometryCollection|3|KO-BKO +polyhedralsurfacez4326|4326|CircularString|3|KO-BKO +polyhedralsurfacez4326|4326|CompoundCurve|3|KO-BKO +polyhedralsurfacez4326|4326|CurvePolygon|3|KO-BKO +polyhedralsurfacez4326|4326|MultiCurve|3|KO-BKO +polyhedralsurfacez4326|4326|MultiSurface|3|KO-BKO +polyhedralsurfacez4326|4326|PolyhedralSurface|3|KO-BKO +polyhedralsurfacez4326|4326|Triangle|3|KO-BKO +polyhedralsurfacez4326||COUNT|2| +polyhedralsurfacezm|0|Point|0|KO-BKO +polyhedralsurfacezm|0|LineString|0|KO-BKO +polyhedralsurfacezm|0|Polygon|0|KO-BKO +polyhedralsurfacezm|0|MultiPoint|0|KO-BKO +polyhedralsurfacezm|0|MultiLineString|0|KO-BKO +polyhedralsurfacezm|0|MultiPolygon|0|KO-BKO +polyhedralsurfacezm|0|GeometryCollection|0|KO-BKO +polyhedralsurfacezm|0|CircularString|0|KO-BKO +polyhedralsurfacezm|0|CompoundCurve|0|KO-BKO +polyhedralsurfacezm|0|CurvePolygon|0|KO-BKO +polyhedralsurfacezm|0|MultiCurve|0|KO-BKO +polyhedralsurfacezm|0|MultiSurface|0|KO-BKO +polyhedralsurfacezm|0|PolyhedralSurface|0|KO-BKO +polyhedralsurfacezm|0|Triangle|0|KO-BKO +polyhedralsurfacezm|0|Tin|0|KO-BKO +polyhedralsurfacezm|0|Point|2|KO-BKO +polyhedralsurfacezm|0|LineString|2|KO-BKO +polyhedralsurfacezm|0|Polygon|2|KO-BKO +polyhedralsurfacezm|0|MultiPoint|2|KO-BKO +polyhedralsurfacezm|0|MultiLineString|2|KO-BKO +polyhedralsurfacezm|0|MultiPolygon|2|KO-BKO +polyhedralsurfacezm|0|GeometryCollection|2|KO-BKO +polyhedralsurfacezm|0|CircularString|2|KO-BKO +polyhedralsurfacezm|0|CompoundCurve|2|KO-BKO +polyhedralsurfacezm|0|CurvePolygon|2|KO-BKO +polyhedralsurfacezm|0|MultiCurve|2|KO-BKO +polyhedralsurfacezm|0|MultiSurface|2|KO-BKO +polyhedralsurfacezm|0|PolyhedralSurface|2|KO-BKO +polyhedralsurfacezm|0|Triangle|2|KO-BKO +polyhedralsurfacezm|0|Point|1|KO-BKO +polyhedralsurfacezm|0|LineString|1|KO-BKO +polyhedralsurfacezm|0|Polygon|1|KO-BKO +polyhedralsurfacezm|0|MultiPoint|1|KO-BKO +polyhedralsurfacezm|0|MultiLineString|1|KO-BKO +polyhedralsurfacezm|0|MultiPolygon|1|KO-BKO +polyhedralsurfacezm|0|GeometryCollection|1|KO-BKO +polyhedralsurfacezm|0|CircularString|1|KO-BKO +polyhedralsurfacezm|0|CompoundCurve|1|KO-BKO +polyhedralsurfacezm|0|CurvePolygon|1|KO-BKO +polyhedralsurfacezm|0|MultiCurve|1|KO-BKO +polyhedralsurfacezm|0|MultiSurface|1|KO-BKO +polyhedralsurfacezm|0|PolyhedralSurface|1|KO-BKO +polyhedralsurfacezm|0|Triangle|1|KO-BKO +polyhedralsurfacezm|0|Point|3|KO-BKO +polyhedralsurfacezm|0|LineString|3|KO-BKO +polyhedralsurfacezm|0|Polygon|3|KO-BKO +polyhedralsurfacezm|0|MultiPoint|3|KO-BKO +polyhedralsurfacezm|0|MultiLineString|3|KO-BKO +polyhedralsurfacezm|0|MultiPolygon|3|KO-BKO +polyhedralsurfacezm|0|GeometryCollection|3|KO-BKO +polyhedralsurfacezm|0|CircularString|3|KO-BKO +polyhedralsurfacezm|0|CompoundCurve|3|KO-BKO +polyhedralsurfacezm|0|CurvePolygon|3|KO-BKO +polyhedralsurfacezm|0|MultiCurve|3|KO-BKO +polyhedralsurfacezm|0|MultiSurface|3|KO-BKO +polyhedralsurfacezm|0|PolyhedralSurface|3|OK-BOK +polyhedralsurfacezm|0|Triangle|3|KO-BKO +polyhedralsurfacezm|4326|Point|0|KO-BKO +polyhedralsurfacezm|4326|LineString|0|KO-BKO +polyhedralsurfacezm|4326|Polygon|0|KO-BKO +polyhedralsurfacezm|4326|MultiPoint|0|KO-BKO +polyhedralsurfacezm|4326|MultiLineString|0|KO-BKO +polyhedralsurfacezm|4326|MultiPolygon|0|KO-BKO +polyhedralsurfacezm|4326|GeometryCollection|0|KO-BKO +polyhedralsurfacezm|4326|CircularString|0|KO-BKO +polyhedralsurfacezm|4326|CompoundCurve|0|KO-BKO +polyhedralsurfacezm|4326|CurvePolygon|0|KO-BKO +polyhedralsurfacezm|4326|MultiCurve|0|KO-BKO +polyhedralsurfacezm|4326|MultiSurface|0|KO-BKO +polyhedralsurfacezm|4326|PolyhedralSurface|0|KO-BKO +polyhedralsurfacezm|4326|Triangle|0|KO-BKO +polyhedralsurfacezm|4326|Tin|0|KO-BKO +polyhedralsurfacezm|4326|Point|2|KO-BKO +polyhedralsurfacezm|4326|LineString|2|KO-BKO +polyhedralsurfacezm|4326|Polygon|2|KO-BKO +polyhedralsurfacezm|4326|MultiPoint|2|KO-BKO +polyhedralsurfacezm|4326|MultiLineString|2|KO-BKO +polyhedralsurfacezm|4326|MultiPolygon|2|KO-BKO +polyhedralsurfacezm|4326|GeometryCollection|2|KO-BKO +polyhedralsurfacezm|4326|CircularString|2|KO-BKO +polyhedralsurfacezm|4326|CompoundCurve|2|KO-BKO +polyhedralsurfacezm|4326|CurvePolygon|2|KO-BKO +polyhedralsurfacezm|4326|MultiCurve|2|KO-BKO +polyhedralsurfacezm|4326|MultiSurface|2|KO-BKO +polyhedralsurfacezm|4326|PolyhedralSurface|2|KO-BKO +polyhedralsurfacezm|4326|Triangle|2|KO-BKO +polyhedralsurfacezm|4326|Point|1|KO-BKO +polyhedralsurfacezm|4326|LineString|1|KO-BKO +polyhedralsurfacezm|4326|Polygon|1|KO-BKO +polyhedralsurfacezm|4326|MultiPoint|1|KO-BKO +polyhedralsurfacezm|4326|MultiLineString|1|KO-BKO +polyhedralsurfacezm|4326|MultiPolygon|1|KO-BKO +polyhedralsurfacezm|4326|GeometryCollection|1|KO-BKO +polyhedralsurfacezm|4326|CircularString|1|KO-BKO +polyhedralsurfacezm|4326|CompoundCurve|1|KO-BKO +polyhedralsurfacezm|4326|CurvePolygon|1|KO-BKO +polyhedralsurfacezm|4326|MultiCurve|1|KO-BKO +polyhedralsurfacezm|4326|MultiSurface|1|KO-BKO +polyhedralsurfacezm|4326|PolyhedralSurface|1|KO-BKO +polyhedralsurfacezm|4326|Triangle|1|KO-BKO +polyhedralsurfacezm|4326|Point|3|KO-BKO +polyhedralsurfacezm|4326|LineString|3|KO-BKO +polyhedralsurfacezm|4326|Polygon|3|KO-BKO +polyhedralsurfacezm|4326|MultiPoint|3|KO-BKO +polyhedralsurfacezm|4326|MultiLineString|3|KO-BKO +polyhedralsurfacezm|4326|MultiPolygon|3|KO-BKO +polyhedralsurfacezm|4326|GeometryCollection|3|KO-BKO +polyhedralsurfacezm|4326|CircularString|3|KO-BKO +polyhedralsurfacezm|4326|CompoundCurve|3|KO-BKO +polyhedralsurfacezm|4326|CurvePolygon|3|KO-BKO +polyhedralsurfacezm|4326|MultiCurve|3|KO-BKO +polyhedralsurfacezm|4326|MultiSurface|3|KO-BKO +polyhedralsurfacezm|4326|PolyhedralSurface|3|OK-BOK +polyhedralsurfacezm|4326|Triangle|3|KO-BKO +polyhedralsurfacezm||COUNT|4| +polyhedralsurfacezm0|0|Point|0|KO-BKO +polyhedralsurfacezm0|0|LineString|0|KO-BKO +polyhedralsurfacezm0|0|Polygon|0|KO-BKO +polyhedralsurfacezm0|0|MultiPoint|0|KO-BKO +polyhedralsurfacezm0|0|MultiLineString|0|KO-BKO +polyhedralsurfacezm0|0|MultiPolygon|0|KO-BKO +polyhedralsurfacezm0|0|GeometryCollection|0|KO-BKO +polyhedralsurfacezm0|0|CircularString|0|KO-BKO +polyhedralsurfacezm0|0|CompoundCurve|0|KO-BKO +polyhedralsurfacezm0|0|CurvePolygon|0|KO-BKO +polyhedralsurfacezm0|0|MultiCurve|0|KO-BKO +polyhedralsurfacezm0|0|MultiSurface|0|KO-BKO +polyhedralsurfacezm0|0|PolyhedralSurface|0|KO-BKO +polyhedralsurfacezm0|0|Triangle|0|KO-BKO +polyhedralsurfacezm0|0|Tin|0|KO-BKO +polyhedralsurfacezm0|0|Point|2|KO-BKO +polyhedralsurfacezm0|0|LineString|2|KO-BKO +polyhedralsurfacezm0|0|Polygon|2|KO-BKO +polyhedralsurfacezm0|0|MultiPoint|2|KO-BKO +polyhedralsurfacezm0|0|MultiLineString|2|KO-BKO +polyhedralsurfacezm0|0|MultiPolygon|2|KO-BKO +polyhedralsurfacezm0|0|GeometryCollection|2|KO-BKO +polyhedralsurfacezm0|0|CircularString|2|KO-BKO +polyhedralsurfacezm0|0|CompoundCurve|2|KO-BKO +polyhedralsurfacezm0|0|CurvePolygon|2|KO-BKO +polyhedralsurfacezm0|0|MultiCurve|2|KO-BKO +polyhedralsurfacezm0|0|MultiSurface|2|KO-BKO +polyhedralsurfacezm0|0|PolyhedralSurface|2|KO-BKO +polyhedralsurfacezm0|0|Triangle|2|KO-BKO +polyhedralsurfacezm0|0|Point|1|KO-BKO +polyhedralsurfacezm0|0|LineString|1|KO-BKO +polyhedralsurfacezm0|0|Polygon|1|KO-BKO +polyhedralsurfacezm0|0|MultiPoint|1|KO-BKO +polyhedralsurfacezm0|0|MultiLineString|1|KO-BKO +polyhedralsurfacezm0|0|MultiPolygon|1|KO-BKO +polyhedralsurfacezm0|0|GeometryCollection|1|KO-BKO +polyhedralsurfacezm0|0|CircularString|1|KO-BKO +polyhedralsurfacezm0|0|CompoundCurve|1|KO-BKO +polyhedralsurfacezm0|0|CurvePolygon|1|KO-BKO +polyhedralsurfacezm0|0|MultiCurve|1|KO-BKO +polyhedralsurfacezm0|0|MultiSurface|1|KO-BKO +polyhedralsurfacezm0|0|PolyhedralSurface|1|KO-BKO +polyhedralsurfacezm0|0|Triangle|1|KO-BKO +polyhedralsurfacezm0|0|Point|3|KO-BKO +polyhedralsurfacezm0|0|LineString|3|KO-BKO +polyhedralsurfacezm0|0|Polygon|3|KO-BKO +polyhedralsurfacezm0|0|MultiPoint|3|KO-BKO +polyhedralsurfacezm0|0|MultiLineString|3|KO-BKO +polyhedralsurfacezm0|0|MultiPolygon|3|KO-BKO +polyhedralsurfacezm0|0|GeometryCollection|3|KO-BKO +polyhedralsurfacezm0|0|CircularString|3|KO-BKO +polyhedralsurfacezm0|0|CompoundCurve|3|KO-BKO +polyhedralsurfacezm0|0|CurvePolygon|3|KO-BKO +polyhedralsurfacezm0|0|MultiCurve|3|KO-BKO +polyhedralsurfacezm0|0|MultiSurface|3|KO-BKO +polyhedralsurfacezm0|0|PolyhedralSurface|3|OK-BOK +polyhedralsurfacezm0|0|Triangle|3|KO-BKO +polyhedralsurfacezm0|4326|Point|0|KO-BKO +polyhedralsurfacezm0|4326|LineString|0|KO-BKO +polyhedralsurfacezm0|4326|Polygon|0|KO-BKO +polyhedralsurfacezm0|4326|MultiPoint|0|KO-BKO +polyhedralsurfacezm0|4326|MultiLineString|0|KO-BKO +polyhedralsurfacezm0|4326|MultiPolygon|0|KO-BKO +polyhedralsurfacezm0|4326|GeometryCollection|0|KO-BKO +polyhedralsurfacezm0|4326|CircularString|0|KO-BKO +polyhedralsurfacezm0|4326|CompoundCurve|0|KO-BKO +polyhedralsurfacezm0|4326|CurvePolygon|0|KO-BKO +polyhedralsurfacezm0|4326|MultiCurve|0|KO-BKO +polyhedralsurfacezm0|4326|MultiSurface|0|KO-BKO +polyhedralsurfacezm0|4326|PolyhedralSurface|0|KO-BKO +polyhedralsurfacezm0|4326|Triangle|0|KO-BKO +polyhedralsurfacezm0|4326|Tin|0|KO-BKO +polyhedralsurfacezm0|4326|Point|2|KO-BKO +polyhedralsurfacezm0|4326|LineString|2|KO-BKO +polyhedralsurfacezm0|4326|Polygon|2|KO-BKO +polyhedralsurfacezm0|4326|MultiPoint|2|KO-BKO +polyhedralsurfacezm0|4326|MultiLineString|2|KO-BKO +polyhedralsurfacezm0|4326|MultiPolygon|2|KO-BKO +polyhedralsurfacezm0|4326|GeometryCollection|2|KO-BKO +polyhedralsurfacezm0|4326|CircularString|2|KO-BKO +polyhedralsurfacezm0|4326|CompoundCurve|2|KO-BKO +polyhedralsurfacezm0|4326|CurvePolygon|2|KO-BKO +polyhedralsurfacezm0|4326|MultiCurve|2|KO-BKO +polyhedralsurfacezm0|4326|MultiSurface|2|KO-BKO +polyhedralsurfacezm0|4326|PolyhedralSurface|2|KO-BKO +polyhedralsurfacezm0|4326|Triangle|2|KO-BKO +polyhedralsurfacezm0|4326|Point|1|KO-BKO +polyhedralsurfacezm0|4326|LineString|1|KO-BKO +polyhedralsurfacezm0|4326|Polygon|1|KO-BKO +polyhedralsurfacezm0|4326|MultiPoint|1|KO-BKO +polyhedralsurfacezm0|4326|MultiLineString|1|KO-BKO +polyhedralsurfacezm0|4326|MultiPolygon|1|KO-BKO +polyhedralsurfacezm0|4326|GeometryCollection|1|KO-BKO +polyhedralsurfacezm0|4326|CircularString|1|KO-BKO +polyhedralsurfacezm0|4326|CompoundCurve|1|KO-BKO +polyhedralsurfacezm0|4326|CurvePolygon|1|KO-BKO +polyhedralsurfacezm0|4326|MultiCurve|1|KO-BKO +polyhedralsurfacezm0|4326|MultiSurface|1|KO-BKO +polyhedralsurfacezm0|4326|PolyhedralSurface|1|KO-BKO +polyhedralsurfacezm0|4326|Triangle|1|KO-BKO +polyhedralsurfacezm0|4326|Point|3|KO-BKO +polyhedralsurfacezm0|4326|LineString|3|KO-BKO +polyhedralsurfacezm0|4326|Polygon|3|KO-BKO +polyhedralsurfacezm0|4326|MultiPoint|3|KO-BKO +polyhedralsurfacezm0|4326|MultiLineString|3|KO-BKO +polyhedralsurfacezm0|4326|MultiPolygon|3|KO-BKO +polyhedralsurfacezm0|4326|GeometryCollection|3|KO-BKO +polyhedralsurfacezm0|4326|CircularString|3|KO-BKO +polyhedralsurfacezm0|4326|CompoundCurve|3|KO-BKO +polyhedralsurfacezm0|4326|CurvePolygon|3|KO-BKO +polyhedralsurfacezm0|4326|MultiCurve|3|KO-BKO +polyhedralsurfacezm0|4326|MultiSurface|3|KO-BKO +polyhedralsurfacezm0|4326|PolyhedralSurface|3|OK-BOK +polyhedralsurfacezm0|4326|Triangle|3|KO-BKO +polyhedralsurfacezm0||COUNT|4| +polyhedralsurfacezm4326|0|Point|0|KO-BKO +polyhedralsurfacezm4326|0|LineString|0|KO-BKO +polyhedralsurfacezm4326|0|Polygon|0|KO-BKO +polyhedralsurfacezm4326|0|MultiPoint|0|KO-BKO +polyhedralsurfacezm4326|0|MultiLineString|0|KO-BKO +polyhedralsurfacezm4326|0|MultiPolygon|0|KO-BKO +polyhedralsurfacezm4326|0|GeometryCollection|0|KO-BKO +polyhedralsurfacezm4326|0|CircularString|0|KO-BKO +polyhedralsurfacezm4326|0|CompoundCurve|0|KO-BKO +polyhedralsurfacezm4326|0|CurvePolygon|0|KO-BKO +polyhedralsurfacezm4326|0|MultiCurve|0|KO-BKO +polyhedralsurfacezm4326|0|MultiSurface|0|KO-BKO +polyhedralsurfacezm4326|0|PolyhedralSurface|0|KO-BKO +polyhedralsurfacezm4326|0|Triangle|0|KO-BKO +polyhedralsurfacezm4326|0|Tin|0|KO-BKO +polyhedralsurfacezm4326|0|Point|2|KO-BKO +polyhedralsurfacezm4326|0|LineString|2|KO-BKO +polyhedralsurfacezm4326|0|Polygon|2|KO-BKO +polyhedralsurfacezm4326|0|MultiPoint|2|KO-BKO +polyhedralsurfacezm4326|0|MultiLineString|2|KO-BKO +polyhedralsurfacezm4326|0|MultiPolygon|2|KO-BKO +polyhedralsurfacezm4326|0|GeometryCollection|2|KO-BKO +polyhedralsurfacezm4326|0|CircularString|2|KO-BKO +polyhedralsurfacezm4326|0|CompoundCurve|2|KO-BKO +polyhedralsurfacezm4326|0|CurvePolygon|2|KO-BKO +polyhedralsurfacezm4326|0|MultiCurve|2|KO-BKO +polyhedralsurfacezm4326|0|MultiSurface|2|KO-BKO +polyhedralsurfacezm4326|0|PolyhedralSurface|2|KO-BKO +polyhedralsurfacezm4326|0|Triangle|2|KO-BKO +polyhedralsurfacezm4326|0|Point|1|KO-BKO +polyhedralsurfacezm4326|0|LineString|1|KO-BKO +polyhedralsurfacezm4326|0|Polygon|1|KO-BKO +polyhedralsurfacezm4326|0|MultiPoint|1|KO-BKO +polyhedralsurfacezm4326|0|MultiLineString|1|KO-BKO +polyhedralsurfacezm4326|0|MultiPolygon|1|KO-BKO +polyhedralsurfacezm4326|0|GeometryCollection|1|KO-BKO +polyhedralsurfacezm4326|0|CircularString|1|KO-BKO +polyhedralsurfacezm4326|0|CompoundCurve|1|KO-BKO +polyhedralsurfacezm4326|0|CurvePolygon|1|KO-BKO +polyhedralsurfacezm4326|0|MultiCurve|1|KO-BKO +polyhedralsurfacezm4326|0|MultiSurface|1|KO-BKO +polyhedralsurfacezm4326|0|PolyhedralSurface|1|KO-BKO +polyhedralsurfacezm4326|0|Triangle|1|KO-BKO +polyhedralsurfacezm4326|0|Point|3|KO-BKO +polyhedralsurfacezm4326|0|LineString|3|KO-BKO +polyhedralsurfacezm4326|0|Polygon|3|KO-BKO +polyhedralsurfacezm4326|0|MultiPoint|3|KO-BKO +polyhedralsurfacezm4326|0|MultiLineString|3|KO-BKO +polyhedralsurfacezm4326|0|MultiPolygon|3|KO-BKO +polyhedralsurfacezm4326|0|GeometryCollection|3|KO-BKO +polyhedralsurfacezm4326|0|CircularString|3|KO-BKO +polyhedralsurfacezm4326|0|CompoundCurve|3|KO-BKO +polyhedralsurfacezm4326|0|CurvePolygon|3|KO-BKO +polyhedralsurfacezm4326|0|MultiCurve|3|KO-BKO +polyhedralsurfacezm4326|0|MultiSurface|3|KO-BKO +polyhedralsurfacezm4326|0|PolyhedralSurface|3|KO-BKO +polyhedralsurfacezm4326|0|Triangle|3|KO-BKO +polyhedralsurfacezm4326|4326|Point|0|KO-BKO +polyhedralsurfacezm4326|4326|LineString|0|KO-BKO +polyhedralsurfacezm4326|4326|Polygon|0|KO-BKO +polyhedralsurfacezm4326|4326|MultiPoint|0|KO-BKO +polyhedralsurfacezm4326|4326|MultiLineString|0|KO-BKO +polyhedralsurfacezm4326|4326|MultiPolygon|0|KO-BKO +polyhedralsurfacezm4326|4326|GeometryCollection|0|KO-BKO +polyhedralsurfacezm4326|4326|CircularString|0|KO-BKO +polyhedralsurfacezm4326|4326|CompoundCurve|0|KO-BKO +polyhedralsurfacezm4326|4326|CurvePolygon|0|KO-BKO +polyhedralsurfacezm4326|4326|MultiCurve|0|KO-BKO +polyhedralsurfacezm4326|4326|MultiSurface|0|KO-BKO +polyhedralsurfacezm4326|4326|PolyhedralSurface|0|KO-BKO +polyhedralsurfacezm4326|4326|Triangle|0|KO-BKO +polyhedralsurfacezm4326|4326|Tin|0|KO-BKO +polyhedralsurfacezm4326|4326|Point|2|KO-BKO +polyhedralsurfacezm4326|4326|LineString|2|KO-BKO +polyhedralsurfacezm4326|4326|Polygon|2|KO-BKO +polyhedralsurfacezm4326|4326|MultiPoint|2|KO-BKO +polyhedralsurfacezm4326|4326|MultiLineString|2|KO-BKO +polyhedralsurfacezm4326|4326|MultiPolygon|2|KO-BKO +polyhedralsurfacezm4326|4326|GeometryCollection|2|KO-BKO +polyhedralsurfacezm4326|4326|CircularString|2|KO-BKO +polyhedralsurfacezm4326|4326|CompoundCurve|2|KO-BKO +polyhedralsurfacezm4326|4326|CurvePolygon|2|KO-BKO +polyhedralsurfacezm4326|4326|MultiCurve|2|KO-BKO +polyhedralsurfacezm4326|4326|MultiSurface|2|KO-BKO +polyhedralsurfacezm4326|4326|PolyhedralSurface|2|KO-BKO +polyhedralsurfacezm4326|4326|Triangle|2|KO-BKO +polyhedralsurfacezm4326|4326|Point|1|KO-BKO +polyhedralsurfacezm4326|4326|LineString|1|KO-BKO +polyhedralsurfacezm4326|4326|Polygon|1|KO-BKO +polyhedralsurfacezm4326|4326|MultiPoint|1|KO-BKO +polyhedralsurfacezm4326|4326|MultiLineString|1|KO-BKO +polyhedralsurfacezm4326|4326|MultiPolygon|1|KO-BKO +polyhedralsurfacezm4326|4326|GeometryCollection|1|KO-BKO +polyhedralsurfacezm4326|4326|CircularString|1|KO-BKO +polyhedralsurfacezm4326|4326|CompoundCurve|1|KO-BKO +polyhedralsurfacezm4326|4326|CurvePolygon|1|KO-BKO +polyhedralsurfacezm4326|4326|MultiCurve|1|KO-BKO +polyhedralsurfacezm4326|4326|MultiSurface|1|KO-BKO +polyhedralsurfacezm4326|4326|PolyhedralSurface|1|KO-BKO +polyhedralsurfacezm4326|4326|Triangle|1|KO-BKO +polyhedralsurfacezm4326|4326|Point|3|KO-BKO +polyhedralsurfacezm4326|4326|LineString|3|KO-BKO +polyhedralsurfacezm4326|4326|Polygon|3|KO-BKO +polyhedralsurfacezm4326|4326|MultiPoint|3|KO-BKO +polyhedralsurfacezm4326|4326|MultiLineString|3|KO-BKO +polyhedralsurfacezm4326|4326|MultiPolygon|3|KO-BKO +polyhedralsurfacezm4326|4326|GeometryCollection|3|KO-BKO +polyhedralsurfacezm4326|4326|CircularString|3|KO-BKO +polyhedralsurfacezm4326|4326|CompoundCurve|3|KO-BKO +polyhedralsurfacezm4326|4326|CurvePolygon|3|KO-BKO +polyhedralsurfacezm4326|4326|MultiCurve|3|KO-BKO +polyhedralsurfacezm4326|4326|MultiSurface|3|KO-BKO +polyhedralsurfacezm4326|4326|PolyhedralSurface|3|OK-BOK +polyhedralsurfacezm4326|4326|Triangle|3|KO-BKO +polyhedralsurfacezm4326||COUNT|2| +tin|0|Point|0|KO-BKO +tin|0|LineString|0|KO-BKO +tin|0|Polygon|0|KO-BKO +tin|0|MultiPoint|0|KO-BKO +tin|0|MultiLineString|0|KO-BKO +tin|0|MultiPolygon|0|KO-BKO +tin|0|GeometryCollection|0|KO-BKO +tin|0|CircularString|0|KO-BKO +tin|0|CompoundCurve|0|KO-BKO +tin|0|CurvePolygon|0|KO-BKO +tin|0|MultiCurve|0|KO-BKO +tin|0|MultiSurface|0|KO-BKO +tin|0|PolyhedralSurface|0|KO-BKO +tin|0|Triangle|0|KO-BKO +tin|0|Tin|0|OK-BOK +tin|0|Point|2|KO-BKO +tin|0|LineString|2|KO-BKO +tin|0|Polygon|2|KO-BKO +tin|0|MultiPoint|2|KO-BKO +tin|0|MultiLineString|2|KO-BKO +tin|0|MultiPolygon|2|KO-BKO +tin|0|GeometryCollection|2|KO-BKO +tin|0|CircularString|2|KO-BKO +tin|0|CompoundCurve|2|KO-BKO +tin|0|CurvePolygon|2|KO-BKO +tin|0|MultiCurve|2|KO-BKO +tin|0|MultiSurface|2|KO-BKO +tin|0|PolyhedralSurface|2|KO-BKO +tin|0|Triangle|2|KO-BKO +tin|0|Point|1|KO-BKO +tin|0|LineString|1|KO-BKO +tin|0|Polygon|1|KO-BKO +tin|0|MultiPoint|1|KO-BKO +tin|0|MultiLineString|1|KO-BKO +tin|0|MultiPolygon|1|KO-BKO +tin|0|GeometryCollection|1|KO-BKO +tin|0|CircularString|1|KO-BKO +tin|0|CompoundCurve|1|KO-BKO +tin|0|CurvePolygon|1|KO-BKO +tin|0|MultiCurve|1|KO-BKO +tin|0|MultiSurface|1|KO-BKO +tin|0|PolyhedralSurface|1|KO-BKO +tin|0|Triangle|1|KO-BKO +tin|0|Point|3|KO-BKO +tin|0|LineString|3|KO-BKO +tin|0|Polygon|3|KO-BKO +tin|0|MultiPoint|3|KO-BKO +tin|0|MultiLineString|3|KO-BKO +tin|0|MultiPolygon|3|KO-BKO +tin|0|GeometryCollection|3|KO-BKO +tin|0|CircularString|3|KO-BKO +tin|0|CompoundCurve|3|KO-BKO +tin|0|CurvePolygon|3|KO-BKO +tin|0|MultiCurve|3|KO-BKO +tin|0|MultiSurface|3|KO-BKO +tin|0|PolyhedralSurface|3|KO-BKO +tin|0|Triangle|3|KO-BKO +tin|4326|Point|0|KO-BKO +tin|4326|LineString|0|KO-BKO +tin|4326|Polygon|0|KO-BKO +tin|4326|MultiPoint|0|KO-BKO +tin|4326|MultiLineString|0|KO-BKO +tin|4326|MultiPolygon|0|KO-BKO +tin|4326|GeometryCollection|0|KO-BKO +tin|4326|CircularString|0|KO-BKO +tin|4326|CompoundCurve|0|KO-BKO +tin|4326|CurvePolygon|0|KO-BKO +tin|4326|MultiCurve|0|KO-BKO +tin|4326|MultiSurface|0|KO-BKO +tin|4326|PolyhedralSurface|0|KO-BKO +tin|4326|Triangle|0|KO-BKO +tin|4326|Tin|0|OK-BOK +tin|4326|Point|2|KO-BKO +tin|4326|LineString|2|KO-BKO +tin|4326|Polygon|2|KO-BKO +tin|4326|MultiPoint|2|KO-BKO +tin|4326|MultiLineString|2|KO-BKO +tin|4326|MultiPolygon|2|KO-BKO +tin|4326|GeometryCollection|2|KO-BKO +tin|4326|CircularString|2|KO-BKO +tin|4326|CompoundCurve|2|KO-BKO +tin|4326|CurvePolygon|2|KO-BKO +tin|4326|MultiCurve|2|KO-BKO +tin|4326|MultiSurface|2|KO-BKO +tin|4326|PolyhedralSurface|2|KO-BKO +tin|4326|Triangle|2|KO-BKO +tin|4326|Point|1|KO-BKO +tin|4326|LineString|1|KO-BKO +tin|4326|Polygon|1|KO-BKO +tin|4326|MultiPoint|1|KO-BKO +tin|4326|MultiLineString|1|KO-BKO +tin|4326|MultiPolygon|1|KO-BKO +tin|4326|GeometryCollection|1|KO-BKO +tin|4326|CircularString|1|KO-BKO +tin|4326|CompoundCurve|1|KO-BKO +tin|4326|CurvePolygon|1|KO-BKO +tin|4326|MultiCurve|1|KO-BKO +tin|4326|MultiSurface|1|KO-BKO +tin|4326|PolyhedralSurface|1|KO-BKO +tin|4326|Triangle|1|KO-BKO +tin|4326|Point|3|KO-BKO +tin|4326|LineString|3|KO-BKO +tin|4326|Polygon|3|KO-BKO +tin|4326|MultiPoint|3|KO-BKO +tin|4326|MultiLineString|3|KO-BKO +tin|4326|MultiPolygon|3|KO-BKO +tin|4326|GeometryCollection|3|KO-BKO +tin|4326|CircularString|3|KO-BKO +tin|4326|CompoundCurve|3|KO-BKO +tin|4326|CurvePolygon|3|KO-BKO +tin|4326|MultiCurve|3|KO-BKO +tin|4326|MultiSurface|3|KO-BKO +tin|4326|PolyhedralSurface|3|KO-BKO +tin|4326|Triangle|3|KO-BKO +tin||COUNT|4| +tin0|0|Point|0|KO-BKO +tin0|0|LineString|0|KO-BKO +tin0|0|Polygon|0|KO-BKO +tin0|0|MultiPoint|0|KO-BKO +tin0|0|MultiLineString|0|KO-BKO +tin0|0|MultiPolygon|0|KO-BKO +tin0|0|GeometryCollection|0|KO-BKO +tin0|0|CircularString|0|KO-BKO +tin0|0|CompoundCurve|0|KO-BKO +tin0|0|CurvePolygon|0|KO-BKO +tin0|0|MultiCurve|0|KO-BKO +tin0|0|MultiSurface|0|KO-BKO +tin0|0|PolyhedralSurface|0|KO-BKO +tin0|0|Triangle|0|KO-BKO +tin0|0|Tin|0|OK-BOK +tin0|0|Point|2|KO-BKO +tin0|0|LineString|2|KO-BKO +tin0|0|Polygon|2|KO-BKO +tin0|0|MultiPoint|2|KO-BKO +tin0|0|MultiLineString|2|KO-BKO +tin0|0|MultiPolygon|2|KO-BKO +tin0|0|GeometryCollection|2|KO-BKO +tin0|0|CircularString|2|KO-BKO +tin0|0|CompoundCurve|2|KO-BKO +tin0|0|CurvePolygon|2|KO-BKO +tin0|0|MultiCurve|2|KO-BKO +tin0|0|MultiSurface|2|KO-BKO +tin0|0|PolyhedralSurface|2|KO-BKO +tin0|0|Triangle|2|KO-BKO +tin0|0|Point|1|KO-BKO +tin0|0|LineString|1|KO-BKO +tin0|0|Polygon|1|KO-BKO +tin0|0|MultiPoint|1|KO-BKO +tin0|0|MultiLineString|1|KO-BKO +tin0|0|MultiPolygon|1|KO-BKO +tin0|0|GeometryCollection|1|KO-BKO +tin0|0|CircularString|1|KO-BKO +tin0|0|CompoundCurve|1|KO-BKO +tin0|0|CurvePolygon|1|KO-BKO +tin0|0|MultiCurve|1|KO-BKO +tin0|0|MultiSurface|1|KO-BKO +tin0|0|PolyhedralSurface|1|KO-BKO +tin0|0|Triangle|1|KO-BKO +tin0|0|Point|3|KO-BKO +tin0|0|LineString|3|KO-BKO +tin0|0|Polygon|3|KO-BKO +tin0|0|MultiPoint|3|KO-BKO +tin0|0|MultiLineString|3|KO-BKO +tin0|0|MultiPolygon|3|KO-BKO +tin0|0|GeometryCollection|3|KO-BKO +tin0|0|CircularString|3|KO-BKO +tin0|0|CompoundCurve|3|KO-BKO +tin0|0|CurvePolygon|3|KO-BKO +tin0|0|MultiCurve|3|KO-BKO +tin0|0|MultiSurface|3|KO-BKO +tin0|0|PolyhedralSurface|3|KO-BKO +tin0|0|Triangle|3|KO-BKO +tin0|4326|Point|0|KO-BKO +tin0|4326|LineString|0|KO-BKO +tin0|4326|Polygon|0|KO-BKO +tin0|4326|MultiPoint|0|KO-BKO +tin0|4326|MultiLineString|0|KO-BKO +tin0|4326|MultiPolygon|0|KO-BKO +tin0|4326|GeometryCollection|0|KO-BKO +tin0|4326|CircularString|0|KO-BKO +tin0|4326|CompoundCurve|0|KO-BKO +tin0|4326|CurvePolygon|0|KO-BKO +tin0|4326|MultiCurve|0|KO-BKO +tin0|4326|MultiSurface|0|KO-BKO +tin0|4326|PolyhedralSurface|0|KO-BKO +tin0|4326|Triangle|0|KO-BKO +tin0|4326|Tin|0|OK-BOK +tin0|4326|Point|2|KO-BKO +tin0|4326|LineString|2|KO-BKO +tin0|4326|Polygon|2|KO-BKO +tin0|4326|MultiPoint|2|KO-BKO +tin0|4326|MultiLineString|2|KO-BKO +tin0|4326|MultiPolygon|2|KO-BKO +tin0|4326|GeometryCollection|2|KO-BKO +tin0|4326|CircularString|2|KO-BKO +tin0|4326|CompoundCurve|2|KO-BKO +tin0|4326|CurvePolygon|2|KO-BKO +tin0|4326|MultiCurve|2|KO-BKO +tin0|4326|MultiSurface|2|KO-BKO +tin0|4326|PolyhedralSurface|2|KO-BKO +tin0|4326|Triangle|2|KO-BKO +tin0|4326|Point|1|KO-BKO +tin0|4326|LineString|1|KO-BKO +tin0|4326|Polygon|1|KO-BKO +tin0|4326|MultiPoint|1|KO-BKO +tin0|4326|MultiLineString|1|KO-BKO +tin0|4326|MultiPolygon|1|KO-BKO +tin0|4326|GeometryCollection|1|KO-BKO +tin0|4326|CircularString|1|KO-BKO +tin0|4326|CompoundCurve|1|KO-BKO +tin0|4326|CurvePolygon|1|KO-BKO +tin0|4326|MultiCurve|1|KO-BKO +tin0|4326|MultiSurface|1|KO-BKO +tin0|4326|PolyhedralSurface|1|KO-BKO +tin0|4326|Triangle|1|KO-BKO +tin0|4326|Point|3|KO-BKO +tin0|4326|LineString|3|KO-BKO +tin0|4326|Polygon|3|KO-BKO +tin0|4326|MultiPoint|3|KO-BKO +tin0|4326|MultiLineString|3|KO-BKO +tin0|4326|MultiPolygon|3|KO-BKO +tin0|4326|GeometryCollection|3|KO-BKO +tin0|4326|CircularString|3|KO-BKO +tin0|4326|CompoundCurve|3|KO-BKO +tin0|4326|CurvePolygon|3|KO-BKO +tin0|4326|MultiCurve|3|KO-BKO +tin0|4326|MultiSurface|3|KO-BKO +tin0|4326|PolyhedralSurface|3|KO-BKO +tin0|4326|Triangle|3|KO-BKO +tin0||COUNT|4| +tin4326|0|Point|0|KO-BKO +tin4326|0|LineString|0|KO-BKO +tin4326|0|Polygon|0|KO-BKO +tin4326|0|MultiPoint|0|KO-BKO +tin4326|0|MultiLineString|0|KO-BKO +tin4326|0|MultiPolygon|0|KO-BKO +tin4326|0|GeometryCollection|0|KO-BKO +tin4326|0|CircularString|0|KO-BKO +tin4326|0|CompoundCurve|0|KO-BKO +tin4326|0|CurvePolygon|0|KO-BKO +tin4326|0|MultiCurve|0|KO-BKO +tin4326|0|MultiSurface|0|KO-BKO +tin4326|0|PolyhedralSurface|0|KO-BKO +tin4326|0|Triangle|0|KO-BKO +tin4326|0|Tin|0|KO-BKO +tin4326|0|Point|2|KO-BKO +tin4326|0|LineString|2|KO-BKO +tin4326|0|Polygon|2|KO-BKO +tin4326|0|MultiPoint|2|KO-BKO +tin4326|0|MultiLineString|2|KO-BKO +tin4326|0|MultiPolygon|2|KO-BKO +tin4326|0|GeometryCollection|2|KO-BKO +tin4326|0|CircularString|2|KO-BKO +tin4326|0|CompoundCurve|2|KO-BKO +tin4326|0|CurvePolygon|2|KO-BKO +tin4326|0|MultiCurve|2|KO-BKO +tin4326|0|MultiSurface|2|KO-BKO +tin4326|0|PolyhedralSurface|2|KO-BKO +tin4326|0|Triangle|2|KO-BKO +tin4326|0|Point|1|KO-BKO +tin4326|0|LineString|1|KO-BKO +tin4326|0|Polygon|1|KO-BKO +tin4326|0|MultiPoint|1|KO-BKO +tin4326|0|MultiLineString|1|KO-BKO +tin4326|0|MultiPolygon|1|KO-BKO +tin4326|0|GeometryCollection|1|KO-BKO +tin4326|0|CircularString|1|KO-BKO +tin4326|0|CompoundCurve|1|KO-BKO +tin4326|0|CurvePolygon|1|KO-BKO +tin4326|0|MultiCurve|1|KO-BKO +tin4326|0|MultiSurface|1|KO-BKO +tin4326|0|PolyhedralSurface|1|KO-BKO +tin4326|0|Triangle|1|KO-BKO +tin4326|0|Point|3|KO-BKO +tin4326|0|LineString|3|KO-BKO +tin4326|0|Polygon|3|KO-BKO +tin4326|0|MultiPoint|3|KO-BKO +tin4326|0|MultiLineString|3|KO-BKO +tin4326|0|MultiPolygon|3|KO-BKO +tin4326|0|GeometryCollection|3|KO-BKO +tin4326|0|CircularString|3|KO-BKO +tin4326|0|CompoundCurve|3|KO-BKO +tin4326|0|CurvePolygon|3|KO-BKO +tin4326|0|MultiCurve|3|KO-BKO +tin4326|0|MultiSurface|3|KO-BKO +tin4326|0|PolyhedralSurface|3|KO-BKO +tin4326|0|Triangle|3|KO-BKO +tin4326|4326|Point|0|KO-BKO +tin4326|4326|LineString|0|KO-BKO +tin4326|4326|Polygon|0|KO-BKO +tin4326|4326|MultiPoint|0|KO-BKO +tin4326|4326|MultiLineString|0|KO-BKO +tin4326|4326|MultiPolygon|0|KO-BKO +tin4326|4326|GeometryCollection|0|KO-BKO +tin4326|4326|CircularString|0|KO-BKO +tin4326|4326|CompoundCurve|0|KO-BKO +tin4326|4326|CurvePolygon|0|KO-BKO +tin4326|4326|MultiCurve|0|KO-BKO +tin4326|4326|MultiSurface|0|KO-BKO +tin4326|4326|PolyhedralSurface|0|KO-BKO +tin4326|4326|Triangle|0|KO-BKO +tin4326|4326|Tin|0|OK-BOK +tin4326|4326|Point|2|KO-BKO +tin4326|4326|LineString|2|KO-BKO +tin4326|4326|Polygon|2|KO-BKO +tin4326|4326|MultiPoint|2|KO-BKO +tin4326|4326|MultiLineString|2|KO-BKO +tin4326|4326|MultiPolygon|2|KO-BKO +tin4326|4326|GeometryCollection|2|KO-BKO +tin4326|4326|CircularString|2|KO-BKO +tin4326|4326|CompoundCurve|2|KO-BKO +tin4326|4326|CurvePolygon|2|KO-BKO +tin4326|4326|MultiCurve|2|KO-BKO +tin4326|4326|MultiSurface|2|KO-BKO +tin4326|4326|PolyhedralSurface|2|KO-BKO +tin4326|4326|Triangle|2|KO-BKO +tin4326|4326|Point|1|KO-BKO +tin4326|4326|LineString|1|KO-BKO +tin4326|4326|Polygon|1|KO-BKO +tin4326|4326|MultiPoint|1|KO-BKO +tin4326|4326|MultiLineString|1|KO-BKO +tin4326|4326|MultiPolygon|1|KO-BKO +tin4326|4326|GeometryCollection|1|KO-BKO +tin4326|4326|CircularString|1|KO-BKO +tin4326|4326|CompoundCurve|1|KO-BKO +tin4326|4326|CurvePolygon|1|KO-BKO +tin4326|4326|MultiCurve|1|KO-BKO +tin4326|4326|MultiSurface|1|KO-BKO +tin4326|4326|PolyhedralSurface|1|KO-BKO +tin4326|4326|Triangle|1|KO-BKO +tin4326|4326|Point|3|KO-BKO +tin4326|4326|LineString|3|KO-BKO +tin4326|4326|Polygon|3|KO-BKO +tin4326|4326|MultiPoint|3|KO-BKO +tin4326|4326|MultiLineString|3|KO-BKO +tin4326|4326|MultiPolygon|3|KO-BKO +tin4326|4326|GeometryCollection|3|KO-BKO +tin4326|4326|CircularString|3|KO-BKO +tin4326|4326|CompoundCurve|3|KO-BKO +tin4326|4326|CurvePolygon|3|KO-BKO +tin4326|4326|MultiCurve|3|KO-BKO +tin4326|4326|MultiSurface|3|KO-BKO +tin4326|4326|PolyhedralSurface|3|KO-BKO +tin4326|4326|Triangle|3|KO-BKO +tin4326||COUNT|2| +tinm|0|Point|0|KO-BKO +tinm|0|LineString|0|KO-BKO +tinm|0|Polygon|0|KO-BKO +tinm|0|MultiPoint|0|KO-BKO +tinm|0|MultiLineString|0|KO-BKO +tinm|0|MultiPolygon|0|KO-BKO +tinm|0|GeometryCollection|0|KO-BKO +tinm|0|CircularString|0|KO-BKO +tinm|0|CompoundCurve|0|KO-BKO +tinm|0|CurvePolygon|0|KO-BKO +tinm|0|MultiCurve|0|KO-BKO +tinm|0|MultiSurface|0|KO-BKO +tinm|0|PolyhedralSurface|0|KO-BKO +tinm|0|Triangle|0|KO-BKO +tinm|0|Tin|0|KO-BKO +tinm|0|Point|2|KO-BKO +tinm|0|LineString|2|KO-BKO +tinm|0|Polygon|2|KO-BKO +tinm|0|MultiPoint|2|KO-BKO +tinm|0|MultiLineString|2|KO-BKO +tinm|0|MultiPolygon|2|KO-BKO +tinm|0|GeometryCollection|2|KO-BKO +tinm|0|CircularString|2|KO-BKO +tinm|0|CompoundCurve|2|KO-BKO +tinm|0|CurvePolygon|2|KO-BKO +tinm|0|MultiCurve|2|KO-BKO +tinm|0|MultiSurface|2|KO-BKO +tinm|0|PolyhedralSurface|2|KO-BKO +tinm|0|Triangle|2|KO-BKO +tinm|0|Point|1|KO-BKO +tinm|0|LineString|1|KO-BKO +tinm|0|Polygon|1|KO-BKO +tinm|0|MultiPoint|1|KO-BKO +tinm|0|MultiLineString|1|KO-BKO +tinm|0|MultiPolygon|1|KO-BKO +tinm|0|GeometryCollection|1|KO-BKO +tinm|0|CircularString|1|KO-BKO +tinm|0|CompoundCurve|1|KO-BKO +tinm|0|CurvePolygon|1|KO-BKO +tinm|0|MultiCurve|1|KO-BKO +tinm|0|MultiSurface|1|KO-BKO +tinm|0|PolyhedralSurface|1|KO-BKO +tinm|0|Triangle|1|KO-BKO +tinm|0|Point|3|KO-BKO +tinm|0|LineString|3|KO-BKO +tinm|0|Polygon|3|KO-BKO +tinm|0|MultiPoint|3|KO-BKO +tinm|0|MultiLineString|3|KO-BKO +tinm|0|MultiPolygon|3|KO-BKO +tinm|0|GeometryCollection|3|KO-BKO +tinm|0|CircularString|3|KO-BKO +tinm|0|CompoundCurve|3|KO-BKO +tinm|0|CurvePolygon|3|KO-BKO +tinm|0|MultiCurve|3|KO-BKO +tinm|0|MultiSurface|3|KO-BKO +tinm|0|PolyhedralSurface|3|KO-BKO +tinm|0|Triangle|3|KO-BKO +tinm|4326|Point|0|KO-BKO +tinm|4326|LineString|0|KO-BKO +tinm|4326|Polygon|0|KO-BKO +tinm|4326|MultiPoint|0|KO-BKO +tinm|4326|MultiLineString|0|KO-BKO +tinm|4326|MultiPolygon|0|KO-BKO +tinm|4326|GeometryCollection|0|KO-BKO +tinm|4326|CircularString|0|KO-BKO +tinm|4326|CompoundCurve|0|KO-BKO +tinm|4326|CurvePolygon|0|KO-BKO +tinm|4326|MultiCurve|0|KO-BKO +tinm|4326|MultiSurface|0|KO-BKO +tinm|4326|PolyhedralSurface|0|KO-BKO +tinm|4326|Triangle|0|KO-BKO +tinm|4326|Tin|0|KO-BKO +tinm|4326|Point|2|KO-BKO +tinm|4326|LineString|2|KO-BKO +tinm|4326|Polygon|2|KO-BKO +tinm|4326|MultiPoint|2|KO-BKO +tinm|4326|MultiLineString|2|KO-BKO +tinm|4326|MultiPolygon|2|KO-BKO +tinm|4326|GeometryCollection|2|KO-BKO +tinm|4326|CircularString|2|KO-BKO +tinm|4326|CompoundCurve|2|KO-BKO +tinm|4326|CurvePolygon|2|KO-BKO +tinm|4326|MultiCurve|2|KO-BKO +tinm|4326|MultiSurface|2|KO-BKO +tinm|4326|PolyhedralSurface|2|KO-BKO +tinm|4326|Triangle|2|KO-BKO +tinm|4326|Point|1|KO-BKO +tinm|4326|LineString|1|KO-BKO +tinm|4326|Polygon|1|KO-BKO +tinm|4326|MultiPoint|1|KO-BKO +tinm|4326|MultiLineString|1|KO-BKO +tinm|4326|MultiPolygon|1|KO-BKO +tinm|4326|GeometryCollection|1|KO-BKO +tinm|4326|CircularString|1|KO-BKO +tinm|4326|CompoundCurve|1|KO-BKO +tinm|4326|CurvePolygon|1|KO-BKO +tinm|4326|MultiCurve|1|KO-BKO +tinm|4326|MultiSurface|1|KO-BKO +tinm|4326|PolyhedralSurface|1|KO-BKO +tinm|4326|Triangle|1|KO-BKO +tinm|4326|Point|3|KO-BKO +tinm|4326|LineString|3|KO-BKO +tinm|4326|Polygon|3|KO-BKO +tinm|4326|MultiPoint|3|KO-BKO +tinm|4326|MultiLineString|3|KO-BKO +tinm|4326|MultiPolygon|3|KO-BKO +tinm|4326|GeometryCollection|3|KO-BKO +tinm|4326|CircularString|3|KO-BKO +tinm|4326|CompoundCurve|3|KO-BKO +tinm|4326|CurvePolygon|3|KO-BKO +tinm|4326|MultiCurve|3|KO-BKO +tinm|4326|MultiSurface|3|KO-BKO +tinm|4326|PolyhedralSurface|3|KO-BKO +tinm|4326|Triangle|3|KO-BKO +tinm||COUNT|0| +tinm0|0|Point|0|KO-BKO +tinm0|0|LineString|0|KO-BKO +tinm0|0|Polygon|0|KO-BKO +tinm0|0|MultiPoint|0|KO-BKO +tinm0|0|MultiLineString|0|KO-BKO +tinm0|0|MultiPolygon|0|KO-BKO +tinm0|0|GeometryCollection|0|KO-BKO +tinm0|0|CircularString|0|KO-BKO +tinm0|0|CompoundCurve|0|KO-BKO +tinm0|0|CurvePolygon|0|KO-BKO +tinm0|0|MultiCurve|0|KO-BKO +tinm0|0|MultiSurface|0|KO-BKO +tinm0|0|PolyhedralSurface|0|KO-BKO +tinm0|0|Triangle|0|KO-BKO +tinm0|0|Tin|0|KO-BKO +tinm0|0|Point|2|KO-BKO +tinm0|0|LineString|2|KO-BKO +tinm0|0|Polygon|2|KO-BKO +tinm0|0|MultiPoint|2|KO-BKO +tinm0|0|MultiLineString|2|KO-BKO +tinm0|0|MultiPolygon|2|KO-BKO +tinm0|0|GeometryCollection|2|KO-BKO +tinm0|0|CircularString|2|KO-BKO +tinm0|0|CompoundCurve|2|KO-BKO +tinm0|0|CurvePolygon|2|KO-BKO +tinm0|0|MultiCurve|2|KO-BKO +tinm0|0|MultiSurface|2|KO-BKO +tinm0|0|PolyhedralSurface|2|KO-BKO +tinm0|0|Triangle|2|KO-BKO +tinm0|0|Point|1|KO-BKO +tinm0|0|LineString|1|KO-BKO +tinm0|0|Polygon|1|KO-BKO +tinm0|0|MultiPoint|1|KO-BKO +tinm0|0|MultiLineString|1|KO-BKO +tinm0|0|MultiPolygon|1|KO-BKO +tinm0|0|GeometryCollection|1|KO-BKO +tinm0|0|CircularString|1|KO-BKO +tinm0|0|CompoundCurve|1|KO-BKO +tinm0|0|CurvePolygon|1|KO-BKO +tinm0|0|MultiCurve|1|KO-BKO +tinm0|0|MultiSurface|1|KO-BKO +tinm0|0|PolyhedralSurface|1|KO-BKO +tinm0|0|Triangle|1|KO-BKO +tinm0|0|Point|3|KO-BKO +tinm0|0|LineString|3|KO-BKO +tinm0|0|Polygon|3|KO-BKO +tinm0|0|MultiPoint|3|KO-BKO +tinm0|0|MultiLineString|3|KO-BKO +tinm0|0|MultiPolygon|3|KO-BKO +tinm0|0|GeometryCollection|3|KO-BKO +tinm0|0|CircularString|3|KO-BKO +tinm0|0|CompoundCurve|3|KO-BKO +tinm0|0|CurvePolygon|3|KO-BKO +tinm0|0|MultiCurve|3|KO-BKO +tinm0|0|MultiSurface|3|KO-BKO +tinm0|0|PolyhedralSurface|3|KO-BKO +tinm0|0|Triangle|3|KO-BKO +tinm0|4326|Point|0|KO-BKO +tinm0|4326|LineString|0|KO-BKO +tinm0|4326|Polygon|0|KO-BKO +tinm0|4326|MultiPoint|0|KO-BKO +tinm0|4326|MultiLineString|0|KO-BKO +tinm0|4326|MultiPolygon|0|KO-BKO +tinm0|4326|GeometryCollection|0|KO-BKO +tinm0|4326|CircularString|0|KO-BKO +tinm0|4326|CompoundCurve|0|KO-BKO +tinm0|4326|CurvePolygon|0|KO-BKO +tinm0|4326|MultiCurve|0|KO-BKO +tinm0|4326|MultiSurface|0|KO-BKO +tinm0|4326|PolyhedralSurface|0|KO-BKO +tinm0|4326|Triangle|0|KO-BKO +tinm0|4326|Tin|0|KO-BKO +tinm0|4326|Point|2|KO-BKO +tinm0|4326|LineString|2|KO-BKO +tinm0|4326|Polygon|2|KO-BKO +tinm0|4326|MultiPoint|2|KO-BKO +tinm0|4326|MultiLineString|2|KO-BKO +tinm0|4326|MultiPolygon|2|KO-BKO +tinm0|4326|GeometryCollection|2|KO-BKO +tinm0|4326|CircularString|2|KO-BKO +tinm0|4326|CompoundCurve|2|KO-BKO +tinm0|4326|CurvePolygon|2|KO-BKO +tinm0|4326|MultiCurve|2|KO-BKO +tinm0|4326|MultiSurface|2|KO-BKO +tinm0|4326|PolyhedralSurface|2|KO-BKO +tinm0|4326|Triangle|2|KO-BKO +tinm0|4326|Point|1|KO-BKO +tinm0|4326|LineString|1|KO-BKO +tinm0|4326|Polygon|1|KO-BKO +tinm0|4326|MultiPoint|1|KO-BKO +tinm0|4326|MultiLineString|1|KO-BKO +tinm0|4326|MultiPolygon|1|KO-BKO +tinm0|4326|GeometryCollection|1|KO-BKO +tinm0|4326|CircularString|1|KO-BKO +tinm0|4326|CompoundCurve|1|KO-BKO +tinm0|4326|CurvePolygon|1|KO-BKO +tinm0|4326|MultiCurve|1|KO-BKO +tinm0|4326|MultiSurface|1|KO-BKO +tinm0|4326|PolyhedralSurface|1|KO-BKO +tinm0|4326|Triangle|1|KO-BKO +tinm0|4326|Point|3|KO-BKO +tinm0|4326|LineString|3|KO-BKO +tinm0|4326|Polygon|3|KO-BKO +tinm0|4326|MultiPoint|3|KO-BKO +tinm0|4326|MultiLineString|3|KO-BKO +tinm0|4326|MultiPolygon|3|KO-BKO +tinm0|4326|GeometryCollection|3|KO-BKO +tinm0|4326|CircularString|3|KO-BKO +tinm0|4326|CompoundCurve|3|KO-BKO +tinm0|4326|CurvePolygon|3|KO-BKO +tinm0|4326|MultiCurve|3|KO-BKO +tinm0|4326|MultiSurface|3|KO-BKO +tinm0|4326|PolyhedralSurface|3|KO-BKO +tinm0|4326|Triangle|3|KO-BKO +tinm0||COUNT|0| +tinm4326|0|Point|0|KO-BKO +tinm4326|0|LineString|0|KO-BKO +tinm4326|0|Polygon|0|KO-BKO +tinm4326|0|MultiPoint|0|KO-BKO +tinm4326|0|MultiLineString|0|KO-BKO +tinm4326|0|MultiPolygon|0|KO-BKO +tinm4326|0|GeometryCollection|0|KO-BKO +tinm4326|0|CircularString|0|KO-BKO +tinm4326|0|CompoundCurve|0|KO-BKO +tinm4326|0|CurvePolygon|0|KO-BKO +tinm4326|0|MultiCurve|0|KO-BKO +tinm4326|0|MultiSurface|0|KO-BKO +tinm4326|0|PolyhedralSurface|0|KO-BKO +tinm4326|0|Triangle|0|KO-BKO +tinm4326|0|Tin|0|KO-BKO +tinm4326|0|Point|2|KO-BKO +tinm4326|0|LineString|2|KO-BKO +tinm4326|0|Polygon|2|KO-BKO +tinm4326|0|MultiPoint|2|KO-BKO +tinm4326|0|MultiLineString|2|KO-BKO +tinm4326|0|MultiPolygon|2|KO-BKO +tinm4326|0|GeometryCollection|2|KO-BKO +tinm4326|0|CircularString|2|KO-BKO +tinm4326|0|CompoundCurve|2|KO-BKO +tinm4326|0|CurvePolygon|2|KO-BKO +tinm4326|0|MultiCurve|2|KO-BKO +tinm4326|0|MultiSurface|2|KO-BKO +tinm4326|0|PolyhedralSurface|2|KO-BKO +tinm4326|0|Triangle|2|KO-BKO +tinm4326|0|Point|1|KO-BKO +tinm4326|0|LineString|1|KO-BKO +tinm4326|0|Polygon|1|KO-BKO +tinm4326|0|MultiPoint|1|KO-BKO +tinm4326|0|MultiLineString|1|KO-BKO +tinm4326|0|MultiPolygon|1|KO-BKO +tinm4326|0|GeometryCollection|1|KO-BKO +tinm4326|0|CircularString|1|KO-BKO +tinm4326|0|CompoundCurve|1|KO-BKO +tinm4326|0|CurvePolygon|1|KO-BKO +tinm4326|0|MultiCurve|1|KO-BKO +tinm4326|0|MultiSurface|1|KO-BKO +tinm4326|0|PolyhedralSurface|1|KO-BKO +tinm4326|0|Triangle|1|KO-BKO +tinm4326|0|Point|3|KO-BKO +tinm4326|0|LineString|3|KO-BKO +tinm4326|0|Polygon|3|KO-BKO +tinm4326|0|MultiPoint|3|KO-BKO +tinm4326|0|MultiLineString|3|KO-BKO +tinm4326|0|MultiPolygon|3|KO-BKO +tinm4326|0|GeometryCollection|3|KO-BKO +tinm4326|0|CircularString|3|KO-BKO +tinm4326|0|CompoundCurve|3|KO-BKO +tinm4326|0|CurvePolygon|3|KO-BKO +tinm4326|0|MultiCurve|3|KO-BKO +tinm4326|0|MultiSurface|3|KO-BKO +tinm4326|0|PolyhedralSurface|3|KO-BKO +tinm4326|0|Triangle|3|KO-BKO +tinm4326|4326|Point|0|KO-BKO +tinm4326|4326|LineString|0|KO-BKO +tinm4326|4326|Polygon|0|KO-BKO +tinm4326|4326|MultiPoint|0|KO-BKO +tinm4326|4326|MultiLineString|0|KO-BKO +tinm4326|4326|MultiPolygon|0|KO-BKO +tinm4326|4326|GeometryCollection|0|KO-BKO +tinm4326|4326|CircularString|0|KO-BKO +tinm4326|4326|CompoundCurve|0|KO-BKO +tinm4326|4326|CurvePolygon|0|KO-BKO +tinm4326|4326|MultiCurve|0|KO-BKO +tinm4326|4326|MultiSurface|0|KO-BKO +tinm4326|4326|PolyhedralSurface|0|KO-BKO +tinm4326|4326|Triangle|0|KO-BKO +tinm4326|4326|Tin|0|KO-BKO +tinm4326|4326|Point|2|KO-BKO +tinm4326|4326|LineString|2|KO-BKO +tinm4326|4326|Polygon|2|KO-BKO +tinm4326|4326|MultiPoint|2|KO-BKO +tinm4326|4326|MultiLineString|2|KO-BKO +tinm4326|4326|MultiPolygon|2|KO-BKO +tinm4326|4326|GeometryCollection|2|KO-BKO +tinm4326|4326|CircularString|2|KO-BKO +tinm4326|4326|CompoundCurve|2|KO-BKO +tinm4326|4326|CurvePolygon|2|KO-BKO +tinm4326|4326|MultiCurve|2|KO-BKO +tinm4326|4326|MultiSurface|2|KO-BKO +tinm4326|4326|PolyhedralSurface|2|KO-BKO +tinm4326|4326|Triangle|2|KO-BKO +tinm4326|4326|Point|1|KO-BKO +tinm4326|4326|LineString|1|KO-BKO +tinm4326|4326|Polygon|1|KO-BKO +tinm4326|4326|MultiPoint|1|KO-BKO +tinm4326|4326|MultiLineString|1|KO-BKO +tinm4326|4326|MultiPolygon|1|KO-BKO +tinm4326|4326|GeometryCollection|1|KO-BKO +tinm4326|4326|CircularString|1|KO-BKO +tinm4326|4326|CompoundCurve|1|KO-BKO +tinm4326|4326|CurvePolygon|1|KO-BKO +tinm4326|4326|MultiCurve|1|KO-BKO +tinm4326|4326|MultiSurface|1|KO-BKO +tinm4326|4326|PolyhedralSurface|1|KO-BKO +tinm4326|4326|Triangle|1|KO-BKO +tinm4326|4326|Point|3|KO-BKO +tinm4326|4326|LineString|3|KO-BKO +tinm4326|4326|Polygon|3|KO-BKO +tinm4326|4326|MultiPoint|3|KO-BKO +tinm4326|4326|MultiLineString|3|KO-BKO +tinm4326|4326|MultiPolygon|3|KO-BKO +tinm4326|4326|GeometryCollection|3|KO-BKO +tinm4326|4326|CircularString|3|KO-BKO +tinm4326|4326|CompoundCurve|3|KO-BKO +tinm4326|4326|CurvePolygon|3|KO-BKO +tinm4326|4326|MultiCurve|3|KO-BKO +tinm4326|4326|MultiSurface|3|KO-BKO +tinm4326|4326|PolyhedralSurface|3|KO-BKO +tinm4326|4326|Triangle|3|KO-BKO +tinm4326||COUNT|0| +tinz|0|Point|0|KO-BKO +tinz|0|LineString|0|KO-BKO +tinz|0|Polygon|0|KO-BKO +tinz|0|MultiPoint|0|KO-BKO +tinz|0|MultiLineString|0|KO-BKO +tinz|0|MultiPolygon|0|KO-BKO +tinz|0|GeometryCollection|0|KO-BKO +tinz|0|CircularString|0|KO-BKO +tinz|0|CompoundCurve|0|KO-BKO +tinz|0|CurvePolygon|0|KO-BKO +tinz|0|MultiCurve|0|KO-BKO +tinz|0|MultiSurface|0|KO-BKO +tinz|0|PolyhedralSurface|0|KO-BKO +tinz|0|Triangle|0|KO-BKO +tinz|0|Tin|0|KO-BKO +tinz|0|Point|2|KO-BKO +tinz|0|LineString|2|KO-BKO +tinz|0|Polygon|2|KO-BKO +tinz|0|MultiPoint|2|KO-BKO +tinz|0|MultiLineString|2|KO-BKO +tinz|0|MultiPolygon|2|KO-BKO +tinz|0|GeometryCollection|2|KO-BKO +tinz|0|CircularString|2|KO-BKO +tinz|0|CompoundCurve|2|KO-BKO +tinz|0|CurvePolygon|2|KO-BKO +tinz|0|MultiCurve|2|KO-BKO +tinz|0|MultiSurface|2|KO-BKO +tinz|0|PolyhedralSurface|2|KO-BKO +tinz|0|Triangle|2|KO-BKO +tinz|0|Point|1|KO-BKO +tinz|0|LineString|1|KO-BKO +tinz|0|Polygon|1|KO-BKO +tinz|0|MultiPoint|1|KO-BKO +tinz|0|MultiLineString|1|KO-BKO +tinz|0|MultiPolygon|1|KO-BKO +tinz|0|GeometryCollection|1|KO-BKO +tinz|0|CircularString|1|KO-BKO +tinz|0|CompoundCurve|1|KO-BKO +tinz|0|CurvePolygon|1|KO-BKO +tinz|0|MultiCurve|1|KO-BKO +tinz|0|MultiSurface|1|KO-BKO +tinz|0|PolyhedralSurface|1|KO-BKO +tinz|0|Triangle|1|KO-BKO +tinz|0|Point|3|KO-BKO +tinz|0|LineString|3|KO-BKO +tinz|0|Polygon|3|KO-BKO +tinz|0|MultiPoint|3|KO-BKO +tinz|0|MultiLineString|3|KO-BKO +tinz|0|MultiPolygon|3|KO-BKO +tinz|0|GeometryCollection|3|KO-BKO +tinz|0|CircularString|3|KO-BKO +tinz|0|CompoundCurve|3|KO-BKO +tinz|0|CurvePolygon|3|KO-BKO +tinz|0|MultiCurve|3|KO-BKO +tinz|0|MultiSurface|3|KO-BKO +tinz|0|PolyhedralSurface|3|KO-BKO +tinz|0|Triangle|3|KO-BKO +tinz|4326|Point|0|KO-BKO +tinz|4326|LineString|0|KO-BKO +tinz|4326|Polygon|0|KO-BKO +tinz|4326|MultiPoint|0|KO-BKO +tinz|4326|MultiLineString|0|KO-BKO +tinz|4326|MultiPolygon|0|KO-BKO +tinz|4326|GeometryCollection|0|KO-BKO +tinz|4326|CircularString|0|KO-BKO +tinz|4326|CompoundCurve|0|KO-BKO +tinz|4326|CurvePolygon|0|KO-BKO +tinz|4326|MultiCurve|0|KO-BKO +tinz|4326|MultiSurface|0|KO-BKO +tinz|4326|PolyhedralSurface|0|KO-BKO +tinz|4326|Triangle|0|KO-BKO +tinz|4326|Tin|0|KO-BKO +tinz|4326|Point|2|KO-BKO +tinz|4326|LineString|2|KO-BKO +tinz|4326|Polygon|2|KO-BKO +tinz|4326|MultiPoint|2|KO-BKO +tinz|4326|MultiLineString|2|KO-BKO +tinz|4326|MultiPolygon|2|KO-BKO +tinz|4326|GeometryCollection|2|KO-BKO +tinz|4326|CircularString|2|KO-BKO +tinz|4326|CompoundCurve|2|KO-BKO +tinz|4326|CurvePolygon|2|KO-BKO +tinz|4326|MultiCurve|2|KO-BKO +tinz|4326|MultiSurface|2|KO-BKO +tinz|4326|PolyhedralSurface|2|KO-BKO +tinz|4326|Triangle|2|KO-BKO +tinz|4326|Point|1|KO-BKO +tinz|4326|LineString|1|KO-BKO +tinz|4326|Polygon|1|KO-BKO +tinz|4326|MultiPoint|1|KO-BKO +tinz|4326|MultiLineString|1|KO-BKO +tinz|4326|MultiPolygon|1|KO-BKO +tinz|4326|GeometryCollection|1|KO-BKO +tinz|4326|CircularString|1|KO-BKO +tinz|4326|CompoundCurve|1|KO-BKO +tinz|4326|CurvePolygon|1|KO-BKO +tinz|4326|MultiCurve|1|KO-BKO +tinz|4326|MultiSurface|1|KO-BKO +tinz|4326|PolyhedralSurface|1|KO-BKO +tinz|4326|Triangle|1|KO-BKO +tinz|4326|Point|3|KO-BKO +tinz|4326|LineString|3|KO-BKO +tinz|4326|Polygon|3|KO-BKO +tinz|4326|MultiPoint|3|KO-BKO +tinz|4326|MultiLineString|3|KO-BKO +tinz|4326|MultiPolygon|3|KO-BKO +tinz|4326|GeometryCollection|3|KO-BKO +tinz|4326|CircularString|3|KO-BKO +tinz|4326|CompoundCurve|3|KO-BKO +tinz|4326|CurvePolygon|3|KO-BKO +tinz|4326|MultiCurve|3|KO-BKO +tinz|4326|MultiSurface|3|KO-BKO +tinz|4326|PolyhedralSurface|3|KO-BKO +tinz|4326|Triangle|3|KO-BKO +tinz||COUNT|0| +tinz0|0|Point|0|KO-BKO +tinz0|0|LineString|0|KO-BKO +tinz0|0|Polygon|0|KO-BKO +tinz0|0|MultiPoint|0|KO-BKO +tinz0|0|MultiLineString|0|KO-BKO +tinz0|0|MultiPolygon|0|KO-BKO +tinz0|0|GeometryCollection|0|KO-BKO +tinz0|0|CircularString|0|KO-BKO +tinz0|0|CompoundCurve|0|KO-BKO +tinz0|0|CurvePolygon|0|KO-BKO +tinz0|0|MultiCurve|0|KO-BKO +tinz0|0|MultiSurface|0|KO-BKO +tinz0|0|PolyhedralSurface|0|KO-BKO +tinz0|0|Triangle|0|KO-BKO +tinz0|0|Tin|0|KO-BKO +tinz0|0|Point|2|KO-BKO +tinz0|0|LineString|2|KO-BKO +tinz0|0|Polygon|2|KO-BKO +tinz0|0|MultiPoint|2|KO-BKO +tinz0|0|MultiLineString|2|KO-BKO +tinz0|0|MultiPolygon|2|KO-BKO +tinz0|0|GeometryCollection|2|KO-BKO +tinz0|0|CircularString|2|KO-BKO +tinz0|0|CompoundCurve|2|KO-BKO +tinz0|0|CurvePolygon|2|KO-BKO +tinz0|0|MultiCurve|2|KO-BKO +tinz0|0|MultiSurface|2|KO-BKO +tinz0|0|PolyhedralSurface|2|KO-BKO +tinz0|0|Triangle|2|KO-BKO +tinz0|0|Point|1|KO-BKO +tinz0|0|LineString|1|KO-BKO +tinz0|0|Polygon|1|KO-BKO +tinz0|0|MultiPoint|1|KO-BKO +tinz0|0|MultiLineString|1|KO-BKO +tinz0|0|MultiPolygon|1|KO-BKO +tinz0|0|GeometryCollection|1|KO-BKO +tinz0|0|CircularString|1|KO-BKO +tinz0|0|CompoundCurve|1|KO-BKO +tinz0|0|CurvePolygon|1|KO-BKO +tinz0|0|MultiCurve|1|KO-BKO +tinz0|0|MultiSurface|1|KO-BKO +tinz0|0|PolyhedralSurface|1|KO-BKO +tinz0|0|Triangle|1|KO-BKO +tinz0|0|Point|3|KO-BKO +tinz0|0|LineString|3|KO-BKO +tinz0|0|Polygon|3|KO-BKO +tinz0|0|MultiPoint|3|KO-BKO +tinz0|0|MultiLineString|3|KO-BKO +tinz0|0|MultiPolygon|3|KO-BKO +tinz0|0|GeometryCollection|3|KO-BKO +tinz0|0|CircularString|3|KO-BKO +tinz0|0|CompoundCurve|3|KO-BKO +tinz0|0|CurvePolygon|3|KO-BKO +tinz0|0|MultiCurve|3|KO-BKO +tinz0|0|MultiSurface|3|KO-BKO +tinz0|0|PolyhedralSurface|3|KO-BKO +tinz0|0|Triangle|3|KO-BKO +tinz0|4326|Point|0|KO-BKO +tinz0|4326|LineString|0|KO-BKO +tinz0|4326|Polygon|0|KO-BKO +tinz0|4326|MultiPoint|0|KO-BKO +tinz0|4326|MultiLineString|0|KO-BKO +tinz0|4326|MultiPolygon|0|KO-BKO +tinz0|4326|GeometryCollection|0|KO-BKO +tinz0|4326|CircularString|0|KO-BKO +tinz0|4326|CompoundCurve|0|KO-BKO +tinz0|4326|CurvePolygon|0|KO-BKO +tinz0|4326|MultiCurve|0|KO-BKO +tinz0|4326|MultiSurface|0|KO-BKO +tinz0|4326|PolyhedralSurface|0|KO-BKO +tinz0|4326|Triangle|0|KO-BKO +tinz0|4326|Tin|0|KO-BKO +tinz0|4326|Point|2|KO-BKO +tinz0|4326|LineString|2|KO-BKO +tinz0|4326|Polygon|2|KO-BKO +tinz0|4326|MultiPoint|2|KO-BKO +tinz0|4326|MultiLineString|2|KO-BKO +tinz0|4326|MultiPolygon|2|KO-BKO +tinz0|4326|GeometryCollection|2|KO-BKO +tinz0|4326|CircularString|2|KO-BKO +tinz0|4326|CompoundCurve|2|KO-BKO +tinz0|4326|CurvePolygon|2|KO-BKO +tinz0|4326|MultiCurve|2|KO-BKO +tinz0|4326|MultiSurface|2|KO-BKO +tinz0|4326|PolyhedralSurface|2|KO-BKO +tinz0|4326|Triangle|2|KO-BKO +tinz0|4326|Point|1|KO-BKO +tinz0|4326|LineString|1|KO-BKO +tinz0|4326|Polygon|1|KO-BKO +tinz0|4326|MultiPoint|1|KO-BKO +tinz0|4326|MultiLineString|1|KO-BKO +tinz0|4326|MultiPolygon|1|KO-BKO +tinz0|4326|GeometryCollection|1|KO-BKO +tinz0|4326|CircularString|1|KO-BKO +tinz0|4326|CompoundCurve|1|KO-BKO +tinz0|4326|CurvePolygon|1|KO-BKO +tinz0|4326|MultiCurve|1|KO-BKO +tinz0|4326|MultiSurface|1|KO-BKO +tinz0|4326|PolyhedralSurface|1|KO-BKO +tinz0|4326|Triangle|1|KO-BKO +tinz0|4326|Point|3|KO-BKO +tinz0|4326|LineString|3|KO-BKO +tinz0|4326|Polygon|3|KO-BKO +tinz0|4326|MultiPoint|3|KO-BKO +tinz0|4326|MultiLineString|3|KO-BKO +tinz0|4326|MultiPolygon|3|KO-BKO +tinz0|4326|GeometryCollection|3|KO-BKO +tinz0|4326|CircularString|3|KO-BKO +tinz0|4326|CompoundCurve|3|KO-BKO +tinz0|4326|CurvePolygon|3|KO-BKO +tinz0|4326|MultiCurve|3|KO-BKO +tinz0|4326|MultiSurface|3|KO-BKO +tinz0|4326|PolyhedralSurface|3|KO-BKO +tinz0|4326|Triangle|3|KO-BKO +tinz0||COUNT|0| +tinz4326|0|Point|0|KO-BKO +tinz4326|0|LineString|0|KO-BKO +tinz4326|0|Polygon|0|KO-BKO +tinz4326|0|MultiPoint|0|KO-BKO +tinz4326|0|MultiLineString|0|KO-BKO +tinz4326|0|MultiPolygon|0|KO-BKO +tinz4326|0|GeometryCollection|0|KO-BKO +tinz4326|0|CircularString|0|KO-BKO +tinz4326|0|CompoundCurve|0|KO-BKO +tinz4326|0|CurvePolygon|0|KO-BKO +tinz4326|0|MultiCurve|0|KO-BKO +tinz4326|0|MultiSurface|0|KO-BKO +tinz4326|0|PolyhedralSurface|0|KO-BKO +tinz4326|0|Triangle|0|KO-BKO +tinz4326|0|Tin|0|KO-BKO +tinz4326|0|Point|2|KO-BKO +tinz4326|0|LineString|2|KO-BKO +tinz4326|0|Polygon|2|KO-BKO +tinz4326|0|MultiPoint|2|KO-BKO +tinz4326|0|MultiLineString|2|KO-BKO +tinz4326|0|MultiPolygon|2|KO-BKO +tinz4326|0|GeometryCollection|2|KO-BKO +tinz4326|0|CircularString|2|KO-BKO +tinz4326|0|CompoundCurve|2|KO-BKO +tinz4326|0|CurvePolygon|2|KO-BKO +tinz4326|0|MultiCurve|2|KO-BKO +tinz4326|0|MultiSurface|2|KO-BKO +tinz4326|0|PolyhedralSurface|2|KO-BKO +tinz4326|0|Triangle|2|KO-BKO +tinz4326|0|Point|1|KO-BKO +tinz4326|0|LineString|1|KO-BKO +tinz4326|0|Polygon|1|KO-BKO +tinz4326|0|MultiPoint|1|KO-BKO +tinz4326|0|MultiLineString|1|KO-BKO +tinz4326|0|MultiPolygon|1|KO-BKO +tinz4326|0|GeometryCollection|1|KO-BKO +tinz4326|0|CircularString|1|KO-BKO +tinz4326|0|CompoundCurve|1|KO-BKO +tinz4326|0|CurvePolygon|1|KO-BKO +tinz4326|0|MultiCurve|1|KO-BKO +tinz4326|0|MultiSurface|1|KO-BKO +tinz4326|0|PolyhedralSurface|1|KO-BKO +tinz4326|0|Triangle|1|KO-BKO +tinz4326|0|Point|3|KO-BKO +tinz4326|0|LineString|3|KO-BKO +tinz4326|0|Polygon|3|KO-BKO +tinz4326|0|MultiPoint|3|KO-BKO +tinz4326|0|MultiLineString|3|KO-BKO +tinz4326|0|MultiPolygon|3|KO-BKO +tinz4326|0|GeometryCollection|3|KO-BKO +tinz4326|0|CircularString|3|KO-BKO +tinz4326|0|CompoundCurve|3|KO-BKO +tinz4326|0|CurvePolygon|3|KO-BKO +tinz4326|0|MultiCurve|3|KO-BKO +tinz4326|0|MultiSurface|3|KO-BKO +tinz4326|0|PolyhedralSurface|3|KO-BKO +tinz4326|0|Triangle|3|KO-BKO +tinz4326|4326|Point|0|KO-BKO +tinz4326|4326|LineString|0|KO-BKO +tinz4326|4326|Polygon|0|KO-BKO +tinz4326|4326|MultiPoint|0|KO-BKO +tinz4326|4326|MultiLineString|0|KO-BKO +tinz4326|4326|MultiPolygon|0|KO-BKO +tinz4326|4326|GeometryCollection|0|KO-BKO +tinz4326|4326|CircularString|0|KO-BKO +tinz4326|4326|CompoundCurve|0|KO-BKO +tinz4326|4326|CurvePolygon|0|KO-BKO +tinz4326|4326|MultiCurve|0|KO-BKO +tinz4326|4326|MultiSurface|0|KO-BKO +tinz4326|4326|PolyhedralSurface|0|KO-BKO +tinz4326|4326|Triangle|0|KO-BKO +tinz4326|4326|Tin|0|KO-BKO +tinz4326|4326|Point|2|KO-BKO +tinz4326|4326|LineString|2|KO-BKO +tinz4326|4326|Polygon|2|KO-BKO +tinz4326|4326|MultiPoint|2|KO-BKO +tinz4326|4326|MultiLineString|2|KO-BKO +tinz4326|4326|MultiPolygon|2|KO-BKO +tinz4326|4326|GeometryCollection|2|KO-BKO +tinz4326|4326|CircularString|2|KO-BKO +tinz4326|4326|CompoundCurve|2|KO-BKO +tinz4326|4326|CurvePolygon|2|KO-BKO +tinz4326|4326|MultiCurve|2|KO-BKO +tinz4326|4326|MultiSurface|2|KO-BKO +tinz4326|4326|PolyhedralSurface|2|KO-BKO +tinz4326|4326|Triangle|2|KO-BKO +tinz4326|4326|Point|1|KO-BKO +tinz4326|4326|LineString|1|KO-BKO +tinz4326|4326|Polygon|1|KO-BKO +tinz4326|4326|MultiPoint|1|KO-BKO +tinz4326|4326|MultiLineString|1|KO-BKO +tinz4326|4326|MultiPolygon|1|KO-BKO +tinz4326|4326|GeometryCollection|1|KO-BKO +tinz4326|4326|CircularString|1|KO-BKO +tinz4326|4326|CompoundCurve|1|KO-BKO +tinz4326|4326|CurvePolygon|1|KO-BKO +tinz4326|4326|MultiCurve|1|KO-BKO +tinz4326|4326|MultiSurface|1|KO-BKO +tinz4326|4326|PolyhedralSurface|1|KO-BKO +tinz4326|4326|Triangle|1|KO-BKO +tinz4326|4326|Point|3|KO-BKO +tinz4326|4326|LineString|3|KO-BKO +tinz4326|4326|Polygon|3|KO-BKO +tinz4326|4326|MultiPoint|3|KO-BKO +tinz4326|4326|MultiLineString|3|KO-BKO +tinz4326|4326|MultiPolygon|3|KO-BKO +tinz4326|4326|GeometryCollection|3|KO-BKO +tinz4326|4326|CircularString|3|KO-BKO +tinz4326|4326|CompoundCurve|3|KO-BKO +tinz4326|4326|CurvePolygon|3|KO-BKO +tinz4326|4326|MultiCurve|3|KO-BKO +tinz4326|4326|MultiSurface|3|KO-BKO +tinz4326|4326|PolyhedralSurface|3|KO-BKO +tinz4326|4326|Triangle|3|KO-BKO +tinz4326||COUNT|0| +tinzm|0|Point|0|KO-BKO +tinzm|0|LineString|0|KO-BKO +tinzm|0|Polygon|0|KO-BKO +tinzm|0|MultiPoint|0|KO-BKO +tinzm|0|MultiLineString|0|KO-BKO +tinzm|0|MultiPolygon|0|KO-BKO +tinzm|0|GeometryCollection|0|KO-BKO +tinzm|0|CircularString|0|KO-BKO +tinzm|0|CompoundCurve|0|KO-BKO +tinzm|0|CurvePolygon|0|KO-BKO +tinzm|0|MultiCurve|0|KO-BKO +tinzm|0|MultiSurface|0|KO-BKO +tinzm|0|PolyhedralSurface|0|KO-BKO +tinzm|0|Triangle|0|KO-BKO +tinzm|0|Tin|0|KO-BKO +tinzm|0|Point|2|KO-BKO +tinzm|0|LineString|2|KO-BKO +tinzm|0|Polygon|2|KO-BKO +tinzm|0|MultiPoint|2|KO-BKO +tinzm|0|MultiLineString|2|KO-BKO +tinzm|0|MultiPolygon|2|KO-BKO +tinzm|0|GeometryCollection|2|KO-BKO +tinzm|0|CircularString|2|KO-BKO +tinzm|0|CompoundCurve|2|KO-BKO +tinzm|0|CurvePolygon|2|KO-BKO +tinzm|0|MultiCurve|2|KO-BKO +tinzm|0|MultiSurface|2|KO-BKO +tinzm|0|PolyhedralSurface|2|KO-BKO +tinzm|0|Triangle|2|KO-BKO +tinzm|0|Point|1|KO-BKO +tinzm|0|LineString|1|KO-BKO +tinzm|0|Polygon|1|KO-BKO +tinzm|0|MultiPoint|1|KO-BKO +tinzm|0|MultiLineString|1|KO-BKO +tinzm|0|MultiPolygon|1|KO-BKO +tinzm|0|GeometryCollection|1|KO-BKO +tinzm|0|CircularString|1|KO-BKO +tinzm|0|CompoundCurve|1|KO-BKO +tinzm|0|CurvePolygon|1|KO-BKO +tinzm|0|MultiCurve|1|KO-BKO +tinzm|0|MultiSurface|1|KO-BKO +tinzm|0|PolyhedralSurface|1|KO-BKO +tinzm|0|Triangle|1|KO-BKO +tinzm|0|Point|3|KO-BKO +tinzm|0|LineString|3|KO-BKO +tinzm|0|Polygon|3|KO-BKO +tinzm|0|MultiPoint|3|KO-BKO +tinzm|0|MultiLineString|3|KO-BKO +tinzm|0|MultiPolygon|3|KO-BKO +tinzm|0|GeometryCollection|3|KO-BKO +tinzm|0|CircularString|3|KO-BKO +tinzm|0|CompoundCurve|3|KO-BKO +tinzm|0|CurvePolygon|3|KO-BKO +tinzm|0|MultiCurve|3|KO-BKO +tinzm|0|MultiSurface|3|KO-BKO +tinzm|0|PolyhedralSurface|3|KO-BKO +tinzm|0|Triangle|3|KO-BKO +tinzm|4326|Point|0|KO-BKO +tinzm|4326|LineString|0|KO-BKO +tinzm|4326|Polygon|0|KO-BKO +tinzm|4326|MultiPoint|0|KO-BKO +tinzm|4326|MultiLineString|0|KO-BKO +tinzm|4326|MultiPolygon|0|KO-BKO +tinzm|4326|GeometryCollection|0|KO-BKO +tinzm|4326|CircularString|0|KO-BKO +tinzm|4326|CompoundCurve|0|KO-BKO +tinzm|4326|CurvePolygon|0|KO-BKO +tinzm|4326|MultiCurve|0|KO-BKO +tinzm|4326|MultiSurface|0|KO-BKO +tinzm|4326|PolyhedralSurface|0|KO-BKO +tinzm|4326|Triangle|0|KO-BKO +tinzm|4326|Tin|0|KO-BKO +tinzm|4326|Point|2|KO-BKO +tinzm|4326|LineString|2|KO-BKO +tinzm|4326|Polygon|2|KO-BKO +tinzm|4326|MultiPoint|2|KO-BKO +tinzm|4326|MultiLineString|2|KO-BKO +tinzm|4326|MultiPolygon|2|KO-BKO +tinzm|4326|GeometryCollection|2|KO-BKO +tinzm|4326|CircularString|2|KO-BKO +tinzm|4326|CompoundCurve|2|KO-BKO +tinzm|4326|CurvePolygon|2|KO-BKO +tinzm|4326|MultiCurve|2|KO-BKO +tinzm|4326|MultiSurface|2|KO-BKO +tinzm|4326|PolyhedralSurface|2|KO-BKO +tinzm|4326|Triangle|2|KO-BKO +tinzm|4326|Point|1|KO-BKO +tinzm|4326|LineString|1|KO-BKO +tinzm|4326|Polygon|1|KO-BKO +tinzm|4326|MultiPoint|1|KO-BKO +tinzm|4326|MultiLineString|1|KO-BKO +tinzm|4326|MultiPolygon|1|KO-BKO +tinzm|4326|GeometryCollection|1|KO-BKO +tinzm|4326|CircularString|1|KO-BKO +tinzm|4326|CompoundCurve|1|KO-BKO +tinzm|4326|CurvePolygon|1|KO-BKO +tinzm|4326|MultiCurve|1|KO-BKO +tinzm|4326|MultiSurface|1|KO-BKO +tinzm|4326|PolyhedralSurface|1|KO-BKO +tinzm|4326|Triangle|1|KO-BKO +tinzm|4326|Point|3|KO-BKO +tinzm|4326|LineString|3|KO-BKO +tinzm|4326|Polygon|3|KO-BKO +tinzm|4326|MultiPoint|3|KO-BKO +tinzm|4326|MultiLineString|3|KO-BKO +tinzm|4326|MultiPolygon|3|KO-BKO +tinzm|4326|GeometryCollection|3|KO-BKO +tinzm|4326|CircularString|3|KO-BKO +tinzm|4326|CompoundCurve|3|KO-BKO +tinzm|4326|CurvePolygon|3|KO-BKO +tinzm|4326|MultiCurve|3|KO-BKO +tinzm|4326|MultiSurface|3|KO-BKO +tinzm|4326|PolyhedralSurface|3|KO-BKO +tinzm|4326|Triangle|3|KO-BKO +tinzm||COUNT|0| +tinzm0|0|Point|0|KO-BKO +tinzm0|0|LineString|0|KO-BKO +tinzm0|0|Polygon|0|KO-BKO +tinzm0|0|MultiPoint|0|KO-BKO +tinzm0|0|MultiLineString|0|KO-BKO +tinzm0|0|MultiPolygon|0|KO-BKO +tinzm0|0|GeometryCollection|0|KO-BKO +tinzm0|0|CircularString|0|KO-BKO +tinzm0|0|CompoundCurve|0|KO-BKO +tinzm0|0|CurvePolygon|0|KO-BKO +tinzm0|0|MultiCurve|0|KO-BKO +tinzm0|0|MultiSurface|0|KO-BKO +tinzm0|0|PolyhedralSurface|0|KO-BKO +tinzm0|0|Triangle|0|KO-BKO +tinzm0|0|Tin|0|KO-BKO +tinzm0|0|Point|2|KO-BKO +tinzm0|0|LineString|2|KO-BKO +tinzm0|0|Polygon|2|KO-BKO +tinzm0|0|MultiPoint|2|KO-BKO +tinzm0|0|MultiLineString|2|KO-BKO +tinzm0|0|MultiPolygon|2|KO-BKO +tinzm0|0|GeometryCollection|2|KO-BKO +tinzm0|0|CircularString|2|KO-BKO +tinzm0|0|CompoundCurve|2|KO-BKO +tinzm0|0|CurvePolygon|2|KO-BKO +tinzm0|0|MultiCurve|2|KO-BKO +tinzm0|0|MultiSurface|2|KO-BKO +tinzm0|0|PolyhedralSurface|2|KO-BKO +tinzm0|0|Triangle|2|KO-BKO +tinzm0|0|Point|1|KO-BKO +tinzm0|0|LineString|1|KO-BKO +tinzm0|0|Polygon|1|KO-BKO +tinzm0|0|MultiPoint|1|KO-BKO +tinzm0|0|MultiLineString|1|KO-BKO +tinzm0|0|MultiPolygon|1|KO-BKO +tinzm0|0|GeometryCollection|1|KO-BKO +tinzm0|0|CircularString|1|KO-BKO +tinzm0|0|CompoundCurve|1|KO-BKO +tinzm0|0|CurvePolygon|1|KO-BKO +tinzm0|0|MultiCurve|1|KO-BKO +tinzm0|0|MultiSurface|1|KO-BKO +tinzm0|0|PolyhedralSurface|1|KO-BKO +tinzm0|0|Triangle|1|KO-BKO +tinzm0|0|Point|3|KO-BKO +tinzm0|0|LineString|3|KO-BKO +tinzm0|0|Polygon|3|KO-BKO +tinzm0|0|MultiPoint|3|KO-BKO +tinzm0|0|MultiLineString|3|KO-BKO +tinzm0|0|MultiPolygon|3|KO-BKO +tinzm0|0|GeometryCollection|3|KO-BKO +tinzm0|0|CircularString|3|KO-BKO +tinzm0|0|CompoundCurve|3|KO-BKO +tinzm0|0|CurvePolygon|3|KO-BKO +tinzm0|0|MultiCurve|3|KO-BKO +tinzm0|0|MultiSurface|3|KO-BKO +tinzm0|0|PolyhedralSurface|3|KO-BKO +tinzm0|0|Triangle|3|KO-BKO +tinzm0|4326|Point|0|KO-BKO +tinzm0|4326|LineString|0|KO-BKO +tinzm0|4326|Polygon|0|KO-BKO +tinzm0|4326|MultiPoint|0|KO-BKO +tinzm0|4326|MultiLineString|0|KO-BKO +tinzm0|4326|MultiPolygon|0|KO-BKO +tinzm0|4326|GeometryCollection|0|KO-BKO +tinzm0|4326|CircularString|0|KO-BKO +tinzm0|4326|CompoundCurve|0|KO-BKO +tinzm0|4326|CurvePolygon|0|KO-BKO +tinzm0|4326|MultiCurve|0|KO-BKO +tinzm0|4326|MultiSurface|0|KO-BKO +tinzm0|4326|PolyhedralSurface|0|KO-BKO +tinzm0|4326|Triangle|0|KO-BKO +tinzm0|4326|Tin|0|KO-BKO +tinzm0|4326|Point|2|KO-BKO +tinzm0|4326|LineString|2|KO-BKO +tinzm0|4326|Polygon|2|KO-BKO +tinzm0|4326|MultiPoint|2|KO-BKO +tinzm0|4326|MultiLineString|2|KO-BKO +tinzm0|4326|MultiPolygon|2|KO-BKO +tinzm0|4326|GeometryCollection|2|KO-BKO +tinzm0|4326|CircularString|2|KO-BKO +tinzm0|4326|CompoundCurve|2|KO-BKO +tinzm0|4326|CurvePolygon|2|KO-BKO +tinzm0|4326|MultiCurve|2|KO-BKO +tinzm0|4326|MultiSurface|2|KO-BKO +tinzm0|4326|PolyhedralSurface|2|KO-BKO +tinzm0|4326|Triangle|2|KO-BKO +tinzm0|4326|Point|1|KO-BKO +tinzm0|4326|LineString|1|KO-BKO +tinzm0|4326|Polygon|1|KO-BKO +tinzm0|4326|MultiPoint|1|KO-BKO +tinzm0|4326|MultiLineString|1|KO-BKO +tinzm0|4326|MultiPolygon|1|KO-BKO +tinzm0|4326|GeometryCollection|1|KO-BKO +tinzm0|4326|CircularString|1|KO-BKO +tinzm0|4326|CompoundCurve|1|KO-BKO +tinzm0|4326|CurvePolygon|1|KO-BKO +tinzm0|4326|MultiCurve|1|KO-BKO +tinzm0|4326|MultiSurface|1|KO-BKO +tinzm0|4326|PolyhedralSurface|1|KO-BKO +tinzm0|4326|Triangle|1|KO-BKO +tinzm0|4326|Point|3|KO-BKO +tinzm0|4326|LineString|3|KO-BKO +tinzm0|4326|Polygon|3|KO-BKO +tinzm0|4326|MultiPoint|3|KO-BKO +tinzm0|4326|MultiLineString|3|KO-BKO +tinzm0|4326|MultiPolygon|3|KO-BKO +tinzm0|4326|GeometryCollection|3|KO-BKO +tinzm0|4326|CircularString|3|KO-BKO +tinzm0|4326|CompoundCurve|3|KO-BKO +tinzm0|4326|CurvePolygon|3|KO-BKO +tinzm0|4326|MultiCurve|3|KO-BKO +tinzm0|4326|MultiSurface|3|KO-BKO +tinzm0|4326|PolyhedralSurface|3|KO-BKO +tinzm0|4326|Triangle|3|KO-BKO +tinzm0||COUNT|0| +tinzm4326|0|Point|0|KO-BKO +tinzm4326|0|LineString|0|KO-BKO +tinzm4326|0|Polygon|0|KO-BKO +tinzm4326|0|MultiPoint|0|KO-BKO +tinzm4326|0|MultiLineString|0|KO-BKO +tinzm4326|0|MultiPolygon|0|KO-BKO +tinzm4326|0|GeometryCollection|0|KO-BKO +tinzm4326|0|CircularString|0|KO-BKO +tinzm4326|0|CompoundCurve|0|KO-BKO +tinzm4326|0|CurvePolygon|0|KO-BKO +tinzm4326|0|MultiCurve|0|KO-BKO +tinzm4326|0|MultiSurface|0|KO-BKO +tinzm4326|0|PolyhedralSurface|0|KO-BKO +tinzm4326|0|Triangle|0|KO-BKO +tinzm4326|0|Tin|0|KO-BKO +tinzm4326|0|Point|2|KO-BKO +tinzm4326|0|LineString|2|KO-BKO +tinzm4326|0|Polygon|2|KO-BKO +tinzm4326|0|MultiPoint|2|KO-BKO +tinzm4326|0|MultiLineString|2|KO-BKO +tinzm4326|0|MultiPolygon|2|KO-BKO +tinzm4326|0|GeometryCollection|2|KO-BKO +tinzm4326|0|CircularString|2|KO-BKO +tinzm4326|0|CompoundCurve|2|KO-BKO +tinzm4326|0|CurvePolygon|2|KO-BKO +tinzm4326|0|MultiCurve|2|KO-BKO +tinzm4326|0|MultiSurface|2|KO-BKO +tinzm4326|0|PolyhedralSurface|2|KO-BKO +tinzm4326|0|Triangle|2|KO-BKO +tinzm4326|0|Point|1|KO-BKO +tinzm4326|0|LineString|1|KO-BKO +tinzm4326|0|Polygon|1|KO-BKO +tinzm4326|0|MultiPoint|1|KO-BKO +tinzm4326|0|MultiLineString|1|KO-BKO +tinzm4326|0|MultiPolygon|1|KO-BKO +tinzm4326|0|GeometryCollection|1|KO-BKO +tinzm4326|0|CircularString|1|KO-BKO +tinzm4326|0|CompoundCurve|1|KO-BKO +tinzm4326|0|CurvePolygon|1|KO-BKO +tinzm4326|0|MultiCurve|1|KO-BKO +tinzm4326|0|MultiSurface|1|KO-BKO +tinzm4326|0|PolyhedralSurface|1|KO-BKO +tinzm4326|0|Triangle|1|KO-BKO +tinzm4326|0|Point|3|KO-BKO +tinzm4326|0|LineString|3|KO-BKO +tinzm4326|0|Polygon|3|KO-BKO +tinzm4326|0|MultiPoint|3|KO-BKO +tinzm4326|0|MultiLineString|3|KO-BKO +tinzm4326|0|MultiPolygon|3|KO-BKO +tinzm4326|0|GeometryCollection|3|KO-BKO +tinzm4326|0|CircularString|3|KO-BKO +tinzm4326|0|CompoundCurve|3|KO-BKO +tinzm4326|0|CurvePolygon|3|KO-BKO +tinzm4326|0|MultiCurve|3|KO-BKO +tinzm4326|0|MultiSurface|3|KO-BKO +tinzm4326|0|PolyhedralSurface|3|KO-BKO +tinzm4326|0|Triangle|3|KO-BKO +tinzm4326|4326|Point|0|KO-BKO +tinzm4326|4326|LineString|0|KO-BKO +tinzm4326|4326|Polygon|0|KO-BKO +tinzm4326|4326|MultiPoint|0|KO-BKO +tinzm4326|4326|MultiLineString|0|KO-BKO +tinzm4326|4326|MultiPolygon|0|KO-BKO +tinzm4326|4326|GeometryCollection|0|KO-BKO +tinzm4326|4326|CircularString|0|KO-BKO +tinzm4326|4326|CompoundCurve|0|KO-BKO +tinzm4326|4326|CurvePolygon|0|KO-BKO +tinzm4326|4326|MultiCurve|0|KO-BKO +tinzm4326|4326|MultiSurface|0|KO-BKO +tinzm4326|4326|PolyhedralSurface|0|KO-BKO +tinzm4326|4326|Triangle|0|KO-BKO +tinzm4326|4326|Tin|0|KO-BKO +tinzm4326|4326|Point|2|KO-BKO +tinzm4326|4326|LineString|2|KO-BKO +tinzm4326|4326|Polygon|2|KO-BKO +tinzm4326|4326|MultiPoint|2|KO-BKO +tinzm4326|4326|MultiLineString|2|KO-BKO +tinzm4326|4326|MultiPolygon|2|KO-BKO +tinzm4326|4326|GeometryCollection|2|KO-BKO +tinzm4326|4326|CircularString|2|KO-BKO +tinzm4326|4326|CompoundCurve|2|KO-BKO +tinzm4326|4326|CurvePolygon|2|KO-BKO +tinzm4326|4326|MultiCurve|2|KO-BKO +tinzm4326|4326|MultiSurface|2|KO-BKO +tinzm4326|4326|PolyhedralSurface|2|KO-BKO +tinzm4326|4326|Triangle|2|KO-BKO +tinzm4326|4326|Point|1|KO-BKO +tinzm4326|4326|LineString|1|KO-BKO +tinzm4326|4326|Polygon|1|KO-BKO +tinzm4326|4326|MultiPoint|1|KO-BKO +tinzm4326|4326|MultiLineString|1|KO-BKO +tinzm4326|4326|MultiPolygon|1|KO-BKO +tinzm4326|4326|GeometryCollection|1|KO-BKO +tinzm4326|4326|CircularString|1|KO-BKO +tinzm4326|4326|CompoundCurve|1|KO-BKO +tinzm4326|4326|CurvePolygon|1|KO-BKO +tinzm4326|4326|MultiCurve|1|KO-BKO +tinzm4326|4326|MultiSurface|1|KO-BKO +tinzm4326|4326|PolyhedralSurface|1|KO-BKO +tinzm4326|4326|Triangle|1|KO-BKO +tinzm4326|4326|Point|3|KO-BKO +tinzm4326|4326|LineString|3|KO-BKO +tinzm4326|4326|Polygon|3|KO-BKO +tinzm4326|4326|MultiPoint|3|KO-BKO +tinzm4326|4326|MultiLineString|3|KO-BKO +tinzm4326|4326|MultiPolygon|3|KO-BKO +tinzm4326|4326|GeometryCollection|3|KO-BKO +tinzm4326|4326|CircularString|3|KO-BKO +tinzm4326|4326|CompoundCurve|3|KO-BKO +tinzm4326|4326|CurvePolygon|3|KO-BKO +tinzm4326|4326|MultiCurve|3|KO-BKO +tinzm4326|4326|MultiSurface|3|KO-BKO +tinzm4326|4326|PolyhedralSurface|3|KO-BKO +tinzm4326|4326|Triangle|3|KO-BKO +tinzm4326||COUNT|0| +triangle|0|Point|0|KO-BKO +triangle|0|LineString|0|KO-BKO +triangle|0|Polygon|0|KO-BKO +triangle|0|MultiPoint|0|KO-BKO +triangle|0|MultiLineString|0|KO-BKO +triangle|0|MultiPolygon|0|KO-BKO +triangle|0|GeometryCollection|0|KO-BKO +triangle|0|CircularString|0|KO-BKO +triangle|0|CompoundCurve|0|KO-BKO +triangle|0|CurvePolygon|0|KO-BKO +triangle|0|MultiCurve|0|KO-BKO +triangle|0|MultiSurface|0|KO-BKO +triangle|0|PolyhedralSurface|0|KO-BKO +triangle|0|Triangle|0|OK-BOK +triangle|0|Tin|0|KO-BKO +triangle|0|Point|2|KO-BKO +triangle|0|LineString|2|KO-BKO +triangle|0|Polygon|2|KO-BKO +triangle|0|MultiPoint|2|KO-BKO +triangle|0|MultiLineString|2|KO-BKO +triangle|0|MultiPolygon|2|KO-BKO +triangle|0|GeometryCollection|2|KO-BKO +triangle|0|CircularString|2|KO-BKO +triangle|0|CompoundCurve|2|KO-BKO +triangle|0|CurvePolygon|2|KO-BKO +triangle|0|MultiCurve|2|KO-BKO +triangle|0|MultiSurface|2|KO-BKO +triangle|0|PolyhedralSurface|2|KO-BKO +triangle|0|Triangle|2|KO-BKO +triangle|0|Point|1|KO-BKO +triangle|0|LineString|1|KO-BKO +triangle|0|Polygon|1|KO-BKO +triangle|0|MultiPoint|1|KO-BKO +triangle|0|MultiLineString|1|KO-BKO +triangle|0|MultiPolygon|1|KO-BKO +triangle|0|GeometryCollection|1|KO-BKO +triangle|0|CircularString|1|KO-BKO +triangle|0|CompoundCurve|1|KO-BKO +triangle|0|CurvePolygon|1|KO-BKO +triangle|0|MultiCurve|1|KO-BKO +triangle|0|MultiSurface|1|KO-BKO +triangle|0|PolyhedralSurface|1|KO-BKO +triangle|0|Triangle|1|KO-BKO +triangle|0|Point|3|KO-BKO +triangle|0|LineString|3|KO-BKO +triangle|0|Polygon|3|KO-BKO +triangle|0|MultiPoint|3|KO-BKO +triangle|0|MultiLineString|3|KO-BKO +triangle|0|MultiPolygon|3|KO-BKO +triangle|0|GeometryCollection|3|KO-BKO +triangle|0|CircularString|3|KO-BKO +triangle|0|CompoundCurve|3|KO-BKO +triangle|0|CurvePolygon|3|KO-BKO +triangle|0|MultiCurve|3|KO-BKO +triangle|0|MultiSurface|3|KO-BKO +triangle|0|PolyhedralSurface|3|KO-BKO +triangle|0|Triangle|3|KO-BKO +triangle|4326|Point|0|KO-BKO +triangle|4326|LineString|0|KO-BKO +triangle|4326|Polygon|0|KO-BKO +triangle|4326|MultiPoint|0|KO-BKO +triangle|4326|MultiLineString|0|KO-BKO +triangle|4326|MultiPolygon|0|KO-BKO +triangle|4326|GeometryCollection|0|KO-BKO +triangle|4326|CircularString|0|KO-BKO +triangle|4326|CompoundCurve|0|KO-BKO +triangle|4326|CurvePolygon|0|KO-BKO +triangle|4326|MultiCurve|0|KO-BKO +triangle|4326|MultiSurface|0|KO-BKO +triangle|4326|PolyhedralSurface|0|KO-BKO +triangle|4326|Triangle|0|OK-BOK +triangle|4326|Tin|0|KO-BKO +triangle|4326|Point|2|KO-BKO +triangle|4326|LineString|2|KO-BKO +triangle|4326|Polygon|2|KO-BKO +triangle|4326|MultiPoint|2|KO-BKO +triangle|4326|MultiLineString|2|KO-BKO +triangle|4326|MultiPolygon|2|KO-BKO +triangle|4326|GeometryCollection|2|KO-BKO +triangle|4326|CircularString|2|KO-BKO +triangle|4326|CompoundCurve|2|KO-BKO +triangle|4326|CurvePolygon|2|KO-BKO +triangle|4326|MultiCurve|2|KO-BKO +triangle|4326|MultiSurface|2|KO-BKO +triangle|4326|PolyhedralSurface|2|KO-BKO +triangle|4326|Triangle|2|KO-BKO +triangle|4326|Point|1|KO-BKO +triangle|4326|LineString|1|KO-BKO +triangle|4326|Polygon|1|KO-BKO +triangle|4326|MultiPoint|1|KO-BKO +triangle|4326|MultiLineString|1|KO-BKO +triangle|4326|MultiPolygon|1|KO-BKO +triangle|4326|GeometryCollection|1|KO-BKO +triangle|4326|CircularString|1|KO-BKO +triangle|4326|CompoundCurve|1|KO-BKO +triangle|4326|CurvePolygon|1|KO-BKO +triangle|4326|MultiCurve|1|KO-BKO +triangle|4326|MultiSurface|1|KO-BKO +triangle|4326|PolyhedralSurface|1|KO-BKO +triangle|4326|Triangle|1|KO-BKO +triangle|4326|Point|3|KO-BKO +triangle|4326|LineString|3|KO-BKO +triangle|4326|Polygon|3|KO-BKO +triangle|4326|MultiPoint|3|KO-BKO +triangle|4326|MultiLineString|3|KO-BKO +triangle|4326|MultiPolygon|3|KO-BKO +triangle|4326|GeometryCollection|3|KO-BKO +triangle|4326|CircularString|3|KO-BKO +triangle|4326|CompoundCurve|3|KO-BKO +triangle|4326|CurvePolygon|3|KO-BKO +triangle|4326|MultiCurve|3|KO-BKO +triangle|4326|MultiSurface|3|KO-BKO +triangle|4326|PolyhedralSurface|3|KO-BKO +triangle|4326|Triangle|3|KO-BKO +triangle||COUNT|4| +triangle0|0|Point|0|KO-BKO +triangle0|0|LineString|0|KO-BKO +triangle0|0|Polygon|0|KO-BKO +triangle0|0|MultiPoint|0|KO-BKO +triangle0|0|MultiLineString|0|KO-BKO +triangle0|0|MultiPolygon|0|KO-BKO +triangle0|0|GeometryCollection|0|KO-BKO +triangle0|0|CircularString|0|KO-BKO +triangle0|0|CompoundCurve|0|KO-BKO +triangle0|0|CurvePolygon|0|KO-BKO +triangle0|0|MultiCurve|0|KO-BKO +triangle0|0|MultiSurface|0|KO-BKO +triangle0|0|PolyhedralSurface|0|KO-BKO +triangle0|0|Triangle|0|OK-BOK +triangle0|0|Tin|0|KO-BKO +triangle0|0|Point|2|KO-BKO +triangle0|0|LineString|2|KO-BKO +triangle0|0|Polygon|2|KO-BKO +triangle0|0|MultiPoint|2|KO-BKO +triangle0|0|MultiLineString|2|KO-BKO +triangle0|0|MultiPolygon|2|KO-BKO +triangle0|0|GeometryCollection|2|KO-BKO +triangle0|0|CircularString|2|KO-BKO +triangle0|0|CompoundCurve|2|KO-BKO +triangle0|0|CurvePolygon|2|KO-BKO +triangle0|0|MultiCurve|2|KO-BKO +triangle0|0|MultiSurface|2|KO-BKO +triangle0|0|PolyhedralSurface|2|KO-BKO +triangle0|0|Triangle|2|KO-BKO +triangle0|0|Point|1|KO-BKO +triangle0|0|LineString|1|KO-BKO +triangle0|0|Polygon|1|KO-BKO +triangle0|0|MultiPoint|1|KO-BKO +triangle0|0|MultiLineString|1|KO-BKO +triangle0|0|MultiPolygon|1|KO-BKO +triangle0|0|GeometryCollection|1|KO-BKO +triangle0|0|CircularString|1|KO-BKO +triangle0|0|CompoundCurve|1|KO-BKO +triangle0|0|CurvePolygon|1|KO-BKO +triangle0|0|MultiCurve|1|KO-BKO +triangle0|0|MultiSurface|1|KO-BKO +triangle0|0|PolyhedralSurface|1|KO-BKO +triangle0|0|Triangle|1|KO-BKO +triangle0|0|Point|3|KO-BKO +triangle0|0|LineString|3|KO-BKO +triangle0|0|Polygon|3|KO-BKO +triangle0|0|MultiPoint|3|KO-BKO +triangle0|0|MultiLineString|3|KO-BKO +triangle0|0|MultiPolygon|3|KO-BKO +triangle0|0|GeometryCollection|3|KO-BKO +triangle0|0|CircularString|3|KO-BKO +triangle0|0|CompoundCurve|3|KO-BKO +triangle0|0|CurvePolygon|3|KO-BKO +triangle0|0|MultiCurve|3|KO-BKO +triangle0|0|MultiSurface|3|KO-BKO +triangle0|0|PolyhedralSurface|3|KO-BKO +triangle0|0|Triangle|3|KO-BKO +triangle0|4326|Point|0|KO-BKO +triangle0|4326|LineString|0|KO-BKO +triangle0|4326|Polygon|0|KO-BKO +triangle0|4326|MultiPoint|0|KO-BKO +triangle0|4326|MultiLineString|0|KO-BKO +triangle0|4326|MultiPolygon|0|KO-BKO +triangle0|4326|GeometryCollection|0|KO-BKO +triangle0|4326|CircularString|0|KO-BKO +triangle0|4326|CompoundCurve|0|KO-BKO +triangle0|4326|CurvePolygon|0|KO-BKO +triangle0|4326|MultiCurve|0|KO-BKO +triangle0|4326|MultiSurface|0|KO-BKO +triangle0|4326|PolyhedralSurface|0|KO-BKO +triangle0|4326|Triangle|0|OK-BOK +triangle0|4326|Tin|0|KO-BKO +triangle0|4326|Point|2|KO-BKO +triangle0|4326|LineString|2|KO-BKO +triangle0|4326|Polygon|2|KO-BKO +triangle0|4326|MultiPoint|2|KO-BKO +triangle0|4326|MultiLineString|2|KO-BKO +triangle0|4326|MultiPolygon|2|KO-BKO +triangle0|4326|GeometryCollection|2|KO-BKO +triangle0|4326|CircularString|2|KO-BKO +triangle0|4326|CompoundCurve|2|KO-BKO +triangle0|4326|CurvePolygon|2|KO-BKO +triangle0|4326|MultiCurve|2|KO-BKO +triangle0|4326|MultiSurface|2|KO-BKO +triangle0|4326|PolyhedralSurface|2|KO-BKO +triangle0|4326|Triangle|2|KO-BKO +triangle0|4326|Point|1|KO-BKO +triangle0|4326|LineString|1|KO-BKO +triangle0|4326|Polygon|1|KO-BKO +triangle0|4326|MultiPoint|1|KO-BKO +triangle0|4326|MultiLineString|1|KO-BKO +triangle0|4326|MultiPolygon|1|KO-BKO +triangle0|4326|GeometryCollection|1|KO-BKO +triangle0|4326|CircularString|1|KO-BKO +triangle0|4326|CompoundCurve|1|KO-BKO +triangle0|4326|CurvePolygon|1|KO-BKO +triangle0|4326|MultiCurve|1|KO-BKO +triangle0|4326|MultiSurface|1|KO-BKO +triangle0|4326|PolyhedralSurface|1|KO-BKO +triangle0|4326|Triangle|1|KO-BKO +triangle0|4326|Point|3|KO-BKO +triangle0|4326|LineString|3|KO-BKO +triangle0|4326|Polygon|3|KO-BKO +triangle0|4326|MultiPoint|3|KO-BKO +triangle0|4326|MultiLineString|3|KO-BKO +triangle0|4326|MultiPolygon|3|KO-BKO +triangle0|4326|GeometryCollection|3|KO-BKO +triangle0|4326|CircularString|3|KO-BKO +triangle0|4326|CompoundCurve|3|KO-BKO +triangle0|4326|CurvePolygon|3|KO-BKO +triangle0|4326|MultiCurve|3|KO-BKO +triangle0|4326|MultiSurface|3|KO-BKO +triangle0|4326|PolyhedralSurface|3|KO-BKO +triangle0|4326|Triangle|3|KO-BKO +triangle0||COUNT|4| +triangle4326|0|Point|0|KO-BKO +triangle4326|0|LineString|0|KO-BKO +triangle4326|0|Polygon|0|KO-BKO +triangle4326|0|MultiPoint|0|KO-BKO +triangle4326|0|MultiLineString|0|KO-BKO +triangle4326|0|MultiPolygon|0|KO-BKO +triangle4326|0|GeometryCollection|0|KO-BKO +triangle4326|0|CircularString|0|KO-BKO +triangle4326|0|CompoundCurve|0|KO-BKO +triangle4326|0|CurvePolygon|0|KO-BKO +triangle4326|0|MultiCurve|0|KO-BKO +triangle4326|0|MultiSurface|0|KO-BKO +triangle4326|0|PolyhedralSurface|0|KO-BKO +triangle4326|0|Triangle|0|KO-BKO +triangle4326|0|Tin|0|KO-BKO +triangle4326|0|Point|2|KO-BKO +triangle4326|0|LineString|2|KO-BKO +triangle4326|0|Polygon|2|KO-BKO +triangle4326|0|MultiPoint|2|KO-BKO +triangle4326|0|MultiLineString|2|KO-BKO +triangle4326|0|MultiPolygon|2|KO-BKO +triangle4326|0|GeometryCollection|2|KO-BKO +triangle4326|0|CircularString|2|KO-BKO +triangle4326|0|CompoundCurve|2|KO-BKO +triangle4326|0|CurvePolygon|2|KO-BKO +triangle4326|0|MultiCurve|2|KO-BKO +triangle4326|0|MultiSurface|2|KO-BKO +triangle4326|0|PolyhedralSurface|2|KO-BKO +triangle4326|0|Triangle|2|KO-BKO +triangle4326|0|Point|1|KO-BKO +triangle4326|0|LineString|1|KO-BKO +triangle4326|0|Polygon|1|KO-BKO +triangle4326|0|MultiPoint|1|KO-BKO +triangle4326|0|MultiLineString|1|KO-BKO +triangle4326|0|MultiPolygon|1|KO-BKO +triangle4326|0|GeometryCollection|1|KO-BKO +triangle4326|0|CircularString|1|KO-BKO +triangle4326|0|CompoundCurve|1|KO-BKO +triangle4326|0|CurvePolygon|1|KO-BKO +triangle4326|0|MultiCurve|1|KO-BKO +triangle4326|0|MultiSurface|1|KO-BKO +triangle4326|0|PolyhedralSurface|1|KO-BKO +triangle4326|0|Triangle|1|KO-BKO +triangle4326|0|Point|3|KO-BKO +triangle4326|0|LineString|3|KO-BKO +triangle4326|0|Polygon|3|KO-BKO +triangle4326|0|MultiPoint|3|KO-BKO +triangle4326|0|MultiLineString|3|KO-BKO +triangle4326|0|MultiPolygon|3|KO-BKO +triangle4326|0|GeometryCollection|3|KO-BKO +triangle4326|0|CircularString|3|KO-BKO +triangle4326|0|CompoundCurve|3|KO-BKO +triangle4326|0|CurvePolygon|3|KO-BKO +triangle4326|0|MultiCurve|3|KO-BKO +triangle4326|0|MultiSurface|3|KO-BKO +triangle4326|0|PolyhedralSurface|3|KO-BKO +triangle4326|0|Triangle|3|KO-BKO +triangle4326|4326|Point|0|KO-BKO +triangle4326|4326|LineString|0|KO-BKO +triangle4326|4326|Polygon|0|KO-BKO +triangle4326|4326|MultiPoint|0|KO-BKO +triangle4326|4326|MultiLineString|0|KO-BKO +triangle4326|4326|MultiPolygon|0|KO-BKO +triangle4326|4326|GeometryCollection|0|KO-BKO +triangle4326|4326|CircularString|0|KO-BKO +triangle4326|4326|CompoundCurve|0|KO-BKO +triangle4326|4326|CurvePolygon|0|KO-BKO +triangle4326|4326|MultiCurve|0|KO-BKO +triangle4326|4326|MultiSurface|0|KO-BKO +triangle4326|4326|PolyhedralSurface|0|KO-BKO +triangle4326|4326|Triangle|0|OK-BOK +triangle4326|4326|Tin|0|KO-BKO +triangle4326|4326|Point|2|KO-BKO +triangle4326|4326|LineString|2|KO-BKO +triangle4326|4326|Polygon|2|KO-BKO +triangle4326|4326|MultiPoint|2|KO-BKO +triangle4326|4326|MultiLineString|2|KO-BKO +triangle4326|4326|MultiPolygon|2|KO-BKO +triangle4326|4326|GeometryCollection|2|KO-BKO +triangle4326|4326|CircularString|2|KO-BKO +triangle4326|4326|CompoundCurve|2|KO-BKO +triangle4326|4326|CurvePolygon|2|KO-BKO +triangle4326|4326|MultiCurve|2|KO-BKO +triangle4326|4326|MultiSurface|2|KO-BKO +triangle4326|4326|PolyhedralSurface|2|KO-BKO +triangle4326|4326|Triangle|2|KO-BKO +triangle4326|4326|Point|1|KO-BKO +triangle4326|4326|LineString|1|KO-BKO +triangle4326|4326|Polygon|1|KO-BKO +triangle4326|4326|MultiPoint|1|KO-BKO +triangle4326|4326|MultiLineString|1|KO-BKO +triangle4326|4326|MultiPolygon|1|KO-BKO +triangle4326|4326|GeometryCollection|1|KO-BKO +triangle4326|4326|CircularString|1|KO-BKO +triangle4326|4326|CompoundCurve|1|KO-BKO +triangle4326|4326|CurvePolygon|1|KO-BKO +triangle4326|4326|MultiCurve|1|KO-BKO +triangle4326|4326|MultiSurface|1|KO-BKO +triangle4326|4326|PolyhedralSurface|1|KO-BKO +triangle4326|4326|Triangle|1|KO-BKO +triangle4326|4326|Point|3|KO-BKO +triangle4326|4326|LineString|3|KO-BKO +triangle4326|4326|Polygon|3|KO-BKO +triangle4326|4326|MultiPoint|3|KO-BKO +triangle4326|4326|MultiLineString|3|KO-BKO +triangle4326|4326|MultiPolygon|3|KO-BKO +triangle4326|4326|GeometryCollection|3|KO-BKO +triangle4326|4326|CircularString|3|KO-BKO +triangle4326|4326|CompoundCurve|3|KO-BKO +triangle4326|4326|CurvePolygon|3|KO-BKO +triangle4326|4326|MultiCurve|3|KO-BKO +triangle4326|4326|MultiSurface|3|KO-BKO +triangle4326|4326|PolyhedralSurface|3|KO-BKO +triangle4326|4326|Triangle|3|KO-BKO +triangle4326||COUNT|2| +trianglem|0|Point|0|KO-BKO +trianglem|0|LineString|0|KO-BKO +trianglem|0|Polygon|0|KO-BKO +trianglem|0|MultiPoint|0|KO-BKO +trianglem|0|MultiLineString|0|KO-BKO +trianglem|0|MultiPolygon|0|KO-BKO +trianglem|0|GeometryCollection|0|KO-BKO +trianglem|0|CircularString|0|KO-BKO +trianglem|0|CompoundCurve|0|KO-BKO +trianglem|0|CurvePolygon|0|KO-BKO +trianglem|0|MultiCurve|0|KO-BKO +trianglem|0|MultiSurface|0|KO-BKO +trianglem|0|PolyhedralSurface|0|KO-BKO +trianglem|0|Triangle|0|KO-BKO +trianglem|0|Tin|0|KO-BKO +trianglem|0|Point|2|KO-BKO +trianglem|0|LineString|2|KO-BKO +trianglem|0|Polygon|2|KO-BKO +trianglem|0|MultiPoint|2|KO-BKO +trianglem|0|MultiLineString|2|KO-BKO +trianglem|0|MultiPolygon|2|KO-BKO +trianglem|0|GeometryCollection|2|KO-BKO +trianglem|0|CircularString|2|KO-BKO +trianglem|0|CompoundCurve|2|KO-BKO +trianglem|0|CurvePolygon|2|KO-BKO +trianglem|0|MultiCurve|2|KO-BKO +trianglem|0|MultiSurface|2|KO-BKO +trianglem|0|PolyhedralSurface|2|KO-BKO +trianglem|0|Triangle|2|KO-BKO +trianglem|0|Point|1|KO-BKO +trianglem|0|LineString|1|KO-BKO +trianglem|0|Polygon|1|KO-BKO +trianglem|0|MultiPoint|1|KO-BKO +trianglem|0|MultiLineString|1|KO-BKO +trianglem|0|MultiPolygon|1|KO-BKO +trianglem|0|GeometryCollection|1|KO-BKO +trianglem|0|CircularString|1|KO-BKO +trianglem|0|CompoundCurve|1|KO-BKO +trianglem|0|CurvePolygon|1|KO-BKO +trianglem|0|MultiCurve|1|KO-BKO +trianglem|0|MultiSurface|1|KO-BKO +trianglem|0|PolyhedralSurface|1|KO-BKO +trianglem|0|Triangle|1|OK-BOK +trianglem|0|Point|3|KO-BKO +trianglem|0|LineString|3|KO-BKO +trianglem|0|Polygon|3|KO-BKO +trianglem|0|MultiPoint|3|KO-BKO +trianglem|0|MultiLineString|3|KO-BKO +trianglem|0|MultiPolygon|3|KO-BKO +trianglem|0|GeometryCollection|3|KO-BKO +trianglem|0|CircularString|3|KO-BKO +trianglem|0|CompoundCurve|3|KO-BKO +trianglem|0|CurvePolygon|3|KO-BKO +trianglem|0|MultiCurve|3|KO-BKO +trianglem|0|MultiSurface|3|KO-BKO +trianglem|0|PolyhedralSurface|3|KO-BKO +trianglem|0|Triangle|3|KO-BKO +trianglem|4326|Point|0|KO-BKO +trianglem|4326|LineString|0|KO-BKO +trianglem|4326|Polygon|0|KO-BKO +trianglem|4326|MultiPoint|0|KO-BKO +trianglem|4326|MultiLineString|0|KO-BKO +trianglem|4326|MultiPolygon|0|KO-BKO +trianglem|4326|GeometryCollection|0|KO-BKO +trianglem|4326|CircularString|0|KO-BKO +trianglem|4326|CompoundCurve|0|KO-BKO +trianglem|4326|CurvePolygon|0|KO-BKO +trianglem|4326|MultiCurve|0|KO-BKO +trianglem|4326|MultiSurface|0|KO-BKO +trianglem|4326|PolyhedralSurface|0|KO-BKO +trianglem|4326|Triangle|0|KO-BKO +trianglem|4326|Tin|0|KO-BKO +trianglem|4326|Point|2|KO-BKO +trianglem|4326|LineString|2|KO-BKO +trianglem|4326|Polygon|2|KO-BKO +trianglem|4326|MultiPoint|2|KO-BKO +trianglem|4326|MultiLineString|2|KO-BKO +trianglem|4326|MultiPolygon|2|KO-BKO +trianglem|4326|GeometryCollection|2|KO-BKO +trianglem|4326|CircularString|2|KO-BKO +trianglem|4326|CompoundCurve|2|KO-BKO +trianglem|4326|CurvePolygon|2|KO-BKO +trianglem|4326|MultiCurve|2|KO-BKO +trianglem|4326|MultiSurface|2|KO-BKO +trianglem|4326|PolyhedralSurface|2|KO-BKO +trianglem|4326|Triangle|2|KO-BKO +trianglem|4326|Point|1|KO-BKO +trianglem|4326|LineString|1|KO-BKO +trianglem|4326|Polygon|1|KO-BKO +trianglem|4326|MultiPoint|1|KO-BKO +trianglem|4326|MultiLineString|1|KO-BKO +trianglem|4326|MultiPolygon|1|KO-BKO +trianglem|4326|GeometryCollection|1|KO-BKO +trianglem|4326|CircularString|1|KO-BKO +trianglem|4326|CompoundCurve|1|KO-BKO +trianglem|4326|CurvePolygon|1|KO-BKO +trianglem|4326|MultiCurve|1|KO-BKO +trianglem|4326|MultiSurface|1|KO-BKO +trianglem|4326|PolyhedralSurface|1|KO-BKO +trianglem|4326|Triangle|1|OK-BOK +trianglem|4326|Point|3|KO-BKO +trianglem|4326|LineString|3|KO-BKO +trianglem|4326|Polygon|3|KO-BKO +trianglem|4326|MultiPoint|3|KO-BKO +trianglem|4326|MultiLineString|3|KO-BKO +trianglem|4326|MultiPolygon|3|KO-BKO +trianglem|4326|GeometryCollection|3|KO-BKO +trianglem|4326|CircularString|3|KO-BKO +trianglem|4326|CompoundCurve|3|KO-BKO +trianglem|4326|CurvePolygon|3|KO-BKO +trianglem|4326|MultiCurve|3|KO-BKO +trianglem|4326|MultiSurface|3|KO-BKO +trianglem|4326|PolyhedralSurface|3|KO-BKO +trianglem|4326|Triangle|3|KO-BKO +trianglem||COUNT|4| +trianglem0|0|Point|0|KO-BKO +trianglem0|0|LineString|0|KO-BKO +trianglem0|0|Polygon|0|KO-BKO +trianglem0|0|MultiPoint|0|KO-BKO +trianglem0|0|MultiLineString|0|KO-BKO +trianglem0|0|MultiPolygon|0|KO-BKO +trianglem0|0|GeometryCollection|0|KO-BKO +trianglem0|0|CircularString|0|KO-BKO +trianglem0|0|CompoundCurve|0|KO-BKO +trianglem0|0|CurvePolygon|0|KO-BKO +trianglem0|0|MultiCurve|0|KO-BKO +trianglem0|0|MultiSurface|0|KO-BKO +trianglem0|0|PolyhedralSurface|0|KO-BKO +trianglem0|0|Triangle|0|KO-BKO +trianglem0|0|Tin|0|KO-BKO +trianglem0|0|Point|2|KO-BKO +trianglem0|0|LineString|2|KO-BKO +trianglem0|0|Polygon|2|KO-BKO +trianglem0|0|MultiPoint|2|KO-BKO +trianglem0|0|MultiLineString|2|KO-BKO +trianglem0|0|MultiPolygon|2|KO-BKO +trianglem0|0|GeometryCollection|2|KO-BKO +trianglem0|0|CircularString|2|KO-BKO +trianglem0|0|CompoundCurve|2|KO-BKO +trianglem0|0|CurvePolygon|2|KO-BKO +trianglem0|0|MultiCurve|2|KO-BKO +trianglem0|0|MultiSurface|2|KO-BKO +trianglem0|0|PolyhedralSurface|2|KO-BKO +trianglem0|0|Triangle|2|KO-BKO +trianglem0|0|Point|1|KO-BKO +trianglem0|0|LineString|1|KO-BKO +trianglem0|0|Polygon|1|KO-BKO +trianglem0|0|MultiPoint|1|KO-BKO +trianglem0|0|MultiLineString|1|KO-BKO +trianglem0|0|MultiPolygon|1|KO-BKO +trianglem0|0|GeometryCollection|1|KO-BKO +trianglem0|0|CircularString|1|KO-BKO +trianglem0|0|CompoundCurve|1|KO-BKO +trianglem0|0|CurvePolygon|1|KO-BKO +trianglem0|0|MultiCurve|1|KO-BKO +trianglem0|0|MultiSurface|1|KO-BKO +trianglem0|0|PolyhedralSurface|1|KO-BKO +trianglem0|0|Triangle|1|OK-BOK +trianglem0|0|Point|3|KO-BKO +trianglem0|0|LineString|3|KO-BKO +trianglem0|0|Polygon|3|KO-BKO +trianglem0|0|MultiPoint|3|KO-BKO +trianglem0|0|MultiLineString|3|KO-BKO +trianglem0|0|MultiPolygon|3|KO-BKO +trianglem0|0|GeometryCollection|3|KO-BKO +trianglem0|0|CircularString|3|KO-BKO +trianglem0|0|CompoundCurve|3|KO-BKO +trianglem0|0|CurvePolygon|3|KO-BKO +trianglem0|0|MultiCurve|3|KO-BKO +trianglem0|0|MultiSurface|3|KO-BKO +trianglem0|0|PolyhedralSurface|3|KO-BKO +trianglem0|0|Triangle|3|KO-BKO +trianglem0|4326|Point|0|KO-BKO +trianglem0|4326|LineString|0|KO-BKO +trianglem0|4326|Polygon|0|KO-BKO +trianglem0|4326|MultiPoint|0|KO-BKO +trianglem0|4326|MultiLineString|0|KO-BKO +trianglem0|4326|MultiPolygon|0|KO-BKO +trianglem0|4326|GeometryCollection|0|KO-BKO +trianglem0|4326|CircularString|0|KO-BKO +trianglem0|4326|CompoundCurve|0|KO-BKO +trianglem0|4326|CurvePolygon|0|KO-BKO +trianglem0|4326|MultiCurve|0|KO-BKO +trianglem0|4326|MultiSurface|0|KO-BKO +trianglem0|4326|PolyhedralSurface|0|KO-BKO +trianglem0|4326|Triangle|0|KO-BKO +trianglem0|4326|Tin|0|KO-BKO +trianglem0|4326|Point|2|KO-BKO +trianglem0|4326|LineString|2|KO-BKO +trianglem0|4326|Polygon|2|KO-BKO +trianglem0|4326|MultiPoint|2|KO-BKO +trianglem0|4326|MultiLineString|2|KO-BKO +trianglem0|4326|MultiPolygon|2|KO-BKO +trianglem0|4326|GeometryCollection|2|KO-BKO +trianglem0|4326|CircularString|2|KO-BKO +trianglem0|4326|CompoundCurve|2|KO-BKO +trianglem0|4326|CurvePolygon|2|KO-BKO +trianglem0|4326|MultiCurve|2|KO-BKO +trianglem0|4326|MultiSurface|2|KO-BKO +trianglem0|4326|PolyhedralSurface|2|KO-BKO +trianglem0|4326|Triangle|2|KO-BKO +trianglem0|4326|Point|1|KO-BKO +trianglem0|4326|LineString|1|KO-BKO +trianglem0|4326|Polygon|1|KO-BKO +trianglem0|4326|MultiPoint|1|KO-BKO +trianglem0|4326|MultiLineString|1|KO-BKO +trianglem0|4326|MultiPolygon|1|KO-BKO +trianglem0|4326|GeometryCollection|1|KO-BKO +trianglem0|4326|CircularString|1|KO-BKO +trianglem0|4326|CompoundCurve|1|KO-BKO +trianglem0|4326|CurvePolygon|1|KO-BKO +trianglem0|4326|MultiCurve|1|KO-BKO +trianglem0|4326|MultiSurface|1|KO-BKO +trianglem0|4326|PolyhedralSurface|1|KO-BKO +trianglem0|4326|Triangle|1|OK-BOK +trianglem0|4326|Point|3|KO-BKO +trianglem0|4326|LineString|3|KO-BKO +trianglem0|4326|Polygon|3|KO-BKO +trianglem0|4326|MultiPoint|3|KO-BKO +trianglem0|4326|MultiLineString|3|KO-BKO +trianglem0|4326|MultiPolygon|3|KO-BKO +trianglem0|4326|GeometryCollection|3|KO-BKO +trianglem0|4326|CircularString|3|KO-BKO +trianglem0|4326|CompoundCurve|3|KO-BKO +trianglem0|4326|CurvePolygon|3|KO-BKO +trianglem0|4326|MultiCurve|3|KO-BKO +trianglem0|4326|MultiSurface|3|KO-BKO +trianglem0|4326|PolyhedralSurface|3|KO-BKO +trianglem0|4326|Triangle|3|KO-BKO +trianglem0||COUNT|4| +trianglem4326|0|Point|0|KO-BKO +trianglem4326|0|LineString|0|KO-BKO +trianglem4326|0|Polygon|0|KO-BKO +trianglem4326|0|MultiPoint|0|KO-BKO +trianglem4326|0|MultiLineString|0|KO-BKO +trianglem4326|0|MultiPolygon|0|KO-BKO +trianglem4326|0|GeometryCollection|0|KO-BKO +trianglem4326|0|CircularString|0|KO-BKO +trianglem4326|0|CompoundCurve|0|KO-BKO +trianglem4326|0|CurvePolygon|0|KO-BKO +trianglem4326|0|MultiCurve|0|KO-BKO +trianglem4326|0|MultiSurface|0|KO-BKO +trianglem4326|0|PolyhedralSurface|0|KO-BKO +trianglem4326|0|Triangle|0|KO-BKO +trianglem4326|0|Tin|0|KO-BKO +trianglem4326|0|Point|2|KO-BKO +trianglem4326|0|LineString|2|KO-BKO +trianglem4326|0|Polygon|2|KO-BKO +trianglem4326|0|MultiPoint|2|KO-BKO +trianglem4326|0|MultiLineString|2|KO-BKO +trianglem4326|0|MultiPolygon|2|KO-BKO +trianglem4326|0|GeometryCollection|2|KO-BKO +trianglem4326|0|CircularString|2|KO-BKO +trianglem4326|0|CompoundCurve|2|KO-BKO +trianglem4326|0|CurvePolygon|2|KO-BKO +trianglem4326|0|MultiCurve|2|KO-BKO +trianglem4326|0|MultiSurface|2|KO-BKO +trianglem4326|0|PolyhedralSurface|2|KO-BKO +trianglem4326|0|Triangle|2|KO-BKO +trianglem4326|0|Point|1|KO-BKO +trianglem4326|0|LineString|1|KO-BKO +trianglem4326|0|Polygon|1|KO-BKO +trianglem4326|0|MultiPoint|1|KO-BKO +trianglem4326|0|MultiLineString|1|KO-BKO +trianglem4326|0|MultiPolygon|1|KO-BKO +trianglem4326|0|GeometryCollection|1|KO-BKO +trianglem4326|0|CircularString|1|KO-BKO +trianglem4326|0|CompoundCurve|1|KO-BKO +trianglem4326|0|CurvePolygon|1|KO-BKO +trianglem4326|0|MultiCurve|1|KO-BKO +trianglem4326|0|MultiSurface|1|KO-BKO +trianglem4326|0|PolyhedralSurface|1|KO-BKO +trianglem4326|0|Triangle|1|KO-BKO +trianglem4326|0|Point|3|KO-BKO +trianglem4326|0|LineString|3|KO-BKO +trianglem4326|0|Polygon|3|KO-BKO +trianglem4326|0|MultiPoint|3|KO-BKO +trianglem4326|0|MultiLineString|3|KO-BKO +trianglem4326|0|MultiPolygon|3|KO-BKO +trianglem4326|0|GeometryCollection|3|KO-BKO +trianglem4326|0|CircularString|3|KO-BKO +trianglem4326|0|CompoundCurve|3|KO-BKO +trianglem4326|0|CurvePolygon|3|KO-BKO +trianglem4326|0|MultiCurve|3|KO-BKO +trianglem4326|0|MultiSurface|3|KO-BKO +trianglem4326|0|PolyhedralSurface|3|KO-BKO +trianglem4326|0|Triangle|3|KO-BKO +trianglem4326|4326|Point|0|KO-BKO +trianglem4326|4326|LineString|0|KO-BKO +trianglem4326|4326|Polygon|0|KO-BKO +trianglem4326|4326|MultiPoint|0|KO-BKO +trianglem4326|4326|MultiLineString|0|KO-BKO +trianglem4326|4326|MultiPolygon|0|KO-BKO +trianglem4326|4326|GeometryCollection|0|KO-BKO +trianglem4326|4326|CircularString|0|KO-BKO +trianglem4326|4326|CompoundCurve|0|KO-BKO +trianglem4326|4326|CurvePolygon|0|KO-BKO +trianglem4326|4326|MultiCurve|0|KO-BKO +trianglem4326|4326|MultiSurface|0|KO-BKO +trianglem4326|4326|PolyhedralSurface|0|KO-BKO +trianglem4326|4326|Triangle|0|KO-BKO +trianglem4326|4326|Tin|0|KO-BKO +trianglem4326|4326|Point|2|KO-BKO +trianglem4326|4326|LineString|2|KO-BKO +trianglem4326|4326|Polygon|2|KO-BKO +trianglem4326|4326|MultiPoint|2|KO-BKO +trianglem4326|4326|MultiLineString|2|KO-BKO +trianglem4326|4326|MultiPolygon|2|KO-BKO +trianglem4326|4326|GeometryCollection|2|KO-BKO +trianglem4326|4326|CircularString|2|KO-BKO +trianglem4326|4326|CompoundCurve|2|KO-BKO +trianglem4326|4326|CurvePolygon|2|KO-BKO +trianglem4326|4326|MultiCurve|2|KO-BKO +trianglem4326|4326|MultiSurface|2|KO-BKO +trianglem4326|4326|PolyhedralSurface|2|KO-BKO +trianglem4326|4326|Triangle|2|KO-BKO +trianglem4326|4326|Point|1|KO-BKO +trianglem4326|4326|LineString|1|KO-BKO +trianglem4326|4326|Polygon|1|KO-BKO +trianglem4326|4326|MultiPoint|1|KO-BKO +trianglem4326|4326|MultiLineString|1|KO-BKO +trianglem4326|4326|MultiPolygon|1|KO-BKO +trianglem4326|4326|GeometryCollection|1|KO-BKO +trianglem4326|4326|CircularString|1|KO-BKO +trianglem4326|4326|CompoundCurve|1|KO-BKO +trianglem4326|4326|CurvePolygon|1|KO-BKO +trianglem4326|4326|MultiCurve|1|KO-BKO +trianglem4326|4326|MultiSurface|1|KO-BKO +trianglem4326|4326|PolyhedralSurface|1|KO-BKO +trianglem4326|4326|Triangle|1|OK-BOK +trianglem4326|4326|Point|3|KO-BKO +trianglem4326|4326|LineString|3|KO-BKO +trianglem4326|4326|Polygon|3|KO-BKO +trianglem4326|4326|MultiPoint|3|KO-BKO +trianglem4326|4326|MultiLineString|3|KO-BKO +trianglem4326|4326|MultiPolygon|3|KO-BKO +trianglem4326|4326|GeometryCollection|3|KO-BKO +trianglem4326|4326|CircularString|3|KO-BKO +trianglem4326|4326|CompoundCurve|3|KO-BKO +trianglem4326|4326|CurvePolygon|3|KO-BKO +trianglem4326|4326|MultiCurve|3|KO-BKO +trianglem4326|4326|MultiSurface|3|KO-BKO +trianglem4326|4326|PolyhedralSurface|3|KO-BKO +trianglem4326|4326|Triangle|3|KO-BKO +trianglem4326||COUNT|2| +trianglez|0|Point|0|KO-BKO +trianglez|0|LineString|0|KO-BKO +trianglez|0|Polygon|0|KO-BKO +trianglez|0|MultiPoint|0|KO-BKO +trianglez|0|MultiLineString|0|KO-BKO +trianglez|0|MultiPolygon|0|KO-BKO +trianglez|0|GeometryCollection|0|KO-BKO +trianglez|0|CircularString|0|KO-BKO +trianglez|0|CompoundCurve|0|KO-BKO +trianglez|0|CurvePolygon|0|KO-BKO +trianglez|0|MultiCurve|0|KO-BKO +trianglez|0|MultiSurface|0|KO-BKO +trianglez|0|PolyhedralSurface|0|KO-BKO +trianglez|0|Triangle|0|KO-BKO +trianglez|0|Tin|0|KO-BKO +trianglez|0|Point|2|KO-BKO +trianglez|0|LineString|2|KO-BKO +trianglez|0|Polygon|2|KO-BKO +trianglez|0|MultiPoint|2|KO-BKO +trianglez|0|MultiLineString|2|KO-BKO +trianglez|0|MultiPolygon|2|KO-BKO +trianglez|0|GeometryCollection|2|KO-BKO +trianglez|0|CircularString|2|KO-BKO +trianglez|0|CompoundCurve|2|KO-BKO +trianglez|0|CurvePolygon|2|KO-BKO +trianglez|0|MultiCurve|2|KO-BKO +trianglez|0|MultiSurface|2|KO-BKO +trianglez|0|PolyhedralSurface|2|KO-BKO +trianglez|0|Triangle|2|OK-BOK +trianglez|0|Point|1|KO-BKO +trianglez|0|LineString|1|KO-BKO +trianglez|0|Polygon|1|KO-BKO +trianglez|0|MultiPoint|1|KO-BKO +trianglez|0|MultiLineString|1|KO-BKO +trianglez|0|MultiPolygon|1|KO-BKO +trianglez|0|GeometryCollection|1|KO-BKO +trianglez|0|CircularString|1|KO-BKO +trianglez|0|CompoundCurve|1|KO-BKO +trianglez|0|CurvePolygon|1|KO-BKO +trianglez|0|MultiCurve|1|KO-BKO +trianglez|0|MultiSurface|1|KO-BKO +trianglez|0|PolyhedralSurface|1|KO-BKO +trianglez|0|Triangle|1|KO-BKO +trianglez|0|Point|3|KO-BKO +trianglez|0|LineString|3|KO-BKO +trianglez|0|Polygon|3|KO-BKO +trianglez|0|MultiPoint|3|KO-BKO +trianglez|0|MultiLineString|3|KO-BKO +trianglez|0|MultiPolygon|3|KO-BKO +trianglez|0|GeometryCollection|3|KO-BKO +trianglez|0|CircularString|3|KO-BKO +trianglez|0|CompoundCurve|3|KO-BKO +trianglez|0|CurvePolygon|3|KO-BKO +trianglez|0|MultiCurve|3|KO-BKO +trianglez|0|MultiSurface|3|KO-BKO +trianglez|0|PolyhedralSurface|3|KO-BKO +trianglez|0|Triangle|3|KO-BKO +trianglez|4326|Point|0|KO-BKO +trianglez|4326|LineString|0|KO-BKO +trianglez|4326|Polygon|0|KO-BKO +trianglez|4326|MultiPoint|0|KO-BKO +trianglez|4326|MultiLineString|0|KO-BKO +trianglez|4326|MultiPolygon|0|KO-BKO +trianglez|4326|GeometryCollection|0|KO-BKO +trianglez|4326|CircularString|0|KO-BKO +trianglez|4326|CompoundCurve|0|KO-BKO +trianglez|4326|CurvePolygon|0|KO-BKO +trianglez|4326|MultiCurve|0|KO-BKO +trianglez|4326|MultiSurface|0|KO-BKO +trianglez|4326|PolyhedralSurface|0|KO-BKO +trianglez|4326|Triangle|0|KO-BKO +trianglez|4326|Tin|0|KO-BKO +trianglez|4326|Point|2|KO-BKO +trianglez|4326|LineString|2|KO-BKO +trianglez|4326|Polygon|2|KO-BKO +trianglez|4326|MultiPoint|2|KO-BKO +trianglez|4326|MultiLineString|2|KO-BKO +trianglez|4326|MultiPolygon|2|KO-BKO +trianglez|4326|GeometryCollection|2|KO-BKO +trianglez|4326|CircularString|2|KO-BKO +trianglez|4326|CompoundCurve|2|KO-BKO +trianglez|4326|CurvePolygon|2|KO-BKO +trianglez|4326|MultiCurve|2|KO-BKO +trianglez|4326|MultiSurface|2|KO-BKO +trianglez|4326|PolyhedralSurface|2|KO-BKO +trianglez|4326|Triangle|2|OK-BOK +trianglez|4326|Point|1|KO-BKO +trianglez|4326|LineString|1|KO-BKO +trianglez|4326|Polygon|1|KO-BKO +trianglez|4326|MultiPoint|1|KO-BKO +trianglez|4326|MultiLineString|1|KO-BKO +trianglez|4326|MultiPolygon|1|KO-BKO +trianglez|4326|GeometryCollection|1|KO-BKO +trianglez|4326|CircularString|1|KO-BKO +trianglez|4326|CompoundCurve|1|KO-BKO +trianglez|4326|CurvePolygon|1|KO-BKO +trianglez|4326|MultiCurve|1|KO-BKO +trianglez|4326|MultiSurface|1|KO-BKO +trianglez|4326|PolyhedralSurface|1|KO-BKO +trianglez|4326|Triangle|1|KO-BKO +trianglez|4326|Point|3|KO-BKO +trianglez|4326|LineString|3|KO-BKO +trianglez|4326|Polygon|3|KO-BKO +trianglez|4326|MultiPoint|3|KO-BKO +trianglez|4326|MultiLineString|3|KO-BKO +trianglez|4326|MultiPolygon|3|KO-BKO +trianglez|4326|GeometryCollection|3|KO-BKO +trianglez|4326|CircularString|3|KO-BKO +trianglez|4326|CompoundCurve|3|KO-BKO +trianglez|4326|CurvePolygon|3|KO-BKO +trianglez|4326|MultiCurve|3|KO-BKO +trianglez|4326|MultiSurface|3|KO-BKO +trianglez|4326|PolyhedralSurface|3|KO-BKO +trianglez|4326|Triangle|3|KO-BKO +trianglez||COUNT|4| +trianglez0|0|Point|0|KO-BKO +trianglez0|0|LineString|0|KO-BKO +trianglez0|0|Polygon|0|KO-BKO +trianglez0|0|MultiPoint|0|KO-BKO +trianglez0|0|MultiLineString|0|KO-BKO +trianglez0|0|MultiPolygon|0|KO-BKO +trianglez0|0|GeometryCollection|0|KO-BKO +trianglez0|0|CircularString|0|KO-BKO +trianglez0|0|CompoundCurve|0|KO-BKO +trianglez0|0|CurvePolygon|0|KO-BKO +trianglez0|0|MultiCurve|0|KO-BKO +trianglez0|0|MultiSurface|0|KO-BKO +trianglez0|0|PolyhedralSurface|0|KO-BKO +trianglez0|0|Triangle|0|KO-BKO +trianglez0|0|Tin|0|KO-BKO +trianglez0|0|Point|2|KO-BKO +trianglez0|0|LineString|2|KO-BKO +trianglez0|0|Polygon|2|KO-BKO +trianglez0|0|MultiPoint|2|KO-BKO +trianglez0|0|MultiLineString|2|KO-BKO +trianglez0|0|MultiPolygon|2|KO-BKO +trianglez0|0|GeometryCollection|2|KO-BKO +trianglez0|0|CircularString|2|KO-BKO +trianglez0|0|CompoundCurve|2|KO-BKO +trianglez0|0|CurvePolygon|2|KO-BKO +trianglez0|0|MultiCurve|2|KO-BKO +trianglez0|0|MultiSurface|2|KO-BKO +trianglez0|0|PolyhedralSurface|2|KO-BKO +trianglez0|0|Triangle|2|OK-BOK +trianglez0|0|Point|1|KO-BKO +trianglez0|0|LineString|1|KO-BKO +trianglez0|0|Polygon|1|KO-BKO +trianglez0|0|MultiPoint|1|KO-BKO +trianglez0|0|MultiLineString|1|KO-BKO +trianglez0|0|MultiPolygon|1|KO-BKO +trianglez0|0|GeometryCollection|1|KO-BKO +trianglez0|0|CircularString|1|KO-BKO +trianglez0|0|CompoundCurve|1|KO-BKO +trianglez0|0|CurvePolygon|1|KO-BKO +trianglez0|0|MultiCurve|1|KO-BKO +trianglez0|0|MultiSurface|1|KO-BKO +trianglez0|0|PolyhedralSurface|1|KO-BKO +trianglez0|0|Triangle|1|KO-BKO +trianglez0|0|Point|3|KO-BKO +trianglez0|0|LineString|3|KO-BKO +trianglez0|0|Polygon|3|KO-BKO +trianglez0|0|MultiPoint|3|KO-BKO +trianglez0|0|MultiLineString|3|KO-BKO +trianglez0|0|MultiPolygon|3|KO-BKO +trianglez0|0|GeometryCollection|3|KO-BKO +trianglez0|0|CircularString|3|KO-BKO +trianglez0|0|CompoundCurve|3|KO-BKO +trianglez0|0|CurvePolygon|3|KO-BKO +trianglez0|0|MultiCurve|3|KO-BKO +trianglez0|0|MultiSurface|3|KO-BKO +trianglez0|0|PolyhedralSurface|3|KO-BKO +trianglez0|0|Triangle|3|KO-BKO +trianglez0|4326|Point|0|KO-BKO +trianglez0|4326|LineString|0|KO-BKO +trianglez0|4326|Polygon|0|KO-BKO +trianglez0|4326|MultiPoint|0|KO-BKO +trianglez0|4326|MultiLineString|0|KO-BKO +trianglez0|4326|MultiPolygon|0|KO-BKO +trianglez0|4326|GeometryCollection|0|KO-BKO +trianglez0|4326|CircularString|0|KO-BKO +trianglez0|4326|CompoundCurve|0|KO-BKO +trianglez0|4326|CurvePolygon|0|KO-BKO +trianglez0|4326|MultiCurve|0|KO-BKO +trianglez0|4326|MultiSurface|0|KO-BKO +trianglez0|4326|PolyhedralSurface|0|KO-BKO +trianglez0|4326|Triangle|0|KO-BKO +trianglez0|4326|Tin|0|KO-BKO +trianglez0|4326|Point|2|KO-BKO +trianglez0|4326|LineString|2|KO-BKO +trianglez0|4326|Polygon|2|KO-BKO +trianglez0|4326|MultiPoint|2|KO-BKO +trianglez0|4326|MultiLineString|2|KO-BKO +trianglez0|4326|MultiPolygon|2|KO-BKO +trianglez0|4326|GeometryCollection|2|KO-BKO +trianglez0|4326|CircularString|2|KO-BKO +trianglez0|4326|CompoundCurve|2|KO-BKO +trianglez0|4326|CurvePolygon|2|KO-BKO +trianglez0|4326|MultiCurve|2|KO-BKO +trianglez0|4326|MultiSurface|2|KO-BKO +trianglez0|4326|PolyhedralSurface|2|KO-BKO +trianglez0|4326|Triangle|2|OK-BOK +trianglez0|4326|Point|1|KO-BKO +trianglez0|4326|LineString|1|KO-BKO +trianglez0|4326|Polygon|1|KO-BKO +trianglez0|4326|MultiPoint|1|KO-BKO +trianglez0|4326|MultiLineString|1|KO-BKO +trianglez0|4326|MultiPolygon|1|KO-BKO +trianglez0|4326|GeometryCollection|1|KO-BKO +trianglez0|4326|CircularString|1|KO-BKO +trianglez0|4326|CompoundCurve|1|KO-BKO +trianglez0|4326|CurvePolygon|1|KO-BKO +trianglez0|4326|MultiCurve|1|KO-BKO +trianglez0|4326|MultiSurface|1|KO-BKO +trianglez0|4326|PolyhedralSurface|1|KO-BKO +trianglez0|4326|Triangle|1|KO-BKO +trianglez0|4326|Point|3|KO-BKO +trianglez0|4326|LineString|3|KO-BKO +trianglez0|4326|Polygon|3|KO-BKO +trianglez0|4326|MultiPoint|3|KO-BKO +trianglez0|4326|MultiLineString|3|KO-BKO +trianglez0|4326|MultiPolygon|3|KO-BKO +trianglez0|4326|GeometryCollection|3|KO-BKO +trianglez0|4326|CircularString|3|KO-BKO +trianglez0|4326|CompoundCurve|3|KO-BKO +trianglez0|4326|CurvePolygon|3|KO-BKO +trianglez0|4326|MultiCurve|3|KO-BKO +trianglez0|4326|MultiSurface|3|KO-BKO +trianglez0|4326|PolyhedralSurface|3|KO-BKO +trianglez0|4326|Triangle|3|KO-BKO +trianglez0||COUNT|4| +trianglez4326|0|Point|0|KO-BKO +trianglez4326|0|LineString|0|KO-BKO +trianglez4326|0|Polygon|0|KO-BKO +trianglez4326|0|MultiPoint|0|KO-BKO +trianglez4326|0|MultiLineString|0|KO-BKO +trianglez4326|0|MultiPolygon|0|KO-BKO +trianglez4326|0|GeometryCollection|0|KO-BKO +trianglez4326|0|CircularString|0|KO-BKO +trianglez4326|0|CompoundCurve|0|KO-BKO +trianglez4326|0|CurvePolygon|0|KO-BKO +trianglez4326|0|MultiCurve|0|KO-BKO +trianglez4326|0|MultiSurface|0|KO-BKO +trianglez4326|0|PolyhedralSurface|0|KO-BKO +trianglez4326|0|Triangle|0|KO-BKO +trianglez4326|0|Tin|0|KO-BKO +trianglez4326|0|Point|2|KO-BKO +trianglez4326|0|LineString|2|KO-BKO +trianglez4326|0|Polygon|2|KO-BKO +trianglez4326|0|MultiPoint|2|KO-BKO +trianglez4326|0|MultiLineString|2|KO-BKO +trianglez4326|0|MultiPolygon|2|KO-BKO +trianglez4326|0|GeometryCollection|2|KO-BKO +trianglez4326|0|CircularString|2|KO-BKO +trianglez4326|0|CompoundCurve|2|KO-BKO +trianglez4326|0|CurvePolygon|2|KO-BKO +trianglez4326|0|MultiCurve|2|KO-BKO +trianglez4326|0|MultiSurface|2|KO-BKO +trianglez4326|0|PolyhedralSurface|2|KO-BKO +trianglez4326|0|Triangle|2|KO-BKO +trianglez4326|0|Point|1|KO-BKO +trianglez4326|0|LineString|1|KO-BKO +trianglez4326|0|Polygon|1|KO-BKO +trianglez4326|0|MultiPoint|1|KO-BKO +trianglez4326|0|MultiLineString|1|KO-BKO +trianglez4326|0|MultiPolygon|1|KO-BKO +trianglez4326|0|GeometryCollection|1|KO-BKO +trianglez4326|0|CircularString|1|KO-BKO +trianglez4326|0|CompoundCurve|1|KO-BKO +trianglez4326|0|CurvePolygon|1|KO-BKO +trianglez4326|0|MultiCurve|1|KO-BKO +trianglez4326|0|MultiSurface|1|KO-BKO +trianglez4326|0|PolyhedralSurface|1|KO-BKO +trianglez4326|0|Triangle|1|KO-BKO +trianglez4326|0|Point|3|KO-BKO +trianglez4326|0|LineString|3|KO-BKO +trianglez4326|0|Polygon|3|KO-BKO +trianglez4326|0|MultiPoint|3|KO-BKO +trianglez4326|0|MultiLineString|3|KO-BKO +trianglez4326|0|MultiPolygon|3|KO-BKO +trianglez4326|0|GeometryCollection|3|KO-BKO +trianglez4326|0|CircularString|3|KO-BKO +trianglez4326|0|CompoundCurve|3|KO-BKO +trianglez4326|0|CurvePolygon|3|KO-BKO +trianglez4326|0|MultiCurve|3|KO-BKO +trianglez4326|0|MultiSurface|3|KO-BKO +trianglez4326|0|PolyhedralSurface|3|KO-BKO +trianglez4326|0|Triangle|3|KO-BKO +trianglez4326|4326|Point|0|KO-BKO +trianglez4326|4326|LineString|0|KO-BKO +trianglez4326|4326|Polygon|0|KO-BKO +trianglez4326|4326|MultiPoint|0|KO-BKO +trianglez4326|4326|MultiLineString|0|KO-BKO +trianglez4326|4326|MultiPolygon|0|KO-BKO +trianglez4326|4326|GeometryCollection|0|KO-BKO +trianglez4326|4326|CircularString|0|KO-BKO +trianglez4326|4326|CompoundCurve|0|KO-BKO +trianglez4326|4326|CurvePolygon|0|KO-BKO +trianglez4326|4326|MultiCurve|0|KO-BKO +trianglez4326|4326|MultiSurface|0|KO-BKO +trianglez4326|4326|PolyhedralSurface|0|KO-BKO +trianglez4326|4326|Triangle|0|KO-BKO +trianglez4326|4326|Tin|0|KO-BKO +trianglez4326|4326|Point|2|KO-BKO +trianglez4326|4326|LineString|2|KO-BKO +trianglez4326|4326|Polygon|2|KO-BKO +trianglez4326|4326|MultiPoint|2|KO-BKO +trianglez4326|4326|MultiLineString|2|KO-BKO +trianglez4326|4326|MultiPolygon|2|KO-BKO +trianglez4326|4326|GeometryCollection|2|KO-BKO +trianglez4326|4326|CircularString|2|KO-BKO +trianglez4326|4326|CompoundCurve|2|KO-BKO +trianglez4326|4326|CurvePolygon|2|KO-BKO +trianglez4326|4326|MultiCurve|2|KO-BKO +trianglez4326|4326|MultiSurface|2|KO-BKO +trianglez4326|4326|PolyhedralSurface|2|KO-BKO +trianglez4326|4326|Triangle|2|OK-BOK +trianglez4326|4326|Point|1|KO-BKO +trianglez4326|4326|LineString|1|KO-BKO +trianglez4326|4326|Polygon|1|KO-BKO +trianglez4326|4326|MultiPoint|1|KO-BKO +trianglez4326|4326|MultiLineString|1|KO-BKO +trianglez4326|4326|MultiPolygon|1|KO-BKO +trianglez4326|4326|GeometryCollection|1|KO-BKO +trianglez4326|4326|CircularString|1|KO-BKO +trianglez4326|4326|CompoundCurve|1|KO-BKO +trianglez4326|4326|CurvePolygon|1|KO-BKO +trianglez4326|4326|MultiCurve|1|KO-BKO +trianglez4326|4326|MultiSurface|1|KO-BKO +trianglez4326|4326|PolyhedralSurface|1|KO-BKO +trianglez4326|4326|Triangle|1|KO-BKO +trianglez4326|4326|Point|3|KO-BKO +trianglez4326|4326|LineString|3|KO-BKO +trianglez4326|4326|Polygon|3|KO-BKO +trianglez4326|4326|MultiPoint|3|KO-BKO +trianglez4326|4326|MultiLineString|3|KO-BKO +trianglez4326|4326|MultiPolygon|3|KO-BKO +trianglez4326|4326|GeometryCollection|3|KO-BKO +trianglez4326|4326|CircularString|3|KO-BKO +trianglez4326|4326|CompoundCurve|3|KO-BKO +trianglez4326|4326|CurvePolygon|3|KO-BKO +trianglez4326|4326|MultiCurve|3|KO-BKO +trianglez4326|4326|MultiSurface|3|KO-BKO +trianglez4326|4326|PolyhedralSurface|3|KO-BKO +trianglez4326|4326|Triangle|3|KO-BKO +trianglez4326||COUNT|2| +trianglezm|0|Point|0|KO-BKO +trianglezm|0|LineString|0|KO-BKO +trianglezm|0|Polygon|0|KO-BKO +trianglezm|0|MultiPoint|0|KO-BKO +trianglezm|0|MultiLineString|0|KO-BKO +trianglezm|0|MultiPolygon|0|KO-BKO +trianglezm|0|GeometryCollection|0|KO-BKO +trianglezm|0|CircularString|0|KO-BKO +trianglezm|0|CompoundCurve|0|KO-BKO +trianglezm|0|CurvePolygon|0|KO-BKO +trianglezm|0|MultiCurve|0|KO-BKO +trianglezm|0|MultiSurface|0|KO-BKO +trianglezm|0|PolyhedralSurface|0|KO-BKO +trianglezm|0|Triangle|0|KO-BKO +trianglezm|0|Tin|0|KO-BKO +trianglezm|0|Point|2|KO-BKO +trianglezm|0|LineString|2|KO-BKO +trianglezm|0|Polygon|2|KO-BKO +trianglezm|0|MultiPoint|2|KO-BKO +trianglezm|0|MultiLineString|2|KO-BKO +trianglezm|0|MultiPolygon|2|KO-BKO +trianglezm|0|GeometryCollection|2|KO-BKO +trianglezm|0|CircularString|2|KO-BKO +trianglezm|0|CompoundCurve|2|KO-BKO +trianglezm|0|CurvePolygon|2|KO-BKO +trianglezm|0|MultiCurve|2|KO-BKO +trianglezm|0|MultiSurface|2|KO-BKO +trianglezm|0|PolyhedralSurface|2|KO-BKO +trianglezm|0|Triangle|2|KO-BKO +trianglezm|0|Point|1|KO-BKO +trianglezm|0|LineString|1|KO-BKO +trianglezm|0|Polygon|1|KO-BKO +trianglezm|0|MultiPoint|1|KO-BKO +trianglezm|0|MultiLineString|1|KO-BKO +trianglezm|0|MultiPolygon|1|KO-BKO +trianglezm|0|GeometryCollection|1|KO-BKO +trianglezm|0|CircularString|1|KO-BKO +trianglezm|0|CompoundCurve|1|KO-BKO +trianglezm|0|CurvePolygon|1|KO-BKO +trianglezm|0|MultiCurve|1|KO-BKO +trianglezm|0|MultiSurface|1|KO-BKO +trianglezm|0|PolyhedralSurface|1|KO-BKO +trianglezm|0|Triangle|1|KO-BKO +trianglezm|0|Point|3|KO-BKO +trianglezm|0|LineString|3|KO-BKO +trianglezm|0|Polygon|3|KO-BKO +trianglezm|0|MultiPoint|3|KO-BKO +trianglezm|0|MultiLineString|3|KO-BKO +trianglezm|0|MultiPolygon|3|KO-BKO +trianglezm|0|GeometryCollection|3|KO-BKO +trianglezm|0|CircularString|3|KO-BKO +trianglezm|0|CompoundCurve|3|KO-BKO +trianglezm|0|CurvePolygon|3|KO-BKO +trianglezm|0|MultiCurve|3|KO-BKO +trianglezm|0|MultiSurface|3|KO-BKO +trianglezm|0|PolyhedralSurface|3|KO-BKO +trianglezm|0|Triangle|3|OK-BOK +trianglezm|4326|Point|0|KO-BKO +trianglezm|4326|LineString|0|KO-BKO +trianglezm|4326|Polygon|0|KO-BKO +trianglezm|4326|MultiPoint|0|KO-BKO +trianglezm|4326|MultiLineString|0|KO-BKO +trianglezm|4326|MultiPolygon|0|KO-BKO +trianglezm|4326|GeometryCollection|0|KO-BKO +trianglezm|4326|CircularString|0|KO-BKO +trianglezm|4326|CompoundCurve|0|KO-BKO +trianglezm|4326|CurvePolygon|0|KO-BKO +trianglezm|4326|MultiCurve|0|KO-BKO +trianglezm|4326|MultiSurface|0|KO-BKO +trianglezm|4326|PolyhedralSurface|0|KO-BKO +trianglezm|4326|Triangle|0|KO-BKO +trianglezm|4326|Tin|0|KO-BKO +trianglezm|4326|Point|2|KO-BKO +trianglezm|4326|LineString|2|KO-BKO +trianglezm|4326|Polygon|2|KO-BKO +trianglezm|4326|MultiPoint|2|KO-BKO +trianglezm|4326|MultiLineString|2|KO-BKO +trianglezm|4326|MultiPolygon|2|KO-BKO +trianglezm|4326|GeometryCollection|2|KO-BKO +trianglezm|4326|CircularString|2|KO-BKO +trianglezm|4326|CompoundCurve|2|KO-BKO +trianglezm|4326|CurvePolygon|2|KO-BKO +trianglezm|4326|MultiCurve|2|KO-BKO +trianglezm|4326|MultiSurface|2|KO-BKO +trianglezm|4326|PolyhedralSurface|2|KO-BKO +trianglezm|4326|Triangle|2|KO-BKO +trianglezm|4326|Point|1|KO-BKO +trianglezm|4326|LineString|1|KO-BKO +trianglezm|4326|Polygon|1|KO-BKO +trianglezm|4326|MultiPoint|1|KO-BKO +trianglezm|4326|MultiLineString|1|KO-BKO +trianglezm|4326|MultiPolygon|1|KO-BKO +trianglezm|4326|GeometryCollection|1|KO-BKO +trianglezm|4326|CircularString|1|KO-BKO +trianglezm|4326|CompoundCurve|1|KO-BKO +trianglezm|4326|CurvePolygon|1|KO-BKO +trianglezm|4326|MultiCurve|1|KO-BKO +trianglezm|4326|MultiSurface|1|KO-BKO +trianglezm|4326|PolyhedralSurface|1|KO-BKO +trianglezm|4326|Triangle|1|KO-BKO +trianglezm|4326|Point|3|KO-BKO +trianglezm|4326|LineString|3|KO-BKO +trianglezm|4326|Polygon|3|KO-BKO +trianglezm|4326|MultiPoint|3|KO-BKO +trianglezm|4326|MultiLineString|3|KO-BKO +trianglezm|4326|MultiPolygon|3|KO-BKO +trianglezm|4326|GeometryCollection|3|KO-BKO +trianglezm|4326|CircularString|3|KO-BKO +trianglezm|4326|CompoundCurve|3|KO-BKO +trianglezm|4326|CurvePolygon|3|KO-BKO +trianglezm|4326|MultiCurve|3|KO-BKO +trianglezm|4326|MultiSurface|3|KO-BKO +trianglezm|4326|PolyhedralSurface|3|KO-BKO +trianglezm|4326|Triangle|3|OK-BOK +trianglezm||COUNT|4| +trianglezm0|0|Point|0|KO-BKO +trianglezm0|0|LineString|0|KO-BKO +trianglezm0|0|Polygon|0|KO-BKO +trianglezm0|0|MultiPoint|0|KO-BKO +trianglezm0|0|MultiLineString|0|KO-BKO +trianglezm0|0|MultiPolygon|0|KO-BKO +trianglezm0|0|GeometryCollection|0|KO-BKO +trianglezm0|0|CircularString|0|KO-BKO +trianglezm0|0|CompoundCurve|0|KO-BKO +trianglezm0|0|CurvePolygon|0|KO-BKO +trianglezm0|0|MultiCurve|0|KO-BKO +trianglezm0|0|MultiSurface|0|KO-BKO +trianglezm0|0|PolyhedralSurface|0|KO-BKO +trianglezm0|0|Triangle|0|KO-BKO +trianglezm0|0|Tin|0|KO-BKO +trianglezm0|0|Point|2|KO-BKO +trianglezm0|0|LineString|2|KO-BKO +trianglezm0|0|Polygon|2|KO-BKO +trianglezm0|0|MultiPoint|2|KO-BKO +trianglezm0|0|MultiLineString|2|KO-BKO +trianglezm0|0|MultiPolygon|2|KO-BKO +trianglezm0|0|GeometryCollection|2|KO-BKO +trianglezm0|0|CircularString|2|KO-BKO +trianglezm0|0|CompoundCurve|2|KO-BKO +trianglezm0|0|CurvePolygon|2|KO-BKO +trianglezm0|0|MultiCurve|2|KO-BKO +trianglezm0|0|MultiSurface|2|KO-BKO +trianglezm0|0|PolyhedralSurface|2|KO-BKO +trianglezm0|0|Triangle|2|KO-BKO +trianglezm0|0|Point|1|KO-BKO +trianglezm0|0|LineString|1|KO-BKO +trianglezm0|0|Polygon|1|KO-BKO +trianglezm0|0|MultiPoint|1|KO-BKO +trianglezm0|0|MultiLineString|1|KO-BKO +trianglezm0|0|MultiPolygon|1|KO-BKO +trianglezm0|0|GeometryCollection|1|KO-BKO +trianglezm0|0|CircularString|1|KO-BKO +trianglezm0|0|CompoundCurve|1|KO-BKO +trianglezm0|0|CurvePolygon|1|KO-BKO +trianglezm0|0|MultiCurve|1|KO-BKO +trianglezm0|0|MultiSurface|1|KO-BKO +trianglezm0|0|PolyhedralSurface|1|KO-BKO +trianglezm0|0|Triangle|1|KO-BKO +trianglezm0|0|Point|3|KO-BKO +trianglezm0|0|LineString|3|KO-BKO +trianglezm0|0|Polygon|3|KO-BKO +trianglezm0|0|MultiPoint|3|KO-BKO +trianglezm0|0|MultiLineString|3|KO-BKO +trianglezm0|0|MultiPolygon|3|KO-BKO +trianglezm0|0|GeometryCollection|3|KO-BKO +trianglezm0|0|CircularString|3|KO-BKO +trianglezm0|0|CompoundCurve|3|KO-BKO +trianglezm0|0|CurvePolygon|3|KO-BKO +trianglezm0|0|MultiCurve|3|KO-BKO +trianglezm0|0|MultiSurface|3|KO-BKO +trianglezm0|0|PolyhedralSurface|3|KO-BKO +trianglezm0|0|Triangle|3|OK-BOK +trianglezm0|4326|Point|0|KO-BKO +trianglezm0|4326|LineString|0|KO-BKO +trianglezm0|4326|Polygon|0|KO-BKO +trianglezm0|4326|MultiPoint|0|KO-BKO +trianglezm0|4326|MultiLineString|0|KO-BKO +trianglezm0|4326|MultiPolygon|0|KO-BKO +trianglezm0|4326|GeometryCollection|0|KO-BKO +trianglezm0|4326|CircularString|0|KO-BKO +trianglezm0|4326|CompoundCurve|0|KO-BKO +trianglezm0|4326|CurvePolygon|0|KO-BKO +trianglezm0|4326|MultiCurve|0|KO-BKO +trianglezm0|4326|MultiSurface|0|KO-BKO +trianglezm0|4326|PolyhedralSurface|0|KO-BKO +trianglezm0|4326|Triangle|0|KO-BKO +trianglezm0|4326|Tin|0|KO-BKO +trianglezm0|4326|Point|2|KO-BKO +trianglezm0|4326|LineString|2|KO-BKO +trianglezm0|4326|Polygon|2|KO-BKO +trianglezm0|4326|MultiPoint|2|KO-BKO +trianglezm0|4326|MultiLineString|2|KO-BKO +trianglezm0|4326|MultiPolygon|2|KO-BKO +trianglezm0|4326|GeometryCollection|2|KO-BKO +trianglezm0|4326|CircularString|2|KO-BKO +trianglezm0|4326|CompoundCurve|2|KO-BKO +trianglezm0|4326|CurvePolygon|2|KO-BKO +trianglezm0|4326|MultiCurve|2|KO-BKO +trianglezm0|4326|MultiSurface|2|KO-BKO +trianglezm0|4326|PolyhedralSurface|2|KO-BKO +trianglezm0|4326|Triangle|2|KO-BKO +trianglezm0|4326|Point|1|KO-BKO +trianglezm0|4326|LineString|1|KO-BKO +trianglezm0|4326|Polygon|1|KO-BKO +trianglezm0|4326|MultiPoint|1|KO-BKO +trianglezm0|4326|MultiLineString|1|KO-BKO +trianglezm0|4326|MultiPolygon|1|KO-BKO +trianglezm0|4326|GeometryCollection|1|KO-BKO +trianglezm0|4326|CircularString|1|KO-BKO +trianglezm0|4326|CompoundCurve|1|KO-BKO +trianglezm0|4326|CurvePolygon|1|KO-BKO +trianglezm0|4326|MultiCurve|1|KO-BKO +trianglezm0|4326|MultiSurface|1|KO-BKO +trianglezm0|4326|PolyhedralSurface|1|KO-BKO +trianglezm0|4326|Triangle|1|KO-BKO +trianglezm0|4326|Point|3|KO-BKO +trianglezm0|4326|LineString|3|KO-BKO +trianglezm0|4326|Polygon|3|KO-BKO +trianglezm0|4326|MultiPoint|3|KO-BKO +trianglezm0|4326|MultiLineString|3|KO-BKO +trianglezm0|4326|MultiPolygon|3|KO-BKO +trianglezm0|4326|GeometryCollection|3|KO-BKO +trianglezm0|4326|CircularString|3|KO-BKO +trianglezm0|4326|CompoundCurve|3|KO-BKO +trianglezm0|4326|CurvePolygon|3|KO-BKO +trianglezm0|4326|MultiCurve|3|KO-BKO +trianglezm0|4326|MultiSurface|3|KO-BKO +trianglezm0|4326|PolyhedralSurface|3|KO-BKO +trianglezm0|4326|Triangle|3|OK-BOK +trianglezm0||COUNT|4| +trianglezm4326|0|Point|0|KO-BKO +trianglezm4326|0|LineString|0|KO-BKO +trianglezm4326|0|Polygon|0|KO-BKO +trianglezm4326|0|MultiPoint|0|KO-BKO +trianglezm4326|0|MultiLineString|0|KO-BKO +trianglezm4326|0|MultiPolygon|0|KO-BKO +trianglezm4326|0|GeometryCollection|0|KO-BKO +trianglezm4326|0|CircularString|0|KO-BKO +trianglezm4326|0|CompoundCurve|0|KO-BKO +trianglezm4326|0|CurvePolygon|0|KO-BKO +trianglezm4326|0|MultiCurve|0|KO-BKO +trianglezm4326|0|MultiSurface|0|KO-BKO +trianglezm4326|0|PolyhedralSurface|0|KO-BKO +trianglezm4326|0|Triangle|0|KO-BKO +trianglezm4326|0|Tin|0|KO-BKO +trianglezm4326|0|Point|2|KO-BKO +trianglezm4326|0|LineString|2|KO-BKO +trianglezm4326|0|Polygon|2|KO-BKO +trianglezm4326|0|MultiPoint|2|KO-BKO +trianglezm4326|0|MultiLineString|2|KO-BKO +trianglezm4326|0|MultiPolygon|2|KO-BKO +trianglezm4326|0|GeometryCollection|2|KO-BKO +trianglezm4326|0|CircularString|2|KO-BKO +trianglezm4326|0|CompoundCurve|2|KO-BKO +trianglezm4326|0|CurvePolygon|2|KO-BKO +trianglezm4326|0|MultiCurve|2|KO-BKO +trianglezm4326|0|MultiSurface|2|KO-BKO +trianglezm4326|0|PolyhedralSurface|2|KO-BKO +trianglezm4326|0|Triangle|2|KO-BKO +trianglezm4326|0|Point|1|KO-BKO +trianglezm4326|0|LineString|1|KO-BKO +trianglezm4326|0|Polygon|1|KO-BKO +trianglezm4326|0|MultiPoint|1|KO-BKO +trianglezm4326|0|MultiLineString|1|KO-BKO +trianglezm4326|0|MultiPolygon|1|KO-BKO +trianglezm4326|0|GeometryCollection|1|KO-BKO +trianglezm4326|0|CircularString|1|KO-BKO +trianglezm4326|0|CompoundCurve|1|KO-BKO +trianglezm4326|0|CurvePolygon|1|KO-BKO +trianglezm4326|0|MultiCurve|1|KO-BKO +trianglezm4326|0|MultiSurface|1|KO-BKO +trianglezm4326|0|PolyhedralSurface|1|KO-BKO +trianglezm4326|0|Triangle|1|KO-BKO +trianglezm4326|0|Point|3|KO-BKO +trianglezm4326|0|LineString|3|KO-BKO +trianglezm4326|0|Polygon|3|KO-BKO +trianglezm4326|0|MultiPoint|3|KO-BKO +trianglezm4326|0|MultiLineString|3|KO-BKO +trianglezm4326|0|MultiPolygon|3|KO-BKO +trianglezm4326|0|GeometryCollection|3|KO-BKO +trianglezm4326|0|CircularString|3|KO-BKO +trianglezm4326|0|CompoundCurve|3|KO-BKO +trianglezm4326|0|CurvePolygon|3|KO-BKO +trianglezm4326|0|MultiCurve|3|KO-BKO +trianglezm4326|0|MultiSurface|3|KO-BKO +trianglezm4326|0|PolyhedralSurface|3|KO-BKO +trianglezm4326|0|Triangle|3|KO-BKO +trianglezm4326|4326|Point|0|KO-BKO +trianglezm4326|4326|LineString|0|KO-BKO +trianglezm4326|4326|Polygon|0|KO-BKO +trianglezm4326|4326|MultiPoint|0|KO-BKO +trianglezm4326|4326|MultiLineString|0|KO-BKO +trianglezm4326|4326|MultiPolygon|0|KO-BKO +trianglezm4326|4326|GeometryCollection|0|KO-BKO +trianglezm4326|4326|CircularString|0|KO-BKO +trianglezm4326|4326|CompoundCurve|0|KO-BKO +trianglezm4326|4326|CurvePolygon|0|KO-BKO +trianglezm4326|4326|MultiCurve|0|KO-BKO +trianglezm4326|4326|MultiSurface|0|KO-BKO +trianglezm4326|4326|PolyhedralSurface|0|KO-BKO +trianglezm4326|4326|Triangle|0|KO-BKO +trianglezm4326|4326|Tin|0|KO-BKO +trianglezm4326|4326|Point|2|KO-BKO +trianglezm4326|4326|LineString|2|KO-BKO +trianglezm4326|4326|Polygon|2|KO-BKO +trianglezm4326|4326|MultiPoint|2|KO-BKO +trianglezm4326|4326|MultiLineString|2|KO-BKO +trianglezm4326|4326|MultiPolygon|2|KO-BKO +trianglezm4326|4326|GeometryCollection|2|KO-BKO +trianglezm4326|4326|CircularString|2|KO-BKO +trianglezm4326|4326|CompoundCurve|2|KO-BKO +trianglezm4326|4326|CurvePolygon|2|KO-BKO +trianglezm4326|4326|MultiCurve|2|KO-BKO +trianglezm4326|4326|MultiSurface|2|KO-BKO +trianglezm4326|4326|PolyhedralSurface|2|KO-BKO +trianglezm4326|4326|Triangle|2|KO-BKO +trianglezm4326|4326|Point|1|KO-BKO +trianglezm4326|4326|LineString|1|KO-BKO +trianglezm4326|4326|Polygon|1|KO-BKO +trianglezm4326|4326|MultiPoint|1|KO-BKO +trianglezm4326|4326|MultiLineString|1|KO-BKO +trianglezm4326|4326|MultiPolygon|1|KO-BKO +trianglezm4326|4326|GeometryCollection|1|KO-BKO +trianglezm4326|4326|CircularString|1|KO-BKO +trianglezm4326|4326|CompoundCurve|1|KO-BKO +trianglezm4326|4326|CurvePolygon|1|KO-BKO +trianglezm4326|4326|MultiCurve|1|KO-BKO +trianglezm4326|4326|MultiSurface|1|KO-BKO +trianglezm4326|4326|PolyhedralSurface|1|KO-BKO +trianglezm4326|4326|Triangle|1|KO-BKO +trianglezm4326|4326|Point|3|KO-BKO +trianglezm4326|4326|LineString|3|KO-BKO +trianglezm4326|4326|Polygon|3|KO-BKO +trianglezm4326|4326|MultiPoint|3|KO-BKO +trianglezm4326|4326|MultiLineString|3|KO-BKO +trianglezm4326|4326|MultiPolygon|3|KO-BKO +trianglezm4326|4326|GeometryCollection|3|KO-BKO +trianglezm4326|4326|CircularString|3|KO-BKO +trianglezm4326|4326|CompoundCurve|3|KO-BKO +trianglezm4326|4326|CurvePolygon|3|KO-BKO +trianglezm4326|4326|MultiCurve|3|KO-BKO +trianglezm4326|4326|MultiSurface|3|KO-BKO +trianglezm4326|4326|PolyhedralSurface|3|KO-BKO +trianglezm4326|4326|Triangle|3|OK-BOK +trianglezm4326||COUNT|2| diff -Nru postgis-1.5.3/regress/unaryunion.sql postgis-2.0.1/regress/unaryunion.sql --- postgis-1.5.3/regress/unaryunion.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/unaryunion.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,10 @@ + +-- Noding a multilinestring +SELECT 1, ST_AsText(ST_UnaryUnion('MULTILINESTRING((0 0, 10 0), (5 -5, 5 5))')); + +-- Unioning a set of polygons (CascadedUnion) +SELECT 2, ST_AsText(ST_UnaryUnion('GEOMETRYCOLLECTION(POLYGON((0 0, 10 0, 10 10, 0 10, 0 0)),POLYGON((5 5, 15 5, 15 15, 5 15, 5 5)))')); + +-- Unioning an heterogeneous collection of geometries +SELECT 3, ST_AsText(ST_UnaryUnion('GEOMETRYCOLLECTION(POLYGON((0 0, 10 0, 10 10, 0 10, 0 0)),POLYGON((5 5, 15 5, 15 15, 5 15, 5 5)), MULTIPOINT(5 4, -5 4),LINESTRING(2 -10, 2 20))')); + diff -Nru postgis-1.5.3/regress/unaryunion_expected postgis-2.0.1/regress/unaryunion_expected --- postgis-1.5.3/regress/unaryunion_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/unaryunion_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,3 @@ +1|MULTILINESTRING((0 0,5 0),(5 0,10 0),(5 -5,5 0),(5 0,5 5)) +2|POLYGON((10 5,10 0,0 0,0 10,5 10,5 15,15 15,15 5,10 5)) +3|GEOMETRYCOLLECTION(POINT(-5 4),LINESTRING(2 -10,2 0),LINESTRING(2 10,2 20),POLYGON((10 5,10 0,2 0,0 0,0 10,2 10,5 10,5 15,15 15,15 5,10 5))) diff -Nru postgis-1.5.3/regress/wkb.sql postgis-2.0.1/regress/wkb.sql --- postgis-1.5.3/regress/wkb.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/wkb.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,535 @@ +-- POINT +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'POINT EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'POINT Z EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'POINT M EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'POINT ZM EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'POINT(0 0)' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'POINT Z (1 2 3)' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'POINT M (1 2 3)' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'POINT ZM (1 2 3 4)' +::text as g ) as foo; + +-- MULTIPOINT +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'MULTIPOINT EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'MULTIPOINT Z EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'MULTIPOINT M EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'MULTIPOINT ZM EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'MULTIPOINT((0 0), (2 0))' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'MULTIPOINT Z ((0 0 0), (2 0 1))' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'MULTIPOINT M ((0 0 2), (2 0 1))' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'MULTIPOINT ZM ((0 1 2 3), (3 2 1 0))' +::text as g ) as foo; + +-- LINESTRING +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'LINESTRING EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'LINESTRING Z EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'LINESTRING M EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'LINESTRING ZM EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'LINESTRING(0 0, 1 1)' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'LINESTRING Z (0 0 2, 1 1 3)' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'LINESTRING M (0 0 2, 1 1 3)' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'LINESTRING ZM (0 0 2 3, 1 1 4 5)' +::text as g ) as foo; + +-- MULTILINESTRING +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'MULTILINESTRING EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'MULTILINESTRING Z EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'MULTILINESTRING M EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'MULTILINESTRING ZM EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'MULTILINESTRING((0 0, 2 0))' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'MULTILINESTRING((0 0, 2 0), (1 1, 2 2))' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'MULTILINESTRING Z ((0 0 1, 2 0 2), (1 1 3, 2 2 4))' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'MULTILINESTRING M ((0 0 1, 2 0 2), (1 1 3, 2 2 4))' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'MULTILINESTRING ZM ((0 0 1 5, 2 0 2 4), (1 1 3 3, 2 2 4 2))' +::text as g ) as foo; + +-- POLYGON +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'POLYGON EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'POLYGON Z EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'POLYGON M EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'POLYGON ZM EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'POLYGON((0 0,1 0,1 1,0 1,0 0))' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'POLYGON((0 0,10 0,10 10,0 10,0 0),(2 2,2 5,5 5,5 2,2 2))' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'POLYGON Z ((0 0 1,10 0 2 ,10 10 2,0 10 2,0 0 1),(2 2 5 ,2 5 4,5 5 3,5 2 3,2 2 5))' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'POLYGON M ((0 0 1,10 0 2 ,10 10 2,0 10 2,0 0 1),(2 2 5 ,2 5 4,5 5 3,5 2 3,2 2 5))' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'POLYGON ZM ((0 0 1 -1,10 0 2 -2,10 10 2 -2,0 10 2 -4,0 0 1 -1),(2 2 5 0,2 5 4 1,5 5 3 2,5 2 3 1,2 2 5 0))' +::text as g ) as foo; + +-- MULTIPOLYGON +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'MULTIPOLYGON EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'MULTIPOLYGON Z EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'MULTIPOLYGON M EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'MULTIPOLYGON ZM EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0),(2 2,2 5,5 5,5 2,2 2)))' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'MULTIPOLYGON Z (((0 0 3,10 0 3,10 10 3,0 10 3,0 0 3),(2 2 3,2 5 3,5 5 3,5 2 3,2 2 3)))' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'MULTIPOLYGON M (((0 0 3,10 0 3,10 10 3,0 10 3,0 0 3),(2 2 3,2 5 3,5 5 3,5 2 3,2 2 3)))' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'MULTIPOLYGON ZM (((0 0 3 2,10 0 3 2,10 10 3 2,0 10 3 2,0 0 3 2),(2 2 3 2,2 5 3 2,5 5 3 2,5 2 3 2,2 2 3 2)))' +::text as g ) as foo; + +-- GEOMETRYCOLLECTION +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'GEOMETRYCOLLECTION EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'GEOMETRYCOLLECTION Z EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'GEOMETRYCOLLECTION M EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'GEOMETRYCOLLECTION ZM EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'GEOMETRYCOLLECTION ZM (POINT ZM (0 0 0 0),LINESTRING ZM (0 0 0 0,1 1 1 1))' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'GEOMETRYCOLLECTION M (POINT M (0 0 0),LINESTRING M (0 0 0,1 1 1))' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'GEOMETRYCOLLECTION M (POINT M (0 0 0),LINESTRING M (0 0 0,1 1 1),GEOMETRYCOLLECTION M (POINT M (0 0 0),LINESTRING M (0 0 0,1 1 1)))' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'GEOMETRYCOLLECTION M (POINT M (0 0 0),LINESTRING M (0 0 0,1 1 1),POINT M EMPTY,GEOMETRYCOLLECTION M (POINT M (0 0 0),LINESTRING M (0 0 0,1 1 1)))' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'GEOMETRYCOLLECTION M (POINT M (0 0 0),LINESTRING M (0 0 0,1 1 1),GEOMETRYCOLLECTION M (POINT M (0 0 0),LINESTRING M (0 0 0,1 1 1),POINT M EMPTY,GEOMETRYCOLLECTION M (POINT M (0 0 0),LINESTRING M (0 0 0,1 1 1))),POINT M EMPTY,GEOMETRYCOLLECTION M (POINT M (0 0 0),LINESTRING M (0 0 0,1 1 1)))' +::text as g ) as foo; + +-- CIRCULARSTRING +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'CIRCULARSTRING EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'CIRCULARSTRING Z EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'CIRCULARSTRING M EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'CIRCULARSTRING ZM EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'CIRCULARSTRING (0 0,1 1, 2 0)' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'CIRCULARSTRING M (0 0 1,1 1 1, 2 0 1)' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'CIRCULARSTRING ZM (0 0 1 2,1 1 1 2, 2 0 1 2)' +::text as g ) as foo; + +-- COMPOUNDCURVE +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'COMPOUNDCURVE EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'COMPOUNDCURVE Z EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'COMPOUNDCURVE M EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'COMPOUNDCURVE ZM EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'COMPOUNDCURVE (CIRCULARSTRING (0 0,1 1,2 0),LINESTRING(2 0,4 1))' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'COMPOUNDCURVE Z (CIRCULARSTRING Z (0 0 1,1 1 1,2 0 1),LINESTRING Z (2 0 0,4 1 1))' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'COMPOUNDCURVE M (CIRCULARSTRING M (0 0 1,1 1 1,2 0 1),LINESTRING M (2 0 0,4 1 1))' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'COMPOUNDCURVE ZM (CIRCULARSTRING ZM (0 0 1 2,1 1 1 2,2 0 1 2),LINESTRING ZM (2 0 0 0,4 1 1 1))' +::text as g ) as foo; + +-- CURVEPOLYGON +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'CURVEPOLYGON EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'CURVEPOLYGON Z EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'CURVEPOLYGON M EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'CURVEPOLYGON ZM EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'CURVEPOLYGON ZM (COMPOUNDCURVE ZM (CIRCULARSTRING ZM (0 0 1 2,1 1 1 2,2 0 1 2),LINESTRING(2 0 1 2,1 -1 1 1,0 0 1 2)))' +::text as g ) as foo; + +-- MULTICURVE +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'MULTICURVE EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'MULTICURVE Z EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'MULTICURVE M EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'MULTICURVE ZM EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'MULTICURVE ZM (COMPOUNDCURVE ZM (CIRCULARSTRING ZM (0 0 1 2,1 1 1 2,2 0 1 2),LINESTRING(2 0 1 2,1 -1 1 1,0 0 1 2)))' +::text as g ) as foo; + +-- MULTISURFACE +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'MULTISURFACE EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'MULTISURFACE Z EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'MULTISURFACE M EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'MULTISURFACE ZM EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'MULTISURFACE ZM (CURVEPOLYGON ZM (COMPOUNDCURVE ZM (CIRCULARSTRING ZM (0 0 1 2,1 1 1 2,2 0 1 2),LINESTRING(2 0 1 2,1 -1 1 1,0 0 1 2))),POLYGON((10 10 10 10,10 12 10 10,12 12 10 10,12 10 10 10,10 10 10 10)))' +::text as g ) as foo; + +-- POLYHEDRALSURFACE +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'POLYHEDRALSURFACE EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'POLYHEDRALSURFACE Z EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'POLYHEDRALSURFACE M EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'POLYHEDRALSURFACE ZM EMPTY' +::text as g ) as foo; + +-- TRIANGLE +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'TRIANGLE EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'TRIANGLE Z EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'TRIANGLE M EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'TRIANGLE ZM EMPTY' +::text as g ) as foo; + +-- TIN +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'TIN EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'TIN Z EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'TIN M EMPTY' +::text as g ) as foo; +select g, encode(st_asbinary(g::geometry, 'ndr'), 'hex'), + st_orderingequals(g::geometry, ST_GeomFromWKB(ST_AsBinary(g::geometry))), + encode(st_asbinary(g::geometry, 'xdr'), 'hex') FROM ( SELECT + 'TIN ZM EMPTY' +::text as g ) as foo; + diff -Nru postgis-1.5.3/regress/wkb_expected postgis-2.0.1/regress/wkb_expected --- postgis-1.5.3/regress/wkb_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/regress/wkb_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,101 @@ +POINT EMPTY|010400000000000000|f|000000000400000000 +POINT Z EMPTY|01ec03000000000000|f|00000003ec00000000 +POINT M EMPTY|01d407000000000000|f|00000007d400000000 +POINT ZM EMPTY|01bc0b000000000000|f|0000000bbc00000000 +POINT(0 0)|010100000000000000000000000000000000000000|t|000000000100000000000000000000000000000000 +POINT Z (1 2 3)|01e9030000000000000000f03f00000000000000400000000000000840|t|00000003e93ff000000000000040000000000000004008000000000000 +POINT M (1 2 3)|01d1070000000000000000f03f00000000000000400000000000000840|t|00000007d13ff000000000000040000000000000004008000000000000 +POINT ZM (1 2 3 4)|01b90b0000000000000000f03f000000000000004000000000000008400000000000001040|t|0000000bb93ff0000000000000400000000000000040080000000000004010000000000000 +MULTIPOINT EMPTY|010400000000000000|t|000000000400000000 +MULTIPOINT Z EMPTY|01ec03000000000000|t|00000003ec00000000 +MULTIPOINT M EMPTY|01d407000000000000|t|00000007d400000000 +MULTIPOINT ZM EMPTY|01bc0b000000000000|t|0000000bbc00000000 +MULTIPOINT((0 0), (2 0))|010400000002000000010100000000000000000000000000000000000000010100000000000000000000400000000000000000|t|000000000400000002000000000100000000000000000000000000000000000000000140000000000000000000000000000000 +MULTIPOINT Z ((0 0 0), (2 0 1))|01ec0300000200000001e903000000000000000000000000000000000000000000000000000001e903000000000000000000400000000000000000000000000000f03f|t|00000003ec0000000200000003e900000000000000000000000000000000000000000000000000000003e9400000000000000000000000000000003ff0000000000000 +MULTIPOINT M ((0 0 2), (2 0 1))|01d40700000200000001d107000000000000000000000000000000000000000000000000004001d107000000000000000000400000000000000000000000000000f03f|t|00000007d40000000200000007d100000000000000000000000000000000400000000000000000000007d1400000000000000000000000000000003ff0000000000000 +MULTIPOINT ZM ((0 1 2 3), (3 2 1 0))|01bc0b00000200000001b90b00000000000000000000000000000000f03f0000000000000040000000000000084001b90b000000000000000008400000000000000040000000000000f03f0000000000000000|t|0000000bbc000000020000000bb900000000000000003ff0000000000000400000000000000040080000000000000000000bb9400800000000000040000000000000003ff00000000000000000000000000000 +LINESTRING EMPTY|010200000000000000|t|000000000200000000 +LINESTRING Z EMPTY|01ea03000000000000|t|00000003ea00000000 +LINESTRING M EMPTY|01d207000000000000|t|00000007d200000000 +LINESTRING ZM EMPTY|01ba0b000000000000|t|0000000bba00000000 +LINESTRING(0 0, 1 1)|01020000000200000000000000000000000000000000000000000000000000f03f000000000000f03f|t|000000000200000002000000000000000000000000000000003ff00000000000003ff0000000000000 +LINESTRING Z (0 0 2, 1 1 3)|01ea03000002000000000000000000000000000000000000000000000000000040000000000000f03f000000000000f03f0000000000000840|t|00000003ea000000020000000000000000000000000000000040000000000000003ff00000000000003ff00000000000004008000000000000 +LINESTRING M (0 0 2, 1 1 3)|01d207000002000000000000000000000000000000000000000000000000000040000000000000f03f000000000000f03f0000000000000840|t|00000007d2000000020000000000000000000000000000000040000000000000003ff00000000000003ff00000000000004008000000000000 +LINESTRING ZM (0 0 2 3, 1 1 4 5)|01ba0b0000020000000000000000000000000000000000000000000000000000400000000000000840000000000000f03f000000000000f03f00000000000010400000000000001440|t|0000000bba0000000200000000000000000000000000000000400000000000000040080000000000003ff00000000000003ff000000000000040100000000000004014000000000000 +MULTILINESTRING EMPTY|010500000000000000|t|000000000500000000 +MULTILINESTRING Z EMPTY|01ed03000000000000|t|00000003ed00000000 +MULTILINESTRING M EMPTY|01d507000000000000|t|00000007d500000000 +MULTILINESTRING ZM EMPTY|01bd0b000000000000|t|0000000bbd00000000 +MULTILINESTRING((0 0, 2 0))|0105000000010000000102000000020000000000000000000000000000000000000000000000000000400000000000000000|t|0000000005000000010000000002000000020000000000000000000000000000000040000000000000000000000000000000 +MULTILINESTRING((0 0, 2 0), (1 1, 2 2))|0105000000020000000102000000020000000000000000000000000000000000000000000000000000400000000000000000010200000002000000000000000000f03f000000000000f03f00000000000000400000000000000040|t|00000000050000000200000000020000000200000000000000000000000000000000400000000000000000000000000000000000000002000000023ff00000000000003ff000000000000040000000000000004000000000000000 +MULTILINESTRING Z ((0 0 1, 2 0 2), (1 1 3, 2 2 4))|01ed0300000200000001ea0300000200000000000000000000000000000000000000000000000000f03f00000000000000400000000000000000000000000000004001ea03000002000000000000000000f03f000000000000f03f0000000000000840000000000000004000000000000000400000000000001040|t|00000003ed0000000200000003ea00000002000000000000000000000000000000003ff000000000000040000000000000000000000000000000400000000000000000000003ea000000023ff00000000000003ff00000000000004008000000000000400000000000000040000000000000004010000000000000 +MULTILINESTRING M ((0 0 1, 2 0 2), (1 1 3, 2 2 4))|01d50700000200000001d20700000200000000000000000000000000000000000000000000000000f03f00000000000000400000000000000000000000000000004001d207000002000000000000000000f03f000000000000f03f0000000000000840000000000000004000000000000000400000000000001040|t|00000007d50000000200000007d200000002000000000000000000000000000000003ff000000000000040000000000000000000000000000000400000000000000000000007d2000000023ff00000000000003ff00000000000004008000000000000400000000000000040000000000000004010000000000000 +MULTILINESTRING ZM ((0 0 1 5, 2 0 2 4), (1 1 3 3, 2 2 4 2))|01bd0b00000200000001ba0b00000200000000000000000000000000000000000000000000000000f03f0000000000001440000000000000004000000000000000000000000000000040000000000000104001ba0b000002000000000000000000f03f000000000000f03f000000000000084000000000000008400000000000000040000000000000004000000000000010400000000000000040|t|0000000bbd000000020000000bba00000002000000000000000000000000000000003ff0000000000000401400000000000040000000000000000000000000000000400000000000000040100000000000000000000bba000000023ff00000000000003ff0000000000000400800000000000040080000000000004000000000000000400000000000000040100000000000004000000000000000 +POLYGON EMPTY|010300000000000000|t|000000000300000000 +POLYGON Z EMPTY|01eb03000000000000|t|00000003eb00000000 +POLYGON M EMPTY|01d307000000000000|t|00000007d300000000 +POLYGON ZM EMPTY|01bb0b000000000000|t|0000000bbb00000000 +POLYGON((0 0,1 0,1 1,0 1,0 0))|0103000000010000000500000000000000000000000000000000000000000000000000f03f0000000000000000000000000000f03f000000000000f03f0000000000000000000000000000f03f00000000000000000000000000000000|t|00000000030000000100000005000000000000000000000000000000003ff000000000000000000000000000003ff00000000000003ff000000000000000000000000000003ff000000000000000000000000000000000000000000000 +POLYGON((0 0,10 0,10 10,0 10,0 0),(2 2,2 5,5 5,5 2,2 2))|010300000002000000050000000000000000000000000000000000000000000000000024400000000000000000000000000000244000000000000024400000000000000000000000000000244000000000000000000000000000000000050000000000000000000040000000000000004000000000000000400000000000001440000000000000144000000000000014400000000000001440000000000000004000000000000000400000000000000040|t|000000000300000002000000050000000000000000000000000000000040240000000000000000000000000000402400000000000040240000000000000000000000000000402400000000000000000000000000000000000000000000000000054000000000000000400000000000000040000000000000004014000000000000401400000000000040140000000000004014000000000000400000000000000040000000000000004000000000000000 +POLYGON Z ((0 0 1,10 0 2 ,10 10 2,0 10 2,0 0 1),(2 2 5 ,2 5 4,5 5 3,5 2 3,2 2 5))|01eb030000020000000500000000000000000000000000000000000000000000000000f03f00000000000024400000000000000000000000000000004000000000000024400000000000002440000000000000004000000000000000000000000000002440000000000000004000000000000000000000000000000000000000000000f03f05000000000000000000004000000000000000400000000000001440000000000000004000000000000014400000000000001040000000000000144000000000000014400000000000000840000000000000144000000000000000400000000000000840000000000000004000000000000000400000000000001440|t|00000003eb0000000200000005000000000000000000000000000000003ff0000000000000402400000000000000000000000000004000000000000000402400000000000040240000000000004000000000000000000000000000000040240000000000004000000000000000000000000000000000000000000000003ff000000000000000000005400000000000000040000000000000004014000000000000400000000000000040140000000000004010000000000000401400000000000040140000000000004008000000000000401400000000000040000000000000004008000000000000400000000000000040000000000000004014000000000000 +POLYGON M ((0 0 1,10 0 2 ,10 10 2,0 10 2,0 0 1),(2 2 5 ,2 5 4,5 5 3,5 2 3,2 2 5))|01d3070000020000000500000000000000000000000000000000000000000000000000f03f00000000000024400000000000000000000000000000004000000000000024400000000000002440000000000000004000000000000000000000000000002440000000000000004000000000000000000000000000000000000000000000f03f05000000000000000000004000000000000000400000000000001440000000000000004000000000000014400000000000001040000000000000144000000000000014400000000000000840000000000000144000000000000000400000000000000840000000000000004000000000000000400000000000001440|t|00000007d30000000200000005000000000000000000000000000000003ff0000000000000402400000000000000000000000000004000000000000000402400000000000040240000000000004000000000000000000000000000000040240000000000004000000000000000000000000000000000000000000000003ff000000000000000000005400000000000000040000000000000004014000000000000400000000000000040140000000000004010000000000000401400000000000040140000000000004008000000000000401400000000000040000000000000004008000000000000400000000000000040000000000000004014000000000000 +POLYGON ZM ((0 0 1 -1,10 0 2 -2,10 10 2 -2,0 10 2 -4,0 0 1 -1),(2 2 5 0,2 5 4 1,5 5 3 2,5 2 3 1,2 2 5 0))|01bb0b0000020000000500000000000000000000000000000000000000000000000000f03f000000000000f0bf00000000000024400000000000000000000000000000004000000000000000c000000000000024400000000000002440000000000000004000000000000000c000000000000000000000000000002440000000000000004000000000000010c000000000000000000000000000000000000000000000f03f000000000000f0bf050000000000000000000040000000000000004000000000000014400000000000000000000000000000004000000000000014400000000000001040000000000000f03f0000000000001440000000000000144000000000000008400000000000000040000000000000144000000000000000400000000000000840000000000000f03f0000000000000040000000000000004000000000000014400000000000000000|t|0000000bbb0000000200000005000000000000000000000000000000003ff0000000000000bff0000000000000402400000000000000000000000000004000000000000000c000000000000000402400000000000040240000000000004000000000000000c000000000000000000000000000000040240000000000004000000000000000c010000000000000000000000000000000000000000000003ff0000000000000bff00000000000000000000540000000000000004000000000000000401400000000000000000000000000004000000000000000401400000000000040100000000000003ff000000000000040140000000000004014000000000000400800000000000040000000000000004014000000000000400000000000000040080000000000003ff00000000000004000000000000000400000000000000040140000000000000000000000000000 +MULTIPOLYGON EMPTY|010600000000000000|t|000000000600000000 +MULTIPOLYGON Z EMPTY|01ee03000000000000|t|00000003ee00000000 +MULTIPOLYGON M EMPTY|01d607000000000000|t|00000007d600000000 +MULTIPOLYGON ZM EMPTY|01be0b000000000000|t|0000000bbe00000000 +MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0),(2 2,2 5,5 5,5 2,2 2)))|010600000001000000010300000002000000050000000000000000000000000000000000000000000000000024400000000000000000000000000000244000000000000024400000000000000000000000000000244000000000000000000000000000000000050000000000000000000040000000000000004000000000000000400000000000001440000000000000144000000000000014400000000000001440000000000000004000000000000000400000000000000040|t|000000000600000001000000000300000002000000050000000000000000000000000000000040240000000000000000000000000000402400000000000040240000000000000000000000000000402400000000000000000000000000000000000000000000000000054000000000000000400000000000000040000000000000004014000000000000401400000000000040140000000000004014000000000000400000000000000040000000000000004000000000000000 +MULTIPOLYGON Z (((0 0 3,10 0 3,10 10 3,0 10 3,0 0 3),(2 2 3,2 5 3,5 5 3,5 2 3,2 2 3)))|01ee0300000100000001eb030000020000000500000000000000000000000000000000000000000000000000084000000000000024400000000000000000000000000000084000000000000024400000000000002440000000000000084000000000000000000000000000002440000000000000084000000000000000000000000000000000000000000000084005000000000000000000004000000000000000400000000000000840000000000000004000000000000014400000000000000840000000000000144000000000000014400000000000000840000000000000144000000000000000400000000000000840000000000000004000000000000000400000000000000840|t|00000003ee0000000100000003eb000000020000000500000000000000000000000000000000400800000000000040240000000000000000000000000000400800000000000040240000000000004024000000000000400800000000000000000000000000004024000000000000400800000000000000000000000000000000000000000000400800000000000000000005400000000000000040000000000000004008000000000000400000000000000040140000000000004008000000000000401400000000000040140000000000004008000000000000401400000000000040000000000000004008000000000000400000000000000040000000000000004008000000000000 +MULTIPOLYGON M (((0 0 3,10 0 3,10 10 3,0 10 3,0 0 3),(2 2 3,2 5 3,5 5 3,5 2 3,2 2 3)))|01d60700000100000001d3070000020000000500000000000000000000000000000000000000000000000000084000000000000024400000000000000000000000000000084000000000000024400000000000002440000000000000084000000000000000000000000000002440000000000000084000000000000000000000000000000000000000000000084005000000000000000000004000000000000000400000000000000840000000000000004000000000000014400000000000000840000000000000144000000000000014400000000000000840000000000000144000000000000000400000000000000840000000000000004000000000000000400000000000000840|t|00000007d60000000100000007d3000000020000000500000000000000000000000000000000400800000000000040240000000000000000000000000000400800000000000040240000000000004024000000000000400800000000000000000000000000004024000000000000400800000000000000000000000000000000000000000000400800000000000000000005400000000000000040000000000000004008000000000000400000000000000040140000000000004008000000000000401400000000000040140000000000004008000000000000401400000000000040000000000000004008000000000000400000000000000040000000000000004008000000000000 +MULTIPOLYGON ZM (((0 0 3 2,10 0 3 2,10 10 3 2,0 10 3 2,0 0 3 2),(2 2 3 2,2 5 3 2,5 5 3 2,5 2 3 2,2 2 3 2)))|01be0b00000100000001bb0b00000200000005000000000000000000000000000000000000000000000000000840000000000000004000000000000024400000000000000000000000000000084000000000000000400000000000002440000000000000244000000000000008400000000000000040000000000000000000000000000024400000000000000840000000000000004000000000000000000000000000000000000000000000084000000000000000400500000000000000000000400000000000000040000000000000084000000000000000400000000000000040000000000000144000000000000008400000000000000040000000000000144000000000000014400000000000000840000000000000004000000000000014400000000000000040000000000000084000000000000000400000000000000040000000000000004000000000000008400000000000000040|t|0000000bbe000000010000000bbb0000000200000005000000000000000000000000000000004008000000000000400000000000000040240000000000000000000000000000400800000000000040000000000000004024000000000000402400000000000040080000000000004000000000000000000000000000000040240000000000004008000000000000400000000000000000000000000000000000000000000000400800000000000040000000000000000000000540000000000000004000000000000000400800000000000040000000000000004000000000000000401400000000000040080000000000004000000000000000401400000000000040140000000000004008000000000000400000000000000040140000000000004000000000000000400800000000000040000000000000004000000000000000400000000000000040080000000000004000000000000000 +GEOMETRYCOLLECTION EMPTY|010700000000000000|t|000000000700000000 +GEOMETRYCOLLECTION Z EMPTY|01ef03000000000000|t|00000003ef00000000 +GEOMETRYCOLLECTION M EMPTY|01d707000000000000|t|00000007d700000000 +GEOMETRYCOLLECTION ZM EMPTY|01bf0b000000000000|t|0000000bbf00000000 +GEOMETRYCOLLECTION ZM (POINT ZM (0 0 0 0),LINESTRING ZM (0 0 0 0,1 1 1 1))|01bf0b00000200000001b90b0000000000000000000000000000000000000000000000000000000000000000000001ba0b0000020000000000000000000000000000000000000000000000000000000000000000000000000000000000f03f000000000000f03f000000000000f03f000000000000f03f|t|0000000bbf000000020000000bb900000000000000000000000000000000000000000000000000000000000000000000000bba0000000200000000000000000000000000000000000000000000000000000000000000003ff00000000000003ff00000000000003ff00000000000003ff0000000000000 +GEOMETRYCOLLECTION M (POINT M (0 0 0),LINESTRING M (0 0 0,1 1 1))|01d70700000200000001d107000000000000000000000000000000000000000000000000000001d207000002000000000000000000000000000000000000000000000000000000000000000000f03f000000000000f03f000000000000f03f|t|00000007d70000000200000007d100000000000000000000000000000000000000000000000000000007d2000000020000000000000000000000000000000000000000000000003ff00000000000003ff00000000000003ff0000000000000 +GEOMETRYCOLLECTION M (POINT M (0 0 0),LINESTRING M (0 0 0,1 1 1),GEOMETRYCOLLECTION M (POINT M (0 0 0),LINESTRING M (0 0 0,1 1 1)))|01d70700000300000001d107000000000000000000000000000000000000000000000000000001d207000002000000000000000000000000000000000000000000000000000000000000000000f03f000000000000f03f000000000000f03f01d70700000200000001d107000000000000000000000000000000000000000000000000000001d207000002000000000000000000000000000000000000000000000000000000000000000000f03f000000000000f03f000000000000f03f|t|00000007d70000000300000007d100000000000000000000000000000000000000000000000000000007d2000000020000000000000000000000000000000000000000000000003ff00000000000003ff00000000000003ff000000000000000000007d70000000200000007d100000000000000000000000000000000000000000000000000000007d2000000020000000000000000000000000000000000000000000000003ff00000000000003ff00000000000003ff0000000000000 +GEOMETRYCOLLECTION M (POINT M (0 0 0),LINESTRING M (0 0 0,1 1 1),POINT M EMPTY,GEOMETRYCOLLECTION M (POINT M (0 0 0),LINESTRING M (0 0 0,1 1 1)))|01d70700000400000001d107000000000000000000000000000000000000000000000000000001d207000002000000000000000000000000000000000000000000000000000000000000000000f03f000000000000f03f000000000000f03f01d40700000000000001d70700000200000001d107000000000000000000000000000000000000000000000000000001d207000002000000000000000000000000000000000000000000000000000000000000000000f03f000000000000f03f000000000000f03f|f|00000007d70000000400000007d100000000000000000000000000000000000000000000000000000007d2000000020000000000000000000000000000000000000000000000003ff00000000000003ff00000000000003ff000000000000000000007d40000000000000007d70000000200000007d100000000000000000000000000000000000000000000000000000007d2000000020000000000000000000000000000000000000000000000003ff00000000000003ff00000000000003ff0000000000000 +GEOMETRYCOLLECTION M (POINT M (0 0 0),LINESTRING M (0 0 0,1 1 1),GEOMETRYCOLLECTION M (POINT M (0 0 0),LINESTRING M (0 0 0,1 1 1),POINT M EMPTY,GEOMETRYCOLLECTION M (POINT M (0 0 0),LINESTRING M (0 0 0,1 1 1))),POINT M EMPTY,GEOMETRYCOLLECTION M (POINT M (0 0 0),LINESTRING M (0 0 0,1 1 1)))|01d70700000500000001d107000000000000000000000000000000000000000000000000000001d207000002000000000000000000000000000000000000000000000000000000000000000000f03f000000000000f03f000000000000f03f01d70700000400000001d107000000000000000000000000000000000000000000000000000001d207000002000000000000000000000000000000000000000000000000000000000000000000f03f000000000000f03f000000000000f03f01d40700000000000001d70700000200000001d107000000000000000000000000000000000000000000000000000001d207000002000000000000000000000000000000000000000000000000000000000000000000f03f000000000000f03f000000000000f03f01d40700000000000001d70700000200000001d107000000000000000000000000000000000000000000000000000001d207000002000000000000000000000000000000000000000000000000000000000000000000f03f000000000000f03f000000000000f03f|f|00000007d70000000500000007d100000000000000000000000000000000000000000000000000000007d2000000020000000000000000000000000000000000000000000000003ff00000000000003ff00000000000003ff000000000000000000007d70000000400000007d100000000000000000000000000000000000000000000000000000007d2000000020000000000000000000000000000000000000000000000003ff00000000000003ff00000000000003ff000000000000000000007d40000000000000007d70000000200000007d100000000000000000000000000000000000000000000000000000007d2000000020000000000000000000000000000000000000000000000003ff00000000000003ff00000000000003ff000000000000000000007d40000000000000007d70000000200000007d100000000000000000000000000000000000000000000000000000007d2000000020000000000000000000000000000000000000000000000003ff00000000000003ff00000000000003ff0000000000000 +CIRCULARSTRING EMPTY|010800000000000000|t|000000000800000000 +CIRCULARSTRING Z EMPTY|01f003000000000000|t|00000003f000000000 +CIRCULARSTRING M EMPTY|01d807000000000000|t|00000007d800000000 +CIRCULARSTRING ZM EMPTY|01c00b000000000000|t|0000000bc000000000 +CIRCULARSTRING (0 0,1 1, 2 0)|01080000000300000000000000000000000000000000000000000000000000f03f000000000000f03f00000000000000400000000000000000|t|000000000800000003000000000000000000000000000000003ff00000000000003ff000000000000040000000000000000000000000000000 +CIRCULARSTRING M (0 0 1,1 1 1, 2 0 1)|01d80700000300000000000000000000000000000000000000000000000000f03f000000000000f03f000000000000f03f000000000000f03f00000000000000400000000000000000000000000000f03f|t|00000007d800000003000000000000000000000000000000003ff00000000000003ff00000000000003ff00000000000003ff0000000000000400000000000000000000000000000003ff0000000000000 +CIRCULARSTRING ZM (0 0 1 2,1 1 1 2, 2 0 1 2)|01c00b00000300000000000000000000000000000000000000000000000000f03f0000000000000040000000000000f03f000000000000f03f000000000000f03f000000000000004000000000000000400000000000000000000000000000f03f0000000000000040|t|0000000bc000000003000000000000000000000000000000003ff000000000000040000000000000003ff00000000000003ff00000000000003ff00000000000004000000000000000400000000000000000000000000000003ff00000000000004000000000000000 +COMPOUNDCURVE EMPTY|010900000000000000|t|000000000900000000 +COMPOUNDCURVE Z EMPTY|01f103000000000000|t|00000003f100000000 +COMPOUNDCURVE M EMPTY|01d907000000000000|t|00000007d900000000 +COMPOUNDCURVE ZM EMPTY|01c10b000000000000|t|0000000bc100000000 +COMPOUNDCURVE (CIRCULARSTRING (0 0,1 1,2 0),LINESTRING(2 0,4 1))|01090000000200000001080000000300000000000000000000000000000000000000000000000000f03f000000000000f03f00000000000000400000000000000000010200000002000000000000000000004000000000000000000000000000001040000000000000f03f|t|000000000900000002000000000800000003000000000000000000000000000000003ff00000000000003ff0000000000000400000000000000000000000000000000000000002000000024000000000000000000000000000000040100000000000003ff0000000000000 +COMPOUNDCURVE Z (CIRCULARSTRING Z (0 0 1,1 1 1,2 0 1),LINESTRING Z (2 0 0,4 1 1))|01f10300000200000001f00300000300000000000000000000000000000000000000000000000000f03f000000000000f03f000000000000f03f000000000000f03f00000000000000400000000000000000000000000000f03f01ea030000020000000000000000000040000000000000000000000000000000000000000000001040000000000000f03f000000000000f03f|t|00000003f10000000200000003f000000003000000000000000000000000000000003ff00000000000003ff00000000000003ff00000000000003ff0000000000000400000000000000000000000000000003ff000000000000000000003ea0000000240000000000000000000000000000000000000000000000040100000000000003ff00000000000003ff0000000000000 +COMPOUNDCURVE M (CIRCULARSTRING M (0 0 1,1 1 1,2 0 1),LINESTRING M (2 0 0,4 1 1))|01d90700000200000001d80700000300000000000000000000000000000000000000000000000000f03f000000000000f03f000000000000f03f000000000000f03f00000000000000400000000000000000000000000000f03f01d2070000020000000000000000000040000000000000000000000000000000000000000000001040000000000000f03f000000000000f03f|t|00000007d90000000200000007d800000003000000000000000000000000000000003ff00000000000003ff00000000000003ff00000000000003ff0000000000000400000000000000000000000000000003ff000000000000000000007d20000000240000000000000000000000000000000000000000000000040100000000000003ff00000000000003ff0000000000000 +COMPOUNDCURVE ZM (CIRCULARSTRING ZM (0 0 1 2,1 1 1 2,2 0 1 2),LINESTRING ZM (2 0 0 0,4 1 1 1))|01c10b00000200000001c00b00000300000000000000000000000000000000000000000000000000f03f0000000000000040000000000000f03f000000000000f03f000000000000f03f000000000000004000000000000000400000000000000000000000000000f03f000000000000004001ba0b00000200000000000000000000400000000000000000000000000000000000000000000000000000000000001040000000000000f03f000000000000f03f000000000000f03f|t|0000000bc1000000020000000bc000000003000000000000000000000000000000003ff000000000000040000000000000003ff00000000000003ff00000000000003ff00000000000004000000000000000400000000000000000000000000000003ff000000000000040000000000000000000000bba00000002400000000000000000000000000000000000000000000000000000000000000040100000000000003ff00000000000003ff00000000000003ff0000000000000 +CURVEPOLYGON EMPTY|010a00000000000000|t|000000000a00000000 +CURVEPOLYGON Z EMPTY|01f203000000000000|t|00000003f200000000 +CURVEPOLYGON M EMPTY|01da07000000000000|t|00000007da00000000 +CURVEPOLYGON ZM EMPTY|01c20b000000000000|t|0000000bc200000000 +CURVEPOLYGON ZM (COMPOUNDCURVE ZM (CIRCULARSTRING ZM (0 0 1 2,1 1 1 2,2 0 1 2),LINESTRING(2 0 1 2,1 -1 1 1,0 0 1 2)))|01c20b00000100000001c10b00000200000001c00b00000300000000000000000000000000000000000000000000000000f03f0000000000000040000000000000f03f000000000000f03f000000000000f03f000000000000004000000000000000400000000000000000000000000000f03f000000000000004001ba0b00000300000000000000000000400000000000000000000000000000f03f0000000000000040000000000000f03f000000000000f0bf000000000000f03f000000000000f03f00000000000000000000000000000000000000000000f03f0000000000000040|t|0000000bc2000000010000000bc1000000020000000bc000000003000000000000000000000000000000003ff000000000000040000000000000003ff00000000000003ff00000000000003ff00000000000004000000000000000400000000000000000000000000000003ff000000000000040000000000000000000000bba00000003400000000000000000000000000000003ff000000000000040000000000000003ff0000000000000bff00000000000003ff00000000000003ff0000000000000000000000000000000000000000000003ff00000000000004000000000000000 +MULTICURVE EMPTY|010b00000000000000|t|000000000b00000000 +MULTICURVE Z EMPTY|01f303000000000000|t|00000003f300000000 +MULTICURVE M EMPTY|01db07000000000000|t|00000007db00000000 +MULTICURVE ZM EMPTY|01c30b000000000000|t|0000000bc300000000 +MULTICURVE ZM (COMPOUNDCURVE ZM (CIRCULARSTRING ZM (0 0 1 2,1 1 1 2,2 0 1 2),LINESTRING(2 0 1 2,1 -1 1 1,0 0 1 2)))|01c30b00000100000001c10b00000200000001c00b00000300000000000000000000000000000000000000000000000000f03f0000000000000040000000000000f03f000000000000f03f000000000000f03f000000000000004000000000000000400000000000000000000000000000f03f000000000000004001ba0b00000300000000000000000000400000000000000000000000000000f03f0000000000000040000000000000f03f000000000000f0bf000000000000f03f000000000000f03f00000000000000000000000000000000000000000000f03f0000000000000040|t|0000000bc3000000010000000bc1000000020000000bc000000003000000000000000000000000000000003ff000000000000040000000000000003ff00000000000003ff00000000000003ff00000000000004000000000000000400000000000000000000000000000003ff000000000000040000000000000000000000bba00000003400000000000000000000000000000003ff000000000000040000000000000003ff0000000000000bff00000000000003ff00000000000003ff0000000000000000000000000000000000000000000003ff00000000000004000000000000000 +MULTISURFACE EMPTY|010c00000000000000|t|000000000c00000000 +MULTISURFACE Z EMPTY|01f403000000000000|t|00000003f400000000 +MULTISURFACE M EMPTY|01dc07000000000000|t|00000007dc00000000 +MULTISURFACE ZM EMPTY|01c40b000000000000|t|0000000bc400000000 +MULTISURFACE ZM (CURVEPOLYGON ZM (COMPOUNDCURVE ZM (CIRCULARSTRING ZM (0 0 1 2,1 1 1 2,2 0 1 2),LINESTRING(2 0 1 2,1 -1 1 1,0 0 1 2))),POLYGON((10 10 10 10,10 12 10 10,12 12 10 10,12 10 10 10,10 10 10 10)))|01c40b00000200000001c20b00000100000001c10b00000200000001c00b00000300000000000000000000000000000000000000000000000000f03f0000000000000040000000000000f03f000000000000f03f000000000000f03f000000000000004000000000000000400000000000000000000000000000f03f000000000000004001ba0b00000300000000000000000000400000000000000000000000000000f03f0000000000000040000000000000f03f000000000000f0bf000000000000f03f000000000000f03f00000000000000000000000000000000000000000000f03f000000000000004001bb0b0000010000000500000000000000000024400000000000002440000000000000244000000000000024400000000000002440000000000000284000000000000024400000000000002440000000000000284000000000000028400000000000002440000000000000244000000000000028400000000000002440000000000000244000000000000024400000000000002440000000000000244000000000000024400000000000002440|t|0000000bc4000000020000000bc2000000010000000bc1000000020000000bc000000003000000000000000000000000000000003ff000000000000040000000000000003ff00000000000003ff00000000000003ff00000000000004000000000000000400000000000000000000000000000003ff000000000000040000000000000000000000bba00000003400000000000000000000000000000003ff000000000000040000000000000003ff0000000000000bff00000000000003ff00000000000003ff0000000000000000000000000000000000000000000003ff000000000000040000000000000000000000bbb000000010000000540240000000000004024000000000000402400000000000040240000000000004024000000000000402800000000000040240000000000004024000000000000402800000000000040280000000000004024000000000000402400000000000040280000000000004024000000000000402400000000000040240000000000004024000000000000402400000000000040240000000000004024000000000000 +POLYHEDRALSURFACE EMPTY|010f00000000000000|t|000000000f00000000 +POLYHEDRALSURFACE Z EMPTY|01f703000000000000|t|00000003f700000000 +POLYHEDRALSURFACE M EMPTY|01df07000000000000|t|00000007df00000000 +POLYHEDRALSURFACE ZM EMPTY|01c70b000000000000|t|0000000bc700000000 +TRIANGLE EMPTY|011100000000000000|t|000000001100000000 +TRIANGLE Z EMPTY|01f903000000000000|t|00000003f900000000 +TRIANGLE M EMPTY|01e107000000000000|t|00000007e100000000 +TRIANGLE ZM EMPTY|01c90b000000000000|t|0000000bc900000000 +TIN EMPTY|011000000000000000|t|000000001000000000 +TIN Z EMPTY|01f803000000000000|t|00000003f800000000 +TIN M EMPTY|01e007000000000000|t|00000007e000000000 +TIN ZM EMPTY|01c80b000000000000|t|0000000bc800000000 diff -Nru postgis-1.5.3/regress/wkt.sql postgis-2.0.1/regress/wkt.sql --- postgis-1.5.3/regress/wkt.sql 2007-06-04 23:06:28.000000000 +0000 +++ postgis-2.0.1/regress/wkt.sql 2012-02-27 22:08:12.000000000 +0000 @@ -1,40 +1,677 @@ -select ST_astext('POINT EMPTY'); -select ST_astext('POINT(EMPTY)'); -select ST_astext('POINT(0 0)'); -select ST_astext('POINT((0 0))'); +-- POINT -- +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'POINT EMPTY' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'POINT(EMPTY)' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'POINT(0 0)' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'POINT Z (0 0 0)' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'POINT M (0 0 0)' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'POINT ZM (0 0 0 0)' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'POINT ZM (0 0 0)' -- broken, misses an ordinate value +::text as g ) as foo; + + + + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'POINT((0 0))' +::text as g ) as foo; + + + +-- MULTIPOINT -- + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'MULTIPOINT EMPTY' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'MULTIPOINT(EMPTY)' +::text as g ) as foo; -select ST_astext('MULTIPOINT EMPTY'); -select ST_astext('MULTIPOINT(EMPTY)'); -- This is supported for backward compatibility -select ST_astext('MULTIPOINT(0 0, 2 0)'); -select ST_astext('MULTIPOINT((0 0), (2 0))'); -select ST_astext('MULTIPOINT((0 0), (2 0), EMPTY)'); - -select ST_astext('LINESTRING EMPTY'); -select ST_astext('LINESTRING(EMPTY)'); -select ST_astext('LINESTRING(0 0, 1 1)'); -select ST_astext('LINESTRING((0 0, 1 1))'); -select ST_astext('LINESTRING((0 0), (1 1))'); - -select ST_astext('MULTILINESTRING EMPTY'); -select ST_astext('MULTILINESTRING(EMPTY)'); -select ST_astext('MULTILINESTRING(0 0, 2 0)'); -select ST_astext('MULTILINESTRING((0 0, 2 0))'); -select ST_astext('MULTILINESTRING((0 0, 2 0), (1 1, 2 2))'); -select ST_astext('MULTILINESTRING((0 0, 2 0), (1 1, 2 2), EMPTY)'); -select ST_astext('MULTILINESTRING((0 0, 2 0), (1 1, 2 2), (EMPTY))'); - -select ST_astext('POLYGON EMPTY'); -select ST_astext('POLYGON(EMPTY)'); -select ST_astext('POLYGON((0 0,1 0,1 1,0 1,0 0))'); -select ST_astext('POLYGON((0 0,10 0,10 10,0 10,0 0),(2 2,2 5,5 5,5 2,2 2))'); - -select ST_astext('MULTIPOLYGON EMPTY'); -select ST_astext('MULTIPOLYGON(EMPTY)'); -select ST_astext('MULTIPOLYGON((EMPTY))'); -select ST_astext('MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0),(2 2,2 5,5 5,5 2,2 2)))'); +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'MULTIPOINT(0 0, 2 0)' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'MULTIPOINT((0 0), (2 0))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'MULTIPOINT((0 0), (2 0), EMPTY)' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'MULTIPOINT Z ((0 0 0), (2 0 0))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'MULTIPOINT M ((0 0 0), (2 0 0))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'MULTIPOINT ZM ((0 0 0 0), (2 0 0 0))' +::text as g ) as foo; + + +-- LINESTRING -- + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'LINESTRING EMPTY' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'LINESTRING(EMPTY)' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'LINESTRING(0 0, 1 1)' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'LINESTRING((0 0, 1 1))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'LINESTRING((0 0), (1 1))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'LINESTRING Z (0 0 0, 1 1 0)' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'LINESTRING M (0 0 0, 1 1 0)' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'LINESTRING ZM (0 0 0 0, 1 1 0 0)' +::text as g ) as foo; + + +-- MULTILINESTRING -- + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'MULTILINESTRING EMPTY' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'MULTILINESTRING(EMPTY)' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'MULTILINESTRING(0 0, 2 0)' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'MULTILINESTRING((0 0, 2 0))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'MULTILINESTRING((0 0, 2 0), (1 1, 2 2))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'MULTILINESTRING((0 0, 2 0), (1 1, 2 2), EMPTY)' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'MULTILINESTRING((0 0, 2 0), (1 1, 2 2), (EMPTY))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'MULTILINESTRING Z ((0 0 0, 2 0 0), (1 1 0, 2 2 0))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'MULTILINESTRING M ((0 0 0, 2 0 0), (1 1 0, 2 2 0))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'MULTILINESTRING ZM ((0 0 0 0, 2 0 0 0), (1 1 0 0, 2 2 0 0))' +::text as g ) as foo; + + +-- POLYGON -- + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'POLYGON EMPTY' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'POLYGON(EMPTY)' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'POLYGON((0 0,1 0,1 1,0 1,0 0))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'POLYGON((0 0,10 0,10 10,0 10,0 0),(2 2,2 5,5 5,5 2,2 2))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'POLYGON Z ((0 0 0,10 0 0,10 10 0,0 10 0,0 0 0),(2 2 0,2 5 0,5 5 0,5 2 0,2 2 0))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'POLYGON M ((0 0 0,10 0 0,10 10 0,0 10 0,0 0 0),(2 2 0,2 5 0,5 5 0,5 2 0,2 2 0))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'POLYGON ZM ((0 0 0 2,10 0 0 2,10 10 0 2,0 10 0 2,0 0 0 2),(2 2 0 2,2 5 0 2,5 5 0 2,5 2 0 2,2 2 0 2))' +::text as g ) as foo; + + + +-- MULTIPOLYGON -- + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'MULTIPOLYGON EMPTY' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'MULTIPOLYGON(EMPTY)' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'MULTIPOLYGON((EMPTY))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0),(2 2,2 5,5 5,5 2,2 2)))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'MULTIPOLYGON Z (((0 0 2,10 0 2,10 10 2,0 10 2,0 0 2),(2 2 2,2 5 2,5 5 2,5 2 2,2 2 2)))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'MULTIPOLYGON M (((0 0 2,10 0 2,10 10 2,0 10 2,0 0 2),(2 2 2,2 5 2,5 5 2,5 2 2,2 2 2)))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'MULTIPOLYGON ZM (((0 0 2 5,10 0 2 5,10 10 2 5,0 10 2 5,0 0 2 5),(2 2 2 5,2 5 2 5,5 5 2 5,5 2 2 5,2 2 2 5)))' +::text as g ) as foo; + + +-- GEOMETRYCOLLECTION -- + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'GEOMETRYCOLLECTION EMPTY' +::text as g ) as foo; -select ST_astext('GEOMETRYCOLLECTION EMPTY'); -- This is supported for backward compatibility -select ST_astext('GEOMETRYCOLLECTION(EMPTY)'); -select ST_astext('GEOMETRYCOLLECTION((EMPTY))'); +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'GEOMETRYCOLLECTION(EMPTY)' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'GEOMETRYCOLLECTION((EMPTY))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'GEOMETRYCOLLECTION(MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0),(2 2,2 5,5 5,5 2,2 2))),POINT(0 0),MULTILINESTRING((0 0, 2 0),(1 1, 2 2)))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'GEOMETRYCOLLECTION Z (MULTIPOLYGON Z (((0 0 5,10 0 5,10 10 5,0 10 5,0 0 5),(2 2 5,2 5 5,5 5 5,5 2 5,2 2 5))),POINT Z (0 0 5),MULTILINESTRING Z ((0 0 5, 2 0 5),(1 1 5, 2 2 5)))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'GEOMETRYCOLLECTION M (MULTIPOLYGON M (((0 0 5,10 0 5,10 10 5,0 10 5,0 0 5),(2 2 5,2 5 5,5 5 5,5 2 5,2 2 5))),POINT M (0 0 5),MULTILINESTRING M ((0 0 5, 2 0 5),(1 1 5, 2 2 5)))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'GEOMETRYCOLLECTION ZM (MULTIPOLYGON ZM (((0 0 5 4,10 0 5 4,10 10 5 4,0 10 5 4,0 0 5 4),(2 2 5 4,2 5 5 4,5 5 5 4,5 2 5 4,2 2 5 4))),POINT ZM (0 0 5 4),MULTILINESTRING ZM ((0 0 5 4, 2 0 5 4),(1 1 5 4, 2 2 5 4)))' +::text as g ) as foo; + +-- CIRCULARSTRING -- + +SELECT g, -- invalid + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'CIRCULARSTRING(EMPTY)' +::text as g ) as foo; + +SELECT g, -- invalid + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'CIRCULARSTRING((0 0, 1 1, 2 2))' +::text as g ) as foo; + +SELECT g, -- invalid + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'CIRCULARSTRING(0 0, 1 1)' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'CIRCULARSTRING EMPTY' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'CIRCULARSTRING(0 0, 1 1, 3 3)' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'CIRCULARSTRING Z (0 0 0, 1 1 0, 2 3 4)' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'CIRCULARSTRING M (0 0 0, 1 1 0, 3 4 5)' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'CIRCULARSTRING ZM (0 0 0 0, 1 1 0 0, 1 2 3 4)' +::text as g ) as foo; + + +-- COMPOUNDCURVE -- + +SELECT g, -- invalid (missing point) + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'COMPOUNDCURVE(CIRCULARSTRING(0 0,1 0),(1 0,0 1))' +::text as g ) as foo; + +SELECT g, -- invalid (non continuous curve) + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'COMPOUNDCURVE(CIRCULARSTRING(0 0,1 1,1 0),(1 2,0 1))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'COMPOUNDCURVE EMPTY' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'COMPOUNDCURVE(CIRCULARSTRING(0 0,1 1,1 0),(1 0,0 1))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'COMPOUNDCURVE M (CIRCULARSTRING M (0 0 2,1 1 2,1 0 2),(1 0 2,0 1 2))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'COMPOUNDCURVE Z (CIRCULARSTRING Z (0 0 2,1 1 2,1 0 2),(1 0 2,0 1 2))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'COMPOUNDCURVE ZM (CIRCULARSTRING ZM (0 0 2 5,1 1 2 6,1 0 2 5), (1 0 2 3,0 1 2 2), (0 1 2 2,30 1 2 2), CIRCULARSTRING ZM (30 1 2 2,12 1 2 6,1 10 2 5))' +::text as g ) as foo; + +-- CURVEPOLYGON -- + +SELECT g, -- invalid (non continuous curve) + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'CURVEPOLYGON (COMPOUNDCURVE(CIRCULARSTRING(0 0,1 1,1 0),(1 2,0 1)))' +::text as g ) as foo; + +SELECT g, -- invalid (requires more points -- is this correct?) + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'CURVEPOLYGON (COMPOUNDCURVE EMPTY)' +::text as g ) as foo; + +SELECT g, -- invalid (non-closed rings) + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'CURVEPOLYGON (COMPOUNDCURVE(CIRCULARSTRING(0 0,1 1,1 0),(1 0,0 1)))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'CURVEPOLYGON EMPTY' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'CURVEPOLYGON (COMPOUNDCURVE M (CIRCULARSTRING M (0 0 2,1 1 2,1 0 2),(1 0 2,0 1 2),(0 1 2, 0 0 2)))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'CURVEPOLYGON (COMPOUNDCURVE Z (CIRCULARSTRING Z (0 0 2,1 1 2,1 0 2),(1 0 2,0 1 2, 0 0 2)))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'CURVEPOLYGON (COMPOUNDCURVE ZM (CIRCULARSTRING ZM (0 0 2 5,1 1 2 6,1 0 2 5), (1 0 2 3,0 1 2 2), (0 1 2 2,30 1 2 2), CIRCULARSTRING ZM (30 1 2 2,12 1 2 6,1 10 2 5, 1 10 3 5, 0 0 2 5)))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'CURVEPOLYGON(COMPOUNDCURVE((5 5 1 0,5 0 1 1,0 0 1 2,0 5 1 3), CIRCULARSTRING(0 5 1 3,1.5 7.5 1 4,5 5 1 0)),(1.5 5 2 0,2.5 6 3 1,3.5 5 2 2,1.5 5 2 0), COMPOUNDCURVE(CIRCULARSTRING(1.5 2 2 0,1 2.5 3 1,3.5 2 2 2),(3.5 2 2 2,3.5 4 1 3,1.5 4 1 4,1.5 2 2 0)))' +::text as g ) as foo; + +-- MULTICURVE -- + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'MULTICURVE EMPTY' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'MULTICURVE ((5 5, 3 5, 3 3, 0 3), CIRCULARSTRING (0 0, 0.2 1, 0.5 1.4), COMPOUNDCURVE (CIRCULARSTRING (0 0,1 1,1 0),(1 0,0 1)))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'MULTICURVE M ((5 5 1, 3 5 2, 3 3 3, 0 3 1), CIRCULARSTRING M (0 0 0, 0.2 1 3, 0.5 1.4 1), COMPOUNDCURVE M (CIRCULARSTRING M (0 0 0,1 1 1,1 0 0),(1 0 0,0 1 5)))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'MULTICURVE Z ((5 5 1, 3 5 2, 3 3 3, 0 3 1), CIRCULARSTRING Z (0 0 0, 0.2 1 3, 0.5 1.4 1), COMPOUNDCURVE Z (CIRCULARSTRING Z (0 0 0,1 1 1,1 0 0),(1 0 0,0 1 5)))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'MULTICURVE ZM ((5 5 1 3, 3 5 2 2, 3 3 3 1, 0 3 1 1), CIRCULARSTRING ZM (0 0 0 0, 0.2 1 3 -2, 0.5 1.4 1 2), COMPOUNDCURVE ZM (CIRCULARSTRING ZM (0 0 0 0,1 1 1 2,1 0 0 1),(1 0 0 1,0 1 5 4)))' +::text as g ) as foo; + + +-- MULTISURFACE -- + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'MULTISURFACE EMPTY' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'MULTISURFACE (CURVEPOLYGON (CIRCULARSTRING (-2 0, -1 -1, 0 0, 1 -1, 2 0, 0 2, -2 0), (-1 0, 0 0.5, 1 0, 0 1, -1 0)), ((7 8, 10 10, 6 14, 4 11, 7 8)))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'MULTISURFACE M (CURVEPOLYGON M (CIRCULARSTRING M (-2 0 0, -1 -1 1, 0 0 2, 1 -1 3, 2 0 4, 0 2 2, -2 0 0), (-1 0 1, 0 0.5 2, 1 0 3, 0 1 3, -1 0 1)), ((7 8 7, 10 10 5, 6 14 3, 4 11 4, 7 8 7)))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'MULTISURFACE Z (CURVEPOLYGON Z (CIRCULARSTRING Z (-2 0 0, -1 -1 1, 0 0 2, 1 -1 3, 2 0 4, 0 2 2, -2 0 0), (-1 0 1, 0 0.5 2, 1 0 3, 0 1 3, -1 0 1)), ((7 8 7, 10 10 5, 6 14 3, 4 11 4, 7 8 7)))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'MULTISURFACE ZM (CURVEPOLYGON ZM (CIRCULARSTRING ZM (-2 0 0 0, -1 -1 1 2, 0 0 2 4, 1 -1 3 6, 2 0 4 8, 0 2 2 4, -2 0 0 0), (-1 0 1 2, 0 0.5 2 4, 1 0 3 6, 0 1 3 4, -1 0 1 2)), ((7 8 7 8, 10 10 5 5, 6 14 3 1, 4 11 4 6, 7 8 7 8)))' +::text as g ) as foo; + +-- POLYHEDRALSURFACE -- + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'POLYHEDRALSURFACE EMPTY' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'POLYHEDRALSURFACE (((0 0,0 0,0 1,0 0)),((0 0,0 1,1 0,0 0)),((0 0,1 0,0 0,0 0)),((1 0,0 1,0 0,1 0)))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'POLYHEDRALSURFACE M (((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'POLYHEDRALSURFACE Z (((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'POLYHEDRALSURFACE ZM (((0 0 0 0,0 0 1 0,0 1 0 2,0 0 0 0)),((0 0 0 0,0 1 0 0,1 0 0 4,0 0 0 0)),((0 0 0 0,1 0 0 0,0 0 1 6,0 0 0 0)),((1 0 0 0,0 1 0 0,0 0 1 0,1 0 0 0)))' +::text as g ) as foo; + + +-- TRIANGLE -- + +SELECT g, -- invalid (non-closed ring) + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'TRIANGLE ((1 2 3,4 5 6,7 8 9,1 2 0))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'TRIANGLE EMPTY' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'TRIANGLE ((1 2 3,4 5 6,7 8 9,1 2 3))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'TRIANGLE M ((1 2 3,4 5 6,7 8 9,1 2 3))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'TRIANGLE Z ((1 2 3,4 5 6,7 8 9,1 2 3))' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'TRIANGLE ZM ((1 2 3 -1,4 5 6 -2,7 8 9 -3,1 2 3 -1))' +::text as g ) as foo; + + +-- TIN -- + +SELECT g, -- invalid (non-closed ring) + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'TIN ZM ( ((0 0 0 0, 0 0 1 0, 0 1 0 4, 0 0 0 0)), ((0 0 0 1, 0 1 0 2, 1 1 0 3, 0 1 0 1)) )' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'TIN EMPTY' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'TIN ( ((0 0, 0 0, 0 1, 0 0)), ((0 0, 0 1, 1 1, 0 0)) )' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'TIN Z ( ((0 0 0, 0 0 1, 0 1 0, 0 0 0)), ((0 0 0, 0 1 0, 1 1 0, 0 0 0)) )' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'TIN M ( ((0 0 0, 0 0 1, 0 1 0, 0 0 0)), ((0 0 0, 0 1 0, 1 1 0, 0 0 0)) )' +::text as g ) as foo; + +SELECT g, + ST_AsText(g::geometry), + ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT +'TIN ZM ( ((0 0 0 0, 0 0 1 0, 0 1 0 4, 0 0 0 0)), ((0 0 0 1, 0 1 0 2, 1 1 0 3, 0 0 0 1)) )' +::text as g ) as foo; + + diff -Nru postgis-1.5.3/regress/wkt_expected postgis-2.0.1/regress/wkt_expected --- postgis-1.5.3/regress/wkt_expected 2010-12-14 13:14:14.000000000 +0000 +++ postgis-2.0.1/regress/wkt_expected 2012-03-22 17:24:57.000000000 +0000 @@ -1,47 +1,105 @@ -GEOMETRYCOLLECTION EMPTY +POINT EMPTY|POINT EMPTY|t ERROR: parse error - invalid geometry -HINT: "POINT(EMPTY" <-- parse error at position 11 within geometry -POINT(0 0) -ERROR: parse error - invalid geometry -HINT: "POINT((" <-- parse error at position 7 within geometry -GEOMETRYCOLLECTION EMPTY -ERROR: parse error - invalid geometry -HINT: "MULTIPOINT(EMPTY" <-- parse error at position 16 within geometry -MULTIPOINT(0 0,2 0) -MULTIPOINT(0 0,2 0) -ERROR: parse error - invalid geometry -HINT: "MULTIPOINT((0 0), (2 0), EMPTY" <-- parse error at position 30 within geometry -GEOMETRYCOLLECTION EMPTY -ERROR: parse error - invalid geometry -HINT: "LINESTRING(EMPTY" <-- parse error at position 16 within geometry -LINESTRING(0 0,1 1) -ERROR: parse error - invalid geometry -HINT: "LINESTRING((" <-- parse error at position 12 within geometry -ERROR: parse error - invalid geometry -HINT: "LINESTRING((" <-- parse error at position 12 within geometry -GEOMETRYCOLLECTION EMPTY -ERROR: parse error - invalid geometry -HINT: "MULTILINESTRING(EMPTY" <-- parse error at position 21 within geometry -ERROR: parse error - invalid geometry -HINT: "MULTILINESTRING(0" <-- parse error at position 17 within geometry -MULTILINESTRING((0 0,2 0)) -MULTILINESTRING((0 0,2 0),(1 1,2 2)) -ERROR: parse error - invalid geometry -HINT: "...ESTRING((0 0, 2 0), (1 1, 2 2), EMPTY" <-- parse error at position 45 within geometry -ERROR: parse error - invalid geometry -HINT: "...STRING((0 0, 2 0), (1 1, 2 2), (EMPTY" <-- parse error at position 46 within geometry -GEOMETRYCOLLECTION EMPTY -ERROR: parse error - invalid geometry -HINT: "POLYGON(EMPTY" <-- parse error at position 13 within geometry -POLYGON((0 0,1 0,1 1,0 1,0 0)) -POLYGON((0 0,10 0,10 10,0 10,0 0),(2 2,2 5,5 5,5 2,2 2)) -GEOMETRYCOLLECTION EMPTY -ERROR: parse error - invalid geometry -HINT: "MULTIPOLYGON(EMPTY" <-- parse error at position 18 within geometry -ERROR: parse error - invalid geometry -HINT: "MULTIPOLYGON((EMPTY" <-- parse error at position 19 within geometry -MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0),(2 2,2 5,5 5,5 2,2 2))) -GEOMETRYCOLLECTION EMPTY -GEOMETRYCOLLECTION EMPTY -ERROR: parse error - invalid geometry -HINT: "GEOMETRYCOLLECTION((" <-- parse error at position 20 within geometry +POINT(0 0)|POINT(0 0)|t +POINT Z (0 0 0)|POINT Z (0 0 0)|t +POINT M (0 0 0)|POINT M (0 0 0)|t +POINT ZM (0 0 0 0)|POINT ZM (0 0 0 0)|t +ERROR: can not mix dimensionality in a geometry +ERROR: parse error - invalid geometry +MULTIPOINT EMPTY|MULTIPOINT EMPTY|t +MULTIPOINT(EMPTY)|MULTIPOINT(EMPTY)|t +MULTIPOINT(0 0, 2 0)|MULTIPOINT(0 0,2 0)|t +MULTIPOINT((0 0), (2 0))|MULTIPOINT(0 0,2 0)|t +MULTIPOINT((0 0), (2 0), EMPTY)|MULTIPOINT(0 0,2 0,EMPTY)|t +MULTIPOINT Z ((0 0 0), (2 0 0))|MULTIPOINT Z (0 0 0,2 0 0)|t +MULTIPOINT M ((0 0 0), (2 0 0))|MULTIPOINT M (0 0 0,2 0 0)|t +MULTIPOINT ZM ((0 0 0 0), (2 0 0 0))|MULTIPOINT ZM (0 0 0 0,2 0 0 0)|t +LINESTRING EMPTY|LINESTRING EMPTY|t +ERROR: parse error - invalid geometry +LINESTRING(0 0, 1 1)|LINESTRING(0 0,1 1)|t +ERROR: parse error - invalid geometry +ERROR: parse error - invalid geometry +LINESTRING Z (0 0 0, 1 1 0)|LINESTRING Z (0 0 0,1 1 0)|t +LINESTRING M (0 0 0, 1 1 0)|LINESTRING M (0 0 0,1 1 0)|t +LINESTRING ZM (0 0 0 0, 1 1 0 0)|LINESTRING ZM (0 0 0 0,1 1 0 0)|t +MULTILINESTRING EMPTY|MULTILINESTRING EMPTY|t +MULTILINESTRING(EMPTY)|MULTILINESTRING(EMPTY)|t +ERROR: parse error - invalid geometry +MULTILINESTRING((0 0, 2 0))|MULTILINESTRING((0 0,2 0))|t +MULTILINESTRING((0 0, 2 0), (1 1, 2 2))|MULTILINESTRING((0 0,2 0),(1 1,2 2))|t +MULTILINESTRING((0 0, 2 0), (1 1, 2 2), EMPTY)|MULTILINESTRING((0 0,2 0),(1 1,2 2),EMPTY)|t +ERROR: parse error - invalid geometry +MULTILINESTRING Z ((0 0 0, 2 0 0), (1 1 0, 2 2 0))|MULTILINESTRING Z ((0 0 0,2 0 0),(1 1 0,2 2 0))|t +MULTILINESTRING M ((0 0 0, 2 0 0), (1 1 0, 2 2 0))|MULTILINESTRING M ((0 0 0,2 0 0),(1 1 0,2 2 0))|t +MULTILINESTRING ZM ((0 0 0 0, 2 0 0 0), (1 1 0 0, 2 2 0 0))|MULTILINESTRING ZM ((0 0 0 0,2 0 0 0),(1 1 0 0,2 2 0 0))|t +POLYGON EMPTY|POLYGON EMPTY|t +ERROR: parse error - invalid geometry +POLYGON((0 0,1 0,1 1,0 1,0 0))|POLYGON((0 0,1 0,1 1,0 1,0 0))|t +POLYGON((0 0,10 0,10 10,0 10,0 0),(2 2,2 5,5 5,5 2,2 2))|POLYGON((0 0,10 0,10 10,0 10,0 0),(2 2,2 5,5 5,5 2,2 2))|t +POLYGON Z ((0 0 0,10 0 0,10 10 0,0 10 0,0 0 0),(2 2 0,2 5 0,5 5 0,5 2 0,2 2 0))|POLYGON Z ((0 0 0,10 0 0,10 10 0,0 10 0,0 0 0),(2 2 0,2 5 0,5 5 0,5 2 0,2 2 0))|t +POLYGON M ((0 0 0,10 0 0,10 10 0,0 10 0,0 0 0),(2 2 0,2 5 0,5 5 0,5 2 0,2 2 0))|POLYGON M ((0 0 0,10 0 0,10 10 0,0 10 0,0 0 0),(2 2 0,2 5 0,5 5 0,5 2 0,2 2 0))|t +POLYGON ZM ((0 0 0 2,10 0 0 2,10 10 0 2,0 10 0 2,0 0 0 2),(2 2 0 2,2 5 0 2,5 5 0 2,5 2 0 2,2 2 0 2))|POLYGON ZM ((0 0 0 2,10 0 0 2,10 10 0 2,0 10 0 2,0 0 0 2),(2 2 0 2,2 5 0 2,5 5 0 2,5 2 0 2,2 2 0 2))|t +MULTIPOLYGON EMPTY|MULTIPOLYGON EMPTY|t +MULTIPOLYGON(EMPTY)|MULTIPOLYGON(EMPTY)|t +ERROR: parse error - invalid geometry +MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0),(2 2,2 5,5 5,5 2,2 2)))|MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0),(2 2,2 5,5 5,5 2,2 2)))|t +MULTIPOLYGON Z (((0 0 2,10 0 2,10 10 2,0 10 2,0 0 2),(2 2 2,2 5 2,5 5 2,5 2 2,2 2 2)))|MULTIPOLYGON Z (((0 0 2,10 0 2,10 10 2,0 10 2,0 0 2),(2 2 2,2 5 2,5 5 2,5 2 2,2 2 2)))|t +MULTIPOLYGON M (((0 0 2,10 0 2,10 10 2,0 10 2,0 0 2),(2 2 2,2 5 2,5 5 2,5 2 2,2 2 2)))|MULTIPOLYGON M (((0 0 2,10 0 2,10 10 2,0 10 2,0 0 2),(2 2 2,2 5 2,5 5 2,5 2 2,2 2 2)))|t +MULTIPOLYGON ZM (((0 0 2 5,10 0 2 5,10 10 2 5,0 10 2 5,0 0 2 5),(2 2 2 5,2 5 2 5,5 5 2 5,5 2 2 5,2 2 2 5)))|MULTIPOLYGON ZM (((0 0 2 5,10 0 2 5,10 10 2 5,0 10 2 5,0 0 2 5),(2 2 2 5,2 5 2 5,5 5 2 5,5 2 2 5,2 2 2 5)))|t +GEOMETRYCOLLECTION EMPTY|GEOMETRYCOLLECTION EMPTY|t +ERROR: parse error - invalid geometry +ERROR: parse error - invalid geometry +GEOMETRYCOLLECTION(MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0),(2 2,2 5,5 5,5 2,2 2))),POINT(0 0),MULTILINESTRING((0 0, 2 0),(1 1, 2 2)))|GEOMETRYCOLLECTION(MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0),(2 2,2 5,5 5,5 2,2 2))),POINT(0 0),MULTILINESTRING((0 0,2 0),(1 1,2 2)))|t +GEOMETRYCOLLECTION Z (MULTIPOLYGON Z (((0 0 5,10 0 5,10 10 5,0 10 5,0 0 5),(2 2 5,2 5 5,5 5 5,5 2 5,2 2 5))),POINT Z (0 0 5),MULTILINESTRING Z ((0 0 5, 2 0 5),(1 1 5, 2 2 5)))|GEOMETRYCOLLECTION Z (MULTIPOLYGON Z (((0 0 5,10 0 5,10 10 5,0 10 5,0 0 5),(2 2 5,2 5 5,5 5 5,5 2 5,2 2 5))),POINT Z (0 0 5),MULTILINESTRING Z ((0 0 5,2 0 5),(1 1 5,2 2 5)))|t +GEOMETRYCOLLECTION M (MULTIPOLYGON M (((0 0 5,10 0 5,10 10 5,0 10 5,0 0 5),(2 2 5,2 5 5,5 5 5,5 2 5,2 2 5))),POINT M (0 0 5),MULTILINESTRING M ((0 0 5, 2 0 5),(1 1 5, 2 2 5)))|GEOMETRYCOLLECTION M (MULTIPOLYGON M (((0 0 5,10 0 5,10 10 5,0 10 5,0 0 5),(2 2 5,2 5 5,5 5 5,5 2 5,2 2 5))),POINT M (0 0 5),MULTILINESTRING M ((0 0 5,2 0 5),(1 1 5,2 2 5)))|t +GEOMETRYCOLLECTION ZM (MULTIPOLYGON ZM (((0 0 5 4,10 0 5 4,10 10 5 4,0 10 5 4,0 0 5 4),(2 2 5 4,2 5 5 4,5 5 5 4,5 2 5 4,2 2 5 4))),POINT ZM (0 0 5 4),MULTILINESTRING ZM ((0 0 5 4, 2 0 5 4),(1 1 5 4, 2 2 5 4)))|GEOMETRYCOLLECTION ZM (MULTIPOLYGON ZM (((0 0 5 4,10 0 5 4,10 10 5 4,0 10 5 4,0 0 5 4),(2 2 5 4,2 5 5 4,5 5 5 4,5 2 5 4,2 2 5 4))),POINT ZM (0 0 5 4),MULTILINESTRING ZM ((0 0 5 4,2 0 5 4),(1 1 5 4,2 2 5 4)))|t +ERROR: parse error - invalid geometry +ERROR: parse error - invalid geometry +ERROR: geometry requires more points +CIRCULARSTRING EMPTY|CIRCULARSTRING EMPTY|t +CIRCULARSTRING(0 0, 1 1, 3 3)|CIRCULARSTRING(0 0,1 1,3 3)|t +CIRCULARSTRING Z (0 0 0, 1 1 0, 2 3 4)|CIRCULARSTRING Z (0 0 0,1 1 0,2 3 4)|t +CIRCULARSTRING M (0 0 0, 1 1 0, 3 4 5)|CIRCULARSTRING M (0 0 0,1 1 0,3 4 5)|t +CIRCULARSTRING ZM (0 0 0 0, 1 1 0 0, 1 2 3 4)|CIRCULARSTRING ZM (0 0 0 0,1 1 0 0,1 2 3 4)|t +ERROR: geometry requires more points +ERROR: incontinuous compound curve +COMPOUNDCURVE EMPTY|COMPOUNDCURVE EMPTY|t +COMPOUNDCURVE(CIRCULARSTRING(0 0,1 1,1 0),(1 0,0 1))|COMPOUNDCURVE(CIRCULARSTRING(0 0,1 1,1 0),(1 0,0 1))|t +COMPOUNDCURVE M (CIRCULARSTRING M (0 0 2,1 1 2,1 0 2),(1 0 2,0 1 2))|COMPOUNDCURVE M (CIRCULARSTRING M (0 0 2,1 1 2,1 0 2),(1 0 2,0 1 2))|t +COMPOUNDCURVE Z (CIRCULARSTRING Z (0 0 2,1 1 2,1 0 2),(1 0 2,0 1 2))|COMPOUNDCURVE Z (CIRCULARSTRING Z (0 0 2,1 1 2,1 0 2),(1 0 2,0 1 2))|t +COMPOUNDCURVE ZM (CIRCULARSTRING ZM (0 0 2 5,1 1 2 6,1 0 2 5), (1 0 2 3,0 1 2 2), (0 1 2 2,30 1 2 2), CIRCULARSTRING ZM (30 1 2 2,12 1 2 6,1 10 2 5))|COMPOUNDCURVE ZM (CIRCULARSTRING ZM (0 0 2 5,1 1 2 6,1 0 2 5),(1 0 2 3,0 1 2 2),(0 1 2 2,30 1 2 2),CIRCULARSTRING ZM (30 1 2 2,12 1 2 6,1 10 2 5))|t +ERROR: incontinuous compound curve +ERROR: geometry requires more points +ERROR: geometry contains non-closed rings +CURVEPOLYGON EMPTY|CURVEPOLYGON EMPTY|t +CURVEPOLYGON (COMPOUNDCURVE M (CIRCULARSTRING M (0 0 2,1 1 2,1 0 2),(1 0 2,0 1 2),(0 1 2, 0 0 2)))|CURVEPOLYGON M (COMPOUNDCURVE M (CIRCULARSTRING M (0 0 2,1 1 2,1 0 2),(1 0 2,0 1 2),(0 1 2,0 0 2)))|t +CURVEPOLYGON (COMPOUNDCURVE Z (CIRCULARSTRING Z (0 0 2,1 1 2,1 0 2),(1 0 2,0 1 2, 0 0 2)))|CURVEPOLYGON Z (COMPOUNDCURVE Z (CIRCULARSTRING Z (0 0 2,1 1 2,1 0 2),(1 0 2,0 1 2,0 0 2)))|t +CURVEPOLYGON (COMPOUNDCURVE ZM (CIRCULARSTRING ZM (0 0 2 5,1 1 2 6,1 0 2 5), (1 0 2 3,0 1 2 2), (0 1 2 2,30 1 2 2), CIRCULARSTRING ZM (30 1 2 2,12 1 2 6,1 10 2 5, 1 10 3 5, 0 0 2 5)))|CURVEPOLYGON ZM (COMPOUNDCURVE ZM (CIRCULARSTRING ZM (0 0 2 5,1 1 2 6,1 0 2 5),(1 0 2 3,0 1 2 2),(0 1 2 2,30 1 2 2),CIRCULARSTRING ZM (30 1 2 2,12 1 2 6,1 10 2 5,1 10 3 5,0 0 2 5)))|t +CURVEPOLYGON(COMPOUNDCURVE((5 5 1 0,5 0 1 1,0 0 1 2,0 5 1 3), CIRCULARSTRING(0 5 1 3,1.5 7.5 1 4,5 5 1 0)),(1.5 5 2 0,2.5 6 3 1,3.5 5 2 2,1.5 5 2 0), COMPOUNDCURVE(CIRCULARSTRING(1.5 2 2 0,1 2.5 3 1,3.5 2 2 2),(3.5 2 2 2,3.5 4 1 3,1.5 4 1 4,1.5 2 2 0)))|CURVEPOLYGON ZM (COMPOUNDCURVE ZM ((5 5 1 0,5 0 1 1,0 0 1 2,0 5 1 3),CIRCULARSTRING ZM (0 5 1 3,1.5 7.5 1 4,5 5 1 0)),(1.5 5 2 0,2.5 6 3 1,3.5 5 2 2,1.5 5 2 0),COMPOUNDCURVE ZM (CIRCULARSTRING ZM (1.5 2 2 0,1 2.5 3 1,3.5 2 2 2),(3.5 2 2 2,3.5 4 1 3,1.5 4 1 4,1.5 2 2 0)))|t +MULTICURVE EMPTY|MULTICURVE EMPTY|t +MULTICURVE ((5 5, 3 5, 3 3, 0 3), CIRCULARSTRING (0 0, 0.2 1, 0.5 1.4), COMPOUNDCURVE (CIRCULARSTRING (0 0,1 1,1 0),(1 0,0 1)))|MULTICURVE((5 5,3 5,3 3,0 3),CIRCULARSTRING(0 0,0.2 1,0.5 1.4),COMPOUNDCURVE(CIRCULARSTRING(0 0,1 1,1 0),(1 0,0 1)))|t +MULTICURVE M ((5 5 1, 3 5 2, 3 3 3, 0 3 1), CIRCULARSTRING M (0 0 0, 0.2 1 3, 0.5 1.4 1), COMPOUNDCURVE M (CIRCULARSTRING M (0 0 0,1 1 1,1 0 0),(1 0 0,0 1 5)))|MULTICURVE M ((5 5 1,3 5 2,3 3 3,0 3 1),CIRCULARSTRING M (0 0 0,0.2 1 3,0.5 1.4 1),COMPOUNDCURVE M (CIRCULARSTRING M (0 0 0,1 1 1,1 0 0),(1 0 0,0 1 5)))|t +MULTICURVE Z ((5 5 1, 3 5 2, 3 3 3, 0 3 1), CIRCULARSTRING Z (0 0 0, 0.2 1 3, 0.5 1.4 1), COMPOUNDCURVE Z (CIRCULARSTRING Z (0 0 0,1 1 1,1 0 0),(1 0 0,0 1 5)))|MULTICURVE Z ((5 5 1,3 5 2,3 3 3,0 3 1),CIRCULARSTRING Z (0 0 0,0.2 1 3,0.5 1.4 1),COMPOUNDCURVE Z (CIRCULARSTRING Z (0 0 0,1 1 1,1 0 0),(1 0 0,0 1 5)))|t +MULTICURVE ZM ((5 5 1 3, 3 5 2 2, 3 3 3 1, 0 3 1 1), CIRCULARSTRING ZM (0 0 0 0, 0.2 1 3 -2, 0.5 1.4 1 2), COMPOUNDCURVE ZM (CIRCULARSTRING ZM (0 0 0 0,1 1 1 2,1 0 0 1),(1 0 0 1,0 1 5 4)))|MULTICURVE ZM ((5 5 1 3,3 5 2 2,3 3 3 1,0 3 1 1),CIRCULARSTRING ZM (0 0 0 0,0.2 1 3 -2,0.5 1.4 1 2),COMPOUNDCURVE ZM (CIRCULARSTRING ZM (0 0 0 0,1 1 1 2,1 0 0 1),(1 0 0 1,0 1 5 4)))|t +MULTISURFACE EMPTY|MULTISURFACE EMPTY|t +MULTISURFACE (CURVEPOLYGON (CIRCULARSTRING (-2 0, -1 -1, 0 0, 1 -1, 2 0, 0 2, -2 0), (-1 0, 0 0.5, 1 0, 0 1, -1 0)), ((7 8, 10 10, 6 14, 4 11, 7 8)))|MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0)),((7 8,10 10,6 14,4 11,7 8)))|t +MULTISURFACE M (CURVEPOLYGON M (CIRCULARSTRING M (-2 0 0, -1 -1 1, 0 0 2, 1 -1 3, 2 0 4, 0 2 2, -2 0 0), (-1 0 1, 0 0.5 2, 1 0 3, 0 1 3, -1 0 1)), ((7 8 7, 10 10 5, 6 14 3, 4 11 4, 7 8 7)))|MULTISURFACE M (CURVEPOLYGON M (CIRCULARSTRING M (-2 0 0,-1 -1 1,0 0 2,1 -1 3,2 0 4,0 2 2,-2 0 0),(-1 0 1,0 0.5 2,1 0 3,0 1 3,-1 0 1)),((7 8 7,10 10 5,6 14 3,4 11 4,7 8 7)))|t +MULTISURFACE Z (CURVEPOLYGON Z (CIRCULARSTRING Z (-2 0 0, -1 -1 1, 0 0 2, 1 -1 3, 2 0 4, 0 2 2, -2 0 0), (-1 0 1, 0 0.5 2, 1 0 3, 0 1 3, -1 0 1)), ((7 8 7, 10 10 5, 6 14 3, 4 11 4, 7 8 7)))|MULTISURFACE Z (CURVEPOLYGON Z (CIRCULARSTRING Z (-2 0 0,-1 -1 1,0 0 2,1 -1 3,2 0 4,0 2 2,-2 0 0),(-1 0 1,0 0.5 2,1 0 3,0 1 3,-1 0 1)),((7 8 7,10 10 5,6 14 3,4 11 4,7 8 7)))|t +MULTISURFACE ZM (CURVEPOLYGON ZM (CIRCULARSTRING ZM (-2 0 0 0, -1 -1 1 2, 0 0 2 4, 1 -1 3 6, 2 0 4 8, 0 2 2 4, -2 0 0 0), (-1 0 1 2, 0 0.5 2 4, 1 0 3 6, 0 1 3 4, -1 0 1 2)), ((7 8 7 8, 10 10 5 5, 6 14 3 1, 4 11 4 6, 7 8 7 8)))|MULTISURFACE ZM (CURVEPOLYGON ZM (CIRCULARSTRING ZM (-2 0 0 0,-1 -1 1 2,0 0 2 4,1 -1 3 6,2 0 4 8,0 2 2 4,-2 0 0 0),(-1 0 1 2,0 0.5 2 4,1 0 3 6,0 1 3 4,-1 0 1 2)),((7 8 7 8,10 10 5 5,6 14 3 1,4 11 4 6,7 8 7 8)))|t +POLYHEDRALSURFACE EMPTY|POLYHEDRALSURFACE EMPTY|t +POLYHEDRALSURFACE (((0 0,0 0,0 1,0 0)),((0 0,0 1,1 0,0 0)),((0 0,1 0,0 0,0 0)),((1 0,0 1,0 0,1 0)))|POLYHEDRALSURFACE(((0 0,0 0,0 1,0 0)),((0 0,0 1,1 0,0 0)),((0 0,1 0,0 0,0 0)),((1 0,0 1,0 0,1 0)))|t +POLYHEDRALSURFACE M (((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))|POLYHEDRALSURFACE M (((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))|t +POLYHEDRALSURFACE Z (((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))|POLYHEDRALSURFACE Z (((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))|t +POLYHEDRALSURFACE ZM (((0 0 0 0,0 0 1 0,0 1 0 2,0 0 0 0)),((0 0 0 0,0 1 0 0,1 0 0 4,0 0 0 0)),((0 0 0 0,1 0 0 0,0 0 1 6,0 0 0 0)),((1 0 0 0,0 1 0 0,0 0 1 0,1 0 0 0)))|POLYHEDRALSURFACE ZM (((0 0 0 0,0 0 1 0,0 1 0 2,0 0 0 0)),((0 0 0 0,0 1 0 0,1 0 0 4,0 0 0 0)),((0 0 0 0,1 0 0 0,0 0 1 6,0 0 0 0)),((1 0 0 0,0 1 0 0,0 0 1 0,1 0 0 0)))|t +ERROR: geometry contains non-closed rings +TRIANGLE EMPTY|TRIANGLE EMPTY|t +TRIANGLE ((1 2 3,4 5 6,7 8 9,1 2 3))|TRIANGLE Z ((1 2 3,4 5 6,7 8 9,1 2 3))|t +TRIANGLE M ((1 2 3,4 5 6,7 8 9,1 2 3))|TRIANGLE M ((1 2 3,4 5 6,7 8 9,1 2 3))|t +TRIANGLE Z ((1 2 3,4 5 6,7 8 9,1 2 3))|TRIANGLE Z ((1 2 3,4 5 6,7 8 9,1 2 3))|t +TRIANGLE ZM ((1 2 3 -1,4 5 6 -2,7 8 9 -3,1 2 3 -1))|TRIANGLE ZM ((1 2 3 -1,4 5 6 -2,7 8 9 -3,1 2 3 -1))|t +ERROR: geometry contains non-closed rings +TIN EMPTY|TIN EMPTY|t +TIN ( ((0 0, 0 0, 0 1, 0 0)), ((0 0, 0 1, 1 1, 0 0)) )|TIN(((0 0,0 0,0 1,0 0)),((0 0,0 1,1 1,0 0)))|t +TIN Z ( ((0 0 0, 0 0 1, 0 1 0, 0 0 0)), ((0 0 0, 0 1 0, 1 1 0, 0 0 0)) )|TIN Z (((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 1 0,0 0 0)))|t +TIN M ( ((0 0 0, 0 0 1, 0 1 0, 0 0 0)), ((0 0 0, 0 1 0, 1 1 0, 0 0 0)) )|TIN M (((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 1 0,0 0 0)))|t +TIN ZM ( ((0 0 0 0, 0 0 1 0, 0 1 0 4, 0 0 0 0)), ((0 0 0 1, 0 1 0 2, 1 1 0 3, 0 0 0 1)) )|TIN ZM (((0 0 0 0,0 0 1 0,0 1 0 4,0 0 0 0)),((0 0 0 1,0 1 0 2,1 1 0 3,0 0 0 1)))|t diff -Nru postgis-1.5.3/regress/wmsservers.sql postgis-2.0.1/regress/wmsservers.sql --- postgis-1.5.3/regress/wmsservers.sql 2010-09-24 18:35:22.000000000 +0000 +++ postgis-2.0.1/regress/wmsservers.sql 2012-02-27 22:08:12.000000000 +0000 @@ -1,36 +1,36 @@ SELECT 'Starting up MapServer/Geoserver tests...'; -- Set up the data table SELECT 'Setting up the data table...'; -CREATE TABLE wmstest ( id INTEGER, pt GEOMETRY ); +CREATE TABLE wmstest ( id INTEGER, pt GEOMETRY(Polygon,4326) ); INSERT INTO wmstest SELECT lon * 100 + lat AS id, st_setsrid(st_buffer(st_makepoint(lon, lat),1.0),4326) AS pt FROM (select lon, generate_series(-80,80, 5) AS lat FROM (SELECT generate_series(-175, 175, 5) AS lon) AS sq1) AS sq2; -INSERT INTO geometry_columns (f_table_catalog, f_table_schema, f_table_name, f_geometry_column, coord_dimension, srid, type) VALUES ('', 'public','wmstest','pt',2,4326,'POLYGON'); +--INSERT INTO geometry_columns (f_table_catalog, f_table_schema, f_table_name, f_geometry_column, coord_dimension, srid, type) VALUES ('', 'public','wmstest','pt',2,4326,'POLYGON'); ALTER TABLE wmstest add PRIMARY KEY ( id ); CREATE INDEX wmstest_geomidx ON wmstest using gist ( pt ); -- Geoserver 2.0 NG tests SELECT 'Running Geoserver 2.0 NG tests...'; -- Run a Geoserver 2.0 NG metadata query -SELECT 'Geoserver1', TYPE FROM GEOMETRY_COLUMNS WHERE F_TABLE_SCHEMA = 'public' AND F_TABLE_NAME = 'wmstest' AND F_GEOMETRY_COLUMN = 'pt'; +SELECT 'Geoserver1', upper(TYPE) As TYPE FROM GEOMETRY_COLUMNS WHERE F_TABLE_SCHEMA = 'public' AND F_TABLE_NAME = 'wmstest' AND F_GEOMETRY_COLUMN = 'pt'; SELECT 'Geoserver2', SRID FROM GEOMETRY_COLUMNS WHERE F_TABLE_SCHEMA = 'public' AND F_TABLE_NAME = 'wmstest' AND F_GEOMETRY_COLUMN = 'pt'; -- Run a Geoserver 2.0 NG WMS query -SELECT 'Geoserver3', "id",substr(encode(asBinary(force_2d("pt"),'XDR'),'base64'),0,16) as "pt" FROM "public"."wmstest" WHERE "pt" && GeomFromText('POLYGON ((-6.58216065979069 -0.7685569763184591, -6.58216065979069 0.911225433349509, -3.050569931030911 0.911225433349509, -3.050569931030911 -0.7685569763184591, -6.58216065979069 -0.7685569763184591))', 4326); +SELECT 'Geoserver3', "id",substr(encode(ST_AsBinary(ST_Force_2d("pt"),'XDR'),'base64'),0,16) as "pt" FROM "public"."wmstest" WHERE "pt" && ST_GeomFromText('POLYGON ((-6.58216065979069 -0.7685569763184591, -6.58216065979069 0.911225433349509, -3.050569931030911 0.911225433349509, -3.050569931030911 -0.7685569763184591, -6.58216065979069 -0.7685569763184591))', 4326); -- Run a Geoserver 2.0 NG KML query -SELECT 'Geoserver4', count(*) FROM "public"."wmstest" WHERE "pt" && GeomFromText('POLYGON ((-1.504017942347938 24.0332272532341, -1.504017942347938 25.99364254836741, 1.736833353559741 25.99364254836741, 1.736833353559741 24.0332272532341, -1.504017942347938 24.0332272532341))', 4326); -SELECT 'Geoserver5', "id",substr(encode(asBinary(force_2d("pt"),'XDR'),'base64'),0,16) as "pt" FROM "public"."wmstest" WHERE "pt" && GeomFromText('POLYGON ((-1.504017942347938 24.0332272532341, -1.504017942347938 25.99364254836741, 1.736833353559741 25.99364254836741, 1.736833353559741 24.0332272532341, -1.504017942347938 24.0332272532341))', 4326); -SELECT 'Geoserver6', "id",substr(encode(asBinary(force_2d("pt"),'XDR'),'base64'),0,16) as "pt" FROM "public"."wmstest" WHERE "pt" && GeomFromText('POLYGON ((-1.507182836191598 24.031312785172446, -1.507182836191598 25.995557016429064, 1.7399982474034008 25.995557016429064, 1.7399982474034008 24.031312785172446, -1.507182836191598 24.031312785172446))', 4326); +SELECT 'Geoserver4', count(*) FROM "public"."wmstest" WHERE "pt" && ST_GeomFromText('POLYGON ((-1.504017942347938 24.0332272532341, -1.504017942347938 25.99364254836741, 1.736833353559741 25.99364254836741, 1.736833353559741 24.0332272532341, -1.504017942347938 24.0332272532341))', 4326); +SELECT 'Geoserver5', "id",substr(encode(ST_AsBinary(ST_Force_2d("pt"),'XDR'),'base64'),0,16) as "pt" FROM "public"."wmstest" WHERE "pt" && ST_GeomFromText('POLYGON ((-1.504017942347938 24.0332272532341, -1.504017942347938 25.99364254836741, 1.736833353559741 25.99364254836741, 1.736833353559741 24.0332272532341, -1.504017942347938 24.0332272532341))', 4326); +SELECT 'Geoserver6', "id",substr(encode(ST_AsBinary(ST_Force_2d("pt"),'XDR'),'base64'),0,16) as "pt" FROM "public"."wmstest" WHERE "pt" && ST_GeomFromText('POLYGON ((-1.507182836191598 24.031312785172446, -1.507182836191598 25.995557016429064, 1.7399982474034008 25.995557016429064, 1.7399982474034008 24.031312785172446, -1.507182836191598 24.031312785172446))', 4326); -- MapServer 5.4 tests select 'MapServer1', attname from pg_attribute, pg_constraint, pg_class where pg_constraint.conrelid = pg_class.oid and pg_class.oid = pg_attribute.attrelid and pg_constraint.contype = 'p' and pg_constraint.conkey[1] = pg_attribute.attnum and pg_class.relname = 'wmstest' and pg_table_is_visible(pg_class.oid) and pg_constraint.conkey[2] is null; -select 'MapServer2', "id",substr(encode(AsBinary(force_collection(force_2d("pt")),'NDR'),'base64'),0,16) as geom,"id" from wmstest where pt && GeomFromText('POLYGON((-98.5 32,-98.5 39,-91.5 39,-91.5 32,-98.5 32))',find_srid('','wmstest','pt')); +select 'MapServer2', "id",substr(encode(ST_AsBinary(ST_Force_collection(ST_Force_2d("pt")),'NDR'),'base64'),0,16) as geom,"id" from wmstest where pt && ST_GeomFromText('POLYGON((-98.5 32,-98.5 39,-91.5 39,-91.5 32,-98.5 32))',find_srid('','wmstest','pt')); -- MapServer 5.6 tests select * from wmstest where false limit 0; select 'MapServer3', attname from pg_attribute, pg_constraint, pg_class where pg_constraint.conrelid = pg_class.oid and pg_class.oid = pg_attribute.attrelid and pg_constraint.contype = 'p' and pg_constraint.conkey[1] = pg_attribute.attnum and pg_class.relname = 'wmstest' and pg_table_is_visible(pg_class.oid) and pg_constraint.conkey[2] is null; -select 'MapServer4', "id",substr(encode(AsBinary(force_collection(force_2d("pt")),'NDR'),'hex'),0,16) as geom,"id" from wmstest where pt && GeomFromText('POLYGON((-98.5 32,-98.5 39,-91.5 39,-91.5 32,-98.5 32))',find_srid('','wmstest','pt')); +select 'MapServer4', "id",substr(encode(ST_AsBinary(ST_Force_collection(ST_Force_2d("pt")),'NDR'),'hex'),0,16) as geom,"id" from wmstest where pt && ST_GeomFromText('POLYGON((-98.5 32,-98.5 39,-91.5 39,-91.5 32,-98.5 32))',find_srid('','wmstest','pt')); -- Drop the data table SELECT 'Removing the data table...'; DROP TABLE wmstest; -DELETE FROM geometry_columns WHERE f_table_name = 'wmstest' AND f_table_schema = 'public'; +--DELETE FROM geometry_columns WHERE f_table_name = 'wmstest' AND f_table_schema = 'public'; SELECT 'Done.'; \ No newline at end of file diff -Nru postgis-1.5.3/spatial_ref_sys.sql postgis-2.0.1/spatial_ref_sys.sql --- postgis-1.5.3/spatial_ref_sys.sql 2011-06-10 16:15:56.000000000 +0000 +++ postgis-2.0.1/spatial_ref_sys.sql 2012-06-06 15:27:04.000000000 +0000 @@ -2,151 +2,151 @@ --- --- EPSG 3819 : HD1909 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3819,'EPSG',3819,'GEOGCS["HD1909",DATUM["Hungarian_Datum_1909",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[595.48,121.69,515.35,4.115,-2.9383,0.853,-3.408],AUTHORITY["EPSG","1024"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","3819"]]','+proj=longlat +ellps=bessel +towgs84=595.48,121.69,515.35,4.115,-2.9383,0.853,-3.408 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3819,'EPSG',3819,'GEOGCS["HD1909",DATUM["Hungarian_Datum_1909",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[595.48,121.69,515.35,4.115,-2.9383,0.853,-3.408],AUTHORITY["EPSG","1024"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","3819"]]','+proj=longlat +ellps=bessel +towgs84=595.48,121.69,515.35,4.115,-2.9383,0.853,-3.408 +no_defs '); --- --- EPSG 3821 : TWD67 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3821,'EPSG',3821,'GEOGCS["TWD67",DATUM["Taiwan_Datum_1967",SPHEROID["GRS 1967 Modified",6378160,298.25,AUTHORITY["EPSG","7050"]],AUTHORITY["EPSG","1025"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","3821"]]','+proj=longlat +ellps=aust_SA +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3821,'EPSG',3821,'GEOGCS["TWD67",DATUM["Taiwan_Datum_1967",SPHEROID["GRS 1967 Modified",6378160,298.25,AUTHORITY["EPSG","7050"]],AUTHORITY["EPSG","1025"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","3821"]]','+proj=longlat +ellps=aust_SA +no_defs '); --- --- EPSG 3824 : TWD97 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3824,'EPSG',3824,'GEOGCS["TWD97",DATUM["Taiwan_Datum_1997",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1026"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","3824"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3824,'EPSG',3824,'GEOGCS["TWD97",DATUM["Taiwan_Datum_1997",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1026"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","3824"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 3889 : IGRS --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3889,'EPSG',3889,'GEOGCS["IGRS",DATUM["Iraqi_Geospatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1029"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","3889"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3889,'EPSG',3889,'GEOGCS["IGRS",DATUM["Iraqi_Geospatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1029"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","3889"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 3906 : MGI 1901 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3906,'EPSG',3906,'GEOGCS["MGI 1901",DATUM["MGI_1901",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","1031"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","3906"]]','+proj=longlat +ellps=bessel +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3906,'EPSG',3906,'GEOGCS["MGI 1901",DATUM["MGI_1901",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[682,-203,480,0,0,0,0],AUTHORITY["EPSG","1031"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","3906"]]','+proj=longlat +ellps=bessel +towgs84=682,-203,480,0,0,0,0 +no_defs '); --- --- EPSG 4001 : Unknown datum based upon the Airy 1830 ellipsoid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4001,'EPSG',4001,'GEOGCS["Unknown datum based upon the Airy 1830 ellipsoid",DATUM["Not_specified_based_on_Airy_1830_ellipsoid",SPHEROID["Airy 1830",6377563.396,299.3249646,AUTHORITY["EPSG","7001"]],AUTHORITY["EPSG","6001"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4001"]]','+proj=longlat +ellps=airy +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4001,'EPSG',4001,'GEOGCS["Unknown datum based upon the Airy 1830 ellipsoid",DATUM["Not_specified_based_on_Airy_1830_ellipsoid",SPHEROID["Airy 1830",6377563.396,299.3249646,AUTHORITY["EPSG","7001"]],AUTHORITY["EPSG","6001"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4001"]]','+proj=longlat +ellps=airy +no_defs '); --- --- EPSG 4002 : Unknown datum based upon the Airy Modified 1849 ellipsoid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4002,'EPSG',4002,'GEOGCS["Unknown datum based upon the Airy Modified 1849 ellipsoid",DATUM["Not_specified_based_on_Airy_Modified_1849_ellipsoid",SPHEROID["Airy Modified 1849",6377340.189,299.3249646,AUTHORITY["EPSG","7002"]],AUTHORITY["EPSG","6002"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4002"]]','+proj=longlat +a=6377340.189 +b=6356034.447938534 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4002,'EPSG',4002,'GEOGCS["Unknown datum based upon the Airy Modified 1849 ellipsoid",DATUM["Not_specified_based_on_Airy_Modified_1849_ellipsoid",SPHEROID["Airy Modified 1849",6377340.189,299.3249646,AUTHORITY["EPSG","7002"]],AUTHORITY["EPSG","6002"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4002"]]','+proj=longlat +ellps=mod_airy +no_defs '); --- --- EPSG 4003 : Unknown datum based upon the Australian National Spheroid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4003,'EPSG',4003,'GEOGCS["Unknown datum based upon the Australian National Spheroid",DATUM["Not_specified_based_on_Australian_National_Spheroid",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],AUTHORITY["EPSG","6003"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4003"]]','+proj=longlat +ellps=aust_SA +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4003,'EPSG',4003,'GEOGCS["Unknown datum based upon the Australian National Spheroid",DATUM["Not_specified_based_on_Australian_National_Spheroid",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],AUTHORITY["EPSG","6003"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4003"]]','+proj=longlat +ellps=aust_SA +no_defs '); --- --- EPSG 4004 : Unknown datum based upon the Bessel 1841 ellipsoid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4004,'EPSG',4004,'GEOGCS["Unknown datum based upon the Bessel 1841 ellipsoid",DATUM["Not_specified_based_on_Bessel_1841_ellipsoid",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6004"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4004"]]','+proj=longlat +ellps=bessel +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4004,'EPSG',4004,'GEOGCS["Unknown datum based upon the Bessel 1841 ellipsoid",DATUM["Not_specified_based_on_Bessel_1841_ellipsoid",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6004"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4004"]]','+proj=longlat +ellps=bessel +no_defs '); --- --- EPSG 4005 : Unknown datum based upon the Bessel Modified ellipsoid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4005,'EPSG',4005,'GEOGCS["Unknown datum based upon the Bessel Modified ellipsoid",DATUM["Not_specified_based_on_Bessel_Modified_ellipsoid",SPHEROID["Bessel Modified",6377492.018,299.1528128,AUTHORITY["EPSG","7005"]],AUTHORITY["EPSG","6005"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4005"]]','+proj=longlat +a=6377492.018 +b=6356173.508712696 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4005,'EPSG',4005,'GEOGCS["Unknown datum based upon the Bessel Modified ellipsoid",DATUM["Not_specified_based_on_Bessel_Modified_ellipsoid",SPHEROID["Bessel Modified",6377492.018,299.1528128,AUTHORITY["EPSG","7005"]],AUTHORITY["EPSG","6005"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4005"]]','+proj=longlat +a=6377492.018 +b=6356173.508712696 +no_defs '); --- --- EPSG 4006 : Unknown datum based upon the Bessel Namibia ellipsoid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4006,'EPSG',4006,'GEOGCS["Unknown datum based upon the Bessel Namibia ellipsoid",DATUM["Not_specified_based_on_Bessel_Namibia_ellipsoid",SPHEROID["Bessel Namibia (GLM)",6377483.865280419,299.1528128,AUTHORITY["EPSG","7046"]],AUTHORITY["EPSG","6006"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4006"]]','+proj=longlat +ellps=bess_nam +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4006,'EPSG',4006,'GEOGCS["Unknown datum based upon the Bessel Namibia ellipsoid",DATUM["Not_specified_based_on_Bessel_Namibia_ellipsoid",SPHEROID["Bessel Namibia (GLM)",6377483.865280419,299.1528128,AUTHORITY["EPSG","7046"]],AUTHORITY["EPSG","6006"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4006"]]','+proj=longlat +ellps=bess_nam +no_defs '); --- --- EPSG 4007 : Unknown datum based upon the Clarke 1858 ellipsoid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4007,'EPSG',4007,'GEOGCS["Unknown datum based upon the Clarke 1858 ellipsoid",DATUM["Not_specified_based_on_Clarke_1858_ellipsoid",SPHEROID["Clarke 1858",6378293.645208759,294.2606763692569,AUTHORITY["EPSG","7007"]],AUTHORITY["EPSG","6007"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4007"]]','+proj=longlat +a=6378293.645208759 +b=6356617.987679838 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4007,'EPSG',4007,'GEOGCS["Unknown datum based upon the Clarke 1858 ellipsoid",DATUM["Not_specified_based_on_Clarke_1858_ellipsoid",SPHEROID["Clarke 1858",6378293.645208759,294.2606763692569,AUTHORITY["EPSG","7007"]],AUTHORITY["EPSG","6007"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4007"]]','+proj=longlat +a=6378293.645208759 +b=6356617.987679838 +no_defs '); --- --- EPSG 4008 : Unknown datum based upon the Clarke 1866 ellipsoid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4008,'EPSG',4008,'GEOGCS["Unknown datum based upon the Clarke 1866 ellipsoid",DATUM["Not_specified_based_on_Clarke_1866_ellipsoid",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6008"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4008"]]','+proj=longlat +ellps=clrk66 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4008,'EPSG',4008,'GEOGCS["Unknown datum based upon the Clarke 1866 ellipsoid",DATUM["Not_specified_based_on_Clarke_1866_ellipsoid",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6008"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4008"]]','+proj=longlat +ellps=clrk66 +no_defs '); --- --- EPSG 4009 : Unknown datum based upon the Clarke 1866 Michigan ellipsoid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4009,'EPSG',4009,'GEOGCS["Unknown datum based upon the Clarke 1866 Michigan ellipsoid",DATUM["Not_specified_based_on_Clarke_1866_Michigan_ellipsoid",SPHEROID["Clarke 1866 Michigan",6378450.047548896,294.9786971646739,AUTHORITY["EPSG","7009"]],AUTHORITY["EPSG","6009"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4009"]]','+proj=longlat +a=6378450.047548896 +b=6356826.621488444 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4009,'EPSG',4009,'GEOGCS["Unknown datum based upon the Clarke 1866 Michigan ellipsoid",DATUM["Not_specified_based_on_Clarke_1866_Michigan_ellipsoid",SPHEROID["Clarke 1866 Michigan",6378450.047548896,294.9786971646739,AUTHORITY["EPSG","7009"]],AUTHORITY["EPSG","6009"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4009"]]','+proj=longlat +a=6378450.047548896 +b=6356826.621488444 +no_defs '); --- --- EPSG 4010 : Unknown datum based upon the Clarke 1880 (Benoit) ellipsoid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4010,'EPSG',4010,'GEOGCS["Unknown datum based upon the Clarke 1880 (Benoit) ellipsoid",DATUM["Not_specified_based_on_Clarke_1880_Benoit_ellipsoid",SPHEROID["Clarke 1880 (Benoit)",6378300.789,293.4663155389802,AUTHORITY["EPSG","7010"]],AUTHORITY["EPSG","6010"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4010"]]','+proj=longlat +a=6378300.789 +b=6356566.435 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4010,'EPSG',4010,'GEOGCS["Unknown datum based upon the Clarke 1880 (Benoit) ellipsoid",DATUM["Not_specified_based_on_Clarke_1880_Benoit_ellipsoid",SPHEROID["Clarke 1880 (Benoit)",6378300.789,293.4663155389802,AUTHORITY["EPSG","7010"]],AUTHORITY["EPSG","6010"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4010"]]','+proj=longlat +a=6378300.789 +b=6356566.435 +no_defs '); --- --- EPSG 4011 : Unknown datum based upon the Clarke 1880 (IGN) ellipsoid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4011,'EPSG',4011,'GEOGCS["Unknown datum based upon the Clarke 1880 (IGN) ellipsoid",DATUM["Not_specified_based_on_Clarke_1880_IGN_ellipsoid",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],AUTHORITY["EPSG","6011"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4011"]]','+proj=longlat +a=6378249.2 +b=6356515 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4011,'EPSG',4011,'GEOGCS["Unknown datum based upon the Clarke 1880 (IGN) ellipsoid",DATUM["Not_specified_based_on_Clarke_1880_IGN_ellipsoid",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],AUTHORITY["EPSG","6011"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4011"]]','+proj=longlat +a=6378249.2 +b=6356515 +no_defs '); --- --- EPSG 4012 : Unknown datum based upon the Clarke 1880 (RGS) ellipsoid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4012,'EPSG',4012,'GEOGCS["Unknown datum based upon the Clarke 1880 (RGS) ellipsoid",DATUM["Not_specified_based_on_Clarke_1880_RGS_ellipsoid",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6012"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4012"]]','+proj=longlat +ellps=clrk80 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4012,'EPSG',4012,'GEOGCS["Unknown datum based upon the Clarke 1880 (RGS) ellipsoid",DATUM["Not_specified_based_on_Clarke_1880_RGS_ellipsoid",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6012"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4012"]]','+proj=longlat +ellps=clrk80 +no_defs '); --- --- EPSG 4013 : Unknown datum based upon the Clarke 1880 (Arc) ellipsoid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4013,'EPSG',4013,'GEOGCS["Unknown datum based upon the Clarke 1880 (Arc) ellipsoid",DATUM["Not_specified_based_on_Clarke_1880_Arc_ellipsoid",SPHEROID["Clarke 1880 (Arc)",6378249.145,293.4663077,AUTHORITY["EPSG","7013"]],AUTHORITY["EPSG","6013"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4013"]]','+proj=longlat +a=6378249.145 +b=6356514.966398753 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4013,'EPSG',4013,'GEOGCS["Unknown datum based upon the Clarke 1880 (Arc) ellipsoid",DATUM["Not_specified_based_on_Clarke_1880_Arc_ellipsoid",SPHEROID["Clarke 1880 (Arc)",6378249.145,293.4663077,AUTHORITY["EPSG","7013"]],AUTHORITY["EPSG","6013"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4013"]]','+proj=longlat +a=6378249.145 +b=6356514.966398753 +no_defs '); --- --- EPSG 4014 : Unknown datum based upon the Clarke 1880 (SGA 1922) ellipsoid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4014,'EPSG',4014,'GEOGCS["Unknown datum based upon the Clarke 1880 (SGA 1922) ellipsoid",DATUM["Not_specified_based_on_Clarke_1880_SGA_1922_ellipsoid",SPHEROID["Clarke 1880 (SGA 1922)",6378249.2,293.46598,AUTHORITY["EPSG","7014"]],AUTHORITY["EPSG","6014"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4014"]]','+proj=longlat +a=6378249.2 +b=6356514.996941779 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4014,'EPSG',4014,'GEOGCS["Unknown datum based upon the Clarke 1880 (SGA 1922) ellipsoid",DATUM["Not_specified_based_on_Clarke_1880_SGA_1922_ellipsoid",SPHEROID["Clarke 1880 (SGA 1922)",6378249.2,293.46598,AUTHORITY["EPSG","7014"]],AUTHORITY["EPSG","6014"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4014"]]','+proj=longlat +a=6378249.2 +b=6356514.996941779 +no_defs '); --- --- EPSG 4015 : Unknown datum based upon the Everest 1830 (1937 Adjustment) ellipsoid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4015,'EPSG',4015,'GEOGCS["Unknown datum based upon the Everest 1830 (1937 Adjustment) ellipsoid",DATUM["Not_specified_based_on_Everest_1830_1937_Adjustment_ellipsoid",SPHEROID["Everest 1830 (1937 Adjustment)",6377276.345,300.8017,AUTHORITY["EPSG","7015"]],AUTHORITY["EPSG","6015"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4015"]]','+proj=longlat +a=6377276.345 +b=6356075.41314024 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4015,'EPSG',4015,'GEOGCS["Unknown datum based upon the Everest 1830 (1937 Adjustment) ellipsoid",DATUM["Not_specified_based_on_Everest_1830_1937_Adjustment_ellipsoid",SPHEROID["Everest 1830 (1937 Adjustment)",6377276.345,300.8017,AUTHORITY["EPSG","7015"]],AUTHORITY["EPSG","6015"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4015"]]','+proj=longlat +a=6377276.345 +b=6356075.41314024 +no_defs '); --- --- EPSG 4016 : Unknown datum based upon the Everest 1830 (1967 Definition) ellipsoid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4016,'EPSG',4016,'GEOGCS["Unknown datum based upon the Everest 1830 (1967 Definition) ellipsoid",DATUM["Not_specified_based_on_Everest_1830_1967_Definition_ellipsoid",SPHEROID["Everest 1830 (1967 Definition)",6377298.556,300.8017,AUTHORITY["EPSG","7016"]],AUTHORITY["EPSG","6016"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4016"]]','+proj=longlat +ellps=evrstSS +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4016,'EPSG',4016,'GEOGCS["Unknown datum based upon the Everest 1830 (1967 Definition) ellipsoid",DATUM["Not_specified_based_on_Everest_1830_1967_Definition_ellipsoid",SPHEROID["Everest 1830 (1967 Definition)",6377298.556,300.8017,AUTHORITY["EPSG","7016"]],AUTHORITY["EPSG","6016"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4016"]]','+proj=longlat +ellps=evrstSS +no_defs '); --- --- EPSG 4018 : Unknown datum based upon the Everest 1830 Modified ellipsoid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4018,'EPSG',4018,'GEOGCS["Unknown datum based upon the Everest 1830 Modified ellipsoid",DATUM["Not_specified_based_on_Everest_1830_Modified_ellipsoid",SPHEROID["Everest 1830 Modified",6377304.063,300.8017,AUTHORITY["EPSG","7018"]],AUTHORITY["EPSG","6018"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4018"]]','+proj=longlat +a=6377304.063 +b=6356103.038993155 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4018,'EPSG',4018,'GEOGCS["Unknown datum based upon the Everest 1830 Modified ellipsoid",DATUM["Not_specified_based_on_Everest_1830_Modified_ellipsoid",SPHEROID["Everest 1830 Modified",6377304.063,300.8017,AUTHORITY["EPSG","7018"]],AUTHORITY["EPSG","6018"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4018"]]','+proj=longlat +a=6377304.063 +b=6356103.038993155 +no_defs '); --- --- EPSG 4019 : Unknown datum based upon the GRS 1980 ellipsoid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4019,'EPSG',4019,'GEOGCS["Unknown datum based upon the GRS 1980 ellipsoid",DATUM["Not_specified_based_on_GRS_1980_ellipsoid",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6019"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4019"]]','+proj=longlat +ellps=GRS80 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4019,'EPSG',4019,'GEOGCS["Unknown datum based upon the GRS 1980 ellipsoid",DATUM["Not_specified_based_on_GRS_1980_ellipsoid",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6019"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4019"]]','+proj=longlat +ellps=GRS80 +no_defs '); --- --- EPSG 4020 : Unknown datum based upon the Helmert 1906 ellipsoid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4020,'EPSG',4020,'GEOGCS["Unknown datum based upon the Helmert 1906 ellipsoid",DATUM["Not_specified_based_on_Helmert_1906_ellipsoid",SPHEROID["Helmert 1906",6378200,298.3,AUTHORITY["EPSG","7020"]],AUTHORITY["EPSG","6020"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4020"]]','+proj=longlat +ellps=helmert +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4020,'EPSG',4020,'GEOGCS["Unknown datum based upon the Helmert 1906 ellipsoid",DATUM["Not_specified_based_on_Helmert_1906_ellipsoid",SPHEROID["Helmert 1906",6378200,298.3,AUTHORITY["EPSG","7020"]],AUTHORITY["EPSG","6020"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4020"]]','+proj=longlat +ellps=helmert +no_defs '); --- --- EPSG 4021 : Unknown datum based upon the Indonesian National Spheroid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4021,'EPSG',4021,'GEOGCS["Unknown datum based upon the Indonesian National Spheroid",DATUM["Not_specified_based_on_Indonesian_National_Spheroid",SPHEROID["Indonesian National Spheroid",6378160,298.247,AUTHORITY["EPSG","7021"]],AUTHORITY["EPSG","6021"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4021"]]','+proj=longlat +a=6378160 +b=6356774.50408554 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4021,'EPSG',4021,'GEOGCS["Unknown datum based upon the Indonesian National Spheroid",DATUM["Not_specified_based_on_Indonesian_National_Spheroid",SPHEROID["Indonesian National Spheroid",6378160,298.247,AUTHORITY["EPSG","7021"]],AUTHORITY["EPSG","6021"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4021"]]','+proj=longlat +a=6378160 +b=6356774.50408554 +no_defs '); --- --- EPSG 4022 : Unknown datum based upon the International 1924 ellipsoid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4022,'EPSG',4022,'GEOGCS["Unknown datum based upon the International 1924 ellipsoid",DATUM["Not_specified_based_on_International_1924_ellipsoid",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6022"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4022"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4022,'EPSG',4022,'GEOGCS["Unknown datum based upon the International 1924 ellipsoid",DATUM["Not_specified_based_on_International_1924_ellipsoid",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6022"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4022"]]','+proj=longlat +ellps=intl +no_defs '); --- --- EPSG 4023 : MOLDREF99 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4023,'EPSG',4023,'GEOGCS["MOLDREF99",DATUM["MOLDREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","1032"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4023"]]','+proj=longlat +ellps=GRS80 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4023,'EPSG',4023,'GEOGCS["MOLDREF99",DATUM["MOLDREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","1032"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4023"]]','+proj=longlat +ellps=GRS80 +no_defs '); --- --- EPSG 4024 : Unknown datum based upon the Krassowsky 1940 ellipsoid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4024,'EPSG',4024,'GEOGCS["Unknown datum based upon the Krassowsky 1940 ellipsoid",DATUM["Not_specified_based_on_Krassowsky_1940_ellipsoid",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6024"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4024"]]','+proj=longlat +ellps=krass +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4024,'EPSG',4024,'GEOGCS["Unknown datum based upon the Krassowsky 1940 ellipsoid",DATUM["Not_specified_based_on_Krassowsky_1940_ellipsoid",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6024"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4024"]]','+proj=longlat +ellps=krass +no_defs '); --- --- EPSG 4025 : Unknown datum based upon the NWL 9D ellipsoid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4025,'EPSG',4025,'GEOGCS["Unknown datum based upon the NWL 9D ellipsoid",DATUM["Not_specified_based_on_NWL_9D_ellipsoid",SPHEROID["NWL 9D",6378145,298.25,AUTHORITY["EPSG","7025"]],AUTHORITY["EPSG","6025"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4025"]]','+proj=longlat +ellps=WGS66 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4025,'EPSG',4025,'GEOGCS["Unknown datum based upon the NWL 9D ellipsoid",DATUM["Not_specified_based_on_NWL_9D_ellipsoid",SPHEROID["NWL 9D",6378145,298.25,AUTHORITY["EPSG","7025"]],AUTHORITY["EPSG","6025"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4025"]]','+proj=longlat +ellps=WGS66 +no_defs '); --- --- EPSG 4027 : Unknown datum based upon the Plessis 1817 ellipsoid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4027,'EPSG',4027,'GEOGCS["Unknown datum based upon the Plessis 1817 ellipsoid",DATUM["Not_specified_based_on_Plessis_1817_ellipsoid",SPHEROID["Plessis 1817",6376523,308.64,AUTHORITY["EPSG","7027"]],AUTHORITY["EPSG","6027"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4027"]]','+proj=longlat +a=6376523 +b=6355862.933255573 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4027,'EPSG',4027,'GEOGCS["Unknown datum based upon the Plessis 1817 ellipsoid",DATUM["Not_specified_based_on_Plessis_1817_ellipsoid",SPHEROID["Plessis 1817",6376523,308.64,AUTHORITY["EPSG","7027"]],AUTHORITY["EPSG","6027"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4027"]]','+proj=longlat +a=6376523 +b=6355862.933255573 +no_defs '); --- --- EPSG 4028 : Unknown datum based upon the Struve 1860 ellipsoid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4028,'EPSG',4028,'GEOGCS["Unknown datum based upon the Struve 1860 ellipsoid",DATUM["Not_specified_based_on_Struve_1860_ellipsoid",SPHEROID["Struve 1860",6378298.3,294.73,AUTHORITY["EPSG","7028"]],AUTHORITY["EPSG","6028"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4028"]]','+proj=longlat +a=6378298.3 +b=6356657.142669561 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4028,'EPSG',4028,'GEOGCS["Unknown datum based upon the Struve 1860 ellipsoid",DATUM["Not_specified_based_on_Struve_1860_ellipsoid",SPHEROID["Struve 1860",6378298.3,294.73,AUTHORITY["EPSG","7028"]],AUTHORITY["EPSG","6028"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4028"]]','+proj=longlat +a=6378298.3 +b=6356657.142669561 +no_defs '); --- --- EPSG 4029 : Unknown datum based upon the War Office ellipsoid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4029,'EPSG',4029,'GEOGCS["Unknown datum based upon the War Office ellipsoid",DATUM["Not_specified_based_on_War_Office_ellipsoid",SPHEROID["War Office",6378300,296,AUTHORITY["EPSG","7029"]],AUTHORITY["EPSG","6029"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4029"]]','+proj=longlat +a=6378300 +b=6356751.689189189 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4029,'EPSG',4029,'GEOGCS["Unknown datum based upon the War Office ellipsoid",DATUM["Not_specified_based_on_War_Office_ellipsoid",SPHEROID["War Office",6378300,296,AUTHORITY["EPSG","7029"]],AUTHORITY["EPSG","6029"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4029"]]','+proj=longlat +a=6378300 +b=6356751.689189189 +no_defs '); --- --- EPSG 4030 : Unknown datum based upon the WGS 84 ellipsoid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4030,'EPSG',4030,'GEOGCS["Unknown datum based upon the WGS 84 ellipsoid",DATUM["Not_specified_based_on_WGS_84_ellipsoid",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6030"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4030"]]','+proj=longlat +ellps=WGS84 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4030,'EPSG',4030,'GEOGCS["Unknown datum based upon the WGS 84 ellipsoid",DATUM["Not_specified_based_on_WGS_84_ellipsoid",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6030"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4030"]]','+proj=longlat +ellps=WGS84 +no_defs '); --- --- EPSG 4031 : Unknown datum based upon the GEM 10C ellipsoid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4031,'EPSG',4031,'GEOGCS["Unknown datum based upon the GEM 10C ellipsoid",DATUM["Not_specified_based_on_GEM_10C_ellipsoid",SPHEROID["GEM 10C",6378137,298.257223563,AUTHORITY["EPSG","7031"]],AUTHORITY["EPSG","6031"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4031"]]','+proj=longlat +ellps=WGS84 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4031,'EPSG',4031,'GEOGCS["Unknown datum based upon the GEM 10C ellipsoid",DATUM["Not_specified_based_on_GEM_10C_ellipsoid",SPHEROID["GEM 10C",6378137,298.257223563,AUTHORITY["EPSG","7031"]],AUTHORITY["EPSG","6031"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4031"]]','+proj=longlat +ellps=WGS84 +no_defs '); --- --- EPSG 4032 : Unknown datum based upon the OSU86F ellipsoid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4032,'EPSG',4032,'GEOGCS["Unknown datum based upon the OSU86F ellipsoid",DATUM["Not_specified_based_on_OSU86F_ellipsoid",SPHEROID["OSU86F",6378136.2,298.257223563,AUTHORITY["EPSG","7032"]],AUTHORITY["EPSG","6032"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4032"]]','+proj=longlat +a=6378136.2 +b=6356751.516927429 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4032,'EPSG',4032,'GEOGCS["Unknown datum based upon the OSU86F ellipsoid",DATUM["Not_specified_based_on_OSU86F_ellipsoid",SPHEROID["OSU86F",6378136.2,298.257223563,AUTHORITY["EPSG","7032"]],AUTHORITY["EPSG","6032"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4032"]]','+proj=longlat +a=6378136.2 +b=6356751.516927429 +no_defs '); --- --- EPSG 4033 : Unknown datum based upon the OSU91A ellipsoid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4033,'EPSG',4033,'GEOGCS["Unknown datum based upon the OSU91A ellipsoid",DATUM["Not_specified_based_on_OSU91A_ellipsoid",SPHEROID["OSU91A",6378136.3,298.257223563,AUTHORITY["EPSG","7033"]],AUTHORITY["EPSG","6033"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4033"]]','+proj=longlat +a=6378136.3 +b=6356751.616592146 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4033,'EPSG',4033,'GEOGCS["Unknown datum based upon the OSU91A ellipsoid",DATUM["Not_specified_based_on_OSU91A_ellipsoid",SPHEROID["OSU91A",6378136.3,298.257223563,AUTHORITY["EPSG","7033"]],AUTHORITY["EPSG","6033"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4033"]]','+proj=longlat +a=6378136.3 +b=6356751.616592146 +no_defs '); --- --- EPSG 4034 : Unknown datum based upon the Clarke 1880 ellipsoid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4034,'EPSG',4034,'GEOGCS["Unknown datum based upon the Clarke 1880 ellipsoid",DATUM["Not_specified_based_on_Clarke_1880_ellipsoid",SPHEROID["Clarke 1880",6378249.144808011,293.4663076556349,AUTHORITY["EPSG","7034"]],AUTHORITY["EPSG","6034"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4034"]]','+proj=longlat +a=6378249.144808011 +b=6356514.966204134 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4034,'EPSG',4034,'GEOGCS["Unknown datum based upon the Clarke 1880 ellipsoid",DATUM["Not_specified_based_on_Clarke_1880_ellipsoid",SPHEROID["Clarke 1880",6378249.144808011,293.4663076556349,AUTHORITY["EPSG","7034"]],AUTHORITY["EPSG","6034"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4034"]]','+proj=longlat +a=6378249.144808011 +b=6356514.966204134 +no_defs '); --- --- EPSG 4035 : Unknown datum based upon the Authalic Sphere --- @@ -154,79 +154,79 @@ --- --- EPSG 4036 : Unknown datum based upon the GRS 1967 ellipsoid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4036,'EPSG',4036,'GEOGCS["Unknown datum based upon the GRS 1967 ellipsoid",DATUM["Not_specified_based_on_GRS_1967_ellipsoid",SPHEROID["GRS 1967",6378160,298.247167427,AUTHORITY["EPSG","7036"]],AUTHORITY["EPSG","6036"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4036"]]','+proj=longlat +ellps=GRS67 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4036,'EPSG',4036,'GEOGCS["Unknown datum based upon the GRS 1967 ellipsoid",DATUM["Not_specified_based_on_GRS_1967_ellipsoid",SPHEROID["GRS 1967",6378160,298.247167427,AUTHORITY["EPSG","7036"]],AUTHORITY["EPSG","6036"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4036"]]','+proj=longlat +ellps=GRS67 +no_defs '); --- --- EPSG 4041 : Unknown datum based upon the Average Terrestrial System 1977 ellipsoid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4041,'EPSG',4041,'GEOGCS["Unknown datum based upon the Average Terrestrial System 1977 ellipsoid",DATUM["Not_specified_based_on_Average_Terrestrial_System_1977_ellipsoid",SPHEROID["Average Terrestrial System 1977",6378135,298.257,AUTHORITY["EPSG","7041"]],AUTHORITY["EPSG","6041"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4041"]]','+proj=longlat +a=6378135 +b=6356750.304921594 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4041,'EPSG',4041,'GEOGCS["Unknown datum based upon the Average Terrestrial System 1977 ellipsoid",DATUM["Not_specified_based_on_Average_Terrestrial_System_1977_ellipsoid",SPHEROID["Average Terrestrial System 1977",6378135,298.257,AUTHORITY["EPSG","7041"]],AUTHORITY["EPSG","6041"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4041"]]','+proj=longlat +a=6378135 +b=6356750.304921594 +no_defs '); --- --- EPSG 4042 : Unknown datum based upon the Everest (1830 Definition) ellipsoid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4042,'EPSG',4042,'GEOGCS["Unknown datum based upon the Everest (1830 Definition) ellipsoid",DATUM["Not_specified_based_on_Everest_1830_Definition_ellipsoid",SPHEROID["Everest (1830 Definition)",6377299.36559538,300.8017255433552,AUTHORITY["EPSG","7042"]],AUTHORITY["EPSG","6042"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4042"]]','+proj=longlat +a=6377299.36559538 +b=6356098.359005156 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4042,'EPSG',4042,'GEOGCS["Unknown datum based upon the Everest (1830 Definition) ellipsoid",DATUM["Not_specified_based_on_Everest_1830_Definition_ellipsoid",SPHEROID["Everest (1830 Definition)",6377299.36559538,300.8017255433552,AUTHORITY["EPSG","7042"]],AUTHORITY["EPSG","6042"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4042"]]','+proj=longlat +a=6377299.36559538 +b=6356098.359005156 +no_defs '); --- --- EPSG 4043 : Unknown datum based upon the WGS 72 ellipsoid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4043,'EPSG',4043,'GEOGCS["Unknown datum based upon the WGS 72 ellipsoid",DATUM["Not_specified_based_on_WGS_72_ellipsoid",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4043"]]','+proj=longlat +ellps=WGS72 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4043,'EPSG',4043,'GEOGCS["Unknown datum based upon the WGS 72 ellipsoid",DATUM["Not_specified_based_on_WGS_72_ellipsoid",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4043"]]','+proj=longlat +ellps=WGS72 +no_defs '); --- --- EPSG 4044 : Unknown datum based upon the Everest 1830 (1962 Definition) ellipsoid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4044,'EPSG',4044,'GEOGCS["Unknown datum based upon the Everest 1830 (1962 Definition) ellipsoid",DATUM["Not_specified_based_on_Everest_1830_1962_Definition_ellipsoid",SPHEROID["Everest 1830 (1962 Definition)",6377301.243,300.8017255,AUTHORITY["EPSG","7044"]],AUTHORITY["EPSG","6044"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4044"]]','+proj=longlat +a=6377301.243 +b=6356100.230165384 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4044,'EPSG',4044,'GEOGCS["Unknown datum based upon the Everest 1830 (1962 Definition) ellipsoid",DATUM["Not_specified_based_on_Everest_1830_1962_Definition_ellipsoid",SPHEROID["Everest 1830 (1962 Definition)",6377301.243,300.8017255,AUTHORITY["EPSG","7044"]],AUTHORITY["EPSG","6044"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4044"]]','+proj=longlat +a=6377301.243 +b=6356100.230165384 +no_defs '); --- --- EPSG 4045 : Unknown datum based upon the Everest 1830 (1975 Definition) ellipsoid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4045,'EPSG',4045,'GEOGCS["Unknown datum based upon the Everest 1830 (1975 Definition) ellipsoid",DATUM["Not_specified_based_on_Everest_1830_1975_Definition_ellipsoid",SPHEROID["Everest 1830 (1975 Definition)",6377299.151,300.8017255,AUTHORITY["EPSG","7045"]],AUTHORITY["EPSG","6045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4045"]]','+proj=longlat +a=6377299.151 +b=6356098.145120132 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4045,'EPSG',4045,'GEOGCS["Unknown datum based upon the Everest 1830 (1975 Definition) ellipsoid",DATUM["Not_specified_based_on_Everest_1830_1975_Definition_ellipsoid",SPHEROID["Everest 1830 (1975 Definition)",6377299.151,300.8017255,AUTHORITY["EPSG","7045"]],AUTHORITY["EPSG","6045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4045"]]','+proj=longlat +a=6377299.151 +b=6356098.145120132 +no_defs '); --- --- EPSG 4046 : RGRDC 2005 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4046,'EPSG',4046,'GEOGCS["RGRDC 2005",DATUM["Reseau_Geodesique_de_la_RDC_2005",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1033"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4046"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4046,'EPSG',4046,'GEOGCS["RGRDC 2005",DATUM["Reseau_Geodesique_de_la_RDC_2005",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1033"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4046"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4047 : Unspecified datum based upon the GRS 1980 Authalic Sphere --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4047,'EPSG',4047,'GEOGCS["Unspecified datum based upon the GRS 1980 Authalic Sphere",DATUM["Not_specified_based_on_GRS_1980_Authalic_Sphere",SPHEROID["GRS 1980 Authalic Sphere",6371007,0,AUTHORITY["EPSG","7048"]],AUTHORITY["EPSG","6047"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4047"]]','+proj=longlat +a=6371007 +b=6371007 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4047,'EPSG',4047,'GEOGCS["Unspecified datum based upon the GRS 1980 Authalic Sphere",DATUM["Not_specified_based_on_GRS_1980_Authalic_Sphere",SPHEROID["GRS 1980 Authalic Sphere",6371007,0,AUTHORITY["EPSG","7048"]],AUTHORITY["EPSG","6047"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4047"]]','+proj=longlat +a=6371007 +b=6371007 +no_defs '); --- --- EPSG 4052 : Unspecified datum based upon the Clarke 1866 Authalic Sphere --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4052,'EPSG',4052,'GEOGCS["Unspecified datum based upon the Clarke 1866 Authalic Sphere",DATUM["Not_specified_based_on_Clarke_1866_Authalic_Sphere",SPHEROID["Clarke 1866 Authalic Sphere",6370997,0,AUTHORITY["EPSG","7052"]],AUTHORITY["EPSG","6052"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4052"]]','+proj=longlat +a=6370997 +b=6370997 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4052,'EPSG',4052,'GEOGCS["Unspecified datum based upon the Clarke 1866 Authalic Sphere",DATUM["Not_specified_based_on_Clarke_1866_Authalic_Sphere",SPHEROID["Clarke 1866 Authalic Sphere",6370997,0,AUTHORITY["EPSG","7052"]],AUTHORITY["EPSG","6052"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4052"]]','+proj=longlat +a=6370997 +b=6370997 +no_defs '); --- --- EPSG 4053 : Unspecified datum based upon the International 1924 Authalic Sphere --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4053,'EPSG',4053,'GEOGCS["Unspecified datum based upon the International 1924 Authalic Sphere",DATUM["Not_specified_based_on_International_1924_Authalic_Sphere",SPHEROID["International 1924 Authalic Sphere",6371228,0,AUTHORITY["EPSG","7057"]],AUTHORITY["EPSG","6053"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4053"]]','+proj=longlat +a=6371228 +b=6371228 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4053,'EPSG',4053,'GEOGCS["Unspecified datum based upon the International 1924 Authalic Sphere",DATUM["Not_specified_based_on_International_1924_Authalic_Sphere",SPHEROID["International 1924 Authalic Sphere",6371228,0,AUTHORITY["EPSG","7057"]],AUTHORITY["EPSG","6053"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4053"]]','+proj=longlat +a=6371228 +b=6371228 +no_defs '); --- --- EPSG 4054 : Unspecified datum based upon the Hughes 1980 ellipsoid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4054,'EPSG',4054,'GEOGCS["Unspecified datum based upon the Hughes 1980 ellipsoid",DATUM["Not_specified_based_on_Hughes_1980_ellipsoid",SPHEROID["Hughes 1980",6378273,298.279411123061,AUTHORITY["EPSG","7058"]],AUTHORITY["EPSG","6054"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4054"]]','+proj=longlat +a=6378273 +b=6356889.449 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4054,'EPSG',4054,'GEOGCS["Unspecified datum based upon the Hughes 1980 ellipsoid",DATUM["Not_specified_based_on_Hughes_1980_ellipsoid",SPHEROID["Hughes 1980",6378273,298.279411123061,AUTHORITY["EPSG","7058"]],AUTHORITY["EPSG","6054"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4054"]]','+proj=longlat +a=6378273 +b=6356889.449 +no_defs '); --- --- EPSG 4055 : Popular Visualisation CRS --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4055,'EPSG',4055,'GEOGCS["Popular Visualisation CRS",DATUM["Popular_Visualisation_Datum",SPHEROID["Popular Visualisation Sphere",6378137,0,AUTHORITY["EPSG","7059"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6055"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4055"]]','+proj=longlat +a=6378137 +b=6378137 +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4055,'EPSG',4055,'GEOGCS["Popular Visualisation CRS",DATUM["Popular_Visualisation_Datum",SPHEROID["Popular Visualisation Sphere",6378137,0,AUTHORITY["EPSG","7059"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6055"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4055"]]','+proj=longlat +a=6378137 +b=6378137 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4075 : SREF98 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4075,'EPSG',4075,'GEOGCS["SREF98",DATUM["Serbian_Reference_Network_1998",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1034"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4075"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4075,'EPSG',4075,'GEOGCS["SREF98",DATUM["Serbian_Reference_Network_1998",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1034"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4075"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4081 : REGCAN95 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4081,'EPSG',4081,'GEOGCS["REGCAN95",DATUM["Red_Geodesica_de_Canarias_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1035"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4081"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4081,'EPSG',4081,'GEOGCS["REGCAN95",DATUM["Red_Geodesica_de_Canarias_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1035"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4081"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4120 : Greek --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4120,'EPSG',4120,'GEOGCS["Greek",DATUM["Greek",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6120"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4120"]]','+proj=longlat +ellps=bessel +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4120,'EPSG',4120,'GEOGCS["Greek",DATUM["Greek",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6120"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4120"]]','+proj=longlat +ellps=bessel +no_defs '); --- --- EPSG 4121 : GGRS87 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4121,'EPSG',4121,'GEOGCS["GGRS87",DATUM["Greek_Geodetic_Reference_System_1987",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[-199.87,74.79,246.62,0,0,0,0],AUTHORITY["EPSG","6121"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4121"]]','+proj=longlat +ellps=GRS80 +towgs84=-199.87,74.79,246.62,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4121,'EPSG',4121,'GEOGCS["GGRS87",DATUM["Greek_Geodetic_Reference_System_1987",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[-199.87,74.79,246.62,0,0,0,0],AUTHORITY["EPSG","6121"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4121"]]','+proj=longlat +ellps=GRS80 +towgs84=-199.87,74.79,246.62,0,0,0,0 +no_defs '); --- --- EPSG 4122 : ATS77 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4122,'EPSG',4122,'GEOGCS["ATS77",DATUM["Average_Terrestrial_System_1977",SPHEROID["Average Terrestrial System 1977",6378135,298.257,AUTHORITY["EPSG","7041"]],AUTHORITY["EPSG","6122"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4122"]]','+proj=longlat +a=6378135 +b=6356750.304921594 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4122,'EPSG',4122,'GEOGCS["ATS77",DATUM["Average_Terrestrial_System_1977",SPHEROID["Average Terrestrial System 1977",6378135,298.257,AUTHORITY["EPSG","7041"]],AUTHORITY["EPSG","6122"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4122"]]','+proj=longlat +a=6378135 +b=6356750.304921594 +no_defs '); --- --- EPSG 4123 : KKJ --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4123,'EPSG',4123,'GEOGCS["KKJ",DATUM["Kartastokoordinaattijarjestelma_1966",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6123"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4123"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4123,'EPSG',4123,'GEOGCS["KKJ",DATUM["Kartastokoordinaattijarjestelma_1966",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496],AUTHORITY["EPSG","6123"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4123"]]','+proj=longlat +ellps=intl +towgs84=-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496 +no_defs '); --- --- EPSG 4124 : RT90 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4124,'EPSG',4124,'GEOGCS["RT90",DATUM["Rikets_koordinatsystem_1990",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6124"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4124"]]','+proj=longlat +ellps=bessel +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4124,'EPSG',4124,'GEOGCS["RT90",DATUM["Rikets_koordinatsystem_1990",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[414.1,41.3,603.1,-0.855,2.141,-7.023,0],AUTHORITY["EPSG","6124"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4124"]]','+proj=longlat +ellps=bessel +towgs84=414.1,41.3,603.1,-0.855,2.141,-7.023,0 +no_defs '); --- --- EPSG 4125 : Samboja --- @@ -238,55 +238,55 @@ --- --- EPSG 4127 : Tete --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4127,'EPSG',4127,'GEOGCS["Tete",DATUM["Tete",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6127"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4127"]]','+proj=longlat +ellps=clrk66 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4127,'EPSG',4127,'GEOGCS["Tete",DATUM["Tete",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[219.315,168.975,-166.145,0.198,5.926,-2.356,-57.104],AUTHORITY["EPSG","6127"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4127"]]','+proj=longlat +ellps=clrk66 +towgs84=219.315,168.975,-166.145,0.198,5.926,-2.356,-57.104 +no_defs '); --- --- EPSG 4128 : Madzansua --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4128,'EPSG',4128,'GEOGCS["Madzansua",DATUM["Madzansua",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6128"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4128"]]','+proj=longlat +ellps=clrk66 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4128,'EPSG',4128,'GEOGCS["Madzansua",DATUM["Madzansua",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6128"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4128"]]','+proj=longlat +ellps=clrk66 +no_defs '); --- --- EPSG 4129 : Observatario --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4129,'EPSG',4129,'GEOGCS["Observatario",DATUM["Observatario",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6129"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4129"]]','+proj=longlat +ellps=clrk66 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4129,'EPSG',4129,'GEOGCS["Observatario",DATUM["Observatario",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6129"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4129"]]','+proj=longlat +ellps=clrk66 +no_defs '); --- --- EPSG 4130 : Moznet --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4130,'EPSG',4130,'GEOGCS["Moznet",DATUM["Moznet_ITRF94",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,-0,-0,-0,0],AUTHORITY["EPSG","6130"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4130"]]','+proj=longlat +ellps=WGS84 +towgs84=0,0,0,-0,-0,-0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4130,'EPSG',4130,'GEOGCS["Moznet",DATUM["Moznet_ITRF94",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,-0,-0,-0,0],AUTHORITY["EPSG","6130"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4130"]]','+proj=longlat +ellps=WGS84 +towgs84=0,0,0,-0,-0,-0,0 +no_defs '); --- --- EPSG 4131 : Indian 1960 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4131,'EPSG',4131,'GEOGCS["Indian 1960",DATUM["Indian_1960",SPHEROID["Everest 1830 (1937 Adjustment)",6377276.345,300.8017,AUTHORITY["EPSG","7015"]],AUTHORITY["EPSG","6131"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4131"]]','+proj=longlat +a=6377276.345 +b=6356075.41314024 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4131,'EPSG',4131,'GEOGCS["Indian 1960",DATUM["Indian_1960",SPHEROID["Everest 1830 (1937 Adjustment)",6377276.345,300.8017,AUTHORITY["EPSG","7015"]],TOWGS84[198,881,317,0,0,0,0],AUTHORITY["EPSG","6131"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4131"]]','+proj=longlat +a=6377276.345 +b=6356075.41314024 +towgs84=198,881,317,0,0,0,0 +no_defs '); --- --- EPSG 4132 : FD58 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4132,'EPSG',4132,'GEOGCS["FD58",DATUM["Final_Datum_1958",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6132"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4132"]]','+proj=longlat +ellps=clrk80 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4132,'EPSG',4132,'GEOGCS["FD58",DATUM["Final_Datum_1958",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-239.1,-170.02,397.5,0,0,0,0],AUTHORITY["EPSG","6132"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4132"]]','+proj=longlat +ellps=clrk80 +towgs84=-239.1,-170.02,397.5,0,0,0,0 +no_defs '); --- --- EPSG 4133 : EST92 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4133,'EPSG',4133,'GEOGCS["EST92",DATUM["Estonia_1992",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0.055,-0.541,-0.185,0.0183,-0.0003,-0.007,-0.014],AUTHORITY["EPSG","6133"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4133"]]','+proj=longlat +ellps=GRS80 +towgs84=0.055,-0.541,-0.185,0.0183,-0.0003,-0.007,-0.014 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4133,'EPSG',4133,'GEOGCS["EST92",DATUM["Estonia_1992",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0.055,-0.541,-0.185,0.0183,-0.0003,-0.007,-0.014],AUTHORITY["EPSG","6133"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4133"]]','+proj=longlat +ellps=GRS80 +towgs84=0.055,-0.541,-0.185,0.0183,-0.0003,-0.007,-0.014 +no_defs '); --- --- EPSG 4134 : PSD93 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4134,'EPSG',4134,'GEOGCS["PSD93",DATUM["PDO_Survey_Datum_1993",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6134"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4134"]]','+proj=longlat +ellps=clrk80 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4134,'EPSG',4134,'GEOGCS["PSD93",DATUM["PDO_Survey_Datum_1993",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-180.624,-225.516,173.919,-0.81,-1.898,8.336,16.7101],AUTHORITY["EPSG","6134"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4134"]]','+proj=longlat +ellps=clrk80 +towgs84=-180.624,-225.516,173.919,-0.81,-1.898,8.336,16.7101 +no_defs '); --- --- EPSG 4135 : Old Hawaiian --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4135,'EPSG',4135,'GEOGCS["Old Hawaiian",DATUM["Old_Hawaiian",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6135"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4135"]]','+proj=longlat +ellps=clrk66 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4135,'EPSG',4135,'GEOGCS["Old Hawaiian",DATUM["Old_Hawaiian",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[61,-285,-181,0,0,0,0],AUTHORITY["EPSG","6135"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4135"]]','+proj=longlat +ellps=clrk66 +towgs84=61,-285,-181,0,0,0,0 +no_defs '); --- --- EPSG 4136 : St. Lawrence Island --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4136,'EPSG',4136,'GEOGCS["St. Lawrence Island",DATUM["St_Lawrence_Island",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6136"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4136"]]','+proj=longlat +ellps=clrk66 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4136,'EPSG',4136,'GEOGCS["St. Lawrence Island",DATUM["St_Lawrence_Island",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6136"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4136"]]','+proj=longlat +ellps=clrk66 +no_defs '); --- --- EPSG 4137 : St. Paul Island --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4137,'EPSG',4137,'GEOGCS["St. Paul Island",DATUM["St_Paul_Island",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6137"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4137"]]','+proj=longlat +ellps=clrk66 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4137,'EPSG',4137,'GEOGCS["St. Paul Island",DATUM["St_Paul_Island",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6137"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4137"]]','+proj=longlat +ellps=clrk66 +no_defs '); --- --- EPSG 4138 : St. George Island --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4138,'EPSG',4138,'GEOGCS["St. George Island",DATUM["St_George_Island",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6138"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4138"]]','+proj=longlat +ellps=clrk66 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4138,'EPSG',4138,'GEOGCS["St. George Island",DATUM["St_George_Island",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6138"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4138"]]','+proj=longlat +ellps=clrk66 +no_defs '); --- --- EPSG 4139 : Puerto Rico --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4139,'EPSG',4139,'GEOGCS["Puerto Rico",DATUM["Puerto_Rico",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[11,72,-101,0,0,0,0],AUTHORITY["EPSG","6139"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4139"]]','+proj=longlat +ellps=clrk66 +towgs84=11,72,-101,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4139,'EPSG',4139,'GEOGCS["Puerto Rico",DATUM["Puerto_Rico",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[11,72,-101,0,0,0,0],AUTHORITY["EPSG","6139"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4139"]]','+proj=longlat +ellps=clrk66 +towgs84=11,72,-101,0,0,0,0 +no_defs '); --- --- EPSG 4140 : NAD83(CSRS98) --- @@ -294,127 +294,127 @@ --- --- EPSG 4141 : Israel --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4141,'EPSG',4141,'GEOGCS["Israel",DATUM["Israel",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[-48,55,52,0,0,0,0],AUTHORITY["EPSG","6141"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4141"]]','+proj=longlat +ellps=GRS80 +towgs84=-48,55,52,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4141,'EPSG',4141,'GEOGCS["Israel",DATUM["Israel",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[-48,55,52,0,0,0,0],AUTHORITY["EPSG","6141"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4141"]]','+proj=longlat +ellps=GRS80 +towgs84=-48,55,52,0,0,0,0 +no_defs '); --- --- EPSG 4142 : Locodjo 1965 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4142,'EPSG',4142,'GEOGCS["Locodjo 1965",DATUM["Locodjo_1965",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-125,53,467,0,0,0,0],AUTHORITY["EPSG","6142"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4142"]]','+proj=longlat +ellps=clrk80 +towgs84=-125,53,467,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4142,'EPSG',4142,'GEOGCS["Locodjo 1965",DATUM["Locodjo_1965",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-125,53,467,0,0,0,0],AUTHORITY["EPSG","6142"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4142"]]','+proj=longlat +ellps=clrk80 +towgs84=-125,53,467,0,0,0,0 +no_defs '); --- --- EPSG 4143 : Abidjan 1987 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4143,'EPSG',4143,'GEOGCS["Abidjan 1987",DATUM["Abidjan_1987",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-124.76,53,466.79,0,0,0,0],AUTHORITY["EPSG","6143"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4143"]]','+proj=longlat +ellps=clrk80 +towgs84=-124.76,53,466.79,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4143,'EPSG',4143,'GEOGCS["Abidjan 1987",DATUM["Abidjan_1987",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-124.76,53,466.79,0,0,0,0],AUTHORITY["EPSG","6143"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4143"]]','+proj=longlat +ellps=clrk80 +towgs84=-124.76,53,466.79,0,0,0,0 +no_defs '); --- --- EPSG 4144 : Kalianpur 1937 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4144,'EPSG',4144,'GEOGCS["Kalianpur 1937",DATUM["Kalianpur_1937",SPHEROID["Everest 1830 (1937 Adjustment)",6377276.345,300.8017,AUTHORITY["EPSG","7015"]],AUTHORITY["EPSG","6144"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4144"]]','+proj=longlat +a=6377276.345 +b=6356075.41314024 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4144,'EPSG',4144,'GEOGCS["Kalianpur 1937",DATUM["Kalianpur_1937",SPHEROID["Everest 1830 (1937 Adjustment)",6377276.345,300.8017,AUTHORITY["EPSG","7015"]],TOWGS84[282,726,254,0,0,0,0],AUTHORITY["EPSG","6144"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4144"]]','+proj=longlat +a=6377276.345 +b=6356075.41314024 +towgs84=282,726,254,0,0,0,0 +no_defs '); --- --- EPSG 4145 : Kalianpur 1962 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4145,'EPSG',4145,'GEOGCS["Kalianpur 1962",DATUM["Kalianpur_1962",SPHEROID["Everest 1830 (1962 Definition)",6377301.243,300.8017255,AUTHORITY["EPSG","7044"]],AUTHORITY["EPSG","6145"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4145"]]','+proj=longlat +a=6377301.243 +b=6356100.230165384 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4145,'EPSG',4145,'GEOGCS["Kalianpur 1962",DATUM["Kalianpur_1962",SPHEROID["Everest 1830 (1962 Definition)",6377301.243,300.8017255,AUTHORITY["EPSG","7044"]],TOWGS84[283,682,231,0,0,0,0],AUTHORITY["EPSG","6145"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4145"]]','+proj=longlat +a=6377301.243 +b=6356100.230165384 +towgs84=283,682,231,0,0,0,0 +no_defs '); --- --- EPSG 4146 : Kalianpur 1975 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4146,'EPSG',4146,'GEOGCS["Kalianpur 1975",DATUM["Kalianpur_1975",SPHEROID["Everest 1830 (1975 Definition)",6377299.151,300.8017255,AUTHORITY["EPSG","7045"]],TOWGS84[295,736,257,0,0,0,0],AUTHORITY["EPSG","6146"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4146"]]','+proj=longlat +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4146,'EPSG',4146,'GEOGCS["Kalianpur 1975",DATUM["Kalianpur_1975",SPHEROID["Everest 1830 (1975 Definition)",6377299.151,300.8017255,AUTHORITY["EPSG","7045"]],TOWGS84[295,736,257,0,0,0,0],AUTHORITY["EPSG","6146"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4146"]]','+proj=longlat +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +no_defs '); --- --- EPSG 4147 : Hanoi 1972 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4147,'EPSG',4147,'GEOGCS["Hanoi 1972",DATUM["Hanoi_1972",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[-17.51,-108.32,-62.39,0,0,0,0],AUTHORITY["EPSG","6147"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4147"]]','+proj=longlat +ellps=krass +towgs84=-17.51,-108.32,-62.39,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4147,'EPSG',4147,'GEOGCS["Hanoi 1972",DATUM["Hanoi_1972",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[-17.51,-108.32,-62.39,0,0,0,0],AUTHORITY["EPSG","6147"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4147"]]','+proj=longlat +ellps=krass +towgs84=-17.51,-108.32,-62.39,0,0,0,0 +no_defs '); --- --- EPSG 4148 : Hartebeesthoek94 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4148,'EPSG',4148,'GEOGCS["Hartebeesthoek94",DATUM["Hartebeesthoek94",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6148"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4148"]]','+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4148,'EPSG',4148,'GEOGCS["Hartebeesthoek94",DATUM["Hartebeesthoek94",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6148"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4148"]]','+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4149 : CH1903 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4149,'EPSG',4149,'GEOGCS["CH1903",DATUM["CH1903",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[674.374,15.056,405.346,0,0,0,0],AUTHORITY["EPSG","6149"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4149"]]','+proj=longlat +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4149,'EPSG',4149,'GEOGCS["CH1903",DATUM["CH1903",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[674.4,15.1,405.3,0,0,0,0],AUTHORITY["EPSG","6149"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4149"]]','+proj=longlat +ellps=bessel +towgs84=674.4,15.1,405.3,0,0,0,0 +no_defs '); --- --- EPSG 4150 : CH1903+ --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4150,'EPSG',4150,'GEOGCS["CH1903+",DATUM["CH1903",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[674.374,15.056,405.346,0,0,0,0],AUTHORITY["EPSG","6150"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4150"]]','+proj=longlat +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4150,'EPSG',4150,'GEOGCS["CH1903+",DATUM["CH1903+",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[674.374,15.056,405.346,0,0,0,0],AUTHORITY["EPSG","6150"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4150"]]','+proj=longlat +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +no_defs '); --- --- EPSG 4151 : CHTRF95 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4151,'EPSG',4151,'GEOGCS["CHTRF95",DATUM["Swiss_Terrestrial_Reference_Frame_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6151"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4151"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4151,'EPSG',4151,'GEOGCS["CHTRF95",DATUM["Swiss_Terrestrial_Reference_Frame_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6151"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4151"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4152 : NAD83(HARN) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4152,'EPSG',4152,'GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]]','+proj=longlat +ellps=GRS80 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4152,'EPSG',4152,'GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4153 : Rassadiran --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4153,'EPSG',4153,'GEOGCS["Rassadiran",DATUM["Rassadiran",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-133.63,-157.5,-158.62,0,0,0,0],AUTHORITY["EPSG","6153"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4153"]]','+proj=longlat +ellps=intl +towgs84=-133.63,-157.5,-158.62,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4153,'EPSG',4153,'GEOGCS["Rassadiran",DATUM["Rassadiran",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-133.63,-157.5,-158.62,0,0,0,0],AUTHORITY["EPSG","6153"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4153"]]','+proj=longlat +ellps=intl +towgs84=-133.63,-157.5,-158.62,0,0,0,0 +no_defs '); --- --- EPSG 4154 : ED50(ED77) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4154,'EPSG',4154,'GEOGCS["ED50(ED77)",DATUM["European_Datum_1950_1977",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6154"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4154"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4154,'EPSG',4154,'GEOGCS["ED50(ED77)",DATUM["European_Datum_1950_1977",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-117,-132,-164,0,0,0,0],AUTHORITY["EPSG","6154"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4154"]]','+proj=longlat +ellps=intl +towgs84=-117,-132,-164,0,0,0,0 +no_defs '); --- --- EPSG 4155 : Dabola 1981 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4155,'EPSG',4155,'GEOGCS["Dabola 1981",DATUM["Dabola_1981",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-83,37,124,0,0,0,0],AUTHORITY["EPSG","6155"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4155"]]','+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-83,37,124,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4155,'EPSG',4155,'GEOGCS["Dabola 1981",DATUM["Dabola_1981",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-83,37,124,0,0,0,0],AUTHORITY["EPSG","6155"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4155"]]','+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-83,37,124,0,0,0,0 +no_defs '); --- --- EPSG 4156 : S-JTSK --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4156,'EPSG',4156,'GEOGCS["S-JTSK",DATUM["Jednotne_Trigonometricke_Site_Katastralni",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6156"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4156"]]','+proj=longlat +ellps=bessel +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4156,'EPSG',4156,'GEOGCS["S-JTSK",DATUM["Jednotne_Trigonometricke_Site_Katastralni",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[589,76,480,0,0,0,0],AUTHORITY["EPSG","6156"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4156"]]','+proj=longlat +ellps=bessel +towgs84=589,76,480,0,0,0,0 +no_defs '); --- --- EPSG 4157 : Mount Dillon --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4157,'EPSG',4157,'GEOGCS["Mount Dillon",DATUM["Mount_Dillon",SPHEROID["Clarke 1858",6378293.645208759,294.2606763692569,AUTHORITY["EPSG","7007"]],AUTHORITY["EPSG","6157"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4157"]]','+proj=longlat +a=6378293.645208759 +b=6356617.987679838 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4157,'EPSG',4157,'GEOGCS["Mount Dillon",DATUM["Mount_Dillon",SPHEROID["Clarke 1858",6378293.645208759,294.2606763692569,AUTHORITY["EPSG","7007"]],AUTHORITY["EPSG","6157"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4157"]]','+proj=longlat +a=6378293.645208759 +b=6356617.987679838 +no_defs '); --- --- EPSG 4158 : Naparima 1955 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4158,'EPSG',4158,'GEOGCS["Naparima 1955",DATUM["Naparima_1955",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6158"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4158"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4158,'EPSG',4158,'GEOGCS["Naparima 1955",DATUM["Naparima_1955",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-0.465,372.095,171.736,0,0,0,0],AUTHORITY["EPSG","6158"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4158"]]','+proj=longlat +ellps=intl +towgs84=-0.465,372.095,171.736,0,0,0,0 +no_defs '); --- --- EPSG 4159 : ELD79 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4159,'EPSG',4159,'GEOGCS["ELD79",DATUM["European_Libyan_Datum_1979",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6159"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4159"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4159,'EPSG',4159,'GEOGCS["ELD79",DATUM["European_Libyan_Datum_1979",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-115.854,-99.0583,-152.462,0,0,0,0],AUTHORITY["EPSG","6159"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4159"]]','+proj=longlat +ellps=intl +towgs84=-115.854,-99.0583,-152.462,0,0,0,0 +no_defs '); --- --- EPSG 4160 : Chos Malal 1914 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4160,'EPSG',4160,'GEOGCS["Chos Malal 1914",DATUM["Chos_Malal_1914",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6160"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4160"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4160,'EPSG',4160,'GEOGCS["Chos Malal 1914",DATUM["Chos_Malal_1914",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6160"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4160"]]','+proj=longlat +ellps=intl +no_defs '); --- --- EPSG 4161 : Pampa del Castillo --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4161,'EPSG',4161,'GEOGCS["Pampa del Castillo",DATUM["Pampa_del_Castillo",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[27.5,14,186.4,0,0,0,0],AUTHORITY["EPSG","6161"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4161"]]','+proj=longlat +ellps=intl +towgs84=27.5,14,186.4,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4161,'EPSG',4161,'GEOGCS["Pampa del Castillo",DATUM["Pampa_del_Castillo",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[27.5,14,186.4,0,0,0,0],AUTHORITY["EPSG","6161"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4161"]]','+proj=longlat +ellps=intl +towgs84=27.5,14,186.4,0,0,0,0 +no_defs '); --- --- EPSG 4162 : Korean 1985 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4162,'EPSG',4162,'GEOGCS["Korean 1985",DATUM["Korean_Datum_1985",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6162"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4162"]]','+proj=longlat +ellps=bessel +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4162,'EPSG',4162,'GEOGCS["Korean 1985",DATUM["Korean_Datum_1985",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6162"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4162"]]','+proj=longlat +ellps=bessel +no_defs '); --- --- EPSG 4163 : Yemen NGN96 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4163,'EPSG',4163,'GEOGCS["Yemen NGN96",DATUM["Yemen_National_Geodetic_Network_1996",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6163"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4163"]]','+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4163,'EPSG',4163,'GEOGCS["Yemen NGN96",DATUM["Yemen_National_Geodetic_Network_1996",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6163"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4163"]]','+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4164 : South Yemen --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4164,'EPSG',4164,'GEOGCS["South Yemen",DATUM["South_Yemen",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[-76,-138,67,0,0,0,0],AUTHORITY["EPSG","6164"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4164"]]','+proj=longlat +ellps=krass +towgs84=-76,-138,67,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4164,'EPSG',4164,'GEOGCS["South Yemen",DATUM["South_Yemen",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[-76,-138,67,0,0,0,0],AUTHORITY["EPSG","6164"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4164"]]','+proj=longlat +ellps=krass +towgs84=-76,-138,67,0,0,0,0 +no_defs '); --- --- EPSG 4165 : Bissau --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4165,'EPSG',4165,'GEOGCS["Bissau",DATUM["Bissau",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-173,253,27,0,0,0,0],AUTHORITY["EPSG","6165"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4165"]]','+proj=longlat +ellps=intl +towgs84=-173,253,27,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4165,'EPSG',4165,'GEOGCS["Bissau",DATUM["Bissau",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-173,253,27,0,0,0,0],AUTHORITY["EPSG","6165"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4165"]]','+proj=longlat +ellps=intl +towgs84=-173,253,27,0,0,0,0 +no_defs '); --- --- EPSG 4166 : Korean 1995 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4166,'EPSG',4166,'GEOGCS["Korean 1995",DATUM["Korean_Datum_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6166"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4166"]]','+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4166,'EPSG',4166,'GEOGCS["Korean 1995",DATUM["Korean_Datum_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6166"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4166"]]','+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4167 : NZGD2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4167,'EPSG',4167,'GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4167,'EPSG',4167,'GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4168 : Accra --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4168,'EPSG',4168,'GEOGCS["Accra",DATUM["Accra",SPHEROID["War Office",6378300,296,AUTHORITY["EPSG","7029"]],AUTHORITY["EPSG","6168"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4168"]]','+proj=longlat +a=6378300 +b=6356751.689189189 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4168,'EPSG',4168,'GEOGCS["Accra",DATUM["Accra",SPHEROID["War Office",6378300,296,AUTHORITY["EPSG","7029"]],TOWGS84[-199,32,322,0,0,0,0],AUTHORITY["EPSG","6168"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4168"]]','+proj=longlat +a=6378300 +b=6356751.689189189 +towgs84=-199,32,322,0,0,0,0 +no_defs '); --- --- EPSG 4169 : American Samoa 1962 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4169,'EPSG',4169,'GEOGCS["American Samoa 1962",DATUM["American_Samoa_1962",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-115,118,426,0,0,0,0],AUTHORITY["EPSG","6169"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4169"]]','+proj=longlat +ellps=clrk66 +towgs84=-115,118,426,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4169,'EPSG',4169,'GEOGCS["American Samoa 1962",DATUM["American_Samoa_1962",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-115,118,426,0,0,0,0],AUTHORITY["EPSG","6169"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4169"]]','+proj=longlat +ellps=clrk66 +towgs84=-115,118,426,0,0,0,0 +no_defs '); --- --- EPSG 4170 : SIRGAS 1995 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4170,'EPSG',4170,'GEOGCS["SIRGAS 1995",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6170"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4170"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4170,'EPSG',4170,'GEOGCS["SIRGAS 1995",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6170"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4170"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4171 : RGF93 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4171,'EPSG',4171,'GEOGCS["RGF93",DATUM["Reseau_Geodesique_Francais_1993",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6171"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4171"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4171,'EPSG',4171,'GEOGCS["RGF93",DATUM["Reseau_Geodesique_Francais_1993",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6171"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4171"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4172 : POSGAR --- @@ -422,47 +422,47 @@ --- --- EPSG 4173 : IRENET95 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4173,'EPSG',4173,'GEOGCS["IRENET95",DATUM["IRENET95",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6173"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4173"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4173,'EPSG',4173,'GEOGCS["IRENET95",DATUM["IRENET95",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6173"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4173"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4174 : Sierra Leone 1924 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4174,'EPSG',4174,'GEOGCS["Sierra Leone 1924",DATUM["Sierra_Leone_Colony_1924",SPHEROID["War Office",6378300,296,AUTHORITY["EPSG","7029"]],AUTHORITY["EPSG","6174"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4174"]]','+proj=longlat +a=6378300 +b=6356751.689189189 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4174,'EPSG',4174,'GEOGCS["Sierra Leone 1924",DATUM["Sierra_Leone_Colony_1924",SPHEROID["War Office",6378300,296,AUTHORITY["EPSG","7029"]],AUTHORITY["EPSG","6174"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4174"]]','+proj=longlat +a=6378300 +b=6356751.689189189 +no_defs '); --- --- EPSG 4175 : Sierra Leone 1968 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4175,'EPSG',4175,'GEOGCS["Sierra Leone 1968",DATUM["Sierra_Leone_1968",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-88,4,101,0,0,0,0],AUTHORITY["EPSG","6175"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4175"]]','+proj=longlat +ellps=clrk80 +towgs84=-88,4,101,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4175,'EPSG',4175,'GEOGCS["Sierra Leone 1968",DATUM["Sierra_Leone_1968",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-88,4,101,0,0,0,0],AUTHORITY["EPSG","6175"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4175"]]','+proj=longlat +ellps=clrk80 +towgs84=-88,4,101,0,0,0,0 +no_defs '); --- --- EPSG 4176 : Australian Antarctic --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4176,'EPSG',4176,'GEOGCS["Australian Antarctic",DATUM["Australian_Antarctic_Datum_1998",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6176"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4176"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4176,'EPSG',4176,'GEOGCS["Australian Antarctic",DATUM["Australian_Antarctic_Datum_1998",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6176"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4176"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4178 : Pulkovo 1942(83) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4178,'EPSG',4178,'GEOGCS["Pulkovo 1942(83)",DATUM["Pulkovo_1942_83",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6178"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4178"]]','+proj=longlat +ellps=krass +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4178,'EPSG',4178,'GEOGCS["Pulkovo 1942(83)",DATUM["Pulkovo_1942_83",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[26,-121,-78,0,0,0,0],AUTHORITY["EPSG","6178"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4178"]]','+proj=longlat +ellps=krass +towgs84=26,-121,-78,0,0,0,0 +no_defs '); --- --- EPSG 4179 : Pulkovo 1942(58) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4179,'EPSG',4179,'GEOGCS["Pulkovo 1942(58)",DATUM["Pulkovo_1942_58",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6179"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4179"]]','+proj=longlat +ellps=krass +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4179,'EPSG',4179,'GEOGCS["Pulkovo 1942(58)",DATUM["Pulkovo_1942_58",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84],AUTHORITY["EPSG","6179"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4179"]]','+proj=longlat +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +no_defs '); --- --- EPSG 4180 : EST97 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4180,'EPSG',4180,'GEOGCS["EST97",DATUM["Estonia_1997",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6180"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4180"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4180,'EPSG',4180,'GEOGCS["EST97",DATUM["Estonia_1997",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6180"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4180"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4181 : Luxembourg 1930 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4181,'EPSG',4181,'GEOGCS["Luxembourg 1930",DATUM["Luxembourg_1930",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-193,13.7,-39.3,-0.41,-2.933,2.688,0.43],AUTHORITY["EPSG","6181"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4181"]]','+proj=longlat +ellps=intl +towgs84=-193,13.7,-39.3,-0.41,-2.933,2.688,0.43 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4181,'EPSG',4181,'GEOGCS["Luxembourg 1930",DATUM["Luxembourg_1930",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-193,13.7,-39.3,-0.41,-2.933,2.688,0.43],AUTHORITY["EPSG","6181"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4181"]]','+proj=longlat +ellps=intl +towgs84=-193,13.7,-39.3,-0.41,-2.933,2.688,0.43 +no_defs '); --- --- EPSG 4182 : Azores Occidental 1939 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4182,'EPSG',4182,'GEOGCS["Azores Occidental 1939",DATUM["Azores_Occidental_Islands_1939",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6182"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4182"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4182,'EPSG',4182,'GEOGCS["Azores Occidental 1939",DATUM["Azores_Occidental_Islands_1939",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-425,-169,81,0,0,0,0],AUTHORITY["EPSG","6182"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4182"]]','+proj=longlat +ellps=intl +towgs84=-425,-169,81,0,0,0,0 +no_defs '); --- --- EPSG 4183 : Azores Central 1948 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4183,'EPSG',4183,'GEOGCS["Azores Central 1948",DATUM["Azores_Central_Islands_1948",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-104,167,-38,0,0,0,0],AUTHORITY["EPSG","6183"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4183"]]','+proj=longlat +ellps=intl +towgs84=-104,167,-38,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4183,'EPSG',4183,'GEOGCS["Azores Central 1948",DATUM["Azores_Central_Islands_1948",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-104,167,-38,0,0,0,0],AUTHORITY["EPSG","6183"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4183"]]','+proj=longlat +ellps=intl +towgs84=-104,167,-38,0,0,0,0 +no_defs '); --- --- EPSG 4184 : Azores Oriental 1940 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4184,'EPSG',4184,'GEOGCS["Azores Oriental 1940",DATUM["Azores_Oriental_Islands_1940",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-203,141,53,0,0,0,0],AUTHORITY["EPSG","6184"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4184"]]','+proj=longlat +ellps=intl +towgs84=-203,141,53,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4184,'EPSG',4184,'GEOGCS["Azores Oriental 1940",DATUM["Azores_Oriental_Islands_1940",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-203,141,53,0,0,0,0],AUTHORITY["EPSG","6184"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4184"]]','+proj=longlat +ellps=intl +towgs84=-203,141,53,0,0,0,0 +no_defs '); --- --- EPSG 4185 : Madeira 1936 --- @@ -470,151 +470,151 @@ --- --- EPSG 4188 : OSNI 1952 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4188,'EPSG',4188,'GEOGCS["OSNI 1952",DATUM["OSNI_1952",SPHEROID["Airy 1830",6377563.396,299.3249646,AUTHORITY["EPSG","7001"]],TOWGS84[482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15],AUTHORITY["EPSG","6188"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4188"]]','+proj=longlat +ellps=airy +towgs84=482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4188,'EPSG',4188,'GEOGCS["OSNI 1952",DATUM["OSNI_1952",SPHEROID["Airy 1830",6377563.396,299.3249646,AUTHORITY["EPSG","7001"]],TOWGS84[482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15],AUTHORITY["EPSG","6188"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4188"]]','+proj=longlat +ellps=airy +towgs84=482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15 +no_defs '); --- --- EPSG 4189 : REGVEN --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4189,'EPSG',4189,'GEOGCS["REGVEN",DATUM["Red_Geodesica_Venezolana",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6189"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4189"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4189,'EPSG',4189,'GEOGCS["REGVEN",DATUM["Red_Geodesica_Venezolana",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6189"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4189"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4190 : POSGAR 98 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4190,'EPSG',4190,'GEOGCS["POSGAR 98",DATUM["Posiciones_Geodesicas_Argentinas_1998",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6190"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4190"]]','+proj=longlat +ellps=GRS80 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4190,'EPSG',4190,'GEOGCS["POSGAR 98",DATUM["Posiciones_Geodesicas_Argentinas_1998",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6190"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4190"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4191 : Albanian 1987 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4191,'EPSG',4191,'GEOGCS["Albanian 1987",DATUM["Albanian_1987",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6191"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4191"]]','+proj=longlat +ellps=krass +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4191,'EPSG',4191,'GEOGCS["Albanian 1987",DATUM["Albanian_1987",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6191"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4191"]]','+proj=longlat +ellps=krass +no_defs '); --- --- EPSG 4192 : Douala 1948 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4192,'EPSG',4192,'GEOGCS["Douala 1948",DATUM["Douala_1948",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-206.1,-174.7,-87.7,0,0,0,0],AUTHORITY["EPSG","6192"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4192"]]','+proj=longlat +ellps=intl +towgs84=-206.1,-174.7,-87.7,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4192,'EPSG',4192,'GEOGCS["Douala 1948",DATUM["Douala_1948",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-206.1,-174.7,-87.7,0,0,0,0],AUTHORITY["EPSG","6192"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4192"]]','+proj=longlat +ellps=intl +towgs84=-206.1,-174.7,-87.7,0,0,0,0 +no_defs '); --- --- EPSG 4193 : Manoca 1962 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4193,'EPSG',4193,'GEOGCS["Manoca 1962",DATUM["Manoca_1962",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-70.9,-151.8,-41.4,0,0,0,0],AUTHORITY["EPSG","6193"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4193"]]','+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-70.9,-151.8,-41.4,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4193,'EPSG',4193,'GEOGCS["Manoca 1962",DATUM["Manoca_1962",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-70.9,-151.8,-41.4,0,0,0,0],AUTHORITY["EPSG","6193"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4193"]]','+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-70.9,-151.8,-41.4,0,0,0,0 +no_defs '); --- --- EPSG 4194 : Qornoq 1927 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4194,'EPSG',4194,'GEOGCS["Qornoq 1927",DATUM["Qornoq_1927",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6194"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4194"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4194,'EPSG',4194,'GEOGCS["Qornoq 1927",DATUM["Qornoq_1927",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[163.511,127.533,-159.789,0,0,0.814,-0.6],AUTHORITY["EPSG","6194"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4194"]]','+proj=longlat +ellps=intl +towgs84=163.511,127.533,-159.789,0,0,0.814,-0.6 +no_defs '); --- --- EPSG 4195 : Scoresbysund 1952 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4195,'EPSG',4195,'GEOGCS["Scoresbysund 1952",DATUM["Scoresbysund_1952",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[105,326,-102.5,0,0,0.814,-0.6],AUTHORITY["EPSG","6195"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4195"]]','+proj=longlat +ellps=intl +towgs84=105,326,-102.5,0,0,0.814,-0.6 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4195,'EPSG',4195,'GEOGCS["Scoresbysund 1952",DATUM["Scoresbysund_1952",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[105,326,-102.5,0,0,0.814,-0.6],AUTHORITY["EPSG","6195"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4195"]]','+proj=longlat +ellps=intl +towgs84=105,326,-102.5,0,0,0.814,-0.6 +no_defs '); --- --- EPSG 4196 : Ammassalik 1958 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4196,'EPSG',4196,'GEOGCS["Ammassalik 1958",DATUM["Ammassalik_1958",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-45,417,-3.5,0,0,0.814,-0.6],AUTHORITY["EPSG","6196"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4196"]]','+proj=longlat +ellps=intl +towgs84=-45,417,-3.5,0,0,0.814,-0.6 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4196,'EPSG',4196,'GEOGCS["Ammassalik 1958",DATUM["Ammassalik_1958",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-45,417,-3.5,0,0,0.814,-0.6],AUTHORITY["EPSG","6196"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4196"]]','+proj=longlat +ellps=intl +towgs84=-45,417,-3.5,0,0,0.814,-0.6 +no_defs '); --- --- EPSG 4197 : Garoua --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4197,'EPSG',4197,'GEOGCS["Garoua",DATUM["Garoua",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6197"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4197"]]','+proj=longlat +ellps=clrk80 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4197,'EPSG',4197,'GEOGCS["Garoua",DATUM["Garoua",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6197"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4197"]]','+proj=longlat +ellps=clrk80 +no_defs '); --- --- EPSG 4198 : Kousseri --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4198,'EPSG',4198,'GEOGCS["Kousseri",DATUM["Kousseri",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6198"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4198"]]','+proj=longlat +ellps=clrk80 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4198,'EPSG',4198,'GEOGCS["Kousseri",DATUM["Kousseri",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6198"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4198"]]','+proj=longlat +ellps=clrk80 +no_defs '); --- --- EPSG 4199 : Egypt 1930 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4199,'EPSG',4199,'GEOGCS["Egypt 1930",DATUM["Egypt_1930",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6199"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4199"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4199,'EPSG',4199,'GEOGCS["Egypt 1930",DATUM["Egypt_1930",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6199"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4199"]]','+proj=longlat +ellps=intl +no_defs '); --- --- EPSG 4200 : Pulkovo 1995 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4200,'EPSG',4200,'GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]]','+proj=longlat +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4200,'EPSG',4200,'GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]]','+proj=longlat +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +no_defs '); --- --- EPSG 4201 : Adindan --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4201,'EPSG',4201,'GEOGCS["Adindan",DATUM["Adindan",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6201"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4201"]]','+proj=longlat +ellps=clrk80 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4201,'EPSG',4201,'GEOGCS["Adindan",DATUM["Adindan",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-166,-15,204,0,0,0,0],AUTHORITY["EPSG","6201"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4201"]]','+proj=longlat +ellps=clrk80 +towgs84=-166,-15,204,0,0,0,0 +no_defs '); --- --- EPSG 4202 : AGD66 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4202,'EPSG',4202,'GEOGCS["AGD66",DATUM["Australian_Geodetic_Datum_1966",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],AUTHORITY["EPSG","6202"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4202"]]','+proj=longlat +ellps=aust_SA +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4202,'EPSG',4202,'GEOGCS["AGD66",DATUM["Australian_Geodetic_Datum_1966",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],TOWGS84[-117.808,-51.536,137.784,0.303,0.446,0.234,-0.29],AUTHORITY["EPSG","6202"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4202"]]','+proj=longlat +ellps=aust_SA +towgs84=-117.808,-51.536,137.784,0.303,0.446,0.234,-0.29 +no_defs '); --- --- EPSG 4203 : AGD84 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4203,'EPSG',4203,'GEOGCS["AGD84",DATUM["Australian_Geodetic_Datum_1984",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],AUTHORITY["EPSG","6203"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4203"]]','+proj=longlat +ellps=aust_SA +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4203,'EPSG',4203,'GEOGCS["AGD84",DATUM["Australian_Geodetic_Datum_1984",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],TOWGS84[-134,-48,149,0,0,0,0],AUTHORITY["EPSG","6203"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4203"]]','+proj=longlat +ellps=aust_SA +towgs84=-134,-48,149,0,0,0,0 +no_defs '); --- --- EPSG 4204 : Ain el Abd --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4204,'EPSG',4204,'GEOGCS["Ain el Abd",DATUM["Ain_el_Abd_1970",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6204"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4204"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4204,'EPSG',4204,'GEOGCS["Ain el Abd",DATUM["Ain_el_Abd_1970",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-143,-236,7,0,0,0,0],AUTHORITY["EPSG","6204"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4204"]]','+proj=longlat +ellps=intl +towgs84=-143,-236,7,0,0,0,0 +no_defs '); --- --- EPSG 4205 : Afgooye --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4205,'EPSG',4205,'GEOGCS["Afgooye",DATUM["Afgooye",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[-43,-163,45,0,0,0,0],AUTHORITY["EPSG","6205"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4205"]]','+proj=longlat +ellps=krass +towgs84=-43,-163,45,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4205,'EPSG',4205,'GEOGCS["Afgooye",DATUM["Afgooye",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[-43,-163,45,0,0,0,0],AUTHORITY["EPSG","6205"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4205"]]','+proj=longlat +ellps=krass +towgs84=-43,-163,45,0,0,0,0 +no_defs '); --- --- EPSG 4206 : Agadez --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4206,'EPSG',4206,'GEOGCS["Agadez",DATUM["Agadez",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],AUTHORITY["EPSG","6206"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4206"]]','+proj=longlat +a=6378249.2 +b=6356515 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4206,'EPSG',4206,'GEOGCS["Agadez",DATUM["Agadez",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],AUTHORITY["EPSG","6206"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4206"]]','+proj=longlat +a=6378249.2 +b=6356515 +no_defs '); --- --- EPSG 4207 : Lisbon --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4207,'EPSG',4207,'GEOGCS["Lisbon",DATUM["Lisbon_1937",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6207"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4207"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4207,'EPSG',4207,'GEOGCS["Lisbon",DATUM["Lisbon_1937",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-304.046,-60.576,103.64,0,0,0,0],AUTHORITY["EPSG","6207"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4207"]]','+proj=longlat +ellps=intl +towgs84=-304.046,-60.576,103.64,0,0,0,0 +no_defs '); --- --- EPSG 4208 : Aratu --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4208,'EPSG',4208,'GEOGCS["Aratu",DATUM["Aratu",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6208"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4208"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4208,'EPSG',4208,'GEOGCS["Aratu",DATUM["Aratu",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-161,308,-142,0,0,0,0],AUTHORITY["EPSG","6208"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4208"]]','+proj=longlat +ellps=intl +towgs84=-161,308,-142,0,0,0,0 +no_defs '); --- --- EPSG 4209 : Arc 1950 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4209,'EPSG',4209,'GEOGCS["Arc 1950",DATUM["Arc_1950",SPHEROID["Clarke 1880 (Arc)",6378249.145,293.4663077,AUTHORITY["EPSG","7013"]],AUTHORITY["EPSG","6209"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4209"]]','+proj=longlat +a=6378249.145 +b=6356514.966398753 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4209,'EPSG',4209,'GEOGCS["Arc 1950",DATUM["Arc_1950",SPHEROID["Clarke 1880 (Arc)",6378249.145,293.4663077,AUTHORITY["EPSG","7013"]],TOWGS84[-143,-90,-294,0,0,0,0],AUTHORITY["EPSG","6209"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4209"]]','+proj=longlat +a=6378249.145 +b=6356514.966398753 +towgs84=-143,-90,-294,0,0,0,0 +no_defs '); --- --- EPSG 4210 : Arc 1960 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4210,'EPSG',4210,'GEOGCS["Arc 1960",DATUM["Arc_1960",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6210"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4210"]]','+proj=longlat +ellps=clrk80 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4210,'EPSG',4210,'GEOGCS["Arc 1960",DATUM["Arc_1960",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-160,-6,-302,0,0,0,0],AUTHORITY["EPSG","6210"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4210"]]','+proj=longlat +ellps=clrk80 +towgs84=-160,-6,-302,0,0,0,0 +no_defs '); --- --- EPSG 4211 : Batavia --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4211,'EPSG',4211,'GEOGCS["Batavia",DATUM["Batavia",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6211"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4211"]]','+proj=longlat +ellps=bessel +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4211,'EPSG',4211,'GEOGCS["Batavia",DATUM["Batavia",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-377,681,-50,0,0,0,0],AUTHORITY["EPSG","6211"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4211"]]','+proj=longlat +ellps=bessel +towgs84=-377,681,-50,0,0,0,0 +no_defs '); --- --- EPSG 4212 : Barbados 1938 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4212,'EPSG',4212,'GEOGCS["Barbados 1938",DATUM["Barbados_1938",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[31.95,300.99,419.19,0,0,0,0],AUTHORITY["EPSG","6212"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4212"]]','+proj=longlat +ellps=clrk80 +towgs84=31.95,300.99,419.19,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4212,'EPSG',4212,'GEOGCS["Barbados 1938",DATUM["Barbados_1938",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[31.95,300.99,419.19,0,0,0,0],AUTHORITY["EPSG","6212"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4212"]]','+proj=longlat +ellps=clrk80 +towgs84=31.95,300.99,419.19,0,0,0,0 +no_defs '); --- --- EPSG 4213 : Beduaram --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4213,'EPSG',4213,'GEOGCS["Beduaram",DATUM["Beduaram",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-106,-87,188,0,0,0,0],AUTHORITY["EPSG","6213"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4213"]]','+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-106,-87,188,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4213,'EPSG',4213,'GEOGCS["Beduaram",DATUM["Beduaram",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-106,-87,188,0,0,0,0],AUTHORITY["EPSG","6213"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4213"]]','+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-106,-87,188,0,0,0,0 +no_defs '); --- --- EPSG 4214 : Beijing 1954 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4214,'EPSG',4214,'GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]]','+proj=longlat +ellps=krass +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4214,'EPSG',4214,'GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]]','+proj=longlat +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +no_defs '); --- --- EPSG 4215 : Belge 1950 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4215,'EPSG',4215,'GEOGCS["Belge 1950",DATUM["Reseau_National_Belge_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6215"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4215"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4215,'EPSG',4215,'GEOGCS["Belge 1950",DATUM["Reseau_National_Belge_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6215"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4215"]]','+proj=longlat +ellps=intl +no_defs '); --- --- EPSG 4216 : Bermuda 1957 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4216,'EPSG',4216,'GEOGCS["Bermuda 1957",DATUM["Bermuda_1957",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6216"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4216"]]','+proj=longlat +ellps=clrk66 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4216,'EPSG',4216,'GEOGCS["Bermuda 1957",DATUM["Bermuda_1957",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-73,213,296,0,0,0,0],AUTHORITY["EPSG","6216"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4216"]]','+proj=longlat +ellps=clrk66 +towgs84=-73,213,296,0,0,0,0 +no_defs '); --- --- EPSG 4218 : Bogota 1975 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4218,'EPSG',4218,'GEOGCS["Bogota 1975",DATUM["Bogota_1975",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[307,304,-318,0,0,0,0],AUTHORITY["EPSG","6218"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4218"]]','+proj=longlat +ellps=intl +towgs84=307,304,-318,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4218,'EPSG',4218,'GEOGCS["Bogota 1975",DATUM["Bogota_1975",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[307,304,-318,0,0,0,0],AUTHORITY["EPSG","6218"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4218"]]','+proj=longlat +ellps=intl +towgs84=307,304,-318,0,0,0,0 +no_defs '); --- --- EPSG 4219 : Bukit Rimpah --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4219,'EPSG',4219,'GEOGCS["Bukit Rimpah",DATUM["Bukit_Rimpah",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-384,664,-48,0,0,0,0],AUTHORITY["EPSG","6219"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4219"]]','+proj=longlat +ellps=bessel +towgs84=-384,664,-48,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4219,'EPSG',4219,'GEOGCS["Bukit Rimpah",DATUM["Bukit_Rimpah",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-384,664,-48,0,0,0,0],AUTHORITY["EPSG","6219"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4219"]]','+proj=longlat +ellps=bessel +towgs84=-384,664,-48,0,0,0,0 +no_defs '); --- --- EPSG 4220 : Camacupa --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4220,'EPSG',4220,'GEOGCS["Camacupa",DATUM["Camacupa",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6220"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4220"]]','+proj=longlat +ellps=clrk80 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4220,'EPSG',4220,'GEOGCS["Camacupa",DATUM["Camacupa",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-50.9,-347.6,-231,0,0,0,0],AUTHORITY["EPSG","6220"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4220"]]','+proj=longlat +ellps=clrk80 +towgs84=-50.9,-347.6,-231,0,0,0,0 +no_defs '); --- --- EPSG 4221 : Campo Inchauspe --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4221,'EPSG',4221,'GEOGCS["Campo Inchauspe",DATUM["Campo_Inchauspe",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6221"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4221"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4221,'EPSG',4221,'GEOGCS["Campo Inchauspe",DATUM["Campo_Inchauspe",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-148,136,90,0,0,0,0],AUTHORITY["EPSG","6221"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4221"]]','+proj=longlat +ellps=intl +towgs84=-148,136,90,0,0,0,0 +no_defs '); --- --- EPSG 4222 : Cape --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4222,'EPSG',4222,'GEOGCS["Cape",DATUM["Cape",SPHEROID["Clarke 1880 (Arc)",6378249.145,293.4663077,AUTHORITY["EPSG","7013"]],AUTHORITY["EPSG","6222"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4222"]]','+proj=longlat +a=6378249.145 +b=6356514.966398753 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4222,'EPSG',4222,'GEOGCS["Cape",DATUM["Cape",SPHEROID["Clarke 1880 (Arc)",6378249.145,293.4663077,AUTHORITY["EPSG","7013"]],TOWGS84[-136,-108,-292,0,0,0,0],AUTHORITY["EPSG","6222"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4222"]]','+proj=longlat +a=6378249.145 +b=6356514.966398753 +towgs84=-136,-108,-292,0,0,0,0 +no_defs '); --- --- EPSG 4223 : Carthage --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4223,'EPSG',4223,'GEOGCS["Carthage",DATUM["Carthage",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],AUTHORITY["EPSG","6223"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4223"]]','+proj=longlat +a=6378249.2 +b=6356515 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4223,'EPSG',4223,'GEOGCS["Carthage",DATUM["Carthage",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-263,6,431,0,0,0,0],AUTHORITY["EPSG","6223"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4223"]]','+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-263,6,431,0,0,0,0 +no_defs '); --- --- EPSG 4224 : Chua --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4224,'EPSG',4224,'GEOGCS["Chua",DATUM["Chua",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6224"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4224"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4224,'EPSG',4224,'GEOGCS["Chua",DATUM["Chua",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-134,229,-29,0,0,0,0],AUTHORITY["EPSG","6224"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4224"]]','+proj=longlat +ellps=intl +towgs84=-134,229,-29,0,0,0,0 +no_defs '); --- --- EPSG 4225 : Corrego Alegre --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4225,'EPSG',4225,'GEOGCS["Corrego Alegre",DATUM["Corrego_Alegre",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-206,172,-6,0,0,0,0],AUTHORITY["EPSG","6225"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4225"]]','+proj=longlat +ellps=intl +towgs84=-206,172,-6,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4225,'EPSG',4225,'GEOGCS["Corrego Alegre",DATUM["Corrego_Alegre",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-206,172,-6,0,0,0,0],AUTHORITY["EPSG","6225"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4225"]]','+proj=longlat +ellps=intl +towgs84=-206,172,-6,0,0,0,0 +no_defs '); --- --- EPSG 4226 : Cote d'Ivoire --- @@ -622,7 +622,7 @@ --- --- EPSG 4227 : Deir ez Zor --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4227,'EPSG',4227,'GEOGCS["Deir ez Zor",DATUM["Deir_ez_Zor",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],AUTHORITY["EPSG","6227"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4227"]]','+proj=longlat +a=6378249.2 +b=6356515 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4227,'EPSG',4227,'GEOGCS["Deir ez Zor",DATUM["Deir_ez_Zor",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-190.421,8.532,238.69,0,0,0,0],AUTHORITY["EPSG","6227"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4227"]]','+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-190.421,8.532,238.69,0,0,0,0 +no_defs '); --- --- EPSG 4228 : Douala --- @@ -630,23 +630,23 @@ --- --- EPSG 4229 : Egypt 1907 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4229,'EPSG',4229,'GEOGCS["Egypt 1907",DATUM["Egypt_1907",SPHEROID["Helmert 1906",6378200,298.3,AUTHORITY["EPSG","7020"]],AUTHORITY["EPSG","6229"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4229"]]','+proj=longlat +ellps=helmert +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4229,'EPSG',4229,'GEOGCS["Egypt 1907",DATUM["Egypt_1907",SPHEROID["Helmert 1906",6378200,298.3,AUTHORITY["EPSG","7020"]],TOWGS84[-130,110,-13,0,0,0,0],AUTHORITY["EPSG","6229"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4229"]]','+proj=longlat +ellps=helmert +towgs84=-130,110,-13,0,0,0,0 +no_defs '); --- --- EPSG 4230 : ED50 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4230,'EPSG',4230,'GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4230,'EPSG',4230,'GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-87,-98,-121,0,0,0,0],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]]','+proj=longlat +ellps=intl +towgs84=-87,-98,-121,0,0,0,0 +no_defs '); --- --- EPSG 4231 : ED87 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4231,'EPSG',4231,'GEOGCS["ED87",DATUM["European_Datum_1987",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6231"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4231"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4231,'EPSG',4231,'GEOGCS["ED87",DATUM["European_Datum_1987",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-83.11,-97.38,-117.22,0.00569291,-0.0446976,0.0442851,0.1218],AUTHORITY["EPSG","6231"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4231"]]','+proj=longlat +ellps=intl +towgs84=-83.11,-97.38,-117.22,0.00569291,-0.0446976,0.0442851,0.1218 +no_defs '); --- --- EPSG 4232 : Fahud --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4232,'EPSG',4232,'GEOGCS["Fahud",DATUM["Fahud",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6232"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4232"]]','+proj=longlat +ellps=clrk80 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4232,'EPSG',4232,'GEOGCS["Fahud",DATUM["Fahud",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-346,-1,224,0,0,0,0],AUTHORITY["EPSG","6232"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4232"]]','+proj=longlat +ellps=clrk80 +towgs84=-346,-1,224,0,0,0,0 +no_defs '); --- --- EPSG 4233 : Gandajika 1970 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4233,'EPSG',4233,'GEOGCS["Gandajika 1970",DATUM["Gandajika_1970",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-133,-321,50,0,0,0,0],AUTHORITY["EPSG","6233"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4233"]]','+proj=longlat +ellps=intl +towgs84=-133,-321,50,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4233,'EPSG',4233,'GEOGCS["Gandajika 1970",DATUM["Gandajika_1970",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-133,-321,50,0,0,0,0],AUTHORITY["EPSG","6233"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4233"]]','+proj=longlat +ellps=intl +towgs84=-133,-321,50,0,0,0,0 +no_defs '); --- --- EPSG 4234 : Garoua --- @@ -658,99 +658,99 @@ --- --- EPSG 4236 : Hu Tzu Shan 1950 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4236,'EPSG',4236,'GEOGCS["Hu Tzu Shan 1950",DATUM["Hu_Tzu_Shan_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-637,-549,-203,0,0,0,0],AUTHORITY["EPSG","6236"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4236"]]','+proj=longlat +ellps=intl +towgs84=-637,-549,-203,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4236,'EPSG',4236,'GEOGCS["Hu Tzu Shan 1950",DATUM["Hu_Tzu_Shan_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-637,-549,-203,0,0,0,0],AUTHORITY["EPSG","6236"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4236"]]','+proj=longlat +ellps=intl +towgs84=-637,-549,-203,0,0,0,0 +no_defs '); --- --- EPSG 4237 : HD72 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4237,'EPSG',4237,'GEOGCS["HD72",DATUM["Hungarian_Datum_1972",SPHEROID["GRS 1967",6378160,298.247167427,AUTHORITY["EPSG","7036"]],AUTHORITY["EPSG","6237"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4237"]]','+proj=longlat +ellps=GRS67 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4237,'EPSG',4237,'GEOGCS["HD72",DATUM["Hungarian_Datum_1972",SPHEROID["GRS 1967",6378160,298.247167427,AUTHORITY["EPSG","7036"]],TOWGS84[52.17,-71.82,-14.9,0,0,0,0],AUTHORITY["EPSG","6237"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4237"]]','+proj=longlat +ellps=GRS67 +towgs84=52.17,-71.82,-14.9,0,0,0,0 +no_defs '); --- --- EPSG 4238 : ID74 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4238,'EPSG',4238,'GEOGCS["ID74",DATUM["Indonesian_Datum_1974",SPHEROID["Indonesian National Spheroid",6378160,298.247,AUTHORITY["EPSG","7021"]],AUTHORITY["EPSG","6238"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4238"]]','+proj=longlat +a=6378160 +b=6356774.50408554 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4238,'EPSG',4238,'GEOGCS["ID74",DATUM["Indonesian_Datum_1974",SPHEROID["Indonesian National Spheroid",6378160,298.247,AUTHORITY["EPSG","7021"]],TOWGS84[-24,-15,5,0,0,0,0],AUTHORITY["EPSG","6238"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4238"]]','+proj=longlat +a=6378160 +b=6356774.50408554 +towgs84=-24,-15,5,0,0,0,0 +no_defs '); --- --- EPSG 4239 : Indian 1954 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4239,'EPSG',4239,'GEOGCS["Indian 1954",DATUM["Indian_1954",SPHEROID["Everest 1830 (1937 Adjustment)",6377276.345,300.8017,AUTHORITY["EPSG","7015"]],TOWGS84[217,823,299,0,0,0,0],AUTHORITY["EPSG","6239"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4239"]]','+proj=longlat +a=6377276.345 +b=6356075.41314024 +towgs84=217,823,299,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4239,'EPSG',4239,'GEOGCS["Indian 1954",DATUM["Indian_1954",SPHEROID["Everest 1830 (1937 Adjustment)",6377276.345,300.8017,AUTHORITY["EPSG","7015"]],TOWGS84[217,823,299,0,0,0,0],AUTHORITY["EPSG","6239"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4239"]]','+proj=longlat +a=6377276.345 +b=6356075.41314024 +towgs84=217,823,299,0,0,0,0 +no_defs '); --- --- EPSG 4240 : Indian 1975 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4240,'EPSG',4240,'GEOGCS["Indian 1975",DATUM["Indian_1975",SPHEROID["Everest 1830 (1937 Adjustment)",6377276.345,300.8017,AUTHORITY["EPSG","7015"]],AUTHORITY["EPSG","6240"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4240"]]','+proj=longlat +a=6377276.345 +b=6356075.41314024 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4240,'EPSG',4240,'GEOGCS["Indian 1975",DATUM["Indian_1975",SPHEROID["Everest 1830 (1937 Adjustment)",6377276.345,300.8017,AUTHORITY["EPSG","7015"]],TOWGS84[210,814,289,0,0,0,0],AUTHORITY["EPSG","6240"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4240"]]','+proj=longlat +a=6377276.345 +b=6356075.41314024 +towgs84=210,814,289,0,0,0,0 +no_defs '); --- --- EPSG 4241 : Jamaica 1875 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4241,'EPSG',4241,'GEOGCS["Jamaica 1875",DATUM["Jamaica_1875",SPHEROID["Clarke 1880",6378249.144808011,293.4663076556349,AUTHORITY["EPSG","7034"]],AUTHORITY["EPSG","6241"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4241"]]','+proj=longlat +a=6378249.144808011 +b=6356514.966204134 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4241,'EPSG',4241,'GEOGCS["Jamaica 1875",DATUM["Jamaica_1875",SPHEROID["Clarke 1880",6378249.144808011,293.4663076556349,AUTHORITY["EPSG","7034"]],AUTHORITY["EPSG","6241"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4241"]]','+proj=longlat +a=6378249.144808011 +b=6356514.966204134 +no_defs '); --- --- EPSG 4242 : JAD69 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4242,'EPSG',4242,'GEOGCS["JAD69",DATUM["Jamaica_1969",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6242"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4242"]]','+proj=longlat +ellps=clrk66 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4242,'EPSG',4242,'GEOGCS["JAD69",DATUM["Jamaica_1969",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[70,207,389.5,0,0,0,0],AUTHORITY["EPSG","6242"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4242"]]','+proj=longlat +ellps=clrk66 +towgs84=70,207,389.5,0,0,0,0 +no_defs '); --- --- EPSG 4243 : Kalianpur 1880 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4243,'EPSG',4243,'GEOGCS["Kalianpur 1880",DATUM["Kalianpur_1880",SPHEROID["Everest (1830 Definition)",6377299.36559538,300.8017255433552,AUTHORITY["EPSG","7042"]],AUTHORITY["EPSG","6243"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4243"]]','+proj=longlat +a=6377299.36559538 +b=6356098.359005156 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4243,'EPSG',4243,'GEOGCS["Kalianpur 1880",DATUM["Kalianpur_1880",SPHEROID["Everest (1830 Definition)",6377299.36559538,300.8017255433552,AUTHORITY["EPSG","7042"]],AUTHORITY["EPSG","6243"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4243"]]','+proj=longlat +a=6377299.36559538 +b=6356098.359005156 +no_defs '); --- --- EPSG 4244 : Kandawala --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4244,'EPSG',4244,'GEOGCS["Kandawala",DATUM["Kandawala",SPHEROID["Everest 1830 (1937 Adjustment)",6377276.345,300.8017,AUTHORITY["EPSG","7015"]],TOWGS84[-97,787,86,0,0,0,0],AUTHORITY["EPSG","6244"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4244"]]','+proj=longlat +a=6377276.345 +b=6356075.41314024 +towgs84=-97,787,86,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4244,'EPSG',4244,'GEOGCS["Kandawala",DATUM["Kandawala",SPHEROID["Everest 1830 (1937 Adjustment)",6377276.345,300.8017,AUTHORITY["EPSG","7015"]],TOWGS84[-97,787,86,0,0,0,0],AUTHORITY["EPSG","6244"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4244"]]','+proj=longlat +a=6377276.345 +b=6356075.41314024 +towgs84=-97,787,86,0,0,0,0 +no_defs '); --- --- EPSG 4245 : Kertau 1968 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4245,'EPSG',4245,'GEOGCS["Kertau 1968",DATUM["Kertau_1968",SPHEROID["Everest 1830 Modified",6377304.063,300.8017,AUTHORITY["EPSG","7018"]],TOWGS84[-11,851,5,0,0,0,0],AUTHORITY["EPSG","6245"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4245"]]','+proj=longlat +a=6377304.063 +b=6356103.038993155 +towgs84=-11,851,5,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4245,'EPSG',4245,'GEOGCS["Kertau 1968",DATUM["Kertau_1968",SPHEROID["Everest 1830 Modified",6377304.063,300.8017,AUTHORITY["EPSG","7018"]],TOWGS84[-11,851,5,0,0,0,0],AUTHORITY["EPSG","6245"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4245"]]','+proj=longlat +a=6377304.063 +b=6356103.038993155 +towgs84=-11,851,5,0,0,0,0 +no_defs '); --- --- EPSG 4246 : KOC --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4246,'EPSG',4246,'GEOGCS["KOC",DATUM["Kuwait_Oil_Company",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-294.7,-200.1,525.5,0,0,0,0],AUTHORITY["EPSG","6246"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4246"]]','+proj=longlat +ellps=clrk80 +towgs84=-294.7,-200.1,525.5,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4246,'EPSG',4246,'GEOGCS["KOC",DATUM["Kuwait_Oil_Company",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-294.7,-200.1,525.5,0,0,0,0],AUTHORITY["EPSG","6246"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4246"]]','+proj=longlat +ellps=clrk80 +towgs84=-294.7,-200.1,525.5,0,0,0,0 +no_defs '); --- --- EPSG 4247 : La Canoa --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4247,'EPSG',4247,'GEOGCS["La Canoa",DATUM["La_Canoa",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-273.5,110.6,-357.9,0,0,0,0],AUTHORITY["EPSG","6247"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4247"]]','+proj=longlat +ellps=intl +towgs84=-273.5,110.6,-357.9,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4247,'EPSG',4247,'GEOGCS["La Canoa",DATUM["La_Canoa",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-273.5,110.6,-357.9,0,0,0,0],AUTHORITY["EPSG","6247"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4247"]]','+proj=longlat +ellps=intl +towgs84=-273.5,110.6,-357.9,0,0,0,0 +no_defs '); --- --- EPSG 4248 : PSAD56 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4248,'EPSG',4248,'GEOGCS["PSAD56",DATUM["Provisional_South_American_Datum_1956",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6248"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4248"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4248,'EPSG',4248,'GEOGCS["PSAD56",DATUM["Provisional_South_American_Datum_1956",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY["EPSG","6248"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4248"]]','+proj=longlat +ellps=intl +towgs84=-288,175,-376,0,0,0,0 +no_defs '); --- --- EPSG 4249 : Lake --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4249,'EPSG',4249,'GEOGCS["Lake",DATUM["Lake",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6249"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4249"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4249,'EPSG',4249,'GEOGCS["Lake",DATUM["Lake",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6249"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4249"]]','+proj=longlat +ellps=intl +no_defs '); --- --- EPSG 4250 : Leigon --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4250,'EPSG',4250,'GEOGCS["Leigon",DATUM["Leigon",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-130,29,364,0,0,0,0],AUTHORITY["EPSG","6250"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4250"]]','+proj=longlat +ellps=clrk80 +towgs84=-130,29,364,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4250,'EPSG',4250,'GEOGCS["Leigon",DATUM["Leigon",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-130,29,364,0,0,0,0],AUTHORITY["EPSG","6250"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4250"]]','+proj=longlat +ellps=clrk80 +towgs84=-130,29,364,0,0,0,0 +no_defs '); --- --- EPSG 4251 : Liberia 1964 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4251,'EPSG',4251,'GEOGCS["Liberia 1964",DATUM["Liberia_1964",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-90,40,88,0,0,0,0],AUTHORITY["EPSG","6251"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4251"]]','+proj=longlat +ellps=clrk80 +towgs84=-90,40,88,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4251,'EPSG',4251,'GEOGCS["Liberia 1964",DATUM["Liberia_1964",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-90,40,88,0,0,0,0],AUTHORITY["EPSG","6251"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4251"]]','+proj=longlat +ellps=clrk80 +towgs84=-90,40,88,0,0,0,0 +no_defs '); --- --- EPSG 4252 : Lome --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4252,'EPSG',4252,'GEOGCS["Lome",DATUM["Lome",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],AUTHORITY["EPSG","6252"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4252"]]','+proj=longlat +a=6378249.2 +b=6356515 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4252,'EPSG',4252,'GEOGCS["Lome",DATUM["Lome",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],AUTHORITY["EPSG","6252"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4252"]]','+proj=longlat +a=6378249.2 +b=6356515 +no_defs '); --- --- EPSG 4253 : Luzon 1911 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4253,'EPSG',4253,'GEOGCS["Luzon 1911",DATUM["Luzon_1911",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6253"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4253"]]','+proj=longlat +ellps=clrk66 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4253,'EPSG',4253,'GEOGCS["Luzon 1911",DATUM["Luzon_1911",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-133,-77,-51,0,0,0,0],AUTHORITY["EPSG","6253"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4253"]]','+proj=longlat +ellps=clrk66 +towgs84=-133,-77,-51,0,0,0,0 +no_defs '); --- --- EPSG 4254 : Hito XVIII 1963 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4254,'EPSG',4254,'GEOGCS["Hito XVIII 1963",DATUM["Hito_XVIII_1963",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6254"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4254"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4254,'EPSG',4254,'GEOGCS["Hito XVIII 1963",DATUM["Hito_XVIII_1963",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[16,196,93,0,0,0,0],AUTHORITY["EPSG","6254"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4254"]]','+proj=longlat +ellps=intl +towgs84=16,196,93,0,0,0,0 +no_defs '); --- --- EPSG 4255 : Herat North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4255,'EPSG',4255,'GEOGCS["Herat North",DATUM["Herat_North",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-333,-222,114,0,0,0,0],AUTHORITY["EPSG","6255"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4255"]]','+proj=longlat +ellps=intl +towgs84=-333,-222,114,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4255,'EPSG',4255,'GEOGCS["Herat North",DATUM["Herat_North",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-333,-222,114,0,0,0,0],AUTHORITY["EPSG","6255"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4255"]]','+proj=longlat +ellps=intl +towgs84=-333,-222,114,0,0,0,0 +no_defs '); --- --- EPSG 4256 : Mahe 1971 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4256,'EPSG',4256,'GEOGCS["Mahe 1971",DATUM["Mahe_1971",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[41,-220,-134,0,0,0,0],AUTHORITY["EPSG","6256"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4256"]]','+proj=longlat +ellps=clrk80 +towgs84=41,-220,-134,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4256,'EPSG',4256,'GEOGCS["Mahe 1971",DATUM["Mahe_1971",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[41,-220,-134,0,0,0,0],AUTHORITY["EPSG","6256"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4256"]]','+proj=longlat +ellps=clrk80 +towgs84=41,-220,-134,0,0,0,0 +no_defs '); --- --- EPSG 4257 : Makassar --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4257,'EPSG',4257,'GEOGCS["Makassar",DATUM["Makassar",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-587.8,519.75,145.76,0,0,0,0],AUTHORITY["EPSG","6257"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4257"]]','+proj=longlat +ellps=bessel +towgs84=-587.8,519.75,145.76,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4257,'EPSG',4257,'GEOGCS["Makassar",DATUM["Makassar",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-587.8,519.75,145.76,0,0,0,0],AUTHORITY["EPSG","6257"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4257"]]','+proj=longlat +ellps=bessel +towgs84=-587.8,519.75,145.76,0,0,0,0 +no_defs '); --- --- EPSG 4258 : ETRS89 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4258,'EPSG',4258,'GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]]','+proj=longlat +ellps=GRS80 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4258,'EPSG',4258,'GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4259 : Malongo 1987 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4259,'EPSG',4259,'GEOGCS["Malongo 1987",DATUM["Malongo_1987",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6259"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4259"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4259,'EPSG',4259,'GEOGCS["Malongo 1987",DATUM["Malongo_1987",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-254.1,-5.36,-100.29,0,0,0,0],AUTHORITY["EPSG","6259"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4259"]]','+proj=longlat +ellps=intl +towgs84=-254.1,-5.36,-100.29,0,0,0,0 +no_defs '); --- --- EPSG 4260 : Manoca --- @@ -758,107 +758,107 @@ --- --- EPSG 4261 : Merchich --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4261,'EPSG',4261,'GEOGCS["Merchich",DATUM["Merchich",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[31,146,47,0,0,0,0],AUTHORITY["EPSG","6261"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4261"]]','+proj=longlat +a=6378249.2 +b=6356515 +towgs84=31,146,47,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4261,'EPSG',4261,'GEOGCS["Merchich",DATUM["Merchich",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[31,146,47,0,0,0,0],AUTHORITY["EPSG","6261"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4261"]]','+proj=longlat +a=6378249.2 +b=6356515 +towgs84=31,146,47,0,0,0,0 +no_defs '); --- --- EPSG 4262 : Massawa --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4262,'EPSG',4262,'GEOGCS["Massawa",DATUM["Massawa",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[639,405,60,0,0,0,0],AUTHORITY["EPSG","6262"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4262"]]','+proj=longlat +ellps=bessel +towgs84=639,405,60,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4262,'EPSG',4262,'GEOGCS["Massawa",DATUM["Massawa",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[639,405,60,0,0,0,0],AUTHORITY["EPSG","6262"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4262"]]','+proj=longlat +ellps=bessel +towgs84=639,405,60,0,0,0,0 +no_defs '); --- --- EPSG 4263 : Minna --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4263,'EPSG',4263,'GEOGCS["Minna",DATUM["Minna",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6263"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4263"]]','+proj=longlat +ellps=clrk80 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4263,'EPSG',4263,'GEOGCS["Minna",DATUM["Minna",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-92,-93,122,0,0,0,0],AUTHORITY["EPSG","6263"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4263"]]','+proj=longlat +ellps=clrk80 +towgs84=-92,-93,122,0,0,0,0 +no_defs '); --- --- EPSG 4264 : Mhast --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4264,'EPSG',4264,'GEOGCS["Mhast",DATUM["Mhast",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-252.95,-4.11,-96.38,0,0,0,0],AUTHORITY["EPSG","6264"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4264"]]','+proj=longlat +ellps=intl +towgs84=-252.95,-4.11,-96.38,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4264,'EPSG',4264,'GEOGCS["Mhast",DATUM["Mhast",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-252.95,-4.11,-96.38,0,0,0,0],AUTHORITY["EPSG","6264"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4264"]]','+proj=longlat +ellps=intl +towgs84=-252.95,-4.11,-96.38,0,0,0,0 +no_defs '); --- --- EPSG 4265 : Monte Mario --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4265,'EPSG',4265,'GEOGCS["Monte Mario",DATUM["Monte_Mario",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6265"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4265"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4265,'EPSG',4265,'GEOGCS["Monte Mario",DATUM["Monte_Mario",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68],AUTHORITY["EPSG","6265"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4265"]]','+proj=longlat +ellps=intl +towgs84=-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68 +no_defs '); --- --- EPSG 4266 : M'poraloko --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4266,'EPSG',4266,'GEOGCS["M''poraloko",DATUM["M_poraloko",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],AUTHORITY["EPSG","6266"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4266"]]','+proj=longlat +a=6378249.2 +b=6356515 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4266,'EPSG',4266,'GEOGCS["M''poraloko",DATUM["M_poraloko",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-74,-130,42,0,0,0,0],AUTHORITY["EPSG","6266"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4266"]]','+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-74,-130,42,0,0,0,0 +no_defs '); --- --- EPSG 4267 : NAD27 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4267,'EPSG',4267,'GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]]','+proj=longlat +ellps=clrk66 +datum=NAD27 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4267,'EPSG',4267,'GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]]','+proj=longlat +datum=NAD27 +no_defs '); --- --- EPSG 4268 : NAD27 Michigan --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4268,'EPSG',4268,'GEOGCS["NAD27 Michigan",DATUM["NAD_Michigan",SPHEROID["Clarke 1866 Michigan",6378450.047548896,294.9786971646739,AUTHORITY["EPSG","7009"]],AUTHORITY["EPSG","6268"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4268"]]','+proj=longlat +a=6378450.047548896 +b=6356826.621488444 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4268,'EPSG',4268,'GEOGCS["NAD27 Michigan",DATUM["NAD_Michigan",SPHEROID["Clarke 1866 Michigan",6378450.047548896,294.9786971646739,AUTHORITY["EPSG","7009"]],AUTHORITY["EPSG","6268"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4268"]]','+proj=longlat +a=6378450.047548896 +b=6356826.621488444 +no_defs '); --- --- EPSG 4269 : NAD83 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4269,'EPSG',4269,'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"]]','+proj=longlat +ellps=GRS80 +datum=NAD83 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4269,'EPSG',4269,'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"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4270 : Nahrwan 1967 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4270,'EPSG',4270,'GEOGCS["Nahrwan 1967",DATUM["Nahrwan_1967",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6270"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4270"]]','+proj=longlat +ellps=clrk80 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4270,'EPSG',4270,'GEOGCS["Nahrwan 1967",DATUM["Nahrwan_1967",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-243,-192,477,0,0,0,0],AUTHORITY["EPSG","6270"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4270"]]','+proj=longlat +ellps=clrk80 +towgs84=-243,-192,477,0,0,0,0 +no_defs '); --- --- EPSG 4271 : Naparima 1972 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4271,'EPSG',4271,'GEOGCS["Naparima 1972",DATUM["Naparima_1972",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6271"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4271"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4271,'EPSG',4271,'GEOGCS["Naparima 1972",DATUM["Naparima_1972",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-10,375,165,0,0,0,0],AUTHORITY["EPSG","6271"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4271"]]','+proj=longlat +ellps=intl +towgs84=-10,375,165,0,0,0,0 +no_defs '); --- --- EPSG 4272 : NZGD49 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4272,'EPSG',4272,'GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]]','+proj=longlat +ellps=intl +datum=nzgd49 +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4272,'EPSG',4272,'GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]]','+proj=longlat +ellps=intl +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +no_defs '); --- --- EPSG 4273 : NGO 1948 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4273,'EPSG',4273,'GEOGCS["NGO 1948",DATUM["NGO_1948",SPHEROID["Bessel Modified",6377492.018,299.1528128,AUTHORITY["EPSG","7005"]],TOWGS84[278.3,93,474.5,7.889,0.05,-6.61,6.21],AUTHORITY["EPSG","6273"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4273"]]','+proj=longlat +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4273,'EPSG',4273,'GEOGCS["NGO 1948",DATUM["NGO_1948",SPHEROID["Bessel Modified",6377492.018,299.1528128,AUTHORITY["EPSG","7005"]],TOWGS84[278.3,93,474.5,7.889,0.05,-6.61,6.21],AUTHORITY["EPSG","6273"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4273"]]','+proj=longlat +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +no_defs '); --- --- EPSG 4274 : Datum 73 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4274,'EPSG',4274,'GEOGCS["Datum 73",DATUM["Datum_73",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6274"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4274"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4274,'EPSG',4274,'GEOGCS["Datum 73",DATUM["Datum_73",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-223.237,110.193,36.649,0,0,0,0],AUTHORITY["EPSG","6274"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4274"]]','+proj=longlat +ellps=intl +towgs84=-223.237,110.193,36.649,0,0,0,0 +no_defs '); --- --- EPSG 4275 : NTF --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4275,'EPSG',4275,'GEOGCS["NTF",DATUM["Nouvelle_Triangulation_Francaise",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-168,-60,320,0,0,0,0],AUTHORITY["EPSG","6275"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4275"]]','+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4275,'EPSG',4275,'GEOGCS["NTF",DATUM["Nouvelle_Triangulation_Francaise",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-168,-60,320,0,0,0,0],AUTHORITY["EPSG","6275"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4275"]]','+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +no_defs '); --- --- EPSG 4276 : NSWC 9Z-2 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4276,'EPSG',4276,'GEOGCS["NSWC 9Z-2",DATUM["NSWC_9Z_2",SPHEROID["NWL 9D",6378145,298.25,AUTHORITY["EPSG","7025"]],AUTHORITY["EPSG","6276"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4276"]]','+proj=longlat +ellps=WGS66 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4276,'EPSG',4276,'GEOGCS["NSWC 9Z-2",DATUM["NSWC_9Z_2",SPHEROID["NWL 9D",6378145,298.25,AUTHORITY["EPSG","7025"]],AUTHORITY["EPSG","6276"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4276"]]','+proj=longlat +ellps=WGS66 +no_defs '); --- --- EPSG 4277 : OSGB 1936 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4277,'EPSG',4277,'GEOGCS["OSGB 1936",DATUM["OSGB_1936",SPHEROID["Airy 1830",6377563.396,299.3249646,AUTHORITY["EPSG","7001"]],AUTHORITY["EPSG","6277"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4277"]]','+proj=longlat +ellps=airy +datum=OSGB36 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4277,'EPSG',4277,'GEOGCS["OSGB 1936",DATUM["OSGB_1936",SPHEROID["Airy 1830",6377563.396,299.3249646,AUTHORITY["EPSG","7001"]],TOWGS84[446.448,-125.157,542.06,0.15,0.247,0.842,-20.489],AUTHORITY["EPSG","6277"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4277"]]','+proj=longlat +ellps=airy +towgs84=446.448,-125.157,542.06,0.15,0.247,0.842,-20.489 +no_defs '); --- --- EPSG 4278 : OSGB70 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4278,'EPSG',4278,'GEOGCS["OSGB70",DATUM["OSGB_1970_SN",SPHEROID["Airy 1830",6377563.396,299.3249646,AUTHORITY["EPSG","7001"]],AUTHORITY["EPSG","6278"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4278"]]','+proj=longlat +ellps=airy +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4278,'EPSG',4278,'GEOGCS["OSGB70",DATUM["OSGB_1970_SN",SPHEROID["Airy 1830",6377563.396,299.3249646,AUTHORITY["EPSG","7001"]],AUTHORITY["EPSG","6278"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4278"]]','+proj=longlat +ellps=airy +no_defs '); --- --- EPSG 4279 : OS(SN)80 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4279,'EPSG',4279,'GEOGCS["OS(SN)80",DATUM["OS_SN_1980",SPHEROID["Airy 1830",6377563.396,299.3249646,AUTHORITY["EPSG","7001"]],AUTHORITY["EPSG","6279"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4279"]]','+proj=longlat +ellps=airy +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4279,'EPSG',4279,'GEOGCS["OS(SN)80",DATUM["OS_SN_1980",SPHEROID["Airy 1830",6377563.396,299.3249646,AUTHORITY["EPSG","7001"]],AUTHORITY["EPSG","6279"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4279"]]','+proj=longlat +ellps=airy +no_defs '); --- --- EPSG 4280 : Padang --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4280,'EPSG',4280,'GEOGCS["Padang",DATUM["Padang_1884",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6280"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4280"]]','+proj=longlat +ellps=bessel +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4280,'EPSG',4280,'GEOGCS["Padang",DATUM["Padang_1884",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6280"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4280"]]','+proj=longlat +ellps=bessel +no_defs '); --- --- EPSG 4281 : Palestine 1923 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4281,'EPSG',4281,'GEOGCS["Palestine 1923",DATUM["Palestine_1923",SPHEROID["Clarke 1880 (Benoit)",6378300.789,293.4663155389802,AUTHORITY["EPSG","7010"]],TOWGS84[-275.722,94.7824,340.894,-8.001,-4.42,-11.821,1],AUTHORITY["EPSG","6281"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4281"]]','+proj=longlat +a=6378300.789 +b=6356566.435 +towgs84=-275.722,94.7824,340.894,-8.001,-4.42,-11.821,1 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4281,'EPSG',4281,'GEOGCS["Palestine 1923",DATUM["Palestine_1923",SPHEROID["Clarke 1880 (Benoit)",6378300.789,293.4663155389802,AUTHORITY["EPSG","7010"]],TOWGS84[-275.722,94.7824,340.894,-8.001,-4.42,-11.821,1],AUTHORITY["EPSG","6281"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4281"]]','+proj=longlat +a=6378300.789 +b=6356566.435 +towgs84=-275.722,94.7824,340.894,-8.001,-4.42,-11.821,1 +no_defs '); --- --- EPSG 4282 : Pointe Noire --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4282,'EPSG',4282,'GEOGCS["Pointe Noire",DATUM["Congo_1960_Pointe_Noire",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],AUTHORITY["EPSG","6282"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4282"]]','+proj=longlat +a=6378249.2 +b=6356515 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4282,'EPSG',4282,'GEOGCS["Pointe Noire",DATUM["Congo_1960_Pointe_Noire",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-148,51,-291,0,0,0,0],AUTHORITY["EPSG","6282"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4282"]]','+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-148,51,-291,0,0,0,0 +no_defs '); --- --- EPSG 4283 : GDA94 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4283,'EPSG',4283,'GEOGCS["GDA94",DATUM["Geocentric_Datum_of_Australia_1994",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6283"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4283"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4283,'EPSG',4283,'GEOGCS["GDA94",DATUM["Geocentric_Datum_of_Australia_1994",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6283"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4283"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4284 : Pulkovo 1942 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4284,'EPSG',4284,'GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]]','+proj=longlat +ellps=krass +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4284,'EPSG',4284,'GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]]','+proj=longlat +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +no_defs '); --- --- EPSG 4285 : Qatar 1974 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4285,'EPSG',4285,'GEOGCS["Qatar 1974",DATUM["Qatar_1974",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6285"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4285"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4285,'EPSG',4285,'GEOGCS["Qatar 1974",DATUM["Qatar_1974",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-128,-283,22,0,0,0,0],AUTHORITY["EPSG","6285"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4285"]]','+proj=longlat +ellps=intl +towgs84=-128,-283,22,0,0,0,0 +no_defs '); --- --- EPSG 4286 : Qatar 1948 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4286,'EPSG',4286,'GEOGCS["Qatar 1948",DATUM["Qatar_1948",SPHEROID["Helmert 1906",6378200,298.3,AUTHORITY["EPSG","7020"]],AUTHORITY["EPSG","6286"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4286"]]','+proj=longlat +ellps=helmert +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4286,'EPSG',4286,'GEOGCS["Qatar 1948",DATUM["Qatar_1948",SPHEROID["Helmert 1906",6378200,298.3,AUTHORITY["EPSG","7020"]],AUTHORITY["EPSG","6286"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4286"]]','+proj=longlat +ellps=helmert +no_defs '); --- --- EPSG 4287 : Qornoq --- @@ -866,31 +866,31 @@ --- --- EPSG 4288 : Loma Quintana --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4288,'EPSG',4288,'GEOGCS["Loma Quintana",DATUM["Loma_Quintana",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6288"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4288"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4288,'EPSG',4288,'GEOGCS["Loma Quintana",DATUM["Loma_Quintana",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6288"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4288"]]','+proj=longlat +ellps=intl +no_defs '); --- --- EPSG 4289 : Amersfoort --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4289,'EPSG',4289,'GEOGCS["Amersfoort",DATUM["Amersfoort",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6289"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4289"]]','+proj=longlat +ellps=bessel +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4289,'EPSG',4289,'GEOGCS["Amersfoort",DATUM["Amersfoort",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[565.417,50.3319,465.552,-0.398957,0.343988,-1.8774,4.0725],AUTHORITY["EPSG","6289"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4289"]]','+proj=longlat +ellps=bessel +towgs84=565.417,50.3319,465.552,-0.398957,0.343988,-1.8774,4.0725 +no_defs '); --- --- EPSG 4291 : SAD69 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4291,'EPSG',4291,'GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967",6378160,298.247167427,AUTHORITY["EPSG","7036"]],AUTHORITY["EPSG","6291"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4291"]]','+proj=longlat +ellps=GRS67 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4291,'EPSG',4291,'GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967",6378160,298.247167427,AUTHORITY["EPSG","7036"]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY["EPSG","6291"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4291"]]','+proj=longlat +ellps=GRS67 +towgs84=-57,1,-41,0,0,0,0 +no_defs '); --- --- EPSG 4292 : Sapper Hill 1943 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4292,'EPSG',4292,'GEOGCS["Sapper Hill 1943",DATUM["Sapper_Hill_1943",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-355,21,72,0,0,0,0],AUTHORITY["EPSG","6292"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4292"]]','+proj=longlat +ellps=intl +towgs84=-355,21,72,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4292,'EPSG',4292,'GEOGCS["Sapper Hill 1943",DATUM["Sapper_Hill_1943",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-355,21,72,0,0,0,0],AUTHORITY["EPSG","6292"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4292"]]','+proj=longlat +ellps=intl +towgs84=-355,21,72,0,0,0,0 +no_defs '); --- --- EPSG 4293 : Schwarzeck --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4293,'EPSG',4293,'GEOGCS["Schwarzeck",DATUM["Schwarzeck",SPHEROID["Bessel Namibia (GLM)",6377483.865280419,299.1528128,AUTHORITY["EPSG","7046"]],AUTHORITY["EPSG","6293"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4293"]]','+proj=longlat +ellps=bess_nam +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4293,'EPSG',4293,'GEOGCS["Schwarzeck",DATUM["Schwarzeck",SPHEROID["Bessel Namibia (GLM)",6377483.865280419,299.1528128,AUTHORITY["EPSG","7046"]],TOWGS84[616,97,-251,0,0,0,0],AUTHORITY["EPSG","6293"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4293"]]','+proj=longlat +ellps=bess_nam +towgs84=616,97,-251,0,0,0,0 +no_defs '); --- --- EPSG 4294 : Segora --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4294,'EPSG',4294,'GEOGCS["Segora",DATUM["Segora",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6294"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4294"]]','+proj=longlat +ellps=bessel +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4294,'EPSG',4294,'GEOGCS["Segora",DATUM["Segora",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-403,684,41,0,0,0,0],AUTHORITY["EPSG","6294"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4294"]]','+proj=longlat +ellps=bessel +towgs84=-403,684,41,0,0,0,0 +no_defs '); --- --- EPSG 4295 : Serindung --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4295,'EPSG',4295,'GEOGCS["Serindung",DATUM["Serindung",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6295"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4295"]]','+proj=longlat +ellps=bessel +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4295,'EPSG',4295,'GEOGCS["Serindung",DATUM["Serindung",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6295"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4295"]]','+proj=longlat +ellps=bessel +no_defs '); --- --- EPSG 4296 : Sudan --- @@ -898,751 +898,779 @@ --- --- EPSG 4297 : Tananarive --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4297,'EPSG',4297,'GEOGCS["Tananarive",DATUM["Tananarive_1925",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-189,-242,-91,0,0,0,0],AUTHORITY["EPSG","6297"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4297"]]','+proj=longlat +ellps=intl +towgs84=-189,-242,-91,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4297,'EPSG',4297,'GEOGCS["Tananarive",DATUM["Tananarive_1925",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-189,-242,-91,0,0,0,0],AUTHORITY["EPSG","6297"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4297"]]','+proj=longlat +ellps=intl +towgs84=-189,-242,-91,0,0,0,0 +no_defs '); --- --- EPSG 4298 : Timbalai 1948 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4298,'EPSG',4298,'GEOGCS["Timbalai 1948",DATUM["Timbalai_1948",SPHEROID["Everest 1830 (1967 Definition)",6377298.556,300.8017,AUTHORITY["EPSG","7016"]],AUTHORITY["EPSG","6298"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4298"]]','+proj=longlat +ellps=evrstSS +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4298,'EPSG',4298,'GEOGCS["Timbalai 1948",DATUM["Timbalai_1948",SPHEROID["Everest 1830 (1967 Definition)",6377298.556,300.8017,AUTHORITY["EPSG","7016"]],TOWGS84[-533.4,669.2,-52.5,0,0,4.28,9.4],AUTHORITY["EPSG","6298"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4298"]]','+proj=longlat +ellps=evrstSS +towgs84=-533.4,669.2,-52.5,0,0,4.28,9.4 +no_defs '); --- --- EPSG 4299 : TM65 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4299,'EPSG',4299,'GEOGCS["TM65",DATUM["TM65",SPHEROID["Airy Modified 1849",6377340.189,299.3249646,AUTHORITY["EPSG","7002"]],AUTHORITY["EPSG","6299"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4299"]]','+proj=longlat +a=6377340.189 +b=6356034.447938534 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4299,'EPSG',4299,'GEOGCS["TM65",DATUM["TM65",SPHEROID["Airy Modified 1849",6377340.189,299.3249646,AUTHORITY["EPSG","7002"]],TOWGS84[482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15],AUTHORITY["EPSG","6299"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4299"]]','+proj=longlat +ellps=mod_airy +towgs84=482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15 +no_defs '); --- --- EPSG 4300 : TM75 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4300,'EPSG',4300,'GEOGCS["TM75",DATUM["Geodetic_Datum_of_1965",SPHEROID["Airy Modified 1849",6377340.189,299.3249646,AUTHORITY["EPSG","7002"]],AUTHORITY["EPSG","6300"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4300"]]','+proj=longlat +a=6377340.189 +b=6356034.447938534 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4300,'EPSG',4300,'GEOGCS["TM75",DATUM["Geodetic_Datum_of_1965",SPHEROID["Airy Modified 1849",6377340.189,299.3249646,AUTHORITY["EPSG","7002"]],TOWGS84[482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15],AUTHORITY["EPSG","6300"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4300"]]','+proj=longlat +ellps=mod_airy +towgs84=482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15 +no_defs '); --- --- EPSG 4301 : Tokyo --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4301,'EPSG',4301,'GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]]','+proj=longlat +ellps=bessel +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4301,'EPSG',4301,'GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-148,507,685,0,0,0,0],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]]','+proj=longlat +ellps=bessel +towgs84=-148,507,685,0,0,0,0 +no_defs '); --- --- EPSG 4302 : Trinidad 1903 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4302,'EPSG',4302,'GEOGCS["Trinidad 1903",DATUM["Trinidad_1903",SPHEROID["Clarke 1858",6378293.645208759,294.2606763692569,AUTHORITY["EPSG","7007"]],AUTHORITY["EPSG","6302"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4302"]]','+proj=longlat +a=6378293.645208759 +b=6356617.987679838 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4302,'EPSG',4302,'GEOGCS["Trinidad 1903",DATUM["Trinidad_1903",SPHEROID["Clarke 1858",6378293.645208759,294.2606763692569,AUTHORITY["EPSG","7007"]],TOWGS84[-61.702,284.488,472.052,0,0,0,0],AUTHORITY["EPSG","6302"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4302"]]','+proj=longlat +a=6378293.645208759 +b=6356617.987679838 +towgs84=-61.702,284.488,472.052,0,0,0,0 +no_defs '); --- --- EPSG 4303 : TC(1948) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4303,'EPSG',4303,'GEOGCS["TC(1948)",DATUM["Trucial_Coast_1948",SPHEROID["Helmert 1906",6378200,298.3,AUTHORITY["EPSG","7020"]],AUTHORITY["EPSG","6303"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4303"]]','+proj=longlat +ellps=helmert +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4303,'EPSG',4303,'GEOGCS["TC(1948)",DATUM["Trucial_Coast_1948",SPHEROID["Helmert 1906",6378200,298.3,AUTHORITY["EPSG","7020"]],AUTHORITY["EPSG","6303"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4303"]]','+proj=longlat +ellps=helmert +no_defs '); --- --- EPSG 4304 : Voirol 1875 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4304,'EPSG',4304,'GEOGCS["Voirol 1875",DATUM["Voirol_1875",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-73,-247,227,0,0,0,0],AUTHORITY["EPSG","6304"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4304"]]','+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-73,-247,227,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4304,'EPSG',4304,'GEOGCS["Voirol 1875",DATUM["Voirol_1875",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-73,-247,227,0,0,0,0],AUTHORITY["EPSG","6304"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4304"]]','+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-73,-247,227,0,0,0,0 +no_defs '); --- --- EPSG 4306 : Bern 1938 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4306,'EPSG',4306,'GEOGCS["Bern 1938",DATUM["Bern_1938",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6306"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4306"]]','+proj=longlat +ellps=bessel +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4306,'EPSG',4306,'GEOGCS["Bern 1938",DATUM["Bern_1938",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6306"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4306"]]','+proj=longlat +ellps=bessel +no_defs '); --- --- EPSG 4307 : Nord Sahara 1959 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4307,'EPSG',4307,'GEOGCS["Nord Sahara 1959",DATUM["Nord_Sahara_1959",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6307"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4307"]]','+proj=longlat +ellps=clrk80 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4307,'EPSG',4307,'GEOGCS["Nord Sahara 1959",DATUM["Nord_Sahara_1959",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-186,-93,310,0,0,0,0],AUTHORITY["EPSG","6307"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4307"]]','+proj=longlat +ellps=clrk80 +towgs84=-186,-93,310,0,0,0,0 +no_defs '); --- --- EPSG 4308 : RT38 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4308,'EPSG',4308,'GEOGCS["RT38",DATUM["Stockholm_1938",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6308"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4308"]]','+proj=longlat +ellps=bessel +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4308,'EPSG',4308,'GEOGCS["RT38",DATUM["Stockholm_1938",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6308"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4308"]]','+proj=longlat +ellps=bessel +no_defs '); --- --- EPSG 4309 : Yacare --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4309,'EPSG',4309,'GEOGCS["Yacare",DATUM["Yacare",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-155,171,37,0,0,0,0],AUTHORITY["EPSG","6309"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4309"]]','+proj=longlat +ellps=intl +towgs84=-155,171,37,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4309,'EPSG',4309,'GEOGCS["Yacare",DATUM["Yacare",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-155,171,37,0,0,0,0],AUTHORITY["EPSG","6309"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4309"]]','+proj=longlat +ellps=intl +towgs84=-155,171,37,0,0,0,0 +no_defs '); --- --- EPSG 4310 : Yoff --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4310,'EPSG',4310,'GEOGCS["Yoff",DATUM["Yoff",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],AUTHORITY["EPSG","6310"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4310"]]','+proj=longlat +a=6378249.2 +b=6356515 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4310,'EPSG',4310,'GEOGCS["Yoff",DATUM["Yoff",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],AUTHORITY["EPSG","6310"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4310"]]','+proj=longlat +a=6378249.2 +b=6356515 +no_defs '); --- --- EPSG 4311 : Zanderij --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4311,'EPSG',4311,'GEOGCS["Zanderij",DATUM["Zanderij",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-265,120,-358,0,0,0,0],AUTHORITY["EPSG","6311"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4311"]]','+proj=longlat +ellps=intl +towgs84=-265,120,-358,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4311,'EPSG',4311,'GEOGCS["Zanderij",DATUM["Zanderij",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-265,120,-358,0,0,0,0],AUTHORITY["EPSG","6311"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4311"]]','+proj=longlat +ellps=intl +towgs84=-265,120,-358,0,0,0,0 +no_defs '); --- --- EPSG 4312 : MGI --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4312,'EPSG',4312,'GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4312"]]','+proj=longlat +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4312,'EPSG',4312,'GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4312"]]','+proj=longlat +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +no_defs '); --- --- EPSG 4313 : Belge 1972 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4313,'EPSG',4313,'GEOGCS["Belge 1972",DATUM["Reseau_National_Belge_1972",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1],AUTHORITY["EPSG","6313"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4313"]]','+proj=longlat +ellps=intl +towgs84=106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4313,'EPSG',4313,'GEOGCS["Belge 1972",DATUM["Reseau_National_Belge_1972",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-106.869,52.2978,-103.724,0.3366,-0.457,1.8422,1.2747],AUTHORITY["EPSG","6313"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4313"]]','+proj=longlat +ellps=intl +towgs84=-106.869,52.2978,-103.724,0.3366,-0.457,1.8422,1.2747 +no_defs '); --- --- EPSG 4314 : DHDN --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4314,'EPSG',4314,'GEOGCS["DHDN",DATUM["Deutsches_Hauptdreiecksnetz",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6314"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4314"]]','+proj=longlat +ellps=bessel +datum=potsdam +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4314,'EPSG',4314,'GEOGCS["DHDN",DATUM["Deutsches_Hauptdreiecksnetz",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[598.1,73.7,418.2,0.202,0.045,-2.455,6.7],AUTHORITY["EPSG","6314"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4314"]]','+proj=longlat +ellps=bessel +towgs84=598.1,73.7,418.2,0.202,0.045,-2.455,6.7 +no_defs '); --- --- EPSG 4315 : Conakry 1905 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4315,'EPSG',4315,'GEOGCS["Conakry 1905",DATUM["Conakry_1905",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-23,259,-9,0,0,0,0],AUTHORITY["EPSG","6315"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4315"]]','+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-23,259,-9,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4315,'EPSG',4315,'GEOGCS["Conakry 1905",DATUM["Conakry_1905",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-23,259,-9,0,0,0,0],AUTHORITY["EPSG","6315"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4315"]]','+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-23,259,-9,0,0,0,0 +no_defs '); --- --- EPSG 4316 : Dealul Piscului 1930 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4316,'EPSG',4316,'GEOGCS["Dealul Piscului 1930",DATUM["Dealul_Piscului_1930",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6316"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4316"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4316,'EPSG',4316,'GEOGCS["Dealul Piscului 1930",DATUM["Dealul_Piscului_1930",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[103.25,-100.4,-307.19,0,0,0,0],AUTHORITY["EPSG","6316"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4316"]]','+proj=longlat +ellps=intl +towgs84=103.25,-100.4,-307.19,0,0,0,0 +no_defs '); --- --- EPSG 4317 : Dealul Piscului 1970 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4317,'EPSG',4317,'GEOGCS["Dealul Piscului 1970",DATUM["Dealul_Piscului_1970",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6317"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4317"]]','+proj=longlat +ellps=krass +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4317,'EPSG',4317,'GEOGCS["Dealul Piscului 1970",DATUM["Dealul_Piscului_1970",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[28,-121,-77,0,0,0,0],AUTHORITY["EPSG","6317"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4317"]]','+proj=longlat +ellps=krass +towgs84=28,-121,-77,0,0,0,0 +no_defs '); --- --- EPSG 4318 : NGN --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4318,'EPSG',4318,'GEOGCS["NGN",DATUM["National_Geodetic_Network",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[-3.2,-5.7,2.8,0,0,0,0],AUTHORITY["EPSG","6318"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4318"]]','+proj=longlat +ellps=WGS84 +towgs84=-3.2,-5.7,2.8,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4318,'EPSG',4318,'GEOGCS["NGN",DATUM["National_Geodetic_Network",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[-3.2,-5.7,2.8,0,0,0,0],AUTHORITY["EPSG","6318"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4318"]]','+proj=longlat +ellps=WGS84 +towgs84=-3.2,-5.7,2.8,0,0,0,0 +no_defs '); --- --- EPSG 4319 : KUDAMS --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4319,'EPSG',4319,'GEOGCS["KUDAMS",DATUM["Kuwait_Utility",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6319"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4319"]]','+proj=longlat +ellps=GRS80 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4319,'EPSG',4319,'GEOGCS["KUDAMS",DATUM["Kuwait_Utility",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[-20.8,11.3,2.4,0,0,0,0],AUTHORITY["EPSG","6319"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4319"]]','+proj=longlat +ellps=GRS80 +towgs84=-20.8,11.3,2.4,0,0,0,0 +no_defs '); --- --- EPSG 4322 : WGS 72 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4322,'EPSG',4322,'GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]]','+proj=longlat +ellps=WGS72 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4322,'EPSG',4322,'GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]]','+proj=longlat +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +no_defs '); --- --- EPSG 4324 : WGS 72BE --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4324,'EPSG',4324,'GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]]','+proj=longlat +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4324,'EPSG',4324,'GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]]','+proj=longlat +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +no_defs '); --- --- 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 '); +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.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]','+proj=longlat +datum=WGS84 +no_defs '); +--- +--- EPSG 4463 : RGSPM06 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4463,'EPSG',4463,'GEOGCS["RGSPM06",DATUM["Reseau_Geodesique_de_Saint_Pierre_et_Miquelon_2006",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1038"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4463"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); +--- +--- EPSG 4470 : RGM04 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4470,'EPSG',4470,'GEOGCS["RGM04",DATUM["Reseau_Geodesique_de_Mayotte_2004",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1036"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4470"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); +--- +--- EPSG 4475 : Cadastre 1997 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4475,'EPSG',4475,'GEOGCS["Cadastre 1997",DATUM["Cadastre_1997",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-381.788,-57.501,-256.673,0,0,0,0],AUTHORITY["EPSG","1037"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4475"]]','+proj=longlat +ellps=intl +towgs84=-381.788,-57.501,-256.673,0,0,0,0 +no_defs '); +--- +--- EPSG 4483 : Mexican Datum of 1993 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4483,'EPSG',4483,'GEOGCS["Mexican Datum of 1993",DATUM["Mexican_Datum_of_1993",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1042"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4483"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); +--- +--- EPSG 4490 : China Geodetic Coordinate System 2000 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4490,'EPSG',4490,'GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]]','+proj=longlat +ellps=GRS80 +no_defs '); +--- +--- EPSG 4555 : New Beijing +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4555,'EPSG',4555,'GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]]','+proj=longlat +ellps=krass +no_defs '); +--- +--- EPSG 4558 : RRAF 1991 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4558,'EPSG',4558,'GEOGCS["RRAF 1991",DATUM["Reseau_de_Reference_des_Antilles_Francaises_1991",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1047"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4558"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4600 : Anguilla 1957 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4600,'EPSG',4600,'GEOGCS["Anguilla 1957",DATUM["Anguilla_1957",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6600"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4600"]]','+proj=longlat +ellps=clrk80 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4600,'EPSG',4600,'GEOGCS["Anguilla 1957",DATUM["Anguilla_1957",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6600"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4600"]]','+proj=longlat +ellps=clrk80 +no_defs '); --- --- EPSG 4601 : Antigua 1943 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4601,'EPSG',4601,'GEOGCS["Antigua 1943",DATUM["Antigua_1943",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6601"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4601"]]','+proj=longlat +ellps=clrk80 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4601,'EPSG',4601,'GEOGCS["Antigua 1943",DATUM["Antigua_1943",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-255,-15,71,0,0,0,0],AUTHORITY["EPSG","6601"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4601"]]','+proj=longlat +ellps=clrk80 +towgs84=-255,-15,71,0,0,0,0 +no_defs '); --- --- EPSG 4602 : Dominica 1945 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4602,'EPSG',4602,'GEOGCS["Dominica 1945",DATUM["Dominica_1945",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[725,685,536,0,0,0,0],AUTHORITY["EPSG","6602"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4602"]]','+proj=longlat +ellps=clrk80 +towgs84=725,685,536,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4602,'EPSG',4602,'GEOGCS["Dominica 1945",DATUM["Dominica_1945",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[725,685,536,0,0,0,0],AUTHORITY["EPSG","6602"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4602"]]','+proj=longlat +ellps=clrk80 +towgs84=725,685,536,0,0,0,0 +no_defs '); --- --- EPSG 4603 : Grenada 1953 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4603,'EPSG',4603,'GEOGCS["Grenada 1953",DATUM["Grenada_1953",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[72,213.7,93,0,0,0,0],AUTHORITY["EPSG","6603"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4603"]]','+proj=longlat +ellps=clrk80 +towgs84=72,213.7,93,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4603,'EPSG',4603,'GEOGCS["Grenada 1953",DATUM["Grenada_1953",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[72,213.7,93,0,0,0,0],AUTHORITY["EPSG","6603"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4603"]]','+proj=longlat +ellps=clrk80 +towgs84=72,213.7,93,0,0,0,0 +no_defs '); --- --- EPSG 4604 : Montserrat 1958 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4604,'EPSG',4604,'GEOGCS["Montserrat 1958",DATUM["Montserrat_1958",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[174,359,365,0,0,0,0],AUTHORITY["EPSG","6604"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4604"]]','+proj=longlat +ellps=clrk80 +towgs84=174,359,365,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4604,'EPSG',4604,'GEOGCS["Montserrat 1958",DATUM["Montserrat_1958",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[174,359,365,0,0,0,0],AUTHORITY["EPSG","6604"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4604"]]','+proj=longlat +ellps=clrk80 +towgs84=174,359,365,0,0,0,0 +no_defs '); --- --- EPSG 4605 : St. Kitts 1955 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4605,'EPSG',4605,'GEOGCS["St. Kitts 1955",DATUM["St_Kitts_1955",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6605"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4605"]]','+proj=longlat +ellps=clrk80 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4605,'EPSG',4605,'GEOGCS["St. Kitts 1955",DATUM["St_Kitts_1955",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[9,183,236,0,0,0,0],AUTHORITY["EPSG","6605"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4605"]]','+proj=longlat +ellps=clrk80 +towgs84=9,183,236,0,0,0,0 +no_defs '); --- --- EPSG 4606 : St. Lucia 1955 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4606,'EPSG',4606,'GEOGCS["St. Lucia 1955",DATUM["St_Lucia_1955",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-149,128,296,0,0,0,0],AUTHORITY["EPSG","6606"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4606"]]','+proj=longlat +ellps=clrk80 +towgs84=-149,128,296,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4606,'EPSG',4606,'GEOGCS["St. Lucia 1955",DATUM["St_Lucia_1955",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-149,128,296,0,0,0,0],AUTHORITY["EPSG","6606"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4606"]]','+proj=longlat +ellps=clrk80 +towgs84=-149,128,296,0,0,0,0 +no_defs '); --- --- EPSG 4607 : St. Vincent 1945 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4607,'EPSG',4607,'GEOGCS["St. Vincent 1945",DATUM["St_Vincent_1945",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[195.671,332.517,274.607,0,0,0,0],AUTHORITY["EPSG","6607"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4607"]]','+proj=longlat +ellps=clrk80 +towgs84=195.671,332.517,274.607,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4607,'EPSG',4607,'GEOGCS["St. Vincent 1945",DATUM["St_Vincent_1945",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[195.671,332.517,274.607,0,0,0,0],AUTHORITY["EPSG","6607"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4607"]]','+proj=longlat +ellps=clrk80 +towgs84=195.671,332.517,274.607,0,0,0,0 +no_defs '); --- --- EPSG 4608 : NAD27(76) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4608,'EPSG',4608,'GEOGCS["NAD27(76)",DATUM["North_American_Datum_1927_1976",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6608"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4608"]]','+proj=longlat +ellps=clrk66 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4608,'EPSG',4608,'GEOGCS["NAD27(76)",DATUM["North_American_Datum_1927_1976",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6608"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4608"]]','+proj=longlat +ellps=clrk66 +no_defs '); --- --- EPSG 4609 : NAD27(CGQ77) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4609,'EPSG',4609,'GEOGCS["NAD27(CGQ77)",DATUM["North_American_Datum_1927_CGQ77",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6609"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4609"]]','+proj=longlat +ellps=clrk66 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4609,'EPSG',4609,'GEOGCS["NAD27(CGQ77)",DATUM["North_American_Datum_1927_CGQ77",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6609"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4609"]]','+proj=longlat +ellps=clrk66 +no_defs '); --- --- EPSG 4610 : Xian 1980 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4610,'EPSG',4610,'GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]]','+proj=longlat +a=6378140 +b=6356755.288157528 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4610,'EPSG',4610,'GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]]','+proj=longlat +a=6378140 +b=6356755.288157528 +no_defs '); --- --- EPSG 4611 : Hong Kong 1980 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4611,'EPSG',4611,'GEOGCS["Hong Kong 1980",DATUM["Hong_Kong_1980",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-162.619,-276.959,-161.764,0.067753,-2.24365,-1.15883,-1.09425],AUTHORITY["EPSG","6611"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4611"]]','+proj=longlat +ellps=intl +towgs84=-162.619,-276.959,-161.764,0.067753,-2.24365,-1.15883,-1.09425 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4611,'EPSG',4611,'GEOGCS["Hong Kong 1980",DATUM["Hong_Kong_1980",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-162.619,-276.959,-161.764,0.067753,-2.24365,-1.15883,-1.09425],AUTHORITY["EPSG","6611"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4611"]]','+proj=longlat +ellps=intl +towgs84=-162.619,-276.959,-161.764,0.067753,-2.24365,-1.15883,-1.09425 +no_defs '); --- --- EPSG 4612 : JGD2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4612,'EPSG',4612,'GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4612,'EPSG',4612,'GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4613 : Segara --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4613,'EPSG',4613,'GEOGCS["Segara",DATUM["Gunung_Segara",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6613"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4613"]]','+proj=longlat +ellps=bessel +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4613,'EPSG',4613,'GEOGCS["Segara",DATUM["Gunung_Segara",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-403,684,41,0,0,0,0],AUTHORITY["EPSG","6613"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4613"]]','+proj=longlat +ellps=bessel +towgs84=-403,684,41,0,0,0,0 +no_defs '); --- --- EPSG 4614 : QND95 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4614,'EPSG',4614,'GEOGCS["QND95",DATUM["Qatar_National_Datum_1995",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-119.425,-303.659,-11.0006,1.1643,0.174458,1.09626,3.65706],AUTHORITY["EPSG","6614"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4614"]]','+proj=longlat +ellps=intl +towgs84=-119.425,-303.659,-11.0006,1.1643,0.174458,1.09626,3.65706 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4614,'EPSG',4614,'GEOGCS["QND95",DATUM["Qatar_National_Datum_1995",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-119.425,-303.659,-11.0006,1.1643,0.174458,1.09626,3.65706],AUTHORITY["EPSG","6614"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4614"]]','+proj=longlat +ellps=intl +towgs84=-119.425,-303.659,-11.0006,1.1643,0.174458,1.09626,3.65706 +no_defs '); --- --- EPSG 4615 : Porto Santo --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4615,'EPSG',4615,'GEOGCS["Porto Santo",DATUM["Porto_Santo_1936",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-499,-249,314,0,0,0,0],AUTHORITY["EPSG","6615"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4615"]]','+proj=longlat +ellps=intl +towgs84=-499,-249,314,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4615,'EPSG',4615,'GEOGCS["Porto Santo",DATUM["Porto_Santo_1936",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-499,-249,314,0,0,0,0],AUTHORITY["EPSG","6615"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4615"]]','+proj=longlat +ellps=intl +towgs84=-499,-249,314,0,0,0,0 +no_defs '); --- --- EPSG 4616 : Selvagem Grande --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4616,'EPSG',4616,'GEOGCS["Selvagem Grande",DATUM["Selvagem_Grande",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6616"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4616"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4616,'EPSG',4616,'GEOGCS["Selvagem Grande",DATUM["Selvagem_Grande",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-289,-124,60,0,0,0,0],AUTHORITY["EPSG","6616"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4616"]]','+proj=longlat +ellps=intl +towgs84=-289,-124,60,0,0,0,0 +no_defs '); --- --- EPSG 4617 : NAD83(CSRS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4617,'EPSG',4617,'GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]]','+proj=longlat +ellps=GRS80 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4617,'EPSG',4617,'GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4618 : SAD69 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4618,'EPSG',4618,'GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967 Modified",6378160,298.25,AUTHORITY["EPSG","7050"]],AUTHORITY["EPSG","6618"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4618"]]','+proj=longlat +ellps=aust_SA +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4618,'EPSG',4618,'GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967 Modified",6378160,298.25,AUTHORITY["EPSG","7050"]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY["EPSG","6618"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4618"]]','+proj=longlat +ellps=aust_SA +towgs84=-57,1,-41,0,0,0,0 +no_defs '); --- --- EPSG 4619 : SWEREF99 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4619,'EPSG',4619,'GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4619,'EPSG',4619,'GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4620 : Point 58 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4620,'EPSG',4620,'GEOGCS["Point 58",DATUM["Point_58",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-106,-129,165,0,0,0,0],AUTHORITY["EPSG","6620"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4620"]]','+proj=longlat +ellps=clrk80 +towgs84=-106,-129,165,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4620,'EPSG',4620,'GEOGCS["Point 58",DATUM["Point_58",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-106,-129,165,0,0,0,0],AUTHORITY["EPSG","6620"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4620"]]','+proj=longlat +ellps=clrk80 +towgs84=-106,-129,165,0,0,0,0 +no_defs '); --- --- EPSG 4621 : Fort Marigot --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4621,'EPSG',4621,'GEOGCS["Fort Marigot",DATUM["Fort_Marigot",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[137,248,-430,0,0,0,0],AUTHORITY["EPSG","6621"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4621"]]','+proj=longlat +ellps=intl +towgs84=137,248,-430,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4621,'EPSG',4621,'GEOGCS["Fort Marigot",DATUM["Fort_Marigot",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[137,248,-430,0,0,0,0],AUTHORITY["EPSG","6621"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4621"]]','+proj=longlat +ellps=intl +towgs84=137,248,-430,0,0,0,0 +no_defs '); --- --- EPSG 4622 : Guadeloupe 1948 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4622,'EPSG',4622,'GEOGCS["Guadeloupe 1948",DATUM["Guadeloupe_1948",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6622"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4622"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4622,'EPSG',4622,'GEOGCS["Guadeloupe 1948",DATUM["Guadeloupe_1948",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-467,-16,-300,0,0,0,0],AUTHORITY["EPSG","6622"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4622"]]','+proj=longlat +ellps=intl +towgs84=-467,-16,-300,0,0,0,0 +no_defs '); --- --- EPSG 4623 : CSG67 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4623,'EPSG',4623,'GEOGCS["CSG67",DATUM["Centre_Spatial_Guyanais_1967",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-186,230,110,0,0,0,0],AUTHORITY["EPSG","6623"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4623"]]','+proj=longlat +ellps=intl +towgs84=-186,230,110,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4623,'EPSG',4623,'GEOGCS["CSG67",DATUM["Centre_Spatial_Guyanais_1967",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-186,230,110,0,0,0,0],AUTHORITY["EPSG","6623"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4623"]]','+proj=longlat +ellps=intl +towgs84=-186,230,110,0,0,0,0 +no_defs '); --- --- EPSG 4624 : RGFG95 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4624,'EPSG',4624,'GEOGCS["RGFG95",DATUM["Reseau_Geodesique_Francais_Guyane_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[2,2,-2,0,0,0,0],AUTHORITY["EPSG","6624"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4624"]]','+proj=longlat +ellps=GRS80 +towgs84=2,2,-2,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4624,'EPSG',4624,'GEOGCS["RGFG95",DATUM["Reseau_Geodesique_Francais_Guyane_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[2,2,-2,0,0,0,0],AUTHORITY["EPSG","6624"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4624"]]','+proj=longlat +ellps=GRS80 +towgs84=2,2,-2,0,0,0,0 +no_defs '); --- --- EPSG 4625 : Martinique 1938 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4625,'EPSG',4625,'GEOGCS["Martinique 1938",DATUM["Martinique_1938",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6625"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4625"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4625,'EPSG',4625,'GEOGCS["Martinique 1938",DATUM["Martinique_1938",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[186,482,151,0,0,0,0],AUTHORITY["EPSG","6625"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4625"]]','+proj=longlat +ellps=intl +towgs84=186,482,151,0,0,0,0 +no_defs '); --- --- EPSG 4626 : Reunion 1947 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4626,'EPSG',4626,'GEOGCS["Reunion 1947",DATUM["Reunion_1947",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6626"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4626"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4626,'EPSG',4626,'GEOGCS["Reunion 1947",DATUM["Reunion_1947",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[94,-948,-1262,0,0,0,0],AUTHORITY["EPSG","6626"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4626"]]','+proj=longlat +ellps=intl +towgs84=94,-948,-1262,0,0,0,0 +no_defs '); --- --- EPSG 4627 : RGR92 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4627,'EPSG',4627,'GEOGCS["RGR92",DATUM["Reseau_Geodesique_de_la_Reunion_1992",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6627"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4627"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4627,'EPSG',4627,'GEOGCS["RGR92",DATUM["Reseau_Geodesique_de_la_Reunion_1992",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6627"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4627"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4628 : Tahiti 52 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4628,'EPSG',4628,'GEOGCS["Tahiti 52",DATUM["Tahiti_52",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[162,117,154,0,0,0,0],AUTHORITY["EPSG","6628"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4628"]]','+proj=longlat +ellps=intl +towgs84=162,117,154,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4628,'EPSG',4628,'GEOGCS["Tahiti 52",DATUM["Tahiti_52",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[162,117,154,0,0,0,0],AUTHORITY["EPSG","6628"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4628"]]','+proj=longlat +ellps=intl +towgs84=162,117,154,0,0,0,0 +no_defs '); --- --- EPSG 4629 : Tahaa 54 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4629,'EPSG',4629,'GEOGCS["Tahaa 54",DATUM["Tahaa_54",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6629"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4629"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4629,'EPSG',4629,'GEOGCS["Tahaa 54",DATUM["Tahaa_54",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[72.438,345.918,79.486,1.6045,0.8823,0.5565,1.3746],AUTHORITY["EPSG","6629"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4629"]]','+proj=longlat +ellps=intl +towgs84=72.438,345.918,79.486,1.6045,0.8823,0.5565,1.3746 +no_defs '); --- --- EPSG 4630 : IGN72 Nuku Hiva --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4630,'EPSG',4630,'GEOGCS["IGN72 Nuku Hiva",DATUM["IGN72_Nuku_Hiva",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6630"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4630"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4630,'EPSG',4630,'GEOGCS["IGN72 Nuku Hiva",DATUM["IGN72_Nuku_Hiva",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[84,274,65,0,0,0,0],AUTHORITY["EPSG","6630"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4630"]]','+proj=longlat +ellps=intl +towgs84=84,274,65,0,0,0,0 +no_defs '); --- --- EPSG 4631 : K0 1949 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4631,'EPSG',4631,'GEOGCS["K0 1949",DATUM["K0_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[145,-187,103,0,0,0,0],AUTHORITY["EPSG","6631"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4631"]]','+proj=longlat +ellps=intl +towgs84=145,-187,103,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4631,'EPSG',4631,'GEOGCS["K0 1949",DATUM["K0_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[145,-187,103,0,0,0,0],AUTHORITY["EPSG","6631"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4631"]]','+proj=longlat +ellps=intl +towgs84=145,-187,103,0,0,0,0 +no_defs '); --- --- EPSG 4632 : Combani 1950 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4632,'EPSG',4632,'GEOGCS["Combani 1950",DATUM["Combani_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-382,-59,-262,0,0,0,0],AUTHORITY["EPSG","6632"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4632"]]','+proj=longlat +ellps=intl +towgs84=-382,-59,-262,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4632,'EPSG',4632,'GEOGCS["Combani 1950",DATUM["Combani_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-382,-59,-262,0,0,0,0],AUTHORITY["EPSG","6632"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4632"]]','+proj=longlat +ellps=intl +towgs84=-382,-59,-262,0,0,0,0 +no_defs '); --- --- EPSG 4633 : IGN56 Lifou --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4633,'EPSG',4633,'GEOGCS["IGN56 Lifou",DATUM["IGN56_Lifou",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6633"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4633"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4633,'EPSG',4633,'GEOGCS["IGN56 Lifou",DATUM["IGN56_Lifou",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[335.47,222.58,-230.94,0,0,0,0],AUTHORITY["EPSG","6633"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4633"]]','+proj=longlat +ellps=intl +towgs84=335.47,222.58,-230.94,0,0,0,0 +no_defs '); --- --- EPSG 4634 : IGN72 Grand Terre --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4634,'EPSG',4634,'GEOGCS["IGN72 Grand Terre",DATUM["IGN72_Grande_Terre",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6634"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4634"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4634,'EPSG',4634,'GEOGCS["IGN72 Grand Terre",DATUM["IGN72_Grande_Terre",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-13,-348,292,0,0,0,0],AUTHORITY["EPSG","6634"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4634"]]','+proj=longlat +ellps=intl +towgs84=-13,-348,292,0,0,0,0 +no_defs '); --- --- EPSG 4635 : ST87 Ouvea --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4635,'EPSG',4635,'GEOGCS["ST87 Ouvea",DATUM["ST87_Ouvea",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-122.383,-188.696,103.344,3.5107,-4.9668,-5.7047,4.4798],AUTHORITY["EPSG","6635"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4635"]]','+proj=longlat +ellps=intl +towgs84=-122.383,-188.696,103.344,3.5107,-4.9668,-5.7047,4.4798 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4635,'EPSG',4635,'GEOGCS["ST87 Ouvea",DATUM["ST87_Ouvea",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-122.383,-188.696,103.344,3.5107,-4.9668,-5.7047,4.4798],AUTHORITY["EPSG","6635"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4635"]]','+proj=longlat +ellps=intl +towgs84=-122.383,-188.696,103.344,3.5107,-4.9668,-5.7047,4.4798 +no_defs '); --- --- EPSG 4636 : Petrels 1972 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4636,'EPSG',4636,'GEOGCS["Petrels 1972",DATUM["Petrels_1972",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[365,194,166,0,0,0,0],AUTHORITY["EPSG","6636"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4636"]]','+proj=longlat +ellps=intl +towgs84=365,194,166,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4636,'EPSG',4636,'GEOGCS["Petrels 1972",DATUM["Petrels_1972",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[365,194,166,0,0,0,0],AUTHORITY["EPSG","6636"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4636"]]','+proj=longlat +ellps=intl +towgs84=365,194,166,0,0,0,0 +no_defs '); --- --- EPSG 4637 : Perroud 1950 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4637,'EPSG',4637,'GEOGCS["Perroud 1950",DATUM["Pointe_Geologie_Perroud_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[325,154,172,0,0,0,0],AUTHORITY["EPSG","6637"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4637"]]','+proj=longlat +ellps=intl +towgs84=325,154,172,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4637,'EPSG',4637,'GEOGCS["Perroud 1950",DATUM["Pointe_Geologie_Perroud_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[325,154,172,0,0,0,0],AUTHORITY["EPSG","6637"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4637"]]','+proj=longlat +ellps=intl +towgs84=325,154,172,0,0,0,0 +no_defs '); --- --- EPSG 4638 : Saint Pierre et Miquelon 1950 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4638,'EPSG',4638,'GEOGCS["Saint Pierre et Miquelon 1950",DATUM["Saint_Pierre_et_Miquelon_1950",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[30,430,368,0,0,0,0],AUTHORITY["EPSG","6638"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4638"]]','+proj=longlat +ellps=clrk66 +towgs84=30,430,368,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4638,'EPSG',4638,'GEOGCS["Saint Pierre et Miquelon 1950",DATUM["Saint_Pierre_et_Miquelon_1950",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[30,430,368,0,0,0,0],AUTHORITY["EPSG","6638"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4638"]]','+proj=longlat +ellps=clrk66 +towgs84=30,430,368,0,0,0,0 +no_defs '); --- --- EPSG 4639 : MOP78 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4639,'EPSG',4639,'GEOGCS["MOP78",DATUM["MOP78",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6639"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4639"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4639,'EPSG',4639,'GEOGCS["MOP78",DATUM["MOP78",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[253,-132,-127,0,0,0,0],AUTHORITY["EPSG","6639"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4639"]]','+proj=longlat +ellps=intl +towgs84=253,-132,-127,0,0,0,0 +no_defs '); --- --- EPSG 4640 : RRAF 1991 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4640,'EPSG',4640,'GEOGCS["RRAF 1991",DATUM["Reseau_de_Reference_des_Antilles_Francaises_1991",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6640"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4640"]]','+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4640,'EPSG',4640,'GEOGCS["RRAF 1991",DATUM["Reseau_de_Reference_des_Antilles_Francaises_1991",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6640"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4640"]]','+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4641 : IGN53 Mare --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4641,'EPSG',4641,'GEOGCS["IGN53 Mare",DATUM["IGN53_Mare",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6641"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4641"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4641,'EPSG',4641,'GEOGCS["IGN53 Mare",DATUM["IGN53_Mare",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[287.58,177.78,-135.41,0,0,0,0],AUTHORITY["EPSG","6641"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4641"]]','+proj=longlat +ellps=intl +towgs84=287.58,177.78,-135.41,0,0,0,0 +no_defs '); --- --- EPSG 4642 : ST84 Ile des Pins --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4642,'EPSG',4642,'GEOGCS["ST84 Ile des Pins",DATUM["ST84_Ile_des_Pins",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6642"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4642"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4642,'EPSG',4642,'GEOGCS["ST84 Ile des Pins",DATUM["ST84_Ile_des_Pins",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-13,-348,292,0,0,0,0],AUTHORITY["EPSG","6642"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4642"]]','+proj=longlat +ellps=intl +towgs84=-13,-348,292,0,0,0,0 +no_defs '); --- --- EPSG 4643 : ST71 Belep --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4643,'EPSG',4643,'GEOGCS["ST71 Belep",DATUM["ST71_Belep",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-480.26,-438.32,-643.429,16.3119,20.1721,-4.0349,-111.7],AUTHORITY["EPSG","6643"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4643"]]','+proj=longlat +ellps=intl +towgs84=-480.26,-438.32,-643.429,16.3119,20.1721,-4.0349,-111.7 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4643,'EPSG',4643,'GEOGCS["ST71 Belep",DATUM["ST71_Belep",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-480.26,-438.32,-643.429,16.3119,20.1721,-4.0349,-111.7],AUTHORITY["EPSG","6643"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4643"]]','+proj=longlat +ellps=intl +towgs84=-480.26,-438.32,-643.429,16.3119,20.1721,-4.0349,-111.7 +no_defs '); --- --- EPSG 4644 : NEA74 Noumea --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4644,'EPSG',4644,'GEOGCS["NEA74 Noumea",DATUM["NEA74_Noumea",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6644"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4644"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4644,'EPSG',4644,'GEOGCS["NEA74 Noumea",DATUM["NEA74_Noumea",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-10.18,-350.43,291.37,0,0,0,0],AUTHORITY["EPSG","6644"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4644"]]','+proj=longlat +ellps=intl +towgs84=-10.18,-350.43,291.37,0,0,0,0 +no_defs '); --- --- EPSG 4645 : RGNC 1991 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4645,'EPSG',4645,'GEOGCS["RGNC 1991",DATUM["Reseau_Geodesique_Nouvelle_Caledonie_1991",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6645"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4645"]]','+proj=longlat +ellps=intl +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4645,'EPSG',4645,'GEOGCS["RGNC 1991",DATUM["Reseau_Geodesique_Nouvelle_Caledonie_1991",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6645"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4645"]]','+proj=longlat +ellps=intl +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4646 : Grand Comoros --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4646,'EPSG',4646,'GEOGCS["Grand Comoros",DATUM["Grand_Comoros",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6646"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4646"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4646,'EPSG',4646,'GEOGCS["Grand Comoros",DATUM["Grand_Comoros",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6646"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4646"]]','+proj=longlat +ellps=intl +no_defs '); --- --- EPSG 4657 : Reykjavik 1900 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4657,'EPSG',4657,'GEOGCS["Reykjavik 1900",DATUM["Reykjavik_1900",SPHEROID["Danish 1876",6377019.27,300,AUTHORITY["EPSG","7051"]],TOWGS84[-28,199,5,0,0,0,0],AUTHORITY["EPSG","6657"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4657"]]','+proj=longlat +a=6377019.27 +b=6355762.5391 +towgs84=-28,199,5,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4657,'EPSG',4657,'GEOGCS["Reykjavik 1900",DATUM["Reykjavik_1900",SPHEROID["Danish 1876",6377019.27,300,AUTHORITY["EPSG","7051"]],TOWGS84[-28,199,5,0,0,0,0],AUTHORITY["EPSG","6657"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4657"]]','+proj=longlat +a=6377019.27 +b=6355762.5391 +towgs84=-28,199,5,0,0,0,0 +no_defs '); --- --- EPSG 4658 : Hjorsey 1955 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4658,'EPSG',4658,'GEOGCS["Hjorsey 1955",DATUM["Hjorsey_1955",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-73,46,-86,0,0,0,0],AUTHORITY["EPSG","6658"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4658"]]','+proj=longlat +ellps=intl +towgs84=-73,46,-86,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4658,'EPSG',4658,'GEOGCS["Hjorsey 1955",DATUM["Hjorsey_1955",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-73,46,-86,0,0,0,0],AUTHORITY["EPSG","6658"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4658"]]','+proj=longlat +ellps=intl +towgs84=-73,46,-86,0,0,0,0 +no_defs '); --- --- EPSG 4659 : ISN93 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4659,'EPSG',4659,'GEOGCS["ISN93",DATUM["Islands_Network_1993",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6659"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4659"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4659,'EPSG',4659,'GEOGCS["ISN93",DATUM["Islands_Network_1993",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6659"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4659"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4660 : Helle 1954 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4660,'EPSG',4660,'GEOGCS["Helle 1954",DATUM["Helle_1954",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[982.609,552.753,-540.873,32.3934,-153.257,-96.2266,16.805],AUTHORITY["EPSG","6660"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4660"]]','+proj=longlat +ellps=intl +towgs84=982.609,552.753,-540.873,32.3934,-153.257,-96.2266,16.805 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4660,'EPSG',4660,'GEOGCS["Helle 1954",DATUM["Helle_1954",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[982.609,552.753,-540.873,6.68163,-31.6115,-19.8482,16.805],AUTHORITY["EPSG","6660"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4660"]]','+proj=longlat +ellps=intl +towgs84=982.609,552.753,-540.873,6.68163,-31.6115,-19.8482,16.805 +no_defs '); --- --- EPSG 4661 : LKS92 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4661,'EPSG',4661,'GEOGCS["LKS92",DATUM["Latvia_1992",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6661"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4661"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4661,'EPSG',4661,'GEOGCS["LKS92",DATUM["Latvia_1992",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6661"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4661"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4662 : IGN72 Grande Terre --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4662,'EPSG',4662,'GEOGCS["IGN72 Grande Terre",DATUM["IGN72_Grande_Terre",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6634"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4662"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4662,'EPSG',4662,'GEOGCS["IGN72 Grande Terre",DATUM["IGN72_Grande_Terre",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-11.64,-348.6,291.98,0,0,0,0],AUTHORITY["EPSG","6634"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4662"]]','+proj=longlat +ellps=intl +towgs84=-11.64,-348.6,291.98,0,0,0,0 +no_defs '); --- --- EPSG 4663 : Porto Santo 1995 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4663,'EPSG',4663,'GEOGCS["Porto Santo 1995",DATUM["Porto_Santo_1995",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6663"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4663"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4663,'EPSG',4663,'GEOGCS["Porto Santo 1995",DATUM["Porto_Santo_1995",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-502.862,-247.438,312.724,0,0,0,0],AUTHORITY["EPSG","6663"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4663"]]','+proj=longlat +ellps=intl +towgs84=-502.862,-247.438,312.724,0,0,0,0 +no_defs '); --- --- EPSG 4664 : Azores Oriental 1995 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4664,'EPSG',4664,'GEOGCS["Azores Oriental 1995",DATUM["Azores_Oriental_Islands_1995",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6664"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4664"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4664,'EPSG',4664,'GEOGCS["Azores Oriental 1995",DATUM["Azores_Oriental_Islands_1995",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-204.619,140.176,55.226,0,0,0,0],AUTHORITY["EPSG","6664"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4664"]]','+proj=longlat +ellps=intl +towgs84=-204.619,140.176,55.226,0,0,0,0 +no_defs '); --- --- EPSG 4665 : Azores Central 1995 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4665,'EPSG',4665,'GEOGCS["Azores Central 1995",DATUM["Azores_Central_Islands_1995",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6665"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4665"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4665,'EPSG',4665,'GEOGCS["Azores Central 1995",DATUM["Azores_Central_Islands_1995",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-106.226,166.366,-37.893,0,0,0,0],AUTHORITY["EPSG","6665"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4665"]]','+proj=longlat +ellps=intl +towgs84=-106.226,166.366,-37.893,0,0,0,0 +no_defs '); --- --- EPSG 4666 : Lisbon 1890 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4666,'EPSG',4666,'GEOGCS["Lisbon 1890",DATUM["Lisbon_1890",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6666"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4666"]]','+proj=longlat +ellps=bessel +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4666,'EPSG',4666,'GEOGCS["Lisbon 1890",DATUM["Lisbon_1890",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[508.088,-191.042,565.223,0,0,0,0],AUTHORITY["EPSG","6666"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4666"]]','+proj=longlat +ellps=bessel +towgs84=508.088,-191.042,565.223,0,0,0,0 +no_defs '); --- --- EPSG 4667 : IKBD-92 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4667,'EPSG',4667,'GEOGCS["IKBD-92",DATUM["Iraq_Kuwait_Boundary_Datum_1992",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6667"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4667"]]','+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4667,'EPSG',4667,'GEOGCS["IKBD-92",DATUM["Iraq_Kuwait_Boundary_Datum_1992",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6667"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4667"]]','+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4668 : ED79 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4668,'EPSG',4668,'GEOGCS["ED79",DATUM["European_Datum_1979",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-86,-98,-119,0,0,0,0],AUTHORITY["EPSG","6668"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4668"]]','+proj=longlat +ellps=intl +towgs84=-86,-98,-119,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4668,'EPSG',4668,'GEOGCS["ED79",DATUM["European_Datum_1979",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-86,-98,-119,0,0,0,0],AUTHORITY["EPSG","6668"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4668"]]','+proj=longlat +ellps=intl +towgs84=-86,-98,-119,0,0,0,0 +no_defs '); --- --- EPSG 4669 : LKS94 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4669,'EPSG',4669,'GEOGCS["LKS94",DATUM["Lithuania_1994_ETRS89",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6126"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4669"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4669,'EPSG',4669,'GEOGCS["LKS94",DATUM["Lithuania_1994_ETRS89",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6126"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4669"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4670 : IGM95 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4670,'EPSG',4670,'GEOGCS["IGM95",DATUM["Istituto_Geografico_Militaire_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6670"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4670"]]','+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4670,'EPSG',4670,'GEOGCS["IGM95",DATUM["Istituto_Geografico_Militaire_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6670"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4670"]]','+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4671 : Voirol 1879 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4671,'EPSG',4671,'GEOGCS["Voirol 1879",DATUM["Voirol_1879",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],AUTHORITY["EPSG","6671"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4671"]]','+proj=longlat +a=6378249.2 +b=6356515 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4671,'EPSG',4671,'GEOGCS["Voirol 1879",DATUM["Voirol_1879",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],AUTHORITY["EPSG","6671"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4671"]]','+proj=longlat +a=6378249.2 +b=6356515 +no_defs '); --- --- EPSG 4672 : Chatham Islands 1971 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4672,'EPSG',4672,'GEOGCS["Chatham Islands 1971",DATUM["Chatham_Islands_Datum_1971",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[175,-38,113,0,0,0,0],AUTHORITY["EPSG","6672"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4672"]]','+proj=longlat +ellps=intl +towgs84=175,-38,113,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4672,'EPSG',4672,'GEOGCS["Chatham Islands 1971",DATUM["Chatham_Islands_Datum_1971",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[175,-38,113,0,0,0,0],AUTHORITY["EPSG","6672"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4672"]]','+proj=longlat +ellps=intl +towgs84=175,-38,113,0,0,0,0 +no_defs '); --- --- EPSG 4673 : Chatham Islands 1979 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4673,'EPSG',4673,'GEOGCS["Chatham Islands 1979",DATUM["Chatham_Islands_Datum_1979",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[174.05,-25.49,112.57,-0,-0,0.554,0.2263],AUTHORITY["EPSG","6673"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4673"]]','+proj=longlat +ellps=intl +towgs84=174.05,-25.49,112.57,-0,-0,0.554,0.2263 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4673,'EPSG',4673,'GEOGCS["Chatham Islands 1979",DATUM["Chatham_Islands_Datum_1979",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[174.05,-25.49,112.57,-0,-0,0.554,0.2263],AUTHORITY["EPSG","6673"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4673"]]','+proj=longlat +ellps=intl +towgs84=174.05,-25.49,112.57,-0,-0,0.554,0.2263 +no_defs '); --- --- EPSG 4674 : SIRGAS 2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4674,'EPSG',4674,'GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4674,'EPSG',4674,'GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4675 : Guam 1963 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4675,'EPSG',4675,'GEOGCS["Guam 1963",DATUM["Guam_1963",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-100,-248,259,0,0,0,0],AUTHORITY["EPSG","6675"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4675"]]','+proj=longlat +ellps=clrk66 +towgs84=-100,-248,259,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4675,'EPSG',4675,'GEOGCS["Guam 1963",DATUM["Guam_1963",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-100,-248,259,0,0,0,0],AUTHORITY["EPSG","6675"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4675"]]','+proj=longlat +ellps=clrk66 +towgs84=-100,-248,259,0,0,0,0 +no_defs '); --- --- EPSG 4676 : Vientiane 1982 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4676,'EPSG',4676,'GEOGCS["Vientiane 1982",DATUM["Vientiane_1982",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6676"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4676"]]','+proj=longlat +ellps=krass +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4676,'EPSG',4676,'GEOGCS["Vientiane 1982",DATUM["Vientiane_1982",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6676"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4676"]]','+proj=longlat +ellps=krass +no_defs '); --- --- EPSG 4677 : Lao 1993 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4677,'EPSG',4677,'GEOGCS["Lao 1993",DATUM["Lao_1993",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6677"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4677"]]','+proj=longlat +ellps=krass +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4677,'EPSG',4677,'GEOGCS["Lao 1993",DATUM["Lao_1993",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6677"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4677"]]','+proj=longlat +ellps=krass +no_defs '); --- --- EPSG 4678 : Lao 1997 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4678,'EPSG',4678,'GEOGCS["Lao 1997",DATUM["Lao_National_Datum_1997",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[44.585,-131.212,-39.544,0,0,0,0],AUTHORITY["EPSG","6678"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4678"]]','+proj=longlat +ellps=krass +towgs84=44.585,-131.212,-39.544,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4678,'EPSG',4678,'GEOGCS["Lao 1997",DATUM["Lao_National_Datum_1997",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[44.585,-131.212,-39.544,0,0,0,0],AUTHORITY["EPSG","6678"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4678"]]','+proj=longlat +ellps=krass +towgs84=44.585,-131.212,-39.544,0,0,0,0 +no_defs '); --- --- EPSG 4679 : Jouik 1961 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4679,'EPSG',4679,'GEOGCS["Jouik 1961",DATUM["Jouik_1961",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-80.01,253.26,291.19,0,0,0,0],AUTHORITY["EPSG","6679"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4679"]]','+proj=longlat +ellps=clrk80 +towgs84=-80.01,253.26,291.19,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4679,'EPSG',4679,'GEOGCS["Jouik 1961",DATUM["Jouik_1961",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-80.01,253.26,291.19,0,0,0,0],AUTHORITY["EPSG","6679"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4679"]]','+proj=longlat +ellps=clrk80 +towgs84=-80.01,253.26,291.19,0,0,0,0 +no_defs '); --- --- EPSG 4680 : Nouakchott 1965 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4680,'EPSG',4680,'GEOGCS["Nouakchott 1965",DATUM["Nouakchott_1965",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[124.5,-63.5,-281,0,0,0,0],AUTHORITY["EPSG","6680"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4680"]]','+proj=longlat +ellps=clrk80 +towgs84=124.5,-63.5,-281,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4680,'EPSG',4680,'GEOGCS["Nouakchott 1965",DATUM["Nouakchott_1965",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[124.5,-63.5,-281,0,0,0,0],AUTHORITY["EPSG","6680"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4680"]]','+proj=longlat +ellps=clrk80 +towgs84=124.5,-63.5,-281,0,0,0,0 +no_defs '); --- --- EPSG 4681 : Mauritania 1999 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4681,'EPSG',4681,'GEOGCS["Mauritania 1999",DATUM["Mauritania_1999",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6681"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4681"]]','+proj=longlat +ellps=clrk80 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4681,'EPSG',4681,'GEOGCS["Mauritania 1999",DATUM["Mauritania_1999",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6681"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4681"]]','+proj=longlat +ellps=clrk80 +no_defs '); --- --- EPSG 4682 : Gulshan 303 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4682,'EPSG',4682,'GEOGCS["Gulshan 303",DATUM["Gulshan_303",SPHEROID["Everest 1830 (1937 Adjustment)",6377276.345,300.8017,AUTHORITY["EPSG","7015"]],AUTHORITY["EPSG","6682"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4682"]]','+proj=longlat +a=6377276.345 +b=6356075.41314024 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4682,'EPSG',4682,'GEOGCS["Gulshan 303",DATUM["Gulshan_303",SPHEROID["Everest 1830 (1937 Adjustment)",6377276.345,300.8017,AUTHORITY["EPSG","7015"]],TOWGS84[283.7,735.9,261.1,0,0,0,0],AUTHORITY["EPSG","6682"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4682"]]','+proj=longlat +a=6377276.345 +b=6356075.41314024 +towgs84=283.7,735.9,261.1,0,0,0,0 +no_defs '); --- --- EPSG 4683 : PRS92 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4683,'EPSG',4683,'GEOGCS["PRS92",DATUM["Philippine_Reference_System_1992",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06],AUTHORITY["EPSG","6683"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4683"]]','+proj=longlat +ellps=clrk66 +towgs84=-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4683,'EPSG',4683,'GEOGCS["PRS92",DATUM["Philippine_Reference_System_1992",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06],AUTHORITY["EPSG","6683"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4683"]]','+proj=longlat +ellps=clrk66 +towgs84=-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06 +no_defs '); --- --- EPSG 4684 : Gan 1970 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4684,'EPSG',4684,'GEOGCS["Gan 1970",DATUM["Gan_1970",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-133,-321,50,0,0,0,0],AUTHORITY["EPSG","6684"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4684"]]','+proj=longlat +ellps=intl +towgs84=-133,-321,50,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4684,'EPSG',4684,'GEOGCS["Gan 1970",DATUM["Gan_1970",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-133,-321,50,0,0,0,0],AUTHORITY["EPSG","6684"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4684"]]','+proj=longlat +ellps=intl +towgs84=-133,-321,50,0,0,0,0 +no_defs '); --- --- EPSG 4685 : Gandajika --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4685,'EPSG',4685,'GEOGCS["Gandajika",DATUM["Gandajika",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6685"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4685"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4685,'EPSG',4685,'GEOGCS["Gandajika",DATUM["Gandajika",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6685"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4685"]]','+proj=longlat +ellps=intl +no_defs '); --- --- EPSG 4686 : MAGNA-SIRGAS --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4686,'EPSG',4686,'GEOGCS["MAGNA-SIRGAS",DATUM["Marco_Geocentrico_Nacional_de_Referencia",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6686"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4686"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4686,'EPSG',4686,'GEOGCS["MAGNA-SIRGAS",DATUM["Marco_Geocentrico_Nacional_de_Referencia",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6686"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4686"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4687 : RGPF --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4687,'EPSG',4687,'GEOGCS["RGPF",DATUM["Reseau_Geodesique_de_la_Polynesie_Francaise",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6687"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4687"]]','+proj=longlat +ellps=GRS80 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4687,'EPSG',4687,'GEOGCS["RGPF",DATUM["Reseau_Geodesique_de_la_Polynesie_Francaise",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0.072,-0.507,-0.245,-0.0183,0.0003,-0.007,-0.0093],AUTHORITY["EPSG","6687"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4687"]]','+proj=longlat +ellps=GRS80 +towgs84=0.072,-0.507,-0.245,-0.0183,0.0003,-0.007,-0.0093 +no_defs '); --- --- EPSG 4688 : Fatu Iva 72 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4688,'EPSG',4688,'GEOGCS["Fatu Iva 72",DATUM["Fatu_Iva_72",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[347.103,1078.12,2623.92,-33.8875,70.6773,-9.3943,186.074],AUTHORITY["EPSG","6688"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4688"]]','+proj=longlat +ellps=intl +towgs84=347.103,1078.12,2623.92,-33.8875,70.6773,-9.3943,186.074 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4688,'EPSG',4688,'GEOGCS["Fatu Iva 72",DATUM["Fatu_Iva_72",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[347.103,1078.12,2623.92,-33.8875,70.6773,-9.3943,186.074],AUTHORITY["EPSG","6688"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4688"]]','+proj=longlat +ellps=intl +towgs84=347.103,1078.12,2623.92,-33.8875,70.6773,-9.3943,186.074 +no_defs '); --- --- EPSG 4689 : IGN63 Hiva Oa --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4689,'EPSG',4689,'GEOGCS["IGN63 Hiva Oa",DATUM["IGN63_Hiva_Oa",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6689"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4689"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4689,'EPSG',4689,'GEOGCS["IGN63 Hiva Oa",DATUM["IGN63_Hiva_Oa",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[410.721,55.049,80.746,2.5779,2.3514,0.6664,17.3311],AUTHORITY["EPSG","6689"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4689"]]','+proj=longlat +ellps=intl +towgs84=410.721,55.049,80.746,2.5779,2.3514,0.6664,17.3311 +no_defs '); --- --- EPSG 4690 : Tahiti 79 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4690,'EPSG',4690,'GEOGCS["Tahiti 79",DATUM["Tahiti_79",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6690"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4690"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4690,'EPSG',4690,'GEOGCS["Tahiti 79",DATUM["Tahiti_79",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6690"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4690"]]','+proj=longlat +ellps=intl +no_defs '); --- --- EPSG 4691 : Moorea 87 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4691,'EPSG',4691,'GEOGCS["Moorea 87",DATUM["Moorea_87",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[215.525,149.593,176.229,-3.2624,-1.692,-1.1571,10.4773],AUTHORITY["EPSG","6691"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4691"]]','+proj=longlat +ellps=intl +towgs84=215.525,149.593,176.229,-3.2624,-1.692,-1.1571,10.4773 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4691,'EPSG',4691,'GEOGCS["Moorea 87",DATUM["Moorea_87",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[215.525,149.593,176.229,-3.2624,-1.692,-1.1571,10.4773],AUTHORITY["EPSG","6691"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4691"]]','+proj=longlat +ellps=intl +towgs84=215.525,149.593,176.229,-3.2624,-1.692,-1.1571,10.4773 +no_defs '); --- --- EPSG 4692 : Maupiti 83 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4692,'EPSG',4692,'GEOGCS["Maupiti 83",DATUM["Maupiti_83",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[217.037,86.959,23.956,0,0,0,0],AUTHORITY["EPSG","6692"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4692"]]','+proj=longlat +ellps=intl +towgs84=217.037,86.959,23.956,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4692,'EPSG',4692,'GEOGCS["Maupiti 83",DATUM["Maupiti_83",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[217.037,86.959,23.956,0,0,0,0],AUTHORITY["EPSG","6692"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4692"]]','+proj=longlat +ellps=intl +towgs84=217.037,86.959,23.956,0,0,0,0 +no_defs '); --- --- EPSG 4693 : Nakhl-e Ghanem --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4693,'EPSG',4693,'GEOGCS["Nakhl-e Ghanem",DATUM["Nakhl_e_Ghanem",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,-0.15,0.68,0,0,0,0],AUTHORITY["EPSG","6693"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4693"]]','+proj=longlat +ellps=WGS84 +towgs84=0,-0.15,0.68,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4693,'EPSG',4693,'GEOGCS["Nakhl-e Ghanem",DATUM["Nakhl_e_Ghanem",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,-0.15,0.68,0,0,0,0],AUTHORITY["EPSG","6693"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4693"]]','+proj=longlat +ellps=WGS84 +towgs84=0,-0.15,0.68,0,0,0,0 +no_defs '); --- --- EPSG 4694 : POSGAR 94 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4694,'EPSG',4694,'GEOGCS["POSGAR 94",DATUM["Posiciones_Geodesicas_Argentinas_1994",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6694"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4694"]]','+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4694,'EPSG',4694,'GEOGCS["POSGAR 94",DATUM["Posiciones_Geodesicas_Argentinas_1994",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6694"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4694"]]','+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4695 : Katanga 1955 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4695,'EPSG',4695,'GEOGCS["Katanga 1955",DATUM["Katanga_1955",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-103.746,-9.614,-255.95,0,0,0,0],AUTHORITY["EPSG","6695"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4695"]]','+proj=longlat +ellps=clrk66 +towgs84=-103.746,-9.614,-255.95,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4695,'EPSG',4695,'GEOGCS["Katanga 1955",DATUM["Katanga_1955",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-103.746,-9.614,-255.95,0,0,0,0],AUTHORITY["EPSG","6695"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4695"]]','+proj=longlat +ellps=clrk66 +towgs84=-103.746,-9.614,-255.95,0,0,0,0 +no_defs '); --- --- EPSG 4696 : Kasai 1953 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4696,'EPSG',4696,'GEOGCS["Kasai 1953",DATUM["Kasai_1953",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6696"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4696"]]','+proj=longlat +ellps=clrk80 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4696,'EPSG',4696,'GEOGCS["Kasai 1953",DATUM["Kasai_1953",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6696"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4696"]]','+proj=longlat +ellps=clrk80 +no_defs '); --- --- EPSG 4697 : IGC 1962 6th Parallel South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4697,'EPSG',4697,'GEOGCS["IGC 1962 6th Parallel South",DATUM["IGC_1962_Arc_of_the_6th_Parallel_South",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6697"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4697"]]','+proj=longlat +ellps=clrk80 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4697,'EPSG',4697,'GEOGCS["IGC 1962 6th Parallel South",DATUM["IGC_1962_Arc_of_the_6th_Parallel_South",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6697"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4697"]]','+proj=longlat +ellps=clrk80 +no_defs '); --- --- EPSG 4698 : IGN 1962 Kerguelen --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4698,'EPSG',4698,'GEOGCS["IGN 1962 Kerguelen",DATUM["IGN_1962_Kerguelen",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[145,-187,103,0,0,0,0],AUTHORITY["EPSG","6698"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4698"]]','+proj=longlat +ellps=intl +towgs84=145,-187,103,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4698,'EPSG',4698,'GEOGCS["IGN 1962 Kerguelen",DATUM["IGN_1962_Kerguelen",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[145,-187,103,0,0,0,0],AUTHORITY["EPSG","6698"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4698"]]','+proj=longlat +ellps=intl +towgs84=145,-187,103,0,0,0,0 +no_defs '); --- --- EPSG 4699 : Le Pouce 1934 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4699,'EPSG',4699,'GEOGCS["Le Pouce 1934",DATUM["Le_Pouce_1934",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-770.1,158.4,-498.2,0,0,0,0],AUTHORITY["EPSG","6699"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4699"]]','+proj=longlat +ellps=clrk80 +towgs84=-770.1,158.4,-498.2,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4699,'EPSG',4699,'GEOGCS["Le Pouce 1934",DATUM["Le_Pouce_1934",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-770.1,158.4,-498.2,0,0,0,0],AUTHORITY["EPSG","6699"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4699"]]','+proj=longlat +ellps=clrk80 +towgs84=-770.1,158.4,-498.2,0,0,0,0 +no_defs '); --- --- EPSG 4700 : IGN Astro 1960 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4700,'EPSG',4700,'GEOGCS["IGN Astro 1960",DATUM["IGN_Astro_1960",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6700"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4700"]]','+proj=longlat +ellps=clrk80 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4700,'EPSG',4700,'GEOGCS["IGN Astro 1960",DATUM["IGN_Astro_1960",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6700"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4700"]]','+proj=longlat +ellps=clrk80 +no_defs '); --- --- EPSG 4701 : IGCB 1955 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4701,'EPSG',4701,'GEOGCS["IGCB 1955",DATUM["Institut_Geographique_du_Congo_Belge_1955",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-79.9,-158,-168.9,0,0,0,0],AUTHORITY["EPSG","6701"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4701"]]','+proj=longlat +ellps=clrk80 +towgs84=-79.9,-158,-168.9,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4701,'EPSG',4701,'GEOGCS["IGCB 1955",DATUM["Institut_Geographique_du_Congo_Belge_1955",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-79.9,-158,-168.9,0,0,0,0],AUTHORITY["EPSG","6701"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4701"]]','+proj=longlat +ellps=clrk80 +towgs84=-79.9,-158,-168.9,0,0,0,0 +no_defs '); --- --- EPSG 4702 : Mauritania 1999 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4702,'EPSG',4702,'GEOGCS["Mauritania 1999",DATUM["Mauritania_1999",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6702"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4702"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4702,'EPSG',4702,'GEOGCS["Mauritania 1999",DATUM["Mauritania_1999",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6702"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4702"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4703 : Mhast 1951 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4703,'EPSG',4703,'GEOGCS["Mhast 1951",DATUM["Missao_Hidrografico_Angola_y_Sao_Tome_1951",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6703"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4703"]]','+proj=longlat +ellps=clrk80 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4703,'EPSG',4703,'GEOGCS["Mhast 1951",DATUM["Missao_Hidrografico_Angola_y_Sao_Tome_1951",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6703"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4703"]]','+proj=longlat +ellps=clrk80 +no_defs '); --- --- EPSG 4704 : Mhast (onshore) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4704,'EPSG',4704,'GEOGCS["Mhast (onshore)",DATUM["Mhast_onshore",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6704"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4704"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4704,'EPSG',4704,'GEOGCS["Mhast (onshore)",DATUM["Mhast_onshore",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6704"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4704"]]','+proj=longlat +ellps=intl +no_defs '); --- --- EPSG 4705 : Mhast (offshore) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4705,'EPSG',4705,'GEOGCS["Mhast (offshore)",DATUM["Mhast_offshore",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6705"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4705"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4705,'EPSG',4705,'GEOGCS["Mhast (offshore)",DATUM["Mhast_offshore",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6705"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4705"]]','+proj=longlat +ellps=intl +no_defs '); --- --- EPSG 4706 : Egypt Gulf of Suez S-650 TL --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4706,'EPSG',4706,'GEOGCS["Egypt Gulf of Suez S-650 TL",DATUM["Egypt_Gulf_of_Suez_S_650_TL",SPHEROID["Helmert 1906",6378200,298.3,AUTHORITY["EPSG","7020"]],TOWGS84[-146.21,112.63,4.05,0,0,0,0],AUTHORITY["EPSG","6706"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4706"]]','+proj=longlat +ellps=helmert +towgs84=-146.21,112.63,4.05,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4706,'EPSG',4706,'GEOGCS["Egypt Gulf of Suez S-650 TL",DATUM["Egypt_Gulf_of_Suez_S_650_TL",SPHEROID["Helmert 1906",6378200,298.3,AUTHORITY["EPSG","7020"]],TOWGS84[-146.21,112.63,4.05,0,0,0,0],AUTHORITY["EPSG","6706"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4706"]]','+proj=longlat +ellps=helmert +towgs84=-146.21,112.63,4.05,0,0,0,0 +no_defs '); --- --- EPSG 4707 : Tern Island 1961 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4707,'EPSG',4707,'GEOGCS["Tern Island 1961",DATUM["Tern_Island_1961",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[114,-116,-333,0,0,0,0],AUTHORITY["EPSG","6707"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4707"]]','+proj=longlat +ellps=intl +towgs84=114,-116,-333,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4707,'EPSG',4707,'GEOGCS["Tern Island 1961",DATUM["Tern_Island_1961",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[114,-116,-333,0,0,0,0],AUTHORITY["EPSG","6707"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4707"]]','+proj=longlat +ellps=intl +towgs84=114,-116,-333,0,0,0,0 +no_defs '); --- --- EPSG 4708 : Cocos Islands 1965 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4708,'EPSG',4708,'GEOGCS["Cocos Islands 1965",DATUM["Cocos_Islands_1965",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],TOWGS84[-491,-22,435,0,0,0,0],AUTHORITY["EPSG","6708"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4708"]]','+proj=longlat +ellps=aust_SA +towgs84=-491,-22,435,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4708,'EPSG',4708,'GEOGCS["Cocos Islands 1965",DATUM["Cocos_Islands_1965",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],TOWGS84[-491,-22,435,0,0,0,0],AUTHORITY["EPSG","6708"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4708"]]','+proj=longlat +ellps=aust_SA +towgs84=-491,-22,435,0,0,0,0 +no_defs '); --- --- EPSG 4709 : Iwo Jima 1945 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4709,'EPSG',4709,'GEOGCS["Iwo Jima 1945",DATUM["Iwo_Jima_1945",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[145,75,-272,0,0,0,0],AUTHORITY["EPSG","6709"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4709"]]','+proj=longlat +ellps=intl +towgs84=145,75,-272,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4709,'EPSG',4709,'GEOGCS["Iwo Jima 1945",DATUM["Iwo_Jima_1945",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[145,75,-272,0,0,0,0],AUTHORITY["EPSG","6709"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4709"]]','+proj=longlat +ellps=intl +towgs84=145,75,-272,0,0,0,0 +no_defs '); --- --- EPSG 4710 : St. Helena 1971 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4710,'EPSG',4710,'GEOGCS["St. Helena 1971",DATUM["St_Helena_1971",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-320,550,-494,0,0,0,0],AUTHORITY["EPSG","6710"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4710"]]','+proj=longlat +ellps=intl +towgs84=-320,550,-494,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4710,'EPSG',4710,'GEOGCS["St. Helena 1971",DATUM["St_Helena_1971",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-320,550,-494,0,0,0,0],AUTHORITY["EPSG","6710"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4710"]]','+proj=longlat +ellps=intl +towgs84=-320,550,-494,0,0,0,0 +no_defs '); --- --- EPSG 4711 : Marcus Island 1952 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4711,'EPSG',4711,'GEOGCS["Marcus Island 1952",DATUM["Marcus_Island_1952",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[124,-234,-25,0,0,0,0],AUTHORITY["EPSG","6711"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4711"]]','+proj=longlat +ellps=intl +towgs84=124,-234,-25,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4711,'EPSG',4711,'GEOGCS["Marcus Island 1952",DATUM["Marcus_Island_1952",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[124,-234,-25,0,0,0,0],AUTHORITY["EPSG","6711"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4711"]]','+proj=longlat +ellps=intl +towgs84=124,-234,-25,0,0,0,0 +no_defs '); --- --- EPSG 4712 : Ascension Island 1958 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4712,'EPSG',4712,'GEOGCS["Ascension Island 1958",DATUM["Ascension_Island_1958",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-205,107,53,0,0,0,0],AUTHORITY["EPSG","6712"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4712"]]','+proj=longlat +ellps=intl +towgs84=-205,107,53,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4712,'EPSG',4712,'GEOGCS["Ascension Island 1958",DATUM["Ascension_Island_1958",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-205,107,53,0,0,0,0],AUTHORITY["EPSG","6712"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4712"]]','+proj=longlat +ellps=intl +towgs84=-205,107,53,0,0,0,0 +no_defs '); --- --- EPSG 4713 : Ayabelle Lighthouse --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4713,'EPSG',4713,'GEOGCS["Ayabelle Lighthouse",DATUM["Ayabelle_Lighthouse",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-79,-129,145,0,0,0,0],AUTHORITY["EPSG","6713"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4713"]]','+proj=longlat +ellps=clrk80 +towgs84=-79,-129,145,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4713,'EPSG',4713,'GEOGCS["Ayabelle Lighthouse",DATUM["Ayabelle_Lighthouse",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-79,-129,145,0,0,0,0],AUTHORITY["EPSG","6713"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4713"]]','+proj=longlat +ellps=clrk80 +towgs84=-79,-129,145,0,0,0,0 +no_defs '); --- --- EPSG 4714 : Bellevue --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4714,'EPSG',4714,'GEOGCS["Bellevue",DATUM["Bellevue",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-127,-769,472,0,0,0,0],AUTHORITY["EPSG","6714"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4714"]]','+proj=longlat +ellps=intl +towgs84=-127,-769,472,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4714,'EPSG',4714,'GEOGCS["Bellevue",DATUM["Bellevue",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-127,-769,472,0,0,0,0],AUTHORITY["EPSG","6714"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4714"]]','+proj=longlat +ellps=intl +towgs84=-127,-769,472,0,0,0,0 +no_defs '); --- --- EPSG 4715 : Camp Area Astro --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4715,'EPSG',4715,'GEOGCS["Camp Area Astro",DATUM["Camp_Area_Astro",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-104,-129,239,0,0,0,0],AUTHORITY["EPSG","6715"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4715"]]','+proj=longlat +ellps=intl +towgs84=-104,-129,239,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4715,'EPSG',4715,'GEOGCS["Camp Area Astro",DATUM["Camp_Area_Astro",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-104,-129,239,0,0,0,0],AUTHORITY["EPSG","6715"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4715"]]','+proj=longlat +ellps=intl +towgs84=-104,-129,239,0,0,0,0 +no_defs '); --- --- EPSG 4716 : Phoenix Islands 1966 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4716,'EPSG',4716,'GEOGCS["Phoenix Islands 1966",DATUM["Phoenix_Islands_1966",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[298,-304,-375,0,0,0,0],AUTHORITY["EPSG","6716"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4716"]]','+proj=longlat +ellps=intl +towgs84=298,-304,-375,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4716,'EPSG',4716,'GEOGCS["Phoenix Islands 1966",DATUM["Phoenix_Islands_1966",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[298,-304,-375,0,0,0,0],AUTHORITY["EPSG","6716"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4716"]]','+proj=longlat +ellps=intl +towgs84=298,-304,-375,0,0,0,0 +no_defs '); --- --- EPSG 4717 : Cape Canaveral --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4717,'EPSG',4717,'GEOGCS["Cape Canaveral",DATUM["Cape_Canaveral",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-2,151,181,0,0,0,0],AUTHORITY["EPSG","6717"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4717"]]','+proj=longlat +ellps=clrk66 +towgs84=-2,151,181,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4717,'EPSG',4717,'GEOGCS["Cape Canaveral",DATUM["Cape_Canaveral",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-2,151,181,0,0,0,0],AUTHORITY["EPSG","6717"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4717"]]','+proj=longlat +ellps=clrk66 +towgs84=-2,151,181,0,0,0,0 +no_defs '); --- --- EPSG 4718 : Solomon 1968 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4718,'EPSG',4718,'GEOGCS["Solomon 1968",DATUM["Solomon_1968",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6718"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4718"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4718,'EPSG',4718,'GEOGCS["Solomon 1968",DATUM["Solomon_1968",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[252,-209,-751,0,0,0,0],AUTHORITY["EPSG","6718"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4718"]]','+proj=longlat +ellps=intl +towgs84=252,-209,-751,0,0,0,0 +no_defs '); --- --- EPSG 4719 : Easter Island 1967 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4719,'EPSG',4719,'GEOGCS["Easter Island 1967",DATUM["Easter_Island_1967",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[211,147,111,0,0,0,0],AUTHORITY["EPSG","6719"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4719"]]','+proj=longlat +ellps=intl +towgs84=211,147,111,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4719,'EPSG',4719,'GEOGCS["Easter Island 1967",DATUM["Easter_Island_1967",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[211,147,111,0,0,0,0],AUTHORITY["EPSG","6719"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4719"]]','+proj=longlat +ellps=intl +towgs84=211,147,111,0,0,0,0 +no_defs '); --- --- EPSG 4720 : Fiji 1986 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4720,'EPSG',4720,'GEOGCS["Fiji 1986",DATUM["Fiji_Geodetic_Datum_1986",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6720"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4720"]]','+proj=longlat +ellps=WGS72 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4720,'EPSG',4720,'GEOGCS["Fiji 1986",DATUM["Fiji_Geodetic_Datum_1986",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6720"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4720"]]','+proj=longlat +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +no_defs '); --- --- EPSG 4721 : Fiji 1956 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4721,'EPSG',4721,'GEOGCS["Fiji 1956",DATUM["Fiji_1956",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[265.025,384.929,-194.046,0,0,0,0],AUTHORITY["EPSG","6721"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4721"]]','+proj=longlat +ellps=intl +towgs84=265.025,384.929,-194.046,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4721,'EPSG',4721,'GEOGCS["Fiji 1956",DATUM["Fiji_1956",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[265.025,384.929,-194.046,0,0,0,0],AUTHORITY["EPSG","6721"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4721"]]','+proj=longlat +ellps=intl +towgs84=265.025,384.929,-194.046,0,0,0,0 +no_defs '); --- --- EPSG 4722 : South Georgia 1968 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4722,'EPSG',4722,'GEOGCS["South Georgia 1968",DATUM["South_Georgia_1968",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-794,119,-298,0,0,0,0],AUTHORITY["EPSG","6722"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4722"]]','+proj=longlat +ellps=intl +towgs84=-794,119,-298,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4722,'EPSG',4722,'GEOGCS["South Georgia 1968",DATUM["South_Georgia_1968",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-794,119,-298,0,0,0,0],AUTHORITY["EPSG","6722"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4722"]]','+proj=longlat +ellps=intl +towgs84=-794,119,-298,0,0,0,0 +no_defs '); --- --- EPSG 4723 : Grand Cayman 1959 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4723,'EPSG',4723,'GEOGCS["Grand Cayman 1959",DATUM["Grand_Cayman_1959",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[67.8,106.1,138.8,0,0,0,0],AUTHORITY["EPSG","6723"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4723"]]','+proj=longlat +ellps=clrk66 +towgs84=67.8,106.1,138.8,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4723,'EPSG',4723,'GEOGCS["Grand Cayman 1959",DATUM["Grand_Cayman_1959",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[67.8,106.1,138.8,0,0,0,0],AUTHORITY["EPSG","6723"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4723"]]','+proj=longlat +ellps=clrk66 +towgs84=67.8,106.1,138.8,0,0,0,0 +no_defs '); --- --- EPSG 4724 : Diego Garcia 1969 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4724,'EPSG',4724,'GEOGCS["Diego Garcia 1969",DATUM["Diego_Garcia_1969",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[208,-435,-229,0,0,0,0],AUTHORITY["EPSG","6724"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4724"]]','+proj=longlat +ellps=intl +towgs84=208,-435,-229,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4724,'EPSG',4724,'GEOGCS["Diego Garcia 1969",DATUM["Diego_Garcia_1969",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[208,-435,-229,0,0,0,0],AUTHORITY["EPSG","6724"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4724"]]','+proj=longlat +ellps=intl +towgs84=208,-435,-229,0,0,0,0 +no_defs '); --- --- EPSG 4725 : Johnston Island 1961 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4725,'EPSG',4725,'GEOGCS["Johnston Island 1961",DATUM["Johnston_Island_1961",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[189,-79,-202,0,0,0,0],AUTHORITY["EPSG","6725"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4725"]]','+proj=longlat +ellps=intl +towgs84=189,-79,-202,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4725,'EPSG',4725,'GEOGCS["Johnston Island 1961",DATUM["Johnston_Island_1961",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[189,-79,-202,0,0,0,0],AUTHORITY["EPSG","6725"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4725"]]','+proj=longlat +ellps=intl +towgs84=189,-79,-202,0,0,0,0 +no_defs '); --- --- EPSG 4726 : Little Cayman 1961 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4726,'EPSG',4726,'GEOGCS["Little Cayman 1961",DATUM["Little_Cayman_1961",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6726"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4726"]]','+proj=longlat +ellps=clrk66 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4726,'EPSG',4726,'GEOGCS["Little Cayman 1961",DATUM["Little_Cayman_1961",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[42,124,147,0,0,0,0],AUTHORITY["EPSG","6726"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4726"]]','+proj=longlat +ellps=clrk66 +towgs84=42,124,147,0,0,0,0 +no_defs '); --- --- EPSG 4727 : Midway 1961 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4727,'EPSG',4727,'GEOGCS["Midway 1961",DATUM["Midway_1961",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6727"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4727"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4727,'EPSG',4727,'GEOGCS["Midway 1961",DATUM["Midway_1961",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[403,-81,277,0,0,0,0],AUTHORITY["EPSG","6727"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4727"]]','+proj=longlat +ellps=intl +towgs84=403,-81,277,0,0,0,0 +no_defs '); --- --- EPSG 4728 : Pico de las Nieves 1984 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4728,'EPSG',4728,'GEOGCS["Pico de las Nieves 1984",DATUM["Pico_de_las_Nieves_1984",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-307,-92,127,0,0,0,0],AUTHORITY["EPSG","6728"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4728"]]','+proj=longlat +ellps=intl +towgs84=-307,-92,127,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4728,'EPSG',4728,'GEOGCS["Pico de las Nieves 1984",DATUM["Pico_de_las_Nieves_1984",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-307,-92,127,0,0,0,0],AUTHORITY["EPSG","6728"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4728"]]','+proj=longlat +ellps=intl +towgs84=-307,-92,127,0,0,0,0 +no_defs '); --- --- EPSG 4729 : Pitcairn 1967 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4729,'EPSG',4729,'GEOGCS["Pitcairn 1967",DATUM["Pitcairn_1967",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[185,165,42,0,0,0,0],AUTHORITY["EPSG","6729"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4729"]]','+proj=longlat +ellps=intl +towgs84=185,165,42,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4729,'EPSG',4729,'GEOGCS["Pitcairn 1967",DATUM["Pitcairn_1967",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[185,165,42,0,0,0,0],AUTHORITY["EPSG","6729"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4729"]]','+proj=longlat +ellps=intl +towgs84=185,165,42,0,0,0,0 +no_defs '); --- --- EPSG 4730 : Santo 1965 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4730,'EPSG',4730,'GEOGCS["Santo 1965",DATUM["Santo_1965",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[170,42,84,0,0,0,0],AUTHORITY["EPSG","6730"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4730"]]','+proj=longlat +ellps=intl +towgs84=170,42,84,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4730,'EPSG',4730,'GEOGCS["Santo 1965",DATUM["Santo_1965",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[170,42,84,0,0,0,0],AUTHORITY["EPSG","6730"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4730"]]','+proj=longlat +ellps=intl +towgs84=170,42,84,0,0,0,0 +no_defs '); --- --- EPSG 4731 : Viti Levu 1916 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4731,'EPSG',4731,'GEOGCS["Viti Levu 1916",DATUM["Viti_Levu_1916",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[51,391,-36,0,0,0,0],AUTHORITY["EPSG","6731"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4731"]]','+proj=longlat +ellps=clrk80 +towgs84=51,391,-36,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4731,'EPSG',4731,'GEOGCS["Viti Levu 1916",DATUM["Viti_Levu_1916",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[51,391,-36,0,0,0,0],AUTHORITY["EPSG","6731"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4731"]]','+proj=longlat +ellps=clrk80 +towgs84=51,391,-36,0,0,0,0 +no_defs '); --- --- EPSG 4732 : Marshall Islands 1960 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4732,'EPSG',4732,'GEOGCS["Marshall Islands 1960",DATUM["Marshall_Islands_1960",SPHEROID["Hough 1960",6378270,297,AUTHORITY["EPSG","7053"]],TOWGS84[102,52,-38,0,0,0,0],AUTHORITY["EPSG","6732"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4732"]]','+proj=longlat +a=6378270 +b=6356794.343434343 +towgs84=102,52,-38,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4732,'EPSG',4732,'GEOGCS["Marshall Islands 1960",DATUM["Marshall_Islands_1960",SPHEROID["Hough 1960",6378270,297,AUTHORITY["EPSG","7053"]],TOWGS84[102,52,-38,0,0,0,0],AUTHORITY["EPSG","6732"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4732"]]','+proj=longlat +a=6378270 +b=6356794.343434343 +towgs84=102,52,-38,0,0,0,0 +no_defs '); --- --- EPSG 4733 : Wake Island 1952 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4733,'EPSG',4733,'GEOGCS["Wake Island 1952",DATUM["Wake_Island_1952",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[276,-57,149,0,0,0,0],AUTHORITY["EPSG","6733"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4733"]]','+proj=longlat +ellps=intl +towgs84=276,-57,149,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4733,'EPSG',4733,'GEOGCS["Wake Island 1952",DATUM["Wake_Island_1952",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[276,-57,149,0,0,0,0],AUTHORITY["EPSG","6733"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4733"]]','+proj=longlat +ellps=intl +towgs84=276,-57,149,0,0,0,0 +no_defs '); --- --- EPSG 4734 : Tristan 1968 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4734,'EPSG',4734,'GEOGCS["Tristan 1968",DATUM["Tristan_1968",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-632,438,-609,0,0,0,0],AUTHORITY["EPSG","6734"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4734"]]','+proj=longlat +ellps=intl +towgs84=-632,438,-609,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4734,'EPSG',4734,'GEOGCS["Tristan 1968",DATUM["Tristan_1968",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-632,438,-609,0,0,0,0],AUTHORITY["EPSG","6734"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4734"]]','+proj=longlat +ellps=intl +towgs84=-632,438,-609,0,0,0,0 +no_defs '); --- --- EPSG 4735 : Kusaie 1951 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4735,'EPSG',4735,'GEOGCS["Kusaie 1951",DATUM["Kusaie_1951",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[647,1777,-1124,0,0,0,0],AUTHORITY["EPSG","6735"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4735"]]','+proj=longlat +ellps=intl +towgs84=647,1777,-1124,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4735,'EPSG',4735,'GEOGCS["Kusaie 1951",DATUM["Kusaie_1951",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[647,1777,-1124,0,0,0,0],AUTHORITY["EPSG","6735"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4735"]]','+proj=longlat +ellps=intl +towgs84=647,1777,-1124,0,0,0,0 +no_defs '); --- --- EPSG 4736 : Deception Island --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4736,'EPSG',4736,'GEOGCS["Deception Island",DATUM["Deception_Island",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[260,12,-147,0,0,0,0],AUTHORITY["EPSG","6736"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4736"]]','+proj=longlat +ellps=clrk80 +towgs84=260,12,-147,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4736,'EPSG',4736,'GEOGCS["Deception Island",DATUM["Deception_Island",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[260,12,-147,0,0,0,0],AUTHORITY["EPSG","6736"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4736"]]','+proj=longlat +ellps=clrk80 +towgs84=260,12,-147,0,0,0,0 +no_defs '); --- --- EPSG 4737 : Korea 2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4737,'EPSG',4737,'GEOGCS["Korea 2000",DATUM["Geocentric_datum_of_Korea",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6737"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4737"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4737,'EPSG',4737,'GEOGCS["Korea 2000",DATUM["Geocentric_datum_of_Korea",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6737"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4737"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4738 : Hong Kong 1963 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4738,'EPSG',4738,'GEOGCS["Hong Kong 1963",DATUM["Hong_Kong_1963",SPHEROID["Clarke 1858",6378293.645208759,294.2606763692569,AUTHORITY["EPSG","7007"]],AUTHORITY["EPSG","6738"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4738"]]','+proj=longlat +a=6378293.645208759 +b=6356617.987679838 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4738,'EPSG',4738,'GEOGCS["Hong Kong 1963",DATUM["Hong_Kong_1963",SPHEROID["Clarke 1858",6378293.645208759,294.2606763692569,AUTHORITY["EPSG","7007"]],AUTHORITY["EPSG","6738"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4738"]]','+proj=longlat +a=6378293.645208759 +b=6356617.987679838 +no_defs '); --- --- EPSG 4739 : Hong Kong 1963(67) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4739,'EPSG',4739,'GEOGCS["Hong Kong 1963(67)",DATUM["Hong_Kong_1963_67",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-156,-271,-189,0,0,0,0],AUTHORITY["EPSG","6739"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4739"]]','+proj=longlat +ellps=intl +towgs84=-156,-271,-189,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4739,'EPSG',4739,'GEOGCS["Hong Kong 1963(67)",DATUM["Hong_Kong_1963_67",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-156,-271,-189,0,0,0,0],AUTHORITY["EPSG","6739"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4739"]]','+proj=longlat +ellps=intl +towgs84=-156,-271,-189,0,0,0,0 +no_defs '); --- --- EPSG 4740 : PZ-90 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4740,'EPSG',4740,'GEOGCS["PZ-90",DATUM["Parametrop_Zemp_1990",SPHEROID["PZ-90",6378136,298.257839303,AUTHORITY["EPSG","7054"]],AUTHORITY["EPSG","6740"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4740"]]','+proj=longlat +a=6378136 +b=6356751.361745712 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4740,'EPSG',4740,'GEOGCS["PZ-90",DATUM["Parametrop_Zemp_1990",SPHEROID["PZ-90",6378136,298.257839303,AUTHORITY["EPSG","7054"]],TOWGS84[0,0,1.5,-0,-0,0.076,0],AUTHORITY["EPSG","6740"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4740"]]','+proj=longlat +a=6378136 +b=6356751.361745712 +towgs84=0,0,1.5,-0,-0,0.076,0 +no_defs '); --- --- EPSG 4741 : FD54 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4741,'EPSG',4741,'GEOGCS["FD54",DATUM["Faroe_Datum_1954",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6741"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4741"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4741,'EPSG',4741,'GEOGCS["FD54",DATUM["Faroe_Datum_1954",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6741"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4741"]]','+proj=longlat +ellps=intl +no_defs '); --- --- EPSG 4742 : GDM2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4742,'EPSG',4742,'GEOGCS["GDM2000",DATUM["Geodetic_Datum_of_Malaysia_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6742"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4742"]]','+proj=longlat +ellps=GRS80 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4742,'EPSG',4742,'GEOGCS["GDM2000",DATUM["Geodetic_Datum_of_Malaysia_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6742"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4742"]]','+proj=longlat +ellps=GRS80 +no_defs '); --- --- EPSG 4743 : Karbala 1979 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4743,'EPSG',4743,'GEOGCS["Karbala 1979",DATUM["Karbala_1979",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[84.1,-320.1,218.7,0,0,0,0],AUTHORITY["EPSG","6743"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4743"]]','+proj=longlat +ellps=clrk80 +towgs84=84.1,-320.1,218.7,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4743,'EPSG',4743,'GEOGCS["Karbala 1979",DATUM["Karbala_1979",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[84.1,-320.1,218.7,0,0,0,0],AUTHORITY["EPSG","6743"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4743"]]','+proj=longlat +ellps=clrk80 +towgs84=84.1,-320.1,218.7,0,0,0,0 +no_defs '); --- --- EPSG 4744 : Nahrwan 1934 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4744,'EPSG',4744,'GEOGCS["Nahrwan 1934",DATUM["Nahrwan_1934",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6744"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4744"]]','+proj=longlat +ellps=clrk80 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4744,'EPSG',4744,'GEOGCS["Nahrwan 1934",DATUM["Nahrwan_1934",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6744"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4744"]]','+proj=longlat +ellps=clrk80 +no_defs '); --- --- EPSG 4745 : RD/83 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4745,'EPSG',4745,'GEOGCS["RD/83",DATUM["Rauenberg_Datum_83",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6745"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4745"]]','+proj=longlat +ellps=bessel +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4745,'EPSG',4745,'GEOGCS["RD/83",DATUM["Rauenberg_Datum_83",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6745"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4745"]]','+proj=longlat +ellps=bessel +no_defs '); --- --- EPSG 4746 : PD/83 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4746,'EPSG',4746,'GEOGCS["PD/83",DATUM["Potsdam_Datum_83",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6746"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4746"]]','+proj=longlat +ellps=bessel +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4746,'EPSG',4746,'GEOGCS["PD/83",DATUM["Potsdam_Datum_83",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6746"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4746"]]','+proj=longlat +ellps=bessel +no_defs '); --- --- EPSG 4747 : GR96 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4747,'EPSG',4747,'GEOGCS["GR96",DATUM["Greenland_1996",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6747"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4747"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4747,'EPSG',4747,'GEOGCS["GR96",DATUM["Greenland_1996",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6747"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4747"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4748 : Vanua Levu 1915 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4748,'EPSG',4748,'GEOGCS["Vanua Levu 1915",DATUM["Vanua_Levu_1915",SPHEROID["Clarke 1880 (international foot)",6378306.3696,293.4663076556349,AUTHORITY["EPSG","7055"]],TOWGS84[51,391,-36,0,0,0,0],AUTHORITY["EPSG","6748"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4748"]]','+proj=longlat +a=6378306.3696 +b=6356571.996 +towgs84=51,391,-36,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4748,'EPSG',4748,'GEOGCS["Vanua Levu 1915",DATUM["Vanua_Levu_1915",SPHEROID["Clarke 1880 (international foot)",6378306.3696,293.4663076556349,AUTHORITY["EPSG","7055"]],TOWGS84[51,391,-36,0,0,0,0],AUTHORITY["EPSG","6748"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4748"]]','+proj=longlat +a=6378306.3696 +b=6356571.996 +towgs84=51,391,-36,0,0,0,0 +no_defs '); --- --- EPSG 4749 : RGNC91-93 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4749,'EPSG',4749,'GEOGCS["RGNC91-93",DATUM["Reseau_Geodesique_de_Nouvelle_Caledonie_91_93",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6749"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4749"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4749,'EPSG',4749,'GEOGCS["RGNC91-93",DATUM["Reseau_Geodesique_de_Nouvelle_Caledonie_91_93",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6749"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4749"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4750 : ST87 Ouvea --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4750,'EPSG',4750,'GEOGCS["ST87 Ouvea",DATUM["ST87_Ouvea",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[-56.263,16.136,-22.856,0,0,0,0],AUTHORITY["EPSG","6750"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4750"]]','+proj=longlat +ellps=WGS84 +towgs84=-56.263,16.136,-22.856,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4750,'EPSG',4750,'GEOGCS["ST87 Ouvea",DATUM["ST87_Ouvea",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[-56.263,16.136,-22.856,0,0,0,0],AUTHORITY["EPSG","6750"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4750"]]','+proj=longlat +ellps=WGS84 +towgs84=-56.263,16.136,-22.856,0,0,0,0 +no_defs '); --- --- EPSG 4751 : Kertau (RSO) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4751,'EPSG',4751,'GEOGCS["Kertau (RSO)",DATUM["Kertau_RSO",SPHEROID["Everest 1830 (RSO 1969)",6377295.664,300.8017,AUTHORITY["EPSG","7056"]],AUTHORITY["EPSG","6751"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4751"]]','+proj=longlat +a=6377295.664 +b=6356094.667915204 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4751,'EPSG',4751,'GEOGCS["Kertau (RSO)",DATUM["Kertau_RSO",SPHEROID["Everest 1830 (RSO 1969)",6377295.664,300.8017,AUTHORITY["EPSG","7056"]],AUTHORITY["EPSG","6751"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4751"]]','+proj=longlat +a=6377295.664 +b=6356094.667915204 +no_defs '); --- --- EPSG 4752 : Viti Levu 1912 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4752,'EPSG',4752,'GEOGCS["Viti Levu 1912",DATUM["Viti_Levu_1912",SPHEROID["Clarke 1880 (international foot)",6378306.3696,293.4663076556349,AUTHORITY["EPSG","7055"]],TOWGS84[51,391,-36,0,0,0,0],AUTHORITY["EPSG","6752"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4752"]]','+proj=longlat +a=6378306.3696 +b=6356571.996 +towgs84=51,391,-36,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4752,'EPSG',4752,'GEOGCS["Viti Levu 1912",DATUM["Viti_Levu_1912",SPHEROID["Clarke 1880 (international foot)",6378306.3696,293.4663076556349,AUTHORITY["EPSG","7055"]],TOWGS84[51,391,-36,0,0,0,0],AUTHORITY["EPSG","6752"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4752"]]','+proj=longlat +a=6378306.3696 +b=6356571.996 +towgs84=51,391,-36,0,0,0,0 +no_defs '); --- --- EPSG 4753 : fk89 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4753,'EPSG',4753,'GEOGCS["fk89",DATUM["fk89",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6753"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4753"]]','+proj=longlat +ellps=intl +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4753,'EPSG',4753,'GEOGCS["fk89",DATUM["fk89",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6753"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4753"]]','+proj=longlat +ellps=intl +no_defs '); --- --- EPSG 4754 : LGD2006 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4754,'EPSG',4754,'GEOGCS["LGD2006",DATUM["Libyan_Geodetic_Datum_2006",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY["EPSG","6754"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4754"]]','+proj=longlat +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4754,'EPSG',4754,'GEOGCS["LGD2006",DATUM["Libyan_Geodetic_Datum_2006",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY["EPSG","6754"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4754"]]','+proj=longlat +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +no_defs '); --- --- EPSG 4755 : DGN95 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4755,'EPSG',4755,'GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]]','+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4755,'EPSG',4755,'GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]]','+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4756 : VN-2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4756,'EPSG',4756,'GEOGCS["VN-2000",DATUM["Vietnam_2000",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6756"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4756"]]','+proj=longlat +ellps=WGS84 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4756,'EPSG',4756,'GEOGCS["VN-2000",DATUM["Vietnam_2000",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6756"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4756"]]','+proj=longlat +ellps=WGS84 +no_defs '); --- --- EPSG 4757 : SVY21 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4757,'EPSG',4757,'GEOGCS["SVY21",DATUM["SVY21",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6757"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4757"]]','+proj=longlat +ellps=WGS84 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4757,'EPSG',4757,'GEOGCS["SVY21",DATUM["SVY21",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6757"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4757"]]','+proj=longlat +ellps=WGS84 +no_defs '); --- --- EPSG 4758 : JAD2001 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4758,'EPSG',4758,'GEOGCS["JAD2001",DATUM["Jamaica_2001",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6758"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4758"]]','+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4758,'EPSG',4758,'GEOGCS["JAD2001",DATUM["Jamaica_2001",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6758"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4758"]]','+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4759 : NAD83(NSRS2007) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4759,'EPSG',4759,'GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4759,'EPSG',4759,'GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4760 : WGS 66 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4760,'EPSG',4760,'GEOGCS["WGS 66",DATUM["World_Geodetic_System_1966",SPHEROID["NWL 9D",6378145,298.25,AUTHORITY["EPSG","7025"]],AUTHORITY["EPSG","6760"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4760"]]','+proj=longlat +ellps=WGS66 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4760,'EPSG',4760,'GEOGCS["WGS 66",DATUM["World_Geodetic_System_1966",SPHEROID["NWL 9D",6378145,298.25,AUTHORITY["EPSG","7025"]],AUTHORITY["EPSG","6760"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4760"]]','+proj=longlat +ellps=WGS66 +no_defs '); --- --- EPSG 4761 : HTRS96 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4761,'EPSG',4761,'GEOGCS["HTRS96",DATUM["Croatian_Terrestrial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6761"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4761"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4761,'EPSG',4761,'GEOGCS["HTRS96",DATUM["Croatian_Terrestrial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6761"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4761"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4762 : BDA2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4762,'EPSG',4762,'GEOGCS["BDA2000",DATUM["Bermuda_2000",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6762"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4762"]]','+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4762,'EPSG',4762,'GEOGCS["BDA2000",DATUM["Bermuda_2000",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6762"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4762"]]','+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4763 : Pitcairn 2006 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4763,'EPSG',4763,'GEOGCS["Pitcairn 2006",DATUM["Pitcairn_2006",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6763"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4763"]]','+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4763,'EPSG',4763,'GEOGCS["Pitcairn 2006",DATUM["Pitcairn_2006",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6763"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4763"]]','+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4764 : RSRGD2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4764,'EPSG',4764,'GEOGCS["RSRGD2000",DATUM["Ross_Sea_Region_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6764"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4764"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4764,'EPSG',4764,'GEOGCS["RSRGD2000",DATUM["Ross_Sea_Region_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6764"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4764"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4765 : Slovenia 1996 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4765,'EPSG',4765,'GEOGCS["Slovenia 1996",DATUM["Slovenia_Geodetic_Datum_1996",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6765"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4765"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4765,'EPSG',4765,'GEOGCS["Slovenia 1996",DATUM["Slovenia_Geodetic_Datum_1996",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6765"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4765"]]','+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '); --- --- EPSG 4801 : Bern 1898 (Bern) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4801,'EPSG',4801,'GEOGCS["Bern 1898 (Bern)",DATUM["CH1903_Bern",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6801"]],PRIMEM["Bern",7.439583333333333,AUTHORITY["EPSG","8907"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4801"]]','+proj=longlat +ellps=bessel +pm=bern +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4801,'EPSG',4801,'GEOGCS["Bern 1898 (Bern)",DATUM["CH1903_Bern",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[674.4,15.1,405.3,0,0,0,0],AUTHORITY["EPSG","6801"]],PRIMEM["Bern",7.439583333333333,AUTHORITY["EPSG","8907"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4801"]]','+proj=longlat +ellps=bessel +towgs84=674.4,15.1,405.3,0,0,0,0 +pm=bern +no_defs '); --- --- EPSG 4802 : Bogota 1975 (Bogota) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4802,'EPSG',4802,'GEOGCS["Bogota 1975 (Bogota)",DATUM["Bogota_1975_Bogota",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6802"]],PRIMEM["Bogota",-74.08091666666667,AUTHORITY["EPSG","8904"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4802"]]','+proj=longlat +ellps=intl +pm=bogota +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4802,'EPSG',4802,'GEOGCS["Bogota 1975 (Bogota)",DATUM["Bogota_1975_Bogota",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[307,304,-318,0,0,0,0],AUTHORITY["EPSG","6802"]],PRIMEM["Bogota",-74.08091666666667,AUTHORITY["EPSG","8904"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4802"]]','+proj=longlat +ellps=intl +towgs84=307,304,-318,0,0,0,0 +pm=bogota +no_defs '); --- --- EPSG 4803 : Lisbon (Lisbon) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4803,'EPSG',4803,'GEOGCS["Lisbon (Lisbon)",DATUM["Lisbon_1937_Lisbon",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6803"]],PRIMEM["Lisbon",-9.131906111111112,AUTHORITY["EPSG","8902"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4803"]]','+proj=longlat +ellps=intl +pm=lisbon +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4803,'EPSG',4803,'GEOGCS["Lisbon (Lisbon)",DATUM["Lisbon_1937_Lisbon",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-304.046,-60.576,103.64,0,0,0,0],AUTHORITY["EPSG","6803"]],PRIMEM["Lisbon",-9.131906111111112,AUTHORITY["EPSG","8902"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4803"]]','+proj=longlat +ellps=intl +towgs84=-304.046,-60.576,103.64,0,0,0,0 +pm=lisbon +no_defs '); --- --- EPSG 4804 : Makassar (Jakarta) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4804,'EPSG',4804,'GEOGCS["Makassar (Jakarta)",DATUM["Makassar_Jakarta",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-587.8,519.75,145.76,0,0,0,0],AUTHORITY["EPSG","6804"]],PRIMEM["Jakarta",106.8077194444444,AUTHORITY["EPSG","8908"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4804"]]','+proj=longlat +ellps=bessel +towgs84=-587.8,519.75,145.76,0,0,0,0 +pm=jakarta +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4804,'EPSG',4804,'GEOGCS["Makassar (Jakarta)",DATUM["Makassar_Jakarta",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-587.8,519.75,145.76,0,0,0,0],AUTHORITY["EPSG","6804"]],PRIMEM["Jakarta",106.8077194444444,AUTHORITY["EPSG","8908"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4804"]]','+proj=longlat +ellps=bessel +towgs84=-587.8,519.75,145.76,0,0,0,0 +pm=jakarta +no_defs '); --- --- EPSG 4805 : MGI (Ferro) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4805,'EPSG',4805,'GEOGCS["MGI (Ferro)",DATUM["Militar_Geographische_Institut_Ferro",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6805"]],PRIMEM["Ferro",-17.66666666666667,AUTHORITY["EPSG","8909"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4805"]]','+proj=longlat +ellps=bessel +pm=ferro +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4805,'EPSG',4805,'GEOGCS["MGI (Ferro)",DATUM["Militar_Geographische_Institut_Ferro",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[682,-203,480,0,0,0,0],AUTHORITY["EPSG","6805"]],PRIMEM["Ferro",-17.66666666666667,AUTHORITY["EPSG","8909"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4805"]]','+proj=longlat +ellps=bessel +towgs84=682,-203,480,0,0,0,0 +pm=ferro +no_defs '); --- --- EPSG 4806 : Monte Mario (Rome) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4806,'EPSG',4806,'GEOGCS["Monte Mario (Rome)",DATUM["Monte_Mario_Rome",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6806"]],PRIMEM["Rome",12.45233333333333,AUTHORITY["EPSG","8906"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4806"]]','+proj=longlat +ellps=intl +pm=rome +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4806,'EPSG',4806,'GEOGCS["Monte Mario (Rome)",DATUM["Monte_Mario_Rome",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68],AUTHORITY["EPSG","6806"]],PRIMEM["Rome",12.45233333333333,AUTHORITY["EPSG","8906"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4806"]]','+proj=longlat +ellps=intl +towgs84=-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68 +pm=rome +no_defs '); --- --- EPSG 4807 : NTF (Paris) --- @@ -1650,11 +1678,11 @@ --- --- EPSG 4808 : Padang (Jakarta) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4808,'EPSG',4808,'GEOGCS["Padang (Jakarta)",DATUM["Padang_1884_Jakarta",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6808"]],PRIMEM["Jakarta",106.8077194444444,AUTHORITY["EPSG","8908"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4808"]]','+proj=longlat +ellps=bessel +pm=jakarta +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4808,'EPSG',4808,'GEOGCS["Padang (Jakarta)",DATUM["Padang_1884_Jakarta",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6808"]],PRIMEM["Jakarta",106.8077194444444,AUTHORITY["EPSG","8908"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4808"]]','+proj=longlat +ellps=bessel +pm=jakarta +no_defs '); --- --- EPSG 4809 : Belge 1950 (Brussels) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4809,'EPSG',4809,'GEOGCS["Belge 1950 (Brussels)",DATUM["Reseau_National_Belge_1950_Brussels",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6809"]],PRIMEM["Brussels",4.367975,AUTHORITY["EPSG","8910"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4809"]]','+proj=longlat +ellps=intl +pm=brussels +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4809,'EPSG',4809,'GEOGCS["Belge 1950 (Brussels)",DATUM["Reseau_National_Belge_1950_Brussels",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6809"]],PRIMEM["Brussels",4.367975,AUTHORITY["EPSG","8910"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4809"]]','+proj=longlat +ellps=intl +pm=brussels +no_defs '); --- --- EPSG 4810 : Tananarive (Paris) --- @@ -1666,43 +1694,51 @@ --- --- EPSG 4813 : Batavia (Jakarta) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4813,'EPSG',4813,'GEOGCS["Batavia (Jakarta)",DATUM["Batavia_Jakarta",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6813"]],PRIMEM["Jakarta",106.8077194444444,AUTHORITY["EPSG","8908"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4813"]]','+proj=longlat +ellps=bessel +pm=jakarta +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4813,'EPSG',4813,'GEOGCS["Batavia (Jakarta)",DATUM["Batavia_Jakarta",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-377,681,-50,0,0,0,0],AUTHORITY["EPSG","6813"]],PRIMEM["Jakarta",106.8077194444444,AUTHORITY["EPSG","8908"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4813"]]','+proj=longlat +ellps=bessel +towgs84=-377,681,-50,0,0,0,0 +pm=jakarta +no_defs '); --- --- EPSG 4814 : RT38 (Stockholm) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4814,'EPSG',4814,'GEOGCS["RT38 (Stockholm)",DATUM["Stockholm_1938_Stockholm",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6814"]],PRIMEM["Stockholm",18.05827777777778,AUTHORITY["EPSG","8911"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4814"]]','+proj=longlat +ellps=bessel +pm=stockholm +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4814,'EPSG',4814,'GEOGCS["RT38 (Stockholm)",DATUM["Stockholm_1938_Stockholm",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6814"]],PRIMEM["Stockholm",18.05827777777778,AUTHORITY["EPSG","8911"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4814"]]','+proj=longlat +ellps=bessel +pm=stockholm +no_defs '); --- --- EPSG 4815 : Greek (Athens) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4815,'EPSG',4815,'GEOGCS["Greek (Athens)",DATUM["Greek_Athens",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6815"]],PRIMEM["Athens",23.7163375,AUTHORITY["EPSG","8912"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4815"]]','+proj=longlat +ellps=bessel +pm=athens +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4815,'EPSG',4815,'GEOGCS["Greek (Athens)",DATUM["Greek_Athens",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6815"]],PRIMEM["Athens",23.7163375,AUTHORITY["EPSG","8912"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4815"]]','+proj=longlat +ellps=bessel +pm=athens +no_defs '); --- --- EPSG 4816 : Carthage (Paris) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4816,'EPSG',4816,'GEOGCS["Carthage (Paris)",DATUM["Carthage_Paris",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],AUTHORITY["EPSG","6816"]],PRIMEM["Paris",2.33722917,AUTHORITY["EPSG","8903"]],UNIT["grad",0.01570796326794897,AUTHORITY["EPSG","9105"]],AUTHORITY["EPSG","4816"]]','+proj=longlat +a=6378249.2 +b=6356515 +pm=paris +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4816,'EPSG',4816,'GEOGCS["Carthage (Paris)",DATUM["Carthage_Paris",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-263,6,431,0,0,0,0],AUTHORITY["EPSG","6816"]],PRIMEM["Paris",2.33722917,AUTHORITY["EPSG","8903"]],UNIT["grad",0.01570796326794897,AUTHORITY["EPSG","9105"]],AUTHORITY["EPSG","4816"]]','+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-263,6,431,0,0,0,0 +pm=paris +no_defs '); --- --- EPSG 4817 : NGO 1948 (Oslo) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4817,'EPSG',4817,'GEOGCS["NGO 1948 (Oslo)",DATUM["NGO_1948_Oslo",SPHEROID["Bessel Modified",6377492.018,299.1528128,AUTHORITY["EPSG","7005"]],TOWGS84[278.3,93,474.5,7.889,0.05,-6.61,6.21],AUTHORITY["EPSG","6817"]],PRIMEM["Oslo",10.72291666666667,AUTHORITY["EPSG","8913"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4817"]]','+proj=longlat +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4817,'EPSG',4817,'GEOGCS["NGO 1948 (Oslo)",DATUM["NGO_1948_Oslo",SPHEROID["Bessel Modified",6377492.018,299.1528128,AUTHORITY["EPSG","7005"]],TOWGS84[278.3,93,474.5,7.889,0.05,-6.61,6.21],AUTHORITY["EPSG","6817"]],PRIMEM["Oslo",10.72291666666667,AUTHORITY["EPSG","8913"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4817"]]','+proj=longlat +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +no_defs '); --- --- EPSG 4818 : S-JTSK (Ferro) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4818,'EPSG',4818,'GEOGCS["S-JTSK (Ferro)",DATUM["S_JTSK_Ferro",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6818"]],PRIMEM["Ferro",-17.66666666666667,AUTHORITY["EPSG","8909"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4818"]]','+proj=longlat +ellps=bessel +pm=ferro +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4818,'EPSG',4818,'GEOGCS["S-JTSK (Ferro)",DATUM["S_JTSK_Ferro",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[589,76,480,0,0,0,0],AUTHORITY["EPSG","6818"]],PRIMEM["Ferro",-17.66666666666667,AUTHORITY["EPSG","8909"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4818"]]','+proj=longlat +ellps=bessel +towgs84=589,76,480,0,0,0,0 +pm=ferro +no_defs '); --- --- EPSG 4819 : Nord Sahara 1959 (Paris) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4819,'EPSG',4819,'GEOGCS["Nord Sahara 1959 (Paris)",DATUM["Nord_Sahara_1959_Paris",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6819"]],PRIMEM["Paris",2.33722917,AUTHORITY["EPSG","8903"]],UNIT["grad",0.01570796326794897,AUTHORITY["EPSG","9105"]],AUTHORITY["EPSG","4819"]]','+proj=longlat +ellps=clrk80 +pm=paris +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4819,'EPSG',4819,'GEOGCS["Nord Sahara 1959 (Paris)",DATUM["Nord_Sahara_1959_Paris",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-186,-93,310,0,0,0,0],AUTHORITY["EPSG","6819"]],PRIMEM["Paris",2.33722917,AUTHORITY["EPSG","8903"]],UNIT["grad",0.01570796326794897,AUTHORITY["EPSG","9105"]],AUTHORITY["EPSG","4819"]]','+proj=longlat +ellps=clrk80 +towgs84=-186,-93,310,0,0,0,0 +pm=paris +no_defs '); --- --- EPSG 4820 : Segara (Jakarta) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4820,'EPSG',4820,'GEOGCS["Segara (Jakarta)",DATUM["Gunung_Segara_Jakarta",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6820"]],PRIMEM["Jakarta",106.8077194444444,AUTHORITY["EPSG","8908"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4820"]]','+proj=longlat +ellps=bessel +pm=jakarta +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4820,'EPSG',4820,'GEOGCS["Segara (Jakarta)",DATUM["Gunung_Segara_Jakarta",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-403,684,41,0,0,0,0],AUTHORITY["EPSG","6820"]],PRIMEM["Jakarta",106.8077194444444,AUTHORITY["EPSG","8908"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4820"]]','+proj=longlat +ellps=bessel +towgs84=-403,684,41,0,0,0,0 +pm=jakarta +no_defs '); --- --- EPSG 4821 : Voirol 1879 (Paris) --- INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4821,'EPSG',4821,'GEOGCS["Voirol 1879 (Paris)",DATUM["Voirol_1879_Paris",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],AUTHORITY["EPSG","6821"]],PRIMEM["Paris",2.33722917,AUTHORITY["EPSG","8903"]],UNIT["grad",0.01570796326794897,AUTHORITY["EPSG","9105"]],AUTHORITY["EPSG","4821"]]','+proj=longlat +a=6378249.2 +b=6356515 +pm=paris +no_defs '); --- ---- EPSG 4901 : unnamed ellipse +--- EPSG 4823 : Sao Tome +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4823,'EPSG',4823,'GEOGCS["Sao Tome",DATUM["Sao_Tome",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","1044"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4823"]]','+proj=longlat +ellps=intl +no_defs '); +--- +--- EPSG 4824 : Principe --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4901,'EPSG',4901,'GEOGCS["unnamed ellipse",DATUM["unknown",SPHEROID["unnamed",6376523,308.6399999999991]],PRIMEM["paris",2.3372291666985],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4901"]]','+proj=longlat +a=6376523 +b=6355862.933255573 +pm=2.3372291666985 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4824,'EPSG',4824,'GEOGCS["Principe",DATUM["Principe",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","1046"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4824"]]','+proj=longlat +ellps=intl +no_defs '); +--- +--- EPSG 4901 : ATF (Paris) +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4901,'EPSG',4901,'GEOGCS["ATF (Paris)",DATUM["Ancienne_Triangulation_Francaise_Paris",SPHEROID["Plessis 1817",6376523,308.64,AUTHORITY["EPSG","7027"]],AUTHORITY["EPSG","6901"]],PRIMEM["Paris RGS",2.337208333333333,AUTHORITY["EPSG","8914"]],UNIT["grad",0.01570796326794897,AUTHORITY["EPSG","9105"]],AUTHORITY["EPSG","4901"]]','+proj=longlat +a=6376523 +b=6355862.933255573 +pm=2.337208333333333 +no_defs '); --- --- EPSG 4902 : NDG (Paris) --- @@ -1710,159 +1746,255 @@ --- --- EPSG 4903 : Madrid 1870 (Madrid) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4903,'EPSG',4903,'GEOGCS["Madrid 1870 (Madrid)",DATUM["Madrid_1870_Madrid",SPHEROID["Struve 1860",6378298.3,294.73,AUTHORITY["EPSG","7028"]],AUTHORITY["EPSG","6903"]],PRIMEM["Madrid",-3.687938888888889,AUTHORITY["EPSG","8905"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4903"]]','+proj=longlat +a=6378298.3 +b=6356657.142669561 +pm=madrid +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4903,'EPSG',4903,'GEOGCS["Madrid 1870 (Madrid)",DATUM["Madrid_1870_Madrid",SPHEROID["Struve 1860",6378298.3,294.73,AUTHORITY["EPSG","7028"]],AUTHORITY["EPSG","6903"]],PRIMEM["Madrid",-3.687938888888889,AUTHORITY["EPSG","8905"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4903"]]','+proj=longlat +a=6378298.3 +b=6356657.142669561 +pm=madrid +no_defs '); --- --- EPSG 4904 : Lisbon 1890 (Lisbon) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4904,'EPSG',4904,'GEOGCS["Lisbon 1890 (Lisbon)",DATUM["Lisbon_1890_Lisbon",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6904"]],PRIMEM["Lisbon",-9.131906111111112,AUTHORITY["EPSG","8902"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4904"]]','+proj=longlat +ellps=bessel +pm=lisbon +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4904,'EPSG',4904,'GEOGCS["Lisbon 1890 (Lisbon)",DATUM["Lisbon_1890_Lisbon",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[508.088,-191.042,565.223,0,0,0,0],AUTHORITY["EPSG","6904"]],PRIMEM["Lisbon",-9.131906111111112,AUTHORITY["EPSG","8902"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4904"]]','+proj=longlat +ellps=bessel +towgs84=508.088,-191.042,565.223,0,0,0,0 +pm=lisbon +no_defs '); +--- +--- EPSG 5013 : None +--- +-- (unable to translate) +--- +--- EPSG 5132 : None +--- +-- (unable to translate) +--- +--- EPSG 5228 : None +--- +-- (unable to translate) +--- +--- EPSG 5229 : None +--- +-- (unable to translate) +--- +--- EPSG 5233 : None +--- +-- (unable to translate) +--- +--- EPSG 5246 : None +--- +-- (unable to translate) +--- +--- EPSG 5252 : None +--- +-- (unable to translate) +--- +--- EPSG 5264 : None +--- +-- (unable to translate) +--- +--- EPSG 5324 : None +--- +-- (unable to translate) +--- +--- EPSG 5340 : None +--- +-- (unable to translate) +--- +--- EPSG 5354 : None +--- +-- (unable to translate) +--- +--- EPSG 5360 : None +--- +-- (unable to translate) +--- +--- EPSG 5365 : None +--- +-- (unable to translate) +--- +--- EPSG 5371 : None +--- +-- (unable to translate) +--- +--- EPSG 5373 : None +--- +-- (unable to translate) +--- +--- EPSG 5381 : None +--- +-- (unable to translate) +--- +--- EPSG 5393 : None +--- +-- (unable to translate) +--- +--- EPSG 5451 : None +--- +-- (unable to translate) +--- +--- EPSG 5464 : None +--- +-- (unable to translate) +--- +--- EPSG 5467 : None +--- +-- (unable to translate) +--- +--- EPSG 5489 : None +--- +-- (unable to translate) +--- +--- EPSG 5524 : None +--- +-- (unable to translate) +--- +--- EPSG 5527 : None +--- +-- (unable to translate) +--- +--- EPSG 5546 : None +--- +-- (unable to translate) --- --- EPSG 2000 : Anguilla 1957 / British West Indies Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2000,'EPSG',2000,'PROJCS["Anguilla 1957 / British West Indies Grid",GEOGCS["Anguilla 1957",DATUM["Anguilla_1957",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6600"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4600"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-62],PARAMETER["scale_factor",0.9995],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2000"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001 +x_0=400000 +y_0=0 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2000,'EPSG',2000,'PROJCS["Anguilla 1957 / British West Indies Grid",GEOGCS["Anguilla 1957",DATUM["Anguilla_1957",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6600"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4600"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-62],PARAMETER["scale_factor",0.9995],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2000"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001 +x_0=400000 +y_0=0 +ellps=clrk80 +units=m +no_defs '); --- --- EPSG 2001 : Antigua 1943 / British West Indies Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2001,'EPSG',2001,'PROJCS["Antigua 1943 / British West Indies Grid",GEOGCS["Antigua 1943",DATUM["Antigua_1943",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6601"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4601"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-62],PARAMETER["scale_factor",0.9995],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2001"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001 +x_0=400000 +y_0=0 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2001,'EPSG',2001,'PROJCS["Antigua 1943 / British West Indies Grid",GEOGCS["Antigua 1943",DATUM["Antigua_1943",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-255,-15,71,0,0,0,0],AUTHORITY["EPSG","6601"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4601"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-62],PARAMETER["scale_factor",0.9995],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2001"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001 +x_0=400000 +y_0=0 +ellps=clrk80 +towgs84=-255,-15,71,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2002 : Dominica 1945 / British West Indies Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2002,'EPSG',2002,'PROJCS["Dominica 1945 / British West Indies Grid",GEOGCS["Dominica 1945",DATUM["Dominica_1945",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[725,685,536,0,0,0,0],AUTHORITY["EPSG","6602"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4602"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-62],PARAMETER["scale_factor",0.9995],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2002"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001 +x_0=400000 +y_0=0 +ellps=clrk80 +towgs84=725,685,536,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2002,'EPSG',2002,'PROJCS["Dominica 1945 / British West Indies Grid",GEOGCS["Dominica 1945",DATUM["Dominica_1945",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[725,685,536,0,0,0,0],AUTHORITY["EPSG","6602"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4602"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-62],PARAMETER["scale_factor",0.9995],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2002"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001 +x_0=400000 +y_0=0 +ellps=clrk80 +towgs84=725,685,536,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2003 : Grenada 1953 / British West Indies Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2003,'EPSG',2003,'PROJCS["Grenada 1953 / British West Indies Grid",GEOGCS["Grenada 1953",DATUM["Grenada_1953",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[72,213.7,93,0,0,0,0],AUTHORITY["EPSG","6603"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4603"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-62],PARAMETER["scale_factor",0.9995],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2003"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001 +x_0=400000 +y_0=0 +ellps=clrk80 +towgs84=72,213.7,93,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2003,'EPSG',2003,'PROJCS["Grenada 1953 / British West Indies Grid",GEOGCS["Grenada 1953",DATUM["Grenada_1953",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[72,213.7,93,0,0,0,0],AUTHORITY["EPSG","6603"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4603"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-62],PARAMETER["scale_factor",0.9995],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2003"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001 +x_0=400000 +y_0=0 +ellps=clrk80 +towgs84=72,213.7,93,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2004 : Montserrat 1958 / British West Indies Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2004,'EPSG',2004,'PROJCS["Montserrat 1958 / British West Indies Grid",GEOGCS["Montserrat 1958",DATUM["Montserrat_1958",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[174,359,365,0,0,0,0],AUTHORITY["EPSG","6604"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4604"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-62],PARAMETER["scale_factor",0.9995],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2004"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001 +x_0=400000 +y_0=0 +ellps=clrk80 +towgs84=174,359,365,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2004,'EPSG',2004,'PROJCS["Montserrat 1958 / British West Indies Grid",GEOGCS["Montserrat 1958",DATUM["Montserrat_1958",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[174,359,365,0,0,0,0],AUTHORITY["EPSG","6604"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4604"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-62],PARAMETER["scale_factor",0.9995],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2004"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001 +x_0=400000 +y_0=0 +ellps=clrk80 +towgs84=174,359,365,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2005 : St. Kitts 1955 / British West Indies Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2005,'EPSG',2005,'PROJCS["St. Kitts 1955 / British West Indies Grid",GEOGCS["St. Kitts 1955",DATUM["St_Kitts_1955",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6605"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4605"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-62],PARAMETER["scale_factor",0.9995],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2005"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001 +x_0=400000 +y_0=0 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2005,'EPSG',2005,'PROJCS["St. Kitts 1955 / British West Indies Grid",GEOGCS["St. Kitts 1955",DATUM["St_Kitts_1955",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[9,183,236,0,0,0,0],AUTHORITY["EPSG","6605"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4605"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-62],PARAMETER["scale_factor",0.9995],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2005"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001 +x_0=400000 +y_0=0 +ellps=clrk80 +towgs84=9,183,236,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2006 : St. Lucia 1955 / British West Indies Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2006,'EPSG',2006,'PROJCS["St. Lucia 1955 / British West Indies Grid",GEOGCS["St. Lucia 1955",DATUM["St_Lucia_1955",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-149,128,296,0,0,0,0],AUTHORITY["EPSG","6606"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4606"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-62],PARAMETER["scale_factor",0.9995],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2006"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001 +x_0=400000 +y_0=0 +ellps=clrk80 +towgs84=-149,128,296,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2006,'EPSG',2006,'PROJCS["St. Lucia 1955 / British West Indies Grid",GEOGCS["St. Lucia 1955",DATUM["St_Lucia_1955",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-149,128,296,0,0,0,0],AUTHORITY["EPSG","6606"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4606"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-62],PARAMETER["scale_factor",0.9995],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2006"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001 +x_0=400000 +y_0=0 +ellps=clrk80 +towgs84=-149,128,296,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2007 : St. Vincent 45 / British West Indies Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2007,'EPSG',2007,'PROJCS["St. Vincent 45 / British West Indies Grid",GEOGCS["St. Vincent 1945",DATUM["St_Vincent_1945",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[195.671,332.517,274.607,0,0,0,0],AUTHORITY["EPSG","6607"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4607"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-62],PARAMETER["scale_factor",0.9995],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2007"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001 +x_0=400000 +y_0=0 +ellps=clrk80 +towgs84=195.671,332.517,274.607,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2007,'EPSG',2007,'PROJCS["St. Vincent 45 / British West Indies Grid",GEOGCS["St. Vincent 1945",DATUM["St_Vincent_1945",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[195.671,332.517,274.607,0,0,0,0],AUTHORITY["EPSG","6607"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4607"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-62],PARAMETER["scale_factor",0.9995],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2007"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001 +x_0=400000 +y_0=0 +ellps=clrk80 +towgs84=195.671,332.517,274.607,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2008 : NAD27(CGQ77) / SCoPQ zone 2 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2008,'EPSG',2008,'PROJCS["NAD27(CGQ77) / SCoPQ zone 2",GEOGCS["NAD27(CGQ77)",DATUM["North_American_Datum_1927_CGQ77",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6609"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4609"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-55.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2008"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-55.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2008,'EPSG',2008,'PROJCS["NAD27(CGQ77) / SCoPQ zone 2",GEOGCS["NAD27(CGQ77)",DATUM["North_American_Datum_1927_CGQ77",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6609"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4609"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-55.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2008"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-55.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs '); --- --- EPSG 2009 : NAD27(CGQ77) / SCoPQ zone 3 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2009,'EPSG',2009,'PROJCS["NAD27(CGQ77) / SCoPQ zone 3",GEOGCS["NAD27(CGQ77)",DATUM["North_American_Datum_1927_CGQ77",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6609"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4609"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-58.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2009"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-58.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2009,'EPSG',2009,'PROJCS["NAD27(CGQ77) / SCoPQ zone 3",GEOGCS["NAD27(CGQ77)",DATUM["North_American_Datum_1927_CGQ77",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6609"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4609"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-58.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2009"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-58.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs '); --- --- EPSG 2010 : NAD27(CGQ77) / SCoPQ zone 4 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2010,'EPSG',2010,'PROJCS["NAD27(CGQ77) / SCoPQ zone 4",GEOGCS["NAD27(CGQ77)",DATUM["North_American_Datum_1927_CGQ77",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6609"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4609"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-61.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2010"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-61.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2010,'EPSG',2010,'PROJCS["NAD27(CGQ77) / SCoPQ zone 4",GEOGCS["NAD27(CGQ77)",DATUM["North_American_Datum_1927_CGQ77",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6609"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4609"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-61.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2010"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-61.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs '); --- --- EPSG 2011 : NAD27(CGQ77) / SCoPQ zone 5 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2011,'EPSG',2011,'PROJCS["NAD27(CGQ77) / SCoPQ zone 5",GEOGCS["NAD27(CGQ77)",DATUM["North_American_Datum_1927_CGQ77",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6609"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4609"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-64.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2011"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-64.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2011,'EPSG',2011,'PROJCS["NAD27(CGQ77) / SCoPQ zone 5",GEOGCS["NAD27(CGQ77)",DATUM["North_American_Datum_1927_CGQ77",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6609"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4609"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-64.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2011"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-64.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs '); --- --- EPSG 2012 : NAD27(CGQ77) / SCoPQ zone 6 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2012,'EPSG',2012,'PROJCS["NAD27(CGQ77) / SCoPQ zone 6",GEOGCS["NAD27(CGQ77)",DATUM["North_American_Datum_1927_CGQ77",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6609"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4609"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-67.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2012"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-67.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2012,'EPSG',2012,'PROJCS["NAD27(CGQ77) / SCoPQ zone 6",GEOGCS["NAD27(CGQ77)",DATUM["North_American_Datum_1927_CGQ77",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6609"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4609"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-67.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2012"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-67.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs '); --- --- EPSG 2013 : NAD27(CGQ77) / SCoPQ zone 7 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2013,'EPSG',2013,'PROJCS["NAD27(CGQ77) / SCoPQ zone 7",GEOGCS["NAD27(CGQ77)",DATUM["North_American_Datum_1927_CGQ77",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6609"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4609"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-70.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2013"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-70.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2013,'EPSG',2013,'PROJCS["NAD27(CGQ77) / SCoPQ zone 7",GEOGCS["NAD27(CGQ77)",DATUM["North_American_Datum_1927_CGQ77",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6609"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4609"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-70.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2013"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-70.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs '); --- --- EPSG 2014 : NAD27(CGQ77) / SCoPQ zone 8 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2014,'EPSG',2014,'PROJCS["NAD27(CGQ77) / SCoPQ zone 8",GEOGCS["NAD27(CGQ77)",DATUM["North_American_Datum_1927_CGQ77",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6609"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4609"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-73.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2014"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-73.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2014,'EPSG',2014,'PROJCS["NAD27(CGQ77) / SCoPQ zone 8",GEOGCS["NAD27(CGQ77)",DATUM["North_American_Datum_1927_CGQ77",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6609"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4609"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-73.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2014"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-73.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs '); --- --- EPSG 2015 : NAD27(CGQ77) / SCoPQ zone 9 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2015,'EPSG',2015,'PROJCS["NAD27(CGQ77) / SCoPQ zone 9",GEOGCS["NAD27(CGQ77)",DATUM["North_American_Datum_1927_CGQ77",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6609"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4609"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-76.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2015"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-76.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2015,'EPSG',2015,'PROJCS["NAD27(CGQ77) / SCoPQ zone 9",GEOGCS["NAD27(CGQ77)",DATUM["North_American_Datum_1927_CGQ77",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6609"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4609"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-76.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2015"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-76.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs '); --- --- EPSG 2016 : NAD27(CGQ77) / SCoPQ zone 10 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2016,'EPSG',2016,'PROJCS["NAD27(CGQ77) / SCoPQ zone 10",GEOGCS["NAD27(CGQ77)",DATUM["North_American_Datum_1927_CGQ77",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6609"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4609"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-79.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2016"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-79.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2016,'EPSG',2016,'PROJCS["NAD27(CGQ77) / SCoPQ zone 10",GEOGCS["NAD27(CGQ77)",DATUM["North_American_Datum_1927_CGQ77",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6609"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4609"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-79.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2016"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-79.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs '); --- --- EPSG 2017 : NAD27(76) / MTM zone 8 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2017,'EPSG',2017,'PROJCS["NAD27(76) / MTM zone 8",GEOGCS["NAD27(76)",DATUM["North_American_Datum_1927_1976",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6608"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4608"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-73.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2017"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-73.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2017,'EPSG',2017,'PROJCS["NAD27(76) / MTM zone 8",GEOGCS["NAD27(76)",DATUM["North_American_Datum_1927_1976",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6608"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4608"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-73.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2017"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-73.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs '); --- --- EPSG 2018 : NAD27(76) / MTM zone 9 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2018,'EPSG',2018,'PROJCS["NAD27(76) / MTM zone 9",GEOGCS["NAD27(76)",DATUM["North_American_Datum_1927_1976",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6608"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4608"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-76.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2018"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-76.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2018,'EPSG',2018,'PROJCS["NAD27(76) / MTM zone 9",GEOGCS["NAD27(76)",DATUM["North_American_Datum_1927_1976",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6608"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4608"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-76.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2018"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-76.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs '); --- --- EPSG 2019 : NAD27(76) / MTM zone 10 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2019,'EPSG',2019,'PROJCS["NAD27(76) / MTM zone 10",GEOGCS["NAD27(76)",DATUM["North_American_Datum_1927_1976",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6608"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4608"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-79.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2019"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-79.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2019,'EPSG',2019,'PROJCS["NAD27(76) / MTM zone 10",GEOGCS["NAD27(76)",DATUM["North_American_Datum_1927_1976",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6608"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4608"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-79.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2019"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-79.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs '); --- --- EPSG 2020 : NAD27(76) / MTM zone 11 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2020,'EPSG',2020,'PROJCS["NAD27(76) / MTM zone 11",GEOGCS["NAD27(76)",DATUM["North_American_Datum_1927_1976",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6608"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4608"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-82.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2020"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-82.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2020,'EPSG',2020,'PROJCS["NAD27(76) / MTM zone 11",GEOGCS["NAD27(76)",DATUM["North_American_Datum_1927_1976",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6608"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4608"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-82.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2020"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-82.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs '); --- --- EPSG 2021 : NAD27(76) / MTM zone 12 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2021,'EPSG',2021,'PROJCS["NAD27(76) / MTM zone 12",GEOGCS["NAD27(76)",DATUM["North_American_Datum_1927_1976",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6608"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4608"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2021"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-81 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2021,'EPSG',2021,'PROJCS["NAD27(76) / MTM zone 12",GEOGCS["NAD27(76)",DATUM["North_American_Datum_1927_1976",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6608"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4608"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2021"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-81 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs '); --- --- EPSG 2022 : NAD27(76) / MTM zone 13 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2022,'EPSG',2022,'PROJCS["NAD27(76) / MTM zone 13",GEOGCS["NAD27(76)",DATUM["North_American_Datum_1927_1976",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6608"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4608"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-84],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2022"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-84 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2022,'EPSG',2022,'PROJCS["NAD27(76) / MTM zone 13",GEOGCS["NAD27(76)",DATUM["North_American_Datum_1927_1976",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6608"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4608"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-84],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2022"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-84 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs '); --- --- EPSG 2023 : NAD27(76) / MTM zone 14 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2023,'EPSG',2023,'PROJCS["NAD27(76) / MTM zone 14",GEOGCS["NAD27(76)",DATUM["North_American_Datum_1927_1976",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6608"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4608"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2023"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-87 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2023,'EPSG',2023,'PROJCS["NAD27(76) / MTM zone 14",GEOGCS["NAD27(76)",DATUM["North_American_Datum_1927_1976",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6608"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4608"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2023"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-87 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs '); --- --- EPSG 2024 : NAD27(76) / MTM zone 15 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2024,'EPSG',2024,'PROJCS["NAD27(76) / MTM zone 15",GEOGCS["NAD27(76)",DATUM["North_American_Datum_1927_1976",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6608"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4608"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-90],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2024"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-90 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2024,'EPSG',2024,'PROJCS["NAD27(76) / MTM zone 15",GEOGCS["NAD27(76)",DATUM["North_American_Datum_1927_1976",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6608"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4608"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-90],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2024"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-90 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs '); --- --- EPSG 2025 : NAD27(76) / MTM zone 16 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2025,'EPSG',2025,'PROJCS["NAD27(76) / MTM zone 16",GEOGCS["NAD27(76)",DATUM["North_American_Datum_1927_1976",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6608"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4608"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2025"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-93 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2025,'EPSG',2025,'PROJCS["NAD27(76) / MTM zone 16",GEOGCS["NAD27(76)",DATUM["North_American_Datum_1927_1976",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6608"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4608"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2025"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-93 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs '); --- --- EPSG 2026 : NAD27(76) / MTM zone 17 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2026,'EPSG',2026,'PROJCS["NAD27(76) / MTM zone 17",GEOGCS["NAD27(76)",DATUM["North_American_Datum_1927_1976",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6608"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4608"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-96],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2026"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-96 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2026,'EPSG',2026,'PROJCS["NAD27(76) / MTM zone 17",GEOGCS["NAD27(76)",DATUM["North_American_Datum_1927_1976",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6608"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4608"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-96],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2026"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-96 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +no_defs '); --- --- EPSG 2027 : NAD27(76) / UTM zone 15N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2027,'EPSG',2027,'PROJCS["NAD27(76) / UTM zone 15N",GEOGCS["NAD27(76)",DATUM["North_American_Datum_1927_1976",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6608"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4608"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2027"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=15 +ellps=clrk66 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2027,'EPSG',2027,'PROJCS["NAD27(76) / UTM zone 15N",GEOGCS["NAD27(76)",DATUM["North_American_Datum_1927_1976",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6608"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4608"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2027"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=15 +ellps=clrk66 +units=m +no_defs '); --- --- EPSG 2028 : NAD27(76) / UTM zone 16N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2028,'EPSG',2028,'PROJCS["NAD27(76) / UTM zone 16N",GEOGCS["NAD27(76)",DATUM["North_American_Datum_1927_1976",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6608"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4608"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2028"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=16 +ellps=clrk66 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2028,'EPSG',2028,'PROJCS["NAD27(76) / UTM zone 16N",GEOGCS["NAD27(76)",DATUM["North_American_Datum_1927_1976",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6608"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4608"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2028"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=16 +ellps=clrk66 +units=m +no_defs '); --- --- EPSG 2029 : NAD27(76) / UTM zone 17N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2029,'EPSG',2029,'PROJCS["NAD27(76) / UTM zone 17N",GEOGCS["NAD27(76)",DATUM["North_American_Datum_1927_1976",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6608"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4608"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2029"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +ellps=clrk66 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2029,'EPSG',2029,'PROJCS["NAD27(76) / UTM zone 17N",GEOGCS["NAD27(76)",DATUM["North_American_Datum_1927_1976",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6608"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4608"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2029"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +ellps=clrk66 +units=m +no_defs '); --- --- EPSG 2030 : NAD27(76) / UTM zone 18N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2030,'EPSG',2030,'PROJCS["NAD27(76) / UTM zone 18N",GEOGCS["NAD27(76)",DATUM["North_American_Datum_1927_1976",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6608"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4608"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2030"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +ellps=clrk66 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2030,'EPSG',2030,'PROJCS["NAD27(76) / UTM zone 18N",GEOGCS["NAD27(76)",DATUM["North_American_Datum_1927_1976",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6608"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4608"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2030"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +ellps=clrk66 +units=m +no_defs '); --- --- EPSG 2031 : NAD27(CGQ77) / UTM zone 17N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2031,'EPSG',2031,'PROJCS["NAD27(CGQ77) / UTM zone 17N",GEOGCS["NAD27(CGQ77)",DATUM["North_American_Datum_1927_CGQ77",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6609"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4609"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2031"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +ellps=clrk66 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2031,'EPSG',2031,'PROJCS["NAD27(CGQ77) / UTM zone 17N",GEOGCS["NAD27(CGQ77)",DATUM["North_American_Datum_1927_CGQ77",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6609"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4609"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2031"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +ellps=clrk66 +units=m +no_defs '); --- --- EPSG 2032 : NAD27(CGQ77) / UTM zone 18N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2032,'EPSG',2032,'PROJCS["NAD27(CGQ77) / UTM zone 18N",GEOGCS["NAD27(CGQ77)",DATUM["North_American_Datum_1927_CGQ77",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6609"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4609"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2032"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +ellps=clrk66 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2032,'EPSG',2032,'PROJCS["NAD27(CGQ77) / UTM zone 18N",GEOGCS["NAD27(CGQ77)",DATUM["North_American_Datum_1927_CGQ77",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6609"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4609"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2032"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +ellps=clrk66 +units=m +no_defs '); --- --- EPSG 2033 : NAD27(CGQ77) / UTM zone 19N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2033,'EPSG',2033,'PROJCS["NAD27(CGQ77) / UTM zone 19N",GEOGCS["NAD27(CGQ77)",DATUM["North_American_Datum_1927_CGQ77",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6609"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4609"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2033"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +ellps=clrk66 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2033,'EPSG',2033,'PROJCS["NAD27(CGQ77) / UTM zone 19N",GEOGCS["NAD27(CGQ77)",DATUM["North_American_Datum_1927_CGQ77",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6609"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4609"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2033"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +ellps=clrk66 +units=m +no_defs '); --- --- EPSG 2034 : NAD27(CGQ77) / UTM zone 20N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2034,'EPSG',2034,'PROJCS["NAD27(CGQ77) / UTM zone 20N",GEOGCS["NAD27(CGQ77)",DATUM["North_American_Datum_1927_CGQ77",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6609"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4609"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2034"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=clrk66 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2034,'EPSG',2034,'PROJCS["NAD27(CGQ77) / UTM zone 20N",GEOGCS["NAD27(CGQ77)",DATUM["North_American_Datum_1927_CGQ77",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6609"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4609"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2034"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=clrk66 +units=m +no_defs '); --- --- EPSG 2035 : NAD27(CGQ77) / UTM zone 21N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2035,'EPSG',2035,'PROJCS["NAD27(CGQ77) / UTM zone 21N",GEOGCS["NAD27(CGQ77)",DATUM["North_American_Datum_1927_CGQ77",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6609"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4609"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2035"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +ellps=clrk66 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2035,'EPSG',2035,'PROJCS["NAD27(CGQ77) / UTM zone 21N",GEOGCS["NAD27(CGQ77)",DATUM["North_American_Datum_1927_CGQ77",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6609"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4609"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2035"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +ellps=clrk66 +units=m +no_defs '); --- --- EPSG 2036 : NAD83(CSRS98) / New Brunswick Stereo (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2036,'EPSG',2036,'PROJCS["NAD83(CSRS98) / New Brunswick Stereo (deprecated)",GEOGCS["NAD83(CSRS98)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4140"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",46.5],PARAMETER["central_meridian",-66.5],PARAMETER["scale_factor",0.999912],PARAMETER["false_easting",2500000],PARAMETER["false_northing",7500000],AUTHORITY["EPSG","2036"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=sterea +lat_0=46.5 +lon_0=-66.5 +k=0.999912 +x_0=2500000 +y_0=7500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2036,'EPSG',2036,'PROJCS["NAD83(CSRS98) / New Brunswick Stereo (deprecated)",GEOGCS["NAD83(CSRS98)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4140"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",46.5],PARAMETER["central_meridian",-66.5],PARAMETER["scale_factor",0.999912],PARAMETER["false_easting",2500000],PARAMETER["false_northing",7500000],AUTHORITY["EPSG","2036"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=sterea +lat_0=46.5 +lon_0=-66.5 +k=0.999912 +x_0=2500000 +y_0=7500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2037 : NAD83(CSRS98) / UTM zone 19N (deprecated) --- @@ -1874,403 +2006,403 @@ --- --- EPSG 2039 : Israel / Israeli TM Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2039,'EPSG',2039,'PROJCS["Israel / Israeli TM Grid",GEOGCS["Israel",DATUM["Israel",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[-48,55,52,0,0,0,0],AUTHORITY["EPSG","6141"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4141"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31.73439361111111],PARAMETER["central_meridian",35.20451694444445],PARAMETER["scale_factor",1.0000067],PARAMETER["false_easting",219529.584],PARAMETER["false_northing",626907.39],AUTHORITY["EPSG","2039"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=31.73439361111111 +lon_0=35.20451694444445 +k=1.0000067 +x_0=219529.584 +y_0=626907.39 +ellps=GRS80 +towgs84=-48,55,52,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2039,'EPSG',2039,'PROJCS["Israel / Israeli TM Grid",GEOGCS["Israel",DATUM["Israel",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[-48,55,52,0,0,0,0],AUTHORITY["EPSG","6141"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4141"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31.73439361111111],PARAMETER["central_meridian",35.20451694444445],PARAMETER["scale_factor",1.0000067],PARAMETER["false_easting",219529.584],PARAMETER["false_northing",626907.39],AUTHORITY["EPSG","2039"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=31.73439361111111 +lon_0=35.20451694444445 +k=1.0000067 +x_0=219529.584 +y_0=626907.39 +ellps=GRS80 +towgs84=-48,55,52,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2040 : Locodjo 1965 / UTM zone 30N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2040,'EPSG',2040,'PROJCS["Locodjo 1965 / UTM zone 30N",GEOGCS["Locodjo 1965",DATUM["Locodjo_1965",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-125,53,467,0,0,0,0],AUTHORITY["EPSG","6142"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4142"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2040"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=30 +ellps=clrk80 +towgs84=-125,53,467,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2040,'EPSG',2040,'PROJCS["Locodjo 1965 / UTM zone 30N",GEOGCS["Locodjo 1965",DATUM["Locodjo_1965",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-125,53,467,0,0,0,0],AUTHORITY["EPSG","6142"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4142"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2040"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=30 +ellps=clrk80 +towgs84=-125,53,467,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2041 : Abidjan 1987 / UTM zone 30N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2041,'EPSG',2041,'PROJCS["Abidjan 1987 / UTM zone 30N",GEOGCS["Abidjan 1987",DATUM["Abidjan_1987",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-124.76,53,466.79,0,0,0,0],AUTHORITY["EPSG","6143"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4143"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2041"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=30 +ellps=clrk80 +towgs84=-124.76,53,466.79,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2041,'EPSG',2041,'PROJCS["Abidjan 1987 / UTM zone 30N",GEOGCS["Abidjan 1987",DATUM["Abidjan_1987",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-124.76,53,466.79,0,0,0,0],AUTHORITY["EPSG","6143"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4143"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2041"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=30 +ellps=clrk80 +towgs84=-124.76,53,466.79,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2042 : Locodjo 1965 / UTM zone 29N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2042,'EPSG',2042,'PROJCS["Locodjo 1965 / UTM zone 29N",GEOGCS["Locodjo 1965",DATUM["Locodjo_1965",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-125,53,467,0,0,0,0],AUTHORITY["EPSG","6142"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4142"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2042"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +ellps=clrk80 +towgs84=-125,53,467,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2042,'EPSG',2042,'PROJCS["Locodjo 1965 / UTM zone 29N",GEOGCS["Locodjo 1965",DATUM["Locodjo_1965",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-125,53,467,0,0,0,0],AUTHORITY["EPSG","6142"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4142"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2042"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +ellps=clrk80 +towgs84=-125,53,467,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2043 : Abidjan 1987 / UTM zone 29N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2043,'EPSG',2043,'PROJCS["Abidjan 1987 / UTM zone 29N",GEOGCS["Abidjan 1987",DATUM["Abidjan_1987",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-124.76,53,466.79,0,0,0,0],AUTHORITY["EPSG","6143"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4143"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2043"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +ellps=clrk80 +towgs84=-124.76,53,466.79,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2043,'EPSG',2043,'PROJCS["Abidjan 1987 / UTM zone 29N",GEOGCS["Abidjan 1987",DATUM["Abidjan_1987",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-124.76,53,466.79,0,0,0,0],AUTHORITY["EPSG","6143"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4143"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2043"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +ellps=clrk80 +towgs84=-124.76,53,466.79,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2044 : Hanoi 1972 / Gauss-Kruger zone 18 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2044,'EPSG',2044,'PROJCS["Hanoi 1972 / Gauss-Kruger zone 18",GEOGCS["Hanoi 1972",DATUM["Hanoi_1972",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[-17.51,-108.32,-62.39,0,0,0,0],AUTHORITY["EPSG","6147"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4147"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",18500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2044"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=18500000 +y_0=0 +ellps=krass +towgs84=-17.51,-108.32,-62.39,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2044,'EPSG',2044,'PROJCS["Hanoi 1972 / Gauss-Kruger zone 18",GEOGCS["Hanoi 1972",DATUM["Hanoi_1972",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[-17.51,-108.32,-62.39,0,0,0,0],AUTHORITY["EPSG","6147"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4147"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",18500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2044"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=18500000 +y_0=0 +ellps=krass +towgs84=-17.51,-108.32,-62.39,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2045 : Hanoi 1972 / Gauss-Kruger zone 19 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2045,'EPSG',2045,'PROJCS["Hanoi 1972 / Gauss-Kruger zone 19",GEOGCS["Hanoi 1972",DATUM["Hanoi_1972",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[-17.51,-108.32,-62.39,0,0,0,0],AUTHORITY["EPSG","6147"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4147"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",19500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2045"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=19500000 +y_0=0 +ellps=krass +towgs84=-17.51,-108.32,-62.39,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2045,'EPSG',2045,'PROJCS["Hanoi 1972 / Gauss-Kruger zone 19",GEOGCS["Hanoi 1972",DATUM["Hanoi_1972",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[-17.51,-108.32,-62.39,0,0,0,0],AUTHORITY["EPSG","6147"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4147"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",19500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2045"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=19500000 +y_0=0 +ellps=krass +towgs84=-17.51,-108.32,-62.39,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2046 : Hartebeesthoek94 / Lo15 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2046,'EPSG',2046,'PROJCS["Hartebeesthoek94 / Lo15",GEOGCS["Hartebeesthoek94",DATUM["Hartebeesthoek94",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6148"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4148"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2046"],AXIS["Y",WEST],AXIS["X",SOUTH]]',''); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2046,'EPSG',2046,'PROJCS["Hartebeesthoek94 / Lo15",GEOGCS["Hartebeesthoek94",DATUM["Hartebeesthoek94",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6148"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4148"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2046"],AXIS["Y",WEST],AXIS["X",SOUTH]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=0 +y_0=0 +axis=wsu +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2047 : Hartebeesthoek94 / Lo17 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2047,'EPSG',2047,'PROJCS["Hartebeesthoek94 / Lo17",GEOGCS["Hartebeesthoek94",DATUM["Hartebeesthoek94",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6148"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4148"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",17],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2047"],AXIS["Y",WEST],AXIS["X",SOUTH]]',''); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2047,'EPSG',2047,'PROJCS["Hartebeesthoek94 / Lo17",GEOGCS["Hartebeesthoek94",DATUM["Hartebeesthoek94",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6148"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4148"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",17],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2047"],AXIS["Y",WEST],AXIS["X",SOUTH]]','+proj=tmerc +lat_0=0 +lon_0=17 +k=1 +x_0=0 +y_0=0 +axis=wsu +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2048 : Hartebeesthoek94 / Lo19 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2048,'EPSG',2048,'PROJCS["Hartebeesthoek94 / Lo19",GEOGCS["Hartebeesthoek94",DATUM["Hartebeesthoek94",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6148"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4148"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",19],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2048"],AXIS["Y",WEST],AXIS["X",SOUTH]]',''); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2048,'EPSG',2048,'PROJCS["Hartebeesthoek94 / Lo19",GEOGCS["Hartebeesthoek94",DATUM["Hartebeesthoek94",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6148"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4148"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",19],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2048"],AXIS["Y",WEST],AXIS["X",SOUTH]]','+proj=tmerc +lat_0=0 +lon_0=19 +k=1 +x_0=0 +y_0=0 +axis=wsu +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2049 : Hartebeesthoek94 / Lo21 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2049,'EPSG',2049,'PROJCS["Hartebeesthoek94 / Lo21",GEOGCS["Hartebeesthoek94",DATUM["Hartebeesthoek94",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6148"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4148"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2049"],AXIS["Y",WEST],AXIS["X",SOUTH]]',''); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2049,'EPSG',2049,'PROJCS["Hartebeesthoek94 / Lo21",GEOGCS["Hartebeesthoek94",DATUM["Hartebeesthoek94",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6148"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4148"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2049"],AXIS["Y",WEST],AXIS["X",SOUTH]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=0 +y_0=0 +axis=wsu +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2050 : Hartebeesthoek94 / Lo23 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2050,'EPSG',2050,'PROJCS["Hartebeesthoek94 / Lo23",GEOGCS["Hartebeesthoek94",DATUM["Hartebeesthoek94",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6148"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4148"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",23],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2050"],AXIS["Y",WEST],AXIS["X",SOUTH]]',''); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2050,'EPSG',2050,'PROJCS["Hartebeesthoek94 / Lo23",GEOGCS["Hartebeesthoek94",DATUM["Hartebeesthoek94",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6148"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4148"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",23],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2050"],AXIS["Y",WEST],AXIS["X",SOUTH]]','+proj=tmerc +lat_0=0 +lon_0=23 +k=1 +x_0=0 +y_0=0 +axis=wsu +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2051 : Hartebeesthoek94 / Lo25 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2051,'EPSG',2051,'PROJCS["Hartebeesthoek94 / Lo25",GEOGCS["Hartebeesthoek94",DATUM["Hartebeesthoek94",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6148"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4148"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",25],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2051"],AXIS["Y",WEST],AXIS["X",SOUTH]]',''); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2051,'EPSG',2051,'PROJCS["Hartebeesthoek94 / Lo25",GEOGCS["Hartebeesthoek94",DATUM["Hartebeesthoek94",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6148"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4148"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",25],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2051"],AXIS["Y",WEST],AXIS["X",SOUTH]]','+proj=tmerc +lat_0=0 +lon_0=25 +k=1 +x_0=0 +y_0=0 +axis=wsu +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2052 : Hartebeesthoek94 / Lo27 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2052,'EPSG',2052,'PROJCS["Hartebeesthoek94 / Lo27",GEOGCS["Hartebeesthoek94",DATUM["Hartebeesthoek94",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6148"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4148"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2052"],AXIS["Y",WEST],AXIS["X",SOUTH]]',''); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2052,'EPSG',2052,'PROJCS["Hartebeesthoek94 / Lo27",GEOGCS["Hartebeesthoek94",DATUM["Hartebeesthoek94",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6148"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4148"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2052"],AXIS["Y",WEST],AXIS["X",SOUTH]]','+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=0 +y_0=0 +axis=wsu +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2053 : Hartebeesthoek94 / Lo29 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2053,'EPSG',2053,'PROJCS["Hartebeesthoek94 / Lo29",GEOGCS["Hartebeesthoek94",DATUM["Hartebeesthoek94",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6148"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4148"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",29],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2053"],AXIS["Y",WEST],AXIS["X",SOUTH]]',''); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2053,'EPSG',2053,'PROJCS["Hartebeesthoek94 / Lo29",GEOGCS["Hartebeesthoek94",DATUM["Hartebeesthoek94",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6148"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4148"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",29],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2053"],AXIS["Y",WEST],AXIS["X",SOUTH]]','+proj=tmerc +lat_0=0 +lon_0=29 +k=1 +x_0=0 +y_0=0 +axis=wsu +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2054 : Hartebeesthoek94 / Lo31 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2054,'EPSG',2054,'PROJCS["Hartebeesthoek94 / Lo31",GEOGCS["Hartebeesthoek94",DATUM["Hartebeesthoek94",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6148"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4148"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",31],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2054"],AXIS["Y",WEST],AXIS["X",SOUTH]]',''); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2054,'EPSG',2054,'PROJCS["Hartebeesthoek94 / Lo31",GEOGCS["Hartebeesthoek94",DATUM["Hartebeesthoek94",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6148"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4148"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",31],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2054"],AXIS["Y",WEST],AXIS["X",SOUTH]]','+proj=tmerc +lat_0=0 +lon_0=31 +k=1 +x_0=0 +y_0=0 +axis=wsu +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2055 : Hartebeesthoek94 / Lo33 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2055,'EPSG',2055,'PROJCS["Hartebeesthoek94 / Lo33",GEOGCS["Hartebeesthoek94",DATUM["Hartebeesthoek94",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6148"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4148"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2055"],AXIS["Y",WEST],AXIS["X",SOUTH]]',''); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2055,'EPSG',2055,'PROJCS["Hartebeesthoek94 / Lo33",GEOGCS["Hartebeesthoek94",DATUM["Hartebeesthoek94",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6148"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4148"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2055"],AXIS["Y",WEST],AXIS["X",SOUTH]]','+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=0 +y_0=0 +axis=wsu +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2056 : CH1903+ / LV95 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2056,'EPSG',2056,'PROJCS["CH1903+ / LV95",GEOGCS["CH1903+",DATUM["CH1903",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[674.374,15.056,405.346,0,0,0,0],AUTHORITY["EPSG","6150"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4150"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",46.95240555555556],PARAMETER["longitude_of_center",7.439583333333333],PARAMETER["azimuth",90],PARAMETER["rectified_grid_angle",90],PARAMETER["scale_factor",1],PARAMETER["false_easting",2600000],PARAMETER["false_northing",1200000],AUTHORITY["EPSG","2056"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +x_0=2600000 +y_0=1200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2056,'EPSG',2056,'PROJCS["CH1903+ / LV95",GEOGCS["CH1903+",DATUM["CH1903+",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[674.374,15.056,405.346,0,0,0,0],AUTHORITY["EPSG","6150"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4150"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",46.95240555555556],PARAMETER["longitude_of_center",7.439583333333333],PARAMETER["azimuth",90],PARAMETER["rectified_grid_angle",90],PARAMETER["scale_factor",1],PARAMETER["false_easting",2600000],PARAMETER["false_northing",1200000],AUTHORITY["EPSG","2056"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 +x_0=2600000 +y_0=1200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2057 : Rassadiran / Nakhl e Taqi --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2057,'EPSG',2057,'PROJCS["Rassadiran / Nakhl e Taqi",GEOGCS["Rassadiran",DATUM["Rassadiran",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-133.63,-157.5,-158.62,0,0,0,0],AUTHORITY["EPSG","6153"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4153"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",27.51882880555555],PARAMETER["longitude_of_center",52.60353916666667],PARAMETER["azimuth",0.5716611944444444],PARAMETER["rectified_grid_angle",0.5716611944444444],PARAMETER["scale_factor",0.999895934],PARAMETER["false_easting",658377.437],PARAMETER["false_northing",3044969.194],AUTHORITY["EPSG","2057"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=omerc +lat_0=27.51882880555555 +lonc=52.60353916666667 +alpha=0.5716611944444444 +k=0.999895934 +x_0=658377.437 +y_0=3044969.194 +ellps=intl +towgs84=-133.63,-157.5,-158.62,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2057,'EPSG',2057,'PROJCS["Rassadiran / Nakhl e Taqi",GEOGCS["Rassadiran",DATUM["Rassadiran",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-133.63,-157.5,-158.62,0,0,0,0],AUTHORITY["EPSG","6153"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4153"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",27.51882880555555],PARAMETER["longitude_of_center",52.60353916666667],PARAMETER["azimuth",0.5716611944444444],PARAMETER["rectified_grid_angle",0.5716611944444444],PARAMETER["scale_factor",0.999895934],PARAMETER["false_easting",658377.437],PARAMETER["false_northing",3044969.194],AUTHORITY["EPSG","2057"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=omerc +lat_0=27.51882880555555 +lonc=52.60353916666667 +alpha=0.5716611944444444 +k=0.999895934 +x_0=658377.437 +y_0=3044969.194 +gamma=0.5716611944444444 +ellps=intl +towgs84=-133.63,-157.5,-158.62,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2058 : ED50(ED77) / UTM zone 38N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2058,'EPSG',2058,'PROJCS["ED50(ED77) / UTM zone 38N",GEOGCS["ED50(ED77)",DATUM["European_Datum_1950_1977",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6154"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4154"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2058"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2058,'EPSG',2058,'PROJCS["ED50(ED77) / UTM zone 38N",GEOGCS["ED50(ED77)",DATUM["European_Datum_1950_1977",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-117,-132,-164,0,0,0,0],AUTHORITY["EPSG","6154"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4154"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2058"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +ellps=intl +towgs84=-117,-132,-164,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2059 : ED50(ED77) / UTM zone 39N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2059,'EPSG',2059,'PROJCS["ED50(ED77) / UTM zone 39N",GEOGCS["ED50(ED77)",DATUM["European_Datum_1950_1977",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6154"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4154"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2059"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=39 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2059,'EPSG',2059,'PROJCS["ED50(ED77) / UTM zone 39N",GEOGCS["ED50(ED77)",DATUM["European_Datum_1950_1977",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-117,-132,-164,0,0,0,0],AUTHORITY["EPSG","6154"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4154"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2059"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=39 +ellps=intl +towgs84=-117,-132,-164,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2060 : ED50(ED77) / UTM zone 40N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2060,'EPSG',2060,'PROJCS["ED50(ED77) / UTM zone 40N",GEOGCS["ED50(ED77)",DATUM["European_Datum_1950_1977",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6154"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4154"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2060"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=40 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2060,'EPSG',2060,'PROJCS["ED50(ED77) / UTM zone 40N",GEOGCS["ED50(ED77)",DATUM["European_Datum_1950_1977",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-117,-132,-164,0,0,0,0],AUTHORITY["EPSG","6154"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4154"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2060"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=40 +ellps=intl +towgs84=-117,-132,-164,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2061 : ED50(ED77) / UTM zone 41N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2061,'EPSG',2061,'PROJCS["ED50(ED77) / UTM zone 41N",GEOGCS["ED50(ED77)",DATUM["European_Datum_1950_1977",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6154"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4154"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2061"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=41 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2061,'EPSG',2061,'PROJCS["ED50(ED77) / UTM zone 41N",GEOGCS["ED50(ED77)",DATUM["European_Datum_1950_1977",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-117,-132,-164,0,0,0,0],AUTHORITY["EPSG","6154"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4154"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2061"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=41 +ellps=intl +towgs84=-117,-132,-164,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2062 : Madrid 1870 (Madrid) / Spain --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2062,'EPSG',2062,'PROJCS["Madrid 1870 (Madrid) / Spain",GEOGCS["Madrid 1870 (Madrid)",DATUM["Madrid_1870_Madrid",SPHEROID["Struve 1860",6378298.3,294.73,AUTHORITY["EPSG","7028"]],AUTHORITY["EPSG","6903"]],PRIMEM["Madrid",-3.687938888888889,AUTHORITY["EPSG","8905"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4903"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",0],PARAMETER["scale_factor",0.9988085293],PARAMETER["false_easting",600000],PARAMETER["false_northing",600000],AUTHORITY["EPSG","2062"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40 +lat_0=40 +lon_0=0 +k_0=0.9988085293 +x_0=600000 +y_0=600000 +a=6378298.3 +b=6356657.142669561 +pm=madrid +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2062,'EPSG',2062,'PROJCS["Madrid 1870 (Madrid) / Spain",GEOGCS["Madrid 1870 (Madrid)",DATUM["Madrid_1870_Madrid",SPHEROID["Struve 1860",6378298.3,294.73,AUTHORITY["EPSG","7028"]],AUTHORITY["EPSG","6903"]],PRIMEM["Madrid",-3.687938888888889,AUTHORITY["EPSG","8905"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4903"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",0],PARAMETER["scale_factor",0.9988085293],PARAMETER["false_easting",600000],PARAMETER["false_northing",600000],AUTHORITY["EPSG","2062"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40 +lat_0=40 +lon_0=0 +k_0=0.9988085293 +x_0=600000 +y_0=600000 +a=6378298.3 +b=6356657.142669561 +pm=madrid +units=m +no_defs '); --- --- EPSG 2063 : Dabola 1981 / UTM zone 28N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2063,'EPSG',2063,'PROJCS["Dabola 1981 / UTM zone 28N (deprecated)",GEOGCS["Conakry 1905",DATUM["Conakry_1905",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-23,259,-9,0,0,0,0],AUTHORITY["EPSG","6315"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4315"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2063"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +a=6378249.2 +b=6356515 +towgs84=-23,259,-9,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2063,'EPSG',2063,'PROJCS["Dabola 1981 / UTM zone 28N (deprecated)",GEOGCS["Conakry 1905",DATUM["Conakry_1905",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-23,259,-9,0,0,0,0],AUTHORITY["EPSG","6315"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4315"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2063"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +a=6378249.2 +b=6356515 +towgs84=-23,259,-9,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2064 : Dabola 1981 / UTM zone 29N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2064,'EPSG',2064,'PROJCS["Dabola 1981 / UTM zone 29N (deprecated)",GEOGCS["Conakry 1905",DATUM["Conakry_1905",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-23,259,-9,0,0,0,0],AUTHORITY["EPSG","6315"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4315"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2064"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +a=6378249.2 +b=6356515 +towgs84=-23,259,-9,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2064,'EPSG',2064,'PROJCS["Dabola 1981 / UTM zone 29N (deprecated)",GEOGCS["Conakry 1905",DATUM["Conakry_1905",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-23,259,-9,0,0,0,0],AUTHORITY["EPSG","6315"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4315"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2064"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +a=6378249.2 +b=6356515 +towgs84=-23,259,-9,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2065 : S-JTSK (Ferro) / Krovak --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2065,'EPSG',2065,'PROJCS["S-JTSK (Ferro) / Krovak",GEOGCS["S-JTSK (Ferro)",DATUM["S_JTSK_Ferro",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6818"]],PRIMEM["Ferro",-17.66666666666667,AUTHORITY["EPSG","8909"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4818"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Krovak"],PARAMETER["latitude_of_center",49.5],PARAMETER["longitude_of_center",42.5],PARAMETER["azimuth",30.28813972222222],PARAMETER["pseudo_standard_parallel_1",78.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2065"],AXIS["Y",WEST],AXIS["X",SOUTH]]','+proj=krovak +lat_0=49.5 +lon_0=42.5 +alpha=30.28813972222222 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +pm=ferro +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2065,'EPSG',2065,'PROJCS["S-JTSK (Ferro) / Krovak",GEOGCS["S-JTSK (Ferro)",DATUM["S_JTSK_Ferro",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[589,76,480,0,0,0,0],AUTHORITY["EPSG","6818"]],PRIMEM["Ferro",-17.66666666666667,AUTHORITY["EPSG","8909"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4818"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Krovak"],PARAMETER["latitude_of_center",49.5],PARAMETER["longitude_of_center",42.5],PARAMETER["azimuth",30.28813972222222],PARAMETER["pseudo_standard_parallel_1",78.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2065"],AXIS["X",SOUTH],AXIS["Y",WEST]]','+proj=krovak +lat_0=49.5 +lon_0=42.5 +alpha=30.28813972222222 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +towgs84=589,76,480,0,0,0,0 +pm=ferro +units=m +no_defs '); --- --- EPSG 2066 : Mount Dillon / Tobago Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2066,'EPSG',2066,'PROJCS["Mount Dillon / Tobago Grid",GEOGCS["Mount Dillon",DATUM["Mount_Dillon",SPHEROID["Clarke 1858",6378293.645208759,294.2606763692569,AUTHORITY["EPSG","7007"]],AUTHORITY["EPSG","6157"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4157"]],UNIT["Clarke''s link",0.201166195164,AUTHORITY["EPSG","9039"]],PROJECTION["Cassini_Soldner"],PARAMETER["latitude_of_origin",11.25217861111111],PARAMETER["central_meridian",-60.68600888888889],PARAMETER["false_easting",187500],PARAMETER["false_northing",180000],AUTHORITY["EPSG","2066"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=cass +lat_0=11.25217861111111 +lon_0=-60.68600888888889 +x_0=37718.66159325 +y_0=36209.91512952 +a=6378293.645208759 +b=6356617.987679838 +to_meter=0.201166195164 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2066,'EPSG',2066,'PROJCS["Mount Dillon / Tobago Grid",GEOGCS["Mount Dillon",DATUM["Mount_Dillon",SPHEROID["Clarke 1858",6378293.645208759,294.2606763692569,AUTHORITY["EPSG","7007"]],AUTHORITY["EPSG","6157"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4157"]],UNIT["Clarke''s link",0.201166195164,AUTHORITY["EPSG","9039"]],PROJECTION["Cassini_Soldner"],PARAMETER["latitude_of_origin",11.25217861111111],PARAMETER["central_meridian",-60.68600888888889],PARAMETER["false_easting",187500],PARAMETER["false_northing",180000],AUTHORITY["EPSG","2066"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=cass +lat_0=11.25217861111111 +lon_0=-60.68600888888889 +x_0=37718.66159325 +y_0=36209.91512952 +a=6378293.645208759 +b=6356617.987679838 +to_meter=0.201166195164 +no_defs '); --- --- EPSG 2067 : Naparima 1955 / UTM zone 20N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2067,'EPSG',2067,'PROJCS["Naparima 1955 / UTM zone 20N",GEOGCS["Naparima 1955",DATUM["Naparima_1955",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6158"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4158"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2067"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2067,'EPSG',2067,'PROJCS["Naparima 1955 / UTM zone 20N",GEOGCS["Naparima 1955",DATUM["Naparima_1955",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-0.465,372.095,171.736,0,0,0,0],AUTHORITY["EPSG","6158"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4158"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2067"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=intl +towgs84=-0.465,372.095,171.736,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2068 : ELD79 / Libya zone 5 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2068,'EPSG',2068,'PROJCS["ELD79 / Libya zone 5",GEOGCS["ELD79",DATUM["European_Libyan_Datum_1979",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6159"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4159"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2068"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=9 +k=0.9999 +x_0=200000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2068,'EPSG',2068,'PROJCS["ELD79 / Libya zone 5",GEOGCS["ELD79",DATUM["European_Libyan_Datum_1979",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-115.854,-99.0583,-152.462,0,0,0,0],AUTHORITY["EPSG","6159"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4159"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2068"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=9 +k=0.9999 +x_0=200000 +y_0=0 +ellps=intl +towgs84=-115.854,-99.0583,-152.462,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2069 : ELD79 / Libya zone 6 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2069,'EPSG',2069,'PROJCS["ELD79 / Libya zone 6",GEOGCS["ELD79",DATUM["European_Libyan_Datum_1979",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6159"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4159"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",11],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2069"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=11 +k=0.9999 +x_0=200000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2069,'EPSG',2069,'PROJCS["ELD79 / Libya zone 6",GEOGCS["ELD79",DATUM["European_Libyan_Datum_1979",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-115.854,-99.0583,-152.462,0,0,0,0],AUTHORITY["EPSG","6159"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4159"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",11],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2069"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=11 +k=0.9999 +x_0=200000 +y_0=0 +ellps=intl +towgs84=-115.854,-99.0583,-152.462,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2070 : ELD79 / Libya zone 7 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2070,'EPSG',2070,'PROJCS["ELD79 / Libya zone 7",GEOGCS["ELD79",DATUM["European_Libyan_Datum_1979",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6159"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4159"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",13],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2070"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=13 +k=0.9999 +x_0=200000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2070,'EPSG',2070,'PROJCS["ELD79 / Libya zone 7",GEOGCS["ELD79",DATUM["European_Libyan_Datum_1979",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-115.854,-99.0583,-152.462,0,0,0,0],AUTHORITY["EPSG","6159"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4159"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",13],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2070"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=13 +k=0.9999 +x_0=200000 +y_0=0 +ellps=intl +towgs84=-115.854,-99.0583,-152.462,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2071 : ELD79 / Libya zone 8 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2071,'EPSG',2071,'PROJCS["ELD79 / Libya zone 8",GEOGCS["ELD79",DATUM["European_Libyan_Datum_1979",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6159"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4159"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2071"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=0.9999 +x_0=200000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2071,'EPSG',2071,'PROJCS["ELD79 / Libya zone 8",GEOGCS["ELD79",DATUM["European_Libyan_Datum_1979",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-115.854,-99.0583,-152.462,0,0,0,0],AUTHORITY["EPSG","6159"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4159"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2071"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=0.9999 +x_0=200000 +y_0=0 +ellps=intl +towgs84=-115.854,-99.0583,-152.462,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2072 : ELD79 / Libya zone 9 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2072,'EPSG',2072,'PROJCS["ELD79 / Libya zone 9",GEOGCS["ELD79",DATUM["European_Libyan_Datum_1979",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6159"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4159"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",17],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2072"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=17 +k=0.9999 +x_0=200000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2072,'EPSG',2072,'PROJCS["ELD79 / Libya zone 9",GEOGCS["ELD79",DATUM["European_Libyan_Datum_1979",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-115.854,-99.0583,-152.462,0,0,0,0],AUTHORITY["EPSG","6159"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4159"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",17],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2072"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=17 +k=0.9999 +x_0=200000 +y_0=0 +ellps=intl +towgs84=-115.854,-99.0583,-152.462,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2073 : ELD79 / Libya zone 10 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2073,'EPSG',2073,'PROJCS["ELD79 / Libya zone 10",GEOGCS["ELD79",DATUM["European_Libyan_Datum_1979",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6159"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4159"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",19],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2073"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=19 +k=0.9999 +x_0=200000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2073,'EPSG',2073,'PROJCS["ELD79 / Libya zone 10",GEOGCS["ELD79",DATUM["European_Libyan_Datum_1979",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-115.854,-99.0583,-152.462,0,0,0,0],AUTHORITY["EPSG","6159"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4159"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",19],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2073"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=19 +k=0.9999 +x_0=200000 +y_0=0 +ellps=intl +towgs84=-115.854,-99.0583,-152.462,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2074 : ELD79 / Libya zone 11 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2074,'EPSG',2074,'PROJCS["ELD79 / Libya zone 11",GEOGCS["ELD79",DATUM["European_Libyan_Datum_1979",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6159"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4159"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2074"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=0.9999 +x_0=200000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2074,'EPSG',2074,'PROJCS["ELD79 / Libya zone 11",GEOGCS["ELD79",DATUM["European_Libyan_Datum_1979",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-115.854,-99.0583,-152.462,0,0,0,0],AUTHORITY["EPSG","6159"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4159"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2074"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=0.9999 +x_0=200000 +y_0=0 +ellps=intl +towgs84=-115.854,-99.0583,-152.462,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2075 : ELD79 / Libya zone 12 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2075,'EPSG',2075,'PROJCS["ELD79 / Libya zone 12",GEOGCS["ELD79",DATUM["European_Libyan_Datum_1979",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6159"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4159"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",23],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2075"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=23 +k=0.9999 +x_0=200000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2075,'EPSG',2075,'PROJCS["ELD79 / Libya zone 12",GEOGCS["ELD79",DATUM["European_Libyan_Datum_1979",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-115.854,-99.0583,-152.462,0,0,0,0],AUTHORITY["EPSG","6159"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4159"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",23],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2075"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=23 +k=0.9999 +x_0=200000 +y_0=0 +ellps=intl +towgs84=-115.854,-99.0583,-152.462,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2076 : ELD79 / Libya zone 13 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2076,'EPSG',2076,'PROJCS["ELD79 / Libya zone 13",GEOGCS["ELD79",DATUM["European_Libyan_Datum_1979",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6159"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4159"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",25],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2076"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=25 +k=0.9999 +x_0=200000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2076,'EPSG',2076,'PROJCS["ELD79 / Libya zone 13",GEOGCS["ELD79",DATUM["European_Libyan_Datum_1979",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-115.854,-99.0583,-152.462,0,0,0,0],AUTHORITY["EPSG","6159"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4159"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",25],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2076"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=25 +k=0.9999 +x_0=200000 +y_0=0 +ellps=intl +towgs84=-115.854,-99.0583,-152.462,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2077 : ELD79 / UTM zone 32N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2077,'EPSG',2077,'PROJCS["ELD79 / UTM zone 32N",GEOGCS["ELD79",DATUM["European_Libyan_Datum_1979",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6159"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4159"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2077"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2077,'EPSG',2077,'PROJCS["ELD79 / UTM zone 32N",GEOGCS["ELD79",DATUM["European_Libyan_Datum_1979",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-115.854,-99.0583,-152.462,0,0,0,0],AUTHORITY["EPSG","6159"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4159"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2077"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +ellps=intl +towgs84=-115.854,-99.0583,-152.462,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2078 : ELD79 / UTM zone 33N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2078,'EPSG',2078,'PROJCS["ELD79 / UTM zone 33N",GEOGCS["ELD79",DATUM["European_Libyan_Datum_1979",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6159"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4159"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2078"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=33 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2078,'EPSG',2078,'PROJCS["ELD79 / UTM zone 33N",GEOGCS["ELD79",DATUM["European_Libyan_Datum_1979",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-115.854,-99.0583,-152.462,0,0,0,0],AUTHORITY["EPSG","6159"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4159"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2078"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=33 +ellps=intl +towgs84=-115.854,-99.0583,-152.462,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2079 : ELD79 / UTM zone 34N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2079,'EPSG',2079,'PROJCS["ELD79 / UTM zone 34N",GEOGCS["ELD79",DATUM["European_Libyan_Datum_1979",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6159"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4159"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2079"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=34 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2079,'EPSG',2079,'PROJCS["ELD79 / UTM zone 34N",GEOGCS["ELD79",DATUM["European_Libyan_Datum_1979",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-115.854,-99.0583,-152.462,0,0,0,0],AUTHORITY["EPSG","6159"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4159"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2079"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=34 +ellps=intl +towgs84=-115.854,-99.0583,-152.462,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2080 : ELD79 / UTM zone 35N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2080,'EPSG',2080,'PROJCS["ELD79 / UTM zone 35N",GEOGCS["ELD79",DATUM["European_Libyan_Datum_1979",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6159"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4159"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2080"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=35 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2080,'EPSG',2080,'PROJCS["ELD79 / UTM zone 35N",GEOGCS["ELD79",DATUM["European_Libyan_Datum_1979",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-115.854,-99.0583,-152.462,0,0,0,0],AUTHORITY["EPSG","6159"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4159"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2080"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=35 +ellps=intl +towgs84=-115.854,-99.0583,-152.462,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2081 : Chos Malal 1914 / Argentina zone 2 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2081,'EPSG',2081,'PROJCS["Chos Malal 1914 / Argentina zone 2",GEOGCS["Chos Malal 1914",DATUM["Chos_Malal_1914",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6160"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4160"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",1],PARAMETER["false_easting",2500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2081"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=-90 +lon_0=-69 +k=1 +x_0=2500000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2081,'EPSG',2081,'PROJCS["Chos Malal 1914 / Argentina zone 2",GEOGCS["Chos Malal 1914",DATUM["Chos_Malal_1914",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6160"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4160"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",1],PARAMETER["false_easting",2500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2081"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=-90 +lon_0=-69 +k=1 +x_0=2500000 +y_0=0 +ellps=intl +units=m +no_defs '); --- --- EPSG 2082 : Pampa del Castillo / Argentina zone 2 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2082,'EPSG',2082,'PROJCS["Pampa del Castillo / Argentina zone 2",GEOGCS["Pampa del Castillo",DATUM["Pampa_del_Castillo",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[27.5,14,186.4,0,0,0,0],AUTHORITY["EPSG","6161"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4161"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",1],PARAMETER["false_easting",2500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2082"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=-90 +lon_0=-69 +k=1 +x_0=2500000 +y_0=0 +ellps=intl +towgs84=27.5,14,186.4,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2082,'EPSG',2082,'PROJCS["Pampa del Castillo / Argentina zone 2",GEOGCS["Pampa del Castillo",DATUM["Pampa_del_Castillo",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[27.5,14,186.4,0,0,0,0],AUTHORITY["EPSG","6161"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4161"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",1],PARAMETER["false_easting",2500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2082"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=-90 +lon_0=-69 +k=1 +x_0=2500000 +y_0=0 +ellps=intl +towgs84=27.5,14,186.4,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2083 : Hito XVIII 1963 / Argentina zone 2 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2083,'EPSG',2083,'PROJCS["Hito XVIII 1963 / Argentina zone 2",GEOGCS["Hito XVIII 1963",DATUM["Hito_XVIII_1963",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6254"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4254"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",1],PARAMETER["false_easting",2500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2083"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=-90 +lon_0=-69 +k=1 +x_0=2500000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2083,'EPSG',2083,'PROJCS["Hito XVIII 1963 / Argentina zone 2",GEOGCS["Hito XVIII 1963",DATUM["Hito_XVIII_1963",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[16,196,93,0,0,0,0],AUTHORITY["EPSG","6254"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4254"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",1],PARAMETER["false_easting",2500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2083"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=-90 +lon_0=-69 +k=1 +x_0=2500000 +y_0=0 +ellps=intl +towgs84=16,196,93,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2084 : Hito XVIII 1963 / UTM zone 19S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2084,'EPSG',2084,'PROJCS["Hito XVIII 1963 / UTM zone 19S",GEOGCS["Hito XVIII 1963",DATUM["Hito_XVIII_1963",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6254"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4254"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2084"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +south +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2084,'EPSG',2084,'PROJCS["Hito XVIII 1963 / UTM zone 19S",GEOGCS["Hito XVIII 1963",DATUM["Hito_XVIII_1963",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[16,196,93,0,0,0,0],AUTHORITY["EPSG","6254"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4254"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2084"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +south +ellps=intl +towgs84=16,196,93,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2085 : NAD27 / Cuba Norte (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2085,'EPSG',2085,'PROJCS["NAD27 / Cuba Norte (deprecated)",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",22.35],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.99993602],PARAMETER["false_easting",500000],PARAMETER["false_northing",280296.016],AUTHORITY["EPSG","2085"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=22.35 +lat_0=22.35 +lon_0=-81 +k_0=0.99993602 +x_0=500000 +y_0=280296.016 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2085,'EPSG',2085,'PROJCS["NAD27 / Cuba Norte (deprecated)",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",22.35],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.99993602],PARAMETER["false_easting",500000],PARAMETER["false_northing",280296.016],AUTHORITY["EPSG","2085"],AXIS["Y",NORTH],AXIS["X",EAST]]','+proj=lcc +lat_1=22.35 +lat_0=22.35 +lon_0=-81 +k_0=0.99993602 +x_0=500000 +y_0=280296.016 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 2086 : NAD27 / Cuba Sur (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2086,'EPSG',2086,'PROJCS["NAD27 / Cuba Sur (deprecated)",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",20.71666666666667],PARAMETER["central_meridian",-76.83333333333333],PARAMETER["scale_factor",0.99994848],PARAMETER["false_easting",500000],PARAMETER["false_northing",229126.939],AUTHORITY["EPSG","2086"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=20.71666666666667 +lat_0=20.71666666666667 +lon_0=-76.83333333333333 +k_0=0.99994848 +x_0=500000 +y_0=229126.939 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2086,'EPSG',2086,'PROJCS["NAD27 / Cuba Sur (deprecated)",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",20.71666666666667],PARAMETER["central_meridian",-76.83333333333333],PARAMETER["scale_factor",0.99994848],PARAMETER["false_easting",500000],PARAMETER["false_northing",229126.939],AUTHORITY["EPSG","2086"],AXIS["Y",NORTH],AXIS["X",EAST]]','+proj=lcc +lat_1=20.71666666666667 +lat_0=20.71666666666667 +lon_0=-76.83333333333333 +k_0=0.99994848 +x_0=500000 +y_0=229126.939 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 2087 : ELD79 / TM 12 NE --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2087,'EPSG',2087,'PROJCS["ELD79 / TM 12 NE",GEOGCS["ELD79",DATUM["European_Libyan_Datum_1979",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6159"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4159"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",12],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2087"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=12 +k=0.9996 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2087,'EPSG',2087,'PROJCS["ELD79 / TM 12 NE",GEOGCS["ELD79",DATUM["European_Libyan_Datum_1979",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-115.854,-99.0583,-152.462,0,0,0,0],AUTHORITY["EPSG","6159"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4159"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",12],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2087"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=12 +k=0.9996 +x_0=500000 +y_0=0 +ellps=intl +towgs84=-115.854,-99.0583,-152.462,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2088 : Carthage / TM 11 NE --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2088,'EPSG',2088,'PROJCS["Carthage / TM 11 NE",GEOGCS["Carthage",DATUM["Carthage",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],AUTHORITY["EPSG","6223"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4223"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",11],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2088"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=11 +k=0.9996 +x_0=500000 +y_0=0 +a=6378249.2 +b=6356515 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2088,'EPSG',2088,'PROJCS["Carthage / TM 11 NE",GEOGCS["Carthage",DATUM["Carthage",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-263,6,431,0,0,0,0],AUTHORITY["EPSG","6223"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4223"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",11],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2088"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=11 +k=0.9996 +x_0=500000 +y_0=0 +a=6378249.2 +b=6356515 +towgs84=-263,6,431,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2089 : Yemen NGN96 / UTM zone 38N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2089,'EPSG',2089,'PROJCS["Yemen NGN96 / UTM zone 38N",GEOGCS["Yemen NGN96",DATUM["Yemen_National_Geodetic_Network_1996",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6163"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4163"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2089"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2089,'EPSG',2089,'PROJCS["Yemen NGN96 / UTM zone 38N",GEOGCS["Yemen NGN96",DATUM["Yemen_National_Geodetic_Network_1996",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6163"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4163"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2089"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2090 : Yemen NGN96 / UTM zone 39N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2090,'EPSG',2090,'PROJCS["Yemen NGN96 / UTM zone 39N",GEOGCS["Yemen NGN96",DATUM["Yemen_National_Geodetic_Network_1996",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6163"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4163"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2090"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=39 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2090,'EPSG',2090,'PROJCS["Yemen NGN96 / UTM zone 39N",GEOGCS["Yemen NGN96",DATUM["Yemen_National_Geodetic_Network_1996",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6163"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4163"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2090"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=39 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2091 : South Yemen / Gauss Kruger zone 8 (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2091,'EPSG',2091,'PROJCS["South Yemen / Gauss Kruger zone 8 (deprecated)",GEOGCS["South Yemen",DATUM["South_Yemen",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[-76,-138,67,0,0,0,0],AUTHORITY["EPSG","6164"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4164"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",1],PARAMETER["false_easting",8500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2091"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=8500000 +y_0=0 +ellps=krass +towgs84=-76,-138,67,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2091,'EPSG',2091,'PROJCS["South Yemen / Gauss Kruger zone 8 (deprecated)",GEOGCS["South Yemen",DATUM["South_Yemen",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[-76,-138,67,0,0,0,0],AUTHORITY["EPSG","6164"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4164"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",1],PARAMETER["false_easting",8500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2091"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=8500000 +y_0=0 +ellps=krass +towgs84=-76,-138,67,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2092 : South Yemen / Gauss Kruger zone 9 (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2092,'EPSG',2092,'PROJCS["South Yemen / Gauss Kruger zone 9 (deprecated)",GEOGCS["South Yemen",DATUM["South_Yemen",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[-76,-138,67,0,0,0,0],AUTHORITY["EPSG","6164"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4164"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",1],PARAMETER["false_easting",9500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2092"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=9500000 +y_0=0 +ellps=krass +towgs84=-76,-138,67,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2092,'EPSG',2092,'PROJCS["South Yemen / Gauss Kruger zone 9 (deprecated)",GEOGCS["South Yemen",DATUM["South_Yemen",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[-76,-138,67,0,0,0,0],AUTHORITY["EPSG","6164"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4164"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",1],PARAMETER["false_easting",9500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2092"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=9500000 +y_0=0 +ellps=krass +towgs84=-76,-138,67,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2093 : Hanoi 1972 / GK 106 NE --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2093,'EPSG',2093,'PROJCS["Hanoi 1972 / GK 106 NE",GEOGCS["Hanoi 1972",DATUM["Hanoi_1972",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[-17.51,-108.32,-62.39,0,0,0,0],AUTHORITY["EPSG","6147"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4147"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",106],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2093"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=106 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=-17.51,-108.32,-62.39,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2093,'EPSG',2093,'PROJCS["Hanoi 1972 / GK 106 NE",GEOGCS["Hanoi 1972",DATUM["Hanoi_1972",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[-17.51,-108.32,-62.39,0,0,0,0],AUTHORITY["EPSG","6147"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4147"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",106],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2093"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=106 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=-17.51,-108.32,-62.39,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2094 : WGS 72BE / TM 106 NE --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2094,'EPSG',2094,'PROJCS["WGS 72BE / TM 106 NE",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",106],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2094"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=106 +k=0.9996 +x_0=500000 +y_0=0 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2094,'EPSG',2094,'PROJCS["WGS 72BE / TM 106 NE",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",106],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2094"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=106 +k=0.9996 +x_0=500000 +y_0=0 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 2095 : Bissau / UTM zone 28N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2095,'EPSG',2095,'PROJCS["Bissau / UTM zone 28N",GEOGCS["Bissau",DATUM["Bissau",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-173,253,27,0,0,0,0],AUTHORITY["EPSG","6165"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4165"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2095"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +ellps=intl +towgs84=-173,253,27,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2095,'EPSG',2095,'PROJCS["Bissau / UTM zone 28N",GEOGCS["Bissau",DATUM["Bissau",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-173,253,27,0,0,0,0],AUTHORITY["EPSG","6165"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4165"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2095"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +ellps=intl +towgs84=-173,253,27,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2096 : Korean 1985 / Korea East Belt --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2096,'EPSG',2096,'PROJCS["Korean 1985 / Korea East Belt",GEOGCS["Korean 1985",DATUM["Korean_Datum_1985",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6162"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4162"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",38],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",200000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","2096"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=38 +lon_0=129 +k=1 +x_0=200000 +y_0=500000 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2096,'EPSG',2096,'PROJCS["Korean 1985 / Korea East Belt",GEOGCS["Korean 1985",DATUM["Korean_Datum_1985",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6162"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4162"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",38],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",200000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","2096"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=38 +lon_0=129 +k=1 +x_0=200000 +y_0=500000 +ellps=bessel +units=m +no_defs '); --- --- EPSG 2097 : Korean 1985 / Korea Central Belt --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2097,'EPSG',2097,'PROJCS["Korean 1985 / Korea Central Belt",GEOGCS["Korean 1985",DATUM["Korean_Datum_1985",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6162"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4162"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",38],PARAMETER["central_meridian",127],PARAMETER["scale_factor",1],PARAMETER["false_easting",200000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","2097"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=38 +lon_0=127 +k=1 +x_0=200000 +y_0=500000 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2097,'EPSG',2097,'PROJCS["Korean 1985 / Korea Central Belt",GEOGCS["Korean 1985",DATUM["Korean_Datum_1985",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6162"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4162"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",38],PARAMETER["central_meridian",127],PARAMETER["scale_factor",1],PARAMETER["false_easting",200000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","2097"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=38 +lon_0=127 +k=1 +x_0=200000 +y_0=500000 +ellps=bessel +units=m +no_defs '); --- --- EPSG 2098 : Korean 1985 / Korea West Belt --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2098,'EPSG',2098,'PROJCS["Korean 1985 / Korea West Belt",GEOGCS["Korean 1985",DATUM["Korean_Datum_1985",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6162"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4162"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",38],PARAMETER["central_meridian",125],PARAMETER["scale_factor",1],PARAMETER["false_easting",200000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","2098"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=38 +lon_0=125 +k=1 +x_0=200000 +y_0=500000 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2098,'EPSG',2098,'PROJCS["Korean 1985 / Korea West Belt",GEOGCS["Korean 1985",DATUM["Korean_Datum_1985",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6162"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4162"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",38],PARAMETER["central_meridian",125],PARAMETER["scale_factor",1],PARAMETER["false_easting",200000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","2098"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=38 +lon_0=125 +k=1 +x_0=200000 +y_0=500000 +ellps=bessel +units=m +no_defs '); --- --- EPSG 2099 : Qatar 1948 / Qatar Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2099,'EPSG',2099,'PROJCS["Qatar 1948 / Qatar Grid",GEOGCS["Qatar 1948",DATUM["Qatar_1948",SPHEROID["Helmert 1906",6378200,298.3,AUTHORITY["EPSG","7020"]],AUTHORITY["EPSG","6286"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4286"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Cassini_Soldner"],PARAMETER["latitude_of_origin",25.38236111111111],PARAMETER["central_meridian",50.76138888888889],PARAMETER["false_easting",100000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","2099"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=cass +lat_0=25.38236111111111 +lon_0=50.76138888888889 +x_0=100000 +y_0=100000 +ellps=helmert +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2099,'EPSG',2099,'PROJCS["Qatar 1948 / Qatar Grid",GEOGCS["Qatar 1948",DATUM["Qatar_1948",SPHEROID["Helmert 1906",6378200,298.3,AUTHORITY["EPSG","7020"]],AUTHORITY["EPSG","6286"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4286"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Cassini_Soldner"],PARAMETER["latitude_of_origin",25.38236111111111],PARAMETER["central_meridian",50.76138888888889],PARAMETER["false_easting",100000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","2099"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=cass +lat_0=25.38236111111111 +lon_0=50.76138888888889 +x_0=100000 +y_0=100000 +ellps=helmert +units=m +no_defs '); --- --- EPSG 2100 : GGRS87 / Greek Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2100,'EPSG',2100,'PROJCS["GGRS87 / Greek Grid",GEOGCS["GGRS87",DATUM["Greek_Geodetic_Reference_System_1987",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[-199.87,74.79,246.62,0,0,0,0],AUTHORITY["EPSG","6121"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4121"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",24],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2100"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9996 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=-199.87,74.79,246.62,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2100,'EPSG',2100,'PROJCS["GGRS87 / Greek Grid",GEOGCS["GGRS87",DATUM["Greek_Geodetic_Reference_System_1987",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[-199.87,74.79,246.62,0,0,0,0],AUTHORITY["EPSG","6121"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4121"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",24],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2100"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9996 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=-199.87,74.79,246.62,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2101 : Lake / Maracaibo Grid M1 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2101,'EPSG',2101,'PROJCS["Lake / Maracaibo Grid M1",GEOGCS["Lake",DATUM["Lake",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6249"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4249"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",10.16666666666667],PARAMETER["central_meridian",-71.60561777777777],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",-52684.972],AUTHORITY["EPSG","2101"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=10.16666666666667 +lat_0=10.16666666666667 +lon_0=-71.60561777777777 +k_0=1 +x_0=0 +y_0=-52684.972 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2101,'EPSG',2101,'PROJCS["Lake / Maracaibo Grid M1",GEOGCS["Lake",DATUM["Lake",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6249"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4249"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",10.16666666666667],PARAMETER["central_meridian",-71.60561777777777],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",-52684.972],AUTHORITY["EPSG","2101"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=10.16666666666667 +lat_0=10.16666666666667 +lon_0=-71.60561777777777 +k_0=1 +x_0=0 +y_0=-52684.972 +ellps=intl +units=m +no_defs '); --- --- EPSG 2102 : Lake / Maracaibo Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2102,'EPSG',2102,'PROJCS["Lake / Maracaibo Grid",GEOGCS["Lake",DATUM["Lake",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6249"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4249"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",10.16666666666667],PARAMETER["central_meridian",-71.60561777777777],PARAMETER["scale_factor",1],PARAMETER["false_easting",200000],PARAMETER["false_northing",147315.028],AUTHORITY["EPSG","2102"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=10.16666666666667 +lat_0=10.16666666666667 +lon_0=-71.60561777777777 +k_0=1 +x_0=200000 +y_0=147315.028 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2102,'EPSG',2102,'PROJCS["Lake / Maracaibo Grid",GEOGCS["Lake",DATUM["Lake",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6249"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4249"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",10.16666666666667],PARAMETER["central_meridian",-71.60561777777777],PARAMETER["scale_factor",1],PARAMETER["false_easting",200000],PARAMETER["false_northing",147315.028],AUTHORITY["EPSG","2102"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=10.16666666666667 +lat_0=10.16666666666667 +lon_0=-71.60561777777777 +k_0=1 +x_0=200000 +y_0=147315.028 +ellps=intl +units=m +no_defs '); --- --- EPSG 2103 : Lake / Maracaibo Grid M3 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2103,'EPSG',2103,'PROJCS["Lake / Maracaibo Grid M3",GEOGCS["Lake",DATUM["Lake",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6249"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4249"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",10.16666666666667],PARAMETER["central_meridian",-71.60561777777777],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",447315.028],AUTHORITY["EPSG","2103"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=10.16666666666667 +lat_0=10.16666666666667 +lon_0=-71.60561777777777 +k_0=1 +x_0=500000 +y_0=447315.028 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2103,'EPSG',2103,'PROJCS["Lake / Maracaibo Grid M3",GEOGCS["Lake",DATUM["Lake",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6249"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4249"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",10.16666666666667],PARAMETER["central_meridian",-71.60561777777777],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",447315.028],AUTHORITY["EPSG","2103"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=10.16666666666667 +lat_0=10.16666666666667 +lon_0=-71.60561777777777 +k_0=1 +x_0=500000 +y_0=447315.028 +ellps=intl +units=m +no_defs '); --- --- EPSG 2104 : Lake / Maracaibo La Rosa Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2104,'EPSG',2104,'PROJCS["Lake / Maracaibo La Rosa Grid",GEOGCS["Lake",DATUM["Lake",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6249"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4249"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",10.16666666666667],PARAMETER["central_meridian",-71.60561777777777],PARAMETER["scale_factor",1],PARAMETER["false_easting",-17044],PARAMETER["false_northing",-23139.97],AUTHORITY["EPSG","2104"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=10.16666666666667 +lat_0=10.16666666666667 +lon_0=-71.60561777777777 +k_0=1 +x_0=-17044 +y_0=-23139.97 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2104,'EPSG',2104,'PROJCS["Lake / Maracaibo La Rosa Grid",GEOGCS["Lake",DATUM["Lake",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6249"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4249"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",10.16666666666667],PARAMETER["central_meridian",-71.60561777777777],PARAMETER["scale_factor",1],PARAMETER["false_easting",-17044],PARAMETER["false_northing",-23139.97],AUTHORITY["EPSG","2104"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=10.16666666666667 +lat_0=10.16666666666667 +lon_0=-71.60561777777777 +k_0=1 +x_0=-17044 +y_0=-23139.97 +ellps=intl +units=m +no_defs '); --- --- EPSG 2105 : NZGD2000 / Mount Eden 2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2105,'EPSG',2105,'PROJCS["NZGD2000 / Mount Eden 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-36.87972222222222],PARAMETER["central_meridian",174.7641666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2105"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-36.87972222222222 +lon_0=174.7641666666667 +k=0.9999 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2105,'EPSG',2105,'PROJCS["NZGD2000 / Mount Eden 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-36.87972222222222],PARAMETER["central_meridian",174.7641666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2105"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-36.87972222222222 +lon_0=174.7641666666667 +k=0.9999 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2106 : NZGD2000 / Bay of Plenty 2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2106,'EPSG',2106,'PROJCS["NZGD2000 / Bay of Plenty 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-37.76111111111111],PARAMETER["central_meridian",176.4661111111111],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2106"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-37.76111111111111 +lon_0=176.4661111111111 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2106,'EPSG',2106,'PROJCS["NZGD2000 / Bay of Plenty 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-37.76111111111111],PARAMETER["central_meridian",176.4661111111111],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2106"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-37.76111111111111 +lon_0=176.4661111111111 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2107 : NZGD2000 / Poverty Bay 2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2107,'EPSG',2107,'PROJCS["NZGD2000 / Poverty Bay 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-38.62444444444444],PARAMETER["central_meridian",177.8855555555556],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2107"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-38.62444444444444 +lon_0=177.8855555555556 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2107,'EPSG',2107,'PROJCS["NZGD2000 / Poverty Bay 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-38.62444444444444],PARAMETER["central_meridian",177.8855555555556],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2107"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-38.62444444444444 +lon_0=177.8855555555556 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2108 : NZGD2000 / Hawkes Bay 2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2108,'EPSG',2108,'PROJCS["NZGD2000 / Hawkes Bay 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-39.65083333333333],PARAMETER["central_meridian",176.6736111111111],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2108"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-39.65083333333333 +lon_0=176.6736111111111 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2108,'EPSG',2108,'PROJCS["NZGD2000 / Hawkes Bay 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-39.65083333333333],PARAMETER["central_meridian",176.6736111111111],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2108"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-39.65083333333333 +lon_0=176.6736111111111 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2109 : NZGD2000 / Taranaki 2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2109,'EPSG',2109,'PROJCS["NZGD2000 / Taranaki 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-39.13555555555556],PARAMETER["central_meridian",174.2277777777778],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2109"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-39.13555555555556 +lon_0=174.2277777777778 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2109,'EPSG',2109,'PROJCS["NZGD2000 / Taranaki 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-39.13555555555556],PARAMETER["central_meridian",174.2277777777778],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2109"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-39.13555555555556 +lon_0=174.2277777777778 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2110 : NZGD2000 / Tuhirangi 2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2110,'EPSG',2110,'PROJCS["NZGD2000 / Tuhirangi 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-39.51222222222222],PARAMETER["central_meridian",175.64],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2110"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-39.51222222222222 +lon_0=175.64 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2110,'EPSG',2110,'PROJCS["NZGD2000 / Tuhirangi 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-39.51222222222222],PARAMETER["central_meridian",175.64],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2110"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-39.51222222222222 +lon_0=175.64 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2111 : NZGD2000 / Wanganui 2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2111,'EPSG',2111,'PROJCS["NZGD2000 / Wanganui 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-40.24194444444444],PARAMETER["central_meridian",175.4880555555555],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2111"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-40.24194444444444 +lon_0=175.4880555555555 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2111,'EPSG',2111,'PROJCS["NZGD2000 / Wanganui 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-40.24194444444444],PARAMETER["central_meridian",175.4880555555555],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2111"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-40.24194444444444 +lon_0=175.4880555555555 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2112 : NZGD2000 / Wairarapa 2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2112,'EPSG',2112,'PROJCS["NZGD2000 / Wairarapa 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-40.92527777777777],PARAMETER["central_meridian",175.6472222222222],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2112"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-40.92527777777777 +lon_0=175.6472222222222 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2112,'EPSG',2112,'PROJCS["NZGD2000 / Wairarapa 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-40.92527777777777],PARAMETER["central_meridian",175.6472222222222],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2112"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-40.92527777777777 +lon_0=175.6472222222222 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2113 : NZGD2000 / Wellington 2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2113,'EPSG',2113,'PROJCS["NZGD2000 / Wellington 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-41.3011111111111],PARAMETER["central_meridian",174.7763888888889],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2113"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-41.3011111111111 +lon_0=174.7763888888889 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2113,'EPSG',2113,'PROJCS["NZGD2000 / Wellington 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-41.3011111111111],PARAMETER["central_meridian",174.7763888888889],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2113"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-41.3011111111111 +lon_0=174.7763888888889 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2114 : NZGD2000 / Collingwood 2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2114,'EPSG',2114,'PROJCS["NZGD2000 / Collingwood 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-40.71472222222223],PARAMETER["central_meridian",172.6719444444444],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2114"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-40.71472222222223 +lon_0=172.6719444444444 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2114,'EPSG',2114,'PROJCS["NZGD2000 / Collingwood 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-40.71472222222223],PARAMETER["central_meridian",172.6719444444444],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2114"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-40.71472222222223 +lon_0=172.6719444444444 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2115 : NZGD2000 / Nelson 2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2115,'EPSG',2115,'PROJCS["NZGD2000 / Nelson 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-41.27444444444444],PARAMETER["central_meridian",173.2991666666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2115"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-41.27444444444444 +lon_0=173.2991666666667 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2115,'EPSG',2115,'PROJCS["NZGD2000 / Nelson 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-41.27444444444444],PARAMETER["central_meridian",173.2991666666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2115"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-41.27444444444444 +lon_0=173.2991666666667 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2116 : NZGD2000 / Karamea 2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2116,'EPSG',2116,'PROJCS["NZGD2000 / Karamea 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-41.28972222222222],PARAMETER["central_meridian",172.1088888888889],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2116"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-41.28972222222222 +lon_0=172.1088888888889 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2116,'EPSG',2116,'PROJCS["NZGD2000 / Karamea 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-41.28972222222222],PARAMETER["central_meridian",172.1088888888889],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2116"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-41.28972222222222 +lon_0=172.1088888888889 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2117 : NZGD2000 / Buller 2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2117,'EPSG',2117,'PROJCS["NZGD2000 / Buller 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-41.81055555555555],PARAMETER["central_meridian",171.5811111111111],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2117"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-41.81055555555555 +lon_0=171.5811111111111 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2117,'EPSG',2117,'PROJCS["NZGD2000 / Buller 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-41.81055555555555],PARAMETER["central_meridian",171.5811111111111],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2117"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-41.81055555555555 +lon_0=171.5811111111111 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2118 : NZGD2000 / Grey 2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2118,'EPSG',2118,'PROJCS["NZGD2000 / Grey 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-42.33361111111111],PARAMETER["central_meridian",171.5497222222222],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2118"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-42.33361111111111 +lon_0=171.5497222222222 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2118,'EPSG',2118,'PROJCS["NZGD2000 / Grey 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-42.33361111111111],PARAMETER["central_meridian",171.5497222222222],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2118"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-42.33361111111111 +lon_0=171.5497222222222 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2119 : NZGD2000 / Amuri 2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2119,'EPSG',2119,'PROJCS["NZGD2000 / Amuri 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-42.68888888888888],PARAMETER["central_meridian",173.01],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2119"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-42.68888888888888 +lon_0=173.01 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2119,'EPSG',2119,'PROJCS["NZGD2000 / Amuri 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-42.68888888888888],PARAMETER["central_meridian",173.01],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2119"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-42.68888888888888 +lon_0=173.01 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2120 : NZGD2000 / Marlborough 2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2120,'EPSG',2120,'PROJCS["NZGD2000 / Marlborough 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-41.54444444444444],PARAMETER["central_meridian",173.8019444444444],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2120"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-41.54444444444444 +lon_0=173.8019444444444 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2120,'EPSG',2120,'PROJCS["NZGD2000 / Marlborough 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-41.54444444444444],PARAMETER["central_meridian",173.8019444444444],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2120"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-41.54444444444444 +lon_0=173.8019444444444 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2121 : NZGD2000 / Hokitika 2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2121,'EPSG',2121,'PROJCS["NZGD2000 / Hokitika 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-42.88611111111111],PARAMETER["central_meridian",170.9797222222222],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2121"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-42.88611111111111 +lon_0=170.9797222222222 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2121,'EPSG',2121,'PROJCS["NZGD2000 / Hokitika 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-42.88611111111111],PARAMETER["central_meridian",170.9797222222222],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2121"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-42.88611111111111 +lon_0=170.9797222222222 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2122 : NZGD2000 / Okarito 2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2122,'EPSG',2122,'PROJCS["NZGD2000 / Okarito 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-43.11],PARAMETER["central_meridian",170.2608333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2122"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-43.11 +lon_0=170.2608333333333 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2122,'EPSG',2122,'PROJCS["NZGD2000 / Okarito 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-43.11],PARAMETER["central_meridian",170.2608333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2122"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-43.11 +lon_0=170.2608333333333 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2123 : NZGD2000 / Jacksons Bay 2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2123,'EPSG',2123,'PROJCS["NZGD2000 / Jacksons Bay 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-43.97777777777778],PARAMETER["central_meridian",168.6061111111111],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2123"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-43.97777777777778 +lon_0=168.6061111111111 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2123,'EPSG',2123,'PROJCS["NZGD2000 / Jacksons Bay 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-43.97777777777778],PARAMETER["central_meridian",168.6061111111111],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2123"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-43.97777777777778 +lon_0=168.6061111111111 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2124 : NZGD2000 / Mount Pleasant 2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2124,'EPSG',2124,'PROJCS["NZGD2000 / Mount Pleasant 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-43.59055555555556],PARAMETER["central_meridian",172.7269444444445],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2124"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-43.59055555555556 +lon_0=172.7269444444445 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2124,'EPSG',2124,'PROJCS["NZGD2000 / Mount Pleasant 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-43.59055555555556],PARAMETER["central_meridian",172.7269444444445],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2124"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-43.59055555555556 +lon_0=172.7269444444445 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2125 : NZGD2000 / Gawler 2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2125,'EPSG',2125,'PROJCS["NZGD2000 / Gawler 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-43.74861111111111],PARAMETER["central_meridian",171.3605555555555],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2125"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-43.74861111111111 +lon_0=171.3605555555555 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2125,'EPSG',2125,'PROJCS["NZGD2000 / Gawler 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-43.74861111111111],PARAMETER["central_meridian",171.3605555555555],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2125"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-43.74861111111111 +lon_0=171.3605555555555 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2126 : NZGD2000 / Timaru 2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2126,'EPSG',2126,'PROJCS["NZGD2000 / Timaru 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-44.40194444444445],PARAMETER["central_meridian",171.0572222222222],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2126"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-44.40194444444445 +lon_0=171.0572222222222 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2126,'EPSG',2126,'PROJCS["NZGD2000 / Timaru 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-44.40194444444445],PARAMETER["central_meridian",171.0572222222222],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2126"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-44.40194444444445 +lon_0=171.0572222222222 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2127 : NZGD2000 / Lindis Peak 2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2127,'EPSG',2127,'PROJCS["NZGD2000 / Lindis Peak 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-44.735],PARAMETER["central_meridian",169.4675],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2127"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-44.735 +lon_0=169.4675 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2127,'EPSG',2127,'PROJCS["NZGD2000 / Lindis Peak 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-44.735],PARAMETER["central_meridian",169.4675],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2127"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-44.735 +lon_0=169.4675 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2128 : NZGD2000 / Mount Nicholas 2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2128,'EPSG',2128,'PROJCS["NZGD2000 / Mount Nicholas 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-45.13277777777778],PARAMETER["central_meridian",168.3986111111111],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2128"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-45.13277777777778 +lon_0=168.3986111111111 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2128,'EPSG',2128,'PROJCS["NZGD2000 / Mount Nicholas 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-45.13277777777778],PARAMETER["central_meridian",168.3986111111111],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2128"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-45.13277777777778 +lon_0=168.3986111111111 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2129 : NZGD2000 / Mount York 2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2129,'EPSG',2129,'PROJCS["NZGD2000 / Mount York 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-45.56361111111111],PARAMETER["central_meridian",167.7386111111111],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2129"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-45.56361111111111 +lon_0=167.7386111111111 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2129,'EPSG',2129,'PROJCS["NZGD2000 / Mount York 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-45.56361111111111],PARAMETER["central_meridian",167.7386111111111],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2129"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-45.56361111111111 +lon_0=167.7386111111111 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2130 : NZGD2000 / Observation Point 2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2130,'EPSG',2130,'PROJCS["NZGD2000 / Observation Point 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-45.81611111111111],PARAMETER["central_meridian",170.6283333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2130"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-45.81611111111111 +lon_0=170.6283333333333 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2130,'EPSG',2130,'PROJCS["NZGD2000 / Observation Point 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-45.81611111111111],PARAMETER["central_meridian",170.6283333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2130"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-45.81611111111111 +lon_0=170.6283333333333 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2131 : NZGD2000 / North Taieri 2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2131,'EPSG',2131,'PROJCS["NZGD2000 / North Taieri 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-45.86138888888889],PARAMETER["central_meridian",170.2825],PARAMETER["scale_factor",0.99996],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2131"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-45.86138888888889 +lon_0=170.2825 +k=0.99996 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2131,'EPSG',2131,'PROJCS["NZGD2000 / North Taieri 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-45.86138888888889],PARAMETER["central_meridian",170.2825],PARAMETER["scale_factor",0.99996],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2131"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-45.86138888888889 +lon_0=170.2825 +k=0.99996 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2132 : NZGD2000 / Bluff 2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2132,'EPSG',2132,'PROJCS["NZGD2000 / Bluff 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-46.6],PARAMETER["central_meridian",168.3427777777778],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2132"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-46.6 +lon_0=168.3427777777778 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2132,'EPSG',2132,'PROJCS["NZGD2000 / Bluff 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-46.6],PARAMETER["central_meridian",168.3427777777778],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2132"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-46.6 +lon_0=168.3427777777778 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2133 : NZGD2000 / UTM zone 58S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2133,'EPSG',2133,'PROJCS["NZGD2000 / UTM zone 58S",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2133"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=58 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2133,'EPSG',2133,'PROJCS["NZGD2000 / UTM zone 58S",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2133"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=58 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2134 : NZGD2000 / UTM zone 59S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2134,'EPSG',2134,'PROJCS["NZGD2000 / UTM zone 59S",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2134"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=59 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2134,'EPSG',2134,'PROJCS["NZGD2000 / UTM zone 59S",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2134"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=59 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2135 : NZGD2000 / UTM zone 60S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2135,'EPSG',2135,'PROJCS["NZGD2000 / UTM zone 60S",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2135"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=60 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2135,'EPSG',2135,'PROJCS["NZGD2000 / UTM zone 60S",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2135"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=60 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2136 : Accra / Ghana National Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2136,'EPSG',2136,'PROJCS["Accra / Ghana National Grid",GEOGCS["Accra",DATUM["Accra",SPHEROID["War Office",6378300,296,AUTHORITY["EPSG","7029"]],AUTHORITY["EPSG","6168"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4168"]],UNIT["Gold Coast foot",0.3047997101815088,AUTHORITY["EPSG","9094"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",4.666666666666667],PARAMETER["central_meridian",-1],PARAMETER["scale_factor",0.99975],PARAMETER["false_easting",900000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2136"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=4.666666666666667 +lon_0=-1 +k=0.99975 +x_0=274319.7391633579 +y_0=0 +a=6378300 +b=6356751.689189189 +to_meter=0.3047997101815088 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2136,'EPSG',2136,'PROJCS["Accra / Ghana National Grid",GEOGCS["Accra",DATUM["Accra",SPHEROID["War Office",6378300,296,AUTHORITY["EPSG","7029"]],TOWGS84[-199,32,322,0,0,0,0],AUTHORITY["EPSG","6168"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4168"]],UNIT["Gold Coast foot",0.3047997101815088,AUTHORITY["EPSG","9094"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",4.666666666666667],PARAMETER["central_meridian",-1],PARAMETER["scale_factor",0.99975],PARAMETER["false_easting",900000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2136"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=4.666666666666667 +lon_0=-1 +k=0.99975 +x_0=274319.7391633579 +y_0=0 +a=6378300 +b=6356751.689189189 +towgs84=-199,32,322,0,0,0,0 +to_meter=0.3047997101815088 +no_defs '); --- --- EPSG 2137 : Accra / TM 1 NW --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2137,'EPSG',2137,'PROJCS["Accra / TM 1 NW",GEOGCS["Accra",DATUM["Accra",SPHEROID["War Office",6378300,296,AUTHORITY["EPSG","7029"]],AUTHORITY["EPSG","6168"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4168"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-1],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2137"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-1 +k=0.9996 +x_0=500000 +y_0=0 +a=6378300 +b=6356751.689189189 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2137,'EPSG',2137,'PROJCS["Accra / TM 1 NW",GEOGCS["Accra",DATUM["Accra",SPHEROID["War Office",6378300,296,AUTHORITY["EPSG","7029"]],TOWGS84[-199,32,322,0,0,0,0],AUTHORITY["EPSG","6168"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4168"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-1],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2137"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-1 +k=0.9996 +x_0=500000 +y_0=0 +a=6378300 +b=6356751.689189189 +towgs84=-199,32,322,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2138 : NAD27(CGQ77) / Quebec Lambert --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2138,'EPSG',2138,'PROJCS["NAD27(CGQ77) / Quebec Lambert",GEOGCS["NAD27(CGQ77)",DATUM["North_American_Datum_1927_CGQ77",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6609"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4609"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",60],PARAMETER["standard_parallel_2",46],PARAMETER["latitude_of_origin",44],PARAMETER["central_meridian",-68.5],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2138"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=60 +lat_2=46 +lat_0=44 +lon_0=-68.5 +x_0=0 +y_0=0 +ellps=clrk66 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2138,'EPSG',2138,'PROJCS["NAD27(CGQ77) / Quebec Lambert",GEOGCS["NAD27(CGQ77)",DATUM["North_American_Datum_1927_CGQ77",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6609"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4609"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",60],PARAMETER["standard_parallel_2",46],PARAMETER["latitude_of_origin",44],PARAMETER["central_meridian",-68.5],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2138"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=60 +lat_2=46 +lat_0=44 +lon_0=-68.5 +x_0=0 +y_0=0 +ellps=clrk66 +units=m +no_defs '); --- --- EPSG 2139 : NAD83(CSRS98) / SCoPQ zone 2 (deprecated) --- @@ -2334,39 +2466,39 @@ --- --- EPSG 2154 : RGF93 / Lambert-93 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2154,'EPSG',2154,'PROJCS["RGF93 / Lambert-93",GEOGCS["RGF93",DATUM["Reseau_Geodesique_Francais_1993",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6171"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4171"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",49],PARAMETER["standard_parallel_2",44],PARAMETER["latitude_of_origin",46.5],PARAMETER["central_meridian",3],PARAMETER["false_easting",700000],PARAMETER["false_northing",6600000],AUTHORITY["EPSG","2154"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=49 +lat_2=44 +lat_0=46.5 +lon_0=3 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2154,'EPSG',2154,'PROJCS["RGF93 / Lambert-93",GEOGCS["RGF93",DATUM["Reseau_Geodesique_Francais_1993",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6171"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4171"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",49],PARAMETER["standard_parallel_2",44],PARAMETER["latitude_of_origin",46.5],PARAMETER["central_meridian",3],PARAMETER["false_easting",700000],PARAMETER["false_northing",6600000],AUTHORITY["EPSG","2154"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=49 +lat_2=44 +lat_0=46.5 +lon_0=3 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2155 : American Samoa 1962 / American Samoa Lambert (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2155,'EPSG',2155,'PROJCS["American Samoa 1962 / American Samoa Lambert (deprecated)",GEOGCS["American Samoa 1962",DATUM["American_Samoa_1962",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-115,118,426,0,0,0,0],AUTHORITY["EPSG","6169"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4169"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",-14.26666666666667],PARAMETER["central_meridian",170],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2155"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=-14.26666666666667 +lat_0=-14.26666666666667 +lon_0=170 +k_0=1 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +towgs84=-115,118,426,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2155,'EPSG',2155,'PROJCS["American Samoa 1962 / American Samoa Lambert (deprecated)",GEOGCS["American Samoa 1962",DATUM["American_Samoa_1962",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-115,118,426,0,0,0,0],AUTHORITY["EPSG","6169"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4169"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",-14.26666666666667],PARAMETER["central_meridian",170],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2155"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=-14.26666666666667 +lat_0=-14.26666666666667 +lon_0=170 +k_0=1 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +towgs84=-115,118,426,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2156 : NAD83(HARN) / UTM zone 59S (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2156,'EPSG',2156,'PROJCS["NAD83(HARN) / UTM zone 59S (deprecated)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2156"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=59 +south +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2156,'EPSG',2156,'PROJCS["NAD83(HARN) / UTM zone 59S (deprecated)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2156"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=59 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2157 : IRENET95 / Irish Transverse Mercator --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2157,'EPSG',2157,'PROJCS["IRENET95 / Irish Transverse Mercator",GEOGCS["IRENET95",DATUM["IRENET95",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6173"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4173"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",53.5],PARAMETER["central_meridian",-8],PARAMETER["scale_factor",0.99982],PARAMETER["false_easting",600000],PARAMETER["false_northing",750000],AUTHORITY["EPSG","2157"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=53.5 +lon_0=-8 +k=0.99982 +x_0=600000 +y_0=750000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2157,'EPSG',2157,'PROJCS["IRENET95 / Irish Transverse Mercator",GEOGCS["IRENET95",DATUM["IRENET95",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6173"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4173"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",53.5],PARAMETER["central_meridian",-8],PARAMETER["scale_factor",0.99982],PARAMETER["false_easting",600000],PARAMETER["false_northing",750000],AUTHORITY["EPSG","2157"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=53.5 +lon_0=-8 +k=0.99982 +x_0=600000 +y_0=750000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2158 : IRENET95 / UTM zone 29N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2158,'EPSG',2158,'PROJCS["IRENET95 / UTM zone 29N",GEOGCS["IRENET95",DATUM["IRENET95",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6173"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4173"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2158"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2158,'EPSG',2158,'PROJCS["IRENET95 / UTM zone 29N",GEOGCS["IRENET95",DATUM["IRENET95",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6173"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4173"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2158"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2159 : Sierra Leone 1924 / New Colony Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2159,'EPSG',2159,'PROJCS["Sierra Leone 1924 / New Colony Grid",GEOGCS["Sierra Leone 1924",DATUM["Sierra_Leone_Colony_1924",SPHEROID["War Office",6378300,296,AUTHORITY["EPSG","7029"]],AUTHORITY["EPSG","6174"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4174"]],UNIT["Gold Coast foot",0.3047997101815088,AUTHORITY["EPSG","9094"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",6.666666666666667],PARAMETER["central_meridian",-12],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2159"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=6.666666666666667 +lon_0=-12 +k=1 +x_0=152399.8550907544 +y_0=0 +a=6378300 +b=6356751.689189189 +to_meter=0.3047997101815088 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2159,'EPSG',2159,'PROJCS["Sierra Leone 1924 / New Colony Grid",GEOGCS["Sierra Leone 1924",DATUM["Sierra_Leone_Colony_1924",SPHEROID["War Office",6378300,296,AUTHORITY["EPSG","7029"]],AUTHORITY["EPSG","6174"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4174"]],UNIT["Gold Coast foot",0.3047997101815088,AUTHORITY["EPSG","9094"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",6.666666666666667],PARAMETER["central_meridian",-12],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2159"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=6.666666666666667 +lon_0=-12 +k=1 +x_0=152399.8550907544 +y_0=0 +a=6378300 +b=6356751.689189189 +to_meter=0.3047997101815088 +no_defs '); --- --- EPSG 2160 : Sierra Leone 1924 / New War Office Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2160,'EPSG',2160,'PROJCS["Sierra Leone 1924 / New War Office Grid",GEOGCS["Sierra Leone 1924",DATUM["Sierra_Leone_Colony_1924",SPHEROID["War Office",6378300,296,AUTHORITY["EPSG","7029"]],AUTHORITY["EPSG","6174"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4174"]],UNIT["Gold Coast foot",0.3047997101815088,AUTHORITY["EPSG","9094"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",6.666666666666667],PARAMETER["central_meridian",-12],PARAMETER["scale_factor",1],PARAMETER["false_easting",800000],PARAMETER["false_northing",600000],AUTHORITY["EPSG","2160"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=6.666666666666667 +lon_0=-12 +k=1 +x_0=243839.7681452071 +y_0=182879.8261089053 +a=6378300 +b=6356751.689189189 +to_meter=0.3047997101815088 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2160,'EPSG',2160,'PROJCS["Sierra Leone 1924 / New War Office Grid",GEOGCS["Sierra Leone 1924",DATUM["Sierra_Leone_Colony_1924",SPHEROID["War Office",6378300,296,AUTHORITY["EPSG","7029"]],AUTHORITY["EPSG","6174"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4174"]],UNIT["Gold Coast foot",0.3047997101815088,AUTHORITY["EPSG","9094"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",6.666666666666667],PARAMETER["central_meridian",-12],PARAMETER["scale_factor",1],PARAMETER["false_easting",800000],PARAMETER["false_northing",600000],AUTHORITY["EPSG","2160"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=6.666666666666667 +lon_0=-12 +k=1 +x_0=243839.7681452071 +y_0=182879.8261089053 +a=6378300 +b=6356751.689189189 +to_meter=0.3047997101815088 +no_defs '); --- --- EPSG 2161 : Sierra Leone 1968 / UTM zone 28N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2161,'EPSG',2161,'PROJCS["Sierra Leone 1968 / UTM zone 28N",GEOGCS["Sierra Leone 1968",DATUM["Sierra_Leone_1968",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-88,4,101,0,0,0,0],AUTHORITY["EPSG","6175"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4175"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2161"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +ellps=clrk80 +towgs84=-88,4,101,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2161,'EPSG',2161,'PROJCS["Sierra Leone 1968 / UTM zone 28N",GEOGCS["Sierra Leone 1968",DATUM["Sierra_Leone_1968",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-88,4,101,0,0,0,0],AUTHORITY["EPSG","6175"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4175"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2161"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +ellps=clrk80 +towgs84=-88,4,101,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2162 : Sierra Leone 1968 / UTM zone 29N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2162,'EPSG',2162,'PROJCS["Sierra Leone 1968 / UTM zone 29N",GEOGCS["Sierra Leone 1968",DATUM["Sierra_Leone_1968",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-88,4,101,0,0,0,0],AUTHORITY["EPSG","6175"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4175"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2162"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +ellps=clrk80 +towgs84=-88,4,101,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2162,'EPSG',2162,'PROJCS["Sierra Leone 1968 / UTM zone 29N",GEOGCS["Sierra Leone 1968",DATUM["Sierra_Leone_1968",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-88,4,101,0,0,0,0],AUTHORITY["EPSG","6175"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4175"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2162"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +ellps=clrk80 +towgs84=-88,4,101,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2163 : unnamed --- @@ -2374,83 +2506,83 @@ --- --- EPSG 2164 : Locodjo 1965 / TM 5 NW --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2164,'EPSG',2164,'PROJCS["Locodjo 1965 / TM 5 NW",GEOGCS["Locodjo 1965",DATUM["Locodjo_1965",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-125,53,467,0,0,0,0],AUTHORITY["EPSG","6142"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4142"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-5],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2164"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-5 +k=0.9996 +x_0=500000 +y_0=0 +ellps=clrk80 +towgs84=-125,53,467,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2164,'EPSG',2164,'PROJCS["Locodjo 1965 / TM 5 NW",GEOGCS["Locodjo 1965",DATUM["Locodjo_1965",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-125,53,467,0,0,0,0],AUTHORITY["EPSG","6142"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4142"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-5],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2164"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-5 +k=0.9996 +x_0=500000 +y_0=0 +ellps=clrk80 +towgs84=-125,53,467,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2165 : Abidjan 1987 / TM 5 NW --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2165,'EPSG',2165,'PROJCS["Abidjan 1987 / TM 5 NW",GEOGCS["Abidjan 1987",DATUM["Abidjan_1987",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-124.76,53,466.79,0,0,0,0],AUTHORITY["EPSG","6143"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4143"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-5],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2165"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-5 +k=0.9996 +x_0=500000 +y_0=0 +ellps=clrk80 +towgs84=-124.76,53,466.79,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2165,'EPSG',2165,'PROJCS["Abidjan 1987 / TM 5 NW",GEOGCS["Abidjan 1987",DATUM["Abidjan_1987",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-124.76,53,466.79,0,0,0,0],AUTHORITY["EPSG","6143"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4143"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-5],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2165"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-5 +k=0.9996 +x_0=500000 +y_0=0 +ellps=clrk80 +towgs84=-124.76,53,466.79,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2166 : Pulkovo 1942(83) / Gauss Kruger zone 3 (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2166,'EPSG',2166,'PROJCS["Pulkovo 1942(83) / Gauss Kruger zone 3 (deprecated)",GEOGCS["Pulkovo 1942(83)",DATUM["Pulkovo_1942_83",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6178"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4178"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",1],PARAMETER["false_easting",3500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2166"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2166,'EPSG',2166,'PROJCS["Pulkovo 1942(83) / Gauss Kruger zone 3 (deprecated)",GEOGCS["Pulkovo 1942(83)",DATUM["Pulkovo_1942_83",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[26,-121,-78,0,0,0,0],AUTHORITY["EPSG","6178"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4178"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",1],PARAMETER["false_easting",3500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2166"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +ellps=krass +towgs84=26,-121,-78,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2167 : Pulkovo 1942(83) / Gauss Kruger zone 4 (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2167,'EPSG',2167,'PROJCS["Pulkovo 1942(83) / Gauss Kruger zone 4 (deprecated)",GEOGCS["Pulkovo 1942(83)",DATUM["Pulkovo_1942_83",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6178"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4178"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",12],PARAMETER["scale_factor",1],PARAMETER["false_easting",4500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2167"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2167,'EPSG',2167,'PROJCS["Pulkovo 1942(83) / Gauss Kruger zone 4 (deprecated)",GEOGCS["Pulkovo 1942(83)",DATUM["Pulkovo_1942_83",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[26,-121,-78,0,0,0,0],AUTHORITY["EPSG","6178"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4178"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",12],PARAMETER["scale_factor",1],PARAMETER["false_easting",4500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2167"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 +ellps=krass +towgs84=26,-121,-78,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2168 : Pulkovo 1942(83) / Gauss Kruger zone 5 (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2168,'EPSG',2168,'PROJCS["Pulkovo 1942(83) / Gauss Kruger zone 5 (deprecated)",GEOGCS["Pulkovo 1942(83)",DATUM["Pulkovo_1942_83",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6178"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4178"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",1],PARAMETER["false_easting",5500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2168"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=5500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2168,'EPSG',2168,'PROJCS["Pulkovo 1942(83) / Gauss Kruger zone 5 (deprecated)",GEOGCS["Pulkovo 1942(83)",DATUM["Pulkovo_1942_83",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[26,-121,-78,0,0,0,0],AUTHORITY["EPSG","6178"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4178"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",1],PARAMETER["false_easting",5500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2168"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=5500000 +y_0=0 +ellps=krass +towgs84=26,-121,-78,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2169 : Luxembourg 1930 / Gauss --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2169,'EPSG',2169,'PROJCS["Luxembourg 1930 / Gauss",GEOGCS["Luxembourg 1930",DATUM["Luxembourg_1930",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-193,13.7,-39.3,-0.41,-2.933,2.688,0.43],AUTHORITY["EPSG","6181"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4181"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",49.83333333333334],PARAMETER["central_meridian",6.166666666666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",80000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","2169"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=49.83333333333334 +lon_0=6.166666666666667 +k=1 +x_0=80000 +y_0=100000 +ellps=intl +towgs84=-193,13.7,-39.3,-0.41,-2.933,2.688,0.43 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2169,'EPSG',2169,'PROJCS["Luxembourg 1930 / Gauss",GEOGCS["Luxembourg 1930",DATUM["Luxembourg_1930",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-193,13.7,-39.3,-0.41,-2.933,2.688,0.43],AUTHORITY["EPSG","6181"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4181"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",49.83333333333334],PARAMETER["central_meridian",6.166666666666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",80000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","2169"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=49.83333333333334 +lon_0=6.166666666666667 +k=1 +x_0=80000 +y_0=100000 +ellps=intl +towgs84=-193,13.7,-39.3,-0.41,-2.933,2.688,0.43 +units=m +no_defs '); --- --- EPSG 2170 : MGI / Slovenia Grid (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2170,'EPSG',2170,'PROJCS["MGI / Slovenia Grid (deprecated)",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2170"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=0.9999 +x_0=500000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2170,'EPSG',2170,'PROJCS["MGI / Slovenia Grid (deprecated)",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2170"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=0.9999 +x_0=500000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); --- --- EPSG 2171 : Pulkovo 1942(58) / Poland zone I (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2171,'EPSG',2171,'PROJCS["Pulkovo 1942(58) / Poland zone I (deprecated)",GEOGCS["Pulkovo 1942(58)",DATUM["Pulkovo_1942_58",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6179"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4179"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",50.625],PARAMETER["central_meridian",21.08333333333333],PARAMETER["scale_factor",0.9998],PARAMETER["false_easting",4637000],PARAMETER["false_northing",5647000],AUTHORITY["EPSG","2171"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=sterea +lat_0=50.625 +lon_0=21.08333333333333 +k=0.9998 +x_0=4637000 +y_0=5647000 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2171,'EPSG',2171,'PROJCS["Pulkovo 1942(58) / Poland zone I (deprecated)",GEOGCS["Pulkovo 1942(58)",DATUM["Pulkovo_1942_58",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84],AUTHORITY["EPSG","6179"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4179"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",50.625],PARAMETER["central_meridian",21.08333333333333],PARAMETER["scale_factor",0.9998],PARAMETER["false_easting",4637000],PARAMETER["false_northing",5647000],AUTHORITY["EPSG","2171"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=sterea +lat_0=50.625 +lon_0=21.08333333333333 +k=0.9998 +x_0=4637000 +y_0=5647000 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs '); --- --- EPSG 2172 : Pulkovo 1942(58) / Poland zone II --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2172,'EPSG',2172,'PROJCS["Pulkovo 1942(58) / Poland zone II",GEOGCS["Pulkovo 1942(58)",DATUM["Pulkovo_1942_58",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6179"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4179"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",53.00194444444445],PARAMETER["central_meridian",21.50277777777778],PARAMETER["scale_factor",0.9998],PARAMETER["false_easting",4603000],PARAMETER["false_northing",5806000],AUTHORITY["EPSG","2172"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=sterea +lat_0=53.00194444444445 +lon_0=21.50277777777778 +k=0.9998 +x_0=4603000 +y_0=5806000 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2172,'EPSG',2172,'PROJCS["Pulkovo 1942(58) / Poland zone II",GEOGCS["Pulkovo 1942(58)",DATUM["Pulkovo_1942_58",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84],AUTHORITY["EPSG","6179"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4179"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",53.00194444444445],PARAMETER["central_meridian",21.50277777777778],PARAMETER["scale_factor",0.9998],PARAMETER["false_easting",4603000],PARAMETER["false_northing",5806000],AUTHORITY["EPSG","2172"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=sterea +lat_0=53.00194444444445 +lon_0=21.50277777777778 +k=0.9998 +x_0=4603000 +y_0=5806000 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs '); --- --- EPSG 2173 : Pulkovo 1942(58) / Poland zone III --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2173,'EPSG',2173,'PROJCS["Pulkovo 1942(58) / Poland zone III",GEOGCS["Pulkovo 1942(58)",DATUM["Pulkovo_1942_58",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6179"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4179"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",53.58333333333334],PARAMETER["central_meridian",17.00833333333333],PARAMETER["scale_factor",0.9998],PARAMETER["false_easting",3501000],PARAMETER["false_northing",5999000],AUTHORITY["EPSG","2173"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=sterea +lat_0=53.58333333333334 +lon_0=17.00833333333333 +k=0.9998 +x_0=3501000 +y_0=5999000 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2173,'EPSG',2173,'PROJCS["Pulkovo 1942(58) / Poland zone III",GEOGCS["Pulkovo 1942(58)",DATUM["Pulkovo_1942_58",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84],AUTHORITY["EPSG","6179"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4179"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",53.58333333333334],PARAMETER["central_meridian",17.00833333333333],PARAMETER["scale_factor",0.9998],PARAMETER["false_easting",3501000],PARAMETER["false_northing",5999000],AUTHORITY["EPSG","2173"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=sterea +lat_0=53.58333333333334 +lon_0=17.00833333333333 +k=0.9998 +x_0=3501000 +y_0=5999000 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs '); --- --- EPSG 2174 : Pulkovo 1942(58) / Poland zone IV --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2174,'EPSG',2174,'PROJCS["Pulkovo 1942(58) / Poland zone IV",GEOGCS["Pulkovo 1942(58)",DATUM["Pulkovo_1942_58",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6179"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4179"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",51.67083333333333],PARAMETER["central_meridian",16.67222222222222],PARAMETER["scale_factor",0.9998],PARAMETER["false_easting",3703000],PARAMETER["false_northing",5627000],AUTHORITY["EPSG","2174"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=sterea +lat_0=51.67083333333333 +lon_0=16.67222222222222 +k=0.9998 +x_0=3703000 +y_0=5627000 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2174,'EPSG',2174,'PROJCS["Pulkovo 1942(58) / Poland zone IV",GEOGCS["Pulkovo 1942(58)",DATUM["Pulkovo_1942_58",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84],AUTHORITY["EPSG","6179"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4179"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",51.67083333333333],PARAMETER["central_meridian",16.67222222222222],PARAMETER["scale_factor",0.9998],PARAMETER["false_easting",3703000],PARAMETER["false_northing",5627000],AUTHORITY["EPSG","2174"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=sterea +lat_0=51.67083333333333 +lon_0=16.67222222222222 +k=0.9998 +x_0=3703000 +y_0=5627000 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs '); --- --- EPSG 2175 : Pulkovo 1942(58) / Poland zone V --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2175,'EPSG',2175,'PROJCS["Pulkovo 1942(58) / Poland zone V",GEOGCS["Pulkovo 1942(58)",DATUM["Pulkovo_1942_58",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6179"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4179"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18.95833333333333],PARAMETER["scale_factor",0.999983],PARAMETER["false_easting",237000],PARAMETER["false_northing",-4700000],AUTHORITY["EPSG","2175"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=18.95833333333333 +k=0.999983 +x_0=237000 +y_0=-4700000 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2175,'EPSG',2175,'PROJCS["Pulkovo 1942(58) / Poland zone V",GEOGCS["Pulkovo 1942(58)",DATUM["Pulkovo_1942_58",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84],AUTHORITY["EPSG","6179"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4179"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18.95833333333333],PARAMETER["scale_factor",0.999983],PARAMETER["false_easting",237000],PARAMETER["false_northing",-4700000],AUTHORITY["EPSG","2175"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=18.95833333333333 +k=0.999983 +x_0=237000 +y_0=-4700000 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs '); --- --- EPSG 2176 : ETRS89 / Poland CS2000 zone 5 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2176,'EPSG',2176,'PROJCS["ETRS89 / Poland CS2000 zone 5",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.999923],PARAMETER["false_easting",5500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2176"],AXIS["y",EAST],AXIS["x",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=0.999923 +x_0=5500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2176,'EPSG',2176,'PROJCS["ETRS89 / Poland CS2000 zone 5",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.999923],PARAMETER["false_easting",5500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2176"],AXIS["x",NORTH],AXIS["y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=0.999923 +x_0=5500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2177 : ETRS89 / Poland CS2000 zone 6 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2177,'EPSG',2177,'PROJCS["ETRS89 / Poland CS2000 zone 6",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18],PARAMETER["scale_factor",0.999923],PARAMETER["false_easting",6500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2177"],AXIS["y",EAST],AXIS["x",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=18 +k=0.999923 +x_0=6500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2177,'EPSG',2177,'PROJCS["ETRS89 / Poland CS2000 zone 6",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18],PARAMETER["scale_factor",0.999923],PARAMETER["false_easting",6500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2177"],AXIS["x",NORTH],AXIS["y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=18 +k=0.999923 +x_0=6500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2178 : ETRS89 / Poland CS2000 zone 7 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2178,'EPSG',2178,'PROJCS["ETRS89 / Poland CS2000 zone 7",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",0.999923],PARAMETER["false_easting",7500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2178"],AXIS["y",EAST],AXIS["x",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=0.999923 +x_0=7500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2178,'EPSG',2178,'PROJCS["ETRS89 / Poland CS2000 zone 7",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",0.999923],PARAMETER["false_easting",7500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2178"],AXIS["x",NORTH],AXIS["y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=0.999923 +x_0=7500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2179 : ETRS89 / Poland CS2000 zone 8 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2179,'EPSG',2179,'PROJCS["ETRS89 / Poland CS2000 zone 8",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",24],PARAMETER["scale_factor",0.999923],PARAMETER["false_easting",8500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2179"],AXIS["y",EAST],AXIS["x",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=24 +k=0.999923 +x_0=8500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2179,'EPSG',2179,'PROJCS["ETRS89 / Poland CS2000 zone 8",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",24],PARAMETER["scale_factor",0.999923],PARAMETER["false_easting",8500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2179"],AXIS["x",NORTH],AXIS["y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=24 +k=0.999923 +x_0=8500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2180 : ETRS89 / Poland CS92 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2180,'EPSG',2180,'PROJCS["ETRS89 / Poland CS92",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",19],PARAMETER["scale_factor",0.9993],PARAMETER["false_easting",500000],PARAMETER["false_northing",-5300000],AUTHORITY["EPSG","2180"],AXIS["y",EAST],AXIS["x",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=19 +k=0.9993 +x_0=500000 +y_0=-5300000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2180,'EPSG',2180,'PROJCS["ETRS89 / Poland CS92",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",19],PARAMETER["scale_factor",0.9993],PARAMETER["false_easting",500000],PARAMETER["false_northing",-5300000],AUTHORITY["EPSG","2180"],AXIS["x",NORTH],AXIS["y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=19 +k=0.9993 +x_0=500000 +y_0=-5300000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2188 : Azores Occidental 1939 / UTM zone 25N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2188,'EPSG',2188,'PROJCS["Azores Occidental 1939 / UTM zone 25N",GEOGCS["Azores Occidental 1939",DATUM["Azores_Occidental_Islands_1939",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6182"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4182"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2188"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=25 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2188,'EPSG',2188,'PROJCS["Azores Occidental 1939 / UTM zone 25N",GEOGCS["Azores Occidental 1939",DATUM["Azores_Occidental_Islands_1939",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-425,-169,81,0,0,0,0],AUTHORITY["EPSG","6182"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4182"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2188"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=25 +ellps=intl +towgs84=-425,-169,81,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2189 : Azores Central 1948 / UTM zone 26N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2189,'EPSG',2189,'PROJCS["Azores Central 1948 / UTM zone 26N",GEOGCS["Azores Central 1948",DATUM["Azores_Central_Islands_1948",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-104,167,-38,0,0,0,0],AUTHORITY["EPSG","6183"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4183"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2189"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=26 +ellps=intl +towgs84=-104,167,-38,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2189,'EPSG',2189,'PROJCS["Azores Central 1948 / UTM zone 26N",GEOGCS["Azores Central 1948",DATUM["Azores_Central_Islands_1948",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-104,167,-38,0,0,0,0],AUTHORITY["EPSG","6183"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4183"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2189"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=26 +ellps=intl +towgs84=-104,167,-38,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2190 : Azores Oriental 1940 / UTM zone 26N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2190,'EPSG',2190,'PROJCS["Azores Oriental 1940 / UTM zone 26N",GEOGCS["Azores Oriental 1940",DATUM["Azores_Oriental_Islands_1940",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-203,141,53,0,0,0,0],AUTHORITY["EPSG","6184"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4184"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2190"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=26 +ellps=intl +towgs84=-203,141,53,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2190,'EPSG',2190,'PROJCS["Azores Oriental 1940 / UTM zone 26N",GEOGCS["Azores Oriental 1940",DATUM["Azores_Oriental_Islands_1940",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-203,141,53,0,0,0,0],AUTHORITY["EPSG","6184"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4184"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2190"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=26 +ellps=intl +towgs84=-203,141,53,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2191 : Madeira 1936 / UTM zone 28N (deprecated) --- @@ -2458,107 +2590,107 @@ --- --- EPSG 2192 : ED50 / France EuroLambert --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2192,'EPSG',2192,'PROJCS["ED50 / France EuroLambert",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",46.8],PARAMETER["central_meridian",2.337229166666667],PARAMETER["scale_factor",0.99987742],PARAMETER["false_easting",600000],PARAMETER["false_northing",2200000],AUTHORITY["EPSG","2192"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=2.337229166666667 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2192,'EPSG',2192,'PROJCS["ED50 / France EuroLambert",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-87,-98,-121,0,0,0,0],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",46.8],PARAMETER["central_meridian",2.337229166666667],PARAMETER["scale_factor",0.99987742],PARAMETER["false_easting",600000],PARAMETER["false_northing",2200000],AUTHORITY["EPSG","2192"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=2.337229166666667 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +ellps=intl +towgs84=-87,-98,-121,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2193 : NZGD2000 / New Zealand Transverse Mercator 2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2193,'EPSG',2193,'PROJCS["NZGD2000 / New Zealand Transverse Mercator 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",173],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1600000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2193"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=173 +k=0.9996 +x_0=1600000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2193,'EPSG',2193,'PROJCS["NZGD2000 / New Zealand Transverse Mercator 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",173],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1600000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2193"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=0 +lon_0=173 +k=0.9996 +x_0=1600000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2194 : American Samoa 1962 / American Samoa Lambert (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2194,'EPSG',2194,'PROJCS["American Samoa 1962 / American Samoa Lambert (deprecated)",GEOGCS["American Samoa 1962",DATUM["American_Samoa_1962",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-115,118,426,0,0,0,0],AUTHORITY["EPSG","6169"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4169"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",-14.26666666666667],PARAMETER["central_meridian",-170],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2194"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=-14.26666666666667 +lat_0=-14.26666666666667 +lon_0=-170 +k_0=1 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +towgs84=-115,118,426,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2194,'EPSG',2194,'PROJCS["American Samoa 1962 / American Samoa Lambert (deprecated)",GEOGCS["American Samoa 1962",DATUM["American_Samoa_1962",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-115,118,426,0,0,0,0],AUTHORITY["EPSG","6169"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4169"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",-14.26666666666667],PARAMETER["central_meridian",-170],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2194"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=-14.26666666666667 +lat_0=-14.26666666666667 +lon_0=-170 +k_0=1 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +towgs84=-115,118,426,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2195 : NAD83(HARN) / UTM zone 2S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2195,'EPSG',2195,'PROJCS["NAD83(HARN) / UTM zone 2S",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2195"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=2 +south +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2195,'EPSG',2195,'PROJCS["NAD83(HARN) / UTM zone 2S",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2195"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=2 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2196 : ETRS89 / Kp2000 Jutland --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2196,'EPSG',2196,'PROJCS["ETRS89 / Kp2000 Jutland",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9.5],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2196"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=9.5 +k=0.99995 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2196,'EPSG',2196,'PROJCS["ETRS89 / Kp2000 Jutland",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9.5],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2196"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=9.5 +k=0.99995 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2197 : ETRS89 / Kp2000 Zealand --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2197,'EPSG',2197,'PROJCS["ETRS89 / Kp2000 Zealand",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",12],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2197"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=12 +k=0.99995 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2197,'EPSG',2197,'PROJCS["ETRS89 / Kp2000 Zealand",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",12],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2197"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=12 +k=0.99995 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2198 : ETRS89 / Kp2000 Bornholm --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2198,'EPSG',2198,'PROJCS["ETRS89 / Kp2000 Bornholm",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",1],PARAMETER["false_easting",900000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2198"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=900000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2198,'EPSG',2198,'PROJCS["ETRS89 / Kp2000 Bornholm",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",1],PARAMETER["false_easting",900000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2198"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=900000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2199 : Albanian 1987 / Gauss Kruger zone 4 (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2199,'EPSG',2199,'PROJCS["Albanian 1987 / Gauss Kruger zone 4 (deprecated)",GEOGCS["Albanian 1987",DATUM["Albanian_1987",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6191"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4191"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",4500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2199"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=4500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2199,'EPSG',2199,'PROJCS["Albanian 1987 / Gauss Kruger zone 4 (deprecated)",GEOGCS["Albanian 1987",DATUM["Albanian_1987",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6191"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4191"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",4500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2199"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=4500000 +y_0=0 +ellps=krass +units=m +no_defs '); --- --- EPSG 2200 : ATS77 / New Brunswick Stereographic (ATS77) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2200,'EPSG',2200,'PROJCS["ATS77 / New Brunswick Stereographic (ATS77)",GEOGCS["ATS77",DATUM["Average_Terrestrial_System_1977",SPHEROID["Average Terrestrial System 1977",6378135,298.257,AUTHORITY["EPSG","7041"]],AUTHORITY["EPSG","6122"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4122"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",46.5],PARAMETER["central_meridian",-66.5],PARAMETER["scale_factor",0.999912],PARAMETER["false_easting",300000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2200"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=sterea +lat_0=46.5 +lon_0=-66.5 +k=0.999912 +x_0=300000 +y_0=800000 +a=6378135 +b=6356750.304921594 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2200,'EPSG',2200,'PROJCS["ATS77 / New Brunswick Stereographic (ATS77)",GEOGCS["ATS77",DATUM["Average_Terrestrial_System_1977",SPHEROID["Average Terrestrial System 1977",6378135,298.257,AUTHORITY["EPSG","7041"]],AUTHORITY["EPSG","6122"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4122"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",46.5],PARAMETER["central_meridian",-66.5],PARAMETER["scale_factor",0.999912],PARAMETER["false_easting",300000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2200"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=sterea +lat_0=46.5 +lon_0=-66.5 +k=0.999912 +x_0=300000 +y_0=800000 +a=6378135 +b=6356750.304921594 +units=m +no_defs '); --- --- EPSG 2201 : REGVEN / UTM zone 18N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2201,'EPSG',2201,'PROJCS["REGVEN / UTM zone 18N",GEOGCS["REGVEN",DATUM["Red_Geodesica_Venezolana",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6189"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4189"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2201"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2201,'EPSG',2201,'PROJCS["REGVEN / UTM zone 18N",GEOGCS["REGVEN",DATUM["Red_Geodesica_Venezolana",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6189"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4189"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2201"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2202 : REGVEN / UTM zone 19N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2202,'EPSG',2202,'PROJCS["REGVEN / UTM zone 19N",GEOGCS["REGVEN",DATUM["Red_Geodesica_Venezolana",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6189"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4189"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2202"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2202,'EPSG',2202,'PROJCS["REGVEN / UTM zone 19N",GEOGCS["REGVEN",DATUM["Red_Geodesica_Venezolana",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6189"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4189"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2202"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2203 : REGVEN / UTM zone 20N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2203,'EPSG',2203,'PROJCS["REGVEN / UTM zone 20N",GEOGCS["REGVEN",DATUM["Red_Geodesica_Venezolana",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6189"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4189"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2203"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2203,'EPSG',2203,'PROJCS["REGVEN / UTM zone 20N",GEOGCS["REGVEN",DATUM["Red_Geodesica_Venezolana",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6189"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4189"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2203"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2204 : NAD27 / Tennessee --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2204,'EPSG',2204,'PROJCS["NAD27 / Tennessee",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",35.25],PARAMETER["standard_parallel_2",36.41666666666666],PARAMETER["latitude_of_origin",34.66666666666666],PARAMETER["central_meridian",-86],PARAMETER["false_easting",2000000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","2204"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=35.25 +lat_2=36.41666666666666 +lat_0=34.66666666666666 +lon_0=-86 +x_0=609601.2192024384 +y_0=30480.06096012192 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2204,'EPSG',2204,'PROJCS["NAD27 / Tennessee",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",35.25],PARAMETER["standard_parallel_2",36.41666666666666],PARAMETER["latitude_of_origin",34.66666666666666],PARAMETER["central_meridian",-86],PARAMETER["false_easting",2000000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","2204"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=35.25 +lat_2=36.41666666666666 +lat_0=34.66666666666666 +lon_0=-86 +x_0=609601.2192024384 +y_0=30480.06096012192 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 2205 : NAD83 / Kentucky North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2205,'EPSG',2205,'PROJCS["NAD83 / Kentucky North",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.96666666666667],PARAMETER["standard_parallel_2",38.96666666666667],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-84.25],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2205"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.96666666666667 +lat_2=38.96666666666667 +lat_0=37.5 +lon_0=-84.25 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2205,'EPSG',2205,'PROJCS["NAD83 / Kentucky North",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.96666666666667],PARAMETER["standard_parallel_2",38.96666666666667],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-84.25],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2205"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.96666666666667 +lat_2=38.96666666666667 +lat_0=37.5 +lon_0=-84.25 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2206 : ED50 / 3-degree Gauss-Kruger zone 9 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2206,'EPSG',2206,'PROJCS["ED50 / 3-degree Gauss-Kruger zone 9",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",1],PARAMETER["false_easting",9500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2206"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=9500000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2206,'EPSG',2206,'PROJCS["ED50 / 3-degree Gauss-Kruger zone 9",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-87,-98,-121,0,0,0,0],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",1],PARAMETER["false_easting",9500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2206"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=9500000 +y_0=0 +ellps=intl +towgs84=-87,-98,-121,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2207 : ED50 / 3-degree Gauss-Kruger zone 10 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2207,'EPSG',2207,'PROJCS["ED50 / 3-degree Gauss-Kruger zone 10",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",30],PARAMETER["scale_factor",1],PARAMETER["false_easting",10500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2207"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=10500000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2207,'EPSG',2207,'PROJCS["ED50 / 3-degree Gauss-Kruger zone 10",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-87,-98,-121,0,0,0,0],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",30],PARAMETER["scale_factor",1],PARAMETER["false_easting",10500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2207"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=10500000 +y_0=0 +ellps=intl +towgs84=-87,-98,-121,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2208 : ED50 / 3-degree Gauss-Kruger zone 11 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2208,'EPSG',2208,'PROJCS["ED50 / 3-degree Gauss-Kruger zone 11",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",1],PARAMETER["false_easting",11500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2208"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=11500000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2208,'EPSG',2208,'PROJCS["ED50 / 3-degree Gauss-Kruger zone 11",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-87,-98,-121,0,0,0,0],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",1],PARAMETER["false_easting",11500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2208"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=11500000 +y_0=0 +ellps=intl +towgs84=-87,-98,-121,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2209 : ED50 / 3-degree Gauss-Kruger zone 12 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2209,'EPSG',2209,'PROJCS["ED50 / 3-degree Gauss-Kruger zone 12",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",36],PARAMETER["scale_factor",1],PARAMETER["false_easting",12500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2209"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=36 +k=1 +x_0=12500000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2209,'EPSG',2209,'PROJCS["ED50 / 3-degree Gauss-Kruger zone 12",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-87,-98,-121,0,0,0,0],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",36],PARAMETER["scale_factor",1],PARAMETER["false_easting",12500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2209"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=36 +k=1 +x_0=12500000 +y_0=0 +ellps=intl +towgs84=-87,-98,-121,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2210 : ED50 / 3-degree Gauss-Kruger zone 13 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2210,'EPSG',2210,'PROJCS["ED50 / 3-degree Gauss-Kruger zone 13",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",1],PARAMETER["false_easting",13500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2210"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=13500000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2210,'EPSG',2210,'PROJCS["ED50 / 3-degree Gauss-Kruger zone 13",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-87,-98,-121,0,0,0,0],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",1],PARAMETER["false_easting",13500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2210"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=13500000 +y_0=0 +ellps=intl +towgs84=-87,-98,-121,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2211 : ED50 / 3-degree Gauss-Kruger zone 14 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2211,'EPSG',2211,'PROJCS["ED50 / 3-degree Gauss-Kruger zone 14",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",42],PARAMETER["scale_factor",1],PARAMETER["false_easting",14500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2211"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=42 +k=1 +x_0=14500000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2211,'EPSG',2211,'PROJCS["ED50 / 3-degree Gauss-Kruger zone 14",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-87,-98,-121,0,0,0,0],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",42],PARAMETER["scale_factor",1],PARAMETER["false_easting",14500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2211"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=42 +k=1 +x_0=14500000 +y_0=0 +ellps=intl +towgs84=-87,-98,-121,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2212 : ED50 / 3-degree Gauss-Kruger zone 15 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2212,'EPSG',2212,'PROJCS["ED50 / 3-degree Gauss-Kruger zone 15",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",1],PARAMETER["false_easting",15500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2212"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=15500000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2212,'EPSG',2212,'PROJCS["ED50 / 3-degree Gauss-Kruger zone 15",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-87,-98,-121,0,0,0,0],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",1],PARAMETER["false_easting",15500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2212"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=15500000 +y_0=0 +ellps=intl +towgs84=-87,-98,-121,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2213 : ETRS89 / TM 30 NE --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2213,'EPSG',2213,'PROJCS["ETRS89 / TM 30 NE",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",30],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2213"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=30 +k=0.9996 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2213,'EPSG',2213,'PROJCS["ETRS89 / TM 30 NE",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",30],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2213"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=30 +k=0.9996 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2214 : Douala 1948 / AOF west (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2214,'EPSG',2214,'PROJCS["Douala 1948 / AOF west (deprecated)",GEOGCS["Douala 1948",DATUM["Douala_1948",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-206.1,-174.7,-87.7,0,0,0,0],AUTHORITY["EPSG","6192"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4192"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",10.5],PARAMETER["scale_factor",0.999],PARAMETER["false_easting",1000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","2214"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=10.5 +k=0.999 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs84=-206.1,-174.7,-87.7,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2214,'EPSG',2214,'PROJCS["Douala 1948 / AOF west (deprecated)",GEOGCS["Douala 1948",DATUM["Douala_1948",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-206.1,-174.7,-87.7,0,0,0,0],AUTHORITY["EPSG","6192"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4192"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",10.5],PARAMETER["scale_factor",0.999],PARAMETER["false_easting",1000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","2214"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=10.5 +k=0.999 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs84=-206.1,-174.7,-87.7,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2215 : Manoca 1962 / UTM zone 32N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2215,'EPSG',2215,'PROJCS["Manoca 1962 / UTM zone 32N",GEOGCS["Manoca 1962",DATUM["Manoca_1962",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-70.9,-151.8,-41.4,0,0,0,0],AUTHORITY["EPSG","6193"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4193"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2215"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +a=6378249.2 +b=6356515 +towgs84=-70.9,-151.8,-41.4,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2215,'EPSG',2215,'PROJCS["Manoca 1962 / UTM zone 32N",GEOGCS["Manoca 1962",DATUM["Manoca_1962",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-70.9,-151.8,-41.4,0,0,0,0],AUTHORITY["EPSG","6193"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4193"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2215"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +a=6378249.2 +b=6356515 +towgs84=-70.9,-151.8,-41.4,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2216 : Qornoq 1927 / UTM zone 22N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2216,'EPSG',2216,'PROJCS["Qornoq 1927 / UTM zone 22N",GEOGCS["Qornoq 1927",DATUM["Qornoq_1927",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6194"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4194"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2216"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2216,'EPSG',2216,'PROJCS["Qornoq 1927 / UTM zone 22N",GEOGCS["Qornoq 1927",DATUM["Qornoq_1927",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[163.511,127.533,-159.789,0,0,0.814,-0.6],AUTHORITY["EPSG","6194"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4194"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2216"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +ellps=intl +towgs84=163.511,127.533,-159.789,0,0,0.814,-0.6 +units=m +no_defs '); --- --- EPSG 2217 : Qornoq 1927 / UTM zone 23N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2217,'EPSG',2217,'PROJCS["Qornoq 1927 / UTM zone 23N",GEOGCS["Qornoq 1927",DATUM["Qornoq_1927",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6194"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4194"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2217"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=23 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2217,'EPSG',2217,'PROJCS["Qornoq 1927 / UTM zone 23N",GEOGCS["Qornoq 1927",DATUM["Qornoq_1927",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[163.511,127.533,-159.789,0,0,0.814,-0.6],AUTHORITY["EPSG","6194"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4194"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2217"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=23 +ellps=intl +towgs84=163.511,127.533,-159.789,0,0,0.814,-0.6 +units=m +no_defs '); --- --- EPSG 2218 : Scoresbysund 1952 / Greenland zone 5 east --- @@ -2566,11 +2698,11 @@ --- --- EPSG 2219 : ATS77 / UTM zone 19N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2219,'EPSG',2219,'PROJCS["ATS77 / UTM zone 19N",GEOGCS["ATS77",DATUM["Average_Terrestrial_System_1977",SPHEROID["Average Terrestrial System 1977",6378135,298.257,AUTHORITY["EPSG","7041"]],AUTHORITY["EPSG","6122"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4122"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2219"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +a=6378135 +b=6356750.304921594 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2219,'EPSG',2219,'PROJCS["ATS77 / UTM zone 19N",GEOGCS["ATS77",DATUM["Average_Terrestrial_System_1977",SPHEROID["Average Terrestrial System 1977",6378135,298.257,AUTHORITY["EPSG","7041"]],AUTHORITY["EPSG","6122"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4122"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2219"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +a=6378135 +b=6356750.304921594 +units=m +no_defs '); --- --- EPSG 2220 : ATS77 / UTM zone 20N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2220,'EPSG',2220,'PROJCS["ATS77 / UTM zone 20N",GEOGCS["ATS77",DATUM["Average_Terrestrial_System_1977",SPHEROID["Average Terrestrial System 1977",6378135,298.257,AUTHORITY["EPSG","7041"]],AUTHORITY["EPSG","6122"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4122"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2220"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +a=6378135 +b=6356750.304921594 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2220,'EPSG',2220,'PROJCS["ATS77 / UTM zone 20N",GEOGCS["ATS77",DATUM["Average_Terrestrial_System_1977",SPHEROID["Average Terrestrial System 1977",6378135,298.257,AUTHORITY["EPSG","7041"]],AUTHORITY["EPSG","6122"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4122"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2220"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +a=6378135 +b=6356750.304921594 +units=m +no_defs '); --- --- EPSG 2221 : Scoresbysund 1952 / Greenland zone 6 east --- @@ -2578,283 +2710,283 @@ --- --- EPSG 2222 : NAD83 / Arizona East (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2222,'EPSG',2222,'PROJCS["NAD83 / Arizona East (ft)",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["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-110.1666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2222"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2222,'EPSG',2222,'PROJCS["NAD83 / Arizona East (ft)",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"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-110.1666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2222"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 2223 : NAD83 / Arizona Central (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2223,'EPSG',2223,'PROJCS["NAD83 / Arizona Central (ft)",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["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-111.9166666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2223"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2223,'EPSG',2223,'PROJCS["NAD83 / Arizona Central (ft)",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"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-111.9166666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2223"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 2224 : NAD83 / Arizona West (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2224,'EPSG',2224,'PROJCS["NAD83 / Arizona West (ft)",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["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-113.75],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2224"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.999933333 +x_0=213360 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2224,'EPSG',2224,'PROJCS["NAD83 / Arizona West (ft)",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"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-113.75],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2224"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.999933333 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 2225 : NAD83 / California zone 1 (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2225,'EPSG',2225,'PROJCS["NAD83 / California zone 1 (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.66666666666666],PARAMETER["standard_parallel_2",40],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-122],PARAMETER["false_easting",6561666.667],PARAMETER["false_northing",1640416.667],AUTHORITY["EPSG","2225"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.66666666666666 +lat_2=40 +lat_0=39.33333333333334 +lon_0=-122 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2225,'EPSG',2225,'PROJCS["NAD83 / California zone 1 (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.66666666666666],PARAMETER["standard_parallel_2",40],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-122],PARAMETER["false_easting",6561666.667],PARAMETER["false_northing",1640416.667],AUTHORITY["EPSG","2225"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.66666666666666 +lat_2=40 +lat_0=39.33333333333334 +lon_0=-122 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2226 : NAD83 / California zone 2 (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2226,'EPSG',2226,'PROJCS["NAD83 / California zone 2 (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.83333333333334],PARAMETER["standard_parallel_2",38.33333333333334],PARAMETER["latitude_of_origin",37.66666666666666],PARAMETER["central_meridian",-122],PARAMETER["false_easting",6561666.667],PARAMETER["false_northing",1640416.667],AUTHORITY["EPSG","2226"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.83333333333334 +lat_2=38.33333333333334 +lat_0=37.66666666666666 +lon_0=-122 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2226,'EPSG',2226,'PROJCS["NAD83 / California zone 2 (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.83333333333334],PARAMETER["standard_parallel_2",38.33333333333334],PARAMETER["latitude_of_origin",37.66666666666666],PARAMETER["central_meridian",-122],PARAMETER["false_easting",6561666.667],PARAMETER["false_northing",1640416.667],AUTHORITY["EPSG","2226"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.83333333333334 +lat_2=38.33333333333334 +lat_0=37.66666666666666 +lon_0=-122 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2227 : NAD83 / California zone 3 (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2227,'EPSG',2227,'PROJCS["NAD83 / California zone 3 (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.43333333333333],PARAMETER["standard_parallel_2",37.06666666666667],PARAMETER["latitude_of_origin",36.5],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",6561666.667],PARAMETER["false_northing",1640416.667],AUTHORITY["EPSG","2227"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.43333333333333 +lat_2=37.06666666666667 +lat_0=36.5 +lon_0=-120.5 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2227,'EPSG',2227,'PROJCS["NAD83 / California zone 3 (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.43333333333333],PARAMETER["standard_parallel_2",37.06666666666667],PARAMETER["latitude_of_origin",36.5],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",6561666.667],PARAMETER["false_northing",1640416.667],AUTHORITY["EPSG","2227"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.43333333333333 +lat_2=37.06666666666667 +lat_0=36.5 +lon_0=-120.5 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2228 : NAD83 / California zone 4 (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2228,'EPSG',2228,'PROJCS["NAD83 / California zone 4 (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.25],PARAMETER["standard_parallel_2",36],PARAMETER["latitude_of_origin",35.33333333333334],PARAMETER["central_meridian",-119],PARAMETER["false_easting",6561666.667],PARAMETER["false_northing",1640416.667],AUTHORITY["EPSG","2228"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.25 +lat_2=36 +lat_0=35.33333333333334 +lon_0=-119 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2228,'EPSG',2228,'PROJCS["NAD83 / California zone 4 (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.25],PARAMETER["standard_parallel_2",36],PARAMETER["latitude_of_origin",35.33333333333334],PARAMETER["central_meridian",-119],PARAMETER["false_easting",6561666.667],PARAMETER["false_northing",1640416.667],AUTHORITY["EPSG","2228"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.25 +lat_2=36 +lat_0=35.33333333333334 +lon_0=-119 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2229 : NAD83 / California zone 5 (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2229,'EPSG',2229,'PROJCS["NAD83 / California zone 5 (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",35.46666666666667],PARAMETER["standard_parallel_2",34.03333333333333],PARAMETER["latitude_of_origin",33.5],PARAMETER["central_meridian",-118],PARAMETER["false_easting",6561666.667],PARAMETER["false_northing",1640416.667],AUTHORITY["EPSG","2229"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=35.46666666666667 +lat_2=34.03333333333333 +lat_0=33.5 +lon_0=-118 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2229,'EPSG',2229,'PROJCS["NAD83 / California zone 5 (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",35.46666666666667],PARAMETER["standard_parallel_2",34.03333333333333],PARAMETER["latitude_of_origin",33.5],PARAMETER["central_meridian",-118],PARAMETER["false_easting",6561666.667],PARAMETER["false_northing",1640416.667],AUTHORITY["EPSG","2229"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=35.46666666666667 +lat_2=34.03333333333333 +lat_0=33.5 +lon_0=-118 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2230 : NAD83 / California zone 6 (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2230,'EPSG',2230,'PROJCS["NAD83 / California zone 6 (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",33.88333333333333],PARAMETER["standard_parallel_2",32.78333333333333],PARAMETER["latitude_of_origin",32.16666666666666],PARAMETER["central_meridian",-116.25],PARAMETER["false_easting",6561666.667],PARAMETER["false_northing",1640416.667],AUTHORITY["EPSG","2230"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=33.88333333333333 +lat_2=32.78333333333333 +lat_0=32.16666666666666 +lon_0=-116.25 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2230,'EPSG',2230,'PROJCS["NAD83 / California zone 6 (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",33.88333333333333],PARAMETER["standard_parallel_2",32.78333333333333],PARAMETER["latitude_of_origin",32.16666666666666],PARAMETER["central_meridian",-116.25],PARAMETER["false_easting",6561666.667],PARAMETER["false_northing",1640416.667],AUTHORITY["EPSG","2230"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=33.88333333333333 +lat_2=32.78333333333333 +lat_0=32.16666666666666 +lon_0=-116.25 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2231 : NAD83 / Colorado North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2231,'EPSG',2231,'PROJCS["NAD83 / Colorado North (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.78333333333333],PARAMETER["standard_parallel_2",39.71666666666667],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-105.5],PARAMETER["false_easting",3000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","2231"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.78333333333333 +lat_2=39.71666666666667 +lat_0=39.33333333333334 +lon_0=-105.5 +x_0=914401.8288036576 +y_0=304800.6096012192 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2231,'EPSG',2231,'PROJCS["NAD83 / Colorado North (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.78333333333333],PARAMETER["standard_parallel_2",39.71666666666667],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-105.5],PARAMETER["false_easting",3000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","2231"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.78333333333333 +lat_2=39.71666666666667 +lat_0=39.33333333333334 +lon_0=-105.5 +x_0=914401.8288036576 +y_0=304800.6096012192 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2232 : NAD83 / Colorado Central (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2232,'EPSG',2232,'PROJCS["NAD83 / Colorado Central (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.75],PARAMETER["standard_parallel_2",38.45],PARAMETER["latitude_of_origin",37.83333333333334],PARAMETER["central_meridian",-105.5],PARAMETER["false_easting",3000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","2232"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.75 +lat_2=38.45 +lat_0=37.83333333333334 +lon_0=-105.5 +x_0=914401.8288036576 +y_0=304800.6096012192 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2232,'EPSG',2232,'PROJCS["NAD83 / Colorado Central (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.75],PARAMETER["standard_parallel_2",38.45],PARAMETER["latitude_of_origin",37.83333333333334],PARAMETER["central_meridian",-105.5],PARAMETER["false_easting",3000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","2232"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.75 +lat_2=38.45 +lat_0=37.83333333333334 +lon_0=-105.5 +x_0=914401.8288036576 +y_0=304800.6096012192 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2233 : NAD83 / Colorado South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2233,'EPSG',2233,'PROJCS["NAD83 / Colorado South (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.43333333333333],PARAMETER["standard_parallel_2",37.23333333333333],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-105.5],PARAMETER["false_easting",3000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","2233"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.43333333333333 +lat_2=37.23333333333333 +lat_0=36.66666666666666 +lon_0=-105.5 +x_0=914401.8288036576 +y_0=304800.6096012192 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2233,'EPSG',2233,'PROJCS["NAD83 / Colorado South (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.43333333333333],PARAMETER["standard_parallel_2",37.23333333333333],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-105.5],PARAMETER["false_easting",3000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","2233"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.43333333333333 +lat_2=37.23333333333333 +lat_0=36.66666666666666 +lon_0=-105.5 +x_0=914401.8288036576 +y_0=304800.6096012192 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2234 : NAD83 / Connecticut (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2234,'EPSG',2234,'PROJCS["NAD83 / Connecticut (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.86666666666667],PARAMETER["standard_parallel_2",41.2],PARAMETER["latitude_of_origin",40.83333333333334],PARAMETER["central_meridian",-72.75],PARAMETER["false_easting",1000000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","2234"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.86666666666667 +lat_2=41.2 +lat_0=40.83333333333334 +lon_0=-72.75 +x_0=304800.6096012192 +y_0=152400.3048006096 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2234,'EPSG',2234,'PROJCS["NAD83 / Connecticut (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.86666666666667],PARAMETER["standard_parallel_2",41.2],PARAMETER["latitude_of_origin",40.83333333333334],PARAMETER["central_meridian",-72.75],PARAMETER["false_easting",1000000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","2234"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.86666666666667 +lat_2=41.2 +lat_0=40.83333333333334 +lon_0=-72.75 +x_0=304800.6096012192 +y_0=152400.3048006096 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2235 : NAD83 / Delaware (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2235,'EPSG',2235,'PROJCS["NAD83 / Delaware (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],PARAMETER["central_meridian",-75.41666666666667],PARAMETER["scale_factor",0.999995],PARAMETER["false_easting",656166.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2235"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999995 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2235,'EPSG',2235,'PROJCS["NAD83 / Delaware (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",38],PARAMETER["central_meridian",-75.41666666666667],PARAMETER["scale_factor",0.999995],PARAMETER["false_easting",656166.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2235"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999995 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2236 : NAD83 / Florida East (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2236,'EPSG',2236,'PROJCS["NAD83 / Florida 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",24.33333333333333],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",656166.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2236"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999941177 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2236,'EPSG',2236,'PROJCS["NAD83 / Florida East (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",24.33333333333333],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",656166.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2236"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999941177 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2237 : NAD83 / Florida West (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2237,'EPSG',2237,'PROJCS["NAD83 / Florida West (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",24.33333333333333],PARAMETER["central_meridian",-82],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",656166.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2237"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999941177 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2237,'EPSG',2237,'PROJCS["NAD83 / Florida West (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",24.33333333333333],PARAMETER["central_meridian",-82],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",656166.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2237"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999941177 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2238 : NAD83 / Florida North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2238,'EPSG',2238,'PROJCS["NAD83 / Florida North (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",30.75],PARAMETER["standard_parallel_2",29.58333333333333],PARAMETER["latitude_of_origin",29],PARAMETER["central_meridian",-84.5],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","2238"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=30.75 +lat_2=29.58333333333333 +lat_0=29 +lon_0=-84.5 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2238,'EPSG',2238,'PROJCS["NAD83 / Florida North (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",30.75],PARAMETER["standard_parallel_2",29.58333333333333],PARAMETER["latitude_of_origin",29],PARAMETER["central_meridian",-84.5],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","2238"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=30.75 +lat_2=29.58333333333333 +lat_0=29 +lon_0=-84.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2239 : NAD83 / Georgia East (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2239,'EPSG',2239,'PROJCS["NAD83 / Georgia 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",30],PARAMETER["central_meridian",-82.16666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",656166.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2239"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.9999 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2239,'EPSG',2239,'PROJCS["NAD83 / Georgia East (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",-82.16666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",656166.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2239"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.9999 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2240 : NAD83 / Georgia West (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2240,'EPSG',2240,'PROJCS["NAD83 / Georgia West (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",30],PARAMETER["central_meridian",-84.16666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",2296583.333],PARAMETER["false_northing",0],AUTHORITY["EPSG","2240"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.9999 +x_0=699999.9998983998 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2240,'EPSG',2240,'PROJCS["NAD83 / Georgia West (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",-84.16666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",2296583.333],PARAMETER["false_northing",0],AUTHORITY["EPSG","2240"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.9999 +x_0=699999.9998983998 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2241 : NAD83 / Idaho East (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2241,'EPSG',2241,'PROJCS["NAD83 / Idaho 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",41.66666666666666],PARAMETER["central_meridian",-112.1666666666667],PARAMETER["scale_factor",0.999947368],PARAMETER["false_easting",656166.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2241"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666666667 +k=0.9999473679999999 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2241,'EPSG',2241,'PROJCS["NAD83 / Idaho East (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-112.1666666666667],PARAMETER["scale_factor",0.999947368],PARAMETER["false_easting",656166.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2241"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666666667 +k=0.9999473679999999 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2242 : NAD83 / Idaho Central (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2242,'EPSG',2242,'PROJCS["NAD83 / Idaho Central (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",41.66666666666666],PARAMETER["central_meridian",-114],PARAMETER["scale_factor",0.999947368],PARAMETER["false_easting",1640416.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2242"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.9999473679999999 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2242,'EPSG',2242,'PROJCS["NAD83 / Idaho Central (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-114],PARAMETER["scale_factor",0.999947368],PARAMETER["false_easting",1640416.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2242"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.9999473679999999 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2243 : NAD83 / Idaho West (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2243,'EPSG',2243,'PROJCS["NAD83 / Idaho West (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",41.66666666666666],PARAMETER["central_meridian",-115.75],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",2624666.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2243"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0.999933333 +x_0=800000.0001016001 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2243,'EPSG',2243,'PROJCS["NAD83 / Idaho West (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-115.75],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",2624666.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2243"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0.999933333 +x_0=800000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2244 : NAD83 / Indiana East (ftUS) (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2244,'EPSG',2244,'PROJCS["NAD83 / Indiana East (ftUS) (deprecated)",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",37.5],PARAMETER["central_meridian",-85.66666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",328083.333],PARAMETER["false_northing",818125],AUTHORITY["EPSG","2244"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999966667 +x_0=99999.99989839978 +y_0=249364.9987299975 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2244,'EPSG',2244,'PROJCS["NAD83 / Indiana East (ftUS) (deprecated)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-85.66666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",328083.333],PARAMETER["false_northing",818125],AUTHORITY["EPSG","2244"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999966667 +x_0=99999.99989839978 +y_0=249364.9987299975 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2245 : NAD83 / Indiana West (ftUS) (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2245,'EPSG',2245,'PROJCS["NAD83 / Indiana West (ftUS) (deprecated)",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",37.5],PARAMETER["central_meridian",-87.08333333333333],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",2952750],PARAMETER["false_northing",818125],AUTHORITY["EPSG","2245"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999966667 +x_0=900000 +y_0=249364.9987299975 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2245,'EPSG',2245,'PROJCS["NAD83 / Indiana West (ftUS) (deprecated)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-87.08333333333333],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",2952750],PARAMETER["false_northing",818125],AUTHORITY["EPSG","2245"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999966667 +x_0=900000 +y_0=249364.9987299975 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2246 : NAD83 / Kentucky North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2246,'EPSG',2246,'PROJCS["NAD83 / Kentucky North (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.96666666666667],PARAMETER["standard_parallel_2",38.96666666666667],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-84.25],PARAMETER["false_easting",1640416.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2246"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.96666666666667 +lat_2=38.96666666666667 +lat_0=37.5 +lon_0=-84.25 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2246,'EPSG',2246,'PROJCS["NAD83 / Kentucky North (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.96666666666667],PARAMETER["standard_parallel_2",38.96666666666667],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-84.25],PARAMETER["false_easting",1640416.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2246"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.96666666666667 +lat_2=38.96666666666667 +lat_0=37.5 +lon_0=-84.25 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2247 : NAD83 / Kentucky South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2247,'EPSG',2247,'PROJCS["NAD83 / Kentucky South (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.93333333333333],PARAMETER["standard_parallel_2",36.73333333333333],PARAMETER["latitude_of_origin",36.33333333333334],PARAMETER["central_meridian",-85.75],PARAMETER["false_easting",1640416.667],PARAMETER["false_northing",1640416.667],AUTHORITY["EPSG","2247"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.93333333333333 +lat_2=36.73333333333333 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=500000.0001016001 +y_0=500000.0001016001 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2247,'EPSG',2247,'PROJCS["NAD83 / Kentucky South (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.93333333333333],PARAMETER["standard_parallel_2",36.73333333333333],PARAMETER["latitude_of_origin",36.33333333333334],PARAMETER["central_meridian",-85.75],PARAMETER["false_easting",1640416.667],PARAMETER["false_northing",1640416.667],AUTHORITY["EPSG","2247"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.93333333333333 +lat_2=36.73333333333333 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=500000.0001016001 +y_0=500000.0001016001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2248 : NAD83 / Maryland (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2248,'EPSG',2248,'PROJCS["NAD83 / Maryland (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.45],PARAMETER["standard_parallel_2",38.3],PARAMETER["latitude_of_origin",37.66666666666666],PARAMETER["central_meridian",-77],PARAMETER["false_easting",1312333.333],PARAMETER["false_northing",0],AUTHORITY["EPSG","2248"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.45 +lat_2=38.3 +lat_0=37.66666666666666 +lon_0=-77 +x_0=399999.9998983998 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2248,'EPSG',2248,'PROJCS["NAD83 / Maryland (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.45],PARAMETER["standard_parallel_2",38.3],PARAMETER["latitude_of_origin",37.66666666666666],PARAMETER["central_meridian",-77],PARAMETER["false_easting",1312333.333],PARAMETER["false_northing",0],AUTHORITY["EPSG","2248"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.45 +lat_2=38.3 +lat_0=37.66666666666666 +lon_0=-77 +x_0=399999.9998983998 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2249 : NAD83 / Massachusetts Mainland (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2249,'EPSG',2249,'PROJCS["NAD83 / Massachusetts Mainland (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",42.68333333333333],PARAMETER["standard_parallel_2",41.71666666666667],PARAMETER["latitude_of_origin",41],PARAMETER["central_meridian",-71.5],PARAMETER["false_easting",656166.667],PARAMETER["false_northing",2460625],AUTHORITY["EPSG","2249"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=42.68333333333333 +lat_2=41.71666666666667 +lat_0=41 +lon_0=-71.5 +x_0=200000.0001016002 +y_0=750000 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2249,'EPSG',2249,'PROJCS["NAD83 / Massachusetts Mainland (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",42.68333333333333],PARAMETER["standard_parallel_2",41.71666666666667],PARAMETER["latitude_of_origin",41],PARAMETER["central_meridian",-71.5],PARAMETER["false_easting",656166.667],PARAMETER["false_northing",2460625],AUTHORITY["EPSG","2249"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=42.68333333333333 +lat_2=41.71666666666667 +lat_0=41 +lon_0=-71.5 +x_0=200000.0001016002 +y_0=750000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2250 : NAD83 / Massachusetts Island (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2250,'EPSG',2250,'PROJCS["NAD83 / Massachusetts Island (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.48333333333333],PARAMETER["standard_parallel_2",41.28333333333333],PARAMETER["latitude_of_origin",41],PARAMETER["central_meridian",-70.5],PARAMETER["false_easting",1640416.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2250"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.48333333333333 +lat_2=41.28333333333333 +lat_0=41 +lon_0=-70.5 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2250,'EPSG',2250,'PROJCS["NAD83 / Massachusetts Island (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.48333333333333],PARAMETER["standard_parallel_2",41.28333333333333],PARAMETER["latitude_of_origin",41],PARAMETER["central_meridian",-70.5],PARAMETER["false_easting",1640416.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2250"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.48333333333333 +lat_2=41.28333333333333 +lat_0=41 +lon_0=-70.5 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2251 : NAD83 / Michigan North (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2251,'EPSG',2251,'PROJCS["NAD83 / Michigan North (ft)",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["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.08333333333334],PARAMETER["standard_parallel_2",45.48333333333333],PARAMETER["latitude_of_origin",44.78333333333333],PARAMETER["central_meridian",-87],PARAMETER["false_easting",26246719.16],PARAMETER["false_northing",0],AUTHORITY["EPSG","2251"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.08333333333334 +lat_2=45.48333333333333 +lat_0=44.78333333333333 +lon_0=-87 +x_0=7999999.999968001 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2251,'EPSG',2251,'PROJCS["NAD83 / Michigan North (ft)",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"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.08333333333334],PARAMETER["standard_parallel_2",45.48333333333333],PARAMETER["latitude_of_origin",44.78333333333333],PARAMETER["central_meridian",-87],PARAMETER["false_easting",26246719.16],PARAMETER["false_northing",0],AUTHORITY["EPSG","2251"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.08333333333334 +lat_2=45.48333333333333 +lat_0=44.78333333333333 +lon_0=-87 +x_0=7999999.999968001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 2252 : NAD83 / Michigan Central (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2252,'EPSG',2252,'PROJCS["NAD83 / Michigan Central (ft)",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["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.7],PARAMETER["standard_parallel_2",44.18333333333333],PARAMETER["latitude_of_origin",43.31666666666667],PARAMETER["central_meridian",-84.36666666666666],PARAMETER["false_easting",19685039.37],PARAMETER["false_northing",0],AUTHORITY["EPSG","2252"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.7 +lat_2=44.18333333333333 +lat_0=43.31666666666667 +lon_0=-84.36666666666666 +x_0=5999999.999976001 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2252,'EPSG',2252,'PROJCS["NAD83 / Michigan Central (ft)",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"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.7],PARAMETER["standard_parallel_2",44.18333333333333],PARAMETER["latitude_of_origin",43.31666666666667],PARAMETER["central_meridian",-84.36666666666666],PARAMETER["false_easting",19685039.37],PARAMETER["false_northing",0],AUTHORITY["EPSG","2252"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.7 +lat_2=44.18333333333333 +lat_0=43.31666666666667 +lon_0=-84.36666666666666 +x_0=5999999.999976001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 2253 : NAD83 / Michigan South (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2253,'EPSG',2253,'PROJCS["NAD83 / Michigan South (ft)",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["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43.66666666666666],PARAMETER["standard_parallel_2",42.1],PARAMETER["latitude_of_origin",41.5],PARAMETER["central_meridian",-84.36666666666666],PARAMETER["false_easting",13123359.58],PARAMETER["false_northing",0],AUTHORITY["EPSG","2253"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43.66666666666666 +lat_2=42.1 +lat_0=41.5 +lon_0=-84.36666666666666 +x_0=3999999.999984 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2253,'EPSG',2253,'PROJCS["NAD83 / Michigan South (ft)",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"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43.66666666666666],PARAMETER["standard_parallel_2",42.1],PARAMETER["latitude_of_origin",41.5],PARAMETER["central_meridian",-84.36666666666666],PARAMETER["false_easting",13123359.58],PARAMETER["false_northing",0],AUTHORITY["EPSG","2253"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43.66666666666666 +lat_2=42.1 +lat_0=41.5 +lon_0=-84.36666666666666 +x_0=3999999.999984 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 2254 : NAD83 / Mississippi East (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2254,'EPSG',2254,'PROJCS["NAD83 / Mississippi 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",29.5],PARAMETER["central_meridian",-88.83333333333333],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",984250.0000000002],PARAMETER["false_northing",0],AUTHORITY["EPSG","2254"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=29.5 +lon_0=-88.83333333333333 +k=0.99995 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2254,'EPSG',2254,'PROJCS["NAD83 / Mississippi East (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",29.5],PARAMETER["central_meridian",-88.83333333333333],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",984250.0000000002],PARAMETER["false_northing",0],AUTHORITY["EPSG","2254"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=29.5 +lon_0=-88.83333333333333 +k=0.99995 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2255 : NAD83 / Mississippi West (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2255,'EPSG',2255,'PROJCS["NAD83 / Mississippi West (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",29.5],PARAMETER["central_meridian",-90.33333333333333],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",2296583.333],PARAMETER["false_northing",0],AUTHORITY["EPSG","2255"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=29.5 +lon_0=-90.33333333333333 +k=0.99995 +x_0=699999.9998983998 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2255,'EPSG',2255,'PROJCS["NAD83 / Mississippi West (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",29.5],PARAMETER["central_meridian",-90.33333333333333],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",2296583.333],PARAMETER["false_northing",0],AUTHORITY["EPSG","2255"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=29.5 +lon_0=-90.33333333333333 +k=0.99995 +x_0=699999.9998983998 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2256 : NAD83 / Montana (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2256,'EPSG',2256,'PROJCS["NAD83 / Montana (ft)",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["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",49],PARAMETER["standard_parallel_2",45],PARAMETER["latitude_of_origin",44.25],PARAMETER["central_meridian",-109.5],PARAMETER["false_easting",1968503.937],PARAMETER["false_northing",0],AUTHORITY["EPSG","2256"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=49 +lat_2=45 +lat_0=44.25 +lon_0=-109.5 +x_0=599999.9999976 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2256,'EPSG',2256,'PROJCS["NAD83 / Montana (ft)",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"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",49],PARAMETER["standard_parallel_2",45],PARAMETER["latitude_of_origin",44.25],PARAMETER["central_meridian",-109.5],PARAMETER["false_easting",1968503.937],PARAMETER["false_northing",0],AUTHORITY["EPSG","2256"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=49 +lat_2=45 +lat_0=44.25 +lon_0=-109.5 +x_0=599999.9999976 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 2257 : NAD83 / New Mexico East (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2257,'EPSG',2257,'PROJCS["NAD83 / New Mexico 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",31],PARAMETER["central_meridian",-104.3333333333333],PARAMETER["scale_factor",0.999909091],PARAMETER["false_easting",541337.5],PARAMETER["false_northing",0],AUTHORITY["EPSG","2257"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.999909091 +x_0=165000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2257,'EPSG',2257,'PROJCS["NAD83 / New Mexico East (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-104.3333333333333],PARAMETER["scale_factor",0.999909091],PARAMETER["false_easting",541337.5],PARAMETER["false_northing",0],AUTHORITY["EPSG","2257"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.999909091 +x_0=165000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2258 : NAD83 / New Mexico Central (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2258,'EPSG',2258,'PROJCS["NAD83 / New Mexico Central (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",31],PARAMETER["central_meridian",-106.25],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",1640416.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2258"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.9999 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2258,'EPSG',2258,'PROJCS["NAD83 / New Mexico Central (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-106.25],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",1640416.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2258"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.9999 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2259 : NAD83 / New Mexico West (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2259,'EPSG',2259,'PROJCS["NAD83 / New Mexico West (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",31],PARAMETER["central_meridian",-107.8333333333333],PARAMETER["scale_factor",0.999916667],PARAMETER["false_easting",2723091.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2259"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.999916667 +x_0=830000.0001016001 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2259,'EPSG',2259,'PROJCS["NAD83 / New Mexico West (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-107.8333333333333],PARAMETER["scale_factor",0.999916667],PARAMETER["false_easting",2723091.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2259"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.999916667 +x_0=830000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +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 '); +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"]],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"]],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 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2261 : NAD83 / New York Central (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2261,'EPSG',2261,'PROJCS["NAD83 / New York Central (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",40],PARAMETER["central_meridian",-76.58333333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",820208.3330000002],PARAMETER["false_northing",0],AUTHORITY["EPSG","2261"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.9999375 +x_0=249999.9998983998 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2261,'EPSG',2261,'PROJCS["NAD83 / New York Central (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-76.58333333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",820208.3330000002],PARAMETER["false_northing",0],AUTHORITY["EPSG","2261"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.9999375 +x_0=249999.9998983998 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2262 : NAD83 / New York West (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2262,'EPSG',2262,'PROJCS["NAD83 / New York West (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",40],PARAMETER["central_meridian",-78.58333333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",1148291.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2262"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.9999375 +x_0=350000.0001016001 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2262,'EPSG',2262,'PROJCS["NAD83 / New York West (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-78.58333333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",1148291.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2262"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.9999375 +x_0=350000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2263 : NAD83 / New York Long Island (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2263,'EPSG',2263,'PROJCS["NAD83 / New York Long Island (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.03333333333333],PARAMETER["standard_parallel_2",40.66666666666666],PARAMETER["latitude_of_origin",40.16666666666666],PARAMETER["central_meridian",-74],PARAMETER["false_easting",984250.0000000002],PARAMETER["false_northing",0],AUTHORITY["EPSG","2263"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.03333333333333 +lat_2=40.66666666666666 +lat_0=40.16666666666666 +lon_0=-74 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2263,'EPSG',2263,'PROJCS["NAD83 / New York Long Island (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.03333333333333],PARAMETER["standard_parallel_2",40.66666666666666],PARAMETER["latitude_of_origin",40.16666666666666],PARAMETER["central_meridian",-74],PARAMETER["false_easting",984250.0000000002],PARAMETER["false_northing",0],AUTHORITY["EPSG","2263"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.03333333333333 +lat_2=40.66666666666666 +lat_0=40.16666666666666 +lon_0=-74 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2264 : NAD83 / North Carolina (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2264,'EPSG',2264,'PROJCS["NAD83 / North Carolina (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.16666666666666],PARAMETER["standard_parallel_2",34.33333333333334],PARAMETER["latitude_of_origin",33.75],PARAMETER["central_meridian",-79],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2264"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.2192024384 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2264,'EPSG',2264,'PROJCS["NAD83 / North Carolina (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.16666666666666],PARAMETER["standard_parallel_2",34.33333333333334],PARAMETER["latitude_of_origin",33.75],PARAMETER["central_meridian",-79],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2264"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.2192024384 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2265 : NAD83 / North Dakota North (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2265,'EPSG',2265,'PROJCS["NAD83 / North Dakota North (ft)",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["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.73333333333333],PARAMETER["standard_parallel_2",47.43333333333333],PARAMETER["latitude_of_origin",47],PARAMETER["central_meridian",-100.5],PARAMETER["false_easting",1968503.937],PARAMETER["false_northing",0],AUTHORITY["EPSG","2265"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.73333333333333 +lat_2=47.43333333333333 +lat_0=47 +lon_0=-100.5 +x_0=599999.9999976 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2265,'EPSG',2265,'PROJCS["NAD83 / North Dakota North (ft)",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"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.73333333333333],PARAMETER["standard_parallel_2",47.43333333333333],PARAMETER["latitude_of_origin",47],PARAMETER["central_meridian",-100.5],PARAMETER["false_easting",1968503.937],PARAMETER["false_northing",0],AUTHORITY["EPSG","2265"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.73333333333333 +lat_2=47.43333333333333 +lat_0=47 +lon_0=-100.5 +x_0=599999.9999976 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 2266 : NAD83 / North Dakota South (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2266,'EPSG',2266,'PROJCS["NAD83 / North Dakota South (ft)",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["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.48333333333333],PARAMETER["standard_parallel_2",46.18333333333333],PARAMETER["latitude_of_origin",45.66666666666666],PARAMETER["central_meridian",-100.5],PARAMETER["false_easting",1968503.937],PARAMETER["false_northing",0],AUTHORITY["EPSG","2266"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.48333333333333 +lat_2=46.18333333333333 +lat_0=45.66666666666666 +lon_0=-100.5 +x_0=599999.9999976 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2266,'EPSG',2266,'PROJCS["NAD83 / North Dakota South (ft)",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"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.48333333333333],PARAMETER["standard_parallel_2",46.18333333333333],PARAMETER["latitude_of_origin",45.66666666666666],PARAMETER["central_meridian",-100.5],PARAMETER["false_easting",1968503.937],PARAMETER["false_northing",0],AUTHORITY["EPSG","2266"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.48333333333333 +lat_2=46.18333333333333 +lat_0=45.66666666666666 +lon_0=-100.5 +x_0=599999.9999976 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 2267 : NAD83 / Oklahoma North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2267,'EPSG',2267,'PROJCS["NAD83 / Oklahoma North (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.76666666666667],PARAMETER["standard_parallel_2",35.56666666666667],PARAMETER["latitude_of_origin",35],PARAMETER["central_meridian",-98],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","2267"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.76666666666667 +lat_2=35.56666666666667 +lat_0=35 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2267,'EPSG',2267,'PROJCS["NAD83 / Oklahoma North (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.76666666666667],PARAMETER["standard_parallel_2",35.56666666666667],PARAMETER["latitude_of_origin",35],PARAMETER["central_meridian",-98],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","2267"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.76666666666667 +lat_2=35.56666666666667 +lat_0=35 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2268 : NAD83 / Oklahoma South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2268,'EPSG',2268,'PROJCS["NAD83 / Oklahoma South (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",35.23333333333333],PARAMETER["standard_parallel_2",33.93333333333333],PARAMETER["latitude_of_origin",33.33333333333334],PARAMETER["central_meridian",-98],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","2268"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=35.23333333333333 +lat_2=33.93333333333333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2268,'EPSG',2268,'PROJCS["NAD83 / Oklahoma South (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",35.23333333333333],PARAMETER["standard_parallel_2",33.93333333333333],PARAMETER["latitude_of_origin",33.33333333333334],PARAMETER["central_meridian",-98],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","2268"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=35.23333333333333 +lat_2=33.93333333333333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2269 : NAD83 / Oregon North (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2269,'EPSG',2269,'PROJCS["NAD83 / Oregon North (ft)",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["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",46],PARAMETER["standard_parallel_2",44.33333333333334],PARAMETER["latitude_of_origin",43.66666666666666],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",8202099.738],PARAMETER["false_northing",0],AUTHORITY["EPSG","2269"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=46 +lat_2=44.33333333333334 +lat_0=43.66666666666666 +lon_0=-120.5 +x_0=2500000.0001424 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2269,'EPSG',2269,'PROJCS["NAD83 / Oregon North (ft)",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"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",46],PARAMETER["standard_parallel_2",44.33333333333334],PARAMETER["latitude_of_origin",43.66666666666666],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",8202099.738],PARAMETER["false_northing",0],AUTHORITY["EPSG","2269"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=46 +lat_2=44.33333333333334 +lat_0=43.66666666666666 +lon_0=-120.5 +x_0=2500000.0001424 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 2270 : NAD83 / Oregon South (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2270,'EPSG',2270,'PROJCS["NAD83 / Oregon South (ft)",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["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44],PARAMETER["standard_parallel_2",42.33333333333334],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",4921259.843],PARAMETER["false_northing",0],AUTHORITY["EPSG","2270"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44 +lat_2=42.33333333333334 +lat_0=41.66666666666666 +lon_0=-120.5 +x_0=1500000.0001464 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2270,'EPSG',2270,'PROJCS["NAD83 / Oregon South (ft)",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"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44],PARAMETER["standard_parallel_2",42.33333333333334],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",4921259.843],PARAMETER["false_northing",0],AUTHORITY["EPSG","2270"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44 +lat_2=42.33333333333334 +lat_0=41.66666666666666 +lon_0=-120.5 +x_0=1500000.0001464 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 2271 : NAD83 / Pennsylvania North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2271,'EPSG',2271,'PROJCS["NAD83 / Pennsylvania North (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.95],PARAMETER["standard_parallel_2",40.88333333333333],PARAMETER["latitude_of_origin",40.16666666666666],PARAMETER["central_meridian",-77.75],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","2271"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.95 +lat_2=40.88333333333333 +lat_0=40.16666666666666 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2271,'EPSG',2271,'PROJCS["NAD83 / Pennsylvania North (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.95],PARAMETER["standard_parallel_2",40.88333333333333],PARAMETER["latitude_of_origin",40.16666666666666],PARAMETER["central_meridian",-77.75],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","2271"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.95 +lat_2=40.88333333333333 +lat_0=40.16666666666666 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2272 : NAD83 / Pennsylvania South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2272,'EPSG',2272,'PROJCS["NAD83 / Pennsylvania South (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.96666666666667],PARAMETER["standard_parallel_2",39.93333333333333],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-77.75],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","2272"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.96666666666667 +lat_2=39.93333333333333 +lat_0=39.33333333333334 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2272,'EPSG',2272,'PROJCS["NAD83 / Pennsylvania South (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.96666666666667],PARAMETER["standard_parallel_2",39.93333333333333],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-77.75],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","2272"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.96666666666667 +lat_2=39.93333333333333 +lat_0=39.33333333333334 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2273 : NAD83 / South Carolina (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2273,'EPSG',2273,'PROJCS["NAD83 / South Carolina (ft)",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["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",34.83333333333334],PARAMETER["standard_parallel_2",32.5],PARAMETER["latitude_of_origin",31.83333333333333],PARAMETER["central_meridian",-81],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2273"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=34.83333333333334 +lat_2=32.5 +lat_0=31.83333333333333 +lon_0=-81 +x_0=609600 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2273,'EPSG',2273,'PROJCS["NAD83 / South Carolina (ft)",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"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",34.83333333333334],PARAMETER["standard_parallel_2",32.5],PARAMETER["latitude_of_origin",31.83333333333333],PARAMETER["central_meridian",-81],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2273"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=34.83333333333334 +lat_2=32.5 +lat_0=31.83333333333333 +lon_0=-81 +x_0=609600 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 2274 : NAD83 / Tennessee (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2274,'EPSG',2274,'PROJCS["NAD83 / Tennessee (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.41666666666666],PARAMETER["standard_parallel_2",35.25],PARAMETER["latitude_of_origin",34.33333333333334],PARAMETER["central_meridian",-86],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","2274"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.41666666666666 +lat_2=35.25 +lat_0=34.33333333333334 +lon_0=-86 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2274,'EPSG',2274,'PROJCS["NAD83 / Tennessee (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.41666666666666],PARAMETER["standard_parallel_2",35.25],PARAMETER["latitude_of_origin",34.33333333333334],PARAMETER["central_meridian",-86],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","2274"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.41666666666666 +lat_2=35.25 +lat_0=34.33333333333334 +lon_0=-86 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2275 : NAD83 / Texas North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2275,'EPSG',2275,'PROJCS["NAD83 / Texas North (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.18333333333333],PARAMETER["standard_parallel_2",34.65],PARAMETER["latitude_of_origin",34],PARAMETER["central_meridian",-101.5],PARAMETER["false_easting",656166.667],PARAMETER["false_northing",3280833.333],AUTHORITY["EPSG","2275"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.18333333333333 +lat_2=34.65 +lat_0=34 +lon_0=-101.5 +x_0=200000.0001016002 +y_0=999999.9998983998 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2275,'EPSG',2275,'PROJCS["NAD83 / Texas North (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.18333333333333],PARAMETER["standard_parallel_2",34.65],PARAMETER["latitude_of_origin",34],PARAMETER["central_meridian",-101.5],PARAMETER["false_easting",656166.667],PARAMETER["false_northing",3280833.333],AUTHORITY["EPSG","2275"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.18333333333333 +lat_2=34.65 +lat_0=34 +lon_0=-101.5 +x_0=200000.0001016002 +y_0=999999.9998983998 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2276 : NAD83 / Texas North Central (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2276,'EPSG',2276,'PROJCS["NAD83 / Texas North Central (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",33.96666666666667],PARAMETER["standard_parallel_2",32.13333333333333],PARAMETER["latitude_of_origin",31.66666666666667],PARAMETER["central_meridian",-98.5],PARAMETER["false_easting",1968500],PARAMETER["false_northing",6561666.667],AUTHORITY["EPSG","2276"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=33.96666666666667 +lat_2=32.13333333333333 +lat_0=31.66666666666667 +lon_0=-98.5 +x_0=600000 +y_0=2000000.0001016 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2276,'EPSG',2276,'PROJCS["NAD83 / Texas North Central (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",33.96666666666667],PARAMETER["standard_parallel_2",32.13333333333333],PARAMETER["latitude_of_origin",31.66666666666667],PARAMETER["central_meridian",-98.5],PARAMETER["false_easting",1968500],PARAMETER["false_northing",6561666.667],AUTHORITY["EPSG","2276"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=33.96666666666667 +lat_2=32.13333333333333 +lat_0=31.66666666666667 +lon_0=-98.5 +x_0=600000 +y_0=2000000.0001016 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2277 : NAD83 / Texas Central (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2277,'EPSG',2277,'PROJCS["NAD83 / Texas Central (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",31.88333333333333],PARAMETER["standard_parallel_2",30.11666666666667],PARAMETER["latitude_of_origin",29.66666666666667],PARAMETER["central_meridian",-100.3333333333333],PARAMETER["false_easting",2296583.333],PARAMETER["false_northing",9842500.000000002],AUTHORITY["EPSG","2277"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=31.88333333333333 +lat_2=30.11666666666667 +lat_0=29.66666666666667 +lon_0=-100.3333333333333 +x_0=699999.9998983998 +y_0=3000000 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2277,'EPSG',2277,'PROJCS["NAD83 / Texas Central (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",31.88333333333333],PARAMETER["standard_parallel_2",30.11666666666667],PARAMETER["latitude_of_origin",29.66666666666667],PARAMETER["central_meridian",-100.3333333333333],PARAMETER["false_easting",2296583.333],PARAMETER["false_northing",9842500.000000002],AUTHORITY["EPSG","2277"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=31.88333333333333 +lat_2=30.11666666666667 +lat_0=29.66666666666667 +lon_0=-100.3333333333333 +x_0=699999.9998983998 +y_0=3000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2278 : NAD83 / Texas South Central (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2278,'EPSG',2278,'PROJCS["NAD83 / Texas South Central (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",30.28333333333333],PARAMETER["standard_parallel_2",28.38333333333333],PARAMETER["latitude_of_origin",27.83333333333333],PARAMETER["central_meridian",-99],PARAMETER["false_easting",1968500],PARAMETER["false_northing",13123333.333],AUTHORITY["EPSG","2278"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=30.28333333333333 +lat_2=28.38333333333333 +lat_0=27.83333333333333 +lon_0=-99 +x_0=600000 +y_0=3999999.9998984 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2278,'EPSG',2278,'PROJCS["NAD83 / Texas South Central (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",30.28333333333333],PARAMETER["standard_parallel_2",28.38333333333333],PARAMETER["latitude_of_origin",27.83333333333333],PARAMETER["central_meridian",-99],PARAMETER["false_easting",1968500],PARAMETER["false_northing",13123333.333],AUTHORITY["EPSG","2278"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=30.28333333333333 +lat_2=28.38333333333333 +lat_0=27.83333333333333 +lon_0=-99 +x_0=600000 +y_0=3999999.9998984 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2279 : NAD83 / Texas South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2279,'EPSG',2279,'PROJCS["NAD83 / Texas South (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",27.83333333333333],PARAMETER["standard_parallel_2",26.16666666666667],PARAMETER["latitude_of_origin",25.66666666666667],PARAMETER["central_meridian",-98.5],PARAMETER["false_easting",984250.0000000002],PARAMETER["false_northing",16404166.667],AUTHORITY["EPSG","2279"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=27.83333333333333 +lat_2=26.16666666666667 +lat_0=25.66666666666667 +lon_0=-98.5 +x_0=300000.0000000001 +y_0=5000000.0001016 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2279,'EPSG',2279,'PROJCS["NAD83 / Texas South (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",27.83333333333333],PARAMETER["standard_parallel_2",26.16666666666667],PARAMETER["latitude_of_origin",25.66666666666667],PARAMETER["central_meridian",-98.5],PARAMETER["false_easting",984250.0000000002],PARAMETER["false_northing",16404166.667],AUTHORITY["EPSG","2279"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=27.83333333333333 +lat_2=26.16666666666667 +lat_0=25.66666666666667 +lon_0=-98.5 +x_0=300000.0000000001 +y_0=5000000.0001016 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2280 : NAD83 / Utah North (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2280,'EPSG',2280,'PROJCS["NAD83 / Utah North (ft)",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["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.78333333333333],PARAMETER["standard_parallel_2",40.71666666666667],PARAMETER["latitude_of_origin",40.33333333333334],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",1640419.948],PARAMETER["false_northing",3280839.895],AUTHORITY["EPSG","2280"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.78333333333333 +lat_2=40.71666666666667 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000.0001504 +y_0=999999.9999960001 +ellps=GRS80 +datum=NAD83 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2280,'EPSG',2280,'PROJCS["NAD83 / Utah North (ft)",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"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.78333333333333],PARAMETER["standard_parallel_2",40.71666666666667],PARAMETER["latitude_of_origin",40.33333333333334],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",1640419.948],PARAMETER["false_northing",3280839.895],AUTHORITY["EPSG","2280"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.78333333333333 +lat_2=40.71666666666667 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000.0001504 +y_0=999999.9999960001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 2281 : NAD83 / Utah Central (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2281,'EPSG',2281,'PROJCS["NAD83 / Utah Central (ft)",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["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.65],PARAMETER["standard_parallel_2",39.01666666666667],PARAMETER["latitude_of_origin",38.33333333333334],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",1640419.948],PARAMETER["false_northing",6561679.79],AUTHORITY["EPSG","2281"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.65 +lat_2=39.01666666666667 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=500000.0001504 +y_0=1999999.999992 +ellps=GRS80 +datum=NAD83 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2281,'EPSG',2281,'PROJCS["NAD83 / Utah Central (ft)",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"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.65],PARAMETER["standard_parallel_2",39.01666666666667],PARAMETER["latitude_of_origin",38.33333333333334],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",1640419.948],PARAMETER["false_northing",6561679.79],AUTHORITY["EPSG","2281"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.65 +lat_2=39.01666666666667 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=500000.0001504 +y_0=1999999.999992 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 2282 : NAD83 / Utah South (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2282,'EPSG',2282,'PROJCS["NAD83 / Utah South (ft)",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["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.35],PARAMETER["standard_parallel_2",37.21666666666667],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",1640419.948],PARAMETER["false_northing",9842519.685],AUTHORITY["EPSG","2282"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.35 +lat_2=37.21666666666667 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=500000.0001504 +y_0=2999999.999988 +ellps=GRS80 +datum=NAD83 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2282,'EPSG',2282,'PROJCS["NAD83 / Utah South (ft)",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"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.35],PARAMETER["standard_parallel_2",37.21666666666667],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",1640419.948],PARAMETER["false_northing",9842519.685],AUTHORITY["EPSG","2282"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.35 +lat_2=37.21666666666667 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=500000.0001504 +y_0=2999999.999988 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 2283 : NAD83 / Virginia North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2283,'EPSG',2283,'PROJCS["NAD83 / Virginia North (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.2],PARAMETER["standard_parallel_2",38.03333333333333],PARAMETER["latitude_of_origin",37.66666666666666],PARAMETER["central_meridian",-78.5],PARAMETER["false_easting",11482916.667],PARAMETER["false_northing",6561666.667],AUTHORITY["EPSG","2283"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.2 +lat_2=38.03333333333333 +lat_0=37.66666666666666 +lon_0=-78.5 +x_0=3500000.0001016 +y_0=2000000.0001016 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2283,'EPSG',2283,'PROJCS["NAD83 / Virginia North (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.2],PARAMETER["standard_parallel_2",38.03333333333333],PARAMETER["latitude_of_origin",37.66666666666666],PARAMETER["central_meridian",-78.5],PARAMETER["false_easting",11482916.667],PARAMETER["false_northing",6561666.667],AUTHORITY["EPSG","2283"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.2 +lat_2=38.03333333333333 +lat_0=37.66666666666666 +lon_0=-78.5 +x_0=3500000.0001016 +y_0=2000000.0001016 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2284 : NAD83 / Virginia South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2284,'EPSG',2284,'PROJCS["NAD83 / Virginia South (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.96666666666667],PARAMETER["standard_parallel_2",36.76666666666667],PARAMETER["latitude_of_origin",36.33333333333334],PARAMETER["central_meridian",-78.5],PARAMETER["false_easting",11482916.667],PARAMETER["false_northing",3280833.333],AUTHORITY["EPSG","2284"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.96666666666667 +lat_2=36.76666666666667 +lat_0=36.33333333333334 +lon_0=-78.5 +x_0=3500000.0001016 +y_0=999999.9998983998 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2284,'EPSG',2284,'PROJCS["NAD83 / Virginia South (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.96666666666667],PARAMETER["standard_parallel_2",36.76666666666667],PARAMETER["latitude_of_origin",36.33333333333334],PARAMETER["central_meridian",-78.5],PARAMETER["false_easting",11482916.667],PARAMETER["false_northing",3280833.333],AUTHORITY["EPSG","2284"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.96666666666667 +lat_2=36.76666666666667 +lat_0=36.33333333333334 +lon_0=-78.5 +x_0=3500000.0001016 +y_0=999999.9998983998 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2285 : NAD83 / Washington North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2285,'EPSG',2285,'PROJCS["NAD83 / Washington North (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.73333333333333],PARAMETER["standard_parallel_2",47.5],PARAMETER["latitude_of_origin",47],PARAMETER["central_meridian",-120.8333333333333],PARAMETER["false_easting",1640416.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2285"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.73333333333333 +lat_2=47.5 +lat_0=47 +lon_0=-120.8333333333333 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2285,'EPSG',2285,'PROJCS["NAD83 / Washington North (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.73333333333333],PARAMETER["standard_parallel_2",47.5],PARAMETER["latitude_of_origin",47],PARAMETER["central_meridian",-120.8333333333333],PARAMETER["false_easting",1640416.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2285"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.73333333333333 +lat_2=47.5 +lat_0=47 +lon_0=-120.8333333333333 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2286 : NAD83 / Washington South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2286,'EPSG',2286,'PROJCS["NAD83 / Washington South (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.33333333333334],PARAMETER["standard_parallel_2",45.83333333333334],PARAMETER["latitude_of_origin",45.33333333333334],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",1640416.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2286"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.33333333333334 +lat_2=45.83333333333334 +lat_0=45.33333333333334 +lon_0=-120.5 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2286,'EPSG',2286,'PROJCS["NAD83 / Washington South (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.33333333333334],PARAMETER["standard_parallel_2",45.83333333333334],PARAMETER["latitude_of_origin",45.33333333333334],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",1640416.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2286"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.33333333333334 +lat_2=45.83333333333334 +lat_0=45.33333333333334 +lon_0=-120.5 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2287 : NAD83 / Wisconsin North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2287,'EPSG',2287,'PROJCS["NAD83 / Wisconsin North (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",46.76666666666667],PARAMETER["standard_parallel_2",45.56666666666667],PARAMETER["latitude_of_origin",45.16666666666666],PARAMETER["central_meridian",-90],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","2287"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=46.76666666666667 +lat_2=45.56666666666667 +lat_0=45.16666666666666 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2287,'EPSG',2287,'PROJCS["NAD83 / Wisconsin North (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",46.76666666666667],PARAMETER["standard_parallel_2",45.56666666666667],PARAMETER["latitude_of_origin",45.16666666666666],PARAMETER["central_meridian",-90],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","2287"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=46.76666666666667 +lat_2=45.56666666666667 +lat_0=45.16666666666666 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2288 : NAD83 / Wisconsin Central (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2288,'EPSG',2288,'PROJCS["NAD83 / Wisconsin Central (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.5],PARAMETER["standard_parallel_2",44.25],PARAMETER["latitude_of_origin",43.83333333333334],PARAMETER["central_meridian",-90],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","2288"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.5 +lat_2=44.25 +lat_0=43.83333333333334 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2288,'EPSG',2288,'PROJCS["NAD83 / Wisconsin Central (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.5],PARAMETER["standard_parallel_2",44.25],PARAMETER["latitude_of_origin",43.83333333333334],PARAMETER["central_meridian",-90],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","2288"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.5 +lat_2=44.25 +lat_0=43.83333333333334 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2289 : NAD83 / Wisconsin South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2289,'EPSG',2289,'PROJCS["NAD83 / Wisconsin South (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44.06666666666667],PARAMETER["standard_parallel_2",42.73333333333333],PARAMETER["latitude_of_origin",42],PARAMETER["central_meridian",-90],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","2289"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44.06666666666667 +lat_2=42.73333333333333 +lat_0=42 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2289,'EPSG',2289,'PROJCS["NAD83 / Wisconsin South (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44.06666666666667],PARAMETER["standard_parallel_2",42.73333333333333],PARAMETER["latitude_of_origin",42],PARAMETER["central_meridian",-90],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","2289"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44.06666666666667 +lat_2=42.73333333333333 +lat_0=42 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2290 : ATS77 / Prince Edward Isl. Stereographic (ATS77) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2290,'EPSG',2290,'PROJCS["ATS77 / Prince Edward Isl. Stereographic (ATS77)",GEOGCS["ATS77",DATUM["Average_Terrestrial_System_1977",SPHEROID["Average Terrestrial System 1977",6378135,298.257,AUTHORITY["EPSG","7041"]],AUTHORITY["EPSG","6122"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4122"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",47.25],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.999912],PARAMETER["false_easting",700000],PARAMETER["false_northing",400000],AUTHORITY["EPSG","2290"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=sterea +lat_0=47.25 +lon_0=-63 +k=0.999912 +x_0=700000 +y_0=400000 +a=6378135 +b=6356750.304921594 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2290,'EPSG',2290,'PROJCS["ATS77 / Prince Edward Isl. Stereographic (ATS77)",GEOGCS["ATS77",DATUM["Average_Terrestrial_System_1977",SPHEROID["Average Terrestrial System 1977",6378135,298.257,AUTHORITY["EPSG","7041"]],AUTHORITY["EPSG","6122"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4122"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",47.25],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.999912],PARAMETER["false_easting",700000],PARAMETER["false_northing",400000],AUTHORITY["EPSG","2290"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=sterea +lat_0=47.25 +lon_0=-63 +k=0.999912 +x_0=700000 +y_0=400000 +a=6378135 +b=6356750.304921594 +units=m +no_defs '); --- --- EPSG 2291 : NAD83(CSRS98) / Prince Edward Isl. Stereographic (NAD83) (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2291,'EPSG',2291,'PROJCS["NAD83(CSRS98) / Prince Edward Isl. Stereographic (NAD83) (deprecated)",GEOGCS["ATS77",DATUM["Average_Terrestrial_System_1977",SPHEROID["Average Terrestrial System 1977",6378135,298.257,AUTHORITY["EPSG","7041"]],AUTHORITY["EPSG","6122"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4122"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",47.25],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.999912],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2291"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=sterea +lat_0=47.25 +lon_0=-63 +k=0.999912 +x_0=400000 +y_0=800000 +a=6378135 +b=6356750.304921594 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2291,'EPSG',2291,'PROJCS["NAD83(CSRS98) / Prince Edward Isl. Stereographic (NAD83) (deprecated)",GEOGCS["ATS77",DATUM["Average_Terrestrial_System_1977",SPHEROID["Average Terrestrial System 1977",6378135,298.257,AUTHORITY["EPSG","7041"]],AUTHORITY["EPSG","6122"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4122"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",47.25],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.999912],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2291"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=sterea +lat_0=47.25 +lon_0=-63 +k=0.999912 +x_0=400000 +y_0=800000 +a=6378135 +b=6356750.304921594 +units=m +no_defs '); --- --- EPSG 2292 : NAD83(CSRS98) / Prince Edward Isl. Stereographic (NAD83) (deprecated) --- @@ -2862,11 +2994,11 @@ --- --- EPSG 2294 : ATS77 / MTM Nova Scotia zone 4 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2294,'EPSG',2294,'PROJCS["ATS77 / MTM Nova Scotia zone 4",GEOGCS["ATS77",DATUM["Average_Terrestrial_System_1977",SPHEROID["Average Terrestrial System 1977",6378135,298.257,AUTHORITY["EPSG","7041"]],AUTHORITY["EPSG","6122"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4122"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-61.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",4500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2294"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-61.5 +k=0.9999 +x_0=4500000 +y_0=0 +a=6378135 +b=6356750.304921594 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2294,'EPSG',2294,'PROJCS["ATS77 / MTM Nova Scotia zone 4",GEOGCS["ATS77",DATUM["Average_Terrestrial_System_1977",SPHEROID["Average Terrestrial System 1977",6378135,298.257,AUTHORITY["EPSG","7041"]],AUTHORITY["EPSG","6122"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4122"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-61.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",4500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2294"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-61.5 +k=0.9999 +x_0=4500000 +y_0=0 +a=6378135 +b=6356750.304921594 +units=m +no_defs '); --- --- EPSG 2295 : ATS77 / MTM Nova Scotia zone 5 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2295,'EPSG',2295,'PROJCS["ATS77 / MTM Nova Scotia zone 5",GEOGCS["ATS77",DATUM["Average_Terrestrial_System_1977",SPHEROID["Average Terrestrial System 1977",6378135,298.257,AUTHORITY["EPSG","7041"]],AUTHORITY["EPSG","6122"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4122"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-64.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",5500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2295"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-64.5 +k=0.9999 +x_0=5500000 +y_0=0 +a=6378135 +b=6356750.304921594 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2295,'EPSG',2295,'PROJCS["ATS77 / MTM Nova Scotia zone 5",GEOGCS["ATS77",DATUM["Average_Terrestrial_System_1977",SPHEROID["Average Terrestrial System 1977",6378135,298.257,AUTHORITY["EPSG","7041"]],AUTHORITY["EPSG","6122"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4122"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-64.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",5500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2295"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-64.5 +k=0.9999 +x_0=5500000 +y_0=0 +a=6378135 +b=6356750.304921594 +units=m +no_defs '); --- --- EPSG 2296 : Ammassalik 1958 / Greenland zone 7 east --- @@ -2918,971 +3050,971 @@ --- --- EPSG 2308 : Batavia / TM 109 SE --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2308,'EPSG',2308,'PROJCS["Batavia / TM 109 SE",GEOGCS["Batavia",DATUM["Batavia",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6211"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4211"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",109],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2308"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=109 +k=0.9996 +x_0=500000 +y_0=10000000 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2308,'EPSG',2308,'PROJCS["Batavia / TM 109 SE",GEOGCS["Batavia",DATUM["Batavia",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-377,681,-50,0,0,0,0],AUTHORITY["EPSG","6211"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4211"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",109],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2308"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=109 +k=0.9996 +x_0=500000 +y_0=10000000 +ellps=bessel +towgs84=-377,681,-50,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2309 : WGS 84 / TM 116 SE --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2309,'EPSG',2309,'PROJCS["WGS 84 / TM 116 SE",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",116],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2309"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=116 +k=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2309,'EPSG',2309,'PROJCS["WGS 84 / TM 116 SE",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",116],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2309"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=116 +k=0.9996 +x_0=500000 +y_0=10000000 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 2310 : WGS 84 / TM 132 SE --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2310,'EPSG',2310,'PROJCS["WGS 84 / TM 132 SE",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",132],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2310"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=132 +k=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2310,'EPSG',2310,'PROJCS["WGS 84 / TM 132 SE",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",132],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2310"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=132 +k=0.9996 +x_0=500000 +y_0=10000000 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 2311 : WGS 84 / TM 6 NE --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2311,'EPSG',2311,'PROJCS["WGS 84 / TM 6 NE",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",6],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2311"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=6 +k=0.9996 +x_0=500000 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2311,'EPSG',2311,'PROJCS["WGS 84 / TM 6 NE",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",6],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2311"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=6 +k=0.9996 +x_0=500000 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 2312 : Garoua / UTM zone 33N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2312,'EPSG',2312,'PROJCS["Garoua / UTM zone 33N",GEOGCS["Garoua",DATUM["Garoua",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6197"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4197"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2312"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=33 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2312,'EPSG',2312,'PROJCS["Garoua / UTM zone 33N",GEOGCS["Garoua",DATUM["Garoua",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6197"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4197"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2312"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=33 +ellps=clrk80 +units=m +no_defs '); --- --- EPSG 2313 : Kousseri / UTM zone 33N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2313,'EPSG',2313,'PROJCS["Kousseri / UTM zone 33N",GEOGCS["Kousseri",DATUM["Kousseri",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6198"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4198"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2313"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=33 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2313,'EPSG',2313,'PROJCS["Kousseri / UTM zone 33N",GEOGCS["Kousseri",DATUM["Kousseri",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6198"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4198"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2313"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=33 +ellps=clrk80 +units=m +no_defs '); --- --- EPSG 2314 : Trinidad 1903 / Trinidad Grid (ftCla) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2314,'EPSG',2314,'PROJCS["Trinidad 1903 / Trinidad Grid (ftCla)",GEOGCS["Trinidad 1903",DATUM["Trinidad_1903",SPHEROID["Clarke 1858",6378293.645208759,294.2606763692569,AUTHORITY["EPSG","7007"]],AUTHORITY["EPSG","6302"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4302"]],UNIT["Clarke''s foot",0.3047972654,AUTHORITY["EPSG","9005"]],PROJECTION["Cassini_Soldner"],PARAMETER["latitude_of_origin",10.44166666666667],PARAMETER["central_meridian",-61.33333333333334],PARAMETER["false_easting",283800],PARAMETER["false_northing",214500],AUTHORITY["EPSG","2314"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=cass +lat_0=10.44166666666667 +lon_0=-61.33333333333334 +x_0=86501.46392052001 +y_0=65379.0134283 +a=6378293.645208759 +b=6356617.987679838 +to_meter=0.3047972654 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2314,'EPSG',2314,'PROJCS["Trinidad 1903 / Trinidad Grid (ftCla)",GEOGCS["Trinidad 1903",DATUM["Trinidad_1903",SPHEROID["Clarke 1858",6378293.645208759,294.2606763692569,AUTHORITY["EPSG","7007"]],TOWGS84[-61.702,284.488,472.052,0,0,0,0],AUTHORITY["EPSG","6302"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4302"]],UNIT["Clarke''s foot",0.3047972654,AUTHORITY["EPSG","9005"]],PROJECTION["Cassini_Soldner"],PARAMETER["latitude_of_origin",10.44166666666667],PARAMETER["central_meridian",-61.33333333333334],PARAMETER["false_easting",283800],PARAMETER["false_northing",214500],AUTHORITY["EPSG","2314"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=cass +lat_0=10.44166666666667 +lon_0=-61.33333333333334 +x_0=86501.46392052001 +y_0=65379.0134283 +a=6378293.645208759 +b=6356617.987679838 +towgs84=-61.702,284.488,472.052,0,0,0,0 +to_meter=0.3047972654 +no_defs '); --- --- EPSG 2315 : Campo Inchauspe / UTM zone 19S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2315,'EPSG',2315,'PROJCS["Campo Inchauspe / UTM zone 19S",GEOGCS["Campo Inchauspe",DATUM["Campo_Inchauspe",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6221"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4221"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2315"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +south +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2315,'EPSG',2315,'PROJCS["Campo Inchauspe / UTM zone 19S",GEOGCS["Campo Inchauspe",DATUM["Campo_Inchauspe",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-148,136,90,0,0,0,0],AUTHORITY["EPSG","6221"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4221"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2315"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +south +ellps=intl +towgs84=-148,136,90,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2316 : Campo Inchauspe / UTM zone 20S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2316,'EPSG',2316,'PROJCS["Campo Inchauspe / UTM zone 20S",GEOGCS["Campo Inchauspe",DATUM["Campo_Inchauspe",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6221"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4221"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2316"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +south +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2316,'EPSG',2316,'PROJCS["Campo Inchauspe / UTM zone 20S",GEOGCS["Campo Inchauspe",DATUM["Campo_Inchauspe",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-148,136,90,0,0,0,0],AUTHORITY["EPSG","6221"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4221"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2316"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +south +ellps=intl +towgs84=-148,136,90,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2317 : PSAD56 / ICN Regional --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2317,'EPSG',2317,'PROJCS["PSAD56 / ICN Regional",GEOGCS["PSAD56",DATUM["Provisional_South_American_Datum_1956",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6248"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4248"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",9],PARAMETER["standard_parallel_2",3],PARAMETER["latitude_of_origin",6],PARAMETER["central_meridian",-66],PARAMETER["false_easting",1000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","2317"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=9 +lat_2=3 +lat_0=6 +lon_0=-66 +x_0=1000000 +y_0=1000000 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2317,'EPSG',2317,'PROJCS["PSAD56 / ICN Regional",GEOGCS["PSAD56",DATUM["Provisional_South_American_Datum_1956",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY["EPSG","6248"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4248"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",9],PARAMETER["standard_parallel_2",3],PARAMETER["latitude_of_origin",6],PARAMETER["central_meridian",-66],PARAMETER["false_easting",1000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","2317"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=9 +lat_2=3 +lat_0=6 +lon_0=-66 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs84=-288,175,-376,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2318 : Ain el Abd / Aramco Lambert --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2318,'EPSG',2318,'PROJCS["Ain el Abd / Aramco Lambert",GEOGCS["Ain el Abd",DATUM["Ain_el_Abd_1970",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6204"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4204"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",17],PARAMETER["standard_parallel_2",33],PARAMETER["latitude_of_origin",25.08951],PARAMETER["central_meridian",48],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2318"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=17 +lat_2=33 +lat_0=25.08951 +lon_0=48 +x_0=0 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2318,'EPSG',2318,'PROJCS["Ain el Abd / Aramco Lambert",GEOGCS["Ain el Abd",DATUM["Ain_el_Abd_1970",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-143,-236,7,0,0,0,0],AUTHORITY["EPSG","6204"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4204"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",17],PARAMETER["standard_parallel_2",33],PARAMETER["latitude_of_origin",25.08951],PARAMETER["central_meridian",48],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2318"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=17 +lat_2=33 +lat_0=25.08951 +lon_0=48 +x_0=0 +y_0=0 +ellps=intl +towgs84=-143,-236,7,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2319 : ED50 / TM27 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2319,'EPSG',2319,'PROJCS["ED50 / TM27",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2319"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2319,'EPSG',2319,'PROJCS["ED50 / TM27",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-87,-98,-121,0,0,0,0],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2319"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +ellps=intl +towgs84=-87,-98,-121,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2320 : ED50 / TM30 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2320,'EPSG',2320,'PROJCS["ED50 / TM30",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",30],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2320"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2320,'EPSG',2320,'PROJCS["ED50 / TM30",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-87,-98,-121,0,0,0,0],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",30],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2320"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=500000 +y_0=0 +ellps=intl +towgs84=-87,-98,-121,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2321 : ED50 / TM33 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2321,'EPSG',2321,'PROJCS["ED50 / TM33",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2321"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2321,'EPSG',2321,'PROJCS["ED50 / TM33",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-87,-98,-121,0,0,0,0],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2321"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=500000 +y_0=0 +ellps=intl +towgs84=-87,-98,-121,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2322 : ED50 / TM36 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2322,'EPSG',2322,'PROJCS["ED50 / TM36",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",36],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2322"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=36 +k=1 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2322,'EPSG',2322,'PROJCS["ED50 / TM36",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-87,-98,-121,0,0,0,0],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",36],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2322"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=36 +k=1 +x_0=500000 +y_0=0 +ellps=intl +towgs84=-87,-98,-121,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2323 : ED50 / TM39 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2323,'EPSG',2323,'PROJCS["ED50 / TM39",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2323"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2323,'EPSG',2323,'PROJCS["ED50 / TM39",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-87,-98,-121,0,0,0,0],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2323"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=500000 +y_0=0 +ellps=intl +towgs84=-87,-98,-121,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2324 : ED50 / TM42 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2324,'EPSG',2324,'PROJCS["ED50 / TM42",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",42],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2324"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=42 +k=1 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2324,'EPSG',2324,'PROJCS["ED50 / TM42",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-87,-98,-121,0,0,0,0],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",42],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2324"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=42 +k=1 +x_0=500000 +y_0=0 +ellps=intl +towgs84=-87,-98,-121,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2325 : ED50 / TM45 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2325,'EPSG',2325,'PROJCS["ED50 / TM45",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2325"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2325,'EPSG',2325,'PROJCS["ED50 / TM45",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-87,-98,-121,0,0,0,0],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2325"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=500000 +y_0=0 +ellps=intl +towgs84=-87,-98,-121,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2326 : Hong Kong 1980 Grid System --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2326,'EPSG',2326,'PROJCS["Hong Kong 1980 Grid System",GEOGCS["Hong Kong 1980",DATUM["Hong_Kong_1980",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-162.619,-276.959,-161.764,0.067753,-2.24365,-1.15883,-1.09425],AUTHORITY["EPSG","6611"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4611"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",22.31213333333334],PARAMETER["central_meridian",114.1785555555556],PARAMETER["scale_factor",1],PARAMETER["false_easting",836694.05],PARAMETER["false_northing",819069.8],AUTHORITY["EPSG","2326"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=22.31213333333334 +lon_0=114.1785555555556 +k=1 +x_0=836694.05 +y_0=819069.8 +ellps=intl +towgs84=-162.619,-276.959,-161.764,0.067753,-2.24365,-1.15883,-1.09425 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2326,'EPSG',2326,'PROJCS["Hong Kong 1980 Grid System",GEOGCS["Hong Kong 1980",DATUM["Hong_Kong_1980",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-162.619,-276.959,-161.764,0.067753,-2.24365,-1.15883,-1.09425],AUTHORITY["EPSG","6611"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4611"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",22.31213333333334],PARAMETER["central_meridian",114.1785555555556],PARAMETER["scale_factor",1],PARAMETER["false_easting",836694.05],PARAMETER["false_northing",819069.8],AUTHORITY["EPSG","2326"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=22.31213333333334 +lon_0=114.1785555555556 +k=1 +x_0=836694.05 +y_0=819069.8 +ellps=intl +towgs84=-162.619,-276.959,-161.764,0.067753,-2.24365,-1.15883,-1.09425 +units=m +no_defs '); --- --- EPSG 2327 : Xian 1980 / Gauss-Kruger zone 13 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2327,'EPSG',2327,'PROJCS["Xian 1980 / Gauss-Kruger zone 13",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",13500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2327"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=13500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2327,'EPSG',2327,'PROJCS["Xian 1980 / Gauss-Kruger zone 13",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",13500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2327"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=13500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2328 : Xian 1980 / Gauss-Kruger zone 14 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2328,'EPSG',2328,'PROJCS["Xian 1980 / Gauss-Kruger zone 14",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",14500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2328"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=14500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2328,'EPSG',2328,'PROJCS["Xian 1980 / Gauss-Kruger zone 14",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",14500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2328"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=14500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2329 : Xian 1980 / Gauss-Kruger zone 15 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2329,'EPSG',2329,'PROJCS["Xian 1980 / Gauss-Kruger zone 15",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",15500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2329"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=15500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2329,'EPSG',2329,'PROJCS["Xian 1980 / Gauss-Kruger zone 15",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",15500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2329"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=15500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2330 : Xian 1980 / Gauss-Kruger zone 16 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2330,'EPSG',2330,'PROJCS["Xian 1980 / Gauss-Kruger zone 16",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",16500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2330"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=16500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2330,'EPSG',2330,'PROJCS["Xian 1980 / Gauss-Kruger zone 16",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",16500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2330"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=16500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2331 : Xian 1980 / Gauss-Kruger zone 17 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2331,'EPSG',2331,'PROJCS["Xian 1980 / Gauss-Kruger zone 17",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",17500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2331"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=17500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2331,'EPSG',2331,'PROJCS["Xian 1980 / Gauss-Kruger zone 17",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",17500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2331"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=17500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2332 : Xian 1980 / Gauss-Kruger zone 18 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2332,'EPSG',2332,'PROJCS["Xian 1980 / Gauss-Kruger zone 18",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",18500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2332"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=18500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2332,'EPSG',2332,'PROJCS["Xian 1980 / Gauss-Kruger zone 18",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",18500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2332"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=18500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2333 : Xian 1980 / Gauss-Kruger zone 19 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2333,'EPSG',2333,'PROJCS["Xian 1980 / Gauss-Kruger zone 19",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",19500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2333"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=19500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2333,'EPSG',2333,'PROJCS["Xian 1980 / Gauss-Kruger zone 19",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",19500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2333"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=19500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2334 : Xian 1980 / Gauss-Kruger zone 20 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2334,'EPSG',2334,'PROJCS["Xian 1980 / Gauss-Kruger zone 20",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",20500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2334"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=20500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2334,'EPSG',2334,'PROJCS["Xian 1980 / Gauss-Kruger zone 20",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",20500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2334"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=20500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2335 : Xian 1980 / Gauss-Kruger zone 21 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2335,'EPSG',2335,'PROJCS["Xian 1980 / Gauss-Kruger zone 21",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",21500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2335"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=21500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2335,'EPSG',2335,'PROJCS["Xian 1980 / Gauss-Kruger zone 21",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",21500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2335"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=21500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2336 : Xian 1980 / Gauss-Kruger zone 22 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2336,'EPSG',2336,'PROJCS["Xian 1980 / Gauss-Kruger zone 22",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",22500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2336"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=22500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2336,'EPSG',2336,'PROJCS["Xian 1980 / Gauss-Kruger zone 22",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",22500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2336"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=22500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2337 : Xian 1980 / Gauss-Kruger zone 23 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2337,'EPSG',2337,'PROJCS["Xian 1980 / Gauss-Kruger zone 23",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",23500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2337"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=23500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2337,'EPSG',2337,'PROJCS["Xian 1980 / Gauss-Kruger zone 23",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",23500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2337"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=23500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2338 : Xian 1980 / Gauss-Kruger CM 75E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2338,'EPSG',2338,'PROJCS["Xian 1980 / Gauss-Kruger CM 75E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2338"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2338,'EPSG',2338,'PROJCS["Xian 1980 / Gauss-Kruger CM 75E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2338"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2339 : Xian 1980 / Gauss-Kruger CM 81E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2339,'EPSG',2339,'PROJCS["Xian 1980 / Gauss-Kruger CM 81E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2339"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2339,'EPSG',2339,'PROJCS["Xian 1980 / Gauss-Kruger CM 81E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2339"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2340 : Xian 1980 / Gauss-Kruger CM 87E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2340,'EPSG',2340,'PROJCS["Xian 1980 / Gauss-Kruger CM 87E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2340"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2340,'EPSG',2340,'PROJCS["Xian 1980 / Gauss-Kruger CM 87E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2340"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2341 : Xian 1980 / Gauss-Kruger CM 93E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2341,'EPSG',2341,'PROJCS["Xian 1980 / Gauss-Kruger CM 93E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2341"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2341,'EPSG',2341,'PROJCS["Xian 1980 / Gauss-Kruger CM 93E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2341"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2342 : Xian 1980 / Gauss-Kruger CM 99E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2342,'EPSG',2342,'PROJCS["Xian 1980 / Gauss-Kruger CM 99E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2342"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2342,'EPSG',2342,'PROJCS["Xian 1980 / Gauss-Kruger CM 99E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2342"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2343 : Xian 1980 / Gauss-Kruger CM 105E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2343,'EPSG',2343,'PROJCS["Xian 1980 / Gauss-Kruger CM 105E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2343"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2343,'EPSG',2343,'PROJCS["Xian 1980 / Gauss-Kruger CM 105E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2343"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2344 : Xian 1980 / Gauss-Kruger CM 111E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2344,'EPSG',2344,'PROJCS["Xian 1980 / Gauss-Kruger CM 111E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2344"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2344,'EPSG',2344,'PROJCS["Xian 1980 / Gauss-Kruger CM 111E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2344"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2345 : Xian 1980 / Gauss-Kruger CM 117E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2345,'EPSG',2345,'PROJCS["Xian 1980 / Gauss-Kruger CM 117E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2345"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2345,'EPSG',2345,'PROJCS["Xian 1980 / Gauss-Kruger CM 117E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2345"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2346 : Xian 1980 / Gauss-Kruger CM 123E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2346,'EPSG',2346,'PROJCS["Xian 1980 / Gauss-Kruger CM 123E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2346"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2346,'EPSG',2346,'PROJCS["Xian 1980 / Gauss-Kruger CM 123E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2346"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2347 : Xian 1980 / Gauss-Kruger CM 129E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2347,'EPSG',2347,'PROJCS["Xian 1980 / Gauss-Kruger CM 129E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2347"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2347,'EPSG',2347,'PROJCS["Xian 1980 / Gauss-Kruger CM 129E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2347"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2348 : Xian 1980 / Gauss-Kruger CM 135E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2348,'EPSG',2348,'PROJCS["Xian 1980 / Gauss-Kruger CM 135E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2348"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2348,'EPSG',2348,'PROJCS["Xian 1980 / Gauss-Kruger CM 135E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2348"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2349 : Xian 1980 / 3-degree Gauss-Kruger zone 25 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2349,'EPSG',2349,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 25",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",25500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2349"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=25500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2349,'EPSG',2349,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 25",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",25500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2349"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=25500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2350 : Xian 1980 / 3-degree Gauss-Kruger zone 26 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2350,'EPSG',2350,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 26",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",78],PARAMETER["scale_factor",1],PARAMETER["false_easting",26500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2350"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=26500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2350,'EPSG',2350,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 26",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",78],PARAMETER["scale_factor",1],PARAMETER["false_easting",26500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2350"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=26500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2351 : Xian 1980 / 3-degree Gauss-Kruger zone 27 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2351,'EPSG',2351,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 27",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",27500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2351"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=27500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2351,'EPSG',2351,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 27",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",27500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2351"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=27500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2352 : Xian 1980 / 3-degree Gauss-Kruger zone 28 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2352,'EPSG',2352,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 28",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",84],PARAMETER["scale_factor",1],PARAMETER["false_easting",28500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2352"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=28500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2352,'EPSG',2352,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 28",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",84],PARAMETER["scale_factor",1],PARAMETER["false_easting",28500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2352"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=28500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2353 : Xian 1980 / 3-degree Gauss-Kruger zone 29 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2353,'EPSG',2353,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 29",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",29500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2353"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=29500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2353,'EPSG',2353,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 29",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",29500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2353"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=29500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2354 : Xian 1980 / 3-degree Gauss-Kruger zone 30 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2354,'EPSG',2354,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 30",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",90],PARAMETER["scale_factor",1],PARAMETER["false_easting",30500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2354"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=30500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2354,'EPSG',2354,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 30",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",90],PARAMETER["scale_factor",1],PARAMETER["false_easting",30500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2354"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=30500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2355 : Xian 1980 / 3-degree Gauss-Kruger zone 31 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2355,'EPSG',2355,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 31",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",31500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2355"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=31500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2355,'EPSG',2355,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 31",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",31500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2355"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=31500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2356 : Xian 1980 / 3-degree Gauss-Kruger zone 32 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2356,'EPSG',2356,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 32",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",96],PARAMETER["scale_factor",1],PARAMETER["false_easting",32500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2356"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=32500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2356,'EPSG',2356,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 32",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",96],PARAMETER["scale_factor",1],PARAMETER["false_easting",32500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2356"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=32500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2357 : Xian 1980 / 3-degree Gauss-Kruger zone 33 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2357,'EPSG',2357,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 33",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",33500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2357"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=33500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2357,'EPSG',2357,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 33",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",33500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2357"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=33500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2358 : Xian 1980 / 3-degree Gauss-Kruger zone 34 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2358,'EPSG',2358,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 34",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",102],PARAMETER["scale_factor",1],PARAMETER["false_easting",34500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2358"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=34500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2358,'EPSG',2358,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 34",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",102],PARAMETER["scale_factor",1],PARAMETER["false_easting",34500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2358"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=34500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2359 : Xian 1980 / 3-degree Gauss-Kruger zone 35 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2359,'EPSG',2359,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 35",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",35500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2359"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=35500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2359,'EPSG',2359,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 35",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",35500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2359"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=35500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2360 : Xian 1980 / 3-degree Gauss-Kruger zone 36 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2360,'EPSG',2360,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 36",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",108],PARAMETER["scale_factor",1],PARAMETER["false_easting",36500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2360"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=36500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2360,'EPSG',2360,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 36",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",108],PARAMETER["scale_factor",1],PARAMETER["false_easting",36500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2360"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=36500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2361 : Xian 1980 / 3-degree Gauss-Kruger zone 37 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2361,'EPSG',2361,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 37",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",37500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2361"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=37500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2361,'EPSG',2361,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 37",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",37500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2361"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=37500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2362 : Xian 1980 / 3-degree Gauss-Kruger zone 38 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2362,'EPSG',2362,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 38",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",114],PARAMETER["scale_factor",1],PARAMETER["false_easting",38500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2362"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=38500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2362,'EPSG',2362,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 38",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",114],PARAMETER["scale_factor",1],PARAMETER["false_easting",38500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2362"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=38500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2363 : Xian 1980 / 3-degree Gauss-Kruger zone 39 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2363,'EPSG',2363,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 39",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",39500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2363"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=39500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2363,'EPSG',2363,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 39",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",39500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2363"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=39500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2364 : Xian 1980 / 3-degree Gauss-Kruger zone 40 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2364,'EPSG',2364,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 40",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",120],PARAMETER["scale_factor",1],PARAMETER["false_easting",40500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2364"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=40500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2364,'EPSG',2364,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 40",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",120],PARAMETER["scale_factor",1],PARAMETER["false_easting",40500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2364"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=40500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2365 : Xian 1980 / 3-degree Gauss-Kruger zone 41 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2365,'EPSG',2365,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 41",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",41500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2365"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=41500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2365,'EPSG',2365,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 41",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",41500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2365"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=41500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2366 : Xian 1980 / 3-degree Gauss-Kruger zone 42 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2366,'EPSG',2366,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 42",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",126],PARAMETER["scale_factor",1],PARAMETER["false_easting",42500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2366"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=126 +k=1 +x_0=42500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2366,'EPSG',2366,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 42",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",126],PARAMETER["scale_factor",1],PARAMETER["false_easting",42500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2366"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=126 +k=1 +x_0=42500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2367 : Xian 1980 / 3-degree Gauss-Kruger zone 43 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2367,'EPSG',2367,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 43",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",43500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2367"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=43500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2367,'EPSG',2367,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 43",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",43500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2367"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=43500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2368 : Xian 1980 / 3-degree Gauss-Kruger zone 44 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2368,'EPSG',2368,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 44",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",132],PARAMETER["scale_factor",1],PARAMETER["false_easting",44500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2368"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=132 +k=1 +x_0=44500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2368,'EPSG',2368,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 44",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",132],PARAMETER["scale_factor",1],PARAMETER["false_easting",44500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2368"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=132 +k=1 +x_0=44500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2369 : Xian 1980 / 3-degree Gauss-Kruger zone 45 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2369,'EPSG',2369,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 45",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",45500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2369"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=45500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2369,'EPSG',2369,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 45",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",45500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2369"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=45500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2370 : Xian 1980 / 3-degree Gauss-Kruger CM 75E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2370,'EPSG',2370,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 75E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2370"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2370,'EPSG',2370,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 75E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2370"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2371 : Xian 1980 / 3-degree Gauss-Kruger CM 78E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2371,'EPSG',2371,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 78E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",78],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2371"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2371,'EPSG',2371,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 78E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",78],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2371"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2372 : Xian 1980 / 3-degree Gauss-Kruger CM 81E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2372,'EPSG',2372,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 81E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2372"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2372,'EPSG',2372,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 81E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2372"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2373 : Xian 1980 / 3-degree Gauss-Kruger CM 84E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2373,'EPSG',2373,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 84E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",84],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2373"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2373,'EPSG',2373,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 84E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",84],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2373"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2374 : Xian 1980 / 3-degree Gauss-Kruger CM 87E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2374,'EPSG',2374,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 87E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2374"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2374,'EPSG',2374,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 87E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2374"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2375 : Xian 1980 / 3-degree Gauss-Kruger CM 90E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2375,'EPSG',2375,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 90E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",90],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2375"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2375,'EPSG',2375,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 90E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",90],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2375"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2376 : Xian 1980 / 3-degree Gauss-Kruger CM 93E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2376,'EPSG',2376,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 93E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2376"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2376,'EPSG',2376,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 93E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2376"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2377 : Xian 1980 / 3-degree Gauss-Kruger CM 96E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2377,'EPSG',2377,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 96E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",96],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2377"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2377,'EPSG',2377,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 96E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",96],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2377"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2378 : Xian 1980 / 3-degree Gauss-Kruger CM 99E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2378,'EPSG',2378,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 99E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2378"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2378,'EPSG',2378,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 99E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2378"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2379 : Xian 1980 / 3-degree Gauss-Kruger CM 102E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2379,'EPSG',2379,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 102E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",102],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2379"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2379,'EPSG',2379,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 102E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",102],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2379"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2380 : Xian 1980 / 3-degree Gauss-Kruger CM 105E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2380,'EPSG',2380,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 105E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2380"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2380,'EPSG',2380,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 105E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2380"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2381 : Xian 1980 / 3-degree Gauss-Kruger CM 108E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2381,'EPSG',2381,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 108E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",108],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2381"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2381,'EPSG',2381,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 108E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",108],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2381"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2382 : Xian 1980 / 3-degree Gauss-Kruger CM 111E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2382,'EPSG',2382,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 111E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2382"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2382,'EPSG',2382,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 111E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2382"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2383 : Xian 1980 / 3-degree Gauss-Kruger CM 114E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2383,'EPSG',2383,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 114E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",114],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2383"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2383,'EPSG',2383,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 114E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",114],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2383"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2384 : Xian 1980 / 3-degree Gauss-Kruger CM 117E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2384,'EPSG',2384,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 117E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2384"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2384,'EPSG',2384,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 117E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2384"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2385 : Xian 1980 / 3-degree Gauss-Kruger CM 120E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2385,'EPSG',2385,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 120E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",120],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2385"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2385,'EPSG',2385,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 120E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",120],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2385"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2386 : Xian 1980 / 3-degree Gauss-Kruger CM 123E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2386,'EPSG',2386,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 123E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2386"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2386,'EPSG',2386,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 123E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2386"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2387 : Xian 1980 / 3-degree Gauss-Kruger CM 126E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2387,'EPSG',2387,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 126E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",126],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2387"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=126 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2387,'EPSG',2387,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 126E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",126],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2387"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=126 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2388 : Xian 1980 / 3-degree Gauss-Kruger CM 129E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2388,'EPSG',2388,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 129E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2388"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2388,'EPSG',2388,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 129E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2388"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2389 : Xian 1980 / 3-degree Gauss-Kruger CM 132E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2389,'EPSG',2389,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 132E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",132],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2389"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=132 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2389,'EPSG',2389,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 132E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",132],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2389"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=132 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2390 : Xian 1980 / 3-degree Gauss-Kruger CM 135E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2390,'EPSG',2390,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 135E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["Xian 1980",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2390"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2390,'EPSG',2390,'PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 135E",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2390"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs '); --- --- EPSG 2391 : KKJ / Finland zone 1 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2391,'EPSG',2391,'PROJCS["KKJ / Finland zone 1",GEOGCS["KKJ",DATUM["Kartastokoordinaattijarjestelma_1966",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6123"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4123"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2391"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=1500000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2391,'EPSG',2391,'PROJCS["KKJ / Finland zone 1",GEOGCS["KKJ",DATUM["Kartastokoordinaattijarjestelma_1966",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496],AUTHORITY["EPSG","6123"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4123"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2391"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=1500000 +y_0=0 +ellps=intl +towgs84=-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496 +units=m +no_defs '); --- --- EPSG 2392 : KKJ / Finland zone 2 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2392,'EPSG',2392,'PROJCS["KKJ / Finland zone 2",GEOGCS["KKJ",DATUM["Kartastokoordinaattijarjestelma_1966",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6123"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4123"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",24],PARAMETER["scale_factor",1],PARAMETER["false_easting",2500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2392"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=2500000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2392,'EPSG',2392,'PROJCS["KKJ / Finland zone 2",GEOGCS["KKJ",DATUM["Kartastokoordinaattijarjestelma_1966",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496],AUTHORITY["EPSG","6123"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4123"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",24],PARAMETER["scale_factor",1],PARAMETER["false_easting",2500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2392"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=2500000 +y_0=0 +ellps=intl +towgs84=-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496 +units=m +no_defs '); --- --- EPSG 2393 : KKJ / Finland Uniform Coordinate System --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2393,'EPSG',2393,'PROJCS["KKJ / Finland Uniform Coordinate System",GEOGCS["KKJ",DATUM["Kartastokoordinaattijarjestelma_1966",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6123"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4123"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",1],PARAMETER["false_easting",3500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2393"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=3500000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2393,'EPSG',2393,'PROJCS["KKJ / Finland Uniform Coordinate System",GEOGCS["KKJ",DATUM["Kartastokoordinaattijarjestelma_1966",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496],AUTHORITY["EPSG","6123"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4123"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",1],PARAMETER["false_easting",3500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2393"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=3500000 +y_0=0 +ellps=intl +towgs84=-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496 +units=m +no_defs '); --- --- EPSG 2394 : KKJ / Finland zone 4 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2394,'EPSG',2394,'PROJCS["KKJ / Finland zone 4",GEOGCS["KKJ",DATUM["Kartastokoordinaattijarjestelma_1966",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6123"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4123"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",30],PARAMETER["scale_factor",1],PARAMETER["false_easting",4500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2394"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=4500000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2394,'EPSG',2394,'PROJCS["KKJ / Finland zone 4",GEOGCS["KKJ",DATUM["Kartastokoordinaattijarjestelma_1966",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496],AUTHORITY["EPSG","6123"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4123"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",30],PARAMETER["scale_factor",1],PARAMETER["false_easting",4500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2394"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=4500000 +y_0=0 +ellps=intl +towgs84=-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496 +units=m +no_defs '); --- --- EPSG 2395 : South Yemen / Gauss-Kruger zone 8 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2395,'EPSG',2395,'PROJCS["South Yemen / Gauss-Kruger zone 8",GEOGCS["South Yemen",DATUM["South_Yemen",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[-76,-138,67,0,0,0,0],AUTHORITY["EPSG","6164"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4164"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",1],PARAMETER["false_easting",8500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2395"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=8500000 +y_0=0 +ellps=krass +towgs84=-76,-138,67,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2395,'EPSG',2395,'PROJCS["South Yemen / Gauss-Kruger zone 8",GEOGCS["South Yemen",DATUM["South_Yemen",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[-76,-138,67,0,0,0,0],AUTHORITY["EPSG","6164"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4164"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",1],PARAMETER["false_easting",8500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2395"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=8500000 +y_0=0 +ellps=krass +towgs84=-76,-138,67,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2396 : South Yemen / Gauss-Kruger zone 9 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2396,'EPSG',2396,'PROJCS["South Yemen / Gauss-Kruger zone 9",GEOGCS["South Yemen",DATUM["South_Yemen",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[-76,-138,67,0,0,0,0],AUTHORITY["EPSG","6164"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4164"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",1],PARAMETER["false_easting",9500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2396"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=9500000 +y_0=0 +ellps=krass +towgs84=-76,-138,67,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2396,'EPSG',2396,'PROJCS["South Yemen / Gauss-Kruger zone 9",GEOGCS["South Yemen",DATUM["South_Yemen",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[-76,-138,67,0,0,0,0],AUTHORITY["EPSG","6164"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4164"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",1],PARAMETER["false_easting",9500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2396"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=9500000 +y_0=0 +ellps=krass +towgs84=-76,-138,67,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2397 : Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 3 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2397,'EPSG',2397,'PROJCS["Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 3",GEOGCS["Pulkovo 1942(83)",DATUM["Pulkovo_1942_83",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6178"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4178"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",1],PARAMETER["false_easting",3500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2397"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2397,'EPSG',2397,'PROJCS["Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 3",GEOGCS["Pulkovo 1942(83)",DATUM["Pulkovo_1942_83",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[26,-121,-78,0,0,0,0],AUTHORITY["EPSG","6178"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4178"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",1],PARAMETER["false_easting",3500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2397"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +ellps=krass +towgs84=26,-121,-78,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2398 : Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 4 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2398,'EPSG',2398,'PROJCS["Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 4",GEOGCS["Pulkovo 1942(83)",DATUM["Pulkovo_1942_83",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6178"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4178"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",12],PARAMETER["scale_factor",1],PARAMETER["false_easting",4500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2398"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2398,'EPSG',2398,'PROJCS["Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 4",GEOGCS["Pulkovo 1942(83)",DATUM["Pulkovo_1942_83",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[26,-121,-78,0,0,0,0],AUTHORITY["EPSG","6178"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4178"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",12],PARAMETER["scale_factor",1],PARAMETER["false_easting",4500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2398"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 +ellps=krass +towgs84=26,-121,-78,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2399 : Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 5 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2399,'EPSG',2399,'PROJCS["Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 5",GEOGCS["Pulkovo 1942(83)",DATUM["Pulkovo_1942_83",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6178"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4178"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",1],PARAMETER["false_easting",5500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2399"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=5500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2399,'EPSG',2399,'PROJCS["Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 5",GEOGCS["Pulkovo 1942(83)",DATUM["Pulkovo_1942_83",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[26,-121,-78,0,0,0,0],AUTHORITY["EPSG","6178"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4178"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",1],PARAMETER["false_easting",5500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2399"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=5500000 +y_0=0 +ellps=krass +towgs84=26,-121,-78,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2400 : RT90 2.5 gon W (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2400,'EPSG',2400,'PROJCS["RT90 2.5 gon W (deprecated)",GEOGCS["RT90",DATUM["Rikets_koordinatsystem_1990",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6124"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4124"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15.80827777777778],PARAMETER["scale_factor",1],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2400"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=15.80827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2400,'EPSG',2400,'PROJCS["RT90 2.5 gon W (deprecated)",GEOGCS["RT90",DATUM["Rikets_koordinatsystem_1990",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[414.1,41.3,603.1,-0.855,2.141,-7.023,0],AUTHORITY["EPSG","6124"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4124"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15.80827777777778],PARAMETER["scale_factor",1],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2400"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=15.80827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +towgs84=414.1,41.3,603.1,-0.855,2.141,-7.023,0 +units=m +no_defs '); --- --- EPSG 2401 : Beijing 1954 / 3-degree Gauss-Kruger zone 25 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2401,'EPSG',2401,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger zone 25",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",25500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2401"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=25500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2401,'EPSG',2401,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger zone 25",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",25500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2401"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=25500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2402 : Beijing 1954 / 3-degree Gauss-Kruger zone 26 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2402,'EPSG',2402,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger zone 26",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",78],PARAMETER["scale_factor",1],PARAMETER["false_easting",26500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2402"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=26500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2402,'EPSG',2402,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger zone 26",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",78],PARAMETER["scale_factor",1],PARAMETER["false_easting",26500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2402"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=26500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2403 : Beijing 1954 / 3-degree Gauss-Kruger zone 27 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2403,'EPSG',2403,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger zone 27",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",27500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2403"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=27500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2403,'EPSG',2403,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger zone 27",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",27500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2403"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=27500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2404 : Beijing 1954 / 3-degree Gauss-Kruger zone 28 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2404,'EPSG',2404,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger zone 28",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",84],PARAMETER["scale_factor",1],PARAMETER["false_easting",28500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2404"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=28500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2404,'EPSG',2404,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger zone 28",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",84],PARAMETER["scale_factor",1],PARAMETER["false_easting",28500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2404"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=28500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2405 : Beijing 1954 / 3-degree Gauss-Kruger zone 29 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2405,'EPSG',2405,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger zone 29",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",29500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2405"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=29500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2405,'EPSG',2405,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger zone 29",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",29500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2405"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=29500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2406 : Beijing 1954 / 3-degree Gauss-Kruger zone 30 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2406,'EPSG',2406,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger zone 30",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",90],PARAMETER["scale_factor",1],PARAMETER["false_easting",30500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2406"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=30500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2406,'EPSG',2406,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger zone 30",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",90],PARAMETER["scale_factor",1],PARAMETER["false_easting",30500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2406"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=30500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2407 : Beijing 1954 / 3-degree Gauss-Kruger zone 31 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2407,'EPSG',2407,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger zone 31",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",31500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2407"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=31500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2407,'EPSG',2407,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger zone 31",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",31500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2407"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=31500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2408 : Beijing 1954 / 3-degree Gauss-Kruger zone 32 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2408,'EPSG',2408,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger zone 32",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",96],PARAMETER["scale_factor",1],PARAMETER["false_easting",32500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2408"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=32500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2408,'EPSG',2408,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger zone 32",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",96],PARAMETER["scale_factor",1],PARAMETER["false_easting",32500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2408"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=32500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2409 : Beijing 1954 / 3-degree Gauss-Kruger zone 33 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2409,'EPSG',2409,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger zone 33",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",33500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2409"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=33500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2409,'EPSG',2409,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger zone 33",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",33500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2409"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=33500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2410 : Beijing 1954 / 3-degree Gauss-Kruger zone 34 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2410,'EPSG',2410,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger zone 34",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",102],PARAMETER["scale_factor",1],PARAMETER["false_easting",34500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2410"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=34500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2410,'EPSG',2410,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger zone 34",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",102],PARAMETER["scale_factor",1],PARAMETER["false_easting",34500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2410"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=34500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2411 : Beijing 1954 / 3-degree Gauss-Kruger zone 35 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2411,'EPSG',2411,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger zone 35",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",35500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2411"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=35500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2411,'EPSG',2411,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger zone 35",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",35500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2411"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=35500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2412 : Beijing 1954 / 3-degree Gauss-Kruger zone 36 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2412,'EPSG',2412,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger zone 36",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",108],PARAMETER["scale_factor",1],PARAMETER["false_easting",36500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2412"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=36500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2412,'EPSG',2412,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger zone 36",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",108],PARAMETER["scale_factor",1],PARAMETER["false_easting",36500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2412"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=36500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2413 : Beijing 1954 / 3-degree Gauss-Kruger zone 37 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2413,'EPSG',2413,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger zone 37",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",37500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2413"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=37500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2413,'EPSG',2413,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger zone 37",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",37500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2413"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=37500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2414 : Beijing 1954 / 3-degree Gauss-Kruger zone 38 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2414,'EPSG',2414,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger zone 38",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",114],PARAMETER["scale_factor",1],PARAMETER["false_easting",38500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2414"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=38500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2414,'EPSG',2414,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger zone 38",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",114],PARAMETER["scale_factor",1],PARAMETER["false_easting",38500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2414"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=38500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2415 : Beijing 1954 / 3-degree Gauss-Kruger zone 39 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2415,'EPSG',2415,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger zone 39",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",39500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2415"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=39500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2415,'EPSG',2415,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger zone 39",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",39500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2415"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=39500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2416 : Beijing 1954 / 3-degree Gauss-Kruger zone 40 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2416,'EPSG',2416,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger zone 40",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",120],PARAMETER["scale_factor",1],PARAMETER["false_easting",40500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2416"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=40500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2416,'EPSG',2416,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger zone 40",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",120],PARAMETER["scale_factor",1],PARAMETER["false_easting",40500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2416"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=40500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2417 : Beijing 1954 / 3-degree Gauss-Kruger zone 41 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2417,'EPSG',2417,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger zone 41",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",41500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2417"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=41500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2417,'EPSG',2417,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger zone 41",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",41500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2417"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=41500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2418 : Beijing 1954 / 3-degree Gauss-Kruger zone 42 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2418,'EPSG',2418,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger zone 42",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",126],PARAMETER["scale_factor",1],PARAMETER["false_easting",42500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2418"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=126 +k=1 +x_0=42500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2418,'EPSG',2418,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger zone 42",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",126],PARAMETER["scale_factor",1],PARAMETER["false_easting",42500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2418"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=126 +k=1 +x_0=42500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2419 : Beijing 1954 / 3-degree Gauss-Kruger zone 43 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2419,'EPSG',2419,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger zone 43",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",43500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2419"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=43500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2419,'EPSG',2419,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger zone 43",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",43500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2419"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=43500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2420 : Beijing 1954 / 3-degree Gauss-Kruger zone 44 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2420,'EPSG',2420,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger zone 44",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",132],PARAMETER["scale_factor",1],PARAMETER["false_easting",44500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2420"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=132 +k=1 +x_0=44500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2420,'EPSG',2420,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger zone 44",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",132],PARAMETER["scale_factor",1],PARAMETER["false_easting",44500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2420"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=132 +k=1 +x_0=44500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2421 : Beijing 1954 / 3-degree Gauss-Kruger zone 45 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2421,'EPSG',2421,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger zone 45",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",45500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2421"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=45500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2421,'EPSG',2421,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger zone 45",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",45500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2421"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=45500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2422 : Beijing 1954 / 3-degree Gauss-Kruger CM 75E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2422,'EPSG',2422,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger CM 75E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2422"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2422,'EPSG',2422,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger CM 75E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2422"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2423 : Beijing 1954 / 3-degree Gauss-Kruger CM 78E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2423,'EPSG',2423,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger CM 78E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",78],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2423"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2423,'EPSG',2423,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger CM 78E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",78],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2423"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2424 : Beijing 1954 / 3-degree Gauss-Kruger CM 81E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2424,'EPSG',2424,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger CM 81E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2424"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2424,'EPSG',2424,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger CM 81E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2424"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2425 : Beijing 1954 / 3-degree Gauss-Kruger CM 84E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2425,'EPSG',2425,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger CM 84E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",84],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2425"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2425,'EPSG',2425,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger CM 84E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",84],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2425"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2426 : Beijing 1954 / 3-degree Gauss-Kruger CM 87E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2426,'EPSG',2426,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger CM 87E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2426"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2426,'EPSG',2426,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger CM 87E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2426"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2427 : Beijing 1954 / 3-degree Gauss-Kruger CM 90E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2427,'EPSG',2427,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger CM 90E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",90],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2427"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2427,'EPSG',2427,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger CM 90E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",90],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2427"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2428 : Beijing 1954 / 3-degree Gauss-Kruger CM 93E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2428,'EPSG',2428,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger CM 93E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2428"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2428,'EPSG',2428,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger CM 93E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2428"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2429 : Beijing 1954 / 3-degree Gauss-Kruger CM 96E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2429,'EPSG',2429,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger CM 96E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",96],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2429"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2429,'EPSG',2429,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger CM 96E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",96],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2429"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2430 : Beijing 1954 / 3-degree Gauss-Kruger CM 99E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2430,'EPSG',2430,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger CM 99E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2430"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2430,'EPSG',2430,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger CM 99E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2430"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2431 : Beijing 1954 / 3-degree Gauss-Kruger CM 102E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2431,'EPSG',2431,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger CM 102E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",102],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2431"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2431,'EPSG',2431,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger CM 102E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",102],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2431"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2432 : Beijing 1954 / 3-degree Gauss-Kruger CM 105E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2432,'EPSG',2432,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger CM 105E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2432"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2432,'EPSG',2432,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger CM 105E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2432"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2433 : Beijing 1954 / 3-degree Gauss-Kruger CM 108E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2433,'EPSG',2433,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger CM 108E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",108],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2433"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2433,'EPSG',2433,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger CM 108E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",108],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2433"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2434 : Beijing 1954 / 3-degree Gauss-Kruger CM 111E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2434,'EPSG',2434,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger CM 111E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2434"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2434,'EPSG',2434,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger CM 111E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2434"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2435 : Beijing 1954 / 3-degree Gauss-Kruger CM 114E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2435,'EPSG',2435,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger CM 114E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",114],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2435"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2435,'EPSG',2435,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger CM 114E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",114],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2435"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2436 : Beijing 1954 / 3-degree Gauss-Kruger CM 117E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2436,'EPSG',2436,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger CM 117E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2436"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2436,'EPSG',2436,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger CM 117E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2436"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2437 : Beijing 1954 / 3-degree Gauss-Kruger CM 120E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2437,'EPSG',2437,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger CM 120E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",120],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2437"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2437,'EPSG',2437,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger CM 120E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",120],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2437"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2438 : Beijing 1954 / 3-degree Gauss-Kruger CM 123E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2438,'EPSG',2438,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger CM 123E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2438"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2438,'EPSG',2438,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger CM 123E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2438"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2439 : Beijing 1954 / 3-degree Gauss-Kruger CM 126E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2439,'EPSG',2439,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger CM 126E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",126],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2439"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=126 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2439,'EPSG',2439,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger CM 126E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",126],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2439"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=126 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2440 : Beijing 1954 / 3-degree Gauss-Kruger CM 129E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2440,'EPSG',2440,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger CM 129E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2440"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2440,'EPSG',2440,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger CM 129E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2440"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2441 : Beijing 1954 / 3-degree Gauss-Kruger CM 132E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2441,'EPSG',2441,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger CM 132E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",132],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2441"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=132 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2441,'EPSG',2441,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger CM 132E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",132],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2441"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=132 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2442 : Beijing 1954 / 3-degree Gauss-Kruger CM 135E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2442,'EPSG',2442,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger CM 135E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2442"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2442,'EPSG',2442,'PROJCS["Beijing 1954 / 3-degree Gauss-Kruger CM 135E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2442"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2443 : JGD2000 / Japan Plane Rectangular CS I --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2443,'EPSG',2443,'PROJCS["JGD2000 / Japan Plane Rectangular CS I",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",33],PARAMETER["central_meridian",129.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2443"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=33 +lon_0=129.5 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2443,'EPSG',2443,'PROJCS["JGD2000 / Japan Plane Rectangular CS I",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",33],PARAMETER["central_meridian",129.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2443"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=33 +lon_0=129.5 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2444 : JGD2000 / Japan Plane Rectangular CS II --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2444,'EPSG',2444,'PROJCS["JGD2000 / Japan Plane Rectangular CS II",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",33],PARAMETER["central_meridian",131],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2444"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=33 +lon_0=131 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2444,'EPSG',2444,'PROJCS["JGD2000 / Japan Plane Rectangular CS II",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",33],PARAMETER["central_meridian",131],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2444"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=33 +lon_0=131 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2445 : JGD2000 / Japan Plane Rectangular CS III --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2445,'EPSG',2445,'PROJCS["JGD2000 / Japan Plane Rectangular CS III",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36],PARAMETER["central_meridian",132.1666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2445"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=36 +lon_0=132.1666666666667 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2445,'EPSG',2445,'PROJCS["JGD2000 / Japan Plane Rectangular CS III",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36],PARAMETER["central_meridian",132.1666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2445"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=36 +lon_0=132.1666666666667 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2446 : JGD2000 / Japan Plane Rectangular CS IV --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2446,'EPSG',2446,'PROJCS["JGD2000 / Japan Plane Rectangular CS IV",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",33],PARAMETER["central_meridian",133.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2446"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=33 +lon_0=133.5 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2446,'EPSG',2446,'PROJCS["JGD2000 / Japan Plane Rectangular CS IV",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",33],PARAMETER["central_meridian",133.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2446"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=33 +lon_0=133.5 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2447 : JGD2000 / Japan Plane Rectangular CS V --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2447,'EPSG',2447,'PROJCS["JGD2000 / Japan Plane Rectangular CS V",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36],PARAMETER["central_meridian",134.3333333333333],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2447"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=36 +lon_0=134.3333333333333 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2447,'EPSG',2447,'PROJCS["JGD2000 / Japan Plane Rectangular CS V",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36],PARAMETER["central_meridian",134.3333333333333],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2447"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=36 +lon_0=134.3333333333333 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2448 : JGD2000 / Japan Plane Rectangular CS VI --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2448,'EPSG',2448,'PROJCS["JGD2000 / Japan Plane Rectangular CS VI",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36],PARAMETER["central_meridian",136],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2448"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=36 +lon_0=136 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2448,'EPSG',2448,'PROJCS["JGD2000 / Japan Plane Rectangular CS VI",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36],PARAMETER["central_meridian",136],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2448"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=36 +lon_0=136 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2449 : JGD2000 / Japan Plane Rectangular CS VII --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2449,'EPSG',2449,'PROJCS["JGD2000 / Japan Plane Rectangular CS VII",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36],PARAMETER["central_meridian",137.1666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2449"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=36 +lon_0=137.1666666666667 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2449,'EPSG',2449,'PROJCS["JGD2000 / Japan Plane Rectangular CS VII",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36],PARAMETER["central_meridian",137.1666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2449"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=36 +lon_0=137.1666666666667 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2450 : JGD2000 / Japan Plane Rectangular CS VIII --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2450,'EPSG',2450,'PROJCS["JGD2000 / Japan Plane Rectangular CS VIII",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36],PARAMETER["central_meridian",138.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2450"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=36 +lon_0=138.5 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2450,'EPSG',2450,'PROJCS["JGD2000 / Japan Plane Rectangular CS VIII",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36],PARAMETER["central_meridian",138.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2450"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=36 +lon_0=138.5 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2451 : JGD2000 / Japan Plane Rectangular CS IX --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2451,'EPSG',2451,'PROJCS["JGD2000 / Japan Plane Rectangular CS IX",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36],PARAMETER["central_meridian",139.8333333333333],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2451"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=36 +lon_0=139.8333333333333 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2451,'EPSG',2451,'PROJCS["JGD2000 / Japan Plane Rectangular CS IX",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36],PARAMETER["central_meridian",139.8333333333333],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2451"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=36 +lon_0=139.8333333333333 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2452 : JGD2000 / Japan Plane Rectangular CS X --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2452,'EPSG',2452,'PROJCS["JGD2000 / Japan Plane Rectangular CS X",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",140.8333333333333],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2452"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=40 +lon_0=140.8333333333333 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2452,'EPSG',2452,'PROJCS["JGD2000 / Japan Plane Rectangular CS X",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",140.8333333333333],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2452"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=40 +lon_0=140.8333333333333 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2453 : JGD2000 / Japan Plane Rectangular CS XI --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2453,'EPSG',2453,'PROJCS["JGD2000 / Japan Plane Rectangular CS XI",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",44],PARAMETER["central_meridian",140.25],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2453"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=44 +lon_0=140.25 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2453,'EPSG',2453,'PROJCS["JGD2000 / Japan Plane Rectangular CS XI",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",44],PARAMETER["central_meridian",140.25],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2453"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=44 +lon_0=140.25 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2454 : JGD2000 / Japan Plane Rectangular CS XII --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2454,'EPSG',2454,'PROJCS["JGD2000 / Japan Plane Rectangular CS XII",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",44],PARAMETER["central_meridian",142.25],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2454"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=44 +lon_0=142.25 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2454,'EPSG',2454,'PROJCS["JGD2000 / Japan Plane Rectangular CS XII",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",44],PARAMETER["central_meridian",142.25],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2454"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=44 +lon_0=142.25 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2455 : JGD2000 / Japan Plane Rectangular CS XIII --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2455,'EPSG',2455,'PROJCS["JGD2000 / Japan Plane Rectangular CS XIII",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",44],PARAMETER["central_meridian",144.25],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2455"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=44 +lon_0=144.25 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2455,'EPSG',2455,'PROJCS["JGD2000 / Japan Plane Rectangular CS XIII",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",44],PARAMETER["central_meridian",144.25],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2455"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=44 +lon_0=144.25 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2456 : JGD2000 / Japan Plane Rectangular CS XIV --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2456,'EPSG',2456,'PROJCS["JGD2000 / Japan Plane Rectangular CS XIV",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",26],PARAMETER["central_meridian",142],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2456"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=26 +lon_0=142 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2456,'EPSG',2456,'PROJCS["JGD2000 / Japan Plane Rectangular CS XIV",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",26],PARAMETER["central_meridian",142],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2456"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=26 +lon_0=142 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2457 : JGD2000 / Japan Plane Rectangular CS XV --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2457,'EPSG',2457,'PROJCS["JGD2000 / Japan Plane Rectangular CS XV",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",26],PARAMETER["central_meridian",127.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2457"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=26 +lon_0=127.5 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2457,'EPSG',2457,'PROJCS["JGD2000 / Japan Plane Rectangular CS XV",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",26],PARAMETER["central_meridian",127.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2457"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=26 +lon_0=127.5 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2458 : JGD2000 / Japan Plane Rectangular CS XVI --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2458,'EPSG',2458,'PROJCS["JGD2000 / Japan Plane Rectangular CS XVI",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",26],PARAMETER["central_meridian",124],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2458"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=26 +lon_0=124 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2458,'EPSG',2458,'PROJCS["JGD2000 / Japan Plane Rectangular CS XVI",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",26],PARAMETER["central_meridian",124],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2458"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=26 +lon_0=124 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2459 : JGD2000 / Japan Plane Rectangular CS XVII --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2459,'EPSG',2459,'PROJCS["JGD2000 / Japan Plane Rectangular CS XVII",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",26],PARAMETER["central_meridian",131],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2459"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=26 +lon_0=131 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2459,'EPSG',2459,'PROJCS["JGD2000 / Japan Plane Rectangular CS XVII",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",26],PARAMETER["central_meridian",131],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2459"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=26 +lon_0=131 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2460 : JGD2000 / Japan Plane Rectangular CS XVIII --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2460,'EPSG',2460,'PROJCS["JGD2000 / Japan Plane Rectangular CS XVIII",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",20],PARAMETER["central_meridian",136],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2460"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=20 +lon_0=136 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2460,'EPSG',2460,'PROJCS["JGD2000 / Japan Plane Rectangular CS XVIII",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",20],PARAMETER["central_meridian",136],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2460"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=20 +lon_0=136 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2461 : JGD2000 / Japan Plane Rectangular CS XIX --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2461,'EPSG',2461,'PROJCS["JGD2000 / Japan Plane Rectangular CS XIX",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",26],PARAMETER["central_meridian",154],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2461"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=26 +lon_0=154 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2461,'EPSG',2461,'PROJCS["JGD2000 / Japan Plane Rectangular CS XIX",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",26],PARAMETER["central_meridian",154],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2461"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=26 +lon_0=154 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2462 : Albanian 1987 / Gauss-Kruger zone 4 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2462,'EPSG',2462,'PROJCS["Albanian 1987 / Gauss-Kruger zone 4",GEOGCS["Albanian 1987",DATUM["Albanian_1987",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6191"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4191"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",4500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2462"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=4500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2462,'EPSG',2462,'PROJCS["Albanian 1987 / Gauss-Kruger zone 4",GEOGCS["Albanian 1987",DATUM["Albanian_1987",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6191"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4191"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",4500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2462"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=4500000 +y_0=0 +ellps=krass +units=m +no_defs '); --- --- EPSG 2463 : Pulkovo 1995 / Gauss-Kruger CM 21E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2463,'EPSG',2463,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 21E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2463"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2463,'EPSG',2463,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 21E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2463"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2464 : Pulkovo 1995 / Gauss-Kruger CM 27E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2464,'EPSG',2464,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 27E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2464"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2464,'EPSG',2464,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 27E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2464"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2465 : Pulkovo 1995 / Gauss-Kruger CM 33E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2465,'EPSG',2465,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 33E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2465"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2465,'EPSG',2465,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 33E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2465"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2466 : Pulkovo 1995 / Gauss-Kruger CM 39E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2466,'EPSG',2466,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 39E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2466"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2466,'EPSG',2466,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 39E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2466"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2467 : Pulkovo 1995 / Gauss-Kruger CM 45E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2467,'EPSG',2467,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 45E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2467"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2467,'EPSG',2467,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 45E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2467"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2468 : Pulkovo 1995 / Gauss-Kruger CM 51E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2468,'EPSG',2468,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 51E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2468"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2468,'EPSG',2468,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 51E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2468"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2469 : Pulkovo 1995 / Gauss-Kruger CM 57E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2469,'EPSG',2469,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 57E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2469"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2469,'EPSG',2469,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 57E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2469"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2470 : Pulkovo 1995 / Gauss-Kruger CM 63E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2470,'EPSG',2470,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 63E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",63],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2470"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2470,'EPSG',2470,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 63E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",63],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2470"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2471 : Pulkovo 1995 / Gauss-Kruger CM 69E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2471,'EPSG',2471,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 69E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",69],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2471"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2471,'EPSG',2471,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 69E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",69],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2471"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2472 : Pulkovo 1995 / Gauss-Kruger CM 75E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2472,'EPSG',2472,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 75E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2472"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2472,'EPSG',2472,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 75E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2472"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2473 : Pulkovo 1995 / Gauss-Kruger CM 81E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2473,'EPSG',2473,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 81E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2473"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2473,'EPSG',2473,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 81E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2473"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2474 : Pulkovo 1995 / Gauss-Kruger CM 87E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2474,'EPSG',2474,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 87E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2474"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2474,'EPSG',2474,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 87E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2474"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2475 : Pulkovo 1995 / Gauss-Kruger CM 93E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2475,'EPSG',2475,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 93E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2475"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2475,'EPSG',2475,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 93E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2475"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2476 : Pulkovo 1995 / Gauss-Kruger CM 99E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2476,'EPSG',2476,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 99E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2476"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2476,'EPSG',2476,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 99E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2476"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2477 : Pulkovo 1995 / Gauss-Kruger CM 105E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2477,'EPSG',2477,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 105E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2477"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2477,'EPSG',2477,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 105E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2477"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2478 : Pulkovo 1995 / Gauss-Kruger CM 111E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2478,'EPSG',2478,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 111E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2478"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2478,'EPSG',2478,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 111E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2478"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2479 : Pulkovo 1995 / Gauss-Kruger CM 117E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2479,'EPSG',2479,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 117E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2479"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2479,'EPSG',2479,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 117E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2479"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2480 : Pulkovo 1995 / Gauss-Kruger CM 123E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2480,'EPSG',2480,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 123E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2480"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2480,'EPSG',2480,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 123E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2480"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2481 : Pulkovo 1995 / Gauss-Kruger CM 129E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2481,'EPSG',2481,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 129E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2481"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2481,'EPSG',2481,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 129E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2481"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2482 : Pulkovo 1995 / Gauss-Kruger CM 135E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2482,'EPSG',2482,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 135E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2482"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2482,'EPSG',2482,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 135E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2482"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2483 : Pulkovo 1995 / Gauss-Kruger CM 141E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2483,'EPSG',2483,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 141E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2483"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2483,'EPSG',2483,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 141E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2483"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2484 : Pulkovo 1995 / Gauss-Kruger CM 147E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2484,'EPSG',2484,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 147E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",147],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2484"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2484,'EPSG',2484,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 147E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",147],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2484"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2485 : Pulkovo 1995 / Gauss-Kruger CM 153E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2485,'EPSG',2485,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 153E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",153],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2485"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2485,'EPSG',2485,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 153E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",153],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2485"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2486 : Pulkovo 1995 / Gauss-Kruger CM 159E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2486,'EPSG',2486,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 159E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",159],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2486"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2486,'EPSG',2486,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 159E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",159],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2486"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2487 : Pulkovo 1995 / Gauss-Kruger CM 165E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2487,'EPSG',2487,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 165E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2487"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2487,'EPSG',2487,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 165E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2487"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2488 : Pulkovo 1995 / Gauss-Kruger CM 171E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2488,'EPSG',2488,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 171E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2488"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2488,'EPSG',2488,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 171E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2488"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2489 : Pulkovo 1995 / Gauss-Kruger CM 177E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2489,'EPSG',2489,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 177E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2489"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2489,'EPSG',2489,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 177E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2489"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2490 : Pulkovo 1995 / Gauss-Kruger CM 177W --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2490,'EPSG',2490,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 177W",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-177],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2490"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2490,'EPSG',2490,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 177W",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-177],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2490"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2491 : Pulkovo 1995 / Gauss-Kruger CM 171W --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2491,'EPSG',2491,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 171W",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-171],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2491"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2491,'EPSG',2491,'PROJCS["Pulkovo 1995 / Gauss-Kruger CM 171W",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-171],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2491"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2492 : Pulkovo 1942 / Gauss-Kruger CM 9E (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2492,'EPSG',2492,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 9E (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2492"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2492,'EPSG',2492,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 9E (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2492"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2493 : Pulkovo 1942 / Gauss-Kruger CM 15E (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2493,'EPSG',2493,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 15E (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2493"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2493,'EPSG',2493,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 15E (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2493"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2494 : Pulkovo 1942 / Gauss-Kruger CM 21E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2494,'EPSG',2494,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 21E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2494"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2494,'EPSG',2494,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 21E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2494"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2495 : Pulkovo 1942 / Gauss-Kruger CM 27E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2495,'EPSG',2495,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 27E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2495"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2495,'EPSG',2495,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 27E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2495"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2496 : Pulkovo 1942 / Gauss-Kruger CM 33E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2496,'EPSG',2496,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 33E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2496"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2496,'EPSG',2496,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 33E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2496"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2497 : Pulkovo 1942 / Gauss-Kruger CM 39E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2497,'EPSG',2497,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 39E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2497"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2497,'EPSG',2497,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 39E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2497"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2498 : Pulkovo 1942 / Gauss-Kruger CM 45E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2498,'EPSG',2498,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 45E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2498"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2498,'EPSG',2498,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 45E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2498"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2499 : Pulkovo 1942 / Gauss-Kruger CM 51E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2499,'EPSG',2499,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 51E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2499"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2499,'EPSG',2499,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 51E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2499"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2500 : Pulkovo 1942 / Gauss-Kruger CM 57E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2500,'EPSG',2500,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 57E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2500"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2500,'EPSG',2500,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 57E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2500"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2501 : Pulkovo 1942 / Gauss-Kruger CM 63E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2501,'EPSG',2501,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 63E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",63],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2501"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2501,'EPSG',2501,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 63E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",63],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2501"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2502 : Pulkovo 1942 / Gauss-Kruger CM 69E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2502,'EPSG',2502,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 69E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",69],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2502"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2502,'EPSG',2502,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 69E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",69],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2502"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2503 : Pulkovo 1942 / Gauss-Kruger CM 75E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2503,'EPSG',2503,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 75E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2503"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2503,'EPSG',2503,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 75E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2503"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2504 : Pulkovo 1942 / Gauss-Kruger CM 81E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2504,'EPSG',2504,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 81E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2504"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2504,'EPSG',2504,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 81E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2504"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2505 : Pulkovo 1942 / Gauss-Kruger CM 87E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2505,'EPSG',2505,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 87E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2505"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2505,'EPSG',2505,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 87E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2505"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2506 : Pulkovo 1942 / Gauss-Kruger CM 93E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2506,'EPSG',2506,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 93E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2506"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2506,'EPSG',2506,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 93E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2506"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2507 : Pulkovo 1942 / Gauss-Kruger CM 99E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2507,'EPSG',2507,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 99E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2507"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2507,'EPSG',2507,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 99E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2507"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2508 : Pulkovo 1942 / Gauss-Kruger CM 105E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2508,'EPSG',2508,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 105E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2508"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2508,'EPSG',2508,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 105E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2508"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2509 : Pulkovo 1942 / Gauss-Kruger CM 111E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2509,'EPSG',2509,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 111E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2509"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2509,'EPSG',2509,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 111E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2509"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2510 : Pulkovo 1942 / Gauss-Kruger CM 117E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2510,'EPSG',2510,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 117E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2510"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2510,'EPSG',2510,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 117E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2510"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2511 : Pulkovo 1942 / Gauss-Kruger CM 123E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2511,'EPSG',2511,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 123E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2511"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2511,'EPSG',2511,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 123E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2511"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2512 : Pulkovo 1942 / Gauss-Kruger CM 129E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2512,'EPSG',2512,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 129E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2512"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2512,'EPSG',2512,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 129E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2512"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2513 : Pulkovo 1942 / Gauss-Kruger CM 135E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2513,'EPSG',2513,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 135E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2513"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2513,'EPSG',2513,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 135E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2513"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2514 : Pulkovo 1942 / Gauss-Kruger CM 141E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2514,'EPSG',2514,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 141E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2514"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2514,'EPSG',2514,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 141E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2514"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2515 : Pulkovo 1942 / Gauss-Kruger CM 147E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2515,'EPSG',2515,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 147E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",147],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2515"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2515,'EPSG',2515,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 147E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",147],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2515"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2516 : Pulkovo 1942 / Gauss-Kruger CM 153E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2516,'EPSG',2516,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 153E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",153],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2516"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2516,'EPSG',2516,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 153E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",153],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2516"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2517 : Pulkovo 1942 / Gauss-Kruger CM 159E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2517,'EPSG',2517,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 159E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",159],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2517"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2517,'EPSG',2517,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 159E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",159],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2517"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2518 : Pulkovo 1942 / Gauss-Kruger CM 165E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2518,'EPSG',2518,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 165E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2518"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2518,'EPSG',2518,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 165E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2518"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2519 : Pulkovo 1942 / Gauss-Kruger CM 171E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2519,'EPSG',2519,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 171E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2519"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2519,'EPSG',2519,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 171E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2519"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2520 : Pulkovo 1942 / Gauss-Kruger CM 177E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2520,'EPSG',2520,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 177E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2520"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2520,'EPSG',2520,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 177E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2520"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2521 : Pulkovo 1942 / Gauss-Kruger CM 177W --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2521,'EPSG',2521,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 177W",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-177],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2521"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2521,'EPSG',2521,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 177W",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-177],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2521"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2522 : Pulkovo 1942 / Gauss-Kruger CM 171W --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2522,'EPSG',2522,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 171W",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-171],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2522"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2522,'EPSG',2522,'PROJCS["Pulkovo 1942 / Gauss-Kruger CM 171W",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-171],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2522"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2523 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 7 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2523,'EPSG',2523,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 7",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",7500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2523"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=7500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2523,'EPSG',2523,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 7",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",7500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2523"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=7500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2524 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 8 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2524,'EPSG',2524,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 8",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",24],PARAMETER["scale_factor",1],PARAMETER["false_easting",8500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2524"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=8500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2524,'EPSG',2524,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 8",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",24],PARAMETER["scale_factor",1],PARAMETER["false_easting",8500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2524"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=8500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2525 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 9 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2525,'EPSG',2525,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 9",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",1],PARAMETER["false_easting",9500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2525"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=9500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2525,'EPSG',2525,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 9",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",1],PARAMETER["false_easting",9500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2525"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=9500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2526 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 10 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2526,'EPSG',2526,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 10",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",30],PARAMETER["scale_factor",1],PARAMETER["false_easting",10500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2526"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=10500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2526,'EPSG',2526,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 10",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",30],PARAMETER["scale_factor",1],PARAMETER["false_easting",10500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2526"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=10500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2527 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 11 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2527,'EPSG',2527,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 11",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",1],PARAMETER["false_easting",11500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2527"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=11500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2527,'EPSG',2527,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 11",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",1],PARAMETER["false_easting",11500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2527"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=11500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2528 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 12 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2528,'EPSG',2528,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 12",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",36],PARAMETER["scale_factor",1],PARAMETER["false_easting",12500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2528"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=36 +k=1 +x_0=12500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2528,'EPSG',2528,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 12",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",36],PARAMETER["scale_factor",1],PARAMETER["false_easting",12500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2528"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=36 +k=1 +x_0=12500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2529 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 13 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2529,'EPSG',2529,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 13",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",1],PARAMETER["false_easting",13500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2529"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=13500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2529,'EPSG',2529,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 13",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",1],PARAMETER["false_easting",13500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2529"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=13500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2530 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 14 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2530,'EPSG',2530,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 14",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",42],PARAMETER["scale_factor",1],PARAMETER["false_easting",14500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2530"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=42 +k=1 +x_0=14500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2530,'EPSG',2530,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 14",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",42],PARAMETER["scale_factor",1],PARAMETER["false_easting",14500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2530"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=42 +k=1 +x_0=14500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2531 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 15 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2531,'EPSG',2531,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 15",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",1],PARAMETER["false_easting",15500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2531"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=15500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2531,'EPSG',2531,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 15",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",1],PARAMETER["false_easting",15500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2531"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=15500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2532 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 16 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2532,'EPSG',2532,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 16",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",48],PARAMETER["scale_factor",1],PARAMETER["false_easting",16500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2532"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=48 +k=1 +x_0=16500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2532,'EPSG',2532,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 16",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",48],PARAMETER["scale_factor",1],PARAMETER["false_easting",16500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2532"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=48 +k=1 +x_0=16500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2533 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 17 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2533,'EPSG',2533,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 17",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",1],PARAMETER["false_easting",17500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2533"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=17500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2533,'EPSG',2533,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 17",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",1],PARAMETER["false_easting",17500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2533"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=17500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2534 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 18 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2534,'EPSG',2534,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 18",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",54],PARAMETER["scale_factor",1],PARAMETER["false_easting",18500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2534"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=54 +k=1 +x_0=18500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2534,'EPSG',2534,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 18",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",54],PARAMETER["scale_factor",1],PARAMETER["false_easting",18500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2534"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=54 +k=1 +x_0=18500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2535 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 19 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2535,'EPSG',2535,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 19",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",1],PARAMETER["false_easting",19500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2535"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=19500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2535,'EPSG',2535,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 19",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",1],PARAMETER["false_easting",19500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2535"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=19500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2536 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 20 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2536,'EPSG',2536,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 20",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",60],PARAMETER["scale_factor",1],PARAMETER["false_easting",20500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2536"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=60 +k=1 +x_0=20500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2536,'EPSG',2536,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 20",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",60],PARAMETER["scale_factor",1],PARAMETER["false_easting",20500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2536"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=60 +k=1 +x_0=20500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2537 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 21 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2537,'EPSG',2537,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 21",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",63],PARAMETER["scale_factor",1],PARAMETER["false_easting",21500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2537"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=21500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2537,'EPSG',2537,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 21",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",63],PARAMETER["scale_factor",1],PARAMETER["false_easting",21500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2537"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=21500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2538 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 22 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2538,'EPSG',2538,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 22",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",66],PARAMETER["scale_factor",1],PARAMETER["false_easting",22500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2538"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=66 +k=1 +x_0=22500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2538,'EPSG',2538,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 22",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",66],PARAMETER["scale_factor",1],PARAMETER["false_easting",22500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2538"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=66 +k=1 +x_0=22500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2539 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 23 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2539,'EPSG',2539,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 23",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",69],PARAMETER["scale_factor",1],PARAMETER["false_easting",23500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2539"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=23500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2539,'EPSG',2539,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 23",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",69],PARAMETER["scale_factor",1],PARAMETER["false_easting",23500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2539"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=23500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2540 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 24 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2540,'EPSG',2540,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 24",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",72],PARAMETER["scale_factor",1],PARAMETER["false_easting",24500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2540"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=72 +k=1 +x_0=24500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2540,'EPSG',2540,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 24",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",72],PARAMETER["scale_factor",1],PARAMETER["false_easting",24500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2540"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=72 +k=1 +x_0=24500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2541 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 25 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2541,'EPSG',2541,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 25",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",25500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2541"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=25500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2541,'EPSG',2541,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 25",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",25500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2541"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=25500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2542 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 26 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2542,'EPSG',2542,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 26",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",78],PARAMETER["scale_factor",1],PARAMETER["false_easting",26500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2542"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=26500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2542,'EPSG',2542,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 26",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",78],PARAMETER["scale_factor",1],PARAMETER["false_easting",26500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2542"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=26500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2543 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 27 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2543,'EPSG',2543,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 27",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",27500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2543"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=27500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2543,'EPSG',2543,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 27",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",27500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2543"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=27500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2544 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 28 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2544,'EPSG',2544,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 28",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",84],PARAMETER["scale_factor",1],PARAMETER["false_easting",28500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2544"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=28500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2544,'EPSG',2544,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 28",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",84],PARAMETER["scale_factor",1],PARAMETER["false_easting",28500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2544"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=28500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2545 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 29 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2545,'EPSG',2545,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 29",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",29500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2545"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=29500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2545,'EPSG',2545,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 29",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",29500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2545"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=29500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2546 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 30 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2546,'EPSG',2546,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 30",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",90],PARAMETER["scale_factor",1],PARAMETER["false_easting",30500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2546"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=30500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2546,'EPSG',2546,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 30",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",90],PARAMETER["scale_factor",1],PARAMETER["false_easting",30500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2546"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=30500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2547 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 31 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2547,'EPSG',2547,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 31",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",31500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2547"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=31500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2547,'EPSG',2547,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 31",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",31500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2547"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=31500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2548 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 32 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2548,'EPSG',2548,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 32",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",96],PARAMETER["scale_factor",1],PARAMETER["false_easting",32500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2548"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=32500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2548,'EPSG',2548,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 32",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",96],PARAMETER["scale_factor",1],PARAMETER["false_easting",32500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2548"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=32500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2549 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 33 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2549,'EPSG',2549,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 33",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",33500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2549"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=33500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2549,'EPSG',2549,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 33",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",33500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2549"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=33500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2550 : Samboja / UTM zone 50S (deprecated) --- @@ -3890,1651 +4022,1651 @@ --- --- EPSG 2551 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 34 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2551,'EPSG',2551,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 34",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",102],PARAMETER["scale_factor",1],PARAMETER["false_easting",34500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2551"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=34500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2551,'EPSG',2551,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 34",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",102],PARAMETER["scale_factor",1],PARAMETER["false_easting",34500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2551"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=34500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2552 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 35 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2552,'EPSG',2552,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 35",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",35500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2552"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=35500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2552,'EPSG',2552,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 35",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",35500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2552"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=35500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2553 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 36 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2553,'EPSG',2553,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 36",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",108],PARAMETER["scale_factor",1],PARAMETER["false_easting",36500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2553"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=36500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2553,'EPSG',2553,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 36",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",108],PARAMETER["scale_factor",1],PARAMETER["false_easting",36500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2553"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=36500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2554 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 37 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2554,'EPSG',2554,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 37",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",37500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2554"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=37500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2554,'EPSG',2554,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 37",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",37500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2554"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=37500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2555 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 38 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2555,'EPSG',2555,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 38",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",114],PARAMETER["scale_factor",1],PARAMETER["false_easting",38500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2555"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=38500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2555,'EPSG',2555,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 38",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",114],PARAMETER["scale_factor",1],PARAMETER["false_easting",38500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2555"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=38500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2556 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 39 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2556,'EPSG',2556,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 39",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",39500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2556"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=39500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2556,'EPSG',2556,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 39",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",39500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2556"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=39500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2557 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 40 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2557,'EPSG',2557,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 40",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",120],PARAMETER["scale_factor",1],PARAMETER["false_easting",40500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2557"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=40500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2557,'EPSG',2557,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 40",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",120],PARAMETER["scale_factor",1],PARAMETER["false_easting",40500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2557"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=40500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2558 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 41 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2558,'EPSG',2558,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 41",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",41500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2558"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=41500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2558,'EPSG',2558,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 41",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",41500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2558"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=41500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2559 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 42 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2559,'EPSG',2559,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 42",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",126],PARAMETER["scale_factor",1],PARAMETER["false_easting",42500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2559"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=126 +k=1 +x_0=42500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2559,'EPSG',2559,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 42",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",126],PARAMETER["scale_factor",1],PARAMETER["false_easting",42500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2559"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=126 +k=1 +x_0=42500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2560 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 43 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2560,'EPSG',2560,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 43",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",43500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2560"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=43500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2560,'EPSG',2560,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 43",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",43500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2560"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=43500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2561 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 44 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2561,'EPSG',2561,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 44",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",132],PARAMETER["scale_factor",1],PARAMETER["false_easting",44500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2561"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=132 +k=1 +x_0=44500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2561,'EPSG',2561,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 44",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",132],PARAMETER["scale_factor",1],PARAMETER["false_easting",44500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2561"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=132 +k=1 +x_0=44500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2562 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 45 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2562,'EPSG',2562,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 45",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",45500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2562"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=45500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2562,'EPSG',2562,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 45",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",45500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2562"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=45500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2563 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 46 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2563,'EPSG',2563,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 46",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",138],PARAMETER["scale_factor",1],PARAMETER["false_easting",46500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2563"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=138 +k=1 +x_0=46500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2563,'EPSG',2563,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 46",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",138],PARAMETER["scale_factor",1],PARAMETER["false_easting",46500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2563"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=138 +k=1 +x_0=46500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2564 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 47 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2564,'EPSG',2564,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 47",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",1],PARAMETER["false_easting",47500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2564"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=47500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2564,'EPSG',2564,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 47",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",1],PARAMETER["false_easting",47500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2564"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=47500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2565 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 48 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2565,'EPSG',2565,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 48",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",144],PARAMETER["scale_factor",1],PARAMETER["false_easting",48500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2565"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=144 +k=1 +x_0=48500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2565,'EPSG',2565,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 48",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",144],PARAMETER["scale_factor",1],PARAMETER["false_easting",48500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2565"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=144 +k=1 +x_0=48500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2566 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 49 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2566,'EPSG',2566,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 49",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",147],PARAMETER["scale_factor",1],PARAMETER["false_easting",49500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2566"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=49500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2566,'EPSG',2566,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 49",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",147],PARAMETER["scale_factor",1],PARAMETER["false_easting",49500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2566"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=49500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2567 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 50 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2567,'EPSG',2567,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 50",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",150],PARAMETER["scale_factor",1],PARAMETER["false_easting",50500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2567"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=150 +k=1 +x_0=50500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2567,'EPSG',2567,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 50",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",150],PARAMETER["scale_factor",1],PARAMETER["false_easting",50500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2567"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=150 +k=1 +x_0=50500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2568 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 51 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2568,'EPSG',2568,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 51",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",153],PARAMETER["scale_factor",1],PARAMETER["false_easting",51500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2568"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=51500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2568,'EPSG',2568,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 51",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",153],PARAMETER["scale_factor",1],PARAMETER["false_easting",51500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2568"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=51500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2569 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 52 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2569,'EPSG',2569,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 52",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",156],PARAMETER["scale_factor",1],PARAMETER["false_easting",52500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2569"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=156 +k=1 +x_0=52500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2569,'EPSG',2569,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 52",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",156],PARAMETER["scale_factor",1],PARAMETER["false_easting",52500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2569"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=156 +k=1 +x_0=52500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2570 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 53 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2570,'EPSG',2570,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 53",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",159],PARAMETER["scale_factor",1],PARAMETER["false_easting",53500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2570"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=53500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2570,'EPSG',2570,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 53",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",159],PARAMETER["scale_factor",1],PARAMETER["false_easting",53500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2570"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=53500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2571 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 54 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2571,'EPSG',2571,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 54",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",162],PARAMETER["scale_factor",1],PARAMETER["false_easting",54500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2571"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=162 +k=1 +x_0=54500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2571,'EPSG',2571,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 54",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",162],PARAMETER["scale_factor",1],PARAMETER["false_easting",54500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2571"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=162 +k=1 +x_0=54500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2572 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 55 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2572,'EPSG',2572,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 55",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",1],PARAMETER["false_easting",55500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2572"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=55500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2572,'EPSG',2572,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 55",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",1],PARAMETER["false_easting",55500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2572"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=55500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2573 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 56 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2573,'EPSG',2573,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 56",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",168],PARAMETER["scale_factor",1],PARAMETER["false_easting",56500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2573"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=168 +k=1 +x_0=56500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2573,'EPSG',2573,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 56",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",168],PARAMETER["scale_factor",1],PARAMETER["false_easting",56500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2573"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=168 +k=1 +x_0=56500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2574 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 57 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2574,'EPSG',2574,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 57",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",1],PARAMETER["false_easting",57500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2574"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=57500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2574,'EPSG',2574,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 57",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",1],PARAMETER["false_easting",57500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2574"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=57500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2575 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 58 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2575,'EPSG',2575,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 58",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",174],PARAMETER["scale_factor",1],PARAMETER["false_easting",58500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2575"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=174 +k=1 +x_0=58500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2575,'EPSG',2575,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 58",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",174],PARAMETER["scale_factor",1],PARAMETER["false_easting",58500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2575"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=174 +k=1 +x_0=58500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2576 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 59 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2576,'EPSG',2576,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 59",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",1],PARAMETER["false_easting",59500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2576"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=59500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2576,'EPSG',2576,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 59",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",1],PARAMETER["false_easting",59500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2576"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=59500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2577 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 60 (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2577,'EPSG',2577,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 60 (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",180],PARAMETER["scale_factor",1],PARAMETER["false_easting",60000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2577"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=180 +k=1 +x_0=60000000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2577,'EPSG',2577,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 60 (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",180],PARAMETER["scale_factor",1],PARAMETER["false_easting",60000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2577"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=180 +k=1 +x_0=60000000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2578 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 61 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2578,'EPSG',2578,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 61",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-177],PARAMETER["scale_factor",1],PARAMETER["false_easting",61500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2578"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=61500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2578,'EPSG',2578,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 61",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-177],PARAMETER["scale_factor",1],PARAMETER["false_easting",61500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2578"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=61500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2579 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 62 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2579,'EPSG',2579,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 62",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-174],PARAMETER["scale_factor",1],PARAMETER["false_easting",62500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2579"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-174 +k=1 +x_0=62500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2579,'EPSG',2579,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 62",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-174],PARAMETER["scale_factor",1],PARAMETER["false_easting",62500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2579"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=-174 +k=1 +x_0=62500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2580 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 63 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2580,'EPSG',2580,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 63",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-171],PARAMETER["scale_factor",1],PARAMETER["false_easting",63500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2580"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=63500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2580,'EPSG',2580,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 63",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-171],PARAMETER["scale_factor",1],PARAMETER["false_easting",63500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2580"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=63500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2581 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 64 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2581,'EPSG',2581,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 64",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-168],PARAMETER["scale_factor",1],PARAMETER["false_easting",64500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2581"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-168 +k=1 +x_0=64500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2581,'EPSG',2581,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 64",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-168],PARAMETER["scale_factor",1],PARAMETER["false_easting",64500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2581"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=-168 +k=1 +x_0=64500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2582 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 21E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2582,'EPSG',2582,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 21E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2582"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2582,'EPSG',2582,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 21E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2582"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2583 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 24E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2583,'EPSG',2583,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 24E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",24],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2583"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2583,'EPSG',2583,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 24E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",24],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2583"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2584 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 27E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2584,'EPSG',2584,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 27E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2584"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2584,'EPSG',2584,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 27E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2584"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2585 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 30E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2585,'EPSG',2585,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 30E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",30],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2585"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2585,'EPSG',2585,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 30E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",30],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2585"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2586 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 33E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2586,'EPSG',2586,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 33E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2586"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2586,'EPSG',2586,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 33E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2586"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2587 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 36E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2587,'EPSG',2587,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 36E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",36],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2587"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=36 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2587,'EPSG',2587,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 36E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",36],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2587"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=36 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2588 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 39E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2588,'EPSG',2588,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 39E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2588"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2588,'EPSG',2588,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 39E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2588"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2589 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 42E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2589,'EPSG',2589,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 42E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",42],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2589"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=42 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2589,'EPSG',2589,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 42E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",42],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2589"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=42 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2590 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 45E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2590,'EPSG',2590,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 45E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2590"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2590,'EPSG',2590,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 45E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2590"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2591 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 48E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2591,'EPSG',2591,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 48E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",48],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2591"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=48 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2591,'EPSG',2591,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 48E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",48],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2591"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=48 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2592 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 51E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2592,'EPSG',2592,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 51E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2592"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2592,'EPSG',2592,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 51E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2592"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2593 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 54E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2593,'EPSG',2593,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 54E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",54],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2593"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=54 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2593,'EPSG',2593,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 54E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",54],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2593"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=54 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2594 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 57E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2594,'EPSG',2594,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 57E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2594"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2594,'EPSG',2594,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 57E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2594"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2595 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 60E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2595,'EPSG',2595,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 60E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",60],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2595"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=60 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2595,'EPSG',2595,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 60E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",60],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2595"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=60 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2596 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 63E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2596,'EPSG',2596,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 63E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",63],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2596"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2596,'EPSG',2596,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 63E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",63],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2596"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2597 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 66E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2597,'EPSG',2597,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 66E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",66],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2597"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=66 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2597,'EPSG',2597,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 66E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",66],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2597"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=66 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2598 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 69E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2598,'EPSG',2598,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 69E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",69],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2598"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2598,'EPSG',2598,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 69E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",69],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2598"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2599 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 72E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2599,'EPSG',2599,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 72E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",72],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2599"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=72 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2599,'EPSG',2599,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 72E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",72],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2599"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=72 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2600 : Lietuvos Koordinoei Sistema 1994 (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2600,'EPSG',2600,'PROJCS["Lietuvos Koordinoei Sistema 1994 (deprecated)",GEOGCS["LKS94",DATUM["Lithuania_1994_ETRS89",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6126"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4669"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",24],PARAMETER["scale_factor",0.9998],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2600"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9998 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2600,'EPSG',2600,'PROJCS["Lietuvos Koordinoei Sistema 1994 (deprecated)",GEOGCS["LKS94",DATUM["Lithuania_1994_ETRS89",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6126"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4669"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",24],PARAMETER["scale_factor",0.9998],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2600"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9998 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2601 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 75E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2601,'EPSG',2601,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 75E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2601"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2601,'EPSG',2601,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 75E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2601"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2602 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 78E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2602,'EPSG',2602,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 78E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",78],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2602"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2602,'EPSG',2602,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 78E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",78],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2602"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2603 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 81E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2603,'EPSG',2603,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 81E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2603"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2603,'EPSG',2603,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 81E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2603"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2604 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 84E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2604,'EPSG',2604,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 84E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",84],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2604"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2604,'EPSG',2604,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 84E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",84],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2604"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2605 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 87E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2605,'EPSG',2605,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 87E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2605"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2605,'EPSG',2605,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 87E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2605"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2606 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 90E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2606,'EPSG',2606,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 90E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",90],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2606"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2606,'EPSG',2606,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 90E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",90],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2606"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2607 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 93E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2607,'EPSG',2607,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 93E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2607"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2607,'EPSG',2607,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 93E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2607"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2608 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 96E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2608,'EPSG',2608,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 96E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",96],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2608"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2608,'EPSG',2608,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 96E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",96],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2608"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2609 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 99E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2609,'EPSG',2609,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 99E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2609"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2609,'EPSG',2609,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 99E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2609"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2610 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 102E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2610,'EPSG',2610,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 102E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",102],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2610"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2610,'EPSG',2610,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 102E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",102],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2610"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2611 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 105E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2611,'EPSG',2611,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 105E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2611"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2611,'EPSG',2611,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 105E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2611"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2612 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 108E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2612,'EPSG',2612,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 108E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",108],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2612"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2612,'EPSG',2612,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 108E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",108],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2612"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2613 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 111E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2613,'EPSG',2613,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 111E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2613"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2613,'EPSG',2613,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 111E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2613"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2614 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 114E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2614,'EPSG',2614,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 114E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",114],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2614"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2614,'EPSG',2614,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 114E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",114],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2614"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2615 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 117E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2615,'EPSG',2615,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 117E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2615"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2615,'EPSG',2615,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 117E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2615"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2616 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 120E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2616,'EPSG',2616,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 120E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",120],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2616"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2616,'EPSG',2616,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 120E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",120],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2616"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2617 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 123E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2617,'EPSG',2617,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 123E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2617"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2617,'EPSG',2617,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 123E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2617"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2618 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 126E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2618,'EPSG',2618,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 126E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",126],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2618"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=126 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2618,'EPSG',2618,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 126E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",126],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2618"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=126 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2619 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 129E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2619,'EPSG',2619,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 129E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2619"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2619,'EPSG',2619,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 129E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2619"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2620 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 132E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2620,'EPSG',2620,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 132E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",132],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2620"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=132 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2620,'EPSG',2620,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 132E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",132],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2620"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=132 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2621 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 135E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2621,'EPSG',2621,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 135E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2621"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2621,'EPSG',2621,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 135E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2621"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2622 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 138E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2622,'EPSG',2622,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 138E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",138],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2622"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=138 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2622,'EPSG',2622,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 138E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",138],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2622"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=138 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2623 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 141E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2623,'EPSG',2623,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 141E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2623"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2623,'EPSG',2623,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 141E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2623"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2624 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 144E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2624,'EPSG',2624,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 144E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",144],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2624"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=144 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2624,'EPSG',2624,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 144E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",144],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2624"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=144 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2625 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 147E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2625,'EPSG',2625,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 147E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",147],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2625"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2625,'EPSG',2625,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 147E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",147],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2625"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2626 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 150E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2626,'EPSG',2626,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 150E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",150],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2626"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=150 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2626,'EPSG',2626,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 150E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",150],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2626"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=150 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2627 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 153E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2627,'EPSG',2627,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 153E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",153],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2627"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2627,'EPSG',2627,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 153E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",153],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2627"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2628 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 156E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2628,'EPSG',2628,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 156E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",156],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2628"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=156 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2628,'EPSG',2628,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 156E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",156],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2628"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=156 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2629 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 159E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2629,'EPSG',2629,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 159E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",159],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2629"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2629,'EPSG',2629,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 159E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",159],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2629"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2630 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 162E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2630,'EPSG',2630,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 162E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",162],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2630"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=162 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2630,'EPSG',2630,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 162E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",162],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2630"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=162 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2631 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 165E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2631,'EPSG',2631,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 165E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2631"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2631,'EPSG',2631,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 165E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2631"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2632 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 168E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2632,'EPSG',2632,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 168E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",168],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2632"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=168 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2632,'EPSG',2632,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 168E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",168],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2632"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=168 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2633 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 171E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2633,'EPSG',2633,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 171E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2633"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2633,'EPSG',2633,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 171E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2633"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2634 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 174E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2634,'EPSG',2634,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 174E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",174],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2634"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=174 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2634,'EPSG',2634,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 174E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",174],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2634"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=174 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2635 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 177E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2635,'EPSG',2635,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 177E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2635"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2635,'EPSG',2635,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 177E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2635"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2636 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 180E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2636,'EPSG',2636,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 180E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",180],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2636"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=180 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2636,'EPSG',2636,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 180E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",180],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2636"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=180 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2637 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 177W --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2637,'EPSG',2637,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 177W",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-177],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2637"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2637,'EPSG',2637,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 177W",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-177],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2637"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2638 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 174W --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2638,'EPSG',2638,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 174W",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-174],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2638"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-174 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2638,'EPSG',2638,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 174W",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-174],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2638"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=-174 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2639 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 171W --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2639,'EPSG',2639,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 171W",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-171],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2639"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2639,'EPSG',2639,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 171W",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-171],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2639"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2640 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 168W --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2640,'EPSG',2640,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 168W",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-168],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2640"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-168 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2640,'EPSG',2640,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 168W",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-168],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2640"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=-168 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2641 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 7 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2641,'EPSG',2641,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 7",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",7500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2641"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=7500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2641,'EPSG',2641,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 7",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",7500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2641"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=7500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2642 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 8 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2642,'EPSG',2642,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 8",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",24],PARAMETER["scale_factor",1],PARAMETER["false_easting",8500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2642"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=8500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2642,'EPSG',2642,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 8",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",24],PARAMETER["scale_factor",1],PARAMETER["false_easting",8500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2642"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=8500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2643 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 9 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2643,'EPSG',2643,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 9",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",1],PARAMETER["false_easting",9500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2643"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=9500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2643,'EPSG',2643,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 9",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",1],PARAMETER["false_easting",9500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2643"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=9500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2644 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 10 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2644,'EPSG',2644,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 10",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",30],PARAMETER["scale_factor",1],PARAMETER["false_easting",10500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2644"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=10500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2644,'EPSG',2644,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 10",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",30],PARAMETER["scale_factor",1],PARAMETER["false_easting",10500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2644"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=10500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2645 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 11 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2645,'EPSG',2645,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 11",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",1],PARAMETER["false_easting",11500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2645"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=11500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2645,'EPSG',2645,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 11",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",1],PARAMETER["false_easting",11500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2645"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=11500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2646 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 12 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2646,'EPSG',2646,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 12",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",36],PARAMETER["scale_factor",1],PARAMETER["false_easting",12500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2646"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=36 +k=1 +x_0=12500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2646,'EPSG',2646,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 12",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",36],PARAMETER["scale_factor",1],PARAMETER["false_easting",12500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2646"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=36 +k=1 +x_0=12500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2647 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 13 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2647,'EPSG',2647,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 13",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",1],PARAMETER["false_easting",13500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2647"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=13500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2647,'EPSG',2647,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 13",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",1],PARAMETER["false_easting",13500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2647"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=13500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2648 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 14 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2648,'EPSG',2648,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 14",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",42],PARAMETER["scale_factor",1],PARAMETER["false_easting",14500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2648"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=42 +k=1 +x_0=14500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2648,'EPSG',2648,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 14",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",42],PARAMETER["scale_factor",1],PARAMETER["false_easting",14500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2648"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=42 +k=1 +x_0=14500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2649 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 15 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2649,'EPSG',2649,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 15",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",1],PARAMETER["false_easting",15500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2649"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=15500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2649,'EPSG',2649,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 15",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",1],PARAMETER["false_easting",15500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2649"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=15500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2650 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 16 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2650,'EPSG',2650,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 16",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",48],PARAMETER["scale_factor",1],PARAMETER["false_easting",16500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2650"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=48 +k=1 +x_0=16500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2650,'EPSG',2650,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 16",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",48],PARAMETER["scale_factor",1],PARAMETER["false_easting",16500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2650"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=48 +k=1 +x_0=16500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2651 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 17 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2651,'EPSG',2651,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 17",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",1],PARAMETER["false_easting",17500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2651"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=17500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2651,'EPSG',2651,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 17",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",1],PARAMETER["false_easting",17500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2651"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=17500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2652 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 18 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2652,'EPSG',2652,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 18",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",54],PARAMETER["scale_factor",1],PARAMETER["false_easting",18500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2652"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=54 +k=1 +x_0=18500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2652,'EPSG',2652,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 18",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",54],PARAMETER["scale_factor",1],PARAMETER["false_easting",18500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2652"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=54 +k=1 +x_0=18500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2653 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 19 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2653,'EPSG',2653,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 19",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",1],PARAMETER["false_easting",19500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2653"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=19500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2653,'EPSG',2653,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 19",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",1],PARAMETER["false_easting",19500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2653"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=19500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2654 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 20 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2654,'EPSG',2654,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 20",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",60],PARAMETER["scale_factor",1],PARAMETER["false_easting",20500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2654"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=60 +k=1 +x_0=20500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2654,'EPSG',2654,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 20",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",60],PARAMETER["scale_factor",1],PARAMETER["false_easting",20500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2654"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=60 +k=1 +x_0=20500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2655 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 21 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2655,'EPSG',2655,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 21",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",63],PARAMETER["scale_factor",1],PARAMETER["false_easting",21500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2655"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=21500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2655,'EPSG',2655,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 21",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",63],PARAMETER["scale_factor",1],PARAMETER["false_easting",21500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2655"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=21500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2656 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 22 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2656,'EPSG',2656,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 22",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",66],PARAMETER["scale_factor",1],PARAMETER["false_easting",22500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2656"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=66 +k=1 +x_0=22500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2656,'EPSG',2656,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 22",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",66],PARAMETER["scale_factor",1],PARAMETER["false_easting",22500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2656"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=66 +k=1 +x_0=22500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2657 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 23 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2657,'EPSG',2657,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 23",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",69],PARAMETER["scale_factor",1],PARAMETER["false_easting",23500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2657"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=23500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2657,'EPSG',2657,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 23",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",69],PARAMETER["scale_factor",1],PARAMETER["false_easting",23500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2657"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=23500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2658 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 24 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2658,'EPSG',2658,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 24",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",72],PARAMETER["scale_factor",1],PARAMETER["false_easting",24500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2658"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=72 +k=1 +x_0=24500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2658,'EPSG',2658,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 24",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",72],PARAMETER["scale_factor",1],PARAMETER["false_easting",24500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2658"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=72 +k=1 +x_0=24500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2659 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 25 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2659,'EPSG',2659,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 25",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",25500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2659"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=25500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2659,'EPSG',2659,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 25",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",25500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2659"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=25500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2660 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 26 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2660,'EPSG',2660,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 26",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",78],PARAMETER["scale_factor",1],PARAMETER["false_easting",26500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2660"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=26500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2660,'EPSG',2660,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 26",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",78],PARAMETER["scale_factor",1],PARAMETER["false_easting",26500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2660"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=26500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2661 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 27 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2661,'EPSG',2661,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 27",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",27500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2661"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=27500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2661,'EPSG',2661,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 27",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",27500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2661"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=27500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2662 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 28 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2662,'EPSG',2662,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 28",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",84],PARAMETER["scale_factor",1],PARAMETER["false_easting",28500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2662"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=28500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2662,'EPSG',2662,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 28",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",84],PARAMETER["scale_factor",1],PARAMETER["false_easting",28500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2662"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=28500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2663 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 29 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2663,'EPSG',2663,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 29",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",29500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2663"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=29500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2663,'EPSG',2663,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 29",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",29500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2663"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=29500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2664 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 30 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2664,'EPSG',2664,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 30",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",90],PARAMETER["scale_factor",1],PARAMETER["false_easting",30500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2664"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=30500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2664,'EPSG',2664,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 30",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",90],PARAMETER["scale_factor",1],PARAMETER["false_easting",30500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2664"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=30500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2665 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 31 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2665,'EPSG',2665,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 31",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",31500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2665"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=31500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2665,'EPSG',2665,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 31",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",31500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2665"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=31500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2666 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 32 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2666,'EPSG',2666,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 32",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",96],PARAMETER["scale_factor",1],PARAMETER["false_easting",32500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2666"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=32500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2666,'EPSG',2666,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 32",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",96],PARAMETER["scale_factor",1],PARAMETER["false_easting",32500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2666"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=32500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2667 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 33 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2667,'EPSG',2667,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 33",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",33500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2667"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=33500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2667,'EPSG',2667,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 33",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",33500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2667"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=33500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2668 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 34 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2668,'EPSG',2668,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 34",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",102],PARAMETER["scale_factor",1],PARAMETER["false_easting",34500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2668"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=34500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2668,'EPSG',2668,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 34",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",102],PARAMETER["scale_factor",1],PARAMETER["false_easting",34500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2668"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=34500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2669 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 35 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2669,'EPSG',2669,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 35",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",35500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2669"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=35500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2669,'EPSG',2669,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 35",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",35500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2669"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=35500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2670 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 36 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2670,'EPSG',2670,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 36",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",108],PARAMETER["scale_factor",1],PARAMETER["false_easting",36500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2670"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=36500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2670,'EPSG',2670,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 36",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",108],PARAMETER["scale_factor",1],PARAMETER["false_easting",36500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2670"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=36500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2671 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 37 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2671,'EPSG',2671,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 37",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",37500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2671"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=37500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2671,'EPSG',2671,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 37",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",37500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2671"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=37500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2672 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 38 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2672,'EPSG',2672,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 38",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",114],PARAMETER["scale_factor",1],PARAMETER["false_easting",38500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2672"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=38500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2672,'EPSG',2672,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 38",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",114],PARAMETER["scale_factor",1],PARAMETER["false_easting",38500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2672"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=38500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2673 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 39 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2673,'EPSG',2673,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 39",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",39500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2673"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=39500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2673,'EPSG',2673,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 39",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",39500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2673"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=39500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2674 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 40 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2674,'EPSG',2674,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 40",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",120],PARAMETER["scale_factor",1],PARAMETER["false_easting",40500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2674"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=40500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2674,'EPSG',2674,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 40",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",120],PARAMETER["scale_factor",1],PARAMETER["false_easting",40500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2674"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=40500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2675 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 41 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2675,'EPSG',2675,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 41",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",41500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2675"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=41500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2675,'EPSG',2675,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 41",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",41500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2675"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=41500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2676 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 42 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2676,'EPSG',2676,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 42",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",126],PARAMETER["scale_factor",1],PARAMETER["false_easting",42500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2676"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=126 +k=1 +x_0=42500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2676,'EPSG',2676,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 42",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",126],PARAMETER["scale_factor",1],PARAMETER["false_easting",42500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2676"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=126 +k=1 +x_0=42500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2677 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 43 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2677,'EPSG',2677,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 43",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",43500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2677"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=43500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2677,'EPSG',2677,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 43",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",43500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2677"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=43500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2678 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 44 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2678,'EPSG',2678,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 44",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",132],PARAMETER["scale_factor",1],PARAMETER["false_easting",44500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2678"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=132 +k=1 +x_0=44500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2678,'EPSG',2678,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 44",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",132],PARAMETER["scale_factor",1],PARAMETER["false_easting",44500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2678"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=132 +k=1 +x_0=44500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2679 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 45 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2679,'EPSG',2679,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 45",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",45500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2679"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=45500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2679,'EPSG',2679,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 45",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",45500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2679"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=45500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2680 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 46 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2680,'EPSG',2680,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 46",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",138],PARAMETER["scale_factor",1],PARAMETER["false_easting",46500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2680"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=138 +k=1 +x_0=46500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2680,'EPSG',2680,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 46",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",138],PARAMETER["scale_factor",1],PARAMETER["false_easting",46500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2680"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=138 +k=1 +x_0=46500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2681 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 47 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2681,'EPSG',2681,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 47",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",1],PARAMETER["false_easting",47500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2681"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=47500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2681,'EPSG',2681,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 47",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",1],PARAMETER["false_easting",47500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2681"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=47500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2682 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 48 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2682,'EPSG',2682,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 48",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",144],PARAMETER["scale_factor",1],PARAMETER["false_easting",48500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2682"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=144 +k=1 +x_0=48500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2682,'EPSG',2682,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 48",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",144],PARAMETER["scale_factor",1],PARAMETER["false_easting",48500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2682"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=144 +k=1 +x_0=48500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2683 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 49 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2683,'EPSG',2683,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 49",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",147],PARAMETER["scale_factor",1],PARAMETER["false_easting",49500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2683"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=49500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2683,'EPSG',2683,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 49",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",147],PARAMETER["scale_factor",1],PARAMETER["false_easting",49500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2683"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=49500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2684 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 50 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2684,'EPSG',2684,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 50",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",150],PARAMETER["scale_factor",1],PARAMETER["false_easting",50500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2684"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=150 +k=1 +x_0=50500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2684,'EPSG',2684,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 50",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",150],PARAMETER["scale_factor",1],PARAMETER["false_easting",50500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2684"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=150 +k=1 +x_0=50500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2685 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 51 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2685,'EPSG',2685,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 51",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",153],PARAMETER["scale_factor",1],PARAMETER["false_easting",51500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2685"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=51500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2685,'EPSG',2685,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 51",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",153],PARAMETER["scale_factor",1],PARAMETER["false_easting",51500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2685"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=51500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2686 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 52 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2686,'EPSG',2686,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 52",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",156],PARAMETER["scale_factor",1],PARAMETER["false_easting",52500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2686"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=156 +k=1 +x_0=52500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2686,'EPSG',2686,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 52",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",156],PARAMETER["scale_factor",1],PARAMETER["false_easting",52500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2686"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=156 +k=1 +x_0=52500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2687 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 53 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2687,'EPSG',2687,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 53",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",159],PARAMETER["scale_factor",1],PARAMETER["false_easting",53500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2687"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=53500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2687,'EPSG',2687,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 53",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",159],PARAMETER["scale_factor",1],PARAMETER["false_easting",53500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2687"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=53500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2688 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 54 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2688,'EPSG',2688,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 54",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",162],PARAMETER["scale_factor",1],PARAMETER["false_easting",54500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2688"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=162 +k=1 +x_0=54500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2688,'EPSG',2688,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 54",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",162],PARAMETER["scale_factor",1],PARAMETER["false_easting",54500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2688"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=162 +k=1 +x_0=54500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2689 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 55 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2689,'EPSG',2689,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 55",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",1],PARAMETER["false_easting",55500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2689"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=55500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2689,'EPSG',2689,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 55",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",1],PARAMETER["false_easting",55500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2689"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=55500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2690 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 56 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2690,'EPSG',2690,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 56",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",168],PARAMETER["scale_factor",1],PARAMETER["false_easting",56500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2690"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=168 +k=1 +x_0=56500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2690,'EPSG',2690,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 56",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",168],PARAMETER["scale_factor",1],PARAMETER["false_easting",56500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2690"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=168 +k=1 +x_0=56500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2691 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 57 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2691,'EPSG',2691,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 57",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",1],PARAMETER["false_easting",57500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2691"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=57500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2691,'EPSG',2691,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 57",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",1],PARAMETER["false_easting",57500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2691"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=57500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2692 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 58 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2692,'EPSG',2692,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 58",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",174],PARAMETER["scale_factor",1],PARAMETER["false_easting",58500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2692"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=174 +k=1 +x_0=58500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2692,'EPSG',2692,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 58",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",174],PARAMETER["scale_factor",1],PARAMETER["false_easting",58500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2692"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=174 +k=1 +x_0=58500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2693 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 59 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2693,'EPSG',2693,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 59",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",1],PARAMETER["false_easting",59500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2693"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=59500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2693,'EPSG',2693,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 59",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",1],PARAMETER["false_easting",59500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2693"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=59500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2694 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 60 (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2694,'EPSG',2694,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 60 (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",180],PARAMETER["scale_factor",1],PARAMETER["false_easting",60000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2694"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=180 +k=1 +x_0=60000000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2694,'EPSG',2694,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 60 (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",180],PARAMETER["scale_factor",1],PARAMETER["false_easting",60000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2694"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=180 +k=1 +x_0=60000000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2695 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 61 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2695,'EPSG',2695,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 61",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-177],PARAMETER["scale_factor",1],PARAMETER["false_easting",61500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2695"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=61500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2695,'EPSG',2695,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 61",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-177],PARAMETER["scale_factor",1],PARAMETER["false_easting",61500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2695"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=61500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2696 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 62 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2696,'EPSG',2696,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 62",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-174],PARAMETER["scale_factor",1],PARAMETER["false_easting",62500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2696"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-174 +k=1 +x_0=62500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2696,'EPSG',2696,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 62",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-174],PARAMETER["scale_factor",1],PARAMETER["false_easting",62500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2696"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=-174 +k=1 +x_0=62500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2697 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 63 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2697,'EPSG',2697,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 63",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-171],PARAMETER["scale_factor",1],PARAMETER["false_easting",63500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2697"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=63500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2697,'EPSG',2697,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 63",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-171],PARAMETER["scale_factor",1],PARAMETER["false_easting",63500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2697"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=63500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2698 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 64 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2698,'EPSG',2698,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 64",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-168],PARAMETER["scale_factor",1],PARAMETER["false_easting",64500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2698"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-168 +k=1 +x_0=64500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2698,'EPSG',2698,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 64",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-168],PARAMETER["scale_factor",1],PARAMETER["false_easting",64500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2698"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=-168 +k=1 +x_0=64500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2699 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 21E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2699,'EPSG',2699,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 21E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2699"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2699,'EPSG',2699,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 21E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2699"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2700 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 24E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2700,'EPSG',2700,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 24E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",24],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2700"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2700,'EPSG',2700,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 24E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",24],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2700"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2701 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 27E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2701,'EPSG',2701,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 27E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2701"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2701,'EPSG',2701,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 27E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2701"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2702 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 30E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2702,'EPSG',2702,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 30E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",30],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2702"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2702,'EPSG',2702,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 30E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",30],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2702"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2703 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 33E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2703,'EPSG',2703,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 33E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2703"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2703,'EPSG',2703,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 33E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2703"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2704 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 36E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2704,'EPSG',2704,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 36E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",36],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2704"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=36 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2704,'EPSG',2704,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 36E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",36],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2704"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=36 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2705 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 39E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2705,'EPSG',2705,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 39E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2705"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2705,'EPSG',2705,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 39E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2705"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2706 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 42E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2706,'EPSG',2706,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 42E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",42],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2706"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=42 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2706,'EPSG',2706,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 42E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",42],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2706"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=42 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2707 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 45E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2707,'EPSG',2707,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 45E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2707"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2707,'EPSG',2707,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 45E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2707"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2708 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 48E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2708,'EPSG',2708,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 48E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",48],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2708"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=48 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2708,'EPSG',2708,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 48E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",48],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2708"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=48 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2709 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 51E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2709,'EPSG',2709,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 51E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2709"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2709,'EPSG',2709,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 51E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2709"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2710 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 54E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2710,'EPSG',2710,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 54E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",54],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2710"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=54 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2710,'EPSG',2710,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 54E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",54],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2710"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=54 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2711 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 57E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2711,'EPSG',2711,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 57E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2711"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2711,'EPSG',2711,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 57E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2711"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2712 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 60E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2712,'EPSG',2712,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 60E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",60],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2712"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=60 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2712,'EPSG',2712,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 60E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",60],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2712"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=60 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2713 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 63E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2713,'EPSG',2713,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 63E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",63],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2713"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2713,'EPSG',2713,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 63E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",63],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2713"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2714 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 66E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2714,'EPSG',2714,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 66E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",66],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2714"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=66 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2714,'EPSG',2714,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 66E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",66],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2714"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=66 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2715 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 69E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2715,'EPSG',2715,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 69E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",69],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2715"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2715,'EPSG',2715,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 69E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",69],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2715"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2716 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 72E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2716,'EPSG',2716,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 72E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",72],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2716"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=72 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2716,'EPSG',2716,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 72E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",72],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2716"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=72 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2717 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 75E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2717,'EPSG',2717,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 75E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2717"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2717,'EPSG',2717,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 75E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2717"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2718 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 78E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2718,'EPSG',2718,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 78E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",78],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2718"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2718,'EPSG',2718,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 78E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",78],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2718"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2719 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 81E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2719,'EPSG',2719,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 81E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2719"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2719,'EPSG',2719,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 81E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2719"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2720 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 84E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2720,'EPSG',2720,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 84E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",84],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2720"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2720,'EPSG',2720,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 84E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",84],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2720"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2721 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 87E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2721,'EPSG',2721,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 87E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2721"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2721,'EPSG',2721,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 87E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2721"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2722 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 90E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2722,'EPSG',2722,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 90E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",90],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2722"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2722,'EPSG',2722,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 90E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",90],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2722"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2723 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 93E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2723,'EPSG',2723,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 93E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2723"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2723,'EPSG',2723,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 93E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2723"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2724 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 96E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2724,'EPSG',2724,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 96E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",96],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2724"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2724,'EPSG',2724,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 96E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",96],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2724"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2725 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 99E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2725,'EPSG',2725,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 99E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2725"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2725,'EPSG',2725,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 99E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2725"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2726 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 102E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2726,'EPSG',2726,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 102E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",102],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2726"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2726,'EPSG',2726,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 102E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",102],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2726"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2727 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 105E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2727,'EPSG',2727,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 105E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2727"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2727,'EPSG',2727,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 105E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2727"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2728 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 108E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2728,'EPSG',2728,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 108E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",108],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2728"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2728,'EPSG',2728,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 108E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",108],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2728"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2729 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 111E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2729,'EPSG',2729,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 111E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2729"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2729,'EPSG',2729,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 111E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2729"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2730 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 114E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2730,'EPSG',2730,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 114E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",114],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2730"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2730,'EPSG',2730,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 114E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",114],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2730"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2731 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 117E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2731,'EPSG',2731,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 117E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2731"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2731,'EPSG',2731,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 117E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2731"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2732 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 120E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2732,'EPSG',2732,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 120E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",120],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2732"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2732,'EPSG',2732,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 120E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",120],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2732"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2733 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 123E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2733,'EPSG',2733,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 123E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2733"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2733,'EPSG',2733,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 123E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2733"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2734 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 126E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2734,'EPSG',2734,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 126E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",126],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2734"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=126 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2734,'EPSG',2734,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 126E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",126],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2734"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=126 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2735 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 129E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2735,'EPSG',2735,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 129E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2735"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2735,'EPSG',2735,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 129E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2735"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2736 : Tete / UTM zone 36S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2736,'EPSG',2736,'PROJCS["Tete / UTM zone 36S",GEOGCS["Tete",DATUM["Tete",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6127"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4127"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2736"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=36 +south +ellps=clrk66 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2736,'EPSG',2736,'PROJCS["Tete / UTM zone 36S",GEOGCS["Tete",DATUM["Tete",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[219.315,168.975,-166.145,0.198,5.926,-2.356,-57.104],AUTHORITY["EPSG","6127"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4127"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2736"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=36 +south +ellps=clrk66 +towgs84=219.315,168.975,-166.145,0.198,5.926,-2.356,-57.104 +units=m +no_defs '); --- --- EPSG 2737 : Tete / UTM zone 37S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2737,'EPSG',2737,'PROJCS["Tete / UTM zone 37S",GEOGCS["Tete",DATUM["Tete",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6127"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4127"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2737"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=37 +south +ellps=clrk66 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2737,'EPSG',2737,'PROJCS["Tete / UTM zone 37S",GEOGCS["Tete",DATUM["Tete",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[219.315,168.975,-166.145,0.198,5.926,-2.356,-57.104],AUTHORITY["EPSG","6127"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4127"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2737"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=37 +south +ellps=clrk66 +towgs84=219.315,168.975,-166.145,0.198,5.926,-2.356,-57.104 +units=m +no_defs '); --- --- EPSG 2738 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 132E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2738,'EPSG',2738,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 132E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",132],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2738"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=132 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2738,'EPSG',2738,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 132E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",132],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2738"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=132 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2739 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 135E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2739,'EPSG',2739,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 135E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2739"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2739,'EPSG',2739,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 135E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2739"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2740 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 138E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2740,'EPSG',2740,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 138E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",138],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2740"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=138 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2740,'EPSG',2740,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 138E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",138],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2740"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=138 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2741 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 141E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2741,'EPSG',2741,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 141E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2741"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2741,'EPSG',2741,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 141E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2741"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2742 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 144E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2742,'EPSG',2742,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 144E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",144],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2742"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=144 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2742,'EPSG',2742,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 144E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",144],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2742"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=144 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2743 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 147E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2743,'EPSG',2743,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 147E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",147],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2743"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2743,'EPSG',2743,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 147E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",147],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2743"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2744 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 150E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2744,'EPSG',2744,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 150E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",150],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2744"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=150 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2744,'EPSG',2744,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 150E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",150],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2744"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=150 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2745 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 153E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2745,'EPSG',2745,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 153E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",153],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2745"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2745,'EPSG',2745,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 153E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",153],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2745"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2746 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 156E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2746,'EPSG',2746,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 156E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",156],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2746"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=156 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2746,'EPSG',2746,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 156E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",156],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2746"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=156 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2747 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 159E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2747,'EPSG',2747,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 159E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",159],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2747"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2747,'EPSG',2747,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 159E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",159],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2747"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2748 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 162E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2748,'EPSG',2748,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 162E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",162],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2748"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=162 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2748,'EPSG',2748,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 162E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",162],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2748"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=162 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2749 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 165E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2749,'EPSG',2749,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 165E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2749"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2749,'EPSG',2749,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 165E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2749"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2750 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 168E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2750,'EPSG',2750,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 168E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",168],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2750"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=168 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2750,'EPSG',2750,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 168E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",168],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2750"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=168 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2751 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 171E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2751,'EPSG',2751,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 171E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2751"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2751,'EPSG',2751,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 171E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2751"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2752 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 174E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2752,'EPSG',2752,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 174E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",174],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2752"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=174 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2752,'EPSG',2752,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 174E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",174],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2752"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=174 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2753 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 177E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2753,'EPSG',2753,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 177E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2753"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2753,'EPSG',2753,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 177E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2753"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2754 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 180E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2754,'EPSG',2754,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 180E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",180],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2754"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=180 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2754,'EPSG',2754,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 180E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",180],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2754"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=180 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2755 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 177W --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2755,'EPSG',2755,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 177W",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-177],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2755"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2755,'EPSG',2755,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 177W",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-177],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2755"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2756 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 174W --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2756,'EPSG',2756,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 174W",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-174],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2756"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-174 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2756,'EPSG',2756,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 174W",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-174],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2756"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=-174 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2757 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 171W --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2757,'EPSG',2757,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 171W",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-171],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2757"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2757,'EPSG',2757,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 171W",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-171],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2757"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2758 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 168W --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2758,'EPSG',2758,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 168W",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-168],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2758"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-168 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2758,'EPSG',2758,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 168W",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-168],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2758"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=-168 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 2759 : NAD83(HARN) / Alabama East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2759,'EPSG',2759,'PROJCS["NAD83(HARN) / Alabama East",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30.5],PARAMETER["central_meridian",-85.83333333333333],PARAMETER["scale_factor",0.99996],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2759"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30.5 +lon_0=-85.83333333333333 +k=0.99996 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2759,'EPSG',2759,'PROJCS["NAD83(HARN) / Alabama East",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30.5],PARAMETER["central_meridian",-85.83333333333333],PARAMETER["scale_factor",0.99996],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2759"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30.5 +lon_0=-85.83333333333333 +k=0.99996 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2760 : NAD83(HARN) / Alabama West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2760,'EPSG',2760,'PROJCS["NAD83(HARN) / Alabama West",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",-87.5],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2760"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=-87.5 +k=0.999933333 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2760,'EPSG',2760,'PROJCS["NAD83(HARN) / Alabama West",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",-87.5],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2760"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=-87.5 +k=0.999933333 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2761 : NAD83(HARN) / Arizona East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2761,'EPSG',2761,'PROJCS["NAD83(HARN) / Arizona East",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-110.1666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",213360],PARAMETER["false_northing",0],AUTHORITY["EPSG","2761"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2761,'EPSG',2761,'PROJCS["NAD83(HARN) / Arizona East",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-110.1666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",213360],PARAMETER["false_northing",0],AUTHORITY["EPSG","2761"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2762 : NAD83(HARN) / Arizona Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2762,'EPSG',2762,'PROJCS["NAD83(HARN) / Arizona Central",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-111.9166666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",213360],PARAMETER["false_northing",0],AUTHORITY["EPSG","2762"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2762,'EPSG',2762,'PROJCS["NAD83(HARN) / Arizona Central",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-111.9166666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",213360],PARAMETER["false_northing",0],AUTHORITY["EPSG","2762"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2763 : NAD83(HARN) / Arizona West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2763,'EPSG',2763,'PROJCS["NAD83(HARN) / Arizona West",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-113.75],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",213360],PARAMETER["false_northing",0],AUTHORITY["EPSG","2763"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.999933333 +x_0=213360 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2763,'EPSG',2763,'PROJCS["NAD83(HARN) / Arizona West",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-113.75],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",213360],PARAMETER["false_northing",0],AUTHORITY["EPSG","2763"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.999933333 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2764 : NAD83(HARN) / Arkansas North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2764,'EPSG',2764,'PROJCS["NAD83(HARN) / Arkansas North",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.23333333333333],PARAMETER["standard_parallel_2",34.93333333333333],PARAMETER["latitude_of_origin",34.33333333333334],PARAMETER["central_meridian",-92],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2764"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.23333333333333 +lat_2=34.93333333333333 +lat_0=34.33333333333334 +lon_0=-92 +x_0=400000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2764,'EPSG',2764,'PROJCS["NAD83(HARN) / Arkansas North",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.23333333333333],PARAMETER["standard_parallel_2",34.93333333333333],PARAMETER["latitude_of_origin",34.33333333333334],PARAMETER["central_meridian",-92],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2764"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.23333333333333 +lat_2=34.93333333333333 +lat_0=34.33333333333334 +lon_0=-92 +x_0=400000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2765 : NAD83(HARN) / Arkansas South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2765,'EPSG',2765,'PROJCS["NAD83(HARN) / Arkansas South",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",34.76666666666667],PARAMETER["standard_parallel_2",33.3],PARAMETER["latitude_of_origin",32.66666666666666],PARAMETER["central_meridian",-92],PARAMETER["false_easting",400000],PARAMETER["false_northing",400000],AUTHORITY["EPSG","2765"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=34.76666666666667 +lat_2=33.3 +lat_0=32.66666666666666 +lon_0=-92 +x_0=400000 +y_0=400000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2765,'EPSG',2765,'PROJCS["NAD83(HARN) / Arkansas South",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",34.76666666666667],PARAMETER["standard_parallel_2",33.3],PARAMETER["latitude_of_origin",32.66666666666666],PARAMETER["central_meridian",-92],PARAMETER["false_easting",400000],PARAMETER["false_northing",400000],AUTHORITY["EPSG","2765"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=34.76666666666667 +lat_2=33.3 +lat_0=32.66666666666666 +lon_0=-92 +x_0=400000 +y_0=400000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2766 : NAD83(HARN) / California zone 1 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2766,'EPSG',2766,'PROJCS["NAD83(HARN) / California zone 1",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.66666666666666],PARAMETER["standard_parallel_2",40],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-122],PARAMETER["false_easting",2000000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","2766"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.66666666666666 +lat_2=40 +lat_0=39.33333333333334 +lon_0=-122 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2766,'EPSG',2766,'PROJCS["NAD83(HARN) / California zone 1",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.66666666666666],PARAMETER["standard_parallel_2",40],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-122],PARAMETER["false_easting",2000000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","2766"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.66666666666666 +lat_2=40 +lat_0=39.33333333333334 +lon_0=-122 +x_0=2000000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2767 : NAD83(HARN) / California zone 2 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2767,'EPSG',2767,'PROJCS["NAD83(HARN) / California zone 2",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.83333333333334],PARAMETER["standard_parallel_2",38.33333333333334],PARAMETER["latitude_of_origin",37.66666666666666],PARAMETER["central_meridian",-122],PARAMETER["false_easting",2000000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","2767"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.83333333333334 +lat_2=38.33333333333334 +lat_0=37.66666666666666 +lon_0=-122 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2767,'EPSG',2767,'PROJCS["NAD83(HARN) / California zone 2",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.83333333333334],PARAMETER["standard_parallel_2",38.33333333333334],PARAMETER["latitude_of_origin",37.66666666666666],PARAMETER["central_meridian",-122],PARAMETER["false_easting",2000000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","2767"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.83333333333334 +lat_2=38.33333333333334 +lat_0=37.66666666666666 +lon_0=-122 +x_0=2000000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2768 : NAD83(HARN) / California zone 3 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2768,'EPSG',2768,'PROJCS["NAD83(HARN) / California zone 3",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.43333333333333],PARAMETER["standard_parallel_2",37.06666666666667],PARAMETER["latitude_of_origin",36.5],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","2768"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.43333333333333 +lat_2=37.06666666666667 +lat_0=36.5 +lon_0=-120.5 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2768,'EPSG',2768,'PROJCS["NAD83(HARN) / California zone 3",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.43333333333333],PARAMETER["standard_parallel_2",37.06666666666667],PARAMETER["latitude_of_origin",36.5],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","2768"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.43333333333333 +lat_2=37.06666666666667 +lat_0=36.5 +lon_0=-120.5 +x_0=2000000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2769 : NAD83(HARN) / California zone 4 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2769,'EPSG',2769,'PROJCS["NAD83(HARN) / California zone 4",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.25],PARAMETER["standard_parallel_2",36],PARAMETER["latitude_of_origin",35.33333333333334],PARAMETER["central_meridian",-119],PARAMETER["false_easting",2000000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","2769"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.25 +lat_2=36 +lat_0=35.33333333333334 +lon_0=-119 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2769,'EPSG',2769,'PROJCS["NAD83(HARN) / California zone 4",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.25],PARAMETER["standard_parallel_2",36],PARAMETER["latitude_of_origin",35.33333333333334],PARAMETER["central_meridian",-119],PARAMETER["false_easting",2000000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","2769"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.25 +lat_2=36 +lat_0=35.33333333333334 +lon_0=-119 +x_0=2000000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2770 : NAD83(HARN) / California zone 5 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2770,'EPSG',2770,'PROJCS["NAD83(HARN) / California zone 5",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",35.46666666666667],PARAMETER["standard_parallel_2",34.03333333333333],PARAMETER["latitude_of_origin",33.5],PARAMETER["central_meridian",-118],PARAMETER["false_easting",2000000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","2770"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=35.46666666666667 +lat_2=34.03333333333333 +lat_0=33.5 +lon_0=-118 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2770,'EPSG',2770,'PROJCS["NAD83(HARN) / California zone 5",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",35.46666666666667],PARAMETER["standard_parallel_2",34.03333333333333],PARAMETER["latitude_of_origin",33.5],PARAMETER["central_meridian",-118],PARAMETER["false_easting",2000000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","2770"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=35.46666666666667 +lat_2=34.03333333333333 +lat_0=33.5 +lon_0=-118 +x_0=2000000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2771 : NAD83(HARN) / California zone 6 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2771,'EPSG',2771,'PROJCS["NAD83(HARN) / California zone 6",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",33.88333333333333],PARAMETER["standard_parallel_2",32.78333333333333],PARAMETER["latitude_of_origin",32.16666666666666],PARAMETER["central_meridian",-116.25],PARAMETER["false_easting",2000000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","2771"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=33.88333333333333 +lat_2=32.78333333333333 +lat_0=32.16666666666666 +lon_0=-116.25 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2771,'EPSG',2771,'PROJCS["NAD83(HARN) / California zone 6",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",33.88333333333333],PARAMETER["standard_parallel_2",32.78333333333333],PARAMETER["latitude_of_origin",32.16666666666666],PARAMETER["central_meridian",-116.25],PARAMETER["false_easting",2000000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","2771"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=33.88333333333333 +lat_2=32.78333333333333 +lat_0=32.16666666666666 +lon_0=-116.25 +x_0=2000000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2772 : NAD83(HARN) / Colorado North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2772,'EPSG',2772,'PROJCS["NAD83(HARN) / Colorado North",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.78333333333333],PARAMETER["standard_parallel_2",39.71666666666667],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-105.5],PARAMETER["false_easting",914401.8289],PARAMETER["false_northing",304800.6096],AUTHORITY["EPSG","2772"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.78333333333333 +lat_2=39.71666666666667 +lat_0=39.33333333333334 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2772,'EPSG',2772,'PROJCS["NAD83(HARN) / Colorado North",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.78333333333333],PARAMETER["standard_parallel_2",39.71666666666667],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-105.5],PARAMETER["false_easting",914401.8289],PARAMETER["false_northing",304800.6096],AUTHORITY["EPSG","2772"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.78333333333333 +lat_2=39.71666666666667 +lat_0=39.33333333333334 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2773 : NAD83(HARN) / Colorado Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2773,'EPSG',2773,'PROJCS["NAD83(HARN) / Colorado Central",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.75],PARAMETER["standard_parallel_2",38.45],PARAMETER["latitude_of_origin",37.83333333333334],PARAMETER["central_meridian",-105.5],PARAMETER["false_easting",914401.8289],PARAMETER["false_northing",304800.6096],AUTHORITY["EPSG","2773"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.75 +lat_2=38.45 +lat_0=37.83333333333334 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2773,'EPSG',2773,'PROJCS["NAD83(HARN) / Colorado Central",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.75],PARAMETER["standard_parallel_2",38.45],PARAMETER["latitude_of_origin",37.83333333333334],PARAMETER["central_meridian",-105.5],PARAMETER["false_easting",914401.8289],PARAMETER["false_northing",304800.6096],AUTHORITY["EPSG","2773"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.75 +lat_2=38.45 +lat_0=37.83333333333334 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2774 : NAD83(HARN) / Colorado South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2774,'EPSG',2774,'PROJCS["NAD83(HARN) / Colorado South",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.43333333333333],PARAMETER["standard_parallel_2",37.23333333333333],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-105.5],PARAMETER["false_easting",914401.8289],PARAMETER["false_northing",304800.6096],AUTHORITY["EPSG","2774"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.43333333333333 +lat_2=37.23333333333333 +lat_0=36.66666666666666 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2774,'EPSG',2774,'PROJCS["NAD83(HARN) / Colorado South",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.43333333333333],PARAMETER["standard_parallel_2",37.23333333333333],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-105.5],PARAMETER["false_easting",914401.8289],PARAMETER["false_northing",304800.6096],AUTHORITY["EPSG","2774"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.43333333333333 +lat_2=37.23333333333333 +lat_0=36.66666666666666 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2775 : NAD83(HARN) / Connecticut --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2775,'EPSG',2775,'PROJCS["NAD83(HARN) / Connecticut",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.86666666666667],PARAMETER["standard_parallel_2",41.2],PARAMETER["latitude_of_origin",40.83333333333334],PARAMETER["central_meridian",-72.75],PARAMETER["false_easting",304800.6096],PARAMETER["false_northing",152400.3048],AUTHORITY["EPSG","2775"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.86666666666667 +lat_2=41.2 +lat_0=40.83333333333334 +lon_0=-72.75 +x_0=304800.6096 +y_0=152400.3048 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2775,'EPSG',2775,'PROJCS["NAD83(HARN) / Connecticut",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.86666666666667],PARAMETER["standard_parallel_2",41.2],PARAMETER["latitude_of_origin",40.83333333333334],PARAMETER["central_meridian",-72.75],PARAMETER["false_easting",304800.6096],PARAMETER["false_northing",152400.3048],AUTHORITY["EPSG","2775"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.86666666666667 +lat_2=41.2 +lat_0=40.83333333333334 +lon_0=-72.75 +x_0=304800.6096 +y_0=152400.3048 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2776 : NAD83(HARN) / Delaware --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2776,'EPSG',2776,'PROJCS["NAD83(HARN) / Delaware",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",38],PARAMETER["central_meridian",-75.41666666666667],PARAMETER["scale_factor",0.999995],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2776"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999995 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2776,'EPSG',2776,'PROJCS["NAD83(HARN) / Delaware",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",38],PARAMETER["central_meridian",-75.41666666666667],PARAMETER["scale_factor",0.999995],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2776"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999995 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2777 : NAD83(HARN) / Florida East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2777,'EPSG',2777,'PROJCS["NAD83(HARN) / Florida East",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",24.33333333333333],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2777"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999941177 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2777,'EPSG',2777,'PROJCS["NAD83(HARN) / Florida East",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",24.33333333333333],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2777"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999941177 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2778 : NAD83(HARN) / Florida West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2778,'EPSG',2778,'PROJCS["NAD83(HARN) / Florida West",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",24.33333333333333],PARAMETER["central_meridian",-82],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2778"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999941177 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2778,'EPSG',2778,'PROJCS["NAD83(HARN) / Florida West",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",24.33333333333333],PARAMETER["central_meridian",-82],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2778"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999941177 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2779 : NAD83(HARN) / Florida North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2779,'EPSG',2779,'PROJCS["NAD83(HARN) / Florida North",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",30.75],PARAMETER["standard_parallel_2",29.58333333333333],PARAMETER["latitude_of_origin",29],PARAMETER["central_meridian",-84.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2779"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=30.75 +lat_2=29.58333333333333 +lat_0=29 +lon_0=-84.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2779,'EPSG',2779,'PROJCS["NAD83(HARN) / Florida North",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",30.75],PARAMETER["standard_parallel_2",29.58333333333333],PARAMETER["latitude_of_origin",29],PARAMETER["central_meridian",-84.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2779"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=30.75 +lat_2=29.58333333333333 +lat_0=29 +lon_0=-84.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2780 : NAD83(HARN) / Georgia East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2780,'EPSG',2780,'PROJCS["NAD83(HARN) / Georgia East",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",-82.16666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2780"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.9999 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2780,'EPSG',2780,'PROJCS["NAD83(HARN) / Georgia East",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",-82.16666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2780"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.9999 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2781 : NAD83(HARN) / Georgia West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2781,'EPSG',2781,'PROJCS["NAD83(HARN) / Georgia West",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",-84.16666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2781"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.9999 +x_0=700000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2781,'EPSG',2781,'PROJCS["NAD83(HARN) / Georgia West",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",-84.16666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2781"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.9999 +x_0=700000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2782 : NAD83(HARN) / Hawaii zone 1 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2782,'EPSG',2782,'PROJCS["NAD83(HARN) / Hawaii zone 1",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",18.83333333333333],PARAMETER["central_meridian",-155.5],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2782"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=18.83333333333333 +lon_0=-155.5 +k=0.999966667 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2782,'EPSG',2782,'PROJCS["NAD83(HARN) / Hawaii zone 1",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",18.83333333333333],PARAMETER["central_meridian",-155.5],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2782"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=18.83333333333333 +lon_0=-155.5 +k=0.999966667 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2783 : NAD83(HARN) / Hawaii zone 2 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2783,'EPSG',2783,'PROJCS["NAD83(HARN) / Hawaii zone 2",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",20.33333333333333],PARAMETER["central_meridian",-156.6666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2783"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=20.33333333333333 +lon_0=-156.6666666666667 +k=0.999966667 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2783,'EPSG',2783,'PROJCS["NAD83(HARN) / Hawaii zone 2",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",20.33333333333333],PARAMETER["central_meridian",-156.6666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2783"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=20.33333333333333 +lon_0=-156.6666666666667 +k=0.999966667 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2784 : NAD83(HARN) / Hawaii zone 3 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2784,'EPSG',2784,'PROJCS["NAD83(HARN) / Hawaii zone 3",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",21.16666666666667],PARAMETER["central_meridian",-158],PARAMETER["scale_factor",0.99999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2784"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=21.16666666666667 +lon_0=-158 +k=0.99999 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2784,'EPSG',2784,'PROJCS["NAD83(HARN) / Hawaii zone 3",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",21.16666666666667],PARAMETER["central_meridian",-158],PARAMETER["scale_factor",0.99999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2784"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=21.16666666666667 +lon_0=-158 +k=0.99999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2785 : NAD83(HARN) / Hawaii zone 4 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2785,'EPSG',2785,'PROJCS["NAD83(HARN) / Hawaii zone 4",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",21.83333333333333],PARAMETER["central_meridian",-159.5],PARAMETER["scale_factor",0.99999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2785"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=21.83333333333333 +lon_0=-159.5 +k=0.99999 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2785,'EPSG',2785,'PROJCS["NAD83(HARN) / Hawaii zone 4",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",21.83333333333333],PARAMETER["central_meridian",-159.5],PARAMETER["scale_factor",0.99999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2785"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=21.83333333333333 +lon_0=-159.5 +k=0.99999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2786 : NAD83(HARN) / Hawaii zone 5 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2786,'EPSG',2786,'PROJCS["NAD83(HARN) / Hawaii zone 5",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",21.66666666666667],PARAMETER["central_meridian",-160.1666666666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2786"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=21.66666666666667 +lon_0=-160.1666666666667 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2786,'EPSG',2786,'PROJCS["NAD83(HARN) / Hawaii zone 5",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",21.66666666666667],PARAMETER["central_meridian",-160.1666666666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2786"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=21.66666666666667 +lon_0=-160.1666666666667 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2787 : NAD83(HARN) / Idaho East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2787,'EPSG',2787,'PROJCS["NAD83(HARN) / Idaho East",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-112.1666666666667],PARAMETER["scale_factor",0.999947368],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2787"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666666667 +k=0.9999473679999999 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2787,'EPSG',2787,'PROJCS["NAD83(HARN) / Idaho East",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-112.1666666666667],PARAMETER["scale_factor",0.999947368],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2787"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666666667 +k=0.9999473679999999 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2788 : NAD83(HARN) / Idaho Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2788,'EPSG',2788,'PROJCS["NAD83(HARN) / Idaho Central",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-114],PARAMETER["scale_factor",0.999947368],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2788"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.9999473679999999 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2788,'EPSG',2788,'PROJCS["NAD83(HARN) / Idaho Central",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-114],PARAMETER["scale_factor",0.999947368],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2788"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.9999473679999999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2789 : NAD83(HARN) / Idaho West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2789,'EPSG',2789,'PROJCS["NAD83(HARN) / Idaho West",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-115.75],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",800000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2789"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0.999933333 +x_0=800000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2789,'EPSG',2789,'PROJCS["NAD83(HARN) / Idaho West",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-115.75],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",800000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2789"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0.999933333 +x_0=800000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2790 : NAD83(HARN) / Illinois East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2790,'EPSG',2790,'PROJCS["NAD83(HARN) / Illinois East",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-88.33333333333333],PARAMETER["scale_factor",0.999975],PARAMETER["false_easting",300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2790"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333333333 +k=0.9999749999999999 +x_0=300000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2790,'EPSG',2790,'PROJCS["NAD83(HARN) / Illinois East",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-88.33333333333333],PARAMETER["scale_factor",0.999975],PARAMETER["false_easting",300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2790"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333333333 +k=0.9999749999999999 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2791 : NAD83(HARN) / Illinois West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2791,'EPSG',2791,'PROJCS["NAD83(HARN) / Illinois West",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-90.16666666666667],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2791"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666666667 +k=0.999941177 +x_0=700000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2791,'EPSG',2791,'PROJCS["NAD83(HARN) / Illinois West",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-90.16666666666667],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2791"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666666667 +k=0.999941177 +x_0=700000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2792 : NAD83(HARN) / Indiana East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2792,'EPSG',2792,'PROJCS["NAD83(HARN) / Indiana East",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-85.66666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",100000],PARAMETER["false_northing",250000],AUTHORITY["EPSG","2792"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999966667 +x_0=100000 +y_0=250000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2792,'EPSG',2792,'PROJCS["NAD83(HARN) / Indiana East",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-85.66666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",100000],PARAMETER["false_northing",250000],AUTHORITY["EPSG","2792"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999966667 +x_0=100000 +y_0=250000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2793 : NAD83(HARN) / Indiana West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2793,'EPSG',2793,'PROJCS["NAD83(HARN) / Indiana West",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-87.08333333333333],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",900000],PARAMETER["false_northing",250000],AUTHORITY["EPSG","2793"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999966667 +x_0=900000 +y_0=250000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2793,'EPSG',2793,'PROJCS["NAD83(HARN) / Indiana West",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-87.08333333333333],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",900000],PARAMETER["false_northing",250000],AUTHORITY["EPSG","2793"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999966667 +x_0=900000 +y_0=250000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2794 : NAD83(HARN) / Iowa North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2794,'EPSG',2794,'PROJCS["NAD83(HARN) / Iowa North",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43.26666666666667],PARAMETER["standard_parallel_2",42.06666666666667],PARAMETER["latitude_of_origin",41.5],PARAMETER["central_meridian",-93.5],PARAMETER["false_easting",1500000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","2794"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43.26666666666667 +lat_2=42.06666666666667 +lat_0=41.5 +lon_0=-93.5 +x_0=1500000 +y_0=1000000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2794,'EPSG',2794,'PROJCS["NAD83(HARN) / Iowa North",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43.26666666666667],PARAMETER["standard_parallel_2",42.06666666666667],PARAMETER["latitude_of_origin",41.5],PARAMETER["central_meridian",-93.5],PARAMETER["false_easting",1500000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","2794"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43.26666666666667 +lat_2=42.06666666666667 +lat_0=41.5 +lon_0=-93.5 +x_0=1500000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2795 : NAD83(HARN) / Iowa South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2795,'EPSG',2795,'PROJCS["NAD83(HARN) / Iowa South",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.78333333333333],PARAMETER["standard_parallel_2",40.61666666666667],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-93.5],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2795"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.78333333333333 +lat_2=40.61666666666667 +lat_0=40 +lon_0=-93.5 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2795,'EPSG',2795,'PROJCS["NAD83(HARN) / Iowa South",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.78333333333333],PARAMETER["standard_parallel_2",40.61666666666667],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-93.5],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2795"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.78333333333333 +lat_2=40.61666666666667 +lat_0=40 +lon_0=-93.5 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2796 : NAD83(HARN) / Kansas North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2796,'EPSG',2796,'PROJCS["NAD83(HARN) / Kansas North",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.78333333333333],PARAMETER["standard_parallel_2",38.71666666666667],PARAMETER["latitude_of_origin",38.33333333333334],PARAMETER["central_meridian",-98],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2796"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.78333333333333 +lat_2=38.71666666666667 +lat_0=38.33333333333334 +lon_0=-98 +x_0=400000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2796,'EPSG',2796,'PROJCS["NAD83(HARN) / Kansas North",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.78333333333333],PARAMETER["standard_parallel_2",38.71666666666667],PARAMETER["latitude_of_origin",38.33333333333334],PARAMETER["central_meridian",-98],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2796"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.78333333333333 +lat_2=38.71666666666667 +lat_0=38.33333333333334 +lon_0=-98 +x_0=400000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2797 : NAD83(HARN) / Kansas South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2797,'EPSG',2797,'PROJCS["NAD83(HARN) / Kansas South",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.56666666666667],PARAMETER["standard_parallel_2",37.26666666666667],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-98.5],PARAMETER["false_easting",400000],PARAMETER["false_northing",400000],AUTHORITY["EPSG","2797"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.56666666666667 +lat_2=37.26666666666667 +lat_0=36.66666666666666 +lon_0=-98.5 +x_0=400000 +y_0=400000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2797,'EPSG',2797,'PROJCS["NAD83(HARN) / Kansas South",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.56666666666667],PARAMETER["standard_parallel_2",37.26666666666667],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-98.5],PARAMETER["false_easting",400000],PARAMETER["false_northing",400000],AUTHORITY["EPSG","2797"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.56666666666667 +lat_2=37.26666666666667 +lat_0=36.66666666666666 +lon_0=-98.5 +x_0=400000 +y_0=400000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2798 : NAD83(HARN) / Kentucky North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2798,'EPSG',2798,'PROJCS["NAD83(HARN) / Kentucky North",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.96666666666667],PARAMETER["standard_parallel_2",38.96666666666667],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-84.25],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2798"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.96666666666667 +lat_2=38.96666666666667 +lat_0=37.5 +lon_0=-84.25 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2798,'EPSG',2798,'PROJCS["NAD83(HARN) / Kentucky North",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.96666666666667],PARAMETER["standard_parallel_2",38.96666666666667],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-84.25],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2798"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.96666666666667 +lat_2=38.96666666666667 +lat_0=37.5 +lon_0=-84.25 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2799 : NAD83(HARN) / Kentucky South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2799,'EPSG',2799,'PROJCS["NAD83(HARN) / Kentucky South",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.93333333333333],PARAMETER["standard_parallel_2",36.73333333333333],PARAMETER["latitude_of_origin",36.33333333333334],PARAMETER["central_meridian",-85.75],PARAMETER["false_easting",500000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","2799"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.93333333333333 +lat_2=36.73333333333333 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=500000 +y_0=500000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2799,'EPSG',2799,'PROJCS["NAD83(HARN) / Kentucky South",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.93333333333333],PARAMETER["standard_parallel_2",36.73333333333333],PARAMETER["latitude_of_origin",36.33333333333334],PARAMETER["central_meridian",-85.75],PARAMETER["false_easting",500000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","2799"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.93333333333333 +lat_2=36.73333333333333 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=500000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2800 : NAD83(HARN) / Louisiana North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2800,'EPSG',2800,'PROJCS["NAD83(HARN) / Louisiana North",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",32.66666666666666],PARAMETER["standard_parallel_2",31.16666666666667],PARAMETER["latitude_of_origin",30.5],PARAMETER["central_meridian",-92.5],PARAMETER["false_easting",1000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2800"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=32.66666666666666 +lat_2=31.16666666666667 +lat_0=30.5 +lon_0=-92.5 +x_0=1000000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2800,'EPSG',2800,'PROJCS["NAD83(HARN) / Louisiana North",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",32.66666666666666],PARAMETER["standard_parallel_2",31.16666666666667],PARAMETER["latitude_of_origin",30.5],PARAMETER["central_meridian",-92.5],PARAMETER["false_easting",1000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2800"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=32.66666666666666 +lat_2=31.16666666666667 +lat_0=30.5 +lon_0=-92.5 +x_0=1000000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2801 : NAD83(HARN) / Louisiana South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2801,'EPSG',2801,'PROJCS["NAD83(HARN) / Louisiana South",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",30.7],PARAMETER["standard_parallel_2",29.3],PARAMETER["latitude_of_origin",28.5],PARAMETER["central_meridian",-91.33333333333333],PARAMETER["false_easting",1000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2801"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=30.7 +lat_2=29.3 +lat_0=28.5 +lon_0=-91.33333333333333 +x_0=1000000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2801,'EPSG',2801,'PROJCS["NAD83(HARN) / Louisiana South",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",30.7],PARAMETER["standard_parallel_2",29.3],PARAMETER["latitude_of_origin",28.5],PARAMETER["central_meridian",-91.33333333333333],PARAMETER["false_easting",1000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2801"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=30.7 +lat_2=29.3 +lat_0=28.5 +lon_0=-91.33333333333333 +x_0=1000000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2802 : NAD83(HARN) / Maine East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2802,'EPSG',2802,'PROJCS["NAD83(HARN) / Maine East",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",43.66666666666666],PARAMETER["central_meridian",-68.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2802"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.9999 +x_0=300000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2802,'EPSG',2802,'PROJCS["NAD83(HARN) / Maine East",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",43.66666666666666],PARAMETER["central_meridian",-68.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2802"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.9999 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2803 : NAD83(HARN) / Maine West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2803,'EPSG',2803,'PROJCS["NAD83(HARN) / Maine West",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.83333333333334],PARAMETER["central_meridian",-70.16666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",900000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2803"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666666667 +k=0.999966667 +x_0=900000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2803,'EPSG',2803,'PROJCS["NAD83(HARN) / Maine West",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.83333333333334],PARAMETER["central_meridian",-70.16666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",900000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2803"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666666667 +k=0.999966667 +x_0=900000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2804 : NAD83(HARN) / Maryland --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2804,'EPSG',2804,'PROJCS["NAD83(HARN) / Maryland",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.45],PARAMETER["standard_parallel_2",38.3],PARAMETER["latitude_of_origin",37.66666666666666],PARAMETER["central_meridian",-77],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2804"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.45 +lat_2=38.3 +lat_0=37.66666666666666 +lon_0=-77 +x_0=400000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2804,'EPSG',2804,'PROJCS["NAD83(HARN) / Maryland",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.45],PARAMETER["standard_parallel_2",38.3],PARAMETER["latitude_of_origin",37.66666666666666],PARAMETER["central_meridian",-77],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2804"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.45 +lat_2=38.3 +lat_0=37.66666666666666 +lon_0=-77 +x_0=400000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2805 : NAD83(HARN) / Massachusetts Mainland --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2805,'EPSG',2805,'PROJCS["NAD83(HARN) / Massachusetts Mainland",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",42.68333333333333],PARAMETER["standard_parallel_2",41.71666666666667],PARAMETER["latitude_of_origin",41],PARAMETER["central_meridian",-71.5],PARAMETER["false_easting",200000],PARAMETER["false_northing",750000],AUTHORITY["EPSG","2805"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=42.68333333333333 +lat_2=41.71666666666667 +lat_0=41 +lon_0=-71.5 +x_0=200000 +y_0=750000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2805,'EPSG',2805,'PROJCS["NAD83(HARN) / Massachusetts Mainland",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",42.68333333333333],PARAMETER["standard_parallel_2",41.71666666666667],PARAMETER["latitude_of_origin",41],PARAMETER["central_meridian",-71.5],PARAMETER["false_easting",200000],PARAMETER["false_northing",750000],AUTHORITY["EPSG","2805"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=42.68333333333333 +lat_2=41.71666666666667 +lat_0=41 +lon_0=-71.5 +x_0=200000 +y_0=750000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2806 : NAD83(HARN) / Massachusetts Island --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2806,'EPSG',2806,'PROJCS["NAD83(HARN) / Massachusetts Island",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.48333333333333],PARAMETER["standard_parallel_2",41.28333333333333],PARAMETER["latitude_of_origin",41],PARAMETER["central_meridian",-70.5],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2806"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.48333333333333 +lat_2=41.28333333333333 +lat_0=41 +lon_0=-70.5 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2806,'EPSG',2806,'PROJCS["NAD83(HARN) / Massachusetts Island",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.48333333333333],PARAMETER["standard_parallel_2",41.28333333333333],PARAMETER["latitude_of_origin",41],PARAMETER["central_meridian",-70.5],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2806"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.48333333333333 +lat_2=41.28333333333333 +lat_0=41 +lon_0=-70.5 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2807 : NAD83(HARN) / Michigan North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2807,'EPSG',2807,'PROJCS["NAD83(HARN) / Michigan North",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.08333333333334],PARAMETER["standard_parallel_2",45.48333333333333],PARAMETER["latitude_of_origin",44.78333333333333],PARAMETER["central_meridian",-87],PARAMETER["false_easting",8000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2807"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.08333333333334 +lat_2=45.48333333333333 +lat_0=44.78333333333333 +lon_0=-87 +x_0=8000000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2807,'EPSG',2807,'PROJCS["NAD83(HARN) / Michigan North",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.08333333333334],PARAMETER["standard_parallel_2",45.48333333333333],PARAMETER["latitude_of_origin",44.78333333333333],PARAMETER["central_meridian",-87],PARAMETER["false_easting",8000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2807"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.08333333333334 +lat_2=45.48333333333333 +lat_0=44.78333333333333 +lon_0=-87 +x_0=8000000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2808 : NAD83(HARN) / Michigan Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2808,'EPSG',2808,'PROJCS["NAD83(HARN) / Michigan Central",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.7],PARAMETER["standard_parallel_2",44.18333333333333],PARAMETER["latitude_of_origin",43.31666666666667],PARAMETER["central_meridian",-84.36666666666666],PARAMETER["false_easting",6000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2808"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.7 +lat_2=44.18333333333333 +lat_0=43.31666666666667 +lon_0=-84.36666666666666 +x_0=6000000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2808,'EPSG',2808,'PROJCS["NAD83(HARN) / Michigan Central",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.7],PARAMETER["standard_parallel_2",44.18333333333333],PARAMETER["latitude_of_origin",43.31666666666667],PARAMETER["central_meridian",-84.36666666666666],PARAMETER["false_easting",6000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2808"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.7 +lat_2=44.18333333333333 +lat_0=43.31666666666667 +lon_0=-84.36666666666666 +x_0=6000000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2809 : NAD83(HARN) / Michigan South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2809,'EPSG',2809,'PROJCS["NAD83(HARN) / Michigan South",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43.66666666666666],PARAMETER["standard_parallel_2",42.1],PARAMETER["latitude_of_origin",41.5],PARAMETER["central_meridian",-84.36666666666666],PARAMETER["false_easting",4000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2809"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43.66666666666666 +lat_2=42.1 +lat_0=41.5 +lon_0=-84.36666666666666 +x_0=4000000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2809,'EPSG',2809,'PROJCS["NAD83(HARN) / Michigan South",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43.66666666666666],PARAMETER["standard_parallel_2",42.1],PARAMETER["latitude_of_origin",41.5],PARAMETER["central_meridian",-84.36666666666666],PARAMETER["false_easting",4000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2809"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43.66666666666666 +lat_2=42.1 +lat_0=41.5 +lon_0=-84.36666666666666 +x_0=4000000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2810 : NAD83(HARN) / Minnesota North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2810,'EPSG',2810,'PROJCS["NAD83(HARN) / Minnesota North",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.63333333333333],PARAMETER["standard_parallel_2",47.03333333333333],PARAMETER["latitude_of_origin",46.5],PARAMETER["central_meridian",-93.1],PARAMETER["false_easting",800000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","2810"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.63333333333333 +lat_2=47.03333333333333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=800000 +y_0=100000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2810,'EPSG',2810,'PROJCS["NAD83(HARN) / Minnesota North",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.63333333333333],PARAMETER["standard_parallel_2",47.03333333333333],PARAMETER["latitude_of_origin",46.5],PARAMETER["central_meridian",-93.1],PARAMETER["false_easting",800000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","2810"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.63333333333333 +lat_2=47.03333333333333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=800000 +y_0=100000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2811 : NAD83(HARN) / Minnesota Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2811,'EPSG',2811,'PROJCS["NAD83(HARN) / Minnesota Central",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.05],PARAMETER["standard_parallel_2",45.61666666666667],PARAMETER["latitude_of_origin",45],PARAMETER["central_meridian",-94.25],PARAMETER["false_easting",800000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","2811"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.05 +lat_2=45.61666666666667 +lat_0=45 +lon_0=-94.25 +x_0=800000 +y_0=100000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2811,'EPSG',2811,'PROJCS["NAD83(HARN) / Minnesota Central",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.05],PARAMETER["standard_parallel_2",45.61666666666667],PARAMETER["latitude_of_origin",45],PARAMETER["central_meridian",-94.25],PARAMETER["false_easting",800000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","2811"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.05 +lat_2=45.61666666666667 +lat_0=45 +lon_0=-94.25 +x_0=800000 +y_0=100000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2812 : NAD83(HARN) / Minnesota South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2812,'EPSG',2812,'PROJCS["NAD83(HARN) / Minnesota South",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.21666666666667],PARAMETER["standard_parallel_2",43.78333333333333],PARAMETER["latitude_of_origin",43],PARAMETER["central_meridian",-94],PARAMETER["false_easting",800000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","2812"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.21666666666667 +lat_2=43.78333333333333 +lat_0=43 +lon_0=-94 +x_0=800000 +y_0=100000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2812,'EPSG',2812,'PROJCS["NAD83(HARN) / Minnesota South",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.21666666666667],PARAMETER["standard_parallel_2",43.78333333333333],PARAMETER["latitude_of_origin",43],PARAMETER["central_meridian",-94],PARAMETER["false_easting",800000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","2812"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.21666666666667 +lat_2=43.78333333333333 +lat_0=43 +lon_0=-94 +x_0=800000 +y_0=100000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2813 : NAD83(HARN) / Mississippi East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2813,'EPSG',2813,'PROJCS["NAD83(HARN) / Mississippi East",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",29.5],PARAMETER["central_meridian",-88.83333333333333],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2813"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=29.5 +lon_0=-88.83333333333333 +k=0.99995 +x_0=300000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2813,'EPSG',2813,'PROJCS["NAD83(HARN) / Mississippi East",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",29.5],PARAMETER["central_meridian",-88.83333333333333],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2813"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=29.5 +lon_0=-88.83333333333333 +k=0.99995 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2814 : NAD83(HARN) / Mississippi West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2814,'EPSG',2814,'PROJCS["NAD83(HARN) / Mississippi West",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",29.5],PARAMETER["central_meridian",-90.33333333333333],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2814"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=29.5 +lon_0=-90.33333333333333 +k=0.99995 +x_0=700000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2814,'EPSG',2814,'PROJCS["NAD83(HARN) / Mississippi West",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",29.5],PARAMETER["central_meridian",-90.33333333333333],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2814"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=29.5 +lon_0=-90.33333333333333 +k=0.99995 +x_0=700000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2815 : NAD83(HARN) / Missouri East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2815,'EPSG',2815,'PROJCS["NAD83(HARN) / Missouri East",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",35.83333333333334],PARAMETER["central_meridian",-90.5],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",250000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2815"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=35.83333333333334 +lon_0=-90.5 +k=0.999933333 +x_0=250000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2815,'EPSG',2815,'PROJCS["NAD83(HARN) / Missouri East",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",35.83333333333334],PARAMETER["central_meridian",-90.5],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",250000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2815"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=35.83333333333334 +lon_0=-90.5 +k=0.999933333 +x_0=250000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2816 : NAD83(HARN) / Missouri Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2816,'EPSG',2816,'PROJCS["NAD83(HARN) / Missouri Central",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",35.83333333333334],PARAMETER["central_meridian",-92.5],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2816"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=35.83333333333334 +lon_0=-92.5 +k=0.999933333 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2816,'EPSG',2816,'PROJCS["NAD83(HARN) / Missouri Central",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",35.83333333333334],PARAMETER["central_meridian",-92.5],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2816"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=35.83333333333334 +lon_0=-92.5 +k=0.999933333 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2817 : NAD83(HARN) / Missouri West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2817,'EPSG',2817,'PROJCS["NAD83(HARN) / Missouri West",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36.16666666666666],PARAMETER["central_meridian",-94.5],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",850000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2817"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=36.16666666666666 +lon_0=-94.5 +k=0.999941177 +x_0=850000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2817,'EPSG',2817,'PROJCS["NAD83(HARN) / Missouri West",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36.16666666666666],PARAMETER["central_meridian",-94.5],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",850000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2817"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=36.16666666666666 +lon_0=-94.5 +k=0.999941177 +x_0=850000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2818 : NAD83(HARN) / Montana --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2818,'EPSG',2818,'PROJCS["NAD83(HARN) / Montana",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",49],PARAMETER["standard_parallel_2",45],PARAMETER["latitude_of_origin",44.25],PARAMETER["central_meridian",-109.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2818"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=49 +lat_2=45 +lat_0=44.25 +lon_0=-109.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2818,'EPSG',2818,'PROJCS["NAD83(HARN) / Montana",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",49],PARAMETER["standard_parallel_2",45],PARAMETER["latitude_of_origin",44.25],PARAMETER["central_meridian",-109.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2818"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=49 +lat_2=45 +lat_0=44.25 +lon_0=-109.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2819 : NAD83(HARN) / Nebraska --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2819,'EPSG',2819,'PROJCS["NAD83(HARN) / Nebraska",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43],PARAMETER["standard_parallel_2",40],PARAMETER["latitude_of_origin",39.83333333333334],PARAMETER["central_meridian",-100],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2819"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +lon_0=-100 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2819,'EPSG',2819,'PROJCS["NAD83(HARN) / Nebraska",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43],PARAMETER["standard_parallel_2",40],PARAMETER["latitude_of_origin",39.83333333333334],PARAMETER["central_meridian",-100],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2819"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +lon_0=-100 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2820 : NAD83(HARN) / Nevada East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2820,'EPSG',2820,'PROJCS["NAD83(HARN) / Nevada East",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",34.75],PARAMETER["central_meridian",-115.5833333333333],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",8000000],AUTHORITY["EPSG","2820"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.9999 +x_0=200000 +y_0=8000000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2820,'EPSG',2820,'PROJCS["NAD83(HARN) / Nevada East",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",34.75],PARAMETER["central_meridian",-115.5833333333333],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",8000000],AUTHORITY["EPSG","2820"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.9999 +x_0=200000 +y_0=8000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2821 : NAD83(HARN) / Nevada Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2821,'EPSG',2821,'PROJCS["NAD83(HARN) / Nevada Central",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",34.75],PARAMETER["central_meridian",-116.6666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",6000000],AUTHORITY["EPSG","2821"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.9999 +x_0=500000 +y_0=6000000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2821,'EPSG',2821,'PROJCS["NAD83(HARN) / Nevada Central",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",34.75],PARAMETER["central_meridian",-116.6666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",6000000],AUTHORITY["EPSG","2821"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.9999 +x_0=500000 +y_0=6000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2822 : NAD83(HARN) / Nevada West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2822,'EPSG',2822,'PROJCS["NAD83(HARN) / Nevada West",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",34.75],PARAMETER["central_meridian",-118.5833333333333],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",800000],PARAMETER["false_northing",4000000],AUTHORITY["EPSG","2822"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.9999 +x_0=800000 +y_0=4000000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2822,'EPSG',2822,'PROJCS["NAD83(HARN) / Nevada West",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",34.75],PARAMETER["central_meridian",-118.5833333333333],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",800000],PARAMETER["false_northing",4000000],AUTHORITY["EPSG","2822"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.9999 +x_0=800000 +y_0=4000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2823 : NAD83(HARN) / New Hampshire --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2823,'EPSG',2823,'PROJCS["NAD83(HARN) / New Hampshire",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.5],PARAMETER["central_meridian",-71.66666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2823"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999966667 +x_0=300000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2823,'EPSG',2823,'PROJCS["NAD83(HARN) / New Hampshire",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.5],PARAMETER["central_meridian",-71.66666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2823"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999966667 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2824 : NAD83(HARN) / New Jersey --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2824,'EPSG',2824,'PROJCS["NAD83(HARN) / New Jersey",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",38.83333333333334],PARAMETER["central_meridian",-74.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2824"],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 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2824,'EPSG',2824,'PROJCS["NAD83(HARN) / New Jersey",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",38.83333333333334],PARAMETER["central_meridian",-74.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2824"],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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2825 : NAD83(HARN) / New Mexico East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2825,'EPSG',2825,'PROJCS["NAD83(HARN) / New Mexico East",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-104.3333333333333],PARAMETER["scale_factor",0.999909091],PARAMETER["false_easting",165000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2825"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.999909091 +x_0=165000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2825,'EPSG',2825,'PROJCS["NAD83(HARN) / New Mexico East",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-104.3333333333333],PARAMETER["scale_factor",0.999909091],PARAMETER["false_easting",165000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2825"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.999909091 +x_0=165000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2826 : NAD83(HARN) / New Mexico Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2826,'EPSG',2826,'PROJCS["NAD83(HARN) / New Mexico Central",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-106.25],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2826"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2826,'EPSG',2826,'PROJCS["NAD83(HARN) / New Mexico Central",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-106.25],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2826"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2827 : NAD83(HARN) / New Mexico West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2827,'EPSG',2827,'PROJCS["NAD83(HARN) / New Mexico West",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-107.8333333333333],PARAMETER["scale_factor",0.999916667],PARAMETER["false_easting",830000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2827"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.999916667 +x_0=830000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2827,'EPSG',2827,'PROJCS["NAD83(HARN) / New Mexico West",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-107.8333333333333],PARAMETER["scale_factor",0.999916667],PARAMETER["false_easting",830000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2827"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.999916667 +x_0=830000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2828 : NAD83(HARN) / New York East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2828,'EPSG',2828,'PROJCS["NAD83(HARN) / New York East",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",38.83333333333334],PARAMETER["central_meridian",-74.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2828"],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 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2828,'EPSG',2828,'PROJCS["NAD83(HARN) / New York East",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",38.83333333333334],PARAMETER["central_meridian",-74.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2828"],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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2829 : NAD83(HARN) / New York Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2829,'EPSG',2829,'PROJCS["NAD83(HARN) / New York Central",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-76.58333333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",250000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2829"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.9999375 +x_0=250000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2829,'EPSG',2829,'PROJCS["NAD83(HARN) / New York Central",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-76.58333333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",250000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2829"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.9999375 +x_0=250000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2830 : NAD83(HARN) / New York West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2830,'EPSG',2830,'PROJCS["NAD83(HARN) / New York West",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-78.58333333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",350000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2830"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.9999375 +x_0=350000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2830,'EPSG',2830,'PROJCS["NAD83(HARN) / New York West",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-78.58333333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",350000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2830"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.9999375 +x_0=350000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2831 : NAD83(HARN) / New York Long Island --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2831,'EPSG',2831,'PROJCS["NAD83(HARN) / New York Long Island",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.03333333333333],PARAMETER["standard_parallel_2",40.66666666666666],PARAMETER["latitude_of_origin",40.16666666666666],PARAMETER["central_meridian",-74],PARAMETER["false_easting",300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2831"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.03333333333333 +lat_2=40.66666666666666 +lat_0=40.16666666666666 +lon_0=-74 +x_0=300000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2831,'EPSG',2831,'PROJCS["NAD83(HARN) / New York Long Island",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.03333333333333],PARAMETER["standard_parallel_2",40.66666666666666],PARAMETER["latitude_of_origin",40.16666666666666],PARAMETER["central_meridian",-74],PARAMETER["false_easting",300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2831"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.03333333333333 +lat_2=40.66666666666666 +lat_0=40.16666666666666 +lon_0=-74 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2832 : NAD83(HARN) / North Dakota North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2832,'EPSG',2832,'PROJCS["NAD83(HARN) / North Dakota North",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.73333333333333],PARAMETER["standard_parallel_2",47.43333333333333],PARAMETER["latitude_of_origin",47],PARAMETER["central_meridian",-100.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2832"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.73333333333333 +lat_2=47.43333333333333 +lat_0=47 +lon_0=-100.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2832,'EPSG',2832,'PROJCS["NAD83(HARN) / North Dakota North",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.73333333333333],PARAMETER["standard_parallel_2",47.43333333333333],PARAMETER["latitude_of_origin",47],PARAMETER["central_meridian",-100.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2832"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.73333333333333 +lat_2=47.43333333333333 +lat_0=47 +lon_0=-100.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2833 : NAD83(HARN) / North Dakota South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2833,'EPSG',2833,'PROJCS["NAD83(HARN) / North Dakota South",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.48333333333333],PARAMETER["standard_parallel_2",46.18333333333333],PARAMETER["latitude_of_origin",45.66666666666666],PARAMETER["central_meridian",-100.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2833"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.48333333333333 +lat_2=46.18333333333333 +lat_0=45.66666666666666 +lon_0=-100.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2833,'EPSG',2833,'PROJCS["NAD83(HARN) / North Dakota South",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.48333333333333],PARAMETER["standard_parallel_2",46.18333333333333],PARAMETER["latitude_of_origin",45.66666666666666],PARAMETER["central_meridian",-100.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2833"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.48333333333333 +lat_2=46.18333333333333 +lat_0=45.66666666666666 +lon_0=-100.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2834 : NAD83(HARN) / Ohio North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2834,'EPSG',2834,'PROJCS["NAD83(HARN) / Ohio North",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.7],PARAMETER["standard_parallel_2",40.43333333333333],PARAMETER["latitude_of_origin",39.66666666666666],PARAMETER["central_meridian",-82.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2834"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.7 +lat_2=40.43333333333333 +lat_0=39.66666666666666 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2834,'EPSG',2834,'PROJCS["NAD83(HARN) / Ohio North",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.7],PARAMETER["standard_parallel_2",40.43333333333333],PARAMETER["latitude_of_origin",39.66666666666666],PARAMETER["central_meridian",-82.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2834"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.7 +lat_2=40.43333333333333 +lat_0=39.66666666666666 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2835 : NAD83(HARN) / Ohio South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2835,'EPSG',2835,'PROJCS["NAD83(HARN) / Ohio South",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.03333333333333],PARAMETER["standard_parallel_2",38.73333333333333],PARAMETER["latitude_of_origin",38],PARAMETER["central_meridian",-82.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2835"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.03333333333333 +lat_2=38.73333333333333 +lat_0=38 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2835,'EPSG',2835,'PROJCS["NAD83(HARN) / Ohio South",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.03333333333333],PARAMETER["standard_parallel_2",38.73333333333333],PARAMETER["latitude_of_origin",38],PARAMETER["central_meridian",-82.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2835"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.03333333333333 +lat_2=38.73333333333333 +lat_0=38 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2836 : NAD83(HARN) / Oklahoma North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2836,'EPSG',2836,'PROJCS["NAD83(HARN) / Oklahoma North",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.76666666666667],PARAMETER["standard_parallel_2",35.56666666666667],PARAMETER["latitude_of_origin",35],PARAMETER["central_meridian",-98],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2836"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.76666666666667 +lat_2=35.56666666666667 +lat_0=35 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2836,'EPSG',2836,'PROJCS["NAD83(HARN) / Oklahoma North",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.76666666666667],PARAMETER["standard_parallel_2",35.56666666666667],PARAMETER["latitude_of_origin",35],PARAMETER["central_meridian",-98],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2836"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.76666666666667 +lat_2=35.56666666666667 +lat_0=35 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2837 : NAD83(HARN) / Oklahoma South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2837,'EPSG',2837,'PROJCS["NAD83(HARN) / Oklahoma South",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",35.23333333333333],PARAMETER["standard_parallel_2",33.93333333333333],PARAMETER["latitude_of_origin",33.33333333333334],PARAMETER["central_meridian",-98],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2837"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=35.23333333333333 +lat_2=33.93333333333333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2837,'EPSG',2837,'PROJCS["NAD83(HARN) / Oklahoma South",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",35.23333333333333],PARAMETER["standard_parallel_2",33.93333333333333],PARAMETER["latitude_of_origin",33.33333333333334],PARAMETER["central_meridian",-98],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2837"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=35.23333333333333 +lat_2=33.93333333333333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2838 : NAD83(HARN) / Oregon North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2838,'EPSG',2838,'PROJCS["NAD83(HARN) / Oregon North",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",46],PARAMETER["standard_parallel_2",44.33333333333334],PARAMETER["latitude_of_origin",43.66666666666666],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",2500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2838"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=46 +lat_2=44.33333333333334 +lat_0=43.66666666666666 +lon_0=-120.5 +x_0=2500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2838,'EPSG',2838,'PROJCS["NAD83(HARN) / Oregon North",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",46],PARAMETER["standard_parallel_2",44.33333333333334],PARAMETER["latitude_of_origin",43.66666666666666],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",2500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2838"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=46 +lat_2=44.33333333333334 +lat_0=43.66666666666666 +lon_0=-120.5 +x_0=2500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2839 : NAD83(HARN) / Oregon South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2839,'EPSG',2839,'PROJCS["NAD83(HARN) / Oregon South",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44],PARAMETER["standard_parallel_2",42.33333333333334],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2839"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44 +lat_2=42.33333333333334 +lat_0=41.66666666666666 +lon_0=-120.5 +x_0=1500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2839,'EPSG',2839,'PROJCS["NAD83(HARN) / Oregon South",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44],PARAMETER["standard_parallel_2",42.33333333333334],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2839"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44 +lat_2=42.33333333333334 +lat_0=41.66666666666666 +lon_0=-120.5 +x_0=1500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2840 : NAD83(HARN) / Rhode Island --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2840,'EPSG',2840,'PROJCS["NAD83(HARN) / Rhode Island",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.08333333333334],PARAMETER["central_meridian",-71.5],PARAMETER["scale_factor",0.99999375],PARAMETER["false_easting",100000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2840"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.08333333333334 +lon_0=-71.5 +k=0.99999375 +x_0=100000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2840,'EPSG',2840,'PROJCS["NAD83(HARN) / Rhode Island",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.08333333333334],PARAMETER["central_meridian",-71.5],PARAMETER["scale_factor",0.99999375],PARAMETER["false_easting",100000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2840"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.08333333333334 +lon_0=-71.5 +k=0.99999375 +x_0=100000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2841 : NAD83(HARN) / South Dakota North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2841,'EPSG',2841,'PROJCS["NAD83(HARN) / South Dakota North",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.68333333333333],PARAMETER["standard_parallel_2",44.41666666666666],PARAMETER["latitude_of_origin",43.83333333333334],PARAMETER["central_meridian",-100],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2841"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.68333333333333 +lat_2=44.41666666666666 +lat_0=43.83333333333334 +lon_0=-100 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2841,'EPSG',2841,'PROJCS["NAD83(HARN) / South Dakota North",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.68333333333333],PARAMETER["standard_parallel_2",44.41666666666666],PARAMETER["latitude_of_origin",43.83333333333334],PARAMETER["central_meridian",-100],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2841"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.68333333333333 +lat_2=44.41666666666666 +lat_0=43.83333333333334 +lon_0=-100 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2842 : NAD83(HARN) / South Dakota South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2842,'EPSG',2842,'PROJCS["NAD83(HARN) / South Dakota South",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44.4],PARAMETER["standard_parallel_2",42.83333333333334],PARAMETER["latitude_of_origin",42.33333333333334],PARAMETER["central_meridian",-100.3333333333333],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2842"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44.4 +lat_2=42.83333333333334 +lat_0=42.33333333333334 +lon_0=-100.3333333333333 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2842,'EPSG',2842,'PROJCS["NAD83(HARN) / South Dakota South",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44.4],PARAMETER["standard_parallel_2",42.83333333333334],PARAMETER["latitude_of_origin",42.33333333333334],PARAMETER["central_meridian",-100.3333333333333],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2842"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44.4 +lat_2=42.83333333333334 +lat_0=42.33333333333334 +lon_0=-100.3333333333333 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2843 : NAD83(HARN) / Tennessee --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2843,'EPSG',2843,'PROJCS["NAD83(HARN) / Tennessee",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.41666666666666],PARAMETER["standard_parallel_2",35.25],PARAMETER["latitude_of_origin",34.33333333333334],PARAMETER["central_meridian",-86],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2843"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.41666666666666 +lat_2=35.25 +lat_0=34.33333333333334 +lon_0=-86 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2843,'EPSG',2843,'PROJCS["NAD83(HARN) / Tennessee",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.41666666666666],PARAMETER["standard_parallel_2",35.25],PARAMETER["latitude_of_origin",34.33333333333334],PARAMETER["central_meridian",-86],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2843"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.41666666666666 +lat_2=35.25 +lat_0=34.33333333333334 +lon_0=-86 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2844 : NAD83(HARN) / Texas North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2844,'EPSG',2844,'PROJCS["NAD83(HARN) / Texas North",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.18333333333333],PARAMETER["standard_parallel_2",34.65],PARAMETER["latitude_of_origin",34],PARAMETER["central_meridian",-101.5],PARAMETER["false_easting",200000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","2844"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.18333333333333 +lat_2=34.65 +lat_0=34 +lon_0=-101.5 +x_0=200000 +y_0=1000000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2844,'EPSG',2844,'PROJCS["NAD83(HARN) / Texas North",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.18333333333333],PARAMETER["standard_parallel_2",34.65],PARAMETER["latitude_of_origin",34],PARAMETER["central_meridian",-101.5],PARAMETER["false_easting",200000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","2844"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.18333333333333 +lat_2=34.65 +lat_0=34 +lon_0=-101.5 +x_0=200000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2845 : NAD83(HARN) / Texas North Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2845,'EPSG',2845,'PROJCS["NAD83(HARN) / Texas North Central",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",33.96666666666667],PARAMETER["standard_parallel_2",32.13333333333333],PARAMETER["latitude_of_origin",31.66666666666667],PARAMETER["central_meridian",-98.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",2000000],AUTHORITY["EPSG","2845"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=33.96666666666667 +lat_2=32.13333333333333 +lat_0=31.66666666666667 +lon_0=-98.5 +x_0=600000 +y_0=2000000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2845,'EPSG',2845,'PROJCS["NAD83(HARN) / Texas North Central",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",33.96666666666667],PARAMETER["standard_parallel_2",32.13333333333333],PARAMETER["latitude_of_origin",31.66666666666667],PARAMETER["central_meridian",-98.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",2000000],AUTHORITY["EPSG","2845"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=33.96666666666667 +lat_2=32.13333333333333 +lat_0=31.66666666666667 +lon_0=-98.5 +x_0=600000 +y_0=2000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2846 : NAD83(HARN) / Texas Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2846,'EPSG',2846,'PROJCS["NAD83(HARN) / Texas Central",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",31.88333333333333],PARAMETER["standard_parallel_2",30.11666666666667],PARAMETER["latitude_of_origin",29.66666666666667],PARAMETER["central_meridian",-100.3333333333333],PARAMETER["false_easting",700000],PARAMETER["false_northing",3000000],AUTHORITY["EPSG","2846"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=31.88333333333333 +lat_2=30.11666666666667 +lat_0=29.66666666666667 +lon_0=-100.3333333333333 +x_0=700000 +y_0=3000000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2846,'EPSG',2846,'PROJCS["NAD83(HARN) / Texas Central",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",31.88333333333333],PARAMETER["standard_parallel_2",30.11666666666667],PARAMETER["latitude_of_origin",29.66666666666667],PARAMETER["central_meridian",-100.3333333333333],PARAMETER["false_easting",700000],PARAMETER["false_northing",3000000],AUTHORITY["EPSG","2846"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=31.88333333333333 +lat_2=30.11666666666667 +lat_0=29.66666666666667 +lon_0=-100.3333333333333 +x_0=700000 +y_0=3000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2847 : NAD83(HARN) / Texas South Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2847,'EPSG',2847,'PROJCS["NAD83(HARN) / Texas South Central",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",30.28333333333333],PARAMETER["standard_parallel_2",28.38333333333333],PARAMETER["latitude_of_origin",27.83333333333333],PARAMETER["central_meridian",-99],PARAMETER["false_easting",600000],PARAMETER["false_northing",4000000],AUTHORITY["EPSG","2847"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=30.28333333333333 +lat_2=28.38333333333333 +lat_0=27.83333333333333 +lon_0=-99 +x_0=600000 +y_0=4000000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2847,'EPSG',2847,'PROJCS["NAD83(HARN) / Texas South Central",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",30.28333333333333],PARAMETER["standard_parallel_2",28.38333333333333],PARAMETER["latitude_of_origin",27.83333333333333],PARAMETER["central_meridian",-99],PARAMETER["false_easting",600000],PARAMETER["false_northing",4000000],AUTHORITY["EPSG","2847"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=30.28333333333333 +lat_2=28.38333333333333 +lat_0=27.83333333333333 +lon_0=-99 +x_0=600000 +y_0=4000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2848 : NAD83(HARN) / Texas South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2848,'EPSG',2848,'PROJCS["NAD83(HARN) / Texas South",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",27.83333333333333],PARAMETER["standard_parallel_2",26.16666666666667],PARAMETER["latitude_of_origin",25.66666666666667],PARAMETER["central_meridian",-98.5],PARAMETER["false_easting",300000],PARAMETER["false_northing",5000000],AUTHORITY["EPSG","2848"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=27.83333333333333 +lat_2=26.16666666666667 +lat_0=25.66666666666667 +lon_0=-98.5 +x_0=300000 +y_0=5000000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2848,'EPSG',2848,'PROJCS["NAD83(HARN) / Texas South",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",27.83333333333333],PARAMETER["standard_parallel_2",26.16666666666667],PARAMETER["latitude_of_origin",25.66666666666667],PARAMETER["central_meridian",-98.5],PARAMETER["false_easting",300000],PARAMETER["false_northing",5000000],AUTHORITY["EPSG","2848"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=27.83333333333333 +lat_2=26.16666666666667 +lat_0=25.66666666666667 +lon_0=-98.5 +x_0=300000 +y_0=5000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2849 : NAD83(HARN) / Utah North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2849,'EPSG',2849,'PROJCS["NAD83(HARN) / Utah North",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.78333333333333],PARAMETER["standard_parallel_2",40.71666666666667],PARAMETER["latitude_of_origin",40.33333333333334],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",500000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","2849"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.78333333333333 +lat_2=40.71666666666667 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000 +y_0=1000000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2849,'EPSG',2849,'PROJCS["NAD83(HARN) / Utah North",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.78333333333333],PARAMETER["standard_parallel_2",40.71666666666667],PARAMETER["latitude_of_origin",40.33333333333334],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",500000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","2849"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.78333333333333 +lat_2=40.71666666666667 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2850 : NAD83(HARN) / Utah Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2850,'EPSG',2850,'PROJCS["NAD83(HARN) / Utah Central",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.65],PARAMETER["standard_parallel_2",39.01666666666667],PARAMETER["latitude_of_origin",38.33333333333334],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",500000],PARAMETER["false_northing",2000000],AUTHORITY["EPSG","2850"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.65 +lat_2=39.01666666666667 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=500000 +y_0=2000000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2850,'EPSG',2850,'PROJCS["NAD83(HARN) / Utah Central",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.65],PARAMETER["standard_parallel_2",39.01666666666667],PARAMETER["latitude_of_origin",38.33333333333334],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",500000],PARAMETER["false_northing",2000000],AUTHORITY["EPSG","2850"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.65 +lat_2=39.01666666666667 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=500000 +y_0=2000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2851 : NAD83(HARN) / Utah South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2851,'EPSG',2851,'PROJCS["NAD83(HARN) / Utah South",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.35],PARAMETER["standard_parallel_2",37.21666666666667],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",500000],PARAMETER["false_northing",3000000],AUTHORITY["EPSG","2851"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.35 +lat_2=37.21666666666667 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=500000 +y_0=3000000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2851,'EPSG',2851,'PROJCS["NAD83(HARN) / Utah South",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.35],PARAMETER["standard_parallel_2",37.21666666666667],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",500000],PARAMETER["false_northing",3000000],AUTHORITY["EPSG","2851"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.35 +lat_2=37.21666666666667 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=500000 +y_0=3000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2852 : NAD83(HARN) / Vermont --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2852,'EPSG',2852,'PROJCS["NAD83(HARN) / Vermont",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.5],PARAMETER["central_meridian",-72.5],PARAMETER["scale_factor",0.999964286],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2852"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.5 +lon_0=-72.5 +k=0.999964286 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2852,'EPSG',2852,'PROJCS["NAD83(HARN) / Vermont",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.5],PARAMETER["central_meridian",-72.5],PARAMETER["scale_factor",0.999964286],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2852"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.5 +lon_0=-72.5 +k=0.999964286 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2853 : NAD83(HARN) / Virginia North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2853,'EPSG',2853,'PROJCS["NAD83(HARN) / Virginia North",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.2],PARAMETER["standard_parallel_2",38.03333333333333],PARAMETER["latitude_of_origin",37.66666666666666],PARAMETER["central_meridian",-78.5],PARAMETER["false_easting",3500000],PARAMETER["false_northing",2000000],AUTHORITY["EPSG","2853"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.2 +lat_2=38.03333333333333 +lat_0=37.66666666666666 +lon_0=-78.5 +x_0=3500000 +y_0=2000000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2853,'EPSG',2853,'PROJCS["NAD83(HARN) / Virginia North",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.2],PARAMETER["standard_parallel_2",38.03333333333333],PARAMETER["latitude_of_origin",37.66666666666666],PARAMETER["central_meridian",-78.5],PARAMETER["false_easting",3500000],PARAMETER["false_northing",2000000],AUTHORITY["EPSG","2853"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.2 +lat_2=38.03333333333333 +lat_0=37.66666666666666 +lon_0=-78.5 +x_0=3500000 +y_0=2000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2854 : NAD83(HARN) / Virginia South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2854,'EPSG',2854,'PROJCS["NAD83(HARN) / Virginia South",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.96666666666667],PARAMETER["standard_parallel_2",36.76666666666667],PARAMETER["latitude_of_origin",36.33333333333334],PARAMETER["central_meridian",-78.5],PARAMETER["false_easting",3500000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","2854"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.96666666666667 +lat_2=36.76666666666667 +lat_0=36.33333333333334 +lon_0=-78.5 +x_0=3500000 +y_0=1000000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2854,'EPSG',2854,'PROJCS["NAD83(HARN) / Virginia South",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.96666666666667],PARAMETER["standard_parallel_2",36.76666666666667],PARAMETER["latitude_of_origin",36.33333333333334],PARAMETER["central_meridian",-78.5],PARAMETER["false_easting",3500000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","2854"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.96666666666667 +lat_2=36.76666666666667 +lat_0=36.33333333333334 +lon_0=-78.5 +x_0=3500000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2855 : NAD83(HARN) / Washington North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2855,'EPSG',2855,'PROJCS["NAD83(HARN) / Washington North",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.73333333333333],PARAMETER["standard_parallel_2",47.5],PARAMETER["latitude_of_origin",47],PARAMETER["central_meridian",-120.8333333333333],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2855"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.73333333333333 +lat_2=47.5 +lat_0=47 +lon_0=-120.8333333333333 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2855,'EPSG',2855,'PROJCS["NAD83(HARN) / Washington North",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.73333333333333],PARAMETER["standard_parallel_2",47.5],PARAMETER["latitude_of_origin",47],PARAMETER["central_meridian",-120.8333333333333],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2855"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.73333333333333 +lat_2=47.5 +lat_0=47 +lon_0=-120.8333333333333 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2856 : NAD83(HARN) / Washington South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2856,'EPSG',2856,'PROJCS["NAD83(HARN) / Washington South",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.33333333333334],PARAMETER["standard_parallel_2",45.83333333333334],PARAMETER["latitude_of_origin",45.33333333333334],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2856"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.33333333333334 +lat_2=45.83333333333334 +lat_0=45.33333333333334 +lon_0=-120.5 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2856,'EPSG',2856,'PROJCS["NAD83(HARN) / Washington South",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.33333333333334],PARAMETER["standard_parallel_2",45.83333333333334],PARAMETER["latitude_of_origin",45.33333333333334],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2856"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.33333333333334 +lat_2=45.83333333333334 +lat_0=45.33333333333334 +lon_0=-120.5 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2857 : NAD83(HARN) / West Virginia North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2857,'EPSG',2857,'PROJCS["NAD83(HARN) / West Virginia North",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.25],PARAMETER["standard_parallel_2",39],PARAMETER["latitude_of_origin",38.5],PARAMETER["central_meridian",-79.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2857"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.25 +lat_2=39 +lat_0=38.5 +lon_0=-79.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2857,'EPSG',2857,'PROJCS["NAD83(HARN) / West Virginia North",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.25],PARAMETER["standard_parallel_2",39],PARAMETER["latitude_of_origin",38.5],PARAMETER["central_meridian",-79.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2857"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.25 +lat_2=39 +lat_0=38.5 +lon_0=-79.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2858 : NAD83(HARN) / West Virginia South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2858,'EPSG',2858,'PROJCS["NAD83(HARN) / West Virginia South",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.88333333333333],PARAMETER["standard_parallel_2",37.48333333333333],PARAMETER["latitude_of_origin",37],PARAMETER["central_meridian",-81],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2858"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.88333333333333 +lat_2=37.48333333333333 +lat_0=37 +lon_0=-81 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2858,'EPSG',2858,'PROJCS["NAD83(HARN) / West Virginia South",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.88333333333333],PARAMETER["standard_parallel_2",37.48333333333333],PARAMETER["latitude_of_origin",37],PARAMETER["central_meridian",-81],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2858"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.88333333333333 +lat_2=37.48333333333333 +lat_0=37 +lon_0=-81 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2859 : NAD83(HARN) / Wisconsin North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2859,'EPSG',2859,'PROJCS["NAD83(HARN) / Wisconsin North",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",46.76666666666667],PARAMETER["standard_parallel_2",45.56666666666667],PARAMETER["latitude_of_origin",45.16666666666666],PARAMETER["central_meridian",-90],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2859"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=46.76666666666667 +lat_2=45.56666666666667 +lat_0=45.16666666666666 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2859,'EPSG',2859,'PROJCS["NAD83(HARN) / Wisconsin North",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",46.76666666666667],PARAMETER["standard_parallel_2",45.56666666666667],PARAMETER["latitude_of_origin",45.16666666666666],PARAMETER["central_meridian",-90],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2859"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=46.76666666666667 +lat_2=45.56666666666667 +lat_0=45.16666666666666 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2860 : NAD83(HARN) / Wisconsin Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2860,'EPSG',2860,'PROJCS["NAD83(HARN) / Wisconsin Central",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.5],PARAMETER["standard_parallel_2",44.25],PARAMETER["latitude_of_origin",43.83333333333334],PARAMETER["central_meridian",-90],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2860"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.5 +lat_2=44.25 +lat_0=43.83333333333334 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2860,'EPSG',2860,'PROJCS["NAD83(HARN) / Wisconsin Central",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.5],PARAMETER["standard_parallel_2",44.25],PARAMETER["latitude_of_origin",43.83333333333334],PARAMETER["central_meridian",-90],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2860"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.5 +lat_2=44.25 +lat_0=43.83333333333334 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2861 : NAD83(HARN) / Wisconsin South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2861,'EPSG',2861,'PROJCS["NAD83(HARN) / Wisconsin South",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44.06666666666667],PARAMETER["standard_parallel_2",42.73333333333333],PARAMETER["latitude_of_origin",42],PARAMETER["central_meridian",-90],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2861"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44.06666666666667 +lat_2=42.73333333333333 +lat_0=42 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2861,'EPSG',2861,'PROJCS["NAD83(HARN) / Wisconsin South",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44.06666666666667],PARAMETER["standard_parallel_2",42.73333333333333],PARAMETER["latitude_of_origin",42],PARAMETER["central_meridian",-90],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2861"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44.06666666666667 +lat_2=42.73333333333333 +lat_0=42 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2862 : NAD83(HARN) / Wyoming East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2862,'EPSG',2862,'PROJCS["NAD83(HARN) / Wyoming East",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-105.1666666666667],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2862"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-105.1666666666667 +k=0.9999375 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2862,'EPSG',2862,'PROJCS["NAD83(HARN) / Wyoming East",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-105.1666666666667],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2862"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-105.1666666666667 +k=0.9999375 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2863 : NAD83(HARN) / Wyoming East Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2863,'EPSG',2863,'PROJCS["NAD83(HARN) / Wyoming East Central",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-107.3333333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",400000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","2863"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-107.3333333333333 +k=0.9999375 +x_0=400000 +y_0=100000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2863,'EPSG',2863,'PROJCS["NAD83(HARN) / Wyoming East Central",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-107.3333333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",400000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","2863"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-107.3333333333333 +k=0.9999375 +x_0=400000 +y_0=100000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2864 : NAD83(HARN) / Wyoming West Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2864,'EPSG',2864,'PROJCS["NAD83(HARN) / Wyoming West Central",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-108.75],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2864"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-108.75 +k=0.9999375 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2864,'EPSG',2864,'PROJCS["NAD83(HARN) / Wyoming West Central",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-108.75],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2864"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-108.75 +k=0.9999375 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2865 : NAD83(HARN) / Wyoming West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2865,'EPSG',2865,'PROJCS["NAD83(HARN) / Wyoming West",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-110.0833333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",800000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","2865"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-110.0833333333333 +k=0.9999375 +x_0=800000 +y_0=100000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2865,'EPSG',2865,'PROJCS["NAD83(HARN) / Wyoming West",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-110.0833333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",800000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","2865"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-110.0833333333333 +k=0.9999375 +x_0=800000 +y_0=100000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2866 : NAD83(HARN) / Puerto Rico and Virgin Is. --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2866,'EPSG',2866,'PROJCS["NAD83(HARN) / Puerto Rico and Virgin Is.",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",18.43333333333333],PARAMETER["standard_parallel_2",18.03333333333333],PARAMETER["latitude_of_origin",17.83333333333333],PARAMETER["central_meridian",-66.43333333333334],PARAMETER["false_easting",200000],PARAMETER["false_northing",200000],AUTHORITY["EPSG","2866"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=18.43333333333333 +lat_2=18.03333333333333 +lat_0=17.83333333333333 +lon_0=-66.43333333333334 +x_0=200000 +y_0=200000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2866,'EPSG',2866,'PROJCS["NAD83(HARN) / Puerto Rico and Virgin Is.",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",18.43333333333333],PARAMETER["standard_parallel_2",18.03333333333333],PARAMETER["latitude_of_origin",17.83333333333333],PARAMETER["central_meridian",-66.43333333333334],PARAMETER["false_easting",200000],PARAMETER["false_northing",200000],AUTHORITY["EPSG","2866"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=18.43333333333333 +lat_2=18.03333333333333 +lat_0=17.83333333333333 +lon_0=-66.43333333333334 +x_0=200000 +y_0=200000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2867 : NAD83(HARN) / Arizona East (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2867,'EPSG',2867,'PROJCS["NAD83(HARN) / Arizona East (ft)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-110.1666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2867"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2867,'EPSG',2867,'PROJCS["NAD83(HARN) / Arizona East (ft)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-110.1666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2867"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 2868 : NAD83(HARN) / Arizona Central (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2868,'EPSG',2868,'PROJCS["NAD83(HARN) / Arizona Central (ft)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-111.9166666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2868"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2868,'EPSG',2868,'PROJCS["NAD83(HARN) / Arizona Central (ft)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-111.9166666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2868"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 2869 : NAD83(HARN) / Arizona West (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2869,'EPSG',2869,'PROJCS["NAD83(HARN) / Arizona West (ft)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-113.75],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2869"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.999933333 +x_0=213360 +y_0=0 +ellps=GRS80 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2869,'EPSG',2869,'PROJCS["NAD83(HARN) / Arizona West (ft)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-113.75],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2869"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.999933333 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 2870 : NAD83(HARN) / California zone 1 (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2870,'EPSG',2870,'PROJCS["NAD83(HARN) / California zone 1 (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.66666666666666],PARAMETER["standard_parallel_2",40],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-122],PARAMETER["false_easting",6561666.667],PARAMETER["false_northing",1640416.667],AUTHORITY["EPSG","2870"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.66666666666666 +lat_2=40 +lat_0=39.33333333333334 +lon_0=-122 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2870,'EPSG',2870,'PROJCS["NAD83(HARN) / California zone 1 (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.66666666666666],PARAMETER["standard_parallel_2",40],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-122],PARAMETER["false_easting",6561666.667],PARAMETER["false_northing",1640416.667],AUTHORITY["EPSG","2870"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.66666666666666 +lat_2=40 +lat_0=39.33333333333334 +lon_0=-122 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2871 : NAD83(HARN) / California zone 2 (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2871,'EPSG',2871,'PROJCS["NAD83(HARN) / California zone 2 (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.83333333333334],PARAMETER["standard_parallel_2",38.33333333333334],PARAMETER["latitude_of_origin",37.66666666666666],PARAMETER["central_meridian",-122],PARAMETER["false_easting",6561666.667],PARAMETER["false_northing",1640416.667],AUTHORITY["EPSG","2871"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.83333333333334 +lat_2=38.33333333333334 +lat_0=37.66666666666666 +lon_0=-122 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2871,'EPSG',2871,'PROJCS["NAD83(HARN) / California zone 2 (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.83333333333334],PARAMETER["standard_parallel_2",38.33333333333334],PARAMETER["latitude_of_origin",37.66666666666666],PARAMETER["central_meridian",-122],PARAMETER["false_easting",6561666.667],PARAMETER["false_northing",1640416.667],AUTHORITY["EPSG","2871"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.83333333333334 +lat_2=38.33333333333334 +lat_0=37.66666666666666 +lon_0=-122 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2872 : NAD83(HARN) / California zone 3 (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2872,'EPSG',2872,'PROJCS["NAD83(HARN) / California zone 3 (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.43333333333333],PARAMETER["standard_parallel_2",37.06666666666667],PARAMETER["latitude_of_origin",36.5],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",6561666.667],PARAMETER["false_northing",1640416.667],AUTHORITY["EPSG","2872"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.43333333333333 +lat_2=37.06666666666667 +lat_0=36.5 +lon_0=-120.5 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2872,'EPSG',2872,'PROJCS["NAD83(HARN) / California zone 3 (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.43333333333333],PARAMETER["standard_parallel_2",37.06666666666667],PARAMETER["latitude_of_origin",36.5],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",6561666.667],PARAMETER["false_northing",1640416.667],AUTHORITY["EPSG","2872"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.43333333333333 +lat_2=37.06666666666667 +lat_0=36.5 +lon_0=-120.5 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2873 : NAD83(HARN) / California zone 4 (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2873,'EPSG',2873,'PROJCS["NAD83(HARN) / California zone 4 (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.25],PARAMETER["standard_parallel_2",36],PARAMETER["latitude_of_origin",35.33333333333334],PARAMETER["central_meridian",-119],PARAMETER["false_easting",6561666.667],PARAMETER["false_northing",1640416.667],AUTHORITY["EPSG","2873"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.25 +lat_2=36 +lat_0=35.33333333333334 +lon_0=-119 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2873,'EPSG',2873,'PROJCS["NAD83(HARN) / California zone 4 (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.25],PARAMETER["standard_parallel_2",36],PARAMETER["latitude_of_origin",35.33333333333334],PARAMETER["central_meridian",-119],PARAMETER["false_easting",6561666.667],PARAMETER["false_northing",1640416.667],AUTHORITY["EPSG","2873"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.25 +lat_2=36 +lat_0=35.33333333333334 +lon_0=-119 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2874 : NAD83(HARN) / California zone 5 (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2874,'EPSG',2874,'PROJCS["NAD83(HARN) / California zone 5 (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",35.46666666666667],PARAMETER["standard_parallel_2",34.03333333333333],PARAMETER["latitude_of_origin",33.5],PARAMETER["central_meridian",-118],PARAMETER["false_easting",6561666.667],PARAMETER["false_northing",1640416.667],AUTHORITY["EPSG","2874"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=35.46666666666667 +lat_2=34.03333333333333 +lat_0=33.5 +lon_0=-118 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2874,'EPSG',2874,'PROJCS["NAD83(HARN) / California zone 5 (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",35.46666666666667],PARAMETER["standard_parallel_2",34.03333333333333],PARAMETER["latitude_of_origin",33.5],PARAMETER["central_meridian",-118],PARAMETER["false_easting",6561666.667],PARAMETER["false_northing",1640416.667],AUTHORITY["EPSG","2874"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=35.46666666666667 +lat_2=34.03333333333333 +lat_0=33.5 +lon_0=-118 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2875 : NAD83(HARN) / California zone 6 (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2875,'EPSG',2875,'PROJCS["NAD83(HARN) / California zone 6 (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",33.88333333333333],PARAMETER["standard_parallel_2",32.78333333333333],PARAMETER["latitude_of_origin",32.16666666666666],PARAMETER["central_meridian",-116.25],PARAMETER["false_easting",6561666.667],PARAMETER["false_northing",1640416.667],AUTHORITY["EPSG","2875"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=33.88333333333333 +lat_2=32.78333333333333 +lat_0=32.16666666666666 +lon_0=-116.25 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2875,'EPSG',2875,'PROJCS["NAD83(HARN) / California zone 6 (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",33.88333333333333],PARAMETER["standard_parallel_2",32.78333333333333],PARAMETER["latitude_of_origin",32.16666666666666],PARAMETER["central_meridian",-116.25],PARAMETER["false_easting",6561666.667],PARAMETER["false_northing",1640416.667],AUTHORITY["EPSG","2875"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=33.88333333333333 +lat_2=32.78333333333333 +lat_0=32.16666666666666 +lon_0=-116.25 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2876 : NAD83(HARN) / Colorado North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2876,'EPSG',2876,'PROJCS["NAD83(HARN) / Colorado North (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.78333333333333],PARAMETER["standard_parallel_2",39.71666666666667],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-105.5],PARAMETER["false_easting",3000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","2876"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.78333333333333 +lat_2=39.71666666666667 +lat_0=39.33333333333334 +lon_0=-105.5 +x_0=914401.8288036576 +y_0=304800.6096012192 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2876,'EPSG',2876,'PROJCS["NAD83(HARN) / Colorado North (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.78333333333333],PARAMETER["standard_parallel_2",39.71666666666667],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-105.5],PARAMETER["false_easting",3000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","2876"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.78333333333333 +lat_2=39.71666666666667 +lat_0=39.33333333333334 +lon_0=-105.5 +x_0=914401.8288036576 +y_0=304800.6096012192 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2877 : NAD83(HARN) / Colorado Central (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2877,'EPSG',2877,'PROJCS["NAD83(HARN) / Colorado Central (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.75],PARAMETER["standard_parallel_2",38.45],PARAMETER["latitude_of_origin",37.83333333333334],PARAMETER["central_meridian",-105.5],PARAMETER["false_easting",3000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","2877"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.75 +lat_2=38.45 +lat_0=37.83333333333334 +lon_0=-105.5 +x_0=914401.8288036576 +y_0=304800.6096012192 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2877,'EPSG',2877,'PROJCS["NAD83(HARN) / Colorado Central (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.75],PARAMETER["standard_parallel_2",38.45],PARAMETER["latitude_of_origin",37.83333333333334],PARAMETER["central_meridian",-105.5],PARAMETER["false_easting",3000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","2877"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.75 +lat_2=38.45 +lat_0=37.83333333333334 +lon_0=-105.5 +x_0=914401.8288036576 +y_0=304800.6096012192 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2878 : NAD83(HARN) / Colorado South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2878,'EPSG',2878,'PROJCS["NAD83(HARN) / Colorado South (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.43333333333333],PARAMETER["standard_parallel_2",37.23333333333333],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-105.5],PARAMETER["false_easting",3000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","2878"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.43333333333333 +lat_2=37.23333333333333 +lat_0=36.66666666666666 +lon_0=-105.5 +x_0=914401.8288036576 +y_0=304800.6096012192 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2878,'EPSG',2878,'PROJCS["NAD83(HARN) / Colorado South (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.43333333333333],PARAMETER["standard_parallel_2",37.23333333333333],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-105.5],PARAMETER["false_easting",3000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","2878"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.43333333333333 +lat_2=37.23333333333333 +lat_0=36.66666666666666 +lon_0=-105.5 +x_0=914401.8288036576 +y_0=304800.6096012192 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2879 : NAD83(HARN) / Connecticut (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2879,'EPSG',2879,'PROJCS["NAD83(HARN) / Connecticut (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.86666666666667],PARAMETER["standard_parallel_2",41.2],PARAMETER["latitude_of_origin",40.83333333333334],PARAMETER["central_meridian",-72.75],PARAMETER["false_easting",1000000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","2879"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.86666666666667 +lat_2=41.2 +lat_0=40.83333333333334 +lon_0=-72.75 +x_0=304800.6096012192 +y_0=152400.3048006096 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2879,'EPSG',2879,'PROJCS["NAD83(HARN) / Connecticut (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.86666666666667],PARAMETER["standard_parallel_2",41.2],PARAMETER["latitude_of_origin",40.83333333333334],PARAMETER["central_meridian",-72.75],PARAMETER["false_easting",1000000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","2879"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.86666666666667 +lat_2=41.2 +lat_0=40.83333333333334 +lon_0=-72.75 +x_0=304800.6096012192 +y_0=152400.3048006096 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2880 : NAD83(HARN) / Delaware (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2880,'EPSG',2880,'PROJCS["NAD83(HARN) / Delaware (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",38],PARAMETER["central_meridian",-75.41666666666667],PARAMETER["scale_factor",0.999995],PARAMETER["false_easting",656166.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2880"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999995 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2880,'EPSG',2880,'PROJCS["NAD83(HARN) / Delaware (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",38],PARAMETER["central_meridian",-75.41666666666667],PARAMETER["scale_factor",0.999995],PARAMETER["false_easting",656166.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2880"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999995 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2881 : NAD83(HARN) / Florida East (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2881,'EPSG',2881,'PROJCS["NAD83(HARN) / Florida East (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",24.33333333333333],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",656166.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2881"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999941177 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2881,'EPSG',2881,'PROJCS["NAD83(HARN) / Florida East (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",24.33333333333333],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",656166.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2881"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999941177 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2882 : NAD83(HARN) / Florida West (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2882,'EPSG',2882,'PROJCS["NAD83(HARN) / Florida West (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",24.33333333333333],PARAMETER["central_meridian",-82],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",656166.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2882"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999941177 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2882,'EPSG',2882,'PROJCS["NAD83(HARN) / Florida West (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",24.33333333333333],PARAMETER["central_meridian",-82],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",656166.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2882"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999941177 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2883 : NAD83(HARN) / Florida North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2883,'EPSG',2883,'PROJCS["NAD83(HARN) / Florida North (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",30.75],PARAMETER["standard_parallel_2",29.58333333333333],PARAMETER["latitude_of_origin",29],PARAMETER["central_meridian",-84.5],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","2883"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=30.75 +lat_2=29.58333333333333 +lat_0=29 +lon_0=-84.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2883,'EPSG',2883,'PROJCS["NAD83(HARN) / Florida North (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",30.75],PARAMETER["standard_parallel_2",29.58333333333333],PARAMETER["latitude_of_origin",29],PARAMETER["central_meridian",-84.5],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","2883"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=30.75 +lat_2=29.58333333333333 +lat_0=29 +lon_0=-84.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2884 : NAD83(HARN) / Georgia East (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2884,'EPSG',2884,'PROJCS["NAD83(HARN) / Georgia East (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",-82.16666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",656166.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2884"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.9999 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2884,'EPSG',2884,'PROJCS["NAD83(HARN) / Georgia East (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",-82.16666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",656166.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2884"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.9999 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2885 : NAD83(HARN) / Georgia West (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2885,'EPSG',2885,'PROJCS["NAD83(HARN) / Georgia West (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",-84.16666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",2296583.333],PARAMETER["false_northing",0],AUTHORITY["EPSG","2885"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.9999 +x_0=699999.9998983998 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2885,'EPSG',2885,'PROJCS["NAD83(HARN) / Georgia West (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",-84.16666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",2296583.333],PARAMETER["false_northing",0],AUTHORITY["EPSG","2885"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.9999 +x_0=699999.9998983998 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2886 : NAD83(HARN) / Idaho East (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2886,'EPSG',2886,'PROJCS["NAD83(HARN) / Idaho East (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-112.1666666666667],PARAMETER["scale_factor",0.999947368],PARAMETER["false_easting",656166.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2886"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666666667 +k=0.9999473679999999 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2886,'EPSG',2886,'PROJCS["NAD83(HARN) / Idaho East (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-112.1666666666667],PARAMETER["scale_factor",0.999947368],PARAMETER["false_easting",656166.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2886"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666666667 +k=0.9999473679999999 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2887 : NAD83(HARN) / Idaho Central (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2887,'EPSG',2887,'PROJCS["NAD83(HARN) / Idaho Central (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-114],PARAMETER["scale_factor",0.999947368],PARAMETER["false_easting",1640416.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2887"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.9999473679999999 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2887,'EPSG',2887,'PROJCS["NAD83(HARN) / Idaho Central (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-114],PARAMETER["scale_factor",0.999947368],PARAMETER["false_easting",1640416.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2887"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.9999473679999999 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2888 : NAD83(HARN) / Idaho West (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2888,'EPSG',2888,'PROJCS["NAD83(HARN) / Idaho West (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-115.75],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",2624666.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2888"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0.999933333 +x_0=800000.0001016001 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2888,'EPSG',2888,'PROJCS["NAD83(HARN) / Idaho West (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-115.75],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",2624666.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2888"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0.999933333 +x_0=800000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2889 : NAD83(HARN) / Indiana East (ftUS) (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2889,'EPSG',2889,'PROJCS["NAD83(HARN) / Indiana East (ftUS) (deprecated)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-85.66666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",328083.333],PARAMETER["false_northing",818125],AUTHORITY["EPSG","2889"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999966667 +x_0=99999.99989839978 +y_0=249364.9987299975 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2889,'EPSG',2889,'PROJCS["NAD83(HARN) / Indiana East (ftUS) (deprecated)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-85.66666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",328083.333],PARAMETER["false_northing",818125],AUTHORITY["EPSG","2889"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999966667 +x_0=99999.99989839978 +y_0=249364.9987299975 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2890 : NAD83(HARN) / Indiana West (ftUS) (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2890,'EPSG',2890,'PROJCS["NAD83(HARN) / Indiana West (ftUS) (deprecated)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-87.08333333333333],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",2952750],PARAMETER["false_northing",818125],AUTHORITY["EPSG","2890"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999966667 +x_0=900000 +y_0=249364.9987299975 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2890,'EPSG',2890,'PROJCS["NAD83(HARN) / Indiana West (ftUS) (deprecated)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-87.08333333333333],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",2952750],PARAMETER["false_northing",818125],AUTHORITY["EPSG","2890"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999966667 +x_0=900000 +y_0=249364.9987299975 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2891 : NAD83(HARN) / Kentucky North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2891,'EPSG',2891,'PROJCS["NAD83(HARN) / Kentucky North (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.96666666666667],PARAMETER["standard_parallel_2",38.96666666666667],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-84.25],PARAMETER["false_easting",1640416.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2891"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.96666666666667 +lat_2=38.96666666666667 +lat_0=37.5 +lon_0=-84.25 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2891,'EPSG',2891,'PROJCS["NAD83(HARN) / Kentucky North (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.96666666666667],PARAMETER["standard_parallel_2",38.96666666666667],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-84.25],PARAMETER["false_easting",1640416.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2891"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.96666666666667 +lat_2=38.96666666666667 +lat_0=37.5 +lon_0=-84.25 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2892 : NAD83(HARN) / Kentucky South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2892,'EPSG',2892,'PROJCS["NAD83(HARN) / Kentucky South (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.93333333333333],PARAMETER["standard_parallel_2",36.73333333333333],PARAMETER["latitude_of_origin",36.33333333333334],PARAMETER["central_meridian",-85.75],PARAMETER["false_easting",1640416.667],PARAMETER["false_northing",1640416.667],AUTHORITY["EPSG","2892"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.93333333333333 +lat_2=36.73333333333333 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=500000.0001016001 +y_0=500000.0001016001 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2892,'EPSG',2892,'PROJCS["NAD83(HARN) / Kentucky South (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.93333333333333],PARAMETER["standard_parallel_2",36.73333333333333],PARAMETER["latitude_of_origin",36.33333333333334],PARAMETER["central_meridian",-85.75],PARAMETER["false_easting",1640416.667],PARAMETER["false_northing",1640416.667],AUTHORITY["EPSG","2892"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.93333333333333 +lat_2=36.73333333333333 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=500000.0001016001 +y_0=500000.0001016001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2893 : NAD83(HARN) / Maryland (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2893,'EPSG',2893,'PROJCS["NAD83(HARN) / Maryland (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.45],PARAMETER["standard_parallel_2",38.3],PARAMETER["latitude_of_origin",37.66666666666666],PARAMETER["central_meridian",-77],PARAMETER["false_easting",1312333.333],PARAMETER["false_northing",0],AUTHORITY["EPSG","2893"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.45 +lat_2=38.3 +lat_0=37.66666666666666 +lon_0=-77 +x_0=399999.9998983998 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2893,'EPSG',2893,'PROJCS["NAD83(HARN) / Maryland (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.45],PARAMETER["standard_parallel_2",38.3],PARAMETER["latitude_of_origin",37.66666666666666],PARAMETER["central_meridian",-77],PARAMETER["false_easting",1312333.333],PARAMETER["false_northing",0],AUTHORITY["EPSG","2893"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.45 +lat_2=38.3 +lat_0=37.66666666666666 +lon_0=-77 +x_0=399999.9998983998 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2894 : NAD83(HARN) / Massachusetts Mainland (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2894,'EPSG',2894,'PROJCS["NAD83(HARN) / Massachusetts Mainland (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",42.68333333333333],PARAMETER["standard_parallel_2",41.71666666666667],PARAMETER["latitude_of_origin",41],PARAMETER["central_meridian",-71.5],PARAMETER["false_easting",656166.667],PARAMETER["false_northing",2460625],AUTHORITY["EPSG","2894"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=42.68333333333333 +lat_2=41.71666666666667 +lat_0=41 +lon_0=-71.5 +x_0=200000.0001016002 +y_0=750000 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2894,'EPSG',2894,'PROJCS["NAD83(HARN) / Massachusetts Mainland (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",42.68333333333333],PARAMETER["standard_parallel_2",41.71666666666667],PARAMETER["latitude_of_origin",41],PARAMETER["central_meridian",-71.5],PARAMETER["false_easting",656166.667],PARAMETER["false_northing",2460625],AUTHORITY["EPSG","2894"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=42.68333333333333 +lat_2=41.71666666666667 +lat_0=41 +lon_0=-71.5 +x_0=200000.0001016002 +y_0=750000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2895 : NAD83(HARN) / Massachusetts Island (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2895,'EPSG',2895,'PROJCS["NAD83(HARN) / Massachusetts Island (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.48333333333333],PARAMETER["standard_parallel_2",41.28333333333333],PARAMETER["latitude_of_origin",41],PARAMETER["central_meridian",-70.5],PARAMETER["false_easting",1640416.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2895"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.48333333333333 +lat_2=41.28333333333333 +lat_0=41 +lon_0=-70.5 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2895,'EPSG',2895,'PROJCS["NAD83(HARN) / Massachusetts Island (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.48333333333333],PARAMETER["standard_parallel_2",41.28333333333333],PARAMETER["latitude_of_origin",41],PARAMETER["central_meridian",-70.5],PARAMETER["false_easting",1640416.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2895"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.48333333333333 +lat_2=41.28333333333333 +lat_0=41 +lon_0=-70.5 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2896 : NAD83(HARN) / Michigan North (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2896,'EPSG',2896,'PROJCS["NAD83(HARN) / Michigan North (ft)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.08333333333334],PARAMETER["standard_parallel_2",45.48333333333333],PARAMETER["latitude_of_origin",44.78333333333333],PARAMETER["central_meridian",-87],PARAMETER["false_easting",26246719.16],PARAMETER["false_northing",0],AUTHORITY["EPSG","2896"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.08333333333334 +lat_2=45.48333333333333 +lat_0=44.78333333333333 +lon_0=-87 +x_0=7999999.999968001 +y_0=0 +ellps=GRS80 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2896,'EPSG',2896,'PROJCS["NAD83(HARN) / Michigan North (ft)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.08333333333334],PARAMETER["standard_parallel_2",45.48333333333333],PARAMETER["latitude_of_origin",44.78333333333333],PARAMETER["central_meridian",-87],PARAMETER["false_easting",26246719.16],PARAMETER["false_northing",0],AUTHORITY["EPSG","2896"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.08333333333334 +lat_2=45.48333333333333 +lat_0=44.78333333333333 +lon_0=-87 +x_0=7999999.999968001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 2897 : NAD83(HARN) / Michigan Central (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2897,'EPSG',2897,'PROJCS["NAD83(HARN) / Michigan Central (ft)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.7],PARAMETER["standard_parallel_2",44.18333333333333],PARAMETER["latitude_of_origin",43.31666666666667],PARAMETER["central_meridian",-84.36666666666666],PARAMETER["false_easting",19685039.37],PARAMETER["false_northing",0],AUTHORITY["EPSG","2897"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.7 +lat_2=44.18333333333333 +lat_0=43.31666666666667 +lon_0=-84.36666666666666 +x_0=5999999.999976001 +y_0=0 +ellps=GRS80 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2897,'EPSG',2897,'PROJCS["NAD83(HARN) / Michigan Central (ft)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.7],PARAMETER["standard_parallel_2",44.18333333333333],PARAMETER["latitude_of_origin",43.31666666666667],PARAMETER["central_meridian",-84.36666666666666],PARAMETER["false_easting",19685039.37],PARAMETER["false_northing",0],AUTHORITY["EPSG","2897"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.7 +lat_2=44.18333333333333 +lat_0=43.31666666666667 +lon_0=-84.36666666666666 +x_0=5999999.999976001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 2898 : NAD83(HARN) / Michigan South (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2898,'EPSG',2898,'PROJCS["NAD83(HARN) / Michigan South (ft)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43.66666666666666],PARAMETER["standard_parallel_2",42.1],PARAMETER["latitude_of_origin",41.5],PARAMETER["central_meridian",-84.36666666666666],PARAMETER["false_easting",13123359.58],PARAMETER["false_northing",0],AUTHORITY["EPSG","2898"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43.66666666666666 +lat_2=42.1 +lat_0=41.5 +lon_0=-84.36666666666666 +x_0=3999999.999984 +y_0=0 +ellps=GRS80 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2898,'EPSG',2898,'PROJCS["NAD83(HARN) / Michigan South (ft)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43.66666666666666],PARAMETER["standard_parallel_2",42.1],PARAMETER["latitude_of_origin",41.5],PARAMETER["central_meridian",-84.36666666666666],PARAMETER["false_easting",13123359.58],PARAMETER["false_northing",0],AUTHORITY["EPSG","2898"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43.66666666666666 +lat_2=42.1 +lat_0=41.5 +lon_0=-84.36666666666666 +x_0=3999999.999984 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 2899 : NAD83(HARN) / Mississippi East (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2899,'EPSG',2899,'PROJCS["NAD83(HARN) / Mississippi East (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",29.5],PARAMETER["central_meridian",-88.83333333333333],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",984250.0000000002],PARAMETER["false_northing",0],AUTHORITY["EPSG","2899"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=29.5 +lon_0=-88.83333333333333 +k=0.99995 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2899,'EPSG',2899,'PROJCS["NAD83(HARN) / Mississippi East (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",29.5],PARAMETER["central_meridian",-88.83333333333333],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",984250.0000000002],PARAMETER["false_northing",0],AUTHORITY["EPSG","2899"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=29.5 +lon_0=-88.83333333333333 +k=0.99995 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2900 : NAD83(HARN) / Mississippi West (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2900,'EPSG',2900,'PROJCS["NAD83(HARN) / Mississippi West (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",29.5],PARAMETER["central_meridian",-90.33333333333333],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",2296583.333],PARAMETER["false_northing",0],AUTHORITY["EPSG","2900"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=29.5 +lon_0=-90.33333333333333 +k=0.99995 +x_0=699999.9998983998 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2900,'EPSG',2900,'PROJCS["NAD83(HARN) / Mississippi West (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",29.5],PARAMETER["central_meridian",-90.33333333333333],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",2296583.333],PARAMETER["false_northing",0],AUTHORITY["EPSG","2900"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=29.5 +lon_0=-90.33333333333333 +k=0.99995 +x_0=699999.9998983998 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2901 : NAD83(HARN) / Montana (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2901,'EPSG',2901,'PROJCS["NAD83(HARN) / Montana (ft)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",49],PARAMETER["standard_parallel_2",45],PARAMETER["latitude_of_origin",44.25],PARAMETER["central_meridian",-109.5],PARAMETER["false_easting",1968503.937],PARAMETER["false_northing",0],AUTHORITY["EPSG","2901"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=49 +lat_2=45 +lat_0=44.25 +lon_0=-109.5 +x_0=599999.9999976 +y_0=0 +ellps=GRS80 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2901,'EPSG',2901,'PROJCS["NAD83(HARN) / Montana (ft)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",49],PARAMETER["standard_parallel_2",45],PARAMETER["latitude_of_origin",44.25],PARAMETER["central_meridian",-109.5],PARAMETER["false_easting",1968503.937],PARAMETER["false_northing",0],AUTHORITY["EPSG","2901"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=49 +lat_2=45 +lat_0=44.25 +lon_0=-109.5 +x_0=599999.9999976 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 2902 : NAD83(HARN) / New Mexico East (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2902,'EPSG',2902,'PROJCS["NAD83(HARN) / New Mexico East (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-104.3333333333333],PARAMETER["scale_factor",0.999909091],PARAMETER["false_easting",541337.5],PARAMETER["false_northing",0],AUTHORITY["EPSG","2902"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.999909091 +x_0=165000 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2902,'EPSG',2902,'PROJCS["NAD83(HARN) / New Mexico East (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-104.3333333333333],PARAMETER["scale_factor",0.999909091],PARAMETER["false_easting",541337.5],PARAMETER["false_northing",0],AUTHORITY["EPSG","2902"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.999909091 +x_0=165000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2903 : NAD83(HARN) / New Mexico Central (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2903,'EPSG',2903,'PROJCS["NAD83(HARN) / New Mexico Central (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-106.25],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",1640416.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2903"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.9999 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2903,'EPSG',2903,'PROJCS["NAD83(HARN) / New Mexico Central (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-106.25],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",1640416.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2903"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.9999 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2904 : NAD83(HARN) / New Mexico West (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2904,'EPSG',2904,'PROJCS["NAD83(HARN) / New Mexico West (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-107.8333333333333],PARAMETER["scale_factor",0.999916667],PARAMETER["false_easting",2723091.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2904"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.999916667 +x_0=830000.0001016001 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2904,'EPSG',2904,'PROJCS["NAD83(HARN) / New Mexico West (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-107.8333333333333],PARAMETER["scale_factor",0.999916667],PARAMETER["false_easting",2723091.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2904"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.999916667 +x_0=830000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2905 : NAD83(HARN) / New York East (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2905,'EPSG',2905,'PROJCS["NAD83(HARN) / New York East (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],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","2905"],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 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2905,'EPSG',2905,'PROJCS["NAD83(HARN) / New York East (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],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","2905"],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 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2906 : NAD83(HARN) / New York Central (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2906,'EPSG',2906,'PROJCS["NAD83(HARN) / New York Central (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-76.58333333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",820208.3330000002],PARAMETER["false_northing",0],AUTHORITY["EPSG","2906"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.9999375 +x_0=249999.9998983998 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2906,'EPSG',2906,'PROJCS["NAD83(HARN) / New York Central (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-76.58333333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",820208.3330000002],PARAMETER["false_northing",0],AUTHORITY["EPSG","2906"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.9999375 +x_0=249999.9998983998 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2907 : NAD83(HARN) / New York West (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2907,'EPSG',2907,'PROJCS["NAD83(HARN) / New York West (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-78.58333333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",1148291.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2907"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.9999375 +x_0=350000.0001016001 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2907,'EPSG',2907,'PROJCS["NAD83(HARN) / New York West (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-78.58333333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",1148291.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2907"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.9999375 +x_0=350000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2908 : NAD83(HARN) / New York Long Island (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2908,'EPSG',2908,'PROJCS["NAD83(HARN) / New York Long Island (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.03333333333333],PARAMETER["standard_parallel_2",40.66666666666666],PARAMETER["latitude_of_origin",40.16666666666666],PARAMETER["central_meridian",-74],PARAMETER["false_easting",984250.0000000002],PARAMETER["false_northing",0],AUTHORITY["EPSG","2908"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.03333333333333 +lat_2=40.66666666666666 +lat_0=40.16666666666666 +lon_0=-74 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2908,'EPSG',2908,'PROJCS["NAD83(HARN) / New York Long Island (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.03333333333333],PARAMETER["standard_parallel_2",40.66666666666666],PARAMETER["latitude_of_origin",40.16666666666666],PARAMETER["central_meridian",-74],PARAMETER["false_easting",984250.0000000002],PARAMETER["false_northing",0],AUTHORITY["EPSG","2908"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.03333333333333 +lat_2=40.66666666666666 +lat_0=40.16666666666666 +lon_0=-74 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2909 : NAD83(HARN) / North Dakota North (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2909,'EPSG',2909,'PROJCS["NAD83(HARN) / North Dakota North (ft)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.73333333333333],PARAMETER["standard_parallel_2",47.43333333333333],PARAMETER["latitude_of_origin",47],PARAMETER["central_meridian",-100.5],PARAMETER["false_easting",1968503.937],PARAMETER["false_northing",0],AUTHORITY["EPSG","2909"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.73333333333333 +lat_2=47.43333333333333 +lat_0=47 +lon_0=-100.5 +x_0=599999.9999976 +y_0=0 +ellps=GRS80 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2909,'EPSG',2909,'PROJCS["NAD83(HARN) / North Dakota North (ft)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.73333333333333],PARAMETER["standard_parallel_2",47.43333333333333],PARAMETER["latitude_of_origin",47],PARAMETER["central_meridian",-100.5],PARAMETER["false_easting",1968503.937],PARAMETER["false_northing",0],AUTHORITY["EPSG","2909"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.73333333333333 +lat_2=47.43333333333333 +lat_0=47 +lon_0=-100.5 +x_0=599999.9999976 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 2910 : NAD83(HARN) / North Dakota South (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2910,'EPSG',2910,'PROJCS["NAD83(HARN) / North Dakota South (ft)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.48333333333333],PARAMETER["standard_parallel_2",46.18333333333333],PARAMETER["latitude_of_origin",45.66666666666666],PARAMETER["central_meridian",-100.5],PARAMETER["false_easting",1968503.937],PARAMETER["false_northing",0],AUTHORITY["EPSG","2910"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.48333333333333 +lat_2=46.18333333333333 +lat_0=45.66666666666666 +lon_0=-100.5 +x_0=599999.9999976 +y_0=0 +ellps=GRS80 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2910,'EPSG',2910,'PROJCS["NAD83(HARN) / North Dakota South (ft)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.48333333333333],PARAMETER["standard_parallel_2",46.18333333333333],PARAMETER["latitude_of_origin",45.66666666666666],PARAMETER["central_meridian",-100.5],PARAMETER["false_easting",1968503.937],PARAMETER["false_northing",0],AUTHORITY["EPSG","2910"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.48333333333333 +lat_2=46.18333333333333 +lat_0=45.66666666666666 +lon_0=-100.5 +x_0=599999.9999976 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 2911 : NAD83(HARN) / Oklahoma North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2911,'EPSG',2911,'PROJCS["NAD83(HARN) / Oklahoma North (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.76666666666667],PARAMETER["standard_parallel_2",35.56666666666667],PARAMETER["latitude_of_origin",35],PARAMETER["central_meridian",-98],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","2911"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.76666666666667 +lat_2=35.56666666666667 +lat_0=35 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2911,'EPSG',2911,'PROJCS["NAD83(HARN) / Oklahoma North (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.76666666666667],PARAMETER["standard_parallel_2",35.56666666666667],PARAMETER["latitude_of_origin",35],PARAMETER["central_meridian",-98],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","2911"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.76666666666667 +lat_2=35.56666666666667 +lat_0=35 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2912 : NAD83(HARN) / Oklahoma South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2912,'EPSG',2912,'PROJCS["NAD83(HARN) / Oklahoma South (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",35.23333333333333],PARAMETER["standard_parallel_2",33.93333333333333],PARAMETER["latitude_of_origin",33.33333333333334],PARAMETER["central_meridian",-98],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","2912"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=35.23333333333333 +lat_2=33.93333333333333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2912,'EPSG',2912,'PROJCS["NAD83(HARN) / Oklahoma South (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",35.23333333333333],PARAMETER["standard_parallel_2",33.93333333333333],PARAMETER["latitude_of_origin",33.33333333333334],PARAMETER["central_meridian",-98],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","2912"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=35.23333333333333 +lat_2=33.93333333333333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2913 : NAD83(HARN) / Oregon North (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2913,'EPSG',2913,'PROJCS["NAD83(HARN) / Oregon North (ft)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",46],PARAMETER["standard_parallel_2",44.33333333333334],PARAMETER["latitude_of_origin",43.66666666666666],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",8202099.738],PARAMETER["false_northing",0],AUTHORITY["EPSG","2913"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=46 +lat_2=44.33333333333334 +lat_0=43.66666666666666 +lon_0=-120.5 +x_0=2500000.0001424 +y_0=0 +ellps=GRS80 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2913,'EPSG',2913,'PROJCS["NAD83(HARN) / Oregon North (ft)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",46],PARAMETER["standard_parallel_2",44.33333333333334],PARAMETER["latitude_of_origin",43.66666666666666],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",8202099.738],PARAMETER["false_northing",0],AUTHORITY["EPSG","2913"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=46 +lat_2=44.33333333333334 +lat_0=43.66666666666666 +lon_0=-120.5 +x_0=2500000.0001424 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 2914 : NAD83(HARN) / Oregon South (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2914,'EPSG',2914,'PROJCS["NAD83(HARN) / Oregon South (ft)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44],PARAMETER["standard_parallel_2",42.33333333333334],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",4921259.843],PARAMETER["false_northing",0],AUTHORITY["EPSG","2914"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44 +lat_2=42.33333333333334 +lat_0=41.66666666666666 +lon_0=-120.5 +x_0=1500000.0001464 +y_0=0 +ellps=GRS80 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2914,'EPSG',2914,'PROJCS["NAD83(HARN) / Oregon South (ft)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44],PARAMETER["standard_parallel_2",42.33333333333334],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",4921259.843],PARAMETER["false_northing",0],AUTHORITY["EPSG","2914"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44 +lat_2=42.33333333333334 +lat_0=41.66666666666666 +lon_0=-120.5 +x_0=1500000.0001464 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 2915 : NAD83(HARN) / Tennessee (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2915,'EPSG',2915,'PROJCS["NAD83(HARN) / Tennessee (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.41666666666666],PARAMETER["standard_parallel_2",35.25],PARAMETER["latitude_of_origin",34.33333333333334],PARAMETER["central_meridian",-86],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","2915"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.41666666666666 +lat_2=35.25 +lat_0=34.33333333333334 +lon_0=-86 +x_0=600000 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2915,'EPSG',2915,'PROJCS["NAD83(HARN) / Tennessee (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.41666666666666],PARAMETER["standard_parallel_2",35.25],PARAMETER["latitude_of_origin",34.33333333333334],PARAMETER["central_meridian",-86],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","2915"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.41666666666666 +lat_2=35.25 +lat_0=34.33333333333334 +lon_0=-86 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2916 : NAD83(HARN) / Texas North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2916,'EPSG',2916,'PROJCS["NAD83(HARN) / Texas North (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.18333333333333],PARAMETER["standard_parallel_2",34.65],PARAMETER["latitude_of_origin",34],PARAMETER["central_meridian",-101.5],PARAMETER["false_easting",656166.667],PARAMETER["false_northing",3280833.333],AUTHORITY["EPSG","2916"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.18333333333333 +lat_2=34.65 +lat_0=34 +lon_0=-101.5 +x_0=200000.0001016002 +y_0=999999.9998983998 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2916,'EPSG',2916,'PROJCS["NAD83(HARN) / Texas North (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.18333333333333],PARAMETER["standard_parallel_2",34.65],PARAMETER["latitude_of_origin",34],PARAMETER["central_meridian",-101.5],PARAMETER["false_easting",656166.667],PARAMETER["false_northing",3280833.333],AUTHORITY["EPSG","2916"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.18333333333333 +lat_2=34.65 +lat_0=34 +lon_0=-101.5 +x_0=200000.0001016002 +y_0=999999.9998983998 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2917 : NAD83(HARN) / Texas North Central (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2917,'EPSG',2917,'PROJCS["NAD83(HARN) / Texas North Central (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",33.96666666666667],PARAMETER["standard_parallel_2",32.13333333333333],PARAMETER["latitude_of_origin",31.66666666666667],PARAMETER["central_meridian",-98.5],PARAMETER["false_easting",1968500],PARAMETER["false_northing",6561666.667],AUTHORITY["EPSG","2917"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=33.96666666666667 +lat_2=32.13333333333333 +lat_0=31.66666666666667 +lon_0=-98.5 +x_0=600000 +y_0=2000000.0001016 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2917,'EPSG',2917,'PROJCS["NAD83(HARN) / Texas North Central (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",33.96666666666667],PARAMETER["standard_parallel_2",32.13333333333333],PARAMETER["latitude_of_origin",31.66666666666667],PARAMETER["central_meridian",-98.5],PARAMETER["false_easting",1968500],PARAMETER["false_northing",6561666.667],AUTHORITY["EPSG","2917"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=33.96666666666667 +lat_2=32.13333333333333 +lat_0=31.66666666666667 +lon_0=-98.5 +x_0=600000 +y_0=2000000.0001016 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2918 : NAD83(HARN) / Texas Central (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2918,'EPSG',2918,'PROJCS["NAD83(HARN) / Texas Central (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",31.88333333333333],PARAMETER["standard_parallel_2",30.11666666666667],PARAMETER["latitude_of_origin",29.66666666666667],PARAMETER["central_meridian",-100.3333333333333],PARAMETER["false_easting",2296583.333],PARAMETER["false_northing",9842500.000000002],AUTHORITY["EPSG","2918"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=31.88333333333333 +lat_2=30.11666666666667 +lat_0=29.66666666666667 +lon_0=-100.3333333333333 +x_0=699999.9998983998 +y_0=3000000 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2918,'EPSG',2918,'PROJCS["NAD83(HARN) / Texas Central (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",31.88333333333333],PARAMETER["standard_parallel_2",30.11666666666667],PARAMETER["latitude_of_origin",29.66666666666667],PARAMETER["central_meridian",-100.3333333333333],PARAMETER["false_easting",2296583.333],PARAMETER["false_northing",9842500.000000002],AUTHORITY["EPSG","2918"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=31.88333333333333 +lat_2=30.11666666666667 +lat_0=29.66666666666667 +lon_0=-100.3333333333333 +x_0=699999.9998983998 +y_0=3000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2919 : NAD83(HARN) / Texas South Central (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2919,'EPSG',2919,'PROJCS["NAD83(HARN) / Texas South Central (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",30.28333333333333],PARAMETER["standard_parallel_2",28.38333333333333],PARAMETER["latitude_of_origin",27.83333333333333],PARAMETER["central_meridian",-99],PARAMETER["false_easting",1968500],PARAMETER["false_northing",13123333.333],AUTHORITY["EPSG","2919"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=30.28333333333333 +lat_2=28.38333333333333 +lat_0=27.83333333333333 +lon_0=-99 +x_0=600000 +y_0=3999999.9998984 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2919,'EPSG',2919,'PROJCS["NAD83(HARN) / Texas South Central (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",30.28333333333333],PARAMETER["standard_parallel_2",28.38333333333333],PARAMETER["latitude_of_origin",27.83333333333333],PARAMETER["central_meridian",-99],PARAMETER["false_easting",1968500],PARAMETER["false_northing",13123333.333],AUTHORITY["EPSG","2919"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=30.28333333333333 +lat_2=28.38333333333333 +lat_0=27.83333333333333 +lon_0=-99 +x_0=600000 +y_0=3999999.9998984 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2920 : NAD83(HARN) / Texas South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2920,'EPSG',2920,'PROJCS["NAD83(HARN) / Texas South (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",27.83333333333333],PARAMETER["standard_parallel_2",26.16666666666667],PARAMETER["latitude_of_origin",25.66666666666667],PARAMETER["central_meridian",-98.5],PARAMETER["false_easting",984250.0000000002],PARAMETER["false_northing",16404166.667],AUTHORITY["EPSG","2920"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=27.83333333333333 +lat_2=26.16666666666667 +lat_0=25.66666666666667 +lon_0=-98.5 +x_0=300000.0000000001 +y_0=5000000.0001016 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2920,'EPSG',2920,'PROJCS["NAD83(HARN) / Texas South (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",27.83333333333333],PARAMETER["standard_parallel_2",26.16666666666667],PARAMETER["latitude_of_origin",25.66666666666667],PARAMETER["central_meridian",-98.5],PARAMETER["false_easting",984250.0000000002],PARAMETER["false_northing",16404166.667],AUTHORITY["EPSG","2920"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=27.83333333333333 +lat_2=26.16666666666667 +lat_0=25.66666666666667 +lon_0=-98.5 +x_0=300000.0000000001 +y_0=5000000.0001016 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2921 : NAD83(HARN) / Utah North (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2921,'EPSG',2921,'PROJCS["NAD83(HARN) / Utah North (ft)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.78333333333333],PARAMETER["standard_parallel_2",40.71666666666667],PARAMETER["latitude_of_origin",40.33333333333334],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",1640419.948],PARAMETER["false_northing",3280839.895],AUTHORITY["EPSG","2921"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.78333333333333 +lat_2=40.71666666666667 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000.0001504 +y_0=999999.9999960001 +ellps=GRS80 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2921,'EPSG',2921,'PROJCS["NAD83(HARN) / Utah North (ft)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.78333333333333],PARAMETER["standard_parallel_2",40.71666666666667],PARAMETER["latitude_of_origin",40.33333333333334],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",1640419.948],PARAMETER["false_northing",3280839.895],AUTHORITY["EPSG","2921"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.78333333333333 +lat_2=40.71666666666667 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000.0001504 +y_0=999999.9999960001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 2922 : NAD83(HARN) / Utah Central (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2922,'EPSG',2922,'PROJCS["NAD83(HARN) / Utah Central (ft)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.65],PARAMETER["standard_parallel_2",39.01666666666667],PARAMETER["latitude_of_origin",38.33333333333334],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",1640419.948],PARAMETER["false_northing",6561679.79],AUTHORITY["EPSG","2922"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.65 +lat_2=39.01666666666667 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=500000.0001504 +y_0=1999999.999992 +ellps=GRS80 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2922,'EPSG',2922,'PROJCS["NAD83(HARN) / Utah Central (ft)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.65],PARAMETER["standard_parallel_2",39.01666666666667],PARAMETER["latitude_of_origin",38.33333333333334],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",1640419.948],PARAMETER["false_northing",6561679.79],AUTHORITY["EPSG","2922"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.65 +lat_2=39.01666666666667 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=500000.0001504 +y_0=1999999.999992 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 2923 : NAD83(HARN) / Utah South (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2923,'EPSG',2923,'PROJCS["NAD83(HARN) / Utah South (ft)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.35],PARAMETER["standard_parallel_2",37.21666666666667],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",1640419.948],PARAMETER["false_northing",9842519.685],AUTHORITY["EPSG","2923"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.35 +lat_2=37.21666666666667 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=500000.0001504 +y_0=2999999.999988 +ellps=GRS80 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2923,'EPSG',2923,'PROJCS["NAD83(HARN) / Utah South (ft)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.35],PARAMETER["standard_parallel_2",37.21666666666667],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",1640419.948],PARAMETER["false_northing",9842519.685],AUTHORITY["EPSG","2923"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.35 +lat_2=37.21666666666667 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=500000.0001504 +y_0=2999999.999988 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 2924 : NAD83(HARN) / Virginia North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2924,'EPSG',2924,'PROJCS["NAD83(HARN) / Virginia North (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.2],PARAMETER["standard_parallel_2",38.03333333333333],PARAMETER["latitude_of_origin",37.66666666666666],PARAMETER["central_meridian",-78.5],PARAMETER["false_easting",11482916.667],PARAMETER["false_northing",6561666.667],AUTHORITY["EPSG","2924"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.2 +lat_2=38.03333333333333 +lat_0=37.66666666666666 +lon_0=-78.5 +x_0=3500000.0001016 +y_0=2000000.0001016 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2924,'EPSG',2924,'PROJCS["NAD83(HARN) / Virginia North (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.2],PARAMETER["standard_parallel_2",38.03333333333333],PARAMETER["latitude_of_origin",37.66666666666666],PARAMETER["central_meridian",-78.5],PARAMETER["false_easting",11482916.667],PARAMETER["false_northing",6561666.667],AUTHORITY["EPSG","2924"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.2 +lat_2=38.03333333333333 +lat_0=37.66666666666666 +lon_0=-78.5 +x_0=3500000.0001016 +y_0=2000000.0001016 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2925 : NAD83(HARN) / Virginia South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2925,'EPSG',2925,'PROJCS["NAD83(HARN) / Virginia South (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.96666666666667],PARAMETER["standard_parallel_2",36.76666666666667],PARAMETER["latitude_of_origin",36.33333333333334],PARAMETER["central_meridian",-78.5],PARAMETER["false_easting",11482916.667],PARAMETER["false_northing",3280833.333],AUTHORITY["EPSG","2925"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.96666666666667 +lat_2=36.76666666666667 +lat_0=36.33333333333334 +lon_0=-78.5 +x_0=3500000.0001016 +y_0=999999.9998983998 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2925,'EPSG',2925,'PROJCS["NAD83(HARN) / Virginia South (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.96666666666667],PARAMETER["standard_parallel_2",36.76666666666667],PARAMETER["latitude_of_origin",36.33333333333334],PARAMETER["central_meridian",-78.5],PARAMETER["false_easting",11482916.667],PARAMETER["false_northing",3280833.333],AUTHORITY["EPSG","2925"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.96666666666667 +lat_2=36.76666666666667 +lat_0=36.33333333333334 +lon_0=-78.5 +x_0=3500000.0001016 +y_0=999999.9998983998 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2926 : NAD83(HARN) / Washington North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2926,'EPSG',2926,'PROJCS["NAD83(HARN) / Washington North (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.73333333333333],PARAMETER["standard_parallel_2",47.5],PARAMETER["latitude_of_origin",47],PARAMETER["central_meridian",-120.8333333333333],PARAMETER["false_easting",1640416.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2926"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.73333333333333 +lat_2=47.5 +lat_0=47 +lon_0=-120.8333333333333 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2926,'EPSG',2926,'PROJCS["NAD83(HARN) / Washington North (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.73333333333333],PARAMETER["standard_parallel_2",47.5],PARAMETER["latitude_of_origin",47],PARAMETER["central_meridian",-120.8333333333333],PARAMETER["false_easting",1640416.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2926"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.73333333333333 +lat_2=47.5 +lat_0=47 +lon_0=-120.8333333333333 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2927 : NAD83(HARN) / Washington South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2927,'EPSG',2927,'PROJCS["NAD83(HARN) / Washington South (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.33333333333334],PARAMETER["standard_parallel_2",45.83333333333334],PARAMETER["latitude_of_origin",45.33333333333334],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",1640416.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2927"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.33333333333334 +lat_2=45.83333333333334 +lat_0=45.33333333333334 +lon_0=-120.5 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2927,'EPSG',2927,'PROJCS["NAD83(HARN) / Washington South (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.33333333333334],PARAMETER["standard_parallel_2",45.83333333333334],PARAMETER["latitude_of_origin",45.33333333333334],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",1640416.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","2927"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.33333333333334 +lat_2=45.83333333333334 +lat_0=45.33333333333334 +lon_0=-120.5 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2928 : NAD83(HARN) / Wisconsin North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2928,'EPSG',2928,'PROJCS["NAD83(HARN) / Wisconsin North (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",46.76666666666667],PARAMETER["standard_parallel_2",45.56666666666667],PARAMETER["latitude_of_origin",45.16666666666666],PARAMETER["central_meridian",-90],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","2928"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=46.76666666666667 +lat_2=45.56666666666667 +lat_0=45.16666666666666 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2928,'EPSG',2928,'PROJCS["NAD83(HARN) / Wisconsin North (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",46.76666666666667],PARAMETER["standard_parallel_2",45.56666666666667],PARAMETER["latitude_of_origin",45.16666666666666],PARAMETER["central_meridian",-90],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","2928"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=46.76666666666667 +lat_2=45.56666666666667 +lat_0=45.16666666666666 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2929 : NAD83(HARN) / Wisconsin Central (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2929,'EPSG',2929,'PROJCS["NAD83(HARN) / Wisconsin Central (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.5],PARAMETER["standard_parallel_2",44.25],PARAMETER["latitude_of_origin",43.83333333333334],PARAMETER["central_meridian",-90],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","2929"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.5 +lat_2=44.25 +lat_0=43.83333333333334 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2929,'EPSG',2929,'PROJCS["NAD83(HARN) / Wisconsin Central (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.5],PARAMETER["standard_parallel_2",44.25],PARAMETER["latitude_of_origin",43.83333333333334],PARAMETER["central_meridian",-90],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","2929"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.5 +lat_2=44.25 +lat_0=43.83333333333334 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2930 : NAD83(HARN) / Wisconsin South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2930,'EPSG',2930,'PROJCS["NAD83(HARN) / Wisconsin South (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44.06666666666667],PARAMETER["standard_parallel_2",42.73333333333333],PARAMETER["latitude_of_origin",42],PARAMETER["central_meridian",-90],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","2930"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44.06666666666667 +lat_2=42.73333333333333 +lat_0=42 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2930,'EPSG',2930,'PROJCS["NAD83(HARN) / Wisconsin South (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44.06666666666667],PARAMETER["standard_parallel_2",42.73333333333333],PARAMETER["latitude_of_origin",42],PARAMETER["central_meridian",-90],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","2930"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44.06666666666667 +lat_2=42.73333333333333 +lat_0=42 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2931 : Beduaram / TM 13 NE --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2931,'EPSG',2931,'PROJCS["Beduaram / TM 13 NE",GEOGCS["Beduaram",DATUM["Beduaram",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-106,-87,188,0,0,0,0],AUTHORITY["EPSG","6213"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4213"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",13],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2931"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=13 +k=0.9996 +x_0=500000 +y_0=0 +a=6378249.2 +b=6356515 +towgs84=-106,-87,188,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2931,'EPSG',2931,'PROJCS["Beduaram / TM 13 NE",GEOGCS["Beduaram",DATUM["Beduaram",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-106,-87,188,0,0,0,0],AUTHORITY["EPSG","6213"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4213"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",13],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2931"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=13 +k=0.9996 +x_0=500000 +y_0=0 +a=6378249.2 +b=6356515 +towgs84=-106,-87,188,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2932 : QND95 / Qatar National Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2932,'EPSG',2932,'PROJCS["QND95 / Qatar National Grid",GEOGCS["QND95",DATUM["Qatar_National_Datum_1995",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-119.425,-303.659,-11.0006,1.1643,0.174458,1.09626,3.65706],AUTHORITY["EPSG","6614"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4614"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",24.45],PARAMETER["central_meridian",51.21666666666667],PARAMETER["scale_factor",0.99999],PARAMETER["false_easting",200000],PARAMETER["false_northing",300000],AUTHORITY["EPSG","2932"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=24.45 +lon_0=51.21666666666667 +k=0.99999 +x_0=200000 +y_0=300000 +ellps=intl +towgs84=-119.425,-303.659,-11.0006,1.1643,0.174458,1.09626,3.65706 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2932,'EPSG',2932,'PROJCS["QND95 / Qatar National Grid",GEOGCS["QND95",DATUM["Qatar_National_Datum_1995",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-119.425,-303.659,-11.0006,1.1643,0.174458,1.09626,3.65706],AUTHORITY["EPSG","6614"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4614"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",24.45],PARAMETER["central_meridian",51.21666666666667],PARAMETER["scale_factor",0.99999],PARAMETER["false_easting",200000],PARAMETER["false_northing",300000],AUTHORITY["EPSG","2932"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=24.45 +lon_0=51.21666666666667 +k=0.99999 +x_0=200000 +y_0=300000 +ellps=intl +towgs84=-119.425,-303.659,-11.0006,1.1643,0.174458,1.09626,3.65706 +units=m +no_defs '); --- --- EPSG 2933 : Segara / UTM zone 50S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2933,'EPSG',2933,'PROJCS["Segara / UTM zone 50S",GEOGCS["Segara",DATUM["Gunung_Segara",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6613"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4613"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2933"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=50 +south +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2933,'EPSG',2933,'PROJCS["Segara / UTM zone 50S",GEOGCS["Segara",DATUM["Gunung_Segara",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-403,684,41,0,0,0,0],AUTHORITY["EPSG","6613"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4613"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2933"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=50 +south +ellps=bessel +towgs84=-403,684,41,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2934 : Segara (Jakarta) / NEIEZ (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2934,'EPSG',2934,'PROJCS["Segara (Jakarta) / NEIEZ (deprecated)",GEOGCS["Segara (Jakarta)",DATUM["Gunung_Segara_Jakarta",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6820"]],PRIMEM["Jakarta",106.8077194444444,AUTHORITY["EPSG","8908"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4820"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",110],PARAMETER["scale_factor",0.997],PARAMETER["false_easting",3900000],PARAMETER["false_northing",900000],AUTHORITY["EPSG","2934"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=merc +lon_0=110 +k=0.997 +x_0=3900000 +y_0=900000 +ellps=bessel +pm=jakarta +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2934,'EPSG',2934,'PROJCS["Segara (Jakarta) / NEIEZ (deprecated)",GEOGCS["Segara (Jakarta)",DATUM["Gunung_Segara_Jakarta",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-403,684,41,0,0,0,0],AUTHORITY["EPSG","6820"]],PRIMEM["Jakarta",106.8077194444444,AUTHORITY["EPSG","8908"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4820"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",110],PARAMETER["scale_factor",0.997],PARAMETER["false_easting",3900000],PARAMETER["false_northing",900000],AUTHORITY["EPSG","2934"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=merc +lon_0=110 +k=0.997 +x_0=3900000 +y_0=900000 +ellps=bessel +towgs84=-403,684,41,0,0,0,0 +pm=jakarta +units=m +no_defs '); --- --- EPSG 2935 : Pulkovo 1942 / CS63 zone A1 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2935,'EPSG',2935,'PROJCS["Pulkovo 1942 / CS63 zone A1",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0.1166666666666667],PARAMETER["central_meridian",41.53333333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",1300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2935"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0.1166666666666667 +lon_0=41.53333333333333 +k=1 +x_0=1300000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2935,'EPSG',2935,'PROJCS["Pulkovo 1942 / CS63 zone A1",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0.1166666666666667],PARAMETER["central_meridian",41.53333333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",1300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2935"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0.1166666666666667 +lon_0=41.53333333333333 +k=1 +x_0=1300000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2936 : Pulkovo 1942 / CS63 zone A2 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2936,'EPSG',2936,'PROJCS["Pulkovo 1942 / CS63 zone A2",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0.1166666666666667],PARAMETER["central_meridian",44.53333333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",2300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2936"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0.1166666666666667 +lon_0=44.53333333333333 +k=1 +x_0=2300000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2936,'EPSG',2936,'PROJCS["Pulkovo 1942 / CS63 zone A2",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0.1166666666666667],PARAMETER["central_meridian",44.53333333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",2300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2936"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0.1166666666666667 +lon_0=44.53333333333333 +k=1 +x_0=2300000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2937 : Pulkovo 1942 / CS63 zone A3 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2937,'EPSG',2937,'PROJCS["Pulkovo 1942 / CS63 zone A3",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0.1166666666666667],PARAMETER["central_meridian",47.53333333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",3300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2937"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0.1166666666666667 +lon_0=47.53333333333333 +k=1 +x_0=3300000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2937,'EPSG',2937,'PROJCS["Pulkovo 1942 / CS63 zone A3",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0.1166666666666667],PARAMETER["central_meridian",47.53333333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",3300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2937"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0.1166666666666667 +lon_0=47.53333333333333 +k=1 +x_0=3300000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2938 : Pulkovo 1942 / CS63 zone A4 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2938,'EPSG',2938,'PROJCS["Pulkovo 1942 / CS63 zone A4",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0.1166666666666667],PARAMETER["central_meridian",50.53333333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",4300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2938"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0.1166666666666667 +lon_0=50.53333333333333 +k=1 +x_0=4300000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2938,'EPSG',2938,'PROJCS["Pulkovo 1942 / CS63 zone A4",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0.1166666666666667],PARAMETER["central_meridian",50.53333333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",4300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2938"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0.1166666666666667 +lon_0=50.53333333333333 +k=1 +x_0=4300000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2939 : Pulkovo 1942 / CS63 zone K2 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2939,'EPSG',2939,'PROJCS["Pulkovo 1942 / CS63 zone K2",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0.1333333333333333],PARAMETER["central_meridian",50.76666666666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",2300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2939"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0.1333333333333333 +lon_0=50.76666666666667 +k=1 +x_0=2300000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2939,'EPSG',2939,'PROJCS["Pulkovo 1942 / CS63 zone K2",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0.1333333333333333],PARAMETER["central_meridian",50.76666666666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",2300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2939"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0.1333333333333333 +lon_0=50.76666666666667 +k=1 +x_0=2300000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2940 : Pulkovo 1942 / CS63 zone K3 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2940,'EPSG',2940,'PROJCS["Pulkovo 1942 / CS63 zone K3",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0.1333333333333333],PARAMETER["central_meridian",53.76666666666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",3300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2940"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0.1333333333333333 +lon_0=53.76666666666667 +k=1 +x_0=3300000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2940,'EPSG',2940,'PROJCS["Pulkovo 1942 / CS63 zone K3",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0.1333333333333333],PARAMETER["central_meridian",53.76666666666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",3300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2940"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0.1333333333333333 +lon_0=53.76666666666667 +k=1 +x_0=3300000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2941 : Pulkovo 1942 / CS63 zone K4 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2941,'EPSG',2941,'PROJCS["Pulkovo 1942 / CS63 zone K4",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0.1333333333333333],PARAMETER["central_meridian",56.76666666666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",4300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2941"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0.1333333333333333 +lon_0=56.76666666666667 +k=1 +x_0=4300000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2941,'EPSG',2941,'PROJCS["Pulkovo 1942 / CS63 zone K4",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0.1333333333333333],PARAMETER["central_meridian",56.76666666666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",4300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2941"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0.1333333333333333 +lon_0=56.76666666666667 +k=1 +x_0=4300000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 2942 : Porto Santo / UTM zone 28N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2942,'EPSG',2942,'PROJCS["Porto Santo / UTM zone 28N",GEOGCS["Porto Santo",DATUM["Porto_Santo_1936",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-499,-249,314,0,0,0,0],AUTHORITY["EPSG","6615"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4615"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2942"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +ellps=intl +towgs84=-499,-249,314,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2942,'EPSG',2942,'PROJCS["Porto Santo / UTM zone 28N",GEOGCS["Porto Santo",DATUM["Porto_Santo_1936",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-499,-249,314,0,0,0,0],AUTHORITY["EPSG","6615"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4615"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2942"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +ellps=intl +towgs84=-499,-249,314,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2943 : Selvagem Grande / UTM zone 28N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2943,'EPSG',2943,'PROJCS["Selvagem Grande / UTM zone 28N",GEOGCS["Selvagem Grande",DATUM["Selvagem_Grande",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6616"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4616"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2943"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2943,'EPSG',2943,'PROJCS["Selvagem Grande / UTM zone 28N",GEOGCS["Selvagem Grande",DATUM["Selvagem_Grande",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-289,-124,60,0,0,0,0],AUTHORITY["EPSG","6616"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4616"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2943"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +ellps=intl +towgs84=-289,-124,60,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2944 : NAD83(CSRS) / SCoPQ zone 2 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2944,'EPSG',2944,'PROJCS["NAD83(CSRS) / SCoPQ zone 2",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-55.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2944"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-55.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2944,'EPSG',2944,'PROJCS["NAD83(CSRS) / SCoPQ zone 2",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-55.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2944"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-55.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2945 : NAD83(CSRS) / MTM zone 3 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2945,'EPSG',2945,'PROJCS["NAD83(CSRS) / MTM zone 3",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-58.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2945"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-58.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2945,'EPSG',2945,'PROJCS["NAD83(CSRS) / MTM zone 3",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-58.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2945"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-58.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2946 : NAD83(CSRS) / MTM zone 4 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2946,'EPSG',2946,'PROJCS["NAD83(CSRS) / MTM zone 4",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-61.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2946"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-61.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2946,'EPSG',2946,'PROJCS["NAD83(CSRS) / MTM zone 4",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-61.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2946"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-61.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2947 : NAD83(CSRS) / MTM zone 5 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2947,'EPSG',2947,'PROJCS["NAD83(CSRS) / MTM zone 5",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-64.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2947"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-64.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2947,'EPSG',2947,'PROJCS["NAD83(CSRS) / MTM zone 5",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-64.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2947"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-64.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2948 : NAD83(CSRS) / MTM zone 6 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2948,'EPSG',2948,'PROJCS["NAD83(CSRS) / MTM zone 6",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-67.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2948"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-67.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2948,'EPSG',2948,'PROJCS["NAD83(CSRS) / MTM zone 6",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-67.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2948"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-67.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2949 : NAD83(CSRS) / MTM zone 7 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2949,'EPSG',2949,'PROJCS["NAD83(CSRS) / MTM zone 7",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-70.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2949"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-70.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2949,'EPSG',2949,'PROJCS["NAD83(CSRS) / MTM zone 7",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-70.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2949"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-70.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2950 : NAD83(CSRS) / MTM zone 8 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2950,'EPSG',2950,'PROJCS["NAD83(CSRS) / MTM zone 8",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-73.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2950"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-73.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2950,'EPSG',2950,'PROJCS["NAD83(CSRS) / MTM zone 8",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-73.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2950"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-73.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2951 : NAD83(CSRS) / MTM zone 9 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2951,'EPSG',2951,'PROJCS["NAD83(CSRS) / MTM zone 9",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-76.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2951"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-76.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2951,'EPSG',2951,'PROJCS["NAD83(CSRS) / MTM zone 9",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-76.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2951"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-76.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2952 : NAD83(CSRS) / MTM zone 10 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2952,'EPSG',2952,'PROJCS["NAD83(CSRS) / MTM zone 10",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-79.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2952"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-79.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2952,'EPSG',2952,'PROJCS["NAD83(CSRS) / MTM zone 10",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-79.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","2952"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-79.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2953 : NAD83(CSRS) / New Brunswick Stereographic --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2953,'EPSG',2953,'PROJCS["NAD83(CSRS) / New Brunswick Stereographic",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",46.5],PARAMETER["central_meridian",-66.5],PARAMETER["scale_factor",0.999912],PARAMETER["false_easting",2500000],PARAMETER["false_northing",7500000],AUTHORITY["EPSG","2953"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=sterea +lat_0=46.5 +lon_0=-66.5 +k=0.999912 +x_0=2500000 +y_0=7500000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2953,'EPSG',2953,'PROJCS["NAD83(CSRS) / New Brunswick Stereographic",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",46.5],PARAMETER["central_meridian",-66.5],PARAMETER["scale_factor",0.999912],PARAMETER["false_easting",2500000],PARAMETER["false_northing",7500000],AUTHORITY["EPSG","2953"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=sterea +lat_0=46.5 +lon_0=-66.5 +k=0.999912 +x_0=2500000 +y_0=7500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2954 : NAD83(CSRS) / Prince Edward Isl. Stereographic (NAD83) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2954,'EPSG',2954,'PROJCS["NAD83(CSRS) / Prince Edward Isl. Stereographic (NAD83)",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",47.25],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.999912],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2954"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=sterea +lat_0=47.25 +lon_0=-63 +k=0.999912 +x_0=400000 +y_0=800000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2954,'EPSG',2954,'PROJCS["NAD83(CSRS) / Prince Edward Isl. Stereographic (NAD83)",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",47.25],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.999912],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","2954"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=sterea +lat_0=47.25 +lon_0=-63 +k=0.999912 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2955 : NAD83(CSRS) / UTM zone 11N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2955,'EPSG',2955,'PROJCS["NAD83(CSRS) / UTM zone 11N",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],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],AUTHORITY["EPSG","2955"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=11 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2955,'EPSG',2955,'PROJCS["NAD83(CSRS) / UTM zone 11N",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],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],AUTHORITY["EPSG","2955"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=11 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2956 : NAD83(CSRS) / UTM zone 12N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2956,'EPSG',2956,'PROJCS["NAD83(CSRS) / UTM zone 12N",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2956"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=12 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2956,'EPSG',2956,'PROJCS["NAD83(CSRS) / UTM zone 12N",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2956"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=12 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2957 : NAD83(CSRS) / UTM zone 13N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2957,'EPSG',2957,'PROJCS["NAD83(CSRS) / UTM zone 13N",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2957"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=13 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2957,'EPSG',2957,'PROJCS["NAD83(CSRS) / UTM zone 13N",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2957"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=13 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2958 : NAD83(CSRS) / UTM zone 17N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2958,'EPSG',2958,'PROJCS["NAD83(CSRS) / UTM zone 17N",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2958"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2958,'EPSG',2958,'PROJCS["NAD83(CSRS) / UTM zone 17N",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2958"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2959 : NAD83(CSRS) / UTM zone 18N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2959,'EPSG',2959,'PROJCS["NAD83(CSRS) / UTM zone 18N",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2959"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2959,'EPSG',2959,'PROJCS["NAD83(CSRS) / UTM zone 18N",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2959"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2960 : NAD83(CSRS) / UTM zone 19N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2960,'EPSG',2960,'PROJCS["NAD83(CSRS) / UTM zone 19N",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2960"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2960,'EPSG',2960,'PROJCS["NAD83(CSRS) / UTM zone 19N",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2960"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2961 : NAD83(CSRS) / UTM zone 20N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2961,'EPSG',2961,'PROJCS["NAD83(CSRS) / UTM zone 20N",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2961"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2961,'EPSG',2961,'PROJCS["NAD83(CSRS) / UTM zone 20N",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2961"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2962 : NAD83(CSRS) / UTM zone 21N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2962,'EPSG',2962,'PROJCS["NAD83(CSRS) / UTM zone 21N",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2962"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2962,'EPSG',2962,'PROJCS["NAD83(CSRS) / UTM zone 21N",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2962"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2963 : Lisbon 1890 (Lisbon) / Portugal Bonne --- @@ -5542,83 +5674,83 @@ --- --- EPSG 2964 : NAD27 / Alaska Albers --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2964,'EPSG',2964,'PROJCS["NAD27 / Alaska Albers",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",55],PARAMETER["standard_parallel_2",65],PARAMETER["latitude_of_center",50],PARAMETER["longitude_of_center",-154],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2964"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=aea +lat_1=55 +lat_2=65 +lat_0=50 +lon_0=-154 +x_0=0 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2964,'EPSG',2964,'PROJCS["NAD27 / Alaska Albers",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",55],PARAMETER["standard_parallel_2",65],PARAMETER["latitude_of_center",50],PARAMETER["longitude_of_center",-154],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2964"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=aea +lat_1=55 +lat_2=65 +lat_0=50 +lon_0=-154 +x_0=0 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 2965 : NAD83 / Indiana East (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2965,'EPSG',2965,'PROJCS["NAD83 / Indiana 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",37.5],PARAMETER["central_meridian",-85.66666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",328083.333],PARAMETER["false_northing",820208.3330000002],AUTHORITY["EPSG","2965"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999966667 +x_0=99999.99989839978 +y_0=249999.9998983998 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2965,'EPSG',2965,'PROJCS["NAD83 / Indiana East (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-85.66666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",328083.333],PARAMETER["false_northing",820208.3330000002],AUTHORITY["EPSG","2965"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999966667 +x_0=99999.99989839978 +y_0=249999.9998983998 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2966 : NAD83 / Indiana West (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2966,'EPSG',2966,'PROJCS["NAD83 / Indiana West (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",37.5],PARAMETER["central_meridian",-87.08333333333333],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",2952750],PARAMETER["false_northing",820208.3330000002],AUTHORITY["EPSG","2966"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999966667 +x_0=900000 +y_0=249999.9998983998 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2966,'EPSG',2966,'PROJCS["NAD83 / Indiana West (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-87.08333333333333],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",2952750],PARAMETER["false_northing",820208.3330000002],AUTHORITY["EPSG","2966"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999966667 +x_0=900000 +y_0=249999.9998983998 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2967 : NAD83(HARN) / Indiana East (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2967,'EPSG',2967,'PROJCS["NAD83(HARN) / Indiana East (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-85.66666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",328083.333],PARAMETER["false_northing",820208.3330000002],AUTHORITY["EPSG","2967"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999966667 +x_0=99999.99989839978 +y_0=249999.9998983998 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2967,'EPSG',2967,'PROJCS["NAD83(HARN) / Indiana East (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-85.66666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",328083.333],PARAMETER["false_northing",820208.3330000002],AUTHORITY["EPSG","2967"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999966667 +x_0=99999.99989839978 +y_0=249999.9998983998 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2968 : NAD83(HARN) / Indiana West (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2968,'EPSG',2968,'PROJCS["NAD83(HARN) / Indiana West (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-87.08333333333333],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",2952750],PARAMETER["false_northing",820208.3330000002],AUTHORITY["EPSG","2968"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999966667 +x_0=900000 +y_0=249999.9998983998 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2968,'EPSG',2968,'PROJCS["NAD83(HARN) / Indiana West (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-87.08333333333333],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",2952750],PARAMETER["false_northing",820208.3330000002],AUTHORITY["EPSG","2968"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999966667 +x_0=900000 +y_0=249999.9998983998 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 2969 : Fort Marigot / UTM zone 20N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2969,'EPSG',2969,'PROJCS["Fort Marigot / UTM zone 20N",GEOGCS["Fort Marigot",DATUM["Fort_Marigot",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[137,248,-430,0,0,0,0],AUTHORITY["EPSG","6621"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4621"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2969"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=intl +towgs84=137,248,-430,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2969,'EPSG',2969,'PROJCS["Fort Marigot / UTM zone 20N",GEOGCS["Fort Marigot",DATUM["Fort_Marigot",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[137,248,-430,0,0,0,0],AUTHORITY["EPSG","6621"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4621"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2969"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=intl +towgs84=137,248,-430,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2970 : Guadeloupe 1948 / UTM zone 20N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2970,'EPSG',2970,'PROJCS["Guadeloupe 1948 / UTM zone 20N",GEOGCS["Guadeloupe 1948",DATUM["Guadeloupe_1948",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6622"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4622"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2970"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2970,'EPSG',2970,'PROJCS["Guadeloupe 1948 / UTM zone 20N",GEOGCS["Guadeloupe 1948",DATUM["Guadeloupe_1948",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-467,-16,-300,0,0,0,0],AUTHORITY["EPSG","6622"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4622"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2970"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=intl +towgs84=-467,-16,-300,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2971 : CSG67 / UTM zone 22N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2971,'EPSG',2971,'PROJCS["CSG67 / UTM zone 22N",GEOGCS["CSG67",DATUM["Centre_Spatial_Guyanais_1967",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-186,230,110,0,0,0,0],AUTHORITY["EPSG","6623"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4623"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2971"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +ellps=intl +towgs84=-186,230,110,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2971,'EPSG',2971,'PROJCS["CSG67 / UTM zone 22N",GEOGCS["CSG67",DATUM["Centre_Spatial_Guyanais_1967",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-186,230,110,0,0,0,0],AUTHORITY["EPSG","6623"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4623"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2971"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +ellps=intl +towgs84=-186,230,110,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2972 : RGFG95 / UTM zone 22N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2972,'EPSG',2972,'PROJCS["RGFG95 / UTM zone 22N",GEOGCS["RGFG95",DATUM["Reseau_Geodesique_Francais_Guyane_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[2,2,-2,0,0,0,0],AUTHORITY["EPSG","6624"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4624"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2972"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +ellps=GRS80 +towgs84=2,2,-2,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2972,'EPSG',2972,'PROJCS["RGFG95 / UTM zone 22N",GEOGCS["RGFG95",DATUM["Reseau_Geodesique_Francais_Guyane_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[2,2,-2,0,0,0,0],AUTHORITY["EPSG","6624"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4624"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2972"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +ellps=GRS80 +towgs84=2,2,-2,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2973 : Martinique 1938 / UTM zone 20N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2973,'EPSG',2973,'PROJCS["Martinique 1938 / UTM zone 20N",GEOGCS["Martinique 1938",DATUM["Martinique_1938",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6625"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4625"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2973"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2973,'EPSG',2973,'PROJCS["Martinique 1938 / UTM zone 20N",GEOGCS["Martinique 1938",DATUM["Martinique_1938",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[186,482,151,0,0,0,0],AUTHORITY["EPSG","6625"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4625"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2973"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=intl +towgs84=186,482,151,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2975 : RGR92 / UTM zone 40S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2975,'EPSG',2975,'PROJCS["RGR92 / UTM zone 40S",GEOGCS["RGR92",DATUM["Reseau_Geodesique_de_la_Reunion_1992",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6627"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4627"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2975"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=40 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2975,'EPSG',2975,'PROJCS["RGR92 / UTM zone 40S",GEOGCS["RGR92",DATUM["Reseau_Geodesique_de_la_Reunion_1992",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6627"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4627"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2975"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=40 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2976 : Tahiti 52 / UTM zone 6S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2976,'EPSG',2976,'PROJCS["Tahiti 52 / UTM zone 6S",GEOGCS["Tahiti 52",DATUM["Tahiti_52",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[162,117,154,0,0,0,0],AUTHORITY["EPSG","6628"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4628"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2976"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=6 +south +ellps=intl +towgs84=162,117,154,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2976,'EPSG',2976,'PROJCS["Tahiti 52 / UTM zone 6S",GEOGCS["Tahiti 52",DATUM["Tahiti_52",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[162,117,154,0,0,0,0],AUTHORITY["EPSG","6628"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4628"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2976"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=6 +south +ellps=intl +towgs84=162,117,154,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2977 : Tahaa 54 / UTM zone 5S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2977,'EPSG',2977,'PROJCS["Tahaa 54 / UTM zone 5S",GEOGCS["Tahaa 54",DATUM["Tahaa_54",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6629"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4629"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2977"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=5 +south +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2977,'EPSG',2977,'PROJCS["Tahaa 54 / UTM zone 5S",GEOGCS["Tahaa 54",DATUM["Tahaa_54",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[72.438,345.918,79.486,1.6045,0.8823,0.5565,1.3746],AUTHORITY["EPSG","6629"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4629"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2977"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=5 +south +ellps=intl +towgs84=72.438,345.918,79.486,1.6045,0.8823,0.5565,1.3746 +units=m +no_defs '); --- --- EPSG 2978 : IGN72 Nuku Hiva / UTM zone 7S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2978,'EPSG',2978,'PROJCS["IGN72 Nuku Hiva / UTM zone 7S",GEOGCS["IGN72 Nuku Hiva",DATUM["IGN72_Nuku_Hiva",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6630"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4630"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2978"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=7 +south +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2978,'EPSG',2978,'PROJCS["IGN72 Nuku Hiva / UTM zone 7S",GEOGCS["IGN72 Nuku Hiva",DATUM["IGN72_Nuku_Hiva",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[84,274,65,0,0,0,0],AUTHORITY["EPSG","6630"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4630"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2978"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=7 +south +ellps=intl +towgs84=84,274,65,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2979 : K0 1949 / UTM zone 42S (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2979,'EPSG',2979,'PROJCS["K0 1949 / UTM zone 42S (deprecated)",GEOGCS["K0 1949",DATUM["K0_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[145,-187,103,0,0,0,0],AUTHORITY["EPSG","6631"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4631"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2979"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=42 +south +ellps=intl +towgs84=145,-187,103,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2979,'EPSG',2979,'PROJCS["K0 1949 / UTM zone 42S (deprecated)",GEOGCS["K0 1949",DATUM["K0_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[145,-187,103,0,0,0,0],AUTHORITY["EPSG","6631"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4631"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2979"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=42 +south +ellps=intl +towgs84=145,-187,103,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2980 : Combani 1950 / UTM zone 38S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2980,'EPSG',2980,'PROJCS["Combani 1950 / UTM zone 38S",GEOGCS["Combani 1950",DATUM["Combani_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-382,-59,-262,0,0,0,0],AUTHORITY["EPSG","6632"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4632"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2980"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +south +ellps=intl +towgs84=-382,-59,-262,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2980,'EPSG',2980,'PROJCS["Combani 1950 / UTM zone 38S",GEOGCS["Combani 1950",DATUM["Combani_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-382,-59,-262,0,0,0,0],AUTHORITY["EPSG","6632"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4632"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2980"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +south +ellps=intl +towgs84=-382,-59,-262,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2981 : IGN56 Lifou / UTM zone 58S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2981,'EPSG',2981,'PROJCS["IGN56 Lifou / UTM zone 58S",GEOGCS["IGN56 Lifou",DATUM["IGN56_Lifou",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6633"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4633"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2981"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=58 +south +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2981,'EPSG',2981,'PROJCS["IGN56 Lifou / UTM zone 58S",GEOGCS["IGN56 Lifou",DATUM["IGN56_Lifou",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[335.47,222.58,-230.94,0,0,0,0],AUTHORITY["EPSG","6633"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4633"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2981"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=58 +south +ellps=intl +towgs84=335.47,222.58,-230.94,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2982 : IGN72 Grand Terre / UTM zone 58S (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2982,'EPSG',2982,'PROJCS["IGN72 Grand Terre / UTM zone 58S (deprecated)",GEOGCS["IGN72 Grand Terre",DATUM["IGN72_Grande_Terre",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6634"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4634"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2982"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=58 +south +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2982,'EPSG',2982,'PROJCS["IGN72 Grand Terre / UTM zone 58S (deprecated)",GEOGCS["IGN72 Grand Terre",DATUM["IGN72_Grande_Terre",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-13,-348,292,0,0,0,0],AUTHORITY["EPSG","6634"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4634"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2982"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=58 +south +ellps=intl +towgs84=-13,-348,292,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2983 : ST87 Ouvea / UTM zone 58S (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2983,'EPSG',2983,'PROJCS["ST87 Ouvea / UTM zone 58S (deprecated)",GEOGCS["ST87 Ouvea",DATUM["ST87_Ouvea",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-122.383,-188.696,103.344,3.5107,-4.9668,-5.7047,4.4798],AUTHORITY["EPSG","6635"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4635"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2983"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=58 +south +ellps=intl +towgs84=-122.383,-188.696,103.344,3.5107,-4.9668,-5.7047,4.4798 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2983,'EPSG',2983,'PROJCS["ST87 Ouvea / UTM zone 58S (deprecated)",GEOGCS["ST87 Ouvea",DATUM["ST87_Ouvea",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-122.383,-188.696,103.344,3.5107,-4.9668,-5.7047,4.4798],AUTHORITY["EPSG","6635"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4635"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2983"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=58 +south +ellps=intl +towgs84=-122.383,-188.696,103.344,3.5107,-4.9668,-5.7047,4.4798 +units=m +no_defs '); --- --- EPSG 2984 : RGNC 1991 / Lambert New Caledonia (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2984,'EPSG',2984,'PROJCS["RGNC 1991 / Lambert New Caledonia (deprecated)",GEOGCS["RGNC 1991",DATUM["Reseau_Geodesique_Nouvelle_Caledonie_1991",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6645"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4645"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-20.66666666666667],PARAMETER["standard_parallel_2",-22.33333333333333],PARAMETER["latitude_of_origin",-21.5],PARAMETER["central_meridian",166],PARAMETER["false_easting",400000],PARAMETER["false_northing",300000],AUTHORITY["EPSG","2984"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=-20.66666666666667 +lat_2=-22.33333333333333 +lat_0=-21.5 +lon_0=166 +x_0=400000 +y_0=300000 +ellps=intl +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2984,'EPSG',2984,'PROJCS["RGNC 1991 / Lambert New Caledonia (deprecated)",GEOGCS["RGNC 1991",DATUM["Reseau_Geodesique_Nouvelle_Caledonie_1991",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6645"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4645"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-20.66666666666667],PARAMETER["standard_parallel_2",-22.33333333333333],PARAMETER["latitude_of_origin",-21.5],PARAMETER["central_meridian",166],PARAMETER["false_easting",400000],PARAMETER["false_northing",300000],AUTHORITY["EPSG","2984"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=-20.66666666666667 +lat_2=-22.33333333333333 +lat_0=-21.5 +lon_0=166 +x_0=400000 +y_0=300000 +ellps=intl +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2985 : Petrels 1972 / Terre Adelie Polar Stereographic --- @@ -5630,263 +5762,263 @@ --- --- EPSG 2987 : Saint Pierre et Miquelon 1950 / UTM zone 21N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2987,'EPSG',2987,'PROJCS["Saint Pierre et Miquelon 1950 / UTM zone 21N",GEOGCS["Saint Pierre et Miquelon 1950",DATUM["Saint_Pierre_et_Miquelon_1950",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[30,430,368,0,0,0,0],AUTHORITY["EPSG","6638"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4638"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2987"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +ellps=clrk66 +towgs84=30,430,368,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2987,'EPSG',2987,'PROJCS["Saint Pierre et Miquelon 1950 / UTM zone 21N",GEOGCS["Saint Pierre et Miquelon 1950",DATUM["Saint_Pierre_et_Miquelon_1950",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[30,430,368,0,0,0,0],AUTHORITY["EPSG","6638"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4638"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2987"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +ellps=clrk66 +towgs84=30,430,368,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2988 : MOP78 / UTM zone 1S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2988,'EPSG',2988,'PROJCS["MOP78 / UTM zone 1S",GEOGCS["MOP78",DATUM["MOP78",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6639"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4639"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2988"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=1 +south +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2988,'EPSG',2988,'PROJCS["MOP78 / UTM zone 1S",GEOGCS["MOP78",DATUM["MOP78",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[253,-132,-127,0,0,0,0],AUTHORITY["EPSG","6639"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4639"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2988"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=1 +south +ellps=intl +towgs84=253,-132,-127,0,0,0,0 +units=m +no_defs '); --- ---- EPSG 2989 : RRAF 1991 / UTM zone 20N +--- EPSG 2989 : RRAF 1991 / UTM zone 20N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2989,'EPSG',2989,'PROJCS["RRAF 1991 / UTM zone 20N",GEOGCS["RRAF 1991",DATUM["Reseau_de_Reference_des_Antilles_Francaises_1991",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6640"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4640"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2989"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2989,'EPSG',2989,'PROJCS["RRAF 1991 / UTM zone 20N (deprecated)",GEOGCS["RRAF 1991",DATUM["Reseau_de_Reference_des_Antilles_Francaises_1991",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6640"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4640"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2989"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2990 : Reunion 1947 / TM Reunion (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2990,'EPSG',2990,'PROJCS["Reunion 1947 / TM Reunion (deprecated)",GEOGCS["Reunion 1947",DATUM["Reunion_1947",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6626"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4626"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-21.11666666666667],PARAMETER["central_meridian",55.53333333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",50000],PARAMETER["false_northing",160000],AUTHORITY["EPSG","2990"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=-21.11666666666667 +lon_0=55.53333333333333 +k=1 +x_0=50000 +y_0=160000 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2990,'EPSG',2990,'PROJCS["Reunion 1947 / TM Reunion (deprecated)",GEOGCS["Reunion 1947",DATUM["Reunion_1947",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[94,-948,-1262,0,0,0,0],AUTHORITY["EPSG","6626"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4626"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-21.11666666666667],PARAMETER["central_meridian",55.53333333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",50000],PARAMETER["false_northing",160000],AUTHORITY["EPSG","2990"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=-21.11666666666667 +lon_0=55.53333333333333 +k=1 +x_0=50000 +y_0=160000 +ellps=intl +towgs84=94,-948,-1262,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2991 : NAD83 / Oregon Lambert --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2991,'EPSG',2991,'PROJCS["NAD83 / Oregon Lambert",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43],PARAMETER["standard_parallel_2",45.5],PARAMETER["latitude_of_origin",41.75],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2991"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=400000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2991,'EPSG',2991,'PROJCS["NAD83 / Oregon Lambert",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43],PARAMETER["standard_parallel_2",45.5],PARAMETER["latitude_of_origin",41.75],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2991"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=400000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2992 : NAD83 / Oregon Lambert (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2992,'EPSG',2992,'PROJCS["NAD83 / Oregon Lambert (ft)",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["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43],PARAMETER["standard_parallel_2",45.5],PARAMETER["latitude_of_origin",41.75],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",1312335.958],PARAMETER["false_northing",0],AUTHORITY["EPSG","2992"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=399999.9999984 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2992,'EPSG',2992,'PROJCS["NAD83 / Oregon Lambert (ft)",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"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43],PARAMETER["standard_parallel_2",45.5],PARAMETER["latitude_of_origin",41.75],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",1312335.958],PARAMETER["false_northing",0],AUTHORITY["EPSG","2992"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=399999.9999984 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 2993 : NAD83(HARN) / Oregon Lambert --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2993,'EPSG',2993,'PROJCS["NAD83(HARN) / Oregon Lambert",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43],PARAMETER["standard_parallel_2",45.5],PARAMETER["latitude_of_origin",41.75],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2993"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=400000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2993,'EPSG',2993,'PROJCS["NAD83(HARN) / Oregon Lambert",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43],PARAMETER["standard_parallel_2",45.5],PARAMETER["latitude_of_origin",41.75],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2993"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=400000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2994 : NAD83(HARN) / Oregon Lambert (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2994,'EPSG',2994,'PROJCS["NAD83(HARN) / Oregon Lambert (ft)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43],PARAMETER["standard_parallel_2",45.5],PARAMETER["latitude_of_origin",41.75],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",1312335.958],PARAMETER["false_northing",0],AUTHORITY["EPSG","2994"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=399999.9999984 +y_0=0 +ellps=GRS80 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2994,'EPSG',2994,'PROJCS["NAD83(HARN) / Oregon Lambert (ft)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43],PARAMETER["standard_parallel_2",45.5],PARAMETER["latitude_of_origin",41.75],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",1312335.958],PARAMETER["false_northing",0],AUTHORITY["EPSG","2994"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=399999.9999984 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 2995 : IGN53 Mare / UTM zone 58S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2995,'EPSG',2995,'PROJCS["IGN53 Mare / UTM zone 58S",GEOGCS["IGN53 Mare",DATUM["IGN53_Mare",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6641"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4641"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2995"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=58 +south +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2995,'EPSG',2995,'PROJCS["IGN53 Mare / UTM zone 58S",GEOGCS["IGN53 Mare",DATUM["IGN53_Mare",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[287.58,177.78,-135.41,0,0,0,0],AUTHORITY["EPSG","6641"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4641"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2995"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=58 +south +ellps=intl +towgs84=287.58,177.78,-135.41,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2996 : ST84 Ile des Pins / UTM zone 58S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2996,'EPSG',2996,'PROJCS["ST84 Ile des Pins / UTM zone 58S",GEOGCS["ST84 Ile des Pins",DATUM["ST84_Ile_des_Pins",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6642"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4642"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2996"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=58 +south +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2996,'EPSG',2996,'PROJCS["ST84 Ile des Pins / UTM zone 58S",GEOGCS["ST84 Ile des Pins",DATUM["ST84_Ile_des_Pins",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-13,-348,292,0,0,0,0],AUTHORITY["EPSG","6642"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4642"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2996"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=58 +south +ellps=intl +towgs84=-13,-348,292,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2997 : ST71 Belep / UTM zone 58S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2997,'EPSG',2997,'PROJCS["ST71 Belep / UTM zone 58S",GEOGCS["ST71 Belep",DATUM["ST71_Belep",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-480.26,-438.32,-643.429,16.3119,20.1721,-4.0349,-111.7],AUTHORITY["EPSG","6643"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4643"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2997"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=58 +south +ellps=intl +towgs84=-480.26,-438.32,-643.429,16.3119,20.1721,-4.0349,-111.7 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2997,'EPSG',2997,'PROJCS["ST71 Belep / UTM zone 58S",GEOGCS["ST71 Belep",DATUM["ST71_Belep",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-480.26,-438.32,-643.429,16.3119,20.1721,-4.0349,-111.7],AUTHORITY["EPSG","6643"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4643"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2997"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=58 +south +ellps=intl +towgs84=-480.26,-438.32,-643.429,16.3119,20.1721,-4.0349,-111.7 +units=m +no_defs '); --- --- EPSG 2998 : NEA74 Noumea / UTM zone 58S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2998,'EPSG',2998,'PROJCS["NEA74 Noumea / UTM zone 58S",GEOGCS["NEA74 Noumea",DATUM["NEA74_Noumea",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6644"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4644"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2998"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=58 +south +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2998,'EPSG',2998,'PROJCS["NEA74 Noumea / UTM zone 58S",GEOGCS["NEA74 Noumea",DATUM["NEA74_Noumea",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-10.18,-350.43,291.37,0,0,0,0],AUTHORITY["EPSG","6644"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4644"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2998"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=58 +south +ellps=intl +towgs84=-10.18,-350.43,291.37,0,0,0,0 +units=m +no_defs '); --- --- EPSG 2999 : Grand Comoros / UTM zone 38S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2999,'EPSG',2999,'PROJCS["Grand Comoros / UTM zone 38S",GEOGCS["Grand Comoros",DATUM["Grand_Comoros",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6646"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4646"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2999"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +south +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2999,'EPSG',2999,'PROJCS["Grand Comoros / UTM zone 38S",GEOGCS["Grand Comoros",DATUM["Grand_Comoros",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6646"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4646"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","2999"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +south +ellps=intl +units=m +no_defs '); --- --- EPSG 3000 : Segara / NEIEZ --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3000,'EPSG',3000,'PROJCS["Segara / NEIEZ",GEOGCS["Segara",DATUM["Gunung_Segara",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6613"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4613"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",110],PARAMETER["scale_factor",0.997],PARAMETER["false_easting",3900000],PARAMETER["false_northing",900000],AUTHORITY["EPSG","3000"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=merc +lon_0=110 +k=0.997 +x_0=3900000 +y_0=900000 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3000,'EPSG',3000,'PROJCS["Segara / NEIEZ",GEOGCS["Segara",DATUM["Gunung_Segara",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-403,684,41,0,0,0,0],AUTHORITY["EPSG","6613"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4613"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",110],PARAMETER["scale_factor",0.997],PARAMETER["false_easting",3900000],PARAMETER["false_northing",900000],AUTHORITY["EPSG","3000"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=merc +lon_0=110 +k=0.997 +x_0=3900000 +y_0=900000 +ellps=bessel +towgs84=-403,684,41,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3001 : Batavia / NEIEZ --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3001,'EPSG',3001,'PROJCS["Batavia / NEIEZ",GEOGCS["Batavia",DATUM["Batavia",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6211"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4211"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",110],PARAMETER["scale_factor",0.997],PARAMETER["false_easting",3900000],PARAMETER["false_northing",900000],AUTHORITY["EPSG","3001"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=merc +lon_0=110 +k=0.997 +x_0=3900000 +y_0=900000 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3001,'EPSG',3001,'PROJCS["Batavia / NEIEZ",GEOGCS["Batavia",DATUM["Batavia",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-377,681,-50,0,0,0,0],AUTHORITY["EPSG","6211"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4211"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",110],PARAMETER["scale_factor",0.997],PARAMETER["false_easting",3900000],PARAMETER["false_northing",900000],AUTHORITY["EPSG","3001"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=merc +lon_0=110 +k=0.997 +x_0=3900000 +y_0=900000 +ellps=bessel +towgs84=-377,681,-50,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3002 : Makassar / NEIEZ --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3002,'EPSG',3002,'PROJCS["Makassar / NEIEZ",GEOGCS["Makassar",DATUM["Makassar",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-587.8,519.75,145.76,0,0,0,0],AUTHORITY["EPSG","6257"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4257"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",110],PARAMETER["scale_factor",0.997],PARAMETER["false_easting",3900000],PARAMETER["false_northing",900000],AUTHORITY["EPSG","3002"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=merc +lon_0=110 +k=0.997 +x_0=3900000 +y_0=900000 +ellps=bessel +towgs84=-587.8,519.75,145.76,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3002,'EPSG',3002,'PROJCS["Makassar / NEIEZ",GEOGCS["Makassar",DATUM["Makassar",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-587.8,519.75,145.76,0,0,0,0],AUTHORITY["EPSG","6257"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4257"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",110],PARAMETER["scale_factor",0.997],PARAMETER["false_easting",3900000],PARAMETER["false_northing",900000],AUTHORITY["EPSG","3002"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=merc +lon_0=110 +k=0.997 +x_0=3900000 +y_0=900000 +ellps=bessel +towgs84=-587.8,519.75,145.76,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3003 : Monte Mario / Italy zone 1 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3003,'EPSG',3003,'PROJCS["Monte Mario / Italy zone 1",GEOGCS["Monte Mario",DATUM["Monte_Mario",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6265"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4265"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3003"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=9 +k=0.9996 +x_0=1500000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3003,'EPSG',3003,'PROJCS["Monte Mario / Italy zone 1",GEOGCS["Monte Mario",DATUM["Monte_Mario",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68],AUTHORITY["EPSG","6265"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4265"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3003"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=9 +k=0.9996 +x_0=1500000 +y_0=0 +ellps=intl +towgs84=-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68 +units=m +no_defs '); --- --- EPSG 3004 : Monte Mario / Italy zone 2 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3004,'EPSG',3004,'PROJCS["Monte Mario / Italy zone 2",GEOGCS["Monte Mario",DATUM["Monte_Mario",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6265"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4265"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",2520000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3004"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=0.9996 +x_0=2520000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3004,'EPSG',3004,'PROJCS["Monte Mario / Italy zone 2",GEOGCS["Monte Mario",DATUM["Monte_Mario",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68],AUTHORITY["EPSG","6265"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4265"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",2520000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3004"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=0.9996 +x_0=2520000 +y_0=0 +ellps=intl +towgs84=-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68 +units=m +no_defs '); --- --- EPSG 3005 : NAD83 / BC Albers --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3005,'EPSG',3005,'PROJCS["NAD83 / BC Albers",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",50],PARAMETER["standard_parallel_2",58.5],PARAMETER["latitude_of_center",45],PARAMETER["longitude_of_center",-126],PARAMETER["false_easting",1000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3005"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=aea +lat_1=50 +lat_2=58.5 +lat_0=45 +lon_0=-126 +x_0=1000000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3005,'EPSG',3005,'PROJCS["NAD83 / BC Albers",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",50],PARAMETER["standard_parallel_2",58.5],PARAMETER["latitude_of_center",45],PARAMETER["longitude_of_center",-126],PARAMETER["false_easting",1000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3005"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=aea +lat_1=50 +lat_2=58.5 +lat_0=45 +lon_0=-126 +x_0=1000000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3006 : SWEREF99 TM --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3006,'EPSG',3006,'PROJCS["SWEREF99 TM",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3006"],AXIS["y",EAST],AXIS["x",NORTH]]','+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3006,'EPSG',3006,'PROJCS["SWEREF99 TM",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3006"],AXIS["x",NORTH],AXIS["y",EAST]]','+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3007 : SWEREF99 12 00 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3007,'EPSG',3007,'PROJCS["SWEREF99 12 00",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",12],PARAMETER["scale_factor",1],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3007"],AXIS["y",EAST],AXIS["x",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3007,'EPSG',3007,'PROJCS["SWEREF99 12 00",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",12],PARAMETER["scale_factor",1],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3007"],AXIS["x",NORTH],AXIS["y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3008 : SWEREF99 13 30 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3008,'EPSG',3008,'PROJCS["SWEREF99 13 30",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",13.5],PARAMETER["scale_factor",1],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3008"],AXIS["y",EAST],AXIS["x",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=13.5 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3008,'EPSG',3008,'PROJCS["SWEREF99 13 30",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",13.5],PARAMETER["scale_factor",1],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3008"],AXIS["x",NORTH],AXIS["y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=13.5 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3009 : SWEREF99 15 00 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3009,'EPSG',3009,'PROJCS["SWEREF99 15 00",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",1],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3009"],AXIS["y",EAST],AXIS["x",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3009,'EPSG',3009,'PROJCS["SWEREF99 15 00",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",1],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3009"],AXIS["x",NORTH],AXIS["y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3010 : SWEREF99 16 30 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3010,'EPSG',3010,'PROJCS["SWEREF99 16 30",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",16.5],PARAMETER["scale_factor",1],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3010"],AXIS["y",EAST],AXIS["x",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=16.5 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3010,'EPSG',3010,'PROJCS["SWEREF99 16 30",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",16.5],PARAMETER["scale_factor",1],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3010"],AXIS["x",NORTH],AXIS["y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=16.5 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3011 : SWEREF99 18 00 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3011,'EPSG',3011,'PROJCS["SWEREF99 18 00",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18],PARAMETER["scale_factor",1],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3011"],AXIS["y",EAST],AXIS["x",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3011,'EPSG',3011,'PROJCS["SWEREF99 18 00",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18],PARAMETER["scale_factor",1],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3011"],AXIS["x",NORTH],AXIS["y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3012 : SWEREF99 14 15 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3012,'EPSG',3012,'PROJCS["SWEREF99 14 15",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",14.25],PARAMETER["scale_factor",1],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3012"],AXIS["y",EAST],AXIS["x",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=14.25 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3012,'EPSG',3012,'PROJCS["SWEREF99 14 15",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",14.25],PARAMETER["scale_factor",1],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3012"],AXIS["x",NORTH],AXIS["y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=14.25 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3013 : SWEREF99 15 45 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3013,'EPSG',3013,'PROJCS["SWEREF99 15 45",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15.75],PARAMETER["scale_factor",1],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3013"],AXIS["y",EAST],AXIS["x",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=15.75 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3013,'EPSG',3013,'PROJCS["SWEREF99 15 45",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15.75],PARAMETER["scale_factor",1],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3013"],AXIS["x",NORTH],AXIS["y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=15.75 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3014 : SWEREF99 17 15 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3014,'EPSG',3014,'PROJCS["SWEREF99 17 15",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",17.25],PARAMETER["scale_factor",1],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3014"],AXIS["y",EAST],AXIS["x",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=17.25 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3014,'EPSG',3014,'PROJCS["SWEREF99 17 15",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",17.25],PARAMETER["scale_factor",1],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3014"],AXIS["x",NORTH],AXIS["y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=17.25 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3015 : SWEREF99 18 45 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3015,'EPSG',3015,'PROJCS["SWEREF99 18 45",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18.75],PARAMETER["scale_factor",1],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3015"],AXIS["y",EAST],AXIS["x",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=18.75 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3015,'EPSG',3015,'PROJCS["SWEREF99 18 45",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18.75],PARAMETER["scale_factor",1],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3015"],AXIS["x",NORTH],AXIS["y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=18.75 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3016 : SWEREF99 20 15 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3016,'EPSG',3016,'PROJCS["SWEREF99 20 15",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",20.25],PARAMETER["scale_factor",1],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3016"],AXIS["y",EAST],AXIS["x",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=20.25 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3016,'EPSG',3016,'PROJCS["SWEREF99 20 15",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",20.25],PARAMETER["scale_factor",1],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3016"],AXIS["x",NORTH],AXIS["y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=20.25 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3017 : SWEREF99 21 45 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3017,'EPSG',3017,'PROJCS["SWEREF99 21 45",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21.75],PARAMETER["scale_factor",1],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3017"],AXIS["y",EAST],AXIS["x",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=21.75 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3017,'EPSG',3017,'PROJCS["SWEREF99 21 45",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21.75],PARAMETER["scale_factor",1],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3017"],AXIS["x",NORTH],AXIS["y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=21.75 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3018 : SWEREF99 23 15 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3018,'EPSG',3018,'PROJCS["SWEREF99 23 15",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",23.25],PARAMETER["scale_factor",1],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3018"],AXIS["y",EAST],AXIS["x",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=23.25 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3018,'EPSG',3018,'PROJCS["SWEREF99 23 15",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",23.25],PARAMETER["scale_factor",1],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3018"],AXIS["x",NORTH],AXIS["y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=23.25 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3019 : RT90 7.5 gon V --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3019,'EPSG',3019,'PROJCS["RT90 7.5 gon V",GEOGCS["RT90",DATUM["Rikets_koordinatsystem_1990",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6124"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4124"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",11.30827777777778],PARAMETER["scale_factor",1],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3019"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=11.30827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3019,'EPSG',3019,'PROJCS["RT90 7.5 gon V",GEOGCS["RT90",DATUM["Rikets_koordinatsystem_1990",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[414.1,41.3,603.1,-0.855,2.141,-7.023,0],AUTHORITY["EPSG","6124"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4124"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",11.30827777777778],PARAMETER["scale_factor",1],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3019"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=11.30827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +towgs84=414.1,41.3,603.1,-0.855,2.141,-7.023,0 +units=m +no_defs '); --- --- EPSG 3020 : RT90 5 gon V --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3020,'EPSG',3020,'PROJCS["RT90 5 gon V",GEOGCS["RT90",DATUM["Rikets_koordinatsystem_1990",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6124"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4124"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",13.55827777777778],PARAMETER["scale_factor",1],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3020"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=13.55827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3020,'EPSG',3020,'PROJCS["RT90 5 gon V",GEOGCS["RT90",DATUM["Rikets_koordinatsystem_1990",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[414.1,41.3,603.1,-0.855,2.141,-7.023,0],AUTHORITY["EPSG","6124"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4124"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",13.55827777777778],PARAMETER["scale_factor",1],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3020"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=13.55827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +towgs84=414.1,41.3,603.1,-0.855,2.141,-7.023,0 +units=m +no_defs '); --- --- EPSG 3021 : RT90 2.5 gon V --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3021,'EPSG',3021,'PROJCS["RT90 2.5 gon V",GEOGCS["RT90",DATUM["Rikets_koordinatsystem_1990",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6124"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4124"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15.80827777777778],PARAMETER["scale_factor",1],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3021"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=15.80827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +towgs84=414.1,41.3,603.1,-0.855,2.141,-7.023,0 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3021,'EPSG',3021,'PROJCS["RT90 2.5 gon V",GEOGCS["RT90",DATUM["Rikets_koordinatsystem_1990",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[414.1,41.3,603.1,-0.855,2.141,-7.023,0],AUTHORITY["EPSG","6124"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4124"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15.80827777777778],PARAMETER["scale_factor",1],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3021"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=15.80827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +towgs84=414.1,41.3,603.1,-0.855,2.141,-7.023,0 +units=m +no_defs '); --- --- EPSG 3022 : RT90 0 gon --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3022,'EPSG',3022,'PROJCS["RT90 0 gon",GEOGCS["RT90",DATUM["Rikets_koordinatsystem_1990",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6124"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4124"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18.05827777777778],PARAMETER["scale_factor",1],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3022"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=18.05827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3022,'EPSG',3022,'PROJCS["RT90 0 gon",GEOGCS["RT90",DATUM["Rikets_koordinatsystem_1990",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[414.1,41.3,603.1,-0.855,2.141,-7.023,0],AUTHORITY["EPSG","6124"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4124"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18.05827777777778],PARAMETER["scale_factor",1],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3022"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=18.05827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +towgs84=414.1,41.3,603.1,-0.855,2.141,-7.023,0 +units=m +no_defs '); --- --- EPSG 3023 : RT90 2.5 gon O --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3023,'EPSG',3023,'PROJCS["RT90 2.5 gon O",GEOGCS["RT90",DATUM["Rikets_koordinatsystem_1990",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6124"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4124"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",20.30827777777778],PARAMETER["scale_factor",1],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3023"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=20.30827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3023,'EPSG',3023,'PROJCS["RT90 2.5 gon O",GEOGCS["RT90",DATUM["Rikets_koordinatsystem_1990",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[414.1,41.3,603.1,-0.855,2.141,-7.023,0],AUTHORITY["EPSG","6124"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4124"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",20.30827777777778],PARAMETER["scale_factor",1],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3023"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=20.30827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +towgs84=414.1,41.3,603.1,-0.855,2.141,-7.023,0 +units=m +no_defs '); --- --- EPSG 3024 : RT90 5 gon O --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3024,'EPSG',3024,'PROJCS["RT90 5 gon O",GEOGCS["RT90",DATUM["Rikets_koordinatsystem_1990",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6124"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4124"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",22.55827777777778],PARAMETER["scale_factor",1],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3024"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=22.55827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3024,'EPSG',3024,'PROJCS["RT90 5 gon O",GEOGCS["RT90",DATUM["Rikets_koordinatsystem_1990",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[414.1,41.3,603.1,-0.855,2.141,-7.023,0],AUTHORITY["EPSG","6124"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4124"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",22.55827777777778],PARAMETER["scale_factor",1],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3024"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=22.55827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +towgs84=414.1,41.3,603.1,-0.855,2.141,-7.023,0 +units=m +no_defs '); --- --- EPSG 3025 : RT38 7.5 gon V --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3025,'EPSG',3025,'PROJCS["RT38 7.5 gon V",GEOGCS["RT38",DATUM["Stockholm_1938",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6308"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4308"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",11.30827777777778],PARAMETER["scale_factor",1],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3025"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=11.30827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3025,'EPSG',3025,'PROJCS["RT38 7.5 gon V",GEOGCS["RT38",DATUM["Stockholm_1938",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6308"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4308"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",11.30827777777778],PARAMETER["scale_factor",1],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3025"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=11.30827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs '); --- --- EPSG 3026 : RT38 5 gon V --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3026,'EPSG',3026,'PROJCS["RT38 5 gon V",GEOGCS["RT38",DATUM["Stockholm_1938",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6308"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4308"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",13.55827777777778],PARAMETER["scale_factor",1],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3026"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=13.55827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3026,'EPSG',3026,'PROJCS["RT38 5 gon V",GEOGCS["RT38",DATUM["Stockholm_1938",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6308"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4308"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",13.55827777777778],PARAMETER["scale_factor",1],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3026"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=13.55827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs '); --- --- EPSG 3027 : RT38 2.5 gon V --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3027,'EPSG',3027,'PROJCS["RT38 2.5 gon V",GEOGCS["RT38",DATUM["Stockholm_1938",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6308"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4308"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15.80827777777778],PARAMETER["scale_factor",1],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3027"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=15.80827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3027,'EPSG',3027,'PROJCS["RT38 2.5 gon V",GEOGCS["RT38",DATUM["Stockholm_1938",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6308"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4308"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15.80827777777778],PARAMETER["scale_factor",1],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3027"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=15.80827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs '); --- --- EPSG 3028 : RT38 0 gon --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3028,'EPSG',3028,'PROJCS["RT38 0 gon",GEOGCS["RT38",DATUM["Stockholm_1938",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6308"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4308"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18.05827777777778],PARAMETER["scale_factor",1],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3028"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=18.05827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3028,'EPSG',3028,'PROJCS["RT38 0 gon",GEOGCS["RT38",DATUM["Stockholm_1938",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6308"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4308"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18.05827777777778],PARAMETER["scale_factor",1],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3028"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=18.05827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs '); --- --- EPSG 3029 : RT38 2.5 gon O --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3029,'EPSG',3029,'PROJCS["RT38 2.5 gon O",GEOGCS["RT38",DATUM["Stockholm_1938",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6308"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4308"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",20.30827777777778],PARAMETER["scale_factor",1],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3029"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=20.30827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3029,'EPSG',3029,'PROJCS["RT38 2.5 gon O",GEOGCS["RT38",DATUM["Stockholm_1938",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6308"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4308"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",20.30827777777778],PARAMETER["scale_factor",1],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3029"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=20.30827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs '); --- --- EPSG 3030 : RT38 5 gon O --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3030,'EPSG',3030,'PROJCS["RT38 5 gon O",GEOGCS["RT38",DATUM["Stockholm_1938",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6308"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4308"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",22.55827777777778],PARAMETER["scale_factor",1],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3030"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=22.55827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3030,'EPSG',3030,'PROJCS["RT38 5 gon O",GEOGCS["RT38",DATUM["Stockholm_1938",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6308"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4308"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",22.55827777777778],PARAMETER["scale_factor",1],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3030"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=22.55827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs '); --- --- EPSG 3031 : WGS 84 / Antarctic Polar Stereographic --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3031,'EPSG',3031,'PROJCS["WGS 84 / Antarctic Polar Stereographic",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-71],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3031"],AXIS["Easting",UNKNOWN],AXIS["Northing",UNKNOWN]]','+proj=stere +lat_0=-90 +lat_ts=-71 +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3031,'EPSG',3031,'PROJCS["WGS 84 / Antarctic Polar Stereographic",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-71],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3031"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=stere +lat_0=-90 +lat_ts=-71 +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3032 : WGS 84 / Australian Antarctic Polar Stereographic --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3032,'EPSG',3032,'PROJCS["WGS 84 / Australian Antarctic Polar Stereographic",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-71],PARAMETER["central_meridian",70],PARAMETER["scale_factor",1],PARAMETER["false_easting",6000000],PARAMETER["false_northing",6000000],AUTHORITY["EPSG","3032"],AXIS["Easting",UNKNOWN],AXIS["Northing",UNKNOWN]]','+proj=stere +lat_0=-90 +lat_ts=-71 +lon_0=70 +k=1 +x_0=6000000 +y_0=6000000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3032,'EPSG',3032,'PROJCS["WGS 84 / Australian Antarctic Polar Stereographic",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-71],PARAMETER["central_meridian",70],PARAMETER["scale_factor",1],PARAMETER["false_easting",6000000],PARAMETER["false_northing",6000000],AUTHORITY["EPSG","3032"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=stere +lat_0=-90 +lat_ts=-71 +lon_0=70 +k=1 +x_0=6000000 +y_0=6000000 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3033 : WGS 84 / Australian Antarctic Lambert --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3033,'EPSG',3033,'PROJCS["WGS 84 / Australian Antarctic Lambert",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.5],PARAMETER["standard_parallel_2",-74.5],PARAMETER["latitude_of_origin",-50],PARAMETER["central_meridian",70],PARAMETER["false_easting",6000000],PARAMETER["false_northing",6000000],AUTHORITY["EPSG","3033"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.5 +lat_2=-74.5 +lat_0=-50 +lon_0=70 +x_0=6000000 +y_0=6000000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3033,'EPSG',3033,'PROJCS["WGS 84 / Australian Antarctic Lambert",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.5],PARAMETER["standard_parallel_2",-74.5],PARAMETER["latitude_of_origin",-50],PARAMETER["central_meridian",70],PARAMETER["false_easting",6000000],PARAMETER["false_northing",6000000],AUTHORITY["EPSG","3033"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.5 +lat_2=-74.5 +lat_0=-50 +lon_0=70 +x_0=6000000 +y_0=6000000 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3034 : ETRS89 / ETRS-LCC --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3034,'EPSG',3034,'PROJCS["ETRS89 / ETRS-LCC",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",35],PARAMETER["standard_parallel_2",65],PARAMETER["latitude_of_origin",52],PARAMETER["central_meridian",10],PARAMETER["false_easting",4000000],PARAMETER["false_northing",2800000],AUTHORITY["EPSG","3034"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=35 +lat_2=65 +lat_0=52 +lon_0=10 +x_0=4000000 +y_0=2800000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3034,'EPSG',3034,'PROJCS["ETRS89 / ETRS-LCC",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",35],PARAMETER["standard_parallel_2",65],PARAMETER["latitude_of_origin",52],PARAMETER["central_meridian",10],PARAMETER["false_easting",4000000],PARAMETER["false_northing",2800000],AUTHORITY["EPSG","3034"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=lcc +lat_1=35 +lat_2=65 +lat_0=52 +lon_0=10 +x_0=4000000 +y_0=2800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3035 : ETRS89 / ETRS-LAEA --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3035,'EPSG',3035,'PROJCS["ETRS89 / ETRS-LAEA",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["latitude_of_center",52],PARAMETER["longitude_of_center",10],PARAMETER["false_easting",4321000],PARAMETER["false_northing",3210000],AUTHORITY["EPSG","3035"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=laea +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3035,'EPSG',3035,'PROJCS["ETRS89 / ETRS-LAEA",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["latitude_of_center",52],PARAMETER["longitude_of_center",10],PARAMETER["false_easting",4321000],PARAMETER["false_northing",3210000],AUTHORITY["EPSG","3035"],AXIS["Y",NORTH],AXIS["X",EAST]]','+proj=laea +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3036 : Moznet / UTM zone 36S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3036,'EPSG',3036,'PROJCS["Moznet / UTM zone 36S",GEOGCS["Moznet",DATUM["Moznet_ITRF94",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,-0,-0,-0,0],AUTHORITY["EPSG","6130"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4130"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3036"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=36 +south +ellps=WGS84 +towgs84=0,0,0,-0,-0,-0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3036,'EPSG',3036,'PROJCS["Moznet / UTM zone 36S",GEOGCS["Moznet",DATUM["Moznet_ITRF94",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,-0,-0,-0,0],AUTHORITY["EPSG","6130"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4130"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3036"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=36 +south +ellps=WGS84 +towgs84=0,0,0,-0,-0,-0,0 +units=m +no_defs '); --- --- EPSG 3037 : Moznet / UTM zone 37S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3037,'EPSG',3037,'PROJCS["Moznet / UTM zone 37S",GEOGCS["Moznet",DATUM["Moznet_ITRF94",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,-0,-0,-0,0],AUTHORITY["EPSG","6130"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4130"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3037"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=37 +south +ellps=WGS84 +towgs84=0,0,0,-0,-0,-0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3037,'EPSG',3037,'PROJCS["Moznet / UTM zone 37S",GEOGCS["Moznet",DATUM["Moznet_ITRF94",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,-0,-0,-0,0],AUTHORITY["EPSG","6130"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4130"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3037"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=37 +south +ellps=WGS84 +towgs84=0,0,0,-0,-0,-0,0 +units=m +no_defs '); --- --- EPSG 3038 : ETRS89 / ETRS-TM26 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3038,'EPSG',3038,'PROJCS["ETRS89 / ETRS-TM26",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3038"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=26 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3038,'EPSG',3038,'PROJCS["ETRS89 / ETRS-TM26",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3038"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=utm +zone=26 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3039 : ETRS89 / ETRS-TM27 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3039,'EPSG',3039,'PROJCS["ETRS89 / ETRS-TM27",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3039"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=27 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3039,'EPSG',3039,'PROJCS["ETRS89 / ETRS-TM27",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3039"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=utm +zone=27 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3040 : ETRS89 / ETRS-TM28 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3040,'EPSG',3040,'PROJCS["ETRS89 / ETRS-TM28",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3040"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3040,'EPSG',3040,'PROJCS["ETRS89 / ETRS-TM28",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3040"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=utm +zone=28 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3041 : ETRS89 / ETRS-TM29 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3041,'EPSG',3041,'PROJCS["ETRS89 / ETRS-TM29",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3041"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3041,'EPSG',3041,'PROJCS["ETRS89 / ETRS-TM29",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3041"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=utm +zone=29 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3042 : ETRS89 / ETRS-TM30 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3042,'EPSG',3042,'PROJCS["ETRS89 / ETRS-TM30",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3042"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=30 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3042,'EPSG',3042,'PROJCS["ETRS89 / ETRS-TM30",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3042"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=utm +zone=30 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3043 : ETRS89 / ETRS-TM31 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3043,'EPSG',3043,'PROJCS["ETRS89 / ETRS-TM31",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3043"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=31 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3043,'EPSG',3043,'PROJCS["ETRS89 / ETRS-TM31",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3043"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=utm +zone=31 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3044 : ETRS89 / ETRS-TM32 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3044,'EPSG',3044,'PROJCS["ETRS89 / ETRS-TM32",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3044"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3044,'EPSG',3044,'PROJCS["ETRS89 / ETRS-TM32",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3044"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3045 : ETRS89 / ETRS-TM33 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3045,'EPSG',3045,'PROJCS["ETRS89 / ETRS-TM33",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3045"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=33 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3045,'EPSG',3045,'PROJCS["ETRS89 / ETRS-TM33",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3045"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3046 : ETRS89 / ETRS-TM34 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3046,'EPSG',3046,'PROJCS["ETRS89 / ETRS-TM34",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3046"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=34 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3046,'EPSG',3046,'PROJCS["ETRS89 / ETRS-TM34",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3046"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=utm +zone=34 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3047 : ETRS89 / ETRS-TM35 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3047,'EPSG',3047,'PROJCS["ETRS89 / ETRS-TM35",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3047"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=35 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3047,'EPSG',3047,'PROJCS["ETRS89 / ETRS-TM35",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3047"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=utm +zone=35 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3048 : ETRS89 / ETRS-TM36 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3048,'EPSG',3048,'PROJCS["ETRS89 / ETRS-TM36",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3048"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=36 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3048,'EPSG',3048,'PROJCS["ETRS89 / ETRS-TM36",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3048"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=utm +zone=36 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3049 : ETRS89 / ETRS-TM37 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3049,'EPSG',3049,'PROJCS["ETRS89 / ETRS-TM37",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3049"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=37 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3049,'EPSG',3049,'PROJCS["ETRS89 / ETRS-TM37",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3049"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=utm +zone=37 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3050 : ETRS89 / ETRS-TM38 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3050,'EPSG',3050,'PROJCS["ETRS89 / ETRS-TM38",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3050"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3050,'EPSG',3050,'PROJCS["ETRS89 / ETRS-TM38",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3050"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=utm +zone=38 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3051 : ETRS89 / ETRS-TM39 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3051,'EPSG',3051,'PROJCS["ETRS89 / ETRS-TM39",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3051"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=39 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3051,'EPSG',3051,'PROJCS["ETRS89 / ETRS-TM39",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3051"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=utm +zone=39 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3052 : Reykjavik 1900 / Lambert 1900 --- @@ -5898,343 +6030,343 @@ --- --- EPSG 3054 : Hjorsey 1955 / UTM zone 26N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3054,'EPSG',3054,'PROJCS["Hjorsey 1955 / UTM zone 26N",GEOGCS["Hjorsey 1955",DATUM["Hjorsey_1955",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-73,46,-86,0,0,0,0],AUTHORITY["EPSG","6658"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4658"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3054"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=26 +ellps=intl +towgs84=-73,46,-86,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3054,'EPSG',3054,'PROJCS["Hjorsey 1955 / UTM zone 26N",GEOGCS["Hjorsey 1955",DATUM["Hjorsey_1955",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-73,46,-86,0,0,0,0],AUTHORITY["EPSG","6658"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4658"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3054"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=26 +ellps=intl +towgs84=-73,46,-86,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3055 : Hjorsey 1955 / UTM zone 27N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3055,'EPSG',3055,'PROJCS["Hjorsey 1955 / UTM zone 27N",GEOGCS["Hjorsey 1955",DATUM["Hjorsey_1955",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-73,46,-86,0,0,0,0],AUTHORITY["EPSG","6658"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4658"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3055"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=27 +ellps=intl +towgs84=-73,46,-86,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3055,'EPSG',3055,'PROJCS["Hjorsey 1955 / UTM zone 27N",GEOGCS["Hjorsey 1955",DATUM["Hjorsey_1955",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-73,46,-86,0,0,0,0],AUTHORITY["EPSG","6658"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4658"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3055"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=27 +ellps=intl +towgs84=-73,46,-86,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3056 : Hjorsey 1955 / UTM zone 28N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3056,'EPSG',3056,'PROJCS["Hjorsey 1955 / UTM zone 28N",GEOGCS["Hjorsey 1955",DATUM["Hjorsey_1955",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-73,46,-86,0,0,0,0],AUTHORITY["EPSG","6658"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4658"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3056"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +ellps=intl +towgs84=-73,46,-86,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3056,'EPSG',3056,'PROJCS["Hjorsey 1955 / UTM zone 28N",GEOGCS["Hjorsey 1955",DATUM["Hjorsey_1955",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-73,46,-86,0,0,0,0],AUTHORITY["EPSG","6658"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4658"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3056"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +ellps=intl +towgs84=-73,46,-86,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3057 : ISN93 / Lambert 1993 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3057,'EPSG',3057,'PROJCS["ISN93 / Lambert 1993",GEOGCS["ISN93",DATUM["Islands_Network_1993",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6659"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4659"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",64.25],PARAMETER["standard_parallel_2",65.75],PARAMETER["latitude_of_origin",65],PARAMETER["central_meridian",-19],PARAMETER["false_easting",500000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","3057"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=64.25 +lat_2=65.75 +lat_0=65 +lon_0=-19 +x_0=500000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3057,'EPSG',3057,'PROJCS["ISN93 / Lambert 1993",GEOGCS["ISN93",DATUM["Islands_Network_1993",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6659"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4659"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",64.25],PARAMETER["standard_parallel_2",65.75],PARAMETER["latitude_of_origin",65],PARAMETER["central_meridian",-19],PARAMETER["false_easting",500000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","3057"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=64.25 +lat_2=65.75 +lat_0=65 +lon_0=-19 +x_0=500000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3058 : Helle 1954 / Jan Mayen Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3058,'EPSG',3058,'PROJCS["Helle 1954 / Jan Mayen Grid",GEOGCS["Helle 1954",DATUM["Helle_1954",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[982.609,552.753,-540.873,32.3934,-153.257,-96.2266,16.805],AUTHORITY["EPSG","6660"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4660"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-8.5],PARAMETER["scale_factor",1],PARAMETER["false_easting",50000],PARAMETER["false_northing",-7800000],AUTHORITY["EPSG","3058"],AXIS["y",EAST],AXIS["x",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-8.5 +k=1 +x_0=50000 +y_0=-7800000 +ellps=intl +towgs84=982.609,552.753,-540.873,32.3934,-153.257,-96.2266,16.805 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3058,'EPSG',3058,'PROJCS["Helle 1954 / Jan Mayen Grid",GEOGCS["Helle 1954",DATUM["Helle_1954",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[982.609,552.753,-540.873,6.68163,-31.6115,-19.8482,16.805],AUTHORITY["EPSG","6660"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4660"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-8.5],PARAMETER["scale_factor",1],PARAMETER["false_easting",50000],PARAMETER["false_northing",-7800000],AUTHORITY["EPSG","3058"],AXIS["x",NORTH],AXIS["y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=-8.5 +k=1 +x_0=50000 +y_0=-7800000 +ellps=intl +towgs84=982.609,552.753,-540.873,6.68163,-31.6115,-19.8482,16.805 +units=m +no_defs '); --- --- EPSG 3059 : LKS92 / Latvia TM --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3059,'EPSG',3059,'PROJCS["LKS92 / Latvia TM",GEOGCS["LKS92",DATUM["Latvia_1992",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6661"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4661"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",24],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",-6000000],AUTHORITY["EPSG","3059"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9996 +x_0=500000 +y_0=-6000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3059,'EPSG',3059,'PROJCS["LKS92 / Latvia TM",GEOGCS["LKS92",DATUM["Latvia_1992",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6661"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4661"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",24],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",-6000000],AUTHORITY["EPSG","3059"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9996 +x_0=500000 +y_0=-6000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3060 : IGN72 Grande Terre / UTM zone 58S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3060,'EPSG',3060,'PROJCS["IGN72 Grande Terre / UTM zone 58S",GEOGCS["IGN72 Grande Terre",DATUM["IGN72_Grande_Terre",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6634"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4662"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3060"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=58 +south +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3060,'EPSG',3060,'PROJCS["IGN72 Grande Terre / UTM zone 58S",GEOGCS["IGN72 Grande Terre",DATUM["IGN72_Grande_Terre",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-11.64,-348.6,291.98,0,0,0,0],AUTHORITY["EPSG","6634"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4662"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3060"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=58 +south +ellps=intl +towgs84=-11.64,-348.6,291.98,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3061 : Porto Santo 1995 / UTM zone 28N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3061,'EPSG',3061,'PROJCS["Porto Santo 1995 / UTM zone 28N",GEOGCS["Porto Santo 1995",DATUM["Porto_Santo_1995",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6663"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4663"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3061"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3061,'EPSG',3061,'PROJCS["Porto Santo 1995 / UTM zone 28N",GEOGCS["Porto Santo 1995",DATUM["Porto_Santo_1995",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-502.862,-247.438,312.724,0,0,0,0],AUTHORITY["EPSG","6663"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4663"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3061"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +ellps=intl +towgs84=-502.862,-247.438,312.724,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3062 : Azores Oriental 1995 / UTM zone 26N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3062,'EPSG',3062,'PROJCS["Azores Oriental 1995 / UTM zone 26N",GEOGCS["Azores Oriental 1995",DATUM["Azores_Oriental_Islands_1995",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6664"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4664"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3062"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=26 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3062,'EPSG',3062,'PROJCS["Azores Oriental 1995 / UTM zone 26N",GEOGCS["Azores Oriental 1995",DATUM["Azores_Oriental_Islands_1995",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-204.619,140.176,55.226,0,0,0,0],AUTHORITY["EPSG","6664"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4664"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3062"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=26 +ellps=intl +towgs84=-204.619,140.176,55.226,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3063 : Azores Central 1995 / UTM zone 26N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3063,'EPSG',3063,'PROJCS["Azores Central 1995 / UTM zone 26N",GEOGCS["Azores Central 1995",DATUM["Azores_Central_Islands_1995",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6665"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4665"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3063"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=26 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3063,'EPSG',3063,'PROJCS["Azores Central 1995 / UTM zone 26N",GEOGCS["Azores Central 1995",DATUM["Azores_Central_Islands_1995",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-106.226,166.366,-37.893,0,0,0,0],AUTHORITY["EPSG","6665"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4665"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3063"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=26 +ellps=intl +towgs84=-106.226,166.366,-37.893,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3064 : IGM95 / UTM zone 32N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3064,'EPSG',3064,'PROJCS["IGM95 / UTM zone 32N",GEOGCS["IGM95",DATUM["Istituto_Geografico_Militaire_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6670"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4670"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3064"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3064,'EPSG',3064,'PROJCS["IGM95 / UTM zone 32N",GEOGCS["IGM95",DATUM["Istituto_Geografico_Militaire_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6670"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4670"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3064"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3065 : IGM95 / UTM zone 33N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3065,'EPSG',3065,'PROJCS["IGM95 / UTM zone 33N",GEOGCS["IGM95",DATUM["Istituto_Geografico_Militaire_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6670"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4670"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3065"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=33 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3065,'EPSG',3065,'PROJCS["IGM95 / UTM zone 33N",GEOGCS["IGM95",DATUM["Istituto_Geografico_Militaire_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6670"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4670"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3065"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=33 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3066 : ED50 / Jordan TM --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3066,'EPSG',3066,'PROJCS["ED50 / Jordan TM",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",37],PARAMETER["scale_factor",0.9998],PARAMETER["false_easting",500000],PARAMETER["false_northing",-3000000],AUTHORITY["EPSG","3066"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=37 +k=0.9998 +x_0=500000 +y_0=-3000000 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3066,'EPSG',3066,'PROJCS["ED50 / Jordan TM",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-87,-98,-121,0,0,0,0],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",37],PARAMETER["scale_factor",0.9998],PARAMETER["false_easting",500000],PARAMETER["false_northing",-3000000],AUTHORITY["EPSG","3066"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=37 +k=0.9998 +x_0=500000 +y_0=-3000000 +ellps=intl +towgs84=-87,-98,-121,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3067 : ETRS89 / ETRS-TM35FIN --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3067,'EPSG',3067,'PROJCS["ETRS89 / ETRS-TM35FIN",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3067"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=35 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3067,'EPSG',3067,'PROJCS["ETRS89 / ETRS-TM35FIN",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3067"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=35 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3068 : DHDN / Soldner Berlin --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3068,'EPSG',3068,'PROJCS["DHDN / Soldner Berlin",GEOGCS["DHDN",DATUM["Deutsches_Hauptdreiecksnetz",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6314"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4314"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Cassini_Soldner"],PARAMETER["latitude_of_origin",52.41864827777778],PARAMETER["central_meridian",13.62720366666667],PARAMETER["false_easting",40000],PARAMETER["false_northing",10000],AUTHORITY["EPSG","3068"],AXIS["y",EAST],AXIS["x",NORTH]]','+proj=cass +lat_0=52.41864827777778 +lon_0=13.62720366666667 +x_0=40000 +y_0=10000 +ellps=bessel +datum=potsdam +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3068,'EPSG',3068,'PROJCS["DHDN / Soldner Berlin",GEOGCS["DHDN",DATUM["Deutsches_Hauptdreiecksnetz",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[598.1,73.7,418.2,0.202,0.045,-2.455,6.7],AUTHORITY["EPSG","6314"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4314"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Cassini_Soldner"],PARAMETER["latitude_of_origin",52.41864827777778],PARAMETER["central_meridian",13.62720366666667],PARAMETER["false_easting",40000],PARAMETER["false_northing",10000],AUTHORITY["EPSG","3068"],AXIS["x",NORTH],AXIS["y",EAST]]','+proj=cass +lat_0=52.41864827777778 +lon_0=13.62720366666667 +x_0=40000 +y_0=10000 +ellps=bessel +towgs84=598.1,73.7,418.2,0.202,0.045,-2.455,6.7 +units=m +no_defs '); --- --- EPSG 3069 : NAD27 / Wisconsin Transverse Mercator --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3069,'EPSG',3069,'PROJCS["NAD27 / Wisconsin Transverse Mercator",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-90],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",-4500000],AUTHORITY["EPSG","3069"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-90 +k=0.9996 +x_0=500000 +y_0=-4500000 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3069,'EPSG',3069,'PROJCS["NAD27 / Wisconsin Transverse Mercator",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-90],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",-4500000],AUTHORITY["EPSG","3069"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-90 +k=0.9996 +x_0=500000 +y_0=-4500000 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 3070 : NAD83 / Wisconsin Transverse Mercator --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3070,'EPSG',3070,'PROJCS["NAD83 / Wisconsin Transverse Mercator",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-90],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",520000],PARAMETER["false_northing",-4480000],AUTHORITY["EPSG","3070"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-90 +k=0.9996 +x_0=520000 +y_0=-4480000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3070,'EPSG',3070,'PROJCS["NAD83 / Wisconsin Transverse Mercator",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-90],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",520000],PARAMETER["false_northing",-4480000],AUTHORITY["EPSG","3070"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-90 +k=0.9996 +x_0=520000 +y_0=-4480000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3071 : NAD83(HARN) / Wisconsin Transverse Mercator --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3071,'EPSG',3071,'PROJCS["NAD83(HARN) / Wisconsin Transverse Mercator",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-90],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",520000],PARAMETER["false_northing",-4480000],AUTHORITY["EPSG","3071"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-90 +k=0.9996 +x_0=520000 +y_0=-4480000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3071,'EPSG',3071,'PROJCS["NAD83(HARN) / Wisconsin Transverse Mercator",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-90],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",520000],PARAMETER["false_northing",-4480000],AUTHORITY["EPSG","3071"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-90 +k=0.9996 +x_0=520000 +y_0=-4480000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3072 : NAD83 / Maine CS2000 East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3072,'EPSG',3072,'PROJCS["NAD83 / Maine CS2000 East",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",43.83333333333334],PARAMETER["central_meridian",-67.875],PARAMETER["scale_factor",0.99998],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3072"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=43.83333333333334 +lon_0=-67.875 +k=0.99998 +x_0=700000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3072,'EPSG',3072,'PROJCS["NAD83 / Maine CS2000 East",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",43.83333333333334],PARAMETER["central_meridian",-67.875],PARAMETER["scale_factor",0.99998],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3072"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=43.83333333333334 +lon_0=-67.875 +k=0.99998 +x_0=700000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3073 : NAD83 / Maine CS2000 Central (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3073,'EPSG',3073,'PROJCS["NAD83 / Maine CS2000 Central (deprecated)",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",43],PARAMETER["central_meridian",-69.125],PARAMETER["scale_factor",0.99998],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3073"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=43 +lon_0=-69.125 +k=0.99998 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3073,'EPSG',3073,'PROJCS["NAD83 / Maine CS2000 Central (deprecated)",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",43],PARAMETER["central_meridian",-69.125],PARAMETER["scale_factor",0.99998],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3073"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=43 +lon_0=-69.125 +k=0.99998 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3074 : NAD83 / Maine CS2000 West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3074,'EPSG',3074,'PROJCS["NAD83 / Maine CS2000 West",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.83333333333334],PARAMETER["central_meridian",-70.375],PARAMETER["scale_factor",0.99998],PARAMETER["false_easting",300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3074"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.375 +k=0.99998 +x_0=300000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3074,'EPSG',3074,'PROJCS["NAD83 / Maine CS2000 West",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.83333333333334],PARAMETER["central_meridian",-70.375],PARAMETER["scale_factor",0.99998],PARAMETER["false_easting",300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3074"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.375 +k=0.99998 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3075 : NAD83(HARN) / Maine CS2000 East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3075,'EPSG',3075,'PROJCS["NAD83(HARN) / Maine CS2000 East",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",43.83333333333334],PARAMETER["central_meridian",-67.875],PARAMETER["scale_factor",0.99998],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3075"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=43.83333333333334 +lon_0=-67.875 +k=0.99998 +x_0=700000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3075,'EPSG',3075,'PROJCS["NAD83(HARN) / Maine CS2000 East",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",43.83333333333334],PARAMETER["central_meridian",-67.875],PARAMETER["scale_factor",0.99998],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3075"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=43.83333333333334 +lon_0=-67.875 +k=0.99998 +x_0=700000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3076 : NAD83(HARN) / Maine CS2000 Central (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3076,'EPSG',3076,'PROJCS["NAD83(HARN) / Maine CS2000 Central (deprecated)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",43],PARAMETER["central_meridian",-69.125],PARAMETER["scale_factor",0.99998],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3076"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=43 +lon_0=-69.125 +k=0.99998 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3076,'EPSG',3076,'PROJCS["NAD83(HARN) / Maine CS2000 Central (deprecated)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",43],PARAMETER["central_meridian",-69.125],PARAMETER["scale_factor",0.99998],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3076"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=43 +lon_0=-69.125 +k=0.99998 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3077 : NAD83(HARN) / Maine CS2000 West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3077,'EPSG',3077,'PROJCS["NAD83(HARN) / Maine CS2000 West",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.83333333333334],PARAMETER["central_meridian",-70.375],PARAMETER["scale_factor",0.99998],PARAMETER["false_easting",300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3077"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.375 +k=0.99998 +x_0=300000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3077,'EPSG',3077,'PROJCS["NAD83(HARN) / Maine CS2000 West",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.83333333333334],PARAMETER["central_meridian",-70.375],PARAMETER["scale_factor",0.99998],PARAMETER["false_easting",300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3077"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.375 +k=0.99998 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3078 : NAD83 / Michigan Oblique Mercator --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3078,'EPSG',3078,'PROJCS["NAD83 / Michigan Oblique Mercator",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",45.30916666666666],PARAMETER["longitude_of_center",-86],PARAMETER["azimuth",337.25556],PARAMETER["rectified_grid_angle",337.25556],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",2546731.496],PARAMETER["false_northing",-4354009.816],AUTHORITY["EPSG","3078"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=omerc +lat_0=45.30916666666666 +lonc=-86 +alpha=337.25556 +k=0.9996 +x_0=2546731.496 +y_0=-4354009.816 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3078,'EPSG',3078,'PROJCS["NAD83 / Michigan Oblique Mercator",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",45.30916666666666],PARAMETER["longitude_of_center",-86],PARAMETER["azimuth",337.25556],PARAMETER["rectified_grid_angle",337.25556],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",2546731.496],PARAMETER["false_northing",-4354009.816],AUTHORITY["EPSG","3078"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=omerc +lat_0=45.30916666666666 +lonc=-86 +alpha=337.25556 +k=0.9996 +x_0=2546731.496 +y_0=-4354009.816 +gamma=337.25556 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3079 : NAD83(HARN) / Michigan Oblique Mercator --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3079,'EPSG',3079,'PROJCS["NAD83(HARN) / Michigan Oblique Mercator",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",45.30916666666666],PARAMETER["longitude_of_center",-86],PARAMETER["azimuth",337.25556],PARAMETER["rectified_grid_angle",337.25556],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",2546731.496],PARAMETER["false_northing",-4354009.816],AUTHORITY["EPSG","3079"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=omerc +lat_0=45.30916666666666 +lonc=-86 +alpha=337.25556 +k=0.9996 +x_0=2546731.496 +y_0=-4354009.816 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3079,'EPSG',3079,'PROJCS["NAD83(HARN) / Michigan Oblique Mercator",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",45.30916666666666],PARAMETER["longitude_of_center",-86],PARAMETER["azimuth",337.25556],PARAMETER["rectified_grid_angle",337.25556],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",2546731.496],PARAMETER["false_northing",-4354009.816],AUTHORITY["EPSG","3079"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=omerc +lat_0=45.30916666666666 +lonc=-86 +alpha=337.25556 +k=0.9996 +x_0=2546731.496 +y_0=-4354009.816 +gamma=337.25556 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3080 : NAD27 / Shackleford --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3080,'EPSG',3080,'PROJCS["NAD27 / Shackleford",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",27.41666666666667],PARAMETER["standard_parallel_2",34.91666666666666],PARAMETER["latitude_of_origin",31.16666666666667],PARAMETER["central_meridian",-100],PARAMETER["false_easting",3000000],PARAMETER["false_northing",3000000],AUTHORITY["EPSG","3080"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=27.41666666666667 +lat_2=34.91666666666666 +lat_0=31.16666666666667 +lon_0=-100 +x_0=914400 +y_0=914400 +ellps=clrk66 +datum=NAD27 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3080,'EPSG',3080,'PROJCS["NAD27 / Shackleford",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",27.41666666666667],PARAMETER["standard_parallel_2",34.91666666666666],PARAMETER["latitude_of_origin",31.16666666666667],PARAMETER["central_meridian",-100],PARAMETER["false_easting",3000000],PARAMETER["false_northing",3000000],AUTHORITY["EPSG","3080"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=27.41666666666667 +lat_2=34.91666666666666 +lat_0=31.16666666666667 +lon_0=-100 +x_0=914400 +y_0=914400 +datum=NAD27 +units=ft +no_defs '); --- --- EPSG 3081 : NAD83 / Texas State Mapping System --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3081,'EPSG',3081,'PROJCS["NAD83 / Texas State Mapping System",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",27.41666666666667],PARAMETER["standard_parallel_2",34.91666666666666],PARAMETER["latitude_of_origin",31.16666666666667],PARAMETER["central_meridian",-100],PARAMETER["false_easting",1000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","3081"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=27.41666666666667 +lat_2=34.91666666666666 +lat_0=31.16666666666667 +lon_0=-100 +x_0=1000000 +y_0=1000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3081,'EPSG',3081,'PROJCS["NAD83 / Texas State Mapping System",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",27.41666666666667],PARAMETER["standard_parallel_2",34.91666666666666],PARAMETER["latitude_of_origin",31.16666666666667],PARAMETER["central_meridian",-100],PARAMETER["false_easting",1000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","3081"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=27.41666666666667 +lat_2=34.91666666666666 +lat_0=31.16666666666667 +lon_0=-100 +x_0=1000000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3082 : NAD83 / Texas Centric Lambert Conformal --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3082,'EPSG',3082,'PROJCS["NAD83 / Texas Centric Lambert Conformal",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",27.5],PARAMETER["standard_parallel_2",35],PARAMETER["latitude_of_origin",18],PARAMETER["central_meridian",-100],PARAMETER["false_easting",1500000],PARAMETER["false_northing",5000000],AUTHORITY["EPSG","3082"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=27.5 +lat_2=35 +lat_0=18 +lon_0=-100 +x_0=1500000 +y_0=5000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3082,'EPSG',3082,'PROJCS["NAD83 / Texas Centric Lambert Conformal",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",27.5],PARAMETER["standard_parallel_2",35],PARAMETER["latitude_of_origin",18],PARAMETER["central_meridian",-100],PARAMETER["false_easting",1500000],PARAMETER["false_northing",5000000],AUTHORITY["EPSG","3082"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=27.5 +lat_2=35 +lat_0=18 +lon_0=-100 +x_0=1500000 +y_0=5000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3083 : NAD83 / Texas Centric Albers Equal Area --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3083,'EPSG',3083,'PROJCS["NAD83 / Texas Centric Albers Equal Area",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",27.5],PARAMETER["standard_parallel_2",35],PARAMETER["latitude_of_center",18],PARAMETER["longitude_of_center",-100],PARAMETER["false_easting",1500000],PARAMETER["false_northing",6000000],AUTHORITY["EPSG","3083"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=aea +lat_1=27.5 +lat_2=35 +lat_0=18 +lon_0=-100 +x_0=1500000 +y_0=6000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3083,'EPSG',3083,'PROJCS["NAD83 / Texas Centric Albers Equal Area",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",27.5],PARAMETER["standard_parallel_2",35],PARAMETER["latitude_of_center",18],PARAMETER["longitude_of_center",-100],PARAMETER["false_easting",1500000],PARAMETER["false_northing",6000000],AUTHORITY["EPSG","3083"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=aea +lat_1=27.5 +lat_2=35 +lat_0=18 +lon_0=-100 +x_0=1500000 +y_0=6000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3084 : NAD83(HARN) / Texas Centric Lambert Conformal --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3084,'EPSG',3084,'PROJCS["NAD83(HARN) / Texas Centric Lambert Conformal",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",27.5],PARAMETER["standard_parallel_2",35],PARAMETER["latitude_of_origin",18],PARAMETER["central_meridian",-100],PARAMETER["false_easting",1500000],PARAMETER["false_northing",5000000],AUTHORITY["EPSG","3084"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=27.5 +lat_2=35 +lat_0=18 +lon_0=-100 +x_0=1500000 +y_0=5000000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3084,'EPSG',3084,'PROJCS["NAD83(HARN) / Texas Centric Lambert Conformal",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",27.5],PARAMETER["standard_parallel_2",35],PARAMETER["latitude_of_origin",18],PARAMETER["central_meridian",-100],PARAMETER["false_easting",1500000],PARAMETER["false_northing",5000000],AUTHORITY["EPSG","3084"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=27.5 +lat_2=35 +lat_0=18 +lon_0=-100 +x_0=1500000 +y_0=5000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3085 : NAD83(HARN) / Texas Centric Albers Equal Area --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3085,'EPSG',3085,'PROJCS["NAD83(HARN) / Texas Centric Albers Equal Area",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",27.5],PARAMETER["standard_parallel_2",35],PARAMETER["latitude_of_center",18],PARAMETER["longitude_of_center",-100],PARAMETER["false_easting",1500000],PARAMETER["false_northing",6000000],AUTHORITY["EPSG","3085"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=aea +lat_1=27.5 +lat_2=35 +lat_0=18 +lon_0=-100 +x_0=1500000 +y_0=6000000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3085,'EPSG',3085,'PROJCS["NAD83(HARN) / Texas Centric Albers Equal Area",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",27.5],PARAMETER["standard_parallel_2",35],PARAMETER["latitude_of_center",18],PARAMETER["longitude_of_center",-100],PARAMETER["false_easting",1500000],PARAMETER["false_northing",6000000],AUTHORITY["EPSG","3085"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=aea +lat_1=27.5 +lat_2=35 +lat_0=18 +lon_0=-100 +x_0=1500000 +y_0=6000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3086 : NAD83 / Florida GDL Albers --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3086,'EPSG',3086,'PROJCS["NAD83 / Florida GDL Albers",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",24],PARAMETER["standard_parallel_2",31.5],PARAMETER["latitude_of_center",24],PARAMETER["longitude_of_center",-84],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3086"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=aea +lat_1=24 +lat_2=31.5 +lat_0=24 +lon_0=-84 +x_0=400000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3086,'EPSG',3086,'PROJCS["NAD83 / Florida GDL Albers",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",24],PARAMETER["standard_parallel_2",31.5],PARAMETER["latitude_of_center",24],PARAMETER["longitude_of_center",-84],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3086"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=aea +lat_1=24 +lat_2=31.5 +lat_0=24 +lon_0=-84 +x_0=400000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3087 : NAD83(HARN) / Florida GDL Albers --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3087,'EPSG',3087,'PROJCS["NAD83(HARN) / Florida GDL Albers",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",24],PARAMETER["standard_parallel_2",31.5],PARAMETER["latitude_of_center",24],PARAMETER["longitude_of_center",-84],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3087"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=aea +lat_1=24 +lat_2=31.5 +lat_0=24 +lon_0=-84 +x_0=400000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3087,'EPSG',3087,'PROJCS["NAD83(HARN) / Florida GDL Albers",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",24],PARAMETER["standard_parallel_2",31.5],PARAMETER["latitude_of_center",24],PARAMETER["longitude_of_center",-84],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3087"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=aea +lat_1=24 +lat_2=31.5 +lat_0=24 +lon_0=-84 +x_0=400000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3088 : NAD83 / Kentucky Single Zone --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3088,'EPSG',3088,'PROJCS["NAD83 / Kentucky Single Zone",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.08333333333334],PARAMETER["standard_parallel_2",38.66666666666666],PARAMETER["latitude_of_origin",36.33333333333334],PARAMETER["central_meridian",-85.75],PARAMETER["false_easting",1500000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","3088"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.08333333333334 +lat_2=38.66666666666666 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=1500000 +y_0=1000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3088,'EPSG',3088,'PROJCS["NAD83 / Kentucky Single Zone",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.08333333333334],PARAMETER["standard_parallel_2",38.66666666666666],PARAMETER["latitude_of_origin",36.33333333333334],PARAMETER["central_meridian",-85.75],PARAMETER["false_easting",1500000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","3088"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.08333333333334 +lat_2=38.66666666666666 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=1500000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3089 : NAD83 / Kentucky Single Zone (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3089,'EPSG',3089,'PROJCS["NAD83 / Kentucky Single Zone (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.08333333333334],PARAMETER["standard_parallel_2",38.66666666666666],PARAMETER["latitude_of_origin",36.33333333333334],PARAMETER["central_meridian",-85.75],PARAMETER["false_easting",4921250],PARAMETER["false_northing",3280833.333],AUTHORITY["EPSG","3089"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.08333333333334 +lat_2=38.66666666666666 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=1500000 +y_0=999999.9998983998 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3089,'EPSG',3089,'PROJCS["NAD83 / Kentucky Single Zone (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.08333333333334],PARAMETER["standard_parallel_2",38.66666666666666],PARAMETER["latitude_of_origin",36.33333333333334],PARAMETER["central_meridian",-85.75],PARAMETER["false_easting",4921250],PARAMETER["false_northing",3280833.333],AUTHORITY["EPSG","3089"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.08333333333334 +lat_2=38.66666666666666 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=1500000 +y_0=999999.9998983998 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3090 : NAD83(HARN) / Kentucky Single Zone --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3090,'EPSG',3090,'PROJCS["NAD83(HARN) / Kentucky Single Zone",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.08333333333334],PARAMETER["standard_parallel_2",38.66666666666666],PARAMETER["latitude_of_origin",36.33333333333334],PARAMETER["central_meridian",-85.75],PARAMETER["false_easting",1500000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","3090"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.08333333333334 +lat_2=38.66666666666666 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=1500000 +y_0=1000000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3090,'EPSG',3090,'PROJCS["NAD83(HARN) / Kentucky Single Zone",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.08333333333334],PARAMETER["standard_parallel_2",38.66666666666666],PARAMETER["latitude_of_origin",36.33333333333334],PARAMETER["central_meridian",-85.75],PARAMETER["false_easting",1500000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","3090"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.08333333333334 +lat_2=38.66666666666666 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=1500000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3091 : NAD83(HARN) / Kentucky Single Zone (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3091,'EPSG',3091,'PROJCS["NAD83(HARN) / Kentucky Single Zone (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.08333333333334],PARAMETER["standard_parallel_2",38.66666666666666],PARAMETER["latitude_of_origin",36.33333333333334],PARAMETER["central_meridian",-85.75],PARAMETER["false_easting",4921250],PARAMETER["false_northing",3280833.333],AUTHORITY["EPSG","3091"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.08333333333334 +lat_2=38.66666666666666 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=1500000 +y_0=999999.9998983998 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3091,'EPSG',3091,'PROJCS["NAD83(HARN) / Kentucky Single Zone (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.08333333333334],PARAMETER["standard_parallel_2",38.66666666666666],PARAMETER["latitude_of_origin",36.33333333333334],PARAMETER["central_meridian",-85.75],PARAMETER["false_easting",4921250],PARAMETER["false_northing",3280833.333],AUTHORITY["EPSG","3091"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.08333333333334 +lat_2=38.66666666666666 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=1500000 +y_0=999999.9998983998 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3092 : Tokyo / UTM zone 51N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3092,'EPSG',3092,'PROJCS["Tokyo / UTM zone 51N",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3092"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=51 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3092,'EPSG',3092,'PROJCS["Tokyo / UTM zone 51N",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-148,507,685,0,0,0,0],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3092"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=51 +ellps=bessel +towgs84=-148,507,685,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3093 : Tokyo / UTM zone 52N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3093,'EPSG',3093,'PROJCS["Tokyo / UTM zone 52N",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3093"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=52 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3093,'EPSG',3093,'PROJCS["Tokyo / UTM zone 52N",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-148,507,685,0,0,0,0],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3093"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=52 +ellps=bessel +towgs84=-148,507,685,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3094 : Tokyo / UTM zone 53N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3094,'EPSG',3094,'PROJCS["Tokyo / UTM zone 53N",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3094"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=53 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3094,'EPSG',3094,'PROJCS["Tokyo / UTM zone 53N",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-148,507,685,0,0,0,0],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3094"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=53 +ellps=bessel +towgs84=-148,507,685,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3095 : Tokyo / UTM zone 54N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3095,'EPSG',3095,'PROJCS["Tokyo / UTM zone 54N",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3095"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=54 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3095,'EPSG',3095,'PROJCS["Tokyo / UTM zone 54N",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-148,507,685,0,0,0,0],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3095"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=54 +ellps=bessel +towgs84=-148,507,685,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3096 : Tokyo / UTM zone 55N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3096,'EPSG',3096,'PROJCS["Tokyo / UTM zone 55N",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3096"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=55 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3096,'EPSG',3096,'PROJCS["Tokyo / UTM zone 55N",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-148,507,685,0,0,0,0],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3096"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=55 +ellps=bessel +towgs84=-148,507,685,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3097 : JGD2000 / UTM zone 51N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3097,'EPSG',3097,'PROJCS["JGD2000 / UTM zone 51N",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3097"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=51 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3097,'EPSG',3097,'PROJCS["JGD2000 / UTM zone 51N",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3097"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=51 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3098 : JGD2000 / UTM zone 52N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3098,'EPSG',3098,'PROJCS["JGD2000 / UTM zone 52N",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3098"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=52 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3098,'EPSG',3098,'PROJCS["JGD2000 / UTM zone 52N",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3098"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=52 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3099 : JGD2000 / UTM zone 53N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3099,'EPSG',3099,'PROJCS["JGD2000 / UTM zone 53N",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3099"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=53 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3099,'EPSG',3099,'PROJCS["JGD2000 / UTM zone 53N",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3099"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=53 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3100 : JGD2000 / UTM zone 54N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3100,'EPSG',3100,'PROJCS["JGD2000 / UTM zone 54N",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3100"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=54 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3100,'EPSG',3100,'PROJCS["JGD2000 / UTM zone 54N",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3100"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=54 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3101 : JGD2000 / UTM zone 55N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3101,'EPSG',3101,'PROJCS["JGD2000 / UTM zone 55N",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3101"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=55 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3101,'EPSG',3101,'PROJCS["JGD2000 / UTM zone 55N",GEOGCS["JGD2000",DATUM["Japanese_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6612"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4612"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3101"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=55 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3102 : American Samoa 1962 / American Samoa Lambert --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3102,'EPSG',3102,'PROJCS["American Samoa 1962 / American Samoa Lambert",GEOGCS["American Samoa 1962",DATUM["American_Samoa_1962",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-115,118,426,0,0,0,0],AUTHORITY["EPSG","6169"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4169"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",-14.26666666666667],PARAMETER["central_meridian",-170],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",312234.65],AUTHORITY["EPSG","3102"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=-14.26666666666667 +lat_0=-14.26666666666667 +lon_0=-170 +k_0=1 +x_0=152400.3048006096 +y_0=95169.31165862332 +ellps=clrk66 +towgs84=-115,118,426,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3102,'EPSG',3102,'PROJCS["American Samoa 1962 / American Samoa Lambert",GEOGCS["American Samoa 1962",DATUM["American_Samoa_1962",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-115,118,426,0,0,0,0],AUTHORITY["EPSG","6169"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4169"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",-14.26666666666667],PARAMETER["central_meridian",-170],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",312234.65],AUTHORITY["EPSG","3102"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=-14.26666666666667 +lat_0=-14.26666666666667 +lon_0=-170 +k_0=1 +x_0=152400.3048006096 +y_0=95169.31165862332 +ellps=clrk66 +towgs84=-115,118,426,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3103 : Mauritania 1999 / UTM zone 28N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3103,'EPSG',3103,'PROJCS["Mauritania 1999 / UTM zone 28N (deprecated)",GEOGCS["Mauritania 1999",DATUM["Mauritania_1999",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6681"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4681"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3103"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3103,'EPSG',3103,'PROJCS["Mauritania 1999 / UTM zone 28N (deprecated)",GEOGCS["Mauritania 1999",DATUM["Mauritania_1999",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6681"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4681"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3103"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +ellps=clrk80 +units=m +no_defs '); --- --- EPSG 3104 : Mauritania 1999 / UTM zone 29N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3104,'EPSG',3104,'PROJCS["Mauritania 1999 / UTM zone 29N (deprecated)",GEOGCS["Mauritania 1999",DATUM["Mauritania_1999",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6681"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4681"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3104"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3104,'EPSG',3104,'PROJCS["Mauritania 1999 / UTM zone 29N (deprecated)",GEOGCS["Mauritania 1999",DATUM["Mauritania_1999",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6681"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4681"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3104"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +ellps=clrk80 +units=m +no_defs '); --- --- EPSG 3105 : Mauritania 1999 / UTM zone 30N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3105,'EPSG',3105,'PROJCS["Mauritania 1999 / UTM zone 30N (deprecated)",GEOGCS["Mauritania 1999",DATUM["Mauritania_1999",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6681"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4681"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3105"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=30 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3105,'EPSG',3105,'PROJCS["Mauritania 1999 / UTM zone 30N (deprecated)",GEOGCS["Mauritania 1999",DATUM["Mauritania_1999",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6681"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4681"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3105"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=30 +ellps=clrk80 +units=m +no_defs '); --- --- EPSG 3106 : Gulshan 303 / Bangladesh Transverse Mercator --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3106,'EPSG',3106,'PROJCS["Gulshan 303 / Bangladesh Transverse Mercator",GEOGCS["Gulshan 303",DATUM["Gulshan_303",SPHEROID["Everest 1830 (1937 Adjustment)",6377276.345,300.8017,AUTHORITY["EPSG","7015"]],AUTHORITY["EPSG","6682"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4682"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",90],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3106"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=90 +k=0.9996 +x_0=500000 +y_0=0 +a=6377276.345 +b=6356075.41314024 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3106,'EPSG',3106,'PROJCS["Gulshan 303 / Bangladesh Transverse Mercator",GEOGCS["Gulshan 303",DATUM["Gulshan_303",SPHEROID["Everest 1830 (1937 Adjustment)",6377276.345,300.8017,AUTHORITY["EPSG","7015"]],TOWGS84[283.7,735.9,261.1,0,0,0,0],AUTHORITY["EPSG","6682"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4682"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",90],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3106"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=90 +k=0.9996 +x_0=500000 +y_0=0 +a=6377276.345 +b=6356075.41314024 +towgs84=283.7,735.9,261.1,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3107 : GDA94 / SA Lambert --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3107,'EPSG',3107,'PROJCS["GDA94 / SA Lambert",GEOGCS["GDA94",DATUM["Geocentric_Datum_of_Australia_1994",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6283"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4283"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-28],PARAMETER["standard_parallel_2",-36],PARAMETER["latitude_of_origin",-32],PARAMETER["central_meridian",135],PARAMETER["false_easting",1000000],PARAMETER["false_northing",2000000],AUTHORITY["EPSG","3107"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-28 +lat_2=-36 +lat_0=-32 +lon_0=135 +x_0=1000000 +y_0=2000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3107,'EPSG',3107,'PROJCS["GDA94 / SA Lambert",GEOGCS["GDA94",DATUM["Geocentric_Datum_of_Australia_1994",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6283"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4283"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-28],PARAMETER["standard_parallel_2",-36],PARAMETER["latitude_of_origin",-32],PARAMETER["central_meridian",135],PARAMETER["false_easting",1000000],PARAMETER["false_northing",2000000],AUTHORITY["EPSG","3107"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-28 +lat_2=-36 +lat_0=-32 +lon_0=135 +x_0=1000000 +y_0=2000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3108 : ETRS89 / Guernsey Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3108,'EPSG',3108,'PROJCS["ETRS89 / Guernsey Grid",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",49.5],PARAMETER["central_meridian",-2.416666666666667],PARAMETER["scale_factor",0.999997],PARAMETER["false_easting",47000],PARAMETER["false_northing",50000],AUTHORITY["EPSG","3108"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=49.5 +lon_0=-2.416666666666667 +k=0.999997 +x_0=47000 +y_0=50000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3108,'EPSG',3108,'PROJCS["ETRS89 / Guernsey Grid",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",49.5],PARAMETER["central_meridian",-2.416666666666667],PARAMETER["scale_factor",0.999997],PARAMETER["false_easting",47000],PARAMETER["false_northing",50000],AUTHORITY["EPSG","3108"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=49.5 +lon_0=-2.416666666666667 +k=0.999997 +x_0=47000 +y_0=50000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3109 : ETRS89 / Jersey Transverse Mercator --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3109,'EPSG',3109,'PROJCS["ETRS89 / Jersey Transverse Mercator",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",49.225],PARAMETER["central_meridian",-2.135],PARAMETER["scale_factor",0.9999999],PARAMETER["false_easting",40000],PARAMETER["false_northing",70000],AUTHORITY["EPSG","3109"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=49.225 +lon_0=-2.135 +k=0.9999999000000001 +x_0=40000 +y_0=70000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3109,'EPSG',3109,'PROJCS["ETRS89 / Jersey Transverse Mercator",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",49.225],PARAMETER["central_meridian",-2.135],PARAMETER["scale_factor",0.9999999],PARAMETER["false_easting",40000],PARAMETER["false_northing",70000],AUTHORITY["EPSG","3109"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=49.225 +lon_0=-2.135 +k=0.9999999000000001 +x_0=40000 +y_0=70000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3110 : AGD66 / Vicgrid66 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3110,'EPSG',3110,'PROJCS["AGD66 / Vicgrid66",GEOGCS["AGD66",DATUM["Australian_Geodetic_Datum_1966",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],AUTHORITY["EPSG","6202"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4202"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-36],PARAMETER["standard_parallel_2",-38],PARAMETER["latitude_of_origin",-37],PARAMETER["central_meridian",145],PARAMETER["false_easting",2500000],PARAMETER["false_northing",4500000],AUTHORITY["EPSG","3110"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-36 +lat_2=-38 +lat_0=-37 +lon_0=145 +x_0=2500000 +y_0=4500000 +ellps=aust_SA +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3110,'EPSG',3110,'PROJCS["AGD66 / Vicgrid66",GEOGCS["AGD66",DATUM["Australian_Geodetic_Datum_1966",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],TOWGS84[-117.808,-51.536,137.784,0.303,0.446,0.234,-0.29],AUTHORITY["EPSG","6202"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4202"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-36],PARAMETER["standard_parallel_2",-38],PARAMETER["latitude_of_origin",-37],PARAMETER["central_meridian",145],PARAMETER["false_easting",2500000],PARAMETER["false_northing",4500000],AUTHORITY["EPSG","3110"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-36 +lat_2=-38 +lat_0=-37 +lon_0=145 +x_0=2500000 +y_0=4500000 +ellps=aust_SA +towgs84=-117.808,-51.536,137.784,0.303,0.446,0.234,-0.29 +units=m +no_defs '); --- --- EPSG 3111 : GDA94 / Vicgrid94 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3111,'EPSG',3111,'PROJCS["GDA94 / Vicgrid94",GEOGCS["GDA94",DATUM["Geocentric_Datum_of_Australia_1994",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6283"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4283"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-36],PARAMETER["standard_parallel_2",-38],PARAMETER["latitude_of_origin",-37],PARAMETER["central_meridian",145],PARAMETER["false_easting",2500000],PARAMETER["false_northing",2500000],AUTHORITY["EPSG","3111"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-36 +lat_2=-38 +lat_0=-37 +lon_0=145 +x_0=2500000 +y_0=2500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3111,'EPSG',3111,'PROJCS["GDA94 / Vicgrid94",GEOGCS["GDA94",DATUM["Geocentric_Datum_of_Australia_1994",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6283"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4283"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-36],PARAMETER["standard_parallel_2",-38],PARAMETER["latitude_of_origin",-37],PARAMETER["central_meridian",145],PARAMETER["false_easting",2500000],PARAMETER["false_northing",2500000],AUTHORITY["EPSG","3111"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-36 +lat_2=-38 +lat_0=-37 +lon_0=145 +x_0=2500000 +y_0=2500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3112 : GDA94 / Geoscience Australia Lambert --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3112,'EPSG',3112,'PROJCS["GDA94 / Geoscience Australia Lambert",GEOGCS["GDA94",DATUM["Geocentric_Datum_of_Australia_1994",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6283"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4283"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-18],PARAMETER["standard_parallel_2",-36],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",134],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3112"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-18 +lat_2=-36 +lat_0=0 +lon_0=134 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3112,'EPSG',3112,'PROJCS["GDA94 / Geoscience Australia Lambert",GEOGCS["GDA94",DATUM["Geocentric_Datum_of_Australia_1994",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6283"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4283"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-18],PARAMETER["standard_parallel_2",-36],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",134],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3112"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-18 +lat_2=-36 +lat_0=0 +lon_0=134 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3113 : GDA94 / BCSG02 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3113,'EPSG',3113,'PROJCS["GDA94 / BCSG02",GEOGCS["GDA94",DATUM["Geocentric_Datum_of_Australia_1994",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6283"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4283"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-28],PARAMETER["central_meridian",153],PARAMETER["scale_factor",0.99999],PARAMETER["false_easting",50000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","3113"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-28 +lon_0=153 +k=0.99999 +x_0=50000 +y_0=100000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3113,'EPSG',3113,'PROJCS["GDA94 / BCSG02",GEOGCS["GDA94",DATUM["Geocentric_Datum_of_Australia_1994",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6283"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4283"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-28],PARAMETER["central_meridian",153],PARAMETER["scale_factor",0.99999],PARAMETER["false_easting",50000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","3113"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-28 +lon_0=153 +k=0.99999 +x_0=50000 +y_0=100000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3114 : MAGNA-SIRGAS / Colombia Far West zone --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3114,'EPSG',3114,'PROJCS["MAGNA-SIRGAS / Colombia Far West zone",GEOGCS["MAGNA-SIRGAS",DATUM["Marco_Geocentrico_Nacional_de_Referencia",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6686"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4686"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",4.596200416666666],PARAMETER["central_meridian",-80.07750791666666],PARAMETER["scale_factor",1],PARAMETER["false_easting",1000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","3114"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=4.596200416666666 +lon_0=-80.07750791666666 +k=1 +x_0=1000000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3114,'EPSG',3114,'PROJCS["MAGNA-SIRGAS / Colombia Far West zone",GEOGCS["MAGNA-SIRGAS",DATUM["Marco_Geocentrico_Nacional_de_Referencia",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6686"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4686"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",4.596200416666666],PARAMETER["central_meridian",-80.07750791666666],PARAMETER["scale_factor",1],PARAMETER["false_easting",1000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","3114"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=4.596200416666666 +lon_0=-80.07750791666666 +k=1 +x_0=1000000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3115 : MAGNA-SIRGAS / Colombia West zone --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3115,'EPSG',3115,'PROJCS["MAGNA-SIRGAS / Colombia West zone",GEOGCS["MAGNA-SIRGAS",DATUM["Marco_Geocentrico_Nacional_de_Referencia",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6686"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4686"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",4.596200416666666],PARAMETER["central_meridian",-77.07750791666666],PARAMETER["scale_factor",1],PARAMETER["false_easting",1000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","3115"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=4.596200416666666 +lon_0=-77.07750791666666 +k=1 +x_0=1000000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3115,'EPSG',3115,'PROJCS["MAGNA-SIRGAS / Colombia West zone",GEOGCS["MAGNA-SIRGAS",DATUM["Marco_Geocentrico_Nacional_de_Referencia",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6686"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4686"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",4.596200416666666],PARAMETER["central_meridian",-77.07750791666666],PARAMETER["scale_factor",1],PARAMETER["false_easting",1000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","3115"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=4.596200416666666 +lon_0=-77.07750791666666 +k=1 +x_0=1000000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3116 : MAGNA-SIRGAS / Colombia Bogota zone --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3116,'EPSG',3116,'PROJCS["MAGNA-SIRGAS / Colombia Bogota zone",GEOGCS["MAGNA-SIRGAS",DATUM["Marco_Geocentrico_Nacional_de_Referencia",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6686"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4686"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",4.596200416666666],PARAMETER["central_meridian",-74.07750791666666],PARAMETER["scale_factor",1],PARAMETER["false_easting",1000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","3116"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=4.596200416666666 +lon_0=-74.07750791666666 +k=1 +x_0=1000000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3116,'EPSG',3116,'PROJCS["MAGNA-SIRGAS / Colombia Bogota zone",GEOGCS["MAGNA-SIRGAS",DATUM["Marco_Geocentrico_Nacional_de_Referencia",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6686"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4686"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",4.596200416666666],PARAMETER["central_meridian",-74.07750791666666],PARAMETER["scale_factor",1],PARAMETER["false_easting",1000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","3116"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=4.596200416666666 +lon_0=-74.07750791666666 +k=1 +x_0=1000000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3117 : MAGNA-SIRGAS / Colombia East Central zone --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3117,'EPSG',3117,'PROJCS["MAGNA-SIRGAS / Colombia East Central zone",GEOGCS["MAGNA-SIRGAS",DATUM["Marco_Geocentrico_Nacional_de_Referencia",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6686"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4686"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",4.596200416666666],PARAMETER["central_meridian",-71.07750791666666],PARAMETER["scale_factor",1],PARAMETER["false_easting",1000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","3117"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=4.596200416666666 +lon_0=-71.07750791666666 +k=1 +x_0=1000000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3117,'EPSG',3117,'PROJCS["MAGNA-SIRGAS / Colombia East Central zone",GEOGCS["MAGNA-SIRGAS",DATUM["Marco_Geocentrico_Nacional_de_Referencia",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6686"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4686"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",4.596200416666666],PARAMETER["central_meridian",-71.07750791666666],PARAMETER["scale_factor",1],PARAMETER["false_easting",1000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","3117"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=4.596200416666666 +lon_0=-71.07750791666666 +k=1 +x_0=1000000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3118 : MAGNA-SIRGAS / Colombia East zone --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3118,'EPSG',3118,'PROJCS["MAGNA-SIRGAS / Colombia East zone",GEOGCS["MAGNA-SIRGAS",DATUM["Marco_Geocentrico_Nacional_de_Referencia",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6686"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4686"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",4.596200416666666],PARAMETER["central_meridian",-68.07750791666666],PARAMETER["scale_factor",1],PARAMETER["false_easting",1000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","3118"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=4.596200416666666 +lon_0=-68.07750791666666 +k=1 +x_0=1000000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3118,'EPSG',3118,'PROJCS["MAGNA-SIRGAS / Colombia East zone",GEOGCS["MAGNA-SIRGAS",DATUM["Marco_Geocentrico_Nacional_de_Referencia",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6686"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4686"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",4.596200416666666],PARAMETER["central_meridian",-68.07750791666666],PARAMETER["scale_factor",1],PARAMETER["false_easting",1000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","3118"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=4.596200416666666 +lon_0=-68.07750791666666 +k=1 +x_0=1000000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3119 : Douala 1948 / AEF west --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3119,'EPSG',3119,'PROJCS["Douala 1948 / AEF west",GEOGCS["Douala 1948",DATUM["Douala_1948",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-206.1,-174.7,-87.7,0,0,0,0],AUTHORITY["EPSG","6192"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4192"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",10.5],PARAMETER["scale_factor",0.999],PARAMETER["false_easting",1000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","3119"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=10.5 +k=0.999 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs84=-206.1,-174.7,-87.7,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3119,'EPSG',3119,'PROJCS["Douala 1948 / AEF west",GEOGCS["Douala 1948",DATUM["Douala_1948",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-206.1,-174.7,-87.7,0,0,0,0],AUTHORITY["EPSG","6192"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4192"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",10.5],PARAMETER["scale_factor",0.999],PARAMETER["false_easting",1000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","3119"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=10.5 +k=0.999 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs84=-206.1,-174.7,-87.7,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3120 : Pulkovo 1942(58) / Poland zone I --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3120,'EPSG',3120,'PROJCS["Pulkovo 1942(58) / Poland zone I",GEOGCS["Pulkovo 1942(58)",DATUM["Pulkovo_1942_58",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6179"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4179"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",50.625],PARAMETER["central_meridian",21.08333333333333],PARAMETER["scale_factor",0.9998],PARAMETER["false_easting",4637000],PARAMETER["false_northing",5467000],AUTHORITY["EPSG","3120"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=sterea +lat_0=50.625 +lon_0=21.08333333333333 +k=0.9998 +x_0=4637000 +y_0=5467000 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3120,'EPSG',3120,'PROJCS["Pulkovo 1942(58) / Poland zone I",GEOGCS["Pulkovo 1942(58)",DATUM["Pulkovo_1942_58",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84],AUTHORITY["EPSG","6179"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4179"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",50.625],PARAMETER["central_meridian",21.08333333333333],PARAMETER["scale_factor",0.9998],PARAMETER["false_easting",4637000],PARAMETER["false_northing",5467000],AUTHORITY["EPSG","3120"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=sterea +lat_0=50.625 +lon_0=21.08333333333333 +k=0.9998 +x_0=4637000 +y_0=5467000 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs '); --- --- EPSG 3121 : PRS92 / Philippines zone 1 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3121,'EPSG',3121,'PROJCS["PRS92 / Philippines zone 1",GEOGCS["PRS92",DATUM["Philippine_Reference_System_1992",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06],AUTHORITY["EPSG","6683"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4683"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3121"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=0.99995 +x_0=500000 +y_0=0 +ellps=clrk66 +towgs84=-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3121,'EPSG',3121,'PROJCS["PRS92 / Philippines zone 1",GEOGCS["PRS92",DATUM["Philippine_Reference_System_1992",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06],AUTHORITY["EPSG","6683"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4683"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3121"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=0.99995 +x_0=500000 +y_0=0 +ellps=clrk66 +towgs84=-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06 +units=m +no_defs '); --- --- EPSG 3122 : PRS92 / Philippines zone 2 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3122,'EPSG',3122,'PROJCS["PRS92 / Philippines zone 2",GEOGCS["PRS92",DATUM["Philippine_Reference_System_1992",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06],AUTHORITY["EPSG","6683"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4683"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",119],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3122"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=119 +k=0.99995 +x_0=500000 +y_0=0 +ellps=clrk66 +towgs84=-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3122,'EPSG',3122,'PROJCS["PRS92 / Philippines zone 2",GEOGCS["PRS92",DATUM["Philippine_Reference_System_1992",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06],AUTHORITY["EPSG","6683"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4683"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",119],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3122"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=119 +k=0.99995 +x_0=500000 +y_0=0 +ellps=clrk66 +towgs84=-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06 +units=m +no_defs '); --- --- EPSG 3123 : PRS92 / Philippines zone 3 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3123,'EPSG',3123,'PROJCS["PRS92 / Philippines zone 3",GEOGCS["PRS92",DATUM["Philippine_Reference_System_1992",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06],AUTHORITY["EPSG","6683"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4683"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",121],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3123"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=121 +k=0.99995 +x_0=500000 +y_0=0 +ellps=clrk66 +towgs84=-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3123,'EPSG',3123,'PROJCS["PRS92 / Philippines zone 3",GEOGCS["PRS92",DATUM["Philippine_Reference_System_1992",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06],AUTHORITY["EPSG","6683"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4683"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",121],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3123"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=121 +k=0.99995 +x_0=500000 +y_0=0 +ellps=clrk66 +towgs84=-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06 +units=m +no_defs '); --- --- EPSG 3124 : PRS92 / Philippines zone 4 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3124,'EPSG',3124,'PROJCS["PRS92 / Philippines zone 4",GEOGCS["PRS92",DATUM["Philippine_Reference_System_1992",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06],AUTHORITY["EPSG","6683"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4683"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3124"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=0.99995 +x_0=500000 +y_0=0 +ellps=clrk66 +towgs84=-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3124,'EPSG',3124,'PROJCS["PRS92 / Philippines zone 4",GEOGCS["PRS92",DATUM["Philippine_Reference_System_1992",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06],AUTHORITY["EPSG","6683"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4683"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3124"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=0.99995 +x_0=500000 +y_0=0 +ellps=clrk66 +towgs84=-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06 +units=m +no_defs '); --- --- EPSG 3125 : PRS92 / Philippines zone 5 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3125,'EPSG',3125,'PROJCS["PRS92 / Philippines zone 5",GEOGCS["PRS92",DATUM["Philippine_Reference_System_1992",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06],AUTHORITY["EPSG","6683"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4683"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",125],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3125"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=125 +k=0.99995 +x_0=500000 +y_0=0 +ellps=clrk66 +towgs84=-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3125,'EPSG',3125,'PROJCS["PRS92 / Philippines zone 5",GEOGCS["PRS92",DATUM["Philippine_Reference_System_1992",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06],AUTHORITY["EPSG","6683"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4683"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",125],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3125"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=125 +k=0.99995 +x_0=500000 +y_0=0 +ellps=clrk66 +towgs84=-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06 +units=m +no_defs '); --- --- EPSG 3126 : ETRS89 / ETRS-GK19FIN --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3126,'EPSG',3126,'PROJCS["ETRS89 / ETRS-GK19FIN",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",19],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3126"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=19 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3126,'EPSG',3126,'PROJCS["ETRS89 / ETRS-GK19FIN",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",19],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3126"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=0 +lon_0=19 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3127 : ETRS89 / ETRS-GK20FIN --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3127,'EPSG',3127,'PROJCS["ETRS89 / ETRS-GK20FIN",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",20],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3127"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=20 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3127,'EPSG',3127,'PROJCS["ETRS89 / ETRS-GK20FIN",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",20],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3127"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=0 +lon_0=20 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3128 : ETRS89 / ETRS-GK21FIN --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3128,'EPSG',3128,'PROJCS["ETRS89 / ETRS-GK21FIN",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3128"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3128,'EPSG',3128,'PROJCS["ETRS89 / ETRS-GK21FIN",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3128"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3129 : ETRS89 / ETRS-GK22FIN --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3129,'EPSG',3129,'PROJCS["ETRS89 / ETRS-GK22FIN",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",22],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3129"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=22 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3129,'EPSG',3129,'PROJCS["ETRS89 / ETRS-GK22FIN",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",22],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3129"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=0 +lon_0=22 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3130 : ETRS89 / ETRS-GK23FIN --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3130,'EPSG',3130,'PROJCS["ETRS89 / ETRS-GK23FIN",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",23],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3130"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=23 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3130,'EPSG',3130,'PROJCS["ETRS89 / ETRS-GK23FIN",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",23],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3130"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=0 +lon_0=23 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3131 : ETRS89 / ETRS-GK24FIN --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3131,'EPSG',3131,'PROJCS["ETRS89 / ETRS-GK24FIN",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",24],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3131"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3131,'EPSG',3131,'PROJCS["ETRS89 / ETRS-GK24FIN",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",24],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3131"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3132 : ETRS89 / ETRS-GK25FIN --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3132,'EPSG',3132,'PROJCS["ETRS89 / ETRS-GK25FIN",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",25],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3132"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=25 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3132,'EPSG',3132,'PROJCS["ETRS89 / ETRS-GK25FIN",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",25],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3132"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=0 +lon_0=25 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3133 : ETRS89 / ETRS-GK26FIN --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3133,'EPSG',3133,'PROJCS["ETRS89 / ETRS-GK26FIN",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",26],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3133"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=26 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3133,'EPSG',3133,'PROJCS["ETRS89 / ETRS-GK26FIN",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",26],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3133"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=0 +lon_0=26 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3134 : ETRS89 / ETRS-GK27FIN --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3134,'EPSG',3134,'PROJCS["ETRS89 / ETRS-GK27FIN",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3134"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3134,'EPSG',3134,'PROJCS["ETRS89 / ETRS-GK27FIN",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3134"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3135 : ETRS89 / ETRS-GK28FIN --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3135,'EPSG',3135,'PROJCS["ETRS89 / ETRS-GK28FIN",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",28],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3135"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=28 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3135,'EPSG',3135,'PROJCS["ETRS89 / ETRS-GK28FIN",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",28],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3135"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=0 +lon_0=28 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3136 : ETRS89 / ETRS-GK29FIN --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3136,'EPSG',3136,'PROJCS["ETRS89 / ETRS-GK29FIN",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",29],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3136"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=29 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3136,'EPSG',3136,'PROJCS["ETRS89 / ETRS-GK29FIN",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",29],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3136"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=0 +lon_0=29 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3137 : ETRS89 / ETRS-GK30FIN --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3137,'EPSG',3137,'PROJCS["ETRS89 / ETRS-GK30FIN",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",30],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3137"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3137,'EPSG',3137,'PROJCS["ETRS89 / ETRS-GK30FIN",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",30],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3137"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3138 : ETRS89 / ETRS-GK31FIN --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3138,'EPSG',3138,'PROJCS["ETRS89 / ETRS-GK31FIN",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",31],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3138"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=31 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3138,'EPSG',3138,'PROJCS["ETRS89 / ETRS-GK31FIN",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",31],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3138"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=0 +lon_0=31 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3139 : Vanua Levu 1915 / Vanua Levu Grid --- @@ -6242,19 +6374,19 @@ --- --- EPSG 3140 : Viti Levu 1912 / Viti Levu Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3140,'EPSG',3140,'PROJCS["Viti Levu 1912 / Viti Levu Grid",GEOGCS["Viti Levu 1912",DATUM["Viti_Levu_1912",SPHEROID["Clarke 1880 (international foot)",6378306.3696,293.4663076556349,AUTHORITY["EPSG","7055"]],TOWGS84[51,391,-36,0,0,0,0],AUTHORITY["EPSG","6752"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4752"]],UNIT["link",0.201168,AUTHORITY["EPSG","9098"]],PROJECTION["Cassini_Soldner"],PARAMETER["latitude_of_origin",-18],PARAMETER["central_meridian",178],PARAMETER["false_easting",544000],PARAMETER["false_northing",704000],AUTHORITY["EPSG","3140"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=cass +lat_0=-18 +lon_0=178 +x_0=109435.392 +y_0=141622.272 +a=6378306.3696 +b=6356571.996 +towgs84=51,391,-36,0,0,0,0 +to_meter=0.201168 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3140,'EPSG',3140,'PROJCS["Viti Levu 1912 / Viti Levu Grid",GEOGCS["Viti Levu 1912",DATUM["Viti_Levu_1912",SPHEROID["Clarke 1880 (international foot)",6378306.3696,293.4663076556349,AUTHORITY["EPSG","7055"]],TOWGS84[51,391,-36,0,0,0,0],AUTHORITY["EPSG","6752"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4752"]],UNIT["link",0.201168,AUTHORITY["EPSG","9098"]],PROJECTION["Cassini_Soldner"],PARAMETER["latitude_of_origin",-18],PARAMETER["central_meridian",178],PARAMETER["false_easting",544000],PARAMETER["false_northing",704000],AUTHORITY["EPSG","3140"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=cass +lat_0=-18 +lon_0=178 +x_0=109435.392 +y_0=141622.272 +a=6378306.3696 +b=6356571.996 +towgs84=51,391,-36,0,0,0,0 +to_meter=0.201168 +no_defs '); --- --- EPSG 3141 : Fiji 1956 / UTM zone 60S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3141,'EPSG',3141,'PROJCS["Fiji 1956 / UTM zone 60S",GEOGCS["Fiji 1956",DATUM["Fiji_1956",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[265.025,384.929,-194.046,0,0,0,0],AUTHORITY["EPSG","6721"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4721"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3141"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=60 +south +ellps=intl +towgs84=265.025,384.929,-194.046,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3141,'EPSG',3141,'PROJCS["Fiji 1956 / UTM zone 60S",GEOGCS["Fiji 1956",DATUM["Fiji_1956",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[265.025,384.929,-194.046,0,0,0,0],AUTHORITY["EPSG","6721"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4721"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3141"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=60 +south +ellps=intl +towgs84=265.025,384.929,-194.046,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3142 : Fiji 1956 / UTM zone 1S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3142,'EPSG',3142,'PROJCS["Fiji 1956 / UTM zone 1S",GEOGCS["Fiji 1956",DATUM["Fiji_1956",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[265.025,384.929,-194.046,0,0,0,0],AUTHORITY["EPSG","6721"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4721"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3142"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=1 +south +ellps=intl +towgs84=265.025,384.929,-194.046,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3142,'EPSG',3142,'PROJCS["Fiji 1956 / UTM zone 1S",GEOGCS["Fiji 1956",DATUM["Fiji_1956",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[265.025,384.929,-194.046,0,0,0,0],AUTHORITY["EPSG","6721"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4721"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3142"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=1 +south +ellps=intl +towgs84=265.025,384.929,-194.046,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3143 : Fiji 1986 / Fiji Map Grid (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3143,'EPSG',3143,'PROJCS["Fiji 1986 / Fiji Map Grid (deprecated)",GEOGCS["Fiji 1986",DATUM["Fiji_Geodetic_Datum_1986",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6720"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4720"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-17],PARAMETER["central_meridian",178.75],PARAMETER["scale_factor",0.99985],PARAMETER["false_easting",2000000],PARAMETER["false_northing",4000000],AUTHORITY["EPSG","3143"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-17 +lon_0=178.75 +k=0.99985 +x_0=2000000 +y_0=4000000 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3143,'EPSG',3143,'PROJCS["Fiji 1986 / Fiji Map Grid (deprecated)",GEOGCS["Fiji 1986",DATUM["Fiji_Geodetic_Datum_1986",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6720"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4720"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-17],PARAMETER["central_meridian",178.75],PARAMETER["scale_factor",0.99985],PARAMETER["false_easting",2000000],PARAMETER["false_northing",4000000],AUTHORITY["EPSG","3143"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-17 +lon_0=178.75 +k=0.99985 +x_0=2000000 +y_0=4000000 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 3144 : FD54 / Faroe Lambert --- @@ -6266,111 +6398,111 @@ --- --- EPSG 3146 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 6 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3146,'EPSG',3146,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 6",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18],PARAMETER["scale_factor",1],PARAMETER["false_easting",6500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3146"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=6500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3146,'EPSG',3146,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 6",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18],PARAMETER["scale_factor",1],PARAMETER["false_easting",6500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3146"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=6500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 3147 : Pulkovo 1942 / 3-degree Gauss-Kruger CM 18E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3147,'EPSG',3147,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 18E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3147"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3147,'EPSG',3147,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger CM 18E",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3147"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 3148 : Indian 1960 / UTM zone 48N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3148,'EPSG',3148,'PROJCS["Indian 1960 / UTM zone 48N",GEOGCS["Indian 1960",DATUM["Indian_1960",SPHEROID["Everest 1830 (1937 Adjustment)",6377276.345,300.8017,AUTHORITY["EPSG","7015"]],AUTHORITY["EPSG","6131"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4131"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3148"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=48 +a=6377276.345 +b=6356075.41314024 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3148,'EPSG',3148,'PROJCS["Indian 1960 / UTM zone 48N",GEOGCS["Indian 1960",DATUM["Indian_1960",SPHEROID["Everest 1830 (1937 Adjustment)",6377276.345,300.8017,AUTHORITY["EPSG","7015"]],TOWGS84[198,881,317,0,0,0,0],AUTHORITY["EPSG","6131"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4131"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3148"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=48 +a=6377276.345 +b=6356075.41314024 +towgs84=198,881,317,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3149 : Indian 1960 / UTM zone 49N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3149,'EPSG',3149,'PROJCS["Indian 1960 / UTM zone 49N",GEOGCS["Indian 1960",DATUM["Indian_1960",SPHEROID["Everest 1830 (1937 Adjustment)",6377276.345,300.8017,AUTHORITY["EPSG","7015"]],AUTHORITY["EPSG","6131"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4131"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3149"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=49 +a=6377276.345 +b=6356075.41314024 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3149,'EPSG',3149,'PROJCS["Indian 1960 / UTM zone 49N",GEOGCS["Indian 1960",DATUM["Indian_1960",SPHEROID["Everest 1830 (1937 Adjustment)",6377276.345,300.8017,AUTHORITY["EPSG","7015"]],TOWGS84[198,881,317,0,0,0,0],AUTHORITY["EPSG","6131"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4131"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3149"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=49 +a=6377276.345 +b=6356075.41314024 +towgs84=198,881,317,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3150 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 6 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3150,'EPSG',3150,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 6",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18],PARAMETER["scale_factor",1],PARAMETER["false_easting",6500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3150"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=6500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3150,'EPSG',3150,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 6",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18],PARAMETER["scale_factor",1],PARAMETER["false_easting",6500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3150"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=6500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 3151 : Pulkovo 1995 / 3-degree Gauss-Kruger CM 18E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3151,'EPSG',3151,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 18E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3151"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3151,'EPSG',3151,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger CM 18E",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3151"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 3152 : ST74 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3152,'EPSG',3152,'PROJCS["ST74",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18.05779],PARAMETER["scale_factor",0.99999425],PARAMETER["false_easting",100178.1808],PARAMETER["false_northing",-6500614.7836],AUTHORITY["EPSG","3152"],AXIS["y",EAST],AXIS["x",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=18.05779 +k=0.99999425 +x_0=100178.1808 +y_0=-6500614.7836 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3152,'EPSG',3152,'PROJCS["ST74",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18.05779],PARAMETER["scale_factor",0.99999425],PARAMETER["false_easting",100178.1808],PARAMETER["false_northing",-6500614.7836],AUTHORITY["EPSG","3152"],AXIS["x",NORTH],AXIS["y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=18.05779 +k=0.99999425 +x_0=100178.1808 +y_0=-6500614.7836 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3153 : NAD83(CSRS) / BC Albers --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3153,'EPSG',3153,'PROJCS["NAD83(CSRS) / BC Albers",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",50],PARAMETER["standard_parallel_2",58.5],PARAMETER["latitude_of_center",45],PARAMETER["longitude_of_center",-126],PARAMETER["false_easting",1000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3153"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=aea +lat_1=50 +lat_2=58.5 +lat_0=45 +lon_0=-126 +x_0=1000000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3153,'EPSG',3153,'PROJCS["NAD83(CSRS) / BC Albers",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",50],PARAMETER["standard_parallel_2",58.5],PARAMETER["latitude_of_center",45],PARAMETER["longitude_of_center",-126],PARAMETER["false_easting",1000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3153"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=aea +lat_1=50 +lat_2=58.5 +lat_0=45 +lon_0=-126 +x_0=1000000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3154 : NAD83(CSRS) / UTM zone 7N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3154,'EPSG',3154,'PROJCS["NAD83(CSRS) / UTM zone 7N",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3154"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=7 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3154,'EPSG',3154,'PROJCS["NAD83(CSRS) / UTM zone 7N",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3154"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=7 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3155 : NAD83(CSRS) / UTM zone 8N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3155,'EPSG',3155,'PROJCS["NAD83(CSRS) / UTM zone 8N",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3155"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=8 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3155,'EPSG',3155,'PROJCS["NAD83(CSRS) / UTM zone 8N",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3155"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=8 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3156 : NAD83(CSRS) / UTM zone 9N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3156,'EPSG',3156,'PROJCS["NAD83(CSRS) / UTM zone 9N",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3156"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=9 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3156,'EPSG',3156,'PROJCS["NAD83(CSRS) / UTM zone 9N",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3156"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=9 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3157 : NAD83(CSRS) / UTM zone 10N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3157,'EPSG',3157,'PROJCS["NAD83(CSRS) / UTM zone 10N",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3157"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=10 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3157,'EPSG',3157,'PROJCS["NAD83(CSRS) / UTM zone 10N",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3157"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=10 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3158 : NAD83(CSRS) / UTM zone 14N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3158,'EPSG',3158,'PROJCS["NAD83(CSRS) / UTM zone 14N",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3158"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=14 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3158,'EPSG',3158,'PROJCS["NAD83(CSRS) / UTM zone 14N",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3158"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=14 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3159 : NAD83(CSRS) / UTM zone 15N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3159,'EPSG',3159,'PROJCS["NAD83(CSRS) / UTM zone 15N",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3159"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=15 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3159,'EPSG',3159,'PROJCS["NAD83(CSRS) / UTM zone 15N",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3159"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=15 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3160 : NAD83(CSRS) / UTM zone 16N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3160,'EPSG',3160,'PROJCS["NAD83(CSRS) / UTM zone 16N",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3160"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=16 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3160,'EPSG',3160,'PROJCS["NAD83(CSRS) / UTM zone 16N",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3160"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=16 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3161 : NAD83 / Ontario MNR Lambert --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3161,'EPSG',3161,'PROJCS["NAD83 / Ontario MNR Lambert",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44.5],PARAMETER["standard_parallel_2",53.5],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-85],PARAMETER["false_easting",930000],PARAMETER["false_northing",6430000],AUTHORITY["EPSG","3161"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=44.5 +lat_2=53.5 +lat_0=0 +lon_0=-85 +x_0=930000 +y_0=6430000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3161,'EPSG',3161,'PROJCS["NAD83 / Ontario MNR Lambert",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44.5],PARAMETER["standard_parallel_2",53.5],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-85],PARAMETER["false_easting",930000],PARAMETER["false_northing",6430000],AUTHORITY["EPSG","3161"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=44.5 +lat_2=53.5 +lat_0=0 +lon_0=-85 +x_0=930000 +y_0=6430000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3162 : NAD83(CSRS) / Ontario MNR Lambert --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3162,'EPSG',3162,'PROJCS["NAD83(CSRS) / Ontario MNR Lambert",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44.5],PARAMETER["standard_parallel_2",53.5],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-85],PARAMETER["false_easting",930000],PARAMETER["false_northing",6430000],AUTHORITY["EPSG","3162"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=44.5 +lat_2=53.5 +lat_0=0 +lon_0=-85 +x_0=930000 +y_0=6430000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3162,'EPSG',3162,'PROJCS["NAD83(CSRS) / Ontario MNR Lambert",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44.5],PARAMETER["standard_parallel_2",53.5],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-85],PARAMETER["false_easting",930000],PARAMETER["false_northing",6430000],AUTHORITY["EPSG","3162"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=44.5 +lat_2=53.5 +lat_0=0 +lon_0=-85 +x_0=930000 +y_0=6430000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3163 : RGNC91-93 / Lambert New Caledonia --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3163,'EPSG',3163,'PROJCS["RGNC91-93 / Lambert New Caledonia",GEOGCS["RGNC91-93",DATUM["Reseau_Geodesique_de_Nouvelle_Caledonie_91_93",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6749"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4749"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-20.66666666666667],PARAMETER["standard_parallel_2",-22.33333333333333],PARAMETER["latitude_of_origin",-21.5],PARAMETER["central_meridian",166],PARAMETER["false_easting",400000],PARAMETER["false_northing",300000],AUTHORITY["EPSG","3163"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=-20.66666666666667 +lat_2=-22.33333333333333 +lat_0=-21.5 +lon_0=166 +x_0=400000 +y_0=300000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3163,'EPSG',3163,'PROJCS["RGNC91-93 / Lambert New Caledonia",GEOGCS["RGNC91-93",DATUM["Reseau_Geodesique_de_Nouvelle_Caledonie_91_93",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6749"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4749"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-20.66666666666667],PARAMETER["standard_parallel_2",-22.33333333333333],PARAMETER["latitude_of_origin",-21.5],PARAMETER["central_meridian",166],PARAMETER["false_easting",400000],PARAMETER["false_northing",300000],AUTHORITY["EPSG","3163"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=-20.66666666666667 +lat_2=-22.33333333333333 +lat_0=-21.5 +lon_0=166 +x_0=400000 +y_0=300000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3164 : ST87 Ouvea / UTM zone 58S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3164,'EPSG',3164,'PROJCS["ST87 Ouvea / UTM zone 58S",GEOGCS["ST87 Ouvea",DATUM["ST87_Ouvea",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[-56.263,16.136,-22.856,0,0,0,0],AUTHORITY["EPSG","6750"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4750"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3164"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=58 +south +ellps=WGS84 +towgs84=-56.263,16.136,-22.856,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3164,'EPSG',3164,'PROJCS["ST87 Ouvea / UTM zone 58S",GEOGCS["ST87 Ouvea",DATUM["ST87_Ouvea",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[-56.263,16.136,-22.856,0,0,0,0],AUTHORITY["EPSG","6750"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4750"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3164"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=58 +south +ellps=WGS84 +towgs84=-56.263,16.136,-22.856,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3165 : NEA74 Noumea / Noumea Lambert --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3165,'EPSG',3165,'PROJCS["NEA74 Noumea / Noumea Lambert",GEOGCS["NEA74 Noumea",DATUM["NEA74_Noumea",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6644"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4644"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-22.24469175],PARAMETER["standard_parallel_2",-22.29469175],PARAMETER["latitude_of_origin",-22.26969175],PARAMETER["central_meridian",166.44242575],PARAMETER["false_easting",0.66],PARAMETER["false_northing",1.02],AUTHORITY["EPSG","3165"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=-22.24469175 +lat_2=-22.29469175 +lat_0=-22.26969175 +lon_0=166.44242575 +x_0=0.66 +y_0=1.02 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3165,'EPSG',3165,'PROJCS["NEA74 Noumea / Noumea Lambert",GEOGCS["NEA74 Noumea",DATUM["NEA74_Noumea",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-10.18,-350.43,291.37,0,0,0,0],AUTHORITY["EPSG","6644"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4644"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-22.24469175],PARAMETER["standard_parallel_2",-22.29469175],PARAMETER["latitude_of_origin",-22.26969175],PARAMETER["central_meridian",166.44242575],PARAMETER["false_easting",0.66],PARAMETER["false_northing",1.02],AUTHORITY["EPSG","3165"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=-22.24469175 +lat_2=-22.29469175 +lat_0=-22.26969175 +lon_0=166.44242575 +x_0=0.66 +y_0=1.02 +ellps=intl +towgs84=-10.18,-350.43,291.37,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3166 : NEA74 Noumea / Noumea Lambert 2 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3166,'EPSG',3166,'PROJCS["NEA74 Noumea / Noumea Lambert 2",GEOGCS["NEA74 Noumea",DATUM["NEA74_Noumea",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6644"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4644"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-22.24472222222222],PARAMETER["standard_parallel_2",-22.29472222222222],PARAMETER["latitude_of_origin",-22.26972222222222],PARAMETER["central_meridian",166.4425],PARAMETER["false_easting",8.313],PARAMETER["false_northing",-2.354],AUTHORITY["EPSG","3166"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=-22.24472222222222 +lat_2=-22.29472222222222 +lat_0=-22.26972222222222 +lon_0=166.4425 +x_0=8.313000000000001 +y_0=-2.354 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3166,'EPSG',3166,'PROJCS["NEA74 Noumea / Noumea Lambert 2",GEOGCS["NEA74 Noumea",DATUM["NEA74_Noumea",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-10.18,-350.43,291.37,0,0,0,0],AUTHORITY["EPSG","6644"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4644"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-22.24472222222222],PARAMETER["standard_parallel_2",-22.29472222222222],PARAMETER["latitude_of_origin",-22.26972222222222],PARAMETER["central_meridian",166.4425],PARAMETER["false_easting",8.313],PARAMETER["false_northing",-2.354],AUTHORITY["EPSG","3166"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=-22.24472222222222 +lat_2=-22.29472222222222 +lat_0=-22.26972222222222 +lon_0=166.4425 +x_0=8.313000000000001 +y_0=-2.354 +ellps=intl +towgs84=-10.18,-350.43,291.37,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3167 : Kertau (RSO) / RSO Malaya (ch) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3167,'EPSG',3167,'PROJCS["Kertau (RSO) / RSO Malaya (ch)",GEOGCS["Kertau (RSO)",DATUM["Kertau_RSO",SPHEROID["Everest 1830 (RSO 1969)",6377295.664,300.8017,AUTHORITY["EPSG","7056"]],AUTHORITY["EPSG","6751"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4751"]],UNIT["British chain (Sears 1922 truncated)",20.116756,AUTHORITY["EPSG","9301"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",4],PARAMETER["longitude_of_center",102.25],PARAMETER["azimuth",323.0257905],PARAMETER["rectified_grid_angle",323.1301023611111],PARAMETER["scale_factor",0.99984],PARAMETER["false_easting",1988.392164223695],PARAMETER["false_northing",0],AUTHORITY["EPSG","3167"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=omerc +lat_0=4 +lonc=102.25 +alpha=323.0257905 +k=0.99984 +x_0=40000 +y_0=0 +a=6377295.664 +b=6356094.667915204 +to_meter=20.116756 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3167,'EPSG',3167,'PROJCS["Kertau (RSO) / RSO Malaya (ch)",GEOGCS["Kertau (RSO)",DATUM["Kertau_RSO",SPHEROID["Everest 1830 (RSO 1969)",6377295.664,300.8017,AUTHORITY["EPSG","7056"]],AUTHORITY["EPSG","6751"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4751"]],UNIT["British chain (Sears 1922 truncated)",20.116756,AUTHORITY["EPSG","9301"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",4],PARAMETER["longitude_of_center",102.25],PARAMETER["azimuth",323.0257905],PARAMETER["rectified_grid_angle",323.1301023611111],PARAMETER["scale_factor",0.99984],PARAMETER["false_easting",1988.392164223695],PARAMETER["false_northing",0],AUTHORITY["EPSG","3167"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=omerc +lat_0=4 +lonc=102.25 +alpha=323.0257905 +k=0.99984 +x_0=40000 +y_0=0 +gamma=323.1301023611111 +a=6377295.664 +b=6356094.667915204 +to_meter=20.116756 +no_defs '); --- --- EPSG 3168 : Kertau (RSO) / RSO Malaya (m) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3168,'EPSG',3168,'PROJCS["Kertau (RSO) / RSO Malaya (m)",GEOGCS["Kertau (RSO)",DATUM["Kertau_RSO",SPHEROID["Everest 1830 (RSO 1969)",6377295.664,300.8017,AUTHORITY["EPSG","7056"]],AUTHORITY["EPSG","6751"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4751"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",4],PARAMETER["longitude_of_center",102.25],PARAMETER["azimuth",323.0257905],PARAMETER["rectified_grid_angle",323.1301023611111],PARAMETER["scale_factor",0.99984],PARAMETER["false_easting",804670.24],PARAMETER["false_northing",0],AUTHORITY["EPSG","3168"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=omerc +lat_0=4 +lonc=102.25 +alpha=323.0257905 +k=0.99984 +x_0=804670.24 +y_0=0 +a=6377295.664 +b=6356094.667915204 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3168,'EPSG',3168,'PROJCS["Kertau (RSO) / RSO Malaya (m)",GEOGCS["Kertau (RSO)",DATUM["Kertau_RSO",SPHEROID["Everest 1830 (RSO 1969)",6377295.664,300.8017,AUTHORITY["EPSG","7056"]],AUTHORITY["EPSG","6751"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4751"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",4],PARAMETER["longitude_of_center",102.25],PARAMETER["azimuth",323.0257905],PARAMETER["rectified_grid_angle",323.1301023611111],PARAMETER["scale_factor",0.99984],PARAMETER["false_easting",804670.24],PARAMETER["false_northing",0],AUTHORITY["EPSG","3168"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=omerc +lat_0=4 +lonc=102.25 +alpha=323.0257905 +k=0.99984 +x_0=804670.24 +y_0=0 +gamma=323.1301023611111 +a=6377295.664 +b=6356094.667915204 +units=m +no_defs '); --- --- EPSG 3169 : RGNC91-93 / UTM zone 57S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3169,'EPSG',3169,'PROJCS["RGNC91-93 / UTM zone 57S",GEOGCS["RGNC91-93",DATUM["Reseau_Geodesique_de_Nouvelle_Caledonie_91_93",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6749"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4749"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",159],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3169"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=57 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3169,'EPSG',3169,'PROJCS["RGNC91-93 / UTM zone 57S",GEOGCS["RGNC91-93",DATUM["Reseau_Geodesique_de_Nouvelle_Caledonie_91_93",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6749"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4749"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",159],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3169"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=57 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3170 : RGNC91-93 / UTM zone 58S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3170,'EPSG',3170,'PROJCS["RGNC91-93 / UTM zone 58S",GEOGCS["RGNC91-93",DATUM["Reseau_Geodesique_de_Nouvelle_Caledonie_91_93",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6749"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4749"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3170"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=58 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3170,'EPSG',3170,'PROJCS["RGNC91-93 / UTM zone 58S",GEOGCS["RGNC91-93",DATUM["Reseau_Geodesique_de_Nouvelle_Caledonie_91_93",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6749"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4749"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3170"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=58 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3171 : RGNC91-93 / UTM zone 59S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3171,'EPSG',3171,'PROJCS["RGNC91-93 / UTM zone 59S",GEOGCS["RGNC91-93",DATUM["Reseau_Geodesique_de_Nouvelle_Caledonie_91_93",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6749"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4749"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3171"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=59 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3171,'EPSG',3171,'PROJCS["RGNC91-93 / UTM zone 59S",GEOGCS["RGNC91-93",DATUM["Reseau_Geodesique_de_Nouvelle_Caledonie_91_93",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6749"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4749"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3171"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=59 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3172 : IGN53 Mare / UTM zone 59S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3172,'EPSG',3172,'PROJCS["IGN53 Mare / UTM zone 59S",GEOGCS["IGN53 Mare",DATUM["IGN53_Mare",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6641"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4641"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3172"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=59 +south +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3172,'EPSG',3172,'PROJCS["IGN53 Mare / UTM zone 59S",GEOGCS["IGN53 Mare",DATUM["IGN53_Mare",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[287.58,177.78,-135.41,0,0,0,0],AUTHORITY["EPSG","6641"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4641"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3172"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=59 +south +ellps=intl +towgs84=287.58,177.78,-135.41,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3173 : fk89 / Faroe Lambert FK89 --- @@ -6378,487 +6510,487 @@ --- --- EPSG 3174 : NAD83 / Great Lakes Albers --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3174,'EPSG',3174,'PROJCS["NAD83 / Great Lakes Albers",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",42.122774],PARAMETER["standard_parallel_2",49.01518],PARAMETER["latitude_of_center",45.568977],PARAMETER["longitude_of_center",-84.455955],PARAMETER["false_easting",1000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","3174"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=aea +lat_1=42.122774 +lat_2=49.01518 +lat_0=45.568977 +lon_0=-84.455955 +x_0=1000000 +y_0=1000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3174,'EPSG',3174,'PROJCS["NAD83 / Great Lakes Albers",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",42.122774],PARAMETER["standard_parallel_2",49.01518],PARAMETER["latitude_of_center",45.568977],PARAMETER["longitude_of_center",-84.455955],PARAMETER["false_easting",1000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","3174"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=aea +lat_1=42.122774 +lat_2=49.01518 +lat_0=45.568977 +lon_0=-84.455955 +x_0=1000000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3175 : NAD83 / Great Lakes and St Lawrence Albers --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3175,'EPSG',3175,'PROJCS["NAD83 / Great Lakes and St Lawrence Albers",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",42.122774],PARAMETER["standard_parallel_2",49.01518],PARAMETER["latitude_of_center",45.568977],PARAMETER["longitude_of_center",-83.248627],PARAMETER["false_easting",1000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","3175"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=aea +lat_1=42.122774 +lat_2=49.01518 +lat_0=45.568977 +lon_0=-83.248627 +x_0=1000000 +y_0=1000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3175,'EPSG',3175,'PROJCS["NAD83 / Great Lakes and St Lawrence Albers",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",42.122774],PARAMETER["standard_parallel_2",49.01518],PARAMETER["latitude_of_center",45.568977],PARAMETER["longitude_of_center",-83.248627],PARAMETER["false_easting",1000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","3175"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=aea +lat_1=42.122774 +lat_2=49.01518 +lat_0=45.568977 +lon_0=-83.248627 +x_0=1000000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3176 : Indian 1960 / TM 106 NE --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3176,'EPSG',3176,'PROJCS["Indian 1960 / TM 106 NE",GEOGCS["Indian 1960",DATUM["Indian_1960",SPHEROID["Everest 1830 (1937 Adjustment)",6377276.345,300.8017,AUTHORITY["EPSG","7015"]],AUTHORITY["EPSG","6131"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4131"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",106],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3176"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=106 +k=0.9996 +x_0=500000 +y_0=0 +a=6377276.345 +b=6356075.41314024 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3176,'EPSG',3176,'PROJCS["Indian 1960 / TM 106 NE",GEOGCS["Indian 1960",DATUM["Indian_1960",SPHEROID["Everest 1830 (1937 Adjustment)",6377276.345,300.8017,AUTHORITY["EPSG","7015"]],TOWGS84[198,881,317,0,0,0,0],AUTHORITY["EPSG","6131"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4131"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",106],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3176"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=106 +k=0.9996 +x_0=500000 +y_0=0 +a=6377276.345 +b=6356075.41314024 +towgs84=198,881,317,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3177 : LGD2006 / Libya TM --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3177,'EPSG',3177,'PROJCS["LGD2006 / Libya TM",GEOGCS["LGD2006",DATUM["Libyan_Geodetic_Datum_2006",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY["EPSG","6754"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4754"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",17],PARAMETER["scale_factor",0.9965],PARAMETER["false_easting",1000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3177"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=17 +k=0.9965000000000001 +x_0=1000000 +y_0=0 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3177,'EPSG',3177,'PROJCS["LGD2006 / Libya TM",GEOGCS["LGD2006",DATUM["Libyan_Geodetic_Datum_2006",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY["EPSG","6754"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4754"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",17],PARAMETER["scale_factor",0.9965],PARAMETER["false_easting",1000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3177"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=17 +k=0.9965000000000001 +x_0=1000000 +y_0=0 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3178 : GR96 / UTM zone 18N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3178,'EPSG',3178,'PROJCS["GR96 / UTM zone 18N",GEOGCS["GR96",DATUM["Greenland_1996",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6747"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4747"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3178"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3178,'EPSG',3178,'PROJCS["GR96 / UTM zone 18N",GEOGCS["GR96",DATUM["Greenland_1996",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6747"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4747"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3178"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3179 : GR96 / UTM zone 19N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3179,'EPSG',3179,'PROJCS["GR96 / UTM zone 19N",GEOGCS["GR96",DATUM["Greenland_1996",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6747"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4747"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3179"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3179,'EPSG',3179,'PROJCS["GR96 / UTM zone 19N",GEOGCS["GR96",DATUM["Greenland_1996",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6747"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4747"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3179"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3180 : GR96 / UTM zone 20N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3180,'EPSG',3180,'PROJCS["GR96 / UTM zone 20N",GEOGCS["GR96",DATUM["Greenland_1996",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6747"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4747"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3180"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3180,'EPSG',3180,'PROJCS["GR96 / UTM zone 20N",GEOGCS["GR96",DATUM["Greenland_1996",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6747"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4747"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3180"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3181 : GR96 / UTM zone 21N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3181,'EPSG',3181,'PROJCS["GR96 / UTM zone 21N",GEOGCS["GR96",DATUM["Greenland_1996",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6747"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4747"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3181"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3181,'EPSG',3181,'PROJCS["GR96 / UTM zone 21N",GEOGCS["GR96",DATUM["Greenland_1996",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6747"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4747"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3181"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3182 : GR96 / UTM zone 22N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3182,'EPSG',3182,'PROJCS["GR96 / UTM zone 22N",GEOGCS["GR96",DATUM["Greenland_1996",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6747"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4747"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3182"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3182,'EPSG',3182,'PROJCS["GR96 / UTM zone 22N",GEOGCS["GR96",DATUM["Greenland_1996",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6747"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4747"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3182"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3183 : GR96 / UTM zone 23N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3183,'EPSG',3183,'PROJCS["GR96 / UTM zone 23N",GEOGCS["GR96",DATUM["Greenland_1996",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6747"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4747"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3183"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=23 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3183,'EPSG',3183,'PROJCS["GR96 / UTM zone 23N",GEOGCS["GR96",DATUM["Greenland_1996",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6747"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4747"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3183"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=23 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3184 : GR96 / UTM zone 24N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3184,'EPSG',3184,'PROJCS["GR96 / UTM zone 24N",GEOGCS["GR96",DATUM["Greenland_1996",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6747"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4747"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3184"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=24 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3184,'EPSG',3184,'PROJCS["GR96 / UTM zone 24N",GEOGCS["GR96",DATUM["Greenland_1996",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6747"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4747"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3184"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=24 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3185 : GR96 / UTM zone 25N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3185,'EPSG',3185,'PROJCS["GR96 / UTM zone 25N",GEOGCS["GR96",DATUM["Greenland_1996",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6747"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4747"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3185"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=25 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3185,'EPSG',3185,'PROJCS["GR96 / UTM zone 25N",GEOGCS["GR96",DATUM["Greenland_1996",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6747"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4747"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3185"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=25 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3186 : GR96 / UTM zone 26N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3186,'EPSG',3186,'PROJCS["GR96 / UTM zone 26N",GEOGCS["GR96",DATUM["Greenland_1996",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6747"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4747"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3186"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=26 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3186,'EPSG',3186,'PROJCS["GR96 / UTM zone 26N",GEOGCS["GR96",DATUM["Greenland_1996",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6747"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4747"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3186"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=26 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3187 : GR96 / UTM zone 27N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3187,'EPSG',3187,'PROJCS["GR96 / UTM zone 27N",GEOGCS["GR96",DATUM["Greenland_1996",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6747"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4747"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3187"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=27 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3187,'EPSG',3187,'PROJCS["GR96 / UTM zone 27N",GEOGCS["GR96",DATUM["Greenland_1996",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6747"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4747"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3187"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=27 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3188 : GR96 / UTM zone 28N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3188,'EPSG',3188,'PROJCS["GR96 / UTM zone 28N",GEOGCS["GR96",DATUM["Greenland_1996",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6747"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4747"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3188"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3188,'EPSG',3188,'PROJCS["GR96 / UTM zone 28N",GEOGCS["GR96",DATUM["Greenland_1996",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6747"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4747"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3188"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3189 : GR96 / UTM zone 29N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3189,'EPSG',3189,'PROJCS["GR96 / UTM zone 29N",GEOGCS["GR96",DATUM["Greenland_1996",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6747"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4747"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3189"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3189,'EPSG',3189,'PROJCS["GR96 / UTM zone 29N",GEOGCS["GR96",DATUM["Greenland_1996",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6747"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4747"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3189"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3190 : LGD2006 / Libya TM zone 5 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3190,'EPSG',3190,'PROJCS["LGD2006 / Libya TM zone 5",GEOGCS["LGD2006",DATUM["Libyan_Geodetic_Datum_2006",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY["EPSG","6754"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4754"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3190"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=9 +k=0.99995 +x_0=200000 +y_0=0 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3190,'EPSG',3190,'PROJCS["LGD2006 / Libya TM zone 5",GEOGCS["LGD2006",DATUM["Libyan_Geodetic_Datum_2006",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY["EPSG","6754"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4754"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3190"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=9 +k=0.99995 +x_0=200000 +y_0=0 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3191 : LGD2006 / Libya TM zone 6 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3191,'EPSG',3191,'PROJCS["LGD2006 / Libya TM zone 6",GEOGCS["LGD2006",DATUM["Libyan_Geodetic_Datum_2006",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY["EPSG","6754"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4754"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",11],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3191"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=11 +k=0.99995 +x_0=200000 +y_0=0 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3191,'EPSG',3191,'PROJCS["LGD2006 / Libya TM zone 6",GEOGCS["LGD2006",DATUM["Libyan_Geodetic_Datum_2006",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY["EPSG","6754"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4754"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",11],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3191"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=11 +k=0.99995 +x_0=200000 +y_0=0 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3192 : LGD2006 / Libya TM zone 7 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3192,'EPSG',3192,'PROJCS["LGD2006 / Libya TM zone 7",GEOGCS["LGD2006",DATUM["Libyan_Geodetic_Datum_2006",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY["EPSG","6754"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4754"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",13],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3192"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=13 +k=0.99995 +x_0=200000 +y_0=0 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3192,'EPSG',3192,'PROJCS["LGD2006 / Libya TM zone 7",GEOGCS["LGD2006",DATUM["Libyan_Geodetic_Datum_2006",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY["EPSG","6754"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4754"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",13],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3192"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=13 +k=0.99995 +x_0=200000 +y_0=0 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3193 : LGD2006 / Libya TM zone 8 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3193,'EPSG',3193,'PROJCS["LGD2006 / Libya TM zone 8",GEOGCS["LGD2006",DATUM["Libyan_Geodetic_Datum_2006",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY["EPSG","6754"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4754"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3193"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=0.99995 +x_0=200000 +y_0=0 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3193,'EPSG',3193,'PROJCS["LGD2006 / Libya TM zone 8",GEOGCS["LGD2006",DATUM["Libyan_Geodetic_Datum_2006",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY["EPSG","6754"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4754"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3193"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=0.99995 +x_0=200000 +y_0=0 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3194 : LGD2006 / Libya TM zone 9 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3194,'EPSG',3194,'PROJCS["LGD2006 / Libya TM zone 9",GEOGCS["LGD2006",DATUM["Libyan_Geodetic_Datum_2006",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY["EPSG","6754"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4754"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",17],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3194"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=17 +k=0.99995 +x_0=200000 +y_0=0 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3194,'EPSG',3194,'PROJCS["LGD2006 / Libya TM zone 9",GEOGCS["LGD2006",DATUM["Libyan_Geodetic_Datum_2006",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY["EPSG","6754"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4754"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",17],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3194"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=17 +k=0.99995 +x_0=200000 +y_0=0 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3195 : LGD2006 / Libya TM zone 10 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3195,'EPSG',3195,'PROJCS["LGD2006 / Libya TM zone 10",GEOGCS["LGD2006",DATUM["Libyan_Geodetic_Datum_2006",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY["EPSG","6754"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4754"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",19],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3195"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=19 +k=0.99995 +x_0=200000 +y_0=0 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3195,'EPSG',3195,'PROJCS["LGD2006 / Libya TM zone 10",GEOGCS["LGD2006",DATUM["Libyan_Geodetic_Datum_2006",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY["EPSG","6754"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4754"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",19],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3195"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=19 +k=0.99995 +x_0=200000 +y_0=0 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3196 : LGD2006 / Libya TM zone 11 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3196,'EPSG',3196,'PROJCS["LGD2006 / Libya TM zone 11",GEOGCS["LGD2006",DATUM["Libyan_Geodetic_Datum_2006",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY["EPSG","6754"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4754"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3196"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=0.99995 +x_0=200000 +y_0=0 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3196,'EPSG',3196,'PROJCS["LGD2006 / Libya TM zone 11",GEOGCS["LGD2006",DATUM["Libyan_Geodetic_Datum_2006",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY["EPSG","6754"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4754"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3196"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=0.99995 +x_0=200000 +y_0=0 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3197 : LGD2006 / Libya TM zone 12 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3197,'EPSG',3197,'PROJCS["LGD2006 / Libya TM zone 12",GEOGCS["LGD2006",DATUM["Libyan_Geodetic_Datum_2006",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY["EPSG","6754"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4754"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",23],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3197"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=23 +k=0.99995 +x_0=200000 +y_0=0 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3197,'EPSG',3197,'PROJCS["LGD2006 / Libya TM zone 12",GEOGCS["LGD2006",DATUM["Libyan_Geodetic_Datum_2006",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY["EPSG","6754"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4754"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",23],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3197"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=23 +k=0.99995 +x_0=200000 +y_0=0 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3198 : LGD2006 / Libya TM zone 13 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3198,'EPSG',3198,'PROJCS["LGD2006 / Libya TM zone 13",GEOGCS["LGD2006",DATUM["Libyan_Geodetic_Datum_2006",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY["EPSG","6754"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4754"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",25],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3198"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=25 +k=0.99995 +x_0=200000 +y_0=0 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3198,'EPSG',3198,'PROJCS["LGD2006 / Libya TM zone 13",GEOGCS["LGD2006",DATUM["Libyan_Geodetic_Datum_2006",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY["EPSG","6754"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4754"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",25],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3198"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=25 +k=0.99995 +x_0=200000 +y_0=0 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3199 : LGD2006 / UTM zone 32N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3199,'EPSG',3199,'PROJCS["LGD2006 / UTM zone 32N",GEOGCS["LGD2006",DATUM["Libyan_Geodetic_Datum_2006",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY["EPSG","6754"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4754"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3199"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3199,'EPSG',3199,'PROJCS["LGD2006 / UTM zone 32N",GEOGCS["LGD2006",DATUM["Libyan_Geodetic_Datum_2006",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY["EPSG","6754"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4754"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3199"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3200 : FD58 / Iraq zone --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3200,'EPSG',3200,'PROJCS["FD58 / Iraq zone",GEOGCS["FD58",DATUM["Final_Datum_1958",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6132"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4132"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",32.5],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9987864078],PARAMETER["false_easting",1500000],PARAMETER["false_northing",1166200],AUTHORITY["EPSG","3200"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=32.5 +lat_0=32.5 +lon_0=45 +k_0=0.9987864078000001 +x_0=1500000 +y_0=1166200 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3200,'EPSG',3200,'PROJCS["FD58 / Iraq zone",GEOGCS["FD58",DATUM["Final_Datum_1958",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-239.1,-170.02,397.5,0,0,0,0],AUTHORITY["EPSG","6132"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4132"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",32.5],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9987864078],PARAMETER["false_easting",1500000],PARAMETER["false_northing",1166200],AUTHORITY["EPSG","3200"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=32.5 +lat_0=32.5 +lon_0=45 +k_0=0.9987864078000001 +x_0=1500000 +y_0=1166200 +ellps=clrk80 +towgs84=-239.1,-170.02,397.5,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3201 : LGD2006 / UTM zone 33N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3201,'EPSG',3201,'PROJCS["LGD2006 / UTM zone 33N",GEOGCS["LGD2006",DATUM["Libyan_Geodetic_Datum_2006",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY["EPSG","6754"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4754"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3201"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=33 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3201,'EPSG',3201,'PROJCS["LGD2006 / UTM zone 33N",GEOGCS["LGD2006",DATUM["Libyan_Geodetic_Datum_2006",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY["EPSG","6754"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4754"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3201"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=33 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3202 : LGD2006 / UTM zone 34N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3202,'EPSG',3202,'PROJCS["LGD2006 / UTM zone 34N",GEOGCS["LGD2006",DATUM["Libyan_Geodetic_Datum_2006",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY["EPSG","6754"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4754"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3202"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=34 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3202,'EPSG',3202,'PROJCS["LGD2006 / UTM zone 34N",GEOGCS["LGD2006",DATUM["Libyan_Geodetic_Datum_2006",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY["EPSG","6754"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4754"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3202"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=34 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3203 : LGD2006 / UTM zone 35N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3203,'EPSG',3203,'PROJCS["LGD2006 / UTM zone 35N",GEOGCS["LGD2006",DATUM["Libyan_Geodetic_Datum_2006",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY["EPSG","6754"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4754"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3203"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=35 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3203,'EPSG',3203,'PROJCS["LGD2006 / UTM zone 35N",GEOGCS["LGD2006",DATUM["Libyan_Geodetic_Datum_2006",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY["EPSG","6754"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4754"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3203"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=35 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3204 : WGS 84 / SCAR IMW SP19-20 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3204,'EPSG',3204,'PROJCS["WGS 84 / SCAR IMW SP19-20",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-60.66666666666666],PARAMETER["standard_parallel_2",-63.33333333333334],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-66],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3204"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-60.66666666666666 +lat_2=-63.33333333333334 +lat_0=-90 +lon_0=-66 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3204,'EPSG',3204,'PROJCS["WGS 84 / SCAR IMW SP19-20",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-60.66666666666666],PARAMETER["standard_parallel_2",-63.33333333333334],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-66],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3204"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-60.66666666666666 +lat_2=-63.33333333333334 +lat_0=-90 +lon_0=-66 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3205 : WGS 84 / SCAR IMW SP21-22 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3205,'EPSG',3205,'PROJCS["WGS 84 / SCAR IMW SP21-22",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-60.66666666666666],PARAMETER["standard_parallel_2",-63.33333333333334],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-54],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3205"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-60.66666666666666 +lat_2=-63.33333333333334 +lat_0=-90 +lon_0=-54 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3205,'EPSG',3205,'PROJCS["WGS 84 / SCAR IMW SP21-22",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-60.66666666666666],PARAMETER["standard_parallel_2",-63.33333333333334],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-54],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3205"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-60.66666666666666 +lat_2=-63.33333333333334 +lat_0=-90 +lon_0=-54 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3206 : WGS 84 / SCAR IMW SP23-24 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3206,'EPSG',3206,'PROJCS["WGS 84 / SCAR IMW SP23-24",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-60.66666666666666],PARAMETER["standard_parallel_2",-63.33333333333334],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-42],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3206"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-60.66666666666666 +lat_2=-63.33333333333334 +lat_0=-90 +lon_0=-42 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3206,'EPSG',3206,'PROJCS["WGS 84 / SCAR IMW SP23-24",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-60.66666666666666],PARAMETER["standard_parallel_2",-63.33333333333334],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-42],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3206"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-60.66666666666666 +lat_2=-63.33333333333334 +lat_0=-90 +lon_0=-42 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3207 : WGS 84 / SCAR IMW SQ01-02 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3207,'EPSG',3207,'PROJCS["WGS 84 / SCAR IMW SQ01-02",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-64.66666666666667],PARAMETER["standard_parallel_2",-67.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-174],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3207"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-64.66666666666667 +lat_2=-67.33333333333333 +lat_0=-90 +lon_0=-174 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3207,'EPSG',3207,'PROJCS["WGS 84 / SCAR IMW SQ01-02",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-64.66666666666667],PARAMETER["standard_parallel_2",-67.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-174],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3207"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-64.66666666666667 +lat_2=-67.33333333333333 +lat_0=-90 +lon_0=-174 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3208 : WGS 84 / SCAR IMW SQ19-20 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3208,'EPSG',3208,'PROJCS["WGS 84 / SCAR IMW SQ19-20",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-64.66666666666667],PARAMETER["standard_parallel_2",-67.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-66],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3208"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-64.66666666666667 +lat_2=-67.33333333333333 +lat_0=-90 +lon_0=-66 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3208,'EPSG',3208,'PROJCS["WGS 84 / SCAR IMW SQ19-20",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-64.66666666666667],PARAMETER["standard_parallel_2",-67.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-66],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3208"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-64.66666666666667 +lat_2=-67.33333333333333 +lat_0=-90 +lon_0=-66 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3209 : WGS 84 / SCAR IMW SQ21-22 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3209,'EPSG',3209,'PROJCS["WGS 84 / SCAR IMW SQ21-22",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-64.66666666666667],PARAMETER["standard_parallel_2",-67.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-54],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3209"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-64.66666666666667 +lat_2=-67.33333333333333 +lat_0=-90 +lon_0=-54 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3209,'EPSG',3209,'PROJCS["WGS 84 / SCAR IMW SQ21-22",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-64.66666666666667],PARAMETER["standard_parallel_2",-67.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-54],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3209"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-64.66666666666667 +lat_2=-67.33333333333333 +lat_0=-90 +lon_0=-54 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3210 : WGS 84 / SCAR IMW SQ37-38 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3210,'EPSG',3210,'PROJCS["WGS 84 / SCAR IMW SQ37-38",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-64.66666666666667],PARAMETER["standard_parallel_2",-67.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",42],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3210"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-64.66666666666667 +lat_2=-67.33333333333333 +lat_0=-90 +lon_0=42 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3210,'EPSG',3210,'PROJCS["WGS 84 / SCAR IMW SQ37-38",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-64.66666666666667],PARAMETER["standard_parallel_2",-67.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",42],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3210"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-64.66666666666667 +lat_2=-67.33333333333333 +lat_0=-90 +lon_0=42 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3211 : WGS 84 / SCAR IMW SQ39-40 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3211,'EPSG',3211,'PROJCS["WGS 84 / SCAR IMW SQ39-40",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-64.66666666666667],PARAMETER["standard_parallel_2",-67.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",54],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3211"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-64.66666666666667 +lat_2=-67.33333333333333 +lat_0=-90 +lon_0=54 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3211,'EPSG',3211,'PROJCS["WGS 84 / SCAR IMW SQ39-40",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-64.66666666666667],PARAMETER["standard_parallel_2",-67.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",54],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3211"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-64.66666666666667 +lat_2=-67.33333333333333 +lat_0=-90 +lon_0=54 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3212 : WGS 84 / SCAR IMW SQ41-42 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3212,'EPSG',3212,'PROJCS["WGS 84 / SCAR IMW SQ41-42",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-64.66666666666667],PARAMETER["standard_parallel_2",-67.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",66],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3212"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-64.66666666666667 +lat_2=-67.33333333333333 +lat_0=-90 +lon_0=66 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3212,'EPSG',3212,'PROJCS["WGS 84 / SCAR IMW SQ41-42",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-64.66666666666667],PARAMETER["standard_parallel_2",-67.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",66],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3212"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-64.66666666666667 +lat_2=-67.33333333333333 +lat_0=-90 +lon_0=66 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3213 : WGS 84 / SCAR IMW SQ43-44 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3213,'EPSG',3213,'PROJCS["WGS 84 / SCAR IMW SQ43-44",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-64.66666666666667],PARAMETER["standard_parallel_2",-67.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",78],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3213"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-64.66666666666667 +lat_2=-67.33333333333333 +lat_0=-90 +lon_0=78 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3213,'EPSG',3213,'PROJCS["WGS 84 / SCAR IMW SQ43-44",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-64.66666666666667],PARAMETER["standard_parallel_2",-67.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",78],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3213"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-64.66666666666667 +lat_2=-67.33333333333333 +lat_0=-90 +lon_0=78 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3214 : WGS 84 / SCAR IMW SQ45-46 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3214,'EPSG',3214,'PROJCS["WGS 84 / SCAR IMW SQ45-46",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-64.66666666666667],PARAMETER["standard_parallel_2",-67.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",90],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3214"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-64.66666666666667 +lat_2=-67.33333333333333 +lat_0=-90 +lon_0=90 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3214,'EPSG',3214,'PROJCS["WGS 84 / SCAR IMW SQ45-46",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-64.66666666666667],PARAMETER["standard_parallel_2",-67.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",90],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3214"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-64.66666666666667 +lat_2=-67.33333333333333 +lat_0=-90 +lon_0=90 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3215 : WGS 84 / SCAR IMW SQ47-48 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3215,'EPSG',3215,'PROJCS["WGS 84 / SCAR IMW SQ47-48",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-64.66666666666667],PARAMETER["standard_parallel_2",-67.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",102],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3215"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-64.66666666666667 +lat_2=-67.33333333333333 +lat_0=-90 +lon_0=102 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3215,'EPSG',3215,'PROJCS["WGS 84 / SCAR IMW SQ47-48",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-64.66666666666667],PARAMETER["standard_parallel_2",-67.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",102],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3215"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-64.66666666666667 +lat_2=-67.33333333333333 +lat_0=-90 +lon_0=102 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3216 : WGS 84 / SCAR IMW SQ49-50 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3216,'EPSG',3216,'PROJCS["WGS 84 / SCAR IMW SQ49-50",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-64.66666666666667],PARAMETER["standard_parallel_2",-67.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",114],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3216"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-64.66666666666667 +lat_2=-67.33333333333333 +lat_0=-90 +lon_0=114 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3216,'EPSG',3216,'PROJCS["WGS 84 / SCAR IMW SQ49-50",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-64.66666666666667],PARAMETER["standard_parallel_2",-67.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",114],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3216"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-64.66666666666667 +lat_2=-67.33333333333333 +lat_0=-90 +lon_0=114 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3217 : WGS 84 / SCAR IMW SQ51-52 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3217,'EPSG',3217,'PROJCS["WGS 84 / SCAR IMW SQ51-52",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-64.66666666666667],PARAMETER["standard_parallel_2",-67.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",126],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3217"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-64.66666666666667 +lat_2=-67.33333333333333 +lat_0=-90 +lon_0=126 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3217,'EPSG',3217,'PROJCS["WGS 84 / SCAR IMW SQ51-52",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-64.66666666666667],PARAMETER["standard_parallel_2",-67.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",126],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3217"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-64.66666666666667 +lat_2=-67.33333333333333 +lat_0=-90 +lon_0=126 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3218 : WGS 84 / SCAR IMW SQ53-54 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3218,'EPSG',3218,'PROJCS["WGS 84 / SCAR IMW SQ53-54",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-64.66666666666667],PARAMETER["standard_parallel_2",-67.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",138],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3218"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-64.66666666666667 +lat_2=-67.33333333333333 +lat_0=-90 +lon_0=138 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3218,'EPSG',3218,'PROJCS["WGS 84 / SCAR IMW SQ53-54",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-64.66666666666667],PARAMETER["standard_parallel_2",-67.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",138],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3218"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-64.66666666666667 +lat_2=-67.33333333333333 +lat_0=-90 +lon_0=138 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3219 : WGS 84 / SCAR IMW SQ55-56 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3219,'EPSG',3219,'PROJCS["WGS 84 / SCAR IMW SQ55-56",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-64.66666666666667],PARAMETER["standard_parallel_2",-67.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",150],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3219"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-64.66666666666667 +lat_2=-67.33333333333333 +lat_0=-90 +lon_0=150 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3219,'EPSG',3219,'PROJCS["WGS 84 / SCAR IMW SQ55-56",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-64.66666666666667],PARAMETER["standard_parallel_2",-67.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",150],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3219"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-64.66666666666667 +lat_2=-67.33333333333333 +lat_0=-90 +lon_0=150 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3220 : WGS 84 / SCAR IMW SQ57-58 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3220,'EPSG',3220,'PROJCS["WGS 84 / SCAR IMW SQ57-58",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-64.66666666666667],PARAMETER["standard_parallel_2",-67.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",162],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3220"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-64.66666666666667 +lat_2=-67.33333333333333 +lat_0=-90 +lon_0=162 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3220,'EPSG',3220,'PROJCS["WGS 84 / SCAR IMW SQ57-58",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-64.66666666666667],PARAMETER["standard_parallel_2",-67.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",162],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3220"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-64.66666666666667 +lat_2=-67.33333333333333 +lat_0=-90 +lon_0=162 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3221 : WGS 84 / SCAR IMW SR13-14 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3221,'EPSG',3221,'PROJCS["WGS 84 / SCAR IMW SR13-14",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.66666666666667],PARAMETER["standard_parallel_2",-71.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-102],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3221"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=-102 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3221,'EPSG',3221,'PROJCS["WGS 84 / SCAR IMW SR13-14",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.66666666666667],PARAMETER["standard_parallel_2",-71.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-102],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3221"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=-102 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3222 : WGS 84 / SCAR IMW SR15-16 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3222,'EPSG',3222,'PROJCS["WGS 84 / SCAR IMW SR15-16",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.66666666666667],PARAMETER["standard_parallel_2",-71.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-90],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3222"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=-90 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3222,'EPSG',3222,'PROJCS["WGS 84 / SCAR IMW SR15-16",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.66666666666667],PARAMETER["standard_parallel_2",-71.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-90],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3222"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=-90 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3223 : WGS 84 / SCAR IMW SR17-18 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3223,'EPSG',3223,'PROJCS["WGS 84 / SCAR IMW SR17-18",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.66666666666667],PARAMETER["standard_parallel_2",-71.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-78],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3223"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=-78 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3223,'EPSG',3223,'PROJCS["WGS 84 / SCAR IMW SR17-18",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.66666666666667],PARAMETER["standard_parallel_2",-71.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-78],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3223"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=-78 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3224 : WGS 84 / SCAR IMW SR19-20 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3224,'EPSG',3224,'PROJCS["WGS 84 / SCAR IMW SR19-20",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.66666666666667],PARAMETER["standard_parallel_2",-71.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-66],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3224"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=-66 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3224,'EPSG',3224,'PROJCS["WGS 84 / SCAR IMW SR19-20",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.66666666666667],PARAMETER["standard_parallel_2",-71.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-66],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3224"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=-66 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3225 : WGS 84 / SCAR IMW SR27-28 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3225,'EPSG',3225,'PROJCS["WGS 84 / SCAR IMW SR27-28",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.66666666666667],PARAMETER["standard_parallel_2",-71.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-18],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3225"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=-18 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3225,'EPSG',3225,'PROJCS["WGS 84 / SCAR IMW SR27-28",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.66666666666667],PARAMETER["standard_parallel_2",-71.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-18],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3225"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=-18 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3226 : WGS 84 / SCAR IMW SR29-30 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3226,'EPSG',3226,'PROJCS["WGS 84 / SCAR IMW SR29-30",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.66666666666667],PARAMETER["standard_parallel_2",-71.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-6],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3226"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=-6 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3226,'EPSG',3226,'PROJCS["WGS 84 / SCAR IMW SR29-30",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.66666666666667],PARAMETER["standard_parallel_2",-71.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-6],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3226"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=-6 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3227 : WGS 84 / SCAR IMW SR31-32 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3227,'EPSG',3227,'PROJCS["WGS 84 / SCAR IMW SR31-32",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.66666666666667],PARAMETER["standard_parallel_2",-71.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",6],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3227"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=6 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3227,'EPSG',3227,'PROJCS["WGS 84 / SCAR IMW SR31-32",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.66666666666667],PARAMETER["standard_parallel_2",-71.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",6],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3227"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=6 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3228 : WGS 84 / SCAR IMW SR33-34 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3228,'EPSG',3228,'PROJCS["WGS 84 / SCAR IMW SR33-34",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.66666666666667],PARAMETER["standard_parallel_2",-71.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",18],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3228"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=18 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3228,'EPSG',3228,'PROJCS["WGS 84 / SCAR IMW SR33-34",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.66666666666667],PARAMETER["standard_parallel_2",-71.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",18],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3228"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=18 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3229 : WGS 84 / SCAR IMW SR35-36 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3229,'EPSG',3229,'PROJCS["WGS 84 / SCAR IMW SR35-36",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.66666666666667],PARAMETER["standard_parallel_2",-71.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",30],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3229"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=30 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3229,'EPSG',3229,'PROJCS["WGS 84 / SCAR IMW SR35-36",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.66666666666667],PARAMETER["standard_parallel_2",-71.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",30],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3229"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=30 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3230 : WGS 84 / SCAR IMW SR37-38 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3230,'EPSG',3230,'PROJCS["WGS 84 / SCAR IMW SR37-38",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.66666666666667],PARAMETER["standard_parallel_2",-71.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",42],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3230"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=42 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3230,'EPSG',3230,'PROJCS["WGS 84 / SCAR IMW SR37-38",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.66666666666667],PARAMETER["standard_parallel_2",-71.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",42],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3230"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=42 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3231 : WGS 84 / SCAR IMW SR39-40 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3231,'EPSG',3231,'PROJCS["WGS 84 / SCAR IMW SR39-40",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.66666666666667],PARAMETER["standard_parallel_2",-71.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",54],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3231"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=54 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3231,'EPSG',3231,'PROJCS["WGS 84 / SCAR IMW SR39-40",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.66666666666667],PARAMETER["standard_parallel_2",-71.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",54],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3231"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=54 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3232 : WGS 84 / SCAR IMW SR41-42 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3232,'EPSG',3232,'PROJCS["WGS 84 / SCAR IMW SR41-42",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.66666666666667],PARAMETER["standard_parallel_2",-71.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",66],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3232"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=66 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3232,'EPSG',3232,'PROJCS["WGS 84 / SCAR IMW SR41-42",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.66666666666667],PARAMETER["standard_parallel_2",-71.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",66],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3232"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=66 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3233 : WGS 84 / SCAR IMW SR43-44 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3233,'EPSG',3233,'PROJCS["WGS 84 / SCAR IMW SR43-44",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.66666666666667],PARAMETER["standard_parallel_2",-71.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",78],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3233"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=78 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3233,'EPSG',3233,'PROJCS["WGS 84 / SCAR IMW SR43-44",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.66666666666667],PARAMETER["standard_parallel_2",-71.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",78],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3233"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=78 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3234 : WGS 84 / SCAR IMW SR45-46 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3234,'EPSG',3234,'PROJCS["WGS 84 / SCAR IMW SR45-46",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.66666666666667],PARAMETER["standard_parallel_2",-71.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",90],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3234"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=90 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3234,'EPSG',3234,'PROJCS["WGS 84 / SCAR IMW SR45-46",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.66666666666667],PARAMETER["standard_parallel_2",-71.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",90],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3234"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=90 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3235 : WGS 84 / SCAR IMW SR47-48 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3235,'EPSG',3235,'PROJCS["WGS 84 / SCAR IMW SR47-48",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.66666666666667],PARAMETER["standard_parallel_2",-71.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",102],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3235"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=102 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3235,'EPSG',3235,'PROJCS["WGS 84 / SCAR IMW SR47-48",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.66666666666667],PARAMETER["standard_parallel_2",-71.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",102],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3235"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=102 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3236 : WGS 84 / SCAR IMW SR49-50 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3236,'EPSG',3236,'PROJCS["WGS 84 / SCAR IMW SR49-50",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.66666666666667],PARAMETER["standard_parallel_2",-71.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",114],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3236"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=114 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3236,'EPSG',3236,'PROJCS["WGS 84 / SCAR IMW SR49-50",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.66666666666667],PARAMETER["standard_parallel_2",-71.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",114],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3236"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=114 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3237 : WGS 84 / SCAR IMW SR51-52 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3237,'EPSG',3237,'PROJCS["WGS 84 / SCAR IMW SR51-52",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.66666666666667],PARAMETER["standard_parallel_2",-71.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",126],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3237"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=126 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3237,'EPSG',3237,'PROJCS["WGS 84 / SCAR IMW SR51-52",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.66666666666667],PARAMETER["standard_parallel_2",-71.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",126],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3237"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=126 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3238 : WGS 84 / SCAR IMW SR53-54 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3238,'EPSG',3238,'PROJCS["WGS 84 / SCAR IMW SR53-54",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.66666666666667],PARAMETER["standard_parallel_2",-71.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",138],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3238"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=138 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3238,'EPSG',3238,'PROJCS["WGS 84 / SCAR IMW SR53-54",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.66666666666667],PARAMETER["standard_parallel_2",-71.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",138],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3238"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=138 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3239 : WGS 84 / SCAR IMW SR55-56 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3239,'EPSG',3239,'PROJCS["WGS 84 / SCAR IMW SR55-56",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.66666666666667],PARAMETER["standard_parallel_2",-71.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",150],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3239"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=150 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3239,'EPSG',3239,'PROJCS["WGS 84 / SCAR IMW SR55-56",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.66666666666667],PARAMETER["standard_parallel_2",-71.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",150],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3239"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=150 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3240 : WGS 84 / SCAR IMW SR57-58 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3240,'EPSG',3240,'PROJCS["WGS 84 / SCAR IMW SR57-58",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.66666666666667],PARAMETER["standard_parallel_2",-71.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",162],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3240"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=162 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3240,'EPSG',3240,'PROJCS["WGS 84 / SCAR IMW SR57-58",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.66666666666667],PARAMETER["standard_parallel_2",-71.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",162],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3240"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=162 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3241 : WGS 84 / SCAR IMW SR59-60 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3241,'EPSG',3241,'PROJCS["WGS 84 / SCAR IMW SR59-60",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.66666666666667],PARAMETER["standard_parallel_2",-71.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",174],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3241"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=174 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3241,'EPSG',3241,'PROJCS["WGS 84 / SCAR IMW SR59-60",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-68.66666666666667],PARAMETER["standard_parallel_2",-71.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",174],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3241"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-68.66666666666667 +lat_2=-71.33333333333333 +lat_0=-90 +lon_0=174 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3242 : WGS 84 / SCAR IMW SS04-06 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3242,'EPSG',3242,'PROJCS["WGS 84 / SCAR IMW SS04-06",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-72.66666666666667],PARAMETER["standard_parallel_2",-75.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-153],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3242"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=-153 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3242,'EPSG',3242,'PROJCS["WGS 84 / SCAR IMW SS04-06",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-72.66666666666667],PARAMETER["standard_parallel_2",-75.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-153],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3242"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=-153 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3243 : WGS 84 / SCAR IMW SS07-09 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3243,'EPSG',3243,'PROJCS["WGS 84 / SCAR IMW SS07-09",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-72.66666666666667],PARAMETER["standard_parallel_2",-75.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-135],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3243"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=-135 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3243,'EPSG',3243,'PROJCS["WGS 84 / SCAR IMW SS07-09",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-72.66666666666667],PARAMETER["standard_parallel_2",-75.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-135],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3243"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=-135 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3244 : WGS 84 / SCAR IMW SS10-12 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3244,'EPSG',3244,'PROJCS["WGS 84 / SCAR IMW SS10-12",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-72.66666666666667],PARAMETER["standard_parallel_2",-75.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-117],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3244"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=-117 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3244,'EPSG',3244,'PROJCS["WGS 84 / SCAR IMW SS10-12",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-72.66666666666667],PARAMETER["standard_parallel_2",-75.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-117],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3244"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=-117 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3245 : WGS 84 / SCAR IMW SS13-15 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3245,'EPSG',3245,'PROJCS["WGS 84 / SCAR IMW SS13-15",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-72.66666666666667],PARAMETER["standard_parallel_2",-75.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-99],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3245"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=-99 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3245,'EPSG',3245,'PROJCS["WGS 84 / SCAR IMW SS13-15",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-72.66666666666667],PARAMETER["standard_parallel_2",-75.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-99],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3245"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=-99 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3246 : WGS 84 / SCAR IMW SS16-18 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3246,'EPSG',3246,'PROJCS["WGS 84 / SCAR IMW SS16-18",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-72.66666666666667],PARAMETER["standard_parallel_2",-75.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-81],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3246"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=-81 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3246,'EPSG',3246,'PROJCS["WGS 84 / SCAR IMW SS16-18",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-72.66666666666667],PARAMETER["standard_parallel_2",-75.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-81],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3246"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=-81 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3247 : WGS 84 / SCAR IMW SS19-21 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3247,'EPSG',3247,'PROJCS["WGS 84 / SCAR IMW SS19-21",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-72.66666666666667],PARAMETER["standard_parallel_2",-75.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-63],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3247"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=-63 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3247,'EPSG',3247,'PROJCS["WGS 84 / SCAR IMW SS19-21",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-72.66666666666667],PARAMETER["standard_parallel_2",-75.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-63],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3247"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=-63 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3248 : WGS 84 / SCAR IMW SS25-27 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3248,'EPSG',3248,'PROJCS["WGS 84 / SCAR IMW SS25-27",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-72.66666666666667],PARAMETER["standard_parallel_2",-75.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-27],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3248"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=-27 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3248,'EPSG',3248,'PROJCS["WGS 84 / SCAR IMW SS25-27",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-72.66666666666667],PARAMETER["standard_parallel_2",-75.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-27],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3248"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=-27 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3249 : WGS 84 / SCAR IMW SS28-30 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3249,'EPSG',3249,'PROJCS["WGS 84 / SCAR IMW SS28-30",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-72.66666666666667],PARAMETER["standard_parallel_2",-75.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-9],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3249"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=-9 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3249,'EPSG',3249,'PROJCS["WGS 84 / SCAR IMW SS28-30",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-72.66666666666667],PARAMETER["standard_parallel_2",-75.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-9],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3249"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=-9 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3250 : WGS 84 / SCAR IMW SS31-33 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3250,'EPSG',3250,'PROJCS["WGS 84 / SCAR IMW SS31-33",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-72.66666666666667],PARAMETER["standard_parallel_2",-75.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",9],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3250"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=9 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3250,'EPSG',3250,'PROJCS["WGS 84 / SCAR IMW SS31-33",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-72.66666666666667],PARAMETER["standard_parallel_2",-75.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",9],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3250"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=9 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3251 : WGS 84 / SCAR IMW SS34-36 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3251,'EPSG',3251,'PROJCS["WGS 84 / SCAR IMW SS34-36",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-72.66666666666667],PARAMETER["standard_parallel_2",-75.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",27],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3251"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=27 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3251,'EPSG',3251,'PROJCS["WGS 84 / SCAR IMW SS34-36",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-72.66666666666667],PARAMETER["standard_parallel_2",-75.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",27],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3251"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=27 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3252 : WGS 84 / SCAR IMW SS37-39 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3252,'EPSG',3252,'PROJCS["WGS 84 / SCAR IMW SS37-39",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-72.66666666666667],PARAMETER["standard_parallel_2",-75.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",45],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3252"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=45 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3252,'EPSG',3252,'PROJCS["WGS 84 / SCAR IMW SS37-39",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-72.66666666666667],PARAMETER["standard_parallel_2",-75.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",45],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3252"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=45 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3253 : WGS 84 / SCAR IMW SS40-42 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3253,'EPSG',3253,'PROJCS["WGS 84 / SCAR IMW SS40-42",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-72.66666666666667],PARAMETER["standard_parallel_2",-75.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",63],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3253"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=63 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3253,'EPSG',3253,'PROJCS["WGS 84 / SCAR IMW SS40-42",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-72.66666666666667],PARAMETER["standard_parallel_2",-75.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",63],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3253"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=63 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3254 : WGS 84 / SCAR IMW SS43-45 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3254,'EPSG',3254,'PROJCS["WGS 84 / SCAR IMW SS43-45",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-72.66666666666667],PARAMETER["standard_parallel_2",-75.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",81],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3254"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=81 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3254,'EPSG',3254,'PROJCS["WGS 84 / SCAR IMW SS43-45",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-72.66666666666667],PARAMETER["standard_parallel_2",-75.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",81],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3254"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=81 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3255 : WGS 84 / SCAR IMW SS46-48 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3255,'EPSG',3255,'PROJCS["WGS 84 / SCAR IMW SS46-48",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-72.66666666666667],PARAMETER["standard_parallel_2",-75.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",99],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3255"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=99 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3255,'EPSG',3255,'PROJCS["WGS 84 / SCAR IMW SS46-48",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-72.66666666666667],PARAMETER["standard_parallel_2",-75.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",99],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3255"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=99 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3256 : WGS 84 / SCAR IMW SS49-51 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3256,'EPSG',3256,'PROJCS["WGS 84 / SCAR IMW SS49-51",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-72.66666666666667],PARAMETER["standard_parallel_2",-75.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",117],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3256"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=117 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3256,'EPSG',3256,'PROJCS["WGS 84 / SCAR IMW SS49-51",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-72.66666666666667],PARAMETER["standard_parallel_2",-75.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",117],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3256"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=117 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3257 : WGS 84 / SCAR IMW SS52-54 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3257,'EPSG',3257,'PROJCS["WGS 84 / SCAR IMW SS52-54",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-72.66666666666667],PARAMETER["standard_parallel_2",-75.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",135],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3257"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=135 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3257,'EPSG',3257,'PROJCS["WGS 84 / SCAR IMW SS52-54",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-72.66666666666667],PARAMETER["standard_parallel_2",-75.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",135],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3257"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=135 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3258 : WGS 84 / SCAR IMW SS55-57 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3258,'EPSG',3258,'PROJCS["WGS 84 / SCAR IMW SS55-57",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-72.66666666666667],PARAMETER["standard_parallel_2",-75.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",153],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3258"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=153 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3258,'EPSG',3258,'PROJCS["WGS 84 / SCAR IMW SS55-57",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-72.66666666666667],PARAMETER["standard_parallel_2",-75.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",153],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3258"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=153 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3259 : WGS 84 / SCAR IMW SS58-60 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3259,'EPSG',3259,'PROJCS["WGS 84 / SCAR IMW SS58-60",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-72.66666666666667],PARAMETER["standard_parallel_2",-75.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",171],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3259"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=171 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3259,'EPSG',3259,'PROJCS["WGS 84 / SCAR IMW SS58-60",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-72.66666666666667],PARAMETER["standard_parallel_2",-75.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",171],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3259"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-72.66666666666667 +lat_2=-75.33333333333333 +lat_0=-90 +lon_0=171 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3260 : WGS 84 / SCAR IMW ST01-04 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3260,'EPSG',3260,'PROJCS["WGS 84 / SCAR IMW ST01-04",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-76.66666666666667],PARAMETER["standard_parallel_2",-79.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-168],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3260"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=-168 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3260,'EPSG',3260,'PROJCS["WGS 84 / SCAR IMW ST01-04",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-76.66666666666667],PARAMETER["standard_parallel_2",-79.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-168],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3260"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=-168 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3261 : WGS 84 / SCAR IMW ST05-08 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3261,'EPSG',3261,'PROJCS["WGS 84 / SCAR IMW ST05-08",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-76.66666666666667],PARAMETER["standard_parallel_2",-79.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-144],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3261"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=-144 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3261,'EPSG',3261,'PROJCS["WGS 84 / SCAR IMW ST05-08",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-76.66666666666667],PARAMETER["standard_parallel_2",-79.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-144],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3261"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=-144 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3262 : WGS 84 / SCAR IMW ST09-12 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3262,'EPSG',3262,'PROJCS["WGS 84 / SCAR IMW ST09-12",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-76.66666666666667],PARAMETER["standard_parallel_2",-79.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-120],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3262"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=-120 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3262,'EPSG',3262,'PROJCS["WGS 84 / SCAR IMW ST09-12",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-76.66666666666667],PARAMETER["standard_parallel_2",-79.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-120],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3262"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=-120 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3263 : WGS 84 / SCAR IMW ST13-16 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3263,'EPSG',3263,'PROJCS["WGS 84 / SCAR IMW ST13-16",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-76.66666666666667],PARAMETER["standard_parallel_2",-79.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-96],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3263"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=-96 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3263,'EPSG',3263,'PROJCS["WGS 84 / SCAR IMW ST13-16",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-76.66666666666667],PARAMETER["standard_parallel_2",-79.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-96],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3263"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=-96 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3264 : WGS 84 / SCAR IMW ST17-20 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3264,'EPSG',3264,'PROJCS["WGS 84 / SCAR IMW ST17-20",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-76.66666666666667],PARAMETER["standard_parallel_2",-79.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-72],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3264"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=-72 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3264,'EPSG',3264,'PROJCS["WGS 84 / SCAR IMW ST17-20",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-76.66666666666667],PARAMETER["standard_parallel_2",-79.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-72],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3264"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=-72 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3265 : WGS 84 / SCAR IMW ST21-24 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3265,'EPSG',3265,'PROJCS["WGS 84 / SCAR IMW ST21-24",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-76.66666666666667],PARAMETER["standard_parallel_2",-79.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-48],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3265"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=-48 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3265,'EPSG',3265,'PROJCS["WGS 84 / SCAR IMW ST21-24",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-76.66666666666667],PARAMETER["standard_parallel_2",-79.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-48],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3265"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=-48 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3266 : WGS 84 / SCAR IMW ST25-28 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3266,'EPSG',3266,'PROJCS["WGS 84 / SCAR IMW ST25-28",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-76.66666666666667],PARAMETER["standard_parallel_2",-79.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-24],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3266"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=-24 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3266,'EPSG',3266,'PROJCS["WGS 84 / SCAR IMW ST25-28",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-76.66666666666667],PARAMETER["standard_parallel_2",-79.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-24],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3266"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=-24 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3267 : WGS 84 / SCAR IMW ST29-32 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3267,'EPSG',3267,'PROJCS["WGS 84 / SCAR IMW ST29-32",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-76.66666666666667],PARAMETER["standard_parallel_2",-79.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",0],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3267"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3267,'EPSG',3267,'PROJCS["WGS 84 / SCAR IMW ST29-32",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-76.66666666666667],PARAMETER["standard_parallel_2",-79.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",0],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3267"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3268 : WGS 84 / SCAR IMW ST33-36 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3268,'EPSG',3268,'PROJCS["WGS 84 / SCAR IMW ST33-36",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-76.66666666666667],PARAMETER["standard_parallel_2",-79.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",24],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3268"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=24 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3268,'EPSG',3268,'PROJCS["WGS 84 / SCAR IMW ST33-36",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-76.66666666666667],PARAMETER["standard_parallel_2",-79.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",24],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3268"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=24 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3269 : WGS 84 / SCAR IMW ST37-40 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3269,'EPSG',3269,'PROJCS["WGS 84 / SCAR IMW ST37-40",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-76.66666666666667],PARAMETER["standard_parallel_2",-79.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",48],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3269"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=48 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3269,'EPSG',3269,'PROJCS["WGS 84 / SCAR IMW ST37-40",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-76.66666666666667],PARAMETER["standard_parallel_2",-79.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",48],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3269"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=48 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3270 : WGS 84 / SCAR IMW ST41-44 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3270,'EPSG',3270,'PROJCS["WGS 84 / SCAR IMW ST41-44",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-76.66666666666667],PARAMETER["standard_parallel_2",-79.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",72],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3270"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=72 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3270,'EPSG',3270,'PROJCS["WGS 84 / SCAR IMW ST41-44",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-76.66666666666667],PARAMETER["standard_parallel_2",-79.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",72],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3270"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=72 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3271 : WGS 84 / SCAR IMW ST45-48 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3271,'EPSG',3271,'PROJCS["WGS 84 / SCAR IMW ST45-48",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-76.66666666666667],PARAMETER["standard_parallel_2",-79.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",96],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3271"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=96 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3271,'EPSG',3271,'PROJCS["WGS 84 / SCAR IMW ST45-48",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-76.66666666666667],PARAMETER["standard_parallel_2",-79.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",96],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3271"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=96 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3272 : WGS 84 / SCAR IMW ST49-52 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3272,'EPSG',3272,'PROJCS["WGS 84 / SCAR IMW ST49-52",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-76.66666666666667],PARAMETER["standard_parallel_2",-79.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",120],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3272"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=120 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3272,'EPSG',3272,'PROJCS["WGS 84 / SCAR IMW ST49-52",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-76.66666666666667],PARAMETER["standard_parallel_2",-79.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",120],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3272"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=120 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3273 : WGS 84 / SCAR IMW ST53-56 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3273,'EPSG',3273,'PROJCS["WGS 84 / SCAR IMW ST53-56",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-76.66666666666667],PARAMETER["standard_parallel_2",-79.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",144],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3273"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=144 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3273,'EPSG',3273,'PROJCS["WGS 84 / SCAR IMW ST53-56",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-76.66666666666667],PARAMETER["standard_parallel_2",-79.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",144],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3273"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=144 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3274 : WGS 84 / SCAR IMW ST57-60 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3274,'EPSG',3274,'PROJCS["WGS 84 / SCAR IMW ST57-60",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-76.66666666666667],PARAMETER["standard_parallel_2",-79.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",168],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3274"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=168 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3274,'EPSG',3274,'PROJCS["WGS 84 / SCAR IMW ST57-60",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-76.66666666666667],PARAMETER["standard_parallel_2",-79.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",168],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3274"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=168 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3275 : WGS 84 / SCAR IMW SU01-05 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3275,'EPSG',3275,'PROJCS["WGS 84 / SCAR IMW SU01-05",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-80.23861111111111],PARAMETER["central_meridian",-165],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3275"],AXIS["Easting",UNKNOWN],AXIS["Northing",UNKNOWN]]','+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=-165 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3275,'EPSG',3275,'PROJCS["WGS 84 / SCAR IMW SU01-05",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-80.23861111111111],PARAMETER["central_meridian",-165],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3275"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=-165 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3276 : WGS 84 / SCAR IMW SU06-10 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3276,'EPSG',3276,'PROJCS["WGS 84 / SCAR IMW SU06-10",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-80.23861111111111],PARAMETER["central_meridian",-135],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3276"],AXIS["Easting",UNKNOWN],AXIS["Northing",UNKNOWN]]','+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=-135 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3276,'EPSG',3276,'PROJCS["WGS 84 / SCAR IMW SU06-10",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-80.23861111111111],PARAMETER["central_meridian",-135],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3276"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=-135 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3277 : WGS 84 / SCAR IMW SU11-15 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3277,'EPSG',3277,'PROJCS["WGS 84 / SCAR IMW SU11-15",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-80.23861111111111],PARAMETER["central_meridian",-105],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3277"],AXIS["Easting",UNKNOWN],AXIS["Northing",UNKNOWN]]','+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=-105 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3277,'EPSG',3277,'PROJCS["WGS 84 / SCAR IMW SU11-15",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-80.23861111111111],PARAMETER["central_meridian",-105],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3277"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=-105 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3278 : WGS 84 / SCAR IMW SU16-20 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3278,'EPSG',3278,'PROJCS["WGS 84 / SCAR IMW SU16-20",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-80.23861111111111],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3278"],AXIS["Easting",UNKNOWN],AXIS["Northing",UNKNOWN]]','+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=-75 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3278,'EPSG',3278,'PROJCS["WGS 84 / SCAR IMW SU16-20",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-80.23861111111111],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3278"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=-75 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3279 : WGS 84 / SCAR IMW SU21-25 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3279,'EPSG',3279,'PROJCS["WGS 84 / SCAR IMW SU21-25",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-80.23861111111111],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3279"],AXIS["Easting",UNKNOWN],AXIS["Northing",UNKNOWN]]','+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=-45 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3279,'EPSG',3279,'PROJCS["WGS 84 / SCAR IMW SU21-25",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-80.23861111111111],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3279"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=-45 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3280 : WGS 84 / SCAR IMW SU26-30 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3280,'EPSG',3280,'PROJCS["WGS 84 / SCAR IMW SU26-30",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-80.23861111111111],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3280"],AXIS["Easting",UNKNOWN],AXIS["Northing",UNKNOWN]]','+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=-15 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3280,'EPSG',3280,'PROJCS["WGS 84 / SCAR IMW SU26-30",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-80.23861111111111],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3280"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=-15 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3281 : WGS 84 / SCAR IMW SU31-35 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3281,'EPSG',3281,'PROJCS["WGS 84 / SCAR IMW SU31-35",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-80.23861111111111],PARAMETER["central_meridian",15],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3281"],AXIS["Easting",UNKNOWN],AXIS["Northing",UNKNOWN]]','+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=15 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3281,'EPSG',3281,'PROJCS["WGS 84 / SCAR IMW SU31-35",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-80.23861111111111],PARAMETER["central_meridian",15],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3281"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=15 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3282 : WGS 84 / SCAR IMW SU36-40 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3282,'EPSG',3282,'PROJCS["WGS 84 / SCAR IMW SU36-40",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-80.23861111111111],PARAMETER["central_meridian",45],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3282"],AXIS["Easting",UNKNOWN],AXIS["Northing",UNKNOWN]]','+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=45 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3282,'EPSG',3282,'PROJCS["WGS 84 / SCAR IMW SU36-40",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-80.23861111111111],PARAMETER["central_meridian",45],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3282"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=45 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3283 : WGS 84 / SCAR IMW SU41-45 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3283,'EPSG',3283,'PROJCS["WGS 84 / SCAR IMW SU41-45",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-80.23861111111111],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3283"],AXIS["Easting",UNKNOWN],AXIS["Northing",UNKNOWN]]','+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=75 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3283,'EPSG',3283,'PROJCS["WGS 84 / SCAR IMW SU41-45",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-80.23861111111111],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3283"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=75 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3284 : WGS 84 / SCAR IMW SU46-50 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3284,'EPSG',3284,'PROJCS["WGS 84 / SCAR IMW SU46-50",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-80.23861111111111],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3284"],AXIS["Easting",UNKNOWN],AXIS["Northing",UNKNOWN]]','+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=105 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3284,'EPSG',3284,'PROJCS["WGS 84 / SCAR IMW SU46-50",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-80.23861111111111],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3284"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=105 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3285 : WGS 84 / SCAR IMW SU51-55 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3285,'EPSG',3285,'PROJCS["WGS 84 / SCAR IMW SU51-55",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-80.23861111111111],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3285"],AXIS["Easting",UNKNOWN],AXIS["Northing",UNKNOWN]]','+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=135 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3285,'EPSG',3285,'PROJCS["WGS 84 / SCAR IMW SU51-55",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-80.23861111111111],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3285"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=135 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3286 : WGS 84 / SCAR IMW SU56-60 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3286,'EPSG',3286,'PROJCS["WGS 84 / SCAR IMW SU56-60",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-80.23861111111111],PARAMETER["central_meridian",165],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3286"],AXIS["Easting",UNKNOWN],AXIS["Northing",UNKNOWN]]','+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=165 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3286,'EPSG',3286,'PROJCS["WGS 84 / SCAR IMW SU56-60",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-80.23861111111111],PARAMETER["central_meridian",165],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3286"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=165 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3287 : WGS 84 / SCAR IMW SV01-10 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3287,'EPSG',3287,'PROJCS["WGS 84 / SCAR IMW SV01-10",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-80.23861111111111],PARAMETER["central_meridian",-150],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3287"],AXIS["Easting",UNKNOWN],AXIS["Northing",UNKNOWN]]','+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=-150 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3287,'EPSG',3287,'PROJCS["WGS 84 / SCAR IMW SV01-10",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-80.23861111111111],PARAMETER["central_meridian",-150],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3287"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=-150 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3288 : WGS 84 / SCAR IMW SV11-20 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3288,'EPSG',3288,'PROJCS["WGS 84 / SCAR IMW SV11-20",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-80.23861111111111],PARAMETER["central_meridian",-90],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3288"],AXIS["Easting",UNKNOWN],AXIS["Northing",UNKNOWN]]','+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=-90 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3288,'EPSG',3288,'PROJCS["WGS 84 / SCAR IMW SV11-20",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-80.23861111111111],PARAMETER["central_meridian",-90],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3288"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=-90 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3289 : WGS 84 / SCAR IMW SV21-30 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3289,'EPSG',3289,'PROJCS["WGS 84 / SCAR IMW SV21-30",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-80.23861111111111],PARAMETER["central_meridian",-30],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3289"],AXIS["Easting",UNKNOWN],AXIS["Northing",UNKNOWN]]','+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=-30 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3289,'EPSG',3289,'PROJCS["WGS 84 / SCAR IMW SV21-30",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-80.23861111111111],PARAMETER["central_meridian",-30],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3289"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=-30 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3290 : WGS 84 / SCAR IMW SV31-40 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3290,'EPSG',3290,'PROJCS["WGS 84 / SCAR IMW SV31-40",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-80.23861111111111],PARAMETER["central_meridian",30],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3290"],AXIS["Easting",UNKNOWN],AXIS["Northing",UNKNOWN]]','+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=30 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3290,'EPSG',3290,'PROJCS["WGS 84 / SCAR IMW SV31-40",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-80.23861111111111],PARAMETER["central_meridian",30],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3290"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=30 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3291 : WGS 84 / SCAR IMW SV41-50 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3291,'EPSG',3291,'PROJCS["WGS 84 / SCAR IMW SV41-50",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-80.23861111111111],PARAMETER["central_meridian",90],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3291"],AXIS["Easting",UNKNOWN],AXIS["Northing",UNKNOWN]]','+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=90 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3291,'EPSG',3291,'PROJCS["WGS 84 / SCAR IMW SV41-50",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-80.23861111111111],PARAMETER["central_meridian",90],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3291"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=90 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3292 : WGS 84 / SCAR IMW SV51-60 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3292,'EPSG',3292,'PROJCS["WGS 84 / SCAR IMW SV51-60",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-80.23861111111111],PARAMETER["central_meridian",150],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3292"],AXIS["Easting",UNKNOWN],AXIS["Northing",UNKNOWN]]','+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=150 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3292,'EPSG',3292,'PROJCS["WGS 84 / SCAR IMW SV51-60",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-80.23861111111111],PARAMETER["central_meridian",150],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3292"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=150 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3293 : WGS 84 / SCAR IMW SW01-60 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3293,'EPSG',3293,'PROJCS["WGS 84 / SCAR IMW SW01-60",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-80.23861111111111],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3293"],AXIS["Easting",UNKNOWN],AXIS["Northing",UNKNOWN]]','+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3293,'EPSG',3293,'PROJCS["WGS 84 / SCAR IMW SW01-60",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-80.23861111111111],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3293"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=stere +lat_0=-90 +lat_ts=-80.23861111111111 +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3294 : WGS 84 / USGS Transantarctic Mountains --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3294,'EPSG',3294,'PROJCS["WGS 84 / USGS Transantarctic Mountains",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-76.66666666666667],PARAMETER["standard_parallel_2",-79.33333333333333],PARAMETER["latitude_of_origin",-78],PARAMETER["central_meridian",162],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3294"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-78 +lon_0=162 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3294,'EPSG',3294,'PROJCS["WGS 84 / USGS Transantarctic Mountains",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-76.66666666666667],PARAMETER["standard_parallel_2",-79.33333333333333],PARAMETER["latitude_of_origin",-78],PARAMETER["central_meridian",162],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3294"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-78 +lon_0=162 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3295 : Guam 1963 / Yap Islands --- @@ -6866,451 +6998,451 @@ --- --- EPSG 3296 : RGPF / UTM zone 5S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3296,'EPSG',3296,'PROJCS["RGPF / UTM zone 5S",GEOGCS["RGPF",DATUM["Reseau_Geodesique_de_la_Polynesie_Francaise",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6687"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4687"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3296"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=5 +south +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3296,'EPSG',3296,'PROJCS["RGPF / UTM zone 5S",GEOGCS["RGPF",DATUM["Reseau_Geodesique_de_la_Polynesie_Francaise",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0.072,-0.507,-0.245,-0.0183,0.0003,-0.007,-0.0093],AUTHORITY["EPSG","6687"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4687"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3296"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=5 +south +ellps=GRS80 +towgs84=0.072,-0.507,-0.245,-0.0183,0.0003,-0.007,-0.0093 +units=m +no_defs '); --- --- EPSG 3297 : RGPF / UTM zone 6S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3297,'EPSG',3297,'PROJCS["RGPF / UTM zone 6S",GEOGCS["RGPF",DATUM["Reseau_Geodesique_de_la_Polynesie_Francaise",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6687"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4687"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3297"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=6 +south +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3297,'EPSG',3297,'PROJCS["RGPF / UTM zone 6S",GEOGCS["RGPF",DATUM["Reseau_Geodesique_de_la_Polynesie_Francaise",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0.072,-0.507,-0.245,-0.0183,0.0003,-0.007,-0.0093],AUTHORITY["EPSG","6687"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4687"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3297"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=6 +south +ellps=GRS80 +towgs84=0.072,-0.507,-0.245,-0.0183,0.0003,-0.007,-0.0093 +units=m +no_defs '); --- --- EPSG 3298 : RGPF / UTM zone 7S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3298,'EPSG',3298,'PROJCS["RGPF / UTM zone 7S",GEOGCS["RGPF",DATUM["Reseau_Geodesique_de_la_Polynesie_Francaise",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6687"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4687"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3298"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=7 +south +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3298,'EPSG',3298,'PROJCS["RGPF / UTM zone 7S",GEOGCS["RGPF",DATUM["Reseau_Geodesique_de_la_Polynesie_Francaise",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0.072,-0.507,-0.245,-0.0183,0.0003,-0.007,-0.0093],AUTHORITY["EPSG","6687"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4687"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3298"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=7 +south +ellps=GRS80 +towgs84=0.072,-0.507,-0.245,-0.0183,0.0003,-0.007,-0.0093 +units=m +no_defs '); --- --- EPSG 3299 : RGPF / UTM zone 8S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3299,'EPSG',3299,'PROJCS["RGPF / UTM zone 8S",GEOGCS["RGPF",DATUM["Reseau_Geodesique_de_la_Polynesie_Francaise",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6687"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4687"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3299"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=8 +south +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3299,'EPSG',3299,'PROJCS["RGPF / UTM zone 8S",GEOGCS["RGPF",DATUM["Reseau_Geodesique_de_la_Polynesie_Francaise",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0.072,-0.507,-0.245,-0.0183,0.0003,-0.007,-0.0093],AUTHORITY["EPSG","6687"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4687"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3299"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=8 +south +ellps=GRS80 +towgs84=0.072,-0.507,-0.245,-0.0183,0.0003,-0.007,-0.0093 +units=m +no_defs '); --- --- EPSG 3300 : Estonian Coordinate System of 1992 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3300,'EPSG',3300,'PROJCS["Estonian Coordinate System of 1992",GEOGCS["EST92",DATUM["Estonia_1992",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0.055,-0.541,-0.185,0.0183,-0.0003,-0.007,-0.014],AUTHORITY["EPSG","6133"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4133"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",59.33333333333334],PARAMETER["standard_parallel_2",58],PARAMETER["latitude_of_origin",57.51755393055556],PARAMETER["central_meridian",24],PARAMETER["false_easting",500000],PARAMETER["false_northing",6375000],AUTHORITY["EPSG","3300"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=lcc +lat_1=59.33333333333334 +lat_2=58 +lat_0=57.51755393055556 +lon_0=24 +x_0=500000 +y_0=6375000 +ellps=GRS80 +towgs84=0.055,-0.541,-0.185,0.0183,-0.0003,-0.007,-0.014 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3300,'EPSG',3300,'PROJCS["Estonian Coordinate System of 1992",GEOGCS["EST92",DATUM["Estonia_1992",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0.055,-0.541,-0.185,0.0183,-0.0003,-0.007,-0.014],AUTHORITY["EPSG","6133"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4133"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",59.33333333333334],PARAMETER["standard_parallel_2",58],PARAMETER["latitude_of_origin",57.51755393055556],PARAMETER["central_meridian",24],PARAMETER["false_easting",500000],PARAMETER["false_northing",6375000],AUTHORITY["EPSG","3300"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=lcc +lat_1=59.33333333333334 +lat_2=58 +lat_0=57.51755393055556 +lon_0=24 +x_0=500000 +y_0=6375000 +ellps=GRS80 +towgs84=0.055,-0.541,-0.185,0.0183,-0.0003,-0.007,-0.014 +units=m +no_defs '); --- --- EPSG 3301 : Estonian Coordinate System of 1997 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3301,'EPSG',3301,'PROJCS["Estonian Coordinate System of 1997",GEOGCS["EST97",DATUM["Estonia_1997",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6180"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4180"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",59.33333333333334],PARAMETER["standard_parallel_2",58],PARAMETER["latitude_of_origin",57.51755393055556],PARAMETER["central_meridian",24],PARAMETER["false_easting",500000],PARAMETER["false_northing",6375000],AUTHORITY["EPSG","3301"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=lcc +lat_1=59.33333333333334 +lat_2=58 +lat_0=57.51755393055556 +lon_0=24 +x_0=500000 +y_0=6375000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3301,'EPSG',3301,'PROJCS["Estonian Coordinate System of 1997",GEOGCS["EST97",DATUM["Estonia_1997",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6180"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4180"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",59.33333333333334],PARAMETER["standard_parallel_2",58],PARAMETER["latitude_of_origin",57.51755393055556],PARAMETER["central_meridian",24],PARAMETER["false_easting",500000],PARAMETER["false_northing",6375000],AUTHORITY["EPSG","3301"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=lcc +lat_1=59.33333333333334 +lat_2=58 +lat_0=57.51755393055556 +lon_0=24 +x_0=500000 +y_0=6375000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3302 : IGN63 Hiva Oa / UTM zone 7S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3302,'EPSG',3302,'PROJCS["IGN63 Hiva Oa / UTM zone 7S",GEOGCS["IGN63 Hiva Oa",DATUM["IGN63_Hiva_Oa",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6689"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4689"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3302"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=7 +south +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3302,'EPSG',3302,'PROJCS["IGN63 Hiva Oa / UTM zone 7S",GEOGCS["IGN63 Hiva Oa",DATUM["IGN63_Hiva_Oa",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[410.721,55.049,80.746,2.5779,2.3514,0.6664,17.3311],AUTHORITY["EPSG","6689"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4689"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3302"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=7 +south +ellps=intl +towgs84=410.721,55.049,80.746,2.5779,2.3514,0.6664,17.3311 +units=m +no_defs '); --- --- EPSG 3303 : Fatu Iva 72 / UTM zone 7S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3303,'EPSG',3303,'PROJCS["Fatu Iva 72 / UTM zone 7S",GEOGCS["Fatu Iva 72",DATUM["Fatu_Iva_72",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[347.103,1078.12,2623.92,-33.8875,70.6773,-9.3943,186.074],AUTHORITY["EPSG","6688"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4688"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3303"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=7 +south +ellps=intl +towgs84=347.103,1078.12,2623.92,-33.8875,70.6773,-9.3943,186.074 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3303,'EPSG',3303,'PROJCS["Fatu Iva 72 / UTM zone 7S",GEOGCS["Fatu Iva 72",DATUM["Fatu_Iva_72",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[347.103,1078.12,2623.92,-33.8875,70.6773,-9.3943,186.074],AUTHORITY["EPSG","6688"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4688"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3303"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=7 +south +ellps=intl +towgs84=347.103,1078.12,2623.92,-33.8875,70.6773,-9.3943,186.074 +units=m +no_defs '); --- --- EPSG 3304 : Tahiti 79 / UTM zone 6S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3304,'EPSG',3304,'PROJCS["Tahiti 79 / UTM zone 6S",GEOGCS["Tahiti 79",DATUM["Tahiti_79",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6690"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4690"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3304"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=6 +south +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3304,'EPSG',3304,'PROJCS["Tahiti 79 / UTM zone 6S",GEOGCS["Tahiti 79",DATUM["Tahiti_79",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6690"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4690"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3304"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=6 +south +ellps=intl +units=m +no_defs '); --- --- EPSG 3305 : Moorea 87 / UTM zone 6S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3305,'EPSG',3305,'PROJCS["Moorea 87 / UTM zone 6S",GEOGCS["Moorea 87",DATUM["Moorea_87",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[215.525,149.593,176.229,-3.2624,-1.692,-1.1571,10.4773],AUTHORITY["EPSG","6691"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4691"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3305"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=6 +south +ellps=intl +towgs84=215.525,149.593,176.229,-3.2624,-1.692,-1.1571,10.4773 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3305,'EPSG',3305,'PROJCS["Moorea 87 / UTM zone 6S",GEOGCS["Moorea 87",DATUM["Moorea_87",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[215.525,149.593,176.229,-3.2624,-1.692,-1.1571,10.4773],AUTHORITY["EPSG","6691"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4691"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3305"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=6 +south +ellps=intl +towgs84=215.525,149.593,176.229,-3.2624,-1.692,-1.1571,10.4773 +units=m +no_defs '); --- --- EPSG 3306 : Maupiti 83 / UTM zone 5S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3306,'EPSG',3306,'PROJCS["Maupiti 83 / UTM zone 5S",GEOGCS["Maupiti 83",DATUM["Maupiti_83",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[217.037,86.959,23.956,0,0,0,0],AUTHORITY["EPSG","6692"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4692"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3306"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=5 +south +ellps=intl +towgs84=217.037,86.959,23.956,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3306,'EPSG',3306,'PROJCS["Maupiti 83 / UTM zone 5S",GEOGCS["Maupiti 83",DATUM["Maupiti_83",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[217.037,86.959,23.956,0,0,0,0],AUTHORITY["EPSG","6692"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4692"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3306"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=5 +south +ellps=intl +towgs84=217.037,86.959,23.956,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3307 : Nakhl-e Ghanem / UTM zone 39N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3307,'EPSG',3307,'PROJCS["Nakhl-e Ghanem / UTM zone 39N",GEOGCS["Nakhl-e Ghanem",DATUM["Nakhl_e_Ghanem",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,-0.15,0.68,0,0,0,0],AUTHORITY["EPSG","6693"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4693"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3307"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=39 +ellps=WGS84 +towgs84=0,-0.15,0.68,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3307,'EPSG',3307,'PROJCS["Nakhl-e Ghanem / UTM zone 39N",GEOGCS["Nakhl-e Ghanem",DATUM["Nakhl_e_Ghanem",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,-0.15,0.68,0,0,0,0],AUTHORITY["EPSG","6693"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4693"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3307"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=39 +ellps=WGS84 +towgs84=0,-0.15,0.68,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3308 : GDA94 / NSW Lambert --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3308,'EPSG',3308,'PROJCS["GDA94 / NSW Lambert",GEOGCS["GDA94",DATUM["Geocentric_Datum_of_Australia_1994",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6283"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4283"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-30.75],PARAMETER["standard_parallel_2",-35.75],PARAMETER["latitude_of_origin",-33.25],PARAMETER["central_meridian",147],PARAMETER["false_easting",9300000],PARAMETER["false_northing",4500000],AUTHORITY["EPSG","3308"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-30.75 +lat_2=-35.75 +lat_0=-33.25 +lon_0=147 +x_0=9300000 +y_0=4500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3308,'EPSG',3308,'PROJCS["GDA94 / NSW Lambert",GEOGCS["GDA94",DATUM["Geocentric_Datum_of_Australia_1994",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6283"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4283"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-30.75],PARAMETER["standard_parallel_2",-35.75],PARAMETER["latitude_of_origin",-33.25],PARAMETER["central_meridian",147],PARAMETER["false_easting",9300000],PARAMETER["false_northing",4500000],AUTHORITY["EPSG","3308"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-30.75 +lat_2=-35.75 +lat_0=-33.25 +lon_0=147 +x_0=9300000 +y_0=4500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3309 : NAD27 / California Albers --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3309,'EPSG',3309,'PROJCS["NAD27 / California Albers",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",34],PARAMETER["standard_parallel_2",40.5],PARAMETER["latitude_of_center",0],PARAMETER["longitude_of_center",-120],PARAMETER["false_easting",0],PARAMETER["false_northing",-4000000],AUTHORITY["EPSG","3309"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=aea +lat_1=34 +lat_2=40.5 +lat_0=0 +lon_0=-120 +x_0=0 +y_0=-4000000 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3309,'EPSG',3309,'PROJCS["NAD27 / California Albers",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",34],PARAMETER["standard_parallel_2",40.5],PARAMETER["latitude_of_center",0],PARAMETER["longitude_of_center",-120],PARAMETER["false_easting",0],PARAMETER["false_northing",-4000000],AUTHORITY["EPSG","3309"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=aea +lat_1=34 +lat_2=40.5 +lat_0=0 +lon_0=-120 +x_0=0 +y_0=-4000000 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 3310 : NAD83 / California Albers --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3310,'EPSG',3310,'PROJCS["NAD83 / California Albers",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",34],PARAMETER["standard_parallel_2",40.5],PARAMETER["latitude_of_center",0],PARAMETER["longitude_of_center",-120],PARAMETER["false_easting",0],PARAMETER["false_northing",-4000000],AUTHORITY["EPSG","3310"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=aea +lat_1=34 +lat_2=40.5 +lat_0=0 +lon_0=-120 +x_0=0 +y_0=-4000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3310,'EPSG',3310,'PROJCS["NAD83 / California Albers",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",34],PARAMETER["standard_parallel_2",40.5],PARAMETER["latitude_of_center",0],PARAMETER["longitude_of_center",-120],PARAMETER["false_easting",0],PARAMETER["false_northing",-4000000],AUTHORITY["EPSG","3310"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=aea +lat_1=34 +lat_2=40.5 +lat_0=0 +lon_0=-120 +x_0=0 +y_0=-4000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3311 : NAD83(HARN) / California Albers --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3311,'EPSG',3311,'PROJCS["NAD83(HARN) / California Albers",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",34],PARAMETER["standard_parallel_2",40.5],PARAMETER["latitude_of_center",0],PARAMETER["longitude_of_center",-120],PARAMETER["false_easting",0],PARAMETER["false_northing",-4000000],AUTHORITY["EPSG","3311"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=aea +lat_1=34 +lat_2=40.5 +lat_0=0 +lon_0=-120 +x_0=0 +y_0=-4000000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3311,'EPSG',3311,'PROJCS["NAD83(HARN) / California Albers",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",34],PARAMETER["standard_parallel_2",40.5],PARAMETER["latitude_of_center",0],PARAMETER["longitude_of_center",-120],PARAMETER["false_easting",0],PARAMETER["false_northing",-4000000],AUTHORITY["EPSG","3311"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=aea +lat_1=34 +lat_2=40.5 +lat_0=0 +lon_0=-120 +x_0=0 +y_0=-4000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3312 : CSG67 / UTM zone 21N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3312,'EPSG',3312,'PROJCS["CSG67 / UTM zone 21N",GEOGCS["CSG67",DATUM["Centre_Spatial_Guyanais_1967",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-186,230,110,0,0,0,0],AUTHORITY["EPSG","6623"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4623"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3312"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +ellps=intl +towgs84=-186,230,110,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3312,'EPSG',3312,'PROJCS["CSG67 / UTM zone 21N",GEOGCS["CSG67",DATUM["Centre_Spatial_Guyanais_1967",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-186,230,110,0,0,0,0],AUTHORITY["EPSG","6623"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4623"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3312"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +ellps=intl +towgs84=-186,230,110,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3313 : RGFG95 / UTM zone 21N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3313,'EPSG',3313,'PROJCS["RGFG95 / UTM zone 21N",GEOGCS["RGFG95",DATUM["Reseau_Geodesique_Francais_Guyane_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[2,2,-2,0,0,0,0],AUTHORITY["EPSG","6624"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4624"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3313"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +ellps=GRS80 +towgs84=2,2,-2,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3313,'EPSG',3313,'PROJCS["RGFG95 / UTM zone 21N",GEOGCS["RGFG95",DATUM["Reseau_Geodesique_Francais_Guyane_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[2,2,-2,0,0,0,0],AUTHORITY["EPSG","6624"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4624"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3313"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +ellps=GRS80 +towgs84=2,2,-2,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3314 : Katanga 1955 / Katanga Lambert (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3314,'EPSG',3314,'PROJCS["Katanga 1955 / Katanga Lambert (deprecated)",GEOGCS["Katanga 1955",DATUM["Katanga_1955",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-103.746,-9.614,-255.95,0,0,0,0],AUTHORITY["EPSG","6695"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4695"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-6.5],PARAMETER["standard_parallel_2",-11.5],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",26],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3314"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-6.5 +lat_2=-11.5 +lat_0=0 +lon_0=26 +x_0=0 +y_0=0 +ellps=clrk66 +towgs84=-103.746,-9.614,-255.95,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3314,'EPSG',3314,'PROJCS["Katanga 1955 / Katanga Lambert (deprecated)",GEOGCS["Katanga 1955",DATUM["Katanga_1955",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-103.746,-9.614,-255.95,0,0,0,0],AUTHORITY["EPSG","6695"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4695"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-6.5],PARAMETER["standard_parallel_2",-11.5],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",26],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3314"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-6.5 +lat_2=-11.5 +lat_0=0 +lon_0=26 +x_0=0 +y_0=0 +ellps=clrk66 +towgs84=-103.746,-9.614,-255.95,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3315 : Katanga 1955 / Katanga TM (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3315,'EPSG',3315,'PROJCS["Katanga 1955 / Katanga TM (deprecated)",GEOGCS["Katanga 1955",DATUM["Katanga_1955",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-103.746,-9.614,-255.95,0,0,0,0],AUTHORITY["EPSG","6695"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4695"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-9],PARAMETER["central_meridian",26],PARAMETER["scale_factor",0.9998],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3315"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-9 +lon_0=26 +k=0.9998 +x_0=0 +y_0=0 +ellps=clrk66 +towgs84=-103.746,-9.614,-255.95,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3315,'EPSG',3315,'PROJCS["Katanga 1955 / Katanga TM (deprecated)",GEOGCS["Katanga 1955",DATUM["Katanga_1955",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-103.746,-9.614,-255.95,0,0,0,0],AUTHORITY["EPSG","6695"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4695"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-9],PARAMETER["central_meridian",26],PARAMETER["scale_factor",0.9998],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3315"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-9 +lon_0=26 +k=0.9998 +x_0=0 +y_0=0 +ellps=clrk66 +towgs84=-103.746,-9.614,-255.95,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3316 : Kasai 1953 / Congo TM zone 22 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3316,'EPSG',3316,'PROJCS["Kasai 1953 / Congo TM zone 22",GEOGCS["Kasai 1953",DATUM["Kasai_1953",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6696"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4696"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",22],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3316"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=22 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3316,'EPSG',3316,'PROJCS["Kasai 1953 / Congo TM zone 22",GEOGCS["Kasai 1953",DATUM["Kasai_1953",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6696"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4696"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",22],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3316"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=22 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs '); --- --- EPSG 3317 : Kasai 1953 / Congo TM zone 24 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3317,'EPSG',3317,'PROJCS["Kasai 1953 / Congo TM zone 24",GEOGCS["Kasai 1953",DATUM["Kasai_1953",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6696"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4696"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",24],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3317"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3317,'EPSG',3317,'PROJCS["Kasai 1953 / Congo TM zone 24",GEOGCS["Kasai 1953",DATUM["Kasai_1953",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6696"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4696"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",24],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3317"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs '); --- --- EPSG 3318 : IGC 1962 / Congo TM zone 12 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3318,'EPSG',3318,'PROJCS["IGC 1962 / Congo TM zone 12",GEOGCS["IGC 1962 6th Parallel South",DATUM["IGC_1962_Arc_of_the_6th_Parallel_South",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6697"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4697"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",12],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3318"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=12 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3318,'EPSG',3318,'PROJCS["IGC 1962 / Congo TM zone 12",GEOGCS["IGC 1962 6th Parallel South",DATUM["IGC_1962_Arc_of_the_6th_Parallel_South",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6697"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4697"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",12],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3318"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=12 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs '); --- --- EPSG 3319 : IGC 1962 / Congo TM zone 14 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3319,'EPSG',3319,'PROJCS["IGC 1962 / Congo TM zone 14",GEOGCS["IGC 1962 6th Parallel South",DATUM["IGC_1962_Arc_of_the_6th_Parallel_South",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6697"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4697"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",14],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3319"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=14 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3319,'EPSG',3319,'PROJCS["IGC 1962 / Congo TM zone 14",GEOGCS["IGC 1962 6th Parallel South",DATUM["IGC_1962_Arc_of_the_6th_Parallel_South",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6697"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4697"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",14],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3319"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=14 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs '); --- --- EPSG 3320 : IGC 1962 / Congo TM zone 16 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3320,'EPSG',3320,'PROJCS["IGC 1962 / Congo TM zone 16",GEOGCS["IGC 1962 6th Parallel South",DATUM["IGC_1962_Arc_of_the_6th_Parallel_South",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6697"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4697"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",16],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3320"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=16 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3320,'EPSG',3320,'PROJCS["IGC 1962 / Congo TM zone 16",GEOGCS["IGC 1962 6th Parallel South",DATUM["IGC_1962_Arc_of_the_6th_Parallel_South",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6697"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4697"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",16],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3320"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=16 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs '); --- --- EPSG 3321 : IGC 1962 / Congo TM zone 18 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3321,'EPSG',3321,'PROJCS["IGC 1962 / Congo TM zone 18",GEOGCS["IGC 1962 6th Parallel South",DATUM["IGC_1962_Arc_of_the_6th_Parallel_South",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6697"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4697"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3321"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=18 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3321,'EPSG',3321,'PROJCS["IGC 1962 / Congo TM zone 18",GEOGCS["IGC 1962 6th Parallel South",DATUM["IGC_1962_Arc_of_the_6th_Parallel_South",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6697"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4697"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3321"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=18 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs '); --- --- EPSG 3322 : IGC 1962 / Congo TM zone 20 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3322,'EPSG',3322,'PROJCS["IGC 1962 / Congo TM zone 20",GEOGCS["IGC 1962 6th Parallel South",DATUM["IGC_1962_Arc_of_the_6th_Parallel_South",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6697"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4697"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",20],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3322"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=20 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3322,'EPSG',3322,'PROJCS["IGC 1962 / Congo TM zone 20",GEOGCS["IGC 1962 6th Parallel South",DATUM["IGC_1962_Arc_of_the_6th_Parallel_South",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6697"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4697"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",20],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3322"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=20 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs '); --- --- EPSG 3323 : IGC 1962 / Congo TM zone 22 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3323,'EPSG',3323,'PROJCS["IGC 1962 / Congo TM zone 22",GEOGCS["IGC 1962 6th Parallel South",DATUM["IGC_1962_Arc_of_the_6th_Parallel_South",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6697"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4697"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",22],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3323"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=22 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3323,'EPSG',3323,'PROJCS["IGC 1962 / Congo TM zone 22",GEOGCS["IGC 1962 6th Parallel South",DATUM["IGC_1962_Arc_of_the_6th_Parallel_South",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6697"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4697"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",22],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3323"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=22 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs '); --- --- EPSG 3324 : IGC 1962 / Congo TM zone 24 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3324,'EPSG',3324,'PROJCS["IGC 1962 / Congo TM zone 24",GEOGCS["IGC 1962 6th Parallel South",DATUM["IGC_1962_Arc_of_the_6th_Parallel_South",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6697"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4697"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",24],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3324"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3324,'EPSG',3324,'PROJCS["IGC 1962 / Congo TM zone 24",GEOGCS["IGC 1962 6th Parallel South",DATUM["IGC_1962_Arc_of_the_6th_Parallel_South",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6697"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4697"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",24],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3324"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs '); --- --- EPSG 3325 : IGC 1962 / Congo TM zone 26 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3325,'EPSG',3325,'PROJCS["IGC 1962 / Congo TM zone 26",GEOGCS["IGC 1962 6th Parallel South",DATUM["IGC_1962_Arc_of_the_6th_Parallel_South",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6697"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4697"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",26],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3325"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=26 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3325,'EPSG',3325,'PROJCS["IGC 1962 / Congo TM zone 26",GEOGCS["IGC 1962 6th Parallel South",DATUM["IGC_1962_Arc_of_the_6th_Parallel_South",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6697"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4697"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",26],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3325"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=26 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs '); --- --- EPSG 3326 : IGC 1962 / Congo TM zone 28 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3326,'EPSG',3326,'PROJCS["IGC 1962 / Congo TM zone 28",GEOGCS["IGC 1962 6th Parallel South",DATUM["IGC_1962_Arc_of_the_6th_Parallel_South",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6697"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4697"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",28],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3326"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=28 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3326,'EPSG',3326,'PROJCS["IGC 1962 / Congo TM zone 28",GEOGCS["IGC 1962 6th Parallel South",DATUM["IGC_1962_Arc_of_the_6th_Parallel_South",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6697"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4697"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",28],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3326"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=28 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs '); --- --- EPSG 3327 : IGC 1962 / Congo TM zone 30 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3327,'EPSG',3327,'PROJCS["IGC 1962 / Congo TM zone 30",GEOGCS["IGC 1962 6th Parallel South",DATUM["IGC_1962_Arc_of_the_6th_Parallel_South",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6697"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4697"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",30],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3327"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=30 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3327,'EPSG',3327,'PROJCS["IGC 1962 / Congo TM zone 30",GEOGCS["IGC 1962 6th Parallel South",DATUM["IGC_1962_Arc_of_the_6th_Parallel_South",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6697"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4697"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",30],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3327"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=30 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs '); --- --- EPSG 3328 : Pulkovo 1942(58) / GUGiK-80 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3328,'EPSG',3328,'PROJCS["Pulkovo 1942(58) / GUGiK-80",GEOGCS["Pulkovo 1942(58)",DATUM["Pulkovo_1942_58",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6179"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4179"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",52.16666666666666],PARAMETER["central_meridian",19.16666666666667],PARAMETER["scale_factor",0.999714],PARAMETER["false_easting",500000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","3328"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=sterea +lat_0=52.16666666666666 +lon_0=19.16666666666667 +k=0.999714 +x_0=500000 +y_0=500000 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3328,'EPSG',3328,'PROJCS["Pulkovo 1942(58) / GUGiK-80",GEOGCS["Pulkovo 1942(58)",DATUM["Pulkovo_1942_58",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84],AUTHORITY["EPSG","6179"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4179"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",52.16666666666666],PARAMETER["central_meridian",19.16666666666667],PARAMETER["scale_factor",0.999714],PARAMETER["false_easting",500000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","3328"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=sterea +lat_0=52.16666666666666 +lon_0=19.16666666666667 +k=0.999714 +x_0=500000 +y_0=500000 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs '); --- --- EPSG 3329 : Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 5 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3329,'EPSG',3329,'PROJCS["Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 5",GEOGCS["Pulkovo 1942(58)",DATUM["Pulkovo_1942_58",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6179"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4179"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",1],PARAMETER["false_easting",5500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3329"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=5500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3329,'EPSG',3329,'PROJCS["Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 5",GEOGCS["Pulkovo 1942(58)",DATUM["Pulkovo_1942_58",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84],AUTHORITY["EPSG","6179"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4179"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",1],PARAMETER["false_easting",5500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3329"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=5500000 +y_0=0 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs '); --- --- EPSG 3330 : Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 6 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3330,'EPSG',3330,'PROJCS["Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 6",GEOGCS["Pulkovo 1942(58)",DATUM["Pulkovo_1942_58",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6179"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4179"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18],PARAMETER["scale_factor",1],PARAMETER["false_easting",6500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3330"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=6500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3330,'EPSG',3330,'PROJCS["Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 6",GEOGCS["Pulkovo 1942(58)",DATUM["Pulkovo_1942_58",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84],AUTHORITY["EPSG","6179"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4179"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18],PARAMETER["scale_factor",1],PARAMETER["false_easting",6500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3330"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=6500000 +y_0=0 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs '); --- --- EPSG 3331 : Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 7 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3331,'EPSG',3331,'PROJCS["Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 7",GEOGCS["Pulkovo 1942(58)",DATUM["Pulkovo_1942_58",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6179"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4179"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",7500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3331"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=7500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3331,'EPSG',3331,'PROJCS["Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 7",GEOGCS["Pulkovo 1942(58)",DATUM["Pulkovo_1942_58",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84],AUTHORITY["EPSG","6179"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4179"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",7500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3331"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=7500000 +y_0=0 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs '); --- --- EPSG 3332 : Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 8 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3332,'EPSG',3332,'PROJCS["Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 8",GEOGCS["Pulkovo 1942(58)",DATUM["Pulkovo_1942_58",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6179"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4179"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",24],PARAMETER["scale_factor",1],PARAMETER["false_easting",8500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3332"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=8500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3332,'EPSG',3332,'PROJCS["Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 8",GEOGCS["Pulkovo 1942(58)",DATUM["Pulkovo_1942_58",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84],AUTHORITY["EPSG","6179"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4179"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",24],PARAMETER["scale_factor",1],PARAMETER["false_easting",8500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3332"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=8500000 +y_0=0 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs '); --- --- EPSG 3333 : Pulkovo 1942(58) / Gauss-Kruger zone 3 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3333,'EPSG',3333,'PROJCS["Pulkovo 1942(58) / Gauss-Kruger zone 3",GEOGCS["Pulkovo 1942(58)",DATUM["Pulkovo_1942_58",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6179"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4179"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",1],PARAMETER["false_easting",3500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3333"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=3500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3333,'EPSG',3333,'PROJCS["Pulkovo 1942(58) / Gauss-Kruger zone 3",GEOGCS["Pulkovo 1942(58)",DATUM["Pulkovo_1942_58",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84],AUTHORITY["EPSG","6179"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4179"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",1],PARAMETER["false_easting",3500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3333"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=3500000 +y_0=0 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs '); --- --- EPSG 3334 : Pulkovo 1942(58) / Gauss-Kruger zone 4 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3334,'EPSG',3334,'PROJCS["Pulkovo 1942(58) / Gauss-Kruger zone 4",GEOGCS["Pulkovo 1942(58)",DATUM["Pulkovo_1942_58",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6179"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4179"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",4500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3334"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=4500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3334,'EPSG',3334,'PROJCS["Pulkovo 1942(58) / Gauss-Kruger zone 4",GEOGCS["Pulkovo 1942(58)",DATUM["Pulkovo_1942_58",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84],AUTHORITY["EPSG","6179"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4179"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",4500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3334"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=4500000 +y_0=0 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs '); --- --- EPSG 3335 : Pulkovo 1942(58) / Gauss-Kruger zone 5 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3335,'EPSG',3335,'PROJCS["Pulkovo 1942(58) / Gauss-Kruger zone 5",GEOGCS["Pulkovo 1942(58)",DATUM["Pulkovo_1942_58",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6179"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4179"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",1],PARAMETER["false_easting",5500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3335"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=5500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3335,'EPSG',3335,'PROJCS["Pulkovo 1942(58) / Gauss-Kruger zone 5",GEOGCS["Pulkovo 1942(58)",DATUM["Pulkovo_1942_58",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84],AUTHORITY["EPSG","6179"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4179"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",1],PARAMETER["false_easting",5500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3335"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=5500000 +y_0=0 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs '); --- --- EPSG 3336 : IGN 1962 Kerguelen / UTM zone 42S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3336,'EPSG',3336,'PROJCS["IGN 1962 Kerguelen / UTM zone 42S",GEOGCS["IGN 1962 Kerguelen",DATUM["IGN_1962_Kerguelen",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[145,-187,103,0,0,0,0],AUTHORITY["EPSG","6698"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4698"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3336"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=42 +south +ellps=intl +towgs84=145,-187,103,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3336,'EPSG',3336,'PROJCS["IGN 1962 Kerguelen / UTM zone 42S",GEOGCS["IGN 1962 Kerguelen",DATUM["IGN_1962_Kerguelen",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[145,-187,103,0,0,0,0],AUTHORITY["EPSG","6698"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4698"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3336"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=42 +south +ellps=intl +towgs84=145,-187,103,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3337 : Le Pouce 1934 / Mauritius Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3337,'EPSG',3337,'PROJCS["Le Pouce 1934 / Mauritius Grid",GEOGCS["Le Pouce 1934",DATUM["Le_Pouce_1934",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-770.1,158.4,-498.2,0,0,0,0],AUTHORITY["EPSG","6699"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4699"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",-20.19506944444445],PARAMETER["central_meridian",57.52182777777778],PARAMETER["scale_factor",1],PARAMETER["false_easting",1000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","3337"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-20.19506944444445 +lat_0=-20.19506944444445 +lon_0=57.52182777777778 +k_0=1 +x_0=1000000 +y_0=1000000 +ellps=clrk80 +towgs84=-770.1,158.4,-498.2,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3337,'EPSG',3337,'PROJCS["Le Pouce 1934 / Mauritius Grid",GEOGCS["Le Pouce 1934",DATUM["Le_Pouce_1934",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-770.1,158.4,-498.2,0,0,0,0],AUTHORITY["EPSG","6699"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4699"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",-20.19506944444445],PARAMETER["central_meridian",57.52182777777778],PARAMETER["scale_factor",1],PARAMETER["false_easting",1000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","3337"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-20.19506944444445 +lat_0=-20.19506944444445 +lon_0=57.52182777777778 +k_0=1 +x_0=1000000 +y_0=1000000 +ellps=clrk80 +towgs84=-770.1,158.4,-498.2,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3338 : NAD83 / Alaska Albers --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3338,'EPSG',3338,'PROJCS["NAD83 / Alaska Albers",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",55],PARAMETER["standard_parallel_2",65],PARAMETER["latitude_of_center",50],PARAMETER["longitude_of_center",-154],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3338"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=aea +lat_1=55 +lat_2=65 +lat_0=50 +lon_0=-154 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3338,'EPSG',3338,'PROJCS["NAD83 / Alaska Albers",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",55],PARAMETER["standard_parallel_2",65],PARAMETER["latitude_of_center",50],PARAMETER["longitude_of_center",-154],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3338"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=aea +lat_1=55 +lat_2=65 +lat_0=50 +lon_0=-154 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3339 : IGCB 1955 / Congo TM zone 12 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3339,'EPSG',3339,'PROJCS["IGCB 1955 / Congo TM zone 12",GEOGCS["IGCB 1955",DATUM["Institut_Geographique_du_Congo_Belge_1955",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-79.9,-158,-168.9,0,0,0,0],AUTHORITY["EPSG","6701"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4701"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",12],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3339"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=12 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +towgs84=-79.9,-158,-168.9,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3339,'EPSG',3339,'PROJCS["IGCB 1955 / Congo TM zone 12",GEOGCS["IGCB 1955",DATUM["Institut_Geographique_du_Congo_Belge_1955",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-79.9,-158,-168.9,0,0,0,0],AUTHORITY["EPSG","6701"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4701"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",12],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3339"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=12 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +towgs84=-79.9,-158,-168.9,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3340 : IGCB 1955 / Congo TM zone 14 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3340,'EPSG',3340,'PROJCS["IGCB 1955 / Congo TM zone 14",GEOGCS["IGCB 1955",DATUM["Institut_Geographique_du_Congo_Belge_1955",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-79.9,-158,-168.9,0,0,0,0],AUTHORITY["EPSG","6701"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4701"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",14],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3340"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=14 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +towgs84=-79.9,-158,-168.9,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3340,'EPSG',3340,'PROJCS["IGCB 1955 / Congo TM zone 14",GEOGCS["IGCB 1955",DATUM["Institut_Geographique_du_Congo_Belge_1955",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-79.9,-158,-168.9,0,0,0,0],AUTHORITY["EPSG","6701"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4701"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",14],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3340"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=14 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +towgs84=-79.9,-158,-168.9,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3341 : IGCB 1955 / Congo TM zone 16 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3341,'EPSG',3341,'PROJCS["IGCB 1955 / Congo TM zone 16",GEOGCS["IGCB 1955",DATUM["Institut_Geographique_du_Congo_Belge_1955",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-79.9,-158,-168.9,0,0,0,0],AUTHORITY["EPSG","6701"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4701"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",16],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3341"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=16 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +towgs84=-79.9,-158,-168.9,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3341,'EPSG',3341,'PROJCS["IGCB 1955 / Congo TM zone 16",GEOGCS["IGCB 1955",DATUM["Institut_Geographique_du_Congo_Belge_1955",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-79.9,-158,-168.9,0,0,0,0],AUTHORITY["EPSG","6701"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4701"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",16],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3341"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=16 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=clrk80 +towgs84=-79.9,-158,-168.9,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3342 : IGCB 1955 / UTM zone 33S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3342,'EPSG',3342,'PROJCS["IGCB 1955 / UTM zone 33S",GEOGCS["IGCB 1955",DATUM["Institut_Geographique_du_Congo_Belge_1955",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-79.9,-158,-168.9,0,0,0,0],AUTHORITY["EPSG","6701"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4701"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3342"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=33 +south +ellps=clrk80 +towgs84=-79.9,-158,-168.9,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3342,'EPSG',3342,'PROJCS["IGCB 1955 / UTM zone 33S",GEOGCS["IGCB 1955",DATUM["Institut_Geographique_du_Congo_Belge_1955",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-79.9,-158,-168.9,0,0,0,0],AUTHORITY["EPSG","6701"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4701"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3342"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=33 +south +ellps=clrk80 +towgs84=-79.9,-158,-168.9,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3343 : Mauritania 1999 / UTM zone 28N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3343,'EPSG',3343,'PROJCS["Mauritania 1999 / UTM zone 28N",GEOGCS["Mauritania 1999",DATUM["Mauritania_1999",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6702"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4702"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3343"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3343,'EPSG',3343,'PROJCS["Mauritania 1999 / UTM zone 28N",GEOGCS["Mauritania 1999",DATUM["Mauritania_1999",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6702"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4702"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3343"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3344 : Mauritania 1999 / UTM zone 29N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3344,'EPSG',3344,'PROJCS["Mauritania 1999 / UTM zone 29N",GEOGCS["Mauritania 1999",DATUM["Mauritania_1999",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6702"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4702"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3344"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3344,'EPSG',3344,'PROJCS["Mauritania 1999 / UTM zone 29N",GEOGCS["Mauritania 1999",DATUM["Mauritania_1999",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6702"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4702"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3344"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3345 : Mauritania 1999 / UTM zone 30N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3345,'EPSG',3345,'PROJCS["Mauritania 1999 / UTM zone 30N",GEOGCS["Mauritania 1999",DATUM["Mauritania_1999",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6702"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4702"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3345"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=30 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3345,'EPSG',3345,'PROJCS["Mauritania 1999 / UTM zone 30N",GEOGCS["Mauritania 1999",DATUM["Mauritania_1999",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6702"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4702"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3345"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=30 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3346 : LKS94 / Lithuania TM --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3346,'EPSG',3346,'PROJCS["LKS94 / Lithuania TM",GEOGCS["LKS94",DATUM["Lithuania_1994_ETRS89",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6126"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4669"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",24],PARAMETER["scale_factor",0.9998],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3346"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9998 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3346,'EPSG',3346,'PROJCS["LKS94 / Lithuania TM",GEOGCS["LKS94",DATUM["Lithuania_1994_ETRS89",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6126"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4669"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",24],PARAMETER["scale_factor",0.9998],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3346"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9998 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3347 : NAD83 / Statistics Canada Lambert --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3347,'EPSG',3347,'PROJCS["NAD83 / Statistics Canada Lambert",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",49],PARAMETER["standard_parallel_2",77],PARAMETER["latitude_of_origin",63.390675],PARAMETER["central_meridian",-91.86666666666666],PARAMETER["false_easting",6200000],PARAMETER["false_northing",3000000],AUTHORITY["EPSG","3347"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=49 +lat_2=77 +lat_0=63.390675 +lon_0=-91.86666666666666 +x_0=6200000 +y_0=3000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3347,'EPSG',3347,'PROJCS["NAD83 / Statistics Canada Lambert",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",49],PARAMETER["standard_parallel_2",77],PARAMETER["latitude_of_origin",63.390675],PARAMETER["central_meridian",-91.86666666666666],PARAMETER["false_easting",6200000],PARAMETER["false_northing",3000000],AUTHORITY["EPSG","3347"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=49 +lat_2=77 +lat_0=63.390675 +lon_0=-91.86666666666666 +x_0=6200000 +y_0=3000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3348 : NAD83(CSRS) / Statistics Canada Lambert --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3348,'EPSG',3348,'PROJCS["NAD83(CSRS) / Statistics Canada Lambert",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",49],PARAMETER["standard_parallel_2",77],PARAMETER["latitude_of_origin",63.390675],PARAMETER["central_meridian",-91.86666666666666],PARAMETER["false_easting",6200000],PARAMETER["false_northing",3000000],AUTHORITY["EPSG","3348"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=49 +lat_2=77 +lat_0=63.390675 +lon_0=-91.86666666666666 +x_0=6200000 +y_0=3000000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3348,'EPSG',3348,'PROJCS["NAD83(CSRS) / Statistics Canada Lambert",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",49],PARAMETER["standard_parallel_2",77],PARAMETER["latitude_of_origin",63.390675],PARAMETER["central_meridian",-91.86666666666666],PARAMETER["false_easting",6200000],PARAMETER["false_northing",3000000],AUTHORITY["EPSG","3348"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=49 +lat_2=77 +lat_0=63.390675 +lon_0=-91.86666666666666 +x_0=6200000 +y_0=3000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3349 : WGS 84 / PDC Mercator (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3349,'EPSG',3349,'PROJCS["WGS 84 / PDC Mercator (deprecated)",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",-150],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3349"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=merc +lon_0=-150 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3349,'EPSG',3349,'PROJCS["WGS 84 / PDC Mercator (deprecated)",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",-150],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3349"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=merc +lon_0=-150 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3350 : Pulkovo 1942 / CS63 zone C0 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3350,'EPSG',3350,'PROJCS["Pulkovo 1942 / CS63 zone C0",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0.1],PARAMETER["central_meridian",21.95],PARAMETER["scale_factor",1],PARAMETER["false_easting",250000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3350"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0.1 +lon_0=21.95 +k=1 +x_0=250000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3350,'EPSG',3350,'PROJCS["Pulkovo 1942 / CS63 zone C0",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0.1],PARAMETER["central_meridian",21.95],PARAMETER["scale_factor",1],PARAMETER["false_easting",250000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3350"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0.1 +lon_0=21.95 +k=1 +x_0=250000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 3351 : Pulkovo 1942 / CS63 zone C1 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3351,'EPSG',3351,'PROJCS["Pulkovo 1942 / CS63 zone C1",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0.1],PARAMETER["central_meridian",24.95],PARAMETER["scale_factor",1],PARAMETER["false_easting",1250000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3351"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0.1 +lon_0=24.95 +k=1 +x_0=1250000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3351,'EPSG',3351,'PROJCS["Pulkovo 1942 / CS63 zone C1",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0.1],PARAMETER["central_meridian",24.95],PARAMETER["scale_factor",1],PARAMETER["false_easting",1250000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3351"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0.1 +lon_0=24.95 +k=1 +x_0=1250000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 3352 : Pulkovo 1942 / CS63 zone C2 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3352,'EPSG',3352,'PROJCS["Pulkovo 1942 / CS63 zone C2",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0.1],PARAMETER["central_meridian",27.95],PARAMETER["scale_factor",1],PARAMETER["false_easting",2250000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3352"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0.1 +lon_0=27.95 +k=1 +x_0=2250000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3352,'EPSG',3352,'PROJCS["Pulkovo 1942 / CS63 zone C2",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0.1],PARAMETER["central_meridian",27.95],PARAMETER["scale_factor",1],PARAMETER["false_easting",2250000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3352"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0.1 +lon_0=27.95 +k=1 +x_0=2250000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 3353 : Mhast (onshore) / UTM zone 32S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3353,'EPSG',3353,'PROJCS["Mhast (onshore) / UTM zone 32S",GEOGCS["Mhast (onshore)",DATUM["Mhast_onshore",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6704"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4704"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3353"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +south +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3353,'EPSG',3353,'PROJCS["Mhast (onshore) / UTM zone 32S",GEOGCS["Mhast (onshore)",DATUM["Mhast_onshore",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6704"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4704"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3353"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +south +ellps=intl +units=m +no_defs '); --- --- EPSG 3354 : Mhast (offshore) / UTM zone 32S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3354,'EPSG',3354,'PROJCS["Mhast (offshore) / UTM zone 32S",GEOGCS["Mhast (offshore)",DATUM["Mhast_offshore",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6705"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4705"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3354"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +south +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3354,'EPSG',3354,'PROJCS["Mhast (offshore) / UTM zone 32S",GEOGCS["Mhast (offshore)",DATUM["Mhast_offshore",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6705"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4705"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3354"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +south +ellps=intl +units=m +no_defs '); --- --- EPSG 3355 : Egypt Gulf of Suez S-650 TL / Red Belt --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3355,'EPSG',3355,'PROJCS["Egypt Gulf of Suez S-650 TL / Red Belt",GEOGCS["Egypt Gulf of Suez S-650 TL",DATUM["Egypt_Gulf_of_Suez_S_650_TL",SPHEROID["Helmert 1906",6378200,298.3,AUTHORITY["EPSG","7020"]],TOWGS84[-146.21,112.63,4.05,0,0,0,0],AUTHORITY["EPSG","6706"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4706"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",31],PARAMETER["scale_factor",1],PARAMETER["false_easting",615000],PARAMETER["false_northing",810000],AUTHORITY["EPSG","3355"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=31 +k=1 +x_0=615000 +y_0=810000 +ellps=helmert +towgs84=-146.21,112.63,4.05,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3355,'EPSG',3355,'PROJCS["Egypt Gulf of Suez S-650 TL / Red Belt",GEOGCS["Egypt Gulf of Suez S-650 TL",DATUM["Egypt_Gulf_of_Suez_S_650_TL",SPHEROID["Helmert 1906",6378200,298.3,AUTHORITY["EPSG","7020"]],TOWGS84[-146.21,112.63,4.05,0,0,0,0],AUTHORITY["EPSG","6706"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4706"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",31],PARAMETER["scale_factor",1],PARAMETER["false_easting",615000],PARAMETER["false_northing",810000],AUTHORITY["EPSG","3355"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=31 +k=1 +x_0=615000 +y_0=810000 +ellps=helmert +towgs84=-146.21,112.63,4.05,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3356 : Grand Cayman 1959 / UTM zone 17N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3356,'EPSG',3356,'PROJCS["Grand Cayman 1959 / UTM zone 17N",GEOGCS["Grand Cayman 1959",DATUM["Grand_Cayman_1959",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[67.8,106.1,138.8,0,0,0,0],AUTHORITY["EPSG","6723"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4723"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3356"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +ellps=clrk66 +towgs84=67.8,106.1,138.8,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3356,'EPSG',3356,'PROJCS["Grand Cayman 1959 / UTM zone 17N",GEOGCS["Grand Cayman 1959",DATUM["Grand_Cayman_1959",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[67.8,106.1,138.8,0,0,0,0],AUTHORITY["EPSG","6723"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4723"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3356"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +ellps=clrk66 +towgs84=67.8,106.1,138.8,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3357 : Little Cayman 1961 / UTM zone 17N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3357,'EPSG',3357,'PROJCS["Little Cayman 1961 / UTM zone 17N",GEOGCS["Little Cayman 1961",DATUM["Little_Cayman_1961",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6726"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4726"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3357"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +ellps=clrk66 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3357,'EPSG',3357,'PROJCS["Little Cayman 1961 / UTM zone 17N",GEOGCS["Little Cayman 1961",DATUM["Little_Cayman_1961",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[42,124,147,0,0,0,0],AUTHORITY["EPSG","6726"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4726"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3357"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +ellps=clrk66 +towgs84=42,124,147,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3358 : NAD83(HARN) / North Carolina --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3358,'EPSG',3358,'PROJCS["NAD83(HARN) / North Carolina",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.16666666666666],PARAMETER["standard_parallel_2",34.33333333333334],PARAMETER["latitude_of_origin",33.75],PARAMETER["central_meridian",-79],PARAMETER["false_easting",609601.22],PARAMETER["false_northing",0],AUTHORITY["EPSG","3358"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3358,'EPSG',3358,'PROJCS["NAD83(HARN) / North Carolina",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.16666666666666],PARAMETER["standard_parallel_2",34.33333333333334],PARAMETER["latitude_of_origin",33.75],PARAMETER["central_meridian",-79],PARAMETER["false_easting",609601.22],PARAMETER["false_northing",0],AUTHORITY["EPSG","3358"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3359 : NAD83(HARN) / North Carolina (ftUS) (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3359,'EPSG',3359,'PROJCS["NAD83(HARN) / North Carolina (ftUS) (deprecated)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.16666666666666],PARAMETER["standard_parallel_2",34.33333333333334],PARAMETER["latitude_of_origin",33.75],PARAMETER["central_meridian",-79],PARAMETER["false_easting",2000004.000008],PARAMETER["false_northing",0],AUTHORITY["EPSG","3359"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.2192024385 +y_0=0 +ellps=GRS80 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3359,'EPSG',3359,'PROJCS["NAD83(HARN) / North Carolina (ftUS) (deprecated)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.16666666666666],PARAMETER["standard_parallel_2",34.33333333333334],PARAMETER["latitude_of_origin",33.75],PARAMETER["central_meridian",-79],PARAMETER["false_easting",2000004.000008],PARAMETER["false_northing",0],AUTHORITY["EPSG","3359"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.2192024385 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 3360 : NAD83(HARN) / South Carolina --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3360,'EPSG',3360,'PROJCS["NAD83(HARN) / South Carolina",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",34.83333333333334],PARAMETER["standard_parallel_2",32.5],PARAMETER["latitude_of_origin",31.83333333333333],PARAMETER["central_meridian",-81],PARAMETER["false_easting",609600],PARAMETER["false_northing",0],AUTHORITY["EPSG","3360"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=34.83333333333334 +lat_2=32.5 +lat_0=31.83333333333333 +lon_0=-81 +x_0=609600 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3360,'EPSG',3360,'PROJCS["NAD83(HARN) / South Carolina",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",34.83333333333334],PARAMETER["standard_parallel_2",32.5],PARAMETER["latitude_of_origin",31.83333333333333],PARAMETER["central_meridian",-81],PARAMETER["false_easting",609600],PARAMETER["false_northing",0],AUTHORITY["EPSG","3360"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=34.83333333333334 +lat_2=32.5 +lat_0=31.83333333333333 +lon_0=-81 +x_0=609600 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3361 : NAD83(HARN) / South Carolina (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3361,'EPSG',3361,'PROJCS["NAD83(HARN) / South Carolina (ft)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",34.83333333333334],PARAMETER["standard_parallel_2",32.5],PARAMETER["latitude_of_origin",31.83333333333333],PARAMETER["central_meridian",-81],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3361"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=34.83333333333334 +lat_2=32.5 +lat_0=31.83333333333333 +lon_0=-81 +x_0=609600 +y_0=0 +ellps=GRS80 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3361,'EPSG',3361,'PROJCS["NAD83(HARN) / South Carolina (ft)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",34.83333333333334],PARAMETER["standard_parallel_2",32.5],PARAMETER["latitude_of_origin",31.83333333333333],PARAMETER["central_meridian",-81],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3361"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=34.83333333333334 +lat_2=32.5 +lat_0=31.83333333333333 +lon_0=-81 +x_0=609600 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 3362 : NAD83(HARN) / Pennsylvania North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3362,'EPSG',3362,'PROJCS["NAD83(HARN) / Pennsylvania North",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.95],PARAMETER["standard_parallel_2",40.88333333333333],PARAMETER["latitude_of_origin",40.16666666666666],PARAMETER["central_meridian",-77.75],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3362"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.95 +lat_2=40.88333333333333 +lat_0=40.16666666666666 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3362,'EPSG',3362,'PROJCS["NAD83(HARN) / Pennsylvania North",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.95],PARAMETER["standard_parallel_2",40.88333333333333],PARAMETER["latitude_of_origin",40.16666666666666],PARAMETER["central_meridian",-77.75],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3362"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.95 +lat_2=40.88333333333333 +lat_0=40.16666666666666 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3363 : NAD83(HARN) / Pennsylvania North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3363,'EPSG',3363,'PROJCS["NAD83(HARN) / Pennsylvania North (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.95],PARAMETER["standard_parallel_2",40.88333333333333],PARAMETER["latitude_of_origin",40.16666666666666],PARAMETER["central_meridian",-77.75],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3363"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.95 +lat_2=40.88333333333333 +lat_0=40.16666666666666 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3363,'EPSG',3363,'PROJCS["NAD83(HARN) / Pennsylvania North (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.95],PARAMETER["standard_parallel_2",40.88333333333333],PARAMETER["latitude_of_origin",40.16666666666666],PARAMETER["central_meridian",-77.75],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3363"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.95 +lat_2=40.88333333333333 +lat_0=40.16666666666666 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3364 : NAD83(HARN) / Pennsylvania South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3364,'EPSG',3364,'PROJCS["NAD83(HARN) / Pennsylvania South",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.96666666666667],PARAMETER["standard_parallel_2",39.93333333333333],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-77.75],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3364"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.96666666666667 +lat_2=39.93333333333333 +lat_0=39.33333333333334 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3364,'EPSG',3364,'PROJCS["NAD83(HARN) / Pennsylvania South",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.96666666666667],PARAMETER["standard_parallel_2",39.93333333333333],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-77.75],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3364"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.96666666666667 +lat_2=39.93333333333333 +lat_0=39.33333333333334 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3365 : NAD83(HARN) / Pennsylvania South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3365,'EPSG',3365,'PROJCS["NAD83(HARN) / Pennsylvania South (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.96666666666667],PARAMETER["standard_parallel_2",39.93333333333333],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-77.75],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3365"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.96666666666667 +lat_2=39.93333333333333 +lat_0=39.33333333333334 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3365,'EPSG',3365,'PROJCS["NAD83(HARN) / Pennsylvania South (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.96666666666667],PARAMETER["standard_parallel_2",39.93333333333333],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-77.75],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3365"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.96666666666667 +lat_2=39.93333333333333 +lat_0=39.33333333333334 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3366 : Hong Kong 1963 Grid System (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3366,'EPSG',3366,'PROJCS["Hong Kong 1963 Grid System (deprecated)",GEOGCS["Hong Kong 1963",DATUM["Hong_Kong_1963",SPHEROID["Clarke 1858",6378293.645208759,294.2606763692569,AUTHORITY["EPSG","7007"]],AUTHORITY["EPSG","6738"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4738"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Cassini_Soldner"],PARAMETER["latitude_of_origin",22.31213333333334],PARAMETER["central_meridian",114.1785555555556],PARAMETER["false_easting",40243.57775604237],PARAMETER["false_northing",19069.93351512578],AUTHORITY["EPSG","3366"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=cass +lat_0=22.31213333333334 +lon_0=114.1785555555556 +x_0=40243.57775604237 +y_0=19069.93351512578 +a=6378293.645208759 +b=6356617.987679838 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3366,'EPSG',3366,'PROJCS["Hong Kong 1963 Grid System (deprecated)",GEOGCS["Hong Kong 1963",DATUM["Hong_Kong_1963",SPHEROID["Clarke 1858",6378293.645208759,294.2606763692569,AUTHORITY["EPSG","7007"]],AUTHORITY["EPSG","6738"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4738"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Cassini_Soldner"],PARAMETER["latitude_of_origin",22.31213333333334],PARAMETER["central_meridian",114.1785555555556],PARAMETER["false_easting",40243.57775604237],PARAMETER["false_northing",19069.93351512578],AUTHORITY["EPSG","3366"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=cass +lat_0=22.31213333333334 +lon_0=114.1785555555556 +x_0=40243.57775604237 +y_0=19069.93351512578 +a=6378293.645208759 +b=6356617.987679838 +units=m +no_defs '); --- --- EPSG 3367 : IGN Astro 1960 / UTM zone 28N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3367,'EPSG',3367,'PROJCS["IGN Astro 1960 / UTM zone 28N",GEOGCS["IGN Astro 1960",DATUM["IGN_Astro_1960",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6700"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4700"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3367"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3367,'EPSG',3367,'PROJCS["IGN Astro 1960 / UTM zone 28N",GEOGCS["IGN Astro 1960",DATUM["IGN_Astro_1960",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6700"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4700"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3367"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +ellps=clrk80 +units=m +no_defs '); --- --- EPSG 3368 : IGN Astro 1960 / UTM zone 29N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3368,'EPSG',3368,'PROJCS["IGN Astro 1960 / UTM zone 29N",GEOGCS["IGN Astro 1960",DATUM["IGN_Astro_1960",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6700"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4700"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3368"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3368,'EPSG',3368,'PROJCS["IGN Astro 1960 / UTM zone 29N",GEOGCS["IGN Astro 1960",DATUM["IGN_Astro_1960",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6700"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4700"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3368"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +ellps=clrk80 +units=m +no_defs '); --- --- EPSG 3369 : IGN Astro 1960 / UTM zone 30N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3369,'EPSG',3369,'PROJCS["IGN Astro 1960 / UTM zone 30N",GEOGCS["IGN Astro 1960",DATUM["IGN_Astro_1960",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6700"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4700"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3369"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=30 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3369,'EPSG',3369,'PROJCS["IGN Astro 1960 / UTM zone 30N",GEOGCS["IGN Astro 1960",DATUM["IGN_Astro_1960",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6700"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4700"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3369"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=30 +ellps=clrk80 +units=m +no_defs '); --- --- EPSG 3370 : NAD27 / UTM zone 59N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3370,'EPSG',3370,'PROJCS["NAD27 / UTM zone 59N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3370"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=59 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3370,'EPSG',3370,'PROJCS["NAD27 / UTM zone 59N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3370"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=59 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 3371 : NAD27 / UTM zone 60N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3371,'EPSG',3371,'PROJCS["NAD27 / UTM zone 60N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3371"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=60 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3371,'EPSG',3371,'PROJCS["NAD27 / UTM zone 60N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3371"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=60 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 3372 : NAD83 / UTM zone 59N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3372,'EPSG',3372,'PROJCS["NAD83 / UTM zone 59N",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3372"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=59 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3372,'EPSG',3372,'PROJCS["NAD83 / UTM zone 59N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3372"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=59 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3373 : NAD83 / UTM zone 60N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3373,'EPSG',3373,'PROJCS["NAD83 / UTM zone 60N",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3373"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=60 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3373,'EPSG',3373,'PROJCS["NAD83 / UTM zone 60N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3373"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=60 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3374 : FD54 / UTM zone 29N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3374,'EPSG',3374,'PROJCS["FD54 / UTM zone 29N",GEOGCS["FD54",DATUM["Faroe_Datum_1954",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6741"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4741"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3374"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3374,'EPSG',3374,'PROJCS["FD54 / UTM zone 29N",GEOGCS["FD54",DATUM["Faroe_Datum_1954",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6741"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4741"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3374"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +ellps=intl +units=m +no_defs '); --- --- EPSG 3375 : GDM2000 / Peninsula RSO --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3375,'EPSG',3375,'PROJCS["GDM2000 / Peninsula RSO",GEOGCS["GDM2000",DATUM["Geodetic_Datum_of_Malaysia_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6742"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4742"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",4],PARAMETER["longitude_of_center",102.25],PARAMETER["azimuth",323.0257964666666],PARAMETER["rectified_grid_angle",323.1301023611111],PARAMETER["scale_factor",0.99984],PARAMETER["false_easting",804671],PARAMETER["false_northing",0],AUTHORITY["EPSG","3375"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=omerc +lat_0=4 +lonc=102.25 +alpha=323.0257964666666 +k=0.99984 +x_0=804671 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3375,'EPSG',3375,'PROJCS["GDM2000 / Peninsula RSO",GEOGCS["GDM2000",DATUM["Geodetic_Datum_of_Malaysia_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6742"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4742"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",4],PARAMETER["longitude_of_center",102.25],PARAMETER["azimuth",323.0257964666666],PARAMETER["rectified_grid_angle",323.1301023611111],PARAMETER["scale_factor",0.99984],PARAMETER["false_easting",804671],PARAMETER["false_northing",0],AUTHORITY["EPSG","3375"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=omerc +lat_0=4 +lonc=102.25 +alpha=323.0257964666666 +k=0.99984 +x_0=804671 +y_0=0 +gamma=323.1301023611111 +ellps=GRS80 +units=m +no_defs '); --- --- EPSG 3376 : GDM2000 / East Malaysia BRSO --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3376,'EPSG',3376,'PROJCS["GDM2000 / East Malaysia BRSO",GEOGCS["GDM2000",DATUM["Geodetic_Datum_of_Malaysia_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6742"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4742"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",4],PARAMETER["longitude_of_center",115],PARAMETER["azimuth",53.31580995],PARAMETER["rectified_grid_angle",53.13010236111111],PARAMETER["scale_factor",0.99984],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3376"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=omerc +lat_0=4 +lonc=115 +alpha=53.31580995 +k=0.99984 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3376,'EPSG',3376,'PROJCS["GDM2000 / East Malaysia BRSO",GEOGCS["GDM2000",DATUM["Geodetic_Datum_of_Malaysia_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6742"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4742"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",4],PARAMETER["longitude_of_center",115],PARAMETER["azimuth",53.31580995],PARAMETER["rectified_grid_angle",53.13010236111111],PARAMETER["scale_factor",0.99984],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3376"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=omerc +lat_0=4 +lonc=115 +alpha=53.31580995 +k=0.99984 +x_0=0 +y_0=0 +gamma=53.13010236111111 +ellps=GRS80 +units=m +no_defs '); --- --- EPSG 3377 : GDM2000 / Johor Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3377,'EPSG',3377,'PROJCS["GDM2000 / Johor Grid",GEOGCS["GDM2000",DATUM["Geodetic_Datum_of_Malaysia_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6742"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4742"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Cassini_Soldner"],PARAMETER["latitude_of_origin",2.121679744444445],PARAMETER["central_meridian",103.4279362361111],PARAMETER["false_easting",-14810.562],PARAMETER["false_northing",8758.32],AUTHORITY["EPSG","3377"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=cass +lat_0=2.121679744444445 +lon_0=103.4279362361111 +x_0=-14810.562 +y_0=8758.32 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3377,'EPSG',3377,'PROJCS["GDM2000 / Johor Grid",GEOGCS["GDM2000",DATUM["Geodetic_Datum_of_Malaysia_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6742"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4742"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Cassini_Soldner"],PARAMETER["latitude_of_origin",2.121679744444445],PARAMETER["central_meridian",103.4279362361111],PARAMETER["false_easting",-14810.562],PARAMETER["false_northing",8758.32],AUTHORITY["EPSG","3377"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=cass +lat_0=2.121679744444445 +lon_0=103.4279362361111 +x_0=-14810.562 +y_0=8758.32 +ellps=GRS80 +units=m +no_defs '); --- --- EPSG 3378 : GDM2000 / Sembilan and Melaka Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3378,'EPSG',3378,'PROJCS["GDM2000 / Sembilan and Melaka Grid",GEOGCS["GDM2000",DATUM["Geodetic_Datum_of_Malaysia_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6742"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4742"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Cassini_Soldner"],PARAMETER["latitude_of_origin",2.682347636111111],PARAMETER["central_meridian",101.9749050416667],PARAMETER["false_easting",3673.785],PARAMETER["false_northing",-4240.573],AUTHORITY["EPSG","3378"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=cass +lat_0=2.682347636111111 +lon_0=101.9749050416667 +x_0=3673.785 +y_0=-4240.573 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3378,'EPSG',3378,'PROJCS["GDM2000 / Sembilan and Melaka Grid",GEOGCS["GDM2000",DATUM["Geodetic_Datum_of_Malaysia_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6742"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4742"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Cassini_Soldner"],PARAMETER["latitude_of_origin",2.682347636111111],PARAMETER["central_meridian",101.9749050416667],PARAMETER["false_easting",3673.785],PARAMETER["false_northing",-4240.573],AUTHORITY["EPSG","3378"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=cass +lat_0=2.682347636111111 +lon_0=101.9749050416667 +x_0=3673.785 +y_0=-4240.573 +ellps=GRS80 +units=m +no_defs '); --- --- EPSG 3379 : GDM2000 / PahangGrid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3379,'EPSG',3379,'PROJCS["GDM2000 / PahangGrid",GEOGCS["GDM2000",DATUM["Geodetic_Datum_of_Malaysia_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6742"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4742"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Cassini_Soldner"],PARAMETER["latitude_of_origin",3.769388088888889],PARAMETER["central_meridian",102.3682989833333],PARAMETER["false_easting",-7368.228],PARAMETER["false_northing",6485.858],AUTHORITY["EPSG","3379"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=cass +lat_0=3.769388088888889 +lon_0=102.3682989833333 +x_0=-7368.228 +y_0=6485.858 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3379,'EPSG',3379,'PROJCS["GDM2000 / PahangGrid",GEOGCS["GDM2000",DATUM["Geodetic_Datum_of_Malaysia_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6742"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4742"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Cassini_Soldner"],PARAMETER["latitude_of_origin",3.769388088888889],PARAMETER["central_meridian",102.3682989833333],PARAMETER["false_easting",-7368.228],PARAMETER["false_northing",6485.858],AUTHORITY["EPSG","3379"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=cass +lat_0=3.769388088888889 +lon_0=102.3682989833333 +x_0=-7368.228 +y_0=6485.858 +ellps=GRS80 +units=m +no_defs '); --- --- EPSG 3380 : GDM2000 / Selangor Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3380,'EPSG',3380,'PROJCS["GDM2000 / Selangor Grid",GEOGCS["GDM2000",DATUM["Geodetic_Datum_of_Malaysia_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6742"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4742"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Cassini_Soldner"],PARAMETER["latitude_of_origin",3.68464905],PARAMETER["central_meridian",101.3891079138889],PARAMETER["false_easting",-34836.161],PARAMETER["false_northing",56464.049],AUTHORITY["EPSG","3380"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=cass +lat_0=3.68464905 +lon_0=101.3891079138889 +x_0=-34836.161 +y_0=56464.049 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3380,'EPSG',3380,'PROJCS["GDM2000 / Selangor Grid",GEOGCS["GDM2000",DATUM["Geodetic_Datum_of_Malaysia_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6742"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4742"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Cassini_Soldner"],PARAMETER["latitude_of_origin",3.68464905],PARAMETER["central_meridian",101.3891079138889],PARAMETER["false_easting",-34836.161],PARAMETER["false_northing",56464.049],AUTHORITY["EPSG","3380"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=cass +lat_0=3.68464905 +lon_0=101.3891079138889 +x_0=-34836.161 +y_0=56464.049 +ellps=GRS80 +units=m +no_defs '); --- --- EPSG 3381 : GDM2000 / Terengganu Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3381,'EPSG',3381,'PROJCS["GDM2000 / Terengganu Grid",GEOGCS["GDM2000",DATUM["Geodetic_Datum_of_Malaysia_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6742"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4742"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Cassini_Soldner"],PARAMETER["latitude_of_origin",4.9762852],PARAMETER["central_meridian",103.070275625],PARAMETER["false_easting",19594.245],PARAMETER["false_northing",3371.895],AUTHORITY["EPSG","3381"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=cass +lat_0=4.9762852 +lon_0=103.070275625 +x_0=19594.245 +y_0=3371.895 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3381,'EPSG',3381,'PROJCS["GDM2000 / Terengganu Grid",GEOGCS["GDM2000",DATUM["Geodetic_Datum_of_Malaysia_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6742"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4742"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Cassini_Soldner"],PARAMETER["latitude_of_origin",4.9762852],PARAMETER["central_meridian",103.070275625],PARAMETER["false_easting",19594.245],PARAMETER["false_northing",3371.895],AUTHORITY["EPSG","3381"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=cass +lat_0=4.9762852 +lon_0=103.070275625 +x_0=19594.245 +y_0=3371.895 +ellps=GRS80 +units=m +no_defs '); --- --- EPSG 3382 : GDM2000 / Pinang Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3382,'EPSG',3382,'PROJCS["GDM2000 / Pinang Grid",GEOGCS["GDM2000",DATUM["Geodetic_Datum_of_Malaysia_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6742"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4742"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Cassini_Soldner"],PARAMETER["latitude_of_origin",5.421517541666667],PARAMETER["central_meridian",100.3443769638889],PARAMETER["false_easting",-23.414],PARAMETER["false_northing",62.283],AUTHORITY["EPSG","3382"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=cass +lat_0=5.421517541666667 +lon_0=100.3443769638889 +x_0=-23.414 +y_0=62.283 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3382,'EPSG',3382,'PROJCS["GDM2000 / Pinang Grid",GEOGCS["GDM2000",DATUM["Geodetic_Datum_of_Malaysia_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6742"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4742"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Cassini_Soldner"],PARAMETER["latitude_of_origin",5.421517541666667],PARAMETER["central_meridian",100.3443769638889],PARAMETER["false_easting",-23.414],PARAMETER["false_northing",62.283],AUTHORITY["EPSG","3382"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=cass +lat_0=5.421517541666667 +lon_0=100.3443769638889 +x_0=-23.414 +y_0=62.283 +ellps=GRS80 +units=m +no_defs '); --- --- EPSG 3383 : GDM2000 / Kedah and Perlis Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3383,'EPSG',3383,'PROJCS["GDM2000 / Kedah and Perlis Grid",GEOGCS["GDM2000",DATUM["Geodetic_Datum_of_Malaysia_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6742"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4742"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Cassini_Soldner"],PARAMETER["latitude_of_origin",5.964672713888889],PARAMETER["central_meridian",100.6363711111111],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3383"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=cass +lat_0=5.964672713888889 +lon_0=100.6363711111111 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3383,'EPSG',3383,'PROJCS["GDM2000 / Kedah and Perlis Grid",GEOGCS["GDM2000",DATUM["Geodetic_Datum_of_Malaysia_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6742"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4742"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Cassini_Soldner"],PARAMETER["latitude_of_origin",5.964672713888889],PARAMETER["central_meridian",100.6363711111111],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3383"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=cass +lat_0=5.964672713888889 +lon_0=100.6363711111111 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs '); --- --- EPSG 3384 : GDM2000 / Perak Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3384,'EPSG',3384,'PROJCS["GDM2000 / Perak Grid",GEOGCS["GDM2000",DATUM["Geodetic_Datum_of_Malaysia_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6742"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4742"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Cassini_Soldner"],PARAMETER["latitude_of_origin",4.859063022222222],PARAMETER["central_meridian",100.8154105861111],PARAMETER["false_easting",-1.769],PARAMETER["false_northing",133454.779],AUTHORITY["EPSG","3384"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=cass +lat_0=4.859063022222222 +lon_0=100.8154105861111 +x_0=-1.769 +y_0=133454.779 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3384,'EPSG',3384,'PROJCS["GDM2000 / Perak Grid",GEOGCS["GDM2000",DATUM["Geodetic_Datum_of_Malaysia_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6742"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4742"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Cassini_Soldner"],PARAMETER["latitude_of_origin",4.859063022222222],PARAMETER["central_meridian",100.8154105861111],PARAMETER["false_easting",-1.769],PARAMETER["false_northing",133454.779],AUTHORITY["EPSG","3384"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=cass +lat_0=4.859063022222222 +lon_0=100.8154105861111 +x_0=-1.769 +y_0=133454.779 +ellps=GRS80 +units=m +no_defs '); --- --- EPSG 3385 : GDM2000 / Kelantan Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3385,'EPSG',3385,'PROJCS["GDM2000 / Kelantan Grid",GEOGCS["GDM2000",DATUM["Geodetic_Datum_of_Malaysia_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6742"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4742"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Cassini_Soldner"],PARAMETER["latitude_of_origin",5.972543658333334],PARAMETER["central_meridian",102.2952416694444],PARAMETER["false_easting",13227.851],PARAMETER["false_northing",8739.894],AUTHORITY["EPSG","3385"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=cass +lat_0=5.972543658333334 +lon_0=102.2952416694444 +x_0=13227.851 +y_0=8739.894 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3385,'EPSG',3385,'PROJCS["GDM2000 / Kelantan Grid",GEOGCS["GDM2000",DATUM["Geodetic_Datum_of_Malaysia_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6742"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4742"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Cassini_Soldner"],PARAMETER["latitude_of_origin",5.972543658333334],PARAMETER["central_meridian",102.2952416694444],PARAMETER["false_easting",13227.851],PARAMETER["false_northing",8739.894],AUTHORITY["EPSG","3385"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=cass +lat_0=5.972543658333334 +lon_0=102.2952416694444 +x_0=13227.851 +y_0=8739.894 +ellps=GRS80 +units=m +no_defs '); --- --- EPSG 3386 : KKJ / Finland zone 0 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3386,'EPSG',3386,'PROJCS["KKJ / Finland zone 0",GEOGCS["KKJ",DATUM["Kartastokoordinaattijarjestelma_1966",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6123"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4123"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3386"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3386,'EPSG',3386,'PROJCS["KKJ / Finland zone 0",GEOGCS["KKJ",DATUM["Kartastokoordinaattijarjestelma_1966",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496],AUTHORITY["EPSG","6123"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4123"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3386"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=500000 +y_0=0 +ellps=intl +towgs84=-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496 +units=m +no_defs '); --- --- EPSG 3387 : KKJ / Finland zone 5 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3387,'EPSG',3387,'PROJCS["KKJ / Finland zone 5",GEOGCS["KKJ",DATUM["Kartastokoordinaattijarjestelma_1966",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6123"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4123"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",1],PARAMETER["false_easting",5500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3387"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=5500000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3387,'EPSG',3387,'PROJCS["KKJ / Finland zone 5",GEOGCS["KKJ",DATUM["Kartastokoordinaattijarjestelma_1966",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496],AUTHORITY["EPSG","6123"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4123"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",1],PARAMETER["false_easting",5500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3387"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=5500000 +y_0=0 +ellps=intl +towgs84=-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496 +units=m +no_defs '); --- --- EPSG 3388 : Pulkovo 1942 / Caspian Sea Mercator --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3388,'EPSG',3388,'PROJCS["Pulkovo 1942 / Caspian Sea Mercator",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",51],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3388"],AXIS["none",EAST],AXIS["none",NORTH]]','+proj=merc +lon_0=51 +k=1 +x_0=0 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3388,'EPSG',3388,'PROJCS["Pulkovo 1942 / Caspian Sea Mercator",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Mercator_2SP"],PARAMETER["standard_parallel_1",42],PARAMETER["central_meridian",51],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3388"],AXIS["none",NORTH],AXIS["none",EAST]]','+proj=merc +lon_0=51 +lat_ts=42 +x_0=0 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 3389 : Pulkovo 1942 / 3-degree Gauss-Kruger zone 60 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3389,'EPSG',3389,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 60",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",180],PARAMETER["scale_factor",1],PARAMETER["false_easting",60500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3389"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=180 +k=1 +x_0=60500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3389,'EPSG',3389,'PROJCS["Pulkovo 1942 / 3-degree Gauss-Kruger zone 60",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",180],PARAMETER["scale_factor",1],PARAMETER["false_easting",60500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3389"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=180 +k=1 +x_0=60500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 3390 : Pulkovo 1995 / 3-degree Gauss-Kruger zone 60 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3390,'EPSG',3390,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 60",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",180],PARAMETER["scale_factor",1],PARAMETER["false_easting",60500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3390"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=180 +k=1 +x_0=60500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3390,'EPSG',3390,'PROJCS["Pulkovo 1995 / 3-degree Gauss-Kruger zone 60",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",180],PARAMETER["scale_factor",1],PARAMETER["false_easting",60500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3390"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=180 +k=1 +x_0=60500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 3391 : Karbala 1979 / UTM zone 37N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3391,'EPSG',3391,'PROJCS["Karbala 1979 / UTM zone 37N",GEOGCS["Karbala 1979",DATUM["Karbala_1979",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[84.1,-320.1,218.7,0,0,0,0],AUTHORITY["EPSG","6743"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4743"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3391"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=37 +ellps=clrk80 +towgs84=84.1,-320.1,218.7,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3391,'EPSG',3391,'PROJCS["Karbala 1979 / UTM zone 37N",GEOGCS["Karbala 1979",DATUM["Karbala_1979",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[84.1,-320.1,218.7,0,0,0,0],AUTHORITY["EPSG","6743"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4743"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3391"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=37 +ellps=clrk80 +towgs84=84.1,-320.1,218.7,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3392 : Karbala 1979 / UTM zone 38N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3392,'EPSG',3392,'PROJCS["Karbala 1979 / UTM zone 38N",GEOGCS["Karbala 1979",DATUM["Karbala_1979",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[84.1,-320.1,218.7,0,0,0,0],AUTHORITY["EPSG","6743"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4743"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3392"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +ellps=clrk80 +towgs84=84.1,-320.1,218.7,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3392,'EPSG',3392,'PROJCS["Karbala 1979 / UTM zone 38N",GEOGCS["Karbala 1979",DATUM["Karbala_1979",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[84.1,-320.1,218.7,0,0,0,0],AUTHORITY["EPSG","6743"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4743"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3392"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +ellps=clrk80 +towgs84=84.1,-320.1,218.7,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3393 : Karbala 1979 / UTM zone 39N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3393,'EPSG',3393,'PROJCS["Karbala 1979 / UTM zone 39N",GEOGCS["Karbala 1979",DATUM["Karbala_1979",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[84.1,-320.1,218.7,0,0,0,0],AUTHORITY["EPSG","6743"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4743"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3393"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=39 +ellps=clrk80 +towgs84=84.1,-320.1,218.7,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3393,'EPSG',3393,'PROJCS["Karbala 1979 / UTM zone 39N",GEOGCS["Karbala 1979",DATUM["Karbala_1979",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[84.1,-320.1,218.7,0,0,0,0],AUTHORITY["EPSG","6743"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4743"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3393"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=39 +ellps=clrk80 +towgs84=84.1,-320.1,218.7,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3394 : Nahrwan 1934 / Iraq zone --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3394,'EPSG',3394,'PROJCS["Nahrwan 1934 / Iraq zone",GEOGCS["Nahrwan 1934",DATUM["Nahrwan_1934",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6744"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4744"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",32.5],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9987864078],PARAMETER["false_easting",1500000],PARAMETER["false_northing",1166200],AUTHORITY["EPSG","3394"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=32.5 +lat_0=32.5 +lon_0=45 +k_0=0.9987864078000001 +x_0=1500000 +y_0=1166200 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3394,'EPSG',3394,'PROJCS["Nahrwan 1934 / Iraq zone",GEOGCS["Nahrwan 1934",DATUM["Nahrwan_1934",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6744"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4744"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",32.5],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9987864078],PARAMETER["false_easting",1500000],PARAMETER["false_northing",1166200],AUTHORITY["EPSG","3394"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=32.5 +lat_0=32.5 +lon_0=45 +k_0=0.9987864078000001 +x_0=1500000 +y_0=1166200 +ellps=clrk80 +units=m +no_defs '); --- --- EPSG 3395 : WGS 84 / World Mercator --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3395,'EPSG',3395,'PROJCS["WGS 84 / World Mercator",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3395"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3395,'EPSG',3395,'PROJCS["WGS 84 / World Mercator",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3395"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3396 : PD/83 / 3-degree Gauss-Kruger zone 3 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3396,'EPSG',3396,'PROJCS["PD/83 / 3-degree Gauss-Kruger zone 3",GEOGCS["PD/83",DATUM["Potsdam_Datum_83",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6746"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4746"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",1],PARAMETER["false_easting",3500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3396"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3396,'EPSG',3396,'PROJCS["PD/83 / 3-degree Gauss-Kruger zone 3",GEOGCS["PD/83",DATUM["Potsdam_Datum_83",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6746"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4746"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",1],PARAMETER["false_easting",3500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3396"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +ellps=bessel +units=m +no_defs '); --- --- EPSG 3397 : PD/83 / 3-degree Gauss-Kruger zone 4 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3397,'EPSG',3397,'PROJCS["PD/83 / 3-degree Gauss-Kruger zone 4",GEOGCS["PD/83",DATUM["Potsdam_Datum_83",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6746"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4746"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",12],PARAMETER["scale_factor",1],PARAMETER["false_easting",4500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3397"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3397,'EPSG',3397,'PROJCS["PD/83 / 3-degree Gauss-Kruger zone 4",GEOGCS["PD/83",DATUM["Potsdam_Datum_83",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6746"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4746"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",12],PARAMETER["scale_factor",1],PARAMETER["false_easting",4500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3397"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 +ellps=bessel +units=m +no_defs '); --- --- EPSG 3398 : RD/83 / 3-degree Gauss-Kruger zone 4 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3398,'EPSG',3398,'PROJCS["RD/83 / 3-degree Gauss-Kruger zone 4",GEOGCS["RD/83",DATUM["Rauenberg_Datum_83",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6745"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4745"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",12],PARAMETER["scale_factor",1],PARAMETER["false_easting",4500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3398"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3398,'EPSG',3398,'PROJCS["RD/83 / 3-degree Gauss-Kruger zone 4",GEOGCS["RD/83",DATUM["Rauenberg_Datum_83",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6745"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4745"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",12],PARAMETER["scale_factor",1],PARAMETER["false_easting",4500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3398"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 +ellps=bessel +units=m +no_defs '); --- --- EPSG 3399 : RD/83 / 3-degree Gauss-Kruger zone 5 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3399,'EPSG',3399,'PROJCS["RD/83 / 3-degree Gauss-Kruger zone 5",GEOGCS["RD/83",DATUM["Rauenberg_Datum_83",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6745"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4745"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",1],PARAMETER["false_easting",5500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3399"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=5500000 +y_0=0 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3399,'EPSG',3399,'PROJCS["RD/83 / 3-degree Gauss-Kruger zone 5",GEOGCS["RD/83",DATUM["Rauenberg_Datum_83",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6745"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4745"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",1],PARAMETER["false_easting",5500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3399"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=5500000 +y_0=0 +ellps=bessel +units=m +no_defs '); --- --- EPSG 3400 : NAD83 / Alberta 10-TM (Forest) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3400,'EPSG',3400,'PROJCS["NAD83 / Alberta 10-TM (Forest)",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-115],PARAMETER["scale_factor",0.9992],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3400"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-115 +k=0.9992 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3400,'EPSG',3400,'PROJCS["NAD83 / Alberta 10-TM (Forest)",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-115],PARAMETER["scale_factor",0.9992],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3400"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-115 +k=0.9992 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3401 : NAD83 / Alberta 10-TM (Resource) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3401,'EPSG',3401,'PROJCS["NAD83 / Alberta 10-TM (Resource)",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-115],PARAMETER["scale_factor",0.9992],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3401"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-115 +k=0.9992 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3401,'EPSG',3401,'PROJCS["NAD83 / Alberta 10-TM (Resource)",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-115],PARAMETER["scale_factor",0.9992],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3401"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-115 +k=0.9992 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3402 : NAD83(CSRS) / Alberta 10-TM (Forest) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3402,'EPSG',3402,'PROJCS["NAD83(CSRS) / Alberta 10-TM (Forest)",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-115],PARAMETER["scale_factor",0.9992],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3402"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-115 +k=0.9992 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3402,'EPSG',3402,'PROJCS["NAD83(CSRS) / Alberta 10-TM (Forest)",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-115],PARAMETER["scale_factor",0.9992],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3402"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-115 +k=0.9992 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3403 : NAD83(CSRS) / Alberta 10-TM (Resource) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3403,'EPSG',3403,'PROJCS["NAD83(CSRS) / Alberta 10-TM (Resource)",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-115],PARAMETER["scale_factor",0.9992],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3403"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-115 +k=0.9992 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3403,'EPSG',3403,'PROJCS["NAD83(CSRS) / Alberta 10-TM (Resource)",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-115],PARAMETER["scale_factor",0.9992],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3403"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-115 +k=0.9992 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3404 : NAD83(HARN) / North Carolina (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3404,'EPSG',3404,'PROJCS["NAD83(HARN) / North Carolina (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.16666666666666],PARAMETER["standard_parallel_2",34.33333333333334],PARAMETER["latitude_of_origin",33.75],PARAMETER["central_meridian",-79],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3404"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.2192024384 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3404,'EPSG',3404,'PROJCS["NAD83(HARN) / North Carolina (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.16666666666666],PARAMETER["standard_parallel_2",34.33333333333334],PARAMETER["latitude_of_origin",33.75],PARAMETER["central_meridian",-79],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3404"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.2192024384 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3405 : VN-2000 / UTM zone 48N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3405,'EPSG',3405,'PROJCS["VN-2000 / UTM zone 48N",GEOGCS["VN-2000",DATUM["Vietnam_2000",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6756"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4756"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3405"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=48 +ellps=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3405,'EPSG',3405,'PROJCS["VN-2000 / UTM zone 48N",GEOGCS["VN-2000",DATUM["Vietnam_2000",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6756"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4756"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3405"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=48 +ellps=WGS84 +units=m +no_defs '); --- --- EPSG 3406 : VN-2000 / UTM zone 49N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3406,'EPSG',3406,'PROJCS["VN-2000 / UTM zone 49N",GEOGCS["VN-2000",DATUM["Vietnam_2000",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6756"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4756"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3406"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=49 +ellps=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3406,'EPSG',3406,'PROJCS["VN-2000 / UTM zone 49N",GEOGCS["VN-2000",DATUM["Vietnam_2000",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6756"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4756"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3406"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=49 +ellps=WGS84 +units=m +no_defs '); --- --- EPSG 3407 : Hong Kong 1963 Grid System --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3407,'EPSG',3407,'PROJCS["Hong Kong 1963 Grid System",GEOGCS["Hong Kong 1963",DATUM["Hong_Kong_1963",SPHEROID["Clarke 1858",6378293.645208759,294.2606763692569,AUTHORITY["EPSG","7007"]],AUTHORITY["EPSG","6738"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4738"]],UNIT["Clarke''s foot",0.3047972654,AUTHORITY["EPSG","9005"]],PROJECTION["Cassini_Soldner"],PARAMETER["latitude_of_origin",22.31213333333334],PARAMETER["central_meridian",114.1785555555556],PARAMETER["false_easting",132033.92],PARAMETER["false_northing",62565.96],AUTHORITY["EPSG","3407"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=cass +lat_0=22.31213333333334 +lon_0=114.1785555555556 +x_0=40243.57775604237 +y_0=19069.93351512578 +a=6378293.645208759 +b=6356617.987679838 +to_meter=0.3047972654 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3407,'EPSG',3407,'PROJCS["Hong Kong 1963 Grid System",GEOGCS["Hong Kong 1963",DATUM["Hong_Kong_1963",SPHEROID["Clarke 1858",6378293.645208759,294.2606763692569,AUTHORITY["EPSG","7007"]],AUTHORITY["EPSG","6738"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4738"]],UNIT["Clarke''s foot",0.3047972654,AUTHORITY["EPSG","9005"]],PROJECTION["Cassini_Soldner"],PARAMETER["latitude_of_origin",22.31213333333334],PARAMETER["central_meridian",114.1785555555556],PARAMETER["false_easting",132033.92],PARAMETER["false_northing",62565.96],AUTHORITY["EPSG","3407"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=cass +lat_0=22.31213333333334 +lon_0=114.1785555555556 +x_0=40243.57775604237 +y_0=19069.93351512578 +a=6378293.645208759 +b=6356617.987679838 +to_meter=0.3047972654 +no_defs '); --- --- EPSG 3408 : unnamed --- @@ -7322,1791 +7454,1843 @@ --- --- EPSG 3410 : NSIDC EASE-Grid Global --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3410,'EPSG',3410,'PROJCS["NSIDC EASE-Grid Global",GEOGCS["Unspecified datum based upon the International 1924 Authalic Sphere",DATUM["Not_specified_based_on_International_1924_Authalic_Sphere",SPHEROID["International 1924 Authalic Sphere",6371228,0,AUTHORITY["EPSG","7057"]],AUTHORITY["EPSG","6053"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4053"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Cylindrical_Equal_Area"],PARAMETER["standard_parallel_1",30],PARAMETER["central_meridian",0],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3410"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=cea +lon_0=0 +lat_ts=30 +x_0=0 +y_0=0 +a=6371228 +b=6371228 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3410,'EPSG',3410,'PROJCS["NSIDC EASE-Grid Global",GEOGCS["Unspecified datum based upon the International 1924 Authalic Sphere",DATUM["Not_specified_based_on_International_1924_Authalic_Sphere",SPHEROID["International 1924 Authalic Sphere",6371228,0,AUTHORITY["EPSG","7057"]],AUTHORITY["EPSG","6053"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4053"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Cylindrical_Equal_Area"],PARAMETER["standard_parallel_1",30],PARAMETER["central_meridian",0],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3410"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=cea +lon_0=0 +lat_ts=30 +x_0=0 +y_0=0 +a=6371228 +b=6371228 +units=m +no_defs '); --- --- EPSG 3411 : NSIDC Sea Ice Polar Stereographic North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3411,'EPSG',3411,'PROJCS["NSIDC Sea Ice Polar Stereographic North",GEOGCS["Unspecified datum based upon the Hughes 1980 ellipsoid",DATUM["Not_specified_based_on_Hughes_1980_ellipsoid",SPHEROID["Hughes 1980",6378273,298.279411123061,AUTHORITY["EPSG","7058"]],AUTHORITY["EPSG","6054"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4054"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",70],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3411"],AXIS["X",UNKNOWN],AXIS["Y",UNKNOWN]]','+proj=stere +lat_0=90 +lat_ts=70 +lon_0=-45 +k=1 +x_0=0 +y_0=0 +a=6378273 +b=6356889.449 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3411,'EPSG',3411,'PROJCS["NSIDC Sea Ice Polar Stereographic North",GEOGCS["Unspecified datum based upon the Hughes 1980 ellipsoid",DATUM["Not_specified_based_on_Hughes_1980_ellipsoid",SPHEROID["Hughes 1980",6378273,298.279411123061,AUTHORITY["EPSG","7058"]],AUTHORITY["EPSG","6054"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4054"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",70],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3411"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=stere +lat_0=90 +lat_ts=70 +lon_0=-45 +k=1 +x_0=0 +y_0=0 +a=6378273 +b=6356889.449 +units=m +no_defs '); --- --- EPSG 3412 : NSIDC Sea Ice Polar Stereographic South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3412,'EPSG',3412,'PROJCS["NSIDC Sea Ice Polar Stereographic South",GEOGCS["Unspecified datum based upon the Hughes 1980 ellipsoid",DATUM["Not_specified_based_on_Hughes_1980_ellipsoid",SPHEROID["Hughes 1980",6378273,298.279411123061,AUTHORITY["EPSG","7058"]],AUTHORITY["EPSG","6054"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4054"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-70],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3412"],AXIS["X",UNKNOWN],AXIS["Y",UNKNOWN]]','+proj=stere +lat_0=-90 +lat_ts=-70 +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=6378273 +b=6356889.449 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3412,'EPSG',3412,'PROJCS["NSIDC Sea Ice Polar Stereographic South",GEOGCS["Unspecified datum based upon the Hughes 1980 ellipsoid",DATUM["Not_specified_based_on_Hughes_1980_ellipsoid",SPHEROID["Hughes 1980",6378273,298.279411123061,AUTHORITY["EPSG","7058"]],AUTHORITY["EPSG","6054"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4054"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-70],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3412"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=stere +lat_0=-90 +lat_ts=-70 +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=6378273 +b=6356889.449 +units=m +no_defs '); --- --- EPSG 3413 : WGS 84 / NSIDC Sea Ice Polar Stereographic North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3413,'EPSG',3413,'PROJCS["WGS 84 / NSIDC Sea Ice Polar Stereographic North",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",70],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3413"],AXIS["X",UNKNOWN],AXIS["Y",UNKNOWN]]','+proj=stere +lat_0=90 +lat_ts=70 +lon_0=-45 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3413,'EPSG',3413,'PROJCS["WGS 84 / NSIDC Sea Ice Polar Stereographic North",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",70],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3413"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=stere +lat_0=90 +lat_ts=70 +lon_0=-45 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3414 : SVY21 / Singapore TM --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3414,'EPSG',3414,'PROJCS["SVY21 / Singapore TM",GEOGCS["SVY21",DATUM["SVY21",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6757"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4757"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",1.366666666666667],PARAMETER["central_meridian",103.8333333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",28001.642],PARAMETER["false_northing",38744.572],AUTHORITY["EPSG","3414"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=1.366666666666667 +lon_0=103.8333333333333 +k=1 +x_0=28001.642 +y_0=38744.572 +ellps=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3414,'EPSG',3414,'PROJCS["SVY21 / Singapore TM",GEOGCS["SVY21",DATUM["SVY21",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6757"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4757"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",1.366666666666667],PARAMETER["central_meridian",103.8333333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",28001.642],PARAMETER["false_northing",38744.572],AUTHORITY["EPSG","3414"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=1.366666666666667 +lon_0=103.8333333333333 +k=1 +x_0=28001.642 +y_0=38744.572 +ellps=WGS84 +units=m +no_defs '); --- --- EPSG 3415 : WGS 72BE / South China Sea Lambert --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3415,'EPSG',3415,'PROJCS["WGS 72BE / South China Sea Lambert",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",18],PARAMETER["standard_parallel_2",24],PARAMETER["latitude_of_origin",21],PARAMETER["central_meridian",114],PARAMETER["false_easting",500000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","3415"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=18 +lat_2=24 +lat_0=21 +lon_0=114 +x_0=500000 +y_0=500000 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3415,'EPSG',3415,'PROJCS["WGS 72BE / South China Sea Lambert",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",18],PARAMETER["standard_parallel_2",24],PARAMETER["latitude_of_origin",21],PARAMETER["central_meridian",114],PARAMETER["false_easting",500000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","3415"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=18 +lat_2=24 +lat_0=21 +lon_0=114 +x_0=500000 +y_0=500000 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 3416 : ETRS89 / Austria Lambert --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3416,'EPSG',3416,'PROJCS["ETRS89 / Austria Lambert",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",49],PARAMETER["standard_parallel_2",46],PARAMETER["latitude_of_origin",47.5],PARAMETER["central_meridian",13.33333333333333],PARAMETER["false_easting",400000],PARAMETER["false_northing",400000],AUTHORITY["EPSG","3416"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=lcc +lat_1=49 +lat_2=46 +lat_0=47.5 +lon_0=13.33333333333333 +x_0=400000 +y_0=400000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3416,'EPSG',3416,'PROJCS["ETRS89 / Austria Lambert",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",49],PARAMETER["standard_parallel_2",46],PARAMETER["latitude_of_origin",47.5],PARAMETER["central_meridian",13.33333333333333],PARAMETER["false_easting",400000],PARAMETER["false_northing",400000],AUTHORITY["EPSG","3416"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=lcc +lat_1=49 +lat_2=46 +lat_0=47.5 +lon_0=13.33333333333333 +x_0=400000 +y_0=400000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3417 : NAD83 / Iowa North (ft US) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3417,'EPSG',3417,'PROJCS["NAD83 / Iowa North (ft US)",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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43.26666666666667],PARAMETER["standard_parallel_2",42.06666666666667],PARAMETER["latitude_of_origin",41.5],PARAMETER["central_meridian",-93.5],PARAMETER["false_easting",4921250],PARAMETER["false_northing",3280833.333300001],AUTHORITY["EPSG","3417"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43.26666666666667 +lat_2=42.06666666666667 +lat_0=41.5 +lon_0=-93.5 +x_0=1500000 +y_0=999999.9999898402 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3417,'EPSG',3417,'PROJCS["NAD83 / Iowa North (ft US)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43.26666666666667],PARAMETER["standard_parallel_2",42.06666666666667],PARAMETER["latitude_of_origin",41.5],PARAMETER["central_meridian",-93.5],PARAMETER["false_easting",4921250],PARAMETER["false_northing",3280833.333300001],AUTHORITY["EPSG","3417"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43.26666666666667 +lat_2=42.06666666666667 +lat_0=41.5 +lon_0=-93.5 +x_0=1500000 +y_0=999999.9999898402 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3418 : NAD83 / Iowa South (ft US) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3418,'EPSG',3418,'PROJCS["NAD83 / Iowa South (ft US)",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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.78333333333333],PARAMETER["standard_parallel_2",40.61666666666667],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-93.5],PARAMETER["false_easting",1640416.6667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3418"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.78333333333333 +lat_2=40.61666666666667 +lat_0=40 +lon_0=-93.5 +x_0=500000.00001016 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3418,'EPSG',3418,'PROJCS["NAD83 / Iowa South (ft US)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.78333333333333],PARAMETER["standard_parallel_2",40.61666666666667],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-93.5],PARAMETER["false_easting",1640416.6667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3418"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.78333333333333 +lat_2=40.61666666666667 +lat_0=40 +lon_0=-93.5 +x_0=500000.00001016 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3419 : NAD83 / Kansas North (ft US) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3419,'EPSG',3419,'PROJCS["NAD83 / Kansas North (ft US)",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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.78333333333333],PARAMETER["standard_parallel_2",38.71666666666667],PARAMETER["latitude_of_origin",38.33333333333334],PARAMETER["central_meridian",-98],PARAMETER["false_easting",1312333.3333],PARAMETER["false_northing",0],AUTHORITY["EPSG","3419"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.78333333333333 +lat_2=38.71666666666667 +lat_0=38.33333333333334 +lon_0=-98 +x_0=399999.99998984 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3419,'EPSG',3419,'PROJCS["NAD83 / Kansas North (ft US)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.78333333333333],PARAMETER["standard_parallel_2",38.71666666666667],PARAMETER["latitude_of_origin",38.33333333333334],PARAMETER["central_meridian",-98],PARAMETER["false_easting",1312333.3333],PARAMETER["false_northing",0],AUTHORITY["EPSG","3419"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.78333333333333 +lat_2=38.71666666666667 +lat_0=38.33333333333334 +lon_0=-98 +x_0=399999.99998984 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3420 : NAD83 / Kansas South (ft US) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3420,'EPSG',3420,'PROJCS["NAD83 / Kansas South (ft US)",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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.56666666666667],PARAMETER["standard_parallel_2",37.26666666666667],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-98.5],PARAMETER["false_easting",1312333.3333],PARAMETER["false_northing",1312333.3333],AUTHORITY["EPSG","3420"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.56666666666667 +lat_2=37.26666666666667 +lat_0=36.66666666666666 +lon_0=-98.5 +x_0=399999.99998984 +y_0=399999.99998984 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3420,'EPSG',3420,'PROJCS["NAD83 / Kansas South (ft US)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.56666666666667],PARAMETER["standard_parallel_2",37.26666666666667],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-98.5],PARAMETER["false_easting",1312333.3333],PARAMETER["false_northing",1312333.3333],AUTHORITY["EPSG","3420"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.56666666666667 +lat_2=37.26666666666667 +lat_0=36.66666666666666 +lon_0=-98.5 +x_0=399999.99998984 +y_0=399999.99998984 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3421 : NAD83 / Nevada East (ft US) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3421,'EPSG',3421,'PROJCS["NAD83 / Nevada East (ft US)",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",34.75],PARAMETER["central_meridian",-115.5833333333333],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",656166.6667],PARAMETER["false_northing",26246666.66670001],AUTHORITY["EPSG","3421"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.9999 +x_0=200000.00001016 +y_0=8000000.000010163 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3421,'EPSG',3421,'PROJCS["NAD83 / Nevada East (ft US)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",34.75],PARAMETER["central_meridian",-115.5833333333333],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",656166.6667],PARAMETER["false_northing",26246666.66670001],AUTHORITY["EPSG","3421"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.9999 +x_0=200000.00001016 +y_0=8000000.000010163 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3422 : NAD83 / Nevada Central (ft US) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3422,'EPSG',3422,'PROJCS["NAD83 / Nevada Central (ft US)",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",34.75],PARAMETER["central_meridian",-116.6666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",1640416.6667],PARAMETER["false_northing",19685000],AUTHORITY["EPSG","3422"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.9999 +x_0=500000.00001016 +y_0=6000000 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3422,'EPSG',3422,'PROJCS["NAD83 / Nevada Central (ft US)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",34.75],PARAMETER["central_meridian",-116.6666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",1640416.6667],PARAMETER["false_northing",19685000],AUTHORITY["EPSG","3422"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.9999 +x_0=500000.00001016 +y_0=6000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3423 : NAD83 / Nevada West (ft US) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3423,'EPSG',3423,'PROJCS["NAD83 / Nevada West (ft US)",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",34.75],PARAMETER["central_meridian",-118.5833333333333],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",2624666.6667],PARAMETER["false_northing",13123333.3333],AUTHORITY["EPSG","3423"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.9999 +x_0=800000.0000101599 +y_0=3999999.99998984 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3423,'EPSG',3423,'PROJCS["NAD83 / Nevada West (ft US)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",34.75],PARAMETER["central_meridian",-118.5833333333333],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",2624666.6667],PARAMETER["false_northing",13123333.3333],AUTHORITY["EPSG","3423"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.9999 +x_0=800000.0000101599 +y_0=3999999.99998984 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3424 : NAD83 / New Jersey (ft US) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3424,'EPSG',3424,'PROJCS["NAD83 / New Jersey (ft US)",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","3424"],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 '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3424,'EPSG',3424,'PROJCS["NAD83 / New Jersey (ft US)",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"]],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","3424"],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 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3425 : NAD83(HARN) / Iowa North (ft US) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3425,'EPSG',3425,'PROJCS["NAD83(HARN) / Iowa North (ft US)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43.26666666666667],PARAMETER["standard_parallel_2",42.06666666666667],PARAMETER["latitude_of_origin",41.5],PARAMETER["central_meridian",-93.5],PARAMETER["false_easting",4921250],PARAMETER["false_northing",3280833.333300001],AUTHORITY["EPSG","3425"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43.26666666666667 +lat_2=42.06666666666667 +lat_0=41.5 +lon_0=-93.5 +x_0=1500000 +y_0=999999.9999898402 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3425,'EPSG',3425,'PROJCS["NAD83(HARN) / Iowa North (ft US)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43.26666666666667],PARAMETER["standard_parallel_2",42.06666666666667],PARAMETER["latitude_of_origin",41.5],PARAMETER["central_meridian",-93.5],PARAMETER["false_easting",4921250],PARAMETER["false_northing",3280833.333300001],AUTHORITY["EPSG","3425"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43.26666666666667 +lat_2=42.06666666666667 +lat_0=41.5 +lon_0=-93.5 +x_0=1500000 +y_0=999999.9999898402 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3426 : NAD83(HARN) / Iowa South (ft US) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3426,'EPSG',3426,'PROJCS["NAD83(HARN) / Iowa South (ft US)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.78333333333333],PARAMETER["standard_parallel_2",40.61666666666667],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-93.5],PARAMETER["false_easting",1640416.6667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3426"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.78333333333333 +lat_2=40.61666666666667 +lat_0=40 +lon_0=-93.5 +x_0=500000.00001016 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3426,'EPSG',3426,'PROJCS["NAD83(HARN) / Iowa South (ft US)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.78333333333333],PARAMETER["standard_parallel_2",40.61666666666667],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-93.5],PARAMETER["false_easting",1640416.6667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3426"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.78333333333333 +lat_2=40.61666666666667 +lat_0=40 +lon_0=-93.5 +x_0=500000.00001016 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3427 : NAD83(HARN) / Kansas North (ft US) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3427,'EPSG',3427,'PROJCS["NAD83(HARN) / Kansas North (ft US)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.78333333333333],PARAMETER["standard_parallel_2",38.71666666666667],PARAMETER["latitude_of_origin",38.33333333333334],PARAMETER["central_meridian",-98],PARAMETER["false_easting",1312333.3333],PARAMETER["false_northing",0],AUTHORITY["EPSG","3427"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.78333333333333 +lat_2=38.71666666666667 +lat_0=38.33333333333334 +lon_0=-98 +x_0=399999.99998984 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3427,'EPSG',3427,'PROJCS["NAD83(HARN) / Kansas North (ft US)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.78333333333333],PARAMETER["standard_parallel_2",38.71666666666667],PARAMETER["latitude_of_origin",38.33333333333334],PARAMETER["central_meridian",-98],PARAMETER["false_easting",1312333.3333],PARAMETER["false_northing",0],AUTHORITY["EPSG","3427"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.78333333333333 +lat_2=38.71666666666667 +lat_0=38.33333333333334 +lon_0=-98 +x_0=399999.99998984 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3428 : NAD83(HARN) / Kansas South (ft US) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3428,'EPSG',3428,'PROJCS["NAD83(HARN) / Kansas South (ft US)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.56666666666667],PARAMETER["standard_parallel_2",37.26666666666667],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-98.5],PARAMETER["false_easting",1312333.3333],PARAMETER["false_northing",1312333.3333],AUTHORITY["EPSG","3428"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.56666666666667 +lat_2=37.26666666666667 +lat_0=36.66666666666666 +lon_0=-98.5 +x_0=399999.99998984 +y_0=399999.99998984 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3428,'EPSG',3428,'PROJCS["NAD83(HARN) / Kansas South (ft US)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.56666666666667],PARAMETER["standard_parallel_2",37.26666666666667],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-98.5],PARAMETER["false_easting",1312333.3333],PARAMETER["false_northing",1312333.3333],AUTHORITY["EPSG","3428"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.56666666666667 +lat_2=37.26666666666667 +lat_0=36.66666666666666 +lon_0=-98.5 +x_0=399999.99998984 +y_0=399999.99998984 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3429 : NAD83(HARN) / Nevada East (ft US) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3429,'EPSG',3429,'PROJCS["NAD83(HARN) / Nevada East (ft US)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",34.75],PARAMETER["central_meridian",-115.5833333333333],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",656166.6667],PARAMETER["false_northing",26246666.66670001],AUTHORITY["EPSG","3429"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.9999 +x_0=200000.00001016 +y_0=8000000.000010163 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3429,'EPSG',3429,'PROJCS["NAD83(HARN) / Nevada East (ft US)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",34.75],PARAMETER["central_meridian",-115.5833333333333],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",656166.6667],PARAMETER["false_northing",26246666.66670001],AUTHORITY["EPSG","3429"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.9999 +x_0=200000.00001016 +y_0=8000000.000010163 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3430 : NAD83(HARN) / Nevada Central (ft US) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3430,'EPSG',3430,'PROJCS["NAD83(HARN) / Nevada Central (ft US)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",34.75],PARAMETER["central_meridian",-116.6666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",1640416.6667],PARAMETER["false_northing",19685000],AUTHORITY["EPSG","3430"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.9999 +x_0=500000.00001016 +y_0=6000000 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3430,'EPSG',3430,'PROJCS["NAD83(HARN) / Nevada Central (ft US)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",34.75],PARAMETER["central_meridian",-116.6666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",1640416.6667],PARAMETER["false_northing",19685000],AUTHORITY["EPSG","3430"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.9999 +x_0=500000.00001016 +y_0=6000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3431 : NAD83(HARN) / Nevada West (ft US) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3431,'EPSG',3431,'PROJCS["NAD83(HARN) / Nevada West (ft US)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",34.75],PARAMETER["central_meridian",-118.5833333333333],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",2624666.6667],PARAMETER["false_northing",13123333.3333],AUTHORITY["EPSG","3431"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.9999 +x_0=800000.0000101599 +y_0=3999999.99998984 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3431,'EPSG',3431,'PROJCS["NAD83(HARN) / Nevada West (ft US)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",34.75],PARAMETER["central_meridian",-118.5833333333333],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",2624666.6667],PARAMETER["false_northing",13123333.3333],AUTHORITY["EPSG","3431"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.9999 +x_0=800000.0000101599 +y_0=3999999.99998984 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3432 : NAD83(HARN) / New Jersey (ft US) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3432,'EPSG',3432,'PROJCS["NAD83(HARN) / New Jersey (ft US)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],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","3432"],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 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3432,'EPSG',3432,'PROJCS["NAD83(HARN) / New Jersey (ft US)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],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","3432"],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 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3433 : NAD83 / Arkansas North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3433,'EPSG',3433,'PROJCS["NAD83 / Arkansas North (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.23333333333333],PARAMETER["standard_parallel_2",34.93333333333333],PARAMETER["latitude_of_origin",34.33333333333334],PARAMETER["central_meridian",-92],PARAMETER["false_easting",1312333.3333],PARAMETER["false_northing",0],AUTHORITY["EPSG","3433"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.23333333333333 +lat_2=34.93333333333333 +lat_0=34.33333333333334 +lon_0=-92 +x_0=399999.99998984 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3433,'EPSG',3433,'PROJCS["NAD83 / Arkansas North (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.23333333333333],PARAMETER["standard_parallel_2",34.93333333333333],PARAMETER["latitude_of_origin",34.33333333333334],PARAMETER["central_meridian",-92],PARAMETER["false_easting",1312333.3333],PARAMETER["false_northing",0],AUTHORITY["EPSG","3433"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.23333333333333 +lat_2=34.93333333333333 +lat_0=34.33333333333334 +lon_0=-92 +x_0=399999.99998984 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3434 : NAD83 / Arkansas South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3434,'EPSG',3434,'PROJCS["NAD83 / Arkansas South (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",34.76666666666667],PARAMETER["standard_parallel_2",33.3],PARAMETER["latitude_of_origin",32.66666666666666],PARAMETER["central_meridian",-92],PARAMETER["false_easting",1312333.3333],PARAMETER["false_northing",1312333.3333],AUTHORITY["EPSG","3434"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=34.76666666666667 +lat_2=33.3 +lat_0=32.66666666666666 +lon_0=-92 +x_0=399999.99998984 +y_0=399999.99998984 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3434,'EPSG',3434,'PROJCS["NAD83 / Arkansas South (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",34.76666666666667],PARAMETER["standard_parallel_2",33.3],PARAMETER["latitude_of_origin",32.66666666666666],PARAMETER["central_meridian",-92],PARAMETER["false_easting",1312333.3333],PARAMETER["false_northing",1312333.3333],AUTHORITY["EPSG","3434"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=34.76666666666667 +lat_2=33.3 +lat_0=32.66666666666666 +lon_0=-92 +x_0=399999.99998984 +y_0=399999.99998984 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3435 : NAD83 / Illinois East (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3435,'EPSG',3435,'PROJCS["NAD83 / Illinois 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",36.66666666666666],PARAMETER["central_meridian",-88.33333333333333],PARAMETER["scale_factor",0.999975],PARAMETER["false_easting",984250.0000000002],PARAMETER["false_northing",0],AUTHORITY["EPSG","3435"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333333333 +k=0.9999749999999999 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3435,'EPSG',3435,'PROJCS["NAD83 / Illinois East (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-88.33333333333333],PARAMETER["scale_factor",0.999975],PARAMETER["false_easting",984250.0000000002],PARAMETER["false_northing",0],AUTHORITY["EPSG","3435"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333333333 +k=0.9999749999999999 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3436 : NAD83 / Illinois West (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3436,'EPSG',3436,'PROJCS["NAD83 / Illinois West (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",36.66666666666666],PARAMETER["central_meridian",-90.16666666666667],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",2296583.333300001],PARAMETER["false_northing",0],AUTHORITY["EPSG","3436"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666666667 +k=0.999941177 +x_0=699999.9999898402 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3436,'EPSG',3436,'PROJCS["NAD83 / Illinois West (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-90.16666666666667],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",2296583.333300001],PARAMETER["false_northing",0],AUTHORITY["EPSG","3436"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666666667 +k=0.999941177 +x_0=699999.9999898402 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3437 : NAD83 / New Hampshire (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3437,'EPSG',3437,'PROJCS["NAD83 / New Hampshire (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",42.5],PARAMETER["central_meridian",-71.66666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",984250.0000000002],PARAMETER["false_northing",0],AUTHORITY["EPSG","3437"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999966667 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3437,'EPSG',3437,'PROJCS["NAD83 / New Hampshire (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.5],PARAMETER["central_meridian",-71.66666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",984250.0000000002],PARAMETER["false_northing",0],AUTHORITY["EPSG","3437"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999966667 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3438 : NAD83 / Rhode Island (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3438,'EPSG',3438,'PROJCS["NAD83 / Rhode Island (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",41.08333333333334],PARAMETER["central_meridian",-71.5],PARAMETER["scale_factor",0.99999375],PARAMETER["false_easting",328083.3333],PARAMETER["false_northing",0],AUTHORITY["EPSG","3438"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.08333333333334 +lon_0=-71.5 +k=0.99999375 +x_0=99999.99998983997 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3438,'EPSG',3438,'PROJCS["NAD83 / Rhode Island (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.08333333333334],PARAMETER["central_meridian",-71.5],PARAMETER["scale_factor",0.99999375],PARAMETER["false_easting",328083.3333],PARAMETER["false_northing",0],AUTHORITY["EPSG","3438"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.08333333333334 +lon_0=-71.5 +k=0.99999375 +x_0=99999.99998983997 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3439 : PSD93 / UTM zone 39N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3439,'EPSG',3439,'PROJCS["PSD93 / UTM zone 39N",GEOGCS["PSD93",DATUM["PDO_Survey_Datum_1993",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6134"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4134"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3439"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=39 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3439,'EPSG',3439,'PROJCS["PSD93 / UTM zone 39N",GEOGCS["PSD93",DATUM["PDO_Survey_Datum_1993",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-180.624,-225.516,173.919,-0.81,-1.898,8.336,16.7101],AUTHORITY["EPSG","6134"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4134"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3439"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=39 +ellps=clrk80 +towgs84=-180.624,-225.516,173.919,-0.81,-1.898,8.336,16.7101 +units=m +no_defs '); --- --- EPSG 3440 : PSD93 / UTM zone 40N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3440,'EPSG',3440,'PROJCS["PSD93 / UTM zone 40N",GEOGCS["PSD93",DATUM["PDO_Survey_Datum_1993",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6134"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4134"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3440"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=40 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3440,'EPSG',3440,'PROJCS["PSD93 / UTM zone 40N",GEOGCS["PSD93",DATUM["PDO_Survey_Datum_1993",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-180.624,-225.516,173.919,-0.81,-1.898,8.336,16.7101],AUTHORITY["EPSG","6134"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4134"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3440"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=40 +ellps=clrk80 +towgs84=-180.624,-225.516,173.919,-0.81,-1.898,8.336,16.7101 +units=m +no_defs '); --- --- EPSG 3441 : NAD83(HARN) / Arkansas North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3441,'EPSG',3441,'PROJCS["NAD83(HARN) / Arkansas North (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.23333333333333],PARAMETER["standard_parallel_2",34.93333333333333],PARAMETER["latitude_of_origin",34.33333333333334],PARAMETER["central_meridian",-92],PARAMETER["false_easting",1312333.3333],PARAMETER["false_northing",0],AUTHORITY["EPSG","3441"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.23333333333333 +lat_2=34.93333333333333 +lat_0=34.33333333333334 +lon_0=-92 +x_0=399999.99998984 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3441,'EPSG',3441,'PROJCS["NAD83(HARN) / Arkansas North (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.23333333333333],PARAMETER["standard_parallel_2",34.93333333333333],PARAMETER["latitude_of_origin",34.33333333333334],PARAMETER["central_meridian",-92],PARAMETER["false_easting",1312333.3333],PARAMETER["false_northing",0],AUTHORITY["EPSG","3441"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.23333333333333 +lat_2=34.93333333333333 +lat_0=34.33333333333334 +lon_0=-92 +x_0=399999.99998984 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3442 : NAD83(HARN) / Arkansas South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3442,'EPSG',3442,'PROJCS["NAD83(HARN) / Arkansas South (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",34.76666666666667],PARAMETER["standard_parallel_2",33.3],PARAMETER["latitude_of_origin",32.66666666666666],PARAMETER["central_meridian",-92],PARAMETER["false_easting",1312333.3333],PARAMETER["false_northing",1312333.3333],AUTHORITY["EPSG","3442"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=34.76666666666667 +lat_2=33.3 +lat_0=32.66666666666666 +lon_0=-92 +x_0=399999.99998984 +y_0=399999.99998984 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3442,'EPSG',3442,'PROJCS["NAD83(HARN) / Arkansas South (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",34.76666666666667],PARAMETER["standard_parallel_2",33.3],PARAMETER["latitude_of_origin",32.66666666666666],PARAMETER["central_meridian",-92],PARAMETER["false_easting",1312333.3333],PARAMETER["false_northing",1312333.3333],AUTHORITY["EPSG","3442"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=34.76666666666667 +lat_2=33.3 +lat_0=32.66666666666666 +lon_0=-92 +x_0=399999.99998984 +y_0=399999.99998984 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3443 : NAD83(HARN) / Illinois East (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3443,'EPSG',3443,'PROJCS["NAD83(HARN) / Illinois East (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-88.33333333333333],PARAMETER["scale_factor",0.999975],PARAMETER["false_easting",984250.0000000002],PARAMETER["false_northing",0],AUTHORITY["EPSG","3443"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333333333 +k=0.9999749999999999 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3443,'EPSG',3443,'PROJCS["NAD83(HARN) / Illinois East (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-88.33333333333333],PARAMETER["scale_factor",0.999975],PARAMETER["false_easting",984250.0000000002],PARAMETER["false_northing",0],AUTHORITY["EPSG","3443"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333333333 +k=0.9999749999999999 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3444 : NAD83(HARN) / Illinois West (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3444,'EPSG',3444,'PROJCS["NAD83(HARN) / Illinois West (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-90.16666666666667],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",2296583.333300001],PARAMETER["false_northing",0],AUTHORITY["EPSG","3444"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666666667 +k=0.999941177 +x_0=699999.9999898402 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3444,'EPSG',3444,'PROJCS["NAD83(HARN) / Illinois West (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-90.16666666666667],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",2296583.333300001],PARAMETER["false_northing",0],AUTHORITY["EPSG","3444"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666666667 +k=0.999941177 +x_0=699999.9999898402 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3445 : NAD83(HARN) / New Hampshire (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3445,'EPSG',3445,'PROJCS["NAD83(HARN) / New Hampshire (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.5],PARAMETER["central_meridian",-71.66666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",984250.0000000002],PARAMETER["false_northing",0],AUTHORITY["EPSG","3445"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999966667 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3445,'EPSG',3445,'PROJCS["NAD83(HARN) / New Hampshire (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.5],PARAMETER["central_meridian",-71.66666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",984250.0000000002],PARAMETER["false_northing",0],AUTHORITY["EPSG","3445"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999966667 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3446 : NAD83(HARN) / Rhode Island (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3446,'EPSG',3446,'PROJCS["NAD83(HARN) / Rhode Island (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.08333333333334],PARAMETER["central_meridian",-71.5],PARAMETER["scale_factor",0.99999375],PARAMETER["false_easting",328083.3333],PARAMETER["false_northing",0],AUTHORITY["EPSG","3446"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.08333333333334 +lon_0=-71.5 +k=0.99999375 +x_0=99999.99998983997 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3446,'EPSG',3446,'PROJCS["NAD83(HARN) / Rhode Island (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.08333333333334],PARAMETER["central_meridian",-71.5],PARAMETER["scale_factor",0.99999375],PARAMETER["false_easting",328083.3333],PARAMETER["false_northing",0],AUTHORITY["EPSG","3446"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.08333333333334 +lon_0=-71.5 +k=0.99999375 +x_0=99999.99998983997 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3447 : ETRS89 / Belgian Lambert 2005 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3447,'EPSG',3447,'PROJCS["ETRS89 / Belgian Lambert 2005",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",49.83333333333334],PARAMETER["standard_parallel_2",51.16666666666666],PARAMETER["latitude_of_origin",50.797815],PARAMETER["central_meridian",4.359215833333333],PARAMETER["false_easting",150328],PARAMETER["false_northing",166262],AUTHORITY["EPSG","3447"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=49.83333333333334 +lat_2=51.16666666666666 +lat_0=50.797815 +lon_0=4.359215833333333 +x_0=150328 +y_0=166262 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3447,'EPSG',3447,'PROJCS["ETRS89 / Belgian Lambert 2005",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",49.83333333333334],PARAMETER["standard_parallel_2",51.16666666666666],PARAMETER["latitude_of_origin",50.797815],PARAMETER["central_meridian",4.359215833333333],PARAMETER["false_easting",150328],PARAMETER["false_northing",166262],AUTHORITY["EPSG","3447"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=49.83333333333334 +lat_2=51.16666666666666 +lat_0=50.797815 +lon_0=4.359215833333333 +x_0=150328 +y_0=166262 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3448 : JAD2001 / Jamaica Metric Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3448,'EPSG',3448,'PROJCS["JAD2001 / Jamaica Metric Grid",GEOGCS["JAD2001",DATUM["Jamaica_2001",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6758"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4758"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",18],PARAMETER["central_meridian",-77],PARAMETER["scale_factor",1],PARAMETER["false_easting",750000],PARAMETER["false_northing",650000],AUTHORITY["EPSG","3448"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=18 +lat_0=18 +lon_0=-77 +k_0=1 +x_0=750000 +y_0=650000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3448,'EPSG',3448,'PROJCS["JAD2001 / Jamaica Metric Grid",GEOGCS["JAD2001",DATUM["Jamaica_2001",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6758"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4758"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",18],PARAMETER["central_meridian",-77],PARAMETER["scale_factor",1],PARAMETER["false_easting",750000],PARAMETER["false_northing",650000],AUTHORITY["EPSG","3448"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=18 +lat_0=18 +lon_0=-77 +k_0=1 +x_0=750000 +y_0=650000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3449 : JAD2001 / UTM zone 17N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3449,'EPSG',3449,'PROJCS["JAD2001 / UTM zone 17N",GEOGCS["JAD2001",DATUM["Jamaica_2001",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6758"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4758"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3449"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3449,'EPSG',3449,'PROJCS["JAD2001 / UTM zone 17N",GEOGCS["JAD2001",DATUM["Jamaica_2001",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6758"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4758"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3449"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3450 : JAD2001 / UTM zone 18N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3450,'EPSG',3450,'PROJCS["JAD2001 / UTM zone 18N",GEOGCS["JAD2001",DATUM["Jamaica_2001",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6758"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4758"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3450"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3450,'EPSG',3450,'PROJCS["JAD2001 / UTM zone 18N",GEOGCS["JAD2001",DATUM["Jamaica_2001",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6758"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4758"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3450"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3451 : NAD83 / Louisiana North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3451,'EPSG',3451,'PROJCS["NAD83 / Louisiana North (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",32.66666666666666],PARAMETER["standard_parallel_2",31.16666666666667],PARAMETER["latitude_of_origin",30.5],PARAMETER["central_meridian",-92.5],PARAMETER["false_easting",3280833.333300001],PARAMETER["false_northing",0],AUTHORITY["EPSG","3451"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=32.66666666666666 +lat_2=31.16666666666667 +lat_0=30.5 +lon_0=-92.5 +x_0=999999.9999898402 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3451,'EPSG',3451,'PROJCS["NAD83 / Louisiana North (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",32.66666666666666],PARAMETER["standard_parallel_2",31.16666666666667],PARAMETER["latitude_of_origin",30.5],PARAMETER["central_meridian",-92.5],PARAMETER["false_easting",3280833.333300001],PARAMETER["false_northing",0],AUTHORITY["EPSG","3451"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=32.66666666666666 +lat_2=31.16666666666667 +lat_0=30.5 +lon_0=-92.5 +x_0=999999.9999898402 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3452 : NAD83 / Louisiana South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3452,'EPSG',3452,'PROJCS["NAD83 / Louisiana South (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",30.7],PARAMETER["standard_parallel_2",29.3],PARAMETER["latitude_of_origin",28.5],PARAMETER["central_meridian",-91.33333333333333],PARAMETER["false_easting",3280833.333300001],PARAMETER["false_northing",0],AUTHORITY["EPSG","3452"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=30.7 +lat_2=29.3 +lat_0=28.5 +lon_0=-91.33333333333333 +x_0=999999.9999898402 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3452,'EPSG',3452,'PROJCS["NAD83 / Louisiana South (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",30.7],PARAMETER["standard_parallel_2",29.3],PARAMETER["latitude_of_origin",28.5],PARAMETER["central_meridian",-91.33333333333333],PARAMETER["false_easting",3280833.333300001],PARAMETER["false_northing",0],AUTHORITY["EPSG","3452"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=30.7 +lat_2=29.3 +lat_0=28.5 +lon_0=-91.33333333333333 +x_0=999999.9999898402 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3453 : NAD83 / Louisiana Offshore (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3453,'EPSG',3453,'PROJCS["NAD83 / Louisiana Offshore (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",27.83333333333333],PARAMETER["standard_parallel_2",26.16666666666667],PARAMETER["latitude_of_origin",25.5],PARAMETER["central_meridian",-91.33333333333333],PARAMETER["false_easting",3280833.333300001],PARAMETER["false_northing",0],AUTHORITY["EPSG","3453"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=27.83333333333333 +lat_2=26.16666666666667 +lat_0=25.5 +lon_0=-91.33333333333333 +x_0=999999.9999898402 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3453,'EPSG',3453,'PROJCS["NAD83 / Louisiana Offshore (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",27.83333333333333],PARAMETER["standard_parallel_2",26.16666666666667],PARAMETER["latitude_of_origin",25.5],PARAMETER["central_meridian",-91.33333333333333],PARAMETER["false_easting",3280833.333300001],PARAMETER["false_northing",0],AUTHORITY["EPSG","3453"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=27.83333333333333 +lat_2=26.16666666666667 +lat_0=25.5 +lon_0=-91.33333333333333 +x_0=999999.9999898402 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- ---- EPSG 3454 : NAD83 / South Dakota North (ftUS) +--- EPSG 3454 : NAD83 / South Dakota North (ftUS) (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3454,'EPSG',3454,'PROJCS["NAD83 / South Dakota North (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44.4],PARAMETER["standard_parallel_2",42.83333333333334],PARAMETER["latitude_of_origin",42.33333333333334],PARAMETER["central_meridian",-100.3333333333333],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3454"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44.4 +lat_2=42.83333333333334 +lat_0=42.33333333333334 +lon_0=-100.3333333333333 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3454,'EPSG',3454,'PROJCS["NAD83 / South Dakota North (ftUS) (deprecated)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44.4],PARAMETER["standard_parallel_2",42.83333333333334],PARAMETER["latitude_of_origin",42.33333333333334],PARAMETER["central_meridian",-100.3333333333333],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3454"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44.4 +lat_2=42.83333333333334 +lat_0=42.33333333333334 +lon_0=-100.3333333333333 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3455 : NAD83 / South Dakota South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3455,'EPSG',3455,'PROJCS["NAD83 / South Dakota South (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44.4],PARAMETER["standard_parallel_2",42.83333333333334],PARAMETER["latitude_of_origin",42.33333333333334],PARAMETER["central_meridian",-100.3333333333333],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3455"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44.4 +lat_2=42.83333333333334 +lat_0=42.33333333333334 +lon_0=-100.3333333333333 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3455,'EPSG',3455,'PROJCS["NAD83 / South Dakota South (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44.4],PARAMETER["standard_parallel_2",42.83333333333334],PARAMETER["latitude_of_origin",42.33333333333334],PARAMETER["central_meridian",-100.3333333333333],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3455"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44.4 +lat_2=42.83333333333334 +lat_0=42.33333333333334 +lon_0=-100.3333333333333 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3456 : NAD83(HARN) / Louisiana North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3456,'EPSG',3456,'PROJCS["NAD83(HARN) / Louisiana North (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",32.66666666666666],PARAMETER["standard_parallel_2",31.16666666666667],PARAMETER["latitude_of_origin",30.5],PARAMETER["central_meridian",-92.5],PARAMETER["false_easting",3280833.333300001],PARAMETER["false_northing",0],AUTHORITY["EPSG","3456"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=32.66666666666666 +lat_2=31.16666666666667 +lat_0=30.5 +lon_0=-92.5 +x_0=999999.9999898402 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3456,'EPSG',3456,'PROJCS["NAD83(HARN) / Louisiana North (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",32.66666666666666],PARAMETER["standard_parallel_2",31.16666666666667],PARAMETER["latitude_of_origin",30.5],PARAMETER["central_meridian",-92.5],PARAMETER["false_easting",3280833.333300001],PARAMETER["false_northing",0],AUTHORITY["EPSG","3456"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=32.66666666666666 +lat_2=31.16666666666667 +lat_0=30.5 +lon_0=-92.5 +x_0=999999.9999898402 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3457 : NAD83(HARN) / Louisiana South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3457,'EPSG',3457,'PROJCS["NAD83(HARN) / Louisiana South (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",30.7],PARAMETER["standard_parallel_2",29.3],PARAMETER["latitude_of_origin",28.5],PARAMETER["central_meridian",-91.33333333333333],PARAMETER["false_easting",3280833.333300001],PARAMETER["false_northing",0],AUTHORITY["EPSG","3457"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=30.7 +lat_2=29.3 +lat_0=28.5 +lon_0=-91.33333333333333 +x_0=999999.9999898402 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3457,'EPSG',3457,'PROJCS["NAD83(HARN) / Louisiana South (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",30.7],PARAMETER["standard_parallel_2",29.3],PARAMETER["latitude_of_origin",28.5],PARAMETER["central_meridian",-91.33333333333333],PARAMETER["false_easting",3280833.333300001],PARAMETER["false_northing",0],AUTHORITY["EPSG","3457"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=30.7 +lat_2=29.3 +lat_0=28.5 +lon_0=-91.33333333333333 +x_0=999999.9999898402 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3458 : NAD83(HARN) / South Dakota North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3458,'EPSG',3458,'PROJCS["NAD83(HARN) / South Dakota North (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.68333333333333],PARAMETER["standard_parallel_2",44.41666666666666],PARAMETER["latitude_of_origin",43.83333333333334],PARAMETER["central_meridian",-100],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3458"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.68333333333333 +lat_2=44.41666666666666 +lat_0=43.83333333333334 +lon_0=-100 +x_0=600000 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3458,'EPSG',3458,'PROJCS["NAD83(HARN) / South Dakota North (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.68333333333333],PARAMETER["standard_parallel_2",44.41666666666666],PARAMETER["latitude_of_origin",43.83333333333334],PARAMETER["central_meridian",-100],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3458"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.68333333333333 +lat_2=44.41666666666666 +lat_0=43.83333333333334 +lon_0=-100 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3459 : NAD83(HARN) / South Dakota South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3459,'EPSG',3459,'PROJCS["NAD83(HARN) / South Dakota South (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44.4],PARAMETER["standard_parallel_2",42.83333333333334],PARAMETER["latitude_of_origin",42.33333333333334],PARAMETER["central_meridian",-100.3333333333333],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3459"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44.4 +lat_2=42.83333333333334 +lat_0=42.33333333333334 +lon_0=-100.3333333333333 +x_0=600000 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3459,'EPSG',3459,'PROJCS["NAD83(HARN) / South Dakota South (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44.4],PARAMETER["standard_parallel_2",42.83333333333334],PARAMETER["latitude_of_origin",42.33333333333334],PARAMETER["central_meridian",-100.3333333333333],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3459"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44.4 +lat_2=42.83333333333334 +lat_0=42.33333333333334 +lon_0=-100.3333333333333 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3460 : Fiji 1986 / Fiji Map Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3460,'EPSG',3460,'PROJCS["Fiji 1986 / Fiji Map Grid",GEOGCS["Fiji 1986",DATUM["Fiji_Geodetic_Datum_1986",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6720"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4720"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-17],PARAMETER["central_meridian",178.75],PARAMETER["scale_factor",0.99985],PARAMETER["false_easting",2000000],PARAMETER["false_northing",4000000],AUTHORITY["EPSG","3460"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-17 +lon_0=178.75 +k=0.99985 +x_0=2000000 +y_0=4000000 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3460,'EPSG',3460,'PROJCS["Fiji 1986 / Fiji Map Grid",GEOGCS["Fiji 1986",DATUM["Fiji_Geodetic_Datum_1986",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6720"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4720"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-17],PARAMETER["central_meridian",178.75],PARAMETER["scale_factor",0.99985],PARAMETER["false_easting",2000000],PARAMETER["false_northing",4000000],AUTHORITY["EPSG","3460"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-17 +lon_0=178.75 +k=0.99985 +x_0=2000000 +y_0=4000000 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 3461 : Dabola 1981 / UTM zone 28N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3461,'EPSG',3461,'PROJCS["Dabola 1981 / UTM zone 28N",GEOGCS["Dabola 1981",DATUM["Dabola_1981",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-83,37,124,0,0,0,0],AUTHORITY["EPSG","6155"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4155"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3461"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +a=6378249.2 +b=6356515 +towgs84=-83,37,124,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3461,'EPSG',3461,'PROJCS["Dabola 1981 / UTM zone 28N",GEOGCS["Dabola 1981",DATUM["Dabola_1981",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-83,37,124,0,0,0,0],AUTHORITY["EPSG","6155"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4155"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3461"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +a=6378249.2 +b=6356515 +towgs84=-83,37,124,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3462 : Dabola 1981 / UTM zone 29N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3462,'EPSG',3462,'PROJCS["Dabola 1981 / UTM zone 29N",GEOGCS["Dabola 1981",DATUM["Dabola_1981",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-83,37,124,0,0,0,0],AUTHORITY["EPSG","6155"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4155"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3462"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +a=6378249.2 +b=6356515 +towgs84=-83,37,124,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3462,'EPSG',3462,'PROJCS["Dabola 1981 / UTM zone 29N",GEOGCS["Dabola 1981",DATUM["Dabola_1981",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-83,37,124,0,0,0,0],AUTHORITY["EPSG","6155"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4155"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3462"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +a=6378249.2 +b=6356515 +towgs84=-83,37,124,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3463 : NAD83 / Maine CS2000 Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3463,'EPSG',3463,'PROJCS["NAD83 / Maine CS2000 Central",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",43.5],PARAMETER["central_meridian",-69.125],PARAMETER["scale_factor",0.99998],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3463"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=43.5 +lon_0=-69.125 +k=0.99998 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3463,'EPSG',3463,'PROJCS["NAD83 / Maine CS2000 Central",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",43.5],PARAMETER["central_meridian",-69.125],PARAMETER["scale_factor",0.99998],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3463"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=43.5 +lon_0=-69.125 +k=0.99998 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3464 : NAD83(HARN) / Maine CS2000 Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3464,'EPSG',3464,'PROJCS["NAD83(HARN) / Maine CS2000 Central",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",43.5],PARAMETER["central_meridian",-69.125],PARAMETER["scale_factor",0.99998],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3464"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=43.5 +lon_0=-69.125 +k=0.99998 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3464,'EPSG',3464,'PROJCS["NAD83(HARN) / Maine CS2000 Central",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",43.5],PARAMETER["central_meridian",-69.125],PARAMETER["scale_factor",0.99998],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3464"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=43.5 +lon_0=-69.125 +k=0.99998 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3465 : NAD83(NSRS2007) / Alabama East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3465,'EPSG',3465,'PROJCS["NAD83(NSRS2007) / Alabama East",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30.5],PARAMETER["central_meridian",-85.83333333333333],PARAMETER["scale_factor",0.99996],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3465"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30.5 +lon_0=-85.83333333333333 +k=0.99996 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3465,'EPSG',3465,'PROJCS["NAD83(NSRS2007) / Alabama East",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30.5],PARAMETER["central_meridian",-85.83333333333333],PARAMETER["scale_factor",0.99996],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3465"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30.5 +lon_0=-85.83333333333333 +k=0.99996 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3466 : NAD83(NSRS2007) / Alabama West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3466,'EPSG',3466,'PROJCS["NAD83(NSRS2007) / Alabama West",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",-87.5],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3466"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=-87.5 +k=0.999933333 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3466,'EPSG',3466,'PROJCS["NAD83(NSRS2007) / Alabama West",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",-87.5],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3466"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=-87.5 +k=0.999933333 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3467 : NAD83(NSRS2007) / Alaska Albers --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3467,'EPSG',3467,'PROJCS["NAD83(NSRS2007) / Alaska Albers",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",55],PARAMETER["standard_parallel_2",65],PARAMETER["latitude_of_center",50],PARAMETER["longitude_of_center",-154],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3467"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=aea +lat_1=55 +lat_2=65 +lat_0=50 +lon_0=-154 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3467,'EPSG',3467,'PROJCS["NAD83(NSRS2007) / Alaska Albers",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",55],PARAMETER["standard_parallel_2",65],PARAMETER["latitude_of_center",50],PARAMETER["longitude_of_center",-154],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3467"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=aea +lat_1=55 +lat_2=65 +lat_0=50 +lon_0=-154 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3468 : NAD83(NSRS2007) / Alaska zone 1 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3468,'EPSG',3468,'PROJCS["NAD83(NSRS2007) / Alaska zone 1",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",57],PARAMETER["longitude_of_center",-133.6666666666667],PARAMETER["azimuth",323.1301023611111],PARAMETER["rectified_grid_angle",323.1301023611111],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",5000000],PARAMETER["false_northing",-5000000],AUTHORITY["EPSG","3468"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=omerc +lat_0=57 +lonc=-133.6666666666667 +alpha=323.1301023611111 +k=0.9999 +x_0=5000000 +y_0=-5000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3468,'EPSG',3468,'PROJCS["NAD83(NSRS2007) / Alaska zone 1",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",57],PARAMETER["longitude_of_center",-133.6666666666667],PARAMETER["azimuth",323.1301023611111],PARAMETER["rectified_grid_angle",323.1301023611111],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",5000000],PARAMETER["false_northing",-5000000],AUTHORITY["EPSG","3468"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=omerc +lat_0=57 +lonc=-133.6666666666667 +alpha=323.1301023611111 +k=0.9999 +x_0=5000000 +y_0=-5000000 +gamma=323.1301023611111 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3469 : NAD83(NSRS2007) / Alaska zone 2 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3469,'EPSG',3469,'PROJCS["NAD83(NSRS2007) / Alaska zone 2",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-142],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3469"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-142 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3469,'EPSG',3469,'PROJCS["NAD83(NSRS2007) / Alaska zone 2",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-142],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3469"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-142 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3470 : NAD83(NSRS2007) / Alaska zone 3 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3470,'EPSG',3470,'PROJCS["NAD83(NSRS2007) / Alaska zone 3",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-146],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3470"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-146 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3470,'EPSG',3470,'PROJCS["NAD83(NSRS2007) / Alaska zone 3",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-146],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3470"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-146 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3471 : NAD83(NSRS2007) / Alaska zone 4 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3471,'EPSG',3471,'PROJCS["NAD83(NSRS2007) / Alaska zone 4",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-150],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3471"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-150 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3471,'EPSG',3471,'PROJCS["NAD83(NSRS2007) / Alaska zone 4",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-150],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3471"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-150 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3472 : NAD83(NSRS2007) / Alaska zone 5 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3472,'EPSG',3472,'PROJCS["NAD83(NSRS2007) / Alaska zone 5",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-154],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3472"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-154 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3472,'EPSG',3472,'PROJCS["NAD83(NSRS2007) / Alaska zone 5",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-154],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3472"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-154 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3473 : NAD83(NSRS2007) / Alaska zone 6 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3473,'EPSG',3473,'PROJCS["NAD83(NSRS2007) / Alaska zone 6",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-158],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3473"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-158 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3473,'EPSG',3473,'PROJCS["NAD83(NSRS2007) / Alaska zone 6",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-158],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3473"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-158 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3474 : NAD83(NSRS2007) / Alaska zone 7 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3474,'EPSG',3474,'PROJCS["NAD83(NSRS2007) / Alaska zone 7",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-162],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3474"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-162 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3474,'EPSG',3474,'PROJCS["NAD83(NSRS2007) / Alaska zone 7",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-162],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3474"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-162 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3475 : NAD83(NSRS2007) / Alaska zone 8 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3475,'EPSG',3475,'PROJCS["NAD83(NSRS2007) / Alaska zone 8",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-166],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3475"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-166 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3475,'EPSG',3475,'PROJCS["NAD83(NSRS2007) / Alaska zone 8",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-166],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3475"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-166 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3476 : NAD83(NSRS2007) / Alaska zone 9 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3476,'EPSG',3476,'PROJCS["NAD83(NSRS2007) / Alaska zone 9",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-170],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3476"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-170 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3476,'EPSG',3476,'PROJCS["NAD83(NSRS2007) / Alaska zone 9",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-170],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3476"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-170 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3477 : NAD83(NSRS2007) / Alaska zone 10 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3477,'EPSG',3477,'PROJCS["NAD83(NSRS2007) / Alaska zone 10",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",53.83333333333334],PARAMETER["standard_parallel_2",51.83333333333334],PARAMETER["latitude_of_origin",51],PARAMETER["central_meridian",-176],PARAMETER["false_easting",1000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3477"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=53.83333333333334 +lat_2=51.83333333333334 +lat_0=51 +lon_0=-176 +x_0=1000000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3477,'EPSG',3477,'PROJCS["NAD83(NSRS2007) / Alaska zone 10",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",53.83333333333334],PARAMETER["standard_parallel_2",51.83333333333334],PARAMETER["latitude_of_origin",51],PARAMETER["central_meridian",-176],PARAMETER["false_easting",1000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3477"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=53.83333333333334 +lat_2=51.83333333333334 +lat_0=51 +lon_0=-176 +x_0=1000000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3478 : NAD83(NSRS2007) / Arizona Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3478,'EPSG',3478,'PROJCS["NAD83(NSRS2007) / Arizona Central",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-111.9166666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",213360],PARAMETER["false_northing",0],AUTHORITY["EPSG","3478"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3478,'EPSG',3478,'PROJCS["NAD83(NSRS2007) / Arizona Central",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-111.9166666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",213360],PARAMETER["false_northing",0],AUTHORITY["EPSG","3478"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3479 : NAD83(NSRS2007) / Arizona Central (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3479,'EPSG',3479,'PROJCS["NAD83(NSRS2007) / Arizona Central (ft)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-111.9166666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3479"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3479,'EPSG',3479,'PROJCS["NAD83(NSRS2007) / Arizona Central (ft)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-111.9166666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3479"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 3480 : NAD83(NSRS2007) / Arizona East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3480,'EPSG',3480,'PROJCS["NAD83(NSRS2007) / Arizona East",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-110.1666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",213360],PARAMETER["false_northing",0],AUTHORITY["EPSG","3480"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3480,'EPSG',3480,'PROJCS["NAD83(NSRS2007) / Arizona East",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-110.1666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",213360],PARAMETER["false_northing",0],AUTHORITY["EPSG","3480"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3481 : NAD83(NSRS2007) / Arizona East (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3481,'EPSG',3481,'PROJCS["NAD83(NSRS2007) / Arizona East (ft)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-110.1666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3481"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3481,'EPSG',3481,'PROJCS["NAD83(NSRS2007) / Arizona East (ft)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-110.1666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3481"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 3482 : NAD83(NSRS2007) / Arizona West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3482,'EPSG',3482,'PROJCS["NAD83(NSRS2007) / Arizona West",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-113.75],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",213360],PARAMETER["false_northing",0],AUTHORITY["EPSG","3482"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.999933333 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3482,'EPSG',3482,'PROJCS["NAD83(NSRS2007) / Arizona West",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-113.75],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",213360],PARAMETER["false_northing",0],AUTHORITY["EPSG","3482"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.999933333 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3483 : NAD83(NSRS2007) / Arizona West (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3483,'EPSG',3483,'PROJCS["NAD83(NSRS2007) / Arizona West (ft)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-113.75],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3483"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.999933333 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3483,'EPSG',3483,'PROJCS["NAD83(NSRS2007) / Arizona West (ft)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-113.75],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3483"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.999933333 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 3484 : NAD83(NSRS2007) / Arkansas North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3484,'EPSG',3484,'PROJCS["NAD83(NSRS2007) / Arkansas North",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.23333333333333],PARAMETER["standard_parallel_2",34.93333333333333],PARAMETER["latitude_of_origin",34.33333333333334],PARAMETER["central_meridian",-92],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3484"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.23333333333333 +lat_2=34.93333333333333 +lat_0=34.33333333333334 +lon_0=-92 +x_0=400000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3484,'EPSG',3484,'PROJCS["NAD83(NSRS2007) / Arkansas North",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.23333333333333],PARAMETER["standard_parallel_2",34.93333333333333],PARAMETER["latitude_of_origin",34.33333333333334],PARAMETER["central_meridian",-92],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3484"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.23333333333333 +lat_2=34.93333333333333 +lat_0=34.33333333333334 +lon_0=-92 +x_0=400000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3485 : NAD83(NSRS2007) / Arkansas North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3485,'EPSG',3485,'PROJCS["NAD83(NSRS2007) / Arkansas North (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.23333333333333],PARAMETER["standard_parallel_2",34.93333333333333],PARAMETER["latitude_of_origin",34.33333333333334],PARAMETER["central_meridian",-92],PARAMETER["false_easting",1312333.3333],PARAMETER["false_northing",0],AUTHORITY["EPSG","3485"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.23333333333333 +lat_2=34.93333333333333 +lat_0=34.33333333333334 +lon_0=-92 +x_0=399999.99998984 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3485,'EPSG',3485,'PROJCS["NAD83(NSRS2007) / Arkansas North (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.23333333333333],PARAMETER["standard_parallel_2",34.93333333333333],PARAMETER["latitude_of_origin",34.33333333333334],PARAMETER["central_meridian",-92],PARAMETER["false_easting",1312333.3333],PARAMETER["false_northing",0],AUTHORITY["EPSG","3485"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.23333333333333 +lat_2=34.93333333333333 +lat_0=34.33333333333334 +lon_0=-92 +x_0=399999.99998984 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3486 : NAD83(NSRS2007) / Arkansas South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3486,'EPSG',3486,'PROJCS["NAD83(NSRS2007) / Arkansas South",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",34.76666666666667],PARAMETER["standard_parallel_2",33.3],PARAMETER["latitude_of_origin",32.66666666666666],PARAMETER["central_meridian",-92],PARAMETER["false_easting",400000],PARAMETER["false_northing",400000],AUTHORITY["EPSG","3486"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=34.76666666666667 +lat_2=33.3 +lat_0=32.66666666666666 +lon_0=-92 +x_0=400000 +y_0=400000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3486,'EPSG',3486,'PROJCS["NAD83(NSRS2007) / Arkansas South",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",34.76666666666667],PARAMETER["standard_parallel_2",33.3],PARAMETER["latitude_of_origin",32.66666666666666],PARAMETER["central_meridian",-92],PARAMETER["false_easting",400000],PARAMETER["false_northing",400000],AUTHORITY["EPSG","3486"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=34.76666666666667 +lat_2=33.3 +lat_0=32.66666666666666 +lon_0=-92 +x_0=400000 +y_0=400000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3487 : NAD83(NSRS2007) / Arkansas South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3487,'EPSG',3487,'PROJCS["NAD83(NSRS2007) / Arkansas South (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",34.76666666666667],PARAMETER["standard_parallel_2",33.3],PARAMETER["latitude_of_origin",32.66666666666666],PARAMETER["central_meridian",-92],PARAMETER["false_easting",1312333.3333],PARAMETER["false_northing",1312333.3333],AUTHORITY["EPSG","3487"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=34.76666666666667 +lat_2=33.3 +lat_0=32.66666666666666 +lon_0=-92 +x_0=399999.99998984 +y_0=399999.99998984 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3487,'EPSG',3487,'PROJCS["NAD83(NSRS2007) / Arkansas South (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",34.76666666666667],PARAMETER["standard_parallel_2",33.3],PARAMETER["latitude_of_origin",32.66666666666666],PARAMETER["central_meridian",-92],PARAMETER["false_easting",1312333.3333],PARAMETER["false_northing",1312333.3333],AUTHORITY["EPSG","3487"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=34.76666666666667 +lat_2=33.3 +lat_0=32.66666666666666 +lon_0=-92 +x_0=399999.99998984 +y_0=399999.99998984 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3488 : NAD83(NSRS2007) / California Albers --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3488,'EPSG',3488,'PROJCS["NAD83(NSRS2007) / California Albers",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",34],PARAMETER["standard_parallel_2",40.5],PARAMETER["latitude_of_center",0],PARAMETER["longitude_of_center",-120],PARAMETER["false_easting",0],PARAMETER["false_northing",-4000000],AUTHORITY["EPSG","3488"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=aea +lat_1=34 +lat_2=40.5 +lat_0=0 +lon_0=-120 +x_0=0 +y_0=-4000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3488,'EPSG',3488,'PROJCS["NAD83(NSRS2007) / California Albers",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",34],PARAMETER["standard_parallel_2",40.5],PARAMETER["latitude_of_center",0],PARAMETER["longitude_of_center",-120],PARAMETER["false_easting",0],PARAMETER["false_northing",-4000000],AUTHORITY["EPSG","3488"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=aea +lat_1=34 +lat_2=40.5 +lat_0=0 +lon_0=-120 +x_0=0 +y_0=-4000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3489 : NAD83(NSRS2007) / California zone 1 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3489,'EPSG',3489,'PROJCS["NAD83(NSRS2007) / California zone 1",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.66666666666666],PARAMETER["standard_parallel_2",40],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-122],PARAMETER["false_easting",2000000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","3489"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.66666666666666 +lat_2=40 +lat_0=39.33333333333334 +lon_0=-122 +x_0=2000000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3489,'EPSG',3489,'PROJCS["NAD83(NSRS2007) / California zone 1",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.66666666666666],PARAMETER["standard_parallel_2",40],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-122],PARAMETER["false_easting",2000000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","3489"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.66666666666666 +lat_2=40 +lat_0=39.33333333333334 +lon_0=-122 +x_0=2000000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3490 : NAD83(NSRS2007) / California zone 1 (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3490,'EPSG',3490,'PROJCS["NAD83(NSRS2007) / California zone 1 (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.66666666666666],PARAMETER["standard_parallel_2",40],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-122],PARAMETER["false_easting",6561666.667],PARAMETER["false_northing",1640416.667],AUTHORITY["EPSG","3490"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.66666666666666 +lat_2=40 +lat_0=39.33333333333334 +lon_0=-122 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3490,'EPSG',3490,'PROJCS["NAD83(NSRS2007) / California zone 1 (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.66666666666666],PARAMETER["standard_parallel_2",40],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-122],PARAMETER["false_easting",6561666.667],PARAMETER["false_northing",1640416.667],AUTHORITY["EPSG","3490"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.66666666666666 +lat_2=40 +lat_0=39.33333333333334 +lon_0=-122 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3491 : NAD83(NSRS2007) / California zone 2 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3491,'EPSG',3491,'PROJCS["NAD83(NSRS2007) / California zone 2",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.83333333333334],PARAMETER["standard_parallel_2",38.33333333333334],PARAMETER["latitude_of_origin",37.66666666666666],PARAMETER["central_meridian",-122],PARAMETER["false_easting",2000000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","3491"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.83333333333334 +lat_2=38.33333333333334 +lat_0=37.66666666666666 +lon_0=-122 +x_0=2000000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3491,'EPSG',3491,'PROJCS["NAD83(NSRS2007) / California zone 2",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.83333333333334],PARAMETER["standard_parallel_2",38.33333333333334],PARAMETER["latitude_of_origin",37.66666666666666],PARAMETER["central_meridian",-122],PARAMETER["false_easting",2000000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","3491"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.83333333333334 +lat_2=38.33333333333334 +lat_0=37.66666666666666 +lon_0=-122 +x_0=2000000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3492 : NAD83(NSRS2007) / California zone 2 (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3492,'EPSG',3492,'PROJCS["NAD83(NSRS2007) / California zone 2 (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.83333333333334],PARAMETER["standard_parallel_2",38.33333333333334],PARAMETER["latitude_of_origin",37.66666666666666],PARAMETER["central_meridian",-122],PARAMETER["false_easting",6561666.667],PARAMETER["false_northing",1640416.667],AUTHORITY["EPSG","3492"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.83333333333334 +lat_2=38.33333333333334 +lat_0=37.66666666666666 +lon_0=-122 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3492,'EPSG',3492,'PROJCS["NAD83(NSRS2007) / California zone 2 (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.83333333333334],PARAMETER["standard_parallel_2",38.33333333333334],PARAMETER["latitude_of_origin",37.66666666666666],PARAMETER["central_meridian",-122],PARAMETER["false_easting",6561666.667],PARAMETER["false_northing",1640416.667],AUTHORITY["EPSG","3492"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.83333333333334 +lat_2=38.33333333333334 +lat_0=37.66666666666666 +lon_0=-122 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3493 : NAD83(NSRS2007) / California zone 3 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3493,'EPSG',3493,'PROJCS["NAD83(NSRS2007) / California zone 3",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.43333333333333],PARAMETER["standard_parallel_2",37.06666666666667],PARAMETER["latitude_of_origin",36.5],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","3493"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.43333333333333 +lat_2=37.06666666666667 +lat_0=36.5 +lon_0=-120.5 +x_0=2000000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3493,'EPSG',3493,'PROJCS["NAD83(NSRS2007) / California zone 3",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.43333333333333],PARAMETER["standard_parallel_2",37.06666666666667],PARAMETER["latitude_of_origin",36.5],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","3493"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.43333333333333 +lat_2=37.06666666666667 +lat_0=36.5 +lon_0=-120.5 +x_0=2000000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3494 : NAD83(NSRS2007) / California zone 3 (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3494,'EPSG',3494,'PROJCS["NAD83(NSRS2007) / California zone 3 (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.43333333333333],PARAMETER["standard_parallel_2",37.06666666666667],PARAMETER["latitude_of_origin",36.5],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",6561666.667],PARAMETER["false_northing",1640416.667],AUTHORITY["EPSG","3494"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.43333333333333 +lat_2=37.06666666666667 +lat_0=36.5 +lon_0=-120.5 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3494,'EPSG',3494,'PROJCS["NAD83(NSRS2007) / California zone 3 (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.43333333333333],PARAMETER["standard_parallel_2",37.06666666666667],PARAMETER["latitude_of_origin",36.5],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",6561666.667],PARAMETER["false_northing",1640416.667],AUTHORITY["EPSG","3494"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.43333333333333 +lat_2=37.06666666666667 +lat_0=36.5 +lon_0=-120.5 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3495 : NAD83(NSRS2007) / California zone 4 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3495,'EPSG',3495,'PROJCS["NAD83(NSRS2007) / California zone 4",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.25],PARAMETER["standard_parallel_2",36],PARAMETER["latitude_of_origin",35.33333333333334],PARAMETER["central_meridian",-119],PARAMETER["false_easting",2000000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","3495"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.25 +lat_2=36 +lat_0=35.33333333333334 +lon_0=-119 +x_0=2000000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3495,'EPSG',3495,'PROJCS["NAD83(NSRS2007) / California zone 4",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.25],PARAMETER["standard_parallel_2",36],PARAMETER["latitude_of_origin",35.33333333333334],PARAMETER["central_meridian",-119],PARAMETER["false_easting",2000000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","3495"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.25 +lat_2=36 +lat_0=35.33333333333334 +lon_0=-119 +x_0=2000000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3496 : NAD83(NSRS2007) / California zone 4 (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3496,'EPSG',3496,'PROJCS["NAD83(NSRS2007) / California zone 4 (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.25],PARAMETER["standard_parallel_2",36],PARAMETER["latitude_of_origin",35.33333333333334],PARAMETER["central_meridian",-119],PARAMETER["false_easting",6561666.667],PARAMETER["false_northing",1640416.667],AUTHORITY["EPSG","3496"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.25 +lat_2=36 +lat_0=35.33333333333334 +lon_0=-119 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3496,'EPSG',3496,'PROJCS["NAD83(NSRS2007) / California zone 4 (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.25],PARAMETER["standard_parallel_2",36],PARAMETER["latitude_of_origin",35.33333333333334],PARAMETER["central_meridian",-119],PARAMETER["false_easting",6561666.667],PARAMETER["false_northing",1640416.667],AUTHORITY["EPSG","3496"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.25 +lat_2=36 +lat_0=35.33333333333334 +lon_0=-119 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3497 : NAD83(NSRS2007) / California zone 5 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3497,'EPSG',3497,'PROJCS["NAD83(NSRS2007) / California zone 5",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",35.46666666666667],PARAMETER["standard_parallel_2",34.03333333333333],PARAMETER["latitude_of_origin",33.5],PARAMETER["central_meridian",-118],PARAMETER["false_easting",2000000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","3497"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=35.46666666666667 +lat_2=34.03333333333333 +lat_0=33.5 +lon_0=-118 +x_0=2000000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3497,'EPSG',3497,'PROJCS["NAD83(NSRS2007) / California zone 5",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",35.46666666666667],PARAMETER["standard_parallel_2",34.03333333333333],PARAMETER["latitude_of_origin",33.5],PARAMETER["central_meridian",-118],PARAMETER["false_easting",2000000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","3497"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=35.46666666666667 +lat_2=34.03333333333333 +lat_0=33.5 +lon_0=-118 +x_0=2000000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3498 : NAD83(NSRS2007) / California zone 5 (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3498,'EPSG',3498,'PROJCS["NAD83(NSRS2007) / California zone 5 (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",35.46666666666667],PARAMETER["standard_parallel_2",34.03333333333333],PARAMETER["latitude_of_origin",33.5],PARAMETER["central_meridian",-118],PARAMETER["false_easting",6561666.667],PARAMETER["false_northing",1640416.667],AUTHORITY["EPSG","3498"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=35.46666666666667 +lat_2=34.03333333333333 +lat_0=33.5 +lon_0=-118 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3498,'EPSG',3498,'PROJCS["NAD83(NSRS2007) / California zone 5 (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",35.46666666666667],PARAMETER["standard_parallel_2",34.03333333333333],PARAMETER["latitude_of_origin",33.5],PARAMETER["central_meridian",-118],PARAMETER["false_easting",6561666.667],PARAMETER["false_northing",1640416.667],AUTHORITY["EPSG","3498"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=35.46666666666667 +lat_2=34.03333333333333 +lat_0=33.5 +lon_0=-118 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3499 : NAD83(NSRS2007) / California zone 6 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3499,'EPSG',3499,'PROJCS["NAD83(NSRS2007) / California zone 6",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",33.88333333333333],PARAMETER["standard_parallel_2",32.78333333333333],PARAMETER["latitude_of_origin",32.16666666666666],PARAMETER["central_meridian",-116.25],PARAMETER["false_easting",2000000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","3499"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=33.88333333333333 +lat_2=32.78333333333333 +lat_0=32.16666666666666 +lon_0=-116.25 +x_0=2000000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3499,'EPSG',3499,'PROJCS["NAD83(NSRS2007) / California zone 6",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",33.88333333333333],PARAMETER["standard_parallel_2",32.78333333333333],PARAMETER["latitude_of_origin",32.16666666666666],PARAMETER["central_meridian",-116.25],PARAMETER["false_easting",2000000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","3499"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=33.88333333333333 +lat_2=32.78333333333333 +lat_0=32.16666666666666 +lon_0=-116.25 +x_0=2000000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3500 : NAD83(NSRS2007) / California zone 6 (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3500,'EPSG',3500,'PROJCS["NAD83(NSRS2007) / California zone 6 (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",33.88333333333333],PARAMETER["standard_parallel_2",32.78333333333333],PARAMETER["latitude_of_origin",32.16666666666666],PARAMETER["central_meridian",-116.25],PARAMETER["false_easting",6561666.667],PARAMETER["false_northing",1640416.667],AUTHORITY["EPSG","3500"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=33.88333333333333 +lat_2=32.78333333333333 +lat_0=32.16666666666666 +lon_0=-116.25 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3500,'EPSG',3500,'PROJCS["NAD83(NSRS2007) / California zone 6 (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",33.88333333333333],PARAMETER["standard_parallel_2",32.78333333333333],PARAMETER["latitude_of_origin",32.16666666666666],PARAMETER["central_meridian",-116.25],PARAMETER["false_easting",6561666.667],PARAMETER["false_northing",1640416.667],AUTHORITY["EPSG","3500"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=33.88333333333333 +lat_2=32.78333333333333 +lat_0=32.16666666666666 +lon_0=-116.25 +x_0=2000000.0001016 +y_0=500000.0001016001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3501 : NAD83(NSRS2007) / Colorado Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3501,'EPSG',3501,'PROJCS["NAD83(NSRS2007) / Colorado Central",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.75],PARAMETER["standard_parallel_2",38.45],PARAMETER["latitude_of_origin",37.83333333333334],PARAMETER["central_meridian",-105.5],PARAMETER["false_easting",914401.8289],PARAMETER["false_northing",304800.6096],AUTHORITY["EPSG","3501"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.75 +lat_2=38.45 +lat_0=37.83333333333334 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3501,'EPSG',3501,'PROJCS["NAD83(NSRS2007) / Colorado Central",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.75],PARAMETER["standard_parallel_2",38.45],PARAMETER["latitude_of_origin",37.83333333333334],PARAMETER["central_meridian",-105.5],PARAMETER["false_easting",914401.8289],PARAMETER["false_northing",304800.6096],AUTHORITY["EPSG","3501"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.75 +lat_2=38.45 +lat_0=37.83333333333334 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3502 : NAD83(NSRS2007) / Colorado Central (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3502,'EPSG',3502,'PROJCS["NAD83(NSRS2007) / Colorado Central (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.75],PARAMETER["standard_parallel_2",38.45],PARAMETER["latitude_of_origin",37.83333333333334],PARAMETER["central_meridian",-105.5],PARAMETER["false_easting",3000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","3502"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.75 +lat_2=38.45 +lat_0=37.83333333333334 +lon_0=-105.5 +x_0=914401.8288036576 +y_0=304800.6096012192 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3502,'EPSG',3502,'PROJCS["NAD83(NSRS2007) / Colorado Central (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.75],PARAMETER["standard_parallel_2",38.45],PARAMETER["latitude_of_origin",37.83333333333334],PARAMETER["central_meridian",-105.5],PARAMETER["false_easting",3000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","3502"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.75 +lat_2=38.45 +lat_0=37.83333333333334 +lon_0=-105.5 +x_0=914401.8288036576 +y_0=304800.6096012192 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3503 : NAD83(NSRS2007) / Colorado North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3503,'EPSG',3503,'PROJCS["NAD83(NSRS2007) / Colorado North",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.78333333333333],PARAMETER["standard_parallel_2",39.71666666666667],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-105.5],PARAMETER["false_easting",914401.8289],PARAMETER["false_northing",304800.6096],AUTHORITY["EPSG","3503"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.78333333333333 +lat_2=39.71666666666667 +lat_0=39.33333333333334 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3503,'EPSG',3503,'PROJCS["NAD83(NSRS2007) / Colorado North",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.78333333333333],PARAMETER["standard_parallel_2",39.71666666666667],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-105.5],PARAMETER["false_easting",914401.8289],PARAMETER["false_northing",304800.6096],AUTHORITY["EPSG","3503"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.78333333333333 +lat_2=39.71666666666667 +lat_0=39.33333333333334 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3504 : NAD83(NSRS2007) / Colorado North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3504,'EPSG',3504,'PROJCS["NAD83(NSRS2007) / Colorado North (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.78333333333333],PARAMETER["standard_parallel_2",39.71666666666667],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-105.5],PARAMETER["false_easting",3000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","3504"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.78333333333333 +lat_2=39.71666666666667 +lat_0=39.33333333333334 +lon_0=-105.5 +x_0=914401.8288036576 +y_0=304800.6096012192 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3504,'EPSG',3504,'PROJCS["NAD83(NSRS2007) / Colorado North (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.78333333333333],PARAMETER["standard_parallel_2",39.71666666666667],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-105.5],PARAMETER["false_easting",3000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","3504"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.78333333333333 +lat_2=39.71666666666667 +lat_0=39.33333333333334 +lon_0=-105.5 +x_0=914401.8288036576 +y_0=304800.6096012192 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3505 : NAD83(NSRS2007) / Colorado South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3505,'EPSG',3505,'PROJCS["NAD83(NSRS2007) / Colorado South",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.43333333333333],PARAMETER["standard_parallel_2",37.23333333333333],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-105.5],PARAMETER["false_easting",914401.8289],PARAMETER["false_northing",304800.6096],AUTHORITY["EPSG","3505"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.43333333333333 +lat_2=37.23333333333333 +lat_0=36.66666666666666 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3505,'EPSG',3505,'PROJCS["NAD83(NSRS2007) / Colorado South",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.43333333333333],PARAMETER["standard_parallel_2",37.23333333333333],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-105.5],PARAMETER["false_easting",914401.8289],PARAMETER["false_northing",304800.6096],AUTHORITY["EPSG","3505"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.43333333333333 +lat_2=37.23333333333333 +lat_0=36.66666666666666 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3506 : NAD83(NSRS2007) / Colorado South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3506,'EPSG',3506,'PROJCS["NAD83(NSRS2007) / Colorado South (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.43333333333333],PARAMETER["standard_parallel_2",37.23333333333333],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-105.5],PARAMETER["false_easting",3000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","3506"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.43333333333333 +lat_2=37.23333333333333 +lat_0=36.66666666666666 +lon_0=-105.5 +x_0=914401.8288036576 +y_0=304800.6096012192 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3506,'EPSG',3506,'PROJCS["NAD83(NSRS2007) / Colorado South (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.43333333333333],PARAMETER["standard_parallel_2",37.23333333333333],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-105.5],PARAMETER["false_easting",3000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","3506"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.43333333333333 +lat_2=37.23333333333333 +lat_0=36.66666666666666 +lon_0=-105.5 +x_0=914401.8288036576 +y_0=304800.6096012192 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3507 : NAD83(NSRS2007) / Connecticut --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3507,'EPSG',3507,'PROJCS["NAD83(NSRS2007) / Connecticut",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.86666666666667],PARAMETER["standard_parallel_2",41.2],PARAMETER["latitude_of_origin",40.83333333333334],PARAMETER["central_meridian",-72.75],PARAMETER["false_easting",304800.6096],PARAMETER["false_northing",152400.3048],AUTHORITY["EPSG","3507"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.86666666666667 +lat_2=41.2 +lat_0=40.83333333333334 +lon_0=-72.75 +x_0=304800.6096 +y_0=152400.3048 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3507,'EPSG',3507,'PROJCS["NAD83(NSRS2007) / Connecticut",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.86666666666667],PARAMETER["standard_parallel_2",41.2],PARAMETER["latitude_of_origin",40.83333333333334],PARAMETER["central_meridian",-72.75],PARAMETER["false_easting",304800.6096],PARAMETER["false_northing",152400.3048],AUTHORITY["EPSG","3507"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.86666666666667 +lat_2=41.2 +lat_0=40.83333333333334 +lon_0=-72.75 +x_0=304800.6096 +y_0=152400.3048 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3508 : NAD83(NSRS2007) / Connecticut (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3508,'EPSG',3508,'PROJCS["NAD83(NSRS2007) / Connecticut (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.86666666666667],PARAMETER["standard_parallel_2",41.2],PARAMETER["latitude_of_origin",40.83333333333334],PARAMETER["central_meridian",-72.75],PARAMETER["false_easting",1000000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","3508"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.86666666666667 +lat_2=41.2 +lat_0=40.83333333333334 +lon_0=-72.75 +x_0=304800.6096012192 +y_0=152400.3048006096 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3508,'EPSG',3508,'PROJCS["NAD83(NSRS2007) / Connecticut (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.86666666666667],PARAMETER["standard_parallel_2",41.2],PARAMETER["latitude_of_origin",40.83333333333334],PARAMETER["central_meridian",-72.75],PARAMETER["false_easting",1000000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","3508"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.86666666666667 +lat_2=41.2 +lat_0=40.83333333333334 +lon_0=-72.75 +x_0=304800.6096012192 +y_0=152400.3048006096 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3509 : NAD83(NSRS2007) / Delaware --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3509,'EPSG',3509,'PROJCS["NAD83(NSRS2007) / Delaware",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",38],PARAMETER["central_meridian",-75.41666666666667],PARAMETER["scale_factor",0.999995],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3509"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999995 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3509,'EPSG',3509,'PROJCS["NAD83(NSRS2007) / Delaware",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",38],PARAMETER["central_meridian",-75.41666666666667],PARAMETER["scale_factor",0.999995],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3509"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999995 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3510 : NAD83(NSRS2007) / Delaware (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3510,'EPSG',3510,'PROJCS["NAD83(NSRS2007) / Delaware (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",38],PARAMETER["central_meridian",-75.41666666666667],PARAMETER["scale_factor",0.999995],PARAMETER["false_easting",656166.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3510"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999995 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3510,'EPSG',3510,'PROJCS["NAD83(NSRS2007) / Delaware (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",38],PARAMETER["central_meridian",-75.41666666666667],PARAMETER["scale_factor",0.999995],PARAMETER["false_easting",656166.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3510"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999995 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3511 : NAD83(NSRS2007) / Florida East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3511,'EPSG',3511,'PROJCS["NAD83(NSRS2007) / Florida East",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",24.33333333333333],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3511"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999941177 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3511,'EPSG',3511,'PROJCS["NAD83(NSRS2007) / Florida East",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",24.33333333333333],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3511"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999941177 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3512 : NAD83(NSRS2007) / Florida East (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3512,'EPSG',3512,'PROJCS["NAD83(NSRS2007) / Florida East (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",24.33333333333333],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",656166.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3512"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999941177 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3512,'EPSG',3512,'PROJCS["NAD83(NSRS2007) / Florida East (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",24.33333333333333],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",656166.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3512"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999941177 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3513 : NAD83(NSRS2007) / Florida GDL Albers --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3513,'EPSG',3513,'PROJCS["NAD83(NSRS2007) / Florida GDL Albers",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",24],PARAMETER["standard_parallel_2",31.5],PARAMETER["latitude_of_center",24],PARAMETER["longitude_of_center",-84],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3513"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=aea +lat_1=24 +lat_2=31.5 +lat_0=24 +lon_0=-84 +x_0=400000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3513,'EPSG',3513,'PROJCS["NAD83(NSRS2007) / Florida GDL Albers",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",24],PARAMETER["standard_parallel_2",31.5],PARAMETER["latitude_of_center",24],PARAMETER["longitude_of_center",-84],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3513"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=aea +lat_1=24 +lat_2=31.5 +lat_0=24 +lon_0=-84 +x_0=400000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3514 : NAD83(NSRS2007) / Florida North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3514,'EPSG',3514,'PROJCS["NAD83(NSRS2007) / Florida North",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",30.75],PARAMETER["standard_parallel_2",29.58333333333333],PARAMETER["latitude_of_origin",29],PARAMETER["central_meridian",-84.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3514"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=30.75 +lat_2=29.58333333333333 +lat_0=29 +lon_0=-84.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3514,'EPSG',3514,'PROJCS["NAD83(NSRS2007) / Florida North",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",30.75],PARAMETER["standard_parallel_2",29.58333333333333],PARAMETER["latitude_of_origin",29],PARAMETER["central_meridian",-84.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3514"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=30.75 +lat_2=29.58333333333333 +lat_0=29 +lon_0=-84.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3515 : NAD83(NSRS2007) / Florida North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3515,'EPSG',3515,'PROJCS["NAD83(NSRS2007) / Florida North (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",30.75],PARAMETER["standard_parallel_2",29.58333333333333],PARAMETER["latitude_of_origin",29],PARAMETER["central_meridian",-84.5],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3515"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=30.75 +lat_2=29.58333333333333 +lat_0=29 +lon_0=-84.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3515,'EPSG',3515,'PROJCS["NAD83(NSRS2007) / Florida North (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",30.75],PARAMETER["standard_parallel_2",29.58333333333333],PARAMETER["latitude_of_origin",29],PARAMETER["central_meridian",-84.5],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3515"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=30.75 +lat_2=29.58333333333333 +lat_0=29 +lon_0=-84.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3516 : NAD83(NSRS2007) / Florida West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3516,'EPSG',3516,'PROJCS["NAD83(NSRS2007) / Florida West",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",24.33333333333333],PARAMETER["central_meridian",-82],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3516"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999941177 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3516,'EPSG',3516,'PROJCS["NAD83(NSRS2007) / Florida West",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",24.33333333333333],PARAMETER["central_meridian",-82],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3516"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999941177 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3517 : NAD83(NSRS2007) / Florida West (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3517,'EPSG',3517,'PROJCS["NAD83(NSRS2007) / Florida West (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",24.33333333333333],PARAMETER["central_meridian",-82],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",656166.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3517"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999941177 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3517,'EPSG',3517,'PROJCS["NAD83(NSRS2007) / Florida West (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",24.33333333333333],PARAMETER["central_meridian",-82],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",656166.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3517"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999941177 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3518 : NAD83(NSRS2007) / Georgia East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3518,'EPSG',3518,'PROJCS["NAD83(NSRS2007) / Georgia East",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",-82.16666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3518"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.9999 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3518,'EPSG',3518,'PROJCS["NAD83(NSRS2007) / Georgia East",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",-82.16666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3518"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.9999 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3519 : NAD83(NSRS2007) / Georgia East (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3519,'EPSG',3519,'PROJCS["NAD83(NSRS2007) / Georgia East (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",-82.16666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",656166.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3519"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.9999 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3519,'EPSG',3519,'PROJCS["NAD83(NSRS2007) / Georgia East (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",-82.16666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",656166.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3519"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.9999 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3520 : NAD83(NSRS2007) / Georgia West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3520,'EPSG',3520,'PROJCS["NAD83(NSRS2007) / Georgia West",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",-84.16666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3520"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.9999 +x_0=700000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3520,'EPSG',3520,'PROJCS["NAD83(NSRS2007) / Georgia West",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",-84.16666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3520"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.9999 +x_0=700000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3521 : NAD83(NSRS2007) / Georgia West (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3521,'EPSG',3521,'PROJCS["NAD83(NSRS2007) / Georgia West (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",-84.16666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",2296583.333],PARAMETER["false_northing",0],AUTHORITY["EPSG","3521"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.9999 +x_0=699999.9998983998 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3521,'EPSG',3521,'PROJCS["NAD83(NSRS2007) / Georgia West (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",-84.16666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",2296583.333],PARAMETER["false_northing",0],AUTHORITY["EPSG","3521"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.9999 +x_0=699999.9998983998 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3522 : NAD83(NSRS2007) / Idaho Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3522,'EPSG',3522,'PROJCS["NAD83(NSRS2007) / Idaho Central",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-114],PARAMETER["scale_factor",0.999947368],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3522"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.9999473679999999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3522,'EPSG',3522,'PROJCS["NAD83(NSRS2007) / Idaho Central",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-114],PARAMETER["scale_factor",0.999947368],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3522"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.9999473679999999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3523 : NAD83(NSRS2007) / Idaho Central (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3523,'EPSG',3523,'PROJCS["NAD83(NSRS2007) / Idaho Central (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-114],PARAMETER["scale_factor",0.999947368],PARAMETER["false_easting",1640416.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3523"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.9999473679999999 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3523,'EPSG',3523,'PROJCS["NAD83(NSRS2007) / Idaho Central (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-114],PARAMETER["scale_factor",0.999947368],PARAMETER["false_easting",1640416.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3523"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.9999473679999999 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3524 : NAD83(NSRS2007) / Idaho East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3524,'EPSG',3524,'PROJCS["NAD83(NSRS2007) / Idaho East",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-112.1666666666667],PARAMETER["scale_factor",0.999947368],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3524"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666666667 +k=0.9999473679999999 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3524,'EPSG',3524,'PROJCS["NAD83(NSRS2007) / Idaho East",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-112.1666666666667],PARAMETER["scale_factor",0.999947368],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3524"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666666667 +k=0.9999473679999999 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3525 : NAD83(NSRS2007) / Idaho East (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3525,'EPSG',3525,'PROJCS["NAD83(NSRS2007) / Idaho East (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-112.1666666666667],PARAMETER["scale_factor",0.999947368],PARAMETER["false_easting",656166.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3525"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666666667 +k=0.9999473679999999 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3525,'EPSG',3525,'PROJCS["NAD83(NSRS2007) / Idaho East (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-112.1666666666667],PARAMETER["scale_factor",0.999947368],PARAMETER["false_easting",656166.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3525"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666666667 +k=0.9999473679999999 +x_0=200000.0001016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3526 : NAD83(NSRS2007) / Idaho West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3526,'EPSG',3526,'PROJCS["NAD83(NSRS2007) / Idaho West",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-115.75],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",800000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3526"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0.999933333 +x_0=800000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3526,'EPSG',3526,'PROJCS["NAD83(NSRS2007) / Idaho West",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-115.75],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",800000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3526"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0.999933333 +x_0=800000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3527 : NAD83(NSRS2007) / Idaho West (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3527,'EPSG',3527,'PROJCS["NAD83(NSRS2007) / Idaho West (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-115.75],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",2624666.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3527"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0.999933333 +x_0=800000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3527,'EPSG',3527,'PROJCS["NAD83(NSRS2007) / Idaho West (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-115.75],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",2624666.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3527"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0.999933333 +x_0=800000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3528 : NAD83(NSRS2007) / Illinois East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3528,'EPSG',3528,'PROJCS["NAD83(NSRS2007) / Illinois East",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-88.33333333333333],PARAMETER["scale_factor",0.999975],PARAMETER["false_easting",300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3528"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333333333 +k=0.9999749999999999 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3528,'EPSG',3528,'PROJCS["NAD83(NSRS2007) / Illinois East",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-88.33333333333333],PARAMETER["scale_factor",0.999975],PARAMETER["false_easting",300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3528"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333333333 +k=0.9999749999999999 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3529 : NAD83(NSRS2007) / Illinois East (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3529,'EPSG',3529,'PROJCS["NAD83(NSRS2007) / Illinois East (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-88.33333333333333],PARAMETER["scale_factor",0.999975],PARAMETER["false_easting",984250.0000000002],PARAMETER["false_northing",0],AUTHORITY["EPSG","3529"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333333333 +k=0.9999749999999999 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3529,'EPSG',3529,'PROJCS["NAD83(NSRS2007) / Illinois East (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-88.33333333333333],PARAMETER["scale_factor",0.999975],PARAMETER["false_easting",984250.0000000002],PARAMETER["false_northing",0],AUTHORITY["EPSG","3529"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333333333 +k=0.9999749999999999 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3530 : NAD83(NSRS2007) / Illinois West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3530,'EPSG',3530,'PROJCS["NAD83(NSRS2007) / Illinois West",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-90.16666666666667],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3530"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666666667 +k=0.999941177 +x_0=700000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3530,'EPSG',3530,'PROJCS["NAD83(NSRS2007) / Illinois West",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-90.16666666666667],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3530"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666666667 +k=0.999941177 +x_0=700000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3531 : NAD83(NSRS2007) / Illinois West (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3531,'EPSG',3531,'PROJCS["NAD83(NSRS2007) / Illinois West (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-90.16666666666667],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",2296583.333300001],PARAMETER["false_northing",0],AUTHORITY["EPSG","3531"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666666667 +k=0.999941177 +x_0=699999.9999898402 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3531,'EPSG',3531,'PROJCS["NAD83(NSRS2007) / Illinois West (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-90.16666666666667],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",2296583.333300001],PARAMETER["false_northing",0],AUTHORITY["EPSG","3531"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666666667 +k=0.999941177 +x_0=699999.9999898402 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3532 : NAD83(NSRS2007) / Indiana East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3532,'EPSG',3532,'PROJCS["NAD83(NSRS2007) / Indiana East",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-85.66666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",100000],PARAMETER["false_northing",250000],AUTHORITY["EPSG","3532"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999966667 +x_0=100000 +y_0=250000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3532,'EPSG',3532,'PROJCS["NAD83(NSRS2007) / Indiana East",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-85.66666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",100000],PARAMETER["false_northing",250000],AUTHORITY["EPSG","3532"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999966667 +x_0=100000 +y_0=250000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3533 : NAD83(NSRS2007) / Indiana East (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3533,'EPSG',3533,'PROJCS["NAD83(NSRS2007) / Indiana East (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-85.66666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",328083.333],PARAMETER["false_northing",820208.3330000002],AUTHORITY["EPSG","3533"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999966667 +x_0=99999.99989839978 +y_0=249999.9998983998 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3533,'EPSG',3533,'PROJCS["NAD83(NSRS2007) / Indiana East (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-85.66666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",328083.333],PARAMETER["false_northing",820208.3330000002],AUTHORITY["EPSG","3533"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999966667 +x_0=99999.99989839978 +y_0=249999.9998983998 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3534 : NAD83(NSRS2007) / Indiana West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3534,'EPSG',3534,'PROJCS["NAD83(NSRS2007) / Indiana West",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-87.08333333333333],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",900000],PARAMETER["false_northing",250000],AUTHORITY["EPSG","3534"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999966667 +x_0=900000 +y_0=250000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3534,'EPSG',3534,'PROJCS["NAD83(NSRS2007) / Indiana West",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-87.08333333333333],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",900000],PARAMETER["false_northing",250000],AUTHORITY["EPSG","3534"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999966667 +x_0=900000 +y_0=250000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3535 : NAD83(NSRS2007) / Indiana West (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3535,'EPSG',3535,'PROJCS["NAD83(NSRS2007) / Indiana West (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-87.08333333333333],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",2952750],PARAMETER["false_northing",820208.3330000002],AUTHORITY["EPSG","3535"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999966667 +x_0=900000 +y_0=249999.9998983998 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3535,'EPSG',3535,'PROJCS["NAD83(NSRS2007) / Indiana West (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-87.08333333333333],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",2952750],PARAMETER["false_northing",820208.3330000002],AUTHORITY["EPSG","3535"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999966667 +x_0=900000 +y_0=249999.9998983998 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3536 : NAD83(NSRS2007) / Iowa North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3536,'EPSG',3536,'PROJCS["NAD83(NSRS2007) / Iowa North",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43.26666666666667],PARAMETER["standard_parallel_2",42.06666666666667],PARAMETER["latitude_of_origin",41.5],PARAMETER["central_meridian",-93.5],PARAMETER["false_easting",1500000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","3536"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43.26666666666667 +lat_2=42.06666666666667 +lat_0=41.5 +lon_0=-93.5 +x_0=1500000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3536,'EPSG',3536,'PROJCS["NAD83(NSRS2007) / Iowa North",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43.26666666666667],PARAMETER["standard_parallel_2",42.06666666666667],PARAMETER["latitude_of_origin",41.5],PARAMETER["central_meridian",-93.5],PARAMETER["false_easting",1500000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","3536"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43.26666666666667 +lat_2=42.06666666666667 +lat_0=41.5 +lon_0=-93.5 +x_0=1500000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3537 : NAD83(NSRS2007) / Iowa North (ft US) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3537,'EPSG',3537,'PROJCS["NAD83(NSRS2007) / Iowa North (ft US)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43.26666666666667],PARAMETER["standard_parallel_2",42.06666666666667],PARAMETER["latitude_of_origin",41.5],PARAMETER["central_meridian",-93.5],PARAMETER["false_easting",4921250],PARAMETER["false_northing",3280833.333300001],AUTHORITY["EPSG","3537"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43.26666666666667 +lat_2=42.06666666666667 +lat_0=41.5 +lon_0=-93.5 +x_0=1500000 +y_0=999999.9999898402 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3537,'EPSG',3537,'PROJCS["NAD83(NSRS2007) / Iowa North (ft US)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43.26666666666667],PARAMETER["standard_parallel_2",42.06666666666667],PARAMETER["latitude_of_origin",41.5],PARAMETER["central_meridian",-93.5],PARAMETER["false_easting",4921250],PARAMETER["false_northing",3280833.333300001],AUTHORITY["EPSG","3537"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43.26666666666667 +lat_2=42.06666666666667 +lat_0=41.5 +lon_0=-93.5 +x_0=1500000 +y_0=999999.9999898402 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3538 : NAD83(NSRS2007) / Iowa South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3538,'EPSG',3538,'PROJCS["NAD83(NSRS2007) / Iowa South",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.78333333333333],PARAMETER["standard_parallel_2",40.61666666666667],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-93.5],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3538"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.78333333333333 +lat_2=40.61666666666667 +lat_0=40 +lon_0=-93.5 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3538,'EPSG',3538,'PROJCS["NAD83(NSRS2007) / Iowa South",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.78333333333333],PARAMETER["standard_parallel_2",40.61666666666667],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-93.5],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3538"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.78333333333333 +lat_2=40.61666666666667 +lat_0=40 +lon_0=-93.5 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3539 : NAD83(NSRS2007) / Iowa South (ft US) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3539,'EPSG',3539,'PROJCS["NAD83(NSRS2007) / Iowa South (ft US)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.78333333333333],PARAMETER["standard_parallel_2",40.61666666666667],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-93.5],PARAMETER["false_easting",1640416.6667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3539"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.78333333333333 +lat_2=40.61666666666667 +lat_0=40 +lon_0=-93.5 +x_0=500000.00001016 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3539,'EPSG',3539,'PROJCS["NAD83(NSRS2007) / Iowa South (ft US)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.78333333333333],PARAMETER["standard_parallel_2",40.61666666666667],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-93.5],PARAMETER["false_easting",1640416.6667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3539"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.78333333333333 +lat_2=40.61666666666667 +lat_0=40 +lon_0=-93.5 +x_0=500000.00001016 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3540 : NAD83(NSRS2007) / Kansas North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3540,'EPSG',3540,'PROJCS["NAD83(NSRS2007) / Kansas North",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.78333333333333],PARAMETER["standard_parallel_2",38.71666666666667],PARAMETER["latitude_of_origin",38.33333333333334],PARAMETER["central_meridian",-98],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3540"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.78333333333333 +lat_2=38.71666666666667 +lat_0=38.33333333333334 +lon_0=-98 +x_0=400000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3540,'EPSG',3540,'PROJCS["NAD83(NSRS2007) / Kansas North",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.78333333333333],PARAMETER["standard_parallel_2",38.71666666666667],PARAMETER["latitude_of_origin",38.33333333333334],PARAMETER["central_meridian",-98],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3540"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.78333333333333 +lat_2=38.71666666666667 +lat_0=38.33333333333334 +lon_0=-98 +x_0=400000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3541 : NAD83(NSRS2007) / Kansas North (ft US) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3541,'EPSG',3541,'PROJCS["NAD83(NSRS2007) / Kansas North (ft US)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.78333333333333],PARAMETER["standard_parallel_2",38.71666666666667],PARAMETER["latitude_of_origin",38.33333333333334],PARAMETER["central_meridian",-98],PARAMETER["false_easting",1312333.3333],PARAMETER["false_northing",0],AUTHORITY["EPSG","3541"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.78333333333333 +lat_2=38.71666666666667 +lat_0=38.33333333333334 +lon_0=-98 +x_0=399999.99998984 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3541,'EPSG',3541,'PROJCS["NAD83(NSRS2007) / Kansas North (ft US)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.78333333333333],PARAMETER["standard_parallel_2",38.71666666666667],PARAMETER["latitude_of_origin",38.33333333333334],PARAMETER["central_meridian",-98],PARAMETER["false_easting",1312333.3333],PARAMETER["false_northing",0],AUTHORITY["EPSG","3541"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.78333333333333 +lat_2=38.71666666666667 +lat_0=38.33333333333334 +lon_0=-98 +x_0=399999.99998984 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3542 : NAD83(NSRS2007) / Kansas South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3542,'EPSG',3542,'PROJCS["NAD83(NSRS2007) / Kansas South",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.56666666666667],PARAMETER["standard_parallel_2",37.26666666666667],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-98.5],PARAMETER["false_easting",400000],PARAMETER["false_northing",400000],AUTHORITY["EPSG","3542"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.56666666666667 +lat_2=37.26666666666667 +lat_0=36.66666666666666 +lon_0=-98.5 +x_0=400000 +y_0=400000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3542,'EPSG',3542,'PROJCS["NAD83(NSRS2007) / Kansas South",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.56666666666667],PARAMETER["standard_parallel_2",37.26666666666667],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-98.5],PARAMETER["false_easting",400000],PARAMETER["false_northing",400000],AUTHORITY["EPSG","3542"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.56666666666667 +lat_2=37.26666666666667 +lat_0=36.66666666666666 +lon_0=-98.5 +x_0=400000 +y_0=400000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3543 : NAD83(NSRS2007) / Kansas South (ft US) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3543,'EPSG',3543,'PROJCS["NAD83(NSRS2007) / Kansas South (ft US)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.56666666666667],PARAMETER["standard_parallel_2",37.26666666666667],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-98.5],PARAMETER["false_easting",1312333.3333],PARAMETER["false_northing",1312333.3333],AUTHORITY["EPSG","3543"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.56666666666667 +lat_2=37.26666666666667 +lat_0=36.66666666666666 +lon_0=-98.5 +x_0=399999.99998984 +y_0=399999.99998984 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3543,'EPSG',3543,'PROJCS["NAD83(NSRS2007) / Kansas South (ft US)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.56666666666667],PARAMETER["standard_parallel_2",37.26666666666667],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-98.5],PARAMETER["false_easting",1312333.3333],PARAMETER["false_northing",1312333.3333],AUTHORITY["EPSG","3543"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.56666666666667 +lat_2=37.26666666666667 +lat_0=36.66666666666666 +lon_0=-98.5 +x_0=399999.99998984 +y_0=399999.99998984 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3544 : NAD83(NSRS2007) / Kentucky North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3544,'EPSG',3544,'PROJCS["NAD83(NSRS2007) / Kentucky North",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.96666666666667],PARAMETER["standard_parallel_2",38.96666666666667],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-84.25],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3544"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.96666666666667 +lat_2=38.96666666666667 +lat_0=37.5 +lon_0=-84.25 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3544,'EPSG',3544,'PROJCS["NAD83(NSRS2007) / Kentucky North",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.96666666666667],PARAMETER["standard_parallel_2",38.96666666666667],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-84.25],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3544"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.96666666666667 +lat_2=38.96666666666667 +lat_0=37.5 +lon_0=-84.25 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3545 : NAD83(NSRS2007) / Kentucky North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3545,'EPSG',3545,'PROJCS["NAD83(NSRS2007) / Kentucky North (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.96666666666667],PARAMETER["standard_parallel_2",38.96666666666667],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-84.25],PARAMETER["false_easting",1640416.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3545"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.96666666666667 +lat_2=38.96666666666667 +lat_0=37.5 +lon_0=-84.25 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3545,'EPSG',3545,'PROJCS["NAD83(NSRS2007) / Kentucky North (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.96666666666667],PARAMETER["standard_parallel_2",38.96666666666667],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-84.25],PARAMETER["false_easting",1640416.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3545"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.96666666666667 +lat_2=38.96666666666667 +lat_0=37.5 +lon_0=-84.25 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3546 : NAD83(NSRS2007) / Kentucky Single Zone --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3546,'EPSG',3546,'PROJCS["NAD83(NSRS2007) / Kentucky Single Zone",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.08333333333334],PARAMETER["standard_parallel_2",38.66666666666666],PARAMETER["latitude_of_origin",36.33333333333334],PARAMETER["central_meridian",-85.75],PARAMETER["false_easting",1500000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","3546"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.08333333333334 +lat_2=38.66666666666666 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=1500000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3546,'EPSG',3546,'PROJCS["NAD83(NSRS2007) / Kentucky Single Zone",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.08333333333334],PARAMETER["standard_parallel_2",38.66666666666666],PARAMETER["latitude_of_origin",36.33333333333334],PARAMETER["central_meridian",-85.75],PARAMETER["false_easting",1500000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","3546"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.08333333333334 +lat_2=38.66666666666666 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=1500000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3547 : NAD83(NSRS2007) / Kentucky Single Zone (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3547,'EPSG',3547,'PROJCS["NAD83(NSRS2007) / Kentucky Single Zone (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.08333333333334],PARAMETER["standard_parallel_2",38.66666666666666],PARAMETER["latitude_of_origin",36.33333333333334],PARAMETER["central_meridian",-85.75],PARAMETER["false_easting",4921250],PARAMETER["false_northing",3280833.333],AUTHORITY["EPSG","3547"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.08333333333334 +lat_2=38.66666666666666 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=1500000 +y_0=999999.9998983998 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3547,'EPSG',3547,'PROJCS["NAD83(NSRS2007) / Kentucky Single Zone (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.08333333333334],PARAMETER["standard_parallel_2",38.66666666666666],PARAMETER["latitude_of_origin",36.33333333333334],PARAMETER["central_meridian",-85.75],PARAMETER["false_easting",4921250],PARAMETER["false_northing",3280833.333],AUTHORITY["EPSG","3547"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.08333333333334 +lat_2=38.66666666666666 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=1500000 +y_0=999999.9998983998 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3548 : NAD83(NSRS2007) / Kentucky South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3548,'EPSG',3548,'PROJCS["NAD83(NSRS2007) / Kentucky South",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.93333333333333],PARAMETER["standard_parallel_2",36.73333333333333],PARAMETER["latitude_of_origin",36.33333333333334],PARAMETER["central_meridian",-85.75],PARAMETER["false_easting",500000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","3548"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.93333333333333 +lat_2=36.73333333333333 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=500000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3548,'EPSG',3548,'PROJCS["NAD83(NSRS2007) / Kentucky South",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.93333333333333],PARAMETER["standard_parallel_2",36.73333333333333],PARAMETER["latitude_of_origin",36.33333333333334],PARAMETER["central_meridian",-85.75],PARAMETER["false_easting",500000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","3548"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.93333333333333 +lat_2=36.73333333333333 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=500000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3549 : NAD83(NSRS2007) / Kentucky South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3549,'EPSG',3549,'PROJCS["NAD83(NSRS2007) / Kentucky South (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.93333333333333],PARAMETER["standard_parallel_2",36.73333333333333],PARAMETER["latitude_of_origin",36.33333333333334],PARAMETER["central_meridian",-85.75],PARAMETER["false_easting",1640416.667],PARAMETER["false_northing",1640416.667],AUTHORITY["EPSG","3549"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.93333333333333 +lat_2=36.73333333333333 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=500000.0001016001 +y_0=500000.0001016001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3549,'EPSG',3549,'PROJCS["NAD83(NSRS2007) / Kentucky South (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.93333333333333],PARAMETER["standard_parallel_2",36.73333333333333],PARAMETER["latitude_of_origin",36.33333333333334],PARAMETER["central_meridian",-85.75],PARAMETER["false_easting",1640416.667],PARAMETER["false_northing",1640416.667],AUTHORITY["EPSG","3549"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.93333333333333 +lat_2=36.73333333333333 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=500000.0001016001 +y_0=500000.0001016001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3550 : NAD83(NSRS2007) / Louisiana North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3550,'EPSG',3550,'PROJCS["NAD83(NSRS2007) / Louisiana North",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",32.66666666666666],PARAMETER["standard_parallel_2",31.16666666666667],PARAMETER["latitude_of_origin",30.5],PARAMETER["central_meridian",-92.5],PARAMETER["false_easting",1000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3550"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=32.66666666666666 +lat_2=31.16666666666667 +lat_0=30.5 +lon_0=-92.5 +x_0=1000000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3550,'EPSG',3550,'PROJCS["NAD83(NSRS2007) / Louisiana North",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",32.66666666666666],PARAMETER["standard_parallel_2",31.16666666666667],PARAMETER["latitude_of_origin",30.5],PARAMETER["central_meridian",-92.5],PARAMETER["false_easting",1000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3550"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=32.66666666666666 +lat_2=31.16666666666667 +lat_0=30.5 +lon_0=-92.5 +x_0=1000000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3551 : NAD83(NSRS2007) / Louisiana North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3551,'EPSG',3551,'PROJCS["NAD83(NSRS2007) / Louisiana North (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",32.66666666666666],PARAMETER["standard_parallel_2",31.16666666666667],PARAMETER["latitude_of_origin",30.5],PARAMETER["central_meridian",-92.5],PARAMETER["false_easting",3280833.333300001],PARAMETER["false_northing",0],AUTHORITY["EPSG","3551"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=32.66666666666666 +lat_2=31.16666666666667 +lat_0=30.5 +lon_0=-92.5 +x_0=999999.9999898402 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3551,'EPSG',3551,'PROJCS["NAD83(NSRS2007) / Louisiana North (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",32.66666666666666],PARAMETER["standard_parallel_2",31.16666666666667],PARAMETER["latitude_of_origin",30.5],PARAMETER["central_meridian",-92.5],PARAMETER["false_easting",3280833.333300001],PARAMETER["false_northing",0],AUTHORITY["EPSG","3551"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=32.66666666666666 +lat_2=31.16666666666667 +lat_0=30.5 +lon_0=-92.5 +x_0=999999.9999898402 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3552 : NAD83(NSRS2007) / Louisiana South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3552,'EPSG',3552,'PROJCS["NAD83(NSRS2007) / Louisiana South",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",30.7],PARAMETER["standard_parallel_2",29.3],PARAMETER["latitude_of_origin",28.5],PARAMETER["central_meridian",-91.33333333333333],PARAMETER["false_easting",1000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3552"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=30.7 +lat_2=29.3 +lat_0=28.5 +lon_0=-91.33333333333333 +x_0=1000000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3552,'EPSG',3552,'PROJCS["NAD83(NSRS2007) / Louisiana South",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",30.7],PARAMETER["standard_parallel_2",29.3],PARAMETER["latitude_of_origin",28.5],PARAMETER["central_meridian",-91.33333333333333],PARAMETER["false_easting",1000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3552"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=30.7 +lat_2=29.3 +lat_0=28.5 +lon_0=-91.33333333333333 +x_0=1000000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3553 : NAD83(NSRS2007) / Louisiana South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3553,'EPSG',3553,'PROJCS["NAD83(NSRS2007) / Louisiana South (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",30.7],PARAMETER["standard_parallel_2",29.3],PARAMETER["latitude_of_origin",28.5],PARAMETER["central_meridian",-91.33333333333333],PARAMETER["false_easting",3280833.333300001],PARAMETER["false_northing",0],AUTHORITY["EPSG","3553"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=30.7 +lat_2=29.3 +lat_0=28.5 +lon_0=-91.33333333333333 +x_0=999999.9999898402 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3553,'EPSG',3553,'PROJCS["NAD83(NSRS2007) / Louisiana South (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",30.7],PARAMETER["standard_parallel_2",29.3],PARAMETER["latitude_of_origin",28.5],PARAMETER["central_meridian",-91.33333333333333],PARAMETER["false_easting",3280833.333300001],PARAMETER["false_northing",0],AUTHORITY["EPSG","3553"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=30.7 +lat_2=29.3 +lat_0=28.5 +lon_0=-91.33333333333333 +x_0=999999.9999898402 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3554 : NAD83(NSRS2007) / Maine CS2000 Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3554,'EPSG',3554,'PROJCS["NAD83(NSRS2007) / Maine CS2000 Central",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",43.5],PARAMETER["central_meridian",-69.125],PARAMETER["scale_factor",0.99998],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3554"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=43.5 +lon_0=-69.125 +k=0.99998 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3554,'EPSG',3554,'PROJCS["NAD83(NSRS2007) / Maine CS2000 Central",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",43.5],PARAMETER["central_meridian",-69.125],PARAMETER["scale_factor",0.99998],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3554"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=43.5 +lon_0=-69.125 +k=0.99998 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3555 : NAD83(NSRS2007) / Maine CS2000 East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3555,'EPSG',3555,'PROJCS["NAD83(NSRS2007) / Maine CS2000 East",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",43.83333333333334],PARAMETER["central_meridian",-67.875],PARAMETER["scale_factor",0.99998],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3555"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=43.83333333333334 +lon_0=-67.875 +k=0.99998 +x_0=700000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3555,'EPSG',3555,'PROJCS["NAD83(NSRS2007) / Maine CS2000 East",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",43.83333333333334],PARAMETER["central_meridian",-67.875],PARAMETER["scale_factor",0.99998],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3555"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=43.83333333333334 +lon_0=-67.875 +k=0.99998 +x_0=700000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3556 : NAD83(NSRS2007) / Maine CS2000 West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3556,'EPSG',3556,'PROJCS["NAD83(NSRS2007) / Maine CS2000 West",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.83333333333334],PARAMETER["central_meridian",-70.375],PARAMETER["scale_factor",0.99998],PARAMETER["false_easting",300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3556"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.375 +k=0.99998 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3556,'EPSG',3556,'PROJCS["NAD83(NSRS2007) / Maine CS2000 West",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.83333333333334],PARAMETER["central_meridian",-70.375],PARAMETER["scale_factor",0.99998],PARAMETER["false_easting",300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3556"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.375 +k=0.99998 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3557 : NAD83(NSRS2007) / Maine East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3557,'EPSG',3557,'PROJCS["NAD83(NSRS2007) / Maine East",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",43.66666666666666],PARAMETER["central_meridian",-68.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3557"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.9999 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3557,'EPSG',3557,'PROJCS["NAD83(NSRS2007) / Maine East",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",43.66666666666666],PARAMETER["central_meridian",-68.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3557"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.9999 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3558 : NAD83(NSRS2007) / Maine West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3558,'EPSG',3558,'PROJCS["NAD83(NSRS2007) / Maine West",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.83333333333334],PARAMETER["central_meridian",-70.16666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",900000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3558"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666666667 +k=0.999966667 +x_0=900000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3558,'EPSG',3558,'PROJCS["NAD83(NSRS2007) / Maine West",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.83333333333334],PARAMETER["central_meridian",-70.16666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",900000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3558"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666666667 +k=0.999966667 +x_0=900000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3559 : NAD83(NSRS2007) / Maryland --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3559,'EPSG',3559,'PROJCS["NAD83(NSRS2007) / Maryland",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.45],PARAMETER["standard_parallel_2",38.3],PARAMETER["latitude_of_origin",37.66666666666666],PARAMETER["central_meridian",-77],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3559"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.45 +lat_2=38.3 +lat_0=37.66666666666666 +lon_0=-77 +x_0=400000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3559,'EPSG',3559,'PROJCS["NAD83(NSRS2007) / Maryland",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.45],PARAMETER["standard_parallel_2",38.3],PARAMETER["latitude_of_origin",37.66666666666666],PARAMETER["central_meridian",-77],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3559"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.45 +lat_2=38.3 +lat_0=37.66666666666666 +lon_0=-77 +x_0=400000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3560 : NAD83 / Utah North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3560,'EPSG',3560,'PROJCS["NAD83 / Utah North (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.78333333333333],PARAMETER["standard_parallel_2",40.71666666666667],PARAMETER["latitude_of_origin",40.33333333333334],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",1640416.6667],PARAMETER["false_northing",3280833.333300001],AUTHORITY["EPSG","3560"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.78333333333333 +lat_2=40.71666666666667 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000.00001016 +y_0=999999.9999898402 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3560,'EPSG',3560,'PROJCS["NAD83 / Utah North (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.78333333333333],PARAMETER["standard_parallel_2",40.71666666666667],PARAMETER["latitude_of_origin",40.33333333333334],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",1640416.6667],PARAMETER["false_northing",3280833.333300001],AUTHORITY["EPSG","3560"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.78333333333333 +lat_2=40.71666666666667 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000.00001016 +y_0=999999.9999898402 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3561 : Old Hawaiian / Hawaii zone 1 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3561,'EPSG',3561,'PROJCS["Old Hawaiian / Hawaii zone 1",GEOGCS["Old Hawaiian",DATUM["Old_Hawaiian",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6135"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4135"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",18.83333333333333],PARAMETER["central_meridian",-155.5],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3561"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=18.83333333333333 +lon_0=-155.5 +k=0.999966667 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3561,'EPSG',3561,'PROJCS["Old Hawaiian / Hawaii zone 1",GEOGCS["Old Hawaiian",DATUM["Old_Hawaiian",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[61,-285,-181,0,0,0,0],AUTHORITY["EPSG","6135"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4135"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",18.83333333333333],PARAMETER["central_meridian",-155.5],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3561"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=18.83333333333333 +lon_0=-155.5 +k=0.999966667 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +towgs84=61,-285,-181,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3562 : Old Hawaiian / Hawaii zone 2 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3562,'EPSG',3562,'PROJCS["Old Hawaiian / Hawaii zone 2",GEOGCS["Old Hawaiian",DATUM["Old_Hawaiian",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6135"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4135"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",20.33333333333333],PARAMETER["central_meridian",-156.6666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3562"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=20.33333333333333 +lon_0=-156.6666666666667 +k=0.999966667 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3562,'EPSG',3562,'PROJCS["Old Hawaiian / Hawaii zone 2",GEOGCS["Old Hawaiian",DATUM["Old_Hawaiian",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[61,-285,-181,0,0,0,0],AUTHORITY["EPSG","6135"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4135"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",20.33333333333333],PARAMETER["central_meridian",-156.6666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3562"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=20.33333333333333 +lon_0=-156.6666666666667 +k=0.999966667 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +towgs84=61,-285,-181,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3563 : Old Hawaiian / Hawaii zone 3 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3563,'EPSG',3563,'PROJCS["Old Hawaiian / Hawaii zone 3",GEOGCS["Old Hawaiian",DATUM["Old_Hawaiian",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6135"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4135"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",21.16666666666667],PARAMETER["central_meridian",-158],PARAMETER["scale_factor",0.99999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3563"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=21.16666666666667 +lon_0=-158 +k=0.99999 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3563,'EPSG',3563,'PROJCS["Old Hawaiian / Hawaii zone 3",GEOGCS["Old Hawaiian",DATUM["Old_Hawaiian",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[61,-285,-181,0,0,0,0],AUTHORITY["EPSG","6135"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4135"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",21.16666666666667],PARAMETER["central_meridian",-158],PARAMETER["scale_factor",0.99999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3563"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=21.16666666666667 +lon_0=-158 +k=0.99999 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +towgs84=61,-285,-181,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3564 : Old Hawaiian / Hawaii zone 4 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3564,'EPSG',3564,'PROJCS["Old Hawaiian / Hawaii zone 4",GEOGCS["Old Hawaiian",DATUM["Old_Hawaiian",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6135"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4135"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",21.83333333333333],PARAMETER["central_meridian",-159.5],PARAMETER["scale_factor",0.99999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3564"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=21.83333333333333 +lon_0=-159.5 +k=0.99999 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3564,'EPSG',3564,'PROJCS["Old Hawaiian / Hawaii zone 4",GEOGCS["Old Hawaiian",DATUM["Old_Hawaiian",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[61,-285,-181,0,0,0,0],AUTHORITY["EPSG","6135"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4135"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",21.83333333333333],PARAMETER["central_meridian",-159.5],PARAMETER["scale_factor",0.99999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3564"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=21.83333333333333 +lon_0=-159.5 +k=0.99999 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +towgs84=61,-285,-181,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3565 : Old Hawaiian / Hawaii zone 5 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3565,'EPSG',3565,'PROJCS["Old Hawaiian / Hawaii zone 5",GEOGCS["Old Hawaiian",DATUM["Old_Hawaiian",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6135"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4135"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",21.66666666666667],PARAMETER["central_meridian",-160.1666666666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3565"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=21.66666666666667 +lon_0=-160.1666666666667 +k=1 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3565,'EPSG',3565,'PROJCS["Old Hawaiian / Hawaii zone 5",GEOGCS["Old Hawaiian",DATUM["Old_Hawaiian",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[61,-285,-181,0,0,0,0],AUTHORITY["EPSG","6135"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4135"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",21.66666666666667],PARAMETER["central_meridian",-160.1666666666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3565"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=21.66666666666667 +lon_0=-160.1666666666667 +k=1 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +towgs84=61,-285,-181,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3566 : NAD83 / Utah Central (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3566,'EPSG',3566,'PROJCS["NAD83 / Utah Central (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.65],PARAMETER["standard_parallel_2",39.01666666666667],PARAMETER["latitude_of_origin",38.33333333333334],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",1640416.6667],PARAMETER["false_northing",6561666.666700001],AUTHORITY["EPSG","3566"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.65 +lat_2=39.01666666666667 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=500000.00001016 +y_0=2000000.00001016 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3566,'EPSG',3566,'PROJCS["NAD83 / Utah Central (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.65],PARAMETER["standard_parallel_2",39.01666666666667],PARAMETER["latitude_of_origin",38.33333333333334],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",1640416.6667],PARAMETER["false_northing",6561666.666700001],AUTHORITY["EPSG","3566"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.65 +lat_2=39.01666666666667 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=500000.00001016 +y_0=2000000.00001016 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3567 : NAD83 / Utah South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3567,'EPSG',3567,'PROJCS["NAD83 / Utah South (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.35],PARAMETER["standard_parallel_2",37.21666666666667],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",1640416.6667],PARAMETER["false_northing",9842500.000000002],AUTHORITY["EPSG","3567"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.35 +lat_2=37.21666666666667 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=500000.00001016 +y_0=3000000 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3567,'EPSG',3567,'PROJCS["NAD83 / Utah South (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.35],PARAMETER["standard_parallel_2",37.21666666666667],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",1640416.6667],PARAMETER["false_northing",9842500.000000002],AUTHORITY["EPSG","3567"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.35 +lat_2=37.21666666666667 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=500000.00001016 +y_0=3000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3568 : NAD83(HARN) / Utah North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3568,'EPSG',3568,'PROJCS["NAD83(HARN) / Utah North (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.78333333333333],PARAMETER["standard_parallel_2",40.71666666666667],PARAMETER["latitude_of_origin",40.33333333333334],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",1640416.6667],PARAMETER["false_northing",3280833.333300001],AUTHORITY["EPSG","3568"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.78333333333333 +lat_2=40.71666666666667 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000.00001016 +y_0=999999.9999898402 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3568,'EPSG',3568,'PROJCS["NAD83(HARN) / Utah North (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.78333333333333],PARAMETER["standard_parallel_2",40.71666666666667],PARAMETER["latitude_of_origin",40.33333333333334],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",1640416.6667],PARAMETER["false_northing",3280833.333300001],AUTHORITY["EPSG","3568"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.78333333333333 +lat_2=40.71666666666667 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000.00001016 +y_0=999999.9999898402 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3569 : NAD83(HARN) / Utah Central (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3569,'EPSG',3569,'PROJCS["NAD83(HARN) / Utah Central (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.65],PARAMETER["standard_parallel_2",39.01666666666667],PARAMETER["latitude_of_origin",38.33333333333334],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",1640416.6667],PARAMETER["false_northing",6561666.666700001],AUTHORITY["EPSG","3569"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.65 +lat_2=39.01666666666667 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=500000.00001016 +y_0=2000000.00001016 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3569,'EPSG',3569,'PROJCS["NAD83(HARN) / Utah Central (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.65],PARAMETER["standard_parallel_2",39.01666666666667],PARAMETER["latitude_of_origin",38.33333333333334],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",1640416.6667],PARAMETER["false_northing",6561666.666700001],AUTHORITY["EPSG","3569"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.65 +lat_2=39.01666666666667 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=500000.00001016 +y_0=2000000.00001016 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3570 : NAD83(HARN) / Utah South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3570,'EPSG',3570,'PROJCS["NAD83(HARN) / Utah South (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.35],PARAMETER["standard_parallel_2",37.21666666666667],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",1640416.6667],PARAMETER["false_northing",9842500.000000002],AUTHORITY["EPSG","3570"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.35 +lat_2=37.21666666666667 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=500000.00001016 +y_0=3000000 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3570,'EPSG',3570,'PROJCS["NAD83(HARN) / Utah South (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.35],PARAMETER["standard_parallel_2",37.21666666666667],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",1640416.6667],PARAMETER["false_northing",9842500.000000002],AUTHORITY["EPSG","3570"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.35 +lat_2=37.21666666666667 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=500000.00001016 +y_0=3000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3571 : WGS 84 / North Pole LAEA Bering Sea --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3571,'EPSG',3571,'PROJCS["WGS 84 / North Pole LAEA Bering Sea",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["latitude_of_center",90],PARAMETER["longitude_of_center",180],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3571"],AXIS["X",UNKNOWN],AXIS["Y",UNKNOWN]]','+proj=laea +lat_0=90 +lon_0=180 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3571,'EPSG',3571,'PROJCS["WGS 84 / North Pole LAEA Bering Sea",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["latitude_of_center",90],PARAMETER["longitude_of_center",180],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3571"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=laea +lat_0=90 +lon_0=180 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3572 : WGS 84 / North Pole LAEA Alaska --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3572,'EPSG',3572,'PROJCS["WGS 84 / North Pole LAEA Alaska",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["latitude_of_center",90],PARAMETER["longitude_of_center",-150],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3572"],AXIS["X",UNKNOWN],AXIS["Y",UNKNOWN]]','+proj=laea +lat_0=90 +lon_0=-150 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3572,'EPSG',3572,'PROJCS["WGS 84 / North Pole LAEA Alaska",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["latitude_of_center",90],PARAMETER["longitude_of_center",-150],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3572"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=laea +lat_0=90 +lon_0=-150 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3573 : WGS 84 / North Pole LAEA Canada --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3573,'EPSG',3573,'PROJCS["WGS 84 / North Pole LAEA Canada",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["latitude_of_center",90],PARAMETER["longitude_of_center",-100],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3573"],AXIS["X",UNKNOWN],AXIS["Y",UNKNOWN]]','+proj=laea +lat_0=90 +lon_0=-100 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3573,'EPSG',3573,'PROJCS["WGS 84 / North Pole LAEA Canada",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["latitude_of_center",90],PARAMETER["longitude_of_center",-100],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3573"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=laea +lat_0=90 +lon_0=-100 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3574 : WGS 84 / North Pole LAEA Atlantic --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3574,'EPSG',3574,'PROJCS["WGS 84 / North Pole LAEA Atlantic",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["latitude_of_center",90],PARAMETER["longitude_of_center",-40],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3574"],AXIS["X",UNKNOWN],AXIS["Y",UNKNOWN]]','+proj=laea +lat_0=90 +lon_0=-40 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3574,'EPSG',3574,'PROJCS["WGS 84 / North Pole LAEA Atlantic",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["latitude_of_center",90],PARAMETER["longitude_of_center",-40],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3574"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=laea +lat_0=90 +lon_0=-40 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3575 : WGS 84 / North Pole LAEA Europe --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3575,'EPSG',3575,'PROJCS["WGS 84 / North Pole LAEA Europe",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["latitude_of_center",90],PARAMETER["longitude_of_center",10],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3575"],AXIS["X",UNKNOWN],AXIS["Y",UNKNOWN]]','+proj=laea +lat_0=90 +lon_0=10 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3575,'EPSG',3575,'PROJCS["WGS 84 / North Pole LAEA Europe",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["latitude_of_center",90],PARAMETER["longitude_of_center",10],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3575"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=laea +lat_0=90 +lon_0=10 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3576 : WGS 84 / North Pole LAEA Russia --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3576,'EPSG',3576,'PROJCS["WGS 84 / North Pole LAEA Russia",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["latitude_of_center",90],PARAMETER["longitude_of_center",90],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3576"],AXIS["X",UNKNOWN],AXIS["Y",UNKNOWN]]','+proj=laea +lat_0=90 +lon_0=90 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3576,'EPSG',3576,'PROJCS["WGS 84 / North Pole LAEA Russia",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["latitude_of_center",90],PARAMETER["longitude_of_center",90],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3576"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=laea +lat_0=90 +lon_0=90 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3577 : GDA94 / Australian Albers --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3577,'EPSG',3577,'PROJCS["GDA94 / Australian Albers",GEOGCS["GDA94",DATUM["Geocentric_Datum_of_Australia_1994",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6283"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4283"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",-18],PARAMETER["standard_parallel_2",-36],PARAMETER["latitude_of_center",0],PARAMETER["longitude_of_center",132],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3577"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=aea +lat_1=-18 +lat_2=-36 +lat_0=0 +lon_0=132 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3577,'EPSG',3577,'PROJCS["GDA94 / Australian Albers",GEOGCS["GDA94",DATUM["Geocentric_Datum_of_Australia_1994",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6283"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4283"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",-18],PARAMETER["standard_parallel_2",-36],PARAMETER["latitude_of_center",0],PARAMETER["longitude_of_center",132],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3577"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=aea +lat_1=-18 +lat_2=-36 +lat_0=0 +lon_0=132 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3578 : NAD83 / Yukon Albers --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3578,'EPSG',3578,'PROJCS["NAD83 / Yukon Albers",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["metre",1,AUTHORITY["EPSG","9001"]],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],AUTHORITY["EPSG","3578"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=aea +lat_1=61.66666666666666 +lat_2=68 +lat_0=59 +lon_0=-132.5 +x_0=500000 +y_0=500000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3578,'EPSG',3578,'PROJCS["NAD83 / Yukon Albers",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],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],AUTHORITY["EPSG","3578"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=aea +lat_1=61.66666666666666 +lat_2=68 +lat_0=59 +lon_0=-132.5 +x_0=500000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3579 : NAD83(CSRS) / Yukon Albers --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3579,'EPSG',3579,'PROJCS["NAD83(CSRS) / Yukon Albers",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],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],AUTHORITY["EPSG","3579"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=aea +lat_1=61.66666666666666 +lat_2=68 +lat_0=59 +lon_0=-132.5 +x_0=500000 +y_0=500000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3579,'EPSG',3579,'PROJCS["NAD83(CSRS) / Yukon Albers",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],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],AUTHORITY["EPSG","3579"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=aea +lat_1=61.66666666666666 +lat_2=68 +lat_0=59 +lon_0=-132.5 +x_0=500000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3580 : NAD83 / NWT Lambert --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3580,'EPSG',3580,'PROJCS["NAD83 / NWT Lambert",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",62],PARAMETER["standard_parallel_2",70],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-112],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3580"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=62 +lat_2=70 +lat_0=0 +lon_0=-112 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3580,'EPSG',3580,'PROJCS["NAD83 / NWT Lambert",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",62],PARAMETER["standard_parallel_2",70],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-112],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3580"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=62 +lat_2=70 +lat_0=0 +lon_0=-112 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3581 : NAD83(CSRS) / NWT Lambert --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3581,'EPSG',3581,'PROJCS["NAD83(CSRS) / NWT Lambert",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",62],PARAMETER["standard_parallel_2",70],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-112],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3581"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=62 +lat_2=70 +lat_0=0 +lon_0=-112 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3581,'EPSG',3581,'PROJCS["NAD83(CSRS) / NWT Lambert",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",62],PARAMETER["standard_parallel_2",70],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-112],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3581"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=62 +lat_2=70 +lat_0=0 +lon_0=-112 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3582 : NAD83(NSRS2007) / Maryland (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3582,'EPSG',3582,'PROJCS["NAD83(NSRS2007) / Maryland (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.45],PARAMETER["standard_parallel_2",38.3],PARAMETER["latitude_of_origin",37.66666666666666],PARAMETER["central_meridian",-77],PARAMETER["false_easting",1312333.333],PARAMETER["false_northing",0],AUTHORITY["EPSG","3582"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.45 +lat_2=38.3 +lat_0=37.66666666666666 +lon_0=-77 +x_0=399999.9998983998 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3582,'EPSG',3582,'PROJCS["NAD83(NSRS2007) / Maryland (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.45],PARAMETER["standard_parallel_2",38.3],PARAMETER["latitude_of_origin",37.66666666666666],PARAMETER["central_meridian",-77],PARAMETER["false_easting",1312333.333],PARAMETER["false_northing",0],AUTHORITY["EPSG","3582"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.45 +lat_2=38.3 +lat_0=37.66666666666666 +lon_0=-77 +x_0=399999.9998983998 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3583 : NAD83(NSRS2007) / Massachusetts Island --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3583,'EPSG',3583,'PROJCS["NAD83(NSRS2007) / Massachusetts Island",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.48333333333333],PARAMETER["standard_parallel_2",41.28333333333333],PARAMETER["latitude_of_origin",41],PARAMETER["central_meridian",-70.5],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3583"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.48333333333333 +lat_2=41.28333333333333 +lat_0=41 +lon_0=-70.5 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3583,'EPSG',3583,'PROJCS["NAD83(NSRS2007) / Massachusetts Island",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.48333333333333],PARAMETER["standard_parallel_2",41.28333333333333],PARAMETER["latitude_of_origin",41],PARAMETER["central_meridian",-70.5],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3583"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.48333333333333 +lat_2=41.28333333333333 +lat_0=41 +lon_0=-70.5 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3584 : NAD83(NSRS2007) / Massachusetts Island (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3584,'EPSG',3584,'PROJCS["NAD83(NSRS2007) / Massachusetts Island (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.48333333333333],PARAMETER["standard_parallel_2",41.28333333333333],PARAMETER["latitude_of_origin",41],PARAMETER["central_meridian",-70.5],PARAMETER["false_easting",1640416.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3584"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.48333333333333 +lat_2=41.28333333333333 +lat_0=41 +lon_0=-70.5 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3584,'EPSG',3584,'PROJCS["NAD83(NSRS2007) / Massachusetts Island (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.48333333333333],PARAMETER["standard_parallel_2",41.28333333333333],PARAMETER["latitude_of_origin",41],PARAMETER["central_meridian",-70.5],PARAMETER["false_easting",1640416.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3584"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.48333333333333 +lat_2=41.28333333333333 +lat_0=41 +lon_0=-70.5 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3585 : NAD83(NSRS2007) / Massachusetts Mainland --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3585,'EPSG',3585,'PROJCS["NAD83(NSRS2007) / Massachusetts Mainland",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",42.68333333333333],PARAMETER["standard_parallel_2",41.71666666666667],PARAMETER["latitude_of_origin",41],PARAMETER["central_meridian",-71.5],PARAMETER["false_easting",200000],PARAMETER["false_northing",750000],AUTHORITY["EPSG","3585"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=42.68333333333333 +lat_2=41.71666666666667 +lat_0=41 +lon_0=-71.5 +x_0=200000 +y_0=750000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3585,'EPSG',3585,'PROJCS["NAD83(NSRS2007) / Massachusetts Mainland",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",42.68333333333333],PARAMETER["standard_parallel_2",41.71666666666667],PARAMETER["latitude_of_origin",41],PARAMETER["central_meridian",-71.5],PARAMETER["false_easting",200000],PARAMETER["false_northing",750000],AUTHORITY["EPSG","3585"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=42.68333333333333 +lat_2=41.71666666666667 +lat_0=41 +lon_0=-71.5 +x_0=200000 +y_0=750000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3586 : NAD83(NSRS2007) / Massachusetts Mainland (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3586,'EPSG',3586,'PROJCS["NAD83(NSRS2007) / Massachusetts Mainland (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",42.68333333333333],PARAMETER["standard_parallel_2",41.71666666666667],PARAMETER["latitude_of_origin",41],PARAMETER["central_meridian",-71.5],PARAMETER["false_easting",656166.667],PARAMETER["false_northing",2460625],AUTHORITY["EPSG","3586"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=42.68333333333333 +lat_2=41.71666666666667 +lat_0=41 +lon_0=-71.5 +x_0=200000.0001016002 +y_0=750000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3586,'EPSG',3586,'PROJCS["NAD83(NSRS2007) / Massachusetts Mainland (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",42.68333333333333],PARAMETER["standard_parallel_2",41.71666666666667],PARAMETER["latitude_of_origin",41],PARAMETER["central_meridian",-71.5],PARAMETER["false_easting",656166.667],PARAMETER["false_northing",2460625],AUTHORITY["EPSG","3586"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=42.68333333333333 +lat_2=41.71666666666667 +lat_0=41 +lon_0=-71.5 +x_0=200000.0001016002 +y_0=750000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3587 : NAD83(NSRS2007) / Michigan Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3587,'EPSG',3587,'PROJCS["NAD83(NSRS2007) / Michigan Central",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.7],PARAMETER["standard_parallel_2",44.18333333333333],PARAMETER["latitude_of_origin",43.31666666666667],PARAMETER["central_meridian",-84.36666666666666],PARAMETER["false_easting",6000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3587"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.7 +lat_2=44.18333333333333 +lat_0=43.31666666666667 +lon_0=-84.36666666666666 +x_0=6000000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3587,'EPSG',3587,'PROJCS["NAD83(NSRS2007) / Michigan Central",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.7],PARAMETER["standard_parallel_2",44.18333333333333],PARAMETER["latitude_of_origin",43.31666666666667],PARAMETER["central_meridian",-84.36666666666666],PARAMETER["false_easting",6000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3587"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.7 +lat_2=44.18333333333333 +lat_0=43.31666666666667 +lon_0=-84.36666666666666 +x_0=6000000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3588 : NAD83(NSRS2007) / Michigan Central (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3588,'EPSG',3588,'PROJCS["NAD83(NSRS2007) / Michigan Central (ft)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.7],PARAMETER["standard_parallel_2",44.18333333333333],PARAMETER["latitude_of_origin",43.31666666666667],PARAMETER["central_meridian",-84.36666666666666],PARAMETER["false_easting",19685039.37],PARAMETER["false_northing",0],AUTHORITY["EPSG","3588"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.7 +lat_2=44.18333333333333 +lat_0=43.31666666666667 +lon_0=-84.36666666666666 +x_0=5999999.999976001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3588,'EPSG',3588,'PROJCS["NAD83(NSRS2007) / Michigan Central (ft)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.7],PARAMETER["standard_parallel_2",44.18333333333333],PARAMETER["latitude_of_origin",43.31666666666667],PARAMETER["central_meridian",-84.36666666666666],PARAMETER["false_easting",19685039.37],PARAMETER["false_northing",0],AUTHORITY["EPSG","3588"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.7 +lat_2=44.18333333333333 +lat_0=43.31666666666667 +lon_0=-84.36666666666666 +x_0=5999999.999976001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 3589 : NAD83(NSRS2007) / Michigan North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3589,'EPSG',3589,'PROJCS["NAD83(NSRS2007) / Michigan North",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.08333333333334],PARAMETER["standard_parallel_2",45.48333333333333],PARAMETER["latitude_of_origin",44.78333333333333],PARAMETER["central_meridian",-87],PARAMETER["false_easting",8000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3589"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.08333333333334 +lat_2=45.48333333333333 +lat_0=44.78333333333333 +lon_0=-87 +x_0=8000000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3589,'EPSG',3589,'PROJCS["NAD83(NSRS2007) / Michigan North",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.08333333333334],PARAMETER["standard_parallel_2",45.48333333333333],PARAMETER["latitude_of_origin",44.78333333333333],PARAMETER["central_meridian",-87],PARAMETER["false_easting",8000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3589"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.08333333333334 +lat_2=45.48333333333333 +lat_0=44.78333333333333 +lon_0=-87 +x_0=8000000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3590 : NAD83(NSRS2007) / Michigan North (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3590,'EPSG',3590,'PROJCS["NAD83(NSRS2007) / Michigan North (ft)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.08333333333334],PARAMETER["standard_parallel_2",45.48333333333333],PARAMETER["latitude_of_origin",44.78333333333333],PARAMETER["central_meridian",-87],PARAMETER["false_easting",26246719.16],PARAMETER["false_northing",0],AUTHORITY["EPSG","3590"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.08333333333334 +lat_2=45.48333333333333 +lat_0=44.78333333333333 +lon_0=-87 +x_0=7999999.999968001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3590,'EPSG',3590,'PROJCS["NAD83(NSRS2007) / Michigan North (ft)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.08333333333334],PARAMETER["standard_parallel_2",45.48333333333333],PARAMETER["latitude_of_origin",44.78333333333333],PARAMETER["central_meridian",-87],PARAMETER["false_easting",26246719.16],PARAMETER["false_northing",0],AUTHORITY["EPSG","3590"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.08333333333334 +lat_2=45.48333333333333 +lat_0=44.78333333333333 +lon_0=-87 +x_0=7999999.999968001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 3591 : NAD83(NSRS2007) / Michigan Oblique Mercator --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3591,'EPSG',3591,'PROJCS["NAD83(NSRS2007) / Michigan Oblique Mercator",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",45.30916666666666],PARAMETER["longitude_of_center",-86],PARAMETER["azimuth",337.25556],PARAMETER["rectified_grid_angle",337.25556],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",2546731.496],PARAMETER["false_northing",-4354009.816],AUTHORITY["EPSG","3591"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=omerc +lat_0=45.30916666666666 +lonc=-86 +alpha=337.25556 +k=0.9996 +x_0=2546731.496 +y_0=-4354009.816 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3591,'EPSG',3591,'PROJCS["NAD83(NSRS2007) / Michigan Oblique Mercator",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",45.30916666666666],PARAMETER["longitude_of_center",-86],PARAMETER["azimuth",337.25556],PARAMETER["rectified_grid_angle",337.25556],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",2546731.496],PARAMETER["false_northing",-4354009.816],AUTHORITY["EPSG","3591"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=omerc +lat_0=45.30916666666666 +lonc=-86 +alpha=337.25556 +k=0.9996 +x_0=2546731.496 +y_0=-4354009.816 +gamma=337.25556 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3592 : NAD83(NSRS2007) / Michigan South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3592,'EPSG',3592,'PROJCS["NAD83(NSRS2007) / Michigan South",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43.66666666666666],PARAMETER["standard_parallel_2",42.1],PARAMETER["latitude_of_origin",41.5],PARAMETER["central_meridian",-84.36666666666666],PARAMETER["false_easting",4000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3592"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43.66666666666666 +lat_2=42.1 +lat_0=41.5 +lon_0=-84.36666666666666 +x_0=4000000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3592,'EPSG',3592,'PROJCS["NAD83(NSRS2007) / Michigan South",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43.66666666666666],PARAMETER["standard_parallel_2",42.1],PARAMETER["latitude_of_origin",41.5],PARAMETER["central_meridian",-84.36666666666666],PARAMETER["false_easting",4000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3592"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43.66666666666666 +lat_2=42.1 +lat_0=41.5 +lon_0=-84.36666666666666 +x_0=4000000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3593 : NAD83(NSRS2007) / Michigan South (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3593,'EPSG',3593,'PROJCS["NAD83(NSRS2007) / Michigan South (ft)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43.66666666666666],PARAMETER["standard_parallel_2",42.1],PARAMETER["latitude_of_origin",41.5],PARAMETER["central_meridian",-84.36666666666666],PARAMETER["false_easting",13123359.58],PARAMETER["false_northing",0],AUTHORITY["EPSG","3593"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43.66666666666666 +lat_2=42.1 +lat_0=41.5 +lon_0=-84.36666666666666 +x_0=3999999.999984 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3593,'EPSG',3593,'PROJCS["NAD83(NSRS2007) / Michigan South (ft)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43.66666666666666],PARAMETER["standard_parallel_2",42.1],PARAMETER["latitude_of_origin",41.5],PARAMETER["central_meridian",-84.36666666666666],PARAMETER["false_easting",13123359.58],PARAMETER["false_northing",0],AUTHORITY["EPSG","3593"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43.66666666666666 +lat_2=42.1 +lat_0=41.5 +lon_0=-84.36666666666666 +x_0=3999999.999984 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 3594 : NAD83(NSRS2007) / Minnesota Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3594,'EPSG',3594,'PROJCS["NAD83(NSRS2007) / Minnesota Central",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.05],PARAMETER["standard_parallel_2",45.61666666666667],PARAMETER["latitude_of_origin",45],PARAMETER["central_meridian",-94.25],PARAMETER["false_easting",800000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","3594"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.05 +lat_2=45.61666666666667 +lat_0=45 +lon_0=-94.25 +x_0=800000 +y_0=100000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3594,'EPSG',3594,'PROJCS["NAD83(NSRS2007) / Minnesota Central",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.05],PARAMETER["standard_parallel_2",45.61666666666667],PARAMETER["latitude_of_origin",45],PARAMETER["central_meridian",-94.25],PARAMETER["false_easting",800000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","3594"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.05 +lat_2=45.61666666666667 +lat_0=45 +lon_0=-94.25 +x_0=800000 +y_0=100000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3595 : NAD83(NSRS2007) / Minnesota North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3595,'EPSG',3595,'PROJCS["NAD83(NSRS2007) / Minnesota North",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.63333333333333],PARAMETER["standard_parallel_2",47.03333333333333],PARAMETER["latitude_of_origin",46.5],PARAMETER["central_meridian",-93.1],PARAMETER["false_easting",800000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","3595"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.63333333333333 +lat_2=47.03333333333333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=800000 +y_0=100000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3595,'EPSG',3595,'PROJCS["NAD83(NSRS2007) / Minnesota North",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.63333333333333],PARAMETER["standard_parallel_2",47.03333333333333],PARAMETER["latitude_of_origin",46.5],PARAMETER["central_meridian",-93.1],PARAMETER["false_easting",800000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","3595"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.63333333333333 +lat_2=47.03333333333333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=800000 +y_0=100000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3596 : NAD83(NSRS2007) / Minnesota South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3596,'EPSG',3596,'PROJCS["NAD83(NSRS2007) / Minnesota South",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.21666666666667],PARAMETER["standard_parallel_2",43.78333333333333],PARAMETER["latitude_of_origin",43],PARAMETER["central_meridian",-94],PARAMETER["false_easting",800000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","3596"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.21666666666667 +lat_2=43.78333333333333 +lat_0=43 +lon_0=-94 +x_0=800000 +y_0=100000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3596,'EPSG',3596,'PROJCS["NAD83(NSRS2007) / Minnesota South",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.21666666666667],PARAMETER["standard_parallel_2",43.78333333333333],PARAMETER["latitude_of_origin",43],PARAMETER["central_meridian",-94],PARAMETER["false_easting",800000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","3596"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.21666666666667 +lat_2=43.78333333333333 +lat_0=43 +lon_0=-94 +x_0=800000 +y_0=100000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3597 : NAD83(NSRS2007) / Mississippi East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3597,'EPSG',3597,'PROJCS["NAD83(NSRS2007) / Mississippi East",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",29.5],PARAMETER["central_meridian",-88.83333333333333],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3597"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=29.5 +lon_0=-88.83333333333333 +k=0.99995 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3597,'EPSG',3597,'PROJCS["NAD83(NSRS2007) / Mississippi East",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",29.5],PARAMETER["central_meridian",-88.83333333333333],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3597"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=29.5 +lon_0=-88.83333333333333 +k=0.99995 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3598 : NAD83(NSRS2007) / Mississippi East (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3598,'EPSG',3598,'PROJCS["NAD83(NSRS2007) / Mississippi East (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",29.5],PARAMETER["central_meridian",-88.83333333333333],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",984250.0000000002],PARAMETER["false_northing",0],AUTHORITY["EPSG","3598"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=29.5 +lon_0=-88.83333333333333 +k=0.99995 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3598,'EPSG',3598,'PROJCS["NAD83(NSRS2007) / Mississippi East (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",29.5],PARAMETER["central_meridian",-88.83333333333333],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",984250.0000000002],PARAMETER["false_northing",0],AUTHORITY["EPSG","3598"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=29.5 +lon_0=-88.83333333333333 +k=0.99995 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3599 : NAD83(NSRS2007) / Mississippi West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3599,'EPSG',3599,'PROJCS["NAD83(NSRS2007) / Mississippi West",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",29.5],PARAMETER["central_meridian",-90.33333333333333],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3599"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=29.5 +lon_0=-90.33333333333333 +k=0.99995 +x_0=700000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3599,'EPSG',3599,'PROJCS["NAD83(NSRS2007) / Mississippi West",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",29.5],PARAMETER["central_meridian",-90.33333333333333],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3599"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=29.5 +lon_0=-90.33333333333333 +k=0.99995 +x_0=700000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3600 : NAD83(NSRS2007) / Mississippi West (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3600,'EPSG',3600,'PROJCS["NAD83(NSRS2007) / Mississippi West (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",29.5],PARAMETER["central_meridian",-90.33333333333333],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",2296583.333],PARAMETER["false_northing",0],AUTHORITY["EPSG","3600"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=29.5 +lon_0=-90.33333333333333 +k=0.99995 +x_0=699999.9998983998 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3600,'EPSG',3600,'PROJCS["NAD83(NSRS2007) / Mississippi West (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",29.5],PARAMETER["central_meridian",-90.33333333333333],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",2296583.333],PARAMETER["false_northing",0],AUTHORITY["EPSG","3600"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=29.5 +lon_0=-90.33333333333333 +k=0.99995 +x_0=699999.9998983998 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3601 : NAD83(NSRS2007) / Missouri Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3601,'EPSG',3601,'PROJCS["NAD83(NSRS2007) / Missouri Central",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",35.83333333333334],PARAMETER["central_meridian",-92.5],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3601"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=35.83333333333334 +lon_0=-92.5 +k=0.999933333 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3601,'EPSG',3601,'PROJCS["NAD83(NSRS2007) / Missouri Central",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",35.83333333333334],PARAMETER["central_meridian",-92.5],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3601"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=35.83333333333334 +lon_0=-92.5 +k=0.999933333 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3602 : NAD83(NSRS2007) / Missouri East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3602,'EPSG',3602,'PROJCS["NAD83(NSRS2007) / Missouri East",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",35.83333333333334],PARAMETER["central_meridian",-90.5],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",250000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3602"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=35.83333333333334 +lon_0=-90.5 +k=0.999933333 +x_0=250000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3602,'EPSG',3602,'PROJCS["NAD83(NSRS2007) / Missouri East",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",35.83333333333334],PARAMETER["central_meridian",-90.5],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",250000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3602"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=35.83333333333334 +lon_0=-90.5 +k=0.999933333 +x_0=250000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3603 : NAD83(NSRS2007) / Missouri West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3603,'EPSG',3603,'PROJCS["NAD83(NSRS2007) / Missouri West",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36.16666666666666],PARAMETER["central_meridian",-94.5],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",850000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3603"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=36.16666666666666 +lon_0=-94.5 +k=0.999941177 +x_0=850000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3603,'EPSG',3603,'PROJCS["NAD83(NSRS2007) / Missouri West",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36.16666666666666],PARAMETER["central_meridian",-94.5],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",850000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3603"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=36.16666666666666 +lon_0=-94.5 +k=0.999941177 +x_0=850000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3604 : NAD83(NSRS2007) / Montana --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3604,'EPSG',3604,'PROJCS["NAD83(NSRS2007) / Montana",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",49],PARAMETER["standard_parallel_2",45],PARAMETER["latitude_of_origin",44.25],PARAMETER["central_meridian",-109.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3604"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=49 +lat_2=45 +lat_0=44.25 +lon_0=-109.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3604,'EPSG',3604,'PROJCS["NAD83(NSRS2007) / Montana",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",49],PARAMETER["standard_parallel_2",45],PARAMETER["latitude_of_origin",44.25],PARAMETER["central_meridian",-109.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3604"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=49 +lat_2=45 +lat_0=44.25 +lon_0=-109.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3605 : NAD83(NSRS2007) / Montana (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3605,'EPSG',3605,'PROJCS["NAD83(NSRS2007) / Montana (ft)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",49],PARAMETER["standard_parallel_2",45],PARAMETER["latitude_of_origin",44.25],PARAMETER["central_meridian",-109.5],PARAMETER["false_easting",1968503.937],PARAMETER["false_northing",0],AUTHORITY["EPSG","3605"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=49 +lat_2=45 +lat_0=44.25 +lon_0=-109.5 +x_0=599999.9999976 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3605,'EPSG',3605,'PROJCS["NAD83(NSRS2007) / Montana (ft)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",49],PARAMETER["standard_parallel_2",45],PARAMETER["latitude_of_origin",44.25],PARAMETER["central_meridian",-109.5],PARAMETER["false_easting",1968503.937],PARAMETER["false_northing",0],AUTHORITY["EPSG","3605"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=49 +lat_2=45 +lat_0=44.25 +lon_0=-109.5 +x_0=599999.9999976 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 3606 : NAD83(NSRS2007) / Nebraska --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3606,'EPSG',3606,'PROJCS["NAD83(NSRS2007) / Nebraska",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43],PARAMETER["standard_parallel_2",40],PARAMETER["latitude_of_origin",39.83333333333334],PARAMETER["central_meridian",-100],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3606"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +lon_0=-100 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3606,'EPSG',3606,'PROJCS["NAD83(NSRS2007) / Nebraska",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43],PARAMETER["standard_parallel_2",40],PARAMETER["latitude_of_origin",39.83333333333334],PARAMETER["central_meridian",-100],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3606"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +lon_0=-100 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3607 : NAD83(NSRS2007) / Nevada Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3607,'EPSG',3607,'PROJCS["NAD83(NSRS2007) / Nevada Central",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",34.75],PARAMETER["central_meridian",-116.6666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",6000000],AUTHORITY["EPSG","3607"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.9999 +x_0=500000 +y_0=6000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3607,'EPSG',3607,'PROJCS["NAD83(NSRS2007) / Nevada Central",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",34.75],PARAMETER["central_meridian",-116.6666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",6000000],AUTHORITY["EPSG","3607"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.9999 +x_0=500000 +y_0=6000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3608 : NAD83(NSRS2007) / Nevada Central (ft US) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3608,'EPSG',3608,'PROJCS["NAD83(NSRS2007) / Nevada Central (ft US)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",34.75],PARAMETER["central_meridian",-116.6666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",1640416.6667],PARAMETER["false_northing",19685000],AUTHORITY["EPSG","3608"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.9999 +x_0=500000.00001016 +y_0=6000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3608,'EPSG',3608,'PROJCS["NAD83(NSRS2007) / Nevada Central (ft US)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",34.75],PARAMETER["central_meridian",-116.6666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",1640416.6667],PARAMETER["false_northing",19685000],AUTHORITY["EPSG","3608"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.9999 +x_0=500000.00001016 +y_0=6000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3609 : NAD83(NSRS2007) / Nevada East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3609,'EPSG',3609,'PROJCS["NAD83(NSRS2007) / Nevada East",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",34.75],PARAMETER["central_meridian",-115.5833333333333],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",8000000],AUTHORITY["EPSG","3609"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.9999 +x_0=200000 +y_0=8000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3609,'EPSG',3609,'PROJCS["NAD83(NSRS2007) / Nevada East",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",34.75],PARAMETER["central_meridian",-115.5833333333333],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",8000000],AUTHORITY["EPSG","3609"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.9999 +x_0=200000 +y_0=8000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3610 : NAD83(NSRS2007) / Nevada East (ft US) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3610,'EPSG',3610,'PROJCS["NAD83(NSRS2007) / Nevada East (ft US)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",34.75],PARAMETER["central_meridian",-115.5833333333333],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",656166.6667],PARAMETER["false_northing",26246666.66670001],AUTHORITY["EPSG","3610"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.9999 +x_0=200000.00001016 +y_0=8000000.000010163 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3610,'EPSG',3610,'PROJCS["NAD83(NSRS2007) / Nevada East (ft US)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",34.75],PARAMETER["central_meridian",-115.5833333333333],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",656166.6667],PARAMETER["false_northing",26246666.66670001],AUTHORITY["EPSG","3610"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.9999 +x_0=200000.00001016 +y_0=8000000.000010163 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3611 : NAD83(NSRS2007) / Nevada West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3611,'EPSG',3611,'PROJCS["NAD83(NSRS2007) / Nevada West",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",34.75],PARAMETER["central_meridian",-118.5833333333333],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",800000],PARAMETER["false_northing",4000000],AUTHORITY["EPSG","3611"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.9999 +x_0=800000 +y_0=4000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3611,'EPSG',3611,'PROJCS["NAD83(NSRS2007) / Nevada West",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",34.75],PARAMETER["central_meridian",-118.5833333333333],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",800000],PARAMETER["false_northing",4000000],AUTHORITY["EPSG","3611"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.9999 +x_0=800000 +y_0=4000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3612 : NAD83(NSRS2007) / Nevada West (ft US) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3612,'EPSG',3612,'PROJCS["NAD83(NSRS2007) / Nevada West (ft US)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",34.75],PARAMETER["central_meridian",-118.5833333333333],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",2624666.6667],PARAMETER["false_northing",13123333.3333],AUTHORITY["EPSG","3612"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.9999 +x_0=800000.0000101599 +y_0=3999999.99998984 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3612,'EPSG',3612,'PROJCS["NAD83(NSRS2007) / Nevada West (ft US)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",34.75],PARAMETER["central_meridian",-118.5833333333333],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",2624666.6667],PARAMETER["false_northing",13123333.3333],AUTHORITY["EPSG","3612"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.9999 +x_0=800000.0000101599 +y_0=3999999.99998984 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3613 : NAD83(NSRS2007) / New Hampshire --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3613,'EPSG',3613,'PROJCS["NAD83(NSRS2007) / New Hampshire",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.5],PARAMETER["central_meridian",-71.66666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3613"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999966667 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3613,'EPSG',3613,'PROJCS["NAD83(NSRS2007) / New Hampshire",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.5],PARAMETER["central_meridian",-71.66666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3613"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999966667 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3614 : NAD83(NSRS2007) / New Hampshire (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3614,'EPSG',3614,'PROJCS["NAD83(NSRS2007) / New Hampshire (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.5],PARAMETER["central_meridian",-71.66666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",984250.0000000002],PARAMETER["false_northing",0],AUTHORITY["EPSG","3614"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999966667 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3614,'EPSG',3614,'PROJCS["NAD83(NSRS2007) / New Hampshire (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.5],PARAMETER["central_meridian",-71.66666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",984250.0000000002],PARAMETER["false_northing",0],AUTHORITY["EPSG","3614"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999966667 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3615 : NAD83(NSRS2007) / New Jersey --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3615,'EPSG',3615,'PROJCS["NAD83(NSRS2007) / New Jersey",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",38.83333333333334],PARAMETER["central_meridian",-74.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3615"],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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3615,'EPSG',3615,'PROJCS["NAD83(NSRS2007) / New Jersey",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",38.83333333333334],PARAMETER["central_meridian",-74.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3615"],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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3616 : NAD83(NSRS2007) / New Jersey (ft US) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3616,'EPSG',3616,'PROJCS["NAD83(NSRS2007) / New Jersey (ft US)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],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","3616"],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 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3616,'EPSG',3616,'PROJCS["NAD83(NSRS2007) / New Jersey (ft US)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],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","3616"],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 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3617 : NAD83(NSRS2007) / New Mexico Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3617,'EPSG',3617,'PROJCS["NAD83(NSRS2007) / New Mexico Central",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-106.25],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3617"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3617,'EPSG',3617,'PROJCS["NAD83(NSRS2007) / New Mexico Central",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-106.25],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3617"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3618 : NAD83(NSRS2007) / New Mexico Central (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3618,'EPSG',3618,'PROJCS["NAD83(NSRS2007) / New Mexico Central (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-106.25],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",1640416.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3618"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.9999 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3618,'EPSG',3618,'PROJCS["NAD83(NSRS2007) / New Mexico Central (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-106.25],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",1640416.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3618"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.9999 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3619 : NAD83(NSRS2007) / New Mexico East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3619,'EPSG',3619,'PROJCS["NAD83(NSRS2007) / New Mexico East",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-104.3333333333333],PARAMETER["scale_factor",0.999909091],PARAMETER["false_easting",165000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3619"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.999909091 +x_0=165000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3619,'EPSG',3619,'PROJCS["NAD83(NSRS2007) / New Mexico East",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-104.3333333333333],PARAMETER["scale_factor",0.999909091],PARAMETER["false_easting",165000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3619"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.999909091 +x_0=165000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3620 : NAD83(NSRS2007) / New Mexico East (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3620,'EPSG',3620,'PROJCS["NAD83(NSRS2007) / New Mexico East (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-104.3333333333333],PARAMETER["scale_factor",0.999909091],PARAMETER["false_easting",541337.5],PARAMETER["false_northing",0],AUTHORITY["EPSG","3620"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.999909091 +x_0=165000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3620,'EPSG',3620,'PROJCS["NAD83(NSRS2007) / New Mexico East (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-104.3333333333333],PARAMETER["scale_factor",0.999909091],PARAMETER["false_easting",541337.5],PARAMETER["false_northing",0],AUTHORITY["EPSG","3620"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.999909091 +x_0=165000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3621 : NAD83(NSRS2007) / New Mexico West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3621,'EPSG',3621,'PROJCS["NAD83(NSRS2007) / New Mexico West",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-107.8333333333333],PARAMETER["scale_factor",0.999916667],PARAMETER["false_easting",830000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3621"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.999916667 +x_0=830000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3621,'EPSG',3621,'PROJCS["NAD83(NSRS2007) / New Mexico West",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-107.8333333333333],PARAMETER["scale_factor",0.999916667],PARAMETER["false_easting",830000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3621"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.999916667 +x_0=830000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3622 : NAD83(NSRS2007) / New Mexico West (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3622,'EPSG',3622,'PROJCS["NAD83(NSRS2007) / New Mexico West (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-107.8333333333333],PARAMETER["scale_factor",0.999916667],PARAMETER["false_easting",2723091.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3622"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.999916667 +x_0=830000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3622,'EPSG',3622,'PROJCS["NAD83(NSRS2007) / New Mexico West (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-107.8333333333333],PARAMETER["scale_factor",0.999916667],PARAMETER["false_easting",2723091.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3622"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.999916667 +x_0=830000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3623 : NAD83(NSRS2007) / New York Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3623,'EPSG',3623,'PROJCS["NAD83(NSRS2007) / New York Central",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-76.58333333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",250000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3623"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.9999375 +x_0=250000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3623,'EPSG',3623,'PROJCS["NAD83(NSRS2007) / New York Central",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-76.58333333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",250000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3623"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.9999375 +x_0=250000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3624 : NAD83(NSRS2007) / New York Central (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3624,'EPSG',3624,'PROJCS["NAD83(NSRS2007) / New York Central (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-76.58333333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",820208.3330000002],PARAMETER["false_northing",0],AUTHORITY["EPSG","3624"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.9999375 +x_0=249999.9998983998 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3624,'EPSG',3624,'PROJCS["NAD83(NSRS2007) / New York Central (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-76.58333333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",820208.3330000002],PARAMETER["false_northing",0],AUTHORITY["EPSG","3624"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.9999375 +x_0=249999.9998983998 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3625 : NAD83(NSRS2007) / New York East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3625,'EPSG',3625,'PROJCS["NAD83(NSRS2007) / New York East",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",38.83333333333334],PARAMETER["central_meridian",-74.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3625"],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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3625,'EPSG',3625,'PROJCS["NAD83(NSRS2007) / New York East",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",38.83333333333334],PARAMETER["central_meridian",-74.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3625"],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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3626 : NAD83(NSRS2007) / New York East (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3626,'EPSG',3626,'PROJCS["NAD83(NSRS2007) / New York East (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],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","3626"],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 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3626,'EPSG',3626,'PROJCS["NAD83(NSRS2007) / New York East (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],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","3626"],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 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3627 : NAD83(NSRS2007) / New York Long Island --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3627,'EPSG',3627,'PROJCS["NAD83(NSRS2007) / New York Long Island",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.03333333333333],PARAMETER["standard_parallel_2",40.66666666666666],PARAMETER["latitude_of_origin",40.16666666666666],PARAMETER["central_meridian",-74],PARAMETER["false_easting",300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3627"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.03333333333333 +lat_2=40.66666666666666 +lat_0=40.16666666666666 +lon_0=-74 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3627,'EPSG',3627,'PROJCS["NAD83(NSRS2007) / New York Long Island",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.03333333333333],PARAMETER["standard_parallel_2",40.66666666666666],PARAMETER["latitude_of_origin",40.16666666666666],PARAMETER["central_meridian",-74],PARAMETER["false_easting",300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3627"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.03333333333333 +lat_2=40.66666666666666 +lat_0=40.16666666666666 +lon_0=-74 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3628 : NAD83(NSRS2007) / New York Long Island (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3628,'EPSG',3628,'PROJCS["NAD83(NSRS2007) / New York Long Island (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.03333333333333],PARAMETER["standard_parallel_2",40.66666666666666],PARAMETER["latitude_of_origin",40.16666666666666],PARAMETER["central_meridian",-74],PARAMETER["false_easting",984250.0000000002],PARAMETER["false_northing",0],AUTHORITY["EPSG","3628"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.03333333333333 +lat_2=40.66666666666666 +lat_0=40.16666666666666 +lon_0=-74 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3628,'EPSG',3628,'PROJCS["NAD83(NSRS2007) / New York Long Island (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.03333333333333],PARAMETER["standard_parallel_2",40.66666666666666],PARAMETER["latitude_of_origin",40.16666666666666],PARAMETER["central_meridian",-74],PARAMETER["false_easting",984250.0000000002],PARAMETER["false_northing",0],AUTHORITY["EPSG","3628"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.03333333333333 +lat_2=40.66666666666666 +lat_0=40.16666666666666 +lon_0=-74 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3629 : NAD83(NSRS2007) / New York West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3629,'EPSG',3629,'PROJCS["NAD83(NSRS2007) / New York West",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-78.58333333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",350000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3629"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.9999375 +x_0=350000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3629,'EPSG',3629,'PROJCS["NAD83(NSRS2007) / New York West",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-78.58333333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",350000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3629"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.9999375 +x_0=350000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3630 : NAD83(NSRS2007) / New York West (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3630,'EPSG',3630,'PROJCS["NAD83(NSRS2007) / New York West (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-78.58333333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",1148291.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3630"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.9999375 +x_0=350000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3630,'EPSG',3630,'PROJCS["NAD83(NSRS2007) / New York West (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-78.58333333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",1148291.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3630"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.9999375 +x_0=350000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3631 : NAD83(NSRS2007) / North Carolina --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3631,'EPSG',3631,'PROJCS["NAD83(NSRS2007) / North Carolina",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.16666666666666],PARAMETER["standard_parallel_2",34.33333333333334],PARAMETER["latitude_of_origin",33.75],PARAMETER["central_meridian",-79],PARAMETER["false_easting",609601.22],PARAMETER["false_northing",0],AUTHORITY["EPSG","3631"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3631,'EPSG',3631,'PROJCS["NAD83(NSRS2007) / North Carolina",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.16666666666666],PARAMETER["standard_parallel_2",34.33333333333334],PARAMETER["latitude_of_origin",33.75],PARAMETER["central_meridian",-79],PARAMETER["false_easting",609601.22],PARAMETER["false_northing",0],AUTHORITY["EPSG","3631"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3632 : NAD83(NSRS2007) / North Carolina (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3632,'EPSG',3632,'PROJCS["NAD83(NSRS2007) / North Carolina (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.16666666666666],PARAMETER["standard_parallel_2",34.33333333333334],PARAMETER["latitude_of_origin",33.75],PARAMETER["central_meridian",-79],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3632"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.2192024384 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3632,'EPSG',3632,'PROJCS["NAD83(NSRS2007) / North Carolina (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.16666666666666],PARAMETER["standard_parallel_2",34.33333333333334],PARAMETER["latitude_of_origin",33.75],PARAMETER["central_meridian",-79],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3632"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.2192024384 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3633 : NAD83(NSRS2007) / North Dakota North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3633,'EPSG',3633,'PROJCS["NAD83(NSRS2007) / North Dakota North",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.73333333333333],PARAMETER["standard_parallel_2",47.43333333333333],PARAMETER["latitude_of_origin",47],PARAMETER["central_meridian",-100.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3633"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.73333333333333 +lat_2=47.43333333333333 +lat_0=47 +lon_0=-100.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3633,'EPSG',3633,'PROJCS["NAD83(NSRS2007) / North Dakota North",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.73333333333333],PARAMETER["standard_parallel_2",47.43333333333333],PARAMETER["latitude_of_origin",47],PARAMETER["central_meridian",-100.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3633"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.73333333333333 +lat_2=47.43333333333333 +lat_0=47 +lon_0=-100.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3634 : NAD83(NSRS2007) / North Dakota North (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3634,'EPSG',3634,'PROJCS["NAD83(NSRS2007) / North Dakota North (ft)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.73333333333333],PARAMETER["standard_parallel_2",47.43333333333333],PARAMETER["latitude_of_origin",47],PARAMETER["central_meridian",-100.5],PARAMETER["false_easting",1968503.937],PARAMETER["false_northing",0],AUTHORITY["EPSG","3634"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.73333333333333 +lat_2=47.43333333333333 +lat_0=47 +lon_0=-100.5 +x_0=599999.9999976 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3634,'EPSG',3634,'PROJCS["NAD83(NSRS2007) / North Dakota North (ft)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.73333333333333],PARAMETER["standard_parallel_2",47.43333333333333],PARAMETER["latitude_of_origin",47],PARAMETER["central_meridian",-100.5],PARAMETER["false_easting",1968503.937],PARAMETER["false_northing",0],AUTHORITY["EPSG","3634"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.73333333333333 +lat_2=47.43333333333333 +lat_0=47 +lon_0=-100.5 +x_0=599999.9999976 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 3635 : NAD83(NSRS2007) / North Dakota South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3635,'EPSG',3635,'PROJCS["NAD83(NSRS2007) / North Dakota South",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.48333333333333],PARAMETER["standard_parallel_2",46.18333333333333],PARAMETER["latitude_of_origin",45.66666666666666],PARAMETER["central_meridian",-100.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3635"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.48333333333333 +lat_2=46.18333333333333 +lat_0=45.66666666666666 +lon_0=-100.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3635,'EPSG',3635,'PROJCS["NAD83(NSRS2007) / North Dakota South",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.48333333333333],PARAMETER["standard_parallel_2",46.18333333333333],PARAMETER["latitude_of_origin",45.66666666666666],PARAMETER["central_meridian",-100.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3635"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.48333333333333 +lat_2=46.18333333333333 +lat_0=45.66666666666666 +lon_0=-100.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3636 : NAD83(NSRS2007) / North Dakota South (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3636,'EPSG',3636,'PROJCS["NAD83(NSRS2007) / North Dakota South (ft)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.48333333333333],PARAMETER["standard_parallel_2",46.18333333333333],PARAMETER["latitude_of_origin",45.66666666666666],PARAMETER["central_meridian",-100.5],PARAMETER["false_easting",1968503.937],PARAMETER["false_northing",0],AUTHORITY["EPSG","3636"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.48333333333333 +lat_2=46.18333333333333 +lat_0=45.66666666666666 +lon_0=-100.5 +x_0=599999.9999976 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3636,'EPSG',3636,'PROJCS["NAD83(NSRS2007) / North Dakota South (ft)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.48333333333333],PARAMETER["standard_parallel_2",46.18333333333333],PARAMETER["latitude_of_origin",45.66666666666666],PARAMETER["central_meridian",-100.5],PARAMETER["false_easting",1968503.937],PARAMETER["false_northing",0],AUTHORITY["EPSG","3636"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.48333333333333 +lat_2=46.18333333333333 +lat_0=45.66666666666666 +lon_0=-100.5 +x_0=599999.9999976 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 3637 : NAD83(NSRS2007) / Ohio North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3637,'EPSG',3637,'PROJCS["NAD83(NSRS2007) / Ohio North",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.7],PARAMETER["standard_parallel_2",40.43333333333333],PARAMETER["latitude_of_origin",39.66666666666666],PARAMETER["central_meridian",-82.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3637"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.7 +lat_2=40.43333333333333 +lat_0=39.66666666666666 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3637,'EPSG',3637,'PROJCS["NAD83(NSRS2007) / Ohio North",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.7],PARAMETER["standard_parallel_2",40.43333333333333],PARAMETER["latitude_of_origin",39.66666666666666],PARAMETER["central_meridian",-82.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3637"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.7 +lat_2=40.43333333333333 +lat_0=39.66666666666666 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3638 : NAD83(NSRS2007) / Ohio South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3638,'EPSG',3638,'PROJCS["NAD83(NSRS2007) / Ohio South",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.03333333333333],PARAMETER["standard_parallel_2",38.73333333333333],PARAMETER["latitude_of_origin",38],PARAMETER["central_meridian",-82.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3638"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.03333333333333 +lat_2=38.73333333333333 +lat_0=38 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3638,'EPSG',3638,'PROJCS["NAD83(NSRS2007) / Ohio South",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.03333333333333],PARAMETER["standard_parallel_2",38.73333333333333],PARAMETER["latitude_of_origin",38],PARAMETER["central_meridian",-82.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3638"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.03333333333333 +lat_2=38.73333333333333 +lat_0=38 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3639 : NAD83(NSRS2007) / Oklahoma North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3639,'EPSG',3639,'PROJCS["NAD83(NSRS2007) / Oklahoma North",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.76666666666667],PARAMETER["standard_parallel_2",35.56666666666667],PARAMETER["latitude_of_origin",35],PARAMETER["central_meridian",-98],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3639"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.76666666666667 +lat_2=35.56666666666667 +lat_0=35 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3639,'EPSG',3639,'PROJCS["NAD83(NSRS2007) / Oklahoma North",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.76666666666667],PARAMETER["standard_parallel_2",35.56666666666667],PARAMETER["latitude_of_origin",35],PARAMETER["central_meridian",-98],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3639"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.76666666666667 +lat_2=35.56666666666667 +lat_0=35 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3640 : NAD83(NSRS2007) / Oklahoma North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3640,'EPSG',3640,'PROJCS["NAD83(NSRS2007) / Oklahoma North (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.76666666666667],PARAMETER["standard_parallel_2",35.56666666666667],PARAMETER["latitude_of_origin",35],PARAMETER["central_meridian",-98],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3640"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.76666666666667 +lat_2=35.56666666666667 +lat_0=35 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3640,'EPSG',3640,'PROJCS["NAD83(NSRS2007) / Oklahoma North (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.76666666666667],PARAMETER["standard_parallel_2",35.56666666666667],PARAMETER["latitude_of_origin",35],PARAMETER["central_meridian",-98],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3640"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.76666666666667 +lat_2=35.56666666666667 +lat_0=35 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3641 : NAD83(NSRS2007) / Oklahoma South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3641,'EPSG',3641,'PROJCS["NAD83(NSRS2007) / Oklahoma South",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",35.23333333333333],PARAMETER["standard_parallel_2",33.93333333333333],PARAMETER["latitude_of_origin",33.33333333333334],PARAMETER["central_meridian",-98],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3641"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=35.23333333333333 +lat_2=33.93333333333333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3641,'EPSG',3641,'PROJCS["NAD83(NSRS2007) / Oklahoma South",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",35.23333333333333],PARAMETER["standard_parallel_2",33.93333333333333],PARAMETER["latitude_of_origin",33.33333333333334],PARAMETER["central_meridian",-98],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3641"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=35.23333333333333 +lat_2=33.93333333333333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3642 : NAD83(NSRS2007) / Oklahoma South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3642,'EPSG',3642,'PROJCS["NAD83(NSRS2007) / Oklahoma South (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",35.23333333333333],PARAMETER["standard_parallel_2",33.93333333333333],PARAMETER["latitude_of_origin",33.33333333333334],PARAMETER["central_meridian",-98],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3642"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=35.23333333333333 +lat_2=33.93333333333333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3642,'EPSG',3642,'PROJCS["NAD83(NSRS2007) / Oklahoma South (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",35.23333333333333],PARAMETER["standard_parallel_2",33.93333333333333],PARAMETER["latitude_of_origin",33.33333333333334],PARAMETER["central_meridian",-98],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3642"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=35.23333333333333 +lat_2=33.93333333333333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3643 : NAD83(NSRS2007) / Oregon Lambert --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3643,'EPSG',3643,'PROJCS["NAD83(NSRS2007) / Oregon Lambert",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43],PARAMETER["standard_parallel_2",45.5],PARAMETER["latitude_of_origin",41.75],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3643"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=400000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3643,'EPSG',3643,'PROJCS["NAD83(NSRS2007) / Oregon Lambert",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43],PARAMETER["standard_parallel_2",45.5],PARAMETER["latitude_of_origin",41.75],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3643"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=400000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3644 : NAD83(NSRS2007) / Oregon Lambert (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3644,'EPSG',3644,'PROJCS["NAD83(NSRS2007) / Oregon Lambert (ft)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43],PARAMETER["standard_parallel_2",45.5],PARAMETER["latitude_of_origin",41.75],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",1312335.958],PARAMETER["false_northing",0],AUTHORITY["EPSG","3644"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=399999.9999984 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3644,'EPSG',3644,'PROJCS["NAD83(NSRS2007) / Oregon Lambert (ft)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43],PARAMETER["standard_parallel_2",45.5],PARAMETER["latitude_of_origin",41.75],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",1312335.958],PARAMETER["false_northing",0],AUTHORITY["EPSG","3644"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=399999.9999984 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 3645 : NAD83(NSRS2007) / Oregon North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3645,'EPSG',3645,'PROJCS["NAD83(NSRS2007) / Oregon North",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",46],PARAMETER["standard_parallel_2",44.33333333333334],PARAMETER["latitude_of_origin",43.66666666666666],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",2500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3645"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=46 +lat_2=44.33333333333334 +lat_0=43.66666666666666 +lon_0=-120.5 +x_0=2500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3645,'EPSG',3645,'PROJCS["NAD83(NSRS2007) / Oregon North",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",46],PARAMETER["standard_parallel_2",44.33333333333334],PARAMETER["latitude_of_origin",43.66666666666666],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",2500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3645"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=46 +lat_2=44.33333333333334 +lat_0=43.66666666666666 +lon_0=-120.5 +x_0=2500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3646 : NAD83(NSRS2007) / Oregon North (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3646,'EPSG',3646,'PROJCS["NAD83(NSRS2007) / Oregon North (ft)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",46],PARAMETER["standard_parallel_2",44.33333333333334],PARAMETER["latitude_of_origin",43.66666666666666],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",8202099.738],PARAMETER["false_northing",0],AUTHORITY["EPSG","3646"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=46 +lat_2=44.33333333333334 +lat_0=43.66666666666666 +lon_0=-120.5 +x_0=2500000.0001424 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3646,'EPSG',3646,'PROJCS["NAD83(NSRS2007) / Oregon North (ft)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",46],PARAMETER["standard_parallel_2",44.33333333333334],PARAMETER["latitude_of_origin",43.66666666666666],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",8202099.738],PARAMETER["false_northing",0],AUTHORITY["EPSG","3646"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=46 +lat_2=44.33333333333334 +lat_0=43.66666666666666 +lon_0=-120.5 +x_0=2500000.0001424 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 3647 : NAD83(NSRS2007) / Oregon South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3647,'EPSG',3647,'PROJCS["NAD83(NSRS2007) / Oregon South",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44],PARAMETER["standard_parallel_2",42.33333333333334],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3647"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44 +lat_2=42.33333333333334 +lat_0=41.66666666666666 +lon_0=-120.5 +x_0=1500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3647,'EPSG',3647,'PROJCS["NAD83(NSRS2007) / Oregon South",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44],PARAMETER["standard_parallel_2",42.33333333333334],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3647"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44 +lat_2=42.33333333333334 +lat_0=41.66666666666666 +lon_0=-120.5 +x_0=1500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3648 : NAD83(NSRS2007) / Oregon South (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3648,'EPSG',3648,'PROJCS["NAD83(NSRS2007) / Oregon South (ft)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44],PARAMETER["standard_parallel_2",42.33333333333334],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",4921259.843],PARAMETER["false_northing",0],AUTHORITY["EPSG","3648"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44 +lat_2=42.33333333333334 +lat_0=41.66666666666666 +lon_0=-120.5 +x_0=1500000.0001464 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3648,'EPSG',3648,'PROJCS["NAD83(NSRS2007) / Oregon South (ft)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44],PARAMETER["standard_parallel_2",42.33333333333334],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",4921259.843],PARAMETER["false_northing",0],AUTHORITY["EPSG","3648"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44 +lat_2=42.33333333333334 +lat_0=41.66666666666666 +lon_0=-120.5 +x_0=1500000.0001464 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 3649 : NAD83(NSRS2007) / Pennsylvania North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3649,'EPSG',3649,'PROJCS["NAD83(NSRS2007) / Pennsylvania North",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.95],PARAMETER["standard_parallel_2",40.88333333333333],PARAMETER["latitude_of_origin",40.16666666666666],PARAMETER["central_meridian",-77.75],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3649"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.95 +lat_2=40.88333333333333 +lat_0=40.16666666666666 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3649,'EPSG',3649,'PROJCS["NAD83(NSRS2007) / Pennsylvania North",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.95],PARAMETER["standard_parallel_2",40.88333333333333],PARAMETER["latitude_of_origin",40.16666666666666],PARAMETER["central_meridian",-77.75],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3649"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.95 +lat_2=40.88333333333333 +lat_0=40.16666666666666 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3650 : NAD83(NSRS2007) / Pennsylvania North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3650,'EPSG',3650,'PROJCS["NAD83(NSRS2007) / Pennsylvania North (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.95],PARAMETER["standard_parallel_2",40.88333333333333],PARAMETER["latitude_of_origin",40.16666666666666],PARAMETER["central_meridian",-77.75],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3650"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.95 +lat_2=40.88333333333333 +lat_0=40.16666666666666 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3650,'EPSG',3650,'PROJCS["NAD83(NSRS2007) / Pennsylvania North (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.95],PARAMETER["standard_parallel_2",40.88333333333333],PARAMETER["latitude_of_origin",40.16666666666666],PARAMETER["central_meridian",-77.75],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3650"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.95 +lat_2=40.88333333333333 +lat_0=40.16666666666666 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3651 : NAD83(NSRS2007) / Pennsylvania South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3651,'EPSG',3651,'PROJCS["NAD83(NSRS2007) / Pennsylvania South",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.96666666666667],PARAMETER["standard_parallel_2",39.93333333333333],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-77.75],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3651"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.96666666666667 +lat_2=39.93333333333333 +lat_0=39.33333333333334 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3651,'EPSG',3651,'PROJCS["NAD83(NSRS2007) / Pennsylvania South",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.96666666666667],PARAMETER["standard_parallel_2",39.93333333333333],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-77.75],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3651"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.96666666666667 +lat_2=39.93333333333333 +lat_0=39.33333333333334 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3652 : NAD83(NSRS2007) / Pennsylvania South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3652,'EPSG',3652,'PROJCS["NAD83(NSRS2007) / Pennsylvania South (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.96666666666667],PARAMETER["standard_parallel_2",39.93333333333333],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-77.75],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3652"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.96666666666667 +lat_2=39.93333333333333 +lat_0=39.33333333333334 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3652,'EPSG',3652,'PROJCS["NAD83(NSRS2007) / Pennsylvania South (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.96666666666667],PARAMETER["standard_parallel_2",39.93333333333333],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-77.75],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3652"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.96666666666667 +lat_2=39.93333333333333 +lat_0=39.33333333333334 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3653 : NAD83(NSRS2007) / Rhode Island --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3653,'EPSG',3653,'PROJCS["NAD83(NSRS2007) / Rhode Island",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.08333333333334],PARAMETER["central_meridian",-71.5],PARAMETER["scale_factor",0.99999375],PARAMETER["false_easting",100000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3653"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.08333333333334 +lon_0=-71.5 +k=0.99999375 +x_0=100000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3653,'EPSG',3653,'PROJCS["NAD83(NSRS2007) / Rhode Island",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.08333333333334],PARAMETER["central_meridian",-71.5],PARAMETER["scale_factor",0.99999375],PARAMETER["false_easting",100000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3653"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.08333333333334 +lon_0=-71.5 +k=0.99999375 +x_0=100000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3654 : NAD83(NSRS2007) / Rhode Island (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3654,'EPSG',3654,'PROJCS["NAD83(NSRS2007) / Rhode Island (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.08333333333334],PARAMETER["central_meridian",-71.5],PARAMETER["scale_factor",0.99999375],PARAMETER["false_easting",328083.3333],PARAMETER["false_northing",0],AUTHORITY["EPSG","3654"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.08333333333334 +lon_0=-71.5 +k=0.99999375 +x_0=99999.99998983997 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3654,'EPSG',3654,'PROJCS["NAD83(NSRS2007) / Rhode Island (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.08333333333334],PARAMETER["central_meridian",-71.5],PARAMETER["scale_factor",0.99999375],PARAMETER["false_easting",328083.3333],PARAMETER["false_northing",0],AUTHORITY["EPSG","3654"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.08333333333334 +lon_0=-71.5 +k=0.99999375 +x_0=99999.99998983997 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3655 : NAD83(NSRS2007) / South Carolina --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3655,'EPSG',3655,'PROJCS["NAD83(NSRS2007) / South Carolina",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",34.83333333333334],PARAMETER["standard_parallel_2",32.5],PARAMETER["latitude_of_origin",31.83333333333333],PARAMETER["central_meridian",-81],PARAMETER["false_easting",609600],PARAMETER["false_northing",0],AUTHORITY["EPSG","3655"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=34.83333333333334 +lat_2=32.5 +lat_0=31.83333333333333 +lon_0=-81 +x_0=609600 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3655,'EPSG',3655,'PROJCS["NAD83(NSRS2007) / South Carolina",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",34.83333333333334],PARAMETER["standard_parallel_2",32.5],PARAMETER["latitude_of_origin",31.83333333333333],PARAMETER["central_meridian",-81],PARAMETER["false_easting",609600],PARAMETER["false_northing",0],AUTHORITY["EPSG","3655"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=34.83333333333334 +lat_2=32.5 +lat_0=31.83333333333333 +lon_0=-81 +x_0=609600 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3656 : NAD83(NSRS2007) / South Carolina (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3656,'EPSG',3656,'PROJCS["NAD83(NSRS2007) / South Carolina (ft)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",34.83333333333334],PARAMETER["standard_parallel_2",32.5],PARAMETER["latitude_of_origin",31.83333333333333],PARAMETER["central_meridian",-81],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3656"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=34.83333333333334 +lat_2=32.5 +lat_0=31.83333333333333 +lon_0=-81 +x_0=609600 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3656,'EPSG',3656,'PROJCS["NAD83(NSRS2007) / South Carolina (ft)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",34.83333333333334],PARAMETER["standard_parallel_2",32.5],PARAMETER["latitude_of_origin",31.83333333333333],PARAMETER["central_meridian",-81],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3656"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=34.83333333333334 +lat_2=32.5 +lat_0=31.83333333333333 +lon_0=-81 +x_0=609600 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 3657 : NAD83(NSRS2007) / South Dakota North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3657,'EPSG',3657,'PROJCS["NAD83(NSRS2007) / South Dakota North",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.68333333333333],PARAMETER["standard_parallel_2",44.41666666666666],PARAMETER["latitude_of_origin",43.83333333333334],PARAMETER["central_meridian",-100],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3657"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.68333333333333 +lat_2=44.41666666666666 +lat_0=43.83333333333334 +lon_0=-100 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3657,'EPSG',3657,'PROJCS["NAD83(NSRS2007) / South Dakota North",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.68333333333333],PARAMETER["standard_parallel_2",44.41666666666666],PARAMETER["latitude_of_origin",43.83333333333334],PARAMETER["central_meridian",-100],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3657"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.68333333333333 +lat_2=44.41666666666666 +lat_0=43.83333333333334 +lon_0=-100 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3658 : NAD83(NSRS2007) / South Dakota North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3658,'EPSG',3658,'PROJCS["NAD83(NSRS2007) / South Dakota North (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.68333333333333],PARAMETER["standard_parallel_2",44.41666666666666],PARAMETER["latitude_of_origin",43.83333333333334],PARAMETER["central_meridian",-100],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3658"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.68333333333333 +lat_2=44.41666666666666 +lat_0=43.83333333333334 +lon_0=-100 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3658,'EPSG',3658,'PROJCS["NAD83(NSRS2007) / South Dakota North (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.68333333333333],PARAMETER["standard_parallel_2",44.41666666666666],PARAMETER["latitude_of_origin",43.83333333333334],PARAMETER["central_meridian",-100],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3658"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.68333333333333 +lat_2=44.41666666666666 +lat_0=43.83333333333334 +lon_0=-100 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3659 : NAD83(NSRS2007) / South Dakota South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3659,'EPSG',3659,'PROJCS["NAD83(NSRS2007) / South Dakota South",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44.4],PARAMETER["standard_parallel_2",42.83333333333334],PARAMETER["latitude_of_origin",42.33333333333334],PARAMETER["central_meridian",-100.3333333333333],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3659"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44.4 +lat_2=42.83333333333334 +lat_0=42.33333333333334 +lon_0=-100.3333333333333 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3659,'EPSG',3659,'PROJCS["NAD83(NSRS2007) / South Dakota South",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44.4],PARAMETER["standard_parallel_2",42.83333333333334],PARAMETER["latitude_of_origin",42.33333333333334],PARAMETER["central_meridian",-100.3333333333333],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3659"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44.4 +lat_2=42.83333333333334 +lat_0=42.33333333333334 +lon_0=-100.3333333333333 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3660 : NAD83(NSRS2007) / South Dakota South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3660,'EPSG',3660,'PROJCS["NAD83(NSRS2007) / South Dakota South (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44.4],PARAMETER["standard_parallel_2",42.83333333333334],PARAMETER["latitude_of_origin",42.33333333333334],PARAMETER["central_meridian",-100.3333333333333],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3660"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44.4 +lat_2=42.83333333333334 +lat_0=42.33333333333334 +lon_0=-100.3333333333333 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3660,'EPSG',3660,'PROJCS["NAD83(NSRS2007) / South Dakota South (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44.4],PARAMETER["standard_parallel_2",42.83333333333334],PARAMETER["latitude_of_origin",42.33333333333334],PARAMETER["central_meridian",-100.3333333333333],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3660"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44.4 +lat_2=42.83333333333334 +lat_0=42.33333333333334 +lon_0=-100.3333333333333 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3661 : NAD83(NSRS2007) / Tennessee --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3661,'EPSG',3661,'PROJCS["NAD83(NSRS2007) / Tennessee",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.41666666666666],PARAMETER["standard_parallel_2",35.25],PARAMETER["latitude_of_origin",34.33333333333334],PARAMETER["central_meridian",-86],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3661"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.41666666666666 +lat_2=35.25 +lat_0=34.33333333333334 +lon_0=-86 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3661,'EPSG',3661,'PROJCS["NAD83(NSRS2007) / Tennessee",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.41666666666666],PARAMETER["standard_parallel_2",35.25],PARAMETER["latitude_of_origin",34.33333333333334],PARAMETER["central_meridian",-86],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3661"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.41666666666666 +lat_2=35.25 +lat_0=34.33333333333334 +lon_0=-86 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3662 : NAD83(NSRS2007) / Tennessee (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3662,'EPSG',3662,'PROJCS["NAD83(NSRS2007) / Tennessee (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.41666666666666],PARAMETER["standard_parallel_2",35.25],PARAMETER["latitude_of_origin",34.33333333333334],PARAMETER["central_meridian",-86],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3662"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.41666666666666 +lat_2=35.25 +lat_0=34.33333333333334 +lon_0=-86 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3662,'EPSG',3662,'PROJCS["NAD83(NSRS2007) / Tennessee (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.41666666666666],PARAMETER["standard_parallel_2",35.25],PARAMETER["latitude_of_origin",34.33333333333334],PARAMETER["central_meridian",-86],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3662"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.41666666666666 +lat_2=35.25 +lat_0=34.33333333333334 +lon_0=-86 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3663 : NAD83(NSRS2007) / Texas Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3663,'EPSG',3663,'PROJCS["NAD83(NSRS2007) / Texas Central",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",31.88333333333333],PARAMETER["standard_parallel_2",30.11666666666667],PARAMETER["latitude_of_origin",29.66666666666667],PARAMETER["central_meridian",-100.3333333333333],PARAMETER["false_easting",700000],PARAMETER["false_northing",3000000],AUTHORITY["EPSG","3663"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=31.88333333333333 +lat_2=30.11666666666667 +lat_0=29.66666666666667 +lon_0=-100.3333333333333 +x_0=700000 +y_0=3000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3663,'EPSG',3663,'PROJCS["NAD83(NSRS2007) / Texas Central",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",31.88333333333333],PARAMETER["standard_parallel_2",30.11666666666667],PARAMETER["latitude_of_origin",29.66666666666667],PARAMETER["central_meridian",-100.3333333333333],PARAMETER["false_easting",700000],PARAMETER["false_northing",3000000],AUTHORITY["EPSG","3663"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=31.88333333333333 +lat_2=30.11666666666667 +lat_0=29.66666666666667 +lon_0=-100.3333333333333 +x_0=700000 +y_0=3000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3664 : NAD83(NSRS2007) / Texas Central (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3664,'EPSG',3664,'PROJCS["NAD83(NSRS2007) / Texas Central (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",31.88333333333333],PARAMETER["standard_parallel_2",30.11666666666667],PARAMETER["latitude_of_origin",29.66666666666667],PARAMETER["central_meridian",-100.3333333333333],PARAMETER["false_easting",2296583.333],PARAMETER["false_northing",9842500.000000002],AUTHORITY["EPSG","3664"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=31.88333333333333 +lat_2=30.11666666666667 +lat_0=29.66666666666667 +lon_0=-100.3333333333333 +x_0=699999.9998983998 +y_0=3000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3664,'EPSG',3664,'PROJCS["NAD83(NSRS2007) / Texas Central (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",31.88333333333333],PARAMETER["standard_parallel_2",30.11666666666667],PARAMETER["latitude_of_origin",29.66666666666667],PARAMETER["central_meridian",-100.3333333333333],PARAMETER["false_easting",2296583.333],PARAMETER["false_northing",9842500.000000002],AUTHORITY["EPSG","3664"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=31.88333333333333 +lat_2=30.11666666666667 +lat_0=29.66666666666667 +lon_0=-100.3333333333333 +x_0=699999.9998983998 +y_0=3000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3665 : NAD83(NSRS2007) / Texas Centric Albers Equal Area --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3665,'EPSG',3665,'PROJCS["NAD83(NSRS2007) / Texas Centric Albers Equal Area",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",27.5],PARAMETER["standard_parallel_2",35],PARAMETER["latitude_of_center",18],PARAMETER["longitude_of_center",-100],PARAMETER["false_easting",1500000],PARAMETER["false_northing",6000000],AUTHORITY["EPSG","3665"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=aea +lat_1=27.5 +lat_2=35 +lat_0=18 +lon_0=-100 +x_0=1500000 +y_0=6000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3665,'EPSG',3665,'PROJCS["NAD83(NSRS2007) / Texas Centric Albers Equal Area",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",27.5],PARAMETER["standard_parallel_2",35],PARAMETER["latitude_of_center",18],PARAMETER["longitude_of_center",-100],PARAMETER["false_easting",1500000],PARAMETER["false_northing",6000000],AUTHORITY["EPSG","3665"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=aea +lat_1=27.5 +lat_2=35 +lat_0=18 +lon_0=-100 +x_0=1500000 +y_0=6000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3666 : NAD83(NSRS2007) / Texas Centric Lambert Conformal --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3666,'EPSG',3666,'PROJCS["NAD83(NSRS2007) / Texas Centric Lambert Conformal",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",27.5],PARAMETER["standard_parallel_2",35],PARAMETER["latitude_of_origin",18],PARAMETER["central_meridian",-100],PARAMETER["false_easting",1500000],PARAMETER["false_northing",5000000],AUTHORITY["EPSG","3666"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=27.5 +lat_2=35 +lat_0=18 +lon_0=-100 +x_0=1500000 +y_0=5000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3666,'EPSG',3666,'PROJCS["NAD83(NSRS2007) / Texas Centric Lambert Conformal",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",27.5],PARAMETER["standard_parallel_2",35],PARAMETER["latitude_of_origin",18],PARAMETER["central_meridian",-100],PARAMETER["false_easting",1500000],PARAMETER["false_northing",5000000],AUTHORITY["EPSG","3666"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=27.5 +lat_2=35 +lat_0=18 +lon_0=-100 +x_0=1500000 +y_0=5000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3667 : NAD83(NSRS2007) / Texas North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3667,'EPSG',3667,'PROJCS["NAD83(NSRS2007) / Texas North",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.18333333333333],PARAMETER["standard_parallel_2",34.65],PARAMETER["latitude_of_origin",34],PARAMETER["central_meridian",-101.5],PARAMETER["false_easting",200000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","3667"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.18333333333333 +lat_2=34.65 +lat_0=34 +lon_0=-101.5 +x_0=200000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3667,'EPSG',3667,'PROJCS["NAD83(NSRS2007) / Texas North",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.18333333333333],PARAMETER["standard_parallel_2",34.65],PARAMETER["latitude_of_origin",34],PARAMETER["central_meridian",-101.5],PARAMETER["false_easting",200000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","3667"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.18333333333333 +lat_2=34.65 +lat_0=34 +lon_0=-101.5 +x_0=200000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3668 : NAD83(NSRS2007) / Texas North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3668,'EPSG',3668,'PROJCS["NAD83(NSRS2007) / Texas North (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.18333333333333],PARAMETER["standard_parallel_2",34.65],PARAMETER["latitude_of_origin",34],PARAMETER["central_meridian",-101.5],PARAMETER["false_easting",656166.667],PARAMETER["false_northing",3280833.333],AUTHORITY["EPSG","3668"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.18333333333333 +lat_2=34.65 +lat_0=34 +lon_0=-101.5 +x_0=200000.0001016002 +y_0=999999.9998983998 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3668,'EPSG',3668,'PROJCS["NAD83(NSRS2007) / Texas North (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.18333333333333],PARAMETER["standard_parallel_2",34.65],PARAMETER["latitude_of_origin",34],PARAMETER["central_meridian",-101.5],PARAMETER["false_easting",656166.667],PARAMETER["false_northing",3280833.333],AUTHORITY["EPSG","3668"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.18333333333333 +lat_2=34.65 +lat_0=34 +lon_0=-101.5 +x_0=200000.0001016002 +y_0=999999.9998983998 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3669 : NAD83(NSRS2007) / Texas North Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3669,'EPSG',3669,'PROJCS["NAD83(NSRS2007) / Texas North Central",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",33.96666666666667],PARAMETER["standard_parallel_2",32.13333333333333],PARAMETER["latitude_of_origin",31.66666666666667],PARAMETER["central_meridian",-98.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",2000000],AUTHORITY["EPSG","3669"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=33.96666666666667 +lat_2=32.13333333333333 +lat_0=31.66666666666667 +lon_0=-98.5 +x_0=600000 +y_0=2000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3669,'EPSG',3669,'PROJCS["NAD83(NSRS2007) / Texas North Central",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",33.96666666666667],PARAMETER["standard_parallel_2",32.13333333333333],PARAMETER["latitude_of_origin",31.66666666666667],PARAMETER["central_meridian",-98.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",2000000],AUTHORITY["EPSG","3669"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=33.96666666666667 +lat_2=32.13333333333333 +lat_0=31.66666666666667 +lon_0=-98.5 +x_0=600000 +y_0=2000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3670 : NAD83(NSRS2007) / Texas North Central (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3670,'EPSG',3670,'PROJCS["NAD83(NSRS2007) / Texas North Central (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",33.96666666666667],PARAMETER["standard_parallel_2",32.13333333333333],PARAMETER["latitude_of_origin",31.66666666666667],PARAMETER["central_meridian",-98.5],PARAMETER["false_easting",1968500],PARAMETER["false_northing",6561666.667],AUTHORITY["EPSG","3670"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=33.96666666666667 +lat_2=32.13333333333333 +lat_0=31.66666666666667 +lon_0=-98.5 +x_0=600000 +y_0=2000000.0001016 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3670,'EPSG',3670,'PROJCS["NAD83(NSRS2007) / Texas North Central (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",33.96666666666667],PARAMETER["standard_parallel_2",32.13333333333333],PARAMETER["latitude_of_origin",31.66666666666667],PARAMETER["central_meridian",-98.5],PARAMETER["false_easting",1968500],PARAMETER["false_northing",6561666.667],AUTHORITY["EPSG","3670"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=33.96666666666667 +lat_2=32.13333333333333 +lat_0=31.66666666666667 +lon_0=-98.5 +x_0=600000 +y_0=2000000.0001016 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3671 : NAD83(NSRS2007) / Texas South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3671,'EPSG',3671,'PROJCS["NAD83(NSRS2007) / Texas South",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",27.83333333333333],PARAMETER["standard_parallel_2",26.16666666666667],PARAMETER["latitude_of_origin",25.66666666666667],PARAMETER["central_meridian",-98.5],PARAMETER["false_easting",300000],PARAMETER["false_northing",5000000],AUTHORITY["EPSG","3671"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=27.83333333333333 +lat_2=26.16666666666667 +lat_0=25.66666666666667 +lon_0=-98.5 +x_0=300000 +y_0=5000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3671,'EPSG',3671,'PROJCS["NAD83(NSRS2007) / Texas South",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",27.83333333333333],PARAMETER["standard_parallel_2",26.16666666666667],PARAMETER["latitude_of_origin",25.66666666666667],PARAMETER["central_meridian",-98.5],PARAMETER["false_easting",300000],PARAMETER["false_northing",5000000],AUTHORITY["EPSG","3671"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=27.83333333333333 +lat_2=26.16666666666667 +lat_0=25.66666666666667 +lon_0=-98.5 +x_0=300000 +y_0=5000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3672 : NAD83(NSRS2007) / Texas South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3672,'EPSG',3672,'PROJCS["NAD83(NSRS2007) / Texas South (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",27.83333333333333],PARAMETER["standard_parallel_2",26.16666666666667],PARAMETER["latitude_of_origin",25.66666666666667],PARAMETER["central_meridian",-98.5],PARAMETER["false_easting",984250.0000000002],PARAMETER["false_northing",16404166.667],AUTHORITY["EPSG","3672"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=27.83333333333333 +lat_2=26.16666666666667 +lat_0=25.66666666666667 +lon_0=-98.5 +x_0=300000.0000000001 +y_0=5000000.0001016 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3672,'EPSG',3672,'PROJCS["NAD83(NSRS2007) / Texas South (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",27.83333333333333],PARAMETER["standard_parallel_2",26.16666666666667],PARAMETER["latitude_of_origin",25.66666666666667],PARAMETER["central_meridian",-98.5],PARAMETER["false_easting",984250.0000000002],PARAMETER["false_northing",16404166.667],AUTHORITY["EPSG","3672"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=27.83333333333333 +lat_2=26.16666666666667 +lat_0=25.66666666666667 +lon_0=-98.5 +x_0=300000.0000000001 +y_0=5000000.0001016 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3673 : NAD83(NSRS2007) / Texas South Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3673,'EPSG',3673,'PROJCS["NAD83(NSRS2007) / Texas South Central",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",30.28333333333333],PARAMETER["standard_parallel_2",28.38333333333333],PARAMETER["latitude_of_origin",27.83333333333333],PARAMETER["central_meridian",-99],PARAMETER["false_easting",600000],PARAMETER["false_northing",4000000],AUTHORITY["EPSG","3673"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=30.28333333333333 +lat_2=28.38333333333333 +lat_0=27.83333333333333 +lon_0=-99 +x_0=600000 +y_0=4000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3673,'EPSG',3673,'PROJCS["NAD83(NSRS2007) / Texas South Central",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",30.28333333333333],PARAMETER["standard_parallel_2",28.38333333333333],PARAMETER["latitude_of_origin",27.83333333333333],PARAMETER["central_meridian",-99],PARAMETER["false_easting",600000],PARAMETER["false_northing",4000000],AUTHORITY["EPSG","3673"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=30.28333333333333 +lat_2=28.38333333333333 +lat_0=27.83333333333333 +lon_0=-99 +x_0=600000 +y_0=4000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3674 : NAD83(NSRS2007) / Texas South Central (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3674,'EPSG',3674,'PROJCS["NAD83(NSRS2007) / Texas South Central (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",30.28333333333333],PARAMETER["standard_parallel_2",28.38333333333333],PARAMETER["latitude_of_origin",27.83333333333333],PARAMETER["central_meridian",-99],PARAMETER["false_easting",1968500],PARAMETER["false_northing",13123333.333],AUTHORITY["EPSG","3674"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=30.28333333333333 +lat_2=28.38333333333333 +lat_0=27.83333333333333 +lon_0=-99 +x_0=600000 +y_0=3999999.9998984 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3674,'EPSG',3674,'PROJCS["NAD83(NSRS2007) / Texas South Central (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",30.28333333333333],PARAMETER["standard_parallel_2",28.38333333333333],PARAMETER["latitude_of_origin",27.83333333333333],PARAMETER["central_meridian",-99],PARAMETER["false_easting",1968500],PARAMETER["false_northing",13123333.333],AUTHORITY["EPSG","3674"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=30.28333333333333 +lat_2=28.38333333333333 +lat_0=27.83333333333333 +lon_0=-99 +x_0=600000 +y_0=3999999.9998984 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3675 : NAD83(NSRS2007) / Utah Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3675,'EPSG',3675,'PROJCS["NAD83(NSRS2007) / Utah Central",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.65],PARAMETER["standard_parallel_2",39.01666666666667],PARAMETER["latitude_of_origin",38.33333333333334],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",500000],PARAMETER["false_northing",2000000],AUTHORITY["EPSG","3675"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.65 +lat_2=39.01666666666667 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=500000 +y_0=2000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3675,'EPSG',3675,'PROJCS["NAD83(NSRS2007) / Utah Central",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.65],PARAMETER["standard_parallel_2",39.01666666666667],PARAMETER["latitude_of_origin",38.33333333333334],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",500000],PARAMETER["false_northing",2000000],AUTHORITY["EPSG","3675"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.65 +lat_2=39.01666666666667 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=500000 +y_0=2000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3676 : NAD83(NSRS2007) / Utah Central (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3676,'EPSG',3676,'PROJCS["NAD83(NSRS2007) / Utah Central (ft)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.65],PARAMETER["standard_parallel_2",39.01666666666667],PARAMETER["latitude_of_origin",38.33333333333334],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",1640419.948],PARAMETER["false_northing",6561679.79],AUTHORITY["EPSG","3676"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.65 +lat_2=39.01666666666667 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=500000.0001504 +y_0=1999999.999992 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3676,'EPSG',3676,'PROJCS["NAD83(NSRS2007) / Utah Central (ft)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.65],PARAMETER["standard_parallel_2",39.01666666666667],PARAMETER["latitude_of_origin",38.33333333333334],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",1640419.948],PARAMETER["false_northing",6561679.79],AUTHORITY["EPSG","3676"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.65 +lat_2=39.01666666666667 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=500000.0001504 +y_0=1999999.999992 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 3677 : NAD83(NSRS2007) / Utah Central (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3677,'EPSG',3677,'PROJCS["NAD83(NSRS2007) / Utah Central (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.65],PARAMETER["standard_parallel_2",39.01666666666667],PARAMETER["latitude_of_origin",38.33333333333334],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",1640416.6667],PARAMETER["false_northing",6561666.666700001],AUTHORITY["EPSG","3677"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.65 +lat_2=39.01666666666667 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=500000.00001016 +y_0=2000000.00001016 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3677,'EPSG',3677,'PROJCS["NAD83(NSRS2007) / Utah Central (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.65],PARAMETER["standard_parallel_2",39.01666666666667],PARAMETER["latitude_of_origin",38.33333333333334],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",1640416.6667],PARAMETER["false_northing",6561666.666700001],AUTHORITY["EPSG","3677"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.65 +lat_2=39.01666666666667 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=500000.00001016 +y_0=2000000.00001016 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3678 : NAD83(NSRS2007) / Utah North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3678,'EPSG',3678,'PROJCS["NAD83(NSRS2007) / Utah North",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.78333333333333],PARAMETER["standard_parallel_2",40.71666666666667],PARAMETER["latitude_of_origin",40.33333333333334],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",500000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","3678"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.78333333333333 +lat_2=40.71666666666667 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3678,'EPSG',3678,'PROJCS["NAD83(NSRS2007) / Utah North",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.78333333333333],PARAMETER["standard_parallel_2",40.71666666666667],PARAMETER["latitude_of_origin",40.33333333333334],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",500000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","3678"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.78333333333333 +lat_2=40.71666666666667 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3679 : NAD83(NSRS2007) / Utah North (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3679,'EPSG',3679,'PROJCS["NAD83(NSRS2007) / Utah North (ft)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.78333333333333],PARAMETER["standard_parallel_2",40.71666666666667],PARAMETER["latitude_of_origin",40.33333333333334],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",1640419.948],PARAMETER["false_northing",3280839.895],AUTHORITY["EPSG","3679"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.78333333333333 +lat_2=40.71666666666667 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000.0001504 +y_0=999999.9999960001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3679,'EPSG',3679,'PROJCS["NAD83(NSRS2007) / Utah North (ft)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.78333333333333],PARAMETER["standard_parallel_2",40.71666666666667],PARAMETER["latitude_of_origin",40.33333333333334],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",1640419.948],PARAMETER["false_northing",3280839.895],AUTHORITY["EPSG","3679"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.78333333333333 +lat_2=40.71666666666667 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000.0001504 +y_0=999999.9999960001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 3680 : NAD83(NSRS2007) / Utah North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3680,'EPSG',3680,'PROJCS["NAD83(NSRS2007) / Utah North (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.78333333333333],PARAMETER["standard_parallel_2",40.71666666666667],PARAMETER["latitude_of_origin",40.33333333333334],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",1640416.6667],PARAMETER["false_northing",3280833.333300001],AUTHORITY["EPSG","3680"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.78333333333333 +lat_2=40.71666666666667 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000.00001016 +y_0=999999.9999898402 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3680,'EPSG',3680,'PROJCS["NAD83(NSRS2007) / Utah North (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.78333333333333],PARAMETER["standard_parallel_2",40.71666666666667],PARAMETER["latitude_of_origin",40.33333333333334],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",1640416.6667],PARAMETER["false_northing",3280833.333300001],AUTHORITY["EPSG","3680"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.78333333333333 +lat_2=40.71666666666667 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000.00001016 +y_0=999999.9999898402 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3681 : NAD83(NSRS2007) / Utah South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3681,'EPSG',3681,'PROJCS["NAD83(NSRS2007) / Utah South",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.35],PARAMETER["standard_parallel_2",37.21666666666667],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",500000],PARAMETER["false_northing",3000000],AUTHORITY["EPSG","3681"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.35 +lat_2=37.21666666666667 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=500000 +y_0=3000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3681,'EPSG',3681,'PROJCS["NAD83(NSRS2007) / Utah South",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.35],PARAMETER["standard_parallel_2",37.21666666666667],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",500000],PARAMETER["false_northing",3000000],AUTHORITY["EPSG","3681"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.35 +lat_2=37.21666666666667 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=500000 +y_0=3000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3682 : NAD83(NSRS2007) / Utah South (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3682,'EPSG',3682,'PROJCS["NAD83(NSRS2007) / Utah South (ft)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.35],PARAMETER["standard_parallel_2",37.21666666666667],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",1640419.948],PARAMETER["false_northing",9842519.685],AUTHORITY["EPSG","3682"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.35 +lat_2=37.21666666666667 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=500000.0001504 +y_0=2999999.999988 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3682,'EPSG',3682,'PROJCS["NAD83(NSRS2007) / Utah South (ft)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.35],PARAMETER["standard_parallel_2",37.21666666666667],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",1640419.948],PARAMETER["false_northing",9842519.685],AUTHORITY["EPSG","3682"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.35 +lat_2=37.21666666666667 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=500000.0001504 +y_0=2999999.999988 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '); --- --- EPSG 3683 : NAD83(NSRS2007) / Utah South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3683,'EPSG',3683,'PROJCS["NAD83(NSRS2007) / Utah South (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.35],PARAMETER["standard_parallel_2",37.21666666666667],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",1640416.6667],PARAMETER["false_northing",9842500.000000002],AUTHORITY["EPSG","3683"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.35 +lat_2=37.21666666666667 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=500000.00001016 +y_0=3000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3683,'EPSG',3683,'PROJCS["NAD83(NSRS2007) / Utah South (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.35],PARAMETER["standard_parallel_2",37.21666666666667],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",1640416.6667],PARAMETER["false_northing",9842500.000000002],AUTHORITY["EPSG","3683"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.35 +lat_2=37.21666666666667 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=500000.00001016 +y_0=3000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3684 : NAD83(NSRS2007) / Vermont --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3684,'EPSG',3684,'PROJCS["NAD83(NSRS2007) / Vermont",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.5],PARAMETER["central_meridian",-72.5],PARAMETER["scale_factor",0.999964286],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3684"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.5 +lon_0=-72.5 +k=0.999964286 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3684,'EPSG',3684,'PROJCS["NAD83(NSRS2007) / Vermont",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.5],PARAMETER["central_meridian",-72.5],PARAMETER["scale_factor",0.999964286],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3684"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.5 +lon_0=-72.5 +k=0.999964286 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3685 : NAD83(NSRS2007) / Virginia North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3685,'EPSG',3685,'PROJCS["NAD83(NSRS2007) / Virginia North",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.2],PARAMETER["standard_parallel_2",38.03333333333333],PARAMETER["latitude_of_origin",37.66666666666666],PARAMETER["central_meridian",-78.5],PARAMETER["false_easting",3500000],PARAMETER["false_northing",2000000],AUTHORITY["EPSG","3685"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.2 +lat_2=38.03333333333333 +lat_0=37.66666666666666 +lon_0=-78.5 +x_0=3500000 +y_0=2000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3685,'EPSG',3685,'PROJCS["NAD83(NSRS2007) / Virginia North",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.2],PARAMETER["standard_parallel_2",38.03333333333333],PARAMETER["latitude_of_origin",37.66666666666666],PARAMETER["central_meridian",-78.5],PARAMETER["false_easting",3500000],PARAMETER["false_northing",2000000],AUTHORITY["EPSG","3685"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.2 +lat_2=38.03333333333333 +lat_0=37.66666666666666 +lon_0=-78.5 +x_0=3500000 +y_0=2000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3686 : NAD83(NSRS2007) / Virginia North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3686,'EPSG',3686,'PROJCS["NAD83(NSRS2007) / Virginia North (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.2],PARAMETER["standard_parallel_2",38.03333333333333],PARAMETER["latitude_of_origin",37.66666666666666],PARAMETER["central_meridian",-78.5],PARAMETER["false_easting",11482916.667],PARAMETER["false_northing",6561666.667],AUTHORITY["EPSG","3686"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.2 +lat_2=38.03333333333333 +lat_0=37.66666666666666 +lon_0=-78.5 +x_0=3500000.0001016 +y_0=2000000.0001016 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3686,'EPSG',3686,'PROJCS["NAD83(NSRS2007) / Virginia North (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.2],PARAMETER["standard_parallel_2",38.03333333333333],PARAMETER["latitude_of_origin",37.66666666666666],PARAMETER["central_meridian",-78.5],PARAMETER["false_easting",11482916.667],PARAMETER["false_northing",6561666.667],AUTHORITY["EPSG","3686"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.2 +lat_2=38.03333333333333 +lat_0=37.66666666666666 +lon_0=-78.5 +x_0=3500000.0001016 +y_0=2000000.0001016 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3687 : NAD83(NSRS2007) / Virginia South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3687,'EPSG',3687,'PROJCS["NAD83(NSRS2007) / Virginia South",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.96666666666667],PARAMETER["standard_parallel_2",36.76666666666667],PARAMETER["latitude_of_origin",36.33333333333334],PARAMETER["central_meridian",-78.5],PARAMETER["false_easting",3500000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","3687"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.96666666666667 +lat_2=36.76666666666667 +lat_0=36.33333333333334 +lon_0=-78.5 +x_0=3500000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3687,'EPSG',3687,'PROJCS["NAD83(NSRS2007) / Virginia South",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.96666666666667],PARAMETER["standard_parallel_2",36.76666666666667],PARAMETER["latitude_of_origin",36.33333333333334],PARAMETER["central_meridian",-78.5],PARAMETER["false_easting",3500000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","3687"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.96666666666667 +lat_2=36.76666666666667 +lat_0=36.33333333333334 +lon_0=-78.5 +x_0=3500000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3688 : NAD83(NSRS2007) / Virginia South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3688,'EPSG',3688,'PROJCS["NAD83(NSRS2007) / Virginia South (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.96666666666667],PARAMETER["standard_parallel_2",36.76666666666667],PARAMETER["latitude_of_origin",36.33333333333334],PARAMETER["central_meridian",-78.5],PARAMETER["false_easting",11482916.667],PARAMETER["false_northing",3280833.333],AUTHORITY["EPSG","3688"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.96666666666667 +lat_2=36.76666666666667 +lat_0=36.33333333333334 +lon_0=-78.5 +x_0=3500000.0001016 +y_0=999999.9998983998 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3688,'EPSG',3688,'PROJCS["NAD83(NSRS2007) / Virginia South (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.96666666666667],PARAMETER["standard_parallel_2",36.76666666666667],PARAMETER["latitude_of_origin",36.33333333333334],PARAMETER["central_meridian",-78.5],PARAMETER["false_easting",11482916.667],PARAMETER["false_northing",3280833.333],AUTHORITY["EPSG","3688"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.96666666666667 +lat_2=36.76666666666667 +lat_0=36.33333333333334 +lon_0=-78.5 +x_0=3500000.0001016 +y_0=999999.9998983998 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3689 : NAD83(NSRS2007) / Washington North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3689,'EPSG',3689,'PROJCS["NAD83(NSRS2007) / Washington North",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.73333333333333],PARAMETER["standard_parallel_2",47.5],PARAMETER["latitude_of_origin",47],PARAMETER["central_meridian",-120.8333333333333],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3689"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.73333333333333 +lat_2=47.5 +lat_0=47 +lon_0=-120.8333333333333 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3689,'EPSG',3689,'PROJCS["NAD83(NSRS2007) / Washington North",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.73333333333333],PARAMETER["standard_parallel_2",47.5],PARAMETER["latitude_of_origin",47],PARAMETER["central_meridian",-120.8333333333333],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3689"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.73333333333333 +lat_2=47.5 +lat_0=47 +lon_0=-120.8333333333333 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3690 : NAD83(NSRS2007) / Washington North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3690,'EPSG',3690,'PROJCS["NAD83(NSRS2007) / Washington North (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.73333333333333],PARAMETER["standard_parallel_2",47.5],PARAMETER["latitude_of_origin",47],PARAMETER["central_meridian",-120.8333333333333],PARAMETER["false_easting",1640416.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3690"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.73333333333333 +lat_2=47.5 +lat_0=47 +lon_0=-120.8333333333333 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3690,'EPSG',3690,'PROJCS["NAD83(NSRS2007) / Washington North (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.73333333333333],PARAMETER["standard_parallel_2",47.5],PARAMETER["latitude_of_origin",47],PARAMETER["central_meridian",-120.8333333333333],PARAMETER["false_easting",1640416.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3690"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.73333333333333 +lat_2=47.5 +lat_0=47 +lon_0=-120.8333333333333 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3691 : NAD83(NSRS2007) / Washington South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3691,'EPSG',3691,'PROJCS["NAD83(NSRS2007) / Washington South",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.33333333333334],PARAMETER["standard_parallel_2",45.83333333333334],PARAMETER["latitude_of_origin",45.33333333333334],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3691"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.33333333333334 +lat_2=45.83333333333334 +lat_0=45.33333333333334 +lon_0=-120.5 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3691,'EPSG',3691,'PROJCS["NAD83(NSRS2007) / Washington South",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.33333333333334],PARAMETER["standard_parallel_2",45.83333333333334],PARAMETER["latitude_of_origin",45.33333333333334],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3691"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.33333333333334 +lat_2=45.83333333333334 +lat_0=45.33333333333334 +lon_0=-120.5 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3692 : NAD83(NSRS2007) / Washington South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3692,'EPSG',3692,'PROJCS["NAD83(NSRS2007) / Washington South (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.33333333333334],PARAMETER["standard_parallel_2",45.83333333333334],PARAMETER["latitude_of_origin",45.33333333333334],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",1640416.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3692"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.33333333333334 +lat_2=45.83333333333334 +lat_0=45.33333333333334 +lon_0=-120.5 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3692,'EPSG',3692,'PROJCS["NAD83(NSRS2007) / Washington South (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.33333333333334],PARAMETER["standard_parallel_2",45.83333333333334],PARAMETER["latitude_of_origin",45.33333333333334],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",1640416.667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3692"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.33333333333334 +lat_2=45.83333333333334 +lat_0=45.33333333333334 +lon_0=-120.5 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3693 : NAD83(NSRS2007) / West Virginia North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3693,'EPSG',3693,'PROJCS["NAD83(NSRS2007) / West Virginia North",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.25],PARAMETER["standard_parallel_2",39],PARAMETER["latitude_of_origin",38.5],PARAMETER["central_meridian",-79.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3693"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.25 +lat_2=39 +lat_0=38.5 +lon_0=-79.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3693,'EPSG',3693,'PROJCS["NAD83(NSRS2007) / West Virginia North",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.25],PARAMETER["standard_parallel_2",39],PARAMETER["latitude_of_origin",38.5],PARAMETER["central_meridian",-79.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3693"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.25 +lat_2=39 +lat_0=38.5 +lon_0=-79.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3694 : NAD83(NSRS2007) / West Virginia South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3694,'EPSG',3694,'PROJCS["NAD83(NSRS2007) / West Virginia South",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.88333333333333],PARAMETER["standard_parallel_2",37.48333333333333],PARAMETER["latitude_of_origin",37],PARAMETER["central_meridian",-81],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3694"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.88333333333333 +lat_2=37.48333333333333 +lat_0=37 +lon_0=-81 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3694,'EPSG',3694,'PROJCS["NAD83(NSRS2007) / West Virginia South",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.88333333333333],PARAMETER["standard_parallel_2",37.48333333333333],PARAMETER["latitude_of_origin",37],PARAMETER["central_meridian",-81],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3694"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.88333333333333 +lat_2=37.48333333333333 +lat_0=37 +lon_0=-81 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3695 : NAD83(NSRS2007) / Wisconsin Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3695,'EPSG',3695,'PROJCS["NAD83(NSRS2007) / Wisconsin Central",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.5],PARAMETER["standard_parallel_2",44.25],PARAMETER["latitude_of_origin",43.83333333333334],PARAMETER["central_meridian",-90],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3695"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.5 +lat_2=44.25 +lat_0=43.83333333333334 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3695,'EPSG',3695,'PROJCS["NAD83(NSRS2007) / Wisconsin Central",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.5],PARAMETER["standard_parallel_2",44.25],PARAMETER["latitude_of_origin",43.83333333333334],PARAMETER["central_meridian",-90],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3695"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.5 +lat_2=44.25 +lat_0=43.83333333333334 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3696 : NAD83(NSRS2007) / Wisconsin Central (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3696,'EPSG',3696,'PROJCS["NAD83(NSRS2007) / Wisconsin Central (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.5],PARAMETER["standard_parallel_2",44.25],PARAMETER["latitude_of_origin",43.83333333333334],PARAMETER["central_meridian",-90],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3696"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.5 +lat_2=44.25 +lat_0=43.83333333333334 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3696,'EPSG',3696,'PROJCS["NAD83(NSRS2007) / Wisconsin Central (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.5],PARAMETER["standard_parallel_2",44.25],PARAMETER["latitude_of_origin",43.83333333333334],PARAMETER["central_meridian",-90],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3696"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.5 +lat_2=44.25 +lat_0=43.83333333333334 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3697 : NAD83(NSRS2007) / Wisconsin North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3697,'EPSG',3697,'PROJCS["NAD83(NSRS2007) / Wisconsin North",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",46.76666666666667],PARAMETER["standard_parallel_2",45.56666666666667],PARAMETER["latitude_of_origin",45.16666666666666],PARAMETER["central_meridian",-90],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3697"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=46.76666666666667 +lat_2=45.56666666666667 +lat_0=45.16666666666666 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3697,'EPSG',3697,'PROJCS["NAD83(NSRS2007) / Wisconsin North",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",46.76666666666667],PARAMETER["standard_parallel_2",45.56666666666667],PARAMETER["latitude_of_origin",45.16666666666666],PARAMETER["central_meridian",-90],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3697"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=46.76666666666667 +lat_2=45.56666666666667 +lat_0=45.16666666666666 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3698 : NAD83(NSRS2007) / Wisconsin North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3698,'EPSG',3698,'PROJCS["NAD83(NSRS2007) / Wisconsin North (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",46.76666666666667],PARAMETER["standard_parallel_2",45.56666666666667],PARAMETER["latitude_of_origin",45.16666666666666],PARAMETER["central_meridian",-90],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3698"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=46.76666666666667 +lat_2=45.56666666666667 +lat_0=45.16666666666666 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3698,'EPSG',3698,'PROJCS["NAD83(NSRS2007) / Wisconsin North (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",46.76666666666667],PARAMETER["standard_parallel_2",45.56666666666667],PARAMETER["latitude_of_origin",45.16666666666666],PARAMETER["central_meridian",-90],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3698"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=46.76666666666667 +lat_2=45.56666666666667 +lat_0=45.16666666666666 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3699 : NAD83(NSRS2007) / Wisconsin South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3699,'EPSG',3699,'PROJCS["NAD83(NSRS2007) / Wisconsin South",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44.06666666666667],PARAMETER["standard_parallel_2",42.73333333333333],PARAMETER["latitude_of_origin",42],PARAMETER["central_meridian",-90],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3699"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44.06666666666667 +lat_2=42.73333333333333 +lat_0=42 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3699,'EPSG',3699,'PROJCS["NAD83(NSRS2007) / Wisconsin South",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44.06666666666667],PARAMETER["standard_parallel_2",42.73333333333333],PARAMETER["latitude_of_origin",42],PARAMETER["central_meridian",-90],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3699"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44.06666666666667 +lat_2=42.73333333333333 +lat_0=42 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3700 : NAD83(NSRS2007) / Wisconsin South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3700,'EPSG',3700,'PROJCS["NAD83(NSRS2007) / Wisconsin South (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44.06666666666667],PARAMETER["standard_parallel_2",42.73333333333333],PARAMETER["latitude_of_origin",42],PARAMETER["central_meridian",-90],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3700"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44.06666666666667 +lat_2=42.73333333333333 +lat_0=42 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3700,'EPSG',3700,'PROJCS["NAD83(NSRS2007) / Wisconsin South (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44.06666666666667],PARAMETER["standard_parallel_2",42.73333333333333],PARAMETER["latitude_of_origin",42],PARAMETER["central_meridian",-90],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3700"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44.06666666666667 +lat_2=42.73333333333333 +lat_0=42 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3701 : NAD83(NSRS2007) / Wisconsin Transverse Mercator --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3701,'EPSG',3701,'PROJCS["NAD83(NSRS2007) / Wisconsin Transverse Mercator",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-90],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",520000],PARAMETER["false_northing",-4480000],AUTHORITY["EPSG","3701"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-90 +k=0.9996 +x_0=520000 +y_0=-4480000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3701,'EPSG',3701,'PROJCS["NAD83(NSRS2007) / Wisconsin Transverse Mercator",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-90],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",520000],PARAMETER["false_northing",-4480000],AUTHORITY["EPSG","3701"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-90 +k=0.9996 +x_0=520000 +y_0=-4480000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3702 : NAD83(NSRS2007) / Wyoming East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3702,'EPSG',3702,'PROJCS["NAD83(NSRS2007) / Wyoming East",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-105.1666666666667],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3702"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-105.1666666666667 +k=0.9999375 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3702,'EPSG',3702,'PROJCS["NAD83(NSRS2007) / Wyoming East",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-105.1666666666667],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3702"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-105.1666666666667 +k=0.9999375 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3703 : NAD83(NSRS2007) / Wyoming East Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3703,'EPSG',3703,'PROJCS["NAD83(NSRS2007) / Wyoming East Central",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-107.3333333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",400000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","3703"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-107.3333333333333 +k=0.9999375 +x_0=400000 +y_0=100000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3703,'EPSG',3703,'PROJCS["NAD83(NSRS2007) / Wyoming East Central",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-107.3333333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",400000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","3703"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-107.3333333333333 +k=0.9999375 +x_0=400000 +y_0=100000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3704 : NAD83(NSRS2007) / Wyoming West Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3704,'EPSG',3704,'PROJCS["NAD83(NSRS2007) / Wyoming West Central",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-108.75],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3704"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-108.75 +k=0.9999375 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3704,'EPSG',3704,'PROJCS["NAD83(NSRS2007) / Wyoming West Central",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-108.75],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3704"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-108.75 +k=0.9999375 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3705 : NAD83(NSRS2007) / Wyoming West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3705,'EPSG',3705,'PROJCS["NAD83(NSRS2007) / Wyoming West",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-110.0833333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",800000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","3705"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-110.0833333333333 +k=0.9999375 +x_0=800000 +y_0=100000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3705,'EPSG',3705,'PROJCS["NAD83(NSRS2007) / Wyoming West",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-110.0833333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",800000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","3705"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-110.0833333333333 +k=0.9999375 +x_0=800000 +y_0=100000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3706 : NAD83(NSRS2007) / UTM zone 59N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3706,'EPSG',3706,'PROJCS["NAD83(NSRS2007) / UTM zone 59N",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3706"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=59 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3706,'EPSG',3706,'PROJCS["NAD83(NSRS2007) / UTM zone 59N",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3706"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=59 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3707 : NAD83(NSRS2007) / UTM zone 60N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3707,'EPSG',3707,'PROJCS["NAD83(NSRS2007) / UTM zone 60N",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3707"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=60 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3707,'EPSG',3707,'PROJCS["NAD83(NSRS2007) / UTM zone 60N",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3707"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=60 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3708 : NAD83(NSRS2007) / UTM zone 1N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3708,'EPSG',3708,'PROJCS["NAD83(NSRS2007) / UTM zone 1N",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3708"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=1 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3708,'EPSG',3708,'PROJCS["NAD83(NSRS2007) / UTM zone 1N",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3708"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=1 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3709 : NAD83(NSRS2007) / UTM zone 2N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3709,'EPSG',3709,'PROJCS["NAD83(NSRS2007) / UTM zone 2N",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3709"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=2 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3709,'EPSG',3709,'PROJCS["NAD83(NSRS2007) / UTM zone 2N",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3709"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=2 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3710 : NAD83(NSRS2007) / UTM zone 3N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3710,'EPSG',3710,'PROJCS["NAD83(NSRS2007) / UTM zone 3N",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3710"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=3 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3710,'EPSG',3710,'PROJCS["NAD83(NSRS2007) / UTM zone 3N",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3710"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=3 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3711 : NAD83(NSRS2007) / UTM zone 4N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3711,'EPSG',3711,'PROJCS["NAD83(NSRS2007) / UTM zone 4N",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-159],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3711"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=4 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3711,'EPSG',3711,'PROJCS["NAD83(NSRS2007) / UTM zone 4N",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-159],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3711"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=4 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3712 : NAD83(NSRS2007) / UTM zone 5N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3712,'EPSG',3712,'PROJCS["NAD83(NSRS2007) / UTM zone 5N",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3712"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=5 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3712,'EPSG',3712,'PROJCS["NAD83(NSRS2007) / UTM zone 5N",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3712"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=5 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3713 : NAD83(NSRS2007) / UTM zone 6N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3713,'EPSG',3713,'PROJCS["NAD83(NSRS2007) / UTM zone 6N",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3713"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=6 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3713,'EPSG',3713,'PROJCS["NAD83(NSRS2007) / UTM zone 6N",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3713"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=6 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3714 : NAD83(NSRS2007) / UTM zone 7N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3714,'EPSG',3714,'PROJCS["NAD83(NSRS2007) / UTM zone 7N",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3714"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=7 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3714,'EPSG',3714,'PROJCS["NAD83(NSRS2007) / UTM zone 7N",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3714"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=7 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3715 : NAD83(NSRS2007) / UTM zone 8N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3715,'EPSG',3715,'PROJCS["NAD83(NSRS2007) / UTM zone 8N",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3715"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=8 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3715,'EPSG',3715,'PROJCS["NAD83(NSRS2007) / UTM zone 8N",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3715"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=8 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3716 : NAD83(NSRS2007) / UTM zone 9N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3716,'EPSG',3716,'PROJCS["NAD83(NSRS2007) / UTM zone 9N",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3716"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=9 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3716,'EPSG',3716,'PROJCS["NAD83(NSRS2007) / UTM zone 9N",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3716"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=9 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3717 : NAD83(NSRS2007) / UTM zone 10N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3717,'EPSG',3717,'PROJCS["NAD83(NSRS2007) / UTM zone 10N",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3717"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=10 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3717,'EPSG',3717,'PROJCS["NAD83(NSRS2007) / UTM zone 10N",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3717"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=10 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3718 : NAD83(NSRS2007) / UTM zone 11N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3718,'EPSG',3718,'PROJCS["NAD83(NSRS2007) / UTM zone 11N",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],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],AUTHORITY["EPSG","3718"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=11 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3718,'EPSG',3718,'PROJCS["NAD83(NSRS2007) / UTM zone 11N",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],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],AUTHORITY["EPSG","3718"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=11 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3719 : NAD83(NSRS2007) / UTM zone 12N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3719,'EPSG',3719,'PROJCS["NAD83(NSRS2007) / UTM zone 12N",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3719"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=12 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3719,'EPSG',3719,'PROJCS["NAD83(NSRS2007) / UTM zone 12N",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3719"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=12 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3720 : NAD83(NSRS2007) / UTM zone 13N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3720,'EPSG',3720,'PROJCS["NAD83(NSRS2007) / UTM zone 13N",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3720"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=13 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3720,'EPSG',3720,'PROJCS["NAD83(NSRS2007) / UTM zone 13N",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3720"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=13 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3721 : NAD83(NSRS2007) / UTM zone 14N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3721,'EPSG',3721,'PROJCS["NAD83(NSRS2007) / UTM zone 14N",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3721"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=14 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3721,'EPSG',3721,'PROJCS["NAD83(NSRS2007) / UTM zone 14N",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3721"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=14 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3722 : NAD83(NSRS2007) / UTM zone 15N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3722,'EPSG',3722,'PROJCS["NAD83(NSRS2007) / UTM zone 15N",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3722"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=15 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3722,'EPSG',3722,'PROJCS["NAD83(NSRS2007) / UTM zone 15N",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3722"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=15 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3723 : NAD83(NSRS2007) / UTM zone 16N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3723,'EPSG',3723,'PROJCS["NAD83(NSRS2007) / UTM zone 16N",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3723"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=16 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3723,'EPSG',3723,'PROJCS["NAD83(NSRS2007) / UTM zone 16N",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3723"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=16 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3724 : NAD83(NSRS2007) / UTM zone 17N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3724,'EPSG',3724,'PROJCS["NAD83(NSRS2007) / UTM zone 17N",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3724"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3724,'EPSG',3724,'PROJCS["NAD83(NSRS2007) / UTM zone 17N",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3724"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3725 : NAD83(NSRS2007) / UTM zone 18N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3725,'EPSG',3725,'PROJCS["NAD83(NSRS2007) / UTM zone 18N",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3725"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3725,'EPSG',3725,'PROJCS["NAD83(NSRS2007) / UTM zone 18N",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3725"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3726 : NAD83(NSRS2007) / UTM zone 19N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3726,'EPSG',3726,'PROJCS["NAD83(NSRS2007) / UTM zone 19N",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3726"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3726,'EPSG',3726,'PROJCS["NAD83(NSRS2007) / UTM zone 19N",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3726"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3727 : Reunion 1947 / TM Reunion --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3727,'EPSG',3727,'PROJCS["Reunion 1947 / TM Reunion",GEOGCS["Reunion 1947",DATUM["Reunion_1947",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6626"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4626"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-21.11666666666667],PARAMETER["central_meridian",55.53333333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",160000],PARAMETER["false_northing",50000],AUTHORITY["EPSG","3727"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=-21.11666666666667 +lon_0=55.53333333333333 +k=1 +x_0=160000 +y_0=50000 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3727,'EPSG',3727,'PROJCS["Reunion 1947 / TM Reunion",GEOGCS["Reunion 1947",DATUM["Reunion_1947",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[94,-948,-1262,0,0,0,0],AUTHORITY["EPSG","6626"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4626"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-21.11666666666667],PARAMETER["central_meridian",55.53333333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",160000],PARAMETER["false_northing",50000],AUTHORITY["EPSG","3727"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=-21.11666666666667 +lon_0=55.53333333333333 +k=1 +x_0=160000 +y_0=50000 +ellps=intl +towgs84=94,-948,-1262,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3728 : NAD83(NSRS2007) / Ohio North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3728,'EPSG',3728,'PROJCS["NAD83(NSRS2007) / Ohio North (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.7],PARAMETER["standard_parallel_2",40.43333333333333],PARAMETER["latitude_of_origin",39.66666666666666],PARAMETER["central_meridian",-82.5],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3728"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.7 +lat_2=40.43333333333333 +lat_0=39.66666666666666 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3728,'EPSG',3728,'PROJCS["NAD83(NSRS2007) / Ohio North (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.7],PARAMETER["standard_parallel_2",40.43333333333333],PARAMETER["latitude_of_origin",39.66666666666666],PARAMETER["central_meridian",-82.5],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3728"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.7 +lat_2=40.43333333333333 +lat_0=39.66666666666666 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3729 : NAD83(NSRS2007) / Ohio South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3729,'EPSG',3729,'PROJCS["NAD83(NSRS2007) / Ohio South (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.03333333333333],PARAMETER["standard_parallel_2",38.73333333333333],PARAMETER["latitude_of_origin",38],PARAMETER["central_meridian",-82.5],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3729"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.03333333333333 +lat_2=38.73333333333333 +lat_0=38 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3729,'EPSG',3729,'PROJCS["NAD83(NSRS2007) / Ohio South (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.03333333333333],PARAMETER["standard_parallel_2",38.73333333333333],PARAMETER["latitude_of_origin",38],PARAMETER["central_meridian",-82.5],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3729"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.03333333333333 +lat_2=38.73333333333333 +lat_0=38 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3730 : NAD83(NSRS2007) / Wyoming East (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3730,'EPSG',3730,'PROJCS["NAD83(NSRS2007) / Wyoming East (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-105.1666666666667],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",656166.6667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3730"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-105.1666666666667 +k=0.9999375 +x_0=200000.00001016 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3730,'EPSG',3730,'PROJCS["NAD83(NSRS2007) / Wyoming East (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-105.1666666666667],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",656166.6667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3730"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-105.1666666666667 +k=0.9999375 +x_0=200000.00001016 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3731 : NAD83(NSRS2007) / Wyoming East Central (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3731,'EPSG',3731,'PROJCS["NAD83(NSRS2007) / Wyoming East Central (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-107.3333333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",1312333.3333],PARAMETER["false_northing",328083.3333],AUTHORITY["EPSG","3731"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-107.3333333333333 +k=0.9999375 +x_0=399999.99998984 +y_0=99999.99998983997 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3731,'EPSG',3731,'PROJCS["NAD83(NSRS2007) / Wyoming East Central (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-107.3333333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",1312333.3333],PARAMETER["false_northing",328083.3333],AUTHORITY["EPSG","3731"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-107.3333333333333 +k=0.9999375 +x_0=399999.99998984 +y_0=99999.99998983997 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3732 : NAD83(NSRS2007) / Wyoming West Central (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3732,'EPSG',3732,'PROJCS["NAD83(NSRS2007) / Wyoming West Central (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-108.75],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3732"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-108.75 +k=0.9999375 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3732,'EPSG',3732,'PROJCS["NAD83(NSRS2007) / Wyoming West Central (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-108.75],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3732"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-108.75 +k=0.9999375 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3733 : NAD83(NSRS2007) / Wyoming West (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3733,'EPSG',3733,'PROJCS["NAD83(NSRS2007) / Wyoming West (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-110.0833333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",2624666.6667],PARAMETER["false_northing",328083.3333],AUTHORITY["EPSG","3733"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-110.0833333333333 +k=0.9999375 +x_0=800000.0000101599 +y_0=99999.99998983997 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3733,'EPSG',3733,'PROJCS["NAD83(NSRS2007) / Wyoming West (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-110.0833333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",2624666.6667],PARAMETER["false_northing",328083.3333],AUTHORITY["EPSG","3733"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-110.0833333333333 +k=0.9999375 +x_0=800000.0000101599 +y_0=99999.99998983997 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3734 : NAD83 / Ohio North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3734,'EPSG',3734,'PROJCS["NAD83 / Ohio North (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.7],PARAMETER["standard_parallel_2",40.43333333333333],PARAMETER["latitude_of_origin",39.66666666666666],PARAMETER["central_meridian",-82.5],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3734"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.7 +lat_2=40.43333333333333 +lat_0=39.66666666666666 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3734,'EPSG',3734,'PROJCS["NAD83 / Ohio North (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.7],PARAMETER["standard_parallel_2",40.43333333333333],PARAMETER["latitude_of_origin",39.66666666666666],PARAMETER["central_meridian",-82.5],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3734"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.7 +lat_2=40.43333333333333 +lat_0=39.66666666666666 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3735 : NAD83 / Ohio South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3735,'EPSG',3735,'PROJCS["NAD83 / Ohio South (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.03333333333333],PARAMETER["standard_parallel_2",38.73333333333333],PARAMETER["latitude_of_origin",38],PARAMETER["central_meridian",-82.5],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3735"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.03333333333333 +lat_2=38.73333333333333 +lat_0=38 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3735,'EPSG',3735,'PROJCS["NAD83 / Ohio South (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.03333333333333],PARAMETER["standard_parallel_2",38.73333333333333],PARAMETER["latitude_of_origin",38],PARAMETER["central_meridian",-82.5],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3735"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.03333333333333 +lat_2=38.73333333333333 +lat_0=38 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3736 : NAD83 / Wyoming East (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3736,'EPSG',3736,'PROJCS["NAD83 / Wyoming 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",40.5],PARAMETER["central_meridian",-105.1666666666667],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",656166.6667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3736"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-105.1666666666667 +k=0.9999375 +x_0=200000.00001016 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3736,'EPSG',3736,'PROJCS["NAD83 / Wyoming East (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-105.1666666666667],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",656166.6667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3736"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-105.1666666666667 +k=0.9999375 +x_0=200000.00001016 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3737 : NAD83 / Wyoming East Central (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3737,'EPSG',3737,'PROJCS["NAD83 / Wyoming East Central (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",40.5],PARAMETER["central_meridian",-107.3333333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",1312333.3333],PARAMETER["false_northing",328083.3333],AUTHORITY["EPSG","3737"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-107.3333333333333 +k=0.9999375 +x_0=399999.99998984 +y_0=99999.99998983997 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3737,'EPSG',3737,'PROJCS["NAD83 / Wyoming East Central (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-107.3333333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",1312333.3333],PARAMETER["false_northing",328083.3333],AUTHORITY["EPSG","3737"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-107.3333333333333 +k=0.9999375 +x_0=399999.99998984 +y_0=99999.99998983997 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3738 : NAD83 / Wyoming West Central (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3738,'EPSG',3738,'PROJCS["NAD83 / Wyoming West Central (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",40.5],PARAMETER["central_meridian",-108.75],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3738"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-108.75 +k=0.9999375 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3738,'EPSG',3738,'PROJCS["NAD83 / Wyoming West Central (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-108.75],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3738"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-108.75 +k=0.9999375 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3739 : NAD83 / Wyoming West (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3739,'EPSG',3739,'PROJCS["NAD83 / Wyoming West (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",40.5],PARAMETER["central_meridian",-110.0833333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",2624666.6667],PARAMETER["false_northing",328083.3333],AUTHORITY["EPSG","3739"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-110.0833333333333 +k=0.9999375 +x_0=800000.0000101599 +y_0=99999.99998983997 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3739,'EPSG',3739,'PROJCS["NAD83 / Wyoming West (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-110.0833333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",2624666.6667],PARAMETER["false_northing",328083.3333],AUTHORITY["EPSG","3739"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-110.0833333333333 +k=0.9999375 +x_0=800000.0000101599 +y_0=99999.99998983997 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3740 : NAD83(HARN) / UTM zone 10N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3740,'EPSG',3740,'PROJCS["NAD83(HARN) / UTM zone 10N",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3740"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=10 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3740,'EPSG',3740,'PROJCS["NAD83(HARN) / UTM zone 10N",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3740"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=10 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3741 : NAD83(HARN) / UTM zone 11N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3741,'EPSG',3741,'PROJCS["NAD83(HARN) / UTM zone 11N",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],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],AUTHORITY["EPSG","3741"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=11 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3741,'EPSG',3741,'PROJCS["NAD83(HARN) / UTM zone 11N",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],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],AUTHORITY["EPSG","3741"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=11 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3742 : NAD83(HARN) / UTM zone 12N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3742,'EPSG',3742,'PROJCS["NAD83(HARN) / UTM zone 12N",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3742"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=12 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3742,'EPSG',3742,'PROJCS["NAD83(HARN) / UTM zone 12N",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3742"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=12 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3743 : NAD83(HARN) / UTM zone 13N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3743,'EPSG',3743,'PROJCS["NAD83(HARN) / UTM zone 13N",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3743"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=13 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3743,'EPSG',3743,'PROJCS["NAD83(HARN) / UTM zone 13N",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3743"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=13 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3744 : NAD83(HARN) / UTM zone 14N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3744,'EPSG',3744,'PROJCS["NAD83(HARN) / UTM zone 14N",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3744"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=14 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3744,'EPSG',3744,'PROJCS["NAD83(HARN) / UTM zone 14N",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3744"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=14 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3745 : NAD83(HARN) / UTM zone 15N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3745,'EPSG',3745,'PROJCS["NAD83(HARN) / UTM zone 15N",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3745"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=15 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3745,'EPSG',3745,'PROJCS["NAD83(HARN) / UTM zone 15N",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3745"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=15 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3746 : NAD83(HARN) / UTM zone 16N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3746,'EPSG',3746,'PROJCS["NAD83(HARN) / UTM zone 16N",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3746"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=16 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3746,'EPSG',3746,'PROJCS["NAD83(HARN) / UTM zone 16N",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3746"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=16 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3747 : NAD83(HARN) / UTM zone 17N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3747,'EPSG',3747,'PROJCS["NAD83(HARN) / UTM zone 17N",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3747"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3747,'EPSG',3747,'PROJCS["NAD83(HARN) / UTM zone 17N",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3747"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3748 : NAD83(HARN) / UTM zone 18N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3748,'EPSG',3748,'PROJCS["NAD83(HARN) / UTM zone 18N",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3748"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3748,'EPSG',3748,'PROJCS["NAD83(HARN) / UTM zone 18N",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3748"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3749 : NAD83(HARN) / UTM zone 19N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3749,'EPSG',3749,'PROJCS["NAD83(HARN) / UTM zone 19N",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3749"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3749,'EPSG',3749,'PROJCS["NAD83(HARN) / UTM zone 19N",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3749"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3750 : NAD83(HARN) / UTM zone 4N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3750,'EPSG',3750,'PROJCS["NAD83(HARN) / UTM zone 4N",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-159],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3750"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=4 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3750,'EPSG',3750,'PROJCS["NAD83(HARN) / UTM zone 4N",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-159],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3750"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=4 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3751 : NAD83(HARN) / UTM zone 5N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3751,'EPSG',3751,'PROJCS["NAD83(HARN) / UTM zone 5N",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3751"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=5 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3751,'EPSG',3751,'PROJCS["NAD83(HARN) / UTM zone 5N",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3751"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=5 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3752 : WGS 84 / Mercator 41 (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3752,'EPSG',3752,'PROJCS["WGS 84 / Mercator 41 (deprecated)",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Mercator_1SP"],PARAMETER["latitude_of_origin",-41],PARAMETER["central_meridian",100],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3752"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=merc +lon_0=100 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3752,'EPSG',3752,'PROJCS["WGS 84 / Mercator 41 (deprecated)",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Mercator_1SP"],PARAMETER["latitude_of_origin",-41],PARAMETER["central_meridian",100],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3752"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=merc +lon_0=100 +lat_ts=-41 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3753 : NAD83(HARN) / Ohio North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3753,'EPSG',3753,'PROJCS["NAD83(HARN) / Ohio North (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.7],PARAMETER["standard_parallel_2",40.43333333333333],PARAMETER["latitude_of_origin",39.66666666666666],PARAMETER["central_meridian",-82.5],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3753"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.7 +lat_2=40.43333333333333 +lat_0=39.66666666666666 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3753,'EPSG',3753,'PROJCS["NAD83(HARN) / Ohio North (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.7],PARAMETER["standard_parallel_2",40.43333333333333],PARAMETER["latitude_of_origin",39.66666666666666],PARAMETER["central_meridian",-82.5],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3753"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.7 +lat_2=40.43333333333333 +lat_0=39.66666666666666 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3754 : NAD83(HARN) / Ohio South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3754,'EPSG',3754,'PROJCS["NAD83(HARN) / Ohio South (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.03333333333333],PARAMETER["standard_parallel_2",38.73333333333333],PARAMETER["latitude_of_origin",38],PARAMETER["central_meridian",-82.5],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3754"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.03333333333333 +lat_2=38.73333333333333 +lat_0=38 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3754,'EPSG',3754,'PROJCS["NAD83(HARN) / Ohio South (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.03333333333333],PARAMETER["standard_parallel_2",38.73333333333333],PARAMETER["latitude_of_origin",38],PARAMETER["central_meridian",-82.5],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3754"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.03333333333333 +lat_2=38.73333333333333 +lat_0=38 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3755 : NAD83(HARN) / Wyoming East (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3755,'EPSG',3755,'PROJCS["NAD83(HARN) / Wyoming East (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-105.1666666666667],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",656166.6667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3755"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-105.1666666666667 +k=0.9999375 +x_0=200000.00001016 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3755,'EPSG',3755,'PROJCS["NAD83(HARN) / Wyoming East (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-105.1666666666667],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",656166.6667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3755"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-105.1666666666667 +k=0.9999375 +x_0=200000.00001016 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3756 : NAD83(HARN) / Wyoming East Central (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3756,'EPSG',3756,'PROJCS["NAD83(HARN) / Wyoming East Central (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-107.3333333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",1312333.3333],PARAMETER["false_northing",328083.3333],AUTHORITY["EPSG","3756"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-107.3333333333333 +k=0.9999375 +x_0=399999.99998984 +y_0=99999.99998983997 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3756,'EPSG',3756,'PROJCS["NAD83(HARN) / Wyoming East Central (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-107.3333333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",1312333.3333],PARAMETER["false_northing",328083.3333],AUTHORITY["EPSG","3756"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-107.3333333333333 +k=0.9999375 +x_0=399999.99998984 +y_0=99999.99998983997 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3757 : NAD83(HARN) / Wyoming West Central (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3757,'EPSG',3757,'PROJCS["NAD83(HARN) / Wyoming West Central (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-108.75],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3757"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-108.75 +k=0.9999375 +x_0=600000 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3757,'EPSG',3757,'PROJCS["NAD83(HARN) / Wyoming West Central (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-108.75],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","3757"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-108.75 +k=0.9999375 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3758 : NAD83(HARN) / Wyoming West (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3758,'EPSG',3758,'PROJCS["NAD83(HARN) / Wyoming West (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-110.0833333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",2624666.6667],PARAMETER["false_northing",328083.3333],AUTHORITY["EPSG","3758"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-110.0833333333333 +k=0.9999375 +x_0=800000.0000101599 +y_0=99999.99998983997 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3758,'EPSG',3758,'PROJCS["NAD83(HARN) / Wyoming West (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-110.0833333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",2624666.6667],PARAMETER["false_northing",328083.3333],AUTHORITY["EPSG","3758"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-110.0833333333333 +k=0.9999375 +x_0=800000.0000101599 +y_0=99999.99998983997 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3759 : NAD83 / Hawaii zone 3 (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3759,'EPSG',3759,'PROJCS["NAD83 / Hawaii zone 3 (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",21.16666666666667],PARAMETER["central_meridian",-158],PARAMETER["scale_factor",0.99999],PARAMETER["false_easting",1640416.6667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3759"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=21.16666666666667 +lon_0=-158 +k=0.99999 +x_0=500000.00001016 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3759,'EPSG',3759,'PROJCS["NAD83 / Hawaii zone 3 (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",21.16666666666667],PARAMETER["central_meridian",-158],PARAMETER["scale_factor",0.99999],PARAMETER["false_easting",1640416.6667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3759"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=21.16666666666667 +lon_0=-158 +k=0.99999 +x_0=500000.00001016 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3760 : NAD83(HARN) / Hawaii zone 3 (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3760,'EPSG',3760,'PROJCS["NAD83(HARN) / Hawaii zone 3 (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",21.16666666666667],PARAMETER["central_meridian",-158],PARAMETER["scale_factor",0.99999],PARAMETER["false_easting",1640416.6667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3760"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=21.16666666666667 +lon_0=-158 +k=0.99999 +x_0=500000.00001016 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3760,'EPSG',3760,'PROJCS["NAD83(HARN) / Hawaii zone 3 (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",21.16666666666667],PARAMETER["central_meridian",-158],PARAMETER["scale_factor",0.99999],PARAMETER["false_easting",1640416.6667],PARAMETER["false_northing",0],AUTHORITY["EPSG","3760"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=21.16666666666667 +lon_0=-158 +k=0.99999 +x_0=500000.00001016 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3761 : NAD83(CSRS) / UTM zone 22N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3761,'EPSG',3761,'PROJCS["NAD83(CSRS) / UTM zone 22N",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3761"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3761,'EPSG',3761,'PROJCS["NAD83(CSRS) / UTM zone 22N",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3761"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3762 : WGS 84 / South Georgia Lambert --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3762,'EPSG',3762,'PROJCS["WGS 84 / South Georgia Lambert",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-54],PARAMETER["standard_parallel_2",-54.75],PARAMETER["latitude_of_origin",-55],PARAMETER["central_meridian",-37],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3762"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-54 +lat_2=-54.75 +lat_0=-55 +lon_0=-37 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3762,'EPSG',3762,'PROJCS["WGS 84 / South Georgia Lambert",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-54],PARAMETER["standard_parallel_2",-54.75],PARAMETER["latitude_of_origin",-55],PARAMETER["central_meridian",-37],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3762"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-54 +lat_2=-54.75 +lat_0=-55 +lon_0=-37 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3763 : ETRS89 / Portugal TM06 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3763,'EPSG',3763,'PROJCS["ETRS89 / Portugal TM06",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",39.66825833333333],PARAMETER["central_meridian",-8.133108333333334],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3763"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=39.66825833333333 +lon_0=-8.133108333333334 +k=1 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3763,'EPSG',3763,'PROJCS["ETRS89 / Portugal TM06",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",39.66825833333333],PARAMETER["central_meridian",-8.133108333333334],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3763"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=39.66825833333333 +lon_0=-8.133108333333334 +k=1 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3764 : NZGD2000 / Chatham Island Circuit 2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3764,'EPSG',3764,'PROJCS["NZGD2000 / Chatham Island Circuit 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-44],PARAMETER["central_meridian",-176.5],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","3764"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-44 +lon_0=-176.5 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3764,'EPSG',3764,'PROJCS["NZGD2000 / Chatham Island Circuit 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-44],PARAMETER["central_meridian",-176.5],PARAMETER["scale_factor",1],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","3764"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-44 +lon_0=-176.5 +k=1 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3765 : HTRS96 / Croatia TM --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3765,'EPSG',3765,'PROJCS["HTRS96 / Croatia TM",GEOGCS["HTRS96",DATUM["Croatian_Terrestrial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6761"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4761"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",16.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3765"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=16.5 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3765,'EPSG',3765,'PROJCS["HTRS96 / Croatia TM",GEOGCS["HTRS96",DATUM["Croatian_Terrestrial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6761"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4761"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",16.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3765"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=16.5 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3766 : HTRS96 / Croatia LCC --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3766,'EPSG',3766,'PROJCS["HTRS96 / Croatia LCC",GEOGCS["HTRS96",DATUM["Croatian_Terrestrial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6761"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4761"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.91666666666666],PARAMETER["standard_parallel_2",43.08333333333334],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",16.5],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3766"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=45.91666666666666 +lat_2=43.08333333333334 +lat_0=0 +lon_0=16.5 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3766,'EPSG',3766,'PROJCS["HTRS96 / Croatia LCC",GEOGCS["HTRS96",DATUM["Croatian_Terrestrial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6761"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4761"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.91666666666666],PARAMETER["standard_parallel_2",43.08333333333334],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",16.5],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3766"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=45.91666666666666 +lat_2=43.08333333333334 +lat_0=0 +lon_0=16.5 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3767 : HTRS96 / UTM zone 33N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3767,'EPSG',3767,'PROJCS["HTRS96 / UTM zone 33N",GEOGCS["HTRS96",DATUM["Croatian_Terrestrial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6761"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4761"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3767"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3767,'EPSG',3767,'PROJCS["HTRS96 / UTM zone 33N",GEOGCS["HTRS96",DATUM["Croatian_Terrestrial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6761"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4761"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3767"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3768 : HTRS96 / UTM zone 34N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3768,'EPSG',3768,'PROJCS["HTRS96 / UTM zone 34N",GEOGCS["HTRS96",DATUM["Croatian_Terrestrial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6761"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4761"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3768"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=34 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3768,'EPSG',3768,'PROJCS["HTRS96 / UTM zone 34N",GEOGCS["HTRS96",DATUM["Croatian_Terrestrial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6761"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4761"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3768"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=34 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3769 : Bermuda 1957 / UTM zone 20N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3769,'EPSG',3769,'PROJCS["Bermuda 1957 / UTM zone 20N",GEOGCS["Bermuda 1957",DATUM["Bermuda_1957",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6216"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4216"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3769"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=clrk66 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3769,'EPSG',3769,'PROJCS["Bermuda 1957 / UTM zone 20N",GEOGCS["Bermuda 1957",DATUM["Bermuda_1957",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-73,213,296,0,0,0,0],AUTHORITY["EPSG","6216"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4216"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3769"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=clrk66 +towgs84=-73,213,296,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3770 : BDA2000 / Bermuda 2000 National Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3770,'EPSG',3770,'PROJCS["BDA2000 / Bermuda 2000 National Grid",GEOGCS["BDA2000",DATUM["Bermuda_2000",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6762"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4762"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",32],PARAMETER["central_meridian",-64.75],PARAMETER["scale_factor",1],PARAMETER["false_easting",550000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","3770"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=32 +lon_0=-64.75 +k=1 +x_0=550000 +y_0=100000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3770,'EPSG',3770,'PROJCS["BDA2000 / Bermuda 2000 National Grid",GEOGCS["BDA2000",DATUM["Bermuda_2000",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6762"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4762"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",32],PARAMETER["central_meridian",-64.75],PARAMETER["scale_factor",1],PARAMETER["false_easting",550000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","3770"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=32 +lon_0=-64.75 +k=1 +x_0=550000 +y_0=100000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3771 : NAD27 / Alberta 3TM ref merid 111 W --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3771,'EPSG',3771,'PROJCS["NAD27 / Alberta 3TM ref merid 111 W",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-111],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3771"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-111 +k=0.9999 +x_0=0 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3771,'EPSG',3771,'PROJCS["NAD27 / Alberta 3TM ref merid 111 W",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-111],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3771"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-111 +k=0.9999 +x_0=0 +y_0=0 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 3772 : NAD27 / Alberta 3TM ref merid 114 W --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3772,'EPSG',3772,'PROJCS["NAD27 / Alberta 3TM ref merid 114 W",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-114],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3772"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-114 +k=0.9999 +x_0=0 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3772,'EPSG',3772,'PROJCS["NAD27 / Alberta 3TM ref merid 114 W",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-114],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3772"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-114 +k=0.9999 +x_0=0 +y_0=0 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 3773 : NAD27 / Alberta 3TM ref merid 117 W --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3773,'EPSG',3773,'PROJCS["NAD27 / Alberta 3TM ref merid 117 W",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3773"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-117 +k=0.9999 +x_0=0 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3773,'EPSG',3773,'PROJCS["NAD27 / Alberta 3TM ref merid 117 W",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3773"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-117 +k=0.9999 +x_0=0 +y_0=0 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 3774 : NAD27 / Alberta 3TM ref merid 120 W (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3774,'EPSG',3774,'PROJCS["NAD27 / Alberta 3TM ref merid 120 W (deprecated)",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-120],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3774"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-120 +k=0.9999 +x_0=0 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3774,'EPSG',3774,'PROJCS["NAD27 / Alberta 3TM ref merid 120 W (deprecated)",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-120],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3774"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-120 +k=0.9999 +x_0=0 +y_0=0 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 3775 : NAD83 / Alberta 3TM ref merid 111 W --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3775,'EPSG',3775,'PROJCS["NAD83 / Alberta 3TM ref merid 111 W",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-111],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3775"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-111 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3775,'EPSG',3775,'PROJCS["NAD83 / Alberta 3TM ref merid 111 W",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-111],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3775"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-111 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3776 : NAD83 / Alberta 3TM ref merid 114 W --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3776,'EPSG',3776,'PROJCS["NAD83 / Alberta 3TM ref merid 114 W",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-114],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3776"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-114 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3776,'EPSG',3776,'PROJCS["NAD83 / Alberta 3TM ref merid 114 W",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-114],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3776"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-114 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3777 : NAD83 / Alberta 3TM ref merid 117 W --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3777,'EPSG',3777,'PROJCS["NAD83 / Alberta 3TM ref merid 117 W",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3777"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-117 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3777,'EPSG',3777,'PROJCS["NAD83 / Alberta 3TM ref merid 117 W",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3777"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-117 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3778 : NAD83 / Alberta 3TM ref merid 120 W (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3778,'EPSG',3778,'PROJCS["NAD83 / Alberta 3TM ref merid 120 W (deprecated)",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-120],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3778"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-120 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3778,'EPSG',3778,'PROJCS["NAD83 / Alberta 3TM ref merid 120 W (deprecated)",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-120],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3778"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-120 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3779 : NAD83(CSRS) / Alberta 3TM ref merid 111 W --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3779,'EPSG',3779,'PROJCS["NAD83(CSRS) / Alberta 3TM ref merid 111 W",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-111],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3779"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-111 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3779,'EPSG',3779,'PROJCS["NAD83(CSRS) / Alberta 3TM ref merid 111 W",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-111],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3779"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-111 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3780 : NAD83(CSRS) / Alberta 3TM ref merid 114 W --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3780,'EPSG',3780,'PROJCS["NAD83(CSRS) / Alberta 3TM ref merid 114 W",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-114],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3780"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-114 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3780,'EPSG',3780,'PROJCS["NAD83(CSRS) / Alberta 3TM ref merid 114 W",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-114],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3780"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-114 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3781 : NAD83(CSRS) / Alberta 3TM ref merid 117 W --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3781,'EPSG',3781,'PROJCS["NAD83(CSRS) / Alberta 3TM ref merid 117 W",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3781"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-117 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3781,'EPSG',3781,'PROJCS["NAD83(CSRS) / Alberta 3TM ref merid 117 W",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3781"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-117 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3782 : NAD83(CSRS) / Alberta 3TM ref merid 120 W (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3782,'EPSG',3782,'PROJCS["NAD83(CSRS) / Alberta 3TM ref merid 120 W (deprecated)",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-120],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3782"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-120 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3782,'EPSG',3782,'PROJCS["NAD83(CSRS) / Alberta 3TM ref merid 120 W (deprecated)",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-120],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3782"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-120 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3783 : Pitcairn 2006 / Pitcairn TM 2006 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3783,'EPSG',3783,'PROJCS["Pitcairn 2006 / Pitcairn TM 2006",GEOGCS["Pitcairn 2006",DATUM["Pitcairn_2006",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6763"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4763"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-25.06855261111111],PARAMETER["central_meridian",-130.1129671111111],PARAMETER["scale_factor",1],PARAMETER["false_easting",14200],PARAMETER["false_northing",15500],AUTHORITY["EPSG","3783"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-25.06855261111111 +lon_0=-130.1129671111111 +k=1 +x_0=14200 +y_0=15500 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3783,'EPSG',3783,'PROJCS["Pitcairn 2006 / Pitcairn TM 2006",GEOGCS["Pitcairn 2006",DATUM["Pitcairn_2006",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6763"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4763"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-25.06855261111111],PARAMETER["central_meridian",-130.1129671111111],PARAMETER["scale_factor",1],PARAMETER["false_easting",14200],PARAMETER["false_northing",15500],AUTHORITY["EPSG","3783"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-25.06855261111111 +lon_0=-130.1129671111111 +k=1 +x_0=14200 +y_0=15500 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3784 : Pitcairn 1967 / UTM zone 9S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3784,'EPSG',3784,'PROJCS["Pitcairn 1967 / UTM zone 9S",GEOGCS["Pitcairn 1967",DATUM["Pitcairn_1967",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[185,165,42,0,0,0,0],AUTHORITY["EPSG","6729"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4729"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3784"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=9 +south +ellps=intl +towgs84=185,165,42,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3784,'EPSG',3784,'PROJCS["Pitcairn 1967 / UTM zone 9S",GEOGCS["Pitcairn 1967",DATUM["Pitcairn_1967",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[185,165,42,0,0,0,0],AUTHORITY["EPSG","6729"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4729"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3784"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=9 +south +ellps=intl +towgs84=185,165,42,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3785 : Popular Visualisation CRS / Mercator (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3785,'EPSG',3785,'PROJCS["Popular Visualisation CRS / Mercator (deprecated)",GEOGCS["Popular Visualisation CRS",DATUM["Popular_Visualisation_Datum",SPHEROID["Popular Visualisation Sphere",6378137,0,AUTHORITY["EPSG","7059"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6055"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4055"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3785"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +units=m +k=1.0 +nadgrids=@null +no_defs' ); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3785,'EPSG',3785,'PROJCS["Popular Visualisation CRS / Mercator (deprecated)",GEOGCS["Popular Visualisation CRS",DATUM["Popular_Visualisation_Datum",SPHEROID["Popular Visualisation Sphere",6378137,0,AUTHORITY["EPSG","7059"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6055"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4055"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs"],AUTHORITY["EPSG","3785"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs'); --- --- EPSG 3786 : World Equidistant Cylindrical (Sphere) (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3786,'EPSG',3786,'PROJCS["World Equidistant Cylindrical (Sphere) (deprecated)",GEOGCS["Unspecified datum based upon the GRS 1980 Authalic Sphere",DATUM["Not_specified_based_on_GRS_1980_Authalic_Sphere",SPHEROID["GRS 1980 Authalic Sphere",6371007,0,AUTHORITY["EPSG","7048"]],AUTHORITY["EPSG","6047"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4047"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Equirectangular"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",0],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3786"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=eqc +lat_ts=0 +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +a=6371007 +b=6371007 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3786,'EPSG',3786,'PROJCS["World Equidistant Cylindrical (Sphere) (deprecated)",GEOGCS["Unspecified datum based upon the GRS 1980 Authalic Sphere",DATUM["Not_specified_based_on_GRS_1980_Authalic_Sphere",SPHEROID["GRS 1980 Authalic Sphere",6371007,0,AUTHORITY["EPSG","7048"]],AUTHORITY["EPSG","6047"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4047"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Equirectangular"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",0],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3786"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=eqc +lat_ts=0 +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +a=6371007 +b=6371007 +units=m +no_defs '); --- --- EPSG 3787 : MGI / Slovene National Grid (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3787,'EPSG',3787,'PROJCS["MGI / Slovene National Grid (deprecated)",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",-5000000],AUTHORITY["EPSG","3787"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=0.9999 +x_0=500000 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3787,'EPSG',3787,'PROJCS["MGI / Slovene National Grid (deprecated)",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",-5000000],AUTHORITY["EPSG","3787"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=0.9999 +x_0=500000 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); --- --- EPSG 3788 : NZGD2000 / Auckland Islands TM 2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3788,'EPSG',3788,'PROJCS["NZGD2000 / Auckland Islands TM 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",166],PARAMETER["scale_factor",1],PARAMETER["false_easting",3500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3788"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=166 +k=1 +x_0=3500000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3788,'EPSG',3788,'PROJCS["NZGD2000 / Auckland Islands TM 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",166],PARAMETER["scale_factor",1],PARAMETER["false_easting",3500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3788"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=0 +lon_0=166 +k=1 +x_0=3500000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3789 : NZGD2000 / Campbell Island TM 2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3789,'EPSG',3789,'PROJCS["NZGD2000 / Campbell Island TM 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",169],PARAMETER["scale_factor",1],PARAMETER["false_easting",3500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3789"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=169 +k=1 +x_0=3500000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3789,'EPSG',3789,'PROJCS["NZGD2000 / Campbell Island TM 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",169],PARAMETER["scale_factor",1],PARAMETER["false_easting",3500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3789"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=0 +lon_0=169 +k=1 +x_0=3500000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3790 : NZGD2000 / Antipodes Islands TM 2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3790,'EPSG',3790,'PROJCS["NZGD2000 / Antipodes Islands TM 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",179],PARAMETER["scale_factor",1],PARAMETER["false_easting",3500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3790"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=179 +k=1 +x_0=3500000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3790,'EPSG',3790,'PROJCS["NZGD2000 / Antipodes Islands TM 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",179],PARAMETER["scale_factor",1],PARAMETER["false_easting",3500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3790"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=0 +lon_0=179 +k=1 +x_0=3500000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3791 : NZGD2000 / Raoul Island TM 2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3791,'EPSG',3791,'PROJCS["NZGD2000 / Raoul Island TM 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-178],PARAMETER["scale_factor",1],PARAMETER["false_easting",3500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3791"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-178 +k=1 +x_0=3500000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3791,'EPSG',3791,'PROJCS["NZGD2000 / Raoul Island TM 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-178],PARAMETER["scale_factor",1],PARAMETER["false_easting",3500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3791"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=0 +lon_0=-178 +k=1 +x_0=3500000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3793 : NZGD2000 / Chatham Islands TM 2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3793,'EPSG',3793,'PROJCS["NZGD2000 / Chatham Islands TM 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-176.5],PARAMETER["scale_factor",1],PARAMETER["false_easting",3500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3793"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-176.5 +k=1 +x_0=3500000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3793,'EPSG',3793,'PROJCS["NZGD2000 / Chatham Islands TM 2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-176.5],PARAMETER["scale_factor",1],PARAMETER["false_easting",3500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","3793"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=0 +lon_0=-176.5 +k=1 +x_0=3500000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3794 : Slovenia 1996 / Slovene National Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3794,'EPSG',3794,'PROJCS["Slovenia 1996 / Slovene National Grid",GEOGCS["Slovenia 1996",DATUM["Slovenia_Geodetic_Datum_1996",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6765"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4765"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",-5000000],AUTHORITY["EPSG","3794"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=0.9999 +x_0=500000 +y_0=-5000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3794,'EPSG',3794,'PROJCS["Slovenia 1996 / Slovene National Grid",GEOGCS["Slovenia 1996",DATUM["Slovenia_Geodetic_Datum_1996",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6765"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4765"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",-5000000],AUTHORITY["EPSG","3794"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=0.9999 +x_0=500000 +y_0=-5000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3795 : NAD27 / Cuba Norte --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3795,'EPSG',3795,'PROJCS["NAD27 / Cuba Norte",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",23],PARAMETER["standard_parallel_2",21.7],PARAMETER["latitude_of_origin",22.35],PARAMETER["central_meridian",-81],PARAMETER["false_easting",500000],PARAMETER["false_northing",280296.016],AUTHORITY["EPSG","3795"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=23 +lat_2=21.7 +lat_0=22.35 +lon_0=-81 +x_0=500000 +y_0=280296.016 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3795,'EPSG',3795,'PROJCS["NAD27 / Cuba Norte",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",23],PARAMETER["standard_parallel_2",21.7],PARAMETER["latitude_of_origin",22.35],PARAMETER["central_meridian",-81],PARAMETER["false_easting",500000],PARAMETER["false_northing",280296.016],AUTHORITY["EPSG","3795"],AXIS["Y",NORTH],AXIS["X",EAST]]','+proj=lcc +lat_1=23 +lat_2=21.7 +lat_0=22.35 +lon_0=-81 +x_0=500000 +y_0=280296.016 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 3796 : NAD27 / Cuba Sur --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3796,'EPSG',3796,'PROJCS["NAD27 / Cuba Sur",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",21.3],PARAMETER["standard_parallel_2",20.13333333333333],PARAMETER["latitude_of_origin",20.71666666666667],PARAMETER["central_meridian",-76.83333333333333],PARAMETER["false_easting",500000],PARAMETER["false_northing",229126.939],AUTHORITY["EPSG","3796"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=21.3 +lat_2=20.13333333333333 +lat_0=20.71666666666667 +lon_0=-76.83333333333333 +x_0=500000 +y_0=229126.939 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3796,'EPSG',3796,'PROJCS["NAD27 / Cuba Sur",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",21.3],PARAMETER["standard_parallel_2",20.13333333333333],PARAMETER["latitude_of_origin",20.71666666666667],PARAMETER["central_meridian",-76.83333333333333],PARAMETER["false_easting",500000],PARAMETER["false_northing",229126.939],AUTHORITY["EPSG","3796"],AXIS["Y",NORTH],AXIS["X",EAST]]','+proj=lcc +lat_1=21.3 +lat_2=20.13333333333333 +lat_0=20.71666666666667 +lon_0=-76.83333333333333 +x_0=500000 +y_0=229126.939 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 3797 : NAD27 / MTQ Lambert --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3797,'EPSG',3797,'PROJCS["NAD27 / MTQ Lambert",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",50],PARAMETER["standard_parallel_2",46],PARAMETER["latitude_of_origin",44],PARAMETER["central_meridian",-70],PARAMETER["false_easting",800000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3797"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=50 +lat_2=46 +lat_0=44 +lon_0=-70 +x_0=800000 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3797,'EPSG',3797,'PROJCS["NAD27 / MTQ Lambert",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",50],PARAMETER["standard_parallel_2",46],PARAMETER["latitude_of_origin",44],PARAMETER["central_meridian",-70],PARAMETER["false_easting",800000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3797"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=50 +lat_2=46 +lat_0=44 +lon_0=-70 +x_0=800000 +y_0=0 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 3798 : NAD83 / MTQ Lambert --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3798,'EPSG',3798,'PROJCS["NAD83 / MTQ Lambert",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",50],PARAMETER["standard_parallel_2",46],PARAMETER["latitude_of_origin",44],PARAMETER["central_meridian",-70],PARAMETER["false_easting",800000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3798"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=50 +lat_2=46 +lat_0=44 +lon_0=-70 +x_0=800000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3798,'EPSG',3798,'PROJCS["NAD83 / MTQ Lambert",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",50],PARAMETER["standard_parallel_2",46],PARAMETER["latitude_of_origin",44],PARAMETER["central_meridian",-70],PARAMETER["false_easting",800000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3798"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=50 +lat_2=46 +lat_0=44 +lon_0=-70 +x_0=800000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3799 : NAD83(CSRS) / MTQ Lambert --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3799,'EPSG',3799,'PROJCS["NAD83(CSRS) / MTQ Lambert",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",50],PARAMETER["standard_parallel_2",46],PARAMETER["latitude_of_origin",44],PARAMETER["central_meridian",-70],PARAMETER["false_easting",800000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3799"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=50 +lat_2=46 +lat_0=44 +lon_0=-70 +x_0=800000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3799,'EPSG',3799,'PROJCS["NAD83(CSRS) / MTQ Lambert",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",50],PARAMETER["standard_parallel_2",46],PARAMETER["latitude_of_origin",44],PARAMETER["central_meridian",-70],PARAMETER["false_easting",800000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3799"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=50 +lat_2=46 +lat_0=44 +lon_0=-70 +x_0=800000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3800 : NAD27 / Alberta 3TM ref merid 120 W --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3800,'EPSG',3800,'PROJCS["NAD27 / Alberta 3TM ref merid 120 W",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-120],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3800"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-120 +k=0.9999 +x_0=0 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3800,'EPSG',3800,'PROJCS["NAD27 / Alberta 3TM ref merid 120 W",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-120],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3800"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-120 +k=0.9999 +x_0=0 +y_0=0 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 3801 : NAD83 / Alberta 3TM ref merid 120 W --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3801,'EPSG',3801,'PROJCS["NAD83 / Alberta 3TM ref merid 120 W",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-120],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3801"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-120 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3801,'EPSG',3801,'PROJCS["NAD83 / Alberta 3TM ref merid 120 W",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-120],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3801"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-120 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3802 : NAD83(CSRS) / Alberta 3TM ref merid 120 W --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3802,'EPSG',3802,'PROJCS["NAD83(CSRS) / Alberta 3TM ref merid 120 W",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-120],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3802"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-120 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3802,'EPSG',3802,'PROJCS["NAD83(CSRS) / Alberta 3TM ref merid 120 W",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-120],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3802"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-120 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3812 : ETRS89 / Belgian Lambert 2008 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3812,'EPSG',3812,'PROJCS["ETRS89 / Belgian Lambert 2008",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",49.83333333333334],PARAMETER["standard_parallel_2",51.16666666666666],PARAMETER["latitude_of_origin",50.797815],PARAMETER["central_meridian",4.359215833333333],PARAMETER["false_easting",649328],PARAMETER["false_northing",665262],AUTHORITY["EPSG","3812"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=49.83333333333334 +lat_2=51.16666666666666 +lat_0=50.797815 +lon_0=4.359215833333333 +x_0=649328 +y_0=665262 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3812,'EPSG',3812,'PROJCS["ETRS89 / Belgian Lambert 2008",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",49.83333333333334],PARAMETER["standard_parallel_2",51.16666666666666],PARAMETER["latitude_of_origin",50.797815],PARAMETER["central_meridian",4.359215833333333],PARAMETER["false_easting",649328],PARAMETER["false_northing",665262],AUTHORITY["EPSG","3812"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=49.83333333333334 +lat_2=51.16666666666666 +lat_0=50.797815 +lon_0=4.359215833333333 +x_0=649328 +y_0=665262 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3814 : NAD83 / Mississippi TM --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3814,'EPSG',3814,'PROJCS["NAD83 / Mississippi TM",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",32.5],PARAMETER["central_meridian",-89.75],PARAMETER["scale_factor",0.9998335],PARAMETER["false_easting",500000],PARAMETER["false_northing",1300000],AUTHORITY["EPSG","3814"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=32.5 +lon_0=-89.75 +k=0.9998335 +x_0=500000 +y_0=1300000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3814,'EPSG',3814,'PROJCS["NAD83 / Mississippi TM",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",32.5],PARAMETER["central_meridian",-89.75],PARAMETER["scale_factor",0.9998335],PARAMETER["false_easting",500000],PARAMETER["false_northing",1300000],AUTHORITY["EPSG","3814"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=32.5 +lon_0=-89.75 +k=0.9998335 +x_0=500000 +y_0=1300000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3815 : NAD83(HARN) / Mississippi TM --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3815,'EPSG',3815,'PROJCS["NAD83(HARN) / Mississippi TM",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",32.5],PARAMETER["central_meridian",-89.75],PARAMETER["scale_factor",0.9998335],PARAMETER["false_easting",500000],PARAMETER["false_northing",1300000],AUTHORITY["EPSG","3815"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=32.5 +lon_0=-89.75 +k=0.9998335 +x_0=500000 +y_0=1300000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3815,'EPSG',3815,'PROJCS["NAD83(HARN) / Mississippi TM",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",32.5],PARAMETER["central_meridian",-89.75],PARAMETER["scale_factor",0.9998335],PARAMETER["false_easting",500000],PARAMETER["false_northing",1300000],AUTHORITY["EPSG","3815"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=32.5 +lon_0=-89.75 +k=0.9998335 +x_0=500000 +y_0=1300000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3816 : NAD83(NSRS2007) / Mississippi TM --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3816,'EPSG',3816,'PROJCS["NAD83(NSRS2007) / Mississippi TM",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",32.5],PARAMETER["central_meridian",-89.75],PARAMETER["scale_factor",0.9998335],PARAMETER["false_easting",500000],PARAMETER["false_northing",1300000],AUTHORITY["EPSG","3816"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=32.5 +lon_0=-89.75 +k=0.9998335 +x_0=500000 +y_0=1300000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3816,'EPSG',3816,'PROJCS["NAD83(NSRS2007) / Mississippi TM",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",32.5],PARAMETER["central_meridian",-89.75],PARAMETER["scale_factor",0.9998335],PARAMETER["false_easting",500000],PARAMETER["false_northing",1300000],AUTHORITY["EPSG","3816"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=32.5 +lon_0=-89.75 +k=0.9998335 +x_0=500000 +y_0=1300000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3825 : TWD97 / TM2 zone 119 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3825,'EPSG',3825,'PROJCS["TWD97 / TM2 zone 119",GEOGCS["TWD97",DATUM["Taiwan_Datum_1997",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1026"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","3824"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",119],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",250000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3825"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=119 +k=0.9999 +x_0=250000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3825,'EPSG',3825,'PROJCS["TWD97 / TM2 zone 119",GEOGCS["TWD97",DATUM["Taiwan_Datum_1997",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1026"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","3824"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",119],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",250000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3825"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=119 +k=0.9999 +x_0=250000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3826 : TWD97 / TM2 zone 121 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3826,'EPSG',3826,'PROJCS["TWD97 / TM2 zone 121",GEOGCS["TWD97",DATUM["Taiwan_Datum_1997",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1026"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","3824"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",121],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",250000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3826"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=121 +k=0.9999 +x_0=250000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3826,'EPSG',3826,'PROJCS["TWD97 / TM2 zone 121",GEOGCS["TWD97",DATUM["Taiwan_Datum_1997",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1026"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","3824"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",121],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",250000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3826"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=121 +k=0.9999 +x_0=250000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3827 : TWD67 / TM2 zone 119 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3827,'EPSG',3827,'PROJCS["TWD67 / TM2 zone 119",GEOGCS["TWD67",DATUM["Taiwan_Datum_1967",SPHEROID["GRS 1967 Modified",6378160,298.25,AUTHORITY["EPSG","7050"]],AUTHORITY["EPSG","1025"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","3821"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",119],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",250000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3827"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=119 +k=0.9999 +x_0=250000 +y_0=0 +ellps=aust_SA +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3827,'EPSG',3827,'PROJCS["TWD67 / TM2 zone 119",GEOGCS["TWD67",DATUM["Taiwan_Datum_1967",SPHEROID["GRS 1967 Modified",6378160,298.25,AUTHORITY["EPSG","7050"]],AUTHORITY["EPSG","1025"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","3821"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",119],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",250000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3827"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=119 +k=0.9999 +x_0=250000 +y_0=0 +ellps=aust_SA +units=m +no_defs '); --- --- EPSG 3828 : TWD67 / TM2 zone 121 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3828,'EPSG',3828,'PROJCS["TWD67 / TM2 zone 121",GEOGCS["TWD67",DATUM["Taiwan_Datum_1967",SPHEROID["GRS 1967 Modified",6378160,298.25,AUTHORITY["EPSG","7050"]],AUTHORITY["EPSG","1025"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","3821"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",121],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",250000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3828"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=121 +k=0.9999 +x_0=250000 +y_0=0 +ellps=aust_SA +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3828,'EPSG',3828,'PROJCS["TWD67 / TM2 zone 121",GEOGCS["TWD67",DATUM["Taiwan_Datum_1967",SPHEROID["GRS 1967 Modified",6378160,298.25,AUTHORITY["EPSG","7050"]],AUTHORITY["EPSG","1025"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","3821"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",121],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",250000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3828"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=121 +k=0.9999 +x_0=250000 +y_0=0 +ellps=aust_SA +units=m +no_defs '); --- --- EPSG 3829 : Hu Tzu Shan / UTM zone 51N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3829,'EPSG',3829,'PROJCS["Hu Tzu Shan / UTM zone 51N",GEOGCS["Hu Tzu Shan 1950",DATUM["Hu_Tzu_Shan_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-637,-549,-203,0,0,0,0],AUTHORITY["EPSG","6236"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4236"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3829"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=51 +ellps=intl +towgs84=-637,-549,-203,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3829,'EPSG',3829,'PROJCS["Hu Tzu Shan / UTM zone 51N",GEOGCS["Hu Tzu Shan 1950",DATUM["Hu_Tzu_Shan_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-637,-549,-203,0,0,0,0],AUTHORITY["EPSG","6236"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4236"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3829"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=51 +ellps=intl +towgs84=-637,-549,-203,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3832 : WGS 84 / PDC Mercator --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3832,'EPSG',3832,'PROJCS["WGS 84 / PDC Mercator",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",150],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3832"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=merc +lon_0=150 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3832,'EPSG',3832,'PROJCS["WGS 84 / PDC Mercator",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",150],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3832"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=merc +lon_0=150 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3833 : Pulkovo 1942(58) / Gauss-Kruger zone 2 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3833,'EPSG',3833,'PROJCS["Pulkovo 1942(58) / Gauss-Kruger zone 2",GEOGCS["Pulkovo 1942(58)",DATUM["Pulkovo_1942_58",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6179"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4179"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",1],PARAMETER["false_easting",2500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3833"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=2500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3833,'EPSG',3833,'PROJCS["Pulkovo 1942(58) / Gauss-Kruger zone 2",GEOGCS["Pulkovo 1942(58)",DATUM["Pulkovo_1942_58",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84],AUTHORITY["EPSG","6179"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4179"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",1],PARAMETER["false_easting",2500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3833"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=2500000 +y_0=0 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs '); --- --- EPSG 3834 : Pulkovo 1942(83) / Gauss-Kruger zone 2 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3834,'EPSG',3834,'PROJCS["Pulkovo 1942(83) / Gauss-Kruger zone 2",GEOGCS["Pulkovo 1942(83)",DATUM["Pulkovo_1942_83",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6178"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4178"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",1],PARAMETER["false_easting",2500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3834"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=2500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3834,'EPSG',3834,'PROJCS["Pulkovo 1942(83) / Gauss-Kruger zone 2",GEOGCS["Pulkovo 1942(83)",DATUM["Pulkovo_1942_83",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[26,-121,-78,0,0,0,0],AUTHORITY["EPSG","6178"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4178"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",1],PARAMETER["false_easting",2500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3834"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=2500000 +y_0=0 +ellps=krass +towgs84=26,-121,-78,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3835 : Pulkovo 1942(83) / Gauss-Kruger zone 3 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3835,'EPSG',3835,'PROJCS["Pulkovo 1942(83) / Gauss-Kruger zone 3",GEOGCS["Pulkovo 1942(83)",DATUM["Pulkovo_1942_83",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6178"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4178"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",1],PARAMETER["false_easting",3500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3835"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=3500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3835,'EPSG',3835,'PROJCS["Pulkovo 1942(83) / Gauss-Kruger zone 3",GEOGCS["Pulkovo 1942(83)",DATUM["Pulkovo_1942_83",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[26,-121,-78,0,0,0,0],AUTHORITY["EPSG","6178"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4178"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",1],PARAMETER["false_easting",3500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3835"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=3500000 +y_0=0 +ellps=krass +towgs84=26,-121,-78,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3836 : Pulkovo 1942(83) / Gauss-Kruger zone 4 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3836,'EPSG',3836,'PROJCS["Pulkovo 1942(83) / Gauss-Kruger zone 4",GEOGCS["Pulkovo 1942(83)",DATUM["Pulkovo_1942_83",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6178"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4178"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",4500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3836"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=4500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3836,'EPSG',3836,'PROJCS["Pulkovo 1942(83) / Gauss-Kruger zone 4",GEOGCS["Pulkovo 1942(83)",DATUM["Pulkovo_1942_83",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[26,-121,-78,0,0,0,0],AUTHORITY["EPSG","6178"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4178"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",4500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3836"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=4500000 +y_0=0 +ellps=krass +towgs84=26,-121,-78,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3837 : Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 3 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3837,'EPSG',3837,'PROJCS["Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 3",GEOGCS["Pulkovo 1942(58)",DATUM["Pulkovo_1942_58",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6179"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4179"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",1],PARAMETER["false_easting",3500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3837"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3837,'EPSG',3837,'PROJCS["Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 3",GEOGCS["Pulkovo 1942(58)",DATUM["Pulkovo_1942_58",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84],AUTHORITY["EPSG","6179"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4179"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",1],PARAMETER["false_easting",3500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3837"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs '); --- --- EPSG 3838 : Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 4 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3838,'EPSG',3838,'PROJCS["Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 4",GEOGCS["Pulkovo 1942(58)",DATUM["Pulkovo_1942_58",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6179"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4179"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",12],PARAMETER["scale_factor",1],PARAMETER["false_easting",4500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3838"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3838,'EPSG',3838,'PROJCS["Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 4",GEOGCS["Pulkovo 1942(58)",DATUM["Pulkovo_1942_58",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84],AUTHORITY["EPSG","6179"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4179"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",12],PARAMETER["scale_factor",1],PARAMETER["false_easting",4500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3838"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs '); --- --- EPSG 3839 : Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 9 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3839,'EPSG',3839,'PROJCS["Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 9",GEOGCS["Pulkovo 1942(58)",DATUM["Pulkovo_1942_58",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6179"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4179"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",1],PARAMETER["false_easting",9500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3839"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=9500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3839,'EPSG',3839,'PROJCS["Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 9",GEOGCS["Pulkovo 1942(58)",DATUM["Pulkovo_1942_58",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84],AUTHORITY["EPSG","6179"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4179"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",1],PARAMETER["false_easting",9500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3839"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=9500000 +y_0=0 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs '); --- --- EPSG 3840 : Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 10 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3840,'EPSG',3840,'PROJCS["Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 10",GEOGCS["Pulkovo 1942(58)",DATUM["Pulkovo_1942_58",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6179"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4179"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",30],PARAMETER["scale_factor",1],PARAMETER["false_easting",10500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3840"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=10500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3840,'EPSG',3840,'PROJCS["Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 10",GEOGCS["Pulkovo 1942(58)",DATUM["Pulkovo_1942_58",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84],AUTHORITY["EPSG","6179"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4179"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",30],PARAMETER["scale_factor",1],PARAMETER["false_easting",10500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3840"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=10500000 +y_0=0 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs '); --- --- EPSG 3841 : Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 6 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3841,'EPSG',3841,'PROJCS["Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 6",GEOGCS["Pulkovo 1942(83)",DATUM["Pulkovo_1942_83",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6178"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4178"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18],PARAMETER["scale_factor",1],PARAMETER["false_easting",6500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3841"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=6500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3841,'EPSG',3841,'PROJCS["Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 6",GEOGCS["Pulkovo 1942(83)",DATUM["Pulkovo_1942_83",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[26,-121,-78,0,0,0,0],AUTHORITY["EPSG","6178"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4178"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18],PARAMETER["scale_factor",1],PARAMETER["false_easting",6500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3841"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=6500000 +y_0=0 +ellps=krass +towgs84=26,-121,-78,0,0,0,0 +units=m +no_defs '); --- ---- EPSG 3842 : Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 7 +--- EPSG 3842 : Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 7 (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3842,'EPSG',3842,'PROJCS["Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 7",GEOGCS["Pulkovo 1942(83)",DATUM["Pulkovo_1942_83",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6178"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4178"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18],PARAMETER["scale_factor",1],PARAMETER["false_easting",6500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3842"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=6500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3842,'EPSG',3842,'PROJCS["Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 7 (deprecated)",GEOGCS["Pulkovo 1942(83)",DATUM["Pulkovo_1942_83",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[26,-121,-78,0,0,0,0],AUTHORITY["EPSG","6178"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4178"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18],PARAMETER["scale_factor",1],PARAMETER["false_easting",6500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3842"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=6500000 +y_0=0 +ellps=krass +towgs84=26,-121,-78,0,0,0,0 +units=m +no_defs '); --- ---- EPSG 3843 : Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 8 +--- EPSG 3843 : Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 8 (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3843,'EPSG',3843,'PROJCS["Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 8",GEOGCS["Pulkovo 1942(83)",DATUM["Pulkovo_1942_83",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6178"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4178"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18],PARAMETER["scale_factor",1],PARAMETER["false_easting",6500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3843"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=6500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3843,'EPSG',3843,'PROJCS["Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 8 (deprecated)",GEOGCS["Pulkovo 1942(83)",DATUM["Pulkovo_1942_83",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[26,-121,-78,0,0,0,0],AUTHORITY["EPSG","6178"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4178"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18],PARAMETER["scale_factor",1],PARAMETER["false_easting",6500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3843"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=6500000 +y_0=0 +ellps=krass +towgs84=26,-121,-78,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3844 : Pulkovo 1942(58) / Stereo70 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3844,'EPSG',3844,'PROJCS["Pulkovo 1942(58) / Stereo70",GEOGCS["Pulkovo 1942(58)",DATUM["Pulkovo_1942_58",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6179"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4179"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",46],PARAMETER["central_meridian",25],PARAMETER["scale_factor",0.99975],PARAMETER["false_easting",500000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","3844"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=sterea +lat_0=46 +lon_0=25 +k=0.99975 +x_0=500000 +y_0=500000 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3844,'EPSG',3844,'PROJCS["Pulkovo 1942(58) / Stereo70",GEOGCS["Pulkovo 1942(58)",DATUM["Pulkovo_1942_58",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[2.329,-147.042,-92.08,0.309,-0.325,-0.497,5.69],AUTHORITY["EPSG","6179"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4179"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",46],PARAMETER["central_meridian",25],PARAMETER["scale_factor",0.99975],PARAMETER["false_easting",500000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","3844"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=sterea +lat_0=46 +lon_0=25 +k=0.99975 +x_0=500000 +y_0=500000 +ellps=krass +towgs84=2.329,-147.042,-92.08,0.309,-0.325,-0.497,5.69 +units=m +no_defs '); --- --- EPSG 3845 : SWEREF99 / RT90 7.5 gon V emulation --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3845,'EPSG',3845,'PROJCS["SWEREF99 / RT90 7.5 gon V emulation",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",11.30625],PARAMETER["scale_factor",1.000006],PARAMETER["false_easting",1500025.141],PARAMETER["false_northing",-667.282],AUTHORITY["EPSG","3845"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=11.30625 +k=1.000006 +x_0=1500025.141 +y_0=-667.282 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3845,'EPSG',3845,'PROJCS["SWEREF99 / RT90 7.5 gon V emulation",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",11.30625],PARAMETER["scale_factor",1.000006],PARAMETER["false_easting",1500025.141],PARAMETER["false_northing",-667.282],AUTHORITY["EPSG","3845"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=11.30625 +k=1.000006 +x_0=1500025.141 +y_0=-667.282 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3846 : SWEREF99 / RT90 5 gon V emulation --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3846,'EPSG',3846,'PROJCS["SWEREF99 / RT90 5 gon V emulation",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",13.55626666666667],PARAMETER["scale_factor",1.0000058],PARAMETER["false_easting",1500044.695],PARAMETER["false_northing",-667.13],AUTHORITY["EPSG","3846"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=13.55626666666667 +k=1.0000058 +x_0=1500044.695 +y_0=-667.13 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3846,'EPSG',3846,'PROJCS["SWEREF99 / RT90 5 gon V emulation",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",13.55626666666667],PARAMETER["scale_factor",1.0000058],PARAMETER["false_easting",1500044.695],PARAMETER["false_northing",-667.13],AUTHORITY["EPSG","3846"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=13.55626666666667 +k=1.0000058 +x_0=1500044.695 +y_0=-667.13 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3847 : SWEREF99 / RT90 2.5 gon V emulation --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3847,'EPSG',3847,'PROJCS["SWEREF99 / RT90 2.5 gon V emulation",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15.80628452944445],PARAMETER["scale_factor",1.00000561024],PARAMETER["false_easting",1500064.274],PARAMETER["false_northing",-667.711],AUTHORITY["EPSG","3847"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=15.80628452944445 +k=1.00000561024 +x_0=1500064.274 +y_0=-667.711 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3847,'EPSG',3847,'PROJCS["SWEREF99 / RT90 2.5 gon V emulation",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15.80628452944445],PARAMETER["scale_factor",1.00000561024],PARAMETER["false_easting",1500064.274],PARAMETER["false_northing",-667.711],AUTHORITY["EPSG","3847"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=15.80628452944445 +k=1.00000561024 +x_0=1500064.274 +y_0=-667.711 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3848 : SWEREF99 / RT90 0 gon emulation --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3848,'EPSG',3848,'PROJCS["SWEREF99 / RT90 0 gon emulation",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18.0563],PARAMETER["scale_factor",1.0000054],PARAMETER["false_easting",1500083.521],PARAMETER["false_northing",-668.844],AUTHORITY["EPSG","3848"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=18.0563 +k=1.0000054 +x_0=1500083.521 +y_0=-668.8440000000001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3848,'EPSG',3848,'PROJCS["SWEREF99 / RT90 0 gon emulation",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18.0563],PARAMETER["scale_factor",1.0000054],PARAMETER["false_easting",1500083.521],PARAMETER["false_northing",-668.844],AUTHORITY["EPSG","3848"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=18.0563 +k=1.0000054 +x_0=1500083.521 +y_0=-668.8440000000001 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3849 : SWEREF99 / RT90 2.5 gon O emulation --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3849,'EPSG',3849,'PROJCS["SWEREF99 / RT90 2.5 gon O emulation",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",20.30631666666667],PARAMETER["scale_factor",1.0000052],PARAMETER["false_easting",1500102.765],PARAMETER["false_northing",-670.706],AUTHORITY["EPSG","3849"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=20.30631666666667 +k=1.0000052 +x_0=1500102.765 +y_0=-670.706 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3849,'EPSG',3849,'PROJCS["SWEREF99 / RT90 2.5 gon O emulation",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",20.30631666666667],PARAMETER["scale_factor",1.0000052],PARAMETER["false_easting",1500102.765],PARAMETER["false_northing",-670.706],AUTHORITY["EPSG","3849"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=20.30631666666667 +k=1.0000052 +x_0=1500102.765 +y_0=-670.706 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3850 : SWEREF99 / RT90 5 gon O emulation --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3850,'EPSG',3850,'PROJCS["SWEREF99 / RT90 5 gon O emulation",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",22.55633333333333],PARAMETER["scale_factor",1.0000049],PARAMETER["false_easting",1500121.846],PARAMETER["false_northing",-672.557],AUTHORITY["EPSG","3850"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=22.55633333333333 +k=1.0000049 +x_0=1500121.846 +y_0=-672.557 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3850,'EPSG',3850,'PROJCS["SWEREF99 / RT90 5 gon O emulation",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",22.55633333333333],PARAMETER["scale_factor",1.0000049],PARAMETER["false_easting",1500121.846],PARAMETER["false_northing",-672.557],AUTHORITY["EPSG","3850"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=22.55633333333333 +k=1.0000049 +x_0=1500121.846 +y_0=-672.557 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3851 : NZGD2000 / NZCS2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3851,'EPSG',3851,'PROJCS["NZGD2000 / NZCS2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-37.5],PARAMETER["standard_parallel_2",-44.5],PARAMETER["latitude_of_origin",-41],PARAMETER["central_meridian",173],PARAMETER["false_easting",3000000],PARAMETER["false_northing",7000000],AUTHORITY["EPSG","3851"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-37.5 +lat_2=-44.5 +lat_0=-41 +lon_0=173 +x_0=3000000 +y_0=7000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3851,'EPSG',3851,'PROJCS["NZGD2000 / NZCS2000",GEOGCS["NZGD2000",DATUM["New_Zealand_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6167"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4167"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-37.5],PARAMETER["standard_parallel_2",-44.5],PARAMETER["latitude_of_origin",-41],PARAMETER["central_meridian",173],PARAMETER["false_easting",3000000],PARAMETER["false_northing",7000000],AUTHORITY["EPSG","3851"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=lcc +lat_1=-37.5 +lat_2=-44.5 +lat_0=-41 +lon_0=173 +x_0=3000000 +y_0=7000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3852 : RSRGD2000 / DGLC2000 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3852,'EPSG',3852,'PROJCS["RSRGD2000 / DGLC2000",GEOGCS["RSRGD2000",DATUM["Ross_Sea_Region_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6764"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4764"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-76.66666666666667],PARAMETER["standard_parallel_2",-79.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",157],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3852"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=157 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3852,'EPSG',3852,'PROJCS["RSRGD2000 / DGLC2000",GEOGCS["RSRGD2000",DATUM["Ross_Sea_Region_Geodetic_Datum_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6764"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4764"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-76.66666666666667],PARAMETER["standard_parallel_2",-79.33333333333333],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",157],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3852"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=lcc +lat_1=-76.66666666666667 +lat_2=-79.33333333333333 +lat_0=-90 +lon_0=157 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3854 : County ST74 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3854,'EPSG',3854,'PROJCS["County ST74",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18.05787],PARAMETER["scale_factor",0.99999506],PARAMETER["false_easting",100182.7406],PARAMETER["false_northing",-6500620.1207],AUTHORITY["EPSG","3854"],AXIS["y",EAST],AXIS["x",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=18.05787 +k=0.99999506 +x_0=100182.7406 +y_0=-6500620.1207 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3854,'EPSG',3854,'PROJCS["County ST74",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18.05787],PARAMETER["scale_factor",0.99999506],PARAMETER["false_easting",100182.7406],PARAMETER["false_northing",-6500620.1207],AUTHORITY["EPSG","3854"],AXIS["x",NORTH],AXIS["y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=18.05787 +k=0.99999506 +x_0=100182.7406 +y_0=-6500620.1207 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3857 : WGS 84 / Pseudo-Mercator --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3857,'EPSG',3857,'PROJCS["Popular Visualisation CRS / Mercator (deprecated)",GEOGCS["Popular Visualisation CRS",DATUM["Popular_Visualisation_Datum",SPHEROID["Popular Visualisation Sphere",6378137,0,AUTHORITY["EPSG","7059"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6055"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4055"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3785"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +units=m +k=1.0 +nadgrids=@null +no_defs' ); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3857,'EPSG',3857,'PROJCS["WGS 84 / Pseudo-Mercator",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs"],AUTHORITY["EPSG","3857"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs'); +--- +--- EPSG 3873 : None +--- +-- (unable to translate) +--- +--- EPSG 3874 : None +--- +-- (unable to translate) +--- +--- EPSG 3875 : None +--- +-- (unable to translate) +--- +--- EPSG 3876 : None +--- +-- (unable to translate) +--- +--- EPSG 3877 : None +--- +-- (unable to translate) +--- +--- EPSG 3878 : None +--- +-- (unable to translate) +--- +--- EPSG 3879 : None +--- +-- (unable to translate) +--- +--- EPSG 3880 : None +--- +-- (unable to translate) +--- +--- EPSG 3881 : None +--- +-- (unable to translate) +--- +--- EPSG 3882 : None +--- +-- (unable to translate) +--- +--- EPSG 3883 : None +--- +-- (unable to translate) +--- +--- EPSG 3884 : None +--- +-- (unable to translate) +--- +--- EPSG 3885 : None +--- +-- (unable to translate) --- --- EPSG 3890 : IGRS / UTM zone 37N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3890,'EPSG',3890,'PROJCS["IGRS / UTM zone 37N",GEOGCS["IGRS",DATUM["Iraqi_Geospatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1029"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","3889"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3890"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=37 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3890,'EPSG',3890,'PROJCS["IGRS / UTM zone 37N",GEOGCS["IGRS",DATUM["Iraqi_Geospatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1029"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","3889"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3890"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=37 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3891 : IGRS / UTM zone 38N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3891,'EPSG',3891,'PROJCS["IGRS / UTM zone 38N",GEOGCS["IGRS",DATUM["Iraqi_Geospatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1029"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","3889"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3891"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3891,'EPSG',3891,'PROJCS["IGRS / UTM zone 38N",GEOGCS["IGRS",DATUM["Iraqi_Geospatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1029"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","3889"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3891"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3892 : IGRS / UTM zone 39N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3892,'EPSG',3892,'PROJCS["IGRS / UTM zone 39N",GEOGCS["IGRS",DATUM["Iraqi_Geospatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1029"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","3889"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3892"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=39 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3892,'EPSG',3892,'PROJCS["IGRS / UTM zone 39N",GEOGCS["IGRS",DATUM["Iraqi_Geospatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1029"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","3889"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3892"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=39 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3893 : ED50 / Iraq National Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3893,'EPSG',3893,'PROJCS["ED50 / Iraq National Grid",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",29.02626833333333],PARAMETER["central_meridian",46.5],PARAMETER["scale_factor",0.9994],PARAMETER["false_easting",800000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3893"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=29.02626833333333 +lon_0=46.5 +k=0.9994 +x_0=800000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3893,'EPSG',3893,'PROJCS["ED50 / Iraq National Grid",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-87,-98,-121,0,0,0,0],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",29.02626833333333],PARAMETER["central_meridian",46.5],PARAMETER["scale_factor",0.9994],PARAMETER["false_easting",800000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3893"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=29.02626833333333 +lon_0=46.5 +k=0.9994 +x_0=800000 +y_0=0 +ellps=intl +towgs84=-87,-98,-121,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3907 : MGI 1901 / Balkans zone 5 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3907,'EPSG',3907,'PROJCS["MGI 1901 / Balkans zone 5",GEOGCS["MGI 1901",DATUM["MGI_1901",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","1031"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","3906"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",5500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3907"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=0.9999 +x_0=5500000 +y_0=0 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3907,'EPSG',3907,'PROJCS["MGI 1901 / Balkans zone 5",GEOGCS["MGI 1901",DATUM["MGI_1901",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[682,-203,480,0,0,0,0],AUTHORITY["EPSG","1031"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","3906"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",5500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3907"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=0.9999 +x_0=5500000 +y_0=0 +ellps=bessel +towgs84=682,-203,480,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3908 : MGI 1901 / Balkans zone 6 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3908,'EPSG',3908,'PROJCS["MGI 1901 / Balkans zone 6",GEOGCS["MGI 1901",DATUM["MGI_1901",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","1031"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","3906"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",6500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3908"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=18 +k=0.9999 +x_0=6500000 +y_0=0 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3908,'EPSG',3908,'PROJCS["MGI 1901 / Balkans zone 6",GEOGCS["MGI 1901",DATUM["MGI_1901",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[682,-203,480,0,0,0,0],AUTHORITY["EPSG","1031"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","3906"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",6500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3908"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=18 +k=0.9999 +x_0=6500000 +y_0=0 +ellps=bessel +towgs84=682,-203,480,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3909 : MGI 1901 / Balkans zone 7 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3909,'EPSG',3909,'PROJCS["MGI 1901 / Balkans zone 7",GEOGCS["MGI 1901",DATUM["MGI_1901",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","1031"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","3906"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",7500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3909"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=0.9999 +x_0=7500000 +y_0=0 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3909,'EPSG',3909,'PROJCS["MGI 1901 / Balkans zone 7",GEOGCS["MGI 1901",DATUM["MGI_1901",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[682,-203,480,0,0,0,0],AUTHORITY["EPSG","1031"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","3906"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",7500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3909"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=0.9999 +x_0=7500000 +y_0=0 +ellps=bessel +towgs84=682,-203,480,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3910 : MGI 1901 / Balkans zone 8 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3910,'EPSG',3910,'PROJCS["MGI 1901 / Balkans zone 8",GEOGCS["MGI 1901",DATUM["MGI_1901",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","1031"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","3906"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",24],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",8500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3910"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9999 +x_0=8500000 +y_0=0 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3910,'EPSG',3910,'PROJCS["MGI 1901 / Balkans zone 8",GEOGCS["MGI 1901",DATUM["MGI_1901",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[682,-203,480,0,0,0,0],AUTHORITY["EPSG","1031"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","3906"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",24],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",8500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3910"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9999 +x_0=8500000 +y_0=0 +ellps=bessel +towgs84=682,-203,480,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3911 : MGI 1901 / Slovenia Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3911,'EPSG',3911,'PROJCS["MGI 1901 / Slovenia Grid",GEOGCS["MGI 1901",DATUM["MGI_1901",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","1031"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","3906"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3911"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=0.9999 +x_0=500000 +y_0=0 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3911,'EPSG',3911,'PROJCS["MGI 1901 / Slovenia Grid",GEOGCS["MGI 1901",DATUM["MGI_1901",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[682,-203,480,0,0,0,0],AUTHORITY["EPSG","1031"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","3906"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3911"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=0.9999 +x_0=500000 +y_0=0 +ellps=bessel +towgs84=682,-203,480,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3912 : MGI 1901 / Slovene National Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3912,'EPSG',3912,'PROJCS["MGI 1901 / Slovene National Grid",GEOGCS["MGI 1901",DATUM["MGI_1901",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","1031"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","3906"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",-5000000],AUTHORITY["EPSG","3912"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=0.9999 +x_0=500000 +y_0=-5000000 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3912,'EPSG',3912,'PROJCS["MGI 1901 / Slovene National Grid",GEOGCS["MGI 1901",DATUM["MGI_1901",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[682,-203,480,0,0,0,0],AUTHORITY["EPSG","1031"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","3906"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",-5000000],AUTHORITY["EPSG","3912"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=0.9999 +x_0=500000 +y_0=-5000000 +ellps=bessel +towgs84=682,-203,480,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3920 : Puerto Rico / UTM zone 20N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3920,'EPSG',3920,'PROJCS["Puerto Rico / UTM zone 20N",GEOGCS["Puerto Rico",DATUM["Puerto_Rico",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[11,72,-101,0,0,0,0],AUTHORITY["EPSG","6139"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4139"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3920"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=clrk66 +towgs84=11,72,-101,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3920,'EPSG',3920,'PROJCS["Puerto Rico / UTM zone 20N",GEOGCS["Puerto Rico",DATUM["Puerto_Rico",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[11,72,-101,0,0,0,0],AUTHORITY["EPSG","6139"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4139"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3920"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=clrk66 +towgs84=11,72,-101,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3942 : RGF93 / CC42 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3942,'EPSG',3942,'PROJCS["RGF93 / CC42",GEOGCS["RGF93",DATUM["Reseau_Geodesique_Francais_1993",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6171"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4171"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.25],PARAMETER["standard_parallel_2",42.75],PARAMETER["latitude_of_origin",42],PARAMETER["central_meridian",3],PARAMETER["false_easting",1700000],PARAMETER["false_northing",1200000],AUTHORITY["EPSG","3942"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.25 +lat_2=42.75 +lat_0=42 +lon_0=3 +x_0=1700000 +y_0=1200000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3942,'EPSG',3942,'PROJCS["RGF93 / CC42",GEOGCS["RGF93",DATUM["Reseau_Geodesique_Francais_1993",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6171"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4171"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.25],PARAMETER["standard_parallel_2",42.75],PARAMETER["latitude_of_origin",42],PARAMETER["central_meridian",3],PARAMETER["false_easting",1700000],PARAMETER["false_northing",1200000],AUTHORITY["EPSG","3942"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.25 +lat_2=42.75 +lat_0=42 +lon_0=3 +x_0=1700000 +y_0=1200000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3943 : RGF93 / CC43 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3943,'EPSG',3943,'PROJCS["RGF93 / CC43",GEOGCS["RGF93",DATUM["Reseau_Geodesique_Francais_1993",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6171"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4171"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",42.25],PARAMETER["standard_parallel_2",43.75],PARAMETER["latitude_of_origin",43],PARAMETER["central_meridian",3],PARAMETER["false_easting",1700000],PARAMETER["false_northing",2200000],AUTHORITY["EPSG","3943"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=42.25 +lat_2=43.75 +lat_0=43 +lon_0=3 +x_0=1700000 +y_0=2200000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3943,'EPSG',3943,'PROJCS["RGF93 / CC43",GEOGCS["RGF93",DATUM["Reseau_Geodesique_Francais_1993",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6171"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4171"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",42.25],PARAMETER["standard_parallel_2",43.75],PARAMETER["latitude_of_origin",43],PARAMETER["central_meridian",3],PARAMETER["false_easting",1700000],PARAMETER["false_northing",2200000],AUTHORITY["EPSG","3943"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=42.25 +lat_2=43.75 +lat_0=43 +lon_0=3 +x_0=1700000 +y_0=2200000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3944 : RGF93 / CC44 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3944,'EPSG',3944,'PROJCS["RGF93 / CC44",GEOGCS["RGF93",DATUM["Reseau_Geodesique_Francais_1993",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6171"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4171"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43.25],PARAMETER["standard_parallel_2",44.75],PARAMETER["latitude_of_origin",44],PARAMETER["central_meridian",3],PARAMETER["false_easting",1700000],PARAMETER["false_northing",3200000],AUTHORITY["EPSG","3944"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43.25 +lat_2=44.75 +lat_0=44 +lon_0=3 +x_0=1700000 +y_0=3200000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3944,'EPSG',3944,'PROJCS["RGF93 / CC44",GEOGCS["RGF93",DATUM["Reseau_Geodesique_Francais_1993",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6171"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4171"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43.25],PARAMETER["standard_parallel_2",44.75],PARAMETER["latitude_of_origin",44],PARAMETER["central_meridian",3],PARAMETER["false_easting",1700000],PARAMETER["false_northing",3200000],AUTHORITY["EPSG","3944"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43.25 +lat_2=44.75 +lat_0=44 +lon_0=3 +x_0=1700000 +y_0=3200000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3945 : RGF93 / CC45 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3945,'EPSG',3945,'PROJCS["RGF93 / CC45",GEOGCS["RGF93",DATUM["Reseau_Geodesique_Francais_1993",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6171"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4171"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44.25],PARAMETER["standard_parallel_2",45.75],PARAMETER["latitude_of_origin",45],PARAMETER["central_meridian",3],PARAMETER["false_easting",1700000],PARAMETER["false_northing",4200000],AUTHORITY["EPSG","3945"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44.25 +lat_2=45.75 +lat_0=45 +lon_0=3 +x_0=1700000 +y_0=4200000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3945,'EPSG',3945,'PROJCS["RGF93 / CC45",GEOGCS["RGF93",DATUM["Reseau_Geodesique_Francais_1993",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6171"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4171"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44.25],PARAMETER["standard_parallel_2",45.75],PARAMETER["latitude_of_origin",45],PARAMETER["central_meridian",3],PARAMETER["false_easting",1700000],PARAMETER["false_northing",4200000],AUTHORITY["EPSG","3945"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44.25 +lat_2=45.75 +lat_0=45 +lon_0=3 +x_0=1700000 +y_0=4200000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3946 : RGF93 / CC46 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3946,'EPSG',3946,'PROJCS["RGF93 / CC46",GEOGCS["RGF93",DATUM["Reseau_Geodesique_Francais_1993",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6171"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4171"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.25],PARAMETER["standard_parallel_2",46.75],PARAMETER["latitude_of_origin",46],PARAMETER["central_meridian",3],PARAMETER["false_easting",1700000],PARAMETER["false_northing",5200000],AUTHORITY["EPSG","3946"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.25 +lat_2=46.75 +lat_0=46 +lon_0=3 +x_0=1700000 +y_0=5200000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3946,'EPSG',3946,'PROJCS["RGF93 / CC46",GEOGCS["RGF93",DATUM["Reseau_Geodesique_Francais_1993",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6171"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4171"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.25],PARAMETER["standard_parallel_2",46.75],PARAMETER["latitude_of_origin",46],PARAMETER["central_meridian",3],PARAMETER["false_easting",1700000],PARAMETER["false_northing",5200000],AUTHORITY["EPSG","3946"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.25 +lat_2=46.75 +lat_0=46 +lon_0=3 +x_0=1700000 +y_0=5200000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3947 : RGF93 / CC47 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3947,'EPSG',3947,'PROJCS["RGF93 / CC47",GEOGCS["RGF93",DATUM["Reseau_Geodesique_Francais_1993",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6171"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4171"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",46.25],PARAMETER["standard_parallel_2",47.75],PARAMETER["latitude_of_origin",47],PARAMETER["central_meridian",3],PARAMETER["false_easting",1700000],PARAMETER["false_northing",6200000],AUTHORITY["EPSG","3947"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=46.25 +lat_2=47.75 +lat_0=47 +lon_0=3 +x_0=1700000 +y_0=6200000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3947,'EPSG',3947,'PROJCS["RGF93 / CC47",GEOGCS["RGF93",DATUM["Reseau_Geodesique_Francais_1993",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6171"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4171"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",46.25],PARAMETER["standard_parallel_2",47.75],PARAMETER["latitude_of_origin",47],PARAMETER["central_meridian",3],PARAMETER["false_easting",1700000],PARAMETER["false_northing",6200000],AUTHORITY["EPSG","3947"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=46.25 +lat_2=47.75 +lat_0=47 +lon_0=3 +x_0=1700000 +y_0=6200000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3948 : RGF93 / CC48 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3948,'EPSG',3948,'PROJCS["RGF93 / CC48",GEOGCS["RGF93",DATUM["Reseau_Geodesique_Francais_1993",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6171"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4171"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.25],PARAMETER["standard_parallel_2",48.75],PARAMETER["latitude_of_origin",48],PARAMETER["central_meridian",3],PARAMETER["false_easting",1700000],PARAMETER["false_northing",7200000],AUTHORITY["EPSG","3948"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.25 +lat_2=48.75 +lat_0=48 +lon_0=3 +x_0=1700000 +y_0=7200000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3948,'EPSG',3948,'PROJCS["RGF93 / CC48",GEOGCS["RGF93",DATUM["Reseau_Geodesique_Francais_1993",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6171"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4171"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.25],PARAMETER["standard_parallel_2",48.75],PARAMETER["latitude_of_origin",48],PARAMETER["central_meridian",3],PARAMETER["false_easting",1700000],PARAMETER["false_northing",7200000],AUTHORITY["EPSG","3948"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.25 +lat_2=48.75 +lat_0=48 +lon_0=3 +x_0=1700000 +y_0=7200000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3949 : RGF93 / CC49 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3949,'EPSG',3949,'PROJCS["RGF93 / CC49",GEOGCS["RGF93",DATUM["Reseau_Geodesique_Francais_1993",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6171"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4171"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.25],PARAMETER["standard_parallel_2",49.75],PARAMETER["latitude_of_origin",49],PARAMETER["central_meridian",3],PARAMETER["false_easting",1700000],PARAMETER["false_northing",8200000],AUTHORITY["EPSG","3949"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.25 +lat_2=49.75 +lat_0=49 +lon_0=3 +x_0=1700000 +y_0=8200000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3949,'EPSG',3949,'PROJCS["RGF93 / CC49",GEOGCS["RGF93",DATUM["Reseau_Geodesique_Francais_1993",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6171"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4171"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.25],PARAMETER["standard_parallel_2",49.75],PARAMETER["latitude_of_origin",49],PARAMETER["central_meridian",3],PARAMETER["false_easting",1700000],PARAMETER["false_northing",8200000],AUTHORITY["EPSG","3949"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.25 +lat_2=49.75 +lat_0=49 +lon_0=3 +x_0=1700000 +y_0=8200000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3950 : RGF93 / CC50 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3950,'EPSG',3950,'PROJCS["RGF93 / CC50",GEOGCS["RGF93",DATUM["Reseau_Geodesique_Francais_1993",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6171"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4171"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",49.25],PARAMETER["standard_parallel_2",50.75],PARAMETER["latitude_of_origin",50],PARAMETER["central_meridian",3],PARAMETER["false_easting",1700000],PARAMETER["false_northing",9200000],AUTHORITY["EPSG","3950"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=49.25 +lat_2=50.75 +lat_0=50 +lon_0=3 +x_0=1700000 +y_0=9200000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3950,'EPSG',3950,'PROJCS["RGF93 / CC50",GEOGCS["RGF93",DATUM["Reseau_Geodesique_Francais_1993",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6171"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4171"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",49.25],PARAMETER["standard_parallel_2",50.75],PARAMETER["latitude_of_origin",50],PARAMETER["central_meridian",3],PARAMETER["false_easting",1700000],PARAMETER["false_northing",9200000],AUTHORITY["EPSG","3950"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=49.25 +lat_2=50.75 +lat_0=50 +lon_0=3 +x_0=1700000 +y_0=9200000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3968 : NAD83 / Virginia Lambert --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3968,'EPSG',3968,'PROJCS["NAD83 / Virginia Lambert",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37],PARAMETER["standard_parallel_2",39.5],PARAMETER["latitude_of_origin",36],PARAMETER["central_meridian",-79.5],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3968"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37 +lat_2=39.5 +lat_0=36 +lon_0=-79.5 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3968,'EPSG',3968,'PROJCS["NAD83 / Virginia Lambert",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37],PARAMETER["standard_parallel_2",39.5],PARAMETER["latitude_of_origin",36],PARAMETER["central_meridian",-79.5],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3968"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37 +lat_2=39.5 +lat_0=36 +lon_0=-79.5 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3969 : NAD83(HARN) / Virginia Lambert --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3969,'EPSG',3969,'PROJCS["NAD83(HARN) / Virginia Lambert",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37],PARAMETER["standard_parallel_2",39.5],PARAMETER["latitude_of_origin",36],PARAMETER["central_meridian",-79.5],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3969"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37 +lat_2=39.5 +lat_0=36 +lon_0=-79.5 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3969,'EPSG',3969,'PROJCS["NAD83(HARN) / Virginia Lambert",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37],PARAMETER["standard_parallel_2",39.5],PARAMETER["latitude_of_origin",36],PARAMETER["central_meridian",-79.5],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3969"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37 +lat_2=39.5 +lat_0=36 +lon_0=-79.5 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3970 : NAD83(NSRS2007) / Virginia Lambert --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3970,'EPSG',3970,'PROJCS["NAD83(NSRS2007) / Virginia Lambert",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37],PARAMETER["standard_parallel_2",39.5],PARAMETER["latitude_of_origin",36],PARAMETER["central_meridian",-79.5],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3970"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37 +lat_2=39.5 +lat_0=36 +lon_0=-79.5 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3970,'EPSG',3970,'PROJCS["NAD83(NSRS2007) / Virginia Lambert",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37],PARAMETER["standard_parallel_2",39.5],PARAMETER["latitude_of_origin",36],PARAMETER["central_meridian",-79.5],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3970"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37 +lat_2=39.5 +lat_0=36 +lon_0=-79.5 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3973 : WGS 84 / NSIDC EASE-Grid North --- @@ -9118,47 +9302,47 @@ --- --- EPSG 3975 : WGS 84 / NSIDC EASE-Grid Global --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3975,'EPSG',3975,'PROJCS["WGS 84 / NSIDC EASE-Grid Global",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Cylindrical_Equal_Area"],PARAMETER["standard_parallel_1",30],PARAMETER["central_meridian",0],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3975"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=cea +lon_0=0 +lat_ts=30 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3975,'EPSG',3975,'PROJCS["WGS 84 / NSIDC EASE-Grid Global",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Cylindrical_Equal_Area"],PARAMETER["standard_parallel_1",30],PARAMETER["central_meridian",0],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3975"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=cea +lon_0=0 +lat_ts=30 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3976 : WGS 84 / NSIDC Sea Ice Polar Stereographic South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3976,'EPSG',3976,'PROJCS["WGS 84 / NSIDC Sea Ice Polar Stereographic South",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-70],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3976"],AXIS["X",UNKNOWN],AXIS["Y",UNKNOWN]]','+proj=stere +lat_0=-90 +lat_ts=-70 +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3976,'EPSG',3976,'PROJCS["WGS 84 / NSIDC Sea Ice Polar Stereographic South",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-70],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3976"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=stere +lat_0=-90 +lat_ts=-70 +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3978 : NAD83 / Canada Atlas Lambert --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3978,'EPSG',3978,'PROJCS["NAD83 / Canada Atlas Lambert",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",49],PARAMETER["standard_parallel_2",77],PARAMETER["latitude_of_origin",49],PARAMETER["central_meridian",-95],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3978"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=49 +lat_2=77 +lat_0=49 +lon_0=-95 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3978,'EPSG',3978,'PROJCS["NAD83 / Canada Atlas Lambert",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",49],PARAMETER["standard_parallel_2",77],PARAMETER["latitude_of_origin",49],PARAMETER["central_meridian",-95],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3978"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=49 +lat_2=77 +lat_0=49 +lon_0=-95 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3979 : NAD83(CSRS) / Canada Atlas Lambert --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3979,'EPSG',3979,'PROJCS["NAD83(CSRS) / Canada Atlas Lambert",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",49],PARAMETER["standard_parallel_2",77],PARAMETER["latitude_of_origin",49],PARAMETER["central_meridian",-95],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3979"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=49 +lat_2=77 +lat_0=49 +lon_0=-95 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3979,'EPSG',3979,'PROJCS["NAD83(CSRS) / Canada Atlas Lambert",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",49],PARAMETER["standard_parallel_2",77],PARAMETER["latitude_of_origin",49],PARAMETER["central_meridian",-95],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3979"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=49 +lat_2=77 +lat_0=49 +lon_0=-95 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- ---- EPSG 3985 : Katanga 1955 / Katanga Lambert +--- EPSG 3985 : Katanga 1955 / Katanga Lambert (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3985,'EPSG',3985,'PROJCS["Katanga 1955 / Katanga Lambert",GEOGCS["Katanga 1955",DATUM["Katanga_1955",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-103.746,-9.614,-255.95,0,0,0,0],AUTHORITY["EPSG","6695"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4695"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-6.5],PARAMETER["standard_parallel_2",-11.5],PARAMETER["latitude_of_origin",9],PARAMETER["central_meridian",26],PARAMETER["false_easting",500000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","3985"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=-6.5 +lat_2=-11.5 +lat_0=9 +lon_0=26 +x_0=500000 +y_0=500000 +ellps=clrk66 +towgs84=-103.746,-9.614,-255.95,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3985,'EPSG',3985,'PROJCS["Katanga 1955 / Katanga Lambert (deprecated)",GEOGCS["Katanga 1955",DATUM["Katanga_1955",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-103.746,-9.614,-255.95,0,0,0,0],AUTHORITY["EPSG","6695"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4695"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-6.5],PARAMETER["standard_parallel_2",-11.5],PARAMETER["latitude_of_origin",9],PARAMETER["central_meridian",26],PARAMETER["false_easting",500000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","3985"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=-6.5 +lat_2=-11.5 +lat_0=9 +lon_0=26 +x_0=500000 +y_0=500000 +ellps=clrk66 +towgs84=-103.746,-9.614,-255.95,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3986 : Katanga 1955 / Katanga Gauss zone A --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3986,'EPSG',3986,'PROJCS["Katanga 1955 / Katanga Gauss zone A",GEOGCS["Katanga 1955",DATUM["Katanga_1955",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-103.746,-9.614,-255.95,0,0,0,0],AUTHORITY["EPSG","6695"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4695"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-9],PARAMETER["central_meridian",30],PARAMETER["scale_factor",1],PARAMETER["false_easting",200000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","3986"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=-9 +lon_0=30 +k=1 +x_0=200000 +y_0=500000 +ellps=clrk66 +towgs84=-103.746,-9.614,-255.95,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3986,'EPSG',3986,'PROJCS["Katanga 1955 / Katanga Gauss zone A",GEOGCS["Katanga 1955",DATUM["Katanga_1955",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-103.746,-9.614,-255.95,0,0,0,0],AUTHORITY["EPSG","6695"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4695"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-9],PARAMETER["central_meridian",30],PARAMETER["scale_factor",1],PARAMETER["false_easting",200000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","3986"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=-9 +lon_0=30 +k=1 +x_0=200000 +y_0=500000 +ellps=clrk66 +towgs84=-103.746,-9.614,-255.95,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3987 : Katanga 1955 / Katanga Gauss zone B --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3987,'EPSG',3987,'PROJCS["Katanga 1955 / Katanga Gauss zone B",GEOGCS["Katanga 1955",DATUM["Katanga_1955",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-103.746,-9.614,-255.95,0,0,0,0],AUTHORITY["EPSG","6695"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4695"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-9],PARAMETER["central_meridian",28],PARAMETER["scale_factor",1],PARAMETER["false_easting",200000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","3987"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=-9 +lon_0=28 +k=1 +x_0=200000 +y_0=500000 +ellps=clrk66 +towgs84=-103.746,-9.614,-255.95,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3987,'EPSG',3987,'PROJCS["Katanga 1955 / Katanga Gauss zone B",GEOGCS["Katanga 1955",DATUM["Katanga_1955",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-103.746,-9.614,-255.95,0,0,0,0],AUTHORITY["EPSG","6695"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4695"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-9],PARAMETER["central_meridian",28],PARAMETER["scale_factor",1],PARAMETER["false_easting",200000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","3987"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=-9 +lon_0=28 +k=1 +x_0=200000 +y_0=500000 +ellps=clrk66 +towgs84=-103.746,-9.614,-255.95,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3988 : Katanga 1955 / Katanga Gauss zone C --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3988,'EPSG',3988,'PROJCS["Katanga 1955 / Katanga Gauss zone C",GEOGCS["Katanga 1955",DATUM["Katanga_1955",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-103.746,-9.614,-255.95,0,0,0,0],AUTHORITY["EPSG","6695"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4695"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-9],PARAMETER["central_meridian",26],PARAMETER["scale_factor",1],PARAMETER["false_easting",200000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","3988"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=-9 +lon_0=26 +k=1 +x_0=200000 +y_0=500000 +ellps=clrk66 +towgs84=-103.746,-9.614,-255.95,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3988,'EPSG',3988,'PROJCS["Katanga 1955 / Katanga Gauss zone C",GEOGCS["Katanga 1955",DATUM["Katanga_1955",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-103.746,-9.614,-255.95,0,0,0,0],AUTHORITY["EPSG","6695"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4695"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-9],PARAMETER["central_meridian",26],PARAMETER["scale_factor",1],PARAMETER["false_easting",200000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","3988"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=-9 +lon_0=26 +k=1 +x_0=200000 +y_0=500000 +ellps=clrk66 +towgs84=-103.746,-9.614,-255.95,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3989 : Katanga 1955 / Katanga Gauss zone D --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3989,'EPSG',3989,'PROJCS["Katanga 1955 / Katanga Gauss zone D",GEOGCS["Katanga 1955",DATUM["Katanga_1955",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-103.746,-9.614,-255.95,0,0,0,0],AUTHORITY["EPSG","6695"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4695"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-9],PARAMETER["central_meridian",24],PARAMETER["scale_factor",1],PARAMETER["false_easting",200000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","3989"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=-9 +lon_0=24 +k=1 +x_0=200000 +y_0=500000 +ellps=clrk66 +towgs84=-103.746,-9.614,-255.95,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3989,'EPSG',3989,'PROJCS["Katanga 1955 / Katanga Gauss zone D",GEOGCS["Katanga 1955",DATUM["Katanga_1955",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-103.746,-9.614,-255.95,0,0,0,0],AUTHORITY["EPSG","6695"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4695"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-9],PARAMETER["central_meridian",24],PARAMETER["scale_factor",1],PARAMETER["false_easting",200000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","3989"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=-9 +lon_0=24 +k=1 +x_0=200000 +y_0=500000 +ellps=clrk66 +towgs84=-103.746,-9.614,-255.95,0,0,0,0 +units=m +no_defs '); --- --- EPSG 3991 : Puerto Rico State Plane CS of 1927 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3991,'EPSG',3991,'PROJCS["Puerto Rico State Plane CS of 1927",GEOGCS["Puerto Rico",DATUM["Puerto_Rico",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[11,72,-101,0,0,0,0],AUTHORITY["EPSG","6139"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4139"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",18.43333333333333],PARAMETER["standard_parallel_2",18.03333333333333],PARAMETER["latitude_of_origin",17.83333333333333],PARAMETER["central_meridian",-66.43333333333334],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3991"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=18.43333333333333 +lat_2=18.03333333333333 +lat_0=17.83333333333333 +lon_0=-66.43333333333334 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +towgs84=11,72,-101,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3991,'EPSG',3991,'PROJCS["Puerto Rico State Plane CS of 1927",GEOGCS["Puerto Rico",DATUM["Puerto_Rico",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[11,72,-101,0,0,0,0],AUTHORITY["EPSG","6139"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4139"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",18.43333333333333],PARAMETER["standard_parallel_2",18.03333333333333],PARAMETER["latitude_of_origin",17.83333333333333],PARAMETER["central_meridian",-66.43333333333334],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3991"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=18.43333333333333 +lat_2=18.03333333333333 +lat_0=17.83333333333333 +lon_0=-66.43333333333334 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +towgs84=11,72,-101,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3992 : Puerto Rico / St. Croix --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3992,'EPSG',3992,'PROJCS["Puerto Rico / St. Croix",GEOGCS["Puerto Rico",DATUM["Puerto_Rico",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[11,72,-101,0,0,0,0],AUTHORITY["EPSG","6139"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4139"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",18.43333333333333],PARAMETER["standard_parallel_2",18.03333333333333],PARAMETER["latitude_of_origin",17.83333333333333],PARAMETER["central_meridian",-66.43333333333334],PARAMETER["false_easting",500000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","3992"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=18.43333333333333 +lat_2=18.03333333333333 +lat_0=17.83333333333333 +lon_0=-66.43333333333334 +x_0=152400.3048006096 +y_0=30480.06096012192 +ellps=clrk66 +towgs84=11,72,-101,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3992,'EPSG',3992,'PROJCS["Puerto Rico / St. Croix",GEOGCS["Puerto Rico",DATUM["Puerto_Rico",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[11,72,-101,0,0,0,0],AUTHORITY["EPSG","6139"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4139"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",18.43333333333333],PARAMETER["standard_parallel_2",18.03333333333333],PARAMETER["latitude_of_origin",17.83333333333333],PARAMETER["central_meridian",-66.43333333333334],PARAMETER["false_easting",500000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","3992"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=18.43333333333333 +lat_2=18.03333333333333 +lat_0=17.83333333333333 +lon_0=-66.43333333333334 +x_0=152400.3048006096 +y_0=30480.06096012192 +ellps=clrk66 +towgs84=11,72,-101,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 3993 : Guam 1963 / Guam SPCS --- @@ -9166,91 +9350,91 @@ --- --- EPSG 3994 : WGS 84 / Mercator 41 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3994,'EPSG',3994,'PROJCS["WGS 84 / Mercator 41",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",100],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3994"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=merc +lon_0=100 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3994,'EPSG',3994,'PROJCS["WGS 84 / Mercator 41",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Mercator_2SP"],PARAMETER["standard_parallel_1",-41],PARAMETER["central_meridian",100],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3994"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=merc +lon_0=100 +lat_ts=-41 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3995 : WGS 84 / Arctic Polar Stereographic --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3995,'EPSG',3995,'PROJCS["WGS 84 / Arctic Polar Stereographic",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",71],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3995"],AXIS["X",UNKNOWN],AXIS["Y",UNKNOWN]]','+proj=stere +lat_0=90 +lat_ts=71 +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3995,'EPSG',3995,'PROJCS["WGS 84 / Arctic Polar Stereographic",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",71],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3995"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=stere +lat_0=90 +lat_ts=71 +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3996 : WGS 84 / IBCAO Polar Stereographic --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3996,'EPSG',3996,'PROJCS["WGS 84 / IBCAO Polar Stereographic",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",75],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3996"],AXIS["X",UNKNOWN],AXIS["Y",UNKNOWN]]','+proj=stere +lat_0=90 +lat_ts=75 +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3996,'EPSG',3996,'PROJCS["WGS 84 / IBCAO Polar Stereographic",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",75],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3996"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=stere +lat_0=90 +lat_ts=75 +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 3997 : WGS 84 / Dubai Local TM --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3997,'EPSG',3997,'PROJCS["WGS 84 / Dubai Local TM",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",55.33333333333334],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3997"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=55.33333333333334 +k=1 +x_0=500000 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (3997,'EPSG',3997,'PROJCS["WGS 84 / Dubai Local TM",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",55.33333333333334],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3997"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=55.33333333333334 +k=1 +x_0=500000 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 4026 : MOLDREF99 / Moldova TM --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4026,'EPSG',4026,'PROJCS["MOLDREF99 / Moldova TM",GEOGCS["MOLDREF99",DATUM["MOLDREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","1032"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4023"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",28.4],PARAMETER["scale_factor",0.99994],PARAMETER["false_easting",200000],PARAMETER["false_northing",-5000000],AUTHORITY["EPSG","4026"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=28.4 +k=0.9999400000000001 +x_0=200000 +y_0=-5000000 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4026,'EPSG',4026,'PROJCS["MOLDREF99 / Moldova TM",GEOGCS["MOLDREF99",DATUM["MOLDREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","1032"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4023"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",28.4],PARAMETER["scale_factor",0.99994],PARAMETER["false_easting",200000],PARAMETER["false_northing",-5000000],AUTHORITY["EPSG","4026"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=28.4 +k=0.9999400000000001 +x_0=200000 +y_0=-5000000 +ellps=GRS80 +units=m +no_defs '); --- --- EPSG 4037 : WGS 84 / TMzn35N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4037,'EPSG',4037,'PROJCS["WGS 84 / TMzn35N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4037"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=35 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4037,'EPSG',4037,'PROJCS["WGS 84 / TMzn35N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4037"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=utm +zone=35 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 4038 : WGS 84 / TMzn36N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4038,'EPSG',4038,'PROJCS["WGS 84 / TMzn36N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4038"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=36 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4038,'EPSG',4038,'PROJCS["WGS 84 / TMzn36N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4038"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=utm +zone=36 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 4048 : RGRDC 2005 / Congo TM zone 12 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4048,'EPSG',4048,'PROJCS["RGRDC 2005 / Congo TM zone 12",GEOGCS["RGRDC 2005",DATUM["Reseau_Geodesique_de_la_RDC_2005",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1033"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4046"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",12],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","4048"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=12 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4048,'EPSG',4048,'PROJCS["RGRDC 2005 / Congo TM zone 12",GEOGCS["RGRDC 2005",DATUM["Reseau_Geodesique_de_la_RDC_2005",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1033"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4046"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",12],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","4048"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=12 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 4049 : RGRDC 2005 / Congo TM zone 14 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4049,'EPSG',4049,'PROJCS["RGRDC 2005 / Congo TM zone 14",GEOGCS["RGRDC 2005",DATUM["Reseau_Geodesique_de_la_RDC_2005",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1033"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4046"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",14],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","4049"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=14 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4049,'EPSG',4049,'PROJCS["RGRDC 2005 / Congo TM zone 14",GEOGCS["RGRDC 2005",DATUM["Reseau_Geodesique_de_la_RDC_2005",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1033"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4046"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",14],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","4049"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=14 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 4050 : RGRDC 2005 / Congo TM zone 16 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4050,'EPSG',4050,'PROJCS["RGRDC 2005 / Congo TM zone 16",GEOGCS["RGRDC 2005",DATUM["Reseau_Geodesique_de_la_RDC_2005",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1033"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4046"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",16],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","4050"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=16 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4050,'EPSG',4050,'PROJCS["RGRDC 2005 / Congo TM zone 16",GEOGCS["RGRDC 2005",DATUM["Reseau_Geodesique_de_la_RDC_2005",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1033"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4046"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",16],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","4050"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=16 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 4051 : RGRDC 2005 / Congo TM zone 18 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4051,'EPSG',4051,'PROJCS["RGRDC 2005 / Congo TM zone 18",GEOGCS["RGRDC 2005",DATUM["Reseau_Geodesique_de_la_RDC_2005",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1033"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4046"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","4051"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=18 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4051,'EPSG',4051,'PROJCS["RGRDC 2005 / Congo TM zone 18",GEOGCS["RGRDC 2005",DATUM["Reseau_Geodesique_de_la_RDC_2005",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1033"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4046"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","4051"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=18 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 4056 : RGRDC 2005 / Congo TM zone 20 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4056,'EPSG',4056,'PROJCS["RGRDC 2005 / Congo TM zone 20",GEOGCS["RGRDC 2005",DATUM["Reseau_Geodesique_de_la_RDC_2005",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1033"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4046"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",20],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","4056"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=20 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4056,'EPSG',4056,'PROJCS["RGRDC 2005 / Congo TM zone 20",GEOGCS["RGRDC 2005",DATUM["Reseau_Geodesique_de_la_RDC_2005",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1033"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4046"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",20],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","4056"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=20 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 4057 : RGRDC 2005 / Congo TM zone 22 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4057,'EPSG',4057,'PROJCS["RGRDC 2005 / Congo TM zone 22",GEOGCS["RGRDC 2005",DATUM["Reseau_Geodesique_de_la_RDC_2005",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1033"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4046"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",22],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","4057"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=22 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4057,'EPSG',4057,'PROJCS["RGRDC 2005 / Congo TM zone 22",GEOGCS["RGRDC 2005",DATUM["Reseau_Geodesique_de_la_RDC_2005",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1033"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4046"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",22],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","4057"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=22 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 4058 : RGRDC 2005 / Congo TM zone 24 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4058,'EPSG',4058,'PROJCS["RGRDC 2005 / Congo TM zone 24",GEOGCS["RGRDC 2005",DATUM["Reseau_Geodesique_de_la_RDC_2005",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1033"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4046"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",24],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","4058"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4058,'EPSG',4058,'PROJCS["RGRDC 2005 / Congo TM zone 24",GEOGCS["RGRDC 2005",DATUM["Reseau_Geodesique_de_la_RDC_2005",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1033"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4046"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",24],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","4058"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 4059 : RGRDC 2005 / Congo TM zone 26 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4059,'EPSG',4059,'PROJCS["RGRDC 2005 / Congo TM zone 26",GEOGCS["RGRDC 2005",DATUM["Reseau_Geodesique_de_la_RDC_2005",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1033"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4046"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",26],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","4059"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=26 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4059,'EPSG',4059,'PROJCS["RGRDC 2005 / Congo TM zone 26",GEOGCS["RGRDC 2005",DATUM["Reseau_Geodesique_de_la_RDC_2005",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1033"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4046"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",26],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","4059"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=26 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 4060 : RGRDC 2005 / Congo TM zone 28 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4060,'EPSG',4060,'PROJCS["RGRDC 2005 / Congo TM zone 28",GEOGCS["RGRDC 2005",DATUM["Reseau_Geodesique_de_la_RDC_2005",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1033"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4046"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",28],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","4060"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=28 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4060,'EPSG',4060,'PROJCS["RGRDC 2005 / Congo TM zone 28",GEOGCS["RGRDC 2005",DATUM["Reseau_Geodesique_de_la_RDC_2005",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1033"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4046"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",28],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","4060"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=28 +k=0.9999 +x_0=500000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 4061 : RGRDC 2005 / UTM zone 33S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4061,'EPSG',4061,'PROJCS["RGRDC 2005 / UTM zone 33S",GEOGCS["RGRDC 2005",DATUM["Reseau_Geodesique_de_la_RDC_2005",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1033"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4046"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","4061"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=utm +zone=33 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4061,'EPSG',4061,'PROJCS["RGRDC 2005 / UTM zone 33S",GEOGCS["RGRDC 2005",DATUM["Reseau_Geodesique_de_la_RDC_2005",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1033"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4046"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","4061"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=utm +zone=33 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 4062 : RGRDC 2005 / UTM zone 34S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4062,'EPSG',4062,'PROJCS["RGRDC 2005 / UTM zone 34S",GEOGCS["RGRDC 2005",DATUM["Reseau_Geodesique_de_la_RDC_2005",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1033"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4046"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","4062"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=utm +zone=34 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4062,'EPSG',4062,'PROJCS["RGRDC 2005 / UTM zone 34S",GEOGCS["RGRDC 2005",DATUM["Reseau_Geodesique_de_la_RDC_2005",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1033"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4046"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","4062"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=utm +zone=34 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 4063 : RGRDC 2005 / UTM zone 35S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4063,'EPSG',4063,'PROJCS["RGRDC 2005 / UTM zone 35S",GEOGCS["RGRDC 2005",DATUM["Reseau_Geodesique_de_la_RDC_2005",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1033"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4046"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","4063"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=utm +zone=35 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4063,'EPSG',4063,'PROJCS["RGRDC 2005 / UTM zone 35S",GEOGCS["RGRDC 2005",DATUM["Reseau_Geodesique_de_la_RDC_2005",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1033"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4046"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","4063"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=utm +zone=35 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 4071 : Chua / UTM zone 23S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4071,'EPSG',4071,'PROJCS["Chua / UTM zone 23S",GEOGCS["Chua",DATUM["Chua",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6224"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4224"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","4071"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=23 +south +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4071,'EPSG',4071,'PROJCS["Chua / UTM zone 23S",GEOGCS["Chua",DATUM["Chua",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-134,229,-29,0,0,0,0],AUTHORITY["EPSG","6224"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4224"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","4071"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=23 +south +ellps=intl +towgs84=-134,229,-29,0,0,0,0 +units=m +no_defs '); --- --- EPSG 4082 : REGCAN95 / UTM zone 27N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4082,'EPSG',4082,'PROJCS["REGCAN95 / UTM zone 27N",GEOGCS["REGCAN95",DATUM["Red_Geodesica_de_Canarias_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1035"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4081"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4082"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=27 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4082,'EPSG',4082,'PROJCS["REGCAN95 / UTM zone 27N",GEOGCS["REGCAN95",DATUM["Red_Geodesica_de_Canarias_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1035"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4081"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4082"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=27 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 4083 : REGCAN95 / UTM zone 28N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4083,'EPSG',4083,'PROJCS["REGCAN95 / UTM zone 28N",GEOGCS["REGCAN95",DATUM["Red_Geodesica_de_Canarias_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1035"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4081"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4083"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4083,'EPSG',4083,'PROJCS["REGCAN95 / UTM zone 28N",GEOGCS["REGCAN95",DATUM["Red_Geodesica_de_Canarias_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1035"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4081"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4083"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 4087 : WGS 84 / World Equidistant Cylindrical --- @@ -9260,6 +9444,1534 @@ --- -- (unable to translate) --- +--- EPSG 4093 : ETRS89 / DKTM1 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4093,'EPSG',4093,'PROJCS["ETRS89 / DKTM1",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.99998],PARAMETER["false_easting",200000],PARAMETER["false_northing",-5000000],AUTHORITY["EPSG","4093"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=9 +k=0.99998 +x_0=200000 +y_0=-5000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +--- +--- EPSG 4094 : ETRS89 / DKTM2 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4094,'EPSG',4094,'PROJCS["ETRS89 / DKTM2",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",10],PARAMETER["scale_factor",0.99998],PARAMETER["false_easting",400000],PARAMETER["false_northing",-5000000],AUTHORITY["EPSG","4094"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=10 +k=0.99998 +x_0=400000 +y_0=-5000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +--- +--- EPSG 4095 : ETRS89 / DKTM3 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4095,'EPSG',4095,'PROJCS["ETRS89 / DKTM3",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",11.75],PARAMETER["scale_factor",0.99998],PARAMETER["false_easting",600000],PARAMETER["false_northing",-5000000],AUTHORITY["EPSG","4095"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=11.75 +k=0.99998 +x_0=600000 +y_0=-5000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +--- +--- EPSG 4096 : ETRS89 / DKTM4 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4096,'EPSG',4096,'PROJCS["ETRS89 / DKTM4",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",1],PARAMETER["false_easting",800000],PARAMETER["false_northing",-5000000],AUTHORITY["EPSG","4096"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=800000 +y_0=-5000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +--- +--- EPSG 4217 : None +--- +-- (unable to translate) +--- +--- EPSG 4399 : None +--- +-- (unable to translate) +--- +--- EPSG 4400 : None +--- +-- (unable to translate) +--- +--- EPSG 4401 : None +--- +-- (unable to translate) +--- +--- EPSG 4402 : None +--- +-- (unable to translate) +--- +--- EPSG 4403 : None +--- +-- (unable to translate) +--- +--- EPSG 4404 : None +--- +-- (unable to translate) +--- +--- EPSG 4405 : None +--- +-- (unable to translate) +--- +--- EPSG 4406 : None +--- +-- (unable to translate) +--- +--- EPSG 4407 : None +--- +-- (unable to translate) +--- +--- EPSG 4408 : None +--- +-- (unable to translate) +--- +--- EPSG 4409 : None +--- +-- (unable to translate) +--- +--- EPSG 4410 : None +--- +-- (unable to translate) +--- +--- EPSG 4411 : None +--- +-- (unable to translate) +--- +--- EPSG 4412 : None +--- +-- (unable to translate) +--- +--- EPSG 4413 : None +--- +-- (unable to translate) +--- +--- EPSG 4414 : NAD83(HARN) / Guam Map Grid +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4414,'EPSG',4414,'PROJCS["NAD83(HARN) / Guam Map Grid",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",13.5],PARAMETER["central_meridian",144.75],PARAMETER["scale_factor",1],PARAMETER["false_easting",100000],PARAMETER["false_northing",200000],AUTHORITY["EPSG","4414"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=13.5 +lon_0=144.75 +k=1 +x_0=100000 +y_0=200000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +--- +--- EPSG 4415 : Katanga 1955 / Katanga Lambert +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4415,'EPSG',4415,'PROJCS["Katanga 1955 / Katanga Lambert",GEOGCS["Katanga 1955",DATUM["Katanga_1955",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-103.746,-9.614,-255.95,0,0,0,0],AUTHORITY["EPSG","6695"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4695"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-6.5],PARAMETER["standard_parallel_2",-11.5],PARAMETER["latitude_of_origin",-9],PARAMETER["central_meridian",26],PARAMETER["false_easting",500000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","4415"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=-6.5 +lat_2=-11.5 +lat_0=-9 +lon_0=26 +x_0=500000 +y_0=500000 +ellps=clrk66 +towgs84=-103.746,-9.614,-255.95,0,0,0,0 +units=m +no_defs '); +--- +--- EPSG 4417 : Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 7 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4417,'EPSG',4417,'PROJCS["Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 7",GEOGCS["Pulkovo 1942(83)",DATUM["Pulkovo_1942_83",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[26,-121,-78,0,0,0,0],AUTHORITY["EPSG","6178"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4178"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",7500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4417"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=7500000 +y_0=0 +ellps=krass +towgs84=26,-121,-78,0,0,0,0 +units=m +no_defs '); +--- +--- EPSG 4418 : None +--- +-- (unable to translate) +--- +--- EPSG 4419 : None +--- +-- (unable to translate) +--- +--- EPSG 4420 : None +--- +-- (unable to translate) +--- +--- EPSG 4421 : None +--- +-- (unable to translate) +--- +--- EPSG 4422 : None +--- +-- (unable to translate) +--- +--- EPSG 4423 : None +--- +-- (unable to translate) +--- +--- EPSG 4424 : None +--- +-- (unable to translate) +--- +--- EPSG 4425 : None +--- +-- (unable to translate) +--- +--- EPSG 4426 : None +--- +-- (unable to translate) +--- +--- EPSG 4427 : None +--- +-- (unable to translate) +--- +--- EPSG 4428 : None +--- +-- (unable to translate) +--- +--- EPSG 4429 : None +--- +-- (unable to translate) +--- +--- EPSG 4430 : None +--- +-- (unable to translate) +--- +--- EPSG 4431 : None +--- +-- (unable to translate) +--- +--- EPSG 4432 : None +--- +-- (unable to translate) +--- +--- EPSG 4433 : None +--- +-- (unable to translate) +--- +--- EPSG 4434 : Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 8 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4434,'EPSG',4434,'PROJCS["Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 8",GEOGCS["Pulkovo 1942(83)",DATUM["Pulkovo_1942_83",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[26,-121,-78,0,0,0,0],AUTHORITY["EPSG","6178"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4178"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",24],PARAMETER["scale_factor",1],PARAMETER["false_easting",8500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4434"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=8500000 +y_0=0 +ellps=krass +towgs84=26,-121,-78,0,0,0,0 +units=m +no_defs '); +--- +--- EPSG 4437 : NAD83(NSRS2007) / Puerto Rico and Virgin Is. +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4437,'EPSG',4437,'PROJCS["NAD83(NSRS2007) / Puerto Rico and Virgin Is.",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",18.43333333333333],PARAMETER["standard_parallel_2",18.03333333333333],PARAMETER["latitude_of_origin",17.83333333333333],PARAMETER["central_meridian",-66.43333333333334],PARAMETER["false_easting",200000],PARAMETER["false_northing",200000],AUTHORITY["EPSG","4437"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=18.43333333333333 +lat_2=18.03333333333333 +lat_0=17.83333333333333 +lon_0=-66.43333333333334 +x_0=200000 +y_0=200000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +--- +--- EPSG 4438 : None +--- +-- (unable to translate) +--- +--- EPSG 4439 : None +--- +-- (unable to translate) +--- +--- EPSG 4455 : NAD27 / Pennsylvania South +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4455,'EPSG',4455,'PROJCS["NAD27 / Pennsylvania South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.96666666666667],PARAMETER["standard_parallel_2",39.93333333333333],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-77.75],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4455"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.96666666666667 +lat_2=39.93333333333333 +lat_0=39.33333333333334 +lon_0=-77.75 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); +--- +--- EPSG 4456 : NAD27 / New York Long Island +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4456,'EPSG',4456,'PROJCS["NAD27 / New York Long Island",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.03333333333333],PARAMETER["standard_parallel_2",40.66666666666666],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-74],PARAMETER["false_easting",2000000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","4456"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.03333333333333 +lat_2=40.66666666666666 +lat_0=40.5 +lon_0=-74 +x_0=609601.2192024384 +y_0=30480.06096012192 +datum=NAD27 +units=us-ft +no_defs '); +--- +--- EPSG 4457 : NAD83 / South Dakota North (ftUS) +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4457,'EPSG',4457,'PROJCS["NAD83 / South Dakota North (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.68333333333333],PARAMETER["standard_parallel_2",44.41666666666666],PARAMETER["latitude_of_origin",43.83333333333334],PARAMETER["central_meridian",-100],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","4457"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.68333333333333 +lat_2=44.41666666666666 +lat_0=43.83333333333334 +lon_0=-100 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +--- +--- EPSG 4462 : WGS 84 / Australian Centre for Remote Sensing Lambert +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4462,'EPSG',4462,'PROJCS["WGS 84 / Australian Centre for Remote Sensing Lambert",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",-18],PARAMETER["standard_parallel_2",-36],PARAMETER["latitude_of_origin",-27],PARAMETER["central_meridian",132],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","4462"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=-18 +lat_2=-36 +lat_0=-27 +lon_0=132 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); +--- +--- EPSG 4467 : RGSPM06 / UTM zone 21N +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4467,'EPSG',4467,'PROJCS["RGSPM06 / UTM zone 21N",GEOGCS["RGSPM06",DATUM["Reseau_Geodesique_de_Saint_Pierre_et_Miquelon_2006",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1038"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4463"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4467"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +--- +--- EPSG 4471 : RGM04 / UTM zone 38S +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4471,'EPSG',4471,'PROJCS["RGM04 / UTM zone 38S",GEOGCS["RGM04",DATUM["Reseau_Geodesique_de_Mayotte_2004",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1036"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4470"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","4471"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +--- +--- EPSG 4474 : Cadastre 1997 / UTM zone 38S +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4474,'EPSG',4474,'PROJCS["Cadastre 1997 / UTM zone 38S",GEOGCS["Combani 1950",DATUM["Combani_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-382,-59,-262,0,0,0,0],AUTHORITY["EPSG","6632"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4632"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","4474"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +south +ellps=intl +towgs84=-382,-59,-262,0,0,0,0 +units=m +no_defs '); +--- +--- EPSG 4484 : Mexican Datum of 1993 / UTM zone 11N +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4484,'EPSG',4484,'PROJCS["Mexican Datum of 1993 / UTM zone 11N",GEOGCS["Mexican Datum of 1993",DATUM["Mexican_Datum_of_1993",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1042"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4483"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],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],AUTHORITY["EPSG","4484"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=11 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +--- +--- EPSG 4485 : Mexican Datum of 1993 / UTM zone 12N +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4485,'EPSG',4485,'PROJCS["Mexican Datum of 1993 / UTM zone 12N",GEOGCS["Mexican Datum of 1993",DATUM["Mexican_Datum_of_1993",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1042"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4483"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4485"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=12 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +--- +--- EPSG 4486 : Mexican Datum of 1993 / UTM zone 13N +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4486,'EPSG',4486,'PROJCS["Mexican Datum of 1993 / UTM zone 13N",GEOGCS["Mexican Datum of 1993",DATUM["Mexican_Datum_of_1993",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1042"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4483"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4486"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=13 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +--- +--- EPSG 4487 : Mexican Datum of 1993 / UTM zone 14N +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4487,'EPSG',4487,'PROJCS["Mexican Datum of 1993 / UTM zone 14N",GEOGCS["Mexican Datum of 1993",DATUM["Mexican_Datum_of_1993",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1042"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4483"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4487"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=14 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +--- +--- EPSG 4488 : Mexican Datum of 1993 / UTM zone 15N +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4488,'EPSG',4488,'PROJCS["Mexican Datum of 1993 / UTM zone 15N",GEOGCS["Mexican Datum of 1993",DATUM["Mexican_Datum_of_1993",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1042"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4483"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4488"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=15 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +--- +--- EPSG 4489 : Mexican Datum of 1993 / UTM zone 16N +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4489,'EPSG',4489,'PROJCS["Mexican Datum of 1993 / UTM zone 16N",GEOGCS["Mexican Datum of 1993",DATUM["Mexican_Datum_of_1993",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1042"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4483"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4489"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=16 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +--- +--- EPSG 4491 : CGCS2000 / Gauss-Kruger zone 13 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4491,'EPSG',4491,'PROJCS["CGCS2000 / Gauss-Kruger zone 13",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",13500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4491"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=13500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4492 : CGCS2000 / Gauss-Kruger zone 14 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4492,'EPSG',4492,'PROJCS["CGCS2000 / Gauss-Kruger zone 14",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",14500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4492"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=14500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4493 : CGCS2000 / Gauss-Kruger zone 15 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4493,'EPSG',4493,'PROJCS["CGCS2000 / Gauss-Kruger zone 15",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",15500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4493"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=15500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4494 : CGCS2000 / Gauss-Kruger zone 16 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4494,'EPSG',4494,'PROJCS["CGCS2000 / Gauss-Kruger zone 16",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",16500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4494"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=16500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4495 : CGCS2000 / Gauss-Kruger zone 17 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4495,'EPSG',4495,'PROJCS["CGCS2000 / Gauss-Kruger zone 17",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",17500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4495"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=17500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4496 : CGCS2000 / Gauss-Kruger zone 18 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4496,'EPSG',4496,'PROJCS["CGCS2000 / Gauss-Kruger zone 18",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",18500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4496"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=18500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4497 : CGCS2000 / Gauss-Kruger zone 19 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4497,'EPSG',4497,'PROJCS["CGCS2000 / Gauss-Kruger zone 19",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",19500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4497"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=19500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4498 : CGCS2000 / Gauss-Kruger zone 20 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4498,'EPSG',4498,'PROJCS["CGCS2000 / Gauss-Kruger zone 20",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",20500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4498"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=20500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4499 : CGCS2000 / Gauss-Kruger zone 21 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4499,'EPSG',4499,'PROJCS["CGCS2000 / Gauss-Kruger zone 21",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",21500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4499"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=21500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4500 : CGCS2000 / Gauss-Kruger zone 22 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4500,'EPSG',4500,'PROJCS["CGCS2000 / Gauss-Kruger zone 22",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",22500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4500"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=22500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4501 : CGCS2000 / Gauss-Kruger zone 23 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4501,'EPSG',4501,'PROJCS["CGCS2000 / Gauss-Kruger zone 23",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",23500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4501"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=23500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4502 : CGCS2000 / Gauss-Kruger CM 75E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4502,'EPSG',4502,'PROJCS["CGCS2000 / Gauss-Kruger CM 75E",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4502"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4503 : CGCS2000 / Gauss-Kruger CM 81E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4503,'EPSG',4503,'PROJCS["CGCS2000 / Gauss-Kruger CM 81E",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4503"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4504 : CGCS2000 / Gauss-Kruger CM 87E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4504,'EPSG',4504,'PROJCS["CGCS2000 / Gauss-Kruger CM 87E",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4504"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4505 : CGCS2000 / Gauss-Kruger CM 93E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4505,'EPSG',4505,'PROJCS["CGCS2000 / Gauss-Kruger CM 93E",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4505"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4506 : CGCS2000 / Gauss-Kruger CM 99E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4506,'EPSG',4506,'PROJCS["CGCS2000 / Gauss-Kruger CM 99E",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4506"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4507 : CGCS2000 / Gauss-Kruger CM 105E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4507,'EPSG',4507,'PROJCS["CGCS2000 / Gauss-Kruger CM 105E",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4507"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4508 : CGCS2000 / Gauss-Kruger CM 111E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4508,'EPSG',4508,'PROJCS["CGCS2000 / Gauss-Kruger CM 111E",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4508"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4509 : CGCS2000 / Gauss-Kruger CM 117E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4509,'EPSG',4509,'PROJCS["CGCS2000 / Gauss-Kruger CM 117E",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4509"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4510 : CGCS2000 / Gauss-Kruger CM 123E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4510,'EPSG',4510,'PROJCS["CGCS2000 / Gauss-Kruger CM 123E",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4510"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4511 : CGCS2000 / Gauss-Kruger CM 129E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4511,'EPSG',4511,'PROJCS["CGCS2000 / Gauss-Kruger CM 129E",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4511"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4512 : CGCS2000 / Gauss-Kruger CM 135E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4512,'EPSG',4512,'PROJCS["CGCS2000 / Gauss-Kruger CM 135E",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4512"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4513 : CGCS2000 / 3-degree Gauss-Kruger zone 25 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4513,'EPSG',4513,'PROJCS["CGCS2000 / 3-degree Gauss-Kruger zone 25",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",25500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4513"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=25500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4514 : CGCS2000 / 3-degree Gauss-Kruger zone 26 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4514,'EPSG',4514,'PROJCS["CGCS2000 / 3-degree Gauss-Kruger zone 26",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",78],PARAMETER["scale_factor",1],PARAMETER["false_easting",26500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4514"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=26500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4515 : CGCS2000 / 3-degree Gauss-Kruger zone 27 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4515,'EPSG',4515,'PROJCS["CGCS2000 / 3-degree Gauss-Kruger zone 27",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",27500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4515"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=27500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4516 : CGCS2000 / 3-degree Gauss-Kruger zone 28 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4516,'EPSG',4516,'PROJCS["CGCS2000 / 3-degree Gauss-Kruger zone 28",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",84],PARAMETER["scale_factor",1],PARAMETER["false_easting",28500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4516"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=28500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4517 : CGCS2000 / 3-degree Gauss-Kruger zone 29 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4517,'EPSG',4517,'PROJCS["CGCS2000 / 3-degree Gauss-Kruger zone 29",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",29500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4517"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=29500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4518 : CGCS2000 / 3-degree Gauss-Kruger zone 30 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4518,'EPSG',4518,'PROJCS["CGCS2000 / 3-degree Gauss-Kruger zone 30",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",90],PARAMETER["scale_factor",1],PARAMETER["false_easting",30500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4518"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=30500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4519 : CGCS2000 / 3-degree Gauss-Kruger zone 31 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4519,'EPSG',4519,'PROJCS["CGCS2000 / 3-degree Gauss-Kruger zone 31",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",31500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4519"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=31500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4520 : CGCS2000 / 3-degree Gauss-Kruger zone 32 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4520,'EPSG',4520,'PROJCS["CGCS2000 / 3-degree Gauss-Kruger zone 32",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",96],PARAMETER["scale_factor",1],PARAMETER["false_easting",32500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4520"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=32500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4521 : CGCS2000 / 3-degree Gauss-Kruger zone 33 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4521,'EPSG',4521,'PROJCS["CGCS2000 / 3-degree Gauss-Kruger zone 33",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",33500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4521"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=33500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4522 : CGCS2000 / 3-degree Gauss-Kruger zone 34 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4522,'EPSG',4522,'PROJCS["CGCS2000 / 3-degree Gauss-Kruger zone 34",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",102],PARAMETER["scale_factor",1],PARAMETER["false_easting",34500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4522"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=34500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4523 : CGCS2000 / 3-degree Gauss-Kruger zone 35 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4523,'EPSG',4523,'PROJCS["CGCS2000 / 3-degree Gauss-Kruger zone 35",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",35500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4523"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=35500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4524 : CGCS2000 / 3-degree Gauss-Kruger zone 36 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4524,'EPSG',4524,'PROJCS["CGCS2000 / 3-degree Gauss-Kruger zone 36",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",108],PARAMETER["scale_factor",1],PARAMETER["false_easting",36500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4524"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=36500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4525 : CGCS2000 / 3-degree Gauss-Kruger zone 37 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4525,'EPSG',4525,'PROJCS["CGCS2000 / 3-degree Gauss-Kruger zone 37",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",37500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4525"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=37500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4526 : CGCS2000 / 3-degree Gauss-Kruger zone 38 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4526,'EPSG',4526,'PROJCS["CGCS2000 / 3-degree Gauss-Kruger zone 38",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",114],PARAMETER["scale_factor",1],PARAMETER["false_easting",38500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4526"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=38500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4527 : CGCS2000 / 3-degree Gauss-Kruger zone 39 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4527,'EPSG',4527,'PROJCS["CGCS2000 / 3-degree Gauss-Kruger zone 39",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",39500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4527"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=39500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4528 : CGCS2000 / 3-degree Gauss-Kruger zone 40 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4528,'EPSG',4528,'PROJCS["CGCS2000 / 3-degree Gauss-Kruger zone 40",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",120],PARAMETER["scale_factor",1],PARAMETER["false_easting",40500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4528"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=40500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4529 : CGCS2000 / 3-degree Gauss-Kruger zone 41 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4529,'EPSG',4529,'PROJCS["CGCS2000 / 3-degree Gauss-Kruger zone 41",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",41500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4529"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=41500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4530 : CGCS2000 / 3-degree Gauss-Kruger zone 42 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4530,'EPSG',4530,'PROJCS["CGCS2000 / 3-degree Gauss-Kruger zone 42",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",126],PARAMETER["scale_factor",1],PARAMETER["false_easting",42500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4530"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=126 +k=1 +x_0=42500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4531 : CGCS2000 / 3-degree Gauss-Kruger zone 43 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4531,'EPSG',4531,'PROJCS["CGCS2000 / 3-degree Gauss-Kruger zone 43",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",43500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4531"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=43500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4532 : CGCS2000 / 3-degree Gauss-Kruger zone 44 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4532,'EPSG',4532,'PROJCS["CGCS2000 / 3-degree Gauss-Kruger zone 44",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",132],PARAMETER["scale_factor",1],PARAMETER["false_easting",44500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4532"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=132 +k=1 +x_0=44500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4533 : CGCS2000 / 3-degree Gauss-Kruger zone 45 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4533,'EPSG',4533,'PROJCS["CGCS2000 / 3-degree Gauss-Kruger zone 45",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",45500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4533"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=45500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4534 : CGCS2000 / 3-degree Gauss-Kruger CM 75E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4534,'EPSG',4534,'PROJCS["CGCS2000 / 3-degree Gauss-Kruger CM 75E",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4534"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4535 : CGCS2000 / 3-degree Gauss-Kruger CM 78E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4535,'EPSG',4535,'PROJCS["CGCS2000 / 3-degree Gauss-Kruger CM 78E",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",78],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4535"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4536 : CGCS2000 / 3-degree Gauss-Kruger CM 81E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4536,'EPSG',4536,'PROJCS["CGCS2000 / 3-degree Gauss-Kruger CM 81E",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4536"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4537 : CGCS2000 / 3-degree Gauss-Kruger CM 84E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4537,'EPSG',4537,'PROJCS["CGCS2000 / 3-degree Gauss-Kruger CM 84E",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",84],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4537"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4538 : CGCS2000 / 3-degree Gauss-Kruger CM 87E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4538,'EPSG',4538,'PROJCS["CGCS2000 / 3-degree Gauss-Kruger CM 87E",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4538"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4539 : CGCS2000 / 3-degree Gauss-Kruger CM 90E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4539,'EPSG',4539,'PROJCS["CGCS2000 / 3-degree Gauss-Kruger CM 90E",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",90],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4539"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4540 : CGCS2000 / 3-degree Gauss-Kruger CM 93E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4540,'EPSG',4540,'PROJCS["CGCS2000 / 3-degree Gauss-Kruger CM 93E",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4540"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4541 : CGCS2000 / 3-degree Gauss-Kruger CM 96E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4541,'EPSG',4541,'PROJCS["CGCS2000 / 3-degree Gauss-Kruger CM 96E",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",96],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4541"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4542 : CGCS2000 / 3-degree Gauss-Kruger CM 99E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4542,'EPSG',4542,'PROJCS["CGCS2000 / 3-degree Gauss-Kruger CM 99E",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4542"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4543 : CGCS2000 / 3-degree Gauss-Kruger CM 102E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4543,'EPSG',4543,'PROJCS["CGCS2000 / 3-degree Gauss-Kruger CM 102E",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",102],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4543"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4544 : CGCS2000 / 3-degree Gauss-Kruger CM 105E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4544,'EPSG',4544,'PROJCS["CGCS2000 / 3-degree Gauss-Kruger CM 105E",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4544"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4545 : CGCS2000 / 3-degree Gauss-Kruger CM 108E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4545,'EPSG',4545,'PROJCS["CGCS2000 / 3-degree Gauss-Kruger CM 108E",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",108],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4545"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4546 : CGCS2000 / 3-degree Gauss-Kruger CM 111E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4546,'EPSG',4546,'PROJCS["CGCS2000 / 3-degree Gauss-Kruger CM 111E",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4546"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4547 : CGCS2000 / 3-degree Gauss-Kruger CM 114E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4547,'EPSG',4547,'PROJCS["CGCS2000 / 3-degree Gauss-Kruger CM 114E",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",114],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4547"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4548 : CGCS2000 / 3-degree Gauss-Kruger CM 117E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4548,'EPSG',4548,'PROJCS["CGCS2000 / 3-degree Gauss-Kruger CM 117E",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4548"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4549 : CGCS2000 / 3-degree Gauss-Kruger CM 120E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4549,'EPSG',4549,'PROJCS["CGCS2000 / 3-degree Gauss-Kruger CM 120E",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",120],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4549"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4550 : CGCS2000 / 3-degree Gauss-Kruger CM 123E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4550,'EPSG',4550,'PROJCS["CGCS2000 / 3-degree Gauss-Kruger CM 123E",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4550"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4551 : CGCS2000 / 3-degree Gauss-Kruger CM 126E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4551,'EPSG',4551,'PROJCS["CGCS2000 / 3-degree Gauss-Kruger CM 126E",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",126],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4551"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=126 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4552 : CGCS2000 / 3-degree Gauss-Kruger CM 129E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4552,'EPSG',4552,'PROJCS["CGCS2000 / 3-degree Gauss-Kruger CM 129E",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4552"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4553 : CGCS2000 / 3-degree Gauss-Kruger CM 132E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4553,'EPSG',4553,'PROJCS["CGCS2000 / 3-degree Gauss-Kruger CM 132E",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",132],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4553"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=132 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4554 : CGCS2000 / 3-degree Gauss-Kruger CM 135E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4554,'EPSG',4554,'PROJCS["CGCS2000 / 3-degree Gauss-Kruger CM 135E",GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101,AUTHORITY["EPSG","1024"]],AUTHORITY["EPSG","1043"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4490"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4554"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +--- +--- EPSG 4559 : RRAF 1991 / UTM zone 20N +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4559,'EPSG',4559,'PROJCS["RRAF 1991 / UTM zone 20N",GEOGCS["RRAF 1991",DATUM["Reseau_de_Reference_des_Antilles_Francaises_1991",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","1047"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4558"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4559"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +--- +--- EPSG 4568 : New Beijing / Gauss-Kruger zone 13 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4568,'EPSG',4568,'PROJCS["New Beijing / Gauss-Kruger zone 13",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",13500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4568"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=13500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4569 : New Beijing / Gauss-Kruger zone 14 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4569,'EPSG',4569,'PROJCS["New Beijing / Gauss-Kruger zone 14",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",14500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4569"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=14500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4570 : New Beijing / Gauss-Kruger zone 15 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4570,'EPSG',4570,'PROJCS["New Beijing / Gauss-Kruger zone 15",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",15500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4570"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=15500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4571 : New Beijing / Gauss-Kruger zone 16 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4571,'EPSG',4571,'PROJCS["New Beijing / Gauss-Kruger zone 16",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",16500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4571"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=16500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4572 : New Beijing / Gauss-Kruger zone 17 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4572,'EPSG',4572,'PROJCS["New Beijing / Gauss-Kruger zone 17",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",17500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4572"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=17500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4573 : New Beijing / Gauss-Kruger zone 18 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4573,'EPSG',4573,'PROJCS["New Beijing / Gauss-Kruger zone 18",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",18500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4573"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=18500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4574 : New Beijing / Gauss-Kruger zone 19 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4574,'EPSG',4574,'PROJCS["New Beijing / Gauss-Kruger zone 19",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",19500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4574"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=19500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4575 : New Beijing / Gauss-Kruger zone 20 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4575,'EPSG',4575,'PROJCS["New Beijing / Gauss-Kruger zone 20",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",20500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4575"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=20500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4576 : New Beijing / Gauss-Kruger zone 21 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4576,'EPSG',4576,'PROJCS["New Beijing / Gauss-Kruger zone 21",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",21500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4576"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=21500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4577 : New Beijing / Gauss-Kruger zone 22 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4577,'EPSG',4577,'PROJCS["New Beijing / Gauss-Kruger zone 22",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",22500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4577"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=22500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4578 : New Beijing / Gauss-Kruger zone 23 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4578,'EPSG',4578,'PROJCS["New Beijing / Gauss-Kruger zone 23",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",23500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4578"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=23500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4579 : New Beijing / Gauss-Kruger CM 75E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4579,'EPSG',4579,'PROJCS["New Beijing / Gauss-Kruger CM 75E",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4579"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4580 : New Beijing / Gauss-Kruger CM 81E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4580,'EPSG',4580,'PROJCS["New Beijing / Gauss-Kruger CM 81E",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4580"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4581 : New Beijing / Gauss-Kruger CM 87E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4581,'EPSG',4581,'PROJCS["New Beijing / Gauss-Kruger CM 87E",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4581"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4582 : New Beijing / Gauss-Kruger CM 93E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4582,'EPSG',4582,'PROJCS["New Beijing / Gauss-Kruger CM 93E",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4582"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4583 : New Beijing / Gauss-Kruger CM 99E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4583,'EPSG',4583,'PROJCS["New Beijing / Gauss-Kruger CM 99E",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4583"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4584 : New Beijing / Gauss-Kruger CM 105E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4584,'EPSG',4584,'PROJCS["New Beijing / Gauss-Kruger CM 105E",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4584"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4585 : New Beijing / Gauss-Kruger CM 111E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4585,'EPSG',4585,'PROJCS["New Beijing / Gauss-Kruger CM 111E",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4585"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4586 : New Beijing / Gauss-Kruger CM 117E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4586,'EPSG',4586,'PROJCS["New Beijing / Gauss-Kruger CM 117E",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4586"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4587 : New Beijing / Gauss-Kruger CM 123E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4587,'EPSG',4587,'PROJCS["New Beijing / Gauss-Kruger CM 123E",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4587"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4588 : New Beijing / Gauss-Kruger CM 129E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4588,'EPSG',4588,'PROJCS["New Beijing / Gauss-Kruger CM 129E",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4588"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4589 : New Beijing / Gauss-Kruger CM 135E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4589,'EPSG',4589,'PROJCS["New Beijing / Gauss-Kruger CM 135E",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4589"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4647 : ETRS89 / UTM zone N32 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4647,'EPSG',4647,'PROJCS["ETRS89 / UTM zone N32",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",32500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4647"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=9 +k=0.9996 +x_0=32500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +--- +--- EPSG 4652 : New Beijing / 3-degree Gauss-Kruger zone 25 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4652,'EPSG',4652,'PROJCS["New Beijing / 3-degree Gauss-Kruger zone 25",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",25500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4652"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=25500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4653 : New Beijing / 3-degree Gauss-Kruger zone 26 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4653,'EPSG',4653,'PROJCS["New Beijing / 3-degree Gauss-Kruger zone 26",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",78],PARAMETER["scale_factor",1],PARAMETER["false_easting",26500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4653"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=26500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4654 : New Beijing / 3-degree Gauss-Kruger zone 27 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4654,'EPSG',4654,'PROJCS["New Beijing / 3-degree Gauss-Kruger zone 27",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",27500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4654"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=27500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4655 : New Beijing / 3-degree Gauss-Kruger zone 28 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4655,'EPSG',4655,'PROJCS["New Beijing / 3-degree Gauss-Kruger zone 28",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",84],PARAMETER["scale_factor",1],PARAMETER["false_easting",28500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4655"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=28500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4656 : New Beijing / 3-degree Gauss-Kruger zone 29 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4656,'EPSG',4656,'PROJCS["New Beijing / 3-degree Gauss-Kruger zone 29",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",29500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4656"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=29500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4766 : New Beijing / 3-degree Gauss-Kruger zone 30 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4766,'EPSG',4766,'PROJCS["New Beijing / 3-degree Gauss-Kruger zone 30",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",90],PARAMETER["scale_factor",1],PARAMETER["false_easting",30500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4766"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=30500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4767 : New Beijing / 3-degree Gauss-Kruger zone 31 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4767,'EPSG',4767,'PROJCS["New Beijing / 3-degree Gauss-Kruger zone 31",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",31500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4767"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=31500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4768 : New Beijing / 3-degree Gauss-Kruger zone 32 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4768,'EPSG',4768,'PROJCS["New Beijing / 3-degree Gauss-Kruger zone 32",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",96],PARAMETER["scale_factor",1],PARAMETER["false_easting",32500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4768"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=32500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4769 : New Beijing / 3-degree Gauss-Kruger zone 33 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4769,'EPSG',4769,'PROJCS["New Beijing / 3-degree Gauss-Kruger zone 33",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",33500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4769"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=33500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4770 : New Beijing / 3-degree Gauss-Kruger zone 34 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4770,'EPSG',4770,'PROJCS["New Beijing / 3-degree Gauss-Kruger zone 34",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",102],PARAMETER["scale_factor",1],PARAMETER["false_easting",34500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4770"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=34500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4771 : New Beijing / 3-degree Gauss-Kruger zone 35 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4771,'EPSG',4771,'PROJCS["New Beijing / 3-degree Gauss-Kruger zone 35",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",35500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4771"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=35500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4772 : New Beijing / 3-degree Gauss-Kruger zone 36 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4772,'EPSG',4772,'PROJCS["New Beijing / 3-degree Gauss-Kruger zone 36",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",108],PARAMETER["scale_factor",1],PARAMETER["false_easting",36500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4772"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=36500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4773 : New Beijing / 3-degree Gauss-Kruger zone 37 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4773,'EPSG',4773,'PROJCS["New Beijing / 3-degree Gauss-Kruger zone 37",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",37500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4773"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=37500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4774 : New Beijing / 3-degree Gauss-Kruger zone 38 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4774,'EPSG',4774,'PROJCS["New Beijing / 3-degree Gauss-Kruger zone 38",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",114],PARAMETER["scale_factor",1],PARAMETER["false_easting",38500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4774"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=38500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4775 : New Beijing / 3-degree Gauss-Kruger zone 39 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4775,'EPSG',4775,'PROJCS["New Beijing / 3-degree Gauss-Kruger zone 39",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",39500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4775"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=39500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4776 : New Beijing / 3-degree Gauss-Kruger zone 40 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4776,'EPSG',4776,'PROJCS["New Beijing / 3-degree Gauss-Kruger zone 40",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",120],PARAMETER["scale_factor",1],PARAMETER["false_easting",40500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4776"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=40500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4777 : New Beijing / 3-degree Gauss-Kruger zone 41 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4777,'EPSG',4777,'PROJCS["New Beijing / 3-degree Gauss-Kruger zone 41",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",41500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4777"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=41500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4778 : New Beijing / 3-degree Gauss-Kruger zone 42 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4778,'EPSG',4778,'PROJCS["New Beijing / 3-degree Gauss-Kruger zone 42",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",126],PARAMETER["scale_factor",1],PARAMETER["false_easting",42500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4778"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=126 +k=1 +x_0=42500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4779 : New Beijing / 3-degree Gauss-Kruger zone 43 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4779,'EPSG',4779,'PROJCS["New Beijing / 3-degree Gauss-Kruger zone 43",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",43500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4779"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=43500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4780 : New Beijing / 3-degree Gauss-Kruger zone 44 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4780,'EPSG',4780,'PROJCS["New Beijing / 3-degree Gauss-Kruger zone 44",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",132],PARAMETER["scale_factor",1],PARAMETER["false_easting",44500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4780"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=132 +k=1 +x_0=44500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4781 : New Beijing / 3-degree Gauss-Kruger zone 45 +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4781,'EPSG',4781,'PROJCS["New Beijing / 3-degree Gauss-Kruger zone 45",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",45500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4781"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=45500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4782 : New Beijing / 3-degree Gauss-Kruger CM 75E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4782,'EPSG',4782,'PROJCS["New Beijing / 3-degree Gauss-Kruger CM 75E",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4782"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4783 : New Beijing / 3-degree Gauss-Kruger CM 78E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4783,'EPSG',4783,'PROJCS["New Beijing / 3-degree Gauss-Kruger CM 78E",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",78],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4783"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4784 : New Beijing / 3-degree Gauss-Kruger CM 81E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4784,'EPSG',4784,'PROJCS["New Beijing / 3-degree Gauss-Kruger CM 81E",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4784"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4785 : New Beijing / 3-degree Gauss-Kruger CM 84E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4785,'EPSG',4785,'PROJCS["New Beijing / 3-degree Gauss-Kruger CM 84E",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",84],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4785"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4786 : New Beijing / 3-degree Gauss-Kruger CM 87E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4786,'EPSG',4786,'PROJCS["New Beijing / 3-degree Gauss-Kruger CM 87E",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4786"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4787 : New Beijing / 3-degree Gauss-Kruger CM 90E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4787,'EPSG',4787,'PROJCS["New Beijing / 3-degree Gauss-Kruger CM 90E",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",90],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4787"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4788 : New Beijing / 3-degree Gauss-Kruger CM 93E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4788,'EPSG',4788,'PROJCS["New Beijing / 3-degree Gauss-Kruger CM 93E",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4788"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4789 : New Beijing / 3-degree Gauss-Kruger CM 96E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4789,'EPSG',4789,'PROJCS["New Beijing / 3-degree Gauss-Kruger CM 96E",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",96],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4789"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4790 : New Beijing / 3-degree Gauss-Kruger CM 99E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4790,'EPSG',4790,'PROJCS["New Beijing / 3-degree Gauss-Kruger CM 99E",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4790"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4791 : New Beijing / 3-degree Gauss-Kruger CM 102E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4791,'EPSG',4791,'PROJCS["New Beijing / 3-degree Gauss-Kruger CM 102E",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",102],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4791"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4792 : New Beijing / 3-degree Gauss-Kruger CM 105E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4792,'EPSG',4792,'PROJCS["New Beijing / 3-degree Gauss-Kruger CM 105E",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4792"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4793 : New Beijing / 3-degree Gauss-Kruger CM 108E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4793,'EPSG',4793,'PROJCS["New Beijing / 3-degree Gauss-Kruger CM 108E",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",108],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4793"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4794 : New Beijing / 3-degree Gauss-Kruger CM 111E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4794,'EPSG',4794,'PROJCS["New Beijing / 3-degree Gauss-Kruger CM 111E",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4794"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4795 : New Beijing / 3-degree Gauss-Kruger CM 114E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4795,'EPSG',4795,'PROJCS["New Beijing / 3-degree Gauss-Kruger CM 114E",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",114],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4795"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4796 : New Beijing / 3-degree Gauss-Kruger CM 117E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4796,'EPSG',4796,'PROJCS["New Beijing / 3-degree Gauss-Kruger CM 117E",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4796"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4797 : New Beijing / 3-degree Gauss-Kruger CM 120E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4797,'EPSG',4797,'PROJCS["New Beijing / 3-degree Gauss-Kruger CM 120E",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",120],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4797"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4798 : New Beijing / 3-degree Gauss-Kruger CM 123E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4798,'EPSG',4798,'PROJCS["New Beijing / 3-degree Gauss-Kruger CM 123E",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4798"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4799 : New Beijing / 3-degree Gauss-Kruger CM 126E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4799,'EPSG',4799,'PROJCS["New Beijing / 3-degree Gauss-Kruger CM 126E",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",126],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4799"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=126 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4800 : New Beijing / 3-degree Gauss-Kruger CM 129E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4800,'EPSG',4800,'PROJCS["New Beijing / 3-degree Gauss-Kruger CM 129E",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4800"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4812 : New Beijing / 3-degree Gauss-Kruger CM 132E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4812,'EPSG',4812,'PROJCS["New Beijing / 3-degree Gauss-Kruger CM 132E",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",132],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4812"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=132 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4822 : New Beijing / 3-degree Gauss-Kruger CM 135E +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4822,'EPSG',4822,'PROJCS["New Beijing / 3-degree Gauss-Kruger CM 135E",GEOGCS["New Beijing",DATUM["New_Beijing",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","1045"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4555"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","4822"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +--- +--- EPSG 4826 : WGS 84 / Cape Verde National +--- +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4826,'EPSG',4826,'PROJCS["WGS 84 / Cape Verde National",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",15],PARAMETER["standard_parallel_2",16.66666666666667],PARAMETER["latitude_of_origin",15.83333333333333],PARAMETER["central_meridian",-24],PARAMETER["false_easting",161587.83],PARAMETER["false_northing",128511.202],AUTHORITY["EPSG","4826"],AXIS["M",EAST],AXIS["P",NORTH]]','+proj=lcc +lat_1=15 +lat_2=16.66666666666667 +lat_0=15.83333333333333 +lon_0=-24 +x_0=161587.83 +y_0=128511.202 +datum=WGS84 +units=m +no_defs '); +--- +--- EPSG 4839 : None +--- +-- (unable to translate) +--- +--- EPSG 4855 : None +--- +-- (unable to translate) +--- +--- EPSG 4856 : None +--- +-- (unable to translate) +--- +--- EPSG 4857 : None +--- +-- (unable to translate) +--- +--- EPSG 4858 : None +--- +-- (unable to translate) +--- +--- EPSG 4859 : None +--- +-- (unable to translate) +--- +--- EPSG 4860 : None +--- +-- (unable to translate) +--- +--- EPSG 4861 : None +--- +-- (unable to translate) +--- +--- EPSG 4862 : None +--- +-- (unable to translate) +--- +--- EPSG 4863 : None +--- +-- (unable to translate) +--- +--- EPSG 4864 : None +--- +-- (unable to translate) +--- +--- EPSG 4865 : None +--- +-- (unable to translate) +--- +--- EPSG 4866 : None +--- +-- (unable to translate) +--- +--- EPSG 4867 : None +--- +-- (unable to translate) +--- +--- EPSG 4868 : None +--- +-- (unable to translate) +--- +--- EPSG 4869 : None +--- +-- (unable to translate) +--- +--- EPSG 4870 : None +--- +-- (unable to translate) +--- +--- EPSG 4871 : None +--- +-- (unable to translate) +--- +--- EPSG 4872 : None +--- +-- (unable to translate) +--- +--- EPSG 4873 : None +--- +-- (unable to translate) +--- +--- EPSG 4874 : None +--- +-- (unable to translate) +--- +--- EPSG 4875 : None +--- +-- (unable to translate) +--- +--- EPSG 4876 : None +--- +-- (unable to translate) +--- +--- EPSG 4877 : None +--- +-- (unable to translate) +--- +--- EPSG 4878 : None +--- +-- (unable to translate) +--- +--- EPSG 4879 : None +--- +-- (unable to translate) +--- +--- EPSG 4880 : None +--- +-- (unable to translate) +--- +--- EPSG 5014 : None +--- +-- (unable to translate) +--- +--- EPSG 5015 : None +--- +-- (unable to translate) +--- +--- EPSG 5016 : None +--- +-- (unable to translate) +--- +--- EPSG 5017 : None +--- +-- (unable to translate) +--- +--- EPSG 5018 : None +--- +-- (unable to translate) +--- +--- EPSG 5041 : None +--- +-- (unable to translate) +--- +--- EPSG 5042 : None +--- +-- (unable to translate) +--- +--- EPSG 5048 : None +--- +-- (unable to translate) +--- +--- EPSG 5069 : None +--- +-- (unable to translate) +--- +--- EPSG 5070 : None +--- +-- (unable to translate) +--- +--- EPSG 5071 : None +--- +-- (unable to translate) +--- +--- EPSG 5072 : None +--- +-- (unable to translate) +--- +--- EPSG 5105 : None +--- +-- (unable to translate) +--- +--- EPSG 5106 : None +--- +-- (unable to translate) +--- +--- EPSG 5107 : None +--- +-- (unable to translate) +--- +--- EPSG 5108 : None +--- +-- (unable to translate) +--- +--- EPSG 5109 : None +--- +-- (unable to translate) +--- +--- EPSG 5110 : None +--- +-- (unable to translate) +--- +--- EPSG 5111 : None +--- +-- (unable to translate) +--- +--- EPSG 5112 : None +--- +-- (unable to translate) +--- +--- EPSG 5113 : None +--- +-- (unable to translate) +--- +--- EPSG 5114 : None +--- +-- (unable to translate) +--- +--- EPSG 5115 : None +--- +-- (unable to translate) +--- +--- EPSG 5116 : None +--- +-- (unable to translate) +--- +--- EPSG 5117 : None +--- +-- (unable to translate) +--- +--- EPSG 5118 : None +--- +-- (unable to translate) +--- +--- EPSG 5119 : None +--- +-- (unable to translate) +--- +--- EPSG 5120 : None +--- +-- (unable to translate) +--- +--- EPSG 5121 : None +--- +-- (unable to translate) +--- +--- EPSG 5122 : None +--- +-- (unable to translate) +--- +--- EPSG 5123 : None +--- +-- (unable to translate) +--- +--- EPSG 5124 : None +--- +-- (unable to translate) +--- +--- EPSG 5125 : None +--- +-- (unable to translate) +--- +--- EPSG 5126 : None +--- +-- (unable to translate) +--- +--- EPSG 5127 : None +--- +-- (unable to translate) +--- +--- EPSG 5128 : None +--- +-- (unable to translate) +--- +--- EPSG 5129 : None +--- +-- (unable to translate) +--- +--- EPSG 5130 : None +--- +-- (unable to translate) +--- +--- EPSG 5167 : None +--- +-- (unable to translate) +--- +--- EPSG 5168 : None +--- +-- (unable to translate) +--- +--- EPSG 5169 : None +--- +-- (unable to translate) +--- +--- EPSG 5170 : None +--- +-- (unable to translate) +--- +--- EPSG 5171 : None +--- +-- (unable to translate) +--- +--- EPSG 5172 : None +--- +-- (unable to translate) +--- +--- EPSG 5173 : None +--- +-- (unable to translate) +--- +--- EPSG 5174 : None +--- +-- (unable to translate) +--- +--- EPSG 5175 : None +--- +-- (unable to translate) +--- +--- EPSG 5176 : None +--- +-- (unable to translate) +--- +--- EPSG 5177 : None +--- +-- (unable to translate) +--- +--- EPSG 5178 : None +--- +-- (unable to translate) +--- +--- EPSG 5179 : None +--- +-- (unable to translate) +--- +--- EPSG 5180 : None +--- +-- (unable to translate) +--- +--- EPSG 5181 : None +--- +-- (unable to translate) +--- +--- EPSG 5182 : None +--- +-- (unable to translate) +--- +--- EPSG 5183 : None +--- +-- (unable to translate) +--- +--- EPSG 5184 : None +--- +-- (unable to translate) +--- +--- EPSG 5185 : None +--- +-- (unable to translate) +--- +--- EPSG 5186 : None +--- +-- (unable to translate) +--- +--- EPSG 5187 : None +--- +-- (unable to translate) +--- +--- EPSG 5188 : None +--- +-- (unable to translate) +--- +--- EPSG 5221 : None +--- +-- (unable to translate) +--- +--- EPSG 5223 : None +--- +-- (unable to translate) +--- +--- EPSG 5224 : None +--- +-- (unable to translate) +--- +--- EPSG 5225 : None +--- +-- (unable to translate) +--- +--- EPSG 5234 : None +--- +-- (unable to translate) +--- +--- EPSG 5235 : None +--- +-- (unable to translate) +--- +--- EPSG 5243 : None +--- +-- (unable to translate) +--- +--- EPSG 5247 : None +--- +-- (unable to translate) +--- +--- EPSG 5253 : None +--- +-- (unable to translate) +--- +--- EPSG 5254 : None +--- +-- (unable to translate) +--- +--- EPSG 5255 : None +--- +-- (unable to translate) +--- +--- EPSG 5256 : None +--- +-- (unable to translate) +--- +--- EPSG 5257 : None +--- +-- (unable to translate) +--- +--- EPSG 5258 : None +--- +-- (unable to translate) +--- +--- EPSG 5259 : None +--- +-- (unable to translate) +--- +--- EPSG 5266 : None +--- +-- (unable to translate) +--- +--- EPSG 5269 : None +--- +-- (unable to translate) +--- +--- EPSG 5270 : None +--- +-- (unable to translate) +--- +--- EPSG 5271 : None +--- +-- (unable to translate) +--- +--- EPSG 5272 : None +--- +-- (unable to translate) +--- +--- EPSG 5273 : None +--- +-- (unable to translate) +--- +--- EPSG 5274 : None +--- +-- (unable to translate) +--- +--- EPSG 5275 : None +--- +-- (unable to translate) +--- +--- EPSG 5292 : None +--- +-- (unable to translate) +--- +--- EPSG 5293 : None +--- +-- (unable to translate) +--- +--- EPSG 5294 : None +--- +-- (unable to translate) +--- +--- EPSG 5295 : None +--- +-- (unable to translate) +--- +--- EPSG 5296 : None +--- +-- (unable to translate) +--- +--- EPSG 5297 : None +--- +-- (unable to translate) +--- +--- EPSG 5298 : None +--- +-- (unable to translate) +--- +--- EPSG 5299 : None +--- +-- (unable to translate) +--- +--- EPSG 5300 : None +--- +-- (unable to translate) +--- +--- EPSG 5301 : None +--- +-- (unable to translate) +--- +--- EPSG 5302 : None +--- +-- (unable to translate) +--- +--- EPSG 5303 : None +--- +-- (unable to translate) +--- +--- EPSG 5304 : None +--- +-- (unable to translate) +--- +--- EPSG 5305 : None +--- +-- (unable to translate) +--- +--- EPSG 5306 : None +--- +-- (unable to translate) +--- +--- EPSG 5307 : None +--- +-- (unable to translate) +--- +--- EPSG 5308 : None +--- +-- (unable to translate) +--- +--- EPSG 5309 : None +--- +-- (unable to translate) +--- +--- EPSG 5310 : None +--- +-- (unable to translate) +--- +--- EPSG 5311 : None +--- +-- (unable to translate) +--- +--- EPSG 5316 : None +--- +-- (unable to translate) +--- +--- EPSG 5320 : None +--- +-- (unable to translate) +--- +--- EPSG 5321 : None +--- +-- (unable to translate) +--- +--- EPSG 5325 : None +--- +-- (unable to translate) +--- +--- EPSG 5329 : None +--- +-- (unable to translate) +--- +--- EPSG 5330 : None +--- +-- (unable to translate) +--- +--- EPSG 5331 : None +--- +-- (unable to translate) +--- +--- EPSG 5337 : None +--- +-- (unable to translate) +--- +--- EPSG 5343 : None +--- +-- (unable to translate) +--- +--- EPSG 5344 : None +--- +-- (unable to translate) +--- +--- EPSG 5345 : None +--- +-- (unable to translate) +--- +--- EPSG 5346 : None +--- +-- (unable to translate) +--- +--- EPSG 5347 : None +--- +-- (unable to translate) +--- +--- EPSG 5348 : None +--- +-- (unable to translate) +--- +--- EPSG 5349 : None +--- +-- (unable to translate) +--- +--- EPSG 5355 : None +--- +-- (unable to translate) +--- +--- EPSG 5356 : None +--- +-- (unable to translate) +--- +--- EPSG 5357 : None +--- +-- (unable to translate) +--- +--- EPSG 5361 : None +--- +-- (unable to translate) +--- +--- EPSG 5362 : None +--- +-- (unable to translate) +--- +--- EPSG 5367 : None +--- +-- (unable to translate) +--- +--- EPSG 5382 : None +--- +-- (unable to translate) +--- +--- EPSG 5383 : None +--- +-- (unable to translate) +--- +--- EPSG 5387 : None +--- +-- (unable to translate) +--- +--- EPSG 5388 : None +--- +-- (unable to translate) +--- +--- EPSG 5389 : None +--- +-- (unable to translate) +--- +--- EPSG 5396 : None +--- +-- (unable to translate) +--- +--- EPSG 5456 : None +--- +-- (unable to translate) +--- +--- EPSG 5457 : None +--- +-- (unable to translate) +--- +--- EPSG 5458 : None +--- +-- (unable to translate) +--- +--- EPSG 5459 : None +--- +-- (unable to translate) +--- +--- EPSG 5460 : None +--- +-- (unable to translate) +--- +--- EPSG 5461 : None +--- +-- (unable to translate) +--- +--- EPSG 5462 : None +--- +-- (unable to translate) +--- +--- EPSG 5463 : None +--- +-- (unable to translate) +--- +--- EPSG 5466 : None +--- +-- (unable to translate) +--- +--- EPSG 5469 : None +--- +-- (unable to translate) +--- +--- EPSG 5472 : None +--- +-- (unable to translate) +--- +--- EPSG 5479 : None +--- +-- (unable to translate) +--- +--- EPSG 5480 : None +--- +-- (unable to translate) +--- +--- EPSG 5481 : None +--- +-- (unable to translate) +--- +--- EPSG 5482 : None +--- +-- (unable to translate) +--- +--- EPSG 5490 : None +--- +-- (unable to translate) +--- +--- EPSG 5513 : None +--- +-- (unable to translate) +--- +--- EPSG 5514 : None +--- +-- (unable to translate) +--- +--- EPSG 5515 : None +--- +-- (unable to translate) +--- +--- EPSG 5516 : None +--- +-- (unable to translate) +--- +--- EPSG 5518 : None +--- +-- (unable to translate) +--- +--- EPSG 5519 : None +--- +-- (unable to translate) +--- +--- EPSG 5520 : None +--- +-- (unable to translate) +--- +--- EPSG 5523 : None +--- +-- (unable to translate) +--- +--- EPSG 5530 : None +--- +-- (unable to translate) +--- +--- EPSG 5531 : None +--- +-- (unable to translate) +--- +--- EPSG 5532 : None +--- +-- (unable to translate) +--- +--- EPSG 5533 : None +--- +-- (unable to translate) +--- +--- EPSG 5534 : None +--- +-- (unable to translate) +--- +--- EPSG 5535 : None +--- +-- (unable to translate) +--- +--- EPSG 5536 : None +--- +-- (unable to translate) +--- +--- EPSG 5537 : None +--- +-- (unable to translate) +--- +--- EPSG 5538 : None +--- +-- (unable to translate) +--- +--- EPSG 5539 : None +--- +-- (unable to translate) +--- +--- EPSG 5550 : None +--- +-- (unable to translate) +--- +--- EPSG 5551 : None +--- +-- (unable to translate) +--- +--- EPSG 5552 : None +--- +-- (unable to translate) +--- +--- EPSG 5559 : None +--- +-- (unable to translate) +--- --- EPSG 5819 : EPSG topocentric example A --- -- (unable to translate) @@ -9274,839 +10986,839 @@ --- --- EPSG 20004 : Pulkovo 1995 / Gauss-Kruger zone 4 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20004,'EPSG',20004,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 4",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",4500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20004"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=4500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20004,'EPSG',20004,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 4",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",4500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20004"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=4500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20005 : Pulkovo 1995 / Gauss-Kruger zone 5 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20005,'EPSG',20005,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 5",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",1],PARAMETER["false_easting",5500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20005"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=5500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20005,'EPSG',20005,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 5",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",1],PARAMETER["false_easting",5500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20005"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=5500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20006 : Pulkovo 1995 / Gauss-Kruger zone 6 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20006,'EPSG',20006,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 6",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",1],PARAMETER["false_easting",6500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20006"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=6500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20006,'EPSG',20006,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 6",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",1],PARAMETER["false_easting",6500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20006"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=6500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20007 : Pulkovo 1995 / Gauss-Kruger zone 7 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20007,'EPSG',20007,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 7",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",1],PARAMETER["false_easting",7500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20007"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=7500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20007,'EPSG',20007,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 7",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",1],PARAMETER["false_easting",7500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20007"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=7500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20008 : Pulkovo 1995 / Gauss-Kruger zone 8 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20008,'EPSG',20008,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 8",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",1],PARAMETER["false_easting",8500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20008"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=8500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20008,'EPSG',20008,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 8",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",1],PARAMETER["false_easting",8500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20008"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=8500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20009 : Pulkovo 1995 / Gauss-Kruger zone 9 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20009,'EPSG',20009,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 9",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",1],PARAMETER["false_easting",9500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20009"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=9500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20009,'EPSG',20009,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 9",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",1],PARAMETER["false_easting",9500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20009"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=9500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20010 : Pulkovo 1995 / Gauss-Kruger zone 10 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20010,'EPSG',20010,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 10",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",1],PARAMETER["false_easting",10500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20010"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=10500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20010,'EPSG',20010,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 10",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",1],PARAMETER["false_easting",10500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20010"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=10500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20011 : Pulkovo 1995 / Gauss-Kruger zone 11 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20011,'EPSG',20011,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 11",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",63],PARAMETER["scale_factor",1],PARAMETER["false_easting",11500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20011"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=11500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20011,'EPSG',20011,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 11",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",63],PARAMETER["scale_factor",1],PARAMETER["false_easting",11500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20011"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=11500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20012 : Pulkovo 1995 / Gauss-Kruger zone 12 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20012,'EPSG',20012,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 12",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",69],PARAMETER["scale_factor",1],PARAMETER["false_easting",12500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20012"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=12500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20012,'EPSG',20012,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 12",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",69],PARAMETER["scale_factor",1],PARAMETER["false_easting",12500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20012"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=12500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20013 : Pulkovo 1995 / Gauss-Kruger zone 13 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20013,'EPSG',20013,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 13",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",13500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20013"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=13500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20013,'EPSG',20013,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 13",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",13500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20013"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=13500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20014 : Pulkovo 1995 / Gauss-Kruger zone 14 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20014,'EPSG',20014,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 14",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",14500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20014"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=14500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20014,'EPSG',20014,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 14",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",14500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20014"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=14500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20015 : Pulkovo 1995 / Gauss-Kruger zone 15 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20015,'EPSG',20015,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 15",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",15500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20015"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=15500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20015,'EPSG',20015,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 15",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",15500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20015"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=15500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20016 : Pulkovo 1995 / Gauss-Kruger zone 16 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20016,'EPSG',20016,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 16",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",16500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20016"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=16500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20016,'EPSG',20016,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 16",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",16500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20016"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=16500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20017 : Pulkovo 1995 / Gauss-Kruger zone 17 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20017,'EPSG',20017,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 17",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",17500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20017"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=17500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20017,'EPSG',20017,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 17",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",17500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20017"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=17500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20018 : Pulkovo 1995 / Gauss-Kruger zone 18 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20018,'EPSG',20018,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 18",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",18500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20018"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=18500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20018,'EPSG',20018,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 18",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",18500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20018"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=18500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20019 : Pulkovo 1995 / Gauss-Kruger zone 19 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20019,'EPSG',20019,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 19",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",19500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20019"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=19500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20019,'EPSG',20019,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 19",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",19500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20019"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=19500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20020 : Pulkovo 1995 / Gauss-Kruger zone 20 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20020,'EPSG',20020,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 20",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",20500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20020"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=20500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20020,'EPSG',20020,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 20",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",20500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20020"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=20500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20021 : Pulkovo 1995 / Gauss-Kruger zone 21 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20021,'EPSG',20021,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 21",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",21500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20021"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=21500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20021,'EPSG',20021,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 21",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",21500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20021"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=21500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20022 : Pulkovo 1995 / Gauss-Kruger zone 22 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20022,'EPSG',20022,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 22",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",22500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20022"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=22500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20022,'EPSG',20022,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 22",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",22500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20022"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=22500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20023 : Pulkovo 1995 / Gauss-Kruger zone 23 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20023,'EPSG',20023,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 23",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",23500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20023"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=23500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20023,'EPSG',20023,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 23",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",23500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20023"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=23500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20024 : Pulkovo 1995 / Gauss-Kruger zone 24 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20024,'EPSG',20024,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 24",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",1],PARAMETER["false_easting",24500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20024"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=24500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20024,'EPSG',20024,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 24",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",1],PARAMETER["false_easting",24500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20024"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=24500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20025 : Pulkovo 1995 / Gauss-Kruger zone 25 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20025,'EPSG',20025,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 25",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",147],PARAMETER["scale_factor",1],PARAMETER["false_easting",25500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20025"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=25500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20025,'EPSG',20025,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 25",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",147],PARAMETER["scale_factor",1],PARAMETER["false_easting",25500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20025"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=25500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20026 : Pulkovo 1995 / Gauss-Kruger zone 26 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20026,'EPSG',20026,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 26",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",153],PARAMETER["scale_factor",1],PARAMETER["false_easting",26500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20026"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=26500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20026,'EPSG',20026,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 26",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",153],PARAMETER["scale_factor",1],PARAMETER["false_easting",26500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20026"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=26500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20027 : Pulkovo 1995 / Gauss-Kruger zone 27 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20027,'EPSG',20027,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 27",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",159],PARAMETER["scale_factor",1],PARAMETER["false_easting",27500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20027"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=27500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20027,'EPSG',20027,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 27",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",159],PARAMETER["scale_factor",1],PARAMETER["false_easting",27500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20027"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=27500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20028 : Pulkovo 1995 / Gauss-Kruger zone 28 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20028,'EPSG',20028,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 28",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",1],PARAMETER["false_easting",28500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20028"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=28500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20028,'EPSG',20028,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 28",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",1],PARAMETER["false_easting",28500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20028"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=28500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20029 : Pulkovo 1995 / Gauss-Kruger zone 29 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20029,'EPSG',20029,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 29",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",1],PARAMETER["false_easting",29500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20029"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=29500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20029,'EPSG',20029,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 29",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",1],PARAMETER["false_easting",29500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20029"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=29500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20030 : Pulkovo 1995 / Gauss-Kruger zone 30 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20030,'EPSG',20030,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 30",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",1],PARAMETER["false_easting",30500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20030"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=30500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20030,'EPSG',20030,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 30",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",1],PARAMETER["false_easting",30500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20030"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=30500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20031 : Pulkovo 1995 / Gauss-Kruger zone 31 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20031,'EPSG',20031,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 31",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-177],PARAMETER["scale_factor",1],PARAMETER["false_easting",31500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20031"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=31500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20031,'EPSG',20031,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 31",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-177],PARAMETER["scale_factor",1],PARAMETER["false_easting",31500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20031"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=31500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20032 : Pulkovo 1995 / Gauss-Kruger zone 32 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20032,'EPSG',20032,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 32",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-171],PARAMETER["scale_factor",1],PARAMETER["false_easting",32500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20032"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=32500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20032,'EPSG',20032,'PROJCS["Pulkovo 1995 / Gauss-Kruger zone 32",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-171],PARAMETER["scale_factor",1],PARAMETER["false_easting",32500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20032"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=32500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20064 : Pulkovo 1995 / Gauss-Kruger 4N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20064,'EPSG',20064,'PROJCS["Pulkovo 1995 / Gauss-Kruger 4N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20064"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20064,'EPSG',20064,'PROJCS["Pulkovo 1995 / Gauss-Kruger 4N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20064"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20065 : Pulkovo 1995 / Gauss-Kruger 5N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20065,'EPSG',20065,'PROJCS["Pulkovo 1995 / Gauss-Kruger 5N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20065"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20065,'EPSG',20065,'PROJCS["Pulkovo 1995 / Gauss-Kruger 5N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20065"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20066 : Pulkovo 1995 / Gauss-Kruger 6N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20066,'EPSG',20066,'PROJCS["Pulkovo 1995 / Gauss-Kruger 6N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20066"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20066,'EPSG',20066,'PROJCS["Pulkovo 1995 / Gauss-Kruger 6N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20066"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20067 : Pulkovo 1995 / Gauss-Kruger 7N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20067,'EPSG',20067,'PROJCS["Pulkovo 1995 / Gauss-Kruger 7N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20067"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20067,'EPSG',20067,'PROJCS["Pulkovo 1995 / Gauss-Kruger 7N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20067"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20068 : Pulkovo 1995 / Gauss-Kruger 8N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20068,'EPSG',20068,'PROJCS["Pulkovo 1995 / Gauss-Kruger 8N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20068"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20068,'EPSG',20068,'PROJCS["Pulkovo 1995 / Gauss-Kruger 8N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20068"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20069 : Pulkovo 1995 / Gauss-Kruger 9N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20069,'EPSG',20069,'PROJCS["Pulkovo 1995 / Gauss-Kruger 9N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20069"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20069,'EPSG',20069,'PROJCS["Pulkovo 1995 / Gauss-Kruger 9N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20069"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20070 : Pulkovo 1995 / Gauss-Kruger 10N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20070,'EPSG',20070,'PROJCS["Pulkovo 1995 / Gauss-Kruger 10N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20070"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20070,'EPSG',20070,'PROJCS["Pulkovo 1995 / Gauss-Kruger 10N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20070"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20071 : Pulkovo 1995 / Gauss-Kruger 11N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20071,'EPSG',20071,'PROJCS["Pulkovo 1995 / Gauss-Kruger 11N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",63],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20071"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20071,'EPSG',20071,'PROJCS["Pulkovo 1995 / Gauss-Kruger 11N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",63],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20071"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20072 : Pulkovo 1995 / Gauss-Kruger 12N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20072,'EPSG',20072,'PROJCS["Pulkovo 1995 / Gauss-Kruger 12N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",69],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20072"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20072,'EPSG',20072,'PROJCS["Pulkovo 1995 / Gauss-Kruger 12N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",69],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20072"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20073 : Pulkovo 1995 / Gauss-Kruger 13N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20073,'EPSG',20073,'PROJCS["Pulkovo 1995 / Gauss-Kruger 13N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20073"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20073,'EPSG',20073,'PROJCS["Pulkovo 1995 / Gauss-Kruger 13N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20073"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20074 : Pulkovo 1995 / Gauss-Kruger 14N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20074,'EPSG',20074,'PROJCS["Pulkovo 1995 / Gauss-Kruger 14N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20074"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20074,'EPSG',20074,'PROJCS["Pulkovo 1995 / Gauss-Kruger 14N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20074"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20075 : Pulkovo 1995 / Gauss-Kruger 15N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20075,'EPSG',20075,'PROJCS["Pulkovo 1995 / Gauss-Kruger 15N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20075"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20075,'EPSG',20075,'PROJCS["Pulkovo 1995 / Gauss-Kruger 15N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20075"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20076 : Pulkovo 1995 / Gauss-Kruger 16N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20076,'EPSG',20076,'PROJCS["Pulkovo 1995 / Gauss-Kruger 16N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20076"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20076,'EPSG',20076,'PROJCS["Pulkovo 1995 / Gauss-Kruger 16N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20076"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20077 : Pulkovo 1995 / Gauss-Kruger 17N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20077,'EPSG',20077,'PROJCS["Pulkovo 1995 / Gauss-Kruger 17N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20077"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20077,'EPSG',20077,'PROJCS["Pulkovo 1995 / Gauss-Kruger 17N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20077"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20078 : Pulkovo 1995 / Gauss-Kruger 18N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20078,'EPSG',20078,'PROJCS["Pulkovo 1995 / Gauss-Kruger 18N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20078"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20078,'EPSG',20078,'PROJCS["Pulkovo 1995 / Gauss-Kruger 18N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20078"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20079 : Pulkovo 1995 / Gauss-Kruger 19N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20079,'EPSG',20079,'PROJCS["Pulkovo 1995 / Gauss-Kruger 19N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20079"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20079,'EPSG',20079,'PROJCS["Pulkovo 1995 / Gauss-Kruger 19N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20079"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20080 : Pulkovo 1995 / Gauss-Kruger 20N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20080,'EPSG',20080,'PROJCS["Pulkovo 1995 / Gauss-Kruger 20N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20080"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20080,'EPSG',20080,'PROJCS["Pulkovo 1995 / Gauss-Kruger 20N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20080"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20081 : Pulkovo 1995 / Gauss-Kruger 21N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20081,'EPSG',20081,'PROJCS["Pulkovo 1995 / Gauss-Kruger 21N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20081"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20081,'EPSG',20081,'PROJCS["Pulkovo 1995 / Gauss-Kruger 21N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20081"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20082 : Pulkovo 1995 / Gauss-Kruger 22N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20082,'EPSG',20082,'PROJCS["Pulkovo 1995 / Gauss-Kruger 22N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20082"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20082,'EPSG',20082,'PROJCS["Pulkovo 1995 / Gauss-Kruger 22N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20082"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20083 : Pulkovo 1995 / Gauss-Kruger 23N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20083,'EPSG',20083,'PROJCS["Pulkovo 1995 / Gauss-Kruger 23N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20083"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20083,'EPSG',20083,'PROJCS["Pulkovo 1995 / Gauss-Kruger 23N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20083"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20084 : Pulkovo 1995 / Gauss-Kruger 24N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20084,'EPSG',20084,'PROJCS["Pulkovo 1995 / Gauss-Kruger 24N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20084"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20084,'EPSG',20084,'PROJCS["Pulkovo 1995 / Gauss-Kruger 24N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20084"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20085 : Pulkovo 1995 / Gauss-Kruger 25N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20085,'EPSG',20085,'PROJCS["Pulkovo 1995 / Gauss-Kruger 25N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",147],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20085"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20085,'EPSG',20085,'PROJCS["Pulkovo 1995 / Gauss-Kruger 25N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",147],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20085"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20086 : Pulkovo 1995 / Gauss-Kruger 26N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20086,'EPSG',20086,'PROJCS["Pulkovo 1995 / Gauss-Kruger 26N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",153],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20086"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20086,'EPSG',20086,'PROJCS["Pulkovo 1995 / Gauss-Kruger 26N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",153],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20086"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20087 : Pulkovo 1995 / Gauss-Kruger 27N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20087,'EPSG',20087,'PROJCS["Pulkovo 1995 / Gauss-Kruger 27N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",159],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20087"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20087,'EPSG',20087,'PROJCS["Pulkovo 1995 / Gauss-Kruger 27N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",159],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20087"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20088 : Pulkovo 1995 / Gauss-Kruger 28N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20088,'EPSG',20088,'PROJCS["Pulkovo 1995 / Gauss-Kruger 28N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20088"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20088,'EPSG',20088,'PROJCS["Pulkovo 1995 / Gauss-Kruger 28N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20088"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20089 : Pulkovo 1995 / Gauss-Kruger 29N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20089,'EPSG',20089,'PROJCS["Pulkovo 1995 / Gauss-Kruger 29N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20089"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20089,'EPSG',20089,'PROJCS["Pulkovo 1995 / Gauss-Kruger 29N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20089"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20090 : Pulkovo 1995 / Gauss-Kruger 30N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20090,'EPSG',20090,'PROJCS["Pulkovo 1995 / Gauss-Kruger 30N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20090"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20090,'EPSG',20090,'PROJCS["Pulkovo 1995 / Gauss-Kruger 30N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20090"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20091 : Pulkovo 1995 / Gauss-Kruger 31N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20091,'EPSG',20091,'PROJCS["Pulkovo 1995 / Gauss-Kruger 31N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-177],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20091"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20091,'EPSG',20091,'PROJCS["Pulkovo 1995 / Gauss-Kruger 31N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-177],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20091"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20092 : Pulkovo 1995 / Gauss-Kruger 32N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20092,'EPSG',20092,'PROJCS["Pulkovo 1995 / Gauss-Kruger 32N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-171],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20092"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20092,'EPSG',20092,'PROJCS["Pulkovo 1995 / Gauss-Kruger 32N (deprecated)",GEOGCS["Pulkovo 1995",DATUM["Pulkovo_1995",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[24.82,-131.21,-82.66,-0,-0,0.16,-0.12],AUTHORITY["EPSG","6200"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4200"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-171],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20092"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=24.82,-131.21,-82.66,-0,-0,0.16,-0.12 +units=m +no_defs '); --- --- EPSG 20135 : Adindan / UTM zone 35N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20135,'EPSG',20135,'PROJCS["Adindan / UTM zone 35N",GEOGCS["Adindan",DATUM["Adindan",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6201"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4201"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20135"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=35 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20135,'EPSG',20135,'PROJCS["Adindan / UTM zone 35N",GEOGCS["Adindan",DATUM["Adindan",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-166,-15,204,0,0,0,0],AUTHORITY["EPSG","6201"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4201"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20135"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=35 +ellps=clrk80 +towgs84=-166,-15,204,0,0,0,0 +units=m +no_defs '); --- --- EPSG 20136 : Adindan / UTM zone 36N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20136,'EPSG',20136,'PROJCS["Adindan / UTM zone 36N",GEOGCS["Adindan",DATUM["Adindan",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6201"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4201"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20136"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=36 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20136,'EPSG',20136,'PROJCS["Adindan / UTM zone 36N",GEOGCS["Adindan",DATUM["Adindan",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-166,-15,204,0,0,0,0],AUTHORITY["EPSG","6201"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4201"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20136"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=36 +ellps=clrk80 +towgs84=-166,-15,204,0,0,0,0 +units=m +no_defs '); --- --- EPSG 20137 : Adindan / UTM zone 37N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20137,'EPSG',20137,'PROJCS["Adindan / UTM zone 37N",GEOGCS["Adindan",DATUM["Adindan",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6201"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4201"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20137"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=37 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20137,'EPSG',20137,'PROJCS["Adindan / UTM zone 37N",GEOGCS["Adindan",DATUM["Adindan",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-166,-15,204,0,0,0,0],AUTHORITY["EPSG","6201"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4201"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20137"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=37 +ellps=clrk80 +towgs84=-166,-15,204,0,0,0,0 +units=m +no_defs '); --- --- EPSG 20138 : Adindan / UTM zone 38N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20138,'EPSG',20138,'PROJCS["Adindan / UTM zone 38N",GEOGCS["Adindan",DATUM["Adindan",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6201"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4201"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20138"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20138,'EPSG',20138,'PROJCS["Adindan / UTM zone 38N",GEOGCS["Adindan",DATUM["Adindan",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-166,-15,204,0,0,0,0],AUTHORITY["EPSG","6201"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4201"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20138"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +ellps=clrk80 +towgs84=-166,-15,204,0,0,0,0 +units=m +no_defs '); --- --- EPSG 20248 : AGD66 / AMG zone 48 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20248,'EPSG',20248,'PROJCS["AGD66 / AMG zone 48",GEOGCS["AGD66",DATUM["Australian_Geodetic_Datum_1966",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],AUTHORITY["EPSG","6202"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4202"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20248"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=48 +south +ellps=aust_SA +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20248,'EPSG',20248,'PROJCS["AGD66 / AMG zone 48",GEOGCS["AGD66",DATUM["Australian_Geodetic_Datum_1966",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],TOWGS84[-117.808,-51.536,137.784,0.303,0.446,0.234,-0.29],AUTHORITY["EPSG","6202"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4202"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20248"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=48 +south +ellps=aust_SA +towgs84=-117.808,-51.536,137.784,0.303,0.446,0.234,-0.29 +units=m +no_defs '); --- --- EPSG 20249 : AGD66 / AMG zone 49 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20249,'EPSG',20249,'PROJCS["AGD66 / AMG zone 49",GEOGCS["AGD66",DATUM["Australian_Geodetic_Datum_1966",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],AUTHORITY["EPSG","6202"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4202"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20249"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=49 +south +ellps=aust_SA +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20249,'EPSG',20249,'PROJCS["AGD66 / AMG zone 49",GEOGCS["AGD66",DATUM["Australian_Geodetic_Datum_1966",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],TOWGS84[-117.808,-51.536,137.784,0.303,0.446,0.234,-0.29],AUTHORITY["EPSG","6202"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4202"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20249"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=49 +south +ellps=aust_SA +towgs84=-117.808,-51.536,137.784,0.303,0.446,0.234,-0.29 +units=m +no_defs '); --- --- EPSG 20250 : AGD66 / AMG zone 50 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20250,'EPSG',20250,'PROJCS["AGD66 / AMG zone 50",GEOGCS["AGD66",DATUM["Australian_Geodetic_Datum_1966",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],AUTHORITY["EPSG","6202"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4202"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20250"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=50 +south +ellps=aust_SA +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20250,'EPSG',20250,'PROJCS["AGD66 / AMG zone 50",GEOGCS["AGD66",DATUM["Australian_Geodetic_Datum_1966",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],TOWGS84[-117.808,-51.536,137.784,0.303,0.446,0.234,-0.29],AUTHORITY["EPSG","6202"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4202"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20250"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=50 +south +ellps=aust_SA +towgs84=-117.808,-51.536,137.784,0.303,0.446,0.234,-0.29 +units=m +no_defs '); --- --- EPSG 20251 : AGD66 / AMG zone 51 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20251,'EPSG',20251,'PROJCS["AGD66 / AMG zone 51",GEOGCS["AGD66",DATUM["Australian_Geodetic_Datum_1966",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],AUTHORITY["EPSG","6202"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4202"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20251"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=51 +south +ellps=aust_SA +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20251,'EPSG',20251,'PROJCS["AGD66 / AMG zone 51",GEOGCS["AGD66",DATUM["Australian_Geodetic_Datum_1966",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],TOWGS84[-117.808,-51.536,137.784,0.303,0.446,0.234,-0.29],AUTHORITY["EPSG","6202"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4202"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20251"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=51 +south +ellps=aust_SA +towgs84=-117.808,-51.536,137.784,0.303,0.446,0.234,-0.29 +units=m +no_defs '); --- --- EPSG 20252 : AGD66 / AMG zone 52 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20252,'EPSG',20252,'PROJCS["AGD66 / AMG zone 52",GEOGCS["AGD66",DATUM["Australian_Geodetic_Datum_1966",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],AUTHORITY["EPSG","6202"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4202"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20252"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=52 +south +ellps=aust_SA +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20252,'EPSG',20252,'PROJCS["AGD66 / AMG zone 52",GEOGCS["AGD66",DATUM["Australian_Geodetic_Datum_1966",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],TOWGS84[-117.808,-51.536,137.784,0.303,0.446,0.234,-0.29],AUTHORITY["EPSG","6202"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4202"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20252"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=52 +south +ellps=aust_SA +towgs84=-117.808,-51.536,137.784,0.303,0.446,0.234,-0.29 +units=m +no_defs '); --- --- EPSG 20253 : AGD66 / AMG zone 53 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20253,'EPSG',20253,'PROJCS["AGD66 / AMG zone 53",GEOGCS["AGD66",DATUM["Australian_Geodetic_Datum_1966",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],AUTHORITY["EPSG","6202"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4202"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20253"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=53 +south +ellps=aust_SA +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20253,'EPSG',20253,'PROJCS["AGD66 / AMG zone 53",GEOGCS["AGD66",DATUM["Australian_Geodetic_Datum_1966",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],TOWGS84[-117.808,-51.536,137.784,0.303,0.446,0.234,-0.29],AUTHORITY["EPSG","6202"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4202"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20253"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=53 +south +ellps=aust_SA +towgs84=-117.808,-51.536,137.784,0.303,0.446,0.234,-0.29 +units=m +no_defs '); --- --- EPSG 20254 : AGD66 / AMG zone 54 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20254,'EPSG',20254,'PROJCS["AGD66 / AMG zone 54",GEOGCS["AGD66",DATUM["Australian_Geodetic_Datum_1966",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],AUTHORITY["EPSG","6202"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4202"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20254"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=54 +south +ellps=aust_SA +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20254,'EPSG',20254,'PROJCS["AGD66 / AMG zone 54",GEOGCS["AGD66",DATUM["Australian_Geodetic_Datum_1966",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],TOWGS84[-117.808,-51.536,137.784,0.303,0.446,0.234,-0.29],AUTHORITY["EPSG","6202"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4202"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20254"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=54 +south +ellps=aust_SA +towgs84=-117.808,-51.536,137.784,0.303,0.446,0.234,-0.29 +units=m +no_defs '); --- --- EPSG 20255 : AGD66 / AMG zone 55 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20255,'EPSG',20255,'PROJCS["AGD66 / AMG zone 55",GEOGCS["AGD66",DATUM["Australian_Geodetic_Datum_1966",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],AUTHORITY["EPSG","6202"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4202"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20255"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=55 +south +ellps=aust_SA +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20255,'EPSG',20255,'PROJCS["AGD66 / AMG zone 55",GEOGCS["AGD66",DATUM["Australian_Geodetic_Datum_1966",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],TOWGS84[-117.808,-51.536,137.784,0.303,0.446,0.234,-0.29],AUTHORITY["EPSG","6202"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4202"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20255"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=55 +south +ellps=aust_SA +towgs84=-117.808,-51.536,137.784,0.303,0.446,0.234,-0.29 +units=m +no_defs '); --- --- EPSG 20256 : AGD66 / AMG zone 56 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20256,'EPSG',20256,'PROJCS["AGD66 / AMG zone 56",GEOGCS["AGD66",DATUM["Australian_Geodetic_Datum_1966",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],AUTHORITY["EPSG","6202"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4202"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20256"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=56 +south +ellps=aust_SA +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20256,'EPSG',20256,'PROJCS["AGD66 / AMG zone 56",GEOGCS["AGD66",DATUM["Australian_Geodetic_Datum_1966",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],TOWGS84[-117.808,-51.536,137.784,0.303,0.446,0.234,-0.29],AUTHORITY["EPSG","6202"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4202"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20256"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=56 +south +ellps=aust_SA +towgs84=-117.808,-51.536,137.784,0.303,0.446,0.234,-0.29 +units=m +no_defs '); --- --- EPSG 20257 : AGD66 / AMG zone 57 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20257,'EPSG',20257,'PROJCS["AGD66 / AMG zone 57",GEOGCS["AGD66",DATUM["Australian_Geodetic_Datum_1966",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],AUTHORITY["EPSG","6202"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4202"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",159],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20257"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=57 +south +ellps=aust_SA +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20257,'EPSG',20257,'PROJCS["AGD66 / AMG zone 57",GEOGCS["AGD66",DATUM["Australian_Geodetic_Datum_1966",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],TOWGS84[-117.808,-51.536,137.784,0.303,0.446,0.234,-0.29],AUTHORITY["EPSG","6202"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4202"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",159],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20257"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=57 +south +ellps=aust_SA +towgs84=-117.808,-51.536,137.784,0.303,0.446,0.234,-0.29 +units=m +no_defs '); --- --- EPSG 20258 : AGD66 / AMG zone 58 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20258,'EPSG',20258,'PROJCS["AGD66 / AMG zone 58",GEOGCS["AGD66",DATUM["Australian_Geodetic_Datum_1966",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],AUTHORITY["EPSG","6202"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4202"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20258"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=58 +south +ellps=aust_SA +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20258,'EPSG',20258,'PROJCS["AGD66 / AMG zone 58",GEOGCS["AGD66",DATUM["Australian_Geodetic_Datum_1966",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],TOWGS84[-117.808,-51.536,137.784,0.303,0.446,0.234,-0.29],AUTHORITY["EPSG","6202"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4202"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20258"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=58 +south +ellps=aust_SA +towgs84=-117.808,-51.536,137.784,0.303,0.446,0.234,-0.29 +units=m +no_defs '); --- --- EPSG 20348 : AGD84 / AMG zone 48 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20348,'EPSG',20348,'PROJCS["AGD84 / AMG zone 48",GEOGCS["AGD84",DATUM["Australian_Geodetic_Datum_1984",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],AUTHORITY["EPSG","6203"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4203"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20348"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=48 +south +ellps=aust_SA +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20348,'EPSG',20348,'PROJCS["AGD84 / AMG zone 48",GEOGCS["AGD84",DATUM["Australian_Geodetic_Datum_1984",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],TOWGS84[-134,-48,149,0,0,0,0],AUTHORITY["EPSG","6203"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4203"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20348"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=48 +south +ellps=aust_SA +towgs84=-134,-48,149,0,0,0,0 +units=m +no_defs '); --- --- EPSG 20349 : AGD84 / AMG zone 49 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20349,'EPSG',20349,'PROJCS["AGD84 / AMG zone 49",GEOGCS["AGD84",DATUM["Australian_Geodetic_Datum_1984",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],AUTHORITY["EPSG","6203"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4203"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20349"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=49 +south +ellps=aust_SA +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20349,'EPSG',20349,'PROJCS["AGD84 / AMG zone 49",GEOGCS["AGD84",DATUM["Australian_Geodetic_Datum_1984",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],TOWGS84[-134,-48,149,0,0,0,0],AUTHORITY["EPSG","6203"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4203"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20349"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=49 +south +ellps=aust_SA +towgs84=-134,-48,149,0,0,0,0 +units=m +no_defs '); --- --- EPSG 20350 : AGD84 / AMG zone 50 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20350,'EPSG',20350,'PROJCS["AGD84 / AMG zone 50",GEOGCS["AGD84",DATUM["Australian_Geodetic_Datum_1984",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],AUTHORITY["EPSG","6203"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4203"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20350"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=50 +south +ellps=aust_SA +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20350,'EPSG',20350,'PROJCS["AGD84 / AMG zone 50",GEOGCS["AGD84",DATUM["Australian_Geodetic_Datum_1984",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],TOWGS84[-134,-48,149,0,0,0,0],AUTHORITY["EPSG","6203"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4203"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20350"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=50 +south +ellps=aust_SA +towgs84=-134,-48,149,0,0,0,0 +units=m +no_defs '); --- --- EPSG 20351 : AGD84 / AMG zone 51 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20351,'EPSG',20351,'PROJCS["AGD84 / AMG zone 51",GEOGCS["AGD84",DATUM["Australian_Geodetic_Datum_1984",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],AUTHORITY["EPSG","6203"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4203"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20351"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=51 +south +ellps=aust_SA +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20351,'EPSG',20351,'PROJCS["AGD84 / AMG zone 51",GEOGCS["AGD84",DATUM["Australian_Geodetic_Datum_1984",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],TOWGS84[-134,-48,149,0,0,0,0],AUTHORITY["EPSG","6203"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4203"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20351"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=51 +south +ellps=aust_SA +towgs84=-134,-48,149,0,0,0,0 +units=m +no_defs '); --- --- EPSG 20352 : AGD84 / AMG zone 52 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20352,'EPSG',20352,'PROJCS["AGD84 / AMG zone 52",GEOGCS["AGD84",DATUM["Australian_Geodetic_Datum_1984",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],AUTHORITY["EPSG","6203"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4203"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20352"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=52 +south +ellps=aust_SA +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20352,'EPSG',20352,'PROJCS["AGD84 / AMG zone 52",GEOGCS["AGD84",DATUM["Australian_Geodetic_Datum_1984",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],TOWGS84[-134,-48,149,0,0,0,0],AUTHORITY["EPSG","6203"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4203"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20352"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=52 +south +ellps=aust_SA +towgs84=-134,-48,149,0,0,0,0 +units=m +no_defs '); --- --- EPSG 20353 : AGD84 / AMG zone 53 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20353,'EPSG',20353,'PROJCS["AGD84 / AMG zone 53",GEOGCS["AGD84",DATUM["Australian_Geodetic_Datum_1984",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],AUTHORITY["EPSG","6203"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4203"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20353"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=53 +south +ellps=aust_SA +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20353,'EPSG',20353,'PROJCS["AGD84 / AMG zone 53",GEOGCS["AGD84",DATUM["Australian_Geodetic_Datum_1984",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],TOWGS84[-134,-48,149,0,0,0,0],AUTHORITY["EPSG","6203"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4203"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20353"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=53 +south +ellps=aust_SA +towgs84=-134,-48,149,0,0,0,0 +units=m +no_defs '); --- --- EPSG 20354 : AGD84 / AMG zone 54 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20354,'EPSG',20354,'PROJCS["AGD84 / AMG zone 54",GEOGCS["AGD84",DATUM["Australian_Geodetic_Datum_1984",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],AUTHORITY["EPSG","6203"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4203"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20354"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=54 +south +ellps=aust_SA +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20354,'EPSG',20354,'PROJCS["AGD84 / AMG zone 54",GEOGCS["AGD84",DATUM["Australian_Geodetic_Datum_1984",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],TOWGS84[-134,-48,149,0,0,0,0],AUTHORITY["EPSG","6203"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4203"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20354"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=54 +south +ellps=aust_SA +towgs84=-134,-48,149,0,0,0,0 +units=m +no_defs '); --- --- EPSG 20355 : AGD84 / AMG zone 55 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20355,'EPSG',20355,'PROJCS["AGD84 / AMG zone 55",GEOGCS["AGD84",DATUM["Australian_Geodetic_Datum_1984",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],AUTHORITY["EPSG","6203"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4203"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20355"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=55 +south +ellps=aust_SA +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20355,'EPSG',20355,'PROJCS["AGD84 / AMG zone 55",GEOGCS["AGD84",DATUM["Australian_Geodetic_Datum_1984",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],TOWGS84[-134,-48,149,0,0,0,0],AUTHORITY["EPSG","6203"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4203"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20355"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=55 +south +ellps=aust_SA +towgs84=-134,-48,149,0,0,0,0 +units=m +no_defs '); --- --- EPSG 20356 : AGD84 / AMG zone 56 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20356,'EPSG',20356,'PROJCS["AGD84 / AMG zone 56",GEOGCS["AGD84",DATUM["Australian_Geodetic_Datum_1984",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],AUTHORITY["EPSG","6203"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4203"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20356"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=56 +south +ellps=aust_SA +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20356,'EPSG',20356,'PROJCS["AGD84 / AMG zone 56",GEOGCS["AGD84",DATUM["Australian_Geodetic_Datum_1984",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],TOWGS84[-134,-48,149,0,0,0,0],AUTHORITY["EPSG","6203"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4203"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20356"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=56 +south +ellps=aust_SA +towgs84=-134,-48,149,0,0,0,0 +units=m +no_defs '); --- --- EPSG 20357 : AGD84 / AMG zone 57 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20357,'EPSG',20357,'PROJCS["AGD84 / AMG zone 57",GEOGCS["AGD84",DATUM["Australian_Geodetic_Datum_1984",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],AUTHORITY["EPSG","6203"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4203"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",159],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20357"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=57 +south +ellps=aust_SA +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20357,'EPSG',20357,'PROJCS["AGD84 / AMG zone 57",GEOGCS["AGD84",DATUM["Australian_Geodetic_Datum_1984",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],TOWGS84[-134,-48,149,0,0,0,0],AUTHORITY["EPSG","6203"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4203"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",159],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20357"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=57 +south +ellps=aust_SA +towgs84=-134,-48,149,0,0,0,0 +units=m +no_defs '); --- --- EPSG 20358 : AGD84 / AMG zone 58 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20358,'EPSG',20358,'PROJCS["AGD84 / AMG zone 58",GEOGCS["AGD84",DATUM["Australian_Geodetic_Datum_1984",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],AUTHORITY["EPSG","6203"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4203"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20358"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=58 +south +ellps=aust_SA +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20358,'EPSG',20358,'PROJCS["AGD84 / AMG zone 58",GEOGCS["AGD84",DATUM["Australian_Geodetic_Datum_1984",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],TOWGS84[-134,-48,149,0,0,0,0],AUTHORITY["EPSG","6203"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4203"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20358"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=58 +south +ellps=aust_SA +towgs84=-134,-48,149,0,0,0,0 +units=m +no_defs '); --- --- EPSG 20436 : Ain el Abd / UTM zone 36N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20436,'EPSG',20436,'PROJCS["Ain el Abd / UTM zone 36N",GEOGCS["Ain el Abd",DATUM["Ain_el_Abd_1970",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6204"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4204"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20436"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=36 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20436,'EPSG',20436,'PROJCS["Ain el Abd / UTM zone 36N",GEOGCS["Ain el Abd",DATUM["Ain_el_Abd_1970",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-143,-236,7,0,0,0,0],AUTHORITY["EPSG","6204"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4204"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20436"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=36 +ellps=intl +towgs84=-143,-236,7,0,0,0,0 +units=m +no_defs '); --- --- EPSG 20437 : Ain el Abd / UTM zone 37N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20437,'EPSG',20437,'PROJCS["Ain el Abd / UTM zone 37N",GEOGCS["Ain el Abd",DATUM["Ain_el_Abd_1970",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6204"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4204"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20437"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=37 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20437,'EPSG',20437,'PROJCS["Ain el Abd / UTM zone 37N",GEOGCS["Ain el Abd",DATUM["Ain_el_Abd_1970",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-143,-236,7,0,0,0,0],AUTHORITY["EPSG","6204"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4204"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20437"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=37 +ellps=intl +towgs84=-143,-236,7,0,0,0,0 +units=m +no_defs '); --- --- EPSG 20438 : Ain el Abd / UTM zone 38N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20438,'EPSG',20438,'PROJCS["Ain el Abd / UTM zone 38N",GEOGCS["Ain el Abd",DATUM["Ain_el_Abd_1970",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6204"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4204"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20438"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20438,'EPSG',20438,'PROJCS["Ain el Abd / UTM zone 38N",GEOGCS["Ain el Abd",DATUM["Ain_el_Abd_1970",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-143,-236,7,0,0,0,0],AUTHORITY["EPSG","6204"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4204"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20438"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +ellps=intl +towgs84=-143,-236,7,0,0,0,0 +units=m +no_defs '); --- --- EPSG 20439 : Ain el Abd / UTM zone 39N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20439,'EPSG',20439,'PROJCS["Ain el Abd / UTM zone 39N",GEOGCS["Ain el Abd",DATUM["Ain_el_Abd_1970",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6204"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4204"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20439"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=39 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20439,'EPSG',20439,'PROJCS["Ain el Abd / UTM zone 39N",GEOGCS["Ain el Abd",DATUM["Ain_el_Abd_1970",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-143,-236,7,0,0,0,0],AUTHORITY["EPSG","6204"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4204"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20439"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=39 +ellps=intl +towgs84=-143,-236,7,0,0,0,0 +units=m +no_defs '); --- --- EPSG 20440 : Ain el Abd / UTM zone 40N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20440,'EPSG',20440,'PROJCS["Ain el Abd / UTM zone 40N",GEOGCS["Ain el Abd",DATUM["Ain_el_Abd_1970",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6204"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4204"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20440"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=40 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20440,'EPSG',20440,'PROJCS["Ain el Abd / UTM zone 40N",GEOGCS["Ain el Abd",DATUM["Ain_el_Abd_1970",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-143,-236,7,0,0,0,0],AUTHORITY["EPSG","6204"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4204"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20440"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=40 +ellps=intl +towgs84=-143,-236,7,0,0,0,0 +units=m +no_defs '); --- --- EPSG 20499 : Ain el Abd / Bahrain Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20499,'EPSG',20499,'PROJCS["Ain el Abd / Bahrain Grid",GEOGCS["Ain el Abd",DATUM["Ain_el_Abd_1970",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6204"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4204"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20499"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=39 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20499,'EPSG',20499,'PROJCS["Ain el Abd / Bahrain Grid",GEOGCS["Ain el Abd",DATUM["Ain_el_Abd_1970",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-143,-236,7,0,0,0,0],AUTHORITY["EPSG","6204"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4204"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20499"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=39 +ellps=intl +towgs84=-143,-236,7,0,0,0,0 +units=m +no_defs '); --- --- EPSG 20538 : Afgooye / UTM zone 38N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20538,'EPSG',20538,'PROJCS["Afgooye / UTM zone 38N",GEOGCS["Afgooye",DATUM["Afgooye",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[-43,-163,45,0,0,0,0],AUTHORITY["EPSG","6205"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4205"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20538"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +ellps=krass +towgs84=-43,-163,45,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20538,'EPSG',20538,'PROJCS["Afgooye / UTM zone 38N",GEOGCS["Afgooye",DATUM["Afgooye",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[-43,-163,45,0,0,0,0],AUTHORITY["EPSG","6205"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4205"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20538"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +ellps=krass +towgs84=-43,-163,45,0,0,0,0 +units=m +no_defs '); --- --- EPSG 20539 : Afgooye / UTM zone 39N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20539,'EPSG',20539,'PROJCS["Afgooye / UTM zone 39N",GEOGCS["Afgooye",DATUM["Afgooye",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[-43,-163,45,0,0,0,0],AUTHORITY["EPSG","6205"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4205"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20539"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=39 +ellps=krass +towgs84=-43,-163,45,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20539,'EPSG',20539,'PROJCS["Afgooye / UTM zone 39N",GEOGCS["Afgooye",DATUM["Afgooye",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[-43,-163,45,0,0,0,0],AUTHORITY["EPSG","6205"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4205"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","20539"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=39 +ellps=krass +towgs84=-43,-163,45,0,0,0,0 +units=m +no_defs '); --- --- EPSG 20790 : Lisbon (Lisbon) / Portuguese National Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20790,'EPSG',20790,'PROJCS["Lisbon (Lisbon) / Portuguese National Grid",GEOGCS["Lisbon (Lisbon)",DATUM["Lisbon_1937_Lisbon",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6803"]],PRIMEM["Lisbon",-9.131906111111112,AUTHORITY["EPSG","8902"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4803"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",39.66666666666666],PARAMETER["central_meridian",1],PARAMETER["scale_factor",1],PARAMETER["false_easting",200000],PARAMETER["false_northing",300000],AUTHORITY["EPSG","20790"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=39.66666666666666 +lon_0=1 +k=1 +x_0=200000 +y_0=300000 +ellps=intl +pm=lisbon +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20790,'EPSG',20790,'PROJCS["Lisbon (Lisbon) / Portuguese National Grid",GEOGCS["Lisbon (Lisbon)",DATUM["Lisbon_1937_Lisbon",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-304.046,-60.576,103.64,0,0,0,0],AUTHORITY["EPSG","6803"]],PRIMEM["Lisbon",-9.131906111111112,AUTHORITY["EPSG","8902"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4803"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",39.66666666666666],PARAMETER["central_meridian",1],PARAMETER["scale_factor",1],PARAMETER["false_easting",200000],PARAMETER["false_northing",300000],AUTHORITY["EPSG","20790"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=39.66666666666666 +lon_0=1 +k=1 +x_0=200000 +y_0=300000 +ellps=intl +towgs84=-304.046,-60.576,103.64,0,0,0,0 +pm=lisbon +units=m +no_defs '); --- --- EPSG 20791 : Lisbon (Lisbon) / Portuguese Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20791,'EPSG',20791,'PROJCS["Lisbon (Lisbon) / Portuguese Grid",GEOGCS["Lisbon (Lisbon)",DATUM["Lisbon_1937_Lisbon",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6803"]],PRIMEM["Lisbon",-9.131906111111112,AUTHORITY["EPSG","8902"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4803"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",39.66666666666666],PARAMETER["central_meridian",1],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","20791"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=39.66666666666666 +lon_0=1 +k=1 +x_0=0 +y_0=0 +ellps=intl +pm=lisbon +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20791,'EPSG',20791,'PROJCS["Lisbon (Lisbon) / Portuguese Grid",GEOGCS["Lisbon (Lisbon)",DATUM["Lisbon_1937_Lisbon",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-304.046,-60.576,103.64,0,0,0,0],AUTHORITY["EPSG","6803"]],PRIMEM["Lisbon",-9.131906111111112,AUTHORITY["EPSG","8902"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4803"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",39.66666666666666],PARAMETER["central_meridian",1],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","20791"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=39.66666666666666 +lon_0=1 +k=1 +x_0=0 +y_0=0 +ellps=intl +towgs84=-304.046,-60.576,103.64,0,0,0,0 +pm=lisbon +units=m +no_defs '); --- --- EPSG 20822 : Aratu / UTM zone 22S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20822,'EPSG',20822,'PROJCS["Aratu / UTM zone 22S",GEOGCS["Aratu",DATUM["Aratu",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6208"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4208"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20822"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +south +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20822,'EPSG',20822,'PROJCS["Aratu / UTM zone 22S",GEOGCS["Aratu",DATUM["Aratu",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-161,308,-142,0,0,0,0],AUTHORITY["EPSG","6208"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4208"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20822"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +south +ellps=intl +towgs84=-161,308,-142,0,0,0,0 +units=m +no_defs '); --- --- EPSG 20823 : Aratu / UTM zone 23S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20823,'EPSG',20823,'PROJCS["Aratu / UTM zone 23S",GEOGCS["Aratu",DATUM["Aratu",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6208"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4208"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20823"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=23 +south +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20823,'EPSG',20823,'PROJCS["Aratu / UTM zone 23S",GEOGCS["Aratu",DATUM["Aratu",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-161,308,-142,0,0,0,0],AUTHORITY["EPSG","6208"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4208"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20823"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=23 +south +ellps=intl +towgs84=-161,308,-142,0,0,0,0 +units=m +no_defs '); --- --- EPSG 20824 : Aratu / UTM zone 24S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20824,'EPSG',20824,'PROJCS["Aratu / UTM zone 24S",GEOGCS["Aratu",DATUM["Aratu",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6208"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4208"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20824"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=24 +south +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20824,'EPSG',20824,'PROJCS["Aratu / UTM zone 24S",GEOGCS["Aratu",DATUM["Aratu",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-161,308,-142,0,0,0,0],AUTHORITY["EPSG","6208"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4208"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20824"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=24 +south +ellps=intl +towgs84=-161,308,-142,0,0,0,0 +units=m +no_defs '); --- --- EPSG 20934 : Arc 1950 / UTM zone 34S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20934,'EPSG',20934,'PROJCS["Arc 1950 / UTM zone 34S",GEOGCS["Arc 1950",DATUM["Arc_1950",SPHEROID["Clarke 1880 (Arc)",6378249.145,293.4663077,AUTHORITY["EPSG","7013"]],AUTHORITY["EPSG","6209"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4209"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20934"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=34 +south +a=6378249.145 +b=6356514.966398753 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20934,'EPSG',20934,'PROJCS["Arc 1950 / UTM zone 34S",GEOGCS["Arc 1950",DATUM["Arc_1950",SPHEROID["Clarke 1880 (Arc)",6378249.145,293.4663077,AUTHORITY["EPSG","7013"]],TOWGS84[-143,-90,-294,0,0,0,0],AUTHORITY["EPSG","6209"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4209"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20934"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=34 +south +a=6378249.145 +b=6356514.966398753 +towgs84=-143,-90,-294,0,0,0,0 +units=m +no_defs '); --- --- EPSG 20935 : Arc 1950 / UTM zone 35S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20935,'EPSG',20935,'PROJCS["Arc 1950 / UTM zone 35S",GEOGCS["Arc 1950",DATUM["Arc_1950",SPHEROID["Clarke 1880 (Arc)",6378249.145,293.4663077,AUTHORITY["EPSG","7013"]],AUTHORITY["EPSG","6209"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4209"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20935"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=35 +south +a=6378249.145 +b=6356514.966398753 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20935,'EPSG',20935,'PROJCS["Arc 1950 / UTM zone 35S",GEOGCS["Arc 1950",DATUM["Arc_1950",SPHEROID["Clarke 1880 (Arc)",6378249.145,293.4663077,AUTHORITY["EPSG","7013"]],TOWGS84[-143,-90,-294,0,0,0,0],AUTHORITY["EPSG","6209"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4209"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20935"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=35 +south +a=6378249.145 +b=6356514.966398753 +towgs84=-143,-90,-294,0,0,0,0 +units=m +no_defs '); --- --- EPSG 20936 : Arc 1950 / UTM zone 36S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20936,'EPSG',20936,'PROJCS["Arc 1950 / UTM zone 36S",GEOGCS["Arc 1950",DATUM["Arc_1950",SPHEROID["Clarke 1880 (Arc)",6378249.145,293.4663077,AUTHORITY["EPSG","7013"]],AUTHORITY["EPSG","6209"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4209"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20936"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=36 +south +a=6378249.145 +b=6356514.966398753 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (20936,'EPSG',20936,'PROJCS["Arc 1950 / UTM zone 36S",GEOGCS["Arc 1950",DATUM["Arc_1950",SPHEROID["Clarke 1880 (Arc)",6378249.145,293.4663077,AUTHORITY["EPSG","7013"]],TOWGS84[-143,-90,-294,0,0,0,0],AUTHORITY["EPSG","6209"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4209"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","20936"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=36 +south +a=6378249.145 +b=6356514.966398753 +towgs84=-143,-90,-294,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21035 : Arc 1960 / UTM zone 35S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21035,'EPSG',21035,'PROJCS["Arc 1960 / UTM zone 35S",GEOGCS["Arc 1960",DATUM["Arc_1960",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6210"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4210"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","21035"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=35 +south +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21035,'EPSG',21035,'PROJCS["Arc 1960 / UTM zone 35S",GEOGCS["Arc 1960",DATUM["Arc_1960",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-160,-6,-302,0,0,0,0],AUTHORITY["EPSG","6210"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4210"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","21035"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=35 +south +ellps=clrk80 +towgs84=-160,-6,-302,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21036 : Arc 1960 / UTM zone 36S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21036,'EPSG',21036,'PROJCS["Arc 1960 / UTM zone 36S",GEOGCS["Arc 1960",DATUM["Arc_1960",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6210"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4210"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","21036"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=36 +south +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21036,'EPSG',21036,'PROJCS["Arc 1960 / UTM zone 36S",GEOGCS["Arc 1960",DATUM["Arc_1960",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-160,-6,-302,0,0,0,0],AUTHORITY["EPSG","6210"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4210"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","21036"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=36 +south +ellps=clrk80 +towgs84=-160,-6,-302,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21037 : Arc 1960 / UTM zone 37S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21037,'EPSG',21037,'PROJCS["Arc 1960 / UTM zone 37S",GEOGCS["Arc 1960",DATUM["Arc_1960",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6210"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4210"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","21037"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=37 +south +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21037,'EPSG',21037,'PROJCS["Arc 1960 / UTM zone 37S",GEOGCS["Arc 1960",DATUM["Arc_1960",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-160,-6,-302,0,0,0,0],AUTHORITY["EPSG","6210"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4210"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","21037"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=37 +south +ellps=clrk80 +towgs84=-160,-6,-302,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21095 : Arc 1960 / UTM zone 35N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21095,'EPSG',21095,'PROJCS["Arc 1960 / UTM zone 35N",GEOGCS["Arc 1960",DATUM["Arc_1960",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6210"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4210"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21095"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=35 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21095,'EPSG',21095,'PROJCS["Arc 1960 / UTM zone 35N",GEOGCS["Arc 1960",DATUM["Arc_1960",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-160,-6,-302,0,0,0,0],AUTHORITY["EPSG","6210"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4210"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21095"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=35 +ellps=clrk80 +towgs84=-160,-6,-302,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21096 : Arc 1960 / UTM zone 36N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21096,'EPSG',21096,'PROJCS["Arc 1960 / UTM zone 36N",GEOGCS["Arc 1960",DATUM["Arc_1960",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6210"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4210"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21096"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=36 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21096,'EPSG',21096,'PROJCS["Arc 1960 / UTM zone 36N",GEOGCS["Arc 1960",DATUM["Arc_1960",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-160,-6,-302,0,0,0,0],AUTHORITY["EPSG","6210"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4210"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21096"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=36 +ellps=clrk80 +towgs84=-160,-6,-302,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21097 : Arc 1960 / UTM zone 37N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21097,'EPSG',21097,'PROJCS["Arc 1960 / UTM zone 37N",GEOGCS["Arc 1960",DATUM["Arc_1960",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6210"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4210"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21097"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=37 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21097,'EPSG',21097,'PROJCS["Arc 1960 / UTM zone 37N",GEOGCS["Arc 1960",DATUM["Arc_1960",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-160,-6,-302,0,0,0,0],AUTHORITY["EPSG","6210"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4210"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21097"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=37 +ellps=clrk80 +towgs84=-160,-6,-302,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21100 : Batavia (Jakarta) / NEIEZ (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21100,'EPSG',21100,'PROJCS["Batavia (Jakarta) / NEIEZ (deprecated)",GEOGCS["Batavia (Jakarta)",DATUM["Batavia_Jakarta",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6813"]],PRIMEM["Jakarta",106.8077194444444,AUTHORITY["EPSG","8908"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4813"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",110],PARAMETER["scale_factor",0.997],PARAMETER["false_easting",3900000],PARAMETER["false_northing",900000],AUTHORITY["EPSG","21100"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=merc +lon_0=110 +k=0.997 +x_0=3900000 +y_0=900000 +ellps=bessel +pm=jakarta +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21100,'EPSG',21100,'PROJCS["Batavia (Jakarta) / NEIEZ (deprecated)",GEOGCS["Batavia (Jakarta)",DATUM["Batavia_Jakarta",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-377,681,-50,0,0,0,0],AUTHORITY["EPSG","6813"]],PRIMEM["Jakarta",106.8077194444444,AUTHORITY["EPSG","8908"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4813"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",110],PARAMETER["scale_factor",0.997],PARAMETER["false_easting",3900000],PARAMETER["false_northing",900000],AUTHORITY["EPSG","21100"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=merc +lon_0=110 +k=0.997 +x_0=3900000 +y_0=900000 +ellps=bessel +towgs84=-377,681,-50,0,0,0,0 +pm=jakarta +units=m +no_defs '); --- --- EPSG 21148 : Batavia / UTM zone 48S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21148,'EPSG',21148,'PROJCS["Batavia / UTM zone 48S",GEOGCS["Batavia",DATUM["Batavia",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6211"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4211"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","21148"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=48 +south +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21148,'EPSG',21148,'PROJCS["Batavia / UTM zone 48S",GEOGCS["Batavia",DATUM["Batavia",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-377,681,-50,0,0,0,0],AUTHORITY["EPSG","6211"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4211"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","21148"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=48 +south +ellps=bessel +towgs84=-377,681,-50,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21149 : Batavia / UTM zone 49S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21149,'EPSG',21149,'PROJCS["Batavia / UTM zone 49S",GEOGCS["Batavia",DATUM["Batavia",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6211"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4211"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","21149"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=49 +south +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21149,'EPSG',21149,'PROJCS["Batavia / UTM zone 49S",GEOGCS["Batavia",DATUM["Batavia",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-377,681,-50,0,0,0,0],AUTHORITY["EPSG","6211"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4211"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","21149"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=49 +south +ellps=bessel +towgs84=-377,681,-50,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21150 : Batavia / UTM zone 50S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21150,'EPSG',21150,'PROJCS["Batavia / UTM zone 50S",GEOGCS["Batavia",DATUM["Batavia",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6211"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4211"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","21150"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=50 +south +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21150,'EPSG',21150,'PROJCS["Batavia / UTM zone 50S",GEOGCS["Batavia",DATUM["Batavia",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-377,681,-50,0,0,0,0],AUTHORITY["EPSG","6211"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4211"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","21150"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=50 +south +ellps=bessel +towgs84=-377,681,-50,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21291 : Barbados 1938 / British West Indies Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21291,'EPSG',21291,'PROJCS["Barbados 1938 / British West Indies Grid",GEOGCS["Barbados 1938",DATUM["Barbados_1938",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[31.95,300.99,419.19,0,0,0,0],AUTHORITY["EPSG","6212"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4212"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-62],PARAMETER["scale_factor",0.9995],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21291"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001 +x_0=400000 +y_0=0 +ellps=clrk80 +towgs84=31.95,300.99,419.19,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21291,'EPSG',21291,'PROJCS["Barbados 1938 / British West Indies Grid",GEOGCS["Barbados 1938",DATUM["Barbados_1938",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[31.95,300.99,419.19,0,0,0,0],AUTHORITY["EPSG","6212"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4212"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-62],PARAMETER["scale_factor",0.9995],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21291"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001 +x_0=400000 +y_0=0 +ellps=clrk80 +towgs84=31.95,300.99,419.19,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21292 : Barbados 1938 / Barbados National Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21292,'EPSG',21292,'PROJCS["Barbados 1938 / Barbados National Grid",GEOGCS["Barbados 1938",DATUM["Barbados_1938",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[31.95,300.99,419.19,0,0,0,0],AUTHORITY["EPSG","6212"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4212"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",13.17638888888889],PARAMETER["central_meridian",-59.55972222222222],PARAMETER["scale_factor",0.9999986],PARAMETER["false_easting",30000],PARAMETER["false_northing",75000],AUTHORITY["EPSG","21292"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=13.17638888888889 +lon_0=-59.55972222222222 +k=0.9999986 +x_0=30000 +y_0=75000 +ellps=clrk80 +towgs84=31.95,300.99,419.19,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21292,'EPSG',21292,'PROJCS["Barbados 1938 / Barbados National Grid",GEOGCS["Barbados 1938",DATUM["Barbados_1938",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[31.95,300.99,419.19,0,0,0,0],AUTHORITY["EPSG","6212"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4212"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",13.17638888888889],PARAMETER["central_meridian",-59.55972222222222],PARAMETER["scale_factor",0.9999986],PARAMETER["false_easting",30000],PARAMETER["false_northing",75000],AUTHORITY["EPSG","21292"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=13.17638888888889 +lon_0=-59.55972222222222 +k=0.9999986 +x_0=30000 +y_0=75000 +ellps=clrk80 +towgs84=31.95,300.99,419.19,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21413 : Beijing 1954 / Gauss-Kruger zone 13 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21413,'EPSG',21413,'PROJCS["Beijing 1954 / Gauss-Kruger zone 13",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",13500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21413"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=13500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21413,'EPSG',21413,'PROJCS["Beijing 1954 / Gauss-Kruger zone 13",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",13500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21413"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=13500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21414 : Beijing 1954 / Gauss-Kruger zone 14 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21414,'EPSG',21414,'PROJCS["Beijing 1954 / Gauss-Kruger zone 14",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",14500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21414"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=14500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21414,'EPSG',21414,'PROJCS["Beijing 1954 / Gauss-Kruger zone 14",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",14500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21414"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=14500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21415 : Beijing 1954 / Gauss-Kruger zone 15 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21415,'EPSG',21415,'PROJCS["Beijing 1954 / Gauss-Kruger zone 15",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",15500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21415"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=15500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21415,'EPSG',21415,'PROJCS["Beijing 1954 / Gauss-Kruger zone 15",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",15500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21415"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=15500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21416 : Beijing 1954 / Gauss-Kruger zone 16 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21416,'EPSG',21416,'PROJCS["Beijing 1954 / Gauss-Kruger zone 16",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",16500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21416"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=16500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21416,'EPSG',21416,'PROJCS["Beijing 1954 / Gauss-Kruger zone 16",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",16500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21416"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=16500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21417 : Beijing 1954 / Gauss-Kruger zone 17 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21417,'EPSG',21417,'PROJCS["Beijing 1954 / Gauss-Kruger zone 17",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",17500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21417"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=17500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21417,'EPSG',21417,'PROJCS["Beijing 1954 / Gauss-Kruger zone 17",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",17500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21417"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=17500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21418 : Beijing 1954 / Gauss-Kruger zone 18 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21418,'EPSG',21418,'PROJCS["Beijing 1954 / Gauss-Kruger zone 18",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",18500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21418"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=18500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21418,'EPSG',21418,'PROJCS["Beijing 1954 / Gauss-Kruger zone 18",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",18500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21418"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=18500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21419 : Beijing 1954 / Gauss-Kruger zone 19 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21419,'EPSG',21419,'PROJCS["Beijing 1954 / Gauss-Kruger zone 19",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",19500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21419"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=19500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21419,'EPSG',21419,'PROJCS["Beijing 1954 / Gauss-Kruger zone 19",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",19500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21419"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=19500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21420 : Beijing 1954 / Gauss-Kruger zone 20 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21420,'EPSG',21420,'PROJCS["Beijing 1954 / Gauss-Kruger zone 20",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",20500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21420"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=20500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21420,'EPSG',21420,'PROJCS["Beijing 1954 / Gauss-Kruger zone 20",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",20500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21420"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=20500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21421 : Beijing 1954 / Gauss-Kruger zone 21 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21421,'EPSG',21421,'PROJCS["Beijing 1954 / Gauss-Kruger zone 21",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",21500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21421"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=21500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21421,'EPSG',21421,'PROJCS["Beijing 1954 / Gauss-Kruger zone 21",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",21500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21421"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=21500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21422 : Beijing 1954 / Gauss-Kruger zone 22 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21422,'EPSG',21422,'PROJCS["Beijing 1954 / Gauss-Kruger zone 22",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",22500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21422"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=22500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21422,'EPSG',21422,'PROJCS["Beijing 1954 / Gauss-Kruger zone 22",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",22500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21422"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=22500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21423 : Beijing 1954 / Gauss-Kruger zone 23 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21423,'EPSG',21423,'PROJCS["Beijing 1954 / Gauss-Kruger zone 23",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",23500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21423"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=23500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21423,'EPSG',21423,'PROJCS["Beijing 1954 / Gauss-Kruger zone 23",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",23500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21423"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=23500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21453 : Beijing 1954 / Gauss-Kruger CM 75E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21453,'EPSG',21453,'PROJCS["Beijing 1954 / Gauss-Kruger CM 75E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21453"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21453,'EPSG',21453,'PROJCS["Beijing 1954 / Gauss-Kruger CM 75E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21453"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21454 : Beijing 1954 / Gauss-Kruger CM 81E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21454,'EPSG',21454,'PROJCS["Beijing 1954 / Gauss-Kruger CM 81E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21454"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21454,'EPSG',21454,'PROJCS["Beijing 1954 / Gauss-Kruger CM 81E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21454"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21455 : Beijing 1954 / Gauss-Kruger CM 87E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21455,'EPSG',21455,'PROJCS["Beijing 1954 / Gauss-Kruger CM 87E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21455"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21455,'EPSG',21455,'PROJCS["Beijing 1954 / Gauss-Kruger CM 87E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21455"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21456 : Beijing 1954 / Gauss-Kruger CM 93E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21456,'EPSG',21456,'PROJCS["Beijing 1954 / Gauss-Kruger CM 93E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21456"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21456,'EPSG',21456,'PROJCS["Beijing 1954 / Gauss-Kruger CM 93E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21456"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21457 : Beijing 1954 / Gauss-Kruger CM 99E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21457,'EPSG',21457,'PROJCS["Beijing 1954 / Gauss-Kruger CM 99E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21457"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21457,'EPSG',21457,'PROJCS["Beijing 1954 / Gauss-Kruger CM 99E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21457"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21458 : Beijing 1954 / Gauss-Kruger CM 105E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21458,'EPSG',21458,'PROJCS["Beijing 1954 / Gauss-Kruger CM 105E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21458"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21458,'EPSG',21458,'PROJCS["Beijing 1954 / Gauss-Kruger CM 105E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21458"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21459 : Beijing 1954 / Gauss-Kruger CM 111E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21459,'EPSG',21459,'PROJCS["Beijing 1954 / Gauss-Kruger CM 111E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21459"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21459,'EPSG',21459,'PROJCS["Beijing 1954 / Gauss-Kruger CM 111E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21459"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21460 : Beijing 1954 / Gauss-Kruger CM 117E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21460,'EPSG',21460,'PROJCS["Beijing 1954 / Gauss-Kruger CM 117E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21460"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21460,'EPSG',21460,'PROJCS["Beijing 1954 / Gauss-Kruger CM 117E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21460"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21461 : Beijing 1954 / Gauss-Kruger CM 123E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21461,'EPSG',21461,'PROJCS["Beijing 1954 / Gauss-Kruger CM 123E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21461"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21461,'EPSG',21461,'PROJCS["Beijing 1954 / Gauss-Kruger CM 123E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21461"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21462 : Beijing 1954 / Gauss-Kruger CM 129E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21462,'EPSG',21462,'PROJCS["Beijing 1954 / Gauss-Kruger CM 129E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21462"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21462,'EPSG',21462,'PROJCS["Beijing 1954 / Gauss-Kruger CM 129E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21462"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21463 : Beijing 1954 / Gauss-Kruger CM 135E --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21463,'EPSG',21463,'PROJCS["Beijing 1954 / Gauss-Kruger CM 135E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21463"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21463,'EPSG',21463,'PROJCS["Beijing 1954 / Gauss-Kruger CM 135E",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21463"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21473 : Beijing 1954 / Gauss-Kruger 13N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21473,'EPSG',21473,'PROJCS["Beijing 1954 / Gauss-Kruger 13N (deprecated)",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21473"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21473,'EPSG',21473,'PROJCS["Beijing 1954 / Gauss-Kruger 13N (deprecated)",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21473"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21474 : Beijing 1954 / Gauss-Kruger 14N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21474,'EPSG',21474,'PROJCS["Beijing 1954 / Gauss-Kruger 14N (deprecated)",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21474"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21474,'EPSG',21474,'PROJCS["Beijing 1954 / Gauss-Kruger 14N (deprecated)",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21474"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21475 : Beijing 1954 / Gauss-Kruger 15N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21475,'EPSG',21475,'PROJCS["Beijing 1954 / Gauss-Kruger 15N (deprecated)",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21475"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21475,'EPSG',21475,'PROJCS["Beijing 1954 / Gauss-Kruger 15N (deprecated)",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21475"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21476 : Beijing 1954 / Gauss-Kruger 16N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21476,'EPSG',21476,'PROJCS["Beijing 1954 / Gauss-Kruger 16N (deprecated)",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21476"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21476,'EPSG',21476,'PROJCS["Beijing 1954 / Gauss-Kruger 16N (deprecated)",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21476"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21477 : Beijing 1954 / Gauss-Kruger 17N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21477,'EPSG',21477,'PROJCS["Beijing 1954 / Gauss-Kruger 17N (deprecated)",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21477"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21477,'EPSG',21477,'PROJCS["Beijing 1954 / Gauss-Kruger 17N (deprecated)",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21477"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21478 : Beijing 1954 / Gauss-Kruger 18N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21478,'EPSG',21478,'PROJCS["Beijing 1954 / Gauss-Kruger 18N (deprecated)",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21478"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21478,'EPSG',21478,'PROJCS["Beijing 1954 / Gauss-Kruger 18N (deprecated)",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21478"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21479 : Beijing 1954 / Gauss-Kruger 19N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21479,'EPSG',21479,'PROJCS["Beijing 1954 / Gauss-Kruger 19N (deprecated)",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21479"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21479,'EPSG',21479,'PROJCS["Beijing 1954 / Gauss-Kruger 19N (deprecated)",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21479"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21480 : Beijing 1954 / Gauss-Kruger 20N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21480,'EPSG',21480,'PROJCS["Beijing 1954 / Gauss-Kruger 20N (deprecated)",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21480"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21480,'EPSG',21480,'PROJCS["Beijing 1954 / Gauss-Kruger 20N (deprecated)",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21480"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21481 : Beijing 1954 / Gauss-Kruger 21N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21481,'EPSG',21481,'PROJCS["Beijing 1954 / Gauss-Kruger 21N (deprecated)",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21481"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21481,'EPSG',21481,'PROJCS["Beijing 1954 / Gauss-Kruger 21N (deprecated)",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21481"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21482 : Beijing 1954 / Gauss-Kruger 22N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21482,'EPSG',21482,'PROJCS["Beijing 1954 / Gauss-Kruger 22N (deprecated)",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21482"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21482,'EPSG',21482,'PROJCS["Beijing 1954 / Gauss-Kruger 22N (deprecated)",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21482"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21483 : Beijing 1954 / Gauss-Kruger 23N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21483,'EPSG',21483,'PROJCS["Beijing 1954 / Gauss-Kruger 23N (deprecated)",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21483"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21483,'EPSG',21483,'PROJCS["Beijing 1954 / Gauss-Kruger 23N (deprecated)",GEOGCS["Beijing 1954",DATUM["Beijing_1954",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY["EPSG","6214"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4214"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21483"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21500 : Belge 1950 (Brussels) / Belge Lambert 50 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21500,'EPSG',21500,'PROJCS["Belge 1950 (Brussels) / Belge Lambert 50",GEOGCS["Belge 1950 (Brussels)",DATUM["Reseau_National_Belge_1950_Brussels",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6809"]],PRIMEM["Brussels",4.367975,AUTHORITY["EPSG","8910"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4809"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",49.83333333333334],PARAMETER["standard_parallel_2",51.16666666666666],PARAMETER["latitude_of_origin",90],PARAMETER["central_meridian",0],PARAMETER["false_easting",150000],PARAMETER["false_northing",5400000],AUTHORITY["EPSG","21500"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=49.83333333333334 +lat_2=51.16666666666666 +lat_0=90 +lon_0=0 +x_0=150000 +y_0=5400000 +ellps=intl +pm=brussels +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21500,'EPSG',21500,'PROJCS["Belge 1950 (Brussels) / Belge Lambert 50",GEOGCS["Belge 1950 (Brussels)",DATUM["Reseau_National_Belge_1950_Brussels",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6809"]],PRIMEM["Brussels",4.367975,AUTHORITY["EPSG","8910"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4809"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",49.83333333333334],PARAMETER["standard_parallel_2",51.16666666666666],PARAMETER["latitude_of_origin",90],PARAMETER["central_meridian",0],PARAMETER["false_easting",150000],PARAMETER["false_northing",5400000],AUTHORITY["EPSG","21500"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=49.83333333333334 +lat_2=51.16666666666666 +lat_0=90 +lon_0=0 +x_0=150000 +y_0=5400000 +ellps=intl +pm=brussels +units=m +no_defs '); --- --- EPSG 21780 : Bern 1898 (Bern) / LV03C --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21780,'EPSG',21780,'PROJCS["Bern 1898 (Bern) / LV03C",GEOGCS["Bern 1898 (Bern)",DATUM["CH1903_Bern",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6801"]],PRIMEM["Bern",7.439583333333333,AUTHORITY["EPSG","8907"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4801"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",46.95240555555556],PARAMETER["longitude_of_center",0],PARAMETER["azimuth",90],PARAMETER["rectified_grid_angle",90],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","21780"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=somerc +lat_0=46.95240555555556 +lon_0=0 +x_0=0 +y_0=0 +ellps=bessel +pm=bern +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21780,'EPSG',21780,'PROJCS["Bern 1898 (Bern) / LV03C",GEOGCS["Bern 1898 (Bern)",DATUM["CH1903_Bern",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[674.4,15.1,405.3,0,0,0,0],AUTHORITY["EPSG","6801"]],PRIMEM["Bern",7.439583333333333,AUTHORITY["EPSG","8907"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4801"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",46.95240555555556],PARAMETER["longitude_of_center",0],PARAMETER["azimuth",90],PARAMETER["rectified_grid_angle",90],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","21780"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=somerc +lat_0=46.95240555555556 +lon_0=0 +k_0=1 +x_0=0 +y_0=0 +ellps=bessel +towgs84=674.4,15.1,405.3,0,0,0,0 +pm=bern +units=m +no_defs '); --- --- EPSG 21781 : CH1903 / LV03 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21781,'EPSG',21781,'PROJCS["CH1903 / LV03",GEOGCS["CH1903",DATUM["CH1903",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[674.374,15.056,405.346,0,0,0,0],AUTHORITY["EPSG","6149"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4149"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",46.95240555555556],PARAMETER["longitude_of_center",7.439583333333333],PARAMETER["azimuth",90],PARAMETER["rectified_grid_angle",90],PARAMETER["scale_factor",1],PARAMETER["false_easting",600000],PARAMETER["false_northing",200000],AUTHORITY["EPSG","21781"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +x_0=600000 +y_0=200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21781,'EPSG',21781,'PROJCS["CH1903 / LV03",GEOGCS["CH1903",DATUM["CH1903",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[674.4,15.1,405.3,0,0,0,0],AUTHORITY["EPSG","6149"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4149"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",46.95240555555556],PARAMETER["longitude_of_center",7.439583333333333],PARAMETER["azimuth",90],PARAMETER["rectified_grid_angle",90],PARAMETER["scale_factor",1],PARAMETER["false_easting",600000],PARAMETER["false_northing",200000],AUTHORITY["EPSG","21781"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 +x_0=600000 +y_0=200000 +ellps=bessel +towgs84=674.4,15.1,405.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21782 : CH1903 / LV03C-G --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21782,'EPSG',21782,'PROJCS["CH1903 / LV03C-G",GEOGCS["CH1903",DATUM["CH1903",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[674.374,15.056,405.346,0,0,0,0],AUTHORITY["EPSG","6149"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4149"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",46.95240555555556],PARAMETER["longitude_of_center",7.439583333333333],PARAMETER["azimuth",90],PARAMETER["rectified_grid_angle",90],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","21782"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +x_0=0 +y_0=0 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21782,'EPSG',21782,'PROJCS["CH1903 / LV03C-G",GEOGCS["CH1903",DATUM["CH1903",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[674.4,15.1,405.3,0,0,0,0],AUTHORITY["EPSG","6149"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4149"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",46.95240555555556],PARAMETER["longitude_of_center",7.439583333333333],PARAMETER["azimuth",90],PARAMETER["rectified_grid_angle",90],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","21782"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 +x_0=0 +y_0=0 +ellps=bessel +towgs84=674.4,15.1,405.3,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21817 : Bogota 1975 / UTM zone 17N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21817,'EPSG',21817,'PROJCS["Bogota 1975 / UTM zone 17N (deprecated)",GEOGCS["Bogota 1975",DATUM["Bogota_1975",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[307,304,-318,0,0,0,0],AUTHORITY["EPSG","6218"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4218"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21817"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +ellps=intl +towgs84=307,304,-318,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21817,'EPSG',21817,'PROJCS["Bogota 1975 / UTM zone 17N (deprecated)",GEOGCS["Bogota 1975",DATUM["Bogota_1975",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[307,304,-318,0,0,0,0],AUTHORITY["EPSG","6218"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4218"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21817"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +ellps=intl +towgs84=307,304,-318,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21818 : Bogota 1975 / UTM zone 18N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21818,'EPSG',21818,'PROJCS["Bogota 1975 / UTM zone 18N",GEOGCS["Bogota 1975",DATUM["Bogota_1975",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[307,304,-318,0,0,0,0],AUTHORITY["EPSG","6218"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4218"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21818"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +ellps=intl +towgs84=307,304,-318,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21818,'EPSG',21818,'PROJCS["Bogota 1975 / UTM zone 18N",GEOGCS["Bogota 1975",DATUM["Bogota_1975",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[307,304,-318,0,0,0,0],AUTHORITY["EPSG","6218"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4218"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","21818"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +ellps=intl +towgs84=307,304,-318,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21891 : Bogota 1975 / Colombia West zone (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21891,'EPSG',21891,'PROJCS["Bogota 1975 / Colombia West zone (deprecated)",GEOGCS["Bogota 1975",DATUM["Bogota_1975",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[307,304,-318,0,0,0,0],AUTHORITY["EPSG","6218"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4218"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",4.599047222222222],PARAMETER["central_meridian",-77.08091666666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",1000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","21891"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=4.599047222222222 +lon_0=-77.08091666666667 +k=1 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs84=307,304,-318,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21891,'EPSG',21891,'PROJCS["Bogota 1975 / Colombia West zone (deprecated)",GEOGCS["Bogota 1975",DATUM["Bogota_1975",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[307,304,-318,0,0,0,0],AUTHORITY["EPSG","6218"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4218"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",4.599047222222222],PARAMETER["central_meridian",-77.08091666666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",1000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","21891"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=4.599047222222222 +lon_0=-77.08091666666667 +k=1 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs84=307,304,-318,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21892 : Bogota 1975 / Colombia Bogota zone (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21892,'EPSG',21892,'PROJCS["Bogota 1975 / Colombia Bogota zone (deprecated)",GEOGCS["Bogota 1975",DATUM["Bogota_1975",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[307,304,-318,0,0,0,0],AUTHORITY["EPSG","6218"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4218"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",4.599047222222222],PARAMETER["central_meridian",-74.08091666666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",1000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","21892"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=4.599047222222222 +lon_0=-74.08091666666667 +k=1 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs84=307,304,-318,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21892,'EPSG',21892,'PROJCS["Bogota 1975 / Colombia Bogota zone (deprecated)",GEOGCS["Bogota 1975",DATUM["Bogota_1975",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[307,304,-318,0,0,0,0],AUTHORITY["EPSG","6218"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4218"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",4.599047222222222],PARAMETER["central_meridian",-74.08091666666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",1000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","21892"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=4.599047222222222 +lon_0=-74.08091666666667 +k=1 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs84=307,304,-318,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21893 : Bogota 1975 / Colombia East Central zone (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21893,'EPSG',21893,'PROJCS["Bogota 1975 / Colombia East Central zone (deprecated)",GEOGCS["Bogota 1975",DATUM["Bogota_1975",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[307,304,-318,0,0,0,0],AUTHORITY["EPSG","6218"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4218"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",4.599047222222222],PARAMETER["central_meridian",-71.08091666666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",1000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","21893"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=4.599047222222222 +lon_0=-71.08091666666667 +k=1 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs84=307,304,-318,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21893,'EPSG',21893,'PROJCS["Bogota 1975 / Colombia East Central zone (deprecated)",GEOGCS["Bogota 1975",DATUM["Bogota_1975",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[307,304,-318,0,0,0,0],AUTHORITY["EPSG","6218"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4218"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",4.599047222222222],PARAMETER["central_meridian",-71.08091666666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",1000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","21893"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=4.599047222222222 +lon_0=-71.08091666666667 +k=1 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs84=307,304,-318,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21894 : Bogota 1975 / Colombia East (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21894,'EPSG',21894,'PROJCS["Bogota 1975 / Colombia East (deprecated)",GEOGCS["Bogota 1975",DATUM["Bogota_1975",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[307,304,-318,0,0,0,0],AUTHORITY["EPSG","6218"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4218"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",4.599047222222222],PARAMETER["central_meridian",-68.08091666666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",1000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","21894"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=4.599047222222222 +lon_0=-68.08091666666667 +k=1 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs84=307,304,-318,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21894,'EPSG',21894,'PROJCS["Bogota 1975 / Colombia East (deprecated)",GEOGCS["Bogota 1975",DATUM["Bogota_1975",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[307,304,-318,0,0,0,0],AUTHORITY["EPSG","6218"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4218"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",4.599047222222222],PARAMETER["central_meridian",-68.08091666666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",1000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","21894"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=4.599047222222222 +lon_0=-68.08091666666667 +k=1 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs84=307,304,-318,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21896 : Bogota 1975 / Colombia West zone --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21896,'EPSG',21896,'PROJCS["Bogota 1975 / Colombia West zone",GEOGCS["Bogota 1975",DATUM["Bogota_1975",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[307,304,-318,0,0,0,0],AUTHORITY["EPSG","6218"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4218"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",4.599047222222222],PARAMETER["central_meridian",-77.08091666666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",1000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","21896"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=4.599047222222222 +lon_0=-77.08091666666667 +k=1 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs84=307,304,-318,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21896,'EPSG',21896,'PROJCS["Bogota 1975 / Colombia West zone",GEOGCS["Bogota 1975",DATUM["Bogota_1975",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[307,304,-318,0,0,0,0],AUTHORITY["EPSG","6218"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4218"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",4.599047222222222],PARAMETER["central_meridian",-77.08091666666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",1000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","21896"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=4.599047222222222 +lon_0=-77.08091666666667 +k=1 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs84=307,304,-318,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21897 : Bogota 1975 / Colombia Bogota zone --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21897,'EPSG',21897,'PROJCS["Bogota 1975 / Colombia Bogota zone",GEOGCS["Bogota 1975",DATUM["Bogota_1975",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[307,304,-318,0,0,0,0],AUTHORITY["EPSG","6218"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4218"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",4.599047222222222],PARAMETER["central_meridian",-74.08091666666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",1000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","21897"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=4.599047222222222 +lon_0=-74.08091666666667 +k=1 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs84=307,304,-318,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21897,'EPSG',21897,'PROJCS["Bogota 1975 / Colombia Bogota zone",GEOGCS["Bogota 1975",DATUM["Bogota_1975",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[307,304,-318,0,0,0,0],AUTHORITY["EPSG","6218"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4218"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",4.599047222222222],PARAMETER["central_meridian",-74.08091666666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",1000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","21897"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=4.599047222222222 +lon_0=-74.08091666666667 +k=1 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs84=307,304,-318,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21898 : Bogota 1975 / Colombia East Central zone --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21898,'EPSG',21898,'PROJCS["Bogota 1975 / Colombia East Central zone",GEOGCS["Bogota 1975",DATUM["Bogota_1975",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[307,304,-318,0,0,0,0],AUTHORITY["EPSG","6218"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4218"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",4.599047222222222],PARAMETER["central_meridian",-71.08091666666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",1000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","21898"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=4.599047222222222 +lon_0=-71.08091666666667 +k=1 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs84=307,304,-318,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21898,'EPSG',21898,'PROJCS["Bogota 1975 / Colombia East Central zone",GEOGCS["Bogota 1975",DATUM["Bogota_1975",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[307,304,-318,0,0,0,0],AUTHORITY["EPSG","6218"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4218"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",4.599047222222222],PARAMETER["central_meridian",-71.08091666666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",1000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","21898"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=4.599047222222222 +lon_0=-71.08091666666667 +k=1 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs84=307,304,-318,0,0,0,0 +units=m +no_defs '); --- --- EPSG 21899 : Bogota 1975 / Colombia East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21899,'EPSG',21899,'PROJCS["Bogota 1975 / Colombia East",GEOGCS["Bogota 1975",DATUM["Bogota_1975",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[307,304,-318,0,0,0,0],AUTHORITY["EPSG","6218"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4218"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",4.599047222222222],PARAMETER["central_meridian",-68.08091666666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",1000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","21899"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=4.599047222222222 +lon_0=-68.08091666666667 +k=1 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs84=307,304,-318,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (21899,'EPSG',21899,'PROJCS["Bogota 1975 / Colombia East",GEOGCS["Bogota 1975",DATUM["Bogota_1975",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[307,304,-318,0,0,0,0],AUTHORITY["EPSG","6218"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4218"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",4.599047222222222],PARAMETER["central_meridian",-68.08091666666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",1000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","21899"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=4.599047222222222 +lon_0=-68.08091666666667 +k=1 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs84=307,304,-318,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22032 : Camacupa / UTM zone 32S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22032,'EPSG',22032,'PROJCS["Camacupa / UTM zone 32S",GEOGCS["Camacupa",DATUM["Camacupa",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6220"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4220"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","22032"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +south +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22032,'EPSG',22032,'PROJCS["Camacupa / UTM zone 32S",GEOGCS["Camacupa",DATUM["Camacupa",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-50.9,-347.6,-231,0,0,0,0],AUTHORITY["EPSG","6220"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4220"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","22032"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +south +ellps=clrk80 +towgs84=-50.9,-347.6,-231,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22033 : Camacupa / UTM zone 33S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22033,'EPSG',22033,'PROJCS["Camacupa / UTM zone 33S",GEOGCS["Camacupa",DATUM["Camacupa",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6220"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4220"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","22033"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=33 +south +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22033,'EPSG',22033,'PROJCS["Camacupa / UTM zone 33S",GEOGCS["Camacupa",DATUM["Camacupa",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-50.9,-347.6,-231,0,0,0,0],AUTHORITY["EPSG","6220"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4220"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","22033"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=33 +south +ellps=clrk80 +towgs84=-50.9,-347.6,-231,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22091 : Camacupa / TM 11.30 SE --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22091,'EPSG',22091,'PROJCS["Camacupa / TM 11.30 SE",GEOGCS["Camacupa",DATUM["Camacupa",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6220"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4220"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",11.5],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","22091"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=11.5 +k=0.9996 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22091,'EPSG',22091,'PROJCS["Camacupa / TM 11.30 SE",GEOGCS["Camacupa",DATUM["Camacupa",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-50.9,-347.6,-231,0,0,0,0],AUTHORITY["EPSG","6220"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4220"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",11.5],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","22091"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=11.5 +k=0.9996 +x_0=500000 +y_0=10000000 +ellps=clrk80 +towgs84=-50.9,-347.6,-231,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22092 : Camacupa / TM 12 SE --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22092,'EPSG',22092,'PROJCS["Camacupa / TM 12 SE",GEOGCS["Camacupa",DATUM["Camacupa",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6220"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4220"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",12],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","22092"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=12 +k=0.9996 +x_0=500000 +y_0=10000000 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22092,'EPSG',22092,'PROJCS["Camacupa / TM 12 SE",GEOGCS["Camacupa",DATUM["Camacupa",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-50.9,-347.6,-231,0,0,0,0],AUTHORITY["EPSG","6220"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4220"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",12],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","22092"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=12 +k=0.9996 +x_0=500000 +y_0=10000000 +ellps=clrk80 +towgs84=-50.9,-347.6,-231,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22171 : POSGAR 98 / Argentina 1 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22171,'EPSG',22171,'PROJCS["POSGAR 98 / Argentina 1",GEOGCS["POSGAR 98",DATUM["Posiciones_Geodesicas_Argentinas_1998",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6190"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4190"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-72],PARAMETER["scale_factor",1],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22171"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=-90 +lon_0=-72 +k=1 +x_0=1500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22171,'EPSG',22171,'PROJCS["POSGAR 98 / Argentina 1",GEOGCS["POSGAR 98",DATUM["Posiciones_Geodesicas_Argentinas_1998",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6190"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4190"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-72],PARAMETER["scale_factor",1],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22171"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=-90 +lon_0=-72 +k=1 +x_0=1500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22172 : POSGAR 98 / Argentina 2 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22172,'EPSG',22172,'PROJCS["POSGAR 98 / Argentina 2",GEOGCS["POSGAR 98",DATUM["Posiciones_Geodesicas_Argentinas_1998",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6190"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4190"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",1],PARAMETER["false_easting",2500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22172"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=-90 +lon_0=-69 +k=1 +x_0=2500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22172,'EPSG',22172,'PROJCS["POSGAR 98 / Argentina 2",GEOGCS["POSGAR 98",DATUM["Posiciones_Geodesicas_Argentinas_1998",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6190"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4190"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",1],PARAMETER["false_easting",2500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22172"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=-90 +lon_0=-69 +k=1 +x_0=2500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22173 : POSGAR 98 / Argentina 3 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22173,'EPSG',22173,'PROJCS["POSGAR 98 / Argentina 3",GEOGCS["POSGAR 98",DATUM["Posiciones_Geodesicas_Argentinas_1998",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6190"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4190"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-66],PARAMETER["scale_factor",1],PARAMETER["false_easting",3500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22173"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=-90 +lon_0=-66 +k=1 +x_0=3500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22173,'EPSG',22173,'PROJCS["POSGAR 98 / Argentina 3",GEOGCS["POSGAR 98",DATUM["Posiciones_Geodesicas_Argentinas_1998",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6190"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4190"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-66],PARAMETER["scale_factor",1],PARAMETER["false_easting",3500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22173"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=-90 +lon_0=-66 +k=1 +x_0=3500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22174 : POSGAR 98 / Argentina 4 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22174,'EPSG',22174,'PROJCS["POSGAR 98 / Argentina 4",GEOGCS["POSGAR 98",DATUM["Posiciones_Geodesicas_Argentinas_1998",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6190"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4190"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",1],PARAMETER["false_easting",4500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22174"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=-90 +lon_0=-63 +k=1 +x_0=4500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22174,'EPSG',22174,'PROJCS["POSGAR 98 / Argentina 4",GEOGCS["POSGAR 98",DATUM["Posiciones_Geodesicas_Argentinas_1998",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6190"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4190"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",1],PARAMETER["false_easting",4500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22174"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=-90 +lon_0=-63 +k=1 +x_0=4500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22175 : POSGAR 98 / Argentina 5 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22175,'EPSG',22175,'PROJCS["POSGAR 98 / Argentina 5",GEOGCS["POSGAR 98",DATUM["Posiciones_Geodesicas_Argentinas_1998",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6190"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4190"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-60],PARAMETER["scale_factor",1],PARAMETER["false_easting",5500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22175"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=-90 +lon_0=-60 +k=1 +x_0=5500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22175,'EPSG',22175,'PROJCS["POSGAR 98 / Argentina 5",GEOGCS["POSGAR 98",DATUM["Posiciones_Geodesicas_Argentinas_1998",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6190"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4190"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-60],PARAMETER["scale_factor",1],PARAMETER["false_easting",5500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22175"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=-90 +lon_0=-60 +k=1 +x_0=5500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22176 : POSGAR 98 / Argentina 6 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22176,'EPSG',22176,'PROJCS["POSGAR 98 / Argentina 6",GEOGCS["POSGAR 98",DATUM["Posiciones_Geodesicas_Argentinas_1998",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6190"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4190"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",1],PARAMETER["false_easting",6500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22176"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=-90 +lon_0=-57 +k=1 +x_0=6500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22176,'EPSG',22176,'PROJCS["POSGAR 98 / Argentina 6",GEOGCS["POSGAR 98",DATUM["Posiciones_Geodesicas_Argentinas_1998",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6190"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4190"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",1],PARAMETER["false_easting",6500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22176"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=-90 +lon_0=-57 +k=1 +x_0=6500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22177 : POSGAR 98 / Argentina 7 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22177,'EPSG',22177,'PROJCS["POSGAR 98 / Argentina 7",GEOGCS["POSGAR 98",DATUM["Posiciones_Geodesicas_Argentinas_1998",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6190"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4190"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-54],PARAMETER["scale_factor",1],PARAMETER["false_easting",7500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22177"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=-90 +lon_0=-54 +k=1 +x_0=7500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22177,'EPSG',22177,'PROJCS["POSGAR 98 / Argentina 7",GEOGCS["POSGAR 98",DATUM["Posiciones_Geodesicas_Argentinas_1998",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6190"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4190"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-54],PARAMETER["scale_factor",1],PARAMETER["false_easting",7500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22177"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=-90 +lon_0=-54 +k=1 +x_0=7500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22181 : POSGAR 94 / Argentina 1 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22181,'EPSG',22181,'PROJCS["POSGAR 94 / Argentina 1",GEOGCS["POSGAR 94",DATUM["Posiciones_Geodesicas_Argentinas_1994",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6694"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4694"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-72],PARAMETER["scale_factor",1],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22181"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=-90 +lon_0=-72 +k=1 +x_0=1500000 +y_0=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22181,'EPSG',22181,'PROJCS["POSGAR 94 / Argentina 1",GEOGCS["POSGAR 94",DATUM["Posiciones_Geodesicas_Argentinas_1994",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6694"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4694"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-72],PARAMETER["scale_factor",1],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22181"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=-90 +lon_0=-72 +k=1 +x_0=1500000 +y_0=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22182 : POSGAR 94 / Argentina 2 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22182,'EPSG',22182,'PROJCS["POSGAR 94 / Argentina 2",GEOGCS["POSGAR 94",DATUM["Posiciones_Geodesicas_Argentinas_1994",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6694"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4694"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",1],PARAMETER["false_easting",2500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22182"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=-90 +lon_0=-69 +k=1 +x_0=2500000 +y_0=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22182,'EPSG',22182,'PROJCS["POSGAR 94 / Argentina 2",GEOGCS["POSGAR 94",DATUM["Posiciones_Geodesicas_Argentinas_1994",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6694"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4694"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",1],PARAMETER["false_easting",2500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22182"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=-90 +lon_0=-69 +k=1 +x_0=2500000 +y_0=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22183 : POSGAR 94 / Argentina 3 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22183,'EPSG',22183,'PROJCS["POSGAR 94 / Argentina 3",GEOGCS["POSGAR 94",DATUM["Posiciones_Geodesicas_Argentinas_1994",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6694"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4694"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-66],PARAMETER["scale_factor",1],PARAMETER["false_easting",3500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22183"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=-90 +lon_0=-66 +k=1 +x_0=3500000 +y_0=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22183,'EPSG',22183,'PROJCS["POSGAR 94 / Argentina 3",GEOGCS["POSGAR 94",DATUM["Posiciones_Geodesicas_Argentinas_1994",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6694"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4694"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-66],PARAMETER["scale_factor",1],PARAMETER["false_easting",3500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22183"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=-90 +lon_0=-66 +k=1 +x_0=3500000 +y_0=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22184 : POSGAR 94 / Argentina 4 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22184,'EPSG',22184,'PROJCS["POSGAR 94 / Argentina 4",GEOGCS["POSGAR 94",DATUM["Posiciones_Geodesicas_Argentinas_1994",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6694"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4694"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",1],PARAMETER["false_easting",4500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22184"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=-90 +lon_0=-63 +k=1 +x_0=4500000 +y_0=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22184,'EPSG',22184,'PROJCS["POSGAR 94 / Argentina 4",GEOGCS["POSGAR 94",DATUM["Posiciones_Geodesicas_Argentinas_1994",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6694"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4694"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",1],PARAMETER["false_easting",4500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22184"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=-90 +lon_0=-63 +k=1 +x_0=4500000 +y_0=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22185 : POSGAR 94 / Argentina 5 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22185,'EPSG',22185,'PROJCS["POSGAR 94 / Argentina 5",GEOGCS["POSGAR 94",DATUM["Posiciones_Geodesicas_Argentinas_1994",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6694"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4694"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-60],PARAMETER["scale_factor",1],PARAMETER["false_easting",5500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22185"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=-90 +lon_0=-60 +k=1 +x_0=5500000 +y_0=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22185,'EPSG',22185,'PROJCS["POSGAR 94 / Argentina 5",GEOGCS["POSGAR 94",DATUM["Posiciones_Geodesicas_Argentinas_1994",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6694"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4694"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-60],PARAMETER["scale_factor",1],PARAMETER["false_easting",5500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22185"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=-90 +lon_0=-60 +k=1 +x_0=5500000 +y_0=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22186 : POSGAR 94 / Argentina 6 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22186,'EPSG',22186,'PROJCS["POSGAR 94 / Argentina 6",GEOGCS["POSGAR 94",DATUM["Posiciones_Geodesicas_Argentinas_1994",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6694"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4694"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",1],PARAMETER["false_easting",6500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22186"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=-90 +lon_0=-57 +k=1 +x_0=6500000 +y_0=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22186,'EPSG',22186,'PROJCS["POSGAR 94 / Argentina 6",GEOGCS["POSGAR 94",DATUM["Posiciones_Geodesicas_Argentinas_1994",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6694"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4694"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",1],PARAMETER["false_easting",6500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22186"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=-90 +lon_0=-57 +k=1 +x_0=6500000 +y_0=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22187 : POSGAR 94 / Argentina 7 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22187,'EPSG',22187,'PROJCS["POSGAR 94 / Argentina 7",GEOGCS["POSGAR 94",DATUM["Posiciones_Geodesicas_Argentinas_1994",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6694"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4694"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-54],PARAMETER["scale_factor",1],PARAMETER["false_easting",7500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22187"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=-90 +lon_0=-54 +k=1 +x_0=7500000 +y_0=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22187,'EPSG',22187,'PROJCS["POSGAR 94 / Argentina 7",GEOGCS["POSGAR 94",DATUM["Posiciones_Geodesicas_Argentinas_1994",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6694"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4694"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-54],PARAMETER["scale_factor",1],PARAMETER["false_easting",7500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22187"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=-90 +lon_0=-54 +k=1 +x_0=7500000 +y_0=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22191 : Campo Inchauspe / Argentina 1 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22191,'EPSG',22191,'PROJCS["Campo Inchauspe / Argentina 1",GEOGCS["Campo Inchauspe",DATUM["Campo_Inchauspe",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6221"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4221"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-72],PARAMETER["scale_factor",1],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22191"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=-90 +lon_0=-72 +k=1 +x_0=1500000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22191,'EPSG',22191,'PROJCS["Campo Inchauspe / Argentina 1",GEOGCS["Campo Inchauspe",DATUM["Campo_Inchauspe",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-148,136,90,0,0,0,0],AUTHORITY["EPSG","6221"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4221"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-72],PARAMETER["scale_factor",1],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22191"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=-90 +lon_0=-72 +k=1 +x_0=1500000 +y_0=0 +ellps=intl +towgs84=-148,136,90,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22192 : Campo Inchauspe / Argentina 2 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22192,'EPSG',22192,'PROJCS["Campo Inchauspe / Argentina 2",GEOGCS["Campo Inchauspe",DATUM["Campo_Inchauspe",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6221"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4221"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",1],PARAMETER["false_easting",2500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22192"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=-90 +lon_0=-69 +k=1 +x_0=2500000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22192,'EPSG',22192,'PROJCS["Campo Inchauspe / Argentina 2",GEOGCS["Campo Inchauspe",DATUM["Campo_Inchauspe",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-148,136,90,0,0,0,0],AUTHORITY["EPSG","6221"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4221"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",1],PARAMETER["false_easting",2500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22192"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=-90 +lon_0=-69 +k=1 +x_0=2500000 +y_0=0 +ellps=intl +towgs84=-148,136,90,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22193 : Campo Inchauspe / Argentina 3 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22193,'EPSG',22193,'PROJCS["Campo Inchauspe / Argentina 3",GEOGCS["Campo Inchauspe",DATUM["Campo_Inchauspe",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6221"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4221"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-66],PARAMETER["scale_factor",1],PARAMETER["false_easting",3500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22193"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=-90 +lon_0=-66 +k=1 +x_0=3500000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22193,'EPSG',22193,'PROJCS["Campo Inchauspe / Argentina 3",GEOGCS["Campo Inchauspe",DATUM["Campo_Inchauspe",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-148,136,90,0,0,0,0],AUTHORITY["EPSG","6221"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4221"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-66],PARAMETER["scale_factor",1],PARAMETER["false_easting",3500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22193"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=-90 +lon_0=-66 +k=1 +x_0=3500000 +y_0=0 +ellps=intl +towgs84=-148,136,90,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22194 : Campo Inchauspe / Argentina 4 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22194,'EPSG',22194,'PROJCS["Campo Inchauspe / Argentina 4",GEOGCS["Campo Inchauspe",DATUM["Campo_Inchauspe",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6221"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4221"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",1],PARAMETER["false_easting",4500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22194"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=-90 +lon_0=-63 +k=1 +x_0=4500000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22194,'EPSG',22194,'PROJCS["Campo Inchauspe / Argentina 4",GEOGCS["Campo Inchauspe",DATUM["Campo_Inchauspe",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-148,136,90,0,0,0,0],AUTHORITY["EPSG","6221"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4221"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",1],PARAMETER["false_easting",4500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22194"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=-90 +lon_0=-63 +k=1 +x_0=4500000 +y_0=0 +ellps=intl +towgs84=-148,136,90,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22195 : Campo Inchauspe / Argentina 5 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22195,'EPSG',22195,'PROJCS["Campo Inchauspe / Argentina 5",GEOGCS["Campo Inchauspe",DATUM["Campo_Inchauspe",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6221"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4221"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-60],PARAMETER["scale_factor",1],PARAMETER["false_easting",5500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22195"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=-90 +lon_0=-60 +k=1 +x_0=5500000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22195,'EPSG',22195,'PROJCS["Campo Inchauspe / Argentina 5",GEOGCS["Campo Inchauspe",DATUM["Campo_Inchauspe",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-148,136,90,0,0,0,0],AUTHORITY["EPSG","6221"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4221"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-60],PARAMETER["scale_factor",1],PARAMETER["false_easting",5500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22195"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=-90 +lon_0=-60 +k=1 +x_0=5500000 +y_0=0 +ellps=intl +towgs84=-148,136,90,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22196 : Campo Inchauspe / Argentina 6 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22196,'EPSG',22196,'PROJCS["Campo Inchauspe / Argentina 6",GEOGCS["Campo Inchauspe",DATUM["Campo_Inchauspe",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6221"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4221"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",1],PARAMETER["false_easting",6500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22196"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=-90 +lon_0=-57 +k=1 +x_0=6500000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22196,'EPSG',22196,'PROJCS["Campo Inchauspe / Argentina 6",GEOGCS["Campo Inchauspe",DATUM["Campo_Inchauspe",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-148,136,90,0,0,0,0],AUTHORITY["EPSG","6221"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4221"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",1],PARAMETER["false_easting",6500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22196"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=-90 +lon_0=-57 +k=1 +x_0=6500000 +y_0=0 +ellps=intl +towgs84=-148,136,90,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22197 : Campo Inchauspe / Argentina 7 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22197,'EPSG',22197,'PROJCS["Campo Inchauspe / Argentina 7",GEOGCS["Campo Inchauspe",DATUM["Campo_Inchauspe",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6221"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4221"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-54],PARAMETER["scale_factor",1],PARAMETER["false_easting",7500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22197"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=-90 +lon_0=-54 +k=1 +x_0=7500000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22197,'EPSG',22197,'PROJCS["Campo Inchauspe / Argentina 7",GEOGCS["Campo Inchauspe",DATUM["Campo_Inchauspe",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-148,136,90,0,0,0,0],AUTHORITY["EPSG","6221"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4221"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",-54],PARAMETER["scale_factor",1],PARAMETER["false_easting",7500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22197"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=-90 +lon_0=-54 +k=1 +x_0=7500000 +y_0=0 +ellps=intl +towgs84=-148,136,90,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22234 : Cape / UTM zone 34S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22234,'EPSG',22234,'PROJCS["Cape / UTM zone 34S",GEOGCS["Cape",DATUM["Cape",SPHEROID["Clarke 1880 (Arc)",6378249.145,293.4663077,AUTHORITY["EPSG","7013"]],AUTHORITY["EPSG","6222"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4222"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","22234"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=34 +south +a=6378249.145 +b=6356514.966398753 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22234,'EPSG',22234,'PROJCS["Cape / UTM zone 34S",GEOGCS["Cape",DATUM["Cape",SPHEROID["Clarke 1880 (Arc)",6378249.145,293.4663077,AUTHORITY["EPSG","7013"]],TOWGS84[-136,-108,-292,0,0,0,0],AUTHORITY["EPSG","6222"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4222"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","22234"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=34 +south +a=6378249.145 +b=6356514.966398753 +towgs84=-136,-108,-292,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22235 : Cape / UTM zone 35S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22235,'EPSG',22235,'PROJCS["Cape / UTM zone 35S",GEOGCS["Cape",DATUM["Cape",SPHEROID["Clarke 1880 (Arc)",6378249.145,293.4663077,AUTHORITY["EPSG","7013"]],AUTHORITY["EPSG","6222"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4222"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","22235"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=35 +south +a=6378249.145 +b=6356514.966398753 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22235,'EPSG',22235,'PROJCS["Cape / UTM zone 35S",GEOGCS["Cape",DATUM["Cape",SPHEROID["Clarke 1880 (Arc)",6378249.145,293.4663077,AUTHORITY["EPSG","7013"]],TOWGS84[-136,-108,-292,0,0,0,0],AUTHORITY["EPSG","6222"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4222"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","22235"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=35 +south +a=6378249.145 +b=6356514.966398753 +towgs84=-136,-108,-292,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22236 : Cape / UTM zone 36S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22236,'EPSG',22236,'PROJCS["Cape / UTM zone 36S",GEOGCS["Cape",DATUM["Cape",SPHEROID["Clarke 1880 (Arc)",6378249.145,293.4663077,AUTHORITY["EPSG","7013"]],AUTHORITY["EPSG","6222"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4222"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","22236"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=36 +south +a=6378249.145 +b=6356514.966398753 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22236,'EPSG',22236,'PROJCS["Cape / UTM zone 36S",GEOGCS["Cape",DATUM["Cape",SPHEROID["Clarke 1880 (Arc)",6378249.145,293.4663077,AUTHORITY["EPSG","7013"]],TOWGS84[-136,-108,-292,0,0,0,0],AUTHORITY["EPSG","6222"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4222"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","22236"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=36 +south +a=6378249.145 +b=6356514.966398753 +towgs84=-136,-108,-292,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22275 : Cape / Lo15 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22275,'EPSG',22275,'PROJCS["Cape / Lo15",GEOGCS["Cape",DATUM["Cape",SPHEROID["Clarke 1880 (Arc)",6378249.145,293.4663077,AUTHORITY["EPSG","7013"]],AUTHORITY["EPSG","6222"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4222"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","22275"],AXIS["Y",WEST],AXIS["X",SOUTH]]',''); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22275,'EPSG',22275,'PROJCS["Cape / Lo15",GEOGCS["Cape",DATUM["Cape",SPHEROID["Clarke 1880 (Arc)",6378249.145,293.4663077,AUTHORITY["EPSG","7013"]],TOWGS84[-136,-108,-292,0,0,0,0],AUTHORITY["EPSG","6222"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4222"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","22275"],AXIS["Y",WEST],AXIS["X",SOUTH]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=0 +y_0=0 +axis=wsu +a=6378249.145 +b=6356514.966398753 +towgs84=-136,-108,-292,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22277 : Cape / Lo17 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22277,'EPSG',22277,'PROJCS["Cape / Lo17",GEOGCS["Cape",DATUM["Cape",SPHEROID["Clarke 1880 (Arc)",6378249.145,293.4663077,AUTHORITY["EPSG","7013"]],AUTHORITY["EPSG","6222"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4222"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",17],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","22277"],AXIS["Y",WEST],AXIS["X",SOUTH]]',''); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22277,'EPSG',22277,'PROJCS["Cape / Lo17",GEOGCS["Cape",DATUM["Cape",SPHEROID["Clarke 1880 (Arc)",6378249.145,293.4663077,AUTHORITY["EPSG","7013"]],TOWGS84[-136,-108,-292,0,0,0,0],AUTHORITY["EPSG","6222"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4222"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",17],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","22277"],AXIS["Y",WEST],AXIS["X",SOUTH]]','+proj=tmerc +lat_0=0 +lon_0=17 +k=1 +x_0=0 +y_0=0 +axis=wsu +a=6378249.145 +b=6356514.966398753 +towgs84=-136,-108,-292,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22279 : Cape / Lo19 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22279,'EPSG',22279,'PROJCS["Cape / Lo19",GEOGCS["Cape",DATUM["Cape",SPHEROID["Clarke 1880 (Arc)",6378249.145,293.4663077,AUTHORITY["EPSG","7013"]],AUTHORITY["EPSG","6222"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4222"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",19],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","22279"],AXIS["Y",WEST],AXIS["X",SOUTH]]',''); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22279,'EPSG',22279,'PROJCS["Cape / Lo19",GEOGCS["Cape",DATUM["Cape",SPHEROID["Clarke 1880 (Arc)",6378249.145,293.4663077,AUTHORITY["EPSG","7013"]],TOWGS84[-136,-108,-292,0,0,0,0],AUTHORITY["EPSG","6222"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4222"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",19],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","22279"],AXIS["Y",WEST],AXIS["X",SOUTH]]','+proj=tmerc +lat_0=0 +lon_0=19 +k=1 +x_0=0 +y_0=0 +axis=wsu +a=6378249.145 +b=6356514.966398753 +towgs84=-136,-108,-292,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22281 : Cape / Lo21 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22281,'EPSG',22281,'PROJCS["Cape / Lo21",GEOGCS["Cape",DATUM["Cape",SPHEROID["Clarke 1880 (Arc)",6378249.145,293.4663077,AUTHORITY["EPSG","7013"]],AUTHORITY["EPSG","6222"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4222"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","22281"],AXIS["Y",WEST],AXIS["X",SOUTH]]',''); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22281,'EPSG',22281,'PROJCS["Cape / Lo21",GEOGCS["Cape",DATUM["Cape",SPHEROID["Clarke 1880 (Arc)",6378249.145,293.4663077,AUTHORITY["EPSG","7013"]],TOWGS84[-136,-108,-292,0,0,0,0],AUTHORITY["EPSG","6222"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4222"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","22281"],AXIS["Y",WEST],AXIS["X",SOUTH]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=0 +y_0=0 +axis=wsu +a=6378249.145 +b=6356514.966398753 +towgs84=-136,-108,-292,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22283 : Cape / Lo23 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22283,'EPSG',22283,'PROJCS["Cape / Lo23",GEOGCS["Cape",DATUM["Cape",SPHEROID["Clarke 1880 (Arc)",6378249.145,293.4663077,AUTHORITY["EPSG","7013"]],AUTHORITY["EPSG","6222"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4222"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",23],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","22283"],AXIS["Y",WEST],AXIS["X",SOUTH]]',''); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22283,'EPSG',22283,'PROJCS["Cape / Lo23",GEOGCS["Cape",DATUM["Cape",SPHEROID["Clarke 1880 (Arc)",6378249.145,293.4663077,AUTHORITY["EPSG","7013"]],TOWGS84[-136,-108,-292,0,0,0,0],AUTHORITY["EPSG","6222"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4222"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",23],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","22283"],AXIS["Y",WEST],AXIS["X",SOUTH]]','+proj=tmerc +lat_0=0 +lon_0=23 +k=1 +x_0=0 +y_0=0 +axis=wsu +a=6378249.145 +b=6356514.966398753 +towgs84=-136,-108,-292,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22285 : Cape / Lo25 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22285,'EPSG',22285,'PROJCS["Cape / Lo25",GEOGCS["Cape",DATUM["Cape",SPHEROID["Clarke 1880 (Arc)",6378249.145,293.4663077,AUTHORITY["EPSG","7013"]],AUTHORITY["EPSG","6222"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4222"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",25],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","22285"],AXIS["Y",WEST],AXIS["X",SOUTH]]',''); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22285,'EPSG',22285,'PROJCS["Cape / Lo25",GEOGCS["Cape",DATUM["Cape",SPHEROID["Clarke 1880 (Arc)",6378249.145,293.4663077,AUTHORITY["EPSG","7013"]],TOWGS84[-136,-108,-292,0,0,0,0],AUTHORITY["EPSG","6222"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4222"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",25],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","22285"],AXIS["Y",WEST],AXIS["X",SOUTH]]','+proj=tmerc +lat_0=0 +lon_0=25 +k=1 +x_0=0 +y_0=0 +axis=wsu +a=6378249.145 +b=6356514.966398753 +towgs84=-136,-108,-292,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22287 : Cape / Lo27 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22287,'EPSG',22287,'PROJCS["Cape / Lo27",GEOGCS["Cape",DATUM["Cape",SPHEROID["Clarke 1880 (Arc)",6378249.145,293.4663077,AUTHORITY["EPSG","7013"]],AUTHORITY["EPSG","6222"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4222"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","22287"],AXIS["Y",WEST],AXIS["X",SOUTH]]',''); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22287,'EPSG',22287,'PROJCS["Cape / Lo27",GEOGCS["Cape",DATUM["Cape",SPHEROID["Clarke 1880 (Arc)",6378249.145,293.4663077,AUTHORITY["EPSG","7013"]],TOWGS84[-136,-108,-292,0,0,0,0],AUTHORITY["EPSG","6222"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4222"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","22287"],AXIS["Y",WEST],AXIS["X",SOUTH]]','+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=0 +y_0=0 +axis=wsu +a=6378249.145 +b=6356514.966398753 +towgs84=-136,-108,-292,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22289 : Cape / Lo29 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22289,'EPSG',22289,'PROJCS["Cape / Lo29",GEOGCS["Cape",DATUM["Cape",SPHEROID["Clarke 1880 (Arc)",6378249.145,293.4663077,AUTHORITY["EPSG","7013"]],AUTHORITY["EPSG","6222"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4222"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",29],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","22289"],AXIS["Y",WEST],AXIS["X",SOUTH]]',''); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22289,'EPSG',22289,'PROJCS["Cape / Lo29",GEOGCS["Cape",DATUM["Cape",SPHEROID["Clarke 1880 (Arc)",6378249.145,293.4663077,AUTHORITY["EPSG","7013"]],TOWGS84[-136,-108,-292,0,0,0,0],AUTHORITY["EPSG","6222"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4222"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",29],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","22289"],AXIS["Y",WEST],AXIS["X",SOUTH]]','+proj=tmerc +lat_0=0 +lon_0=29 +k=1 +x_0=0 +y_0=0 +axis=wsu +a=6378249.145 +b=6356514.966398753 +towgs84=-136,-108,-292,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22291 : Cape / Lo31 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22291,'EPSG',22291,'PROJCS["Cape / Lo31",GEOGCS["Cape",DATUM["Cape",SPHEROID["Clarke 1880 (Arc)",6378249.145,293.4663077,AUTHORITY["EPSG","7013"]],AUTHORITY["EPSG","6222"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4222"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",31],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","22291"],AXIS["Y",WEST],AXIS["X",SOUTH]]',''); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22291,'EPSG',22291,'PROJCS["Cape / Lo31",GEOGCS["Cape",DATUM["Cape",SPHEROID["Clarke 1880 (Arc)",6378249.145,293.4663077,AUTHORITY["EPSG","7013"]],TOWGS84[-136,-108,-292,0,0,0,0],AUTHORITY["EPSG","6222"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4222"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",31],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","22291"],AXIS["Y",WEST],AXIS["X",SOUTH]]','+proj=tmerc +lat_0=0 +lon_0=31 +k=1 +x_0=0 +y_0=0 +axis=wsu +a=6378249.145 +b=6356514.966398753 +towgs84=-136,-108,-292,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22293 : Cape / Lo33 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22293,'EPSG',22293,'PROJCS["Cape / Lo33",GEOGCS["Cape",DATUM["Cape",SPHEROID["Clarke 1880 (Arc)",6378249.145,293.4663077,AUTHORITY["EPSG","7013"]],AUTHORITY["EPSG","6222"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4222"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","22293"],AXIS["Y",WEST],AXIS["X",SOUTH]]',''); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22293,'EPSG',22293,'PROJCS["Cape / Lo33",GEOGCS["Cape",DATUM["Cape",SPHEROID["Clarke 1880 (Arc)",6378249.145,293.4663077,AUTHORITY["EPSG","7013"]],TOWGS84[-136,-108,-292,0,0,0,0],AUTHORITY["EPSG","6222"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4222"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","22293"],AXIS["Y",WEST],AXIS["X",SOUTH]]','+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=0 +y_0=0 +axis=wsu +a=6378249.145 +b=6356514.966398753 +towgs84=-136,-108,-292,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22300 : Carthage (Paris) / Tunisia Mining Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22300,'EPSG',22300,'PROJCS["Carthage (Paris) / Tunisia Mining Grid",GEOGCS["Carthage (Paris)",DATUM["Carthage_Paris",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],AUTHORITY["EPSG","6816"]],PRIMEM["Paris",2.33722917,AUTHORITY["EPSG","8903"]],UNIT["grad",0.01570796326794897,AUTHORITY["EPSG","9105"]],AUTHORITY["EPSG","4816"]],UNIT["kilometre",1000,AUTHORITY["EPSG","9036"]],PROJECTION["Tunisia_Mining_Grid"],PARAMETER["latitude_of_origin",38.81973],PARAMETER["central_meridian",7.83445],PARAMETER["false_easting",270],PARAMETER["false_northing",582],AUTHORITY["EPSG","22300"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]',''); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22300,'EPSG',22300,'PROJCS["Carthage (Paris) / Tunisia Mining Grid",GEOGCS["Carthage (Paris)",DATUM["Carthage_Paris",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-263,6,431,0,0,0,0],AUTHORITY["EPSG","6816"]],PRIMEM["Paris",2.33722917,AUTHORITY["EPSG","8903"]],UNIT["grad",0.01570796326794897,AUTHORITY["EPSG","9105"]],AUTHORITY["EPSG","4816"]],UNIT["kilometre",1000,AUTHORITY["EPSG","9036"]],PROJECTION["Tunisia_Mining_Grid"],PARAMETER["latitude_of_origin",38.81973],PARAMETER["central_meridian",7.83445],PARAMETER["false_easting",270],PARAMETER["false_northing",582],AUTHORITY["EPSG","22300"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]',''); --- --- EPSG 22332 : Carthage / UTM zone 32N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22332,'EPSG',22332,'PROJCS["Carthage / UTM zone 32N",GEOGCS["Carthage",DATUM["Carthage",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],AUTHORITY["EPSG","6223"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4223"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22332"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +a=6378249.2 +b=6356515 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22332,'EPSG',22332,'PROJCS["Carthage / UTM zone 32N",GEOGCS["Carthage",DATUM["Carthage",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-263,6,431,0,0,0,0],AUTHORITY["EPSG","6223"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4223"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","22332"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +a=6378249.2 +b=6356515 +towgs84=-263,6,431,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22391 : Carthage / Nord Tunisie --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22391,'EPSG',22391,'PROJCS["Carthage / Nord Tunisie",GEOGCS["Carthage",DATUM["Carthage",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],AUTHORITY["EPSG","6223"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4223"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",36],PARAMETER["central_meridian",9.9],PARAMETER["scale_factor",0.999625544],PARAMETER["false_easting",500000],PARAMETER["false_northing",300000],AUTHORITY["EPSG","22391"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36 +lat_0=36 +lon_0=9.9 +k_0=0.999625544 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22391,'EPSG',22391,'PROJCS["Carthage / Nord Tunisie",GEOGCS["Carthage",DATUM["Carthage",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-263,6,431,0,0,0,0],AUTHORITY["EPSG","6223"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4223"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",36],PARAMETER["central_meridian",9.9],PARAMETER["scale_factor",0.999625544],PARAMETER["false_easting",500000],PARAMETER["false_northing",300000],AUTHORITY["EPSG","22391"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36 +lat_0=36 +lon_0=9.9 +k_0=0.999625544 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +towgs84=-263,6,431,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22392 : Carthage / Sud Tunisie --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22392,'EPSG',22392,'PROJCS["Carthage / Sud Tunisie",GEOGCS["Carthage",DATUM["Carthage",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],AUTHORITY["EPSG","6223"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4223"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",33.3],PARAMETER["central_meridian",9.9],PARAMETER["scale_factor",0.999625769],PARAMETER["false_easting",500000],PARAMETER["false_northing",300000],AUTHORITY["EPSG","22392"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=9.9 +k_0=0.999625769 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22392,'EPSG',22392,'PROJCS["Carthage / Sud Tunisie",GEOGCS["Carthage",DATUM["Carthage",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-263,6,431,0,0,0,0],AUTHORITY["EPSG","6223"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4223"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",33.3],PARAMETER["central_meridian",9.9],PARAMETER["scale_factor",0.999625769],PARAMETER["false_easting",500000],PARAMETER["false_northing",300000],AUTHORITY["EPSG","22392"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=9.9 +k_0=0.999625769 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +towgs84=-263,6,431,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22521 : Corrego Alegre / UTM zone 21S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22521,'EPSG',22521,'PROJCS["Corrego Alegre / UTM zone 21S",GEOGCS["Corrego Alegre",DATUM["Corrego_Alegre",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-206,172,-6,0,0,0,0],AUTHORITY["EPSG","6225"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4225"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","22521"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +south +ellps=intl +towgs84=-206,172,-6,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22521,'EPSG',22521,'PROJCS["Corrego Alegre / UTM zone 21S",GEOGCS["Corrego Alegre",DATUM["Corrego_Alegre",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-206,172,-6,0,0,0,0],AUTHORITY["EPSG","6225"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4225"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","22521"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +south +ellps=intl +towgs84=-206,172,-6,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22522 : Corrego Alegre / UTM zone 22S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22522,'EPSG',22522,'PROJCS["Corrego Alegre / UTM zone 22S",GEOGCS["Corrego Alegre",DATUM["Corrego_Alegre",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-206,172,-6,0,0,0,0],AUTHORITY["EPSG","6225"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4225"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","22522"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +south +ellps=intl +towgs84=-206,172,-6,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22522,'EPSG',22522,'PROJCS["Corrego Alegre / UTM zone 22S",GEOGCS["Corrego Alegre",DATUM["Corrego_Alegre",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-206,172,-6,0,0,0,0],AUTHORITY["EPSG","6225"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4225"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","22522"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +south +ellps=intl +towgs84=-206,172,-6,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22523 : Corrego Alegre / UTM zone 23S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22523,'EPSG',22523,'PROJCS["Corrego Alegre / UTM zone 23S",GEOGCS["Corrego Alegre",DATUM["Corrego_Alegre",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-206,172,-6,0,0,0,0],AUTHORITY["EPSG","6225"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4225"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","22523"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=23 +south +ellps=intl +towgs84=-206,172,-6,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22523,'EPSG',22523,'PROJCS["Corrego Alegre / UTM zone 23S",GEOGCS["Corrego Alegre",DATUM["Corrego_Alegre",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-206,172,-6,0,0,0,0],AUTHORITY["EPSG","6225"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4225"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","22523"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=23 +south +ellps=intl +towgs84=-206,172,-6,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22524 : Corrego Alegre / UTM zone 24S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22524,'EPSG',22524,'PROJCS["Corrego Alegre / UTM zone 24S",GEOGCS["Corrego Alegre",DATUM["Corrego_Alegre",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-206,172,-6,0,0,0,0],AUTHORITY["EPSG","6225"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4225"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","22524"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=24 +south +ellps=intl +towgs84=-206,172,-6,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22524,'EPSG',22524,'PROJCS["Corrego Alegre / UTM zone 24S",GEOGCS["Corrego Alegre",DATUM["Corrego_Alegre",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-206,172,-6,0,0,0,0],AUTHORITY["EPSG","6225"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4225"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","22524"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=24 +south +ellps=intl +towgs84=-206,172,-6,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22525 : Corrego Alegre / UTM zone 25S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22525,'EPSG',22525,'PROJCS["Corrego Alegre / UTM zone 25S",GEOGCS["Corrego Alegre",DATUM["Corrego_Alegre",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-206,172,-6,0,0,0,0],AUTHORITY["EPSG","6225"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4225"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","22525"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=25 +south +ellps=intl +towgs84=-206,172,-6,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22525,'EPSG',22525,'PROJCS["Corrego Alegre / UTM zone 25S",GEOGCS["Corrego Alegre",DATUM["Corrego_Alegre",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-206,172,-6,0,0,0,0],AUTHORITY["EPSG","6225"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4225"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","22525"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=25 +south +ellps=intl +towgs84=-206,172,-6,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22700 : Deir ez Zor / Levant Zone --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22700,'EPSG',22700,'PROJCS["Deir ez Zor / Levant Zone",GEOGCS["Deir ez Zor",DATUM["Deir_ez_Zor",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],AUTHORITY["EPSG","6227"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4227"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",34.65],PARAMETER["central_meridian",37.35],PARAMETER["scale_factor",0.9996256],PARAMETER["false_easting",300000],PARAMETER["false_northing",300000],AUTHORITY["EPSG","22700"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=34.65 +lat_0=34.65 +lon_0=37.35 +k_0=0.9996256 +x_0=300000 +y_0=300000 +a=6378249.2 +b=6356515 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22700,'EPSG',22700,'PROJCS["Deir ez Zor / Levant Zone",GEOGCS["Deir ez Zor",DATUM["Deir_ez_Zor",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-190.421,8.532,238.69,0,0,0,0],AUTHORITY["EPSG","6227"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4227"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",34.65],PARAMETER["central_meridian",37.35],PARAMETER["scale_factor",0.9996256],PARAMETER["false_easting",300000],PARAMETER["false_northing",300000],AUTHORITY["EPSG","22700"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=34.65 +lat_0=34.65 +lon_0=37.35 +k_0=0.9996256 +x_0=300000 +y_0=300000 +a=6378249.2 +b=6356515 +towgs84=-190.421,8.532,238.69,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22770 : Deir ez Zor / Syria Lambert --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22770,'EPSG',22770,'PROJCS["Deir ez Zor / Syria Lambert",GEOGCS["Deir ez Zor",DATUM["Deir_ez_Zor",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],AUTHORITY["EPSG","6227"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4227"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",34.65],PARAMETER["central_meridian",37.35],PARAMETER["scale_factor",0.9996256],PARAMETER["false_easting",300000],PARAMETER["false_northing",300000],AUTHORITY["EPSG","22770"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=34.65 +lat_0=34.65 +lon_0=37.35 +k_0=0.9996256 +x_0=300000 +y_0=300000 +a=6378249.2 +b=6356515 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22770,'EPSG',22770,'PROJCS["Deir ez Zor / Syria Lambert",GEOGCS["Deir ez Zor",DATUM["Deir_ez_Zor",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-190.421,8.532,238.69,0,0,0,0],AUTHORITY["EPSG","6227"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4227"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",34.65],PARAMETER["central_meridian",37.35],PARAMETER["scale_factor",0.9996256],PARAMETER["false_easting",300000],PARAMETER["false_northing",300000],AUTHORITY["EPSG","22770"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=34.65 +lat_0=34.65 +lon_0=37.35 +k_0=0.9996256 +x_0=300000 +y_0=300000 +a=6378249.2 +b=6356515 +towgs84=-190.421,8.532,238.69,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22780 : Deir ez Zor / Levant Stereographic --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22780,'EPSG',22780,'PROJCS["Deir ez Zor / Levant Stereographic",GEOGCS["Deir ez Zor",DATUM["Deir_ez_Zor",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],AUTHORITY["EPSG","6227"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4227"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",34.2],PARAMETER["central_meridian",39.15],PARAMETER["scale_factor",0.9995341],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","22780"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=sterea +lat_0=34.2 +lon_0=39.15 +k=0.9995341 +x_0=0 +y_0=0 +a=6378249.2 +b=6356515 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22780,'EPSG',22780,'PROJCS["Deir ez Zor / Levant Stereographic",GEOGCS["Deir ez Zor",DATUM["Deir_ez_Zor",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-190.421,8.532,238.69,0,0,0,0],AUTHORITY["EPSG","6227"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4227"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",34.2],PARAMETER["central_meridian",39.15],PARAMETER["scale_factor",0.9995341],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","22780"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=sterea +lat_0=34.2 +lon_0=39.15 +k=0.9995341 +x_0=0 +y_0=0 +a=6378249.2 +b=6356515 +towgs84=-190.421,8.532,238.69,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22832 : Douala / UTM zone 32N (deprecated) --- @@ -10114,79 +11826,79 @@ --- --- EPSG 22991 : Egypt 1907 / Blue Belt --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22991,'EPSG',22991,'PROJCS["Egypt 1907 / Blue Belt",GEOGCS["Egypt 1907",DATUM["Egypt_1907",SPHEROID["Helmert 1906",6378200,298.3,AUTHORITY["EPSG","7020"]],AUTHORITY["EPSG","6229"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4229"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",35],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",1100000],AUTHORITY["EPSG","22991"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=35 +k=1 +x_0=300000 +y_0=1100000 +ellps=helmert +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22991,'EPSG',22991,'PROJCS["Egypt 1907 / Blue Belt",GEOGCS["Egypt 1907",DATUM["Egypt_1907",SPHEROID["Helmert 1906",6378200,298.3,AUTHORITY["EPSG","7020"]],TOWGS84[-130,110,-13,0,0,0,0],AUTHORITY["EPSG","6229"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4229"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",35],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",1100000],AUTHORITY["EPSG","22991"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=35 +k=1 +x_0=300000 +y_0=1100000 +ellps=helmert +towgs84=-130,110,-13,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22992 : Egypt 1907 / Red Belt --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22992,'EPSG',22992,'PROJCS["Egypt 1907 / Red Belt",GEOGCS["Egypt 1907",DATUM["Egypt_1907",SPHEROID["Helmert 1906",6378200,298.3,AUTHORITY["EPSG","7020"]],AUTHORITY["EPSG","6229"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4229"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",31],PARAMETER["scale_factor",1],PARAMETER["false_easting",615000],PARAMETER["false_northing",810000],AUTHORITY["EPSG","22992"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=31 +k=1 +x_0=615000 +y_0=810000 +ellps=helmert +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22992,'EPSG',22992,'PROJCS["Egypt 1907 / Red Belt",GEOGCS["Egypt 1907",DATUM["Egypt_1907",SPHEROID["Helmert 1906",6378200,298.3,AUTHORITY["EPSG","7020"]],TOWGS84[-130,110,-13,0,0,0,0],AUTHORITY["EPSG","6229"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4229"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",31],PARAMETER["scale_factor",1],PARAMETER["false_easting",615000],PARAMETER["false_northing",810000],AUTHORITY["EPSG","22992"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=31 +k=1 +x_0=615000 +y_0=810000 +ellps=helmert +towgs84=-130,110,-13,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22993 : Egypt 1907 / Purple Belt --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22993,'EPSG',22993,'PROJCS["Egypt 1907 / Purple Belt",GEOGCS["Egypt 1907",DATUM["Egypt_1907",SPHEROID["Helmert 1906",6378200,298.3,AUTHORITY["EPSG","7020"]],AUTHORITY["EPSG","6229"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4229"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",27],PARAMETER["scale_factor",1],PARAMETER["false_easting",700000],PARAMETER["false_northing",200000],AUTHORITY["EPSG","22993"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=27 +k=1 +x_0=700000 +y_0=200000 +ellps=helmert +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22993,'EPSG',22993,'PROJCS["Egypt 1907 / Purple Belt",GEOGCS["Egypt 1907",DATUM["Egypt_1907",SPHEROID["Helmert 1906",6378200,298.3,AUTHORITY["EPSG","7020"]],TOWGS84[-130,110,-13,0,0,0,0],AUTHORITY["EPSG","6229"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4229"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",27],PARAMETER["scale_factor",1],PARAMETER["false_easting",700000],PARAMETER["false_northing",200000],AUTHORITY["EPSG","22993"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=27 +k=1 +x_0=700000 +y_0=200000 +ellps=helmert +towgs84=-130,110,-13,0,0,0,0 +units=m +no_defs '); --- --- EPSG 22994 : Egypt 1907 / Extended Purple Belt --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22994,'EPSG',22994,'PROJCS["Egypt 1907 / Extended Purple Belt",GEOGCS["Egypt 1907",DATUM["Egypt_1907",SPHEROID["Helmert 1906",6378200,298.3,AUTHORITY["EPSG","7020"]],AUTHORITY["EPSG","6229"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4229"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",27],PARAMETER["scale_factor",1],PARAMETER["false_easting",700000],PARAMETER["false_northing",1200000],AUTHORITY["EPSG","22994"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=27 +k=1 +x_0=700000 +y_0=1200000 +ellps=helmert +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (22994,'EPSG',22994,'PROJCS["Egypt 1907 / Extended Purple Belt",GEOGCS["Egypt 1907",DATUM["Egypt_1907",SPHEROID["Helmert 1906",6378200,298.3,AUTHORITY["EPSG","7020"]],TOWGS84[-130,110,-13,0,0,0,0],AUTHORITY["EPSG","6229"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4229"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",27],PARAMETER["scale_factor",1],PARAMETER["false_easting",700000],PARAMETER["false_northing",1200000],AUTHORITY["EPSG","22994"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=27 +k=1 +x_0=700000 +y_0=1200000 +ellps=helmert +towgs84=-130,110,-13,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23028 : ED50 / UTM zone 28N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23028,'EPSG',23028,'PROJCS["ED50 / UTM zone 28N",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23028"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23028,'EPSG',23028,'PROJCS["ED50 / UTM zone 28N",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-87,-98,-121,0,0,0,0],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23028"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +ellps=intl +towgs84=-87,-98,-121,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23029 : ED50 / UTM zone 29N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23029,'EPSG',23029,'PROJCS["ED50 / UTM zone 29N",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23029"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23029,'EPSG',23029,'PROJCS["ED50 / UTM zone 29N",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-87,-98,-121,0,0,0,0],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23029"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +ellps=intl +towgs84=-87,-98,-121,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23030 : ED50 / UTM zone 30N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23030,'EPSG',23030,'PROJCS["ED50 / UTM zone 30N",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23030"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=30 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23030,'EPSG',23030,'PROJCS["ED50 / UTM zone 30N",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-87,-98,-121,0,0,0,0],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23030"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=30 +ellps=intl +towgs84=-87,-98,-121,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23031 : ED50 / UTM zone 31N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23031,'EPSG',23031,'PROJCS["ED50 / UTM zone 31N",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23031"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=31 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23031,'EPSG',23031,'PROJCS["ED50 / UTM zone 31N",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-87,-98,-121,0,0,0,0],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23031"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=31 +ellps=intl +towgs84=-87,-98,-121,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23032 : ED50 / UTM zone 32N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23032,'EPSG',23032,'PROJCS["ED50 / UTM zone 32N",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23032"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23032,'EPSG',23032,'PROJCS["ED50 / UTM zone 32N",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-87,-98,-121,0,0,0,0],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23032"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +ellps=intl +towgs84=-87,-98,-121,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23033 : ED50 / UTM zone 33N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23033,'EPSG',23033,'PROJCS["ED50 / UTM zone 33N",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23033"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=33 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23033,'EPSG',23033,'PROJCS["ED50 / UTM zone 33N",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-87,-98,-121,0,0,0,0],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23033"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=33 +ellps=intl +towgs84=-87,-98,-121,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23034 : ED50 / UTM zone 34N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23034,'EPSG',23034,'PROJCS["ED50 / UTM zone 34N",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23034"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=34 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23034,'EPSG',23034,'PROJCS["ED50 / UTM zone 34N",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-87,-98,-121,0,0,0,0],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23034"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=34 +ellps=intl +towgs84=-87,-98,-121,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23035 : ED50 / UTM zone 35N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23035,'EPSG',23035,'PROJCS["ED50 / UTM zone 35N",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23035"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=35 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23035,'EPSG',23035,'PROJCS["ED50 / UTM zone 35N",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-87,-98,-121,0,0,0,0],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23035"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=35 +ellps=intl +towgs84=-87,-98,-121,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23036 : ED50 / UTM zone 36N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23036,'EPSG',23036,'PROJCS["ED50 / UTM zone 36N",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23036"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=36 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23036,'EPSG',23036,'PROJCS["ED50 / UTM zone 36N",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-87,-98,-121,0,0,0,0],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23036"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=36 +ellps=intl +towgs84=-87,-98,-121,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23037 : ED50 / UTM zone 37N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23037,'EPSG',23037,'PROJCS["ED50 / UTM zone 37N",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23037"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=37 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23037,'EPSG',23037,'PROJCS["ED50 / UTM zone 37N",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-87,-98,-121,0,0,0,0],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23037"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=37 +ellps=intl +towgs84=-87,-98,-121,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23038 : ED50 / UTM zone 38N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23038,'EPSG',23038,'PROJCS["ED50 / UTM zone 38N",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23038"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23038,'EPSG',23038,'PROJCS["ED50 / UTM zone 38N",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-87,-98,-121,0,0,0,0],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23038"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +ellps=intl +towgs84=-87,-98,-121,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23090 : ED50 / TM 0 N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23090,'EPSG',23090,'PROJCS["ED50 / TM 0 N",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",0],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23090"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=0 +k=0.9996 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23090,'EPSG',23090,'PROJCS["ED50 / TM 0 N",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-87,-98,-121,0,0,0,0],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",0],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23090"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=0 +k=0.9996 +x_0=500000 +y_0=0 +ellps=intl +towgs84=-87,-98,-121,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23095 : ED50 / TM 5 NE --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23095,'EPSG',23095,'PROJCS["ED50 / TM 5 NE",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",5],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23095"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=5 +k=0.9996 +x_0=500000 +y_0=0 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23095,'EPSG',23095,'PROJCS["ED50 / TM 5 NE",GEOGCS["ED50",DATUM["European_Datum_1950",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-87,-98,-121,0,0,0,0],AUTHORITY["EPSG","6230"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4230"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",5],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23095"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=5 +k=0.9996 +x_0=500000 +y_0=0 +ellps=intl +towgs84=-87,-98,-121,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23239 : Fahud / UTM zone 39N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23239,'EPSG',23239,'PROJCS["Fahud / UTM zone 39N",GEOGCS["Fahud",DATUM["Fahud",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6232"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4232"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23239"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=39 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23239,'EPSG',23239,'PROJCS["Fahud / UTM zone 39N",GEOGCS["Fahud",DATUM["Fahud",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-346,-1,224,0,0,0,0],AUTHORITY["EPSG","6232"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4232"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23239"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=39 +ellps=clrk80 +towgs84=-346,-1,224,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23240 : Fahud / UTM zone 40N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23240,'EPSG',23240,'PROJCS["Fahud / UTM zone 40N",GEOGCS["Fahud",DATUM["Fahud",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6232"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4232"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23240"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=40 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23240,'EPSG',23240,'PROJCS["Fahud / UTM zone 40N",GEOGCS["Fahud",DATUM["Fahud",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-346,-1,224,0,0,0,0],AUTHORITY["EPSG","6232"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4232"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23240"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=40 +ellps=clrk80 +towgs84=-346,-1,224,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23433 : Garoua / UTM zone 33N (deprecated) --- @@ -10194,1727 +11906,1727 @@ --- --- EPSG 23700 : HD72 / EOV --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23700,'EPSG',23700,'PROJCS["HD72 / EOV",GEOGCS["HD72",DATUM["Hungarian_Datum_1972",SPHEROID["GRS 1967",6378160,298.247167427,AUTHORITY["EPSG","7036"]],AUTHORITY["EPSG","6237"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4237"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",47.14439372222222],PARAMETER["longitude_of_center",19.04857177777778],PARAMETER["azimuth",90],PARAMETER["rectified_grid_angle",90],PARAMETER["scale_factor",0.99993],PARAMETER["false_easting",650000],PARAMETER["false_northing",200000],AUTHORITY["EPSG","23700"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=somerc +lat_0=47.14439372222222 +lon_0=19.04857177777778 +x_0=650000 +y_0=200000 +ellps=GRS67 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23700,'EPSG',23700,'PROJCS["HD72 / EOV",GEOGCS["HD72",DATUM["Hungarian_Datum_1972",SPHEROID["GRS 1967",6378160,298.247167427,AUTHORITY["EPSG","7036"]],TOWGS84[52.17,-71.82,-14.9,0,0,0,0],AUTHORITY["EPSG","6237"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4237"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",47.14439372222222],PARAMETER["longitude_of_center",19.04857177777778],PARAMETER["azimuth",90],PARAMETER["rectified_grid_angle",90],PARAMETER["scale_factor",0.99993],PARAMETER["false_easting",650000],PARAMETER["false_northing",200000],AUTHORITY["EPSG","23700"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=somerc +lat_0=47.14439372222222 +lon_0=19.04857177777778 +k_0=0.99993 +x_0=650000 +y_0=200000 +ellps=GRS67 +towgs84=52.17,-71.82,-14.9,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23830 : DGN95 / Indonesia TM-3 zone 46.2 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23830,'EPSG',23830,'PROJCS["DGN95 / Indonesia TM-3 zone 46.2",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",94.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",1500000],AUTHORITY["EPSG","23830"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=94.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23830,'EPSG',23830,'PROJCS["DGN95 / Indonesia TM-3 zone 46.2",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",94.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",1500000],AUTHORITY["EPSG","23830"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=94.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23831 : DGN95 / Indonesia TM-3 zone 47.1 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23831,'EPSG',23831,'PROJCS["DGN95 / Indonesia TM-3 zone 47.1",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",97.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",1500000],AUTHORITY["EPSG","23831"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=97.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23831,'EPSG',23831,'PROJCS["DGN95 / Indonesia TM-3 zone 47.1",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",97.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",1500000],AUTHORITY["EPSG","23831"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=97.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23832 : DGN95 / Indonesia TM-3 zone 47.2 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23832,'EPSG',23832,'PROJCS["DGN95 / Indonesia TM-3 zone 47.2",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",100.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",1500000],AUTHORITY["EPSG","23832"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=100.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23832,'EPSG',23832,'PROJCS["DGN95 / Indonesia TM-3 zone 47.2",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",100.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",1500000],AUTHORITY["EPSG","23832"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=100.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23833 : DGN95 / Indonesia TM-3 zone 48.1 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23833,'EPSG',23833,'PROJCS["DGN95 / Indonesia TM-3 zone 48.1",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",103.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",1500000],AUTHORITY["EPSG","23833"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=103.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23833,'EPSG',23833,'PROJCS["DGN95 / Indonesia TM-3 zone 48.1",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",103.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",1500000],AUTHORITY["EPSG","23833"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=103.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23834 : DGN95 / Indonesia TM-3 zone 48.2 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23834,'EPSG',23834,'PROJCS["DGN95 / Indonesia TM-3 zone 48.2",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",106.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",1500000],AUTHORITY["EPSG","23834"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=106.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23834,'EPSG',23834,'PROJCS["DGN95 / Indonesia TM-3 zone 48.2",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",106.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",1500000],AUTHORITY["EPSG","23834"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=106.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23835 : DGN95 / Indonesia TM-3 zone 49.1 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23835,'EPSG',23835,'PROJCS["DGN95 / Indonesia TM-3 zone 49.1",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",109.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",1500000],AUTHORITY["EPSG","23835"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=109.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23835,'EPSG',23835,'PROJCS["DGN95 / Indonesia TM-3 zone 49.1",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",109.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",1500000],AUTHORITY["EPSG","23835"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=109.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23836 : DGN95 / Indonesia TM-3 zone 49.2 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23836,'EPSG',23836,'PROJCS["DGN95 / Indonesia TM-3 zone 49.2",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",112.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",1500000],AUTHORITY["EPSG","23836"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=112.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23836,'EPSG',23836,'PROJCS["DGN95 / Indonesia TM-3 zone 49.2",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",112.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",1500000],AUTHORITY["EPSG","23836"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=112.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23837 : DGN95 / Indonesia TM-3 zone 50.1 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23837,'EPSG',23837,'PROJCS["DGN95 / Indonesia TM-3 zone 50.1",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",115.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",1500000],AUTHORITY["EPSG","23837"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=115.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23837,'EPSG',23837,'PROJCS["DGN95 / Indonesia TM-3 zone 50.1",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",115.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",1500000],AUTHORITY["EPSG","23837"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=115.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23838 : DGN95 / Indonesia TM-3 zone 50.2 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23838,'EPSG',23838,'PROJCS["DGN95 / Indonesia TM-3 zone 50.2",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",118.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",1500000],AUTHORITY["EPSG","23838"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=118.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23838,'EPSG',23838,'PROJCS["DGN95 / Indonesia TM-3 zone 50.2",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",118.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",1500000],AUTHORITY["EPSG","23838"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=118.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23839 : DGN95 / Indonesia TM-3 zone 51.1 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23839,'EPSG',23839,'PROJCS["DGN95 / Indonesia TM-3 zone 51.1",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",121.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",1500000],AUTHORITY["EPSG","23839"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=121.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23839,'EPSG',23839,'PROJCS["DGN95 / Indonesia TM-3 zone 51.1",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",121.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",1500000],AUTHORITY["EPSG","23839"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=121.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23840 : DGN95 / Indonesia TM-3 zone 51.2 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23840,'EPSG',23840,'PROJCS["DGN95 / Indonesia TM-3 zone 51.2",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",124.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",1500000],AUTHORITY["EPSG","23840"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=124.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23840,'EPSG',23840,'PROJCS["DGN95 / Indonesia TM-3 zone 51.2",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",124.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",1500000],AUTHORITY["EPSG","23840"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=124.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23841 : DGN95 / Indonesia TM-3 zone 52.1 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23841,'EPSG',23841,'PROJCS["DGN95 / Indonesia TM-3 zone 52.1",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",127.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",1500000],AUTHORITY["EPSG","23841"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=127.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23841,'EPSG',23841,'PROJCS["DGN95 / Indonesia TM-3 zone 52.1",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",127.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",1500000],AUTHORITY["EPSG","23841"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=127.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23842 : DGN95 / Indonesia TM-3 zone 52.2 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23842,'EPSG',23842,'PROJCS["DGN95 / Indonesia TM-3 zone 52.2",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",130.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",1500000],AUTHORITY["EPSG","23842"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=130.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23842,'EPSG',23842,'PROJCS["DGN95 / Indonesia TM-3 zone 52.2",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",130.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",1500000],AUTHORITY["EPSG","23842"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=130.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23843 : DGN95 / Indonesia TM-3 zone 53.1 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23843,'EPSG',23843,'PROJCS["DGN95 / Indonesia TM-3 zone 53.1",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",133.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",1500000],AUTHORITY["EPSG","23843"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=133.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23843,'EPSG',23843,'PROJCS["DGN95 / Indonesia TM-3 zone 53.1",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",133.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",1500000],AUTHORITY["EPSG","23843"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=133.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23844 : DGN95 / Indonesia TM-3 zone 53.2 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23844,'EPSG',23844,'PROJCS["DGN95 / Indonesia TM-3 zone 53.2",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",136.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",1500000],AUTHORITY["EPSG","23844"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=136.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23844,'EPSG',23844,'PROJCS["DGN95 / Indonesia TM-3 zone 53.2",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",136.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",1500000],AUTHORITY["EPSG","23844"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=136.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23845 : DGN95 / Indonesia TM-3 zone 54.1 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23845,'EPSG',23845,'PROJCS["DGN95 / Indonesia TM-3 zone 54.1",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",139.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",1500000],AUTHORITY["EPSG","23845"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=139.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23845,'EPSG',23845,'PROJCS["DGN95 / Indonesia TM-3 zone 54.1",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",139.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",1500000],AUTHORITY["EPSG","23845"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=139.5 +k=0.9999 +x_0=200000 +y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23846 : ID74 / UTM zone 46N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23846,'EPSG',23846,'PROJCS["ID74 / UTM zone 46N",GEOGCS["ID74",DATUM["Indonesian_Datum_1974",SPHEROID["Indonesian National Spheroid",6378160,298.247,AUTHORITY["EPSG","7021"]],AUTHORITY["EPSG","6238"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4238"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23846"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=46 +a=6378160 +b=6356774.50408554 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23846,'EPSG',23846,'PROJCS["ID74 / UTM zone 46N",GEOGCS["ID74",DATUM["Indonesian_Datum_1974",SPHEROID["Indonesian National Spheroid",6378160,298.247,AUTHORITY["EPSG","7021"]],TOWGS84[-24,-15,5,0,0,0,0],AUTHORITY["EPSG","6238"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4238"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23846"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=46 +a=6378160 +b=6356774.50408554 +towgs84=-24,-15,5,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23847 : ID74 / UTM zone 47N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23847,'EPSG',23847,'PROJCS["ID74 / UTM zone 47N",GEOGCS["ID74",DATUM["Indonesian_Datum_1974",SPHEROID["Indonesian National Spheroid",6378160,298.247,AUTHORITY["EPSG","7021"]],AUTHORITY["EPSG","6238"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4238"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23847"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=47 +a=6378160 +b=6356774.50408554 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23847,'EPSG',23847,'PROJCS["ID74 / UTM zone 47N",GEOGCS["ID74",DATUM["Indonesian_Datum_1974",SPHEROID["Indonesian National Spheroid",6378160,298.247,AUTHORITY["EPSG","7021"]],TOWGS84[-24,-15,5,0,0,0,0],AUTHORITY["EPSG","6238"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4238"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23847"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=47 +a=6378160 +b=6356774.50408554 +towgs84=-24,-15,5,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23848 : ID74 / UTM zone 48N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23848,'EPSG',23848,'PROJCS["ID74 / UTM zone 48N",GEOGCS["ID74",DATUM["Indonesian_Datum_1974",SPHEROID["Indonesian National Spheroid",6378160,298.247,AUTHORITY["EPSG","7021"]],AUTHORITY["EPSG","6238"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4238"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23848"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=48 +a=6378160 +b=6356774.50408554 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23848,'EPSG',23848,'PROJCS["ID74 / UTM zone 48N",GEOGCS["ID74",DATUM["Indonesian_Datum_1974",SPHEROID["Indonesian National Spheroid",6378160,298.247,AUTHORITY["EPSG","7021"]],TOWGS84[-24,-15,5,0,0,0,0],AUTHORITY["EPSG","6238"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4238"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23848"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=48 +a=6378160 +b=6356774.50408554 +towgs84=-24,-15,5,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23849 : ID74 / UTM zone 49N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23849,'EPSG',23849,'PROJCS["ID74 / UTM zone 49N",GEOGCS["ID74",DATUM["Indonesian_Datum_1974",SPHEROID["Indonesian National Spheroid",6378160,298.247,AUTHORITY["EPSG","7021"]],AUTHORITY["EPSG","6238"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4238"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23849"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=49 +a=6378160 +b=6356774.50408554 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23849,'EPSG',23849,'PROJCS["ID74 / UTM zone 49N",GEOGCS["ID74",DATUM["Indonesian_Datum_1974",SPHEROID["Indonesian National Spheroid",6378160,298.247,AUTHORITY["EPSG","7021"]],TOWGS84[-24,-15,5,0,0,0,0],AUTHORITY["EPSG","6238"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4238"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23849"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=49 +a=6378160 +b=6356774.50408554 +towgs84=-24,-15,5,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23850 : ID74 / UTM zone 50N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23850,'EPSG',23850,'PROJCS["ID74 / UTM zone 50N",GEOGCS["ID74",DATUM["Indonesian_Datum_1974",SPHEROID["Indonesian National Spheroid",6378160,298.247,AUTHORITY["EPSG","7021"]],AUTHORITY["EPSG","6238"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4238"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],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],AUTHORITY["EPSG","23850"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=50 +a=6378160 +b=6356774.50408554 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23850,'EPSG',23850,'PROJCS["ID74 / UTM zone 50N",GEOGCS["ID74",DATUM["Indonesian_Datum_1974",SPHEROID["Indonesian National Spheroid",6378160,298.247,AUTHORITY["EPSG","7021"]],TOWGS84[-24,-15,5,0,0,0,0],AUTHORITY["EPSG","6238"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4238"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],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],AUTHORITY["EPSG","23850"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=50 +a=6378160 +b=6356774.50408554 +towgs84=-24,-15,5,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23851 : ID74 / UTM zone 51N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23851,'EPSG',23851,'PROJCS["ID74 / UTM zone 51N",GEOGCS["ID74",DATUM["Indonesian_Datum_1974",SPHEROID["Indonesian National Spheroid",6378160,298.247,AUTHORITY["EPSG","7021"]],AUTHORITY["EPSG","6238"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4238"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23851"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=51 +a=6378160 +b=6356774.50408554 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23851,'EPSG',23851,'PROJCS["ID74 / UTM zone 51N",GEOGCS["ID74",DATUM["Indonesian_Datum_1974",SPHEROID["Indonesian National Spheroid",6378160,298.247,AUTHORITY["EPSG","7021"]],TOWGS84[-24,-15,5,0,0,0,0],AUTHORITY["EPSG","6238"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4238"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23851"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=51 +a=6378160 +b=6356774.50408554 +towgs84=-24,-15,5,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23852 : ID74 / UTM zone 52N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23852,'EPSG',23852,'PROJCS["ID74 / UTM zone 52N",GEOGCS["ID74",DATUM["Indonesian_Datum_1974",SPHEROID["Indonesian National Spheroid",6378160,298.247,AUTHORITY["EPSG","7021"]],AUTHORITY["EPSG","6238"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4238"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23852"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=52 +a=6378160 +b=6356774.50408554 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23852,'EPSG',23852,'PROJCS["ID74 / UTM zone 52N",GEOGCS["ID74",DATUM["Indonesian_Datum_1974",SPHEROID["Indonesian National Spheroid",6378160,298.247,AUTHORITY["EPSG","7021"]],TOWGS84[-24,-15,5,0,0,0,0],AUTHORITY["EPSG","6238"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4238"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23852"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=52 +a=6378160 +b=6356774.50408554 +towgs84=-24,-15,5,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23853 : ID74 / UTM zone 53N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23853,'EPSG',23853,'PROJCS["ID74 / UTM zone 53N (deprecated)",GEOGCS["ID74",DATUM["Indonesian_Datum_1974",SPHEROID["Indonesian National Spheroid",6378160,298.247,AUTHORITY["EPSG","7021"]],AUTHORITY["EPSG","6238"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4238"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23853"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=53 +a=6378160 +b=6356774.50408554 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23853,'EPSG',23853,'PROJCS["ID74 / UTM zone 53N (deprecated)",GEOGCS["ID74",DATUM["Indonesian_Datum_1974",SPHEROID["Indonesian National Spheroid",6378160,298.247,AUTHORITY["EPSG","7021"]],TOWGS84[-24,-15,5,0,0,0,0],AUTHORITY["EPSG","6238"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4238"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23853"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=53 +a=6378160 +b=6356774.50408554 +towgs84=-24,-15,5,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23866 : DGN95 / UTM zone 46N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23866,'EPSG',23866,'PROJCS["DGN95 / UTM zone 46N",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23866"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=46 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23866,'EPSG',23866,'PROJCS["DGN95 / UTM zone 46N",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23866"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=46 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23867 : DGN95 / UTM zone 47N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23867,'EPSG',23867,'PROJCS["DGN95 / UTM zone 47N",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23867"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=47 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23867,'EPSG',23867,'PROJCS["DGN95 / UTM zone 47N",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23867"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=47 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23868 : DGN95 / UTM zone 48N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23868,'EPSG',23868,'PROJCS["DGN95 / UTM zone 48N",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23868"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=48 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23868,'EPSG',23868,'PROJCS["DGN95 / UTM zone 48N",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23868"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=48 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23869 : DGN95 / UTM zone 49N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23869,'EPSG',23869,'PROJCS["DGN95 / UTM zone 49N",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23869"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=49 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23869,'EPSG',23869,'PROJCS["DGN95 / UTM zone 49N",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23869"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=49 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23870 : DGN95 / UTM zone 50N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23870,'EPSG',23870,'PROJCS["DGN95 / UTM zone 50N",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],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],AUTHORITY["EPSG","23870"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=50 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23870,'EPSG',23870,'PROJCS["DGN95 / UTM zone 50N",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],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],AUTHORITY["EPSG","23870"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=50 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23871 : DGN95 / UTM zone 51N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23871,'EPSG',23871,'PROJCS["DGN95 / UTM zone 51N",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23871"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=51 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23871,'EPSG',23871,'PROJCS["DGN95 / UTM zone 51N",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23871"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=51 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23872 : DGN95 / UTM zone 52N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23872,'EPSG',23872,'PROJCS["DGN95 / UTM zone 52N",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23872"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=52 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23872,'EPSG',23872,'PROJCS["DGN95 / UTM zone 52N",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23872"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=52 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23877 : DGN95 / UTM zone 47S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23877,'EPSG',23877,'PROJCS["DGN95 / UTM zone 47S",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","23877"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=47 +south +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23877,'EPSG',23877,'PROJCS["DGN95 / UTM zone 47S",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","23877"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=47 +south +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23878 : DGN95 / UTM zone 48S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23878,'EPSG',23878,'PROJCS["DGN95 / UTM zone 48S",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","23878"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=48 +south +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23878,'EPSG',23878,'PROJCS["DGN95 / UTM zone 48S",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","23878"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=48 +south +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23879 : DGN95 / UTM zone 49S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23879,'EPSG',23879,'PROJCS["DGN95 / UTM zone 49S",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","23879"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=49 +south +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23879,'EPSG',23879,'PROJCS["DGN95 / UTM zone 49S",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","23879"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=49 +south +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23880 : DGN95 / UTM zone 50S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23880,'EPSG',23880,'PROJCS["DGN95 / UTM zone 50S",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","23880"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=50 +south +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23880,'EPSG',23880,'PROJCS["DGN95 / UTM zone 50S",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","23880"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=50 +south +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23881 : DGN95 / UTM zone 51S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23881,'EPSG',23881,'PROJCS["DGN95 / UTM zone 51S",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","23881"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=51 +south +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23881,'EPSG',23881,'PROJCS["DGN95 / UTM zone 51S",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","23881"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=51 +south +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23882 : DGN95 / UTM zone 52S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23882,'EPSG',23882,'PROJCS["DGN95 / UTM zone 52S",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","23882"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=52 +south +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23882,'EPSG',23882,'PROJCS["DGN95 / UTM zone 52S",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","23882"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=52 +south +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23883 : DGN95 / UTM zone 53S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23883,'EPSG',23883,'PROJCS["DGN95 / UTM zone 53S",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","23883"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=53 +south +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23883,'EPSG',23883,'PROJCS["DGN95 / UTM zone 53S",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","23883"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=53 +south +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23884 : DGN95 / UTM zone 54S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23884,'EPSG',23884,'PROJCS["DGN95 / UTM zone 54S",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","23884"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=54 +south +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23884,'EPSG',23884,'PROJCS["DGN95 / UTM zone 54S",GEOGCS["DGN95",DATUM["Datum_Geodesi_Nasional_1995",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6755"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4755"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","23884"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=54 +south +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23886 : ID74 / UTM zone 46S (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23886,'EPSG',23886,'PROJCS["ID74 / UTM zone 46S (deprecated)",GEOGCS["ID74",DATUM["Indonesian_Datum_1974",SPHEROID["Indonesian National Spheroid",6378160,298.247,AUTHORITY["EPSG","7021"]],AUTHORITY["EPSG","6238"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4238"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","23886"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=46 +south +a=6378160 +b=6356774.50408554 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23886,'EPSG',23886,'PROJCS["ID74 / UTM zone 46S (deprecated)",GEOGCS["ID74",DATUM["Indonesian_Datum_1974",SPHEROID["Indonesian National Spheroid",6378160,298.247,AUTHORITY["EPSG","7021"]],TOWGS84[-24,-15,5,0,0,0,0],AUTHORITY["EPSG","6238"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4238"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","23886"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=46 +south +a=6378160 +b=6356774.50408554 +towgs84=-24,-15,5,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23887 : ID74 / UTM zone 47S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23887,'EPSG',23887,'PROJCS["ID74 / UTM zone 47S",GEOGCS["ID74",DATUM["Indonesian_Datum_1974",SPHEROID["Indonesian National Spheroid",6378160,298.247,AUTHORITY["EPSG","7021"]],AUTHORITY["EPSG","6238"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4238"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","23887"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=47 +south +a=6378160 +b=6356774.50408554 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23887,'EPSG',23887,'PROJCS["ID74 / UTM zone 47S",GEOGCS["ID74",DATUM["Indonesian_Datum_1974",SPHEROID["Indonesian National Spheroid",6378160,298.247,AUTHORITY["EPSG","7021"]],TOWGS84[-24,-15,5,0,0,0,0],AUTHORITY["EPSG","6238"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4238"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","23887"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=47 +south +a=6378160 +b=6356774.50408554 +towgs84=-24,-15,5,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23888 : ID74 / UTM zone 48S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23888,'EPSG',23888,'PROJCS["ID74 / UTM zone 48S",GEOGCS["ID74",DATUM["Indonesian_Datum_1974",SPHEROID["Indonesian National Spheroid",6378160,298.247,AUTHORITY["EPSG","7021"]],AUTHORITY["EPSG","6238"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4238"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","23888"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=48 +south +a=6378160 +b=6356774.50408554 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23888,'EPSG',23888,'PROJCS["ID74 / UTM zone 48S",GEOGCS["ID74",DATUM["Indonesian_Datum_1974",SPHEROID["Indonesian National Spheroid",6378160,298.247,AUTHORITY["EPSG","7021"]],TOWGS84[-24,-15,5,0,0,0,0],AUTHORITY["EPSG","6238"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4238"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","23888"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=48 +south +a=6378160 +b=6356774.50408554 +towgs84=-24,-15,5,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23889 : ID74 / UTM zone 49S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23889,'EPSG',23889,'PROJCS["ID74 / UTM zone 49S",GEOGCS["ID74",DATUM["Indonesian_Datum_1974",SPHEROID["Indonesian National Spheroid",6378160,298.247,AUTHORITY["EPSG","7021"]],AUTHORITY["EPSG","6238"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4238"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","23889"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=49 +south +a=6378160 +b=6356774.50408554 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23889,'EPSG',23889,'PROJCS["ID74 / UTM zone 49S",GEOGCS["ID74",DATUM["Indonesian_Datum_1974",SPHEROID["Indonesian National Spheroid",6378160,298.247,AUTHORITY["EPSG","7021"]],TOWGS84[-24,-15,5,0,0,0,0],AUTHORITY["EPSG","6238"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4238"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","23889"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=49 +south +a=6378160 +b=6356774.50408554 +towgs84=-24,-15,5,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23890 : ID74 / UTM zone 50S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23890,'EPSG',23890,'PROJCS["ID74 / UTM zone 50S",GEOGCS["ID74",DATUM["Indonesian_Datum_1974",SPHEROID["Indonesian National Spheroid",6378160,298.247,AUTHORITY["EPSG","7021"]],AUTHORITY["EPSG","6238"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4238"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","23890"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=50 +south +a=6378160 +b=6356774.50408554 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23890,'EPSG',23890,'PROJCS["ID74 / UTM zone 50S",GEOGCS["ID74",DATUM["Indonesian_Datum_1974",SPHEROID["Indonesian National Spheroid",6378160,298.247,AUTHORITY["EPSG","7021"]],TOWGS84[-24,-15,5,0,0,0,0],AUTHORITY["EPSG","6238"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4238"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","23890"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=50 +south +a=6378160 +b=6356774.50408554 +towgs84=-24,-15,5,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23891 : ID74 / UTM zone 51S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23891,'EPSG',23891,'PROJCS["ID74 / UTM zone 51S",GEOGCS["ID74",DATUM["Indonesian_Datum_1974",SPHEROID["Indonesian National Spheroid",6378160,298.247,AUTHORITY["EPSG","7021"]],AUTHORITY["EPSG","6238"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4238"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","23891"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=51 +south +a=6378160 +b=6356774.50408554 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23891,'EPSG',23891,'PROJCS["ID74 / UTM zone 51S",GEOGCS["ID74",DATUM["Indonesian_Datum_1974",SPHEROID["Indonesian National Spheroid",6378160,298.247,AUTHORITY["EPSG","7021"]],TOWGS84[-24,-15,5,0,0,0,0],AUTHORITY["EPSG","6238"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4238"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","23891"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=51 +south +a=6378160 +b=6356774.50408554 +towgs84=-24,-15,5,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23892 : ID74 / UTM zone 52S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23892,'EPSG',23892,'PROJCS["ID74 / UTM zone 52S",GEOGCS["ID74",DATUM["Indonesian_Datum_1974",SPHEROID["Indonesian National Spheroid",6378160,298.247,AUTHORITY["EPSG","7021"]],AUTHORITY["EPSG","6238"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4238"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","23892"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=52 +south +a=6378160 +b=6356774.50408554 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23892,'EPSG',23892,'PROJCS["ID74 / UTM zone 52S",GEOGCS["ID74",DATUM["Indonesian_Datum_1974",SPHEROID["Indonesian National Spheroid",6378160,298.247,AUTHORITY["EPSG","7021"]],TOWGS84[-24,-15,5,0,0,0,0],AUTHORITY["EPSG","6238"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4238"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","23892"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=52 +south +a=6378160 +b=6356774.50408554 +towgs84=-24,-15,5,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23893 : ID74 / UTM zone 53S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23893,'EPSG',23893,'PROJCS["ID74 / UTM zone 53S",GEOGCS["ID74",DATUM["Indonesian_Datum_1974",SPHEROID["Indonesian National Spheroid",6378160,298.247,AUTHORITY["EPSG","7021"]],AUTHORITY["EPSG","6238"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4238"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","23893"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=53 +south +a=6378160 +b=6356774.50408554 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23893,'EPSG',23893,'PROJCS["ID74 / UTM zone 53S",GEOGCS["ID74",DATUM["Indonesian_Datum_1974",SPHEROID["Indonesian National Spheroid",6378160,298.247,AUTHORITY["EPSG","7021"]],TOWGS84[-24,-15,5,0,0,0,0],AUTHORITY["EPSG","6238"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4238"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","23893"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=53 +south +a=6378160 +b=6356774.50408554 +towgs84=-24,-15,5,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23894 : ID74 / UTM zone 54S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23894,'EPSG',23894,'PROJCS["ID74 / UTM zone 54S",GEOGCS["ID74",DATUM["Indonesian_Datum_1974",SPHEROID["Indonesian National Spheroid",6378160,298.247,AUTHORITY["EPSG","7021"]],AUTHORITY["EPSG","6238"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4238"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","23894"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=54 +south +a=6378160 +b=6356774.50408554 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23894,'EPSG',23894,'PROJCS["ID74 / UTM zone 54S",GEOGCS["ID74",DATUM["Indonesian_Datum_1974",SPHEROID["Indonesian National Spheroid",6378160,298.247,AUTHORITY["EPSG","7021"]],TOWGS84[-24,-15,5,0,0,0,0],AUTHORITY["EPSG","6238"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4238"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","23894"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=54 +south +a=6378160 +b=6356774.50408554 +towgs84=-24,-15,5,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23946 : Indian 1954 / UTM zone 46N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23946,'EPSG',23946,'PROJCS["Indian 1954 / UTM zone 46N",GEOGCS["Indian 1954",DATUM["Indian_1954",SPHEROID["Everest 1830 (1937 Adjustment)",6377276.345,300.8017,AUTHORITY["EPSG","7015"]],TOWGS84[217,823,299,0,0,0,0],AUTHORITY["EPSG","6239"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4239"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23946"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=46 +a=6377276.345 +b=6356075.41314024 +towgs84=217,823,299,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23946,'EPSG',23946,'PROJCS["Indian 1954 / UTM zone 46N",GEOGCS["Indian 1954",DATUM["Indian_1954",SPHEROID["Everest 1830 (1937 Adjustment)",6377276.345,300.8017,AUTHORITY["EPSG","7015"]],TOWGS84[217,823,299,0,0,0,0],AUTHORITY["EPSG","6239"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4239"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23946"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=46 +a=6377276.345 +b=6356075.41314024 +towgs84=217,823,299,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23947 : Indian 1954 / UTM zone 47N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23947,'EPSG',23947,'PROJCS["Indian 1954 / UTM zone 47N",GEOGCS["Indian 1954",DATUM["Indian_1954",SPHEROID["Everest 1830 (1937 Adjustment)",6377276.345,300.8017,AUTHORITY["EPSG","7015"]],TOWGS84[217,823,299,0,0,0,0],AUTHORITY["EPSG","6239"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4239"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23947"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=47 +a=6377276.345 +b=6356075.41314024 +towgs84=217,823,299,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23947,'EPSG',23947,'PROJCS["Indian 1954 / UTM zone 47N",GEOGCS["Indian 1954",DATUM["Indian_1954",SPHEROID["Everest 1830 (1937 Adjustment)",6377276.345,300.8017,AUTHORITY["EPSG","7015"]],TOWGS84[217,823,299,0,0,0,0],AUTHORITY["EPSG","6239"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4239"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23947"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=47 +a=6377276.345 +b=6356075.41314024 +towgs84=217,823,299,0,0,0,0 +units=m +no_defs '); --- --- EPSG 23948 : Indian 1954 / UTM zone 48N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23948,'EPSG',23948,'PROJCS["Indian 1954 / UTM zone 48N",GEOGCS["Indian 1954",DATUM["Indian_1954",SPHEROID["Everest 1830 (1937 Adjustment)",6377276.345,300.8017,AUTHORITY["EPSG","7015"]],TOWGS84[217,823,299,0,0,0,0],AUTHORITY["EPSG","6239"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4239"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23948"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=48 +a=6377276.345 +b=6356075.41314024 +towgs84=217,823,299,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (23948,'EPSG',23948,'PROJCS["Indian 1954 / UTM zone 48N",GEOGCS["Indian 1954",DATUM["Indian_1954",SPHEROID["Everest 1830 (1937 Adjustment)",6377276.345,300.8017,AUTHORITY["EPSG","7015"]],TOWGS84[217,823,299,0,0,0,0],AUTHORITY["EPSG","6239"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4239"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","23948"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=48 +a=6377276.345 +b=6356075.41314024 +towgs84=217,823,299,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24047 : Indian 1975 / UTM zone 47N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24047,'EPSG',24047,'PROJCS["Indian 1975 / UTM zone 47N",GEOGCS["Indian 1975",DATUM["Indian_1975",SPHEROID["Everest 1830 (1937 Adjustment)",6377276.345,300.8017,AUTHORITY["EPSG","7015"]],AUTHORITY["EPSG","6240"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4240"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24047"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=47 +a=6377276.345 +b=6356075.41314024 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24047,'EPSG',24047,'PROJCS["Indian 1975 / UTM zone 47N",GEOGCS["Indian 1975",DATUM["Indian_1975",SPHEROID["Everest 1830 (1937 Adjustment)",6377276.345,300.8017,AUTHORITY["EPSG","7015"]],TOWGS84[210,814,289,0,0,0,0],AUTHORITY["EPSG","6240"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4240"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24047"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=47 +a=6377276.345 +b=6356075.41314024 +towgs84=210,814,289,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24048 : Indian 1975 / UTM zone 48N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24048,'EPSG',24048,'PROJCS["Indian 1975 / UTM zone 48N",GEOGCS["Indian 1975",DATUM["Indian_1975",SPHEROID["Everest 1830 (1937 Adjustment)",6377276.345,300.8017,AUTHORITY["EPSG","7015"]],AUTHORITY["EPSG","6240"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4240"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24048"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=48 +a=6377276.345 +b=6356075.41314024 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24048,'EPSG',24048,'PROJCS["Indian 1975 / UTM zone 48N",GEOGCS["Indian 1975",DATUM["Indian_1975",SPHEROID["Everest 1830 (1937 Adjustment)",6377276.345,300.8017,AUTHORITY["EPSG","7015"]],TOWGS84[210,814,289,0,0,0,0],AUTHORITY["EPSG","6240"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4240"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24048"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=48 +a=6377276.345 +b=6356075.41314024 +towgs84=210,814,289,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24100 : Jamaica 1875 / Jamaica (Old Grid) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24100,'EPSG',24100,'PROJCS["Jamaica 1875 / Jamaica (Old Grid)",GEOGCS["Jamaica 1875",DATUM["Jamaica_1875",SPHEROID["Clarke 1880",6378249.144808011,293.4663076556349,AUTHORITY["EPSG","7034"]],AUTHORITY["EPSG","6241"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4241"]],UNIT["Clarke''s foot",0.3047972654,AUTHORITY["EPSG","9005"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",18],PARAMETER["central_meridian",-77],PARAMETER["scale_factor",1],PARAMETER["false_easting",550000],PARAMETER["false_northing",400000],AUTHORITY["EPSG","24100"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=18 +lat_0=18 +lon_0=-77 +k_0=1 +x_0=167638.49597 +y_0=121918.90616 +a=6378249.144808011 +b=6356514.966204134 +to_meter=0.3047972654 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24100,'EPSG',24100,'PROJCS["Jamaica 1875 / Jamaica (Old Grid)",GEOGCS["Jamaica 1875",DATUM["Jamaica_1875",SPHEROID["Clarke 1880",6378249.144808011,293.4663076556349,AUTHORITY["EPSG","7034"]],AUTHORITY["EPSG","6241"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4241"]],UNIT["Clarke''s foot",0.3047972654,AUTHORITY["EPSG","9005"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",18],PARAMETER["central_meridian",-77],PARAMETER["scale_factor",1],PARAMETER["false_easting",550000],PARAMETER["false_northing",400000],AUTHORITY["EPSG","24100"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=18 +lat_0=18 +lon_0=-77 +k_0=1 +x_0=167638.49597 +y_0=121918.90616 +a=6378249.144808011 +b=6356514.966204134 +to_meter=0.3047972654 +no_defs '); --- --- EPSG 24200 : JAD69 / Jamaica National Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24200,'EPSG',24200,'PROJCS["JAD69 / Jamaica National Grid",GEOGCS["JAD69",DATUM["Jamaica_1969",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6242"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4242"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",18],PARAMETER["central_meridian",-77],PARAMETER["scale_factor",1],PARAMETER["false_easting",250000],PARAMETER["false_northing",150000],AUTHORITY["EPSG","24200"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=18 +lat_0=18 +lon_0=-77 +k_0=1 +x_0=250000 +y_0=150000 +ellps=clrk66 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24200,'EPSG',24200,'PROJCS["JAD69 / Jamaica National Grid",GEOGCS["JAD69",DATUM["Jamaica_1969",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[70,207,389.5,0,0,0,0],AUTHORITY["EPSG","6242"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4242"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",18],PARAMETER["central_meridian",-77],PARAMETER["scale_factor",1],PARAMETER["false_easting",250000],PARAMETER["false_northing",150000],AUTHORITY["EPSG","24200"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=18 +lat_0=18 +lon_0=-77 +k_0=1 +x_0=250000 +y_0=150000 +ellps=clrk66 +towgs84=70,207,389.5,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24305 : Kalianpur 1937 / UTM zone 45N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24305,'EPSG',24305,'PROJCS["Kalianpur 1937 / UTM zone 45N",GEOGCS["Kalianpur 1937",DATUM["Kalianpur_1937",SPHEROID["Everest 1830 (1937 Adjustment)",6377276.345,300.8017,AUTHORITY["EPSG","7015"]],AUTHORITY["EPSG","6144"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4144"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24305"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=45 +a=6377276.345 +b=6356075.41314024 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24305,'EPSG',24305,'PROJCS["Kalianpur 1937 / UTM zone 45N",GEOGCS["Kalianpur 1937",DATUM["Kalianpur_1937",SPHEROID["Everest 1830 (1937 Adjustment)",6377276.345,300.8017,AUTHORITY["EPSG","7015"]],TOWGS84[282,726,254,0,0,0,0],AUTHORITY["EPSG","6144"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4144"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24305"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=45 +a=6377276.345 +b=6356075.41314024 +towgs84=282,726,254,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24306 : Kalianpur 1937 / UTM zone 46N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24306,'EPSG',24306,'PROJCS["Kalianpur 1937 / UTM zone 46N",GEOGCS["Kalianpur 1937",DATUM["Kalianpur_1937",SPHEROID["Everest 1830 (1937 Adjustment)",6377276.345,300.8017,AUTHORITY["EPSG","7015"]],AUTHORITY["EPSG","6144"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4144"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24306"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=46 +a=6377276.345 +b=6356075.41314024 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24306,'EPSG',24306,'PROJCS["Kalianpur 1937 / UTM zone 46N",GEOGCS["Kalianpur 1937",DATUM["Kalianpur_1937",SPHEROID["Everest 1830 (1937 Adjustment)",6377276.345,300.8017,AUTHORITY["EPSG","7015"]],TOWGS84[282,726,254,0,0,0,0],AUTHORITY["EPSG","6144"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4144"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24306"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=46 +a=6377276.345 +b=6356075.41314024 +towgs84=282,726,254,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24311 : Kalianpur 1962 / UTM zone 41N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24311,'EPSG',24311,'PROJCS["Kalianpur 1962 / UTM zone 41N",GEOGCS["Kalianpur 1962",DATUM["Kalianpur_1962",SPHEROID["Everest 1830 (1962 Definition)",6377301.243,300.8017255,AUTHORITY["EPSG","7044"]],AUTHORITY["EPSG","6145"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4145"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24311"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=41 +a=6377301.243 +b=6356100.230165384 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24311,'EPSG',24311,'PROJCS["Kalianpur 1962 / UTM zone 41N",GEOGCS["Kalianpur 1962",DATUM["Kalianpur_1962",SPHEROID["Everest 1830 (1962 Definition)",6377301.243,300.8017255,AUTHORITY["EPSG","7044"]],TOWGS84[283,682,231,0,0,0,0],AUTHORITY["EPSG","6145"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4145"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24311"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=41 +a=6377301.243 +b=6356100.230165384 +towgs84=283,682,231,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24312 : Kalianpur 1962 / UTM zone 42N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24312,'EPSG',24312,'PROJCS["Kalianpur 1962 / UTM zone 42N",GEOGCS["Kalianpur 1962",DATUM["Kalianpur_1962",SPHEROID["Everest 1830 (1962 Definition)",6377301.243,300.8017255,AUTHORITY["EPSG","7044"]],AUTHORITY["EPSG","6145"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4145"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24312"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=42 +a=6377301.243 +b=6356100.230165384 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24312,'EPSG',24312,'PROJCS["Kalianpur 1962 / UTM zone 42N",GEOGCS["Kalianpur 1962",DATUM["Kalianpur_1962",SPHEROID["Everest 1830 (1962 Definition)",6377301.243,300.8017255,AUTHORITY["EPSG","7044"]],TOWGS84[283,682,231,0,0,0,0],AUTHORITY["EPSG","6145"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4145"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24312"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=42 +a=6377301.243 +b=6356100.230165384 +towgs84=283,682,231,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24313 : Kalianpur 1962 / UTM zone 43N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24313,'EPSG',24313,'PROJCS["Kalianpur 1962 / UTM zone 43N",GEOGCS["Kalianpur 1962",DATUM["Kalianpur_1962",SPHEROID["Everest 1830 (1962 Definition)",6377301.243,300.8017255,AUTHORITY["EPSG","7044"]],AUTHORITY["EPSG","6145"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4145"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24313"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=43 +a=6377301.243 +b=6356100.230165384 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24313,'EPSG',24313,'PROJCS["Kalianpur 1962 / UTM zone 43N",GEOGCS["Kalianpur 1962",DATUM["Kalianpur_1962",SPHEROID["Everest 1830 (1962 Definition)",6377301.243,300.8017255,AUTHORITY["EPSG","7044"]],TOWGS84[283,682,231,0,0,0,0],AUTHORITY["EPSG","6145"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4145"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24313"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=43 +a=6377301.243 +b=6356100.230165384 +towgs84=283,682,231,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24342 : Kalianpur 1975 / UTM zone 42N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24342,'EPSG',24342,'PROJCS["Kalianpur 1975 / UTM zone 42N",GEOGCS["Kalianpur 1975",DATUM["Kalianpur_1975",SPHEROID["Everest 1830 (1975 Definition)",6377299.151,300.8017255,AUTHORITY["EPSG","7045"]],TOWGS84[295,736,257,0,0,0,0],AUTHORITY["EPSG","6146"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4146"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24342"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=42 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24342,'EPSG',24342,'PROJCS["Kalianpur 1975 / UTM zone 42N",GEOGCS["Kalianpur 1975",DATUM["Kalianpur_1975",SPHEROID["Everest 1830 (1975 Definition)",6377299.151,300.8017255,AUTHORITY["EPSG","7045"]],TOWGS84[295,736,257,0,0,0,0],AUTHORITY["EPSG","6146"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4146"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24342"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=42 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24343 : Kalianpur 1975 / UTM zone 43N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24343,'EPSG',24343,'PROJCS["Kalianpur 1975 / UTM zone 43N",GEOGCS["Kalianpur 1975",DATUM["Kalianpur_1975",SPHEROID["Everest 1830 (1975 Definition)",6377299.151,300.8017255,AUTHORITY["EPSG","7045"]],TOWGS84[295,736,257,0,0,0,0],AUTHORITY["EPSG","6146"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4146"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24343"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=43 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24343,'EPSG',24343,'PROJCS["Kalianpur 1975 / UTM zone 43N",GEOGCS["Kalianpur 1975",DATUM["Kalianpur_1975",SPHEROID["Everest 1830 (1975 Definition)",6377299.151,300.8017255,AUTHORITY["EPSG","7045"]],TOWGS84[295,736,257,0,0,0,0],AUTHORITY["EPSG","6146"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4146"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24343"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=43 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24344 : Kalianpur 1975 / UTM zone 44N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24344,'EPSG',24344,'PROJCS["Kalianpur 1975 / UTM zone 44N",GEOGCS["Kalianpur 1975",DATUM["Kalianpur_1975",SPHEROID["Everest 1830 (1975 Definition)",6377299.151,300.8017255,AUTHORITY["EPSG","7045"]],TOWGS84[295,736,257,0,0,0,0],AUTHORITY["EPSG","6146"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4146"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24344"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=44 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24344,'EPSG',24344,'PROJCS["Kalianpur 1975 / UTM zone 44N",GEOGCS["Kalianpur 1975",DATUM["Kalianpur_1975",SPHEROID["Everest 1830 (1975 Definition)",6377299.151,300.8017255,AUTHORITY["EPSG","7045"]],TOWGS84[295,736,257,0,0,0,0],AUTHORITY["EPSG","6146"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4146"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24344"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=44 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24345 : Kalianpur 1975 / UTM zone 45N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24345,'EPSG',24345,'PROJCS["Kalianpur 1975 / UTM zone 45N",GEOGCS["Kalianpur 1975",DATUM["Kalianpur_1975",SPHEROID["Everest 1830 (1975 Definition)",6377299.151,300.8017255,AUTHORITY["EPSG","7045"]],TOWGS84[295,736,257,0,0,0,0],AUTHORITY["EPSG","6146"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4146"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24345"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=45 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24345,'EPSG',24345,'PROJCS["Kalianpur 1975 / UTM zone 45N",GEOGCS["Kalianpur 1975",DATUM["Kalianpur_1975",SPHEROID["Everest 1830 (1975 Definition)",6377299.151,300.8017255,AUTHORITY["EPSG","7045"]],TOWGS84[295,736,257,0,0,0,0],AUTHORITY["EPSG","6146"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4146"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24345"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=45 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24346 : Kalianpur 1975 / UTM zone 46N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24346,'EPSG',24346,'PROJCS["Kalianpur 1975 / UTM zone 46N",GEOGCS["Kalianpur 1975",DATUM["Kalianpur_1975",SPHEROID["Everest 1830 (1975 Definition)",6377299.151,300.8017255,AUTHORITY["EPSG","7045"]],TOWGS84[295,736,257,0,0,0,0],AUTHORITY["EPSG","6146"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4146"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24346"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=46 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24346,'EPSG',24346,'PROJCS["Kalianpur 1975 / UTM zone 46N",GEOGCS["Kalianpur 1975",DATUM["Kalianpur_1975",SPHEROID["Everest 1830 (1975 Definition)",6377299.151,300.8017255,AUTHORITY["EPSG","7045"]],TOWGS84[295,736,257,0,0,0,0],AUTHORITY["EPSG","6146"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4146"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24346"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=46 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24347 : Kalianpur 1975 / UTM zone 47N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24347,'EPSG',24347,'PROJCS["Kalianpur 1975 / UTM zone 47N",GEOGCS["Kalianpur 1975",DATUM["Kalianpur_1975",SPHEROID["Everest 1830 (1975 Definition)",6377299.151,300.8017255,AUTHORITY["EPSG","7045"]],TOWGS84[295,736,257,0,0,0,0],AUTHORITY["EPSG","6146"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4146"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24347"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=47 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24347,'EPSG',24347,'PROJCS["Kalianpur 1975 / UTM zone 47N",GEOGCS["Kalianpur 1975",DATUM["Kalianpur_1975",SPHEROID["Everest 1830 (1975 Definition)",6377299.151,300.8017255,AUTHORITY["EPSG","7045"]],TOWGS84[295,736,257,0,0,0,0],AUTHORITY["EPSG","6146"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4146"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24347"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=47 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24370 : Kalianpur 1880 / India zone 0 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24370,'EPSG',24370,'PROJCS["Kalianpur 1880 / India zone 0",GEOGCS["Kalianpur 1880",DATUM["Kalianpur_1880",SPHEROID["Everest (1830 Definition)",6377299.36559538,300.8017255433552,AUTHORITY["EPSG","7042"]],AUTHORITY["EPSG","6243"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4243"]],UNIT["Indian yard",0.9143985307444408,AUTHORITY["EPSG","9084"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",39.5],PARAMETER["central_meridian",68],PARAMETER["scale_factor",0.99846154],PARAMETER["false_easting",2355500],PARAMETER["false_northing",2590000],AUTHORITY["EPSG","24370"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=39.5 +lat_0=39.5 +lon_0=68 +k_0=0.99846154 +x_0=2153865.73916853 +y_0=2368292.194628102 +a=6377299.36559538 +b=6356098.359005156 +to_meter=0.9143985307444408 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24370,'EPSG',24370,'PROJCS["Kalianpur 1880 / India zone 0",GEOGCS["Kalianpur 1880",DATUM["Kalianpur_1880",SPHEROID["Everest (1830 Definition)",6377299.36559538,300.8017255433552,AUTHORITY["EPSG","7042"]],AUTHORITY["EPSG","6243"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4243"]],UNIT["Indian yard",0.9143985307444408,AUTHORITY["EPSG","9084"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",39.5],PARAMETER["central_meridian",68],PARAMETER["scale_factor",0.99846154],PARAMETER["false_easting",2355500],PARAMETER["false_northing",2590000],AUTHORITY["EPSG","24370"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=39.5 +lat_0=39.5 +lon_0=68 +k_0=0.99846154 +x_0=2153865.73916853 +y_0=2368292.194628102 +a=6377299.36559538 +b=6356098.359005156 +to_meter=0.9143985307444408 +no_defs '); --- --- EPSG 24371 : Kalianpur 1880 / India zone I --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24371,'EPSG',24371,'PROJCS["Kalianpur 1880 / India zone I",GEOGCS["Kalianpur 1880",DATUM["Kalianpur_1880",SPHEROID["Everest (1830 Definition)",6377299.36559538,300.8017255433552,AUTHORITY["EPSG","7042"]],AUTHORITY["EPSG","6243"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4243"]],UNIT["Indian yard",0.9143985307444408,AUTHORITY["EPSG","9084"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",32.5],PARAMETER["central_meridian",68],PARAMETER["scale_factor",0.99878641],PARAMETER["false_easting",3000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","24371"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=32.5 +lat_0=32.5 +lon_0=68 +k_0=0.99878641 +x_0=2743195.592233322 +y_0=914398.5307444407 +a=6377299.36559538 +b=6356098.359005156 +to_meter=0.9143985307444408 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24371,'EPSG',24371,'PROJCS["Kalianpur 1880 / India zone I",GEOGCS["Kalianpur 1880",DATUM["Kalianpur_1880",SPHEROID["Everest (1830 Definition)",6377299.36559538,300.8017255433552,AUTHORITY["EPSG","7042"]],AUTHORITY["EPSG","6243"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4243"]],UNIT["Indian yard",0.9143985307444408,AUTHORITY["EPSG","9084"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",32.5],PARAMETER["central_meridian",68],PARAMETER["scale_factor",0.99878641],PARAMETER["false_easting",3000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","24371"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=32.5 +lat_0=32.5 +lon_0=68 +k_0=0.99878641 +x_0=2743195.592233322 +y_0=914398.5307444407 +a=6377299.36559538 +b=6356098.359005156 +to_meter=0.9143985307444408 +no_defs '); --- --- EPSG 24372 : Kalianpur 1880 / India zone IIa --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24372,'EPSG',24372,'PROJCS["Kalianpur 1880 / India zone IIa",GEOGCS["Kalianpur 1880",DATUM["Kalianpur_1880",SPHEROID["Everest (1830 Definition)",6377299.36559538,300.8017255433552,AUTHORITY["EPSG","7042"]],AUTHORITY["EPSG","6243"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4243"]],UNIT["Indian yard",0.9143985307444408,AUTHORITY["EPSG","9084"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",26],PARAMETER["central_meridian",74],PARAMETER["scale_factor",0.99878641],PARAMETER["false_easting",3000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","24372"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=26 +lat_0=26 +lon_0=74 +k_0=0.99878641 +x_0=2743195.592233322 +y_0=914398.5307444407 +a=6377299.36559538 +b=6356098.359005156 +to_meter=0.9143985307444408 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24372,'EPSG',24372,'PROJCS["Kalianpur 1880 / India zone IIa",GEOGCS["Kalianpur 1880",DATUM["Kalianpur_1880",SPHEROID["Everest (1830 Definition)",6377299.36559538,300.8017255433552,AUTHORITY["EPSG","7042"]],AUTHORITY["EPSG","6243"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4243"]],UNIT["Indian yard",0.9143985307444408,AUTHORITY["EPSG","9084"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",26],PARAMETER["central_meridian",74],PARAMETER["scale_factor",0.99878641],PARAMETER["false_easting",3000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","24372"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=26 +lat_0=26 +lon_0=74 +k_0=0.99878641 +x_0=2743195.592233322 +y_0=914398.5307444407 +a=6377299.36559538 +b=6356098.359005156 +to_meter=0.9143985307444408 +no_defs '); --- --- EPSG 24373 : Kalianpur 1880 / India zone III --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24373,'EPSG',24373,'PROJCS["Kalianpur 1880 / India zone III",GEOGCS["Kalianpur 1880",DATUM["Kalianpur_1880",SPHEROID["Everest (1830 Definition)",6377299.36559538,300.8017255433552,AUTHORITY["EPSG","7042"]],AUTHORITY["EPSG","6243"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4243"]],UNIT["Indian yard",0.9143985307444408,AUTHORITY["EPSG","9084"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",19],PARAMETER["central_meridian",80],PARAMETER["scale_factor",0.99878641],PARAMETER["false_easting",3000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","24373"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=19 +lat_0=19 +lon_0=80 +k_0=0.99878641 +x_0=2743195.592233322 +y_0=914398.5307444407 +a=6377299.36559538 +b=6356098.359005156 +to_meter=0.9143985307444408 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24373,'EPSG',24373,'PROJCS["Kalianpur 1880 / India zone III",GEOGCS["Kalianpur 1880",DATUM["Kalianpur_1880",SPHEROID["Everest (1830 Definition)",6377299.36559538,300.8017255433552,AUTHORITY["EPSG","7042"]],AUTHORITY["EPSG","6243"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4243"]],UNIT["Indian yard",0.9143985307444408,AUTHORITY["EPSG","9084"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",19],PARAMETER["central_meridian",80],PARAMETER["scale_factor",0.99878641],PARAMETER["false_easting",3000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","24373"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=19 +lat_0=19 +lon_0=80 +k_0=0.99878641 +x_0=2743195.592233322 +y_0=914398.5307444407 +a=6377299.36559538 +b=6356098.359005156 +to_meter=0.9143985307444408 +no_defs '); --- --- EPSG 24374 : Kalianpur 1880 / India zone IV --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24374,'EPSG',24374,'PROJCS["Kalianpur 1880 / India zone IV",GEOGCS["Kalianpur 1880",DATUM["Kalianpur_1880",SPHEROID["Everest (1830 Definition)",6377299.36559538,300.8017255433552,AUTHORITY["EPSG","7042"]],AUTHORITY["EPSG","6243"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4243"]],UNIT["Indian yard",0.9143985307444408,AUTHORITY["EPSG","9084"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",12],PARAMETER["central_meridian",80],PARAMETER["scale_factor",0.99878641],PARAMETER["false_easting",3000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","24374"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=12 +lat_0=12 +lon_0=80 +k_0=0.99878641 +x_0=2743195.592233322 +y_0=914398.5307444407 +a=6377299.36559538 +b=6356098.359005156 +to_meter=0.9143985307444408 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24374,'EPSG',24374,'PROJCS["Kalianpur 1880 / India zone IV",GEOGCS["Kalianpur 1880",DATUM["Kalianpur_1880",SPHEROID["Everest (1830 Definition)",6377299.36559538,300.8017255433552,AUTHORITY["EPSG","7042"]],AUTHORITY["EPSG","6243"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4243"]],UNIT["Indian yard",0.9143985307444408,AUTHORITY["EPSG","9084"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",12],PARAMETER["central_meridian",80],PARAMETER["scale_factor",0.99878641],PARAMETER["false_easting",3000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","24374"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=12 +lat_0=12 +lon_0=80 +k_0=0.99878641 +x_0=2743195.592233322 +y_0=914398.5307444407 +a=6377299.36559538 +b=6356098.359005156 +to_meter=0.9143985307444408 +no_defs '); --- --- EPSG 24375 : Kalianpur 1937 / India zone IIb --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24375,'EPSG',24375,'PROJCS["Kalianpur 1937 / India zone IIb",GEOGCS["Kalianpur 1937",DATUM["Kalianpur_1937",SPHEROID["Everest 1830 (1937 Adjustment)",6377276.345,300.8017,AUTHORITY["EPSG","7015"]],AUTHORITY["EPSG","6144"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4144"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",26],PARAMETER["central_meridian",90],PARAMETER["scale_factor",0.99878641],PARAMETER["false_easting",2743185.69],PARAMETER["false_northing",914395.23],AUTHORITY["EPSG","24375"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=26 +lat_0=26 +lon_0=90 +k_0=0.99878641 +x_0=2743185.69 +y_0=914395.23 +a=6377276.345 +b=6356075.41314024 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24375,'EPSG',24375,'PROJCS["Kalianpur 1937 / India zone IIb",GEOGCS["Kalianpur 1937",DATUM["Kalianpur_1937",SPHEROID["Everest 1830 (1937 Adjustment)",6377276.345,300.8017,AUTHORITY["EPSG","7015"]],TOWGS84[282,726,254,0,0,0,0],AUTHORITY["EPSG","6144"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4144"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",26],PARAMETER["central_meridian",90],PARAMETER["scale_factor",0.99878641],PARAMETER["false_easting",2743185.69],PARAMETER["false_northing",914395.23],AUTHORITY["EPSG","24375"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=26 +lat_0=26 +lon_0=90 +k_0=0.99878641 +x_0=2743185.69 +y_0=914395.23 +a=6377276.345 +b=6356075.41314024 +towgs84=282,726,254,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24376 : Kalianpur 1962 / India zone I --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24376,'EPSG',24376,'PROJCS["Kalianpur 1962 / India zone I",GEOGCS["Kalianpur 1962",DATUM["Kalianpur_1962",SPHEROID["Everest 1830 (1962 Definition)",6377301.243,300.8017255,AUTHORITY["EPSG","7044"]],AUTHORITY["EPSG","6145"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4145"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",32.5],PARAMETER["central_meridian",68],PARAMETER["scale_factor",0.99878641],PARAMETER["false_easting",2743196.4],PARAMETER["false_northing",914398.8],AUTHORITY["EPSG","24376"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=32.5 +lat_0=32.5 +lon_0=68 +k_0=0.99878641 +x_0=2743196.4 +y_0=914398.8 +a=6377301.243 +b=6356100.230165384 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24376,'EPSG',24376,'PROJCS["Kalianpur 1962 / India zone I",GEOGCS["Kalianpur 1962",DATUM["Kalianpur_1962",SPHEROID["Everest 1830 (1962 Definition)",6377301.243,300.8017255,AUTHORITY["EPSG","7044"]],TOWGS84[283,682,231,0,0,0,0],AUTHORITY["EPSG","6145"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4145"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",32.5],PARAMETER["central_meridian",68],PARAMETER["scale_factor",0.99878641],PARAMETER["false_easting",2743196.4],PARAMETER["false_northing",914398.8],AUTHORITY["EPSG","24376"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=32.5 +lat_0=32.5 +lon_0=68 +k_0=0.99878641 +x_0=2743196.4 +y_0=914398.8 +a=6377301.243 +b=6356100.230165384 +towgs84=283,682,231,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24377 : Kalianpur 1962 / India zone IIa --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24377,'EPSG',24377,'PROJCS["Kalianpur 1962 / India zone IIa",GEOGCS["Kalianpur 1962",DATUM["Kalianpur_1962",SPHEROID["Everest 1830 (1962 Definition)",6377301.243,300.8017255,AUTHORITY["EPSG","7044"]],AUTHORITY["EPSG","6145"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4145"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",26],PARAMETER["central_meridian",74],PARAMETER["scale_factor",0.99878641],PARAMETER["false_easting",2743196.4],PARAMETER["false_northing",914398.8],AUTHORITY["EPSG","24377"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=26 +lat_0=26 +lon_0=74 +k_0=0.99878641 +x_0=2743196.4 +y_0=914398.8 +a=6377301.243 +b=6356100.230165384 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24377,'EPSG',24377,'PROJCS["Kalianpur 1962 / India zone IIa",GEOGCS["Kalianpur 1962",DATUM["Kalianpur_1962",SPHEROID["Everest 1830 (1962 Definition)",6377301.243,300.8017255,AUTHORITY["EPSG","7044"]],TOWGS84[283,682,231,0,0,0,0],AUTHORITY["EPSG","6145"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4145"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",26],PARAMETER["central_meridian",74],PARAMETER["scale_factor",0.99878641],PARAMETER["false_easting",2743196.4],PARAMETER["false_northing",914398.8],AUTHORITY["EPSG","24377"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=26 +lat_0=26 +lon_0=74 +k_0=0.99878641 +x_0=2743196.4 +y_0=914398.8 +a=6377301.243 +b=6356100.230165384 +towgs84=283,682,231,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24378 : Kalianpur 1975 / India zone I --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24378,'EPSG',24378,'PROJCS["Kalianpur 1975 / India zone I",GEOGCS["Kalianpur 1975",DATUM["Kalianpur_1975",SPHEROID["Everest 1830 (1975 Definition)",6377299.151,300.8017255,AUTHORITY["EPSG","7045"]],TOWGS84[295,736,257,0,0,0,0],AUTHORITY["EPSG","6146"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4146"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",32.5],PARAMETER["central_meridian",68],PARAMETER["scale_factor",0.99878641],PARAMETER["false_easting",2743195.5],PARAMETER["false_northing",914398.5],AUTHORITY["EPSG","24378"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=32.5 +lat_0=32.5 +lon_0=68 +k_0=0.99878641 +x_0=2743195.5 +y_0=914398.5 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24378,'EPSG',24378,'PROJCS["Kalianpur 1975 / India zone I",GEOGCS["Kalianpur 1975",DATUM["Kalianpur_1975",SPHEROID["Everest 1830 (1975 Definition)",6377299.151,300.8017255,AUTHORITY["EPSG","7045"]],TOWGS84[295,736,257,0,0,0,0],AUTHORITY["EPSG","6146"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4146"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",32.5],PARAMETER["central_meridian",68],PARAMETER["scale_factor",0.99878641],PARAMETER["false_easting",2743195.5],PARAMETER["false_northing",914398.5],AUTHORITY["EPSG","24378"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=32.5 +lat_0=32.5 +lon_0=68 +k_0=0.99878641 +x_0=2743195.5 +y_0=914398.5 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24379 : Kalianpur 1975 / India zone IIa --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24379,'EPSG',24379,'PROJCS["Kalianpur 1975 / India zone IIa",GEOGCS["Kalianpur 1975",DATUM["Kalianpur_1975",SPHEROID["Everest 1830 (1975 Definition)",6377299.151,300.8017255,AUTHORITY["EPSG","7045"]],TOWGS84[295,736,257,0,0,0,0],AUTHORITY["EPSG","6146"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4146"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",26],PARAMETER["central_meridian",74],PARAMETER["scale_factor",0.99878641],PARAMETER["false_easting",2743195.5],PARAMETER["false_northing",914398.5],AUTHORITY["EPSG","24379"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=26 +lat_0=26 +lon_0=74 +k_0=0.99878641 +x_0=2743195.5 +y_0=914398.5 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24379,'EPSG',24379,'PROJCS["Kalianpur 1975 / India zone IIa",GEOGCS["Kalianpur 1975",DATUM["Kalianpur_1975",SPHEROID["Everest 1830 (1975 Definition)",6377299.151,300.8017255,AUTHORITY["EPSG","7045"]],TOWGS84[295,736,257,0,0,0,0],AUTHORITY["EPSG","6146"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4146"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",26],PARAMETER["central_meridian",74],PARAMETER["scale_factor",0.99878641],PARAMETER["false_easting",2743195.5],PARAMETER["false_northing",914398.5],AUTHORITY["EPSG","24379"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=26 +lat_0=26 +lon_0=74 +k_0=0.99878641 +x_0=2743195.5 +y_0=914398.5 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24380 : Kalianpur 1975 / India zone IIb --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24380,'EPSG',24380,'PROJCS["Kalianpur 1975 / India zone IIb",GEOGCS["Kalianpur 1975",DATUM["Kalianpur_1975",SPHEROID["Everest 1830 (1975 Definition)",6377299.151,300.8017255,AUTHORITY["EPSG","7045"]],TOWGS84[295,736,257,0,0,0,0],AUTHORITY["EPSG","6146"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4146"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",26],PARAMETER["central_meridian",90],PARAMETER["scale_factor",0.99878641],PARAMETER["false_easting",2743195.5],PARAMETER["false_northing",914398.5],AUTHORITY["EPSG","24380"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=26 +lat_0=26 +lon_0=90 +k_0=0.99878641 +x_0=2743195.5 +y_0=914398.5 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24380,'EPSG',24380,'PROJCS["Kalianpur 1975 / India zone IIb",GEOGCS["Kalianpur 1975",DATUM["Kalianpur_1975",SPHEROID["Everest 1830 (1975 Definition)",6377299.151,300.8017255,AUTHORITY["EPSG","7045"]],TOWGS84[295,736,257,0,0,0,0],AUTHORITY["EPSG","6146"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4146"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",26],PARAMETER["central_meridian",90],PARAMETER["scale_factor",0.99878641],PARAMETER["false_easting",2743195.5],PARAMETER["false_northing",914398.5],AUTHORITY["EPSG","24380"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=26 +lat_0=26 +lon_0=90 +k_0=0.99878641 +x_0=2743195.5 +y_0=914398.5 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24381 : Kalianpur 1975 / India zone III --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24381,'EPSG',24381,'PROJCS["Kalianpur 1975 / India zone III",GEOGCS["Kalianpur 1975",DATUM["Kalianpur_1975",SPHEROID["Everest 1830 (1975 Definition)",6377299.151,300.8017255,AUTHORITY["EPSG","7045"]],TOWGS84[295,736,257,0,0,0,0],AUTHORITY["EPSG","6146"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4146"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",19],PARAMETER["central_meridian",80],PARAMETER["scale_factor",0.99878641],PARAMETER["false_easting",2743195.5],PARAMETER["false_northing",914398.5],AUTHORITY["EPSG","24381"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=19 +lat_0=19 +lon_0=80 +k_0=0.99878641 +x_0=2743195.5 +y_0=914398.5 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24381,'EPSG',24381,'PROJCS["Kalianpur 1975 / India zone III",GEOGCS["Kalianpur 1975",DATUM["Kalianpur_1975",SPHEROID["Everest 1830 (1975 Definition)",6377299.151,300.8017255,AUTHORITY["EPSG","7045"]],TOWGS84[295,736,257,0,0,0,0],AUTHORITY["EPSG","6146"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4146"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",19],PARAMETER["central_meridian",80],PARAMETER["scale_factor",0.99878641],PARAMETER["false_easting",2743195.5],PARAMETER["false_northing",914398.5],AUTHORITY["EPSG","24381"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=19 +lat_0=19 +lon_0=80 +k_0=0.99878641 +x_0=2743195.5 +y_0=914398.5 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24382 : Kalianpur 1880 / India zone IIb --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24382,'EPSG',24382,'PROJCS["Kalianpur 1880 / India zone IIb",GEOGCS["Kalianpur 1880",DATUM["Kalianpur_1880",SPHEROID["Everest (1830 Definition)",6377299.36559538,300.8017255433552,AUTHORITY["EPSG","7042"]],AUTHORITY["EPSG","6243"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4243"]],UNIT["Indian yard",0.9143985307444408,AUTHORITY["EPSG","9084"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",26],PARAMETER["central_meridian",90],PARAMETER["scale_factor",0.99878641],PARAMETER["false_easting",3000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","24382"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=26 +lat_0=26 +lon_0=90 +k_0=0.99878641 +x_0=2743195.592233322 +y_0=914398.5307444407 +a=6377299.36559538 +b=6356098.359005156 +to_meter=0.9143985307444408 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24382,'EPSG',24382,'PROJCS["Kalianpur 1880 / India zone IIb",GEOGCS["Kalianpur 1880",DATUM["Kalianpur_1880",SPHEROID["Everest (1830 Definition)",6377299.36559538,300.8017255433552,AUTHORITY["EPSG","7042"]],AUTHORITY["EPSG","6243"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4243"]],UNIT["Indian yard",0.9143985307444408,AUTHORITY["EPSG","9084"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",26],PARAMETER["central_meridian",90],PARAMETER["scale_factor",0.99878641],PARAMETER["false_easting",3000000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","24382"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=26 +lat_0=26 +lon_0=90 +k_0=0.99878641 +x_0=2743195.592233322 +y_0=914398.5307444407 +a=6377299.36559538 +b=6356098.359005156 +to_meter=0.9143985307444408 +no_defs '); --- --- EPSG 24383 : Kalianpur 1975 / India zone IV --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24383,'EPSG',24383,'PROJCS["Kalianpur 1975 / India zone IV",GEOGCS["Kalianpur 1975",DATUM["Kalianpur_1975",SPHEROID["Everest 1830 (1975 Definition)",6377299.151,300.8017255,AUTHORITY["EPSG","7045"]],TOWGS84[295,736,257,0,0,0,0],AUTHORITY["EPSG","6146"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4146"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",12],PARAMETER["central_meridian",80],PARAMETER["scale_factor",0.99878641],PARAMETER["false_easting",2743195.5],PARAMETER["false_northing",914398.5],AUTHORITY["EPSG","24383"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=12 +lat_0=12 +lon_0=80 +k_0=0.99878641 +x_0=2743195.5 +y_0=914398.5 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24383,'EPSG',24383,'PROJCS["Kalianpur 1975 / India zone IV",GEOGCS["Kalianpur 1975",DATUM["Kalianpur_1975",SPHEROID["Everest 1830 (1975 Definition)",6377299.151,300.8017255,AUTHORITY["EPSG","7045"]],TOWGS84[295,736,257,0,0,0,0],AUTHORITY["EPSG","6146"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4146"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",12],PARAMETER["central_meridian",80],PARAMETER["scale_factor",0.99878641],PARAMETER["false_easting",2743195.5],PARAMETER["false_northing",914398.5],AUTHORITY["EPSG","24383"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=12 +lat_0=12 +lon_0=80 +k_0=0.99878641 +x_0=2743195.5 +y_0=914398.5 +a=6377299.151 +b=6356098.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24500 : Kertau 1968 / Singapore Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24500,'EPSG',24500,'PROJCS["Kertau 1968 / Singapore Grid",GEOGCS["Kertau 1968",DATUM["Kertau_1968",SPHEROID["Everest 1830 Modified",6377304.063,300.8017,AUTHORITY["EPSG","7018"]],TOWGS84[-11,851,5,0,0,0,0],AUTHORITY["EPSG","6245"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4245"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Cassini_Soldner"],PARAMETER["latitude_of_origin",1.287646666666667],PARAMETER["central_meridian",103.8530022222222],PARAMETER["false_easting",30000],PARAMETER["false_northing",30000],AUTHORITY["EPSG","24500"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=cass +lat_0=1.287646666666667 +lon_0=103.8530022222222 +x_0=30000 +y_0=30000 +a=6377304.063 +b=6356103.038993155 +towgs84=-11,851,5,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24500,'EPSG',24500,'PROJCS["Kertau 1968 / Singapore Grid",GEOGCS["Kertau 1968",DATUM["Kertau_1968",SPHEROID["Everest 1830 Modified",6377304.063,300.8017,AUTHORITY["EPSG","7018"]],TOWGS84[-11,851,5,0,0,0,0],AUTHORITY["EPSG","6245"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4245"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Cassini_Soldner"],PARAMETER["latitude_of_origin",1.287646666666667],PARAMETER["central_meridian",103.8530022222222],PARAMETER["false_easting",30000],PARAMETER["false_northing",30000],AUTHORITY["EPSG","24500"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=cass +lat_0=1.287646666666667 +lon_0=103.8530022222222 +x_0=30000 +y_0=30000 +a=6377304.063 +b=6356103.038993155 +towgs84=-11,851,5,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24547 : Kertau 1968 / UTM zone 47N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24547,'EPSG',24547,'PROJCS["Kertau 1968 / UTM zone 47N",GEOGCS["Kertau 1968",DATUM["Kertau_1968",SPHEROID["Everest 1830 Modified",6377304.063,300.8017,AUTHORITY["EPSG","7018"]],TOWGS84[-11,851,5,0,0,0,0],AUTHORITY["EPSG","6245"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4245"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24547"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=47 +a=6377304.063 +b=6356103.038993155 +towgs84=-11,851,5,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24547,'EPSG',24547,'PROJCS["Kertau 1968 / UTM zone 47N",GEOGCS["Kertau 1968",DATUM["Kertau_1968",SPHEROID["Everest 1830 Modified",6377304.063,300.8017,AUTHORITY["EPSG","7018"]],TOWGS84[-11,851,5,0,0,0,0],AUTHORITY["EPSG","6245"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4245"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24547"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=47 +a=6377304.063 +b=6356103.038993155 +towgs84=-11,851,5,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24548 : Kertau 1968 / UTM zone 48N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24548,'EPSG',24548,'PROJCS["Kertau 1968 / UTM zone 48N",GEOGCS["Kertau 1968",DATUM["Kertau_1968",SPHEROID["Everest 1830 Modified",6377304.063,300.8017,AUTHORITY["EPSG","7018"]],TOWGS84[-11,851,5,0,0,0,0],AUTHORITY["EPSG","6245"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4245"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24548"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=48 +a=6377304.063 +b=6356103.038993155 +towgs84=-11,851,5,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24548,'EPSG',24548,'PROJCS["Kertau 1968 / UTM zone 48N",GEOGCS["Kertau 1968",DATUM["Kertau_1968",SPHEROID["Everest 1830 Modified",6377304.063,300.8017,AUTHORITY["EPSG","7018"]],TOWGS84[-11,851,5,0,0,0,0],AUTHORITY["EPSG","6245"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4245"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24548"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=48 +a=6377304.063 +b=6356103.038993155 +towgs84=-11,851,5,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24571 : Kertau / R.S.O. Malaya (ch) (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24571,'EPSG',24571,'PROJCS["Kertau / R.S.O. Malaya (ch) (deprecated)",GEOGCS["Kertau 1968",DATUM["Kertau_1968",SPHEROID["Everest 1830 Modified",6377304.063,300.8017,AUTHORITY["EPSG","7018"]],TOWGS84[-11,851,5,0,0,0,0],AUTHORITY["EPSG","6245"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4245"]],UNIT["British chain (Benoit 1895 B)",20.11678249437587,AUTHORITY["EPSG","9062"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",4],PARAMETER["longitude_of_center",102.25],PARAMETER["azimuth",323.0257905],PARAMETER["rectified_grid_angle",323.1301023611111],PARAMETER["scale_factor",0.99984],PARAMETER["false_easting",40000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24571"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=omerc +lat_0=4 +lonc=102.25 +alpha=323.0257905 +k=0.99984 +x_0=804671.2997750348 +y_0=0 +a=6377304.063 +b=6356103.038993155 +towgs84=-11,851,5,0,0,0,0 +to_meter=20.11678249437587 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24571,'EPSG',24571,'PROJCS["Kertau / R.S.O. Malaya (ch) (deprecated)",GEOGCS["Kertau 1968",DATUM["Kertau_1968",SPHEROID["Everest 1830 Modified",6377304.063,300.8017,AUTHORITY["EPSG","7018"]],TOWGS84[-11,851,5,0,0,0,0],AUTHORITY["EPSG","6245"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4245"]],UNIT["British chain (Benoit 1895 B)",20.11678249437587,AUTHORITY["EPSG","9062"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",4],PARAMETER["longitude_of_center",102.25],PARAMETER["azimuth",323.0257905],PARAMETER["rectified_grid_angle",323.1301023611111],PARAMETER["scale_factor",0.99984],PARAMETER["false_easting",40000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24571"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=omerc +lat_0=4 +lonc=102.25 +alpha=323.0257905 +k=0.99984 +x_0=804671.2997750348 +y_0=0 +gamma=323.1301023611111 +a=6377304.063 +b=6356103.038993155 +towgs84=-11,851,5,0,0,0,0 +to_meter=20.11678249437587 +no_defs '); --- --- EPSG 24600 : KOC Lambert --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24600,'EPSG',24600,'PROJCS["KOC Lambert",GEOGCS["KOC",DATUM["Kuwait_Oil_Company",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-294.7,-200.1,525.5,0,0,0,0],AUTHORITY["EPSG","6246"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4246"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",32.5],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9987864078],PARAMETER["false_easting",1500000],PARAMETER["false_northing",1166200],AUTHORITY["EPSG","24600"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=32.5 +lat_0=32.5 +lon_0=45 +k_0=0.9987864078000001 +x_0=1500000 +y_0=1166200 +ellps=clrk80 +towgs84=-294.7,-200.1,525.5,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24600,'EPSG',24600,'PROJCS["KOC Lambert",GEOGCS["KOC",DATUM["Kuwait_Oil_Company",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-294.7,-200.1,525.5,0,0,0,0],AUTHORITY["EPSG","6246"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4246"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",32.5],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9987864078],PARAMETER["false_easting",1500000],PARAMETER["false_northing",1166200],AUTHORITY["EPSG","24600"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=lcc +lat_1=32.5 +lat_0=32.5 +lon_0=45 +k_0=0.9987864078000001 +x_0=1500000 +y_0=1166200 +ellps=clrk80 +towgs84=-294.7,-200.1,525.5,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24718 : La Canoa / UTM zone 18N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24718,'EPSG',24718,'PROJCS["La Canoa / UTM zone 18N",GEOGCS["La Canoa",DATUM["La_Canoa",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-273.5,110.6,-357.9,0,0,0,0],AUTHORITY["EPSG","6247"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4247"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24718"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +ellps=intl +towgs84=-273.5,110.6,-357.9,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24718,'EPSG',24718,'PROJCS["La Canoa / UTM zone 18N",GEOGCS["La Canoa",DATUM["La_Canoa",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-273.5,110.6,-357.9,0,0,0,0],AUTHORITY["EPSG","6247"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4247"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24718"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +ellps=intl +towgs84=-273.5,110.6,-357.9,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24719 : La Canoa / UTM zone 19N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24719,'EPSG',24719,'PROJCS["La Canoa / UTM zone 19N",GEOGCS["La Canoa",DATUM["La_Canoa",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-273.5,110.6,-357.9,0,0,0,0],AUTHORITY["EPSG","6247"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4247"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24719"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +ellps=intl +towgs84=-273.5,110.6,-357.9,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24719,'EPSG',24719,'PROJCS["La Canoa / UTM zone 19N",GEOGCS["La Canoa",DATUM["La_Canoa",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-273.5,110.6,-357.9,0,0,0,0],AUTHORITY["EPSG","6247"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4247"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24719"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +ellps=intl +towgs84=-273.5,110.6,-357.9,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24720 : La Canoa / UTM zone 20N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24720,'EPSG',24720,'PROJCS["La Canoa / UTM zone 20N",GEOGCS["La Canoa",DATUM["La_Canoa",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-273.5,110.6,-357.9,0,0,0,0],AUTHORITY["EPSG","6247"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4247"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24720"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=intl +towgs84=-273.5,110.6,-357.9,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24720,'EPSG',24720,'PROJCS["La Canoa / UTM zone 20N",GEOGCS["La Canoa",DATUM["La_Canoa",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-273.5,110.6,-357.9,0,0,0,0],AUTHORITY["EPSG","6247"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4247"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24720"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=intl +towgs84=-273.5,110.6,-357.9,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24817 : PSAD56 / UTM zone 17N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24817,'EPSG',24817,'PROJCS["PSAD56 / UTM zone 17N",GEOGCS["PSAD56",DATUM["Provisional_South_American_Datum_1956",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6248"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4248"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24817"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24817,'EPSG',24817,'PROJCS["PSAD56 / UTM zone 17N",GEOGCS["PSAD56",DATUM["Provisional_South_American_Datum_1956",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY["EPSG","6248"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4248"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24817"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +ellps=intl +towgs84=-288,175,-376,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24818 : PSAD56 / UTM zone 18N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24818,'EPSG',24818,'PROJCS["PSAD56 / UTM zone 18N",GEOGCS["PSAD56",DATUM["Provisional_South_American_Datum_1956",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6248"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4248"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24818"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24818,'EPSG',24818,'PROJCS["PSAD56 / UTM zone 18N",GEOGCS["PSAD56",DATUM["Provisional_South_American_Datum_1956",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY["EPSG","6248"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4248"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24818"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +ellps=intl +towgs84=-288,175,-376,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24819 : PSAD56 / UTM zone 19N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24819,'EPSG',24819,'PROJCS["PSAD56 / UTM zone 19N",GEOGCS["PSAD56",DATUM["Provisional_South_American_Datum_1956",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6248"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4248"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24819"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24819,'EPSG',24819,'PROJCS["PSAD56 / UTM zone 19N",GEOGCS["PSAD56",DATUM["Provisional_South_American_Datum_1956",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY["EPSG","6248"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4248"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24819"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +ellps=intl +towgs84=-288,175,-376,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24820 : PSAD56 / UTM zone 20N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24820,'EPSG',24820,'PROJCS["PSAD56 / UTM zone 20N",GEOGCS["PSAD56",DATUM["Provisional_South_American_Datum_1956",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6248"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4248"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24820"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24820,'EPSG',24820,'PROJCS["PSAD56 / UTM zone 20N",GEOGCS["PSAD56",DATUM["Provisional_South_American_Datum_1956",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY["EPSG","6248"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4248"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24820"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=intl +towgs84=-288,175,-376,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24821 : PSAD56 / UTM zone 21N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24821,'EPSG',24821,'PROJCS["PSAD56 / UTM zone 21N",GEOGCS["PSAD56",DATUM["Provisional_South_American_Datum_1956",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6248"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4248"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24821"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24821,'EPSG',24821,'PROJCS["PSAD56 / UTM zone 21N",GEOGCS["PSAD56",DATUM["Provisional_South_American_Datum_1956",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY["EPSG","6248"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4248"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","24821"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +ellps=intl +towgs84=-288,175,-376,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24877 : PSAD56 / UTM zone 17S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24877,'EPSG',24877,'PROJCS["PSAD56 / UTM zone 17S",GEOGCS["PSAD56",DATUM["Provisional_South_American_Datum_1956",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6248"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4248"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","24877"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +south +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24877,'EPSG',24877,'PROJCS["PSAD56 / UTM zone 17S",GEOGCS["PSAD56",DATUM["Provisional_South_American_Datum_1956",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY["EPSG","6248"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4248"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","24877"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +south +ellps=intl +towgs84=-288,175,-376,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24878 : PSAD56 / UTM zone 18S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24878,'EPSG',24878,'PROJCS["PSAD56 / UTM zone 18S",GEOGCS["PSAD56",DATUM["Provisional_South_American_Datum_1956",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6248"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4248"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","24878"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +south +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24878,'EPSG',24878,'PROJCS["PSAD56 / UTM zone 18S",GEOGCS["PSAD56",DATUM["Provisional_South_American_Datum_1956",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY["EPSG","6248"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4248"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","24878"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +south +ellps=intl +towgs84=-288,175,-376,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24879 : PSAD56 / UTM zone 19S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24879,'EPSG',24879,'PROJCS["PSAD56 / UTM zone 19S",GEOGCS["PSAD56",DATUM["Provisional_South_American_Datum_1956",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6248"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4248"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","24879"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +south +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24879,'EPSG',24879,'PROJCS["PSAD56 / UTM zone 19S",GEOGCS["PSAD56",DATUM["Provisional_South_American_Datum_1956",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY["EPSG","6248"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4248"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","24879"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +south +ellps=intl +towgs84=-288,175,-376,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24880 : PSAD56 / UTM zone 20S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24880,'EPSG',24880,'PROJCS["PSAD56 / UTM zone 20S",GEOGCS["PSAD56",DATUM["Provisional_South_American_Datum_1956",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6248"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4248"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","24880"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +south +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24880,'EPSG',24880,'PROJCS["PSAD56 / UTM zone 20S",GEOGCS["PSAD56",DATUM["Provisional_South_American_Datum_1956",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY["EPSG","6248"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4248"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","24880"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +south +ellps=intl +towgs84=-288,175,-376,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24881 : PSAD56 / UTM zone 21S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24881,'EPSG',24881,'PROJCS["PSAD56 / UTM zone 21S",GEOGCS["PSAD56",DATUM["Provisional_South_American_Datum_1956",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6248"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4248"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","24881"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +south +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24881,'EPSG',24881,'PROJCS["PSAD56 / UTM zone 21S",GEOGCS["PSAD56",DATUM["Provisional_South_American_Datum_1956",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY["EPSG","6248"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4248"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","24881"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +south +ellps=intl +towgs84=-288,175,-376,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24882 : PSAD56 / UTM zone 22S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24882,'EPSG',24882,'PROJCS["PSAD56 / UTM zone 22S",GEOGCS["PSAD56",DATUM["Provisional_South_American_Datum_1956",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6248"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4248"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","24882"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +south +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24882,'EPSG',24882,'PROJCS["PSAD56 / UTM zone 22S",GEOGCS["PSAD56",DATUM["Provisional_South_American_Datum_1956",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY["EPSG","6248"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4248"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","24882"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +south +ellps=intl +towgs84=-288,175,-376,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24891 : PSAD56 / Peru west zone --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24891,'EPSG',24891,'PROJCS["PSAD56 / Peru west zone",GEOGCS["PSAD56",DATUM["Provisional_South_American_Datum_1956",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6248"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4248"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-6],PARAMETER["central_meridian",-80.5],PARAMETER["scale_factor",0.99983008],PARAMETER["false_easting",222000],PARAMETER["false_northing",1426834.743],AUTHORITY["EPSG","24891"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=-6 +lon_0=-80.5 +k=0.99983008 +x_0=222000 +y_0=1426834.743 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24891,'EPSG',24891,'PROJCS["PSAD56 / Peru west zone",GEOGCS["PSAD56",DATUM["Provisional_South_American_Datum_1956",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY["EPSG","6248"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4248"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-6],PARAMETER["central_meridian",-80.5],PARAMETER["scale_factor",0.99983008],PARAMETER["false_easting",222000],PARAMETER["false_northing",1426834.743],AUTHORITY["EPSG","24891"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=-6 +lon_0=-80.5 +k=0.99983008 +x_0=222000 +y_0=1426834.743 +ellps=intl +towgs84=-288,175,-376,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24892 : PSAD56 / Peru central zone --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24892,'EPSG',24892,'PROJCS["PSAD56 / Peru central zone",GEOGCS["PSAD56",DATUM["Provisional_South_American_Datum_1956",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6248"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4248"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-9.5],PARAMETER["central_meridian",-76],PARAMETER["scale_factor",0.99932994],PARAMETER["false_easting",720000],PARAMETER["false_northing",1039979.159],AUTHORITY["EPSG","24892"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=-9.5 +lon_0=-76 +k=0.99932994 +x_0=720000 +y_0=1039979.159 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24892,'EPSG',24892,'PROJCS["PSAD56 / Peru central zone",GEOGCS["PSAD56",DATUM["Provisional_South_American_Datum_1956",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY["EPSG","6248"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4248"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-9.5],PARAMETER["central_meridian",-76],PARAMETER["scale_factor",0.99932994],PARAMETER["false_easting",720000],PARAMETER["false_northing",1039979.159],AUTHORITY["EPSG","24892"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=-9.5 +lon_0=-76 +k=0.99932994 +x_0=720000 +y_0=1039979.159 +ellps=intl +towgs84=-288,175,-376,0,0,0,0 +units=m +no_defs '); --- --- EPSG 24893 : PSAD56 / Peru east zone --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24893,'EPSG',24893,'PROJCS["PSAD56 / Peru east zone",GEOGCS["PSAD56",DATUM["Provisional_South_American_Datum_1956",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6248"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4248"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-9.5],PARAMETER["central_meridian",-70.5],PARAMETER["scale_factor",0.99952992],PARAMETER["false_easting",1324000],PARAMETER["false_northing",1040084.558],AUTHORITY["EPSG","24893"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=-9.5 +lon_0=-70.5 +k=0.99952992 +x_0=1324000 +y_0=1040084.558 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (24893,'EPSG',24893,'PROJCS["PSAD56 / Peru east zone",GEOGCS["PSAD56",DATUM["Provisional_South_American_Datum_1956",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY["EPSG","6248"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4248"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-9.5],PARAMETER["central_meridian",-70.5],PARAMETER["scale_factor",0.99952992],PARAMETER["false_easting",1324000],PARAMETER["false_northing",1040084.558],AUTHORITY["EPSG","24893"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=-9.5 +lon_0=-70.5 +k=0.99952992 +x_0=1324000 +y_0=1040084.558 +ellps=intl +towgs84=-288,175,-376,0,0,0,0 +units=m +no_defs '); --- --- EPSG 25000 : Leigon / Ghana Metre Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (25000,'EPSG',25000,'PROJCS["Leigon / Ghana Metre Grid",GEOGCS["Leigon",DATUM["Leigon",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-130,29,364,0,0,0,0],AUTHORITY["EPSG","6250"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4250"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",4.666666666666667],PARAMETER["central_meridian",-1],PARAMETER["scale_factor",0.99975],PARAMETER["false_easting",274319.51],PARAMETER["false_northing",0],AUTHORITY["EPSG","25000"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=4.666666666666667 +lon_0=-1 +k=0.99975 +x_0=274319.51 +y_0=0 +ellps=clrk80 +towgs84=-130,29,364,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (25000,'EPSG',25000,'PROJCS["Leigon / Ghana Metre Grid",GEOGCS["Leigon",DATUM["Leigon",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-130,29,364,0,0,0,0],AUTHORITY["EPSG","6250"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4250"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",4.666666666666667],PARAMETER["central_meridian",-1],PARAMETER["scale_factor",0.99975],PARAMETER["false_easting",274319.51],PARAMETER["false_northing",0],AUTHORITY["EPSG","25000"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=4.666666666666667 +lon_0=-1 +k=0.99975 +x_0=274319.51 +y_0=0 +ellps=clrk80 +towgs84=-130,29,364,0,0,0,0 +units=m +no_defs '); --- --- EPSG 25231 : Lome / UTM zone 31N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (25231,'EPSG',25231,'PROJCS["Lome / UTM zone 31N",GEOGCS["Lome",DATUM["Lome",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],AUTHORITY["EPSG","6252"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4252"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","25231"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=31 +a=6378249.2 +b=6356515 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (25231,'EPSG',25231,'PROJCS["Lome / UTM zone 31N",GEOGCS["Lome",DATUM["Lome",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],AUTHORITY["EPSG","6252"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4252"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","25231"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=31 +a=6378249.2 +b=6356515 +units=m +no_defs '); --- --- EPSG 25391 : Luzon 1911 / Philippines zone I --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (25391,'EPSG',25391,'PROJCS["Luzon 1911 / Philippines zone I",GEOGCS["Luzon 1911",DATUM["Luzon_1911",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6253"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4253"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","25391"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=0.99995 +x_0=500000 +y_0=0 +ellps=clrk66 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (25391,'EPSG',25391,'PROJCS["Luzon 1911 / Philippines zone I",GEOGCS["Luzon 1911",DATUM["Luzon_1911",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-133,-77,-51,0,0,0,0],AUTHORITY["EPSG","6253"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4253"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","25391"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=0.99995 +x_0=500000 +y_0=0 +ellps=clrk66 +towgs84=-133,-77,-51,0,0,0,0 +units=m +no_defs '); --- --- EPSG 25392 : Luzon 1911 / Philippines zone II --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (25392,'EPSG',25392,'PROJCS["Luzon 1911 / Philippines zone II",GEOGCS["Luzon 1911",DATUM["Luzon_1911",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6253"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4253"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",119],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","25392"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=119 +k=0.99995 +x_0=500000 +y_0=0 +ellps=clrk66 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (25392,'EPSG',25392,'PROJCS["Luzon 1911 / Philippines zone II",GEOGCS["Luzon 1911",DATUM["Luzon_1911",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-133,-77,-51,0,0,0,0],AUTHORITY["EPSG","6253"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4253"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",119],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","25392"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=119 +k=0.99995 +x_0=500000 +y_0=0 +ellps=clrk66 +towgs84=-133,-77,-51,0,0,0,0 +units=m +no_defs '); --- --- EPSG 25393 : Luzon 1911 / Philippines zone III --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (25393,'EPSG',25393,'PROJCS["Luzon 1911 / Philippines zone III",GEOGCS["Luzon 1911",DATUM["Luzon_1911",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6253"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4253"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",121],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","25393"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=121 +k=0.99995 +x_0=500000 +y_0=0 +ellps=clrk66 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (25393,'EPSG',25393,'PROJCS["Luzon 1911 / Philippines zone III",GEOGCS["Luzon 1911",DATUM["Luzon_1911",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-133,-77,-51,0,0,0,0],AUTHORITY["EPSG","6253"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4253"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",121],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","25393"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=121 +k=0.99995 +x_0=500000 +y_0=0 +ellps=clrk66 +towgs84=-133,-77,-51,0,0,0,0 +units=m +no_defs '); --- --- EPSG 25394 : Luzon 1911 / Philippines zone IV --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (25394,'EPSG',25394,'PROJCS["Luzon 1911 / Philippines zone IV",GEOGCS["Luzon 1911",DATUM["Luzon_1911",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6253"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4253"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","25394"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=0.99995 +x_0=500000 +y_0=0 +ellps=clrk66 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (25394,'EPSG',25394,'PROJCS["Luzon 1911 / Philippines zone IV",GEOGCS["Luzon 1911",DATUM["Luzon_1911",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-133,-77,-51,0,0,0,0],AUTHORITY["EPSG","6253"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4253"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","25394"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=0.99995 +x_0=500000 +y_0=0 +ellps=clrk66 +towgs84=-133,-77,-51,0,0,0,0 +units=m +no_defs '); --- --- EPSG 25395 : Luzon 1911 / Philippines zone V --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (25395,'EPSG',25395,'PROJCS["Luzon 1911 / Philippines zone V",GEOGCS["Luzon 1911",DATUM["Luzon_1911",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6253"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4253"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",125],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","25395"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=125 +k=0.99995 +x_0=500000 +y_0=0 +ellps=clrk66 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (25395,'EPSG',25395,'PROJCS["Luzon 1911 / Philippines zone V",GEOGCS["Luzon 1911",DATUM["Luzon_1911",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],TOWGS84[-133,-77,-51,0,0,0,0],AUTHORITY["EPSG","6253"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4253"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",125],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","25395"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=125 +k=0.99995 +x_0=500000 +y_0=0 +ellps=clrk66 +towgs84=-133,-77,-51,0,0,0,0 +units=m +no_defs '); --- --- EPSG 25700 : Makassar (Jakarta) / NEIEZ (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (25700,'EPSG',25700,'PROJCS["Makassar (Jakarta) / NEIEZ (deprecated)",GEOGCS["Makassar (Jakarta)",DATUM["Makassar_Jakarta",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-587.8,519.75,145.76,0,0,0,0],AUTHORITY["EPSG","6804"]],PRIMEM["Jakarta",106.8077194444444,AUTHORITY["EPSG","8908"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4804"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",110],PARAMETER["scale_factor",0.997],PARAMETER["false_easting",3900000],PARAMETER["false_northing",900000],AUTHORITY["EPSG","25700"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=merc +lon_0=110 +k=0.997 +x_0=3900000 +y_0=900000 +ellps=bessel +towgs84=-587.8,519.75,145.76,0,0,0,0 +pm=jakarta +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (25700,'EPSG',25700,'PROJCS["Makassar (Jakarta) / NEIEZ (deprecated)",GEOGCS["Makassar (Jakarta)",DATUM["Makassar_Jakarta",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-587.8,519.75,145.76,0,0,0,0],AUTHORITY["EPSG","6804"]],PRIMEM["Jakarta",106.8077194444444,AUTHORITY["EPSG","8908"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4804"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",110],PARAMETER["scale_factor",0.997],PARAMETER["false_easting",3900000],PARAMETER["false_northing",900000],AUTHORITY["EPSG","25700"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=merc +lon_0=110 +k=0.997 +x_0=3900000 +y_0=900000 +ellps=bessel +towgs84=-587.8,519.75,145.76,0,0,0,0 +pm=jakarta +units=m +no_defs '); --- --- EPSG 25828 : ETRS89 / UTM zone 28N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (25828,'EPSG',25828,'PROJCS["ETRS89 / UTM zone 28N",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","25828"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (25828,'EPSG',25828,'PROJCS["ETRS89 / UTM zone 28N",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","25828"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 25829 : ETRS89 / UTM zone 29N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (25829,'EPSG',25829,'PROJCS["ETRS89 / UTM zone 29N",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","25829"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (25829,'EPSG',25829,'PROJCS["ETRS89 / UTM zone 29N",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","25829"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 25830 : ETRS89 / UTM zone 30N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (25830,'EPSG',25830,'PROJCS["ETRS89 / UTM zone 30N",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","25830"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=30 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (25830,'EPSG',25830,'PROJCS["ETRS89 / UTM zone 30N",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","25830"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=30 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 25831 : ETRS89 / UTM zone 31N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (25831,'EPSG',25831,'PROJCS["ETRS89 / UTM zone 31N",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","25831"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=31 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (25831,'EPSG',25831,'PROJCS["ETRS89 / UTM zone 31N",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","25831"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=31 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 25832 : ETRS89 / UTM zone 32N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (25832,'EPSG',25832,'PROJCS["ETRS89 / UTM zone 32N",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","25832"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (25832,'EPSG',25832,'PROJCS["ETRS89 / UTM zone 32N",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","25832"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 25833 : ETRS89 / UTM zone 33N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (25833,'EPSG',25833,'PROJCS["ETRS89 / UTM zone 33N",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","25833"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=33 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (25833,'EPSG',25833,'PROJCS["ETRS89 / UTM zone 33N",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","25833"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 25834 : ETRS89 / UTM zone 34N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (25834,'EPSG',25834,'PROJCS["ETRS89 / UTM zone 34N",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","25834"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=34 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (25834,'EPSG',25834,'PROJCS["ETRS89 / UTM zone 34N",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","25834"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=34 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 25835 : ETRS89 / UTM zone 35N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (25835,'EPSG',25835,'PROJCS["ETRS89 / UTM zone 35N",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","25835"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=35 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (25835,'EPSG',25835,'PROJCS["ETRS89 / UTM zone 35N",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","25835"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=35 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 25836 : ETRS89 / UTM zone 36N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (25836,'EPSG',25836,'PROJCS["ETRS89 / UTM zone 36N",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","25836"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=36 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (25836,'EPSG',25836,'PROJCS["ETRS89 / UTM zone 36N",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","25836"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=36 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 25837 : ETRS89 / UTM zone 37N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (25837,'EPSG',25837,'PROJCS["ETRS89 / UTM zone 37N",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","25837"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=37 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (25837,'EPSG',25837,'PROJCS["ETRS89 / UTM zone 37N",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","25837"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=37 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 25838 : ETRS89 / UTM zone 38N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (25838,'EPSG',25838,'PROJCS["ETRS89 / UTM zone 38N",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","25838"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (25838,'EPSG',25838,'PROJCS["ETRS89 / UTM zone 38N",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","25838"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 25884 : ETRS89 / TM Baltic93 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (25884,'EPSG',25884,'PROJCS["ETRS89 / TM Baltic93",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",24],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","25884"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9996 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (25884,'EPSG',25884,'PROJCS["ETRS89 / TM Baltic93",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",24],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","25884"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9996 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 25932 : Malongo 1987 / UTM zone 32S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (25932,'EPSG',25932,'PROJCS["Malongo 1987 / UTM zone 32S",GEOGCS["Malongo 1987",DATUM["Malongo_1987",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6259"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4259"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","25932"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +south +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (25932,'EPSG',25932,'PROJCS["Malongo 1987 / UTM zone 32S",GEOGCS["Malongo 1987",DATUM["Malongo_1987",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-254.1,-5.36,-100.29,0,0,0,0],AUTHORITY["EPSG","6259"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4259"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","25932"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +south +ellps=intl +towgs84=-254.1,-5.36,-100.29,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26191 : Merchich / Nord Maroc --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26191,'EPSG',26191,'PROJCS["Merchich / Nord Maroc",GEOGCS["Merchich",DATUM["Merchich",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[31,146,47,0,0,0,0],AUTHORITY["EPSG","6261"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4261"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",33.3],PARAMETER["central_meridian",-5.4],PARAMETER["scale_factor",0.999625769],PARAMETER["false_easting",500000],PARAMETER["false_northing",300000],AUTHORITY["EPSG","26191"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=-5.4 +k_0=0.999625769 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +towgs84=31,146,47,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26191,'EPSG',26191,'PROJCS["Merchich / Nord Maroc",GEOGCS["Merchich",DATUM["Merchich",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[31,146,47,0,0,0,0],AUTHORITY["EPSG","6261"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4261"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",33.3],PARAMETER["central_meridian",-5.4],PARAMETER["scale_factor",0.999625769],PARAMETER["false_easting",500000],PARAMETER["false_northing",300000],AUTHORITY["EPSG","26191"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=-5.4 +k_0=0.999625769 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +towgs84=31,146,47,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26192 : Merchich / Sud Maroc --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26192,'EPSG',26192,'PROJCS["Merchich / Sud Maroc",GEOGCS["Merchich",DATUM["Merchich",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[31,146,47,0,0,0,0],AUTHORITY["EPSG","6261"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4261"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",29.7],PARAMETER["central_meridian",-5.4],PARAMETER["scale_factor",0.999615596],PARAMETER["false_easting",500000],PARAMETER["false_northing",300000],AUTHORITY["EPSG","26192"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=29.7 +lat_0=29.7 +lon_0=-5.4 +k_0=0.9996155960000001 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +towgs84=31,146,47,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26192,'EPSG',26192,'PROJCS["Merchich / Sud Maroc",GEOGCS["Merchich",DATUM["Merchich",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[31,146,47,0,0,0,0],AUTHORITY["EPSG","6261"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4261"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",29.7],PARAMETER["central_meridian",-5.4],PARAMETER["scale_factor",0.999615596],PARAMETER["false_easting",500000],PARAMETER["false_northing",300000],AUTHORITY["EPSG","26192"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=29.7 +lat_0=29.7 +lon_0=-5.4 +k_0=0.9996155960000001 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +towgs84=31,146,47,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26193 : Merchich / Sahara (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26193,'EPSG',26193,'PROJCS["Merchich / Sahara (deprecated)",GEOGCS["Merchich",DATUM["Merchich",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[31,146,47,0,0,0,0],AUTHORITY["EPSG","6261"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4261"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",26.1],PARAMETER["central_meridian",-5.4],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1200000],PARAMETER["false_northing",400000],AUTHORITY["EPSG","26193"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=26.1 +lat_0=26.1 +lon_0=-5.4 +k_0=0.9996 +x_0=1200000 +y_0=400000 +a=6378249.2 +b=6356515 +towgs84=31,146,47,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26193,'EPSG',26193,'PROJCS["Merchich / Sahara (deprecated)",GEOGCS["Merchich",DATUM["Merchich",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[31,146,47,0,0,0,0],AUTHORITY["EPSG","6261"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4261"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",26.1],PARAMETER["central_meridian",-5.4],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1200000],PARAMETER["false_northing",400000],AUTHORITY["EPSG","26193"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=26.1 +lat_0=26.1 +lon_0=-5.4 +k_0=0.9996 +x_0=1200000 +y_0=400000 +a=6378249.2 +b=6356515 +towgs84=31,146,47,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26194 : Merchich / Sahara Nord --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26194,'EPSG',26194,'PROJCS["Merchich / Sahara Nord",GEOGCS["Merchich",DATUM["Merchich",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[31,146,47,0,0,0,0],AUTHORITY["EPSG","6261"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4261"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",26.1],PARAMETER["central_meridian",-5.4],PARAMETER["scale_factor",0.999616304],PARAMETER["false_easting",1200000],PARAMETER["false_northing",400000],AUTHORITY["EPSG","26194"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=26.1 +lat_0=26.1 +lon_0=-5.4 +k_0=0.999616304 +x_0=1200000 +y_0=400000 +a=6378249.2 +b=6356515 +towgs84=31,146,47,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26194,'EPSG',26194,'PROJCS["Merchich / Sahara Nord",GEOGCS["Merchich",DATUM["Merchich",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[31,146,47,0,0,0,0],AUTHORITY["EPSG","6261"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4261"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",26.1],PARAMETER["central_meridian",-5.4],PARAMETER["scale_factor",0.999616304],PARAMETER["false_easting",1200000],PARAMETER["false_northing",400000],AUTHORITY["EPSG","26194"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=26.1 +lat_0=26.1 +lon_0=-5.4 +k_0=0.999616304 +x_0=1200000 +y_0=400000 +a=6378249.2 +b=6356515 +towgs84=31,146,47,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26195 : Merchich / Sahara Sud --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26195,'EPSG',26195,'PROJCS["Merchich / Sahara Sud",GEOGCS["Merchich",DATUM["Merchich",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[31,146,47,0,0,0,0],AUTHORITY["EPSG","6261"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4261"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",22.5],PARAMETER["central_meridian",-5.4],PARAMETER["scale_factor",0.999616437],PARAMETER["false_easting",1500000],PARAMETER["false_northing",400000],AUTHORITY["EPSG","26195"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=22.5 +lat_0=22.5 +lon_0=-5.4 +k_0=0.999616437 +x_0=1500000 +y_0=400000 +a=6378249.2 +b=6356515 +towgs84=31,146,47,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26195,'EPSG',26195,'PROJCS["Merchich / Sahara Sud",GEOGCS["Merchich",DATUM["Merchich",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[31,146,47,0,0,0,0],AUTHORITY["EPSG","6261"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4261"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",22.5],PARAMETER["central_meridian",-5.4],PARAMETER["scale_factor",0.999616437],PARAMETER["false_easting",1500000],PARAMETER["false_northing",400000],AUTHORITY["EPSG","26195"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=22.5 +lat_0=22.5 +lon_0=-5.4 +k_0=0.999616437 +x_0=1500000 +y_0=400000 +a=6378249.2 +b=6356515 +towgs84=31,146,47,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26237 : Massawa / UTM zone 37N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26237,'EPSG',26237,'PROJCS["Massawa / UTM zone 37N",GEOGCS["Massawa",DATUM["Massawa",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[639,405,60,0,0,0,0],AUTHORITY["EPSG","6262"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4262"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26237"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=37 +ellps=bessel +towgs84=639,405,60,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26237,'EPSG',26237,'PROJCS["Massawa / UTM zone 37N",GEOGCS["Massawa",DATUM["Massawa",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[639,405,60,0,0,0,0],AUTHORITY["EPSG","6262"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4262"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26237"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=37 +ellps=bessel +towgs84=639,405,60,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26331 : Minna / UTM zone 31N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26331,'EPSG',26331,'PROJCS["Minna / UTM zone 31N",GEOGCS["Minna",DATUM["Minna",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6263"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4263"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26331"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=31 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26331,'EPSG',26331,'PROJCS["Minna / UTM zone 31N",GEOGCS["Minna",DATUM["Minna",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-92,-93,122,0,0,0,0],AUTHORITY["EPSG","6263"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4263"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26331"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=31 +ellps=clrk80 +towgs84=-92,-93,122,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26332 : Minna / UTM zone 32N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26332,'EPSG',26332,'PROJCS["Minna / UTM zone 32N",GEOGCS["Minna",DATUM["Minna",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6263"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4263"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26332"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26332,'EPSG',26332,'PROJCS["Minna / UTM zone 32N",GEOGCS["Minna",DATUM["Minna",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-92,-93,122,0,0,0,0],AUTHORITY["EPSG","6263"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4263"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26332"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +ellps=clrk80 +towgs84=-92,-93,122,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26391 : Minna / Nigeria West Belt --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26391,'EPSG',26391,'PROJCS["Minna / Nigeria West Belt",GEOGCS["Minna",DATUM["Minna",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6263"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4263"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",4],PARAMETER["central_meridian",4.5],PARAMETER["scale_factor",0.99975],PARAMETER["false_easting",230738.26],PARAMETER["false_northing",0],AUTHORITY["EPSG","26391"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=4 +lon_0=4.5 +k=0.99975 +x_0=230738.26 +y_0=0 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26391,'EPSG',26391,'PROJCS["Minna / Nigeria West Belt",GEOGCS["Minna",DATUM["Minna",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-92,-93,122,0,0,0,0],AUTHORITY["EPSG","6263"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4263"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",4],PARAMETER["central_meridian",4.5],PARAMETER["scale_factor",0.99975],PARAMETER["false_easting",230738.26],PARAMETER["false_northing",0],AUTHORITY["EPSG","26391"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=4 +lon_0=4.5 +k=0.99975 +x_0=230738.26 +y_0=0 +ellps=clrk80 +towgs84=-92,-93,122,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26392 : Minna / Nigeria Mid Belt --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26392,'EPSG',26392,'PROJCS["Minna / Nigeria Mid Belt",GEOGCS["Minna",DATUM["Minna",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6263"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4263"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",4],PARAMETER["central_meridian",8.5],PARAMETER["scale_factor",0.99975],PARAMETER["false_easting",670553.98],PARAMETER["false_northing",0],AUTHORITY["EPSG","26392"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=4 +lon_0=8.5 +k=0.99975 +x_0=670553.98 +y_0=0 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26392,'EPSG',26392,'PROJCS["Minna / Nigeria Mid Belt",GEOGCS["Minna",DATUM["Minna",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-92,-93,122,0,0,0,0],AUTHORITY["EPSG","6263"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4263"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",4],PARAMETER["central_meridian",8.5],PARAMETER["scale_factor",0.99975],PARAMETER["false_easting",670553.98],PARAMETER["false_northing",0],AUTHORITY["EPSG","26392"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=4 +lon_0=8.5 +k=0.99975 +x_0=670553.98 +y_0=0 +ellps=clrk80 +towgs84=-92,-93,122,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26393 : Minna / Nigeria East Belt --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26393,'EPSG',26393,'PROJCS["Minna / Nigeria East Belt",GEOGCS["Minna",DATUM["Minna",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6263"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4263"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",4],PARAMETER["central_meridian",12.5],PARAMETER["scale_factor",0.99975],PARAMETER["false_easting",1110369.7],PARAMETER["false_northing",0],AUTHORITY["EPSG","26393"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=4 +lon_0=12.5 +k=0.99975 +x_0=1110369.7 +y_0=0 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26393,'EPSG',26393,'PROJCS["Minna / Nigeria East Belt",GEOGCS["Minna",DATUM["Minna",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-92,-93,122,0,0,0,0],AUTHORITY["EPSG","6263"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4263"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",4],PARAMETER["central_meridian",12.5],PARAMETER["scale_factor",0.99975],PARAMETER["false_easting",1110369.7],PARAMETER["false_northing",0],AUTHORITY["EPSG","26393"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=4 +lon_0=12.5 +k=0.99975 +x_0=1110369.7 +y_0=0 +ellps=clrk80 +towgs84=-92,-93,122,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26432 : Mhast / UTM zone 32S (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26432,'EPSG',26432,'PROJCS["Mhast / UTM zone 32S (deprecated)",GEOGCS["Mhast",DATUM["Mhast",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-252.95,-4.11,-96.38,0,0,0,0],AUTHORITY["EPSG","6264"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4264"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","26432"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +south +ellps=intl +towgs84=-252.95,-4.11,-96.38,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26432,'EPSG',26432,'PROJCS["Mhast / UTM zone 32S (deprecated)",GEOGCS["Mhast",DATUM["Mhast",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-252.95,-4.11,-96.38,0,0,0,0],AUTHORITY["EPSG","6264"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4264"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","26432"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +south +ellps=intl +towgs84=-252.95,-4.11,-96.38,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26591 : Monte Mario (Rome) / Italy zone 1 (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26591,'EPSG',26591,'PROJCS["Monte Mario (Rome) / Italy zone 1 (deprecated)",GEOGCS["Monte Mario (Rome)",DATUM["Monte_Mario_Rome",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6806"]],PRIMEM["Rome",12.45233333333333,AUTHORITY["EPSG","8906"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4806"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3.45233333333333],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26591"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-3.45233333333333 +k=0.9996 +x_0=1500000 +y_0=0 +ellps=intl +pm=rome +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26591,'EPSG',26591,'PROJCS["Monte Mario (Rome) / Italy zone 1 (deprecated)",GEOGCS["Monte Mario (Rome)",DATUM["Monte_Mario_Rome",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68],AUTHORITY["EPSG","6806"]],PRIMEM["Rome",12.45233333333333,AUTHORITY["EPSG","8906"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4806"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3.45233333333333],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26591"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-3.45233333333333 +k=0.9996 +x_0=1500000 +y_0=0 +ellps=intl +towgs84=-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68 +pm=rome +units=m +no_defs '); --- --- EPSG 26592 : Monte Mario (Rome) / Italy zone 2 (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26592,'EPSG',26592,'PROJCS["Monte Mario (Rome) / Italy zone 2 (deprecated)",GEOGCS["Monte Mario (Rome)",DATUM["Monte_Mario_Rome",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6806"]],PRIMEM["Rome",12.45233333333333,AUTHORITY["EPSG","8906"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4806"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",2.54766666666666],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",2520000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26592"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=2.54766666666666 +k=0.9996 +x_0=2520000 +y_0=0 +ellps=intl +pm=rome +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26592,'EPSG',26592,'PROJCS["Monte Mario (Rome) / Italy zone 2 (deprecated)",GEOGCS["Monte Mario (Rome)",DATUM["Monte_Mario_Rome",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68],AUTHORITY["EPSG","6806"]],PRIMEM["Rome",12.45233333333333,AUTHORITY["EPSG","8906"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4806"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",2.54766666666666],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",2520000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26592"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=2.54766666666666 +k=0.9996 +x_0=2520000 +y_0=0 +ellps=intl +towgs84=-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68 +pm=rome +units=m +no_defs '); --- --- EPSG 26632 : M'poraloko / UTM zone 32N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26632,'EPSG',26632,'PROJCS["M''poraloko / UTM zone 32N",GEOGCS["M''poraloko",DATUM["M_poraloko",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],AUTHORITY["EPSG","6266"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4266"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26632"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +a=6378249.2 +b=6356515 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26632,'EPSG',26632,'PROJCS["M''poraloko / UTM zone 32N",GEOGCS["M''poraloko",DATUM["M_poraloko",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-74,-130,42,0,0,0,0],AUTHORITY["EPSG","6266"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4266"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26632"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +a=6378249.2 +b=6356515 +towgs84=-74,-130,42,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26692 : M'poraloko / UTM zone 32S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26692,'EPSG',26692,'PROJCS["M''poraloko / UTM zone 32S",GEOGCS["M''poraloko",DATUM["M_poraloko",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],AUTHORITY["EPSG","6266"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4266"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","26692"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +south +a=6378249.2 +b=6356515 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26692,'EPSG',26692,'PROJCS["M''poraloko / UTM zone 32S",GEOGCS["M''poraloko",DATUM["M_poraloko",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-74,-130,42,0,0,0,0],AUTHORITY["EPSG","6266"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4266"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","26692"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +south +a=6378249.2 +b=6356515 +towgs84=-74,-130,42,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26701 : NAD27 / UTM zone 1N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26701,'EPSG',26701,'PROJCS["NAD27 / UTM zone 1N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26701"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=1 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26701,'EPSG',26701,'PROJCS["NAD27 / UTM zone 1N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26701"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=1 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 26702 : NAD27 / UTM zone 2N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26702,'EPSG',26702,'PROJCS["NAD27 / UTM zone 2N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26702"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=2 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26702,'EPSG',26702,'PROJCS["NAD27 / UTM zone 2N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26702"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=2 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 26703 : NAD27 / UTM zone 3N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26703,'EPSG',26703,'PROJCS["NAD27 / UTM zone 3N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26703"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=3 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26703,'EPSG',26703,'PROJCS["NAD27 / UTM zone 3N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26703"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=3 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 26704 : NAD27 / UTM zone 4N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26704,'EPSG',26704,'PROJCS["NAD27 / UTM zone 4N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-159],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26704"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=4 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26704,'EPSG',26704,'PROJCS["NAD27 / UTM zone 4N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-159],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26704"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=4 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 26705 : NAD27 / UTM zone 5N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26705,'EPSG',26705,'PROJCS["NAD27 / UTM zone 5N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26705"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=5 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26705,'EPSG',26705,'PROJCS["NAD27 / UTM zone 5N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26705"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=5 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 26706 : NAD27 / UTM zone 6N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26706,'EPSG',26706,'PROJCS["NAD27 / UTM zone 6N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26706"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=6 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26706,'EPSG',26706,'PROJCS["NAD27 / UTM zone 6N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26706"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=6 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 26707 : NAD27 / UTM zone 7N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26707,'EPSG',26707,'PROJCS["NAD27 / UTM zone 7N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26707"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=7 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26707,'EPSG',26707,'PROJCS["NAD27 / UTM zone 7N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26707"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=7 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 26708 : NAD27 / UTM zone 8N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26708,'EPSG',26708,'PROJCS["NAD27 / UTM zone 8N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26708"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=8 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26708,'EPSG',26708,'PROJCS["NAD27 / UTM zone 8N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26708"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=8 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 26709 : NAD27 / UTM zone 9N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26709,'EPSG',26709,'PROJCS["NAD27 / UTM zone 9N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26709"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=9 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26709,'EPSG',26709,'PROJCS["NAD27 / UTM zone 9N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26709"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=9 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 26710 : NAD27 / UTM zone 10N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26710,'EPSG',26710,'PROJCS["NAD27 / UTM zone 10N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26710"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=10 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26710,'EPSG',26710,'PROJCS["NAD27 / UTM zone 10N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26710"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=10 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 26711 : NAD27 / UTM zone 11N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26711,'EPSG',26711,'PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],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],AUTHORITY["EPSG","26711"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=11 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26711,'EPSG',26711,'PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],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],AUTHORITY["EPSG","26711"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=11 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 26712 : NAD27 / UTM zone 12N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26712,'EPSG',26712,'PROJCS["NAD27 / UTM zone 12N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26712"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=12 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26712,'EPSG',26712,'PROJCS["NAD27 / UTM zone 12N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26712"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=12 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 26713 : NAD27 / UTM zone 13N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26713,'EPSG',26713,'PROJCS["NAD27 / UTM zone 13N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26713"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=13 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26713,'EPSG',26713,'PROJCS["NAD27 / UTM zone 13N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26713"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=13 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 26714 : NAD27 / UTM zone 14N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26714,'EPSG',26714,'PROJCS["NAD27 / UTM zone 14N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26714"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=14 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26714,'EPSG',26714,'PROJCS["NAD27 / UTM zone 14N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26714"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=14 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 26715 : NAD27 / UTM zone 15N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26715,'EPSG',26715,'PROJCS["NAD27 / UTM zone 15N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26715"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=15 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26715,'EPSG',26715,'PROJCS["NAD27 / UTM zone 15N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26715"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=15 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 26716 : NAD27 / UTM zone 16N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26716,'EPSG',26716,'PROJCS["NAD27 / UTM zone 16N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26716"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=16 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26716,'EPSG',26716,'PROJCS["NAD27 / UTM zone 16N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26716"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=16 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 26717 : NAD27 / UTM zone 17N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26717,'EPSG',26717,'PROJCS["NAD27 / UTM zone 17N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26717"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26717,'EPSG',26717,'PROJCS["NAD27 / UTM zone 17N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26717"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 26718 : NAD27 / UTM zone 18N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26718,'EPSG',26718,'PROJCS["NAD27 / UTM zone 18N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26718"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26718,'EPSG',26718,'PROJCS["NAD27 / UTM zone 18N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26718"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 26719 : NAD27 / UTM zone 19N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26719,'EPSG',26719,'PROJCS["NAD27 / UTM zone 19N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26719"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26719,'EPSG',26719,'PROJCS["NAD27 / UTM zone 19N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26719"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 26720 : NAD27 / UTM zone 20N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26720,'EPSG',26720,'PROJCS["NAD27 / UTM zone 20N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26720"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26720,'EPSG',26720,'PROJCS["NAD27 / UTM zone 20N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26720"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 26721 : NAD27 / UTM zone 21N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26721,'EPSG',26721,'PROJCS["NAD27 / UTM zone 21N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26721"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26721,'EPSG',26721,'PROJCS["NAD27 / UTM zone 21N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26721"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 26722 : NAD27 / UTM zone 22N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26722,'EPSG',26722,'PROJCS["NAD27 / UTM zone 22N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26722"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26722,'EPSG',26722,'PROJCS["NAD27 / UTM zone 22N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26722"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 26729 : NAD27 / Alabama East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26729,'EPSG',26729,'PROJCS["NAD27 / Alabama East",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30.5],PARAMETER["central_meridian",-85.83333333333333],PARAMETER["scale_factor",0.99996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26729"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30.5 +lon_0=-85.83333333333333 +k=0.99996 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26729,'EPSG',26729,'PROJCS["NAD27 / Alabama East",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30.5],PARAMETER["central_meridian",-85.83333333333333],PARAMETER["scale_factor",0.99996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26729"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30.5 +lon_0=-85.83333333333333 +k=0.99996 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26730 : NAD27 / Alabama West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26730,'EPSG',26730,'PROJCS["NAD27 / Alabama West",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",-87.5],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26730"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=-87.5 +k=0.999933333 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26730,'EPSG',26730,'PROJCS["NAD27 / Alabama West",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",-87.5],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26730"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=-87.5 +k=0.999933333 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26731 : NAD27 / Alaska zone 1 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26731,'EPSG',26731,'PROJCS["NAD27 / Alaska zone 1",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",57],PARAMETER["longitude_of_center",-133.6666666666667],PARAMETER["azimuth",323.1301023611111],PARAMETER["rectified_grid_angle",323.1301023611111],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",16404166.67],PARAMETER["false_northing",-16404166.67],AUTHORITY["EPSG","26731"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=omerc +lat_0=57 +lonc=-133.6666666666667 +alpha=323.1301023611111 +k=0.9999 +x_0=5000000.001016002 +y_0=-5000000.001016002 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26731,'EPSG',26731,'PROJCS["NAD27 / Alaska zone 1",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",57],PARAMETER["longitude_of_center",-133.6666666666667],PARAMETER["azimuth",323.1301023611111],PARAMETER["rectified_grid_angle",323.1301023611111],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",16404166.67],PARAMETER["false_northing",-16404166.67],AUTHORITY["EPSG","26731"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=omerc +lat_0=57 +lonc=-133.6666666666667 +alpha=323.1301023611111 +k=0.9999 +x_0=5000000.001016002 +y_0=-5000000.001016002 +gamma=323.1301023611111 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26732 : NAD27 / Alaska zone 2 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26732,'EPSG',26732,'PROJCS["NAD27 / Alaska zone 2",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-142],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26732"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-142 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26732,'EPSG',26732,'PROJCS["NAD27 / Alaska zone 2",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-142],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26732"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-142 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26733 : NAD27 / Alaska zone 3 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26733,'EPSG',26733,'PROJCS["NAD27 / Alaska zone 3",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-146],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26733"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-146 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26733,'EPSG',26733,'PROJCS["NAD27 / Alaska zone 3",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-146],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26733"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-146 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26734 : NAD27 / Alaska zone 4 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26734,'EPSG',26734,'PROJCS["NAD27 / Alaska zone 4",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-150],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26734"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-150 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26734,'EPSG',26734,'PROJCS["NAD27 / Alaska zone 4",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-150],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26734"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-150 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26735 : NAD27 / Alaska zone 5 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26735,'EPSG',26735,'PROJCS["NAD27 / Alaska zone 5",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-154],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26735"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-154 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26735,'EPSG',26735,'PROJCS["NAD27 / Alaska zone 5",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-154],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26735"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-154 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26736 : NAD27 / Alaska zone 6 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26736,'EPSG',26736,'PROJCS["NAD27 / Alaska zone 6",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-158],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26736"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-158 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26736,'EPSG',26736,'PROJCS["NAD27 / Alaska zone 6",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-158],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26736"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-158 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26737 : NAD27 / Alaska zone 7 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26737,'EPSG',26737,'PROJCS["NAD27 / Alaska zone 7",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-162],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26737"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-162 +k=0.9999 +x_0=213360.4267208534 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26737,'EPSG',26737,'PROJCS["NAD27 / Alaska zone 7",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-162],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26737"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-162 +k=0.9999 +x_0=213360.4267208534 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26738 : NAD27 / Alaska zone 8 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26738,'EPSG',26738,'PROJCS["NAD27 / Alaska zone 8",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-166],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26738"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-166 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26738,'EPSG',26738,'PROJCS["NAD27 / Alaska zone 8",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-166],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26738"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-166 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26739 : NAD27 / Alaska zone 9 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26739,'EPSG',26739,'PROJCS["NAD27 / Alaska zone 9",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-170],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26739"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-170 +k=0.9999 +x_0=182880.3657607315 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26739,'EPSG',26739,'PROJCS["NAD27 / Alaska zone 9",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-170],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26739"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-170 +k=0.9999 +x_0=182880.3657607315 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26740 : NAD27 / Alaska zone 10 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26740,'EPSG',26740,'PROJCS["NAD27 / Alaska zone 10",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",53.83333333333334],PARAMETER["standard_parallel_2",51.83333333333334],PARAMETER["latitude_of_origin",51],PARAMETER["central_meridian",-176],PARAMETER["false_easting",3000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26740"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=53.83333333333334 +lat_2=51.83333333333334 +lat_0=51 +lon_0=-176 +x_0=914401.8288036576 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26740,'EPSG',26740,'PROJCS["NAD27 / Alaska zone 10",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",53.83333333333334],PARAMETER["standard_parallel_2",51.83333333333334],PARAMETER["latitude_of_origin",51],PARAMETER["central_meridian",-176],PARAMETER["false_easting",3000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26740"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=53.83333333333334 +lat_2=51.83333333333334 +lat_0=51 +lon_0=-176 +x_0=914401.8288036576 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26741 : NAD27 / California zone I --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26741,'EPSG',26741,'PROJCS["NAD27 / California zone I",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.66666666666666],PARAMETER["standard_parallel_2",40],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-122],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26741"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.66666666666666 +lat_2=40 +lat_0=39.33333333333334 +lon_0=-122 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26741,'EPSG',26741,'PROJCS["NAD27 / California zone I",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.66666666666666],PARAMETER["standard_parallel_2",40],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-122],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26741"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.66666666666666 +lat_2=40 +lat_0=39.33333333333334 +lon_0=-122 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26742 : NAD27 / California zone II --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26742,'EPSG',26742,'PROJCS["NAD27 / California zone II",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.83333333333334],PARAMETER["standard_parallel_2",38.33333333333334],PARAMETER["latitude_of_origin",37.66666666666666],PARAMETER["central_meridian",-122],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26742"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.83333333333334 +lat_2=38.33333333333334 +lat_0=37.66666666666666 +lon_0=-122 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26742,'EPSG',26742,'PROJCS["NAD27 / California zone II",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.83333333333334],PARAMETER["standard_parallel_2",38.33333333333334],PARAMETER["latitude_of_origin",37.66666666666666],PARAMETER["central_meridian",-122],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26742"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.83333333333334 +lat_2=38.33333333333334 +lat_0=37.66666666666666 +lon_0=-122 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26743 : NAD27 / California zone III --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26743,'EPSG',26743,'PROJCS["NAD27 / California zone III",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.43333333333333],PARAMETER["standard_parallel_2",37.06666666666667],PARAMETER["latitude_of_origin",36.5],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26743"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.43333333333333 +lat_2=37.06666666666667 +lat_0=36.5 +lon_0=-120.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26743,'EPSG',26743,'PROJCS["NAD27 / California zone III",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.43333333333333],PARAMETER["standard_parallel_2",37.06666666666667],PARAMETER["latitude_of_origin",36.5],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26743"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.43333333333333 +lat_2=37.06666666666667 +lat_0=36.5 +lon_0=-120.5 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26744 : NAD27 / California zone IV --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26744,'EPSG',26744,'PROJCS["NAD27 / California zone IV",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.25],PARAMETER["standard_parallel_2",36],PARAMETER["latitude_of_origin",35.33333333333334],PARAMETER["central_meridian",-119],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26744"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.25 +lat_2=36 +lat_0=35.33333333333334 +lon_0=-119 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26744,'EPSG',26744,'PROJCS["NAD27 / California zone IV",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.25],PARAMETER["standard_parallel_2",36],PARAMETER["latitude_of_origin",35.33333333333334],PARAMETER["central_meridian",-119],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26744"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.25 +lat_2=36 +lat_0=35.33333333333334 +lon_0=-119 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26745 : NAD27 / California zone V --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26745,'EPSG',26745,'PROJCS["NAD27 / California zone V",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",35.46666666666667],PARAMETER["standard_parallel_2",34.03333333333333],PARAMETER["latitude_of_origin",33.5],PARAMETER["central_meridian",-118],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26745"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=35.46666666666667 +lat_2=34.03333333333333 +lat_0=33.5 +lon_0=-118 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26745,'EPSG',26745,'PROJCS["NAD27 / California zone V",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",35.46666666666667],PARAMETER["standard_parallel_2",34.03333333333333],PARAMETER["latitude_of_origin",33.5],PARAMETER["central_meridian",-118],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26745"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=35.46666666666667 +lat_2=34.03333333333333 +lat_0=33.5 +lon_0=-118 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26746 : NAD27 / California zone VI --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26746,'EPSG',26746,'PROJCS["NAD27 / California zone VI",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",33.88333333333333],PARAMETER["standard_parallel_2",32.78333333333333],PARAMETER["latitude_of_origin",32.16666666666666],PARAMETER["central_meridian",-116.25],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26746"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=33.88333333333333 +lat_2=32.78333333333333 +lat_0=32.16666666666666 +lon_0=-116.25 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26746,'EPSG',26746,'PROJCS["NAD27 / California zone VI",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",33.88333333333333],PARAMETER["standard_parallel_2",32.78333333333333],PARAMETER["latitude_of_origin",32.16666666666666],PARAMETER["central_meridian",-116.25],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26746"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=33.88333333333333 +lat_2=32.78333333333333 +lat_0=32.16666666666666 +lon_0=-116.25 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26747 : NAD27 / California zone VII (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26747,'EPSG',26747,'PROJCS["NAD27 / California zone VII (deprecated)",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",34.41666666666666],PARAMETER["standard_parallel_2",33.86666666666667],PARAMETER["latitude_of_origin",34.13333333333333],PARAMETER["central_meridian",-118.3333333333333],PARAMETER["false_easting",4186692.58],PARAMETER["false_northing",416926.74],AUTHORITY["EPSG","26747"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=34.41666666666666 +lat_2=33.86666666666667 +lat_0=34.13333333333333 +lon_0=-118.3333333333333 +x_0=1276106.450596901 +y_0=127079.524511049 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26747,'EPSG',26747,'PROJCS["NAD27 / California zone VII (deprecated)",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",34.41666666666666],PARAMETER["standard_parallel_2",33.86666666666667],PARAMETER["latitude_of_origin",34.13333333333333],PARAMETER["central_meridian",-118.3333333333333],PARAMETER["false_easting",4186692.58],PARAMETER["false_northing",416926.74],AUTHORITY["EPSG","26747"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=34.41666666666666 +lat_2=33.86666666666667 +lat_0=34.13333333333333 +lon_0=-118.3333333333333 +x_0=1276106.450596901 +y_0=127079.524511049 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26748 : NAD27 / Arizona East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26748,'EPSG',26748,'PROJCS["NAD27 / Arizona East",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-110.1666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26748"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26748,'EPSG',26748,'PROJCS["NAD27 / Arizona East",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-110.1666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26748"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26749 : NAD27 / Arizona Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26749,'EPSG',26749,'PROJCS["NAD27 / Arizona Central",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-111.9166666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26749"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26749,'EPSG',26749,'PROJCS["NAD27 / Arizona Central",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-111.9166666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26749"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26750 : NAD27 / Arizona West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26750,'EPSG',26750,'PROJCS["NAD27 / Arizona West",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-113.75],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26750"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.999933333 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26750,'EPSG',26750,'PROJCS["NAD27 / Arizona West",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-113.75],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26750"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.999933333 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26751 : NAD27 / Arkansas North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26751,'EPSG',26751,'PROJCS["NAD27 / Arkansas North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.23333333333333],PARAMETER["standard_parallel_2",34.93333333333333],PARAMETER["latitude_of_origin",34.33333333333334],PARAMETER["central_meridian",-92],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26751"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.23333333333333 +lat_2=34.93333333333333 +lat_0=34.33333333333334 +lon_0=-92 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26751,'EPSG',26751,'PROJCS["NAD27 / Arkansas North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.23333333333333],PARAMETER["standard_parallel_2",34.93333333333333],PARAMETER["latitude_of_origin",34.33333333333334],PARAMETER["central_meridian",-92],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26751"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.23333333333333 +lat_2=34.93333333333333 +lat_0=34.33333333333334 +lon_0=-92 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26752 : NAD27 / Arkansas South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26752,'EPSG',26752,'PROJCS["NAD27 / Arkansas South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",34.76666666666667],PARAMETER["standard_parallel_2",33.3],PARAMETER["latitude_of_origin",32.66666666666666],PARAMETER["central_meridian",-92],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26752"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=34.76666666666667 +lat_2=33.3 +lat_0=32.66666666666666 +lon_0=-92 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26752,'EPSG',26752,'PROJCS["NAD27 / Arkansas South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",34.76666666666667],PARAMETER["standard_parallel_2",33.3],PARAMETER["latitude_of_origin",32.66666666666666],PARAMETER["central_meridian",-92],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26752"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=34.76666666666667 +lat_2=33.3 +lat_0=32.66666666666666 +lon_0=-92 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26753 : NAD27 / Colorado North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26753,'EPSG',26753,'PROJCS["NAD27 / Colorado North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.71666666666667],PARAMETER["standard_parallel_2",40.78333333333333],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-105.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26753"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.71666666666667 +lat_2=40.78333333333333 +lat_0=39.33333333333334 +lon_0=-105.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26753,'EPSG',26753,'PROJCS["NAD27 / Colorado North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.71666666666667],PARAMETER["standard_parallel_2",40.78333333333333],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-105.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26753"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.71666666666667 +lat_2=40.78333333333333 +lat_0=39.33333333333334 +lon_0=-105.5 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26754 : NAD27 / Colorado Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26754,'EPSG',26754,'PROJCS["NAD27 / Colorado Central",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.75],PARAMETER["standard_parallel_2",38.45],PARAMETER["latitude_of_origin",37.83333333333334],PARAMETER["central_meridian",-105.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26754"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.75 +lat_2=38.45 +lat_0=37.83333333333334 +lon_0=-105.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26754,'EPSG',26754,'PROJCS["NAD27 / Colorado Central",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.75],PARAMETER["standard_parallel_2",38.45],PARAMETER["latitude_of_origin",37.83333333333334],PARAMETER["central_meridian",-105.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26754"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.75 +lat_2=38.45 +lat_0=37.83333333333334 +lon_0=-105.5 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26755 : NAD27 / Colorado South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26755,'EPSG',26755,'PROJCS["NAD27 / Colorado South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.43333333333333],PARAMETER["standard_parallel_2",37.23333333333333],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-105.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26755"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.43333333333333 +lat_2=37.23333333333333 +lat_0=36.66666666666666 +lon_0=-105.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26755,'EPSG',26755,'PROJCS["NAD27 / Colorado South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.43333333333333],PARAMETER["standard_parallel_2",37.23333333333333],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-105.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26755"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.43333333333333 +lat_2=37.23333333333333 +lat_0=36.66666666666666 +lon_0=-105.5 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26756 : NAD27 / Connecticut --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26756,'EPSG',26756,'PROJCS["NAD27 / Connecticut",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.86666666666667],PARAMETER["standard_parallel_2",41.2],PARAMETER["latitude_of_origin",40.83333333333334],PARAMETER["central_meridian",-72.75],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26756"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.86666666666667 +lat_2=41.2 +lat_0=40.83333333333334 +lon_0=-72.75 +x_0=182880.3657607315 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26756,'EPSG',26756,'PROJCS["NAD27 / Connecticut",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.86666666666667],PARAMETER["standard_parallel_2",41.2],PARAMETER["latitude_of_origin",40.83333333333334],PARAMETER["central_meridian",-72.75],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26756"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.86666666666667 +lat_2=41.2 +lat_0=40.83333333333334 +lon_0=-72.75 +x_0=182880.3657607315 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26757 : NAD27 / Delaware --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26757,'EPSG',26757,'PROJCS["NAD27 / Delaware",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",38],PARAMETER["central_meridian",-75.41666666666667],PARAMETER["scale_factor",0.999995],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26757"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999995 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26757,'EPSG',26757,'PROJCS["NAD27 / Delaware",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",38],PARAMETER["central_meridian",-75.41666666666667],PARAMETER["scale_factor",0.999995],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26757"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999995 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26758 : NAD27 / Florida East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26758,'EPSG',26758,'PROJCS["NAD27 / Florida East",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",24.33333333333333],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26758"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999941177 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26758,'EPSG',26758,'PROJCS["NAD27 / Florida East",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",24.33333333333333],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26758"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999941177 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26759 : NAD27 / Florida West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26759,'EPSG',26759,'PROJCS["NAD27 / Florida West",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",24.33333333333333],PARAMETER["central_meridian",-82],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26759"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999941177 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26759,'EPSG',26759,'PROJCS["NAD27 / Florida West",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",24.33333333333333],PARAMETER["central_meridian",-82],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26759"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999941177 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26760 : NAD27 / Florida North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26760,'EPSG',26760,'PROJCS["NAD27 / Florida North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",30.75],PARAMETER["standard_parallel_2",29.58333333333333],PARAMETER["latitude_of_origin",29],PARAMETER["central_meridian",-84.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26760"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=30.75 +lat_2=29.58333333333333 +lat_0=29 +lon_0=-84.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26760,'EPSG',26760,'PROJCS["NAD27 / Florida North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",30.75],PARAMETER["standard_parallel_2",29.58333333333333],PARAMETER["latitude_of_origin",29],PARAMETER["central_meridian",-84.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26760"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=30.75 +lat_2=29.58333333333333 +lat_0=29 +lon_0=-84.5 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26766 : NAD27 / Georgia East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26766,'EPSG',26766,'PROJCS["NAD27 / Georgia East",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",-82.16666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26766"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26766,'EPSG',26766,'PROJCS["NAD27 / Georgia East",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",-82.16666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26766"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26767 : NAD27 / Georgia West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26767,'EPSG',26767,'PROJCS["NAD27 / Georgia West",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",-84.16666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26767"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26767,'EPSG',26767,'PROJCS["NAD27 / Georgia West",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",-84.16666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26767"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26768 : NAD27 / Idaho East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26768,'EPSG',26768,'PROJCS["NAD27 / Idaho East",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-112.1666666666667],PARAMETER["scale_factor",0.999947368],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26768"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666666667 +k=0.9999473679999999 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26768,'EPSG',26768,'PROJCS["NAD27 / Idaho East",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-112.1666666666667],PARAMETER["scale_factor",0.999947368],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26768"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666666667 +k=0.9999473679999999 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26769 : NAD27 / Idaho Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26769,'EPSG',26769,'PROJCS["NAD27 / Idaho Central",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-114],PARAMETER["scale_factor",0.999947368],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26769"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.9999473679999999 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26769,'EPSG',26769,'PROJCS["NAD27 / Idaho Central",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-114],PARAMETER["scale_factor",0.999947368],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26769"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.9999473679999999 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26770 : NAD27 / Idaho West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26770,'EPSG',26770,'PROJCS["NAD27 / Idaho West",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-115.75],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26770"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0.999933333 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26770,'EPSG',26770,'PROJCS["NAD27 / Idaho West",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-115.75],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26770"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0.999933333 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26771 : NAD27 / Illinois East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26771,'EPSG',26771,'PROJCS["NAD27 / Illinois East",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-88.33333333333333],PARAMETER["scale_factor",0.999975],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26771"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333333333 +k=0.9999749999999999 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26771,'EPSG',26771,'PROJCS["NAD27 / Illinois East",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-88.33333333333333],PARAMETER["scale_factor",0.999975],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26771"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333333333 +k=0.9999749999999999 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26772 : NAD27 / Illinois West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26772,'EPSG',26772,'PROJCS["NAD27 / Illinois West",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-90.16666666666667],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26772"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666666667 +k=0.999941177 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26772,'EPSG',26772,'PROJCS["NAD27 / Illinois West",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-90.16666666666667],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26772"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666666667 +k=0.999941177 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26773 : NAD27 / Indiana East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26773,'EPSG',26773,'PROJCS["NAD27 / Indiana East",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-85.66666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26773"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999966667 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26773,'EPSG',26773,'PROJCS["NAD27 / Indiana East",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-85.66666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26773"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999966667 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26774 : NAD27 / Indiana West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26774,'EPSG',26774,'PROJCS["NAD27 / Indiana West",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-87.08333333333333],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26774"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999966667 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26774,'EPSG',26774,'PROJCS["NAD27 / Indiana West",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-87.08333333333333],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26774"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999966667 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26775 : NAD27 / Iowa North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26775,'EPSG',26775,'PROJCS["NAD27 / Iowa North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43.26666666666667],PARAMETER["standard_parallel_2",42.06666666666667],PARAMETER["latitude_of_origin",41.5],PARAMETER["central_meridian",-93.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26775"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43.26666666666667 +lat_2=42.06666666666667 +lat_0=41.5 +lon_0=-93.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26775,'EPSG',26775,'PROJCS["NAD27 / Iowa North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43.26666666666667],PARAMETER["standard_parallel_2",42.06666666666667],PARAMETER["latitude_of_origin",41.5],PARAMETER["central_meridian",-93.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26775"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43.26666666666667 +lat_2=42.06666666666667 +lat_0=41.5 +lon_0=-93.5 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26776 : NAD27 / Iowa South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26776,'EPSG',26776,'PROJCS["NAD27 / Iowa South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.78333333333333],PARAMETER["standard_parallel_2",40.61666666666667],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-93.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26776"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.78333333333333 +lat_2=40.61666666666667 +lat_0=40 +lon_0=-93.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26776,'EPSG',26776,'PROJCS["NAD27 / Iowa South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.78333333333333],PARAMETER["standard_parallel_2",40.61666666666667],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-93.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26776"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.78333333333333 +lat_2=40.61666666666667 +lat_0=40 +lon_0=-93.5 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26777 : NAD27 / Kansas North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26777,'EPSG',26777,'PROJCS["NAD27 / Kansas North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.78333333333333],PARAMETER["standard_parallel_2",38.71666666666667],PARAMETER["latitude_of_origin",38.33333333333334],PARAMETER["central_meridian",-98],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26777"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.78333333333333 +lat_2=38.71666666666667 +lat_0=38.33333333333334 +lon_0=-98 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26777,'EPSG',26777,'PROJCS["NAD27 / Kansas North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.78333333333333],PARAMETER["standard_parallel_2",38.71666666666667],PARAMETER["latitude_of_origin",38.33333333333334],PARAMETER["central_meridian",-98],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26777"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.78333333333333 +lat_2=38.71666666666667 +lat_0=38.33333333333334 +lon_0=-98 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26778 : NAD27 / Kansas South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26778,'EPSG',26778,'PROJCS["NAD27 / Kansas South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.56666666666667],PARAMETER["standard_parallel_2",37.26666666666667],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-98.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26778"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.56666666666667 +lat_2=37.26666666666667 +lat_0=36.66666666666666 +lon_0=-98.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26778,'EPSG',26778,'PROJCS["NAD27 / Kansas South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.56666666666667],PARAMETER["standard_parallel_2",37.26666666666667],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-98.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26778"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.56666666666667 +lat_2=37.26666666666667 +lat_0=36.66666666666666 +lon_0=-98.5 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26779 : NAD27 / Kentucky North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26779,'EPSG',26779,'PROJCS["NAD27 / Kentucky North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.96666666666667],PARAMETER["standard_parallel_2",38.96666666666667],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-84.25],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26779"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.96666666666667 +lat_2=38.96666666666667 +lat_0=37.5 +lon_0=-84.25 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26779,'EPSG',26779,'PROJCS["NAD27 / Kentucky North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.96666666666667],PARAMETER["standard_parallel_2",38.96666666666667],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-84.25],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26779"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.96666666666667 +lat_2=38.96666666666667 +lat_0=37.5 +lon_0=-84.25 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26780 : NAD27 / Kentucky South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26780,'EPSG',26780,'PROJCS["NAD27 / Kentucky South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.73333333333333],PARAMETER["standard_parallel_2",37.93333333333333],PARAMETER["latitude_of_origin",36.33333333333334],PARAMETER["central_meridian",-85.75],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26780"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.73333333333333 +lat_2=37.93333333333333 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26780,'EPSG',26780,'PROJCS["NAD27 / Kentucky South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.73333333333333],PARAMETER["standard_parallel_2",37.93333333333333],PARAMETER["latitude_of_origin",36.33333333333334],PARAMETER["central_meridian",-85.75],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26780"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.73333333333333 +lat_2=37.93333333333333 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26781 : NAD27 / Louisiana North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26781,'EPSG',26781,'PROJCS["NAD27 / Louisiana North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",31.16666666666667],PARAMETER["standard_parallel_2",32.66666666666666],PARAMETER["latitude_of_origin",30.66666666666667],PARAMETER["central_meridian",-92.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26781"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=31.16666666666667 +lat_2=32.66666666666666 +lat_0=30.66666666666667 +lon_0=-92.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26781,'EPSG',26781,'PROJCS["NAD27 / Louisiana North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",31.16666666666667],PARAMETER["standard_parallel_2",32.66666666666666],PARAMETER["latitude_of_origin",30.66666666666667],PARAMETER["central_meridian",-92.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26781"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=31.16666666666667 +lat_2=32.66666666666666 +lat_0=30.66666666666667 +lon_0=-92.5 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26782 : NAD27 / Louisiana South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26782,'EPSG',26782,'PROJCS["NAD27 / Louisiana South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",29.3],PARAMETER["standard_parallel_2",30.7],PARAMETER["latitude_of_origin",28.66666666666667],PARAMETER["central_meridian",-91.33333333333333],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26782"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=29.3 +lat_2=30.7 +lat_0=28.66666666666667 +lon_0=-91.33333333333333 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26782,'EPSG',26782,'PROJCS["NAD27 / Louisiana South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",29.3],PARAMETER["standard_parallel_2",30.7],PARAMETER["latitude_of_origin",28.66666666666667],PARAMETER["central_meridian",-91.33333333333333],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26782"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=29.3 +lat_2=30.7 +lat_0=28.66666666666667 +lon_0=-91.33333333333333 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26783 : NAD27 / Maine East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26783,'EPSG',26783,'PROJCS["NAD27 / Maine East",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",43.83333333333334],PARAMETER["central_meridian",-68.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26783"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=43.83333333333334 +lon_0=-68.5 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26783,'EPSG',26783,'PROJCS["NAD27 / Maine East",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",43.83333333333334],PARAMETER["central_meridian",-68.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26783"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=43.83333333333334 +lon_0=-68.5 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26784 : NAD27 / Maine West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26784,'EPSG',26784,'PROJCS["NAD27 / Maine West",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.83333333333334],PARAMETER["central_meridian",-70.16666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26784"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666666667 +k=0.999966667 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26784,'EPSG',26784,'PROJCS["NAD27 / Maine West",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.83333333333334],PARAMETER["central_meridian",-70.16666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26784"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666666667 +k=0.999966667 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26785 : NAD27 / Maryland --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26785,'EPSG',26785,'PROJCS["NAD27 / Maryland",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.3],PARAMETER["standard_parallel_2",39.45],PARAMETER["latitude_of_origin",37.83333333333334],PARAMETER["central_meridian",-77],PARAMETER["false_easting",800000.0000000002],PARAMETER["false_northing",0],AUTHORITY["EPSG","26785"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.3 +lat_2=39.45 +lat_0=37.83333333333334 +lon_0=-77 +x_0=243840.4876809754 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26785,'EPSG',26785,'PROJCS["NAD27 / Maryland",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.3],PARAMETER["standard_parallel_2",39.45],PARAMETER["latitude_of_origin",37.83333333333334],PARAMETER["central_meridian",-77],PARAMETER["false_easting",800000.0000000002],PARAMETER["false_northing",0],AUTHORITY["EPSG","26785"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.3 +lat_2=39.45 +lat_0=37.83333333333334 +lon_0=-77 +x_0=243840.4876809754 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26786 : NAD27 / Massachusetts Mainland --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26786,'EPSG',26786,'PROJCS["NAD27 / Massachusetts Mainland",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.71666666666667],PARAMETER["standard_parallel_2",42.68333333333333],PARAMETER["latitude_of_origin",41],PARAMETER["central_meridian",-71.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26786"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.71666666666667 +lat_2=42.68333333333333 +lat_0=41 +lon_0=-71.5 +x_0=182880.3657607315 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26786,'EPSG',26786,'PROJCS["NAD27 / Massachusetts Mainland",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.71666666666667],PARAMETER["standard_parallel_2",42.68333333333333],PARAMETER["latitude_of_origin",41],PARAMETER["central_meridian",-71.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26786"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.71666666666667 +lat_2=42.68333333333333 +lat_0=41 +lon_0=-71.5 +x_0=182880.3657607315 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26787 : NAD27 / Massachusetts Island --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26787,'EPSG',26787,'PROJCS["NAD27 / Massachusetts Island",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.28333333333333],PARAMETER["standard_parallel_2",41.48333333333333],PARAMETER["latitude_of_origin",41],PARAMETER["central_meridian",-70.5],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26787"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.28333333333333 +lat_2=41.48333333333333 +lat_0=41 +lon_0=-70.5 +x_0=60960.12192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26787,'EPSG',26787,'PROJCS["NAD27 / Massachusetts Island",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.28333333333333],PARAMETER["standard_parallel_2",41.48333333333333],PARAMETER["latitude_of_origin",41],PARAMETER["central_meridian",-70.5],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26787"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.28333333333333 +lat_2=41.48333333333333 +lat_0=41 +lon_0=-70.5 +x_0=60960.12192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26791 : NAD27 / Minnesota North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26791,'EPSG',26791,'PROJCS["NAD27 / Minnesota North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.03333333333333],PARAMETER["standard_parallel_2",48.63333333333333],PARAMETER["latitude_of_origin",46.5],PARAMETER["central_meridian",-93.1],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26791"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.03333333333333 +lat_2=48.63333333333333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26791,'EPSG',26791,'PROJCS["NAD27 / Minnesota North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.03333333333333],PARAMETER["standard_parallel_2",48.63333333333333],PARAMETER["latitude_of_origin",46.5],PARAMETER["central_meridian",-93.1],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26791"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.03333333333333 +lat_2=48.63333333333333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26792 : NAD27 / Minnesota Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26792,'EPSG',26792,'PROJCS["NAD27 / Minnesota Central",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.61666666666667],PARAMETER["standard_parallel_2",47.05],PARAMETER["latitude_of_origin",45],PARAMETER["central_meridian",-94.25],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26792"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.61666666666667 +lat_2=47.05 +lat_0=45 +lon_0=-94.25 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26792,'EPSG',26792,'PROJCS["NAD27 / Minnesota Central",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.61666666666667],PARAMETER["standard_parallel_2",47.05],PARAMETER["latitude_of_origin",45],PARAMETER["central_meridian",-94.25],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26792"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.61666666666667 +lat_2=47.05 +lat_0=45 +lon_0=-94.25 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26793 : NAD27 / Minnesota South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26793,'EPSG',26793,'PROJCS["NAD27 / Minnesota South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43.78333333333333],PARAMETER["standard_parallel_2",45.21666666666667],PARAMETER["latitude_of_origin",43],PARAMETER["central_meridian",-94],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26793"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43.78333333333333 +lat_2=45.21666666666667 +lat_0=43 +lon_0=-94 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26793,'EPSG',26793,'PROJCS["NAD27 / Minnesota South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43.78333333333333],PARAMETER["standard_parallel_2",45.21666666666667],PARAMETER["latitude_of_origin",43],PARAMETER["central_meridian",-94],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26793"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43.78333333333333 +lat_2=45.21666666666667 +lat_0=43 +lon_0=-94 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26794 : NAD27 / Mississippi East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26794,'EPSG',26794,'PROJCS["NAD27 / Mississippi East",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",29.66666666666667],PARAMETER["central_meridian",-88.83333333333333],PARAMETER["scale_factor",0.99996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26794"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=29.66666666666667 +lon_0=-88.83333333333333 +k=0.99996 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26794,'EPSG',26794,'PROJCS["NAD27 / Mississippi East",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",29.66666666666667],PARAMETER["central_meridian",-88.83333333333333],PARAMETER["scale_factor",0.99996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26794"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=29.66666666666667 +lon_0=-88.83333333333333 +k=0.99996 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26795 : NAD27 / Mississippi West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26795,'EPSG',26795,'PROJCS["NAD27 / Mississippi West",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30.5],PARAMETER["central_meridian",-90.33333333333333],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26795"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30.5 +lon_0=-90.33333333333333 +k=0.999941177 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26795,'EPSG',26795,'PROJCS["NAD27 / Mississippi West",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30.5],PARAMETER["central_meridian",-90.33333333333333],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26795"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30.5 +lon_0=-90.33333333333333 +k=0.999941177 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26796 : NAD27 / Missouri East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26796,'EPSG',26796,'PROJCS["NAD27 / Missouri East",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",35.83333333333334],PARAMETER["central_meridian",-90.5],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26796"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=35.83333333333334 +lon_0=-90.5 +k=0.999933333 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26796,'EPSG',26796,'PROJCS["NAD27 / Missouri East",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",35.83333333333334],PARAMETER["central_meridian",-90.5],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26796"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=35.83333333333334 +lon_0=-90.5 +k=0.999933333 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26797 : NAD27 / Missouri Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26797,'EPSG',26797,'PROJCS["NAD27 / Missouri Central",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",35.83333333333334],PARAMETER["central_meridian",-92.5],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26797"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=35.83333333333334 +lon_0=-92.5 +k=0.999933333 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26797,'EPSG',26797,'PROJCS["NAD27 / Missouri Central",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",35.83333333333334],PARAMETER["central_meridian",-92.5],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26797"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=35.83333333333334 +lon_0=-92.5 +k=0.999933333 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26798 : NAD27 / Missouri West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26798,'EPSG',26798,'PROJCS["NAD27 / Missouri West",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36.16666666666666],PARAMETER["central_meridian",-94.5],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26798"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=36.16666666666666 +lon_0=-94.5 +k=0.999941177 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26798,'EPSG',26798,'PROJCS["NAD27 / Missouri West",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36.16666666666666],PARAMETER["central_meridian",-94.5],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26798"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=36.16666666666666 +lon_0=-94.5 +k=0.999941177 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26799 : NAD27 / California zone VII --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26799,'EPSG',26799,'PROJCS["NAD27 / California zone VII",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",34.41666666666666],PARAMETER["standard_parallel_2",33.86666666666667],PARAMETER["latitude_of_origin",34.13333333333333],PARAMETER["central_meridian",-118.3333333333333],PARAMETER["false_easting",4186692.58],PARAMETER["false_northing",4160926.74],AUTHORITY["EPSG","26799"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=34.41666666666666 +lat_2=33.86666666666667 +lat_0=34.13333333333333 +lon_0=-118.3333333333333 +x_0=1276106.450596901 +y_0=1268253.006858014 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26799,'EPSG',26799,'PROJCS["NAD27 / California zone VII",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",34.41666666666666],PARAMETER["standard_parallel_2",33.86666666666667],PARAMETER["latitude_of_origin",34.13333333333333],PARAMETER["central_meridian",-118.3333333333333],PARAMETER["false_easting",4186692.58],PARAMETER["false_northing",4160926.74],AUTHORITY["EPSG","26799"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=34.41666666666666 +lat_2=33.86666666666667 +lat_0=34.13333333333333 +lon_0=-118.3333333333333 +x_0=1276106.450596901 +y_0=1268253.006858014 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 26801 : NAD Michigan / Michigan East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26801,'EPSG',26801,'PROJCS["NAD Michigan / Michigan East",GEOGCS["NAD27 Michigan",DATUM["NAD_Michigan",SPHEROID["Clarke 1866 Michigan",6378450.047548896,294.9786971646739,AUTHORITY["EPSG","7009"]],AUTHORITY["EPSG","6268"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4268"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.5],PARAMETER["central_meridian",-83.66666666666667],PARAMETER["scale_factor",0.999942857],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26801"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.5 +lon_0=-83.66666666666667 +k=0.999942857 +x_0=152400.3048006096 +y_0=0 +a=6378450.047548896 +b=6356826.621488444 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26801,'EPSG',26801,'PROJCS["NAD Michigan / Michigan East",GEOGCS["NAD27 Michigan",DATUM["NAD_Michigan",SPHEROID["Clarke 1866 Michigan",6378450.047548896,294.9786971646739,AUTHORITY["EPSG","7009"]],AUTHORITY["EPSG","6268"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4268"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.5],PARAMETER["central_meridian",-83.66666666666667],PARAMETER["scale_factor",0.999942857],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26801"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.5 +lon_0=-83.66666666666667 +k=0.999942857 +x_0=152400.3048006096 +y_0=0 +a=6378450.047548896 +b=6356826.621488444 +units=us-ft +no_defs '); --- --- EPSG 26802 : NAD Michigan / Michigan Old Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26802,'EPSG',26802,'PROJCS["NAD Michigan / Michigan Old Central",GEOGCS["NAD27 Michigan",DATUM["NAD_Michigan",SPHEROID["Clarke 1866 Michigan",6378450.047548896,294.9786971646739,AUTHORITY["EPSG","7009"]],AUTHORITY["EPSG","6268"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4268"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.5],PARAMETER["central_meridian",-85.75],PARAMETER["scale_factor",0.999909091],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26802"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.5 +lon_0=-85.75 +k=0.999909091 +x_0=152400.3048006096 +y_0=0 +a=6378450.047548896 +b=6356826.621488444 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26802,'EPSG',26802,'PROJCS["NAD Michigan / Michigan Old Central",GEOGCS["NAD27 Michigan",DATUM["NAD_Michigan",SPHEROID["Clarke 1866 Michigan",6378450.047548896,294.9786971646739,AUTHORITY["EPSG","7009"]],AUTHORITY["EPSG","6268"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4268"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.5],PARAMETER["central_meridian",-85.75],PARAMETER["scale_factor",0.999909091],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26802"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.5 +lon_0=-85.75 +k=0.999909091 +x_0=152400.3048006096 +y_0=0 +a=6378450.047548896 +b=6356826.621488444 +units=us-ft +no_defs '); --- --- EPSG 26803 : NAD Michigan / Michigan West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26803,'EPSG',26803,'PROJCS["NAD Michigan / Michigan West",GEOGCS["NAD27 Michigan",DATUM["NAD_Michigan",SPHEROID["Clarke 1866 Michigan",6378450.047548896,294.9786971646739,AUTHORITY["EPSG","7009"]],AUTHORITY["EPSG","6268"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4268"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.5],PARAMETER["central_meridian",-88.75],PARAMETER["scale_factor",0.999909091],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26803"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.5 +lon_0=-88.75 +k=0.999909091 +x_0=152400.3048006096 +y_0=0 +a=6378450.047548896 +b=6356826.621488444 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26803,'EPSG',26803,'PROJCS["NAD Michigan / Michigan West",GEOGCS["NAD27 Michigan",DATUM["NAD_Michigan",SPHEROID["Clarke 1866 Michigan",6378450.047548896,294.9786971646739,AUTHORITY["EPSG","7009"]],AUTHORITY["EPSG","6268"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4268"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.5],PARAMETER["central_meridian",-88.75],PARAMETER["scale_factor",0.999909091],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26803"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.5 +lon_0=-88.75 +k=0.999909091 +x_0=152400.3048006096 +y_0=0 +a=6378450.047548896 +b=6356826.621488444 +units=us-ft +no_defs '); --- --- EPSG 26811 : NAD Michigan / Michigan North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26811,'EPSG',26811,'PROJCS["NAD Michigan / Michigan North",GEOGCS["NAD27 Michigan",DATUM["NAD_Michigan",SPHEROID["Clarke 1866 Michigan",6378450.047548896,294.9786971646739,AUTHORITY["EPSG","7009"]],AUTHORITY["EPSG","6268"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4268"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.48333333333333],PARAMETER["standard_parallel_2",47.08333333333334],PARAMETER["latitude_of_origin",44.78333333333333],PARAMETER["central_meridian",-87],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26811"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.48333333333333 +lat_2=47.08333333333334 +lat_0=44.78333333333333 +lon_0=-87 +x_0=609601.2192024384 +y_0=0 +a=6378450.047548896 +b=6356826.621488444 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26811,'EPSG',26811,'PROJCS["NAD Michigan / Michigan North",GEOGCS["NAD27 Michigan",DATUM["NAD_Michigan",SPHEROID["Clarke 1866 Michigan",6378450.047548896,294.9786971646739,AUTHORITY["EPSG","7009"]],AUTHORITY["EPSG","6268"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4268"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.48333333333333],PARAMETER["standard_parallel_2",47.08333333333334],PARAMETER["latitude_of_origin",44.78333333333333],PARAMETER["central_meridian",-87],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26811"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.48333333333333 +lat_2=47.08333333333334 +lat_0=44.78333333333333 +lon_0=-87 +x_0=609601.2192024384 +y_0=0 +a=6378450.047548896 +b=6356826.621488444 +units=us-ft +no_defs '); --- --- EPSG 26812 : NAD Michigan / Michigan Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26812,'EPSG',26812,'PROJCS["NAD Michigan / Michigan Central",GEOGCS["NAD27 Michigan",DATUM["NAD_Michigan",SPHEROID["Clarke 1866 Michigan",6378450.047548896,294.9786971646739,AUTHORITY["EPSG","7009"]],AUTHORITY["EPSG","6268"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4268"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44.18333333333333],PARAMETER["standard_parallel_2",45.7],PARAMETER["latitude_of_origin",43.31666666666667],PARAMETER["central_meridian",-84.33333333333333],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26812"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44.18333333333333 +lat_2=45.7 +lat_0=43.31666666666667 +lon_0=-84.33333333333333 +x_0=609601.2192024384 +y_0=0 +a=6378450.047548896 +b=6356826.621488444 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26812,'EPSG',26812,'PROJCS["NAD Michigan / Michigan Central",GEOGCS["NAD27 Michigan",DATUM["NAD_Michigan",SPHEROID["Clarke 1866 Michigan",6378450.047548896,294.9786971646739,AUTHORITY["EPSG","7009"]],AUTHORITY["EPSG","6268"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4268"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44.18333333333333],PARAMETER["standard_parallel_2",45.7],PARAMETER["latitude_of_origin",43.31666666666667],PARAMETER["central_meridian",-84.33333333333333],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26812"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44.18333333333333 +lat_2=45.7 +lat_0=43.31666666666667 +lon_0=-84.33333333333333 +x_0=609601.2192024384 +y_0=0 +a=6378450.047548896 +b=6356826.621488444 +units=us-ft +no_defs '); --- --- EPSG 26813 : NAD Michigan / Michigan South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26813,'EPSG',26813,'PROJCS["NAD Michigan / Michigan South",GEOGCS["NAD27 Michigan",DATUM["NAD_Michigan",SPHEROID["Clarke 1866 Michigan",6378450.047548896,294.9786971646739,AUTHORITY["EPSG","7009"]],AUTHORITY["EPSG","6268"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4268"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",42.1],PARAMETER["standard_parallel_2",43.66666666666666],PARAMETER["latitude_of_origin",41.5],PARAMETER["central_meridian",-84.33333333333333],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26813"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=42.1 +lat_2=43.66666666666666 +lat_0=41.5 +lon_0=-84.33333333333333 +x_0=609601.2192024384 +y_0=0 +a=6378450.047548896 +b=6356826.621488444 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26813,'EPSG',26813,'PROJCS["NAD Michigan / Michigan South",GEOGCS["NAD27 Michigan",DATUM["NAD_Michigan",SPHEROID["Clarke 1866 Michigan",6378450.047548896,294.9786971646739,AUTHORITY["EPSG","7009"]],AUTHORITY["EPSG","6268"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4268"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",42.1],PARAMETER["standard_parallel_2",43.66666666666666],PARAMETER["latitude_of_origin",41.5],PARAMETER["central_meridian",-84.33333333333333],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26813"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=42.1 +lat_2=43.66666666666666 +lat_0=41.5 +lon_0=-84.33333333333333 +x_0=609601.2192024384 +y_0=0 +a=6378450.047548896 +b=6356826.621488444 +units=us-ft +no_defs '); --- --- EPSG 26814 : NAD83 / Maine East (ftUS) (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26814,'EPSG',26814,'PROJCS["NAD83 / Maine East (ftUS) (deprecated)",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",43.66666666666666],PARAMETER["central_meridian",-68.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26814"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.9999 +x_0=300000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26814,'EPSG',26814,'PROJCS["NAD83 / Maine East (ftUS) (deprecated)",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",43.66666666666666],PARAMETER["central_meridian",-68.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26814"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.9999 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26815 : NAD83 / Maine West (ftUS) (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26815,'EPSG',26815,'PROJCS["NAD83 / Maine West (ftUS) (deprecated)",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.83333333333334],PARAMETER["central_meridian",-70.16666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",900000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26815"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666666667 +k=0.999966667 +x_0=900000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26815,'EPSG',26815,'PROJCS["NAD83 / Maine West (ftUS) (deprecated)",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.83333333333334],PARAMETER["central_meridian",-70.16666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",900000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26815"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666666667 +k=0.999966667 +x_0=900000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26819 : NAD83 / Minnesota North (ftUS) (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26819,'EPSG',26819,'PROJCS["NAD83 / Minnesota North (ftUS) (deprecated)",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.63333333333333],PARAMETER["standard_parallel_2",47.03333333333333],PARAMETER["latitude_of_origin",46.5],PARAMETER["central_meridian",-93.1],PARAMETER["false_easting",800000.0000101601],PARAMETER["false_northing",99999.99998984],AUTHORITY["EPSG","26819"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.63333333333333 +lat_2=47.03333333333333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=800000.0000101601 +y_0=99999.99998984 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26819,'EPSG',26819,'PROJCS["NAD83 / Minnesota North (ftUS) (deprecated)",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.63333333333333],PARAMETER["standard_parallel_2",47.03333333333333],PARAMETER["latitude_of_origin",46.5],PARAMETER["central_meridian",-93.1],PARAMETER["false_easting",800000.0000101601],PARAMETER["false_northing",99999.99998984],AUTHORITY["EPSG","26819"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.63333333333333 +lat_2=47.03333333333333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=800000.0000101601 +y_0=99999.99998984 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26820 : NAD83 / Minnesota Central (ftUS) (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26820,'EPSG',26820,'PROJCS["NAD83 / Minnesota Central (ftUS) (deprecated)",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.05],PARAMETER["standard_parallel_2",45.61666666666667],PARAMETER["latitude_of_origin",45],PARAMETER["central_meridian",-94.25],PARAMETER["false_easting",800000.0000101601],PARAMETER["false_northing",99999.99998984],AUTHORITY["EPSG","26820"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.05 +lat_2=45.61666666666667 +lat_0=45 +lon_0=-94.25 +x_0=800000.0000101601 +y_0=99999.99998984 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26820,'EPSG',26820,'PROJCS["NAD83 / Minnesota Central (ftUS) (deprecated)",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.05],PARAMETER["standard_parallel_2",45.61666666666667],PARAMETER["latitude_of_origin",45],PARAMETER["central_meridian",-94.25],PARAMETER["false_easting",800000.0000101601],PARAMETER["false_northing",99999.99998984],AUTHORITY["EPSG","26820"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.05 +lat_2=45.61666666666667 +lat_0=45 +lon_0=-94.25 +x_0=800000.0000101601 +y_0=99999.99998984 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26821 : NAD83 / Minnesota South (ftUS) (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26821,'EPSG',26821,'PROJCS["NAD83 / Minnesota South (ftUS) (deprecated)",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.21666666666667],PARAMETER["standard_parallel_2",43.78333333333333],PARAMETER["latitude_of_origin",43],PARAMETER["central_meridian",-94],PARAMETER["false_easting",800000.0000101601],PARAMETER["false_northing",99999.99998984],AUTHORITY["EPSG","26821"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.21666666666667 +lat_2=43.78333333333333 +lat_0=43 +lon_0=-94 +x_0=800000.0000101601 +y_0=99999.99998984 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26821,'EPSG',26821,'PROJCS["NAD83 / Minnesota South (ftUS) (deprecated)",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.21666666666667],PARAMETER["standard_parallel_2",43.78333333333333],PARAMETER["latitude_of_origin",43],PARAMETER["central_meridian",-94],PARAMETER["false_easting",800000.0000101601],PARAMETER["false_northing",99999.99998984],AUTHORITY["EPSG","26821"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.21666666666667 +lat_2=43.78333333333333 +lat_0=43 +lon_0=-94 +x_0=800000.0000101601 +y_0=99999.99998984 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26822 : NAD83 / Nebraska (ftUS) (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26822,'EPSG',26822,'PROJCS["NAD83 / Nebraska (ftUS) (deprecated)",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43],PARAMETER["standard_parallel_2",40],PARAMETER["latitude_of_origin",39.83333333333334],PARAMETER["central_meridian",-100],PARAMETER["false_easting",500000.0000101601],PARAMETER["false_northing",0],AUTHORITY["EPSG","26822"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +lon_0=-100 +x_0=500000.0000101601 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26822,'EPSG',26822,'PROJCS["NAD83 / Nebraska (ftUS) (deprecated)",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43],PARAMETER["standard_parallel_2",40],PARAMETER["latitude_of_origin",39.83333333333334],PARAMETER["central_meridian",-100],PARAMETER["false_easting",500000.0000101601],PARAMETER["false_northing",0],AUTHORITY["EPSG","26822"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +lon_0=-100 +x_0=500000.0000101601 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26823 : NAD83 / West Virginia North (ftUS) (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26823,'EPSG',26823,'PROJCS["NAD83 / West Virginia North (ftUS) (deprecated)",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.25],PARAMETER["standard_parallel_2",39],PARAMETER["latitude_of_origin",38.5],PARAMETER["central_meridian",-79.5],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","26823"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.25 +lat_2=39 +lat_0=38.5 +lon_0=-79.5 +x_0=1968500 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26823,'EPSG',26823,'PROJCS["NAD83 / West Virginia North (ftUS) (deprecated)",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.25],PARAMETER["standard_parallel_2",39],PARAMETER["latitude_of_origin",38.5],PARAMETER["central_meridian",-79.5],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","26823"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.25 +lat_2=39 +lat_0=38.5 +lon_0=-79.5 +x_0=1968500 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26824 : NAD83 / West Virginia South (ftUS) (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26824,'EPSG',26824,'PROJCS["NAD83 / West Virginia South (ftUS) (deprecated)",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.88333333333333],PARAMETER["standard_parallel_2",37.48333333333333],PARAMETER["latitude_of_origin",37],PARAMETER["central_meridian",-81],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","26824"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.88333333333333 +lat_2=37.48333333333333 +lat_0=37 +lon_0=-81 +x_0=1968500 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26824,'EPSG',26824,'PROJCS["NAD83 / West Virginia South (ftUS) (deprecated)",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.88333333333333],PARAMETER["standard_parallel_2",37.48333333333333],PARAMETER["latitude_of_origin",37],PARAMETER["central_meridian",-81],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","26824"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.88333333333333 +lat_2=37.48333333333333 +lat_0=37 +lon_0=-81 +x_0=1968500 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26825 : NAD83(HARN) / Maine East (ftUS) (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26825,'EPSG',26825,'PROJCS["NAD83(HARN) / Maine East (ftUS) (deprecated)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",43.66666666666666],PARAMETER["central_meridian",-68.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26825"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.9999 +x_0=300000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26825,'EPSG',26825,'PROJCS["NAD83(HARN) / Maine East (ftUS) (deprecated)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",43.66666666666666],PARAMETER["central_meridian",-68.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26825"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.9999 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26826 : NAD83(HARN) / Maine West (ftUS) (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26826,'EPSG',26826,'PROJCS["NAD83(HARN) / Maine West (ftUS) (deprecated)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.83333333333334],PARAMETER["central_meridian",-70.16666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",900000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26826"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666666667 +k=0.999966667 +x_0=900000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26826,'EPSG',26826,'PROJCS["NAD83(HARN) / Maine West (ftUS) (deprecated)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.83333333333334],PARAMETER["central_meridian",-70.16666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",900000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26826"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666666667 +k=0.999966667 +x_0=900000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26830 : NAD83(HARN) / Minnesota North (ftUS) (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26830,'EPSG',26830,'PROJCS["NAD83(HARN) / Minnesota North (ftUS) (deprecated)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.63333333333333],PARAMETER["standard_parallel_2",47.03333333333333],PARAMETER["latitude_of_origin",46.5],PARAMETER["central_meridian",-93.1],PARAMETER["false_easting",800000.0000101601],PARAMETER["false_northing",99999.99998984],AUTHORITY["EPSG","26830"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.63333333333333 +lat_2=47.03333333333333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=800000.0000101601 +y_0=99999.99998984 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26830,'EPSG',26830,'PROJCS["NAD83(HARN) / Minnesota North (ftUS) (deprecated)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.63333333333333],PARAMETER["standard_parallel_2",47.03333333333333],PARAMETER["latitude_of_origin",46.5],PARAMETER["central_meridian",-93.1],PARAMETER["false_easting",800000.0000101601],PARAMETER["false_northing",99999.99998984],AUTHORITY["EPSG","26830"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.63333333333333 +lat_2=47.03333333333333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=800000.0000101601 +y_0=99999.99998984 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26831 : NAD83(HARN) / Minnesota Central (ftUS) (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26831,'EPSG',26831,'PROJCS["NAD83(HARN) / Minnesota Central (ftUS) (deprecated)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.05],PARAMETER["standard_parallel_2",45.61666666666667],PARAMETER["latitude_of_origin",45],PARAMETER["central_meridian",-94.25],PARAMETER["false_easting",800000.0000101601],PARAMETER["false_northing",99999.99998984],AUTHORITY["EPSG","26831"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.05 +lat_2=45.61666666666667 +lat_0=45 +lon_0=-94.25 +x_0=800000.0000101601 +y_0=99999.99998984 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26831,'EPSG',26831,'PROJCS["NAD83(HARN) / Minnesota Central (ftUS) (deprecated)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.05],PARAMETER["standard_parallel_2",45.61666666666667],PARAMETER["latitude_of_origin",45],PARAMETER["central_meridian",-94.25],PARAMETER["false_easting",800000.0000101601],PARAMETER["false_northing",99999.99998984],AUTHORITY["EPSG","26831"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.05 +lat_2=45.61666666666667 +lat_0=45 +lon_0=-94.25 +x_0=800000.0000101601 +y_0=99999.99998984 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26832 : NAD83(HARN) / Minnesota South (ftUS) (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26832,'EPSG',26832,'PROJCS["NAD83(HARN) / Minnesota South (ftUS) (deprecated)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.21666666666667],PARAMETER["standard_parallel_2",43.78333333333333],PARAMETER["latitude_of_origin",43],PARAMETER["central_meridian",-94],PARAMETER["false_easting",800000.0000101601],PARAMETER["false_northing",99999.99998984],AUTHORITY["EPSG","26832"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.21666666666667 +lat_2=43.78333333333333 +lat_0=43 +lon_0=-94 +x_0=800000.0000101601 +y_0=99999.99998984 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26832,'EPSG',26832,'PROJCS["NAD83(HARN) / Minnesota South (ftUS) (deprecated)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.21666666666667],PARAMETER["standard_parallel_2",43.78333333333333],PARAMETER["latitude_of_origin",43],PARAMETER["central_meridian",-94],PARAMETER["false_easting",800000.0000101601],PARAMETER["false_northing",99999.99998984],AUTHORITY["EPSG","26832"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.21666666666667 +lat_2=43.78333333333333 +lat_0=43 +lon_0=-94 +x_0=800000.0000101601 +y_0=99999.99998984 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26833 : NAD83(HARN) / Nebraska (ftUS) (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26833,'EPSG',26833,'PROJCS["NAD83(HARN) / Nebraska (ftUS) (deprecated)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43],PARAMETER["standard_parallel_2",40],PARAMETER["latitude_of_origin",39.83333333333334],PARAMETER["central_meridian",-100],PARAMETER["false_easting",500000.0000101601],PARAMETER["false_northing",0],AUTHORITY["EPSG","26833"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +lon_0=-100 +x_0=500000.0000101601 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26833,'EPSG',26833,'PROJCS["NAD83(HARN) / Nebraska (ftUS) (deprecated)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43],PARAMETER["standard_parallel_2",40],PARAMETER["latitude_of_origin",39.83333333333334],PARAMETER["central_meridian",-100],PARAMETER["false_easting",500000.0000101601],PARAMETER["false_northing",0],AUTHORITY["EPSG","26833"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +lon_0=-100 +x_0=500000.0000101601 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26834 : NAD83(HARN) / West Virginia North (ftUS) (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26834,'EPSG',26834,'PROJCS["NAD83(HARN) / West Virginia North (ftUS) (deprecated)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.25],PARAMETER["standard_parallel_2",39],PARAMETER["latitude_of_origin",38.5],PARAMETER["central_meridian",-79.5],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","26834"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.25 +lat_2=39 +lat_0=38.5 +lon_0=-79.5 +x_0=1968500 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26834,'EPSG',26834,'PROJCS["NAD83(HARN) / West Virginia North (ftUS) (deprecated)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.25],PARAMETER["standard_parallel_2",39],PARAMETER["latitude_of_origin",38.5],PARAMETER["central_meridian",-79.5],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","26834"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.25 +lat_2=39 +lat_0=38.5 +lon_0=-79.5 +x_0=1968500 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26835 : NAD83(HARN) / West Virginia South (ftUS) (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26835,'EPSG',26835,'PROJCS["NAD83(HARN) / West Virginia South (ftUS) (deprecated)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.88333333333333],PARAMETER["standard_parallel_2",37.48333333333333],PARAMETER["latitude_of_origin",37],PARAMETER["central_meridian",-81],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","26835"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.88333333333333 +lat_2=37.48333333333333 +lat_0=37 +lon_0=-81 +x_0=1968500 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26835,'EPSG',26835,'PROJCS["NAD83(HARN) / West Virginia South (ftUS) (deprecated)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.88333333333333],PARAMETER["standard_parallel_2",37.48333333333333],PARAMETER["latitude_of_origin",37],PARAMETER["central_meridian",-81],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","26835"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.88333333333333 +lat_2=37.48333333333333 +lat_0=37 +lon_0=-81 +x_0=1968500 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26836 : NAD83(NSRS2007) / Maine East (ftUS) (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26836,'EPSG',26836,'PROJCS["NAD83(NSRS2007) / Maine East (ftUS) (deprecated)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",43.66666666666666],PARAMETER["central_meridian",-68.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26836"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.9999 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26836,'EPSG',26836,'PROJCS["NAD83(NSRS2007) / Maine East (ftUS) (deprecated)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",43.66666666666666],PARAMETER["central_meridian",-68.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26836"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.9999 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26837 : NAD83(NSRS2007) / Maine West (ftUS) (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26837,'EPSG',26837,'PROJCS["NAD83(NSRS2007) / Maine West (ftUS) (deprecated)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.83333333333334],PARAMETER["central_meridian",-70.16666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",900000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26837"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666666667 +k=0.999966667 +x_0=900000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26837,'EPSG',26837,'PROJCS["NAD83(NSRS2007) / Maine West (ftUS) (deprecated)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.83333333333334],PARAMETER["central_meridian",-70.16666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",900000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26837"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666666667 +k=0.999966667 +x_0=900000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26841 : NAD83(NSRS2007) / Minnesota North (ftUS) (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26841,'EPSG',26841,'PROJCS["NAD83(NSRS2007) / Minnesota North (ftUS) (deprecated)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.63333333333333],PARAMETER["standard_parallel_2",47.03333333333333],PARAMETER["latitude_of_origin",46.5],PARAMETER["central_meridian",-93.1],PARAMETER["false_easting",800000.0000101601],PARAMETER["false_northing",99999.99998984],AUTHORITY["EPSG","26841"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.63333333333333 +lat_2=47.03333333333333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=800000.0000101601 +y_0=99999.99998984 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26841,'EPSG',26841,'PROJCS["NAD83(NSRS2007) / Minnesota North (ftUS) (deprecated)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.63333333333333],PARAMETER["standard_parallel_2",47.03333333333333],PARAMETER["latitude_of_origin",46.5],PARAMETER["central_meridian",-93.1],PARAMETER["false_easting",800000.0000101601],PARAMETER["false_northing",99999.99998984],AUTHORITY["EPSG","26841"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.63333333333333 +lat_2=47.03333333333333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=800000.0000101601 +y_0=99999.99998984 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26842 : NAD83(NSRS2007) / Minnesota Central (ftUS) (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26842,'EPSG',26842,'PROJCS["NAD83(NSRS2007) / Minnesota Central (ftUS) (deprecated)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.05],PARAMETER["standard_parallel_2",45.61666666666667],PARAMETER["latitude_of_origin",45],PARAMETER["central_meridian",-94.25],PARAMETER["false_easting",800000.0000101601],PARAMETER["false_northing",99999.99998984],AUTHORITY["EPSG","26842"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.05 +lat_2=45.61666666666667 +lat_0=45 +lon_0=-94.25 +x_0=800000.0000101601 +y_0=99999.99998984 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26842,'EPSG',26842,'PROJCS["NAD83(NSRS2007) / Minnesota Central (ftUS) (deprecated)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.05],PARAMETER["standard_parallel_2",45.61666666666667],PARAMETER["latitude_of_origin",45],PARAMETER["central_meridian",-94.25],PARAMETER["false_easting",800000.0000101601],PARAMETER["false_northing",99999.99998984],AUTHORITY["EPSG","26842"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.05 +lat_2=45.61666666666667 +lat_0=45 +lon_0=-94.25 +x_0=800000.0000101601 +y_0=99999.99998984 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26843 : NAD83(NSRS2007) / Minnesota South (ftUS) (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26843,'EPSG',26843,'PROJCS["NAD83(NSRS2007) / Minnesota South (ftUS) (deprecated)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.21666666666667],PARAMETER["standard_parallel_2",43.78333333333333],PARAMETER["latitude_of_origin",43],PARAMETER["central_meridian",-94],PARAMETER["false_easting",800000.0000101601],PARAMETER["false_northing",99999.99998984],AUTHORITY["EPSG","26843"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.21666666666667 +lat_2=43.78333333333333 +lat_0=43 +lon_0=-94 +x_0=800000.0000101601 +y_0=99999.99998984 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26843,'EPSG',26843,'PROJCS["NAD83(NSRS2007) / Minnesota South (ftUS) (deprecated)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.21666666666667],PARAMETER["standard_parallel_2",43.78333333333333],PARAMETER["latitude_of_origin",43],PARAMETER["central_meridian",-94],PARAMETER["false_easting",800000.0000101601],PARAMETER["false_northing",99999.99998984],AUTHORITY["EPSG","26843"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.21666666666667 +lat_2=43.78333333333333 +lat_0=43 +lon_0=-94 +x_0=800000.0000101601 +y_0=99999.99998984 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26844 : NAD83(NSRS2007) / Nebraska (ftUS) (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26844,'EPSG',26844,'PROJCS["NAD83(NSRS2007) / Nebraska (ftUS) (deprecated)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43],PARAMETER["standard_parallel_2",40],PARAMETER["latitude_of_origin",39.83333333333334],PARAMETER["central_meridian",-100],PARAMETER["false_easting",500000.0000101601],PARAMETER["false_northing",0],AUTHORITY["EPSG","26844"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +lon_0=-100 +x_0=500000.0000101601 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26844,'EPSG',26844,'PROJCS["NAD83(NSRS2007) / Nebraska (ftUS) (deprecated)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43],PARAMETER["standard_parallel_2",40],PARAMETER["latitude_of_origin",39.83333333333334],PARAMETER["central_meridian",-100],PARAMETER["false_easting",500000.0000101601],PARAMETER["false_northing",0],AUTHORITY["EPSG","26844"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +lon_0=-100 +x_0=500000.0000101601 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26845 : NAD83(NSRS2007) / West Virginia North (ftUS) (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26845,'EPSG',26845,'PROJCS["NAD83(NSRS2007) / West Virginia North (ftUS) (deprecated)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.25],PARAMETER["standard_parallel_2",39],PARAMETER["latitude_of_origin",38.5],PARAMETER["central_meridian",-79.5],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","26845"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.25 +lat_2=39 +lat_0=38.5 +lon_0=-79.5 +x_0=1968500 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26845,'EPSG',26845,'PROJCS["NAD83(NSRS2007) / West Virginia North (ftUS) (deprecated)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.25],PARAMETER["standard_parallel_2",39],PARAMETER["latitude_of_origin",38.5],PARAMETER["central_meridian",-79.5],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","26845"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.25 +lat_2=39 +lat_0=38.5 +lon_0=-79.5 +x_0=1968500 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26846 : NAD83(NSRS2007) / West Virginia South (ftUS) (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26846,'EPSG',26846,'PROJCS["NAD83(NSRS2007) / West Virginia South (ftUS) (deprecated)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.88333333333333],PARAMETER["standard_parallel_2",37.48333333333333],PARAMETER["latitude_of_origin",37],PARAMETER["central_meridian",-81],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","26846"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.88333333333333 +lat_2=37.48333333333333 +lat_0=37 +lon_0=-81 +x_0=1968500 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26846,'EPSG',26846,'PROJCS["NAD83(NSRS2007) / West Virginia South (ftUS) (deprecated)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.88333333333333],PARAMETER["standard_parallel_2",37.48333333333333],PARAMETER["latitude_of_origin",37],PARAMETER["central_meridian",-81],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","26846"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.88333333333333 +lat_2=37.48333333333333 +lat_0=37 +lon_0=-81 +x_0=1968500 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26847 : NAD83 / Maine East (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26847,'EPSG',26847,'PROJCS["NAD83 / Maine 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",43.66666666666666],PARAMETER["central_meridian",-68.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",984250.0000000002],PARAMETER["false_northing",0],AUTHORITY["EPSG","26847"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.9999 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26847,'EPSG',26847,'PROJCS["NAD83 / Maine East (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",43.66666666666666],PARAMETER["central_meridian",-68.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",984250.0000000002],PARAMETER["false_northing",0],AUTHORITY["EPSG","26847"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.9999 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 26848 : NAD83 / Maine West (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26848,'EPSG',26848,'PROJCS["NAD83 / Maine West (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",42.83333333333334],PARAMETER["central_meridian",-70.16666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",2952750],PARAMETER["false_northing",0],AUTHORITY["EPSG","26848"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666666667 +k=0.999966667 +x_0=900000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26848,'EPSG',26848,'PROJCS["NAD83 / Maine West (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.83333333333334],PARAMETER["central_meridian",-70.16666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",2952750],PARAMETER["false_northing",0],AUTHORITY["EPSG","26848"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666666667 +k=0.999966667 +x_0=900000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 26849 : NAD83 / Minnesota North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26849,'EPSG',26849,'PROJCS["NAD83 / Minnesota North (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.63333333333333],PARAMETER["standard_parallel_2",47.03333333333333],PARAMETER["latitude_of_origin",46.5],PARAMETER["central_meridian",-93.1],PARAMETER["false_easting",2624666.6667],PARAMETER["false_northing",328083.3333],AUTHORITY["EPSG","26849"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.63333333333333 +lat_2=47.03333333333333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=800000.0000101599 +y_0=99999.99998983997 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26849,'EPSG',26849,'PROJCS["NAD83 / Minnesota North (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.63333333333333],PARAMETER["standard_parallel_2",47.03333333333333],PARAMETER["latitude_of_origin",46.5],PARAMETER["central_meridian",-93.1],PARAMETER["false_easting",2624666.6667],PARAMETER["false_northing",328083.3333],AUTHORITY["EPSG","26849"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.63333333333333 +lat_2=47.03333333333333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=800000.0000101599 +y_0=99999.99998983997 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 26850 : NAD83 / Minnesota Central (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26850,'EPSG',26850,'PROJCS["NAD83 / Minnesota Central (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.05],PARAMETER["standard_parallel_2",45.61666666666667],PARAMETER["latitude_of_origin",45],PARAMETER["central_meridian",-94.25],PARAMETER["false_easting",2624666.6667],PARAMETER["false_northing",328083.3333],AUTHORITY["EPSG","26850"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.05 +lat_2=45.61666666666667 +lat_0=45 +lon_0=-94.25 +x_0=800000.0000101599 +y_0=99999.99998983997 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26850,'EPSG',26850,'PROJCS["NAD83 / Minnesota Central (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.05],PARAMETER["standard_parallel_2",45.61666666666667],PARAMETER["latitude_of_origin",45],PARAMETER["central_meridian",-94.25],PARAMETER["false_easting",2624666.6667],PARAMETER["false_northing",328083.3333],AUTHORITY["EPSG","26850"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.05 +lat_2=45.61666666666667 +lat_0=45 +lon_0=-94.25 +x_0=800000.0000101599 +y_0=99999.99998983997 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 26851 : NAD83 / Minnesota South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26851,'EPSG',26851,'PROJCS["NAD83 / Minnesota South (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.21666666666667],PARAMETER["standard_parallel_2",43.78333333333333],PARAMETER["latitude_of_origin",43],PARAMETER["central_meridian",-94],PARAMETER["false_easting",2624666.6667],PARAMETER["false_northing",328083.3333],AUTHORITY["EPSG","26851"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.21666666666667 +lat_2=43.78333333333333 +lat_0=43 +lon_0=-94 +x_0=800000.0000101599 +y_0=99999.99998983997 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26851,'EPSG',26851,'PROJCS["NAD83 / Minnesota South (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.21666666666667],PARAMETER["standard_parallel_2",43.78333333333333],PARAMETER["latitude_of_origin",43],PARAMETER["central_meridian",-94],PARAMETER["false_easting",2624666.6667],PARAMETER["false_northing",328083.3333],AUTHORITY["EPSG","26851"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.21666666666667 +lat_2=43.78333333333333 +lat_0=43 +lon_0=-94 +x_0=800000.0000101599 +y_0=99999.99998983997 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 26852 : NAD83 / Nebraska (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26852,'EPSG',26852,'PROJCS["NAD83 / Nebraska (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43],PARAMETER["standard_parallel_2",40],PARAMETER["latitude_of_origin",39.83333333333334],PARAMETER["central_meridian",-100],PARAMETER["false_easting",1640416.6667],PARAMETER["false_northing",0],AUTHORITY["EPSG","26852"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +lon_0=-100 +x_0=500000.00001016 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26852,'EPSG',26852,'PROJCS["NAD83 / Nebraska (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43],PARAMETER["standard_parallel_2",40],PARAMETER["latitude_of_origin",39.83333333333334],PARAMETER["central_meridian",-100],PARAMETER["false_easting",1640416.6667],PARAMETER["false_northing",0],AUTHORITY["EPSG","26852"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +lon_0=-100 +x_0=500000.00001016 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 26853 : NAD83 / West Virginia North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26853,'EPSG',26853,'PROJCS["NAD83 / West Virginia North (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.25],PARAMETER["standard_parallel_2",39],PARAMETER["latitude_of_origin",38.5],PARAMETER["central_meridian",-79.5],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","26853"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.25 +lat_2=39 +lat_0=38.5 +lon_0=-79.5 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26853,'EPSG',26853,'PROJCS["NAD83 / West Virginia North (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.25],PARAMETER["standard_parallel_2",39],PARAMETER["latitude_of_origin",38.5],PARAMETER["central_meridian",-79.5],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","26853"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.25 +lat_2=39 +lat_0=38.5 +lon_0=-79.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 26854 : NAD83 / West Virginia South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26854,'EPSG',26854,'PROJCS["NAD83 / West Virginia South (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["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.88333333333333],PARAMETER["standard_parallel_2",37.48333333333333],PARAMETER["latitude_of_origin",37],PARAMETER["central_meridian",-81],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","26854"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.88333333333333 +lat_2=37.48333333333333 +lat_0=37 +lon_0=-81 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26854,'EPSG',26854,'PROJCS["NAD83 / West Virginia South (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.88333333333333],PARAMETER["standard_parallel_2",37.48333333333333],PARAMETER["latitude_of_origin",37],PARAMETER["central_meridian",-81],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","26854"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.88333333333333 +lat_2=37.48333333333333 +lat_0=37 +lon_0=-81 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 26855 : NAD83(HARN) / Maine East (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26855,'EPSG',26855,'PROJCS["NAD83(HARN) / Maine East (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",43.66666666666666],PARAMETER["central_meridian",-68.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",984250.0000000002],PARAMETER["false_northing",0],AUTHORITY["EPSG","26855"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.9999 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26855,'EPSG',26855,'PROJCS["NAD83(HARN) / Maine East (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",43.66666666666666],PARAMETER["central_meridian",-68.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",984250.0000000002],PARAMETER["false_northing",0],AUTHORITY["EPSG","26855"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.9999 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 26856 : NAD83(HARN) / Maine West (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26856,'EPSG',26856,'PROJCS["NAD83(HARN) / Maine West (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.83333333333334],PARAMETER["central_meridian",-70.16666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",2952750],PARAMETER["false_northing",0],AUTHORITY["EPSG","26856"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666666667 +k=0.999966667 +x_0=900000 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26856,'EPSG',26856,'PROJCS["NAD83(HARN) / Maine West (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.83333333333334],PARAMETER["central_meridian",-70.16666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",2952750],PARAMETER["false_northing",0],AUTHORITY["EPSG","26856"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666666667 +k=0.999966667 +x_0=900000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 26857 : NAD83(HARN) / Minnesota North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26857,'EPSG',26857,'PROJCS["NAD83(HARN) / Minnesota North (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.63333333333333],PARAMETER["standard_parallel_2",47.03333333333333],PARAMETER["latitude_of_origin",46.5],PARAMETER["central_meridian",-93.1],PARAMETER["false_easting",2624666.6667],PARAMETER["false_northing",328083.3333],AUTHORITY["EPSG","26857"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.63333333333333 +lat_2=47.03333333333333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=800000.0000101599 +y_0=99999.99998983997 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26857,'EPSG',26857,'PROJCS["NAD83(HARN) / Minnesota North (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.63333333333333],PARAMETER["standard_parallel_2",47.03333333333333],PARAMETER["latitude_of_origin",46.5],PARAMETER["central_meridian",-93.1],PARAMETER["false_easting",2624666.6667],PARAMETER["false_northing",328083.3333],AUTHORITY["EPSG","26857"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.63333333333333 +lat_2=47.03333333333333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=800000.0000101599 +y_0=99999.99998983997 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 26858 : NAD83(HARN) / Minnesota Central (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26858,'EPSG',26858,'PROJCS["NAD83(HARN) / Minnesota Central (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.05],PARAMETER["standard_parallel_2",45.61666666666667],PARAMETER["latitude_of_origin",45],PARAMETER["central_meridian",-94.25],PARAMETER["false_easting",2624666.6667],PARAMETER["false_northing",328083.3333],AUTHORITY["EPSG","26858"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.05 +lat_2=45.61666666666667 +lat_0=45 +lon_0=-94.25 +x_0=800000.0000101599 +y_0=99999.99998983997 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26858,'EPSG',26858,'PROJCS["NAD83(HARN) / Minnesota Central (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.05],PARAMETER["standard_parallel_2",45.61666666666667],PARAMETER["latitude_of_origin",45],PARAMETER["central_meridian",-94.25],PARAMETER["false_easting",2624666.6667],PARAMETER["false_northing",328083.3333],AUTHORITY["EPSG","26858"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.05 +lat_2=45.61666666666667 +lat_0=45 +lon_0=-94.25 +x_0=800000.0000101599 +y_0=99999.99998983997 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 26859 : NAD83(HARN) / Minnesota South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26859,'EPSG',26859,'PROJCS["NAD83(HARN) / Minnesota South (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.21666666666667],PARAMETER["standard_parallel_2",43.78333333333333],PARAMETER["latitude_of_origin",43],PARAMETER["central_meridian",-94],PARAMETER["false_easting",2624666.6667],PARAMETER["false_northing",328083.3333],AUTHORITY["EPSG","26859"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.21666666666667 +lat_2=43.78333333333333 +lat_0=43 +lon_0=-94 +x_0=800000.0000101599 +y_0=99999.99998983997 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26859,'EPSG',26859,'PROJCS["NAD83(HARN) / Minnesota South (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.21666666666667],PARAMETER["standard_parallel_2",43.78333333333333],PARAMETER["latitude_of_origin",43],PARAMETER["central_meridian",-94],PARAMETER["false_easting",2624666.6667],PARAMETER["false_northing",328083.3333],AUTHORITY["EPSG","26859"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.21666666666667 +lat_2=43.78333333333333 +lat_0=43 +lon_0=-94 +x_0=800000.0000101599 +y_0=99999.99998983997 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 26860 : NAD83(HARN) / Nebraska (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26860,'EPSG',26860,'PROJCS["NAD83(HARN) / Nebraska (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43],PARAMETER["standard_parallel_2",40],PARAMETER["latitude_of_origin",39.83333333333334],PARAMETER["central_meridian",-100],PARAMETER["false_easting",1640416.6667],PARAMETER["false_northing",0],AUTHORITY["EPSG","26860"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +lon_0=-100 +x_0=500000.00001016 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26860,'EPSG',26860,'PROJCS["NAD83(HARN) / Nebraska (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43],PARAMETER["standard_parallel_2",40],PARAMETER["latitude_of_origin",39.83333333333334],PARAMETER["central_meridian",-100],PARAMETER["false_easting",1640416.6667],PARAMETER["false_northing",0],AUTHORITY["EPSG","26860"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +lon_0=-100 +x_0=500000.00001016 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 26861 : NAD83(HARN) / West Virginia North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26861,'EPSG',26861,'PROJCS["NAD83(HARN) / West Virginia North (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.25],PARAMETER["standard_parallel_2",39],PARAMETER["latitude_of_origin",38.5],PARAMETER["central_meridian",-79.5],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","26861"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.25 +lat_2=39 +lat_0=38.5 +lon_0=-79.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26861,'EPSG',26861,'PROJCS["NAD83(HARN) / West Virginia North (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.25],PARAMETER["standard_parallel_2",39],PARAMETER["latitude_of_origin",38.5],PARAMETER["central_meridian",-79.5],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","26861"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.25 +lat_2=39 +lat_0=38.5 +lon_0=-79.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 26862 : NAD83(HARN) / West Virginia South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26862,'EPSG',26862,'PROJCS["NAD83(HARN) / West Virginia South (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.88333333333333],PARAMETER["standard_parallel_2",37.48333333333333],PARAMETER["latitude_of_origin",37],PARAMETER["central_meridian",-81],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","26862"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.88333333333333 +lat_2=37.48333333333333 +lat_0=37 +lon_0=-81 +x_0=600000 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26862,'EPSG',26862,'PROJCS["NAD83(HARN) / West Virginia South (ftUS)",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.88333333333333],PARAMETER["standard_parallel_2",37.48333333333333],PARAMETER["latitude_of_origin",37],PARAMETER["central_meridian",-81],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","26862"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.88333333333333 +lat_2=37.48333333333333 +lat_0=37 +lon_0=-81 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 26863 : NAD83(NSRS2007) / Maine East (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26863,'EPSG',26863,'PROJCS["NAD83(NSRS2007) / Maine East (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",43.66666666666666],PARAMETER["central_meridian",-68.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",984250.0000000002],PARAMETER["false_northing",0],AUTHORITY["EPSG","26863"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.9999 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26863,'EPSG',26863,'PROJCS["NAD83(NSRS2007) / Maine East (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",43.66666666666666],PARAMETER["central_meridian",-68.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",984250.0000000002],PARAMETER["false_northing",0],AUTHORITY["EPSG","26863"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.9999 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 26864 : NAD83(NSRS2007) / Maine West (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26864,'EPSG',26864,'PROJCS["NAD83(NSRS2007) / Maine West (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.83333333333334],PARAMETER["central_meridian",-70.16666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",2952750],PARAMETER["false_northing",0],AUTHORITY["EPSG","26864"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666666667 +k=0.999966667 +x_0=900000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26864,'EPSG',26864,'PROJCS["NAD83(NSRS2007) / Maine West (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.83333333333334],PARAMETER["central_meridian",-70.16666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",2952750],PARAMETER["false_northing",0],AUTHORITY["EPSG","26864"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666666667 +k=0.999966667 +x_0=900000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 26865 : NAD83(NSRS2007) / Minnesota North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26865,'EPSG',26865,'PROJCS["NAD83(NSRS2007) / Minnesota North (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.63333333333333],PARAMETER["standard_parallel_2",47.03333333333333],PARAMETER["latitude_of_origin",46.5],PARAMETER["central_meridian",-93.1],PARAMETER["false_easting",2624666.6667],PARAMETER["false_northing",328083.3333],AUTHORITY["EPSG","26865"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.63333333333333 +lat_2=47.03333333333333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=800000.0000101599 +y_0=99999.99998983997 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26865,'EPSG',26865,'PROJCS["NAD83(NSRS2007) / Minnesota North (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.63333333333333],PARAMETER["standard_parallel_2",47.03333333333333],PARAMETER["latitude_of_origin",46.5],PARAMETER["central_meridian",-93.1],PARAMETER["false_easting",2624666.6667],PARAMETER["false_northing",328083.3333],AUTHORITY["EPSG","26865"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.63333333333333 +lat_2=47.03333333333333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=800000.0000101599 +y_0=99999.99998983997 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 26866 : NAD83(NSRS2007) / Minnesota Central (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26866,'EPSG',26866,'PROJCS["NAD83(NSRS2007) / Minnesota Central (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.05],PARAMETER["standard_parallel_2",45.61666666666667],PARAMETER["latitude_of_origin",45],PARAMETER["central_meridian",-94.25],PARAMETER["false_easting",2624666.6667],PARAMETER["false_northing",328083.3333],AUTHORITY["EPSG","26866"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.05 +lat_2=45.61666666666667 +lat_0=45 +lon_0=-94.25 +x_0=800000.0000101599 +y_0=99999.99998983997 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26866,'EPSG',26866,'PROJCS["NAD83(NSRS2007) / Minnesota Central (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.05],PARAMETER["standard_parallel_2",45.61666666666667],PARAMETER["latitude_of_origin",45],PARAMETER["central_meridian",-94.25],PARAMETER["false_easting",2624666.6667],PARAMETER["false_northing",328083.3333],AUTHORITY["EPSG","26866"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.05 +lat_2=45.61666666666667 +lat_0=45 +lon_0=-94.25 +x_0=800000.0000101599 +y_0=99999.99998983997 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 26867 : NAD83(NSRS2007) / Minnesota South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26867,'EPSG',26867,'PROJCS["NAD83(NSRS2007) / Minnesota South (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.21666666666667],PARAMETER["standard_parallel_2",43.78333333333333],PARAMETER["latitude_of_origin",43],PARAMETER["central_meridian",-94],PARAMETER["false_easting",2624666.6667],PARAMETER["false_northing",328083.3333],AUTHORITY["EPSG","26867"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.21666666666667 +lat_2=43.78333333333333 +lat_0=43 +lon_0=-94 +x_0=800000.0000101599 +y_0=99999.99998983997 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26867,'EPSG',26867,'PROJCS["NAD83(NSRS2007) / Minnesota South (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.21666666666667],PARAMETER["standard_parallel_2",43.78333333333333],PARAMETER["latitude_of_origin",43],PARAMETER["central_meridian",-94],PARAMETER["false_easting",2624666.6667],PARAMETER["false_northing",328083.3333],AUTHORITY["EPSG","26867"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.21666666666667 +lat_2=43.78333333333333 +lat_0=43 +lon_0=-94 +x_0=800000.0000101599 +y_0=99999.99998983997 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 26868 : NAD83(NSRS2007) / Nebraska (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26868,'EPSG',26868,'PROJCS["NAD83(NSRS2007) / Nebraska (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43],PARAMETER["standard_parallel_2",40],PARAMETER["latitude_of_origin",39.83333333333334],PARAMETER["central_meridian",-100],PARAMETER["false_easting",1640416.6667],PARAMETER["false_northing",0],AUTHORITY["EPSG","26868"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +lon_0=-100 +x_0=500000.00001016 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26868,'EPSG',26868,'PROJCS["NAD83(NSRS2007) / Nebraska (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43],PARAMETER["standard_parallel_2",40],PARAMETER["latitude_of_origin",39.83333333333334],PARAMETER["central_meridian",-100],PARAMETER["false_easting",1640416.6667],PARAMETER["false_northing",0],AUTHORITY["EPSG","26868"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +lon_0=-100 +x_0=500000.00001016 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 26869 : NAD83(NSRS2007) / West Virginia North (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26869,'EPSG',26869,'PROJCS["NAD83(NSRS2007) / West Virginia North (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.25],PARAMETER["standard_parallel_2",39],PARAMETER["latitude_of_origin",38.5],PARAMETER["central_meridian",-79.5],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","26869"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.25 +lat_2=39 +lat_0=38.5 +lon_0=-79.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26869,'EPSG',26869,'PROJCS["NAD83(NSRS2007) / West Virginia North (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.25],PARAMETER["standard_parallel_2",39],PARAMETER["latitude_of_origin",38.5],PARAMETER["central_meridian",-79.5],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","26869"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.25 +lat_2=39 +lat_0=38.5 +lon_0=-79.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 26870 : NAD83(NSRS2007) / West Virginia South (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26870,'EPSG',26870,'PROJCS["NAD83(NSRS2007) / West Virginia South (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.88333333333333],PARAMETER["standard_parallel_2",37.48333333333333],PARAMETER["latitude_of_origin",37],PARAMETER["central_meridian",-81],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","26870"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.88333333333333 +lat_2=37.48333333333333 +lat_0=37 +lon_0=-81 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26870,'EPSG',26870,'PROJCS["NAD83(NSRS2007) / West Virginia South (ftUS)",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.88333333333333],PARAMETER["standard_parallel_2",37.48333333333333],PARAMETER["latitude_of_origin",37],PARAMETER["central_meridian",-81],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],AUTHORITY["EPSG","26870"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.88333333333333 +lat_2=37.48333333333333 +lat_0=37 +lon_0=-81 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 26891 : NAD83(CSRS) / MTM zone 11 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26891,'EPSG',26891,'PROJCS["NAD83(CSRS) / MTM zone 11",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-82.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","26891"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-82.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26891,'EPSG',26891,'PROJCS["NAD83(CSRS) / MTM zone 11",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-82.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","26891"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-82.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26892 : NAD83(CSRS) / MTM zone 12 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26892,'EPSG',26892,'PROJCS["NAD83(CSRS) / MTM zone 12",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","26892"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-81 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26892,'EPSG',26892,'PROJCS["NAD83(CSRS) / MTM zone 12",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","26892"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-81 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26893 : NAD83(CSRS) / MTM zone 13 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26893,'EPSG',26893,'PROJCS["NAD83(CSRS) / MTM zone 13",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-84],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","26893"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-84 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26893,'EPSG',26893,'PROJCS["NAD83(CSRS) / MTM zone 13",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-84],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","26893"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-84 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26894 : NAD83(CSRS) / MTM zone 14 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26894,'EPSG',26894,'PROJCS["NAD83(CSRS) / MTM zone 14",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","26894"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-87 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26894,'EPSG',26894,'PROJCS["NAD83(CSRS) / MTM zone 14",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","26894"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-87 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26895 : NAD83(CSRS) / MTM zone 15 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26895,'EPSG',26895,'PROJCS["NAD83(CSRS) / MTM zone 15",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-90],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","26895"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-90 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26895,'EPSG',26895,'PROJCS["NAD83(CSRS) / MTM zone 15",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-90],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","26895"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-90 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26896 : NAD83(CSRS) / MTM zone 16 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26896,'EPSG',26896,'PROJCS["NAD83(CSRS) / MTM zone 16",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","26896"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-93 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26896,'EPSG',26896,'PROJCS["NAD83(CSRS) / MTM zone 16",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","26896"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-93 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26897 : NAD83(CSRS) / MTM zone 17 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26897,'EPSG',26897,'PROJCS["NAD83(CSRS) / MTM zone 17",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-96],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","26897"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-96 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26897,'EPSG',26897,'PROJCS["NAD83(CSRS) / MTM zone 17",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-96],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","26897"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-96 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26898 : NAD83(CSRS) / MTM zone 1 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26898,'EPSG',26898,'PROJCS["NAD83(CSRS) / MTM zone 1",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-53],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","26898"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-53 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26898,'EPSG',26898,'PROJCS["NAD83(CSRS) / MTM zone 1",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-53],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","26898"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-53 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26899 : NAD83(CSRS) / MTM zone 2 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26899,'EPSG',26899,'PROJCS["NAD83(CSRS) / MTM zone 2",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-56],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","26899"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-56 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26899,'EPSG',26899,'PROJCS["NAD83(CSRS) / MTM zone 2",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-56],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","26899"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-56 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26901 : NAD83 / UTM zone 1N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26901,'EPSG',26901,'PROJCS["NAD83 / UTM zone 1N",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26901"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=1 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26901,'EPSG',26901,'PROJCS["NAD83 / UTM zone 1N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26901"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=1 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26902 : NAD83 / UTM zone 2N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26902,'EPSG',26902,'PROJCS["NAD83 / UTM zone 2N",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26902"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=2 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26902,'EPSG',26902,'PROJCS["NAD83 / UTM zone 2N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26902"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=2 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26903 : NAD83 / UTM zone 3N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26903,'EPSG',26903,'PROJCS["NAD83 / UTM zone 3N",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26903"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=3 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26903,'EPSG',26903,'PROJCS["NAD83 / UTM zone 3N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26903"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=3 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26904 : NAD83 / UTM zone 4N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26904,'EPSG',26904,'PROJCS["NAD83 / UTM zone 4N",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-159],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26904"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=4 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26904,'EPSG',26904,'PROJCS["NAD83 / UTM zone 4N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-159],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26904"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=4 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26905 : NAD83 / UTM zone 5N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26905,'EPSG',26905,'PROJCS["NAD83 / UTM zone 5N",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26905"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=5 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26905,'EPSG',26905,'PROJCS["NAD83 / UTM zone 5N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26905"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=5 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26906 : NAD83 / UTM zone 6N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26906,'EPSG',26906,'PROJCS["NAD83 / UTM zone 6N",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26906"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=6 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26906,'EPSG',26906,'PROJCS["NAD83 / UTM zone 6N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26906"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=6 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26907 : NAD83 / UTM zone 7N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26907,'EPSG',26907,'PROJCS["NAD83 / UTM zone 7N",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26907"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=7 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26907,'EPSG',26907,'PROJCS["NAD83 / UTM zone 7N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26907"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=7 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26908 : NAD83 / UTM zone 8N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26908,'EPSG',26908,'PROJCS["NAD83 / UTM zone 8N",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26908"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=8 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26908,'EPSG',26908,'PROJCS["NAD83 / UTM zone 8N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26908"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=8 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26909 : NAD83 / UTM zone 9N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26909,'EPSG',26909,'PROJCS["NAD83 / UTM zone 9N",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26909"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=9 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26909,'EPSG',26909,'PROJCS["NAD83 / UTM zone 9N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26909"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=9 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26910 : NAD83 / UTM zone 10N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26910,'EPSG',26910,'PROJCS["NAD83 / UTM zone 10N",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26910"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=10 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26910,'EPSG',26910,'PROJCS["NAD83 / UTM zone 10N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26910"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=10 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26911 : NAD83 / UTM zone 11N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26911,'EPSG',26911,'PROJCS["NAD83 / UTM zone 11N",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["metre",1,AUTHORITY["EPSG","9001"]],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],AUTHORITY["EPSG","26911"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=11 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26911,'EPSG',26911,'PROJCS["NAD83 / UTM zone 11N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],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],AUTHORITY["EPSG","26911"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=11 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26912 : NAD83 / UTM zone 12N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26912,'EPSG',26912,'PROJCS["NAD83 / UTM zone 12N",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26912"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=12 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26912,'EPSG',26912,'PROJCS["NAD83 / UTM zone 12N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26912"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=12 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26913 : NAD83 / UTM zone 13N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26913,'EPSG',26913,'PROJCS["NAD83 / UTM zone 13N",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26913"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=13 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26913,'EPSG',26913,'PROJCS["NAD83 / UTM zone 13N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26913"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=13 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26914 : NAD83 / UTM zone 14N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26914,'EPSG',26914,'PROJCS["NAD83 / UTM zone 14N",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26914"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=14 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26914,'EPSG',26914,'PROJCS["NAD83 / UTM zone 14N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26914"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=14 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26915 : NAD83 / UTM zone 15N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26915,'EPSG',26915,'PROJCS["NAD83 / UTM zone 15N",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26915"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=15 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26915,'EPSG',26915,'PROJCS["NAD83 / UTM zone 15N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26915"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=15 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26916 : NAD83 / UTM zone 16N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26916,'EPSG',26916,'PROJCS["NAD83 / UTM zone 16N",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26916"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=16 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26916,'EPSG',26916,'PROJCS["NAD83 / UTM zone 16N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26916"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=16 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26917 : NAD83 / UTM zone 17N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26917,'EPSG',26917,'PROJCS["NAD83 / UTM zone 17N",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26917"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26917,'EPSG',26917,'PROJCS["NAD83 / UTM zone 17N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26917"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26918 : NAD83 / UTM zone 18N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26918,'EPSG',26918,'PROJCS["NAD83 / UTM zone 18N",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26918"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26918,'EPSG',26918,'PROJCS["NAD83 / UTM zone 18N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26918"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26919 : NAD83 / UTM zone 19N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26919,'EPSG',26919,'PROJCS["NAD83 / UTM zone 19N",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26919"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26919,'EPSG',26919,'PROJCS["NAD83 / UTM zone 19N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26919"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26920 : NAD83 / UTM zone 20N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26920,'EPSG',26920,'PROJCS["NAD83 / UTM zone 20N",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26920"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26920,'EPSG',26920,'PROJCS["NAD83 / UTM zone 20N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26920"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26921 : NAD83 / UTM zone 21N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26921,'EPSG',26921,'PROJCS["NAD83 / UTM zone 21N",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26921"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26921,'EPSG',26921,'PROJCS["NAD83 / UTM zone 21N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26921"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26922 : NAD83 / UTM zone 22N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26922,'EPSG',26922,'PROJCS["NAD83 / UTM zone 22N",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26922"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26922,'EPSG',26922,'PROJCS["NAD83 / UTM zone 22N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26922"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26923 : NAD83 / UTM zone 23N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26923,'EPSG',26923,'PROJCS["NAD83 / UTM zone 23N",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26923"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=23 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26923,'EPSG',26923,'PROJCS["NAD83 / UTM zone 23N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26923"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=23 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26929 : NAD83 / Alabama East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26929,'EPSG',26929,'PROJCS["NAD83 / Alabama East",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30.5],PARAMETER["central_meridian",-85.83333333333333],PARAMETER["scale_factor",0.99996],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26929"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30.5 +lon_0=-85.83333333333333 +k=0.99996 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26929,'EPSG',26929,'PROJCS["NAD83 / Alabama East",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30.5],PARAMETER["central_meridian",-85.83333333333333],PARAMETER["scale_factor",0.99996],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26929"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30.5 +lon_0=-85.83333333333333 +k=0.99996 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26930 : NAD83 / Alabama West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26930,'EPSG',26930,'PROJCS["NAD83 / Alabama West",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",-87.5],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26930"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=-87.5 +k=0.999933333 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26930,'EPSG',26930,'PROJCS["NAD83 / Alabama West",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",-87.5],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26930"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=-87.5 +k=0.999933333 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26931 : NAD83 / Alaska zone 1 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26931,'EPSG',26931,'PROJCS["NAD83 / Alaska zone 1",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",57],PARAMETER["longitude_of_center",-133.6666666666667],PARAMETER["azimuth",323.1301023611111],PARAMETER["rectified_grid_angle",323.1301023611111],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",5000000],PARAMETER["false_northing",-5000000],AUTHORITY["EPSG","26931"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=omerc +lat_0=57 +lonc=-133.6666666666667 +alpha=323.1301023611111 +k=0.9999 +x_0=5000000 +y_0=-5000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26931,'EPSG',26931,'PROJCS["NAD83 / Alaska zone 1",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",57],PARAMETER["longitude_of_center",-133.6666666666667],PARAMETER["azimuth",323.1301023611111],PARAMETER["rectified_grid_angle",323.1301023611111],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",5000000],PARAMETER["false_northing",-5000000],AUTHORITY["EPSG","26931"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=omerc +lat_0=57 +lonc=-133.6666666666667 +alpha=323.1301023611111 +k=0.9999 +x_0=5000000 +y_0=-5000000 +gamma=323.1301023611111 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26932 : NAD83 / Alaska zone 2 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26932,'EPSG',26932,'PROJCS["NAD83 / Alaska zone 2",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-142],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26932"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-142 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26932,'EPSG',26932,'PROJCS["NAD83 / Alaska zone 2",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-142],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26932"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-142 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26933 : NAD83 / Alaska zone 3 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26933,'EPSG',26933,'PROJCS["NAD83 / Alaska zone 3",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-146],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26933"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-146 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26933,'EPSG',26933,'PROJCS["NAD83 / Alaska zone 3",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-146],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26933"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-146 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26934 : NAD83 / Alaska zone 4 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26934,'EPSG',26934,'PROJCS["NAD83 / Alaska zone 4",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-150],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26934"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-150 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26934,'EPSG',26934,'PROJCS["NAD83 / Alaska zone 4",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-150],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26934"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-150 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26935 : NAD83 / Alaska zone 5 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26935,'EPSG',26935,'PROJCS["NAD83 / Alaska zone 5",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-154],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26935"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-154 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26935,'EPSG',26935,'PROJCS["NAD83 / Alaska zone 5",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-154],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26935"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-154 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26936 : NAD83 / Alaska zone 6 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26936,'EPSG',26936,'PROJCS["NAD83 / Alaska zone 6",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-158],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26936"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-158 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26936,'EPSG',26936,'PROJCS["NAD83 / Alaska zone 6",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-158],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26936"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-158 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26937 : NAD83 / Alaska zone 7 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26937,'EPSG',26937,'PROJCS["NAD83 / Alaska zone 7",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-162],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26937"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-162 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26937,'EPSG',26937,'PROJCS["NAD83 / Alaska zone 7",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-162],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26937"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-162 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26938 : NAD83 / Alaska zone 8 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26938,'EPSG',26938,'PROJCS["NAD83 / Alaska zone 8",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-166],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26938"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-166 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26938,'EPSG',26938,'PROJCS["NAD83 / Alaska zone 8",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-166],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26938"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-166 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26939 : NAD83 / Alaska zone 9 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26939,'EPSG',26939,'PROJCS["NAD83 / Alaska zone 9",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-170],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26939"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-170 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26939,'EPSG',26939,'PROJCS["NAD83 / Alaska zone 9",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",54],PARAMETER["central_meridian",-170],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26939"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=54 +lon_0=-170 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26940 : NAD83 / Alaska zone 10 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26940,'EPSG',26940,'PROJCS["NAD83 / Alaska zone 10",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",53.83333333333334],PARAMETER["standard_parallel_2",51.83333333333334],PARAMETER["latitude_of_origin",51],PARAMETER["central_meridian",-176],PARAMETER["false_easting",1000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26940"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=53.83333333333334 +lat_2=51.83333333333334 +lat_0=51 +lon_0=-176 +x_0=1000000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26940,'EPSG',26940,'PROJCS["NAD83 / Alaska zone 10",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",53.83333333333334],PARAMETER["standard_parallel_2",51.83333333333334],PARAMETER["latitude_of_origin",51],PARAMETER["central_meridian",-176],PARAMETER["false_easting",1000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26940"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=53.83333333333334 +lat_2=51.83333333333334 +lat_0=51 +lon_0=-176 +x_0=1000000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26941 : NAD83 / California zone 1 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26941,'EPSG',26941,'PROJCS["NAD83 / California zone 1",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.66666666666666],PARAMETER["standard_parallel_2",40],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-122],PARAMETER["false_easting",2000000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","26941"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.66666666666666 +lat_2=40 +lat_0=39.33333333333334 +lon_0=-122 +x_0=2000000 +y_0=500000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26941,'EPSG',26941,'PROJCS["NAD83 / California zone 1",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.66666666666666],PARAMETER["standard_parallel_2",40],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-122],PARAMETER["false_easting",2000000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","26941"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.66666666666666 +lat_2=40 +lat_0=39.33333333333334 +lon_0=-122 +x_0=2000000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26942 : NAD83 / California zone 2 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26942,'EPSG',26942,'PROJCS["NAD83 / California zone 2",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.83333333333334],PARAMETER["standard_parallel_2",38.33333333333334],PARAMETER["latitude_of_origin",37.66666666666666],PARAMETER["central_meridian",-122],PARAMETER["false_easting",2000000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","26942"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.83333333333334 +lat_2=38.33333333333334 +lat_0=37.66666666666666 +lon_0=-122 +x_0=2000000 +y_0=500000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26942,'EPSG',26942,'PROJCS["NAD83 / California zone 2",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.83333333333334],PARAMETER["standard_parallel_2",38.33333333333334],PARAMETER["latitude_of_origin",37.66666666666666],PARAMETER["central_meridian",-122],PARAMETER["false_easting",2000000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","26942"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.83333333333334 +lat_2=38.33333333333334 +lat_0=37.66666666666666 +lon_0=-122 +x_0=2000000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26943 : NAD83 / California zone 3 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26943,'EPSG',26943,'PROJCS["NAD83 / California zone 3",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.43333333333333],PARAMETER["standard_parallel_2",37.06666666666667],PARAMETER["latitude_of_origin",36.5],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","26943"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.43333333333333 +lat_2=37.06666666666667 +lat_0=36.5 +lon_0=-120.5 +x_0=2000000 +y_0=500000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26943,'EPSG',26943,'PROJCS["NAD83 / California zone 3",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.43333333333333],PARAMETER["standard_parallel_2",37.06666666666667],PARAMETER["latitude_of_origin",36.5],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","26943"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.43333333333333 +lat_2=37.06666666666667 +lat_0=36.5 +lon_0=-120.5 +x_0=2000000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26944 : NAD83 / California zone 4 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26944,'EPSG',26944,'PROJCS["NAD83 / California zone 4",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.25],PARAMETER["standard_parallel_2",36],PARAMETER["latitude_of_origin",35.33333333333334],PARAMETER["central_meridian",-119],PARAMETER["false_easting",2000000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","26944"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.25 +lat_2=36 +lat_0=35.33333333333334 +lon_0=-119 +x_0=2000000 +y_0=500000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26944,'EPSG',26944,'PROJCS["NAD83 / California zone 4",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.25],PARAMETER["standard_parallel_2",36],PARAMETER["latitude_of_origin",35.33333333333334],PARAMETER["central_meridian",-119],PARAMETER["false_easting",2000000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","26944"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.25 +lat_2=36 +lat_0=35.33333333333334 +lon_0=-119 +x_0=2000000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26945 : NAD83 / California zone 5 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26945,'EPSG',26945,'PROJCS["NAD83 / California zone 5",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",35.46666666666667],PARAMETER["standard_parallel_2",34.03333333333333],PARAMETER["latitude_of_origin",33.5],PARAMETER["central_meridian",-118],PARAMETER["false_easting",2000000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","26945"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=35.46666666666667 +lat_2=34.03333333333333 +lat_0=33.5 +lon_0=-118 +x_0=2000000 +y_0=500000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26945,'EPSG',26945,'PROJCS["NAD83 / California zone 5",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",35.46666666666667],PARAMETER["standard_parallel_2",34.03333333333333],PARAMETER["latitude_of_origin",33.5],PARAMETER["central_meridian",-118],PARAMETER["false_easting",2000000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","26945"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=35.46666666666667 +lat_2=34.03333333333333 +lat_0=33.5 +lon_0=-118 +x_0=2000000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26946 : NAD83 / California zone 6 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26946,'EPSG',26946,'PROJCS["NAD83 / California zone 6",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",33.88333333333333],PARAMETER["standard_parallel_2",32.78333333333333],PARAMETER["latitude_of_origin",32.16666666666666],PARAMETER["central_meridian",-116.25],PARAMETER["false_easting",2000000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","26946"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=33.88333333333333 +lat_2=32.78333333333333 +lat_0=32.16666666666666 +lon_0=-116.25 +x_0=2000000 +y_0=500000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26946,'EPSG',26946,'PROJCS["NAD83 / California zone 6",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",33.88333333333333],PARAMETER["standard_parallel_2",32.78333333333333],PARAMETER["latitude_of_origin",32.16666666666666],PARAMETER["central_meridian",-116.25],PARAMETER["false_easting",2000000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","26946"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=33.88333333333333 +lat_2=32.78333333333333 +lat_0=32.16666666666666 +lon_0=-116.25 +x_0=2000000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26948 : NAD83 / Arizona East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26948,'EPSG',26948,'PROJCS["NAD83 / Arizona East",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-110.1666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",213360],PARAMETER["false_northing",0],AUTHORITY["EPSG","26948"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26948,'EPSG',26948,'PROJCS["NAD83 / Arizona East",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-110.1666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",213360],PARAMETER["false_northing",0],AUTHORITY["EPSG","26948"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26949 : NAD83 / Arizona Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26949,'EPSG',26949,'PROJCS["NAD83 / Arizona Central",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-111.9166666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",213360],PARAMETER["false_northing",0],AUTHORITY["EPSG","26949"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26949,'EPSG',26949,'PROJCS["NAD83 / Arizona Central",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-111.9166666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",213360],PARAMETER["false_northing",0],AUTHORITY["EPSG","26949"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26950 : NAD83 / Arizona West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26950,'EPSG',26950,'PROJCS["NAD83 / Arizona West",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-113.75],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",213360],PARAMETER["false_northing",0],AUTHORITY["EPSG","26950"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.999933333 +x_0=213360 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26950,'EPSG',26950,'PROJCS["NAD83 / Arizona West",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-113.75],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",213360],PARAMETER["false_northing",0],AUTHORITY["EPSG","26950"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.999933333 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26951 : NAD83 / Arkansas North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26951,'EPSG',26951,'PROJCS["NAD83 / Arkansas North",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.23333333333333],PARAMETER["standard_parallel_2",34.93333333333333],PARAMETER["latitude_of_origin",34.33333333333334],PARAMETER["central_meridian",-92],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26951"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.23333333333333 +lat_2=34.93333333333333 +lat_0=34.33333333333334 +lon_0=-92 +x_0=400000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26951,'EPSG',26951,'PROJCS["NAD83 / Arkansas North",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.23333333333333],PARAMETER["standard_parallel_2",34.93333333333333],PARAMETER["latitude_of_origin",34.33333333333334],PARAMETER["central_meridian",-92],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26951"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.23333333333333 +lat_2=34.93333333333333 +lat_0=34.33333333333334 +lon_0=-92 +x_0=400000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26952 : NAD83 / Arkansas South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26952,'EPSG',26952,'PROJCS["NAD83 / Arkansas South",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",34.76666666666667],PARAMETER["standard_parallel_2",33.3],PARAMETER["latitude_of_origin",32.66666666666666],PARAMETER["central_meridian",-92],PARAMETER["false_easting",400000],PARAMETER["false_northing",400000],AUTHORITY["EPSG","26952"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=34.76666666666667 +lat_2=33.3 +lat_0=32.66666666666666 +lon_0=-92 +x_0=400000 +y_0=400000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26952,'EPSG',26952,'PROJCS["NAD83 / Arkansas South",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",34.76666666666667],PARAMETER["standard_parallel_2",33.3],PARAMETER["latitude_of_origin",32.66666666666666],PARAMETER["central_meridian",-92],PARAMETER["false_easting",400000],PARAMETER["false_northing",400000],AUTHORITY["EPSG","26952"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=34.76666666666667 +lat_2=33.3 +lat_0=32.66666666666666 +lon_0=-92 +x_0=400000 +y_0=400000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26953 : NAD83 / Colorado North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26953,'EPSG',26953,'PROJCS["NAD83 / Colorado North",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.78333333333333],PARAMETER["standard_parallel_2",39.71666666666667],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-105.5],PARAMETER["false_easting",914401.8289],PARAMETER["false_northing",304800.6096],AUTHORITY["EPSG","26953"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.78333333333333 +lat_2=39.71666666666667 +lat_0=39.33333333333334 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26953,'EPSG',26953,'PROJCS["NAD83 / Colorado North",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.78333333333333],PARAMETER["standard_parallel_2",39.71666666666667],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-105.5],PARAMETER["false_easting",914401.8289],PARAMETER["false_northing",304800.6096],AUTHORITY["EPSG","26953"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.78333333333333 +lat_2=39.71666666666667 +lat_0=39.33333333333334 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26954 : NAD83 / Colorado Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26954,'EPSG',26954,'PROJCS["NAD83 / Colorado Central",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.75],PARAMETER["standard_parallel_2",38.45],PARAMETER["latitude_of_origin",37.83333333333334],PARAMETER["central_meridian",-105.5],PARAMETER["false_easting",914401.8289],PARAMETER["false_northing",304800.6096],AUTHORITY["EPSG","26954"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.75 +lat_2=38.45 +lat_0=37.83333333333334 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26954,'EPSG',26954,'PROJCS["NAD83 / Colorado Central",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.75],PARAMETER["standard_parallel_2",38.45],PARAMETER["latitude_of_origin",37.83333333333334],PARAMETER["central_meridian",-105.5],PARAMETER["false_easting",914401.8289],PARAMETER["false_northing",304800.6096],AUTHORITY["EPSG","26954"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.75 +lat_2=38.45 +lat_0=37.83333333333334 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26955 : NAD83 / Colorado South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26955,'EPSG',26955,'PROJCS["NAD83 / Colorado South",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.43333333333333],PARAMETER["standard_parallel_2",37.23333333333333],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-105.5],PARAMETER["false_easting",914401.8289],PARAMETER["false_northing",304800.6096],AUTHORITY["EPSG","26955"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.43333333333333 +lat_2=37.23333333333333 +lat_0=36.66666666666666 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26955,'EPSG',26955,'PROJCS["NAD83 / Colorado South",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.43333333333333],PARAMETER["standard_parallel_2",37.23333333333333],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-105.5],PARAMETER["false_easting",914401.8289],PARAMETER["false_northing",304800.6096],AUTHORITY["EPSG","26955"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.43333333333333 +lat_2=37.23333333333333 +lat_0=36.66666666666666 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26956 : NAD83 / Connecticut --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26956,'EPSG',26956,'PROJCS["NAD83 / Connecticut",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.86666666666667],PARAMETER["standard_parallel_2",41.2],PARAMETER["latitude_of_origin",40.83333333333334],PARAMETER["central_meridian",-72.75],PARAMETER["false_easting",304800.6096],PARAMETER["false_northing",152400.3048],AUTHORITY["EPSG","26956"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.86666666666667 +lat_2=41.2 +lat_0=40.83333333333334 +lon_0=-72.75 +x_0=304800.6096 +y_0=152400.3048 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26956,'EPSG',26956,'PROJCS["NAD83 / Connecticut",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.86666666666667],PARAMETER["standard_parallel_2",41.2],PARAMETER["latitude_of_origin",40.83333333333334],PARAMETER["central_meridian",-72.75],PARAMETER["false_easting",304800.6096],PARAMETER["false_northing",152400.3048],AUTHORITY["EPSG","26956"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.86666666666667 +lat_2=41.2 +lat_0=40.83333333333334 +lon_0=-72.75 +x_0=304800.6096 +y_0=152400.3048 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26957 : NAD83 / Delaware --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26957,'EPSG',26957,'PROJCS["NAD83 / Delaware",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",38],PARAMETER["central_meridian",-75.41666666666667],PARAMETER["scale_factor",0.999995],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26957"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999995 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26957,'EPSG',26957,'PROJCS["NAD83 / Delaware",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",38],PARAMETER["central_meridian",-75.41666666666667],PARAMETER["scale_factor",0.999995],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26957"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999995 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26958 : NAD83 / Florida East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26958,'EPSG',26958,'PROJCS["NAD83 / Florida East",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",24.33333333333333],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26958"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999941177 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26958,'EPSG',26958,'PROJCS["NAD83 / Florida East",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",24.33333333333333],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26958"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999941177 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26959 : NAD83 / Florida West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26959,'EPSG',26959,'PROJCS["NAD83 / Florida West",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",24.33333333333333],PARAMETER["central_meridian",-82],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26959"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999941177 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26959,'EPSG',26959,'PROJCS["NAD83 / Florida West",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",24.33333333333333],PARAMETER["central_meridian",-82],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26959"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999941177 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26960 : NAD83 / Florida North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26960,'EPSG',26960,'PROJCS["NAD83 / Florida North",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",30.75],PARAMETER["standard_parallel_2",29.58333333333333],PARAMETER["latitude_of_origin",29],PARAMETER["central_meridian",-84.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26960"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=30.75 +lat_2=29.58333333333333 +lat_0=29 +lon_0=-84.5 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26960,'EPSG',26960,'PROJCS["NAD83 / Florida North",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",30.75],PARAMETER["standard_parallel_2",29.58333333333333],PARAMETER["latitude_of_origin",29],PARAMETER["central_meridian",-84.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26960"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=30.75 +lat_2=29.58333333333333 +lat_0=29 +lon_0=-84.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26961 : NAD83 / Hawaii zone 1 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26961,'EPSG',26961,'PROJCS["NAD83 / Hawaii zone 1",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",18.83333333333333],PARAMETER["central_meridian",-155.5],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26961"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=18.83333333333333 +lon_0=-155.5 +k=0.999966667 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26961,'EPSG',26961,'PROJCS["NAD83 / Hawaii zone 1",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",18.83333333333333],PARAMETER["central_meridian",-155.5],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26961"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=18.83333333333333 +lon_0=-155.5 +k=0.999966667 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26962 : NAD83 / Hawaii zone 2 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26962,'EPSG',26962,'PROJCS["NAD83 / Hawaii zone 2",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",20.33333333333333],PARAMETER["central_meridian",-156.6666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26962"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=20.33333333333333 +lon_0=-156.6666666666667 +k=0.999966667 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26962,'EPSG',26962,'PROJCS["NAD83 / Hawaii zone 2",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",20.33333333333333],PARAMETER["central_meridian",-156.6666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26962"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=20.33333333333333 +lon_0=-156.6666666666667 +k=0.999966667 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26963 : NAD83 / Hawaii zone 3 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26963,'EPSG',26963,'PROJCS["NAD83 / Hawaii zone 3",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",21.16666666666667],PARAMETER["central_meridian",-158],PARAMETER["scale_factor",0.99999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26963"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=21.16666666666667 +lon_0=-158 +k=0.99999 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26963,'EPSG',26963,'PROJCS["NAD83 / Hawaii zone 3",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",21.16666666666667],PARAMETER["central_meridian",-158],PARAMETER["scale_factor",0.99999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26963"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=21.16666666666667 +lon_0=-158 +k=0.99999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26964 : NAD83 / Hawaii zone 4 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26964,'EPSG',26964,'PROJCS["NAD83 / Hawaii zone 4",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",21.83333333333333],PARAMETER["central_meridian",-159.5],PARAMETER["scale_factor",0.99999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26964"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=21.83333333333333 +lon_0=-159.5 +k=0.99999 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26964,'EPSG',26964,'PROJCS["NAD83 / Hawaii zone 4",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",21.83333333333333],PARAMETER["central_meridian",-159.5],PARAMETER["scale_factor",0.99999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26964"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=21.83333333333333 +lon_0=-159.5 +k=0.99999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26965 : NAD83 / Hawaii zone 5 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26965,'EPSG',26965,'PROJCS["NAD83 / Hawaii zone 5",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",21.66666666666667],PARAMETER["central_meridian",-160.1666666666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26965"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=21.66666666666667 +lon_0=-160.1666666666667 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26965,'EPSG',26965,'PROJCS["NAD83 / Hawaii zone 5",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",21.66666666666667],PARAMETER["central_meridian",-160.1666666666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26965"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=21.66666666666667 +lon_0=-160.1666666666667 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26966 : NAD83 / Georgia East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26966,'EPSG',26966,'PROJCS["NAD83 / Georgia East",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",-82.16666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26966"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.9999 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26966,'EPSG',26966,'PROJCS["NAD83 / Georgia East",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",-82.16666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26966"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.9999 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26967 : NAD83 / Georgia West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26967,'EPSG',26967,'PROJCS["NAD83 / Georgia West",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",-84.16666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26967"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.9999 +x_0=700000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26967,'EPSG',26967,'PROJCS["NAD83 / Georgia West",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",-84.16666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26967"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.9999 +x_0=700000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26968 : NAD83 / Idaho East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26968,'EPSG',26968,'PROJCS["NAD83 / Idaho East",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-112.1666666666667],PARAMETER["scale_factor",0.999947368],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26968"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666666667 +k=0.9999473679999999 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26968,'EPSG',26968,'PROJCS["NAD83 / Idaho East",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-112.1666666666667],PARAMETER["scale_factor",0.999947368],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26968"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666666667 +k=0.9999473679999999 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26969 : NAD83 / Idaho Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26969,'EPSG',26969,'PROJCS["NAD83 / Idaho Central",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-114],PARAMETER["scale_factor",0.999947368],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26969"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.9999473679999999 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26969,'EPSG',26969,'PROJCS["NAD83 / Idaho Central",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-114],PARAMETER["scale_factor",0.999947368],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26969"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.9999473679999999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26970 : NAD83 / Idaho West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26970,'EPSG',26970,'PROJCS["NAD83 / Idaho West",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-115.75],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",800000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26970"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0.999933333 +x_0=800000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26970,'EPSG',26970,'PROJCS["NAD83 / Idaho West",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-115.75],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",800000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26970"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0.999933333 +x_0=800000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26971 : NAD83 / Illinois East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26971,'EPSG',26971,'PROJCS["NAD83 / Illinois East",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-88.33333333333333],PARAMETER["scale_factor",0.999975],PARAMETER["false_easting",300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26971"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333333333 +k=0.9999749999999999 +x_0=300000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26971,'EPSG',26971,'PROJCS["NAD83 / Illinois East",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-88.33333333333333],PARAMETER["scale_factor",0.999975],PARAMETER["false_easting",300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26971"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333333333 +k=0.9999749999999999 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26972 : NAD83 / Illinois West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26972,'EPSG',26972,'PROJCS["NAD83 / Illinois West",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-90.16666666666667],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26972"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666666667 +k=0.999941177 +x_0=700000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26972,'EPSG',26972,'PROJCS["NAD83 / Illinois West",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-90.16666666666667],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26972"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666666667 +k=0.999941177 +x_0=700000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26973 : NAD83 / Indiana East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26973,'EPSG',26973,'PROJCS["NAD83 / Indiana East",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-85.66666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",100000],PARAMETER["false_northing",250000],AUTHORITY["EPSG","26973"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999966667 +x_0=100000 +y_0=250000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26973,'EPSG',26973,'PROJCS["NAD83 / Indiana East",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-85.66666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",100000],PARAMETER["false_northing",250000],AUTHORITY["EPSG","26973"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.999966667 +x_0=100000 +y_0=250000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26974 : NAD83 / Indiana West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26974,'EPSG',26974,'PROJCS["NAD83 / Indiana West",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-87.08333333333333],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",900000],PARAMETER["false_northing",250000],AUTHORITY["EPSG","26974"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999966667 +x_0=900000 +y_0=250000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26974,'EPSG',26974,'PROJCS["NAD83 / Indiana West",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-87.08333333333333],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",900000],PARAMETER["false_northing",250000],AUTHORITY["EPSG","26974"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.999966667 +x_0=900000 +y_0=250000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26975 : NAD83 / Iowa North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26975,'EPSG',26975,'PROJCS["NAD83 / Iowa North",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43.26666666666667],PARAMETER["standard_parallel_2",42.06666666666667],PARAMETER["latitude_of_origin",41.5],PARAMETER["central_meridian",-93.5],PARAMETER["false_easting",1500000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","26975"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43.26666666666667 +lat_2=42.06666666666667 +lat_0=41.5 +lon_0=-93.5 +x_0=1500000 +y_0=1000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26975,'EPSG',26975,'PROJCS["NAD83 / Iowa North",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43.26666666666667],PARAMETER["standard_parallel_2",42.06666666666667],PARAMETER["latitude_of_origin",41.5],PARAMETER["central_meridian",-93.5],PARAMETER["false_easting",1500000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","26975"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43.26666666666667 +lat_2=42.06666666666667 +lat_0=41.5 +lon_0=-93.5 +x_0=1500000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26976 : NAD83 / Iowa South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26976,'EPSG',26976,'PROJCS["NAD83 / Iowa South",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.78333333333333],PARAMETER["standard_parallel_2",40.61666666666667],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-93.5],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26976"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.78333333333333 +lat_2=40.61666666666667 +lat_0=40 +lon_0=-93.5 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26976,'EPSG',26976,'PROJCS["NAD83 / Iowa South",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.78333333333333],PARAMETER["standard_parallel_2",40.61666666666667],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-93.5],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26976"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.78333333333333 +lat_2=40.61666666666667 +lat_0=40 +lon_0=-93.5 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26977 : NAD83 / Kansas North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26977,'EPSG',26977,'PROJCS["NAD83 / Kansas North",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.78333333333333],PARAMETER["standard_parallel_2",38.71666666666667],PARAMETER["latitude_of_origin",38.33333333333334],PARAMETER["central_meridian",-98],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26977"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.78333333333333 +lat_2=38.71666666666667 +lat_0=38.33333333333334 +lon_0=-98 +x_0=400000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26977,'EPSG',26977,'PROJCS["NAD83 / Kansas North",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.78333333333333],PARAMETER["standard_parallel_2",38.71666666666667],PARAMETER["latitude_of_origin",38.33333333333334],PARAMETER["central_meridian",-98],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26977"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.78333333333333 +lat_2=38.71666666666667 +lat_0=38.33333333333334 +lon_0=-98 +x_0=400000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26978 : NAD83 / Kansas South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26978,'EPSG',26978,'PROJCS["NAD83 / Kansas South",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.56666666666667],PARAMETER["standard_parallel_2",37.26666666666667],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-98.5],PARAMETER["false_easting",400000],PARAMETER["false_northing",400000],AUTHORITY["EPSG","26978"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.56666666666667 +lat_2=37.26666666666667 +lat_0=36.66666666666666 +lon_0=-98.5 +x_0=400000 +y_0=400000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26978,'EPSG',26978,'PROJCS["NAD83 / Kansas South",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.56666666666667],PARAMETER["standard_parallel_2",37.26666666666667],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-98.5],PARAMETER["false_easting",400000],PARAMETER["false_northing",400000],AUTHORITY["EPSG","26978"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.56666666666667 +lat_2=37.26666666666667 +lat_0=36.66666666666666 +lon_0=-98.5 +x_0=400000 +y_0=400000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26979 : NAD83 / Kentucky North (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26979,'EPSG',26979,'PROJCS["NAD83 / Kentucky North (deprecated)",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.96666666666667],PARAMETER["standard_parallel_2",37.96666666666667],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-84.25],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26979"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.96666666666667 +lat_2=37.96666666666667 +lat_0=37.5 +lon_0=-84.25 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26979,'EPSG',26979,'PROJCS["NAD83 / Kentucky North (deprecated)",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.96666666666667],PARAMETER["standard_parallel_2",37.96666666666667],PARAMETER["latitude_of_origin",37.5],PARAMETER["central_meridian",-84.25],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26979"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.96666666666667 +lat_2=37.96666666666667 +lat_0=37.5 +lon_0=-84.25 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26980 : NAD83 / Kentucky South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26980,'EPSG',26980,'PROJCS["NAD83 / Kentucky South",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.93333333333333],PARAMETER["standard_parallel_2",36.73333333333333],PARAMETER["latitude_of_origin",36.33333333333334],PARAMETER["central_meridian",-85.75],PARAMETER["false_easting",500000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","26980"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.93333333333333 +lat_2=36.73333333333333 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=500000 +y_0=500000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26980,'EPSG',26980,'PROJCS["NAD83 / Kentucky South",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.93333333333333],PARAMETER["standard_parallel_2",36.73333333333333],PARAMETER["latitude_of_origin",36.33333333333334],PARAMETER["central_meridian",-85.75],PARAMETER["false_easting",500000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","26980"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.93333333333333 +lat_2=36.73333333333333 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=500000 +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26981 : NAD83 / Louisiana North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26981,'EPSG',26981,'PROJCS["NAD83 / Louisiana North",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",32.66666666666666],PARAMETER["standard_parallel_2",31.16666666666667],PARAMETER["latitude_of_origin",30.5],PARAMETER["central_meridian",-92.5],PARAMETER["false_easting",1000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26981"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=32.66666666666666 +lat_2=31.16666666666667 +lat_0=30.5 +lon_0=-92.5 +x_0=1000000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26981,'EPSG',26981,'PROJCS["NAD83 / Louisiana North",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",32.66666666666666],PARAMETER["standard_parallel_2",31.16666666666667],PARAMETER["latitude_of_origin",30.5],PARAMETER["central_meridian",-92.5],PARAMETER["false_easting",1000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26981"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=32.66666666666666 +lat_2=31.16666666666667 +lat_0=30.5 +lon_0=-92.5 +x_0=1000000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26982 : NAD83 / Louisiana South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26982,'EPSG',26982,'PROJCS["NAD83 / Louisiana South",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",30.7],PARAMETER["standard_parallel_2",29.3],PARAMETER["latitude_of_origin",28.5],PARAMETER["central_meridian",-91.33333333333333],PARAMETER["false_easting",1000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26982"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=30.7 +lat_2=29.3 +lat_0=28.5 +lon_0=-91.33333333333333 +x_0=1000000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26982,'EPSG',26982,'PROJCS["NAD83 / Louisiana South",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",30.7],PARAMETER["standard_parallel_2",29.3],PARAMETER["latitude_of_origin",28.5],PARAMETER["central_meridian",-91.33333333333333],PARAMETER["false_easting",1000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26982"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=30.7 +lat_2=29.3 +lat_0=28.5 +lon_0=-91.33333333333333 +x_0=1000000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26983 : NAD83 / Maine East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26983,'EPSG',26983,'PROJCS["NAD83 / Maine East",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",43.66666666666666],PARAMETER["central_meridian",-68.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26983"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.9999 +x_0=300000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26983,'EPSG',26983,'PROJCS["NAD83 / Maine East",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",43.66666666666666],PARAMETER["central_meridian",-68.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26983"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.9999 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26984 : NAD83 / Maine West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26984,'EPSG',26984,'PROJCS["NAD83 / Maine West",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.83333333333334],PARAMETER["central_meridian",-70.16666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",900000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26984"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666666667 +k=0.999966667 +x_0=900000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26984,'EPSG',26984,'PROJCS["NAD83 / Maine West",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.83333333333334],PARAMETER["central_meridian",-70.16666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",900000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26984"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666666667 +k=0.999966667 +x_0=900000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26985 : NAD83 / Maryland --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26985,'EPSG',26985,'PROJCS["NAD83 / Maryland",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.45],PARAMETER["standard_parallel_2",38.3],PARAMETER["latitude_of_origin",37.66666666666666],PARAMETER["central_meridian",-77],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26985"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.45 +lat_2=38.3 +lat_0=37.66666666666666 +lon_0=-77 +x_0=400000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26985,'EPSG',26985,'PROJCS["NAD83 / Maryland",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.45],PARAMETER["standard_parallel_2",38.3],PARAMETER["latitude_of_origin",37.66666666666666],PARAMETER["central_meridian",-77],PARAMETER["false_easting",400000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26985"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.45 +lat_2=38.3 +lat_0=37.66666666666666 +lon_0=-77 +x_0=400000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26986 : NAD83 / Massachusetts Mainland --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26986,'EPSG',26986,'PROJCS["NAD83 / Massachusetts Mainland",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",42.68333333333333],PARAMETER["standard_parallel_2",41.71666666666667],PARAMETER["latitude_of_origin",41],PARAMETER["central_meridian",-71.5],PARAMETER["false_easting",200000],PARAMETER["false_northing",750000],AUTHORITY["EPSG","26986"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=42.68333333333333 +lat_2=41.71666666666667 +lat_0=41 +lon_0=-71.5 +x_0=200000 +y_0=750000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26986,'EPSG',26986,'PROJCS["NAD83 / Massachusetts Mainland",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",42.68333333333333],PARAMETER["standard_parallel_2",41.71666666666667],PARAMETER["latitude_of_origin",41],PARAMETER["central_meridian",-71.5],PARAMETER["false_easting",200000],PARAMETER["false_northing",750000],AUTHORITY["EPSG","26986"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=42.68333333333333 +lat_2=41.71666666666667 +lat_0=41 +lon_0=-71.5 +x_0=200000 +y_0=750000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26987 : NAD83 / Massachusetts Island --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26987,'EPSG',26987,'PROJCS["NAD83 / Massachusetts Island",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.48333333333333],PARAMETER["standard_parallel_2",41.28333333333333],PARAMETER["latitude_of_origin",41],PARAMETER["central_meridian",-70.5],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26987"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.48333333333333 +lat_2=41.28333333333333 +lat_0=41 +lon_0=-70.5 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26987,'EPSG',26987,'PROJCS["NAD83 / Massachusetts Island",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.48333333333333],PARAMETER["standard_parallel_2",41.28333333333333],PARAMETER["latitude_of_origin",41],PARAMETER["central_meridian",-70.5],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26987"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.48333333333333 +lat_2=41.28333333333333 +lat_0=41 +lon_0=-70.5 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26988 : NAD83 / Michigan North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26988,'EPSG',26988,'PROJCS["NAD83 / Michigan North",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.08333333333334],PARAMETER["standard_parallel_2",45.48333333333333],PARAMETER["latitude_of_origin",44.78333333333333],PARAMETER["central_meridian",-87],PARAMETER["false_easting",8000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26988"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.08333333333334 +lat_2=45.48333333333333 +lat_0=44.78333333333333 +lon_0=-87 +x_0=8000000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26988,'EPSG',26988,'PROJCS["NAD83 / Michigan North",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.08333333333334],PARAMETER["standard_parallel_2",45.48333333333333],PARAMETER["latitude_of_origin",44.78333333333333],PARAMETER["central_meridian",-87],PARAMETER["false_easting",8000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26988"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.08333333333334 +lat_2=45.48333333333333 +lat_0=44.78333333333333 +lon_0=-87 +x_0=8000000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26989 : NAD83 / Michigan Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26989,'EPSG',26989,'PROJCS["NAD83 / Michigan Central",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.7],PARAMETER["standard_parallel_2",44.18333333333333],PARAMETER["latitude_of_origin",43.31666666666667],PARAMETER["central_meridian",-84.36666666666666],PARAMETER["false_easting",6000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26989"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.7 +lat_2=44.18333333333333 +lat_0=43.31666666666667 +lon_0=-84.36666666666666 +x_0=6000000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26989,'EPSG',26989,'PROJCS["NAD83 / Michigan Central",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.7],PARAMETER["standard_parallel_2",44.18333333333333],PARAMETER["latitude_of_origin",43.31666666666667],PARAMETER["central_meridian",-84.36666666666666],PARAMETER["false_easting",6000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26989"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.7 +lat_2=44.18333333333333 +lat_0=43.31666666666667 +lon_0=-84.36666666666666 +x_0=6000000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26990 : NAD83 / Michigan South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26990,'EPSG',26990,'PROJCS["NAD83 / Michigan South",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43.66666666666666],PARAMETER["standard_parallel_2",42.1],PARAMETER["latitude_of_origin",41.5],PARAMETER["central_meridian",-84.36666666666666],PARAMETER["false_easting",4000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26990"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43.66666666666666 +lat_2=42.1 +lat_0=41.5 +lon_0=-84.36666666666666 +x_0=4000000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26990,'EPSG',26990,'PROJCS["NAD83 / Michigan South",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43.66666666666666],PARAMETER["standard_parallel_2",42.1],PARAMETER["latitude_of_origin",41.5],PARAMETER["central_meridian",-84.36666666666666],PARAMETER["false_easting",4000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26990"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43.66666666666666 +lat_2=42.1 +lat_0=41.5 +lon_0=-84.36666666666666 +x_0=4000000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26991 : NAD83 / Minnesota North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26991,'EPSG',26991,'PROJCS["NAD83 / Minnesota North",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.63333333333333],PARAMETER["standard_parallel_2",47.03333333333333],PARAMETER["latitude_of_origin",46.5],PARAMETER["central_meridian",-93.1],PARAMETER["false_easting",800000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","26991"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.63333333333333 +lat_2=47.03333333333333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=800000 +y_0=100000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26991,'EPSG',26991,'PROJCS["NAD83 / Minnesota North",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.63333333333333],PARAMETER["standard_parallel_2",47.03333333333333],PARAMETER["latitude_of_origin",46.5],PARAMETER["central_meridian",-93.1],PARAMETER["false_easting",800000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","26991"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.63333333333333 +lat_2=47.03333333333333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=800000 +y_0=100000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26992 : NAD83 / Minnesota Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26992,'EPSG',26992,'PROJCS["NAD83 / Minnesota Central",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.05],PARAMETER["standard_parallel_2",45.61666666666667],PARAMETER["latitude_of_origin",45],PARAMETER["central_meridian",-94.25],PARAMETER["false_easting",800000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","26992"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.05 +lat_2=45.61666666666667 +lat_0=45 +lon_0=-94.25 +x_0=800000 +y_0=100000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26992,'EPSG',26992,'PROJCS["NAD83 / Minnesota Central",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.05],PARAMETER["standard_parallel_2",45.61666666666667],PARAMETER["latitude_of_origin",45],PARAMETER["central_meridian",-94.25],PARAMETER["false_easting",800000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","26992"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.05 +lat_2=45.61666666666667 +lat_0=45 +lon_0=-94.25 +x_0=800000 +y_0=100000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26993 : NAD83 / Minnesota South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26993,'EPSG',26993,'PROJCS["NAD83 / Minnesota South",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.21666666666667],PARAMETER["standard_parallel_2",43.78333333333333],PARAMETER["latitude_of_origin",43],PARAMETER["central_meridian",-94],PARAMETER["false_easting",800000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","26993"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.21666666666667 +lat_2=43.78333333333333 +lat_0=43 +lon_0=-94 +x_0=800000 +y_0=100000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26993,'EPSG',26993,'PROJCS["NAD83 / Minnesota South",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.21666666666667],PARAMETER["standard_parallel_2",43.78333333333333],PARAMETER["latitude_of_origin",43],PARAMETER["central_meridian",-94],PARAMETER["false_easting",800000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","26993"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.21666666666667 +lat_2=43.78333333333333 +lat_0=43 +lon_0=-94 +x_0=800000 +y_0=100000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26994 : NAD83 / Mississippi East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26994,'EPSG',26994,'PROJCS["NAD83 / Mississippi East",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",29.5],PARAMETER["central_meridian",-88.83333333333333],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26994"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=29.5 +lon_0=-88.83333333333333 +k=0.99995 +x_0=300000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26994,'EPSG',26994,'PROJCS["NAD83 / Mississippi East",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",29.5],PARAMETER["central_meridian",-88.83333333333333],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26994"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=29.5 +lon_0=-88.83333333333333 +k=0.99995 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26995 : NAD83 / Mississippi West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26995,'EPSG',26995,'PROJCS["NAD83 / Mississippi West",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",29.5],PARAMETER["central_meridian",-90.33333333333333],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26995"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=29.5 +lon_0=-90.33333333333333 +k=0.99995 +x_0=700000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26995,'EPSG',26995,'PROJCS["NAD83 / Mississippi West",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",29.5],PARAMETER["central_meridian",-90.33333333333333],PARAMETER["scale_factor",0.99995],PARAMETER["false_easting",700000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26995"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=29.5 +lon_0=-90.33333333333333 +k=0.99995 +x_0=700000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26996 : NAD83 / Missouri East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26996,'EPSG',26996,'PROJCS["NAD83 / Missouri East",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",35.83333333333334],PARAMETER["central_meridian",-90.5],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",250000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26996"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=35.83333333333334 +lon_0=-90.5 +k=0.999933333 +x_0=250000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26996,'EPSG',26996,'PROJCS["NAD83 / Missouri East",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",35.83333333333334],PARAMETER["central_meridian",-90.5],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",250000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26996"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=35.83333333333334 +lon_0=-90.5 +k=0.999933333 +x_0=250000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26997 : NAD83 / Missouri Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26997,'EPSG',26997,'PROJCS["NAD83 / Missouri Central",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",35.83333333333334],PARAMETER["central_meridian",-92.5],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26997"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=35.83333333333334 +lon_0=-92.5 +k=0.999933333 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26997,'EPSG',26997,'PROJCS["NAD83 / Missouri Central",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",35.83333333333334],PARAMETER["central_meridian",-92.5],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26997"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=35.83333333333334 +lon_0=-92.5 +k=0.999933333 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 26998 : NAD83 / Missouri West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26998,'EPSG',26998,'PROJCS["NAD83 / Missouri West",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36.16666666666666],PARAMETER["central_meridian",-94.5],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",850000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26998"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=36.16666666666666 +lon_0=-94.5 +k=0.999941177 +x_0=850000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (26998,'EPSG',26998,'PROJCS["NAD83 / Missouri West",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36.16666666666666],PARAMETER["central_meridian",-94.5],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",850000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26998"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=36.16666666666666 +lon_0=-94.5 +k=0.999941177 +x_0=850000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 27037 : Nahrwan 1967 / UTM zone 37N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27037,'EPSG',27037,'PROJCS["Nahrwan 1967 / UTM zone 37N",GEOGCS["Nahrwan 1967",DATUM["Nahrwan_1967",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6270"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4270"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","27037"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=37 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27037,'EPSG',27037,'PROJCS["Nahrwan 1967 / UTM zone 37N",GEOGCS["Nahrwan 1967",DATUM["Nahrwan_1967",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-243,-192,477,0,0,0,0],AUTHORITY["EPSG","6270"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4270"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","27037"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=37 +ellps=clrk80 +towgs84=-243,-192,477,0,0,0,0 +units=m +no_defs '); --- --- EPSG 27038 : Nahrwan 1967 / UTM zone 38N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27038,'EPSG',27038,'PROJCS["Nahrwan 1967 / UTM zone 38N",GEOGCS["Nahrwan 1967",DATUM["Nahrwan_1967",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6270"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4270"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","27038"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27038,'EPSG',27038,'PROJCS["Nahrwan 1967 / UTM zone 38N",GEOGCS["Nahrwan 1967",DATUM["Nahrwan_1967",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-243,-192,477,0,0,0,0],AUTHORITY["EPSG","6270"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4270"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","27038"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +ellps=clrk80 +towgs84=-243,-192,477,0,0,0,0 +units=m +no_defs '); --- --- EPSG 27039 : Nahrwan 1967 / UTM zone 39N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27039,'EPSG',27039,'PROJCS["Nahrwan 1967 / UTM zone 39N",GEOGCS["Nahrwan 1967",DATUM["Nahrwan_1967",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6270"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4270"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","27039"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=39 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27039,'EPSG',27039,'PROJCS["Nahrwan 1967 / UTM zone 39N",GEOGCS["Nahrwan 1967",DATUM["Nahrwan_1967",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-243,-192,477,0,0,0,0],AUTHORITY["EPSG","6270"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4270"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","27039"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=39 +ellps=clrk80 +towgs84=-243,-192,477,0,0,0,0 +units=m +no_defs '); --- --- EPSG 27040 : Nahrwan 1967 / UTM zone 40N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27040,'EPSG',27040,'PROJCS["Nahrwan 1967 / UTM zone 40N",GEOGCS["Nahrwan 1967",DATUM["Nahrwan_1967",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6270"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4270"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","27040"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=40 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27040,'EPSG',27040,'PROJCS["Nahrwan 1967 / UTM zone 40N",GEOGCS["Nahrwan 1967",DATUM["Nahrwan_1967",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-243,-192,477,0,0,0,0],AUTHORITY["EPSG","6270"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4270"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","27040"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=40 +ellps=clrk80 +towgs84=-243,-192,477,0,0,0,0 +units=m +no_defs '); --- --- EPSG 27120 : Naparima 1972 / UTM zone 20N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27120,'EPSG',27120,'PROJCS["Naparima 1972 / UTM zone 20N",GEOGCS["Naparima 1972",DATUM["Naparima_1972",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6271"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4271"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","27120"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27120,'EPSG',27120,'PROJCS["Naparima 1972 / UTM zone 20N",GEOGCS["Naparima 1972",DATUM["Naparima_1972",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-10,375,165,0,0,0,0],AUTHORITY["EPSG","6271"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4271"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","27120"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=intl +towgs84=-10,375,165,0,0,0,0 +units=m +no_defs '); --- --- EPSG 27200 : NZGD49 / New Zealand Map Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27200,'EPSG',27200,'PROJCS["NZGD49 / New Zealand Map Grid",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["New_Zealand_Map_Grid"],PARAMETER["latitude_of_origin",-41],PARAMETER["central_meridian",173],PARAMETER["false_easting",2510000],PARAMETER["false_northing",6023150],AUTHORITY["EPSG","27200"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=nzmg +lat_0=-41 +lon_0=173 +x_0=2510000 +y_0=6023150 +ellps=intl +datum=nzgd49 +units=m +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27200,'EPSG',27200,'PROJCS["NZGD49 / New Zealand Map Grid",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["New_Zealand_Map_Grid"],PARAMETER["latitude_of_origin",-41],PARAMETER["central_meridian",173],PARAMETER["false_easting",2510000],PARAMETER["false_northing",6023150],AUTHORITY["EPSG","27200"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=nzmg +lat_0=-41 +lon_0=173 +x_0=2510000 +y_0=6023150 +ellps=intl +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +units=m +no_defs '); --- --- EPSG 27205 : NZGD49 / Mount Eden Circuit --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27205,'EPSG',27205,'PROJCS["NZGD49 / Mount Eden Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-36.87986527777778],PARAMETER["central_meridian",174.7643393611111],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27205"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-36.87986527777778 +lon_0=174.7643393611111 +k=0.9999 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27205,'EPSG',27205,'PROJCS["NZGD49 / Mount Eden Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-36.87986527777778],PARAMETER["central_meridian",174.7643393611111],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27205"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-36.87986527777778 +lon_0=174.7643393611111 +k=0.9999 +x_0=300000 +y_0=700000 +ellps=intl +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +units=m +no_defs '); --- --- EPSG 27206 : NZGD49 / Bay of Plenty Circuit --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27206,'EPSG',27206,'PROJCS["NZGD49 / Bay of Plenty Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-37.76124980555556],PARAMETER["central_meridian",176.46619725],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27206"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-37.76124980555556 +lon_0=176.46619725 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27206,'EPSG',27206,'PROJCS["NZGD49 / Bay of Plenty Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-37.76124980555556],PARAMETER["central_meridian",176.46619725],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27206"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-37.76124980555556 +lon_0=176.46619725 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +units=m +no_defs '); --- --- EPSG 27207 : NZGD49 / Poverty Bay Circuit --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27207,'EPSG',27207,'PROJCS["NZGD49 / Poverty Bay Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-38.62470277777778],PARAMETER["central_meridian",177.8856362777778],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27207"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-38.62470277777778 +lon_0=177.8856362777778 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27207,'EPSG',27207,'PROJCS["NZGD49 / Poverty Bay Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-38.62470277777778],PARAMETER["central_meridian",177.8856362777778],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27207"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-38.62470277777778 +lon_0=177.8856362777778 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +units=m +no_defs '); --- --- EPSG 27208 : NZGD49 / Hawkes Bay Circuit --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27208,'EPSG',27208,'PROJCS["NZGD49 / Hawkes Bay Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-39.65092930555556],PARAMETER["central_meridian",176.6736805277778],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27208"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-39.65092930555556 +lon_0=176.6736805277778 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27208,'EPSG',27208,'PROJCS["NZGD49 / Hawkes Bay Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-39.65092930555556],PARAMETER["central_meridian",176.6736805277778],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27208"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-39.65092930555556 +lon_0=176.6736805277778 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +units=m +no_defs '); --- --- EPSG 27209 : NZGD49 / Taranaki Circuit --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27209,'EPSG',27209,'PROJCS["NZGD49 / Taranaki Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-39.13575830555556],PARAMETER["central_meridian",174.22801175],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27209"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-39.13575830555556 +lon_0=174.22801175 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27209,'EPSG',27209,'PROJCS["NZGD49 / Taranaki Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-39.13575830555556],PARAMETER["central_meridian",174.22801175],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27209"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-39.13575830555556 +lon_0=174.22801175 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +units=m +no_defs '); --- --- EPSG 27210 : NZGD49 / Tuhirangi Circuit --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27210,'EPSG',27210,'PROJCS["NZGD49 / Tuhirangi Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-39.51247038888889],PARAMETER["central_meridian",175.6400368055556],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27210"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-39.51247038888889 +lon_0=175.6400368055556 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27210,'EPSG',27210,'PROJCS["NZGD49 / Tuhirangi Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-39.51247038888889],PARAMETER["central_meridian",175.6400368055556],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27210"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-39.51247038888889 +lon_0=175.6400368055556 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +units=m +no_defs '); --- --- EPSG 27211 : NZGD49 / Wanganui Circuit --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27211,'EPSG',27211,'PROJCS["NZGD49 / Wanganui Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-40.24194713888889],PARAMETER["central_meridian",175.4880996111111],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27211"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-40.24194713888889 +lon_0=175.4880996111111 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27211,'EPSG',27211,'PROJCS["NZGD49 / Wanganui Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-40.24194713888889],PARAMETER["central_meridian",175.4880996111111],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27211"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-40.24194713888889 +lon_0=175.4880996111111 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +units=m +no_defs '); --- --- EPSG 27212 : NZGD49 / Wairarapa Circuit --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27212,'EPSG',27212,'PROJCS["NZGD49 / Wairarapa Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-40.92553263888889],PARAMETER["central_meridian",175.6473496666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27212"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-40.92553263888889 +lon_0=175.6473496666667 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27212,'EPSG',27212,'PROJCS["NZGD49 / Wairarapa Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-40.92553263888889],PARAMETER["central_meridian",175.6473496666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27212"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-40.92553263888889 +lon_0=175.6473496666667 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +units=m +no_defs '); --- --- EPSG 27213 : NZGD49 / Wellington Circuit --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27213,'EPSG',27213,'PROJCS["NZGD49 / Wellington Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-41.30131963888888],PARAMETER["central_meridian",174.7766231111111],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27213"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-41.30131963888888 +lon_0=174.7766231111111 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27213,'EPSG',27213,'PROJCS["NZGD49 / Wellington Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-41.30131963888888],PARAMETER["central_meridian",174.7766231111111],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27213"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-41.30131963888888 +lon_0=174.7766231111111 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +units=m +no_defs '); --- --- EPSG 27214 : NZGD49 / Collingwood Circuit --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27214,'EPSG',27214,'PROJCS["NZGD49 / Collingwood Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-40.71475905555556],PARAMETER["central_meridian",172.6720465],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27214"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-40.71475905555556 +lon_0=172.6720465 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27214,'EPSG',27214,'PROJCS["NZGD49 / Collingwood Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-40.71475905555556],PARAMETER["central_meridian",172.6720465],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27214"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-40.71475905555556 +lon_0=172.6720465 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +units=m +no_defs '); --- --- EPSG 27215 : NZGD49 / Nelson Circuit --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27215,'EPSG',27215,'PROJCS["NZGD49 / Nelson Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-41.27454472222222],PARAMETER["central_meridian",173.2993168055555],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27215"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-41.27454472222222 +lon_0=173.2993168055555 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27215,'EPSG',27215,'PROJCS["NZGD49 / Nelson Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-41.27454472222222],PARAMETER["central_meridian",173.2993168055555],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27215"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-41.27454472222222 +lon_0=173.2993168055555 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +units=m +no_defs '); --- --- EPSG 27216 : NZGD49 / Karamea Circuit --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27216,'EPSG',27216,'PROJCS["NZGD49 / Karamea Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-41.28991152777778],PARAMETER["central_meridian",172.1090281944444],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27216"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-41.28991152777778 +lon_0=172.1090281944444 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27216,'EPSG',27216,'PROJCS["NZGD49 / Karamea Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-41.28991152777778],PARAMETER["central_meridian",172.1090281944444],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27216"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-41.28991152777778 +lon_0=172.1090281944444 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +units=m +no_defs '); --- --- EPSG 27217 : NZGD49 / Buller Circuit --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27217,'EPSG',27217,'PROJCS["NZGD49 / Buller Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-41.81080286111111],PARAMETER["central_meridian",171.5812600555556],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27217"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-41.81080286111111 +lon_0=171.5812600555556 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27217,'EPSG',27217,'PROJCS["NZGD49 / Buller Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-41.81080286111111],PARAMETER["central_meridian",171.5812600555556],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27217"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-41.81080286111111 +lon_0=171.5812600555556 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +units=m +no_defs '); --- --- EPSG 27218 : NZGD49 / Grey Circuit --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27218,'EPSG',27218,'PROJCS["NZGD49 / Grey Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-42.33369427777778],PARAMETER["central_meridian",171.5497713055556],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27218"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-42.33369427777778 +lon_0=171.5497713055556 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27218,'EPSG',27218,'PROJCS["NZGD49 / Grey Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-42.33369427777778],PARAMETER["central_meridian",171.5497713055556],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27218"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-42.33369427777778 +lon_0=171.5497713055556 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +units=m +no_defs '); --- --- EPSG 27219 : NZGD49 / Amuri Circuit --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27219,'EPSG',27219,'PROJCS["NZGD49 / Amuri Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-42.68911658333333],PARAMETER["central_meridian",173.0101333888889],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27219"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-42.68911658333333 +lon_0=173.0101333888889 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27219,'EPSG',27219,'PROJCS["NZGD49 / Amuri Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-42.68911658333333],PARAMETER["central_meridian",173.0101333888889],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27219"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-42.68911658333333 +lon_0=173.0101333888889 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +units=m +no_defs '); --- --- EPSG 27220 : NZGD49 / Marlborough Circuit --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27220,'EPSG',27220,'PROJCS["NZGD49 / Marlborough Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-41.54448666666666],PARAMETER["central_meridian",173.8020741111111],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27220"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-41.54448666666666 +lon_0=173.8020741111111 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27220,'EPSG',27220,'PROJCS["NZGD49 / Marlborough Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-41.54448666666666],PARAMETER["central_meridian",173.8020741111111],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27220"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-41.54448666666666 +lon_0=173.8020741111111 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +units=m +no_defs '); --- --- EPSG 27221 : NZGD49 / Hokitika Circuit --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27221,'EPSG',27221,'PROJCS["NZGD49 / Hokitika Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-42.88632236111111],PARAMETER["central_meridian",170.9799935],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27221"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-42.88632236111111 +lon_0=170.9799935 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27221,'EPSG',27221,'PROJCS["NZGD49 / Hokitika Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-42.88632236111111],PARAMETER["central_meridian",170.9799935],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27221"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-42.88632236111111 +lon_0=170.9799935 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +units=m +no_defs '); --- --- EPSG 27222 : NZGD49 / Okarito Circuit --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27222,'EPSG',27222,'PROJCS["NZGD49 / Okarito Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-43.11012813888889],PARAMETER["central_meridian",170.2609258333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27222"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-43.11012813888889 +lon_0=170.2609258333333 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27222,'EPSG',27222,'PROJCS["NZGD49 / Okarito Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-43.11012813888889],PARAMETER["central_meridian",170.2609258333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27222"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-43.11012813888889 +lon_0=170.2609258333333 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +units=m +no_defs '); --- --- EPSG 27223 : NZGD49 / Jacksons Bay Circuit --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27223,'EPSG',27223,'PROJCS["NZGD49 / Jacksons Bay Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-43.97780288888889],PARAMETER["central_meridian",168.606267],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27223"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-43.97780288888889 +lon_0=168.606267 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27223,'EPSG',27223,'PROJCS["NZGD49 / Jacksons Bay Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-43.97780288888889],PARAMETER["central_meridian",168.606267],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27223"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-43.97780288888889 +lon_0=168.606267 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +units=m +no_defs '); --- --- EPSG 27224 : NZGD49 / Mount Pleasant Circuit --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27224,'EPSG',27224,'PROJCS["NZGD49 / Mount Pleasant Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-43.59063758333333],PARAMETER["central_meridian",172.7271935833333],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27224"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-43.59063758333333 +lon_0=172.7271935833333 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27224,'EPSG',27224,'PROJCS["NZGD49 / Mount Pleasant Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-43.59063758333333],PARAMETER["central_meridian",172.7271935833333],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27224"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-43.59063758333333 +lon_0=172.7271935833333 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +units=m +no_defs '); --- --- EPSG 27225 : NZGD49 / Gawler Circuit --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27225,'EPSG',27225,'PROJCS["NZGD49 / Gawler Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-43.74871155555556],PARAMETER["central_meridian",171.3607484722222],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27225"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-43.74871155555556 +lon_0=171.3607484722222 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27225,'EPSG',27225,'PROJCS["NZGD49 / Gawler Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-43.74871155555556],PARAMETER["central_meridian",171.3607484722222],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27225"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-43.74871155555556 +lon_0=171.3607484722222 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +units=m +no_defs '); --- --- EPSG 27226 : NZGD49 / Timaru Circuit --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27226,'EPSG',27226,'PROJCS["NZGD49 / Timaru Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-44.40222036111111],PARAMETER["central_meridian",171.0572508333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27226"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-44.40222036111111 +lon_0=171.0572508333333 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27226,'EPSG',27226,'PROJCS["NZGD49 / Timaru Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-44.40222036111111],PARAMETER["central_meridian",171.0572508333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27226"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-44.40222036111111 +lon_0=171.0572508333333 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +units=m +no_defs '); --- --- EPSG 27227 : NZGD49 / Lindis Peak Circuit --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27227,'EPSG',27227,'PROJCS["NZGD49 / Lindis Peak Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-44.73526797222222],PARAMETER["central_meridian",169.4677550833333],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27227"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-44.73526797222222 +lon_0=169.4677550833333 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27227,'EPSG',27227,'PROJCS["NZGD49 / Lindis Peak Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-44.73526797222222],PARAMETER["central_meridian",169.4677550833333],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27227"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-44.73526797222222 +lon_0=169.4677550833333 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +units=m +no_defs '); --- --- EPSG 27228 : NZGD49 / Mount Nicholas Circuit --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27228,'EPSG',27228,'PROJCS["NZGD49 / Mount Nicholas Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-45.13290258333333],PARAMETER["central_meridian",168.3986411944444],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27228"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-45.13290258333333 +lon_0=168.3986411944444 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27228,'EPSG',27228,'PROJCS["NZGD49 / Mount Nicholas Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-45.13290258333333],PARAMETER["central_meridian",168.3986411944444],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27228"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-45.13290258333333 +lon_0=168.3986411944444 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +units=m +no_defs '); --- --- EPSG 27229 : NZGD49 / Mount York Circuit --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27229,'EPSG',27229,'PROJCS["NZGD49 / Mount York Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-45.56372616666666],PARAMETER["central_meridian",167.7388617777778],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27229"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-45.56372616666666 +lon_0=167.7388617777778 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27229,'EPSG',27229,'PROJCS["NZGD49 / Mount York Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-45.56372616666666],PARAMETER["central_meridian",167.7388617777778],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27229"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-45.56372616666666 +lon_0=167.7388617777778 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +units=m +no_defs '); --- --- EPSG 27230 : NZGD49 / Observation Point Circuit --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27230,'EPSG',27230,'PROJCS["NZGD49 / Observation Point Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-45.81619661111111],PARAMETER["central_meridian",170.6285951666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27230"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-45.81619661111111 +lon_0=170.6285951666667 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27230,'EPSG',27230,'PROJCS["NZGD49 / Observation Point Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-45.81619661111111],PARAMETER["central_meridian",170.6285951666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27230"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-45.81619661111111 +lon_0=170.6285951666667 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +units=m +no_defs '); --- --- EPSG 27231 : NZGD49 / North Taieri Circuit --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27231,'EPSG',27231,'PROJCS["NZGD49 / North Taieri Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-45.86151336111111],PARAMETER["central_meridian",170.2825891111111],PARAMETER["scale_factor",0.99996],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27231"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-45.86151336111111 +lon_0=170.2825891111111 +k=0.99996 +x_0=300000 +y_0=700000 +ellps=intl +datum=nzgd49 +units=m +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27231,'EPSG',27231,'PROJCS["NZGD49 / North Taieri Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-45.86151336111111],PARAMETER["central_meridian",170.2825891111111],PARAMETER["scale_factor",0.99996],PARAMETER["false_easting",300000],PARAMETER["false_northing",700000],AUTHORITY["EPSG","27231"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-45.86151336111111 +lon_0=170.2825891111111 +k=0.99996 +x_0=300000 +y_0=700000 +ellps=intl +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +units=m +no_defs '); --- --- EPSG 27232 : NZGD49 / Bluff Circuit --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27232,'EPSG',27232,'PROJCS["NZGD49 / Bluff Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-46.60000961111111],PARAMETER["central_meridian",168.342872],PARAMETER["scale_factor",1],PARAMETER["false_easting",300002.66],PARAMETER["false_northing",699999.58],AUTHORITY["EPSG","27232"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-46.60000961111111 +lon_0=168.342872 +k=1 +x_0=300002.66 +y_0=699999.58 +ellps=intl +datum=nzgd49 +units=m +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27232,'EPSG',27232,'PROJCS["NZGD49 / Bluff Circuit",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-46.60000961111111],PARAMETER["central_meridian",168.342872],PARAMETER["scale_factor",1],PARAMETER["false_easting",300002.66],PARAMETER["false_northing",699999.58],AUTHORITY["EPSG","27232"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=tmerc +lat_0=-46.60000961111111 +lon_0=168.342872 +k=1 +x_0=300002.66 +y_0=699999.58 +ellps=intl +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +units=m +no_defs '); --- --- EPSG 27258 : NZGD49 / UTM zone 58S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27258,'EPSG',27258,'PROJCS["NZGD49 / UTM zone 58S",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","27258"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=58 +south +ellps=intl +datum=nzgd49 +units=m +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27258,'EPSG',27258,'PROJCS["NZGD49 / UTM zone 58S",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","27258"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=58 +south +ellps=intl +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +units=m +no_defs '); --- --- EPSG 27259 : NZGD49 / UTM zone 59S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27259,'EPSG',27259,'PROJCS["NZGD49 / UTM zone 59S",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","27259"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=59 +south +ellps=intl +datum=nzgd49 +units=m +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27259,'EPSG',27259,'PROJCS["NZGD49 / UTM zone 59S",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","27259"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=59 +south +ellps=intl +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +units=m +no_defs '); --- --- EPSG 27260 : NZGD49 / UTM zone 60S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27260,'EPSG',27260,'PROJCS["NZGD49 / UTM zone 60S",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","27260"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=60 +south +ellps=intl +datum=nzgd49 +units=m +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27260,'EPSG',27260,'PROJCS["NZGD49 / UTM zone 60S",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","27260"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=60 +south +ellps=intl +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +units=m +no_defs '); --- --- EPSG 27291 : NZGD49 / North Island Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27291,'EPSG',27291,'PROJCS["NZGD49 / North Island Grid",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["British yard (Sears 1922)",0.9143984146160287,AUTHORITY["EPSG","9040"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-39],PARAMETER["central_meridian",175.5],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",400000],AUTHORITY["EPSG","27291"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-39 +lon_0=175.5 +k=1 +x_0=274319.5243848086 +y_0=365759.3658464114 +ellps=intl +datum=nzgd49 +to_meter=0.9143984146160287 +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27291,'EPSG',27291,'PROJCS["NZGD49 / North Island Grid",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["British yard (Sears 1922)",0.9143984146160287,AUTHORITY["EPSG","9040"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-39],PARAMETER["central_meridian",175.5],PARAMETER["scale_factor",1],PARAMETER["false_easting",300000],PARAMETER["false_northing",400000],AUTHORITY["EPSG","27291"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-39 +lon_0=175.5 +k=1 +x_0=274319.5243848086 +y_0=365759.3658464114 +ellps=intl +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +to_meter=0.9143984146160287 +no_defs '); --- --- EPSG 27292 : NZGD49 / South Island Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27292,'EPSG',27292,'PROJCS["NZGD49 / South Island Grid",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["British yard (Sears 1922)",0.9143984146160287,AUTHORITY["EPSG","9040"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-44],PARAMETER["central_meridian",171.5],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","27292"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-44 +lon_0=171.5 +k=1 +x_0=457199.2073080143 +y_0=457199.2073080143 +ellps=intl +datum=nzgd49 +to_meter=0.9143984146160287 +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27292,'EPSG',27292,'PROJCS["NZGD49 / South Island Grid",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["British yard (Sears 1922)",0.9143984146160287,AUTHORITY["EPSG","9040"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",-44],PARAMETER["central_meridian",171.5],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","27292"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=-44 +lon_0=171.5 +k=1 +x_0=457199.2073080143 +y_0=457199.2073080143 +ellps=intl +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +nadgrids=nzgd2kgrid0005.gsb +to_meter=0.9143984146160287 +no_defs '); --- --- EPSG 27391 : NGO 1948 (Oslo) / NGO zone I --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27391,'EPSG',27391,'PROJCS["NGO 1948 (Oslo) / NGO zone I",GEOGCS["NGO 1948 (Oslo)",DATUM["NGO_1948_Oslo",SPHEROID["Bessel Modified",6377492.018,299.1528128,AUTHORITY["EPSG","7005"]],TOWGS84[278.3,93,474.5,7.889,0.05,-6.61,6.21],AUTHORITY["EPSG","6817"]],PRIMEM["Oslo",10.72291666666667,AUTHORITY["EPSG","8913"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4817"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",58],PARAMETER["central_meridian",-4.666666666666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","27391"],AXIS["y",EAST],AXIS["x",NORTH]]','+proj=tmerc +lat_0=58 +lon_0=-4.666666666666667 +k=1 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27391,'EPSG',27391,'PROJCS["NGO 1948 (Oslo) / NGO zone I",GEOGCS["NGO 1948 (Oslo)",DATUM["NGO_1948_Oslo",SPHEROID["Bessel Modified",6377492.018,299.1528128,AUTHORITY["EPSG","7005"]],TOWGS84[278.3,93,474.5,7.889,0.05,-6.61,6.21],AUTHORITY["EPSG","6817"]],PRIMEM["Oslo",10.72291666666667,AUTHORITY["EPSG","8913"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4817"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",58],PARAMETER["central_meridian",-4.666666666666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","27391"],AXIS["x",NORTH],AXIS["y",EAST]]','+proj=tmerc +lat_0=58 +lon_0=-4.666666666666667 +k=1 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs '); --- --- EPSG 27392 : NGO 1948 (Oslo) / NGO zone II --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27392,'EPSG',27392,'PROJCS["NGO 1948 (Oslo) / NGO zone II",GEOGCS["NGO 1948 (Oslo)",DATUM["NGO_1948_Oslo",SPHEROID["Bessel Modified",6377492.018,299.1528128,AUTHORITY["EPSG","7005"]],TOWGS84[278.3,93,474.5,7.889,0.05,-6.61,6.21],AUTHORITY["EPSG","6817"]],PRIMEM["Oslo",10.72291666666667,AUTHORITY["EPSG","8913"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4817"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",58],PARAMETER["central_meridian",-2.333333333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","27392"],AXIS["y",EAST],AXIS["x",NORTH]]','+proj=tmerc +lat_0=58 +lon_0=-2.333333333333333 +k=1 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27392,'EPSG',27392,'PROJCS["NGO 1948 (Oslo) / NGO zone II",GEOGCS["NGO 1948 (Oslo)",DATUM["NGO_1948_Oslo",SPHEROID["Bessel Modified",6377492.018,299.1528128,AUTHORITY["EPSG","7005"]],TOWGS84[278.3,93,474.5,7.889,0.05,-6.61,6.21],AUTHORITY["EPSG","6817"]],PRIMEM["Oslo",10.72291666666667,AUTHORITY["EPSG","8913"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4817"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",58],PARAMETER["central_meridian",-2.333333333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","27392"],AXIS["x",NORTH],AXIS["y",EAST]]','+proj=tmerc +lat_0=58 +lon_0=-2.333333333333333 +k=1 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs '); --- --- EPSG 27393 : NGO 1948 (Oslo) / NGO zone III --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27393,'EPSG',27393,'PROJCS["NGO 1948 (Oslo) / NGO zone III",GEOGCS["NGO 1948 (Oslo)",DATUM["NGO_1948_Oslo",SPHEROID["Bessel Modified",6377492.018,299.1528128,AUTHORITY["EPSG","7005"]],TOWGS84[278.3,93,474.5,7.889,0.05,-6.61,6.21],AUTHORITY["EPSG","6817"]],PRIMEM["Oslo",10.72291666666667,AUTHORITY["EPSG","8913"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4817"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",58],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","27393"],AXIS["y",EAST],AXIS["x",NORTH]]','+proj=tmerc +lat_0=58 +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27393,'EPSG',27393,'PROJCS["NGO 1948 (Oslo) / NGO zone III",GEOGCS["NGO 1948 (Oslo)",DATUM["NGO_1948_Oslo",SPHEROID["Bessel Modified",6377492.018,299.1528128,AUTHORITY["EPSG","7005"]],TOWGS84[278.3,93,474.5,7.889,0.05,-6.61,6.21],AUTHORITY["EPSG","6817"]],PRIMEM["Oslo",10.72291666666667,AUTHORITY["EPSG","8913"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4817"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",58],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","27393"],AXIS["x",NORTH],AXIS["y",EAST]]','+proj=tmerc +lat_0=58 +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs '); --- --- EPSG 27394 : NGO 1948 (Oslo) / NGO zone IV --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27394,'EPSG',27394,'PROJCS["NGO 1948 (Oslo) / NGO zone IV",GEOGCS["NGO 1948 (Oslo)",DATUM["NGO_1948_Oslo",SPHEROID["Bessel Modified",6377492.018,299.1528128,AUTHORITY["EPSG","7005"]],TOWGS84[278.3,93,474.5,7.889,0.05,-6.61,6.21],AUTHORITY["EPSG","6817"]],PRIMEM["Oslo",10.72291666666667,AUTHORITY["EPSG","8913"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4817"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",58],PARAMETER["central_meridian",2.5],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","27394"],AXIS["y",EAST],AXIS["x",NORTH]]','+proj=tmerc +lat_0=58 +lon_0=2.5 +k=1 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27394,'EPSG',27394,'PROJCS["NGO 1948 (Oslo) / NGO zone IV",GEOGCS["NGO 1948 (Oslo)",DATUM["NGO_1948_Oslo",SPHEROID["Bessel Modified",6377492.018,299.1528128,AUTHORITY["EPSG","7005"]],TOWGS84[278.3,93,474.5,7.889,0.05,-6.61,6.21],AUTHORITY["EPSG","6817"]],PRIMEM["Oslo",10.72291666666667,AUTHORITY["EPSG","8913"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4817"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",58],PARAMETER["central_meridian",2.5],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","27394"],AXIS["x",NORTH],AXIS["y",EAST]]','+proj=tmerc +lat_0=58 +lon_0=2.5 +k=1 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs '); --- --- EPSG 27395 : NGO 1948 (Oslo) / NGO zone V --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27395,'EPSG',27395,'PROJCS["NGO 1948 (Oslo) / NGO zone V",GEOGCS["NGO 1948 (Oslo)",DATUM["NGO_1948_Oslo",SPHEROID["Bessel Modified",6377492.018,299.1528128,AUTHORITY["EPSG","7005"]],TOWGS84[278.3,93,474.5,7.889,0.05,-6.61,6.21],AUTHORITY["EPSG","6817"]],PRIMEM["Oslo",10.72291666666667,AUTHORITY["EPSG","8913"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4817"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",58],PARAMETER["central_meridian",6.166666666666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","27395"],AXIS["y",EAST],AXIS["x",NORTH]]','+proj=tmerc +lat_0=58 +lon_0=6.166666666666667 +k=1 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27395,'EPSG',27395,'PROJCS["NGO 1948 (Oslo) / NGO zone V",GEOGCS["NGO 1948 (Oslo)",DATUM["NGO_1948_Oslo",SPHEROID["Bessel Modified",6377492.018,299.1528128,AUTHORITY["EPSG","7005"]],TOWGS84[278.3,93,474.5,7.889,0.05,-6.61,6.21],AUTHORITY["EPSG","6817"]],PRIMEM["Oslo",10.72291666666667,AUTHORITY["EPSG","8913"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4817"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",58],PARAMETER["central_meridian",6.166666666666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","27395"],AXIS["x",NORTH],AXIS["y",EAST]]','+proj=tmerc +lat_0=58 +lon_0=6.166666666666667 +k=1 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs '); --- --- EPSG 27396 : NGO 1948 (Oslo) / NGO zone VI --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27396,'EPSG',27396,'PROJCS["NGO 1948 (Oslo) / NGO zone VI",GEOGCS["NGO 1948 (Oslo)",DATUM["NGO_1948_Oslo",SPHEROID["Bessel Modified",6377492.018,299.1528128,AUTHORITY["EPSG","7005"]],TOWGS84[278.3,93,474.5,7.889,0.05,-6.61,6.21],AUTHORITY["EPSG","6817"]],PRIMEM["Oslo",10.72291666666667,AUTHORITY["EPSG","8913"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4817"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",58],PARAMETER["central_meridian",10.16666666666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","27396"],AXIS["y",EAST],AXIS["x",NORTH]]','+proj=tmerc +lat_0=58 +lon_0=10.16666666666667 +k=1 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27396,'EPSG',27396,'PROJCS["NGO 1948 (Oslo) / NGO zone VI",GEOGCS["NGO 1948 (Oslo)",DATUM["NGO_1948_Oslo",SPHEROID["Bessel Modified",6377492.018,299.1528128,AUTHORITY["EPSG","7005"]],TOWGS84[278.3,93,474.5,7.889,0.05,-6.61,6.21],AUTHORITY["EPSG","6817"]],PRIMEM["Oslo",10.72291666666667,AUTHORITY["EPSG","8913"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4817"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",58],PARAMETER["central_meridian",10.16666666666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","27396"],AXIS["x",NORTH],AXIS["y",EAST]]','+proj=tmerc +lat_0=58 +lon_0=10.16666666666667 +k=1 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs '); --- --- EPSG 27397 : NGO 1948 (Oslo) / NGO zone VII --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27397,'EPSG',27397,'PROJCS["NGO 1948 (Oslo) / NGO zone VII",GEOGCS["NGO 1948 (Oslo)",DATUM["NGO_1948_Oslo",SPHEROID["Bessel Modified",6377492.018,299.1528128,AUTHORITY["EPSG","7005"]],TOWGS84[278.3,93,474.5,7.889,0.05,-6.61,6.21],AUTHORITY["EPSG","6817"]],PRIMEM["Oslo",10.72291666666667,AUTHORITY["EPSG","8913"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4817"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",58],PARAMETER["central_meridian",14.16666666666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","27397"],AXIS["y",EAST],AXIS["x",NORTH]]','+proj=tmerc +lat_0=58 +lon_0=14.16666666666667 +k=1 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27397,'EPSG',27397,'PROJCS["NGO 1948 (Oslo) / NGO zone VII",GEOGCS["NGO 1948 (Oslo)",DATUM["NGO_1948_Oslo",SPHEROID["Bessel Modified",6377492.018,299.1528128,AUTHORITY["EPSG","7005"]],TOWGS84[278.3,93,474.5,7.889,0.05,-6.61,6.21],AUTHORITY["EPSG","6817"]],PRIMEM["Oslo",10.72291666666667,AUTHORITY["EPSG","8913"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4817"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",58],PARAMETER["central_meridian",14.16666666666667],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","27397"],AXIS["x",NORTH],AXIS["y",EAST]]','+proj=tmerc +lat_0=58 +lon_0=14.16666666666667 +k=1 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs '); --- --- EPSG 27398 : NGO 1948 (Oslo) / NGO zone VIII --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27398,'EPSG',27398,'PROJCS["NGO 1948 (Oslo) / NGO zone VIII",GEOGCS["NGO 1948 (Oslo)",DATUM["NGO_1948_Oslo",SPHEROID["Bessel Modified",6377492.018,299.1528128,AUTHORITY["EPSG","7005"]],TOWGS84[278.3,93,474.5,7.889,0.05,-6.61,6.21],AUTHORITY["EPSG","6817"]],PRIMEM["Oslo",10.72291666666667,AUTHORITY["EPSG","8913"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4817"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",58],PARAMETER["central_meridian",18.33333333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","27398"],AXIS["y",EAST],AXIS["x",NORTH]]','+proj=tmerc +lat_0=58 +lon_0=18.33333333333333 +k=1 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27398,'EPSG',27398,'PROJCS["NGO 1948 (Oslo) / NGO zone VIII",GEOGCS["NGO 1948 (Oslo)",DATUM["NGO_1948_Oslo",SPHEROID["Bessel Modified",6377492.018,299.1528128,AUTHORITY["EPSG","7005"]],TOWGS84[278.3,93,474.5,7.889,0.05,-6.61,6.21],AUTHORITY["EPSG","6817"]],PRIMEM["Oslo",10.72291666666667,AUTHORITY["EPSG","8913"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4817"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",58],PARAMETER["central_meridian",18.33333333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","27398"],AXIS["x",NORTH],AXIS["y",EAST]]','+proj=tmerc +lat_0=58 +lon_0=18.33333333333333 +k=1 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs '); --- --- EPSG 27429 : Datum 73 / UTM zone 29N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27429,'EPSG',27429,'PROJCS["Datum 73 / UTM zone 29N",GEOGCS["Datum 73",DATUM["Datum_73",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6274"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4274"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","27429"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27429,'EPSG',27429,'PROJCS["Datum 73 / UTM zone 29N",GEOGCS["Datum 73",DATUM["Datum_73",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-223.237,110.193,36.649,0,0,0,0],AUTHORITY["EPSG","6274"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4274"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","27429"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +ellps=intl +towgs84=-223.237,110.193,36.649,0,0,0,0 +units=m +no_defs '); --- --- EPSG 27492 : Datum 73 / Modified Portuguese Grid (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27492,'EPSG',27492,'PROJCS["Datum 73 / Modified Portuguese Grid (deprecated)",GEOGCS["Datum 73",DATUM["Datum_73",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6274"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4274"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",39.66666666666666],PARAMETER["central_meridian",-8.131906111111112],PARAMETER["scale_factor",1],PARAMETER["false_easting",180.598],PARAMETER["false_northing",-86.99],AUTHORITY["EPSG","27492"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=39.66666666666666 +lon_0=-8.131906111111112 +k=1 +x_0=180.598 +y_0=-86.98999999999999 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27492,'EPSG',27492,'PROJCS["Datum 73 / Modified Portuguese Grid (deprecated)",GEOGCS["Datum 73",DATUM["Datum_73",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-223.237,110.193,36.649,0,0,0,0],AUTHORITY["EPSG","6274"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4274"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",39.66666666666666],PARAMETER["central_meridian",-8.131906111111112],PARAMETER["scale_factor",1],PARAMETER["false_easting",180.598],PARAMETER["false_northing",-86.99],AUTHORITY["EPSG","27492"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=39.66666666666666 +lon_0=-8.131906111111112 +k=1 +x_0=180.598 +y_0=-86.98999999999999 +ellps=intl +towgs84=-223.237,110.193,36.649,0,0,0,0 +units=m +no_defs '); --- --- EPSG 27493 : Datum 73 / Modified Portuguese Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27493,'EPSG',27493,'PROJCS["Datum 73 / Modified Portuguese Grid",GEOGCS["Datum 73",DATUM["Datum_73",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6274"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4274"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",39.66666666666666],PARAMETER["central_meridian",-8.131906111111112],PARAMETER["scale_factor",1],PARAMETER["false_easting",180.598],PARAMETER["false_northing",-86.99],AUTHORITY["EPSG","27493"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=39.66666666666666 +lon_0=-8.131906111111112 +k=1 +x_0=180.598 +y_0=-86.98999999999999 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27493,'EPSG',27493,'PROJCS["Datum 73 / Modified Portuguese Grid",GEOGCS["Datum 73",DATUM["Datum_73",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-223.237,110.193,36.649,0,0,0,0],AUTHORITY["EPSG","6274"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4274"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",39.66666666666666],PARAMETER["central_meridian",-8.131906111111112],PARAMETER["scale_factor",1],PARAMETER["false_easting",180.598],PARAMETER["false_northing",-86.99],AUTHORITY["EPSG","27493"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=39.66666666666666 +lon_0=-8.131906111111112 +k=1 +x_0=180.598 +y_0=-86.98999999999999 +ellps=intl +towgs84=-223.237,110.193,36.649,0,0,0,0 +units=m +no_defs '); --- ---- EPSG 27500 : unnamed +--- EPSG 27500 : ATF (Paris) / Nord de Guerre --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27500,'EPSG',27500,'PROJCS["unnamed",GEOGCS["unnamed ellipse",DATUM["unknown",SPHEROID["unnamed",6376523,308.6399999999991]],PRIMEM["paris",2.3372291666985],UNIT["degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",49.5],PARAMETER["central_meridian",5.4],PARAMETER["scale_factor",0.99950908],PARAMETER["false_easting",500000],PARAMETER["false_northing",300000],UNIT["Meter",1],AUTHORITY["EPSG","27500"]]','+proj=lcc +lat_1=49.5 +lat_0=49.5 +lon_0=5.4 +k_0=0.99950908 +x_0=500000 +y_0=300000 +a=6376523 +b=6355862.933255573 +pm=2.3372291666985 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27500,'EPSG',27500,'PROJCS["ATF (Paris) / Nord de Guerre",GEOGCS["ATF (Paris)",DATUM["Ancienne_Triangulation_Francaise_Paris",SPHEROID["Plessis 1817",6376523,308.64,AUTHORITY["EPSG","7027"]],AUTHORITY["EPSG","6901"]],PRIMEM["Paris RGS",2.337208333333333,AUTHORITY["EPSG","8914"]],UNIT["grad",0.01570796326794897,AUTHORITY["EPSG","9105"]],AUTHORITY["EPSG","4901"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",55],PARAMETER["central_meridian",5.999999999999998],PARAMETER["scale_factor",0.99950908],PARAMETER["false_easting",500000],PARAMETER["false_northing",300000],AUTHORITY["EPSG","27500"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000001 +lon_0=5.399999999999999 +k_0=0.99950908 +x_0=500000 +y_0=300000 +a=6376523 +b=6355862.933255573 +pm=2.337208333333333 +units=m +no_defs '); --- --- EPSG 27561 : NTF (Paris) / Lambert Nord France --- @@ -11982,491 +13694,491 @@ --- --- EPSG 27700 : OSGB 1936 / British National Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27700,'EPSG',27700,'PROJCS["OSGB 1936 / British National Grid",GEOGCS["OSGB 1936",DATUM["OSGB_1936",SPHEROID["Airy 1830",6377563.396,299.3249646,AUTHORITY["EPSG","7001"]],AUTHORITY["EPSG","6277"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4277"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",49],PARAMETER["central_meridian",-2],PARAMETER["scale_factor",0.9996012717],PARAMETER["false_easting",400000],PARAMETER["false_northing",-100000],AUTHORITY["EPSG","27700"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +datum=OSGB36 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27700,'EPSG',27700,'PROJCS["OSGB 1936 / British National Grid",GEOGCS["OSGB 1936",DATUM["OSGB_1936",SPHEROID["Airy 1830",6377563.396,299.3249646,AUTHORITY["EPSG","7001"]],TOWGS84[446.448,-125.157,542.06,0.15,0.247,0.842,-20.489],AUTHORITY["EPSG","6277"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4277"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",49],PARAMETER["central_meridian",-2],PARAMETER["scale_factor",0.9996012717],PARAMETER["false_easting",400000],PARAMETER["false_northing",-100000],AUTHORITY["EPSG","27700"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +towgs84=446.448,-125.157,542.06,0.15,0.247,0.842,-20.489 +units=m +no_defs '); --- --- EPSG 28191 : Palestine 1923 / Palestine Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28191,'EPSG',28191,'PROJCS["Palestine 1923 / Palestine Grid",GEOGCS["Palestine 1923",DATUM["Palestine_1923",SPHEROID["Clarke 1880 (Benoit)",6378300.789,293.4663155389802,AUTHORITY["EPSG","7010"]],TOWGS84[-275.722,94.7824,340.894,-8.001,-4.42,-11.821,1],AUTHORITY["EPSG","6281"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4281"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Cassini_Soldner"],PARAMETER["latitude_of_origin",31.73409694444445],PARAMETER["central_meridian",35.21208055555556],PARAMETER["false_easting",170251.555],PARAMETER["false_northing",126867.909],AUTHORITY["EPSG","28191"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=cass +lat_0=31.73409694444445 +lon_0=35.21208055555556 +x_0=170251.555 +y_0=126867.909 +a=6378300.789 +b=6356566.435 +towgs84=-275.722,94.7824,340.894,-8.001,-4.42,-11.821,1 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28191,'EPSG',28191,'PROJCS["Palestine 1923 / Palestine Grid",GEOGCS["Palestine 1923",DATUM["Palestine_1923",SPHEROID["Clarke 1880 (Benoit)",6378300.789,293.4663155389802,AUTHORITY["EPSG","7010"]],TOWGS84[-275.722,94.7824,340.894,-8.001,-4.42,-11.821,1],AUTHORITY["EPSG","6281"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4281"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Cassini_Soldner"],PARAMETER["latitude_of_origin",31.73409694444445],PARAMETER["central_meridian",35.21208055555556],PARAMETER["false_easting",170251.555],PARAMETER["false_northing",126867.909],AUTHORITY["EPSG","28191"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=cass +lat_0=31.73409694444445 +lon_0=35.21208055555556 +x_0=170251.555 +y_0=126867.909 +a=6378300.789 +b=6356566.435 +towgs84=-275.722,94.7824,340.894,-8.001,-4.42,-11.821,1 +units=m +no_defs '); --- --- EPSG 28192 : Palestine 1923 / Palestine Belt --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28192,'EPSG',28192,'PROJCS["Palestine 1923 / Palestine Belt",GEOGCS["Palestine 1923",DATUM["Palestine_1923",SPHEROID["Clarke 1880 (Benoit)",6378300.789,293.4663155389802,AUTHORITY["EPSG","7010"]],TOWGS84[-275.722,94.7824,340.894,-8.001,-4.42,-11.821,1],AUTHORITY["EPSG","6281"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4281"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31.73409694444445],PARAMETER["central_meridian",35.21208055555556],PARAMETER["scale_factor",1],PARAMETER["false_easting",170251.555],PARAMETER["false_northing",1126867.909],AUTHORITY["EPSG","28192"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=31.73409694444445 +lon_0=35.21208055555556 +k=1 +x_0=170251.555 +y_0=1126867.909 +a=6378300.789 +b=6356566.435 +towgs84=-275.722,94.7824,340.894,-8.001,-4.42,-11.821,1 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28192,'EPSG',28192,'PROJCS["Palestine 1923 / Palestine Belt",GEOGCS["Palestine 1923",DATUM["Palestine_1923",SPHEROID["Clarke 1880 (Benoit)",6378300.789,293.4663155389802,AUTHORITY["EPSG","7010"]],TOWGS84[-275.722,94.7824,340.894,-8.001,-4.42,-11.821,1],AUTHORITY["EPSG","6281"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4281"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31.73409694444445],PARAMETER["central_meridian",35.21208055555556],PARAMETER["scale_factor",1],PARAMETER["false_easting",170251.555],PARAMETER["false_northing",1126867.909],AUTHORITY["EPSG","28192"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=31.73409694444445 +lon_0=35.21208055555556 +k=1 +x_0=170251.555 +y_0=1126867.909 +a=6378300.789 +b=6356566.435 +towgs84=-275.722,94.7824,340.894,-8.001,-4.42,-11.821,1 +units=m +no_defs '); --- --- EPSG 28193 : Palestine 1923 / Israeli CS Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28193,'EPSG',28193,'PROJCS["Palestine 1923 / Israeli CS Grid",GEOGCS["Palestine 1923",DATUM["Palestine_1923",SPHEROID["Clarke 1880 (Benoit)",6378300.789,293.4663155389802,AUTHORITY["EPSG","7010"]],TOWGS84[-275.722,94.7824,340.894,-8.001,-4.42,-11.821,1],AUTHORITY["EPSG","6281"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4281"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Cassini_Soldner"],PARAMETER["latitude_of_origin",31.73409694444445],PARAMETER["central_meridian",35.21208055555556],PARAMETER["false_easting",170251.555],PARAMETER["false_northing",1126867.909],AUTHORITY["EPSG","28193"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=cass +lat_0=31.73409694444445 +lon_0=35.21208055555556 +x_0=170251.555 +y_0=1126867.909 +a=6378300.789 +b=6356566.435 +towgs84=-275.722,94.7824,340.894,-8.001,-4.42,-11.821,1 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28193,'EPSG',28193,'PROJCS["Palestine 1923 / Israeli CS Grid",GEOGCS["Palestine 1923",DATUM["Palestine_1923",SPHEROID["Clarke 1880 (Benoit)",6378300.789,293.4663155389802,AUTHORITY["EPSG","7010"]],TOWGS84[-275.722,94.7824,340.894,-8.001,-4.42,-11.821,1],AUTHORITY["EPSG","6281"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4281"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Cassini_Soldner"],PARAMETER["latitude_of_origin",31.73409694444445],PARAMETER["central_meridian",35.21208055555556],PARAMETER["false_easting",170251.555],PARAMETER["false_northing",1126867.909],AUTHORITY["EPSG","28193"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=cass +lat_0=31.73409694444445 +lon_0=35.21208055555556 +x_0=170251.555 +y_0=1126867.909 +a=6378300.789 +b=6356566.435 +towgs84=-275.722,94.7824,340.894,-8.001,-4.42,-11.821,1 +units=m +no_defs '); --- --- EPSG 28232 : Pointe Noire / UTM zone 32S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28232,'EPSG',28232,'PROJCS["Pointe Noire / UTM zone 32S",GEOGCS["Pointe Noire",DATUM["Congo_1960_Pointe_Noire",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],AUTHORITY["EPSG","6282"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4282"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","28232"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +south +a=6378249.2 +b=6356515 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28232,'EPSG',28232,'PROJCS["Pointe Noire / UTM zone 32S",GEOGCS["Pointe Noire",DATUM["Congo_1960_Pointe_Noire",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-148,51,-291,0,0,0,0],AUTHORITY["EPSG","6282"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4282"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","28232"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +south +a=6378249.2 +b=6356515 +towgs84=-148,51,-291,0,0,0,0 +units=m +no_defs '); --- --- EPSG 28348 : GDA94 / MGA zone 48 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28348,'EPSG',28348,'PROJCS["GDA94 / MGA zone 48",GEOGCS["GDA94",DATUM["Geocentric_Datum_of_Australia_1994",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6283"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4283"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","28348"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=48 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28348,'EPSG',28348,'PROJCS["GDA94 / MGA zone 48",GEOGCS["GDA94",DATUM["Geocentric_Datum_of_Australia_1994",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6283"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4283"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","28348"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=48 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 28349 : GDA94 / MGA zone 49 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28349,'EPSG',28349,'PROJCS["GDA94 / MGA zone 49",GEOGCS["GDA94",DATUM["Geocentric_Datum_of_Australia_1994",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6283"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4283"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","28349"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=49 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28349,'EPSG',28349,'PROJCS["GDA94 / MGA zone 49",GEOGCS["GDA94",DATUM["Geocentric_Datum_of_Australia_1994",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6283"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4283"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","28349"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=49 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 28350 : GDA94 / MGA zone 50 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28350,'EPSG',28350,'PROJCS["GDA94 / MGA zone 50",GEOGCS["GDA94",DATUM["Geocentric_Datum_of_Australia_1994",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6283"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4283"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","28350"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=50 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28350,'EPSG',28350,'PROJCS["GDA94 / MGA zone 50",GEOGCS["GDA94",DATUM["Geocentric_Datum_of_Australia_1994",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6283"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4283"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","28350"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=50 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 28351 : GDA94 / MGA zone 51 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28351,'EPSG',28351,'PROJCS["GDA94 / MGA zone 51",GEOGCS["GDA94",DATUM["Geocentric_Datum_of_Australia_1994",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6283"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4283"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","28351"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=51 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28351,'EPSG',28351,'PROJCS["GDA94 / MGA zone 51",GEOGCS["GDA94",DATUM["Geocentric_Datum_of_Australia_1994",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6283"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4283"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","28351"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=51 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 28352 : GDA94 / MGA zone 52 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28352,'EPSG',28352,'PROJCS["GDA94 / MGA zone 52",GEOGCS["GDA94",DATUM["Geocentric_Datum_of_Australia_1994",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6283"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4283"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","28352"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=52 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28352,'EPSG',28352,'PROJCS["GDA94 / MGA zone 52",GEOGCS["GDA94",DATUM["Geocentric_Datum_of_Australia_1994",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6283"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4283"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","28352"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=52 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 28353 : GDA94 / MGA zone 53 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28353,'EPSG',28353,'PROJCS["GDA94 / MGA zone 53",GEOGCS["GDA94",DATUM["Geocentric_Datum_of_Australia_1994",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6283"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4283"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","28353"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=53 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28353,'EPSG',28353,'PROJCS["GDA94 / MGA zone 53",GEOGCS["GDA94",DATUM["Geocentric_Datum_of_Australia_1994",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6283"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4283"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","28353"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=53 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 28354 : GDA94 / MGA zone 54 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28354,'EPSG',28354,'PROJCS["GDA94 / MGA zone 54",GEOGCS["GDA94",DATUM["Geocentric_Datum_of_Australia_1994",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6283"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4283"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","28354"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=54 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28354,'EPSG',28354,'PROJCS["GDA94 / MGA zone 54",GEOGCS["GDA94",DATUM["Geocentric_Datum_of_Australia_1994",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6283"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4283"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","28354"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=54 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 28355 : GDA94 / MGA zone 55 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28355,'EPSG',28355,'PROJCS["GDA94 / MGA zone 55",GEOGCS["GDA94",DATUM["Geocentric_Datum_of_Australia_1994",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6283"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4283"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","28355"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=55 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28355,'EPSG',28355,'PROJCS["GDA94 / MGA zone 55",GEOGCS["GDA94",DATUM["Geocentric_Datum_of_Australia_1994",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6283"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4283"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","28355"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=55 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 28356 : GDA94 / MGA zone 56 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28356,'EPSG',28356,'PROJCS["GDA94 / MGA zone 56",GEOGCS["GDA94",DATUM["Geocentric_Datum_of_Australia_1994",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6283"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4283"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","28356"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=56 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28356,'EPSG',28356,'PROJCS["GDA94 / MGA zone 56",GEOGCS["GDA94",DATUM["Geocentric_Datum_of_Australia_1994",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6283"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4283"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","28356"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=56 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 28357 : GDA94 / MGA zone 57 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28357,'EPSG',28357,'PROJCS["GDA94 / MGA zone 57",GEOGCS["GDA94",DATUM["Geocentric_Datum_of_Australia_1994",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6283"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4283"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",159],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","28357"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=57 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28357,'EPSG',28357,'PROJCS["GDA94 / MGA zone 57",GEOGCS["GDA94",DATUM["Geocentric_Datum_of_Australia_1994",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6283"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4283"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",159],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","28357"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=57 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 28358 : GDA94 / MGA zone 58 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28358,'EPSG',28358,'PROJCS["GDA94 / MGA zone 58",GEOGCS["GDA94",DATUM["Geocentric_Datum_of_Australia_1994",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6283"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4283"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","28358"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=58 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28358,'EPSG',28358,'PROJCS["GDA94 / MGA zone 58",GEOGCS["GDA94",DATUM["Geocentric_Datum_of_Australia_1994",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6283"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4283"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","28358"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=58 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 28402 : Pulkovo 1942 / Gauss-Kruger zone 2 (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28402,'EPSG',28402,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 2 (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",1],PARAMETER["false_easting",2500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28402"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=2500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28402,'EPSG',28402,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 2 (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",1],PARAMETER["false_easting",2500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28402"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=2500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28403 : Pulkovo 1942 / Gauss-Kruger zone 3 (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28403,'EPSG',28403,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 3 (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",1],PARAMETER["false_easting",3500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28403"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=3500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28403,'EPSG',28403,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 3 (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",1],PARAMETER["false_easting",3500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28403"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=3500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28404 : Pulkovo 1942 / Gauss-Kruger zone 4 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28404,'EPSG',28404,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 4",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",4500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28404"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=4500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28404,'EPSG',28404,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 4",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",4500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28404"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=4500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28405 : Pulkovo 1942 / Gauss-Kruger zone 5 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28405,'EPSG',28405,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 5",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",1],PARAMETER["false_easting",5500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28405"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=5500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28405,'EPSG',28405,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 5",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",1],PARAMETER["false_easting",5500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28405"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=5500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28406 : Pulkovo 1942 / Gauss-Kruger zone 6 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28406,'EPSG',28406,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 6",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",1],PARAMETER["false_easting",6500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28406"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=6500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28406,'EPSG',28406,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 6",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",1],PARAMETER["false_easting",6500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28406"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=6500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28407 : Pulkovo 1942 / Gauss-Kruger zone 7 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28407,'EPSG',28407,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 7",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",1],PARAMETER["false_easting",7500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28407"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=7500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28407,'EPSG',28407,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 7",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",1],PARAMETER["false_easting",7500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28407"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=7500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28408 : Pulkovo 1942 / Gauss-Kruger zone 8 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28408,'EPSG',28408,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 8",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",1],PARAMETER["false_easting",8500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28408"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=8500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28408,'EPSG',28408,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 8",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",1],PARAMETER["false_easting",8500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28408"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=8500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28409 : Pulkovo 1942 / Gauss-Kruger zone 9 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28409,'EPSG',28409,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 9",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",1],PARAMETER["false_easting",9500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28409"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=9500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28409,'EPSG',28409,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 9",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",1],PARAMETER["false_easting",9500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28409"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=9500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28410 : Pulkovo 1942 / Gauss-Kruger zone 10 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28410,'EPSG',28410,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 10",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",1],PARAMETER["false_easting",10500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28410"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=10500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28410,'EPSG',28410,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 10",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",1],PARAMETER["false_easting",10500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28410"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=10500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28411 : Pulkovo 1942 / Gauss-Kruger zone 11 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28411,'EPSG',28411,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 11",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",63],PARAMETER["scale_factor",1],PARAMETER["false_easting",11500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28411"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=11500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28411,'EPSG',28411,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 11",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",63],PARAMETER["scale_factor",1],PARAMETER["false_easting",11500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28411"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=11500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28412 : Pulkovo 1942 / Gauss-Kruger zone 12 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28412,'EPSG',28412,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 12",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",69],PARAMETER["scale_factor",1],PARAMETER["false_easting",12500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28412"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=12500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28412,'EPSG',28412,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 12",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",69],PARAMETER["scale_factor",1],PARAMETER["false_easting",12500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28412"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=12500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28413 : Pulkovo 1942 / Gauss-Kruger zone 13 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28413,'EPSG',28413,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 13",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",13500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28413"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=13500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28413,'EPSG',28413,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 13",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",13500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28413"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=13500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28414 : Pulkovo 1942 / Gauss-Kruger zone 14 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28414,'EPSG',28414,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 14",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",14500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28414"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=14500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28414,'EPSG',28414,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 14",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",14500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28414"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=14500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28415 : Pulkovo 1942 / Gauss-Kruger zone 15 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28415,'EPSG',28415,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 15",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",15500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28415"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=15500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28415,'EPSG',28415,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 15",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",15500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28415"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=15500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28416 : Pulkovo 1942 / Gauss-Kruger zone 16 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28416,'EPSG',28416,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 16",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",16500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28416"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=16500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28416,'EPSG',28416,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 16",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",16500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28416"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=16500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28417 : Pulkovo 1942 / Gauss-Kruger zone 17 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28417,'EPSG',28417,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 17",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",17500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28417"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=17500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28417,'EPSG',28417,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 17",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",17500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28417"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=17500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28418 : Pulkovo 1942 / Gauss-Kruger zone 18 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28418,'EPSG',28418,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 18",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",18500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28418"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=18500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28418,'EPSG',28418,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 18",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",18500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28418"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=18500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28419 : Pulkovo 1942 / Gauss-Kruger zone 19 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28419,'EPSG',28419,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 19",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",19500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28419"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=19500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28419,'EPSG',28419,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 19",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",19500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28419"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=19500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28420 : Pulkovo 1942 / Gauss-Kruger zone 20 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28420,'EPSG',28420,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 20",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",20500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28420"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=20500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28420,'EPSG',28420,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 20",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",20500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28420"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=20500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28421 : Pulkovo 1942 / Gauss-Kruger zone 21 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28421,'EPSG',28421,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 21",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",21500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28421"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=21500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28421,'EPSG',28421,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 21",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",21500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28421"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=21500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28422 : Pulkovo 1942 / Gauss-Kruger zone 22 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28422,'EPSG',28422,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 22",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",22500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28422"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=22500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28422,'EPSG',28422,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 22",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",22500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28422"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=22500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28423 : Pulkovo 1942 / Gauss-Kruger zone 23 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28423,'EPSG',28423,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 23",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",23500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28423"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=23500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28423,'EPSG',28423,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 23",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",23500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28423"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=23500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28424 : Pulkovo 1942 / Gauss-Kruger zone 24 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28424,'EPSG',28424,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 24",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",1],PARAMETER["false_easting",24500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28424"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=24500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28424,'EPSG',28424,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 24",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",1],PARAMETER["false_easting",24500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28424"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=24500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28425 : Pulkovo 1942 / Gauss-Kruger zone 25 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28425,'EPSG',28425,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 25",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",147],PARAMETER["scale_factor",1],PARAMETER["false_easting",25500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28425"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=25500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28425,'EPSG',28425,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 25",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",147],PARAMETER["scale_factor",1],PARAMETER["false_easting",25500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28425"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=25500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28426 : Pulkovo 1942 / Gauss-Kruger zone 26 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28426,'EPSG',28426,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 26",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",153],PARAMETER["scale_factor",1],PARAMETER["false_easting",26500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28426"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=26500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28426,'EPSG',28426,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 26",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",153],PARAMETER["scale_factor",1],PARAMETER["false_easting",26500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28426"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=26500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28427 : Pulkovo 1942 / Gauss-Kruger zone 27 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28427,'EPSG',28427,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 27",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",159],PARAMETER["scale_factor",1],PARAMETER["false_easting",27500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28427"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=27500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28427,'EPSG',28427,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 27",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",159],PARAMETER["scale_factor",1],PARAMETER["false_easting",27500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28427"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=27500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28428 : Pulkovo 1942 / Gauss-Kruger zone 28 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28428,'EPSG',28428,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 28",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",1],PARAMETER["false_easting",28500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28428"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=28500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28428,'EPSG',28428,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 28",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",1],PARAMETER["false_easting",28500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28428"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=28500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28429 : Pulkovo 1942 / Gauss-Kruger zone 29 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28429,'EPSG',28429,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 29",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",1],PARAMETER["false_easting",29500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28429"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=29500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28429,'EPSG',28429,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 29",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",1],PARAMETER["false_easting",29500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28429"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=29500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28430 : Pulkovo 1942 / Gauss-Kruger zone 30 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28430,'EPSG',28430,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 30",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",1],PARAMETER["false_easting",30500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28430"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=30500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28430,'EPSG',28430,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 30",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",1],PARAMETER["false_easting",30500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28430"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=30500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28431 : Pulkovo 1942 / Gauss-Kruger zone 31 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28431,'EPSG',28431,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 31",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-177],PARAMETER["scale_factor",1],PARAMETER["false_easting",31500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28431"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=31500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28431,'EPSG',28431,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 31",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-177],PARAMETER["scale_factor",1],PARAMETER["false_easting",31500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28431"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=31500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28432 : Pulkovo 1942 / Gauss-Kruger zone 32 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28432,'EPSG',28432,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 32",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-171],PARAMETER["scale_factor",1],PARAMETER["false_easting",32500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28432"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=32500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28432,'EPSG',28432,'PROJCS["Pulkovo 1942 / Gauss-Kruger zone 32",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-171],PARAMETER["scale_factor",1],PARAMETER["false_easting",32500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28432"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=32500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28462 : Pulkovo 1942 / Gauss-Kruger 2N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28462,'EPSG',28462,'PROJCS["Pulkovo 1942 / Gauss-Kruger 2N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28462"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28462,'EPSG',28462,'PROJCS["Pulkovo 1942 / Gauss-Kruger 2N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28462"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28463 : Pulkovo 1942 / Gauss-Kruger 3N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28463,'EPSG',28463,'PROJCS["Pulkovo 1942 / Gauss-Kruger 3N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28463"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28463,'EPSG',28463,'PROJCS["Pulkovo 1942 / Gauss-Kruger 3N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28463"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28464 : Pulkovo 1942 / Gauss-Kruger 4N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28464,'EPSG',28464,'PROJCS["Pulkovo 1942 / Gauss-Kruger 4N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28464"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28464,'EPSG',28464,'PROJCS["Pulkovo 1942 / Gauss-Kruger 4N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28464"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28465 : Pulkovo 1942 / Gauss-Kruger 5N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28465,'EPSG',28465,'PROJCS["Pulkovo 1942 / Gauss-Kruger 5N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28465"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28465,'EPSG',28465,'PROJCS["Pulkovo 1942 / Gauss-Kruger 5N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28465"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28466 : Pulkovo 1942 / Gauss-Kruger 6N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28466,'EPSG',28466,'PROJCS["Pulkovo 1942 / Gauss-Kruger 6N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28466"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28466,'EPSG',28466,'PROJCS["Pulkovo 1942 / Gauss-Kruger 6N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28466"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28467 : Pulkovo 1942 / Gauss-Kruger 7N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28467,'EPSG',28467,'PROJCS["Pulkovo 1942 / Gauss-Kruger 7N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28467"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28467,'EPSG',28467,'PROJCS["Pulkovo 1942 / Gauss-Kruger 7N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28467"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28468 : Pulkovo 1942 / Gauss-Kruger 8N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28468,'EPSG',28468,'PROJCS["Pulkovo 1942 / Gauss-Kruger 8N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28468"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28468,'EPSG',28468,'PROJCS["Pulkovo 1942 / Gauss-Kruger 8N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28468"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28469 : Pulkovo 1942 / Gauss-Kruger 9N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28469,'EPSG',28469,'PROJCS["Pulkovo 1942 / Gauss-Kruger 9N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28469"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28469,'EPSG',28469,'PROJCS["Pulkovo 1942 / Gauss-Kruger 9N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28469"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28470 : Pulkovo 1942 / Gauss-Kruger 10N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28470,'EPSG',28470,'PROJCS["Pulkovo 1942 / Gauss-Kruger 10N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28470"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28470,'EPSG',28470,'PROJCS["Pulkovo 1942 / Gauss-Kruger 10N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28470"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28471 : Pulkovo 1942 / Gauss-Kruger 11N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28471,'EPSG',28471,'PROJCS["Pulkovo 1942 / Gauss-Kruger 11N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",63],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28471"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28471,'EPSG',28471,'PROJCS["Pulkovo 1942 / Gauss-Kruger 11N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",63],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28471"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28472 : Pulkovo 1942 / Gauss-Kruger 12N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28472,'EPSG',28472,'PROJCS["Pulkovo 1942 / Gauss-Kruger 12N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",69],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28472"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28472,'EPSG',28472,'PROJCS["Pulkovo 1942 / Gauss-Kruger 12N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",69],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28472"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28473 : Pulkovo 1942 / Gauss-Kruger 13N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28473,'EPSG',28473,'PROJCS["Pulkovo 1942 / Gauss-Kruger 13N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28473"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28473,'EPSG',28473,'PROJCS["Pulkovo 1942 / Gauss-Kruger 13N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28473"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28474 : Pulkovo 1942 / Gauss-Kruger 14N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28474,'EPSG',28474,'PROJCS["Pulkovo 1942 / Gauss-Kruger 14N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28474"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28474,'EPSG',28474,'PROJCS["Pulkovo 1942 / Gauss-Kruger 14N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28474"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28475 : Pulkovo 1942 / Gauss-Kruger 15N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28475,'EPSG',28475,'PROJCS["Pulkovo 1942 / Gauss-Kruger 15N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28475"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28475,'EPSG',28475,'PROJCS["Pulkovo 1942 / Gauss-Kruger 15N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28475"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28476 : Pulkovo 1942 / Gauss-Kruger 16N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28476,'EPSG',28476,'PROJCS["Pulkovo 1942 / Gauss-Kruger 16N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28476"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28476,'EPSG',28476,'PROJCS["Pulkovo 1942 / Gauss-Kruger 16N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28476"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28477 : Pulkovo 1942 / Gauss-Kruger 17N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28477,'EPSG',28477,'PROJCS["Pulkovo 1942 / Gauss-Kruger 17N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28477"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28477,'EPSG',28477,'PROJCS["Pulkovo 1942 / Gauss-Kruger 17N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28477"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28478 : Pulkovo 1942 / Gauss-Kruger 18N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28478,'EPSG',28478,'PROJCS["Pulkovo 1942 / Gauss-Kruger 18N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28478"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28478,'EPSG',28478,'PROJCS["Pulkovo 1942 / Gauss-Kruger 18N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28478"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28479 : Pulkovo 1942 / Gauss-Kruger 19N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28479,'EPSG',28479,'PROJCS["Pulkovo 1942 / Gauss-Kruger 19N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28479"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28479,'EPSG',28479,'PROJCS["Pulkovo 1942 / Gauss-Kruger 19N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28479"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28480 : Pulkovo 1942 / Gauss-Kruger 20N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28480,'EPSG',28480,'PROJCS["Pulkovo 1942 / Gauss-Kruger 20N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28480"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28480,'EPSG',28480,'PROJCS["Pulkovo 1942 / Gauss-Kruger 20N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28480"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28481 : Pulkovo 1942 / Gauss-Kruger 21N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28481,'EPSG',28481,'PROJCS["Pulkovo 1942 / Gauss-Kruger 21N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28481"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28481,'EPSG',28481,'PROJCS["Pulkovo 1942 / Gauss-Kruger 21N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28481"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28482 : Pulkovo 1942 / Gauss-Kruger 22N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28482,'EPSG',28482,'PROJCS["Pulkovo 1942 / Gauss-Kruger 22N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28482"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28482,'EPSG',28482,'PROJCS["Pulkovo 1942 / Gauss-Kruger 22N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28482"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28483 : Pulkovo 1942 / Gauss-Kruger 23N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28483,'EPSG',28483,'PROJCS["Pulkovo 1942 / Gauss-Kruger 23N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28483"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28483,'EPSG',28483,'PROJCS["Pulkovo 1942 / Gauss-Kruger 23N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28483"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28484 : Pulkovo 1942 / Gauss-Kruger 24N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28484,'EPSG',28484,'PROJCS["Pulkovo 1942 / Gauss-Kruger 24N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28484"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28484,'EPSG',28484,'PROJCS["Pulkovo 1942 / Gauss-Kruger 24N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28484"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28485 : Pulkovo 1942 / Gauss-Kruger 25N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28485,'EPSG',28485,'PROJCS["Pulkovo 1942 / Gauss-Kruger 25N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",147],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28485"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28485,'EPSG',28485,'PROJCS["Pulkovo 1942 / Gauss-Kruger 25N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",147],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28485"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28486 : Pulkovo 1942 / Gauss-Kruger 26N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28486,'EPSG',28486,'PROJCS["Pulkovo 1942 / Gauss-Kruger 26N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",153],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28486"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28486,'EPSG',28486,'PROJCS["Pulkovo 1942 / Gauss-Kruger 26N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",153],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28486"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28487 : Pulkovo 1942 / Gauss-Kruger 27N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28487,'EPSG',28487,'PROJCS["Pulkovo 1942 / Gauss-Kruger 27N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",159],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28487"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28487,'EPSG',28487,'PROJCS["Pulkovo 1942 / Gauss-Kruger 27N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",159],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28487"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28488 : Pulkovo 1942 / Gauss-Kruger 28N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28488,'EPSG',28488,'PROJCS["Pulkovo 1942 / Gauss-Kruger 28N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28488"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28488,'EPSG',28488,'PROJCS["Pulkovo 1942 / Gauss-Kruger 28N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28488"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28489 : Pulkovo 1942 / Gauss-Kruger 29N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28489,'EPSG',28489,'PROJCS["Pulkovo 1942 / Gauss-Kruger 29N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28489"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28489,'EPSG',28489,'PROJCS["Pulkovo 1942 / Gauss-Kruger 29N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28489"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28490 : Pulkovo 1942 / Gauss-Kruger 30N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28490,'EPSG',28490,'PROJCS["Pulkovo 1942 / Gauss-Kruger 30N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28490"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28490,'EPSG',28490,'PROJCS["Pulkovo 1942 / Gauss-Kruger 30N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28490"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28491 : Pulkovo 1942 / Gauss-Kruger 31N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28491,'EPSG',28491,'PROJCS["Pulkovo 1942 / Gauss-Kruger 31N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-177],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28491"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28491,'EPSG',28491,'PROJCS["Pulkovo 1942 / Gauss-Kruger 31N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-177],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28491"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28492 : Pulkovo 1942 / Gauss-Kruger 32N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28492,'EPSG',28492,'PROJCS["Pulkovo 1942 / Gauss-Kruger 32N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-171],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28492"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=500000 +y_0=0 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28492,'EPSG',28492,'PROJCS["Pulkovo 1942 / Gauss-Kruger 32N (deprecated)",GEOGCS["Pulkovo 1942",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY["EPSG","6284"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4284"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-171],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","28492"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=500000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs '); --- --- EPSG 28600 : Qatar 1974 / Qatar National Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28600,'EPSG',28600,'PROJCS["Qatar 1974 / Qatar National Grid",GEOGCS["Qatar 1974",DATUM["Qatar_1974",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6285"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4285"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",24.45],PARAMETER["central_meridian",51.21666666666667],PARAMETER["scale_factor",0.99999],PARAMETER["false_easting",200000],PARAMETER["false_northing",300000],AUTHORITY["EPSG","28600"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=24.45 +lon_0=51.21666666666667 +k=0.99999 +x_0=200000 +y_0=300000 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28600,'EPSG',28600,'PROJCS["Qatar 1974 / Qatar National Grid",GEOGCS["Qatar 1974",DATUM["Qatar_1974",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-128,-283,22,0,0,0,0],AUTHORITY["EPSG","6285"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4285"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",24.45],PARAMETER["central_meridian",51.21666666666667],PARAMETER["scale_factor",0.99999],PARAMETER["false_easting",200000],PARAMETER["false_northing",300000],AUTHORITY["EPSG","28600"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=24.45 +lon_0=51.21666666666667 +k=0.99999 +x_0=200000 +y_0=300000 +ellps=intl +towgs84=-128,-283,22,0,0,0,0 +units=m +no_defs '); --- --- EPSG 28991 : Amersfoort / RD Old --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28991,'EPSG',28991,'PROJCS["Amersfoort / RD Old",GEOGCS["Amersfoort",DATUM["Amersfoort",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6289"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4289"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",52.15616055555555],PARAMETER["central_meridian",5.38763888888889],PARAMETER["scale_factor",0.9999079],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","28991"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28991,'EPSG',28991,'PROJCS["Amersfoort / RD Old",GEOGCS["Amersfoort",DATUM["Amersfoort",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[565.417,50.3319,465.552,-0.398957,0.343988,-1.8774,4.0725],AUTHORITY["EPSG","6289"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4289"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",52.15616055555555],PARAMETER["central_meridian",5.38763888888889],PARAMETER["scale_factor",0.9999079],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","28991"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=0 +y_0=0 +ellps=bessel +towgs84=565.417,50.3319,465.552,-0.398957,0.343988,-1.8774,4.0725 +units=m +no_defs '); --- --- EPSG 28992 : Amersfoort / RD New --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28992,'EPSG',28992,'PROJCS["Amersfoort / RD New",GEOGCS["Amersfoort",DATUM["Amersfoort",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6289"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4289"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",52.15616055555555],PARAMETER["central_meridian",5.38763888888889],PARAMETER["scale_factor",0.9999079],PARAMETER["false_easting",155000],PARAMETER["false_northing",463000],AUTHORITY["EPSG","28992"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +towgs84=565.237,50.0087,465.658,-0.406857,0.350733,-1.87035,4.0812 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (28992,'EPSG',28992,'PROJCS["Amersfoort / RD New",GEOGCS["Amersfoort",DATUM["Amersfoort",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[565.417,50.3319,465.552,-0.398957,0.343988,-1.8774,4.0725],AUTHORITY["EPSG","6289"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4289"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",52.15616055555555],PARAMETER["central_meridian",5.38763888888889],PARAMETER["scale_factor",0.9999079],PARAMETER["false_easting",155000],PARAMETER["false_northing",463000],AUTHORITY["EPSG","28992"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +towgs84=565.417,50.3319,465.552,-0.398957,0.343988,-1.8774,4.0725 +units=m +no_defs '); --- --- EPSG 29100 : SAD69 / Brazil Polyconic (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29100,'EPSG',29100,'PROJCS["SAD69 / Brazil Polyconic (deprecated)",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967",6378160,298.247167427,AUTHORITY["EPSG","7036"]],AUTHORITY["EPSG","6291"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4291"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polyconic"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-54],PARAMETER["false_easting",5000000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29100"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=poly +lat_0=0 +lon_0=-54 +x_0=5000000 +y_0=10000000 +ellps=GRS67 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29100,'EPSG',29100,'PROJCS["SAD69 / Brazil Polyconic (deprecated)",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967",6378160,298.247167427,AUTHORITY["EPSG","7036"]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY["EPSG","6291"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4291"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polyconic"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-54],PARAMETER["false_easting",5000000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29100"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=poly +lat_0=0 +lon_0=-54 +x_0=5000000 +y_0=10000000 +ellps=GRS67 +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs '); --- --- EPSG 29101 : SAD69 / Brazil Polyconic --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29101,'EPSG',29101,'PROJCS["SAD69 / Brazil Polyconic",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967 Modified",6378160,298.25,AUTHORITY["EPSG","7050"]],AUTHORITY["EPSG","6618"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4618"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polyconic"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-54],PARAMETER["false_easting",5000000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29101"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=poly +lat_0=0 +lon_0=-54 +x_0=5000000 +y_0=10000000 +ellps=aust_SA +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29101,'EPSG',29101,'PROJCS["SAD69 / Brazil Polyconic",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967 Modified",6378160,298.25,AUTHORITY["EPSG","7050"]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY["EPSG","6618"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4618"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polyconic"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-54],PARAMETER["false_easting",5000000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29101"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=poly +lat_0=0 +lon_0=-54 +x_0=5000000 +y_0=10000000 +ellps=aust_SA +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs '); --- --- EPSG 29118 : SAD69 / UTM zone 18N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29118,'EPSG',29118,'PROJCS["SAD69 / UTM zone 18N (deprecated)",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967",6378160,298.247167427,AUTHORITY["EPSG","7036"]],AUTHORITY["EPSG","6291"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4291"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","29118"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +ellps=GRS67 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29118,'EPSG',29118,'PROJCS["SAD69 / UTM zone 18N (deprecated)",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967",6378160,298.247167427,AUTHORITY["EPSG","7036"]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY["EPSG","6291"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4291"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","29118"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +ellps=GRS67 +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs '); --- --- EPSG 29119 : SAD69 / UTM zone 19N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29119,'EPSG',29119,'PROJCS["SAD69 / UTM zone 19N (deprecated)",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967",6378160,298.247167427,AUTHORITY["EPSG","7036"]],AUTHORITY["EPSG","6291"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4291"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","29119"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +ellps=GRS67 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29119,'EPSG',29119,'PROJCS["SAD69 / UTM zone 19N (deprecated)",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967",6378160,298.247167427,AUTHORITY["EPSG","7036"]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY["EPSG","6291"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4291"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","29119"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +ellps=GRS67 +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs '); --- --- EPSG 29120 : SAD69 / UTM zone 20N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29120,'EPSG',29120,'PROJCS["SAD69 / UTM zone 20N (deprecated)",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967",6378160,298.247167427,AUTHORITY["EPSG","7036"]],AUTHORITY["EPSG","6291"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4291"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","29120"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=GRS67 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29120,'EPSG',29120,'PROJCS["SAD69 / UTM zone 20N (deprecated)",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967",6378160,298.247167427,AUTHORITY["EPSG","7036"]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY["EPSG","6291"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4291"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","29120"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=GRS67 +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs '); --- --- EPSG 29121 : SAD69 / UTM zone 21N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29121,'EPSG',29121,'PROJCS["SAD69 / UTM zone 21N (deprecated)",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967",6378160,298.247167427,AUTHORITY["EPSG","7036"]],AUTHORITY["EPSG","6291"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4291"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","29121"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +ellps=GRS67 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29121,'EPSG',29121,'PROJCS["SAD69 / UTM zone 21N (deprecated)",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967",6378160,298.247167427,AUTHORITY["EPSG","7036"]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY["EPSG","6291"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4291"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","29121"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +ellps=GRS67 +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs '); --- --- EPSG 29122 : SAD69 / UTM zone 22N (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29122,'EPSG',29122,'PROJCS["SAD69 / UTM zone 22N (deprecated)",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967",6378160,298.247167427,AUTHORITY["EPSG","7036"]],AUTHORITY["EPSG","6291"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4291"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","29122"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +ellps=GRS67 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29122,'EPSG',29122,'PROJCS["SAD69 / UTM zone 22N (deprecated)",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967",6378160,298.247167427,AUTHORITY["EPSG","7036"]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY["EPSG","6291"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4291"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","29122"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +ellps=GRS67 +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs '); --- --- EPSG 29168 : SAD69 / UTM zone 18N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29168,'EPSG',29168,'PROJCS["SAD69 / UTM zone 18N",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967 Modified",6378160,298.25,AUTHORITY["EPSG","7050"]],AUTHORITY["EPSG","6618"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4618"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","29168"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +ellps=aust_SA +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29168,'EPSG',29168,'PROJCS["SAD69 / UTM zone 18N",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967 Modified",6378160,298.25,AUTHORITY["EPSG","7050"]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY["EPSG","6618"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4618"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","29168"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +ellps=aust_SA +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs '); --- --- EPSG 29169 : SAD69 / UTM zone 19N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29169,'EPSG',29169,'PROJCS["SAD69 / UTM zone 19N",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967 Modified",6378160,298.25,AUTHORITY["EPSG","7050"]],AUTHORITY["EPSG","6618"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4618"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","29169"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +ellps=aust_SA +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29169,'EPSG',29169,'PROJCS["SAD69 / UTM zone 19N",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967 Modified",6378160,298.25,AUTHORITY["EPSG","7050"]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY["EPSG","6618"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4618"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","29169"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +ellps=aust_SA +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs '); --- --- EPSG 29170 : SAD69 / UTM zone 20N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29170,'EPSG',29170,'PROJCS["SAD69 / UTM zone 20N",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967 Modified",6378160,298.25,AUTHORITY["EPSG","7050"]],AUTHORITY["EPSG","6618"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4618"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","29170"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=aust_SA +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29170,'EPSG',29170,'PROJCS["SAD69 / UTM zone 20N",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967 Modified",6378160,298.25,AUTHORITY["EPSG","7050"]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY["EPSG","6618"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4618"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","29170"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=aust_SA +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs '); --- --- EPSG 29171 : SAD69 / UTM zone 21N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29171,'EPSG',29171,'PROJCS["SAD69 / UTM zone 21N",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967 Modified",6378160,298.25,AUTHORITY["EPSG","7050"]],AUTHORITY["EPSG","6618"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4618"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","29171"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +ellps=aust_SA +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29171,'EPSG',29171,'PROJCS["SAD69 / UTM zone 21N",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967 Modified",6378160,298.25,AUTHORITY["EPSG","7050"]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY["EPSG","6618"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4618"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","29171"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +ellps=aust_SA +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs '); --- --- EPSG 29172 : SAD69 / UTM zone 22N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29172,'EPSG',29172,'PROJCS["SAD69 / UTM zone 22N",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967 Modified",6378160,298.25,AUTHORITY["EPSG","7050"]],AUTHORITY["EPSG","6618"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4618"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","29172"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +ellps=aust_SA +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29172,'EPSG',29172,'PROJCS["SAD69 / UTM zone 22N",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967 Modified",6378160,298.25,AUTHORITY["EPSG","7050"]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY["EPSG","6618"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4618"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","29172"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +ellps=aust_SA +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs '); --- --- EPSG 29177 : SAD69 / UTM zone 17S (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29177,'EPSG',29177,'PROJCS["SAD69 / UTM zone 17S (deprecated)",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967",6378160,298.247167427,AUTHORITY["EPSG","7036"]],AUTHORITY["EPSG","6291"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4291"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29177"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +south +ellps=GRS67 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29177,'EPSG',29177,'PROJCS["SAD69 / UTM zone 17S (deprecated)",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967",6378160,298.247167427,AUTHORITY["EPSG","7036"]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY["EPSG","6291"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4291"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29177"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +south +ellps=GRS67 +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs '); --- --- EPSG 29178 : SAD69 / UTM zone 18S (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29178,'EPSG',29178,'PROJCS["SAD69 / UTM zone 18S (deprecated)",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967",6378160,298.247167427,AUTHORITY["EPSG","7036"]],AUTHORITY["EPSG","6291"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4291"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29178"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +south +ellps=GRS67 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29178,'EPSG',29178,'PROJCS["SAD69 / UTM zone 18S (deprecated)",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967",6378160,298.247167427,AUTHORITY["EPSG","7036"]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY["EPSG","6291"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4291"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29178"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +south +ellps=GRS67 +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs '); --- --- EPSG 29179 : SAD69 / UTM zone 19S (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29179,'EPSG',29179,'PROJCS["SAD69 / UTM zone 19S (deprecated)",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967",6378160,298.247167427,AUTHORITY["EPSG","7036"]],AUTHORITY["EPSG","6291"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4291"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29179"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +south +ellps=GRS67 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29179,'EPSG',29179,'PROJCS["SAD69 / UTM zone 19S (deprecated)",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967",6378160,298.247167427,AUTHORITY["EPSG","7036"]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY["EPSG","6291"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4291"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29179"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +south +ellps=GRS67 +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs '); --- --- EPSG 29180 : SAD69 / UTM zone 20S (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29180,'EPSG',29180,'PROJCS["SAD69 / UTM zone 20S (deprecated)",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967",6378160,298.247167427,AUTHORITY["EPSG","7036"]],AUTHORITY["EPSG","6291"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4291"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29180"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +south +ellps=GRS67 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29180,'EPSG',29180,'PROJCS["SAD69 / UTM zone 20S (deprecated)",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967",6378160,298.247167427,AUTHORITY["EPSG","7036"]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY["EPSG","6291"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4291"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29180"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +south +ellps=GRS67 +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs '); --- --- EPSG 29181 : SAD69 / UTM zone 21S (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29181,'EPSG',29181,'PROJCS["SAD69 / UTM zone 21S (deprecated)",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967",6378160,298.247167427,AUTHORITY["EPSG","7036"]],AUTHORITY["EPSG","6291"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4291"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29181"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +south +ellps=GRS67 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29181,'EPSG',29181,'PROJCS["SAD69 / UTM zone 21S (deprecated)",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967",6378160,298.247167427,AUTHORITY["EPSG","7036"]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY["EPSG","6291"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4291"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29181"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +south +ellps=GRS67 +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs '); --- --- EPSG 29182 : SAD69 / UTM zone 22S (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29182,'EPSG',29182,'PROJCS["SAD69 / UTM zone 22S (deprecated)",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967",6378160,298.247167427,AUTHORITY["EPSG","7036"]],AUTHORITY["EPSG","6291"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4291"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29182"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +south +ellps=GRS67 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29182,'EPSG',29182,'PROJCS["SAD69 / UTM zone 22S (deprecated)",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967",6378160,298.247167427,AUTHORITY["EPSG","7036"]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY["EPSG","6291"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4291"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29182"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +south +ellps=GRS67 +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs '); --- --- EPSG 29183 : SAD69 / UTM zone 23S (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29183,'EPSG',29183,'PROJCS["SAD69 / UTM zone 23S (deprecated)",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967",6378160,298.247167427,AUTHORITY["EPSG","7036"]],AUTHORITY["EPSG","6291"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4291"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29183"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=23 +south +ellps=GRS67 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29183,'EPSG',29183,'PROJCS["SAD69 / UTM zone 23S (deprecated)",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967",6378160,298.247167427,AUTHORITY["EPSG","7036"]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY["EPSG","6291"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4291"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29183"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=23 +south +ellps=GRS67 +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs '); --- --- EPSG 29184 : SAD69 / UTM zone 24S (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29184,'EPSG',29184,'PROJCS["SAD69 / UTM zone 24S (deprecated)",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967",6378160,298.247167427,AUTHORITY["EPSG","7036"]],AUTHORITY["EPSG","6291"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4291"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29184"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=24 +south +ellps=GRS67 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29184,'EPSG',29184,'PROJCS["SAD69 / UTM zone 24S (deprecated)",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967",6378160,298.247167427,AUTHORITY["EPSG","7036"]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY["EPSG","6291"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4291"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29184"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=24 +south +ellps=GRS67 +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs '); --- --- EPSG 29185 : SAD69 / UTM zone 25S (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29185,'EPSG',29185,'PROJCS["SAD69 / UTM zone 25S (deprecated)",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967",6378160,298.247167427,AUTHORITY["EPSG","7036"]],AUTHORITY["EPSG","6291"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4291"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29185"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=25 +south +ellps=GRS67 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29185,'EPSG',29185,'PROJCS["SAD69 / UTM zone 25S (deprecated)",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967",6378160,298.247167427,AUTHORITY["EPSG","7036"]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY["EPSG","6291"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4291"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29185"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=25 +south +ellps=GRS67 +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs '); --- --- EPSG 29187 : SAD69 / UTM zone 17S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29187,'EPSG',29187,'PROJCS["SAD69 / UTM zone 17S",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967 Modified",6378160,298.25,AUTHORITY["EPSG","7050"]],AUTHORITY["EPSG","6618"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4618"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29187"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +south +ellps=aust_SA +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29187,'EPSG',29187,'PROJCS["SAD69 / UTM zone 17S",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967 Modified",6378160,298.25,AUTHORITY["EPSG","7050"]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY["EPSG","6618"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4618"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29187"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +south +ellps=aust_SA +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs '); --- --- EPSG 29188 : SAD69 / UTM zone 18S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29188,'EPSG',29188,'PROJCS["SAD69 / UTM zone 18S",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967 Modified",6378160,298.25,AUTHORITY["EPSG","7050"]],AUTHORITY["EPSG","6618"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4618"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29188"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +south +ellps=aust_SA +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29188,'EPSG',29188,'PROJCS["SAD69 / UTM zone 18S",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967 Modified",6378160,298.25,AUTHORITY["EPSG","7050"]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY["EPSG","6618"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4618"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29188"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +south +ellps=aust_SA +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs '); --- --- EPSG 29189 : SAD69 / UTM zone 19S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29189,'EPSG',29189,'PROJCS["SAD69 / UTM zone 19S",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967 Modified",6378160,298.25,AUTHORITY["EPSG","7050"]],AUTHORITY["EPSG","6618"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4618"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29189"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +south +ellps=aust_SA +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29189,'EPSG',29189,'PROJCS["SAD69 / UTM zone 19S",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967 Modified",6378160,298.25,AUTHORITY["EPSG","7050"]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY["EPSG","6618"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4618"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29189"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +south +ellps=aust_SA +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs '); --- --- EPSG 29190 : SAD69 / UTM zone 20S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29190,'EPSG',29190,'PROJCS["SAD69 / UTM zone 20S",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967 Modified",6378160,298.25,AUTHORITY["EPSG","7050"]],AUTHORITY["EPSG","6618"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4618"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29190"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +south +ellps=aust_SA +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29190,'EPSG',29190,'PROJCS["SAD69 / UTM zone 20S",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967 Modified",6378160,298.25,AUTHORITY["EPSG","7050"]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY["EPSG","6618"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4618"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29190"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +south +ellps=aust_SA +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs '); --- --- EPSG 29191 : SAD69 / UTM zone 21S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29191,'EPSG',29191,'PROJCS["SAD69 / UTM zone 21S",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967 Modified",6378160,298.25,AUTHORITY["EPSG","7050"]],AUTHORITY["EPSG","6618"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4618"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29191"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +south +ellps=aust_SA +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29191,'EPSG',29191,'PROJCS["SAD69 / UTM zone 21S",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967 Modified",6378160,298.25,AUTHORITY["EPSG","7050"]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY["EPSG","6618"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4618"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29191"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +south +ellps=aust_SA +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs '); --- --- EPSG 29192 : SAD69 / UTM zone 22S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29192,'EPSG',29192,'PROJCS["SAD69 / UTM zone 22S",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967 Modified",6378160,298.25,AUTHORITY["EPSG","7050"]],AUTHORITY["EPSG","6618"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4618"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29192"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +south +ellps=aust_SA +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29192,'EPSG',29192,'PROJCS["SAD69 / UTM zone 22S",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967 Modified",6378160,298.25,AUTHORITY["EPSG","7050"]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY["EPSG","6618"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4618"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29192"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +south +ellps=aust_SA +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs '); --- --- EPSG 29193 : SAD69 / UTM zone 23S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29193,'EPSG',29193,'PROJCS["SAD69 / UTM zone 23S",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967 Modified",6378160,298.25,AUTHORITY["EPSG","7050"]],AUTHORITY["EPSG","6618"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4618"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29193"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=23 +south +ellps=aust_SA +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29193,'EPSG',29193,'PROJCS["SAD69 / UTM zone 23S",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967 Modified",6378160,298.25,AUTHORITY["EPSG","7050"]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY["EPSG","6618"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4618"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29193"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=23 +south +ellps=aust_SA +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs '); --- --- EPSG 29194 : SAD69 / UTM zone 24S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29194,'EPSG',29194,'PROJCS["SAD69 / UTM zone 24S",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967 Modified",6378160,298.25,AUTHORITY["EPSG","7050"]],AUTHORITY["EPSG","6618"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4618"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29194"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=24 +south +ellps=aust_SA +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29194,'EPSG',29194,'PROJCS["SAD69 / UTM zone 24S",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967 Modified",6378160,298.25,AUTHORITY["EPSG","7050"]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY["EPSG","6618"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4618"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29194"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=24 +south +ellps=aust_SA +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs '); --- --- EPSG 29195 : SAD69 / UTM zone 25S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29195,'EPSG',29195,'PROJCS["SAD69 / UTM zone 25S",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967 Modified",6378160,298.25,AUTHORITY["EPSG","7050"]],AUTHORITY["EPSG","6618"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4618"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29195"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=25 +south +ellps=aust_SA +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29195,'EPSG',29195,'PROJCS["SAD69 / UTM zone 25S",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967 Modified",6378160,298.25,AUTHORITY["EPSG","7050"]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY["EPSG","6618"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4618"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29195"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=25 +south +ellps=aust_SA +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs '); --- --- EPSG 29220 : Sapper Hill 1943 / UTM zone 20S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29220,'EPSG',29220,'PROJCS["Sapper Hill 1943 / UTM zone 20S",GEOGCS["Sapper Hill 1943",DATUM["Sapper_Hill_1943",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-355,21,72,0,0,0,0],AUTHORITY["EPSG","6292"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4292"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29220"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +south +ellps=intl +towgs84=-355,21,72,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29220,'EPSG',29220,'PROJCS["Sapper Hill 1943 / UTM zone 20S",GEOGCS["Sapper Hill 1943",DATUM["Sapper_Hill_1943",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-355,21,72,0,0,0,0],AUTHORITY["EPSG","6292"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4292"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29220"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +south +ellps=intl +towgs84=-355,21,72,0,0,0,0 +units=m +no_defs '); --- --- EPSG 29221 : Sapper Hill 1943 / UTM zone 21S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29221,'EPSG',29221,'PROJCS["Sapper Hill 1943 / UTM zone 21S",GEOGCS["Sapper Hill 1943",DATUM["Sapper_Hill_1943",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-355,21,72,0,0,0,0],AUTHORITY["EPSG","6292"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4292"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29221"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +south +ellps=intl +towgs84=-355,21,72,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29221,'EPSG',29221,'PROJCS["Sapper Hill 1943 / UTM zone 21S",GEOGCS["Sapper Hill 1943",DATUM["Sapper_Hill_1943",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-355,21,72,0,0,0,0],AUTHORITY["EPSG","6292"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4292"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29221"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +south +ellps=intl +towgs84=-355,21,72,0,0,0,0 +units=m +no_defs '); --- --- EPSG 29333 : Schwarzeck / UTM zone 33S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29333,'EPSG',29333,'PROJCS["Schwarzeck / UTM zone 33S",GEOGCS["Schwarzeck",DATUM["Schwarzeck",SPHEROID["Bessel Namibia (GLM)",6377483.865280419,299.1528128,AUTHORITY["EPSG","7046"]],AUTHORITY["EPSG","6293"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4293"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29333"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=33 +south +ellps=bess_nam +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29333,'EPSG',29333,'PROJCS["Schwarzeck / UTM zone 33S",GEOGCS["Schwarzeck",DATUM["Schwarzeck",SPHEROID["Bessel Namibia (GLM)",6377483.865280419,299.1528128,AUTHORITY["EPSG","7046"]],TOWGS84[616,97,-251,0,0,0,0],AUTHORITY["EPSG","6293"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4293"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29333"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=33 +south +ellps=bess_nam +towgs84=616,97,-251,0,0,0,0 +units=m +no_defs '); --- --- EPSG 29371 : Schwarzeck / Lo22/11 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29371,'EPSG',29371,'PROJCS["Schwarzeck / Lo22/11",GEOGCS["Schwarzeck",DATUM["Schwarzeck",SPHEROID["Bessel Namibia (GLM)",6377483.865280419,299.1528128,AUTHORITY["EPSG","7046"]],AUTHORITY["EPSG","6293"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4293"]],UNIT["German legal metre",1.0000135965,AUTHORITY["EPSG","9031"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",-22],PARAMETER["central_meridian",11],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","29371"],AXIS["Y",WEST],AXIS["X",SOUTH]]',''); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29371,'EPSG',29371,'PROJCS["Schwarzeck / Lo22/11",GEOGCS["Schwarzeck",DATUM["Schwarzeck",SPHEROID["Bessel Namibia (GLM)",6377483.865280419,299.1528128,AUTHORITY["EPSG","7046"]],TOWGS84[616,97,-251,0,0,0,0],AUTHORITY["EPSG","6293"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4293"]],UNIT["German legal metre",1.0000135965,AUTHORITY["EPSG","9031"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",-22],PARAMETER["central_meridian",11],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","29371"],AXIS["Y",WEST],AXIS["X",SOUTH]]','+proj=tmerc +lat_0=-22 +lon_0=11 +k=1 +x_0=0 +y_0=0 +axis=wsu +ellps=bess_nam +towgs84=616,97,-251,0,0,0,0 +to_meter=1.0000135965 +no_defs '); --- --- EPSG 29373 : Schwarzeck / Lo22/13 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29373,'EPSG',29373,'PROJCS["Schwarzeck / Lo22/13",GEOGCS["Schwarzeck",DATUM["Schwarzeck",SPHEROID["Bessel Namibia (GLM)",6377483.865280419,299.1528128,AUTHORITY["EPSG","7046"]],AUTHORITY["EPSG","6293"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4293"]],UNIT["German legal metre",1.0000135965,AUTHORITY["EPSG","9031"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",-22],PARAMETER["central_meridian",13],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","29373"],AXIS["Y",WEST],AXIS["X",SOUTH]]',''); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29373,'EPSG',29373,'PROJCS["Schwarzeck / Lo22/13",GEOGCS["Schwarzeck",DATUM["Schwarzeck",SPHEROID["Bessel Namibia (GLM)",6377483.865280419,299.1528128,AUTHORITY["EPSG","7046"]],TOWGS84[616,97,-251,0,0,0,0],AUTHORITY["EPSG","6293"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4293"]],UNIT["German legal metre",1.0000135965,AUTHORITY["EPSG","9031"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",-22],PARAMETER["central_meridian",13],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","29373"],AXIS["Y",WEST],AXIS["X",SOUTH]]','+proj=tmerc +lat_0=-22 +lon_0=13 +k=1 +x_0=0 +y_0=0 +axis=wsu +ellps=bess_nam +towgs84=616,97,-251,0,0,0,0 +to_meter=1.0000135965 +no_defs '); --- --- EPSG 29375 : Schwarzeck / Lo22/15 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29375,'EPSG',29375,'PROJCS["Schwarzeck / Lo22/15",GEOGCS["Schwarzeck",DATUM["Schwarzeck",SPHEROID["Bessel Namibia (GLM)",6377483.865280419,299.1528128,AUTHORITY["EPSG","7046"]],AUTHORITY["EPSG","6293"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4293"]],UNIT["German legal metre",1.0000135965,AUTHORITY["EPSG","9031"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",-22],PARAMETER["central_meridian",15],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","29375"],AXIS["Y",WEST],AXIS["X",SOUTH]]',''); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29375,'EPSG',29375,'PROJCS["Schwarzeck / Lo22/15",GEOGCS["Schwarzeck",DATUM["Schwarzeck",SPHEROID["Bessel Namibia (GLM)",6377483.865280419,299.1528128,AUTHORITY["EPSG","7046"]],TOWGS84[616,97,-251,0,0,0,0],AUTHORITY["EPSG","6293"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4293"]],UNIT["German legal metre",1.0000135965,AUTHORITY["EPSG","9031"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",-22],PARAMETER["central_meridian",15],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","29375"],AXIS["Y",WEST],AXIS["X",SOUTH]]','+proj=tmerc +lat_0=-22 +lon_0=15 +k=1 +x_0=0 +y_0=0 +axis=wsu +ellps=bess_nam +towgs84=616,97,-251,0,0,0,0 +to_meter=1.0000135965 +no_defs '); --- --- EPSG 29377 : Schwarzeck / Lo22/17 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29377,'EPSG',29377,'PROJCS["Schwarzeck / Lo22/17",GEOGCS["Schwarzeck",DATUM["Schwarzeck",SPHEROID["Bessel Namibia (GLM)",6377483.865280419,299.1528128,AUTHORITY["EPSG","7046"]],AUTHORITY["EPSG","6293"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4293"]],UNIT["German legal metre",1.0000135965,AUTHORITY["EPSG","9031"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",-22],PARAMETER["central_meridian",17],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","29377"],AXIS["Y",WEST],AXIS["X",SOUTH]]',''); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29377,'EPSG',29377,'PROJCS["Schwarzeck / Lo22/17",GEOGCS["Schwarzeck",DATUM["Schwarzeck",SPHEROID["Bessel Namibia (GLM)",6377483.865280419,299.1528128,AUTHORITY["EPSG","7046"]],TOWGS84[616,97,-251,0,0,0,0],AUTHORITY["EPSG","6293"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4293"]],UNIT["German legal metre",1.0000135965,AUTHORITY["EPSG","9031"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",-22],PARAMETER["central_meridian",17],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","29377"],AXIS["Y",WEST],AXIS["X",SOUTH]]','+proj=tmerc +lat_0=-22 +lon_0=17 +k=1 +x_0=0 +y_0=0 +axis=wsu +ellps=bess_nam +towgs84=616,97,-251,0,0,0,0 +to_meter=1.0000135965 +no_defs '); --- --- EPSG 29379 : Schwarzeck / Lo22/19 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29379,'EPSG',29379,'PROJCS["Schwarzeck / Lo22/19",GEOGCS["Schwarzeck",DATUM["Schwarzeck",SPHEROID["Bessel Namibia (GLM)",6377483.865280419,299.1528128,AUTHORITY["EPSG","7046"]],AUTHORITY["EPSG","6293"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4293"]],UNIT["German legal metre",1.0000135965,AUTHORITY["EPSG","9031"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",-22],PARAMETER["central_meridian",19],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","29379"],AXIS["Y",WEST],AXIS["X",SOUTH]]',''); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29379,'EPSG',29379,'PROJCS["Schwarzeck / Lo22/19",GEOGCS["Schwarzeck",DATUM["Schwarzeck",SPHEROID["Bessel Namibia (GLM)",6377483.865280419,299.1528128,AUTHORITY["EPSG","7046"]],TOWGS84[616,97,-251,0,0,0,0],AUTHORITY["EPSG","6293"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4293"]],UNIT["German legal metre",1.0000135965,AUTHORITY["EPSG","9031"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",-22],PARAMETER["central_meridian",19],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","29379"],AXIS["Y",WEST],AXIS["X",SOUTH]]','+proj=tmerc +lat_0=-22 +lon_0=19 +k=1 +x_0=0 +y_0=0 +axis=wsu +ellps=bess_nam +towgs84=616,97,-251,0,0,0,0 +to_meter=1.0000135965 +no_defs '); --- --- EPSG 29381 : Schwarzeck / Lo22/21 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29381,'EPSG',29381,'PROJCS["Schwarzeck / Lo22/21",GEOGCS["Schwarzeck",DATUM["Schwarzeck",SPHEROID["Bessel Namibia (GLM)",6377483.865280419,299.1528128,AUTHORITY["EPSG","7046"]],AUTHORITY["EPSG","6293"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4293"]],UNIT["German legal metre",1.0000135965,AUTHORITY["EPSG","9031"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",-22],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","29381"],AXIS["Y",WEST],AXIS["X",SOUTH]]',''); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29381,'EPSG',29381,'PROJCS["Schwarzeck / Lo22/21",GEOGCS["Schwarzeck",DATUM["Schwarzeck",SPHEROID["Bessel Namibia (GLM)",6377483.865280419,299.1528128,AUTHORITY["EPSG","7046"]],TOWGS84[616,97,-251,0,0,0,0],AUTHORITY["EPSG","6293"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4293"]],UNIT["German legal metre",1.0000135965,AUTHORITY["EPSG","9031"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",-22],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","29381"],AXIS["Y",WEST],AXIS["X",SOUTH]]','+proj=tmerc +lat_0=-22 +lon_0=21 +k=1 +x_0=0 +y_0=0 +axis=wsu +ellps=bess_nam +towgs84=616,97,-251,0,0,0,0 +to_meter=1.0000135965 +no_defs '); --- --- EPSG 29383 : Schwarzeck / Lo22/23 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29383,'EPSG',29383,'PROJCS["Schwarzeck / Lo22/23",GEOGCS["Schwarzeck",DATUM["Schwarzeck",SPHEROID["Bessel Namibia (GLM)",6377483.865280419,299.1528128,AUTHORITY["EPSG","7046"]],AUTHORITY["EPSG","6293"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4293"]],UNIT["German legal metre",1.0000135965,AUTHORITY["EPSG","9031"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",-22],PARAMETER["central_meridian",23],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","29383"],AXIS["Y",WEST],AXIS["X",SOUTH]]',''); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29383,'EPSG',29383,'PROJCS["Schwarzeck / Lo22/23",GEOGCS["Schwarzeck",DATUM["Schwarzeck",SPHEROID["Bessel Namibia (GLM)",6377483.865280419,299.1528128,AUTHORITY["EPSG","7046"]],TOWGS84[616,97,-251,0,0,0,0],AUTHORITY["EPSG","6293"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4293"]],UNIT["German legal metre",1.0000135965,AUTHORITY["EPSG","9031"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",-22],PARAMETER["central_meridian",23],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","29383"],AXIS["Y",WEST],AXIS["X",SOUTH]]','+proj=tmerc +lat_0=-22 +lon_0=23 +k=1 +x_0=0 +y_0=0 +axis=wsu +ellps=bess_nam +towgs84=616,97,-251,0,0,0,0 +to_meter=1.0000135965 +no_defs '); --- --- EPSG 29385 : Schwarzeck / Lo22/25 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29385,'EPSG',29385,'PROJCS["Schwarzeck / Lo22/25",GEOGCS["Schwarzeck",DATUM["Schwarzeck",SPHEROID["Bessel Namibia (GLM)",6377483.865280419,299.1528128,AUTHORITY["EPSG","7046"]],AUTHORITY["EPSG","6293"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4293"]],UNIT["German legal metre",1.0000135965,AUTHORITY["EPSG","9031"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",-22],PARAMETER["central_meridian",25],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","29385"],AXIS["Y",WEST],AXIS["X",SOUTH]]',''); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29385,'EPSG',29385,'PROJCS["Schwarzeck / Lo22/25",GEOGCS["Schwarzeck",DATUM["Schwarzeck",SPHEROID["Bessel Namibia (GLM)",6377483.865280419,299.1528128,AUTHORITY["EPSG","7046"]],TOWGS84[616,97,-251,0,0,0,0],AUTHORITY["EPSG","6293"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4293"]],UNIT["German legal metre",1.0000135965,AUTHORITY["EPSG","9031"]],PROJECTION["Transverse_Mercator_South_Orientated"],PARAMETER["latitude_of_origin",-22],PARAMETER["central_meridian",25],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","29385"],AXIS["Y",WEST],AXIS["X",SOUTH]]','+proj=tmerc +lat_0=-22 +lon_0=25 +k=1 +x_0=0 +y_0=0 +axis=wsu +ellps=bess_nam +towgs84=616,97,-251,0,0,0,0 +to_meter=1.0000135965 +no_defs '); --- --- EPSG 29635 : Sudan / UTM zone 35N (deprecated) --- @@ -12478,2135 +14190,2135 @@ --- --- EPSG 29700 : Tananarive (Paris) / Laborde Grid (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29700,'EPSG',29700,'PROJCS["Tananarive (Paris) / Laborde Grid (deprecated)",GEOGCS["Tananarive (Paris)",DATUM["Tananarive_1925_Paris",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-189,-242,-91,0,0,0,0],AUTHORITY["EPSG","6810"]],PRIMEM["Paris",2.33722917,AUTHORITY["EPSG","8903"]],UNIT["grad",0.01570796326794897,AUTHORITY["EPSG","9105"]],AUTHORITY["EPSG","4810"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",-21],PARAMETER["longitude_of_center",49],PARAMETER["azimuth",21],PARAMETER["rectified_grid_angle",21],PARAMETER["scale_factor",0.9995],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","29700"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=omerc +lat_0=-18.9 +lonc=44.10000000000001 +alpha=18.9 +k=0.9995000000000001 +x_0=400000 +y_0=800000 +ellps=intl +towgs84=-189,-242,-91,0,0,0,0 +pm=paris +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29700,'EPSG',29700,'PROJCS["Tananarive (Paris) / Laborde Grid (deprecated)",GEOGCS["Tananarive (Paris)",DATUM["Tananarive_1925_Paris",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-189,-242,-91,0,0,0,0],AUTHORITY["EPSG","6810"]],PRIMEM["Paris",2.33722917,AUTHORITY["EPSG","8903"]],UNIT["grad",0.01570796326794897,AUTHORITY["EPSG","9105"]],AUTHORITY["EPSG","4810"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",-21],PARAMETER["longitude_of_center",49],PARAMETER["azimuth",21],PARAMETER["rectified_grid_angle",21],PARAMETER["scale_factor",0.9995],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","29700"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=omerc +lat_0=-18.9 +lonc=44.10000000000001 +alpha=18.9 +k=0.9995000000000001 +x_0=400000 +y_0=800000 +gamma=18.9 +ellps=intl +towgs84=-189,-242,-91,0,0,0,0 +pm=paris +units=m +no_defs '); --- --- EPSG 29701 : Tananarive (Paris) / Laborde Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29701,'EPSG',29701,'PROJCS["Tananarive (Paris) / Laborde Grid",GEOGCS["Tananarive (Paris)",DATUM["Tananarive_1925_Paris",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-189,-242,-91,0,0,0,0],AUTHORITY["EPSG","6810"]],PRIMEM["Paris",2.33722917,AUTHORITY["EPSG","8903"]],UNIT["grad",0.01570796326794897,AUTHORITY["EPSG","9105"]],AUTHORITY["EPSG","4810"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Laborde_Oblique_Mercator"],PARAMETER["latitude_of_center",-21],PARAMETER["longitude_of_center",49],PARAMETER["azimuth",21],PARAMETER["rectified_grid_angle",100],PARAMETER["scale_factor",0.9995],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","29701"],AXIS["Y",EAST],AXIS["X",NORTH]]',''); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29701,'EPSG',29701,'PROJCS["Tananarive (Paris) / Laborde Grid",GEOGCS["Tananarive (Paris)",DATUM["Tananarive_1925_Paris",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-189,-242,-91,0,0,0,0],AUTHORITY["EPSG","6810"]],PRIMEM["Paris",2.33722917,AUTHORITY["EPSG","8903"]],UNIT["grad",0.01570796326794897,AUTHORITY["EPSG","9105"]],AUTHORITY["EPSG","4810"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Laborde_Oblique_Mercator"],PARAMETER["latitude_of_center",-21],PARAMETER["longitude_of_center",49],PARAMETER["azimuth",21],PARAMETER["rectified_grid_angle",100],PARAMETER["scale_factor",0.9995],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","29701"],AXIS["X",NORTH],AXIS["Y",EAST]]',''); --- --- EPSG 29702 : Tananarive (Paris) / Laborde Grid approximation --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29702,'EPSG',29702,'PROJCS["Tananarive (Paris) / Laborde Grid approximation",GEOGCS["Tananarive (Paris)",DATUM["Tananarive_1925_Paris",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-189,-242,-91,0,0,0,0],AUTHORITY["EPSG","6810"]],PRIMEM["Paris",2.33722917,AUTHORITY["EPSG","8903"]],UNIT["grad",0.01570796326794897,AUTHORITY["EPSG","9105"]],AUTHORITY["EPSG","4810"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",-21],PARAMETER["longitude_of_center",49],PARAMETER["azimuth",21],PARAMETER["rectified_grid_angle",21],PARAMETER["scale_factor",0.9995],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","29702"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=omerc +lat_0=-18.9 +lonc=44.10000000000001 +alpha=18.9 +k=0.9995000000000001 +x_0=400000 +y_0=800000 +ellps=intl +towgs84=-189,-242,-91,0,0,0,0 +pm=paris +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29702,'EPSG',29702,'PROJCS["Tananarive (Paris) / Laborde Grid approximation",GEOGCS["Tananarive (Paris)",DATUM["Tananarive_1925_Paris",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-189,-242,-91,0,0,0,0],AUTHORITY["EPSG","6810"]],PRIMEM["Paris",2.33722917,AUTHORITY["EPSG","8903"]],UNIT["grad",0.01570796326794897,AUTHORITY["EPSG","9105"]],AUTHORITY["EPSG","4810"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",-21],PARAMETER["longitude_of_center",49],PARAMETER["azimuth",21],PARAMETER["rectified_grid_angle",21],PARAMETER["scale_factor",0.9995],PARAMETER["false_easting",400000],PARAMETER["false_northing",800000],AUTHORITY["EPSG","29702"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=omerc +lat_0=-18.9 +lonc=44.10000000000001 +alpha=18.9 +k=0.9995000000000001 +x_0=400000 +y_0=800000 +gamma=18.9 +ellps=intl +towgs84=-189,-242,-91,0,0,0,0 +pm=paris +units=m +no_defs '); --- --- EPSG 29738 : Tananarive / UTM zone 38S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29738,'EPSG',29738,'PROJCS["Tananarive / UTM zone 38S",GEOGCS["Tananarive",DATUM["Tananarive_1925",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-189,-242,-91,0,0,0,0],AUTHORITY["EPSG","6297"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4297"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29738"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +south +ellps=intl +towgs84=-189,-242,-91,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29738,'EPSG',29738,'PROJCS["Tananarive / UTM zone 38S",GEOGCS["Tananarive",DATUM["Tananarive_1925",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-189,-242,-91,0,0,0,0],AUTHORITY["EPSG","6297"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4297"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29738"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +south +ellps=intl +towgs84=-189,-242,-91,0,0,0,0 +units=m +no_defs '); --- --- EPSG 29739 : Tananarive / UTM zone 39S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29739,'EPSG',29739,'PROJCS["Tananarive / UTM zone 39S",GEOGCS["Tananarive",DATUM["Tananarive_1925",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-189,-242,-91,0,0,0,0],AUTHORITY["EPSG","6297"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4297"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29739"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=39 +south +ellps=intl +towgs84=-189,-242,-91,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29739,'EPSG',29739,'PROJCS["Tananarive / UTM zone 39S",GEOGCS["Tananarive",DATUM["Tananarive_1925",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-189,-242,-91,0,0,0,0],AUTHORITY["EPSG","6297"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4297"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29739"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=39 +south +ellps=intl +towgs84=-189,-242,-91,0,0,0,0 +units=m +no_defs '); --- --- EPSG 29849 : Timbalai 1948 / UTM zone 49N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29849,'EPSG',29849,'PROJCS["Timbalai 1948 / UTM zone 49N",GEOGCS["Timbalai 1948",DATUM["Timbalai_1948",SPHEROID["Everest 1830 (1967 Definition)",6377298.556,300.8017,AUTHORITY["EPSG","7016"]],AUTHORITY["EPSG","6298"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4298"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","29849"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=49 +ellps=evrstSS +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29849,'EPSG',29849,'PROJCS["Timbalai 1948 / UTM zone 49N",GEOGCS["Timbalai 1948",DATUM["Timbalai_1948",SPHEROID["Everest 1830 (1967 Definition)",6377298.556,300.8017,AUTHORITY["EPSG","7016"]],TOWGS84[-533.4,669.2,-52.5,0,0,4.28,9.4],AUTHORITY["EPSG","6298"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4298"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","29849"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=49 +ellps=evrstSS +towgs84=-533.4,669.2,-52.5,0,0,4.28,9.4 +units=m +no_defs '); --- --- EPSG 29850 : Timbalai 1948 / UTM zone 50N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29850,'EPSG',29850,'PROJCS["Timbalai 1948 / UTM zone 50N",GEOGCS["Timbalai 1948",DATUM["Timbalai_1948",SPHEROID["Everest 1830 (1967 Definition)",6377298.556,300.8017,AUTHORITY["EPSG","7016"]],AUTHORITY["EPSG","6298"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4298"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],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],AUTHORITY["EPSG","29850"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=50 +ellps=evrstSS +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29850,'EPSG',29850,'PROJCS["Timbalai 1948 / UTM zone 50N",GEOGCS["Timbalai 1948",DATUM["Timbalai_1948",SPHEROID["Everest 1830 (1967 Definition)",6377298.556,300.8017,AUTHORITY["EPSG","7016"]],TOWGS84[-533.4,669.2,-52.5,0,0,4.28,9.4],AUTHORITY["EPSG","6298"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4298"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],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],AUTHORITY["EPSG","29850"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=50 +ellps=evrstSS +towgs84=-533.4,669.2,-52.5,0,0,4.28,9.4 +units=m +no_defs '); --- --- EPSG 29871 : Timbalai 1948 / RSO Borneo (ch) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29871,'EPSG',29871,'PROJCS["Timbalai 1948 / RSO Borneo (ch)",GEOGCS["Timbalai 1948",DATUM["Timbalai_1948",SPHEROID["Everest 1830 (1967 Definition)",6377298.556,300.8017,AUTHORITY["EPSG","7016"]],AUTHORITY["EPSG","6298"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4298"]],UNIT["British chain (Sears 1922)",20.11676512155263,AUTHORITY["EPSG","9042"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",4],PARAMETER["longitude_of_center",115],PARAMETER["azimuth",53.31582047222222],PARAMETER["rectified_grid_angle",53.13010236111111],PARAMETER["scale_factor",0.99984],PARAMETER["false_easting",29352.4763],PARAMETER["false_northing",22014.3572],AUTHORITY["EPSG","29871"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=omerc +lat_0=4 +lonc=115 +alpha=53.31582047222222 +k=0.99984 +x_0=590476.8714630401 +y_0=442857.653094361 +ellps=evrstSS +to_meter=20.11676512155263 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29871,'EPSG',29871,'PROJCS["Timbalai 1948 / RSO Borneo (ch)",GEOGCS["Timbalai 1948",DATUM["Timbalai_1948",SPHEROID["Everest 1830 (1967 Definition)",6377298.556,300.8017,AUTHORITY["EPSG","7016"]],TOWGS84[-533.4,669.2,-52.5,0,0,4.28,9.4],AUTHORITY["EPSG","6298"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4298"]],UNIT["British chain (Sears 1922)",20.11676512155263,AUTHORITY["EPSG","9042"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",4],PARAMETER["longitude_of_center",115],PARAMETER["azimuth",53.31582047222222],PARAMETER["rectified_grid_angle",53.13010236111111],PARAMETER["scale_factor",0.99984],PARAMETER["false_easting",29352.4763],PARAMETER["false_northing",22014.3572],AUTHORITY["EPSG","29871"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=omerc +lat_0=4 +lonc=115 +alpha=53.31582047222222 +k=0.99984 +x_0=590476.8714630401 +y_0=442857.653094361 +gamma=53.13010236111111 +ellps=evrstSS +towgs84=-533.4,669.2,-52.5,0,0,4.28,9.4 +to_meter=20.11676512155263 +no_defs '); --- --- EPSG 29872 : Timbalai 1948 / RSO Borneo (ft) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29872,'EPSG',29872,'PROJCS["Timbalai 1948 / RSO Borneo (ft)",GEOGCS["Timbalai 1948",DATUM["Timbalai_1948",SPHEROID["Everest 1830 (1967 Definition)",6377298.556,300.8017,AUTHORITY["EPSG","7016"]],AUTHORITY["EPSG","6298"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4298"]],UNIT["British foot (Sears 1922)",0.3047994715386762,AUTHORITY["EPSG","9041"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",4],PARAMETER["longitude_of_center",115],PARAMETER["azimuth",53.31582047222222],PARAMETER["rectified_grid_angle",53.13010236111111],PARAMETER["scale_factor",0.99984],PARAMETER["false_easting",1937263.44],PARAMETER["false_northing",1452947.58],AUTHORITY["EPSG","29872"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=omerc +lat_0=4 +lonc=115 +alpha=53.31582047222222 +k=0.99984 +x_0=590476.8727431979 +y_0=442857.6545573985 +ellps=evrstSS +to_meter=0.3047994715386762 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29872,'EPSG',29872,'PROJCS["Timbalai 1948 / RSO Borneo (ft)",GEOGCS["Timbalai 1948",DATUM["Timbalai_1948",SPHEROID["Everest 1830 (1967 Definition)",6377298.556,300.8017,AUTHORITY["EPSG","7016"]],TOWGS84[-533.4,669.2,-52.5,0,0,4.28,9.4],AUTHORITY["EPSG","6298"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4298"]],UNIT["British foot (Sears 1922)",0.3047994715386762,AUTHORITY["EPSG","9041"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",4],PARAMETER["longitude_of_center",115],PARAMETER["azimuth",53.31582047222222],PARAMETER["rectified_grid_angle",53.13010236111111],PARAMETER["scale_factor",0.99984],PARAMETER["false_easting",1937263.44],PARAMETER["false_northing",1452947.58],AUTHORITY["EPSG","29872"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=omerc +lat_0=4 +lonc=115 +alpha=53.31582047222222 +k=0.99984 +x_0=590476.8727431979 +y_0=442857.6545573985 +gamma=53.13010236111111 +ellps=evrstSS +towgs84=-533.4,669.2,-52.5,0,0,4.28,9.4 +to_meter=0.3047994715386762 +no_defs '); --- --- EPSG 29873 : Timbalai 1948 / RSO Borneo (m) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29873,'EPSG',29873,'PROJCS["Timbalai 1948 / RSO Borneo (m)",GEOGCS["Timbalai 1948",DATUM["Timbalai_1948",SPHEROID["Everest 1830 (1967 Definition)",6377298.556,300.8017,AUTHORITY["EPSG","7016"]],AUTHORITY["EPSG","6298"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4298"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",4],PARAMETER["longitude_of_center",115],PARAMETER["azimuth",53.31582047222222],PARAMETER["rectified_grid_angle",53.13010236111111],PARAMETER["scale_factor",0.99984],PARAMETER["false_easting",590476.87],PARAMETER["false_northing",442857.65],AUTHORITY["EPSG","29873"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=omerc +lat_0=4 +lonc=115 +alpha=53.31582047222222 +k=0.99984 +x_0=590476.87 +y_0=442857.65 +ellps=evrstSS +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29873,'EPSG',29873,'PROJCS["Timbalai 1948 / RSO Borneo (m)",GEOGCS["Timbalai 1948",DATUM["Timbalai_1948",SPHEROID["Everest 1830 (1967 Definition)",6377298.556,300.8017,AUTHORITY["EPSG","7016"]],TOWGS84[-533.4,669.2,-52.5,0,0,4.28,9.4],AUTHORITY["EPSG","6298"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4298"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Hotine_Oblique_Mercator"],PARAMETER["latitude_of_center",4],PARAMETER["longitude_of_center",115],PARAMETER["azimuth",53.31582047222222],PARAMETER["rectified_grid_angle",53.13010236111111],PARAMETER["scale_factor",0.99984],PARAMETER["false_easting",590476.87],PARAMETER["false_northing",442857.65],AUTHORITY["EPSG","29873"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=omerc +lat_0=4 +lonc=115 +alpha=53.31582047222222 +k=0.99984 +x_0=590476.87 +y_0=442857.65 +gamma=53.13010236111111 +ellps=evrstSS +towgs84=-533.4,669.2,-52.5,0,0,4.28,9.4 +units=m +no_defs '); --- --- EPSG 29900 : TM65 / Irish National Grid (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29900,'EPSG',29900,'PROJCS["TM65 / Irish National Grid (deprecated)",GEOGCS["TM65",DATUM["TM65",SPHEROID["Airy Modified 1849",6377340.189,299.3249646,AUTHORITY["EPSG","7002"]],AUTHORITY["EPSG","6299"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4299"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",53.5],PARAMETER["central_meridian",-8],PARAMETER["scale_factor",1.000035],PARAMETER["false_easting",200000],PARAMETER["false_northing",250000],AUTHORITY["EPSG","29900"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=53.5 +lon_0=-8 +k=1.000035 +x_0=200000 +y_0=250000 +a=6377340.189 +b=6356034.447938534 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29900,'EPSG',29900,'PROJCS["TM65 / Irish National Grid (deprecated)",GEOGCS["TM65",DATUM["TM65",SPHEROID["Airy Modified 1849",6377340.189,299.3249646,AUTHORITY["EPSG","7002"]],TOWGS84[482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15],AUTHORITY["EPSG","6299"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4299"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",53.5],PARAMETER["central_meridian",-8],PARAMETER["scale_factor",1.000035],PARAMETER["false_easting",200000],PARAMETER["false_northing",250000],AUTHORITY["EPSG","29900"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=53.5 +lon_0=-8 +k=1.000035 +x_0=200000 +y_0=250000 +ellps=mod_airy +towgs84=482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15 +units=m +no_defs '); --- --- EPSG 29901 : OSNI 1952 / Irish National Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29901,'EPSG',29901,'PROJCS["OSNI 1952 / Irish National Grid",GEOGCS["OSNI 1952",DATUM["OSNI_1952",SPHEROID["Airy 1830",6377563.396,299.3249646,AUTHORITY["EPSG","7001"]],TOWGS84[482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15],AUTHORITY["EPSG","6188"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4188"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",53.5],PARAMETER["central_meridian",-8],PARAMETER["scale_factor",1],PARAMETER["false_easting",200000],PARAMETER["false_northing",250000],AUTHORITY["EPSG","29901"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=53.5 +lon_0=-8 +k=1 +x_0=200000 +y_0=250000 +ellps=airy +towgs84=482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29901,'EPSG',29901,'PROJCS["OSNI 1952 / Irish National Grid",GEOGCS["OSNI 1952",DATUM["OSNI_1952",SPHEROID["Airy 1830",6377563.396,299.3249646,AUTHORITY["EPSG","7001"]],TOWGS84[482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15],AUTHORITY["EPSG","6188"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4188"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",53.5],PARAMETER["central_meridian",-8],PARAMETER["scale_factor",1],PARAMETER["false_easting",200000],PARAMETER["false_northing",250000],AUTHORITY["EPSG","29901"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=53.5 +lon_0=-8 +k=1 +x_0=200000 +y_0=250000 +ellps=airy +towgs84=482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15 +units=m +no_defs '); --- --- EPSG 29902 : TM65 / Irish Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29902,'EPSG',29902,'PROJCS["TM65 / Irish Grid",GEOGCS["TM65",DATUM["TM65",SPHEROID["Airy Modified 1849",6377340.189,299.3249646,AUTHORITY["EPSG","7002"]],AUTHORITY["EPSG","6299"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4299"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",53.5],PARAMETER["central_meridian",-8],PARAMETER["scale_factor",1.000035],PARAMETER["false_easting",200000],PARAMETER["false_northing",250000],AUTHORITY["EPSG","29902"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=53.5 +lon_0=-8 +k=1.000035 +x_0=200000 +y_0=250000 +a=6377340.189 +b=6356034.447938534 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29902,'EPSG',29902,'PROJCS["TM65 / Irish Grid",GEOGCS["TM65",DATUM["TM65",SPHEROID["Airy Modified 1849",6377340.189,299.3249646,AUTHORITY["EPSG","7002"]],TOWGS84[482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15],AUTHORITY["EPSG","6299"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4299"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",53.5],PARAMETER["central_meridian",-8],PARAMETER["scale_factor",1.000035],PARAMETER["false_easting",200000],PARAMETER["false_northing",250000],AUTHORITY["EPSG","29902"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=53.5 +lon_0=-8 +k=1.000035 +x_0=200000 +y_0=250000 +ellps=mod_airy +towgs84=482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15 +units=m +no_defs '); --- --- EPSG 29903 : TM75 / Irish Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29903,'EPSG',29903,'PROJCS["TM75 / Irish Grid",GEOGCS["TM75",DATUM["Geodetic_Datum_of_1965",SPHEROID["Airy Modified 1849",6377340.189,299.3249646,AUTHORITY["EPSG","7002"]],AUTHORITY["EPSG","6300"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4300"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",53.5],PARAMETER["central_meridian",-8],PARAMETER["scale_factor",1.000035],PARAMETER["false_easting",200000],PARAMETER["false_northing",250000],AUTHORITY["EPSG","29903"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=53.5 +lon_0=-8 +k=1.000035 +x_0=200000 +y_0=250000 +a=6377340.189 +b=6356034.447938534 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (29903,'EPSG',29903,'PROJCS["TM75 / Irish Grid",GEOGCS["TM75",DATUM["Geodetic_Datum_of_1965",SPHEROID["Airy Modified 1849",6377340.189,299.3249646,AUTHORITY["EPSG","7002"]],TOWGS84[482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15],AUTHORITY["EPSG","6300"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4300"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",53.5],PARAMETER["central_meridian",-8],PARAMETER["scale_factor",1.000035],PARAMETER["false_easting",200000],PARAMETER["false_northing",250000],AUTHORITY["EPSG","29903"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=53.5 +lon_0=-8 +k=1.000035 +x_0=200000 +y_0=250000 +ellps=mod_airy +towgs84=482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15 +units=m +no_defs '); --- --- EPSG 30161 : Tokyo / Japan Plane Rectangular CS I --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30161,'EPSG',30161,'PROJCS["Tokyo / Japan Plane Rectangular CS I",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",33],PARAMETER["central_meridian",129.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","30161"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=33 +lon_0=129.5 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30161,'EPSG',30161,'PROJCS["Tokyo / Japan Plane Rectangular CS I",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-148,507,685,0,0,0,0],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",33],PARAMETER["central_meridian",129.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","30161"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=33 +lon_0=129.5 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +towgs84=-148,507,685,0,0,0,0 +units=m +no_defs '); --- --- EPSG 30162 : Tokyo / Japan Plane Rectangular CS II --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30162,'EPSG',30162,'PROJCS["Tokyo / Japan Plane Rectangular CS II",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",33],PARAMETER["central_meridian",131],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","30162"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=33 +lon_0=131 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30162,'EPSG',30162,'PROJCS["Tokyo / Japan Plane Rectangular CS II",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-148,507,685,0,0,0,0],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",33],PARAMETER["central_meridian",131],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","30162"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=33 +lon_0=131 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +towgs84=-148,507,685,0,0,0,0 +units=m +no_defs '); --- --- EPSG 30163 : Tokyo / Japan Plane Rectangular CS III --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30163,'EPSG',30163,'PROJCS["Tokyo / Japan Plane Rectangular CS III",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36],PARAMETER["central_meridian",132.1666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","30163"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=36 +lon_0=132.1666666666667 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30163,'EPSG',30163,'PROJCS["Tokyo / Japan Plane Rectangular CS III",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-148,507,685,0,0,0,0],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36],PARAMETER["central_meridian",132.1666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","30163"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=36 +lon_0=132.1666666666667 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +towgs84=-148,507,685,0,0,0,0 +units=m +no_defs '); --- --- EPSG 30164 : Tokyo / Japan Plane Rectangular CS IV --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30164,'EPSG',30164,'PROJCS["Tokyo / Japan Plane Rectangular CS IV",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",33],PARAMETER["central_meridian",133.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","30164"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=33 +lon_0=133.5 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30164,'EPSG',30164,'PROJCS["Tokyo / Japan Plane Rectangular CS IV",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-148,507,685,0,0,0,0],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",33],PARAMETER["central_meridian",133.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","30164"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=33 +lon_0=133.5 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +towgs84=-148,507,685,0,0,0,0 +units=m +no_defs '); --- --- EPSG 30165 : Tokyo / Japan Plane Rectangular CS V --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30165,'EPSG',30165,'PROJCS["Tokyo / Japan Plane Rectangular CS V",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36],PARAMETER["central_meridian",134.3333333333333],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","30165"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=36 +lon_0=134.3333333333333 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30165,'EPSG',30165,'PROJCS["Tokyo / Japan Plane Rectangular CS V",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-148,507,685,0,0,0,0],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36],PARAMETER["central_meridian",134.3333333333333],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","30165"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=36 +lon_0=134.3333333333333 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +towgs84=-148,507,685,0,0,0,0 +units=m +no_defs '); --- --- EPSG 30166 : Tokyo / Japan Plane Rectangular CS VI --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30166,'EPSG',30166,'PROJCS["Tokyo / Japan Plane Rectangular CS VI",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36],PARAMETER["central_meridian",136],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","30166"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=36 +lon_0=136 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30166,'EPSG',30166,'PROJCS["Tokyo / Japan Plane Rectangular CS VI",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-148,507,685,0,0,0,0],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36],PARAMETER["central_meridian",136],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","30166"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=36 +lon_0=136 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +towgs84=-148,507,685,0,0,0,0 +units=m +no_defs '); --- --- EPSG 30167 : Tokyo / Japan Plane Rectangular CS VII --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30167,'EPSG',30167,'PROJCS["Tokyo / Japan Plane Rectangular CS VII",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36],PARAMETER["central_meridian",137.1666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","30167"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=36 +lon_0=137.1666666666667 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30167,'EPSG',30167,'PROJCS["Tokyo / Japan Plane Rectangular CS VII",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-148,507,685,0,0,0,0],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36],PARAMETER["central_meridian",137.1666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","30167"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=36 +lon_0=137.1666666666667 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +towgs84=-148,507,685,0,0,0,0 +units=m +no_defs '); --- --- EPSG 30168 : Tokyo / Japan Plane Rectangular CS VIII --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30168,'EPSG',30168,'PROJCS["Tokyo / Japan Plane Rectangular CS VIII",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36],PARAMETER["central_meridian",138.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","30168"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=36 +lon_0=138.5 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30168,'EPSG',30168,'PROJCS["Tokyo / Japan Plane Rectangular CS VIII",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-148,507,685,0,0,0,0],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36],PARAMETER["central_meridian",138.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","30168"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=36 +lon_0=138.5 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +towgs84=-148,507,685,0,0,0,0 +units=m +no_defs '); --- --- EPSG 30169 : Tokyo / Japan Plane Rectangular CS IX --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30169,'EPSG',30169,'PROJCS["Tokyo / Japan Plane Rectangular CS IX",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36],PARAMETER["central_meridian",139.8333333333333],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","30169"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=36 +lon_0=139.8333333333333 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30169,'EPSG',30169,'PROJCS["Tokyo / Japan Plane Rectangular CS IX",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-148,507,685,0,0,0,0],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",36],PARAMETER["central_meridian",139.8333333333333],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","30169"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=36 +lon_0=139.8333333333333 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +towgs84=-148,507,685,0,0,0,0 +units=m +no_defs '); --- --- EPSG 30170 : Tokyo / Japan Plane Rectangular CS X --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30170,'EPSG',30170,'PROJCS["Tokyo / Japan Plane Rectangular CS X",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",140.8333333333333],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","30170"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=40 +lon_0=140.8333333333333 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30170,'EPSG',30170,'PROJCS["Tokyo / Japan Plane Rectangular CS X",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-148,507,685,0,0,0,0],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",140.8333333333333],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","30170"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=40 +lon_0=140.8333333333333 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +towgs84=-148,507,685,0,0,0,0 +units=m +no_defs '); --- --- EPSG 30171 : Tokyo / Japan Plane Rectangular CS XI --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30171,'EPSG',30171,'PROJCS["Tokyo / Japan Plane Rectangular CS XI",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",44],PARAMETER["central_meridian",140.25],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","30171"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=44 +lon_0=140.25 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30171,'EPSG',30171,'PROJCS["Tokyo / Japan Plane Rectangular CS XI",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-148,507,685,0,0,0,0],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",44],PARAMETER["central_meridian",140.25],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","30171"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=44 +lon_0=140.25 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +towgs84=-148,507,685,0,0,0,0 +units=m +no_defs '); --- --- EPSG 30172 : Tokyo / Japan Plane Rectangular CS XII --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30172,'EPSG',30172,'PROJCS["Tokyo / Japan Plane Rectangular CS XII",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",44],PARAMETER["central_meridian",142.25],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","30172"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=44 +lon_0=142.25 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30172,'EPSG',30172,'PROJCS["Tokyo / Japan Plane Rectangular CS XII",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-148,507,685,0,0,0,0],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",44],PARAMETER["central_meridian",142.25],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","30172"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=44 +lon_0=142.25 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +towgs84=-148,507,685,0,0,0,0 +units=m +no_defs '); --- --- EPSG 30173 : Tokyo / Japan Plane Rectangular CS XIII --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30173,'EPSG',30173,'PROJCS["Tokyo / Japan Plane Rectangular CS XIII",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",44],PARAMETER["central_meridian",144.25],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","30173"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=44 +lon_0=144.25 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30173,'EPSG',30173,'PROJCS["Tokyo / Japan Plane Rectangular CS XIII",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-148,507,685,0,0,0,0],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",44],PARAMETER["central_meridian",144.25],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","30173"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=44 +lon_0=144.25 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +towgs84=-148,507,685,0,0,0,0 +units=m +no_defs '); --- --- EPSG 30174 : Tokyo / Japan Plane Rectangular CS XIV --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30174,'EPSG',30174,'PROJCS["Tokyo / Japan Plane Rectangular CS XIV",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",26],PARAMETER["central_meridian",142],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","30174"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=26 +lon_0=142 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30174,'EPSG',30174,'PROJCS["Tokyo / Japan Plane Rectangular CS XIV",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-148,507,685,0,0,0,0],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",26],PARAMETER["central_meridian",142],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","30174"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=26 +lon_0=142 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +towgs84=-148,507,685,0,0,0,0 +units=m +no_defs '); --- --- EPSG 30175 : Tokyo / Japan Plane Rectangular CS XV --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30175,'EPSG',30175,'PROJCS["Tokyo / Japan Plane Rectangular CS XV",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",26],PARAMETER["central_meridian",127.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","30175"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=26 +lon_0=127.5 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30175,'EPSG',30175,'PROJCS["Tokyo / Japan Plane Rectangular CS XV",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-148,507,685,0,0,0,0],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",26],PARAMETER["central_meridian",127.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","30175"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=26 +lon_0=127.5 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +towgs84=-148,507,685,0,0,0,0 +units=m +no_defs '); --- --- EPSG 30176 : Tokyo / Japan Plane Rectangular CS XVI --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30176,'EPSG',30176,'PROJCS["Tokyo / Japan Plane Rectangular CS XVI",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",26],PARAMETER["central_meridian",124],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","30176"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=26 +lon_0=124 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30176,'EPSG',30176,'PROJCS["Tokyo / Japan Plane Rectangular CS XVI",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-148,507,685,0,0,0,0],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",26],PARAMETER["central_meridian",124],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","30176"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=26 +lon_0=124 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +towgs84=-148,507,685,0,0,0,0 +units=m +no_defs '); --- --- EPSG 30177 : Tokyo / Japan Plane Rectangular CS XVII --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30177,'EPSG',30177,'PROJCS["Tokyo / Japan Plane Rectangular CS XVII",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",26],PARAMETER["central_meridian",131],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","30177"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=26 +lon_0=131 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30177,'EPSG',30177,'PROJCS["Tokyo / Japan Plane Rectangular CS XVII",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-148,507,685,0,0,0,0],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",26],PARAMETER["central_meridian",131],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","30177"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=26 +lon_0=131 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +towgs84=-148,507,685,0,0,0,0 +units=m +no_defs '); --- --- EPSG 30178 : Tokyo / Japan Plane Rectangular CS XVIII --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30178,'EPSG',30178,'PROJCS["Tokyo / Japan Plane Rectangular CS XVIII",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",20],PARAMETER["central_meridian",136],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","30178"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=20 +lon_0=136 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30178,'EPSG',30178,'PROJCS["Tokyo / Japan Plane Rectangular CS XVIII",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-148,507,685,0,0,0,0],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",20],PARAMETER["central_meridian",136],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","30178"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=20 +lon_0=136 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +towgs84=-148,507,685,0,0,0,0 +units=m +no_defs '); --- --- EPSG 30179 : Tokyo / Japan Plane Rectangular CS XIX --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30179,'EPSG',30179,'PROJCS["Tokyo / Japan Plane Rectangular CS XIX",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",26],PARAMETER["central_meridian",154],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","30179"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=26 +lon_0=154 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30179,'EPSG',30179,'PROJCS["Tokyo / Japan Plane Rectangular CS XIX",GEOGCS["Tokyo",DATUM["Tokyo",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[-148,507,685,0,0,0,0],AUTHORITY["EPSG","6301"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4301"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",26],PARAMETER["central_meridian",154],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","30179"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=26 +lon_0=154 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +towgs84=-148,507,685,0,0,0,0 +units=m +no_defs '); --- --- EPSG 30200 : Trinidad 1903 / Trinidad Grid --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30200,'EPSG',30200,'PROJCS["Trinidad 1903 / Trinidad Grid",GEOGCS["Trinidad 1903",DATUM["Trinidad_1903",SPHEROID["Clarke 1858",6378293.645208759,294.2606763692569,AUTHORITY["EPSG","7007"]],AUTHORITY["EPSG","6302"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4302"]],UNIT["Clarke''s link",0.201166195164,AUTHORITY["EPSG","9039"]],PROJECTION["Cassini_Soldner"],PARAMETER["latitude_of_origin",10.44166666666667],PARAMETER["central_meridian",-61.33333333333334],PARAMETER["false_easting",430000],PARAMETER["false_northing",325000],AUTHORITY["EPSG","30200"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=cass +lat_0=10.44166666666667 +lon_0=-61.33333333333334 +x_0=86501.46392051999 +y_0=65379.0134283 +a=6378293.645208759 +b=6356617.987679838 +to_meter=0.201166195164 +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30200,'EPSG',30200,'PROJCS["Trinidad 1903 / Trinidad Grid",GEOGCS["Trinidad 1903",DATUM["Trinidad_1903",SPHEROID["Clarke 1858",6378293.645208759,294.2606763692569,AUTHORITY["EPSG","7007"]],TOWGS84[-61.702,284.488,472.052,0,0,0,0],AUTHORITY["EPSG","6302"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4302"]],UNIT["Clarke''s link",0.201166195164,AUTHORITY["EPSG","9039"]],PROJECTION["Cassini_Soldner"],PARAMETER["latitude_of_origin",10.44166666666667],PARAMETER["central_meridian",-61.33333333333334],PARAMETER["false_easting",430000],PARAMETER["false_northing",325000],AUTHORITY["EPSG","30200"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=cass +lat_0=10.44166666666667 +lon_0=-61.33333333333334 +x_0=86501.46392051999 +y_0=65379.0134283 +a=6378293.645208759 +b=6356617.987679838 +towgs84=-61.702,284.488,472.052,0,0,0,0 +to_meter=0.201166195164 +no_defs '); --- --- EPSG 30339 : TC(1948) / UTM zone 39N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30339,'EPSG',30339,'PROJCS["TC(1948) / UTM zone 39N",GEOGCS["TC(1948)",DATUM["Trucial_Coast_1948",SPHEROID["Helmert 1906",6378200,298.3,AUTHORITY["EPSG","7020"]],AUTHORITY["EPSG","6303"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4303"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","30339"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=39 +ellps=helmert +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30339,'EPSG',30339,'PROJCS["TC(1948) / UTM zone 39N",GEOGCS["TC(1948)",DATUM["Trucial_Coast_1948",SPHEROID["Helmert 1906",6378200,298.3,AUTHORITY["EPSG","7020"]],AUTHORITY["EPSG","6303"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4303"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","30339"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=39 +ellps=helmert +units=m +no_defs '); --- --- EPSG 30340 : TC(1948) / UTM zone 40N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30340,'EPSG',30340,'PROJCS["TC(1948) / UTM zone 40N",GEOGCS["TC(1948)",DATUM["Trucial_Coast_1948",SPHEROID["Helmert 1906",6378200,298.3,AUTHORITY["EPSG","7020"]],AUTHORITY["EPSG","6303"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4303"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","30340"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=40 +ellps=helmert +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30340,'EPSG',30340,'PROJCS["TC(1948) / UTM zone 40N",GEOGCS["TC(1948)",DATUM["Trucial_Coast_1948",SPHEROID["Helmert 1906",6378200,298.3,AUTHORITY["EPSG","7020"]],AUTHORITY["EPSG","6303"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4303"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","30340"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=40 +ellps=helmert +units=m +no_defs '); --- --- EPSG 30491 : Voirol 1875 / Nord Algerie (ancienne) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30491,'EPSG',30491,'PROJCS["Voirol 1875 / Nord Algerie (ancienne)",GEOGCS["Voirol 1875",DATUM["Voirol_1875",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-73,-247,227,0,0,0,0],AUTHORITY["EPSG","6304"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4304"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",36],PARAMETER["central_meridian",2.7],PARAMETER["scale_factor",0.999625544],PARAMETER["false_easting",500000],PARAMETER["false_northing",300000],AUTHORITY["EPSG","30491"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36 +lat_0=36 +lon_0=2.7 +k_0=0.999625544 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +towgs84=-73,-247,227,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30491,'EPSG',30491,'PROJCS["Voirol 1875 / Nord Algerie (ancienne)",GEOGCS["Voirol 1875",DATUM["Voirol_1875",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-73,-247,227,0,0,0,0],AUTHORITY["EPSG","6304"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4304"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",36],PARAMETER["central_meridian",2.7],PARAMETER["scale_factor",0.999625544],PARAMETER["false_easting",500000],PARAMETER["false_northing",300000],AUTHORITY["EPSG","30491"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36 +lat_0=36 +lon_0=2.7 +k_0=0.999625544 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +towgs84=-73,-247,227,0,0,0,0 +units=m +no_defs '); --- --- EPSG 30492 : Voirol 1875 / Sud Algerie (ancienne) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30492,'EPSG',30492,'PROJCS["Voirol 1875 / Sud Algerie (ancienne)",GEOGCS["Voirol 1875",DATUM["Voirol_1875",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-73,-247,227,0,0,0,0],AUTHORITY["EPSG","6304"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4304"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",33.3],PARAMETER["central_meridian",2.7],PARAMETER["scale_factor",0.999625769],PARAMETER["false_easting",500000],PARAMETER["false_northing",300000],AUTHORITY["EPSG","30492"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=2.7 +k_0=0.999625769 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +towgs84=-73,-247,227,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30492,'EPSG',30492,'PROJCS["Voirol 1875 / Sud Algerie (ancienne)",GEOGCS["Voirol 1875",DATUM["Voirol_1875",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-73,-247,227,0,0,0,0],AUTHORITY["EPSG","6304"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4304"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",33.3],PARAMETER["central_meridian",2.7],PARAMETER["scale_factor",0.999625769],PARAMETER["false_easting",500000],PARAMETER["false_northing",300000],AUTHORITY["EPSG","30492"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=2.7 +k_0=0.999625769 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +towgs84=-73,-247,227,0,0,0,0 +units=m +no_defs '); --- --- EPSG 30493 : Voirol 1879 / Nord Algerie (ancienne) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30493,'EPSG',30493,'PROJCS["Voirol 1879 / Nord Algerie (ancienne)",GEOGCS["Voirol 1879",DATUM["Voirol_1879",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],AUTHORITY["EPSG","6671"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4671"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",36],PARAMETER["central_meridian",2.7],PARAMETER["scale_factor",0.999625544],PARAMETER["false_easting",500000],PARAMETER["false_northing",300000],AUTHORITY["EPSG","30493"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36 +lat_0=36 +lon_0=2.7 +k_0=0.999625544 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30493,'EPSG',30493,'PROJCS["Voirol 1879 / Nord Algerie (ancienne)",GEOGCS["Voirol 1879",DATUM["Voirol_1879",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],AUTHORITY["EPSG","6671"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4671"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",36],PARAMETER["central_meridian",2.7],PARAMETER["scale_factor",0.999625544],PARAMETER["false_easting",500000],PARAMETER["false_northing",300000],AUTHORITY["EPSG","30493"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36 +lat_0=36 +lon_0=2.7 +k_0=0.999625544 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +units=m +no_defs '); --- --- EPSG 30494 : Voirol 1879 / Sud Algerie (ancienne) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30494,'EPSG',30494,'PROJCS["Voirol 1879 / Sud Algerie (ancienne)",GEOGCS["Voirol 1879",DATUM["Voirol_1879",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],AUTHORITY["EPSG","6671"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4671"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",33.3],PARAMETER["central_meridian",2.7],PARAMETER["scale_factor",0.999625769],PARAMETER["false_easting",500000],PARAMETER["false_northing",300000],AUTHORITY["EPSG","30494"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=2.7 +k_0=0.999625769 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30494,'EPSG',30494,'PROJCS["Voirol 1879 / Sud Algerie (ancienne)",GEOGCS["Voirol 1879",DATUM["Voirol_1879",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],AUTHORITY["EPSG","6671"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4671"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",33.3],PARAMETER["central_meridian",2.7],PARAMETER["scale_factor",0.999625769],PARAMETER["false_easting",500000],PARAMETER["false_northing",300000],AUTHORITY["EPSG","30494"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=2.7 +k_0=0.999625769 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +units=m +no_defs '); --- --- EPSG 30729 : Nord Sahara 1959 / UTM zone 29N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30729,'EPSG',30729,'PROJCS["Nord Sahara 1959 / UTM zone 29N",GEOGCS["Nord Sahara 1959",DATUM["Nord_Sahara_1959",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6307"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4307"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","30729"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30729,'EPSG',30729,'PROJCS["Nord Sahara 1959 / UTM zone 29N",GEOGCS["Nord Sahara 1959",DATUM["Nord_Sahara_1959",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-186,-93,310,0,0,0,0],AUTHORITY["EPSG","6307"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4307"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","30729"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +ellps=clrk80 +towgs84=-186,-93,310,0,0,0,0 +units=m +no_defs '); --- --- EPSG 30730 : Nord Sahara 1959 / UTM zone 30N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30730,'EPSG',30730,'PROJCS["Nord Sahara 1959 / UTM zone 30N",GEOGCS["Nord Sahara 1959",DATUM["Nord_Sahara_1959",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6307"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4307"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","30730"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=30 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30730,'EPSG',30730,'PROJCS["Nord Sahara 1959 / UTM zone 30N",GEOGCS["Nord Sahara 1959",DATUM["Nord_Sahara_1959",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-186,-93,310,0,0,0,0],AUTHORITY["EPSG","6307"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4307"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","30730"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=30 +ellps=clrk80 +towgs84=-186,-93,310,0,0,0,0 +units=m +no_defs '); --- --- EPSG 30731 : Nord Sahara 1959 / UTM zone 31N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30731,'EPSG',30731,'PROJCS["Nord Sahara 1959 / UTM zone 31N",GEOGCS["Nord Sahara 1959",DATUM["Nord_Sahara_1959",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6307"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4307"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","30731"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=31 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30731,'EPSG',30731,'PROJCS["Nord Sahara 1959 / UTM zone 31N",GEOGCS["Nord Sahara 1959",DATUM["Nord_Sahara_1959",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-186,-93,310,0,0,0,0],AUTHORITY["EPSG","6307"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4307"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","30731"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=31 +ellps=clrk80 +towgs84=-186,-93,310,0,0,0,0 +units=m +no_defs '); --- --- EPSG 30732 : Nord Sahara 1959 / UTM zone 32N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30732,'EPSG',30732,'PROJCS["Nord Sahara 1959 / UTM zone 32N",GEOGCS["Nord Sahara 1959",DATUM["Nord_Sahara_1959",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6307"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4307"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","30732"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30732,'EPSG',30732,'PROJCS["Nord Sahara 1959 / UTM zone 32N",GEOGCS["Nord Sahara 1959",DATUM["Nord_Sahara_1959",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-186,-93,310,0,0,0,0],AUTHORITY["EPSG","6307"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4307"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","30732"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +ellps=clrk80 +towgs84=-186,-93,310,0,0,0,0 +units=m +no_defs '); --- --- EPSG 30791 : Nord Sahara 1959 / Voirol Unifie Nord --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30791,'EPSG',30791,'PROJCS["Nord Sahara 1959 / Voirol Unifie Nord",GEOGCS["Nord Sahara 1959",DATUM["Nord_Sahara_1959",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6307"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4307"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",36],PARAMETER["central_meridian",2.7],PARAMETER["scale_factor",0.999625544],PARAMETER["false_easting",500135],PARAMETER["false_northing",300090],AUTHORITY["EPSG","30791"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36 +lat_0=36 +lon_0=2.7 +k_0=0.999625544 +x_0=500135 +y_0=300090 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30791,'EPSG',30791,'PROJCS["Nord Sahara 1959 / Voirol Unifie Nord",GEOGCS["Nord Sahara 1959",DATUM["Nord_Sahara_1959",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-186,-93,310,0,0,0,0],AUTHORITY["EPSG","6307"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4307"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",36],PARAMETER["central_meridian",2.7],PARAMETER["scale_factor",0.999625544],PARAMETER["false_easting",500135],PARAMETER["false_northing",300090],AUTHORITY["EPSG","30791"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36 +lat_0=36 +lon_0=2.7 +k_0=0.999625544 +x_0=500135 +y_0=300090 +ellps=clrk80 +towgs84=-186,-93,310,0,0,0,0 +units=m +no_defs '); --- --- EPSG 30792 : Nord Sahara 1959 / Voirol Unifie Sud --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30792,'EPSG',30792,'PROJCS["Nord Sahara 1959 / Voirol Unifie Sud",GEOGCS["Nord Sahara 1959",DATUM["Nord_Sahara_1959",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],AUTHORITY["EPSG","6307"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4307"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",33.3],PARAMETER["central_meridian",2.7],PARAMETER["scale_factor",0.999625769],PARAMETER["false_easting",500135],PARAMETER["false_northing",300090],AUTHORITY["EPSG","30792"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=2.7 +k_0=0.999625769 +x_0=500135 +y_0=300090 +ellps=clrk80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30792,'EPSG',30792,'PROJCS["Nord Sahara 1959 / Voirol Unifie Sud",GEOGCS["Nord Sahara 1959",DATUM["Nord_Sahara_1959",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-186,-93,310,0,0,0,0],AUTHORITY["EPSG","6307"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4307"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",33.3],PARAMETER["central_meridian",2.7],PARAMETER["scale_factor",0.999625769],PARAMETER["false_easting",500135],PARAMETER["false_northing",300090],AUTHORITY["EPSG","30792"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=2.7 +k_0=0.999625769 +x_0=500135 +y_0=300090 +ellps=clrk80 +towgs84=-186,-93,310,0,0,0,0 +units=m +no_defs '); --- --- EPSG 30800 : RT38 2.5 gon W (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30800,'EPSG',30800,'PROJCS["RT38 2.5 gon W (deprecated)",GEOGCS["RT38",DATUM["Stockholm_1938",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6308"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4308"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15.80827777777778],PARAMETER["scale_factor",1],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","30800"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=15.80827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (30800,'EPSG',30800,'PROJCS["RT38 2.5 gon W (deprecated)",GEOGCS["RT38",DATUM["Stockholm_1938",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6308"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4308"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15.80827777777778],PARAMETER["scale_factor",1],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","30800"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=15.80827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs '); --- --- EPSG 31028 : Yoff / UTM zone 28N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31028,'EPSG',31028,'PROJCS["Yoff / UTM zone 28N",GEOGCS["Yoff",DATUM["Yoff",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],AUTHORITY["EPSG","6310"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4310"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31028"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +a=6378249.2 +b=6356515 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31028,'EPSG',31028,'PROJCS["Yoff / UTM zone 28N",GEOGCS["Yoff",DATUM["Yoff",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],AUTHORITY["EPSG","6310"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4310"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31028"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +a=6378249.2 +b=6356515 +units=m +no_defs '); --- --- EPSG 31121 : Zanderij / UTM zone 21N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31121,'EPSG',31121,'PROJCS["Zanderij / UTM zone 21N",GEOGCS["Zanderij",DATUM["Zanderij",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-265,120,-358,0,0,0,0],AUTHORITY["EPSG","6311"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4311"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31121"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +ellps=intl +towgs84=-265,120,-358,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31121,'EPSG',31121,'PROJCS["Zanderij / UTM zone 21N",GEOGCS["Zanderij",DATUM["Zanderij",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-265,120,-358,0,0,0,0],AUTHORITY["EPSG","6311"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4311"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31121"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +ellps=intl +towgs84=-265,120,-358,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31154 : Zanderij / TM 54 NW --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31154,'EPSG',31154,'PROJCS["Zanderij / TM 54 NW",GEOGCS["Zanderij",DATUM["Zanderij",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-265,120,-358,0,0,0,0],AUTHORITY["EPSG","6311"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4311"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-54],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31154"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-54 +k=0.9996 +x_0=500000 +y_0=0 +ellps=intl +towgs84=-265,120,-358,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31154,'EPSG',31154,'PROJCS["Zanderij / TM 54 NW",GEOGCS["Zanderij",DATUM["Zanderij",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-265,120,-358,0,0,0,0],AUTHORITY["EPSG","6311"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4311"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-54],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31154"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-54 +k=0.9996 +x_0=500000 +y_0=0 +ellps=intl +towgs84=-265,120,-358,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31170 : Zanderij / Suriname Old TM --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31170,'EPSG',31170,'PROJCS["Zanderij / Suriname Old TM",GEOGCS["Zanderij",DATUM["Zanderij",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-265,120,-358,0,0,0,0],AUTHORITY["EPSG","6311"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4311"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-55.68333333333333],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31170"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-55.68333333333333 +k=0.9996 +x_0=500000 +y_0=0 +ellps=intl +towgs84=-265,120,-358,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31170,'EPSG',31170,'PROJCS["Zanderij / Suriname Old TM",GEOGCS["Zanderij",DATUM["Zanderij",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-265,120,-358,0,0,0,0],AUTHORITY["EPSG","6311"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4311"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-55.68333333333333],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31170"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-55.68333333333333 +k=0.9996 +x_0=500000 +y_0=0 +ellps=intl +towgs84=-265,120,-358,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31171 : Zanderij / Suriname TM --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31171,'EPSG',31171,'PROJCS["Zanderij / Suriname TM",GEOGCS["Zanderij",DATUM["Zanderij",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-265,120,-358,0,0,0,0],AUTHORITY["EPSG","6311"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4311"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-55.68333333333333],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31171"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-55.68333333333333 +k=0.9999 +x_0=500000 +y_0=0 +ellps=intl +towgs84=-265,120,-358,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31171,'EPSG',31171,'PROJCS["Zanderij / Suriname TM",GEOGCS["Zanderij",DATUM["Zanderij",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-265,120,-358,0,0,0,0],AUTHORITY["EPSG","6311"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4311"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-55.68333333333333],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31171"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-55.68333333333333 +k=0.9999 +x_0=500000 +y_0=0 +ellps=intl +towgs84=-265,120,-358,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31251 : MGI (Ferro) / Austria GK West Zone --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31251,'EPSG',31251,'PROJCS["MGI (Ferro) / Austria GK West Zone",GEOGCS["MGI (Ferro)",DATUM["Militar_Geographische_Institut_Ferro",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6805"]],PRIMEM["Ferro",-17.66666666666667,AUTHORITY["EPSG","8909"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4805"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",28],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",-5000000],AUTHORITY["EPSG","31251"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=28 +k=1 +x_0=0 +y_0=-5000000 +ellps=bessel +pm=ferro +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31251,'EPSG',31251,'PROJCS["MGI (Ferro) / Austria GK West Zone",GEOGCS["MGI (Ferro)",DATUM["Militar_Geographische_Institut_Ferro",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[682,-203,480,0,0,0,0],AUTHORITY["EPSG","6805"]],PRIMEM["Ferro",-17.66666666666667,AUTHORITY["EPSG","8909"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4805"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",28],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",-5000000],AUTHORITY["EPSG","31251"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=28 +k=1 +x_0=0 +y_0=-5000000 +ellps=bessel +towgs84=682,-203,480,0,0,0,0 +pm=ferro +units=m +no_defs '); --- --- EPSG 31252 : MGI (Ferro) / Austria GK Central Zone --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31252,'EPSG',31252,'PROJCS["MGI (Ferro) / Austria GK Central Zone",GEOGCS["MGI (Ferro)",DATUM["Militar_Geographische_Institut_Ferro",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6805"]],PRIMEM["Ferro",-17.66666666666667,AUTHORITY["EPSG","8909"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4805"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",31],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",-5000000],AUTHORITY["EPSG","31252"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=31 +k=1 +x_0=0 +y_0=-5000000 +ellps=bessel +pm=ferro +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31252,'EPSG',31252,'PROJCS["MGI (Ferro) / Austria GK Central Zone",GEOGCS["MGI (Ferro)",DATUM["Militar_Geographische_Institut_Ferro",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[682,-203,480,0,0,0,0],AUTHORITY["EPSG","6805"]],PRIMEM["Ferro",-17.66666666666667,AUTHORITY["EPSG","8909"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4805"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",31],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",-5000000],AUTHORITY["EPSG","31252"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=31 +k=1 +x_0=0 +y_0=-5000000 +ellps=bessel +towgs84=682,-203,480,0,0,0,0 +pm=ferro +units=m +no_defs '); --- --- EPSG 31253 : MGI (Ferro) / Austria GK East Zone --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31253,'EPSG',31253,'PROJCS["MGI (Ferro) / Austria GK East Zone",GEOGCS["MGI (Ferro)",DATUM["Militar_Geographische_Institut_Ferro",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6805"]],PRIMEM["Ferro",-17.66666666666667,AUTHORITY["EPSG","8909"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4805"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",34],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",-5000000],AUTHORITY["EPSG","31253"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=34 +k=1 +x_0=0 +y_0=-5000000 +ellps=bessel +pm=ferro +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31253,'EPSG',31253,'PROJCS["MGI (Ferro) / Austria GK East Zone",GEOGCS["MGI (Ferro)",DATUM["Militar_Geographische_Institut_Ferro",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[682,-203,480,0,0,0,0],AUTHORITY["EPSG","6805"]],PRIMEM["Ferro",-17.66666666666667,AUTHORITY["EPSG","8909"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4805"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",34],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",-5000000],AUTHORITY["EPSG","31253"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=34 +k=1 +x_0=0 +y_0=-5000000 +ellps=bessel +towgs84=682,-203,480,0,0,0,0 +pm=ferro +units=m +no_defs '); --- --- EPSG 31254 : MGI / Austria GK West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31254,'EPSG',31254,'PROJCS["MGI / Austria GK West",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",10.33333333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",-5000000],AUTHORITY["EPSG","31254"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=10.33333333333333 +k=1 +x_0=0 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31254,'EPSG',31254,'PROJCS["MGI / Austria GK West",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",10.33333333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",-5000000],AUTHORITY["EPSG","31254"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=10.33333333333333 +k=1 +x_0=0 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); --- --- EPSG 31255 : MGI / Austria GK Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31255,'EPSG',31255,'PROJCS["MGI / Austria GK Central",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",13.33333333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",-5000000],AUTHORITY["EPSG","31255"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=13.33333333333333 +k=1 +x_0=0 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31255,'EPSG',31255,'PROJCS["MGI / Austria GK Central",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",13.33333333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",-5000000],AUTHORITY["EPSG","31255"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=13.33333333333333 +k=1 +x_0=0 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); --- --- EPSG 31256 : MGI / Austria GK East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31256,'EPSG',31256,'PROJCS["MGI / Austria GK East",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",16.33333333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",-5000000],AUTHORITY["EPSG","31256"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=16.33333333333333 +k=1 +x_0=0 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31256,'EPSG',31256,'PROJCS["MGI / Austria GK East",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",16.33333333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",-5000000],AUTHORITY["EPSG","31256"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=16.33333333333333 +k=1 +x_0=0 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); --- --- EPSG 31257 : MGI / Austria GK M28 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31257,'EPSG',31257,'PROJCS["MGI / Austria GK M28",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",10.33333333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",150000],PARAMETER["false_northing",-5000000],AUTHORITY["EPSG","31257"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=10.33333333333333 +k=1 +x_0=150000 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31257,'EPSG',31257,'PROJCS["MGI / Austria GK M28",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",10.33333333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",150000],PARAMETER["false_northing",-5000000],AUTHORITY["EPSG","31257"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=10.33333333333333 +k=1 +x_0=150000 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); --- --- EPSG 31258 : MGI / Austria GK M31 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31258,'EPSG',31258,'PROJCS["MGI / Austria GK M31",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",13.33333333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",450000],PARAMETER["false_northing",-5000000],AUTHORITY["EPSG","31258"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=13.33333333333333 +k=1 +x_0=450000 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31258,'EPSG',31258,'PROJCS["MGI / Austria GK M31",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",13.33333333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",450000],PARAMETER["false_northing",-5000000],AUTHORITY["EPSG","31258"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=13.33333333333333 +k=1 +x_0=450000 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); --- --- EPSG 31259 : MGI / Austria GK M34 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31259,'EPSG',31259,'PROJCS["MGI / Austria GK M34",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",16.33333333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",750000],PARAMETER["false_northing",-5000000],AUTHORITY["EPSG","31259"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=16.33333333333333 +k=1 +x_0=750000 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31259,'EPSG',31259,'PROJCS["MGI / Austria GK M34",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",16.33333333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",750000],PARAMETER["false_northing",-5000000],AUTHORITY["EPSG","31259"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=16.33333333333333 +k=1 +x_0=750000 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); --- --- EPSG 31265 : MGI / 3-degree Gauss zone 5 (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31265,'EPSG',31265,'PROJCS["MGI / 3-degree Gauss zone 5 (deprecated)",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",1],PARAMETER["false_easting",5500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31265"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=5500000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31265,'EPSG',31265,'PROJCS["MGI / 3-degree Gauss zone 5 (deprecated)",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",1],PARAMETER["false_easting",5500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31265"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=5500000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); --- --- EPSG 31266 : MGI / 3-degree Gauss zone 6 (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31266,'EPSG',31266,'PROJCS["MGI / 3-degree Gauss zone 6 (deprecated)",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18],PARAMETER["scale_factor",1],PARAMETER["false_easting",6500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31266"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=6500000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31266,'EPSG',31266,'PROJCS["MGI / 3-degree Gauss zone 6 (deprecated)",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18],PARAMETER["scale_factor",1],PARAMETER["false_easting",6500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31266"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=6500000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); --- --- EPSG 31267 : MGI / 3-degree Gauss zone 7 (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31267,'EPSG',31267,'PROJCS["MGI / 3-degree Gauss zone 7 (deprecated)",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",7500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31267"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=7500000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31267,'EPSG',31267,'PROJCS["MGI / 3-degree Gauss zone 7 (deprecated)",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",1],PARAMETER["false_easting",7500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31267"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=7500000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); --- --- EPSG 31268 : MGI / 3-degree Gauss zone 8 (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31268,'EPSG',31268,'PROJCS["MGI / 3-degree Gauss zone 8 (deprecated)",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",24],PARAMETER["scale_factor",1],PARAMETER["false_easting",8500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31268"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=8500000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31268,'EPSG',31268,'PROJCS["MGI / 3-degree Gauss zone 8 (deprecated)",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",24],PARAMETER["scale_factor",1],PARAMETER["false_easting",8500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31268"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=8500000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); --- --- EPSG 31275 : MGI / Balkans zone 5 (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31275,'EPSG',31275,'PROJCS["MGI / Balkans zone 5 (deprecated)",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",5500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31275"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=0.9999 +x_0=5500000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31275,'EPSG',31275,'PROJCS["MGI / Balkans zone 5 (deprecated)",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",5500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31275"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=0.9999 +x_0=5500000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); --- --- EPSG 31276 : MGI / Balkans zone 6 (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31276,'EPSG',31276,'PROJCS["MGI / Balkans zone 6 (deprecated)",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",6500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31276"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=18 +k=0.9999 +x_0=6500000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31276,'EPSG',31276,'PROJCS["MGI / Balkans zone 6 (deprecated)",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",6500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31276"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=18 +k=0.9999 +x_0=6500000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); --- --- EPSG 31277 : MGI / Balkans zone 7 (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31277,'EPSG',31277,'PROJCS["MGI / Balkans zone 7 (deprecated)",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",7500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31277"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=0.9999 +x_0=7500000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31277,'EPSG',31277,'PROJCS["MGI / Balkans zone 7 (deprecated)",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",7500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31277"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=0.9999 +x_0=7500000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); --- --- EPSG 31278 : MGI / Balkans zone 8 (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31278,'EPSG',31278,'PROJCS["MGI / Balkans zone 8 (deprecated)",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",7500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31278"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=0.9999 +x_0=7500000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31278,'EPSG',31278,'PROJCS["MGI / Balkans zone 8 (deprecated)",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",7500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31278"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=21 +k=0.9999 +x_0=7500000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); --- --- EPSG 31279 : MGI / Balkans zone 8 (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31279,'EPSG',31279,'PROJCS["MGI / Balkans zone 8 (deprecated)",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",24],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",8500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31279"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9999 +x_0=8500000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31279,'EPSG',31279,'PROJCS["MGI / Balkans zone 8 (deprecated)",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",24],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",8500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31279"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9999 +x_0=8500000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); --- --- EPSG 31281 : MGI (Ferro) / Austria West Zone --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31281,'EPSG',31281,'PROJCS["MGI (Ferro) / Austria West Zone",GEOGCS["MGI (Ferro)",DATUM["Militar_Geographische_Institut_Ferro",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6805"]],PRIMEM["Ferro",-17.66666666666667,AUTHORITY["EPSG","8909"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4805"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",28],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","31281"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=28 +k=1 +x_0=0 +y_0=0 +ellps=bessel +pm=ferro +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31281,'EPSG',31281,'PROJCS["MGI (Ferro) / Austria West Zone",GEOGCS["MGI (Ferro)",DATUM["Militar_Geographische_Institut_Ferro",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[682,-203,480,0,0,0,0],AUTHORITY["EPSG","6805"]],PRIMEM["Ferro",-17.66666666666667,AUTHORITY["EPSG","8909"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4805"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",28],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","31281"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=28 +k=1 +x_0=0 +y_0=0 +ellps=bessel +towgs84=682,-203,480,0,0,0,0 +pm=ferro +units=m +no_defs '); --- --- EPSG 31282 : MGI (Ferro) / Austria Central Zone --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31282,'EPSG',31282,'PROJCS["MGI (Ferro) / Austria Central Zone",GEOGCS["MGI (Ferro)",DATUM["Militar_Geographische_Institut_Ferro",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6805"]],PRIMEM["Ferro",-17.66666666666667,AUTHORITY["EPSG","8909"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4805"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",31],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","31282"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=31 +k=1 +x_0=0 +y_0=0 +ellps=bessel +pm=ferro +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31282,'EPSG',31282,'PROJCS["MGI (Ferro) / Austria Central Zone",GEOGCS["MGI (Ferro)",DATUM["Militar_Geographische_Institut_Ferro",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[682,-203,480,0,0,0,0],AUTHORITY["EPSG","6805"]],PRIMEM["Ferro",-17.66666666666667,AUTHORITY["EPSG","8909"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4805"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",31],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","31282"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=31 +k=1 +x_0=0 +y_0=0 +ellps=bessel +towgs84=682,-203,480,0,0,0,0 +pm=ferro +units=m +no_defs '); --- --- EPSG 31283 : MGI (Ferro) / Austria East Zone --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31283,'EPSG',31283,'PROJCS["MGI (Ferro) / Austria East Zone",GEOGCS["MGI (Ferro)",DATUM["Militar_Geographische_Institut_Ferro",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6805"]],PRIMEM["Ferro",-17.66666666666667,AUTHORITY["EPSG","8909"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4805"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",34],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","31283"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=34 +k=1 +x_0=0 +y_0=0 +ellps=bessel +pm=ferro +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31283,'EPSG',31283,'PROJCS["MGI (Ferro) / Austria East Zone",GEOGCS["MGI (Ferro)",DATUM["Militar_Geographische_Institut_Ferro",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[682,-203,480,0,0,0,0],AUTHORITY["EPSG","6805"]],PRIMEM["Ferro",-17.66666666666667,AUTHORITY["EPSG","8909"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4805"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",34],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","31283"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=34 +k=1 +x_0=0 +y_0=0 +ellps=bessel +towgs84=682,-203,480,0,0,0,0 +pm=ferro +units=m +no_defs '); --- --- EPSG 31284 : MGI / Austria M28 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31284,'EPSG',31284,'PROJCS["MGI / Austria M28",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",10.33333333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31284"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=10.33333333333333 +k=1 +x_0=150000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31284,'EPSG',31284,'PROJCS["MGI / Austria M28",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",10.33333333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31284"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=10.33333333333333 +k=1 +x_0=150000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); --- --- EPSG 31285 : MGI / Austria M31 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31285,'EPSG',31285,'PROJCS["MGI / Austria M31",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",13.33333333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",450000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31285"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=13.33333333333333 +k=1 +x_0=450000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31285,'EPSG',31285,'PROJCS["MGI / Austria M31",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",13.33333333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",450000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31285"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=13.33333333333333 +k=1 +x_0=450000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); --- --- EPSG 31286 : MGI / Austria M34 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31286,'EPSG',31286,'PROJCS["MGI / Austria M34",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",16.33333333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",750000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31286"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=16.33333333333333 +k=1 +x_0=750000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31286,'EPSG',31286,'PROJCS["MGI / Austria M34",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",16.33333333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",750000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31286"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=16.33333333333333 +k=1 +x_0=750000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); --- --- EPSG 31287 : MGI / Austria Lambert --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31287,'EPSG',31287,'PROJCS["MGI / Austria Lambert",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",49],PARAMETER["standard_parallel_2",46],PARAMETER["latitude_of_origin",47.5],PARAMETER["central_meridian",13.33333333333333],PARAMETER["false_easting",400000],PARAMETER["false_northing",400000],AUTHORITY["EPSG","31287"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=lcc +lat_1=49 +lat_2=46 +lat_0=47.5 +lon_0=13.33333333333333 +x_0=400000 +y_0=400000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31287,'EPSG',31287,'PROJCS["MGI / Austria Lambert",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",49],PARAMETER["standard_parallel_2",46],PARAMETER["latitude_of_origin",47.5],PARAMETER["central_meridian",13.33333333333333],PARAMETER["false_easting",400000],PARAMETER["false_northing",400000],AUTHORITY["EPSG","31287"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=lcc +lat_1=49 +lat_2=46 +lat_0=47.5 +lon_0=13.33333333333333 +x_0=400000 +y_0=400000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); --- --- EPSG 31288 : MGI (Ferro) / M28 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31288,'EPSG',31288,'PROJCS["MGI (Ferro) / M28",GEOGCS["MGI (Ferro)",DATUM["Militar_Geographische_Institut_Ferro",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6805"]],PRIMEM["Ferro",-17.66666666666667,AUTHORITY["EPSG","8909"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4805"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",28],PARAMETER["scale_factor",1],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31288"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=28 +k=1 +x_0=150000 +y_0=0 +ellps=bessel +pm=ferro +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31288,'EPSG',31288,'PROJCS["MGI (Ferro) / M28",GEOGCS["MGI (Ferro)",DATUM["Militar_Geographische_Institut_Ferro",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[682,-203,480,0,0,0,0],AUTHORITY["EPSG","6805"]],PRIMEM["Ferro",-17.66666666666667,AUTHORITY["EPSG","8909"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4805"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",28],PARAMETER["scale_factor",1],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31288"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=28 +k=1 +x_0=150000 +y_0=0 +ellps=bessel +towgs84=682,-203,480,0,0,0,0 +pm=ferro +units=m +no_defs '); --- --- EPSG 31289 : MGI (Ferro) / M31 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31289,'EPSG',31289,'PROJCS["MGI (Ferro) / M31",GEOGCS["MGI (Ferro)",DATUM["Militar_Geographische_Institut_Ferro",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6805"]],PRIMEM["Ferro",-17.66666666666667,AUTHORITY["EPSG","8909"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4805"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",31],PARAMETER["scale_factor",1],PARAMETER["false_easting",450000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31289"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=31 +k=1 +x_0=450000 +y_0=0 +ellps=bessel +pm=ferro +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31289,'EPSG',31289,'PROJCS["MGI (Ferro) / M31",GEOGCS["MGI (Ferro)",DATUM["Militar_Geographische_Institut_Ferro",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[682,-203,480,0,0,0,0],AUTHORITY["EPSG","6805"]],PRIMEM["Ferro",-17.66666666666667,AUTHORITY["EPSG","8909"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4805"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",31],PARAMETER["scale_factor",1],PARAMETER["false_easting",450000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31289"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=31 +k=1 +x_0=450000 +y_0=0 +ellps=bessel +towgs84=682,-203,480,0,0,0,0 +pm=ferro +units=m +no_defs '); --- --- EPSG 31290 : MGI (Ferro) / M34 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31290,'EPSG',31290,'PROJCS["MGI (Ferro) / M34",GEOGCS["MGI (Ferro)",DATUM["Militar_Geographische_Institut_Ferro",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6805"]],PRIMEM["Ferro",-17.66666666666667,AUTHORITY["EPSG","8909"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4805"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",34],PARAMETER["scale_factor",1],PARAMETER["false_easting",750000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31290"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=34 +k=1 +x_0=750000 +y_0=0 +ellps=bessel +pm=ferro +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31290,'EPSG',31290,'PROJCS["MGI (Ferro) / M34",GEOGCS["MGI (Ferro)",DATUM["Militar_Geographische_Institut_Ferro",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[682,-203,480,0,0,0,0],AUTHORITY["EPSG","6805"]],PRIMEM["Ferro",-17.66666666666667,AUTHORITY["EPSG","8909"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4805"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",34],PARAMETER["scale_factor",1],PARAMETER["false_easting",750000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31290"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=34 +k=1 +x_0=750000 +y_0=0 +ellps=bessel +towgs84=682,-203,480,0,0,0,0 +pm=ferro +units=m +no_defs '); --- --- EPSG 31291 : MGI (Ferro) / Austria West Zone (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31291,'EPSG',31291,'PROJCS["MGI (Ferro) / Austria West Zone (deprecated)",GEOGCS["MGI (Ferro)",DATUM["Militar_Geographische_Institut_Ferro",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6805"]],PRIMEM["Ferro",-17.66666666666667,AUTHORITY["EPSG","8909"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4805"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",28],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","31291"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=28 +k=1 +x_0=0 +y_0=0 +ellps=bessel +pm=ferro +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31291,'EPSG',31291,'PROJCS["MGI (Ferro) / Austria West Zone (deprecated)",GEOGCS["MGI (Ferro)",DATUM["Militar_Geographische_Institut_Ferro",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[682,-203,480,0,0,0,0],AUTHORITY["EPSG","6805"]],PRIMEM["Ferro",-17.66666666666667,AUTHORITY["EPSG","8909"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4805"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",28],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","31291"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=28 +k=1 +x_0=0 +y_0=0 +ellps=bessel +towgs84=682,-203,480,0,0,0,0 +pm=ferro +units=m +no_defs '); --- --- EPSG 31292 : MGI (Ferro) / Austria Central Zone (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31292,'EPSG',31292,'PROJCS["MGI (Ferro) / Austria Central Zone (deprecated)",GEOGCS["MGI (Ferro)",DATUM["Militar_Geographische_Institut_Ferro",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6805"]],PRIMEM["Ferro",-17.66666666666667,AUTHORITY["EPSG","8909"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4805"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",31],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","31292"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=31 +k=1 +x_0=0 +y_0=0 +ellps=bessel +pm=ferro +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31292,'EPSG',31292,'PROJCS["MGI (Ferro) / Austria Central Zone (deprecated)",GEOGCS["MGI (Ferro)",DATUM["Militar_Geographische_Institut_Ferro",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[682,-203,480,0,0,0,0],AUTHORITY["EPSG","6805"]],PRIMEM["Ferro",-17.66666666666667,AUTHORITY["EPSG","8909"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4805"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",31],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","31292"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=31 +k=1 +x_0=0 +y_0=0 +ellps=bessel +towgs84=682,-203,480,0,0,0,0 +pm=ferro +units=m +no_defs '); --- --- EPSG 31293 : MGI (Ferro) / Austria East Zone (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31293,'EPSG',31293,'PROJCS["MGI (Ferro) / Austria East Zone (deprecated)",GEOGCS["MGI (Ferro)",DATUM["Militar_Geographische_Institut_Ferro",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6805"]],PRIMEM["Ferro",-17.66666666666667,AUTHORITY["EPSG","8909"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4805"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",34],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","31293"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=34 +k=1 +x_0=0 +y_0=0 +ellps=bessel +pm=ferro +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31293,'EPSG',31293,'PROJCS["MGI (Ferro) / Austria East Zone (deprecated)",GEOGCS["MGI (Ferro)",DATUM["Militar_Geographische_Institut_Ferro",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[682,-203,480,0,0,0,0],AUTHORITY["EPSG","6805"]],PRIMEM["Ferro",-17.66666666666667,AUTHORITY["EPSG","8909"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4805"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",34],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","31293"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=34 +k=1 +x_0=0 +y_0=0 +ellps=bessel +towgs84=682,-203,480,0,0,0,0 +pm=ferro +units=m +no_defs '); --- --- EPSG 31294 : MGI / M28 (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31294,'EPSG',31294,'PROJCS["MGI / M28 (deprecated)",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",10.33333333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31294"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=10.33333333333333 +k=1 +x_0=150000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31294,'EPSG',31294,'PROJCS["MGI / M28 (deprecated)",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",10.33333333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31294"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=10.33333333333333 +k=1 +x_0=150000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); --- --- EPSG 31295 : MGI / M31 (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31295,'EPSG',31295,'PROJCS["MGI / M31 (deprecated)",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",13.33333333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",450000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31295"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=13.33333333333333 +k=1 +x_0=450000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31295,'EPSG',31295,'PROJCS["MGI / M31 (deprecated)",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",13.33333333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",450000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31295"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=13.33333333333333 +k=1 +x_0=450000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); --- --- EPSG 31296 : MGI / M34 (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31296,'EPSG',31296,'PROJCS["MGI / M34 (deprecated)",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",16.33333333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",750000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31296"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=16.33333333333333 +k=1 +x_0=750000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31296,'EPSG',31296,'PROJCS["MGI / M34 (deprecated)",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",16.33333333333333],PARAMETER["scale_factor",1],PARAMETER["false_easting",750000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31296"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=16.33333333333333 +k=1 +x_0=750000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); --- --- EPSG 31297 : MGI / Austria Lambert (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31297,'EPSG',31297,'PROJCS["MGI / Austria Lambert (deprecated)",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",49],PARAMETER["standard_parallel_2",46],PARAMETER["latitude_of_origin",47.5],PARAMETER["central_meridian",13.33333333333333],PARAMETER["false_easting",400000],PARAMETER["false_northing",400000],AUTHORITY["EPSG","31297"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=49 +lat_2=46 +lat_0=47.5 +lon_0=13.33333333333333 +x_0=400000 +y_0=400000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31297,'EPSG',31297,'PROJCS["MGI / Austria Lambert (deprecated)",GEOGCS["MGI",DATUM["Militar_Geographische_Institute",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AUTHORITY["EPSG","6312"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4312"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",49],PARAMETER["standard_parallel_2",46],PARAMETER["latitude_of_origin",47.5],PARAMETER["central_meridian",13.33333333333333],PARAMETER["false_easting",400000],PARAMETER["false_northing",400000],AUTHORITY["EPSG","31297"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=49 +lat_2=46 +lat_0=47.5 +lon_0=13.33333333333333 +x_0=400000 +y_0=400000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs '); --- --- EPSG 31300 : Belge 1972 / Belge Lambert 72 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31300,'EPSG',31300,'PROJCS["Belge 1972 / Belge Lambert 72",GEOGCS["Belge 1972",DATUM["Reseau_National_Belge_1972",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1],AUTHORITY["EPSG","6313"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4313"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP_Belgium"],PARAMETER["standard_parallel_1",49.83333333333334],PARAMETER["standard_parallel_2",51.16666666666666],PARAMETER["latitude_of_origin",90],PARAMETER["central_meridian",4.356939722222222],PARAMETER["false_easting",150000.01256],PARAMETER["false_northing",5400088.4378],AUTHORITY["EPSG","31300"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=49.83333333333334 +lat_2=51.16666666666666 +lat_0=90 +lon_0=4.356939722222222 +x_0=150000.01256 +y_0=5400088.4378 +ellps=intl +towgs84=106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31300,'EPSG',31300,'PROJCS["Belge 1972 / Belge Lambert 72",GEOGCS["Belge 1972",DATUM["Reseau_National_Belge_1972",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-106.868628,52.297783,-103.723893,0.336570,-0.456955,1.842183,-1.2747],AUTHORITY["EPSG","6313"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4313"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP_Belgium"],PARAMETER["standard_parallel_1",49.83333333333334],PARAMETER["standard_parallel_2",51.16666666666666],PARAMETER["latitude_of_origin",90],PARAMETER["central_meridian",4.356939722222222],PARAMETER["false_easting",150000.01256],PARAMETER["false_northing",5400088.4378],AUTHORITY["EPSG","31300"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=49.83333333333334 +lat_2=51.16666666666666 +lat_0=90 +lon_0=4.356939722222222 +x_0=150000.01256 +y_0=5400088.4378 +ellps=intl +towgs84=-106.868628,52.297783,-103.723893,0.336570,-0.456955,1.842183,-1.2747 +units=m +no_defs '); --- --- EPSG 31370 : Belge 1972 / Belgian Lambert 72 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31370,'EPSG',31370,'PROJCS["Belge 1972 / Belgian Lambert 72",GEOGCS["Belge 1972",DATUM["Reseau_National_Belge_1972",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1],AUTHORITY["EPSG","6313"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4313"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",51.16666723333333],PARAMETER["standard_parallel_2",49.8333339],PARAMETER["latitude_of_origin",90],PARAMETER["central_meridian",4.367486666666666],PARAMETER["false_easting",150000.013],PARAMETER["false_northing",5400088.438],AUTHORITY["EPSG","31370"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=51.16666723333333 +lat_2=49.8333339 +lat_0=90 +lon_0=4.367486666666666 +x_0=150000.013 +y_0=5400088.438 +ellps=intl +towgs84=106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31370,'EPSG',31370,'PROJCS["Belge 1972 / Belgian Lambert 72",GEOGCS["Belge 1972",DATUM["Reseau_National_Belge_1972",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-106.868628,52.297783,-103.723893,0.336570,-0.456955,1.842183,-1.2747],AUTHORITY["EPSG","6313"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4313"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",51.16666723333333],PARAMETER["standard_parallel_2",49.8333339],PARAMETER["latitude_of_origin",90],PARAMETER["central_meridian",4.367486666666666],PARAMETER["false_easting",150000.013],PARAMETER["false_northing",5400088.438],AUTHORITY["EPSG","31370"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=51.16666723333333 +lat_2=49.8333339 +lat_0=90 +lon_0=4.367486666666666 +x_0=150000.013 +y_0=5400088.438 +ellps=intl +towgs84=-106.868628,52.297783,-103.723893,0.336570,-0.456955,1.842183,-1.2747 +units=m +no_defs '); --- --- EPSG 31461 : DHDN / 3-degree Gauss zone 1 (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31461,'EPSG',31461,'PROJCS["DHDN / 3-degree Gauss zone 1 (deprecated)",GEOGCS["DHDN",DATUM["Deutsches_Hauptdreiecksnetz",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6314"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4314"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",1],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31461"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=3 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31461,'EPSG',31461,'PROJCS["DHDN / 3-degree Gauss zone 1 (deprecated)",GEOGCS["DHDN",DATUM["Deutsches_Hauptdreiecksnetz",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[598.1,73.7,418.2,0.202,0.045,-2.455,6.7],AUTHORITY["EPSG","6314"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4314"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",1],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31461"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=3 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +towgs84=598.1,73.7,418.2,0.202,0.045,-2.455,6.7 +units=m +no_defs '); --- --- EPSG 31462 : DHDN / 3-degree Gauss zone 2 (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31462,'EPSG',31462,'PROJCS["DHDN / 3-degree Gauss zone 2 (deprecated)",GEOGCS["DHDN",DATUM["Deutsches_Hauptdreiecksnetz",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6314"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4314"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",6],PARAMETER["scale_factor",1],PARAMETER["false_easting",2500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31462"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=6 +k=1 +x_0=2500000 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31462,'EPSG',31462,'PROJCS["DHDN / 3-degree Gauss zone 2 (deprecated)",GEOGCS["DHDN",DATUM["Deutsches_Hauptdreiecksnetz",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[598.1,73.7,418.2,0.202,0.045,-2.455,6.7],AUTHORITY["EPSG","6314"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4314"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",6],PARAMETER["scale_factor",1],PARAMETER["false_easting",2500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31462"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=6 +k=1 +x_0=2500000 +y_0=0 +ellps=bessel +towgs84=598.1,73.7,418.2,0.202,0.045,-2.455,6.7 +units=m +no_defs '); --- --- EPSG 31463 : DHDN / 3-degree Gauss zone 3 (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31463,'EPSG',31463,'PROJCS["DHDN / 3-degree Gauss zone 3 (deprecated)",GEOGCS["DHDN",DATUM["Deutsches_Hauptdreiecksnetz",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6314"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4314"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",1],PARAMETER["false_easting",3500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31463"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31463,'EPSG',31463,'PROJCS["DHDN / 3-degree Gauss zone 3 (deprecated)",GEOGCS["DHDN",DATUM["Deutsches_Hauptdreiecksnetz",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[598.1,73.7,418.2,0.202,0.045,-2.455,6.7],AUTHORITY["EPSG","6314"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4314"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",1],PARAMETER["false_easting",3500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31463"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +ellps=bessel +towgs84=598.1,73.7,418.2,0.202,0.045,-2.455,6.7 +units=m +no_defs '); --- --- EPSG 31464 : DHDN / 3-degree Gauss zone 4 (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31464,'EPSG',31464,'PROJCS["DHDN / 3-degree Gauss zone 4 (deprecated)",GEOGCS["DHDN",DATUM["Deutsches_Hauptdreiecksnetz",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6314"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4314"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",12],PARAMETER["scale_factor",1],PARAMETER["false_easting",4500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31464"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31464,'EPSG',31464,'PROJCS["DHDN / 3-degree Gauss zone 4 (deprecated)",GEOGCS["DHDN",DATUM["Deutsches_Hauptdreiecksnetz",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[598.1,73.7,418.2,0.202,0.045,-2.455,6.7],AUTHORITY["EPSG","6314"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4314"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",12],PARAMETER["scale_factor",1],PARAMETER["false_easting",4500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31464"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 +ellps=bessel +towgs84=598.1,73.7,418.2,0.202,0.045,-2.455,6.7 +units=m +no_defs '); --- --- EPSG 31465 : DHDN / 3-degree Gauss zone 5 (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31465,'EPSG',31465,'PROJCS["DHDN / 3-degree Gauss zone 5 (deprecated)",GEOGCS["DHDN",DATUM["Deutsches_Hauptdreiecksnetz",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6314"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4314"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",1],PARAMETER["false_easting",5500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31465"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=5500000 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31465,'EPSG',31465,'PROJCS["DHDN / 3-degree Gauss zone 5 (deprecated)",GEOGCS["DHDN",DATUM["Deutsches_Hauptdreiecksnetz",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[598.1,73.7,418.2,0.202,0.045,-2.455,6.7],AUTHORITY["EPSG","6314"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4314"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",1],PARAMETER["false_easting",5500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31465"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=5500000 +y_0=0 +ellps=bessel +towgs84=598.1,73.7,418.2,0.202,0.045,-2.455,6.7 +units=m +no_defs '); --- --- EPSG 31466 : DHDN / 3-degree Gauss-Kruger zone 2 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31466,'EPSG',31466,'PROJCS["DHDN / 3-degree Gauss-Kruger zone 2",GEOGCS["DHDN",DATUM["Deutsches_Hauptdreiecksnetz",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6314"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4314"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",6],PARAMETER["scale_factor",1],PARAMETER["false_easting",2500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31466"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=6 +k=1 +x_0=2500000 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31466,'EPSG',31466,'PROJCS["DHDN / 3-degree Gauss-Kruger zone 2",GEOGCS["DHDN",DATUM["Deutsches_Hauptdreiecksnetz",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[598.1,73.7,418.2,0.202,0.045,-2.455,6.7],AUTHORITY["EPSG","6314"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4314"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",6],PARAMETER["scale_factor",1],PARAMETER["false_easting",2500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31466"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=6 +k=1 +x_0=2500000 +y_0=0 +ellps=bessel +towgs84=598.1,73.7,418.2,0.202,0.045,-2.455,6.7 +units=m +no_defs '); --- --- EPSG 31467 : DHDN / 3-degree Gauss-Kruger zone 3 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31467,'EPSG',31467,'PROJCS["DHDN / 3-degree Gauss-Kruger zone 3",GEOGCS["DHDN",DATUM["Deutsches_Hauptdreiecksnetz",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6314"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4314"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",1],PARAMETER["false_easting",3500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31467"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31467,'EPSG',31467,'PROJCS["DHDN / 3-degree Gauss-Kruger zone 3",GEOGCS["DHDN",DATUM["Deutsches_Hauptdreiecksnetz",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[598.1,73.7,418.2,0.202,0.045,-2.455,6.7],AUTHORITY["EPSG","6314"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4314"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",1],PARAMETER["false_easting",3500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31467"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +ellps=bessel +towgs84=598.1,73.7,418.2,0.202,0.045,-2.455,6.7 +units=m +no_defs '); --- --- EPSG 31468 : DHDN / 3-degree Gauss-Kruger zone 4 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31468,'EPSG',31468,'PROJCS["DHDN / 3-degree Gauss-Kruger zone 4",GEOGCS["DHDN",DATUM["Deutsches_Hauptdreiecksnetz",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6314"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4314"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",12],PARAMETER["scale_factor",1],PARAMETER["false_easting",4500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31468"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31468,'EPSG',31468,'PROJCS["DHDN / 3-degree Gauss-Kruger zone 4",GEOGCS["DHDN",DATUM["Deutsches_Hauptdreiecksnetz",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[598.1,73.7,418.2,0.202,0.045,-2.455,6.7],AUTHORITY["EPSG","6314"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4314"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",12],PARAMETER["scale_factor",1],PARAMETER["false_easting",4500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31468"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 +ellps=bessel +towgs84=598.1,73.7,418.2,0.202,0.045,-2.455,6.7 +units=m +no_defs '); --- --- EPSG 31469 : DHDN / 3-degree Gauss-Kruger zone 5 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31469,'EPSG',31469,'PROJCS["DHDN / 3-degree Gauss-Kruger zone 5",GEOGCS["DHDN",DATUM["Deutsches_Hauptdreiecksnetz",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6314"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4314"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",1],PARAMETER["false_easting",5500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31469"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=5500000 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31469,'EPSG',31469,'PROJCS["DHDN / 3-degree Gauss-Kruger zone 5",GEOGCS["DHDN",DATUM["Deutsches_Hauptdreiecksnetz",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[598.1,73.7,418.2,0.202,0.045,-2.455,6.7],AUTHORITY["EPSG","6314"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4314"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",1],PARAMETER["false_easting",5500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31469"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=5500000 +y_0=0 +ellps=bessel +towgs84=598.1,73.7,418.2,0.202,0.045,-2.455,6.7 +units=m +no_defs '); --- --- EPSG 31528 : Conakry 1905 / UTM zone 28N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31528,'EPSG',31528,'PROJCS["Conakry 1905 / UTM zone 28N",GEOGCS["Conakry 1905",DATUM["Conakry_1905",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-23,259,-9,0,0,0,0],AUTHORITY["EPSG","6315"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4315"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31528"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +a=6378249.2 +b=6356515 +towgs84=-23,259,-9,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31528,'EPSG',31528,'PROJCS["Conakry 1905 / UTM zone 28N",GEOGCS["Conakry 1905",DATUM["Conakry_1905",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-23,259,-9,0,0,0,0],AUTHORITY["EPSG","6315"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4315"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31528"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +a=6378249.2 +b=6356515 +towgs84=-23,259,-9,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31529 : Conakry 1905 / UTM zone 29N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31529,'EPSG',31529,'PROJCS["Conakry 1905 / UTM zone 29N",GEOGCS["Conakry 1905",DATUM["Conakry_1905",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-23,259,-9,0,0,0,0],AUTHORITY["EPSG","6315"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4315"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31529"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +a=6378249.2 +b=6356515 +towgs84=-23,259,-9,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31529,'EPSG',31529,'PROJCS["Conakry 1905 / UTM zone 29N",GEOGCS["Conakry 1905",DATUM["Conakry_1905",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-23,259,-9,0,0,0,0],AUTHORITY["EPSG","6315"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4315"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31529"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +a=6378249.2 +b=6356515 +towgs84=-23,259,-9,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31600 : Dealul Piscului 1930 / Stereo 33 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31600,'EPSG',31600,'PROJCS["Dealul Piscului 1930 / Stereo 33",GEOGCS["Dealul Piscului 1930",DATUM["Dealul_Piscului_1930",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6316"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4316"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",45.9],PARAMETER["central_meridian",25.39246588888889],PARAMETER["scale_factor",0.9996667],PARAMETER["false_easting",500000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","31600"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=sterea +lat_0=45.9 +lon_0=25.39246588888889 +k=0.9996667 +x_0=500000 +y_0=500000 +ellps=intl +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31600,'EPSG',31600,'PROJCS["Dealul Piscului 1930 / Stereo 33",GEOGCS["Dealul Piscului 1930",DATUM["Dealul_Piscului_1930",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[103.25,-100.4,-307.19,0,0,0,0],AUTHORITY["EPSG","6316"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4316"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",45.9],PARAMETER["central_meridian",25.39246588888889],PARAMETER["scale_factor",0.9996667],PARAMETER["false_easting",500000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","31600"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=sterea +lat_0=45.9 +lon_0=25.39246588888889 +k=0.9996667 +x_0=500000 +y_0=500000 +ellps=intl +towgs84=103.25,-100.4,-307.19,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31700 : Dealul Piscului 1970/ Stereo 70 (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31700,'EPSG',31700,'PROJCS["Dealul Piscului 1970/ Stereo 70 (deprecated)",GEOGCS["Dealul Piscului 1970",DATUM["Dealul_Piscului_1970",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],AUTHORITY["EPSG","6317"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4317"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",46],PARAMETER["central_meridian",25],PARAMETER["scale_factor",0.99975],PARAMETER["false_easting",500000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","31700"],AXIS["Y",EAST],AXIS["X",NORTH]]','+proj=sterea +lat_0=46 +lon_0=25 +k=0.99975 +x_0=500000 +y_0=500000 +ellps=krass +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31700,'EPSG',31700,'PROJCS["Dealul Piscului 1970/ Stereo 70 (deprecated)",GEOGCS["Dealul Piscului 1970",DATUM["Dealul_Piscului_1970",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]],TOWGS84[28,-121,-77,0,0,0,0],AUTHORITY["EPSG","6317"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4317"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",46],PARAMETER["central_meridian",25],PARAMETER["scale_factor",0.99975],PARAMETER["false_easting",500000],PARAMETER["false_northing",500000],AUTHORITY["EPSG","31700"],AXIS["X",NORTH],AXIS["Y",EAST]]','+proj=sterea +lat_0=46 +lon_0=25 +k=0.99975 +x_0=500000 +y_0=500000 +ellps=krass +towgs84=28,-121,-77,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31838 : NGN / UTM zone 38N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31838,'EPSG',31838,'PROJCS["NGN / UTM zone 38N",GEOGCS["NGN",DATUM["National_Geodetic_Network",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[-3.2,-5.7,2.8,0,0,0,0],AUTHORITY["EPSG","6318"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4318"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31838"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +ellps=WGS84 +towgs84=-3.2,-5.7,2.8,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31838,'EPSG',31838,'PROJCS["NGN / UTM zone 38N",GEOGCS["NGN",DATUM["National_Geodetic_Network",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[-3.2,-5.7,2.8,0,0,0,0],AUTHORITY["EPSG","6318"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4318"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31838"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +ellps=WGS84 +towgs84=-3.2,-5.7,2.8,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31839 : NGN / UTM zone 39N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31839,'EPSG',31839,'PROJCS["NGN / UTM zone 39N",GEOGCS["NGN",DATUM["National_Geodetic_Network",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[-3.2,-5.7,2.8,0,0,0,0],AUTHORITY["EPSG","6318"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4318"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31839"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=39 +ellps=WGS84 +towgs84=-3.2,-5.7,2.8,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31839,'EPSG',31839,'PROJCS["NGN / UTM zone 39N",GEOGCS["NGN",DATUM["National_Geodetic_Network",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[-3.2,-5.7,2.8,0,0,0,0],AUTHORITY["EPSG","6318"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4318"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31839"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=39 +ellps=WGS84 +towgs84=-3.2,-5.7,2.8,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31900 : KUDAMS / KTM (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31900,'EPSG',31900,'PROJCS["KUDAMS / KTM (deprecated)",GEOGCS["KUDAMS",DATUM["Kuwait_Utility",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6319"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4319"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",48],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31900"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=48 +k=0.9996 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31900,'EPSG',31900,'PROJCS["KUDAMS / KTM (deprecated)",GEOGCS["KUDAMS",DATUM["Kuwait_Utility",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[-20.8,11.3,2.4,0,0,0,0],AUTHORITY["EPSG","6319"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4319"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",48],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31900"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=48 +k=0.9996 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=-20.8,11.3,2.4,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31901 : KUDAMS / KTM --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31901,'EPSG',31901,'PROJCS["KUDAMS / KTM",GEOGCS["KUDAMS",DATUM["Kuwait_Utility",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6319"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4319"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",48],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31901"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=48 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31901,'EPSG',31901,'PROJCS["KUDAMS / KTM",GEOGCS["KUDAMS",DATUM["Kuwait_Utility",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[-20.8,11.3,2.4,0,0,0,0],AUTHORITY["EPSG","6319"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4319"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",48],PARAMETER["scale_factor",1],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31901"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=48 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=-20.8,11.3,2.4,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31965 : SIRGAS 2000 / UTM zone 11N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31965,'EPSG',31965,'PROJCS["SIRGAS 2000 / UTM zone 11N",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],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],AUTHORITY["EPSG","31965"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=11 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31965,'EPSG',31965,'PROJCS["SIRGAS 2000 / UTM zone 11N",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],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],AUTHORITY["EPSG","31965"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=11 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31966 : SIRGAS 2000 / UTM zone 12N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31966,'EPSG',31966,'PROJCS["SIRGAS 2000 / UTM zone 12N",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31966"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=12 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31966,'EPSG',31966,'PROJCS["SIRGAS 2000 / UTM zone 12N",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31966"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=12 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31967 : SIRGAS 2000 / UTM zone 13N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31967,'EPSG',31967,'PROJCS["SIRGAS 2000 / UTM zone 13N",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31967"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=13 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31967,'EPSG',31967,'PROJCS["SIRGAS 2000 / UTM zone 13N",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31967"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=13 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31968 : SIRGAS 2000 / UTM zone 14N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31968,'EPSG',31968,'PROJCS["SIRGAS 2000 / UTM zone 14N",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31968"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=14 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31968,'EPSG',31968,'PROJCS["SIRGAS 2000 / UTM zone 14N",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31968"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=14 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31969 : SIRGAS 2000 / UTM zone 15N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31969,'EPSG',31969,'PROJCS["SIRGAS 2000 / UTM zone 15N",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31969"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=15 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31969,'EPSG',31969,'PROJCS["SIRGAS 2000 / UTM zone 15N",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31969"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=15 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31970 : SIRGAS 2000 / UTM zone 16N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31970,'EPSG',31970,'PROJCS["SIRGAS 2000 / UTM zone 16N",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31970"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=16 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31970,'EPSG',31970,'PROJCS["SIRGAS 2000 / UTM zone 16N",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31970"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=16 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31971 : SIRGAS 2000 / UTM zone 17N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31971,'EPSG',31971,'PROJCS["SIRGAS 2000 / UTM zone 17N",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31971"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31971,'EPSG',31971,'PROJCS["SIRGAS 2000 / UTM zone 17N",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31971"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31972 : SIRGAS 2000 / UTM zone 18N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31972,'EPSG',31972,'PROJCS["SIRGAS 2000 / UTM zone 18N",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31972"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31972,'EPSG',31972,'PROJCS["SIRGAS 2000 / UTM zone 18N",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31972"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31973 : SIRGAS 2000 / UTM zone 19N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31973,'EPSG',31973,'PROJCS["SIRGAS 2000 / UTM zone 19N",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31973"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31973,'EPSG',31973,'PROJCS["SIRGAS 2000 / UTM zone 19N",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31973"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31974 : SIRGAS 2000 / UTM zone 20N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31974,'EPSG',31974,'PROJCS["SIRGAS 2000 / UTM zone 20N",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31974"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31974,'EPSG',31974,'PROJCS["SIRGAS 2000 / UTM zone 20N",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31974"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31975 : SIRGAS 2000 / UTM zone 21N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31975,'EPSG',31975,'PROJCS["SIRGAS 2000 / UTM zone 21N",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31975"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31975,'EPSG',31975,'PROJCS["SIRGAS 2000 / UTM zone 21N",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31975"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31976 : SIRGAS 2000 / UTM zone 22N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31976,'EPSG',31976,'PROJCS["SIRGAS 2000 / UTM zone 22N",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31976"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31976,'EPSG',31976,'PROJCS["SIRGAS 2000 / UTM zone 22N",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31976"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31977 : SIRGAS 2000 / UTM zone 17S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31977,'EPSG',31977,'PROJCS["SIRGAS 2000 / UTM zone 17S",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","31977"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31977,'EPSG',31977,'PROJCS["SIRGAS 2000 / UTM zone 17S",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","31977"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31978 : SIRGAS 2000 / UTM zone 18S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31978,'EPSG',31978,'PROJCS["SIRGAS 2000 / UTM zone 18S",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","31978"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31978,'EPSG',31978,'PROJCS["SIRGAS 2000 / UTM zone 18S",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","31978"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31979 : SIRGAS 2000 / UTM zone 19S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31979,'EPSG',31979,'PROJCS["SIRGAS 2000 / UTM zone 19S",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","31979"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31979,'EPSG',31979,'PROJCS["SIRGAS 2000 / UTM zone 19S",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","31979"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31980 : SIRGAS 2000 / UTM zone 20S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31980,'EPSG',31980,'PROJCS["SIRGAS 2000 / UTM zone 20S",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","31980"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31980,'EPSG',31980,'PROJCS["SIRGAS 2000 / UTM zone 20S",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","31980"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31981 : SIRGAS 2000 / UTM zone 21S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31981,'EPSG',31981,'PROJCS["SIRGAS 2000 / UTM zone 21S",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","31981"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31981,'EPSG',31981,'PROJCS["SIRGAS 2000 / UTM zone 21S",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","31981"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31982 : SIRGAS 2000 / UTM zone 22S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31982,'EPSG',31982,'PROJCS["SIRGAS 2000 / UTM zone 22S",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","31982"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31982,'EPSG',31982,'PROJCS["SIRGAS 2000 / UTM zone 22S",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","31982"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31983 : SIRGAS 2000 / UTM zone 23S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31983,'EPSG',31983,'PROJCS["SIRGAS 2000 / UTM zone 23S",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","31983"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=23 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31983,'EPSG',31983,'PROJCS["SIRGAS 2000 / UTM zone 23S",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","31983"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=23 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31984 : SIRGAS 2000 / UTM zone 24S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31984,'EPSG',31984,'PROJCS["SIRGAS 2000 / UTM zone 24S",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","31984"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=24 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31984,'EPSG',31984,'PROJCS["SIRGAS 2000 / UTM zone 24S",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","31984"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=24 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31985 : SIRGAS 2000 / UTM zone 25S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31985,'EPSG',31985,'PROJCS["SIRGAS 2000 / UTM zone 25S",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","31985"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=25 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31985,'EPSG',31985,'PROJCS["SIRGAS 2000 / UTM zone 25S",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","31985"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=25 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31986 : SIRGAS 1995 / UTM zone 17N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31986,'EPSG',31986,'PROJCS["SIRGAS 1995 / UTM zone 17N",GEOGCS["SIRGAS 1995",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6170"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4170"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31986"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31986,'EPSG',31986,'PROJCS["SIRGAS 1995 / UTM zone 17N",GEOGCS["SIRGAS 1995",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6170"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4170"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31986"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31987 : SIRGAS 1995 / UTM zone 18N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31987,'EPSG',31987,'PROJCS["SIRGAS 1995 / UTM zone 18N",GEOGCS["SIRGAS 1995",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6170"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4170"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31987"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31987,'EPSG',31987,'PROJCS["SIRGAS 1995 / UTM zone 18N",GEOGCS["SIRGAS 1995",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6170"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4170"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31987"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31988 : SIRGAS 1995 / UTM zone 19N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31988,'EPSG',31988,'PROJCS["SIRGAS 1995 / UTM zone 19N",GEOGCS["SIRGAS 1995",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6170"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4170"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31988"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31988,'EPSG',31988,'PROJCS["SIRGAS 1995 / UTM zone 19N",GEOGCS["SIRGAS 1995",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6170"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4170"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31988"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31989 : SIRGAS 1995 / UTM zone 20N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31989,'EPSG',31989,'PROJCS["SIRGAS 1995 / UTM zone 20N",GEOGCS["SIRGAS 1995",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6170"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4170"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31989"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31989,'EPSG',31989,'PROJCS["SIRGAS 1995 / UTM zone 20N",GEOGCS["SIRGAS 1995",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6170"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4170"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31989"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31990 : SIRGAS 1995 / UTM zone 21N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31990,'EPSG',31990,'PROJCS["SIRGAS 1995 / UTM zone 21N",GEOGCS["SIRGAS 1995",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6170"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4170"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31990"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31990,'EPSG',31990,'PROJCS["SIRGAS 1995 / UTM zone 21N",GEOGCS["SIRGAS 1995",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6170"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4170"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31990"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31991 : SIRGAS 1995 / UTM zone 22N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31991,'EPSG',31991,'PROJCS["SIRGAS 1995 / UTM zone 22N",GEOGCS["SIRGAS 1995",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6170"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4170"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31991"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31991,'EPSG',31991,'PROJCS["SIRGAS 1995 / UTM zone 22N",GEOGCS["SIRGAS 1995",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6170"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4170"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","31991"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31992 : SIRGAS 1995 / UTM zone 17S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31992,'EPSG',31992,'PROJCS["SIRGAS 1995 / UTM zone 17S",GEOGCS["SIRGAS 1995",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6170"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4170"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","31992"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31992,'EPSG',31992,'PROJCS["SIRGAS 1995 / UTM zone 17S",GEOGCS["SIRGAS 1995",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6170"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4170"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","31992"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31993 : SIRGAS 1995 / UTM zone 18S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31993,'EPSG',31993,'PROJCS["SIRGAS 1995 / UTM zone 18S",GEOGCS["SIRGAS 1995",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6170"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4170"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","31993"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31993,'EPSG',31993,'PROJCS["SIRGAS 1995 / UTM zone 18S",GEOGCS["SIRGAS 1995",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6170"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4170"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","31993"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31994 : SIRGAS 1995 / UTM zone 19S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31994,'EPSG',31994,'PROJCS["SIRGAS 1995 / UTM zone 19S",GEOGCS["SIRGAS 1995",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6170"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4170"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","31994"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31994,'EPSG',31994,'PROJCS["SIRGAS 1995 / UTM zone 19S",GEOGCS["SIRGAS 1995",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6170"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4170"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","31994"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31995 : SIRGAS 1995 / UTM zone 20S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31995,'EPSG',31995,'PROJCS["SIRGAS 1995 / UTM zone 20S",GEOGCS["SIRGAS 1995",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6170"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4170"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","31995"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31995,'EPSG',31995,'PROJCS["SIRGAS 1995 / UTM zone 20S",GEOGCS["SIRGAS 1995",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6170"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4170"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","31995"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31996 : SIRGAS 1995 / UTM zone 21S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31996,'EPSG',31996,'PROJCS["SIRGAS 1995 / UTM zone 21S",GEOGCS["SIRGAS 1995",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6170"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4170"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","31996"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31996,'EPSG',31996,'PROJCS["SIRGAS 1995 / UTM zone 21S",GEOGCS["SIRGAS 1995",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6170"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4170"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","31996"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31997 : SIRGAS 1995 / UTM zone 22S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31997,'EPSG',31997,'PROJCS["SIRGAS 1995 / UTM zone 22S",GEOGCS["SIRGAS 1995",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6170"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4170"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","31997"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31997,'EPSG',31997,'PROJCS["SIRGAS 1995 / UTM zone 22S",GEOGCS["SIRGAS 1995",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6170"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4170"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","31997"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31998 : SIRGAS 1995 / UTM zone 23S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31998,'EPSG',31998,'PROJCS["SIRGAS 1995 / UTM zone 23S",GEOGCS["SIRGAS 1995",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6170"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4170"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","31998"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=23 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31998,'EPSG',31998,'PROJCS["SIRGAS 1995 / UTM zone 23S",GEOGCS["SIRGAS 1995",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6170"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4170"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","31998"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=23 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 31999 : SIRGAS 1995 / UTM zone 24S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31999,'EPSG',31999,'PROJCS["SIRGAS 1995 / UTM zone 24S",GEOGCS["SIRGAS 1995",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6170"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4170"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","31999"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=24 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (31999,'EPSG',31999,'PROJCS["SIRGAS 1995 / UTM zone 24S",GEOGCS["SIRGAS 1995",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6170"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4170"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","31999"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=24 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32000 : SIRGAS 1995 / UTM zone 25S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32000,'EPSG',32000,'PROJCS["SIRGAS 1995 / UTM zone 25S",GEOGCS["SIRGAS 1995",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6170"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4170"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32000"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=25 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32000,'EPSG',32000,'PROJCS["SIRGAS 1995 / UTM zone 25S",GEOGCS["SIRGAS 1995",DATUM["Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6170"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4170"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32000"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=25 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32001 : NAD27 / Montana North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32001,'EPSG',32001,'PROJCS["NAD27 / Montana North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.71666666666667],PARAMETER["standard_parallel_2",47.85],PARAMETER["latitude_of_origin",47],PARAMETER["central_meridian",-109.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32001"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.71666666666667 +lat_2=47.85 +lat_0=47 +lon_0=-109.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32001,'EPSG',32001,'PROJCS["NAD27 / Montana North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.71666666666667],PARAMETER["standard_parallel_2",47.85],PARAMETER["latitude_of_origin",47],PARAMETER["central_meridian",-109.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32001"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.71666666666667 +lat_2=47.85 +lat_0=47 +lon_0=-109.5 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32002 : NAD27 / Montana Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32002,'EPSG',32002,'PROJCS["NAD27 / Montana Central",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.88333333333333],PARAMETER["standard_parallel_2",46.45],PARAMETER["latitude_of_origin",45.83333333333334],PARAMETER["central_meridian",-109.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32002"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.88333333333333 +lat_2=46.45 +lat_0=45.83333333333334 +lon_0=-109.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32002,'EPSG',32002,'PROJCS["NAD27 / Montana Central",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.88333333333333],PARAMETER["standard_parallel_2",46.45],PARAMETER["latitude_of_origin",45.83333333333334],PARAMETER["central_meridian",-109.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32002"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.88333333333333 +lat_2=46.45 +lat_0=45.83333333333334 +lon_0=-109.5 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32003 : NAD27 / Montana South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32003,'EPSG',32003,'PROJCS["NAD27 / Montana South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",46.4],PARAMETER["standard_parallel_2",44.86666666666667],PARAMETER["latitude_of_origin",44],PARAMETER["central_meridian",-109.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32003"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=46.4 +lat_2=44.86666666666667 +lat_0=44 +lon_0=-109.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32003,'EPSG',32003,'PROJCS["NAD27 / Montana South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",46.4],PARAMETER["standard_parallel_2",44.86666666666667],PARAMETER["latitude_of_origin",44],PARAMETER["central_meridian",-109.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32003"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=46.4 +lat_2=44.86666666666667 +lat_0=44 +lon_0=-109.5 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32005 : NAD27 / Nebraska North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32005,'EPSG',32005,'PROJCS["NAD27 / Nebraska North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.85],PARAMETER["standard_parallel_2",42.81666666666667],PARAMETER["latitude_of_origin",41.33333333333334],PARAMETER["central_meridian",-100],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32005"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.85 +lat_2=42.81666666666667 +lat_0=41.33333333333334 +lon_0=-100 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32005,'EPSG',32005,'PROJCS["NAD27 / Nebraska North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.85],PARAMETER["standard_parallel_2",42.81666666666667],PARAMETER["latitude_of_origin",41.33333333333334],PARAMETER["central_meridian",-100],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32005"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.85 +lat_2=42.81666666666667 +lat_0=41.33333333333334 +lon_0=-100 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32006 : NAD27 / Nebraska South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32006,'EPSG',32006,'PROJCS["NAD27 / Nebraska South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.28333333333333],PARAMETER["standard_parallel_2",41.71666666666667],PARAMETER["latitude_of_origin",39.66666666666666],PARAMETER["central_meridian",-99.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32006"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.28333333333333 +lat_2=41.71666666666667 +lat_0=39.66666666666666 +lon_0=-99.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32006,'EPSG',32006,'PROJCS["NAD27 / Nebraska South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.28333333333333],PARAMETER["standard_parallel_2",41.71666666666667],PARAMETER["latitude_of_origin",39.66666666666666],PARAMETER["central_meridian",-99.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32006"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.28333333333333 +lat_2=41.71666666666667 +lat_0=39.66666666666666 +lon_0=-99.5 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32007 : NAD27 / Nevada East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32007,'EPSG',32007,'PROJCS["NAD27 / Nevada East",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",34.75],PARAMETER["central_meridian",-115.5833333333333],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32007"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32007,'EPSG',32007,'PROJCS["NAD27 / Nevada East",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",34.75],PARAMETER["central_meridian",-115.5833333333333],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32007"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32008 : NAD27 / Nevada Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32008,'EPSG',32008,'PROJCS["NAD27 / Nevada Central",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",34.75],PARAMETER["central_meridian",-116.6666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32008"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32008,'EPSG',32008,'PROJCS["NAD27 / Nevada Central",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",34.75],PARAMETER["central_meridian",-116.6666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32008"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32009 : NAD27 / Nevada West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32009,'EPSG',32009,'PROJCS["NAD27 / Nevada West",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",34.75],PARAMETER["central_meridian",-118.5833333333333],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32009"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32009,'EPSG',32009,'PROJCS["NAD27 / Nevada West",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",34.75],PARAMETER["central_meridian",-118.5833333333333],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32009"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32010 : NAD27 / New Hampshire --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32010,'EPSG',32010,'PROJCS["NAD27 / New Hampshire",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.5],PARAMETER["central_meridian",-71.66666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32010"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999966667 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32010,'EPSG',32010,'PROJCS["NAD27 / New Hampshire",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.5],PARAMETER["central_meridian",-71.66666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32010"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999966667 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32011 : NAD27 / New Jersey --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32011,'EPSG',32011,'PROJCS["NAD27 / New Jersey",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",38.83333333333334],PARAMETER["central_meridian",-74.66666666666667],PARAMETER["scale_factor",0.999975],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32011"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.66666666666667 +k=0.9999749999999999 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32011,'EPSG',32011,'PROJCS["NAD27 / New Jersey",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",38.83333333333334],PARAMETER["central_meridian",-74.66666666666667],PARAMETER["scale_factor",0.999975],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32011"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.66666666666667 +k=0.9999749999999999 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32012 : NAD27 / New Mexico East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32012,'EPSG',32012,'PROJCS["NAD27 / New Mexico East",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-104.3333333333333],PARAMETER["scale_factor",0.999909091],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32012"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.999909091 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32012,'EPSG',32012,'PROJCS["NAD27 / New Mexico East",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-104.3333333333333],PARAMETER["scale_factor",0.999909091],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32012"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.999909091 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32013 : NAD27 / New Mexico Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32013,'EPSG',32013,'PROJCS["NAD27 / New Mexico Central",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-106.25],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32013"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32013,'EPSG',32013,'PROJCS["NAD27 / New Mexico Central",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-106.25],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32013"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.9999 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32014 : NAD27 / New Mexico West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32014,'EPSG',32014,'PROJCS["NAD27 / New Mexico West",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-107.8333333333333],PARAMETER["scale_factor",0.999916667],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32014"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.999916667 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32014,'EPSG',32014,'PROJCS["NAD27 / New Mexico West",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-107.8333333333333],PARAMETER["scale_factor",0.999916667],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32014"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.999916667 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32015 : NAD27 / New York East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32015,'EPSG',32015,'PROJCS["NAD27 / New York East",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-74.33333333333333],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32015"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40 +lon_0=-74.33333333333333 +k=0.999966667 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32015,'EPSG',32015,'PROJCS["NAD27 / New York East",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-74.33333333333333],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32015"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40 +lon_0=-74.33333333333333 +k=0.999966667 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32016 : NAD27 / New York Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32016,'EPSG',32016,'PROJCS["NAD27 / New York Central",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-76.58333333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32016"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.9999375 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32016,'EPSG',32016,'PROJCS["NAD27 / New York Central",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-76.58333333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32016"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.9999375 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32017 : NAD27 / New York West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32017,'EPSG',32017,'PROJCS["NAD27 / New York West",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-78.58333333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32017"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.9999375 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32017,'EPSG',32017,'PROJCS["NAD27 / New York West",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-78.58333333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32017"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.9999375 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- ---- EPSG 32018 : NAD27 / New York Long Island +--- EPSG 32018 : NAD27 / New York Long Island (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32018,'EPSG',32018,'PROJCS["NAD27 / New York Long Island",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.03333333333333],PARAMETER["standard_parallel_2",40.66666666666666],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-74],PARAMETER["false_easting",1000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32018"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.03333333333333 +lat_2=40.66666666666666 +lat_0=40.5 +lon_0=-74 +x_0=304800.6096012192 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32018,'EPSG',32018,'PROJCS["NAD27 / New York Long Island (deprecated)",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.03333333333333],PARAMETER["standard_parallel_2",40.66666666666666],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-74],PARAMETER["false_easting",1000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32018"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.03333333333333 +lat_2=40.66666666666666 +lat_0=40.5 +lon_0=-74 +x_0=304800.6096012192 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32019 : NAD27 / North Carolina --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32019,'EPSG',32019,'PROJCS["NAD27 / North Carolina",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",34.33333333333334],PARAMETER["standard_parallel_2",36.16666666666666],PARAMETER["latitude_of_origin",33.75],PARAMETER["central_meridian",-79],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32019"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=34.33333333333334 +lat_2=36.16666666666666 +lat_0=33.75 +lon_0=-79 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32019,'EPSG',32019,'PROJCS["NAD27 / North Carolina",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",34.33333333333334],PARAMETER["standard_parallel_2",36.16666666666666],PARAMETER["latitude_of_origin",33.75],PARAMETER["central_meridian",-79],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32019"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=34.33333333333334 +lat_2=36.16666666666666 +lat_0=33.75 +lon_0=-79 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32020 : NAD27 / North Dakota North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32020,'EPSG',32020,'PROJCS["NAD27 / North Dakota North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.43333333333333],PARAMETER["standard_parallel_2",48.73333333333333],PARAMETER["latitude_of_origin",47],PARAMETER["central_meridian",-100.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32020"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.43333333333333 +lat_2=48.73333333333333 +lat_0=47 +lon_0=-100.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32020,'EPSG',32020,'PROJCS["NAD27 / North Dakota North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.43333333333333],PARAMETER["standard_parallel_2",48.73333333333333],PARAMETER["latitude_of_origin",47],PARAMETER["central_meridian",-100.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32020"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.43333333333333 +lat_2=48.73333333333333 +lat_0=47 +lon_0=-100.5 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32021 : NAD27 / North Dakota South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32021,'EPSG',32021,'PROJCS["NAD27 / North Dakota South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",46.18333333333333],PARAMETER["standard_parallel_2",47.48333333333333],PARAMETER["latitude_of_origin",45.66666666666666],PARAMETER["central_meridian",-100.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32021"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=46.18333333333333 +lat_2=47.48333333333333 +lat_0=45.66666666666666 +lon_0=-100.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32021,'EPSG',32021,'PROJCS["NAD27 / North Dakota South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",46.18333333333333],PARAMETER["standard_parallel_2",47.48333333333333],PARAMETER["latitude_of_origin",45.66666666666666],PARAMETER["central_meridian",-100.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32021"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=46.18333333333333 +lat_2=47.48333333333333 +lat_0=45.66666666666666 +lon_0=-100.5 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32022 : NAD27 / Ohio North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32022,'EPSG',32022,'PROJCS["NAD27 / Ohio North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.43333333333333],PARAMETER["standard_parallel_2",41.7],PARAMETER["latitude_of_origin",39.66666666666666],PARAMETER["central_meridian",-82.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32022"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.43333333333333 +lat_2=41.7 +lat_0=39.66666666666666 +lon_0=-82.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32022,'EPSG',32022,'PROJCS["NAD27 / Ohio North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.43333333333333],PARAMETER["standard_parallel_2",41.7],PARAMETER["latitude_of_origin",39.66666666666666],PARAMETER["central_meridian",-82.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32022"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.43333333333333 +lat_2=41.7 +lat_0=39.66666666666666 +lon_0=-82.5 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32023 : NAD27 / Ohio South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32023,'EPSG',32023,'PROJCS["NAD27 / Ohio South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.73333333333333],PARAMETER["standard_parallel_2",40.03333333333333],PARAMETER["latitude_of_origin",38],PARAMETER["central_meridian",-82.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32023"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.73333333333333 +lat_2=40.03333333333333 +lat_0=38 +lon_0=-82.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32023,'EPSG',32023,'PROJCS["NAD27 / Ohio South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.73333333333333],PARAMETER["standard_parallel_2",40.03333333333333],PARAMETER["latitude_of_origin",38],PARAMETER["central_meridian",-82.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32023"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.73333333333333 +lat_2=40.03333333333333 +lat_0=38 +lon_0=-82.5 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32024 : NAD27 / Oklahoma North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32024,'EPSG',32024,'PROJCS["NAD27 / Oklahoma North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",35.56666666666667],PARAMETER["standard_parallel_2",36.76666666666667],PARAMETER["latitude_of_origin",35],PARAMETER["central_meridian",-98],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32024"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=35.56666666666667 +lat_2=36.76666666666667 +lat_0=35 +lon_0=-98 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32024,'EPSG',32024,'PROJCS["NAD27 / Oklahoma North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",35.56666666666667],PARAMETER["standard_parallel_2",36.76666666666667],PARAMETER["latitude_of_origin",35],PARAMETER["central_meridian",-98],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32024"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=35.56666666666667 +lat_2=36.76666666666667 +lat_0=35 +lon_0=-98 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32025 : NAD27 / Oklahoma South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32025,'EPSG',32025,'PROJCS["NAD27 / Oklahoma South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",33.93333333333333],PARAMETER["standard_parallel_2",35.23333333333333],PARAMETER["latitude_of_origin",33.33333333333334],PARAMETER["central_meridian",-98],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32025"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=33.93333333333333 +lat_2=35.23333333333333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32025,'EPSG',32025,'PROJCS["NAD27 / Oklahoma South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",33.93333333333333],PARAMETER["standard_parallel_2",35.23333333333333],PARAMETER["latitude_of_origin",33.33333333333334],PARAMETER["central_meridian",-98],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32025"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=33.93333333333333 +lat_2=35.23333333333333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32026 : NAD27 / Oregon North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32026,'EPSG',32026,'PROJCS["NAD27 / Oregon North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44.33333333333334],PARAMETER["standard_parallel_2",46],PARAMETER["latitude_of_origin",43.66666666666666],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32026"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44.33333333333334 +lat_2=46 +lat_0=43.66666666666666 +lon_0=-120.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32026,'EPSG',32026,'PROJCS["NAD27 / Oregon North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44.33333333333334],PARAMETER["standard_parallel_2",46],PARAMETER["latitude_of_origin",43.66666666666666],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32026"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44.33333333333334 +lat_2=46 +lat_0=43.66666666666666 +lon_0=-120.5 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32027 : NAD27 / Oregon South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32027,'EPSG',32027,'PROJCS["NAD27 / Oregon South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",42.33333333333334],PARAMETER["standard_parallel_2",44],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32027"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=42.33333333333334 +lat_2=44 +lat_0=41.66666666666666 +lon_0=-120.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32027,'EPSG',32027,'PROJCS["NAD27 / Oregon South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",42.33333333333334],PARAMETER["standard_parallel_2",44],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32027"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=42.33333333333334 +lat_2=44 +lat_0=41.66666666666666 +lon_0=-120.5 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32028 : NAD27 / Pennsylvania North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32028,'EPSG',32028,'PROJCS["NAD27 / Pennsylvania North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.88333333333333],PARAMETER["standard_parallel_2",41.95],PARAMETER["latitude_of_origin",40.16666666666666],PARAMETER["central_meridian",-77.75],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32028"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.88333333333333 +lat_2=41.95 +lat_0=40.16666666666666 +lon_0=-77.75 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32028,'EPSG',32028,'PROJCS["NAD27 / Pennsylvania North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.88333333333333],PARAMETER["standard_parallel_2",41.95],PARAMETER["latitude_of_origin",40.16666666666666],PARAMETER["central_meridian",-77.75],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32028"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.88333333333333 +lat_2=41.95 +lat_0=40.16666666666666 +lon_0=-77.75 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- ---- EPSG 32029 : NAD27 / Pennsylvania South +--- EPSG 32029 : NAD27 / Pennsylvania South (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32029,'EPSG',32029,'PROJCS["NAD27 / Pennsylvania South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.93333333333333],PARAMETER["standard_parallel_2",40.8],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-77.75],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32029"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.93333333333333 +lat_2=40.8 +lat_0=39.33333333333334 +lon_0=-77.75 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32029,'EPSG',32029,'PROJCS["NAD27 / Pennsylvania South (deprecated)",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.93333333333333],PARAMETER["standard_parallel_2",40.8],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-77.75],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32029"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.93333333333333 +lat_2=40.8 +lat_0=39.33333333333334 +lon_0=-77.75 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32030 : NAD27 / Rhode Island --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32030,'EPSG',32030,'PROJCS["NAD27 / Rhode Island",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.08333333333334],PARAMETER["central_meridian",-71.5],PARAMETER["scale_factor",0.9999938],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32030"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.08333333333334 +lon_0=-71.5 +k=0.9999938 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32030,'EPSG',32030,'PROJCS["NAD27 / Rhode Island",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.08333333333334],PARAMETER["central_meridian",-71.5],PARAMETER["scale_factor",0.9999938],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32030"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.08333333333334 +lon_0=-71.5 +k=0.9999938 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32031 : NAD27 / South Carolina North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32031,'EPSG',32031,'PROJCS["NAD27 / South Carolina North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",33.76666666666667],PARAMETER["standard_parallel_2",34.96666666666667],PARAMETER["latitude_of_origin",33],PARAMETER["central_meridian",-81],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32031"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=33.76666666666667 +lat_2=34.96666666666667 +lat_0=33 +lon_0=-81 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32031,'EPSG',32031,'PROJCS["NAD27 / South Carolina North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",33.76666666666667],PARAMETER["standard_parallel_2",34.96666666666667],PARAMETER["latitude_of_origin",33],PARAMETER["central_meridian",-81],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32031"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=33.76666666666667 +lat_2=34.96666666666667 +lat_0=33 +lon_0=-81 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32033 : NAD27 / South Carolina South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32033,'EPSG',32033,'PROJCS["NAD27 / South Carolina South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",32.33333333333334],PARAMETER["standard_parallel_2",33.66666666666666],PARAMETER["latitude_of_origin",31.83333333333333],PARAMETER["central_meridian",-81],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32033"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=32.33333333333334 +lat_2=33.66666666666666 +lat_0=31.83333333333333 +lon_0=-81 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32033,'EPSG',32033,'PROJCS["NAD27 / South Carolina South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",32.33333333333334],PARAMETER["standard_parallel_2",33.66666666666666],PARAMETER["latitude_of_origin",31.83333333333333],PARAMETER["central_meridian",-81],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32033"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=32.33333333333334 +lat_2=33.66666666666666 +lat_0=31.83333333333333 +lon_0=-81 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32034 : NAD27 / South Dakota North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32034,'EPSG',32034,'PROJCS["NAD27 / South Dakota North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44.41666666666666],PARAMETER["standard_parallel_2",45.68333333333333],PARAMETER["latitude_of_origin",43.83333333333334],PARAMETER["central_meridian",-100],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32034"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44.41666666666666 +lat_2=45.68333333333333 +lat_0=43.83333333333334 +lon_0=-100 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32034,'EPSG',32034,'PROJCS["NAD27 / South Dakota North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44.41666666666666],PARAMETER["standard_parallel_2",45.68333333333333],PARAMETER["latitude_of_origin",43.83333333333334],PARAMETER["central_meridian",-100],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32034"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44.41666666666666 +lat_2=45.68333333333333 +lat_0=43.83333333333334 +lon_0=-100 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32035 : NAD27 / South Dakota South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32035,'EPSG',32035,'PROJCS["NAD27 / South Dakota South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",42.83333333333334],PARAMETER["standard_parallel_2",44.4],PARAMETER["latitude_of_origin",42.33333333333334],PARAMETER["central_meridian",-100.3333333333333],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32035"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=42.83333333333334 +lat_2=44.4 +lat_0=42.33333333333334 +lon_0=-100.3333333333333 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32035,'EPSG',32035,'PROJCS["NAD27 / South Dakota South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",42.83333333333334],PARAMETER["standard_parallel_2",44.4],PARAMETER["latitude_of_origin",42.33333333333334],PARAMETER["central_meridian",-100.3333333333333],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32035"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=42.83333333333334 +lat_2=44.4 +lat_0=42.33333333333334 +lon_0=-100.3333333333333 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32036 : NAD27 / Tennessee (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32036,'EPSG',32036,'PROJCS["NAD27 / Tennessee (deprecated)",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",35.25],PARAMETER["standard_parallel_2",36.41666666666666],PARAMETER["latitude_of_origin",34.66666666666666],PARAMETER["central_meridian",-86],PARAMETER["false_easting",100000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32036"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=35.25 +lat_2=36.41666666666666 +lat_0=34.66666666666666 +lon_0=-86 +x_0=30480.06096012192 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32036,'EPSG',32036,'PROJCS["NAD27 / Tennessee (deprecated)",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",35.25],PARAMETER["standard_parallel_2",36.41666666666666],PARAMETER["latitude_of_origin",34.66666666666666],PARAMETER["central_meridian",-86],PARAMETER["false_easting",100000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32036"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=35.25 +lat_2=36.41666666666666 +lat_0=34.66666666666666 +lon_0=-86 +x_0=30480.06096012192 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32037 : NAD27 / Texas North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32037,'EPSG',32037,'PROJCS["NAD27 / Texas North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",34.65],PARAMETER["standard_parallel_2",36.18333333333333],PARAMETER["latitude_of_origin",34],PARAMETER["central_meridian",-101.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32037"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=34.65 +lat_2=36.18333333333333 +lat_0=34 +lon_0=-101.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32037,'EPSG',32037,'PROJCS["NAD27 / Texas North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",34.65],PARAMETER["standard_parallel_2",36.18333333333333],PARAMETER["latitude_of_origin",34],PARAMETER["central_meridian",-101.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32037"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=34.65 +lat_2=36.18333333333333 +lat_0=34 +lon_0=-101.5 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32038 : NAD27 / Texas North Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32038,'EPSG',32038,'PROJCS["NAD27 / Texas North Central",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",32.13333333333333],PARAMETER["standard_parallel_2",33.96666666666667],PARAMETER["latitude_of_origin",31.66666666666667],PARAMETER["central_meridian",-97.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32038"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=32.13333333333333 +lat_2=33.96666666666667 +lat_0=31.66666666666667 +lon_0=-97.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32038,'EPSG',32038,'PROJCS["NAD27 / Texas North Central",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",32.13333333333333],PARAMETER["standard_parallel_2",33.96666666666667],PARAMETER["latitude_of_origin",31.66666666666667],PARAMETER["central_meridian",-97.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32038"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=32.13333333333333 +lat_2=33.96666666666667 +lat_0=31.66666666666667 +lon_0=-97.5 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32039 : NAD27 / Texas Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32039,'EPSG',32039,'PROJCS["NAD27 / Texas Central",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",30.11666666666667],PARAMETER["standard_parallel_2",31.88333333333333],PARAMETER["latitude_of_origin",29.66666666666667],PARAMETER["central_meridian",-100.3333333333333],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32039"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=30.11666666666667 +lat_2=31.88333333333333 +lat_0=29.66666666666667 +lon_0=-100.3333333333333 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32039,'EPSG',32039,'PROJCS["NAD27 / Texas Central",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",30.11666666666667],PARAMETER["standard_parallel_2",31.88333333333333],PARAMETER["latitude_of_origin",29.66666666666667],PARAMETER["central_meridian",-100.3333333333333],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32039"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=30.11666666666667 +lat_2=31.88333333333333 +lat_0=29.66666666666667 +lon_0=-100.3333333333333 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32040 : NAD27 / Texas South Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32040,'EPSG',32040,'PROJCS["NAD27 / Texas South Central",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",28.38333333333333],PARAMETER["standard_parallel_2",30.28333333333333],PARAMETER["latitude_of_origin",27.83333333333333],PARAMETER["central_meridian",-99],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32040"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=28.38333333333333 +lat_2=30.28333333333333 +lat_0=27.83333333333333 +lon_0=-99 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32040,'EPSG',32040,'PROJCS["NAD27 / Texas South Central",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",28.38333333333333],PARAMETER["standard_parallel_2",30.28333333333333],PARAMETER["latitude_of_origin",27.83333333333333],PARAMETER["central_meridian",-99],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32040"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=28.38333333333333 +lat_2=30.28333333333333 +lat_0=27.83333333333333 +lon_0=-99 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32041 : NAD27 / Texas South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32041,'EPSG',32041,'PROJCS["NAD27 / Texas South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",26.16666666666667],PARAMETER["standard_parallel_2",27.83333333333333],PARAMETER["latitude_of_origin",25.66666666666667],PARAMETER["central_meridian",-98.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32041"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=26.16666666666667 +lat_2=27.83333333333333 +lat_0=25.66666666666667 +lon_0=-98.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32041,'EPSG',32041,'PROJCS["NAD27 / Texas South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",26.16666666666667],PARAMETER["standard_parallel_2",27.83333333333333],PARAMETER["latitude_of_origin",25.66666666666667],PARAMETER["central_meridian",-98.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32041"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=26.16666666666667 +lat_2=27.83333333333333 +lat_0=25.66666666666667 +lon_0=-98.5 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32042 : NAD27 / Utah North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32042,'EPSG',32042,'PROJCS["NAD27 / Utah North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.71666666666667],PARAMETER["standard_parallel_2",41.78333333333333],PARAMETER["latitude_of_origin",40.33333333333334],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32042"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.71666666666667 +lat_2=41.78333333333333 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32042,'EPSG',32042,'PROJCS["NAD27 / Utah North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.71666666666667],PARAMETER["standard_parallel_2",41.78333333333333],PARAMETER["latitude_of_origin",40.33333333333334],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32042"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.71666666666667 +lat_2=41.78333333333333 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32043 : NAD27 / Utah Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32043,'EPSG',32043,'PROJCS["NAD27 / Utah Central",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.01666666666667],PARAMETER["standard_parallel_2",40.65],PARAMETER["latitude_of_origin",38.33333333333334],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32043"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.01666666666667 +lat_2=40.65 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32043,'EPSG',32043,'PROJCS["NAD27 / Utah Central",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.01666666666667],PARAMETER["standard_parallel_2",40.65],PARAMETER["latitude_of_origin",38.33333333333334],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32043"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.01666666666667 +lat_2=40.65 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32044 : NAD27 / Utah South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32044,'EPSG',32044,'PROJCS["NAD27 / Utah South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.21666666666667],PARAMETER["standard_parallel_2",38.35],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32044"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.21666666666667 +lat_2=38.35 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32044,'EPSG',32044,'PROJCS["NAD27 / Utah South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.21666666666667],PARAMETER["standard_parallel_2",38.35],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32044"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.21666666666667 +lat_2=38.35 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32045 : NAD27 / Vermont --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32045,'EPSG',32045,'PROJCS["NAD27 / Vermont",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.5],PARAMETER["central_meridian",-72.5],PARAMETER["scale_factor",0.999964286],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32045"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.5 +lon_0=-72.5 +k=0.999964286 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32045,'EPSG',32045,'PROJCS["NAD27 / Vermont",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.5],PARAMETER["central_meridian",-72.5],PARAMETER["scale_factor",0.999964286],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32045"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.5 +lon_0=-72.5 +k=0.999964286 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32046 : NAD27 / Virginia North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32046,'EPSG',32046,'PROJCS["NAD27 / Virginia North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.03333333333333],PARAMETER["standard_parallel_2",39.2],PARAMETER["latitude_of_origin",37.66666666666666],PARAMETER["central_meridian",-78.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32046"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.03333333333333 +lat_2=39.2 +lat_0=37.66666666666666 +lon_0=-78.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32046,'EPSG',32046,'PROJCS["NAD27 / Virginia North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.03333333333333],PARAMETER["standard_parallel_2",39.2],PARAMETER["latitude_of_origin",37.66666666666666],PARAMETER["central_meridian",-78.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32046"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.03333333333333 +lat_2=39.2 +lat_0=37.66666666666666 +lon_0=-78.5 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32047 : NAD27 / Virginia South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32047,'EPSG',32047,'PROJCS["NAD27 / Virginia South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.76666666666667],PARAMETER["standard_parallel_2",37.96666666666667],PARAMETER["latitude_of_origin",36.33333333333334],PARAMETER["central_meridian",-78.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32047"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.76666666666667 +lat_2=37.96666666666667 +lat_0=36.33333333333334 +lon_0=-78.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32047,'EPSG',32047,'PROJCS["NAD27 / Virginia South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.76666666666667],PARAMETER["standard_parallel_2",37.96666666666667],PARAMETER["latitude_of_origin",36.33333333333334],PARAMETER["central_meridian",-78.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32047"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.76666666666667 +lat_2=37.96666666666667 +lat_0=36.33333333333334 +lon_0=-78.5 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32048 : NAD27 / Washington North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32048,'EPSG',32048,'PROJCS["NAD27 / Washington North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.5],PARAMETER["standard_parallel_2",48.73333333333333],PARAMETER["latitude_of_origin",47],PARAMETER["central_meridian",-120.8333333333333],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32048"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.5 +lat_2=48.73333333333333 +lat_0=47 +lon_0=-120.8333333333333 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32048,'EPSG',32048,'PROJCS["NAD27 / Washington North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.5],PARAMETER["standard_parallel_2",48.73333333333333],PARAMETER["latitude_of_origin",47],PARAMETER["central_meridian",-120.8333333333333],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32048"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.5 +lat_2=48.73333333333333 +lat_0=47 +lon_0=-120.8333333333333 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32049 : NAD27 / Washington South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32049,'EPSG',32049,'PROJCS["NAD27 / Washington South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.83333333333334],PARAMETER["standard_parallel_2",47.33333333333334],PARAMETER["latitude_of_origin",45.33333333333334],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32049"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.83333333333334 +lat_2=47.33333333333334 +lat_0=45.33333333333334 +lon_0=-120.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32049,'EPSG',32049,'PROJCS["NAD27 / Washington South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.83333333333334],PARAMETER["standard_parallel_2",47.33333333333334],PARAMETER["latitude_of_origin",45.33333333333334],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32049"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.83333333333334 +lat_2=47.33333333333334 +lat_0=45.33333333333334 +lon_0=-120.5 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32050 : NAD27 / West Virginia North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32050,'EPSG',32050,'PROJCS["NAD27 / West Virginia North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39],PARAMETER["standard_parallel_2",40.25],PARAMETER["latitude_of_origin",38.5],PARAMETER["central_meridian",-79.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32050"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39 +lat_2=40.25 +lat_0=38.5 +lon_0=-79.5 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32050,'EPSG',32050,'PROJCS["NAD27 / West Virginia North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39],PARAMETER["standard_parallel_2",40.25],PARAMETER["latitude_of_origin",38.5],PARAMETER["central_meridian",-79.5],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32050"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39 +lat_2=40.25 +lat_0=38.5 +lon_0=-79.5 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32051 : NAD27 / West Virginia South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32051,'EPSG',32051,'PROJCS["NAD27 / West Virginia South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.48333333333333],PARAMETER["standard_parallel_2",38.88333333333333],PARAMETER["latitude_of_origin",37],PARAMETER["central_meridian",-81],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32051"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.48333333333333 +lat_2=38.88333333333333 +lat_0=37 +lon_0=-81 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32051,'EPSG',32051,'PROJCS["NAD27 / West Virginia South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.48333333333333],PARAMETER["standard_parallel_2",38.88333333333333],PARAMETER["latitude_of_origin",37],PARAMETER["central_meridian",-81],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32051"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.48333333333333 +lat_2=38.88333333333333 +lat_0=37 +lon_0=-81 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32052 : NAD27 / Wisconsin North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32052,'EPSG',32052,'PROJCS["NAD27 / Wisconsin North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.56666666666667],PARAMETER["standard_parallel_2",46.76666666666667],PARAMETER["latitude_of_origin",45.16666666666666],PARAMETER["central_meridian",-90],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32052"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.56666666666667 +lat_2=46.76666666666667 +lat_0=45.16666666666666 +lon_0=-90 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32052,'EPSG',32052,'PROJCS["NAD27 / Wisconsin North",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.56666666666667],PARAMETER["standard_parallel_2",46.76666666666667],PARAMETER["latitude_of_origin",45.16666666666666],PARAMETER["central_meridian",-90],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32052"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.56666666666667 +lat_2=46.76666666666667 +lat_0=45.16666666666666 +lon_0=-90 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32053 : NAD27 / Wisconsin Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32053,'EPSG',32053,'PROJCS["NAD27 / Wisconsin Central",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44.25],PARAMETER["standard_parallel_2",45.5],PARAMETER["latitude_of_origin",43.83333333333334],PARAMETER["central_meridian",-90],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32053"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44.25 +lat_2=45.5 +lat_0=43.83333333333334 +lon_0=-90 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32053,'EPSG',32053,'PROJCS["NAD27 / Wisconsin Central",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44.25],PARAMETER["standard_parallel_2",45.5],PARAMETER["latitude_of_origin",43.83333333333334],PARAMETER["central_meridian",-90],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32053"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44.25 +lat_2=45.5 +lat_0=43.83333333333334 +lon_0=-90 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32054 : NAD27 / Wisconsin South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32054,'EPSG',32054,'PROJCS["NAD27 / Wisconsin South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",42.73333333333333],PARAMETER["standard_parallel_2",44.06666666666667],PARAMETER["latitude_of_origin",42],PARAMETER["central_meridian",-90],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32054"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=42.73333333333333 +lat_2=44.06666666666667 +lat_0=42 +lon_0=-90 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32054,'EPSG',32054,'PROJCS["NAD27 / Wisconsin South",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",42.73333333333333],PARAMETER["standard_parallel_2",44.06666666666667],PARAMETER["latitude_of_origin",42],PARAMETER["central_meridian",-90],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32054"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=42.73333333333333 +lat_2=44.06666666666667 +lat_0=42 +lon_0=-90 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32055 : NAD27 / Wyoming East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32055,'EPSG',32055,'PROJCS["NAD27 / Wyoming East",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.66666666666666],PARAMETER["central_meridian",-105.1666666666667],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32055"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.66666666666666 +lon_0=-105.1666666666667 +k=0.999941177 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32055,'EPSG',32055,'PROJCS["NAD27 / Wyoming East",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.66666666666666],PARAMETER["central_meridian",-105.1666666666667],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32055"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.66666666666666 +lon_0=-105.1666666666667 +k=0.999941177 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32056 : NAD27 / Wyoming East Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32056,'EPSG',32056,'PROJCS["NAD27 / Wyoming East Central",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.66666666666666],PARAMETER["central_meridian",-107.3333333333333],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32056"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.66666666666666 +lon_0=-107.3333333333333 +k=0.999941177 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32056,'EPSG',32056,'PROJCS["NAD27 / Wyoming East Central",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.66666666666666],PARAMETER["central_meridian",-107.3333333333333],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32056"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.66666666666666 +lon_0=-107.3333333333333 +k=0.999941177 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32057 : NAD27 / Wyoming West Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32057,'EPSG',32057,'PROJCS["NAD27 / Wyoming West Central",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.66666666666666],PARAMETER["central_meridian",-108.75],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32057"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.66666666666666 +lon_0=-108.75 +k=0.999941177 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32057,'EPSG',32057,'PROJCS["NAD27 / Wyoming West Central",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.66666666666666],PARAMETER["central_meridian",-108.75],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32057"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.66666666666666 +lon_0=-108.75 +k=0.999941177 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32058 : NAD27 / Wyoming West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32058,'EPSG',32058,'PROJCS["NAD27 / Wyoming West",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.66666666666666],PARAMETER["central_meridian",-110.0833333333333],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32058"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.66666666666666 +lon_0=-110.0833333333333 +k=0.999941177 +x_0=152400.3048006096 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32058,'EPSG',32058,'PROJCS["NAD27 / Wyoming West",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.66666666666666],PARAMETER["central_meridian",-110.0833333333333],PARAMETER["scale_factor",0.999941177],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32058"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.66666666666666 +lon_0=-110.0833333333333 +k=0.999941177 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32061 : NAD27 / Guatemala Norte --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32061,'EPSG',32061,'PROJCS["NAD27 / Guatemala Norte",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",16.81666666666667],PARAMETER["central_meridian",-90.33333333333333],PARAMETER["scale_factor",0.99992226],PARAMETER["false_easting",500000],PARAMETER["false_northing",292209.579],AUTHORITY["EPSG","32061"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=16.81666666666667 +lat_0=16.81666666666667 +lon_0=-90.33333333333333 +k_0=0.99992226 +x_0=500000 +y_0=292209.579 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32061,'EPSG',32061,'PROJCS["NAD27 / Guatemala Norte",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",16.81666666666667],PARAMETER["central_meridian",-90.33333333333333],PARAMETER["scale_factor",0.99992226],PARAMETER["false_easting",500000],PARAMETER["false_northing",292209.579],AUTHORITY["EPSG","32061"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=16.81666666666667 +lat_0=16.81666666666667 +lon_0=-90.33333333333333 +k_0=0.99992226 +x_0=500000 +y_0=292209.579 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 32062 : NAD27 / Guatemala Sur --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32062,'EPSG',32062,'PROJCS["NAD27 / Guatemala Sur",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",14.9],PARAMETER["central_meridian",-90.33333333333333],PARAMETER["scale_factor",0.99989906],PARAMETER["false_easting",500000],PARAMETER["false_northing",325992.681],AUTHORITY["EPSG","32062"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=14.9 +lat_0=14.9 +lon_0=-90.33333333333333 +k_0=0.99989906 +x_0=500000 +y_0=325992.681 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32062,'EPSG',32062,'PROJCS["NAD27 / Guatemala Sur",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",14.9],PARAMETER["central_meridian",-90.33333333333333],PARAMETER["scale_factor",0.99989906],PARAMETER["false_easting",500000],PARAMETER["false_northing",325992.681],AUTHORITY["EPSG","32062"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=14.9 +lat_0=14.9 +lon_0=-90.33333333333333 +k_0=0.99989906 +x_0=500000 +y_0=325992.681 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 32064 : NAD27 / BLM 14N (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32064,'EPSG',32064,'PROJCS["NAD27 / BLM 14N (ftUS)",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1640416.67],PARAMETER["false_northing",0],AUTHORITY["EPSG","32064"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-99 +k=0.9996 +x_0=500000.001016002 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32064,'EPSG',32064,'PROJCS["NAD27 / BLM 14N (ftUS)",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1640416.67],PARAMETER["false_northing",0],AUTHORITY["EPSG","32064"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-99 +k=0.9996 +x_0=500000.001016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32065 : NAD27 / BLM 15N (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32065,'EPSG',32065,'PROJCS["NAD27 / BLM 15N (ftUS)",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1640416.67],PARAMETER["false_northing",0],AUTHORITY["EPSG","32065"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-93 +k=0.9996 +x_0=500000.001016002 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32065,'EPSG',32065,'PROJCS["NAD27 / BLM 15N (ftUS)",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1640416.67],PARAMETER["false_northing",0],AUTHORITY["EPSG","32065"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-93 +k=0.9996 +x_0=500000.001016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32066 : NAD27 / BLM 16N (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32066,'EPSG',32066,'PROJCS["NAD27 / BLM 16N (ftUS)",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1640416.67],PARAMETER["false_northing",0],AUTHORITY["EPSG","32066"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-87 +k=0.9996 +x_0=500000.001016002 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32066,'EPSG',32066,'PROJCS["NAD27 / BLM 16N (ftUS)",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1640416.67],PARAMETER["false_northing",0],AUTHORITY["EPSG","32066"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-87 +k=0.9996 +x_0=500000.001016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32067 : NAD27 / BLM 17N (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32067,'EPSG',32067,'PROJCS["NAD27 / BLM 17N (ftUS)",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1640416.67],PARAMETER["false_northing",0],AUTHORITY["EPSG","32067"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-81 +k=0.9996 +x_0=500000.001016002 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32067,'EPSG',32067,'PROJCS["NAD27 / BLM 17N (ftUS)",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1640416.67],PARAMETER["false_northing",0],AUTHORITY["EPSG","32067"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-81 +k=0.9996 +x_0=500000.001016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32074 : NAD27 / BLM 14N (feet) (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32074,'EPSG',32074,'PROJCS["NAD27 / BLM 14N (feet) (deprecated)",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1640416.67],PARAMETER["false_northing",0],AUTHORITY["EPSG","32074"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-99 +k=0.9996 +x_0=500000.001016002 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32074,'EPSG',32074,'PROJCS["NAD27 / BLM 14N (feet) (deprecated)",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1640416.67],PARAMETER["false_northing",0],AUTHORITY["EPSG","32074"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-99 +k=0.9996 +x_0=500000.001016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32075 : NAD27 / BLM 15N (feet) (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32075,'EPSG',32075,'PROJCS["NAD27 / BLM 15N (feet) (deprecated)",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1640416.67],PARAMETER["false_northing",0],AUTHORITY["EPSG","32075"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-93 +k=0.9996 +x_0=500000.001016002 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32075,'EPSG',32075,'PROJCS["NAD27 / BLM 15N (feet) (deprecated)",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1640416.67],PARAMETER["false_northing",0],AUTHORITY["EPSG","32075"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-93 +k=0.9996 +x_0=500000.001016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32076 : NAD27 / BLM 16N (feet) (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32076,'EPSG',32076,'PROJCS["NAD27 / BLM 16N (feet) (deprecated)",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1640416.67],PARAMETER["false_northing",0],AUTHORITY["EPSG","32076"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-87 +k=0.9996 +x_0=500000.001016002 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32076,'EPSG',32076,'PROJCS["NAD27 / BLM 16N (feet) (deprecated)",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1640416.67],PARAMETER["false_northing",0],AUTHORITY["EPSG","32076"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-87 +k=0.9996 +x_0=500000.001016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32077 : NAD27 / BLM 17N (feet) (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32077,'EPSG',32077,'PROJCS["NAD27 / BLM 17N (feet) (deprecated)",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1640416.67],PARAMETER["false_northing",0],AUTHORITY["EPSG","32077"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-81 +k=0.9996 +x_0=500000.001016002 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32077,'EPSG',32077,'PROJCS["NAD27 / BLM 17N (feet) (deprecated)",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1640416.67],PARAMETER["false_northing",0],AUTHORITY["EPSG","32077"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-81 +k=0.9996 +x_0=500000.001016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32081 : NAD27 / MTM zone 1 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32081,'EPSG',32081,'PROJCS["NAD27 / MTM zone 1",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-53],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32081"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-53 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32081,'EPSG',32081,'PROJCS["NAD27 / MTM zone 1",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-53],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32081"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-53 +k=0.9999 +x_0=304800 +y_0=0 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 32082 : NAD27 / MTM zone 2 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32082,'EPSG',32082,'PROJCS["NAD27 / MTM zone 2",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-56],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32082"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-56 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32082,'EPSG',32082,'PROJCS["NAD27 / MTM zone 2",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-56],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32082"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-56 +k=0.9999 +x_0=304800 +y_0=0 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 32083 : NAD27 / MTM zone 3 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32083,'EPSG',32083,'PROJCS["NAD27 / MTM zone 3",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-58.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32083"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-58.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32083,'EPSG',32083,'PROJCS["NAD27 / MTM zone 3",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-58.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32083"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-58.5 +k=0.9999 +x_0=304800 +y_0=0 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 32084 : NAD27 / MTM zone 4 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32084,'EPSG',32084,'PROJCS["NAD27 / MTM zone 4",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-61.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32084"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-61.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32084,'EPSG',32084,'PROJCS["NAD27 / MTM zone 4",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-61.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32084"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-61.5 +k=0.9999 +x_0=304800 +y_0=0 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 32085 : NAD27 / MTM zone 5 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32085,'EPSG',32085,'PROJCS["NAD27 / MTM zone 5",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-64.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32085"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-64.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32085,'EPSG',32085,'PROJCS["NAD27 / MTM zone 5",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-64.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32085"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-64.5 +k=0.9999 +x_0=304800 +y_0=0 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 32086 : NAD27 / MTM zone 6 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32086,'EPSG',32086,'PROJCS["NAD27 / MTM zone 6",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-67.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32086"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-67.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32086,'EPSG',32086,'PROJCS["NAD27 / MTM zone 6",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-67.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32086"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-67.5 +k=0.9999 +x_0=304800 +y_0=0 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 32098 : NAD27 / Quebec Lambert --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32098,'EPSG',32098,'PROJCS["NAD27 / Quebec Lambert",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",60],PARAMETER["standard_parallel_2",46],PARAMETER["latitude_of_origin",44],PARAMETER["central_meridian",-68.5],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","32098"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=60 +lat_2=46 +lat_0=44 +lon_0=-68.5 +x_0=0 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32098,'EPSG',32098,'PROJCS["NAD27 / Quebec Lambert",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",60],PARAMETER["standard_parallel_2",46],PARAMETER["latitude_of_origin",44],PARAMETER["central_meridian",-68.5],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","32098"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=60 +lat_2=46 +lat_0=44 +lon_0=-68.5 +x_0=0 +y_0=0 +datum=NAD27 +units=m +no_defs '); --- --- EPSG 32099 : NAD27 / Louisiana Offshore --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32099,'EPSG',32099,'PROJCS["NAD27 / Louisiana Offshore",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",27.83333333333333],PARAMETER["standard_parallel_2",26.16666666666667],PARAMETER["latitude_of_origin",25.66666666666667],PARAMETER["central_meridian",-91.33333333333333],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32099"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=27.83333333333333 +lat_2=26.16666666666667 +lat_0=25.66666666666667 +lon_0=-91.33333333333333 +x_0=609601.2192024384 +y_0=0 +ellps=clrk66 +datum=NAD27 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32099,'EPSG',32099,'PROJCS["NAD27 / Louisiana Offshore",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",27.83333333333333],PARAMETER["standard_parallel_2",26.16666666666667],PARAMETER["latitude_of_origin",25.66666666666667],PARAMETER["central_meridian",-91.33333333333333],PARAMETER["false_easting",2000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32099"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=27.83333333333333 +lat_2=26.16666666666667 +lat_0=25.66666666666667 +lon_0=-91.33333333333333 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs '); --- --- EPSG 32100 : NAD83 / Montana --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32100,'EPSG',32100,'PROJCS["NAD83 / Montana",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",49],PARAMETER["standard_parallel_2",45],PARAMETER["latitude_of_origin",44.25],PARAMETER["central_meridian",-109.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32100"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=49 +lat_2=45 +lat_0=44.25 +lon_0=-109.5 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32100,'EPSG',32100,'PROJCS["NAD83 / Montana",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",49],PARAMETER["standard_parallel_2",45],PARAMETER["latitude_of_origin",44.25],PARAMETER["central_meridian",-109.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32100"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=49 +lat_2=45 +lat_0=44.25 +lon_0=-109.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32104 : NAD83 / Nebraska --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32104,'EPSG',32104,'PROJCS["NAD83 / Nebraska",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43],PARAMETER["standard_parallel_2",40],PARAMETER["latitude_of_origin",39.83333333333334],PARAMETER["central_meridian",-100],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32104"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +lon_0=-100 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32104,'EPSG',32104,'PROJCS["NAD83 / Nebraska",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",43],PARAMETER["standard_parallel_2",40],PARAMETER["latitude_of_origin",39.83333333333334],PARAMETER["central_meridian",-100],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32104"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +lon_0=-100 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32107 : NAD83 / Nevada East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32107,'EPSG',32107,'PROJCS["NAD83 / Nevada East",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",34.75],PARAMETER["central_meridian",-115.5833333333333],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",8000000],AUTHORITY["EPSG","32107"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.9999 +x_0=200000 +y_0=8000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32107,'EPSG',32107,'PROJCS["NAD83 / Nevada East",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",34.75],PARAMETER["central_meridian",-115.5833333333333],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",200000],PARAMETER["false_northing",8000000],AUTHORITY["EPSG","32107"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.9999 +x_0=200000 +y_0=8000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32108 : NAD83 / Nevada Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32108,'EPSG',32108,'PROJCS["NAD83 / Nevada Central",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",34.75],PARAMETER["central_meridian",-116.6666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",6000000],AUTHORITY["EPSG","32108"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.9999 +x_0=500000 +y_0=6000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32108,'EPSG',32108,'PROJCS["NAD83 / Nevada Central",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",34.75],PARAMETER["central_meridian",-116.6666666666667],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",6000000],AUTHORITY["EPSG","32108"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.9999 +x_0=500000 +y_0=6000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32109 : NAD83 / Nevada West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32109,'EPSG',32109,'PROJCS["NAD83 / Nevada West",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",34.75],PARAMETER["central_meridian",-118.5833333333333],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",800000],PARAMETER["false_northing",4000000],AUTHORITY["EPSG","32109"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.9999 +x_0=800000 +y_0=4000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32109,'EPSG',32109,'PROJCS["NAD83 / Nevada West",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",34.75],PARAMETER["central_meridian",-118.5833333333333],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",800000],PARAMETER["false_northing",4000000],AUTHORITY["EPSG","32109"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.9999 +x_0=800000 +y_0=4000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32110 : NAD83 / New Hampshire --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32110,'EPSG',32110,'PROJCS["NAD83 / New Hampshire",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.5],PARAMETER["central_meridian",-71.66666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32110"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999966667 +x_0=300000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32110,'EPSG',32110,'PROJCS["NAD83 / New Hampshire",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.5],PARAMETER["central_meridian",-71.66666666666667],PARAMETER["scale_factor",0.999966667],PARAMETER["false_easting",300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32110"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.999966667 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32111 : NAD83 / New Jersey --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32111,'EPSG',32111,'PROJCS["NAD83 / New Jersey",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",38.83333333333334],PARAMETER["central_meridian",-74.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32111"],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=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32111,'EPSG',32111,'PROJCS["NAD83 / New Jersey",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",38.83333333333334],PARAMETER["central_meridian",-74.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32111"],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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32112 : NAD83 / New Mexico East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32112,'EPSG',32112,'PROJCS["NAD83 / New Mexico East",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-104.3333333333333],PARAMETER["scale_factor",0.999909091],PARAMETER["false_easting",165000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32112"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.999909091 +x_0=165000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32112,'EPSG',32112,'PROJCS["NAD83 / New Mexico East",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-104.3333333333333],PARAMETER["scale_factor",0.999909091],PARAMETER["false_easting",165000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32112"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.999909091 +x_0=165000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32113 : NAD83 / New Mexico Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32113,'EPSG',32113,'PROJCS["NAD83 / New Mexico Central",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-106.25],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32113"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32113,'EPSG',32113,'PROJCS["NAD83 / New Mexico Central",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-106.25],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32113"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32114 : NAD83 / New Mexico West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32114,'EPSG',32114,'PROJCS["NAD83 / New Mexico West",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-107.8333333333333],PARAMETER["scale_factor",0.999916667],PARAMETER["false_easting",830000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32114"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.999916667 +x_0=830000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32114,'EPSG',32114,'PROJCS["NAD83 / New Mexico West",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",31],PARAMETER["central_meridian",-107.8333333333333],PARAMETER["scale_factor",0.999916667],PARAMETER["false_easting",830000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32114"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.999916667 +x_0=830000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32115 : NAD83 / New York East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32115,'EPSG',32115,'PROJCS["NAD83 / New York East",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",38.83333333333334],PARAMETER["central_meridian",-74.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32115"],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=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32115,'EPSG',32115,'PROJCS["NAD83 / New York East",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",38.83333333333334],PARAMETER["central_meridian",-74.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32115"],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 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32116 : NAD83 / New York Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32116,'EPSG',32116,'PROJCS["NAD83 / New York Central",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-76.58333333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",250000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32116"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.9999375 +x_0=250000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32116,'EPSG',32116,'PROJCS["NAD83 / New York Central",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-76.58333333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",250000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32116"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.9999375 +x_0=250000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32117 : NAD83 / New York West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32117,'EPSG',32117,'PROJCS["NAD83 / New York West",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-78.58333333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",350000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32117"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.9999375 +x_0=350000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32117,'EPSG',32117,'PROJCS["NAD83 / New York West",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-78.58333333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",350000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32117"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.9999375 +x_0=350000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32118 : NAD83 / New York Long Island --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32118,'EPSG',32118,'PROJCS["NAD83 / New York Long Island",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.03333333333333],PARAMETER["standard_parallel_2",40.66666666666666],PARAMETER["latitude_of_origin",40.16666666666666],PARAMETER["central_meridian",-74],PARAMETER["false_easting",300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32118"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.03333333333333 +lat_2=40.66666666666666 +lat_0=40.16666666666666 +lon_0=-74 +x_0=300000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32118,'EPSG',32118,'PROJCS["NAD83 / New York Long Island",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.03333333333333],PARAMETER["standard_parallel_2",40.66666666666666],PARAMETER["latitude_of_origin",40.16666666666666],PARAMETER["central_meridian",-74],PARAMETER["false_easting",300000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32118"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.03333333333333 +lat_2=40.66666666666666 +lat_0=40.16666666666666 +lon_0=-74 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32119 : NAD83 / North Carolina --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32119,'EPSG',32119,'PROJCS["NAD83 / North Carolina",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.16666666666666],PARAMETER["standard_parallel_2",34.33333333333334],PARAMETER["latitude_of_origin",33.75],PARAMETER["central_meridian",-79],PARAMETER["false_easting",609601.22],PARAMETER["false_northing",0],AUTHORITY["EPSG","32119"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32119,'EPSG',32119,'PROJCS["NAD83 / North Carolina",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.16666666666666],PARAMETER["standard_parallel_2",34.33333333333334],PARAMETER["latitude_of_origin",33.75],PARAMETER["central_meridian",-79],PARAMETER["false_easting",609601.22],PARAMETER["false_northing",0],AUTHORITY["EPSG","32119"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32120 : NAD83 / North Dakota North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32120,'EPSG',32120,'PROJCS["NAD83 / North Dakota North",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.73333333333333],PARAMETER["standard_parallel_2",47.43333333333333],PARAMETER["latitude_of_origin",47],PARAMETER["central_meridian",-100.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32120"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.73333333333333 +lat_2=47.43333333333333 +lat_0=47 +lon_0=-100.5 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32120,'EPSG',32120,'PROJCS["NAD83 / North Dakota North",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.73333333333333],PARAMETER["standard_parallel_2",47.43333333333333],PARAMETER["latitude_of_origin",47],PARAMETER["central_meridian",-100.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32120"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.73333333333333 +lat_2=47.43333333333333 +lat_0=47 +lon_0=-100.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32121 : NAD83 / North Dakota South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32121,'EPSG',32121,'PROJCS["NAD83 / North Dakota South",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.48333333333333],PARAMETER["standard_parallel_2",46.18333333333333],PARAMETER["latitude_of_origin",45.66666666666666],PARAMETER["central_meridian",-100.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32121"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.48333333333333 +lat_2=46.18333333333333 +lat_0=45.66666666666666 +lon_0=-100.5 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32121,'EPSG',32121,'PROJCS["NAD83 / North Dakota South",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.48333333333333],PARAMETER["standard_parallel_2",46.18333333333333],PARAMETER["latitude_of_origin",45.66666666666666],PARAMETER["central_meridian",-100.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32121"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.48333333333333 +lat_2=46.18333333333333 +lat_0=45.66666666666666 +lon_0=-100.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32122 : NAD83 / Ohio North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32122,'EPSG',32122,'PROJCS["NAD83 / Ohio North",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.7],PARAMETER["standard_parallel_2",40.43333333333333],PARAMETER["latitude_of_origin",39.66666666666666],PARAMETER["central_meridian",-82.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32122"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.7 +lat_2=40.43333333333333 +lat_0=39.66666666666666 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32122,'EPSG',32122,'PROJCS["NAD83 / Ohio North",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.7],PARAMETER["standard_parallel_2",40.43333333333333],PARAMETER["latitude_of_origin",39.66666666666666],PARAMETER["central_meridian",-82.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32122"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.7 +lat_2=40.43333333333333 +lat_0=39.66666666666666 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32123 : NAD83 / Ohio South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32123,'EPSG',32123,'PROJCS["NAD83 / Ohio South",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.03333333333333],PARAMETER["standard_parallel_2",38.73333333333333],PARAMETER["latitude_of_origin",38],PARAMETER["central_meridian",-82.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32123"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.03333333333333 +lat_2=38.73333333333333 +lat_0=38 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32123,'EPSG',32123,'PROJCS["NAD83 / Ohio South",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.03333333333333],PARAMETER["standard_parallel_2",38.73333333333333],PARAMETER["latitude_of_origin",38],PARAMETER["central_meridian",-82.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32123"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.03333333333333 +lat_2=38.73333333333333 +lat_0=38 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32124 : NAD83 / Oklahoma North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32124,'EPSG',32124,'PROJCS["NAD83 / Oklahoma North",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.76666666666667],PARAMETER["standard_parallel_2",35.56666666666667],PARAMETER["latitude_of_origin",35],PARAMETER["central_meridian",-98],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32124"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.76666666666667 +lat_2=35.56666666666667 +lat_0=35 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32124,'EPSG',32124,'PROJCS["NAD83 / Oklahoma North",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.76666666666667],PARAMETER["standard_parallel_2",35.56666666666667],PARAMETER["latitude_of_origin",35],PARAMETER["central_meridian",-98],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32124"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.76666666666667 +lat_2=35.56666666666667 +lat_0=35 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32125 : NAD83 / Oklahoma South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32125,'EPSG',32125,'PROJCS["NAD83 / Oklahoma South",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",35.23333333333333],PARAMETER["standard_parallel_2",33.93333333333333],PARAMETER["latitude_of_origin",33.33333333333334],PARAMETER["central_meridian",-98],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32125"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=35.23333333333333 +lat_2=33.93333333333333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32125,'EPSG',32125,'PROJCS["NAD83 / Oklahoma South",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",35.23333333333333],PARAMETER["standard_parallel_2",33.93333333333333],PARAMETER["latitude_of_origin",33.33333333333334],PARAMETER["central_meridian",-98],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32125"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=35.23333333333333 +lat_2=33.93333333333333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32126 : NAD83 / Oregon North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32126,'EPSG',32126,'PROJCS["NAD83 / Oregon North",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",46],PARAMETER["standard_parallel_2",44.33333333333334],PARAMETER["latitude_of_origin",43.66666666666666],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",2500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32126"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=46 +lat_2=44.33333333333334 +lat_0=43.66666666666666 +lon_0=-120.5 +x_0=2500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32126,'EPSG',32126,'PROJCS["NAD83 / Oregon North",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",46],PARAMETER["standard_parallel_2",44.33333333333334],PARAMETER["latitude_of_origin",43.66666666666666],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",2500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32126"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=46 +lat_2=44.33333333333334 +lat_0=43.66666666666666 +lon_0=-120.5 +x_0=2500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32127 : NAD83 / Oregon South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32127,'EPSG',32127,'PROJCS["NAD83 / Oregon South",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44],PARAMETER["standard_parallel_2",42.33333333333334],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32127"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44 +lat_2=42.33333333333334 +lat_0=41.66666666666666 +lon_0=-120.5 +x_0=1500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32127,'EPSG',32127,'PROJCS["NAD83 / Oregon South",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44],PARAMETER["standard_parallel_2",42.33333333333334],PARAMETER["latitude_of_origin",41.66666666666666],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32127"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44 +lat_2=42.33333333333334 +lat_0=41.66666666666666 +lon_0=-120.5 +x_0=1500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32128 : NAD83 / Pennsylvania North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32128,'EPSG',32128,'PROJCS["NAD83 / Pennsylvania North",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.95],PARAMETER["standard_parallel_2",40.88333333333333],PARAMETER["latitude_of_origin",40.16666666666666],PARAMETER["central_meridian",-77.75],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32128"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.95 +lat_2=40.88333333333333 +lat_0=40.16666666666666 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32128,'EPSG',32128,'PROJCS["NAD83 / Pennsylvania North",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.95],PARAMETER["standard_parallel_2",40.88333333333333],PARAMETER["latitude_of_origin",40.16666666666666],PARAMETER["central_meridian",-77.75],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32128"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.95 +lat_2=40.88333333333333 +lat_0=40.16666666666666 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32129 : NAD83 / Pennsylvania South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32129,'EPSG',32129,'PROJCS["NAD83 / Pennsylvania South",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.96666666666667],PARAMETER["standard_parallel_2",39.93333333333333],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-77.75],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32129"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.96666666666667 +lat_2=39.93333333333333 +lat_0=39.33333333333334 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32129,'EPSG',32129,'PROJCS["NAD83 / Pennsylvania South",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.96666666666667],PARAMETER["standard_parallel_2",39.93333333333333],PARAMETER["latitude_of_origin",39.33333333333334],PARAMETER["central_meridian",-77.75],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32129"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.96666666666667 +lat_2=39.93333333333333 +lat_0=39.33333333333334 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32130 : NAD83 / Rhode Island --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32130,'EPSG',32130,'PROJCS["NAD83 / Rhode Island",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.08333333333334],PARAMETER["central_meridian",-71.5],PARAMETER["scale_factor",0.99999375],PARAMETER["false_easting",100000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32130"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.08333333333334 +lon_0=-71.5 +k=0.99999375 +x_0=100000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32130,'EPSG',32130,'PROJCS["NAD83 / Rhode Island",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",41.08333333333334],PARAMETER["central_meridian",-71.5],PARAMETER["scale_factor",0.99999375],PARAMETER["false_easting",100000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32130"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=41.08333333333334 +lon_0=-71.5 +k=0.99999375 +x_0=100000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32133 : NAD83 / South Carolina --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32133,'EPSG',32133,'PROJCS["NAD83 / South Carolina",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",34.83333333333334],PARAMETER["standard_parallel_2",32.5],PARAMETER["latitude_of_origin",31.83333333333333],PARAMETER["central_meridian",-81],PARAMETER["false_easting",609600],PARAMETER["false_northing",0],AUTHORITY["EPSG","32133"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=34.83333333333334 +lat_2=32.5 +lat_0=31.83333333333333 +lon_0=-81 +x_0=609600 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32133,'EPSG',32133,'PROJCS["NAD83 / South Carolina",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",34.83333333333334],PARAMETER["standard_parallel_2",32.5],PARAMETER["latitude_of_origin",31.83333333333333],PARAMETER["central_meridian",-81],PARAMETER["false_easting",609600],PARAMETER["false_northing",0],AUTHORITY["EPSG","32133"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=34.83333333333334 +lat_2=32.5 +lat_0=31.83333333333333 +lon_0=-81 +x_0=609600 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32134 : NAD83 / South Dakota North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32134,'EPSG',32134,'PROJCS["NAD83 / South Dakota North",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.68333333333333],PARAMETER["standard_parallel_2",44.41666666666666],PARAMETER["latitude_of_origin",43.83333333333334],PARAMETER["central_meridian",-100],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32134"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.68333333333333 +lat_2=44.41666666666666 +lat_0=43.83333333333334 +lon_0=-100 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32134,'EPSG',32134,'PROJCS["NAD83 / South Dakota North",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.68333333333333],PARAMETER["standard_parallel_2",44.41666666666666],PARAMETER["latitude_of_origin",43.83333333333334],PARAMETER["central_meridian",-100],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32134"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.68333333333333 +lat_2=44.41666666666666 +lat_0=43.83333333333334 +lon_0=-100 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32135 : NAD83 / South Dakota South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32135,'EPSG',32135,'PROJCS["NAD83 / South Dakota South",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44.4],PARAMETER["standard_parallel_2",42.83333333333334],PARAMETER["latitude_of_origin",42.33333333333334],PARAMETER["central_meridian",-100.3333333333333],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32135"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44.4 +lat_2=42.83333333333334 +lat_0=42.33333333333334 +lon_0=-100.3333333333333 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32135,'EPSG',32135,'PROJCS["NAD83 / South Dakota South",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44.4],PARAMETER["standard_parallel_2",42.83333333333334],PARAMETER["latitude_of_origin",42.33333333333334],PARAMETER["central_meridian",-100.3333333333333],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32135"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44.4 +lat_2=42.83333333333334 +lat_0=42.33333333333334 +lon_0=-100.3333333333333 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32136 : NAD83 / Tennessee --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32136,'EPSG',32136,'PROJCS["NAD83 / Tennessee",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.41666666666666],PARAMETER["standard_parallel_2",35.25],PARAMETER["latitude_of_origin",34.33333333333334],PARAMETER["central_meridian",-86],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32136"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.41666666666666 +lat_2=35.25 +lat_0=34.33333333333334 +lon_0=-86 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32136,'EPSG',32136,'PROJCS["NAD83 / Tennessee",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.41666666666666],PARAMETER["standard_parallel_2",35.25],PARAMETER["latitude_of_origin",34.33333333333334],PARAMETER["central_meridian",-86],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32136"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.41666666666666 +lat_2=35.25 +lat_0=34.33333333333334 +lon_0=-86 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32137 : NAD83 / Texas North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32137,'EPSG',32137,'PROJCS["NAD83 / Texas North",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.18333333333333],PARAMETER["standard_parallel_2",34.65],PARAMETER["latitude_of_origin",34],PARAMETER["central_meridian",-101.5],PARAMETER["false_easting",200000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","32137"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.18333333333333 +lat_2=34.65 +lat_0=34 +lon_0=-101.5 +x_0=200000 +y_0=1000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32137,'EPSG',32137,'PROJCS["NAD83 / Texas North",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",36.18333333333333],PARAMETER["standard_parallel_2",34.65],PARAMETER["latitude_of_origin",34],PARAMETER["central_meridian",-101.5],PARAMETER["false_easting",200000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","32137"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=36.18333333333333 +lat_2=34.65 +lat_0=34 +lon_0=-101.5 +x_0=200000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32138 : NAD83 / Texas North Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32138,'EPSG',32138,'PROJCS["NAD83 / Texas North Central",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",33.96666666666667],PARAMETER["standard_parallel_2",32.13333333333333],PARAMETER["latitude_of_origin",31.66666666666667],PARAMETER["central_meridian",-98.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",2000000],AUTHORITY["EPSG","32138"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=33.96666666666667 +lat_2=32.13333333333333 +lat_0=31.66666666666667 +lon_0=-98.5 +x_0=600000 +y_0=2000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32138,'EPSG',32138,'PROJCS["NAD83 / Texas North Central",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",33.96666666666667],PARAMETER["standard_parallel_2",32.13333333333333],PARAMETER["latitude_of_origin",31.66666666666667],PARAMETER["central_meridian",-98.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",2000000],AUTHORITY["EPSG","32138"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=33.96666666666667 +lat_2=32.13333333333333 +lat_0=31.66666666666667 +lon_0=-98.5 +x_0=600000 +y_0=2000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32139 : NAD83 / Texas Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32139,'EPSG',32139,'PROJCS["NAD83 / Texas Central",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",31.88333333333333],PARAMETER["standard_parallel_2",30.11666666666667],PARAMETER["latitude_of_origin",29.66666666666667],PARAMETER["central_meridian",-100.3333333333333],PARAMETER["false_easting",700000],PARAMETER["false_northing",3000000],AUTHORITY["EPSG","32139"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=31.88333333333333 +lat_2=30.11666666666667 +lat_0=29.66666666666667 +lon_0=-100.3333333333333 +x_0=700000 +y_0=3000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32139,'EPSG',32139,'PROJCS["NAD83 / Texas Central",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",31.88333333333333],PARAMETER["standard_parallel_2",30.11666666666667],PARAMETER["latitude_of_origin",29.66666666666667],PARAMETER["central_meridian",-100.3333333333333],PARAMETER["false_easting",700000],PARAMETER["false_northing",3000000],AUTHORITY["EPSG","32139"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=31.88333333333333 +lat_2=30.11666666666667 +lat_0=29.66666666666667 +lon_0=-100.3333333333333 +x_0=700000 +y_0=3000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32140 : NAD83 / Texas South Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32140,'EPSG',32140,'PROJCS["NAD83 / Texas South Central",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",30.28333333333333],PARAMETER["standard_parallel_2",28.38333333333333],PARAMETER["latitude_of_origin",27.83333333333333],PARAMETER["central_meridian",-99],PARAMETER["false_easting",600000],PARAMETER["false_northing",4000000],AUTHORITY["EPSG","32140"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=30.28333333333333 +lat_2=28.38333333333333 +lat_0=27.83333333333333 +lon_0=-99 +x_0=600000 +y_0=4000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32140,'EPSG',32140,'PROJCS["NAD83 / Texas South Central",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",30.28333333333333],PARAMETER["standard_parallel_2",28.38333333333333],PARAMETER["latitude_of_origin",27.83333333333333],PARAMETER["central_meridian",-99],PARAMETER["false_easting",600000],PARAMETER["false_northing",4000000],AUTHORITY["EPSG","32140"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=30.28333333333333 +lat_2=28.38333333333333 +lat_0=27.83333333333333 +lon_0=-99 +x_0=600000 +y_0=4000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32141 : NAD83 / Texas South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32141,'EPSG',32141,'PROJCS["NAD83 / Texas South",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",27.83333333333333],PARAMETER["standard_parallel_2",26.16666666666667],PARAMETER["latitude_of_origin",25.66666666666667],PARAMETER["central_meridian",-98.5],PARAMETER["false_easting",300000],PARAMETER["false_northing",5000000],AUTHORITY["EPSG","32141"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=27.83333333333333 +lat_2=26.16666666666667 +lat_0=25.66666666666667 +lon_0=-98.5 +x_0=300000 +y_0=5000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32141,'EPSG',32141,'PROJCS["NAD83 / Texas South",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",27.83333333333333],PARAMETER["standard_parallel_2",26.16666666666667],PARAMETER["latitude_of_origin",25.66666666666667],PARAMETER["central_meridian",-98.5],PARAMETER["false_easting",300000],PARAMETER["false_northing",5000000],AUTHORITY["EPSG","32141"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=27.83333333333333 +lat_2=26.16666666666667 +lat_0=25.66666666666667 +lon_0=-98.5 +x_0=300000 +y_0=5000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32142 : NAD83 / Utah North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32142,'EPSG',32142,'PROJCS["NAD83 / Utah North",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.78333333333333],PARAMETER["standard_parallel_2",40.71666666666667],PARAMETER["latitude_of_origin",40.33333333333334],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",500000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","32142"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.78333333333333 +lat_2=40.71666666666667 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000 +y_0=1000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32142,'EPSG',32142,'PROJCS["NAD83 / Utah North",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",41.78333333333333],PARAMETER["standard_parallel_2",40.71666666666667],PARAMETER["latitude_of_origin",40.33333333333334],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",500000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","32142"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=41.78333333333333 +lat_2=40.71666666666667 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32143 : NAD83 / Utah Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32143,'EPSG',32143,'PROJCS["NAD83 / Utah Central",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.65],PARAMETER["standard_parallel_2",39.01666666666667],PARAMETER["latitude_of_origin",38.33333333333334],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",500000],PARAMETER["false_northing",2000000],AUTHORITY["EPSG","32143"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.65 +lat_2=39.01666666666667 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=500000 +y_0=2000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32143,'EPSG',32143,'PROJCS["NAD83 / Utah Central",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.65],PARAMETER["standard_parallel_2",39.01666666666667],PARAMETER["latitude_of_origin",38.33333333333334],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",500000],PARAMETER["false_northing",2000000],AUTHORITY["EPSG","32143"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.65 +lat_2=39.01666666666667 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=500000 +y_0=2000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32144 : NAD83 / Utah South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32144,'EPSG',32144,'PROJCS["NAD83 / Utah South",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.35],PARAMETER["standard_parallel_2",37.21666666666667],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",500000],PARAMETER["false_northing",3000000],AUTHORITY["EPSG","32144"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.35 +lat_2=37.21666666666667 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=500000 +y_0=3000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32144,'EPSG',32144,'PROJCS["NAD83 / Utah South",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.35],PARAMETER["standard_parallel_2",37.21666666666667],PARAMETER["latitude_of_origin",36.66666666666666],PARAMETER["central_meridian",-111.5],PARAMETER["false_easting",500000],PARAMETER["false_northing",3000000],AUTHORITY["EPSG","32144"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.35 +lat_2=37.21666666666667 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=500000 +y_0=3000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32145 : NAD83 / Vermont --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32145,'EPSG',32145,'PROJCS["NAD83 / Vermont",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.5],PARAMETER["central_meridian",-72.5],PARAMETER["scale_factor",0.999964286],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32145"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.5 +lon_0=-72.5 +k=0.999964286 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32145,'EPSG',32145,'PROJCS["NAD83 / Vermont",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",42.5],PARAMETER["central_meridian",-72.5],PARAMETER["scale_factor",0.999964286],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32145"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=42.5 +lon_0=-72.5 +k=0.999964286 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32146 : NAD83 / Virginia North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32146,'EPSG',32146,'PROJCS["NAD83 / Virginia North",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.2],PARAMETER["standard_parallel_2",38.03333333333333],PARAMETER["latitude_of_origin",37.66666666666666],PARAMETER["central_meridian",-78.5],PARAMETER["false_easting",3500000],PARAMETER["false_northing",2000000],AUTHORITY["EPSG","32146"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.2 +lat_2=38.03333333333333 +lat_0=37.66666666666666 +lon_0=-78.5 +x_0=3500000 +y_0=2000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32146,'EPSG',32146,'PROJCS["NAD83 / Virginia North",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",39.2],PARAMETER["standard_parallel_2",38.03333333333333],PARAMETER["latitude_of_origin",37.66666666666666],PARAMETER["central_meridian",-78.5],PARAMETER["false_easting",3500000],PARAMETER["false_northing",2000000],AUTHORITY["EPSG","32146"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=39.2 +lat_2=38.03333333333333 +lat_0=37.66666666666666 +lon_0=-78.5 +x_0=3500000 +y_0=2000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32147 : NAD83 / Virginia South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32147,'EPSG',32147,'PROJCS["NAD83 / Virginia South",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.96666666666667],PARAMETER["standard_parallel_2",36.76666666666667],PARAMETER["latitude_of_origin",36.33333333333334],PARAMETER["central_meridian",-78.5],PARAMETER["false_easting",3500000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","32147"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.96666666666667 +lat_2=36.76666666666667 +lat_0=36.33333333333334 +lon_0=-78.5 +x_0=3500000 +y_0=1000000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32147,'EPSG',32147,'PROJCS["NAD83 / Virginia South",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",37.96666666666667],PARAMETER["standard_parallel_2",36.76666666666667],PARAMETER["latitude_of_origin",36.33333333333334],PARAMETER["central_meridian",-78.5],PARAMETER["false_easting",3500000],PARAMETER["false_northing",1000000],AUTHORITY["EPSG","32147"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=37.96666666666667 +lat_2=36.76666666666667 +lat_0=36.33333333333334 +lon_0=-78.5 +x_0=3500000 +y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32148 : NAD83 / Washington North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32148,'EPSG',32148,'PROJCS["NAD83 / Washington North",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.73333333333333],PARAMETER["standard_parallel_2",47.5],PARAMETER["latitude_of_origin",47],PARAMETER["central_meridian",-120.8333333333333],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32148"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.73333333333333 +lat_2=47.5 +lat_0=47 +lon_0=-120.8333333333333 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32148,'EPSG',32148,'PROJCS["NAD83 / Washington North",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",48.73333333333333],PARAMETER["standard_parallel_2",47.5],PARAMETER["latitude_of_origin",47],PARAMETER["central_meridian",-120.8333333333333],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32148"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=48.73333333333333 +lat_2=47.5 +lat_0=47 +lon_0=-120.8333333333333 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32149 : NAD83 / Washington South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32149,'EPSG',32149,'PROJCS["NAD83 / Washington South",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.33333333333334],PARAMETER["standard_parallel_2",45.83333333333334],PARAMETER["latitude_of_origin",45.33333333333334],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32149"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.33333333333334 +lat_2=45.83333333333334 +lat_0=45.33333333333334 +lon_0=-120.5 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32149,'EPSG',32149,'PROJCS["NAD83 / Washington South",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",47.33333333333334],PARAMETER["standard_parallel_2",45.83333333333334],PARAMETER["latitude_of_origin",45.33333333333334],PARAMETER["central_meridian",-120.5],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32149"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=47.33333333333334 +lat_2=45.83333333333334 +lat_0=45.33333333333334 +lon_0=-120.5 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32150 : NAD83 / West Virginia North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32150,'EPSG',32150,'PROJCS["NAD83 / West Virginia North",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.25],PARAMETER["standard_parallel_2",39],PARAMETER["latitude_of_origin",38.5],PARAMETER["central_meridian",-79.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32150"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.25 +lat_2=39 +lat_0=38.5 +lon_0=-79.5 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32150,'EPSG',32150,'PROJCS["NAD83 / West Virginia North",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.25],PARAMETER["standard_parallel_2",39],PARAMETER["latitude_of_origin",38.5],PARAMETER["central_meridian",-79.5],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32150"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=40.25 +lat_2=39 +lat_0=38.5 +lon_0=-79.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32151 : NAD83 / West Virginia South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32151,'EPSG',32151,'PROJCS["NAD83 / West Virginia South",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.88333333333333],PARAMETER["standard_parallel_2",37.48333333333333],PARAMETER["latitude_of_origin",37],PARAMETER["central_meridian",-81],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32151"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.88333333333333 +lat_2=37.48333333333333 +lat_0=37 +lon_0=-81 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32151,'EPSG',32151,'PROJCS["NAD83 / West Virginia South",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",38.88333333333333],PARAMETER["standard_parallel_2",37.48333333333333],PARAMETER["latitude_of_origin",37],PARAMETER["central_meridian",-81],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32151"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=38.88333333333333 +lat_2=37.48333333333333 +lat_0=37 +lon_0=-81 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32152 : NAD83 / Wisconsin North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32152,'EPSG',32152,'PROJCS["NAD83 / Wisconsin North",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",46.76666666666667],PARAMETER["standard_parallel_2",45.56666666666667],PARAMETER["latitude_of_origin",45.16666666666666],PARAMETER["central_meridian",-90],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32152"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=46.76666666666667 +lat_2=45.56666666666667 +lat_0=45.16666666666666 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32152,'EPSG',32152,'PROJCS["NAD83 / Wisconsin North",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",46.76666666666667],PARAMETER["standard_parallel_2",45.56666666666667],PARAMETER["latitude_of_origin",45.16666666666666],PARAMETER["central_meridian",-90],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32152"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=46.76666666666667 +lat_2=45.56666666666667 +lat_0=45.16666666666666 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32153 : NAD83 / Wisconsin Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32153,'EPSG',32153,'PROJCS["NAD83 / Wisconsin Central",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.5],PARAMETER["standard_parallel_2",44.25],PARAMETER["latitude_of_origin",43.83333333333334],PARAMETER["central_meridian",-90],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32153"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.5 +lat_2=44.25 +lat_0=43.83333333333334 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32153,'EPSG',32153,'PROJCS["NAD83 / Wisconsin Central",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45.5],PARAMETER["standard_parallel_2",44.25],PARAMETER["latitude_of_origin",43.83333333333334],PARAMETER["central_meridian",-90],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32153"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=45.5 +lat_2=44.25 +lat_0=43.83333333333334 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32154 : NAD83 / Wisconsin South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32154,'EPSG',32154,'PROJCS["NAD83 / Wisconsin South",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44.06666666666667],PARAMETER["standard_parallel_2",42.73333333333333],PARAMETER["latitude_of_origin",42],PARAMETER["central_meridian",-90],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32154"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44.06666666666667 +lat_2=42.73333333333333 +lat_0=42 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32154,'EPSG',32154,'PROJCS["NAD83 / Wisconsin South",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",44.06666666666667],PARAMETER["standard_parallel_2",42.73333333333333],PARAMETER["latitude_of_origin",42],PARAMETER["central_meridian",-90],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32154"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=44.06666666666667 +lat_2=42.73333333333333 +lat_0=42 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32155 : NAD83 / Wyoming East --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32155,'EPSG',32155,'PROJCS["NAD83 / Wyoming East",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-105.1666666666667],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32155"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-105.1666666666667 +k=0.9999375 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32155,'EPSG',32155,'PROJCS["NAD83 / Wyoming East",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-105.1666666666667],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32155"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-105.1666666666667 +k=0.9999375 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32156 : NAD83 / Wyoming East Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32156,'EPSG',32156,'PROJCS["NAD83 / Wyoming East Central",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-107.3333333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",400000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","32156"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-107.3333333333333 +k=0.9999375 +x_0=400000 +y_0=100000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32156,'EPSG',32156,'PROJCS["NAD83 / Wyoming East Central",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-107.3333333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",400000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","32156"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-107.3333333333333 +k=0.9999375 +x_0=400000 +y_0=100000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32157 : NAD83 / Wyoming West Central --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32157,'EPSG',32157,'PROJCS["NAD83 / Wyoming West Central",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-108.75],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32157"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-108.75 +k=0.9999375 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32157,'EPSG',32157,'PROJCS["NAD83 / Wyoming West Central",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-108.75],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32157"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-108.75 +k=0.9999375 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32158 : NAD83 / Wyoming West --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32158,'EPSG',32158,'PROJCS["NAD83 / Wyoming West",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-110.0833333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",800000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","32158"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-110.0833333333333 +k=0.9999375 +x_0=800000 +y_0=100000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32158,'EPSG',32158,'PROJCS["NAD83 / Wyoming West",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",40.5],PARAMETER["central_meridian",-110.0833333333333],PARAMETER["scale_factor",0.9999375],PARAMETER["false_easting",800000],PARAMETER["false_northing",100000],AUTHORITY["EPSG","32158"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=40.5 +lon_0=-110.0833333333333 +k=0.9999375 +x_0=800000 +y_0=100000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32161 : NAD83 / Puerto Rico & Virgin Is. --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32161,'EPSG',32161,'PROJCS["NAD83 / Puerto Rico & Virgin Is.",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",18.43333333333333],PARAMETER["standard_parallel_2",18.03333333333333],PARAMETER["latitude_of_origin",17.83333333333333],PARAMETER["central_meridian",-66.43333333333334],PARAMETER["false_easting",200000],PARAMETER["false_northing",200000],AUTHORITY["EPSG","32161"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=18.43333333333333 +lat_2=18.03333333333333 +lat_0=17.83333333333333 +lon_0=-66.43333333333334 +x_0=200000 +y_0=200000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32161,'EPSG',32161,'PROJCS["NAD83 / Puerto Rico & Virgin Is.",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",18.43333333333333],PARAMETER["standard_parallel_2",18.03333333333333],PARAMETER["latitude_of_origin",17.83333333333333],PARAMETER["central_meridian",-66.43333333333334],PARAMETER["false_easting",200000],PARAMETER["false_northing",200000],AUTHORITY["EPSG","32161"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=18.43333333333333 +lat_2=18.03333333333333 +lat_0=17.83333333333333 +lon_0=-66.43333333333334 +x_0=200000 +y_0=200000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32164 : NAD83 / BLM 14N (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32164,'EPSG',32164,'PROJCS["NAD83 / BLM 14N (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",0],PARAMETER["central_meridian",-99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1640416.67],PARAMETER["false_northing",0],AUTHORITY["EPSG","32164"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-99 +k=0.9996 +x_0=500000.001016002 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32164,'EPSG',32164,'PROJCS["NAD83 / BLM 14N (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1640416.67],PARAMETER["false_northing",0],AUTHORITY["EPSG","32164"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-99 +k=0.9996 +x_0=500000.001016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 32165 : NAD83 / BLM 15N (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32165,'EPSG',32165,'PROJCS["NAD83 / BLM 15N (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",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1640416.67],PARAMETER["false_northing",0],AUTHORITY["EPSG","32165"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-93 +k=0.9996 +x_0=500000.001016002 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32165,'EPSG',32165,'PROJCS["NAD83 / BLM 15N (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1640416.67],PARAMETER["false_northing",0],AUTHORITY["EPSG","32165"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-93 +k=0.9996 +x_0=500000.001016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 32166 : NAD83 / BLM 16N (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32166,'EPSG',32166,'PROJCS["NAD83 / BLM 16N (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",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1640416.67],PARAMETER["false_northing",0],AUTHORITY["EPSG","32166"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-87 +k=0.9996 +x_0=500000.001016002 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32166,'EPSG',32166,'PROJCS["NAD83 / BLM 16N (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1640416.67],PARAMETER["false_northing",0],AUTHORITY["EPSG","32166"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-87 +k=0.9996 +x_0=500000.001016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 32167 : NAD83 / BLM 17N (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32167,'EPSG',32167,'PROJCS["NAD83 / BLM 17N (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",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1640416.67],PARAMETER["false_northing",0],AUTHORITY["EPSG","32167"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-81 +k=0.9996 +x_0=500000.001016002 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32167,'EPSG',32167,'PROJCS["NAD83 / BLM 17N (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1640416.67],PARAMETER["false_northing",0],AUTHORITY["EPSG","32167"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-81 +k=0.9996 +x_0=500000.001016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs '); --- --- EPSG 32180 : NAD83 / SCoPQ zone 2 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32180,'EPSG',32180,'PROJCS["NAD83 / SCoPQ zone 2",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-55.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32180"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-55.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32180,'EPSG',32180,'PROJCS["NAD83 / SCoPQ zone 2",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-55.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32180"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-55.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32181 : NAD83 / MTM zone 1 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32181,'EPSG',32181,'PROJCS["NAD83 / MTM zone 1",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-53],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32181"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-53 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32181,'EPSG',32181,'PROJCS["NAD83 / MTM zone 1",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-53],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32181"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-53 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32182 : NAD83 / MTM zone 2 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32182,'EPSG',32182,'PROJCS["NAD83 / MTM zone 2",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-56],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32182"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-56 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32182,'EPSG',32182,'PROJCS["NAD83 / MTM zone 2",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-56],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32182"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-56 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32183 : NAD83 / MTM zone 3 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32183,'EPSG',32183,'PROJCS["NAD83 / MTM zone 3",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-58.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32183"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-58.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32183,'EPSG',32183,'PROJCS["NAD83 / MTM zone 3",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-58.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32183"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-58.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32184 : NAD83 / MTM zone 4 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32184,'EPSG',32184,'PROJCS["NAD83 / MTM zone 4",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-61.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32184"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-61.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32184,'EPSG',32184,'PROJCS["NAD83 / MTM zone 4",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-61.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32184"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-61.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32185 : NAD83 / MTM zone 5 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32185,'EPSG',32185,'PROJCS["NAD83 / MTM zone 5",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-64.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32185"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-64.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32185,'EPSG',32185,'PROJCS["NAD83 / MTM zone 5",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-64.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32185"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-64.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32186 : NAD83 / MTM zone 6 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32186,'EPSG',32186,'PROJCS["NAD83 / MTM zone 6",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-67.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32186"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-67.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32186,'EPSG',32186,'PROJCS["NAD83 / MTM zone 6",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-67.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32186"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-67.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32187 : NAD83 / MTM zone 7 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32187,'EPSG',32187,'PROJCS["NAD83 / MTM zone 7",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-70.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32187"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-70.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32187,'EPSG',32187,'PROJCS["NAD83 / MTM zone 7",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-70.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32187"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-70.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32188 : NAD83 / MTM zone 8 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32188,'EPSG',32188,'PROJCS["NAD83 / MTM zone 8",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-73.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32188"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-73.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32188,'EPSG',32188,'PROJCS["NAD83 / MTM zone 8",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-73.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32188"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-73.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32189 : NAD83 / MTM zone 9 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32189,'EPSG',32189,'PROJCS["NAD83 / MTM zone 9",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-76.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32189"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-76.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32189,'EPSG',32189,'PROJCS["NAD83 / MTM zone 9",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-76.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32189"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-76.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32190 : NAD83 / MTM zone 10 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32190,'EPSG',32190,'PROJCS["NAD83 / MTM zone 10",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-79.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32190"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-79.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32190,'EPSG',32190,'PROJCS["NAD83 / MTM zone 10",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-79.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32190"],AXIS["E(X)",EAST],AXIS["N(Y)",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-79.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32191 : NAD83 / MTM zone 11 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32191,'EPSG',32191,'PROJCS["NAD83 / MTM zone 11",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-82.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32191"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-82.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32191,'EPSG',32191,'PROJCS["NAD83 / MTM zone 11",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-82.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32191"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-82.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32192 : NAD83 / MTM zone 12 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32192,'EPSG',32192,'PROJCS["NAD83 / MTM zone 12",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32192"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-81 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32192,'EPSG',32192,'PROJCS["NAD83 / MTM zone 12",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32192"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-81 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32193 : NAD83 / MTM zone 13 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32193,'EPSG',32193,'PROJCS["NAD83 / MTM zone 13",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-84],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32193"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-84 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32193,'EPSG',32193,'PROJCS["NAD83 / MTM zone 13",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-84],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32193"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-84 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32194 : NAD83 / MTM zone 14 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32194,'EPSG',32194,'PROJCS["NAD83 / MTM zone 14",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32194"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-87 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32194,'EPSG',32194,'PROJCS["NAD83 / MTM zone 14",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32194"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-87 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32195 : NAD83 / MTM zone 15 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32195,'EPSG',32195,'PROJCS["NAD83 / MTM zone 15",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-90],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32195"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-90 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32195,'EPSG',32195,'PROJCS["NAD83 / MTM zone 15",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-90],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32195"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-90 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32196 : NAD83 / MTM zone 16 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32196,'EPSG',32196,'PROJCS["NAD83 / MTM zone 16",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32196"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-93 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32196,'EPSG',32196,'PROJCS["NAD83 / MTM zone 16",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32196"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-93 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32197 : NAD83 / MTM zone 17 --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32197,'EPSG',32197,'PROJCS["NAD83 / MTM zone 17",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-96],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32197"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-96 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32197,'EPSG',32197,'PROJCS["NAD83 / MTM zone 17",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-96],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",304800],PARAMETER["false_northing",0],AUTHORITY["EPSG","32197"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-96 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32198 : NAD83 / Quebec Lambert --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32198,'EPSG',32198,'PROJCS["NAD83 / Quebec Lambert",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",60],PARAMETER["standard_parallel_2",46],PARAMETER["latitude_of_origin",44],PARAMETER["central_meridian",-68.5],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","32198"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=60 +lat_2=46 +lat_0=44 +lon_0=-68.5 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32198,'EPSG',32198,'PROJCS["NAD83 / Quebec Lambert",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",60],PARAMETER["standard_parallel_2",46],PARAMETER["latitude_of_origin",44],PARAMETER["central_meridian",-68.5],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","32198"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=60 +lat_2=46 +lat_0=44 +lon_0=-68.5 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32199 : NAD83 / Louisiana Offshore --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32199,'EPSG',32199,'PROJCS["NAD83 / Louisiana Offshore",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["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",27.83333333333333],PARAMETER["standard_parallel_2",26.16666666666667],PARAMETER["latitude_of_origin",25.5],PARAMETER["central_meridian",-91.33333333333333],PARAMETER["false_easting",1000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32199"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=27.83333333333333 +lat_2=26.16666666666667 +lat_0=25.5 +lon_0=-91.33333333333333 +x_0=1000000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32199,'EPSG',32199,'PROJCS["NAD83 / Louisiana Offshore",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",27.83333333333333],PARAMETER["standard_parallel_2",26.16666666666667],PARAMETER["latitude_of_origin",25.5],PARAMETER["central_meridian",-91.33333333333333],PARAMETER["false_easting",1000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32199"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=27.83333333333333 +lat_2=26.16666666666667 +lat_0=25.5 +lon_0=-91.33333333333333 +x_0=1000000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '); --- --- EPSG 32201 : WGS 72 / UTM zone 1N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32201,'EPSG',32201,'PROJCS["WGS 72 / UTM zone 1N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32201"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=1 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32201,'EPSG',32201,'PROJCS["WGS 72 / UTM zone 1N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32201"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=1 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32202 : WGS 72 / UTM zone 2N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32202,'EPSG',32202,'PROJCS["WGS 72 / UTM zone 2N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32202"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=2 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32202,'EPSG',32202,'PROJCS["WGS 72 / UTM zone 2N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32202"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=2 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32203 : WGS 72 / UTM zone 3N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32203,'EPSG',32203,'PROJCS["WGS 72 / UTM zone 3N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32203"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=3 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32203,'EPSG',32203,'PROJCS["WGS 72 / UTM zone 3N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32203"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=3 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32204 : WGS 72 / UTM zone 4N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32204,'EPSG',32204,'PROJCS["WGS 72 / UTM zone 4N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-159],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32204"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=4 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32204,'EPSG',32204,'PROJCS["WGS 72 / UTM zone 4N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-159],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32204"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=4 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32205 : WGS 72 / UTM zone 5N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32205,'EPSG',32205,'PROJCS["WGS 72 / UTM zone 5N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32205"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=5 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32205,'EPSG',32205,'PROJCS["WGS 72 / UTM zone 5N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32205"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=5 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32206 : WGS 72 / UTM zone 6N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32206,'EPSG',32206,'PROJCS["WGS 72 / UTM zone 6N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32206"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=6 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32206,'EPSG',32206,'PROJCS["WGS 72 / UTM zone 6N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32206"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=6 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32207 : WGS 72 / UTM zone 7N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32207,'EPSG',32207,'PROJCS["WGS 72 / UTM zone 7N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32207"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=7 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32207,'EPSG',32207,'PROJCS["WGS 72 / UTM zone 7N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32207"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=7 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32208 : WGS 72 / UTM zone 8N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32208,'EPSG',32208,'PROJCS["WGS 72 / UTM zone 8N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32208"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=8 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32208,'EPSG',32208,'PROJCS["WGS 72 / UTM zone 8N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32208"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=8 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32209 : WGS 72 / UTM zone 9N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32209,'EPSG',32209,'PROJCS["WGS 72 / UTM zone 9N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32209"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=9 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32209,'EPSG',32209,'PROJCS["WGS 72 / UTM zone 9N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32209"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=9 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32210 : WGS 72 / UTM zone 10N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32210,'EPSG',32210,'PROJCS["WGS 72 / UTM zone 10N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32210"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=10 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32210,'EPSG',32210,'PROJCS["WGS 72 / UTM zone 10N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32210"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=10 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32211 : WGS 72 / UTM zone 11N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32211,'EPSG',32211,'PROJCS["WGS 72 / UTM zone 11N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],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],AUTHORITY["EPSG","32211"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=11 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32211,'EPSG',32211,'PROJCS["WGS 72 / UTM zone 11N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],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],AUTHORITY["EPSG","32211"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=11 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32212 : WGS 72 / UTM zone 12N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32212,'EPSG',32212,'PROJCS["WGS 72 / UTM zone 12N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32212"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=12 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32212,'EPSG',32212,'PROJCS["WGS 72 / UTM zone 12N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32212"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=12 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32213 : WGS 72 / UTM zone 13N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32213,'EPSG',32213,'PROJCS["WGS 72 / UTM zone 13N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32213"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=13 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32213,'EPSG',32213,'PROJCS["WGS 72 / UTM zone 13N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32213"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=13 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32214 : WGS 72 / UTM zone 14N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32214,'EPSG',32214,'PROJCS["WGS 72 / UTM zone 14N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32214"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=14 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32214,'EPSG',32214,'PROJCS["WGS 72 / UTM zone 14N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32214"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=14 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32215 : WGS 72 / UTM zone 15N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32215,'EPSG',32215,'PROJCS["WGS 72 / UTM zone 15N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32215"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=15 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32215,'EPSG',32215,'PROJCS["WGS 72 / UTM zone 15N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32215"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=15 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32216 : WGS 72 / UTM zone 16N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32216,'EPSG',32216,'PROJCS["WGS 72 / UTM zone 16N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32216"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=16 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32216,'EPSG',32216,'PROJCS["WGS 72 / UTM zone 16N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32216"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=16 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32217 : WGS 72 / UTM zone 17N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32217,'EPSG',32217,'PROJCS["WGS 72 / UTM zone 17N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32217"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32217,'EPSG',32217,'PROJCS["WGS 72 / UTM zone 17N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32217"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32218 : WGS 72 / UTM zone 18N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32218,'EPSG',32218,'PROJCS["WGS 72 / UTM zone 18N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32218"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32218,'EPSG',32218,'PROJCS["WGS 72 / UTM zone 18N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32218"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32219 : WGS 72 / UTM zone 19N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32219,'EPSG',32219,'PROJCS["WGS 72 / UTM zone 19N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32219"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32219,'EPSG',32219,'PROJCS["WGS 72 / UTM zone 19N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32219"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32220 : WGS 72 / UTM zone 20N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32220,'EPSG',32220,'PROJCS["WGS 72 / UTM zone 20N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32220"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32220,'EPSG',32220,'PROJCS["WGS 72 / UTM zone 20N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32220"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32221 : WGS 72 / UTM zone 21N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32221,'EPSG',32221,'PROJCS["WGS 72 / UTM zone 21N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32221"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32221,'EPSG',32221,'PROJCS["WGS 72 / UTM zone 21N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32221"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32222 : WGS 72 / UTM zone 22N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32222,'EPSG',32222,'PROJCS["WGS 72 / UTM zone 22N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32222"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32222,'EPSG',32222,'PROJCS["WGS 72 / UTM zone 22N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32222"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32223 : WGS 72 / UTM zone 23N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32223,'EPSG',32223,'PROJCS["WGS 72 / UTM zone 23N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32223"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=23 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32223,'EPSG',32223,'PROJCS["WGS 72 / UTM zone 23N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32223"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=23 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32224 : WGS 72 / UTM zone 24N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32224,'EPSG',32224,'PROJCS["WGS 72 / UTM zone 24N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32224"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=24 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32224,'EPSG',32224,'PROJCS["WGS 72 / UTM zone 24N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32224"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=24 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32225 : WGS 72 / UTM zone 25N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32225,'EPSG',32225,'PROJCS["WGS 72 / UTM zone 25N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32225"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=25 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32225,'EPSG',32225,'PROJCS["WGS 72 / UTM zone 25N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32225"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=25 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32226 : WGS 72 / UTM zone 26N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32226,'EPSG',32226,'PROJCS["WGS 72 / UTM zone 26N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32226"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=26 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32226,'EPSG',32226,'PROJCS["WGS 72 / UTM zone 26N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32226"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=26 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32227 : WGS 72 / UTM zone 27N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32227,'EPSG',32227,'PROJCS["WGS 72 / UTM zone 27N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32227"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=27 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32227,'EPSG',32227,'PROJCS["WGS 72 / UTM zone 27N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32227"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=27 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32228 : WGS 72 / UTM zone 28N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32228,'EPSG',32228,'PROJCS["WGS 72 / UTM zone 28N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32228"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32228,'EPSG',32228,'PROJCS["WGS 72 / UTM zone 28N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32228"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32229 : WGS 72 / UTM zone 29N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32229,'EPSG',32229,'PROJCS["WGS 72 / UTM zone 29N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32229"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32229,'EPSG',32229,'PROJCS["WGS 72 / UTM zone 29N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32229"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32230 : WGS 72 / UTM zone 30N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32230,'EPSG',32230,'PROJCS["WGS 72 / UTM zone 30N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32230"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=30 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32230,'EPSG',32230,'PROJCS["WGS 72 / UTM zone 30N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32230"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=30 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32231 : WGS 72 / UTM zone 31N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32231,'EPSG',32231,'PROJCS["WGS 72 / UTM zone 31N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32231"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=31 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32231,'EPSG',32231,'PROJCS["WGS 72 / UTM zone 31N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32231"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=31 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32232 : WGS 72 / UTM zone 32N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32232,'EPSG',32232,'PROJCS["WGS 72 / UTM zone 32N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32232"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32232,'EPSG',32232,'PROJCS["WGS 72 / UTM zone 32N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32232"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32233 : WGS 72 / UTM zone 33N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32233,'EPSG',32233,'PROJCS["WGS 72 / UTM zone 33N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32233"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=33 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32233,'EPSG',32233,'PROJCS["WGS 72 / UTM zone 33N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32233"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=33 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32234 : WGS 72 / UTM zone 34N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32234,'EPSG',32234,'PROJCS["WGS 72 / UTM zone 34N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32234"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=34 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32234,'EPSG',32234,'PROJCS["WGS 72 / UTM zone 34N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32234"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=34 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32235 : WGS 72 / UTM zone 35N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32235,'EPSG',32235,'PROJCS["WGS 72 / UTM zone 35N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32235"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=35 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32235,'EPSG',32235,'PROJCS["WGS 72 / UTM zone 35N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32235"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=35 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32236 : WGS 72 / UTM zone 36N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32236,'EPSG',32236,'PROJCS["WGS 72 / UTM zone 36N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32236"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=36 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32236,'EPSG',32236,'PROJCS["WGS 72 / UTM zone 36N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32236"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=36 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32237 : WGS 72 / UTM zone 37N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32237,'EPSG',32237,'PROJCS["WGS 72 / UTM zone 37N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32237"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=37 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32237,'EPSG',32237,'PROJCS["WGS 72 / UTM zone 37N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32237"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=37 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32238 : WGS 72 / UTM zone 38N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32238,'EPSG',32238,'PROJCS["WGS 72 / UTM zone 38N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32238"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32238,'EPSG',32238,'PROJCS["WGS 72 / UTM zone 38N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32238"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32239 : WGS 72 / UTM zone 39N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32239,'EPSG',32239,'PROJCS["WGS 72 / UTM zone 39N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32239"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=39 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32239,'EPSG',32239,'PROJCS["WGS 72 / UTM zone 39N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32239"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=39 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32240 : WGS 72 / UTM zone 40N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32240,'EPSG',32240,'PROJCS["WGS 72 / UTM zone 40N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32240"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=40 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32240,'EPSG',32240,'PROJCS["WGS 72 / UTM zone 40N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32240"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=40 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32241 : WGS 72 / UTM zone 41N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32241,'EPSG',32241,'PROJCS["WGS 72 / UTM zone 41N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32241"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=41 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32241,'EPSG',32241,'PROJCS["WGS 72 / UTM zone 41N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32241"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=41 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32242 : WGS 72 / UTM zone 42N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32242,'EPSG',32242,'PROJCS["WGS 72 / UTM zone 42N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32242"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=42 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32242,'EPSG',32242,'PROJCS["WGS 72 / UTM zone 42N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32242"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=42 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32243 : WGS 72 / UTM zone 43N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32243,'EPSG',32243,'PROJCS["WGS 72 / UTM zone 43N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32243"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=43 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32243,'EPSG',32243,'PROJCS["WGS 72 / UTM zone 43N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32243"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=43 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32244 : WGS 72 / UTM zone 44N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32244,'EPSG',32244,'PROJCS["WGS 72 / UTM zone 44N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32244"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=44 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32244,'EPSG',32244,'PROJCS["WGS 72 / UTM zone 44N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32244"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=44 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32245 : WGS 72 / UTM zone 45N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32245,'EPSG',32245,'PROJCS["WGS 72 / UTM zone 45N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32245"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=45 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32245,'EPSG',32245,'PROJCS["WGS 72 / UTM zone 45N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32245"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=45 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32246 : WGS 72 / UTM zone 46N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32246,'EPSG',32246,'PROJCS["WGS 72 / UTM zone 46N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32246"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=46 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32246,'EPSG',32246,'PROJCS["WGS 72 / UTM zone 46N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32246"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=46 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32247 : WGS 72 / UTM zone 47N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32247,'EPSG',32247,'PROJCS["WGS 72 / UTM zone 47N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32247"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=47 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32247,'EPSG',32247,'PROJCS["WGS 72 / UTM zone 47N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32247"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=47 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32248 : WGS 72 / UTM zone 48N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32248,'EPSG',32248,'PROJCS["WGS 72 / UTM zone 48N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32248"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=48 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32248,'EPSG',32248,'PROJCS["WGS 72 / UTM zone 48N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32248"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=48 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32249 : WGS 72 / UTM zone 49N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32249,'EPSG',32249,'PROJCS["WGS 72 / UTM zone 49N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32249"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=49 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32249,'EPSG',32249,'PROJCS["WGS 72 / UTM zone 49N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32249"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=49 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32250 : WGS 72 / UTM zone 50N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32250,'EPSG',32250,'PROJCS["WGS 72 / UTM zone 50N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],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],AUTHORITY["EPSG","32250"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=50 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32250,'EPSG',32250,'PROJCS["WGS 72 / UTM zone 50N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],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],AUTHORITY["EPSG","32250"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=50 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32251 : WGS 72 / UTM zone 51N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32251,'EPSG',32251,'PROJCS["WGS 72 / UTM zone 51N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32251"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=51 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32251,'EPSG',32251,'PROJCS["WGS 72 / UTM zone 51N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32251"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=51 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32252 : WGS 72 / UTM zone 52N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32252,'EPSG',32252,'PROJCS["WGS 72 / UTM zone 52N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32252"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=52 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32252,'EPSG',32252,'PROJCS["WGS 72 / UTM zone 52N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32252"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=52 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32253 : WGS 72 / UTM zone 53N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32253,'EPSG',32253,'PROJCS["WGS 72 / UTM zone 53N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32253"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=53 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32253,'EPSG',32253,'PROJCS["WGS 72 / UTM zone 53N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32253"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=53 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32254 : WGS 72 / UTM zone 54N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32254,'EPSG',32254,'PROJCS["WGS 72 / UTM zone 54N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32254"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=54 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32254,'EPSG',32254,'PROJCS["WGS 72 / UTM zone 54N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32254"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=54 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32255 : WGS 72 / UTM zone 55N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32255,'EPSG',32255,'PROJCS["WGS 72 / UTM zone 55N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32255"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=55 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32255,'EPSG',32255,'PROJCS["WGS 72 / UTM zone 55N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32255"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=55 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32256 : WGS 72 / UTM zone 56N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32256,'EPSG',32256,'PROJCS["WGS 72 / UTM zone 56N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32256"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=56 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32256,'EPSG',32256,'PROJCS["WGS 72 / UTM zone 56N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32256"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=56 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32257 : WGS 72 / UTM zone 57N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32257,'EPSG',32257,'PROJCS["WGS 72 / UTM zone 57N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",159],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32257"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=57 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32257,'EPSG',32257,'PROJCS["WGS 72 / UTM zone 57N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",159],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32257"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=57 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32258 : WGS 72 / UTM zone 58N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32258,'EPSG',32258,'PROJCS["WGS 72 / UTM zone 58N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32258"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=58 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32258,'EPSG',32258,'PROJCS["WGS 72 / UTM zone 58N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32258"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=58 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32259 : WGS 72 / UTM zone 59N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32259,'EPSG',32259,'PROJCS["WGS 72 / UTM zone 59N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32259"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=59 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32259,'EPSG',32259,'PROJCS["WGS 72 / UTM zone 59N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32259"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=59 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32260 : WGS 72 / UTM zone 60N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32260,'EPSG',32260,'PROJCS["WGS 72 / UTM zone 60N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32260"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=60 +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32260,'EPSG',32260,'PROJCS["WGS 72 / UTM zone 60N",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32260"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=60 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32301 : WGS 72 / UTM zone 1S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32301,'EPSG',32301,'PROJCS["WGS 72 / UTM zone 1S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32301"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=1 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32301,'EPSG',32301,'PROJCS["WGS 72 / UTM zone 1S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32301"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=1 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32302 : WGS 72 / UTM zone 2S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32302,'EPSG',32302,'PROJCS["WGS 72 / UTM zone 2S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32302"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=2 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32302,'EPSG',32302,'PROJCS["WGS 72 / UTM zone 2S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32302"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=2 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32303 : WGS 72 / UTM zone 3S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32303,'EPSG',32303,'PROJCS["WGS 72 / UTM zone 3S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32303"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=3 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32303,'EPSG',32303,'PROJCS["WGS 72 / UTM zone 3S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32303"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=3 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32304 : WGS 72 / UTM zone 4S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32304,'EPSG',32304,'PROJCS["WGS 72 / UTM zone 4S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-159],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32304"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=4 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32304,'EPSG',32304,'PROJCS["WGS 72 / UTM zone 4S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-159],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32304"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=4 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32305 : WGS 72 / UTM zone 5S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32305,'EPSG',32305,'PROJCS["WGS 72 / UTM zone 5S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32305"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=5 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32305,'EPSG',32305,'PROJCS["WGS 72 / UTM zone 5S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32305"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=5 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32306 : WGS 72 / UTM zone 6S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32306,'EPSG',32306,'PROJCS["WGS 72 / UTM zone 6S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32306"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=6 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32306,'EPSG',32306,'PROJCS["WGS 72 / UTM zone 6S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32306"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=6 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32307 : WGS 72 / UTM zone 7S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32307,'EPSG',32307,'PROJCS["WGS 72 / UTM zone 7S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32307"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=7 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32307,'EPSG',32307,'PROJCS["WGS 72 / UTM zone 7S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32307"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=7 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32308 : WGS 72 / UTM zone 8S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32308,'EPSG',32308,'PROJCS["WGS 72 / UTM zone 8S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32308"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=8 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32308,'EPSG',32308,'PROJCS["WGS 72 / UTM zone 8S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32308"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=8 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32309 : WGS 72 / UTM zone 9S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32309,'EPSG',32309,'PROJCS["WGS 72 / UTM zone 9S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32309"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=9 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32309,'EPSG',32309,'PROJCS["WGS 72 / UTM zone 9S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32309"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=9 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32310 : WGS 72 / UTM zone 10S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32310,'EPSG',32310,'PROJCS["WGS 72 / UTM zone 10S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32310"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=10 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32310,'EPSG',32310,'PROJCS["WGS 72 / UTM zone 10S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32310"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=10 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32311 : WGS 72 / UTM zone 11S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32311,'EPSG',32311,'PROJCS["WGS 72 / UTM zone 11S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32311"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=11 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32311,'EPSG',32311,'PROJCS["WGS 72 / UTM zone 11S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32311"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=11 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32312 : WGS 72 / UTM zone 12S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32312,'EPSG',32312,'PROJCS["WGS 72 / UTM zone 12S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32312"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=12 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32312,'EPSG',32312,'PROJCS["WGS 72 / UTM zone 12S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32312"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=12 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32313 : WGS 72 / UTM zone 13S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32313,'EPSG',32313,'PROJCS["WGS 72 / UTM zone 13S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32313"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=13 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32313,'EPSG',32313,'PROJCS["WGS 72 / UTM zone 13S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32313"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=13 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32314 : WGS 72 / UTM zone 14S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32314,'EPSG',32314,'PROJCS["WGS 72 / UTM zone 14S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32314"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=14 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32314,'EPSG',32314,'PROJCS["WGS 72 / UTM zone 14S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32314"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=14 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32315 : WGS 72 / UTM zone 15S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32315,'EPSG',32315,'PROJCS["WGS 72 / UTM zone 15S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32315"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=15 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32315,'EPSG',32315,'PROJCS["WGS 72 / UTM zone 15S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32315"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=15 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32316 : WGS 72 / UTM zone 16S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32316,'EPSG',32316,'PROJCS["WGS 72 / UTM zone 16S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32316"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=16 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32316,'EPSG',32316,'PROJCS["WGS 72 / UTM zone 16S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32316"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=16 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32317 : WGS 72 / UTM zone 17S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32317,'EPSG',32317,'PROJCS["WGS 72 / UTM zone 17S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32317"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32317,'EPSG',32317,'PROJCS["WGS 72 / UTM zone 17S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32317"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32318 : WGS 72 / UTM zone 18S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32318,'EPSG',32318,'PROJCS["WGS 72 / UTM zone 18S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32318"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32318,'EPSG',32318,'PROJCS["WGS 72 / UTM zone 18S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32318"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32319 : WGS 72 / UTM zone 19S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32319,'EPSG',32319,'PROJCS["WGS 72 / UTM zone 19S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32319"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32319,'EPSG',32319,'PROJCS["WGS 72 / UTM zone 19S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32319"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32320 : WGS 72 / UTM zone 20S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32320,'EPSG',32320,'PROJCS["WGS 72 / UTM zone 20S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32320"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32320,'EPSG',32320,'PROJCS["WGS 72 / UTM zone 20S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32320"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32321 : WGS 72 / UTM zone 21S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32321,'EPSG',32321,'PROJCS["WGS 72 / UTM zone 21S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32321"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32321,'EPSG',32321,'PROJCS["WGS 72 / UTM zone 21S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32321"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32322 : WGS 72 / UTM zone 22S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32322,'EPSG',32322,'PROJCS["WGS 72 / UTM zone 22S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32322"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32322,'EPSG',32322,'PROJCS["WGS 72 / UTM zone 22S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32322"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32323 : WGS 72 / UTM zone 23S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32323,'EPSG',32323,'PROJCS["WGS 72 / UTM zone 23S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32323"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=23 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32323,'EPSG',32323,'PROJCS["WGS 72 / UTM zone 23S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32323"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=23 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32324 : WGS 72 / UTM zone 24S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32324,'EPSG',32324,'PROJCS["WGS 72 / UTM zone 24S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32324"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=24 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32324,'EPSG',32324,'PROJCS["WGS 72 / UTM zone 24S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32324"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=24 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32325 : WGS 72 / UTM zone 25S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32325,'EPSG',32325,'PROJCS["WGS 72 / UTM zone 25S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32325"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=25 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32325,'EPSG',32325,'PROJCS["WGS 72 / UTM zone 25S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32325"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=25 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32326 : WGS 72 / UTM zone 26S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32326,'EPSG',32326,'PROJCS["WGS 72 / UTM zone 26S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32326"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=26 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32326,'EPSG',32326,'PROJCS["WGS 72 / UTM zone 26S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32326"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=26 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32327 : WGS 72 / UTM zone 27S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32327,'EPSG',32327,'PROJCS["WGS 72 / UTM zone 27S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32327"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=27 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32327,'EPSG',32327,'PROJCS["WGS 72 / UTM zone 27S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32327"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=27 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32328 : WGS 72 / UTM zone 28S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32328,'EPSG',32328,'PROJCS["WGS 72 / UTM zone 28S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32328"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32328,'EPSG',32328,'PROJCS["WGS 72 / UTM zone 28S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32328"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32329 : WGS 72 / UTM zone 29S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32329,'EPSG',32329,'PROJCS["WGS 72 / UTM zone 29S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32329"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32329,'EPSG',32329,'PROJCS["WGS 72 / UTM zone 29S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32329"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32330 : WGS 72 / UTM zone 30S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32330,'EPSG',32330,'PROJCS["WGS 72 / UTM zone 30S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32330"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=30 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32330,'EPSG',32330,'PROJCS["WGS 72 / UTM zone 30S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32330"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=30 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32331 : WGS 72 / UTM zone 31S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32331,'EPSG',32331,'PROJCS["WGS 72 / UTM zone 31S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32331"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=31 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32331,'EPSG',32331,'PROJCS["WGS 72 / UTM zone 31S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32331"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=31 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32332 : WGS 72 / UTM zone 32S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32332,'EPSG',32332,'PROJCS["WGS 72 / UTM zone 32S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32332"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32332,'EPSG',32332,'PROJCS["WGS 72 / UTM zone 32S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32332"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32333 : WGS 72 / UTM zone 33S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32333,'EPSG',32333,'PROJCS["WGS 72 / UTM zone 33S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32333"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=33 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32333,'EPSG',32333,'PROJCS["WGS 72 / UTM zone 33S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32333"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=33 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32334 : WGS 72 / UTM zone 34S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32334,'EPSG',32334,'PROJCS["WGS 72 / UTM zone 34S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32334"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=34 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32334,'EPSG',32334,'PROJCS["WGS 72 / UTM zone 34S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32334"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=34 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32335 : WGS 72 / UTM zone 35S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32335,'EPSG',32335,'PROJCS["WGS 72 / UTM zone 35S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32335"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=35 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32335,'EPSG',32335,'PROJCS["WGS 72 / UTM zone 35S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32335"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=35 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32336 : WGS 72 / UTM zone 36S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32336,'EPSG',32336,'PROJCS["WGS 72 / UTM zone 36S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32336"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=36 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32336,'EPSG',32336,'PROJCS["WGS 72 / UTM zone 36S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32336"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=36 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32337 : WGS 72 / UTM zone 37S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32337,'EPSG',32337,'PROJCS["WGS 72 / UTM zone 37S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32337"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=37 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32337,'EPSG',32337,'PROJCS["WGS 72 / UTM zone 37S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32337"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=37 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32338 : WGS 72 / UTM zone 38S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32338,'EPSG',32338,'PROJCS["WGS 72 / UTM zone 38S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32338"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32338,'EPSG',32338,'PROJCS["WGS 72 / UTM zone 38S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32338"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32339 : WGS 72 / UTM zone 39S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32339,'EPSG',32339,'PROJCS["WGS 72 / UTM zone 39S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32339"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=39 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32339,'EPSG',32339,'PROJCS["WGS 72 / UTM zone 39S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32339"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=39 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32340 : WGS 72 / UTM zone 40S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32340,'EPSG',32340,'PROJCS["WGS 72 / UTM zone 40S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32340"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=40 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32340,'EPSG',32340,'PROJCS["WGS 72 / UTM zone 40S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32340"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=40 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32341 : WGS 72 / UTM zone 41S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32341,'EPSG',32341,'PROJCS["WGS 72 / UTM zone 41S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32341"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=41 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32341,'EPSG',32341,'PROJCS["WGS 72 / UTM zone 41S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32341"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=41 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32342 : WGS 72 / UTM zone 42S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32342,'EPSG',32342,'PROJCS["WGS 72 / UTM zone 42S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32342"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=42 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32342,'EPSG',32342,'PROJCS["WGS 72 / UTM zone 42S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32342"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=42 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32343 : WGS 72 / UTM zone 43S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32343,'EPSG',32343,'PROJCS["WGS 72 / UTM zone 43S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32343"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=43 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32343,'EPSG',32343,'PROJCS["WGS 72 / UTM zone 43S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32343"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=43 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32344 : WGS 72 / UTM zone 44S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32344,'EPSG',32344,'PROJCS["WGS 72 / UTM zone 44S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32344"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=44 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32344,'EPSG',32344,'PROJCS["WGS 72 / UTM zone 44S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32344"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=44 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32345 : WGS 72 / UTM zone 45S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32345,'EPSG',32345,'PROJCS["WGS 72 / UTM zone 45S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32345"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=45 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32345,'EPSG',32345,'PROJCS["WGS 72 / UTM zone 45S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32345"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=45 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32346 : WGS 72 / UTM zone 46S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32346,'EPSG',32346,'PROJCS["WGS 72 / UTM zone 46S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32346"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=46 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32346,'EPSG',32346,'PROJCS["WGS 72 / UTM zone 46S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32346"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=46 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32347 : WGS 72 / UTM zone 47S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32347,'EPSG',32347,'PROJCS["WGS 72 / UTM zone 47S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32347"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=47 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32347,'EPSG',32347,'PROJCS["WGS 72 / UTM zone 47S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32347"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=47 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32348 : WGS 72 / UTM zone 48S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32348,'EPSG',32348,'PROJCS["WGS 72 / UTM zone 48S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32348"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=48 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32348,'EPSG',32348,'PROJCS["WGS 72 / UTM zone 48S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32348"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=48 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32349 : WGS 72 / UTM zone 49S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32349,'EPSG',32349,'PROJCS["WGS 72 / UTM zone 49S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32349"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=49 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32349,'EPSG',32349,'PROJCS["WGS 72 / UTM zone 49S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32349"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=49 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32350 : WGS 72 / UTM zone 50S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32350,'EPSG',32350,'PROJCS["WGS 72 / UTM zone 50S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32350"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=50 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32350,'EPSG',32350,'PROJCS["WGS 72 / UTM zone 50S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32350"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=50 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32351 : WGS 72 / UTM zone 51S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32351,'EPSG',32351,'PROJCS["WGS 72 / UTM zone 51S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32351"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=51 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32351,'EPSG',32351,'PROJCS["WGS 72 / UTM zone 51S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32351"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=51 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32352 : WGS 72 / UTM zone 52S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32352,'EPSG',32352,'PROJCS["WGS 72 / UTM zone 52S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32352"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=52 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32352,'EPSG',32352,'PROJCS["WGS 72 / UTM zone 52S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32352"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=52 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32353 : WGS 72 / UTM zone 53S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32353,'EPSG',32353,'PROJCS["WGS 72 / UTM zone 53S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32353"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=53 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32353,'EPSG',32353,'PROJCS["WGS 72 / UTM zone 53S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32353"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=53 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32354 : WGS 72 / UTM zone 54S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32354,'EPSG',32354,'PROJCS["WGS 72 / UTM zone 54S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32354"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=54 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32354,'EPSG',32354,'PROJCS["WGS 72 / UTM zone 54S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32354"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=54 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32355 : WGS 72 / UTM zone 55S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32355,'EPSG',32355,'PROJCS["WGS 72 / UTM zone 55S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32355"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=55 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32355,'EPSG',32355,'PROJCS["WGS 72 / UTM zone 55S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32355"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=55 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32356 : WGS 72 / UTM zone 56S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32356,'EPSG',32356,'PROJCS["WGS 72 / UTM zone 56S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32356"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=56 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32356,'EPSG',32356,'PROJCS["WGS 72 / UTM zone 56S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32356"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=56 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32357 : WGS 72 / UTM zone 57S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32357,'EPSG',32357,'PROJCS["WGS 72 / UTM zone 57S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",159],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32357"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=57 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32357,'EPSG',32357,'PROJCS["WGS 72 / UTM zone 57S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",159],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32357"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=57 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32358 : WGS 72 / UTM zone 58S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32358,'EPSG',32358,'PROJCS["WGS 72 / UTM zone 58S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32358"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=58 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32358,'EPSG',32358,'PROJCS["WGS 72 / UTM zone 58S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32358"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=58 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32359 : WGS 72 / UTM zone 59S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32359,'EPSG',32359,'PROJCS["WGS 72 / UTM zone 59S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32359"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=59 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32359,'EPSG',32359,'PROJCS["WGS 72 / UTM zone 59S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32359"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=59 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32360 : WGS 72 / UTM zone 60S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32360,'EPSG',32360,'PROJCS["WGS 72 / UTM zone 60S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32360"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=60 +south +ellps=WGS72 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32360,'EPSG',32360,'PROJCS["WGS 72 / UTM zone 60S",GEOGCS["WGS 72",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],AUTHORITY["EPSG","6322"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4322"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32360"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=60 +south +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.2263 +units=m +no_defs '); --- --- EPSG 32401 : WGS 72BE / UTM zone 1N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32401,'EPSG',32401,'PROJCS["WGS 72BE / UTM zone 1N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32401"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=1 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32401,'EPSG',32401,'PROJCS["WGS 72BE / UTM zone 1N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32401"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=1 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32402 : WGS 72BE / UTM zone 2N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32402,'EPSG',32402,'PROJCS["WGS 72BE / UTM zone 2N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32402"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=2 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32402,'EPSG',32402,'PROJCS["WGS 72BE / UTM zone 2N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32402"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=2 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32403 : WGS 72BE / UTM zone 3N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32403,'EPSG',32403,'PROJCS["WGS 72BE / UTM zone 3N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32403"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=3 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32403,'EPSG',32403,'PROJCS["WGS 72BE / UTM zone 3N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32403"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=3 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32404 : WGS 72BE / UTM zone 4N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32404,'EPSG',32404,'PROJCS["WGS 72BE / UTM zone 4N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-159],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32404"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=4 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32404,'EPSG',32404,'PROJCS["WGS 72BE / UTM zone 4N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-159],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32404"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=4 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32405 : WGS 72BE / UTM zone 5N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32405,'EPSG',32405,'PROJCS["WGS 72BE / UTM zone 5N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32405"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=5 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32405,'EPSG',32405,'PROJCS["WGS 72BE / UTM zone 5N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32405"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=5 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32406 : WGS 72BE / UTM zone 6N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32406,'EPSG',32406,'PROJCS["WGS 72BE / UTM zone 6N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32406"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=6 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32406,'EPSG',32406,'PROJCS["WGS 72BE / UTM zone 6N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32406"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=6 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32407 : WGS 72BE / UTM zone 7N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32407,'EPSG',32407,'PROJCS["WGS 72BE / UTM zone 7N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32407"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=7 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32407,'EPSG',32407,'PROJCS["WGS 72BE / UTM zone 7N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32407"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=7 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32408 : WGS 72BE / UTM zone 8N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32408,'EPSG',32408,'PROJCS["WGS 72BE / UTM zone 8N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32408"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=8 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32408,'EPSG',32408,'PROJCS["WGS 72BE / UTM zone 8N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32408"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=8 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32409 : WGS 72BE / UTM zone 9N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32409,'EPSG',32409,'PROJCS["WGS 72BE / UTM zone 9N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32409"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=9 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32409,'EPSG',32409,'PROJCS["WGS 72BE / UTM zone 9N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32409"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=9 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32410 : WGS 72BE / UTM zone 10N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32410,'EPSG',32410,'PROJCS["WGS 72BE / UTM zone 10N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32410"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=10 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32410,'EPSG',32410,'PROJCS["WGS 72BE / UTM zone 10N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32410"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=10 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32411 : WGS 72BE / UTM zone 11N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32411,'EPSG',32411,'PROJCS["WGS 72BE / UTM zone 11N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],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],AUTHORITY["EPSG","32411"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=11 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32411,'EPSG',32411,'PROJCS["WGS 72BE / UTM zone 11N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],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],AUTHORITY["EPSG","32411"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=11 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32412 : WGS 72BE / UTM zone 12N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32412,'EPSG',32412,'PROJCS["WGS 72BE / UTM zone 12N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32412"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=12 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32412,'EPSG',32412,'PROJCS["WGS 72BE / UTM zone 12N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32412"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=12 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32413 : WGS 72BE / UTM zone 13N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32413,'EPSG',32413,'PROJCS["WGS 72BE / UTM zone 13N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32413"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=13 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32413,'EPSG',32413,'PROJCS["WGS 72BE / UTM zone 13N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32413"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=13 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32414 : WGS 72BE / UTM zone 14N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32414,'EPSG',32414,'PROJCS["WGS 72BE / UTM zone 14N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32414"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=14 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32414,'EPSG',32414,'PROJCS["WGS 72BE / UTM zone 14N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32414"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=14 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32415 : WGS 72BE / UTM zone 15N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32415,'EPSG',32415,'PROJCS["WGS 72BE / UTM zone 15N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32415"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=15 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32415,'EPSG',32415,'PROJCS["WGS 72BE / UTM zone 15N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32415"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=15 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32416 : WGS 72BE / UTM zone 16N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32416,'EPSG',32416,'PROJCS["WGS 72BE / UTM zone 16N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32416"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=16 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32416,'EPSG',32416,'PROJCS["WGS 72BE / UTM zone 16N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32416"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=16 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32417 : WGS 72BE / UTM zone 17N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32417,'EPSG',32417,'PROJCS["WGS 72BE / UTM zone 17N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32417"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32417,'EPSG',32417,'PROJCS["WGS 72BE / UTM zone 17N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32417"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32418 : WGS 72BE / UTM zone 18N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32418,'EPSG',32418,'PROJCS["WGS 72BE / UTM zone 18N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32418"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32418,'EPSG',32418,'PROJCS["WGS 72BE / UTM zone 18N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32418"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32419 : WGS 72BE / UTM zone 19N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32419,'EPSG',32419,'PROJCS["WGS 72BE / UTM zone 19N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32419"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32419,'EPSG',32419,'PROJCS["WGS 72BE / UTM zone 19N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32419"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32420 : WGS 72BE / UTM zone 20N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32420,'EPSG',32420,'PROJCS["WGS 72BE / UTM zone 20N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32420"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32420,'EPSG',32420,'PROJCS["WGS 72BE / UTM zone 20N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32420"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32421 : WGS 72BE / UTM zone 21N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32421,'EPSG',32421,'PROJCS["WGS 72BE / UTM zone 21N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32421"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32421,'EPSG',32421,'PROJCS["WGS 72BE / UTM zone 21N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32421"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32422 : WGS 72BE / UTM zone 22N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32422,'EPSG',32422,'PROJCS["WGS 72BE / UTM zone 22N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32422"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32422,'EPSG',32422,'PROJCS["WGS 72BE / UTM zone 22N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32422"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32423 : WGS 72BE / UTM zone 23N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32423,'EPSG',32423,'PROJCS["WGS 72BE / UTM zone 23N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32423"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=23 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32423,'EPSG',32423,'PROJCS["WGS 72BE / UTM zone 23N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32423"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=23 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32424 : WGS 72BE / UTM zone 24N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32424,'EPSG',32424,'PROJCS["WGS 72BE / UTM zone 24N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32424"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=24 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32424,'EPSG',32424,'PROJCS["WGS 72BE / UTM zone 24N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32424"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=24 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32425 : WGS 72BE / UTM zone 25N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32425,'EPSG',32425,'PROJCS["WGS 72BE / UTM zone 25N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32425"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=25 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32425,'EPSG',32425,'PROJCS["WGS 72BE / UTM zone 25N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32425"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=25 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32426 : WGS 72BE / UTM zone 26N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32426,'EPSG',32426,'PROJCS["WGS 72BE / UTM zone 26N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32426"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=26 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32426,'EPSG',32426,'PROJCS["WGS 72BE / UTM zone 26N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32426"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=26 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32427 : WGS 72BE / UTM zone 27N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32427,'EPSG',32427,'PROJCS["WGS 72BE / UTM zone 27N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32427"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=27 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32427,'EPSG',32427,'PROJCS["WGS 72BE / UTM zone 27N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32427"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=27 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32428 : WGS 72BE / UTM zone 28N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32428,'EPSG',32428,'PROJCS["WGS 72BE / UTM zone 28N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32428"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32428,'EPSG',32428,'PROJCS["WGS 72BE / UTM zone 28N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32428"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32429 : WGS 72BE / UTM zone 29N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32429,'EPSG',32429,'PROJCS["WGS 72BE / UTM zone 29N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32429"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32429,'EPSG',32429,'PROJCS["WGS 72BE / UTM zone 29N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32429"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32430 : WGS 72BE / UTM zone 30N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32430,'EPSG',32430,'PROJCS["WGS 72BE / UTM zone 30N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32430"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=30 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32430,'EPSG',32430,'PROJCS["WGS 72BE / UTM zone 30N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32430"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=30 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32431 : WGS 72BE / UTM zone 31N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32431,'EPSG',32431,'PROJCS["WGS 72BE / UTM zone 31N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32431"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=31 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32431,'EPSG',32431,'PROJCS["WGS 72BE / UTM zone 31N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32431"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=31 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32432 : WGS 72BE / UTM zone 32N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32432,'EPSG',32432,'PROJCS["WGS 72BE / UTM zone 32N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32432"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32432,'EPSG',32432,'PROJCS["WGS 72BE / UTM zone 32N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32432"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32433 : WGS 72BE / UTM zone 33N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32433,'EPSG',32433,'PROJCS["WGS 72BE / UTM zone 33N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32433"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=33 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32433,'EPSG',32433,'PROJCS["WGS 72BE / UTM zone 33N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32433"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=33 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32434 : WGS 72BE / UTM zone 34N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32434,'EPSG',32434,'PROJCS["WGS 72BE / UTM zone 34N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32434"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=34 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32434,'EPSG',32434,'PROJCS["WGS 72BE / UTM zone 34N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32434"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=34 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32435 : WGS 72BE / UTM zone 35N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32435,'EPSG',32435,'PROJCS["WGS 72BE / UTM zone 35N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32435"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=35 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32435,'EPSG',32435,'PROJCS["WGS 72BE / UTM zone 35N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32435"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=35 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32436 : WGS 72BE / UTM zone 36N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32436,'EPSG',32436,'PROJCS["WGS 72BE / UTM zone 36N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32436"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=36 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32436,'EPSG',32436,'PROJCS["WGS 72BE / UTM zone 36N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32436"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=36 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32437 : WGS 72BE / UTM zone 37N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32437,'EPSG',32437,'PROJCS["WGS 72BE / UTM zone 37N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32437"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=37 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32437,'EPSG',32437,'PROJCS["WGS 72BE / UTM zone 37N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32437"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=37 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32438 : WGS 72BE / UTM zone 38N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32438,'EPSG',32438,'PROJCS["WGS 72BE / UTM zone 38N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32438"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32438,'EPSG',32438,'PROJCS["WGS 72BE / UTM zone 38N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32438"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32439 : WGS 72BE / UTM zone 39N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32439,'EPSG',32439,'PROJCS["WGS 72BE / UTM zone 39N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32439"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=39 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32439,'EPSG',32439,'PROJCS["WGS 72BE / UTM zone 39N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32439"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=39 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32440 : WGS 72BE / UTM zone 40N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32440,'EPSG',32440,'PROJCS["WGS 72BE / UTM zone 40N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32440"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=40 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32440,'EPSG',32440,'PROJCS["WGS 72BE / UTM zone 40N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32440"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=40 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32441 : WGS 72BE / UTM zone 41N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32441,'EPSG',32441,'PROJCS["WGS 72BE / UTM zone 41N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32441"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=41 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32441,'EPSG',32441,'PROJCS["WGS 72BE / UTM zone 41N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32441"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=41 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32442 : WGS 72BE / UTM zone 42N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32442,'EPSG',32442,'PROJCS["WGS 72BE / UTM zone 42N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32442"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=42 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32442,'EPSG',32442,'PROJCS["WGS 72BE / UTM zone 42N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32442"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=42 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32443 : WGS 72BE / UTM zone 43N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32443,'EPSG',32443,'PROJCS["WGS 72BE / UTM zone 43N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32443"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=43 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32443,'EPSG',32443,'PROJCS["WGS 72BE / UTM zone 43N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32443"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=43 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32444 : WGS 72BE / UTM zone 44N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32444,'EPSG',32444,'PROJCS["WGS 72BE / UTM zone 44N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32444"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=44 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32444,'EPSG',32444,'PROJCS["WGS 72BE / UTM zone 44N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32444"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=44 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32445 : WGS 72BE / UTM zone 45N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32445,'EPSG',32445,'PROJCS["WGS 72BE / UTM zone 45N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32445"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=45 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32445,'EPSG',32445,'PROJCS["WGS 72BE / UTM zone 45N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32445"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=45 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32446 : WGS 72BE / UTM zone 46N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32446,'EPSG',32446,'PROJCS["WGS 72BE / UTM zone 46N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32446"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=46 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32446,'EPSG',32446,'PROJCS["WGS 72BE / UTM zone 46N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32446"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=46 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32447 : WGS 72BE / UTM zone 47N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32447,'EPSG',32447,'PROJCS["WGS 72BE / UTM zone 47N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32447"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=47 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32447,'EPSG',32447,'PROJCS["WGS 72BE / UTM zone 47N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32447"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=47 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32448 : WGS 72BE / UTM zone 48N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32448,'EPSG',32448,'PROJCS["WGS 72BE / UTM zone 48N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32448"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=48 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32448,'EPSG',32448,'PROJCS["WGS 72BE / UTM zone 48N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32448"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=48 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32449 : WGS 72BE / UTM zone 49N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32449,'EPSG',32449,'PROJCS["WGS 72BE / UTM zone 49N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32449"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=49 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32449,'EPSG',32449,'PROJCS["WGS 72BE / UTM zone 49N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32449"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=49 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32450 : WGS 72BE / UTM zone 50N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32450,'EPSG',32450,'PROJCS["WGS 72BE / UTM zone 50N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],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],AUTHORITY["EPSG","32450"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=50 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32450,'EPSG',32450,'PROJCS["WGS 72BE / UTM zone 50N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],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],AUTHORITY["EPSG","32450"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=50 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32451 : WGS 72BE / UTM zone 51N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32451,'EPSG',32451,'PROJCS["WGS 72BE / UTM zone 51N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32451"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=51 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32451,'EPSG',32451,'PROJCS["WGS 72BE / UTM zone 51N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32451"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=51 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32452 : WGS 72BE / UTM zone 52N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32452,'EPSG',32452,'PROJCS["WGS 72BE / UTM zone 52N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32452"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=52 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32452,'EPSG',32452,'PROJCS["WGS 72BE / UTM zone 52N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32452"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=52 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32453 : WGS 72BE / UTM zone 53N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32453,'EPSG',32453,'PROJCS["WGS 72BE / UTM zone 53N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32453"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=53 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32453,'EPSG',32453,'PROJCS["WGS 72BE / UTM zone 53N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32453"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=53 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32454 : WGS 72BE / UTM zone 54N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32454,'EPSG',32454,'PROJCS["WGS 72BE / UTM zone 54N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32454"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=54 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32454,'EPSG',32454,'PROJCS["WGS 72BE / UTM zone 54N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32454"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=54 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32455 : WGS 72BE / UTM zone 55N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32455,'EPSG',32455,'PROJCS["WGS 72BE / UTM zone 55N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32455"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=55 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32455,'EPSG',32455,'PROJCS["WGS 72BE / UTM zone 55N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32455"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=55 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32456 : WGS 72BE / UTM zone 56N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32456,'EPSG',32456,'PROJCS["WGS 72BE / UTM zone 56N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32456"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=56 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32456,'EPSG',32456,'PROJCS["WGS 72BE / UTM zone 56N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32456"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=56 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32457 : WGS 72BE / UTM zone 57N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32457,'EPSG',32457,'PROJCS["WGS 72BE / UTM zone 57N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",159],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32457"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=57 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32457,'EPSG',32457,'PROJCS["WGS 72BE / UTM zone 57N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",159],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32457"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=57 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32458 : WGS 72BE / UTM zone 58N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32458,'EPSG',32458,'PROJCS["WGS 72BE / UTM zone 58N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32458"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=58 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32458,'EPSG',32458,'PROJCS["WGS 72BE / UTM zone 58N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32458"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=58 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32459 : WGS 72BE / UTM zone 59N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32459,'EPSG',32459,'PROJCS["WGS 72BE / UTM zone 59N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32459"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=59 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32459,'EPSG',32459,'PROJCS["WGS 72BE / UTM zone 59N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32459"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=59 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32460 : WGS 72BE / UTM zone 60N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32460,'EPSG',32460,'PROJCS["WGS 72BE / UTM zone 60N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32460"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=60 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32460,'EPSG',32460,'PROJCS["WGS 72BE / UTM zone 60N",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32460"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=60 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32501 : WGS 72BE / UTM zone 1S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32501,'EPSG',32501,'PROJCS["WGS 72BE / UTM zone 1S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32501"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=1 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32501,'EPSG',32501,'PROJCS["WGS 72BE / UTM zone 1S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32501"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=1 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32502 : WGS 72BE / UTM zone 2S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32502,'EPSG',32502,'PROJCS["WGS 72BE / UTM zone 2S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32502"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=2 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32502,'EPSG',32502,'PROJCS["WGS 72BE / UTM zone 2S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32502"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=2 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32503 : WGS 72BE / UTM zone 3S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32503,'EPSG',32503,'PROJCS["WGS 72BE / UTM zone 3S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32503"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=3 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32503,'EPSG',32503,'PROJCS["WGS 72BE / UTM zone 3S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32503"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=3 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32504 : WGS 72BE / UTM zone 4S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32504,'EPSG',32504,'PROJCS["WGS 72BE / UTM zone 4S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-159],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32504"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=4 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32504,'EPSG',32504,'PROJCS["WGS 72BE / UTM zone 4S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-159],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32504"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=4 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32505 : WGS 72BE / UTM zone 5S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32505,'EPSG',32505,'PROJCS["WGS 72BE / UTM zone 5S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32505"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=5 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32505,'EPSG',32505,'PROJCS["WGS 72BE / UTM zone 5S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32505"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=5 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32506 : WGS 72BE / UTM zone 6S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32506,'EPSG',32506,'PROJCS["WGS 72BE / UTM zone 6S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32506"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=6 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32506,'EPSG',32506,'PROJCS["WGS 72BE / UTM zone 6S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32506"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=6 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32507 : WGS 72BE / UTM zone 7S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32507,'EPSG',32507,'PROJCS["WGS 72BE / UTM zone 7S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32507"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=7 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32507,'EPSG',32507,'PROJCS["WGS 72BE / UTM zone 7S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32507"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=7 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32508 : WGS 72BE / UTM zone 8S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32508,'EPSG',32508,'PROJCS["WGS 72BE / UTM zone 8S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32508"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=8 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32508,'EPSG',32508,'PROJCS["WGS 72BE / UTM zone 8S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32508"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=8 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32509 : WGS 72BE / UTM zone 9S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32509,'EPSG',32509,'PROJCS["WGS 72BE / UTM zone 9S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32509"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=9 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32509,'EPSG',32509,'PROJCS["WGS 72BE / UTM zone 9S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32509"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=9 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32510 : WGS 72BE / UTM zone 10S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32510,'EPSG',32510,'PROJCS["WGS 72BE / UTM zone 10S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32510"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=10 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32510,'EPSG',32510,'PROJCS["WGS 72BE / UTM zone 10S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32510"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=10 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32511 : WGS 72BE / UTM zone 11S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32511,'EPSG',32511,'PROJCS["WGS 72BE / UTM zone 11S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32511"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=11 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32511,'EPSG',32511,'PROJCS["WGS 72BE / UTM zone 11S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32511"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=11 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32512 : WGS 72BE / UTM zone 12S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32512,'EPSG',32512,'PROJCS["WGS 72BE / UTM zone 12S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32512"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=12 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32512,'EPSG',32512,'PROJCS["WGS 72BE / UTM zone 12S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32512"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=12 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32513 : WGS 72BE / UTM zone 13S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32513,'EPSG',32513,'PROJCS["WGS 72BE / UTM zone 13S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32513"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=13 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32513,'EPSG',32513,'PROJCS["WGS 72BE / UTM zone 13S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32513"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=13 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32514 : WGS 72BE / UTM zone 14S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32514,'EPSG',32514,'PROJCS["WGS 72BE / UTM zone 14S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32514"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=14 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32514,'EPSG',32514,'PROJCS["WGS 72BE / UTM zone 14S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32514"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=14 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32515 : WGS 72BE / UTM zone 15S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32515,'EPSG',32515,'PROJCS["WGS 72BE / UTM zone 15S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32515"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=15 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32515,'EPSG',32515,'PROJCS["WGS 72BE / UTM zone 15S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32515"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=15 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32516 : WGS 72BE / UTM zone 16S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32516,'EPSG',32516,'PROJCS["WGS 72BE / UTM zone 16S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32516"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=16 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32516,'EPSG',32516,'PROJCS["WGS 72BE / UTM zone 16S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32516"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=16 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32517 : WGS 72BE / UTM zone 17S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32517,'EPSG',32517,'PROJCS["WGS 72BE / UTM zone 17S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32517"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32517,'EPSG',32517,'PROJCS["WGS 72BE / UTM zone 17S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32517"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32518 : WGS 72BE / UTM zone 18S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32518,'EPSG',32518,'PROJCS["WGS 72BE / UTM zone 18S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32518"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32518,'EPSG',32518,'PROJCS["WGS 72BE / UTM zone 18S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32518"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32519 : WGS 72BE / UTM zone 19S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32519,'EPSG',32519,'PROJCS["WGS 72BE / UTM zone 19S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32519"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32519,'EPSG',32519,'PROJCS["WGS 72BE / UTM zone 19S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32519"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32520 : WGS 72BE / UTM zone 20S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32520,'EPSG',32520,'PROJCS["WGS 72BE / UTM zone 20S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32520"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32520,'EPSG',32520,'PROJCS["WGS 72BE / UTM zone 20S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32520"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32521 : WGS 72BE / UTM zone 21S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32521,'EPSG',32521,'PROJCS["WGS 72BE / UTM zone 21S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32521"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32521,'EPSG',32521,'PROJCS["WGS 72BE / UTM zone 21S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32521"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32522 : WGS 72BE / UTM zone 22S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32522,'EPSG',32522,'PROJCS["WGS 72BE / UTM zone 22S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32522"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32522,'EPSG',32522,'PROJCS["WGS 72BE / UTM zone 22S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32522"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32523 : WGS 72BE / UTM zone 23S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32523,'EPSG',32523,'PROJCS["WGS 72BE / UTM zone 23S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32523"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=23 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32523,'EPSG',32523,'PROJCS["WGS 72BE / UTM zone 23S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32523"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=23 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32524 : WGS 72BE / UTM zone 24S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32524,'EPSG',32524,'PROJCS["WGS 72BE / UTM zone 24S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32524"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=24 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32524,'EPSG',32524,'PROJCS["WGS 72BE / UTM zone 24S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32524"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=24 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32525 : WGS 72BE / UTM zone 25S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32525,'EPSG',32525,'PROJCS["WGS 72BE / UTM zone 25S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32525"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=25 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32525,'EPSG',32525,'PROJCS["WGS 72BE / UTM zone 25S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32525"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=25 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32526 : WGS 72BE / UTM zone 26S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32526,'EPSG',32526,'PROJCS["WGS 72BE / UTM zone 26S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32526"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=26 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32526,'EPSG',32526,'PROJCS["WGS 72BE / UTM zone 26S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32526"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=26 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32527 : WGS 72BE / UTM zone 27S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32527,'EPSG',32527,'PROJCS["WGS 72BE / UTM zone 27S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32527"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=27 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32527,'EPSG',32527,'PROJCS["WGS 72BE / UTM zone 27S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32527"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=27 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32528 : WGS 72BE / UTM zone 28S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32528,'EPSG',32528,'PROJCS["WGS 72BE / UTM zone 28S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32528"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32528,'EPSG',32528,'PROJCS["WGS 72BE / UTM zone 28S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32528"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32529 : WGS 72BE / UTM zone 29S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32529,'EPSG',32529,'PROJCS["WGS 72BE / UTM zone 29S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32529"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32529,'EPSG',32529,'PROJCS["WGS 72BE / UTM zone 29S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32529"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32530 : WGS 72BE / UTM zone 30S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32530,'EPSG',32530,'PROJCS["WGS 72BE / UTM zone 30S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32530"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=30 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32530,'EPSG',32530,'PROJCS["WGS 72BE / UTM zone 30S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32530"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=30 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32531 : WGS 72BE / UTM zone 31S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32531,'EPSG',32531,'PROJCS["WGS 72BE / UTM zone 31S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32531"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=31 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32531,'EPSG',32531,'PROJCS["WGS 72BE / UTM zone 31S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32531"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=31 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32532 : WGS 72BE / UTM zone 32S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32532,'EPSG',32532,'PROJCS["WGS 72BE / UTM zone 32S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32532"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32532,'EPSG',32532,'PROJCS["WGS 72BE / UTM zone 32S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32532"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32533 : WGS 72BE / UTM zone 33S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32533,'EPSG',32533,'PROJCS["WGS 72BE / UTM zone 33S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32533"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=33 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32533,'EPSG',32533,'PROJCS["WGS 72BE / UTM zone 33S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32533"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=33 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32534 : WGS 72BE / UTM zone 34S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32534,'EPSG',32534,'PROJCS["WGS 72BE / UTM zone 34S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32534"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=34 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32534,'EPSG',32534,'PROJCS["WGS 72BE / UTM zone 34S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32534"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=34 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32535 : WGS 72BE / UTM zone 35S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32535,'EPSG',32535,'PROJCS["WGS 72BE / UTM zone 35S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32535"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=35 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32535,'EPSG',32535,'PROJCS["WGS 72BE / UTM zone 35S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32535"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=35 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32536 : WGS 72BE / UTM zone 36S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32536,'EPSG',32536,'PROJCS["WGS 72BE / UTM zone 36S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32536"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=36 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32536,'EPSG',32536,'PROJCS["WGS 72BE / UTM zone 36S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32536"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=36 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32537 : WGS 72BE / UTM zone 37S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32537,'EPSG',32537,'PROJCS["WGS 72BE / UTM zone 37S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32537"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=37 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32537,'EPSG',32537,'PROJCS["WGS 72BE / UTM zone 37S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32537"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=37 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32538 : WGS 72BE / UTM zone 38S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32538,'EPSG',32538,'PROJCS["WGS 72BE / UTM zone 38S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32538"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32538,'EPSG',32538,'PROJCS["WGS 72BE / UTM zone 38S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32538"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32539 : WGS 72BE / UTM zone 39S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32539,'EPSG',32539,'PROJCS["WGS 72BE / UTM zone 39S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32539"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=39 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32539,'EPSG',32539,'PROJCS["WGS 72BE / UTM zone 39S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32539"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=39 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32540 : WGS 72BE / UTM zone 40S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32540,'EPSG',32540,'PROJCS["WGS 72BE / UTM zone 40S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32540"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=40 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32540,'EPSG',32540,'PROJCS["WGS 72BE / UTM zone 40S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32540"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=40 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32541 : WGS 72BE / UTM zone 41S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32541,'EPSG',32541,'PROJCS["WGS 72BE / UTM zone 41S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32541"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=41 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32541,'EPSG',32541,'PROJCS["WGS 72BE / UTM zone 41S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32541"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=41 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32542 : WGS 72BE / UTM zone 42S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32542,'EPSG',32542,'PROJCS["WGS 72BE / UTM zone 42S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32542"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=42 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32542,'EPSG',32542,'PROJCS["WGS 72BE / UTM zone 42S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32542"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=42 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32543 : WGS 72BE / UTM zone 43S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32543,'EPSG',32543,'PROJCS["WGS 72BE / UTM zone 43S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32543"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=43 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32543,'EPSG',32543,'PROJCS["WGS 72BE / UTM zone 43S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32543"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=43 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32544 : WGS 72BE / UTM zone 44S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32544,'EPSG',32544,'PROJCS["WGS 72BE / UTM zone 44S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32544"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=44 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32544,'EPSG',32544,'PROJCS["WGS 72BE / UTM zone 44S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32544"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=44 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32545 : WGS 72BE / UTM zone 45S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32545,'EPSG',32545,'PROJCS["WGS 72BE / UTM zone 45S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32545"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=45 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32545,'EPSG',32545,'PROJCS["WGS 72BE / UTM zone 45S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32545"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=45 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32546 : WGS 72BE / UTM zone 46S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32546,'EPSG',32546,'PROJCS["WGS 72BE / UTM zone 46S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32546"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=46 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32546,'EPSG',32546,'PROJCS["WGS 72BE / UTM zone 46S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32546"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=46 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32547 : WGS 72BE / UTM zone 47S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32547,'EPSG',32547,'PROJCS["WGS 72BE / UTM zone 47S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32547"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=47 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32547,'EPSG',32547,'PROJCS["WGS 72BE / UTM zone 47S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32547"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=47 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32548 : WGS 72BE / UTM zone 48S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32548,'EPSG',32548,'PROJCS["WGS 72BE / UTM zone 48S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32548"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=48 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32548,'EPSG',32548,'PROJCS["WGS 72BE / UTM zone 48S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32548"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=48 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32549 : WGS 72BE / UTM zone 49S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32549,'EPSG',32549,'PROJCS["WGS 72BE / UTM zone 49S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32549"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=49 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32549,'EPSG',32549,'PROJCS["WGS 72BE / UTM zone 49S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32549"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=49 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32550 : WGS 72BE / UTM zone 50S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32550,'EPSG',32550,'PROJCS["WGS 72BE / UTM zone 50S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32550"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=50 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32550,'EPSG',32550,'PROJCS["WGS 72BE / UTM zone 50S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32550"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=50 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32551 : WGS 72BE / UTM zone 51S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32551,'EPSG',32551,'PROJCS["WGS 72BE / UTM zone 51S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32551"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=51 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32551,'EPSG',32551,'PROJCS["WGS 72BE / UTM zone 51S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32551"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=51 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32552 : WGS 72BE / UTM zone 52S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32552,'EPSG',32552,'PROJCS["WGS 72BE / UTM zone 52S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32552"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=52 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32552,'EPSG',32552,'PROJCS["WGS 72BE / UTM zone 52S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32552"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=52 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32553 : WGS 72BE / UTM zone 53S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32553,'EPSG',32553,'PROJCS["WGS 72BE / UTM zone 53S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32553"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=53 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32553,'EPSG',32553,'PROJCS["WGS 72BE / UTM zone 53S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32553"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=53 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32554 : WGS 72BE / UTM zone 54S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32554,'EPSG',32554,'PROJCS["WGS 72BE / UTM zone 54S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32554"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=54 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32554,'EPSG',32554,'PROJCS["WGS 72BE / UTM zone 54S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32554"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=54 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32555 : WGS 72BE / UTM zone 55S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32555,'EPSG',32555,'PROJCS["WGS 72BE / UTM zone 55S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32555"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=55 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32555,'EPSG',32555,'PROJCS["WGS 72BE / UTM zone 55S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32555"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=55 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32556 : WGS 72BE / UTM zone 56S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32556,'EPSG',32556,'PROJCS["WGS 72BE / UTM zone 56S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32556"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=56 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32556,'EPSG',32556,'PROJCS["WGS 72BE / UTM zone 56S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32556"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=56 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32557 : WGS 72BE / UTM zone 57S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32557,'EPSG',32557,'PROJCS["WGS 72BE / UTM zone 57S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",159],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32557"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=57 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32557,'EPSG',32557,'PROJCS["WGS 72BE / UTM zone 57S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",159],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32557"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=57 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32558 : WGS 72BE / UTM zone 58S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32558,'EPSG',32558,'PROJCS["WGS 72BE / UTM zone 58S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32558"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=58 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32558,'EPSG',32558,'PROJCS["WGS 72BE / UTM zone 58S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32558"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=58 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32559 : WGS 72BE / UTM zone 59S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32559,'EPSG',32559,'PROJCS["WGS 72BE / UTM zone 59S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32559"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=59 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32559,'EPSG',32559,'PROJCS["WGS 72BE / UTM zone 59S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32559"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=59 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32560 : WGS 72BE / UTM zone 60S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32560,'EPSG',32560,'PROJCS["WGS 72BE / UTM zone 60S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32560"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=60 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32560,'EPSG',32560,'PROJCS["WGS 72BE / UTM zone 60S",GEOGCS["WGS 72BE",DATUM["WGS_1972_Transit_Broadcast_Ephemeris",SPHEROID["WGS 72",6378135,298.26,AUTHORITY["EPSG","7043"]],TOWGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY["EPSG","6324"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4324"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32560"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=60 +south +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +units=m +no_defs '); --- --- EPSG 32600 : WGS 84 / UTM grid system (northern hemisphere) --- @@ -14614,251 +16326,251 @@ --- --- EPSG 32601 : WGS 84 / UTM zone 1N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32601,'EPSG',32601,'PROJCS["WGS 84 / UTM zone 1N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32601"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=1 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32601,'EPSG',32601,'PROJCS["WGS 84 / UTM zone 1N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32601"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=1 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32602 : WGS 84 / UTM zone 2N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32602,'EPSG',32602,'PROJCS["WGS 84 / UTM zone 2N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32602"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=2 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32602,'EPSG',32602,'PROJCS["WGS 84 / UTM zone 2N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32602"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=2 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32603 : WGS 84 / UTM zone 3N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32603,'EPSG',32603,'PROJCS["WGS 84 / UTM zone 3N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32603"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=3 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32603,'EPSG',32603,'PROJCS["WGS 84 / UTM zone 3N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32603"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=3 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32604 : WGS 84 / UTM zone 4N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32604,'EPSG',32604,'PROJCS["WGS 84 / UTM zone 4N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-159],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32604"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=4 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32604,'EPSG',32604,'PROJCS["WGS 84 / UTM zone 4N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-159],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32604"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=4 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32605 : WGS 84 / UTM zone 5N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32605,'EPSG',32605,'PROJCS["WGS 84 / UTM zone 5N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32605"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=5 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32605,'EPSG',32605,'PROJCS["WGS 84 / UTM zone 5N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32605"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=5 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32606 : WGS 84 / UTM zone 6N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32606,'EPSG',32606,'PROJCS["WGS 84 / UTM zone 6N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32606"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=6 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32606,'EPSG',32606,'PROJCS["WGS 84 / UTM zone 6N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32606"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=6 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32607 : WGS 84 / UTM zone 7N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32607,'EPSG',32607,'PROJCS["WGS 84 / UTM zone 7N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32607"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=7 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32607,'EPSG',32607,'PROJCS["WGS 84 / UTM zone 7N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32607"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=7 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32608 : WGS 84 / UTM zone 8N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32608,'EPSG',32608,'PROJCS["WGS 84 / UTM zone 8N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32608"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=8 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32608,'EPSG',32608,'PROJCS["WGS 84 / UTM zone 8N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32608"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=8 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32609 : WGS 84 / UTM zone 9N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32609,'EPSG',32609,'PROJCS["WGS 84 / UTM zone 9N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32609"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=9 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32609,'EPSG',32609,'PROJCS["WGS 84 / UTM zone 9N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32609"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=9 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32610 : WGS 84 / UTM zone 10N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32610,'EPSG',32610,'PROJCS["WGS 84 / UTM zone 10N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32610"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=10 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32610,'EPSG',32610,'PROJCS["WGS 84 / UTM zone 10N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32610"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=10 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32611 : WGS 84 / UTM zone 11N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32611,'EPSG',32611,'PROJCS["WGS 84 / UTM zone 11N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],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],AUTHORITY["EPSG","32611"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=11 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32611,'EPSG',32611,'PROJCS["WGS 84 / UTM zone 11N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],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],AUTHORITY["EPSG","32611"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=11 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32612 : WGS 84 / UTM zone 12N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32612,'EPSG',32612,'PROJCS["WGS 84 / UTM zone 12N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32612"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=12 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32612,'EPSG',32612,'PROJCS["WGS 84 / UTM zone 12N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32612"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=12 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32613 : WGS 84 / UTM zone 13N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32613,'EPSG',32613,'PROJCS["WGS 84 / UTM zone 13N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32613"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=13 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32613,'EPSG',32613,'PROJCS["WGS 84 / UTM zone 13N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32613"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=13 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32614 : WGS 84 / UTM zone 14N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32614,'EPSG',32614,'PROJCS["WGS 84 / UTM zone 14N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32614"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=14 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32614,'EPSG',32614,'PROJCS["WGS 84 / UTM zone 14N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32614"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=14 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32615 : WGS 84 / UTM zone 15N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32615,'EPSG',32615,'PROJCS["WGS 84 / UTM zone 15N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32615"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=15 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32615,'EPSG',32615,'PROJCS["WGS 84 / UTM zone 15N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32615"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=15 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32616 : WGS 84 / UTM zone 16N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32616,'EPSG',32616,'PROJCS["WGS 84 / UTM zone 16N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32616"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=16 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32616,'EPSG',32616,'PROJCS["WGS 84 / UTM zone 16N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32616"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=16 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32617 : WGS 84 / UTM zone 17N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32617,'EPSG',32617,'PROJCS["WGS 84 / UTM zone 17N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32617"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32617,'EPSG',32617,'PROJCS["WGS 84 / UTM zone 17N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32617"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32618 : WGS 84 / UTM zone 18N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32618,'EPSG',32618,'PROJCS["WGS 84 / UTM zone 18N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32618"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32618,'EPSG',32618,'PROJCS["WGS 84 / UTM zone 18N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32618"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32619 : WGS 84 / UTM zone 19N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32619,'EPSG',32619,'PROJCS["WGS 84 / UTM zone 19N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32619"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32619,'EPSG',32619,'PROJCS["WGS 84 / UTM zone 19N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32619"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32620 : WGS 84 / UTM zone 20N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32620,'EPSG',32620,'PROJCS["WGS 84 / UTM zone 20N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32620"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32620,'EPSG',32620,'PROJCS["WGS 84 / UTM zone 20N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32620"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32621 : WGS 84 / UTM zone 21N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32621,'EPSG',32621,'PROJCS["WGS 84 / UTM zone 21N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32621"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32621,'EPSG',32621,'PROJCS["WGS 84 / UTM zone 21N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32621"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32622 : WGS 84 / UTM zone 22N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32622,'EPSG',32622,'PROJCS["WGS 84 / UTM zone 22N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32622"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32622,'EPSG',32622,'PROJCS["WGS 84 / UTM zone 22N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32622"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32623 : WGS 84 / UTM zone 23N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32623,'EPSG',32623,'PROJCS["WGS 84 / UTM zone 23N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32623"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=23 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32623,'EPSG',32623,'PROJCS["WGS 84 / UTM zone 23N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32623"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=23 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32624 : WGS 84 / UTM zone 24N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32624,'EPSG',32624,'PROJCS["WGS 84 / UTM zone 24N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32624"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=24 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32624,'EPSG',32624,'PROJCS["WGS 84 / UTM zone 24N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32624"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=24 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32625 : WGS 84 / UTM zone 25N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32625,'EPSG',32625,'PROJCS["WGS 84 / UTM zone 25N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32625"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=25 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32625,'EPSG',32625,'PROJCS["WGS 84 / UTM zone 25N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32625"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=25 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32626 : WGS 84 / UTM zone 26N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32626,'EPSG',32626,'PROJCS["WGS 84 / UTM zone 26N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32626"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=26 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32626,'EPSG',32626,'PROJCS["WGS 84 / UTM zone 26N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32626"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=26 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32627 : WGS 84 / UTM zone 27N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32627,'EPSG',32627,'PROJCS["WGS 84 / UTM zone 27N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32627"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=27 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32627,'EPSG',32627,'PROJCS["WGS 84 / UTM zone 27N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32627"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=27 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32628 : WGS 84 / UTM zone 28N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32628,'EPSG',32628,'PROJCS["WGS 84 / UTM zone 28N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32628"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32628,'EPSG',32628,'PROJCS["WGS 84 / UTM zone 28N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32628"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32629 : WGS 84 / UTM zone 29N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32629,'EPSG',32629,'PROJCS["WGS 84 / UTM zone 29N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32629"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32629,'EPSG',32629,'PROJCS["WGS 84 / UTM zone 29N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32629"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32630 : WGS 84 / UTM zone 30N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32630,'EPSG',32630,'PROJCS["WGS 84 / UTM zone 30N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32630"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=30 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32630,'EPSG',32630,'PROJCS["WGS 84 / UTM zone 30N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32630"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=30 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32631 : WGS 84 / UTM zone 31N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32631,'EPSG',32631,'PROJCS["WGS 84 / UTM zone 31N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32631"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=31 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32631,'EPSG',32631,'PROJCS["WGS 84 / UTM zone 31N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32631"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=31 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32632 : WGS 84 / UTM zone 32N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32632,'EPSG',32632,'PROJCS["WGS 84 / UTM zone 32N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32632"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32632,'EPSG',32632,'PROJCS["WGS 84 / UTM zone 32N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32632"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32633 : WGS 84 / UTM zone 33N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32633,'EPSG',32633,'PROJCS["WGS 84 / UTM zone 33N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32633"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=33 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32633,'EPSG',32633,'PROJCS["WGS 84 / UTM zone 33N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32633"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=33 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32634 : WGS 84 / UTM zone 34N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32634,'EPSG',32634,'PROJCS["WGS 84 / UTM zone 34N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32634"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=34 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32634,'EPSG',32634,'PROJCS["WGS 84 / UTM zone 34N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32634"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=34 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32635 : WGS 84 / UTM zone 35N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32635,'EPSG',32635,'PROJCS["WGS 84 / UTM zone 35N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32635"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=35 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32635,'EPSG',32635,'PROJCS["WGS 84 / UTM zone 35N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32635"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=35 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32636 : WGS 84 / UTM zone 36N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32636,'EPSG',32636,'PROJCS["WGS 84 / UTM zone 36N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32636"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=36 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32636,'EPSG',32636,'PROJCS["WGS 84 / UTM zone 36N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32636"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=36 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32637 : WGS 84 / UTM zone 37N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32637,'EPSG',32637,'PROJCS["WGS 84 / UTM zone 37N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32637"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=37 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32637,'EPSG',32637,'PROJCS["WGS 84 / UTM zone 37N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32637"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=37 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32638 : WGS 84 / UTM zone 38N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32638,'EPSG',32638,'PROJCS["WGS 84 / UTM zone 38N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32638"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32638,'EPSG',32638,'PROJCS["WGS 84 / UTM zone 38N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32638"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32639 : WGS 84 / UTM zone 39N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32639,'EPSG',32639,'PROJCS["WGS 84 / UTM zone 39N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32639"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=39 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32639,'EPSG',32639,'PROJCS["WGS 84 / UTM zone 39N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32639"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=39 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32640 : WGS 84 / UTM zone 40N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32640,'EPSG',32640,'PROJCS["WGS 84 / UTM zone 40N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32640"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=40 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32640,'EPSG',32640,'PROJCS["WGS 84 / UTM zone 40N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32640"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=40 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32641 : WGS 84 / UTM zone 41N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32641,'EPSG',32641,'PROJCS["WGS 84 / UTM zone 41N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32641"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=41 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32641,'EPSG',32641,'PROJCS["WGS 84 / UTM zone 41N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32641"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=41 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32642 : WGS 84 / UTM zone 42N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32642,'EPSG',32642,'PROJCS["WGS 84 / UTM zone 42N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32642"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=42 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32642,'EPSG',32642,'PROJCS["WGS 84 / UTM zone 42N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32642"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=42 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32643 : WGS 84 / UTM zone 43N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32643,'EPSG',32643,'PROJCS["WGS 84 / UTM zone 43N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32643"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=43 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32643,'EPSG',32643,'PROJCS["WGS 84 / UTM zone 43N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32643"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=43 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32644 : WGS 84 / UTM zone 44N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32644,'EPSG',32644,'PROJCS["WGS 84 / UTM zone 44N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32644"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=44 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32644,'EPSG',32644,'PROJCS["WGS 84 / UTM zone 44N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32644"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=44 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32645 : WGS 84 / UTM zone 45N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32645,'EPSG',32645,'PROJCS["WGS 84 / UTM zone 45N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32645"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=45 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32645,'EPSG',32645,'PROJCS["WGS 84 / UTM zone 45N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32645"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=45 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32646 : WGS 84 / UTM zone 46N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32646,'EPSG',32646,'PROJCS["WGS 84 / UTM zone 46N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32646"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=46 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32646,'EPSG',32646,'PROJCS["WGS 84 / UTM zone 46N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32646"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=46 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32647 : WGS 84 / UTM zone 47N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32647,'EPSG',32647,'PROJCS["WGS 84 / UTM zone 47N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32647"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=47 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32647,'EPSG',32647,'PROJCS["WGS 84 / UTM zone 47N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32647"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=47 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32648 : WGS 84 / UTM zone 48N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32648,'EPSG',32648,'PROJCS["WGS 84 / UTM zone 48N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32648"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=48 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32648,'EPSG',32648,'PROJCS["WGS 84 / UTM zone 48N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32648"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=48 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32649 : WGS 84 / UTM zone 49N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32649,'EPSG',32649,'PROJCS["WGS 84 / UTM zone 49N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32649"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=49 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32649,'EPSG',32649,'PROJCS["WGS 84 / UTM zone 49N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32649"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=49 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32650 : WGS 84 / UTM zone 50N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32650,'EPSG',32650,'PROJCS["WGS 84 / UTM zone 50N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],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],AUTHORITY["EPSG","32650"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=50 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32650,'EPSG',32650,'PROJCS["WGS 84 / UTM zone 50N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],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],AUTHORITY["EPSG","32650"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=50 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32651 : WGS 84 / UTM zone 51N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32651,'EPSG',32651,'PROJCS["WGS 84 / UTM zone 51N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32651"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=51 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32651,'EPSG',32651,'PROJCS["WGS 84 / UTM zone 51N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32651"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=51 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32652 : WGS 84 / UTM zone 52N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32652,'EPSG',32652,'PROJCS["WGS 84 / UTM zone 52N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32652"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=52 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32652,'EPSG',32652,'PROJCS["WGS 84 / UTM zone 52N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32652"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=52 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32653 : WGS 84 / UTM zone 53N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32653,'EPSG',32653,'PROJCS["WGS 84 / UTM zone 53N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32653"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=53 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32653,'EPSG',32653,'PROJCS["WGS 84 / UTM zone 53N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32653"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=53 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32654 : WGS 84 / UTM zone 54N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32654,'EPSG',32654,'PROJCS["WGS 84 / UTM zone 54N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32654"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=54 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32654,'EPSG',32654,'PROJCS["WGS 84 / UTM zone 54N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32654"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=54 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32655 : WGS 84 / UTM zone 55N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32655,'EPSG',32655,'PROJCS["WGS 84 / UTM zone 55N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32655"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=55 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32655,'EPSG',32655,'PROJCS["WGS 84 / UTM zone 55N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32655"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=55 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32656 : WGS 84 / UTM zone 56N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32656,'EPSG',32656,'PROJCS["WGS 84 / UTM zone 56N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32656"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=56 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32656,'EPSG',32656,'PROJCS["WGS 84 / UTM zone 56N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32656"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=56 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32657 : WGS 84 / UTM zone 57N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32657,'EPSG',32657,'PROJCS["WGS 84 / UTM zone 57N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",159],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32657"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=57 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32657,'EPSG',32657,'PROJCS["WGS 84 / UTM zone 57N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",159],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32657"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=57 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32658 : WGS 84 / UTM zone 58N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32658,'EPSG',32658,'PROJCS["WGS 84 / UTM zone 58N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32658"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=58 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32658,'EPSG',32658,'PROJCS["WGS 84 / UTM zone 58N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32658"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=58 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32659 : WGS 84 / UTM zone 59N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32659,'EPSG',32659,'PROJCS["WGS 84 / UTM zone 59N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32659"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=59 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32659,'EPSG',32659,'PROJCS["WGS 84 / UTM zone 59N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32659"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=59 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32660 : WGS 84 / UTM zone 60N --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32660,'EPSG',32660,'PROJCS["WGS 84 / UTM zone 60N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32660"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=60 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32660,'EPSG',32660,'PROJCS["WGS 84 / UTM zone 60N",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32660"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=60 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32661 : WGS 84 / UPS North --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32661,'EPSG',32661,'PROJCS["WGS 84 / UPS North",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",90],PARAMETER["central_meridian",0],PARAMETER["scale_factor",0.994],PARAMETER["false_easting",2000000],PARAMETER["false_northing",2000000],AUTHORITY["EPSG","32661"],AXIS["Easting",UNKNOWN],AXIS["Northing",UNKNOWN]]','+proj=stere +lat_0=90 +lat_ts=90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32661,'EPSG',32661,'PROJCS["WGS 84 / UPS North",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",90],PARAMETER["central_meridian",0],PARAMETER["scale_factor",0.994],PARAMETER["false_easting",2000000],PARAMETER["false_northing",2000000],AUTHORITY["EPSG","32661"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=stere +lat_0=90 +lat_ts=90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32662 : WGS 84 / Plate Carree (deprecated) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32662,'EPSG',32662,'PROJCS["WGS 84 / Plate Carree (deprecated)",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Equirectangular"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",0],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","32662"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=eqc +lat_ts=0 +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32662,'EPSG',32662,'PROJCS["WGS 84 / Plate Carree (deprecated)",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Equirectangular"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",0],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","32662"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=eqc +lat_ts=0 +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32663 : WGS 84 / World Equidistant Cylindrical (deprecated) --- @@ -14866,19 +16578,19 @@ --- --- EPSG 32664 : WGS 84 / BLM 14N (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32664,'EPSG',32664,'PROJCS["WGS 84 / BLM 14N (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1640416.67],PARAMETER["false_northing",0],AUTHORITY["EPSG","32664"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-99 +k=0.9996 +x_0=500000.001016002 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32664,'EPSG',32664,'PROJCS["WGS 84 / BLM 14N (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1640416.67],PARAMETER["false_northing",0],AUTHORITY["EPSG","32664"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-99 +k=0.9996 +x_0=500000.001016002 +y_0=0 +datum=WGS84 +units=us-ft +no_defs '); --- --- EPSG 32665 : WGS 84 / BLM 15N (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32665,'EPSG',32665,'PROJCS["WGS 84 / BLM 15N (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1640416.67],PARAMETER["false_northing",0],AUTHORITY["EPSG","32665"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-93 +k=0.9996 +x_0=500000.001016002 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32665,'EPSG',32665,'PROJCS["WGS 84 / BLM 15N (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1640416.67],PARAMETER["false_northing",0],AUTHORITY["EPSG","32665"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-93 +k=0.9996 +x_0=500000.001016002 +y_0=0 +datum=WGS84 +units=us-ft +no_defs '); --- --- EPSG 32666 : WGS 84 / BLM 16N (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32666,'EPSG',32666,'PROJCS["WGS 84 / BLM 16N (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1640416.67],PARAMETER["false_northing",0],AUTHORITY["EPSG","32666"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-87 +k=0.9996 +x_0=500000.001016002 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32666,'EPSG',32666,'PROJCS["WGS 84 / BLM 16N (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1640416.67],PARAMETER["false_northing",0],AUTHORITY["EPSG","32666"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-87 +k=0.9996 +x_0=500000.001016002 +y_0=0 +datum=WGS84 +units=us-ft +no_defs '); --- --- EPSG 32667 : WGS 84 / BLM 17N (ftUS) --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32667,'EPSG',32667,'PROJCS["WGS 84 / BLM 17N (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1640416.67],PARAMETER["false_northing",0],AUTHORITY["EPSG","32667"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-81 +k=0.9996 +x_0=500000.001016002 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=us-ft +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32667,'EPSG',32667,'PROJCS["WGS 84 / BLM 17N (ftUS)",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"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1640416.67],PARAMETER["false_northing",0],AUTHORITY["EPSG","32667"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=-81 +k=0.9996 +x_0=500000.001016002 +y_0=0 +datum=WGS84 +units=us-ft +no_defs '); --- --- EPSG 32700 : WGS 84 / UTM grid system (southern hemisphere) --- @@ -14886,254 +16598,254 @@ --- --- EPSG 32701 : WGS 84 / UTM zone 1S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32701,'EPSG',32701,'PROJCS["WGS 84 / UTM zone 1S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32701"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=1 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32701,'EPSG',32701,'PROJCS["WGS 84 / UTM zone 1S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32701"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=1 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32702 : WGS 84 / UTM zone 2S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32702,'EPSG',32702,'PROJCS["WGS 84 / UTM zone 2S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32702"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=2 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32702,'EPSG',32702,'PROJCS["WGS 84 / UTM zone 2S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32702"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=2 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32703 : WGS 84 / UTM zone 3S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32703,'EPSG',32703,'PROJCS["WGS 84 / UTM zone 3S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32703"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=3 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32703,'EPSG',32703,'PROJCS["WGS 84 / UTM zone 3S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32703"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=3 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32704 : WGS 84 / UTM zone 4S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32704,'EPSG',32704,'PROJCS["WGS 84 / UTM zone 4S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-159],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32704"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=4 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32704,'EPSG',32704,'PROJCS["WGS 84 / UTM zone 4S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-159],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32704"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=4 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32705 : WGS 84 / UTM zone 5S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32705,'EPSG',32705,'PROJCS["WGS 84 / UTM zone 5S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32705"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=5 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32705,'EPSG',32705,'PROJCS["WGS 84 / UTM zone 5S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32705"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=5 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32706 : WGS 84 / UTM zone 6S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32706,'EPSG',32706,'PROJCS["WGS 84 / UTM zone 6S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32706"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=6 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32706,'EPSG',32706,'PROJCS["WGS 84 / UTM zone 6S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32706"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=6 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32707 : WGS 84 / UTM zone 7S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32707,'EPSG',32707,'PROJCS["WGS 84 / UTM zone 7S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32707"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=7 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32707,'EPSG',32707,'PROJCS["WGS 84 / UTM zone 7S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32707"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=7 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32708 : WGS 84 / UTM zone 8S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32708,'EPSG',32708,'PROJCS["WGS 84 / UTM zone 8S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32708"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=8 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32708,'EPSG',32708,'PROJCS["WGS 84 / UTM zone 8S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32708"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=8 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32709 : WGS 84 / UTM zone 9S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32709,'EPSG',32709,'PROJCS["WGS 84 / UTM zone 9S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32709"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=9 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32709,'EPSG',32709,'PROJCS["WGS 84 / UTM zone 9S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32709"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=9 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32710 : WGS 84 / UTM zone 10S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32710,'EPSG',32710,'PROJCS["WGS 84 / UTM zone 10S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32710"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=10 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32710,'EPSG',32710,'PROJCS["WGS 84 / UTM zone 10S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32710"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=10 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32711 : WGS 84 / UTM zone 11S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32711,'EPSG',32711,'PROJCS["WGS 84 / UTM zone 11S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32711"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=11 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32711,'EPSG',32711,'PROJCS["WGS 84 / UTM zone 11S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32711"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=11 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32712 : WGS 84 / UTM zone 12S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32712,'EPSG',32712,'PROJCS["WGS 84 / UTM zone 12S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32712"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=12 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32712,'EPSG',32712,'PROJCS["WGS 84 / UTM zone 12S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32712"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=12 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32713 : WGS 84 / UTM zone 13S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32713,'EPSG',32713,'PROJCS["WGS 84 / UTM zone 13S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32713"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=13 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32713,'EPSG',32713,'PROJCS["WGS 84 / UTM zone 13S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32713"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=13 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32714 : WGS 84 / UTM zone 14S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32714,'EPSG',32714,'PROJCS["WGS 84 / UTM zone 14S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32714"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=14 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32714,'EPSG',32714,'PROJCS["WGS 84 / UTM zone 14S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32714"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=14 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32715 : WGS 84 / UTM zone 15S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32715,'EPSG',32715,'PROJCS["WGS 84 / UTM zone 15S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32715"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=15 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32715,'EPSG',32715,'PROJCS["WGS 84 / UTM zone 15S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32715"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=15 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32716 : WGS 84 / UTM zone 16S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32716,'EPSG',32716,'PROJCS["WGS 84 / UTM zone 16S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32716"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=16 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32716,'EPSG',32716,'PROJCS["WGS 84 / UTM zone 16S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32716"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=16 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32717 : WGS 84 / UTM zone 17S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32717,'EPSG',32717,'PROJCS["WGS 84 / UTM zone 17S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32717"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32717,'EPSG',32717,'PROJCS["WGS 84 / UTM zone 17S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32717"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=17 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32718 : WGS 84 / UTM zone 18S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32718,'EPSG',32718,'PROJCS["WGS 84 / UTM zone 18S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32718"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32718,'EPSG',32718,'PROJCS["WGS 84 / UTM zone 18S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32718"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=18 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32719 : WGS 84 / UTM zone 19S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32719,'EPSG',32719,'PROJCS["WGS 84 / UTM zone 19S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32719"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32719,'EPSG',32719,'PROJCS["WGS 84 / UTM zone 19S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32719"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=19 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32720 : WGS 84 / UTM zone 20S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32720,'EPSG',32720,'PROJCS["WGS 84 / UTM zone 20S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32720"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32720,'EPSG',32720,'PROJCS["WGS 84 / UTM zone 20S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32720"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=20 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32721 : WGS 84 / UTM zone 21S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32721,'EPSG',32721,'PROJCS["WGS 84 / UTM zone 21S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32721"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32721,'EPSG',32721,'PROJCS["WGS 84 / UTM zone 21S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32721"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=21 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32722 : WGS 84 / UTM zone 22S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32722,'EPSG',32722,'PROJCS["WGS 84 / UTM zone 22S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32722"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32722,'EPSG',32722,'PROJCS["WGS 84 / UTM zone 22S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32722"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=22 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32723 : WGS 84 / UTM zone 23S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32723,'EPSG',32723,'PROJCS["WGS 84 / UTM zone 23S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32723"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=23 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32723,'EPSG',32723,'PROJCS["WGS 84 / UTM zone 23S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32723"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=23 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32724 : WGS 84 / UTM zone 24S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32724,'EPSG',32724,'PROJCS["WGS 84 / UTM zone 24S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32724"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=24 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32724,'EPSG',32724,'PROJCS["WGS 84 / UTM zone 24S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32724"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=24 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32725 : WGS 84 / UTM zone 25S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32725,'EPSG',32725,'PROJCS["WGS 84 / UTM zone 25S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32725"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=25 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32725,'EPSG',32725,'PROJCS["WGS 84 / UTM zone 25S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32725"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=25 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32726 : WGS 84 / UTM zone 26S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32726,'EPSG',32726,'PROJCS["WGS 84 / UTM zone 26S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32726"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=26 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32726,'EPSG',32726,'PROJCS["WGS 84 / UTM zone 26S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32726"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=26 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32727 : WGS 84 / UTM zone 27S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32727,'EPSG',32727,'PROJCS["WGS 84 / UTM zone 27S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32727"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=27 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32727,'EPSG',32727,'PROJCS["WGS 84 / UTM zone 27S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32727"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=27 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32728 : WGS 84 / UTM zone 28S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32728,'EPSG',32728,'PROJCS["WGS 84 / UTM zone 28S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32728"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32728,'EPSG',32728,'PROJCS["WGS 84 / UTM zone 28S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32728"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=28 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32729 : WGS 84 / UTM zone 29S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32729,'EPSG',32729,'PROJCS["WGS 84 / UTM zone 29S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32729"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32729,'EPSG',32729,'PROJCS["WGS 84 / UTM zone 29S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32729"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=29 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32730 : WGS 84 / UTM zone 30S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32730,'EPSG',32730,'PROJCS["WGS 84 / UTM zone 30S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32730"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=30 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32730,'EPSG',32730,'PROJCS["WGS 84 / UTM zone 30S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32730"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=30 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32731 : WGS 84 / UTM zone 31S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32731,'EPSG',32731,'PROJCS["WGS 84 / UTM zone 31S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32731"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=31 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32731,'EPSG',32731,'PROJCS["WGS 84 / UTM zone 31S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32731"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=31 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32732 : WGS 84 / UTM zone 32S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32732,'EPSG',32732,'PROJCS["WGS 84 / UTM zone 32S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32732"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32732,'EPSG',32732,'PROJCS["WGS 84 / UTM zone 32S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32732"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=32 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32733 : WGS 84 / UTM zone 33S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32733,'EPSG',32733,'PROJCS["WGS 84 / UTM zone 33S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32733"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=33 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32733,'EPSG',32733,'PROJCS["WGS 84 / UTM zone 33S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32733"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=33 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32734 : WGS 84 / UTM zone 34S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32734,'EPSG',32734,'PROJCS["WGS 84 / UTM zone 34S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32734"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=34 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32734,'EPSG',32734,'PROJCS["WGS 84 / UTM zone 34S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",21],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32734"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=34 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32735 : WGS 84 / UTM zone 35S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32735,'EPSG',32735,'PROJCS["WGS 84 / UTM zone 35S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32735"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=35 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32735,'EPSG',32735,'PROJCS["WGS 84 / UTM zone 35S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32735"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=35 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32736 : WGS 84 / UTM zone 36S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32736,'EPSG',32736,'PROJCS["WGS 84 / UTM zone 36S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32736"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=36 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32736,'EPSG',32736,'PROJCS["WGS 84 / UTM zone 36S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32736"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=36 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32737 : WGS 84 / UTM zone 37S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32737,'EPSG',32737,'PROJCS["WGS 84 / UTM zone 37S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32737"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=37 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32737,'EPSG',32737,'PROJCS["WGS 84 / UTM zone 37S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32737"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=37 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32738 : WGS 84 / UTM zone 38S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32738,'EPSG',32738,'PROJCS["WGS 84 / UTM zone 38S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32738"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32738,'EPSG',32738,'PROJCS["WGS 84 / UTM zone 38S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32738"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=38 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32739 : WGS 84 / UTM zone 39S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32739,'EPSG',32739,'PROJCS["WGS 84 / UTM zone 39S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32739"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=39 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32739,'EPSG',32739,'PROJCS["WGS 84 / UTM zone 39S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",51],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32739"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=39 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32740 : WGS 84 / UTM zone 40S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32740,'EPSG',32740,'PROJCS["WGS 84 / UTM zone 40S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32740"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=40 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32740,'EPSG',32740,'PROJCS["WGS 84 / UTM zone 40S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32740"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=40 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32741 : WGS 84 / UTM zone 41S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32741,'EPSG',32741,'PROJCS["WGS 84 / UTM zone 41S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32741"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=41 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32741,'EPSG',32741,'PROJCS["WGS 84 / UTM zone 41S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32741"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=41 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32742 : WGS 84 / UTM zone 42S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32742,'EPSG',32742,'PROJCS["WGS 84 / UTM zone 42S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32742"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=42 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32742,'EPSG',32742,'PROJCS["WGS 84 / UTM zone 42S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",69],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32742"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=42 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32743 : WGS 84 / UTM zone 43S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32743,'EPSG',32743,'PROJCS["WGS 84 / UTM zone 43S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32743"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=43 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32743,'EPSG',32743,'PROJCS["WGS 84 / UTM zone 43S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",75],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32743"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=43 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32744 : WGS 84 / UTM zone 44S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32744,'EPSG',32744,'PROJCS["WGS 84 / UTM zone 44S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32744"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=44 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32744,'EPSG',32744,'PROJCS["WGS 84 / UTM zone 44S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32744"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=44 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32745 : WGS 84 / UTM zone 45S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32745,'EPSG',32745,'PROJCS["WGS 84 / UTM zone 45S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32745"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=45 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32745,'EPSG',32745,'PROJCS["WGS 84 / UTM zone 45S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",87],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32745"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=45 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32746 : WGS 84 / UTM zone 46S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32746,'EPSG',32746,'PROJCS["WGS 84 / UTM zone 46S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32746"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=46 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32746,'EPSG',32746,'PROJCS["WGS 84 / UTM zone 46S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32746"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=46 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32747 : WGS 84 / UTM zone 47S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32747,'EPSG',32747,'PROJCS["WGS 84 / UTM zone 47S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32747"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=47 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32747,'EPSG',32747,'PROJCS["WGS 84 / UTM zone 47S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32747"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=47 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32748 : WGS 84 / UTM zone 48S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32748,'EPSG',32748,'PROJCS["WGS 84 / UTM zone 48S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32748"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=48 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32748,'EPSG',32748,'PROJCS["WGS 84 / UTM zone 48S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32748"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=48 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32749 : WGS 84 / UTM zone 49S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32749,'EPSG',32749,'PROJCS["WGS 84 / UTM zone 49S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32749"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=49 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32749,'EPSG',32749,'PROJCS["WGS 84 / UTM zone 49S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",111],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32749"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=49 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32750 : WGS 84 / UTM zone 50S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32750,'EPSG',32750,'PROJCS["WGS 84 / UTM zone 50S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32750"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=50 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32750,'EPSG',32750,'PROJCS["WGS 84 / UTM zone 50S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32750"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=50 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32751 : WGS 84 / UTM zone 51S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32751,'EPSG',32751,'PROJCS["WGS 84 / UTM zone 51S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32751"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=51 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32751,'EPSG',32751,'PROJCS["WGS 84 / UTM zone 51S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",123],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32751"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=51 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32752 : WGS 84 / UTM zone 52S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32752,'EPSG',32752,'PROJCS["WGS 84 / UTM zone 52S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32752"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=52 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32752,'EPSG',32752,'PROJCS["WGS 84 / UTM zone 52S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",129],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32752"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=52 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32753 : WGS 84 / UTM zone 53S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32753,'EPSG',32753,'PROJCS["WGS 84 / UTM zone 53S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32753"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=53 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32753,'EPSG',32753,'PROJCS["WGS 84 / UTM zone 53S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",135],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32753"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=53 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32754 : WGS 84 / UTM zone 54S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32754,'EPSG',32754,'PROJCS["WGS 84 / UTM zone 54S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32754"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=54 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32754,'EPSG',32754,'PROJCS["WGS 84 / UTM zone 54S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",141],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32754"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=54 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32755 : WGS 84 / UTM zone 55S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32755,'EPSG',32755,'PROJCS["WGS 84 / UTM zone 55S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32755"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=55 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32755,'EPSG',32755,'PROJCS["WGS 84 / UTM zone 55S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",147],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32755"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=55 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32756 : WGS 84 / UTM zone 56S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32756,'EPSG',32756,'PROJCS["WGS 84 / UTM zone 56S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32756"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=56 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32756,'EPSG',32756,'PROJCS["WGS 84 / UTM zone 56S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32756"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=56 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32757 : WGS 84 / UTM zone 57S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32757,'EPSG',32757,'PROJCS["WGS 84 / UTM zone 57S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",159],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32757"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=57 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32757,'EPSG',32757,'PROJCS["WGS 84 / UTM zone 57S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",159],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32757"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=57 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32758 : WGS 84 / UTM zone 58S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32758,'EPSG',32758,'PROJCS["WGS 84 / UTM zone 58S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32758"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=58 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32758,'EPSG',32758,'PROJCS["WGS 84 / UTM zone 58S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32758"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=58 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32759 : WGS 84 / UTM zone 59S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32759,'EPSG',32759,'PROJCS["WGS 84 / UTM zone 59S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32759"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=59 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32759,'EPSG',32759,'PROJCS["WGS 84 / UTM zone 59S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32759"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=59 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32760 : WGS 84 / UTM zone 60S --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32760,'EPSG',32760,'PROJCS["WGS 84 / UTM zone 60S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32760"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=60 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32760,'EPSG',32760,'PROJCS["WGS 84 / UTM zone 60S",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",177],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32760"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=utm +zone=60 +south +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32761 : WGS 84 / UPS South --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32761,'EPSG',32761,'PROJCS["WGS 84 / UPS South",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",0],PARAMETER["scale_factor",0.994],PARAMETER["false_easting",2000000],PARAMETER["false_northing",2000000],AUTHORITY["EPSG","32761"],AXIS["Easting",UNKNOWN],AXIS["Northing",UNKNOWN]]','+proj=stere +lat_0=-90 +lat_ts=-90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32761,'EPSG',32761,'PROJCS["WGS 84 / UPS South",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",0],PARAMETER["scale_factor",0.994],PARAMETER["false_easting",2000000],PARAMETER["false_northing",2000000],AUTHORITY["EPSG","32761"],AXIS["Northing",NORTH],AXIS["Easting",EAST]]','+proj=stere +lat_0=-90 +lat_ts=-90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +datum=WGS84 +units=m +no_defs '); --- --- EPSG 32766 : WGS 84 / TM 36 SE --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32766,'EPSG',32766,'PROJCS["WGS 84 / TM 36 SE",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",36],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32766"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=36 +k=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs '); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (32766,'EPSG',32766,'PROJCS["WGS 84 / TM 36 SE",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"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",36],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","32766"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]','+proj=tmerc +lat_0=0 +lon_0=36 +k=0.9996 +x_0=500000 +y_0=10000000 +datum=WGS84 +units=m +no_defs '); --- --- Google Maps / Microsoft Maps --- -INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (900913,'spatialreferencing.org',900913,'PROJCS["Popular Visualisation CRS / Mercator (deprecated)",GEOGCS["Popular Visualisation CRS",DATUM["Popular_Visualisation_Datum",SPHEROID["Popular Visualisation Sphere",6378137,0,AUTHORITY["EPSG","7059"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6055"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4055"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3785"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +units=m +k=1.0 +nadgrids=@null +no_defs' ); +INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (900913,'spatialreferencing.org',900913,'PROJCS["Popular Visualisation CRS / Mercator (deprecated)",GEOGCS["Popular Visualisation CRS",DATUM["Popular_Visualisation_Datum",SPHEROID["Popular Visualisation Sphere",6378137,0,AUTHORITY["EPSG","7059"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6055"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4055"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3785"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs' ); COMMIT; ANALYZE spatial_ref_sys; diff -Nru postgis-1.5.3/topology/ER/topology.fig postgis-2.0.1/topology/ER/topology.fig --- postgis-1.5.3/topology/ER/topology.fig 2005-10-13 16:21:49.000000000 +0000 +++ postgis-2.0.1/topology/ER/topology.fig 2012-02-27 22:08:12.000000000 +0000 @@ -1,9 +1,9 @@ -#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +#FIG 3.2 Produced by xfig version 3.2.5 Landscape Center Metric A4 -50.00 +100.00 Single -2 1200 2 @@ -12,7 +12,7 @@ 1 4 0 1 0 0 50 -1 41 0.000 1 0.0000 2840 18688 68 68 2773 18688 2908 18688 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 2844 18743 2844 19193 -4 1 0 50 -1 17 12 0.0000 4 135 150 2889 18383 id\001 +4 1 0 50 -1 17 12 0.0000 4 150 150 2889 18383 id\001 -6 6 3244 18305 3619 19205 1 4 0 1 0 7 50 -1 20 0.000 1 0.0000 3380 18724 68 68 3313 18724 3448 18724 @@ -23,18 +23,18 @@ 6 2666 19211 5951 20066 2 2 0 1 0 7 50 -1 20 0.000 0 0 -1 0 0 5 2666 19211 5951 19211 5951 20066 2666 20066 2666 19211 -4 1 0 50 -1 18 22 0.0000 4 270 1215 4260 19736 LAYER\001 +4 1 0 50 -1 18 22 0.0000 4 285 1245 4260 19736 LAYER\001 -6 -6 6 7726 18396 11011 19251 2 2 0 1 0 7 50 -1 20 0.000 0 0 -1 0 0 5 7726 18396 11011 18396 11011 19251 7726 19251 7726 18396 -4 1 0 50 -1 18 22 0.0000 4 285 2310 9320 18921 BASE LAYER\001 +4 1 0 50 -1 18 22 0.0000 4 285 2370 9320 18921 BASE LAYER\001 -6 6 7708 19980 10993 20835 2 2 0 1 0 7 50 -1 20 0.000 0 0 -1 0 0 5 7708 19980 10993 19980 10993 20835 7708 20835 7708 19980 -4 1 0 50 -1 18 22 0.0000 4 285 2175 9302 20505 HIER LAYER\001 +4 1 0 50 -1 18 22 0.0000 4 285 2220 9302 20505 HIER LAYER\001 -6 6 11699 18168 15876 19518 2 1 0 1 0 7 50 -1 20 0.000 0 0 -1 0 0 5 @@ -48,23 +48,20 @@ 4 1 0 50 -1 17 12 0.0000 4 195 390 15715 20196 {1,1}\001 4 1 0 50 -1 17 12 0.0000 4 195 420 11943 20195 {0,N}\001 -6 -6 16516 18415 19801 19270 -6 17231 18730 18926 19000 -4 1 0 50 -1 18 22 0.0000 4 270 1695 18078 19000 FEATURE\001 --6 +6 16515 18405 19845 19305 2 2 0 1 0 7 50 -1 20 0.000 0 0 -1 0 0 5 16516 18415 19801 18415 19801 19270 16516 19270 16516 18415 -4 1 0 50 -1 18 22 0.0000 4 285 2940 18131 18949 BASE TOPOGEO\001 +4 1 0 50 -1 18 22 0.0000 4 285 2985 18131 18949 BASE TOPOGEO\001 -6 6 16520 19915 19805 20770 2 2 0 1 0 7 50 -1 20 0.000 0 0 -1 0 0 5 16520 19915 19805 19915 19805 20770 16520 20770 16520 19915 -4 1 0 50 -1 18 22 0.0000 4 285 2805 18135 20449 HIER TOPOGEO\001 +4 1 0 50 -1 18 22 0.0000 4 285 2835 18135 20449 HIER TOPOGEO\001 -6 6 18950 22340 22145 23735 2 1 0 1 0 7 50 -1 20 0.000 0 0 -1 0 0 5 18965 23046 20540 22371 22115 23046 20540 23721 18965 23046 -4 1 0 50 -1 19 22 0.0000 4 345 2160 20525 23150 composition\001 +4 1 0 50 -1 19 22 0.0000 4 360 2130 20525 23150 composition\001 -6 6 5947 18734 7734 20405 6 5947 19325 6937 19883 @@ -88,7 +85,7 @@ 6 2713 13629 5998 14484 2 2 0 1 0 7 50 -1 20 0.000 0 0 -1 0 0 5 2713 13629 5998 13629 5998 14484 2713 14484 2713 13629 -4 1 0 50 -1 18 22 0.0000 4 270 2070 4383 14212 TOPOLOGY\001 +4 1 0 50 -1 18 22 0.0000 4 285 2100 4383 14212 TOPOLOGY\001 -6 6 3522 12760 3792 13630 1 4 0 1 0 7 50 -1 20 0.000 1 0.0000 3606 13149 68 68 3539 13149 3674 13149 @@ -101,12 +98,12 @@ 6019 13948 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 4888 13224 4888 13629 -4 1 0 50 -1 17 12 0.0000 4 180 780 4933 12864 precision\001 +4 1 0 50 -1 17 12 0.0000 4 195 780 4933 12864 precision\001 -6 6 16642 13213 19837 14608 2 1 0 1 0 7 50 -1 20 0.000 0 0 -1 0 0 5 16686 13926 18261 13251 19836 13926 18261 14601 16686 13926 -4 1 0 50 -1 19 22 0.0000 4 345 2160 18261 14016 composition\001 +4 1 0 50 -1 19 22 0.0000 4 360 2130 18261 14016 composition\001 -6 6 2790 15623 5940 17822 2 1 0 1 0 7 50 -1 20 0.000 0 0 -1 0 0 5 @@ -124,7 +121,7 @@ 1 4 0 1 0 0 50 -1 41 0.000 1 0.0000 21998 18591 68 68 21931 18591 22066 18591 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 22002 18646 22002 19096 -4 1 0 50 -1 17 12 0.0000 4 135 150 22047 18286 id\001 +4 1 0 50 -1 17 12 0.0000 4 150 150 22047 18286 id\001 -6 6 20482 19291 21472 19849 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 @@ -137,28 +134,28 @@ 6 17144 5464 20294 6814 2 1 0 1 0 7 50 -1 20 0.000 0 0 -1 0 0 5 17144 6139 18719 5464 20294 6139 18719 6814 17144 6139 -4 1 0 50 -1 19 22 0.0000 4 345 1770 18674 6229 start point\001 +4 1 0 50 -1 19 22 0.0000 4 360 1815 18674 6229 start point\001 -6 6 11759 3259 14909 4609 2 1 0 1 0 7 50 -1 20 0.000 0 0 -1 0 0 5 11759 3934 13334 3259 14909 3934 13334 4609 11759 3934 -4 1 0 50 -1 19 22 0.0000 4 345 1845 13289 4024 containing\001 +4 1 0 50 -1 19 22 0.0000 4 360 1860 13289 4024 containing\001 -6 6 6854 5479 10004 6829 2 1 0 1 0 7 50 -1 20 0.000 0 0 -1 0 0 5 6854 6154 8429 5479 10004 6154 8429 6829 6854 6154 -4 1 0 50 -1 19 22 0.0000 4 345 810 8384 6244 right\001 +4 1 0 50 -1 19 22 0.0000 4 360 840 8384 6244 right\001 -6 6 6824 7294 9974 8644 2 1 0 1 0 7 50 -1 20 0.000 0 0 -1 0 0 5 6824 7969 8399 7294 9974 7969 8399 8644 6824 7969 -4 1 0 50 -1 19 22 0.0000 4 285 540 8354 8059 left\001 +4 1 0 50 -1 19 22 0.0000 4 285 585 8354 8059 left\001 -6 6 13634 5809 14414 6709 1 4 0 1 0 7 50 -1 20 0.000 1 0.0000 13973 6228 68 68 13906 6228 14041 6228 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 13979 6304 13979 6709 -4 1 0 50 -1 17 12 0.0000 4 180 780 14024 5944 linestring\001 +4 1 0 50 -1 17 12 0.0000 4 195 780 14024 5944 linestring\001 -6 1 4 0 1 0 7 50 -1 20 0.000 1 0.0000 12396 13065 68 68 12328 13065 12464 13065 1 4 0 1 0 0 50 -1 41 0.000 1 0.0000 12729 13313 68 68 12662 13313 12797 13313 @@ -275,20 +272,22 @@ 4 0 0 50 -1 0 12 0.0000 4 135 420 4541 22561 child\001 4 1 0 50 -1 17 12 0.0000 4 195 420 16179 13798 {0,N}\001 4 1 0 50 -1 17 12 0.0000 4 195 420 18634 14999 {0,N}\001 -4 1 0 50 -1 18 22 0.0000 4 285 2595 13608 14143 TOPO OBJECT\001 -4 1 0 50 -1 17 12 0.0000 4 135 150 12441 12750 id\001 -4 1 0 50 -1 18 22 0.0000 4 285 2250 23128 19609 TOPO GEOM\001 -4 1 0 50 -1 17 12 0.0000 4 180 420 21344 2779 point\001 +4 1 0 50 -1 18 22 0.0000 4 285 2640 13608 14143 TOPO OBJECT\001 +4 1 0 50 -1 17 12 0.0000 4 150 150 12441 12750 id\001 +4 1 0 50 -1 18 22 0.0000 4 285 2295 23128 19609 TOPO GEOM\001 +4 1 0 50 -1 17 12 0.0000 4 195 420 21344 2779 point\001 4 1 0 50 -1 17 12 0.0000 4 195 390 16904 5839 {1,1}\001 4 1 0 50 -1 17 12 0.0000 4 195 390 16919 7849 {1,1}\001 4 1 0 50 -1 17 12 0.0000 4 195 390 11579 9349 {1,1}\001 4 1 0 50 -1 17 12 0.0000 4 195 390 15989 9334 {1,1}\001 4 1 0 50 -1 17 12 0.0000 4 195 420 20579 7819 {0,N}\001 4 1 0 50 -1 17 12 0.0000 4 195 420 20519 5989 {0,N}\001 -4 1 0 50 -1 19 22 0.0000 4 345 2460 15599 10249 next right face\001 -4 1 0 50 -1 19 22 0.0000 4 285 2190 11189 10264 next left face\001 -4 1 0 50 -1 18 22 0.0000 4 270 1020 13364 7279 EDGE\001 -4 1 0 50 -1 19 22 0.0000 4 345 1650 18674 8119 end point\001 +4 1 0 50 -1 19 18 0.0000 4 285 1890 11250 10170 next edge for\001 +4 1 0 50 -1 19 18 0.0000 4 225 1155 11250 10530 left face\001 +4 1 0 50 -1 19 18 0.0000 4 285 1890 15660 10125 next edge for\001 +4 1 0 50 -1 19 18 0.0000 4 285 1365 15660 10485 right face\001 +4 1 0 50 -1 18 22 0.0000 4 285 1050 13364 7279 EDGE\001 +4 1 0 50 -1 19 22 0.0000 4 360 1650 18674 8119 end point\001 4 1 0 50 -1 17 12 0.0000 4 195 420 11414 3724 {0,N}\001 4 1 0 50 -1 17 12 0.0000 4 195 390 15284 3694 {0,1}\001 4 1 0 50 -1 17 12 0.0000 4 195 390 10289 7834 {1,1}\001 @@ -297,7 +296,7 @@ 4 1 0 50 -1 17 12 0.0000 4 195 420 6554 7834 {0,N}\001 4 1 0 50 -1 17 12 0.0000 4 195 390 12899 9949 {1,1}\001 4 1 0 50 -1 17 12 0.0000 4 195 390 13979 9949 {1,1}\001 -4 1 0 50 -1 17 12 0.0000 4 135 330 6569 2839 mbr\001 +4 1 0 50 -1 17 12 0.0000 4 150 330 6569 2839 mbr\001 4 1 0 50 -1 17 12 0.0000 4 195 390 6824 3274 {0,1}\001 -4 1 0 50 -1 18 22 0.0000 4 270 1035 21044 4054 NODE\001 -4 1 0 50 -1 18 22 0.0000 4 270 975 6104 4054 FACE\001 +4 1 0 50 -1 18 22 0.0000 4 285 1095 21044 4054 NODE\001 +4 1 0 50 -1 18 22 0.0000 4 285 1005 6104 4054 FACE\001 diff -Nru postgis-1.5.3/topology/Makefile postgis-2.0.1/topology/Makefile --- postgis-1.5.3/topology/Makefile 2011-06-25 16:29:50.000000000 +0000 +++ postgis-2.0.1/topology/Makefile 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ -# -# PostGIS PGXS build system -# - -# Files to be copied to the contrib/ directory -DATA_built=topology.sql - -# SQL objects (files requiring C pre-processing) -SQL_OBJS=topology.sql.in - -# Extra files to remove during 'make clean' -EXTRA_CLEAN=$(SQL_OBJS) - -# PGXS information -PG_CONFIG = /usr/local/pgsql/9.1/bin/pg_config -PGXS := /usr/local/pgsql/9.1/lib/pgxs/src/makefiles/pgxs.mk -include $(PGXS) - - -# Unfortunately we have to copy this from the PGXS Makefile as it only gets picked up -# if MODULE_big is defined -%.sql: %.sql.in - sed 's,MODULE_PATHNAME,$$libdir/$*,g' $< >$@ - -# Generate any .sql.in files from .sql.in.c files by running them through the C pre-processor -$(SQL_OBJS): %.in: %.in.c - $(CPP) -traditional-cpp $< | grep -v '^#' > $@ - diff -Nru postgis-1.5.3/topology/Makefile.in postgis-2.0.1/topology/Makefile.in --- postgis-1.5.3/topology/Makefile.in 2008-11-06 15:15:06.000000000 +0000 +++ postgis-2.0.1/topology/Makefile.in 2012-04-12 14:09:22.000000000 +0000 @@ -1,28 +1,100 @@ +# ********************************************************************** +# * $Id$ +# * +# * PostGIS - Spatial Types for PostgreSQL +# * http://postgis.refractions.net +# * +# * Copyright (C) 2010-2011 Sandro Santilli +# * Copyright (C) 2008 Mark Cave-Ayland +# * Copyright (C) 2005 Refractions Research Inc. +# * +# * This is free software; you can redistribute and/or modify it under +# * the terms of the GNU General Public Licence. See the COPYING file. +# * +# ********************************************************************** + # # PostGIS PGXS build system # +POSTGIS_PGSQL_VERSION=@POSTGIS_PGSQL_VERSION@ + +# NOTE: we can't use MODULE_big or PGXS insists in building a library... +PGIS_MODULE_big=postgis-@POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@ +MODULEDIR=contrib/$(PGIS_MODULE_big) + # Files to be copied to the contrib/ directory -DATA_built=topology.sql +DATA_built=topology.sql topology_upgrade_20_minor.sql uninstall_topology.sql -# SQL objects (files requiring C pre-processing) -SQL_OBJS=topology.sql.in +# SQL preprocessor +SQLPP = @SQLPP@ + +# SQL objects (files requiring pre-processing) +SQL_OBJS = \ + topology.sql \ + topology_upgrade.sql \ + topology_drop_before.sql \ + topology_drop_after.sql # Extra files to remove during 'make clean' -EXTRA_CLEAN=$(SQL_OBJS) +EXTRA_CLEAN=$(SQL_OBJS) $(SQL_OBJS:.sql=.sql.in) # PGXS information PG_CONFIG = @PGCONFIG@ PGXS := @PGXS@ include $(PGXS) +# Set PERL _after_ the include of PGXS +PERL=@PERL@ + +# PGXS override feature. The ability to allow PostGIS to install itself +# in a versioned directory is only available in PostgreSQL >= 8.5. To +# do this by default on older PostgreSQL versions, we need to override +# the existing PGXS targets. +# +# Once PostgreSQL 8.5 becomes the minimum supported version, this entire +# section and its associated Makefile.pgxs should be removed. +PGXSOVERRIDE = @PGXSOVERRIDE@ +ifeq ($(PGXSOVERRIDE),1) + include ../postgis/Makefile.pgxs +endif + +# If REGRESS=1 passed as a parameter, change the default install paths +# so that no prefix is included. This allows us to relocate to a temporary +# directory for regression testing. +ifeq ($(REGRESS),1) + bindir=/bin + pkglibdir=/lib + datadir=/share + datamoduledir=contrib/postgis +endif + + # Unfortunately we have to copy this from the PGXS Makefile as it only gets picked up # if MODULE_big is defined %.sql: %.sql.in sed 's,MODULE_PATHNAME,$$libdir/$*,g' $< >$@ -# Generate any .sql.in files from .sql.in.c files by running them through the C pre-processor -$(SQL_OBJS): %.in: %.in.c - $(CPP) -traditional-cpp $< | grep -v '^#' > $@ +# Generate any .sql.in files from .sql.in.c files by running them through the SQL pre-processor +%.in: %.in.c + $(SQLPP) $< | grep -v '^#' > $@ + +#Generate upgrade script by stripping things that can't be reinstalled +#e.g. don't bother with tables, types, triggers, and domains +topology_upgrade.sql: topology.sql + $(PERL) -0777 -ne 's/^(CREATE|ALTER) (CAST|OPERATOR|TYPE|TABLE|SCHEMA|DOMAIN|TRIGGER).*?;//msg;print;' $< > $@ + +topology_upgrade_20_minor.sql: topology_drop_before.sql topology_upgrade.sql topology_drop_after.sql + cat $^ > $@ + +topology.sql.in: sql/sqlmm.sql.in.c sql/populate.sql.in.c sql/polygonize.sql.in.c sql/gml.sql.in.c sql/query/getnodebypoint.sql.in.c sql/query/getedgebypoint.sql.in.c sql/query/getfacebypoint.sql.in.c sql/query/GetRingEdges.sql.in.c sql/query/GetNodeEdges.sql.in.c sql/manage/TopologySummary.sql.in.c sql/manage/CopyTopology.sql.in.c sql/manage/ManageHelper.sql.in.c sql/topoelement/topoelement_agg.sql.in.c sql/topogeometry/type.sql.in.c sql/topogeometry/totopogeom.sql.in.c sql/predicates.sql.in.c ../postgis/sqldefines.h ../postgis_svn_revision.h + +uninstall_topology.sql: topology.sql ../utils/create_undef.pl + $(PERL) ../utils/create_undef.pl $< $(POSTGIS_PGSQL_VERSION) > $@ + +check: topology.sql + $(MAKE) -C test $@ +distclean: clean + rm -f Makefile diff -Nru postgis-1.5.3/topology/README postgis-2.0.1/topology/README --- postgis-1.5.3/topology/README 2005-10-13 16:21:49.000000000 +0000 +++ postgis-2.0.1/topology/README 2012-03-13 09:18:04.000000000 +0000 @@ -1,34 +1,56 @@ =Introduction -This module contains an initial implementation of Topology -model support. +This module contains support for topological geometry modelling. +Functions exist to satisfy the ISO/SQLMM topology-geometry model +and more are provided to add an additional abstraction level for +topological features and layers, both simple and hierarchical. -All routines, types and other management objects are stored -in the "topology" SCHEMA. +You can see an ER diagram of the full conceptual model in the ER dir. +You need xfig (http://epb.lbl.gov/xfig/). -You can see an ER diagram of the conceptual model under the ER -directory. You need xfig (http://epb.lbl.gov/xfig/). +All routines, types and other management objects are stored in the +"topology" SCHEMA. -Comments welcome --strk(2005-10-13); +Comments welcome --strk(2012-03-13); =Requirements - * schema-aware postgresql (7.3 and up) - * PostGIS-1.1.x - * Geos-2.1 or up + Many ISO/SQLMM functions use GEOS-3.3.0+ signatures. + The script is still buildable with previous GEOS versions + but you'll need 3.3.0+ at runtime for most uses. + +=Building + + To build the topology support: + + $ make + +=Testing + + To run regression tests: + + $ make check =Install, upgrade, uninstall To enable topology support: - $ make - $ psql -f topology.sql + $ psql -f topology.sql + It will create a 'topology' schema in + hosting all the topology functions. To be run with db-owner perms. + Remember to grant execute to users. + To uninstall: - psql -c 'drop schema topology cascade' + $ psql -c 'drop schema topology cascade' + +To upgrade between minor releases: + + $ psql -f topology_upgrade__minor.sql -Upgrading currently requires uninstall. +Major releases upgrades should follow the "HARD UPGRADE" procedure +described in main postgis manual. =Usage @@ -38,10 +60,27 @@ A catalogue of avalable topologies is kept under the "topology"."topology" table. -To create/destroy a topology: +==Creating a topology + +To create a topology: + + SELECT topology.CreateTopology(, [srid], [tolerance]); - SELECT topology.CreateTopology(name, [srid], [tolerance]); - SELECT topology.DropTopology(name); +Example: + + SELECT topology.CreateTopology('test_schema', 4326 , 0.0001); + or + -- unknown srid, 0 tolerance + SELECT topology.CreateTopology('test_schema'); + + NOTE: the new schema ('test_schema' in example) will be create + so it must not exist before. + +==Destroying a topology + +To destroy a topology: + + SELECT topology.DropTopology(); ==Loading topology data @@ -70,7 +109,14 @@ * face_id integer PRIMARY KEY * mbr box2d ( can be NULL ) -Details on semantic are contained in the SQL/MM specification, which +The next_*_edge of an edge is the edge you encounter next while going +around the specified face (right or left) in counterclockwise order +(so that the face is on your left). Note that due to this definition +the edge being considered is traversed in reverse order when traversing +its "right" face. The values are signed to indicate wheter the next edge +will be traversed in its original or reversed orientation. + +More details on semantic are contained in the SQL/MM specification, which this implementation follows as for these views structure. ==Validating topology data @@ -129,22 +175,26 @@ {{child_layer_id, topogeoemtry_id}, ...} -==Getting simple Geometry values from TopoGeometry objects +==Converting Geometry to TopoGeometry while populating the topology + +You can import a Geometry into an existing topology and at the same +time get its topological definition (its TopoGeometry equivalent) +using the toTopoGeom function: -You currently need to explicit call the TopoGeometry=>Geometry -cast function. This will probably be made implicit when the -code is more tested: + topology.toTopoGeom( - SELECT topology.Geometry(TopoGeometry); + geometry, -- the simple geometry -=Tests + topology_name, -Tests are included under the test/ directory. -Run make w/out args to see a list of supported targets: + layer_id -- as returned by AddTopoGeometryColumn + ); - $ cd test - $ make +==Getting simple Geometry values from TopoGeometry objects +TopoGeometry to Geometry casting is implicit, so any function accepting +a Geometry would transparently also accept a TopoGeometry. Some functions +may be optimized for TopoGeometry. =Issues @@ -185,17 +235,3 @@ this implementation adds constraints to enforce Node and Edge geometry types to be 'POINT' and 'LINESTRING' respectively. -===SRID constraint - -One of the things that the ValidateTopology is required to -check is SRID consistency: all geometry value must be in -the same SRID. I avoided that check as any SRID mismatch -would be cought by spacial predicates and will result -in an exception being thrown. - -We might add the check as a constraint on the topology tables -instead, possibly dropping the SRID after checking it. This -would reduce database, while topology SRID could be re-attached -to any output geometry reading it from the topology.topology -metadata table. - diff -Nru postgis-1.5.3/topology/sql/gml.sql.in.c postgis-2.0.1/topology/sql/gml.sql.in.c --- postgis-1.5.3/topology/sql/gml.sql.in.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/sql/gml.sql.in.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,563 @@ +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- +-- PostGIS - Spatial Types for PostgreSQL +-- http://postgis.refractions.net +-- +-- Copyright (C) 2010, 2011 Sandro Santilli +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +-- +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- +-- Functions used for topology GML output +-- +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- +-- Developed by Sandro Santilli +-- for Faunalia (http://www.faunalia.it) with funding from +-- Regione Toscana - Sistema Informativo per la Gestione del Territorio +-- e dell' Ambiente [RT-SIGTA]. +-- For the project: "Sviluppo strumenti software per il trattamento di dati +-- geografici basati su QuantumGIS e Postgis (CIG 0494241492)" +-- +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +--{ +-- +-- INTERNAL FUNCTION +-- text _AsGMLNode(id, point, nsprefix, precision, options, idprefix, gmlver) +-- +-- }{ +CREATE OR REPLACE FUNCTION topology._AsGMLNode(id int, point geometry, nsprefix_in text, prec int, options int, idprefix text, gmlver int) + RETURNS text +AS +$$ +DECLARE + nsprefix text; + gml text; +BEGIN + + nsprefix := 'gml:'; + IF NOT nsprefix_in IS NULL THEN + IF nsprefix_in = '' THEN + nsprefix = nsprefix_in; + ELSE + nsprefix = nsprefix_in || ':'; + END IF; + END IF; + + gml := '<' || nsprefix || 'Node ' || nsprefix + || 'id="' || idprefix || 'N' || id || '"'; + IF point IS NOT NULL THEN + gml = gml || '>' + || '<' || nsprefix || 'pointProperty>' + || ST_AsGML(gmlver, point, prec, options, nsprefix_in) + || '' + || ''; + ELSE + gml = gml || '/>'; + END IF; + RETURN gml; +END +$$ +LANGUAGE 'plpgsql' IMMUTABLE; +--} _AsGMLNode(id, point, nsprefix, precision, options, idprefix, gmlVersion) + +--{ +-- +-- INTERNAL FUNCTION +-- text _AsGMLEdge(edge_id, start_node, end_node, line, visitedTable, +-- nsprefix, precision, options, idprefix, gmlVersion) +-- +-- }{ +CREATE OR REPLACE FUNCTION topology._AsGMLEdge(edge_id int, start_node int,end_node int, line geometry, visitedTable regclass, nsprefix_in text, prec int, options int, idprefix text, gmlver int) + RETURNS text +AS +$$ +DECLARE + visited bool; + nsprefix text; + gml text; +BEGIN + + nsprefix := 'gml:'; + IF nsprefix_in IS NOT NULL THEN + IF nsprefix_in = '' THEN + nsprefix = nsprefix_in; + ELSE + nsprefix = nsprefix_in || ':'; + END IF; + END IF; + + gml := '<' || nsprefix || 'Edge ' || nsprefix + || 'id="' || idprefix || 'E' || edge_id || '">'; + + -- Start node + gml = gml || '<' || nsprefix || 'directedNode orientation="-"'; + -- Do visited bookkeeping if visitedTable was given + visited = NULL; + IF visitedTable IS NOT NULL THEN + EXECUTE 'SELECT true FROM ' + || visitedTable::text + || ' WHERE element_type = 1 AND element_id = ' + || start_node LIMIT 1 INTO visited; + IF visited IS NOT NULL THEN + gml = gml || ' xlink:href="#' || idprefix || 'N' || start_node || '" />'; + ELSE + -- Mark as visited + EXECUTE 'INSERT INTO ' || visitedTable::text + || '(element_type, element_id) VALUES (1, ' + || start_node || ')'; + END IF; + END IF; + IF visited IS NULL THEN + gml = gml || '>'; + gml = gml || topology._AsGMLNode(start_node, NULL, nsprefix_in, + prec, options, idprefix, gmlver); + gml = gml || ''; + END IF; + + -- End node + gml = gml || '<' || nsprefix || 'directedNode'; + -- Do visited bookkeeping if visitedTable was given + visited = NULL; + IF visitedTable IS NOT NULL THEN + EXECUTE 'SELECT true FROM ' + || visitedTable::text + || ' WHERE element_type = 1 AND element_id = ' + || end_node LIMIT 1 INTO visited; + IF visited IS NOT NULL THEN + gml = gml || ' xlink:href="#' || idprefix || 'N' || end_node || '" />'; + ELSE + -- Mark as visited + EXECUTE 'INSERT INTO ' || visitedTable::text + || '(element_type, element_id) VALUES (1, ' + || end_node || ')'; + END IF; + END IF; + IF visited IS NULL THEN + gml = gml || '>'; + gml = gml || topology._AsGMLNode(end_node, NULL, nsprefix_in, + prec, options, idprefix, gmlver); + gml = gml || ''; + END IF; + + IF line IS NOT NULL THEN + gml = gml || '<' || nsprefix || 'curveProperty>' + || ST_AsGML(gmlver, line, prec, options, nsprefix_in) + || ''; + END IF; + + gml = gml || ''; + + RETURN gml; +END +$$ +LANGUAGE 'plpgsql' VOLATILE; -- writes into visitedTable +--} _AsGMLEdge(id, start_node, end_node, line, visitedTable, nsprefix, precision, options, idprefix, gmlver) + +--{ +-- +-- INTERNAL FUNCTION +-- text _AsGMLFace(toponame, face_id, visitedTable, +-- nsprefix, precision, options, idprefix, gmlVersion) +-- +-- }{ +CREATE OR REPLACE FUNCTION topology._AsGMLFace(toponame text, face_id int, visitedTable regclass, nsprefix_in text, prec int, options int, idprefix text, gmlver int) + RETURNS text +AS +$$ +DECLARE + visited bool; + nsprefix text; + gml text; + rec RECORD; + rec2 RECORD; + bounds geometry; + side int; +BEGIN + + nsprefix := 'gml:'; + IF nsprefix_in IS NOT NULL THEN + IF nsprefix_in = '' THEN + nsprefix = nsprefix_in; + ELSE + nsprefix = nsprefix_in || ':'; + END IF; + END IF; + + gml := '<' || nsprefix || 'Face ' || nsprefix + || 'id="' || idprefix || 'F' || face_id || '">'; + + -- Construct the face geometry, then for each polygon: + FOR rec IN SELECT (ST_DumpRings((ST_Dump(ST_ForceRHR( + topology.ST_GetFaceGeometry(toponame, face_id)))).geom)).geom + LOOP + + -- Contents of a directed face are the list of edges + -- that cover the specific ring + bounds = ST_Boundary(rec.geom); + + FOR rec2 IN EXECUTE + 'SELECT e.*, ST_Line_Locate_Point(' + || quote_literal(bounds::text) + || ', ST_Line_Interpolate_Point(e.geom, 0.2)) as pos' + || ', ST_Line_Locate_Point(' + || quote_literal(bounds::text) + || ', ST_Line_Interpolate_Point(e.geom, 0.8)) as pos2 FROM ' + || quote_ident(toponame) + || '.edge e WHERE ( e.left_face = ' || face_id + || ' OR e.right_face = ' || face_id + || ') AND ST_Covers(' + || quote_literal(bounds::text) + || ', e.geom) ORDER BY pos' + LOOP + + gml = gml || '<' || nsprefix || 'directedEdge'; + + -- if this edge goes in same direction to the + -- ring bounds, make it with negative orientation + IF rec2.pos2 > rec2.pos THEN -- edge goes in same direction + gml = gml || ' orientation="-"'; + END IF; + + -- Do visited bookkeeping if visitedTable was given + IF visitedTable IS NOT NULL THEN + + EXECUTE 'SELECT true FROM ' + || visitedTable::text + || ' WHERE element_type = 2 AND element_id = ' + || rec2.edge_id LIMIT 1 INTO visited; + IF visited THEN + -- Use xlink:href if visited + gml = gml || ' xlink:href="#' || idprefix || 'E' + || rec2.edge_id || '" />'; + CONTINUE; + ELSE + -- Mark as visited otherwise + EXECUTE 'INSERT INTO ' || visitedTable::text + || '(element_type, element_id) VALUES (2, ' + || rec2.edge_id || ')'; + END IF; + + END IF; + + gml = gml || '>'; + + gml = gml || topology._AsGMLEdge(rec2.edge_id, rec2.start_node, + rec2.end_node, rec2.geom, + visitedTable, nsprefix_in, + prec, options, idprefix, gmlver); + gml = gml || ''; + + END LOOP; + END LOOP; + + gml = gml || ''; + + RETURN gml; +END +$$ +LANGUAGE 'plpgsql' VOLATILE; -- writes into visited table +--} _AsGMLFace(toponame, id, visitedTable, nsprefix, precision, options, idprefix, gmlver) + +--{ +-- +-- API FUNCTION +-- +-- text AsGML(TopoGeometry, nsprefix, precision, options, visitedTable, idprefix, gmlver) +-- +-- }{ +CREATE OR REPLACE FUNCTION topology.AsGML(tg topology.TopoGeometry, nsprefix_in text, precision_in int, options_in int, visitedTable regclass, idprefix text, gmlver int) + RETURNS text +AS +$$ +DECLARE + nsprefix text; + precision int; + options int; + visited bool; + toponame text; + gml text; + sql text; + rec RECORD; + rec2 RECORD; + --bounds geometry; + side int; +BEGIN + + nsprefix := 'gml:'; + IF nsprefix_in IS NOT NULL THEN + IF nsprefix_in = '' THEN + nsprefix = nsprefix_in; + ELSE + nsprefix = nsprefix_in || ':'; + END IF; + END IF; + + precision := 15; + IF precision_in IS NOT NULL THEN + precision = precision_in; + END IF; + + options := 1; + IF options_in IS NOT NULL THEN + options = options_in; + END IF; + + -- Get topology name (for subsequent queries) + SELECT name FROM topology.topology into toponame + WHERE id = tg.topology_id; + + -- Puntual TopoGeometry + IF tg.type = 1 THEN + gml = '<' || nsprefix || 'TopoPoint>'; + -- For each defining node, print a directedNode + FOR rec IN EXECUTE 'SELECT r.element_id, n.geom from ' + || quote_ident(toponame) || '.relation r LEFT JOIN ' + || quote_ident(toponame) || '.node n ON (r.element_id = n.node_id)' + || ' WHERE r.layer_id = ' || tg.layer_id + || ' AND r.topogeo_id = ' || tg.id + LOOP + gml = gml || '<' || nsprefix || 'directedNode'; + -- Do visited bookkeeping if visitedTable was given + IF visitedTable IS NOT NULL THEN + EXECUTE 'SELECT true FROM ' + || visitedTable::text + || ' WHERE element_type = 1 AND element_id = ' + || rec.element_id LIMIT 1 INTO visited; + IF visited IS NOT NULL THEN + gml = gml || ' xlink:href="#' || idprefix || 'N' || rec.element_id || '" />'; + CONTINUE; + ELSE + -- Mark as visited + EXECUTE 'INSERT INTO ' || visitedTable::text + || '(element_type, element_id) VALUES (1, ' + || rec.element_id || ')'; + END IF; + END IF; + gml = gml || '>'; + gml = gml || topology._AsGMLNode(rec.element_id, rec.geom, nsprefix_in, precision, options, idprefix, gmlver); + gml = gml || ''; + END LOOP; + gml = gml || ''; + RETURN gml; + + ELSIF tg.type = 2 THEN -- lineal + gml = '<' || nsprefix || 'TopoCurve>'; + + FOR rec IN SELECT (ST_Dump(topology.Geometry(tg))).geom + LOOP + FOR rec2 IN EXECUTE + 'SELECT e.*, ST_Line_Locate_Point(' + || quote_literal(rec.geom::text) + || ', ST_Line_Interpolate_Point(e.geom, 0.2)) as pos' + || ', ST_Line_Locate_Point(' + || quote_literal(rec.geom::text) + || ', ST_Line_Interpolate_Point(e.geom, 0.8)) as pos2 FROM ' + || quote_ident(toponame) + || '.edge e WHERE ST_Covers(' + || quote_literal(rec.geom::text) + || ', e.geom) ORDER BY pos' + -- TODO: add relation to the conditional, to reduce load ? + LOOP + + gml = gml || '<' || nsprefix || 'directedEdge'; + + -- if this edge goes in opposite direction to the + -- line, make it with negative orientation + IF rec2.pos2 < rec2.pos THEN -- edge goes in opposite direction + gml = gml || ' orientation="-"'; + END IF; + + -- Do visited bookkeeping if visitedTable was given + IF visitedTable IS NOT NULL THEN + + EXECUTE 'SELECT true FROM ' + || visitedTable::text + || ' WHERE element_type = 2 AND element_id = ' + || rec2.edge_id LIMIT 1 INTO visited; + IF visited THEN + -- Use xlink:href if visited + gml = gml || ' xlink:href="#' || idprefix || 'E' || rec2.edge_id || '" />'; + CONTINUE; + ELSE + -- Mark as visited otherwise + EXECUTE 'INSERT INTO ' || visitedTable::text + || '(element_type, element_id) VALUES (2, ' + || rec2.edge_id || ')'; + END IF; + + END IF; + + + gml = gml || '>'; + + gml = gml || topology._AsGMLEdge(rec2.edge_id, + rec2.start_node, + rec2.end_node, rec2.geom, + visitedTable, + nsprefix_in, precision, + options, idprefix, gmlver); + + + gml = gml || ''; + END LOOP; + END LOOP; + + gml = gml || ''; + return gml; + + ELSIF tg.type = 3 THEN -- areal + gml = '<' || nsprefix || 'TopoSurface>'; + + -- For each defining face, print a directedFace + FOR rec IN EXECUTE 'SELECT f.face_id from ' + || quote_ident(toponame) || '.relation r LEFT JOIN ' + || quote_ident(toponame) || '.face f ON (r.element_id = f.face_id)' + || ' WHERE r.layer_id = ' || tg.layer_id + || ' AND r.topogeo_id = ' || tg.id + LOOP + gml = gml || '<' || nsprefix || 'directedFace'; + -- Do visited bookkeeping if visitedTable was given + IF visitedTable IS NOT NULL THEN + EXECUTE 'SELECT true FROM ' + || visitedTable::text + || ' WHERE element_type = 3 AND element_id = ' + || rec.face_id LIMIT 1 INTO visited; + IF visited IS NOT NULL THEN + gml = gml || ' xlink:href="#' || idprefix || 'F' || rec.face_id || '" />'; + CONTINUE; + ELSE + -- Mark as visited + EXECUTE 'INSERT INTO ' || visitedTable::text + || '(element_type, element_id) VALUES (3, ' + || rec.face_id || ')'; + END IF; + END IF; + gml = gml || '>'; + gml = gml || topology._AsGMLFace(toponame, rec.face_id, visitedTable, + nsprefix_in, precision, + options, idprefix, gmlver); + gml = gml || ''; + END LOOP; + gml = gml || ''; + RETURN gml; + + ELSIF tg.type = 4 THEN -- collection + RAISE EXCEPTION 'Collection TopoGeometries are not supported by AsGML'; + + END IF; + + + RETURN gml; + +END +$$ +LANGUAGE 'plpgsql' VOLATILE; -- writes into visited table +--} AsGML(TopoGeometry, nsprefix, precision, options, visitedTable, idprefix, gmlver) + +--{ +-- +-- API FUNCTION +-- +-- text AsGML(TopoGeometry, nsprefix, precision, options, visitedTable, +-- idprefix) +-- +-- }{ +CREATE OR REPLACE FUNCTION topology.AsGML(tg topology.TopoGeometry,nsprefix text, prec int, options int, visitedTable regclass, idprefix text) + RETURNS text +AS +$$ + SELECT topology.AsGML($1, $2, $3, $4, $5, $6, 3); +$$ +LANGUAGE 'sql' VOLATILE; -- writes into visited table +--} AsGML(TopoGeometry, nsprefix, precision, options, visitedTable, idprefix) + +--{ +-- +-- API FUNCTION +-- +-- text AsGML(TopoGeometry, nsprefix, precision, options, visitedTable) +-- +-- }{ +CREATE OR REPLACE FUNCTION topology.AsGML(tg topology.TopoGeometry, nsprefix text, prec int, options int, vis regclass) + RETURNS text AS +$$ + SELECT topology.AsGML($1, $2, $3, $4, $5, ''); +$$ LANGUAGE 'sql' VOLATILE; -- writes into visited table +-- } AsGML(TopoGeometry, nsprefix, precision, options) + + +--{ +-- +-- API FUNCTION +-- +-- text AsGML(TopoGeometry, nsprefix, precision, options) +-- +-- }{ +CREATE OR REPLACE FUNCTION topology.AsGML(tg topology.TopoGeometry, nsprefix text, prec int, opts int) + RETURNS text AS +$$ + SELECT topology.AsGML($1, $2, $3, $4, NULL); +$$ LANGUAGE 'sql' STABLE; -- does NOT write into visited table +-- } AsGML(TopoGeometry, nsprefix, precision, options) + +--{ +-- +-- API FUNCTION +-- +-- text AsGML(TopoGeometry, nsprefix) +-- +-- }{ +CREATE OR REPLACE FUNCTION topology.AsGML(tg topology.TopoGeometry, nsprefix text) + RETURNS text AS +$$ + SELECT topology.AsGML($1, $2, 15, 1, NULL); +$$ LANGUAGE 'sql' STABLE; -- does NOT write into visited table +-- } AsGML(TopoGeometry, nsprefix) + +--{ +-- +-- API FUNCTION +-- +-- text AsGML(TopoGeometry, visited_table) +-- +-- }{ +CREATE OR REPLACE FUNCTION topology.AsGML(tg topology.TopoGeometry, visitedTable regclass) + RETURNS text AS +$$ + SELECT topology.AsGML($1, 'gml', 15, 1, $2); +$$ LANGUAGE 'sql' VOLATILE; -- writes into visited table +-- } AsGML(TopoGeometry, visited_table) + +--{ +-- +-- API FUNCTION +-- +-- text AsGML(TopoGeometry, visited_table, nsprefix) +-- +-- }{ +CREATE OR REPLACE FUNCTION topology.AsGML(tg topology.TopoGeometry, visitedTable regclass, nsprefix text) + RETURNS text AS +$$ + SELECT topology.AsGML($1, $3, 15, 1, $2); +$$ LANGUAGE 'sql' VOLATILE; -- writes into visited table +-- } AsGML(TopoGeometry, visited_table, nsprefix) + + +--{ +-- +-- API FUNCTION +-- +-- text AsGML(TopoGeometry) +-- +-- }{ +CREATE OR REPLACE FUNCTION topology.AsGML(tg topology.TopoGeometry) + RETURNS text AS +$$ + SELECT topology.AsGML($1, 'gml'); +$$ LANGUAGE 'sql' STABLE; -- does NOT write into visited table +-- } AsGML(TopoGeometry) + diff -Nru postgis-1.5.3/topology/sql/manage/CopyTopology.sql.in.c postgis-2.0.1/topology/sql/manage/CopyTopology.sql.in.c --- postgis-1.5.3/topology/sql/manage/CopyTopology.sql.in.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/sql/manage/CopyTopology.sql.in.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,99 @@ +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- +-- PostGIS - Spatial Types for PostgreSQL +-- http://postgis.refractions.net +-- +-- Copyright (C) 2011 Sandro Santilli +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +-- +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +--{ +-- CopyTopology(name_source, name_target) +-- +-- Makes a copy of a topology (primitives + topogeometry collections) . +-- Returns the new topology id. +-- +CREATE OR REPLACE FUNCTION topology.CopyTopology(atopology varchar, newtopo varchar) +RETURNS int +AS +$$ +DECLARE + rec RECORD; + rec2 RECORD; + oldtopo_id integer; + newtopo_id integer; + n int4; + ret text; +BEGIN + + SELECT * FROM topology.topology where name = atopology + INTO strict rec; + oldtopo_id = rec.id; + -- TODO: more gracefully handle unexistent topology + + SELECT topology.CreateTopology(newtopo, rec.SRID, rec.precision) + INTO strict newtopo_id; + + -- Copy faces + EXECUTE 'INSERT INTO ' || quote_ident(newtopo) + || '.face SELECT * FROM ' || quote_ident(atopology) + || '.face WHERE face_id != 0'; + -- Update faces sequence + EXECUTE 'SELECT setval(' || quote_literal( + quote_ident(newtopo) || '.face_face_id_seq' + ) || ', (SELECT last_value FROM ' + || quote_ident(atopology) || '.face_face_id_seq))'; + + -- Copy nodes + EXECUTE 'INSERT INTO ' || quote_ident(newtopo) + || '.node SELECT * FROM ' || quote_ident(atopology) + || '.node'; + -- Update node sequence + EXECUTE 'SELECT setval(' || quote_literal( + quote_ident(newtopo) || '.node_node_id_seq' + ) || ', (SELECT last_value FROM ' + || quote_ident(atopology) || '.node_node_id_seq))'; + + -- Copy edges + EXECUTE 'INSERT INTO ' || quote_ident(newtopo) + || '.edge_data SELECT * FROM ' || quote_ident(atopology) + || '.edge_data'; + -- Update edge sequence + EXECUTE 'SELECT setval(' || quote_literal( + quote_ident(newtopo) || '.edge_data_edge_id_seq' + ) || ', (SELECT last_value FROM ' + || quote_ident(atopology) || '.edge_data_edge_id_seq))'; + + -- Copy layers and their TopoGeometry sequences + FOR rec IN SELECT * FROM topology.layer WHERE topology_id = oldtopo_id + LOOP + INSERT INTO topology.layer (topology_id, layer_id, feature_type, + level, child_id, schema_name, table_name, feature_column) + VALUES (newtopo_id, rec.layer_id, rec.feature_type, + rec.level, rec.child_id, newtopo, + 'LAYER' || rec.layer_id, ''); + -- Create layer's TopoGeometry sequences + EXECUTE 'SELECT last_value FROM ' + || quote_ident(atopology) || '.topogeo_s_' || rec.layer_id + INTO STRICT n; + EXECUTE 'CREATE SEQUENCE ' || quote_ident(newtopo) + || '.topogeo_s_' || rec.layer_id; + EXECUTE 'SELECT setval(' || quote_literal( + quote_ident(newtopo) || '.topogeo_s_' || rec.layer_id + ) || ', ' || n || ')'; + END LOOP; + + -- Copy TopoGeometry definitions + EXECUTE 'INSERT INTO ' || quote_ident(newtopo) + || '.relation SELECT * FROM ' || quote_ident(atopology) + || '.relation'; + + RETURN newtopo_id; +END +$$ +LANGUAGE 'plpgsql' VOLATILE STRICT; + +--} TopologySummary diff -Nru postgis-1.5.3/topology/sql/manage/ManageHelper.sql.in.c postgis-2.0.1/topology/sql/manage/ManageHelper.sql.in.c --- postgis-1.5.3/topology/sql/manage/ManageHelper.sql.in.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/sql/manage/ManageHelper.sql.in.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,41 @@ +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- +-- PostGIS - Spatial Types for PostgreSQL +-- http://www.postgis.org +-- +-- Copyright (C) 2011 Regina Obe +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +-- +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +--{ +-- AddToSearchPath(schema_name) +-- +-- Adds the specified schema to the database search path +-- if it is not already in the database search path +-- This is a helper function for upgrade/install +-- We may want to move this function as a generic helper +CREATE OR REPLACE FUNCTION topology.AddToSearchPath(a_schema_name varchar) +RETURNS text +AS +$$ +DECLARE + var_result text; + var_cur_search_path text; +BEGIN + SELECT reset_val INTO var_cur_search_path FROM pg_settings WHERE name = 'search_path'; + IF var_cur_search_path LIKE '%' || quote_ident(a_schema_name) || '%' THEN + var_result := a_schema_name || ' already in database search_path'; + ELSE + EXECUTE 'ALTER DATABASE ' || quote_ident(current_database()) || ' SET search_path = ' || var_cur_search_path || ', ' || quote_ident(a_schema_name); + var_result := a_schema_name || ' has been added to end of database search_path '; + END IF; + + RETURN var_result; +END +$$ +LANGUAGE 'plpgsql' VOLATILE STRICT; + +--} AddToSearchPath diff -Nru postgis-1.5.3/topology/sql/manage/TopologySummary.sql.in.c postgis-2.0.1/topology/sql/manage/TopologySummary.sql.in.c --- postgis-1.5.3/topology/sql/manage/TopologySummary.sql.in.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/sql/manage/TopologySummary.sql.in.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,152 @@ +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- +-- PostGIS - Spatial Types for PostgreSQL +-- http://postgis.refractions.net +-- +-- Copyright (C) 2011 Sandro Santilli +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +-- +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +--{ +-- TopologySummary(name) +-- +-- Print an overview about a topology +-- +CREATE OR REPLACE FUNCTION topology.TopologySummary(atopology varchar) +RETURNS text +AS +$$ +DECLARE + rec RECORD; + rec2 RECORD; + var_topology_id integer; + n int4; + ret text; +BEGIN + + ret := 'Topology ' || quote_ident(atopology) ; + + BEGIN + SELECT * FROM topology.topology WHERE name = atopology INTO STRICT rec; + -- TODO: catch to give a nice error message + var_topology_id := rec.id; + + ret := ret || ' (' || rec.id || '), '; + ret := ret || 'SRID ' || rec.srid || ', ' + || 'precision ' || rec.precision; + IF rec.hasz THEN ret := ret || ', has Z'; END IF; + ret := ret || E'\n'; + EXCEPTION + WHEN NO_DATA_FOUND THEN + ret := ret || E' (X)\n'; + END; + + BEGIN + + BEGIN + EXECUTE 'SELECT count(node_id) FROM ' || quote_ident(atopology) + || '.node ' INTO STRICT n; + ret = ret || n || ' nodes, '; + EXCEPTION + WHEN UNDEFINED_TABLE OR INVALID_SCHEMA_NAME THEN + ret = ret || 'X nodes, '; + END; + + BEGIN + EXECUTE 'SELECT count(edge_id) FROM ' || quote_ident(atopology) + || '.edge_data ' INTO STRICT n; + ret = ret || n || ' edges, '; + EXCEPTION + WHEN UNDEFINED_TABLE OR INVALID_SCHEMA_NAME THEN + ret = ret || 'X edges, '; + END; + + BEGIN + EXECUTE 'SELECT count(face_id) FROM ' || quote_ident(atopology) + || '.face WHERE face_id != 0' INTO STRICT n; + ret = ret || n || ' faces, '; + EXCEPTION + WHEN UNDEFINED_TABLE OR INVALID_SCHEMA_NAME THEN + ret = ret || 'X faces, '; + END; + + BEGIN + + EXECUTE 'SELECT count(*) FROM (SELECT DISTINCT layer_id,topogeo_id FROM ' + || quote_ident(atopology) || '.relation ) foo ' INTO STRICT n; + ret = ret || n || ' topogeoms in '; + + EXECUTE 'SELECT count(*) FROM (SELECT DISTINCT layer_id FROM ' + || quote_ident(atopology) || '.relation ) foo ' INTO STRICT n; + ret = ret || n || ' layers' || E'\n'; + EXCEPTION + WHEN UNDEFINED_TABLE OR INVALID_SCHEMA_NAME THEN + ret = ret || 'X topogeoms in X layers' || E'\n'; + END; + + -- TODO: print informations about layers + FOR rec IN SELECT * FROM topology.layer l + WHERE l.topology_id = var_topology_id + ORDER by layer_id + LOOP -- { + ret = ret || 'Layer ' || rec.layer_id || ', type '; + CASE + WHEN rec.feature_type = 1 THEN + ret = ret || 'Puntal'; + WHEN rec.feature_type = 2 THEN + ret = ret || 'Lineal'; + WHEN rec.feature_type = 3 THEN + ret = ret || 'Polygonal'; + ELSE + ret = ret || '???'; + END CASE; + + ret = ret || ' (' || rec.feature_type || '), '; + + BEGIN + + EXECUTE 'SELECT count(*) FROM ( SELECT DISTINCT topogeo_id FROM ' + || quote_ident(atopology) + || '.relation r WHERE r.layer_id = ' || rec.layer_id + || ' ) foo ' INTO STRICT n; + + ret = ret || n || ' topogeoms' || E'\n'; + + EXCEPTION WHEN UNDEFINED_TABLE THEN + ret = ret || 'X topogeoms' || E'\n'; + END; + + IF rec.level > 0 THEN + ret = ret || ' Hierarchy level ' || rec.level + || ', child layer ' || rec.child_id || E'\n'; + END IF; + + ret = ret || ' Deploy: '; + IF rec.feature_column != '' THEN + ret = ret || quote_ident(rec.schema_name) || '.' + || quote_ident(rec.table_name) || '.' + || quote_ident(rec.feature_column) + || E'\n'; + ELSE + ret = ret || E'NONE (detached)\n'; + END IF; + + END LOOP; -- } + + EXCEPTION + WHEN INVALID_SCHEMA_NAME THEN + ret = ret || E'\n- missing schema - '; + WHEN OTHERS THEN + RAISE EXCEPTION 'Got % (%)', SQLERRM, SQLSTATE; + END; + + + RETURN ret; +END +$$ +LANGUAGE 'plpgsql' STABLE STRICT; + +--} TopologySummary diff -Nru postgis-1.5.3/topology/sql/polygonize.sql.in.c postgis-2.0.1/topology/sql/polygonize.sql.in.c --- postgis-1.5.3/topology/sql/polygonize.sql.in.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/sql/polygonize.sql.in.c 2012-04-04 21:49:26.000000000 +0000 @@ -0,0 +1,51 @@ +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- +-- PostGIS - Spatial Types for PostgreSQL +-- http://postgis.refractions.net +-- +-- Copyright (C) 2011 Sandro Santilli +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +-- +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- +-- Functions used to polygonize topology edges +-- +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +--{ +-- +-- int Polygonize(toponame) +-- +-- TODO: allow restricting polygonization to a bounding box +-- +-- }{ +CREATE OR REPLACE FUNCTION topology.polygonize(toponame varchar) + RETURNS text +AS +$$ +DECLARE + sql text; + rec RECORD; + faces int; +BEGIN + + sql := 'SELECT (st_dump(st_polygonize(geom))).geom from ' + || quote_ident(toponame) || '.edge_data'; + + faces = 0; + FOR rec in EXECUTE sql LOOP + BEGIN + PERFORM topology.AddFace(toponame, rec.geom); + faces = faces + 1; + EXCEPTION + WHEN OTHERS THEN + RAISE WARNING 'Error registering face % (%)', rec.geom, SQLERRM; + END; + END LOOP; + RETURN faces || ' faces registered'; +END +$$ +LANGUAGE 'plpgsql'; +--} Polygonize(toponame) diff -Nru postgis-1.5.3/topology/sql/populate.sql.in.c postgis-2.0.1/topology/sql/populate.sql.in.c --- postgis-1.5.3/topology/sql/populate.sql.in.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/sql/populate.sql.in.c 2012-06-14 15:25:04.000000000 +0000 @@ -0,0 +1,1088 @@ +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- +-- PostGIS - Spatial Types for PostgreSQL +-- http://postgis.refractions.net +-- +-- Copyright (C) 2010-2012 Sandro Santilli +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +-- +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- +-- Functions used to populate a topology +-- +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +/* #define POSTGIS_TOPOLOGY_DEBUG 1 */ + +-- { +-- Compute the max size of the double-precision floating point grid +-- cell required to cover the given geometry +-- +-- +-- A pragmatic test conducted using algoritm shown here: +-- http://stackoverflow.com/questions/7408407/generate-next-largest-or-smallest-representable-floating-point-number-without-bi +-- showed the "tolerance" growing by an order of magnitude proportionally +-- with the order of magnitude of the input, starting with something like +-- 3.5527136788005009294e-15 for the starting value of 9.0 +-- +-- }{ +CREATE OR REPLACE FUNCTION topology._st_mintolerance(ageom Geometry) + RETURNS float8 +AS $$ + SELECT 3.6 * power(10, - ( 15 - log(coalesce( + nullif( + greatest(abs(ST_xmin($1)), abs(ST_ymin($1)), + abs(ST_xmax($1)), abs(ST_ymax($1))), + 0), + 1)) )); +$$ LANGUAGE 'sql' IMMUTABLE STRICT; +-- } + +-- { +-- Get tolerance for a given topology +-- and if zero the minimum for the given geometry +-- +-- }{ +CREATE OR REPLACE FUNCTION topology._st_mintolerance(atopology varchar, ageom Geometry) + RETURNS float8 +AS $$ +DECLARE + ret FLOAT8; +BEGIN + SELECT COALESCE( + NULLIF(precision, 0), + topology._st_mintolerance($2)) + FROM topology.topology + WHERE name = $1 INTO ret; + IF NOT FOUND THEN + RAISE EXCEPTION + 'No topology with name "%" in topology.topology', atopology; + END IF; + return ret; +END; +$$ LANGUAGE 'plpgsql' STABLE STRICT; +-- } + +--{ +-- +-- AddNode(atopology, point, allowEdgeSplitting, setContainingFace) +-- +-- Add a node primitive to a topology and get its identifier. +-- Returns an existing node at the same location, if any. +-- +-- When adding a _new_ node it checks for the existance of any +-- edge crossing the given point, raising an exception if found. +-- +-- The newly added nodes have no containing face. +-- +-- Developed by Sandro Santilli +-- for Faunalia (http://www.faunalia.it) with funding from +-- Regione Toscana - Sistema Informativo per la Gestione del Territorio +-- e dell' Ambiente [RT-SIGTA]. +-- For the project: "Sviluppo strumenti software per il trattamento di dati +-- geografici basati su QuantumGIS e Postgis (CIG 0494241492)" +-- +-- }{ +CREATE OR REPLACE FUNCTION topology.AddNode(atopology varchar, apoint geometry, allowEdgeSplitting boolean, setContainingFace boolean DEFAULT false) + RETURNS int +AS +$$ +DECLARE + nodeid int; + rec RECORD; + containing_face int; +BEGIN + -- + -- Atopology and apoint are required + -- + IF atopology IS NULL OR apoint IS NULL THEN + RAISE EXCEPTION 'Invalid null argument'; + END IF; + + -- + -- Apoint must be a point + -- + IF substring(geometrytype(apoint), 1, 5) != 'POINT' + THEN + RAISE EXCEPTION 'Node geometry must be a point'; + END IF; + + -- + -- Check if a coincident node already exists + -- + -- We use index AND x/y equality + -- + FOR rec IN EXECUTE 'SELECT node_id FROM ' + || quote_ident(atopology) || '.node ' || + 'WHERE geom && ' || quote_literal(apoint::text) || '::geometry' + ||' AND ST_X(geom) = ST_X('||quote_literal(apoint::text)||'::geometry)' + ||' AND ST_Y(geom) = ST_Y('||quote_literal(apoint::text)||'::geometry)' + LOOP + RETURN rec.node_id; + END LOOP; + + -- + -- Check if any edge crosses this node + -- (endpoints are fine) + -- + FOR rec IN EXECUTE 'SELECT edge_id FROM ' + || quote_ident(atopology) || '.edge ' + || 'WHERE ST_DWithin(' + || quote_literal(apoint::text) + || ', geom, 0) AND NOT ST_Equals(' + || quote_literal(apoint::text) + || ', ST_StartPoint(geom)) AND NOT ST_Equals(' + || quote_literal(apoint::text) + || ', ST_EndPoint(geom))' + LOOP + IF allowEdgeSplitting THEN + RETURN ST_ModEdgeSplit(atopology, rec.edge_id, apoint); + ELSE + RAISE EXCEPTION 'An edge crosses the given node.'; + END IF; + END LOOP; + + IF setContainingFace THEN + containing_face := topology.GetFaceByPoint(atopology, apoint, 0); +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'containing face: %', containing_face; +#endif + ELSE + containing_face := NULL; + END IF; + + -- + -- Get new node id from sequence + -- + FOR rec IN EXECUTE 'SELECT nextval(' || + quote_literal( + quote_ident(atopology) || '.node_node_id_seq' + ) || ')' + LOOP + nodeid = rec.nextval; + END LOOP; + + -- + -- Insert the new row + -- + EXECUTE 'INSERT INTO ' || quote_ident(atopology) + || '.node(node_id, containing_face, geom) + VALUES(' || nodeid || ',' || coalesce(containing_face::text, 'NULL') || ',' + || quote_literal(apoint::text) || ')'; + + RETURN nodeid; + +END +$$ +LANGUAGE 'plpgsql' VOLATILE; +--} AddNode + +--{ +-- +-- AddNode(atopology, point) +-- +CREATE OR REPLACE FUNCTION topology.AddNode(atopology varchar, apoint geometry) + RETURNS int +AS +$$ + SELECT topology.AddNode($1, $2, false, false); +$$ +LANGUAGE 'sql' VOLATILE; +--} AddNode + +--{ +-- +-- AddEdge(atopology, line) +-- +-- Add an edge primitive to a topology and get its identifier. +-- Edge endpoints will be added as nodes if missing. +-- Returns an existing edge at the same location, if any. +-- +-- An exception is raised if the given line crosses an existing +-- node or interects with an existing edge on anything but endnodes. +-- +-- The newly added edge has "universe" face on both sides +-- and links to itself as per next left/right edge. +-- Calling code is expected to do further linking. +-- +-- Developed by Sandro Santilli +-- for Faunalia (http://www.faunalia.it) with funding from +-- Regione Toscana - Sistema Informativo per la Gestione del Territorio +-- e dell' Ambiente [RT-SIGTA]. +-- For the project: "Sviluppo strumenti software per il trattamento di dati +-- geografici basati su QuantumGIS e Postgis (CIG 0494241492)" +-- +CREATE OR REPLACE FUNCTION topology.AddEdge(atopology varchar, aline geometry) + RETURNS int +AS +$$ +DECLARE + edgeid int; + rec RECORD; + ix geometry; +BEGIN + -- + -- Atopology and apoint are required + -- + IF atopology IS NULL OR aline IS NULL THEN + RAISE EXCEPTION 'Invalid null argument'; + END IF; + + -- + -- Aline must be a linestring + -- + IF substring(geometrytype(aline), 1, 4) != 'LINE' + THEN + RAISE EXCEPTION 'Edge geometry must be a linestring'; + END IF; + + -- + -- Check there's no face registered in the topology + -- + FOR rec IN EXECUTE 'SELECT count(face_id) FROM ' + || quote_ident(atopology) || '.face ' + || ' WHERE face_id != 0 LIMIT 1' + LOOP + IF rec.count > 0 THEN + RAISE EXCEPTION 'AddEdge can only be used against topologies with no faces defined'; + END IF; + END LOOP; + + -- + -- Check if the edge crosses an existing node + -- + FOR rec IN EXECUTE 'SELECT node_id FROM ' + || quote_ident(atopology) || '.node ' + || 'WHERE ST_Crosses(' + || quote_literal(aline::text) || '::geometry, geom' + || ')' + LOOP + RAISE EXCEPTION 'Edge crosses node %', rec.node_id; + END LOOP; + + -- + -- Check if the edge intersects an existing edge + -- on anything but endpoints + -- + -- Following DE-9 Intersection Matrix represent + -- the only relation we accept. + -- + -- F F 1 + -- F * * + -- 1 * 2 + -- + -- Example1: linestrings touching at one endpoint + -- FF1 F00 102 + -- FF1 F** 1*2 <-- our match + -- + -- Example2: linestrings touching at both endpoints + -- FF1 F0F 1F2 + -- FF1 F** 1*2 <-- our match + -- + FOR rec IN EXECUTE 'SELECT edge_id, geom, ST_Relate(' + || quote_literal(aline::text) + || '::geometry, geom, 2) as im' + || ' FROM ' + || quote_ident(atopology) || '.edge ' + || 'WHERE ' + || quote_literal(aline::text) || '::geometry && geom' + + LOOP + + IF ST_RelateMatch(rec.im, 'FF1F**1*2') THEN + CONTINUE; -- no interior intersection + END IF; + + -- Reuse an EQUAL edge (be it closed or not) + IF ST_RelateMatch(rec.im, '1FFF*FFF2') THEN +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Edge already known as %', rec.edge_id; +#endif + RETURN rec.edge_id; + END IF; + + -- WARNING: the constructive operation might throw an exception + BEGIN + ix = ST_Intersection(rec.geom, aline); + EXCEPTION + WHEN OTHERS THEN + RAISE NOTICE 'Could not compute intersection between input edge (%) and edge % (%)', aline::text, rec.edge_id, rec.geom::text; + END; + + RAISE EXCEPTION 'Edge intersects (not on endpoints) with existing edge % at or near point %', rec.edge_id, ST_AsText(ST_PointOnSurface(ix)); + + END LOOP; + + -- + -- Get new edge id from sequence + -- + FOR rec IN EXECUTE 'SELECT nextval(' || + quote_literal( + quote_ident(atopology) || '.edge_data_edge_id_seq' + ) || ')' + LOOP + edgeid = rec.nextval; + END LOOP; + + -- + -- Insert the new row + -- + EXECUTE 'INSERT INTO ' + || quote_ident(atopology) + || '.edge(edge_id, start_node, end_node, ' + || 'next_left_edge, next_right_edge, ' + || 'left_face, right_face, ' + || 'geom) ' + || ' VALUES(' + + -- edge_id + || edgeid ||',' + + -- start_node + || 'topology.addNode(' + || quote_literal(atopology) + || ', ST_StartPoint(' + || quote_literal(aline::text) + || ')) ,' + + -- end_node + || 'topology.addNode(' + || quote_literal(atopology) + || ', ST_EndPoint(' + || quote_literal(aline::text) + || ')) ,' + + -- next_left_edge + || -edgeid ||',' + + -- next_right_edge + || edgeid ||',' + + -- left_face + || '0,' + + -- right_face + || '0,' + + -- geom + ||quote_literal(aline::text) + || ')'; + + RETURN edgeid; + +END +$$ +LANGUAGE 'plpgsql' VOLATILE; +--} AddEdge + +--{ +-- +-- AddFace(atopology, poly, [=true]) +-- +-- Add a face primitive to a topology and get its identifier. +-- Returns an existing face at the same location, if any, unless +-- true is passed as the force_new argument +-- +-- For a newly added face, its edges will be appropriately +-- linked (marked as left-face or right-face), and any contained +-- edges and nodes would also be marked as such. +-- +-- When forcing re-registration of an existing face, no action will be +-- taken to deal with the face being substituted. Which means +-- a record about the old face and any record in the relation table +-- referencing the existing face will remain untouched, effectively +-- leaving the topology in a possibly invalid state. +-- It is up to the caller to deal with that. +-- +-- The target topology is assumed to be valid (containing no +-- self-intersecting edges). +-- +-- An exception is raised if: +-- o The polygon boundary is not fully defined by existing edges. +-- o The polygon overlaps an existing face. +-- +-- Developed by Sandro Santilli +-- for Faunalia (http://www.faunalia.it) with funding from +-- Regione Toscana - Sistema Informativo per la Gestione del Territorio +-- e dell' Ambiente [RT-SIGTA]. +-- For the project: "Sviluppo strumenti software per il trattamento di dati +-- geografici basati su QuantumGIS e Postgis (CIG 0494241492)" +-- +CREATE OR REPLACE FUNCTION topology.AddFace(atopology varchar, apoly geometry, force_new boolean DEFAULT FALSE) + RETURNS int +AS +$$ +DECLARE + bounds geometry; + symdif geometry; + faceid int; + rec RECORD; + rrec RECORD; + relate text; + right_edges int[]; + left_edges int[]; + all_edges geometry; + old_faceid int; + old_edgeid int; + sql text; + right_side bool; + edgeseg geometry; + p1 geometry; + p2 geometry; + p3 geometry; + loc float8; + segnum int; + numsegs int; +BEGIN + -- + -- Atopology and apoly are required + -- + IF atopology IS NULL OR apoly IS NULL THEN + RAISE EXCEPTION 'Invalid null argument'; + END IF; + + -- + -- Aline must be a polygon + -- + IF substring(geometrytype(apoly), 1, 4) != 'POLY' + THEN + RAISE EXCEPTION 'Face geometry must be a polygon'; + END IF; + + for rrec IN SELECT (ST_DumpRings(ST_ForceRHR(apoly))).geom + LOOP -- { + -- + -- Find all bounds edges, forcing right-hand-rule + -- to know what's left and what's right... + -- + bounds = ST_Boundary(rrec.geom); + + sql := 'SELECT e.geom, e.edge_id, ' + || 'e.left_face, e.right_face FROM ' + || quote_ident(atopology) || '.edge e, (SELECT ' + || quote_literal(bounds::text) + || '::geometry as geom) r WHERE ' + || 'r.geom && e.geom' + ; + -- RAISE DEBUG 'SQL: %', sql; + FOR rec IN EXECUTE sql + LOOP -- { + --RAISE DEBUG 'Edge % has bounding box intersection', rec.edge_id; + + -- Find first non-empty segment of the edge + numsegs = ST_NumPoints(rec.geom); + segnum = 1; + WHILE segnum < numsegs LOOP + p1 = ST_PointN(rec.geom, segnum); + p2 = ST_PointN(rec.geom, segnum+1); + IF ST_Distance(p1, p2) > 0 THEN + EXIT; + END IF; + segnum = segnum + 1; + END LOOP; + + IF segnum = numsegs THEN + RAISE WARNING 'Edge % is collapsed', rec.edge_id; + CONTINUE; -- we don't want to spend time on it + END IF; + + edgeseg = ST_MakeLine(p1, p2); + + -- Skip non-covered edges + IF NOT ST_Equals(p2, ST_EndPoint(rec.geom)) THEN + IF NOT ( _ST_Intersects(bounds, p1) AND _ST_Intersects(bounds, p2) ) + THEN + --RAISE DEBUG 'Edge % has points % and % not intersecting with ring bounds', rec.edge_id, st_astext(p1), st_astext(p2); + CONTINUE; + END IF; + ELSE + -- must be a 2-points only edge, let's use Covers (more expensive) + IF NOT _ST_Covers(bounds, edgeseg) THEN + --RAISE DEBUG 'Edge % is not covered by ring', rec.edge_id; + CONTINUE; + END IF; + END IF; + + p3 = ST_StartPoint(bounds); + IF ST_DWithin(edgeseg, p3, 0) THEN + -- Edge segment covers ring endpoint, See bug #874 + loc = ST_Line_Locate_Point(edgeseg, p3); + -- WARNING: this is as robust as length of edgeseg allows... + IF loc > 0.9 THEN + -- shift last point down + p2 = ST_Line_Interpolate_Point(edgeseg, loc - 0.1); + ELSIF loc < 0.1 THEN + -- shift first point up + p1 = ST_Line_Interpolate_Point(edgeseg, loc + 0.1); + ELSE + -- when ring start point is in between, we swap the points + p3 = p1; p1 = p2; p2 = p3; + END IF; + END IF; + + right_side = ST_Line_Locate_Point(bounds, p1) < + ST_Line_Locate_Point(bounds, p2); + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Edge % (left:%, right:%) - ring : % - right_side : %', + rec.edge_id, rec.left_face, rec.right_face, rrec.path, right_side; +#endif + + IF right_side THEN + right_edges := array_append(right_edges, rec.edge_id); + old_faceid = rec.right_face; + ELSE + left_edges := array_append(left_edges, rec.edge_id); + old_faceid = rec.left_face; + END IF; + + IF faceid IS NULL OR faceid = 0 THEN + faceid = old_faceid; + old_edgeid = rec.edge_id; + ELSIF faceid != old_faceid THEN + RAISE EXCEPTION 'Edge % has face % registered on the side of this face, while edge % has face % on the same side', rec.edge_id, old_faceid, old_edgeid, faceid; + END IF; + + -- Collect all edges for final full coverage check + all_edges = ST_Collect(all_edges, rec.geom); + + END LOOP; -- } + END LOOP; -- } + + IF all_edges IS NULL THEN + RAISE EXCEPTION 'Found no edges on the polygon boundary'; + END IF; + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Left edges: %', left_edges; +#endif +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Right edges: %', right_edges; +#endif + + -- + -- Check that all edges found, taken togheter, + -- fully match the ring boundary and nothing more + -- + -- If the test fail either we need to add more edges + -- from the polygon ring or we need to split + -- some of the existing ones. + -- + bounds = ST_Boundary(apoly); + IF NOT ST_isEmpty(ST_SymDifference(bounds, all_edges)) THEN + IF NOT ST_isEmpty(ST_Difference(bounds, all_edges)) THEN + RAISE EXCEPTION 'Polygon boundary is not fully defined by existing edges at or near point %', ST_AsText(ST_PointOnSurface(ST_Difference(bounds, all_edges))); + ELSE + RAISE EXCEPTION 'Existing edges cover polygon boundary and more at or near point % (invalid topology?)', ST_AsText(ST_PointOnSurface(ST_Difference(all_edges, bounds))); + END IF; + END IF; + + IF faceid IS NOT NULL AND faceid != 0 THEN + IF NOT force_new THEN +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Face already known as %, not forcing a new face', faceid; +#endif + RETURN faceid; + ELSE +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Face already known as %, forcing a new face', faceid; +#endif + END IF; + END IF; + + -- + -- Get new face id from sequence + -- + FOR rec IN EXECUTE 'SELECT nextval(' || + quote_literal( + quote_ident(atopology) || '.face_face_id_seq' + ) || ')' + LOOP + faceid = rec.nextval; + END LOOP; + + -- + -- Insert new face + -- + EXECUTE 'INSERT INTO ' + || quote_ident(atopology) + || '.face(face_id, mbr) VALUES(' + -- face_id + || faceid || ',' + -- minimum bounding rectangle + || quote_literal(ST_Envelope(apoly)::text) + || ')'; + + -- + -- Update all edges having this face on the left + -- + IF left_edges IS NOT NULL THEN + EXECUTE 'UPDATE ' + || quote_ident(atopology) + || '.edge_data SET left_face = ' + || quote_literal(faceid) + || ' WHERE edge_id = ANY(' + || quote_literal(left_edges) + || ') '; + END IF; + + -- + -- Update all edges having this face on the right + -- + IF right_edges IS NOT NULL THEN + EXECUTE 'UPDATE ' + || quote_ident(atopology) + || '.edge_data SET right_face = ' + || quote_literal(faceid) + || ' WHERE edge_id = ANY(' + || quote_literal(right_edges) + || ') '; + END IF; + + + -- + -- Set left_face/right_face of any contained edge + -- + EXECUTE 'UPDATE ' + || quote_ident(atopology) + || '.edge_data SET right_face = ' + || quote_literal(faceid) + || ', left_face = ' + || quote_literal(faceid) + || ' WHERE ST_Contains(' + || quote_literal(apoly::text) + || ', geom)'; + + -- + -- Set containing_face of any contained node + -- + EXECUTE 'UPDATE ' + || quote_ident(atopology) + || '.node SET containing_face = ' + || quote_literal(faceid) + || ' WHERE containing_face IS NOT NULL AND ST_Contains(' + || quote_literal(apoly::text) + || ', geom)'; + + RETURN faceid; + +END +$$ +LANGUAGE 'plpgsql' VOLATILE; +--} AddFace + +-- ---------------------------------------------------------------------------- +-- +-- Functions to incrementally populate a topology +-- +-- ---------------------------------------------------------------------------- + +--{ +-- TopoGeo_AddPoint(toponame, pointgeom, tolerance) +-- +-- Add a Point into a topology, with an optional tolerance +-- +CREATE OR REPLACE FUNCTION topology.TopoGeo_AddPoint(atopology varchar, apoint geometry, tolerance float8 DEFAULT 0) + RETURNS int AS +$$ +DECLARE + id integer; + rec RECORD; + sql text; + prj GEOMETRY; + snapedge GEOMETRY; + snaptol FLOAT8; + tol FLOAT8; +BEGIN + + -- 0. Check arguments + IF geometrytype(apoint) != 'POINT' THEN + RAISE EXCEPTION 'Invalid geometry type (%) passed to TopoGeo_AddPoint, expected POINT', geometrytype(apoint); + END IF; + + -- Get tolerance, if 0 was given + tol := COALESCE( NULLIF(tolerance, 0), topology._st_mintolerance(atopology, apoint) ); + + -- 1. Check if any existing node falls within tolerance + -- and if so pick the closest + sql := 'SELECT a.node_id FROM ' + || quote_ident(atopology) + || '.node as a WHERE ST_DWithin(a.geom,' + || quote_literal(apoint::text) || '::geometry,' + || tol || ') ORDER BY ST_Distance(' + || quote_literal(apoint::text) + || '::geometry, a.geom) LIMIT 1;'; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG '%', sql; +#endif + EXECUTE sql INTO id; + IF id IS NOT NULL THEN + RETURN id; + END IF; + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'No existing node within tolerance distance'; +#endif + + -- 2. Check if any existing edge falls within tolerance + -- and if so split it by a point projected on it + sql := 'SELECT a.edge_id, a.geom FROM ' + || quote_ident(atopology) + || '.edge as a WHERE ST_DWithin(a.geom,' + || quote_literal(apoint::text) || '::geometry,' + || tol || ') ORDER BY ST_Distance(' + || quote_literal(apoint::text) + || '::geometry, a.geom) LIMIT 1;'; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG '%', sql; +#endif + EXECUTE sql INTO rec; + IF rec IS NOT NULL THEN + -- project point to line, split edge by point + prj := ST_ClosestPoint(rec.geom, apoint); +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Splitting edge % with closest point %', rec.edge_id, ST_AsText(prj); +#endif + IF NOT ST_Contains(rec.geom, prj) THEN +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG ' Snapping edge to contain closest point'; +#endif + -- The tolerance must be big enough for snapping to happen + -- and small enough to snap only to the projected point. + -- Unfortunately ST_Distance returns 0 because it also uses + -- a projected point internally, so we need another way. + snaptol := topology._st_mintolerance(prj); +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Tolerance for snapping to point % = %', ST_AsText(prj), snaptol; +#endif + snapedge := ST_Snap(rec.geom, prj, snaptol); + + -- Snapping currently snaps the first point below tolerance + -- so may possibly move first point. See ticket #1631 + IF NOT ST_Equals(ST_StartPoint(rec.geom), ST_StartPoint(snapedge)) + THEN +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE WARNING 'Snapping moved first edge vertex, fixing'; +#endif + snapedge := ST_MakeLine(ST_StartPoint(rec.geom), snapedge); + END IF; + +#ifdef POSTGIS_TOPOLOGY_DEBUG + IF NOT ST_Contains(snapedge, prj) THEN -- or if equal ? + RAISE WARNING 'Edge within % distance from node still does not contain the node after snapping to it with tolerance %', tol, snaptol; + END IF; +#endif + PERFORM ST_ChangeEdgeGeom(atopology, rec.edge_id, snapedge); + END IF; + id := topology.ST_ModEdgeSplit(atopology, rec.edge_id, prj); + ELSE +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'No existing edge within tolerance distance'; +#endif + id := topology.ST_AddIsoNode(atopology, NULL, apoint); + END IF; + + RETURN id; +END +$$ +LANGUAGE 'plpgsql' VOLATILE; +--} TopoGeo_AddPoint + +--{ +-- TopoGeo_addLinestring(toponame, linegeom, tolerance) +-- +-- Add a LineString into a topology +-- +-- }{ +CREATE OR REPLACE FUNCTION topology.TopoGeo_addLinestring(atopology varchar, aline geometry, tolerance float8 DEFAULT 0) + RETURNS SETOF int AS +$$ +DECLARE + rec RECORD; + rec2 RECORD; + sql TEXT; + set1 GEOMETRY; + set2 GEOMETRY; + snapped GEOMETRY; + noded GEOMETRY; + start_node INTEGER; + end_node INTEGER; + id INTEGER; + inodes GEOMETRY; + iedges GEOMETRY; + tol float8; +BEGIN + + -- 0. Check arguments + IF geometrytype(aline) != 'LINESTRING' THEN + RAISE EXCEPTION 'Invalid geometry type (%) passed to TopoGeo_AddLinestring, expected LINESTRING', geometrytype(aline); + END IF; + + -- Get tolerance, if 0 was given + tol := COALESCE( NULLIF(tolerance, 0), topology._st_mintolerance(atopology, aline) ); + + -- 1. Self-node + noded := ST_UnaryUnion(aline); +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Self-noded: %', ST_AsText(noded); +#endif + + -- 2. Node to edges falling within tol distance + sql := 'WITH nearby AS ( SELECT e.geom FROM ' + || quote_ident(atopology) + || '.edge e WHERE ST_DWithin(e.geom, ' + || quote_literal(noded::text) + || '::geometry, ' + || tol || ') ) SELECT st_collect(geom) FROM nearby;'; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG '%', sql; +#endif + EXECUTE sql INTO iedges; + IF iedges IS NOT NULL THEN + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Intersecting edges: %', ST_AsText(iedges); +#endif + + snapped := ST_Snap(noded, iedges, tol); +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Snapped to edges: %', ST_AsText(snapped); +#endif + + noded := ST_Difference(snapped, iedges); +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Difference: %', ST_AsText(noded); +#endif + + set1 := ST_Intersection(snapped, iedges); +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Intersection: %', ST_AsText(set1); +#endif + + set2 := ST_LineMerge(set1); +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'LineMerged intersection: %', ST_AsText(set2); +#endif + + noded := ST_Union(noded, set2); +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Unioned: %', ST_AsText(noded); +#endif + + END IF; + + -- 2.1. Node with existing nodes within tol + -- TODO: check if we should be only considering _isolated_ nodes! + sql := 'WITH nearby AS ( SELECT n.geom FROM ' + || quote_ident(atopology) + || '.node n WHERE ST_DWithin(n.geom, ' + || quote_literal(noded::text) + || '::geometry, ' + || tol || ') ) SELECT st_collect(geom) FROM nearby;'; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG '%', sql; +#endif + EXECUTE sql INTO inodes; + + IF inodes IS NOT NULL THEN -- { +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Intersecting nodes: %', ST_AsText(inodes); +#endif + + -- TODO: consider snapping once against all elements + --- (rather than once with edges and once with nodes) + noded := ST_Snap(noded, inodes, tol); +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Snapped to nodes: %', ST_AsText(noded); +#endif + + FOR rec IN SELECT (ST_Dump(inodes)).* + LOOP + -- Use the node to split edges + SELECT ST_Collect(geom) + FROM ST_Dump(ST_Split(noded, rec.geom)) + INTO STRICT noded; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Split by %: %', ST_AsText(rec.geom), ST_AsText(noded); +#endif + END LOOP; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Split: %', ST_AsText(noded); +#endif + + -- re-node to account for ST_Snap introduced self-intersections + -- See http://trac.osgeo.org/postgis/ticket/1714 + -- TODO: consider running UnaryUnion once after all noding + noded := ST_UnaryUnion(noded); +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Self-unioned again: %', ST_AsText(noded); +#endif + END IF; -- } + + -- 3. For each (now-noded) segment, insert an edge + FOR rec IN SELECT (ST_Dump(noded)).geom LOOP + + -- TODO: skip point elements ? + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Adding edge %', ST_AsText(rec.geom); +#endif + + start_node := topology.TopoGeo_AddPoint(atopology, + ST_StartPoint(rec.geom), + tol); +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG ' Start Node: %', start_node; +#endif + + end_node := topology.TopoGeo_AddPoint(atopology, + ST_EndPoint(rec.geom), + tol); +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG ' End Node: %', end_node; +#endif + + -- Added endpoints may have drifted due to tolerance, so + -- we need to re-snap the edge to the new nodes before adding it + sql := 'SELECT n1.geom as sn, n2.geom as en FROM ' || quote_ident(atopology) + || '.node n1, ' || quote_ident(atopology) + || '.node n2 WHERE n1.node_id = ' + || start_node || ' AND n2.node_id = ' || end_node; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG '%', sql; +#endif + + EXECUTE sql INTO STRICT rec2; + + snapped := ST_SetPoint( + ST_SetPoint(rec.geom, ST_NPoints(rec.geom)-1, rec2.en), + 0, rec2.sn); + + /* We might have introduced an invalidity (TODO: check this out) */ + snapped := ST_CollectionExtract(ST_MakeValid(snapped), 2); +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Cleaned edge: %', ST_AsText(snapped); +#endif + + + -- Check if the so-snapped edge collapsed (see #1650) + IF ST_IsEmpty(snapped) THEN +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Edge collapsed'; +#endif + CONTINUE; + END IF; + + -- Check if the so-snapped edge _now_ exists + sql := 'SELECT edge_id FROM ' || quote_ident(atopology) + || '.edge_data WHERE ST_Equals(geom, ' || quote_literal(snapped::text) + || '::geometry)'; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG '%', sql; +#endif + EXECUTE sql INTO id; + IF id IS NULL THEN + id := topology.ST_AddEdgeModFace(atopology, start_node, end_node, + snapped); +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'New edge id: %', id; +#endif + ELSE +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Old edge id: %', id; +#endif + END IF; + + RETURN NEXT id; + + END LOOP; + + RETURN; +END +$$ +LANGUAGE 'plpgsql'; +--} TopoGeo_addLinestring + +--{ +-- TopoGeo_AddPolygon(toponame, polygeom, tolerance) +-- +-- Add a Polygon into a topology +-- +-- }{ +CREATE OR REPLACE FUNCTION topology.TopoGeo_AddPolygon(atopology varchar, apoly geometry, tolerance float8 DEFAULT 0) + RETURNS SETOF int AS +$$ +DECLARE + boundary GEOMETRY; + fgeom GEOMETRY; + rec RECORD; + edges INTEGER[]; + sql TEXT; + tol FLOAT8; +BEGIN + + -- 0. Check arguments + IF geometrytype(apoly) != 'POLYGON' THEN + RAISE EXCEPTION 'Invalid geometry type (%) passed to TopoGeo_AddPolygon, expected POLYGON', geometrytype(apoly); + END IF; + + -- Get tolerance, if 0 was given + tol := COALESCE( NULLIF(tolerance, 0), topology._st_mintolerance(atopology, apoly) ); + + -- 1. Extract boundary + boundary := ST_Boundary(apoly); +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Boundary: %', ST_AsText(boundary); +#endif + + -- 2. Add boundaries as edges + FOR rec IN SELECT (ST_Dump(boundary)).geom LOOP + edges := array_cat(edges, array_agg(x)) FROM ( select topology.TopoGeo_addLinestring(atopology, rec.geom, tol) as x ) as foo; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'New edges: %', edges; +#endif + END LOOP; + + -- 3. Find faces covered by input polygon + -- NOTE: potential snapping changed polygon edges + sql := 'SELECT DISTINCT f.face_id FROM ' || quote_ident(atopology) + || '.face f WHERE f.mbr && ' + || quote_literal(apoly::text) + || '::geometry'; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG '%', sql; +#endif + FOR rec IN EXECUTE sql LOOP + -- check for actual containment + fgeom := ST_PointOnSurface(ST_GetFaceGeometry(atopology, rec.face_id)); + IF NOT ST_Covers(apoly, fgeom) THEN +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Face % not covered by input polygon', rec.face_id; +#endif + CONTINUE; + END IF; + RETURN NEXT rec.face_id; + END LOOP; + +END +$$ +LANGUAGE 'plpgsql'; +--} TopoGeo_AddPolygon + +--{ +-- TopoGeo_AddGeometry(toponame, geom, tolerance) +-- +-- Add a Geometry into a topology +-- +CREATE OR REPLACE FUNCTION topology.TopoGeo_AddGeometry(atopology varchar, ageom geometry, tolerance float8 DEFAULT 0) + RETURNS void AS +$$ +DECLARE +BEGIN + RAISE EXCEPTION 'TopoGeo_AddGeometry not implemented yet'; +END +$$ +LANGUAGE 'plpgsql'; +--} TopoGeo_AddGeometry diff -Nru postgis-1.5.3/topology/sql/predicates.sql.in.c postgis-2.0.1/topology/sql/predicates.sql.in.c --- postgis-1.5.3/topology/sql/predicates.sql.in.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/sql/predicates.sql.in.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,516 @@ +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- +-- PostGIS - Spatial Types for PostgreSQL +-- http://postgis.refractions.net +-- +-- Copyright (C) 2011-2012 Sandro Santilli +-- Copyright (C) 2005 Refractions Research Inc. +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +-- +-- Author: Sandro Santilli +-- +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- +-- Overloaded spatial predicates for TopoGeometry inputs +-- +-- FUNCTION intersects(TopoGeometry, TopoGeometry) +-- FUNCTION equals(TopoGeometry, TopoGeometry) +-- +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +--{ +-- intersects(TopoGeometry, TopoGeometry) +-- +CREATE OR REPLACE FUNCTION topology.intersects(tg1 topology.TopoGeometry, tg2 topology.TopoGeometry) + RETURNS bool +AS +$$ +DECLARE + tgbuf topology.TopoGeometry; + rec RECORD; + toponame varchar; + query text; +BEGIN + IF tg1.topology_id != tg2.topology_id THEN + -- TODO: revert to ::geometry instead ? + RAISE EXCEPTION 'Cannot compute intersection between TopoGeometries from different topologies'; + END IF; + + -- Order TopoGeometries so that tg1 has less-or-same + -- dimensionality of tg1 (point,line,polygon,collection) + IF tg1.type > tg2.type THEN + tgbuf := tg2; + tg2 := tg1; + tg1 := tgbuf; + END IF; + + --RAISE NOTICE 'tg1.id:% tg2.id:%', tg1.id, tg2.id; + -- Geometry collection are not currently supported + IF tg2.type = 4 THEN + RAISE EXCEPTION 'GeometryCollection are not supported by intersects()'; + END IF; + + -- Get topology name + SELECT name FROM topology.topology into toponame + WHERE id = tg1.topology_id; + + -- Hierarchical TopoGeometries are not currently supported + query = 'SELECT level FROM topology.layer' + || ' WHERE ' + || ' topology_id = ' || tg1.topology_id + || ' AND ' + || '( layer_id = ' || tg1.layer_id + || ' OR layer_id = ' || tg2.layer_id + || ' ) ' + || ' AND level > 0 '; + + --RAISE NOTICE '%', query; + + FOR rec IN EXECUTE query + LOOP + -- TODO: revert to ::geometry instead ? + RAISE EXCEPTION 'Hierarchical TopoGeometries are not currently supported by intersects()'; + END LOOP; + + IF tg1.type = 1 THEN -- [multi]point + + + IF tg2.type = 1 THEN -- point/point + --------------------------------------------------------- + -- + -- Two [multi]point features intersect if they share + -- any Node + -- + -- + -- + query = + 'SELECT a.topogeo_id FROM ' + || quote_ident(toponame) || + '.relation a, ' + || quote_ident(toponame) || + '.relation b ' + || 'WHERE a.layer_id = ' || tg1.layer_id + || ' AND b.layer_id = ' || tg2.layer_id + || ' AND a.topogeo_id = ' || tg1.id + || ' AND b.topogeo_id = ' || tg2.id + || ' AND a.element_id = b.element_id ' + || ' LIMIT 1'; + --RAISE NOTICE '%', query; + FOR rec IN EXECUTE query + LOOP + RETURN TRUE; -- they share an element + END LOOP; + RETURN FALSE; -- no elements shared + -- + --------------------------------------------------------- + + + ELSIF tg2.type = 2 THEN -- point/line + --------------------------------------------------------- + -- + -- A [multi]point intersects a [multi]line if they share + -- any Node. + -- + -- + -- + query = + 'SELECT a.topogeo_id FROM ' + || quote_ident(toponame) || + '.relation a, ' + || quote_ident(toponame) || + '.relation b, ' + || quote_ident(toponame) || + '.edge_data e ' + || 'WHERE a.layer_id = ' || tg1.layer_id + || ' AND b.layer_id = ' || tg2.layer_id + || ' AND a.topogeo_id = ' || tg1.id + || ' AND b.topogeo_id = ' || tg2.id + || ' AND abs(b.element_id) = e.edge_id ' + || ' AND ( ' + || ' e.start_node = a.element_id ' + || ' OR ' + || ' e.end_node = a.element_id ' + || ' )' + || ' LIMIT 1'; + --RAISE NOTICE '%', query; + FOR rec IN EXECUTE query + LOOP + RETURN TRUE; -- they share an element + END LOOP; + RETURN FALSE; -- no elements shared + -- + --------------------------------------------------------- + + ELSIF tg2.type = 3 THEN -- point/polygon + --------------------------------------------------------- + -- + -- A [multi]point intersects a [multi]polygon if any + -- Node of the point is contained in any face of the + -- polygon OR ( is end_node or start_node of any edge + -- of any polygon face ). + -- + -- We assume the Node-in-Face check is faster becasue + -- there will be less Faces then Edges in any polygon. + -- + -- + -- + -- + -- Check if any node is contained in a face + query = + 'SELECT n.node_id as id FROM ' + || quote_ident(toponame) || + '.relation r1, ' + || quote_ident(toponame) || + '.relation r2, ' + || quote_ident(toponame) || + '.node n ' + || 'WHERE r1.layer_id = ' || tg1.layer_id + || ' AND r2.layer_id = ' || tg2.layer_id + || ' AND r1.topogeo_id = ' || tg1.id + || ' AND r2.topogeo_id = ' || tg2.id + || ' AND n.node_id = r1.element_id ' + || ' AND r2.element_id = n.containing_face ' + || ' LIMIT 1'; + --RAISE NOTICE '%', query; + FOR rec IN EXECUTE query + LOOP + --RAISE NOTICE 'Node % in polygon face', rec.id; + RETURN TRUE; -- one (or more) nodes are + -- contained in a polygon face + END LOOP; + + -- Check if any node is start or end of any polygon + -- face edge + query = + 'SELECT n.node_id as nid, e.edge_id as eid ' + || ' FROM ' + || quote_ident(toponame) || + '.relation r1, ' + || quote_ident(toponame) || + '.relation r2, ' + || quote_ident(toponame) || + '.edge_data e, ' + || quote_ident(toponame) || + '.node n ' + || 'WHERE r1.layer_id = ' || tg1.layer_id + || ' AND r2.layer_id = ' || tg2.layer_id + || ' AND r1.topogeo_id = ' || tg1.id + || ' AND r2.topogeo_id = ' || tg2.id + || ' AND n.node_id = r1.element_id ' + || ' AND ( ' + || ' e.left_face = r2.element_id ' + || ' OR ' + || ' e.right_face = r2.element_id ' + || ' ) ' + || ' AND ( ' + || ' e.start_node = r1.element_id ' + || ' OR ' + || ' e.end_node = r1.element_id ' + || ' ) ' + || ' LIMIT 1'; + --RAISE NOTICE '%', query; + FOR rec IN EXECUTE query + LOOP + --RAISE NOTICE 'Node % on edge % bound', rec.nid, rec.eid; + RETURN TRUE; -- one node is start or end + -- of a face edge + END LOOP; + + RETURN FALSE; -- no intersection + -- + --------------------------------------------------------- + + ELSIF tg2.type = 4 THEN -- point/collection + RAISE EXCEPTION 'Intersection point/collection not implemented yet'; + + ELSE + RAISE EXCEPTION 'Invalid TopoGeometry type', tg2.type; + END IF; + + ELSIF tg1.type = 2 THEN -- [multi]line + IF tg2.type = 2 THEN -- line/line + --------------------------------------------------------- + -- + -- A [multi]line intersects a [multi]line if they share + -- any Node. + -- + -- + -- + query = + 'SELECT e1.start_node FROM ' + || quote_ident(toponame) || + '.relation r1, ' + || quote_ident(toponame) || + '.relation r2, ' + || quote_ident(toponame) || + '.edge_data e1, ' + || quote_ident(toponame) || + '.edge_data e2 ' + || 'WHERE r1.layer_id = ' || tg1.layer_id + || ' AND r2.layer_id = ' || tg2.layer_id + || ' AND r1.topogeo_id = ' || tg1.id + || ' AND r2.topogeo_id = ' || tg2.id + || ' AND abs(r1.element_id) = e1.edge_id ' + || ' AND abs(r2.element_id) = e2.edge_id ' + || ' AND ( ' + || ' e1.start_node = e2.start_node ' + || ' OR ' + || ' e1.start_node = e2.end_node ' + || ' OR ' + || ' e1.end_node = e2.start_node ' + || ' OR ' + || ' e1.end_node = e2.end_node ' + || ' )' + || ' LIMIT 1'; + --RAISE NOTICE '%', query; + FOR rec IN EXECUTE query + LOOP + RETURN TRUE; -- they share an element + END LOOP; + RETURN FALSE; -- no elements shared + -- + --------------------------------------------------------- + + ELSIF tg2.type = 3 THEN -- line/polygon + --------------------------------------------------------- + -- + -- A [multi]line intersects a [multi]polygon if they share + -- any Node (touch-only case), or if any line edge has any + -- polygon face on the left or right (full-containment case + -- + edge crossing case). + -- + -- + -- E1 are line edges, E2 are polygon edges + -- R1 are line relations. + -- R2 are polygon relations. + -- R2.element_id are FACE ids + query = + 'SELECT e1.edge_id' + || ' FROM ' + || quote_ident(toponame) || + '.relation r1, ' + || quote_ident(toponame) || + '.relation r2, ' + || quote_ident(toponame) || + '.edge_data e1, ' + || quote_ident(toponame) || + '.edge_data e2 ' + || 'WHERE r1.layer_id = ' || tg1.layer_id + || ' AND r2.layer_id = ' || tg2.layer_id + || ' AND r1.topogeo_id = ' || tg1.id + || ' AND r2.topogeo_id = ' || tg2.id + + -- E1 are line edges + || ' AND e1.edge_id = abs(r1.element_id) ' + + -- E2 are face edges + || ' AND ( e2.left_face = r2.element_id ' + || ' OR e2.right_face = r2.element_id ) ' + + || ' AND ( ' + + -- Check if E1 have left-or-right face + -- being part of R2.element_id + || ' e1.left_face = r2.element_id ' + || ' OR ' + || ' e1.right_face = r2.element_id ' + + -- Check if E1 share start-or-end node + -- with any E2. + || ' OR ' + || ' e1.start_node = e2.start_node ' + || ' OR ' + || ' e1.start_node = e2.end_node ' + || ' OR ' + || ' e1.end_node = e2.start_node ' + || ' OR ' + || ' e1.end_node = e2.end_node ' + + || ' ) ' + + || ' LIMIT 1'; + --RAISE NOTICE '%', query; + FOR rec IN EXECUTE query + LOOP + RETURN TRUE; -- either common node + -- or edge-in-face + END LOOP; + + RETURN FALSE; -- no intersection + -- + --------------------------------------------------------- + + ELSIF tg2.type = 4 THEN -- line/collection + RAISE EXCEPTION 'Intersection line/collection not implemented yet', tg1.type, tg2.type; + + ELSE + RAISE EXCEPTION 'Invalid TopoGeometry type', tg2.type; + END IF; + + + ELSIF tg1.type = 3 THEN -- [multi]polygon + + IF tg2.type = 3 THEN -- polygon/polygon + --------------------------------------------------------- + -- + -- A [multi]polygon intersects a [multi]polygon if they share + -- any Node (touch-only case), or if any face edge has any of the + -- other polygon face on the left or right (full-containment case + -- + edge crossing case). + -- + -- + -- E1 are poly1 edges. + -- E2 are poly2 edges + -- R1 are poly1 relations. + -- R2 are poly2 relations. + -- R1.element_id are poly1 FACE ids + -- R2.element_id are poly2 FACE ids + query = + 'SELECT e1.edge_id' + || ' FROM ' + || quote_ident(toponame) || + '.relation r1, ' + || quote_ident(toponame) || + '.relation r2, ' + || quote_ident(toponame) || + '.edge_data e1, ' + || quote_ident(toponame) || + '.edge_data e2 ' + || 'WHERE r1.layer_id = ' || tg1.layer_id + || ' AND r2.layer_id = ' || tg2.layer_id + || ' AND r1.topogeo_id = ' || tg1.id + || ' AND r2.topogeo_id = ' || tg2.id + + -- E1 are poly1 edges + || ' AND ( e1.left_face = r1.element_id ' + || ' OR e1.right_face = r1.element_id ) ' + + -- E2 are poly2 edges + || ' AND ( e2.left_face = r2.element_id ' + || ' OR e2.right_face = r2.element_id ) ' + + || ' AND ( ' + + -- Check if any edge from a polygon face + -- has any of the other polygon face + -- on the left or right + || ' e1.left_face = r2.element_id ' + || ' OR ' + || ' e1.right_face = r2.element_id ' + || ' OR ' + || ' e2.left_face = r1.element_id ' + || ' OR ' + || ' e2.right_face = r1.element_id ' + + -- Check if E1 share start-or-end node + -- with any E2. + || ' OR ' + || ' e1.start_node = e2.start_node ' + || ' OR ' + || ' e1.start_node = e2.end_node ' + || ' OR ' + || ' e1.end_node = e2.start_node ' + || ' OR ' + || ' e1.end_node = e2.end_node ' + + || ' ) ' + + || ' LIMIT 1'; + --RAISE NOTICE '%', query; + FOR rec IN EXECUTE query + LOOP + RETURN TRUE; -- either common node + -- or edge-in-face + END LOOP; + + RETURN FALSE; -- no intersection + -- + --------------------------------------------------------- + + ELSIF tg2.type = 4 THEN -- polygon/collection + RAISE EXCEPTION 'Intersection poly/collection not implemented yet', tg1.type, tg2.type; + + ELSE + RAISE EXCEPTION 'Invalid TopoGeometry type', tg2.type; + END IF; + + ELSIF tg1.type = 4 THEN -- collection + IF tg2.type = 4 THEN -- collection/collection + RAISE EXCEPTION 'Intersection collection/collection not implemented yet', tg1.type, tg2.type; + ELSE + RAISE EXCEPTION 'Invalid TopoGeometry type', tg2.type; + END IF; + + ELSE + RAISE EXCEPTION 'Invalid TopoGeometry type %', tg1.type; + END IF; +END +$$ +LANGUAGE 'plpgsql' STABLE STRICT; +--} intersects(TopoGeometry, TopoGeometry) + +--{ +-- equals(TopoGeometry, TopoGeometry) +-- +CREATE OR REPLACE FUNCTION topology.equals(tg1 topology.TopoGeometry, tg2 topology.TopoGeometry) + RETURNS bool +AS +$$ +DECLARE + rec RECORD; + toponame varchar; + query text; +BEGIN + + IF tg1.topology_id != tg2.topology_id THEN + -- TODO: revert to ::geometry instead ? + RAISE EXCEPTION 'Cannot compare TopoGeometries from different topologies'; + END IF; + + -- Not the same type, not equal + IF tg1.type != tg2.type THEN + RETURN FALSE; + END IF; + + -- Geometry collection are not currently supported + IF tg2.type = 4 THEN + RAISE EXCEPTION 'GeometryCollection are not supported by equals()'; + END IF; + + -- Get topology name + SELECT name FROM topology.topology into toponame + WHERE id = tg1.topology_id; + + -- Two geometries are equal if they are composed by + -- the same TopoElements + FOR rec IN EXECUTE 'SELECT * FROM ' + || ' topology.GetTopoGeomElements(' + || quote_literal(toponame) || ', ' + || tg1.layer_id || ',' || tg1.id || ') ' + || ' EXCEPT SELECT * FROM ' + || ' topology.GetTopogeomElements(' + || quote_literal(toponame) || ', ' + || tg2.layer_id || ',' || tg2.id || ');' + LOOP + RETURN FALSE; + END LOOP; + + FOR rec IN EXECUTE 'SELECT * FROM ' + || ' topology.GetTopoGeomElements(' + || quote_literal(toponame) || ', ' + || tg2.layer_id || ',' || tg2.id || ')' + || ' EXCEPT SELECT * FROM ' + || ' topology.GetTopogeomElements(' + || quote_literal(toponame) || ', ' + || tg1.layer_id || ',' || tg1.id || '); ' + LOOP + RETURN FALSE; + END LOOP; + RETURN TRUE; +END +$$ +LANGUAGE 'plpgsql' STABLE STRICT; +--} equals(TopoGeometry, TopoGeometry) + diff -Nru postgis-1.5.3/topology/sql/query/GetNodeEdges.sql.in.c postgis-2.0.1/topology/sql/query/GetNodeEdges.sql.in.c --- postgis-1.5.3/topology/sql/query/GetNodeEdges.sql.in.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/sql/query/GetNodeEdges.sql.in.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,63 @@ +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- +-- PostGIS - Spatial Types for PostgreSQL +-- http://postgis.refractions.net +-- +-- Copyright (C) 2012 Sandro Santilli +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +-- +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +--{ +-- +-- Return a list of edges (sequence, id) incident to the given node. +-- +-- Edge ids are signed, they are negative if the node is their endpoint. +-- Sequence numbers start with 1 ordering edges by azimuth (clockwise). +-- +-- GetNodeEdges(atopology, anode) +-- +CREATE OR REPLACE FUNCTION topology.GetNodeEdges(atopology varchar, anode int) + RETURNS SETOF topology.GetFaceEdges_ReturnType +AS +$$ +DECLARE + curedge int; + nextedge int; + rec RECORD; + retrec topology.GetFaceEdges_ReturnType; + n int; + sql text; +BEGIN + + n := 0; + sql := + 'WITH incident_edges AS ( SELECT edge_id, start_node, end_node, ST_RemoveRepeatedPoints(geom) as geom FROM ' + || quote_ident(atopology) + || '.edge_data WHERE start_node = ' || anode + || ' or end_node = ' || anode + || ') SELECT edge_id, ST_Azimuth(ST_StartPoint(geom), ST_PointN(geom, 2)) as az FROM incident_edges WHERE start_node = ' || anode + || ' UNION ALL SELECT -edge_id, ST_Azimuth(ST_EndPoint(geom), ST_PointN(geom, ST_NumPoints(geom)-1)) FROM incident_edges WHERE end_node = ' || anode + || ' ORDER BY az'; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'sql: %', sql; +#endif + + FOR rec IN EXECUTE sql + LOOP -- incident edges { + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Edge:% az:%', rec.edge_id, rec.az; +#endif + n := n + 1; + retrec.sequence := n; + retrec.edge := rec.edge_id; + RETURN NEXT retrec; + END LOOP; -- incident edges } + +END +$$ +LANGUAGE 'plpgsql' STABLE; +--} GetRingEdges diff -Nru postgis-1.5.3/topology/sql/query/GetRingEdges.sql.in.c postgis-2.0.1/topology/sql/query/GetRingEdges.sql.in.c --- postgis-1.5.3/topology/sql/query/GetRingEdges.sql.in.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/sql/query/GetRingEdges.sql.in.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,105 @@ +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- +-- PostGIS - Spatial Types for PostgreSQL +-- http://postgis.refractions.net +-- +-- Copyright (C) 2011 Sandro Santilli +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +-- +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- +-- Developed by Sandro Santilli +-- for Faunalia (http://www.faunalia.it) with funding from +-- Regione Toscana - Sistema Informativo per la Gestione del Territorio +-- e dell' Ambiente [RT-SIGTA]. +-- For the project: "Sviluppo strumenti software per il trattamento di dati +-- geografici basati su QuantumGIS e Postgis (CIG 0494241492)" +-- +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +--{ +-- +-- Return a list of edges (sequence, id) resulting by starting from the +-- given edge and following the leftmost turn at each encountered node. +-- +-- Edge ids are signed, they are negative if traversed backward. +-- Sequence numbers start with 1. +-- +-- Use a negative starting_edge to follow its rigth face rather than +-- left face (to start traversing it in reverse). +-- +-- Optionally pass a limit on the number of edges to traverse. This is a +-- safety measure against not-properly linked topologies, where you may +-- end up looping forever (single edge loops edge are detected but longer +-- ones are not). Default is no limit (good luck!) +-- +-- GetRingEdges(atopology, anedge, [maxedges]) +-- +CREATE OR REPLACE FUNCTION topology.GetRingEdges(atopology varchar, anedge int, maxedges int DEFAULT null) + RETURNS SETOF topology.GetFaceEdges_ReturnType +AS +$$ +DECLARE + curedge int; + nextedge int; + rec RECORD; + bounds geometry; + retrec topology.GetFaceEdges_ReturnType; + n int; + sql text; +BEGIN + + curedge := anedge; + n := 1; + + WHILE true LOOP + sql := 'SELECT edge_id, next_left_edge, next_right_edge FROM ' + || quote_ident(atopology) || '.edge_data WHERE edge_id = ' + || abs(curedge); + EXECUTE sql INTO rec; + retrec.sequence := n; + retrec.edge := curedge; + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Edge:% left:% right:%', + curedge, rec.next_left_edge, rec.next_right_edge; +#endif + + RETURN NEXT retrec; + + IF curedge < 0 THEN + nextedge := rec.next_right_edge; + ELSE + nextedge := rec.next_left_edge; + END IF; + + IF nextedge = anedge THEN +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG ' finish'; +#endif + RETURN; + END IF; + + IF nextedge = curedge THEN + RAISE EXCEPTION 'Detected bogus loop traversing edge %', curedge; + END IF; + + curedge := nextedge; + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG ' curedge:% anedge:%', curedge, anedge; +#endif + + n := n + 1; + + IF n > maxedges THEN + RAISE EXCEPTION 'Max traversing limit hit: %', maxedges; + END IF; + END LOOP; + +END +$$ +LANGUAGE 'plpgsql' STABLE; +--} GetRingEdges diff -Nru postgis-1.5.3/topology/sql/query/getedgebypoint.sql.in.c postgis-2.0.1/topology/sql/query/getedgebypoint.sql.in.c --- postgis-1.5.3/topology/sql/query/getedgebypoint.sql.in.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/sql/query/getedgebypoint.sql.in.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,91 @@ +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- +-- PostGIS - Spatial Types for PostgreSQL +-- http://postgis.refractions.net +-- +-- Copyright (C) 2011 Andrea Peri +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +-- +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +--{ +-- +-- Andrea Peri (19 Jan 2011) creation +-- Andrea Peri (14 Feb 2011) minor issues +-- +-- GetEdgeByPoint(atopology, point, tol) +-- +-- Retrieve an Edge ID given a POINT and a tolerance +-- tolerance = 0 mean exactly intersection +-- +-- Returns return the integer ID if there is an edge on the Point. +-- +-- When the Point is even a Node it raise an exception. +-- This case is testable with the GetNodeByPoint(atopology, apoint, tol) +-- +-- If there isn't any edge in the Point, GetEdgeByPoint return 0. +-- +-- if near the point there are two or more edges it throw an exception. +-- +CREATE OR REPLACE FUNCTION topology.GetEdgeByPoint(atopology varchar, apoint geometry, tol1 float8) + RETURNS int +AS +$$ +DECLARE + sql text; + idedge int; +BEGIN + -- + -- Atopology and apoint are required + -- + IF atopology IS NULL OR apoint IS NULL THEN + RAISE EXCEPTION 'Invalid null argument'; + END IF; + + -- + -- Apoint must be a point + -- + IF substring(geometrytype(apoint), 1, 5) != 'POINT' + THEN + RAISE EXCEPTION 'Node geometry must be a point'; + END IF; + + -- + -- Tolerance must be >= 0 + -- + IF tol1 < 0 + THEN + RAISE EXCEPTION 'Tolerance must be >=0'; + END IF; + + + if tol1 = 0 then + sql := 'SELECT a.edge_id FROM ' + || quote_ident(atopology) + || '.edge_data as a WHERE ' + || '(a.geom && ' || quote_literal(apoint::text)||'::geometry) ' + || ' AND (ST_Intersects(a.geom,' || quote_literal(apoint::text)||'::geometry) );'; + else + sql := 'SELECT a.edge_id FROM ' + || quote_ident(atopology) + || '.edge_data as a WHERE ' + || '(ST_DWithin(a.geom,' || quote_literal(apoint::text)||'::geometry,' || tol1::text || ') );'; + end if; + + BEGIN + EXECUTE sql INTO STRICT idedge; + EXCEPTION + WHEN NO_DATA_FOUND THEN + idedge = 0; + WHEN TOO_MANY_ROWS THEN + RAISE EXCEPTION 'Two or more edges found'; + END; + + RETURN idedge; + +END +$$ +LANGUAGE 'plpgsql' STABLE STRICT; +--} GetEdgeByPoint diff -Nru postgis-1.5.3/topology/sql/query/getfacebypoint.sql.in.c postgis-2.0.1/topology/sql/query/getfacebypoint.sql.in.c --- postgis-1.5.3/topology/sql/query/getfacebypoint.sql.in.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/sql/query/getfacebypoint.sql.in.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,158 @@ +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- +-- PostGIS - Spatial Types for PostgreSQL +-- http://postgis.refractions.net +-- +-- Copyright (C) 2011 Andrea Peri +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +-- +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +--{ +-- +-- Andrea Peri (27 Feb 2011) creation +-- +-- GetFaceByPoint(atopology, point, tol) +-- +-- Retrieve a Face ID given a POINT and a tolerance +-- tolerance = 0 mean exactly intersection +-- +-- Returns return the integer ID if there is a face on the Point. +-- +-- When the Point is even a Node it raise an exception. +-- This case is testable with the GetNodeByPoint(atopology, apoint, tol) +-- +-- If there isn't any face in the Point, GetFaceByPoint return 0. +-- +-- if near the point there are two or more faces it throw an exception. +-- +CREATE OR REPLACE FUNCTION topology.GetFaceByPoint(atopology varchar, apoint geometry, tol1 float8) + RETURNS int +AS +$$ +DECLARE + sql text; + idface int; +BEGIN + + idface := -1; + + -- + -- Atopology and apoint are required + -- + IF atopology IS NULL OR apoint IS NULL THEN + RAISE EXCEPTION 'Invalid null argument'; + END IF; + + -- + -- Apoint must be a point + -- + IF substring(geometrytype(apoint), 1, 5) != 'POINT' + THEN + RAISE EXCEPTION 'Node geometry must be a point'; + END IF; + + -- + -- Tolerance must be >= 0 + -- + IF tol1 < 0 + THEN + RAISE EXCEPTION 'Tolerance must be >=0'; + END IF; + -- + -- first test is to check if there is inside an mbr + -- + if tol1 = 0 then + sql := 'SELECT a.face_id FROM ' + || quote_ident(atopology) + || '.face as a WHERE ' + || '(a.mbr && ' || quote_literal(apoint::text)||'::geometry) ' + || 'LIMIT 1;'; + else + sql := 'SELECT a.face_id FROM ' + || quote_ident(atopology) + || '.face as a WHERE ' + || '(ST_DWithin(a.mbr,' || quote_literal(apoint::text)||'::geometry,' || tol1::text || ') ) ' + || 'LIMIT 1;'; + end if; + + BEGIN + EXECUTE sql INTO STRICT idface; + EXCEPTION + WHEN NO_DATA_FOUND THEN + idface = 0; + END; + + if idface > 0 then + -- + -- probably there is something so now check the exact test + -- + + if tol1 = 0 then + sql := 'SELECT e.face_id FROM (' + || 'SELECT d.face_id,ST_BuildArea(ST_Union(geom)) as geom FROM (' + || 'SELECT b.edge_id as edge_id,b.left_face as face_id,b.geom as geom FROM ' + || quote_ident(atopology) || '.edge_data as b,' + || '(SELECT a.face_id FROM ' + || quote_ident(atopology) || '.face as a ' + || 'WHERE ST_Intersects(a.mbr,' || quote_literal(apoint::text)||'::geometry)=true' + || ') as c ' + || 'WHERE (b.left_face = c.face_id) ' + || ' UNION ALL ' + || 'SELECT b.edge_id as edge_id, b.right_face as face_id, b.geom as geom FROM ' + || quote_ident(atopology) || '.edge_data as b,' + || '(SELECT a.face_id FROM ' + || quote_ident(atopology) || '.face as a ' + || 'WHERE ST_Intersects(a.mbr,' || quote_literal(apoint::text)||'::geometry)=true' + || ') as c ' + || 'WHERE (b.right_face = c.face_id) ' + || ') as d ' + || 'GROUP BY face_id ' + || ') as e ' + || 'WHERE ST_Intersects(e.geom, ' || quote_literal(apoint::text)||'::geometry)=true;'; + else + sql := 'SELECT e.face_id FROM (' + || 'SELECT d.face_id,ST_BuildArea(ST_Union(geom)) as geom FROM (' + || 'SELECT b.edge_id as edge_id,b.left_face as face_id,b.geom as geom FROM ' + || quote_ident(atopology) || '.edge_data as b,' + || '(SELECT a.face_id FROM ' + || quote_ident(atopology) || '.face as a ' + || 'WHERE ST_DWithin(a.mbr,' || quote_literal(apoint::text)||'::geometry,' || tol1::text || ')=true' + || ') as c ' + || 'WHERE (b.left_face = c.face_id) ' + || ' UNION ALL ' + || 'SELECT b.edge_id as edge_id, b.right_face as face_id, b.geom as geom FROM ' + || quote_ident(atopology) || '.edge_data as b,' + || '(SELECT a.face_id FROM ' + || quote_ident(atopology) || '.face as a ' + || 'WHERE ST_DWithin(a.mbr,' || quote_literal(apoint::text)||'::geometry,' || tol1::text || ')=true' + || ') as c ' + || 'WHERE (b.right_face = c.face_id) ' + || ') as d ' + || 'GROUP BY face_id ' + || ') as e ' + || 'WHERE ST_DWithin(e.geom, ' || quote_literal(apoint::text)||'::geometry,' || tol1::text || ')=true;'; + end if; + + RAISE DEBUG ' ==> %',sql; + + BEGIN + EXECUTE sql INTO STRICT idface; + EXCEPTION + WHEN NO_DATA_FOUND THEN + idface = 0; + WHEN TOO_MANY_ROWS THEN + RAISE EXCEPTION 'Two or more faces found'; + END; + + end if; + + RETURN idface; + +END +$$ +LANGUAGE 'plpgsql' STABLE STRICT; +--} GetFaceByPoint + diff -Nru postgis-1.5.3/topology/sql/query/getnodebypoint.sql.in.c postgis-2.0.1/topology/sql/query/getnodebypoint.sql.in.c --- postgis-1.5.3/topology/sql/query/getnodebypoint.sql.in.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/sql/query/getnodebypoint.sql.in.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,89 @@ +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- +-- PostGIS - Spatial Types for PostgreSQL +-- http://postgis.refractions.net +-- +-- Copyright (C) 2011 Andrea Peri +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +-- +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +-- { +-- +-- Andrea Peri (19 Jan 2011) creation +-- Andrea Peri (14 Feb 2011) minor issues +-- +-- getnodebypoint(atopology, point, tolerance) +-- +-- Retrieve a Node ID given a POINT and a tolerance +-- tolerance = 0 mean exactly intersection +-- +-- Returns the integer ID if there is a Node on the Point. +-- +-- If there isn't any node in the Point, GetNodeByPoint return 0. +-- +-- if near the point there are two or more nodes it throw an exception. +-- +CREATE OR REPLACE FUNCTION topology.GetNodeByPoint(atopology varchar, apoint geometry, tol1 float8) + RETURNS int +AS +$$ +DECLARE + sql text; + idnode int; +BEGIN + -- + -- Atopology and apoint are required + -- + IF atopology IS NULL OR apoint IS NULL THEN + RAISE EXCEPTION 'Invalid null argument'; + END IF; + + -- + -- Apoint must be a point + -- + IF substring(geometrytype(apoint), 1, 5) != 'POINT' + THEN + RAISE EXCEPTION 'Node geometry must be a point'; + END IF; + + -- + -- Tolerance must be >= 0 + -- + IF tol1 < 0 + THEN + RAISE EXCEPTION 'Tolerance must be >=0'; + END IF; + + + if tol1 = 0 then + sql := 'SELECT a.node_id FROM ' + || quote_ident(atopology) + || '.node as a WHERE ' + || '(a.geom && ' || quote_literal(apoint::text)||'::geometry) ' + || ' AND (ST_Intersects(a.geom,' || quote_literal(apoint::text)||'::geometry) );'; + else + sql := 'SELECT a.node_id FROM ' + || quote_ident(atopology) + || '.node as a WHERE ' + || '(ST_DWithin(a.geom,' || quote_literal(apoint::text)||'::geometry,' || tol1::text || ') );'; + end if; + + BEGIN + EXECUTE sql INTO STRICT idnode; + EXCEPTION + WHEN NO_DATA_FOUND THEN + idnode = 0; + WHEN TOO_MANY_ROWS THEN + RAISE EXCEPTION 'Two or more nodes found'; + END; + + RETURN idnode; + +END +$$ +LANGUAGE 'plpgsql' STABLE STRICT; +--} GetNodeByPoint + diff -Nru postgis-1.5.3/topology/sql/sqlmm.sql.in.c postgis-2.0.1/topology/sql/sqlmm.sql.in.c --- postgis-1.5.3/topology/sql/sqlmm.sql.in.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/sql/sqlmm.sql.in.c 2012-06-12 12:17:41.000000000 +0000 @@ -0,0 +1,4558 @@ +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- +-- PostGIS - Spatial Types for PostgreSQL +-- http://postgis.refractions.net +-- +-- Copyright (C) 2010, 2011, 2012 Sandro Santilli +-- Copyright (C) 2005 Refractions Research Inc. +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +-- +-- Author: Sandro Santilli +-- +-- + +/*#define POSTGIS_TOPOLOGY_DEBUG 1*/ + +--={ ---------------------------------------------------------------- +-- SQL/MM block +-- +-- This part contains function in the SQL/MM specification +-- +--------------------------------------------------------------------- + +-- +-- Type returned by ST_GetFaceEdges +-- +CREATE TYPE topology.GetFaceEdges_ReturnType AS ( + sequence integer, + edge integer +); + + +--{ +-- Topo-Geo and Topo-Net 3: Routine Details +-- X.3.5 +-- +-- ST_GetFaceEdges(atopology, aface) +-- +-- +-- +CREATE OR REPLACE FUNCTION topology.ST_GetFaceEdges(toponame varchar, face_id integer) + RETURNS SETOF topology.GetFaceEdges_ReturnType +AS +$$ +DECLARE + rec RECORD; + bounds geometry; + retrec topology.GetFaceEdges_ReturnType; + n int; + sql TEXT; +BEGIN + -- + -- toponame and face_id are required + -- + IF toponame IS NULL OR face_id IS NULL THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - null argument'; + END IF; + + IF toponame = '' THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - invalid topology name'; + END IF; + + n := 1; + + -- Construct the face geometry, then for each ring of each polygon: + sql := 'SELECT (ST_DumpRings((ST_Dump(ST_ForceRHR(' + || 'ST_BuildArea(ST_Collect(geom))))).geom)).geom FROM ' + || quote_ident(toponame) || '.edge_data WHERE left_face = ' + || face_id || ' OR right_face = ' || face_id; + FOR rec IN EXECUTE sql + LOOP -- { + + -- Find the edges constituting its boundary + bounds = ST_Boundary(rec.geom); + + + sql := 'WITH er2 AS ( ' + || 'WITH er AS ( SELECT ' + || 'min(e.edge_id) over (), count(*) over () as cnt, e.edge_id, ' + || 'ST_Line_Locate_Point(' + || quote_literal(bounds::text) + || ', ST_Line_Interpolate_Point(e.geom, 0.2)) as pos' + || ', ST_Line_Locate_Point(' + || quote_literal(bounds::text) + || ', ST_Line_Interpolate_Point(e.geom, 0.8)) as pos2 FROM ' + || quote_ident(toponame) + || '.edge e WHERE ( e.left_face = ' || face_id + || ' OR e.right_face = ' || face_id + || ') AND ST_Covers(' + || quote_literal(bounds::text) + || ', e.geom)'; + IF face_id = 0 THEN + sql := sql || ' ORDER BY POS ASC) '; + ELSE + sql := sql || ' ORDER BY POS DESC) '; + END IF; + + -- Reorder rows so to start with the one with smaller edge_id + sql := sql || 'SELECT row_number() over () - 1 as rn, * FROM er ) ' + || 'SELECT *, ( rn + cnt - ( select rn FROM er2 WHERE edge_id = min ) ) % cnt AS reord FROM er2 ORDER BY reord'; + + + --RAISE DEBUG 'SQL: %', sql; + + FOR rec IN EXECUTE sql + LOOP + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'rn:%, n:%, edg:%, cnt:%, min:%, reord:%', + rec.rn, n, rec.edge_id, rec.cnt, rec.min, rec.reord; +#endif + + retrec.sequence = n; + retrec.edge = rec.edge_id; + + IF face_id = 0 THEN + -- if this edge goes in opposite direction to the + -- ring bounds, make it with negative orientation + IF rec.pos2 < rec.pos THEN -- edge goes in opposite direction + retrec.edge = -retrec.edge; + END IF; + ELSE + -- if this edge goes in same direction to the + -- ring bounds, make it with negative orientation + IF rec.pos2 > rec.pos THEN -- edge goes in same direction + retrec.edge = -retrec.edge; + END IF; + END IF; + + RETURN NEXT retrec; + + n = n+1; + + END LOOP; + END LOOP; -- } + + RETURN; +EXCEPTION + WHEN INVALID_SCHEMA_NAME THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - invalid topology name'; +END +$$ +LANGUAGE 'plpgsql' STABLE; +--} ST_GetFaceEdges + +--{ +-- Topo-Geo and Topo-Net 3: Routine Details +-- X.3.10 +-- +-- ST_NewEdgeHeal(atopology, anedge, anotheredge) +-- +-- Not in the specs: +-- * Refuses to heal two edges if any of the two is closed +-- * Raise an exception when trying to heal an edge with itself +-- * Raise an exception if any TopoGeometry is defined by only one +-- of the two edges +-- * Update references in the Relation table. +-- +CREATE OR REPLACE FUNCTION topology.ST_NewEdgeHeal(toponame varchar, e1id integer, e2id integer) + RETURNS int +AS +$$ +DECLARE + e1rec RECORD; + e2rec RECORD; + rec RECORD; + newedgeid int; + commonnode int; + caseno int; + topoid int; + sql text; + e2sign int; + eidary int[]; +BEGIN + -- + -- toponame and face_id are required + -- + IF toponame IS NULL OR e1id IS NULL OR e2id IS NULL THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - null argument'; + END IF; + + -- NOT IN THE SPECS: see if the same edge is given twice.. + IF e1id = e2id THEN + RAISE EXCEPTION 'Cannot heal edge % with itself, try with another', e1id; + END IF; + + -- Get topology id + BEGIN + SELECT id FROM topology.topology + INTO STRICT topoid WHERE name = toponame; + EXCEPTION + WHEN NO_DATA_FOUND THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - invalid topology name'; + END; + + BEGIN + EXECUTE 'SELECT * FROM ' || quote_ident(toponame) + || '.edge_data WHERE edge_id = ' || e1id + INTO STRICT e1rec; + EXCEPTION + WHEN NO_DATA_FOUND THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - non-existent edge %', e1id; + WHEN INVALID_SCHEMA_NAME THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - invalid topology name'; + WHEN UNDEFINED_TABLE THEN + RAISE EXCEPTION 'corrupted topology "%" (missing edge_data table)', + toponame; + END; + + BEGIN + EXECUTE 'SELECT * FROM ' || quote_ident(toponame) + || '.edge_data WHERE edge_id = ' || e2id + INTO STRICT e2rec; + EXCEPTION + WHEN NO_DATA_FOUND THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - non-existent edge %', e2id; + -- NOTE: checks for INVALID_SCHEMA_NAME or UNDEFINED_TABLE done before + END; + + + -- NOT IN THE SPECS: See if any of the two edges are closed. + IF e1rec.start_node = e1rec.end_node THEN + RAISE EXCEPTION 'Edge % is closed, cannot heal to edge %', e1id, e2id; + END IF; + IF e2rec.start_node = e2rec.end_node THEN + RAISE EXCEPTION 'Edge % is closed, cannot heal to edge %', e2id, e1id; + END IF; + + -- Find common node + IF e1rec.end_node = e2rec.start_node THEN + commonnode = e1rec.end_node; + caseno = 1; + ELSIF e1rec.end_node = e2rec.end_node THEN + commonnode = e1rec.end_node; + caseno = 2; + ELSIF e1rec.start_node = e2rec.start_node THEN + commonnode = e1rec.start_node; + caseno = 3; + ELSIF e1rec.start_node = e2rec.end_node THEN + commonnode = e1rec.start_node; + caseno = 4; + ELSE + RAISE EXCEPTION 'SQL/MM Spatial exception - non-connected edges'; + END IF; + + -- Check if any other edge is connected to the common node + FOR rec IN EXECUTE 'SELECT edge_id FROM ' || quote_ident(toponame) + || '.edge_data WHERE ( edge_id != ' || e1id + || ' AND edge_id != ' || e2id || ') AND ( start_node = ' + || commonnode || ' OR end_node = ' || commonnode || ' )' + LOOP + RAISE EXCEPTION + 'SQL/MM Spatial exception - other edges connected (ie: %)', rec.edge_id; + END LOOP; + + -- NOT IN THE SPECS: + -- check if any topo_geom is defined only by one of the + -- input edges. In such case there would be no way to adapt + -- the definition in case of healing, so we'd have to bail out + eidary = ARRAY[e1id, e2id]; + sql := 'SELECT t.* from (' + || 'SELECT r.topogeo_id, r.layer_id' + || ', l.schema_name, l.table_name, l.feature_column' + || ', array_agg(abs(r.element_id)) as elems ' + || 'FROM topology.layer l INNER JOIN ' + || quote_ident(toponame) + || '.relation r ON (l.layer_id = r.layer_id) ' + || 'WHERE l.level = 0 AND l.feature_type = 2 ' + || ' AND l.topology_id = ' || topoid + || ' AND abs(r.element_id) IN (' || e1id || ',' || e2id || ') ' + || 'group by r.topogeo_id, r.layer_id, l.schema_name, l.table_name, ' + || ' l.feature_column ) t WHERE NOT t.elems @> ' + || quote_literal(eidary); + --RAISE DEBUG 'SQL: %', sql; + FOR rec IN EXECUTE sql LOOP + RAISE EXCEPTION 'TopoGeom % in layer % (%.%.%) cannot be represented healing edges % and %', + rec.topogeo_id, rec.layer_id, + rec.schema_name, rec.table_name, rec.feature_column, + e1id, e2id; + END LOOP; + + -- Create new edge { + rec := e1rec; + rec.geom = ST_LineMerge(ST_Collect(e1rec.geom, e2rec.geom)); + IF caseno = 1 THEN -- e1.end = e2.start + IF NOT ST_Equals(ST_StartPoint(rec.geom), ST_StartPoint(e1rec.geom)) THEN +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'caseno=1: LineMerge did not maintain startpoint'; +#endif + rec.geom = ST_Reverse(rec.geom); + END IF; + rec.end_node = e2rec.end_node; + rec.next_left_edge = e2rec.next_left_edge; + e2sign = 1; + ELSIF caseno = 2 THEN -- e1.end = e2.end + IF NOT ST_Equals(ST_StartPoint(rec.geom), ST_StartPoint(e1rec.geom)) THEN +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'caseno=2: LineMerge did not maintain startpoint'; +#endif + rec.geom = ST_Reverse(rec.geom); + END IF; + rec.end_node = e2rec.start_node; + rec.next_left_edge = e2rec.next_right_edge; + e2sign = -1; + ELSIF caseno = 3 THEN -- e1.start = e2.start + IF NOT ST_Equals(ST_EndPoint(rec.geom), ST_EndPoint(e1rec.geom)) THEN +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'caseno=4: LineMerge did not maintain endpoint'; +#endif + rec.geom = ST_Reverse(rec.geom); + END IF; + rec.start_node = e2rec.end_node; + rec.next_right_edge = e2rec.next_left_edge; + e2sign = -1; + ELSIF caseno = 4 THEN -- e1.start = e2.end + IF NOT ST_Equals(ST_EndPoint(rec.geom), ST_EndPoint(e1rec.geom)) THEN +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'caseno=4: LineMerge did not maintain endpoint'; +#endif + rec.geom = ST_Reverse(rec.geom); + END IF; + rec.start_node = e2rec.start_node; + rec.next_right_edge = e2rec.next_right_edge; + e2sign = 1; + END IF; + -- } + + -- Insert new edge { + EXECUTE 'SELECT nextval(' || quote_literal( + quote_ident(toponame) || '.edge_data_edge_id_seq' + ) || ')' INTO STRICT newedgeid; + EXECUTE 'INSERT INTO ' || quote_ident(toponame) + || '.edge VALUES(' || newedgeid + || ',' || rec.start_node + || ',' || rec.end_node + || ',' || rec.next_left_edge + || ',' || rec.next_right_edge + || ',' || rec.left_face + || ',' || rec.right_face + || ',' || quote_literal(rec.geom::text) + || ')'; + -- End of new edge insertion } + + -- Update next_left_edge/next_right_edge for + -- any edge having them still pointing at the edges being removed + -- (e2id) + -- + -- NOTE: + -- *(next_XXX_edge/e2id) serves the purpose of extracting existing + -- sign from the value, while *e2sign changes that sign again if we + -- reverted edge2 direction + -- + sql := 'UPDATE ' || quote_ident(toponame) + || '.edge_data SET abs_next_left_edge = ' || newedgeid + || ', next_left_edge = ' || e2sign*newedgeid + || '*(next_left_edge/' + || e2id || ') WHERE abs_next_left_edge = ' || e2id; + --RAISE DEBUG 'SQL: %', sql; + EXECUTE sql; + sql := 'UPDATE ' || quote_ident(toponame) + || '.edge_data SET abs_next_right_edge = ' || newedgeid + || ', next_right_edge = ' || e2sign*newedgeid + || '*(next_right_edge/' + || e2id || ') WHERE abs_next_right_edge = ' || e2id; + --RAISE DEBUG 'SQL: %', sql; + EXECUTE sql; + + -- New edge has the same direction as old edge 1 + sql := 'UPDATE ' || quote_ident(toponame) + || '.edge_data SET abs_next_left_edge = ' || newedgeid + || ', next_left_edge = ' || newedgeid + || '*(next_left_edge/' + || e1id || ') WHERE abs_next_left_edge = ' || e1id; + --RAISE DEBUG 'SQL: %', sql; + EXECUTE sql; + sql := 'UPDATE ' || quote_ident(toponame) + || '.edge_data SET abs_next_right_edge = ' || newedgeid + || ', next_right_edge = ' || newedgeid + || '*(next_right_edge/' + || e1id || ') WHERE abs_next_right_edge = ' || e1id; + --RAISE DEBUG 'SQL: %', sql; + EXECUTE sql; + + -- + -- NOT IN THE SPECS: + -- Replace composition rows involving the two + -- edges as one involving the new edge. + -- It takes a DELETE and an UPDATE to do all + sql := 'DELETE FROM ' || quote_ident(toponame) + || '.relation r USING topology.layer l ' + || 'WHERE l.level = 0 AND l.feature_type = 2' + || ' AND l.topology_id = ' || topoid + || ' AND l.layer_id = r.layer_id AND abs(r.element_id) = ' + || e2id; + --RAISE DEBUG 'SQL: %', sql; + EXECUTE sql; + sql := 'UPDATE ' || quote_ident(toponame) + || '.relation r ' + || ' SET element_id = ' || newedgeid || '*(element_id/' + || e1id + || ') FROM topology.layer l WHERE l.level = 0 AND l.feature_type = 2' + || ' AND l.topology_id = ' || topoid + || ' AND l.layer_id = r.layer_id AND abs(r.element_id) = ' + || e1id + ; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'SQL: %', sql; +#endif + EXECUTE sql; + + + -- Delete both edges + EXECUTE 'DELETE FROM ' || quote_ident(toponame) + || '.edge_data WHERE edge_id = ' || e2id; + EXECUTE 'DELETE FROM ' || quote_ident(toponame) + || '.edge_data WHERE edge_id = ' || e1id; + + -- Delete the common node + BEGIN + EXECUTE 'DELETE FROM ' || quote_ident(toponame) + || '.node WHERE node_id = ' || commonnode; + EXCEPTION + WHEN UNDEFINED_TABLE THEN + RAISE EXCEPTION 'corrupted topology "%" (missing node table)', + toponame; + END; + + RETURN newedgeid; +END +$$ +LANGUAGE 'plpgsql' VOLATILE; +--} ST_NewEdgeHeal + +--{ +-- Topo-Geo and Topo-Net 3: Routine Details +-- X.3.11 +-- +-- ST_ModEdgeHeal(atopology, anedge, anotheredge) +-- +-- Not in the specs: +-- * Returns the id of the node being removed +-- * Refuses to heal two edges if any of the two is closed +-- * Raise an exception when trying to heal an edge with itself +-- * Raise an exception if any TopoGeometry is defined by only one +-- of the two edges +-- * Update references in the Relation table. +-- +CREATE OR REPLACE FUNCTION topology.ST_ModEdgeHeal(toponame varchar, e1id integer, e2id integer) + RETURNS int +AS +$$ +DECLARE + e1rec RECORD; + e2rec RECORD; + rec RECORD; + commonnode int; + caseno int; + topoid int; + sql text; + e2sign int; + eidary int[]; +BEGIN + -- + -- toponame and face_id are required + -- + IF toponame IS NULL OR e1id IS NULL OR e2id IS NULL THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - null argument'; + END IF; + + -- NOT IN THE SPECS: see if the same edge is given twice.. + IF e1id = e2id THEN + RAISE EXCEPTION 'Cannot heal edge % with itself, try with another', e1id; + END IF; + + -- Get topology id + BEGIN + SELECT id FROM topology.topology + INTO STRICT topoid WHERE name = toponame; + EXCEPTION + WHEN NO_DATA_FOUND THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - invalid topology name'; + END; + + BEGIN + EXECUTE 'SELECT * FROM ' || quote_ident(toponame) + || '.edge_data WHERE edge_id = ' || e1id + INTO STRICT e1rec; + EXCEPTION + WHEN NO_DATA_FOUND THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - non-existent edge %', e1id; + WHEN INVALID_SCHEMA_NAME THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - invalid topology name'; + WHEN UNDEFINED_TABLE THEN + RAISE EXCEPTION 'corrupted topology "%" (missing edge_data table)', + toponame; + END; + + BEGIN + EXECUTE 'SELECT * FROM ' || quote_ident(toponame) + || '.edge_data WHERE edge_id = ' || e2id + INTO STRICT e2rec; + EXCEPTION + WHEN NO_DATA_FOUND THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - non-existent edge %', e2id; + -- NOTE: checks for INVALID_SCHEMA_NAME or UNDEFINED_TABLE done before + END; + + + -- NOT IN THE SPECS: See if any of the two edges are closed. + IF e1rec.start_node = e1rec.end_node THEN + RAISE EXCEPTION 'Edge % is closed, cannot heal to edge %', e1id, e2id; + END IF; + IF e2rec.start_node = e2rec.end_node THEN + RAISE EXCEPTION 'Edge % is closed, cannot heal to edge %', e2id, e1id; + END IF; + + -- Find common node + IF e1rec.end_node = e2rec.start_node THEN + commonnode = e1rec.end_node; + caseno = 1; + ELSIF e1rec.end_node = e2rec.end_node THEN + commonnode = e1rec.end_node; + caseno = 2; + ELSIF e1rec.start_node = e2rec.start_node THEN + commonnode = e1rec.start_node; + caseno = 3; + ELSIF e1rec.start_node = e2rec.end_node THEN + commonnode = e1rec.start_node; + caseno = 4; + ELSE + RAISE EXCEPTION 'SQL/MM Spatial exception - non-connected edges'; + END IF; + + -- Check if any other edge is connected to the common node + FOR rec IN EXECUTE 'SELECT edge_id FROM ' || quote_ident(toponame) + || '.edge_data WHERE ( edge_id != ' || e1id + || ' AND edge_id != ' || e2id || ') AND ( start_node = ' + || commonnode || ' OR end_node = ' || commonnode || ' )' + LOOP + RAISE EXCEPTION + 'SQL/MM Spatial exception - other edges connected (ie: %)', rec.edge_id; + END LOOP; + + -- NOT IN THE SPECS: + -- check if any topo_geom is defined only by one of the + -- input edges. In such case there would be no way to adapt + -- the definition in case of healing, so we'd have to bail out + eidary = ARRAY[e1id, e2id]; + sql := 'SELECT t.* from (' + || 'SELECT r.topogeo_id, r.layer_id' + || ', l.schema_name, l.table_name, l.feature_column' + || ', array_agg(abs(r.element_id)) as elems ' + || 'FROM topology.layer l INNER JOIN ' + || quote_ident(toponame) + || '.relation r ON (l.layer_id = r.layer_id) ' + || 'WHERE l.level = 0 AND l.feature_type = 2 ' + || ' AND l.topology_id = ' || topoid + || ' AND abs(r.element_id) IN (' || e1id || ',' || e2id || ') ' + || 'group by r.topogeo_id, r.layer_id, l.schema_name, l.table_name, ' + || ' l.feature_column ) t WHERE NOT t.elems @> ' + || quote_literal(eidary); + --RAISE DEBUG 'SQL: %', sql; + FOR rec IN EXECUTE sql LOOP + RAISE EXCEPTION 'TopoGeom % in layer % (%.%.%) cannot be represented healing edges % and %', + rec.topogeo_id, rec.layer_id, + rec.schema_name, rec.table_name, rec.feature_column, + e1id, e2id; + END LOOP; + + -- Update data of the first edge { + rec := e1rec; + rec.geom = ST_LineMerge(ST_Collect(e1rec.geom, e2rec.geom)); + IF caseno = 1 THEN -- e1.end = e2.start + IF NOT ST_Equals(ST_StartPoint(rec.geom), ST_StartPoint(e1rec.geom)) THEN +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'caseno=1: LineMerge did not maintain startpoint'; +#endif + rec.geom = ST_Reverse(rec.geom); + END IF; + rec.end_node = e2rec.end_node; + rec.next_left_edge = e2rec.next_left_edge; + e2sign = 1; + ELSIF caseno = 2 THEN -- e1.end = e2.end + IF NOT ST_Equals(ST_StartPoint(rec.geom), ST_StartPoint(e1rec.geom)) THEN +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'caseno=2: LineMerge did not maintain startpoint'; +#endif + rec.geom = ST_Reverse(rec.geom); + END IF; + rec.end_node = e2rec.start_node; + rec.next_left_edge = e2rec.next_right_edge; + e2sign = -1; + ELSIF caseno = 3 THEN -- e1.start = e2.start + IF NOT ST_Equals(ST_EndPoint(rec.geom), ST_EndPoint(e1rec.geom)) THEN +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'caseno=4: LineMerge did not maintain endpoint'; +#endif + rec.geom = ST_Reverse(rec.geom); + END IF; + rec.start_node = e2rec.end_node; + rec.next_right_edge = e2rec.next_left_edge; + e2sign = -1; + ELSIF caseno = 4 THEN -- e1.start = e2.end + IF NOT ST_Equals(ST_EndPoint(rec.geom), ST_EndPoint(e1rec.geom)) THEN +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'caseno=4: LineMerge did not maintain endpoint'; +#endif + rec.geom = ST_Reverse(rec.geom); + END IF; + rec.start_node = e2rec.start_node; + rec.next_right_edge = e2rec.next_right_edge; + e2sign = 1; + END IF; + EXECUTE 'UPDATE ' || quote_ident(toponame) + || '.edge_data SET geom = ' || quote_literal(rec.geom::text) + || ', start_node = ' || rec.start_node + || ', end_node = ' || rec.end_node + || ', next_left_edge = ' || rec.next_left_edge + || ', abs_next_left_edge = ' || abs(rec.next_left_edge) + || ', next_right_edge = ' || rec.next_right_edge + || ', abs_next_right_edge = ' || abs(rec.next_right_edge) + || ' WHERE edge_id = ' || e1id; + -- End of first edge update } + + -- Update next_left_edge/next_right_edge for + -- any edge having them still pointing at the edge being removed (e2id) + -- + -- NOTE: + -- *(next_XXX_edge/e2id) serves the purpose of extracting existing + -- sign from the value, while *e2sign changes that sign again if we + -- reverted edge2 direction + -- + sql := 'UPDATE ' || quote_ident(toponame) + || '.edge_data SET abs_next_left_edge = ' || e1id + || ', next_left_edge = ' || e2sign*e1id + || '*(next_left_edge/' + || e2id || ') WHERE abs_next_left_edge = ' || e2id; + --RAISE DEBUG 'SQL: %', sql; + EXECUTE sql; + sql := 'UPDATE ' || quote_ident(toponame) + || '.edge_data SET abs_next_right_edge = ' || e1id + || ', next_right_edge = ' || e2sign*e1id + || '*(next_right_edge/' + || e2id || ') WHERE abs_next_right_edge = ' || e2id; + --RAISE DEBUG 'SQL: %', sql; + EXECUTE sql; + + -- Delete the second edge + EXECUTE 'DELETE FROM ' || quote_ident(toponame) + || '.edge_data WHERE edge_id = ' || e2id; + + -- Delete the common node + BEGIN + EXECUTE 'DELETE FROM ' || quote_ident(toponame) + || '.node WHERE node_id = ' || commonnode; + EXCEPTION + WHEN UNDEFINED_TABLE THEN + RAISE EXCEPTION 'corrupted topology "%" (missing node table)', + toponame; + END; + + -- + -- NOT IN THE SPECS: + -- Drop composition rows involving second + -- edge, as the first edge took its space, + -- and all affected TopoGeom have been previously checked + -- for being composed by both edges. + sql := 'DELETE FROM ' || quote_ident(toponame) + || '.relation r USING topology.layer l ' + || 'WHERE l.level = 0 AND l.feature_type = 2' + || ' AND l.topology_id = ' || topoid + || ' AND l.layer_id = r.layer_id AND abs(r.element_id) = ' + || e2id; + --RAISE DEBUG 'SQL: %', sql; + EXECUTE sql; + + RETURN commonnode; +END +$$ +LANGUAGE 'plpgsql' VOLATILE; +--} ST_ModEdgeHeal + +--{ +-- Topo-Geo and Topo-Net 3: Routine Details +-- X.3.14 +-- +-- ST_RemEdgeNewFace(atopology, anedge) +-- +-- Not in the specs: +-- * Raise an exception if any TopoGeometry is defined by only one +-- of the two faces that will dissolve. +-- * Raise an exception if any TopoGeometry is defined by +-- the edge being removed. +-- * Properly set containg_face on nodes that remains isolated by the drop +-- * Update containg_face for isolated nodes in the dissolved faces +-- * Update references in the Relation table +-- +-- }{ +CREATE OR REPLACE FUNCTION topology.ST_RemEdgeNewFace(toponame varchar, e1id integer) + RETURNS int +AS +$$ +DECLARE + e1rec RECORD; + rec RECORD; + fidary int[]; + topoid int; + sql text; + newfaceid int; + newfacecreated bool; + elink int; +BEGIN + -- + -- toponame and face_id are required + -- + IF toponame IS NULL OR e1id IS NULL THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - null argument'; + END IF; + + -- Get topology id + BEGIN + SELECT id FROM topology.topology + INTO STRICT topoid WHERE name = toponame; + EXCEPTION + WHEN NO_DATA_FOUND THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - invalid topology name'; + END; + + BEGIN + EXECUTE 'SELECT * FROM ' || quote_ident(toponame) + || '.edge_data WHERE edge_id = ' || e1id + INTO STRICT e1rec; + EXCEPTION + WHEN NO_DATA_FOUND THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - non-existent edge %', e1id; + WHEN INVALID_SCHEMA_NAME THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - invalid topology name'; + WHEN UNDEFINED_TABLE THEN + RAISE EXCEPTION 'corrupted topology "%" (missing edge_data table)', + toponame; + END; + + -- Check that no TopoGeometry references the edge being removed + sql := 'SELECT r.topogeo_id, r.layer_id' + || ', l.schema_name, l.table_name, l.feature_column ' + || 'FROM topology.layer l INNER JOIN ' + || quote_ident(toponame) + || '.relation r ON (l.layer_id = r.layer_id) ' + || 'WHERE l.level = 0 AND l.feature_type = 2 ' + || ' AND l.topology_id = ' || topoid + || ' AND abs(r.element_id) = ' || e1id ; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Checking TopoGeometry definitions: %', sql; +#endif + FOR rec IN EXECUTE sql LOOP + RAISE EXCEPTION 'TopoGeom % in layer % (%.%.%) cannot be represented dropping edge %', + rec.topogeo_id, rec.layer_id, + rec.schema_name, rec.table_name, rec.feature_column, + e1id; + END LOOP; + + -- Update next_left_edge and next_right_edge face + -- for all edges bounding the new face + RAISE NOTICE 'Updating next_{right,left}_face of ring edges...'; + + -- TODO: reduce the following to 2 UPDATE rather than 4 + + -- Update next_left_edge of previous edges in left face -- { + + elink := e1rec.next_left_edge; + + sql := 'UPDATE ' || quote_ident(toponame) + || '.edge_data SET next_left_edge = ' + || elink + || ', abs_next_left_edge = ' + || abs(elink) + || ' WHERE next_left_edge < 0 AND abs(next_left_edge) = ' + || e1id; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'next_left_edge update: %', sql; +#endif + EXECUTE sql; + + -- If the edge being removed links to self, + -- we use the other face + IF e1rec.abs_next_right_edge = e1rec.edge_id THEN + elink := e1rec.next_left_edge; + ELSE + elink := e1rec.next_right_edge; + END IF; + + sql := 'UPDATE ' || quote_ident(toponame) + || '.edge_data SET next_left_edge = ' + || elink + || ', abs_next_left_edge = ' + || abs(elink) + || ' WHERE next_left_edge > 0 AND abs(next_left_edge) = ' + || e1id; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'next_left_edge update: %', sql; +#endif + EXECUTE sql; + + -- } + + -- Update next_right_edge of previous edges in right face -- { + + elink := e1rec.next_left_edge; + + sql := 'UPDATE ' || quote_ident(toponame) + || '.edge_data SET next_right_edge = ' + || elink + || ', abs_next_right_edge = ' + || abs(elink) + || ' WHERE next_right_edge < 0 AND abs(next_right_edge) = ' + || e1id; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'next_right_edge update: %', sql; +#endif + EXECUTE sql; + + -- If the edge being removed links to self, + -- we use the other face + IF e1rec.abs_next_right_edge = e1rec.edge_id THEN + elink := e1rec.next_left_edge; + ELSE + elink := e1rec.next_right_edge; + END IF; + + sql := 'UPDATE ' || quote_ident(toponame) + || '.edge_data SET next_right_edge = ' + || elink + || ', abs_next_right_edge = ' + || abs(elink) + || ' WHERE next_right_edge > 0 AND abs(next_right_edge) = ' + || e1id; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'next_right_edge update: %', sql; +#endif + EXECUTE sql; + + -- } + + IF e1rec.left_face = e1rec.right_face THEN -- { + + RAISE NOTICE 'Deletion of edge % affects no face', + e1rec.edge_id; + + newfaceid := e1rec.left_face; -- TODO: or what should we return ? + newfacecreated := false; + + ELSE -- }{ + + RAISE NOTICE 'Deletion of edge % joins faces % and %', + e1rec.edge_id, e1rec.left_face, e1rec.right_face; + + -- NOT IN THE SPECS: + -- check if any topo_geom is defined only by one of the + -- joined faces. In such case there would be no way to adapt + -- the definition in case of healing, so we'd have to bail out + -- + -- TODO: use an internal function and share with ST_RemEdgeNewFace + -- + -- + fidary = ARRAY[e1rec.left_face, e1rec.right_face]; + sql := 'SELECT t.* from (' + || 'SELECT r.topogeo_id, r.layer_id' + || ', l.schema_name, l.table_name, l.feature_column' + || ', array_agg(r.element_id) as elems ' + || 'FROM topology.layer l INNER JOIN ' + || quote_ident(toponame) + || '.relation r ON (l.layer_id = r.layer_id) ' + || 'WHERE l.level = 0 AND l.feature_type = 3 ' + || ' AND l.topology_id = ' || topoid + || ' AND r.element_id = ANY (' || quote_literal(fidary) + || ') group by r.topogeo_id, r.layer_id, l.schema_name, l.table_name, ' + || ' l.feature_column ) t'; + + -- No surface can be defined by universal face + IF e1rec.left_face != 0 AND e1rec.right_face != 0 THEN -- { + sql := sql || ' WHERE NOT t.elems @> ' || quote_literal(fidary); + END IF; -- } + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'SQL: %', sql; +#endif + + FOR rec IN EXECUTE sql LOOP + RAISE EXCEPTION 'TopoGeom % in layer % (%.%.%) cannot be represented healing faces % and %', + rec.topogeo_id, rec.layer_id, + rec.schema_name, rec.table_name, rec.feature_column, + e1rec.right_face, e1rec.left_face; + END LOOP; + + IF e1rec.left_face = 0 OR e1rec.right_face = 0 THEN -- { + + -- + -- We won't add any new face, but rather let the universe + -- flood the removed face. + -- + + newfaceid := 0; + newfacecreated := false; + + ELSE -- }{ + + -- + -- Insert the new face + -- + + sql := 'SELECT nextval(' || quote_literal( + quote_ident(toponame) || '.face_face_id_seq' + ) || ')'; + + EXECUTE sql INTO STRICT newfaceid; + newfacecreated := true; + + sql := 'INSERT INTO ' + || quote_ident(toponame) + || '.face(face_id, mbr) SELECT ' + -- face_id + || newfaceid || ', ' + -- minimum bounding rectangle is the union of the old faces mbr + -- (doing this without GEOS would be faster) + || 'ST_Envelope(ST_Union(mbr)) FROM ' + || quote_ident(toponame) + || '.face WHERE face_id IN (' + || e1rec.left_face || ',' || e1rec.right_face + || ')'; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'SQL: %', sql; +#endif + EXECUTE sql; + + END IF; -- } + + -- Update left_face for all edges still referencing old faces + sql := 'UPDATE ' || quote_ident(toponame) + || '.edge_data SET left_face = ' || newfaceid + || ' WHERE left_face IN (' + || e1rec.left_face || ',' || e1rec.right_face + || ')'; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'left_face update: %', sql; +#endif + EXECUTE sql; + + -- Update right_face for all edges still referencing old faces + sql := 'UPDATE ' || quote_ident(toponame) + || '.edge_data SET right_face = ' || newfaceid + || ' WHERE right_face IN (' + || e1rec.left_face || ',' || e1rec.right_face + || ')'; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'right_face update: %', sql; +#endif + EXECUTE sql; + + -- Update containing_face for all nodes still referencing old faces + sql := 'UPDATE ' || quote_ident(toponame) + || '.node SET containing_face = ' || newfaceid + || ' WHERE containing_face IN (' + || e1rec.left_face || ',' || e1rec.right_face + || ')'; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Isolated nodes update: %', sql; +#endif + EXECUTE sql; + + -- NOT IN THE SPECS: + -- Replace composition rows involving the two + -- faces as one involving the new face. + -- It takes a DELETE and an UPDATE to do all + sql := 'DELETE FROM ' || quote_ident(toponame) + || '.relation r USING topology.layer l ' + || 'WHERE l.level = 0 AND l.feature_type = 3' + || ' AND l.topology_id = ' || topoid + || ' AND l.layer_id = r.layer_id AND abs(r.element_id) = ' + || e1rec.left_face; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'SQL: %', sql; +#endif + EXECUTE sql; + sql := 'UPDATE ' || quote_ident(toponame) + || '.relation r ' + || ' SET element_id = ' || newfaceid + || ' FROM topology.layer l WHERE l.level = 0 AND l.feature_type = 3' + || ' AND l.topology_id = ' || topoid + || ' AND l.layer_id = r.layer_id AND r.element_id = ' + || e1rec.right_face; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'SQL: %', sql; +#endif + EXECUTE sql; + + END IF; -- } two faces healed... + + -- Delete the edge + sql := 'DELETE FROM ' || quote_ident(toponame) + || '.edge_data WHERE edge_id = ' || e1id; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Edge deletion: %', sql; +#endif + EXECUTE sql; + + -- Check if any of the edge nodes remains isolated, + -- set containing_face = newfaceid in that case + sql := 'UPDATE ' || quote_ident(toponame) + || '.node n SET containing_face = ' || newfaceid + || ' WHERE node_id IN (' + || e1rec.start_node || ',' + || e1rec.end_node || ') AND NOT EXISTS (SELECT edge_id FROM ' + || quote_ident(toponame) + || '.edge_data WHERE start_node = n.node_id OR end_node = n.node_id)'; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Checking for nodes left isolated: %', sql; +#endif + EXECUTE sql; + + IF e1rec.right_face != e1rec.left_face THEN -- { + + -- Delete left face, if not universe + IF e1rec.left_face != 0 THEN + sql := 'DELETE FROM ' || quote_ident(toponame) + || '.face WHERE face_id = ' || e1rec.left_face; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Left face deletion: %', sql; +#endif + EXECUTE sql; + END IF; + + -- Delete right face, if not universe + IF e1rec.right_face != 0 + THEN + sql := 'DELETE FROM ' || quote_ident(toponame) + || '.face WHERE face_id = ' || e1rec.right_face; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Right face deletion: %', sql; +#endif + EXECUTE sql; + END IF; + + END IF; -- } + + IF newfacecreated THEN + RETURN newfaceid; + ELSE + RETURN NULL; -- -newfaceid; + END IF; +END +$$ +LANGUAGE 'plpgsql' VOLATILE; +--} ST_RemEdgeNewFace + +--{ +-- Topo-Geo and Topo-Net 3: Routine Details +-- X.3.15 +-- +-- ST_RemEdgeModFace(atopology, anedge) +-- +-- Not in the specs: +-- * Raise an exception if any TopoGeometry is defined by only one +-- of the two faces that will dissolve. +-- * Raise an exception if any TopoGeometry is defined by +-- the edge being removed. +-- * Properly set containg_face on nodes that remains isolated by the drop +-- * Update containg_face for isolated nodes in the dissolved faces +-- * Update references in the Relation table +-- * Return id of the face taking up the removed edge space +-- +-- }{ +CREATE OR REPLACE FUNCTION topology.ST_RemEdgeModFace(toponame varchar, e1id integer) + RETURNS int +AS +$$ +DECLARE + e1rec RECORD; + rec RECORD; + fidary int[]; + topoid int; + sql text; + floodfaceid int; + elink int; +BEGIN + -- + -- toponame and face_id are required + -- + IF toponame IS NULL OR e1id IS NULL THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - null argument'; + END IF; + + -- Get topology id + BEGIN + SELECT id FROM topology.topology + INTO STRICT topoid WHERE name = toponame; + EXCEPTION + WHEN NO_DATA_FOUND THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - invalid topology name'; + END; + + BEGIN + EXECUTE 'SELECT * FROM ' || quote_ident(toponame) + || '.edge_data WHERE edge_id = ' || e1id + INTO STRICT e1rec; + EXCEPTION + WHEN NO_DATA_FOUND THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - non-existent edge %', e1id; + WHEN INVALID_SCHEMA_NAME THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - invalid topology name'; + WHEN UNDEFINED_TABLE THEN + RAISE EXCEPTION 'corrupted topology "%" (missing edge_data table)', + toponame; + END; + + -- Check that no TopoGeometry references the edge being removed + sql := 'SELECT r.topogeo_id, r.layer_id' + || ', l.schema_name, l.table_name, l.feature_column ' + || 'FROM topology.layer l INNER JOIN ' + || quote_ident(toponame) + || '.relation r ON (l.layer_id = r.layer_id) ' + || 'WHERE l.level = 0 AND l.feature_type = 2 ' + || ' AND l.topology_id = ' || topoid + || ' AND abs(r.element_id) = ' || e1id ; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Checking TopoGeometry definitions: %', sql; +#endif + FOR rec IN EXECUTE sql LOOP + RAISE EXCEPTION 'TopoGeom % in layer % (%.%.%) cannot be represented dropping edge %', + rec.topogeo_id, rec.layer_id, + rec.schema_name, rec.table_name, rec.feature_column, + e1id; + END LOOP; + + -- Update next_left_edge and next_right_edge face + -- for all edges bounding the new face + RAISE NOTICE 'Updating next_{right,left}_face of ring edges...'; + + -- TODO: reduce the following to 2 UPDATE rather than 4 + + -- Update next_left_edge of previous edges in left face -- { + + elink := e1rec.next_left_edge; + + sql := 'UPDATE ' || quote_ident(toponame) + || '.edge_data SET next_left_edge = ' + || elink + || ', abs_next_left_edge = ' + || abs(elink) + || ' WHERE next_left_edge < 0 AND abs(next_left_edge) = ' + || e1id; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'next_left_edge update: %', sql; +#endif + EXECUTE sql; + + -- If the edge being removed links to self, + -- we use the other face + IF e1rec.abs_next_right_edge = e1rec.edge_id THEN + elink := e1rec.next_left_edge; + ELSE + elink := e1rec.next_right_edge; + END IF; + + sql := 'UPDATE ' || quote_ident(toponame) + || '.edge_data SET next_left_edge = ' + || elink + || ', abs_next_left_edge = ' + || abs(elink) + || ' WHERE next_left_edge > 0 AND abs(next_left_edge) = ' + || e1id; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'next_left_edge update: %', sql; +#endif + EXECUTE sql; + + -- } + + -- Update next_right_edge of previous edges in right face -- { + + elink := e1rec.next_left_edge; + + sql := 'UPDATE ' || quote_ident(toponame) + || '.edge_data SET next_right_edge = ' + || elink + || ', abs_next_right_edge = ' + || abs(elink) + || ' WHERE next_right_edge < 0 AND abs(next_right_edge) = ' + || e1id; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'next_right_edge update: %', sql; +#endif + EXECUTE sql; + + -- If the edge being removed links to self, + -- we use the other face + IF e1rec.abs_next_right_edge = e1rec.edge_id THEN + elink := e1rec.next_left_edge; + ELSE + elink := e1rec.next_right_edge; + END IF; + + sql := 'UPDATE ' || quote_ident(toponame) + || '.edge_data SET next_right_edge = ' + || elink + || ', abs_next_right_edge = ' + || abs(elink) + || ' WHERE next_right_edge > 0 AND abs(next_right_edge) = ' + || e1id; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'next_right_edge update: %', sql; +#endif + EXECUTE sql; + + -- } + + IF e1rec.left_face = e1rec.right_face THEN -- { + + RAISE NOTICE 'Deletion of edge % affects no face', + e1rec.edge_id; + + floodfaceid = e1rec.left_face; + + ELSE -- }{ + + RAISE NOTICE 'Deletion of edge % joins faces % and %', + e1rec.edge_id, e1rec.left_face, e1rec.right_face; + + -- NOT IN THE SPECS: + -- check if any topo_geom is defined only by one of the + -- joined faces. In such case there would be no way to adapt + -- the definition in case of healing, so we'd have to bail out + -- + -- TODO: use an internal function and share with ST_RemEdgeNewFace + -- + fidary = ARRAY[e1rec.left_face, e1rec.right_face]; + sql := 'SELECT t.* from (' + || 'SELECT r.topogeo_id, r.layer_id' + || ', l.schema_name, l.table_name, l.feature_column' + || ', array_agg(r.element_id) as elems ' + || 'FROM topology.layer l INNER JOIN ' + || quote_ident(toponame) + || '.relation r ON (l.layer_id = r.layer_id) ' + || 'WHERE l.level = 0 AND l.feature_type = 3 ' + || ' AND l.topology_id = ' || topoid + || ' AND r.element_id = ANY (' || quote_literal(fidary) + || ') group by r.topogeo_id, r.layer_id, l.schema_name, l.table_name, ' + || ' l.feature_column ) t'; + + -- No surface can be defined by universal face + IF NOT 0 = ANY ( fidary ) THEN -- { + sql := sql || ' WHERE NOT t.elems @> ' || quote_literal(fidary); + END IF; -- } + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'SQL: %', sql; +#endif + + FOR rec IN EXECUTE sql LOOP + RAISE EXCEPTION 'TopoGeom % in layer % (%.%.%) cannot be represented healing faces % and %', + rec.topogeo_id, rec.layer_id, + rec.schema_name, rec.table_name, rec.feature_column, + e1rec.right_face, e1rec.left_face; + END LOOP; + + IF e1rec.left_face = 0 OR e1rec.right_face = 0 THEN -- { + + -- + -- We won't add any new face, but rather let the universe + -- flood the removed face. + -- + + floodfaceid = 0; + + ELSE -- }{ + + -- we choose right face as the face that will remain + -- to be symmetric with ST_AddEdgeModFace + floodfaceid = e1rec.right_face; + + sql := 'UPDATE ' + || quote_ident(toponame) + || '.face SET mbr = (SELECT ' + -- minimum bounding rectangle is the union of the old faces mbr + -- (doing this without GEOS would be faster) + || 'ST_Envelope(ST_Union(mbr)) FROM ' + || quote_ident(toponame) + || '.face WHERE face_id IN (' + || e1rec.left_face || ',' || e1rec.right_face + || ') ) WHERE face_id = ' || floodfaceid ; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'SQL: %', sql; +#endif + EXECUTE sql; + + END IF; -- } + + -- Update left_face for all edges still referencing old faces + sql := 'UPDATE ' || quote_ident(toponame) + || '.edge_data SET left_face = ' || floodfaceid + || ' WHERE left_face IN (' + || e1rec.left_face || ',' || e1rec.right_face + || ')'; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'left_face update: %', sql; +#endif + EXECUTE sql; + + -- Update right_face for all edges still referencing old faces + sql := 'UPDATE ' || quote_ident(toponame) + || '.edge_data SET right_face = ' || floodfaceid + || ' WHERE right_face IN (' + || e1rec.left_face || ',' || e1rec.right_face + || ')'; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'right_face update: %', sql; +#endif + EXECUTE sql; + + -- Update containing_face for all nodes still referencing old faces + sql := 'UPDATE ' || quote_ident(toponame) + || '.node SET containing_face = ' || floodfaceid + || ' WHERE containing_face IN (' + || e1rec.left_face || ',' || e1rec.right_face + || ')'; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Isolated nodes update: %', sql; +#endif + EXECUTE sql; + + -- NOT IN THE SPECS: + -- Replace composition rows involving the two + -- faces as one involving the new face. + -- It takes a single DELETE to do that. + sql := 'DELETE FROM ' || quote_ident(toponame) + || '.relation r USING topology.layer l ' + || 'WHERE l.level = 0 AND l.feature_type = 3' + || ' AND l.topology_id = ' || topoid + || ' AND l.layer_id = r.layer_id AND abs(r.element_id) IN (' + || e1rec.left_face || ',' || e1rec.right_face + || ') AND abs(r.element_id) != ' + || floodfaceid; -- could be optimized.. +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'SQL: %', sql; +#endif + EXECUTE sql; + + END IF; -- } two faces healed... + + -- Delete the edge + sql := 'DELETE FROM ' || quote_ident(toponame) + || '.edge_data WHERE edge_id = ' || e1id; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Edge deletion: %', sql; +#endif + EXECUTE sql; + + -- Check if any of the edge nodes remains isolated, + -- set containing_face = floodfaceid in that case + sql := 'UPDATE ' || quote_ident(toponame) + || '.node n SET containing_face = ' || floodfaceid + || ' WHERE node_id IN (' + || e1rec.start_node || ',' + || e1rec.end_node || ') AND NOT EXISTS (SELECT edge_id FROM ' + || quote_ident(toponame) + || '.edge_data WHERE start_node = n.node_id OR end_node = n.node_id)'; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Checking for nodes left isolated: %', sql; +#endif + EXECUTE sql; + + IF e1rec.right_face != e1rec.left_face THEN -- { + + -- Delete left face, if not universe and not "flood" face + IF e1rec.left_face != 0 AND e1rec.left_face != floodfaceid + THEN + sql := 'DELETE FROM ' || quote_ident(toponame) + || '.face WHERE face_id = ' || e1rec.left_face; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Left face deletion: %', sql; +#endif + EXECUTE sql; + END IF; + + -- Delete right face, if not universe and not "flood" face + IF e1rec.right_face != 0 AND e1rec.right_face != floodfaceid + THEN + sql := 'DELETE FROM ' || quote_ident(toponame) + || '.face WHERE face_id = ' || e1rec.right_face; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Right face deletion: %', sql; +#endif + EXECUTE sql; + END IF; + + END IF; -- } + + RETURN floodfaceid; +END +$$ +LANGUAGE 'plpgsql' VOLATILE; +--} ST_RemEdgeModFace + + +--{ +-- Topo-Geo and Topo-Net 3: Routine Details +-- X.3.16 +-- +-- ST_GetFaceGeometry(atopology, aface) +-- +CREATE OR REPLACE FUNCTION topology.ST_GetFaceGeometry(toponame varchar, aface integer) + RETURNS GEOMETRY AS +$$ +DECLARE + rec RECORD; + sql TEXT; +BEGIN + + -- + -- toponame and aface are required + -- + IF toponame IS NULL OR aface IS NULL THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - null argument'; + END IF; + + IF toponame = '' THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - invalid topology name'; + END IF; + + IF aface = 0 THEN + RAISE EXCEPTION + 'SQL/MM Spatial exception - universal face has no geometry'; + END IF; + + BEGIN + + -- No such face + sql := 'SELECT NOT EXISTS (SELECT * from ' || quote_ident(toponame) + || '.face WHERE face_id = ' || aface + || ') as none'; + EXECUTE sql INTO rec; + IF rec.none THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - non-existent face.'; + END IF; + + -- + -- Construct face + -- + sql := + 'SELECT ST_BuildArea(ST_Collect(geom)) as geom FROM ' + || quote_ident(toponame) + || '.edge_data WHERE left_face = ' || aface + || ' OR right_face = ' || aface; + FOR rec IN EXECUTE sql + LOOP + RETURN rec.geom; + END LOOP; + + EXCEPTION + WHEN INVALID_SCHEMA_NAME THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - invalid topology name'; + WHEN UNDEFINED_TABLE THEN + RAISE EXCEPTION 'corrupted topology "%"', toponame; + END; + + RETURN NULL; +END +$$ +LANGUAGE 'plpgsql' STABLE; +--} ST_GetFaceGeometry + + +--{ +-- Topo-Geo and Topo-Net 3: Routine Details +-- X.3.1 +-- +-- ST_AddIsoNode(atopology, aface, apoint) +-- +CREATE OR REPLACE FUNCTION topology.ST_AddIsoNode(atopology varchar, aface integer, apoint geometry) + RETURNS INTEGER AS +$$ +DECLARE + rec RECORD; + nodeid integer; + sql text; + containingface integer; +BEGIN + + -- + -- Atopology and apoint are required + -- + IF atopology IS NULL OR apoint IS NULL THEN + RAISE EXCEPTION + 'SQL/MM Spatial exception - null argument'; + END IF; + + -- + -- Apoint must be a point + -- + IF substring(geometrytype(apoint), 1, 5) != 'POINT' + THEN + RAISE EXCEPTION + 'SQL/MM Spatial exception - invalid point'; + END IF; + + -- + -- Check if a coincident node already exists + -- + -- We use index AND x/y equality + -- + FOR rec IN EXECUTE 'SELECT node_id FROM ' + || quote_ident(atopology) || '.node ' || + 'WHERE ST_Equals(geom, ' || quote_literal(apoint::text) || '::geometry)' + LOOP + RAISE EXCEPTION + 'SQL/MM Spatial exception - coincident node'; + END LOOP; + + -- + -- Check if any edge crosses (intersects) this node + -- I used _intersects_ here to include boundaries (endpoints) + -- + FOR rec IN EXECUTE 'SELECT edge_id FROM ' + || quote_ident(atopology) || '.edge ' + || 'WHERE ST_Intersects(geom, ' || quote_literal(apoint::text) + || '::geometry)' + LOOP + RAISE EXCEPTION + 'SQL/MM Spatial exception - edge crosses node.'; + END LOOP; + + -- retrieve the face that contains (eventually) the point + + -- + -- first test is to check if there is inside an mbr (more fast) + -- + sql := 'SELECT f.face_id FROM ' + || quote_ident(atopology) + || '.face f WHERE f.face_id > 0 AND f.mbr && ' + || quote_literal(apoint::text) + || '::geometry AND ST_Contains(topology.ST_GetFaceGeometry(' + || quote_literal(atopology) + || ', f.face_id), ' + || quote_literal(apoint::text) + || '::geometry)'; + IF aface IS NOT NULL AND aface != 0 THEN + sql := sql || ' AND f.face_id = ' || aface; + END IF; + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG '%', sql; +#endif + EXECUTE sql INTO containingface; + + -- If aface was specified, check that it was correct + IF aface IS NOT NULL THEN -- { + IF aface = 0 THEN -- { + IF containingface IS NOT NULL THEN -- { + RAISE EXCEPTION + 'SQL/MM Spatial exception - within face % (not universe)', + containingface; + ELSE -- }{ + containingface := 0; + END IF; -- } + ELSE -- }{ -- aface != 0 + IF containingface IS NULL OR containingface != aface THEN -- { + RAISE EXCEPTION 'SQL/MM Spatial exception - not within face'; + END IF; -- } + END IF; -- } + ELSE -- }{ -- aface is null + containingface := COALESCE(containingface, 0); + END IF; -- } + + -- + -- Insert the new row + -- + sql := 'INSERT INTO ' + || quote_ident(atopology) + || '.node(node_id, geom, containing_face) SELECT nextval(' + || quote_literal( quote_ident(atopology) || '.node_node_id_seq' ) + || '),' + ||quote_literal(apoint::text) + || '::geometry,' || containingface + || ' RETURNING node_id'; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG '%', sql; +#endif + + EXECUTE sql INTO nodeid; + + RETURN nodeid; +EXCEPTION + -- TODO: avoid the EXCEPTION handling here ? + WHEN INVALID_SCHEMA_NAME THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - invalid topology name'; +END +$$ +LANGUAGE 'plpgsql' VOLATILE; +--} ST_AddIsoNode + +--{ +-- Topo-Geo and Topo-Net 3: Routine Details +-- X.3.2 +-- +-- ST_MoveIsoNode(atopology, anode, apoint) +-- +CREATE OR REPLACE FUNCTION topology.ST_MoveIsoNode(atopology character varying, anode integer, apoint geometry) + RETURNS text AS +$$ +DECLARE + rec RECORD; +BEGIN + + -- + -- All arguments are required + -- + IF atopology IS NULL OR anode IS NULL OR apoint IS NULL THEN + RAISE EXCEPTION + 'SQL/MM Spatial exception - null argument'; + END IF; + + -- + -- Apoint must be a point + -- + IF substring(geometrytype(apoint), 1, 5) != 'POINT' + THEN + RAISE EXCEPTION + 'SQL/MM Spatial exception - invalid point'; + END IF; + + -- + -- Check node isolation. + -- + FOR rec IN EXECUTE 'SELECT edge_id FROM ' + || quote_ident(atopology) || '.edge ' || + ' WHERE start_node = ' || anode || + ' OR end_node = ' || anode + LOOP + RAISE EXCEPTION + 'SQL/MM Spatial exception - not isolated node'; + END LOOP; + + -- + -- Check if a coincident node already exists + -- + -- We use index AND x/y equality + -- + FOR rec IN EXECUTE 'SELECT node_id FROM ' + || quote_ident(atopology) || '.node ' || + 'WHERE geom && ' || quote_literal(apoint::text) || '::geometry' + ||' AND ST_X(geom) = ST_X('||quote_literal(apoint::text)||'::geometry)' + ||' AND ST_Y(geom) = ST_Y('||quote_literal(apoint::text)||'::geometry)' + LOOP + RAISE EXCEPTION + 'SQL/MM Spatial exception - coincident node'; + END LOOP; + + -- + -- Check if any edge crosses (intersects) this node + -- I used _intersects_ here to include boundaries (endpoints) + -- + FOR rec IN EXECUTE 'SELECT edge_id FROM ' + || quote_ident(atopology) || '.edge ' + || 'WHERE geom && ' || quote_literal(apoint::text) + || ' AND ST_Intersects(geom, ' || quote_literal(apoint::text) + || '::geometry)' + LOOP + RAISE EXCEPTION + 'SQL/MM Spatial exception - edge crosses node.'; + END LOOP; + + -- + -- Update node point + -- + EXECUTE 'UPDATE ' || quote_ident(atopology) || '.node ' + || ' SET geom = ' || quote_literal(apoint::text) + || ' WHERE node_id = ' || anode; + + RETURN 'Isolated Node ' || anode || ' moved to location ' + || ST_X(apoint) || ',' || ST_Y(apoint); +END +$$ + LANGUAGE plpgsql VOLATILE; +--} ST_MoveIsoNode + +--{ +-- Topo-Geo and Topo-Net 3: Routine Details +-- X.3.3 +-- +-- ST_RemoveIsoNode(atopology, anode) +-- +CREATE OR REPLACE FUNCTION topology.ST_RemoveIsoNode(atopology varchar, anode integer) + RETURNS TEXT AS +$$ +DECLARE + rec RECORD; +BEGIN + + -- + -- Atopology and apoint are required + -- + IF atopology IS NULL OR anode IS NULL THEN + RAISE EXCEPTION + 'SQL/MM Spatial exception - null argument'; + END IF; + + -- + -- Check node isolation. + -- + FOR rec IN EXECUTE 'SELECT edge_id FROM ' + || quote_ident(atopology) || '.edge_data ' || + ' WHERE start_node = ' || anode || + ' OR end_node = ' || anode + LOOP + RAISE EXCEPTION + 'SQL/MM Spatial exception - not isolated node'; + END LOOP; + + EXECUTE 'DELETE FROM ' || quote_ident(atopology) || '.node ' + || ' WHERE node_id = ' || anode; + + RETURN 'Isolated node ' || anode || ' removed'; +END +$$ +LANGUAGE 'plpgsql' VOLATILE; +--} ST_RemoveIsoNode + +--{ +-- According to http://trac.osgeo.org/postgis/ticket/798 +-- ST_RemoveIsoNode was renamed to ST_RemIsoNode in the final ISO +-- document +-- +CREATE OR REPLACE FUNCTION topology.ST_RemIsoNode(varchar, integer) + RETURNS TEXT AS +$$ + SELECT topology.ST_RemoveIsoNode($1, $2) +$$ LANGUAGE 'sql' VOLATILE; + +--{ +-- Topo-Geo and Topo-Net 3: Routine Details +-- X.3.7 +-- +-- ST_RemoveIsoEdge(atopology, anedge) +-- +CREATE OR REPLACE FUNCTION topology.ST_RemoveIsoEdge(atopology varchar, anedge integer) + RETURNS TEXT AS +$$ +DECLARE + edge RECORD; + rec RECORD; + ok BOOL; +BEGIN + + -- + -- Atopology and anedge are required + -- + IF atopology IS NULL OR anedge IS NULL THEN + RAISE EXCEPTION + 'SQL/MM Spatial exception - null argument'; + END IF; + + -- + -- Check node existance + -- + ok = false; + FOR edge IN EXECUTE 'SELECT * FROM ' + || quote_ident(atopology) || '.edge_data ' || + ' WHERE edge_id = ' || anedge + LOOP + ok = true; + END LOOP; + IF NOT ok THEN + RAISE EXCEPTION + 'SQL/MM Spatial exception - non-existent edge'; + END IF; + + -- + -- Check node isolation + -- + IF edge.left_face != edge.right_face THEN + RAISE EXCEPTION + 'SQL/MM Spatial exception - not isolated edge'; + END IF; + + FOR rec IN EXECUTE 'SELECT * FROM ' + || quote_ident(atopology) || '.edge_data ' + || ' WHERE edge_id != ' || anedge + || ' AND ( start_node = ' || edge.start_node + || ' OR start_node = ' || edge.end_node + || ' OR end_node = ' || edge.start_node + || ' OR end_node = ' || edge.end_node + || ' ) ' + LOOP + RAISE EXCEPTION + 'SQL/MM Spatial exception - not isolated edge'; + END LOOP; + + -- + -- Delete the edge + -- + EXECUTE 'DELETE FROM ' || quote_ident(atopology) || '.edge_data ' + || ' WHERE edge_id = ' || anedge; + + RETURN 'Isolated edge ' || anedge || ' removed'; +END +$$ +LANGUAGE 'plpgsql' VOLATILE; +--} ST_RemoveIsoEdge + +--{ +-- Topo-Geo and Topo-Net 3: Routine Details +-- X.3.8 +-- +-- ST_NewEdgesSplit(atopology, anedge, apoint) +-- +-- Not in the specs: +-- * Update references in the Relation table. +-- +CREATE OR REPLACE FUNCTION topology.ST_NewEdgesSplit(atopology varchar, anedge integer, apoint geometry) + RETURNS INTEGER AS +$$ +DECLARE + oldedge RECORD; + rec RECORD; + tmp integer; + topoid integer; + nodeid integer; + nodepos float8; + edgeid1 integer; + edgeid2 integer; + edge1 geometry; + edge2 geometry; + ok BOOL; +BEGIN + + -- + -- All args required + -- + IF atopology IS NULL OR anedge IS NULL OR apoint IS NULL THEN + RAISE EXCEPTION + 'SQL/MM Spatial exception - null argument'; + END IF; + + -- + -- Check node existance + -- + ok = false; + FOR oldedge IN EXECUTE 'SELECT * FROM ' + || quote_ident(atopology) || '.edge_data ' || + ' WHERE edge_id = ' || anedge + LOOP + ok = true; + END LOOP; + IF NOT ok THEN + RAISE EXCEPTION + 'SQL/MM Spatial exception - non-existent edge'; + END IF; + + -- + -- Check that given point is Within(anedge.geom) + -- + IF NOT ST_Within(apoint, oldedge.geom) THEN + RAISE EXCEPTION + 'SQL/MM Spatial exception - point not on edge'; + END IF; + + -- + -- Check if a coincident node already exists + -- + FOR rec IN EXECUTE 'SELECT node_id FROM ' + || quote_ident(atopology) || '.node ' + || 'WHERE geom && ' + || quote_literal(apoint::text) || '::geometry' + || ' AND ST_X(geom) = ST_X(' + || quote_literal(apoint::text) || '::geometry)' + || ' AND ST_Y(geom) = ST_Y(' + || quote_literal(apoint::text) || '::geometry)' + LOOP + RAISE EXCEPTION + 'SQL/MM Spatial exception - coincident node'; + END LOOP; + + -- + -- Get new node id + -- + FOR rec IN EXECUTE 'SELECT nextval(''' || + atopology || '.node_node_id_seq'')' + LOOP + nodeid = rec.nextval; + END LOOP; + + --RAISE NOTICE 'Next node id = % ', nodeid; + + -- + -- Add the new node + -- + EXECUTE 'INSERT INTO ' || quote_ident(atopology) + || '.node(node_id, geom) + VALUES(' || nodeid || ',' + || quote_literal(apoint::text) + || ')'; + + -- + -- Delete the old edge + -- + EXECUTE 'DELETE FROM ' || quote_ident(atopology) || '.edge_data ' + || ' WHERE edge_id = ' || anedge; + + -- + -- Compute new edges + -- + edge2 := ST_Split(oldedge.geom, apoint); + edge1 := ST_GeometryN(edge2, 1); + edge2 := ST_GeometryN(edge2, 2); + + -- + -- Get ids for the new edges + -- + FOR rec IN EXECUTE 'SELECT nextval(''' || + atopology || '.edge_data_edge_id_seq'')' + LOOP + edgeid1 = rec.nextval; + END LOOP; + FOR rec IN EXECUTE 'SELECT nextval(''' || + atopology || '.edge_data_edge_id_seq'')' + LOOP + edgeid2 = rec.nextval; + END LOOP; + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG ' inserting new edges % and % split from %', edgeid1, edgeid2, anedge; +#endif + + --RAISE NOTICE 'EdgeId1 % EdgeId2 %', edgeid1, edgeid2; + + --RAISE DEBUG 'oldedge.next_left_edge: %', oldedge.next_left_edge; + --RAISE DEBUG 'oldedge.next_right_edge: %', oldedge.next_right_edge; + + -- + -- Insert the two new edges + -- + EXECUTE 'INSERT INTO ' || quote_ident(atopology) + || '.edge VALUES(' + || edgeid1 -- edge_id + || ',' || oldedge.start_node -- start_node + || ',' || nodeid -- end_node + || ',' || edgeid2 -- next_left_edge + || ',' || CASE -- next_right_edge + WHEN + oldedge.next_right_edge = anedge + THEN edgeid1 + WHEN + oldedge.next_right_edge = -anedge + THEN -edgeid2 + ELSE oldedge.next_right_edge + END + || ',' || oldedge.left_face -- left_face + || ',' || oldedge.right_face -- right_face + || ',' || quote_literal(edge1::text) -- geom + ||')'; + + EXECUTE 'INSERT INTO ' || quote_ident(atopology) + || '.edge VALUES(' + || edgeid2 -- edge_id + || ',' || nodeid -- start_node + || ',' || oldedge.end_node -- end_node + || ',' || CASE -- next_left_edge + WHEN + oldedge.next_left_edge = + -anedge + THEN -edgeid2 + WHEN + oldedge.next_left_edge = + anedge + THEN edgeid1 + ELSE oldedge.next_left_edge + END + || ',' || -edgeid1 -- next_right_edge + || ',' || oldedge.left_face -- left_face + || ',' || oldedge.right_face -- right_face + || ',' || quote_literal(edge2::text) -- geom + ||')'; + + -- + -- Update all next edge references to match new layout + -- + + EXECUTE 'UPDATE ' || quote_ident(atopology) + || '.edge_data SET next_right_edge = ' + || edgeid2 + || ',' + || ' abs_next_right_edge = ' || edgeid2 + || ' WHERE next_right_edge = ' || anedge + || ' AND edge_id NOT IN (' || edgeid1 || ',' || edgeid2 || ')' + ; + EXECUTE 'UPDATE ' || quote_ident(atopology) + || '.edge_data SET next_right_edge = ' + || -edgeid1 + || ',' + || ' abs_next_right_edge = ' || edgeid1 + || ' WHERE next_right_edge = ' || -anedge + || ' AND edge_id NOT IN (' || edgeid1 || ',' || edgeid2 || ')' + ; + + EXECUTE 'UPDATE ' || quote_ident(atopology) + || '.edge_data SET next_left_edge = ' + || edgeid1 + || ',' + || ' abs_next_left_edge = ' || edgeid1 + || ' WHERE next_left_edge = ' || anedge + || ' AND edge_id NOT IN (' || edgeid1 || ',' || edgeid2 || ')' + ; + EXECUTE 'UPDATE ' || quote_ident(atopology) + || '.edge_data SET ' + || ' next_left_edge = ' || -edgeid2 + || ',' + || ' abs_next_left_edge = ' || edgeid2 + || ' WHERE next_left_edge = ' || -anedge + || ' AND edge_id NOT IN (' || edgeid1 || ',' || edgeid2 || ')' + ; + + -- Get topology id + SELECT id FROM topology.topology into topoid + WHERE name = atopology; + IF topoid IS NULL THEN + RAISE EXCEPTION 'No topology % registered', + quote_ident(atopology); + END IF; + + -- + -- Update references in the Relation table. + -- We only take into considerations non-hierarchical + -- TopoGeometry here, for obvious reasons. + -- + FOR rec IN EXECUTE 'SELECT r.* FROM ' + || quote_ident(atopology) + || '.relation r, topology.layer l ' + || ' WHERE ' + || ' l.topology_id = ' || topoid + || ' AND l.level = 0 ' + || ' AND l.layer_id = r.layer_id ' + || ' AND abs(r.element_id) = ' || anedge + || ' AND r.element_type = 2' + LOOP + --RAISE NOTICE 'TopoGeometry % in layer % contains the edge being split', rec.topogeo_id, rec.layer_id; + + -- Delete old reference + EXECUTE 'DELETE FROM ' || quote_ident(atopology) + || '.relation ' + || ' WHERE ' + || 'layer_id = ' || rec.layer_id + || ' AND ' + || 'topogeo_id = ' || rec.topogeo_id + || ' AND ' + || 'element_type = ' || rec.element_type + || ' AND ' + || 'abs(element_id) = ' || anedge; + + -- Add new reference to edge1 + IF rec.element_id < 0 THEN + tmp = -edgeid1; + ELSE + tmp = edgeid1; + END IF; + EXECUTE 'INSERT INTO ' || quote_ident(atopology) + || '.relation ' + || ' VALUES( ' + || rec.topogeo_id + || ',' + || rec.layer_id + || ',' + || tmp + || ',' + || rec.element_type + || ')'; + + -- Add new reference to edge2 + IF rec.element_id < 0 THEN + tmp = -edgeid2; + ELSE + tmp = edgeid2; + END IF; + EXECUTE 'INSERT INTO ' || quote_ident(atopology) + || '.relation ' + || ' VALUES( ' + || rec.topogeo_id + || ',' + || rec.layer_id + || ',' + || tmp + || ',' + || rec.element_type + || ')'; + + END LOOP; + + --RAISE NOTICE 'Edge % split in edges % and % by node %', + -- anedge, edgeid1, edgeid2, nodeid; + + RETURN nodeid; +END +$$ +LANGUAGE 'plpgsql' VOLATILE; +--} ST_NewEdgesSplit + +--{ +-- Topo-Geo and Topo-Net 3: Routine Details +-- X.3.9 +-- +-- ST_ModEdgeSplit(atopology, anedge, apoint) +-- +-- Not in the specs: +-- * Update references in the Relation table. +-- +CREATE OR REPLACE FUNCTION topology.ST_ModEdgeSplit(atopology varchar, anedge integer, apoint geometry) + RETURNS INTEGER AS +$$ +DECLARE + oldedge RECORD; + rec RECORD; + tmp integer; + topoid integer; + nodeid integer; + nodepos float8; + newedgeid integer; + newedge1 geometry; + newedge2 geometry; + query text; + ok BOOL; +BEGIN + + -- + -- All args required + -- + IF atopology IS NULL OR anedge IS NULL OR apoint IS NULL THEN + RAISE EXCEPTION + 'SQL/MM Spatial exception - null argument'; + END IF; + + -- Get topology id + SELECT id FROM topology.topology into topoid + WHERE name = atopology; + + -- + -- Check node existance + -- + ok = false; + FOR oldedge IN EXECUTE 'SELECT * FROM ' + || quote_ident(atopology) || '.edge_data ' || + ' WHERE edge_id = ' || anedge + LOOP + ok = true; + END LOOP; + IF NOT ok THEN + RAISE EXCEPTION + 'SQL/MM Spatial exception - non-existent edge'; + END IF; + + -- + -- Check that given point is Within(anedge.geom) + -- + IF NOT ST_Within(apoint, oldedge.geom) THEN + RAISE EXCEPTION + 'SQL/MM Spatial exception - point not on edge'; + END IF; + + -- + -- Check if a coincident node already exists + -- + FOR rec IN EXECUTE 'SELECT node_id FROM ' + || quote_ident(atopology) || '.node ' || + 'WHERE geom && ' + || quote_literal(apoint::text) || '::geometry' + ||' AND ST_X(geom) = ST_X(' + || quote_literal(apoint::text) || '::geometry)' + ||' AND ST_Y(geom) = ST_Y(' + ||quote_literal(apoint::text)||'::geometry)' + LOOP + RAISE EXCEPTION + 'SQL/MM Spatial exception - coincident node'; + END LOOP; + + -- + -- Get new node id + -- + FOR rec IN EXECUTE 'SELECT nextval(''' || + atopology || '.node_node_id_seq'')' + LOOP + nodeid = rec.nextval; + END LOOP; + + --RAISE NOTICE 'Next node id = % ', nodeid; + + -- + -- Add the new node + -- + EXECUTE 'INSERT INTO ' || quote_ident(atopology) + || '.node(node_id, geom) + VALUES('||nodeid||','||quote_literal(apoint::text)|| + ')'; + + -- + -- Compute new edge + -- + newedge2 := ST_Split(oldedge.geom, apoint); + newedge1 := ST_GeometryN(newedge2, 1); + newedge2 := ST_GeometryN(newedge2, 2); + + -- + -- Get ids for the new edge + -- + FOR rec IN EXECUTE 'SELECT nextval(''' || + atopology || '.edge_data_edge_id_seq'')' + LOOP + newedgeid = rec.nextval; + END LOOP; + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG ' inserting new edge % split from %', newedgeid, anedge; +#endif + + -- + -- Insert the new edge + -- + EXECUTE 'INSERT INTO ' || quote_ident(atopology) + || '.edge ' + || '(edge_id, start_node, end_node,' + || 'next_left_edge, next_right_edge,' + || 'left_face, right_face, geom) ' + || 'VALUES(' + || newedgeid + || ',' || nodeid + || ',' || oldedge.end_node + || ',' || COALESCE( -- next_left_edge + NULLIF( + oldedge.next_left_edge, + -anedge + ), + -newedgeid + ) + || ',' || -anedge -- next_right_edge + || ',' || oldedge.left_face -- left_face + || ',' || oldedge.right_face -- right_face + || ',' || quote_literal(newedge2::text) -- geom + ||')'; + + -- + -- Update the old edge + -- + EXECUTE 'UPDATE ' || quote_ident(atopology) || '.edge_data ' + || ' SET geom = ' || quote_literal(newedge1::text) + || ',' + || ' next_left_edge = ' || newedgeid + || ', abs_next_left_edge = ' || newedgeid + || ',' + || ' end_node = ' || nodeid + || ' WHERE edge_id = ' || anedge; + + + -- + -- Update all next edge references to match new layout + -- + + EXECUTE 'UPDATE ' || quote_ident(atopology) + || '.edge_data SET next_right_edge = ' + || -newedgeid + || ',' + || ' abs_next_right_edge = ' || newedgeid + || ' WHERE edge_id != ' || newedgeid + || ' AND next_right_edge = ' || -anedge; + + EXECUTE 'UPDATE ' || quote_ident(atopology) + || '.edge_data SET ' + || ' next_left_edge = ' || -newedgeid + || ',' + || ' abs_next_left_edge = ' || newedgeid + || ' WHERE edge_id != ' || newedgeid + || ' AND next_left_edge = ' || -anedge; + + -- + -- Update references in the Relation table. + -- We only take into considerations non-hierarchical + -- TopoGeometry here, for obvious reasons. + -- + FOR rec IN EXECUTE 'SELECT r.* FROM ' + || quote_ident(atopology) + || '.relation r, topology.layer l ' + || ' WHERE ' + || ' l.topology_id = ' || topoid + || ' AND l.level = 0 ' + || ' AND l.layer_id = r.layer_id ' + || ' AND abs(r.element_id) = ' || anedge + || ' AND r.element_type = 2' + LOOP + --RAISE NOTICE 'TopoGeometry % in layer % contains the edge being split (%) - updating to add new edge %', rec.topogeo_id, rec.layer_id, anedge, newedgeid; + + -- Add new reference to edge1 + IF rec.element_id < 0 THEN + tmp = -newedgeid; + ELSE + tmp = newedgeid; + END IF; + query = 'INSERT INTO ' || quote_ident(atopology) + || '.relation ' + || ' VALUES( ' + || rec.topogeo_id + || ',' + || rec.layer_id + || ',' + || tmp + || ',' + || rec.element_type + || ')'; + + --RAISE NOTICE '%', query; + EXECUTE query; + END LOOP; + + --RAISE NOTICE 'Edge % split in edges % and % by node %', + -- anedge, anedge, newedgeid, nodeid; + + RETURN nodeid; +END +$$ +LANGUAGE 'plpgsql' VOLATILE; +--} ST_ModEdgesSplit + +--{ +-- Topo-Geo and Topo-Net 3: Routine Details +-- X.3.4 +-- +-- ST_AddIsoEdge(atopology, anode, anothernode, acurve) +-- +-- Not in the specs: +-- * Reset containing_face for starting and ending point, +-- as they stop being isolated nodes +-- * Refuse to add a closed edge, as it would not be isolated +-- (ie: would create a ring) +-- +-- }{ +-- +CREATE OR REPLACE FUNCTION topology.ST_AddIsoEdge(atopology varchar, anode integer, anothernode integer, acurve geometry) + RETURNS INTEGER AS +$$ +DECLARE + aface INTEGER; + face GEOMETRY; + snodegeom GEOMETRY; + enodegeom GEOMETRY; + count INTEGER; + rec RECORD; + edgeid INTEGER; +BEGIN + + -- + -- All arguments required + -- + IF atopology IS NULL + OR anode IS NULL + OR anothernode IS NULL + OR acurve IS NULL + THEN + RAISE EXCEPTION + 'SQL/MM Spatial exception - null argument'; + END IF; + + -- NOT IN THE SPECS: + -- A closed edge is never isolated (as it forms a face) + IF anode = anothernode THEN + RAISE EXCEPTION + 'Closed edges would not be isolated, try ST_AddEdgeNewFaces'; + END IF; + + -- + -- Acurve must be a LINESTRING + -- + IF substring(geometrytype(acurve), 1, 4) != 'LINE' + THEN + RAISE EXCEPTION + 'SQL/MM Spatial exception - invalid curve'; + END IF; + + -- + -- Acurve must be simple + -- + IF NOT ST_IsSimple(acurve) + THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - curve not simple'; + END IF; + + -- + -- Check for: + -- existence of nodes + -- nodes faces match + -- Extract: + -- nodes face id + -- nodes geoms + -- + aface := NULL; + count := 0; + FOR rec IN EXECUTE 'SELECT geom, containing_face, node_id FROM ' + || quote_ident(atopology) || '.node + WHERE node_id = ' || anode || + ' OR node_id = ' || anothernode + LOOP + + IF rec.containing_face IS NULL THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - not isolated node'; + END IF; + + IF aface IS NULL THEN + aface := rec.containing_face; + ELSE + IF aface != rec.containing_face THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - nodes in different faces'; + END IF; + END IF; + + -- Get nodes geom + IF rec.node_id = anode THEN + snodegeom = rec.geom; + ELSE + enodegeom = rec.geom; + END IF; + + count = count+1; + + END LOOP; + + -- TODO: don't need count, can do with snodegeom/enodegeom instead.. + IF count < 2 THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - non-existent node'; + END IF; + + + -- + -- l) Check that start point of acurve match start node + -- geoms. + -- + IF ST_X(snodegeom) != ST_X(ST_StartPoint(acurve)) OR + ST_Y(snodegeom) != ST_Y(ST_StartPoint(acurve)) + THEN + RAISE EXCEPTION + 'SQL/MM Spatial exception - start node not geometry start point.'; + END IF; + + -- + -- m) Check that end point of acurve match end node + -- geoms. + -- + IF ST_X(enodegeom) != ST_X(ST_EndPoint(acurve)) OR + ST_Y(enodegeom) != ST_Y(ST_EndPoint(acurve)) + THEN + RAISE EXCEPTION + 'SQL/MM Spatial exception - end node not geometry end point.'; + END IF; + + -- + -- n) Check if curve crosses (contains) any node + -- I used _contains_ here to leave endpoints out + -- + FOR rec IN EXECUTE 'SELECT node_id FROM ' + || quote_ident(atopology) || '.node ' + || ' WHERE geom && ' || quote_literal(acurve::text) + || ' AND ST_Contains(' || quote_literal(acurve::text) + || ',geom)' + LOOP + RAISE EXCEPTION + 'SQL/MM Spatial exception - geometry crosses a node'; + END LOOP; + + -- + -- o) Check if curve intersects any other edge + -- + FOR rec IN EXECUTE 'SELECT * FROM ' + || quote_ident(atopology) || '.edge_data + WHERE ST_Intersects(geom, ' || quote_literal(acurve::text) || '::geometry)' + LOOP + RAISE EXCEPTION 'SQL/MM Spatial exception - geometry intersects an edge'; + END LOOP; + + -- + -- Get new edge id from sequence + -- + FOR rec IN EXECUTE 'SELECT nextval(''' || + atopology || '.edge_data_edge_id_seq'')' + LOOP + edgeid = rec.nextval; + END LOOP; + + -- TODO: this should likely be an exception instead ! + IF aface IS NULL THEN + aface := 0; + END IF; + + -- + -- Insert the new row + -- + EXECUTE 'INSERT INTO ' || quote_ident(atopology) + || '.edge VALUES(' || edgeid || ',' || anode + || ',' || anothernode || ',' || (-edgeid) + || ',' || edgeid || ',' + || aface || ',' || aface || ',' + || quote_literal(acurve::text) || ')'; + + -- + -- Update Node containing_face values + -- + -- the nodes anode and anothernode are no more isolated + -- because now there is an edge connecting them + -- + EXECUTE 'UPDATE ' || quote_ident(atopology) + || '.node SET containing_face = NULL where (node_id =' + || anode + || ' OR node_id=' + || anothernode + || ')'; + + RETURN edgeid; + +END +$$ +LANGUAGE 'plpgsql' VOLATILE; +--} ST_AddIsoEdge + +-- Internal function used by ST_ChangeEdgeGeom to compare +-- adjacent edges of an edge endpoint +-- +-- @param anode the node to use edge end star of +-- @param anedge the directed edge to get adjacents from +-- if positive `anode' is assumed to be its start node +-- if negative `anode' is assumed to be its end node +-- +-- { +CREATE OR REPLACE FUNCTION topology._ST_AdjacentEdges(atopology varchar, anode integer, anedge integer) +RETURNS integer[] AS +$$ +DECLARE + ret integer[]; +BEGIN + WITH edgestar AS ( + SELECT *, count(*) over () AS cnt + FROM GetNodeEdges(atopology, anode) + ) + SELECT ARRAY[ ( + SELECT p.edge AS prev FROM edgestar p + WHERE p.sequence = CASE WHEN m.sequence-1 < 1 THEN cnt + ELSE m.sequence-1 END + ), ( + SELECT p.edge AS prev FROM edgestar p WHERE p.sequence = ((m.sequence)%cnt)+1 + ) ] + FROM edgestar m + WHERE edge = anedge + INTO ret; + + RETURN ret; +END +$$ +LANGUAGE 'plpgsql' STABLE; +--} + +--{ +-- Topo-Geo and Topo-Net 3: Routine Details +-- X.3.6 +-- +-- ST_ChangeEdgeGeom(atopology, anedge, acurve) +-- +-- Not in the specs: +-- * Raise an exception if given a non-existent edge +-- * Raise an exception if movement is not topologically isomorphic +-- +-- }{ +CREATE OR REPLACE FUNCTION topology.ST_ChangeEdgeGeom(atopology varchar, anedge integer, acurve geometry) + RETURNS TEXT AS +$$ +DECLARE + rec RECORD; + oldedge RECORD; + range GEOMETRY; -- movement range + tmp1 GEOMETRY; + tmp2 GEOMETRY; + snode_info RECORD; + enode_info RECORD; + sql TEXT; + iscw BOOLEAN; +BEGIN + + -- + -- All arguments required + -- + IF atopology IS NULL + OR anedge IS NULL + OR acurve IS NULL + THEN + RAISE EXCEPTION + 'SQL/MM Spatial exception - null argument'; + END IF; + + -- + -- Acurve must be a LINESTRING + -- + IF substring(geometrytype(acurve), 1, 4) != 'LINE' + THEN + RAISE EXCEPTION + 'SQL/MM Spatial exception - invalid curve'; + END IF; + + -- + -- Acurve must be a simple + -- + IF NOT ST_IsSimple(acurve) + THEN + RAISE EXCEPTION + 'SQL/MM Spatial exception - curve not simple'; + END IF; + + -- + -- Get data about existing edge + -- + BEGIN + EXECUTE 'SELECT * FROM ' || quote_ident(atopology) || '.edge_data ' + || ' WHERE edge_id = ' || anedge + INTO STRICT oldedge; + EXCEPTION + -- NOT IN THE SPECS: check given edge existance + WHEN NO_DATA_FOUND THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - non-existent edge %', anedge; + END; + + -- + -- e) Check StartPoint consistency + -- + IF NOT ST_Equals(ST_StartPoint(acurve), ST_StartPoint(oldedge.geom)) THEN + RAISE EXCEPTION + 'SQL/MM Spatial exception - start node not geometry start point.'; + END IF; + + IF oldedge.start_node = oldedge.end_node THEN -- { + + -- Not in the specs: + -- if the edge is closed, check we didn't change winding ! + -- (should be part of isomorphism checking) + range := ST_MakePolygon(oldedge.geom); + iscw := ST_OrderingEquals(range, ST_ForceRHR(range)); + + IF ST_NumPoints(ST_RemoveRepeatedPoints(acurve)) < 3 THEN + RAISE EXCEPTION 'Invalid edge (no two distinct vertices exist)'; + END IF; + range := ST_MakePolygon(acurve); + + IF iscw != ST_OrderingEquals(range, ST_ForceRHR(range)) THEN + RAISE EXCEPTION 'Edge twist at node %', + ST_AsText(ST_StartPoint(oldedge.geom)); + END IF; + + ELSE -- }{ + + -- + -- f) Check EndPoint consistency + -- + IF NOT ST_Equals(ST_EndPoint(acurve), ST_EndPoint(oldedge.geom)) THEN + RAISE EXCEPTION + 'SQL/MM Spatial exception - end node not geometry end point.'; + END IF; + + END IF; -- } + + -- + -- g) Check if curve crosses any node + -- + FOR rec IN EXECUTE + 'SELECT node_id, ST_Relate(geom, ' + || quote_literal(acurve::text) || '::geometry, 2) as relate FROM ' + || quote_ident(atopology) + || '.node WHERE geom && ' + || quote_literal(acurve::text) + || '::geometry' + LOOP + IF ST_RelateMatch(rec.relate, 'T********') THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - geometry crosses a node'; + END IF; + END LOOP; + + -- + -- h) Check if this geometry has any interaction with any existing edge + -- + sql := 'SELECT edge_id, ST_Relate(geom,' + || quote_literal(acurve::text) + || '::geometry, 2) as im FROM ' + || quote_ident(atopology) + || '.edge_data WHERE edge_id != ' || anedge || ' AND geom && ' + || quote_literal(acurve::text) || '::geometry'; + FOR rec IN EXECUTE sql LOOP -- { + + --RAISE DEBUG 'IM=%',rec.im; + + IF ST_RelateMatch(rec.im, 'F********') THEN + CONTINUE; -- no interior-interior intersection + END IF; + + IF ST_RelateMatch(rec.im, '1FFF*FFF2') THEN + RAISE EXCEPTION + 'SQL/MM Spatial exception - coincident edge %', rec.edge_id; + END IF; + + -- NOT IN THE SPECS: geometry touches an edge + IF ST_RelateMatch(rec.im, '1********') THEN + RAISE EXCEPTION + 'Spatial exception - geometry intersects edge %', rec.edge_id; + END IF; + + IF ST_RelateMatch(rec.im, 'T********') THEN + RAISE EXCEPTION + 'SQL/MM Spatial exception - geometry crosses edge %', rec.edge_id; + END IF; + + END LOOP; -- } + + -- + -- Not in the specs: + -- Check topological isomorphism + -- + + -- Check that the "motion range" doesn't include any node + --{ + + tmp1 := ST_MakeLine(ST_EndPoint(oldedge.geom), ST_StartPoint(oldedge.geom)); +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'end-to-start: %', ST_AsText(tmp1); +#endif + + tmp2 := ST_MakeLine(oldedge.geom, tmp1); + IF ST_NumPoints(tmp2) < 4 THEN + tmp2 := ST_AddPoint(tmp2, ST_StartPoint(oldedge.geom)); + END IF; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Old-ring: %', ST_AsText(tmp2); +#endif + tmp2 := ST_CollectionExtract(ST_MakeValid(ST_MakePolygon(tmp2)), 3); +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Old-ring (poly): %', ST_AsText(tmp2); +#endif + + range := ST_MakeLine(acurve, tmp1); + IF ST_NumPoints(range) < 4 THEN + range := ST_AddPoint(range, ST_StartPoint(oldedge.geom)); + END IF; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'New-ring: %', ST_AsText(range); +#endif + range := ST_CollectionExtract(ST_MakeValid(ST_MakePolygon(range)), 3); +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'New-ring (poly): %', ST_AsText(range); +#endif + + range := ST_SymDifference(range, tmp2); +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Range motion: %', ST_AsText(range); +#endif + + sql := 'SELECT node_id, geom FROM ' + || quote_ident(atopology) + || '.node WHERE ST_Contains(' + || quote_literal(range::text) + || '::geometry, geom) LIMIT 1'; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG '%', sql; +#endif + FOR rec IN EXECUTE sql LOOP -- { + RAISE EXCEPTION 'Edge motion collision at %', ST_AsText(rec.geom); + END LOOP; -- } + + --} motion range checking end + + -- + -- Check edge adjacency before + --{ + + SELECT topology._ST_AdjacentEdges( + atopology, oldedge.start_node, anedge + ) as pre, NULL::integer[] as post + INTO STRICT snode_info; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Bs:%', snode_info.pre; +#endif + + SELECT topology._ST_AdjacentEdges( + atopology, oldedge.end_node, -anedge + ) as pre, NULL::integer[] as post + INTO STRICT enode_info; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Be:%', enode_info.pre; +#endif + + --} + + -- + -- Update edge geometry + -- + EXECUTE 'UPDATE ' || quote_ident(atopology) || '.edge_data ' + || ' SET geom = ' || quote_literal(acurve::text) + || ' WHERE edge_id = ' || anedge; + + -- + -- Check edge adjacency after + --{ + + snode_info.post := topology._ST_AdjacentEdges( + atopology, oldedge.start_node, anedge + ); +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'As:%', snode_info.post; +#endif + + enode_info.post := topology._ST_AdjacentEdges( + atopology, oldedge.end_node, -anedge + ); +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Ae:%', enode_info.post; +#endif + + IF snode_info.pre != snode_info.post THEN + RAISE EXCEPTION 'Edge changed disposition around start node %', + oldedge.start_node; + END IF; + + IF enode_info.pre != enode_info.post THEN + RAISE EXCEPTION 'Edge changed disposition around end node %', + oldedge.end_node; + END IF; + + --} + + -- Update faces MBR of left and right faces + -- TODO: think about ways to optimize this part, like see if + -- the old edge geometry partecipated in the definition + -- of the current MBR (for shrinking) or the new edge MBR + -- would be larger than the old face MBR... + -- + IF oldedge.left_face != 0 THEN + sql := 'UPDATE ' || quote_ident(atopology) || '.face ' + || ' SET mbr = ' || quote_literal( + ST_Envelope(ST_GetFaceGeometry(atopology, oldedge.left_face))::text + ) + || '::geometry WHERE face_id = ' || oldedge.left_face; + EXECUTE sql; + END IF; + IF oldedge.right_face != 0 AND oldedge.right_face != oldedge.left_face THEN + sql := 'UPDATE ' || quote_ident(atopology) || '.face ' + || ' SET mbr = ' || quote_literal( + ST_Envelope(ST_GetFaceGeometry(atopology, oldedge.right_face))::text + ) + || '::geometry WHERE face_id = ' || oldedge.right_face; + EXECUTE sql; + END IF; + + + RETURN 'Edge ' || anedge || ' changed'; + +END +$$ +LANGUAGE 'plpgsql' VOLATILE; +--} ST_ChangeEdgeGeom + +-- +-- _ST_AddFaceSplit +-- +-- Add a split face by walking on the edge side. +-- +-- @param atopology topology name +-- @param anedge edge id and walking side (left:positive right:negative) +-- @param oface the face in which the edge identifier is known to be +-- @param mbr_only do not create a new face but update MBR of the current +-- +-- The created face, if any, will be at the left hand of the walking path +-- +-- Return: +-- NULL: if mbr_only was requested +-- 0: if the edge does not form a ring +-- NULL: if it is impossible to create a face on the requested side +-- ( new face on the side is the universe ) +-- >0 : id of newly added face +-- +-- { +CREATE OR REPLACE FUNCTION topology._ST_AddFaceSplit(atopology varchar, anedge integer, oface integer, mbr_only bool) + RETURNS INTEGER AS +$$ +DECLARE + fan RECORD; + newface INTEGER; + sql TEXT; + isccw BOOLEAN; + ishole BOOLEAN; + +BEGIN + + IF oface = 0 AND mbr_only THEN +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Universal face has no MBR, doing nothing'; +#endif + RETURN NULL; + END IF; + + SELECT null::int[] as newring_edges, + null::geometry as shell + INTO fan; + + SELECT array_agg(edge) + FROM topology.getringedges(atopology, anedge) + INTO STRICT fan.newring_edges; + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'ring: %', fan.newring_edges; +#endif + + -- You can't get to the other side of an edge forming a ring + IF fan.newring_edges @> ARRAY[-anedge] THEN +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'not a ring'; +#endif + RETURN 0; + END IF; + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Edge % splitted face %', anedge, oface; +#endif + + sql := 'WITH ids as ( select row_number() over () as seq, edge from unnest(' + || quote_literal(fan.newring_edges::text) + || '::int[] ) u(edge) ), edges AS ( select CASE WHEN i.edge < 0 THEN ST_Reverse(e.geom) ELSE e.geom END as g FROM ids i left join ' + || quote_ident(atopology) || '.edge_data e ON(e.edge_id = abs(i.edge)) ORDER BY seq) SELECT ST_MakePolygon(ST_MakeLine(g.g)) FROM edges g;'; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG '%', sql; +#endif + EXECUTE sql INTO fan.shell; + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'got shell'; +#endif + + isccw := NOT ST_OrderingEquals(fan.shell, ST_ForceRHR(fan.shell)); + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'winding: %', CASE WHEN isccw THEN 'CCW' ELSE 'CW' END; +#endif + + IF oface = 0 THEN + IF NOT isccw THEN +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Not considering CW ring in universe face'; +#endif + RETURN NULL; + END IF; + END IF; + + IF mbr_only AND oface != 0 THEN + -- Update old face mbr (nothing to do if we're opening an hole) + IF isccw THEN -- { + sql := 'UPDATE ' + || quote_ident(atopology) || '.face SET mbr = ' + || quote_literal(ST_Envelope(fan.shell)::text) + || '::geometry WHERE face_id = ' || oface; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Updating old face mbr'; +#endif + EXECUTE sql; + END IF; -- } + RETURN NULL; + END IF; + + IF oface != 0 AND NOT isccw THEN -- { + -- Face created an hole in an outer face + sql := 'INSERT INTO ' + || quote_ident(atopology) || '.face(mbr) SELECT mbr FROM ' + || quote_ident(atopology) + || '.face WHERE face_id = ' || oface + || ' RETURNING face_id'; + ELSE + sql := 'INSERT INTO ' + || quote_ident(atopology) || '.face(mbr) VALUES (' + || quote_literal(ST_Envelope(fan.shell)::text) + || '::geometry) RETURNING face_id'; + END IF; -- } + + -- Insert new face +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Inserting new face'; +#endif + EXECUTE sql INTO STRICT newface; + + -- Update forward edges + sql := 'UPDATE ' + || quote_ident(atopology) || '.edge_data SET left_face = ' || newface + || ' WHERE left_face = ' || oface || ' AND edge_id = ANY (' + || quote_literal(array( select +(x) from unnest(fan.newring_edges) u(x) )::text) + || ')'; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Updating forward edges in new ring'; +#endif + EXECUTE sql; + + -- Update backward edges + sql := 'UPDATE ' + || quote_ident(atopology) || '.edge_data SET right_face = ' || newface + || ' WHERE right_face = ' || oface || ' AND edge_id = ANY (' + || quote_literal(array( select -(x) from unnest(fan.newring_edges) u(x) )::text) + || ')'; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Updating backward edges in new ring'; +#endif + EXECUTE sql; + + IF oface != 0 AND NOT isccw THEN -- { + -- face shrinked, must update all non-contained edges and nodes +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Updating rings in former shell'; +#endif + ishole := true; + ELSE +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Updating contained edges'; +#endif + ishole := false; + END IF; -- } + + -- Update edges having new face on the left + sql := 'UPDATE ' + || quote_ident(atopology) + || '.edge_data SET left_face = CASE WHEN left_face = ' + || oface || ' THEN ' || newface + || ' ELSE left_face END, right_face = CASE WHEN right_face = ' + || oface || ' THEN ' || newface + || ' ELSE right_face END WHERE ( left_face = ' || oface + || ' OR right_face = ' || oface + || ') AND NOT edge_id = ANY (' + || quote_literal( array( + select abs(x) from unnest(fan.newring_edges) u(x) + )::text ) + || ') AND '; + IF ishole THEN sql := sql || 'NOT '; END IF; + sql := sql || 'ST_Contains(' || quote_literal(fan.shell::text) || '::geometry, geom)'; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Updating edges binding old face'; +#endif + EXECUTE sql; + + -- Update isolated nodes in new new face + sql := 'UPDATE ' + || quote_ident(atopology) || '.node SET containing_face = ' || newface + || ' WHERE containing_face = ' || oface + || ' AND '; + IF ishole THEN sql := sql || 'NOT '; END IF; + sql := sql || 'ST_Contains(' || quote_literal(fan.shell::text) || '::geometry, geom)'; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Updating isolated nodes in old face'; +#endif + EXECUTE sql; + + RETURN newface; + +END +$$ +LANGUAGE 'plpgsql' VOLATILE; +--} + +--{ +-- Topo-Geo and Topo-Net 3: Routine Details +-- X.3.12 +-- +-- ST_AddEdgeNewFaces(atopology, anode, anothernode, acurve) +-- +-- Not in the specs: +-- * Reset containing_face for starting and ending point, +-- as they stop being isolated nodes +-- * Update references in the Relation table. +-- +CREATE OR REPLACE FUNCTION topology.ST_AddEdgeNewFaces(atopology varchar, anode integer, anothernode integer, acurve geometry) + RETURNS INTEGER AS +$$ +DECLARE + rec RECORD; + i INTEGER; + topoid INTEGER; + az FLOAT8; + span RECORD; -- start point analysis data + epan RECORD; -- end point analysis data + fan RECORD; -- face analisys + newedge RECORD; -- informations about new edge + sql TEXT; + newfaces INTEGER[]; + newface INTEGER; +BEGIN + + -- + -- All args required + -- + IF atopology IS NULL + OR anode IS NULL + OR anothernode IS NULL + OR acurve IS NULL + THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - null argument'; + END IF; + + -- + -- Acurve must be a LINESTRING + -- + IF substring(geometrytype(acurve), 1, 4) != 'LINE' + THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - invalid curve'; + END IF; + + -- + -- Curve must be simple + -- + IF NOT ST_IsSimple(acurve) THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - curve not simple'; + END IF; + + -- + -- Get topology id + -- + BEGIN + SELECT id FROM topology.topology + INTO STRICT topoid WHERE name = atopology; + EXCEPTION + WHEN NO_DATA_FOUND THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - invalid topology name'; + END; + + -- Initialize new edge info (will be filled up more later) + SELECT anode as start_node, anothernode as end_node, acurve as geom, + NULL::int as next_left_edge, NULL::int as next_right_edge, + NULL::int as left_face, NULL::int as right_face, NULL::int as edge_id, + NULL::int as prev_left_edge, NULL::int as prev_right_edge, -- convenience + anode = anothernode as isclosed, -- convenience + false as start_node_isolated, -- convenience + false as end_node_isolated, -- convenience + NULL::geometry as start_node_geom, -- convenience + NULL::geometry as end_node_geom, -- convenience + ST_RemoveRepeatedPoints(acurve) as cleangeom -- convenience + INTO newedge; + + -- Compute azimuth of first edge end on start node + SELECT null::int AS nextCW, null::int AS nextCCW, + null::float8 AS minaz, null::float8 AS maxaz, + false AS was_isolated, + ST_Azimuth(ST_StartPoint(newedge.cleangeom), + ST_PointN(newedge.cleangeom, 2)) AS myaz + INTO span; + IF span.myaz IS NULL THEN + RAISE EXCEPTION 'Invalid edge (no two distinct vertices exist)'; + END IF; + + -- Compute azimuth of last edge end on end node + SELECT null::int AS nextCW, null::int AS nextCCW, + null::float8 AS minaz, null::float8 AS maxaz, + false AS was_isolated, + ST_Azimuth(ST_EndPoint(newedge.cleangeom), + ST_PointN(newedge.cleangeom, + ST_NumPoints(newedge.cleangeom)-1)) AS myaz + INTO epan; + IF epan.myaz IS NULL THEN + RAISE EXCEPTION 'Invalid edge (no two distinct vertices exist)'; + END IF; + + + -- + -- Check endpoints existance, match with Curve geometry + -- and get face information (if any) + -- + i := 0; + FOR rec IN EXECUTE 'SELECT node_id, containing_face, geom FROM ' + || quote_ident(atopology) + || '.node WHERE node_id IN ( ' + || anode || ',' || anothernode + || ')' + LOOP + IF rec.containing_face IS NOT NULL THEN +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'containing_face for node %:%', + rec.node_id, rec.containing_face; +#endif + IF newedge.left_face IS NULL THEN + newedge.left_face := rec.containing_face; + newedge.right_face := rec.containing_face; + ELSE + IF newedge.left_face != rec.containing_face THEN + RAISE EXCEPTION + 'SQL/MM Spatial exception - geometry crosses an edge (endnodes in faces % and %)', newedge.left_face, rec.containing_face; + END IF; + END IF; + END IF; + + IF rec.node_id = anode THEN + newedge.start_node_geom = rec.geom; + END IF; + + IF rec.node_id = anothernode THEN + newedge.end_node_geom = rec.geom; + END IF; + + i := i + 1; + END LOOP; + + IF newedge.start_node_geom IS NULL + THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - non-existent node'; + ELSIF NOT Equals(newedge.start_node_geom, ST_StartPoint(acurve)) + THEN + RAISE EXCEPTION + 'SQL/MM Spatial exception - start node not geometry start point.'; + END IF; + + IF newedge.end_node_geom IS NULL + THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - non-existent node'; + ELSIF NOT Equals(newedge.end_node_geom, ST_EndPoint(acurve)) + THEN + RAISE EXCEPTION + 'SQL/MM Spatial exception - end node not geometry end point.'; + END IF; + + RAISE DEBUG 'All Checked !'; + + -- + -- Check if this geometry crosses any node + -- + FOR rec IN EXECUTE + 'SELECT node_id, ST_Relate(geom, ' + || quote_literal(acurve::text) || '::geometry, 2) as relate FROM ' + || quote_ident(atopology) + || '.node WHERE geom && ' + || quote_literal(acurve::text) + || '::geometry' + LOOP + IF ST_RelateMatch(rec.relate, 'T********') THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - geometry crosses a node'; + END IF; + END LOOP; + + -- + -- Check if this geometry has any interaction with any existing edge + -- + FOR rec IN EXECUTE 'SELECT edge_id, ST_Relate(geom,' + || quote_literal(acurve::text) + || '::geometry, 2) as im FROM ' + || quote_ident(atopology) + || '.edge_data WHERE geom && ' + || quote_literal(acurve::text) || '::geometry' + LOOP + + --RAISE DEBUG 'IM=%',rec.im; + + IF ST_RelateMatch(rec.im, 'F********') THEN + CONTINUE; -- no interior intersection + END IF; + + IF ST_RelateMatch(rec.im, '1FFF*FFF2') THEN + RAISE EXCEPTION + 'SQL/MM Spatial exception - coincident edge %', rec.edge_id; + END IF; + + -- NOT IN THE SPECS: geometry touches an edge + IF ST_RelateMatch(rec.im, '1********') THEN + RAISE EXCEPTION + 'Spatial exception - geometry intersects edge %', rec.edge_id; + END IF; + + IF ST_RelateMatch(rec.im, 'T********') THEN + RAISE EXCEPTION + 'SQL/MM Spatial exception - geometry crosses edge %', rec.edge_id; + END IF; + + END LOOP; + + --------------------------------------------------------------- + -- + -- All checks passed, time to prepare the new edge + -- + --------------------------------------------------------------- + + EXECUTE 'SELECT nextval(' || quote_literal( + quote_ident(atopology) || '.edge_data_edge_id_seq') || ')' + INTO STRICT newedge.edge_id; + + + -- Find links on start node -- { + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'My start-segment azimuth: %', span.myaz; +#endif + + sql := + 'SELECT edge_id, -1 AS end_node, start_node, left_face, right_face, ' + || 'ST_RemoveRepeatedPoints(geom) as geom FROM ' + || quote_ident(atopology) + || '.edge_data WHERE start_node = ' || anode + || ' UNION SELECT edge_id, end_node, -1, left_face, right_face, ' + || 'ST_RemoveRepeatedPoints(geom) FROM ' + || quote_ident(atopology) + || '.edge_data WHERE end_node = ' || anode; + IF newedge.isclosed THEN + sql := sql || ' UNION SELECT ' + || newedge.edge_id || ',' || newedge.end_node + || ',-1,0,0,' -- pretend we start elsewhere + || quote_literal(newedge.cleangeom::text); + END IF; + i := 0; + FOR rec IN EXECUTE sql + LOOP -- incident edges { + + i := i + 1; + + IF rec.start_node = anode THEN + -- + -- Edge starts at our node, we compute + -- azimuth from node to its second point + -- + az := ST_Azimuth(ST_StartPoint(rec.geom), ST_PointN(rec.geom, 2)); + + ELSE + -- + -- Edge ends at our node, we compute + -- azimuth from node to its second-last point + -- + az := ST_Azimuth(ST_EndPoint(rec.geom), + ST_PointN(rec.geom, ST_NumPoints(rec.geom)-1)); + rec.edge_id := -rec.edge_id; + + END IF; + + IF az IS NULL THEN + RAISE EXCEPTION 'Invalid edge % found (no two distinct nodes exist)', + rec.edge_id; + END IF; + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Edge % - az % (%) - fl:% fr:%', + rec.edge_id, az, az - span.myaz, rec.left_face, rec.right_face; +#endif + + az = az - span.myaz; + IF az < 0 THEN + az := az + 2*PI(); + END IF; + + -- RAISE DEBUG ' normalized az %', az; + + IF span.maxaz IS NULL OR az > span.maxaz THEN + span.maxaz := az; + span.nextCCW := rec.edge_id; + IF abs(rec.edge_id) != newedge.edge_id THEN + IF rec.edge_id < 0 THEN + -- TODO: check for mismatch ? + newedge.left_face := rec.left_face; + ELSE + -- TODO: check for mismatch ? + newedge.left_face := rec.right_face; + END IF; + END IF; + END IF; + + IF span.minaz IS NULL OR az < span.minaz THEN + span.minaz := az; + span.nextCW := rec.edge_id; + IF abs(rec.edge_id) != newedge.edge_id THEN + IF rec.edge_id < 0 THEN + -- TODO: check for mismatch ? + newedge.right_face := rec.right_face; + ELSE + -- TODO: check for mismatch ? + newedge.right_face := rec.left_face; + END IF; + END IF; + END IF; + + --RAISE DEBUG 'Closest edges: CW:%(%) CCW:%(%)', span.nextCW, span.minaz, span.nextCCW, span.maxaz; + + END LOOP; -- incident edges } + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'span ROW_COUNT: %', i; +#endif + IF newedge.isclosed THEN + IF i < 2 THEN span.was_isolated = true; END IF; + ELSE + IF i < 1 THEN span.was_isolated = true; END IF; + END IF; + + IF span.nextCW IS NULL THEN + -- This happens if the destination node is isolated + newedge.next_right_edge := newedge.edge_id; + newedge.prev_left_edge := -newedge.edge_id; + ELSE + newedge.next_right_edge := span.nextCW; + newedge.prev_left_edge := -span.nextCCW; + END IF; + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'edge:%', newedge.edge_id; +#endif +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG ' left:%, next:%, prev:%', + newedge.left_face, newedge.next_left_edge, newedge.prev_left_edge; +#endif +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG ' right:%, next:%, prev:%', + newedge.right_face, newedge.next_right_edge, newedge.prev_right_edge; +#endif + + -- } start_node analysis + + + -- Find links on end_node { + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'My end-segment azimuth: %', epan.myaz; +#endif + + sql := + 'SELECT edge_id, -1 as end_node, start_node, left_face, right_face, ' + || 'ST_RemoveRepeatedPoints(geom) as geom FROM ' + || quote_ident(atopology) + || '.edge_data WHERE start_node = ' || anothernode + || 'UNION SELECT edge_id, end_node, -1, left_face, right_face, ' + || 'ST_RemoveRepeatedPoints(geom) FROM ' + || quote_ident(atopology) + || '.edge_data WHERE end_node = ' || anothernode; + IF newedge.isclosed THEN + sql := sql || ' UNION SELECT ' + || newedge.edge_id || ',' || -1 -- pretend we end elsewhere + || ',' || newedge.start_node || ',0,0,' + || quote_literal(newedge.cleangeom::text); + END IF; + i := 0; + FOR rec IN EXECUTE sql + LOOP -- incident edges { + + i := i + 1; + + IF rec.start_node = anothernode THEN + -- + -- Edge starts at our node, we compute + -- azimuth from node to its second point + -- + az := ST_Azimuth(ST_StartPoint(rec.geom), + ST_PointN(rec.geom, 2)); + + ELSE + -- + -- Edge ends at our node, we compute + -- azimuth from node to its second-last point + -- + az := ST_Azimuth(ST_EndPoint(rec.geom), + ST_PointN(rec.geom, ST_NumPoints(rec.geom)-1)); + rec.edge_id := -rec.edge_id; + + END IF; + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Edge % - az % (%)', rec.edge_id, az, az - epan.myaz; +#endif + + az := az - epan.myaz; + IF az < 0 THEN + az := az + 2*PI(); + END IF; + + -- RAISE DEBUG ' normalized az %', az; + + IF epan.maxaz IS NULL OR az > epan.maxaz THEN + epan.maxaz := az; + epan.nextCCW := rec.edge_id; + IF abs(rec.edge_id) != newedge.edge_id THEN + IF rec.edge_id < 0 THEN + -- TODO: check for mismatch ? + newedge.right_face := rec.left_face; + ELSE + -- TODO: check for mismatch ? + newedge.right_face := rec.right_face; + END IF; + END IF; + END IF; + + IF epan.minaz IS NULL OR az < epan.minaz THEN + epan.minaz := az; + epan.nextCW := rec.edge_id; + IF abs(rec.edge_id) != newedge.edge_id THEN + IF rec.edge_id < 0 THEN + -- TODO: check for mismatch ? + newedge.left_face := rec.right_face; + ELSE + -- TODO: check for mismatch ? + newedge.left_face := rec.left_face; + END IF; + END IF; + END IF; + + --RAISE DEBUG 'Closest edges: CW:%(%) CCW:%(%)', epan.nextCW, epan.minaz, epan.nextCCW, epan.maxaz; + + END LOOP; -- incident edges } + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'epan ROW_COUNT: %', i; +#endif + IF newedge.isclosed THEN + IF i < 2 THEN epan.was_isolated = true; END IF; + ELSE + IF i < 1 THEN epan.was_isolated = true; END IF; + END IF; + + IF epan.nextCW IS NULL THEN + -- This happens if the destination node is isolated + newedge.next_left_edge := -newedge.edge_id; + newedge.prev_right_edge := newedge.edge_id; + ELSE + newedge.next_left_edge := epan.nextCW; + newedge.prev_right_edge := -epan.nextCCW; + END IF; + + -- } end_node analysis + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'edge:%', newedge.edge_id; +#endif +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG ' left:%, next:%, prev:%', + newedge.left_face, newedge.next_left_edge, newedge.prev_left_edge; +#endif +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG ' right:%, next:%, prev:%', + newedge.right_face, newedge.next_right_edge, newedge.prev_right_edge; +#endif + + ---------------------------------------------------------------------- + -- + -- If we don't have faces setup by now we must have encountered + -- a malformed topology (no containing_face on isolated nodes, no + -- left/right faces on adjacent edges or mismatching values) + -- + ---------------------------------------------------------------------- + IF newedge.left_face != newedge.right_face THEN + RAISE EXCEPTION 'Left(%)/right(%) faces mismatch: invalid topology ?', + newedge.left_face, newedge.right_face; + END IF; + IF newedge.left_face IS NULL THEN + RAISE EXCEPTION 'Could not derive edge face from linked primitives: invalid topology ?'; + END IF; + + ---------------------------------------------------------------------- + -- + -- Insert the new edge, and update all linking + -- + ---------------------------------------------------------------------- + + -- Insert the new edge with what we have so far + EXECUTE 'INSERT INTO ' || quote_ident(atopology) + || '.edge VALUES(' || newedge.edge_id + || ',' || newedge.start_node + || ',' || newedge.end_node + || ',' || newedge.next_left_edge + || ',' || newedge.next_right_edge + || ',' || newedge.left_face + || ',' || newedge.right_face + || ',' || quote_literal(newedge.geom::geometry::text) + || ')'; + + -- Link prev_left_edge to us + -- (if it's not us already) + IF abs(newedge.prev_left_edge) != newedge.edge_id THEN + IF newedge.prev_left_edge > 0 THEN + -- its next_left_edge is us + EXECUTE 'UPDATE ' || quote_ident(atopology) + || '.edge_data SET next_left_edge = ' + || newedge.edge_id + || ', abs_next_left_edge = ' + || newedge.edge_id + || ' WHERE edge_id = ' + || newedge.prev_left_edge; + ELSE + -- its next_right_edge is us + EXECUTE 'UPDATE ' || quote_ident(atopology) + || '.edge_data SET next_right_edge = ' + || newedge.edge_id + || ', abs_next_right_edge = ' + || newedge.edge_id + || ' WHERE edge_id = ' + || -newedge.prev_left_edge; + END IF; + END IF; + + -- Link prev_right_edge to us + -- (if it's not us already) + IF abs(newedge.prev_right_edge) != newedge.edge_id THEN + IF newedge.prev_right_edge > 0 THEN + -- its next_left_edge is -us + EXECUTE 'UPDATE ' || quote_ident(atopology) + || '.edge_data SET next_left_edge = ' + || -newedge.edge_id + || ', abs_next_left_edge = ' + || newedge.edge_id + || ' WHERE edge_id = ' + || newedge.prev_right_edge; + ELSE + -- its next_right_edge is -us + EXECUTE 'UPDATE ' || quote_ident(atopology) + || '.edge_data SET next_right_edge = ' + || -newedge.edge_id + || ', abs_next_right_edge = ' + || newedge.edge_id + || ' WHERE edge_id = ' + || -newedge.prev_right_edge; + END IF; + END IF; + + -- NOT IN THE SPECS... + -- set containing_face = null for start_node and end_node + -- if they where isolated + IF span.was_isolated OR epan.was_isolated THEN + EXECUTE 'UPDATE ' || quote_ident(atopology) + || '.node SET containing_face = null WHERE node_id IN (' + || anode || ',' || anothernode || ')'; + END IF; + + -------------------------------------------- + -- Check face splitting + -------------------------------------------- + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Checking right face'; +#endif + + SELECT topology._ST_AddFaceSplit(atopology, -newedge.edge_id, newedge.left_face, false) + INTO newface; + + IF newface = 0 THEN +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG ' No split'; +#endif + RETURN newedge.edge_id; + END IF; + + newfaces[1] := newface; + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Checking left face'; +#endif + SELECT topology._ST_AddFaceSplit(atopology, newedge.edge_id, newedge.left_face, false) + INTO newface; + + newfaces[2] := newface; + + IF newedge.left_face != 0 THEN -- { + + -- NOT IN THE SPECS: + -- update TopoGeometry compositions to substitute oldface with newfaces + sql := 'UPDATE ' + || quote_ident(atopology) + || '.relation r set element_id = ' || newfaces[1] + || ' FROM topology.layer l ' + || ' WHERE l.topology_id = ' || topoid + || ' AND l.level = 0 ' + || ' AND l.layer_id = r.layer_id ' + || ' AND r.element_id = ' || newedge.left_face + || ' AND r.element_type = 3 RETURNING r.topogeo_id, r.layer_id'; + --RAISE DEBUG 'SQL: %', sql; + FOR rec IN EXECUTE sql + LOOP +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'TopoGeometry % in layer % contained the face being split (%) - updating to contain both new faces %', rec.topogeo_id, rec.layer_id, newedge.left_face, newfaces; +#endif + + -- Add reference to the other face + sql := 'INSERT INTO ' || quote_ident(atopology) + || '.relation VALUES( ' || rec.topogeo_id + || ',' || rec.layer_id || ',' || newfaces[2] || ', 3)'; + --RAISE DEBUG 'SQL: %', sql; + EXECUTE sql; + + END LOOP; + + -- drop old face from faces table + sql := 'DELETE FROM ' || quote_ident(atopology) + || '.face WHERE face_id = ' || newedge.left_face; + EXECUTE sql; + + END IF; -- } + + RETURN newedge.edge_id; +END +$$ +LANGUAGE 'plpgsql' VOLATILE; +--} ST_AddEdgeNewFaces + +--{ +-- Topo-Geo and Topo-Net 3: Routine Details +-- X.3.13 +-- +-- ST_AddEdgeModFace(atopology, anode, anothernode, acurve) +-- +-- Not in the specs: +-- * Reset containing_face for starting and ending point, +-- as they stop being isolated nodes +-- * Update references in the Relation table. +-- +CREATE OR REPLACE FUNCTION topology.ST_AddEdgeModFace(atopology varchar, anode integer, anothernode integer, acurve geometry) + RETURNS INTEGER AS +$$ +DECLARE + rec RECORD; + rrec RECORD; + i INTEGER; + topoid INTEGER; + az FLOAT8; + span RECORD; -- start point analysis data + epan RECORD; -- end point analysis data + fan RECORD; -- face analisys + newedge RECORD; -- informations about new edge + sql TEXT; + newfaces INTEGER[]; + newface INTEGER; +BEGIN + + -- + -- All args required + -- + IF atopology IS NULL + OR anode IS NULL + OR anothernode IS NULL + OR acurve IS NULL + THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - null argument'; + END IF; + + -- + -- Acurve must be a LINESTRING + -- + IF substring(geometrytype(acurve), 1, 4) != 'LINE' + THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - invalid curve'; + END IF; + + -- + -- Curve must be simple + -- + IF NOT ST_IsSimple(acurve) THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - curve not simple'; + END IF; + + -- + -- Get topology id + -- + BEGIN + SELECT id FROM topology.topology + INTO STRICT topoid WHERE name = atopology; + EXCEPTION + WHEN NO_DATA_FOUND THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - invalid topology name'; + END; + + -- Initialize new edge info (will be filled up more later) + SELECT anode as start_node, anothernode as end_node, acurve as geom, + NULL::int as next_left_edge, NULL::int as next_right_edge, + NULL::int as left_face, NULL::int as right_face, NULL::int as edge_id, + NULL::int as prev_left_edge, NULL::int as prev_right_edge, -- convenience + anode = anothernode as isclosed, -- convenience + false as start_node_isolated, -- convenience + false as end_node_isolated, -- convenience + NULL::geometry as start_node_geom, -- convenience + NULL::geometry as end_node_geom, -- convenience + ST_RemoveRepeatedPoints(acurve) as cleangeom -- convenience + INTO newedge; + + -- Compute azimut of first edge end on start node + SELECT null::int AS nextCW, null::int AS nextCCW, + null::float8 AS minaz, null::float8 AS maxaz, + false AS was_isolated, + ST_Azimuth(ST_StartPoint(newedge.cleangeom), + ST_PointN(newedge.cleangeom, 2)) AS myaz + INTO span; + IF span.myaz IS NULL THEN + RAISE EXCEPTION 'Invalid edge (no two distinct vertices exist)'; + END IF; + + -- Compute azimuth of last edge end on end node + SELECT null::int AS nextCW, null::int AS nextCCW, + null::float8 AS minaz, null::float8 AS maxaz, + false AS was_isolated, + ST_Azimuth(ST_EndPoint(newedge.cleangeom), + ST_PointN(newedge.cleangeom, + ST_NumPoints(newedge.cleangeom)-1)) AS myaz + INTO epan; + IF epan.myaz IS NULL THEN + RAISE EXCEPTION 'Invalid edge (no two distinct vertices exist)'; + END IF; + + + -- + -- Check endpoints existance, match with Curve geometry + -- and get face information (if any) + -- + i := 0; + FOR rec IN EXECUTE 'SELECT node_id, containing_face, geom FROM ' + || quote_ident(atopology) + || '.node WHERE node_id IN ( ' + || anode || ',' || anothernode + || ')' + LOOP + IF rec.containing_face IS NOT NULL THEN +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'containing_face for node %:%', + rec.node_id, rec.containing_face; +#endif + IF newedge.left_face IS NULL THEN + newedge.left_face := rec.containing_face; + newedge.right_face := rec.containing_face; + ELSE + IF newedge.left_face != rec.containing_face THEN + RAISE EXCEPTION + 'SQL/MM Spatial exception - geometry crosses an edge (endnodes in faces % and %)', newedge.left_face, rec.containing_face; + END IF; + END IF; + END IF; + + IF rec.node_id = anode THEN + newedge.start_node_geom = rec.geom; + END IF; + + IF rec.node_id = anothernode THEN + newedge.end_node_geom = rec.geom; + END IF; + + i := i + 1; + END LOOP; + + IF newedge.start_node_geom IS NULL + THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - non-existent node'; + ELSIF NOT Equals(newedge.start_node_geom, ST_StartPoint(acurve)) + THEN + RAISE EXCEPTION + 'SQL/MM Spatial exception - start node not geometry start point.'; + END IF; + + IF newedge.end_node_geom IS NULL + THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - non-existent node'; + ELSIF NOT Equals(newedge.end_node_geom, ST_EndPoint(acurve)) + THEN + RAISE EXCEPTION + 'SQL/MM Spatial exception - end node not geometry end point.'; + END IF; + + -- + -- Check if this geometry crosses any node + -- + FOR rec IN EXECUTE + 'SELECT node_id, ST_Relate(geom, ' + || quote_literal(acurve::text) || '::geometry, 2) as relate FROM ' + || quote_ident(atopology) + || '.node WHERE geom && ' + || quote_literal(acurve::text) + || '::geometry' + LOOP + IF ST_RelateMatch(rec.relate, 'T********') THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - geometry crosses a node'; + END IF; + END LOOP; + + -- + -- Check if this geometry has any interaction with any existing edge + -- + FOR rec IN EXECUTE 'SELECT edge_id, ST_Relate(geom,' + || quote_literal(acurve::text) + || '::geometry, 2) as im FROM ' + || quote_ident(atopology) + || '.edge_data WHERE geom && ' + || quote_literal(acurve::text) || '::geometry' + LOOP + + --RAISE DEBUG 'IM=%',rec.im; + + IF ST_RelateMatch(rec.im, 'F********') THEN + CONTINUE; -- no interior intersection + END IF; + + IF ST_RelateMatch(rec.im, '1FFF*FFF2') THEN + RAISE EXCEPTION + 'SQL/MM Spatial exception - coincident edge %', rec.edge_id; + END IF; + + -- NOT IN THE SPECS: geometry touches an edge + IF ST_RelateMatch(rec.im, '1********') THEN + RAISE EXCEPTION + 'Spatial exception - geometry intersects edge %', rec.edge_id; + END IF; + + IF ST_RelateMatch(rec.im, 'T********') THEN + RAISE EXCEPTION + 'SQL/MM Spatial exception - geometry crosses edge %', rec.edge_id; + END IF; + + END LOOP; + + --------------------------------------------------------------- + -- + -- All checks passed, time to prepare the new edge + -- + --------------------------------------------------------------- + + EXECUTE 'SELECT nextval(' || quote_literal( + quote_ident(atopology) || '.edge_data_edge_id_seq') || ')' + INTO STRICT newedge.edge_id; + + + -- Find links on start node -- { + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'My start-segment azimuth: %', span.myaz; +#endif + + sql := + 'SELECT edge_id, -1 AS end_node, start_node, left_face, right_face, ' + || 'ST_RemoveRepeatedPoints(geom) as geom FROM ' + || quote_ident(atopology) + || '.edge_data WHERE start_node = ' || anode + || ' UNION SELECT edge_id, end_node, -1, left_face, right_face, ' + || 'ST_RemoveRepeatedPoints(geom) FROM ' + || quote_ident(atopology) + || '.edge_data WHERE end_node = ' || anode; + IF newedge.isclosed THEN + sql := sql || ' UNION SELECT ' + || newedge.edge_id || ',' || newedge.end_node + || ',-1,0,0,' -- pretend we start elsewhere + || quote_literal(newedge.cleangeom::text); + END IF; + i := 0; + FOR rec IN EXECUTE sql + LOOP -- incident edges { + + i := i + 1; + + IF rec.start_node = anode THEN + -- + -- Edge starts at our node, we compute + -- azimuth from node to its second point + -- + az := ST_Azimuth(ST_StartPoint(rec.geom), ST_PointN(rec.geom, 2)); + + ELSE + -- + -- Edge ends at our node, we compute + -- azimuth from node to its second-last point + -- + az := ST_Azimuth(ST_EndPoint(rec.geom), + ST_PointN(rec.geom, ST_NumPoints(rec.geom)-1)); + rec.edge_id := -rec.edge_id; + + END IF; + + IF az IS NULL THEN + RAISE EXCEPTION 'Invalid edge % found (no two distinct nodes exist)', + rec.edge_id; + END IF; + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Edge % - az % (%) - fl:% fr:%', + rec.edge_id, az, az - span.myaz, rec.left_face, rec.right_face; +#endif + + az = az - span.myaz; + IF az < 0 THEN + az := az + 2*PI(); + END IF; + + -- RAISE DEBUG ' normalized az %', az; + + IF span.maxaz IS NULL OR az > span.maxaz THEN + span.maxaz := az; + span.nextCCW := rec.edge_id; + IF abs(rec.edge_id) != newedge.edge_id THEN + IF rec.edge_id < 0 THEN + -- TODO: check for mismatch ? + newedge.left_face := rec.left_face; + ELSE + -- TODO: check for mismatch ? + newedge.left_face := rec.right_face; + END IF; + END IF; + END IF; + + IF span.minaz IS NULL OR az < span.minaz THEN + span.minaz := az; + span.nextCW := rec.edge_id; + IF abs(rec.edge_id) != newedge.edge_id THEN + IF rec.edge_id < 0 THEN + -- TODO: check for mismatch ? + newedge.right_face := rec.right_face; + ELSE + -- TODO: check for mismatch ? + newedge.right_face := rec.left_face; + END IF; + END IF; + END IF; + + --RAISE DEBUG 'Closest edges: CW:%(%) CCW:%(%)', span.nextCW, span.minaz, span.nextCCW, span.maxaz; + + END LOOP; -- incident edges } + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'span ROW_COUNT: %', i; +#endif + IF newedge.isclosed THEN + IF i < 2 THEN span.was_isolated = true; END IF; + ELSE + IF i < 1 THEN span.was_isolated = true; END IF; + END IF; + + IF span.nextCW IS NULL THEN + -- This happens if the destination node is isolated + newedge.next_right_edge := newedge.edge_id; + newedge.prev_left_edge := -newedge.edge_id; + ELSE + newedge.next_right_edge := span.nextCW; + newedge.prev_left_edge := -span.nextCCW; + END IF; + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'edge:%', newedge.edge_id; +#endif +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG ' left:%, next:%, prev:%', + newedge.left_face, newedge.next_left_edge, newedge.prev_left_edge; +#endif +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG ' right:%, next:%, prev:%', + newedge.right_face, newedge.next_right_edge, newedge.prev_right_edge; +#endif + + -- } start_node analysis + + + -- Find links on end_node { + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'My end-segment azimuth: %', epan.myaz; +#endif + + sql := + 'SELECT edge_id, -1 as end_node, start_node, left_face, right_face, ' + || 'ST_RemoveRepeatedPoints(geom) as geom FROM ' + || quote_ident(atopology) + || '.edge_data WHERE start_node = ' || anothernode + || 'UNION SELECT edge_id, end_node, -1, left_face, right_face, ' + || 'ST_RemoveRepeatedPoints(geom) FROM ' + || quote_ident(atopology) + || '.edge_data WHERE end_node = ' || anothernode; + IF newedge.isclosed THEN + sql := sql || ' UNION SELECT ' + || newedge.edge_id || ',' || -1 -- pretend we end elsewhere + || ',' || newedge.start_node || ',0,0,' + || quote_literal(newedge.cleangeom::text); + END IF; + i := 0; + FOR rec IN EXECUTE sql + LOOP -- incident edges { + + i := i + 1; + + IF rec.start_node = anothernode THEN + -- + -- Edge starts at our node, we compute + -- azimuth from node to its second point + -- + az := ST_Azimuth(ST_StartPoint(rec.geom), + ST_PointN(rec.geom, 2)); + + ELSE + -- + -- Edge ends at our node, we compute + -- azimuth from node to its second-last point + -- + az := ST_Azimuth(ST_EndPoint(rec.geom), + ST_PointN(rec.geom, ST_NumPoints(rec.geom)-1)); + rec.edge_id := -rec.edge_id; + + END IF; + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Edge % - az % (%)', rec.edge_id, az, az - epan.myaz; +#endif + + az := az - epan.myaz; + IF az < 0 THEN + az := az + 2*PI(); + END IF; + + -- RAISE DEBUG ' normalized az %', az; + + IF epan.maxaz IS NULL OR az > epan.maxaz THEN + epan.maxaz := az; + epan.nextCCW := rec.edge_id; + IF abs(rec.edge_id) != newedge.edge_id THEN + IF rec.edge_id < 0 THEN + -- TODO: check for mismatch ? + newedge.right_face := rec.left_face; + ELSE + -- TODO: check for mismatch ? + newedge.right_face := rec.right_face; + END IF; + END IF; + END IF; + + IF epan.minaz IS NULL OR az < epan.minaz THEN + epan.minaz := az; + epan.nextCW := rec.edge_id; + IF abs(rec.edge_id) != newedge.edge_id THEN + IF rec.edge_id < 0 THEN + -- TODO: check for mismatch ? + newedge.left_face := rec.right_face; + ELSE + -- TODO: check for mismatch ? + newedge.left_face := rec.left_face; + END IF; + END IF; + END IF; + + --RAISE DEBUG 'Closest edges: CW:%(%) CCW:%(%)', epan.nextCW, epan.minaz, epan.nextCCW, epan.maxaz; + + END LOOP; -- incident edges } + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'epan ROW_COUNT: %', i; +#endif + IF newedge.isclosed THEN + IF i < 2 THEN epan.was_isolated = true; END IF; + ELSE + IF i < 1 THEN epan.was_isolated = true; END IF; + END IF; + + IF epan.nextCW IS NULL THEN + -- This happens if the destination node is isolated + newedge.next_left_edge := -newedge.edge_id; + newedge.prev_right_edge := newedge.edge_id; + ELSE + newedge.next_left_edge := epan.nextCW; + newedge.prev_right_edge := -epan.nextCCW; + END IF; + + -- } end_node analysis + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'edge:%', newedge.edge_id; +#endif +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG ' left:%, next:%, prev:%', + newedge.left_face, newedge.next_left_edge, newedge.prev_left_edge; +#endif +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG ' right:%, next:%, prev:%', + newedge.right_face, newedge.next_right_edge, newedge.prev_right_edge; +#endif + + ---------------------------------------------------------------------- + -- + -- If we don't have faces setup by now we must have encountered + -- a malformed topology (no containing_face on isolated nodes, no + -- left/right faces on adjacent edges or mismatching values) + -- + ---------------------------------------------------------------------- + IF newedge.left_face != newedge.right_face THEN + RAISE EXCEPTION 'Left(%)/right(%) faces mismatch: invalid topology ?', + newedge.left_face, newedge.right_face; + END IF; + IF newedge.left_face IS NULL THEN + RAISE EXCEPTION 'Could not derive edge face from linked primitives: invalid topology ?'; + END IF; + + ---------------------------------------------------------------------- + -- + -- Insert the new edge, and update all linking + -- + ---------------------------------------------------------------------- + + -- Insert the new edge with what we have so far + EXECUTE 'INSERT INTO ' || quote_ident(atopology) + || '.edge VALUES(' || newedge.edge_id + || ',' || newedge.start_node + || ',' || newedge.end_node + || ',' || newedge.next_left_edge + || ',' || newedge.next_right_edge + || ',' || newedge.left_face + || ',' || newedge.right_face + || ',' || quote_literal(newedge.geom::geometry::text) + || ')'; + + -- Link prev_left_edge to us + -- (if it's not us already) + IF abs(newedge.prev_left_edge) != newedge.edge_id THEN + IF newedge.prev_left_edge > 0 THEN + -- its next_left_edge is us + EXECUTE 'UPDATE ' || quote_ident(atopology) + || '.edge_data SET next_left_edge = ' + || newedge.edge_id + || ', abs_next_left_edge = ' + || newedge.edge_id + || ' WHERE edge_id = ' + || newedge.prev_left_edge; + ELSE + -- its next_right_edge is us + EXECUTE 'UPDATE ' || quote_ident(atopology) + || '.edge_data SET next_right_edge = ' + || newedge.edge_id + || ', abs_next_right_edge = ' + || newedge.edge_id + || ' WHERE edge_id = ' + || -newedge.prev_left_edge; + END IF; + END IF; + + -- Link prev_right_edge to us + -- (if it's not us already) + IF abs(newedge.prev_right_edge) != newedge.edge_id THEN + IF newedge.prev_right_edge > 0 THEN + -- its next_left_edge is -us + EXECUTE 'UPDATE ' || quote_ident(atopology) + || '.edge_data SET next_left_edge = ' + || -newedge.edge_id + || ', abs_next_left_edge = ' + || newedge.edge_id + || ' WHERE edge_id = ' + || newedge.prev_right_edge; + ELSE + -- its next_right_edge is -us + EXECUTE 'UPDATE ' || quote_ident(atopology) + || '.edge_data SET next_right_edge = ' + || -newedge.edge_id + || ', abs_next_right_edge = ' + || newedge.edge_id + || ' WHERE edge_id = ' + || -newedge.prev_right_edge; + END IF; + END IF; + + -- NOT IN THE SPECS... + -- set containing_face = null for start_node and end_node + -- if they where isolated + IF span.was_isolated OR epan.was_isolated THEN + EXECUTE 'UPDATE ' || quote_ident(atopology) + || '.node SET containing_face = null WHERE node_id IN (' + || anode || ',' || anothernode || ')'; + END IF; + + -------------------------------------------- + -- Check face splitting + -------------------------------------------- + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Checking left face for a split'; +#endif + SELECT topology._ST_AddFaceSplit(atopology, newedge.edge_id, newedge.left_face, false) + INTO newface; + IF newface = 0 THEN +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG ' No split'; +#endif + RETURN newedge.edge_id; + END IF; + + IF newface IS NULL THEN -- must be forming a maximal ring in universal face +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Checking right face'; +#endif + SELECT topology._ST_AddFaceSplit(atopology, -newedge.edge_id, newedge.left_face, false) + INTO newface; + ELSE +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Updating right face mbr'; +#endif + PERFORM topology._ST_AddFaceSplit(atopology, -newedge.edge_id, newedge.left_face, true); + END IF; + + IF newface IS NULL THEN +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG ' No split'; +#endif + RETURN newedge.edge_id; + END IF; + + -------------------------------------------- + -- Update topogeometries, if needed + -------------------------------------------- + + IF newedge.left_face != 0 THEN -- { + + -- NOT IN THE SPECS: + -- update TopoGeometry compositions to add newface + sql := 'SELECT r.topogeo_id, r.layer_id FROM ' + || quote_ident(atopology) + || '.relation r, topology.layer l ' + || ' WHERE l.topology_id = ' || topoid + || ' AND l.level = 0 ' + || ' AND l.layer_id = r.layer_id ' + || ' AND r.element_id = ' || newedge.left_face + || ' AND r.element_type = 3 '; + --RAISE DEBUG 'SQL: %', sql; + FOR rec IN EXECUTE sql + LOOP +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'TopoGeometry % in layer % contained the face being split (%) - updating to contain also new face %', rec.topogeo_id, rec.layer_id, newedge.left_face, newface; +#endif + + -- Add reference to the other face + sql := 'INSERT INTO ' || quote_ident(atopology) + || '.relation VALUES( ' || rec.topogeo_id + || ',' || rec.layer_id || ',' || newface || ', 3)'; + --RAISE DEBUG 'SQL: %', sql; + EXECUTE sql; + + END LOOP; + + END IF; -- } + + RETURN newedge.edge_id; +END +$$ +LANGUAGE 'plpgsql' VOLATILE; +--} ST_AddEdgeModFace + +--{ +-- Topo-Geo and Topo-Net 3: Routine Details +-- X.3.17 +-- +-- ST_InitTopoGeo(atopology) +-- +CREATE OR REPLACE FUNCTION topology.ST_InitTopoGeo(atopology varchar) +RETURNS text +AS +$$ +DECLARE + rec RECORD; + topology_id numeric; +BEGIN + IF atopology IS NULL THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - null argument'; + END IF; + + FOR rec IN SELECT * FROM pg_namespace WHERE text(nspname) = atopology + LOOP + RAISE EXCEPTION 'SQL/MM Spatial exception - schema already exists'; + END LOOP; + + FOR rec IN EXECUTE 'SELECT topology.CreateTopology(' + ||quote_literal(atopology)|| ') as id' + LOOP + topology_id := rec.id; + END LOOP; + + RETURN 'Topology-Geometry ' || quote_literal(atopology) + || ' (id:' || topology_id || ') created.'; +END +$$ +LANGUAGE 'plpgsql' VOLATILE; +--} ST_InitTopoGeo + +--{ +-- Topo-Geo and Topo-Net 3: Routine Details +-- X.3.18 +-- +-- ST_CreateTopoGeo(atopology, acollection) +--}{ +CREATE OR REPLACE FUNCTION topology.ST_CreateTopoGeo(atopology varchar, acollection geometry) +RETURNS text +AS +$$ +DECLARE + typ char(4); + rec RECORD; + ret int; + nodededges GEOMETRY; + points GEOMETRY; + snode_id int; + enode_id int; + tolerance FLOAT8; + topoinfo RECORD; +BEGIN + + IF atopology IS NULL OR acollection IS NULL THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - null argument'; + END IF; + + -- Get topology information + BEGIN + SELECT * FROM topology.topology + INTO STRICT topoinfo WHERE name = atopology; + EXCEPTION + WHEN NO_DATA_FOUND THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - invalid topology name'; + END; + + -- Check SRID compatibility + IF ST_SRID(acollection) != topoinfo.SRID THEN + RAISE EXCEPTION 'Geometry SRID (%) does not match topology SRID (%)', + ST_SRID(acollection), topoinfo.SRID; + END IF; + + -- Verify pre-conditions (valid, empty topology schema exists) + BEGIN -- { + + -- Verify the topology views in the topology schema to be empty + FOR rec in EXECUTE + 'SELECT count(*) FROM ' + || quote_ident(atopology) || '.edge_data ' + || ' UNION ' || + 'SELECT count(*) FROM ' + || quote_ident(atopology) || '.node ' + LOOP + IF rec.count > 0 THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - non-empty view'; + END IF; + END LOOP; + + -- face check is separated as it will contain a single (world) + -- face record + FOR rec in EXECUTE + 'SELECT count(*) FROM ' + || quote_ident(atopology) || '.face ' + LOOP + IF rec.count != 1 THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - non-empty face view'; + END IF; + END LOOP; + + EXCEPTION + WHEN INVALID_SCHEMA_NAME THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - invalid topology name'; + WHEN UNDEFINED_TABLE THEN + RAISE EXCEPTION 'SQL/MM Spatial exception - non-existent view'; + + END; -- } + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Noding input linework'; +#endif + + -- + -- Node input linework with itself + -- + WITH components AS ( SELECT geom FROM ST_Dump(acollection) ) + SELECT ST_UnaryUnion(ST_Collect(geom)) FROM ( + SELECT geom FROM components + WHERE ST_Dimension(geom) = 1 + UNION ALL + SELECT ST_Boundary(geom) FROM components + WHERE ST_Dimension(geom) = 2 + ) as linework INTO STRICT nodededges; + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Computed % noded edges', ST_NumGeometries(nodededges); +#endif + + -- + -- Linemerge the resulting edges, to reduce the working set + -- NOTE: this is more of a workaround for GEOS splitting overlapping + -- lines to each of the segments. + -- + SELECT ST_LineMerge(nodededges) INTO STRICT nodededges; + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Merged edges: %', ST_NumGeometries(nodededges); +#endif + + + -- + -- Collect input points and input lines endpoints + -- + WITH components AS ( SELECT geom FROM ST_Dump(acollection) ) + SELECT ST_Union(geom) FROM ( + SELECT geom FROM components + WHERE ST_Dimension(geom) = 0 + UNION ALL + SELECT ST_Boundary(geom) FROM components + WHERE ST_Dimension(geom) = 1 + ) as nodes INTO STRICT points; + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Collected % input points', ST_NumGeometries(points); +#endif + + -- + -- Further split edges by points + -- TODO: optimize this adding ST_Split support for multiline/multipoint + -- + FOR rec IN SELECT geom FROM ST_Dump(points) + LOOP + -- Use the node to split edges + SELECT ST_Collect(geom) + FROM ST_Dump(ST_Split(nodededges, rec.geom)) + INTO STRICT nodededges; + END LOOP; + SELECT ST_UnaryUnion(nodededges) INTO STRICT nodededges; + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Noded edges became % after point-split', + ST_NumGeometries(nodededges); +#endif + + -- + -- Collect all nodes (from points and noded linework endpoints) + -- + + WITH edges AS ( SELECT geom FROM ST_Dump(nodededges) ) + SELECT ST_Union( -- TODO: ST_UnaryUnion ? + COALESCE(ST_UnaryUnion(ST_Collect(geom)), + ST_SetSRID('POINT EMPTY'::geometry, topoinfo.SRID)), + COALESCE(points, + ST_SetSRID('POINT EMPTY'::geometry, topoinfo.SRID)) + ) + FROM ( + SELECT ST_StartPoint(geom) as geom FROM edges + UNION ALL + SELECT ST_EndPoint(geom) FROM edges + ) as endpoints INTO points; + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Total nodes count: %', ST_NumGeometries(points); +#endif + + -- + -- Add all nodes as isolated so that + -- later calls to AddEdgeModFace will tweak their being + -- isolated or not... + -- + FOR rec IN SELECT geom FROM ST_Dump(points) + LOOP + PERFORM topology.ST_AddIsoNode(atopology, 0, rec.geom); + END LOOP; + + + FOR rec IN SELECT geom FROM ST_Dump(nodededges) + LOOP + SELECT topology.GetNodeByPoint(atopology, st_startpoint(rec.geom), 0) + INTO STRICT snode_id; + SELECT topology.GetNodeByPoint(atopology, st_endpoint(rec.geom), 0) + INTO STRICT enode_id; + PERFORM topology.ST_AddEdgeModFace(atopology, snode_id, enode_id, rec.geom); + END LOOP; + + RETURN 'Topology ' || atopology || ' populated'; + +END +$$ +LANGUAGE 'plpgsql' VOLATILE; +--} ST_CreateTopoGeo + +--=} SQL/MM block + diff -Nru postgis-1.5.3/topology/sql/topoelement/topoelement_agg.sql.in.c postgis-2.0.1/topology/sql/topoelement/topoelement_agg.sql.in.c --- postgis-1.5.3/topology/sql/topoelement/topoelement_agg.sql.in.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/sql/topoelement/topoelement_agg.sql.in.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,58 @@ +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- +-- PostGIS - Spatial Types for PostgreSQL +-- http://postgis.refractions.net +-- +-- Copyright (C) 2010, 2011 Sandro Santilli +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +-- +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- +-- TopoElement management functions +-- +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- +-- Developed by Sandro Santilli +-- for Faunalia (http://www.faunalia.it) with funding from +-- Regione Toscana - Sistema Informativo per la Gestione del Territorio +-- e dell' Ambiente [RT-SIGTA]. +-- For the project: "Sviluppo strumenti software per il trattamento di dati +-- geografici basati su QuantumGIS e Postgis (CIG 0494241492)" +-- +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +--{ +-- +-- TopoElementArray TopoElementArray_append() +-- +-- Append a TopoElement to a TopoElementArray +-- +CREATE OR REPLACE FUNCTION topology.TopoElementArray_append(topology.TopoElementArray, topology.TopoElement) + RETURNS topology.TopoElementArray +AS +$$ + SELECT CASE + WHEN $1 IS NULL THEN + topology.TopoElementArray('{' || $2::text || '}') + ELSE + topology.TopoElementArray($1::int[][]||$2::int[]) + END; +$$ +LANGUAGE 'sql' IMMUTABLE; +--} TopoElementArray_append + +--{ +-- +-- TopoElementArray TopoElementArray_agg() +-- +-- Aggregates a set of TopoElement values into a TopoElementArray +-- +DROP AGGREGATE IF EXISTS topology.TopoElementArray_agg(topology.TopoElement); +CREATE AGGREGATE topology.TopoElementArray_agg( + sfunc = topology.TopoElementArray_append, + basetype = topology.TopoElement, + stype = topology.TopoElementArray + ); +--} TopoElementArray_agg diff -Nru postgis-1.5.3/topology/sql/topogeometry/totopogeom.sql.in.c postgis-2.0.1/topology/sql/topogeometry/totopogeom.sql.in.c --- postgis-1.5.3/topology/sql/topogeometry/totopogeom.sql.in.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/sql/topogeometry/totopogeom.sql.in.c 2012-04-25 19:41:33.000000000 +0000 @@ -0,0 +1,152 @@ +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- +-- PostGIS - Spatial Types for PostgreSQL +-- http://postgis.refractions.net +-- +-- Copyright (C) 2011-2012 Sandro Santilli +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +-- +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +-- { +-- Convert a simple geometry to a topologically-defined one +-- +-- See http://trac.osgeo.org/postgis/ticket/1017 +-- +-- }{ +CREATE OR REPLACE FUNCTION topology.toTopoGeom(ageom Geometry, atopology varchar, alayer int, atolerance float8 DEFAULT 0) + RETURNS topology.TopoGeometry +AS +$$ +DECLARE + layer_info RECORD; + topology_info RECORD; + rec RECORD; + tg topology.TopoGeometry; + elems topology.TopoElementArray = '{{0,0}}'; + sql TEXT; + typ TEXT; + tolerance FLOAT8; +BEGIN + + -- Get topology information + BEGIN + SELECT * + FROM topology.topology + INTO STRICT topology_info WHERE name = atopology; + EXCEPTION + WHEN NO_DATA_FOUND THEN + RAISE EXCEPTION 'No topology with name "%" in topology.topology', + atopology; + END; + + -- Get tolerance, if 0 was given + tolerance := COALESCE( NULLIF(atolerance, 0), topology._st_mintolerance(atopology, ageom) ); + + -- Get layer information + BEGIN + SELECT *, CASE + WHEN feature_type = 1 THEN 'puntal' + WHEN feature_type = 2 THEN 'lineal' + WHEN feature_type = 3 THEN 'areal' + WHEN feature_type = 4 THEN 'mixed' + ELSE 'unexpected_'||feature_type + END as typename + FROM topology.layer l + INTO STRICT layer_info + WHERE l.layer_id = alayer + AND l.topology_id = topology_info.id; + EXCEPTION + WHEN NO_DATA_FOUND THEN + RAISE EXCEPTION 'No layer with id "%" in topology "%"', + alayer, atopology; + END; + + -- Can't convert to a hierarchical topogeometry + IF layer_info.level > 0 THEN + RAISE EXCEPTION 'Layer "%" of topology "%" is hierarchical, cannot convert to it.', + alayer, atopology; + END IF; + + + -- + -- Check type compatibility and create empty TopoGeometry + -- 1:puntal, 2:lineal, 3:areal, 4:collection + -- + typ = geometrytype(ageom); + IF typ = 'GEOMETRYCOLLECTION' THEN + -- A collection can only go collection layer + IF layer_info.feature_type != 4 THEN + RAISE EXCEPTION + 'Layer "%" of topology "%" is %, cannot hold a collection feature.', + layer_info.layer_id, topology_info.name, layer_info.typename; + END IF; + tg := topology.CreateTopoGeom(atopology, 4, alayer); + ELSIF typ = 'POINT' OR typ = 'MULTIPOINT' THEN -- puntal + -- A point can go in puntal or collection layer + IF layer_info.feature_type != 4 and layer_info.feature_type != 1 THEN + RAISE EXCEPTION + 'Layer "%" of topology "%" is %, cannot hold a puntal feature.', + layer_info.layer_id, topology_info.name, layer_info.typename; + END IF; + tg := topology.CreateTopoGeom(atopology, 1, alayer); + ELSIF typ = 'LINESTRING' or typ = 'MULTILINESTRING' THEN -- lineal + -- A line can go in lineal or collection layer + IF layer_info.feature_type != 4 and layer_info.feature_type != 2 THEN + RAISE EXCEPTION + 'Layer "%" of topology "%" is %, cannot hold a lineal feature.', + layer_info.layer_id, topology_info.name, layer_info.typename; + END IF; + tg := topology.CreateTopoGeom(atopology, 2, alayer); + ELSIF typ = 'POLYGON' OR typ = 'MULTIPOLYGON' THEN -- areal + -- An area can go in areal or collection layer + IF layer_info.feature_type != 4 and layer_info.feature_type != 3 THEN + RAISE EXCEPTION + 'Layer "%" of topology "%" is %, cannot hold an areal feature.', + layer_info.layer_id, topology_info.name, layer_info.typename; + END IF; + tg := topology.CreateTopoGeom(atopology, 3, alayer); + ELSE + -- Should never happen + RAISE EXCEPTION + 'Unexpected feature dimension %', ST_Dimension(ageom); + END IF; + + -- Now that we have a topogeometry, we loop over distinct components + -- and add them to the definition of it. We add them as soon + -- as possible so that each element can further edit the + -- definition by splitting + FOR rec IN SELECT DISTINCT id(tg), alayer as lyr, + CASE WHEN ST_Dimension(geom) = 0 THEN 1 + WHEN ST_Dimension(geom) = 1 THEN 2 + WHEN ST_Dimension(geom) = 2 THEN 3 + END as type, + CASE WHEN ST_Dimension(geom) = 0 THEN + topology.topogeo_addPoint(atopology, geom, tolerance) + WHEN ST_Dimension(geom) = 1 THEN + topology.topogeo_addLineString(atopology, geom, tolerance) + WHEN ST_Dimension(geom) = 2 THEN + topology.topogeo_addPolygon(atopology, geom, tolerance) + END as primitive + FROM (SELECT (ST_Dump(ageom)).geom) as f + WHERE NOT ST_IsEmpty(geom) + LOOP + -- TODO: consider use a single INSERT statement for the whole thing + sql := 'INSERT INTO ' || quote_ident(atopology) + || '.relation(topogeo_id, layer_id, element_type, element_id) VALUES (' + || rec.id || ',' || rec.lyr || ',' || rec.type + || ',' || rec.primitive || ')'; +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG '%', sql; +#endif + EXECUTE sql; + END LOOP; + + RETURN tg; + +END +$$ +LANGUAGE 'plpgsql' VOLATILE STRICT; +-- } diff -Nru postgis-1.5.3/topology/sql/topogeometry/type.sql.in.c postgis-2.0.1/topology/sql/topogeometry/type.sql.in.c --- postgis-1.5.3/topology/sql/topogeometry/type.sql.in.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/sql/topogeometry/type.sql.in.c 2012-05-16 08:29:14.000000000 +0000 @@ -0,0 +1,59 @@ +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- +-- PostGIS - Spatial Types for PostgreSQL +-- http://postgis.refractions.net +-- +-- Copyright (C) 2011 Sandro Santilli +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +-- +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +-- { +-- Override geometrytype() for topogeometry objects +-- +-- Note: For performance reasons, this function always assumes +-- TopoGeometry are of the MULTI type. This may not always +-- be the case if you convert the TopoGeometry to an actual +-- Geometry. +-- +-- }{ +CREATE OR REPLACE FUNCTION topology.GeometryType(tg topology.TopoGeometry) + RETURNS text +AS +$$ + SELECT CASE + WHEN type($1) = 1 THEN 'MULTIPOINT' + WHEN type($1) = 2 THEN 'MULTILINESTRING' + WHEN type($1) = 3 THEN 'MULTIPOLYGON' + WHEN type($1) = 4 THEN 'GEOMETRYCOLLECTION' + ELSE 'UNEXPECTED' + END; +$$ +LANGUAGE 'sql' STABLE STRICT; +-- } + +-- { +-- Override st_geometrytype() for topogeometry objects +-- +-- Note: For performance reasons, this function always assumes +-- TopoGeometry are of the MULTI type. This may not always +-- be the case if you convert the TopoGeometry to an actual +-- Geometry. +-- +-- }{ +CREATE OR REPLACE FUNCTION topology.ST_GeometryType(tg topology.TopoGeometry) + RETURNS text +AS +$$ + SELECT CASE + WHEN type($1) = 1 THEN 'ST_MultiPoint' + WHEN type($1) = 2 THEN 'ST_MultiLinestring' + WHEN type($1) = 3 THEN 'ST_MultiPolygon' + WHEN type($1) = 4 THEN 'ST_GeometryCollection' + ELSE 'ST_Unexpected' + END; +$$ +LANGUAGE 'sql' STABLE STRICT; +-- } diff -Nru postgis-1.5.3/topology/test/Makefile postgis-2.0.1/topology/test/Makefile --- postgis-1.5.3/topology/test/Makefile 2006-05-22 11:17:34.000000000 +0000 +++ postgis-2.0.1/topology/test/Makefile 2012-04-26 20:10:22.000000000 +0000 @@ -1,80 +1,70 @@ DATABASE=postgis_topo_regress -all: - @echo - @echo "make test - create the database, run all tests except sqlmm" - @echo - @echo "make initdb - create the regress database" - @echo "make inittopo - create topology routines" - @echo - @echo "make load - load 'city_data' topology and feature tables" - @echo "make loadmore - define more TopoGeoms from the topology" - @echo "make validate - validate 'city_data' loaded topology" - @echo - @echo "make hier - define some hierarchical TopoGeoms" - @echo - @echo "make edit - test sqlmm editing functions" - @echo - @echo "make cache - create geom caches for features tables" - @echo "make topopred - run predicates on topogeoms" - @echo "make geompred - run predicates on geometries" - @echo - @echo "make invalid - create an invalid topology, and validate it" - @echo "make sqlmm - test SQL/MM functions (exceptions are expected)" - @echo - -pred: - @make geompred | grep -v make > /tmp/geompred.out - @make topopred | grep -v make > /tmp/topopred.out - @diff /tmp/geompred.out /tmp/topopred.out - @diff /tmp/geompred.out predicate.expected - -test: inittopo load loadmore hier cache pred invalid edit - -initdb: - createdb $(DATABASE) - createlang plpgsql $(DATABASE) - psql -f ../../lwpostgis.sql $(DATABASE) - -inittopo: - psql -f ../topology.sql $(DATABASE) - -load: - psql -f load_topology.sql $(DATABASE) - -loadmore: - psql -f more_features.sql $(DATABASE) - -hier: - psql -f hierarchy.sql $(DATABASE) - -validate: - psql -f validate_topology.sql $(DATABASE) - -cache: - psql -f cache_geometries.sql $(DATABASE) - -invalid: - psql -f invalid_topology.sql $(DATABASE) +PSQL=psql -sqlmm: - psql -f sqlmm_topology.sql $(DATABASE) +all: + @echo "Use 'make check' to run all tests" -topopred: topo_predicates.sql - @psql -tf topo_predicates.sql $(DATABASE) +# TODO: make edit_topology.sql into a proper test +edit: + $(PSQL) -X -f edit_topology.sql $(DATABASE) -geompred: geom_predicates.sql - @psql -tf geom_predicates.sql $(DATABASE) topo_predicates.sql: predicates.sql.in - @cpp -P -traditional-cpp predicates.sql.in | sed -e 's:@COLUMN@:feature:g;s:@SCHEMA@:topology.:g' > topo_predicates.sql + cpp -P -traditional-cpp predicates.sql.in | sed -e 's:@COLUMN@:feature:g;s:@SCHEMA@:topology.:g' > topo_predicates.sql -geom_predicates.sql: predicates.sql.in - @cpp -P -traditional-cpp predicates.sql.in | sed -e 's:@COLUMN@:the_geom:g;s:@SCHEMA@::g' > geom_predicates.sql +load_topology.sql: load_topology.sql.in + @cpp -P -traditional-cpp load_topology.sql.in | sed -e 's:@SRID@:-1:g' > load_topology.sql -edit: - psql -f edit_topology.sql $(DATABASE) +load_topology-4326.sql: load_topology.sql.in + @cpp -P -traditional-cpp load_topology.sql.in | sed -e 's:@SRID@:4326:g' > load_topology-4326.sql clean distclean: - rm -f geom_predicates.sql topo_predicates.sql - -dropdb $(DATABASE) + rm -f topo_predicates.sql load_topology.sql load_topology-4326.sql + +TESTS = regress/legacy_validate.sql regress/legacy_predicate.sql \ + regress/legacy_invalid.sql regress/sqlmm.sql \ + regress/legacy_query.sql regress/addnode.sql \ + regress/addedge.sql regress/addface.sql \ + regress/addface2.5d.sql \ + regress/addtopogeometrycolumn.sql \ + regress/polygonize.sql \ + regress/st_addisoedge.sql \ + regress/st_addisonode.sql \ + regress/st_addedgemodface.sql \ + regress/st_addedgenewfaces.sql \ + regress/st_changeedgegeom.sql \ + regress/st_createtopogeo.sql \ + regress/st_getfacegeometry.sql \ + regress/st_getfaceedges.sql \ + regress/st_modedgeheal.sql \ + regress/st_modedgesplit.sql \ + regress/st_newedgeheal.sql \ + regress/st_newedgessplit.sql \ + regress/st_remedgenewface.sql \ + regress/st_remedgemodface.sql \ + regress/topoelement.sql \ + regress/topoelementarray_agg.sql \ + regress/topogeo_addlinestring \ + regress/topogeo_addpoint.sql \ + regress/topogeo_addpolygon.sql \ + regress/topogeometry_type.sql \ + regress/topo2.5d.sql \ + regress/totopogeom.sql \ + regress/droptopology.sql \ + regress/copytopology.sql \ + regress/createtopogeom.sql \ + regress/createtopology.sql \ + regress/gml.sql \ + regress/getnodebypoint.sql \ + regress/getedgebypoint.sql \ + regress/getfacebypoint.sql \ + regress/getringedges.sql \ + regress/gettopogeomelements.sql \ + regress/layertrigger.sql \ + regress/validatetopology.sql + +check: topo_predicates.sql load_topology.sql load_topology-4326.sql + $(MAKE) -C ../../regress staged-install + ../../regress/run_test --topology $(RUNTESTFLAGS) $(TESTS) + ../../regress/run_test --upgrade --topology $(RUNTESTFLAGS) $(TESTS) diff -Nru postgis-1.5.3/topology/test/cache_geometries.sql postgis-2.0.1/topology/test/cache_geometries.sql --- postgis-1.5.3/topology/test/cache_geometries.sql 2005-10-19 10:04:15.000000000 +0000 +++ postgis-2.0.1/topology/test/cache_geometries.sql 2012-02-27 22:08:12.000000000 +0000 @@ -2,17 +2,23 @@ -- created by load_topology.sql and stores there the SFS Geometry -- derived by the TopoGeometry column +-- Add geometry columns, for caching Geometries from TopoGeometries + +SELECT AddGeometryColumn('features','land_parcels','the_geom',-1,'MULTIPOLYGON',2); +SELECT AddGeometryColumn('features','city_streets','the_geom',-1,'MULTILINESTRING',2); +SELECT AddGeometryColumn('features','traffic_signs','the_geom',-1,'MULTIPOINT',2); + + + --ALTER TABLE features.city_streets ADD the_geom geometry; -UPDATE features.city_streets set the_geom = multi(topology.Geometry(feature)); +UPDATE features.city_streets set the_geom = + st_multi(topology.Geometry(feature)); --ALTER TABLE features.traffic_signs ADD the_geom geometry; -UPDATE features.traffic_signs set the_geom = multi(topology.Geometry(feature)); +UPDATE features.traffic_signs set the_geom = + st_multi(topology.Geometry(feature)); --ALTER TABLE features.land_parcels ADD the_geom geometry; -UPDATE features.land_parcels set the_geom = multi(topology.Geometry(feature)); - ---ALTER TABLE features.big_parcels ADD the_geom geometry; -UPDATE features.big_parcels set the_geom = multi(topology.Geometry(feature)); +UPDATE features.land_parcels set the_geom = + st_multi(topology.Geometry(feature)); ---ALTER TABLE features.big_signs ADD the_geom geometry; -UPDATE features.big_signs set the_geom = multi(topology.Geometry(feature)); diff -Nru postgis-1.5.3/topology/test/hierarchy.sql postgis-2.0.1/topology/test/hierarchy.sql --- postgis-1.5.3/topology/test/hierarchy.sql 2005-10-19 10:04:15.000000000 +0000 +++ postgis-2.0.1/topology/test/hierarchy.sql 2012-02-27 22:08:12.000000000 +0000 @@ -8,7 +8,7 @@ CREATE TABLE features.big_parcels ( feature_name varchar primary key -); +) WITH OIDS; SELECT topology.AddTopoGeometryColumn('city_data', 'features', 'big_parcels', 'feature', 'POLYGON', @@ -36,13 +36,43 @@ 'city_data', -- Topology name 3, -- Topology geometry type (polygon/multipolygon) (SELECT layer_id FROM topology.layer WHERE table_name = 'big_parcels'), - '{{6,1},{7,1}}')); -- F3 and F6 + (SELECT topoelementarray_agg(ARRAY[id(feature), 1]) + FROM features.land_parcels + WHERE feature_name in ('F3','F6')) + )); + +-- +-- Streets +-- -SELECT feature_name, astext(topology.geometry(feature)) from features.big_parcels; +CREATE TABLE features.big_streets ( + feature_name varchar primary key +) WITH OIDS; -SELECT a.feature_name, b.feature_name - FROM features.land_parcels a, features.big_parcels b - WHERE topology.equals(a.feature, b.feature); +SELECT topology.AddTopoGeometryColumn('city_data', 'features', + 'big_streets', 'feature', 'LINE', + 3 -- the city_streets layer id +); + +INSERT INTO features.big_streets VALUES ('R1R2', -- Feature name + topology.CreateTopoGeom( + 'city_data', -- Topology name + 2, -- Topology geometry type (lineal) + (SELECT layer_id FROM topology.layer WHERE table_name = 'big_streets'), + (SELECT topoelementarray_agg(ARRAY[id(feature), 3]) + FROM features.city_streets + WHERE feature_name in ('R1','R2')) -- R1 and R2 + )); + +INSERT INTO features.big_streets VALUES ('R4', -- Feature name + topology.CreateTopoGeom( + 'city_data', -- Topology name + 2, -- Topology geometry type (lineal) + (SELECT layer_id FROM topology.layer WHERE table_name = 'big_streets'), + (SELECT topoelementarray_agg(ARRAY[id(feature), 3]) + FROM features.city_streets + WHERE feature_name in ('R4')) + )); -- -- Signs @@ -50,7 +80,7 @@ CREATE TABLE features.big_signs ( feature_name varchar primary key -); +) WITH OIDS; SELECT topology.AddTopoGeometryColumn('city_data', 'features', 'big_signs', 'feature', 'POINT', @@ -66,8 +96,3 @@ (SELECT layer_id FROM topology.layer WHERE table_name = 'big_signs'), '{{1,2},{2,2}}')); -- S1 and S2 -SELECT feature_name, astext(topology.geometry(feature)) from features.big_signs; - -SELECT a.feature_name, b.feature_name - FROM features.traffic_signs a, features.big_signs b - WHERE topology.equals(a.feature, b.feature); diff -Nru postgis-1.5.3/topology/test/invalid_topology.sql postgis-2.0.1/topology/test/invalid_topology.sql --- postgis-1.5.3/topology/test/invalid_topology.sql 2005-10-13 16:21:49.000000000 +0000 +++ postgis-2.0.1/topology/test/invalid_topology.sql 2012-02-27 22:08:12.000000000 +0000 @@ -1,8 +1,11 @@ BEGIN; -- Create the topology. -SELECT topology.DropTopology('invalid_topology'); -- get rid of the old one -SELECT topology.CreateTopology('invalid_topology'); +-- NOTE: +-- Returns topology id... which depend on how many +-- topologies where created in the regress database +-- so we just check it's a number greater than 0 +SELECT topology.CreateTopology('invalid_topology') > 0; -- Insert faces INSERT INTO invalid_topology.face(face_id) VALUES(1); -- F1 @@ -20,6 +23,8 @@ INSERT INTO invalid_topology.face(face_id) VALUES(11); -- F11 -- Next face overlaps F2 INSERT INTO invalid_topology.face(face_id) VALUES(12); -- F12 +-- Next face is here only to serve as a placeholder for broken edges +INSERT INTO invalid_topology.face(face_id) VALUES(13); -- F13 -- Insert nodes INSERT INTO invalid_topology.node(node_id,geom,containing_face) @@ -141,6 +146,10 @@ INSERT INTO invalid_topology.edge VALUES(32, 4, 4, 31, -31, 12, 12, 'LINESTRING(20 37, 20 42, 21 42, 21 37, 20 37)'); +-- Next edge is not valid +INSERT INTO invalid_topology.edge VALUES(33, 3, 3, 28, 28, 13, 13, + '01020000000100000000000000000039400000000000804140'); + -- Validate topology SELECT * from topology.validatetopology('invalid_topology'); diff -Nru postgis-1.5.3/topology/test/load_features.sql postgis-2.0.1/topology/test/load_features.sql --- postgis-1.5.3/topology/test/load_features.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/load_features.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,161 @@ +-- +-- From examples in chapter 1.12.1 of +-- "Spatial Topology and Network Data Models" (Oracle manual) +-- +-- Modified to use postgis-based topology model. +-- Loads the whole topology represented in Figure 1-1 of the +-- manual, creates TopoGeometry objects and associations. +-- + +--ORA-------------------------------- +--ORA---- Main steps for using the topology data model with a topology +--ORA---- built from edge, node, and face data +--ORA-------------------------------- +--ORA---- ... +--ORA---- 3. Create feature tables. +--ORA---- 4. Associate feature tables with the topology. +--ORA---- 5. Initialize topology +--ORA---- 6. Load feature tables using the SDO_TOPO_GEOMETRY constructor. + + +BEGIN; + +-- 3. Create feature tables + +CREATE SCHEMA features; + +CREATE TABLE features.land_parcels ( -- Land parcels (selected faces) + feature_name VARCHAR PRIMARY KEY) with oids; +CREATE TABLE features.city_streets ( -- City streets (selected edges) + feature_name VARCHAR PRIMARY KEY) with oids; +CREATE TABLE features.traffic_signs ( -- Traffic signs (selected nodes) + feature_name VARCHAR PRIMARY KEY) with oids; + + + +-- 4. Associate feature tables with the topology. +-- Add the three topology geometry layers to the CITY_DATA topology. +-- Any order is OK. +SELECT topology.AddTopoGeometryColumn('city_data', 'features', 'land_parcels', 'feature', 'POLYGON'); +SELECT topology.AddTopoGeometryColumn('city_data', 'features', 'traffic_signs','feature', 'POINT'); +SELECT topology.AddTopoGeometryColumn('city_data', 'features', 'city_streets','feature', 'LINE'); + +-- As a result, Spatial generates a unique TG_LAYER_ID for each layer in +-- the topology metadata (USER/ALL_SDO_TOPO_METADATA). + +--NOTYET---- 5. Initialize topology metadata. +--NOTYET--EXECUTE topology.INITIALIZE_METADATA('CITY_DATA'); + + +-- 6. Load feature tables using the CreateTopoGeom constructor. +-- Each topology feature can consist of one or more objects (face, edge, node) +-- of an appropriate type. For example, a land parcel can consist of one face, +-- or two or more faces, as specified in the SDO_TOPO_OBJECT_ARRAY. +-- There are typically fewer features than there are faces, nodes, and edges. +-- In this example, the only features are these: +-- Area features (land parcels): P1, P2, P3, P4, P5 +-- Point features (traffic signs): S1, S2, S3, S4 +-- Linear features (roads/streets): R1, R2, R3, R4 + +-- 6A. Load LAND_PARCELS table. +-- P1 +INSERT INTO features.land_parcels VALUES ('P1', -- Feature name + topology.CreateTopoGeom( + 'city_data', -- Topology name + 3, -- Topology geometry type (polygon/multipolygon) + 1, -- TG_LAYER_ID for this topology (from topology.layer) + '{{3,3},{6,3}}') -- face_id:3 face_id:6 + ); + +-- P2 +INSERT INTO features.land_parcels VALUES ('P2', -- Feature name + topology.CreateTopoGeom( + 'city_data', -- Topology name + 3, -- Topology geometry type (polygon/multipolygon) + 1, -- TG_LAYER_ID for this topology (from ALL_SDO_TOPO_METADATA) + '{{4,3},{7,3}}')); +-- P3 +INSERT INTO features.land_parcels VALUES ('P3', -- Feature name + topology.CreateTopoGeom( + 'city_data', -- Topology name + 3, -- Topology geometry type (polygon/multipolygon) + 1, -- TG_LAYER_ID for this topology (from topology.layer) + '{{5,3},{8,3}}')); +-- P4 +INSERT INTO features.land_parcels VALUES ('P4', -- Feature name + topology.CreateTopoGeom( + 'city_data', -- Topology name + 3, -- Topology geometry type (polygon/multipolygon) + 1, -- TG_LAYER_ID for this topology (from topology.layer) + '{{2,3}}')); +-- P5 (Includes F1, but not F9.) +INSERT INTO features.land_parcels VALUES ('P5', -- Feature name + topology.CreateTopoGeom( + 'city_data', -- Topology name + 3, -- Topology geometry type (polygon/multipolygon) + 1, -- TG_LAYER_ID for this topology (from topology.layer) + '{{1,3}}')); + +-- 6B. Load TRAFFIC_SIGNS table. +-- S1 +INSERT INTO features.traffic_signs VALUES ('S1', -- Feature name + topology.CreateTopoGeom( + 'city_data', -- Topology name + 1, -- Topology geometry type (point) + 2, -- TG_LAYER_ID for this topology (from topology.layer) + '{{14,1}}')); +-- S2 +INSERT INTO features.traffic_signs VALUES ('S2', -- Feature name + topology.CreateTopoGeom( + 'city_data', -- Topology name + 1, -- Topology geometry type (point) + 2, -- TG_LAYER_ID for this topology (from topology.layer) + '{{13,1}}')); +-- S3 +INSERT INTO features.traffic_signs VALUES ('S3', -- Feature name + topology.CreateTopoGeom( + 'city_data', -- Topology name + 1, -- Topology geometry type (point) + 2, -- TG_LAYER_ID for this topology (from topology.layer) + '{{6,1}}')); +-- S4 +INSERT INTO features.traffic_signs VALUES ('S4', -- Feature name + topology.CreateTopoGeom( + 'city_data', -- Topology name + 1, -- Topology geometry type (point) + 2, -- TG_LAYER_ID for this topology (from topology.layer) + '{{4,1}}')); + +-- 6C. Load CITY_STREETS table. +-- (Note: "R" in feature names is for "Road", because "S" is used for signs.) +-- R1 +INSERT INTO features.city_streets VALUES ('R1', -- Feature name + topology.CreateTopoGeom( + 'city_data', -- Topology name + 2, -- Topology geometry type (line string) + 3, -- TG_LAYER_ID for this topology (from topology.layer) + '{{9,2},{-10,2}}')); -- E9, E10 +-- R2 +INSERT INTO features.city_streets VALUES ('R2', -- Feature name + topology.CreateTopoGeom( + 'city_data', -- Topology name + 2, -- Topology geometry type (line string) + 3, -- TG_LAYER_ID for this topology (from topology.layer) + '{{4,2},{-5,2}}')); -- E4, E5 +-- R3 +INSERT INTO features.city_streets VALUES ('R3', -- Feature name + topology.CreateTopoGeom( + 'city_data', -- Topology name + 2, -- Topology geometry type (line string) + 3, -- TG_LAYER_ID for this topology (from topology.layer) + '{{25,2}}')); +-- R4 +INSERT INTO features.city_streets VALUES ('R4', -- Feature name + topology.CreateTopoGeom( + 'city_data', -- Topology name + 2, -- Topology geometry type (line string) + 3, -- TG_LAYER_ID for this topology (from topology.layer) + '{{3,2}}')); + +END; + diff -Nru postgis-1.5.3/topology/test/load_topology.sql postgis-2.0.1/topology/test/load_topology.sql --- postgis-1.5.3/topology/test/load_topology.sql 2006-05-22 12:10:58.000000000 +0000 +++ postgis-2.0.1/topology/test/load_topology.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,394 +0,0 @@ --- --- From examples in chapter 1.12.1 of --- "Spatial Topology and Network Data Models" (Oracle manual) --- --- Modified to use postgis-based topology model. --- Loads the whole topology represented in Figure 1-1 of the --- manual, creates TopoGeometry objects and associations. --- - ---ORA-------------------------------- ---ORA---- Main steps for using the topology data model with a topology ---ORA---- built from edge, node, and face data ---ORA-------------------------------- ---ORA---- 1. Create a topology. ---ORA---- 2. Load (normally bulk-load) topology data (node, edge, and face tables). ---ORA---- 3. Create feature tables. ---ORA---- 4. Associate feature tables with the topology. ---ORA---- 5. Initialize topology ---ORA---- 6. Load feature tables using the SDO_TOPO_GEOMETRY constructor. ---ORA---- 7. Query the data. ---ORA---- 8. Optionally, edit data using the PL/SQL or Java API. - - -DROP SCHEMA features CASCADE; - -BEGIN; - --- 1. Create the topology. -SELECT topology.DropTopology('city_data'); -- get rid of the old one -SELECT topology.CreateTopology('city_data'); - --- 2. Load topology data (node, edge, and face tables). --- Use INSERT statements here instead of a bulk-load utility. - --- 2A. Insert data into .FACE table. - -INSERT INTO city_data.face(face_id) VALUES(1); -- F1 -INSERT INTO city_data.face(face_id) VALUES(2); -- F2 -INSERT INTO city_data.face(face_id) VALUES(9); -- F9 -INSERT INTO city_data.face(face_id) VALUES(3); -- F3 -INSERT INTO city_data.face(face_id) VALUES(4); -- F4 -INSERT INTO city_data.face(face_id) VALUES(5); -- F5 -INSERT INTO city_data.face(face_id) VALUES(6); -- F6 -INSERT INTO city_data.face(face_id) VALUES(7); -- F7 -INSERT INTO city_data.face(face_id) VALUES(8); -- F8 - --- UPDATE Face id sequence -SELECT setval('city_data.face_face_id_seq', 8); - --- 2B. Insert data into .NODE table. --- N1 -INSERT INTO city_data.node(node_id, geom, containing_face) - VALUES(1, 'POINT(8 30)', NULL); --- N2 -INSERT INTO city_data.node(node_id, geom, containing_face) - VALUES(2, 'POINT(25 30)', NULL); --- N3 -INSERT INTO city_data.node(node_id, geom, containing_face) - VALUES(3, 'POINT(25 35)', NULL); --- N4 -INSERT INTO city_data.node(node_id, geom, containing_face) - VALUES(4, 'POINT(20 37)', 2); --- N5 -INSERT INTO city_data.node(node_id, geom, containing_face) - VALUES(5, 'POINT(36 38)', NULL); --- N6 -INSERT INTO city_data.node(node_id, geom, containing_face) - VALUES(6, 'POINT(57 33)', NULL); --- N7 -INSERT INTO city_data.node(node_id, geom, containing_face) - VALUES(7, 'POINT(41 40)', NULL); --- N8 -INSERT INTO city_data.node(node_id, geom, containing_face) - VALUES(8, 'POINT(9 6)', NULL); --- N9 -INSERT INTO city_data.node(node_id, geom, containing_face) - VALUES(9, 'POINT(21 6)', NULL); --- N10 -INSERT INTO city_data.node(node_id, geom, containing_face) - VALUES(10, 'POINT(35 6)', NULL); --- N11 -INSERT INTO city_data.node(node_id, geom, containing_face) - VALUES(11, 'POINT(47 6)', NULL); --- N12 -INSERT INTO city_data.node(node_id, geom, containing_face) - VALUES(12, 'POINT(47 14)', NULL); --- N13 -INSERT INTO city_data.node(node_id, geom, containing_face) - VALUES(13, 'POINT(35 14)', NULL); --- N14 -INSERT INTO city_data.node(node_id, geom, containing_face) - VALUES(14, 'POINT(21 14)', NULL); --- N15 -INSERT INTO city_data.node(node_id, geom, containing_face) - VALUES(15, 'POINT(9 14)', NULL); --- N16 -INSERT INTO city_data.node(node_id, geom, containing_face) - VALUES(16, 'POINT(9 22)', NULL); --- N17 -INSERT INTO city_data.node(node_id, geom, containing_face) - VALUES(17, 'POINT(21 22)', NULL); --- N18 -INSERT INTO city_data.node(node_id, geom, containing_face) - VALUES(18, 'POINT(35 22)', NULL); --- N19 -INSERT INTO city_data.node(node_id, geom, containing_face) - VALUES(19, 'POINT(47 22)', NULL); --- N20 -INSERT INTO city_data.node(node_id, geom, containing_face) - VALUES(20, 'POINT(4 31)', NULL); --- N21 -INSERT INTO city_data.node(node_id, geom, containing_face) - VALUES(21, 'POINT(9 35)', NULL); --- N22 -INSERT INTO city_data.node(node_id, geom, containing_face) - VALUES(22, 'POINT(13 35)', NULL); - --- UPDATE Node id sequence -SELECT setval('city_data.node_node_id_seq', 22); - --- 2C. Insert data into .EDGE table. --- E1 -INSERT INTO city_data.edge VALUES(1, 1, 1, 1, -1, 1, 0, - 'LINESTRING(8 30, 16 30, 16 38, 3 38, 3 30, 8 30)'); --- E2 -INSERT INTO city_data.edge VALUES(2, 2, 2, -3, -2, 2, 0, - 'LINESTRING(25 30, 31 30, 31 40, 17 40, 17 30, 25 30)'); --- E3 -INSERT INTO city_data.edge VALUES(3, 2, 3, -3, 2, 2, 2, - 'LINESTRING(25 30, 25 35)'); --- E4 -INSERT INTO city_data.edge VALUES(4, 5, 6, -5, 4, 0, 0, - 'LINESTRING(36 38, 38 35, 41 34, 42 33, 45 32, 47 28, 50 28, 52 32, 57 33)'); --- E5 -INSERT INTO city_data.edge VALUES(5, 7, 6, -4, 5, 0, 0, - 'LINESTRING(41 40, 45 40, 47 42, 62 41, 61 38, 59 39, 57 36, 57 33)'); --- E6 -INSERT INTO city_data.edge VALUES(6, 16, 17, 7, -21, 0, 3, - 'LINESTRING(9 22, 21 22)'); --- E7 -INSERT INTO city_data.edge VALUES(7, 17, 18, 8, -19, 0, 4, - 'LINESTRING(21 22, 35 22)'); --- E8 -INSERT INTO city_data.edge VALUES(8, 18, 19, -15, -17, 0, 5, - 'LINESTRING(35 22, 47 22)'); --- E9 -INSERT INTO city_data.edge VALUES(9, 15, 14, 19, -22, 3, 6, - 'LINESTRING(9 14, 21 14)'); --- E10 -INSERT INTO city_data.edge VALUES(10, 13, 14, -20, 17, 7, 4, - 'LINESTRING(35 14, 21 14)'); --- E11 -INSERT INTO city_data.edge VALUES(11, 13, 12, 15, -18, 5, 8, - 'LINESTRING(35 14, 47 14)'); --- E12 -INSERT INTO city_data.edge VALUES(12, 8, 9, 20, 22, 6, 0, - 'LINESTRING(9 6, 21 6)'); --- E13 -INSERT INTO city_data.edge VALUES(13, 9, 10, 18, -12, 7, 0, - 'LINESTRING(21 6, 35 6)'); --- E14 -INSERT INTO city_data.edge VALUES(14, 10, 11, 16, -13, 8, 0, - 'LINESTRING(35 6, 47 6)'); --- E15 -INSERT INTO city_data.edge VALUES(15, 12, 19, -8, -16, 5, 0, - 'LINESTRING(47 14, 47 22)'); --- E16 -INSERT INTO city_data.edge VALUES(16, 11, 12, -11, -14, 8, 0, - 'LINESTRING(47 6, 47 14)'); --- E17 -INSERT INTO city_data.edge VALUES(17, 13, 18, -7, 11, 4, 5, - 'LINESTRING(35 14, 35 22)'); --- E18 -INSERT INTO city_data.edge VALUES(18, 10, 13, 10, 14, 7, 8, - 'LINESTRING(35 6, 35 14)'); --- E19 -INSERT INTO city_data.edge VALUES(19, 14, 17, -6, -10, 3, 4, - 'LINESTRING(21 14, 21 22)'); --- E20 -INSERT INTO city_data.edge VALUES(20, 9, 14, -9, 13, 6, 7, - 'LINESTRING(21 6, 21 14)'); --- E21 -INSERT INTO city_data.edge VALUES(21, 15, 16, 6, 9, 0, 3, - 'LINESTRING(9 14, 9 22)'); --- E22 -INSERT INTO city_data.edge VALUES(22, 8, 15, 21, 12, 0, 6, - 'LINESTRING(9 6, 9 14)'); --- E25 -INSERT INTO city_data.edge VALUES(25, 21, 22, -25, 25, 1, 1, - 'LINESTRING(9 35, 13 35)'); --- E26 -INSERT INTO city_data.edge VALUES(26, 20, 20, 26, -26, 9, 1, - 'LINESTRING(4 31, 7 31, 7 34, 4 34, 4 31)'); - --- UPDATE Edge id sequence -SELECT setval('city_data.edge_data_edge_id_seq', 26); - --- 3. Create feature tables - -CREATE SCHEMA features; - -CREATE TABLE features.land_parcels ( -- Land parcels (selected faces) - feature_name VARCHAR PRIMARY KEY) with oids; -CREATE TABLE features.city_streets ( -- City streets (selected edges) - feature_name VARCHAR PRIMARY KEY) with oids; -CREATE TABLE features.traffic_signs ( -- Traffic signs (selected nodes) - feature_name VARCHAR PRIMARY KEY) with oids; - - - --- 4. Associate feature tables with the topology. --- Add the three topology geometry layers to the CITY_DATA topology. --- Any order is OK. -SELECT topology.AddTopoGeometryColumn('city_data', 'features', 'land_parcels', 'feature', 'POLYGON'); -SELECT topology.AddTopoGeometryColumn('city_data', 'features', 'traffic_signs','feature', 'POINT'); -SELECT topology.AddTopoGeometryColumn('city_data', 'features', 'city_streets','feature', 'LINE'); - --- As a result, Spatial generates a unique TG_LAYER_ID for each layer in --- the topology metadata (USER/ALL_SDO_TOPO_METADATA). - ---NOTYET---- 5. Initialize topology metadata. ---NOTYET--EXECUTE topology.INITIALIZE_METADATA('CITY_DATA'); - --- 4bis. Add geometry columns, for caching Geometries from TopoGeometries - -SELECT AddGeometryColumn('features','land_parcels','the_geom',-1,'MULTIPOLYGON',2); -SELECT AddGeometryColumn('features','city_streets','the_geom',-1,'MULTILINESTRING',2); -SELECT AddGeometryColumn('features','traffic_signs','the_geom',-1,'MULTIPOINT',2); - - - --- 6. Load feature tables using the CreateTopoGeom constructor. --- Each topology feature can consist of one or more objects (face, edge, node) --- of an appropriate type. For example, a land parcel can consist of one face, --- or two or more faces, as specified in the SDO_TOPO_OBJECT_ARRAY. --- There are typically fewer features than there are faces, nodes, and edges. --- In this example, the only features are these: --- Area features (land parcels): P1, P2, P3, P4, P5 --- Point features (traffic signs): S1, S2, S3, S4 --- Linear features (roads/streets): R1, R2, R3, R4 - --- 6A. Load LAND_PARCELS table. --- P1 -INSERT INTO features.land_parcels VALUES ('P1', -- Feature name - topology.CreateTopoGeom( - 'city_data', -- Topology name - 3, -- Topology geometry type (polygon/multipolygon) - 1, -- TG_LAYER_ID for this topology (from topology.layer) - '{{3,3},{6,3}}') -- face_id:3 face_id:6 - ); - --- P2 -INSERT INTO features.land_parcels VALUES ('P2', -- Feature name - topology.CreateTopoGeom( - 'city_data', -- Topology name - 3, -- Topology geometry type (polygon/multipolygon) - 1, -- TG_LAYER_ID for this topology (from ALL_SDO_TOPO_METADATA) - '{{4,3},{7,3}}')); --- P3 -INSERT INTO features.land_parcels VALUES ('P3', -- Feature name - topology.CreateTopoGeom( - 'city_data', -- Topology name - 3, -- Topology geometry type (polygon/multipolygon) - 1, -- TG_LAYER_ID for this topology (from topology.layer) - '{{5,3},{8,3}}')); --- P4 -INSERT INTO features.land_parcels VALUES ('P4', -- Feature name - topology.CreateTopoGeom( - 'city_data', -- Topology name - 3, -- Topology geometry type (polygon/multipolygon) - 1, -- TG_LAYER_ID for this topology (from topology.layer) - '{{2,3}}')); --- P5 (Includes F1, but not F9.) -INSERT INTO features.land_parcels VALUES ('P5', -- Feature name - topology.CreateTopoGeom( - 'city_data', -- Topology name - 3, -- Topology geometry type (polygon/multipolygon) - 1, -- TG_LAYER_ID for this topology (from topology.layer) - '{{1,3}}')); - --- 6B. Load TRAFFIC_SIGNS table. --- S1 -INSERT INTO features.traffic_signs VALUES ('S1', -- Feature name - topology.CreateTopoGeom( - 'city_data', -- Topology name - 1, -- Topology geometry type (point) - 2, -- TG_LAYER_ID for this topology (from topology.layer) - '{{14,1}}')); --- S2 -INSERT INTO features.traffic_signs VALUES ('S2', -- Feature name - topology.CreateTopoGeom( - 'city_data', -- Topology name - 1, -- Topology geometry type (point) - 2, -- TG_LAYER_ID for this topology (from topology.layer) - '{{13,1}}')); --- S3 -INSERT INTO features.traffic_signs VALUES ('S3', -- Feature name - topology.CreateTopoGeom( - 'city_data', -- Topology name - 1, -- Topology geometry type (point) - 2, -- TG_LAYER_ID for this topology (from topology.layer) - '{{6,1}}')); --- S4 -INSERT INTO features.traffic_signs VALUES ('S4', -- Feature name - topology.CreateTopoGeom( - 'city_data', -- Topology name - 1, -- Topology geometry type (point) - 2, -- TG_LAYER_ID for this topology (from topology.layer) - '{{4,1}}')); - --- 6C. Load CITY_STREETS table. --- (Note: "R" in feature names is for "Road", because "S" is used for signs.) --- R1 -INSERT INTO features.city_streets VALUES ('R1', -- Feature name - topology.CreateTopoGeom( - 'city_data', -- Topology name - 2, -- Topology geometry type (line string) - 3, -- TG_LAYER_ID for this topology (from topology.layer) - '{{9,2},{-10,2}}')); -- E9, E10 --- R2 -INSERT INTO features.city_streets VALUES ('R2', -- Feature name - topology.CreateTopoGeom( - 'city_data', -- Topology name - 2, -- Topology geometry type (line string) - 3, -- TG_LAYER_ID for this topology (from topology.layer) - '{{4,2},{-5,2}}')); -- E4, E5 --- R3 -INSERT INTO features.city_streets VALUES ('R3', -- Feature name - topology.CreateTopoGeom( - 'city_data', -- Topology name - 2, -- Topology geometry type (line string) - 3, -- TG_LAYER_ID for this topology (from topology.layer) - '{{25,2}}')); --- R4 -INSERT INTO features.city_streets VALUES ('R4', -- Feature name - topology.CreateTopoGeom( - 'city_data', -- Topology name - 2, -- Topology geometry type (line string) - 3, -- TG_LAYER_ID for this topology (from topology.layer) - '{{3,2}}')); - - - --- 7. Query the data. -SELECT a.feature_name, id(a.feature) as tg_id, - astext(topology.Geometry(a.feature)) as geom -FROM features.land_parcels a; - --- Query not in original example --strk; -SELECT a.feature_name, id(a.feature) as tg_id, - astext(topology.Geometry(a.feature)) as geom -FROM features.traffic_signs a; - --- Query not in original example --strk; -SELECT a.feature_name, id(a.feature) as tg_id, - astext(topology.Geometry(a.feature)) as geom -FROM features.city_streets a; - ---NOTYET-- ---NOTYET--/* Window is city_streets */ ---NOTYET--SELECT a.feature_name, b.feature_name ---NOTYET-- FROM city_streets b, ---NOTYET-- land_parcels a ---NOTYET-- WHERE b.feature_name like 'R%' AND ---NOTYET-- sdo_anyinteract(a.feature, b.feature) = 'TRUE' ---NOTYET-- ORDER BY b.feature_name, a.feature_name; ---NOTYET-- ---NOTYET---- Find all streets that have any interaction with land parcel P3. ---NOTYET---- (Should return only R1.) ---NOTYET--SELECT c.feature_name FROM city_streets c, land_parcels l ---NOTYET-- WHERE l.feature_name = 'P3' AND ---NOTYET-- SDO_ANYINTERACT (c.feature, l.feature) = 'TRUE'; ---NOTYET-- ---NOTYET---- Find all land parcels that have any interaction with traffic sign S1. ---NOTYET---- (Should return P1 and P2.) ---NOTYET--SELECT l.feature_name FROM land_parcels l, traffic_signs t ---NOTYET-- WHERE t.feature_name = 'S1' AND ---NOTYET-- SDO_ANYINTERACT (l.feature, t.feature) = 'TRUE'; ---NOTYET-- ---NOTYET---- Get the geometry for land parcel P1. ---NOTYET--SELECT l.feature_name, l.feature.get_geometry() ---NOTYET-- FROM land_parcels l WHERE l.feature_name = 'P1'; ---NOTYET-- ---NOTYET---- Get the boundary of face with face_id 3. ---NOTYET--SELECT topology.GET_FACE_BOUNDARY('CITY_DATA', 3) FROM DUAL; ---NOTYET-- ---NOTYET---- Get the topological elements for land parcel P2. ---NOTYET---- CITY_DATA layer, land parcels (tg_ layer_id = 1), parcel P2 (tg_id = 2) ---NOTYET--SELECT topology.GET_TOPO_OBJECTS('CITY_DATA', 1, 2) FROM DUAL; ---NOTYET-- ---NOTYET-- - -END; - diff -Nru postgis-1.5.3/topology/test/load_topology.sql.in postgis-2.0.1/topology/test/load_topology.sql.in --- postgis-1.5.3/topology/test/load_topology.sql.in 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/load_topology.sql.in 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,200 @@ +-- +-- From examples in chapter 1.12.1 of +-- "Spatial Topology and Network Data Models" (Oracle manual) +-- +-- Modified to use postgis-based topology model. +-- Loads the whole topology represented in Figure 1-1 of the +-- manual +-- + +--ORA--------------------------------------------------------------------- +--ORA---- Main steps for using the topology data model with a topology +--ORA---- built from edge, node, and face data +--ORA--------------------------------------------------------------------- +--ORA---- 1. Create a topology. +--ORA---- 2. Load (normally bulk-load) topology data +--ORA---- (node, edge, and face tables). + + +BEGIN; + +-- 1. Create the topology. +-- +-- NOTE: +-- Returns topology id... which depend on how many +-- topologies where created in the regress database +-- so we just check it's a number greater than 0 +-- +SELECT topology.CreateTopology('city_data', @SRID@) > 0; + +-- 2. Load topology data (node, edge, and face tables). +-- Use INSERT statements here instead of a bulk-load utility. + +-- 2A. Insert data into .FACE table. + +INSERT INTO city_data.face(face_id) VALUES(1); -- F1 +INSERT INTO city_data.face(face_id) VALUES(2); -- F2 +INSERT INTO city_data.face(face_id) VALUES(3); -- F3 +INSERT INTO city_data.face(face_id) VALUES(4); -- F4 +INSERT INTO city_data.face(face_id) VALUES(5); -- F5 +INSERT INTO city_data.face(face_id) VALUES(6); -- F6 +INSERT INTO city_data.face(face_id) VALUES(7); -- F7 +INSERT INTO city_data.face(face_id) VALUES(8); -- F8 +INSERT INTO city_data.face(face_id) VALUES(9); -- F9 + +-- UPDATE Face id sequence +SELECT setval('city_data.face_face_id_seq', 9); + +-- 2B. Insert data into .NODE table. +-- N1 +INSERT INTO city_data.node(node_id, geom, containing_face) + VALUES(1, 'SRID=@SRID@;POINT(8 30)', NULL); +-- N2 +INSERT INTO city_data.node(node_id, geom, containing_face) + VALUES(2, 'SRID=@SRID@;POINT(25 30)', NULL); +-- N3 +INSERT INTO city_data.node(node_id, geom, containing_face) + VALUES(3, 'SRID=@SRID@;POINT(25 35)', NULL); +-- N4 +INSERT INTO city_data.node(node_id, geom, containing_face) + VALUES(4, 'SRID=@SRID@;POINT(20 37)', 2); +-- N5 +INSERT INTO city_data.node(node_id, geom, containing_face) + VALUES(5, 'SRID=@SRID@;POINT(36 38)', NULL); +-- N6 +INSERT INTO city_data.node(node_id, geom, containing_face) + VALUES(6, 'SRID=@SRID@;POINT(57 33)', NULL); +-- N7 +INSERT INTO city_data.node(node_id, geom, containing_face) + VALUES(7, 'SRID=@SRID@;POINT(41 40)', NULL); +-- N8 +INSERT INTO city_data.node(node_id, geom, containing_face) + VALUES(8, 'SRID=@SRID@;POINT(9 6)', NULL); +-- N9 +INSERT INTO city_data.node(node_id, geom, containing_face) + VALUES(9, 'SRID=@SRID@;POINT(21 6)', NULL); +-- N10 +INSERT INTO city_data.node(node_id, geom, containing_face) + VALUES(10, 'SRID=@SRID@;POINT(35 6)', NULL); +-- N11 +INSERT INTO city_data.node(node_id, geom, containing_face) + VALUES(11, 'SRID=@SRID@;POINT(47 6)', NULL); +-- N12 +INSERT INTO city_data.node(node_id, geom, containing_face) + VALUES(12, 'SRID=@SRID@;POINT(47 14)', NULL); +-- N13 +INSERT INTO city_data.node(node_id, geom, containing_face) + VALUES(13, 'SRID=@SRID@;POINT(35 14)', NULL); +-- N14 +INSERT INTO city_data.node(node_id, geom, containing_face) + VALUES(14, 'SRID=@SRID@;POINT(21 14)', NULL); +-- N15 +INSERT INTO city_data.node(node_id, geom, containing_face) + VALUES(15, 'SRID=@SRID@;POINT(9 14)', NULL); +-- N16 +INSERT INTO city_data.node(node_id, geom, containing_face) + VALUES(16, 'SRID=@SRID@;POINT(9 22)', NULL); +-- N17 +INSERT INTO city_data.node(node_id, geom, containing_face) + VALUES(17, 'SRID=@SRID@;POINT(21 22)', NULL); +-- N18 +INSERT INTO city_data.node(node_id, geom, containing_face) + VALUES(18, 'SRID=@SRID@;POINT(35 22)', NULL); +-- N19 +INSERT INTO city_data.node(node_id, geom, containing_face) + VALUES(19, 'SRID=@SRID@;POINT(47 22)', NULL); +-- N20 +INSERT INTO city_data.node(node_id, geom, containing_face) + VALUES(20, 'SRID=@SRID@;POINT(4 31)', NULL); +-- N21 +INSERT INTO city_data.node(node_id, geom, containing_face) + VALUES(21, 'SRID=@SRID@;POINT(9 35)', NULL); +-- N22 +INSERT INTO city_data.node(node_id, geom, containing_face) + VALUES(22, 'SRID=@SRID@;POINT(13 35)', NULL); + +-- UPDATE Node id sequence +SELECT setval('city_data.node_node_id_seq', 22); + +-- 2C. Insert data into .EDGE table. +-- E1 +INSERT INTO city_data.edge VALUES(1, 1, 1, 1, -1, 1, 0, + 'SRID=@SRID@;LINESTRING(8 30, 16 30, 16 38, 3 38, 3 30, 8 30)'); +-- E2 +INSERT INTO city_data.edge VALUES(2, 2, 2, 3, -2, 2, 0, + 'SRID=@SRID@;LINESTRING(25 30, 31 30, 31 40, 17 40, 17 30, 25 30)'); +-- E3 +INSERT INTO city_data.edge VALUES(3, 2, 3, -3, 2, 2, 2, + 'SRID=@SRID@;LINESTRING(25 30, 25 35)'); +-- E4 +INSERT INTO city_data.edge VALUES(4, 5, 6, -5, 4, 0, 0, + 'SRID=@SRID@;LINESTRING(36 38, 38 35, 41 34, 42 33, 45 32, 47 28, 50 28, 52 32, 57 33)'); +-- E5 +INSERT INTO city_data.edge VALUES(5, 7, 6, -4, 5, 0, 0, + 'SRID=@SRID@;LINESTRING(41 40, 45 40, 47 42, 62 41, 61 38, 59 39, 57 36, 57 33)'); +-- E6 +INSERT INTO city_data.edge VALUES(6, 16, 17, 7, -21, 0, 3, + 'SRID=@SRID@;LINESTRING(9 22, 21 22)'); +-- E7 +INSERT INTO city_data.edge VALUES(7, 17, 18, 8, -19, 0, 4, + 'SRID=@SRID@;LINESTRING(21 22, 35 22)'); +-- E8 +INSERT INTO city_data.edge VALUES(8, 18, 19, -15, -17, 0, 5, + 'SRID=@SRID@;LINESTRING(35 22, 47 22)'); +-- E9 +INSERT INTO city_data.edge VALUES(9, 15, 14, 19, -22, 3, 6, + 'SRID=@SRID@;LINESTRING(9 14, 21 14)'); +-- E10 +INSERT INTO city_data.edge VALUES(10, 13, 14, -20, 17, 7, 4, + 'SRID=@SRID@;LINESTRING(35 14, 21 14)'); +-- E11 +INSERT INTO city_data.edge VALUES(11, 13, 12, 15, -18, 5, 8, + 'SRID=@SRID@;LINESTRING(35 14, 47 14)'); +-- E12 +INSERT INTO city_data.edge VALUES(12, 8, 9, 20, 22, 6, 0, + 'SRID=@SRID@;LINESTRING(9 6, 21 6)'); +-- E13 +INSERT INTO city_data.edge VALUES(13, 9, 10, 18, -12, 7, 0, + 'SRID=@SRID@;LINESTRING(21 6, 35 6)'); +-- E14 +INSERT INTO city_data.edge VALUES(14, 10, 11, 16, -13, 8, 0, + 'SRID=@SRID@;LINESTRING(35 6, 47 6)'); +-- E15 +INSERT INTO city_data.edge VALUES(15, 12, 19, -8, -16, 5, 0, + 'SRID=@SRID@;LINESTRING(47 14, 47 22)'); +-- E16 +INSERT INTO city_data.edge VALUES(16, 11, 12, -11, -14, 8, 0, + 'SRID=@SRID@;LINESTRING(47 6, 47 14)'); +-- E17 +INSERT INTO city_data.edge VALUES(17, 13, 18, -7, 11, 4, 5, + 'SRID=@SRID@;LINESTRING(35 14, 35 22)'); +-- E18 +INSERT INTO city_data.edge VALUES(18, 10, 13, 10, 14, 7, 8, + 'SRID=@SRID@;LINESTRING(35 6, 35 14)'); +-- E19 +INSERT INTO city_data.edge VALUES(19, 14, 17, -6, -10, 3, 4, + 'SRID=@SRID@;LINESTRING(21 14, 21 22)'); +-- E20 +INSERT INTO city_data.edge VALUES(20, 9, 14, -9, 13, 6, 7, + 'SRID=@SRID@;LINESTRING(21 6, 21 14)'); +-- E21 +INSERT INTO city_data.edge VALUES(21, 15, 16, 6, 9, 0, 3, + 'SRID=@SRID@;LINESTRING(9 14, 9 22)'); +-- E22 +INSERT INTO city_data.edge VALUES(22, 8, 15, 21, 12, 0, 6, + 'SRID=@SRID@;LINESTRING(9 6, 9 14)'); +-- E25 +INSERT INTO city_data.edge VALUES(25, 21, 22, -25, 25, 1, 1, + 'SRID=@SRID@;LINESTRING(9 35, 13 35)'); +-- E26 +INSERT INTO city_data.edge VALUES(26, 20, 20, 26, -26, 9, 1, + 'SRID=@SRID@;LINESTRING(4 31, 7 31, 7 34, 4 34, 4 31)'); + +-- UPDATE Edge id sequence +SELECT setval('city_data.edge_data_edge_id_seq', 26); + +-- Set face minimum bounding rectangle +UPDATE city_data.face set mbr = ST_SetSRID( ( select st_extent(geom) from city_data.edge where left_face = face_id or right_face = face_id ), @SRID@ ) where face_id != 0; + +END; + diff -Nru postgis-1.5.3/topology/test/predicate.expected postgis-2.0.1/topology/test/predicate.expected --- postgis-1.5.3/topology/test/predicate.expected 2005-10-19 10:04:15.000000000 +0000 +++ postgis-2.0.1/topology/test/predicate.expected 1970-01-01 00:00:00.000000000 +0000 @@ -1,118 +0,0 @@ -BEGIN - POINT/POINT INTERSECTS - - S1 | N1N6N14 - S3 | N1N6N14 - S4 | N3N4 - S4 | N4 - N1N2N3 | N1N6N14 - N1N2N3 | N3N4 - N3N4 | N4 - - POINT/LINE INTERSECTS - - S1 | R1 - S1 | E20E19 - S1 | R1a - S2 | R1 - S2 | R1a - S3 | R2 - N1N2N3 | R4 - N1N6N14 | R1 - N1N6N14 | R2 - N1N6N14 | E20E19 - N1N6N14 | R1a - N3N4 | R4 - - LINE/LINE INTERSECTS - - R1 | E20E19 - R1 | R1a - R3 | E25 - E7E8 | E20E19 - E20E19 | R1a - - POINT/POLY INTERSECTS - - S1 | P1 - S1 | P2 - S1 | F3 - S1 | F6 - S1 | F3F4 - S2 | P2 - S2 | P3 - S2 | F3F4 - S4 | P4 - N1N2N3 | P4 - N1N2N3 | P5 - N1N2N3 | F1 - N1N6N14 | P1 - N1N6N14 | P2 - N1N6N14 | P5 - N1N6N14 | F3 - N1N6N14 | F6 - N1N6N14 | F3F4 - N1N6N14 | F1 - N3N4 | P4 - N4 | P4 - - LINE/POLY INTERSECTS - - R1 | P1 - R1 | P2 - R1 | P3 - R1 | F3 - R1 | F6 - R1 | F3F4 - R3 | P5 - R3 | F1 - R4 | P4 - E7E8 | P1 - E7E8 | P2 - E7E8 | P3 - E7E8 | F3 - E7E8 | F3F4 - E20E19 | P1 - E20E19 | P2 - E20E19 | F3 - E20E19 | F6 - E20E19 | F3F4 - E25 | P5 - E25 | F1 - R1a | P1 - R1a | P2 - R1a | P3 - R1a | F3 - R1a | F6 - R1a | F3F4 - - POLY/POLY INTERSECTS - - P1 | P2 - P1 | F3 - P1 | F6 - P1 | F3F4 - P2 | P3 - P2 | F3 - P2 | F6 - P2 | F3F4 - P3 | F3F4 - P5 | F1 - F3 | F6 - F3 | F3F4 - F6 | F3F4 - - POINT/POINT EQUALS - - S4 | N4 - - LINE/LINE EQUALS - - R1 | R1a - R3 | E25 - - POLYGON/POLYGON EQUALS - - P5 | F1 - -COMMIT diff -Nru postgis-1.5.3/topology/test/predicates.sql.in postgis-2.0.1/topology/test/predicates.sql.in --- postgis-1.5.3/topology/test/predicates.sql.in 2005-10-13 16:21:49.000000000 +0000 +++ postgis-2.0.1/topology/test/predicates.sql.in 2012-02-27 22:08:12.000000000 +0000 @@ -114,8 +114,19 @@ #endif +SELECT 'POINT/POINT EQUALS (simple/hierarchical)' as operation; - +SELECT a.feature_name, b.feature_name + FROM features.traffic_signs a, features.big_signs b + WHERE a.oid < b.oid AND @SCHEMA@equals(a.feature, b.feature) + ORDER BY a.oid; + +SELECT 'POLYGON/POLYGON EQUALS (simple/hierarchical)' as operation; + +SELECT a.feature_name, b.feature_name + FROM features.land_parcels a, features.big_parcels b + WHERE a.oid < b.oid AND @SCHEMA@equals(a.feature, b.feature) + ORDER BY a.oid; END; diff -Nru postgis-1.5.3/topology/test/query_features.sql postgis-2.0.1/topology/test/query_features.sql --- postgis-1.5.3/topology/test/query_features.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/query_features.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,82 @@ +-- +-- From examples in chapter 1.12.1 of +-- "Spatial Topology and Network Data Models" (Oracle manual) +-- +-- Modified to use postgis-based topology model. +-- Loads the whole topology represented in Figure 1-1 of the +-- manual, creates TopoGeometry objects and associations. +-- + +--ORA-------------------------------- +--ORA---- Main steps for using the topology data model with a topology +--ORA---- built from edge, node, and face data +--ORA-------------------------------- +--ORA---- ... +--ORA---- 7. Query the data. +--ORA---- 8. Optionally, edit data using the PL/SQL or Java API. + + +BEGIN; + +-- 7. Query the data. +SELECT a.feature_name, id(a.feature) as tg_id, + ST_AsText(topology.Geometry(a.feature)) as geom +FROM features.land_parcels a; + +-- Query not in original example --strk; +SELECT a.feature_name, id(a.feature) as tg_id, + ST_AsText(topology.Geometry(a.feature)) as geom +FROM features.traffic_signs a; + +-- Query not in original example --strk; +SELECT a.feature_name, id(a.feature) as tg_id, + ST_AsText(topology.Geometry(a.feature)) as geom +FROM features.city_streets a; + +-- Query hierarchical feautures +SELECT feature_name, ST_AsText(topology.geometry(feature)) +FROM features.big_signs; + +SELECT feature_name,ST_AsText(topology.geometry(feature)) +FROM features.big_streets; + +SELECT feature_name,ST_AsText(topology.geometry(feature)) +FROM features.big_parcels; + + +--NOTYET-- +--NOTYET--/* Window is city_streets */ +--NOTYET--SELECT a.feature_name, b.feature_name +--NOTYET-- FROM city_streets b, +--NOTYET-- land_parcels a +--NOTYET-- WHERE b.feature_name like 'R%' AND +--NOTYET-- sdo_anyinteract(a.feature, b.feature) = 'TRUE' +--NOTYET-- ORDER BY b.feature_name, a.feature_name; +--NOTYET-- +--NOTYET---- Find all streets that have any interaction with land parcel P3. +--NOTYET---- (Should return only R1.) +--NOTYET--SELECT c.feature_name FROM city_streets c, land_parcels l +--NOTYET-- WHERE l.feature_name = 'P3' AND +--NOTYET-- SDO_ANYINTERACT (c.feature, l.feature) = 'TRUE'; +--NOTYET-- +--NOTYET---- Find all land parcels that have any interaction with traffic sign S1. +--NOTYET---- (Should return P1 and P2.) +--NOTYET--SELECT l.feature_name FROM land_parcels l, traffic_signs t +--NOTYET-- WHERE t.feature_name = 'S1' AND +--NOTYET-- SDO_ANYINTERACT (l.feature, t.feature) = 'TRUE'; +--NOTYET-- +--NOTYET---- Get the geometry for land parcel P1. +--NOTYET--SELECT l.feature_name, l.feature.get_geometry() +--NOTYET-- FROM land_parcels l WHERE l.feature_name = 'P1'; +--NOTYET-- +--NOTYET---- Get the boundary of face with face_id 3. +--NOTYET--SELECT topology.GET_FACE_BOUNDARY('CITY_DATA', 3) FROM DUAL; +--NOTYET-- +--NOTYET---- Get the topological elements for land parcel P2. +--NOTYET---- CITY_DATA layer, land parcels (tg_ layer_id = 1), parcel P2 (tg_id = 2) +--NOTYET--SELECT topology.GET_TOPO_OBJECTS('CITY_DATA', 1, 2) FROM DUAL; +--NOTYET-- +--NOTYET-- + +END; + diff -Nru postgis-1.5.3/topology/test/regress/addedge.sql postgis-2.0.1/topology/test/regress/addedge.sql --- postgis-1.5.3/topology/test/regress/addedge.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/addedge.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,71 @@ +set client_min_messages to WARNING; + +SELECT topology.CreateTopology('tt') > 0; + +SELECT 'e1', topology.addEdge('tt', 'LINESTRING(0 0, 8 0)'); +-- Equal edge +SELECT 'e*1', topology.addEdge('tt', 'LINESTRING(0 0, 8 0)'); + +-- Failing cases (should all raise exceptions) ------- + +-- Contained with endpoint contact +SELECT 'e*2', topology.addEdge('tt', 'LINESTRING(1 0, 8 0)'); +-- Contained with no endpoint contact +SELECT 'e*3', topology.addEdge('tt', 'LINESTRING(1 0, 7 0)'); +-- Overlapping +SELECT 'e*4', topology.addEdge('tt', 'LINESTRING(1 0, 9 0)'); +-- Contains with endpoint contact +SELECT 'e*5', topology.addEdge('tt', 'LINESTRING(0 0, 9 0)'); +-- Contains with no endpoint contact +SELECT 'e*6', topology.addEdge('tt', 'LINESTRING(-1 0, 9 0)'); +-- Touches middle with endpoint +SELECT 'e*7', topology.addEdge('tt', 'LINESTRING(5 0, 5 10)'); +-- Crosses +SELECT 'e*8', topology.addEdge('tt', 'LINESTRING(5 -10, 5 10)'); +-- Is touched on the middle by endpoint +SELECT 'e*9', topology.addEdge('tt', 'LINESTRING(0 -10, 0 10)'); +-- Touches middle with internal vertex +SELECT 'e*10', topology.addEdge('tt', 'LINESTRING(0 10, 5 0, 5 10)'); + +-- Endpoint touching cases (should succeed) ------ + +SELECT 'e2', topology.addEdge('tt', 'LINESTRING(8 0, 8 10)'); +SELECT 'e3', topology.addEdge('tt', 'LINESTRING(0 0, 0 10)'); +-- this one connects e2-e3 +SELECT 'e4', topology.addEdge('tt', 'LINESTRING(8 10, 0 10)'); + +-- Disjoint case (should succeed) ------ +SELECT 'e5', topology.addEdge('tt', 'LINESTRING(8 -10, 0 -10)'); + +-- this one touches the same edge (e5) at both endpoints +SELECT 'e6', topology.addEdge('tt', 'LINESTRING(8 -10, 4 -20, 0 -10)'); + +-- +-- See http://trac.osgeo.org/postgis/ticket/770 +-- +-- Closed edge shares endpoint with existing open edge +SELECT '#770-1', topology.addEdge('tt', 'LINESTRING(8 10, 10 10, 10 12, 8 10)'); +-- Closed edge shares endpoint with existing closed edge (and open one) +SELECT '#770-2', topology.addEdge('tt', 'LINESTRING(8 10, 9 8, 10 9, 8 10)'); +-- boundary has puntual intersection with "interior" of closed edge 770-1, +-- but not _only_ on endpoint ! +SELECT '#770-*', topology.addEdge('tt', 'LINESTRING(8 10, 8 12, 10 12)'); +-- same as above, but this time the new edge is closed too +SELECT '#770-*', topology.addEdge('tt', 'LINESTRING(8 10, 7 13, 10 12, 8 12, 10 12)'); +-- once again, but the intersection is now at the new edge endpoint +-- (not the existing edge endpoint) +SELECT '#770-*', topology.addEdge('tt', 'LINESTRING(10 12, 11 12, 10 13, 10 12)'); + +-- Another equals case, this time a closed edge +SELECT '#770-1*', topology.addEdge('tt', 'LINESTRING(8 10, 10 10, 10 12, 8 10)'); + +SELECT edge_id, left_face, right_face, + next_left_edge, next_right_edge, + st_astext(geom) from tt.edge ORDER by edge_id; + +SELECT topology.DropTopology('tt'); + +-- Test topology with MixedCase +SELECT topology.CreateTopology('Ul') > 0; +SELECT 'MiX', topology.addEdge('Ul', 'LINESTRING(0 0, 8 0)'); +SELECT topology.DropTopology('Ul'); diff -Nru postgis-1.5.3/topology/test/regress/addedge_expected postgis-2.0.1/topology/test/regress/addedge_expected --- postgis-1.5.3/topology/test/regress/addedge_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/addedge_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,35 @@ +t +e1|1 +e*1|1 +ERROR: Edge intersects (not on endpoints) with existing edge 1 at or near point POINT(1 0) +ERROR: Edge intersects (not on endpoints) with existing edge 1 at or near point POINT(1 0) +ERROR: Edge intersects (not on endpoints) with existing edge 1 at or near point POINT(1 0) +ERROR: Edge intersects (not on endpoints) with existing edge 1 at or near point POINT(0 0) +ERROR: Edge intersects (not on endpoints) with existing edge 1 at or near point POINT(0 0) +ERROR: Edge intersects (not on endpoints) with existing edge 1 at or near point POINT(5 0) +ERROR: Edge intersects (not on endpoints) with existing edge 1 at or near point POINT(5 0) +ERROR: Edge intersects (not on endpoints) with existing edge 1 at or near point POINT(0 0) +ERROR: Edge intersects (not on endpoints) with existing edge 1 at or near point POINT(5 0) +e2|2 +e3|3 +e4|4 +e5|5 +e6|6 +#770-1|7 +#770-2|8 +ERROR: Edge intersects (not on endpoints) with existing edge 7 at or near point POINT(8 10) +ERROR: Edge intersects (not on endpoints) with existing edge 7 at or near point POINT(8 10) +ERROR: Edge intersects (not on endpoints) with existing edge 7 at or near point POINT(10 12) +#770-1*|7 +1|0|0|-1|1|LINESTRING(0 0,8 0) +2|0|0|-2|2|LINESTRING(8 0,8 10) +3|0|0|-3|3|LINESTRING(0 0,0 10) +4|0|0|-4|4|LINESTRING(8 10,0 10) +5|0|0|-5|5|LINESTRING(8 -10,0 -10) +6|0|0|-6|6|LINESTRING(8 -10,4 -20,0 -10) +7|0|0|-7|7|LINESTRING(8 10,10 10,10 12,8 10) +8|0|0|-8|8|LINESTRING(8 10,9 8,10 9,8 10) +Topology 'tt' dropped +t +MiX|1 +Topology 'Ul' dropped diff -Nru postgis-1.5.3/topology/test/regress/addface.sql postgis-2.0.1/topology/test/regress/addface.sql --- postgis-1.5.3/topology/test/regress/addface.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/addface.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,214 @@ +set client_min_messages to ERROR; + +-- Test with zero tolerance + +SELECT topology.CreateTopology('tt') > 0; + +-- Register a face in absence of edges (exception expected) +SELECT 'f*', topology.addFace('tt', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))'); + +-- Create 4 edges + +SELECT 'e1', topology.addEdge('tt', 'LINESTRING(0 0, 10 0)'); +SELECT 'e2', topology.addEdge('tt', 'LINESTRING(10 0, 10 10)'); +SELECT 'e3', topology.addEdge('tt', 'LINESTRING(0 10, 10 10)'); +SELECT 'e4', topology.addEdge('tt', 'LINESTRING(0 0, 0 10)'); + +-- Add one edge only incident on a vertex +SELECT 'e5', topology.addEdge('tt', 'LINESTRING(0 0, 0 -10)'); + +-- Add 3 more edges closing a square to the right, +-- all edges with same direction + +SELECT 'e6', topology.addEdge('tt', 'LINESTRING(10 10, 20 10)'); +SELECT 'e7', topology.addEdge('tt', 'LINESTRING(20 10, 20 0)'); +SELECT 'e8', topology.addEdge('tt', 'LINESTRING(20 0, 10 0)'); + + +-- Register a face with no holes +SELECT 'f1', topology.addFace('tt', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))'); + +-- Register the _same_ face again +SELECT 'f1*', topology.addFace('tt', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))'); + +-- Register a face with no holes matching all edges in the same direction +SELECT 'f2', topology.addFace('tt', 'POLYGON((10 10, 20 10, 20 0, 10 0, 10 10))'); + +-- Check added faces +SELECT face_id, Box2d(mbr) from tt.face ORDER by face_id; + +-- Check linking +SELECT edge_id, left_face, right_face from tt.edge ORDER by edge_id; + +-- Force re-registration of an existing face +SELECT 'f1-force', topology.addFace('tt', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', true); + +-- re-check added faces and linking +SELECT face_id, Box2d(mbr) from tt.face ORDER by face_id; +SELECT edge_id, left_face, right_face from tt.edge ORDER by edge_id; + +SELECT topology.DropTopology('tt'); + +-- Test topology with MixedCase +SELECT topology.CreateTopology('Ul') > 0; +SELECT 'MiX-e1', topology.addEdge('Ul', 'LINESTRING(0 0, 10 0)'); +SELECT 'MiX-e2', topology.addEdge('Ul', 'LINESTRING(10 0, 10 10)'); +SELECT 'MiX-e3', topology.addEdge('Ul', 'LINESTRING(0 10, 10 10)'); +SELECT 'MiX-e4', topology.addEdge('Ul', 'LINESTRING(0 0, 0 10)'); +SELECT 'MiX-f1', topology.addFace('Ul', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))'); +SELECT topology.DropTopology('Ul'); + +-- Test polygons with holes +SELECT topology.CreateTopology('t2') > 0; + +-- Edges forming two squares +SELECT 't2.e1', topology.addEdge('t2', 'LINESTRING(0 0, 10 0)'); +SELECT 't2.e2', topology.addEdge('t2', 'LINESTRING(10 0, 10 10)'); +SELECT 't2.e3', topology.addEdge('t2', 'LINESTRING(0 10, 10 10)'); +SELECT 't2.e4', topology.addEdge('t2', 'LINESTRING(0 0, 0 10)'); +SELECT 't2.e5', topology.addEdge('t2', 'LINESTRING(10 10, 20 10)'); +SELECT 't2.e6', topology.addEdge('t2', 'LINESTRING(20 10, 20 0)'); +SELECT 't2.e7', topology.addEdge('t2', 'LINESTRING(20 0, 10 0)'); + +-- Clockwise hole within the square on the left +SELECT 't2.e8', topology.addEdge('t2', 'LINESTRING(1 1, 1 2, 2 2, 2 1, 1 1)'); +-- Counter-clockwise hole within the square on the left +SELECT 't2.e9', topology.addEdge('t2', 'LINESTRING(3 1,4 1,4 2,3 2,3 1)'); + +-- Multi-edge hole within the square on the right +SELECT 't2.e10', topology.addEdge('t2', 'LINESTRING(12 2, 14 2, 14 4)'); +SELECT 't2.e11', topology.addEdge('t2', 'LINESTRING(12 2, 12 4, 14 4)'); + +-- Register left face with two holes +SELECT 't2.f1', topology.addFace('t2', +'POLYGON((10 5, 10 10,0 10, 0 0,10 0,10 5), + (1 1,2 1,2 2,1 2,1 1), + (3 1,3 2,4 2,4 1,3 1))' +); + +-- Register right face with one hole +SELECT 't2.f2', topology.addFace('t2', +'POLYGON((20 0,10 0,10 10,20 10,20 0), + (12 2,14 2,14 4,12 4, 12 2))' +); + +-- Register left hole in left square +SELECT 't2.f3', topology.addFace('t2', +'POLYGON((1 1,2 1,2 2,1 2,1 1))' +); + +-- Register right hole in left square +SELECT 't2.f4', topology.addFace('t2', +'POLYGON((3 1,4 1,4 2,3 2,3 1))' +); + +-- Register hole in right face +SELECT 't2.f5', topology.addFace('t2', +'POLYGON((12 2,12 4,14 4,14 2,12 2))' +); + +-- Attempt to register a not-fully-defined face +SELECT topology.addFace('t2', +'POLYGON((12 2,12 5,14 5,14 2,12 2))' +); + +-- Check added faces +SELECT face_id, Box2d(mbr) from t2.face ORDER by face_id; + +-- Check linking +SELECT edge_id, left_face, right_face from t2.edge ORDER by edge_id; + +SELECT topology.DropTopology('t2'); + +-- +-- Test edge touching face ring on both endpoints but not covered +-- (E1 with F1) +-- +-- +-- N2 +-------. +-- |\ F1 | +-- E1 | \ | E3 +-- |F2\ | +-- | / | +-- | /E2 | +-- |/ | +-- N1 +-------' +-- +SELECT topology.CreateTopology('t3') > 0; + +SELECT 't3.e1', topology.addEdge('t3', 'LINESTRING(0 0, 0 10)'); +SELECT 't3.e2', topology.addEdge('t3', 'LINESTRING(0 10, 5 5, 0 0)'); +SELECT 't3.e3', topology.addEdge('t3', 'LINESTRING(0 10, 10 10, 10 0, 0 0)'); + +-- Register F1 +SELECT 't3.f1', topology.addFace('t3', +'POLYGON((5 5, 0 10, 10 10, 10 0, 0 0, 5 5))'); + +-- Register F2 +SELECT 't3.f2', topology.addFace('t3', 'POLYGON((0 0, 5 5, 0 10, 0 0))'); + +-- Check added faces +SELECT face_id, Box2d(mbr) from t3.face ORDER by face_id; + +-- Check linking +SELECT edge_id, left_face, right_face from t3.edge ORDER by edge_id; + +SELECT topology.DropTopology('t3'); + +-- +-- Test proper updating of left/right face for contained edges +-- and nodes +-- +SELECT topology.CreateTopology('t4') > 0; + +SELECT 'N' || topology.addNode('t4', 'POINT(2 6)'); +UPDATE t4.node set containing_face = 0 WHERE node_id = 1; + +SELECT 'E' || topology.addEdge('t4', 'LINESTRING(0 0,10 0)'); +SELECT 'E' || topology.addEdge('t4', 'LINESTRING(10 0,10 10)'); +SELECT 'E' || topology.addEdge('t4', 'LINESTRING(10 10,0 10)'); +SELECT 'E' || topology.addEdge('t4', 'LINESTRING(0 0,0 10)'); +SELECT 'E' || topology.addEdge('t4', 'LINESTRING(0 0,5 5)'); +SELECT 'E' || topology.addEdge('t4', 'LINESTRING(5 5,6 5)'); +SELECT 'E' || topology.addEdge('t4', 'LINESTRING(0 10,8 8,10 0)'); + +select 'F' || topology.addface('t4','POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))'); + +-- Check edges and nodes +SELECT 'E'||edge_id, left_face, right_face from t4.edge ORDER by edge_id; +SELECT 'N'||node_id, containing_face from t4.node ORDER by node_id; + +SELECT topology.DropTopology('t4'); + +-- +-- Test narrow face. See ticket #1302. +-- { +-- +SELECT '#1302', topology.CreateTopology('tt') > 0; + +SELECT '#1302', 'E' || topology.addEdge('tt', '01020000000300000000917E9BA468294100917E9B8AEA2841C976BE1FA4682941C976BE9F8AEA2841B39ABE1FA46829415ACCC29F8AEA2841'); +SELECT '#1302', 'E' || topology.addEdge('tt', '010200000003000000B39ABE1FA46829415ACCC29F8AEA284137894120A4682941C976BE9F8AEA284100917E9BA468294100917E9B8AEA2841'); +SELECT '#1302', 'F' || topology.addFace('tt', '0103000000010000000500000000917E9BA468294100917E9B8AEA2841C976BE1FA4682941C976BE9F8AEA2841B39ABE1FA46829415ACCC29F8AEA284137894120A4682941C976BE9F8AEA284100917E9BA468294100917E9B8AEA2841'); + +SELECT '#1302', 'E' || edge_id, 'L' || left_face, 'R' || right_face FROM tt.edge_data ORDER BY edge_id; + +SELECT '#1302', topology.DropTopology('tt'); +-- } + +-- +-- Test face ring with endpoint matching edge endpoint +-- and tricky numbers (see #1383) +-- { +-- +SELECT '#1383', CreateTopology('tt') > 0; + +SELECT '#1383', 'E' || addEdge('tt', 'LINESTRING(-0.1 -10, -0.2 0)'); +SELECT '#1383', 'E' || addEdge('tt', 'LINESTRING(-0.2 0, -1e-8 0)'); +SELECT '#1383', 'E' || addEdge('tt', 'LINESTRING(-1e-8 0, 1 0, -0.1 -10)'); + +SELECT '#1383', 'F' || addFace('tt', 'POLYGON((-1e-8 0, 1 0, -0.1 -10, -0.2 0, -0.2 0, -1e-8 0))'); + +SELECT '#1383', 'E' || edge_id, 'L' || left_face, 'R' || right_face FROM tt.edge_data ORDER BY edge_id; + +SELECT '#1383', DropTopology('tt'); +-- } diff -Nru postgis-1.5.3/topology/test/regress/addface2.5d.sql postgis-2.0.1/topology/test/regress/addface2.5d.sql --- postgis-1.5.3/topology/test/regress/addface2.5d.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/addface2.5d.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,24 @@ +set client_min_messages to ERROR; + +-- Test with zero tolerance + +SELECT topology.CreateTopology('tt3d', -1, 0, true) > 0; + +-- Create 4 edges + +SELECT 'e1', topology.addEdge('tt3d', 'LINESTRING(0 0 10, 10 0 20)'); +SELECT 'e2', topology.addEdge('tt3d', 'LINESTRING(10 0 20, 10 10 30)'); +SELECT 'e3', topology.addEdge('tt3d', 'LINESTRING(0 10 20, 10 10 30)'); +SELECT 'e4', topology.addEdge('tt3d', 'LINESTRING(0 0 10, 0 10 20)'); + +-- Register a face with no holes +SELECT 'f1', topology.addFace('tt3d', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))'); + +-- Check added faces +SELECT face_id, st_asewkt(mbr) from tt3d.face ORDER by face_id; + +-- Check linking +SELECT edge_id, left_face, right_face from tt3d.edge ORDER by edge_id; + +SELECT topology.DropTopology('tt3d'); + diff -Nru postgis-1.5.3/topology/test/regress/addface2.5d_expected postgis-2.0.1/topology/test/regress/addface2.5d_expected --- postgis-1.5.3/topology/test/regress/addface2.5d_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/addface2.5d_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,13 @@ +t +e1|1 +e2|2 +e3|3 +e4|4 +f1|1 +0| +1|POLYGON((0 0,0 10,10 10,10 0,0 0)) +1|1|0 +2|1|0 +3|0|1 +4|0|1 +Topology 'tt3d' dropped diff -Nru postgis-1.5.3/topology/test/regress/addface_expected postgis-2.0.1/topology/test/regress/addface_expected --- postgis-1.5.3/topology/test/regress/addface_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/addface_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,135 @@ +t +ERROR: Found no edges on the polygon boundary +e1|1 +e2|2 +e3|3 +e4|4 +e5|5 +e6|6 +e7|7 +e8|8 +f1|1 +f1*|1 +f2|2 +0| +1|BOX(0 0,10 10) +2|BOX(10 0,20 10) +1|1|0 +2|1|2 +3|0|1 +4|0|1 +5|0|0 +6|0|2 +7|0|2 +8|0|2 +f1-force|3 +0| +1|BOX(0 0,10 10) +2|BOX(10 0,20 10) +3|BOX(0 0,10 10) +1|3|0 +2|3|2 +3|0|3 +4|0|3 +5|0|0 +6|0|2 +7|0|2 +8|0|2 +Topology 'tt' dropped +t +MiX-e1|1 +MiX-e2|2 +MiX-e3|3 +MiX-e4|4 +MiX-f1|1 +Topology 'Ul' dropped +t +t2.e1|1 +t2.e2|2 +t2.e3|3 +t2.e4|4 +t2.e5|5 +t2.e6|6 +t2.e7|7 +t2.e8|8 +t2.e9|9 +t2.e10|10 +t2.e11|11 +t2.f1|1 +t2.f2|2 +t2.f3|3 +t2.f4|4 +t2.f5|5 +ERROR: Polygon boundary is not fully defined by existing edges at or near point POINT(12 5) +0| +1|BOX(0 0,10 10) +2|BOX(10 0,20 10) +3|BOX(1 1,2 2) +4|BOX(3 1,4 2) +5|BOX(12 2,14 4) +1|1|0 +2|1|2 +3|0|1 +4|0|1 +5|0|2 +6|0|2 +7|0|2 +8|1|3 +9|4|1 +10|5|2 +11|2|5 +Topology 't2' dropped +t +t3.e1|1 +t3.e2|2 +t3.e3|3 +t3.f1|1 +t3.f2|2 +0| +1|BOX(0 0,10 10) +2|BOX(0 0,5 10) +1|0|2 +2|1|2 +3|0|1 +Topology 't3' dropped +t +N1 +E1 +E2 +E3 +E4 +E5 +E6 +E7 +F1 +E1|1|0 +E2|1|0 +E3|1|0 +E4|0|1 +E5|1|1 +E6|1|1 +E7|1|1 +N1|1 +N2| +N3| +N4| +N5| +N6| +N7| +Topology 't4' dropped +#1302|t +#1302|E1 +#1302|E2 +#1302|F1 +#1302|E1|L0|R1 +#1302|E2|L0|R1 +#1302|Topology 'tt' dropped +#1383|t +#1383|E1 +#1383|E2 +#1383|E3 +#1383|F1 +#1383|E1|L0|R1 +#1383|E2|L0|R1 +#1383|E3|L0|R1 +#1383|Topology 'tt' dropped diff -Nru postgis-1.5.3/topology/test/regress/addnode.sql postgis-2.0.1/topology/test/regress/addnode.sql --- postgis-1.5.3/topology/test/regress/addnode.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/addnode.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,47 @@ +set client_min_messages to WARNING; + +-- Test with zero tolerance + +SELECT topology.CreateTopology('nodes') > 0; + +-- Check that the same point geometry return the same node id + +SELECT 'p1', topology.addNode('nodes', 'POINT(0 0)'); +SELECT 'p1b', topology.addNode('nodes', 'POINT(0 0)'); + +SELECT 'p2', topology.addNode('nodes', 'POINT(1 0)'); +SELECT 'p2b', topology.addNode('nodes', 'POINT(1 0)'); + +-- Check that adding a node in the middle of an existing edge is refused +-- While adding one on the endpoint is fine +INSERT INTO nodes.edge VALUES(nextval('nodes.edge_data_edge_id_seq'),1,1,1,-1,0,0, + 'LINESTRING(0 10,10 10)'); +SELECT 'p3*1', topology.addNode('nodes', 'POINT(5 10)'); -- refused +SELECT 'p3', topology.addNode('nodes', 'POINT(0 10)'); -- good +SELECT 'p4', topology.addNode('nodes', 'POINT(10 10)'); -- good + +-- Now allow edge splitting: +SELECT 'p5', topology.addNode('nodes', 'POINT(5 10)', true); +-- ... and verify the edge was split +SELECT 'post-p5', edge_id, ST_AsText(geom) FROM nodes.edge ORDER BY edge_id; + + +-- And same against a closed edge +INSERT INTO nodes.face VALUES(nextval('nodes.face_face_id_seq'), 'POLYGON((0 20, 10 20, 10 30, 0 30, 0 20))'); +INSERT INTO nodes.edge VALUES(nextval('nodes.edge_data_edge_id_seq'),2,2,2,-2,1,0, + 'LINESTRING(0 20,10 20,10 30, 0 30, 0 20)'); +SELECT 'p6', topology.addNode('nodes', 'POINT(0 20)'); -- good + +-- Now allow computing containing face: +SELECT 'p7', topology.addNode('nodes', 'POINT(5 25)', false, true); + +-- Check all nodes +SELECT node_id, containing_face, st_astext(geom) from nodes.node +ORDER by node_id; + +SELECT topology.DropTopology('nodes'); + +-- Test topology with MixedCase +SELECT topology.CreateTopology('Ul') > 0; +SELECT 'MiX', topology.addNode('Ul', 'POINT(0 0)'); +SELECT topology.DropTopology('Ul'); diff -Nru postgis-1.5.3/topology/test/regress/addnode_expected postgis-2.0.1/topology/test/regress/addnode_expected --- postgis-1.5.3/topology/test/regress/addnode_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/addnode_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,24 @@ +t +p1|1 +p1b|1 +p2|2 +p2b|2 +ERROR: An edge crosses the given node. +p3|3 +p4|4 +p5|5 +post-p5|1|LINESTRING(0 10,5 10) +post-p5|2|LINESTRING(5 10,10 10) +p6|6 +p7|7 +1||POINT(0 0) +2||POINT(1 0) +3||POINT(0 10) +4||POINT(10 10) +5||POINT(5 10) +6||POINT(0 20) +7|1|POINT(5 25) +Topology 'nodes' dropped +t +MiX|1 +Topology 'Ul' dropped diff -Nru postgis-1.5.3/topology/test/regress/addtopogeometrycolumn.sql postgis-2.0.1/topology/test/regress/addtopogeometrycolumn.sql --- postgis-1.5.3/topology/test/regress/addtopogeometrycolumn.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/addtopogeometrycolumn.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,47 @@ +set client_min_messages to WARNING; +\set VERBOSITY terse + +select createtopology('tt') > 0; +select addtopogeometrycolumn('tt','public','feature','tg','POINT'); -- fail +create table feature(id integer); +select addtopogeometrycolumn('tt','public','feature','tg','BOGUS'); -- fail +select addtopogeometrycolumn('tt','public','feature','tg','POINT', 0); -- fail + +-- Expect first good call returning 1 +select 'T1', addtopogeometrycolumn('tt','public','feature','tg','POINT'); + +-- Check that you can add a second topogeometry column to the same table +select 'T2', addtopogeometrycolumn('tt','public','feature','tg2','LINE'); + +-- Check polygonal +select 'T3', addtopogeometrycolumn('tt','public','feature','tg3','POLYGON'); + +-- Check collection +select 'T4', addtopogeometrycolumn('tt','public','feature','tg4','COLLECTION'); + +-- Check alternate names +select 'T5', addtopogeometrycolumn('tt','public','feature', + 'tg5','ST_MultiPoint'); +select 'T6', addtopogeometrycolumn('tt','public','feature', + 'tg6','ST_MultiLineString'); +select 'T7', addtopogeometrycolumn('tt','public','feature', + 'tg7','ST_MultiPolygon'); +select 'T8', addtopogeometrycolumn('tt','public','feature', + 'tg8','GEOMETRYCOLLECTION'); +select 'T9', addtopogeometrycolumn('tt','public','feature', + 'tg9','PUNtal'); +select 'T10', addtopogeometrycolumn('tt','public','feature', + 'tg10','Lineal'); +select 'T11', addtopogeometrycolumn('tt','public','feature', + 'tg11','Areal'); +select 'T12', addtopogeometrycolumn('tt','public','feature', + 'tg12','GEOMETRY'); + +select l.layer_id, l.schema_name, l.table_name, l.feature_column, + l.feature_type, l.level, l.child_id +from topology.layer l, topology.topology t +where l.topology_id = t.id and t.name = 'tt' +order by l.layer_id; + +drop table feature; +select droptopology('tt'); diff -Nru postgis-1.5.3/topology/test/regress/addtopogeometrycolumn_expected postgis-2.0.1/topology/test/regress/addtopogeometrycolumn_expected --- postgis-1.5.3/topology/test/regress/addtopogeometrycolumn_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/addtopogeometrycolumn_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,29 @@ +t +ERROR: relation "public.feature" does not exist +ERROR: Layer type must be one of POINT,LINE,POLYGON,COLLECTION +ERROR: Child layer 0 does not exist in topology "tt" +T1|1 +T2|2 +T3|3 +T4|4 +T5|5 +T6|6 +T7|7 +T8|8 +T9|9 +T10|10 +T11|11 +T12|12 +1|public|feature|tg|1|0| +2|public|feature|tg2|2|0| +3|public|feature|tg3|3|0| +4|public|feature|tg4|4|0| +5|public|feature|tg5|1|0| +6|public|feature|tg6|2|0| +7|public|feature|tg7|3|0| +8|public|feature|tg8|4|0| +9|public|feature|tg9|1|0| +10|public|feature|tg10|2|0| +11|public|feature|tg11|3|0| +12|public|feature|tg12|4|0| +Topology 'tt' dropped diff -Nru postgis-1.5.3/topology/test/regress/copytopology.sql postgis-2.0.1/topology/test/regress/copytopology.sql --- postgis-1.5.3/topology/test/regress/copytopology.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/copytopology.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,53 @@ +set client_min_messages to WARNING; + +INSERT INTO spatial_ref_sys ( auth_name, auth_srid, srid, proj4text ) VALUES ( 'EPSG', 4326, 4326, '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs' ); +\i load_topology-4326.sql +\i load_features.sql +\i more_features.sql + +SELECT topology.CopyTopology('city_data', 'CITY_data_UP_down') > 0; + +SELECT srid,precision FROM topology.topology WHERE name = 'CITY_data_UP_down'; + +SELECT 'nodes', count(node_id) FROM "CITY_data_UP_down".node; +SELECT * FROM "CITY_data_UP_down".node EXCEPT +SELECT * FROM "city_data".node; + +SELECT 'edges', count(edge_id) FROM "CITY_data_UP_down".edge_data; +SELECT * FROM "CITY_data_UP_down".edge EXCEPT +SELECT * FROM "city_data".edge; + +SELECT 'faces', count(face_id) FROM "CITY_data_UP_down".face; +SELECT * FROM "CITY_data_UP_down".face EXCEPT +SELECT * FROM "city_data".face; + +SELECT 'relations', count(*) FROM "CITY_data_UP_down".relation; +SELECT * FROM "CITY_data_UP_down".relation EXCEPT +SELECT * FROM "city_data".relation; + +SELECT 'layers', count(l.*) FROM topology.layer l, topology.topology t +WHERE l.topology_id = t.id and t.name = 'CITY_data_UP_down'; +SELECT l.layer_id, l.feature_type, l.level FROM topology.layer l, +topology.topology t where l.topology_id = t.id and t.name = 'CITY_data_UP_down' +EXCEPT +SELECT l.layer_id, l.feature_type, l.level FROM topology.layer l, +topology.topology t where l.topology_id = t.id and t.name = 'city_data'; + +SELECT l.layer_id, l.schema_name, l.table_name, l.feature_column +FROM topology.layer l, topology.topology t +WHERE l.topology_id = t.id and t.name = 'CITY_data_UP_down' +ORDER BY l.layer_id; + +-- Check sequences +SELECT * from "CITY_data_UP_down".node_node_id_seq; +SELECT * from "CITY_data_UP_down".edge_data_edge_id_seq; +SELECT * from "CITY_data_UP_down".face_face_id_seq; +SELECT * from "CITY_data_UP_down".layer_id_seq; +SELECT * from "CITY_data_UP_down".topogeo_s_1; +SELECT * from "CITY_data_UP_down".topogeo_s_2; +SELECT * from "CITY_data_UP_down".topogeo_s_3; + +SELECT topology.DropTopology('CITY_data_UP_down'); +SELECT topology.DropTopology('city_data'); +DROP SCHEMA features CASCADE; +DELETE FROM spatial_ref_sys where srid = 4326; diff -Nru postgis-1.5.3/topology/test/regress/copytopology_expected postgis-2.0.1/topology/test/regress/copytopology_expected --- postgis-1.5.3/topology/test/regress/copytopology_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/copytopology_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,30 @@ +BEGIN +t +9 +22 +26 +COMMIT +BEGIN +1 +2 +3 +COMMIT +t +4326|0 +nodes|22 +edges|24 +faces|10 +relations|39 +layers|3 +1|CITY_data_UP_down|LAYER1| +2|CITY_data_UP_down|LAYER2| +3|CITY_data_UP_down|LAYER3| +node_node_id_seq|22|1|1|9223372036854775807|1|1|0|f|t +edge_data_edge_id_seq|26|1|1|9223372036854775807|1|1|0|f|t +face_face_id_seq|9|1|1|9223372036854775807|1|1|0|f|t +layer_id_seq|1|1|1|9223372036854775807|1|1|1|f|f +topogeo_s_1|9|1|1|9223372036854775807|1|1|0|f|t +topogeo_s_2|8|1|1|9223372036854775807|1|1|0|f|t +topogeo_s_3|8|1|1|9223372036854775807|1|1|0|f|t +Topology 'CITY_data_UP_down' dropped +Topology 'city_data' dropped diff -Nru postgis-1.5.3/topology/test/regress/createtopogeom.sql postgis-2.0.1/topology/test/regress/createtopogeom.sql --- postgis-1.5.3/topology/test/regress/createtopogeom.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/createtopogeom.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,70 @@ +\set VERBOSITY terse +set client_min_messages to ERROR; + +SELECT topology.CreateTopology('MiX') > 0; + +-- Fails due to missing layer 1 +SELECT topology.CreateTopoGeom( + 'MiX', -- Topology name + 3, -- Topology geometry type (polygon/multipolygon) + 1, -- TG_LAYER_ID for this topology (from topology.layer) + '{{3,3},{6,3}}'); -- face_id:3 face_id:6 + +CREATE TABLE "MiX".poi (id int); +SELECT 'l1', topology.AddTopoGeometryColumn('MiX', 'MiX', 'poi', 'feat', 'POINT'); + +-- A Layer of type 1 (POINT) cannot contain a TopoGeometry of type 2 (LINE) +SELECT topology.CreateTopoGeom( 'MiX', 2, 1, '{{12,2}}'); +-- A Layer of type 1 (POINT) cannot contain a TopoGeometry of type 3 (POLY) +SELECT topology.CreateTopoGeom( 'MiX', 3, 1, '{{13,3}}'); +-- A Layer of type 1 (POINT) cannot contain a TopoGeometry of type 4 (COLL.) +SELECT topology.CreateTopoGeom( 'MiX', 4, 1, '{{12,2}}'); + +-- Node 78 does not exist in topology MiX (trigger on "relation" table) +SELECT topology.CreateTopoGeom( 'MiX', 1, 1, '{{78,1}}'); + +SELECT 'n1', topology.addNode('MiX', 'POINT(0 0)'); + +-- Success ! +SELECT layer_id(tg), id(tg), type(tg) FROM ( + SELECT topology.CreateTopoGeom( 'MiX', 1, 1, '{{1,1}}') as tg +) foo; + +-- Invalid TopoGeometry type (out of range) +SELECT CreateTopoGeom( 'MiX', 5, 1, '{{1,1}}'); +SELECT CreateTopoGeom( 'MiX', 0, 1, '{{1,1}}'); + +CREATE TABLE "MiX".f_lineal (id int); +SELECT 'l2', AddTopoGeometryColumn('MiX', 'MiX', 'f_lineal', 'feat', 'LINE'); + +SELECT 'n2', addNode('MiX', 'POINT(10 0)'); +SELECT 'e1', addEdge('MiX', 'LINESTRING(0 0, 10 0)'); + +SELECT CreateTopoGeom( 'MiX', 2, 2, '{{1,1}}'); -- wrong prim. type +SELECT 'L1', ST_AsText(CreateTopoGeom( 'MiX', 2, 2, '{{1,2}}')); -- fine + +CREATE TABLE "MiX".f_areal (id int); +SELECT 'l3', AddTopoGeometryColumn('MiX', 'MiX', 'f_areal', 'feat', 'POLYGON'); + +SELECT 'e2', addEdge('MiX', 'LINESTRING(10 0, 5 5, 0 0)'); +SELECT 'f1', addFace('MiX', 'POLYGON((0 0, 10 0, 5 5, 0 0))'); + +SELECT 'A1', CreateTopoGeom( 'MiX', 2, 3, '{{1,3}}'); -- wrong tg type +SELECT 'A1', CreateTopoGeom( 'MiX', 3, 3, '{{1,2}}'); -- wrong prim. type +SELECT 'A1', ST_AsText(CreateTopoGeom( 'MiX', 3, 3, '{{1,3}}')); -- fine + +CREATE TABLE "MiX".f_mix (id int); +SELECT 'l4', AddTopoGeometryColumn('MiX', 'MiX', 'f_mix', 'feat', 'COLLECTION'); +SELECT 'MP', ST_AsText(CreateTopoGeom( 'MiX', 1, 4, '{{1,1}}')); -- fine point +SELECT 'ML', ST_AsText(CreateTopoGeom( 'MiX', 2, 4, '{{1,2}}')); -- fine line +SELECT 'MA', ST_AsText(CreateTopoGeom( 'MiX', 3, 4, '{{1,3}}')); -- fine area +SELECT 'MM', ST_AsText(CreateTopoGeom( 'MiX', 4, 4, '{{1,3},{1,2},{1,1}}')); -- fine mix + +-- Test emptyness { +SELECT 'POINT EMPTY', ST_AsEWKT( CreateTopoGeom( 'MiX', 1, 4, '{{0,0}}' ) ); +SELECT 'LINESTRING EMPTY', ST_AsEWKT( CreateTopoGeom( 'MiX', 2, 4, '{{0,0}}' ) ); +SELECT 'POLYGON EMPTY', ST_AsEWKT( CreateTopoGeom( 'MiX', 3, 4, '{{0,0}}' ) ); +SELECT 'GEOMETRYCOLLECTION EMPTY', ST_AsEWKT( CreateTopoGeom( 'MiX', 4, 4, '{{0,0}}' ) ); +-- } Test emptyness + +SELECT DropTopology('MiX'); diff -Nru postgis-1.5.3/topology/test/regress/createtopogeom_expected postgis-2.0.1/topology/test/regress/createtopogeom_expected --- postgis-1.5.3/topology/test/regress/createtopogeom_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/createtopogeom_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,32 @@ +t +ERROR: No layer with id 1 is registered with topology MiX +l1|1 +ERROR: A Layer of type 1 cannot contain a TopoGeometry of type 2 +ERROR: A Layer of type 1 cannot contain a TopoGeometry of type 3 +ERROR: A Layer of type 1 cannot contain a TopoGeometry of type 4 +ERROR: Node 78 does not exist in topology MiX +n1|1 +1|2|1 +ERROR: Invalid TopoGeometry type 5 (must be in the range 1..4) +ERROR: Invalid TopoGeometry type 0 (must be in the range 1..4) +l2|2 +n2|2 +e1|1 +ERROR: A TopoGeometry of type 2 cannot contain topology elements of type 1 +L1|MULTILINESTRING((0 0,10 0)) +l3|3 +e2|2 +f1|1 +ERROR: A Layer of type 3 cannot contain a TopoGeometry of type 2 +ERROR: A TopoGeometry of type 3 cannot contain topology elements of type 2 +A1|MULTIPOLYGON(((10 0,0 0,5 5,10 0))) +l4|4 +MP|MULTIPOINT(0 0) +ML|MULTILINESTRING((0 0,10 0)) +MA|MULTIPOLYGON(((10 0,0 0,5 5,10 0))) +MM|GEOMETRYCOLLECTION(POLYGON((10 0,0 0,5 5,10 0)),LINESTRING(0 0,10 0),POINT(0 0)) +POINT EMPTY|MULTIPOINT EMPTY +LINESTRING EMPTY|MULTILINESTRING EMPTY +POLYGON EMPTY|MULTIPOLYGON EMPTY +GEOMETRYCOLLECTION EMPTY|GEOMETRYCOLLECTION EMPTY +Topology 'MiX' dropped diff -Nru postgis-1.5.3/topology/test/regress/createtopology.sql postgis-2.0.1/topology/test/regress/createtopology.sql --- postgis-1.5.3/topology/test/regress/createtopology.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/createtopology.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,28 @@ +\set VERBOSITY terse +set client_min_messages to WARNING; + +SELECT topology.CreateTopology('2d') > 0; + +SELECT topology.CreateTopology('2dAgain', -1, 0, false) > 0; + +SELECT topology.CreateTopology('3d', -1, 0, true) > 0; + +SELECT topology.CreateTopology('3d'); -- already exists + +SELECT name,srid,precision,hasz from topology.topology +WHERE name in ('2d', '2dAgain', '3d' ) +ORDER by name; + +-- Only 3dZ accepted in 3d topo +SELECT topology.AddNode('3d', 'POINT(0 0)'); +SELECT topology.AddNode('3d', 'POINTM(1 1 1)'); +SELECT topology.AddNode('3d', 'POINT(2 2 2)'); + +-- Only 2d accepted in 2d topo +SELECT topology.AddNode('2d', 'POINTM(0 0 0)'); +SELECT topology.AddNode('2d', 'POINT(1 1 1)'); +SELECT topology.AddNode('2d', 'POINT(2 2)'); + +SELECT topology.DropTopology('2d'); +SELECT topology.DropTopology('2dAgain'); +SELECT topology.DropTopology('3d'); diff -Nru postgis-1.5.3/topology/test/regress/createtopology_expected postgis-2.0.1/topology/test/regress/createtopology_expected --- postgis-1.5.3/topology/test/regress/createtopology_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/createtopology_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,16 @@ +t +t +t +ERROR: schema "3d" already exists +2d|0|0|f +2dAgain|-1|0|f +3d|-1|0|t +ERROR: Column has Z dimension but geometry does not +ERROR: Column has Z dimension but geometry does not +3 +ERROR: Geometry has M dimension but column does not +ERROR: Geometry has Z dimension but column does not +3 +Topology '2d' dropped +Topology '2dAgain' dropped +Topology '3d' dropped diff -Nru postgis-1.5.3/topology/test/regress/droptopology.sql postgis-2.0.1/topology/test/regress/droptopology.sql --- postgis-1.5.3/topology/test/regress/droptopology.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/droptopology.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,15 @@ +set client_min_messages to WARNING; + +SELECT topology.CreateTopology('t1') > 0; +SELECT topology.CreateTopology('t2') > 0; + +CREATE TABLE t1f (id int); +SELECT topology.AddTopoGeometryColumn('t1', 'public', 't1f', 'geom_t1', 'LINE') > 0; + +CREATE TABLE t2f (id int); +SELECT topology.AddTopoGeometryColumn('t2', 'public', 't2f', 'geom_t2', 'LINE') > 0; + +SELECT topology.DropTopology('t1'); +SELECT topology.DropTopology('t2'); +DROP TABLE t2f; +DROP TABLE t1f; diff -Nru postgis-1.5.3/topology/test/regress/droptopology_expected postgis-2.0.1/topology/test/regress/droptopology_expected --- postgis-1.5.3/topology/test/regress/droptopology_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/droptopology_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,6 @@ +t +t +t +t +Topology 't1' dropped +Topology 't2' dropped diff -Nru postgis-1.5.3/topology/test/regress/getedgebypoint.sql postgis-2.0.1/topology/test/regress/getedgebypoint.sql --- postgis-1.5.3/topology/test/regress/getedgebypoint.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/getedgebypoint.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,33 @@ +set client_min_messages to WARNING; + +SELECT topology.CreateTopology('schema_topo') > 0; + +select topology.AddEdge('schema_topo',ST_GeomFromText('LINESTRING(1 4, 4 7)')) = 1; +select topology.AddEdge('schema_topo',ST_GeomFromText('LINESTRING(4 7, 6 9)')) = 2; +select topology.AddEdge('schema_topo',ST_GeomFromText('LINESTRING(2 2, 4 4)')) = 3; +select topology.AddEdge('schema_topo',ST_GeomFromText('LINESTRING(4 4, 5 5, 6 6)')) = 4; +select topology.AddEdge('schema_topo',ST_GeomFromText('LINESTRING(6 6, 6 9)')) = 5; + +-- ask for a Point with tolerance zero +select topology.GetEdgeByPoint('schema_topo',ST_GeomFromText('POINT(5 5)'), 0::float8)::int = 4; + +-- ask for a point on an edge +select topology.GetEdgeByPoint('schema_topo',ST_GeomFromText('POINT(5 5)'), 0.1::float8)::int = 4; + +-- Ask for a point outside from an edge with a tolerance sufficient to include one edge +select topology.GetEdgeByPoint('schema_topo',ST_GeomFromText('POINT(5 5.5)'), 0.7::float8)::int = 4; + +-- Ask for a point where there isn't an edge +select topology.GetEdgeByPoint('schema_topo',ST_GeomFromText('POINT(5 5.5)'), 0::float8) = 0; + + +-- Failing cases (should all raise exceptions) ------- + +-- Ask for Point in a Node +select topology.GetEdgeByPoint('schema_topo',ST_GeomFromText('POINT(4 7)'), 1::float8); + +-- Ask for a Point with a tollerance too high +select topology.GetEdgeByPoint('schema_topo',ST_GeomFromText('POINT(5 5)'), 2::float8); + + +SELECT topology.DropTopology('schema_topo'); diff -Nru postgis-1.5.3/topology/test/regress/getedgebypoint_expected postgis-2.0.1/topology/test/regress/getedgebypoint_expected --- postgis-1.5.3/topology/test/regress/getedgebypoint_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/getedgebypoint_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,13 @@ +t +t +t +t +t +t +t +t +t +t +ERROR: Two or more edges found +ERROR: Two or more edges found +Topology 'schema_topo' dropped diff -Nru postgis-1.5.3/topology/test/regress/getfacebypoint.sql postgis-2.0.1/topology/test/regress/getfacebypoint.sql --- postgis-1.5.3/topology/test/regress/getfacebypoint.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/getfacebypoint.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,54 @@ +set client_min_messages to ERROR; + +SELECT topology.CreateTopology('schema_topo') > 0; + +select topology.AddEdge('schema_topo',ST_GeomFromText('LINESTRING(1 2, 1 5)')); +select topology.AddEdge('schema_topo',ST_GeomFromText('LINESTRING(1 5, 10 5)')); +select topology.AddEdge('schema_topo',ST_GeomFromText('LINESTRING(10 5, 10 2)')); +select topology.AddEdge('schema_topo',ST_GeomFromText('LINESTRING(10 2, 1 2)')); +select topology.AddEdge('schema_topo',ST_GeomFromText('LINESTRING(10 5, 10 12)')); +select topology.AddEdge('schema_topo',ST_GeomFromText('LINESTRING(10 12, 10 14)')); +select topology.AddEdge('schema_topo',ST_GeomFromText('LINESTRING(10 14, 10 15)')); +select topology.AddEdge('schema_topo',ST_GeomFromText('LINESTRING(10 15, 15 15)')); +select topology.AddEdge('schema_topo',ST_GeomFromText('LINESTRING(15 15, 15 2)')); +select topology.AddEdge('schema_topo',ST_GeomFromText('LINESTRING(15 2, 10 2)')); +select topology.AddEdge('schema_topo',ST_GeomFromText('LINESTRING(1 5, 1 12)')); +select topology.AddEdge('schema_topo',ST_GeomFromText('LINESTRING(1 12, 7 12)')); +select topology.AddEdge('schema_topo',ST_GeomFromText('LINESTRING(7 12, 8 12)')); +select topology.AddEdge('schema_topo',ST_GeomFromText('LINESTRING(8 12, 10 12)')); +select topology.AddEdge('schema_topo',ST_GeomFromText('LINESTRING(7 12, 7 15, 10 15)')); +select topology.AddEdge('schema_topo',ST_GeomFromText('LINESTRING(8 12, 8 14, 10 14)')); +select topology.AddEdge('schema_topo',ST_GeomFromText('LINESTRING(4 7, 4 10)')); +select topology.AddEdge('schema_topo',ST_GeomFromText('LINESTRING(4 10, 6 10)')); +select topology.AddEdge('schema_topo',ST_GeomFromText('LINESTRING(6 10, 6 7)')); +select topology.AddEdge('schema_topo',ST_GeomFromText('LINESTRING(6 7, 4 7)')); + +select topology.addFace('schema_topo', 'POLYGON((1 2, 1 5, 10 5, 10 2, 1 2 ))'); +select topology.addFace('schema_topo', 'POLYGON((10 2, 10 5, 10 12, 10 14, 10 15, 15 15, 15 2, 10 2))'); +select topology.addFace('schema_topo', 'POLYGON((7 12, 7 15, 10 15, 10 14, 8 14, 8 12, 7 12))'); +select topology.addFace('schema_topo', 'POLYGON((1 5, 1 12, 7 12, 8 12, 10 12, 10 5, 1 5),(4 7, 4 10, 6 10, 6 7, 4 7))'); + + +-- ask for a Point with tolerance zero +select topology.GetFaceByPoint('schema_topo',ST_GeomFromText('POINT(7 7)'), 0::float8)::int; +select topology.GetFaceByPoint('schema_topo',ST_GeomFromText('POINT(6 7)'), 0::float8)::int; +select topology.GetFaceByPoint('schema_topo',ST_GeomFromText('POINT(5 7)'), 0::float8)::int; + +-- ask for a Point where there isn't a Face +select topology.GetFaceByPoint('schema_topo',ST_GeomFromText('POINT(9 13)'), 0::float8)::int; +select topology.GetFaceByPoint('schema_topo',ST_GeomFromText('POINT(5 8)'), 0::float8)::int; + +-- Ask for a point outside from an face but with a tolerance sufficient to include one face +select topology.GetFaceByPoint('schema_topo',ST_GeomFromText('POINT(8.5 13)'), 0.5::float8)::int; +select topology.GetFaceByPoint('schema_topo',ST_GeomFromText('POINT(5 8)'), 1::float8)::int; + +-- Failing cases (should all raise exceptions) ------- + +-- Ask for Point in a Node (2 or more faces) +select topology.GetFaceByPoint('schema_topo',ST_GeomFromText('POINT(1 5)'), 0::float8)::int; + +-- Ask for a Point with a tollerance too high (2 or more faces) +select topology.GetFaceByPoint('schema_topo',ST_GeomFromText('POINT(9 13)'), 1::float8)::int; + + +SELECT topology.DropTopology('schema_topo'); diff -Nru postgis-1.5.3/topology/test/regress/getfacebypoint_expected postgis-2.0.1/topology/test/regress/getfacebypoint_expected --- postgis-1.5.3/topology/test/regress/getfacebypoint_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/getfacebypoint_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,35 @@ +t +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +1 +2 +3 +4 +4 +4 +4 +0 +0 +3 +4 +ERROR: Two or more faces found +ERROR: Two or more faces found +Topology 'schema_topo' dropped diff -Nru postgis-1.5.3/topology/test/regress/getnodebypoint.sql postgis-2.0.1/topology/test/regress/getnodebypoint.sql --- postgis-1.5.3/topology/test/regress/getnodebypoint.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/getnodebypoint.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,30 @@ +set client_min_messages to WARNING; + +SELECT topology.CreateTopology('schema_topo') > 0; + +select topology.AddEdge('schema_topo',ST_GeomFromText('LINESTRING(1 4, 4 7)')) = 1; +select topology.AddEdge('schema_topo',ST_GeomFromText('LINESTRING(4 7, 6 9)')) = 2; +select topology.AddEdge('schema_topo',ST_GeomFromText('LINESTRING(2 2, 4 4)')) = 3; +select topology.AddEdge('schema_topo',ST_GeomFromText('LINESTRING(4 4, 5 5, 6 6)')) = 4; +select topology.AddEdge('schema_topo',ST_GeomFromText('LINESTRING(6 6, 6 9)')) = 5; + +-- ask on a Point with tolerance zero +select topology.GetNodeByPoint('schema_topo',ST_GeomFromText('POINT(5 5)'), 0::float8); + +-- ask on a Point on a node with tolerance +select topology.GetNodeByPoint('schema_topo',ST_GeomFromText('POINT(4 4)'), 0::float8); + +-- Ask for a point outside from an edge with a tolerance sufficient to include one node +select topology.GetNodeByPoint('schema_topo',ST_GeomFromText('POINT(4.1 4)'), 0.3::float8); + +-- Ask for a point where there isn't a node +select topology.GetNodeByPoint('schema_topo',ST_GeomFromText('POINT(5 5.5)'), 0::float8) = 0; + + +-- Failing cases (should all raise exceptions) ------- + +-- Ask for a Point with a tollerance too high +select topology.GetNodeByPoint('schema_topo',ST_GeomFromText('POINT(4 7)'), 5::float8); + + +SELECT topology.DropTopology('schema_topo'); diff -Nru postgis-1.5.3/topology/test/regress/getnodebypoint_expected postgis-2.0.1/topology/test/regress/getnodebypoint_expected --- postgis-1.5.3/topology/test/regress/getnodebypoint_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/getnodebypoint_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,12 @@ +t +t +t +t +t +t +0 +5 +5 +t +ERROR: Two or more nodes found +Topology 'schema_topo' dropped diff -Nru postgis-1.5.3/topology/test/regress/getnodeedges.sql postgis-2.0.1/topology/test/regress/getnodeedges.sql --- postgis-1.5.3/topology/test/regress/getnodeedges.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/getnodeedges.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,8 @@ +set client_min_messages to ERROR; + +\i load_topology.sql + +SELECT 'N'||node_id, (topology.GetNodeEdges('city_data', node_id)).* + FROM city_data.node ORDER BY node_id, sequence; + +SELECT topology.DropTopology('city_data'); diff -Nru postgis-1.5.3/topology/test/regress/getnodeedges_expected postgis-2.0.1/topology/test/regress/getnodeedges_expected --- postgis-1.5.3/topology/test/regress/getnodeedges_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/getnodeedges_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,55 @@ +BEGIN +t +9 +22 +26 +COMMIT +N1|1|1 +N1|2|-1 +N2|1|3 +N2|2|2 +N2|3|-2 +N3|1|-3 +N5|1|4 +N6|1|-5 +N6|2|-4 +N7|1|5 +N8|1|22 +N8|2|12 +N9|1|20 +N9|2|13 +N9|3|-12 +N10|1|18 +N10|2|14 +N10|3|-13 +N11|1|16 +N11|2|-14 +N12|1|15 +N12|2|-16 +N12|3|-11 +N13|1|17 +N13|2|11 +N13|3|-18 +N13|4|10 +N14|1|19 +N14|2|-10 +N14|3|-20 +N14|4|-9 +N15|1|21 +N15|2|9 +N15|3|-22 +N16|1|6 +N16|2|-21 +N17|1|7 +N17|2|-19 +N17|3|-6 +N18|1|8 +N18|2|-17 +N18|3|-7 +N19|1|-15 +N19|2|-8 +N20|1|-26 +N20|2|26 +N21|1|25 +N22|1|-25 +Topology 'city_data' dropped diff -Nru postgis-1.5.3/topology/test/regress/getringedges.sql postgis-2.0.1/topology/test/regress/getringedges.sql --- postgis-1.5.3/topology/test/regress/getringedges.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/getringedges.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,11 @@ +set client_min_messages to ERROR; + +\i load_topology.sql + +SELECT 'R'||edge_id, (topology.GetRingEdges('city_data', edge_id)).* + FROM city_data.edge; + +SELECT 'R-'||edge_id, (topology.GetRingEdges('city_data', -edge_id)).* + FROM city_data.edge; + +SELECT topology.DropTopology('city_data'); diff -Nru postgis-1.5.3/topology/test/regress/getringedges_expected postgis-2.0.1/topology/test/regress/getringedges_expected --- postgis-1.5.3/topology/test/regress/getringedges_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/getringedges_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,237 @@ +BEGIN +t +9 +22 +26 +COMMIT +R1|1|1 +R2|1|2 +R2|2|3 +R2|3|-3 +R3|1|3 +R3|2|-3 +R3|3|2 +R4|1|4 +R4|2|-5 +R4|3|5 +R4|4|-4 +R5|1|5 +R5|2|-4 +R5|3|4 +R5|4|-5 +R6|1|6 +R6|2|7 +R6|3|8 +R6|4|-15 +R6|5|-16 +R6|6|-14 +R6|7|-13 +R6|8|-12 +R6|9|22 +R6|10|21 +R7|1|7 +R7|2|8 +R7|3|-15 +R7|4|-16 +R7|5|-14 +R7|6|-13 +R7|7|-12 +R7|8|22 +R7|9|21 +R7|10|6 +R8|1|8 +R8|2|-15 +R8|3|-16 +R8|4|-14 +R8|5|-13 +R8|6|-12 +R8|7|22 +R8|8|21 +R8|9|6 +R8|10|7 +R9|1|9 +R9|2|19 +R9|3|-6 +R9|4|-21 +R10|1|10 +R10|2|-20 +R10|3|13 +R10|4|18 +R11|1|11 +R11|2|15 +R11|3|-8 +R11|4|-17 +R12|1|12 +R12|2|20 +R12|3|-9 +R12|4|-22 +R13|1|13 +R13|2|18 +R13|3|10 +R13|4|-20 +R14|1|14 +R14|2|16 +R14|3|-11 +R14|4|-18 +R15|1|15 +R15|2|-8 +R15|3|-17 +R15|4|11 +R16|1|16 +R16|2|-11 +R16|3|-18 +R16|4|14 +R17|1|17 +R17|2|-7 +R17|3|-19 +R17|4|-10 +R18|1|18 +R18|2|10 +R18|3|-20 +R18|4|13 +R19|1|19 +R19|2|-6 +R19|3|-21 +R19|4|9 +R20|1|20 +R20|2|-9 +R20|3|-22 +R20|4|12 +R21|1|21 +R21|2|6 +R21|3|7 +R21|4|8 +R21|5|-15 +R21|6|-16 +R21|7|-14 +R21|8|-13 +R21|9|-12 +R21|10|22 +R22|1|22 +R22|2|21 +R22|3|6 +R22|4|7 +R22|5|8 +R22|6|-15 +R22|7|-16 +R22|8|-14 +R22|9|-13 +R22|10|-12 +R25|1|25 +R25|2|-25 +R26|1|26 +R-1|1|-1 +R-2|1|-2 +R-3|1|-3 +R-3|2|2 +R-3|3|3 +R-4|1|-4 +R-4|2|4 +R-4|3|-5 +R-4|4|5 +R-5|1|-5 +R-5|2|5 +R-5|3|-4 +R-5|4|4 +R-6|1|-6 +R-6|2|-21 +R-6|3|9 +R-6|4|19 +R-7|1|-7 +R-7|2|-19 +R-7|3|-10 +R-7|4|17 +R-8|1|-8 +R-8|2|-17 +R-8|3|11 +R-8|4|15 +R-9|1|-9 +R-9|2|-22 +R-9|3|12 +R-9|4|20 +R-10|1|-10 +R-10|2|17 +R-10|3|-7 +R-10|4|-19 +R-11|1|-11 +R-11|2|-18 +R-11|3|14 +R-11|4|16 +R-12|1|-12 +R-12|2|22 +R-12|3|21 +R-12|4|6 +R-12|5|7 +R-12|6|8 +R-12|7|-15 +R-12|8|-16 +R-12|9|-14 +R-12|10|-13 +R-13|1|-13 +R-13|2|-12 +R-13|3|22 +R-13|4|21 +R-13|5|6 +R-13|6|7 +R-13|7|8 +R-13|8|-15 +R-13|9|-16 +R-13|10|-14 +R-14|1|-14 +R-14|2|-13 +R-14|3|-12 +R-14|4|22 +R-14|5|21 +R-14|6|6 +R-14|7|7 +R-14|8|8 +R-14|9|-15 +R-14|10|-16 +R-15|1|-15 +R-15|2|-16 +R-15|3|-14 +R-15|4|-13 +R-15|5|-12 +R-15|6|22 +R-15|7|21 +R-15|8|6 +R-15|9|7 +R-15|10|8 +R-16|1|-16 +R-16|2|-14 +R-16|3|-13 +R-16|4|-12 +R-16|5|22 +R-16|6|21 +R-16|7|6 +R-16|8|7 +R-16|9|8 +R-16|10|-15 +R-17|1|-17 +R-17|2|11 +R-17|3|15 +R-17|4|-8 +R-18|1|-18 +R-18|2|14 +R-18|3|16 +R-18|4|-11 +R-19|1|-19 +R-19|2|-10 +R-19|3|17 +R-19|4|-7 +R-20|1|-20 +R-20|2|13 +R-20|3|18 +R-20|4|10 +R-21|1|-21 +R-21|2|9 +R-21|3|19 +R-21|4|-6 +R-22|1|-22 +R-22|2|12 +R-22|3|20 +R-22|4|-9 +R-25|1|-25 +R-25|2|25 +R-26|1|-26 +Topology 'city_data' dropped diff -Nru postgis-1.5.3/topology/test/regress/gettopogeomelements.sql postgis-2.0.1/topology/test/regress/gettopogeomelements.sql --- postgis-1.5.3/topology/test/regress/gettopogeomelements.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/gettopogeomelements.sql 2012-03-28 11:36:52.000000000 +0000 @@ -0,0 +1,22 @@ +set client_min_messages to WARNING; + +\i load_topology.sql +\i load_features.sql + +SELECT lid, tid, GetTopoGeomElements('city_data', lid, tid) +FROM ( + SELECT DISTINCT layer_id as lid, topogeo_id as tid + FROM city_data.relation +) as f +order by 1, 2, 3; + +SELECT lid, tid, 'ARY', GetTopoGeomElementArray('city_data', lid, tid) +FROM ( + SELECT DISTINCT layer_id as lid, topogeo_id as tid + FROM city_data.relation +) as f +order by 1, 2; + +-- clean up +SELECT topology.DropTopology('city_data'); +DROP SCHEMA features CASCADE; diff -Nru postgis-1.5.3/topology/test/regress/gettopogeomelements_expected postgis-2.0.1/topology/test/regress/gettopogeomelements_expected --- postgis-1.5.3/topology/test/regress/gettopogeomelements_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/gettopogeomelements_expected 2012-03-28 11:36:52.000000000 +0000 @@ -0,0 +1,43 @@ +BEGIN +t +9 +22 +26 +COMMIT +BEGIN +1 +2 +3 +COMMIT +1|1|{3,3} +1|1|{6,3} +1|2|{4,3} +1|2|{7,3} +1|3|{5,3} +1|3|{8,3} +1|4|{2,3} +1|5|{1,3} +2|1|{14,1} +2|2|{13,1} +2|3|{6,1} +2|4|{4,1} +3|1|{9,2} +3|1|{10,2} +3|2|{4,2} +3|2|{5,2} +3|3|{25,2} +3|4|{3,2} +1|1|ARY|{{3,3},{6,3}} +1|2|ARY|{{4,3},{7,3}} +1|3|ARY|{{5,3},{8,3}} +1|4|ARY|{{2,3}} +1|5|ARY|{{1,3}} +2|1|ARY|{{14,1}} +2|2|ARY|{{13,1}} +2|3|ARY|{{6,1}} +2|4|ARY|{{4,1}} +3|1|ARY|{{9,2},{10,2}} +3|2|ARY|{{4,2},{5,2}} +3|3|ARY|{{25,2}} +3|4|ARY|{{3,2}} +Topology 'city_data' dropped diff -Nru postgis-1.5.3/topology/test/regress/gml.sql postgis-2.0.1/topology/test/regress/gml.sql --- postgis-1.5.3/topology/test/regress/gml.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/gml.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,213 @@ +set client_min_messages to WARNING; + +INSERT INTO spatial_ref_sys ( auth_name, auth_srid, srid, proj4text ) VALUES ( 'EPSG', 4326, 4326, '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs' ); + +\i load_topology-4326.sql +\i load_features.sql +\i more_features.sql + +--- Puntual single element { + +-- Output simple puntual features (composed by single topo-element) +SELECT feature_name||'-vanilla', topology.AsGML(feature) + FROM features.traffic_signs + WHERE feature_name IN ('S1', 'S2', 'S3', 'S4' ) + ORDER BY feature_name; + +-- Output again but with no prefix +SELECT feature_name||'-noprefix', topology.AsGML(feature, '') + FROM features.traffic_signs + WHERE feature_name IN ('S1', 'S2', 'S3', 'S4' ) + ORDER BY feature_name; + +-- Output again with custom prefix +SELECT feature_name||'-customprefix', topology.AsGML(feature, 'cstm') + FROM features.traffic_signs + WHERE feature_name IN ('S1', 'S2', 'S3', 'S4' ) + ORDER BY feature_name; + +-- Again with no prefix, no srsDimension (opt+=2) +-- and swapped lat/lon (opt+=16) and short CRS +SELECT feature_name||'-latlon', topology.AsGML(feature, '', 15, 18) + FROM features.traffic_signs + WHERE feature_name IN ('S4'); + +--- } Puntual single-element + +--- Puntual multi element { + +SELECT feature_name||'-noprefix', topology.AsGML(feature, '') + FROM features.traffic_signs + WHERE feature_name IN ('N1N2N3'); + +--- } Puntual multi-element + +--- Lineal single element { + +-- Output simple lineal features (composed by single topo element) +SELECT feature_name||'-vanilla', topology.AsGML(feature) + FROM features.city_streets + WHERE feature_name IN ('R3', 'R4' ) + ORDER BY feature_name; + +-- Output again but with no prefix +SELECT feature_name||'-noprefix', topology.AsGML(feature, '') + FROM features.city_streets + WHERE feature_name IN ('R3', 'R4' ) + ORDER BY feature_name; + +-- Output again with custom prefix +SELECT feature_name||'-customprefix', topology.AsGML(feature, 'cstm') + FROM features.city_streets + WHERE feature_name IN ('R3', 'R4' ) + ORDER BY feature_name; + +--- } Lineal single-element + +--- Lineal multi-element { + +-- Output simple lineal features (composed by single topo element) +SELECT feature_name||'-vanilla', topology.AsGML(feature) + FROM features.city_streets + WHERE feature_name IN ('R1', 'R2' ) + ORDER BY feature_name; + +-- Output again but with no prefix +SELECT feature_name||'-noprefix', topology.AsGML(feature, '') + FROM features.city_streets + WHERE feature_name IN ('R1', 'R2' ) + ORDER BY feature_name; + +-- Output again with custom prefix +SELECT feature_name||'-customprefix', topology.AsGML(feature, 'cstm') + FROM features.city_streets + WHERE feature_name IN ('R1', 'R2' ) + ORDER BY feature_name; + +--- } Lineal multi-element + +--- Areal single-element { + +-- Output simple lineal features (composed by single topo element) +SELECT feature_name||'-vanilla', topology.AsGML(feature) + FROM features.land_parcels + WHERE feature_name IN ('P4', 'P5' ) + ORDER BY feature_name; + +-- Output again but with no prefix +SELECT feature_name||'-noprefix', topology.AsGML(feature, '') + FROM features.land_parcels WHERE feature_name IN ('P4', 'P5') + ORDER BY feature_name; + +-- Output again with custom prefix +SELECT feature_name||'-customprefix', topology.AsGML(feature, 'cstm') + FROM features.land_parcels WHERE feature_name IN ('P4', 'P5') + ORDER BY feature_name; + +--- } Areal single-element + +--- Areal multi-element { + +-- Output simple lineal features (composed by single topo element) +SELECT feature_name||'-vanilla', topology.AsGML(feature) + FROM features.land_parcels + WHERE feature_name IN ('P1', 'P2', 'P3' ) + ORDER BY feature_name; + +-- Output again but with no prefix +SELECT feature_name||'-noprefix', topology.AsGML(feature, '') + FROM features.land_parcels + WHERE feature_name IN ('P1', 'P2', 'P3' ) + ORDER BY feature_name; + +-- Output again with custom prefix +SELECT feature_name||'-customprefix', topology.AsGML(feature, 'cstm') + FROM features.land_parcels + WHERE feature_name IN ('P1', 'P2', 'P3' ) + ORDER BY feature_name; + +--- } Areal multi-element + +--- { Visited table bookkeeping + +CREATE TABLE visited (element_type int, element_id int); + +-- R2 visits E4,E5 +-- N5,N6,N7 +SELECT feature_name||'-visited', topology.AsGML(feature, + '', 15, 2, 'visited'::regclass) FROM features.city_streets + WHERE feature_name IN ('R2'); + +-- S1 visits N14 +-- S3 visits (N6) +SELECT feature_name||'-visited', topology.AsGML(feature, + '', 15, 2, 'visited'::regclass) FROM features.traffic_signs + WHERE feature_name IN ('S1', 'S3') + ORDER BY feature_name; + +-- R1 visits E9,E10, +-- N13,(N14),N15 +SELECT feature_name||'-visited', topology.AsGML(feature, + '', 15, 2, 'visited'::regclass) FROM features.city_streets + WHERE feature_name IN ('R1'); + +-- N1N6N14 visits N1,(N6),(N14) +SELECT feature_name||'-visited', topology.AsGML(feature, + '', 15, 2, 'visited'::regclass) FROM features.traffic_signs + WHERE feature_name IN ('N1N6N14') + ORDER BY feature_name; + +-- P2 visits F4,F7 +-- E7,E17,E18,E13,E20,E19 +-- N17,N18,(N13),N10,N9,(N14),N17 +-- P1 visits F3,F6 +-- F3-> E6,(E19),(E9),(E21) +-- F4-> E22,(E9),(E20),E12 +-- E6-> N16,(N17) +-- E22-> N8,(N15) +-- E12-> (N8),(N9) +SELECT feature_name||'-visited', topology.AsGML(feature, + '', 15, 2, 'visited'::regclass) FROM features.land_parcels + WHERE feature_name IN ('P1', 'P2') + ORDER BY feature_name DESC; + +-- F3F4 visits (F3),(F4) +SELECT feature_name||'-visited', topology.AsGML(feature, + '', 15, 2, 'visited'::regclass) FROM features.land_parcels + WHERE feature_name IN ('F3F4') + ORDER BY feature_name DESC; + +-- E7E8 visits: (E7),E8 +-- (N17),(N18),N19 +SELECT feature_name||'-visited', topology.AsGML(feature, + '', 15, 2, 'visited'::regclass) FROM features.city_streets + WHERE feature_name IN ('E7E8'); + +-- Test custom identifier prefix +-- P3 visits (E18),(E17),(E8),E15,E16,E14 +-- (N10),(N13),(N18),N19,N12,N11 +SELECT feature_name||'-visited-idprefix', topology.AsGML(feature, + '', 15, 2, 'visited'::regclass, 'cd-') FROM features.land_parcels + WHERE feature_name IN ('P3'); + +--- } Visited table bookkeeping + +--- { GML2 output + +-- Output in GML2 +SELECT feature_name||'-gml2' as name, topology.AsGML(feature,'',0,2,NULL,'',2) + FROM features.city_streets + WHERE feature_name IN ('R1', 'R2', 'R3', 'R4' ) +UNION +SELECT feature_name||'-gml2', topology.AsGML(feature,'',0,2,NULL,'',2) + FROM features.traffic_signs + WHERE feature_name IN ('S1', 'S2', 'S3', 'S4' ) +ORDER BY name; + +--- } GML2 output + + +SELECT topology.DropTopology('city_data'); +DROP SCHEMA features CASCADE; +DELETE FROM spatial_ref_sys where srid = 4326; +DROP TABLE visited; diff -Nru postgis-1.5.3/topology/test/regress/gml_expected postgis-2.0.1/topology/test/regress/gml_expected --- postgis-1.5.3/topology/test/regress/gml_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/gml_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,71 @@ +BEGIN +t +9 +22 +26 +COMMIT +BEGIN +1 +2 +3 +COMMIT +S1-vanilla|21 14 +S2-vanilla|35 14 +S3-vanilla|57 33 +S4-vanilla|20 37 +S1-noprefix|21 14 +S2-noprefix|35 14 +S3-noprefix|57 33 +S4-noprefix|20 37 +S1-customprefix|21 14 +S2-customprefix|35 14 +S3-customprefix|57 33 +S4-customprefix|20 37 +S4-latlon|37 20 +N1N2N3-noprefix|8 3025 3025 35 +R3-vanilla|9 35 13 35 +R4-vanilla|25 30 25 35 +R3-noprefix|9 35 13 35 +R4-noprefix|25 30 25 35 +R3-customprefix|9 35 13 35 +R4-customprefix|25 30 25 35 +R1-vanilla|9 14 21 1435 14 21 14 +R2-vanilla|36 38 38 35 41 34 42 33 45 32 47 28 50 28 52 32 57 3341 40 45 40 47 42 62 41 61 38 59 39 57 36 57 33 +R1-noprefix|9 14 21 1435 14 21 14 +R2-noprefix|36 38 38 35 41 34 42 33 45 32 47 28 50 28 52 32 57 3341 40 45 40 47 42 62 41 61 38 59 39 57 36 57 33 +R1-customprefix|9 14 21 1435 14 21 14 +R2-customprefix|36 38 38 35 41 34 42 33 45 32 47 28 50 28 52 32 57 3341 40 45 40 47 42 62 41 61 38 59 39 57 36 57 33 +P4-vanilla|25 30 31 30 31 40 17 40 17 30 25 30 +P5-vanilla|8 30 16 30 16 38 3 38 3 30 8 304 31 7 31 7 34 4 34 4 31 +P4-noprefix|25 30 31 30 31 40 17 40 17 30 25 30 +P5-noprefix|8 30 16 30 16 38 3 38 3 30 8 304 31 7 31 7 34 4 34 4 31 +P4-customprefix|25 30 31 30 31 40 17 40 17 30 25 30 +P5-customprefix|8 30 16 30 16 38 3 38 3 30 8 304 31 7 31 7 34 4 34 4 31 +P1-vanilla|9 22 21 2221 14 21 229 14 21 149 14 9 229 14 21 1421 6 21 149 6 21 69 6 9 14 +P2-vanilla|21 22 35 2235 14 35 2235 14 21 1421 14 21 2235 14 21 1435 6 35 1421 6 35 621 6 21 14 +P3-vanilla|35 22 47 2247 14 47 2235 14 47 1435 14 35 2235 14 47 1447 6 47 1435 6 47 635 6 35 14 +P1-noprefix|9 22 21 2221 14 21 229 14 21 149 14 9 229 14 21 1421 6 21 149 6 21 69 6 9 14 +P2-noprefix|21 22 35 2235 14 35 2235 14 21 1421 14 21 2235 14 21 1435 6 35 1421 6 35 621 6 21 14 +P3-noprefix|35 22 47 2247 14 47 2235 14 47 1435 14 35 2235 14 47 1447 6 47 1435 6 47 635 6 35 14 +P1-customprefix|9 22 21 2221 14 21 229 14 21 149 14 9 229 14 21 1421 6 21 149 6 21 69 6 9 14 +P2-customprefix|21 22 35 2235 14 35 2235 14 21 1421 14 21 2235 14 21 1435 6 35 1421 6 35 621 6 21 14 +P3-customprefix|35 22 47 2247 14 47 2235 14 47 1435 14 35 2235 14 47 1447 6 47 1435 6 47 635 6 35 14 +R2-visited|36 38 38 35 41 34 42 33 45 32 47 28 50 28 52 32 57 3341 40 45 40 47 42 62 41 61 38 59 39 57 36 57 33 +S1-visited|21 14 +S3-visited| +R1-visited|9 14 21 1435 14 21 14 +N1N6N14-visited|8 30 +P2-visited|21 22 35 2235 14 35 2235 6 35 1421 6 35 6 +P1-visited|9 22 21 2221 14 21 229 14 9 2221 6 21 149 6 21 69 6 9 14 +F3F4-visited| +E7E8-visited|35 22 47 22 +P3-visited-idprefix|47 14 47 2235 14 47 1447 6 47 1435 6 47 6 +R1-gml2|9,14 21,1435,14 21,14 +R2-gml2|36,38 38,35 41,34 42,33 45,32 47,28 50,28 52,32 57,3341,40 45,40 47,42 62,41 61,38 59,39 57,36 57,33 +R3-gml2|9,35 13,35 +R4-gml2|25,30 25,35 +S1-gml2|21,14 +S2-gml2|35,14 +S3-gml2|57,33 +S4-gml2|20,37 +Topology 'city_data' dropped diff -Nru postgis-1.5.3/topology/test/regress/layertrigger.sql postgis-2.0.1/topology/test/regress/layertrigger.sql --- postgis-1.5.3/topology/test/regress/layertrigger.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/layertrigger.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,56 @@ +\set VERBOSITY terse +set client_min_messages to ERROR; + +select 'seq_reset', setval('topology.topology_id_seq', 1, false); +select 't1', 'topology_id:' || topology.CreateTopology('t1'); + +--insert into t1.node(geom, containing_face) values ('POINT( 0 0)', 0); +--create table t1.l1 (id serial); +--select 't1.l1',topology.AddTopoGeometryColumn('t1', 't1', 'l1', 'g', 'POINT'); +--insert INTO t1.l1(g) VALUES (topology.CreateTopoGeom('t1', 1, 1, '{{1,1}}')); +--select 't1.rel',* from t1.relation; + +select 't2', 'topology_id:' || topology.CreateTopology('t2'); + +insert into t2.node(geom, containing_face) values ('POINT( 0 0)', 0); +insert into t2.node(geom, containing_face) values ('POINT( 1 1)', 0); + +create table t2.l1 (id serial); + +select 't2.l1', topology.AddTopoGeometryColumn('t2', 't2', 'l1', 'g', 'POINT'); + +insert into t2.l1(g) VALUES (topology.CreateTopoGeom('t2', 1, 1, '{{1,1}}')); +--insert into t2.l1(g) VALUES (topology.CreateTopoGeom('t2', 1, 1, '{{2,1}}')); + +select 't2.rel',* from t2.relation; + +--always the trigger must reject an update +update topology.layer set topology_id = 123; +select 'after update: topology.layer ',* from topology.layer; + +-- the trigger must reject the delete because some referenced features still exists +BEGIN; + delete from t1.relation; + delete from t2.relation; + select 't2.rel',* from t2.relation; + delete from topology.layer; + select 'after delete n.1: topology.layer count', count(*) from topology.layer; +ROLLBACK; + +-- the trigger must reject because the t2.relation is not empty. +-- This test failed due to #950 +-- (there's no row in t2.relation where topogeo_id matches the topology id) +BEGIN; + delete from t2.l1; + delete from topology.layer where topology_id=2; + select 'after delete n.2: topology.layer count', count(*) from topology.layer; +ROLLBACK; + +-- the trigger must accept the delete +delete from t2.l1; +delete from t2.relation; +delete from topology.layer where topology_id=2; +select 'after delete n.3: topology.layer count', count(*) from topology.layer; + +select topology.DropTopology('t2'); +select topology.DropTopology('t1'); diff -Nru postgis-1.5.3/topology/test/regress/layertrigger_expected postgis-2.0.1/topology/test/regress/layertrigger_expected --- postgis-1.5.3/topology/test/regress/layertrigger_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/layertrigger_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,16 @@ +seq_reset|1 +t1|topology_id:1 +t2|topology_id:2 +t2.l1|1 +t2.rel|1|1|1|1 +ERROR: The topology.layer table cannot be updated +after update: topology.layer |2|1|t2|l1|g|1|0| +BEGIN +after delete n.1: topology.layer count|1 +COMMIT +BEGIN +after delete n.2: topology.layer count|1 +COMMIT +after delete n.3: topology.layer count|0 +Topology 't2' dropped +Topology 't1' dropped diff -Nru postgis-1.5.3/topology/test/regress/legacy_invalid.sql postgis-2.0.1/topology/test/regress/legacy_invalid.sql --- postgis-1.5.3/topology/test/regress/legacy_invalid.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/legacy_invalid.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,6 @@ +set client_min_messages to WARNING; + +\i invalid_topology.sql + +-- clean up +SELECT topology.DropTopology('invalid_topology'); diff -Nru postgis-1.5.3/topology/test/regress/legacy_invalid_expected postgis-2.0.1/topology/test/regress/legacy_invalid_expected --- postgis-1.5.3/topology/test/regress/legacy_invalid_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/legacy_invalid_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,23 @@ +BEGIN +t +coincident nodes|1|23 +edge crosses node|23|1 +edge crosses node|14|27 +edge not simple|28| +invalid edge|33| +edge crosses edge|2|28 +edge crosses edge|2|29 +edge crosses edge|2|32 +edge crosses edge|9|27 +edge crosses edge|10|27 +edge crosses edge|19|27 +edge crosses edge|20|27 +edge crosses edge|30|32 +edge start node geometry mis-match|30|4 +edge end node geometry mis-match|30|3 +face without edges|10| +face has no rings|10| +face within face|11|2 +face overlaps face|2|12 +COMMIT +Topology 'invalid_topology' dropped diff -Nru postgis-1.5.3/topology/test/regress/legacy_predicate.sql postgis-2.0.1/topology/test/regress/legacy_predicate.sql --- postgis-1.5.3/topology/test/regress/legacy_predicate.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/legacy_predicate.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,11 @@ +set client_min_messages to WARNING; + +\i load_topology.sql +\i load_features.sql +\i more_features.sql +\i hierarchy.sql +\i topo_predicates.sql + +-- clean up +SELECT topology.DropTopology('city_data'); +DROP SCHEMA features CASCADE; diff -Nru postgis-1.5.3/topology/test/regress/legacy_predicate_expected postgis-2.0.1/topology/test/regress/legacy_predicate_expected --- postgis-1.5.3/topology/test/regress/legacy_predicate_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/legacy_predicate_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,120 @@ +BEGIN +t +9 +22 +26 +COMMIT +BEGIN +1 +2 +3 +COMMIT +4 +features.big_parcels.the_geom SRID:0 TYPE:MULTIPOLYGON DIMS:2 +5 +6 +features.big_signs.the_geom SRID:0 TYPE:MULTIPOINT DIMS:2 +BEGIN +POINT/POINT INTERSECTS +S1|N1N6N14 +S3|N1N6N14 +S4|N3N4 +S4|N4 +N1N2N3|N1N6N14 +N1N2N3|N3N4 +N3N4|N4 +POINT/LINE INTERSECTS +S1|R1 +S1|E20E19 +S1|R1a +S2|R1 +S2|R1a +S3|R2 +N1N2N3|R4 +N1N6N14|R1 +N1N6N14|R2 +N1N6N14|E20E19 +N1N6N14|R1a +N3N4|R4 +LINE/LINE INTERSECTS +R1|E20E19 +R1|R1a +R3|E25 +E7E8|E20E19 +E20E19|R1a +POINT/POLY INTERSECTS +S1|P1 +S1|P2 +S1|F3 +S1|F6 +S1|F3F4 +S2|P2 +S2|P3 +S2|F3F4 +S4|P4 +N1N2N3|P4 +N1N2N3|P5 +N1N2N3|F1 +N1N6N14|P1 +N1N6N14|P2 +N1N6N14|P5 +N1N6N14|F3 +N1N6N14|F6 +N1N6N14|F3F4 +N1N6N14|F1 +N3N4|P4 +N4|P4 +LINE/POLY INTERSECTS +R1|P1 +R1|P2 +R1|P3 +R1|F3 +R1|F6 +R1|F3F4 +R3|P5 +R3|F1 +R4|P4 +E7E8|P1 +E7E8|P2 +E7E8|P3 +E7E8|F3 +E7E8|F3F4 +E20E19|P1 +E20E19|P2 +E20E19|F3 +E20E19|F6 +E20E19|F3F4 +E25|P5 +E25|F1 +R1a|P1 +R1a|P2 +R1a|P3 +R1a|F3 +R1a|F6 +R1a|F3F4 +POLY/POLY INTERSECTS +P1|P2 +P1|F3 +P1|F6 +P1|F3F4 +P2|P3 +P2|F3 +P2|F6 +P2|F3F4 +P3|F3F4 +P5|F1 +F3|F6 +F3|F3F4 +F6|F3F4 +POINT/POINT EQUALS +S4|N4 +LINE/LINE EQUALS +R1|R1a +R3|E25 +POLYGON/POLYGON EQUALS +P5|F1 +POINT/POINT EQUALS (simple/hierarchical) +POLYGON/POLYGON EQUALS (simple/hierarchical) +P1|F3F6 +COMMIT +Topology 'city_data' dropped diff -Nru postgis-1.5.3/topology/test/regress/legacy_query.sql postgis-2.0.1/topology/test/regress/legacy_query.sql --- postgis-1.5.3/topology/test/regress/legacy_query.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/legacy_query.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,13 @@ +set client_min_messages to WARNING; + +-- Tests TopoGeometry->Geometry cast and id(TopoGeometry) + +\i load_topology.sql +\i load_features.sql +\i more_features.sql +\i hierarchy.sql +\i query_features.sql + +-- clean up +SELECT topology.DropTopology('city_data'); +DROP SCHEMA features CASCADE; diff -Nru postgis-1.5.3/topology/test/regress/legacy_query_expected postgis-2.0.1/topology/test/regress/legacy_query_expected --- postgis-1.5.3/topology/test/regress/legacy_query_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/legacy_query_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,50 @@ +BEGIN +t +9 +22 +26 +COMMIT +BEGIN +1 +2 +3 +COMMIT +4 +features.big_parcels.the_geom SRID:0 TYPE:MULTIPOLYGON DIMS:2 +5 +6 +features.big_signs.the_geom SRID:0 TYPE:MULTIPOINT DIMS:2 +BEGIN +P1|1|MULTIPOLYGON(((21 14,21 6,9 6,9 14,9 22,21 22,21 14))) +P2|2|MULTIPOLYGON(((35 14,35 6,21 6,21 14,21 22,35 22,35 14))) +P3|3|MULTIPOLYGON(((47 14,47 6,35 6,35 14,35 22,47 22,47 14))) +P4|4|MULTIPOLYGON(((25 30,17 30,17 40,31 40,31 30,25 30))) +P5|5|MULTIPOLYGON(((8 30,3 30,3 38,16 38,16 30,8 30),(4 31,7 31,7 34,4 34,4 31))) +F3|6|MULTIPOLYGON(((9 22,21 22,21 14,9 14,9 22))) +F6|7|MULTIPOLYGON(((9 14,21 14,21 6,9 6,9 14))) +F3F4|8|MULTIPOLYGON(((9 22,21 22,35 22,35 14,21 14,9 14,9 22))) +F1|9|MULTIPOLYGON(((8 30,3 30,3 38,16 38,16 30,8 30),(4 31,7 31,7 34,4 34,4 31))) +S1|1|MULTIPOINT(21 14) +S2|2|MULTIPOINT(35 14) +S3|3|MULTIPOINT(57 33) +S4|4|MULTIPOINT(20 37) +N1N2N3|5|MULTIPOINT(8 30,25 30,25 35) +N1N6N14|6|MULTIPOINT(8 30,21 14,57 33) +N3N4|7|MULTIPOINT(20 37,25 35) +N4|8|MULTIPOINT(20 37) +R1|1|MULTILINESTRING((9 14,21 14,35 14)) +R2|2|MULTILINESTRING((36 38,38 35,41 34,42 33,45 32,47 28,50 28,52 32,57 33,57 36,59 39,61 38,62 41,47 42,45 40,41 40)) +R3|3|MULTILINESTRING((9 35,13 35)) +R4|4|MULTILINESTRING((25 30,25 35)) +E7E8|5|MULTILINESTRING((21 22,35 22,47 22)) +E20E19|6|MULTILINESTRING((21 6,21 14,21 22)) +E25|7|MULTILINESTRING((9 35,13 35)) +R1a|8|MULTILINESTRING((9 14,21 14,35 14)) +S1S2|MULTIPOINT(21 14,35 14) +R1R2|MULTILINESTRING((9 14,21 14,35 14),(36 38,38 35,41 34,42 33,45 32,47 28,50 28,52 32,57 33,57 36,59 39,61 38,62 41,47 42,45 40,41 40)) +R4|MULTILINESTRING((25 30,25 35)) +P1P2|MULTIPOLYGON(((21 6,9 6,9 14,9 22,21 22,35 22,35 14,35 6,21 6))) +P3P4|MULTIPOLYGON(((47 14,47 6,35 6,35 14,35 22,47 22,47 14)),((25 30,17 30,17 40,31 40,31 30,25 30))) +F3F6|MULTIPOLYGON(((21 14,21 6,9 6,9 14,9 22,21 22,21 14))) +COMMIT +Topology 'city_data' dropped diff -Nru postgis-1.5.3/topology/test/regress/legacy_validate.sql postgis-2.0.1/topology/test/regress/legacy_validate.sql --- postgis-1.5.3/topology/test/regress/legacy_validate.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/legacy_validate.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,12 @@ +set client_min_messages to WARNING; + +\i load_topology.sql +\i validate_topology.sql + +-- clean up +SELECT topology.DropTopology('city_data'); + +-- Test for #1612 +SELECT CreateTopology('tt') > 0; +SELECT 'Empty topology errors', count(*) FROM ValidateTopology('tt'); +SELECT DropTopology('tt'); diff -Nru postgis-1.5.3/topology/test/regress/legacy_validate_expected postgis-2.0.1/topology/test/regress/legacy_validate_expected --- postgis-1.5.3/topology/test/regress/legacy_validate_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/legacy_validate_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,12 @@ +BEGIN +t +9 +22 +26 +COMMIT +Topology validation errors follow: +End of topology validation errors +Topology 'city_data' dropped +t +Empty topology errors|0 +Topology 'tt' dropped diff -Nru postgis-1.5.3/topology/test/regress/polygonize.sql postgis-2.0.1/topology/test/regress/polygonize.sql --- postgis-1.5.3/topology/test/regress/polygonize.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/polygonize.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,28 @@ +set client_min_messages to ERROR; + +SELECT topology.CreateTopology('tt') > 0; + +SELECT 'e1', topology.addEdge('tt', 'LINESTRING(0 0, 10 0)'); +SELECT 'e2', topology.addEdge('tt', 'LINESTRING(10 0, 10 10)'); +SELECT 'e3', topology.addEdge('tt', 'LINESTRING(0 10, 10 10)'); +SELECT 'e4', topology.addEdge('tt', 'LINESTRING(0 0, 0 10)'); +SELECT 'e5', topology.addEdge('tt', 'LINESTRING(0 0, 0 -10)'); +SELECT 'e6', topology.addEdge('tt', 'LINESTRING(10 10, 20 10)'); +SELECT 'e7', topology.addEdge('tt', 'LINESTRING(20 10, 20 0)'); +SELECT 'e8', topology.addEdge('tt', 'LINESTRING(20 0, 10 0)'); +SELECT 'e9', topology.addEdge('tt', 'LINESTRING(10 0, 0 -10)'); +SELECT 'e10', topology.addEdge('tt', 'LINESTRING(2 2, 5 2, 2 5)'); +SELECT 'e11', topology.addEdge('tt', 'LINESTRING(2 2, 2 5)'); + +-- Call, check linking +SELECT topology.polygonize('tt'); +SELECT face_id, Box2d(mbr) from tt.face ORDER by face_id; +SELECT edge_id, left_face, right_face from tt.edge ORDER by edge_id; + +-- Call again and recheck linking (shouldn't change anything) +SELECT topology.polygonize('tt'); +SELECT face_id, Box2d(mbr) from tt.face ORDER by face_id; +SELECT edge_id, left_face, right_face from tt.edge ORDER by edge_id; + +SELECT topology.DropTopology('tt'); + diff -Nru postgis-1.5.3/topology/test/regress/polygonize_expected postgis-2.0.1/topology/test/regress/polygonize_expected --- postgis-1.5.3/topology/test/regress/polygonize_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/polygonize_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,47 @@ +t +e1|1 +e2|2 +e3|3 +e4|4 +e5|5 +e6|6 +e7|7 +e8|8 +e9|9 +e10|10 +e11|11 +4 faces registered +0| +1|BOX(0 -10,10 0) +2|BOX(0 0,10 10) +3|BOX(10 0,20 10) +4|BOX(2 2,5 5) +1|2|1 +2|2|3 +3|0|2 +4|0|2 +5|1|0 +6|0|3 +7|0|3 +8|0|3 +9|0|1 +10|4|2 +11|2|4 +4 faces registered +0| +1|BOX(0 -10,10 0) +2|BOX(0 0,10 10) +3|BOX(10 0,20 10) +4|BOX(2 2,5 5) +1|2|1 +2|2|3 +3|0|2 +4|0|2 +5|1|0 +6|0|3 +7|0|3 +8|0|3 +9|0|1 +10|4|2 +11|2|4 +Topology 'tt' dropped diff -Nru postgis-1.5.3/topology/test/regress/sqlmm.sql postgis-2.0.1/topology/test/regress/sqlmm.sql --- postgis-1.5.3/topology/test/regress/sqlmm.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/sqlmm.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,142 @@ +set client_min_messages to WARNING; + +-- +-- ST_InitTopoGeo +-- + +SELECT regexp_replace(ST_InitTopoGeo('sqlmm_topology'), 'id:[0-9]*', 'id:x'); + +------------------------------------------------------------- +-- ST_AddIsoNode (1) +------------------------------------------------------------- + +SELECT '-- ST_AddIsoNode ------------------------'; + +-- null input +SELECT topology.ST_AddIsoNode('sqlmm_topology', NULL, NULL); +SELECT topology.ST_AddIsoNode(NULL, NULL, 'POINT(0 0)'); +SELECT topology.ST_AddIsoNode(NULL, 1, NULL); + +-- good nodes on the 'world' face +SELECT topology.ST_AddIsoNode('sqlmm_topology', NULL, 'POINT(0 0)'); +SELECT topology.ST_AddIsoNode('sqlmm_topology', NULL, 'POINT(10 0)'); +SELECT topology.ST_AddIsoNode('sqlmm_topology', NULL, 'POINT(5 0)'); +SELECT topology.ST_AddIsoNode('sqlmm_topology', NULL, 'POINT(5 10)'); +SELECT topology.ST_AddIsoNode('sqlmm_topology', NULL, 'POINT(10 10)'); +SELECT topology.ST_AddIsoNode('sqlmm_topology', NULL, 'POINT(20 10)'); + +-- existing nodes +SELECT topology.ST_AddIsoNode('sqlmm_topology', NULL, 'POINT(0 0)'); +SELECT topology.ST_AddIsoNode('sqlmm_topology', NULL, 'POINT(10 0)'); + +-- other good ones (add another 0 to be detected as coincident) +SELECT topology.ST_AddIsoNode('sqlmm_topology', NULL, 'POINT(10.000000000000001 0)'); +SELECT topology.ST_AddIsoNode('sqlmm_topology', NULL, 'POINT(7 10)'); + +-- non-existent face specification +SELECT topology.ST_AddIsoNode('sqlmm_topology', 1, 'POINT(20 0)'); + +-- using other then point +SELECT topology.ST_AddIsoNode('sqlmm_topology', 1, 'MULTIPOINT(20 0)'); + +-- coincident nodes +SELECT topology.ST_AddIsoNode('sqlmm_topology', NULL, 'POINT(10.000000000000001 0)'); +SELECT topology.ST_AddIsoNode('sqlmm_topology', NULL, 'POINT(0 0)'); +SELECT topology.ST_AddIsoNode('sqlmm_topology', NULL, 'POINT(10 0)'); + +-- ST_AddIsoNode not within face (TODO when ST_GetFaceGeometry is done) + +------------------------------------------ +-- ST_AddIsoEdge (1) +------------------------------------------ + +SELECT '-- ST_AddIsoEdge ------------------------'; + +-- null input +SELECT topology.ST_AddIsoEdge('sqlmm_topology', 1, 2, NULL); +SELECT topology.ST_AddIsoEdge(NULL, 1, 2, 'LINESTRING(0 0, 1 1)'); +SELECT topology.ST_AddIsoEdge('sqlmm_topology', 1, NULL, 'LINESTRING(0 0, 1 1)'); +SELECT topology.ST_AddIsoEdge('sqlmm_topology', NULL, 2, 'LINESTRING(0 0, 1 1)'); + +-- invalid curve +SELECT topology.ST_AddIsoEdge('sqlmm_topology', 1, 2, 'POINT(0 0)'); + +-- non-simple curve +SELECT topology.ST_AddIsoEdge('sqlmm_topology', 1, 2, 'LINESTRING(0 0, 10 0, 5 5, 5 -5)'); + +-- non-existing nodes +SELECT topology.ST_AddIsoEdge('sqlmm_topology', 10000, 2, 'LINESTRING(0 0, 1 1)'); + +-- Curve endpoints mismatch +SELECT topology.ST_AddIsoEdge('sqlmm_topology', 1, 2, 'LINESTRING(0 0, 1 1)'); +SELECT topology.ST_AddIsoEdge('sqlmm_topology', 1, 2, 'LINESTRING(0 1, 10 0)'); + +-- Node crossing +SELECT topology.ST_AddIsoEdge('sqlmm_topology', 1, 2, 'LINESTRING(0 0, 10 0)'); + +-- Good ones +SELECT topology.ST_AddIsoEdge('sqlmm_topology', 4, 5, 'LINESTRING(5 10, 5 9, 10 10)'); +SELECT topology.ST_AddIsoEdge('sqlmm_topology', 1, 2, 'LINESTRING(0 0, 2 1, 10 5, 10 0)'); + +-- Not isolated edge (shares endpoint with previous) +SELECT topology.ST_AddIsoEdge('sqlmm_topology', 4, 6, 'LINESTRING(5 10, 10 9, 20 10)'); +SELECT topology.ST_AddIsoEdge('sqlmm_topology', 5, 6, 'LINESTRING(10 10, 20 10)'); + +-- Edge intersection (geometry intersects an edge) +SELECT topology.ST_AddIsoEdge('sqlmm_topology', 1, 2, 'LINESTRING(0 0, 2 20, 10 0)'); + +-- on different faces (TODO req. nodes contained in face) + + +------------------------------------------------------------- +-- ST_AddIsoNode (2) +------------------------------------------------------------- + +SELECT '-- ST_AddIsoNode(2) ------------------------'; + +-- ST_AddIsoNode edge-crossing node +SELECT topology.ST_AddIsoNode('sqlmm_topology', NULL, 'POINT(5 9.5)'); + +------------------------------------------------------------- +-- ST_RemoveIsoNode +------------------------------------------------------------- + +SELECT '-- ST_RemoveIsoNode ------------------------'; + +-- Isolated node +SELECT topology.ST_RemoveIsoNode('sqlmm_topology', 1); + +-- Non isolated node (is used by an edge); +SELECT topology.ST_RemoveIsoNode('sqlmm_topology', 4); + +------------------------------------------------------------- +-- ST_MoveIsoNode +------------------------------------------------------------- + +SELECT '-- ST_MoveIsoNode ------------------------'; + +-- Isolated node to invalid location (coincident) +SELECT topology.ST_MoveIsoNode('sqlmm_topology', 2, 'POINT(5 10)'); +SELECT topology.ST_MoveIsoNode('sqlmm_topology', 2, 'POINT(4 4)'); + +-- Non isolated node (is used by an edge); +SELECT topology.ST_MoveIsoNode('sqlmm_topology', 4, 'POINT(5 4)'); + +-- Invalid point +SELECT topology.ST_MoveIsoNode('sqlmm_topology', 2, 'MULTIPOINT(5 4)'); + +------------------------------------------------------------- +-- ST_RemoveIsoEdge +------------------------------------------------------------- +SELECT '-- ST_RemoveIsoEdge ---------------------'; + +SELECT topology.ST_RemoveIsoEdge('sqlmm_topology', 1); + +------------------------------------------------------------- +-- ST_NewEdgesSplit +------------------------------------------------------------- + +SELECT '-- ST_NewEdgesSplit ---------------------'; +SELECT topology.ST_NewEdgesSplit('sqlmm_topology', 2, 'POINT(10 2)'); + +SELECT topology.DropTopology('sqlmm_topology'); diff -Nru postgis-1.5.3/topology/test/regress/sqlmm_expected postgis-2.0.1/topology/test/regress/sqlmm_expected --- postgis-1.5.3/topology/test/regress/sqlmm_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/sqlmm_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,51 @@ +Topology-Geometry 'sqlmm_topology' (id:x) created. +-- ST_AddIsoNode ------------------------ +ERROR: SQL/MM Spatial exception - null argument +ERROR: SQL/MM Spatial exception - null argument +ERROR: SQL/MM Spatial exception - null argument +1 +2 +3 +4 +5 +6 +ERROR: SQL/MM Spatial exception - coincident node +ERROR: SQL/MM Spatial exception - coincident node +7 +8 +ERROR: SQL/MM Spatial exception - not within face +ERROR: SQL/MM Spatial exception - invalid point +ERROR: SQL/MM Spatial exception - coincident node +ERROR: SQL/MM Spatial exception - coincident node +ERROR: SQL/MM Spatial exception - coincident node +-- ST_AddIsoEdge ------------------------ +ERROR: SQL/MM Spatial exception - null argument +ERROR: SQL/MM Spatial exception - null argument +ERROR: SQL/MM Spatial exception - null argument +ERROR: SQL/MM Spatial exception - null argument +ERROR: SQL/MM Spatial exception - invalid curve +ERROR: SQL/MM Spatial exception - curve not simple +ERROR: SQL/MM Spatial exception - non-existent node +ERROR: SQL/MM Spatial exception - end node not geometry end point. +ERROR: SQL/MM Spatial exception - start node not geometry start point. +ERROR: SQL/MM Spatial exception - geometry crosses a node +1 +2 +ERROR: SQL/MM Spatial exception - not isolated node +ERROR: SQL/MM Spatial exception - not isolated node +ERROR: SQL/MM Spatial exception - not isolated node +-- ST_AddIsoNode(2) ------------------------ +ERROR: SQL/MM Spatial exception - edge crosses node. +-- ST_RemoveIsoNode ------------------------ +ERROR: SQL/MM Spatial exception - not isolated node +ERROR: SQL/MM Spatial exception - not isolated node +-- ST_MoveIsoNode ------------------------ +ERROR: SQL/MM Spatial exception - not isolated node +ERROR: SQL/MM Spatial exception - not isolated node +ERROR: SQL/MM Spatial exception - not isolated node +ERROR: SQL/MM Spatial exception - invalid point +-- ST_RemoveIsoEdge --------------------- +Isolated edge 1 removed +-- ST_NewEdgesSplit --------------------- +9 +Topology 'sqlmm_topology' dropped diff -Nru postgis-1.5.3/topology/test/regress/st_addedgemodface.sql postgis-2.0.1/topology/test/regress/st_addedgemodface.sql --- postgis-1.5.3/topology/test/regress/st_addedgemodface.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/st_addedgemodface.sql 2012-06-08 11:43:58.000000000 +0000 @@ -0,0 +1,459 @@ +set client_min_messages to ERROR; + +\i load_topology.sql + +-- Endpoint / node mismatch +SELECT topology.ST_AddEdgeModFace('city_data', 7, 6, + 'LINESTRING(36 38,57 33)'); +SELECT topology.ST_AddEdgeModFace('city_data', 5, 7, + 'LINESTRING(36 38,57 33)'); +-- See http://trac.osgeo.org/postgis/ticket/1857 +SELECT topology.ST_AddEdgeModFace('city_data', 5, 5, + 'LINESTRING(36 38,57 33)'); + +-- Crosses a node +SELECT topology.ST_AddEdgeModFace('city_data', 5, 6, + 'LINESTRING(36 38, 41 40, 57 33)'); + +-- Non-existent node +SELECT topology.ST_AddEdgeModFace('city_data', 5, 60000, + 'LINESTRING(36 38,57 33)'); +SELECT topology.ST_AddEdgeModFace('city_data', 60000, 6, + 'LINESTRING(36 38,57 33)'); + +-- Non-simple curve +SELECT topology.ST_AddEdgeModFace('city_data', 5, 5, + 'LINESTRING(36 38, 40 50, 36 38)'); + +-- Collapsed curve +SELECT topology.ST_AddEdgeModFace('city_data', 5, 5, + 'LINESTRING(36 38, 36 38, 36 38)'); + +-- Empty curve +SELECT topology.ST_AddEdgeModFace('city_data', 5, 5, + 'LINESTRING EMPTY'); + +-- Coincident edge +SELECT topology.ST_AddEdgeModFace('city_data', 18, 19, + 'LINESTRING(35 22,47 22)'); + +-- Crosses an edge +SELECT topology.ST_AddEdgeModFace('city_data', 5, 6, + 'LINESTRING(36 38, 40 50, 57 33)'); + +-- Touches an existing edge +SELECT 'O', topology.ST_AddEdgeModFace('city_data', 5, 6, + 'LINESTRING(36 38,45 32,57 33)'); + +-- Shares a portion of an existing edge +SELECT 'O', topology.ST_AddEdgeModFace('city_data', 5, 6, + 'LINESTRING(36 38,38 35,57 33)'); + +--------------------------------------------------------------------- +-- Define some features +--------------------------------------------------------------------- + +CREATE TABLE city_data.fp(id varchar); +SELECT 'L' || topology.AddTopoGeometryColumn('city_data', + 'city_data', 'fp', 'g', 'POLYGON'); + +-- Feature composed by face 3 and face 4 +INSERT INTO city_data.fp VALUES ('F3,F4', + topology.CreateTopoGeom('city_data', 3, 1, '{{3,3},{4,3}}')); + +CREATE TABLE city_data.fc(id varchar); +SELECT 'L' || topology.AddTopoGeometryColumn('city_data', + 'city_data', 'fc', 'g', 'COLLECTION'); + +-- Feature composed by face 5 and node 4 +INSERT INTO city_data.fc VALUES ('F5,N4', + topology.CreateTopoGeom('city_data', 4, 2, '{{5,3},{4,1}}')); + + +--------------------------------------------------------------------- +-- Now add some edges splitting faces... +--------------------------------------------------------------------- + +-- +-- start node has: +-- outward edge on the left face +-- inward edge on the right face +-- end node has: +-- inward edge on the left face +-- inward edge on the right face +-- +SELECT 1 as id, topology.st_addedgemodface('city_data', 14, 18, + 'LINESTRING(21 14, 35 22)') as edge_id INTO newedge; +SELECT 'T1', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN (19, 7, 17, 10, + ( SELECT edge_id FROM newedge WHERE id = 1 ) ) + ORDER BY edge_id; + +-- +-- start node has: +-- inward edge on the left face +-- outward edge on the right face +-- end node has: +-- inward edge on the left face +-- outward edge on the right face +-- +INSERT INTO newedge SELECT 2, topology.st_addedgemodface('city_data', + 12, 18, 'LINESTRING(47 14, 35 22)'); +SELECT 'T2', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN (17, 8, 15, 11, + ( SELECT edge_id FROM newedge WHERE id = 2 ) ) + ORDER BY edge_id; + +-- +-- start node has: +-- inward edge on the left face +-- inward edge on the right face +-- end node has: +-- outward edge on the left face +-- outward edge on the right face +-- +INSERT INTO newedge SELECT 3, topology.st_addedgemodface('city_data', + 12, 10, 'LINESTRING(47 14, 35 6)'); +SELECT 'T3', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN (11, 16, 14, 18, + ( SELECT edge_id FROM newedge WHERE id = 3 ) ) + ORDER BY edge_id; + +-- +-- start node has: +-- outward edge on the left face +-- outward edge on the right face +-- end node has: +-- outward edge on the left face +-- inward edge on the right face +-- +INSERT INTO newedge SELECT 4, topology.st_addedgemodface('city_data', + 9, 13, 'LINESTRING(21 6, 35 14)'); +SELECT 'T4', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN (20, 10, 18, 13, + ( SELECT edge_id FROM newedge WHERE id = 4 ) ) + ORDER BY edge_id; + +-- +-- Same edge on start and end node, for left face, swapped direction +-- +INSERT INTO newedge SELECT 5, topology.st_addedgemodface('city_data', + 14, 9, 'LINESTRING(21 14, 19 10, 21 6)'); +SELECT 'T5', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN (9, 12, 20, + ( SELECT edge_id FROM newedge WHERE id = 5 ) ) + ORDER BY edge_id; + +-- +-- Same edge on start and end node, for left face, same direction +-- +INSERT INTO newedge SELECT 6, topology.st_addedgemodface('city_data', + 8, 15, 'LINESTRING(9 6, 11 10, 9 14)'); +SELECT 'T6', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN (9, 12, 22, + ( SELECT edge_id FROM newedge WHERE id = 6 ) ) + ORDER BY edge_id; + +-- +-- Same edge on start and end node, for right face, swapped direction +-- +INSERT INTO newedge SELECT 7, topology.st_addedgemodface('city_data', + 17, 16, 'LINESTRING(21 22, 15 20, 9 22)'); +SELECT 'T7', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN (21, 6, 19, + ( SELECT edge_id FROM newedge WHERE id = 7 ) ) + ORDER BY edge_id; + +-- +-- Same edge on start and end node, for right face, same direction +-- +INSERT INTO newedge SELECT 8, topology.st_addedgemodface('city_data', + 15, 14, 'LINESTRING(9 14, 15 16, 21 14)'); +SELECT 'T8', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN (9, 21, 19, + ( SELECT edge_id FROM newedge WHERE id = 8 ) ) + ORDER BY edge_id; + +-- +-- Closed edge, counterclockwise, in universe face, next right +-- +INSERT INTO newedge SELECT 9, topology.st_addedgemodface('city_data', + 9, 9, 'LINESTRING(21 6, 18 0, 24 0, 21 6)'); +SELECT 'T9', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN (12, 13, + ( SELECT edge_id FROM newedge WHERE id = 9 ) ) + ORDER BY edge_id; + +-- +-- Closed edge, clockwise, in universe face, next right +-- +INSERT INTO newedge SELECT 10, topology.st_addedgemodface('city_data', + 10, 10, 'LINESTRING(35 6, 38 0, 32 0, 35 6)'); +SELECT 'T10', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN (13, 14, + ( SELECT edge_id FROM newedge WHERE id = 10 ) ) + ORDER BY edge_id; + +-- +-- Closed edge, clockwise, in universe face, next left +-- +INSERT INTO newedge SELECT 11, topology.st_addedgemodface('city_data', + 15, 15, 'LINESTRING(9 14, 3 11, 3 17, 9 14)'); +SELECT 'T11', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN (21, 22, + ( SELECT edge_id FROM newedge WHERE id = 11 ) ) + ORDER BY edge_id; + +-- +-- Closed edge, clockwise, in universe face, against closed edge +-- +INSERT INTO newedge SELECT 12, topology.st_addedgemodface('city_data', + 1, 1, 'LINESTRING(8 30, 5 27, 11 27, 8 30)'); +SELECT 'T12', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN (1, + ( SELECT edge_id FROM newedge WHERE id = 12 ) ) + ORDER BY edge_id; + +-- +-- Closed edge, counterclockwise, in universe face, against closed edge +-- +INSERT INTO newedge SELECT 13, topology.st_addedgemodface('city_data', + 2, 2, 'LINESTRING(25 30, 28 27, 22 27, 25 30)'); +SELECT 'T13', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN (2, + ( SELECT edge_id FROM newedge WHERE id = 13 ) ) + ORDER BY edge_id; + +-- +-- Dangling edge, ending into closed edge endpoint +-- +INSERT INTO city_data.node(geom, containing_face) + VALUES ('POINT(9 33)', 1); -- N23 +INSERT INTO newedge SELECT 14, topology.st_addedgemodface('city_data', + 23, 1, 'LINESTRING(9 33, 8 30)'); +SELECT 'T14', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN (1, + ( SELECT edge_id FROM newedge WHERE id = 14 ) ) + ORDER BY edge_id; +SELECT 'N' || node_id, containing_face + FROM city_data.node WHERE node_id = 23; + +-- +-- Dangling edge, originating from closed edge endpoint +-- +INSERT INTO city_data.node(geom, containing_face) + VALUES ('POINT(12 28)', 0); -- N24 +INSERT INTO newedge SELECT 15, topology.st_addedgemodface('city_data', + 1, 24, 'LINESTRING(8 30, 12 28)'); +SELECT 'T15', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN (38, 1, + ( SELECT edge_id FROM newedge WHERE id = 15 ) ) + ORDER BY edge_id; +SELECT 'N' || node_id, containing_face + FROM city_data.node WHERE node_id = 24; + +-- +-- Closed edge on isolated node +-- +INSERT INTO newedge SELECT 16, topology.st_addedgemodface('city_data', + 4, 4, 'LINESTRING(20 37, 23 37, 20 34, 20 37)'); +SELECT 'T16', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN (2, 3, + ( SELECT edge_id FROM newedge WHERE id = 16 ) ) + ORDER BY edge_id; +SELECT 'N' || node_id, containing_face FROM city_data.node WHERE node_id = 4; + +-- +-- Isolated edge +-- +INSERT INTO city_data.node(geom, containing_face) + VALUES ('POINT(35 28)', 0); -- N25 +INSERT INTO city_data.node(geom, containing_face) + VALUES ('POINT(39 28)', 0); -- N26 +INSERT INTO newedge SELECT 17, topology.st_addedgemodface('city_data', + 25, 26, 'LINESTRING(35 28, 39 28)'); +SELECT 'T17', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN ( + ( SELECT edge_id FROM newedge WHERE id = 17 ) ) + ORDER BY edge_id; +SELECT 'N' || node_id, containing_face + FROM city_data.node WHERE node_id IN ( 25, 26 ); + +-- +-- New face in universal face, enclosing isolated edge chain +-- +INSERT INTO newedge SELECT 18, topology.st_addedgemodface('city_data', + 25, 26, 'LINESTRING(35 28, 35 45, 63 45, 63 25, 39 25, 39 28)'); +SELECT 'T18', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN ( 4, 5, 43, + ( SELECT edge_id FROM newedge WHERE id = 18 ) ) + ORDER BY edge_id; + +-- +-- New face in universal face, with both endpoints on same existing edge +-- +INSERT INTO newedge SELECT 19, topology.st_addedgemodface('city_data', + 9, 8, 'LINESTRING(21 6, 12 0, 9 6)'); +SELECT 'T19', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN ( 12, 35, 22, + ( SELECT edge_id FROM newedge WHERE id = 19 ) ) + ORDER BY edge_id; + +-- +-- New face in universal face, with both endpoints on same existing edge +-- and endpoints duplicated +-- +INSERT INTO newedge SELECT 20, topology.st_addedgemodface('city_data', + 10, 11, 'LINESTRING(35 6, 35 6, 44 0, 47 6, 47 6)'); +SELECT 'T20', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN ( 36, 14, 16, + ( SELECT edge_id FROM newedge WHERE id = 20 ) ) + ORDER BY edge_id; + +-- +-- Another face in universal face, with both endpoints on same existing edge +-- and both edges' endpoints duplicated +-- +INSERT INTO newedge SELECT 21, topology.st_addedgemodface('city_data', + 10, 11, 'LINESTRING(35 6, 35 6, 44 -4, 47 6, 47 6)'); +SELECT 'T21', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN ( + SELECT edge_id FROM newedge WHERE id IN (20, 21) + UNION VALUES (36),(16) ) + ORDER BY edge_id; + +-- +-- Split a face containing an hole +-- Faces on both sides contain isolated nodes. +-- +SELECT 'T22-', 'N' || topology.st_addisonode('city_data', 23, 'POINT(26 36)'), 23; +SELECT 'T22-', 'N' || topology.st_addisonode('city_data', 23, 'POINT(26 34.5)'), 23; +SELECT 'T22-', 'N' || topology.st_addisonode('city_data', 23, 'POINT(26 33)'), 23; +INSERT INTO newedge SELECT 22, topology.st_addedgemodface('city_data', + 3, 3, 'LINESTRING(25 35, 27 35, 26 34, 25 35)'); +SELECT 'T22', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN ( + SELECT edge_id FROM newedge WHERE id IN (22, 16) + UNION VALUES (2),(3) ) + ORDER BY edge_id; +SELECT 'T22', 'N' || node_id, containing_face FROM + city_data.node WHERE node_id IN ( 27, 28, 29 ) + ORDER BY node_id; + +-- +-- Split a face containing an holes in both sides of the split +-- Faces on both sides contain isolated nodes. +-- +INSERT INTO newedge SELECT 23, topology.st_addedgemodface('city_data', + 2, 3, 'LINESTRING(25 30, 29 32, 29 37, 25 35)'); +SELECT 'T23', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN ( + SELECT edge_id FROM newedge WHERE id IN (13, 23, 22, 16) + UNION VALUES (2),(3) ) + ORDER BY edge_id; +SELECT 'T23', 'N' || node_id, containing_face FROM + city_data.node WHERE node_id IN ( 27, 28, 29 ) + ORDER BY node_id; + +-- +-- Split a face containing an hole, this time with no ring continuity +-- This version goes clockwise +-- All involved faces contain isolated nodes +-- +SELECT 'T24-', 'N' || st_addisonode('city_data', 28, 'POINT(19.5 37.5)'), 28; +SELECT 'T24-', 'N' || st_addisonode('city_data', 28, 'POINT(19 38)'), 28; +SELECT 'T24-', 'N' || st_addisonode('city_data', 2, 'POINT(20.5 35)'), 2; +SELECT 'T24-', 'N' || st_addisonode('city_data', 28, 'POINT(20.5 34)'), 28; +SELECT 'T24-', 'N' || st_addisonode('city_data', 28, 'POINT(20.5 33)'), 28; + +INSERT INTO newedge SELECT 24, topology.st_addedgemodface('city_data', + 30, 30, 'LINESTRING(19.5 37.5, 24.5 37.5, 19.5 32.5, 19.5 37.5)'); +SELECT 'T24', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN ( + SELECT edge_id FROM newedge WHERE id IN (24, 23, 16) + UNION VALUES (2),(3) ) + ORDER BY edge_id; +SELECT 'T24', 'N' || node_id, containing_face FROM + city_data.node WHERE node_id IN ( 27, 30, 31, 32, 33, 34 ) + ORDER BY node_id; + +-- +-- Split a face containing an hole, this time with no ring continuity +-- This version goes counterclockwise +-- All involved faces contain isolated nodes +-- +INSERT INTO newedge SELECT 25, topology.st_addedgemodface('city_data', + 31, 31, 'LINESTRING(19 38, 19 31, 26 38, 19 38)'); +SELECT 'T25', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN ( + SELECT edge_id FROM newedge WHERE id IN (25, 24, 23, 16) + UNION VALUES (2),(3) ) + ORDER BY edge_id; +SELECT 'T25', 'N' || node_id, containing_face FROM + city_data.node WHERE node_id IN ( 27, 31, 32, 33, 34 ) + ORDER BY node_id; + +-- +-- Split a face closing a ring inside a face +-- +INSERT INTO newedge SELECT 26, topology.st_addedgemodface('city_data', + 5, 6, 'LINESTRING(36 38, 57 33)'); +SELECT 'T26', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN ( + SELECT edge_id FROM newedge WHERE id IN (26, 17, 18) + UNION VALUES (4),(5) ) + ORDER BY edge_id; + +--------------------------------------------------------------------- +-- Check new relations and faces status +--------------------------------------------------------------------- + +SELECT id, array_agg(comp) FROM ( +SELECT f.id, r.element_type||':'||r.element_id as comp + FROM city_data.fp f, city_data.relation r + WHERE r.topogeo_id = id(f.g) AND r.layer_id = layer_id(f.g) + ORDER BY f.id, element_type, element_id +) f GROUP BY id; + +SELECT id, array_agg(comp) FROM ( +SELECT f.id, r.element_type||':'||r.element_id as comp + FROM city_data.fc f, city_data.relation r + WHERE r.topogeo_id = id(f.g) AND r.layer_id = layer_id(f.g) + ORDER BY f.id, element_type, element_id +) f GROUP BY id; + +SELECT 'F'||face_id, st_astext(mbr) FROM city_data.face ORDER BY face_id; + +--------------------------------------------------------------------- +-- Cleanups +--------------------------------------------------------------------- + +DROP TABLE newedge; +SELECT topology.DropTopology('city_data'); + diff -Nru postgis-1.5.3/topology/test/regress/st_addedgemodface_expected postgis-2.0.1/topology/test/regress/st_addedgemodface_expected --- postgis-1.5.3/topology/test/regress/st_addedgemodface_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/st_addedgemodface_expected 2012-06-08 11:43:58.000000000 +0000 @@ -0,0 +1,187 @@ +BEGIN +t +9 +22 +26 +COMMIT +ERROR: SQL/MM Spatial exception - start node not geometry start point. +ERROR: SQL/MM Spatial exception - end node not geometry end point. +ERROR: SQL/MM Spatial exception - end node not geometry end point. +ERROR: SQL/MM Spatial exception - geometry crosses a node +ERROR: SQL/MM Spatial exception - non-existent node +ERROR: SQL/MM Spatial exception - non-existent node +ERROR: SQL/MM Spatial exception - curve not simple +ERROR: Invalid edge (no two distinct vertices exist) +ERROR: Invalid edge (no two distinct vertices exist) +ERROR: SQL/MM Spatial exception - coincident edge 8 +ERROR: SQL/MM Spatial exception - geometry crosses edge 5 +ERROR: SQL/MM Spatial exception - geometry crosses edge 4 +ERROR: Spatial exception - geometry intersects edge 4 +L1 +L2 +T1|E7|8|-19|0|10 +T1|E10|-20|17|7|4 +T1|E17|-27|11|4|5 +T1|E19|-6|27|3|10 +T1|E27|-7|-10|10|4 +T2|E8|-15|-28|0|5 +T2|E11|28|-18|11|8 +T2|E15|-8|-16|5|0 +T2|E17|-27|11|4|11 +T2|E28|-17|15|11|5 +T3|E11|28|-18|11|8 +T3|E14|16|-13|12|0 +T3|E16|29|-14|12|0 +T3|E18|10|-29|7|8 +T3|E29|14|-11|12|8 +T4|E10|-20|17|13|4 +T4|E13|18|-12|7|0 +T4|E18|-30|-29|7|8 +T4|E20|-9|30|6|13 +T4|E30|10|13|13|7 +T5|E9|19|-22|3|6 +T5|E12|-31|22|6|0 +T5|E20|31|30|14|13 +T5|E31|20|-9|14|6 +T6|E9|19|-32|3|6 +T6|E12|-31|22|6|0 +T6|E22|21|32|0|15 +T6|E32|-22|12|15|6 +T7|E6|7|-33|0|3 +T7|E19|33|27|16|10 +T7|E21|6|9|0|16 +T7|E33|-21|-6|16|3 +T8|E9|-34|-32|16|6 +T8|E19|33|27|17|10 +T8|E21|6|34|0|17 +T8|E34|19|9|17|16 +T9|E12|-31|22|6|0 +T9|E13|18|-35|7|0 +T9|E35|35|-12|18|0 +T10|E13|18|-35|7|0 +T10|E14|16|36|12|0 +T10|E36|-13|-36|0|19 +T11|E21|6|34|0|17 +T11|E22|37|32|0|15 +T11|E37|21|-37|0|20 +T12|E1|1|-38|1|0 +T12|E38|38|-1|21|0 +T13|E2|3|39|2|0 +T13|E39|-2|-39|0|22 +T14|E1|-40|-38|1|0 +T14|E40|1|40|1|1 +N23| +T15|E1|-40|41|1|0 +T15|E38|38|-1|21|0 +T15|E41|-41|-38|0|0 +N24| +T16|E2|3|39|23|0 +T16|E3|-3|2|23|23 +T16|E42|42|-42|23|2 +N4| +T17|E43|-43|43|0|0 +N25| +N26| +T18|E4|-5|4|24|24 +T18|E5|-4|5|24|24 +T18|E43|-44|44|24|0 +T18|E44|-43|43|0|24 +T19|E12|-31|-45|6|25 +T19|E22|37|32|0|15 +T19|E35|35|45|18|0 +T19|E45|22|-12|0|25 +T20|E14|16|46|12|26 +T20|E16|29|-46|12|0 +T20|E36|-13|-36|0|19 +T20|E46|-14|36|26|0 +T21|E16|29|-47|12|0 +T21|E36|-13|-36|0|19 +T21|E46|-14|47|26|27 +T21|E47|-46|36|27|0 +T22-|N27|23 +T22-|N28|23 +T22-|N29|23 +T22|E2|3|39|28|0 +T22|E3|48|2|28|28 +T22|E42|42|-42|28|2 +T22|E48|-3|-48|28|23 +T22|N27|28 +T22|N28|23 +T22|N29|28 +T23|E2|3|39|28|0 +T23|E3|-49|49|28|29 +T23|E39|-2|-39|0|22 +T23|E42|42|-42|28|2 +T23|E48|-3|-48|29|23 +T23|E49|48|2|29|28 +T23|N27|28 +T23|N28|23 +T23|N29|29 +T24-|N30|28 +T24-|N31|28 +T24-|N32|2 +T24-|N33|28 +T24-|N34|28 +T24|E2|3|39|30|0 +T24|E3|-49|49|30|29 +T24|E42|42|-42|28|2 +T24|E49|48|2|29|30 +T24|E50|50|-50|30|28 +T24|N27|30 +T24|N30| +T24|N31|30 +T24|N32|2 +T24|N33|28 +T24|N34|30 +T25|E2|3|39|30|0 +T25|E3|-49|49|30|29 +T25|E42|42|-42|28|2 +T25|E49|48|2|29|30 +T25|E50|50|-50|31|28 +T25|E51|51|-51|31|30 +T25|N27|30 +T25|N31| +T25|N32|2 +T25|N33|28 +T25|N34|31 +T26|E4|-52|52|24|32 +T26|E5|-4|5|32|32 +T26|E43|-44|44|32|0 +T26|E44|-43|43|0|32 +T26|E52|-5|4|32|24 +F3,F4|{3:3,3:4,3:10,3:16,3:17} +F5,N4|{1:4,3:5,3:11} +F0| +F1|POLYGON((3 30,3 38,16 38,16 30,3 30)) +F2|POLYGON((20 34,20 37,23 37,23 34,20 34)) +F3|POLYGON((9 20,9 22,21 22,21 20,9 20)) +F4|POLYGON((21 14,21 22,35 22,35 14,21 14)) +F5|POLYGON((35 14,35 22,47 22,47 14,35 14)) +F6|POLYGON((9 6,9 14,21 14,21 6,9 6)) +F7|POLYGON((21 6,21 14,35 14,35 6,21 6)) +F8|POLYGON((35 6,35 14,47 14,47 6,35 6)) +F9|POLYGON((4 31,4 34,7 34,7 31,4 31)) +F10|POLYGON((21 14,21 22,35 22,35 14,21 14)) +F11|POLYGON((35 14,35 22,47 22,47 14,35 14)) +F12|POLYGON((35 6,35 14,47 14,47 6,35 6)) +F13|POLYGON((21 6,21 14,35 14,35 6,21 6)) +F14|POLYGON((19 6,19 14,21 14,21 6,19 6)) +F15|POLYGON((9 6,9 14,11 14,11 6,9 6)) +F16|POLYGON((9 14,9 16,21 16,21 14,9 14)) +F17|POLYGON((9 14,9 22,21 22,21 14,9 14)) +F18|POLYGON((18 0,18 6,24 6,24 0,18 0)) +F19|POLYGON((32 0,32 6,38 6,38 0,32 0)) +F20|POLYGON((3 11,3 17,9 17,9 11,3 11)) +F21|POLYGON((5 27,5 30,11 30,11 27,5 27)) +F22|POLYGON((22 27,22 30,28 30,28 27,22 27)) +F23|POLYGON((25 34,25 35,27 35,27 34,25 34)) +F24|POLYGON((36 28,36 38,57 38,57 28,36 28)) +F25|POLYGON((9 0,9 6,21 6,21 0,9 0)) +F26|POLYGON((35 0,35 6,47 6,47 0,35 0)) +F27|POLYGON((35 -4,35 6,47 6,47 -4,35 -4)) +F28|POLYGON((19.5 32.5,19.5 37.5,24.5 37.5,24.5 32.5,19.5 32.5)) +F29|POLYGON((25 30,25 37,29 37,29 30,25 30)) +F30|POLYGON((17 30,17 40,31 40,31 30,17 30)) +F31|POLYGON((19 31,19 38,26 38,26 31,19 31)) +F32|POLYGON((35 25,35 45,63 45,63 25,35 25)) +Topology 'city_data' dropped diff -Nru postgis-1.5.3/topology/test/regress/st_addedgenewfaces.sql postgis-2.0.1/topology/test/regress/st_addedgenewfaces.sql --- postgis-1.5.3/topology/test/regress/st_addedgenewfaces.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/st_addedgenewfaces.sql 2012-06-08 11:43:58.000000000 +0000 @@ -0,0 +1,458 @@ +set client_min_messages to ERROR; + +\i load_topology.sql + +-- Endpoint / node mismatch +SELECT topology.ST_AddEdgeNewFaces('city_data', 7, 6, + 'LINESTRING(36 38,57 33)'); +SELECT topology.ST_AddEdgeNewFaces('city_data', 5, 7, + 'LINESTRING(36 38,57 33)'); +-- See http://trac.osgeo.org/postgis/ticket/1857 +SELECT topology.ST_AddEdgeModFace('city_data', 5, 5, + 'LINESTRING(36 38,57 33)'); + +-- Crosses a node +SELECT topology.ST_AddEdgeNewFaces('city_data', 5, 6, + 'LINESTRING(36 38, 41 40, 57 33)'); + +-- Non-existent node +SELECT topology.ST_AddEdgeNewFaces('city_data', 5, 60000, + 'LINESTRING(36 38,57 33)'); +SELECT topology.ST_AddEdgeNewFaces('city_data', 60000, 6, + 'LINESTRING(36 38,57 33)'); + +-- Non-simple curve +SELECT topology.ST_AddEdgeNewFaces('city_data', 5, 5, + 'LINESTRING(36 38, 40 50, 36 38)'); + +-- Collapsed curve +SELECT topology.ST_AddEdgeNewFaces('city_data', 5, 5, + 'LINESTRING(36 38, 36 38, 36 38)'); + +-- Empty curve +SELECT topology.ST_AddEdgeNewFaces('city_data', 5, 5, + 'LINESTRING EMPTY'); + +-- Coincident edge +SELECT topology.ST_AddEdgeNewFaces('city_data', 18, 19, + 'LINESTRING(35 22,47 22)'); + +-- Crosses an edge +SELECT topology.ST_AddEdgeNewFaces('city_data', 5, 6, + 'LINESTRING(36 38, 40 50, 57 33)'); + +-- Touches an existing edge +SELECT 'O', topology.ST_AddEdgeNewFaces('city_data', 5, 6, + 'LINESTRING(36 38,45 32,57 33)'); + +-- Shares a portion of an existing edge +SELECT 'O', topology.ST_AddEdgeNewFaces('city_data', 5, 6, + 'LINESTRING(36 38,38 35,57 33)'); + +--------------------------------------------------------------------- +-- Define some features +--------------------------------------------------------------------- + +CREATE TABLE city_data.fp(id varchar); +SELECT 'L' || topology.AddTopoGeometryColumn('city_data', + 'city_data', 'fp', 'g', 'POLYGON'); + +-- Feature composed by face 3 and face 4 +INSERT INTO city_data.fp VALUES ('F3,F4', + topology.CreateTopoGeom('city_data', 3, 1, '{{3,3},{4,3}}')); + +CREATE TABLE city_data.fc(id varchar); +SELECT 'L' || topology.AddTopoGeometryColumn('city_data', + 'city_data', 'fc', 'g', 'COLLECTION'); + +-- Feature composed by face 5 and node 4 +INSERT INTO city_data.fc VALUES ('F5,N4', + topology.CreateTopoGeom('city_data', 4, 2, '{{5,3},{4,1}}')); + + +--------------------------------------------------------------------- +-- Now add some edges splitting faces... +--------------------------------------------------------------------- + +-- +-- start node has: +-- outward edge on the left face +-- inward edge on the right face +-- end node has: +-- inward edge on the left face +-- inward edge on the right face +-- +SELECT 1 as id, topology.st_addedgenewfaces('city_data', 14, 18, + 'LINESTRING(21 14, 35 22)') as edge_id INTO newedge; +SELECT 'T1', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN (19, 7, 17, 10, + ( SELECT edge_id FROM newedge WHERE id = 1 ) ) + ORDER BY edge_id; + +-- +-- start node has: +-- inward edge on the left face +-- outward edge on the right face +-- end node has: +-- inward edge on the left face +-- outward edge on the right face +-- +INSERT INTO newedge SELECT 2, topology.st_addedgenewfaces('city_data', + 12, 18, 'LINESTRING(47 14, 35 22)'); +SELECT 'T2', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN (17, 8, 15, 11, + ( SELECT edge_id FROM newedge WHERE id = 2 ) ) + ORDER BY edge_id; + +-- +-- start node has: +-- inward edge on the left face +-- inward edge on the right face +-- end node has: +-- outward edge on the left face +-- outward edge on the right face +-- +INSERT INTO newedge SELECT 3, topology.st_addedgenewfaces('city_data', + 12, 10, 'LINESTRING(47 14, 35 6)'); +SELECT 'T3', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN (11, 16, 14, 18, + ( SELECT edge_id FROM newedge WHERE id = 3 ) ) + ORDER BY edge_id; + +-- +-- start node has: +-- outward edge on the left face +-- outward edge on the right face +-- end node has: +-- outward edge on the left face +-- inward edge on the right face +-- +INSERT INTO newedge SELECT 4, topology.st_addedgenewfaces('city_data', + 9, 13, 'LINESTRING(21 6, 35 14)'); +SELECT 'T4', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN (20, 10, 18, 13, + ( SELECT edge_id FROM newedge WHERE id = 4 ) ) + ORDER BY edge_id; + +-- +-- Same edge on start and end node, for left face, swapped direction +-- +INSERT INTO newedge SELECT 5, topology.st_addedgenewfaces('city_data', + 14, 9, 'LINESTRING(21 14, 19 10, 21 6)'); +SELECT 'T5', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN (9, 12, 20, + ( SELECT edge_id FROM newedge WHERE id = 5 ) ) + ORDER BY edge_id; + +-- +-- Same edge on start and end node, for left face, same direction +-- +INSERT INTO newedge SELECT 6, topology.st_addedgenewfaces('city_data', + 8, 15, 'LINESTRING(9 6, 11 10, 9 14)'); +SELECT 'T6', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN (9, 12, 22, + ( SELECT edge_id FROM newedge WHERE id = 6 ) ) + ORDER BY edge_id; + +-- +-- Same edge on start and end node, for right face, swapped direction +-- +INSERT INTO newedge SELECT 7, topology.st_addedgenewfaces('city_data', + 17, 16, 'LINESTRING(21 22, 15 20, 9 22)'); +SELECT 'T7', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN (21, 6, 19, + ( SELECT edge_id FROM newedge WHERE id = 7 ) ) + ORDER BY edge_id; + +-- +-- Same edge on start and end node, for right face, same direction +-- +INSERT INTO newedge SELECT 8, topology.st_addedgenewfaces('city_data', + 15, 14, 'LINESTRING(9 14, 15 16, 21 14)'); +SELECT 'T8', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN (9, 21, 19, + ( SELECT edge_id FROM newedge WHERE id = 8 ) ) + ORDER BY edge_id; + +-- +-- Closed edge, counterclockwise, in universe face, next right +-- +INSERT INTO newedge SELECT 9, topology.st_addedgenewfaces('city_data', + 9, 9, 'LINESTRING(21 6, 18 0, 24 0, 21 6)'); +SELECT 'T9', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN (12, 13, + ( SELECT edge_id FROM newedge WHERE id = 9 ) ) + ORDER BY edge_id; + +-- +-- Closed edge, clockwise, in universe face, next right +-- +INSERT INTO newedge SELECT 10, topology.st_addedgenewfaces('city_data', + 10, 10, 'LINESTRING(35 6, 38 0, 32 0, 35 6)'); +SELECT 'T10', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN (13, 14, + ( SELECT edge_id FROM newedge WHERE id = 10 ) ) + ORDER BY edge_id; + +-- +-- Closed edge, clockwise, in universe face, next left +-- +INSERT INTO newedge SELECT 11, topology.st_addedgenewfaces('city_data', + 15, 15, 'LINESTRING(9 14, 3 11, 3 17, 9 14)'); +SELECT 'T11', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN (21, 22, + ( SELECT edge_id FROM newedge WHERE id = 11 ) ) + ORDER BY edge_id; + +-- +-- Closed edge, clockwise, in universe face, against closed edge +-- +INSERT INTO newedge SELECT 12, topology.st_addedgenewfaces('city_data', + 1, 1, 'LINESTRING(8 30, 5 27, 11 27, 8 30)'); +SELECT 'T12', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN (1, + ( SELECT edge_id FROM newedge WHERE id = 12 ) ) + ORDER BY edge_id; + +-- +-- Closed edge, counterclockwise, in universe face, against closed edge +-- +INSERT INTO newedge SELECT 13, topology.st_addedgenewfaces('city_data', + 2, 2, 'LINESTRING(25 30, 28 27, 22 27, 25 30)'); +SELECT 'T13', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN (2, + ( SELECT edge_id FROM newedge WHERE id = 13 ) ) + ORDER BY edge_id; + +-- +-- Dangling edge, ending into closed edge endpoint +-- +INSERT INTO city_data.node(geom, containing_face) + VALUES ('POINT(9 33)', 1); -- N23 +INSERT INTO newedge SELECT 14, topology.st_addedgenewfaces('city_data', + 23, 1, 'LINESTRING(9 33, 8 30)'); +SELECT 'T14', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN (1, + ( SELECT edge_id FROM newedge WHERE id = 14 ) ) + ORDER BY edge_id; +SELECT 'N' || node_id, containing_face + FROM city_data.node WHERE node_id = 23; + +-- +-- Dangling edge, originating from closed edge endpoint +-- +INSERT INTO city_data.node(geom, containing_face) + VALUES ('POINT(12 28)', 0); -- N24 +INSERT INTO newedge SELECT 15, topology.st_addedgenewfaces('city_data', + 1, 24, 'LINESTRING(8 30, 12 28)'); +SELECT 'T15', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN (38, 1, + ( SELECT edge_id FROM newedge WHERE id = 15 ) ) + ORDER BY edge_id; +SELECT 'N' || node_id, containing_face + FROM city_data.node WHERE node_id = 24; + +-- +-- Closed edge on isolated node +-- +INSERT INTO newedge SELECT 16, topology.st_addedgenewfaces('city_data', + 4, 4, 'LINESTRING(20 37, 23 37, 20 34, 20 37)'); +SELECT 'T16', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN (2, 3, + ( SELECT edge_id FROM newedge WHERE id = 16 ) ) + ORDER BY edge_id; +SELECT 'N' || node_id, containing_face FROM city_data.node WHERE node_id = 4; + +-- +-- Isolated edge +-- +INSERT INTO city_data.node(geom, containing_face) + VALUES ('POINT(35 28)', 0); -- N25 +INSERT INTO city_data.node(geom, containing_face) + VALUES ('POINT(39 28)', 0); -- N26 +INSERT INTO newedge SELECT 17, topology.st_addedgenewfaces('city_data', + 25, 26, 'LINESTRING(35 28, 39 28)'); +SELECT 'T17', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN ( + ( SELECT edge_id FROM newedge WHERE id = 17 ) ) + ORDER BY edge_id; +SELECT 'N' || node_id, containing_face + FROM city_data.node WHERE node_id IN ( 25, 26 ); + +-- +-- New face in universal face, enclosing isolated edge chain +-- +INSERT INTO newedge SELECT 18, topology.st_addedgenewfaces('city_data', + 25, 26, 'LINESTRING(35 28, 35 45, 63 45, 63 25, 39 25, 39 28)'); +SELECT 'T18', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN ( 4, 5, 43, + ( SELECT edge_id FROM newedge WHERE id = 18 ) ) + ORDER BY edge_id; + +-- +-- New face in universal face, with both endpoints on same existing edge +-- +INSERT INTO newedge SELECT 19, topology.st_addedgenewfaces('city_data', + 9, 8, 'LINESTRING(21 6, 12 0, 9 6)'); +SELECT 'T19', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN ( 12, 35, 22, + ( SELECT edge_id FROM newedge WHERE id = 19 ) ) + ORDER BY edge_id; + +-- +-- New face in universal face, with both endpoints on same existing edge +-- and endpoints duplicated +-- +INSERT INTO newedge SELECT 20, topology.st_addedgenewfaces('city_data', + 10, 11, 'LINESTRING(35 6, 35 6, 44 0, 47 6, 47 6)'); +SELECT 'T20', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN ( 36, 14, 16, + ( SELECT edge_id FROM newedge WHERE id = 20 ) ) + ORDER BY edge_id; + +-- +-- Another face in universal face, with both endpoints on same existing edge +-- and both edges' endpoints duplicated +-- +INSERT INTO newedge SELECT 21, topology.st_addedgenewfaces('city_data', + 10, 11, 'LINESTRING(35 6, 35 6, 44 -4, 47 6, 47 6)'); +SELECT 'T21', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN ( + SELECT edge_id FROM newedge WHERE id IN (20, 21) + UNION VALUES (36),(16) ) + ORDER BY edge_id; + +-- +-- Split a face containing an hole +-- Faces on both sides contain isolated nodes. +-- +SELECT 'T22-', 'N' || topology.st_addisonode('city_data', 32, 'POINT(26 36)'), 32; +SELECT 'T22-', 'N' || topology.st_addisonode('city_data', 32, 'POINT(26 34.5)'), 32; +SELECT 'T22-', 'N' || topology.st_addisonode('city_data', 32, 'POINT(26 33)'), 32; +INSERT INTO newedge SELECT 22, topology.st_addedgenewfaces('city_data', + 3, 3, 'LINESTRING(25 35, 27 35, 26 34, 25 35)'); +SELECT 'T22', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN ( + SELECT edge_id FROM newedge WHERE id IN (22, 16) + UNION VALUES (2),(3) ) + ORDER BY edge_id; +SELECT 'T22', 'N' || node_id, containing_face FROM + city_data.node WHERE node_id IN ( 27, 28, 29 ) + ORDER BY node_id; + +-- +-- Split a face containing an holes in both sides of the split +-- Faces on both sides contain isolated nodes. +-- +INSERT INTO newedge SELECT 23, topology.st_addedgenewfaces('city_data', + 2, 3, 'LINESTRING(25 30, 29 32, 29 37, 25 35)'); +SELECT 'T23', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN ( + SELECT edge_id FROM newedge WHERE id IN (13, 23, 22, 16) + UNION VALUES (2),(3) ) + ORDER BY edge_id; +SELECT 'T23', 'N' || node_id, containing_face FROM + city_data.node WHERE node_id IN ( 27, 28, 29 ) + ORDER BY node_id; + +-- +-- Split a face containing an hole, this time with no ring continuity +-- This version goes clockwise +-- All involved faces contain isolated nodes +-- +SELECT 'T24-', 'N' || st_addisonode('city_data', 39, 'POINT(19.5 37.5)'), 39; +SELECT 'T24-', 'N' || st_addisonode('city_data', 39, 'POINT(19 38)'), 39; +SELECT 'T24-', 'N' || st_addisonode('city_data', 31, 'POINT(20.5 35)'), 31; +SELECT 'T24-', 'N' || st_addisonode('city_data', 39, 'POINT(20.5 34)'), 39; +SELECT 'T24-', 'N' || st_addisonode('city_data', 39, 'POINT(20.5 33)'), 39; + +INSERT INTO newedge SELECT 24, topology.st_addedgenewfaces('city_data', + 30, 30, 'LINESTRING(19.5 37.5, 24.5 37.5, 19.5 32.5, 19.5 37.5)'); +SELECT 'T24', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN ( + SELECT edge_id FROM newedge WHERE id IN (24, 23, 16) + UNION VALUES (2),(3) ) + ORDER BY edge_id; +SELECT 'T24', 'N' || node_id, containing_face FROM + city_data.node WHERE node_id IN ( 27, 30, 31, 32, 33, 34 ) + ORDER BY node_id; + +-- +-- Split a face containing an hole, this time with no ring continuity +-- This version goes counterclockwise +-- All involved faces contain isolated nodes +-- +INSERT INTO newedge SELECT 25, topology.st_addedgenewfaces('city_data', + 31, 31, 'LINESTRING(19 38, 19 31, 26 38, 19 38)'); +SELECT 'T25', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN ( + SELECT edge_id FROM newedge WHERE id IN (25, 24, 23, 16) + UNION VALUES (2),(3) ) + ORDER BY edge_id; +SELECT 'T25', 'N' || node_id, containing_face FROM + city_data.node WHERE node_id IN ( 27, 31, 32, 33, 34 ) + ORDER BY node_id; + +-- +-- Split a face closing a ring inside a face +-- +INSERT INTO newedge SELECT 26, topology.st_addedgenewfaces('city_data', + 5, 6, 'LINESTRING(36 38, 57 33)'); +SELECT 'T26', 'E'||edge_id, next_left_edge, next_right_edge, + left_face, right_face FROM + city_data.edge WHERE edge_id IN ( + SELECT edge_id FROM newedge WHERE id IN (26, 17, 18) + UNION VALUES (4),(5) ) + ORDER BY edge_id; + +--------------------------------------------------------------------- +-- Check new relations and faces status +--------------------------------------------------------------------- + +SELECT id, array_agg(comp) FROM ( +SELECT f.id, r.element_type||':'||r.element_id as comp + FROM city_data.fp f, city_data.relation r + WHERE r.topogeo_id = id(f.g) AND r.layer_id = layer_id(f.g) + ORDER BY f.id, element_type, element_id +) f GROUP BY id; + +SELECT id, array_agg(comp) FROM ( +SELECT f.id, r.element_type||':'||r.element_id as comp + FROM city_data.fc f, city_data.relation r + WHERE r.topogeo_id = id(f.g) AND r.layer_id = layer_id(f.g) + ORDER BY f.id, element_type, element_id +) f GROUP BY id; + +SELECT 'F'||face_id, st_astext(mbr) FROM city_data.face ORDER BY face_id; + +--------------------------------------------------------------------- +-- Cleanups +--------------------------------------------------------------------- + +DROP TABLE newedge; +SELECT topology.DropTopology('city_data'); diff -Nru postgis-1.5.3/topology/test/regress/st_addedgenewfaces_expected postgis-2.0.1/topology/test/regress/st_addedgenewfaces_expected --- postgis-1.5.3/topology/test/regress/st_addedgenewfaces_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/st_addedgenewfaces_expected 2012-06-08 11:43:58.000000000 +0000 @@ -0,0 +1,187 @@ +BEGIN +t +9 +22 +26 +COMMIT +ERROR: SQL/MM Spatial exception - start node not geometry start point. +ERROR: SQL/MM Spatial exception - end node not geometry end point. +ERROR: SQL/MM Spatial exception - end node not geometry end point. +ERROR: SQL/MM Spatial exception - geometry crosses a node +ERROR: SQL/MM Spatial exception - non-existent node +ERROR: SQL/MM Spatial exception - non-existent node +ERROR: SQL/MM Spatial exception - curve not simple +ERROR: Invalid edge (no two distinct vertices exist) +ERROR: Invalid edge (no two distinct vertices exist) +ERROR: SQL/MM Spatial exception - coincident edge 8 +ERROR: SQL/MM Spatial exception - geometry crosses edge 5 +ERROR: SQL/MM Spatial exception - geometry crosses edge 4 +ERROR: Spatial exception - geometry intersects edge 4 +L1 +L2 +T1|E7|8|-19|0|11 +T1|E10|-20|17|7|10 +T1|E17|-27|11|10|5 +T1|E19|-6|27|3|11 +T1|E27|-7|-10|11|10 +T2|E8|-15|-28|0|12 +T2|E11|28|-18|13|8 +T2|E15|-8|-16|12|0 +T2|E17|-27|11|10|13 +T2|E28|-17|15|13|12 +T3|E11|28|-18|13|14 +T3|E14|16|-13|15|0 +T3|E16|29|-14|15|0 +T3|E18|10|-29|7|14 +T3|E29|14|-11|15|14 +T4|E10|-20|17|17|10 +T4|E13|18|-12|16|0 +T4|E18|-30|-29|16|14 +T4|E20|-9|30|6|17 +T4|E30|10|13|17|16 +T5|E9|19|-22|3|18 +T5|E12|-31|22|18|0 +T5|E20|31|30|19|17 +T5|E31|20|-9|19|18 +T6|E9|19|-32|3|20 +T6|E12|-31|22|20|0 +T6|E22|21|32|0|21 +T6|E32|-22|12|21|20 +T7|E6|7|-33|0|22 +T7|E19|33|27|23|11 +T7|E21|6|9|0|23 +T7|E33|-21|-6|23|22 +T8|E9|-34|-32|24|20 +T8|E19|33|27|25|11 +T8|E21|6|34|0|25 +T8|E34|19|9|25|24 +T9|E12|-31|22|20|0 +T9|E13|18|-35|16|0 +T9|E35|35|-12|26|0 +T10|E13|18|-35|16|0 +T10|E14|16|36|15|0 +T10|E36|-13|-36|0|27 +T11|E21|6|34|0|25 +T11|E22|37|32|0|21 +T11|E37|21|-37|0|28 +T12|E1|1|-38|1|0 +T12|E38|38|-1|29|0 +T13|E2|3|39|2|0 +T13|E39|-2|-39|0|30 +T14|E1|-40|-38|1|0 +T14|E40|1|40|1|1 +N23| +T15|E1|-40|41|1|0 +T15|E38|38|-1|29|0 +T15|E41|-41|-38|0|0 +N24| +T16|E2|3|39|32|0 +T16|E3|-3|2|32|32 +T16|E42|42|-42|32|31 +N4| +T17|E43|-43|43|0|0 +N25| +N26| +T18|E4|-5|4|33|33 +T18|E5|-4|5|33|33 +T18|E43|-44|44|33|0 +T18|E44|-43|43|0|33 +T19|E12|-31|-45|20|34 +T19|E22|37|32|0|21 +T19|E35|35|45|26|0 +T19|E45|22|-12|0|34 +T20|E14|16|46|15|35 +T20|E16|29|-46|15|0 +T20|E36|-13|-36|0|27 +T20|E46|-14|36|35|0 +T21|E16|29|-47|15|0 +T21|E36|-13|-36|0|27 +T21|E46|-14|47|35|36 +T21|E47|-46|36|36|0 +T22-|N27|32 +T22-|N28|32 +T22-|N29|32 +T22|E2|3|39|38|0 +T22|E3|48|2|38|38 +T22|E42|42|-42|38|31 +T22|E48|-3|-48|38|37 +T22|N27|38 +T22|N28|37 +T22|N29|38 +T23|E2|3|39|39|0 +T23|E3|-49|49|39|40 +T23|E39|-2|-39|0|30 +T23|E42|42|-42|39|31 +T23|E48|-3|-48|40|37 +T23|E49|48|2|40|39 +T23|N27|39 +T23|N28|37 +T23|N29|40 +T24-|N30|39 +T24-|N31|39 +T24-|N32|31 +T24-|N33|39 +T24-|N34|39 +T24|E2|3|39|42|0 +T24|E3|-49|49|42|40 +T24|E42|42|-42|41|31 +T24|E49|48|2|40|42 +T24|E50|50|-50|42|41 +T24|N27|42 +T24|N30| +T24|N31|42 +T24|N32|31 +T24|N33|41 +T24|N34|42 +T25|E2|3|39|43|0 +T25|E3|-49|49|43|40 +T25|E42|42|-42|41|31 +T25|E49|48|2|40|43 +T25|E50|50|-50|44|41 +T25|E51|51|-51|44|43 +T25|N27|43 +T25|N31| +T25|N32|31 +T25|N33|41 +T25|N34|44 +T26|E4|-52|52|45|46 +T26|E5|-4|5|46|46 +T26|E43|-44|44|46|0 +T26|E44|-43|43|0|46 +T26|E52|-5|4|46|45 +F3,F4|{3:10,3:11,3:22,3:24,3:25} +F5,N4|{1:4,3:12,3:13} +F0| +F1|POLYGON((3 30,3 38,16 38,16 30,3 30)) +F9|POLYGON((4 31,4 34,7 34,7 31,4 31)) +F10|POLYGON((21 14,21 22,35 22,35 14,21 14)) +F11|POLYGON((21 14,21 22,35 22,35 14,21 14)) +F12|POLYGON((35 14,35 22,47 22,47 14,35 14)) +F13|POLYGON((35 14,35 22,47 22,47 14,35 14)) +F14|POLYGON((35 6,35 14,47 14,47 6,35 6)) +F15|POLYGON((35 6,35 14,47 14,47 6,35 6)) +F16|POLYGON((21 6,21 14,35 14,35 6,21 6)) +F17|POLYGON((21 6,21 14,35 14,35 6,21 6)) +F19|POLYGON((19 6,19 14,21 14,21 6,19 6)) +F20|POLYGON((9 6,9 14,21 14,21 6,9 6)) +F21|POLYGON((9 6,9 14,11 14,11 6,9 6)) +F22|POLYGON((9 20,9 22,21 22,21 20,9 20)) +F24|POLYGON((9 14,9 16,21 16,21 14,9 14)) +F25|POLYGON((9 14,9 22,21 22,21 14,9 14)) +F26|POLYGON((18 0,18 6,24 6,24 0,18 0)) +F27|POLYGON((32 0,32 6,38 6,38 0,32 0)) +F28|POLYGON((3 11,3 17,9 17,9 11,3 11)) +F29|POLYGON((5 27,5 30,11 30,11 27,5 27)) +F30|POLYGON((22 27,22 30,28 30,28 27,22 27)) +F31|POLYGON((20 34,20 37,23 37,23 34,20 34)) +F34|POLYGON((9 0,9 6,21 6,21 0,9 0)) +F35|POLYGON((35 0,35 6,47 6,47 0,35 0)) +F36|POLYGON((35 -4,35 6,47 6,47 -4,35 -4)) +F37|POLYGON((25 34,25 35,27 35,27 34,25 34)) +F40|POLYGON((25 30,25 37,29 37,29 30,25 30)) +F41|POLYGON((19.5 32.5,19.5 37.5,24.5 37.5,24.5 32.5,19.5 32.5)) +F43|POLYGON((17 30,17 40,31 40,31 30,17 30)) +F44|POLYGON((19 31,19 38,26 38,26 31,19 31)) +F45|POLYGON((36 28,36 38,57 38,57 28,36 28)) +F46|POLYGON((35 25,35 45,63 45,63 25,35 25)) +Topology 'city_data' dropped diff -Nru postgis-1.5.3/topology/test/regress/st_addisoedge.sql postgis-2.0.1/topology/test/regress/st_addisoedge.sql --- postgis-1.5.3/topology/test/regress/st_addisoedge.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/st_addisoedge.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,79 @@ +set client_min_messages to WARNING; + +SELECT topology.CreateTopology('tt') > 0; + +-- Put some points in +INSERT INTO tt.node (containing_face, geom) VALUES + (0, 'POINT(0 0)') RETURNING 'N' || node_id; -- 1 +INSERT INTO tt.node (containing_face, geom) VALUES + (0, 'POINT(10 0)') RETURNING 'N' || node_id; -- 2 +INSERT INTO tt.node (containing_face, geom) VALUES + (0, 'POINT(5 0)') RETURNING 'N' || node_id; -- 3 +INSERT INTO tt.node (containing_face, geom) VALUES + (0, 'POINT(5 10)') RETURNING 'N' || node_id; -- 4 +INSERT INTO tt.node (containing_face, geom) VALUES + (0, 'POINT(10 10)') RETURNING 'N' || node_id; -- 5 +INSERT INTO tt.node (containing_face, geom) VALUES + (0, 'POINT(20 10)') RETURNING 'N' || node_id; -- 6 +INSERT INTO tt.node (containing_face, geom) VALUES + (null, 'POINT(30 10)') RETURNING 'N' || node_id; -- 7 + +-- null input +SELECT topology.ST_AddIsoEdge('tt', 1, 2, NULL); +SELECT topology.ST_AddIsoEdge(NULL, 1, 2, 'LINESTRING(0 0, 1 1)'); +SELECT topology.ST_AddIsoEdge('tt', 1, NULL, 'LINESTRING(0 0, 1 1)'); +SELECT topology.ST_AddIsoEdge('tt', NULL, 2, 'LINESTRING(0 0, 1 1)'); + +-- invalid curve +SELECT topology.ST_AddIsoEdge('tt', 1, 2, 'POINT(0 0)'); + +-- non-simple curve +SELECT topology.ST_AddIsoEdge('tt', 1, 2, 'LINESTRING(0 0, 10 0, 5 5, 5 -5)'); + +-- non-existing nodes +SELECT topology.ST_AddIsoEdge('tt', 10000, 2, 'LINESTRING(0 0, 1 1)'); + +-- Curve endpoints mismatch +SELECT topology.ST_AddIsoEdge('tt', 1, 2, 'LINESTRING(0 0, 1 1)'); +SELECT topology.ST_AddIsoEdge('tt', 1, 2, 'LINESTRING(0 1, 10 0)'); + +-- Node crossing +SELECT topology.ST_AddIsoEdge('tt', 1, 2, 'LINESTRING(0 0, 10 0)'); + +-- Good one +SELECT 'E' || topology.ST_AddIsoEdge('tt', + 4, 5, 'LINESTRING(5 10, 5 9, 10 10)'); + +-- Another good one +SELECT 'E' || topology.ST_AddIsoEdge('tt', + 1, 2, 'LINESTRING(0 0, 2 1, 10 5, 10 0)'); + +-- Check that containing_face became NULL for the nodes which are +-- not isolated anymore (#976) +SELECT 'N' || node_id, containing_face FROM tt.node + ORDER BY node_id; + +-- Not isolated edge (shares endpoint with previous) +SELECT topology.ST_AddIsoEdge('tt', + 4, 6, 'LINESTRING(5 10, 10 9, 20 10)'); +SELECT topology.ST_AddIsoEdge('tt', + 5, 6, 'LINESTRING(10 10, 20 10)'); + +-- Not isolated edge (shares endpoint with self) +SELECT topology.ST_AddIsoEdge('tt', + 3, 3, 'LINESTRING(5 0, 4 -2, 6 -2, 5 0)'); + +-- Not isolated edge (one of the endpoints has [bogusly] containin_face=null) +-- See http://trac.osgeo.org/postgis/ticket/978 +SELECT topology.ST_AddIsoEdge('tt', 6, 7, 'LINESTRING(20 10, 30 10)'); + + +-- Edge intersection (geometry intersects an edge) +SELECT topology.ST_AddIsoEdge('tt', + 3, 6, 'LINESTRING(5 0, 20 10)'); + +-- TODO: check closed edge (not-isolated I guess...) +-- on different faces (TODO req. nodes contained in face) + + +SELECT topology.DropTopology('tt'); diff -Nru postgis-1.5.3/topology/test/regress/st_addisoedge_expected postgis-2.0.1/topology/test/regress/st_addisoedge_expected --- postgis-1.5.3/topology/test/regress/st_addisoedge_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/st_addisoedge_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,33 @@ +t +N1 +N2 +N3 +N4 +N5 +N6 +N7 +ERROR: SQL/MM Spatial exception - null argument +ERROR: SQL/MM Spatial exception - null argument +ERROR: SQL/MM Spatial exception - null argument +ERROR: SQL/MM Spatial exception - null argument +ERROR: SQL/MM Spatial exception - invalid curve +ERROR: SQL/MM Spatial exception - curve not simple +ERROR: SQL/MM Spatial exception - non-existent node +ERROR: SQL/MM Spatial exception - end node not geometry end point. +ERROR: SQL/MM Spatial exception - start node not geometry start point. +ERROR: SQL/MM Spatial exception - geometry crosses a node +E1 +E2 +N1| +N2| +N3|0 +N4| +N5| +N6|0 +N7| +ERROR: SQL/MM Spatial exception - not isolated node +ERROR: SQL/MM Spatial exception - not isolated node +ERROR: Closed edges would not be isolated, try ST_AddEdgeNewFaces +ERROR: SQL/MM Spatial exception - not isolated node +ERROR: SQL/MM Spatial exception - geometry intersects an edge +Topology 'tt' dropped diff -Nru postgis-1.5.3/topology/test/regress/st_addisonode.sql postgis-2.0.1/topology/test/regress/st_addisonode.sql --- postgis-1.5.3/topology/test/regress/st_addisonode.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/st_addisonode.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,53 @@ +set client_min_messages to WARNING; +\set VERBOSITY terse + +-- Usual city_data input + +\i load_topology.sql + + +-- NULL exceptions +select ST_AddIsoNode(NULL, 0, 'POINT(1 4)'); +select ST_AddIsoNode('tt', 0, NULL); +select ST_AddIsoNode('tt', NULL, NULL); +select ST_AddIsoNode(NULL, NULL, NULL); +-- Wrong topology name +select ST_AddIsoNode('wrong_name', 0, 'POINT(1 4)'); +select ST_AddIsoNode('', 0, 'POINT(1 4)'); +-- Negative idface'; +select ST_AddIsoNode('city_data', -1, 'POINT(1 4)'); +-- Wrong idface +select ST_AddIsoNode('city_data', 5, 'POINT(5 33)'); -- in face 9 +select ST_AddIsoNode('city_data', 9, 'POINT(39 18)'); -- in face 5 +-- Coincident nodes'; +select ST_AddIsoNode('city_data', 0, 'POINT(21 22)'); +select ST_AddIsoNode('city_data', NULL, 'POINT(21 22)'); +select ST_AddIsoNode('city_data', 1, 'POINT(21 22)'); + +-- Smart creation ISO Node (without know idface)'; + +-- in face 5 +select 1 as id, ST_AddIsoNode('city_data', NULL, 'POINT(39 18)') as n + into nn; +insert into nn -- in universe +select '2', ST_AddIsoNode('city_data', NULL, 'POINT(50 18)'); +insert into nn -- in face 9 +select '3', ST_AddIsoNode('city_data', NULL, 'POINT(5 33)'); + +-- Explicit face + +insert into nn -- in face 5 +select '4', ST_AddIsoNode('city_data', 5, 'POINT(42 18)'); +insert into nn -- in universe +select '5', ST_AddIsoNode('city_data', 0, 'POINT(50 17)'); +insert into nn -- in face 9 +select '6', ST_AddIsoNode('city_data', 9, 'POINT(5 32)'); + +SELECT 'T'||t.id, n.node_id, n.containing_face FROM nn t, city_data.node n + WHERE t.n = n.node_id ORDER BY t.id; + +-- TODO: test for bug #1503 +--SELECT 'T5', st_addisonode('city_data', 22, 'POINT(28.5 32.5)'); + +DROP TABLE nn; +select topology.DropTopology('city_data'); diff -Nru postgis-1.5.3/topology/test/regress/st_addisonode_expected postgis-2.0.1/topology/test/regress/st_addisonode_expected --- postgis-1.5.3/topology/test/regress/st_addisonode_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/st_addisonode_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,25 @@ +BEGIN +t +9 +22 +26 +COMMIT +ERROR: SQL/MM Spatial exception - null argument +ERROR: SQL/MM Spatial exception - null argument +ERROR: SQL/MM Spatial exception - null argument +ERROR: SQL/MM Spatial exception - null argument +ERROR: SQL/MM Spatial exception - invalid topology name +ERROR: zero-length delimited identifier at or near """" at character 21 +ERROR: SQL/MM Spatial exception - not within face +ERROR: SQL/MM Spatial exception - not within face +ERROR: SQL/MM Spatial exception - not within face +ERROR: SQL/MM Spatial exception - coincident node +ERROR: SQL/MM Spatial exception - coincident node +ERROR: SQL/MM Spatial exception - coincident node +T1|23|5 +T2|24|0 +T3|25|9 +T4|26|5 +T5|27|0 +T6|28|9 +Topology 'city_data' dropped diff -Nru postgis-1.5.3/topology/test/regress/st_changeedgegeom.sql postgis-2.0.1/topology/test/regress/st_changeedgegeom.sql --- postgis-1.5.3/topology/test/regress/st_changeedgegeom.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/st_changeedgegeom.sql 2012-06-12 12:29:42.000000000 +0000 @@ -0,0 +1,134 @@ +set client_min_messages to ERROR; + +\i load_topology.sql + + +-- good one +SELECT 'T1', topology.ST_ChangeEdgeGeom('city_data', 25, + 'LINESTRING(9 35, 11 33, 13 35)'); + +-- start/end points mismatch +SELECT topology.ST_ChangeEdgeGeom('city_data', 25, + 'LINESTRING(10 35, 13 35)'); +SELECT topology.ST_ChangeEdgeGeom('city_data', 25, + 'LINESTRING(9 35, 13 36)'); + +-- Node crossing +SELECT topology.ST_ChangeEdgeGeom('city_data', 3, + 'LINESTRING(25 30, 20 36, 20 38, 25 35)'); + +-- Non-simple edge +SELECT topology.ST_ChangeEdgeGeom('city_data', 1, + 'LINESTRING(8 30, 9 30, 8 30)'); + +-- Dimensionally collapsed edge (#1774) +SELECT topology.ST_ChangeEdgeGeom('city_data', 1, + 'LINESTRING(8 30, 8 30, 8 30)'); + +-- Non-existent edge (#979) +SELECT topology.ST_ChangeEdgeGeom('city_data', 666, + 'LINESTRING(25 30, 20 36, 20 38, 25 35)'); + +-- Test edge crossing +SELECT topology.ST_ChangeEdgeGeom('city_data', 25, + 'LINESTRING(9 35, 11 40, 13 35)'); + +-- Test change in presence of edges sharing node (#1428) +SELECT 'T2', topology.ST_ChangeEdgeGeom('city_data', 5, + 'LINESTRING(41 40, 57 33)'); + +-- Change to edge crossing old self +SELECT 'T3', topology.ST_ChangeEdgeGeom('city_data', 5, + 'LINESTRING(41 40, 49 40, 49 34, 57 33)'); + +-- Change a closed edge (counterclockwise) +SELECT 'T4', topology.ST_ChangeEdgeGeom('city_data', 26, + 'LINESTRING(4 31, 7 31, 4 33, 4 31)'); +-- Check face update +SELECT 'T4F', ST_Equals(f.mbr, ST_Envelope(e.geom)) + FROM city_data.face f, city_data.edge e + WHERE e.edge_id = 26 AND f.face_id = e.left_face; + +-- Collisions on edge motion path is forbidden: +-- get to include a whole isolated edge +SELECT topology.ST_ChangeEdgeGeom('city_data', 26, + 'LINESTRING(4 31, 7 31, 15 34, 12 37.5, 4 34, 4 31)'); + +-- This movement doesn't collide: +SELECT 'T5', topology.ST_ChangeEdgeGeom('city_data', 3, + 'LINESTRING(25 30, 18 35, 18 39, 23 39, 23 36, 20 38, 19 37, 20 35, 25 35)'); + +-- This movement doesn't collide either: +SELECT 'T6', topology.ST_ChangeEdgeGeom('city_data', 3, + 'LINESTRING(25 30, 22 38, 25 35)'); + +-- This movement gets to include an isolated node: +SELECT topology.ST_ChangeEdgeGeom('city_data', 3, + 'LINESTRING(25 30, 18 35, 18 39, 23 39, 23 36, 20 35, 25 35)'); + +-- This movement is legit (counterclockwise closed edge) +SELECT 'T7', topology.ST_ChangeEdgeGeom('city_data', 2, + 'LINESTRING(25 30, 28 39, 16 39, 25 30)'); +-- Check face update +SELECT 'T7F', ST_Equals(f.mbr, ST_Envelope(e.geom)) + FROM city_data.face f, city_data.edge e + WHERE e.edge_id = 2 AND f.face_id = e.left_face; + +-- This movement gets to exclude an isolated node: +SELECT topology.ST_ChangeEdgeGeom('city_data', 2, + 'LINESTRING(25 30, 28 39, 20 39, 25 30)'); + +-- This movement should be fine +SELECT 'T7.1', topology.ST_ChangeEdgeGeom('city_data', 2, +'LINESTRING(25 30, 28 39, 17 39, 25 30)'); +-- Check face update +SELECT 'T7F.1', + ST_Equals(f.mbr, ST_Envelope(ST_GetFaceGeometry('city_data', f.face_id))) + FROM city_data.face f, city_data.edge e + WHERE e.edge_id = 2 AND f.face_id = e.left_face; + +-- Test changing winding direction of closed edge +SELECT topology.ST_ChangeEdgeGeom('city_data', 26, + ST_Reverse('LINESTRING(4 31, 7 31, 4 34, 4 31)')); + +-- Maintain winding of closed edge (counterclockwise) +SELECT 'T8', topology.ST_ChangeEdgeGeom('city_data', 26, + 'LINESTRING(4 31, 4 30.4, 5 30.4, 4 31)'); +-- Check face update +SELECT 'T8F', + ST_Equals(f.mbr, ST_Envelope(ST_GetFaceGeometry('city_data', f.face_id))) + FROM city_data.face f, city_data.edge e + WHERE e.edge_id = 26 AND f.face_id = e.left_face; + +-- test changing winding of non-closed edge ring +SELECT topology.ST_ChangeEdgeGeom('city_data', 13, + 'LINESTRING(21 6, 21 2, 6 2, 6 25, 50 25, 50 2, 35 2, 35 6)'); + +-- test moving closed edge into another face +SELECT 'T9', ST_AddEdgeModFace('city_data', 20, 20, + 'LINESTRING(4 31, 7 31, 4 34, 4 31)'); +SELECT ST_ChangeEdgeGeom('city_data', 26, -- should fail! + 'LINESTRING(4 31,5 31.5,4.6 32,4 31)'); + +-- test moving non-closed edge into another face +SELECT 'T10', ST_AddEdgeModFace('city_data', 17, 18, + 'LINESTRING(21 22, 28 27, 35 22)'); +SELECT ST_ChangeEdgeGeom('city_data', 28, -- should fail! + 'LINESTRING(21 22, 28 18, 35 22)'); + +-- test enlarging a face MBR by moving an edge +SELECT 'T11', ST_ChangeEdgeGeom('city_data', 16, + 'LINESTRING(47 6, 51 10, 47 14)'); +-- Check face update +SELECT 'T11F', + ST_Equals(f.mbr, ST_Envelope(ST_GetFaceGeometry('city_data', f.face_id))) + FROM city_data.face f, city_data.edge e + WHERE e.edge_id = 16 AND f.face_id = e.left_face; + +-- See http://trac.osgeo.org/postgis/ticket/1775 +SELECT 'T12.1', ST_AddIsoNode('city_data', 8, 'POINT(49 10)'); +SELECT 'T12', ST_ChangeEdgeGeom('city_data', 16, 'LINESTRING(47 6, 47 14)'); + +-- TODO: test changing some clockwise closed edges.. + +SELECT topology.DropTopology('city_data'); diff -Nru postgis-1.5.3/topology/test/regress/st_changeedgegeom_expected postgis-2.0.1/topology/test/regress/st_changeedgegeom_expected --- postgis-1.5.3/topology/test/regress/st_changeedgegeom_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/st_changeedgegeom_expected 2012-06-12 12:29:42.000000000 +0000 @@ -0,0 +1,40 @@ +BEGIN +t +9 +22 +26 +COMMIT +T1|Edge 25 changed +ERROR: SQL/MM Spatial exception - start node not geometry start point. +ERROR: SQL/MM Spatial exception - end node not geometry end point. +ERROR: SQL/MM Spatial exception - geometry crosses a node +ERROR: SQL/MM Spatial exception - curve not simple +ERROR: Invalid edge (no two distinct vertices exist) +ERROR: SQL/MM Spatial exception - non-existent edge 666 +ERROR: SQL/MM Spatial exception - geometry crosses edge 1 +T2|Edge 5 changed +T3|Edge 5 changed +T4|Edge 26 changed +T4F|t +ERROR: Edge motion collision at POINT(9 35) +T5|Edge 3 changed +T6|Edge 3 changed +ERROR: Edge motion collision at POINT(20 37) +T7|Edge 2 changed +T7F|t +ERROR: Edge motion collision at POINT(20 37) +T7.1|Edge 2 changed +T7F.1|t +ERROR: Edge twist at node POINT(4 31) +T8|Edge 26 changed +T8F|t +ERROR: Edge motion collision at POINT(9 6) +T9|27 +ERROR: Edge changed disposition around start node 20 +T10|28 +ERROR: Edge changed disposition around start node 17 +T11|Edge 16 changed +T11F|t +T12.1|23 +ERROR: Edge motion collision at POINT(49 10) +Topology 'city_data' dropped diff -Nru postgis-1.5.3/topology/test/regress/st_createtopogeo.sql postgis-2.0.1/topology/test/regress/st_createtopogeo.sql --- postgis-1.5.3/topology/test/regress/st_createtopogeo.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/st_createtopogeo.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,253 @@ +\set VERBOSITY terse +set client_min_messages to ERROR; + +INSERT INTO spatial_ref_sys ( auth_name, auth_srid, srid, proj4text ) VALUES ( 'EPSG', 4326, 4326, '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs' ); + +-- Invalid topologies +select topology.st_createtopogeo('', 'GEOMETRYCOLLECTION(POINT(0 0))'); +select topology.st_createtopogeo('t', 'GEOMETRYCOLLECTION(POINT(0 0))'); +select topology.st_createtopogeo(null, 'GEOMETRYCOLLECTION(POINT(0 0))'); + +CREATE function print_isolated_nodes(lbl text) + RETURNS table(olbl text, msg text) +AS $$ +DECLARE + sql text; +BEGIN + sql := 'SELECT ' || quote_literal(lbl) || '::text, count(node_id) + || '' isolated nodes in face '' || containing_face + FROM t.node WHERE containing_face IS NOT NULL GROUP by containing_face + ORDER BY count(node_id), containing_face'; + RETURN QUERY EXECUTE sql; +END; +$$ LANGUAGE 'plpgsql'; + +CREATE function print_elements_count(lbl text) + RETURNS table(olbl text, nodes text, edges text, faces text) +AS $$ +DECLARE + sql text; +BEGIN + sql := 'select ' || quote_literal(lbl) || '::text, + ( select count(node_id) || '' nodes'' from t.node ) as nodes, + ( select count(edge_id) || '' edges'' from t.edge ) as edges, + ( select count(face_id) || '' faces'' from t.face + where face_id <> 0 ) as faces'; + RETURN QUERY EXECUTE sql; +END; +$$ LANGUAGE 'plpgsql'; + + +-- Invalid geometries +select null from ( select topology.CreateTopology('t', 4326) > 0 ) as ct; +select topology.st_createtopogeo('t', null); -- Invalid geometry +select 'invalid_srid', topology.st_createtopogeo('t', 'POINT(0 0)'); +select null from ( select topology.DropTopology('t') ) as dt; + +-- Single point +select null from ( select topology.CreateTopology('t') > 0 ) as ct; +select 'T1', st_asewkt(g) FROM ( +SELECT g, topology.st_createtopogeo('t', g) FROM ( SELECT +'POINT(0 0)' +::geometry as g ) as i ) as j; +select * from print_elements_count('T1'); +select null from ( select topology.DropTopology('t') ) as dt; + +-- Single line +select null from ( select topology.CreateTopology('t', 4326) > 0 ) as ct; +select 'T2', st_asewkt(g) FROM ( +SELECT g, topology.st_createtopogeo('t', g) FROM ( SELECT +'SRID=4326;LINESTRING(0 0, 8 -40)' +::geometry as g ) as i ) as j; +select * from print_elements_count('T2'); +select null from ( select topology.DropTopology('t') ) as dt; + +-- Single polygon with no holes +select null from ( select topology.CreateTopology('t', 4326) > 0 ) as ct; +select 'T3', st_asewkt(g) FROM ( +SELECT g, topology.st_createtopogeo('t', g) FROM ( SELECT +'SRID=4326;POLYGON((0 0, 8 -40, 70 34, 0 0))' +::geometry as g ) as i ) as j; +select * from print_elements_count('T3'); +select null from ( select topology.DropTopology('t') ) as dt; + +-- Single polygon with an hole +select null from ( select topology.CreateTopology('t', 4326) > 0 ) as ct; +select 'T4', st_asewkt(g) FROM ( +SELECT g, topology.st_createtopogeo('t', g) FROM ( SELECT +'SRID=4326;POLYGON((0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 8 9, 4 2, 5 5))' +::geometry as g ) as i ) as j; +select * from print_elements_count('T4'); +select null from ( select topology.DropTopology('t') ) as dt; + +-- Multi point with duplicated points +select null from ( select topology.CreateTopology('t') > 0 ) as ct; +select 'T5', st_asewkt(g) FROM ( +SELECT g, topology.st_createtopogeo('t', g) FROM ( SELECT +'MULTIPOINT(0 0, 5 5, 0 0, 10 -2, 5 5, 0 0)' +::geometry as g ) as i ) as j; +select * from print_elements_count('T5'); +select null from ( select topology.DropTopology('t') ) as dt; + +-- Multi line with duplicated lines +select null from ( select topology.CreateTopology('t') > 0 ) as ct; +select 'T6', st_asewkt(g) FROM ( +SELECT g, topology.st_createtopogeo('t', g) FROM ( SELECT +'MULTILINESTRING((0 0, 10 0),(10 0, 0 0))' +::geometry as g ) as i ) as j; +select * from print_elements_count('T6'); +select * from print_isolated_nodes('T6'); +select null from ( select topology.DropTopology('t') ) as dt; + +-- Multi line with crossing lines +select null from ( select topology.CreateTopology('t') > 0 ) as ct; +select 'T7', st_asewkt(g) FROM ( +SELECT g, topology.st_createtopogeo('t', g) FROM ( SELECT +'MULTILINESTRING((0 0, 10 0),(5 -5, 6 5))' +::geometry as g ) as i ) as j; +select * from print_elements_count('T7'); +select * from print_isolated_nodes('T7'); +select null from ( select topology.DropTopology('t') ) as dt; + +-- Multi polygon with duplicated polygons +select null from ( select topology.CreateTopology('t') > 0 ) as ct; +select 'T8', st_asewkt(g) FROM ( +SELECT g, topology.st_createtopogeo('t', g) FROM ( SELECT +'MULTIPOLYGON( + ((0 0,10 0,10 10,0 10,0 0)), + ((0 0,0 10,10 10,10 0,0 0)) +)' +::geometry as g ) as i ) as j; +select * from print_elements_count('T8'); +select * from print_isolated_nodes('T8'); +select null from ( select topology.DropTopology('t') ) as dt; + +-- Multi polygon with overlapping polygons +select null from ( select topology.CreateTopology('t') > 0 ) as ct; +select 'T9', st_asewkt(g) FROM ( +SELECT g, topology.st_createtopogeo('t', g) FROM ( SELECT +'MULTIPOLYGON( + ((0 0,10 0,10 10,0 10,0 0)), + ((5 5,5 15,15 15,15 5,5 5)) +)' +::geometry as g ) as i ) as j; +select * from print_elements_count('T9'); +select * from print_isolated_nodes('T9'); +select null from ( select topology.DropTopology('t') ) as dt; + +-- Multi polygon with touching polygons +select null from ( select topology.CreateTopology('t') > 0 ) as ct; +select 'T10', st_asewkt(g) FROM ( +SELECT g, topology.st_createtopogeo('t', g) FROM ( SELECT +'MULTIPOLYGON( + ((0 0,5 10,10 0,0 0)), + ((0 20,5 10,10 20,0 20)) +)' +::geometry as g ) as i ) as j; +select * from print_elements_count('T10'); +select * from print_isolated_nodes('T10'); +select null from ( select topology.DropTopology('t') ) as dt; + +-- Collection of line and point within it +select null from ( select topology.CreateTopology('t') > 0 ) as ct; +select 'T11', st_asewkt(g) FROM ( +SELECT g, topology.st_createtopogeo('t', g) FROM ( SELECT +'GEOMETRYCOLLECTION(LINESTRING(0 0, 10 0),POINT(5 0))' +::geometry as g ) as i ) as j; +select * from print_elements_count('T11'); +select * from print_isolated_nodes('T11'); +select null from ( select topology.DropTopology('t') ) as dt; + +-- Collection of line and points on line's endpoint +select null from ( select topology.CreateTopology('t') > 0 ) as ct; +select 'T12', st_asewkt(g) FROM ( +SELECT g, topology.st_createtopogeo('t', g) FROM ( SELECT +'GEOMETRYCOLLECTION(LINESTRING(0 0, 10 0),POINT(0 0),POINT(10 0))' +::geometry as g ) as i ) as j; +select * from print_elements_count('T12'); +select * from print_isolated_nodes('T12'); +select null from ( select topology.DropTopology('t') ) as dt; + +-- Collection of line, points and polygons with various crossing and +-- overlaps +select null from ( select topology.CreateTopology('t') > 0 ) as ct; +select 'T13', st_asewkt(g) FROM ( +SELECT g, topology.st_createtopogeo('t', g) FROM ( SELECT +'GEOMETRYCOLLECTION( + MULTIPOLYGON( + ((0 0,10 0,10 10,0 10,0 0)), + ((5 5,5 15,15 15,15 5,5 5), (10 10, 12 10, 10 12, 10 10)) + ), + LINESTRING(0 0, 20 0), + MULTIPOINT(0 0,10 0,5 0), + MULTILINESTRING((0 0, 10 0),(10 0, 15 5)), + POINT(5 0), + POINT(10.5 10.5), + POINT(100 500) +)' +::geometry as g ) as i ) as j; +select * from print_elements_count('T13'); +select * from print_isolated_nodes('T13'); +select null from ( select topology.DropTopology('t') ) as dt; + +-- Collection of all geometries which can be derivated by the +-- well-known city_data topology +select null from ( select topology.CreateTopology('t') > 0 ) as ct; +select 'T14', st_asewkt(g) FROM ( +SELECT g, topology.st_createtopogeo('t', g) FROM ( SELECT +'GEOMETRYCOLLECTION(LINESTRING(8 30,16 30,16 38,3 38,3 30,8 30),POINT(4 31),LINESTRING(4 31,7 31,7 34,4 34,4 31),POINT(8 30),POINT(9 6),LINESTRING(9 6,9 14),LINESTRING(9 6,21 6),POLYGON((9 14,21 14,21 6,9 6,9 14)),POINT(9 14),LINESTRING(9 14,9 22),LINESTRING(9 14,21 14),POLYGON((9 22,21 22,21 14,9 14,9 22)),POINT(9 22),LINESTRING(9 22,21 22),POINT(9 35),LINESTRING(9 35,13 35),POINT(13 35),POLYGON((25 30,17 30,17 40,31 40,31 30,25 30)),POINT(20 37),POINT(21 6),LINESTRING(21 6,21 14),LINESTRING(21 6,35 6),POLYGON((21 14,35 14,35 6,21 6,21 14)),POINT(21 14),LINESTRING(21 14,21 22),LINESTRING(35 14,21 14),POLYGON((21 22,35 22,35 14,21 14,21 22)),POINT(21 22),LINESTRING(21 22,35 22),POINT(25 30),LINESTRING(25 30,25 35),POINT(25 35),POINT(35 6),LINESTRING(35 6,35 14),LINESTRING(35 6,47 6),POLYGON((35 14,47 14,47 6,35 6,35 14)),POINT(35 14),LINESTRING(35 14,35 22),LINESTRING(35 14,47 14),POLYGON((35 22,47 22,47 14,35 14,35 22)),POINT(35 22),LINESTRING(35 22,47 22),LINESTRING(36 38,38 35,41 34,42 33,45 32,47 28,50 28,52 32,57 33),POINT(36 38),LINESTRING(41 40,45 40,47 42,62 41,61 38,59 39,57 36,57 33),POINT(41 40),POINT(47 6),LINESTRING(47 6,47 14),POINT(47 14),LINESTRING(47 14,47 22),POINT(47 22),POINT(57 33))' +::geometry as g ) as i ) as j; +select * from print_elements_count('T14'); +select * from print_isolated_nodes('T14'); +select null from ( select topology.DropTopology('t') ) as dt; + +-- See ticket #1261 +select null from ( select topology.CreateTopology('t') > 0 ) as ct; +select 'T15', st_asewkt(g) FROM ( +SELECT g, topology.st_createtopogeo('t', g) FROM ( SELECT +'GEOMETRYCOLLECTION(LINESTRING(-5 -2,0 0), + LINESTRING(0 0,10 10),LINESTRING(0 0,5 2,10 10), + LINESTRING(10 10,12 10)) +'::geometry as g ) as i ) as j; +select * from print_elements_count('T15'); +select * from print_isolated_nodes('T15'); +select null from ( select topology.DropTopology('t') ) as dt; + +-- Three mergeable lines +select null from ( select topology.CreateTopology('t') > 0 ) as ct; +select 'T16', st_asewkt(g) FROM ( +SELECT g, topology.st_createtopogeo('t', g) FROM ( SELECT +'GEOMETRYCOLLECTION(LINESTRING(0 0, 10 0),LINESTRING(0 3, 20 4),LINESTRING(10 0, 20 4))' +::geometry as g ) as i ) as j; +select * from print_elements_count('T16'); +select * from print_isolated_nodes('T16'); +select null from ( select topology.DropTopology('t') ) as dt; + +-- Very close-by nodes created by intersection +-- See ticket #1284 +select null from ( select topology.CreateTopology('t') > 0 ) as ct; +select 'T17', st_asewkt(g) FROM ( +SELECT g, topology.st_createtopogeo('t', g) FROM ( SELECT ' +MULTILINESTRING( +( + 832709.937 816560.25, + 832705.813 816470.25, + 832661.937 816561.875 +), +( + 832705.812 816470.25, + 832709.937 816560.25 +), +( + 832661.938 816561.875, + 832705.813 816470.25 +)) +'::geometry as g ) as i ) as j; +select * from print_elements_count('T17'); +select * from print_isolated_nodes('T17'); +select null from ( select topology.DropTopology('t') ) as dt; + +-- clean up +DELETE FROM spatial_ref_sys where srid = 4326; +DROP FUNCTION print_isolated_nodes(text); +DROP FUNCTION print_elements_count(text); diff -Nru postgis-1.5.3/topology/test/regress/st_createtopogeo_expected postgis-2.0.1/topology/test/regress/st_createtopogeo_expected --- postgis-1.5.3/topology/test/regress/st_createtopogeo_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/st_createtopogeo_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,42 @@ +ERROR: SQL/MM Spatial exception - invalid topology name +ERROR: SQL/MM Spatial exception - invalid topology name +ERROR: SQL/MM Spatial exception - null argument +ERROR: SQL/MM Spatial exception - null argument +ERROR: Geometry SRID (0) does not match topology SRID (4326) +T1|POINT(0 0) +T1|1 nodes|0 edges|0 faces +T2|SRID=4326;LINESTRING(0 0,8 -40) +T2|2 nodes|1 edges|0 faces +T3|SRID=4326;POLYGON((0 0,8 -40,70 34,0 0)) +T3|1 nodes|1 edges|1 faces +T4|SRID=4326;POLYGON((0 0,10 0,10 10,0 10,0 0),(5 5,8 9,4 2,5 5)) +T4|2 nodes|2 edges|2 faces +T5|MULTIPOINT(0 0,5 5,0 0,10 -2,5 5,0 0) +T5|3 nodes|0 edges|0 faces +T6|MULTILINESTRING((0 0,10 0),(10 0,0 0)) +T6|2 nodes|1 edges|0 faces +T7|MULTILINESTRING((0 0,10 0),(5 -5,6 5)) +T7|5 nodes|4 edges|0 faces +T8|MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0)),((0 0,0 10,10 10,10 0,0 0))) +T8|1 nodes|1 edges|1 faces +T9|MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0)),((5 5,5 15,15 15,15 5,5 5))) +T9|2 nodes|4 edges|3 faces +T10|MULTIPOLYGON(((0 0,5 10,10 0,0 0)),((0 20,5 10,10 20,0 20))) +T10|1 nodes|2 edges|2 faces +T11|GEOMETRYCOLLECTION(LINESTRING(0 0,10 0),POINT(5 0)) +T11|3 nodes|2 edges|0 faces +T12|GEOMETRYCOLLECTION(LINESTRING(0 0,10 0),POINT(0 0),POINT(10 0)) +T12|2 nodes|1 edges|0 faces +T13|GEOMETRYCOLLECTION(MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0)),((5 5,5 15,15 15,15 5,5 5),(10 10,12 10,10 12,10 10))),LINESTRING(0 0,20 0),MULTIPOINT(0 0,10 0,5 0),MULTILINESTRING((0 0,10 0),(10 0,15 5)),POINT(5 0),POINT(10.5 10.5),POINT(100 500)) +T13|10 nodes|12 edges|5 faces +T13|1 isolated nodes in face 0 +T13|1 isolated nodes in face 5 +T14|GEOMETRYCOLLECTION(LINESTRING(8 30,16 30,16 38,3 38,3 30,8 30),POINT(4 31),LINESTRING(4 31,7 31,7 34,4 34,4 31),POINT(8 30),POINT(9 6),LINESTRING(9 6,9 14),LINESTRING(9 6,21 6),POLYGON((9 14,21 14,21 6,9 6,9 14)),POINT(9 14),LINESTRING(9 14,9 22),LINESTRING(9 14,21 14),POLYGON((9 22,21 22,21 14,9 14,9 22)),POINT(9 22),LINESTRING(9 22,21 22),POINT(9 35),LINESTRING(9 35,13 35),POINT(13 35),POLYGON((25 30,17 30,17 40,31 40,31 30,25 30)),POINT(20 37),POINT(21 6),LINESTRING(21 6,21 14),LINESTRING(21 6,35 6),POLYGON((21 14,35 14,35 6,21 6,21 14)),POINT(21 14),LINESTRING(21 14,21 22),LINESTRING(35 14,21 14),POLYGON((21 22,35 22,35 14,21 14,21 22)),POINT(21 22),LINESTRING(21 22,35 22),POINT(25 30),LINESTRING(25 30,25 35),POINT(25 35),POINT(35 6),LINESTRING(35 6,35 14),LINESTRING(35 6,47 6),POLYGON((35 14,47 14,47 6,35 6,35 14)),POINT(35 14),LINESTRING(35 14,35 22),LINESTRING(35 14,47 14),POLYGON((35 22,47 22,47 14,35 14,35 22)),POINT(35 22),LINESTRING(35 22,47 22),LINESTRING(36 38,38 35,41 34,42 33,45 32,47 28,50 28,52 32,57 33),POINT(36 38),LINESTRING(41 40,45 40,47 42,62 41,61 38,59 39,57 36,57 33),POINT(41 40),POINT(47 6),LINESTRING(47 6,47 14),POINT(47 14),LINESTRING(47 14,47 22),POINT(47 22),POINT(57 33)) +T14|22 nodes|24 edges|9 faces +T14|1 isolated nodes in face 3 +T15|GEOMETRYCOLLECTION(LINESTRING(-5 -2,0 0),LINESTRING(0 0,10 10),LINESTRING(0 0,5 2,10 10),LINESTRING(10 10,12 10)) +T15|4 nodes|4 edges|1 faces +T16|GEOMETRYCOLLECTION(LINESTRING(0 0,10 0),LINESTRING(0 3,20 4),LINESTRING(10 0,20 4)) +T16|4 nodes|3 edges|0 faces +T17|MULTILINESTRING((832709.937 816560.25,832705.813 816470.25,832661.937 816561.875),(832705.812 816470.25,832709.937 816560.25),(832661.938 816561.875,832705.813 816470.25)) +T17|7 nodes|8 edges|2 faces diff -Nru postgis-1.5.3/topology/test/regress/st_getfaceedges.sql postgis-2.0.1/topology/test/regress/st_getfaceedges.sql --- postgis-1.5.3/topology/test/regress/st_getfaceedges.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/st_getfaceedges.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,32 @@ +set client_min_messages to ERROR; + +SELECT topology.CreateTopology('tt') > 0; + +SELECT topology.ST_GetFaceEdges(null, null); +SELECT topology.ST_GetFaceEdges('tt', null); +SELECT topology.ST_GetFaceEdges(null, 1); +SELECT topology.ST_GetFaceEdges('', 1); +SELECT topology.ST_GetFaceEdges('NonExistent', 1); + +SELECT 'E'||topology.AddEdge('tt', 'LINESTRING(2 2, 2 8)'); -- 1 +SELECT 'E'||topology.AddEdge('tt', 'LINESTRING(2 8, 8 8)'); -- 2 +SELECT 'E'||topology.AddEdge('tt', 'LINESTRING(8 8, 8 2, 2 2)'); -- 3 +SELECT 'E'||topology.AddEdge('tt', 'LINESTRING(0 0, 0 10, 10 10)'); -- 4 +SELECT 'E'||topology.AddEdge('tt', 'LINESTRING(0 0, 10 0)'); -- 5 +SELECT 'E'||topology.AddEdge('tt', 'LINESTRING(10 10, 10 5)'); -- 6 +SELECT 'E'||topology.AddEdge('tt', 'LINESTRING(10 0, 10 5)'); -- 7 + +SELECT 'F' || + topology.AddFace('tt', + 'POLYGON((0 0, 10 0, 10 10, 0 10, 0 0),(2 2, 2 8, 8 8, 8 2, 2 2))'); +SELECT 'F' || + topology.AddFace('tt', + 'POLYGON((2 2, 2 8, 8 8, 8 2, 2 2))'); + +SELECT 'F1', (topology.ST_GetFaceEdges('tt', 1)).*; +SELECT 'F2', (topology.ST_GetFaceEdges('tt', 2)).*; + +SELECT 'F0', (topology.ST_GetFaceEdges('tt', 0)).*; + + +SELECT topology.DropTopology('tt'); diff -Nru postgis-1.5.3/topology/test/regress/st_getfaceedges_expected postgis-2.0.1/topology/test/regress/st_getfaceedges_expected --- postgis-1.5.3/topology/test/regress/st_getfaceedges_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/st_getfaceedges_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,30 @@ +t +ERROR: SQL/MM Spatial exception - null argument +ERROR: SQL/MM Spatial exception - null argument +ERROR: SQL/MM Spatial exception - null argument +ERROR: SQL/MM Spatial exception - invalid topology name +ERROR: SQL/MM Spatial exception - invalid topology name +E1 +E2 +E3 +E4 +E5 +E6 +E7 +F1 +F2 +F1|1|-4 +F1|2|5 +F1|3|7 +F1|4|-6 +F1|5|1 +F1|6|2 +F1|7|3 +F2|1|-1 +F2|2|-3 +F2|3|-2 +F0|1|4 +F0|2|6 +F0|3|-7 +F0|4|-5 +Topology 'tt' dropped diff -Nru postgis-1.5.3/topology/test/regress/st_getfacegeometry.sql postgis-2.0.1/topology/test/regress/st_getfacegeometry.sql --- postgis-1.5.3/topology/test/regress/st_getfacegeometry.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/st_getfacegeometry.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,47 @@ +set client_min_messages to WARNING; + +SELECT topology.CreateTopology('tt') > 0; + +COPY tt.face(face_id, mbr) FROM STDIN; +1 POLYGON((0 0,0 10,10 10,10 0,0 0)) +2 POLYGON((2 2,2 8,8 8,8 2,2 2)) +3 POLYGON((12 2,12 8,18 8,18 2,12 2)) +\. + +COPY tt.node(node_id, geom) FROM STDIN; +1 POINT(2 2) +2 POINT(0 0) +3 POINT(12 2) +\. + +COPY tt.edge_data( + edge_id, start_node, end_node, + abs_next_left_edge, abs_next_right_edge, + next_left_edge, next_right_edge, + left_face, right_face, geom) FROM STDIN; +1 1 1 1 1 1 -1 1 2 LINESTRING(2 2, 2 8, 8 8, 8 2, 2 2) +2 2 2 2 2 2 -2 0 1 LINESTRING(0 0, 0 10, 10 10, 10 0, 0 0) +3 3 3 3 3 3 -3 0 3 LINESTRING(12 2, 12 8, 18 8, 18 2, 12 2) +\. + +-- F1 should have an hole ! +-- See http://trac.osgeo.org/postgis/ticket/726 +SELECT 'f1 (with hole)', ST_asText(topology.st_getfacegeometry('tt', 1)); +SELECT 'f2 (fill hole)', ST_asText(topology.st_getfacegeometry('tt', 2)); + +-- Universal face has no geometry +-- See http://trac.osgeo.org/postgis/ticket/973 +SELECT topology.st_getfacegeometry('tt', 0); + +-- Null arguments +SELECT topology.st_getfacegeometry(null, 1); +SELECT topology.st_getfacegeometry('tt', null); + +-- Invalid topology names +SELECT topology.st_getfacegeometry('NonExistent', 1); +SELECT topology.st_getfacegeometry('', 1); + +-- Non-existent face +SELECT topology.st_getfacegeometry('tt', 666); + +SELECT topology.DropTopology('tt'); diff -Nru postgis-1.5.3/topology/test/regress/st_getfacegeometry_expected postgis-2.0.1/topology/test/regress/st_getfacegeometry_expected --- postgis-1.5.3/topology/test/regress/st_getfacegeometry_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/st_getfacegeometry_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,10 @@ +t +f1 (with hole)|POLYGON((0 0,0 10,10 10,10 0,0 0),(2 2,8 2,8 8,2 8,2 2)) +f2 (fill hole)|POLYGON((2 2,2 8,8 8,8 2,2 2)) +ERROR: SQL/MM Spatial exception - universal face has no geometry +ERROR: SQL/MM Spatial exception - null argument +ERROR: SQL/MM Spatial exception - null argument +ERROR: SQL/MM Spatial exception - invalid topology name +ERROR: SQL/MM Spatial exception - invalid topology name +ERROR: SQL/MM Spatial exception - non-existent face. +Topology 'tt' dropped diff -Nru postgis-1.5.3/topology/test/regress/st_modedgeheal.sql postgis-2.0.1/topology/test/regress/st_modedgeheal.sql --- postgis-1.5.3/topology/test/regress/st_modedgeheal.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/st_modedgeheal.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,120 @@ +\set VERBOSITY terse +set client_min_messages to ERROR; + +-- Import city_data +\i load_topology.sql + +SELECT topology.ST_ModEdgeHeal('city_data', 1, null); +SELECT topology.ST_ModEdgeHeal('city_data', null, 1); +SELECT topology.ST_ModEdgeHeal(null, 1, 2); +SELECT topology.ST_ModEdgeHeal('', 1, 2); + +-- Not connected edges +SELECT topology.ST_ModEdgeHeal('city_data', 25, 3); + +-- Other connected edges +SELECT topology.ST_ModEdgeHeal('city_data', 9, 10); + +-- Closed edge +SELECT topology.ST_ModEdgeHeal('city_data', 2, 3); +SELECT topology.ST_ModEdgeHeal('city_data', 3, 2); + +-- Heal to self +SELECT topology.ST_ModEdgeHeal('city_data', 25, 25); + +-- Good ones { + +-- check state before +SELECT 'E'||edge_id, + ST_AsText(ST_StartPoint(geom)), ST_AsText(ST_EndPoint(geom)), + next_left_edge, next_right_edge, start_node, end_node + FROM city_data.edge_data ORDER BY edge_id; +SELECT 'N'||node_id FROM city_data.node; + +-- No other edges involved, SQL/MM caseno 2, drops node 6 +SELECT 'MH(4,5)', topology.ST_ModEdgeHeal('city_data', 4, 5); + +-- Face and other edges involved, SQL/MM caseno 1, drops node 16 +SELECT 'MH(21,6)', topology.ST_ModEdgeHeal('city_data', 21, 6); +-- Face and other edges involved, SQL/MM caseno 2, drops node 19 +SELECT 'MH(8,15)', topology.ST_ModEdgeHeal('city_data', 8, 15); +-- Face and other edges involved, SQL/MM caseno 3, drops node 8 +SELECT 'MH(12,22)', topology.ST_ModEdgeHeal('city_data', 12, 22); +-- Face and other edges involved, SQL/MM caseno 4, drops node 11 +SELECT 'MH(16,14)', topology.ST_ModEdgeHeal('city_data', 16, 14); + +-- check state after +SELECT 'E'||edge_id, + ST_AsText(ST_StartPoint(geom)), ST_AsText(ST_EndPoint(geom)), + next_left_edge, next_right_edge, start_node, end_node + FROM city_data.edge_data ORDER BY edge_id; +SELECT 'N'||node_id FROM city_data.node; + +-- } + +-- clean up +SELECT topology.DropTopology('city_data'); + +------------------------------------------------------------------------- +------------------------------------------------------------------------- +------------------------------------------------------------------------- + +-- Now test in presence of features + +SELECT topology.CreateTopology('t') > 1; +CREATE TABLE t.f(id varchar); +SELECT topology.AddTopoGeometryColumn('t', 't', 'f','g', 'LINE'); + +SELECT 'E'||topology.AddEdge('t', 'LINESTRING(2 2, 2 8)'); -- 1 +SELECT 'E'||topology.AddEdge('t', 'LINESTRING(2 8, 8 8)'); -- 2 + +INSERT INTO t.f VALUES ('F+E1', + topology.CreateTopoGeom('t', 2, 1, '{{1,2}}')); + +-- This should be forbidden, as F+E1 above could not be +-- defined w/out one of the edges +SELECT topology.ST_ModEdgeHeal('t', 1, 2); +SELECT topology.ST_ModEdgeHeal('t', 2, 1); + +-- This is for ticket #941 +SELECT topology.ST_ModEdgeHeal('t', 1, 200); +SELECT topology.ST_ModEdgeHeal('t', 100, 2); + +-- Now see how signed edges are updated + +SELECT 'E'||topology.AddEdge('t', 'LINESTRING(0 0, 5 0)'); -- 3 +SELECT 'E'||topology.AddEdge('t', 'LINESTRING(10 0, 5 0)'); -- 4 + +INSERT INTO t.f VALUES ('F+E3-E4', + topology.CreateTopoGeom('t', 2, 1, '{{3,2},{-4,2}}')); +INSERT INTO t.f VALUES ('F-E3+E4', + topology.CreateTopoGeom('t', 2, 1, '{{-3,2},{4,2}}')); + +SELECT r.topogeo_id, r.element_id + FROM t.relation r, t.f f WHERE + r.layer_id = layer_id(f.g) AND r.topogeo_id = id(f.g) + AND r.topogeo_id in (2,3) + ORDER BY r.layer_id, r.topogeo_id; + +-- This is fine, but will have to tweak definition of +-- 'F+E3-E4' and 'F-E3+E4' +SELECT 'MH(3,4)', topology.ST_ModEdgeHeal('t', 3, 4); + +-- This is for ticket #942 +SELECT topology.ST_ModEdgeHeal('t', 1, 3); + +SELECT r.topogeo_id, r.element_id + FROM t.relation r, t.f f WHERE + r.layer_id = layer_id(f.g) AND r.topogeo_id = id(f.g) + AND r.topogeo_id in (2,3) + ORDER BY r.layer_id, r.topogeo_id; + +SELECT topology.DropTopology('t'); + +------------------------------------------------------------------------- +------------------------------------------------------------------------- +------------------------------------------------------------------------- + +-- TODO: test registered but unexistent topology +-- TODO: test registered but corrupted topology +-- (missing node, edge, relation...) diff -Nru postgis-1.5.3/topology/test/regress/st_modedgeheal_expected postgis-2.0.1/topology/test/regress/st_modedgeheal_expected --- postgis-1.5.3/topology/test/regress/st_modedgeheal_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/st_modedgeheal_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,122 @@ +BEGIN +t +9 +22 +26 +COMMIT +ERROR: SQL/MM Spatial exception - null argument +ERROR: SQL/MM Spatial exception - null argument +ERROR: SQL/MM Spatial exception - null argument +ERROR: SQL/MM Spatial exception - invalid topology name +ERROR: SQL/MM Spatial exception - non-connected edges +ERROR: SQL/MM Spatial exception - other edges connected (ie: 19) +ERROR: Edge 2 is closed, cannot heal to edge 3 +ERROR: Edge 2 is closed, cannot heal to edge 3 +ERROR: Cannot heal edge 25 with itself, try with another +E1|POINT(8 30)|POINT(8 30)|1|-1|1|1 +E2|POINT(25 30)|POINT(25 30)|3|-2|2|2 +E3|POINT(25 30)|POINT(25 35)|-3|2|2|3 +E4|POINT(36 38)|POINT(57 33)|-5|4|5|6 +E5|POINT(41 40)|POINT(57 33)|-4|5|7|6 +E6|POINT(9 22)|POINT(21 22)|7|-21|16|17 +E7|POINT(21 22)|POINT(35 22)|8|-19|17|18 +E8|POINT(35 22)|POINT(47 22)|-15|-17|18|19 +E9|POINT(9 14)|POINT(21 14)|19|-22|15|14 +E10|POINT(35 14)|POINT(21 14)|-20|17|13|14 +E11|POINT(35 14)|POINT(47 14)|15|-18|13|12 +E12|POINT(9 6)|POINT(21 6)|20|22|8|9 +E13|POINT(21 6)|POINT(35 6)|18|-12|9|10 +E14|POINT(35 6)|POINT(47 6)|16|-13|10|11 +E15|POINT(47 14)|POINT(47 22)|-8|-16|12|19 +E16|POINT(47 6)|POINT(47 14)|-11|-14|11|12 +E17|POINT(35 14)|POINT(35 22)|-7|11|13|18 +E18|POINT(35 6)|POINT(35 14)|10|14|10|13 +E19|POINT(21 14)|POINT(21 22)|-6|-10|14|17 +E20|POINT(21 6)|POINT(21 14)|-9|13|9|14 +E21|POINT(9 14)|POINT(9 22)|6|9|15|16 +E22|POINT(9 6)|POINT(9 14)|21|12|8|15 +E25|POINT(9 35)|POINT(13 35)|-25|25|21|22 +E26|POINT(4 31)|POINT(4 31)|26|-26|20|20 +N1 +N2 +N3 +N4 +N5 +N6 +N7 +N8 +N9 +N10 +N11 +N12 +N13 +N14 +N15 +N16 +N17 +N18 +N19 +N20 +N21 +N22 +MH(4,5)|6 +MH(21,6)|16 +MH(8,15)|19 +MH(12,22)|8 +MH(16,14)|11 +E1|POINT(8 30)|POINT(8 30)|1|-1|1|1 +E2|POINT(25 30)|POINT(25 30)|3|-2|2|2 +E3|POINT(25 30)|POINT(25 35)|-3|2|2|3 +E4|POINT(36 38)|POINT(41 40)|-4|4|5|7 +E7|POINT(21 22)|POINT(35 22)|8|-19|17|18 +E8|POINT(35 22)|POINT(47 14)|-16|-17|18|12 +E9|POINT(9 14)|POINT(21 14)|19|12|15|14 +E10|POINT(35 14)|POINT(21 14)|-20|17|13|14 +E11|POINT(35 14)|POINT(47 14)|-8|-18|13|12 +E12|POINT(9 14)|POINT(21 6)|20|21|15|9 +E13|POINT(21 6)|POINT(35 6)|18|-12|9|10 +E16|POINT(35 6)|POINT(47 14)|-11|-13|10|12 +E17|POINT(35 14)|POINT(35 22)|-7|11|13|18 +E18|POINT(35 6)|POINT(35 14)|10|16|10|13 +E19|POINT(21 14)|POINT(21 22)|-21|-10|14|17 +E20|POINT(21 6)|POINT(21 14)|-9|13|9|14 +E21|POINT(9 14)|POINT(21 22)|7|9|15|17 +E25|POINT(9 35)|POINT(13 35)|-25|25|21|22 +E26|POINT(4 31)|POINT(4 31)|26|-26|20|20 +N1 +N2 +N3 +N4 +N5 +N7 +N9 +N10 +N12 +N13 +N14 +N15 +N17 +N18 +N20 +N21 +N22 +Topology 'city_data' dropped +t +1 +E1 +E2 +ERROR: TopoGeom 1 in layer 1 (t.f.g) cannot be represented healing edges 1 and 2 +ERROR: TopoGeom 1 in layer 1 (t.f.g) cannot be represented healing edges 2 and 1 +ERROR: SQL/MM Spatial exception - non-existent edge 200 +ERROR: SQL/MM Spatial exception - non-existent edge 100 +E3 +E4 +2|-4 +2|3 +3|4 +3|-3 +MH(3,4)|5 +ERROR: SQL/MM Spatial exception - non-connected edges +2|3 +3|-3 +Topology 't' dropped diff -Nru postgis-1.5.3/topology/test/regress/st_modedgesplit.sql postgis-2.0.1/topology/test/regress/st_modedgesplit.sql --- postgis-1.5.3/topology/test/regress/st_modedgesplit.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/st_modedgesplit.sql 2012-03-23 22:23:05.000000000 +0000 @@ -0,0 +1,127 @@ + +\set VERBOSITY terse +set client_min_messages to WARNING; + +-- Import city_data +\i load_topology.sql + +-- Save max node id +select 'node'::text as what, max(node_id) INTO city_data.limits FROM city_data.node; +INSERT INTO city_data.limits select 'edge'::text as what, max(edge_id) FROM city_data.edge; +SELECT 'max',* from city_data.limits; + +-- Check changes since last saving, save more +-- { +CREATE OR REPLACE FUNCTION check_changes() +RETURNS TABLE (o text) +AS $$ +DECLARE + rec RECORD; + sql text; +BEGIN + -- Check effect on nodes + sql := 'SELECT n.node_id, ''N|'' || n.node_id || ''|'' || + COALESCE(n.containing_face::text,'''') || ''|'' || + ST_AsText(ST_SnapToGrid(n.geom, 0.2))::text as xx + FROM city_data.node n WHERE n.node_id > ( + SELECT max FROM city_data.limits WHERE what = ''node''::text ) + ORDER BY n.node_id'; + + FOR rec IN EXECUTE sql LOOP + o := rec.xx; + RETURN NEXT; + END LOOP; + + -- Check effect on edges (there should be one split) + sql := ' + WITH node_limits AS ( SELECT max FROM city_data.limits WHERE what = ''node''::text ), + edge_limits AS ( SELECT max FROM city_data.limits WHERE what = ''edge''::text ) + SELECT ''E|'' || e.edge_id || ''|sn'' || e.start_node || ''|en'' || e.end_node + || ''|nl'' || e.next_left_edge + || ''|nr'' || e.next_right_edge + || ''|lf'' || e.left_face + || ''|rf'' || e.right_face + :: text as xx + FROM city_data.edge e, node_limits nl, edge_limits el + WHERE e.start_node > nl.max + OR e.end_node > nl.max + OR e.edge_id > el.max + ORDER BY e.edge_id; + '; + + FOR rec IN EXECUTE sql LOOP + o := rec.xx; + RETURN NEXT; + END LOOP; + + UPDATE city_data.limits SET max = (SELECT max(n.node_id) FROM city_data.node n) WHERE what = 'node'; + UPDATE city_data.limits SET max = (SELECT max(e.edge_id) FROM city_data.edge e) WHERE what = 'edge'; + +END; +$$ LANGUAGE 'plpgsql'; +-- } + +-- Invalid calls +SELECT 'invalid', ST_ModEdgeSplit('city_data', 999, 'POINT(36 26, 38 30)'); +SELECT 'invalid', ST_ModEdgeSplit('city_data', 10, 'POINT(28 15)'); +SELECT 'invalid', ST_ModEdgeSplit('', 10, 'POINT(28 14)'); +SELECT 'invalid', ST_ModEdgeSplit(NULL, 10, 'POINT(28 14)'); +SELECT 'invalid', ST_ModEdgeSplit('city_data', NULL, 'POINT(28 14)'); +SELECT 'invalid', ST_ModEdgeSplit('city_data', 10, NULL); +SELECT 'invalid', ST_ModEdgeSplit('fake', 10, 'POINT(28 14)'); + +-- Non-isolated edge +SELECT 'noniso', ST_ModEdgeSplit('city_data', 10, 'POINT(28 14)'); +SELECT check_changes(); + +-- Isolated edge +SELECT 'iso', ST_ModEdgeSplit('city_data', 25, 'POINT(11 35)'); +SELECT check_changes(); + +-- Dangling on end point +SELECT 'dangling_end', ST_ModEdgeSplit('city_data', 3, 'POINT(25 32)'); +SELECT check_changes(); + +-- Dangling on start point +SELECT 'dangling_start', ST_ModEdgeSplit('city_data', 4, 'POINT(45 32)'); +SELECT check_changes(); + +-- Splitting closed edge +SELECT 'closed', ST_ModEdgeSplit('city_data', 1, 'POINT(3 38)'); +SELECT check_changes(); + +-- Robustness of edge splitting (#1711) + +-- clean all up first +DELETE FROM city_data.edge_data; +DELETE FROM city_data.node; +DELETE FROM city_data.face where face_id > 0; + +CREATE TEMP TABLE t AS +SELECT +'01020000000400000000000000000034400000000000002440000000000000244000000000000024400000000000002240000000000000284000000000000024400000000000003440' +::geometry as line, +'010100000000000000000022400000000000002840' +::geometry as point, +null::int as edge_id, +null::int as node_id +; + +UPDATE t SET edge_id = AddEdge('city_data', line); +UPDATE t SET node_id = ST_ModEdgeSplit('city_data', t.edge_id, t.point); +SELECT 'robust.1', 'E'||edge_id, 'N'||node_id FROM t; +SELECT check_changes(); +SELECT 'robust.2', + ST_Equals(t.point, ST_EndPoint(e1.geom)), + ST_Equals(t.point, ST_StartPoint(e2.geom)) +FROM t, city_data.edge e1, city_data.edge e2, city_data.node n +WHERE n.node_id = t.node_id + AND e1.end_node = n.node_id + AND e2.start_node = n.node_id; + +DROP TABLE t; + + + +DROP FUNCTION check_changes(); +SELECT DropTopology('city_data'); diff -Nru postgis-1.5.3/topology/test/regress/st_modedgesplit_expected postgis-2.0.1/topology/test/regress/st_modedgesplit_expected --- postgis-1.5.3/topology/test/regress/st_modedgesplit_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/st_modedgesplit_expected 2012-03-23 22:23:05.000000000 +0000 @@ -0,0 +1,43 @@ +BEGIN +t +9 +22 +26 +COMMIT +max|node|22 +max|edge|26 +ERROR: geometry has too many points at character 53 +ERROR: SQL/MM Spatial exception - point not on edge +ERROR: zero-length delimited identifier at or near """" at character 15 +ERROR: SQL/MM Spatial exception - null argument +ERROR: SQL/MM Spatial exception - null argument +ERROR: SQL/MM Spatial exception - null argument +ERROR: schema "fake" does not exist at character 15 +noniso|23 +N|23||POINT(28 14) +E|10|sn13|en23|nl27|nr17|lf7|rf4 +E|27|sn23|en14|nl-20|nr-10|lf7|rf4 +iso|24 +N|24||POINT(11 35) +E|25|sn21|en24|nl28|nr25|lf1|rf1 +E|28|sn24|en22|nl-28|nr-25|lf1|rf1 +dangling_end|25 +N|25||POINT(25 32) +E|3|sn2|en25|nl29|nr2|lf2|rf2 +E|29|sn25|en3|nl-29|nr-3|lf2|rf2 +dangling_start|26 +N|26||POINT(45 32) +E|4|sn5|en26|nl30|nr4|lf0|rf0 +E|30|sn26|en6|nl-5|nr-4|lf0|rf0 +closed|27 +N|27||POINT(3 38) +E|1|sn1|en27|nl31|nr-31|lf1|rf0 +E|31|sn27|en1|nl1|nr-1|lf1|rf0 +robust.1|E32|N30 +N|28||POINT(20 10) +N|29||POINT(10 20) +N|30||POINT(9 12) +E|32|sn28|en30|nl33|nr32|lf0|rf0 +E|33|sn30|en29|nl-33|nr-32|lf0|rf0 +robust.2|t|t +Topology 'city_data' dropped diff -Nru postgis-1.5.3/topology/test/regress/st_newedgeheal.sql postgis-2.0.1/topology/test/regress/st_newedgeheal.sql --- postgis-1.5.3/topology/test/regress/st_newedgeheal.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/st_newedgeheal.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,120 @@ +\set VERBOSITY terse +set client_min_messages to ERROR; + +-- Import city_data +\i load_topology.sql + +SELECT topology.ST_NewEdgeHeal('city_data', 1, null); +SELECT topology.ST_NewEdgeHeal('city_data', null, 1); +SELECT topology.ST_NewEdgeHeal(null, 1, 2); +SELECT topology.ST_NewEdgeHeal('', 1, 2); + +-- Not connected edges +SELECT topology.ST_NewEdgeHeal('city_data', 25, 3); + +-- Other connected edges +SELECT topology.ST_NewEdgeHeal('city_data', 9, 10); + +-- Closed edge +SELECT topology.ST_NewEdgeHeal('city_data', 2, 3); +SELECT topology.ST_NewEdgeHeal('city_data', 3, 2); + +-- Heal to self +SELECT topology.ST_NewEdgeHeal('city_data', 25, 25); + +-- Good ones { + +-- check state before +SELECT 'E'||edge_id, + ST_AsText(ST_StartPoint(geom)), ST_AsText(ST_EndPoint(geom)), + next_left_edge, next_right_edge, start_node, end_node + FROM city_data.edge_data ORDER BY edge_id; +SELECT 'N'||node_id FROM city_data.node; + +-- No other edges involved, SQL/MM caseno 2, drops node 6 +SELECT 'MH(4,5)', topology.ST_NewEdgeHeal('city_data', 4, 5); + +-- Face and other edges involved, SQL/MM caseno 1, drops node 16 +SELECT 'MH(21,6)', topology.ST_NewEdgeHeal('city_data', 21, 6); +-- Face and other edges involved, SQL/MM caseno 2, drops node 19 +SELECT 'MH(8,15)', topology.ST_NewEdgeHeal('city_data', 8, 15); +-- Face and other edges involved, SQL/MM caseno 3, drops node 8 +SELECT 'MH(12,22)', topology.ST_NewEdgeHeal('city_data', 12, 22); +-- Face and other edges involved, SQL/MM caseno 4, drops node 11 +SELECT 'MH(16,14)', topology.ST_NewEdgeHeal('city_data', 16, 14); + +-- check state after +SELECT 'E'||edge_id, + ST_AsText(ST_StartPoint(geom)), ST_AsText(ST_EndPoint(geom)), + next_left_edge, next_right_edge, start_node, end_node + FROM city_data.edge_data ORDER BY edge_id; +SELECT 'N'||node_id FROM city_data.node; + +-- } + +-- clean up +SELECT topology.DropTopology('city_data'); + +------------------------------------------------------------------------- +------------------------------------------------------------------------- +------------------------------------------------------------------------- + +-- Now test in presence of features + +SELECT topology.CreateTopology('t') > 1; +CREATE TABLE t.f(id varchar); +SELECT topology.AddTopoGeometryColumn('t', 't', 'f','g', 'LINE'); + +SELECT 'E'||topology.AddEdge('t', 'LINESTRING(2 2, 2 8)'); -- 1 +SELECT 'E'||topology.AddEdge('t', 'LINESTRING(2 8, 8 8)'); -- 2 + +INSERT INTO t.f VALUES ('F+E1', + topology.CreateTopoGeom('t', 2, 1, '{{1,2}}')); + +-- This should be forbidden, as F+E1 above could not be +-- defined w/out one of the edges +SELECT topology.ST_NewEdgeHeal('t', 1, 2); +SELECT topology.ST_NewEdgeHeal('t', 2, 1); + +-- This is for ticket #941 +SELECT topology.ST_NewEdgeHeal('t', 1, 200); +SELECT topology.ST_NewEdgeHeal('t', 100, 2); + +-- Now see how signed edges are updated + +SELECT 'E'||topology.AddEdge('t', 'LINESTRING(0 0, 5 0)'); -- 3 +SELECT 'E'||topology.AddEdge('t', 'LINESTRING(10 0, 5 0)'); -- 4 + +INSERT INTO t.f VALUES ('F+E3-E4', + topology.CreateTopoGeom('t', 2, 1, '{{3,2},{-4,2}}')); +INSERT INTO t.f VALUES ('F-E3+E4', + topology.CreateTopoGeom('t', 2, 1, '{{-3,2},{4,2}}')); + +SELECT r.topogeo_id, r.element_id + FROM t.relation r, t.f f WHERE + r.layer_id = layer_id(f.g) AND r.topogeo_id = id(f.g) + AND r.topogeo_id in (2,3) + ORDER BY r.layer_id, r.topogeo_id; + +-- This is fine, but will have to tweak definition of +-- 'F+E3-E4' and 'F-E3+E4' +SELECT 'MH(3,4)', topology.ST_NewEdgeHeal('t', 3, 4); + +-- This is for ticket #942 +SELECT topology.ST_NewEdgeHeal('t', 1, 5); + +SELECT r.topogeo_id, r.element_id + FROM t.relation r, t.f f WHERE + r.layer_id = layer_id(f.g) AND r.topogeo_id = id(f.g) + AND r.topogeo_id in (2,3) + ORDER BY r.layer_id, r.topogeo_id; + +SELECT topology.DropTopology('t'); + +------------------------------------------------------------------------- +------------------------------------------------------------------------- +------------------------------------------------------------------------- + +-- TODO: test registered but unexistent topology +-- TODO: test registered but corrupted topology +-- (missing node, edge, relation...) diff -Nru postgis-1.5.3/topology/test/regress/st_newedgeheal_expected postgis-2.0.1/topology/test/regress/st_newedgeheal_expected --- postgis-1.5.3/topology/test/regress/st_newedgeheal_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/st_newedgeheal_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,122 @@ +BEGIN +t +9 +22 +26 +COMMIT +ERROR: SQL/MM Spatial exception - null argument +ERROR: SQL/MM Spatial exception - null argument +ERROR: SQL/MM Spatial exception - null argument +ERROR: SQL/MM Spatial exception - invalid topology name +ERROR: SQL/MM Spatial exception - non-connected edges +ERROR: SQL/MM Spatial exception - other edges connected (ie: 19) +ERROR: Edge 2 is closed, cannot heal to edge 3 +ERROR: Edge 2 is closed, cannot heal to edge 3 +ERROR: Cannot heal edge 25 with itself, try with another +E1|POINT(8 30)|POINT(8 30)|1|-1|1|1 +E2|POINT(25 30)|POINT(25 30)|3|-2|2|2 +E3|POINT(25 30)|POINT(25 35)|-3|2|2|3 +E4|POINT(36 38)|POINT(57 33)|-5|4|5|6 +E5|POINT(41 40)|POINT(57 33)|-4|5|7|6 +E6|POINT(9 22)|POINT(21 22)|7|-21|16|17 +E7|POINT(21 22)|POINT(35 22)|8|-19|17|18 +E8|POINT(35 22)|POINT(47 22)|-15|-17|18|19 +E9|POINT(9 14)|POINT(21 14)|19|-22|15|14 +E10|POINT(35 14)|POINT(21 14)|-20|17|13|14 +E11|POINT(35 14)|POINT(47 14)|15|-18|13|12 +E12|POINT(9 6)|POINT(21 6)|20|22|8|9 +E13|POINT(21 6)|POINT(35 6)|18|-12|9|10 +E14|POINT(35 6)|POINT(47 6)|16|-13|10|11 +E15|POINT(47 14)|POINT(47 22)|-8|-16|12|19 +E16|POINT(47 6)|POINT(47 14)|-11|-14|11|12 +E17|POINT(35 14)|POINT(35 22)|-7|11|13|18 +E18|POINT(35 6)|POINT(35 14)|10|14|10|13 +E19|POINT(21 14)|POINT(21 22)|-6|-10|14|17 +E20|POINT(21 6)|POINT(21 14)|-9|13|9|14 +E21|POINT(9 14)|POINT(9 22)|6|9|15|16 +E22|POINT(9 6)|POINT(9 14)|21|12|8|15 +E25|POINT(9 35)|POINT(13 35)|-25|25|21|22 +E26|POINT(4 31)|POINT(4 31)|26|-26|20|20 +N1 +N2 +N3 +N4 +N5 +N6 +N7 +N8 +N9 +N10 +N11 +N12 +N13 +N14 +N15 +N16 +N17 +N18 +N19 +N20 +N21 +N22 +MH(4,5)|27 +MH(21,6)|28 +MH(8,15)|29 +MH(12,22)|30 +MH(16,14)|31 +E1|POINT(8 30)|POINT(8 30)|1|-1|1|1 +E2|POINT(25 30)|POINT(25 30)|3|-2|2|2 +E3|POINT(25 30)|POINT(25 35)|-3|2|2|3 +E7|POINT(21 22)|POINT(35 22)|29|-19|17|18 +E9|POINT(9 14)|POINT(21 14)|19|30|15|14 +E10|POINT(35 14)|POINT(21 14)|-20|17|13|14 +E11|POINT(35 14)|POINT(47 14)|-29|-18|13|12 +E13|POINT(21 6)|POINT(35 6)|18|-30|9|10 +E17|POINT(35 14)|POINT(35 22)|-7|11|13|18 +E18|POINT(35 6)|POINT(35 14)|10|31|10|13 +E19|POINT(21 14)|POINT(21 22)|-28|-10|14|17 +E20|POINT(21 6)|POINT(21 14)|-9|13|9|14 +E25|POINT(9 35)|POINT(13 35)|-25|25|21|22 +E26|POINT(4 31)|POINT(4 31)|26|-26|20|20 +E27|POINT(36 38)|POINT(41 40)|-27|27|5|7 +E28|POINT(9 14)|POINT(21 22)|7|9|15|17 +E29|POINT(35 22)|POINT(47 14)|-31|-17|18|12 +E30|POINT(9 14)|POINT(21 6)|20|28|15|9 +E31|POINT(35 6)|POINT(47 14)|-11|-13|10|12 +N1 +N2 +N3 +N4 +N5 +N7 +N9 +N10 +N12 +N13 +N14 +N15 +N17 +N18 +N20 +N21 +N22 +Topology 'city_data' dropped +t +1 +E1 +E2 +ERROR: TopoGeom 1 in layer 1 (t.f.g) cannot be represented healing edges 1 and 2 +ERROR: TopoGeom 1 in layer 1 (t.f.g) cannot be represented healing edges 2 and 1 +ERROR: SQL/MM Spatial exception - non-existent edge 200 +ERROR: SQL/MM Spatial exception - non-existent edge 100 +E3 +E4 +2|-4 +2|3 +3|4 +3|-3 +MH(3,4)|5 +ERROR: SQL/MM Spatial exception - non-connected edges +2|5 +3|-5 +Topology 't' dropped diff -Nru postgis-1.5.3/topology/test/regress/st_newedgessplit.sql postgis-2.0.1/topology/test/regress/st_newedgessplit.sql --- postgis-1.5.3/topology/test/regress/st_newedgessplit.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/st_newedgessplit.sql 2012-03-23 22:23:05.000000000 +0000 @@ -0,0 +1,126 @@ + +\set VERBOSITY terse +set client_min_messages to ERROR; + +-- Import city_data +\i load_topology.sql + +-- Save max node id +select 'node'::text as what, max(node_id) INTO city_data.limits FROM city_data.node; +INSERT INTO city_data.limits select 'edge'::text as what, max(edge_id) FROM city_data.edge; +SELECT 'max',* from city_data.limits; + +-- Check changes since last saving, save more +-- { +CREATE OR REPLACE FUNCTION check_changes() +RETURNS TABLE (o text) +AS $$ +DECLARE + rec RECORD; + sql text; +BEGIN + -- Check effect on nodes + sql := 'SELECT n.node_id, ''N|'' || n.node_id || ''|'' || + COALESCE(n.containing_face::text,'''') || ''|'' || + ST_AsText(ST_SnapToGrid(n.geom, 0.2))::text as xx + FROM city_data.node n WHERE n.node_id > ( + SELECT max FROM city_data.limits WHERE what = ''node''::text ) + ORDER BY n.node_id'; + + FOR rec IN EXECUTE sql LOOP + o := rec.xx; + RETURN NEXT; + END LOOP; + + -- Check effect on edges (there should be one split) + sql := ' + WITH node_limits AS ( SELECT max FROM city_data.limits WHERE what = ''node''::text ), + edge_limits AS ( SELECT max FROM city_data.limits WHERE what = ''edge''::text ) + SELECT ''E|'' || e.edge_id || ''|sn'' || e.start_node || ''|en'' || e.end_node + || ''|nl'' || e.next_left_edge + || ''|nr'' || e.next_right_edge + || ''|lf'' || e.left_face + || ''|rf'' || e.right_face + :: text as xx + FROM city_data.edge e, node_limits nl, edge_limits el + WHERE e.start_node > nl.max + OR e.end_node > nl.max + OR e.edge_id > el.max + ORDER BY e.edge_id; + '; + + FOR rec IN EXECUTE sql LOOP + o := rec.xx; + RETURN NEXT; + END LOOP; + + UPDATE city_data.limits SET max = (SELECT max(n.node_id) FROM city_data.node n) WHERE what = 'node'; + UPDATE city_data.limits SET max = (SELECT max(e.edge_id) FROM city_data.edge e) WHERE what = 'edge'; + +END; +$$ LANGUAGE 'plpgsql'; +-- } + +-- Invalid calls +SELECT 'invalid', ST_NewEdgesSplit('city_data', 999, 'POINT(36 26, 38 30)'); +SELECT 'invalid', ST_NewEdgesSplit('city_data', 10, 'POINT(28 15)'); +SELECT 'invalid', ST_NewEdgesSplit('', 10, 'POINT(28 14)'); +SELECT 'invalid', ST_NewEdgesSplit(NULL, 10, 'POINT(28 14)'); +SELECT 'invalid', ST_NewEdgesSplit('city_data', NULL, 'POINT(28 14)'); +SELECT 'invalid', ST_NewEdgesSplit('city_data', 10, NULL); +SELECT 'invalid', ST_NewEdgesSplit('fake', 10, 'POINT(28 14)'); + +-- Non-isolated edge +SELECT 'noniso', ST_NewEdgesSplit('city_data', 10, 'POINT(28 14)'); +SELECT check_changes(); + +-- Isolated edge +SELECT 'iso', ST_NewEdgesSplit('city_data', 25, 'POINT(11 35)'); +SELECT check_changes(); + +-- Dangling on end point +SELECT 'dangling_end', ST_NewEdgesSplit('city_data', 3, 'POINT(25 32)'); +SELECT check_changes(); + +-- Dangling on start point +SELECT 'dangling_start', ST_NewEdgesSplit('city_data', 4, 'POINT(45 32)'); +SELECT check_changes(); + +-- Splitting closed edge +SELECT 'closed', ST_NewEdgesSplit('city_data', 1, 'POINT(3 38)'); +SELECT check_changes(); + +-- Robustness of edge splitting (#1711) + +-- clean all up first +DELETE FROM city_data.edge_data; +DELETE FROM city_data.node; +DELETE FROM city_data.face where face_id > 0; + +CREATE TEMP TABLE t AS +SELECT +'01020000000400000000000000000034400000000000002440000000000000244000000000000024400000000000002240000000000000284000000000000024400000000000003440' +::geometry as line, +'010100000000000000000022400000000000002840' +::geometry as point, +null::int as edge_id, +null::int as node_id +; + +UPDATE t SET edge_id = AddEdge('city_data', line); +UPDATE t SET node_id = ST_NewEdgesSplit('city_data', t.edge_id, t.point); +SELECT 'robust.1', 'E'||edge_id, 'N'||node_id FROM t; +SELECT check_changes(); +SELECT 'robust.2', + ST_Equals(t.point, ST_EndPoint(e1.geom)), + ST_Equals(t.point, ST_StartPoint(e2.geom)) +FROM t, city_data.edge e1, city_data.edge e2, city_data.node n +WHERE n.node_id = t.node_id + AND e1.end_node = n.node_id + AND e2.start_node = n.node_id; + +DROP TABLE t; + + +DROP FUNCTION check_changes(); +SELECT DropTopology('city_data'); diff -Nru postgis-1.5.3/topology/test/regress/st_newedgessplit_expected postgis-2.0.1/topology/test/regress/st_newedgessplit_expected --- postgis-1.5.3/topology/test/regress/st_newedgessplit_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/st_newedgessplit_expected 2012-03-23 22:23:05.000000000 +0000 @@ -0,0 +1,43 @@ +BEGIN +t +9 +22 +26 +COMMIT +max|node|22 +max|edge|26 +ERROR: geometry has too many points at character 54 +ERROR: SQL/MM Spatial exception - point not on edge +ERROR: zero-length delimited identifier at or near """" at character 15 +ERROR: SQL/MM Spatial exception - null argument +ERROR: SQL/MM Spatial exception - null argument +ERROR: SQL/MM Spatial exception - null argument +ERROR: schema "fake" does not exist at character 15 +noniso|23 +N|23||POINT(28 14) +E|27|sn13|en23|nl28|nr17|lf7|rf4 +E|28|sn23|en14|nl-20|nr-27|lf7|rf4 +iso|24 +N|24||POINT(11 35) +E|29|sn21|en24|nl30|nr29|lf1|rf1 +E|30|sn24|en22|nl-30|nr-29|lf1|rf1 +dangling_end|25 +N|25||POINT(25 32) +E|31|sn2|en25|nl32|nr2|lf2|rf2 +E|32|sn25|en3|nl-32|nr-31|lf2|rf2 +dangling_start|26 +N|26||POINT(45 32) +E|33|sn5|en26|nl34|nr33|lf0|rf0 +E|34|sn26|en6|nl-5|nr-33|lf0|rf0 +closed|27 +N|27||POINT(3 38) +E|35|sn1|en27|nl36|nr-36|lf1|rf0 +E|36|sn27|en1|nl35|nr-35|lf1|rf0 +robust.1|E37|N30 +N|28||POINT(20 10) +N|29||POINT(10 20) +N|30||POINT(9 12) +E|38|sn28|en30|nl39|nr38|lf0|rf0 +E|39|sn30|en29|nl-39|nr-38|lf0|rf0 +robust.2|t|t +Topology 'city_data' dropped diff -Nru postgis-1.5.3/topology/test/regress/st_remedgemodface.sql postgis-2.0.1/topology/test/regress/st_remedgemodface.sql --- postgis-1.5.3/topology/test/regress/st_remedgemodface.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/st_remedgemodface.sql 2012-04-11 19:17:49.000000000 +0000 @@ -0,0 +1,421 @@ +\set VERBOSITY terse +set client_min_messages to ERROR; + +INSERT INTO spatial_ref_sys ( auth_name, auth_srid, srid, proj4text ) VALUES ( 'EPSG', 4326, 4326, '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs' ); + + +-- Import city_data +\i load_topology-4326.sql + +-- Utility functions for the test { + +CREATE OR REPLACE FUNCTION save_nodes() +RETURNS VOID +AS $$ +BEGIN + DROP TABLE IF EXISTS city_data.orig_node_summary; + CREATE TABLE city_data.orig_node_summary + AS SELECT node_id, + containing_face + FROM city_data.node; +END; +$$ LANGUAGE 'plpgsql'; + +CREATE OR REPLACE FUNCTION check_nodes(lbl text) +RETURNS TABLE (l text, o text, node_id int, + containing_face int) +AS $$ +DECLARE + sql1 text; + sql2 text; + q text; +BEGIN + sql1 := 'node_id, + containing_face + FROM city_data.node'; + sql2 := 'node_id, containing_face + FROM city_data.orig_node_summary'; + + q := '(' || + 'SELECT ' || quote_literal(lbl) || ',''+'' as op,' || sql1 || + ' EXCEPT ' || + 'SELECT ' || quote_literal(lbl) || ',''+'',' || sql2 || + ') UNION ( ' || + 'SELECT ' || quote_literal(lbl) || ',''-'',' || sql2 || + ' EXCEPT ' || + 'SELECT ' || quote_literal(lbl) || ',''-'',' || sql1 || + ') ORDER BY node_id, op'; + + RAISE DEBUG '%', q; + + RETURN QUERY EXECUTE q; + +END +$$ LANGUAGE 'plpgsql'; + +CREATE OR REPLACE FUNCTION save_edges() +RETURNS VOID +AS $$ +BEGIN + DROP TABLE IF EXISTS city_data.orig_edge_summary; + CREATE TABLE city_data.orig_edge_summary AS + SELECT edge_id, + next_left_edge, next_right_edge, left_face, right_face + FROM city_data.edge_data; +END; +$$ LANGUAGE 'plpgsql'; + +CREATE OR REPLACE FUNCTION check_edges(lbl text) +RETURNS TABLE (l text, o text, edge_id int, + next_left_edge int, next_right_edge int, + left_face int, right_face int) +AS $$ +DECLARE + rec RECORD; + sql1 text; + sql2 text; + q text; +BEGIN + sql1 := 'edge_id, + next_left_edge, next_right_edge, left_face, right_face + FROM city_data.edge_data'; + sql2 := 'edge_id, + next_left_edge, next_right_edge, left_face, right_face + FROM city_data.orig_edge_summary'; + + q := '(' || + 'SELECT ' || quote_literal(lbl) || ',''+'' as op,' || sql1 || + ' EXCEPT ' || + 'SELECT ' || quote_literal(lbl) || ',''+'',' || sql2 || + ') UNION ( ' || + 'SELECT ' || quote_literal(lbl) || ',''-'',' || sql2 || + ' EXCEPT ' || + 'SELECT ' || quote_literal(lbl) || ',''-'',' || sql1 || + ') order by edge_id, op'; + + RAISE DEBUG '%', q; + + RETURN QUERY EXECUTE q; + +END +$$ LANGUAGE 'plpgsql'; + +CREATE OR REPLACE FUNCTION save_faces() +RETURNS VOID +AS $$ +BEGIN + DROP TABLE IF EXISTS city_data.orig_face_summary; + CREATE TABLE city_data.orig_face_summary AS + SELECT face_id, mbr + FROM city_data.face; +END; +$$ LANGUAGE 'plpgsql'; + +CREATE OR REPLACE FUNCTION check_faces(lbl text) +RETURNS TABLE (l text, o text, face_id int, mbr text) +AS $$ +DECLARE + sql1 text; + sql2 text; + q text; +BEGIN + sql1 := 'face_id, ST_AsEWKT(mbr) FROM city_data.face'; + sql2 := 'face_id, ST_AsEWKT(mbr) FROM city_data.orig_face_summary'; + + q := '(' || + 'SELECT ' || quote_literal(lbl) || ',''+'' as op,' || sql1 || + ' EXCEPT ' || + 'SELECT ' || quote_literal(lbl) || ',''+'',' || sql2 || + ') UNION ( ' || + 'SELECT ' || quote_literal(lbl) || ',''-'',' || sql2 || + ' EXCEPT ' || + 'SELECT ' || quote_literal(lbl) || ',''-'',' || sql1 || + ') ORDER BY face_id, op'; + + RAISE DEBUG '%', q; + + RETURN QUERY EXECUTE q; + +END +$$ language 'plpgsql'; + +-- } + +-- Save current state +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); + +-- Bogus calls -- { +SELECT topology.ST_RemEdgeModFace('city_data', null); +SELECT topology.ST_RemEdgeModFace(null, 1); +SELECT topology.ST_RemEdgeModFace('', 1); +SELECT topology.ST_RemEdgeModFace('city_data', 0); -- non-existent +SELECT topology.ST_RemEdgeModFace('city_data', 143); -- non-existent +SELECT * FROM check_nodes('bogus'); +SELECT * FROM check_edges('bogus'); +SELECT * FROM check_faces('bogus'); +-- } + + +-- Remove isolated edge +SELECT 'RM(25)', topology.ST_RemEdgeModFace('city_data', 25); +SELECT * FROM check_nodes('RM(25)/nodes'); +SELECT * FROM check_edges('RM(25)/edges'); +SELECT * FROM check_faces('RM(25)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); + +-- Remove edge not forming a ring +SELECT 'RM(4)', topology.ST_RemEdgeModFace('city_data', 4); +SELECT * FROM check_nodes('RM(4)/nodes'); +SELECT * FROM check_edges('RM(4)/edges'); +SELECT * FROM check_faces('RM(4)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); + +-- Heal faces 1 and 9 -- should drop them and create a new face +-- New face has the same mbr as old one +SELECT 'RM(26)', topology.ST_RemEdgeModFace('city_data', 26); +SELECT * FROM check_nodes('RM(26)/nodes'); +SELECT * FROM check_edges('RM(26)/edges'); +SELECT * FROM check_faces('RM(26)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); + +-- Heal faces 3 and 6 -- should drop them and create a new face +-- New face has a mbr being the union of the dropped faces +SELECT 'RM(9)', topology.ST_RemEdgeModFace('city_data', 9); +SELECT * FROM check_nodes('RM(9)/nodes'); +SELECT * FROM check_edges('RM(9)/edges'); +SELECT * FROM check_faces('RM(9)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); + +-- Heal faces 4 and 11 -- should drop them and create a new face +-- New face has a mbr being the union of the dropped faces +SELECT 'RM(19)', topology.ST_RemEdgeModFace('city_data', 19); +SELECT * FROM check_nodes('RM(19)/nodes'); +SELECT * FROM check_edges('RM(19)/edges'); +SELECT * FROM check_faces('RM(19)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); + +-- Heal faces 7 and 12 -- should drop them and create a new face +-- New face has a mbr equal to previous face 12. +-- This healing leaves edge 20 dangling +SELECT 'RM(10)', topology.ST_RemEdgeModFace('city_data', 10); +SELECT * FROM check_nodes('RM(10)/nodes'); +SELECT * FROM check_edges('RM(10)/edges'); +SELECT * FROM check_faces('RM(10)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); + +-- Drop dangling edge, no faces change +SELECT 'RM(20)', topology.ST_RemEdgeModFace('city_data', 20); +SELECT * FROM check_nodes('RM(20)/nodes'); +SELECT * FROM check_edges('RM(20)/edges'); +SELECT * FROM check_faces('RM(20)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); + +-- Universe flooding existing face +SELECT 'RM(15)', topology.ST_RemEdgeModFace('city_data', 15); +SELECT * FROM check_nodes('RM(15)/nodes'); +SELECT * FROM check_edges('RM(15)/edges'); +SELECT * FROM check_faces('RM(15)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); + + +-- Universe flooding existing single-edge (closed) face +-- with dangling edge starting from the closing node and +-- going inside. +-- Closed edge is in CW order. +SELECT 'RM(2)', topology.ST_RemEdgeModFace('city_data', 2); +SELECT * FROM check_nodes('RM(2)/nodes'); +SELECT * FROM check_edges('RM(2)/edges'); +SELECT * FROM check_faces('RM(2)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); + +-- Universe flooding existing single-edge (closed) face +-- with dangling edge coming from inside and ending to the closing node +-- Closed edge is in CW order. +-- Requires reconstructing the outer ring +SELECT 'NE(27)', topology.ST_AddEdgeNewFaces('city_data', 3, 3, 'SRID=4326;LINESTRING(25 35, 30 27, 20 27, 25 35)'); +SELECT * FROM check_nodes('NE(27)/nodes'); +SELECT * FROM check_edges('NE(27)/edges'); +SELECT * FROM check_faces('NE(27)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); +-- Here's the removal +SELECT 'RM(27)', topology.ST_RemEdgeModFace('city_data', 27); +SELECT * FROM check_nodes('RM(27)/nodes'); +SELECT * FROM check_edges('RM(27)/edges'); +SELECT * FROM check_faces('RM(27)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); + +-- Universe flooding existing single-edge (closed) face +-- with dangling edge coming from inside and ending to the closing node +-- Closed edge is in CCW order. +-- Requires reconstructing the outer ring +SELECT 'NE(28)', topology.ST_AddEdgeNewFaces('city_data', 3, 3, 'SRID=4326;LINESTRING(25 35, 20 27, 30 27, 25 35)'); +SELECT * FROM check_nodes('NE(28)/nodes'); +SELECT * FROM check_edges('NE(28)/edges'); +SELECT * FROM check_faces('NE(28)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); +-- Here's the removal +SELECT 'RM(28)', topology.ST_RemEdgeModFace('city_data', 28); +SELECT * FROM check_nodes('RM(28)/nodes'); +SELECT * FROM check_edges('RM(28)/edges'); +SELECT * FROM check_faces('RM(28)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); + +-- Universe flooding existing single-edge (closed) face +-- with dangling edge starting from closing node and going inside. +-- Closed edge is in CCW order. +-- Requires reconstructing the outer ring +SELECT 'NE(29)', topology.ST_AddEdgeNewFaces('city_data', 2, 2, 'SRID=4326;LINESTRING(25 30, 28 37, 22 37, 25 30)'); +SELECT * FROM check_nodes('NE(29)/nodes'); +SELECT * FROM check_edges('NE(29)/edges'); +SELECT * FROM check_faces('NE(29)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); +-- Here's the removal +SELECT 'RM(29)', topology.ST_RemEdgeModFace('city_data', 29); +SELECT * FROM check_nodes('RM(29)/nodes'); +SELECT * FROM check_edges('RM(29)/edges'); +SELECT * FROM check_faces('RM(29)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); + +-- Universe flooding existing single-edge (closed) face +-- with dangling edges both inside and outside +-- Closed edge in CW order. +-- Requires adding an edge and reconstructing the outer ring +SELECT 'NE(30)', topology.ST_AddEdgeNewFaces('city_data', 4, 3, 'SRID=4326;LINESTRING(20 37, 25 35)'); +SELECT 'NE(31)', topology.ST_AddEdgeNewFaces('city_data', 3, 3, 'SRID=4326;LINESTRING(25 35, 18 35, 18 40, 25 35)'); +SELECT * FROM check_nodes('NE(30,31)/nodes'); +SELECT * FROM check_edges('NE(30,31)/edges'); +SELECT * FROM check_faces('NE(30,31)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); +-- Here's the removal +SELECT 'RM(31)', topology.ST_RemEdgeModFace('city_data', 31); +SELECT * FROM check_nodes('RM(31)/nodes'); +SELECT * FROM check_edges('RM(31)/edges'); +SELECT * FROM check_faces('RM(31)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); + +-- Universe flooding existing single-edge (closed) face +-- with dangling edges both inside +-- Closed edge in CW order. +-- Requires reconstructing the outer ring +SELECT 'NE(32)', topology.ST_AddEdgeNewFaces('city_data', 3, 3, 'SRID=4326;LINESTRING(25 35, 18 35, 18 40, 28 40, 28 27, 18 27, 25 35)'); +SELECT * FROM check_nodes('NE(32)/nodes'); +SELECT * FROM check_edges('NE(32)/edges'); +SELECT * FROM check_faces('NE(32)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); +-- Here's the removal +SELECT 'RM(32)', topology.ST_RemEdgeModFace('city_data', 32); +SELECT * FROM check_nodes('RM(32)/nodes'); +SELECT * FROM check_edges('RM(32)/edges'); +SELECT * FROM check_faces('RM(32)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); + +-- Universe flooding existing single-edge (closed) face +-- with dangling edges both inside +-- Closed edge in CCW order. +-- Requires reconstructing the outer ring +SELECT 'NE(33)', topology.ST_AddEdgeNewFaces('city_data', 3, 3, + 'SRID=4326;LINESTRING(25 35,18 27,28 27,28 40,18 40,18 35,25 35)'); +SELECT * FROM check_nodes('NE(33)/nodes'); +SELECT * FROM check_edges('NE(33)/edges'); +SELECT * FROM check_faces('NE(33)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); +-- Here's the removal +SELECT 'RM(33)', topology.ST_RemEdgeModFace('city_data', 33); +SELECT * FROM check_nodes('RM(33)/nodes'); +SELECT * FROM check_edges('RM(33)/edges'); +SELECT * FROM check_faces('RM(33)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); + +-- Universe flooding existing single-edge (closed) face +-- with dangling edge starting from closing node and going outside. +-- Closed edge is in CW order. +-- Requires reconstructing the outer ring +SELECT 'NE(34)', topology.ST_AddEdgeNewFaces('city_data', 2, 2, + 'SRID=4326;LINESTRING(25 30, 28 27, 22 27, 25 30)'); +SELECT * FROM check_nodes('NE(34)/nodes'); +SELECT * FROM check_edges('NE(34)/edges'); +SELECT * FROM check_faces('NE(34)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); +-- Here's the removal +SELECT 'RM(34)', topology.ST_RemEdgeModFace('city_data', 34); +SELECT * FROM check_nodes('RM(34)/nodes'); +SELECT * FROM check_edges('RM(34)/edges'); +SELECT * FROM check_faces('RM(34)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); + +-- Universe flooding existing single-edge (closed) face +-- with dangling edge starting from closing node and going outside. +-- Closed edge is in CCW order. +-- Requires reconstructing the outer ring +SELECT 'NE(35)', topology.ST_AddEdgeNewFaces('city_data', 2, 2, + 'SRID=4326;LINESTRING(25 30,22 27,28 27,25 30)' +); +SELECT * FROM check_nodes('NE(35)/nodes'); +SELECT * FROM check_edges('NE(35)/edges'); +SELECT * FROM check_faces('NE(35)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); +-- Here's the removal +SELECT 'RM(35)', topology.ST_RemEdgeModFace('city_data', 35); +SELECT * FROM check_nodes('RM(35)/nodes'); +SELECT * FROM check_edges('RM(35)/edges'); +SELECT * FROM check_faces('RM(35)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); + +SELECT topology.DropTopology('city_data'); + + +------------------------------------------------------------------------- +-- Now test in presence of features +------------------------------------------------------------------------- +-- { + +-- Import city_data +\i load_topology.sql +\i load_features.sql +\i cache_geometries.sql + +-- A city_street is defined by edge 3, can't drop +SELECT '*RM(3)', topology.ST_RemEdgeModFace('city_data', 3); +-- A city_street is defined by edge 4 and 5, can't drop any of the two +SELECT '*RM(4)', topology.ST_RemEdgeModFace('city_data', 4); +SELECT '*RM(5)', topology.ST_RemEdgeModFace('city_data', 5); + +-- Two land_parcels (P2 and P3) are defined by either face +-- 5 but not face 4 or by face 4 but not face 5, so we can't heal +-- the faces by dropping edge 17 +SELECT '*RM(17)', topology.ST_RemEdgeModFace('city_data', 17); + +-- Dropping edge 11 is fine as it heals faces 5 and 8, which +-- only serve definition of land_parcel P3 which contains both +SELECT 'RM(11)', 'relations_before:', count(*) FROM city_data.relation; +SELECT 'RM(11)', topology.ST_RemEdgeModFace('city_data', 11); +SELECT 'RM(11)', 'relations_after:', count(*) FROM city_data.relation; + +-- Land parcel P3 is now defined by face 8, so we can't drop +-- any edge which would destroy that face. +SELECT '*RM(8)', topology.ST_RemEdgeModFace('city_data', 8); -- face_right=8 +SELECT '*RM(15)', topology.ST_RemEdgeModFace('city_data', 15); -- face_left=8 + +-- Check that no land_parcel objects had topology changed +SELECT 'RM(11)', feature_name, + ST_Equals( ST_Multi(feature::geometry), ST_Multi(the_geom) ) as unchanged + FROM features.land_parcels; + +SELECT topology.DropTopology('city_data'); +DROP SCHEMA features CASCADE; + +-- } +------------------------------------------------------------------------- +------------------------------------------------------------------------- +------------------------------------------------------------------------- + +-- clean up +DROP FUNCTION save_edges(); +DROP FUNCTION check_edges(text); +DROP FUNCTION save_faces(); +DROP FUNCTION check_faces(text); +DROP FUNCTION save_nodes(); +DROP FUNCTION check_nodes(text); +DELETE FROM spatial_ref_sys where srid = 4326; + + diff -Nru postgis-1.5.3/topology/test/regress/st_remedgemodface_expected postgis-2.0.1/topology/test/regress/st_remedgemodface_expected --- postgis-1.5.3/topology/test/regress/st_remedgemodface_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/st_remedgemodface_expected 2012-04-11 19:17:49.000000000 +0000 @@ -0,0 +1,213 @@ +BEGIN +t +9 +22 +26 +COMMIT +ERROR: SQL/MM Spatial exception - null argument +ERROR: SQL/MM Spatial exception - null argument +ERROR: SQL/MM Spatial exception - invalid topology name +ERROR: SQL/MM Spatial exception - non-existent edge 0 +ERROR: SQL/MM Spatial exception - non-existent edge 143 +RM(25)|1 +RM(25)/nodes|+|21|1 +RM(25)/nodes|-|21| +RM(25)/nodes|+|22|1 +RM(25)/nodes|-|22| +RM(25)/edges|-|25|-25|25|1|1 +RM(4)|0 +RM(4)/nodes|+|5|0 +RM(4)/nodes|-|5| +RM(4)/edges|-|4|-5|4|0|0 +RM(4)/edges|+|5|-5|5|0|0 +RM(4)/edges|-|5|-4|5|0|0 +RM(26)|1 +RM(26)/nodes|+|20|1 +RM(26)/nodes|-|20| +RM(26)/edges|-|26|26|-26|9|1 +RM(26)/faces|-|9|SRID=4326;POLYGON((4 31,4 34,7 34,7 31,4 31)) +RM(9)|6 +RM(9)/edges|+|6|7|-21|0|6 +RM(9)/edges|-|6|7|-21|0|3 +RM(9)/edges|-|9|19|-22|3|6 +RM(9)/edges|+|19|-6|-10|6|4 +RM(9)/edges|-|19|-6|-10|3|4 +RM(9)/edges|+|20|19|13|6|7 +RM(9)/edges|-|20|-9|13|6|7 +RM(9)/edges|+|21|6|-22|0|6 +RM(9)/edges|-|21|6|9|0|3 +RM(9)/faces|-|3|SRID=4326;POLYGON((9 14,9 22,21 22,21 14,9 14)) +RM(9)/faces|+|6|SRID=4326;POLYGON((9 6,9 22,21 22,21 6,9 6)) +RM(9)/faces|-|6|SRID=4326;POLYGON((9 6,9 14,21 14,21 6,9 6)) +RM(19)|4 +RM(19)/edges|+|6|7|-21|0|4 +RM(19)/edges|-|6|7|-21|0|6 +RM(19)/edges|+|7|8|-6|0|4 +RM(19)/edges|-|7|8|-19|0|4 +RM(19)/edges|+|12|20|22|4|0 +RM(19)/edges|-|12|20|22|6|0 +RM(19)/edges|-|19|-6|-10|6|4 +RM(19)/edges|+|20|-10|13|4|7 +RM(19)/edges|-|20|19|13|6|7 +RM(19)/edges|+|21|6|-22|0|4 +RM(19)/edges|-|21|6|-22|0|6 +RM(19)/edges|+|22|21|12|0|4 +RM(19)/edges|-|22|21|12|0|6 +RM(19)/faces|+|4|SRID=4326;POLYGON((9 6,9 22,35 22,35 6,9 6)) +RM(19)/faces|-|4|SRID=4326;POLYGON((21 14,21 22,35 22,35 14,21 14)) +RM(19)/faces|-|6|SRID=4326;POLYGON((9 6,9 22,21 22,21 6,9 6)) +RM(10)|4 +RM(10)/edges|-|10|-20|17|7|4 +RM(10)/edges|+|13|18|-12|4|0 +RM(10)/edges|-|13|18|-12|7|0 +RM(10)/edges|+|18|17|14|4|8 +RM(10)/edges|-|18|10|14|7|8 +RM(10)/edges|+|20|-20|13|4|4 +RM(10)/edges|-|20|-10|13|4|7 +RM(10)/faces|-|7|SRID=4326;POLYGON((21 6,21 14,35 14,35 6,21 6)) +RM(20)|4 +RM(20)/nodes|+|14|4 +RM(20)/nodes|-|14| +RM(20)/edges|+|12|13|22|4|0 +RM(20)/edges|-|12|20|22|4|0 +RM(20)/edges|-|20|-20|13|4|4 +RM(15)|0 +RM(15)/edges|+|8|-8|-17|0|0 +RM(15)/edges|-|8|-15|-17|0|5 +RM(15)/edges|+|11|-16|-18|0|8 +RM(15)/edges|-|11|15|-18|5|8 +RM(15)/edges|-|15|-8|-16|5|0 +RM(15)/edges|+|17|-7|11|4|0 +RM(15)/edges|-|17|-7|11|4|5 +RM(15)/faces|-|5|SRID=4326;POLYGON((35 14,35 22,47 22,47 14,35 14)) +RM(2)|0 +RM(2)/nodes|+|4|0 +RM(2)/nodes|-|4|2 +RM(2)/edges|-|2|3|-2|2|0 +RM(2)/edges|+|3|-3|3|0|0 +RM(2)/edges|-|3|-3|2|2|2 +RM(2)/faces|-|2|SRID=4326;POLYGON((17 30,17 40,31 40,31 30,17 30)) +NE(27)|27 +NE(27)/edges|+|3|-27|3|10|10 +NE(27)/edges|-|3|-3|3|0|0 +NE(27)/edges|+|27|27|-3|0|10 +NE(27)/faces|+|10|SRID=4326;POLYGON((20 27,20 35,30 35,30 27,20 27)) +RM(27)|0 +RM(27)/edges|+|3|-3|3|0|0 +RM(27)/edges|-|3|-27|3|10|10 +RM(27)/edges|-|27|27|-3|0|10 +RM(27)/faces|-|10|SRID=4326;POLYGON((20 27,20 35,30 35,30 27,20 27)) +NE(28)|28 +NE(28)/edges|+|3|28|3|11|11 +NE(28)/edges|-|3|-3|3|0|0 +NE(28)/edges|+|28|-3|-28|11|0 +NE(28)/faces|+|11|SRID=4326;POLYGON((20 27,20 35,30 35,30 27,20 27)) +RM(28)|0 +RM(28)/edges|+|3|-3|3|0|0 +RM(28)/edges|-|3|28|3|11|11 +RM(28)/edges|-|28|-3|-28|11|0 +RM(28)/faces|-|11|SRID=4326;POLYGON((20 27,20 35,30 35,30 27,20 27)) +NE(29)|29 +NE(29)/edges|+|3|-3|29|12|12 +NE(29)/edges|-|3|-3|3|0|0 +NE(29)/edges|+|29|3|-29|12|0 +NE(29)/faces|+|12|SRID=4326;POLYGON((22 30,22 37,28 37,28 30,22 30)) +RM(29)|0 +RM(29)/edges|+|3|-3|3|0|0 +RM(29)/edges|-|3|-3|29|12|12 +RM(29)/edges|-|29|3|-29|12|0 +RM(29)/faces|-|12|SRID=4326;POLYGON((22 30,22 37,28 37,28 30,22 30)) +NE(30)|30 +NE(31)|31 +NE(30,31)/nodes|+|4| +NE(30,31)/nodes|-|4|0 +NE(30,31)/edges|+|3|31|3|0|0 +NE(30,31)/edges|-|3|-3|3|0|0 +NE(30,31)/edges|+|30|-31|30|13|13 +NE(30,31)/edges|+|31|-3|-30|0|13 +NE(30,31)/faces|+|13|SRID=4326;POLYGON((18 35,18 40,25 40,25 35,18 35)) +RM(31)|0 +RM(31)/edges|+|3|-30|3|0|0 +RM(31)/edges|-|3|31|3|0|0 +RM(31)/edges|+|30|-3|30|0|0 +RM(31)/edges|-|30|-31|30|13|13 +RM(31)/edges|-|31|-3|-30|0|13 +RM(31)/faces|-|13|SRID=4326;POLYGON((18 35,18 40,25 40,25 35,18 35)) +NE(32)|32 +NE(32)/edges|+|3|-32|3|14|14 +NE(32)/edges|-|3|-30|3|0|0 +NE(32)/edges|+|30|-3|30|14|14 +NE(32)/edges|-|30|-3|30|0|0 +NE(32)/edges|+|32|32|-30|0|14 +NE(32)/faces|+|14|SRID=4326;POLYGON((18 27,18 40,28 40,28 27,18 27)) +RM(32)|0 +RM(32)/edges|+|3|-30|3|0|0 +RM(32)/edges|-|3|-32|3|14|14 +RM(32)/edges|+|30|-3|30|0|0 +RM(32)/edges|-|30|-3|30|14|14 +RM(32)/edges|-|32|32|-30|0|14 +RM(32)/faces|-|14|SRID=4326;POLYGON((18 27,18 40,28 40,28 27,18 27)) +NE(33)|33 +NE(33)/edges|+|3|33|3|15|15 +NE(33)/edges|-|3|-30|3|0|0 +NE(33)/edges|+|30|-3|30|15|15 +NE(33)/edges|-|30|-3|30|0|0 +NE(33)/edges|+|33|-30|-33|15|0 +NE(33)/faces|+|15|SRID=4326;POLYGON((18 27,18 40,28 40,28 27,18 27)) +RM(33)|0 +RM(33)/edges|+|3|-30|3|0|0 +RM(33)/edges|-|3|33|3|15|15 +RM(33)/edges|+|30|-3|30|0|0 +RM(33)/edges|-|30|-3|30|15|15 +RM(33)/edges|-|33|-30|-33|15|0 +RM(33)/faces|-|15|SRID=4326;POLYGON((18 27,18 40,28 40,28 27,18 27)) +NE(34)|34 +NE(34)/edges|+|3|-30|34|0|0 +NE(34)/edges|-|3|-30|3|0|0 +NE(34)/edges|+|34|3|-34|0|16 +NE(34)/faces|+|16|SRID=4326;POLYGON((22 27,22 30,28 30,28 27,22 27)) +RM(34)|0 +RM(34)/edges|+|3|-30|3|0|0 +RM(34)/edges|-|3|-30|34|0|0 +RM(34)/edges|-|34|3|-34|0|16 +RM(34)/faces|-|16|SRID=4326;POLYGON((22 27,22 30,28 30,28 27,22 27)) +NE(35)|35 +NE(35)/edges|+|3|-30|-35|0|0 +NE(35)/edges|-|3|-30|3|0|0 +NE(35)/edges|+|35|35|3|17|0 +NE(35)/faces|+|17|SRID=4326;POLYGON((22 27,22 30,28 30,28 27,22 27)) +RM(35)|0 +RM(35)/edges|+|3|-30|3|0|0 +RM(35)/edges|-|3|-30|-35|0|0 +RM(35)/edges|-|35|35|3|17|0 +RM(35)/faces|-|17|SRID=4326;POLYGON((22 27,22 30,28 30,28 27,22 27)) +Topology 'city_data' dropped +BEGIN +t +9 +22 +26 +COMMIT +BEGIN +1 +2 +3 +COMMIT +features.land_parcels.the_geom SRID:0 TYPE:MULTIPOLYGON DIMS:2 +features.city_streets.the_geom SRID:0 TYPE:MULTILINESTRING DIMS:2 +features.traffic_signs.the_geom SRID:0 TYPE:MULTIPOINT DIMS:2 +ERROR: TopoGeom 4 in layer 3 (features.city_streets.feature) cannot be represented dropping edge 3 +ERROR: TopoGeom 2 in layer 3 (features.city_streets.feature) cannot be represented dropping edge 4 +ERROR: TopoGeom 2 in layer 3 (features.city_streets.feature) cannot be represented dropping edge 5 +ERROR: TopoGeom 2 in layer 1 (features.land_parcels.feature) cannot be represented healing faces 5 and 4 +RM(11)|relations_before:|18 +RM(11)|8 +RM(11)|relations_after:|17 +ERROR: TopoGeom 3 in layer 1 (features.land_parcels.feature) cannot be represented healing faces 8 and 0 +ERROR: TopoGeom 3 in layer 1 (features.land_parcels.feature) cannot be represented healing faces 0 and 8 +RM(11)|P1|t +RM(11)|P2|t +RM(11)|P3|t +RM(11)|P4|t +RM(11)|P5|t +Topology 'city_data' dropped diff -Nru postgis-1.5.3/topology/test/regress/st_remedgenewface.sql postgis-2.0.1/topology/test/regress/st_remedgenewface.sql --- postgis-1.5.3/topology/test/regress/st_remedgenewface.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/st_remedgenewface.sql 2012-04-11 19:17:49.000000000 +0000 @@ -0,0 +1,421 @@ +\set VERBOSITY terse +set client_min_messages to ERROR; + +INSERT INTO spatial_ref_sys ( auth_name, auth_srid, srid, proj4text ) VALUES ( 'EPSG', 4326, 4326, '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs' ); + + +-- Import city_data +\i load_topology-4326.sql + +-- Utility functions for the test { + +CREATE OR REPLACE FUNCTION save_nodes() +RETURNS VOID +AS $$ +BEGIN + DROP TABLE IF EXISTS city_data.orig_node_summary; + CREATE TABLE city_data.orig_node_summary + AS SELECT node_id, + containing_face + FROM city_data.node; +END; +$$ LANGUAGE 'plpgsql'; + +CREATE OR REPLACE FUNCTION check_nodes(lbl text) +RETURNS TABLE (l text, o text, node_id int, + containing_face int) +AS $$ +DECLARE + sql1 text; + sql2 text; + q text; +BEGIN + sql1 := 'node_id, + containing_face + FROM city_data.node'; + sql2 := 'node_id, containing_face + FROM city_data.orig_node_summary'; + + q := '(' || + 'SELECT ' || quote_literal(lbl) || ',''+'' as op,' || sql1 || + ' EXCEPT ' || + 'SELECT ' || quote_literal(lbl) || ',''+'',' || sql2 || + ') UNION ( ' || + 'SELECT ' || quote_literal(lbl) || ',''-'',' || sql2 || + ' EXCEPT ' || + 'SELECT ' || quote_literal(lbl) || ',''-'',' || sql1 || + ') ORDER BY node_id, op'; + + RAISE DEBUG '%', q; + + RETURN QUERY EXECUTE q; + +END +$$ LANGUAGE 'plpgsql'; + +CREATE OR REPLACE FUNCTION save_edges() +RETURNS VOID +AS $$ +BEGIN + DROP TABLE IF EXISTS city_data.orig_edge_summary; + CREATE TABLE city_data.orig_edge_summary AS + SELECT edge_id, + next_left_edge, next_right_edge, left_face, right_face + FROM city_data.edge_data; +END; +$$ LANGUAGE 'plpgsql'; + +CREATE OR REPLACE FUNCTION check_edges(lbl text) +RETURNS TABLE (l text, o text, edge_id int, + next_left_edge int, next_right_edge int, + left_face int, right_face int) +AS $$ +DECLARE + rec RECORD; + sql1 text; + sql2 text; + q text; +BEGIN + sql1 := 'edge_id, + next_left_edge, next_right_edge, left_face, right_face + FROM city_data.edge_data'; + sql2 := 'edge_id, + next_left_edge, next_right_edge, left_face, right_face + FROM city_data.orig_edge_summary'; + + q := '(' || + 'SELECT ' || quote_literal(lbl) || ',''+'' as op,' || sql1 || + ' EXCEPT ' || + 'SELECT ' || quote_literal(lbl) || ',''+'',' || sql2 || + ') UNION ( ' || + 'SELECT ' || quote_literal(lbl) || ',''-'',' || sql2 || + ' EXCEPT ' || + 'SELECT ' || quote_literal(lbl) || ',''-'',' || sql1 || + ') order by edge_id, op'; + + RAISE DEBUG '%', q; + + RETURN QUERY EXECUTE q; + +END +$$ LANGUAGE 'plpgsql'; + +CREATE OR REPLACE FUNCTION save_faces() +RETURNS VOID +AS $$ +BEGIN + DROP TABLE IF EXISTS city_data.orig_face_summary; + CREATE TABLE city_data.orig_face_summary AS + SELECT face_id, mbr + FROM city_data.face; +END; +$$ LANGUAGE 'plpgsql'; + +CREATE OR REPLACE FUNCTION check_faces(lbl text) +RETURNS TABLE (l text, o text, face_id int, mbr text) +AS $$ +DECLARE + sql1 text; + sql2 text; + q text; +BEGIN + sql1 := 'face_id, ST_AsEWKT(mbr) FROM city_data.face'; + sql2 := 'face_id, ST_AsEWKT(mbr) FROM city_data.orig_face_summary'; + + q := '(' || + 'SELECT ' || quote_literal(lbl) || ',''+'' as op,' || sql1 || + ' EXCEPT ' || + 'SELECT ' || quote_literal(lbl) || ',''+'',' || sql2 || + ') UNION ( ' || + 'SELECT ' || quote_literal(lbl) || ',''-'',' || sql2 || + ' EXCEPT ' || + 'SELECT ' || quote_literal(lbl) || ',''-'',' || sql1 || + ') ORDER BY face_id, op'; + + RAISE DEBUG '%', q; + + RETURN QUERY EXECUTE q; + +END +$$ language 'plpgsql'; + +-- } + +-- Save current state +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); + +-- Bogus calls -- { +SELECT topology.ST_RemEdgeNewFace('city_data', null); +SELECT topology.ST_RemEdgeNewFace(null, 1); +SELECT topology.ST_RemEdgeNewFace('', 1); +SELECT topology.ST_RemEdgeNewFace('city_data', 0); -- non-existent +SELECT topology.ST_RemEdgeNewFace('city_data', 143); -- non-existent +SELECT * FROM check_nodes('bogus'); +SELECT * FROM check_edges('bogus'); +SELECT * FROM check_faces('bogus'); +-- } + + +-- Remove isolated edge +SELECT 'RN(25)', topology.ST_RemEdgeNewFace('city_data', 25); +SELECT * FROM check_nodes('RN(25)/nodes'); +SELECT * FROM check_edges('RN(25)/edges'); +SELECT * FROM check_faces('RN(25)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); + +-- Remove edge not forming a ring +SELECT 'RN(4)', topology.ST_RemEdgeNewFace('city_data', 4); +SELECT * FROM check_nodes('RN(4)/nodes'); +SELECT * FROM check_edges('RN(4)/edges'); +SELECT * FROM check_faces('RN(4)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); + +-- Heal faces 1 and 9 -- should drop them and create a new face +-- New face has the same mbr as old one +SELECT 'RN(26)', topology.ST_RemEdgeNewFace('city_data', 26); +SELECT * FROM check_nodes('RN(26)/nodes'); +SELECT * FROM check_edges('RN(26)/edges'); +SELECT * FROM check_faces('RN(26)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); + +-- Heal faces 3 and 6 -- should drop them and create a new face +-- New face has a mbr being the union of the dropped faces +SELECT 'RN(9)', topology.ST_RemEdgeNewFace('city_data', 9); +SELECT * FROM check_nodes('RN(9)/nodes'); +SELECT * FROM check_edges('RN(9)/edges'); +SELECT * FROM check_faces('RN(9)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); + +-- Heal faces 4 and 11 -- should drop them and create a new face +-- New face has a mbr being the union of the dropped faces +SELECT 'RN(19)', topology.ST_RemEdgeNewFace('city_data', 19); +SELECT * FROM check_nodes('RN(19)/nodes'); +SELECT * FROM check_edges('RN(19)/edges'); +SELECT * FROM check_faces('RN(19)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); + +-- Heal faces 7 and 12 -- should drop them and create a new face +-- New face has a mbr equal to previous face 12. +-- This healing leaves edge 20 dangling +SELECT 'RN(10)', topology.ST_RemEdgeNewFace('city_data', 10); +SELECT * FROM check_nodes('RN(10)/nodes'); +SELECT * FROM check_edges('RN(10)/edges'); +SELECT * FROM check_faces('RN(10)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); + +-- Drop dangling edge, no faces change +SELECT 'RN(20)', topology.ST_RemEdgeNewFace('city_data', 20); +SELECT * FROM check_nodes('RN(20)/nodes'); +SELECT * FROM check_edges('RN(20)/edges'); +SELECT * FROM check_faces('RN(20)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); + +-- Universe flooding existing face +SELECT 'RN(15)', topology.ST_RemEdgeNewFace('city_data', 15); +SELECT * FROM check_nodes('RN(15)/nodes'); +SELECT * FROM check_edges('RN(15)/edges'); +SELECT * FROM check_faces('RN(15)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); + + +-- Universe flooding existing single-edge (closed) face +-- with dangling edge starting from the closing node and +-- going inside. +-- Closed edge is in CW order. +SELECT 'RN(2)', topology.ST_RemEdgeNewFace('city_data', 2); +SELECT * FROM check_nodes('RN(2)/nodes'); +SELECT * FROM check_edges('RN(2)/edges'); +SELECT * FROM check_faces('RN(2)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); + +-- Universe flooding existing single-edge (closed) face +-- with dangling edge coming from inside and ending to the closing node +-- Closed edge is in CW order. +-- Requires reconstructing the outer ring +SELECT 'NE(27)', topology.ST_AddEdgeNewFaces('city_data', 3, 3, 'SRID=4326;LINESTRING(25 35, 30 27, 20 27, 25 35)'); +SELECT * FROM check_nodes('NE(27)/nodes'); +SELECT * FROM check_edges('NE(27)/edges'); +SELECT * FROM check_faces('NE(27)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); +-- Here's the removal +SELECT 'RN(27)', topology.ST_RemEdgeNewFace('city_data', 27); +SELECT * FROM check_nodes('RN(27)/nodes'); +SELECT * FROM check_edges('RN(27)/edges'); +SELECT * FROM check_faces('RN(27)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); + +-- Universe flooding existing single-edge (closed) face +-- with dangling edge coming from inside and ending to the closing node +-- Closed edge is in CCW order. +-- Requires reconstructing the outer ring +SELECT 'NE(28)', topology.ST_AddEdgeNewFaces('city_data', 3, 3, 'SRID=4326;LINESTRING(25 35, 20 27, 30 27, 25 35)'); +SELECT * FROM check_nodes('NE(28)/nodes'); +SELECT * FROM check_edges('NE(28)/edges'); +SELECT * FROM check_faces('NE(28)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); +-- Here's the removal +SELECT 'RN(28)', topology.ST_RemEdgeNewFace('city_data', 28); +SELECT * FROM check_nodes('RN(28)/nodes'); +SELECT * FROM check_edges('RN(28)/edges'); +SELECT * FROM check_faces('RN(28)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); + +-- Universe flooding existing single-edge (closed) face +-- with dangling edge starting from closing node and going inside. +-- Closed edge is in CCW order. +-- Requires reconstructing the outer ring +SELECT 'NE(29)', topology.ST_AddEdgeNewFaces('city_data', 2, 2, 'SRID=4326;LINESTRING(25 30, 28 37, 22 37, 25 30)'); +SELECT * FROM check_nodes('NE(29)/nodes'); +SELECT * FROM check_edges('NE(29)/edges'); +SELECT * FROM check_faces('NE(29)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); +-- Here's the removal +SELECT 'RN(29)', topology.ST_RemEdgeNewFace('city_data', 29); +SELECT * FROM check_nodes('RN(29)/nodes'); +SELECT * FROM check_edges('RN(29)/edges'); +SELECT * FROM check_faces('RN(29)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); + +-- Universe flooding existing single-edge (closed) face +-- with dangling edges both inside and outside +-- Closed edge in CW order. +-- Requires adding an edge and reconstructing the outer ring +SELECT 'NE(30)', topology.ST_AddEdgeNewFaces('city_data', 4, 3, 'SRID=4326;LINESTRING(20 37, 25 35)'); +SELECT 'NE(31)', topology.ST_AddEdgeNewFaces('city_data', 3, 3, 'SRID=4326;LINESTRING(25 35, 18 35, 18 40, 25 35)'); +SELECT * FROM check_nodes('NE(30,31)/nodes'); +SELECT * FROM check_edges('NE(30,31)/edges'); +SELECT * FROM check_faces('NE(30,31)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); +-- Here's the removal +SELECT 'RN(31)', topology.ST_RemEdgeNewFace('city_data', 31); +SELECT * FROM check_nodes('RN(31)/nodes'); +SELECT * FROM check_edges('RN(31)/edges'); +SELECT * FROM check_faces('RN(31)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); + +-- Universe flooding existing single-edge (closed) face +-- with dangling edges both inside +-- Closed edge in CW order. +-- Requires reconstructing the outer ring +SELECT 'NE(32)', topology.ST_AddEdgeNewFaces('city_data', 3, 3, 'SRID=4326;LINESTRING(25 35, 18 35, 18 40, 28 40, 28 27, 18 27, 25 35)'); +SELECT * FROM check_nodes('NE(32)/nodes'); +SELECT * FROM check_edges('NE(32)/edges'); +SELECT * FROM check_faces('NE(32)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); +-- Here's the removal +SELECT 'RN(32)', topology.ST_RemEdgeNewFace('city_data', 32); +SELECT * FROM check_nodes('RN(32)/nodes'); +SELECT * FROM check_edges('RN(32)/edges'); +SELECT * FROM check_faces('RN(32)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); + +-- Universe flooding existing single-edge (closed) face +-- with dangling edges both inside +-- Closed edge in CCW order. +-- Requires reconstructing the outer ring +SELECT 'NE(33)', topology.ST_AddEdgeNewFaces('city_data', 3, 3, + 'SRID=4326;LINESTRING(25 35,18 27,28 27,28 40,18 40,18 35,25 35)'); +SELECT * FROM check_nodes('NE(33)/nodes'); +SELECT * FROM check_edges('NE(33)/edges'); +SELECT * FROM check_faces('NE(33)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); +-- Here's the removal +SELECT 'RN(33)', topology.ST_RemEdgeNewFace('city_data', 33); +SELECT * FROM check_nodes('RN(33)/nodes'); +SELECT * FROM check_edges('RN(33)/edges'); +SELECT * FROM check_faces('RN(33)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); + +-- Universe flooding existing single-edge (closed) face +-- with dangling edge starting from closing node and going outside. +-- Closed edge is in CW order. +-- Requires reconstructing the outer ring +SELECT 'NE(34)', topology.ST_AddEdgeNewFaces('city_data', 2, 2, + 'SRID=4326;LINESTRING(25 30, 28 27, 22 27, 25 30)'); +SELECT * FROM check_nodes('NE(34)/nodes'); +SELECT * FROM check_edges('NE(34)/edges'); +SELECT * FROM check_faces('NE(34)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); +-- Here's the removal +SELECT 'RN(34)', topology.ST_RemEdgeNewFace('city_data', 34); +SELECT * FROM check_nodes('RN(34)/nodes'); +SELECT * FROM check_edges('RN(34)/edges'); +SELECT * FROM check_faces('RN(34)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); + +-- Universe flooding existing single-edge (closed) face +-- with dangling edge starting from closing node and going outside. +-- Closed edge is in CCW order. +-- Requires reconstructing the outer ring +SELECT 'NE(35)', topology.ST_AddEdgeNewFaces('city_data', 2, 2, + 'SRID=4326;LINESTRING(25 30,22 27,28 27,25 30)' +); +SELECT * FROM check_nodes('NE(35)/nodes'); +SELECT * FROM check_edges('NE(35)/edges'); +SELECT * FROM check_faces('NE(35)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); +-- Here's the removal +SELECT 'RN(35)', topology.ST_RemEdgeNewFace('city_data', 35); +SELECT * FROM check_nodes('RN(35)/nodes'); +SELECT * FROM check_edges('RN(35)/edges'); +SELECT * FROM check_faces('RN(35)/faces'); +SELECT save_edges(); SELECT save_faces(); SELECT save_nodes(); + +SELECT topology.DropTopology('city_data'); + + +------------------------------------------------------------------------- +-- Now test in presence of features +------------------------------------------------------------------------- +-- { + +-- Import city_data +\i load_topology.sql +\i load_features.sql +\i cache_geometries.sql + +-- A city_street is defined by edge 3, can't drop +SELECT '*RN(3)', topology.ST_RemEdgeNewFace('city_data', 3); +-- A city_street is defined by edge 4 and 5, can't drop any of the two +SELECT '*RN(4)', topology.ST_RemEdgeNewFace('city_data', 4); +SELECT '*RN(5)', topology.ST_RemEdgeNewFace('city_data', 5); + +-- Two land_parcels (P2 and P3) are defined by either face +-- 5 but not face 4 or by face 4 but not face 5, so we can't heal +-- the faces by dropping edge 17 +SELECT '*RN(17)', topology.ST_RemEdgeNewFace('city_data', 17); + +-- Dropping edge 11 is fine as it heals faces 5 and 8, which +-- only serve definition of land_parcel P3 which contains both +SELECT 'RN(11)', 'relations_before:', count(*) FROM city_data.relation; +SELECT 'RN(11)', topology.ST_RemEdgeNewFace('city_data', 11); +SELECT 'RN(11)', 'relations_after:', count(*) FROM city_data.relation; + +-- Land parcel P3 is now defined by face 10, so we can't drop +-- any edge which would destroy that face. +SELECT '*RM(8)', topology.ST_RemEdgeModFace('city_data', 8); -- face_right=10 +SELECT '*RM(15)', topology.ST_RemEdgeModFace('city_data', 15); -- face_left=10 + +-- Check that no land_parcel objects had topology changed +SELECT 'RN(11)', feature_name, + ST_Equals( ST_Multi(feature::geometry), ST_Multi(the_geom) ) as unchanged + FROM features.land_parcels; + +SELECT topology.DropTopology('city_data'); +DROP SCHEMA features CASCADE; + +-- } +------------------------------------------------------------------------- +------------------------------------------------------------------------- +------------------------------------------------------------------------- + +-- clean up +DROP FUNCTION save_edges(); +DROP FUNCTION check_edges(text); +DROP FUNCTION save_faces(); +DROP FUNCTION check_faces(text); +DROP FUNCTION save_nodes(); +DROP FUNCTION check_nodes(text); +DELETE FROM spatial_ref_sys where srid = 4326; + + diff -Nru postgis-1.5.3/topology/test/regress/st_remedgenewface_expected postgis-2.0.1/topology/test/regress/st_remedgenewface_expected --- postgis-1.5.3/topology/test/regress/st_remedgenewface_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/st_remedgenewface_expected 2012-04-11 19:17:49.000000000 +0000 @@ -0,0 +1,243 @@ +BEGIN +t +9 +22 +26 +COMMIT +ERROR: SQL/MM Spatial exception - null argument +ERROR: SQL/MM Spatial exception - null argument +ERROR: SQL/MM Spatial exception - invalid topology name +ERROR: SQL/MM Spatial exception - non-existent edge 0 +ERROR: SQL/MM Spatial exception - non-existent edge 143 +RN(25)| +RN(25)/nodes|+|21|1 +RN(25)/nodes|-|21| +RN(25)/nodes|+|22|1 +RN(25)/nodes|-|22| +RN(25)/edges|-|25|-25|25|1|1 +RN(4)| +RN(4)/nodes|+|5|0 +RN(4)/nodes|-|5| +RN(4)/edges|-|4|-5|4|0|0 +RN(4)/edges|+|5|-5|5|0|0 +RN(4)/edges|-|5|-4|5|0|0 +RN(26)|10 +RN(26)/nodes|+|20|10 +RN(26)/nodes|-|20| +RN(26)/nodes|+|21|10 +RN(26)/nodes|-|21|1 +RN(26)/nodes|+|22|10 +RN(26)/nodes|-|22|1 +RN(26)/edges|+|1|1|-1|10|0 +RN(26)/edges|-|1|1|-1|1|0 +RN(26)/edges|-|26|26|-26|9|1 +RN(26)/faces|-|1|SRID=4326;POLYGON((3 30,3 38,16 38,16 30,3 30)) +RN(26)/faces|-|9|SRID=4326;POLYGON((4 31,4 34,7 34,7 31,4 31)) +RN(26)/faces|+|10|SRID=4326;POLYGON((3 30,3 38,16 38,16 30,3 30)) +RN(9)|11 +RN(9)/edges|+|6|7|-21|0|11 +RN(9)/edges|-|6|7|-21|0|3 +RN(9)/edges|-|9|19|-22|3|6 +RN(9)/edges|+|12|20|22|11|0 +RN(9)/edges|-|12|20|22|6|0 +RN(9)/edges|+|19|-6|-10|11|4 +RN(9)/edges|-|19|-6|-10|3|4 +RN(9)/edges|+|20|19|13|11|7 +RN(9)/edges|-|20|-9|13|6|7 +RN(9)/edges|+|21|6|-22|0|11 +RN(9)/edges|-|21|6|9|0|3 +RN(9)/edges|+|22|21|12|0|11 +RN(9)/edges|-|22|21|12|0|6 +RN(9)/faces|-|3|SRID=4326;POLYGON((9 14,9 22,21 22,21 14,9 14)) +RN(9)/faces|-|6|SRID=4326;POLYGON((9 6,9 14,21 14,21 6,9 6)) +RN(9)/faces|+|11|SRID=4326;POLYGON((9 6,9 22,21 22,21 6,9 6)) +RN(19)|12 +RN(19)/edges|+|6|7|-21|0|12 +RN(19)/edges|-|6|7|-21|0|11 +RN(19)/edges|+|7|8|-6|0|12 +RN(19)/edges|-|7|8|-19|0|4 +RN(19)/edges|+|10|-20|17|7|12 +RN(19)/edges|-|10|-20|17|7|4 +RN(19)/edges|+|12|20|22|12|0 +RN(19)/edges|-|12|20|22|11|0 +RN(19)/edges|+|17|-7|11|12|5 +RN(19)/edges|-|17|-7|11|4|5 +RN(19)/edges|-|19|-6|-10|11|4 +RN(19)/edges|+|20|-10|13|12|7 +RN(19)/edges|-|20|19|13|11|7 +RN(19)/edges|+|21|6|-22|0|12 +RN(19)/edges|-|21|6|-22|0|11 +RN(19)/edges|+|22|21|12|0|12 +RN(19)/edges|-|22|21|12|0|11 +RN(19)/faces|-|4|SRID=4326;POLYGON((21 14,21 22,35 22,35 14,21 14)) +RN(19)/faces|-|11|SRID=4326;POLYGON((9 6,9 22,21 22,21 6,9 6)) +RN(19)/faces|+|12|SRID=4326;POLYGON((9 6,9 22,35 22,35 6,9 6)) +RN(10)|13 +RN(10)/edges|+|6|7|-21|0|13 +RN(10)/edges|-|6|7|-21|0|12 +RN(10)/edges|+|7|8|-6|0|13 +RN(10)/edges|-|7|8|-6|0|12 +RN(10)/edges|-|10|-20|17|7|12 +RN(10)/edges|+|12|20|22|13|0 +RN(10)/edges|-|12|20|22|12|0 +RN(10)/edges|+|13|18|-12|13|0 +RN(10)/edges|-|13|18|-12|7|0 +RN(10)/edges|+|17|-7|11|13|5 +RN(10)/edges|-|17|-7|11|12|5 +RN(10)/edges|+|18|17|14|13|8 +RN(10)/edges|-|18|10|14|7|8 +RN(10)/edges|+|20|-20|13|13|13 +RN(10)/edges|-|20|-10|13|12|7 +RN(10)/edges|+|21|6|-22|0|13 +RN(10)/edges|-|21|6|-22|0|12 +RN(10)/edges|+|22|21|12|0|13 +RN(10)/edges|-|22|21|12|0|12 +RN(10)/faces|-|7|SRID=4326;POLYGON((21 6,21 14,35 14,35 6,21 6)) +RN(10)/faces|-|12|SRID=4326;POLYGON((9 6,9 22,35 22,35 6,9 6)) +RN(10)/faces|+|13|SRID=4326;POLYGON((9 6,9 22,35 22,35 6,9 6)) +RN(20)| +RN(20)/nodes|+|14|13 +RN(20)/nodes|-|14| +RN(20)/edges|+|12|13|22|13|0 +RN(20)/edges|-|12|20|22|13|0 +RN(20)/edges|-|20|-20|13|13|13 +RN(15)| +RN(15)/edges|+|8|-8|-17|0|0 +RN(15)/edges|-|8|-15|-17|0|5 +RN(15)/edges|+|11|-16|-18|0|8 +RN(15)/edges|-|11|15|-18|5|8 +RN(15)/edges|-|15|-8|-16|5|0 +RN(15)/edges|+|17|-7|11|13|0 +RN(15)/edges|-|17|-7|11|13|5 +RN(15)/faces|-|5|SRID=4326;POLYGON((35 14,35 22,47 22,47 14,35 14)) +RN(2)| +RN(2)/nodes|+|4|0 +RN(2)/nodes|-|4|2 +RN(2)/edges|-|2|3|-2|2|0 +RN(2)/edges|+|3|-3|3|0|0 +RN(2)/edges|-|3|-3|2|2|2 +RN(2)/faces|-|2|SRID=4326;POLYGON((17 30,17 40,31 40,31 30,17 30)) +NE(27)|27 +NE(27)/edges|+|3|-27|3|14|14 +NE(27)/edges|-|3|-3|3|0|0 +NE(27)/edges|+|27|27|-3|0|14 +NE(27)/faces|+|14|SRID=4326;POLYGON((20 27,20 35,30 35,30 27,20 27)) +RN(27)| +RN(27)/edges|+|3|-3|3|0|0 +RN(27)/edges|-|3|-27|3|14|14 +RN(27)/edges|-|27|27|-3|0|14 +RN(27)/faces|-|14|SRID=4326;POLYGON((20 27,20 35,30 35,30 27,20 27)) +NE(28)|28 +NE(28)/edges|+|3|28|3|15|15 +NE(28)/edges|-|3|-3|3|0|0 +NE(28)/edges|+|28|-3|-28|15|0 +NE(28)/faces|+|15|SRID=4326;POLYGON((20 27,20 35,30 35,30 27,20 27)) +RN(28)| +RN(28)/edges|+|3|-3|3|0|0 +RN(28)/edges|-|3|28|3|15|15 +RN(28)/edges|-|28|-3|-28|15|0 +RN(28)/faces|-|15|SRID=4326;POLYGON((20 27,20 35,30 35,30 27,20 27)) +NE(29)|29 +NE(29)/edges|+|3|-3|29|16|16 +NE(29)/edges|-|3|-3|3|0|0 +NE(29)/edges|+|29|3|-29|16|0 +NE(29)/faces|+|16|SRID=4326;POLYGON((22 30,22 37,28 37,28 30,22 30)) +RN(29)| +RN(29)/edges|+|3|-3|3|0|0 +RN(29)/edges|-|3|-3|29|16|16 +RN(29)/edges|-|29|3|-29|16|0 +RN(29)/faces|-|16|SRID=4326;POLYGON((22 30,22 37,28 37,28 30,22 30)) +NE(30)|30 +NE(31)|31 +NE(30,31)/nodes|+|4| +NE(30,31)/nodes|-|4|0 +NE(30,31)/edges|+|3|31|3|0|0 +NE(30,31)/edges|-|3|-3|3|0|0 +NE(30,31)/edges|+|30|-31|30|17|17 +NE(30,31)/edges|+|31|-3|-30|0|17 +NE(30,31)/faces|+|17|SRID=4326;POLYGON((18 35,18 40,25 40,25 35,18 35)) +RN(31)| +RN(31)/edges|+|3|-30|3|0|0 +RN(31)/edges|-|3|31|3|0|0 +RN(31)/edges|+|30|-3|30|0|0 +RN(31)/edges|-|30|-31|30|17|17 +RN(31)/edges|-|31|-3|-30|0|17 +RN(31)/faces|-|17|SRID=4326;POLYGON((18 35,18 40,25 40,25 35,18 35)) +NE(32)|32 +NE(32)/edges|+|3|-32|3|18|18 +NE(32)/edges|-|3|-30|3|0|0 +NE(32)/edges|+|30|-3|30|18|18 +NE(32)/edges|-|30|-3|30|0|0 +NE(32)/edges|+|32|32|-30|0|18 +NE(32)/faces|+|18|SRID=4326;POLYGON((18 27,18 40,28 40,28 27,18 27)) +RN(32)| +RN(32)/edges|+|3|-30|3|0|0 +RN(32)/edges|-|3|-32|3|18|18 +RN(32)/edges|+|30|-3|30|0|0 +RN(32)/edges|-|30|-3|30|18|18 +RN(32)/edges|-|32|32|-30|0|18 +RN(32)/faces|-|18|SRID=4326;POLYGON((18 27,18 40,28 40,28 27,18 27)) +NE(33)|33 +NE(33)/edges|+|3|33|3|19|19 +NE(33)/edges|-|3|-30|3|0|0 +NE(33)/edges|+|30|-3|30|19|19 +NE(33)/edges|-|30|-3|30|0|0 +NE(33)/edges|+|33|-30|-33|19|0 +NE(33)/faces|+|19|SRID=4326;POLYGON((18 27,18 40,28 40,28 27,18 27)) +RN(33)| +RN(33)/edges|+|3|-30|3|0|0 +RN(33)/edges|-|3|33|3|19|19 +RN(33)/edges|+|30|-3|30|0|0 +RN(33)/edges|-|30|-3|30|19|19 +RN(33)/edges|-|33|-30|-33|19|0 +RN(33)/faces|-|19|SRID=4326;POLYGON((18 27,18 40,28 40,28 27,18 27)) +NE(34)|34 +NE(34)/edges|+|3|-30|34|0|0 +NE(34)/edges|-|3|-30|3|0|0 +NE(34)/edges|+|34|3|-34|0|20 +NE(34)/faces|+|20|SRID=4326;POLYGON((22 27,22 30,28 30,28 27,22 27)) +RN(34)| +RN(34)/edges|+|3|-30|3|0|0 +RN(34)/edges|-|3|-30|34|0|0 +RN(34)/edges|-|34|3|-34|0|20 +RN(34)/faces|-|20|SRID=4326;POLYGON((22 27,22 30,28 30,28 27,22 27)) +NE(35)|35 +NE(35)/edges|+|3|-30|-35|0|0 +NE(35)/edges|-|3|-30|3|0|0 +NE(35)/edges|+|35|35|3|21|0 +NE(35)/faces|+|21|SRID=4326;POLYGON((22 27,22 30,28 30,28 27,22 27)) +RN(35)| +RN(35)/edges|+|3|-30|3|0|0 +RN(35)/edges|-|3|-30|-35|0|0 +RN(35)/edges|-|35|35|3|21|0 +RN(35)/faces|-|21|SRID=4326;POLYGON((22 27,22 30,28 30,28 27,22 27)) +Topology 'city_data' dropped +BEGIN +t +9 +22 +26 +COMMIT +BEGIN +1 +2 +3 +COMMIT +features.land_parcels.the_geom SRID:0 TYPE:MULTIPOLYGON DIMS:2 +features.city_streets.the_geom SRID:0 TYPE:MULTILINESTRING DIMS:2 +features.traffic_signs.the_geom SRID:0 TYPE:MULTIPOINT DIMS:2 +ERROR: TopoGeom 4 in layer 3 (features.city_streets.feature) cannot be represented dropping edge 3 +ERROR: TopoGeom 2 in layer 3 (features.city_streets.feature) cannot be represented dropping edge 4 +ERROR: TopoGeom 2 in layer 3 (features.city_streets.feature) cannot be represented dropping edge 5 +ERROR: TopoGeom 2 in layer 1 (features.land_parcels.feature) cannot be represented healing faces 5 and 4 +RN(11)|relations_before:|18 +RN(11)|10 +RN(11)|relations_after:|17 +ERROR: TopoGeom 3 in layer 1 (features.land_parcels.feature) cannot be represented healing faces 10 and 0 +ERROR: TopoGeom 3 in layer 1 (features.land_parcels.feature) cannot be represented healing faces 0 and 10 +RN(11)|P1|t +RN(11)|P2|t +RN(11)|P3|t +RN(11)|P4|t +RN(11)|P5|t +Topology 'city_data' dropped diff -Nru postgis-1.5.3/topology/test/regress/topo2.5d.sql postgis-2.0.1/topology/test/regress/topo2.5d.sql --- postgis-1.5.3/topology/test/regress/topo2.5d.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/topo2.5d.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,53 @@ +\set VERBOSITY terse +set client_min_messages to WARNING; + +SELECT topology.CreateTopology('tt3d', -1, 0, true) > 0; + +COPY tt3d.face(face_id) FROM STDIN; +1 +\. + +COPY tt3d.node(node_id, geom) FROM STDIN; +1 POINT(0 0 30) +2 POINT(10 10 20) +\. + +COPY tt3d.edge_data( + edge_id, start_node, end_node, + abs_next_left_edge, abs_next_right_edge, + next_left_edge, next_right_edge, + left_face, right_face, geom) FROM STDIN; +1 1 2 2 2 2 2 0 1 LINESTRING(0 0 30, 0 10 25, 10 10 20) +2 2 1 1 1 1 1 0 1 LINESTRING(10 10 20, 10 0 18, 0 0 30) +\. + +-- 2.5d face geometries +CREATE TABLE public.faces (id serial); +SELECT topology.AddTopoGeometryColumn('tt3d', 'public', 'faces', 'g', + 'POLYGON'); +INSERT INTO public.faces (g) VALUES ( + topology.CreateTopoGeom( + 'tt3d', -- Topology name + 3, -- Topology geometry type (polygon/multipolygon) + 1, -- TG_LAYER_ID for this topology (from topology.layer) + '{{1,3}}') -- face_id:1 + ); + +-- 2.5d line geometries +CREATE TABLE lines (id serial); +SELECT topology.AddTopoGeometryColumn('tt3d', 'public', 'lines', 'g', + 'LINE'); +INSERT INTO public.lines (g) VALUES ( + topology.CreateTopoGeom( + 'tt3d', -- Topology name + 2, -- Topology geometry type (lineal) + 2, -- TG_LAYER_ID for this topology (from topology.layer) + '{{1,2},{2,2}}') -- edge_id:1 edge_id:2 + ); + +SELECT 'f'||id, ST_AsEWKT(topology.geometry(g)) from faces; +SELECT 'l'||id, ST_AsEWKT(topology.geometry(g)) from public.lines; + +SELECT topology.DropTopology('tt3d'); +DROP TABLE lines; +DROP TABLE faces; diff -Nru postgis-1.5.3/topology/test/regress/topo2.5d_expected postgis-2.0.1/topology/test/regress/topo2.5d_expected --- postgis-1.5.3/topology/test/regress/topo2.5d_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/topo2.5d_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,6 @@ +t +1 +2 +f1|MULTIPOLYGON(((0 0 30,0 10 25,10 10 20,10 0 18,0 0 30))) +l1|MULTILINESTRING((0 0 30,0 10 25,10 10 20,10 0 18,0 0 30)) +Topology 'tt3d' dropped diff -Nru postgis-1.5.3/topology/test/regress/topoelement.sql postgis-2.0.1/topology/test/regress/topoelement.sql --- postgis-1.5.3/topology/test/regress/topoelement.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/topoelement.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,9 @@ +-- Good +SELECT '1','{101,1}'::topology.TopoElement; +SELECT '2','{101,2}'::topology.TopoElement; +SELECT '3','{101,3}'::topology.TopoElement; +SELECT '4','{1,104}'::topology.TopoElement; -- layer id has no higher limit +-- Invalid: has 3 elements +SELECT '[0:2]={1,2,3}'::topology.TopoElement; +-- Invalid: 0 is both an invalid primitive element id and an invalid layer id +SELECT '{1,0}'::topology.TopoElement; diff -Nru postgis-1.5.3/topology/test/regress/topoelement_expected postgis-2.0.1/topology/test/regress/topoelement_expected --- postgis-1.5.3/topology/test/regress/topoelement_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/topoelement_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,6 @@ +1|{101,1} +2|{101,2} +3|{101,3} +4|{1,104} +ERROR: value for domain topoelement violates check constraint "lower_dimension" +ERROR: value for domain topoelement violates check constraint "type_range" diff -Nru postgis-1.5.3/topology/test/regress/topoelementarray_agg.sql postgis-2.0.1/topology/test/regress/topoelementarray_agg.sql --- postgis-1.5.3/topology/test/regress/topoelementarray_agg.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/topoelementarray_agg.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,8 @@ +set client_min_messages to WARNING; + +SELECT 1,topology.TopoElementArray_agg('{1,3}'::topology.TopoElement); + +SELECT 2, topology.TopoElementArray_agg(e) from ( + select '{4,1}'::topology.TopoElement as e union + select '{5,2}' +) as foo; diff -Nru postgis-1.5.3/topology/test/regress/topoelementarray_agg_expected postgis-2.0.1/topology/test/regress/topoelementarray_agg_expected --- postgis-1.5.3/topology/test/regress/topoelementarray_agg_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/topoelementarray_agg_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,2 @@ +1|{{1,3}} +2|{{4,1},{5,2}} diff -Nru postgis-1.5.3/topology/test/regress/topogeo_addlinestring.sql postgis-2.0.1/topology/test/regress/topogeo_addlinestring.sql --- postgis-1.5.3/topology/test/regress/topogeo_addlinestring.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/topogeo_addlinestring.sql 2012-06-14 15:25:04.000000000 +0000 @@ -0,0 +1,261 @@ +\set VERBOSITY terse +set client_min_messages to ERROR; + +\i load_topology.sql + +-- Save max node id +select 'node'::text as what, max(node_id) INTO city_data.limits FROM city_data.node; +INSERT INTO city_data.limits select 'edge'::text as what, max(edge_id) FROM city_data.edge; +SELECT 'max',* from city_data.limits; + +-- Check changes since last saving, save more +-- { +CREATE OR REPLACE FUNCTION check_changes() +RETURNS TABLE (o text) +AS $$ +DECLARE + rec RECORD; + sql text; +BEGIN + -- Check effect on nodes + sql := 'SELECT n.node_id, ''N|'' || n.node_id || ''|'' || + COALESCE(n.containing_face::text,'''') || ''|'' || + ST_AsText(ST_SnapToGrid(n.geom, 0.2))::text as xx + FROM city_data.node n WHERE n.node_id > ( + SELECT max FROM city_data.limits WHERE what = ''node''::text ) + ORDER BY n.node_id'; + + FOR rec IN EXECUTE sql LOOP + o := rec.xx; + RETURN NEXT; + END LOOP; + + -- Check effect on edges (there should be one split) + sql := ' + WITH node_limits AS ( SELECT max FROM city_data.limits WHERE what = ''node''::text ), + edge_limits AS ( SELECT max FROM city_data.limits WHERE what = ''edge''::text ) + SELECT ''E|'' || e.edge_id || ''|sn'' || e.start_node || ''|en'' || e.end_node :: text as xx + FROM city_data.edge e, node_limits nl, edge_limits el + WHERE e.start_node > nl.max + OR e.end_node > nl.max + OR e.edge_id > el.max + ORDER BY e.edge_id; + '; + + FOR rec IN EXECUTE sql LOOP + o := rec.xx; + RETURN NEXT; + END LOOP; + + UPDATE city_data.limits SET max = (SELECT max(n.node_id) FROM city_data.node n) WHERE what = 'node'; + UPDATE city_data.limits SET max = (SELECT max(e.edge_id) FROM city_data.edge e) WHERE what = 'edge'; + +END; +$$ LANGUAGE 'plpgsql'; +-- } + + +-- Invalid calls +SELECT 'invalid', TopoGeo_addLineString('city_data', 'MULTILINESTRING((36 26, 38 30))'); +SELECT 'invalid', TopoGeo_addLineString('city_data', 'POINT(36 26)'); +SELECT 'invalid', TopoGeo_addLineString('invalid', 'LINESTRING(36 26, 0 0)'); + +-- Isolated edge in universal face +SELECT 'iso_uni', TopoGeo_addLineString('city_data', 'LINESTRING(36 26, 38 30)'); +SELECT check_changes(); + +-- Isolated edge in face 5 +SELECT 'iso_f5', TopoGeo_addLineString('city_data', 'LINESTRING(37 20, 43 19, 41 16)'); +SELECT check_changes(); + +-- Existing isolated edge +SELECT 'iso_ex', TopoGeo_addLineString('city_data', 'LINESTRING(36 26, 38 30)'); +SELECT check_changes(); + +-- Existing isolated edge within tolerance +SELECT 'iso_ex_tol', TopoGeo_addLineString('city_data', 'LINESTRING(36 27, 38 31)', 2); +SELECT check_changes(); + +-- Existing non-isolated edge +SELECT 'noniso_ex', TopoGeo_addLineString('city_data', 'LINESTRING(35 6, 35 14)'); +SELECT check_changes(); + +-- Existing non-isolated edge within tolerance +SELECT 'noniso_ex_tol', TopoGeo_addLineString('city_data', 'LINESTRING(35 7, 35 13)', 2); +SELECT check_changes(); + +-- Fully contained +SELECT 'contained', TopoGeo_addLineString('city_data', 'LINESTRING(35 8, 35 12)'); +SELECT check_changes(); + +-- Overlapping +SELECT 'overlap', TopoGeo_addLineString('city_data', 'LINESTRING(45 22, 49 22)') ORDER BY 2; +SELECT check_changes(); + +-- Crossing +SELECT 'cross', TopoGeo_addLineString('city_data', 'LINESTRING(49 18, 44 17)') ORDER BY 2; +SELECT check_changes(); + +-- Snapping (and splitting a face) +SELECT 'snap', TopoGeo_addLineString('city_data', 'LINESTRING(18 22.2, 22.5 22.2, 21.2 20.5)', 1) ORDER BY 2; +SELECT check_changes(); +SELECT 'snap_again', TopoGeo_addLineString('city_data', 'LINESTRING(18 22.2, 22.5 22.2, 21.2 20.5)', 1) ORDER BY 2; +SELECT check_changes(); + +-- A mix of crossing and overlapping, splitting another face +SELECT 'crossover', TopoGeo_addLineString('city_data', 'LINESTRING(9 18, 9 20, 21 10, 21 7)') ORDER BY 2; +SELECT check_changes(); +SELECT 'crossover_again', TopoGeo_addLineString('city_data', 'LINESTRING(9 18, 9 20, 21 10, 21 7)') ORDER BY 2; +SELECT check_changes(); + +-- Fully containing +SELECT 'contains', TopoGeo_addLineString('city_data', 'LINESTRING(14 34, 13 35, 10 35, 9 35, 7 36)') ORDER BY 2; +SELECT check_changes(); + +-- Crossing a node +SELECT 'nodecross', TopoGeo_addLineString('city_data', 'LINESTRING(18 37, 22 37)') ORDER BY 2; +SELECT check_changes(); + +-- Existing isolated edge with 2 segments +SELECT 'iso_ex_2segs', TopoGeo_addLineString('city_data', 'LINESTRING(37 20, 43 19, 41 16)'); +SELECT check_changes(); + +-- See http://trac.osgeo.org/postgis/attachment/ticket/1613 + +SELECT '#1613.1', TopoGeo_addLineString('city_data', 'LINESTRING(556267.562954 144887.066638, 556267 144887.4)') ORDER BY 2; +SELECT check_changes(); +SELECT '#1613.2', TopoGeo_addLineString('city_data', 'LINESTRING(556250 144887, 556267 144887.07, 556310.04 144887)') ORDER BY 2; +SELECT check_changes(); + +-- Consistency check +SELECT * FROM ValidateTopology('city_data'); + +-- See http://trac.osgeo.org/postgis/ticket/1631 + +-- clean all up first +DELETE FROM city_data.edge_data; +DELETE FROM city_data.node; +DELETE FROM city_data.face where face_id > 0; + +SELECT '#1631.1', TopoGeo_addLineString('city_data', + 'LINESTRING(556267.56295432 144887.06663814,556267.566 144888)' +) ORDER BY 2; +SELECT check_changes(); +SELECT '#1631.2', TopoGeo_addLineString('city_data', + 'LINESTRING(556254.67 144886.62, 556267.66 144887.07)' +) ORDER BY 2; +SELECT check_changes(); + +-- Consistency check +SELECT * FROM ValidateTopology('city_data'); + +-- See http://trac.osgeo.org/postgis/ticket/1641 + +-- clean all up first +DELETE FROM city_data.edge_data; DELETE FROM city_data.node; +DELETE FROM city_data.face where face_id > 0; + +SELECT '#1641.1', TopoGeo_addLineString('city_data', + 'LINESTRING(-0.223586 0.474301, 0.142550 0.406124)' +) ORDER BY 2; +SELECT check_changes(); +-- Use a tolerance +SELECT '#1641.2', TopoGeo_addLineString('city_data', + 'LINESTRING(0.095989 0.113619, -0.064646 0.470149)' + , 1e-16 +) ORDER BY 2; +SELECT check_changes(); + +-- Consistency check +SELECT * FROM ValidateTopology('city_data'); + +-- Now w/out explicit tolerance (will use local min) +-- clean all up first +DELETE FROM city_data.edge_data; DELETE FROM city_data.node; +DELETE FROM city_data.face where face_id > 0; + +SELECT '#1641.3', TopoGeo_addLineString('city_data', + 'LINESTRING(-0.223586 0.474301, 0.142550 0.406124)' +) ORDER BY 2; +SELECT check_changes(); +SELECT '#1641.4', TopoGeo_addLineString('city_data', + 'LINESTRING(0.095989 0.113619, -0.064646 0.470149)' +) ORDER BY 2; +SELECT check_changes(); + +-- Consistency check +SELECT * FROM ValidateTopology('city_data'); + +-- See http://trac.osgeo.org/postgis/ticket/1650 + +DELETE FROM city_data.edge_data; DELETE FROM city_data.node; +DELETE FROM city_data.face where face_id > 0; + +SELECT '#1650.1' UNION ALL +SELECT '#1650.2' || TopoGeo_addLineString('city_data', + 'LINESTRING(0 0, 0 1)' +, 2)::text; +SELECT check_changes(); + +SELECT '#1650.3', TopoGeo_addLineString('city_data', + 'LINESTRING(-1 0, 10 0)' +, 2) ORDER BY 2; +SELECT check_changes(); + +-- Consistency check +SELECT * FROM ValidateTopology('city_data'); + +-- Test snapping of line over a node +-- See http://trac.osgeo.org/postgis/ticket/1654 + +DELETE FROM city_data.edge_data; DELETE FROM city_data.node; +DELETE FROM city_data.face where face_id > 0; + +SELECT '#1654.1', 'N', ST_AddIsoNode('city_data', 0, 'POINT(0 0)'); +SELECT check_changes(); +SELECT '#1654.2', TopoGeo_addLineString('city_data', + 'LINESTRING(-10 1, 10 1)' +, 2) ORDER BY 2; +SELECT check_changes(); + +-- Consistency check +SELECT * FROM ValidateTopology('city_data'); + +-- Test snapping of new edge endpoints +-- See http://trac.osgeo.org/postgis/ticket/1706 + +DELETE FROM city_data.edge_data; DELETE FROM city_data.node; +DELETE FROM city_data.face where face_id > 0; + +SELECT '#1706.1', 'E', TopoGeo_AddLineString('city_data', + 'LINESTRING(20 10, 10 10, 9 12, 10 20)'); +SELECT check_changes(); + +SELECT '#1706.2', 'E*', TopoGeo_addLineString('city_data', + 'LINESTRING(10 0, 10 10, 15 10, 20 10)' +, 4) ORDER BY 3; +SELECT check_changes(); + +-- Consistency check +SELECT * FROM ValidateTopology('city_data'); + +-- Test noding after snap +-- See http://trac.osgeo.org/postgis/ticket/1714 + +DELETE FROM city_data.edge_data; DELETE FROM city_data.node; +DELETE FROM city_data.face where face_id > 0; + +SELECT '#1714.1', 'N', AddNode('city_data', 'POINT(10 0)'); +SELECT check_changes(); + +SELECT '#1714.2', 'E*', TopoGeo_addLineString('city_data', + 'LINESTRING(10 0, 0 20, 0 0, 10 0)' +, 12) ORDER BY 3; +SELECT check_changes(); + +-- Consistency check +SELECT * FROM ValidateTopology('city_data'); + +-- Cleanups +DROP FUNCTION check_changes(); +SELECT DropTopology('city_data'); diff -Nru postgis-1.5.3/topology/test/regress/topogeo_addlinestring_expected postgis-2.0.1/topology/test/regress/topogeo_addlinestring_expected --- postgis-1.5.3/topology/test/regress/topogeo_addlinestring_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/topogeo_addlinestring_expected 2012-06-14 15:25:04.000000000 +0000 @@ -0,0 +1,178 @@ +BEGIN +t +9 +22 +26 +COMMIT +max|node|22 +max|edge|26 +ERROR: Invalid geometry type (MULTILINESTRING) passed to TopoGeo_AddLinestring, expected LINESTRING +ERROR: Invalid geometry type (POINT) passed to TopoGeo_AddLinestring, expected LINESTRING +ERROR: No topology with name "invalid" in topology.topology +iso_uni|27 +N|23||POINT(36 26) +N|24||POINT(38 30) +E|27|sn23|en24 +iso_f5|28 +N|25||POINT(37 20) +N|26||POINT(41 16) +E|28|sn25|en26 +iso_ex|27 +iso_ex_tol|27 +noniso_ex|18 +noniso_ex_tol|18 +contained|29 +N|27||POINT(35 8) +N|28||POINT(35 12) +E|18|sn10|en27 +E|29|sn27|en28 +E|30|sn28|en13 +overlap|31 +overlap|32 +N|29||POINT(49 22) +N|30||POINT(45 22) +E|8|sn18|en30 +E|31|sn19|en29 +E|32|sn30|en19 +cross|34 +cross|35 +N|31||POINT(49 18) +N|32||POINT(47 17.6) +N|33||POINT(44 17) +E|15|sn12|en32 +E|33|sn32|en19 +E|34|sn31|en32 +E|35|sn32|en33 +snap|36 +snap|39 +snap|40 +N|34||POINT(18 22) +N|35||POINT(22.4 22) +N|36||POINT(21 20.4) +E|6|sn16|en34 +E|7|sn17|en35 +E|19|sn14|en36 +E|36|sn34|en17 +E|37|sn35|en18 +E|38|sn36|en17 +E|39|sn35|en36 +E|40|sn17|en35 +snap_again|7 +snap_again|36 +snap_again|39 +crossover|43 +crossover|45 +crossover|46 +crossover|47 +N|37||POINT(9 20) +N|38||POINT(16.2 14) +N|39||POINT(21 10) +N|40||POINT(9 18) +N|41||POINT(21 7) +E|9|sn15|en38 +E|20|sn9|en41 +E|21|sn15|en40 +E|41|sn37|en16 +E|42|sn38|en14 +E|43|sn37|en38 +E|44|sn39|en14 +E|45|sn38|en39 +E|46|sn40|en37 +E|47|sn41|en39 +crossover_again|43 +crossover_again|45 +crossover_again|46 +crossover_again|47 +contains|25 +contains|48 +contains|49 +N|42||POINT(7 36) +N|43||POINT(14 34) +E|48|sn21|en42 +E|49|sn43|en22 +nodecross|50 +nodecross|51 +N|44||POINT(18 37) +N|45||POINT(22 37) +E|50|sn44|en4 +E|51|sn4|en45 +iso_ex_2segs|28 +#1613.1|52 +N|46||POINT(556267.6 144887) +N|47||POINT(556267 144887.4) +E|52|sn46|en47 +#1613.2|54 +#1613.2|55 +N|48||POINT(556250 144887) +N|49||POINT(556267.6 144887) +N|50||POINT(556310 144887) +E|52|sn46|en49 +E|53|sn49|en47 +E|54|sn48|en49 +E|55|sn49|en50 +#1631.1|56 +N|51||POINT(556267.6 144887) +N|52||POINT(556267.6 144888) +E|56|sn51|en52 +#1631.2|57 +#1631.2|58 +N|53||POINT(556254.6 144886.6) +N|54||POINT(556267.6 144887) +E|57|sn53|en51 +E|58|sn51|en54 +#1641.1|59 +N|55||POINT(-0.2 0.4) +N|56||POINT(0.2 0.4) +E|59|sn55|en56 +#1641.2|61 +#1641.2|62 +N|57||POINT(0 0.2) +N|58||POINT(0 0.4) +N|59||POINT(0 0.4) +E|59|sn55|en58 +E|60|sn58|en56 +E|61|sn57|en58 +E|62|sn58|en59 +#1641.3|63 +N|60||POINT(-0.2 0.4) +N|61||POINT(0.2 0.4) +E|63|sn60|en61 +#1641.4|65 +#1641.4|66 +N|62||POINT(0 0.2) +N|63||POINT(0 0.4) +N|64||POINT(0 0.4) +E|63|sn60|en63 +E|64|sn63|en61 +E|65|sn62|en63 +E|66|sn63|en64 +#1650.1 +N|65|0|POINT(0 0) +#1650.3|67 +N|66||POINT(10 0) +E|67|sn65|en66 +#1654.1|N|67 +N|67|0|POINT(0 0) +#1654.2|68 +#1654.2|69 +N|68||POINT(-10 1) +N|69||POINT(10 1) +E|68|sn68|en67 +E|69|sn67|en69 +#1706.1|E|70 +N|70||POINT(20 10) +N|71||POINT(10 20) +E|70|sn70|en71 +#1706.2|E*|70 +#1706.2|E*|72 +N|72||POINT(10 0) +N|73||POINT(9 12) +E|70|sn70|en73 +E|71|sn73|en71 +E|72|sn72|en73 +#1714.1|N|74 +N|74||POINT(10 0) +#1714.2|E*|73 +N|75||POINT(0 20) +E|73|sn74|en75 +Topology 'city_data' dropped diff -Nru postgis-1.5.3/topology/test/regress/topogeo_addpoint.sql postgis-2.0.1/topology/test/regress/topogeo_addpoint.sql --- postgis-1.5.3/topology/test/regress/topogeo_addpoint.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/topogeo_addpoint.sql 2012-06-14 15:25:04.000000000 +0000 @@ -0,0 +1,49 @@ +\set VERBOSITY terse +set client_min_messages to ERROR; + +\i load_topology.sql + +-- Invalid calls +SELECT 'invalid', TopoGeo_addPoint('city_data', 'LINESTRING(36 26, 38 30)'); +SELECT 'invalid', TopoGeo_addPoint('city_data', 'MULTIPOINT((36 26))'); +SELECT 'invalid', TopoGeo_addPoint('invalid', 'POINT(36 26)'); + +-- Save max node id +select 'node'::text as what, max(node_id) INTO city_data.limits FROM city_data.node; + +-- Isolated point in universal face +SELECT 'iso_uni', TopoGeo_addPoint('city_data', 'POINT(38 26)'); + +-- Isolated point in face 3 +SELECT 'iso_f3', TopoGeo_addPoint('city_data', 'POINT(16 18)'); + +-- Existing isolated node +SELECT 'iso_ex', TopoGeo_addPoint('city_data', 'POINT(38 26)'); + +-- Existing isolated node within tolerance +SELECT 'iso_ex_tol', TopoGeo_addPoint('city_data', 'POINT(38 27)', 1.5); + +-- Existing non-isolated node +SELECT 'noniso_ex', TopoGeo_addPoint('city_data', 'POINT(25 30)'); + +-- Existing non-isolated node within tolerance (closer to edge) +SELECT 'noniso_ex_tol', TopoGeo_addPoint('city_data', 'POINT(26 30.2)', 3); + +-- Splitting edge +SELECT 'split', TopoGeo_addPoint('city_data', 'POINT(26 30.2)', 1); + +-- Check effect on nodes +SELECT 'N', n.node_id, n.containing_face, ST_AsText(n.geom) +FROM city_data.node n WHERE n.node_id > ( + SELECT max FROM city_data.limits WHERE what = 'node'::text ) +ORDER BY n.node_id; + +-- Check effect on edges (there should be one split) +WITH limits AS ( SELECT max FROM city_data.limits WHERE what = 'node'::text ) +SELECT 'E', n.edge_id, n.start_node, n.end_node + FROM city_data.edge n, limits m + WHERE n.start_node > m.max + OR n.end_node > m.max +ORDER BY n.edge_id; + +SELECT DropTopology('city_data'); diff -Nru postgis-1.5.3/topology/test/regress/topogeo_addpoint_expected postgis-2.0.1/topology/test/regress/topogeo_addpoint_expected --- postgis-1.5.3/topology/test/regress/topogeo_addpoint_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/topogeo_addpoint_expected 2012-06-14 15:25:04.000000000 +0000 @@ -0,0 +1,22 @@ +BEGIN +t +9 +22 +26 +COMMIT +ERROR: Invalid geometry type (LINESTRING) passed to TopoGeo_AddPoint, expected POINT +ERROR: Invalid geometry type (MULTIPOINT) passed to TopoGeo_AddPoint, expected POINT +ERROR: No topology with name "invalid" in topology.topology +iso_uni|23 +iso_f3|24 +iso_ex|23 +iso_ex_tol|23 +noniso_ex|2 +noniso_ex_tol|2 +split|25 +N|23|0|POINT(38 26) +N|24|3|POINT(16 18) +N|25||POINT(26 30) +E|2|2|25 +E|27|25|2 +Topology 'city_data' dropped diff -Nru postgis-1.5.3/topology/test/regress/topogeo_addpolygon.sql postgis-2.0.1/topology/test/regress/topogeo_addpolygon.sql --- postgis-1.5.3/topology/test/regress/topogeo_addpolygon.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/topogeo_addpolygon.sql 2012-06-14 15:25:04.000000000 +0000 @@ -0,0 +1,113 @@ +\set VERBOSITY terse +set client_min_messages to ERROR; + +\i load_topology.sql + +-- Save max node,edge and face ids +select 'node'::text as what, max(node_id) INTO city_data.limits FROM city_data.node; +INSERT INTO city_data.limits select 'edge'::text as what, max(edge_id) FROM city_data.edge; +INSERT INTO city_data.limits select 'face'::text as what, max(face_id) FROM city_data.face; +SELECT 'max',* from city_data.limits; + +-- Check changes since last saving, save more +-- { +CREATE OR REPLACE FUNCTION check_changes() +RETURNS TABLE (o text) +AS $$ +DECLARE + rec RECORD; + sql text; +BEGIN + -- Check effect on nodes + sql := 'SELECT n.node_id, ''N|'' || n.node_id || ''|'' || + COALESCE(n.containing_face::text,'''') || ''|'' || + ST_AsText(ST_SnapToGrid(n.geom, 0.2))::text as xx + FROM city_data.node n WHERE n.node_id > ( + SELECT max FROM city_data.limits WHERE what = ''node''::text ) + ORDER BY n.node_id'; + + FOR rec IN EXECUTE sql LOOP + o := rec.xx; + RETURN NEXT; + END LOOP; + + -- Check effect on edges + sql := ' + WITH node_limits AS ( SELECT max FROM city_data.limits WHERE what = ''node''::text ), + edge_limits AS ( SELECT max FROM city_data.limits WHERE what = ''edge''::text ) + SELECT ''E|'' || e.edge_id || ''|sn'' || e.start_node || ''|en'' || e.end_node :: text as xx + FROM city_data.edge e, node_limits nl, edge_limits el + WHERE e.start_node > nl.max + OR e.end_node > nl.max + OR e.edge_id > el.max + ORDER BY e.edge_id; + '; + + FOR rec IN EXECUTE sql LOOP + o := rec.xx; + RETURN NEXT; + END LOOP; + + -- Check effect on faces + sql := ' + WITH face_limits AS ( SELECT max FROM city_data.limits WHERE what = ''face''::text ) + SELECT ''F|'' || f.face_id ::text as xx + FROM city_data.face f, face_limits fl + WHERE f.face_id > fl.max + ORDER BY f.face_id; + '; + + FOR rec IN EXECUTE sql LOOP + o := rec.xx; + RETURN NEXT; + END LOOP; + + UPDATE city_data.limits SET max = (SELECT max(n.node_id) FROM city_data.node n) WHERE what = 'node'; + UPDATE city_data.limits SET max = (SELECT max(e.edge_id) FROM city_data.edge e) WHERE what = 'edge'; + UPDATE city_data.limits SET max = (SELECT max(f.face_id) FROM city_data.face f) WHERE what = 'face'; + +END; +$$ LANGUAGE 'plpgsql'; +-- } + + +-- Invalid calls +SELECT 'invalid', TopoGeo_addPolygon('city_data', 'MULTILINESTRING((36 26, 38 30))'); +SELECT 'invalid', TopoGeo_addPolygon('city_data', 'POINT(36 26)'); +SELECT 'invalid', TopoGeo_addPolygon('invalid', 'POLYGON((36 26, 40 24, 40 30, 36 26))'); + +-- Isolated face in universal face +SELECT 'iso_uni', TopoGeo_addPolygon('city_data', 'POLYGON((36 26, 38 30, 43 26, 36 26))'); +SELECT check_changes(); + +-- Isolated face in universal face with hole +SELECT 'iso_uni_hole', TopoGeo_addPolygon('city_data', 'POLYGON((9 28, 16 29, 16 23, 10 23, 9 28),(15 25, 13 27, 11 24, 15 25))'); +SELECT check_changes(); + +-- Existing single face +SELECT 'ex', TopoGeo_addPolygon('city_data', 'POLYGON((21 22,35 22,35 14,21 14,21 22))'); +SELECT check_changes(); + +-- Union of existing faces +SELECT 'ex_union', TopoGeo_addPolygon('city_data', 'POLYGON((9 14,21 14,35 14,35 6,21 6,9 6,9 14))') ORDER BY 2; +SELECT check_changes(); + +-- Half an existing face +SELECT 'half', TopoGeo_addPolygon('city_data', 'POLYGON((21 14, 35 22, 35 14, 21 14))'); +SELECT check_changes(); + +-- Split two existing faces +SELECT 'split', TopoGeo_addPolygon('city_data', 'POLYGON((21 14, 21 22, 35 14, 21 14))') ORDER BY 2; +SELECT check_changes(); + +-- Union of existing face, with hole +SELECT 'ex_hole', TopoGeo_addPolygon('city_data', 'POLYGON((9 22,47 22,47 6,9 6,9 22),(21 14,28 18,35 14,21 14))') ORDER BY 2; +SELECT check_changes(); + +-- Union of existing face, with hole and a tolerance +SELECT 'ex_hole_snap', TopoGeo_addPolygon('city_data', 'POLYGON((9 22,35 22.5, 47 22,47 6,9 6,9 22),(21 14,28 17.5,35 14,21 14))', 1) ORDER BY 2; +SELECT check_changes(); + +DROP FUNCTION check_changes(); +SELECT DropTopology('city_data'); + diff -Nru postgis-1.5.3/topology/test/regress/topogeo_addpolygon_expected postgis-2.0.1/topology/test/regress/topogeo_addpolygon_expected --- postgis-1.5.3/topology/test/regress/topogeo_addpolygon_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/topogeo_addpolygon_expected 2012-06-14 15:25:04.000000000 +0000 @@ -0,0 +1,55 @@ +BEGIN +t +9 +22 +26 +COMMIT +max|node|22 +max|edge|26 +max|face|9 +ERROR: Invalid geometry type (MULTILINESTRING) passed to TopoGeo_AddPolygon, expected POLYGON +ERROR: Invalid geometry type (POINT) passed to TopoGeo_AddPolygon, expected POLYGON +ERROR: No topology with name "invalid" in topology.topology +iso_uni|10 +N|23||POINT(36 26) +E|27|sn23|en23 +F|10 +iso_uni_hole|11 +N|24||POINT(9 28) +N|25||POINT(15 25) +E|28|sn24|en24 +E|29|sn25|en25 +F|11 +F|12 +ex|4 +ex_union|6 +ex_union|7 +half|4 +E|30|sn14|en18 +F|13 +split|4 +split|13 +N|26||POINT(28 18) +E|30|sn14|en26 +E|31|sn26|en18 +E|32|sn26|en13 +E|33|sn17|en26 +F|14 +F|15 +ex_hole|3 +ex_hole|5 +ex_hole|6 +ex_hole|7 +ex_hole|8 +ex_hole|13 +ex_hole|14 +ex_hole|15 +ex_hole_snap|3 +ex_hole_snap|5 +ex_hole_snap|6 +ex_hole_snap|7 +ex_hole_snap|8 +ex_hole_snap|13 +ex_hole_snap|14 +ex_hole_snap|15 +Topology 'city_data' dropped diff -Nru postgis-1.5.3/topology/test/regress/topogeometry_type.sql postgis-2.0.1/topology/test/regress/topogeometry_type.sql --- postgis-1.5.3/topology/test/regress/topogeometry_type.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/topogeometry_type.sql 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,39 @@ +set client_min_messages to WARNING; + +\i load_topology.sql +\i load_features.sql +\i more_features.sql +\i hierarchy.sql + +SELECT DISTINCT 'GeometryType(traffic_signs)', + geometrytype(feature) FROM features.traffic_signs; +SELECT DISTINCT 'ST_GeometryType(traffic_signs)', + st_geometrytype(feature) FROM features.traffic_signs; + +SELECT DISTINCT 'GeometryType(city_streets)', + geometrytype(feature) FROM features.city_streets; +SELECT DISTINCT 'ST_GeometryType(city_streets)', + st_geometrytype(feature) FROM features.city_streets; + +SELECT DISTINCT 'GeometryType(land_parcels)', + geometrytype(feature) FROM features.land_parcels; +SELECT DISTINCT 'ST_GeometryType(land_parcels)', + st_geometrytype(feature) FROM features.land_parcels; + +SELECT DISTINCT 'GeometryType(big_signs)', + geometrytype(feature) FROM features.big_signs; +SELECT DISTINCT 'ST_GeometryType(big_signs)', + st_geometrytype(feature) FROM features.big_signs; + +SELECT DISTINCT 'GeometryType(big_streets)', + geometrytype(feature) FROM features.big_streets; +SELECT DISTINCT 'ST_GeometryType(big_streets)', + st_geometrytype(feature) FROM features.big_streets; + +SELECT DISTINCT 'GeometryType(big_parcels)', + geometrytype(feature) FROM features.big_parcels; +SELECT DISTINCT 'ST_GeometryType(big_parcels)', + st_geometrytype(feature) FROM features.big_parcels; + +SELECT topology.DropTopology('city_data'); +DROP SCHEMA features CASCADE; diff -Nru postgis-1.5.3/topology/test/regress/topogeometry_type_expected postgis-2.0.1/topology/test/regress/topogeometry_type_expected --- postgis-1.5.3/topology/test/regress/topogeometry_type_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/topogeometry_type_expected 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,29 @@ +BEGIN +t +9 +22 +26 +COMMIT +BEGIN +1 +2 +3 +COMMIT +4 +features.big_parcels.the_geom SRID:0 TYPE:MULTIPOLYGON DIMS:2 +5 +6 +features.big_signs.the_geom SRID:0 TYPE:MULTIPOINT DIMS:2 +GeometryType(traffic_signs)|MULTIPOINT +ST_GeometryType(traffic_signs)|ST_MultiPoint +GeometryType(city_streets)|MULTILINESTRING +ST_GeometryType(city_streets)|ST_MultiLinestring +GeometryType(land_parcels)|MULTIPOLYGON +ST_GeometryType(land_parcels)|ST_MultiPolygon +GeometryType(big_signs)|MULTIPOINT +ST_GeometryType(big_signs)|ST_MultiPoint +GeometryType(big_streets)|MULTILINESTRING +ST_GeometryType(big_streets)|ST_MultiLinestring +GeometryType(big_parcels)|MULTIPOLYGON +ST_GeometryType(big_parcels)|ST_MultiPolygon +Topology 'city_data' dropped diff -Nru postgis-1.5.3/topology/test/regress/totopogeom.sql postgis-2.0.1/topology/test/regress/totopogeom.sql --- postgis-1.5.3/topology/test/regress/totopogeom.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/totopogeom.sql 2012-04-25 19:41:33.000000000 +0000 @@ -0,0 +1,173 @@ +\set VERBOSITY terse +set client_min_messages to ERROR; + +select 'create', createtopology('tt') > 0; + +-- Invalid calls +select totopogeom('POINT(0 0)'::geometry, 'unexistent', 1); +select totopogeom('POINT(0 0)'::geometry, 'tt', 1); +select totopogeom(null, 'tt', 1); +select totopogeom('POINT(0 0)'::geometry, '', 1); +select totopogeom('POINT(0 0)'::geometry, null, 1); +select totopogeom('POINT(0 0)'::geometry, 'tt', null); + +-- Create simple puntual layer (will be layer 1) +CREATE TABLE tt.f_puntal(id serial); +SELECT 'simple_puntual_layer', AddTopoGeometryColumn('tt', 'tt', 'f_puntal','g','POINT'); + +-- Create a hierarchical layer (will be layer 2) +CREATE TABLE tt.f_hier(id serial); +SELECT 'hierarchical_layer', AddTopoGeometryColumn('tt', 'tt', 'f_hier','g','COLLECTION', 1); + +-- Create a lineal layer (will be layer 3) +CREATE TABLE tt.f_lineal(id serial); +SELECT 'simple_lineal_layer', AddTopoGeometryColumn('tt', 'tt', 'f_lineal','g','LINE'); + +-- Create an areal layer (will be layer 4) +CREATE TABLE tt.f_areal(id serial); +SELECT 'simple_areal_layer', AddTopoGeometryColumn('tt', 'tt', 'f_areal','g','POLYGON'); + +-- Create a collection layer (will be layer 5) +CREATE TABLE tt.f_coll(id serial); +SELECT 'simple_collection_layer', AddTopoGeometryColumn('tt', 'tt', 'f_coll','g','COLLECTION'); + +-- A couple more invalid calls +select totopogeom('POINT(0 0)'::geometry, 'tt', 30); -- non existent layer +select totopogeom('POINT(0 0)'::geometry, 'tt', 2); -- invalid (hierarchical) layer +select totopogeom('LINESTRING(0 0, 10 10)'::geometry, 'tt', 1); -- invalid (puntual) layer +select totopogeom('LINESTRING(0 0, 10 10)'::geometry, 'tt', 4); -- invalid (areal) layer +select totopogeom('MULTIPOINT(0 0, 10 10)'::geometry, 'tt', 3); -- invalid (lineal) layer +select totopogeom('MULTIPOINT(0 0, 10 10)'::geometry, 'tt', 4); -- invalid (areal) layer +select totopogeom('POLYGON((0 0, 10 10, 10 0, 0 0))'::geometry, 'tt', 1); -- invalid (puntal) layer +select totopogeom('POLYGON((0 0, 10 10, 10 0, 0 0))'::geometry, 'tt', 3); -- invalid (lineal) layer + +-- Convert a point +with inp as ( select 'POINT(0 0)' ::geometry as g) +select St_AsText(g), ST_Equals(totopogeom(g, 'tt', 1)::geometry, g) from inp; + +-- Convert a line +with inp as ( select 'LINESTRING(0 10, 10 10)' ::geometry as g) +select St_AsText(g), ST_Equals(totopogeom(g, 'tt', 3)::geometry, g) from inp; + +-- Convert a polygon +with inp as ( select +'POLYGON((0 20, 10 20, 5 30, 0 20),(2 22, 8 22, 5 28, 2 22))' + ::geometry as g) +select St_AsText(g), ST_Equals(totopogeom(g, 'tt', 4)::geometry, g) from inp; + +-- Convert a multipoint +with inp as ( select 'MULTIPOINT((0 -10),(5 -10))' ::geometry as g) +select St_AsText(g), ST_Equals(totopogeom(g, 'tt', 1)::geometry, g) from inp; + +-- Convert a multiline +with inp as ( select 'MULTILINESTRING((-1 10, -10 10),(-10 8, -2 9))' ::geometry as g) +select St_AsText(g), ST_Equals(totopogeom(g, 'tt', 3)::geometry, g) from inp; + +-- Convert a multipolygon +with inp as ( select +'MULTIPOLYGON(((100 20, 110 20, 105 30, 100 20),(102 22, 108 22, 105 28, 102 22)),((80 20, 90 20, 90 60, 80 20)))' + ::geometry as g) +select St_AsText(g), ST_Equals(totopogeom(g, 'tt', 4)::geometry, g) from inp; + +-- Convert a collection +with +inp as ( select +'GEOMETRYCOLLECTION( + POINT(-100 -100), + LINESTRING(-100 -90,-90 -90), + POLYGON((-100 -80,-90 -80,-95 -70,-100 -80),(-98 -78,-92 -78,-95 -72,-98 -78)), + MULTIPOINT(-100 -110,-95 -110), + LINESTRING EMPTY, + MULTILINESTRING((-101 -90,-110 -90),(-110 -92,-102 -91)), + MULTIPOLYGON(((0 -80,10 -80,5 -70,0 -80),(2 -78,8 -78,5 -72,2 -78)),((-20 -80,-10 -80,-10 -40,-20 -80))) +)' + ::geometry as g), +tg as ( select totopogeom(g, 'tt', 5) as g from inp ) +select St_AsText(inp.g), st_astext(tg.g::geometry) from inp, tg; + + +-- Convert some empties +SELECT ST_AsText(toTopoGeom('POINT EMPTY', 'tt', 1)::geometry); +SELECT ST_AsText(toTopoGeom('MULTIPOINT EMPTY', 'tt', 1)::geometry); +SELECT ST_AsText(toTopoGeom('LINESTRING EMPTY', 'tt', 3)::geometry); +SELECT ST_AsText(toTopoGeom('MULTILINESTRING EMPTY', 'tt', 3)::geometry); +SELECT ST_AsText(toTopoGeom('POLYGON EMPTY', 'tt', 4)::geometry); +SELECT ST_AsText(toTopoGeom('MULTIPOLYGON EMPTY', 'tt', 4)::geometry); +SELECT ST_AsText(toTopoGeom('GEOMETRYCOLLECTION EMPTY', 'tt', 5)::geometry); + +-- Test with tolerance (expect to snap to POINT(-100 -100) +with inp as ( select +'GEOMETRYCOLLECTION( + POINT(-100 -100.5), + LINESTRING(-100 -90,-90 -90.5), + POLYGON((-100 -80,-89.5 -80,-95 -70,-100 -80),(-98 -78,-92 -78,-95 -72.5,-98 -78)) +)' + ::geometry as g), +tg as ( select totopogeom(g, 'tt', 5, 1) as g from inp ) +select 'tolerance_1', ST_HausdorffDistance(inp.g, tg.g::geometry) FROM inp, tg; + +-- Test with tolerance specified in topology record +UPDATE topology.topology SET precision=1 WHERE name = 'tt'; +with inp as ( select +'GEOMETRYCOLLECTION( + POINT(-100 -100.5), + LINESTRING(-100 -90,-90 -90.5), + POLYGON((-100 -80,-89.5 -80,-95 -70,-100 -80),(-98 -78,-92 -78,-95 -72.5,-98 -78)) +)' + ::geometry as g), +tg as ( select totopogeom(g, 'tt', 5) as g from inp ) +select 'tolerance_topo_1', ST_HausdorffDistance(inp.g, tg.g::geometry) FROM inp, tg; + +-- Test without tolerance (expect to remain POINT(-100 -100.5) +UPDATE topology.topology SET precision=0 WHERE name = 'tt'; +with inp as ( select +'GEOMETRYCOLLECTION( + POINT(-100 -100.5), + LINESTRING(-100 -90,-90 -90.5), + POLYGON((-100 -80,-89.5 -80,-95 -70,-100 -80),(-98 -78,-92 -78,-95 -72.5,-98 -78)) +)' + ::geometry as g), +tg as ( select totopogeom(g, 'tt', 5) as g from inp ) +select 'tolerance_0', ST_HausdorffDistance(inp.g, tg.g::geometry) FROM inp, tg; + +-- Test usage with custom search_path (#1763) +set search_path to "public"; +with inp as ( select 'POINT(-100 -100.5)'::geometry as g), +tg as ( select topology.totopogeom(g, 'tt', 1) as g from inp ) +select 'custom_search_path', ST_HausdorffDistance(inp.g, tg.g::geometry) FROM inp, tg; +reset search_path; + +-- http://trac.osgeo.org/postgis/ticket/1790 +UPDATE topology.topology SET precision=0 WHERE name = 'tt'; +with inp as ( select +'GEOMETRYCOLLECTION( + POINT(200 200), + POINT(200 200) +)' + ::geometry as g), +tg as ( select totopogeom(g, 'tt', 5) as g from inp ) +select '#1790.1', ST_HausdorffDistance(inp.g, tg.g::geometry), ST_HausdorffDistance(tg.g::geometry, inp.g) FROM inp, tg; +with inp as ( select +'GEOMETRYCOLLECTION( + LINESTRING(300 300, 310 300), + LINESTRING(300 300, 310 300) +)' + ::geometry as g), +tg as ( select totopogeom(g, 'tt', 5) as g from inp ) +select '#1790.2', ST_HausdorffDistance(inp.g, tg.g::geometry), ST_HausdorffDistance(tg.g::geometry, inp.g) FROM inp, tg; +with inp as ( select +'GEOMETRYCOLLECTION( + POLYGON((400 400, 450 450, 500 400, 400 400)), + POLYGON((400 400, 450 450, 500 400, 400 400)) +)' + ::geometry as g), +tg as ( select totopogeom(g, 'tt', 5) as g from inp ) +select '#1790.3', ST_HausdorffDistance(inp.g, tg.g::geometry), ST_HausdorffDistance(tg.g::geometry, inp.g) FROM inp, tg; + + +DROP TABLE tt.f_coll; +DROP TABLE tt.f_areal; +DROP TABLE tt.f_lineal; +DROP TABLE tt.f_hier; +DROP TABLE tt.f_puntal; +select droptopology('tt'); diff -Nru postgis-1.5.3/topology/test/regress/totopogeom_expected postgis-2.0.1/topology/test/regress/totopogeom_expected --- postgis-1.5.3/topology/test/regress/totopogeom_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/totopogeom_expected 2012-04-25 19:41:33.000000000 +0000 @@ -0,0 +1,39 @@ +create|t +ERROR: No topology with name "unexistent" in topology.topology +ERROR: No layer with id "1" in topology "tt" +ERROR: No topology with name "" in topology.topology +simple_puntual_layer|1 +hierarchical_layer|2 +simple_lineal_layer|3 +simple_areal_layer|4 +simple_collection_layer|5 +ERROR: No layer with id "30" in topology "tt" +ERROR: Layer "2" of topology "tt" is hierarchical, cannot convert to it. +ERROR: Layer "1" of topology "tt" is puntal, cannot hold a lineal feature. +ERROR: Layer "4" of topology "tt" is areal, cannot hold a lineal feature. +ERROR: Layer "3" of topology "tt" is lineal, cannot hold a puntal feature. +ERROR: Layer "4" of topology "tt" is areal, cannot hold a puntal feature. +ERROR: Layer "1" of topology "tt" is puntal, cannot hold an areal feature. +ERROR: Layer "3" of topology "tt" is lineal, cannot hold an areal feature. +POINT(0 0)|t +LINESTRING(0 10,10 10)|t +POLYGON((0 20,10 20,5 30,0 20),(2 22,8 22,5 28,2 22))|t +MULTIPOINT(0 -10,5 -10)|t +MULTILINESTRING((-1 10,-10 10),(-10 8,-2 9))|t +MULTIPOLYGON(((100 20,110 20,105 30,100 20),(102 22,108 22,105 28,102 22)),((80 20,90 20,90 60,80 20)))|t +GEOMETRYCOLLECTION(POINT(-100 -100),LINESTRING(-100 -90,-90 -90),POLYGON((-100 -80,-90 -80,-95 -70,-100 -80),(-98 -78,-92 -78,-95 -72,-98 -78)),MULTIPOINT(-100 -110,-95 -110),LINESTRING EMPTY,MULTILINESTRING((-101 -90,-110 -90),(-110 -92,-102 -91)),MULTIPOLYGON(((0 -80,10 -80,5 -70,0 -80),(2 -78,8 -78,5 -72,2 -78)),((-20 -80,-10 -80,-10 -40,-20 -80))))|GEOMETRYCOLLECTION(MULTIPOLYGON(((-100 -80,-95 -70,-90 -80,-100 -80),(-98 -78,-92 -78,-95 -72,-98 -78)),((0 -80,5 -70,10 -80,0 -80),(2 -78,8 -78,5 -72,2 -78)),((-20 -80,-10 -40,-10 -80,-20 -80))),MULTILINESTRING((-110 -92,-102 -91),(-101 -90,-110 -90),(-100 -90,-90 -90)),MULTIPOINT(-100 -110,-100 -100,-95 -110)) +MULTIPOINT EMPTY +MULTIPOINT EMPTY +MULTILINESTRING EMPTY +MULTILINESTRING EMPTY +MULTIPOLYGON EMPTY +MULTIPOLYGON EMPTY +GEOMETRYCOLLECTION EMPTY +tolerance_1|0.5 +tolerance_topo_1|0.5 +tolerance_0|0 +custom_search_path|0 +#1790.1|0|0 +#1790.2|0|0 +#1790.3|0|0 +Topology 'tt' dropped diff -Nru postgis-1.5.3/topology/test/regress/validatetopology.sql postgis-2.0.1/topology/test/regress/validatetopology.sql --- postgis-1.5.3/topology/test/regress/validatetopology.sql 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/validatetopology.sql 2012-06-12 10:46:27.000000000 +0000 @@ -0,0 +1,24 @@ +\set VERBOSITY terse +set client_min_messages to ERROR; + +-- TODO: merge legacy_validate.sql here + +-- See ticket #1789 +select null from ( select topology.CreateTopology('t') > 0 ) as ct; +COPY t.node (node_id, containing_face, geom) FROM stdin; +1 \N 01010000000000000000E065C002000000008056C0 +2 \N 01010000000000000000E065C000000000008056C0 +3 \N 010100000000000000009865C04FE5D4AD958655C0 +\. +COPY t.edge_data (edge_id, start_node, end_node, next_left_edge, abs_next_left_edge, next_right_edge, abs_next_right_edge, left_face, right_face, geom) FROM stdin; +1 1 3 2 2 1 1 0 0 0102000000020000000000000000E065C002000000008056C000000000009865C04FE5D4AD958655C0 +2 3 2 -2 2 -1 1 0 0 01020000000200000000000000009865C04FE5D4AD958655C00000000000E065C000000000008056C0 +\. +SELECT '#1789', * FROM ValidateTopology('t') UNION +SELECT '#1789', '---', null, null ORDER BY 1,2,3,4; + +SELECT '#1797', (ValidateTopology('t')).* UNION +SELECT '#1797', '---', null, null ORDER BY 1,2,3,4; + +select null from ( select topology.DropTopology('t') ) as dt; + diff -Nru postgis-1.5.3/topology/test/regress/validatetopology_expected postgis-2.0.1/topology/test/regress/validatetopology_expected --- postgis-1.5.3/topology/test/regress/validatetopology_expected 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/test/regress/validatetopology_expected 2012-06-12 10:46:27.000000000 +0000 @@ -0,0 +1,2 @@ +#1789|---|| +#1797|---|| diff -Nru postgis-1.5.3/topology/test/sqlmm_topology.sql postgis-2.0.1/topology/test/sqlmm_topology.sql --- postgis-1.5.3/topology/test/sqlmm_topology.sql 2005-10-18 15:31:26.000000000 +0000 +++ postgis-2.0.1/topology/test/sqlmm_topology.sql 1970-01-01 00:00:00.000000000 +0000 @@ -1,159 +0,0 @@ - --- --- -SELECT topology.DropTopology('sqlmm_topology'); - --- --- ST_InitTopoGeo --- - -SELECT topology.ST_InitTopoGeo('sqlmm_topology'); - -------------------------------------------------------------- --- ST_AddIsoNode (1) -------------------------------------------------------------- - -SELECT '-- ST_AddIsoNode ------------------------'; - --- null input -SELECT topology.ST_AddIsoNode('sqlmm_topology', NULL, NULL); -SELECT topology.ST_AddIsoNode(NULL, NULL, 'POINT(0 0)'); -SELECT topology.ST_AddIsoNode(NULL, 1, NULL); - --- good nodes on the 'world' face -SELECT topology.ST_AddIsoNode('sqlmm_topology', NULL, 'POINT(0 0)'); -SELECT topology.ST_AddIsoNode('sqlmm_topology', NULL, 'POINT(10 0)'); -SELECT topology.ST_AddIsoNode('sqlmm_topology', NULL, 'POINT(5 0)'); -SELECT topology.ST_AddIsoNode('sqlmm_topology', NULL, 'POINT(5 10)'); -SELECT topology.ST_AddIsoNode('sqlmm_topology', NULL, 'POINT(10 10)'); -SELECT topology.ST_AddIsoNode('sqlmm_topology', NULL, 'POINT(20 10)'); - --- existing nodes -SELECT topology.ST_AddIsoNode('sqlmm_topology', NULL, 'POINT(0 0)'); -SELECT topology.ST_AddIsoNode('sqlmm_topology', NULL, 'POINT(10 0)'); - --- other good ones (add another 0 to be detected as coincident) -SELECT topology.ST_AddIsoNode('sqlmm_topology', NULL, 'POINT(10.000000000000001 0)'); -SELECT topology.ST_AddIsoNode('sqlmm_topology', NULL, 'POINT(7 10)'); - --- non-existent face specification -SELECT topology.ST_AddIsoNode('sqlmm_topology', 1, 'POINT(20 0)'); - --- using other then point -SELECT topology.ST_AddIsoNode('sqlmm_topology', 1, 'MULTIPOINT(20 0)'); - --- coincident nodes -SELECT topology.ST_AddIsoNode('sqlmm_topology', NULL, 'POINT(10.000000000000001 0)'); -SELECT topology.ST_AddIsoNode('sqlmm_topology', NULL, 'POINT(0 0)'); -SELECT topology.ST_AddIsoNode('sqlmm_topology', NULL, 'POINT(10 0)'); - --- ST_AddIsoNode not within face (TODO when ST_GetFaceGeometry is done) - ------------------------------------------- --- ST_AddIsoEdge (1) ------------------------------------------- - -SELECT '-- ST_AddIsoEdge ------------------------'; - --- null input -SELECT topology.ST_AddIsoEdge('sqlmm_topology', 1, 2, NULL); -SELECT topology.ST_AddIsoEdge(NULL, 1, 2, 'LINESTRING(0 0, 1 1)'); -SELECT topology.ST_AddIsoEdge('sqlmm_topology', 1, NULL, 'LINESTRING(0 0, 1 1)'); -SELECT topology.ST_AddIsoEdge('sqlmm_topology', NULL, 2, 'LINESTRING(0 0, 1 1)'); - --- invalid curve -SELECT topology.ST_AddIsoEdge('sqlmm_topology', 1, 2, 'POINT(0 0)'); - --- non-simple curve -SELECT topology.ST_AddIsoEdge('sqlmm_topology', 1, 2, 'LINESTRING(0 0, 10 0, 5 5, 5 -5)'); - --- non-existing nodes -SELECT topology.ST_AddIsoEdge('sqlmm_topology', 10000, 2, 'LINESTRING(0 0, 1 1)'); - --- Curve endpoints mismatch -SELECT topology.ST_AddIsoEdge('sqlmm_topology', 1, 2, 'LINESTRING(0 0, 1 1)'); -SELECT topology.ST_AddIsoEdge('sqlmm_topology', 1, 2, 'LINESTRING(0 1, 10 0)'); - --- Node crossing -SELECT topology.ST_AddIsoEdge('sqlmm_topology', 1, 2, 'LINESTRING(0 0, 10 0)'); - --- Good ones -SELECT topology.ST_AddIsoEdge('sqlmm_topology', 4, 5, 'LINESTRING(5 10, 5 9, 10 10)'); -SELECT topology.ST_AddIsoEdge('sqlmm_topology', 1, 2, 'LINESTRING(0 0, 2 1, 10 5, 10 0)'); - --- Not isolated edge (shares endpoint with previous) -SELECT topology.ST_AddIsoEdge('sqlmm_topology', 4, 6, 'LINESTRING(5 10, 10 9, 20 10)'); -SELECT topology.ST_AddIsoEdge('sqlmm_topology', 5, 6, 'LINESTRING(10 10, 20 10)'); - --- Edge intersection (geometry intersects an edge) -SELECT topology.ST_AddIsoEdge('sqlmm_topology', 1, 2, 'LINESTRING(0 0, 2 20, 10 0)'); - --- on different faces (TODO req. nodes contained in face) - - -------------------------------------------------------------- --- ST_AddIsoNode (2) -------------------------------------------------------------- - -SELECT '-- ST_AddIsoNode(2) ------------------------'; - --- ST_AddIsoNode edge-crossing node -SELECT topology.ST_AddIsoNode('sqlmm_topology', NULL, 'POINT(5 9.5)'); - -------------------------------------------------------------- --- ST_ChangeEdgeGeom -------------------------------------------------------------- - -SELECT '-- ST_ChangeEdgeGeom ------------------------'; - --- good one -SELECT topology.ST_ChangeEdgeGeom('sqlmm_topology', 1, 'LINESTRING(5 10, 5 8, 10 10)'); - --- start/end points mismatch -SELECT topology.ST_ChangeEdgeGeom('sqlmm_topology', 1, 'LINESTRING(5 9, 5 8, 10 10)'); -SELECT topology.ST_ChangeEdgeGeom('sqlmm_topology', 1, 'LINESTRING(5 10, 5 8, 10 9)'); - --- Node crossing -SELECT topology.ST_ChangeEdgeGeom('sqlmm_topology', 1, 'LINESTRING(5 10, 10 10)'); - -------------------------------------------------------------- --- ST_RemoveIsoNode -------------------------------------------------------------- - -SELECT '-- ST_RemoveIsoNode ------------------------'; - --- Isolated node -SELECT topology.ST_RemoveIsoNode('sqlmm_topology', 1); - --- Non isolated node (is used by an edge); -SELECT topology.ST_RemoveIsoNode('sqlmm_topology', 4); - -------------------------------------------------------------- --- ST_MoveIsoNode -------------------------------------------------------------- - -SELECT '-- ST_MoveIsoNode ------------------------'; - --- Isolated node to invalid location (coincident) -SELECT topology.ST_MoveIsoNode('sqlmm_topology', 2, 'POINT(5 10)'); -SELECT topology.ST_MoveIsoNode('sqlmm_topology', 2, 'POINT(4 4)'); - --- Non isolated node (is used by an edge); -SELECT topology.ST_MoveIsoNode('sqlmm_topology', 4, 'POINT(5 4)'); - --- Invalid point -SELECT topology.ST_MoveIsoNode('sqlmm_topology', 2, 'MULTIPOINT(5 4)'); - -------------------------------------------------------------- --- ST_RemoveIsoEdge -------------------------------------------------------------- -SELECT '-- ST_RemoveIsoEdge ---------------------'; - -SELECT topology.ST_RemoveIsoEdge('sqlmm_topology', 1); - -------------------------------------------------------------- --- ST_NewEdgesSplit -------------------------------------------------------------- - -SELECT '-- ST_NewEdgesSplit ---------------------'; -SELECT topology.ST_NewEdgesSplit('sqlmm_topology', 2, 'POINT(10 2)'); diff -Nru postgis-1.5.3/topology/test/validate_topology.sql postgis-2.0.1/topology/test/validate_topology.sql --- postgis-1.5.3/topology/test/validate_topology.sql 2005-10-13 16:21:49.000000000 +0000 +++ postgis-2.0.1/topology/test/validate_topology.sql 2012-02-27 22:08:12.000000000 +0000 @@ -1,3 +1,5 @@ -- Validate topology +SELECT 'Topology validation errors follow:'; SELECT * from topology.validatetopology('city_data'); +SELECT 'End of topology validation errors'; diff -Nru postgis-1.5.3/topology/topology.sql.in.c postgis-2.0.1/topology/topology.sql.in.c --- postgis-1.5.3/topology/topology.sql.in.c 2009-02-11 18:28:53.000000000 +0000 +++ postgis-2.0.1/topology/topology.sql.in.c 2012-06-12 17:28:30.000000000 +0000 @@ -1,173 +1,203 @@ -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- --- $Id: topology.sql.in.c 3687 2009-02-11 18:28:53Z pramsey $ +-- $Id: topology.sql.in.c 9903 2012-06-12 17:28:30Z strk $ -- -- PostGIS - Spatial Types for PostgreSQL -- http://postgis.refractions.net --- Copyright 2005 Refractions Research Inc. +-- +-- Copyright (C) 2010, 2011 Sandro Santilli +-- Copyright (C) 2005 Refractions Research Inc. -- -- This is free software; you can redistribute and/or modify it under -- the terms of the GNU General Public Licence. See the COPYING file. -- --- Author: Sandro Santilli +-- Author: Sandro Santilli -- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- -- STATUS: -- --- All objects are created in the 'topology' schema. +-- All objects are created in the 'topology' schema. -- --- We have PostGIS-specific objects and SQL/MM objects. --- PostGIS-specific objects have no prefix, SQL/MM ones --- have the ``ST_'' prefix. --- +-- We have PostGIS-specific objects and SQL/MM objects. +-- PostGIS-specific objects have no prefix, SQL/MM ones +-- have the ``ST_' prefix. +-- -- [PostGIS-specific] -- --- TABLE topology --- Table storing topology info (name, srid, precision) +-- TABLE topology +-- Table storing topology info (name, srid, precision) -- --- TYPE TopoGeometry --- Complex type storing topology_id, layer_id, geometry type --- and topogeometry id. --- --- DOMAIN TopoElement --- An array of two elements: element_id and element_type. --- In fact, an array of integers. --- --- DOMAIN TopoElementArray --- An array of element_id,element_type values. --- In fact, a bidimensional array of integers: --- '{{id,type}, {id,type}, ...}' --- --- FUNCTION CreateTopology(name, [srid], [precision]) --- Initialize a new topology (creating schema with --- edge,face,node,relation) and add a record into --- the topology.topology table. --- TODO: add triggers (or rules, or whatever) enforcing --- precision to the edge and node tables. +-- TYPE TopoGeometry +-- Complex type storing topology_id, layer_id, geometry type +-- and topogeometry id. +-- +-- DOMAIN TopoElement +-- An array of two elements: element_id and element_type. +-- In fact, an array of integers. +-- +-- DOMAIN TopoElementArray +-- An array of element_id,element_type values. +-- In fact, a bidimensional array of integers: +-- '{{id,type}, {id,type}, ...}' +-- +-- FUNCTION CreateTopology(name, [srid], [precision]) +-- Initialize a new topology (creating schema with +-- edge,face,node,relation) and add a record into +-- the topology.topology table. +-- TODO: add triggers (or rules, or whatever) enforcing +-- precision to the edge and node tables. -- --- FUNCTION DropTopology(name) --- Delete a topology removing reference from the --- topology.topology table --- --- FUNCTION GetTopologyId(name) --- FUNCTION GetTopologyName(id) --- Return info about a Topology --- --- FUNCTION AddTopoGeometryColumn(toponame, schema, table, column, geomtype) --- Add a TopoGeometry column to a table, making it a topology layer. --- Returns created layer id. --- --- FUNCTION DropTopoGeometryColumn(schema, table, column) --- Drop a TopoGeometry column, unregister the associated layer, --- cleanup the relation table. --- --- FUNCTION CreateTopoGeom(toponame, geomtype, layer_id, topo_objects) --- Create a TopoGeometry object from existing Topology elements. --- The "topo_objects" parameter is of TopoElementArray type. --- --- FUNCTION GetTopoGeomElementArray(toponame, layer_id, topogeom_id) --- FUNCTION GetTopoGeomElementArray(TopoGeometry) --- Returns a TopoElementArray object containing the topological --- elements of the given TopoGeometry. --- --- FUNCTION GetTopoGeomElements(toponame, layer_id, topogeom_id) --- FUNCTION GetTopoGeomElements(TopoGeometry) --- Returns a set of TopoElement objects containing the --- topological elements of the given TopoGeometry (primitive --- elements) --- --- FUNCTION ValidateTopology(toponame) --- Run validity checks on the topology, returning, for each --- detected error, a 3-columns row containing error string --- and references to involved topo elements: error, id1, id2 +-- FUNCTION DropTopology(name) +-- Delete a topology removing reference from the +-- topology.topology table +-- +-- FUNCTION GetTopologyId(name) +-- FUNCTION GetTopologySRID(name) +-- FUNCTION GetTopologyName(id) +-- Return info about a Topology +-- +-- FUNCTION AddTopoGeometryColumn(toponame, schema, table, column, geomtype) +-- Add a TopoGeometry column to a table, making it a topology layer. +-- Returns created layer id. +-- +-- FUNCTION DropTopoGeometryColumn(schema, table, column) +-- Drop a TopoGeometry column, unregister the associated layer, +-- cleanup the relation table. +-- +-- FUNCTION CreateTopoGeom(toponame, geomtype, layer_id, topo_objects) +-- Create a TopoGeometry object from existing Topology elements. +-- The "topo_objects" parameter is of TopoElementArray type. +-- +-- FUNCTION GetTopoGeomElementArray(toponame, layer_id, topogeom_id) +-- FUNCTION GetTopoGeomElementArray(TopoGeometry) +-- Returns a TopoElementArray object containing the topological +-- elements of the given TopoGeometry. +-- +-- FUNCTION GetTopoGeomElements(toponame, layer_id, topogeom_id) +-- FUNCTION GetTopoGeomElements(TopoGeometry) +-- Returns a set of TopoElement objects containing the +-- topological elements of the given TopoGeometry (primitive +-- elements) +-- +-- FUNCTION ValidateTopology(toponame) +-- Run validity checks on the topology, returning, for each +-- detected error, a 3-columns row containing error string +-- and references to involved topo elements: error, id1, id2 -- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- --- Overloaded functions for TopoGeometry inputs +-- Overloaded functions for TopoGeometry inputs -- --- FUNCTION intersects(TopoGeometry, TopoGeometry) --- FUNCTION equals(TopoGeometry, TopoGeometry) +-- FUNCTION intersects(TopoGeometry, TopoGeometry) +-- FUNCTION equals(TopoGeometry, TopoGeometry) -- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- --- FUNCTION TopoGeo_AddPoint(toponame, point) --- Add a Point geometry to the topology --- TODO: accept a topology/layer id --- rework to use existing node if existent --- --- FUNCTION TopoGeo_AddLinestring(toponame, line) --- Add a LineString geometry to the topology --- TODO: accept a topology/layer id --- rework to use existing nodes/edges --- splitting them if required --- --- FUNCTION TopoGeo_AddPolygon(toponame, polygon) --- Add a Polygon geometry to the topology --- TODO: implement +-- FUNCTION TopoGeo_AddPoint(toponame, point) +-- Add a Point geometry to the topology +-- TODO: accept a topology/layer id +-- rework to use existing node if existent +-- +-- FUNCTION TopoGeo_AddLinestring(toponame, line) +-- Add a LineString geometry to the topology +-- TODO: accept a topology/layer id +-- rework to use existing nodes/edges +-- splitting them if required +-- +-- FUNCTION TopoGeo_AddPolygon(toponame, polygon) +-- Add a Polygon geometry to the topology +-- TODO: implement -- --- TYPE GetFaceEdges_ReturnType --- Complex type used to return tuples from ST_GetFaceEdges +-- TYPE GetFaceEdges_ReturnType +-- Complex type used to return tuples from ST_GetFaceEdges -- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- -- [SQL/MM] -- -- ST_InitTopoGeo --- Done, can be modified to include explicit sequences or --- more constraints. Very noisy due to implicit index creations --- for primary keys and sequences for serial fields... +-- Done, can be modified to include explicit sequences or +-- more constraints. Very noisy due to implicit index creations +-- for primary keys and sequences for serial fields... -- -- ST_CreateTopoGeo --- Being working on. TODO: continue implementation +-- Complete -- -- ST_AddIsoNode --- Complete +-- Complete -- -- ST_RemoveIsoNode --- Complete +-- Complete -- -- ST_MoveIsoNode --- Complete +-- Complete -- -- ST_AddIsoEdge --- Complete +-- Complete -- -- ST_RemoveIsoEdge --- Complete, exceptions untested +-- Complete, exceptions untested -- -- ST_ChangeEdgeGeom --- Complete +-- Complete -- -- ST_NewEdgesSplit --- Complete --- this also updates the Relation table --- TODO: add entries to the History table ? --- --- ST_ModEdgesSplit --- Complete --- this also updates the Relation table --- TODO: add entries to the History table ? +-- Complete +-- Also updates the Relation table +-- +-- ST_ModEdgeSplit +-- Complete +-- Also updates the Relation table -- -- ST_AddEdgeNewFaces --- Being working on. TODO: continue +-- Complete +-- Also updates the Relation table +-- +-- ST_AddEdgeModFace +-- Complete +-- Also updates the Relation table -- -- ST_GetFaceEdges --- Unimplemented (C seems appropriate) +-- Complete +-- +-- ST_ModEdgeHeal +-- Complete +-- Also updates the Relation table +-- +-- ST_NewEdgeHeal +-- Complete +-- Also updates the Relation table -- -- ST_GetFaceGeometry --- Implemented using polygonize() +-- Implemented using ST_BuildArea() +-- +-- ST_RemEdgeNewFace +-- Complete +-- Also updates the Relation table +-- +-- ST_RemEdgeModFace +-- Complete +-- Also updates the Relation table +-- +-- ST_ValidateTopoGeo +-- Unimplemented (probably a wrapper around ValidateTopology) -- -- -#include "../postgis/sqldefines.h" +-- Uninstalling previous installation isn't really a good habit ... +-- Let people decide about that +-- DROP SCHEMA topology CASCADE; -DROP SCHEMA topology CASCADE; +#include "../postgis/sqldefines.h" -BEGIN; CREATE SCHEMA topology; +-- Doing everything outside of a transaction helps +-- upgrading in the best case. +BEGIN; + --={ ---------------------------------------------------------------- -- POSTGIS-SPECIFIC block -- @@ -180,93 +210,93 @@ -- Stores id,name,precision and SRID of topologies. -- CREATE TABLE topology.topology ( - id SERIAL NOT NULL PRIMARY KEY, - name VARCHAR NOT NULL UNIQUE, - SRID INTEGER NOT NULL, - precision FLOAT8 NOT NULL + id SERIAL NOT NULL PRIMARY KEY, + name VARCHAR NOT NULL UNIQUE, + SRID INTEGER NOT NULL, + precision FLOAT8 NOT NULL, + hasz BOOLEAN NOT NULL DEFAULT false ); --{ LayerTrigger() -- -- Layer integrity trigger -- -CREATEFUNCTION topology.LayerTrigger() - RETURNS trigger +CREATE OR REPLACE FUNCTION topology.LayerTrigger() + RETURNS trigger AS -' +$$ DECLARE - rec RECORD; - ok BOOL; - toponame varchar; - query TEXT; -BEGIN - - --RAISE NOTICE ''LayerTrigger called % % at % level'', TG_WHEN, TG_OP, TG_LEVEL; - - - IF TG_OP = ''INSERT'' THEN - RAISE EXCEPTION ''LayerTrigger not meant to be called on INSERT''; - ELSIF TG_OP = ''UPDATE'' THEN - RAISE EXCEPTION ''The topology.layer table cannot be updated''; - END IF; - - - -- Check for existance of any feature column referencing - -- this layer - FOR rec IN SELECT * FROM pg_namespace n, pg_class c, pg_attribute a - WHERE text(n.nspname) = OLD.schema_name - AND c.relnamespace = n.oid - AND text(c.relname) = OLD.table_name - AND a.attrelid = c.oid - AND text(a.attname) = OLD.feature_column - LOOP - query = ''SELECT * '' - || '' FROM '' || quote_ident(OLD.schema_name) - || ''.'' || quote_ident(OLD.table_name) - || '' WHERE layer_id('' - || quote_ident(OLD.feature_column)||'') '' - || ''='' || OLD.layer_id - || '' LIMIT 1''; - --RAISE NOTICE ''%'', query; - FOR rec IN EXECUTE query - LOOP - RAISE NOTICE ''A feature referencing layer % of topology % still exists in %.%.%'', OLD.layer_id, OLD.topology_id, OLD.schema_name, OLD.table_name, OLD.feature_column; - RETURN NULL; - END LOOP; - END LOOP; - - - -- Get topology name - SELECT name FROM topology.topology INTO toponame - WHERE id = OLD.topology_id; - - IF toponame IS NULL THEN - RAISE NOTICE ''Could not find name of topology with id %'', - OLD.layer_id; - END IF; - - -- Check if any record in the relation table references this layer - FOR rec IN SELECT * FROM pg_namespace - WHERE text(nspname) = toponame - LOOP - query = ''SELECT * '' - || '' FROM '' || quote_ident(toponame) - || ''.relation '' - || '' WHERE topogeo_id = '' || OLD.topology_id - || '' AND layer_id = ''|| OLD.layer_id - || '' LIMIT 1''; - --RAISE NOTICE ''%'', query; - FOR rec IN EXECUTE query - LOOP - RAISE NOTICE ''A record in %.relation still references layer %'', toponame, OLD.layer_id; - RETURN NULL; - END LOOP; - END LOOP; + rec RECORD; + ok BOOL; + toponame varchar; + query TEXT; +BEGIN + + --RAISE NOTICE 'LayerTrigger called % % at % level', TG_WHEN, TG_OP, TG_LEVEL; + + + IF TG_OP = 'INSERT' THEN + RAISE EXCEPTION 'LayerTrigger not meant to be called on INSERT'; + ELSIF TG_OP = 'UPDATE' THEN + RAISE EXCEPTION 'The topology.layer table cannot be updated'; + END IF; + + + -- Check for existance of any feature column referencing + -- this layer + FOR rec IN SELECT * FROM pg_namespace n, pg_class c, pg_attribute a + WHERE text(n.nspname) = OLD.schema_name + AND c.relnamespace = n.oid + AND text(c.relname) = OLD.table_name + AND a.attrelid = c.oid + AND text(a.attname) = OLD.feature_column + LOOP + query = 'SELECT * ' + || ' FROM ' || quote_ident(OLD.schema_name) + || '.' || quote_ident(OLD.table_name) + || ' WHERE layer_id(' + || quote_ident(OLD.feature_column)||') ' + || '=' || OLD.layer_id + || ' LIMIT 1'; + --RAISE NOTICE '%', query; + FOR rec IN EXECUTE query + LOOP + RAISE NOTICE 'A feature referencing layer % of topology % still exists in %.%.%', OLD.layer_id, OLD.topology_id, OLD.schema_name, OLD.table_name, OLD.feature_column; + RETURN NULL; + END LOOP; + END LOOP; + + + -- Get topology name + SELECT name FROM topology.topology INTO toponame + WHERE id = OLD.topology_id; + + IF toponame IS NULL THEN + RAISE NOTICE 'Could not find name of topology with id %', + OLD.layer_id; + END IF; + + -- Check if any record in the relation table references this layer + FOR rec IN SELECT * FROM pg_namespace + WHERE text(nspname) = toponame + LOOP + query = 'SELECT * ' + || ' FROM ' || quote_ident(toponame) + || '.relation ' + || ' WHERE layer_id = '|| OLD.layer_id + || ' LIMIT 1'; + --RAISE NOTICE '%', query; + FOR rec IN EXECUTE query + LOOP + RAISE NOTICE 'A record in %.relation still references layer %', toponame, OLD.layer_id; + RETURN NULL; + END LOOP; + END LOOP; - RETURN OLD; + RETURN OLD; END; -' -LANGUAGE 'plpgsql' _VOLATILE_STRICT; +$$ +LANGUAGE 'plpgsql' VOLATILE STRICT; --} LayerTrigger() @@ -275,17 +305,17 @@ -- Stores topology layer informations -- CREATE TABLE topology.layer ( - topology_id INTEGER NOT NULL - REFERENCES topology.topology(id), - layer_id integer NOT NULL, - schema_name VARCHAR NOT NULL, - table_name VARCHAR NOT NULL, - feature_column VARCHAR NOT NULL, - feature_type VARCHAR NOT NULL, - level INTEGER NOT NULL DEFAULT 0, - child_id INTEGER DEFAULT NULL, - UNIQUE(schema_name, table_name, feature_column), - PRIMARY KEY(topology_id, layer_id) + topology_id INTEGER NOT NULL + REFERENCES topology.topology(id), + layer_id integer NOT NULL, + schema_name VARCHAR NOT NULL, + table_name VARCHAR NOT NULL, + feature_column VARCHAR NOT NULL, + feature_type integer NOT NULL, + level INTEGER NOT NULL DEFAULT 0, + child_id INTEGER DEFAULT NULL, + UNIQUE(schema_name, table_name, feature_column), + PRIMARY KEY(topology_id, layer_id) ); CREATE TRIGGER layer_integrity_checks BEFORE UPDATE OR DELETE @@ -294,211 +324,220 @@ --} Layer table. -- --- Type returned by ST_GetFaceEdges --- -CREATE TYPE topology.GetFaceEdges_ReturnType AS ( - sequence integer, - edge integer -); - --- -- Type returned by ValidateTopology -- CREATE TYPE topology.ValidateTopology_ReturnType AS ( - error varchar, - id1 integer, - id2 integer + error varchar, + id1 integer, + id2 integer ); -- -- TopoGeometry type -- CREATE TYPE topology.TopoGeometry AS ( - topology_id integer, - layer_id integer, - id integer, - type integer -- 1: [multi]point, 2: [multi]line, - -- 3: [multi]polygon, 4: collection + topology_id integer, + layer_id integer, + id integer, + type integer -- 1: [multi]point, 2: [multi]line, + -- 3: [multi]polygon, 4: collection ); -- -- TopoElement domain +-- +-- This is an array of two elements: element_id and element_type. +-- +-- When used to define _simple_ TopoGeometries, +-- element_type can be: +-- 0: a node +-- 1: an edge +-- 2: a face +-- and element_id will be the node, edge or face identifier +-- +-- When used to define _hierarchical_ TopoGeometries, +-- element_type will be the child layer identifier and +-- element_id will be composing TopoGoemetry identifier -- CREATE DOMAIN topology.TopoElement AS integer[] - CONSTRAINT DIMENSIONS CHECK ( - array_upper(VALUE, 2) IS NULL - AND array_upper(VALUE, 1) = 2 - ); + CONSTRAINT DIMENSIONS CHECK ( + array_upper(VALUE, 2) IS NULL + AND array_upper(VALUE, 1) = 2 + ); +ALTER DOMAIN topology.TopoElement ADD + CONSTRAINT lower_dimension CHECK ( + array_lower(VALUE, 1) = 1 + ); +ALTER DOMAIN topology.TopoElement DROP CONSTRAINT +#if POSTGIS_PGSQL_VERSION >= 92 + IF EXISTS +#endif + type_range; +ALTER DOMAIN topology.TopoElement ADD + CONSTRAINT type_range CHECK ( + VALUE[2] > 0 + ); + -- -- TopoElementArray domain -- CREATE DOMAIN topology.TopoElementArray AS integer[][] - CONSTRAINT DIMENSIONS CHECK ( - array_upper(VALUE, 2) IS NOT NULL - AND array_upper(VALUE, 2) = 2 - AND array_upper(VALUE, 3) IS NULL - ); - --- --- TopoGeomElementArray domain --- -CREATE DOMAIN topology.TopoGeomElementArray AS integer[][] - CONSTRAINT DIMENSIONS CHECK ( - array_upper(VALUE, 2) IS NOT NULL - AND array_upper(VALUE, 2) = 2 - AND array_upper(VALUE, 3) IS NULL - ); + CONSTRAINT DIMENSIONS CHECK ( + array_upper(VALUE, 2) IS NOT NULL + AND array_upper(VALUE, 2) = 2 + AND array_upper(VALUE, 3) IS NULL + ); --{ RelationTrigger() -- -- Relation integrity trigger -- -CREATEFUNCTION topology.RelationTrigger() - RETURNS trigger +CREATE OR REPLACE FUNCTION topology.RelationTrigger() + RETURNS trigger AS -' +$$ DECLARE - toponame varchar; - topoid integer; - plyr RECORD; -- parent layer - rec RECORD; - ok BOOL; - -BEGIN - IF TG_NARGS != 2 THEN - RAISE EXCEPTION ''RelationTrigger called with wrong number of arguments''; - END IF; - - topoid = TG_ARGV[0]; - toponame = TG_ARGV[1]; - - --RAISE NOTICE ''RelationTrigger called % % on %.relation for a %'', TG_WHEN, TG_OP, toponame, TG_LEVEL; - - - IF TG_OP = ''DELETE'' THEN - RAISE EXCEPTION ''RelationTrigger not meant to be called on DELETE''; - END IF; - - -- Get layer info (and verify it exists) - ok = false; - FOR plyr IN EXECUTE ''SELECT * FROM topology.layer '' - || ''WHERE '' - || '' topology_id = '' || topoid - || '' AND'' - || '' layer_id = '' || NEW.layer_id - LOOP - ok = true; - EXIT; - END LOOP; - IF NOT ok THEN - RAISE EXCEPTION ''Layer % does not exist in topology %'', - NEW.layer_id, topoid; - RETURN NULL; - END IF; - - IF plyr.level > 0 THEN -- this is hierarchical layer - - -- ElementType must be the layer child id - IF NEW.element_type != plyr.child_id THEN - RAISE EXCEPTION ''Type of elements in layer % must be set to its child layer id %'', plyr.layer_id, plyr.child_id; - RETURN NULL; - END IF; - - -- ElementId must be an existent TopoGeometry in child layer - ok = false; - FOR rec IN EXECUTE ''SELECT topogeo_id FROM '' - || quote_ident(toponame) || ''.relation '' - || '' WHERE layer_id = '' || plyr.child_id - || '' AND topogeo_id = '' || NEW.element_id - LOOP - ok = true; - EXIT; - END LOOP; - IF NOT ok THEN - RAISE EXCEPTION ''TopoGeometry % does not exist in the child layer %'', NEW.element_id, plyr.child_id; - RETURN NULL; - END IF; - - ELSE -- this is a basic layer - - -- ElementType must be compatible with layer type - IF plyr.feature_type != 4 - AND plyr.feature_type != NEW.element_type - THEN - RAISE EXCEPTION ''Element of type % is not compatible with layer of type %'', NEW.element_type, plyr.feature_type; - RETURN NULL; - END IF; - - -- - -- Now lets see if the element is consistent, which - -- is it exists in the topology tables. - -- - - -- - -- Element is a Node - -- - IF NEW.element_type = 1 - THEN - ok = false; - FOR rec IN EXECUTE ''SELECT node_id FROM '' - || quote_ident(toponame) || ''.node '' - || '' WHERE node_id = '' || NEW.element_id - LOOP - ok = true; - EXIT; - END LOOP; - IF NOT ok THEN - RAISE EXCEPTION ''Node % does not exist in topology %'', NEW.element_id, toponame; - RETURN NULL; - END IF; - - -- - -- Element is an Edge - -- - ELSIF NEW.element_type = 2 - THEN - ok = false; - FOR rec IN EXECUTE ''SELECT edge_id FROM '' - || quote_ident(toponame) || ''.edge_data '' - || '' WHERE edge_id = '' || abs(NEW.element_id) - LOOP - ok = true; - EXIT; - END LOOP; - IF NOT ok THEN - RAISE EXCEPTION ''Edge % does not exist in topology %'', NEW.element_id, toponame; - RETURN NULL; - END IF; - - -- - -- Element is a Face - -- - ELSIF NEW.element_type = 3 - THEN - IF NEW.element_id = 0 THEN - RAISE EXCEPTION ''Face % cannot be associated with any feature'', NEW.element_id; - RETURN NULL; - END IF; - ok = false; - FOR rec IN EXECUTE ''SELECT face_id FROM '' - || quote_ident(toponame) || ''.face '' - || '' WHERE face_id = '' || NEW.element_id - LOOP - ok = true; - EXIT; - END LOOP; - IF NOT ok THEN - RAISE EXCEPTION ''Face % does not exist in topology %'', NEW.element_id, toponame; - RETURN NULL; - END IF; - END IF; - - END IF; - - RETURN NEW; + toponame varchar; + topoid integer; + plyr RECORD; -- parent layer + rec RECORD; + ok BOOL; + +BEGIN + IF TG_NARGS != 2 THEN + RAISE EXCEPTION 'RelationTrigger called with wrong number of arguments'; + END IF; + + topoid = TG_ARGV[0]; + toponame = TG_ARGV[1]; + + --RAISE NOTICE 'RelationTrigger called % % on %.relation for a %', TG_WHEN, TG_OP, toponame, TG_LEVEL; + + + IF TG_OP = 'DELETE' THEN + RAISE EXCEPTION 'RelationTrigger not meant to be called on DELETE'; + END IF; + + -- Get layer info (and verify it exists) + ok = false; + FOR plyr IN EXECUTE 'SELECT * FROM topology.layer ' + || 'WHERE ' + || ' topology_id = ' || topoid + || ' AND' + || ' layer_id = ' || NEW.layer_id + LOOP + ok = true; + EXIT; + END LOOP; + IF NOT ok THEN + RAISE EXCEPTION 'Layer % does not exist in topology %', + NEW.layer_id, topoid; + RETURN NULL; + END IF; + + IF plyr.level > 0 THEN -- this is hierarchical layer + + -- ElementType must be the layer child id + IF NEW.element_type != plyr.child_id THEN + RAISE EXCEPTION 'Type of elements in layer % must be set to its child layer id %', plyr.layer_id, plyr.child_id; + RETURN NULL; + END IF; + + -- ElementId must be an existent TopoGeometry in child layer + ok = false; + FOR rec IN EXECUTE 'SELECT topogeo_id FROM ' + || quote_ident(toponame) || '.relation ' + || ' WHERE layer_id = ' || plyr.child_id + || ' AND topogeo_id = ' || NEW.element_id + LOOP + ok = true; + EXIT; + END LOOP; + IF NOT ok THEN + RAISE EXCEPTION 'TopoGeometry % does not exist in the child layer %', NEW.element_id, plyr.child_id; + RETURN NULL; + END IF; + + ELSE -- this is a basic layer + + -- ElementType must be compatible with layer type + IF plyr.feature_type != 4 + AND plyr.feature_type != NEW.element_type + THEN + RAISE EXCEPTION 'Element of type % is not compatible with layer of type %', NEW.element_type, plyr.feature_type; + RETURN NULL; + END IF; + + -- + -- Now lets see if the element is consistent, which + -- is it exists in the topology tables. + -- + + -- + -- Element is a Node + -- + IF NEW.element_type = 1 + THEN + ok = false; + FOR rec IN EXECUTE 'SELECT node_id FROM ' + || quote_ident(toponame) || '.node ' + || ' WHERE node_id = ' || NEW.element_id + LOOP + ok = true; + EXIT; + END LOOP; + IF NOT ok THEN + RAISE EXCEPTION 'Node % does not exist in topology %', NEW.element_id, toponame; + RETURN NULL; + END IF; + + -- + -- Element is an Edge + -- + ELSIF NEW.element_type = 2 + THEN + ok = false; + FOR rec IN EXECUTE 'SELECT edge_id FROM ' + || quote_ident(toponame) || '.edge_data ' + || ' WHERE edge_id = ' || abs(NEW.element_id) + LOOP + ok = true; + EXIT; + END LOOP; + IF NOT ok THEN + RAISE EXCEPTION 'Edge % does not exist in topology %', NEW.element_id, toponame; + RETURN NULL; + END IF; + + -- + -- Element is a Face + -- + ELSIF NEW.element_type = 3 + THEN + IF NEW.element_id = 0 THEN + RAISE EXCEPTION 'Face % cannot be associated with any feature', NEW.element_id; + RETURN NULL; + END IF; + ok = false; + FOR rec IN EXECUTE 'SELECT face_id FROM ' + || quote_ident(toponame) || '.face ' + || ' WHERE face_id = ' || NEW.element_id + LOOP + ok = true; + EXIT; + END LOOP; + IF NOT ok THEN + RAISE EXCEPTION 'Face % does not exist in topology %', NEW.element_id, toponame; + RETURN NULL; + END IF; + END IF; + + END IF; + + RETURN NEW; END; -' -LANGUAGE 'plpgsql' _VOLATILE_STRICT; +$$ +LANGUAGE 'plpgsql' VOLATILE STRICT; --} RelationTrigger() --{ @@ -508,134 +547,118 @@ -- Returns created layer id. -- -- -CREATEFUNCTION topology.AddTopoGeometryColumn(varchar, varchar, varchar, varchar, varchar, integer) - RETURNS integer -AS ' +CREATE OR REPLACE FUNCTION topology.AddTopoGeometryColumn(toponame varchar, schema varchar, tbl varchar, col varchar, ltype varchar, child integer) + RETURNS integer +AS +$$ DECLARE - toponame alias for $1; - schema alias for $2; - table alias for $3; - col alias for $4; - ltype alias for $5; - child alias for $6; - intltype integer; - level integer; - topoid integer; - rec RECORD; - layer_id integer; - query text; + intltype integer; + newlevel integer; + topoid integer; + rec RECORD; + newlayer_id integer; + query text; BEGIN -- Get topology id SELECT id FROM topology.topology into topoid WHERE name = toponame; - IF topoid IS NULL THEN - RAISE EXCEPTION ''Topology % does not exist'', toponame; - END IF; - - -- - -- Get new layer id from sequence - -- - FOR rec IN EXECUTE ''SELECT nextval('''''' || - quote_ident(toponame) || ''.layer_id_seq'''')'' - LOOP - layer_id = rec.nextval; - END LOOP; - - IF ltype = ''POINT'' THEN - intltype = 1; - ELSIF ltype = ''LINE'' THEN - intltype = 2; - ELSIF ltype = ''POLYGON'' THEN - intltype = 3; - ELSIF ltype = ''COLLECTION'' THEN - intltype = 4; - ELSE - RAISE EXCEPTION ''Layer type must be one of POINT,LINE,POLYGON,COLLECTION''; - END IF; - - -- - -- See if child id exists and extract its level - -- - IF child IS NULL THEN - EXECUTE ''INSERT INTO '' - || ''topology.layer(topology_id, '' - || ''layer_id, schema_name, '' - || ''table_name, feature_column, feature_type) '' - || ''VALUES ('' - || topoid || '','' - || layer_id || '','' - || quote_literal(schema) || '','' - || quote_literal(table) || '','' - || quote_literal(col) || '','' - || intltype || '');''; - ELSE - FOR rec IN EXECUTE ''SELECT level FROM topology.layer'' - || '' WHERE layer_id = '' || child - LOOP - level = rec.level + 1; - END LOOP; - - EXECUTE ''INSERT INTO '' - || ''topology.layer(topology_id, '' - || ''layer_id, level, child_id, schema_name, '' - || ''table_name, feature_column, feature_type) '' - || ''VALUES ('' - || topoid || '','' - || layer_id || '','' || level || '','' - || child || '','' - || quote_literal(schema) || '','' - || quote_literal(table) || '','' - || quote_literal(col) || '','' - || intltype || '');''; - END IF; - - - -- - -- Create a sequence for TopoGeometries in this new layer - -- - EXECUTE ''CREATE SEQUENCE '' || quote_ident(toponame) - || ''.topogeo_s_'' || layer_id; - - -- - -- Add new TopoGeometry column in schema.table - -- - EXECUTE ''ALTER TABLE '' || quote_ident(schema) - || ''.'' || quote_ident(table) - || '' ADD COLUMN '' || quote_ident(col) - || '' topology.TopoGeometry;''; - - -- - -- Add constraints on TopoGeom column - -- - EXECUTE ''ALTER TABLE '' || quote_ident(schema) - || ''.'' || quote_ident(table) - || '' ADD CONSTRAINT check_topogeom CHECK ('' - || ''topology_id('' || quote_ident(col) || '') = '' || topoid - || '' AND '' - || ''layer_id('' || quote_ident(col) || '') = '' || layer_id - || '' AND '' - || ''type('' || quote_ident(col) || '') = '' || intltype - || '');''; - - -- - -- Add dependency of the feature column on the topology schema - -- - query = ''INSERT INTO pg_catalog.pg_depend SELECT '' - || ''fcat.oid, fobj.oid, fsub.attnum, tcat.oid, '' - || ''tobj.oid, 0, ''''n'''' '' - || ''FROM pg_class fcat, pg_namespace fnsp, '' - || '' pg_class fobj, pg_attribute fsub, '' - || '' pg_class tcat, pg_namespace tobj '' - || '' WHERE fcat.relname = ''''pg_class'''' '' - || '' AND fnsp.nspname = '' || quote_literal(schema) - || '' AND fobj.relnamespace = fnsp.oid '' - || '' AND fobj.relname = '' || quote_literal(table) - || '' AND fsub.attrelid = fobj.oid '' - || '' AND fsub.attname = '' || quote_literal(col) - || '' AND tcat.relname = ''''pg_namespace'''' '' - || '' AND tobj.nspname = '' || quote_literal(toponame); + IF topoid IS NULL THEN + RAISE EXCEPTION 'Topology % does not exist', toponame; + END IF; + + IF ltype ILIKE '%POINT%' OR ltype ILIKE 'PUNTAL' THEN + intltype = 1; + ELSIF ltype ILIKE '%LINE%' OR ltype ILIKE 'LINEAL' THEN + intltype = 2; + ELSIF ltype ILIKE '%POLYGON%' OR ltype ILIKE 'AREAL' THEN + intltype = 3; + ELSIF ltype ILIKE '%COLLECTION%' OR ltype ILIKE 'GEOMETRY' THEN + intltype = 4; + ELSE + RAISE EXCEPTION 'Layer type must be one of POINT,LINE,POLYGON,COLLECTION'; + END IF; + + -- + -- Add new TopoGeometry column in schema.table + -- + EXECUTE 'ALTER TABLE ' || quote_ident(schema) + || '.' || quote_ident(tbl) + || ' ADD COLUMN ' || quote_ident(col) + || ' topology.TopoGeometry;'; + + + -- + -- See if child id exists and extract its level + -- + IF child IS NOT NULL THEN + SELECT level + 1 FROM topology.layer + WHERE layer_id = child + INTO newlevel; + IF newlevel IS NULL THEN + RAISE EXCEPTION 'Child layer % does not exist in topology "%"', child, toponame; + END IF; + END IF; + + -- + -- Get new layer id from sequence + -- + EXECUTE 'SELECT nextval(' || + quote_literal( + quote_ident(toponame) || '.layer_id_seq' + ) || ')' INTO STRICT newlayer_id; + + EXECUTE 'INSERT INTO ' + || 'topology.layer(topology_id, ' + || 'layer_id, level, child_id, schema_name, ' + || 'table_name, feature_column, feature_type) ' + || 'VALUES (' + || topoid || ',' + || newlayer_id || ',' || COALESCE(newlevel, 0) || ',' + || COALESCE(child::text, 'NULL') || ',' + || quote_literal(schema) || ',' + || quote_literal(tbl) || ',' + || quote_literal(col) || ',' + || intltype || ');'; + + + -- + -- Create a sequence for TopoGeometries in this new layer + -- + EXECUTE 'CREATE SEQUENCE ' || quote_ident(toponame) + || '.topogeo_s_' || newlayer_id; + + -- + -- Add constraints on TopoGeom column + -- + EXECUTE 'ALTER TABLE ' || quote_ident(schema) + || '.' || quote_ident(tbl) + || ' ADD CONSTRAINT "check_topogeom_' || col || '" CHECK (' + || 'topology_id(' || quote_ident(col) || ') = ' || topoid + || ' AND ' + || 'layer_id(' || quote_ident(col) || ') = ' || newlayer_id + || ' AND ' + || 'type(' || quote_ident(col) || ') = ' || intltype + || ');'; + + -- + -- Add dependency of the feature column on the topology schema + -- + query = 'INSERT INTO pg_catalog.pg_depend SELECT ' + || 'fcat.oid, fobj.oid, fsub.attnum, tcat.oid, ' + || 'tobj.oid, 0, ''n'' ' + || 'FROM pg_class fcat, pg_namespace fnsp, ' + || ' pg_class fobj, pg_attribute fsub, ' + || ' pg_class tcat, pg_namespace tobj ' + || ' WHERE fcat.relname = ''pg_class'' ' + || ' AND fnsp.nspname = ' || quote_literal(schema) + || ' AND fobj.relnamespace = fnsp.oid ' + || ' AND fobj.relname = ' || quote_literal(tbl) + || ' AND fsub.attrelid = fobj.oid ' + || ' AND fsub.attname = ' || quote_literal(col) + || ' AND tcat.relname = ''pg_namespace'' ' + || ' AND tobj.nspname = ' || quote_literal(toponame); -- -- The only reason to add this dependency is to avoid @@ -644,44 +667,46 @@ -- corrupting the topology anyway ... -- #if 0 - -- - -- Add dependency of the topogeom sequence on the feature column - -- This is a dirty hack ... - -- - query = ''INSERT INTO pg_catalog.pg_depend SELECT '' - || ''scat.oid, sobj.oid, 0, fcat.oid, '' - || ''fobj.oid, fsub.attnum, ''''n'''' '' - || ''FROM pg_class fcat, pg_namespace fnsp, '' - || '' pg_class fobj, pg_attribute fsub, '' - || '' pg_class scat, pg_class sobj, '' - || '' pg_namespace snsp '' - || '' WHERE fcat.relname = ''''pg_class'''' '' - || '' AND fnsp.nspname = '' || quote_literal(schema) - || '' AND fobj.relnamespace = fnsp.oid '' - || '' AND fobj.relname = '' || quote_literal(table) - || '' AND fsub.attrelid = fobj.oid '' - || '' AND fsub.attname = '' || quote_literal(col) - || '' AND scat.relname = ''''pg_class'''' '' - || '' AND snsp.nspname = '' || quote_literal(toponame) - || '' AND sobj.relnamespace = snsp.oid '' - || '' AND sobj.relname = '' - || '' ''''topogeo_s_'' || layer_id || '''''' ''; + -- + -- Add dependency of the topogeom sequence on the feature column + -- This is a dirty hack ... + -- + query = 'INSERT INTO pg_catalog.pg_depend SELECT ' + || 'scat.oid, sobj.oid, 0, fcat.oid, ' + || 'fobj.oid, fsub.attnum, ''n'' ' + || 'FROM pg_class fcat, pg_namespace fnsp, ' + || ' pg_class fobj, pg_attribute fsub, ' + || ' pg_class scat, pg_class sobj, ' + || ' pg_namespace snsp ' + || ' WHERE fcat.relname = ''pg_class'' ' + || ' AND fnsp.nspname = ' || quote_literal(schema) + || ' AND fobj.relnamespace = fnsp.oid ' + || ' AND fobj.relname = ' || quote_literal(tbl) + || ' AND fsub.attrelid = fobj.oid ' + || ' AND fsub.attname = ' || quote_literal(col) + || ' AND scat.relname = ''pg_class'' ' + || ' AND snsp.nspname = ' || quote_literal(toponame) + || ' AND sobj.relnamespace = snsp.oid ' + || ' AND sobj.relname = ' + || ' ''topogeo_s_' || newlayer_id || ''' '; - RAISE NOTICE ''%'', query; - EXECUTE query; + RAISE NOTICE '%', query; + EXECUTE query; #endif - RETURN layer_id; + RETURN newlayer_id; END; -' -LANGUAGE 'plpgsql' _VOLATILE; +$$ +LANGUAGE 'plpgsql' VOLATILE; +--}{ AddTopoGeometryColumn -CREATEFUNCTION topology.AddTopoGeometryColumn(varchar, varchar, varchar, varchar, varchar) - RETURNS integer -AS ' - SELECT topology.AddTopoGeometryColumn($1, $2, $3, $4, $5, NULL); -' -LANGUAGE 'sql' _VOLATILE; +CREATE OR REPLACE FUNCTION topology.AddTopoGeometryColumn(varchar, varchar, varchar, varchar, varchar) + RETURNS integer +AS +$$ + SELECT topology.AddTopoGeometryColumn($1, $2, $3, $4, $5, NULL); +$$ +LANGUAGE 'sql' VOLATILE; -- --} AddTopoGeometryColumn @@ -693,96 +718,95 @@ -- cleanup the relation table. -- -- -CREATEFUNCTION topology.DropTopoGeometryColumn(varchar, varchar, varchar) - RETURNS text -AS ' +CREATE OR REPLACE FUNCTION topology.DropTopoGeometryColumn(schema varchar, tbl varchar, col varchar) + RETURNS text +AS +$$ DECLARE - schema alias for $1; - table alias for $2; - col alias for $3; - rec RECORD; - lyrinfo RECORD; - ok BOOL; - result text; + rec RECORD; + lyrinfo RECORD; + ok BOOL; + result text; BEGIN -- Get layer and topology info - ok = false; - FOR rec IN EXECUTE ''SELECT t.name as toponame, l.* FROM '' - || ''topology.topology t, topology.layer l '' - || '' WHERE l.schema_name = '' || quote_literal(schema) - || '' AND l.table_name = '' || quote_literal(table) - || '' AND l.feature_column = '' || quote_literal(col) - LOOP - ok = true; - lyrinfo = rec; - END LOOP; - - -- Layer not found - IF NOT ok THEN - RAISE EXCEPTION ''No layer registered on %.%.%'', - schema,table,col; - END IF; - - -- Clean up the topology schema - FOR rec IN SELECT * FROM pg_namespace - WHERE text(nspname) = lyrinfo.toponame - LOOP - -- Cleanup the relation table - EXECUTE ''DELETE FROM '' || quote_ident(lyrinfo.toponame) - || ''.relation '' - || '' WHERE '' - || ''layer_id = '' || lyrinfo.layer_id; - - -- Drop the sequence for topogeoms in this layer - EXECUTE ''DROP SEQUENCE '' || quote_ident(lyrinfo.toponame) - || ''.topogeo_s_'' || lyrinfo.layer_id; - - END LOOP; - - ok = false; - FOR rec IN SELECT * FROM pg_namespace n, pg_class c, pg_attribute a - WHERE text(n.nspname) = schema - AND c.relnamespace = n.oid - AND text(c.relname) = table - AND a.attrelid = c.oid - AND text(a.attname) = col - LOOP - ok = true; - EXIT; - END LOOP; - - - IF ok THEN - -- Set feature column to NULL to bypass referential integrity - -- checks - EXECUTE ''UPDATE '' || quote_ident(schema) || ''.'' - || quote_ident(table) - || '' SET '' || quote_ident(col) - || '' = NULL''; - END IF; - - -- Delete the layer record - EXECUTE ''DELETE FROM topology.layer '' - || '' WHERE topology_id = '' || lyrinfo.topology_id - || '' AND layer_id = '' || lyrinfo.layer_id; - - IF ok THEN - -- Drop the layer column - EXECUTE ''ALTER TABLE '' || quote_ident(schema) || ''.'' - || quote_ident(table) - || '' DROP '' || quote_ident(col) - || '' cascade''; - END IF; - - result = ''Layer '' || lyrinfo.layer_id || '' ('' - || schema || ''.'' || table || ''.'' || col - || '') dropped''; + ok = false; + FOR rec IN EXECUTE 'SELECT t.name as toponame, l.* FROM ' + || 'topology.topology t, topology.layer l ' + || ' WHERE l.topology_id = t.id' + || ' AND l.schema_name = ' || quote_literal(schema) + || ' AND l.table_name = ' || quote_literal(tbl) + || ' AND l.feature_column = ' || quote_literal(col) + LOOP + ok = true; + lyrinfo = rec; + END LOOP; + + -- Layer not found + IF NOT ok THEN + RAISE EXCEPTION 'No layer registered on %.%.%', + schema,tbl,col; + END IF; + + -- Clean up the topology schema + FOR rec IN SELECT * FROM pg_namespace + WHERE text(nspname) = lyrinfo.toponame + LOOP + -- Cleanup the relation table + EXECUTE 'DELETE FROM ' || quote_ident(lyrinfo.toponame) + || '.relation ' + || ' WHERE ' + || 'layer_id = ' || lyrinfo.layer_id; + + -- Drop the sequence for topogeoms in this layer + EXECUTE 'DROP SEQUENCE ' || quote_ident(lyrinfo.toponame) + || '.topogeo_s_' || lyrinfo.layer_id; + + END LOOP; + + ok = false; + FOR rec IN SELECT * FROM pg_namespace n, pg_class c, pg_attribute a + WHERE text(n.nspname) = schema + AND c.relnamespace = n.oid + AND text(c.relname) = tbl + AND a.attrelid = c.oid + AND text(a.attname) = col + LOOP + ok = true; + EXIT; + END LOOP; + + + IF ok THEN + -- Set feature column to NULL to bypass referential integrity + -- checks + EXECUTE 'UPDATE ' || quote_ident(schema) || '.' + || quote_ident(tbl) + || ' SET ' || quote_ident(col) + || ' = NULL'; + END IF; + + -- Delete the layer record + EXECUTE 'DELETE FROM topology.layer ' + || ' WHERE topology_id = ' || lyrinfo.topology_id + || ' AND layer_id = ' || lyrinfo.layer_id; + + IF ok THEN + -- Drop the layer column + EXECUTE 'ALTER TABLE ' || quote_ident(schema) || '.' + || quote_ident(tbl) + || ' DROP ' || quote_ident(col) + || ' cascade'; + END IF; + + result = 'Layer ' || lyrinfo.layer_id || ' (' + || schema || '.' || tbl || '.' || col + || ') dropped'; - RETURN result; + RETURN result; END; -' -LANGUAGE 'plpgsql' _VOLATILE; +$$ +LANGUAGE 'plpgsql' VOLATILE; -- --} DropTopoGeometryColumn @@ -798,157 +822,195 @@ -- level 0 (elements are topological primitives) or higer (elements -- are TopoGeoms from child layer). -- +-- @param toponame Topology name +-- +-- @param tg_type Spatial type of geometry +-- 1:[multi]point (puntal) +-- 2:[multi]line (lineal) +-- 3:[multi]poly (areal) +-- 4:collection (mixed) +-- +-- @param layer_id Layer identifier +-- +-- @param tg_objs Array of components +-- -- Return a topology.TopoGeometry object. -- -CREATEFUNCTION topology.CreateTopoGeom(varchar, integer, integer, topology.TopoElementArray) - RETURNS topology.TopoGeometry -AS ' +CREATE OR REPLACE FUNCTION topology.CreateTopoGeom(toponame varchar, tg_type integer, layer_id integer, tg_objs topology.TopoElementArray) + RETURNS topology.TopoGeometry +AS +$$ DECLARE - toponame alias for $1; - tg_type alias for $2; -- 1:[multi]point - -- 2:[multi]line - -- 3:[multi]poly - -- 4:collection - layer_id alias for $3; - tg_objs alias for $4; - i integer; - dims varchar; - outerdims varchar; - innerdims varchar; - obj_type integer; - obj_id integer; - ret topology.TopoGeometry; - rec RECORD; - layertype integer; - layerlevel integer; - layerchild integer; -BEGIN + i integer; + dims varchar; + outerdims varchar; + innerdims varchar; + obj_type integer; + obj_id integer; + ret topology.TopoGeometry; + rec RECORD; + layertype integer; + layerlevel integer; + layerchild integer; +BEGIN + + IF tg_type < 1 OR tg_type > 4 THEN + RAISE EXCEPTION 'Invalid TopoGeometry type % (must be in the range 1..4)', tg_type; + END IF; + + -- Get topology id into return TopoGeometry + SELECT id FROM topology.topology into ret.topology_id + WHERE name = toponame; + + -- + -- Get layer info + -- + layertype := NULL; + FOR rec IN EXECUTE 'SELECT * FROM topology.layer' + || ' WHERE topology_id = ' || ret.topology_id + || ' AND layer_id = ' || layer_id + LOOP + layertype = rec.feature_type; + layerlevel = rec.level; + layerchild = rec.child_id; + END LOOP; + + -- Check for existence of given layer id + IF layertype IS NULL THEN + RAISE EXCEPTION 'No layer with id % is registered with topology %', layer_id, toponame; + END IF; + + -- Verify compatibility between layer geometry type and + -- TopoGeom requested geometry type + IF layertype != 4 and layertype != tg_type THEN + RAISE EXCEPTION 'A Layer of type % cannot contain a TopoGeometry of type %', layertype, tg_type; + END IF; + + -- Set layer id and type in return object + ret.layer_id = layer_id; + ret.type = tg_type; + + -- + -- Get new TopoGeo id from sequence + -- + FOR rec IN EXECUTE 'SELECT nextval(' || + quote_literal( + quote_ident(toponame) || '.topogeo_s_' || layer_id + ) || ')' + LOOP + ret.id = rec.nextval; + END LOOP; + + -- Loop over outer dimension + i = array_lower(tg_objs, 1); + LOOP + obj_id = tg_objs[i][1]; + obj_type = tg_objs[i][2]; + + -- Elements of type 0 represent emptiness, just skip them + IF obj_type = 0 THEN + IF obj_id != 0 THEN + RAISE EXCEPTION 'Malformed empty topo element {0,%} -- id must be 0 as well', obj_id; + END IF; + ELSE + IF layerlevel = 0 THEN -- array specifies lower-level objects + IF tg_type != 4 and tg_type != obj_type THEN + RAISE EXCEPTION 'A TopoGeometry of type % cannot contain topology elements of type %', tg_type, obj_type; + END IF; + ELSE -- array specifies lower-level topogeometries + IF obj_type != layerchild THEN + RAISE EXCEPTION 'TopoGeom element layer do not match TopoGeom child layer'; + END IF; + -- TODO: verify that the referred TopoGeometry really + -- exists in the relation table ? + END IF; + + --RAISE NOTICE 'obj:% type:% id:%', i, obj_type, obj_id; + + -- + -- Insert record into the Relation table + -- + EXECUTE 'INSERT INTO '||quote_ident(toponame) + || '.relation(topogeo_id, layer_id, ' + || 'element_id,element_type) ' + || ' VALUES ('||ret.id + ||','||ret.layer_id + || ',' || obj_id || ',' || obj_type || ');'; + END IF; + + i = i+1; + IF i > array_upper(tg_objs, 1) THEN + EXIT; + END IF; + END LOOP; - IF tg_type < 1 OR tg_type > 4 THEN - RAISE EXCEPTION ''Invalid TopoGeometry type (must be in the range 1..4''; - END IF; - - -- Get topology id into return TopoGeometry - SELECT id FROM topology.topology into ret.topology_id - WHERE name = toponame; - - -- - -- Get layer info - -- - layertype := NULL; - FOR rec IN EXECUTE ''SELECT * FROM topology.layer'' - || '' WHERE topology_id = '' || ret.topology_id - || '' AND layer_id = '' || layer_id - LOOP - layertype = rec.feature_type; - layerlevel = rec.level; - layerchild = rec.child_id; - END LOOP; - - -- Check for existence of given layer id - IF layertype IS NULL THEN - RAISE EXCEPTION ''No layer with id % is registered with topology %'', layer_id, toponame; - END IF; - - -- Verify compatibility between layer geometry type and - -- TopoGeom requested geometry type - IF layertype != 4 and layertype != tg_type THEN - RAISE EXCEPTION ''A Layer of type % cannot contain a TopoGeometry of type %'', layertype, tg_type; - END IF; - - -- Set layer id and type in return object - ret.layer_id = layer_id; - ret.type = tg_type; - - -- - -- Get new TopoGeo id from sequence - -- - FOR rec IN EXECUTE ''SELECT nextval('''''' || - toponame || ''.topogeo_s_'' || layer_id || '''''')'' - LOOP - ret.id = rec.nextval; - END LOOP; - - -- Loop over outer dimension - i = array_lower(tg_objs, 1); - LOOP - obj_id = tg_objs[i][1]; - obj_type = tg_objs[i][2]; - IF layerlevel = 0 THEN -- array specifies lower-level objects - IF tg_type != 4 and tg_type != obj_type THEN - RAISE EXCEPTION ''A TopoGeometry of type % cannot contain topology elements of type %'', tg_type, obj_type; - END IF; - ELSE -- array specifies lower-level topogeometries - IF obj_type != layerchild THEN - RAISE EXCEPTION ''TopoGeom element layer do not match TopoGeom child layer''; - END IF; - -- TODO: verify that the referred TopoGeometry really - -- exists in the relation table ? - END IF; - - --RAISE NOTICE ''obj:% type:% id:%'', i, obj_type, obj_id; - - -- - -- Insert record into the Relation table - -- - EXECUTE ''INSERT INTO ''||quote_ident(toponame) - || ''.relation(topogeo_id, layer_id, '' - || ''element_id,element_type) '' - || '' VALUES (''||ret.id - ||'',''||ret.layer_id - || '','' || obj_id || '','' || obj_type || '');''; - - i = i+1; - IF i > array_upper(tg_objs, 1) THEN - EXIT; - END IF; - END LOOP; - - RETURN ret; + RETURN ret; END -' -LANGUAGE 'plpgsql' _VOLATILE_STRICT; ---} CreateTopoGeom(toponame,topogeom_type, TopoObject[]) +$$ +LANGUAGE 'plpgsql' VOLATILE STRICT; +--} CreateTopoGeom(toponame,topogeom_type, layer_id, TopoElementArray) + +--{ +-- CreateTopoGeom(topology_name, topogeom_type, layer_id) - creates the empty topogeom +CREATE OR REPLACE FUNCTION topology.CreateTopoGeom(toponame varchar, tg_type integer, layer_id integer) + RETURNS topology.TopoGeometry +AS +$$ + SELECT topology.CreateTopoGeom($1,$2,$3,'{{0,0}}'); +$$ LANGUAGE 'sql' VOLATILE STRICT; +--} CreateTopoGeom(toponame, topogeom_type, layer_id) --{ -- GetTopologyName(topology_id) -- -CREATEFUNCTION topology.GetTopologyName(integer) - RETURNS varchar +-- TODO: rewrite in SQL ? +-- +CREATE OR REPLACE FUNCTION topology.GetTopologyName(topoid integer) + RETURNS varchar AS -' +$$ DECLARE - topoid alias for $1; - ret varchar; + ret varchar; BEGIN SELECT name FROM topology.topology into ret WHERE id = topoid; - RETURN ret; + RETURN ret; END -' -LANGUAGE 'plpgsql' _VOLATILE_STRICT; +$$ +LANGUAGE 'plpgsql' STABLE STRICT; --} GetTopologyName(topoid) --{ -- GetTopologyId(toponame) -- -CREATEFUNCTION topology.GetTopologyId(varchar) - RETURNS integer +-- TODO: rewrite in SQL ? +-- +CREATE OR REPLACE FUNCTION topology.GetTopologyId(toponame varchar) + RETURNS integer AS -' +$$ DECLARE - toponame alias for $1; - ret integer; + ret integer; BEGIN SELECT id FROM topology.topology into ret WHERE name = toponame; - RETURN ret; + RETURN ret; END -' -LANGUAGE 'plpgsql' _VOLATILE_STRICT; +$$ +LANGUAGE 'plpgsql' STABLE STRICT; --} GetTopologyId(toponame) - + +--{ +-- GetTopologySRID(toponame) +-- +CREATE OR REPLACE FUNCTION topology.GetTopologySRID(toponame varchar) + RETURNS integer +AS $$ + SELECT SRID FROM topology.topology WHERE name = $1; +$$ LANGUAGE 'sql' STABLE STRICT; +--} GetTopologySRID(toponame) + --{ @@ -957,62 +1019,62 @@ -- -- Returns a set of element_id,element_type -- -CREATEFUNCTION topology.GetTopoGeomElementArray(varchar, integer, integer) - RETURNS topology.TopoElementArray +CREATE OR REPLACE FUNCTION topology.GetTopoGeomElementArray(toponame varchar, layer_id integer, tgid integer) + RETURNS topology.TopoElementArray AS -' +$$ DECLARE - toponame alias for $1; - layerid alias for $2; - tgid alias for $3; - rec RECORD; - tg_objs varchar := ''{''; - i integer; - query text; -BEGIN + rec RECORD; + tg_objs varchar := '{'; + i integer; + query text; +BEGIN + + query = 'SELECT * FROM topology.GetTopoGeomElements(' + || quote_literal(toponame) || ',' + || quote_literal(layer_id) || ',' + || quote_literal(tgid) + || ') as obj ORDER BY obj'; + +#ifdef POSTGIS_TOPOLOGY_DEBUG + RAISE DEBUG 'Query: %', query; +#endif + + -- TODO: why not using array_agg here ? - query = ''SELECT * FROM topology.GetTopoGeomElements('' - || quote_literal(toponame) || '','' - || quote_literal(layerid) || '','' - || quote_literal(tgid) - || '') as obj ORDER BY obj''; - - RAISE NOTICE ''Query: %'', query; - - i = 1; - FOR rec IN EXECUTE query - LOOP - IF i > 1 THEN - tg_objs = tg_objs || '',''; - END IF; - tg_objs = tg_objs || ''{'' - || rec.obj[1] || '','' || rec.obj[2] - || ''}''; - i = i+1; - END LOOP; + i = 1; + FOR rec IN EXECUTE query + LOOP + IF i > 1 THEN + tg_objs = tg_objs || ','; + END IF; + tg_objs = tg_objs || '{' + || rec.obj[1] || ',' || rec.obj[2] + || '}'; + i = i+1; + END LOOP; - tg_objs = tg_objs || ''}''; + tg_objs = tg_objs || '}'; - RETURN tg_objs; + RETURN tg_objs; END; -' -LANGUAGE 'plpgsql' _VOLATILE_STRICT; +$$ +LANGUAGE 'plpgsql' STABLE STRICT; -CREATEFUNCTION topology.GetTopoGeomElementArray(topology.TopoGeometry) - RETURNS topology.TopoElementArray +CREATE OR REPLACE FUNCTION topology.GetTopoGeomElementArray(tg topology.TopoGeometry) + RETURNS topology.TopoElementArray AS -' +$$ DECLARE - tg alias for $1; - toponame varchar; - ret topology.TopoElementArray; + toponame varchar; + ret topology.TopoElementArray; BEGIN - toponame = topology.GetTopologyName(tg.topology_id); - ret = topology.GetTopoGeomElementArray(toponame,tg.layer_id,tg.id); - RETURN ret; + toponame = topology.GetTopologyName(tg.topology_id); + ret = topology.GetTopoGeomElementArray(toponame,tg.layer_id,tg.id); + RETURN ret; END; -' -LANGUAGE 'plpgsql' _VOLATILE_STRICT; +$$ +LANGUAGE 'plpgsql' STABLE STRICT; --} GetTopoGeomElementArray() @@ -1022,91 +1084,87 @@ -- -- Returns a set of element_id,element_type -- -CREATEFUNCTION topology.GetTopoGeomElements(varchar, integer, integer) - RETURNS SETOF topology.TopoElement +CREATE OR REPLACE FUNCTION topology.GetTopoGeomElements(toponame varchar, layerid integer, tgid integer) + RETURNS SETOF topology.TopoElement AS -' +$$ DECLARE - toponame alias for $1; - layerid alias for $2; - tgid alias for $3; - ret topology.TopoElement; - rec RECORD; - rec2 RECORD; - query text; - query2 text; - lyr RECORD; - ok bool; -BEGIN - - -- Get layer info - ok = false; - FOR rec IN EXECUTE ''SELECT * FROM '' - || '' topology.layer '' - || '' WHERE layer_id = '' || layerid - LOOP - lyr = rec; - ok = true; - END LOOP; - - IF NOT ok THEN - RAISE EXCEPTION ''Layer % does not exist'', layerid; - END IF; - - - query = ''SELECT abs(element_id) as element_id, element_type FROM '' - || quote_ident(toponame) || ''.relation WHERE '' - || '' layer_id = '' || layerid - || '' AND topogeo_id = '' || quote_literal(tgid) - || '' ORDER BY element_type, element_id''; - - --RAISE NOTICE ''Query: %'', query; - - FOR rec IN EXECUTE query - LOOP - IF lyr.level > 0 THEN - query2 = ''SELECT * from topology.GetTopoGeomElements('' - || quote_literal(toponame) || '','' - || rec.element_type - || '','' - || rec.element_id - || '') as ret;''; - --RAISE NOTICE ''Query2: %'', query2; - FOR rec2 IN EXECUTE query2 - LOOP - RETURN NEXT rec2.ret; - END LOOP; - ELSE - ret = ''{'' || rec.element_id || '','' || rec.element_type || ''}''; - RETURN NEXT ret; - END IF; - - END LOOP; + ret topology.TopoElement; + rec RECORD; + rec2 RECORD; + query text; + query2 text; + lyr RECORD; + ok bool; +BEGIN + + -- Get layer info + ok = false; + FOR rec IN EXECUTE 'SELECT * FROM ' + || ' topology.layer ' + || ' WHERE layer_id = ' || layerid + LOOP + lyr = rec; + ok = true; + END LOOP; + + IF NOT ok THEN + RAISE EXCEPTION 'Layer % does not exist', layerid; + END IF; + + + query = 'SELECT abs(element_id) as element_id, element_type FROM ' + || quote_ident(toponame) || '.relation WHERE ' + || ' layer_id = ' || layerid + || ' AND topogeo_id = ' || quote_literal(tgid) + || ' ORDER BY element_type, element_id'; + + --RAISE NOTICE 'Query: %', query; + + FOR rec IN EXECUTE query + LOOP + IF lyr.level > 0 THEN + query2 = 'SELECT * from topology.GetTopoGeomElements(' + || quote_literal(toponame) || ',' + || rec.element_type + || ',' + || rec.element_id + || ') as ret;'; + --RAISE NOTICE 'Query2: %', query2; + FOR rec2 IN EXECUTE query2 + LOOP + RETURN NEXT rec2.ret; + END LOOP; + ELSE + ret = '{' || rec.element_id || ',' || rec.element_type || '}'; + RETURN NEXT ret; + END IF; + + END LOOP; - RETURN; + RETURN; END; -' -LANGUAGE 'plpgsql' _VOLATILE_STRICT; +$$ +LANGUAGE 'plpgsql' STABLE STRICT; -CREATEFUNCTION topology.GetTopoGeomElements(topology.TopoGeometry) - RETURNS SETOF topology.TopoElement +CREATE OR REPLACE FUNCTION topology.GetTopoGeomElements(tg topology.TopoGeometry) + RETURNS SETOF topology.TopoElement AS -' +$$ DECLARE - tg alias for $1; - toponame varchar; - rec RECORD; + toponame varchar; + rec RECORD; BEGIN - toponame = topology.GetTopologyName(tg.topology_id); - FOR rec IN SELECT * FROM topology.GetTopoGeomElements(toponame, - tg.layer_id,tg.id) as ret - LOOP - RETURN NEXT rec.ret; - END LOOP; - RETURN; + toponame = topology.GetTopologyName(tg.topology_id); + FOR rec IN SELECT * FROM topology.GetTopoGeomElements(toponame, + tg.layer_id,tg.id) as ret + LOOP + RETURN NEXT rec.ret; + END LOOP; + RETURN; END; -' -LANGUAGE 'plpgsql' _VOLATILE_STRICT; +$$ +LANGUAGE 'plpgsql' STABLE STRICT; --} GetTopoGeomElements() @@ -1115,583 +1173,725 @@ -- -- Construct a Geometry from a TopoGeometry. -- --- -CREATE OR REPLACE FUNCTION topology.Geometry(topology.TopoGeometry) - RETURNS Geometry -AS ' -DECLARE - topogeom alias for $1; - toponame varchar; - geom geometry; - rec RECORD; - plyr RECORD; - clyr RECORD; - query text; - ok BOOL; -BEGIN - -- Get topology name - SELECT name FROM topology.topology into toponame - WHERE id = topogeom.topology_id; - - -- Get layer info - ok = false; - FOR rec IN EXECUTE ''SELECT * FROM topology.layer '' - || '' WHERE topology_id = '' || topogeom.topology_id - || '' AND layer_id = '' || topogeom.layer_id - LOOP - ok = true; - plyr = rec; - END LOOP; - - IF NOT ok THEN - RAISE EXCEPTION ''Could not find TopoGeometry layer % in topology %'', topogeom.layer_id, topogeom.topology_id; - END IF; - - -- - -- If this feature layer is on any level > 0 we will - -- compute the topological union of all child features - -- in fact recursing. - -- - IF plyr.level > 0 THEN - -- Get child layer info - FOR rec IN EXECUTE ''SELECT * FROM topology.layer'' - || '' WHERE layer_id = '' || plyr.child_id - LOOP - clyr = rec; - END LOOP; - - query = ''SELECT geomunion(topology.Geometry('' - || quote_ident(clyr.feature_column) - || '')) as geom FROM '' - || quote_ident(clyr.schema_name) || ''.'' - || quote_ident(clyr.table_name) - || '', '' || quote_ident(toponame) || ''.relation pr'' - || '' WHERE '' - || '' pr.topogeo_id = '' || topogeom.id - || '' AND '' - || '' pr.layer_id = '' || topogeom.layer_id - || '' AND '' - || '' id(''||quote_ident(clyr.feature_column) - || '') = pr.element_id '' - || '' AND '' - || ''layer_id(''||quote_ident(clyr.feature_column) - || '') = pr.element_type ''; - --RAISE NOTICE ''%'', query; - FOR rec IN EXECUTE query - LOOP - RETURN rec.geom; - END LOOP; - - END IF; - - - IF topogeom.type = 3 THEN -- [multi]polygon - FOR rec IN EXECUTE ''SELECT geomunion('' - || ''topology.ST_GetFaceGeometry('' - || quote_literal(toponame) || '','' - || ''element_id)) as g FROM '' - || quote_ident(toponame) - || ''.relation WHERE topogeo_id = '' - || topogeom.id || '' AND layer_id = '' - || topogeom.layer_id || '' AND element_type = 3 '' - LOOP - geom := rec.g; - END LOOP; - - ELSIF topogeom.type = 2 THEN -- [multi]line - FOR rec IN EXECUTE ''SELECT linemerge(collect(e.geom)) as g FROM '' - || quote_ident(toponame) || ''.edge e, '' - || quote_ident(toponame) || ''.relation r '' - || '' WHERE r.topogeo_id = '' || topogeom.id - || '' AND r.layer_id = '' || topogeom.layer_id - || '' AND r.element_type = 2 '' - || '' AND abs(r.element_id) = e.edge_id'' - LOOP - geom := rec.g; - END LOOP; - - ELSIF topogeom.type = 1 THEN -- [multi]point - FOR rec IN EXECUTE ''SELECT geomunion(n.geom) as g FROM '' - || quote_ident(toponame) || ''.node n, '' - || quote_ident(toponame) || ''.relation r '' - || '' WHERE r.topogeo_id = '' || topogeom.id - || '' AND r.layer_id = '' || topogeom.layer_id - || '' AND r.element_type = 1 '' - || '' AND r.element_id = n.node_id'' - LOOP - geom := rec.g; - END LOOP; - - ELSE - RAISE NOTICE ''Geometry from TopoGeometry does not support TopoGeometries of type % so far'', topogeom.type; - geom := ''GEOMETRYCOLLECTION EMPTY''; - END IF; +-- }{ +CREATE OR REPLACE FUNCTION topology.Geometry(topogeom topology.TopoGeometry) + RETURNS Geometry +AS $$ +DECLARE + toponame varchar; + geom geometry; + rec RECORD; + plyr RECORD; + clyr RECORD; + sql TEXT; +BEGIN + + -- Get topology name + SELECT name FROM topology.topology + WHERE id = topogeom.topology_id + INTO toponame; + IF toponame IS NULL THEN + RAISE EXCEPTION 'Invalid TopoGeometry (unexistent topology id %)', topogeom.topology_id; + END IF; + + -- Get layer info + SELECT * FROM topology.layer + WHERE topology_id = topogeom.topology_id + AND layer_id = topogeom.layer_id + INTO plyr; + IF plyr IS NULL THEN + RAISE EXCEPTION 'Could not find TopoGeometry layer % in topology %', topogeom.layer_id, topogeom.topology_id; + END IF; + + -- + -- If this feature layer is on any level > 0 we will + -- compute the topological union of all child features + -- in fact recursing. + -- + IF plyr.level > 0 THEN -- { + + -- Get child layer info + SELECT * FROM topology.layer WHERE layer_id = plyr.child_id + AND topology_id = topogeom.topology_id + INTO clyr; + IF clyr IS NULL THEN + RAISE EXCEPTION 'Invalid layer % in topology % (unexistent child layer %)', topogeom.layer_id, topogeom.topology_id, plyr.child_id; + END IF; + + sql := 'SELECT st_multi(st_union(topology.Geometry(' + || quote_ident(clyr.feature_column) + || '))) as geom FROM ' + || quote_ident(clyr.schema_name) || '.' + || quote_ident(clyr.table_name) + || ', ' || quote_ident(toponame) || '.relation pr' + || ' WHERE ' + || ' pr.topogeo_id = ' || topogeom.id + || ' AND ' + || ' pr.layer_id = ' || topogeom.layer_id + || ' AND ' + || ' id('||quote_ident(clyr.feature_column) + || ') = pr.element_id ' + || ' AND ' + || 'layer_id('||quote_ident(clyr.feature_column) + || ') = pr.element_type '; + --RAISE DEBUG '%', query; + EXECUTE sql INTO geom; + + ELSIF topogeom.type = 3 THEN -- [multi]polygon -- }{ + + sql := 'SELECT st_multi(st_union(' + || 'topology.ST_GetFaceGeometry(' + || quote_literal(toponame) || ',' + || 'element_id))) as g FROM ' + || quote_ident(toponame) + || '.relation WHERE topogeo_id = ' + || topogeom.id || ' AND layer_id = ' + || topogeom.layer_id || ' AND element_type = 3 '; + EXECUTE sql INTO geom; + + ELSIF topogeom.type = 2 THEN -- [multi]line -- }{ + + sql := + 'SELECT st_multi(ST_LineMerge(ST_Collect(e.geom))) as g FROM ' + || quote_ident(toponame) || '.edge e, ' + || quote_ident(toponame) || '.relation r ' + || ' WHERE r.topogeo_id = ' || topogeom.id + || ' AND r.layer_id = ' || topogeom.layer_id + || ' AND r.element_type = 2 ' + || ' AND abs(r.element_id) = e.edge_id'; + EXECUTE sql INTO geom; + + ELSIF topogeom.type = 1 THEN -- [multi]point -- }{ + + sql := + 'SELECT st_multi(st_union(n.geom)) as g FROM ' + || quote_ident(toponame) || '.node n, ' + || quote_ident(toponame) || '.relation r ' + || ' WHERE r.topogeo_id = ' || topogeom.id + || ' AND r.layer_id = ' || topogeom.layer_id + || ' AND r.element_type = 1 ' + || ' AND r.element_id = n.node_id'; + EXECUTE sql INTO geom; + + ELSIF topogeom.type = 4 THEN -- mixed collection -- }{ + + sql := 'WITH areas AS ( SELECT ST_Union(' + || 'topology.ST_GetFaceGeometry(' + || quote_literal(toponame) || ',' + || 'element_id)) as g FROM ' + || quote_ident(toponame) + || '.relation WHERE topogeo_id = ' + || topogeom.id || ' AND layer_id = ' + || topogeom.layer_id || ' AND element_type = 3), ' + || 'lines AS ( SELECT ST_LineMerge(ST_Collect(e.geom)) as g FROM ' + || quote_ident(toponame) || '.edge e, ' + || quote_ident(toponame) || '.relation r ' + || ' WHERE r.topogeo_id = ' || topogeom.id + || ' AND r.layer_id = ' || topogeom.layer_id + || ' AND r.element_type = 2 ' + || ' AND abs(r.element_id) = e.edge_id ), ' + || ' points as ( SELECT st_union(n.geom) as g FROM ' + || quote_ident(toponame) || '.node n, ' + || quote_ident(toponame) || '.relation r ' + || ' WHERE r.topogeo_id = ' || topogeom.id + || ' AND r.layer_id = ' || topogeom.layer_id + || ' AND r.element_type = 1 ' + || ' AND r.element_id = n.node_id ), ' + || ' un as ( SELECT g FROM areas UNION ALL SELECT g FROM lines ' + || ' UNION ALL SELECT g FROM points ) ' + || 'SELECT ST_Multi(ST_Collect(g)) FROM un'; + EXECUTE sql INTO geom; + + ELSE -- }{ + + RAISE EXCEPTION 'Invalid TopoGeometries (unknown type %)', topogeom.type; + + END IF; -- } + + IF geom IS NULL THEN + IF topogeom.type = 3 THEN -- [multi]polygon + geom := 'MULTIPOLYGON EMPTY'; + ELSIF topogeom.type = 2 THEN -- [multi]line + geom := 'MULTILINESTRING EMPTY'; + ELSIF topogeom.type = 1 THEN -- [multi]point + geom := 'MULTIPOINT EMPTY'; + ELSE + geom := 'GEOMETRYCOLLECTION EMPTY'; + END IF; + END IF; - RETURN geom; + RETURN geom; END -' +$$ LANGUAGE 'plpgsql' VOLATILE STRICT; --} Geometry(TopoGeometry) +-- 7.3+ explicit cast +CREATE CAST (topology.TopoGeometry AS Geometry) WITH FUNCTION topology.Geometry(topology.TopoGeometry) AS IMPLICIT; + --{ -- ValidateTopology(toponame) -- -- Return a Set of ValidateTopology_ReturnType containing -- informations on all topology inconsistencies -- -CREATEFUNCTION topology.ValidateTopology(varchar) - RETURNS setof topology.ValidateTopology_ReturnType +CREATE OR REPLACE FUNCTION topology.ValidateTopology(toponame varchar) + RETURNS setof topology.ValidateTopology_ReturnType AS -' +$$ DECLARE - toponame alias for $1; - retrec topology.ValidateTopology_ReturnType; - rec RECORD; - i integer; -BEGIN + retrec topology.ValidateTopology_ReturnType; + rec RECORD; + rec2 RECORD; + i integer; + invalid_edges integer[]; + invalid_faces integer[]; + sql text; +BEGIN + + -- Check for coincident nodes + FOR rec IN EXECUTE 'SELECT a.node_id as id1, b.node_id as id2 FROM ' + || quote_ident(toponame) || '.node a, ' + || quote_ident(toponame) || '.node b ' + || 'WHERE a.node_id < b.node_id ' + || ' AND ST_DWithin(a.geom, b.geom, 0)' -- NOTE: see #1625 and #1789 + LOOP + retrec.error = 'coincident nodes'; + retrec.id1 = rec.id1; + retrec.id2 = rec.id2; + RETURN NEXT retrec; + END LOOP; + + -- Check for edge crossed nodes + -- TODO: do this in the single edge loop + FOR rec IN EXECUTE 'SELECT n.node_id as id1, e.edge_id as id2 FROM ' + || quote_ident(toponame) || '.node n, ' + || quote_ident(toponame) || '.edge e ' + || 'WHERE e.start_node != n.node_id ' + || 'AND e.end_node != n.node_id ' + || 'AND ST_Within(n.geom, e.geom)' + LOOP + retrec.error = 'edge crosses node'; + retrec.id1 = rec.id1; + retrec.id2 = rec.id2; + RETURN NEXT retrec; + END LOOP; + + -- Scan all edges + FOR rec IN EXECUTE 'SELECT e.geom, e.edge_id as id1, e.left_face, e.right_face FROM ' + || quote_ident(toponame) || '.edge e ORDER BY edge_id' + LOOP + + -- Any invalid edge becomes a cancer for higher level complexes + IF NOT ST_IsValid(rec.geom) THEN + + retrec.error = 'invalid edge'; + retrec.id1 = rec.id1; + retrec.id2 = NULL; + RETURN NEXT retrec; + invalid_edges := array_append(invalid_edges, rec.id1); + + IF invalid_faces IS NULL OR NOT rec.left_face = ANY ( invalid_faces ) + THEN + invalid_faces := array_append(invalid_faces, rec.left_face); + END IF; + + IF rec.right_face != rec.left_face AND ( invalid_faces IS NULL OR + NOT rec.right_face = ANY ( invalid_faces ) ) + THEN + invalid_faces := array_append(invalid_faces, rec.right_face); + END IF; + + CONTINUE; + + END IF; + + IF NOT ST_IsSimple(rec.geom) THEN + retrec.error = 'edge not simple'; + retrec.id1 = rec.id1; + retrec.id2 = NULL; + RETURN NEXT retrec; + END IF; + + END LOOP; + + -- Check for edge crossing + sql := 'SELECT e1.edge_id as id1, e2.edge_id as id2, ' + || ' e1.geom as g1, e2.geom as g2, ' + || 'ST_Relate(e1.geom, e2.geom) as im FROM ' + || quote_ident(toponame) || '.edge e1, ' + || quote_ident(toponame) || '.edge e2 ' + || 'WHERE e1.edge_id < e2.edge_id ' + || ' AND e1.geom && e2.geom '; + IF invalid_edges IS NOT NULL THEN + sql := sql || ' AND NOT e1.edge_id = ANY (' + || quote_literal(invalid_edges) || ')' + || ' AND NOT e2.edge_id = ANY (' + || quote_literal(invalid_edges) || ')'; + END IF; + + FOR rec IN EXECUTE sql + LOOP + IF ST_RelateMatch(rec.im, 'FF1F**1*2') THEN + CONTINUE; -- no interior intersection + END IF; + + -- + -- Closed lines have no boundary, so endpoint + -- intersection would be considered interior + -- See http://trac.osgeo.org/postgis/ticket/770 + -- See also full explanation in topology.AddEdge + -- + + IF ST_RelateMatch(rec.im, 'FF10F01F2') THEN + -- first line (g1) is open, second (g2) is closed + -- first boundary has puntual intersection with second interior + -- + -- compute intersection, check it equals second endpoint + IF ST_Equals(ST_Intersection(rec.g2, rec.g1), + ST_StartPoint(rec.g2)) + THEN + CONTINUE; + END IF; + END IF; + + IF ST_RelateMatch(rec.im, 'F01FFF102') THEN + -- second line (g2) is open, first (g1) is closed + -- second boundary has puntual intersection with first interior + -- + -- compute intersection, check it equals first endpoint + IF ST_Equals(ST_Intersection(rec.g2, rec.g1), + ST_StartPoint(rec.g1)) + THEN + CONTINUE; + END IF; + END IF; + + IF ST_RelateMatch(rec.im, '0F1FFF1F2') THEN + -- both lines are closed (boundary intersects nothing) + -- they have puntual intersection between interiors + -- + -- compute intersection, check it's a single point + -- and equals first StartPoint _and_ second StartPoint + IF ST_Equals(ST_Intersection(rec.g1, rec.g2), + ST_StartPoint(rec.g1)) AND + ST_Equals(ST_StartPoint(rec.g1), ST_StartPoint(rec.g2)) + THEN + CONTINUE; + END IF; + END IF; + + retrec.error = 'edge crosses edge'; + retrec.id1 = rec.id1; + retrec.id2 = rec.id2; + RETURN NEXT retrec; + END LOOP; + + -- Check for edge start_node geometry mis-match + -- TODO: move this in the first edge table scan + FOR rec IN EXECUTE 'SELECT e.edge_id as id1, n.node_id as id2 FROM ' + || quote_ident(toponame) || '.edge e, ' + || quote_ident(toponame) || '.node n ' + || 'WHERE e.start_node = n.node_id ' + || 'AND NOT ST_Equals(ST_StartPoint(e.geom), n.geom)' + LOOP + retrec.error = 'edge start node geometry mis-match'; + retrec.id1 = rec.id1; + retrec.id2 = rec.id2; + RETURN NEXT retrec; + END LOOP; + + -- Check for edge end_node geometry mis-match + -- TODO: move this in the first edge table scan + FOR rec IN EXECUTE 'SELECT e.edge_id as id1, n.node_id as id2 FROM ' + || quote_ident(toponame) || '.edge e, ' + || quote_ident(toponame) || '.node n ' + || 'WHERE e.end_node = n.node_id ' + || 'AND NOT ST_Equals(ST_EndPoint(e.geom), n.geom)' + LOOP + retrec.error = 'edge end node geometry mis-match'; + retrec.id1 = rec.id1; + retrec.id2 = rec.id2; + RETURN NEXT retrec; + END LOOP; + + -- Check for faces w/out edges + FOR rec IN EXECUTE 'SELECT face_id as id1 FROM ' + || quote_ident(toponame) || '.face ' + || 'WHERE face_id > 0 EXCEPT ( SELECT left_face FROM ' + || quote_ident(toponame) || '.edge ' + || ' UNION SELECT right_face FROM ' + || quote_ident(toponame) || '.edge ' + || ')' + LOOP + retrec.error = 'face without edges'; + retrec.id1 = rec.id1; + retrec.id2 = NULL; + RETURN NEXT retrec; + END LOOP; + + -- Now create a temporary table to construct all face geometries + -- for checking their consistency + + sql := 'CREATE TEMP TABLE face_check ON COMMIT DROP AS ' + || 'SELECT face_id, topology.ST_GetFaceGeometry(' + || quote_literal(toponame) || ', face_id) as geom, mbr FROM ' + || quote_ident(toponame) || '.face WHERE face_id > 0'; + IF invalid_faces IS NOT NULL THEN + sql := sql || ' AND NOT face_id = ANY (' + || quote_literal(invalid_faces) || ')'; + END IF; + EXECUTE sql; + + -- Build a gist index on geom + EXECUTE 'CREATE INDEX "face_check_gist" ON ' + || 'face_check USING gist (geom);'; + + -- Build a btree index on id + EXECUTE 'CREATE INDEX "face_check_bt" ON ' + || 'face_check (face_id);'; + + -- Scan the table looking for NULL geometries + FOR rec IN EXECUTE + 'SELECT f1.face_id FROM ' + || 'face_check f1 WHERE f1.geom IS NULL' + LOOP + -- Face missing ! + retrec.error := 'face has no rings'; + retrec.id1 := rec.face_id; + retrec.id2 := NULL; + RETURN NEXT retrec; + END LOOP; + + + -- Scan the table looking for overlap or containment + -- TODO: also check for MBR consistency + FOR rec IN EXECUTE + 'SELECT f1.geom, f1.face_id as id1, f2.face_id as id2, ' + || ' ST_Relate(f1.geom, f2.geom) as im' + || ' FROM ' + || 'face_check f1, ' + || 'face_check f2 ' + || 'WHERE f1.face_id < f2.face_id' + || ' AND f1.geom && f2.geom' + LOOP + + -- Face overlap + IF ST_RelateMatch(rec.im, 'T*T***T**') THEN + retrec.error = 'face overlaps face'; + retrec.id1 = rec.id1; + retrec.id2 = rec.id2; + RETURN NEXT retrec; + END IF; + + -- Face 1 is within face 2 + IF ST_RelateMatch(rec.im, 'T*F**F***') THEN + retrec.error = 'face within face'; + retrec.id1 = rec.id1; + retrec.id2 = rec.id2; + RETURN NEXT retrec; + END IF; + + -- Face 1 contains face 2 + IF ST_RelateMatch(rec.im, 'T*****FF*') THEN + retrec.error = 'face within face'; + retrec.id1 = rec.id2; + retrec.id2 = rec.id1; + RETURN NEXT retrec; + END IF; - -- Check for coincident nodes - FOR rec IN EXECUTE ''SELECT a.node_id as id1, b.node_id as id2 FROM '' - || quote_ident(toponame) || ''.node a, '' - || quote_ident(toponame) || ''.node b '' - || ''WHERE a.node_id < b.node_id AND a.geom && b.geom'' - LOOP - retrec.error = ''coincident nodes''; - retrec.id1 = rec.id1; - retrec.id2 = rec.id2; - RETURN NEXT retrec; - END LOOP; - - -- Check for edge crossed nodes - FOR rec IN EXECUTE ''SELECT n.node_id as id1, e.edge_id as id2 FROM '' - || quote_ident(toponame) || ''.node n, '' - || quote_ident(toponame) || ''.edge e '' - || ''WHERE e.start_node != n.node_id '' - || ''AND e.end_node != n.node_id '' - || ''AND n.geom && e.geom '' - || ''AND intersects(n.geom, e.geom)'' - LOOP - retrec.error = ''edge crosses node''; - retrec.id1 = rec.id1; - retrec.id2 = rec.id2; - RETURN NEXT retrec; - END LOOP; - - -- Check for non-simple edges - FOR rec IN EXECUTE ''SELECT e.edge_id as id1 FROM '' - || quote_ident(toponame) || ''.edge e '' - || ''WHERE not issimple(e.geom)'' - LOOP - retrec.error = ''edge not simple''; - retrec.id1 = rec.id1; - retrec.id2 = NULL; - RETURN NEXT retrec; - END LOOP; - - -- Check for edge crossing - FOR rec IN EXECUTE ''SELECT e1.edge_id as id1, e2.edge_id as id2 FROM '' - || quote_ident(toponame) || ''.edge e1, '' - || quote_ident(toponame) || ''.edge e2 '' - || ''WHERE e1.edge_id < e2.edge_id '' - || ''AND e1.geom && e2.geom '' - || ''AND crosses(e1.geom, e2.geom)'' - LOOP - retrec.error = ''edge crosses edge''; - retrec.id1 = rec.id1; - retrec.id2 = rec.id2; - RETURN NEXT retrec; - END LOOP; - - -- Check for edge start_node geometry mis-match - FOR rec IN EXECUTE ''SELECT e.edge_id as id1, n.node_id as id2 FROM '' - || quote_ident(toponame) || ''.edge e, '' - || quote_ident(toponame) || ''.node n '' - || ''WHERE e.start_node = n.node_id '' - || ''AND NOT Equals(StartPoint(e.geom), n.geom)'' - LOOP - retrec.error = ''edge start node geometry mis-match''; - retrec.id1 = rec.id1; - retrec.id2 = rec.id2; - RETURN NEXT retrec; - END LOOP; - - -- Check for edge end_node geometry mis-match - FOR rec IN EXECUTE ''SELECT e.edge_id as id1, n.node_id as id2 FROM '' - || quote_ident(toponame) || ''.edge e, '' - || quote_ident(toponame) || ''.node n '' - || ''WHERE e.end_node = n.node_id '' - || ''AND NOT Equals(EndPoint(e.geom), n.geom)'' - LOOP - retrec.error = ''edge end node geometry mis-match''; - retrec.id1 = rec.id1; - retrec.id2 = rec.id2; - RETURN NEXT retrec; - END LOOP; - - -- Check for faces w/out edges - FOR rec IN EXECUTE ''SELECT face_id as id1 FROM '' - || quote_ident(toponame) || ''.face '' - || ''EXCEPT ( SELECT left_face FROM '' - || quote_ident(toponame) || ''.edge '' - || '' UNION SELECT right_face FROM '' - || quote_ident(toponame) || ''.edge '' - || '')'' - LOOP - retrec.error = ''face without edges''; - retrec.id1 = rec.id1; - retrec.id2 = NULL; - RETURN NEXT retrec; - END LOOP; - - -- Check for overlapping faces - -- TODO: this check requires some thinking, do we really - -- have to construct face geometry to detect overlap with - -- another face ?? - FOR rec IN EXECUTE ''SELECT f1.face_id as id1, f2.face_id as id2 FROM '' - || quote_ident(toponame) || ''.face f1, '' - || quote_ident(toponame) || ''.face f2 '' - || ''WHERE f1.face_id > 0 AND f1.face_id < f2.face_id AND '' - || '' Overlaps(topology.ST_GetFaceGeometry('' - || quote_literal(toponame) || '', f1.face_id), '' - || '' topology.ST_GetFaceGeometry('' - || quote_literal(toponame) || '', f2.face_id))'' - LOOP - retrec.error = ''face overlaps face''; - retrec.id1 = rec.id1; - retrec.id2 = rec.id2; - RETURN NEXT retrec; - END LOOP; - - -- Check for face within face - -- TODO: this check requires some thinking, do we really - -- have to construct face geometry to detect within condition - -- another face ?? - FOR rec IN EXECUTE ''SELECT f1.face_id as id1, f2.face_id as id2 FROM '' - || quote_ident(toponame) || ''.face f1, '' - || quote_ident(toponame) || ''.face f2 '' - || ''WHERE f1.face_id != 0 AND f2.face_id != 0 '' - || ''AND f1.face_id != f2.face_id '' - || ''AND Within(topology.ST_GetFaceGeometry('' - || quote_literal(toponame) || '', f1.face_id), '' - || '' topology.ST_GetFaceGeometry('' - || quote_literal(toponame) || '', f2.face_id))'' - LOOP - retrec.error = ''face within face''; - retrec.id1 = rec.id1; - retrec.id2 = rec.id2; - RETURN NEXT retrec; - END LOOP; + END LOOP; #if 0 - -- Check SRID consistency - FOR rec in EXECUTE - ''SELECT count(*) FROM ( getSRID(geom) FROM '' - || quote_ident(toponame) || ''.edge '' - || '' UNION '' - ''SELECT getSRID(geom) FROM '' - || quote_ident(toponame) || ''.node )'' - LOOP - IF rec.count > 1 THEN - retrec.error = ''mixed SRIDs''; - retrec.id1 = NULL; - retrec.id2 = NULL; - RETURN NEXT retrec; - END IF; - END LOOP; + -- Check SRID consistency + FOR rec in EXECUTE + 'SELECT count(*) FROM ( getSRID(geom) FROM ' + || quote_ident(toponame) || '.edge ' + || ' UNION ' + 'SELECT getSRID(geom) FROM ' + || quote_ident(toponame) || '.node )' + LOOP + IF rec.count > 1 THEN + retrec.error = 'mixed SRIDs'; + retrec.id1 = NULL; + retrec.id2 = NULL; + RETURN NEXT retrec; + END IF; + END LOOP; #endif - RETURN; -END -' -LANGUAGE 'plpgsql' _VOLATILE_STRICT; --- } ValidateTopology(toponame) - ---{ --- TopoGeo_AddPoint(toponame, pointgeom, layer_id, topogeom_id) --- --- Add a Point (node) into a topology --- -CREATEFUNCTION topology.TopoGeo_AddPoint(varchar, geometry, integer, integer) - RETURNS int AS -' -DECLARE - atopology alias for $1; - apoint alias for $2; - ret int; -BEGIN - - -- Add nodes (contained in NO face) - SELECT topology.ST_AddIsoNode(atopology, NULL, apoint) INTO ret; - - RAISE NOTICE ''TopoGeo_AddPoint: node: %'', ret; - - RETURN ret; + DROP TABLE face_check; + RETURN; END -' -LANGUAGE 'plpgsql' _VOLATILE; ---} TopoGeo_AddPoint - ---{ --- TopoGeo_addLinestring --- --- Add a Point (node) into a topology --- -CREATEFUNCTION topology.TopoGeo_addLinestring(varchar, geometry) - RETURNS int AS -' -DECLARE - atopology alias for $1; - aline alias for $2; - rec RECORD; - query text; - firstpoint geometry; - lastpoint geometry; - firstnode int; - lastnode int; - edgeid int; -BEGIN - firstpoint = StartPoint(aline); - lastpoint = EndPoint(aline); - - -- Add first and last point nodes (contained in NO face) - SELECT topology.ST_AddIsoNode(atopology, NULL, firstpoint) INTO firstnode; - SELECT topology.ST_AddIsoNode(atopology, NULL, lastpoint) INTO lastnode; - - RAISE NOTICE ''First node: %, Last node: %'', firstnode, lastnode; - - -- Add edge - SELECT topology.ST_AddIsoEdge(atopology, firstnode, lastnode, aline) - INTO edgeid; - - RAISE NOTICE ''Edge: %'', edgeid; - - RETURN edgeid; -END -' -LANGUAGE 'plpgsql'; ---} TopoGeo_addLinestring - ---{ --- TopoGeo_AddPolygon --- --- Add a Polygon into a topology --- -CREATEFUNCTION topology.TopoGeo_AddPolygon(varchar, geometry) - RETURNS int AS -' -DECLARE - rec RECORD; - query text; -BEGIN - - RAISE EXCEPTION ''TopoGeo_AddPolygon not implemented yet''; -END -' -LANGUAGE 'plpgsql'; ---} TopoGeo_AddPolygon +$$ +LANGUAGE 'plpgsql' VOLATILE STRICT; +-- } ValidateTopology(toponame) --{ --- CreateTopology(name, SRID, precision) +-- CreateTopology(name, SRID, precision, hasZ) -- -- Create a topology schema, add a topology info record -- in the topology.topology relation, return it's numeric -- id. -- -CREATEFUNCTION topology.CreateTopology(varchar, integer, float8) +CREATE OR REPLACE FUNCTION topology.CreateTopology(atopology varchar, srid integer, prec float8, hasZ boolean) RETURNS integer -AS ' +AS +$$ DECLARE - atopology alias for $1; - srid alias for $2; - precision alias for $3; - rec RECORD; - topology_id integer; -BEGIN - --- FOR rec IN SELECT * FROM pg_namespace WHERE text(nspname) = atopology --- LOOP --- RAISE EXCEPTION ''SQL/MM Spatial exception - schema already exists''; --- END LOOP; - - ------ Fetch next id for the new topology - FOR rec IN SELECT nextval(''topology.topology_id_seq'') - LOOP - topology_id = rec.nextval; - END LOOP; - - - EXECUTE '' -CREATE SCHEMA '' || quote_ident(atopology) || ''; - ''; - - -------------{ face CREATION - EXECUTE - ''CREATE TABLE '' || quote_ident(atopology) || ''.face ('' - || ''face_id SERIAL,'' - || ''mbr BOX2D,'' - || '' CONSTRAINT face_primary_key PRIMARY KEY(face_id)'' - || '');''; - -------------} END OF face CREATION - - - --------------{ node CREATION - - EXECUTE - ''CREATE TABLE '' || quote_ident(atopology) || ''.node ('' - || ''node_id SERIAL,'' - --|| ''geom GEOMETRY,'' - || ''containing_face INTEGER,'' - - || ''CONSTRAINT node_primary_key PRIMARY KEY(node_id),'' - - --|| ''CONSTRAINT node_geometry_type CHECK '' - --|| ''( GeometryType(geom) = ''''POINT'''' ),'' - - || ''CONSTRAINT face_exists FOREIGN KEY(containing_face) '' - || ''REFERENCES '' || quote_ident(atopology) || ''.face(face_id)'' - - || '');''; - - -- Add geometry column to the node table - EXECUTE - ''SELECT AddGeometryColumn(''||quote_literal(atopology) - ||'',''''node'''',''''geom'''',''||quote_literal(srid) - ||'',''''POINT'''',''''2'''')''; - - --------------} END OF node CREATION - - --------------{ edge CREATION - - -- edge_data table - EXECUTE - ''CREATE TABLE '' || quote_ident(atopology) || ''.edge_data ('' - || ''edge_id SERIAL NOT NULL PRIMARY KEY,'' - || ''start_node INTEGER NOT NULL,'' - || ''end_node INTEGER NOT NULL,'' - || ''next_left_edge INTEGER NOT NULL,'' - || ''abs_next_left_edge INTEGER NOT NULL,'' - || ''next_right_edge INTEGER NOT NULL,'' - || ''abs_next_right_edge INTEGER NOT NULL,'' - || ''left_face INTEGER NOT NULL,'' - || ''right_face INTEGER NOT NULL,'' - --|| ''geom GEOMETRY NOT NULL,'' - - --|| ''CONSTRAINT edge_geometry_type CHECK '' - --|| ''( GeometryType(geom) = ''''LINESTRING'''' ),'' - - || ''CONSTRAINT start_node_exists FOREIGN KEY(start_node)'' - || '' REFERENCES '' || quote_ident(atopology) || ''.node(node_id),'' - - || ''CONSTRAINT end_node_exists FOREIGN KEY(end_node) '' - || '' REFERENCES '' || quote_ident(atopology) || ''.node(node_id),'' - - || ''CONSTRAINT left_face_exists FOREIGN KEY(left_face) '' - || ''REFERENCES '' || quote_ident(atopology) || ''.face(face_id),'' - - || ''CONSTRAINT right_face_exists FOREIGN KEY(right_face) '' - || ''REFERENCES '' || quote_ident(atopology) || ''.face(face_id),'' - - || ''CONSTRAINT next_left_edge_exists FOREIGN KEY(abs_next_left_edge)'' - || '' REFERENCES '' || quote_ident(atopology) - || ''.edge_data(edge_id)'' - || '' DEFERRABLE INITIALLY DEFERRED,'' - - || ''CONSTRAINT next_right_edge_exists '' - || ''FOREIGN KEY(abs_next_right_edge)'' - || '' REFERENCES '' || quote_ident(atopology) - || ''.edge_data(edge_id) '' - || '' DEFERRABLE INITIALLY DEFERRED'' - || '');''; - - -- Add geometry column to the edge_data table - EXECUTE - ''SELECT AddGeometryColumn(''||quote_literal(atopology) - ||'',''''edge_data'''',''''geom'''',''||quote_literal(srid) - ||'',''''LINESTRING'''',''''2'''')''; - - - -- edge standard view (select rule) - EXECUTE ''CREATE VIEW '' || quote_ident(atopology) - || ''.edge AS SELECT '' - || '' edge_id,start_node, end_node, next_left_edge, '' - || '' next_right_edge, '' - || '' left_face, right_face, geom FROM '' - || quote_ident(atopology) || ''.edge_data''; - - -- edge standard view (insert rule) - EXECUTE ''CREATE RULE edge_insert_rule AS ON INSERT '' - || ''TO '' || quote_ident(atopology) - || ''.edge DO INSTEAD '' - || '' INSERT into '' || quote_ident(atopology) - || ''.edge_data '' - || '' VALUES (NEW.edge_id, NEW.start_node, NEW.end_node, '' - || '' NEW.next_left_edge, abs(NEW.next_left_edge), '' - || '' NEW.next_right_edge, abs(NEW.next_right_edge), '' - || '' NEW.left_face, NEW.right_face, NEW.geom);''; - - --------------} END OF edge CREATION - - --------------{ layer sequence - EXECUTE ''CREATE SEQUENCE '' - || quote_ident(atopology) || ''.layer_id_seq;''; - --------------} layer sequence - - --------------{ relation CREATION - -- - EXECUTE - ''CREATE TABLE '' || quote_ident(atopology) || ''.relation ('' - || '' topogeo_id integer NOT NULL, '' - || '' layer_id integer NOT NULL, '' - || '' element_id integer NOT NULL, '' - || '' element_type integer NOT NULL, '' - || '' UNIQUE(layer_id,topogeo_id,element_id,element_type));''; - - EXECUTE - ''CREATE TRIGGER relation_integrity_checks '' - ||''BEFORE UPDATE OR INSERT ON '' - || quote_ident(atopology) || ''.relation FOR EACH ROW '' - || '' EXECUTE PROCEDURE topology.RelationTrigger('' - ||topology_id||'',''||quote_literal(atopology)||'')''; - --------------} END OF relation CREATION - - - ------- Default (world) face - EXECUTE ''INSERT INTO '' || quote_ident(atopology) || ''.face(face_id) VALUES(0);''; - - ------- GiST index on node - EXECUTE ''CREATE INDEX node_gist ON '' - || quote_ident(atopology) - || ''.node using gist (geom gist_geometry_ops);''; - - ------- GiST index on edge - EXECUTE ''CREATE INDEX edge_gist ON '' - || quote_ident(atopology) - || ''.edge_data using gist (geom gist_geometry_ops);''; - - ------- Add record to the "topology" metadata table - EXECUTE ''INSERT INTO topology.topology (id, name, srid, precision) '' - || '' VALUES ('' || quote_literal(topology_id) || '','' - || quote_literal(atopology) || '','' - || quote_literal(srid) || '','' || quote_literal(precision) - || '')''; + rec RECORD; + topology_id integer; + ndims integer; +BEGIN + +-- FOR rec IN SELECT * FROM pg_namespace WHERE text(nspname) = atopology +-- LOOP +-- RAISE EXCEPTION 'SQL/MM Spatial exception - schema already exists'; +-- END LOOP; + + ndims = 2; + IF hasZ THEN ndims = 3; END IF; + + ------ Fetch next id for the new topology + FOR rec IN SELECT nextval('topology.topology_id_seq') + LOOP + topology_id = rec.nextval; + END LOOP; + + + EXECUTE 'CREATE SCHEMA ' || quote_ident(atopology); + + -------------{ face CREATION + EXECUTE + 'CREATE TABLE ' || quote_ident(atopology) || '.face (' + || 'face_id SERIAL,' + || ' CONSTRAINT face_primary_key PRIMARY KEY(face_id)' + || ');'; + + -- Add mbr column to the face table + EXECUTE + 'SELECT AddGeometryColumn('||quote_literal(atopology) + ||',''face'',''mbr'','||quote_literal(srid) + ||',''POLYGON'',2)'; -- 2d only mbr is good enough + + -------------} END OF face CREATION + + + --------------{ node CREATION + + EXECUTE + 'CREATE TABLE ' || quote_ident(atopology) || '.node (' + || 'node_id SERIAL,' + --|| 'geom GEOMETRY,' + || 'containing_face INTEGER,' + + || 'CONSTRAINT node_primary_key PRIMARY KEY(node_id),' + + --|| 'CONSTRAINT node_geometry_type CHECK ' + --|| '( GeometryType(geom) = ''POINT'' ),' + + || 'CONSTRAINT face_exists FOREIGN KEY(containing_face) ' + || 'REFERENCES ' || quote_ident(atopology) || '.face(face_id)' + + || ');'; + + -- Add geometry column to the node table + EXECUTE + 'SELECT AddGeometryColumn('||quote_literal(atopology) + ||',''node'',''geom'','||quote_literal(srid) + ||',''POINT'',' || ndims || ')'; + + --------------} END OF node CREATION + + --------------{ edge CREATION + + -- edge_data table + EXECUTE + 'CREATE TABLE ' || quote_ident(atopology) || '.edge_data (' + || 'edge_id SERIAL NOT NULL PRIMARY KEY,' + || 'start_node INTEGER NOT NULL,' + || 'end_node INTEGER NOT NULL,' + || 'next_left_edge INTEGER NOT NULL,' + || 'abs_next_left_edge INTEGER NOT NULL,' + || 'next_right_edge INTEGER NOT NULL,' + || 'abs_next_right_edge INTEGER NOT NULL,' + || 'left_face INTEGER NOT NULL,' + || 'right_face INTEGER NOT NULL,' + --|| 'geom GEOMETRY NOT NULL,' + + --|| 'CONSTRAINT edge_geometry_type CHECK ' + --|| '( GeometryType(geom) = ''LINESTRING'' ),' + + || 'CONSTRAINT start_node_exists FOREIGN KEY(start_node)' + || ' REFERENCES ' || quote_ident(atopology) || '.node(node_id),' + + || 'CONSTRAINT end_node_exists FOREIGN KEY(end_node) ' + || ' REFERENCES ' || quote_ident(atopology) || '.node(node_id),' + + || 'CONSTRAINT left_face_exists FOREIGN KEY(left_face) ' + || 'REFERENCES ' || quote_ident(atopology) || '.face(face_id),' + + || 'CONSTRAINT right_face_exists FOREIGN KEY(right_face) ' + || 'REFERENCES ' || quote_ident(atopology) || '.face(face_id),' + + || 'CONSTRAINT next_left_edge_exists FOREIGN KEY(abs_next_left_edge)' + || ' REFERENCES ' || quote_ident(atopology) + || '.edge_data(edge_id)' + || ' DEFERRABLE INITIALLY DEFERRED,' + + || 'CONSTRAINT next_right_edge_exists ' + || 'FOREIGN KEY(abs_next_right_edge)' + || ' REFERENCES ' || quote_ident(atopology) + || '.edge_data(edge_id) ' + || ' DEFERRABLE INITIALLY DEFERRED' + || ');'; + + -- Add geometry column to the edge_data table + EXECUTE + 'SELECT AddGeometryColumn('||quote_literal(atopology) + ||',''edge_data'',''geom'','||quote_literal(srid) + ||',''LINESTRING'',' || ndims || ')'; + + + -- edge standard view (select rule) + EXECUTE 'CREATE VIEW ' || quote_ident(atopology) + || '.edge AS SELECT ' + || ' edge_id, start_node, end_node, next_left_edge, ' + || ' next_right_edge, ' + || ' left_face, right_face, geom FROM ' + || quote_ident(atopology) || '.edge_data'; + + -- edge standard view description + EXECUTE 'COMMENT ON VIEW ' || quote_ident(atopology) + || '.edge IS ' + || '''Contains edge topology primitives'''; + EXECUTE 'COMMENT ON COLUMN ' || quote_ident(atopology) + || '.edge.edge_id IS ' + || '''Unique identifier of the edge'''; + EXECUTE 'COMMENT ON COLUMN ' || quote_ident(atopology) + || '.edge.start_node IS ' + || '''Unique identifier of the node at the start of the edge'''; + EXECUTE 'COMMENT ON COLUMN ' || quote_ident(atopology) + || '.edge.end_node IS ' + || '''Unique identifier of the node at the end of the edge'''; + EXECUTE 'COMMENT ON COLUMN ' || quote_ident(atopology) + || '.edge.next_left_edge IS ' + || '''Unique identifier of the next edge of the face on the left (when looking in the direction from START_NODE to END_NODE), moving counterclockwise around the face boundary'''; + EXECUTE 'COMMENT ON COLUMN ' || quote_ident(atopology) + || '.edge.next_right_edge IS ' + || '''Unique identifier of the next edge of the face on the right (when looking in the direction from START_NODE to END_NODE), moving counterclockwise around the face boundary'''; + EXECUTE 'COMMENT ON COLUMN ' || quote_ident(atopology) + || '.edge.left_face IS ' + || '''Unique identifier of the face on the left side of the edge when looking in the direction from START_NODE to END_NODE'''; + EXECUTE 'COMMENT ON COLUMN ' || quote_ident(atopology) + || '.edge.right_face IS ' + || '''Unique identifier of the face on the right side of the edge when looking in the direction from START_NODE to END_NODE'''; + EXECUTE 'COMMENT ON COLUMN ' || quote_ident(atopology) + || '.edge.geom IS ' + || '''The geometry of the edge'''; + + -- edge standard view (insert rule) + EXECUTE 'CREATE RULE edge_insert_rule AS ON INSERT ' + || 'TO ' || quote_ident(atopology) + || '.edge DO INSTEAD ' + || ' INSERT into ' || quote_ident(atopology) + || '.edge_data ' + || ' VALUES (NEW.edge_id, NEW.start_node, NEW.end_node, ' + || ' NEW.next_left_edge, abs(NEW.next_left_edge), ' + || ' NEW.next_right_edge, abs(NEW.next_right_edge), ' + || ' NEW.left_face, NEW.right_face, NEW.geom);'; + + --------------} END OF edge CREATION + + --------------{ layer sequence + EXECUTE 'CREATE SEQUENCE ' + || quote_ident(atopology) || '.layer_id_seq;'; + --------------} layer sequence + + --------------{ relation CREATION + -- + EXECUTE + 'CREATE TABLE ' || quote_ident(atopology) || '.relation (' + || ' topogeo_id integer NOT NULL, ' + || ' layer_id integer NOT NULL, ' + || ' element_id integer NOT NULL, ' + || ' element_type integer NOT NULL, ' + || ' UNIQUE(layer_id,topogeo_id,element_id,element_type));'; + + EXECUTE + 'CREATE TRIGGER relation_integrity_checks ' + ||'BEFORE UPDATE OR INSERT ON ' + || quote_ident(atopology) || '.relation FOR EACH ROW ' + || ' EXECUTE PROCEDURE topology.RelationTrigger(' + ||topology_id||','||quote_literal(atopology)||')'; + --------------} END OF relation CREATION + + + ------- Default (world) face + EXECUTE 'INSERT INTO ' || quote_ident(atopology) || '.face(face_id) VALUES(0);'; + + ------- GiST index on face + EXECUTE 'CREATE INDEX face_gist ON ' + || quote_ident(atopology) + || '.face using gist (mbr);'; + + ------- GiST index on node + EXECUTE 'CREATE INDEX node_gist ON ' + || quote_ident(atopology) + || '.node using gist (geom);'; + + ------- GiST index on edge + EXECUTE 'CREATE INDEX edge_gist ON ' + || quote_ident(atopology) + || '.edge_data using gist (geom);'; + + ------- Indexes on left_face and right_face of edge_data + ------- NOTE: these indexes speed up GetFaceGeometry (and thus + ------- TopoGeometry::Geometry) by a factor of 10 ! + ------- See http://trac.osgeo.org/postgis/ticket/806 + EXECUTE 'CREATE INDEX edge_left_face_idx ON ' + || quote_ident(atopology) + || '.edge_data (left_face);'; + EXECUTE 'CREATE INDEX edge_right_face_idx ON ' + || quote_ident(atopology) + || '.edge_data (right_face);'; + + ------- Add record to the "topology" metadata table + EXECUTE 'INSERT INTO topology.topology ' + || '(id, name, srid, precision, hasZ) VALUES (' + || quote_literal(topology_id) || ',' + || quote_literal(atopology) || ',' + || quote_literal(srid) || ',' || quote_literal(prec) + || ',' || hasZ + || ')'; - RETURN topology_id; + RETURN topology_id; END -' -LANGUAGE 'plpgsql' _VOLATILE_STRICT; +$$ +LANGUAGE 'plpgsql' VOLATILE STRICT; + +--} CreateTopology + +--{ CreateTopology wrappers for unspecified srid or precision or hasZ --- wrappers for unspecified srid or precision +-- CreateTopology(name, SRID, precision) -- hasZ = false +CREATE OR REPLACE FUNCTION topology.CreateTopology(toponame varchar, srid integer, prec float8) +RETURNS integer AS +' SELECT topology.CreateTopology($1, $2, $3, false);' +LANGUAGE 'sql' VOLATILE STRICT; -CREATEFUNCTION topology.CreateTopology(varchar, integer) +-- CreateTopology(name, SRID) -- precision = 0 +CREATE OR REPLACE FUNCTION topology.CreateTopology(varchar, integer) RETURNS integer AS -' SELECT topology.CreateTopology($1, $2, -1); ' -LANGUAGE 'SQL' _VOLATILE_STRICT; +' SELECT topology.CreateTopology($1, $2, 0); ' +LANGUAGE 'sql' VOLATILE STRICT; -CREATEFUNCTION topology.CreateTopology(varchar) +-- CreateTopology(name) -- srid = unknown, precision = 0 +CREATE OR REPLACE FUNCTION topology.CreateTopology(varchar) RETURNS integer AS -' SELECT topology.CreateTopology($1, -1, -1); ' -LANGUAGE 'SQL' _VOLATILE_STRICT; +$$ SELECT topology.CreateTopology($1, ST_SRID('POINT EMPTY'::geometry), 0); $$ +LANGUAGE 'sql' VOLATILE STRICT; --} CreateTopology @@ -1700,2109 +1900,100 @@ -- -- Drops a topology schema getting rid of every dependent object. -- -CREATEFUNCTION topology.DropTopology(varchar) +CREATE OR REPLACE FUNCTION topology.DropTopology(atopology varchar) RETURNS text -AS ' +AS +$$ DECLARE - atopology alias for $1; - topoid integer; - rec RECORD; + topoid integer; + rec RECORD; BEGIN - -- Get topology id + -- Get topology id SELECT id FROM topology.topology into topoid WHERE name = atopology; - IF topoid IS NOT NULL THEN - - RAISE NOTICE ''Dropping all layers from topology % (%)'', - atopology, topoid; + IF topoid IS NOT NULL THEN - -- Drop all layers in the topology - FOR rec IN EXECUTE ''SELECT * FROM topology.layer WHERE '' - || '' topology_id = '' || topoid - LOOP + RAISE NOTICE 'Dropping all layers from topology % (%)', + atopology, topoid; - EXECUTE ''SELECT topology.DropTopoGeometryColumn('' - || quote_literal(rec.schema_name) - || '','' - || quote_literal(rec.table_name) - || '','' - || quote_literal(rec.feature_column) - || '')''; - END LOOP; + -- Drop all layers in the topology + FOR rec IN EXECUTE 'SELECT * FROM topology.layer WHERE ' + || ' topology_id = ' || topoid + LOOP - -- Delete record from topology.topology - EXECUTE ''DELETE FROM topology.topology WHERE id = '' - || topoid; + EXECUTE 'SELECT topology.DropTopoGeometryColumn(' + || quote_literal(rec.schema_name) + || ',' + || quote_literal(rec.table_name) + || ',' + || quote_literal(rec.feature_column) + || ')'; + END LOOP; - END IF; + -- Delete record from topology.topology + EXECUTE 'DELETE FROM topology.topology WHERE id = ' + || topoid; + END IF; - -- Drop the schema (if it exists) - FOR rec IN SELECT * FROM pg_namespace WHERE text(nspname) = atopology - LOOP - EXECUTE ''DROP SCHEMA ''||quote_ident(atopology)||'' CASCADE''; - END LOOP; + -- Drop the schema (if it exists) + FOR rec IN SELECT * FROM pg_namespace WHERE text(nspname) = atopology + LOOP + EXECUTE 'DROP SCHEMA '||quote_ident(atopology)||' CASCADE'; + END LOOP; - RETURN ''Topology '' || quote_literal(atopology) || '' dropped''; + RETURN 'Topology ' || quote_literal(atopology) || ' dropped'; END -' -LANGUAGE 'plpgsql' _VOLATILE_STRICT; +$$ +LANGUAGE 'plpgsql' VOLATILE STRICT; --} DropTopology ---={ ---------------------------------------------------------------- --- POSTGIS-SPECIFIC topology predicates --- --- This part contains function NOT in the SQL/MM specification --- ---------------------------------------------------------------------- +#include "sql/manage/TopologySummary.sql.in.c" +#include "sql/manage/CopyTopology.sql.in.c" ---{ --- Intersects(TopoGeometry, TopoGeometry) --- -CREATEFUNCTION topology.intersects(topology.TopoGeometry, topology.TopoGeometry) - RETURNS bool -AS -' -DECLARE - tg1 alias for $1; - tg2 alias for $2; - tgbuf topology.TopoGeometry; - rec RECORD; - toponame varchar; - query text; -BEGIN - IF tg1.topology_id != tg2.topology_id THEN - RAISE EXCEPTION ''Cannot compute intersection between TopoGeometries from different topologies''; - END IF; - - -- Order TopoGeometries so that tg1 has less-or-same - -- dimensionality of tg1 (point,line,polygon,collection) - IF tg1.type > tg2.type THEN - tgbuf := tg2; - tg2 := tg1; - tg1 := tgbuf; - END IF; - - --RAISE NOTICE ''tg1.id:% tg2.id:%'', tg1.id, tg2.id; - -- Geometry collection are not currently supported - IF tg2.type = 4 THEN - RAISE EXCEPTION ''GeometryCollection are not supported by intersects()''; - END IF; - - -- Get topology name - SELECT name FROM topology.topology into toponame - WHERE id = tg1.topology_id; - - -- Hierarchical TopoGeometries are not currently supported - query = ''SELECT level FROM topology.layer'' - || '' WHERE '' - || '' topology_id = '' || tg1.topology_id - || '' AND '' - || ''( layer_id = '' || tg1.layer_id - || '' OR layer_id = '' || tg2.layer_id - || '' ) '' - || '' AND level > 0 ''; - - --RAISE NOTICE ''%'', query; - - FOR rec IN EXECUTE query - LOOP - RAISE EXCEPTION ''Hierarchical TopoGeometries are not currently supported by intersects()''; - END LOOP; - - IF tg1.type = 1 THEN -- [multi]point - - - IF tg2.type = 1 THEN -- point/point - --------------------------------------------------------- - -- - -- Two [multi]point features intersect if they share - -- any Node - -- - -- - -- - query = - ''SELECT a.topogeo_id FROM '' - || quote_ident(toponame) || - ''.relation a, '' - || quote_ident(toponame) || - ''.relation b '' - || ''WHERE a.layer_id = '' || tg1.layer_id - || '' AND b.layer_id = '' || tg2.layer_id - || '' AND a.topogeo_id = '' || tg1.id - || '' AND b.topogeo_id = '' || tg2.id - || '' AND a.element_id = b.element_id '' - || '' LIMIT 1''; - --RAISE NOTICE ''%'', query; - FOR rec IN EXECUTE query - LOOP - RETURN TRUE; -- they share an element - END LOOP; - RETURN FALSE; -- no elements shared - -- - --------------------------------------------------------- - - - ELSIF tg2.type = 2 THEN -- point/line - --------------------------------------------------------- - -- - -- A [multi]point intersects a [multi]line if they share - -- any Node. - -- - -- - -- - query = - ''SELECT a.topogeo_id FROM '' - || quote_ident(toponame) || - ''.relation a, '' - || quote_ident(toponame) || - ''.relation b, '' - || quote_ident(toponame) || - ''.edge_data e '' - || ''WHERE a.layer_id = '' || tg1.layer_id - || '' AND b.layer_id = '' || tg2.layer_id - || '' AND a.topogeo_id = '' || tg1.id - || '' AND b.topogeo_id = '' || tg2.id - || '' AND abs(b.element_id) = e.edge_id '' - || '' AND ( '' - || '' e.start_node = a.element_id '' - || '' OR '' - || '' e.end_node = a.element_id '' - || '' )'' - || '' LIMIT 1''; - --RAISE NOTICE ''%'', query; - FOR rec IN EXECUTE query - LOOP - RETURN TRUE; -- they share an element - END LOOP; - RETURN FALSE; -- no elements shared - -- - --------------------------------------------------------- - - ELSIF tg2.type = 3 THEN -- point/polygon - --------------------------------------------------------- - -- - -- A [multi]point intersects a [multi]polygon if any - -- Node of the point is contained in any face of the - -- polygon OR ( is end_node or start_node of any edge - -- of any polygon face ). - -- - -- We assume the Node-in-Face check is faster becasue - -- there will be less Faces then Edges in any polygon. - -- - -- - -- - -- - -- Check if any node is contained in a face - query = - ''SELECT n.node_id as id FROM '' - || quote_ident(toponame) || - ''.relation r1, '' - || quote_ident(toponame) || - ''.relation r2, '' - || quote_ident(toponame) || - ''.node n '' - || ''WHERE r1.layer_id = '' || tg1.layer_id - || '' AND r2.layer_id = '' || tg2.layer_id - || '' AND r1.topogeo_id = '' || tg1.id - || '' AND r2.topogeo_id = '' || tg2.id - || '' AND n.node_id = r1.element_id '' - || '' AND r2.element_id = n.containing_face '' - || '' LIMIT 1''; - --RAISE NOTICE ''%'', query; - FOR rec IN EXECUTE query - LOOP - --RAISE NOTICE ''Node % in polygon face'', rec.id; - RETURN TRUE; -- one (or more) nodes are - -- contained in a polygon face - END LOOP; - - -- Check if any node is start or end of any polygon - -- face edge - query = - ''SELECT n.node_id as nid, e.edge_id as eid '' - || '' FROM '' - || quote_ident(toponame) || - ''.relation r1, '' - || quote_ident(toponame) || - ''.relation r2, '' - || quote_ident(toponame) || - ''.edge_data e, '' - || quote_ident(toponame) || - ''.node n '' - || ''WHERE r1.layer_id = '' || tg1.layer_id - || '' AND r2.layer_id = '' || tg2.layer_id - || '' AND r1.topogeo_id = '' || tg1.id - || '' AND r2.topogeo_id = '' || tg2.id - || '' AND n.node_id = r1.element_id '' - || '' AND ( '' - || '' e.left_face = r2.element_id '' - || '' OR '' - || '' e.right_face = r2.element_id '' - || '' ) '' - || '' AND ( '' - || '' e.start_node = r1.element_id '' - || '' OR '' - || '' e.end_node = r1.element_id '' - || '' ) '' - || '' LIMIT 1''; - --RAISE NOTICE ''%'', query; - FOR rec IN EXECUTE query - LOOP - --RAISE NOTICE ''Node % on edge % bound'', rec.nid, rec.eid; - RETURN TRUE; -- one node is start or end - -- of a face edge - END LOOP; - - RETURN FALSE; -- no intersection - -- - --------------------------------------------------------- - - ELSIF tg2.type = 4 THEN -- point/collection - RAISE EXCEPTION ''Intersection point/collection not implemented yet''; - - ELSE - RAISE EXCEPTION ''Invalid TopoGeometry type'', tg2.type; - END IF; - - ELSIF tg1.type = 2 THEN -- [multi]line - IF tg2.type = 2 THEN -- line/line - --------------------------------------------------------- - -- - -- A [multi]line intersects a [multi]line if they share - -- any Node. - -- - -- - -- - query = - ''SELECT e1.start_node FROM '' - || quote_ident(toponame) || - ''.relation r1, '' - || quote_ident(toponame) || - ''.relation r2, '' - || quote_ident(toponame) || - ''.edge_data e1, '' - || quote_ident(toponame) || - ''.edge_data e2 '' - || ''WHERE r1.layer_id = '' || tg1.layer_id - || '' AND r2.layer_id = '' || tg2.layer_id - || '' AND r1.topogeo_id = '' || tg1.id - || '' AND r2.topogeo_id = '' || tg2.id - || '' AND abs(r1.element_id) = e1.edge_id '' - || '' AND abs(r2.element_id) = e2.edge_id '' - || '' AND ( '' - || '' e1.start_node = e2.start_node '' - || '' OR '' - || '' e1.start_node = e2.end_node '' - || '' OR '' - || '' e1.end_node = e2.start_node '' - || '' OR '' - || '' e1.end_node = e2.end_node '' - || '' )'' - || '' LIMIT 1''; - --RAISE NOTICE ''%'', query; - FOR rec IN EXECUTE query - LOOP - RETURN TRUE; -- they share an element - END LOOP; - RETURN FALSE; -- no elements shared - -- - --------------------------------------------------------- - - ELSIF tg2.type = 3 THEN -- line/polygon - --------------------------------------------------------- - -- - -- A [multi]line intersects a [multi]polygon if they share - -- any Node (touch-only case), or if any line edge has any - -- polygon face on the left or right (full-containment case - -- + edge crossing case). - -- - -- - -- E1 are line edges, E2 are polygon edges - -- R1 are line relations. - -- R2 are polygon relations. - -- R2.element_id are FACE ids - query = - ''SELECT e1.edge_id'' - || '' FROM '' - || quote_ident(toponame) || - ''.relation r1, '' - || quote_ident(toponame) || - ''.relation r2, '' - || quote_ident(toponame) || - ''.edge_data e1, '' - || quote_ident(toponame) || - ''.edge_data e2 '' - || ''WHERE r1.layer_id = '' || tg1.layer_id - || '' AND r2.layer_id = '' || tg2.layer_id - || '' AND r1.topogeo_id = '' || tg1.id - || '' AND r2.topogeo_id = '' || tg2.id - - -- E1 are line edges - || '' AND e1.edge_id = abs(r1.element_id) '' - - -- E2 are face edges - || '' AND ( e2.left_face = r2.element_id '' - || '' OR e2.right_face = r2.element_id ) '' - - || '' AND ( '' - - -- Check if E1 have left-or-right face - -- being part of R2.element_id - || '' e1.left_face = r2.element_id '' - || '' OR '' - || '' e1.right_face = r2.element_id '' - - -- Check if E1 share start-or-end node - -- with any E2. - || '' OR '' - || '' e1.start_node = e2.start_node '' - || '' OR '' - || '' e1.start_node = e2.end_node '' - || '' OR '' - || '' e1.end_node = e2.start_node '' - || '' OR '' - || '' e1.end_node = e2.end_node '' - - || '' ) '' - - || '' LIMIT 1''; - --RAISE NOTICE ''%'', query; - FOR rec IN EXECUTE query - LOOP - RETURN TRUE; -- either common node - -- or edge-in-face - END LOOP; - - RETURN FALSE; -- no intersection - -- - --------------------------------------------------------- - - ELSIF tg2.type = 4 THEN -- line/collection - RAISE EXCEPTION ''Intersection line/collection not implemented yet'', tg1.type, tg2.type; - - ELSE - RAISE EXCEPTION ''Invalid TopoGeometry type'', tg2.type; - END IF; - - - ELSIF tg1.type = 3 THEN -- [multi]polygon - - IF tg2.type = 3 THEN -- polygon/polygon - --------------------------------------------------------- - -- - -- A [multi]polygon intersects a [multi]polygon if they share - -- any Node (touch-only case), or if any face edge has any of the - -- other polygon face on the left or right (full-containment case - -- + edge crossing case). - -- - -- - -- E1 are poly1 edges. - -- E2 are poly2 edges - -- R1 are poly1 relations. - -- R2 are poly2 relations. - -- R1.element_id are poly1 FACE ids - -- R2.element_id are poly2 FACE ids - query = - ''SELECT e1.edge_id'' - || '' FROM '' - || quote_ident(toponame) || - ''.relation r1, '' - || quote_ident(toponame) || - ''.relation r2, '' - || quote_ident(toponame) || - ''.edge_data e1, '' - || quote_ident(toponame) || - ''.edge_data e2 '' - || ''WHERE r1.layer_id = '' || tg1.layer_id - || '' AND r2.layer_id = '' || tg2.layer_id - || '' AND r1.topogeo_id = '' || tg1.id - || '' AND r2.topogeo_id = '' || tg2.id - - -- E1 are poly1 edges - || '' AND ( e1.left_face = r1.element_id '' - || '' OR e1.right_face = r1.element_id ) '' - - -- E2 are poly2 edges - || '' AND ( e2.left_face = r2.element_id '' - || '' OR e2.right_face = r2.element_id ) '' - - || '' AND ( '' - - -- Check if any edge from a polygon face - -- has any of the other polygon face - -- on the left or right - || '' e1.left_face = r2.element_id '' - || '' OR '' - || '' e1.right_face = r2.element_id '' - || '' OR '' - || '' e2.left_face = r1.element_id '' - || '' OR '' - || '' e2.right_face = r1.element_id '' - - -- Check if E1 share start-or-end node - -- with any E2. - || '' OR '' - || '' e1.start_node = e2.start_node '' - || '' OR '' - || '' e1.start_node = e2.end_node '' - || '' OR '' - || '' e1.end_node = e2.start_node '' - || '' OR '' - || '' e1.end_node = e2.end_node '' - - || '' ) '' - - || '' LIMIT 1''; - --RAISE NOTICE ''%'', query; - FOR rec IN EXECUTE query - LOOP - RETURN TRUE; -- either common node - -- or edge-in-face - END LOOP; - - RETURN FALSE; -- no intersection - -- - --------------------------------------------------------- - - ELSIF tg2.type = 4 THEN -- polygon/collection - RAISE EXCEPTION ''Intersection poly/collection not implemented yet'', tg1.type, tg2.type; - - ELSE - RAISE EXCEPTION ''Invalid TopoGeometry type'', tg2.type; - END IF; - - ELSIF tg1.type = 4 THEN -- collection - IF tg2.type = 4 THEN -- collection/collection - RAISE EXCEPTION ''Intersection collection/collection not implemented yet'', tg1.type, tg2.type; - ELSE - RAISE EXCEPTION ''Invalid TopoGeometry type'', tg2.type; - END IF; - - ELSE - RAISE EXCEPTION ''Invalid TopoGeometry type %'', tg1.type; - END IF; -END -' -LANGUAGE 'plpgsql' _VOLATILE_STRICT; ---} intersects(TopoGeometry, TopoGeometry) +-- Spatial predicates +#include "sql/predicates.sql.in.c" ---{ --- equals(TopoGeometry, TopoGeometry) --- -CREATEFUNCTION topology.equals(topology.TopoGeometry, topology.TopoGeometry) - RETURNS bool -AS -' -DECLARE - tg1 alias for $1; - tg2 alias for $2; - rec RECORD; - toponame varchar; - query text; -BEGIN - - IF tg1.topology_id != tg2.topology_id THEN - RAISE EXCEPTION ''Cannot compare TopoGeometries from different topologies''; - END IF; - - -- Not the same type, not equal - IF tg1.type != tg2.type THEN - RETURN FALSE; - END IF; - - -- Geometry collection are not currently supported - IF tg2.type = 4 THEN - RAISE EXCEPTION ''GeometryCollection are not supported by equals()''; - END IF; - - -- Get topology name - SELECT name FROM topology.topology into toponame - WHERE id = tg1.topology_id; - - -- Two geometries are equal if they are composed by - -- the same TopoElements - FOR rec IN EXECUTE ''SELECT * FROM '' - || '' topology.GetTopoGeomElements('' - || quote_literal(toponame) || '', '' - || tg1.layer_id || '','' || tg1.id || '') '' - || '' EXCEPT SELECT * FROM '' - || '' topology.GetTopogeomElements('' - || quote_literal(toponame) || '', '' - || tg2.layer_id || '','' || tg2.id || '');'' - LOOP - RETURN FALSE; - END LOOP; - - FOR rec IN EXECUTE ''SELECT * FROM '' - || '' topology.GetTopoGeomElements('' - || quote_literal(toponame) || '', '' - || tg2.layer_id || '','' || tg2.id || '')'' - || '' EXCEPT SELECT * FROM '' - || '' topology.GetTopogeomElements('' - || quote_literal(toponame) || '', '' - || tg1.layer_id || '','' || tg1.id || ''); '' - LOOP - RETURN FALSE; - END LOOP; - RETURN TRUE; -END -' -LANGUAGE 'plpgsql' _VOLATILE_STRICT; ---} equals(TopoGeometry, TopoGeometry) - ---=} POSTGIS-SPECIFIC topology predicates +-- Querying +#include "sql/query/getnodebypoint.sql.in.c" +#include "sql/query/getedgebypoint.sql.in.c" +#include "sql/query/getfacebypoint.sql.in.c" + +-- Populating +#include "sql/populate.sql.in.c" +#include "sql/polygonize.sql.in.c" + +-- TopoElement +#include "sql/topoelement/topoelement_agg.sql.in.c" + +-- TopoGeometry +#include "sql/topogeometry/type.sql.in.c" +#include "sql/topogeometry/totopogeom.sql.in.c" +-- GML +#include "sql/gml.sql.in.c" --=} POSTGIS-SPECIFIC block ---={ ---------------------------------------------------------------- -- SQL/MM block --- --- This part contains function in the SQL/MM specification --- ---------------------------------------------------------------------- - - ---{ --- Topo-Geo and Topo-Net 3: Routine Details --- X.3.5 --- --- ST_GetFaceEdges(atopology, aface) --- --- --- -CREATEFUNCTION topology.ST_GetFaceEdges(varchar, integer) - RETURNS setof topology.GetFaceEdges_ReturnType -AS -' -DECLARE - atopology ALIAS FOR $1; - aface ALIAS FOR $2; - rec RECORD; -BEGIN - -- - -- Atopology and aface are required - -- - IF atopology IS NULL OR aface IS NULL THEN - RAISE EXCEPTION - ''SQL/MM Spatial exception - null argument''; - END IF; - - RAISE EXCEPTION - ''ST_GetFaceEdges: not implemented yet''; - - -END -' -LANGUAGE 'plpgsql' _VOLATILE; ---} ST_GetFaceEdges - - ---{ --- Topo-Geo and Topo-Net 3: Routine Details --- X.3.16 --- --- ST_GetFaceGeometry(atopology, aface) --- -CREATEFUNCTION topology.ST_GetFaceGeometry(varchar, integer) - RETURNS GEOMETRY AS -' -DECLARE - atopology ALIAS FOR $1; - aface ALIAS FOR $2; - rec RECORD; -BEGIN - -- - -- Atopology and aface are required - -- - IF atopology IS NULL OR aface IS NULL THEN - RAISE EXCEPTION - ''SQL/MM Spatial exception - null argument''; - END IF; - - -- - -- Construct face - -- - FOR rec IN EXECUTE ''SELECT polygonize(geom) FROM ( SELECT geom FROM '' - || quote_ident(atopology) - || ''.edge WHERE left_face = '' || aface || - '' OR right_face = '' || aface || '') as foo'' - LOOP - RETURN geometryN(rec.polygonize, 1); - --RETURN rec.polygonize; - END LOOP; - - - -- - -- No face found - -- - RAISE EXCEPTION - ''SQL/MM Spatial exception - non-existent face.''; -END -' -LANGUAGE 'plpgsql' _VOLATILE; ---} ST_GetFaceGeometry - - ---{ --- Topo-Geo and Topo-Net 3: Routine Details --- X.3.1 --- --- ST_AddIsoNode(atopology, aface, apoint) --- -CREATEFUNCTION topology.ST_AddIsoNode(varchar, integer, geometry) - RETURNS INTEGER AS -' -DECLARE - atopology ALIAS FOR $1; - aface ALIAS FOR $2; - apoint ALIAS FOR $3; - rec RECORD; - nodeid integer; -BEGIN - - -- - -- Atopology and apoint are required - -- - IF atopology IS NULL OR apoint IS NULL THEN - RAISE EXCEPTION - ''SQL/MM Spatial exception - null argument''; - END IF; - - -- - -- Apoint must be a point - -- - IF substring(geometrytype(apoint), 1, 5) != ''POINT'' - THEN - RAISE EXCEPTION - ''SQL/MM Spatial exception - invalid point''; - END IF; - - -- - -- Check if a coincident node already exists - -- - -- We use index AND x/y equality - -- - FOR rec IN EXECUTE ''SELECT node_id FROM '' - || quote_ident(atopology) || ''.node '' || - ''WHERE geom && '' || quote_literal(apoint) || ''::geometry'' - ||'' AND x(geom) = x(''||quote_literal(apoint)||''::geometry)'' - ||'' AND y(geom) = y(''||quote_literal(apoint)||''::geometry)'' - LOOP - RAISE EXCEPTION - ''SQL/MM Spatial exception - coincident node''; - END LOOP; - - -- - -- Check if any edge crosses (intersects) this node - -- I used _intersects_ here to include boundaries (endpoints) - -- - FOR rec IN EXECUTE ''SELECT edge_id FROM '' - || quote_ident(atopology) || ''.edge '' - || ''WHERE geom && '' || quote_literal(apoint) - || '' AND intersects(geom, '' || quote_literal(apoint) - || '')'' - LOOP - RAISE EXCEPTION - ''SQL/MM Spatial exception - edge crosses node.''; - END LOOP; - - - -- - -- Verify that aface contains apoint - -- if aface is null no check is done - -- - IF aface IS NOT NULL THEN - - FOR rec IN EXECUTE ''SELECT within('' - || quote_literal(apoint) || ''::geometry, - topology.ST_GetFaceGeometry('' - || quote_literal(atopology) || '', '' || aface || - ''))'' - LOOP - IF rec.within = ''f'' THEN - RAISE EXCEPTION - ''SQL/MM Spatial exception - not within face''; - ELSIF rec.within IS NULL THEN - RAISE EXCEPTION - ''SQL/MM Spatial exception - non-existent face''; - END IF; - END LOOP; - - END IF; - - -- - -- Get new node id from sequence - -- - FOR rec IN EXECUTE ''SELECT nextval('''''' || - atopology || ''.node_node_id_seq'''')'' - LOOP - nodeid = rec.nextval; - END LOOP; - - -- - -- Insert the new row - -- - IF aface IS NOT NULL THEN - EXECUTE ''INSERT INTO '' || quote_ident(atopology) - || ''.node(node_id, geom, containing_face) - VALUES(''||nodeid||'',''||quote_literal(apoint)|| - '',''||aface||'')''; - ELSE - EXECUTE ''INSERT INTO '' || quote_ident(atopology) - || ''.node(node_id, geom) - VALUES(''||nodeid||'',''||quote_literal(apoint)|| - '')''; - END IF; - - RETURN nodeid; -END -' -LANGUAGE 'plpgsql' _VOLATILE; ---} ST_AddIsoNode - ---{ --- Topo-Geo and Topo-Net 3: Routine Details --- X.3.2 --- --- ST_MoveIsoNode(atopology, anode, apoint) --- -CREATEFUNCTION topology.ST_MoveIsoNode(varchar, integer, geometry) - RETURNS TEXT AS -' -DECLARE - atopology ALIAS FOR $1; - anode ALIAS FOR $2; - apoint ALIAS FOR $3; - rec RECORD; -BEGIN - - -- - -- All arguments are required - -- - IF atopology IS NULL OR anode IS NULL OR apoint IS NULL THEN - RAISE EXCEPTION - ''SQL/MM Spatial exception - null argument''; - END IF; - - -- - -- Apoint must be a point - -- - IF substring(geometrytype(apoint), 1, 5) != ''POINT'' - THEN - RAISE EXCEPTION - ''SQL/MM Spatial exception - invalid point''; - END IF; - - -- - -- Check node isolation. - -- - FOR rec IN EXECUTE ''SELECT edge_id FROM '' - || quote_ident(atopology) || ''.edge '' || - '' WHERE start_node = '' || anode || - '' OR end_node = '' || anode - LOOP - RAISE EXCEPTION - ''SQL/MM Spatial exception - not isolated node''; - END LOOP; - - -- - -- Check if a coincident node already exists - -- - -- We use index AND x/y equality - -- - FOR rec IN EXECUTE ''SELECT node_id FROM '' - || quote_ident(atopology) || ''.node '' || - ''WHERE geom && '' || quote_literal(apoint) || ''::geometry'' - ||'' AND x(geom) = x(''||quote_literal(apoint)||''::geometry)'' - ||'' AND y(geom) = y(''||quote_literal(apoint)||''::geometry)'' - LOOP - RAISE EXCEPTION - ''SQL/MM Spatial exception - coincident node''; - END LOOP; - - -- - -- Check if any edge crosses (intersects) this node - -- I used _intersects_ here to include boundaries (endpoints) - -- - FOR rec IN EXECUTE ''SELECT edge_id FROM '' - || quote_ident(atopology) || ''.edge '' - || ''WHERE geom && '' || quote_literal(apoint) - || '' AND intersects(geom, '' || quote_literal(apoint) - || '')'' - LOOP - RAISE EXCEPTION - ''SQL/MM Spatial exception - edge crosses node.''; - END LOOP; - - -- - -- Update node point - -- - EXECUTE ''UPDATE '' || quote_ident(atopology) || ''.node '' - || '' SET geom = '' || quote_literal(apoint) - || '' WHERE node_id = '' || anode; - - RETURN ''Isolated Node '' || anode || '' moved to location '' - || x(apoint) || '','' || y(apoint); -END -' -LANGUAGE 'plpgsql' _VOLATILE; ---} ST_MoveIsoNode - ---{ --- Topo-Geo and Topo-Net 3: Routine Details --- X.3.3 --- --- ST_RemoveIsoNode(atopology, anode) --- -CREATEFUNCTION topology.ST_RemoveIsoNode(varchar, integer) - RETURNS TEXT AS -' -DECLARE - atopology ALIAS FOR $1; - anode ALIAS FOR $2; - rec RECORD; -BEGIN - - -- - -- Atopology and apoint are required - -- - IF atopology IS NULL OR anode IS NULL THEN - RAISE EXCEPTION - ''SQL/MM Spatial exception - null argument''; - END IF; - - -- - -- Check node isolation. - -- - FOR rec IN EXECUTE ''SELECT edge_id FROM '' - || quote_ident(atopology) || ''.edge_data '' || - '' WHERE start_node = '' || anode || - '' OR end_node = '' || anode - LOOP - RAISE EXCEPTION - ''SQL/MM Spatial exception - not isolated node''; - END LOOP; - - EXECUTE ''DELETE FROM '' || quote_ident(atopology) || ''.node '' - || '' WHERE node_id = '' || anode; - - RETURN ''Isolated node '' || anode || '' removed''; -END -' -LANGUAGE 'plpgsql' _VOLATILE; ---} ST_RemoveIsoNode - ---{ --- Topo-Geo and Topo-Net 3: Routine Details --- X.3.7 --- --- ST_RemoveIsoEdge(atopology, anedge) --- -CREATEFUNCTION topology.ST_RemoveIsoEdge(varchar, integer) - RETURNS TEXT AS -' -DECLARE - atopology ALIAS FOR $1; - anedge ALIAS FOR $2; - edge RECORD; - rec RECORD; - ok BOOL; -BEGIN - - -- - -- Atopology and anedge are required - -- - IF atopology IS NULL OR anedge IS NULL THEN - RAISE EXCEPTION - ''SQL/MM Spatial exception - null argument''; - END IF; - - -- - -- Check node existance - -- - ok = false; - FOR edge IN EXECUTE ''SELECT * FROM '' - || quote_ident(atopology) || ''.edge_data '' || - '' WHERE edge_id = '' || anedge - LOOP - ok = true; - END LOOP; - IF NOT ok THEN - RAISE EXCEPTION - ''SQL/MM Spatial exception - non-existent edge''; - END IF; - - -- - -- Check node isolation - -- - IF edge.left_face != edge.right_face THEN - RAISE EXCEPTION - ''SQL/MM Spatial exception - not isolated edge''; - END IF; - - FOR rec IN EXECUTE ''SELECT * FROM '' - || quote_ident(atopology) || ''.edge_data '' - || '' WHERE edge_id != '' || anedge - || '' AND ( start_node = '' || edge.start_node - || '' OR start_node = '' || edge.end_node - || '' OR end_node = '' || edge.start_node - || '' OR end_node = '' || edge.end_node - || '' ) '' - LOOP - RAISE EXCEPTION - ''SQL/MM Spatial exception - not isolated edge''; - END LOOP; - - -- - -- Delete the edge - -- - EXECUTE ''DELETE FROM '' || quote_ident(atopology) || ''.edge_data '' - || '' WHERE edge_id = '' || anedge; - - RETURN ''Isolated edge '' || anedge || '' removed''; -END -' -LANGUAGE 'plpgsql' _VOLATILE; ---} ST_RemoveIsoEdge - ---{ --- Topo-Geo and Topo-Net 3: Routine Details --- X.3.8 --- --- ST_NewEdgesSplit(atopology, anedge, apoint) --- -CREATEFUNCTION topology.ST_NewEdgesSplit(varchar, integer, geometry) - RETURNS INTEGER AS -' -DECLARE - atopology ALIAS FOR $1; - anedge ALIAS FOR $2; - apoint ALIAS FOR $3; - oldedge RECORD; - rec RECORD; - tmp integer; - topoid integer; - nodeid integer; - nodepos float8; - edgeid1 integer; - edgeid2 integer; - edge1 geometry; - edge2 geometry; - ok BOOL; -BEGIN - - -- - -- All args required - -- - IF atopology IS NULL OR anedge IS NULL OR apoint IS NULL THEN - RAISE EXCEPTION - ''SQL/MM Spatial exception - null argument''; - END IF; - - -- - -- Check node existance - -- - ok = false; - FOR oldedge IN EXECUTE ''SELECT * FROM '' - || quote_ident(atopology) || ''.edge_data '' || - '' WHERE edge_id = '' || anedge - LOOP - ok = true; - END LOOP; - IF NOT ok THEN - RAISE EXCEPTION - ''SQL/MM Spatial exception - non-existent edge''; - END IF; - - -- - -- Check that given point is Within(anedge.geom) - -- - IF NOT within(apoint, oldedge.geom) THEN - RAISE EXCEPTION - ''SQL/MM Spatial exception - point not on edge''; - END IF; - - -- - -- Check if a coincident node already exists - -- - FOR rec IN EXECUTE ''SELECT node_id FROM '' - || quote_ident(atopology) || ''.node '' || - ''WHERE geom && '' || quote_literal(apoint) || ''::geometry'' - ||'' AND x(geom) = x(''||quote_literal(apoint)||''::geometry)'' - ||'' AND y(geom) = y(''||quote_literal(apoint)||''::geometry)'' - LOOP - RAISE EXCEPTION - ''SQL/MM Spatial exception - coincident node''; - END LOOP; - - -- - -- Get new node id - -- - FOR rec IN EXECUTE ''SELECT nextval('''''' || - atopology || ''.node_node_id_seq'''')'' - LOOP - nodeid = rec.nextval; - END LOOP; - - --RAISE NOTICE ''Next node id = % '', nodeid; - - -- - -- Add the new node - -- - EXECUTE ''INSERT INTO '' || quote_ident(atopology) - || ''.node(node_id, geom) - VALUES(''||nodeid||'',''||quote_literal(apoint)|| - '')''; - - -- - -- Delete the old edge - -- - EXECUTE ''DELETE FROM '' || quote_ident(atopology) || ''.edge_data '' - || '' WHERE edge_id = '' || anedge; - - -- - -- Compute new edges - -- - nodepos = line_locate_point(oldedge.geom, apoint); - edge1 = line_substring(oldedge.geom, 0, nodepos); - edge2 = line_substring(oldedge.geom, nodepos, 1); - - -- - -- Get ids for the new edges - -- - FOR rec IN EXECUTE ''SELECT nextval('''''' || - atopology || ''.edge_data_edge_id_seq'''')'' - LOOP - edgeid1 = rec.nextval; - END LOOP; - FOR rec IN EXECUTE ''SELECT nextval('''''' || - atopology || ''.edge_data_edge_id_seq'''')'' - LOOP - edgeid2 = rec.nextval; - END LOOP; - - --RAISE NOTICE ''EdgeId1 % EdgeId2 %'', edgeid1, edgeid2; - - -- - -- Insert the two new edges - -- - EXECUTE ''INSERT INTO '' || quote_ident(atopology) - || ''.edge VALUES('' - ||edgeid1||'',''||oldedge.start_node - ||'',''||nodeid - ||'',''||edgeid2 - ||'',''||oldedge.next_right_edge - ||'',''||oldedge.left_face - ||'',''||oldedge.right_face - ||'',''||quote_literal(edge1) - ||'')''; - - EXECUTE ''INSERT INTO '' || quote_ident(atopology) - || ''.edge VALUES('' - ||edgeid2||'',''||nodeid - ||'',''||oldedge.end_node - ||'',''||oldedge.next_left_edge - ||'',-''||edgeid1 - ||'',''||oldedge.left_face - ||'',''||oldedge.right_face - ||'',''||quote_literal(edge2) - ||'')''; - - -- - -- Update all next edge references to match new layout - -- - - EXECUTE ''UPDATE '' || quote_ident(atopology) - || ''.edge_data SET next_right_edge = '' - || edgeid2 - || '','' - || '' abs_next_right_edge = '' || edgeid2 - || '' WHERE next_right_edge = '' || anedge; - EXECUTE ''UPDATE '' || quote_ident(atopology) - || ''.edge_data SET next_right_edge = '' - || -edgeid1 - || '','' - || '' abs_next_right_edge = '' || edgeid1 - || '' WHERE next_right_edge = '' || -anedge; - - EXECUTE ''UPDATE '' || quote_ident(atopology) - || ''.edge_data SET next_left_edge = '' - || edgeid1 - || '','' - || '' abs_next_left_edge = '' || edgeid1 - || '' WHERE next_left_edge = '' || anedge; - EXECUTE ''UPDATE '' || quote_ident(atopology) - || ''.edge_data SET '' - || '' next_left_edge = '' || -edgeid2 - || '','' - || '' abs_next_left_edge = '' || edgeid2 - || '' WHERE next_left_edge = '' || -anedge; - - -- Get topology id - SELECT id FROM topology.topology into topoid - WHERE name = atopology; +#include "sql/sqlmm.sql.in.c" - -- - -- Update references in the Relation table. - -- We only take into considerations non-hierarchical - -- TopoGeometry here, for obvious reasons. - -- - FOR rec IN EXECUTE ''SELECT r.* FROM '' - || quote_ident(atopology) - || ''.relation r, topology.layer l '' - || '' WHERE '' - || '' l.topology_id = '' || topoid - || '' AND l.level = 0 '' - || '' AND l.layer_id = r.layer_id '' - || '' AND abs(r.element_id) = '' || anedge - || '' AND r.element_type = 2'' - LOOP - --RAISE NOTICE ''TopoGeometry % in layer % contains the edge being split'', rec.topogeo_id, rec.layer_id; - - -- Delete old reference - EXECUTE ''DELETE FROM '' || quote_ident(atopology) - || ''.relation '' - || '' WHERE '' - || ''layer_id = '' || rec.layer_id - || '' AND '' - || ''topogeo_id = '' || rec.topogeo_id - || '' AND '' - || ''element_type = '' || rec.element_type - || '' AND '' - || ''abs(element_id) = '' || anedge; - - -- Add new reference to edge1 - IF rec.element_id < 0 THEN - tmp = -edgeid1; - ELSE - tmp = edgeid1; - END IF; - EXECUTE ''INSERT INTO '' || quote_ident(atopology) - || ''.relation '' - || '' VALUES( '' - || rec.topogeo_id - || '','' - || rec.layer_id - || '','' - || tmp - || '','' - || rec.element_type - || '')''; - - -- Add new reference to edge2 - IF rec.element_id < 0 THEN - tmp = -edgeid2; - ELSE - tmp = edgeid2; - END IF; - EXECUTE ''INSERT INTO '' || quote_ident(atopology) - || ''.relation '' - || '' VALUES( '' - || rec.topogeo_id - || '','' - || rec.layer_id - || '','' - || tmp - || '','' - || rec.element_type - || '')''; - - END LOOP; +-- The following files needs getfaceedges_returntype, defined in sqlmm.sql +#include "sql/query/GetRingEdges.sql.in.c" +#include "sql/query/GetNodeEdges.sql.in.c" - --RAISE NOTICE ''Edge % split in edges % and % by node %'', - -- anedge, edgeid1, edgeid2, nodeid; +--general management -- +#include "sql/manage/ManageHelper.sql.in.c" - RETURN nodeid; -END -' -LANGUAGE 'plpgsql' _VOLATILE; ---} ST_NewEdgesSplit - ---{ --- Topo-Geo and Topo-Net 3: Routine Details --- X.3.9 --- --- ST_ModEdgesSplit(atopology, anedge, apoint) --- -CREATEFUNCTION topology.ST_ModEdgesSplit(varchar, integer, geometry) - RETURNS INTEGER AS -' -DECLARE - atopology ALIAS FOR $1; - anedge ALIAS FOR $2; - apoint ALIAS FOR $3; - oldedge RECORD; - rec RECORD; - tmp integer; - topoid integer; - nodeid integer; - nodepos float8; - newedgeid integer; - newedge1 geometry; - newedge2 geometry; - query text; - ok BOOL; -BEGIN - - -- - -- All args required - -- - IF atopology IS NULL OR anedge IS NULL OR apoint IS NULL THEN - RAISE EXCEPTION - ''SQL/MM Spatial exception - null argument''; - END IF; - - -- - -- Check node existance - -- - ok = false; - FOR oldedge IN EXECUTE ''SELECT * FROM '' - || quote_ident(atopology) || ''.edge_data '' || - '' WHERE edge_id = '' || anedge - LOOP - ok = true; - END LOOP; - IF NOT ok THEN - RAISE EXCEPTION - ''SQL/MM Spatial exception - non-existent edge''; - END IF; - - -- - -- Check that given point is Within(anedge.geom) - -- - IF NOT within(apoint, oldedge.geom) THEN - RAISE EXCEPTION - ''SQL/MM Spatial exception - point not on edge''; - END IF; - - -- - -- Check if a coincident node already exists - -- - FOR rec IN EXECUTE ''SELECT node_id FROM '' - || quote_ident(atopology) || ''.node '' || - ''WHERE geom && '' || quote_literal(apoint) || ''::geometry'' - ||'' AND x(geom) = x(''||quote_literal(apoint)||''::geometry)'' - ||'' AND y(geom) = y(''||quote_literal(apoint)||''::geometry)'' - LOOP - RAISE EXCEPTION - ''SQL/MM Spatial exception - coincident node''; - END LOOP; - - -- - -- Get new node id - -- - FOR rec IN EXECUTE ''SELECT nextval('''''' || - atopology || ''.node_node_id_seq'''')'' - LOOP - nodeid = rec.nextval; - END LOOP; - - --RAISE NOTICE ''Next node id = % '', nodeid; - - -- - -- Add the new node - -- - EXECUTE ''INSERT INTO '' || quote_ident(atopology) - || ''.node(node_id, geom) - VALUES(''||nodeid||'',''||quote_literal(apoint)|| - '')''; - - -- - -- Compute new edge - -- - nodepos = line_locate_point(oldedge.geom, apoint); - newedge1 = line_substring(oldedge.geom, 0, nodepos); - newedge2 = line_substring(oldedge.geom, nodepos, 1); - - - -- - -- Get ids for the new edge - -- - FOR rec IN EXECUTE ''SELECT nextval('''''' || - atopology || ''.edge_data_edge_id_seq'''')'' - LOOP - newedgeid = rec.nextval; - END LOOP; - - -- - -- Insert the new edge - -- - EXECUTE ''INSERT INTO '' || quote_ident(atopology) - || ''.edge '' - || ''(edge_id, start_node, end_node,'' - || ''next_left_edge, next_right_edge,'' - || ''left_face, right_face, geom) '' - || ''VALUES('' - ||newedgeid||'',''||nodeid - ||'',''||oldedge.end_node - ||'',''||oldedge.next_left_edge - ||'',-''||anedge - ||'',''||oldedge.left_face - ||'',''||oldedge.right_face - ||'',''||quote_literal(newedge2) - ||'')''; - - -- - -- Update the old edge - -- - EXECUTE ''UPDATE '' || quote_ident(atopology) || ''.edge_data '' - || '' SET geom = '' || quote_literal(newedge1) - || '','' - || '' next_left_edge = '' || newedgeid - || '','' - || '' end_node = '' || nodeid - || '' WHERE edge_id = '' || anedge; - - - -- - -- Update all next edge references to match new layout - -- - - EXECUTE ''UPDATE '' || quote_ident(atopology) - || ''.edge_data SET next_right_edge = '' - || -newedgeid - || '','' - || '' abs_next_right_edge = '' || newedgeid - || '' WHERE next_right_edge = '' || -anedge; - - EXECUTE ''UPDATE '' || quote_ident(atopology) - || ''.edge_data SET '' - || '' next_left_edge = '' || -newedgeid - || '','' - || '' abs_next_left_edge = '' || newedgeid - || '' WHERE next_left_edge = '' || -anedge; - - -- Get topology id - SELECT id FROM topology.topology into topoid - WHERE name = atopology; - - -- - -- Update references in the Relation table. - -- We only take into considerations non-hierarchical - -- TopoGeometry here, for obvious reasons. - -- - FOR rec IN EXECUTE ''SELECT r.* FROM '' - || quote_ident(atopology) - || ''.relation r, topology.layer l '' - || '' WHERE '' - || '' l.topology_id = '' || topoid - || '' AND l.level = 0 '' - || '' AND l.layer_id = r.layer_id '' - || '' AND abs(r.element_id) = '' || anedge - || '' AND r.element_type = 2'' - LOOP - --RAISE NOTICE ''TopoGeometry % in layer % contains the edge being split (%) - updating to add new edge %'', rec.topogeo_id, rec.layer_id, anedge, newedgeid; - - -- Add new reference to edge1 - IF rec.element_id < 0 THEN - tmp = -newedgeid; - ELSE - tmp = newedgeid; - END IF; - query = ''INSERT INTO '' || quote_ident(atopology) - || ''.relation '' - || '' VALUES( '' - || rec.topogeo_id - || '','' - || rec.layer_id - || '','' - || tmp - || '','' - || rec.element_type - || '')''; - - --RAISE NOTICE ''%'', query; - EXECUTE query; - END LOOP; - - --RAISE NOTICE ''Edge % split in edges % and % by node %'', - -- anedge, anedge, newedgeid, nodeid; - - RETURN nodeid; -END -' -LANGUAGE 'plpgsql' _VOLATILE; ---} ST_ModEdgesSplit - ---{ --- Topo-Geo and Topo-Net 3: Routine Details --- X.3.4 --- --- ST_AddIsoEdge(atopology, anode, anothernode, acurve) --- -CREATEFUNCTION topology.ST_AddIsoEdge(varchar, integer, integer, geometry) - RETURNS INTEGER AS -' -DECLARE - atopology ALIAS FOR $1; - anode ALIAS FOR $2; - anothernode ALIAS FOR $3; - acurve ALIAS FOR $4; - aface INTEGER; - face GEOMETRY; - snodegeom GEOMETRY; - enodegeom GEOMETRY; - count INTEGER; - rec RECORD; - edgeid INTEGER; -BEGIN - - -- - -- All arguments required - -- - IF atopology IS NULL - OR anode IS NULL - OR anothernode IS NULL - OR acurve IS NULL - THEN - RAISE EXCEPTION - ''SQL/MM Spatial exception - null argument''; - END IF; - - -- - -- Acurve must be a LINESTRING - -- - IF substring(geometrytype(acurve), 1, 4) != ''LINE'' - THEN - RAISE EXCEPTION - ''SQL/MM Spatial exception - invalid curve''; - END IF; - - -- - -- Acurve must be a simple - -- - IF NOT issimple(acurve) - THEN - RAISE EXCEPTION - ''SQL/MM Spatial exception - curve not simple''; - END IF; - - -- - -- Check for: - -- existence of nodes - -- nodes faces match - -- Extract: - -- nodes face id - -- nodes geoms - -- - aface := NULL; - count := 0; - FOR rec IN EXECUTE ''SELECT geom, containing_face, node_id FROM '' - || quote_ident(atopology) || ''.node - WHERE node_id = '' || anode || - '' OR node_id = '' || anothernode - LOOP - IF count > 0 AND aface != rec.containing_face THEN - RAISE EXCEPTION - ''SQL/MM Spatial exception - nodes in different faces''; - ELSE - aface := rec.containing_face; - END IF; - - -- Get nodes geom - IF rec.node_id = anode THEN - snodegeom = rec.geom; - ELSE - enodegeom = rec.geom; - END IF; - - count = count+1; - - END LOOP; - IF count < 2 THEN - RAISE EXCEPTION - ''SQL/MM Spatial exception - non-existent node''; - END IF; - - - -- - -- Check nodes isolation. - -- - FOR rec IN EXECUTE ''SELECT edge_id FROM '' - || quote_ident(atopology) || ''.edge_data '' || - '' WHERE start_node = '' || anode || - '' OR end_node = '' || anode || - '' OR start_node = '' || anothernode || - '' OR end_node = '' || anothernode - LOOP - RAISE EXCEPTION - ''SQL/MM Spatial exception - not isolated node''; - END LOOP; - - -- - -- Check acurve to be within endpoints containing face - -- (unless it is the world face, I suppose) - -- - IF aface IS NOT NULL THEN - - -- - -- Extract endpoints face geometry - -- - FOR rec IN EXECUTE ''SELECT topology.ST_GetFaceGeometry('' - || quote_literal(atopology) || - '','' || aface || '') as face'' - LOOP - face := rec.face; - END LOOP; - - -- - -- Check acurve to be within face - -- - IF ! within(acurve, face) THEN - RAISE EXCEPTION - ''SQL/MM Spatial exception - geometry not within face.''; - END IF; - - END IF; - - -- - -- l) Check that start point of acurve match start node - -- geoms. - -- - IF x(snodegeom) != x(StartPoint(acurve)) OR - y(snodegeom) != y(StartPoint(acurve)) THEN - RAISE EXCEPTION - ''SQL/MM Spatial exception - start node not geometry start point.''; - END IF; - - -- - -- m) Check that end point of acurve match end node - -- geoms. - -- - IF x(enodegeom) != x(EndPoint(acurve)) OR - y(enodegeom) != y(EndPoint(acurve)) THEN - RAISE EXCEPTION - ''SQL/MM Spatial exception - end node not geometry end point.''; - END IF; - - -- - -- n) Check if curve crosses (contains) any node - -- I used _contains_ here to leave endpoints out - -- - FOR rec IN EXECUTE ''SELECT node_id FROM '' - || quote_ident(atopology) || ''.node '' - || '' WHERE geom && '' || quote_literal(acurve) - || '' AND contains('' || quote_literal(acurve) - || '',geom)'' - LOOP - RAISE EXCEPTION - ''SQL/MM Spatial exception - geometry crosses a node''; - END LOOP; - - -- - -- o) Check if curve intersects any other edge - -- - FOR rec IN EXECUTE ''SELECT * FROM '' - || quote_ident(atopology) || ''.edge_data - WHERE geom && '' || quote_literal(acurve) || ''::geometry - AND intersects(geom, '' || quote_literal(acurve) || ''::geometry)'' - LOOP - RAISE EXCEPTION - ''SQL/MM Spatial exception - geometry intersects an edge''; - END LOOP; - - -- - -- Get new edge id from sequence - -- - FOR rec IN EXECUTE ''SELECT nextval('''''' || - atopology || ''.edge_data_edge_id_seq'''')'' - LOOP - edgeid = rec.nextval; - END LOOP; - - -- - -- Insert the new row - -- - IF aface IS NULL THEN aface := 0; END IF; - - EXECUTE ''INSERT INTO '' || quote_ident(atopology) - || ''.edge VALUES(''||edgeid||'',''||anode|| - '',''||anothernode||'','' - ||(-edgeid)||'',''||edgeid||'','' - ||aface||'',''||aface||'','' - ||quote_literal(acurve)||'')''; - - RETURN edgeid; - -END -' -LANGUAGE 'plpgsql' _VOLATILE; ---} ST_AddIsoEdge - ---{ --- Topo-Geo and Topo-Net 3: Routine Details --- X.3.6 --- --- ST_ChangeEdgeGeom(atopology, anedge, acurve) --- -CREATEFUNCTION topology.ST_ChangeEdgeGeom(varchar, integer, geometry) - RETURNS TEXT AS -' -DECLARE - atopology ALIAS FOR $1; - anedge ALIAS FOR $2; - acurve ALIAS FOR $3; - aface INTEGER; - face GEOMETRY; - snodegeom GEOMETRY; - enodegeom GEOMETRY; - count INTEGER; - rec RECORD; - edgeid INTEGER; - oldedge RECORD; -BEGIN - - -- - -- All arguments required - -- - IF atopology IS NULL - OR anedge IS NULL - OR acurve IS NULL - THEN - RAISE EXCEPTION - ''SQL/MM Spatial exception - null argument''; - END IF; - - -- - -- Acurve must be a LINESTRING - -- - IF substring(geometrytype(acurve), 1, 4) != ''LINE'' - THEN - RAISE EXCEPTION - ''SQL/MM Spatial exception - invalid curve''; - END IF; - - -- - -- Acurve must be a simple - -- - IF NOT issimple(acurve) - THEN - RAISE EXCEPTION - ''SQL/MM Spatial exception - curve not simple''; - END IF; - - -- - -- e) Check StartPoint consistency - -- - FOR rec IN EXECUTE ''SELECT * FROM '' - || quote_ident(atopology) || ''.edge_data e, '' - || quote_ident(atopology) || ''.node n '' - || '' WHERE e.edge_id = '' || anedge - || '' AND n.node_id = e.start_node '' - || '' AND ( x(n.geom) != '' - || x(StartPoint(acurve)) - || '' OR y(n.geom) != '' - || y(StartPoint(acurve)) - || '')'' - LOOP - RAISE EXCEPTION - ''SQL/MM Spatial exception - start node not geometry start point.''; - END LOOP; - - -- - -- f) Check EndPoint consistency - -- - FOR rec IN EXECUTE ''SELECT * FROM '' - || quote_ident(atopology) || ''.edge_data e, '' - || quote_ident(atopology) || ''.node n '' - || '' WHERE e.edge_id = '' || anedge - || '' AND n.node_id = e.end_node '' - || '' AND ( x(n.geom) != '' - || x(EndPoint(acurve)) - || '' OR y(n.geom) != '' - || y(EndPoint(acurve)) - || '')'' - LOOP - RAISE EXCEPTION - ''SQL/MM Spatial exception - end node not geometry end point.''; - END LOOP; - - -- - -- g) Check if curve crosses any node - -- _within_ used to let endpoints out - -- - FOR rec IN EXECUTE ''SELECT node_id FROM '' - || quote_ident(atopology) || ''.node - WHERE geom && '' || quote_literal(acurve) || ''::geometry - AND within(geom, '' || quote_literal(acurve) || ''::geometry)'' - LOOP - RAISE EXCEPTION - ''SQL/MM Spatial exception - geometry crosses a node''; - END LOOP; - - -- - -- h) Check if curve intersects any other edge - -- - FOR rec IN EXECUTE ''SELECT * FROM '' - || quote_ident(atopology) || ''.edge_data '' - || '' WHERE edge_id != '' || anedge - || '' AND geom && '' - || quote_literal(acurve) || ''::geometry '' - || '' AND intersects(geom, '' - || quote_literal(acurve) || ''::geometry)'' - LOOP - RAISE EXCEPTION - ''SQL/MM Spatial exception - geometry intersects an edge''; - END LOOP; - - -- - -- Update edge geometry - -- - EXECUTE ''UPDATE '' || quote_ident(atopology) || ''.edge_data '' - || '' SET geom = '' || quote_literal(acurve) - || '' WHERE edge_id = '' || anedge; - - RETURN ''Edge '' || anedge || '' changed''; - -END -' -LANGUAGE 'plpgsql' _VOLATILE; ---} ST_ChangeEdgeGeom - ---{ --- Topo-Geo and Topo-Net 3: Routine Details --- X.3.12 --- --- ST_AddEdgeNewFaces(atopology, anode, anothernode, acurve) --- -CREATEFUNCTION topology.ST_AddEdgeNewFaces(varchar, integer, integer, geometry) - RETURNS INTEGER AS -' -DECLARE - atopology ALIAS FOR $1; - anode ALIAS FOR $2; - anothernode ALIAS FOR $3; - acurve ALIAS FOR $4; - rec RECORD; - i INTEGER; - az FLOAT8; - azdif FLOAT8; - myaz FLOAT8; - minazimuth FLOAT8; - maxazimuth FLOAT8; - p2 GEOMETRY; -BEGIN - - -- - -- All args required - -- - IF atopology IS NULL - OR anode IS NULL - OR anothernode IS NULL - OR acurve IS NULL - THEN - RAISE EXCEPTION ''SQL/MM Spatial exception - null argument''; - END IF; - - -- - -- Acurve must be a LINESTRING - -- - IF substring(geometrytype(acurve), 1, 4) != ''LINE'' - THEN - RAISE EXCEPTION - ''SQL/MM Spatial exception - invalid curve''; - END IF; - - -- - -- Curve must be simple - -- - IF NOT issimple(acurve) THEN - RAISE EXCEPTION - ''SQL/MM Spatial exception - curve not simple''; - END IF; - - -- - -- Check endpoints existance and match with Curve geometry - -- - i=0; - FOR rec IN EXECUTE ''SELECT '' - || '' CASE WHEN node_id = '' || anode - || '' THEN 1 WHEN node_id = '' || anothernode - || '' THEN 0 END AS start, geom FROM '' - || quote_ident(atopology) - || ''.node '' - || '' WHERE node_id IN ( '' - || anode || '','' || anothernode - || '')'' - LOOP - IF rec.start THEN - IF NOT Equals(rec.geom, StartPoint(acurve)) - THEN - RAISE EXCEPTION - ''SQL/MM Spatial exception - start node not geometry start point.''; - END IF; - ELSE - IF NOT Equals(rec.geom, EndPoint(acurve)) - THEN - RAISE EXCEPTION - ''SQL/MM Spatial exception - end node not geometry end point.''; - END IF; - END IF; - - i=i+1; - END LOOP; - - IF i < 2 THEN - RAISE EXCEPTION - ''SQL/MM Spatial exception - non-existent node''; - END IF; - - -- - -- Check if this geometry crosses any node - -- - FOR rec IN EXECUTE ''SELECT node_id FROM '' - || quote_ident(atopology) || ''.node - WHERE geom && '' || quote_literal(acurve) || ''::geometry - AND within(geom, '' || quote_literal(acurve) || ''::geometry)'' - LOOP - RAISE EXCEPTION - ''SQL/MM Spatial exception - geometry crosses a node''; - END LOOP; - - -- - -- Check if this geometry crosses any existing edge - -- - FOR rec IN EXECUTE ''SELECT * FROM '' - || quote_ident(atopology) || ''.edge_data - WHERE geom && '' || quote_literal(acurve) || ''::geometry - AND crosses(geom, '' || quote_literal(acurve) || ''::geometry)'' - LOOP - RAISE EXCEPTION - ''SQL/MM Spatial exception - geometry crosses an edge''; - END LOOP; - - -- - -- Check if another edge share this edge endpoints - -- - FOR rec IN EXECUTE ''SELECT * FROM '' - || quote_ident(atopology) || ''.edge_data '' - || '' WHERE '' - || '' geom && '' || quote_literal(acurve) || ''::geometry '' - || '' AND '' - || '' ( ('' - || '' start_node = '' || anode - || '' AND '' - || '' end_node = '' || anothernode - || '' ) OR ( '' - || '' end_node = '' || anode - || '' AND '' - || '' start_node = '' || anothernode - || '' ) )'' - || '' AND '' - || ''equals(geom,'' || quote_literal(acurve) || ''::geometry)'' - LOOP - RAISE EXCEPTION - ''SQL/MM Spatial exception - coincident edge''; - END LOOP; - - --------------------------------------------------------------- - -- - -- All checks passed, time to extract informations about - -- endpoints: - -- - -- next_left_edge - -- next_right_edge - -- left_face - -- right_face - -- - --------------------------------------------------------------- - - -- - -- - -- Compute next_left_edge - -- - -- We fetch all edges with an endnode equal to - -- this edge end_node (anothernode). - -- For each edge we compute azimuth of the segment(s). - -- Of interest are the edges with closest (smaller - -- and bigger) azimuths then the azimuth of - -- this edge last segment. - -- - - myaz = azimuth(EndPoint(acurve), PointN(acurve, NumPoints(acurve)-1)); - RAISE NOTICE ''My end-segment azimuth: %'', myaz; - FOR rec IN EXECUTE ''SELECT '' - || ''edge_id, end_node, start_node, geom'' - || '' FROM '' - || quote_ident(atopology) - || ''.edge_data '' - || '' WHERE '' - || '' end_node = '' || anothernode - || '' OR '' - || '' start_node = '' || anothernode - LOOP - - IF rec.start_node = anothernode THEN - -- - -- Edge starts at our node, we compute - -- azimuth from node to its second point - -- - az = azimuth(EndPoint(acurve), - PointN(rec.geom, 2)); - - RAISE NOTICE ''Edge % starts at node % - azimuth %'', - rec.edge_id, rec.start_node, az; - END IF; - - IF rec.end_node = anothernode THEN - -- - -- Edge ends at our node, we compute - -- azimuth from node to its second-last point - -- - az = azimuth(EndPoint(acurve), - PointN(rec.geom, NumPoints(rec.geom)-1)); - - RAISE NOTICE ''Edge % ends at node % - azimuth %'', - rec.edge_id, rec.end_node, az; - END IF; - END LOOP; +CREATE OR REPLACE FUNCTION postgis_topology_scripts_installed() RETURNS text + AS _POSTGIS_SQL_SELECT_POSTGIS_SCRIPTS_VERSION + LANGUAGE 'sql' IMMUTABLE; - - RAISE EXCEPTION ''Not implemented yet''; -END -' -LANGUAGE 'plpgsql' _VOLATILE; ---} ST_AddEdgeNewFaces - ---{ --- Topo-Geo and Topo-Net 3: Routine Details --- X.3.17 --- --- ST_InitTopoGeo(atopology) --- -CREATEFUNCTION topology.ST_InitTopoGeo(varchar) -RETURNS text -AS ' -DECLARE - atopology alias for $1; - rec RECORD; - topology_id numeric; -BEGIN - IF atopology IS NULL THEN - RAISE EXCEPTION ''SQL/MM Spatial exception - null argument''; - END IF; - - FOR rec IN SELECT * FROM pg_namespace WHERE text(nspname) = atopology - LOOP - RAISE EXCEPTION ''SQL/MM Spatial exception - schema already exists''; - END LOOP; - - FOR rec IN EXECUTE ''SELECT topology.CreateTopology('' - ||quote_literal(atopology)|| '') as id'' - LOOP - topology_id := rec.id; - END LOOP; - - RETURN ''Topology-Geometry '' || quote_literal(atopology) - || '' (id:'' || topology_id || '') created. ''; -END -' -LANGUAGE 'plpgsql' _VOLATILE; ---} ST_InitTopoGeo - ---{ --- Topo-Geo and Topo-Net 3: Routine Details --- X.3.18 --- --- ST_CreateTopoGeo(atopology, acollection) --- -CREATEFUNCTION topology.ST_CreateTopoGeo(varchar, geometry) -RETURNS text -AS ' -DECLARE - atopology alias for $1; - acollection alias for $2; - typ char(4); - rec RECORD; - ret int; - schemaoid oid; -BEGIN - IF atopology IS NULL OR acollection IS NULL THEN - RAISE EXCEPTION ''SQL/MM Spatial exception - null argument''; - END IF; - - -- Verify existance of the topology schema - FOR rec in EXECUTE ''SELECT oid,count(*) FROM pg_namespace WHERE '' - || '' nspname = '' || quote_literal(atopology) - || '' GROUP BY oid'' - - LOOP - IF rec.count < 1 THEN - RAISE EXCEPTION ''SQL/MM Spatial exception - non-existent schema''; - END IF; - schemaoid := rec.oid; - END LOOP; - - -- Verify existance of the topology views in the topology schema - FOR rec in EXECUTE ''SELECT count(*) FROM pg_class WHERE '' - || '' relnamespace = '' || schemaoid - || '' and relname = ''''node'''''' - || '' OR relname = ''''edge'''''' - || '' OR relname = ''''face'''''' - LOOP - IF rec.count < 3 THEN - RAISE EXCEPTION ''SQL/MM Spatial exception - non-existent view''; - END IF; - END LOOP; - - -- Verify the topology views in the topology schema to be empty - FOR rec in EXECUTE - ''SELECT count(*) FROM '' - || quote_ident(atopology) || ''.edge_data '' - || '' UNION '' || - ''SELECT count(*) FROM '' - || quote_ident(atopology) || ''.node '' - LOOP - IF rec.count > 0 THEN - RAISE EXCEPTION ''SQL/MM Spatial exception - non-empty view''; - END IF; - END LOOP; - - -- face check is separated as it will contain a single (world) - -- face record - FOR rec in EXECUTE - ''SELECT count(*) FROM '' - || quote_ident(atopology) || ''.face '' - LOOP - IF rec.count != 1 THEN - RAISE EXCEPTION ''SQL/MM Spatial exception - non-empty face view''; - END IF; - END LOOP; - - -- - -- LOOP through the elements invoking the specific function - -- - FOR rec IN SELECT geom(dump(acollection)) - LOOP - typ := substring(geometrytype(rec.geom), 1, 3); - - IF typ = ''LIN'' THEN - SELECT topology.TopoGeo_addLinestring(atopology, rec.geom) INTO ret; - ELSIF typ = ''POI'' THEN - SELECT topology.TopoGeo_AddPoint(atopology, rec.geom) INTO ret; - ELSIF typ = ''POL'' THEN - SELECT topology.TopoGeo_AddPolygon(atopology, rec.geom) INTO ret; - ELSE - RAISE EXCEPTION ''ST_CreateTopoGeo got unknown geometry type: %'', typ; - END IF; - - END LOOP; - - RETURN ''Topology '' || atopology || '' populated''; - - RAISE EXCEPTION ''ST_CreateTopoGeo not implemente yet''; -END -' -LANGUAGE 'plpgsql' _VOLATILE; ---} ST_CreateTopoGeo - ---=} SQL/MM block +-- Make sure topology is in database search path -- +SELECT topology.AddToSearchPath('topology'); COMMIT; - diff -Nru postgis-1.5.3/topology/topology_drop_after.sql.in.c postgis-2.0.1/topology/topology_drop_after.sql.in.c --- postgis-1.5.3/topology/topology_drop_after.sql.in.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/topology_drop_after.sql.in.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,19 @@ +-- $Id: topology_drop_after.sql.in.c 9324 2012-02-27 22:08:12Z pramsey $ +-- PostGIS - Spatial Types for PostgreSQL +-- http://www.postgis.org +-- +-- Copyright (C) 2012 Regina Obe +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +-- +-- +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- These are reserved for functions where the they are changed to use default args +-- This is installed after the new functions are installed +-- We don't have any of these yet for topology +-- The reason we put these after install is +-- you can't drop a function that is used by sql functions +-- without forcing a drop on those as well which may cause issues with user functions. +-- This allows us to CREATE OR REPLACE those in general topology.sql +-- without dropping them. + diff -Nru postgis-1.5.3/topology/topology_drop_before.sql.in.c postgis-2.0.1/topology/topology_drop_before.sql.in.c --- postgis-1.5.3/topology/topology_drop_before.sql.in.c 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/topology/topology_drop_before.sql.in.c 2012-02-27 22:08:12.000000000 +0000 @@ -0,0 +1,17 @@ +-- $Id: topology_drop_before.sql.in.c 9324 2012-02-27 22:08:12Z pramsey $ +-- PostGIS - Spatial Types for PostgreSQL +-- http://www.postgis.org +-- +-- Copyright (C) 2012 Regina Obe +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +-- +-- +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- These are functions where the argument names may have changed -- +-- so have to be dropped before upgrade can happen for 9.0+ -- +-- argument names changed -- +-- we might want to take toTopoGeom one out before release since +-- I don't think too many people installed the bad name +DROP FUNCTION IF EXISTS topology.toTopoGeom(Geometry, varchar, int, float8); + diff -Nru postgis-1.5.3/utils/Makefile postgis-2.0.1/utils/Makefile --- postgis-1.5.3/utils/Makefile 2005-06-06 16:49:41.000000000 +0000 +++ postgis-2.0.1/utils/Makefile 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -SCRIPTS = \ - postgis_restore.pl \ - create_undef.pl \ - postgis_proc_upgrade.pl \ - profile_intersects.pl \ - test_estimation.pl \ - test_joinestimation.pl - -all: - chmod +x $(SCRIPTS) diff -Nru postgis-1.5.3/utils/Makefile.in postgis-2.0.1/utils/Makefile.in --- postgis-1.5.3/utils/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/utils/Makefile.in 2012-03-28 23:12:17.000000000 +0000 @@ -0,0 +1,66 @@ +# ********************************************************************** +# * $Id$ +# * +# * PostGIS - Spatial Types for PostgreSQL +# * http://postgis.refractions.net +# * +# * Copyright 2008 Mark Cave-Ayland +# * +# * This is free software; you can redistribute and/or modify it under +# * the terms of the GNU General Public Licence. See the COPYING file. +# * +# ********************************************************************** + +# Separate PGXS-enabled Makefile for documentation installation (it is +# not possible to merge into the main Makefile as has been done for +# the shapefile loader) + +MODULE_doc=postgis-@POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@ +MODULEDIR=contrib/$(MODULE_doc) + +# Files to be copied to the contrib/ directory +DATA_built=postgis_restore.pl + +# PGXS information +PG_CONFIG = @PGCONFIG@ +PGXS := @PGXS@ +include $(PGXS) + +SHELL = @SHELL@ +INSTALL = $(SHELL) ../install-sh + +SCRIPTS = \ + postgis_restore.pl \ + create_undef.pl \ + svn_repo_revision.pl \ + postgis_proc_upgrade.pl \ + profile_intersects.pl \ + test_estimation.pl \ + test_joinestimation.pl + +SRID_MAXIMUM = @SRID_MAX@ +SRID_USER_MAXIMUM = @SRID_USR_MAX@ + +all: postgis_restore.pl + chmod +x $(SCRIPTS) + +postgis_restore.pl: postgis_restore.pl.in + sed 's,@SRID_MAXIMUM@,$(SRID_MAXIMUM),g;s,@SRID_USER_MAXIMUM@,$(SRID_USER_MAXIMUM),' $< >$@ + +installdir: + @mkdir -p "$(DESTDIR)$(datadir)/$(MODULEDIR)" + +uninstall: + @rm -f "$(DESTDIR)$(datadir)/$(MODULEDIR)/postgis_restore.pl" + +install: installdir + $(LIBTOOL) --mode=install $(INSTALL) postgis_restore.pl "$(DESTDIR)$(datadir)/$(MODULEDIR)/postgis_restore.pl" + +clean: + rm -f postgis_restore.pl + +distclean: clean + rm -f Makefile + +# And there's nothing to check +check: diff -Nru postgis-1.5.3/utils/create_undef.pl postgis-2.0.1/utils/create_undef.pl --- postgis-1.5.3/utils/create_undef.pl 2010-01-20 20:17:09.000000000 +0000 +++ postgis-2.0.1/utils/create_undef.pl 2012-03-28 14:02:31.000000000 +0000 @@ -1,10 +1,24 @@ #!/usr/bin/perl +# +# PostGIS - Spatial Types for PostgreSQL +# http://postgis.refractions.net +# +# Copyright (C) 2011 OpenGeo.org +# Copyright (C) 2009-2010 Paul Ramsey +# Copyright (C) 2001-2005 Refractions Research Inc. +# +# This is free software; you can redistribute and/or modify it under +# the terms of the GNU General Public Licence. See the COPYING file. +# + +use warnings; +use strict; +use POSIX 'strftime'; + eval "exec perl -w $0 $@" if (0); -# perl create_undef.pl -# creates a new sql script to delete all the postgis functions et al. ($#ARGV == 1) || die "Usage: perl create_undef.pl \nCreates a new SQL script to delete all the PostGIS functions.\n"; @@ -22,86 +36,174 @@ my @casts = (); my @funcs = (); my @types = (); +my %type_funcs = (); +my @type_funcs= (); # function to drop _after_ type drop my @ops = (); +my @opcs = (); +my @views = (); +my @tables = (); +my @schemas = (); my $version = $ARGV[1]; -print "BEGIN;\n"; - -if ( $version ge "73" ) -{ - print "-- Drop index bindings from system tables\n"; - print "DROP OPERATOR CLASS gist_geometry_ops USING gist CASCADE;\n"; -} -else -{ - print "-- Drop index bindings from system tables\n"; - print "DELETE FROM pg_amproc WHERE amopclaid = (SELECT oid FROM pg_opclass WHERE opcname = 'gist_geometry_ops');\n"; - print "DELETE FROM pg_amop WHERE amopclaid = (SELECT oid FROM pg_opclass WHERE opcname = 'gist_geometry_ops');\n"; - print "DELETE FROM pg_opclass WHERE opcname = 'gist_geometry_ops';\n"; +sub strip_default { + my $line = shift; + # strip quotes first + $line =~ s/'[^']*'//ig; + # drop default then + $line =~ s/DEFAULT [^,)]*//ig; + return $line; } +my $time = POSIX::strftime("%c", localtime); +print "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n"; +print "-- \n"; +print "-- PostGIS - Spatial Types for PostgreSQL \n"; +print "-- http://postgis.refractions.net \n"; +print "-- \n"; +print "-- This is free software; you can redistribute and/or modify it under \n"; +print "-- the terms of the GNU General Public Licence. See the COPYING file. \n"; +print "-- \n"; +print "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n"; +print "-- \n"; +print "-- Generated on: " . $time . "\n"; +print "-- by: " . $0 . "\n"; +print "-- from: " . $ARGV[0] . "\n"; +print "-- \n"; +print "-- Do not edit manually, your changes will be lost.\n"; +print "-- \n"; +print "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n"; +print "\n"; + +print "BEGIN;\n\n"; open( INPUT, $ARGV[0] ) || die "Couldn't open file: $ARGV[0]\n"; while( my $line = ) { - $line =~ s/[\r\n]//g; - push (@funcs, $line) if ($line =~ /^create function/i); - push (@funcs, $line) if ($line =~ /^create or replace function/i); - push (@ops, $line) if ($line =~ /^create operator.*\(/i); - push (@aggs, $line) if ($line =~ /^create aggregate/i); - push (@types, $line) if ($line =~ /^create type/i); - push (@casts, $line) if ($line =~ /^create cast/i); + if ($line =~ /^create (or replace )?function/i) { + my $defn = $line; + while( not $defn =~ /\)/ ) { + $defn .= ; + } + push (@funcs, $defn) + } + elsif ($line =~ /^create or replace view\s*(\w+)/i) { + push (@views, $1); + } + elsif ($line =~ /^create table \s*([\w\.]+)/i) { + push (@tables, $1); + } + elsif ($line =~ /^create schema \s*([\w\.]+)/i) { + push (@schemas, $1); + } + elsif ( $line =~ /^create operator class (\w+)/i ) { + my $opcname = $1; + my $am = ''; + while( not $line =~ /;\s*$/ ) { + if ( $line =~ /( USING (\w+))/ ) { + $am = $1; + last; + } + $line .= ; + } + if ( $am eq '' ) { + die "Couldn't parse CREATE OPERATOR CLASS $opcname\n"; + } else { + $opcname .= $am; + } + push (@opcs, $opcname) + } + elsif ($line =~ /^create operator.*\(/i) { + my $defn = $line; + while( not $defn =~ /;\s*$/ ) { + $defn .= ; + } + push (@ops, $defn) + } + elsif ($line =~ /^create aggregate/i) { + my $defn = $line; + while( not $defn =~ /;\s*$/ ) { + $defn .= ; + } + push (@aggs, $defn) + } + elsif ($line =~ /^create type ([\w\.]+)/i) { + push (@types, $1); + while( not $line =~ /;\s*$/ ) { + $line = ; + if ( $line =~ /(input|output|send|receive|typmod_in|typmod_out|analyze)\s*=\s*(\w+)/ ) { + my $role = ${1}; + my $fname = ${2}; + $type_funcs{$fname} = $role; + } + } + } + elsif ($line =~ /^create domain ([\w\.]+)/i) { + push (@types, $1); + } + elsif ($line =~ /^create cast/i) { + push (@casts, $line) + } } close( INPUT ); -print "-- Drop all aggregates.\n"; +print "-- Drop all views.\n"; +foreach my $view (@views) +{ + print "DROP VIEW IF EXISTS $view;\n"; +} + +print "-- Drop all tables.\n"; +# we reverse table definitions so foreign key constraints +# are more likely not to get in our way +@tables = reverse(@tables); +foreach my $table (@tables) +{ + print "DROP TABLE $table;\n"; +} + +print "-- Drop all aggregates.\n"; foreach my $agg (@aggs) { - if ( $agg =~ /create aggregate\s*(\w+)\s*\(/i ) + if ( $agg =~ /create aggregate\s*([\w\.]+)\s*\(\s*.*basetype = ([\w\.]+)/ism ) { - if ( $version eq "71" ) - { - print "DROP AGGREGATE $1 geometry;\n"; - } - else - { - print "DROP AGGREGATE $1 ( geometry );\n"; - } + print "DROP AGGREGATE IF EXISTS $1 ($2);\n"; } - else + elsif ( $agg =~ /create aggregate\s*([\w\.]+)\s*\(\s*([\w,\.\s]+)\s*\)/ism ) { - die "Couldn't parse line: $agg\n"; + print "DROP AGGREGATE IF EXISTS $1 ($2);\n"; + } + else + { + die "Couldn't parse AGGREGATE line: $agg\n"; } } -print "-- Drop all operators.\n"; +print "-- Drop all operators classes and families.\n"; +foreach my $opc (@opcs) +{ + print "DROP OPERATOR CLASS $opc;\n"; + print "DROP OPERATOR FAMILY $opc;\n"; +} +print "-- Drop all operators.\n"; foreach my $op (@ops) { - if ($op =~ /create operator ([^(]+)/i ) + if ($op =~ /create operator ([^(]+)\s*\(.*LEFTARG\s*=\s*(\w+),\s*RIGHTARG\s*=\s*(\w+).*/ism ) { - if ( $version ge "73" ) - { - print "DROP OPERATOR $1 (geometry,geometry) CASCADE;\n"; - } - else - { - print "DROP OPERATOR $1 (geometry,geometry);\n"; - } + print "DROP OPERATOR $1 ($2,$3) CASCADE;\n"; } else { - die "Couldn't parse line: $op\n"; + die "Couldn't parse OPERATOR line: $op\n"; } } print "-- Drop all casts.\n"; - foreach my $cast (@casts) { if ($cast =~ /create cast\s*\((.+?)\)/i ) @@ -110,64 +212,114 @@ } else { - die "Couldn't parse line: $cast\n"; + die "Couldn't parse CAST line: $cast\n"; } } -print "-- Drop all functions.\n"; +print "-- Drop all functions except " . (keys %type_funcs) . " needed for type definition.\n"; foreach my $fn (@funcs) { - if ($fn =~ /.* function ([^(]+)\((.*)\)/i ) + if ($fn =~ /.* function ([^(]+)\((.*)\)/is ) # can be multiline { my $fn_nm = $1; my $fn_arg = $2; - if ( $version ge "73" ) + $fn_arg = strip_default($fn_arg); + if ( ! exists($type_funcs{$fn_nm}) ) { - if ( ! ( $fn_nm =~ /_in/i || $fn_nm =~ /_out/i || $fn_nm =~ /_recv/i || $fn_nm =~ /_send/i || $fn_nm =~ /_analyze/i ) ) - { - print "DROP FUNCTION $fn_nm ($fn_arg) CASCADE;\n"; - } - } + print "DROP FUNCTION IF EXISTS $fn_nm ($fn_arg);\n"; + } else { - print "DROP FUNCTION $fn_nm ($fn_arg);\n"; + if ( $type_funcs{$fn_nm} =~ /(typmod|analyze)/ ) { + push(@type_funcs, $fn); + } } } else { - die "Couldn't parse line: $fn\n"; + die "Couldn't parse FUNCTION line: $fn\n"; } } -print "-- Drop all types.\n"; +print "-- Drop all types.\n"; foreach my $type (@types) { - if ($type =~ /create type (\w+)/i ) + print "DROP TYPE $type CASCADE;\n"; +} + +print "-- Drop all functions needed for types definition.\n"; +foreach my $fn (@type_funcs) +{ + if ($fn =~ /.* function ([^(]+)\((.*)\)/i ) { - if ( $version ge "73" ) - { - print "DROP TYPE $1 CASCADE;\n"; - } - else - { - print "DROP TYPE $1;\n"; - } + my $fn_nm = $1; + my $fn_arg = $2; + + $fn_arg =~ s/DEFAULT [\w']+//ig; + + print "DROP FUNCTION IF EXISTS $fn_nm ($fn_arg);\n"; } else { - die "Couldn't parse line: $type\n"; + die "Couldn't parse line: $fn\n"; } } -print "-- Drop all tables.\n"; -print "DROP TABLE spatial_ref_sys;\n"; -print "DROP TABLE geometry_columns;\n"; +print "-- Drop all schemas.\n"; +if (@schemas) +{ + print ; + foreach my $schema (@schemas) + { + print "SELECT undef_helper.StripFromSearchPath('$schema');\n"; + print "DROP SCHEMA \"$schema\";\n"; + } + print "DROP SCHEMA undef_helper CASCADE;\n"; +} + + print "\n"; print "COMMIT;\n"; 1; +__END__ +create schema undef_helper; +--{ +-- StripFromSearchPath(schema_name) +-- +-- Strips the specified schema from the database search path +-- +-- This is a helper function for uninstall +-- We may want to move this function as a generic helper +-- +CREATE OR REPLACE FUNCTION undef_helper.StripFromSearchPath(a_schema_name varchar) +RETURNS text +AS +$$ +DECLARE + var_result text; + var_search_path text; +BEGIN + SELECT reset_val INTO var_search_path FROM pg_settings WHERE name = 'search_path'; + IF var_search_path NOT LIKE '%' || quote_ident(a_schema_name) || '%' THEN + var_result := a_schema_name || ' not in database search_path'; + ELSE + var_search_path := btrim( regexp_replace( + replace(var_search_path, a_schema_name, ''), ', *,', ','), + ', '); + RAISE NOTICE 'New search_path: %', var_search_path; + EXECUTE 'ALTER DATABASE ' || quote_ident(current_database()) || ' SET search_path = ' || var_search_path; + var_result := a_schema_name || ' has been stripped off database search_path '; + END IF; + + RETURN var_result; +END +$$ +LANGUAGE 'plpgsql' VOLATILE STRICT; + +--} StripFromSearchPath diff -Nru postgis-1.5.3/utils/new_postgis_restore.pl postgis-2.0.1/utils/new_postgis_restore.pl --- postgis-1.5.3/utils/new_postgis_restore.pl 2009-02-10 20:06:00.000000000 +0000 +++ postgis-2.0.1/utils/new_postgis_restore.pl 1970-01-01 00:00:00.000000000 +0000 @@ -1,893 +0,0 @@ -#!/usr/bin/perl - -$me = $0; - -$usage = qq{ -Usage: $me - Restore a custom dump (pg_dump -Fc) of a PostGIS-enabled database. - First dump the old database: pg_dump -Fc > - Then create a new database: createdb - Then install PostGIS in the new database: psql -f /postgis.sql - Finally, run this script on the old dump: $me | psql - -}; - -die $usage if (@ARGV != 1); - -$dumpfile = $ARGV[0]; -$manifest = $dumpfile . ".lst"; - -die "$me:\tUnable to find 'pg_dump' on the path.\n" if ! `pg_dump --version`; -die "$me:\tUnable to find 'pg_restore' on the path.\n" if ! `pg_restore --version`; -die "$me:\tUnable to open dump file '$dumpfile'.\n" if ! -f $dumpfile; - -$DEBUG = 0; - -print STDERR "Converting $dumpfile to ASCII on stdout...\n"; - -###################################################################### -# Load the signatures of things to skip. -# - -print STDERR " Reading list of functions to ignore...\n"; - -my %skip = (); -while(my $l = ) { - print STDERR " $l" if $DEBUG; - $l =~ s/\s//g; - $skip{$l} = 1; -} - -###################################################################### -# Write a new manifest for the dump file, skipping the things that -# are part of PostGIS -# - -print STDERR " Writing manifest of things to read from dump file...\n"; - -open( DUMP, "pg_restore -l $dumpfile |" ) || die "$me:\tCannot open dump file '$dumpfile'\n"; -open( MANIFEST, ">$manifest" ) || die "$me:\tCannot open manifest file '$outputfile'\n"; -while( my $l = ) { - - next if $l =~ /^\;/; - my $sig = linesignature($l); - $sig =~ s/\s//g; - print STDERR " $sig\n" if $DEBUG; - next if $skip{$sig}; - print STDERR " $l" if $DEBUG; - print MANIFEST $l; - -} -close(MANIFEST); -close(DUMP); - -###################################################################### -# Convert the dump file into an ASCII file, stripping out the -# unwanted bits. -# -print STDERR " Writing ASCII to stdout...\n"; -open( INPUT, "pg_restore -L $manifest $dumpfile |") || die "$me:\tCan't run pg_restore\n"; -while( my $l = ) { - - next if $l =~ /^ *--/; - - if ( $l =~ /^SET search_path/ ) { - $l =~ s/; *$/, public;/; - } - - print STDOUT $l; - -} - - -print STDERR "Done.\n"; - -###################################################################### -# Strip a dump file manifest line down to the unique elements of -# type and signature. -# -sub linesignature { - - my $line = shift; - my $sig; - - $line =~ s/\n$//; - $line =~ s/\r$//; - $line =~ s/OPERATOR CLASS/OPERATORCLASS/; - $line =~ s/TABLE DATA/TABLEDATA/; - $line =~ s/SHELL TYPE/SHELLTYPE/; - $line =~ s/PROCEDURAL LANGUAGE/PROCEDURALLANGUAGE/; - - if( $line =~ /^(\d+)\; (\d+) (\d+) (\w+) (\w+) (.*) (\w*)/ ) { - $sig = $4 . "\t" . $6; - } - elsif( $line =~ /PROCEDURALLANGUAGE.*plpgsql/ ) { - $sig = "PROCEDURALLANGUAGE\tplpgsql"; - } - - $sig; - -} - - -###################################################################### -# Here are all the signatures we want to skip. -# -__END__ -PROCEDURALLANGUAGE plpgsql -AGGREGATE accum(geometry) -AGGREGATE accum_old(geometry) -AGGREGATE collect(geometry) -AGGREGATE extent(geometry) -AGGREGATE extent3d(geometry) -AGGREGATE geomunion(geometry) -AGGREGATE geomunion_old(geometry) -AGGREGATE makeline(geometry) -AGGREGATE memcollect(geometry) -AGGREGATE memgeomunion(geometry) -AGGREGATE polygonize(geometry) -AGGREGATE st_accum(geometry) -AGGREGATE st_accum_old(geometry) -AGGREGATE st_collect(geometry) -AGGREGATE st_extent(geometry) -AGGREGATE st_extent3d(geometry) -AGGREGATE st_makeline(geometry) -AGGREGATE st_memcollect(geometry) -AGGREGATE st_memunion(geometry) -AGGREGATE st_polygonize(geometry) -AGGREGATE st_union(geometry) -AGGREGATE st_union_old(geometry) -CAST CAST (boolean AS text) -CAST CAST (bytea AS public.geometry) -CAST CAST (public.box2d AS public.box3d) -CAST CAST (public.box2d AS public.geometry) -CAST CAST (public.box3d AS box) -CAST CAST (public.box3d AS public.box2d) -CAST CAST (public.box3d AS public.geometry) -CAST CAST (public.chip AS public.geometry) -CAST CAST (public.geometry AS box) -CAST CAST (public.geometry AS bytea) -CAST CAST (public.geometry AS public.box2d) -CAST CAST (public.geometry AS public.box3d) -CAST CAST (public.geometry AS text) -CAST CAST (text AS public.geometry) -FUNCTION _st_asgeojson(integer, geometry, integer, integer) -FUNCTION _st_asgml(integer, geometry, integer) -FUNCTION _st_askml(integer, geometry, integer) -FUNCTION _st_contains(geometry, geometry) -FUNCTION _st_containsproperly(geometry, geometry) -FUNCTION _st_coveredby(geometry, geometry) -FUNCTION _st_covers(geometry, geometry) -FUNCTION _st_crosses(geometry, geometry) -FUNCTION _st_dwithin(geometry, geometry, double precision) -FUNCTION _st_intersects(geometry, geometry) -FUNCTION _st_linecrossingdirection(geometry, geometry) -FUNCTION _st_overlaps(geometry, geometry) -FUNCTION _st_touches(geometry, geometry) -FUNCTION _st_within(geometry, geometry) -FUNCTION addauth(text) -FUNCTION addbbox(geometry) -FUNCTION addgeometrycolumn(character varying, character varying, character varying, character varying, integer, character varying, integer) -FUNCTION addgeometrycolumn(character varying, character varying, character varying, integer, character varying, integer) -FUNCTION addgeometrycolumn(character varying, character varying, integer, character varying, integer) -FUNCTION addpoint(geometry, geometry) -FUNCTION addpoint(geometry, geometry, integer) -FUNCTION affine(geometry, double precision, double precision, double precision, double precision, double precision, double precision) -FUNCTION affine(geometry, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision) -FUNCTION area(geometry) -FUNCTION area2d(geometry) -FUNCTION asbinary(geometry) -FUNCTION asbinary(geometry, text) -FUNCTION asewkb(geometry) -FUNCTION asewkb(geometry, text) -FUNCTION asewkt(geometry) -FUNCTION asgml(geometry) -FUNCTION asgml(geometry, integer) -FUNCTION asgml(geometry, integer, integer) -FUNCTION ashexewkb(geometry) -FUNCTION ashexewkb(geometry, text) -FUNCTION askml(geometry) -FUNCTION askml(geometry, integer) -FUNCTION askml(geometry, integer, integer) -FUNCTION askml(integer, geometry, integer) -FUNCTION assvg(geometry) -FUNCTION assvg(geometry, integer) -FUNCTION assvg(geometry, integer, integer) -FUNCTION astext(geometry) -FUNCTION asukml(geometry) -FUNCTION asukml(geometry, integer) -FUNCTION asukml(geometry, integer, integer) -FUNCTION azimuth(geometry, geometry) -FUNCTION bdmpolyfromtext(text, integer) -FUNCTION bdpolyfromtext(text, integer) -FUNCTION boundary(geometry) -FUNCTION box(box3d) -FUNCTION box(geometry) -FUNCTION box2d(box3d) -FUNCTION box2d(geometry) -FUNCTION box2d_contain(box2d, box2d) -FUNCTION box2d_contained(box2d, box2d) -FUNCTION box2d_in(cstring) -FUNCTION box2d_intersects(box2d, box2d) -FUNCTION box2d_left(box2d, box2d) -FUNCTION box2d_out(box2d) -FUNCTION box2d_overlap(box2d, box2d) -FUNCTION box2d_overleft(box2d, box2d) -FUNCTION box2d_overright(box2d, box2d) -FUNCTION box2d_right(box2d, box2d) -FUNCTION box2d_same(box2d, box2d) -FUNCTION box3d(box2d) -FUNCTION box3d(geometry) -FUNCTION box3d_in(cstring) -FUNCTION box3d_out(box3d) -FUNCTION box3dtobox(box3d) -FUNCTION buffer(geometry, double precision) -FUNCTION buffer(geometry, double precision, integer) -FUNCTION build_histogram2d(histogram2d, text, text) -FUNCTION build_histogram2d(histogram2d, text, text, text) -FUNCTION buildarea(geometry) -FUNCTION bytea(geometry) -FUNCTION cache_bbox() -FUNCTION centroid(geometry) -FUNCTION checkauth(text, text) -FUNCTION checkauth(text, text, text) -FUNCTION checkauthtrigger() -FUNCTION chip_in(cstring) -FUNCTION chip_out(chip) -FUNCTION collect(geometry, geometry) -FUNCTION collect_garray(geometry[]) -FUNCTION collector(geometry, geometry) -FUNCTION combine_bbox(box2d, geometry) -FUNCTION combine_bbox(box3d, geometry) -FUNCTION compression(chip) -FUNCTION contains(geometry, geometry) -FUNCTION convexhull(geometry) -FUNCTION create_histogram2d(box2d, integer) -FUNCTION crosses(geometry, geometry) -FUNCTION datatype(chip) -FUNCTION difference(geometry, geometry) -FUNCTION dimension(geometry) -FUNCTION disablelongtransactions() -FUNCTION disjoint(geometry, geometry) -FUNCTION distance(geometry, geometry) -FUNCTION distance_sphere(geometry, geometry) -FUNCTION distance_spheroid(geometry, geometry, spheroid) -FUNCTION dropbbox(geometry) -FUNCTION dropgeometrycolumn(character varying, character varying) -FUNCTION dropgeometrycolumn(character varying, character varying, character varying) -FUNCTION dropgeometrycolumn(character varying, character varying, character varying, character varying) -FUNCTION dropgeometrytable(character varying) -FUNCTION dropgeometrytable(character varying, character varying) -FUNCTION dropgeometrytable(character varying, character varying, character varying) -FUNCTION dump(geometry) -FUNCTION dumprings(geometry) -FUNCTION enablelongtransactions() -FUNCTION endpoint(geometry) -FUNCTION envelope(geometry) -FUNCTION equals(geometry, geometry) -FUNCTION estimate_histogram2d(histogram2d, box2d) -FUNCTION estimated_extent(text, text) -FUNCTION estimated_extent(text, text, text) -FUNCTION expand(box2d, double precision) -FUNCTION expand(box3d, double precision) -FUNCTION expand(geometry, double precision) -FUNCTION explode_histogram2d(histogram2d, text) -FUNCTION exteriorring(geometry) -FUNCTION factor(chip) -FUNCTION find_extent(text, text) -FUNCTION find_extent(text, text, text) -FUNCTION find_srid(character varying, character varying, character varying) -FUNCTION fix_geometry_columns() -FUNCTION force_2d(geometry) -FUNCTION force_3d(geometry) -FUNCTION force_3dm(geometry) -FUNCTION force_3dz(geometry) -FUNCTION force_4d(geometry) -FUNCTION force_collection(geometry) -FUNCTION forcerhr(geometry) -FUNCTION geom_accum(geometry[], geometry) -FUNCTION geomcollfromtext(text) -FUNCTION geomcollfromtext(text, integer) -FUNCTION geomcollfromwkb(bytea) -FUNCTION geomcollfromwkb(bytea, integer) -FUNCTION geometry(box2d) -FUNCTION geometry(box3d) -FUNCTION geometry(bytea) -FUNCTION geometry(chip) -FUNCTION geometry(text) -FUNCTION geometry_above(geometry, geometry) -FUNCTION geometry_analyze(internal) -FUNCTION geometry_below(geometry, geometry) -FUNCTION geometry_cmp(geometry, geometry) -FUNCTION geometry_contain(geometry, geometry) -FUNCTION geometry_contained(geometry, geometry) -FUNCTION geometry_eq(geometry, geometry) -FUNCTION geometry_ge(geometry, geometry) -FUNCTION geometry_gt(geometry, geometry) -FUNCTION geometry_in(cstring) -FUNCTION geometry_le(geometry, geometry) -FUNCTION geometry_left(geometry, geometry) -FUNCTION geometry_lt(geometry, geometry) -FUNCTION geometry_out(geometry) -FUNCTION geometry_overabove(geometry, geometry) -FUNCTION geometry_overbelow(geometry, geometry) -FUNCTION geometry_overlap(geometry, geometry) -FUNCTION geometry_overleft(geometry, geometry) -FUNCTION geometry_overright(geometry, geometry) -FUNCTION geometry_recv(internal) -FUNCTION geometry_right(geometry, geometry) -FUNCTION geometry_same(geometry, geometry) -FUNCTION geometry_send(geometry) -FUNCTION geometryfromtext(text) -FUNCTION geometryfromtext(text, integer) -FUNCTION geometryn(geometry, integer) -FUNCTION geometrytype(geometry) -FUNCTION geomfromewkb(bytea) -FUNCTION geomfromewkt(text) -FUNCTION geomfromtext(text) -FUNCTION geomfromtext(text, integer) -FUNCTION geomfromwkb(bytea) -FUNCTION geomfromwkb(bytea, integer) -FUNCTION geomunion(geometry, geometry) -FUNCTION geosnoop(geometry) -FUNCTION get_proj4_from_srid(integer) -FUNCTION getbbox(geometry) -FUNCTION getsrid(geometry) -FUNCTION gettransactionid() -FUNCTION hasbbox(geometry) -FUNCTION height(chip) -FUNCTION histogram2d_in(cstring) -FUNCTION histogram2d_out(histogram2d) -FUNCTION interiorringn(geometry, integer) -FUNCTION intersection(geometry, geometry) -FUNCTION intersects(geometry, geometry) -FUNCTION isclosed(geometry) -FUNCTION isempty(geometry) -FUNCTION isring(geometry) -FUNCTION issimple(geometry) -FUNCTION isvalid(geometry) -FUNCTION jtsnoop(geometry) -FUNCTION length(geometry) -FUNCTION length2d(geometry) -FUNCTION length2d_spheroid(geometry, spheroid) -FUNCTION length3d(geometry) -FUNCTION length3d_spheroid(geometry, spheroid) -FUNCTION length_spheroid(geometry, spheroid) -FUNCTION line_interpolate_point(geometry, double precision) -FUNCTION line_locate_point(geometry, geometry) -FUNCTION line_substring(geometry, double precision, double precision) -FUNCTION linefrommultipoint(geometry) -FUNCTION linefromtext(text) -FUNCTION linefromtext(text, integer) -FUNCTION linefromwkb(bytea) -FUNCTION linefromwkb(bytea, integer) -FUNCTION linemerge(geometry) -FUNCTION linestringfromtext(text) -FUNCTION linestringfromtext(text, integer) -FUNCTION linestringfromwkb(bytea) -FUNCTION linestringfromwkb(bytea, integer) -FUNCTION locate_along_measure(geometry, double precision) -FUNCTION locate_between_measures(geometry, double precision, double precision) -FUNCTION lockrow(text, text, text) -FUNCTION lockrow(text, text, text, text) -FUNCTION lockrow(text, text, text, text, timestamp without time zone) -FUNCTION lockrow(text, text, text, timestamp without time zone) -FUNCTION longtransactionsenabled() -FUNCTION lwgeom_gist_compress(internal) -FUNCTION lwgeom_gist_consistent(internal, geometry, integer) -FUNCTION lwgeom_gist_decompress(internal) -FUNCTION lwgeom_gist_penalty(internal, internal, internal) -FUNCTION lwgeom_gist_picksplit(internal, internal) -FUNCTION lwgeom_gist_same(box2d, box2d, internal) -FUNCTION lwgeom_gist_union(bytea, internal) -FUNCTION m(geometry) -FUNCTION makebox2d(geometry, geometry) -FUNCTION makebox3d(geometry, geometry) -FUNCTION makeline(geometry, geometry) -FUNCTION makeline_garray(geometry[]) -FUNCTION makepoint(double precision, double precision) -FUNCTION makepoint(double precision, double precision, double precision) -FUNCTION makepoint(double precision, double precision, double precision, double precision) -FUNCTION makepointm(double precision, double precision, double precision) -FUNCTION makepolygon(geometry) -FUNCTION makepolygon(geometry, geometry[]) -FUNCTION max_distance(geometry, geometry) -FUNCTION mem_size(geometry) -FUNCTION mlinefromtext(text) -FUNCTION mlinefromtext(text, integer) -FUNCTION mlinefromwkb(bytea) -FUNCTION mlinefromwkb(bytea, integer) -FUNCTION mpointfromtext(text) -FUNCTION mpointfromtext(text, integer) -FUNCTION mpointfromwkb(bytea) -FUNCTION mpointfromwkb(bytea, integer) -FUNCTION mpolyfromtext(text) -FUNCTION mpolyfromtext(text, integer) -FUNCTION mpolyfromwkb(bytea) -FUNCTION mpolyfromwkb(bytea, integer) -FUNCTION multi(geometry) -FUNCTION multilinefromwkb(bytea) -FUNCTION multilinefromwkb(bytea, integer) -FUNCTION multilinestringfromtext(text) -FUNCTION multilinestringfromtext(text, integer) -FUNCTION multipointfromtext(text) -FUNCTION multipointfromtext(text, integer) -FUNCTION multipointfromwkb(bytea) -FUNCTION multipointfromwkb(bytea, integer) -FUNCTION multipolyfromwkb(bytea) -FUNCTION multipolyfromwkb(bytea, integer) -FUNCTION multipolygonfromtext(text) -FUNCTION multipolygonfromtext(text, integer) -FUNCTION ndims(geometry) -FUNCTION noop(geometry) -FUNCTION npoints(geometry) -FUNCTION nrings(geometry) -FUNCTION numgeometries(geometry) -FUNCTION numinteriorring(geometry) -FUNCTION numinteriorrings(geometry) -FUNCTION numpoints(geometry) -FUNCTION overlaps(geometry, geometry) -FUNCTION perimeter(geometry) -FUNCTION perimeter2d(geometry) -FUNCTION perimeter3d(geometry) -FUNCTION pgis_abs_in(cstring) -FUNCTION pgis_abs_out(pgis_abs) -FUNCTION pgis_geometry_accum_finalfn(pgis_abs) -FUNCTION pgis_geometry_accum_transfn(pgis_abs, geometry) -FUNCTION pgis_geometry_collect_finalfn(pgis_abs) -FUNCTION pgis_geometry_makeline_finalfn(pgis_abs) -FUNCTION pgis_geometry_polygonize_finalfn(pgis_abs) -FUNCTION pgis_geometry_union_finalfn(pgis_abs) -FUNCTION point_inside_circle(geometry, double precision, double precision, double precision) -FUNCTION pointfromtext(text) -FUNCTION pointfromtext(text, integer) -FUNCTION pointfromwkb(bytea) -FUNCTION pointfromwkb(bytea, integer) -FUNCTION pointn(geometry, integer) -FUNCTION pointonsurface(geometry) -FUNCTION polyfromtext(text) -FUNCTION polyfromtext(text, integer) -FUNCTION polyfromwkb(bytea) -FUNCTION polyfromwkb(bytea, integer) -FUNCTION polygonfromtext(text) -FUNCTION polygonfromtext(text, integer) -FUNCTION polygonfromwkb(bytea) -FUNCTION polygonfromwkb(bytea, integer) -FUNCTION polygonize_garray(geometry[]) -FUNCTION populate_geometry_columns() -FUNCTION populate_geometry_columns(oid) -FUNCTION postgis_full_version() -FUNCTION postgis_geos_version() -FUNCTION postgis_gist_joinsel(internal, oid, internal, smallint) -FUNCTION postgis_gist_sel(internal, oid, internal, integer) -FUNCTION postgis_jts_version() -FUNCTION postgis_lib_build_date() -FUNCTION postgis_lib_version() -FUNCTION postgis_proj_version() -FUNCTION postgis_scripts_build_date() -FUNCTION postgis_scripts_installed() -FUNCTION postgis_scripts_released() -FUNCTION postgis_uses_stats() -FUNCTION postgis_version() -FUNCTION probe_geometry_columns() -FUNCTION relate(geometry, geometry) -FUNCTION relate(geometry, geometry, text) -FUNCTION removepoint(geometry, integer) -FUNCTION rename_geometry_table_constraints() -FUNCTION reverse(geometry) -FUNCTION rotate(geometry, double precision) -FUNCTION rotatex(geometry, double precision) -FUNCTION rotatey(geometry, double precision) -FUNCTION rotatez(geometry, double precision) -FUNCTION scale(geometry, double precision, double precision) -FUNCTION scale(geometry, double precision, double precision, double precision) -FUNCTION se_envelopesintersect(geometry, geometry) -FUNCTION se_is3d(geometry) -FUNCTION se_ismeasured(geometry) -FUNCTION se_locatealong(geometry, double precision) -FUNCTION se_locatebetween(geometry, double precision, double precision) -FUNCTION se_m(geometry) -FUNCTION se_z(geometry) -FUNCTION segmentize(geometry, double precision) -FUNCTION setfactor(chip, real) -FUNCTION setpoint(geometry, integer, geometry) -FUNCTION setsrid(chip, integer) -FUNCTION setsrid(geometry, integer) -FUNCTION shift_longitude(geometry) -FUNCTION simplify(geometry, double precision) -FUNCTION snaptogrid(geometry, double precision) -FUNCTION snaptogrid(geometry, double precision, double precision) -FUNCTION snaptogrid(geometry, double precision, double precision, double precision, double precision) -FUNCTION snaptogrid(geometry, geometry, double precision, double precision, double precision, double precision) -FUNCTION spheroid_in(cstring) -FUNCTION spheroid_out(spheroid) -FUNCTION srid(chip) -FUNCTION srid(geometry) -FUNCTION st_addbbox(geometry) -FUNCTION st_addpoint(geometry, geometry) -FUNCTION st_addpoint(geometry, geometry, integer) -FUNCTION st_affine(geometry, double precision, double precision, double precision, double precision, double precision, double precision) -FUNCTION st_affine(geometry, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision) -FUNCTION st_area(geometry) -FUNCTION st_area2d(geometry) -FUNCTION st_asbinary(geometry) -FUNCTION st_asbinary(geometry, text) -FUNCTION st_asewkb(geometry) -FUNCTION st_asewkb(geometry, text) -FUNCTION st_asewkt(geometry) -FUNCTION st_asgeojson(geometry) -FUNCTION st_asgeojson(geometry, integer) -FUNCTION st_asgeojson(geometry, integer, integer) -FUNCTION st_asgeojson(integer, geometry) -FUNCTION st_asgeojson(integer, geometry, integer) -FUNCTION st_asgeojson(integer, geometry, integer, integer) -FUNCTION st_asgml(geometry) -FUNCTION st_asgml(geometry, integer) -FUNCTION st_asgml(integer, geometry) -FUNCTION st_asgml(integer, geometry, integer) -FUNCTION st_ashexewkb(geometry) -FUNCTION st_ashexewkb(geometry, text) -FUNCTION st_askml(geometry) -FUNCTION st_askml(geometry, integer) -FUNCTION st_askml(integer, geometry) -FUNCTION st_askml(integer, geometry, integer) -FUNCTION st_assvg(geometry) -FUNCTION st_assvg(geometry, integer) -FUNCTION st_assvg(geometry, integer, integer) -FUNCTION st_astext(geometry) -FUNCTION st_azimuth(geometry, geometry) -FUNCTION st_bdmpolyfromtext(text, integer) -FUNCTION st_bdpolyfromtext(text, integer) -FUNCTION st_boundary(geometry) -FUNCTION st_box(box3d) -FUNCTION st_box(geometry) -FUNCTION st_box2d(box3d) -FUNCTION st_box2d(geometry) -FUNCTION st_box2d_contain(box2d, box2d) -FUNCTION st_box2d_contained(box2d, box2d) -FUNCTION st_box2d_in(cstring) -FUNCTION st_box2d_intersects(box2d, box2d) -FUNCTION st_box2d_left(box2d, box2d) -FUNCTION st_box2d_out(box2d) -FUNCTION st_box2d_overlap(box2d, box2d) -FUNCTION st_box2d_overleft(box2d, box2d) -FUNCTION st_box2d_overright(box2d, box2d) -FUNCTION st_box2d_right(box2d, box2d) -FUNCTION st_box2d_same(box2d, box2d) -FUNCTION st_box3d(box2d) -FUNCTION st_box3d(geometry) -FUNCTION st_box3d_in(cstring) -FUNCTION st_box3d_out(box3d) -FUNCTION st_buffer(geometry, double precision) -FUNCTION st_buffer(geometry, double precision, integer) -FUNCTION st_build_histogram2d(histogram2d, text, text) -FUNCTION st_build_histogram2d(histogram2d, text, text, text) -FUNCTION st_buildarea(geometry) -FUNCTION st_bytea(geometry) -FUNCTION st_cache_bbox() -FUNCTION st_centroid(geometry) -FUNCTION st_chip_in(cstring) -FUNCTION st_chip_out(chip) -FUNCTION st_collect(geometry, geometry) -FUNCTION st_collect(geometry[]) -FUNCTION st_collect_garray(geometry[]) -FUNCTION st_collector(geometry, geometry) -FUNCTION st_combine_bbox(box2d, geometry) -FUNCTION st_combine_bbox(box3d, geometry) -FUNCTION st_compression(chip) -FUNCTION st_contains(geometry, geometry) -FUNCTION st_containsproperly(geometry, geometry) -FUNCTION st_convexhull(geometry) -FUNCTION st_coorddim(geometry) -FUNCTION st_coveredby(geometry, geometry) -FUNCTION st_covers(geometry, geometry) -FUNCTION st_create_histogram2d(box2d, integer) -FUNCTION st_crosses(geometry, geometry) -FUNCTION st_curvetoline(geometry) -FUNCTION st_curvetoline(geometry, integer) -FUNCTION st_datatype(chip) -FUNCTION st_difference(geometry, geometry) -FUNCTION st_dimension(geometry) -FUNCTION st_disjoint(geometry, geometry) -FUNCTION st_distance(geometry, geometry) -FUNCTION st_distance_sphere(geometry, geometry) -FUNCTION st_distance_spheroid(geometry, geometry, spheroid) -FUNCTION st_dropbbox(geometry) -FUNCTION st_dump(geometry) -FUNCTION st_dumprings(geometry) -FUNCTION st_dwithin(geometry, geometry, double precision) -FUNCTION st_endpoint(geometry) -FUNCTION st_envelope(geometry) -FUNCTION st_equals(geometry, geometry) -FUNCTION st_estimate_histogram2d(histogram2d, box2d) -FUNCTION st_estimated_extent(text, text) -FUNCTION st_estimated_extent(text, text, text) -FUNCTION st_expand(box2d, double precision) -FUNCTION st_expand(box3d, double precision) -FUNCTION st_expand(geometry, double precision) -FUNCTION st_explode_histogram2d(histogram2d, text) -FUNCTION st_exteriorring(geometry) -FUNCTION st_factor(chip) -FUNCTION st_find_extent(text, text) -FUNCTION st_find_extent(text, text, text) -FUNCTION st_force_2d(geometry) -FUNCTION st_force_3d(geometry) -FUNCTION st_force_3dm(geometry) -FUNCTION st_force_3dz(geometry) -FUNCTION st_force_4d(geometry) -FUNCTION st_force_collection(geometry) -FUNCTION st_forcerhr(geometry) -FUNCTION st_geom_accum(geometry[], geometry) -FUNCTION st_geomcollfromtext(text) -FUNCTION st_geomcollfromtext(text, integer) -FUNCTION st_geomcollfromwkb(bytea) -FUNCTION st_geomcollfromwkb(bytea, integer) -FUNCTION st_geometry(box2d) -FUNCTION st_geometry(box3d) -FUNCTION st_geometry(bytea) -FUNCTION st_geometry(chip) -FUNCTION st_geometry(text) -FUNCTION st_geometry_above(geometry, geometry) -FUNCTION st_geometry_analyze(internal) -FUNCTION st_geometry_below(geometry, geometry) -FUNCTION st_geometry_cmp(geometry, geometry) -FUNCTION st_geometry_contain(geometry, geometry) -FUNCTION st_geometry_contained(geometry, geometry) -FUNCTION st_geometry_eq(geometry, geometry) -FUNCTION st_geometry_ge(geometry, geometry) -FUNCTION st_geometry_gt(geometry, geometry) -FUNCTION st_geometry_in(cstring) -FUNCTION st_geometry_le(geometry, geometry) -FUNCTION st_geometry_left(geometry, geometry) -FUNCTION st_geometry_lt(geometry, geometry) -FUNCTION st_geometry_out(geometry) -FUNCTION st_geometry_overabove(geometry, geometry) -FUNCTION st_geometry_overbelow(geometry, geometry) -FUNCTION st_geometry_overlap(geometry, geometry) -FUNCTION st_geometry_overleft(geometry, geometry) -FUNCTION st_geometry_overright(geometry, geometry) -FUNCTION st_geometry_recv(internal) -FUNCTION st_geometry_right(geometry, geometry) -FUNCTION st_geometry_same(geometry, geometry) -FUNCTION st_geometry_send(geometry) -FUNCTION st_geometryfromtext(text) -FUNCTION st_geometryfromtext(text, integer) -FUNCTION st_geometryn(geometry, integer) -FUNCTION st_geometrytype(geometry) -FUNCTION st_geomfromewkb(bytea) -FUNCTION st_geomfromewkt(text) -FUNCTION st_geomfromtext(text) -FUNCTION st_geomfromtext(text, integer) -FUNCTION st_geomfromwkb(bytea) -FUNCTION st_geomfromwkb(bytea, integer) -FUNCTION st_hasarc(geometry) -FUNCTION st_hasbbox(geometry) -FUNCTION st_height(chip) -FUNCTION st_histogram2d_in(cstring) -FUNCTION st_histogram2d_out(histogram2d) -FUNCTION st_interiorringn(geometry, integer) -FUNCTION st_intersection(geometry, geometry) -FUNCTION st_intersects(geometry, geometry) -FUNCTION st_isclosed(geometry) -FUNCTION st_isempty(geometry) -FUNCTION st_isring(geometry) -FUNCTION st_issimple(geometry) -FUNCTION st_isvalid(geometry) -FUNCTION st_isvalidreason(geometry) -FUNCTION st_length(geometry) -FUNCTION st_length2d(geometry) -FUNCTION st_length2d_spheroid(geometry, spheroid) -FUNCTION st_length3d(geometry) -FUNCTION st_length3d_spheroid(geometry, spheroid) -FUNCTION st_length_spheroid(geometry, spheroid) -FUNCTION st_line_interpolate_point(geometry, double precision) -FUNCTION st_line_locate_point(geometry, geometry) -FUNCTION st_line_substring(geometry, double precision, double precision) -FUNCTION st_linecrossingdirection(geometry, geometry) -FUNCTION st_linefrommultipoint(geometry) -FUNCTION st_linefromtext(text) -FUNCTION st_linefromtext(text, integer) -FUNCTION st_linefromwkb(bytea) -FUNCTION st_linefromwkb(bytea, integer) -FUNCTION st_linemerge(geometry) -FUNCTION st_linestringfromwkb(bytea) -FUNCTION st_linestringfromwkb(bytea, integer) -FUNCTION st_linetocurve(geometry) -FUNCTION st_locate_along_measure(geometry, double precision) -FUNCTION st_locate_between_measures(geometry, double precision, double precision) -FUNCTION st_locatebetweenelevations(geometry, double precision, double precision) -FUNCTION st_m(geometry) -FUNCTION st_makebox2d(geometry, geometry) -FUNCTION st_makebox3d(geometry, geometry) -FUNCTION st_makeline(geometry, geometry) -FUNCTION st_makeline(geometry[]) -FUNCTION st_makeline_garray(geometry[]) -FUNCTION st_makepoint(double precision, double precision) -FUNCTION st_makepoint(double precision, double precision, double precision) -FUNCTION st_makepoint(double precision, double precision, double precision, double precision) -FUNCTION st_makepointm(double precision, double precision, double precision) -FUNCTION st_makepolygon(geometry) -FUNCTION st_makepolygon(geometry, geometry[]) -FUNCTION st_max_distance(geometry, geometry) -FUNCTION st_mem_size(geometry) -FUNCTION st_minimumboundingcircle(geometry) -FUNCTION st_minimumboundingcircle(geometry, integer) -FUNCTION st_mlinefromtext(text) -FUNCTION st_mlinefromtext(text, integer) -FUNCTION st_mlinefromwkb(bytea) -FUNCTION st_mlinefromwkb(bytea, integer) -FUNCTION st_mpointfromtext(text) -FUNCTION st_mpointfromtext(text, integer) -FUNCTION st_mpointfromwkb(bytea) -FUNCTION st_mpointfromwkb(bytea, integer) -FUNCTION st_mpolyfromtext(text) -FUNCTION st_mpolyfromtext(text, integer) -FUNCTION st_mpolyfromwkb(bytea) -FUNCTION st_mpolyfromwkb(bytea, integer) -FUNCTION st_multi(geometry) -FUNCTION st_multilinefromwkb(bytea) -FUNCTION st_multilinestringfromtext(text) -FUNCTION st_multilinestringfromtext(text, integer) -FUNCTION st_multipointfromtext(text) -FUNCTION st_multipointfromwkb(bytea) -FUNCTION st_multipointfromwkb(bytea, integer) -FUNCTION st_multipolyfromwkb(bytea) -FUNCTION st_multipolyfromwkb(bytea, integer) -FUNCTION st_multipolygonfromtext(text) -FUNCTION st_multipolygonfromtext(text, integer) -FUNCTION st_ndims(geometry) -FUNCTION st_noop(geometry) -FUNCTION st_npoints(geometry) -FUNCTION st_nrings(geometry) -FUNCTION st_numgeometries(geometry) -FUNCTION st_numinteriorring(geometry) -FUNCTION st_numinteriorrings(geometry) -FUNCTION st_numpoints(geometry) -FUNCTION st_orderingequals(geometry, geometry) -FUNCTION st_overlaps(geometry, geometry) -FUNCTION st_perimeter(geometry) -FUNCTION st_perimeter2d(geometry) -FUNCTION st_perimeter3d(geometry) -FUNCTION st_point(double precision, double precision) -FUNCTION st_point_inside_circle(geometry, double precision, double precision, double precision) -FUNCTION st_pointfromtext(text) -FUNCTION st_pointfromtext(text, integer) -FUNCTION st_pointfromwkb(bytea) -FUNCTION st_pointfromwkb(bytea, integer) -FUNCTION st_pointn(geometry) -FUNCTION st_pointn(geometry, integer) -FUNCTION st_pointonsurface(geometry) -FUNCTION st_polyfromtext(text) -FUNCTION st_polyfromtext(text, integer) -FUNCTION st_polyfromwkb(bytea) -FUNCTION st_polyfromwkb(bytea, integer) -FUNCTION st_polygon(geometry, integer) -FUNCTION st_polygonfromtext(text) -FUNCTION st_polygonfromtext(text, integer) -FUNCTION st_polygonfromwkb(bytea) -FUNCTION st_polygonfromwkb(bytea, integer) -FUNCTION st_polygonize(geometry[]) -FUNCTION st_polygonize_garray(geometry[]) -FUNCTION st_postgis_gist_joinsel(internal, oid, internal, smallint) -FUNCTION st_postgis_gist_sel(internal, oid, internal, integer) -FUNCTION st_relate(geometry, geometry) -FUNCTION st_relate(geometry, geometry, text) -FUNCTION st_removepoint(geometry, integer) -FUNCTION st_reverse(geometry) -FUNCTION st_rotate(geometry, double precision) -FUNCTION st_rotatex(geometry, double precision) -FUNCTION st_rotatey(geometry, double precision) -FUNCTION st_rotatez(geometry, double precision) -FUNCTION st_scale(geometry, double precision, double precision) -FUNCTION st_scale(geometry, double precision, double precision, double precision) -FUNCTION st_segmentize(geometry, double precision) -FUNCTION st_setfactor(chip, real) -FUNCTION st_setpoint(geometry, integer, geometry) -FUNCTION st_setsrid(geometry, integer) -FUNCTION st_shift_longitude(geometry) -FUNCTION st_simplify(geometry, double precision) -FUNCTION st_simplifypreservetopology(geometry, double precision) -FUNCTION st_snaptogrid(geometry, double precision) -FUNCTION st_snaptogrid(geometry, double precision, double precision) -FUNCTION st_snaptogrid(geometry, double precision, double precision, double precision, double precision) -FUNCTION st_snaptogrid(geometry, geometry, double precision, double precision, double precision, double precision) -FUNCTION st_spheroid_in(cstring) -FUNCTION st_spheroid_out(spheroid) -FUNCTION st_srid(chip) -FUNCTION st_srid(geometry) -FUNCTION st_startpoint(geometry) -FUNCTION st_summary(geometry) -FUNCTION st_symdifference(geometry, geometry) -FUNCTION st_symmetricdifference(geometry, geometry) -FUNCTION st_text(boolean) -FUNCTION st_text(geometry) -FUNCTION st_touches(geometry, geometry) -FUNCTION st_transform(geometry, integer) -FUNCTION st_translate(geometry, double precision, double precision) -FUNCTION st_translate(geometry, double precision, double precision, double precision) -FUNCTION st_transscale(geometry, double precision, double precision, double precision, double precision) -FUNCTION st_union(geometry, geometry) -FUNCTION st_union(geometry[]) -FUNCTION st_unite_garray(geometry[]) -FUNCTION st_width(chip) -FUNCTION st_within(geometry, geometry) -FUNCTION st_wkbtosql(bytea) -FUNCTION st_wkttosql(text) -FUNCTION st_x(geometry) -FUNCTION st_xmax(box3d) -FUNCTION st_xmin(box3d) -FUNCTION st_y(geometry) -FUNCTION st_ymax(box3d) -FUNCTION st_ymin(box3d) -FUNCTION st_z(geometry) -FUNCTION st_zmax(box3d) -FUNCTION st_zmflag(geometry) -FUNCTION st_zmin(box3d) -FUNCTION startpoint(geometry) -FUNCTION summary(geometry) -FUNCTION symdifference(geometry, geometry) -FUNCTION symmetricdifference(geometry, geometry) -FUNCTION text(boolean) -FUNCTION text(geometry) -FUNCTION touches(geometry, geometry) -FUNCTION transform(geometry, integer) -FUNCTION transform_geometry(geometry, text, text, integer) -FUNCTION translate(geometry, double precision, double precision) -FUNCTION translate(geometry, double precision, double precision, double precision) -FUNCTION transscale(geometry, double precision, double precision, double precision, double precision) -FUNCTION unite_garray(geometry[]) -FUNCTION unlockrows(text) -FUNCTION update_geometry_stats() -FUNCTION update_geometry_stats(character varying, character varying) -FUNCTION updategeometrysrid(character varying, character varying, character varying, character varying, integer) -FUNCTION updategeometrysrid(character varying, character varying, character varying, integer) -FUNCTION updategeometrysrid(character varying, character varying, integer) -FUNCTION width(chip) -FUNCTION within(geometry, geometry) -FUNCTION x(geometry) -FUNCTION xmax(box3d) -FUNCTION xmin(box3d) -FUNCTION y(geometry) -FUNCTION ymax(box3d) -FUNCTION ymin(box3d) -FUNCTION z(geometry) -FUNCTION zmax(box3d) -FUNCTION zmflag(geometry) -FUNCTION zmin(box3d) -OPERATOR && -OPERATOR &< -OPERATOR &<| -OPERATOR &> -OPERATOR < -OPERATOR << -OPERATOR <<| -OPERATOR <= -OPERATOR = -OPERATOR > -OPERATOR >= -OPERATOR >> -OPERATOR @ -OPERATOR |&> -OPERATOR |>> -OPERATOR ~ -OPERATOR ~= -OPERATORCLASS btree_geometry_ops -OPERATORCLASS gist_geometry_ops -TYPE box2d -TYPE box3d -TYPE chip -TYPE geometry -TYPE geometry_dump -TYPE histogram2d -TYPE pgis_abs -TYPE spheroid -TABLE geometry_columns -TABLE spatial_ref_sys -CONSTRAINT geometry_columns_pk -CONSTRAINT spatial_ref_sys_pkey -SHELLTYPE box2d -SHELLTYPE box3d -SHELLTYPE chip -SHELLTYPE geometry -SHELLTYPE pgis_abs -SHELLTYPE spheroid diff -Nru postgis-1.5.3/utils/postgis_proc_upgrade.pl postgis-2.0.1/utils/postgis_proc_upgrade.pl --- postgis-1.5.3/utils/postgis_proc_upgrade.pl 2010-03-09 00:31:33.000000000 +0000 +++ postgis-2.0.1/utils/postgis_proc_upgrade.pl 2012-02-27 22:08:12.000000000 +0000 @@ -1,6 +1,17 @@ #!/usr/bin/perl # +# PostGIS - Spatial Types for PostgreSQL +# http://postgis.refractions.net +# +# Copyright (C) 2009-2010 Paul Ramsey +# Copyright (C) 2005 Refractions Research Inc. +# +# This is free software; you can redistribute and/or modify it under +# the terms of the GNU General Public Licence. See the COPYING file. +# + +# # This script produces an .sql file containing # CREATE OR REPLACE calls for each function # in postgis.sql @@ -19,6 +30,7 @@ if (0); use strict; +use warnings; # # Conditionally upgraded types and operators. Only include these @@ -157,7 +169,7 @@ while() { print $_; - $endfunc = 1 if /^\s*LANGUAGE /; + $endfunc = 1 if /^\s*(\$\$\s*)?LANGUAGE /; last if ( $endfunc && /\;/ ); } } @@ -234,25 +246,25 @@ } } - # This code handles view by creating them if we are doing a major upgrade + # Always output create ore replace view (see ticket #1097) if ( /^create or replace view\s+(\S+)\s*/i ) { - my $viewname = $1; - my $def = $_; + print; while() { - $def .= $_; + print; last if /\;\s*$/; } - my $ver = $version_from_num + 1; - while( $version_from_num < $version_to_num && $ver <= $version_to_num ) + } + + # Always output create ore replace rule + if ( /^create or replace rule\s+(\S+)\s*/i ) + { + print; + while() { - if( $objs->{$ver}->{"views"}->{$viewname} ) - { - print $def; - last; - } - $ver++; + print; + last if /\;\s*$/; } } diff -Nru postgis-1.5.3/utils/postgis_restore.pl postgis-2.0.1/utils/postgis_restore.pl --- postgis-1.5.3/utils/postgis_restore.pl 2010-01-20 20:17:09.000000000 +0000 +++ postgis-2.0.1/utils/postgis_restore.pl 1970-01-01 00:00:00.000000000 +0000 @@ -1,748 +0,0 @@ -#!/usr/bin/perl - -# -# This script is aimed at restoring postgis data -# from a dumpfile produced by pg_dump -Fc -# -# Basically it will restore all but things created by -# the given postgis.sql. -# Before restoring, it will create and postgis-enable -# the target db. -# -# A particular attention must be given to the spatial_ref_sys -# and geometry_columns tables which are created and populated -# from the dump, not the postgis.sql file. When the new installation -# is agains pgsql7.5+ and dump from pre7.5 this script should probably -# drop statistic fields from that table.... currently not done. -# Also, when upgrading to pgsq8.1+ (from <8.1) the oid column of -# geometry_columns will be dropped, while it is needed for -# postgis opearations. -# -# Issues: -# o Some obsoleted functions would not be present in the -# postgis.sql, but will be found in the dump. Currently -# some are skipped, but some depend on the pg version -# so will issue an ERROR due to unavailability of -# corresponding C function in postgis lib. -# -# o This script could do less then it does, to allow users -# to further modify edited dump before feeding it to the -# restoring side. -# -# -# Tested on: -# -# pg_dump-734/pg734 => pg_restore-743/pg743 -# pg_dump-743/pg734 => pg_restore-743/pg743 -# pg_dump-743/pg743 => pg_restore-743/pg743 -# pg_dump-734/pg734 => pg_restore-800/pg800 -# pg_dump-743/pg734 => pg_restore-800/pg800 -# pg_dump-743/pg743 => pg_restore-800/pg800 -# pg_dump-800/pg800 => pg_restore-800/pg800 -# -eval "exec perl -w $0 $@" - if (0); - -use strict; - -(@ARGV >= 3) || die "Usage: postgis_restore.pl []\nRestore a custom dump (pg_dump -Fc) of a postgis enabled database.\n"; - -my $DEBUG=1; - -my %aggs = (); -my %casts = (); -my %funcs = (); -my %types = (); -my %opclass = (); -my %ops = (); - - -# Old aggregate functions we don't carry any more -$aggs{"accum"} = 1; -$aggs{"fastunion"} = 1; -$aggs{"mem_collect"} = 1; - -# This are old postgis functions which might -# still be in a dump -my %obsoleted_function = ( - 'linefromtext', 1, - 'linestringfromtext', 1, - 'mlinefromtext', 1, - 'multilinestringfromtext', 1, - 'mpolyfromtext', 1, - 'multipolygonfromtext', 1, - 'polyfromtext', 1, - 'polygonfromtext', 1, - 'pointfromtext', 1, - 'mpointfromtext', 1, - 'multipointfromtext', 1, - 'geomcollfromtext', 1, - 'geometryfromtext', 1, - 'geomfromtext', 1, - 'pointfromwkb(geometry, integer)', 1, - 'pointfromwkb(geometry)', 1, - 'linefromwkb(geometry, integer)', 1, - 'linefromwkb(geometry)', 1, - 'linestringfromwkb(geometry, integer)', 1, - 'linestringfromwkb(geometry)', 1, - 'polyfromwkb(geometry, integer)', 1, - 'polyfromwkb(geometry)', 1, - 'polygonfromwkb(geometry, integer)', 1, - 'polygonfromwkb(geometry)', 1, - 'mpointfromwkb(geometry, integer)', 1, - 'mpointfromwkb(geometry)', 1, - 'multipointfromwkb(geometry, integer)', 1, - 'multipointfromwkb(geometry)', 1, - 'multilinefromwkb(geometry, integer)', 1, - 'multilinefromwkb(geometry)', 1, - 'mlinefromwkb(geometry, integer)', 1, - 'mlinefromwkb(geometry)', 1, - 'mpolyfromwkb(geometry, integer)', 1, - 'mpolyfromwkb(geometry)', 1, - 'multipolyfromwkb(geometry, integer)', 1, - 'multipolyfromwkb(geometry)', 1, - 'geomcollfromwkb(geometry, integer)', 1, - 'geomcollfromwkb(geometry)', 1, - 'wkb_in', 1, - 'wkb_out', 1, - 'wkb_recv', 1, - 'wkb_send', 1, - 'postgisgistcostestimate', 1, - 'ggeometry_compress', 1, - 'ggeometry_picksplit', 1, - 'gbox_picksplit', 1, - 'ggeometry_union', 1, - 'gbox_union', 1, - 'ggeometry_same', 1, - 'gbox_same', 1, - 'rtree_decompress', 1, - 'ggeometry_penalty', 1, - 'gbox_penalty', 1, - 'geometry_union(geometry, geometry)', 1, - 'geometry_inter(geometry, geometry)', 1, - 'geometry_size', 1, - 'ggeometry_consistent', 1, - 'xmin(box2d)', 1, - 'ymin(box2d)', 1, - 'xmax(box2d)', 1, - 'ymax(box2d)', 1, - 'optimistic_overlap', 1, - 'unite_finalfunc', 1, - 'numb_sub_objs(geometry)', 1, - 'truly_inside(geometry, geometry)', 1, - 'jtsnoop', 1, - '_st_asgml(integer, geometry, integer)', 1, - 'text(boolean)', 1, - 'st_text(boolean)', 1, - 'postgis_jts_version', 1, - 'build_histogram2d', 1, - 'create_histogram2d', 1, - 'estimate_histogram2d', 1, - 'explode_histogram2d', 1, - 'histogram2d_in', 1, - 'histogram2d_out', 1, - 'st_histogram2d_in', 1, - 'st_histogram2d_out', 1, - 'st_build_histogram2d', 1, - 'st_create_histogram2d', 1, - 'st_estimate_histogram2d', 1, - 'st_explode_histogram2d', 1 -); - -# This are old postgis operators which might -# still be in a dump -my %obsoleted_ops = ( - '>>,box2d,box2d', 1, - '<<,box2d,box2d', 1, - '&>,box2d,box2d', 1, - '&<,box2d,box2d', 1, - '&&,box2d,box2d', 1, - '~=,box2d,box2d', 1, - '~,box2d,box2d', 1, - '@,box2d,box2d', 1 -); - -my $postgissql = $ARGV[0]; shift(@ARGV); -my $dbname = $ARGV[0]; shift(@ARGV); -my $dump = $ARGV[0]; shift(@ARGV); -my $createdb_opt = ''; -my $dumplist=$dump.".list"; -my $dumpascii=$dump.".ascii"; - -$createdb_opt = join(' ', @ARGV) if @ARGV; - -print "postgis.sql is $postgissql\n"; -print "dbname is $dbname\n"; -print "dumpfile is $dump\n"; -print "database creation options: $createdb_opt\n" if $createdb_opt; - - -# -# Canonicalize type names (they change between dump versions). -# Here we also strip schema qualification -# -sub -canonicalize_typename -{ - my $arg=shift; - - # Lower case - $arg = lc($arg); - - # Trim whitespaces - $arg =~ s/^ *//; - $arg =~ s/ *$//; - - # Strip schema qualification - #$arg =~ s/^public.//; - $arg =~ s/^.*\.//; - - # Handle type name changes - if ( $arg eq 'opaque' ) { - $arg = 'internal'; - } elsif ( $arg eq 'boolean' ) { - $arg = 'bool'; - } elsif ( $arg eq 'oldgeometry' ) { - $arg = 'geometry'; - } - - # Timestamp with or without time zone - if ( $arg =~ /timestamp .* time zone/ ) { - $arg = 'timestamp'; - } - - return $arg; -} - -# -# Scan postgis.sql -# -print "Scanning $postgissql\n"; -open( INPUT, $postgissql ) || die "Couldn't open file: $postgissql\n"; -while( my $line = ) -{ - $line =~ s/[\r\n]//g; - #print "LINE: $line\n"; - - next if $line =~ /^ *--/; - - if ($line =~ /^ *create (or replace)? function ([^ ]*) *\((.*)\)/i) - { - my $name = lc($2); - my @args = split(",", $3); - my $geomfound = 0; - for (my $i=0; $i<@args; $i++) - { - my $arg = lc($args[$i]); - #print "ARG1: [$arg]\n"; - $arg =~ s/^ *//; - $arg =~ s/ *$//; - #print "ARG2: [$arg]\n"; - if ( $arg =~ /^int[48]?$/ ) { - $args[$i] = 'integer'; - next; - } - if ( $arg eq 'float4' ) { - $args[$i] = 'real'; - next; - } - if ( $arg eq 'float8' ) { - $args[$i] = 'double precision'; - next; - } - if ( $arg eq 'varchar' ) { - $args[$i] = 'character varying'; - next; - } - if ( $arg eq 'boolean' ) { - $args[$i] = 'bool'; - next; - } - if ( $arg eq 'opaque' ) { - $args[$i] = 'internal'; - next; - } - $args[$i] = $arg; - $geomfound++ if ( $arg eq 'oldgeometry' ); - } - my $id = $name."(".join(", ", @args).")"; - $funcs{$id} = 1; - print "SQLFUNC: $id\n" if $DEBUG; - if ( $geomfound ) - { - for (my $i=0; $i<@args; $i++) - { - my $arg = $args[$i]; - $arg = 'geometry' if ($arg eq 'oldgeometry'); - $args[$i] = $arg; - } - my $id = $name."(".join(", ", @args).")"; - $funcs{$id} = 1; - print "SQLFUNC: $id\n" if $DEBUG; - } - next; - } - if ($line =~ /^create type +([^ ]+)/i) - { - my $type = $1; - $types{$type} = 1; - print "SQLTYPE $type\n" if $DEBUG; - if ( $type eq 'oldgeometry' ) - { - $type = 'geometry'; - $types{$type} = 1; - print "SQLTYPE $type\n" if $DEBUG; - } - next; - } - if ( $line =~ /^create aggregate *([^ ]*) *\(/i ) - { - my $name = lc($1); - $name =~ s/^public.//; - my $type = undef; - while( my $subline = ) - { - if ( $subline =~ /basetype .* ([^, ]*)/i ) - { - $type = $1; - last; - } - last if $subline =~ /;[\t ]*$/; - } - if ( ! defined($type) ) - { - print "Could not find base type for aggregate $name\n"; - print "($line)\n"; - exit 1; - } - my $id = $name.'('.$type.')'; - print "SQLAGG $id\n" if $DEBUG; - $aggs{$id} = 1; - if ( $type eq 'oldgeometry' ) - { - $type = 'geometry'; - my $id = $name.'('.$type.')'; - $aggs{$id} = 1; - print "SQLAGG $id\n" if $DEBUG; - } - next; - } - - # CAST - if ($line =~ /create cast *\( *([^ ]*) *as *([^ )]*) *\) *with function *([^ ]*) *\(([^ ]*) *\)/i) - { - my $from = canonicalize_typename($1); - my $to = canonicalize_typename($2); - my $funcname = canonicalize_typename($3); - my $funcarg = canonicalize_typename($4); - - my $id = $funcarg.'.'.$funcname; - $casts{$id} = 1; - print "SQLFNCAST $id\n" if $DEBUG; - - $id = $from.','.$to; - $casts{$id} = 1; - print "SQLCAST $id\n" if $DEBUG; - - next; - } - - # OPERATOR CLASS - if ($line =~ /create operator class *([^ ]*)/i) - { - my $id = lc($1); - print "SQLOPCLASS $id\n" if $DEBUG; - $opclass{$id} = 1; - next; - } - - # OPERATOR - if ($line =~ /create operator *([^ ]*)/i) - { - my $name = ($1); - my $larg = undef; - my $rarg = undef; - while( my $subline = ) - { - last if $subline =~ /;[\t ]*$/; - if ( $subline =~ /leftarg *= *([^ ,]*)/i ) - { - $larg=lc($1); - } - if ( $subline =~ /rightarg *= *([^ ,]*)/i ) - { - $rarg=lc($1); - } - } - my $id = $name.','.$larg.','.$rarg; - print "SQLOP $id\n" if $DEBUG; - $ops{$id} = 1; - if ( $larg eq 'oldgeometry' || $rarg eq 'oldgeometry' ) - { - $larg = 'geometry' if $larg eq 'oldgeometry'; - $rarg = 'geometry' if $rarg eq 'oldgeometry'; - my $id = $name.','.$larg.','.$rarg; - print "SQLOP $id\n" if $DEBUG; - $ops{$id} = 1; - } - next; - } -} -close( INPUT ); -#exit; - - -# -# Scan dump list -# -print "Scanning $dump list\n"; -open( OUTPUT, ">$dumplist") || die "Can't write to ".$dump.".list\n"; -open( INPUT, "pg_restore -l $dump |") || die "Couldn't run pg_restore -l $dump\n"; -while( my $line = ) -{ - next if $line =~ /^;/; - next if $line =~ /^ *--/; - - if ($line =~ / FUNCTION/) - { - my $funcname; - my @args; - - #print "FUNCTION: [$line]\n"; - - if ($line =~ / FUNCTION *([^ ]*) *\(([^)]*)\)/) - { - #print " matched <800\n"; - $funcname = $1; - @args = split(",", $2); - } - elsif ($line =~ / FUNCTION *([^ ]+) *([^ ]+) *\(([^)]*)\)/) - { - #print " matched 800\n"; - $funcname = $2; - @args = split(",", $3); - } - else - { - print " unknown FUNCTION match\n"; - } - - $funcname =~ s/^"//; - $funcname =~ s/"$//; - - #print " FUNCNAME: [$funcname]\n"; - #print " ARGS: [".@args."]\n"; - - my $wkbinvolved = 0; - for (my $i=0; $i<@args; $i++) - { - my $arg = canonicalize_typename($args[$i]); - $args[$i] = $arg; - $wkbinvolved++ if ( $arg eq 'wkb' ); - } - - my $args = join(', ', @args); - #print "ARGS SCALAR: [$args]\n"; - my $id = $funcname."(".$args.")"; - #print "ID: [$id]\n"; - - # WKB type is obsoleted - if ( $wkbinvolved ) - { - print "SKIPPING FUNC $id\n" if $DEBUG; - next; - } - - if ( $funcname eq 'plpgsql_call_handler' ) - { - print "SKIPPING FUNC $id\n" if $DEBUG; - next; - } - - if ( $funcname eq 'plpgsql_validator' ) - { - print "SKIPPING FUNC $id\n" if $DEBUG; - next; - } - - if ( $obsoleted_function{$funcname} || $obsoleted_function{$id} ) - { - print "SKIPPING OBSOLETED FUNC $id\n" if $DEBUG; - next; - } - - if ( $funcs{$id} ) - { - print "SKIPPING PGIS FUNC $id\n" if $DEBUG; - next; - } - print "KEEPING FUNCTION: [$id]\n" if $DEBUG; - #next; - } - elsif ($line =~ / AGGREGATE ([^ ]* )?([^ ]*)\((.*)\)/) - { - my $name = $2; - my @args = split(",", $3); - for (my $i=0; $i<@args; $i++) - { - $args[$i] = canonicalize_typename($args[$i]); - } - my $args = join(', ', @args); - my $id = $name."(".$args.")"; - if ( $aggs{$id} ) - { - print "SKIPPING PGIS AGG $id\n" if $DEBUG; - next; - } - # This is an old postgis aggregate - if ( $name eq 'fastunion' ) - { - print "SKIPPING old PGIS AGG $id\n" if $DEBUG; - next; - } - - # This is an old postgis aggregate - if ( $name eq 'mem_collect' ) - { - print "SKIPPING old PGIS AGG $id\n" if $DEBUG; - next; - } - - # This is an old postgis aggregate - if ( $name eq 'accum' ) - { - print "SKIPPING old PGIS AGG $id\n" if $DEBUG; - next; - } - print "KEEPING AGGREGATE [$id]\n" if $DEBUG; - #next; - } - elsif ($line =~ / TYPE ([^ ]+ )?([^ ]*) .*/) - { - my $type = canonicalize_typename($2); - if ( $type eq 'wkb' ) - { - print "SKIPPING PGIS TYPE $type\n" if $DEBUG; - next; - } - if ( $types{$type} ) - { - print "SKIPPING PGIS TYPE $type\n" if $DEBUG; - next; - } - print "KEEPING TYPE [$type]\n" if $DEBUG; - #next; - } - elsif ($line =~ / PROCEDURAL LANGUAGE (public )?plpgsql/) - { - print "SKIPPING PROCLANG plpgsql\n" if $DEBUG; - next; - } - - # spatial_ref_sys and geometry_columns - elsif ($line =~ / TABLE geometry_columns/) - { - #print "SKIPPING geometry_columns schema\n" if $DEBUG; - #next; - } - elsif ($line =~ / TABLE spatial_ref_sys/) - { - #print "SKIPPING spatial_ref_sys schema\n" if $DEBUG; - #next; - } - - # - # pg_restore-7.4: - # 354; 11038762 OPERATOR CLASS btree_geometry_ops strk - # - # pg_restore-8.0: - # 354; 0 11038762 OPERATOR CLASS public btree_geometry_ops strk - # - elsif ($line =~ / OPERATOR CLASS +([^ ]+ )?([^ ]+) ([^ ]+)/) - { - my $id = lc($2); - - if ( $opclass{$id} ) - { - print "SKIPPING PGIS OPCLASS $id\n" if $DEBUG; - next; - } - print "KEEPING OPCLASS [$id]\n" if $DEBUG; - } - - # casts were implicit in PG72 - elsif ($line =~ / CAST /) - { - - my $arg1=undef; - my $arg2=undef; - - # - # CAST def by pg_restore 80,81 on pg_dump 73 - # - # 734_800; 0 00000 CAST public box2d (public.box3d) - # 734_810; 0 00000 CAST public box2d (public.box3d) - # - if ($line =~ / CAST *([^ ]+) ([^ ]+) *\( *([^ )]+) *\)/) - { - $arg1 = canonicalize_typename($3); - $arg2 = canonicalize_typename($2); - } - - # - # CAST def by pg_restore 73,74 on pg_dump 73 - # - # 734_743; 00000 CAST box2d (public.box3d) - # 734_734; 00000 CAST box2d (public.box3d) - # - elsif ($line =~ / CAST *([^ ]*) *\( *([^ )]*) *\)/) - { - $arg1 = canonicalize_typename($2); - $arg2 = canonicalize_typename($1); - } - - # - # CAST def by pg_restore 81 on pg_dump 81 - # - # 810_810; 0000 00000 CAST pg_catalog CAST (boolean AS text) - # - elsif ($line =~ / CAST [^ ]* CAST \(([^ ]*) AS ([^ )]*)\)/) - { - $arg1 = canonicalize_typename($1); - $arg2 = canonicalize_typename($2); - } - - if (defined($arg1) && defined($arg2)) - { - my $id = $arg1.",".$arg2; - if ( $casts{$id} ) - { - print "SKIPPING PGIS CAST $id\n" if $DEBUG; - next; - } - if ($arg1 eq 'wkb' || $arg2 eq 'wkb') - { - print "SKIPPING PGIS CAST $id\n" if $DEBUG; - next; - } - print "KEEPING CAST $id (see CAST)\n" if $DEBUG; - } - else - { - print "KEEPING CAST (unknown def): $line\n"; - } - - } # CAST - - print OUTPUT $line; -# print "UNHANDLED: $line" -} -close( INPUT ); -close(OUTPUT); - -print "Producing ascii dump $dumpascii\n"; -open( INPUT, "pg_restore -L $dumplist $dump |") || die "Can't run pg_restore\n"; -open( OUTPUT, ">$dumpascii") || die "Can't write to $dumpascii\n"; -while( my $line = ) -{ - next if $line =~ /^ *--/; - - if ( $line =~ /^SET search_path/ ) - { - $line =~ s/; *$/, public;/; - } - - elsif ( $line =~ /OPERATOR CLASS /) - { - } - - elsif ( $line =~ /CREATE OPERATOR *([^ ,]*)/) - { - my $name = canonicalize_typename($1); - my $larg = undef; - my $rarg = undef; - my @sublines = ($line); - while( my $subline = ) - { - push(@sublines, $subline); - last if $subline =~ /;[\t ]*$/; - if ( $subline =~ /leftarg *= *([^ ,]*)/i ) - { - $larg=canonicalize_typename($1); - } - if ( $subline =~ /rightarg *= *([^ ,]*)/i ) - { - $rarg=canonicalize_typename($1); - } - } - - my $id = $name.','.$larg.','.$rarg; - - if ( $obsoleted_ops{$id} ) - { - print "SKIPPING OBSOLETED FUNC $id\n" if $DEBUG; - next; - } - - if ( $ops{$id} ) - { - print "SKIPPING PGIS OP $id\n" if $DEBUG; - next; - } - - print "KEEPING OP $id\n" if $DEBUG; - print OUTPUT @sublines; - next; - } - - print OUTPUT $line; - # TODO: - # skip postgis operator, checking for basetype - # when implemented operators skip must be disabled - # in the first scan of ToC -} -close(INPUT) || die "pg_restore call failed\n"; -close(OUTPUT); - -#exit(1); - -# -# Create the new db and install plpgsql language -# -print "Creating db ($dbname)\n"; -`createdb $createdb_opt $dbname`; -die "Database creation failed\n" if ($?); -print "Adding plpgsql\n"; -`createlang plpgsql $dbname`; - -# -# Open a pipe to the SQL monitor -# -open( PSQL, "| psql -a $dbname") || die "Can't run psql\n"; - -# -# Source new postgis.sql -# -print "Sourcing $postgissql\n"; -open(INPUT, "<$postgissql") || die "Can't read $postgissql\n"; -while() { print PSQL; } -close(INPUT); - -# -# Drop geometry_columns and spatial_ref_sys -# (we want version from the dump) -# -print "Dropping geometry_columns and spatial_ref_sys\n"; -print PSQL "DROP TABLE geometry_columns;"; -print PSQL "DROP TABLE spatial_ref_sys;"; -#print "Now source $dumpascii manually\n"; -#exit(1); - -# -# Source modified ascii dump -# -print "Restoring ascii dump $dumpascii\n"; -open(INPUT, "<$dumpascii") || die "Can't read $postgissql\n"; -while() { print PSQL; } -close(INPUT); -close(PSQL) || die "psql run failed\n" diff -Nru postgis-1.5.3/utils/postgis_restore.pl.in postgis-2.0.1/utils/postgis_restore.pl.in --- postgis-1.5.3/utils/postgis_restore.pl.in 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/utils/postgis_restore.pl.in 2012-06-13 18:27:55.000000000 +0000 @@ -0,0 +1,2837 @@ +#!/usr/bin/perl + +# +# PostGIS - Spatial Types for PostgreSQL +# http://postgis.refractions.net +# +# Copyright (C) 2011 OpenGeo.org +# Copyright (C) 2009 Paul Ramsey +# +# This is free software; you can redistribute and/or modify it under +# the terms of the GNU General Public Licence. See the COPYING file. +# +#--------------------------------------------------------------------- +# +# This script is aimed at restoring postgis data +# from a dumpfile produced by pg_dump -Fc +# +# Basically it will restore all but things known to belong +# to postgis. Will also convert some old known constructs +# into new ones. +# +# Tested on: +# +# pg-8.4.9/pgis-1.4.3 => pg-8.4.9/pgis-2.0.0SVN +# pg-8.4.9/pgis-2.0.0SVN => pg-8.4.9/pgis-2.0.0SVN +# pg-8.4.9/pgis-2.0.0SVN => pg-9.1.2/pgis-2.0.0SVN +# pg-9.1b3/pgis-1.5.3 => pg-9.1.1/pgis-2.0.0SVN +# +#--------------------------------------------------------------------- + +use warnings; +use strict; + +my $me = $0; + +my $usage = qq{ +Usage: $me [-v] + Restore a custom dump (pg_dump -Fc) of a PostGIS-enabled database. + First dump the old database: pg_dump -Fc MYDB > MYDB.dmp + Then create a new database: createdb NEWDB + Then install PostGIS in the new database: + psql -f postgis/postgis.sql NEWDB + Also install PostGIS topology and raster, if you were using them: + psql -f topology/topology.sql NEWDB + psql -f raster/rtpostgis.sql NEWDB + Finally, pass the dump to this script and feed output to psql: + $me MYDB.dmp | psql NEWDB + The -v switch writes detailed report on stderr. + +}; + +my $DEBUG = 0; + +# NOTE: the SRID limits here are being discussed: +# http://postgis.refractions.net/pipermail/postgis-devel/2012-February/018463.html +my $SRID_MAXIMUM = @SRID_MAXIMUM@; +my $SRID_USER_MAXIMUM = @SRID_USER_MAXIMUM@; + +if ( @ARGV && $ARGV[0] eq '-v' ) { + $DEBUG = 1; + shift(@ARGV); +} + +die $usage if (@ARGV < 1); + +my $dumpfile = $ARGV[0]; +my $manifest = $dumpfile . ".lst"; +my $hasTopology = 0; + +die "$me:\tUnable to find 'pg_dump' on the path.\n" if ! `pg_dump --version`; +die "$me:\tUnable to find 'pg_restore' on the path.\n" if ! `pg_restore --version`; +die "$me:\tUnable to open dump file '$dumpfile'.\n" if ! -f $dumpfile; + +print STDERR "Converting $dumpfile to ASCII on stdout...\n"; + +###################################################################### +# Load the signatures of things to skip. +# + +print STDERR " Reading list of functions to ignore...\n"; + +my %skip = (); +while(my $l = ) { + chop($l); + print STDERR "DATA: $l\n" if $DEBUG; + $l =~ s/\s//g; + $skip{$l} = 1; +} + +###################################################################### +# Write a new manifest for the dump file, skipping the things that +# are part of PostGIS +# + +print STDERR " Writing manifest of things to read from dump file...\n"; + +open( DUMP, "pg_restore -l $dumpfile |" ) || die "$me:\tCannot open dump file '$dumpfile'\n"; +open( MANIFEST, ">$manifest" ) || die "$me:\tCannot open manifest file '$manifest'\n"; +while( my $l = ) { + + next if $l =~ /^\;/; + my $sigHR = linesignature($l); + my $sig = $sigHR; $sig =~ s/\s//g; + $hasTopology = 1 if $sig eq 'SCHEMAtopology'; + if ( $skip{$sig} ) { + print STDERR "SKIP: $sigHR\n" if $DEBUG; + next + } + print STDERR "KEEP: $sigHR\n" if $DEBUG; + print MANIFEST $l; + +} +close(MANIFEST); +close(DUMP) || die "$me: pg_restore returned an error\n"; + +###################################################################### +# Convert the dump file into an ASCII file, stripping out the +# unwanted bits. +# +print STDERR " Writing ASCII to stdout...\n"; +open( INPUT, "pg_restore -L $manifest $dumpfile |") || die "$me:\tCan't run pg_restore\n"; + +# +# Disable topology metadata tables triggers to allow for population +# in arbitrary order. +# +if ( $hasTopology ) { + print STDOUT "ALTER TABLE topology.layer DISABLE TRIGGER ALL;\n"; +} + +# Drop the spatial_ref_sys_srid_check to allow for custom invalid SRIDs in the dump +print STDOUT "ALTER TABLE spatial_ref_sys DROP constraint " + . "spatial_ref_sys_srid_check;\n"; +# Drop the spatial_ref_sys primary key to allow for SRID conversions +# which possibly end up taking the same spot +print STDOUT "ALTER TABLE spatial_ref_sys DROP constraint " + . "spatial_ref_sys_pkey;\n"; + +# Backup entries found in new spatial_ref_sys for later updating the +print STDOUT "CREATE TEMP TABLE _pgis_restore_spatial_ref_sys AS " + ."SELECT * FROM spatial_ref_sys;\n"; +print STDOUT "DELETE FROM spatial_ref_sys;\n"; + +my $inCopy; +while( my $l = ) { + if ( $l =~ /^COPY .+ FROM stdin;$/ ) { + $inCopy = 1; + } + elsif ( $inCopy && $l =~ /^\\\.$/ ) { + $inCopy = 0; + } + + next if !$inCopy && $l =~ /^ *--/; + + if ( $l =~ /^SET search_path/ ) { + $l =~ s/; *$/, public;/; + } + + # This is to avoid confusing OPERATOR CLASS + # with OPERATOR below + elsif ( $l =~ /CREATE OPERATOR CLASS/) + { + } + + # We can't skip OPERATORS from the manifest file + # because it doesn't contain enough informations + # about the type the operator is for + elsif ( $l =~ /CREATE OPERATOR *([^ ,]*)/) + { + my $name = canonicalize_typename($1); + my $larg = undef; + my $rarg = undef; + my @sublines = ($l); + while( my $subline = ) + { + push(@sublines, $subline); + last if $subline =~ /;[\t ]*$/; + if ( $subline =~ /leftarg *= *([^ ,]*)/i ) + { + $larg=canonicalize_typename($1); + } + if ( $subline =~ /rightarg *= *([^ ,]*)/i ) + { + $rarg=canonicalize_typename($1); + } + } + + if ( ! $larg ) { + print STDERR "No larg, @sublines: [" . @sublines . "]\n"; + } + + my $sigHR = "OPERATOR " . $name .' ('.$larg.', '.$rarg.')'; + my $sig = $sigHR; $sig =~ s/\s//g; + + if ( $skip{$sig} ) + { + print STDERR "SKIP: $sig\n" if $DEBUG; + next; + } + + print STDERR "KEEP: $sig\n" if $DEBUG; + print STDOUT @sublines; + next; + } + + # Rewrite spatial table constraints + # + # Example 1: + # CREATE TABLE geos_in ( + # id integer NOT NULL, + # g public.geometry, + # CONSTRAINT enforce_dims_g CHECK ((public.st_ndims(g) = 2)), + # CONSTRAINT enforce_geotype_g CHECK (((public.geometrytype(g) = 'MULTILINESTRING'::text) OR (g IS NULL))), + # CONSTRAINT enforce_srid_g CHECK ((public.st_srid(g) = (-1))) + # ); + # + # Example 2: + # CREATE TABLE boszip ( + # gid integer NOT NULL, + # zip5 character(5), + # the_geom geometry, + # CONSTRAINT enforce_dims_the_geom CHECK ((ndims(the_geom) = 2)), + # CONSTRAINT enforce_geotype_the_geom CHECK (((geometrytype(the_geom) = 'MULTIPOLYGON'::text) OR (the_geom IS NULL))), + # CONSTRAINT enforce_srid_the_geom CHECK ((srid(the_geom) = 2249)) + # ); + # + elsif ( $l =~ /CREATE TABLE *([^ ,]*)/) + { + my @sublines = ($l); + while( my $subline = ) + { + if ( $subline =~ /CONSTRAINT enforce_dims_/i ) { + $subline =~ s/\bndims\(/st_ndims(/; + } + if ( $subline =~ /CONSTRAINT enforce_srid_/i ) { + $subline =~ s/\bsrid\(/st_srid(/; + if ( $subline =~ /=\s\(?([-0-9][0-9]*)\)/ ) { + my $oldsrid = $1; + my $newsrid = clamp_srid($oldsrid); + $subline =~ s/=\s*(\(?)[-0-9][0-9]*/= $1$newsrid/; + } else { + print STDERR "WARNING: could not find SRID value in: $subline"; + } + } + push(@sublines, $subline); + last if $subline =~ /;[\t ]*$/; + } + print STDOUT @sublines; + next; + } + + # Clamp SRIDS in spatial_ref_sys + elsif ( $l =~ /COPY spatial_ref_sys /) + { + print STDOUT $l; + while( my $subline = ) + { + if ( $subline =~ /([0-9]*)\t/ ) { + my $oldsrid = $1; + my $newsrid = clamp_srid($oldsrid); + $subline =~ s/^[0-9]*\t/${newsrid}\t/; + } + print STDOUT $subline; + last if $subline =~ /^\\.$/; + } + next; + } + + print STDOUT $l; + +} + +if ( $hasTopology ) { + + # Re-enable topology.layer table triggers + print STDOUT "ALTER TABLE topology.layer ENABLE TRIGGER ALL;\n"; + + # Update topology SRID from geometry_columns view. + # This is mainly to fix srids of -1 + # May be worth providing a "populate_topology_topology" + print STDOUT "UPDATE topology.topology t set srid = g.srid " + . "FROM geometry_columns g WHERE t.name = g.f_table_schema " + . "AND g.f_table_name = 'face' and f_geometry_column = 'mbr';\n"; + +} + +# Update spatial_ref_sys with entries found in new table +print STDOUT "UPDATE spatial_ref_sys o set auth_name = n.auth_name, " + . "auth_srid = n.auth_srid, srtext = n.srtext, " + . "proj4text = n.proj4text FROM " + . "_pgis_restore_spatial_ref_sys n WHERE o.srid = n.srid;\n"; +# Insert entries only found in new table +print STDOUT "INSERT INTO spatial_ref_sys SELECT * FROM " + . "_pgis_restore_spatial_ref_sys n WHERE n.srid " + . "NOT IN ( SELECT srid FROM spatial_ref_sys );\n"; +# DROP TABLE _pgis_restore_spatial_ref_sys; +print STDOUT "DROP TABLE _pgis_restore_spatial_ref_sys;\n"; + +# Try re-enforcing spatial_ref_sys_srid_check, would fail if impossible +# but you'd still have your data +print STDOUT "ALTER TABLE spatial_ref_sys ADD constraint " + . "spatial_ref_sys_srid_check check " + . "( srid > 0 and srid < " . ($SRID_USER_MAXIMUM+1) ." ) ;\n"; +# Try re-enforcing spatial_ref_sys primary key, would fail if impossible +# but you'd still have your data +print STDOUT "ALTER TABLE spatial_ref_sys ENABLE TRIGGER ALL;\n"; +print STDOUT "ALTER TABLE spatial_ref_sys ADD PRIMARY KEY(srid);\n"; + + +print STDERR "Done.\n"; + +###################################################################### +# Strip a dump file manifest line down to the unique elements of +# type and signature. +# +sub linesignature { + + my $line = shift; + my $sig; + + $line =~ s/\n$//; + $line =~ s/\r$//; + $line =~ s/OPERATOR CLASS/OPERATORCLASS/; + $line =~ s/TABLE DATA/TABLEDATA/; + $line =~ s/SHELL TYPE/SHELLTYPE/; + $line =~ s/PROCEDURAL LANGUAGE/PROCEDURALLANGUAGE/; + + if( $line =~ /^(\d+)\; (\d+) (\d+) FK (\w+) (\w+) (.*) (\w*)/ ) { + $sig = "FK " . $4 . " " . $6; + } + elsif( $line =~ /^(\d+)\; (\d+) (\d+) (\w+) (\w+) (.*) (\w*)/ ) { + $sig = $4 . " " . $6; + } + elsif( $line =~ /PROCEDURALLANGUAGE.*plpgsql/ ) { + $sig = "PROCEDURAL LANGUAGE plpgsql"; + } + elsif ( $line =~ /SCHEMA - (\w+)/ ) { + $sig = "SCHEMA $1"; + } + elsif ( $line =~ /SEQUENCE - (\w+)/ ) { + $sig = "SEQUENCE $1"; + } + else { + # TODO: something smarter here... + $sig = $line + } + + return $sig; + +} + +# +# Canonicalize type names (they change between dump versions). +# Here we also strip schema qualification +# +sub +canonicalize_typename +{ + my $arg=shift; + + # Lower case + $arg = lc($arg); + + # Trim whitespaces + $arg =~ s/^\s*//; + $arg =~ s/\s*$//; + + # Strip schema qualification + #$arg =~ s/^public.//; + $arg =~ s/^.*\.//; + + # Handle type name changes + if ( $arg eq 'opaque' ) { + $arg = 'internal'; + } elsif ( $arg eq 'boolean' ) { + $arg = 'bool'; + } elsif ( $arg eq 'oldgeometry' ) { + $arg = 'geometry'; + } + + # Timestamp with or without time zone + if ( $arg =~ /timestamp .* time zone/ ) { + $arg = 'timestamp'; + } + + return $arg; +} + +# Change SRID to be within allowed ranges +sub +clamp_srid +{ + my $oldsrid = shift; + my $newsrid = $oldsrid; + + if ( $oldsrid < 0 ) { + $newsrid = 0; + printf STDERR " WARNING: SRID $oldsrid converted to $newsrid (official UNKNOWN)\n"; + } elsif ( $oldsrid > $SRID_MAXIMUM ) { + $newsrid = $SRID_USER_MAXIMUM + 1 + + # -1 is to reduce likelyhood of clashes + # NOTE: must match core implementation (lwutil.c) + ( $oldsrid % ( $SRID_MAXIMUM - $SRID_USER_MAXIMUM - 1 ) ); + printf STDERR " WARNING: SRID $oldsrid converted to $newsrid (in reserved zone)\n"; + } elsif ( $oldsrid > $SRID_USER_MAXIMUM ) { + printf STDERR " WARNING: SRID $newsrid is in reserved zone\n"; + } + + return $newsrid; +} + + +###################################################################### +# Here are all the signatures we want to skip. +# +__END__ +AGGREGATE accum(geometry) +AGGREGATE accum_old(geometry) +AGGREGATE collect(geometry) +AGGREGATE extent3d(geometry) +AGGREGATE extent(geometry) +AGGREGATE geomunion(geometry) +AGGREGATE geomunion_old(geometry) +AGGREGATE makeline(geometry) +AGGREGATE memcollect(geometry) +AGGREGATE memgeomunion(geometry) +AGGREGATE polygonize(geometry) +AGGREGATE st_3dextent(geometry) +AGGREGATE st_accum(geometry) +AGGREGATE st_accum_old(geometry) +AGGREGATE st_collect(geometry) +AGGREGATE st_extent3d(geometry) +AGGREGATE st_extent(geometry) +AGGREGATE st_makeline(geometry) +AGGREGATE st_memcollect(geometry) +AGGREGATE st_memunion(geometry) +AGGREGATE st_polygonize(geometry) +AGGREGATE st_union(geometry) +AGGREGATE st_union_old(geometry) +AGGREGATE st_union(raster) +AGGREGATE st_union(raster, integer) +AGGREGATE st_union(raster, integer, text) +AGGREGATE st_union(raster, text) +AGGREGATE st_union(raster, text, text) +AGGREGATE st_union(raster, text, text, text) +AGGREGATE st_union(raster, text, text, text, double precision) +AGGREGATE st_union(raster, text, text, text, double precision, text, text, text, double precision) +AGGREGATE st_union(raster, text, text, text, double precision, text, text, text, double precision, text, text, text, double precision) +AGGREGATE topoelementarray_agg(topoelement) +CAST CAST (boolean AS text) +CAST CAST (bytea AS public.geography) +CAST CAST (bytea AS public.geometry) +CAST CAST (public.box2d AS public.box3d) +CAST CAST (public.box2d AS public.geometry) +CAST CAST (public.box3d AS box) +CAST CAST (public.box3d AS public.box2d) +CAST CAST (public.box3d AS public.geometry) +CAST CAST (public.box3d_extent AS public.box2d) +CAST CAST (public.box3d_extent AS public.box3d) +CAST CAST (public.box3d_extent AS public.geometry) +CAST CAST (public.chip AS public.geometry) +CAST CAST (public.geography AS bytea) +CAST CAST (public.geography AS public.geography) +CAST CAST (public.geography AS public.geometry) +CAST CAST (public.geometry AS box) +CAST CAST (public.geometry AS bytea) +CAST CAST (public.geometry AS public.box2d) +CAST CAST (public.geometry AS public.box3d) +CAST CAST (public.geometry AS public.geography) +CAST CAST (public.geometry AS public.geometry) +CAST CAST (public.geometry AS text) +CAST CAST (public.raster AS box2d) +CAST CAST (public.raster AS bytea) +CAST CAST (public.raster AS public.box2d) +CAST CAST (public.raster AS public.box3d) +CAST CAST (public.raster AS public.geometry) +CAST CAST (raster AS bytea) +CAST CAST (raster AS geometry) +CAST CAST (text AS public.geometry) +CAST CAST (topology.topogeometry AS geometry) +CAST CAST (topology.topogeometry AS public.geometry) +COMMENT AGGREGATE st_3dextent(geometry) +COMMENT AGGREGATE st_accum(geometry) +COMMENT AGGREGATE st_collect(geometry) +COMMENT AGGREGATE st_extent3d(geometry) +COMMENT AGGREGATE st_extent(geometry) +COMMENT AGGREGATE st_makeline(geometry) +COMMENT AGGREGATE st_memunion(geometry) +COMMENT AGGREGATE st_polygonize(geometry) +COMMENT AGGREGATE st_union(geometry) +COMMENT AGGREGATE st_union(raster) +COMMENT AGGREGATE st_union(raster, integer) +COMMENT AGGREGATE st_union(raster, integer, text) +COMMENT AGGREGATE st_union(raster, text) +COMMENT AGGREGATE topoelementarray_agg(topoelement) +COMMENT DOMAIN topoelement +COMMENT DOMAIN topoelementarray +COMMENT FUNCTION addauth(text) +COMMENT FUNCTION addedge(atopology character varying, aline public.geometry) +COMMENT FUNCTION addedge(character varying, public.geometry) +COMMENT FUNCTION addface(atopology character varying, apoly public.geometry, force_new boolean) +COMMENT FUNCTION addgeometrycolumn(catalog_namecharacter varying, schema_namecharacter varying, table_namecharacter varying, column_namecharacter varying, new_srid_ininteger, new_typecharacter varying, new_diminteger, use_typmodboolean) +COMMENT FUNCTION addgeometrycolumn(character varying, character varying, character varying, character varying, integer, character varying, integer) +COMMENT FUNCTION addgeometrycolumn(character varying, character varying, character varying, integer, character varying, integer) +COMMENT FUNCTION addgeometrycolumn(character varying, character varying, integer, character varying, integer) +COMMENT FUNCTION addgeometrycolumn(schema_name character varying, table_name character varying, column_name character varying, new_srid integer, new_type character varying, new_dim integer, use_typmod boolean) +COMMENT FUNCTION addgeometrycolumn(table_name character varying, column_name character varying, new_srid integer, new_type character varying, new_dim integer, use_typmod boolean) +COMMENT FUNCTION addnode(atopology character varying, apoint public.geometry, allowedgesplitting boolean, setcontainingface boolean) +COMMENT FUNCTION addnode(character varying, public.geometry) +COMMENT FUNCTION addrasterconstraints(rastschema name, rasttable name, rastcolumn name, srid boolean, scale_x boolean, scale_y boolean, blocksize_x boolean, blocksize_y boolean, same_alignment boolean, regular_blocking boolean, num_bands boolean, pixel_types boolean, nodata_values boolean, extent boolean) +COMMENT FUNCTION addrasterconstraints(rastschema name, rasttable name, rastcolumn name, VARIADIC constraints text[]) +COMMENT FUNCTION addrasterconstraints(rasttable name, rastcolumn name, srid boolean, scale_x boolean, scale_y boolean, blocksize_x boolean, blocksize_y boolean, same_alignment boolean, regular_blocking boolean, num_bands boolean, pixel_types boolean, nodata_values boolean, extent boolean) +COMMENT FUNCTION addrasterconstraints(rasttable name, rastcolumn name, VARIADIC constraints text[]) +COMMENT FUNCTION addtopogeometrycolumn(character varying, character varying, character varying, character varying, character varying) +COMMENT FUNCTION addtopogeometrycolumn(character varying, character varying, character varying, character varying, character varying, integer) +COMMENT FUNCTION addtopogeometrycolumn(toponame character varying, schema character varying, tbl character varying, col character varying, ltype character varying, child integer) +COMMENT FUNCTION asgml(tgtopogeometry) +COMMENT FUNCTION asgml(tgtopogeometry, nsprefix_in text, precision_in integer, options_in integer, visitedtable regclass, idprefix text, gmlver integer) +COMMENT FUNCTION asgml(tgtopogeometry, nsprefix text) +COMMENT FUNCTION asgml(tgtopogeometry, nsprefix text, prec integer, options integer, visitedtable regclass, idprefix text) +COMMENT FUNCTION asgml(tgtopogeometry, nsprefix text, prec integer, options integer, vis regclass) +COMMENT FUNCTION asgml(tgtopogeometry, nsprefix text, prec integer, opts integer) +COMMENT FUNCTION asgml(tgtopogeometry, visitedtable regclass) +COMMENT FUNCTION asgml(tgtopogeometry, visitedtable regclass, nsprefix text) +COMMENT FUNCTION box2d(geometry) +COMMENT FUNCTION box3d(geometry) +COMMENT FUNCTION box3d(raster) +COMMENT FUNCTION checkauth(text, text) +COMMENT FUNCTION checkauth(text, text, text) +COMMENT FUNCTION copytopology(atopologycharacter varying, newtopocharacter varying) +COMMENT FUNCTION createtopogeom(character varying, integer, integer, topoelementarray) +COMMENT FUNCTION createtopogeom(toponame character varying, tg_type integer, layer_id integer) +COMMENT FUNCTION createtopogeom(toponame character varying, tg_type integer, layer_id integer, tg_objs topoelementarray) +COMMENT FUNCTION createtopology(atopology character varying, srid integer, prec double precision, hasz boolean) +COMMENT FUNCTION createtopology(character varying) +COMMENT FUNCTION createtopology(character varying, integer) +COMMENT FUNCTION createtopology(toponame character varying, sridinteger, precdouble precision) +COMMENT FUNCTION disablelongtransactions() +COMMENT FUNCTION dropgeometrycolumn(catalog_namecharacter varying, schema_namecharacter varying, table_namecharacter varying, column_namecharacter varying) +COMMENT FUNCTION dropgeometrycolumn(character varying, character varying) +COMMENT FUNCTION dropgeometrycolumn(character varying, character varying, character varying) +COMMENT FUNCTION dropgeometrycolumn(character varying, character varying, character varying, character varying) +COMMENT FUNCTION dropgeometrycolumn(schema_namecharacter varying, table_namecharacter varying, column_namecharacter varying) +COMMENT FUNCTION dropgeometrycolumn(table_namecharacter varying, column_namecharacter varying) +COMMENT FUNCTION dropgeometrytable(catalog_namecharacter varying, schema_namecharacter varying, table_namecharacter varying) +COMMENT FUNCTION dropgeometrytable(character varying) +COMMENT FUNCTION dropgeometrytable(character varying, character varying) +COMMENT FUNCTION dropgeometrytable(character varying, character varying, character varying) +COMMENT FUNCTION dropgeometrytable(schema_namecharacter varying, table_namecharacter varying) +COMMENT FUNCTION dropgeometrytable(table_namecharacter varying) +COMMENT FUNCTION droprasterconstraints(rastschema name, rasttable name, rastcolumn name, VARIADIC constraints text[]) +COMMENT FUNCTION droprasterconstraints(rasttablename, rastcolumnname, sridboolean, scale_xboolean, scale_yboolean, blocksize_xboolean, blocksize_yboolean, same_alignmentboolean, regular_blockingboolean, num_bandsboolean, pixel_typesboolean, nodata_valuesboolean, extentboolean) +COMMENT FUNCTION droptopogeometrycolumn(character varying, character varying, character varying) +COMMENT FUNCTION droptopogeometrycolumn(schema character varying, tbl character varying, col character varying) +COMMENT FUNCTION droptopology(atopology character varying) +COMMENT FUNCTION droptopology(character varying) +COMMENT FUNCTION enablelongtransactions() +COMMENT FUNCTION find_srid(character varying, character varying, character varying) +COMMENT FUNCTION geometrytype(geometry) +COMMENT FUNCTION getedgebypoint(atopologycharacter varying, apointpublic.geometry, tol1double precision) +COMMENT FUNCTION getfacebypoint(atopologycharacter varying, apointpublic.geometry, tol1double precision) +COMMENT FUNCTION getnodebypoint(atopologycharacter varying, apointpublic.geometry, tol1double precision) +COMMENT FUNCTION gettopogeomelementarray(character varying, integer, integer) +COMMENT FUNCTION gettopogeomelementarray(tg topogeometry) +COMMENT FUNCTION gettopogeomelementarray(topogeometry) +COMMENT FUNCTION gettopogeomelementarray(toponame character varying, layer_id integer, tgid integer) +COMMENT FUNCTION gettopogeomelements(character varying, integer, integer) +COMMENT FUNCTION gettopogeomelements(tg topogeometry) +COMMENT FUNCTION gettopogeomelements(topogeometry) +COMMENT FUNCTION gettopogeomelements(toponame character varying, layerid integer, tgid integer) +COMMENT FUNCTION gettopologyid(character varying) +COMMENT FUNCTION gettopologyid(toponame character varying) +COMMENT FUNCTION gettopologyname(integer) +COMMENT FUNCTION gettopologyname(topoid integer) +COMMENT FUNCTION lockrow(text, text, text) +COMMENT FUNCTION lockrow(text, text, text, text, timestampwithouttimezone) +COMMENT FUNCTION lockrow(text, text, text, timestampwithouttimezone) +COMMENT FUNCTION polygonize(toponame character varying) +COMMENT FUNCTION populate_geometry_columns() +COMMENT FUNCTION populate_geometry_columns(tbl_oidoid) +COMMENT FUNCTION populate_geometry_columns(tbl_oidoid, use_typmodboolean) +COMMENT FUNCTION populate_geometry_columns(use_typmodboolean) +COMMENT FUNCTION postgis_addbbox(geometry) +COMMENT FUNCTION postgis_dropbbox(geometry) +COMMENT FUNCTION postgis_full_version() +COMMENT FUNCTION postgis_geos_version() +COMMENT FUNCTION postgis_hasbbox(geometry) +COMMENT FUNCTION postgis_lib_build_date() +COMMENT FUNCTION postgis_lib_version() +COMMENT FUNCTION postgis_libxml_version() +COMMENT FUNCTION postgis_proj_version() +COMMENT FUNCTION postgis_raster_lib_build_date() +COMMENT FUNCTION postgis_raster_lib_version() +COMMENT FUNCTION postgis_scripts_build_date() +COMMENT FUNCTION postgis_scripts_installed() +COMMENT FUNCTION postgis_scripts_released() +COMMENT FUNCTION postgis_uses_stats() +COMMENT FUNCTION postgis_version() +COMMENT FUNCTION probe_geometry_columns() +COMMENT FUNCTION st_3dclosestpoint(geom1 geometry, geom2 geometry) +COMMENT FUNCTION st_3dclosestpoint(geometry, geometry) +COMMENT FUNCTION st_3ddfullywithin(geom1 geometry, geom2 geometry, double precision) +COMMENT FUNCTION st_3ddfullywithin(geometry, geometry, double precision) +COMMENT FUNCTION st_3ddistance(geom1 geometry, geom2 geometry) +COMMENT FUNCTION st_3ddistance(geometry, geometry) +COMMENT FUNCTION st_3ddwithin(geom1 geometry, geom2 geometry, double precision) +COMMENT FUNCTION st_3ddwithin(geometry, geometry, double precision) +COMMENT FUNCTION st_3dintersects(geom1 geometry, geom2 geometry) +COMMENT FUNCTION st_3dintersects(geometry, geometry) +COMMENT FUNCTION st_3dlength(geometry) +COMMENT FUNCTION st_3dlength_spheroid(geometry, spheroid) +COMMENT FUNCTION st_3dlongestline(geom1 geometry, geom2 geometry) +COMMENT FUNCTION st_3dlongestline(geometry, geometry) +COMMENT FUNCTION st_3dmakebox(geom1 geometry, geom2 geometry) +COMMENT FUNCTION st_3dmakebox(geometry, geometry) +COMMENT FUNCTION st_3dmaxdistance(geom1 geometry, geom2 geometry) +COMMENT FUNCTION st_3dmaxdistance(geometry, geometry) +COMMENT FUNCTION st_3dperimeter(geometry) +COMMENT FUNCTION st_3dshortestline(geom1 geometry, geom2 geometry) +COMMENT FUNCTION st_3dshortestline(geometry, geometry) +COMMENT FUNCTION st_addband(rast raster, indexinteger, pixeltypetext, initialvaluedouble precision, nodatavaldouble precision) +COMMENT FUNCTION st_addband(rast raster, pixeltypetext, initialvaluedouble precision, nodatavaldouble precision) +COMMENT FUNCTION st_addband(torast raster, fromrast raster, frombandinteger, torastindexinteger) +COMMENT FUNCTION st_addband(torast raster, fromrastsraster[], frombandinteger) +COMMENT FUNCTION st_addbbox(geometry) +COMMENT FUNCTION st_addedgemodface(atopologycharacter varying, anodeinteger, anothernodeinteger, acurvepublic.geometry) +COMMENT FUNCTION st_addedgenewfaces(atopologycharacter varying, anodeinteger, anothernodeinteger, acurvepublic.geometry) +COMMENT FUNCTION st_addisoedge(atopologycharacter varying, anodeinteger, anothernodeinteger, acurvepublic.geometry) +COMMENT FUNCTION st_addisonode(atopology character varying, aface integer, apoint public.geometry) +COMMENT FUNCTION st_addisonode(character varying, integer, public.geometry) +COMMENT FUNCTION st_addmeasure(geometry, double precision, double precision) +COMMENT FUNCTION st_addpoint(geom1 geometry, geom2 geometry) +COMMENT FUNCTION st_addpoint(geom1 geometry, geom2 geometry, integer) +COMMENT FUNCTION st_addpoint(geometry, geometry) +COMMENT FUNCTION st_addpoint(geometry, geometry, integer) +COMMENT FUNCTION st_affine(geometry, double precision, double precision, double precision, double precision, double precision, double precision) +COMMENT FUNCTION st_affine(geometry, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision) +COMMENT FUNCTION st_area(geoggeography, use_spheroidboolean) +COMMENT FUNCTION st_area(geography) +COMMENT FUNCTION st_area(geography, boolean) +COMMENT FUNCTION st_area(geometry) +COMMENT FUNCTION st_asbinary(geography) +COMMENT FUNCTION st_asbinary(geography, text) +COMMENT FUNCTION st_asbinary(geometry) +COMMENT FUNCTION st_asbinary(geometry, text) +COMMENT FUNCTION st_asbinary(raster) +COMMENT FUNCTION st_asewkb(geometry) +COMMENT FUNCTION st_asewkb(geometry, text) +COMMENT FUNCTION st_asewkt(geometry) +COMMENT FUNCTION st_asgdalraster(rast raster, formattext, optionstext[], sridinteger) +COMMENT FUNCTION st_asgeojson(geog geography, maxdecimaldigits integer, options integer) +COMMENT FUNCTION st_asgeojson(geography) +COMMENT FUNCTION st_asgeojson(geography, integer) +COMMENT FUNCTION st_asgeojson(geography, integer, integer) +COMMENT FUNCTION st_asgeojson(geometry) +COMMENT FUNCTION st_asgeojson(geometry, integer) +COMMENT FUNCTION st_asgeojson(geometry, integer, integer) +COMMENT FUNCTION st_asgeojson(geom geometry, maxdecimaldigits integer, options integer) +COMMENT FUNCTION st_asgeojson(gj_version integer, geog geography, maxdecimaldigits integer, options integer) +COMMENT FUNCTION st_asgeojson(gj_version integer, geom geometry, maxdecimaldigits integer, options integer) +COMMENT FUNCTION st_asgeojson(integer, geography) +COMMENT FUNCTION st_asgeojson(integer, geography, integer) +COMMENT FUNCTION st_asgeojson(integer, geography, integer, integer) +COMMENT FUNCTION st_asgeojson(integer, geometry) +COMMENT FUNCTION st_asgeojson(integer, geometry, integer) +COMMENT FUNCTION st_asgeojson(integer, geometry, integer, integer) +COMMENT FUNCTION st_asgml(geog geography, maxdecimaldigits integer, options integer) +COMMENT FUNCTION st_asgml(geography) +COMMENT FUNCTION st_asgml(geography, integer) +COMMENT FUNCTION st_asgml(geography, integer, integer) +COMMENT FUNCTION st_asgml(geometry) +COMMENT FUNCTION st_asgml(geometry, integer) +COMMENT FUNCTION st_asgml(geometry, integer, integer) +COMMENT FUNCTION st_asgml(geom geometry, maxdecimaldigits integer, options integer) +COMMENT FUNCTION st_asgml(integer, geography) +COMMENT FUNCTION st_asgml(integer, geography, integer) +COMMENT FUNCTION st_asgml(integer, geography, integer, integer) +COMMENT FUNCTION st_asgml(integer, geography, integer, integer, text) +COMMENT FUNCTION st_asgml(integer, geometry) +COMMENT FUNCTION st_asgml(integer, geometry, integer) +COMMENT FUNCTION st_asgml(integer, geometry, integer, integer) +COMMENT FUNCTION st_asgml(integer, geometry, integer, integer, text) +COMMENT FUNCTION st_asgml(version integer, geog geography, maxdecimaldigits integer, options integer, nprefix text) +COMMENT FUNCTION st_asgml(version integer, geom geometry, maxdecimaldigits integer, options integer, nprefix text) +COMMENT FUNCTION st_ashexewkb(geometry) +COMMENT FUNCTION st_ashexewkb(geometry, text) +COMMENT FUNCTION st_asjpeg(rast raster, nband integer, optionstext[]) +COMMENT FUNCTION st_asjpeg(rast raster, nband integer, qualityinteger) +COMMENT FUNCTION st_asjpeg(rast raster, nbands integer[], optionstext[]) +COMMENT FUNCTION st_asjpeg(rast raster, nbands integer[], qualityinteger) +COMMENT FUNCTION st_asjpeg(rast raster, optionstext[]) +COMMENT FUNCTION st_askml(geog geography, maxdecimaldigits integer) +COMMENT FUNCTION st_askml(geography) +COMMENT FUNCTION st_askml(geography, integer) +COMMENT FUNCTION st_askml(geometry) +COMMENT FUNCTION st_askml(geometry, integer) +COMMENT FUNCTION st_askml(geom geometry, maxdecimaldigits integer) +COMMENT FUNCTION st_askml(integer, geography) +COMMENT FUNCTION st_askml(integer, geography, integer) +COMMENT FUNCTION st_askml(integer, geography, integer, text) +COMMENT FUNCTION st_askml(integer, geometry) +COMMENT FUNCTION st_askml(integer, geometry, integer) +COMMENT FUNCTION st_askml(integer, geometry, integer, text) +COMMENT FUNCTION st_askml(version integer, geog geography, maxdecimaldigits integer, nprefix text) +COMMENT FUNCTION st_askml(version integer, geom geometry, maxdecimaldigits integer, nprefix text) +COMMENT FUNCTION st_aslatlontext(geometry) +COMMENT FUNCTION st_aslatlontext(geometry, text) +COMMENT FUNCTION st_aspng(rast raster, nband integer, compressioninteger) +COMMENT FUNCTION st_aspng(rast raster, nband integer, optionstext[]) +COMMENT FUNCTION st_aspng(rast raster, nbands integer[], compressioninteger) +COMMENT FUNCTION st_aspng(rast raster, nbands integer[], optionstext[]) +COMMENT FUNCTION st_aspng(rast raster, optionstext[]) +COMMENT FUNCTION st_asraster(geomgeometry, refraster, pixeltypetext, valuedouble precision, nodatavaldouble precision, touchedboolean) +COMMENT FUNCTION st_asraster(geomgeometry, refraster, pixeltypetext[], valuedouble precision[], nodatavaldouble precision[], touchedboolean) +COMMENT FUNCTION st_asraster(geomgeometry, scalexdouble precision, scaleydouble precision, gridxdouble precision, gridydouble precision, pixeltypetext, valuedouble precision, nodatavaldouble precision, skewxdouble precision, skewydouble precision, touchedboolean) +COMMENT FUNCTION st_asraster(geomgeometry, scalexdouble precision, scaleydouble precision, gridxdouble precision, gridydouble precision, pixeltypetext[], valuedouble precision[], nodatavaldouble precision[], skewxdouble precision, skewydouble precision, touchedboolean) +COMMENT FUNCTION st_asraster(geomgeometry, scalexdouble precision, scaleydouble precision, pixeltypetext, valuedouble precision, nodatavaldouble precision, upperleftxdouble precision, upperleftydouble precision, skewxdouble precision, skewydouble precision, touchedboolean) +COMMENT FUNCTION st_asraster(geomgeometry, widthinteger, heightinteger, gridxdouble precision, gridydouble precision, pixeltypetext, valuedouble precision, nodatavaldouble precision, skewxdouble precision, skewydouble precision, touchedboolean) +COMMENT FUNCTION st_asraster(geomgeometry, widthinteger, heightinteger, gridxdouble precision, gridydouble precision, pixeltypetext[], valuedouble precision[], nodatavaldouble precision[], skewxdouble precision, skewydouble precision, touchedboolean) +COMMENT FUNCTION st_asraster(geomgeometry, widthinteger, heightinteger, pixeltypetext, valuedouble precision, nodatavaldouble precision, upperleftxdouble precision, upperleftydouble precision, skewxdouble precision, skewydouble precision, touchedboolean) +COMMENT FUNCTION st_asraster(geomgeometry, widthinteger, heightinteger, pixeltypetext[], valuedouble precision[], nodatavaldouble precision[], upperleftxdouble precision, upperleftydouble precision, skewxdouble precision, skewydouble precision, touchedboolean) +COMMENT FUNCTION st_assvg(geog geography, rel integer, maxdecimaldigits integer) +COMMENT FUNCTION st_assvg(geography) +COMMENT FUNCTION st_assvg(geography, integer) +COMMENT FUNCTION st_assvg(geography, integer, integer) +COMMENT FUNCTION st_assvg(geometry) +COMMENT FUNCTION st_assvg(geometry, integer) +COMMENT FUNCTION st_assvg(geometry, integer, integer) +COMMENT FUNCTION st_assvg(geom geometry, rel integer, maxdecimaldigits integer) +COMMENT FUNCTION st_astext(geography) +COMMENT FUNCTION st_astext(geometry) +COMMENT FUNCTION st_astiff(rast raster, compressiontext, sridinteger) +COMMENT FUNCTION st_astiff(rast raster, nbands integer[], compressiontext, sridinteger) +COMMENT FUNCTION st_astiff(rast raster, nbands integer[], optionstext[], sridinteger) +COMMENT FUNCTION st_astiff(rast raster, optionstext[], sridinteger) +COMMENT FUNCTION st_asx3d(geom geometry, maxdecimaldigits integer, options integer) +COMMENT FUNCTION st_asx3d(geomgeometry, precinteger) +COMMENT FUNCTION st_azimuth(geog1 geography, geog2 geography) +COMMENT FUNCTION st_azimuth(geom1 geometry, geom2 geometry) +COMMENT FUNCTION st_azimuth(geometry, geometry) +COMMENT FUNCTION st_bandisnodata(rast raster, bandinteger, forcecheckingboolean) +COMMENT FUNCTION st_bandisnodata(rast raster, forcechecking boolean) +COMMENT FUNCTION st_bandmetadata(rast raster, bandinteger, OUT pixeltype text, OUT hasnodata boolean, OUT nodatavalue double precision, OUT isoutdb boolean, OUT path text) +COMMENT FUNCTION st_bandnodatavalue(rast raster, bandinteger) +COMMENT FUNCTION st_bandpath(rast raster, bandinteger) +COMMENT FUNCTION st_bandpixeltype(rast raster, bandinteger) +COMMENT FUNCTION st_band(rast raster, nband integer) +COMMENT FUNCTION st_band(rast raster, nbands integer[]) +COMMENT FUNCTION st_band(rast raster, nbandstext, delimitercharacter) +COMMENT FUNCTION st_bdmpolyfromtext(text, integer) +COMMENT FUNCTION st_bdpolyfromtext(text, integer) +COMMENT FUNCTION st_boundary(geometry) +COMMENT FUNCTION st_box2d(geometry) +COMMENT FUNCTION st_box3d(geometry) +COMMENT FUNCTION st_buffer(geography, double precision) +COMMENT FUNCTION st_buffer(geometry, double precision) +COMMENT FUNCTION st_buffer(geometry, double precision, integer) +COMMENT FUNCTION st_buffer(geometry, double precision, text) +COMMENT FUNCTION st_buildarea(geometry) +COMMENT FUNCTION st_centroid(geometry) +COMMENT FUNCTION st_changeedgegeom(atopologycharacter varying, anedgeinteger, acurvepublic.geometry) +COMMENT FUNCTION st_clip(rast raster, band integer, geom geometry, crop boolean) +COMMENT FUNCTION st_clip(rast raster, band integer, geom geometry, nodata double precision, trimraster boolean) +COMMENT FUNCTION st_clip(rast raster, band integer, geom geometry, trimraster boolean) +COMMENT FUNCTION st_clip(rast raster, geom geometry, crop boolean) +COMMENT FUNCTION st_clip(rast raster, geom geometry, nodata double precision, trimraster boolean) +COMMENT FUNCTION st_clip(rast raster, geom geometry, trimraster boolean) +COMMENT FUNCTION st_closestpoint(geom1 geometry, geom2 geometry) +COMMENT FUNCTION st_closestpoint(geometry, geometry) +COMMENT FUNCTION st_collect(geom1 geometry, geom2 geometry) +COMMENT FUNCTION st_collect(geometry[]) +COMMENT FUNCTION st_collect(geometry, geometry) +COMMENT FUNCTION st_collectionextract(geometry, integer) +COMMENT FUNCTION st_concavehull(param_geomgeometry, param_pctconvexdouble precision, param_allow_holesboolean) +COMMENT FUNCTION st_contains(geom1 geometry, geom2 geometry) +COMMENT FUNCTION st_contains(geometry, geometry) +COMMENT FUNCTION st_containsproperly(geom1 geometry, geom2 geometry) +COMMENT FUNCTION st_containsproperly(geometry, geometry) +COMMENT FUNCTION st_convexhull(geometry) +COMMENT FUNCTION st_convexhull(raster) +COMMENT FUNCTION st_coorddim(geometry) +COMMENT FUNCTION st_coorddim(geometry geometry) +COMMENT FUNCTION st_count(rastertabletext, rastercolumntext, exclude_nodata_valueboolean) +COMMENT FUNCTION st_count(rastertabletext, rastercolumntext, nband integer, exclude_nodata_valueboolean) +COMMENT FUNCTION st_count(rast raster, exclude_nodata_valueboolean) +COMMENT FUNCTION st_count(rast raster, nband integer, exclude_nodata_valueboolean) +COMMENT FUNCTION st_coveredby(geography, geography) +COMMENT FUNCTION st_coveredby(geom1 geometry, geom2 geometry) +COMMENT FUNCTION st_coveredby(geometry, geometry) +COMMENT FUNCTION st_covers(geography, geography) +COMMENT FUNCTION st_covers(geom1 geometry, geom2 geometry) +COMMENT FUNCTION st_covers(geometry, geometry) +COMMENT FUNCTION st_createtopogeo(atopologycharacter varying, acollectionpublic.geometry) +COMMENT FUNCTION st_crosses(geom1 geometry, geom2 geometry) +COMMENT FUNCTION st_crosses(geometry, geometry) +COMMENT FUNCTION st_curvetoline(geometry) +COMMENT FUNCTION st_curvetoline(geometry, integer) +COMMENT FUNCTION st_dfullywithin(geom1 geometry, geom2 geometry, double precision) +COMMENT FUNCTION st_dfullywithin(geometry, geometry, double precision) +COMMENT FUNCTION st_difference(geom1 geometry, geom2 geometry) +COMMENT FUNCTION st_difference(geometry, geometry) +COMMENT FUNCTION st_dimension(geometry) +COMMENT FUNCTION st_disjoint(geom1 geometry, geom2 geometry) +COMMENT FUNCTION st_disjoint(geometry, geometry) +COMMENT FUNCTION st_distance(geography, geography) +COMMENT FUNCTION st_distance(geography, geography, boolean) +COMMENT FUNCTION st_distance(geom1 geometry, geom2 geometry) +COMMENT FUNCTION st_distance(geometry, geometry) +COMMENT FUNCTION st_distance_sphere(geom1 geometry, geom2 geometry) +COMMENT FUNCTION st_distance_sphere(geometry, geometry) +COMMENT FUNCTION st_distance_spheroid(geom1 geometry, geom2 geometry, spheroid) +COMMENT FUNCTION st_distance_spheroid(geometry, geometry, spheroid) +COMMENT FUNCTION st_dropbbox(geometry) +COMMENT FUNCTION st_dumpaspolygons(rast raster, bandinteger) +COMMENT FUNCTION st_dump(geometry) +COMMENT FUNCTION st_dumppoints(geometry) +COMMENT FUNCTION st_dumprings(geometry) +COMMENT FUNCTION st_dwithin(geography, geography, double precision) +COMMENT FUNCTION st_dwithin(geography, geography, double precision, boolean) +COMMENT FUNCTION st_dwithin(geom1 geometry, geom2 geometry, double precision) +COMMENT FUNCTION st_dwithin(geometry, geometry, double precision) +COMMENT FUNCTION st_endpoint(geometry) +COMMENT FUNCTION st_envelope(geometry) +COMMENT FUNCTION st_envelope(raster) +COMMENT FUNCTION st_equals(geom1 geometry, geom2 geometry) +COMMENT FUNCTION st_equals(geometry, geometry) +COMMENT FUNCTION st_estimated_extent(text, text) +COMMENT FUNCTION st_estimated_extent(text, text, text) +COMMENT FUNCTION st_expand(box2d, double precision) +COMMENT FUNCTION st_expand(box3d, double precision) +COMMENT FUNCTION st_expand(geometry, double precision) +COMMENT FUNCTION st_exteriorring(geometry) +COMMENT FUNCTION st_flipcoordinates(geometry) +COMMENT FUNCTION st_force_2d(geometry) +COMMENT FUNCTION st_force_3d(geometry) +COMMENT FUNCTION st_force_3dm(geometry) +COMMENT FUNCTION st_force_3dz(geometry) +COMMENT FUNCTION st_force_4d(geometry) +COMMENT FUNCTION st_force_collection(geometry) +COMMENT FUNCTION st_forcerhr(geometry) +COMMENT FUNCTION st_gdaldrivers(OUTidxinteger, OUTshort_nametext, OUTlong_nametext, OUTcreate_optionstext) +COMMENT FUNCTION st_geogfromtext(text) +COMMENT FUNCTION st_geogfromwkb(bytea) +COMMENT FUNCTION st_geographyfromtext(text) +COMMENT FUNCTION st_geohash(geometry) +COMMENT FUNCTION st_geohash(geometry, integer) +COMMENT FUNCTION st_geohash(geom geometry, maxchars integer) +COMMENT FUNCTION st_geomcollfromtext(text) +COMMENT FUNCTION st_geomcollfromtext(text, integer) +COMMENT FUNCTION st_geometryfromtext(text) +COMMENT FUNCTION st_geometryfromtext(text, integer) +COMMENT FUNCTION st_geometryn(geometry, integer) +COMMENT FUNCTION st_geometrytype(geometry) +COMMENT FUNCTION st_geomfromewkb(bytea) +COMMENT FUNCTION st_geomfromewkt(text) +COMMENT FUNCTION st_geomfromgeojson(text) +COMMENT FUNCTION st_geomfromgml(text) +COMMENT FUNCTION st_geomfromgml(text, integer) +COMMENT FUNCTION st_geomfromkml(text) +COMMENT FUNCTION st_geomfromtext(text) +COMMENT FUNCTION st_geomfromtext(text, integer) +COMMENT FUNCTION st_geomfromwkb(bytea) +COMMENT FUNCTION st_geomfromwkb(bytea, integer) +COMMENT FUNCTION st_georeference(rast raster, formattext) +COMMENT FUNCTION st_getfaceedges(toponame character varying, face_idinteger) +COMMENT FUNCTION st_getfacegeometry(toponame character varying, afaceinteger) +COMMENT FUNCTION st_gmltosql(text) +COMMENT FUNCTION st_gmltosql(text, integer) +COMMENT FUNCTION st_hasarc(geometry) +COMMENT FUNCTION st_hasarc(geometry geometry) +COMMENT FUNCTION st_hasbbox(geometry) +COMMENT FUNCTION st_hasnoband(rast raster, nband integer) +COMMENT FUNCTION st_hausdorffdistance(geom1 geometry, geom2 geometry) +COMMENT FUNCTION st_hausdorffdistance(geom1 geometry, geom2 geometry, double precision) +COMMENT FUNCTION st_hausdorffdistance(geometry, geometry) +COMMENT FUNCTION st_hausdorffdistance(geometry, geometry, double precision) +COMMENT FUNCTION st_height(raster) +COMMENT FUNCTION st_hillshade(rast raster, band integer, pixeltype text, azimuth double precision, altitude double precision, max_bright double precision, elevation_scale double precision) +COMMENT FUNCTION st_histogram(rastertabletext, rastercolumntext, nband integer, binsinteger, "right"boolean) +COMMENT FUNCTION st_histogram(rastertabletext, rastercolumntext, nband integer, binsinteger, widthdouble precision[], "right"boolean) +COMMENT FUNCTION st_histogram(rastertabletext, rastercolumntext, nband integer, exclude_nodata_valueboolean, binsinteger, "right"boolean) +COMMENT FUNCTION st_histogram(rastertabletext, rastercolumntext, nband integer, exclude_nodata_valueboolean, binsinteger, widthdouble precision[], "right"boolean) +COMMENT FUNCTION st_histogram(rast raster, nband integer, binsinteger, "right"boolean) +COMMENT FUNCTION st_histogram(rast raster, nband integer, binsinteger, widthdouble precision[], "right"boolean) +COMMENT FUNCTION st_histogram(rast raster, nband integer, exclude_nodata_valueboolean, binsinteger, "right"boolean) +COMMENT FUNCTION st_histogram(rast raster, nband integer, exclude_nodata_valueboolean, binsinteger, widthdouble precision[], "right"boolean) +COMMENT FUNCTION st_inittopogeo(atopologycharacter varying) +COMMENT FUNCTION st_interiorringn(geometry, integer) +COMMENT FUNCTION st_intersection(geography, geography) +COMMENT FUNCTION st_intersection(geom1 geometry, geom2 geometry) +COMMENT FUNCTION st_intersection(geometry, geometry) +COMMENT FUNCTION st_intersection(geomingeometry, rast raster, bandinteger) +COMMENT FUNCTION st_intersection(rast1raster, band1integer, geomgeometry, extenttypetext, otheruserfuncregprocedure) +COMMENT FUNCTION st_intersection(rast1raster, band1integer, geomgeometry, otheruserfuncregprocedure) +COMMENT FUNCTION st_intersection(rast1raster, geomgeometry, extenttypetext, otheruserfuncregprocedure) +COMMENT FUNCTION st_intersection(rast1raster, geomgeometry, otheruserfuncregprocedure) +COMMENT FUNCTION st_intersects(geography, geography) +COMMENT FUNCTION st_intersects(geom1 geometry, geom2 geometry) +COMMENT FUNCTION st_intersects(geometry, geometry) +COMMENT FUNCTION st_intersects(geomgeometry, rast raster, nband integer) +COMMENT FUNCTION st_intersects(rast1raster, nband1integer, rast2raster, nband2integer) +COMMENT FUNCTION st_intersects(rast1raster, rast2raster) +COMMENT FUNCTION st_intersects(rast raster, nband integer, geomgeometry) +COMMENT FUNCTION st_isclosed(geometry) +COMMENT FUNCTION st_iscollection(geometry) +COMMENT FUNCTION st_isempty(geometry) +COMMENT FUNCTION st_isempty(rast raster) +COMMENT FUNCTION st_isring(geometry) +COMMENT FUNCTION st_issimple(geometry) +COMMENT FUNCTION st_isvaliddetail(geometry) +COMMENT FUNCTION st_isvaliddetail(geometry, integer) +COMMENT FUNCTION st_isvalid(geometry) +COMMENT FUNCTION st_isvalid(geometry, integer) +COMMENT FUNCTION st_isvalidreason(geometry) +COMMENT FUNCTION st_isvalidreason(geometry, integer) +COMMENT FUNCTION st_length2d(geometry) +COMMENT FUNCTION st_length2d_spheroid(geometry, spheroid) +COMMENT FUNCTION st_length3d(geometry) +COMMENT FUNCTION st_length3d_spheroid(geometry, spheroid) +COMMENT FUNCTION st_length(geoggeography, use_spheroidboolean) +COMMENT FUNCTION st_length(geography) +COMMENT FUNCTION st_length(geography, boolean) +COMMENT FUNCTION st_length(geometry) +COMMENT FUNCTION st_length_spheroid(geometry, spheroid) +COMMENT FUNCTION st_linecrossingdirection(geom1 geometry, geom2 geometry) +COMMENT FUNCTION st_linecrossingdirection(geometry, geometry) +COMMENT FUNCTION st_linefrommultipoint(geometry) +COMMENT FUNCTION st_linefromtext(text) +COMMENT FUNCTION st_linefromtext(text, integer) +COMMENT FUNCTION st_linefromwkb(bytea) +COMMENT FUNCTION st_linefromwkb(bytea, integer) +COMMENT FUNCTION st_line_interpolate_point(geometry, double precision) +COMMENT FUNCTION st_line_locate_point(geom1 geometry, geom2 geometry) +COMMENT FUNCTION st_line_locate_point(geometry, geometry) +COMMENT FUNCTION st_linemerge(geometry) +COMMENT FUNCTION st_linestringfromwkb(bytea) +COMMENT FUNCTION st_linestringfromwkb(bytea, integer) +COMMENT FUNCTION st_line_substring(geometry, double precision, double precision) +COMMENT FUNCTION st_linetocurve(geometry) +COMMENT FUNCTION st_linetocurve(geometry geometry) +COMMENT FUNCTION st_locate_along_measure(geometry, double precision) +COMMENT FUNCTION st_locatebetweenelevations(geometry, double precision, double precision) +COMMENT FUNCTION st_locatebetweenelevations(geometry geometry, fromelevation double precision, toelevation double precision) +COMMENT FUNCTION st_locate_between_measures(geometry, double precision, double precision) +COMMENT FUNCTION st_longestline(geom1 geometry, geom2 geometry) +COMMENT FUNCTION st_longestline(geometry, geometry) +COMMENT FUNCTION st_makebox2d(geom1 geometry, geom2 geometry) +COMMENT FUNCTION st_makebox2d(geometry, geometry) +COMMENT FUNCTION st_makebox3d(geometry, geometry) +COMMENT FUNCTION st_makeemptyraster(rast raster) +COMMENT FUNCTION st_makeemptyraster(widthinteger, heightinteger, upperleftxdouble precision, upperleftydouble precision, pixelsizedouble precision) +COMMENT FUNCTION st_makeemptyraster(widthinteger, heightinteger, upperleftxdouble precision, upperleftydouble precision, scalexdouble precision, scaleydouble precision, skewxdouble precision, skewydouble precision, sridinteger) +COMMENT FUNCTION st_makeenvelope(double precision, double precision, double precision, double precision, integer) +COMMENT FUNCTION st_makeline(geom1 geometry, geom2 geometry) +COMMENT FUNCTION st_makeline(geometry[]) +COMMENT FUNCTION st_makeline(geometry, geometry) +COMMENT FUNCTION st_makepoint(double precision, double precision) +COMMENT FUNCTION st_makepoint(double precision, double precision, double precision) +COMMENT FUNCTION st_makepoint(double precision, double precision, double precision, double precision) +COMMENT FUNCTION st_makepointm(double precision, double precision, double precision) +COMMENT FUNCTION st_makepolygon(geometry) +COMMENT FUNCTION st_makepolygon(geometry, geometry[]) +COMMENT FUNCTION st_makevalid(geometry) +COMMENT FUNCTION st_mapalgebraexpr(rast1raster, band1integer, rast2raster, band2integer, expressiontext, pixeltypetext, extenttypetext, nodata1exprtext, nodata2exprtext, nodatanodatavaldouble precision) +COMMENT FUNCTION st_mapalgebraexpr(rast1raster, rast2raster, expressiontext, pixeltypetext, extenttypetext, nodata1exprtext, nodata2exprtext, nodatanodatavaldouble precision) +COMMENT FUNCTION st_mapalgebraexpr(rast raster, bandinteger, pixeltypetext, expressiontext, nodatavaldouble precision) +COMMENT FUNCTION st_mapalgebraexpr(rast raster, pixeltypetext, expressiontext, nodatavaldouble precision) +COMMENT FUNCTION st_mapalgebrafctngb(rast raster, bandinteger, pixeltypetext, ngbwidthinteger, ngbheightinteger, onerastngbuserfuncregprocedure, nodatamodetext, VARIADICargstext[]) +COMMENT FUNCTION st_mapalgebrafct(rast1raster, band1integer, rast2raster, band2integer, tworastuserfuncregprocedure, pixeltypetext, extenttypetext, VARIADICuserargstext[]) +COMMENT FUNCTION st_mapalgebrafct(rast1raster, rast2raster, tworastuserfuncregprocedure, pixeltypetext, extenttypetext, VARIADICuserargstext[]) +COMMENT FUNCTION st_mapalgebrafct(rast raster, bandinteger, onerastuserfuncregprocedure) +COMMENT FUNCTION st_mapalgebrafct(rast raster, bandinteger, onerastuserfuncregprocedure, VARIADICargstext[]) +COMMENT FUNCTION st_mapalgebrafct(rast raster, bandinteger, pixeltypetext, onerastuserfuncregprocedure) +COMMENT FUNCTION st_mapalgebrafct(rast raster, bandinteger, pixeltypetext, onerastuserfuncregprocedure, VARIADICargstext[]) +COMMENT FUNCTION st_mapalgebrafct(rast raster, onerastuserfuncregprocedure) +COMMENT FUNCTION st_mapalgebrafct(rast raster, onerastuserfuncregprocedure, VARIADICargstext[]) +COMMENT FUNCTION st_mapalgebrafct(rast raster, pixeltypetext, onerastuserfuncregprocedure) +COMMENT FUNCTION st_mapalgebrafct(rast raster, pixeltypetext, onerastuserfuncregprocedure, VARIADICargstext[]) +COMMENT FUNCTION st_maxdistance(geom1 geometry, geom2 geometry) +COMMENT FUNCTION st_max_distance(geometry, geometry) +COMMENT FUNCTION st_maxdistance(geometry, geometry) +COMMENT FUNCTION st_mem_size(geometry) +COMMENT FUNCTION st_metadata(rast raster, OUTupperleftxdouble precision, OUTupperleftydouble precision, OUTwidthinteger, OUTheightinteger, OUTscalexdouble precision, OUTscaleydouble precision, OUTskewxdouble precision, OUTskewydouble precision, OUTsridinteger, OUTnumbandsinteger) +COMMENT FUNCTION st_m(geometry) +COMMENT FUNCTION st_minimumboundingcircle(geometry) +COMMENT FUNCTION st_minimumboundingcircle(inputgeomgeometry, segs_per_quarterinteger) +COMMENT FUNCTION st_mlinefromtext(text) +COMMENT FUNCTION st_mlinefromtext(text, integer) +COMMENT FUNCTION st_modedgeheal(toponame character varying, e1idinteger, e2idinteger) +COMMENT FUNCTION st_modedgesplit(atopology character varying, anedge integer, apoint public.geometry) +COMMENT FUNCTION st_modedgesplit(character varying, integer, public.geometry) +COMMENT FUNCTION st_moveisonode(atopology character varying, anode integer, apoint public.geometry) +COMMENT FUNCTION st_moveisonode(character varying, integer, public.geometry) +COMMENT FUNCTION st_mpointfromtext(text) +COMMENT FUNCTION st_mpointfromtext(text, integer) +COMMENT FUNCTION st_mpolyfromtext(text) +COMMENT FUNCTION st_mpolyfromtext(text, integer) +COMMENT FUNCTION st_multi(geometry) +COMMENT FUNCTION st_ndims(geometry) +COMMENT FUNCTION st_newedgeheal(toponame character varying, e1idinteger, e2idinteger) +COMMENT FUNCTION st_newedgessplit(atopology character varying, anedge integer, apoint public.geometry) +COMMENT FUNCTION st_newedgessplit(character varying, integer, public.geometry) +COMMENT FUNCTION st_node(ggeometry) +COMMENT FUNCTION st_npoints(geometry) +COMMENT FUNCTION st_nrings(geometry) +COMMENT FUNCTION st_numbands(raster) +COMMENT FUNCTION st_numgeometries(geometry) +COMMENT FUNCTION st_numinteriorring(geometry) +COMMENT FUNCTION st_numinteriorrings(geometry) +COMMENT FUNCTION st_numpatches(geometry) +COMMENT FUNCTION st_numpoints(geometry) +COMMENT FUNCTION st_offsetcurve(linegeometry, distancedouble precision, paramstext) +COMMENT FUNCTION st_orderingequals(geometrya geometry, geometryb geometry) +COMMENT FUNCTION st_orderingequals(geometry, geometry) +COMMENT FUNCTION st_overlaps(geom1 geometry, geom2 geometry) +COMMENT FUNCTION st_overlaps(geometry, geometry) +COMMENT FUNCTION st_patchn(geometry, integer) +COMMENT FUNCTION st_perimeter2d(geometry) +COMMENT FUNCTION st_perimeter3d(geometry) +COMMENT FUNCTION st_perimeter(geoggeography, use_spheroidboolean) +COMMENT FUNCTION st_perimeter(geometry) +COMMENT FUNCTION st_pixelaspolygon(rast raster, bandinteger, xinteger, yinteger) +COMMENT FUNCTION st_pixelaspolygon(rast raster, xinteger, yinteger) +COMMENT FUNCTION st_pixelheight(raster) +COMMENT FUNCTION st_pixelwidth(raster) +COMMENT FUNCTION st_point(double precision, double precision) +COMMENT FUNCTION st_pointfromtext(text) +COMMENT FUNCTION st_pointfromtext(text, integer) +COMMENT FUNCTION st_point_inside_circle(geometry, double precision, double precision, double precision) +COMMENT FUNCTION st_pointn(geometry, integer) +COMMENT FUNCTION st_pointonsurface(geometry) +COMMENT FUNCTION st_polygonfromtext(text) +COMMENT FUNCTION st_polygonfromtext(text, integer) +COMMENT FUNCTION st_polygon(geometry, integer) +COMMENT FUNCTION st_polygonize(geometry[]) +COMMENT FUNCTION st_polygon(rast raster, bandinteger) +COMMENT FUNCTION st_project(geog geography, distance double precision, azimuth double precision) +COMMENT FUNCTION st_quantile(rast raster, exclude_nodata_valueboolean, quantiledouble precision) +COMMENT FUNCTION st_quantile(rast raster, nband integer, exclude_nodata_valueboolean, quantiledouble precision) +COMMENT FUNCTION st_quantile(rast raster, nband integer, exclude_nodata_valueboolean, quantilesdouble precision[]) +COMMENT FUNCTION st_quantile(rast raster, nband integer, quantiledouble precision) +COMMENT FUNCTION st_quantile(rast raster, nband integer, quantilesdouble precision[]) +COMMENT FUNCTION st_quantile(rast raster, quantiledouble precision) +COMMENT FUNCTION st_quantile(rast raster, quantilesdouble precision[]) +COMMENT FUNCTION st_raster2worldcoordx(rast raster, xrinteger) +COMMENT FUNCTION st_raster2worldcoordx(rast raster, xrinteger, yrinteger) +COMMENT FUNCTION st_raster2worldcoordy(rast raster, xrinteger, yrinteger) +COMMENT FUNCTION st_raster2worldcoordy(rast raster, yrinteger) +COMMENT FUNCTION st_reclass(rast raster, nband integer, reclassexprtext, pixeltypetext, nodatavaldouble precision) +COMMENT FUNCTION st_reclass(rast raster, reclassexprtext, pixeltypetext) +COMMENT FUNCTION st_reclass(rast raster, VARIADICreclassargsetreclassarg[]) +COMMENT FUNCTION st_relate(geom1 geometry, geom2 geometry) +COMMENT FUNCTION st_relate(geom1 geometry, geom2 geometry, integer) +COMMENT FUNCTION st_relate(geom1 geometry, geom2 geometry, text) +COMMENT FUNCTION st_relate(geometry, geometry) +COMMENT FUNCTION st_relate(geometry, geometry, integer) +COMMENT FUNCTION st_relate(geometry, geometry, text) +COMMENT FUNCTION st_relatematch(text, text) +COMMENT FUNCTION st_remedgemodface(toponame character varying, e1id integer) +COMMENT FUNCTION st_remedgenewface(toponame character varying, e1id integer) +COMMENT FUNCTION st_removeisonode(atopology character varying, anode integer) +COMMENT FUNCTION st_removeisonode(character varying, integer) +COMMENT FUNCTION st_removepoint(geometry, integer) +COMMENT FUNCTION st_removerepeatedpoints(geometry) +COMMENT FUNCTION st_resample(rast raster, refraster, algorithmtext, maxerrdouble precision, usescaleboolean) +COMMENT FUNCTION st_resample(rast raster, refraster, usescaleboolean, algorithmtext, maxerrdouble precision) +COMMENT FUNCTION st_resample(rast raster, sridinteger, scalexdouble precision, scaleydouble precision, gridxdouble precision, gridydouble precision, skewxdouble precision, skewydouble precision, algorithmtext, maxerrdouble precision) +COMMENT FUNCTION st_resample(rast raster, widthinteger, heightinteger, sridinteger, gridxdouble precision, gridydouble precision, skewxdouble precision, skewydouble precision, algorithmtext, maxerrdouble precision) +COMMENT FUNCTION st_rescale(rast raster, scalexdouble precision, scaleydouble precision, algorithmtext, maxerrdouble precision) +COMMENT FUNCTION st_rescale(rast raster, scalexydouble precision, algorithmtext, maxerrdouble precision) +COMMENT FUNCTION st_reverse(geometry) +COMMENT FUNCTION st_rotate(geometry, double precision) +COMMENT FUNCTION st_rotatex(geometry, double precision) +COMMENT FUNCTION st_rotatey(geometry, double precision) +COMMENT FUNCTION st_rotatez(geometry, double precision) +COMMENT FUNCTION st_rotation(raster) +COMMENT FUNCTION st_samealignment(rast1raster, rast2raster) +COMMENT FUNCTION st_samealignment(ulx1double precision, uly1double precision, scalex1double precision, scaley1double precision, skewx1double precision, skewy1double precision, ulx2double precision, uly2double precision, scalex2double precision, scaley2double precision, skewx2double precision, skewy2double precision) +COMMENT FUNCTION st_scale(geometry, double precision, double precision) +COMMENT FUNCTION st_scale(geometry, double precision, double precision, double precision) +COMMENT FUNCTION st_scalex(raster) +COMMENT FUNCTION st_scaley(raster) +COMMENT FUNCTION st_segmentize(geometry, double precision) +COMMENT FUNCTION st_setbandisnodata(rast raster, bandinteger) +COMMENT FUNCTION st_setbandnodatavalue(rast raster, bandinteger, nodatavaluedouble precision, forcecheckingboolean) +COMMENT FUNCTION st_setbandnodatavalue(rast raster, nodatavaluedouble precision) +COMMENT FUNCTION st_setgeoreference(rast raster, georeftext, formattext) +COMMENT FUNCTION st_setpoint(geometry, integer, geometry) +COMMENT FUNCTION st_setrotation(rast raster, rotationdouble precision) +COMMENT FUNCTION st_setscale(rast raster, scaledouble precision) +COMMENT FUNCTION st_setscale(rast raster, scalexdouble precision, scaleydouble precision) +COMMENT FUNCTION st_setskew(rast raster, skewdouble precision) +COMMENT FUNCTION st_setskew(rast raster, skewxdouble precision, skewydouble precision) +COMMENT FUNCTION st_setsrid(geometry, integer) +COMMENT FUNCTION st_setsrid(rast raster, sridinteger) +COMMENT FUNCTION st_setupperleft(rast raster, upperleftxdouble precision, upperleftydouble precision) +COMMENT FUNCTION st_setvalue(rast raster, bandinteger, ptgeometry, newvaluedouble precision) +COMMENT FUNCTION st_setvalue(rast raster, bandinteger, xinteger, yinteger, newvaluedouble precision) +COMMENT FUNCTION st_setvalue(rast raster, ptgeometry, newvaluedouble precision) +COMMENT FUNCTION st_setvalue(rast raster, xinteger, yinteger, newvaluedouble precision) +COMMENT FUNCTION st_sharedpaths(geom1 geometry, geom2 geometry) +COMMENT FUNCTION st_sharedpaths(geometry, geometry) +COMMENT FUNCTION st_shift_longitude(geometry) +COMMENT FUNCTION st_shortestline(geom1 geometry, geom2 geometry) +COMMENT FUNCTION st_shortestline(geometry, geometry) +COMMENT FUNCTION st_simplify(geometry, double precision) +COMMENT FUNCTION st_simplifypreservetopology(geometry, double precision) +COMMENT FUNCTION st_skewx(raster) +COMMENT FUNCTION st_skewy(raster) +COMMENT FUNCTION st_snap(geom1 geometry, geom2 geometry, double precision) +COMMENT FUNCTION st_snap(geometry, geometry, double precision) +COMMENT FUNCTION st_snaptogrid(geom1 geometry, geom2 geometry, double precision, double precision, double precision, double precision) +COMMENT FUNCTION st_snaptogrid(geometry, double precision) +COMMENT FUNCTION st_snaptogrid(geometry, double precision, double precision) +COMMENT FUNCTION st_snaptogrid(geometry, double precision, double precision, double precision, double precision) +COMMENT FUNCTION st_snaptogrid(geometry, geometry, double precision, double precision, double precision, double precision) +COMMENT FUNCTION st_split(geom1 geometry, geom2 geometry) +COMMENT FUNCTION st_split(geometry, geometry) +COMMENT FUNCTION st_srid(geometry) +COMMENT FUNCTION st_srid(raster) +COMMENT FUNCTION st_startpoint(geometry) +COMMENT FUNCTION st_summary(geometry) +COMMENT FUNCTION st_summarystats(rastertabletext, rastercolumntext, exclude_nodata_valueboolean) +COMMENT FUNCTION st_summarystats(rastertabletext, rastercolumntext, nband integer, exclude_nodata_valueboolean) +COMMENT FUNCTION st_summarystats(rast raster, exclude_nodata_valueboolean) +COMMENT FUNCTION st_summarystats(rast raster, nband integer, exclude_nodata_valueboolean) +COMMENT FUNCTION st_symdifference(geom1 geometry, geom2 geometry) +COMMENT FUNCTION st_symdifference(geometry, geometry) +COMMENT FUNCTION st_touches(geom1 geometry, geom2 geometry) +COMMENT FUNCTION st_touches(geometry, geometry) +COMMENT FUNCTION st_transform(geometry, integer) +COMMENT FUNCTION st_transform(rast raster, sridinteger, algorithmtext, maxerrdouble precision, scalexdouble precision, scaleydouble precision) +COMMENT FUNCTION st_transform(rast raster, sridinteger, scalexdouble precision, scaleydouble precision, algorithmtext, maxerrdouble precision) +COMMENT FUNCTION st_translate(geometry, double precision, double precision) +COMMENT FUNCTION st_translate(geometry, double precision, double precision, double precision) +COMMENT FUNCTION st_transscale(geometry, double precision, double precision, double precision, double precision) +COMMENT FUNCTION st_unaryunion(geometry) +COMMENT FUNCTION st_union(geom1 geometry, geom2 geometry) +COMMENT FUNCTION st_union(geometry[]) +COMMENT FUNCTION st_union(geometry, geometry) +COMMENT FUNCTION st_upperleftx(raster) +COMMENT FUNCTION st_upperlefty(raster) +COMMENT FUNCTION st_valuecount(rastertabletext, rastercolumntext, nband integer, exclude_nodata_valueboolean, searchvaluedouble precision, roundtodouble precision) +COMMENT FUNCTION st_valuecount(rastertabletext, rastercolumntext, nband integer, exclude_nodata_valueboolean, searchvaluesdouble precision[], roundtodouble precision, OUTvaluedouble precision, OUTcountinteger) +COMMENT FUNCTION st_valuecount(rastertabletext, rastercolumntext, nband integer, searchvaluedouble precision, roundtodouble precision) +COMMENT FUNCTION st_valuecount(rastertabletext, rastercolumntext, nband integer, searchvaluesdouble precision[], roundtodouble precision, OUTvaluedouble precision, OUTcountinteger) +COMMENT FUNCTION st_valuecount(rastertabletext, rastercolumntext, searchvaluedouble precision, roundtodouble precision) +COMMENT FUNCTION st_valuecount(rastertabletext, rastercolumntext, searchvaluesdouble precision[], roundtodouble precision, OUTvaluedouble precision, OUTcountinteger) +COMMENT FUNCTION st_valuecount(rast raster, nband integer, exclude_nodata_valueboolean, searchvaluedouble precision, roundtodouble precision) +COMMENT FUNCTION st_valuecount(rast raster, nband integer, exclude_nodata_valueboolean, searchvaluesdouble precision[], roundtodouble precision, OUTvaluedouble precision, OUTcountinteger) +COMMENT FUNCTION st_valuecount(rast raster, nband integer, searchvaluedouble precision, roundtodouble precision) +COMMENT FUNCTION st_valuecount(rast raster, nband integer, searchvaluesdouble precision[], roundtodouble precision, OUTvaluedouble precision, OUTcountinteger) +COMMENT FUNCTION st_valuecount(rast raster, searchvaluedouble precision, roundtodouble precision) +COMMENT FUNCTION st_valuecount(rast raster, searchvaluesdouble precision[], roundtodouble precision, OUTvaluedouble precision, OUTcountinteger) +COMMENT FUNCTION st_value(rast raster, bandinteger, ptgeometry, hasnodataboolean) +COMMENT FUNCTION st_value(rast raster, bandinteger, xinteger, yinteger, hasnodataboolean) +COMMENT FUNCTION st_value(rast raster, ptgeometry, hasnodataboolean) +COMMENT FUNCTION st_value(rast raster, xinteger, yinteger, hasnodataboolean) +COMMENT FUNCTION st_width(raster) +COMMENT FUNCTION st_within(geom1 geometry, geom2 geometry) +COMMENT FUNCTION st_within(geometry, geometry) +COMMENT FUNCTION st_wkbtosql(bytea) +COMMENT FUNCTION st_wkbtosql(wkb bytea) +COMMENT FUNCTION st_wkttosql(text) +COMMENT FUNCTION st_world2rastercoordx(rast raster, ptgeometry) +COMMENT FUNCTION st_world2rastercoordx(rast raster, xwdouble precision) +COMMENT FUNCTION st_world2rastercoordx(rast raster, xwdouble precision, ywdouble precision) +COMMENT FUNCTION st_world2rastercoordy(rast raster, ptgeometry) +COMMENT FUNCTION st_world2rastercoordy(rast raster, xwdouble precision, ywdouble precision) +COMMENT FUNCTION st_world2rastercoordy(rast raster, ywdouble precision) +COMMENT FUNCTION st_x(geometry) +COMMENT FUNCTION st_xmax(box3d) +COMMENT FUNCTION st_xmin(box3d) +COMMENT FUNCTION st_y(geometry) +COMMENT FUNCTION st_ymax(box3d) +COMMENT FUNCTION st_ymin(box3d) +COMMENT FUNCTION st_z(geometry) +COMMENT FUNCTION st_zmax(box3d) +COMMENT FUNCTION st_zmflag(geometry) +COMMENT FUNCTION st_zmin(box3d) +COMMENT FUNCTION topogeo_addlinestring(atopology character varying, aline public.geometry, tolerance double precision) +COMMENT FUNCTION topogeo_addpoint(atopology character varying, apoint public.geometry, tolerance double precision) +COMMENT FUNCTION topogeo_addpolygon(atopology character varying, apoly public.geometry, tolerance double precision) +COMMENT FUNCTION topologysummary(atopologycharacter varying) +COMMENT FUNCTION totopogeom(ageom public.geometry, atopology character varying, alayer integer, atolerance double precision) +COMMENT FUNCTION unlockrows(text) +COMMENT FUNCTION updategeometrysrid(catalogn_namecharacter varying, schema_namecharacter varying, table_namecharacter varying, column_namecharacter varying, new_sridinteger) +COMMENT FUNCTION updategeometrysrid(character varying, character varying, character varying, character varying, integer) +COMMENT FUNCTION updategeometrysrid(character varying, character varying, character varying, integer) +COMMENT FUNCTION updategeometrysrid(character varying, character varying, integer) +COMMENT FUNCTION validatetopology(character varying) +COMMENT FUNCTION validatetopology(toponame character varying) +COMMENT TYPE box2d +COMMENT TYPE box3d +COMMENT TYPE box3d_extent +COMMENT TYPE geography +COMMENT TYPE geometry +COMMENT TYPE geometry_dump +COMMENT TYPE geomval +COMMENT TYPE getfaceedges_returntype +COMMENT TYPE histogram +COMMENT TYPE raster +COMMENT TYPE reclassarg +COMMENT TYPE summarystats +COMMENT TYPE topogeometry +COMMENT TYPE validatetopology_returntype +CONSTRAINT geometry_columns_pk +CONSTRAINT layer_pkey +CONSTRAINT layer_schema_name_key +CONSTRAINT raster_columns_pk +CONSTRAINT raster_overviews_pk +CONSTRAINT spatial_ref_sys_pkey +CONSTRAINT topology_name_key +CONSTRAINT topology_pkey +DOMAIN topoelement +DOMAIN topoelementarray +DOMAIN topogeomelementarray +FKCONSTRAINT layer_topology_id_fkey +FUNCTION addauth(text) +FUNCTION addbbox(geometry) +FUNCTION addedge(character varying, public.geometry) +FUNCTION addface(character varying, public.geometry, boolean) +FUNCTION addgeometrycolumn(character varying, character varying, character varying, character varying, integer, character varying, integer) +FUNCTION addgeometrycolumn(character varying, character varying, character varying, character varying, integer, character varying, integer, boolean) +FUNCTION addgeometrycolumn(character varying, character varying, character varying, integer, character varying, integer) +FUNCTION addgeometrycolumn(character varying, character varying, character varying, integer, character varying, integer, boolean) +FUNCTION addgeometrycolumn(character varying, character varying, integer, character varying, integer) +FUNCTION addgeometrycolumn(character varying, character varying, integer, character varying, integer, boolean) +FUNCTION addnode(character varying, public.geometry) +FUNCTION addnode(character varying, public.geometry, boolean, boolean) +FUNCTION _add_overview_constraint(name, name, name, name, name, name, integer) +FUNCTION addoverviewconstraints(name, name, name, name, integer) +FUNCTION addoverviewconstraints(name, name, name, name, name, name, integer) +FUNCTION addpoint(geometry, geometry) +FUNCTION addpoint(geometry, geometry, integer) +FUNCTION addrastercolumn(character varying, character varying, character varying, character varying, integer, character varying[], boolean, boolean, double precision[], double precision, double precision, integer, integer, geometry) +FUNCTION addrastercolumn(character varying, character varying, character varying, integer, character varying[], boolean, boolean, double precision[], double precision, double precision, integer, integer, geometry) +FUNCTION addrastercolumn(character varying, character varying, integer, character varying[], boolean, boolean, double precision[], double precision, double precision, integer, integer, geometry) +FUNCTION _add_raster_constraint_alignment(name, name, name) +FUNCTION _add_raster_constraint_blocksize(name, name, name, text) +FUNCTION _add_raster_constraint_extent(name, name, name) +FUNCTION _add_raster_constraint(name, text) +FUNCTION _add_raster_constraint_nodata_values(name, name, name) +FUNCTION _add_raster_constraint_num_bands(name, name, name) +FUNCTION _add_raster_constraint_out_db(name, name, name) +FUNCTION _add_raster_constraint_pixel_types(name, name, name) +FUNCTION _add_raster_constraint_regular_blocking(name, name, name) +FUNCTION _add_raster_constraint_scale(name, name, name, character) +FUNCTION addrasterconstraints(name, name, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean) +FUNCTION addrasterconstraints(name, name, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean) +FUNCTION addrasterconstraints(name, name, name, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean) +FUNCTION addrasterconstraints(name, name, name, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean) +FUNCTION addrasterconstraints(name, name, name, text[]) +FUNCTION addrasterconstraints(name, name, text[]) +FUNCTION _add_raster_constraint_srid(name, name, name) +FUNCTION addtopogeometrycolumn(character varying, character varying, character varying, character varying, character varying) +FUNCTION addtopogeometrycolumn(character varying, character varying, character varying, character varying, character varying, integer) +FUNCTION addtosearchpath(character varying) +FUNCTION affine(geometry, double precision, double precision, double precision, double precision, double precision, double precision) +FUNCTION affine(geometry, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision) +FUNCTION area2d(geometry) +FUNCTION area(geometry) +FUNCTION asbinary(geometry) +FUNCTION asbinary(geometry, text) +FUNCTION asewkb(geometry) +FUNCTION asewkb(geometry, text) +FUNCTION asewkt(geometry) +FUNCTION _asgmledge(integer, integer, integer, public.geometry, regclass, text, integer, integer) +FUNCTION _asgmledge(integer, integer, integer, public.geometry, regclass, text, integer, integer, text) +FUNCTION _asgmledge(integer, integer, integer, public.geometry, regclass, text, integer, integer, text, integer) +FUNCTION _asgmledge(integer, integer, integer, public.geometry, text) +FUNCTION asgmledge(integer, integer, integer, public.geometry, text) +FUNCTION _asgmledge(integer, integer, integer, public.geometry, text, integer, integer) +FUNCTION _asgmlface(text, integer, regclass, text, integer, integer, text, integer) +FUNCTION asgml(geometry) +FUNCTION asgml(geometry, integer) +FUNCTION asgml(geometry, integer, integer) +FUNCTION _asgmlnode(integer, public.geometry, text) +FUNCTION asgmlnode(integer, public.geometry, text) +FUNCTION _asgmlnode(integer, public.geometry, text, integer, integer) +FUNCTION _asgmlnode(integer, public.geometry, text, integer, integer, text) +FUNCTION _asgmlnode(integer, public.geometry, text, integer, integer, text, integer) +FUNCTION asgml(topogeometry) +FUNCTION asgml(topogeometry, regclass) +FUNCTION asgml(topogeometry, regclass, text) +FUNCTION asgml(topogeometry, text) +FUNCTION asgml(topogeometry, text, integer, integer) +FUNCTION asgml(topogeometry, text, integer, integer, regclass) +FUNCTION asgml(topogeometry, text, integer, integer, regclass, text) +FUNCTION asgml(topogeometry, text, integer, integer, regclass, text, integer) +FUNCTION ashexewkb(geometry) +FUNCTION ashexewkb(geometry, text) +FUNCTION askml(geometry) +FUNCTION askml(geometry, integer) +FUNCTION askml(geometry, integer, integer) +FUNCTION askml(integer, geometry, integer) +FUNCTION assvg(geometry) +FUNCTION assvg(geometry, integer) +FUNCTION assvg(geometry, integer, integer) +FUNCTION astext(geometry) +FUNCTION asukml(geometry) +FUNCTION asukml(geometry, integer) +FUNCTION asukml(geometry, integer, integer) +FUNCTION azimuth(geometry, geometry) +FUNCTION bdmpolyfromtext(text, integer) +FUNCTION bdpolyfromtext(text, integer) +FUNCTION boundary(geometry) +FUNCTION box2d(box3d) +FUNCTION box2d(box3d_extent) +FUNCTION box2d_contain(box2d, box2d) +FUNCTION box2d_contained(box2d, box2d) +FUNCTION box2df_in(cstring) +FUNCTION box2df_out(box2df) +FUNCTION box2d(geometry) +FUNCTION box2d_in(cstring) +FUNCTION box2d_intersects(box2d, box2d) +FUNCTION box2d_left(box2d, box2d) +FUNCTION box2d_out(box2d) +FUNCTION box2d_overlap(box2d, box2d) +FUNCTION box2d_overleft(box2d, box2d) +FUNCTION box2d_overright(box2d, box2d) +FUNCTION box2d(raster) +FUNCTION box2d_right(box2d, box2d) +FUNCTION box2d_same(box2d, box2d) +FUNCTION box3d(box2d) +FUNCTION box3d_extent(box3d_extent) +FUNCTION box3d_extent_in(cstring) +FUNCTION box3d_extent_out(box3d_extent) +FUNCTION box3d(geometry) +FUNCTION box3d_in(cstring) +FUNCTION box3d_out(box3d) +FUNCTION box3d(raster) +FUNCTION box3dtobox(box3d) +FUNCTION box(box3d) +FUNCTION box(geometry) +FUNCTION buffer(geometry, double precision) +FUNCTION buffer(geometry, double precision, integer) +FUNCTION buildarea(geometry) +FUNCTION build_histogram2d(histogram2d, text, text) +FUNCTION build_histogram2d(histogram2d, text, text, text) +FUNCTION bytea(geography) +FUNCTION bytea(geometry) +FUNCTION bytea(raster) +FUNCTION cache_bbox() +FUNCTION centroid(geometry) +FUNCTION checkauth(text, text) +FUNCTION checkauth(text, text, text) +FUNCTION checkauthtrigger() +FUNCTION chip_in(cstring) +FUNCTION chip_out(chip) +FUNCTION collect_garray(geometry[]) +FUNCTION collect(geometry, geometry) +FUNCTION collector(geometry, geometry) +FUNCTION combine_bbox(box2d, geometry) +FUNCTION combine_bbox(box3d_extent, geometry) +FUNCTION combine_bbox(box3d, geometry) +FUNCTION compression(chip) +FUNCTION contains(geometry, geometry) +FUNCTION convexhull(geometry) +FUNCTION copytopology(character varying, character varying) +FUNCTION create_histogram2d(box2d, integer) +FUNCTION createtopogeom(character varying, integer, integer) +FUNCTION createtopogeom(character varying, integer, integer, topoelementarray) +FUNCTION createtopology(character varying) +FUNCTION createtopology(character varying, integer) +FUNCTION createtopology(character varying, integer, double precision) +FUNCTION createtopology(character varying, integer, double precision, boolean) +FUNCTION crosses(geometry, geometry) +FUNCTION datatype(chip) +FUNCTION difference(geometry, geometry) +FUNCTION dimension(geometry) +FUNCTION disablelongtransactions() +FUNCTION disjoint(geometry, geometry) +FUNCTION distance(geometry, geometry) +FUNCTION distance_sphere(geometry, geometry) +FUNCTION distance_spheroid(geometry, geometry, spheroid) +FUNCTION dropbbox(geometry) +FUNCTION dropgeometrycolumn(character varying, character varying) +FUNCTION dropgeometrycolumn(character varying, character varying, character varying) +FUNCTION dropgeometrycolumn(character varying, character varying, character varying, character varying) +FUNCTION dropgeometrytable(character varying) +FUNCTION dropgeometrytable(character varying, character varying) +FUNCTION dropgeometrytable(character varying, character varying, character varying) +FUNCTION _drop_overview_constraint(name, name, name) +FUNCTION dropoverviewconstraints(name, name) +FUNCTION dropoverviewconstraints(name, name, name) +FUNCTION droprastercolumn(character varying, character varying) +FUNCTION droprastercolumn(character varying, character varying, character varying) +FUNCTION droprastercolumn(character varying, character varying, character varying, character varying) +FUNCTION _drop_raster_constraint_alignment(name, name, name) +FUNCTION _drop_raster_constraint_blocksize(name, name, name, text) +FUNCTION _drop_raster_constraint_extent(name, name, name) +FUNCTION _drop_raster_constraint(name, name, name) +FUNCTION _drop_raster_constraint_nodata_values(name, name, name) +FUNCTION _drop_raster_constraint_num_bands(name, name, name) +FUNCTION _drop_raster_constraint_out_db(name, name, name) +FUNCTION _drop_raster_constraint_pixel_types(name, name, name) +FUNCTION _drop_raster_constraint_regular_blocking(name, name, name) +FUNCTION _drop_raster_constraint_scale(name, name, name, character) +FUNCTION droprasterconstraints(name, name, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean) +FUNCTION droprasterconstraints(name, name, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean) +FUNCTION droprasterconstraints(name, name, name, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean) +FUNCTION droprasterconstraints(name, name, name, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean) +FUNCTION droprasterconstraints(name, name, name, text[]) +FUNCTION droprasterconstraints(name, name, text[]) +FUNCTION _drop_raster_constraint_srid(name, name, name) +FUNCTION droprastertable(character varying) +FUNCTION droprastertable(character varying, character varying) +FUNCTION droprastertable(character varying, character varying, character varying) +FUNCTION droptopogeometrycolumn(character varying, character varying, character varying) +FUNCTION droptopology(character varying) +FUNCTION dumpaswktpolygons(raster, integer) +FUNCTION dump(geometry) +FUNCTION dumprings(geometry) +FUNCTION enablelongtransactions() +FUNCTION endpoint(geometry) +FUNCTION envelope(geometry) +FUNCTION envelope(topogeometry) +FUNCTION equals(geometry, geometry) +FUNCTION equals(topogeometry, topogeometry) +FUNCTION estimated_extent(text, text) +FUNCTION estimated_extent(text, text, text) +FUNCTION estimate_histogram2d(histogram2d, box2d) +FUNCTION expand(box2d, double precision) +FUNCTION expand(box3d, double precision) +FUNCTION expand(geometry, double precision) +FUNCTION explode_histogram2d(histogram2d, text) +FUNCTION exteriorring(geometry) +FUNCTION factor(chip) +FUNCTION find_extent(text, text) +FUNCTION find_extent(text, text, text) +FUNCTION find_srid(character varying, character varying, character varying) +FUNCTION fix_geometry_columns() +FUNCTION force_2d(geometry) +FUNCTION force_3d(geometry) +FUNCTION force_3dm(geometry) +FUNCTION force_3dz(geometry) +FUNCTION force_4d(geometry) +FUNCTION force_collection(geometry) +FUNCTION forcerhr(geometry) +FUNCTION geography_analyze(internal) +FUNCTION geography(bytea) +FUNCTION geography_cmp(geography, geography) +FUNCTION geography_eq(geography, geography) +FUNCTION geography_ge(geography, geography) +FUNCTION geography(geography, integer, boolean) +FUNCTION geography(geometry) +FUNCTION geography_gist_compress(internal) +FUNCTION geography_gist_consistent(internal, geography, integer) +FUNCTION geography_gist_consistent(internal, geometry, integer) +FUNCTION geography_gist_decompress(internal) +FUNCTION geography_gist_join_selectivity(internal, oid, internal, smallint) +FUNCTION geography_gist_penalty(internal, internal, internal) +FUNCTION geography_gist_picksplit(internal, internal) +FUNCTION geography_gist_same(box2d, box2d, internal) +FUNCTION geography_gist_selectivity(internal, oid, internal, integer) +FUNCTION geography_gist_union(bytea, internal) +FUNCTION geography_gt(geography, geography) +FUNCTION geography_in(cstring, oid, integer) +FUNCTION geography_le(geography, geography) +FUNCTION geography_lt(geography, geography) +FUNCTION geography_out(geography) +FUNCTION geography_overlaps(geography, geography) +FUNCTION geography_recv(internal, oid, integer) +FUNCTION geography_send(geography) +FUNCTION geography_typmod_dims(integer) +FUNCTION geography_typmod_in(cstring[]) +FUNCTION geography_typmod_out(integer) +FUNCTION geography_typmod_srid(integer) +FUNCTION geography_typmod_type(integer) +FUNCTION geom_accum(geometry[], geometry) +FUNCTION geomcollfromtext(text) +FUNCTION geomcollfromtext(text, integer) +FUNCTION geomcollfromwkb(bytea) +FUNCTION geomcollfromwkb(bytea, integer) +FUNCTION geometry_above(geometry, geometry) +FUNCTION geometry_analyze(internal) +FUNCTION geometry_below(geometry, geometry) +FUNCTION geometry(box2d) +FUNCTION geometry(box3d) +FUNCTION geometry(box3d_extent) +FUNCTION geometry(bytea) +FUNCTION geometry(chip) +FUNCTION geometry_cmp(geometry, geometry) +FUNCTION geometry_contained(geometry, geometry) +FUNCTION geometry_contain(geometry, geometry) +FUNCTION geometry_contains(geometry, geometry) +FUNCTION geometry_distance_box(geometry, geometry) +FUNCTION geometry_distance_centroid(geometry, geometry) +FUNCTION geometry_eq(geometry, geometry) +FUNCTION geometryfromtext(text) +FUNCTION geometryfromtext(text, integer) +FUNCTION geometry_ge(geometry, geometry) +FUNCTION geometry(geography) +FUNCTION geometry(geometry, integer, boolean) +FUNCTION geometry_gist_compress_2d(internal) +FUNCTION geometry_gist_compress_nd(internal) +FUNCTION geometry_gist_consistent_2d(internal, geometry, integer) +FUNCTION geometry_gist_consistent_nd(internal, geometry, integer) +FUNCTION geometry_gist_decompress_2d(internal) +FUNCTION geometry_gist_decompress_nd(internal) +FUNCTION geometry_gist_distance_2d(internal, geometry, integer) +FUNCTION geometry_gist_joinsel_2d(internal, oid, internal, smallint) +FUNCTION geometry_gist_joinsel(internal, oid, internal, smallint) +FUNCTION geometry_gist_penalty_2d(internal, internal, internal) +FUNCTION geometry_gist_penalty_nd(internal, internal, internal) +FUNCTION geometry_gist_picksplit_2d(internal, internal) +FUNCTION geometry_gist_picksplit_nd(internal, internal) +FUNCTION geometry_gist_same_2d(geometry, geometry, internal) +FUNCTION geometry_gist_same_nd(geometry, geometry, internal) +FUNCTION geometry_gist_sel_2d(internal, oid, internal, integer) +FUNCTION geometry_gist_sel(internal, oid, internal, integer) +FUNCTION geometry_gist_union_2d(bytea, internal) +FUNCTION geometry_gist_union_nd(bytea, internal) +FUNCTION geometry_gt(geometry, geometry) +FUNCTION geometry_in(cstring) +FUNCTION geometry_left(geometry, geometry) +FUNCTION geometry_le(geometry, geometry) +FUNCTION geometry_lt(geometry, geometry) +FUNCTION geometryn(geometry, integer) +FUNCTION geometry_out(geometry) +FUNCTION geometry_overabove(geometry, geometry) +FUNCTION geometry_overbelow(geometry, geometry) +FUNCTION geometry_overlap(geometry, geometry) +FUNCTION geometry_overlaps(geometry, geometry) +FUNCTION geometry_overlaps_nd(geometry, geometry) +FUNCTION geometry_overleft(geometry, geometry) +FUNCTION geometry_overright(geometry, geometry) +FUNCTION geometry_raster_contain(geometry, raster) +FUNCTION geometry_raster_overlap(geometry, raster) +FUNCTION geometry_recv(internal) +FUNCTION geometry_right(geometry, geometry) +FUNCTION geometry_samebox(geometry, geometry) +FUNCTION geometry_same(geometry, geometry) +FUNCTION geometry_send(geometry) +FUNCTION geometry(text) +FUNCTION geometry(topogeometry) +FUNCTION geometrytype(geography) +FUNCTION geometrytype(geometry) +FUNCTION geometrytype(topogeometry) +FUNCTION geometry_typmod_in(cstring[]) +FUNCTION geometry_typmod_out(integer) +FUNCTION geometry_within(geometry, geometry) +FUNCTION geomfromewkb(bytea) +FUNCTION geomfromewkt(text) +FUNCTION geomfromtext(text) +FUNCTION geomfromtext(text, integer) +FUNCTION geomfromwkb(bytea) +FUNCTION geomfromwkb(bytea, integer) +FUNCTION geomunion(geometry, geometry) +FUNCTION geosnoop(geometry) +FUNCTION getbbox(geometry) +FUNCTION getedgebypoint(character varying, public.geometry, double precision) +FUNCTION getfacebypoint(character varying, public.geometry, double precision) +FUNCTION getnodebypoint(character varying, public.geometry, double precision) +FUNCTION get_proj4_from_srid(integer) +FUNCTION getringedges(character varying, integer, integer) +FUNCTION getsrid(geometry) +FUNCTION gettopogeomelementarray(character varying, integer, integer) +FUNCTION gettopogeomelementarray(topogeometry) +FUNCTION gettopogeomelements(character varying, integer, integer) +FUNCTION gettopogeomelements(topogeometry) +FUNCTION gettopologyid(character varying) +FUNCTION gettopologyname(integer) +FUNCTION gettransactionid() +FUNCTION gidx_in(cstring) +FUNCTION gidx_out(gidx) +FUNCTION hasbbox(geometry) +FUNCTION height(chip) +FUNCTION histogram2d_in(cstring) +FUNCTION histogram2d_out(histogram2d) +FUNCTION interiorringn(geometry, integer) +FUNCTION intersection(geometry, geometry) +FUNCTION intersects(geometry, geometry) +FUNCTION intersects(topogeometry, topogeometry) +FUNCTION isclosed(geometry) +FUNCTION isempty(geometry) +FUNCTION isring(geometry) +FUNCTION issimple(geometry) +FUNCTION isvalid(geometry) +FUNCTION jtsnoop(geometry) +FUNCTION layertrigger() +FUNCTION length2d(geometry) +FUNCTION length2d_spheroid(geometry, spheroid) +FUNCTION length3d(geometry) +FUNCTION length3d_spheroid(geometry, spheroid) +FUNCTION length(geometry) +FUNCTION length_spheroid(geometry, spheroid) +FUNCTION linefrommultipoint(geometry) +FUNCTION linefromtext(text) +FUNCTION linefromtext(text, integer) +FUNCTION linefromwkb(bytea) +FUNCTION linefromwkb(bytea, integer) +FUNCTION line_interpolate_point(geometry, double precision) +FUNCTION line_locate_point(geometry, geometry) +FUNCTION linemerge(geometry) +FUNCTION linestringfromtext(text) +FUNCTION linestringfromtext(text, integer) +FUNCTION linestringfromwkb(bytea) +FUNCTION linestringfromwkb(bytea, integer) +FUNCTION line_substring(geometry, double precision, double precision) +FUNCTION locate_along_measure(geometry, double precision) +FUNCTION locate_between_measures(geometry, double precision, double precision) +FUNCTION lockrow(text, text, text) +FUNCTION lockrow(text, text, text, text) +FUNCTION lockrow(text, text, text, text, timestamp without time zone) +FUNCTION lockrow(text, text, text, timestamp without time zone) +FUNCTION longtransactionsenabled() +FUNCTION lwgeom_gist_compress(internal) +FUNCTION lwgeom_gist_consistent(internal, geometry, integer) +FUNCTION lwgeom_gist_decompress(internal) +FUNCTION lwgeom_gist_penalty(internal, internal, internal) +FUNCTION lwgeom_gist_picksplit(internal, internal) +FUNCTION lwgeom_gist_same(box2d, box2d, internal) +FUNCTION lwgeom_gist_union(bytea, internal) +FUNCTION makebox2d(geometry, geometry) +FUNCTION makebox3d(geometry, geometry) +FUNCTION makeline_garray(geometry[]) +FUNCTION makeline(geometry, geometry) +FUNCTION makepoint(double precision, double precision) +FUNCTION makepoint(double precision, double precision, double precision) +FUNCTION makepoint(double precision, double precision, double precision, double precision) +FUNCTION makepointm(double precision, double precision, double precision) +FUNCTION makepolygon(geometry) +FUNCTION makepolygon(geometry, geometry[]) +FUNCTION mapalgebra4unionfinal1(rastexpr) +FUNCTION mapalgebra4unionfinal3(rastexpr) +FUNCTION mapalgebra4unionstate(raster, raster, text, text, text, double precision, text, text, text, double precision) +FUNCTION mapalgebra4unionstate(rastexpr, raster) +FUNCTION mapalgebra4unionstate(rastexpr, raster, text) +FUNCTION mapalgebra4unionstate(rastexpr, raster, text, text) +FUNCTION mapalgebra4unionstate(rastexpr, raster, text, text, text) +FUNCTION mapalgebra4unionstate(rastexpr, raster, text, text, text, double precision) +FUNCTION mapalgebra4unionstate(rastexpr, raster, text, text, text, double precision, text, text, text, double precision) +FUNCTION mapalgebra4unionstate(rastexpr, raster, text, text, text, double precision, text, text, text, double precision, text, text, text, double precision) +FUNCTION max_distance(geometry, geometry) +FUNCTION mem_size(geometry) +FUNCTION m(geometry) +FUNCTION mlinefromtext(text) +FUNCTION mlinefromtext(text, integer) +FUNCTION mlinefromwkb(bytea) +FUNCTION mlinefromwkb(bytea, integer) +FUNCTION mpointfromtext(text) +FUNCTION mpointfromtext(text, integer) +FUNCTION mpointfromwkb(bytea) +FUNCTION mpointfromwkb(bytea, integer) +FUNCTION mpolyfromtext(text) +FUNCTION mpolyfromtext(text, integer) +FUNCTION mpolyfromwkb(bytea) +FUNCTION mpolyfromwkb(bytea, integer) +FUNCTION multi(geometry) +FUNCTION multilinefromwkb(bytea) +FUNCTION multilinefromwkb(bytea, integer) +FUNCTION multilinestringfromtext(text) +FUNCTION multilinestringfromtext(text, integer) +FUNCTION multipointfromtext(text) +FUNCTION multipointfromtext(text, integer) +FUNCTION multipointfromwkb(bytea) +FUNCTION multipointfromwkb(bytea, integer) +FUNCTION multipolyfromwkb(bytea) +FUNCTION multipolyfromwkb(bytea, integer) +FUNCTION multipolygonfromtext(text) +FUNCTION multipolygonfromtext(text, integer) +FUNCTION ndims(geometry) +FUNCTION noop(geometry) +FUNCTION npoints(geometry) +FUNCTION nrings(geometry) +FUNCTION numgeometries(geometry) +FUNCTION numinteriorring(geometry) +FUNCTION numinteriorrings(geometry) +FUNCTION numpoints(geometry) +FUNCTION overlaps(geometry, geometry) +FUNCTION _overview_constraint_info(name, name, name) +FUNCTION _overview_constraint(raster, integer, name, name, name) +FUNCTION perimeter2d(geometry) +FUNCTION perimeter3d(geometry) +FUNCTION perimeter(geometry) +FUNCTION pgis_abs_in(cstring) +FUNCTION pgis_abs_out(pgis_abs) +FUNCTION pgis_geometry_accum_finalfn(pgis_abs) +FUNCTION pgis_geometry_accum_transfn(pgis_abs, geometry) +FUNCTION pgis_geometry_collect_finalfn(pgis_abs) +FUNCTION pgis_geometry_makeline_finalfn(pgis_abs) +FUNCTION pgis_geometry_polygonize_finalfn(pgis_abs) +FUNCTION pgis_geometry_union_finalfn(pgis_abs) +FUNCTION pointfromtext(text) +FUNCTION pointfromtext(text, integer) +FUNCTION pointfromwkb(bytea) +FUNCTION pointfromwkb(bytea, integer) +FUNCTION point_inside_circle(geometry, double precision, double precision, double precision) +FUNCTION pointn(geometry, integer) +FUNCTION pointonsurface(geometry) +FUNCTION polyfromtext(text) +FUNCTION polyfromtext(text, integer) +FUNCTION polyfromwkb(bytea) +FUNCTION polyfromwkb(bytea, integer) +FUNCTION polygonfromtext(text) +FUNCTION polygonfromtext(text, integer) +FUNCTION polygonfromwkb(bytea) +FUNCTION polygonfromwkb(bytea, integer) +FUNCTION polygonize(character varying) +FUNCTION polygonize_garray(geometry[]) +FUNCTION populate_geometry_columns() +FUNCTION populate_geometry_columns(boolean) +FUNCTION populate_geometry_columns(oid) +FUNCTION populate_geometry_columns(oid, boolean) +FUNCTION postgis_addbbox(geometry) +FUNCTION postgis_cache_bbox() +FUNCTION postgis_constraint_dims(text, text, text) +FUNCTION postgis_constraint_srid(text, text, text) +FUNCTION postgis_constraint_type(text, text, text) +FUNCTION postgis_dropbbox(geometry) +FUNCTION postgis_full_version() +FUNCTION postgis_gdal_version() +FUNCTION postgis_geos_version() +FUNCTION postgis_getbbox(geometry) +FUNCTION postgis_gist_joinsel(internal, oid, internal, smallint) +FUNCTION postgis_gist_sel(internal, oid, internal, integer) +FUNCTION postgis_hasbbox(geometry) +FUNCTION postgis_jts_version() +FUNCTION postgis_lib_build_date() +FUNCTION postgis_lib_version() +FUNCTION postgis_libxml_version() +FUNCTION postgis_noop(geometry) +FUNCTION postgis_proj_version() +FUNCTION postgis_raster_lib_build_date() +FUNCTION postgis_raster_lib_version() +FUNCTION postgis_raster_scripts_installed() +FUNCTION postgis_scripts_build_date() +FUNCTION postgis_scripts_installed() +FUNCTION postgis_scripts_released() +FUNCTION postgis_topology_scripts_installed() +FUNCTION postgis_transform_geometry(geometry, text, text, integer) +FUNCTION postgis_type_name(character varying, integer, boolean) +FUNCTION postgis_typmod_dims(integer) +FUNCTION postgis_typmod_srid(integer) +FUNCTION postgis_typmod_type(integer) +FUNCTION postgis_uses_stats() +FUNCTION postgis_version() +FUNCTION probe_geometry_columns() +FUNCTION raster_above(raster, raster) +FUNCTION raster_below(raster, raster) +FUNCTION _raster_constraint_info_alignment(name, name, name) +FUNCTION _raster_constraint_info_blocksize(name, name, name, text) +FUNCTION _raster_constraint_info_extent(name, name, name) +FUNCTION _raster_constraint_info_nodata_values(name, name, name) +FUNCTION _raster_constraint_info_num_bands(name, name, name) +FUNCTION _raster_constraint_info_out_db(name, name, name) +FUNCTION _raster_constraint_info_pixel_types(name, name, name) +FUNCTION _raster_constraint_info_regular_blocking(name, name, name) +FUNCTION _raster_constraint_info_scale(name, name, name, character) +FUNCTION _raster_constraint_info_srid(name, name, name) +FUNCTION _raster_constraint_nodata_values(raster) +FUNCTION _raster_constraint_out_db(raster) +FUNCTION _raster_constraint_pixel_types(raster) +FUNCTION raster_contained(raster, raster) +FUNCTION raster_contain(raster, raster) +FUNCTION raster_geometry_contain(raster, geometry) +FUNCTION raster_geometry_overlap(raster, geometry) +FUNCTION raster_in(cstring) +FUNCTION raster_left(raster, raster) +FUNCTION raster_out(raster) +FUNCTION raster_overabove(raster, raster) +FUNCTION raster_overbelow(raster, raster) +FUNCTION raster_overlap(raster, raster) +FUNCTION raster_overleft(raster, raster) +FUNCTION raster_overright(raster, raster) +FUNCTION raster_right(raster, raster) +FUNCTION raster_same(raster, raster) +FUNCTION relate(geometry, geometry) +FUNCTION relate(geometry, geometry, text) +FUNCTION relationtrigger() +FUNCTION removepoint(geometry, integer) +FUNCTION rename_geometry_table_constraints() +FUNCTION reverse(geometry) +FUNCTION rotate(geometry, double precision) +FUNCTION rotatex(geometry, double precision) +FUNCTION rotatey(geometry, double precision) +FUNCTION rotatez(geometry, double precision) +FUNCTION scale(geometry, double precision, double precision) +FUNCTION scale(geometry, double precision, double precision, double precision) +FUNCTION se_envelopesintersect(geometry, geometry) +FUNCTION segmentize(geometry, double precision) +FUNCTION se_is3d(geometry) +FUNCTION se_ismeasured(geometry) +FUNCTION se_locatealong(geometry, double precision) +FUNCTION se_locatebetween(geometry, double precision, double precision) +FUNCTION se_m(geometry) +FUNCTION setfactor(chip, real) +FUNCTION setpoint(geometry, integer, geometry) +FUNCTION setsrid(chip, integer) +FUNCTION setsrid(geometry, integer) +FUNCTION se_z(geometry) +FUNCTION shift_longitude(geometry) +FUNCTION simplify(geometry, double precision) +FUNCTION snaptogrid(geometry, double precision) +FUNCTION snaptogrid(geometry, double precision, double precision) +FUNCTION snaptogrid(geometry, double precision, double precision, double precision, double precision) +FUNCTION snaptogrid(geometry, geometry, double precision, double precision, double precision, double precision) +FUNCTION spheroid_in(cstring) +FUNCTION spheroid_out(spheroid) +FUNCTION srid(chip) +FUNCTION srid(geometry) +FUNCTION st_3dclosestpoint(geometry, geometry) +FUNCTION _st_3ddfullywithin(geometry, geometry, double precision) +FUNCTION st_3ddfullywithin(geometry, geometry, double precision) +FUNCTION st_3ddistance(geometry, geometry) +FUNCTION _st_3ddwithin(geometry, geometry, double precision) +FUNCTION st_3ddwithin(geometry, geometry, double precision) +FUNCTION st_3dintersects(geometry, geometry) +FUNCTION st_3dlength(geometry) +FUNCTION st_3dlength_spheroid(geometry, spheroid) +FUNCTION st_3dlongestline(geometry, geometry) +FUNCTION st_3dmakebox(geometry, geometry) +FUNCTION ST_3DMakeBox(geometry, geometry) +FUNCTION st_3dmaxdistance(geometry, geometry) +FUNCTION st_3dperimeter(geometry) +FUNCTION ST_3DPerimeter(geometry) +FUNCTION st_3dshortestline(geometry, geometry) +FUNCTION st_above(raster, raster) +FUNCTION st_addband(raster, integer, text) +FUNCTION st_addband(raster, integer, text, double precision) +FUNCTION st_addband(raster, integer, text, double precision, double precision) +FUNCTION st_addband(raster, raster) +FUNCTION st_addband(raster, raster, integer) +FUNCTION st_addband(raster, raster[], integer) +FUNCTION st_addband(raster, raster, integer, integer) +FUNCTION st_addband(raster, text) +FUNCTION st_addband(raster, text, double precision) +FUNCTION st_addband(raster, text, double precision, double precision) +FUNCTION st_addbbox(geometry) +FUNCTION st_addedgemodface(character varying, integer, integer, public.geometry) +FUNCTION st_addedgenewfaces(character varying, integer, integer, public.geometry) +FUNCTION st_addisoedge(character varying, integer, integer, public.geometry) +FUNCTION st_addisonode(character varying, integer, public.geometry) +FUNCTION st_addmeasure(geometry, double precision, double precision) +FUNCTION st_addpoint(geometry, geometry) +FUNCTION st_addpoint(geometry, geometry, integer) +FUNCTION st_affine(geometry, double precision, double precision, double precision, double precision, double precision, double precision) +FUNCTION st_affine(geometry, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision) +FUNCTION st_approxcount(raster, boolean, double precision) +FUNCTION st_approxcount(raster, double precision) +FUNCTION st_approxcount(raster, integer, boolean, double precision) +FUNCTION st_approxcount(raster, integer, double precision) +FUNCTION st_approxcount(text, text, boolean, double precision) +FUNCTION st_approxcount(text, text, double precision) +FUNCTION st_approxcount(text, text, integer, boolean, double precision) +FUNCTION st_approxcount(text, text, integer, double precision) +FUNCTION st_approxhistogram(raster, double precision) +FUNCTION st_approxhistogram(raster, integer, boolean, double precision, integer, boolean) +FUNCTION st_approxhistogram(raster, integer, boolean, double precision, integer, double precision[], boolean) +FUNCTION st_approxhistogram(raster, integer, double precision) +FUNCTION st_approxhistogram(raster, integer, double precision, integer, boolean) +FUNCTION st_approxhistogram(raster, integer, double precision, integer, double precision[], boolean) +FUNCTION st_approxhistogram(text, text, double precision) +FUNCTION st_approxhistogram(text, text, integer, boolean, double precision, integer, boolean) +FUNCTION st_approxhistogram(text, text, integer, boolean, double precision, integer, double precision[], boolean) +FUNCTION st_approxhistogram(text, text, integer, double precision) +FUNCTION st_approxhistogram(text, text, integer, double precision, integer, boolean) +FUNCTION st_approxhistogram(text, text, integer, double precision, integer, double precision[], boolean) +FUNCTION st_approxquantile(raster, boolean, double precision) +FUNCTION st_approxquantile(raster, double precision) +FUNCTION st_approxquantile(raster, double precision[]) +FUNCTION st_approxquantile(raster, double precision, double precision) +FUNCTION st_approxquantile(raster, double precision, double precision[]) +FUNCTION st_approxquantile(raster, integer, boolean, double precision, double precision) +FUNCTION st_approxquantile(raster, integer, boolean, double precision, double precision[]) +FUNCTION st_approxquantile(raster, integer, double precision, double precision) +FUNCTION st_approxquantile(raster, integer, double precision, double precision[]) +FUNCTION st_approxquantile(text, text, boolean, double precision) +FUNCTION st_approxquantile(text, text, double precision) +FUNCTION st_approxquantile(text, text, double precision[]) +FUNCTION st_approxquantile(text, text, double precision, double precision) +FUNCTION st_approxquantile(text, text, double precision, double precision[]) +FUNCTION st_approxquantile(text, text, integer, boolean, double precision, double precision) +FUNCTION st_approxquantile(text, text, integer, boolean, double precision, double precision[]) +FUNCTION st_approxquantile(text, text, integer, double precision, double precision) +FUNCTION st_approxquantile(text, text, integer, double precision, double precision[]) +FUNCTION st_approxsummarystats(raster, boolean, double precision) +FUNCTION st_approxsummarystats(raster, double precision) +FUNCTION st_approxsummarystats(raster, integer, boolean, double precision) +FUNCTION st_approxsummarystats(raster, integer, double precision) +FUNCTION st_approxsummarystats(text, text, boolean) +FUNCTION st_approxsummarystats(text, text, double precision) +FUNCTION st_approxsummarystats(text, text, integer, boolean, double precision) +FUNCTION st_approxsummarystats(text, text, integer, double precision) +FUNCTION st_area2d(geometry) +FUNCTION st_area(geography, boolean) +FUNCTION st_area(geometry) +FUNCTION st_area(text) +FUNCTION startpoint(geometry) +FUNCTION st_asbinary(geography) +FUNCTION st_asbinary(geography, text) +FUNCTION st_asbinary(geometry) +FUNCTION st_asbinary(geometry, text) +FUNCTION st_asbinary(raster) +FUNCTION st_asbinary(text) +FUNCTION st_asewkb(geometry) +FUNCTION st_asewkb(geometry, text) +FUNCTION st_asewkt(geography) +FUNCTION st_asewkt(geometry) +FUNCTION st_asgdalraster(raster, text, text[], integer) +FUNCTION st_asgeojson(geography) +FUNCTION st_asgeojson(geography, integer) +FUNCTION st_asgeojson(geography, integer, integer) +FUNCTION st_asgeojson(geometry) +FUNCTION st_asgeojson(geometry, integer) +FUNCTION st_asgeojson(geometry, integer, integer) +FUNCTION st_asgeojson(integer, geography) +FUNCTION st_asgeojson(integer, geography, integer) +FUNCTION _st_asgeojson(integer, geography, integer, integer) +FUNCTION st_asgeojson(integer, geography, integer, integer) +FUNCTION st_asgeojson(integer, geometry) +FUNCTION st_asgeojson(integer, geometry, integer) +FUNCTION _st_asgeojson(integer, geometry, integer, integer) +FUNCTION st_asgeojson(integer, geometry, integer, integer) +FUNCTION st_asgeojson(text) +FUNCTION st_asgml(geography) +FUNCTION st_asgml(geography, integer) +FUNCTION st_asgml(geography, integer, integer) +FUNCTION st_asgml(geometry) +FUNCTION st_asgml(geometry, integer) +FUNCTION st_asgml(geometry, integer, integer) +FUNCTION st_asgml(integer, geography) +FUNCTION st_asgml(integer, geography, integer) +FUNCTION _st_asgml(integer, geography, integer, integer) +FUNCTION st_asgml(integer, geography, integer, integer) +FUNCTION _st_asgml(integer, geography, integer, integer, text) +FUNCTION st_asgml(integer, geography, integer, integer, text) +FUNCTION st_asgml(integer, geometry) +FUNCTION _st_asgml(integer, geometry, integer) +FUNCTION st_asgml(integer, geometry, integer) +FUNCTION _st_asgml(integer, geometry, integer, integer) +FUNCTION st_asgml(integer, geometry, integer, integer) +FUNCTION _st_asgml(integer, geometry, integer, integer, text) +FUNCTION st_asgml(integer, geometry, integer, integer, text) +FUNCTION st_asgml(text) +FUNCTION st_ashexewkb(geometry) +FUNCTION st_ashexewkb(geometry, text) +FUNCTION st_asjpeg(raster, integer, integer) +FUNCTION st_asjpeg(raster, integer[], integer) +FUNCTION st_asjpeg(raster, integer, text[]) +FUNCTION st_asjpeg(raster, integer[], text[]) +FUNCTION st_asjpeg(raster, text[]) +FUNCTION st_askml(geography) +FUNCTION st_askml(geography, integer) +FUNCTION st_askml(geometry) +FUNCTION st_askml(geometry, integer) +FUNCTION st_askml(integer, geography) +FUNCTION _st_askml(integer, geography, integer) +FUNCTION st_askml(integer, geography, integer) +FUNCTION _st_askml(integer, geography, integer, text) +FUNCTION st_askml(integer, geography, integer, text) +FUNCTION st_askml(integer, geometry) +FUNCTION _st_askml(integer, geometry, integer) +FUNCTION st_askml(integer, geometry, integer) +FUNCTION _st_askml(integer, geometry, integer, text) +FUNCTION st_askml(integer, geometry, integer, text) +FUNCTION st_askml(text) +FUNCTION st_aslatlontext(geometry) +FUNCTION st_aslatlontext(geometry, text) +FUNCTION _st_aspect4ma(double precision[], text, text[]) +FUNCTION st_aspect(raster, integer, text) +FUNCTION st_aspng(raster, integer, integer) +FUNCTION st_aspng(raster, integer[], integer) +FUNCTION st_aspng(raster, integer, text[]) +FUNCTION st_aspng(raster, integer[], text[]) +FUNCTION st_aspng(raster, text[]) +FUNCTION st_asraster(geometry, double precision, double precision, double precision, double precision, text, double precision, double precision, double precision, double precision, boolean) +FUNCTION st_asraster(geometry, double precision, double precision, double precision, double precision, text[], double precision[], double precision[], double precision, double precision, boolean) +FUNCTION _st_asraster(geometry, double precision, double precision, integer, integer, text[], double precision[], double precision[], double precision, double precision, double precision, double precision, double precision, double precision, boolean) +FUNCTION st_asraster(geometry, double precision, double precision, text, double precision, double precision, double precision, double precision, double precision, double precision, boolean) +FUNCTION st_asraster(geometry, double precision, double precision, text[], double precision[], double precision[], double precision, double precision, double precision, double precision, boolean) +FUNCTION st_asraster(geometry, integer, integer, double precision, double precision, text, double precision, double precision, double precision, double precision, boolean) +FUNCTION st_asraster(geometry, integer, integer, double precision, double precision, text[], double precision[], double precision[], double precision, double precision, boolean) +FUNCTION st_asraster(geometry, integer, integer, text, double precision, double precision, double precision, double precision, double precision, double precision, boolean) +FUNCTION st_asraster(geometry, integer, integer, text[], double precision[], double precision[], double precision, double precision, double precision, double precision, boolean) +FUNCTION st_asraster(geometry, raster, text, double precision, double precision, boolean) +FUNCTION st_asraster(geometry, raster, text[], double precision[], double precision[], boolean) +FUNCTION st_assvg(geography) +FUNCTION st_assvg(geography, integer) +FUNCTION st_assvg(geography, integer, integer) +FUNCTION st_assvg(geometry) +FUNCTION st_assvg(geometry, integer) +FUNCTION st_assvg(geometry, integer, integer) +FUNCTION st_assvg(text) +FUNCTION st_astext(geography) +FUNCTION st_astext(geometry) +FUNCTION st_astext(text) +FUNCTION st_astiff(raster, integer[], text, integer) +FUNCTION st_astiff(raster, integer[], text[], integer) +FUNCTION st_astiff(raster, text, integer) +FUNCTION st_astiff(raster, text[], integer) +FUNCTION st_asx3d(geometry, integer) +FUNCTION st_asx3d(geometry, integer, integer) +FUNCTION _st_asx3d(integer, geometry, integer, integer, text) +FUNCTION st_azimuth(geography, geography) +FUNCTION st_azimuth(geometry, geometry) +FUNCTION st_bandisnodata(raster) +FUNCTION st_bandisnodata(raster, boolean) +FUNCTION st_bandisnodata(raster, integer) +FUNCTION st_bandisnodata(raster, integer, boolean) +FUNCTION st_bandmetadata(raster) +FUNCTION st_bandmetadata(raster, integer) +FUNCTION st_bandmetadata(raster, integer[]) +FUNCTION st_bandnodatavalue(raster) +FUNCTION st_bandnodatavalue(raster, integer) +FUNCTION st_bandpath(raster) +FUNCTION st_bandpath(raster, integer) +FUNCTION st_bandpixeltype(raster) +FUNCTION st_bandpixeltype(raster, integer) +FUNCTION st_band(raster, integer) +FUNCTION st_band(raster, integer[]) +FUNCTION st_band(raster, text, character) +FUNCTION st_bdmpolyfromtext(text, integer) +FUNCTION st_bdpolyfromtext(text, integer) +FUNCTION st_below(raster, raster) +FUNCTION _st_bestsrid(geography) +FUNCTION _st_bestsrid(geography, geography) +FUNCTION st_boundary(geometry) +FUNCTION st_box2d(box3d) +FUNCTION st_box2d(box3d_extent) +FUNCTION st_box2d_contain(box2d, box2d) +FUNCTION st_box2d_contained(box2d, box2d) +FUNCTION st_box2d(geometry) +FUNCTION st_box2d_in(cstring) +FUNCTION st_box2d_intersects(box2d, box2d) +FUNCTION st_box2d_left(box2d, box2d) +FUNCTION st_box2d_out(box2d) +FUNCTION st_box2d_overlap(box2d, box2d) +FUNCTION st_box2d_overleft(box2d, box2d) +FUNCTION st_box2d_overright(box2d, box2d) +FUNCTION st_box2d_right(box2d, box2d) +FUNCTION st_box2d_same(box2d, box2d) +FUNCTION st_box3d(box2d) +FUNCTION st_box3d_extent(box3d_extent) +FUNCTION st_box3d(geometry) +FUNCTION st_box3d_in(cstring) +FUNCTION st_box3d_out(box3d) +FUNCTION st_box(box3d) +FUNCTION st_box(geometry) +FUNCTION st_buffer(geography, double precision) +FUNCTION st_buffer(geometry, double precision) +FUNCTION _st_buffer(geometry, double precision, cstring) +FUNCTION st_buffer(geometry, double precision, integer) +FUNCTION st_buffer(geometry, double precision, text) +FUNCTION st_buffer(text, double precision) +FUNCTION st_buildarea(geometry) +FUNCTION st_build_histogram2d(histogram2d, text, text) +FUNCTION st_build_histogram2d(histogram2d, text, text, text) +FUNCTION st_bytea(geometry) +FUNCTION st_bytea(raster) +FUNCTION st_cache_bbox() +FUNCTION st_centroid(geometry) +FUNCTION _st_changeedgegeom_adjacent_edges(character varying, integer, integer) +FUNCTION st_changeedgegeom(character varying, integer, public.geometry) +FUNCTION st_chip_in(cstring) +FUNCTION st_chip_out(chip) +FUNCTION st_cleangeometry(geometry) +FUNCTION st_clip(raster, geometry, boolean) +FUNCTION st_clip(raster, geometry, double precision, boolean) +FUNCTION st_clip(raster, geometry, double precision[], boolean) +FUNCTION st_clip(raster, integer, geometry, boolean) +FUNCTION st_clip(raster, integer, geometry, double precision, boolean) +FUNCTION st_clip(raster, integer, geometry, double precision[], boolean) +FUNCTION st_closestpoint(geometry, geometry) +FUNCTION st_collect_garray(geometry[]) +FUNCTION st_collect(geometry[]) +FUNCTION st_collect(geometry, geometry) +FUNCTION st_collectionextract(geometry, integer) +FUNCTION st_collectionhomogenize(geometry) +FUNCTION st_collector(geometry, geometry) +FUNCTION st_combine_bbox(box2d, geometry) +FUNCTION st_combine_bbox(box3d_extent, geometry) +FUNCTION st_combine_bbox(box3d, geometry) +FUNCTION st_compression(chip) +FUNCTION _st_concavehull(geometry) +FUNCTION st_concavehull(geometry, double precision, boolean) +FUNCTION _st_concvehull(geometry) +FUNCTION st_contained(raster, raster) +FUNCTION st_contain(raster, raster) +FUNCTION _st_contains(geometry, geometry) +FUNCTION st_contains(geometry, geometry) +FUNCTION _st_containsproperly(geometry, geometry) +FUNCTION st_containsproperly(geometry, geometry) +FUNCTION st_convexhull(geometry) +FUNCTION st_convexhull(raster) +FUNCTION st_coorddim(geometry) +FUNCTION st_count(raster, boolean) +FUNCTION st_count(raster, integer, boolean) +FUNCTION _st_count(raster, integer, boolean, double precision) +FUNCTION st_count(text, text, boolean) +FUNCTION st_count(text, text, integer, boolean) +FUNCTION _st_count(text, text, integer, boolean, double precision) +FUNCTION st_coveredby(geography, geography) +FUNCTION _st_coveredby(geometry, geometry) +FUNCTION st_coveredby(geometry, geometry) +FUNCTION st_coveredby(text, text) +FUNCTION _st_covers(geography, geography) +FUNCTION st_covers(geography, geography) +FUNCTION _st_covers(geometry, geometry) +FUNCTION st_covers(geometry, geometry) +FUNCTION st_covers(text, text) +FUNCTION st_create_histogram2d(box2d, integer) +FUNCTION st_createtopogeo(character varying, public.geometry) +FUNCTION _st_crosses(geometry, geometry) +FUNCTION st_crosses(geometry, geometry) +FUNCTION st_curvetoline(geometry) +FUNCTION st_curvetoline(geometry, integer) +FUNCTION st_datatype(chip) +FUNCTION _st_dfullywithin(geometry, geometry, double precision) +FUNCTION st_dfullywithin(geometry, geometry, double precision) +FUNCTION st_difference(geometry, geometry) +FUNCTION st_dimension(geometry) +FUNCTION st_disjoint(geometry, geometry) +FUNCTION st_distance(geography, geography) +FUNCTION st_distance(geography, geography, boolean) +FUNCTION _st_distance(geography, geography, double precision, boolean) +FUNCTION st_distance(geometry, geometry) +FUNCTION st_distance_sphere(geometry, geometry) +FUNCTION st_distance_spheroid(geometry, geometry, spheroid) +FUNCTION st_distance(text, text) +FUNCTION st_dropbbox(geometry) +FUNCTION st_dumpaspolygons(raster) +FUNCTION st_dumpaspolygons(raster, integer) +FUNCTION _st_dumpaswktpolygons(raster, integer) +FUNCTION st_dump(geometry) +FUNCTION st_dumppoints(geometry) +FUNCTION _st_dumppoints(geometry, integer[]) +FUNCTION st_dumprings(geometry) +FUNCTION st_dwithin(geography, geography, double precision) +FUNCTION _st_dwithin(geography, geography, double precision, boolean) +FUNCTION st_dwithin(geography, geography, double precision, boolean) +FUNCTION _st_dwithin(geometry, geometry, double precision) +FUNCTION st_dwithin(geometry, geometry, double precision) +FUNCTION st_dwithin(text, text, double precision) +FUNCTION st_endpoint(geometry) +FUNCTION st_envelope(geometry) +FUNCTION st_envelope(raster) +FUNCTION _st_equals(geometry, geometry) +FUNCTION st_equals(geometry, geometry) +FUNCTION st_estimated_extent(text, text) +FUNCTION st_estimated_extent(text, text, text) +FUNCTION st_estimate_histogram2d(histogram2d, box2d) +FUNCTION st_expand(box2d, double precision) +FUNCTION st_expand(box3d, double precision) +FUNCTION _st_expand(geography, double precision) +FUNCTION st_expand(geometry, double precision) +FUNCTION st_explode_histogram2d(histogram2d, text) +FUNCTION st_exteriorring(geometry) +FUNCTION st_factor(chip) +FUNCTION st_find_extent(text, text) +FUNCTION st_find_extent(text, text, text) +FUNCTION st_flipcoordinates(geometry) +FUNCTION st_force_2d(geometry) +FUNCTION st_force_3d(geometry) +FUNCTION st_force_3dm(geometry) +FUNCTION st_force_3dz(geometry) +FUNCTION st_force_4d(geometry) +FUNCTION st_force_collection(geometry) +FUNCTION st_forcerhr(geometry) +FUNCTION st_gdaldrivers() +FUNCTION st_geogfromtext(text) +FUNCTION st_geogfromwkb(bytea) +FUNCTION st_geographyfromtext(text) +FUNCTION st_geohash(geometry) +FUNCTION st_geohash(geometry, integer) +FUNCTION st_geom_accum(geometry[], geometry) +FUNCTION st_geomcollfromtext(text) +FUNCTION st_geomcollfromtext(text, integer) +FUNCTION st_geomcollfromwkb(bytea) +FUNCTION st_geomcollfromwkb(bytea, integer) +FUNCTION st_geometry_above(geometry, geometry) +FUNCTION st_geometry_analyze(internal) +FUNCTION st_geometry_below(geometry, geometry) +FUNCTION st_geometry(box2d) +FUNCTION st_geometry(box3d) +FUNCTION st_geometry(box3d_extent) +FUNCTION st_geometry(bytea) +FUNCTION st_geometry(chip) +FUNCTION st_geometry_cmp(geometry, geometry) +FUNCTION st_geometry_contained(geometry, geometry) +FUNCTION st_geometry_contain(geometry, geometry) +FUNCTION st_geometry_eq(geometry, geometry) +FUNCTION st_geometryfromtext(text) +FUNCTION st_geometryfromtext(text, integer) +FUNCTION st_geometry_ge(geometry, geometry) +FUNCTION st_geometry_gt(geometry, geometry) +FUNCTION st_geometry_in(cstring) +FUNCTION st_geometry_left(geometry, geometry) +FUNCTION st_geometry_le(geometry, geometry) +FUNCTION st_geometry_lt(geometry, geometry) +FUNCTION st_geometryn(geometry, integer) +FUNCTION st_geometry_out(geometry) +FUNCTION st_geometry_overabove(geometry, geometry) +FUNCTION st_geometry_overbelow(geometry, geometry) +FUNCTION st_geometry_overlap(geometry, geometry) +FUNCTION st_geometry_overleft(geometry, geometry) +FUNCTION st_geometry_overright(geometry, geometry) +FUNCTION st_geometry_recv(internal) +FUNCTION st_geometry_right(geometry, geometry) +FUNCTION st_geometry_same(geometry, geometry) +FUNCTION st_geometry_send(geometry) +FUNCTION st_geometry(text) +FUNCTION st_geometrytype(geometry) +FUNCTION st_geometrytype(topogeometry) +FUNCTION st_geomfromewkb(bytea) +FUNCTION st_geomfromewkt(text) +FUNCTION st_geomfromgeojson(text) +FUNCTION st_geomfromgml(text) +FUNCTION _st_geomfromgml(text, integer) +FUNCTION st_geomfromgml(text, integer) +FUNCTION st_geomfromkml(text) +FUNCTION st_geomfromtext(text) +FUNCTION st_geomfromtext(text, integer) +FUNCTION st_geomfromwkb(bytea) +FUNCTION st_geomfromwkb(bytea, integer) +FUNCTION st_georeference(raster) +FUNCTION st_georeference(raster, text) +FUNCTION st_geotransform(raster) +FUNCTION st_getfaceedges(character varying, integer) +FUNCTION _st_getfacegeometry(character varying, integer) +FUNCTION st_getfacegeometry(character varying, integer) +FUNCTION st_gmltosql(text) +FUNCTION st_gmltosql(text, integer) +FUNCTION st_hasarc(geometry) +FUNCTION st_hasbbox(geometry) +FUNCTION st_hasnoband(raster) +FUNCTION st_hasnoband(raster, integer) +FUNCTION st_hausdorffdistance(geometry, geometry) +FUNCTION st_hausdorffdistance(geometry, geometry, double precision) +FUNCTION st_height(chip) +FUNCTION st_height(raster) +FUNCTION _st_hillshade4ma(double precision[], text, text[]) +FUNCTION st_hillshade(raster, integer, text, double precision, double precision, double precision, double precision) +FUNCTION st_histogram2d_in(cstring) +FUNCTION st_histogram2d_out(histogram2d) +FUNCTION _st_histogram(raster, integer, boolean, double precision, integer, double precision[], boolean, double precision, double precision) +FUNCTION st_histogram(raster, integer, boolean, integer, boolean) +FUNCTION st_histogram(raster, integer, boolean, integer, double precision[], boolean) +FUNCTION st_histogram(raster, integer, integer, boolean) +FUNCTION st_histogram(raster, integer, integer, double precision[], boolean) +FUNCTION _st_histogram(text, text, integer, boolean, double precision, integer, double precision[], boolean) +FUNCTION st_histogram(text, text, integer, boolean, integer, boolean) +FUNCTION st_histogram(text, text, integer, boolean, integer, double precision[], boolean) +FUNCTION st_histogram(text, text, integer, integer, boolean) +FUNCTION st_histogram(text, text, integer, integer, double precision[], boolean) +FUNCTION st_inittopogeo(character varying) +FUNCTION st_interiorringn(geometry, integer) +FUNCTION st_interpolatepoint(geometry, geometry) +FUNCTION st_intersection(geography, geography) +FUNCTION st_intersection(geometry, geometry) +FUNCTION st_intersection(geometry, raster) +FUNCTION st_intersection(geometry, raster, integer) +FUNCTION st_intersection(raster, geometry) +FUNCTION st_intersection(raster, geometry, regprocedure) +FUNCTION st_intersection(raster, geometry, text, regprocedure) +FUNCTION st_intersection(raster, integer, geometry) +FUNCTION st_intersection(raster, integer, geometry, regprocedure) +FUNCTION st_intersection(raster, integer, geometry, text, regprocedure) +FUNCTION st_intersection(raster, integer, raster, integer, double precision) +FUNCTION st_intersection(raster, integer, raster, integer, double precision[]) +FUNCTION st_intersection(raster, integer, raster, integer, regprocedure) +FUNCTION st_intersection(raster, integer, raster, integer, text, double precision) +FUNCTION st_intersection(raster, integer, raster, integer, text, double precision[]) +FUNCTION st_intersection(raster, integer, raster, integer, text, regprocedure) +FUNCTION _st_intersection(raster, integer, raster, integer, text, text, regprocedure) +FUNCTION st_intersection(raster, raster, double precision) +FUNCTION st_intersection(raster, raster, double precision[]) +FUNCTION st_intersection(raster, raster, regprocedure) +FUNCTION st_intersection(raster, raster, text, double precision) +FUNCTION st_intersection(raster, raster, text, double precision[]) +FUNCTION st_intersection(raster, raster, text, regprocedure) +FUNCTION st_intersection(text, text) +FUNCTION st_intersects(geography, geography) +FUNCTION _st_intersects(geometry, geometry) +FUNCTION st_intersects(geometry, geometry) +FUNCTION st_intersects(geometry, raster) +FUNCTION st_intersects(geometry, raster, boolean) +FUNCTION _st_intersects(geometry, raster, integer) +FUNCTION st_intersects(geometry, raster, integer) +FUNCTION _st_intersects(geometry, raster, integer, boolean) +FUNCTION st_intersects(geometry, raster, integer, boolean) +FUNCTION st_intersects(raster, boolean, geometry) +FUNCTION st_intersects(raster, geometry) +FUNCTION _st_intersects(raster, geometry, integer) +FUNCTION st_intersects(raster, geometry, integer) +FUNCTION st_intersects(raster, integer, boolean, geometry) +FUNCTION st_intersects(raster, integer, geometry) +FUNCTION _st_intersects(raster, integer, raster, integer) +FUNCTION st_intersects(raster, integer, raster, integer) +FUNCTION st_intersects(raster, raster) +FUNCTION st_intersects(text, text) +FUNCTION st_isclosed(geometry) +FUNCTION st_iscollection(geometry) +FUNCTION st_isempty(geometry) +FUNCTION st_isempty(raster) +FUNCTION st_isring(geometry) +FUNCTION st_issimple(geometry) +FUNCTION st_isvaliddetail(geometry) +FUNCTION st_isvaliddetail(geometry, integer) +FUNCTION st_isvalid(geometry) +FUNCTION st_isvalid(geometry, integer) +FUNCTION st_isvalidreason(geometry) +FUNCTION st_isvalidreason(geometry, integer) +FUNCTION st_left(raster, raster) +FUNCTION st_length2d(geometry) +FUNCTION st_length2d_spheroid(geometry, spheroid) +FUNCTION st_length3d(geometry) +FUNCTION st_length3d_spheroid(geometry, spheroid) +FUNCTION st_length(geography, boolean) +FUNCTION st_length(geometry) +FUNCTION st_length_spheroid(geometry, spheroid) +FUNCTION st_length(text) +FUNCTION _st_linecrossingdirection(geometry, geometry) +FUNCTION st_linecrossingdirection(geometry, geometry) +FUNCTION st_linefrommultipoint(geometry) +FUNCTION st_linefromtext(text) +FUNCTION st_linefromtext(text, integer) +FUNCTION st_linefromwkb(bytea) +FUNCTION st_linefromwkb(bytea, integer) +FUNCTION st_line_interpolate_point(geometry, double precision) +FUNCTION st_line_locate_point(geometry, geometry) +FUNCTION st_linemerge(geometry) +FUNCTION st_linestringfromwkb(bytea) +FUNCTION st_linestringfromwkb(bytea, integer) +FUNCTION st_line_substring(geometry, double precision, double precision) +FUNCTION st_linetocurve(geometry) +FUNCTION st_locatealong(geometry, double precision) +FUNCTION st_locatealong(geometry, double precision, double precision) +FUNCTION st_locate_along_measure(geometry, double precision) +FUNCTION st_locatebetweenelevations(geometry, double precision, double precision) +FUNCTION st_locatebetween(geometry, double precision, double precision) +FUNCTION st_locatebetween(geometry, double precision, double precision, double precision) +FUNCTION st_locate_between_measures(geometry, double precision, double precision) +FUNCTION _st_longestline(geometry, geometry) +FUNCTION st_longestline(geometry, geometry) +FUNCTION st_makebox2d(geometry, geometry) +FUNCTION st_makebox3d(geometry, geometry) +FUNCTION st_makeemptyraster(integer, integer, double precision, double precision, double precision) +FUNCTION st_makeemptyraster(integer, integer, double precision, double precision, double precision, double precision, double precision, double precision) +FUNCTION st_makeemptyraster(integer, integer, double precision, double precision, double precision, double precision, double precision, double precision, integer) +FUNCTION st_makeemptyraster(raster) +FUNCTION st_makeenvelope(double precision, double precision, double precision, double precision) +FUNCTION st_makeenvelope(double precision, double precision, double precision, double precision, integer) +FUNCTION st_makeline_garray(geometry[]) +FUNCTION st_makeline(geometry[]) +FUNCTION st_makeline(geometry, geometry) +FUNCTION st_makepoint(double precision, double precision) +FUNCTION st_makepoint(double precision, double precision, double precision) +FUNCTION st_makepoint(double precision, double precision, double precision, double precision) +FUNCTION st_makepointm(double precision, double precision, double precision) +FUNCTION st_makepolygon(geometry) +FUNCTION st_makepolygon(geometry, geometry[]) +FUNCTION st_makevalid(geometry) +FUNCTION _st_mapalgebra4unionfinal1(raster) +FUNCTION _st_mapalgebra4unionstate(raster, raster) +FUNCTION _st_mapalgebra4unionstate(raster, raster, integer) +FUNCTION _st_mapalgebra4unionstate(raster, raster, integer, text) +FUNCTION _st_mapalgebra4unionstate(raster, raster, text) +FUNCTION _st_mapalgebra4unionstate(raster, raster, text, text, text, double precision, text, text, text, double precision) +FUNCTION st_mapalgebraexpr(raster, integer, raster, integer, text, text, text, text, text, double precision) +FUNCTION st_mapalgebraexpr(raster, integer, text, text, double precision) +FUNCTION st_mapalgebraexpr(raster, integer, text, text, text) +FUNCTION st_mapalgebraexpr(raster, raster, text, text, text, text, text, double precision) +FUNCTION st_mapalgebraexpr(raster, text, text, double precision) +FUNCTION st_mapalgebraexpr(raster, text, text, text) +FUNCTION st_mapalgebrafctngb(raster, integer, text, integer, integer, regprocedure, text, text[]) +FUNCTION st_mapalgebrafct(raster, integer, raster, integer, regprocedure, text, text, text[]) +FUNCTION st_mapalgebrafct(raster, integer, regprocedure) +FUNCTION st_mapalgebrafct(raster, integer, regprocedure, text[]) +FUNCTION st_mapalgebrafct(raster, integer, text, regprocedure) +FUNCTION st_mapalgebrafct(raster, integer, text, regprocedure, text[]) +FUNCTION st_mapalgebrafct(raster, raster, regprocedure, text, text, text[]) +FUNCTION st_mapalgebrafct(raster, regprocedure) +FUNCTION st_mapalgebrafct(raster, regprocedure, text[]) +FUNCTION st_mapalgebrafct(raster, text, regprocedure) +FUNCTION st_mapalgebrafct(raster, text, regprocedure, text[]) +FUNCTION st_mapalgebra(raster, integer, text) +FUNCTION st_mapalgebra(raster, integer, text, text) +FUNCTION st_mapalgebra(raster, integer, text, text, text) +FUNCTION st_mapalgebra(raster, text) +FUNCTION st_mapalgebra(raster, text, text) +FUNCTION st_mapalgebra(raster, text, text, text) +FUNCTION st_max4ma(double precision[], text, text[]) +FUNCTION _st_maxdistance(geometry, geometry) +FUNCTION st_max_distance(geometry, geometry) +FUNCTION st_maxdistance(geometry, geometry) +FUNCTION st_mean4ma(double precision[], text, text[]) +FUNCTION st_mem_size(geometry) +FUNCTION st_metadata(raster) +FUNCTION st_m(geometry) +FUNCTION st_min4ma(double precision[], text, text[]) +FUNCTION st_minimumboundingcircle(geometry) +FUNCTION st_minimumboundingcircle(geometry, integer) +FUNCTION st_minpossibleval(text) +FUNCTION st_minpossiblevalue(text) +FUNCTION st_mlinefromtext(text) +FUNCTION st_mlinefromtext(text, integer) +FUNCTION st_mlinefromwkb(bytea) +FUNCTION st_mlinefromwkb(bytea, integer) +FUNCTION st_modedgeheal(character varying, integer, integer) +FUNCTION st_modedgesplit(character varying, integer, public.geometry) +FUNCTION st_modedgessplit(character varying, integer, public.geometry) +FUNCTION st_moveisonode(character varying, integer, public.geometry) +FUNCTION st_mpointfromtext(text) +FUNCTION st_mpointfromtext(text, integer) +FUNCTION st_mpointfromwkb(bytea) +FUNCTION st_mpointfromwkb(bytea, integer) +FUNCTION st_mpolyfromtext(text) +FUNCTION st_mpolyfromtext(text, integer) +FUNCTION st_mpolyfromwkb(bytea) +FUNCTION st_mpolyfromwkb(bytea, integer) +FUNCTION st_multi(geometry) +FUNCTION st_multilinefromwkb(bytea) +FUNCTION st_multilinestringfromtext(text) +FUNCTION st_multilinestringfromtext(text, integer) +FUNCTION st_multipointfromtext(text) +FUNCTION st_multipointfromwkb(bytea) +FUNCTION st_multipointfromwkb(bytea, integer) +FUNCTION st_multipolyfromwkb(bytea) +FUNCTION st_multipolyfromwkb(bytea, integer) +FUNCTION st_multipolygonfromtext(text) +FUNCTION st_multipolygonfromtext(text, integer) +FUNCTION st_ndims(geometry) +FUNCTION st_newedgeheal(character varying, integer, integer) +FUNCTION st_newedgessplit(character varying, integer, public.geometry) +FUNCTION st_node(geometry) +FUNCTION st_noop(geometry) +FUNCTION st_npoints(geometry) +FUNCTION st_nrings(geometry) +FUNCTION st_numbands(raster) +FUNCTION st_numgeometries(geometry) +FUNCTION st_numinteriorring(geometry) +FUNCTION st_numinteriorrings(geometry) +FUNCTION st_numpatches(geometry) +FUNCTION st_numpoints(geometry) +FUNCTION st_offsetcurve(geometry, double precision, cstring) +FUNCTION st_offsetcurve(geometry, double precision, text) +FUNCTION _st_orderingequals(geometry, geometry) +FUNCTION st_orderingequals(geometry, geometry) +FUNCTION st_overabove(raster, raster) +FUNCTION st_overbelow(raster, raster) +FUNCTION st_overlap(raster, raster) +FUNCTION _st_overlaps(geometry, geometry) +FUNCTION st_overlaps(geometry, geometry) +FUNCTION st_overleft(raster, raster) +FUNCTION st_overright(raster, raster) +FUNCTION st_patchn(geometry, integer) +FUNCTION st_perimeter2d(geometry) +FUNCTION st_perimeter3d(geometry) +FUNCTION st_perimeter(geography, boolean) +FUNCTION st_perimeter(geometry) +FUNCTION st_pixelaspolygon(raster, integer, integer) +FUNCTION st_pixelaspolygon(raster, integer, integer, integer) +FUNCTION st_pixelaspolygons(raster, integer) +FUNCTION st_pixelheight(raster) +FUNCTION st_pixelwidth(raster) +FUNCTION st_point(double precision, double precision) +FUNCTION st_pointfromtext(text) +FUNCTION st_pointfromtext(text, integer) +FUNCTION st_pointfromwkb(bytea) +FUNCTION st_pointfromwkb(bytea, integer) +FUNCTION st_point_inside_circle(geometry, double precision, double precision, double precision) +FUNCTION st_pointn(geometry) +FUNCTION st_pointn(geometry, integer) +FUNCTION st_pointonsurface(geometry) +FUNCTION _st_pointoutside(geography) +FUNCTION st_polyfromtext(text) +FUNCTION st_polyfromtext(text, integer) +FUNCTION st_polyfromwkb(bytea) +FUNCTION st_polyfromwkb(bytea, integer) +FUNCTION st_polygonfromtext(text) +FUNCTION st_polygonfromtext(text, integer) +FUNCTION st_polygonfromwkb(bytea) +FUNCTION st_polygonfromwkb(bytea, integer) +FUNCTION st_polygon(geometry, integer) +FUNCTION st_polygonize_garray(geometry[]) +FUNCTION st_polygonize(geometry[]) +FUNCTION st_polygon(raster) +FUNCTION st_polygon(raster, integer) +FUNCTION st_postgis_gist_joinsel(internal, oid, internal, smallint) +FUNCTION st_postgis_gist_sel(internal, oid, internal, integer) +FUNCTION st_project(geography, double precision, double precision) +FUNCTION st_quantile(raster, boolean, double precision) +FUNCTION st_quantile(raster, double precision) +FUNCTION st_quantile(raster, double precision[]) +FUNCTION st_quantile(raster, integer, boolean, double precision) +FUNCTION st_quantile(raster, integer, boolean, double precision[]) +FUNCTION _st_quantile(raster, integer, boolean, double precision, double precision[]) +FUNCTION st_quantile(raster, integer, double precision) +FUNCTION st_quantile(raster, integer, double precision[]) +FUNCTION st_quantile(text, text, boolean, double precision) +FUNCTION st_quantile(text, text, double precision) +FUNCTION st_quantile(text, text, double precision[]) +FUNCTION st_quantile(text, text, integer, boolean, double precision) +FUNCTION st_quantile(text, text, integer, boolean, double precision[]) +FUNCTION _st_quantile(text, text, integer, boolean, double precision, double precision[]) +FUNCTION st_quantile(text, text, integer, double precision) +FUNCTION st_quantile(text, text, integer, double precision[]) +FUNCTION st_range4ma(double precision[], text, text[]) +FUNCTION st_raster2worldcoordx(raster, integer) +FUNCTION st_raster2worldcoordx(raster, integer, integer) +FUNCTION st_raster2worldcoordy(raster, integer) +FUNCTION st_raster2worldcoordy(raster, integer, integer) +FUNCTION st_reclass(raster, integer, text, text, double precision) +FUNCTION _st_reclass(raster, reclassarg[]) +FUNCTION st_reclass(raster, reclassarg[]) +FUNCTION st_reclass(raster, text, text) +FUNCTION st_relate(geometry, geometry) +FUNCTION st_relate(geometry, geometry, integer) +FUNCTION st_relate(geometry, geometry, text) +FUNCTION st_relatematch(text, text) +FUNCTION st_remedgemodface(character varying, integer) +FUNCTION st_remedgenewface(character varying, integer) +FUNCTION st_remisonode(character varying, integer) +FUNCTION st_removeisoedge(character varying, integer) +FUNCTION st_removeisonode(character varying, integer) +FUNCTION st_removepoint(geometry, integer) +FUNCTION st_removerepeatedpoints(geometry) +FUNCTION st_resample(raster, integer, double precision, double precision, double precision, double precision, double precision, double precision, text, double precision) +FUNCTION st_resample(raster, integer, integer, integer, double precision, double precision, double precision, double precision, text, double precision) +FUNCTION st_resample(raster, raster, boolean, text, double precision) +FUNCTION st_resample(raster, raster, text, double precision) +FUNCTION st_resample(raster, raster, text, double precision, boolean) +FUNCTION _st_resample(raster, text, double precision, integer, double precision, double precision, double precision, double precision, double precision, double precision) +FUNCTION _st_resample(raster, text, double precision, integer, double precision, double precision, double precision, double precision, double precision, double precision, integer, integer) +FUNCTION st_rescale(raster, double precision, double precision, text, double precision) +FUNCTION st_rescale(raster, double precision, text, double precision) +FUNCTION st_reskew(raster, double precision, double precision, text, double precision) +FUNCTION st_reskew(raster, double precision, text, double precision) +FUNCTION st_reverse(geometry) +FUNCTION st_right(raster, raster) +FUNCTION st_rotate(geometry, double precision) +FUNCTION st_rotate(geometry, double precision, double precision, double precision) +FUNCTION st_rotate(geometry, double precision, geometry) +FUNCTION st_rotatex(geometry, double precision) +FUNCTION st_rotatey(geometry, double precision) +FUNCTION st_rotatez(geometry, double precision) +FUNCTION st_rotation(raster) +FUNCTION st_samealignment(double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision) +FUNCTION st_samealignment(raster, raster) +FUNCTION st_same(raster, raster) +FUNCTION st_scale(geometry, double precision, double precision) +FUNCTION st_scale(geometry, double precision, double precision, double precision) +FUNCTION st_scalex(raster) +FUNCTION st_scaley(raster) +FUNCTION st_segmentize(geometry, double precision) +FUNCTION st_setbandisnodata(raster) +FUNCTION st_setbandisnodata(raster, integer) +FUNCTION st_setbandnodatavalue(raster, double precision) +FUNCTION st_setbandnodatavalue(raster, integer, double precision) +FUNCTION st_setbandnodatavalue(raster, integer, double precision, boolean) +FUNCTION st_setfactor(chip, real) +FUNCTION st_setgeoreference(raster, text) +FUNCTION st_setgeoreference(raster, text, text) +FUNCTION st_setgeotransform(raster, double precision, double precision, double precision, double precision, double precision, double precision) +FUNCTION st_setpoint(geometry, integer, geometry) +FUNCTION st_setrotation(raster, double precision) +FUNCTION st_setscale(raster, double precision) +FUNCTION st_setscale(raster, double precision, double precision) +FUNCTION st_setskew(raster, double precision) +FUNCTION st_setskew(raster, double precision, double precision) +FUNCTION st_setsrid(geometry, integer) +FUNCTION st_setsrid(raster, integer) +FUNCTION st_setupperleft(raster, double precision, double precision) +FUNCTION st_setvalue(raster, geometry, double precision) +FUNCTION st_setvalue(raster, integer, geometry, double precision) +FUNCTION st_setvalue(raster, integer, integer, double precision) +FUNCTION st_setvalue(raster, integer, integer, integer, double precision) +FUNCTION st_sharedpaths(geometry, geometry) +FUNCTION st_shift_longitude(geometry) +FUNCTION st_shortestline(geometry, geometry) +FUNCTION st_simplify(geometry, double precision) +FUNCTION st_simplifypreservetopology(geometry, double precision) +FUNCTION st_skewx(raster) +FUNCTION st_skewy(raster) +FUNCTION _st_slope4ma(double precision[], text, text[]) +FUNCTION st_slope(raster, integer, text) +FUNCTION st_snap(geometry, geometry, double precision) +FUNCTION st_snaptogrid(geometry, double precision) +FUNCTION st_snaptogrid(geometry, double precision, double precision) +FUNCTION st_snaptogrid(geometry, double precision, double precision, double precision, double precision) +FUNCTION st_snaptogrid(geometry, geometry, double precision, double precision, double precision, double precision) +FUNCTION st_snaptogrid(raster, double precision, double precision, double precision, double precision, text, double precision) +FUNCTION st_snaptogrid(raster, double precision, double precision, double precision, text, double precision) +FUNCTION st_snaptogrid(raster, double precision, double precision, text, double precision, double precision, double precision) +FUNCTION st_spheroid_in(cstring) +FUNCTION st_spheroid_out(spheroid) +FUNCTION st_split(geometry, geometry) +FUNCTION st_srid(chip) +FUNCTION st_srid(geometry) +FUNCTION st_srid(raster) +FUNCTION st_startpoint(geometry) +FUNCTION st_sum4ma(double precision[], text, text[]) +FUNCTION st_summary(geography) +FUNCTION st_summary(geometry) +FUNCTION st_summarystats(raster, boolean) +FUNCTION st_summarystats(raster, integer, boolean) +FUNCTION _st_summarystats(raster, integer, boolean, double precision) +FUNCTION st_summarystats(text, text, boolean) +FUNCTION st_summarystats(text, text, integer, boolean) +FUNCTION _st_summarystats(text, text, integer, boolean, double precision) +FUNCTION st_symdifference(geometry, geometry) +FUNCTION st_symmetricdifference(geometry, geometry) +FUNCTION st_testraster(double precision, double precision, double precision) +FUNCTION st_text(boolean) +FUNCTION st_text(geometry) +FUNCTION _st_touches(geometry, geometry) +FUNCTION st_touches(geometry, geometry) +FUNCTION st_transform(geometry, integer) +FUNCTION st_transform(raster, integer, double precision, double precision, text, double precision) +FUNCTION st_transform(raster, integer, double precision, text, double precision) +FUNCTION st_transform(raster, integer, text, double precision, double precision, double precision) +FUNCTION st_translate(geometry, double precision, double precision) +FUNCTION st_translate(geometry, double precision, double precision, double precision) +FUNCTION st_transscale(geometry, double precision, double precision, double precision, double precision) +FUNCTION st_unaryunion(geometry) +FUNCTION st_union(geometry[]) +FUNCTION st_union(geometry, geometry) +FUNCTION st_unite_garray(geometry[]) +FUNCTION st_upperleftx(raster) +FUNCTION st_upperlefty(raster) +FUNCTION st_valuecount(raster, double precision, double precision) +FUNCTION st_valuecount(raster, double precision[], double precision) +FUNCTION _st_valuecount(raster, integer, boolean, double precision[], double precision) +FUNCTION st_valuecount(raster, integer, boolean, double precision, double precision) +FUNCTION st_valuecount(raster, integer, boolean, double precision[], double precision) +FUNCTION st_valuecount(raster, integer, double precision, double precision) +FUNCTION st_valuecount(raster, integer, double precision[], double precision) +FUNCTION st_valuecount(text, text, double precision, double precision) +FUNCTION st_valuecount(text, text, double precision[], double precision) +FUNCTION _st_valuecount(text, text, integer, boolean, double precision[], double precision) +FUNCTION st_valuecount(text, text, integer, boolean, double precision, double precision) +FUNCTION st_valuecount(text, text, integer, boolean, double precision[], double precision) +FUNCTION st_valuecount(text, text, integer, double precision, double precision) +FUNCTION st_valuecount(text, text, integer, double precision[], double precision) +FUNCTION st_valuepercent(raster, double precision, double precision) +FUNCTION st_valuepercent(raster, double precision[], double precision) +FUNCTION st_valuepercent(raster, integer, boolean, double precision, double precision) +FUNCTION st_valuepercent(raster, integer, boolean, double precision[], double precision) +FUNCTION st_valuepercent(raster, integer, double precision, double precision) +FUNCTION st_valuepercent(raster, integer, double precision[], double precision) +FUNCTION st_valuepercent(text, text, double precision, double precision) +FUNCTION st_valuepercent(text, text, double precision[], double precision) +FUNCTION st_valuepercent(text, text, integer, boolean, double precision, double precision) +FUNCTION st_valuepercent(text, text, integer, boolean, double precision[], double precision) +FUNCTION st_valuepercent(text, text, integer, double precision, double precision) +FUNCTION st_valuepercent(text, text, integer, double precision[], double precision) +FUNCTION st_value(raster, geometry) +FUNCTION st_value(raster, geometry, boolean) +FUNCTION st_value(raster, integer, geometry) +FUNCTION st_value(raster, integer, geometry, boolean) +FUNCTION st_value(raster, integer, integer) +FUNCTION st_value(raster, integer, integer, boolean) +FUNCTION st_value(raster, integer, integer, integer) +FUNCTION st_value(raster, integer, integer, integer, boolean) +FUNCTION st_width(chip) +FUNCTION st_width(raster) +FUNCTION _st_within(geometry, geometry) +FUNCTION st_within(geometry, geometry) +FUNCTION st_wkbtosql(bytea) +FUNCTION st_wkttosql(text) +FUNCTION st_world2rastercoordx(raster, double precision) +FUNCTION st_world2rastercoordx(raster, double precision, double precision) +FUNCTION st_world2rastercoordx(raster, geometry) +FUNCTION st_world2rastercoordy(raster, double precision) +FUNCTION st_world2rastercoordy(raster, double precision, double precision) +FUNCTION st_world2rastercoordy(raster, geometry) +FUNCTION st_x(geometry) +FUNCTION st_xmax(box3d) +FUNCTION st_xmin(box3d) +FUNCTION st_y(geometry) +FUNCTION st_ymax(box3d) +FUNCTION st_ymin(box3d) +FUNCTION st_z(geometry) +FUNCTION st_zmax(box3d) +FUNCTION st_zmflag(geometry) +FUNCTION st_zmin(box3d) +FUNCTION summary(geometry) +FUNCTION symdifference(geometry, geometry) +FUNCTION symmetricdifference(geometry, geometry) +FUNCTION text(boolean) +FUNCTION text(geometry) +FUNCTION topoelementarray_append(topoelementarray, topoelement) +FUNCTION topogeo_addgeometry(character varying, public.geometry, double precision) +FUNCTION topogeo_addlinestring(character varying, public.geometry) +FUNCTION topogeo_addlinestring(character varying, public.geometry, double precision) +FUNCTION topogeo_addpoint(character varying, public.geometry, double precision) +FUNCTION topogeo_addpoint(character varying, public.geometry, integer, integer) +FUNCTION topogeo_addpolygon(character varying, public.geometry) +FUNCTION topogeo_addpolygon(character varying, public.geometry, double precision) +FUNCTION topologysummary(character varying) +FUNCTION totopogeom(public.geometry, character varying, integer, double precision) +FUNCTION touches(geometry, geometry) +FUNCTION transform_geometry(geometry, text, text, integer) +FUNCTION transform(geometry, integer) +FUNCTION translate(geometry, double precision, double precision) +FUNCTION translate(geometry, double precision, double precision, double precision) +FUNCTION transscale(geometry, double precision, double precision, double precision, double precision) +FUNCTION unite_garray(geometry[]) +FUNCTION unlockrows(text) +FUNCTION updategeometrysrid(character varying, character varying, character varying, character varying, integer) +FUNCTION updategeometrysrid(character varying, character varying, character varying, integer) +FUNCTION updategeometrysrid(character varying, character varying, integer) +FUNCTION update_geometry_stats() +FUNCTION update_geometry_stats(character varying, character varying) +FUNCTION update_the_geom_webmercator() +FUNCTION validatetopology(character varying) +FUNCTION width(chip) +FUNCTION within(geometry, geometry) +FUNCTION x(geometry) +FUNCTION xmax(box3d) +FUNCTION xmin(box3d) +FUNCTION y(geometry) +FUNCTION ymax(box3d) +FUNCTION ymin(box3d) +FUNCTION z(geometry) +FUNCTION zmax(box3d) +FUNCTION zmflag(geometry) +FUNCTION zmin(box3d) +OPERATOR CLASS btree_geography_ops +OPERATOR CLASS btree_geometry_ops +OPERATOR CLASS gist_geography_ops +OPERATOR CLASS gist_geometry_ops +OPERATOR CLASS gist_geometry_ops_2d +OPERATOR CLASS gist_geometry_ops_nd +OPERATOR ~=(geography, geography) +OPERATOR ~(geography, geography) +OPERATOR <<|(geography, geography) +OPERATOR <<(geography, geography) +OPERATOR <=(geography, geography) +OPERATOR <(geography, geography) +OPERATOR =(geography, geography) +OPERATOR >=(geography, geography) +OPERATOR >>(geography, geography) +OPERATOR >(geography, geography) +OPERATOR |>>(geography, geography) +OPERATOR |&>(geography, geography) +OPERATOR @(geography, geography) +OPERATOR &<|(geography, geography) +OPERATOR &<(geography, geography) +OPERATOR &>(geography, geography) +OPERATOR &&(geography, geography) +OPERATOR &&&(geography, geography) +OPERATOR ~=(geometry, geometry) +OPERATOR ~(geometry, geometry) +OPERATOR <<|(geometry, geometry) +OPERATOR <<(geometry, geometry) +OPERATOR <=(geometry, geometry) +OPERATOR <(geometry, geometry) +OPERATOR =(geometry, geometry) +OPERATOR >=(geometry, geometry) +OPERATOR >>(geometry, geometry) +OPERATOR >(geometry, geometry) +OPERATOR |>>(geometry, geometry) +OPERATOR |&>(geometry, geometry) +OPERATOR @(geometry, geometry) +OPERATOR &<|(geometry, geometry) +OPERATOR &<(geometry, geometry) +OPERATOR &>(geometry, geometry) +OPERATOR &&(geometry, geometry) +OPERATOR &&&(geometry, geometry) +OPERATOR ~(geometry, raster) +OPERATOR &&(geometry, raster) +OPERATOR ~(raster, geometry) +OPERATOR &&(raster, geometry) +OPERATOR ~=(raster, raster) +OPERATOR ~(raster, raster) +OPERATOR <<|(raster, raster) +OPERATOR <<(raster, raster) +OPERATOR >>(raster, raster) +OPERATOR |>>(raster, raster) +OPERATOR |&>(raster, raster) +OPERATOR @(raster, raster) +OPERATOR &<|(raster, raster) +OPERATOR &<(raster, raster) +OPERATOR &>(raster, raster) +OPERATOR &&(raster, raster) +PROCEDURALLANGUAGE plpgsql +RULE geometry_columns_delete +RULE geometry_columns_insert +RULE geometry_columns_update +SCHEMA topology +SEQUENCE topology_id_seq +SHELLTYPE box2d +SHELLTYPE box2df +SHELLTYPE box3d +SHELLTYPE box3d_extent +SHELLTYPE chip +SHELLTYPE geography +SHELLTYPE geometry +SHELLTYPE gidx +SHELLTYPE pgis_abs +SHELLTYPE raster +SHELLTYPE spheroid +TABLE DATA geography_columns +TABLE DATA geometry_columns +TABLE DATA raster_columns +TABLE DATA raster_overviews +TABLE geography_columns +TABLE geometry_columns +TABLE layer +TABLE raster_columns +TABLE raster_overviews +TABLE spatial_ref_sys +TABLE topology +TRIGGER layer_integrity_checks +TYPE box2d +TYPE box2df +TYPE box3d +TYPE box3d_extent +TYPE chip +TYPE geography +TYPE geometry +TYPE geometry_dump +TYPE geomval +TYPE getfaceedges_returntype +TYPE gidx +TYPE histogram +TYPE histogram2d +TYPE pgis_abs +TYPE quantile +TYPE raster +TYPE rastexpr +TYPE reclassarg +TYPE spheroid +TYPE summarystats +TYPE topogeometry +TYPE validatetopology_returntype +TYPE valid_detail +TYPE valuecount +TYPE wktgeomval +VIEW geography_columns +VIEW geometry_columns +VIEW raster_columns +VIEW raster_overviews diff -Nru postgis-1.5.3/utils/profile_intersects.pl postgis-2.0.1/utils/profile_intersects.pl --- postgis-1.5.3/utils/profile_intersects.pl 2004-09-27 08:23:45.000000000 +0000 +++ postgis-2.0.1/utils/profile_intersects.pl 2012-02-27 22:08:12.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/perl -w -# $Id: profile_intersects.pl 895 2004-09-27 08:23:45Z strk $ +# $Id: profile_intersects.pl 9324 2012-02-27 22:08:12Z pramsey $ # # TODO: # diff -Nru postgis-1.5.3/utils/read_scripts_version.pl postgis-2.0.1/utils/read_scripts_version.pl --- postgis-1.5.3/utils/read_scripts_version.pl 2009-11-16 19:52:58.000000000 +0000 +++ postgis-2.0.1/utils/read_scripts_version.pl 2012-02-27 22:08:12.000000000 +0000 @@ -5,7 +5,6 @@ my @files = ( "postgis.sql.in.c", "geography.sql.in.c", - "sqlmm.sql.in.c", "long_xact.sql.in.c" ); diff -Nru postgis-1.5.3/utils/svn_repo_revision.pl postgis-2.0.1/utils/svn_repo_revision.pl --- postgis-1.5.3/utils/svn_repo_revision.pl 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/utils/svn_repo_revision.pl 2012-02-29 13:35:20.000000000 +0000 @@ -0,0 +1,133 @@ +#!/usr/bin/perl + +$ENV{"LC_ALL"} = "C"; + +use warnings; +use strict; + +my $top_srcdir = "."; +my $rev_file = $top_srcdir.'/postgis_svn_revision.h'; + +my $target = 'local'; +$target = $ARGV[0] if $ARGV[0]; + +# Read the svn revision number +my $svn_rev = &read_rev($target); + +# Write it +&write_defn($svn_rev); + + +sub read_rev { + + my $target = shift; + + #print STDERR "Target: $target\n"; + + my $svn_info; + + if ( $target eq "local" ) { + if ( -d $top_srcdir."/.svn" ) { + #print STDERR "There's a ". $top_srcdir."/.svn dir\n"; + $svn_info = &read_rev_svn($target); + } elsif ( -d $top_srcdir."/.git" ) { + #print STDERR "There's a ". $top_srcdir."/.git dir\n"; + $svn_info = &read_rev_git(); + } else { + print STDERR "Can't fetch local revision (neither .svn nor .git found)\n"; + $svn_info = 0; + } + } else { + $svn_info = &read_rev_svn($target); + } + + return $svn_info; + +} + +sub read_rev_git { + + # TODO: test on old systems, I think I saw some `which` + # implementations returning "nothing found" or something + # like that, making the later if ( ! $svn_exe ) always false + # + my $git_exe = `which git`; + if ( ! $git_exe ) { + print STDERR "Can't fetch SVN revision: no git executable found\n"; + return 0; + } + chop($git_exe); + + my $cmd = "\"${git_exe}\" log --grep=git-svn -1 | grep git-svn | cut -d@ -f2 | cut -d' ' -f1"; + #print STDERR "cmd: ${cmd}\n"; + my $rev = `$cmd`; + + if ( ! $rev ) { + print STDERR "Can't fetch SVN revision from git log\n"; + $rev = 0; + } else { + chop($rev); + } + + return $rev; +} + +sub read_rev_svn { + + my $target = shift; + + # TODO: test on old systems, I think I saw some `which` + # implementations returning "nothing found" or something + # like that, making the later if ( ! $svn_exe ) always false + # + my $svn_exe = `which svn`; + if ( ! $svn_exe ) { + print STDERR "Can't fetch SVN revision: no svn executable found\n"; + return 0; + } + chop($svn_exe); + + + my $svn_info; + if ( $target eq "local" ) { + $svn_info = `"${svn_exe}" info`; + } else { + $svn_info = `"${svn_exe}" info $target`; + } + + my $rev; + if ( $svn_info =~ /Last Changed Rev: (\d+)/ ) { + $rev = $1; + } else { + print STDERR "Can't fetch SVN revision: no 'Loast Changed Rev' in `svn info` output\n"; + $rev = 0; + } + + return $rev; +} + +sub write_defn { + my $rev = shift; + my $oldrev = 0; + + # Do not override the file if new detected + # revision isn't zero nor different from the existing one + if ( -f $rev_file ) { + open(IN, "<$rev_file"); + my $oldrevline = ; + if ( $oldrevline =~ /POSTGIS_SVN_REVISION (.*)/ ) { + $oldrev = $1; + } + close(IN); + if ( $rev == 0 or $rev == $oldrev ) { + print STDERR "Not updating existing rev file at $oldrev\n"; + return; + } + } + + my $string = "#define POSTGIS_SVN_REVISION $rev\n"; + open(OUT,">$rev_file"); + print OUT $string; + close(OUT); + print STDERR "Wrote rev file at $rev\n"; +} diff -Nru postgis-1.5.3/utils/test_estimation.pl postgis-2.0.1/utils/test_estimation.pl --- postgis-1.5.3/utils/test_estimation.pl 2009-10-15 17:44:48.000000000 +0000 +++ postgis-2.0.1/utils/test_estimation.pl 2012-02-27 22:08:12.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/perl -w -# $Id: test_estimation.pl 4652 2009-10-15 17:44:48Z mcayland $ +# $Id: test_estimation.pl 9324 2012-02-27 22:08:12Z pramsey $ # # TODO: # diff -Nru postgis-1.5.3/utils/test_joinestimation.pl postgis-2.0.1/utils/test_joinestimation.pl --- postgis-1.5.3/utils/test_joinestimation.pl 2009-10-16 16:23:50.000000000 +0000 +++ postgis-2.0.1/utils/test_joinestimation.pl 2012-02-27 22:08:12.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/perl -w -# $Id: test_joinestimation.pl 4658 2009-10-16 16:23:50Z mcayland $ +# $Id: test_joinestimation.pl 9324 2012-02-27 22:08:12Z pramsey $ # # TODO: # diff -Nru postgis-1.5.3/utils/uninstall_script postgis-2.0.1/utils/uninstall_script --- postgis-1.5.3/utils/uninstall_script 1970-01-01 00:00:00.000000000 +0000 +++ postgis-2.0.1/utils/uninstall_script 2011-12-24 02:51:02.000000000 +0000 @@ -0,0 +1,128 @@ +#!/bin/bash +# this script will change it's current working directory to utils + +DB=postgis_uninstall + +PGPATH=../postgis/ +RTPATH=../raster/rt_pg/ + +PGFILE=uninstall_postgis.sql +RTFILE=uninstall_rtpostgis.sql + +if [ "raster" == "$1" ]; then + OUTFILE=$RTFILE +else + OUTFILE=$PGFILE +fi +INFILE=$OUTFILE.in.$RANDOM +RAND1=$RANDOM +RAND2=$RANDOM + +RTN=0 + +cleanup () { + rm -f $INFILE $OUTFILE.$RAND1 $OUTFILE.$RAND2 +} + +# get reference uninstall of postgis.sql only +if [ "$1" == "raster" ]; then + $0 +fi + +SOURCE="${BASH_SOURCE[0]}" +while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done +DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" + +# use utils as our working directory +cd $DIR + +# create database +createdb $DB + +# load postgis.sql +psql -q -d $DB -f ${PGPATH}postgis.sql + +# raster requested, load rtpostgis.sql +if [ "$1" == "raster" ]; then + psql -q -d $DB -f ${RTPATH}rtpostgis.sql +fi + +# dump database loaded with postgis.sql and rtpostgis.sql and strip for only one-line DROP and SET statements +pg_dump --format=p --clean --schema-only --no-owner --no-acl --no-tablespaces $DB | grep -E "^(DROP|SET).*;$" | grep -v -E "^DROP (SCHEMA|PROCEDURAL) .*;$" > $INFILE + +# drop database +dropdb $DB + +# first search_path is parsed +schema=`grep -m 1 "SET search_path = " < $INFILE | sed -e 's/SET search_path = //' -e 's/\(,\|;\)//g' -e 's/ /\n/'` + +# sed arguments +sedarg="\-e 's/^DROP \(TABLE\|VIEW\|CAST\|OPERATOR CLASS\|OPERATOR\|AGGREGATE\|FUNCTION\|TYPE\)/& IF EXISTS/' " +for x in $schema; do + sedarg="\-e 's/${x}.//g' "${sedarg} +done + +# remove SET statements, remove schema names from DROP statements and add IF EXISTS for DROP statements +grep -v -E "^SET" < $INFILE | eval "sed ${sedarg}" > $OUTFILE.$RAND1 +RTN=$? + +if [ "$RTN" != "0" ]; then + cleanup + exit $RTN +fi + +kw="" +OIFS=$IFS +IFS=$'\n' +echo -n '' > $OUTFILE.$RAND2 +for x in `cat $OUTFILE.$RAND1`; do + y=`echo "$x" | grep "CASCADE;\$"` + # CASCADE found, get keyword + if [ "x$y" != "x" ]; then + kw=`echo "$x" | sed -e 's/^DROP TYPE IF EXISTS //' -e 's/ CASCADE;//'` + echo "$x" >> $OUTFILE.$RAND2 + continue + fi + + # no keyword, continue + if [ "x$kw" == "x" ]; then + echo "$x" >> $OUTFILE.$RAND2 + continue + fi + + y=`echo "$x" | grep "($kw)"` + if [ "x$y" == "x" ]; then + echo "$x" >> $OUTFILE.$RAND2 + continue + fi +done +IFS=$OIFS + +# if raster, separate raster from postgis items +if [ "raster" == "$1" ]; then + OIFS=$IFS + IFS=$'\n' + + echo -n '' > ${RTPATH}$OUTFILE + + # see if line found in uninstall_postgis.sql + for x in `cat $OUTFILE.$RAND2`; do + y=`echo $x | sed -e 's/\(\[\|\]\)/\\\&/g'` + y=`grep "^${y}$" < ${PGPATH}$PGFILE` + + # not postgis item + if [ "x$y" == "x" ]; then + echo $x >> ${RTPATH}${OUTFILE} + fi + done + + IFS=$OIFS +else + mv $OUTFILE.$RAND2 ${PGPATH}${OUTFILE} +fi + +# cleanup +cleanup + +# return error +exit $RTN